2022-03-03 10:26:15 +00:00
|
|
|
{
|
2024-05-16 06:18:36 +00:00
|
|
|
"type": "module",
|
|
|
|
"workspaces": [
|
|
|
|
"packages/*"
|
|
|
|
],
|
2022-03-03 10:26:15 +00:00
|
|
|
"scripts": {
|
2024-02-07 14:40:08 +00:00
|
|
|
"prepare": "cd .. && husky install ui/.husky",
|
2023-11-02 09:00:28 +00:00
|
|
|
"dev": "run-p dev:console dev:uc",
|
|
|
|
"dev:uc": "vite --host --config ./vite.uc.config.ts",
|
|
|
|
"dev:console": "vite --host --config ./vite.config.ts",
|
|
|
|
"build": "run-s build:console build:uc",
|
2024-06-25 04:31:44 +00:00
|
|
|
"build:uc": "vue-tsc --noEmit -p tsconfig.app.json --composite false && vite build --config ./vite.uc.config.ts",
|
|
|
|
"build:console": "vue-tsc --noEmit -p tsconfig.app.json --composite false && vite build --config ./vite.config.ts",
|
2022-10-14 05:50:17 +00:00
|
|
|
"build:packages": "pnpm --filter \"./packages/**\" build",
|
2023-03-07 14:14:14 +00:00
|
|
|
"api-client:gen": "pnpm --filter \"./packages/api-client\" gen",
|
2022-06-14 07:56:55 +00:00
|
|
|
"test:unit": "vitest --environment jsdom --run && pnpm run test:unit:packages",
|
2022-04-27 07:33:01 +00:00
|
|
|
"test:unit:watch": "vitest --environment jsdom --watch",
|
|
|
|
"test:unit:ui": "vitest --environment jsdom --watch --ui",
|
2022-03-21 06:17:22 +00:00
|
|
|
"test:unit:coverage": "vitest run --environment jsdom --coverage",
|
2022-06-14 07:56:55 +00:00
|
|
|
"typecheck": "vue-tsc --noEmit -p tsconfig.app.json --composite false && pnpm run typecheck:packages",
|
2024-06-28 13:49:00 +00:00
|
|
|
"lint": "eslint \"./src\" \"./console-src\" \"./uc-src\" --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --ignore-path .gitignore --max-warnings=0 -f html -o build/lint-result/index.html && pnpm run lint:packages",
|
|
|
|
"prettier": "prettier --write \"./{src,uc-src,console-src}/**/*.{vue,js,jsx,ts,tsx,css,scss,json,yml,yaml,html}\" && pnpm run prettier:packages",
|
2022-10-14 05:50:17 +00:00
|
|
|
"typecheck:packages": "pnpm --parallel --filter \"./packages/**\" run typecheck",
|
|
|
|
"lint:packages": "pnpm --parallel --filter \"./packages/**\" lint",
|
|
|
|
"prettier:packages": "pnpm --parallel --filter \"./packages/**\" prettier",
|
2024-10-22 06:54:29 +00:00
|
|
|
"test:unit:packages": "pnpm --parallel --filter \"./packages/**\" run test:unit"
|
2022-03-03 10:26:15 +00:00
|
|
|
},
|
2022-12-13 15:38:48 +00:00
|
|
|
"lint-staged": {
|
|
|
|
"*.{vue,js,jsx,ts,tsx,css,scss,json,yml,yaml,html}": [
|
|
|
|
"prettier --write"
|
|
|
|
],
|
|
|
|
"*.{js,ts,vue,tsx,jsx}": [
|
2023-04-23 04:37:33 +00:00
|
|
|
"eslint --fix --max-warnings=0"
|
2022-12-13 15:38:48 +00:00
|
|
|
]
|
|
|
|
},
|
2024-07-01 07:01:17 +00:00
|
|
|
"resolutions": {
|
2025-01-21 02:08:12 +00:00
|
|
|
"axios": "^1.7.9"
|
2024-07-01 07:01:17 +00:00
|
|
|
},
|
2022-03-03 10:26:15 +00:00
|
|
|
"dependencies": {
|
2023-05-11 04:12:21 +00:00
|
|
|
"@codemirror/commands": "^6.1.2",
|
|
|
|
"@codemirror/lang-css": "^6.0.1",
|
|
|
|
"@codemirror/lang-html": "^6.2.0",
|
|
|
|
"@codemirror/lang-javascript": "^6.1.1",
|
|
|
|
"@codemirror/lang-json": "^6.0.1",
|
|
|
|
"@codemirror/language": "^6.3.1",
|
|
|
|
"@codemirror/legacy-modes": "^6.3.0",
|
|
|
|
"@codemirror/state": "^6.1.4",
|
|
|
|
"@codemirror/view": "^6.5.1",
|
2024-05-23 02:56:50 +00:00
|
|
|
"@emoji-mart/data": "^1.2.1",
|
2024-02-29 09:57:39 +00:00
|
|
|
"@formkit/core": "^1.5.9",
|
refactor: enhance formkit select component to support additional features (#6473)
#### What type of PR is this?
/kind feature
/area ui
/milestone 2.19.x
#### What this PR does / why we need it:
此 PR 使用自定义的 Select 组件替换了原有的 Formkit Select 组件,原 Select 组件类型变为 `nativeSelect`。
新的 Select 组件具有如下功能:
- 增加多选、单选两种模式。
- 支持对内容进行搜索、过滤。
- 可使用接口远程加载,并可自定义数据获取。
- 支持扩展远程加载方式。
- 可创建新选项。
- 支持清空所有已选择项。
- 多选状态下可控制最大选择数量。
- 多选状态下可进行排序。
重构后的 Select 组件将自动兼容旧版组件。
使用方式如下:
```vue
<FormKit
type="select"
label="What country makes the best food?"
name="countries"
placeholder="Select a country"
allow-create
clearable
sortable
multiple
searchable
:max-count="3"
:options="[
{ label: 'France', value: 'fr'},
{ label: 'Germany', value: 'de'},
{ label: 'Spain', value: 'es'},
{ label: 'Italy', value: 'ie' },
{ label: 'Greece', value: 'gr'},
]"
help="Don’t worry, you can’t get this one wrong."
/>
```
#### How to test it?
1. 需要测试已使用的 Select 组件功能是否发生了变化。
测试在多选、单选状态下,Select 组件的功能是否可以正常使用。
测试在远程加载时,数据获取是否正常,是否可正常分页,加载状态是否显示。
#### Which issue(s) this PR fixes:
see https://github.com/halo-dev/halo/issues/4931#issuecomment-2060637101
see #6369
#### Does this PR introduce a user-facing change?
```release-note
重构 FormKit 选择器组件以支持更多功能
```
2024-08-26 09:03:14 +00:00
|
|
|
"@formkit/drag-and-drop": "^0.1.6",
|
2024-02-29 09:57:39 +00:00
|
|
|
"@formkit/i18n": "^1.5.9",
|
|
|
|
"@formkit/inputs": "^1.5.9",
|
|
|
|
"@formkit/themes": "^1.5.9",
|
|
|
|
"@formkit/utils": "^1.5.9",
|
|
|
|
"@formkit/validation": "^1.5.9",
|
|
|
|
"@formkit/vue": "^1.5.9",
|
2023-02-17 06:30:13 +00:00
|
|
|
"@halo-dev/api-client": "workspace:*",
|
2022-06-17 06:12:15 +00:00
|
|
|
"@halo-dev/components": "workspace:*",
|
2022-10-10 07:50:18 +00:00
|
|
|
"@halo-dev/console-shared": "workspace:*",
|
2023-11-29 01:14:23 +00:00
|
|
|
"@halo-dev/richtext-editor": "workspace:*",
|
2025-01-21 03:20:12 +00:00
|
|
|
"@tanstack/vue-query": "^4.37.1",
|
2025-01-21 02:52:12 +00:00
|
|
|
"@tiptap/extension-character-count": "^2.11.2",
|
2024-05-27 08:34:56 +00:00
|
|
|
"@uppy/core": "^3.11.3",
|
|
|
|
"@uppy/dashboard": "^3.8.3",
|
|
|
|
"@uppy/drag-drop": "^3.1.0",
|
|
|
|
"@uppy/file-input": "^3.1.2",
|
|
|
|
"@uppy/image-editor": "^2.4.6",
|
|
|
|
"@uppy/locales": "^3.5.3",
|
|
|
|
"@uppy/progress-bar": "^3.1.1",
|
|
|
|
"@uppy/status-bar": "^3.3.3",
|
|
|
|
"@uppy/vue": "^1.1.2",
|
2024-05-30 06:55:15 +00:00
|
|
|
"@uppy/xhr-upload": "3.6.0",
|
2025-01-21 03:20:12 +00:00
|
|
|
"@vueuse/components": "^10.11.1",
|
|
|
|
"@vueuse/core": "^10.11.1",
|
|
|
|
"@vueuse/integrations": "^10.11.1",
|
|
|
|
"@vueuse/router": "^10.11.1",
|
|
|
|
"@vueuse/shared": "^10.11.1",
|
2025-01-21 02:08:12 +00:00
|
|
|
"axios": "^1.7.9",
|
2023-06-25 02:06:14 +00:00
|
|
|
"codemirror": "^6.0.1",
|
2023-03-29 13:44:14 +00:00
|
|
|
"colorjs.io": "^0.4.3",
|
2023-07-24 08:08:04 +00:00
|
|
|
"cropperjs": "^1.5.13",
|
2023-03-29 13:44:14 +00:00
|
|
|
"dayjs": "^1.11.7",
|
2024-05-23 02:56:50 +00:00
|
|
|
"emoji-mart": "^5.6.0",
|
2024-05-22 12:42:47 +00:00
|
|
|
"floating-vue": "^5.2.2",
|
2022-09-28 06:50:16 +00:00
|
|
|
"fuse.js": "^6.6.2",
|
2023-03-23 08:54:33 +00:00
|
|
|
"jsencrypt": "^3.3.2",
|
2023-12-28 09:13:38 +00:00
|
|
|
"lodash-es": "^4.17.21",
|
2024-12-16 02:46:08 +00:00
|
|
|
"object-hash": "^3.0.0",
|
2024-03-11 00:46:08 +00:00
|
|
|
"overlayscrollbars": "^2.5.0",
|
|
|
|
"overlayscrollbars-vue": "^0.5.7",
|
2022-09-04 17:06:11 +00:00
|
|
|
"path-browserify": "^1.0.1",
|
2023-08-16 02:16:25 +00:00
|
|
|
"pinia": "^2.1.6",
|
2022-09-04 17:06:11 +00:00
|
|
|
"pretty-bytes": "^6.0.0",
|
2024-01-15 07:21:27 +00:00
|
|
|
"qrcode": "^1.5.3",
|
2023-03-29 13:44:14 +00:00
|
|
|
"qs": "^6.11.1",
|
2023-09-10 14:08:13 +00:00
|
|
|
"short-unique-id": "^5.0.2",
|
2023-01-30 06:52:11 +00:00
|
|
|
"transliteration": "^2.3.5",
|
2024-06-26 10:53:24 +00:00
|
|
|
"ua-parser-js": "^1.0.38",
|
2025-01-21 03:20:12 +00:00
|
|
|
"vue": "^3.5.13",
|
2024-10-04 12:22:43 +00:00
|
|
|
"vue-demi": "^0.14.10",
|
2024-05-20 08:30:42 +00:00
|
|
|
"vue-draggable-plus": "^0.4.1",
|
2022-05-27 09:28:25 +00:00
|
|
|
"vue-grid-layout": "3.0.0-beta1",
|
2025-01-21 03:20:12 +00:00
|
|
|
"vue-i18n": "^9.14.2",
|
2024-05-22 12:42:47 +00:00
|
|
|
"vue-router": "^4.3.2"
|
2022-03-03 10:26:15 +00:00
|
|
|
},
|
|
|
|
"devDependencies": {
|
2024-08-13 03:44:56 +00:00
|
|
|
"@iconify/json": "^2.2.235",
|
2024-05-22 12:42:47 +00:00
|
|
|
"@intlify/unplugin-vue-i18n": "^4.0.0",
|
2023-06-26 03:54:17 +00:00
|
|
|
"@rushstack/eslint-patch": "^1.3.2",
|
2022-09-09 11:04:04 +00:00
|
|
|
"@tailwindcss/aspect-ratio": "^0.4.2",
|
2022-11-30 14:51:49 +00:00
|
|
|
"@tailwindcss/container-queries": "^0.1.0",
|
2023-11-23 09:32:09 +00:00
|
|
|
"@tailwindcss/forms": "^0.5.7",
|
2023-06-26 03:54:17 +00:00
|
|
|
"@tsconfig/node18": "^2.0.1",
|
2022-11-17 02:38:22 +00:00
|
|
|
"@types/jsdom": "^20.0.1",
|
2023-12-28 09:13:38 +00:00
|
|
|
"@types/lodash-es": "^4.17.12",
|
2023-03-29 13:44:14 +00:00
|
|
|
"@types/node": "^18.11.19",
|
2024-12-16 02:46:08 +00:00
|
|
|
"@types/object-hash": "^3.0.6",
|
2022-07-02 06:01:40 +00:00
|
|
|
"@types/qs": "^6.9.7",
|
2022-09-22 13:56:12 +00:00
|
|
|
"@types/randomstring": "^1.1.8",
|
2024-06-26 10:53:24 +00:00
|
|
|
"@types/ua-parser-js": "^0.7.39",
|
2024-12-16 07:20:09 +00:00
|
|
|
"@vitejs/plugin-vue": "^5.2.1",
|
|
|
|
"@vitejs/plugin-vue-jsx": "^4.1.1",
|
2024-12-15 16:10:06 +00:00
|
|
|
"@vitejs/plugin-legacy": "^6.0.0",
|
2023-08-16 02:16:25 +00:00
|
|
|
"@vitest/ui": "^0.34.1",
|
2025-01-21 03:20:12 +00:00
|
|
|
"@vue/compiler-sfc": "^3.5.13",
|
2023-05-22 08:56:05 +00:00
|
|
|
"@vue/eslint-config-prettier": "^7.1.0",
|
|
|
|
"@vue/eslint-config-typescript": "^11.0.3",
|
2024-05-22 12:42:47 +00:00
|
|
|
"@vue/test-utils": "^2.4.6",
|
2024-02-22 03:12:07 +00:00
|
|
|
"@vue/tsconfig": "^0.5.1",
|
2023-03-29 13:44:14 +00:00
|
|
|
"autoprefixer": "^10.4.14",
|
2022-07-25 08:26:26 +00:00
|
|
|
"c8": "^7.12.0",
|
2023-06-26 03:54:17 +00:00
|
|
|
"eslint": "^8.43.0",
|
2023-08-16 02:16:25 +00:00
|
|
|
"eslint-plugin-vue": "^9.17.0",
|
2023-03-29 13:44:14 +00:00
|
|
|
"husky": "^8.0.3",
|
2022-11-24 13:29:06 +00:00
|
|
|
"jsdom": "^20.0.3",
|
2023-05-22 08:56:05 +00:00
|
|
|
"lint-staged": "^13.2.2",
|
2023-11-02 09:00:28 +00:00
|
|
|
"npm-run-all": "^4.1.5",
|
2023-03-29 13:44:14 +00:00
|
|
|
"postcss": "^8.4.21",
|
2023-06-25 02:06:14 +00:00
|
|
|
"postcss-viewport-height-correction": "^1.1.1",
|
2023-05-22 08:56:05 +00:00
|
|
|
"prettier": "^2.8.8",
|
2024-10-12 07:05:09 +00:00
|
|
|
"prettier-plugin-organize-imports": "^4.1.0",
|
2022-07-30 03:41:40 +00:00
|
|
|
"prettier-plugin-tailwindcss": "^0.1.13",
|
2022-10-26 07:32:13 +00:00
|
|
|
"randomstring": "^1.2.3",
|
2023-08-02 13:12:25 +00:00
|
|
|
"rollup-plugin-gzip": "^3.1.0",
|
2024-12-16 07:20:09 +00:00
|
|
|
"sass-embedded": "^1.82.0",
|
2022-03-03 10:26:15 +00:00
|
|
|
"start-server-and-test": "^1.14.0",
|
2023-03-29 13:44:14 +00:00
|
|
|
"tailwindcss": "^3.2.7",
|
2022-05-23 07:16:23 +00:00
|
|
|
"tailwindcss-safe-area": "^0.2.2",
|
2023-03-29 13:44:14 +00:00
|
|
|
"tailwindcss-themer": "^2.0.3",
|
2024-12-15 16:10:06 +00:00
|
|
|
"terser": "^5.37.0",
|
2024-09-26 08:11:31 +00:00
|
|
|
"typescript": "~5.6.2",
|
2024-08-13 03:44:56 +00:00
|
|
|
"unplugin-icons": "^0.19.2",
|
2024-12-16 07:20:09 +00:00
|
|
|
"vite": "^6.0.3",
|
2023-03-29 13:44:14 +00:00
|
|
|
"vite-plugin-externals": "^0.6.2",
|
2024-05-16 06:18:36 +00:00
|
|
|
"vite-plugin-html": "^3.2.2",
|
|
|
|
"vite-plugin-pwa": "^0.20.0",
|
2024-08-20 03:28:47 +00:00
|
|
|
"vite-plugin-static-copy": "^1.0.6",
|
2023-08-16 02:16:25 +00:00
|
|
|
"vitest": "^0.34.1",
|
2024-09-26 08:11:31 +00:00
|
|
|
"vue-tsc": "^2.1.6"
|
2024-11-26 03:58:28 +00:00
|
|
|
},
|
2024-12-16 07:20:09 +00:00
|
|
|
"packageManager": "pnpm@9.15.0+sha512.76e2379760a4328ec4415815bcd6628dee727af3779aaa4c914e3944156c4299921a89f976381ee107d41f12cfa4b66681ca9c718f0668fa0831ed4c6d8ba56c"
|
2022-03-03 10:26:15 +00:00
|
|
|
}
|