diff --git a/packages/components/.eslintrc.cjs b/packages/components/.eslintrc.cjs new file mode 100644 index 0000000..24b40bd --- /dev/null +++ b/packages/components/.eslintrc.cjs @@ -0,0 +1,26 @@ +module.exports = { + root: true, + env: { + node: true, + es2022: true, + }, + extends: [ + 'plugin:vue/vue3-essential', + 'eslint:recommended', + '@vue/typescript/recommended', + '@vue/prettier', + '@vue/eslint-config-typescript', + ], + parserOptions: { + ecmaVersion: 2022, + }, + ignorePatterns: ['node_modules'], + rules: { + 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', + 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off', + 'no-empty-function': 'off', + '@typescript-eslint/no-empty-function': [1], + '@typescript-eslint/no-explicit-any': 'off', + 'vue/multi-word-component-names': 'off', + }, +} diff --git a/packages/components/index.ts b/packages/components/index.ts new file mode 100644 index 0000000..7cb367e --- /dev/null +++ b/packages/components/index.ts @@ -0,0 +1,3 @@ +export { default as StreamForm } from './streaming/StreamForm.vue' +export { default as StreamingACLForm } from './streaming/StreamingACLForm.vue' +export { default as StreamingAuthForm } from './streaming/StreamingAuthForm.vue' diff --git a/packages/components/package.json b/packages/components/package.json new file mode 100644 index 0000000..efdb219 --- /dev/null +++ b/packages/components/package.json @@ -0,0 +1,54 @@ +{ + "name": "@emqx/shared-ui-components", + "version": "0.0.1", + "homepage": "https://emqx.io", + "license": "Apache-2.0", + "repository": { + "type": "git", + "url": "https://github.com/emqx/shared-ui" + }, + "publishConfig": { + "access": "public" + }, + "type": "module", + "types": "./dist/index.d.ts", + "files": [ + "dist", + "README.md" + ], + "main": "./dist/index.umd.cjs", + "module": "./dist/index.js", + "exports": { + ".": { + "import": "./dist/index.js", + "require": "./dist/index.umd.cjs" + } + }, + "scripts": { + "dev": "vite", + "build": "vue-tsc && vite build && vue-tsc --declaration", + "preview": "vite preview", + "version:patch": "npm version patch", + "version:minor": "npm version minor", + "version:major": "npm version major", + "release": "npm publish" + }, + "dependencies": { + "@emqx/shared-ui-constants": "link:../constants" + }, + "devDependencies": { + "@emqx/shared-ui-utils": "link:../utils", + "@vitejs/plugin-vue": "^5.0.0", + "@vue/eslint-config-prettier": "^9.0.0", + "@vue/eslint-config-typescript": "^13.0.0", + "element-plus": "^2.3.0", + "rollup-plugin-visualizer": "^5.12.0", + "vue": "^3.2.0", + "vue-tsc": "^2.1.10" + }, + "peerDependencies": { + "@emqx/shared-ui-utils": "link:../utils", + "element-plus": "^2.3.0", + "vue": "^3.2.0" + } +} diff --git a/packages/components/streaming/StreamForm.vue b/packages/components/streaming/StreamForm.vue new file mode 100644 index 0000000..70a457b --- /dev/null +++ b/packages/components/streaming/StreamForm.vue @@ -0,0 +1,97 @@ + + + + + diff --git a/packages/components/streaming/StreamingACLForm.vue b/packages/components/streaming/StreamingACLForm.vue new file mode 100644 index 0000000..e8a2852 --- /dev/null +++ b/packages/components/streaming/StreamingACLForm.vue @@ -0,0 +1,146 @@ + + + + +