commit 2072c6780fc944e92b188b0eae2a0e936bde9243 Author: liujj@xcwlkj.com Date: Fri Nov 20 03:44:26 2026 -0800 feat: 资产管理前端从管理端拆分为独立工程 以 ckcloudManage a44810c 为基础,只保留资产页面(台账、单据、基础数据、同步任务)、 登录/错误/个人资料等公共页面,以及资产单据“查看流程”用到的流程详情页; 统一登录应用编码默认 CK_ASSET,标题“资产管理”,本地端口 9090。 Co-Authored-By: Claude Opus 5.5 diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..79a12ff --- /dev/null +++ b/.editorconfig @@ -0,0 +1,12 @@ +root = true +[*.{js,ts,vue}] +charset = utf-8 # 设置文件字符集为 utf-8 +end_of_line = lf # 控制换行类型(lf | cr | crlf) +insert_final_newline = true # 始终在文件末尾插入一个新行 +indent_style = space # 缩进风格(tab | space) +indent_size = 2 # 缩进大小 +max_line_length = 100 # 最大行长度 + +[*.md] # 仅 md 文件适用以下规则 +max_line_length = off # 关闭最大行长度限制 +trim_trailing_whitespace = false # 关闭末尾空格修剪 diff --git a/.env b/.env new file mode 100644 index 0000000..016b102 --- /dev/null +++ b/.env @@ -0,0 +1,18 @@ +# 标题 +VITE_APP_TITLE=资产管理 + +# 统一登录应用编码 +VITE_APP_CODE=CK_ASSET + +# 项目本地运行端口号 +VITE_PORT=9090 + +# open 运行 npm run dev 时自动打开浏览器 +VITE_OPEN=true + +# 租户开关 +VITE_APP_TENANT_ENABLE=true + +# 文档地址的开关 +VITE_APP_DOCALERT_ENABLE=false + diff --git a/.env.dev b/.env.dev new file mode 100644 index 0000000..a577ce9 --- /dev/null +++ b/.env.dev @@ -0,0 +1,31 @@ +# 开发环境:本地只启动前端项目,依赖开发环境(后端、APP) +NODE_ENV=production + +VITE_DEV=true + +# 仅开发:局域网 HTTP 调试时允许无 Web Locks 退化为页内串行 +VITE_ALLOW_INSECURE_HTTP_SSO=true + +# 请求路径 +VITE_BASE_URL='http://127.0.0.1:58080' + +# 接口地址 +VITE_API_URL=/admin-api + +# 是否删除debugger +VITE_DROP_DEBUGGER=false + +# 是否删除console.log +VITE_DROP_CONSOLE=false + +# 是否sourcemap +VITE_SOURCEMAP=true + +# 打包路径 +VITE_BASE_PATH=/ + +# 输出路径 +VITE_OUT_DIR=dist + +# GoView域名 +VITE_GOVIEW_URL='http://127.0.0.1:3000' \ No newline at end of file diff --git a/.env.prod b/.env.prod new file mode 100644 index 0000000..349e5a2 --- /dev/null +++ b/.env.prod @@ -0,0 +1,32 @@ +# 生产环境:只在打包时使用 +NODE_ENV=production + +VITE_DEV=false + +# 生产必须 HTTPS + Web Locks,禁止 HTTP 下退化为页内串行。 +# HTTP 测试环境请使用 test 模式构建(pnpm build:test,见 .env.test)。 +VITE_ALLOW_INSECURE_HTTP_SSO=false + +# 请求路径 +VITE_BASE_URL=/ + +# 接口地址 +VITE_API_URL=/admin-api + +# 是否删除debugger +VITE_DROP_DEBUGGER=true + +# 是否删除console.log +VITE_DROP_CONSOLE=true + +# 是否sourcemap +VITE_SOURCEMAP=false + +# 打包路径 +VITE_BASE_PATH=/ + +# 输出路径 +VITE_OUT_DIR=dist-prod + +# GoView域名 +VITE_GOVIEW_URL='http://127.0.0.1:3000' diff --git a/.env.stage b/.env.stage new file mode 100644 index 0000000..4c0caa5 --- /dev/null +++ b/.env.stage @@ -0,0 +1,28 @@ +# 预发布环境:只在打包时使用 +NODE_ENV=production + +VITE_DEV=false + +# 请求路径 +VITE_BASE_URL=/ + +# 接口地址 +VITE_API_URL=/admin-api + +# 是否删除debugger +VITE_DROP_DEBUGGER=true + +# 是否删除console.log +VITE_DROP_CONSOLE=true + +# 是否sourcemap +VITE_SOURCEMAP=false + +# 打包路径 +VITE_BASE_PATH=/ + +# 输出路径 +VITE_OUT_DIR=dist-stage + +# GoView域名 +VITE_GOVIEW_URL='http://127.0.0.1:3000' \ No newline at end of file diff --git a/.env.test b/.env.test new file mode 100644 index 0000000..aab0fa7 --- /dev/null +++ b/.env.test @@ -0,0 +1,32 @@ +# 测试环境(局域网 HTTP 地址,如 192.168.0.3):只在打包时使用,构建命令 pnpm build:test +# 与 .env.prod 的唯一差异是允许 HTTP 下无 Web Locks 时退化为页内串行,此制品不得部署到生产。 +NODE_ENV=production + +VITE_DEV=false + +# 仅测试环境:HTTP 非安全上下文没有 navigator.locks,允许页内串行降级 +VITE_ALLOW_INSECURE_HTTP_SSO=true + +# 请求路径 +VITE_BASE_URL=/ + +# 接口地址 +VITE_API_URL=/admin-api + +# 是否删除debugger +VITE_DROP_DEBUGGER=true + +# 是否删除console.log +VITE_DROP_CONSOLE=true + +# 是否sourcemap +VITE_SOURCEMAP=false + +# 打包路径 +VITE_BASE_PATH=/ + +# 输出路径 +VITE_OUT_DIR=dist-test + +# GoView域名 +VITE_GOVIEW_URL='http://127.0.0.1:3000' diff --git a/.env.unittest b/.env.unittest new file mode 100644 index 0000000..c1e55d5 --- /dev/null +++ b/.env.unittest @@ -0,0 +1,3 @@ +# 单元测试专用(vitest --mode unittest),不连接任何后端,地址仅用于拼接请求 URL +VITE_BASE_URL='http://127.0.0.1:58080' +VITE_API_URL=/admin-api diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..05ae4a0 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,9 @@ +/build/ +/config/ +/dist/ +/*.js +/test/unit/coverage/ +/node_modules/* +/dist* +/src/main.ts +/vendor/ diff --git a/.eslintrc-auto-import.json b/.eslintrc-auto-import.json new file mode 100644 index 0000000..024c96a --- /dev/null +++ b/.eslintrc-auto-import.json @@ -0,0 +1,259 @@ +{ + "globals": { + "EffectScope": true, + "ElMessage": true, + "ElMessageBox": true, + "ElTag": true, + "asyncComputed": true, + "autoResetRef": true, + "computed": true, + "computedAsync": true, + "computedEager": true, + "computedInject": true, + "computedWithControl": true, + "controlledComputed": true, + "controlledRef": true, + "createApp": true, + "createEventHook": true, + "createGlobalState": true, + "createInjectionState": true, + "createReactiveFn": true, + "createSharedComposable": true, + "createUnrefFn": true, + "customRef": true, + "debouncedRef": true, + "debouncedWatch": true, + "defineAsyncComponent": true, + "defineComponent": true, + "eagerComputed": true, + "effectScope": true, + "extendRef": true, + "getCurrentInstance": true, + "getCurrentScope": true, + "h": true, + "ignorableWatch": true, + "inject": true, + "isDefined": true, + "isProxy": true, + "isReactive": true, + "isReadonly": true, + "isRef": true, + "makeDestructurable": true, + "markRaw": true, + "nextTick": true, + "onActivated": true, + "onBeforeMount": true, + "onBeforeUnmount": true, + "onBeforeUpdate": true, + "onClickOutside": true, + "onDeactivated": true, + "onErrorCaptured": true, + "onKeyStroke": true, + "onLongPress": true, + "onMounted": true, + "onRenderTracked": true, + "onRenderTriggered": true, + "onScopeDispose": true, + "onServerPrefetch": true, + "onStartTyping": true, + "onUnmounted": true, + "onUpdated": true, + "pausableWatch": true, + "provide": true, + "reactify": true, + "reactifyObject": true, + "reactive": true, + "reactiveComputed": true, + "reactiveOmit": true, + "reactivePick": true, + "readonly": true, + "ref": true, + "refAutoReset": true, + "refDebounced": true, + "refDefault": true, + "refThrottled": true, + "refWithControl": true, + "resolveComponent": true, + "resolveRef": true, + "resolveUnref": true, + "shallowReactive": true, + "shallowReadonly": true, + "shallowRef": true, + "syncRef": true, + "syncRefs": true, + "templateRef": true, + "throttledRef": true, + "throttledWatch": true, + "toRaw": true, + "toReactive": true, + "toRef": true, + "toRefs": true, + "triggerRef": true, + "tryOnBeforeMount": true, + "tryOnBeforeUnmount": true, + "tryOnMounted": true, + "tryOnScopeDispose": true, + "tryOnUnmounted": true, + "unref": true, + "unrefElement": true, + "until": true, + "useActiveElement": true, + "useArrayEvery": true, + "useArrayFilter": true, + "useArrayFind": true, + "useArrayFindIndex": true, + "useArrayJoin": true, + "useArrayMap": true, + "useArrayReduce": true, + "useArraySome": true, + "useAsyncQueue": true, + "useAsyncState": true, + "useAttrs": true, + "useBase64": true, + "useBattery": true, + "useBluetooth": true, + "useBreakpoints": true, + "useBroadcastChannel": true, + "useBrowserLocation": true, + "useCached": true, + "useClipboard": true, + "useColorMode": true, + "useConfirmDialog": true, + "useCounter": true, + "useCssModule": true, + "useCssVar": true, + "useCssVars": true, + "useCurrentElement": true, + "useCycleList": true, + "useDark": true, + "useDateFormat": true, + "useDebounce": true, + "useDebounceFn": true, + "useDebouncedRefHistory": true, + "useDeviceMotion": true, + "useDeviceOrientation": true, + "useDevicePixelRatio": true, + "useDevicesList": true, + "useDisplayMedia": true, + "useDocumentVisibility": true, + "useDraggable": true, + "useDropZone": true, + "useElementBounding": true, + "useElementByPoint": true, + "useElementHover": true, + "useElementSize": true, + "useElementVisibility": true, + "useEventBus": true, + "useEventListener": true, + "useEventSource": true, + "useEyeDropper": true, + "useFavicon": true, + "useFetch": true, + "useFileDialog": true, + "useFileSystemAccess": true, + "useFocus": true, + "useFocusWithin": true, + "useFps": true, + "useFullscreen": true, + "useGamepad": true, + "useGeolocation": true, + "useIdle": true, + "useImage": true, + "useInfiniteScroll": true, + "useIntersectionObserver": true, + "useInterval": true, + "useIntervalFn": true, + "useKeyModifier": true, + "useLastChanged": true, + "useLocalStorage": true, + "useMagicKeys": true, + "useManualRefHistory": true, + "useMediaControls": true, + "useMediaQuery": true, + "useMemoize": true, + "useMemory": true, + "useMounted": true, + "useMouse": true, + "useMouseInElement": true, + "useMousePressed": true, + "useMutationObserver": true, + "useNavigatorLanguage": true, + "useNetwork": true, + "useNow": true, + "useObjectUrl": true, + "useOffsetPagination": true, + "useOnline": true, + "usePageLeave": true, + "useParallax": true, + "usePermission": true, + "usePointer": true, + "usePointerSwipe": true, + "usePreferredColorScheme": true, + "usePreferredDark": true, + "usePreferredLanguages": true, + "useRafFn": true, + "useRefHistory": true, + "useResizeObserver": true, + "useRoute": true, + "useRouter": true, + "useScreenOrientation": true, + "useScreenSafeArea": true, + "useScriptTag": true, + "useScroll": true, + "useScrollLock": true, + "useSessionStorage": true, + "useShare": true, + "useSlots": true, + "useSpeechRecognition": true, + "useSpeechSynthesis": true, + "useStepper": true, + "useStorage": true, + "useStorageAsync": true, + "useStyleTag": true, + "useSupported": true, + "useSwipe": true, + "useTemplateRefsList": true, + "useTextDirection": true, + "useTextSelection": true, + "useTextareaAutosize": true, + "useThrottle": true, + "useThrottleFn": true, + "useThrottledRefHistory": true, + "useTimeAgo": true, + "useTimeout": true, + "useTimeoutFn": true, + "useTimeoutPoll": true, + "useTimestamp": true, + "useTitle": true, + "useToggle": true, + "useTransition": true, + "useUrlSearchParams": true, + "useUserMedia": true, + "useVModel": true, + "useVModels": true, + "useVibrate": true, + "useVirtualList": true, + "useWakeLock": true, + "useWebNotification": true, + "useWebSocket": true, + "useWebWorker": true, + "useWebWorkerFn": true, + "useWindowFocus": true, + "useWindowScroll": true, + "useWindowSize": true, + "watch": true, + "watchArray": true, + "watchAtMost": true, + "watchDebounced": true, + "watchEffect": true, + "watchIgnorable": true, + "watchOnce": true, + "watchPausable": true, + "watchPostEffect": true, + "watchSyncEffect": true, + "watchThrottled": true, + "watchTriggerable": true, + "watchWithFilter": true, + "whenever": true + } +} diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 0000000..acf6db4 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,75 @@ +// @ts-check +const { defineConfig } = require('eslint-define-config') +module.exports = defineConfig({ + root: true, + env: { + browser: true, + node: true, + es6: true + }, + parser: 'vue-eslint-parser', + parserOptions: { + parser: '@typescript-eslint/parser', + ecmaVersion: 2020, + sourceType: 'module', + jsxPragma: 'React', + ecmaFeatures: { + jsx: true + } + }, + extends: [ + 'plugin:vue/vue3-recommended', + 'plugin:@typescript-eslint/recommended', + 'prettier', + 'plugin:prettier/recommended', + '@unocss' + ], + rules: { + 'vue/no-setup-props-destructure': 'off', + 'vue/script-setup-uses-vars': 'error', + 'vue/no-reserved-component-names': 'off', + '@typescript-eslint/ban-ts-ignore': 'off', + '@typescript-eslint/explicit-function-return-type': 'off', + '@typescript-eslint/no-explicit-any': 'off', + '@typescript-eslint/no-var-requires': 'off', + '@typescript-eslint/no-empty-function': 'off', + 'vue/custom-event-name-casing': 'off', + 'no-use-before-define': 'off', + '@typescript-eslint/no-use-before-define': 'off', + '@typescript-eslint/ban-ts-comment': 'off', + '@typescript-eslint/ban-types': 'off', + '@typescript-eslint/no-non-null-assertion': 'off', + '@typescript-eslint/explicit-module-boundary-types': 'off', + '@typescript-eslint/no-unused-vars': 'off', + 'no-unused-vars': 'off', + 'space-before-function-paren': 'off', + + 'vue/attributes-order': 'off', + 'vue/one-component-per-file': 'off', + 'vue/html-closing-bracket-newline': 'off', + 'vue/max-attributes-per-line': 'off', + 'vue/multiline-html-element-content-newline': 'off', + 'vue/singleline-html-element-content-newline': 'off', + 'vue/attribute-hyphenation': 'off', + 'vue/require-default-prop': 'off', + 'vue/require-explicit-emits': 'off', + 'vue/require-toggle-inside-transition': 'off', + 'vue/html-self-closing': [ + 'error', + { + html: { + void: 'always', + normal: 'never', + component: 'always' + }, + svg: 'always', + math: 'always' + } + ], + 'vue/multi-word-component-names': 'off', + 'vue/no-v-html': 'off', + 'prettier/prettier': 'off', // 默认关闭 prettier 的 ESLint 校验,因为我们使用的是 IDE 的 Prettier 插件 + '@unocss/order': 'off', // 禁用 unocss 【css】顺序的提示,因为暂时不需要这么严格,警告也有点繁琐 + '@unocss/order-attributify': 'off' // 禁用 unocss 【属性】顺序的提示,因为暂时不需要这么严格,警告也有点繁琐 + } +}) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml new file mode 100644 index 0000000..347151e --- /dev/null +++ b/.gitea/workflows/ci.yml @@ -0,0 +1,43 @@ +name: CI + +on: + push: + pull_request: + +jobs: + build-and-test: + runs-on: ubuntu-latest + env: + NODE_OPTIONS: --max-old-space-size=4096 + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup pnpm + uses: pnpm/action-setup@v4 + with: + version: 11 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 24 + cache: pnpm + + - name: Install + run: pnpm install --frozen-lockfile + + - name: Build + run: pnpm build:prod + + - name: Type check + run: pnpm ts:check + + - name: Lint + run: pnpm lint + + - name: Unit test with coverage + run: pnpm test:coverage + + - name: Audit + run: pnpm audit --registry=https://registry.npmjs.org --audit-level=critical diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f70c2a9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,27 @@ +node_modules +.DS_Store +dist +dist-ssr +/dist* +pnpm-debug +.idea +.history +__pycache__/ +*.pyc + +# 本地环境变量(含个人配置,不入库) +.env.local +.env.*.local + +# AI 编码辅助文件,仅本地使用 +AGENTS.md +CLAUDE.md +GEMINI.md +skills-lock.json +.agents/ +.claude/ +.codex/ +.cursor/ + +# 单元测试覆盖率报告 +coverage/ diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..441bb33 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,12 @@ +/node_modules/** +/dist/ +/dist* +/public/* +/docs/* +/vite.config.ts +/src/types/env.d.ts +/src/types/auto-components.d.ts +/src/types/auto-imports.d.ts +/docs/**/* +CHANGELOG +/vendor/ diff --git a/.stylelintignore b/.stylelintignore new file mode 100644 index 0000000..52b3e0d --- /dev/null +++ b/.stylelintignore @@ -0,0 +1,7 @@ +/dist/* +/public/* +public/* +/dist* +/src/types/env.d.ts +/docs/**/* +/vendor/ diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..9861118 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021-present Archer + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..0017a6b --- /dev/null +++ b/README.md @@ -0,0 +1,21 @@ +# caikai-assets + +财开云资产管理前端:实物资产台账、资产单据、基础数据、同步任务(致远/金蝶)。 + +- 统一登录应用编码 `CK_ASSET`(`.env` 中 `VITE_APP_CODE`),菜单由平台按该应用下发。 +- 后端接口在 `ckcloud-platform` 的 `ckcloud-module-asset` 模块,随平台后端发布。 +- 部署路径 `/asset/`,构建时传 `VITE_BASE_PATH=/asset/`。 + +## 开发 + +```bash +pnpm install +pnpm dev # 需本地 .env.local,参照 .env.dev +pnpm build:prod +``` + +## 目录 + +- `src/views/asset`:资产页面 +- `src/api/asset`:资产接口 +- `src/views/system/bpm/processInstance/detail`:资产单据“查看流程”使用的流程详情页 diff --git a/build/vite/index.ts b/build/vite/index.ts new file mode 100644 index 0000000..5cd20bc --- /dev/null +++ b/build/vite/index.ts @@ -0,0 +1,108 @@ +import { resolve } from 'path' +import Vue from '@vitejs/plugin-vue' +import VueJsx from '@vitejs/plugin-vue-jsx' +import progress from 'vite-plugin-progress' +import EslintPlugin from 'vite-plugin-eslint' +import PurgeIcons from 'vite-plugin-purge-icons' +import { ViteEjsPlugin } from 'vite-plugin-ejs' +import ElementPlus from 'unplugin-element-plus/vite' +import AutoImport from 'unplugin-auto-import/vite' +import Components from 'unplugin-vue-components/vite' +import { ElementPlusResolver } from 'unplugin-vue-components/resolvers' +import viteCompression from 'vite-plugin-compression' +import topLevelAwait from 'vite-plugin-top-level-await' +import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite' +import { createSvgIconsPlugin } from 'vite-plugin-svg-icons-ng' +import UnoCSS from 'unocss/vite' + +export function createVitePlugins() { + const root = process.cwd() + // 单元测试只需要编译相关插件(Vue/JSX/自动导入/i18n),构建期插件跳过以加快速度 + const isTest = !!process.env.VITEST + + // 路径查找 + function pathResolve(dir: string) { + return resolve(root, '.', dir) + } + + return [ + Vue(), + VueJsx(), + UnoCSS(), + ...(isTest ? [] : [progress(), PurgeIcons()]), + ElementPlus({}), + AutoImport({ + include: [ + /\.[tj]sx?$/, // .ts, .tsx, .js, .jsx + /\.vue$/, + /\.vue\?vue/, // .vue + /\.md$/ // .md + ], + imports: [ + 'vue', + 'vue-router', + // 可额外添加需要 autoImport 的组件 + { + '@/hooks/web/useI18n': ['useI18n'], + '@/hooks/web/useMessage': ['useMessage'], + '@/hooks/web/useTable': ['useTable'], + '@/hooks/web/useCrudSchemas': ['useCrudSchemas'], + '@/utils/formRules': ['required'], + '@/utils/dict': ['DICT_TYPE'] + } + ], + dts: 'src/types/auto-imports.d.ts', + resolvers: [ElementPlusResolver()], + eslintrc: { + enabled: false, // Default `false` + filepath: './.eslintrc-auto-import.json', // Default `./.eslintrc-auto-import.json` + globalsPropValue: true // Default `true`, (true | false | 'readonly' | 'readable' | 'writable' | 'writeable') + } + }), + Components({ + // 生成自定义 `auto-components.d.ts` 全局声明 + dts: 'src/types/auto-components.d.ts', + // 自定义组件的解析器 + resolvers: [ElementPlusResolver()], + globs: ['src/components/**/*.vue'] + }), + ...(isTest + ? [] + : [ + EslintPlugin({ + cache: false, + include: ['src/**/*.vue', 'src/**/*.ts', 'src/**/*.tsx'] // 检查的文件 + }) + ]), + VueI18nPlugin({ + // 动态导入的 TS 语言包包含原始字符串,需要保留运行时文本编译器。 + runtimeOnly: false, + compositionOnly: true, + include: [resolve(__dirname, 'src/locales/**')] + }), + createSvgIconsPlugin({ + iconDirs: [pathResolve('src/assets/svgs')], + symbolId: 'icon-[dir]-[name]', + }), + ...(isTest + ? [] + : [ + viteCompression({ + verbose: true, // 是否在控制台输出压缩结果 + disable: false, // 是否禁用 + threshold: 10240, // 体积大于 threshold 才会被压缩,单位 b + algorithm: 'gzip', // 压缩算法,可选 [ 'gzip' , 'brotliCompress' ,'deflate' , 'deflateRaw'] + ext: '.gz', // 生成的压缩包后缀 + deleteOriginFile: false //压缩后是否删除源文件 + }) + ]), + ViteEjsPlugin(), + topLevelAwait({ + // https://juejin.cn/post/7152191742513512485 + // The export name of top-level await promise for each chunk module + promiseExportName: '__tla', + // The function to generate import names of top-level await promise in each chunk module + promiseImportName: (i) => `__tla_${i}` + }) + ] +} diff --git a/build/vite/optimize.ts b/build/vite/optimize.ts new file mode 100644 index 0000000..43003da --- /dev/null +++ b/build/vite/optimize.ts @@ -0,0 +1,122 @@ +const include = [ + 'qs', + 'url', + 'vue', + 'sass', + 'mitt', + 'axios', + 'pinia', + 'dayjs', + 'qrcode', + 'vue-router', + 'vue-types', + 'vue-i18n', + 'cropperjs', + 'lodash-es', + 'nprogress', + 'web-storage-cache', + '@iconify/iconify', + '@vueuse/core', + '@zxcvbn-ts/core', + 'echarts/core', + 'echarts/charts', + 'echarts/components', + 'echarts/renderers', + 'echarts-wordcloud', + '@wangeditor-next/editor', + '@wangeditor-next/editor-for-vue', + '@microsoft/fetch-event-source', + 'markdown-it', + 'markmap-view', + 'markmap-lib', + 'markmap-toolbar', + 'highlight.js', + 'element-plus', + 'element-plus/es', + 'element-plus/es/locale/lang/zh-cn', + 'element-plus/es/locale/lang/en', + 'element-plus/es/components/avatar/style/css', + 'element-plus/es/components/space/style/css', + 'element-plus/es/components/backtop/style/css', + 'element-plus/es/components/form/style/css', + 'element-plus/es/components/radio-group/style/css', + 'element-plus/es/components/radio/style/css', + 'element-plus/es/components/checkbox/style/css', + 'element-plus/es/components/checkbox-group/style/css', + 'element-plus/es/components/switch/style/css', + 'element-plus/es/components/time-picker/style/css', + 'element-plus/es/components/date-picker/style/css', + 'element-plus/es/components/descriptions/style/css', + 'element-plus/es/components/descriptions-item/style/css', + 'element-plus/es/components/link/style/css', + 'element-plus/es/components/tooltip/style/css', + 'element-plus/es/components/drawer/style/css', + 'element-plus/es/components/dialog/style/css', + 'element-plus/es/components/checkbox-button/style/css', + 'element-plus/es/components/option-group/style/css', + 'element-plus/es/components/radio-button/style/css', + 'element-plus/es/components/cascader/style/css', + 'element-plus/es/components/color-picker/style/css', + 'element-plus/es/components/input-number/style/css', + 'element-plus/es/components/rate/style/css', + 'element-plus/es/components/select-v2/style/css', + 'element-plus/es/components/tree-select/style/css', + 'element-plus/es/components/slider/style/css', + 'element-plus/es/components/time-select/style/css', + 'element-plus/es/components/autocomplete/style/css', + 'element-plus/es/components/image-viewer/style/css', + 'element-plus/es/components/upload/style/css', + 'element-plus/es/components/col/style/css', + 'element-plus/es/components/form-item/style/css', + 'element-plus/es/components/alert/style/css', + 'element-plus/es/components/breadcrumb/style/css', + 'element-plus/es/components/select/style/css', + 'element-plus/es/components/input/style/css', + 'element-plus/es/components/breadcrumb-item/style/css', + 'element-plus/es/components/tag/style/css', + 'element-plus/es/components/pagination/style/css', + 'element-plus/es/components/table/style/css', + 'element-plus/es/components/table-v2/style/css', + 'element-plus/es/components/table-column/style/css', + 'element-plus/es/components/card/style/css', + 'element-plus/es/components/row/style/css', + 'element-plus/es/components/button/style/css', + 'element-plus/es/components/menu/style/css', + 'element-plus/es/components/sub-menu/style/css', + 'element-plus/es/components/menu-item/style/css', + 'element-plus/es/components/option/style/css', + 'element-plus/es/components/dropdown/style/css', + 'element-plus/es/components/dropdown-menu/style/css', + 'element-plus/es/components/dropdown-item/style/css', + 'element-plus/es/components/skeleton/style/css', + 'element-plus/es/components/skeleton/style/css', + 'element-plus/es/components/backtop/style/css', + 'element-plus/es/components/menu/style/css', + 'element-plus/es/components/sub-menu/style/css', + 'element-plus/es/components/menu-item/style/css', + 'element-plus/es/components/dropdown/style/css', + 'element-plus/es/components/tree/style/css', + 'element-plus/es/components/dropdown-menu/style/css', + 'element-plus/es/components/dropdown-item/style/css', + 'element-plus/es/components/badge/style/css', + 'element-plus/es/components/breadcrumb/style/css', + 'element-plus/es/components/breadcrumb-item/style/css', + 'element-plus/es/components/image/style/css', + 'element-plus/es/components/collapse-transition/style/css', + 'element-plus/es/components/timeline/style/css', + 'element-plus/es/components/timeline-item/style/css', + 'element-plus/es/components/collapse/style/css', + 'element-plus/es/components/collapse-item/style/css', + 'element-plus/es/components/button-group/style/css', + 'element-plus/es/components/text/style/css', + 'element-plus/es/components/segmented/style/css', + '@element-plus/icons-vue', + 'element-plus/es/components/footer/style/css', + 'element-plus/es/components/empty/style/css', + 'element-plus/es/components/mention/style/css', + 'element-plus/es/components/progress/style/css' +] + +const exclude = ['@iconify/json'] + +export { include, exclude } diff --git a/docs/LIST_PAGE_SPEC.md b/docs/LIST_PAGE_SPEC.md new file mode 100644 index 0000000..507d2fc --- /dev/null +++ b/docs/LIST_PAGE_SPEC.md @@ -0,0 +1,66 @@ +# 管理端列表页样式规范 + +适用于管理端所有“搜索 + 表格 + 分页”的内页。新页面优先用 `@/components/PublicView`,组件默认就符合本规范;暂未迁移的旧页面(`ContentWrap` + `el-form` + `el-table` + `Pagination`)在根节点加 `ckyun-list-page` 类并按下文调整结构。 + +## 1. 页面框架 + +| 区域 | 规范 | +|------|------| +| 顶栏 | 深红纯色(`--ckyun-header-bg-color`),左侧 logo + 面包屑,右侧“回到门户”和当前身份(只显示到集团/企业,部门岗位在悬停提示和切换下拉里) | +| 位置 | 只在顶栏面包屑显示,页面内**不再放页面标题**;需要返回的详情页由路由 `meta.pageBackPath` 显示“返回 + 标题”行 | +| 内容区 | 通栏铺满,不留外边距;背景 `--app-content-bg-color`(浅灰) | + +## 2. 从上到下的四个区域 + +``` +┌──────────────────────────────────────────────┐ +│ ① 搜索区 字段 字段 字段 字段 │ 白底通栏,贴边 +│ 字段 字段 [筛选][重置] │ +│ ② 工具栏行 [+ 新增] [导出] … │ 紧接搜索区,同一块白底,靠左 +├──────────────────────────────────────────────┤ +│ ③ 表格卡片(四周留 16,圆角 8,阴影) │ +│ 表头浅灰 37px,行高 45px,操作列在最右 │ +├──────────────────────────────────────────────┤ +│ ④ 分页条 共 N 条记录,第 x / y 页 首页 上一页 1 2 … 下一页 尾页 每页 [10] 条 │ +└──────────────────────────────────────────────┘ +``` + +### ① 搜索区 + +- 白底通栏,左右内边距 16px,上 12px、下 14px,底部 1px 分隔线(下面有工具栏行时分隔线移到工具栏行底部)。 +- 标签在输入框**上方**,字号 12px;控件高 30px,宽度占满所在列。 +- 每行 4 列(≤1200px 3 列,≤768px 1 列),列间距 12px。 +- “筛选”(主按钮)“重置”固定在最后一个字段右侧、右对齐;字段多时用“展开/收起”。 +- 按钮文字统一为“筛选”“重置”,不用“搜索”“查询”。 + +### ② 工具栏行 + +- 放页面级操作:新增、导入导出、批量操作、刷新等;**不放筛选/重置**。 +- **放在查询条件下面,另起一行靠左**,与搜索区连成同一块白底;主操作(新增)在最前,用 `type="primary"`,其余默认按钮,间距 8px。 +- 页面需要先选上下文(如应用)时,选择器和按钮放在搜索区**上方**一行,选择器在最左、前面带“选择应用:”,按钮紧跟其后。 +- 没有任何操作时整行不显示。`PublicView` 在没有标题/`header` 插槽时自动把按钮行放到查询条件下面。 + +### ③ 表格卡片 + +- 与搜索区、分页条之间留 16px,左右 16px;白底,圆角 8px,阴影 `--ckyun-list-panel-shadow`,无边框。 +- 表头背景 `--ckyun-table-header-bg`,高 37px;数据行高 45px;单元格左右内边距 12px。 +- 第一列(名称/编号)加粗;状态用小标签;空数据显示“暂无数据”。 +- 操作列固定在最右,文字按钮,主操作红色(`--ckyun-table-action-primary-color`),间距 8px;超过 3 个收进“更多”。 + +### ④ 分页条 + +- 贴在页面底部的白色通栏,高 44px,左右内边距 16px,顶部 1px 分隔线。 +- 左侧“共 N 条记录,第 x / y 页”;右侧“首页 / 上一页 / 页码 / 下一页 / 尾页 / 每页 [n] 条”。 +- 旧页面使用 `PublicViewPagination`(从 `@/components/PublicView` 导入),不要用 `Pagination`。 + +## 3. 非列表页 + +左树右详情(组织架构、岗位、分组)、设计器、看板等不套用表格规范,但遵守:页面内不放页面标题、内容区通栏、卡片圆角 8px + 阴影、主按钮放在所属卡片右上角。 + +## 4. 检查清单 + +- [ ] 页面内没有和面包屑重复的标题 +- [ ] 新增等操作在查询条件下面一行靠左,筛选/重置在搜索区右侧 +- [ ] 搜索区标签在上、4 列网格、通栏白底 +- [ ] 表格是四周留 16px 的圆角卡片 +- [ ] 分页条在底部,格式为“共 N 条记录,第 x / y 页” diff --git a/docs/SSO_BROWSER_SESSION.md b/docs/SSO_BROWSER_SESSION.md new file mode 100644 index 0000000..6455599 --- /dev/null +++ b/docs/SSO_BROWSER_SESSION.md @@ -0,0 +1,84 @@ +# SSO browser-session contract + +- Login and logout URL creation are POST requests with a cryptographically random + 32-byte requestId. The initial login requestId is the browser transaction ID; + there is no additional state parameter in the Ticket SSO protocol. + The callback returns ticket and requestId; logout returns logout=1 and requestId. + Ticket exchange sends the original ID as loginRequestId. The adapter generates + a different requestId for its signed center exchange request, preserving replay + protection. Browser requests include credentials for the HttpOnly binding. +- The frontend requestId check is supplementary. The backend must independently bind + and consume each transaction; a valid ticket by itself is insufficient. +- Login and logout transactions have an 8-hour client lifetime matching the center + recovery window, are bound to the + originating tab and login generation, and are superseded by a newer transaction + for this application. Callback errors remain visible until explicit user retry. +- Access/refresh tokens, login generation and center-session binding are written + as one application-namespaced localStorage record. Refresh preserves the + generation and center binding. Other tabs reload identity and menus when the + generation changes; old-page requests and old-generation responses are rejected. +- Logout URL creation uses Origin, browser binding, requestId and the captured center + generation, not a currently valid access token. Application logout sends the + captured token without automatic refresh. Flow creation, login commits, logout cleanup, refresh, + revoked-session cleanup and account-switch actions share the same Web Lock and + recheck the captured flow or session after acquiring it. The backend must also resolve a replaced access token + to its original refresh-token family. The center URL is bound to the captured + opaque center-session generation, so a delayed logout cannot clear a newer + center session. +- Callback and local authentication URLs use Vite BASE_URL. The registered + application callback must exactly match the deployed base path. +- Legacy unnamespaced tokens are intentionally not migrated: their owning + application cannot be established safely. Deployment requires a fresh login. +- Browser flow storage uses v2 keys and does not accept previous state-based + transactions. Historical OAuth and social-login state parameters remain unchanged. +- The standalone center page at /zcy/login is not coupled to the management + application's local login generation. Its captcha requests carry no management + token; its form is bound by the backend's HttpOnly cookie and login token. +- Sliding captcha is temporarily disabled (2026-10-24). `UnifiedLogin.vue` reads + `VITE_APP_CAPTCHA_ENABLE`; when false, it submits the account/password form + directly and does not mount the captcha widget. The backend + `ckcloud.captcha.enable` must also be false. To restore captcha, enable both + switches and restart/rebuild the affected services. +- Changing an existing mobile number or email address prompts for currentPassword + without storing it in the profile or login cache. Successful sensitive changes + revoke sessions and send the user directly to forced login. +- Profile password changes also revoke all sessions. The success event carries + the pre-request session snapshot; cleanup and forced login occur under the + shared lock only if that login generation is still current. +- HTTPS and same-site deployment of the frontend and first-party adapter are + required for browser cookie binding. CORS must allow the exact frontend origin + with credentials, never a credentialed wildcard. +- A modern browser with the Web Locks API is required by default. Unsupported + browsers or insecure origins display an explicit error and cannot change login + state. A dedicated HTTP test artifact may explicitly set + `VITE_ALLOW_INSECURE_HTTP_SSO=true`; it serializes writes only within the current + page and therefore must not be used for production or concurrent cross-tab + account switching. Token writes and removals still assert lock ownership. +- Test artifacts may set `VITE_SSO_CENTER_PORT_MAP` (for example, + `8081:9000,1081:2000`) so browser redirects use the matching internal or + externally mapped identity-center port. This is an automatic exact port map; + users never choose a center and production artifacts leave it unset. +- Requests capture one session snapshot before checking the page generation and + use only that snapshot's token. An old page cannot adopt another tab's new + identity between the page check and the Authorization header assignment. + +## Focused manual acceptance + +Logout URL or server revocation failures do not prevent local cleanup. Each +failure path rechecks the captured flow and session before clearing storage. +The callback displays an explicit incomplete-revocation warning; a stale logout +must still abort without deleting a newer login. Local-only completion never +claims all application or center sessions were revoked. + +No automated tests or builds were executed for this hardening change. + +1. Login each application with an independent requestId and ensure same-origin deployment + does not overwrite the other application's token or tenant/user cache. +2. Reject absent, mismatched, expired, replayed and foreign-browser callback requestId. +3. Start two login attempts; only the current transaction may commit locally. +4. Change account in a second tab while requests are pending; reload the first tab + without displaying the old identity with the new account's data. +5. Logout while refresh is pending, then login in another tab. Old logout responses + and callbacks must not remove the new session. +6. Confirm revoked application access stops at an error page without a login loop. +7. Verify callbacks and retry links when deployed at a non-root base path. diff --git a/index.html b/index.html new file mode 100644 index 0000000..0333478 --- /dev/null +++ b/index.html @@ -0,0 +1,175 @@ + + + + + + + + + + %VITE_APP_TITLE% + + +
+ +
+
+
+ +
%VITE_APP_TITLE%
+
+
+
+
+
+
+
+
+ + + diff --git a/lint-staged.config.js b/lint-staged.config.js new file mode 100644 index 0000000..184e401 --- /dev/null +++ b/lint-staged.config.js @@ -0,0 +1,3 @@ +module.exports = { + "*.{vue,ts}": ["vue-tsc-files --noEmit"] +} \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..4cac61d --- /dev/null +++ b/package.json @@ -0,0 +1,156 @@ +{ + "name": "caikai-assets", + "version": "0.1.0", + "description": "财开云资产管理前端(实物资产台账、单据、同步)", + "private": true, + "scripts": { + "i": "pnpm install", + "dev": "vite --mode env.local", + "dev-server": "vite --mode dev", + "ts:check": "node --max_old_space_size=8192 ./node_modules/vue-tsc/bin/vue-tsc.js --noEmit", + "build:local": "node --max_old_space_size=4096 ./node_modules/vite/bin/vite.js build", + "build:dev": "node --max_old_space_size=4096 ./node_modules/vite/bin/vite.js build --mode dev", + "build:test": "node --max_old_space_size=4096 ./node_modules/vite/bin/vite.js build --mode test", + "build:stage": "node --max_old_space_size=4096 ./node_modules/vite/bin/vite.js build --mode stage", + "build:prod": "node --max_old_space_size=4096 ./node_modules/vite/bin/vite.js build --mode prod", + "serve:dev": "vite preview --mode dev", + "serve:prod": "vite preview --mode prod", + "preview": "pnpm build:local && vite preview", + "test": "vitest run --mode unittest", + "test:watch": "vitest --mode unittest", + "test:coverage": "vitest run --mode unittest --coverage", + "clean": "npx rimraf node_modules", + "clean:cache": "npx rimraf node_modules/.cache", + "lint": "eslint --ext .js,.ts,.vue --max-warnings 0 ./src", + "lint:eslint": "eslint --fix --ext .js,.ts,.vue ./src", + "lint:format": "prettier --write --loglevel warn \"src/**/*.{js,ts,json,tsx,css,less,scss,vue,html,md}\"", + "lint:style": "stylelint --fix \"./src/**/*.{vue,less,postcss,css,scss}\" --cache --cache-location node_modules/.cache/stylelint/", + "lint:lint-staged": "lint-staged -c " + }, + "dependencies": { + "@element-plus/icons-vue": "2.3.2", + "@form-create/designer": "^3.5.0", + "@form-create/element-ui": "^3.3.4", + "@iconify/iconify": "^3.1.1", + "@microsoft/fetch-event-source": "^2.0.1", + "@videojs-player/vue": "^1.0.0", + "@vueuse/core": "^10.9.0", + "@wangeditor-next/editor": "^5.6.46", + "@wangeditor-next/editor-for-vue": "^5.1.14", + "@wangeditor-next/plugin-mention": "^1.0.16", + "@zxcvbn-ts/core": "^3.0.4", + "acorn": "8.19.0", + "animate.css": "^4.1.1", + "axios": "1.20.0", + "benz-amr-recorder": "^1.1.5", + "bpmn-js-token-simulation": "^0.36.0", + "camunda-bpmn-moddle": "^7.0.1", + "cropperjs": "^1.6.1", + "crypto-js": "4.2.0", + "dayjs": "^1.11.10", + "diagram-js": "^12.8.0", + "driver.js": "^1.3.1", + "echarts": "^5.5.0", + "echarts-wordcloud": "^2.1.0", + "element-plus": "2.14.5", + "highlight.js": "^11.9.0", + "jsoneditor": "^10.1.3", + "lodash-es": "^4.18.1", + "markdown-it": "^14.3.3", + "markmap-common": "^0.16.0", + "markmap-lib": "^0.16.1", + "markmap-toolbar": "^0.17.0", + "markmap-view": "^0.16.0", + "min-dash": "^4.1.1", + "mitt": "^3.0.1", + "nprogress": "^0.2.0", + "pinia": "^2.1.7", + "pinia-plugin-persistedstate": "^3.2.1", + "qrcode": "^1.5.3", + "qs": "^6.16.0", + "snabbdom": "^3.6.2", + "sortablejs": "^1.15.3", + "steady-xml": "^0.1.0", + "url": "^0.11.3", + "video.js": "^7.21.5", + "vue": "3.5.44", + "vue-dompurify-html": "^4.1.4", + "vue-i18n": "9.14.5", + "vue-router": "4.4.5", + "vue-types": "^5.1.1", + "vue3-print-nb": "^0.1.4", + "vue3-signature": "^0.2.4", + "vuedraggable": "^4.1.0", + "web-storage-cache": "^1.1.1", + "xml-js": "^1.6.11" + }, + "devDependencies": { + "@commitlint/cli": "^19.0.1", + "@commitlint/config-conventional": "^19.0.0", + "@iconify/json": "^2.2.187", + "@intlify/unplugin-vue-i18n": "^11.2.7", + "@purge-icons/generated": "^0.9.0", + "@types/jsoneditor": "^9.9.5", + "@types/lodash-es": "^4.17.12", + "@types/node": "^20.19.43", + "@types/nprogress": "^0.2.3", + "@types/qrcode": "^1.5.5", + "@types/qs": "^6.9.12", + "@typescript-eslint/eslint-plugin": "^7.1.0", + "@typescript-eslint/parser": "^7.1.0", + "@unocss/eslint-config": "^0.57.4", + "@unocss/eslint-plugin": "66.1.0-beta.5", + "@vitejs/plugin-vue": "^6.0.10", + "@vitejs/plugin-vue-jsx": "^5.1.6", + "@vitest/coverage-v8": "^4.1.12", + "@vue/test-utils": "^2.5.1", + "autoprefixer": "^10.4.17", + "bpmn-js": "^17.9.2", + "bpmn-js-properties-panel": "5.23.0", + "consola": "^3.2.3", + "eslint": "^8.57.0", + "eslint-config-prettier": "^9.1.0", + "eslint-define-config": "^2.1.0", + "eslint-plugin-prettier": "^5.1.3", + "eslint-plugin-vue": "^9.22.0", + "jsdom": "^26.1.0", + "lint-staged": "^15.2.10", + "postcss": "^8.4.35", + "postcss-html": "^1.6.0", + "postcss-scss": "^4.0.9", + "prettier": "^3.2.5", + "prettier-eslint": "^16.3.0", + "rimraf": "^5.0.5", + "rollup": "^4.59.0", + "sass": "^1.69.5", + "stylelint": "^16.2.1", + "stylelint-config-html": "^1.1.0", + "stylelint-config-recommended": "^14.0.0", + "stylelint-config-standard": "^36.0.0", + "stylelint-order": "^6.0.4", + "terser": "^5.28.1", + "typescript": "5.3.3", + "unocss": "~66.11.0", + "unplugin-auto-import": "^0.16.7", + "unplugin-element-plus": "^0.8.0", + "unplugin-vue-components": "^0.25.2", + "vite": "^7.3.7", + "vite-plugin-compression": "^0.5.1", + "vite-plugin-ejs": "^1.7.0", + "vite-plugin-eslint": "^1.8.1", + "vite-plugin-progress": "^0.0.7", + "vite-plugin-purge-icons": "^0.10.0", + "vite-plugin-svg-icons-ng": "^1.3.1", + "vite-plugin-top-level-await": "^1.4.4", + "vitest": "^4.1.12", + "vue-eslint-parser": "^9.3.2", + "vue-tsc": "^1.8.27", + "vue-tsc-files": "^0.0.6" + }, + "license": "MIT", + "web-types": "./web-types.json", + "engines": { + "node": ">= 16.0.0", + "pnpm": ">=8.6.0" + } +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml new file mode 100644 index 0000000..8f350ce --- /dev/null +++ b/pnpm-lock.yaml @@ -0,0 +1,11774 @@ +lockfileVersion: '9.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +overrides: + form-data@4: ^4.0.6 + '@xmldom/xmldom@<0.8.15': ^0.8.15 + brace-expansion@1: ^1.1.21 + brace-expansion@2: ^2.1.7 + glob@10: ^10.5.0 + js-yaml@4: ^4.3.2 + minimatch@3: ^3.1.5 + minimatch@5: ^5.1.9 + minimatch@9: ^9.0.9 + rollup@2: ^2.80.0 + rollup@4: 4.65.0 + svgo@3: ^3.3.5 + flatted@3: ^3.4.4 + picomatch@2: ^2.3.2 + picomatch@4: ^4.0.7 + lodash@4: ^4.18.1 + defu@6: ^6.1.7 + postcss@8: 8.5.31 + immutable@5: ^5.1.9 + linkify-it@5: ^5.0.2 + fast-uri@3: ^3.1.9 + nanoid@3: ^3.3.20 + nanoid@5: ^5.1.16 + browserslist@4: 4.29.4 + source-map-js@1: ^1.2.2 + dompurify@3: ^3.4.17 + '@purge-icons/core>axios': ^0.34.0 + follow-redirects@1: ^1.16.2 + yaml@2: ^2.9.1 + ajv@6: ^6.15.0 + ajv@8: ^8.20.0 + prismjs@1: ^1.30.0 + katex@0.16: ^0.16.47 + postcss-selector-parser@6: ^6.1.5 + postcss-selector-parser@7: ^7.1.7 + colord@2: ^2.10.0 + '@babel/runtime@7': ^7.29.10 + '@babel/helpers@7': ^7.29.10 + '@babel/runtime-corejs3@7': ^7.29.10 + qs@6: 6.16.1 + '@intlify/shared@9': ^9.14.5 + vite-plugin-top-level-await>uuid: ^11.1.1 + '@babel/core@7': ^7.29.1 + min-document@2: ^2.19.1 + electron-to-chromium@1: 1.5.464 + +importers: + + .: + dependencies: + '@element-plus/icons-vue': + specifier: 2.3.2 + version: 2.3.2(vue@3.5.44(typescript@5.3.3)) + '@form-create/designer': + specifier: ^3.5.0 + version: 3.5.0(vue@3.5.44(typescript@5.3.3)) + '@form-create/element-ui': + specifier: ^3.3.4 + version: 3.3.4(vue@3.5.44(typescript@5.3.3)) + '@iconify/iconify': + specifier: ^3.1.1 + version: 3.1.1 + '@microsoft/fetch-event-source': + specifier: ^2.0.1 + version: 2.0.1 + '@videojs-player/vue': + specifier: ^1.0.0 + version: 1.0.0(@types/video.js@7.3.58)(video.js@7.21.6)(vue@3.5.44(typescript@5.3.3)) + '@vueuse/core': + specifier: ^10.9.0 + version: 10.11.1(vue@3.5.44(typescript@5.3.3)) + '@wangeditor-next/editor': + specifier: ^5.6.46 + version: 5.7.16 + '@wangeditor-next/editor-for-vue': + specifier: ^5.1.14 + version: 5.1.14(@wangeditor-next/editor@5.7.16)(vue@3.5.44(typescript@5.3.3)) + '@wangeditor-next/plugin-mention': + specifier: ^1.0.16 + version: 1.0.26(@wangeditor-next/editor@5.7.16)(snabbdom@3.6.4) + '@zxcvbn-ts/core': + specifier: ^3.0.4 + version: 3.0.4 + acorn: + specifier: 8.19.0 + version: 8.19.0 + animate.css: + specifier: ^4.1.1 + version: 4.1.1 + axios: + specifier: 1.20.0 + version: 1.20.0(debug@4.3.7(supports-color@7.2.0))(supports-color@7.2.0) + benz-amr-recorder: + specifier: ^1.1.5 + version: 1.1.5 + bpmn-js-token-simulation: + specifier: ^0.36.0 + version: 0.36.2 + camunda-bpmn-moddle: + specifier: ^7.0.1 + version: 7.0.2 + cropperjs: + specifier: ^1.6.1 + version: 1.7.0 + crypto-js: + specifier: 4.2.0 + version: 4.2.0 + dayjs: + specifier: ^1.11.10 + version: 1.11.23 + diagram-js: + specifier: ^12.8.0 + version: 12.8.1 + driver.js: + specifier: ^1.3.1 + version: 1.10.2 + echarts: + specifier: ^5.5.0 + version: 5.5.1 + echarts-wordcloud: + specifier: ^2.1.0 + version: 2.1.0(echarts@5.5.1) + element-plus: + specifier: 2.14.5 + version: 2.14.5(vue@3.5.44(typescript@5.3.3)) + highlight.js: + specifier: ^11.9.0 + version: 11.12.0 + jsoneditor: + specifier: ^10.1.3 + version: 10.4.3 + lodash-es: + specifier: ^4.18.1 + version: 4.18.1 + markdown-it: + specifier: ^14.3.3 + version: 14.3.3 + markmap-common: + specifier: ^0.16.0 + version: 0.16.0 + markmap-lib: + specifier: ^0.16.1 + version: 0.16.1(markmap-common@0.16.0) + markmap-toolbar: + specifier: ^0.17.0 + version: 0.17.2(markmap-common@0.16.0) + markmap-view: + specifier: ^0.16.0 + version: 0.16.0(markmap-common@0.16.0) + min-dash: + specifier: ^4.1.1 + version: 4.2.2 + mitt: + specifier: ^3.0.1 + version: 3.0.1 + nprogress: + specifier: ^0.2.0 + version: 0.2.0 + pinia: + specifier: ^2.1.7 + version: 2.2.8(typescript@5.3.3)(vue@3.5.44(typescript@5.3.3)) + pinia-plugin-persistedstate: + specifier: ^3.2.1 + version: 3.2.3(pinia@2.2.8(typescript@5.3.3)(vue@3.5.44(typescript@5.3.3))) + qrcode: + specifier: ^1.5.3 + version: 1.5.4 + qs: + specifier: 6.16.1 + version: 6.16.1 + snabbdom: + specifier: ^3.6.2 + version: 3.6.4 + sortablejs: + specifier: ^1.15.3 + version: 1.15.7 + steady-xml: + specifier: ^0.1.0 + version: 0.1.0 + url: + specifier: ^0.11.3 + version: 0.11.4 + video.js: + specifier: ^7.21.5 + version: 7.21.6 + vue: + specifier: 3.5.44 + version: 3.5.44(typescript@5.3.3) + vue-dompurify-html: + specifier: ^4.1.4 + version: 4.1.4(vue@3.5.44(typescript@5.3.3)) + vue-i18n: + specifier: 9.14.5 + version: 9.14.5(vue@3.5.44(typescript@5.3.3)) + vue-router: + specifier: 4.4.5 + version: 4.4.5(vue@3.5.44(typescript@5.3.3)) + vue-types: + specifier: ^5.1.1 + version: 5.1.3(vue@3.5.44(typescript@5.3.3)) + vue3-print-nb: + specifier: ^0.1.4 + version: 0.1.4(typescript@5.3.3) + vue3-signature: + specifier: ^0.2.4 + version: 0.2.4(vue@3.5.44(typescript@5.3.3)) + vuedraggable: + specifier: ^4.1.0 + version: 4.1.0(vue@3.5.44(typescript@5.3.3)) + web-storage-cache: + specifier: ^1.1.1 + version: 1.1.1 + xml-js: + specifier: ^1.6.11 + version: 1.6.11 + devDependencies: + '@commitlint/cli': + specifier: ^19.0.1 + version: 19.6.0(@types/node@20.19.43)(typescript@5.3.3) + '@commitlint/config-conventional': + specifier: ^19.0.0 + version: 19.6.0 + '@iconify/json': + specifier: ^2.2.187 + version: 2.2.548 + '@intlify/unplugin-vue-i18n': + specifier: ^11.2.7 + version: 11.2.7(@vue/compiler-dom@3.5.44)(rollup@4.65.0)(supports-color@7.2.0)(typescript@5.3.3)(vite@7.3.7(@types/node@20.19.43)(jiti@2.7.0)(sass@1.106.1)(terser@5.51.2)(yaml@2.9.1))(vue-i18n@9.14.5(vue@3.5.44(typescript@5.3.3)))(vue@3.5.44(typescript@5.3.3)) + '@purge-icons/generated': + specifier: ^0.9.0 + version: 0.9.0 + '@types/jsoneditor': + specifier: ^9.9.5 + version: 9.9.6 + '@types/lodash-es': + specifier: ^4.17.12 + version: 4.17.12 + '@types/node': + specifier: ^20.19.43 + version: 20.19.43 + '@types/nprogress': + specifier: ^0.2.3 + version: 0.2.3 + '@types/qrcode': + specifier: ^1.5.5 + version: 1.5.5 + '@types/qs': + specifier: ^6.9.12 + version: 6.15.1 + '@typescript-eslint/eslint-plugin': + specifier: ^7.1.0 + version: 7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@5.3.3))(eslint@8.57.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@5.3.3) + '@typescript-eslint/parser': + specifier: ^7.1.0 + version: 7.18.0(eslint@8.57.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@5.3.3) + '@unocss/eslint-config': + specifier: ^0.57.4 + version: 0.57.7(eslint@8.57.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@5.3.3) + '@unocss/eslint-plugin': + specifier: 66.1.0-beta.5 + version: 66.1.0-beta.5(eslint@8.57.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@5.3.3) + '@vitejs/plugin-vue': + specifier: ^6.0.10 + version: 6.0.10(vite@7.3.7(@types/node@20.19.43)(jiti@2.7.0)(sass@1.106.1)(terser@5.51.2)(yaml@2.9.1))(vue@3.5.44(typescript@5.3.3)) + '@vitejs/plugin-vue-jsx': + specifier: ^5.1.6 + version: 5.1.6(supports-color@7.2.0)(vite@7.3.7(@types/node@20.19.43)(jiti@2.7.0)(sass@1.106.1)(terser@5.51.2)(yaml@2.9.1))(vue@3.5.44(typescript@5.3.3)) + '@vitest/coverage-v8': + specifier: ^4.1.12 + version: 4.1.12(vitest@4.1.12) + '@vue/test-utils': + specifier: ^2.5.1 + version: 2.5.1(@vue/compiler-dom@3.5.44)(@vue/server-renderer@3.5.44)(vue@3.5.44(typescript@5.3.3)) + autoprefixer: + specifier: ^10.4.17 + version: 10.6.1(postcss@8.5.31) + bpmn-js: + specifier: ^17.9.2 + version: 17.11.1 + bpmn-js-properties-panel: + specifier: 5.23.0 + version: 5.23.0(@bpmn-io/properties-panel@3.25.0)(bpmn-js@17.11.1)(camunda-bpmn-js-behaviors@1.7.2(bpmn-js@17.11.1)(camunda-bpmn-moddle@7.0.2)(zeebe-bpmn-moddle@1.7.0))(diagram-js@12.8.1) + consola: + specifier: ^3.2.3 + version: 3.2.3 + eslint: + specifier: ^8.57.0 + version: 8.57.1(supports-color@7.2.0) + eslint-config-prettier: + specifier: ^9.1.0 + version: 9.1.0(eslint@8.57.1(supports-color@7.2.0)) + eslint-define-config: + specifier: ^2.1.0 + version: 2.1.0 + eslint-plugin-prettier: + specifier: ^5.1.3 + version: 5.5.7(@types/eslint@8.56.12)(eslint-config-prettier@9.1.0(eslint@8.57.1(supports-color@7.2.0)))(eslint@8.57.1(supports-color@7.2.0))(prettier@3.9.10) + eslint-plugin-vue: + specifier: ^9.22.0 + version: 9.31.0(eslint@8.57.1(supports-color@7.2.0))(supports-color@7.2.0) + jsdom: + specifier: ^26.1.0 + version: 26.1.0(supports-color@7.2.0) + lint-staged: + specifier: ^15.2.10 + version: 15.2.10(supports-color@7.2.0) + postcss: + specifier: 8.5.31 + version: 8.5.31 + postcss-html: + specifier: ^1.6.0 + version: 1.8.1 + postcss-scss: + specifier: ^4.0.9 + version: 4.0.9(postcss@8.5.31) + prettier: + specifier: ^3.2.5 + version: 3.9.10 + prettier-eslint: + specifier: ^16.3.0 + version: 16.3.0(supports-color@7.2.0) + rimraf: + specifier: ^5.0.5 + version: 5.0.10 + rollup: + specifier: 4.65.0 + version: 4.65.0 + sass: + specifier: ^1.69.5 + version: 1.106.1 + stylelint: + specifier: ^16.2.1 + version: 16.26.1(supports-color@7.2.0)(typescript@5.3.3) + stylelint-config-html: + specifier: ^1.1.0 + version: 1.1.0(postcss-html@1.8.1)(stylelint@16.26.1(supports-color@7.2.0)(typescript@5.3.3)) + stylelint-config-recommended: + specifier: ^14.0.0 + version: 14.0.1(stylelint@16.26.1(supports-color@7.2.0)(typescript@5.3.3)) + stylelint-config-standard: + specifier: ^36.0.0 + version: 36.0.1(stylelint@16.26.1(supports-color@7.2.0)(typescript@5.3.3)) + stylelint-order: + specifier: ^6.0.4 + version: 6.0.4(stylelint@16.26.1(supports-color@7.2.0)(typescript@5.3.3)) + terser: + specifier: ^5.28.1 + version: 5.51.2 + typescript: + specifier: 5.3.3 + version: 5.3.3 + unocss: + specifier: ~66.11.0 + version: 66.11.0(@oxc-project/types@0.153.0)(cac@7.1.0)(rollup@4.65.0)(srvx@1.0.7)(vite@7.3.7(@types/node@20.19.43)(jiti@2.7.0)(sass@1.106.1)(terser@5.51.2)(yaml@2.9.1)) + unplugin-auto-import: + specifier: ^0.16.7 + version: 0.16.7(@vueuse/core@10.11.1(vue@3.5.44(typescript@5.3.3)))(rollup@4.65.0) + unplugin-element-plus: + specifier: ^0.8.0 + version: 0.8.0(rollup@4.65.0) + unplugin-vue-components: + specifier: ^0.25.2 + version: 0.25.2(@babel/parser@7.29.11)(rollup@4.65.0)(supports-color@7.2.0)(vue@3.5.44(typescript@5.3.3)) + vite: + specifier: ^7.3.7 + version: 7.3.7(@types/node@20.19.43)(jiti@2.7.0)(sass@1.106.1)(terser@5.51.2)(yaml@2.9.1) + vite-plugin-compression: + specifier: ^0.5.1 + version: 0.5.1(supports-color@7.2.0)(vite@7.3.7(@types/node@20.19.43)(jiti@2.7.0)(sass@1.106.1)(terser@5.51.2)(yaml@2.9.1)) + vite-plugin-ejs: + specifier: ^1.7.0 + version: 1.8.0(vite@7.3.7(@types/node@20.19.43)(jiti@2.7.0)(sass@1.106.1)(terser@5.51.2)(yaml@2.9.1)) + vite-plugin-eslint: + specifier: ^1.8.1 + version: 1.8.1(eslint@8.57.1(supports-color@7.2.0))(vite@7.3.7(@types/node@20.19.43)(jiti@2.7.0)(sass@1.106.1)(terser@5.51.2)(yaml@2.9.1)) + vite-plugin-progress: + specifier: ^0.0.7 + version: 0.0.7(vite@7.3.7(@types/node@20.19.43)(jiti@2.7.0)(sass@1.106.1)(terser@5.51.2)(yaml@2.9.1)) + vite-plugin-purge-icons: + specifier: ^0.10.0 + version: 0.10.0(supports-color@7.2.0)(vite@7.3.7(@types/node@20.19.43)(jiti@2.7.0)(sass@1.106.1)(terser@5.51.2)(yaml@2.9.1)) + vite-plugin-svg-icons-ng: + specifier: ^1.3.1 + version: 1.10.0(vite@7.3.7(@types/node@20.19.43)(jiti@2.7.0)(sass@1.106.1)(terser@5.51.2)(yaml@2.9.1)) + vite-plugin-top-level-await: + specifier: ^1.4.4 + version: 1.4.4(rollup@4.65.0)(vite@7.3.7(@types/node@20.19.43)(jiti@2.7.0)(sass@1.106.1)(terser@5.51.2)(yaml@2.9.1)) + vitest: + specifier: ^4.1.12 + version: 4.1.12(@types/node@20.19.43)(@vitest/coverage-v8@4.1.12)(jsdom@26.1.0(supports-color@7.2.0))(vite@7.3.7(@types/node@20.19.43)(jiti@2.7.0)(sass@1.106.1)(terser@5.51.2)(yaml@2.9.1)) + vue-eslint-parser: + specifier: ^9.3.2 + version: 9.4.3(eslint@8.57.1(supports-color@7.2.0))(supports-color@7.2.0) + vue-tsc: + specifier: ^1.8.27 + version: 1.8.27(typescript@5.3.3) + vue-tsc-files: + specifier: ^0.0.6 + version: 0.0.6(typescript@5.3.3) + +packages: + + '@antfu/install-pkg@2.1.0': + resolution: {integrity: sha512-sdg9NxU3zR4Mnawfbc/x6GB5Wf17WYud5qOuEuxXjaKpYpMkISSJEjItGebXJ2bQ4DIcly4NYH23mtkGJjvKUw==} + + '@antfu/utils@0.7.10': + resolution: {integrity: sha512-+562v9k4aI80m1+VuMHehNJWLOFjBnXn3tdOitzD0il5b7smkSBal4+a3oKiQTbrwMmN/TBUMDvbdoWDehgOww==} + + '@asamuzakjp/css-color@2.8.3': + resolution: {integrity: sha512-GIc76d9UI1hCvOATjZPyHFmE5qhRccp3/zGfMPapK3jBi+yocEzp6BBB0UnfRYP9NP4FANqUZYb0hnfs3TM3hw==} + + '@babel/code-frame@7.29.7': + resolution: {integrity: sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw==} + engines: {node: '>=6.9.0'} + + '@babel/compat-data@7.29.7': + resolution: {integrity: sha512-locTkQyKvwIEgBzVrn8693ebc97F2U8ZHjbXwDXJ5Fn2TCpNwTlKcaKLkdHop5c/icOFE7qt7Q9JC5hnKNa6Gg==} + engines: {node: '>=6.9.0'} + + '@babel/core@7.29.7': + resolution: {integrity: sha512-RgHBCvtjbOK2gXSNBNIkNoEc9qoVEtau3hj8gEqKQuL3HZAibKarWFEI3Lfm6EYKkLalOh8eSrj9b+ch9H/VBA==} + engines: {node: '>=6.9.0'} + + '@babel/generator@7.29.8': + resolution: {integrity: sha512-gZbepsdh3WDtgZKWL+vTPh71LSBrm/Y4/QDZBVCcYfmeTEEuoOYwlSy+G1StfJg+/Zy550u/3TATbm7qDbbMtg==} + engines: {node: '>=6.9.0'} + + '@babel/helper-annotate-as-pure@7.29.7': + resolution: {integrity: sha512-OoK6239jHPuSQOoS0kfTVKn0b/rVTk0seKq4Gd2UMLtmOVLjDC0ki3e+c90Trqv2gMfvJFqkiljrr568+qddiw==} + engines: {node: '>=6.9.0'} + + '@babel/helper-compilation-targets@7.29.7': + resolution: {integrity: sha512-wem6WaBj4NaVYVdNhLPPVacES6ZJ+KBBfSkTMD3YZxbP3rm3Di85tJU5ljaUNhaOynt+Aj0xruhYuzQBt8n71g==} + engines: {node: '>=6.9.0'} + + '@babel/helper-create-class-features-plugin@7.29.7': + resolution: {integrity: sha512-IY3ZD9Tmooqr3TUhc3DUWxiuo8xx1DWLhd5M7hQ+ZWJamqM2BbalrBJb2MisSLoYorOj75U03qULCxQTY9r3hg==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.29.1 + + '@babel/helper-globals@7.29.7': + resolution: {integrity: sha512-3nQVUAtvkKH9zahfWgw96Jc/uFOmjACE1kQz82E2lqWmHBgjzbNlsC22nuQTfahmWeQtTq5nQ/4Nnd2A1wj4zA==} + engines: {node: '>=6.9.0'} + + '@babel/helper-member-expression-to-functions@7.29.7': + resolution: {integrity: sha512-j+7JYmk1JYDtACIGj0QJqqWZjoUpMoEikQGADMaHgCMCSDqd2+P32rfcibUNrGOMWrlzK1WJBdxrB3JJQZwWtg==} + engines: {node: '>=6.9.0'} + + '@babel/helper-module-imports@7.29.7': + resolution: {integrity: sha512-ejHwrQQYcm9xnTivShn2IDOlIzInN34AXskvq9QicvCtEzq1Vzclu/tKF8Jq1Cg8JG2GL6/EmjgsCT7lXepE3g==} + engines: {node: '>=6.9.0'} + + '@babel/helper-module-transforms@7.29.7': + resolution: {integrity: sha512-UPUVSyXbOh627KiCIGQSgwWzGeBKLkaJ9PJEdrngIwMSzxLR4jS4+f1f1jb7VzBbg8nFLaYotvVPFCTqdrmTAg==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.29.1 + + '@babel/helper-optimise-call-expression@7.29.7': + resolution: {integrity: sha512-+kmGVjcT9RGYzoDwdwEqEvGgKe3BYq+O1iGzjFubaNgZHwYHP6lsF2Yghf4kEuv9BV7tYDZ913aBW9am6YKong==} + engines: {node: '>=6.9.0'} + + '@babel/helper-plugin-utils@7.29.7': + resolution: {integrity: sha512-G7sHYigPY17oO5SYWnfD/0MTBwVR781S/JI643e/JhUYgVgWE/61SoW3NH9KWUKyKq5LVh3npif99Wkt6j86Jw==} + engines: {node: '>=6.9.0'} + + '@babel/helper-replace-supers@7.29.7': + resolution: {integrity: sha512-atfGXWSeCiF4DnKZIfmJfQRkSw9b9gNNXR1kqKjbhG4pGYCOnkp8OcTB8E3NXjBu8NpheSnOeNKz8KT7UNFTmQ==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.29.1 + + '@babel/helper-skip-transparent-expression-wrappers@7.29.7': + resolution: {integrity: sha512-brcMGQaVzIeUb+6/bs1Av0f8YuNNjKY2JyvfRCsFuFsdKccEQ5Ges2y74D74NZ1Rz8lKJ9ksJkfqwQFJ/iNEyQ==} + engines: {node: '>=6.9.0'} + + '@babel/helper-string-parser@7.29.11': + resolution: {integrity: sha512-snZbO7MEDOof+hvNa97EjEY7qD7h2kwvQr5AJC3ZhQudKW5dnej6k3kP9NQV88hJwaS8vDqRLFo9rivLEhle2g==} + engines: {node: '>=6.9.0'} + + '@babel/helper-validator-identifier@7.29.7': + resolution: {integrity: sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==} + engines: {node: '>=6.9.0'} + + '@babel/helper-validator-option@7.29.7': + resolution: {integrity: sha512-N9ZErrD+yW5geCDtBqnOoxmR8+tNKiGuxKlDpuJxfsqpa2dFcexaziGAE/qoHLiDDreVNMupxGmSoNlyvsA3gw==} + engines: {node: '>=6.9.0'} + + '@babel/helpers@7.29.10': + resolution: {integrity: sha512-EMCx3AGZ3WfAl6ht7AyQoPm2Lh+BGYEMdc4Q6Hf7uSCDOZFuLq44qNwL+iaim8VlyYhRAo4X43+weadK8ZB4Yg==} + engines: {node: '>=6.9.0'} + + '@babel/parser@7.29.11': + resolution: {integrity: sha512-OZ6+oaK7GMyg3IfCpj8JOmn8n+w2rJbDT0LLfVDTLb1ZFeKDh3AiNELgCMUw175IJHSkLl74hG0M0VLsvx+gag==} + engines: {node: '>=6.0.0'} + hasBin: true + + '@babel/plugin-syntax-jsx@7.29.7': + resolution: {integrity: sha512-TSu8+mHCoEaaCDEZ0I3+6mvTBYR4PCxQwf2z9/r5Tbztv6NaLR3B9thGTTxX2WGuGHJqRiAbKPeGTJ5XWXVg6A==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.29.1 + + '@babel/plugin-syntax-typescript@7.29.7': + resolution: {integrity: sha512-ngr+82Sh0xMz25TPCZi+nC2iTzjfCdWS2ONXTp/PtSCHCgaCNBpdMqgvJ2ccdLlClVZ7sisIgB914j/JFe+RZA==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.29.1 + + '@babel/plugin-transform-typescript@7.29.9': + resolution: {integrity: sha512-FFwIwzU+7SCOuxxV4YtJql6T9981ZVTm+FHO5GhVsRqCTdy0WwrEZh3l42ARpXruJUDGOptdduHW6Zr7pNPLNg==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.29.1 + + '@babel/runtime-corejs3@7.29.10': + resolution: {integrity: sha512-R4FKrg4Vy0hB7PfAxf9LOorEPd5/36SCIXPXAvjlQaQmPvtrjwoDXV15jsSm2ecsqBW1Iewwb7mEnG83xIEApg==} + engines: {node: '>=6.9.0'} + + '@babel/runtime@7.29.10': + resolution: {integrity: sha512-NpugTzbKgGrNe45Ui32cN8vCFFMxVtP/9rtfwv0nP5FRDAjvYBxJcLVpYA9mr1jxP6cnIT7x9LUzuDTbWYYNRA==} + engines: {node: '>=6.9.0'} + + '@babel/template@7.29.7': + resolution: {integrity: sha512-puq+Gf35oI24FeN11LkoUQFqv9uwNeWpxXZi/Ji3rRIoKAzKnxRaZ+Gkj0vKS9ZCiTESfng1N9LyOyXvo+m+Gg==} + engines: {node: '>=6.9.0'} + + '@babel/traverse@7.29.10': + resolution: {integrity: sha512-B3lYAs2nkKskbgQ1nfy8Ma9ao9Q1rntTAQHrzzyDuj+TSO+X3le6PfWwqDvodsb+OumE10eMFfuMCTQSQ5iuIQ==} + engines: {node: '>=6.9.0'} + + '@babel/types@7.29.11': + resolution: {integrity: sha512-WCsemW40Cpc6gouC1SrY6PBaZ+oLRlEVY9XBvZBI7il/HyUrb2nJ505wE1MHEFyDZNnrWDEuy4jL50WVHfTTSQ==} + engines: {node: '>=6.9.0'} + + '@bcoe/v8-coverage@1.0.2': + resolution: {integrity: sha512-6zABk/ECA/QYSCQ1NGiVwwbQerUCZ+TQbp64Q3AgmfNvurHH0j8TtXa1qbShXA6qqkpAj4V5W8pP6mLe1mcMqA==} + engines: {node: '>=18'} + + '@bpmn-io/cm-theme@0.1.0-alpha.2': + resolution: {integrity: sha512-ZILgiYzxk3KMvxplUXmdRFQo45/JehDPg5k9tWfehmzUOSE13ssyLPil8uCloMQnb3yyzyOWTjb/wzKXTHlFQw==} + + '@bpmn-io/diagram-js-ui@0.2.3': + resolution: {integrity: sha512-OGyjZKvGK8tHSZ0l7RfeKhilGoOGtFDcoqSGYkX0uhFlo99OVZ9Jn1K7TJGzcE9BdKwvA5Y5kGqHEhdTxHvFfw==} + + '@bpmn-io/extract-process-variables@0.8.0': + resolution: {integrity: sha512-yAS7ZYX+D56K+luC36u96eRMLb4VHcPUwTUqMZ/Z/Je2gou2DJLRbuBTHAB4jjKt4wFCHSG4B8Y+TrBciEYf4w==} + + '@bpmn-io/feel-analyzer@0.5.1': + resolution: {integrity: sha512-On6hWdV9gwrXK/+VDqqllgbJtwSI4v98pA+3LhvcSKMMEy9IdlvcB8GntsPLg4ROLh4vrsu/o9opp/vIpdBSLA==} + engines: {node: '>= 20'} + + '@bpmn-io/feel-editor@1.9.1': + resolution: {integrity: sha512-UxSORdh5cwKM4fib4f9ov6J1/BHGpQVNtA+wPyEdKQyCyz3wqwE2/xe5wneVR1j5QFC5m2Na8nTy4a1TDFvZTw==} + engines: {node: '>= 16'} + + '@bpmn-io/feel-lint@1.3.1': + resolution: {integrity: sha512-wcFkJKhOm/iqCt5bzkKvxL5Dr9wKwUD+t164bQYbJsTYouAqmkkxiGsoqck42hXwdIhMSguZ+vqQ3hj5QdiYCA==} + + '@bpmn-io/feel-lint@3.2.0': + resolution: {integrity: sha512-f9xe7VNjdZ0kDzWeALmDEWXm7KtAzVSeLVESAhBZGxTbyGzbTGubRfl2cXMN+E/U0oFEcQDuxF0A1tD02DXiLw==} + + '@bpmn-io/feelin@6.1.1': + resolution: {integrity: sha512-wqNYDjPvSIS6nnTuNzmUYY/oT2+hjMz60aBRgGKgXEfnrs3OxQntCgRnvHRzg3SMhFNSMUQ+qfQfLckchmSXtQ==} + engines: {node: '>= 20.12.0'} + + '@bpmn-io/lezer-feel@2.5.0': + resolution: {integrity: sha512-09JlwNYeD5YYeFrl0dIFfgQKEL+NNiTyUwEtdcPhfftz1mYa7z+ylOPCv/8Z0GqG7X81uyMFvRZDFCRBFTiUPg==} + engines: {node: '>= 20.12.0'} + + '@bpmn-io/lezer-feel@3.0.1': + resolution: {integrity: sha512-+wWg4DP2h8WOEQx2Bz51blsw9dCqKj3kIDKYccABuoAEhzZeDhmm0A2k4ANmm9lf0w5pJmVSYz2djtrbzOvzzA==} + engines: {node: '>= 20.12.0'} + + '@bpmn-io/properties-panel@3.25.0': + resolution: {integrity: sha512-SRGgj8uJc1Yyjcht2g36Q+xKR7sTx5VZXvcwDrdmQKlx5Y3nRmvmMjDGzeGDJDb7pNU1DSlaBJic84uISDBMWg==} + + '@bpmn-io/semver-compat@0.1.0': + resolution: {integrity: sha512-hIcW42Ku92MUioL6aknDbRoW1jK8ZEqIe8qZZ+d3cjitDO+PMEFFXj/sezJYIHMe8elu4CBz9qpjkV8WIVG9qw==} + + '@cacheable/memory@2.2.0': + resolution: {integrity: sha512-CTLKqLItRCEixEAewD3/j9DB3/o96gpTPD4eJ1v+DGOlxZRZncRQkGYqqnAGCscYd6RNeXfGeiuCphsPtqyIfQ==} + + '@cacheable/utils@2.5.0': + resolution: {integrity: sha512-buipgOVDkkPXNR5+xBpDw7Zk2n1EvU7qBJCNUcL7rhQ//kfpOXPAvQ511Os0vpLYJ1pZnvudNytkQt2hst3wqA==} + + '@codemirror/autocomplete@6.20.4': + resolution: {integrity: sha512-yF8RhOf2SXlg00+qtupzLhrglcas61boqaONiNcbPIebHCpJocpqTBA6dyrtUrQO47hqyTdeob/3XnYilT7TaQ==} + + '@codemirror/commands@6.11.1': + resolution: {integrity: sha512-O/4hG3SC1YwcmQ0d2UVNDs+AsaNWd1iHVxbTeEBuqH+6bExAiPK3iS/BvpY6rZGURALv4ZD3sIgcCmRvw3ehBg==} + + '@codemirror/language@6.13.1': + resolution: {integrity: sha512-zfvU2r3TyylQLMj/te+5CnQ0rSqZi8B1oTCBbQkagcLW4Xc6imab6qN+pEJhsuNOLaJqiRyBXp9UhWA1DhVvDw==} + + '@codemirror/lint@6.9.7': + resolution: {integrity: sha512-28/+iWLYxKxsvGYhSYL7zaCZqLz5+FFFDq9tVsvGv9kv8RY4fFAchJ5WX9M3YrrRlTIsECjsXPqeNgnSmNP2dg==} + + '@codemirror/state@6.7.6': + resolution: {integrity: sha512-kAz+AncRtKuIknedxT1bq4XwXv4UowhbkHU1myPrtVb/jZtImWuV5BXzv5vK6i3kYACsdiZiQKFQQ5Mq7elW8w==} + + '@codemirror/streamparser@6.0.0': + resolution: {integrity: sha512-JTFPF6xrfjt0mnfGPgzcLiMwYmvIyNaoizp8BYzv8FE8KrT6GBGDZ190rtt+O7Wke3gG/MFHyiY9YGNeimof4w==} + + '@codemirror/view@6.43.15': + resolution: {integrity: sha512-HHsfpqFeHyXLs983pSRe38Xajs0vFWZQ2BuX0m7Ki8w3jZ5iD8cuR3lBz2/5/X53Dhf32SBHKh6rtSTB6tKeGw==} + + '@colordx/core@7.3.0': + resolution: {integrity: sha512-LVzTTPhX7wpy7TkGjouA9zbbCBIw92RGm7ZQqSKFE0oYE3sMx2FGXz90eVpgw7k/+wrrY+qJ86nHXifZWMS5jA==} + + '@commitlint/cli@19.6.0': + resolution: {integrity: sha512-v17BgGD9w5KnthaKxXnEg6KLq6DYiAxyiN44TpiRtqyW8NSq+Kx99mkEG8Qo6uu6cI5eMzMojW2muJxjmPnF8w==} + engines: {node: '>=v18'} + hasBin: true + + '@commitlint/config-conventional@19.6.0': + resolution: {integrity: sha512-DJT40iMnTYtBtUfw9ApbsLZFke1zKh6llITVJ+x9mtpHD08gsNXaIRqHTmwTZL3dNX5+WoyK7pCN/5zswvkBCQ==} + engines: {node: '>=v18'} + + '@commitlint/config-validator@19.5.0': + resolution: {integrity: sha512-CHtj92H5rdhKt17RmgALhfQt95VayrUo2tSqY9g2w+laAXyk7K/Ef6uPm9tn5qSIwSmrLjKaXK9eiNuxmQrDBw==} + engines: {node: '>=v18'} + + '@commitlint/ensure@19.5.0': + resolution: {integrity: sha512-Kv0pYZeMrdg48bHFEU5KKcccRfKmISSm9MvgIgkpI6m+ohFTB55qZlBW6eYqh/XDfRuIO0x4zSmvBjmOwWTwkg==} + engines: {node: '>=v18'} + + '@commitlint/execute-rule@19.5.0': + resolution: {integrity: sha512-aqyGgytXhl2ejlk+/rfgtwpPexYyri4t8/n4ku6rRJoRhGZpLFMqrZ+YaubeGysCP6oz4mMA34YSTaSOKEeNrg==} + engines: {node: '>=v18'} + + '@commitlint/format@19.5.0': + resolution: {integrity: sha512-yNy088miE52stCI3dhG/vvxFo9e4jFkU1Mj3xECfzp/bIS/JUay4491huAlVcffOoMK1cd296q0W92NlER6r3A==} + engines: {node: '>=v18'} + + '@commitlint/is-ignored@19.6.0': + resolution: {integrity: sha512-Ov6iBgxJQFR9koOupDPHvcHU9keFupDgtB3lObdEZDroiG4jj1rzky60fbQozFKVYRTUdrBGICHG0YVmRuAJmw==} + engines: {node: '>=v18'} + + '@commitlint/lint@19.6.0': + resolution: {integrity: sha512-LRo7zDkXtcIrpco9RnfhOKeg8PAnE3oDDoalnrVU/EVaKHYBWYL1DlRR7+3AWn0JiBqD8yKOfetVxJGdEtZ0tg==} + engines: {node: '>=v18'} + + '@commitlint/load@19.5.0': + resolution: {integrity: sha512-INOUhkL/qaKqwcTUvCE8iIUf5XHsEPCLY9looJ/ipzi7jtGhgmtH7OOFiNvwYgH7mA8osUWOUDV8t4E2HAi4xA==} + engines: {node: '>=v18'} + + '@commitlint/message@19.5.0': + resolution: {integrity: sha512-R7AM4YnbxN1Joj1tMfCyBryOC5aNJBdxadTZkuqtWi3Xj0kMdutq16XQwuoGbIzL2Pk62TALV1fZDCv36+JhTQ==} + engines: {node: '>=v18'} + + '@commitlint/parse@19.5.0': + resolution: {integrity: sha512-cZ/IxfAlfWYhAQV0TwcbdR1Oc0/r0Ik1GEessDJ3Lbuma/MRO8FRQX76eurcXtmhJC//rj52ZSZuXUg0oIX0Fw==} + engines: {node: '>=v18'} + + '@commitlint/read@19.5.0': + resolution: {integrity: sha512-TjS3HLPsLsxFPQj6jou8/CZFAmOP2y+6V4PGYt3ihbQKTY1Jnv0QG28WRKl/d1ha6zLODPZqsxLEov52dhR9BQ==} + engines: {node: '>=v18'} + + '@commitlint/resolve-extends@19.5.0': + resolution: {integrity: sha512-CU/GscZhCUsJwcKTJS9Ndh3AKGZTNFIOoQB2n8CmFnizE0VnEuJoum+COW+C1lNABEeqk6ssfc1Kkalm4bDklA==} + engines: {node: '>=v18'} + + '@commitlint/rules@19.6.0': + resolution: {integrity: sha512-1f2reW7lbrI0X0ozZMesS/WZxgPa4/wi56vFuJENBmed6mWq5KsheN/nxqnl/C23ioxpPO/PL6tXpiiFy5Bhjw==} + engines: {node: '>=v18'} + + '@commitlint/to-lines@19.5.0': + resolution: {integrity: sha512-R772oj3NHPkodOSRZ9bBVNq224DOxQtNef5Pl8l2M8ZnkkzQfeSTr4uxawV2Sd3ui05dUVzvLNnzenDBO1KBeQ==} + engines: {node: '>=v18'} + + '@commitlint/top-level@19.5.0': + resolution: {integrity: sha512-IP1YLmGAk0yWrImPRRc578I3dDUI5A2UBJx9FbSOjxe9sTlzFiwVJ+zeMLgAtHMtGZsC8LUnzmW1qRemkFU4ng==} + engines: {node: '>=v18'} + + '@commitlint/types@19.5.0': + resolution: {integrity: sha512-DSHae2obMSMkAtTBSOulg5X7/z+rGLxcXQIkg3OmWvY6wifojge5uVMydfhUvs7yQj+V7jNmRZ2Xzl8GJyqRgg==} + engines: {node: '>=v18'} + + '@csstools/color-helpers@5.1.0': + resolution: {integrity: sha512-S11EXWJyy0Mz5SYvRmY8nJYTFFd1LCNV+7cXyAgQtOOuzb4EsgfqDufL+9esx72/eLhsRdGZwaldu/h+E4t4BA==} + engines: {node: '>=18'} + + '@csstools/css-calc@2.1.1': + resolution: {integrity: sha512-rL7kaUnTkL9K+Cvo2pnCieqNpTKgQzy5f+N+5Iuko9HAoasP+xgprVh7KN/MaJVvVL1l0EzQq2MoqBHKSrDrag==} + engines: {node: '>=18'} + peerDependencies: + '@csstools/css-parser-algorithms': ^3.0.4 + '@csstools/css-tokenizer': ^3.0.3 + + '@csstools/css-calc@2.1.4': + resolution: {integrity: sha512-3N8oaj+0juUw/1H3YwmDDJXCgTB1gKU6Hc/bB502u9zR0q2vd786XJH9QfrKIEgFlZmhZiq6epXl4rHqhzsIgQ==} + engines: {node: '>=18'} + peerDependencies: + '@csstools/css-parser-algorithms': ^3.0.5 + '@csstools/css-tokenizer': ^3.0.4 + + '@csstools/css-color-parser@3.1.0': + resolution: {integrity: sha512-nbtKwh3a6xNVIp/VRuXV64yTKnb1IjTAEEh3irzS+HkKjAOYLTGNb9pmVNntZ8iVBHcWDA2Dof0QtPgFI1BaTA==} + engines: {node: '>=18'} + peerDependencies: + '@csstools/css-parser-algorithms': ^3.0.5 + '@csstools/css-tokenizer': ^3.0.4 + + '@csstools/css-parser-algorithms@3.0.4': + resolution: {integrity: sha512-Up7rBoV77rv29d3uKHUIVubz1BTcgyUK72IvCQAbfbMv584xHcGKCKbWh7i8hPrRJ7qU4Y8IO3IY9m+iTB7P3A==} + engines: {node: '>=18'} + peerDependencies: + '@csstools/css-tokenizer': ^3.0.3 + + '@csstools/css-parser-algorithms@3.0.5': + resolution: {integrity: sha512-DaDeUkXZKjdGhgYaHNJTV9pV7Y9B3b644jCLs9Upc3VeNGg6LWARAT6O+Q+/COo+2gg/bM5rhpMAtf70WqfBdQ==} + engines: {node: '>=18'} + peerDependencies: + '@csstools/css-tokenizer': ^3.0.4 + + '@csstools/css-syntax-patches-for-csstree@1.1.15': + resolution: {integrity: sha512-J0u7HkVl2nzSlhsiTOp4AmwcUQ3D+mGEEKfBy/7To5/y7F2OHwyLrXfrhR0SMgr4p5Lo+eaMVSeai24zUcBIxA==} + peerDependencies: + css-tree: ^3.2.1 + peerDependenciesMeta: + css-tree: + optional: true + + '@csstools/css-tokenizer@3.0.3': + resolution: {integrity: sha512-UJnjoFsmxfKUdNYdWgOB0mWUypuLvAfQPH1+pyvRJs6euowbFkFC6P13w1l8mJyi3vxYMxc9kld5jZEGRQs6bw==} + engines: {node: '>=18'} + + '@csstools/css-tokenizer@3.0.4': + resolution: {integrity: sha512-Vd/9EVDiu6PPJt9yAh6roZP6El1xHrdvIVGjyBsHR0RYwNHgL7FJPyIIW4fANJNG6FtyZfvlRPpFI4ZM/lubvw==} + engines: {node: '>=18'} + + '@csstools/media-query-list-parser@4.0.3': + resolution: {integrity: sha512-HAYH7d3TLRHDOUQK4mZKf9k9Ph/m8Akstg66ywKR4SFAigjs3yBiUeZtFxywiTm5moZMAp/5W/ZuFnNXXYLuuQ==} + engines: {node: '>=18'} + peerDependencies: + '@csstools/css-parser-algorithms': ^3.0.5 + '@csstools/css-tokenizer': ^3.0.4 + + '@csstools/selector-specificity@5.0.0': + resolution: {integrity: sha512-PCqQV3c4CoVm3kdPhyeZ07VmBRdH2EpMFA/pd9OASpOEC3aXNGoqPDAZ80D0cLpMBxnmk0+yNhGsEx31hq7Gtw==} + engines: {node: '>=18'} + peerDependencies: + postcss-selector-parser: ^7.1.7 + + '@ctrl/tinycolor@4.2.1': + resolution: {integrity: sha512-Vh5uy9Y1JBMId6J1f68TMXnZrTCvNdo9Fu2k0d1YnJngR+sM5kWTKl441c/3TFs+cG0NWOjRWgQ/iaWhbYx+7A==} + engines: {node: '>=14'} + + '@dual-bundle/import-meta-resolve@4.2.1': + resolution: {integrity: sha512-id+7YRUgoUX6CgV0DtuhirQWodeeA7Lf4i2x71JS/vtA5pRb/hIGWlw+G6MeXvsM+MXrz0VAydTGElX1rAfgPg==} + + '@element-plus/icons-vue@2.3.2': + resolution: {integrity: sha512-OzIuTaIfC8QXEPmJvB4Y4kw34rSXdCJzxcD1kFStBvr8bK6X1zQAYDo0CNMjojnfTqRQCJ0I7prlErcoRiET2A==} + peerDependencies: + vue: ^3.2.0 + + '@esbuild/aix-ppc64@0.25.4': + resolution: {integrity: sha512-1VCICWypeQKhVbE9oW/sJaAmjLxhVqacdkvPLEjwlttjfwENRSClS8EjBz0KzRyFSCPDIkuXW34Je/vk7zdB7Q==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [aix] + + '@esbuild/aix-ppc64@0.28.2': + resolution: {integrity: sha512-XExcO+dvLKvVtNTibSTBej1NCAbaGhWn9Ww1ZPx80qsahhPFe/8jgWP0IchNe0F3HwkU7n8ejhH8bjonqht8mQ==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [aix] + + '@esbuild/android-arm64@0.25.4': + resolution: {integrity: sha512-bBy69pgfhMGtCnwpC/x5QhfxAz/cBgQ9enbtwjf6V9lnPI/hMyT9iWpR1arm0l3kttTr4L0KSLpKmLp/ilKS9A==} + engines: {node: '>=18'} + cpu: [arm64] + os: [android] + + '@esbuild/android-arm64@0.28.2': + resolution: {integrity: sha512-5YfKeeI8qWfBZIX+u2xZC3Zlb3Os/gLS2sbEKM+I4ZOcsWmHS2WLysCcQZDAFRslDUU5Oiq44gf6PYN1vGwG5A==} + engines: {node: '>=18'} + cpu: [arm64] + os: [android] + + '@esbuild/android-arm@0.25.4': + resolution: {integrity: sha512-QNdQEps7DfFwE3hXiU4BZeOV68HHzYwGd0Nthhd3uCkkEKK7/R6MTgM0P7H7FAs5pU/DIWsviMmEGxEoxIZ+ZQ==} + engines: {node: '>=18'} + cpu: [arm] + os: [android] + + '@esbuild/android-arm@0.28.2': + resolution: {integrity: sha512-kXXoiPVVGQcnIYGOeaovwOURpniDBpSq4A03qkQ+BMQqtGG6HYap3xne9C1O1yo4TR3qxlCX5IqqmX6fFo2Lqg==} + engines: {node: '>=18'} + cpu: [arm] + os: [android] + + '@esbuild/android-x64@0.25.4': + resolution: {integrity: sha512-TVhdVtQIFuVpIIR282btcGC2oGQoSfZfmBdTip2anCaVYcqWlZXGcdcKIUklfX2wj0JklNYgz39OBqh2cqXvcQ==} + engines: {node: '>=18'} + cpu: [x64] + os: [android] + + '@esbuild/android-x64@0.28.2': + resolution: {integrity: sha512-O387ite7SzUyCcy3JQX4P4bLtEA7bLLkx+esve5JHnyYfNTxcVpXZo9jhdB0lTKN44gztELTdU7nS8Nr16Fs1Q==} + engines: {node: '>=18'} + cpu: [x64] + os: [android] + + '@esbuild/darwin-arm64@0.25.4': + resolution: {integrity: sha512-Y1giCfM4nlHDWEfSckMzeWNdQS31BQGs9/rouw6Ub91tkK79aIMTH3q9xHvzH8d0wDru5Ci0kWB8b3up/nl16g==} + engines: {node: '>=18'} + cpu: [arm64] + os: [darwin] + + '@esbuild/darwin-arm64@0.28.2': + resolution: {integrity: sha512-n4KqkOQrraxHJcgjM1RvwbigfQKIKJVpM7xp+KsxiyUSrRdIXnt73VhrPAx0fV44hgfmIVKjxMN9J1t5jySVkw==} + engines: {node: '>=18'} + cpu: [arm64] + os: [darwin] + + '@esbuild/darwin-x64@0.25.4': + resolution: {integrity: sha512-CJsry8ZGM5VFVeyUYB3cdKpd/H69PYez4eJh1W/t38vzutdjEjtP7hB6eLKBoOdxcAlCtEYHzQ/PJ/oU9I4u0A==} + engines: {node: '>=18'} + cpu: [x64] + os: [darwin] + + '@esbuild/darwin-x64@0.28.2': + resolution: {integrity: sha512-uq6suIWYP37qzGddBKPw5QEQPi6HiLGsO7UmkpfyaYNQ3D+rN6w6WfwH+nuqcGXWvawGwxOEroO4YGnFh95azw==} + engines: {node: '>=18'} + cpu: [x64] + os: [darwin] + + '@esbuild/freebsd-arm64@0.25.4': + resolution: {integrity: sha512-yYq+39NlTRzU2XmoPW4l5Ifpl9fqSk0nAJYM/V/WUGPEFfek1epLHJIkTQM6bBs1swApjO5nWgvr843g6TjxuQ==} + engines: {node: '>=18'} + cpu: [arm64] + os: [freebsd] + + '@esbuild/freebsd-arm64@0.28.2': + resolution: {integrity: sha512-n+I0BTSRIoy+d6RPKnEVwql5UwBJolytvY4mAOIEJorKlqgPII8ix6slVVrfZ5Tnj7glIZvloylbB/EJPMWEXw==} + engines: {node: '>=18'} + cpu: [arm64] + os: [freebsd] + + '@esbuild/freebsd-x64@0.25.4': + resolution: {integrity: sha512-0FgvOJ6UUMflsHSPLzdfDnnBBVoCDtBTVyn/MrWloUNvq/5SFmh13l3dvgRPkDihRxb77Y17MbqbCAa2strMQQ==} + engines: {node: '>=18'} + cpu: [x64] + os: [freebsd] + + '@esbuild/freebsd-x64@0.28.2': + resolution: {integrity: sha512-78XJTJkvPs0kz2w61301PJjXl4g7q3JqiYMZ/M/yVI73EHBrCRTgkhu9oqG7vPqq+a/yadEW8aD+agKlk5xrmg==} + engines: {node: '>=18'} + cpu: [x64] + os: [freebsd] + + '@esbuild/linux-arm64@0.25.4': + resolution: {integrity: sha512-+89UsQTfXdmjIvZS6nUnOOLoXnkUTB9hR5QAeLrQdzOSWZvNSAXAtcRDHWtqAUtAmv7ZM1WPOOeSxDzzzMogiQ==} + engines: {node: '>=18'} + cpu: [arm64] + os: [linux] + + '@esbuild/linux-arm64@0.28.2': + resolution: {integrity: sha512-pW4AC0P3it8c7do9MVM4p51FzHzdM/TZrerurgRcHJ2WTa1VQ1CIq18xncfpBJw4ojkiZZrKW2yIBWBP92j6Ug==} + engines: {node: '>=18'} + cpu: [arm64] + os: [linux] + + '@esbuild/linux-arm@0.25.4': + resolution: {integrity: sha512-kro4c0P85GMfFYqW4TWOpvmF8rFShbWGnrLqlzp4X1TNWjRY3JMYUfDCtOxPKOIY8B0WC8HN51hGP4I4hz4AaQ==} + engines: {node: '>=18'} + cpu: [arm] + os: [linux] + + '@esbuild/linux-arm@0.28.2': + resolution: {integrity: sha512-XlDnu2q5yoqems+xay6wSAcg9DDD7K9RLKZEBOMZm3ckNpJBvOX20tSfby8KfrrhINDyv9V2YVZKY/SpoGJI8w==} + engines: {node: '>=18'} + cpu: [arm] + os: [linux] + + '@esbuild/linux-ia32@0.25.4': + resolution: {integrity: sha512-yTEjoapy8UP3rv8dB0ip3AfMpRbyhSN3+hY8mo/i4QXFeDxmiYbEKp3ZRjBKcOP862Ua4b1PDfwlvbuwY7hIGQ==} + engines: {node: '>=18'} + cpu: [ia32] + os: [linux] + + '@esbuild/linux-ia32@0.28.2': + resolution: {integrity: sha512-CYbnj78HsIeA+DhgUKgFCfvNsTHFhMMrinUrMZpDXJXKN8T3XViTZ/+wtHeVxEWY8ewSzTFN+nRmSwO2tZaLUQ==} + engines: {node: '>=18'} + cpu: [ia32] + os: [linux] + + '@esbuild/linux-loong64@0.25.4': + resolution: {integrity: sha512-NeqqYkrcGzFwi6CGRGNMOjWGGSYOpqwCjS9fvaUlX5s3zwOtn1qwg1s2iE2svBe4Q/YOG1q6875lcAoQK/F4VA==} + engines: {node: '>=18'} + cpu: [loong64] + os: [linux] + + '@esbuild/linux-loong64@0.28.2': + resolution: {integrity: sha512-buwkd8nsph4R+ajRvw0qM5Hja/TXQow3ptzWO2EbG/cqcIkHloRrdlBtQlshyYGTNFvfkfJ5tpPLVkY4DtsPfQ==} + engines: {node: '>=18'} + cpu: [loong64] + os: [linux] + + '@esbuild/linux-mips64el@0.25.4': + resolution: {integrity: sha512-IcvTlF9dtLrfL/M8WgNI/qJYBENP3ekgsHbYUIzEzq5XJzzVEV/fXY9WFPfEEXmu3ck2qJP8LG/p3Q8f7Zc2Xg==} + engines: {node: '>=18'} + cpu: [mips64el] + os: [linux] + + '@esbuild/linux-mips64el@0.28.2': + resolution: {integrity: sha512-ZVykbDyk7519VwiNb9Lcj9m8XM6v5V9uKPvrEMkkEedVewf+0itkhahp4HDpgERXhwLRpWFypsGbG/J8s0QjJA==} + engines: {node: '>=18'} + cpu: [mips64el] + os: [linux] + + '@esbuild/linux-ppc64@0.25.4': + resolution: {integrity: sha512-HOy0aLTJTVtoTeGZh4HSXaO6M95qu4k5lJcH4gxv56iaycfz1S8GO/5Jh6X4Y1YiI0h7cRyLi+HixMR+88swag==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [linux] + + '@esbuild/linux-ppc64@0.28.2': + resolution: {integrity: sha512-CAXl+Dtd9UUuJd8pKKdwh6MLm3MUMiqMPmhZ3tTSXPqfyQ3vDl6R5hZdZ/kYojK4ofXtdfSv1tFq8XzWx3heNQ==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [linux] + + '@esbuild/linux-riscv64@0.25.4': + resolution: {integrity: sha512-i8JUDAufpz9jOzo4yIShCTcXzS07vEgWzyX3NH2G7LEFVgrLEhjwL3ajFE4fZI3I4ZgiM7JH3GQ7ReObROvSUA==} + engines: {node: '>=18'} + cpu: [riscv64] + os: [linux] + + '@esbuild/linux-riscv64@0.28.2': + resolution: {integrity: sha512-GeXCej4IQtU1B+QlDV8W/RRvbzI3O/Stss+/bCXv4lZls5WGRtu2a+3JkA3i4qIUlMXpcHebWpF8AkJhATowuA==} + engines: {node: '>=18'} + cpu: [riscv64] + os: [linux] + + '@esbuild/linux-s390x@0.25.4': + resolution: {integrity: sha512-jFnu+6UbLlzIjPQpWCNh5QtrcNfMLjgIavnwPQAfoGx4q17ocOU9MsQ2QVvFxwQoWpZT8DvTLooTvmOQXkO51g==} + engines: {node: '>=18'} + cpu: [s390x] + os: [linux] + + '@esbuild/linux-s390x@0.28.2': + resolution: {integrity: sha512-3H1weTYZPxt/WOhByszQZybS9w5lKzUn1FDMsgEChbHWQwHYQQRfBxgCcZvPhjHfKyJjIievvMmEUawJrdY9Dg==} + engines: {node: '>=18'} + cpu: [s390x] + os: [linux] + + '@esbuild/linux-x64@0.25.4': + resolution: {integrity: sha512-6e0cvXwzOnVWJHq+mskP8DNSrKBr1bULBvnFLpc1KY+d+irZSgZ02TGse5FsafKS5jg2e4pbvK6TPXaF/A6+CA==} + engines: {node: '>=18'} + cpu: [x64] + os: [linux] + + '@esbuild/linux-x64@0.28.2': + resolution: {integrity: sha512-4xTZr1FUmSoQW4XIWmit3tzQrUTZM+N3P0XV8xROKYF50XfI7xeO90+1bZvNwxIufQ9hDQVRJH5YhgPVF8A/HQ==} + engines: {node: '>=18'} + cpu: [x64] + os: [linux] + + '@esbuild/netbsd-arm64@0.25.4': + resolution: {integrity: sha512-vUnkBYxZW4hL/ie91hSqaSNjulOnYXE1VSLusnvHg2u3jewJBz3YzB9+oCw8DABeVqZGg94t9tyZFoHma8gWZQ==} + engines: {node: '>=18'} + cpu: [arm64] + os: [netbsd] + + '@esbuild/netbsd-arm64@0.28.2': + resolution: {integrity: sha512-sSATRjPeDBg3pdgHoQfoYBob11Kk1FGa9lui5RIHZCoCkJa9QKlvl3/vKz2usCmYYjs7ymJR/2Nnsqe+Hjt5nw==} + engines: {node: '>=18'} + cpu: [arm64] + os: [netbsd] + + '@esbuild/netbsd-x64@0.25.4': + resolution: {integrity: sha512-XAg8pIQn5CzhOB8odIcAm42QsOfa98SBeKUdo4xa8OvX8LbMZqEtgeWE9P/Wxt7MlG2QqvjGths+nq48TrUiKw==} + engines: {node: '>=18'} + cpu: [x64] + os: [netbsd] + + '@esbuild/netbsd-x64@0.28.2': + resolution: {integrity: sha512-lqnzCV+mM0gIADaKihiCg6ifgfU2L3h5E33rNQBN1Y4MaVGnzryzmvvf7UHxprpQdE8hpqLolJ9Rl+SkIRDpyw==} + engines: {node: '>=18'} + cpu: [x64] + os: [netbsd] + + '@esbuild/openbsd-arm64@0.25.4': + resolution: {integrity: sha512-Ct2WcFEANlFDtp1nVAXSNBPDxyU+j7+tId//iHXU2f/lN5AmO4zLyhDcpR5Cz1r08mVxzt3Jpyt4PmXQ1O6+7A==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openbsd] + + '@esbuild/openbsd-arm64@0.28.2': + resolution: {integrity: sha512-AL2qJILH7lNjrDmCQDvdxMfAUIv8KMNZOvrwAQ8i8//ntL9FflhOyMJ8OZSMBb8/AWXe3/5v5S20y3zCoZWKoQ==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openbsd] + + '@esbuild/openbsd-x64@0.25.4': + resolution: {integrity: sha512-xAGGhyOQ9Otm1Xu8NT1ifGLnA6M3sJxZ6ixylb+vIUVzvvd6GOALpwQrYrtlPouMqd/vSbgehz6HaVk4+7Afhw==} + engines: {node: '>=18'} + cpu: [x64] + os: [openbsd] + + '@esbuild/openbsd-x64@0.28.2': + resolution: {integrity: sha512-QtiuPytchRyC4rwUKhexJdQKvDuZ6hWloi3igqPQNUJCS1/v9EiO3UTOXR6A3FoMo4fnAKbWJdqaIwhOzh8qEw==} + engines: {node: '>=18'} + cpu: [x64] + os: [openbsd] + + '@esbuild/openharmony-arm64@0.28.2': + resolution: {integrity: sha512-WkhYDmpTjLvGlScA1rwjRUmhl4k8oXR3cIbtqWmELgU/dFeHHlEllxDvdWcNJV9rbzCexB5vz8gtNewWLgCT7Q==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openharmony] + + '@esbuild/sunos-x64@0.25.4': + resolution: {integrity: sha512-Mw+tzy4pp6wZEK0+Lwr76pWLjrtjmJyUB23tHKqEDP74R3q95luY/bXqXZeYl4NYlvwOqoRKlInQialgCKy67Q==} + engines: {node: '>=18'} + cpu: [x64] + os: [sunos] + + '@esbuild/sunos-x64@0.28.2': + resolution: {integrity: sha512-GPMSkTOtMnv2U2F8gxe4Io6qmVs+YKyp832Etqqxr0hFngmXQ3rzwytelm3GIn7T4VviRUlf3sOgBOiTdvaf7g==} + engines: {node: '>=18'} + cpu: [x64] + os: [sunos] + + '@esbuild/win32-arm64@0.25.4': + resolution: {integrity: sha512-AVUP428VQTSddguz9dO9ngb+E5aScyg7nOeJDrF1HPYu555gmza3bDGMPhmVXL8svDSoqPCsCPjb265yG/kLKQ==} + engines: {node: '>=18'} + cpu: [arm64] + os: [win32] + + '@esbuild/win32-arm64@0.28.2': + resolution: {integrity: sha512-PIhhEkE9uPBleRBrQEJpUn7MBnibZzbGzYWPmY3x+YoVg/95zbjB4CxPPOQ8l5tYYM4mMaCthF8/1DIfBQQyWQ==} + engines: {node: '>=18'} + cpu: [arm64] + os: [win32] + + '@esbuild/win32-ia32@0.25.4': + resolution: {integrity: sha512-i1sW+1i+oWvQzSgfRcxxG2k4I9n3O9NRqy8U+uugaT2Dy7kLO9Y7wI72haOahxceMX8hZAzgGou1FhndRldxRg==} + engines: {node: '>=18'} + cpu: [ia32] + os: [win32] + + '@esbuild/win32-ia32@0.28.2': + resolution: {integrity: sha512-YmJbfTlvU7Sdn9BB+4PRES4oB6pxgS37MAONj+hBr/cpXS1aBPKXxNnDbu+QCWPj0o9dgyxeq79g6c5P8KeuYA==} + engines: {node: '>=18'} + cpu: [ia32] + os: [win32] + + '@esbuild/win32-x64@0.25.4': + resolution: {integrity: sha512-nOT2vZNw6hJ+z43oP1SPea/G/6AbN6X+bGNhNuq8NtRHy4wsMhw765IKLNmnjek7GvjWBYQ8Q5VBoYTFg9y1UQ==} + engines: {node: '>=18'} + cpu: [x64] + os: [win32] + + '@esbuild/win32-x64@0.28.2': + resolution: {integrity: sha512-5ebpxr3nWMzrL/rnUI755Jkuee0bHL/Gq0WTF9lvcpv73wAp5eu8MfBUgWK9bhWvZjj7yX8etf/8tI8Ney695g==} + engines: {node: '>=18'} + cpu: [x64] + os: [win32] + + '@eslint-community/eslint-utils@4.4.1': + resolution: {integrity: sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 + + '@eslint-community/regexpp@4.12.1': + resolution: {integrity: sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==} + engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} + + '@eslint/eslintrc@2.1.4': + resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + + '@eslint/js@8.57.1': + resolution: {integrity: sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + + '@floating-ui/core@1.8.0': + resolution: {integrity: sha512-0CIZ5itps/8x7BG8dEIhs53BvCUH2PCoogtakwRTut+Arm58sJooJ0AuZhLw2HJYIR5cMLNPBSS728sPho2khQ==} + + '@floating-ui/dom@1.8.0': + resolution: {integrity: sha512-yXSrzeHZBTZadLOlfyhCkJHNeLJnHRnRInwdZ40L7ZiaAtrBwoYlsDrX3v5zB1Utk7CLfzcOVnVVWoXEky7Ceg==} + + '@floating-ui/utils@0.2.12': + resolution: {integrity: sha512-HpCo8tmWzLVad5s2d19EhAz5zqrrQ6s69qd6moPMQvkOuSwDT1YgRfWSVuc4ennqrgv3OHppiOGMQ7oC13yIww==} + + '@form-create/component-elm-checkbox@3.3.0': + resolution: {integrity: sha512-BNJcJ8SXtDOJCy8OXLstn6ZIbvEVAObiSJfazIW3AmAVuu958qlw6896dvQqZK0zTBpgOl3hRmMNjoFguglJfg==} + peerDependencies: + vue: ^3.5.12 + + '@form-create/component-elm-frame@3.3.0': + resolution: {integrity: sha512-4iFyg7Jaqv/Q8Lq24XEoQOBClflmMSNxh83KV+cgH3afDIJYHngVSbCqrflaB+lWyMHzIPA3cVrgRbkhkw1eyA==} + peerDependencies: + vue: ^3.5.12 + + '@form-create/component-elm-group@3.3.0': + resolution: {integrity: sha512-9lJKkEH+hCet27WkXEX6vRf1Kc01Sj4lcEksfKHmNJe/aP+Zp6D96kmYt5M6Ew9aKSNNAPdpkkLae9AUCAz4YQ==} + peerDependencies: + vue: ^3.5.12 + + '@form-create/component-elm-radio@3.3.0': + resolution: {integrity: sha512-b3v/3ytifIc4+y3KCkZjo9X//66yY5k8MHysKqtsmRMx73cAgmHzz3wtpR773zr78xrHGnZH1mE7apdecoJoPQ==} + peerDependencies: + vue: ^3.5.12 + + '@form-create/component-elm-select@3.3.0': + resolution: {integrity: sha512-uBE1rwm4/loVOjWn5/tVMaT8/BFLS6U5nieFNO+ChDJ6HwwbAjr/wXXYKPchoLzLAiDV4Tysvydkpz22hYOnjw==} + peerDependencies: + vue: ^3.5.12 + + '@form-create/component-elm-tree@3.3.0': + resolution: {integrity: sha512-C2cAxTL8zHrt2LC1HLyp+kxhXgfGU71pkv2hCM+kleU+eJ6Ly4TQoaACUwf9oCZexxjCe1dA+zq0HZ/osQdYrQ==} + peerDependencies: + vue: ^3.5.12 + + '@form-create/component-elm-upload@3.3.0': + resolution: {integrity: sha512-oIRpa2cEpHyBtsQh00BpCoD8R2tmQmQ+X6p8Oa3wD9OjGOfKJD7cAKp3bV798/uCXu3LzIh6PyQJQ0Iwjvqhtg==} + peerDependencies: + vue: ^3.5.12 + + '@form-create/component-subform@3.3.0': + resolution: {integrity: sha512-y8F6LxvVZIiHa5Jwur6xKGfxuWFuiFzR4vhwPWTXsRbARLqaPV5OVPhB3gQWjbOjoJ2cnercEEhOFvvXf99WWQ==} + peerDependencies: + vue: ^3.5.12 + + '@form-create/component-wangeditor@3.3.0': + resolution: {integrity: sha512-yQaYFVbLNcbsiujsJfeDd5vcvZNhHDUUyezTCf5w5JbhIeFUNXnVLRqUFD2iwyKhTy7RsUUzW2QhEiXxtYqOow==} + peerDependencies: + vue: ^3.5.12 + + '@form-create/core@3.3.4': + resolution: {integrity: sha512-ZZ2L5QcFLMfgF59EWs5UTbA6ixWxiQsyaI0yWPV/JIrmuY2H/aWrqOT2CL6X1E1yzk/5lV7pXMmYJlgAn0Iu2A==} + peerDependencies: + vue: ^3.5.12 + + '@form-create/designer@3.5.0': + resolution: {integrity: sha512-IWtbx/C08kZHGfvT8oyKKyz2v/HJ7FKQzGN1ULbYhNW3o08b6ayTtr9/yA9HlsQfxJoqiUp4gWO9RWvtF/Dw9A==} + peerDependencies: + vue: ^3.5 + + '@form-create/element-ui@3.3.4': + resolution: {integrity: sha512-piW4zGZpIcU0X3MgoSKpMmw0IV4T/hfDYqz83C2l29dO4GeH6yYPTY4VKEL3ykyjEChwkbOcJFHe7t8VogfwLQ==} + peerDependencies: + vue: ^3.5.12 + + '@form-create/utils@3.3.0': + resolution: {integrity: sha512-4VGI3Qowkc0HsrxmC6NT1eUlEnN2xURqStjJXD+PjgbYKqzR01pNHJbz1UyfkrmcFE9HTUaWrH7IgPPxjlSo2g==} + + '@gera2ld/jsx-dom@2.2.2': + resolution: {integrity: sha512-EOqf31IATRE6zS1W1EoWmXZhGfLAoO9FIlwTtHduSrBdud4npYBxYAkv8dZ5hudDPwJeeSjn40kbCL4wAzr8dA==} + + '@humanwhocodes/config-array@0.13.0': + resolution: {integrity: sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==} + engines: {node: '>=10.10.0'} + deprecated: Use @eslint/config-array instead + + '@humanwhocodes/module-importer@1.0.1': + resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} + engines: {node: '>=12.22'} + + '@humanwhocodes/object-schema@2.0.3': + resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} + deprecated: Use @eslint/object-schema instead + + '@iconify/iconify@2.1.2': + resolution: {integrity: sha512-QcUzFeEWkE/mW+BVtEGmcWATClcCOIJFiYUD/PiCWuTcdEA297o8D4oN6Ra44WrNOHu1wqNW4J0ioaDIiqaFOQ==} + deprecated: no longer maintained, switch to modern iconify-icon web component + + '@iconify/iconify@3.1.1': + resolution: {integrity: sha512-1nemfyD/OJzh9ALepH7YfuuP8BdEB24Skhd8DXWh0hzcOxImbb1ZizSZkpCzAwSZSGcJFmscIBaBQu+yLyWaxQ==} + deprecated: no longer maintained, switch to modern iconify-icon web component + + '@iconify/json@2.2.548': + resolution: {integrity: sha512-6ZDWERlkKM7K2wJ1mTw2bQWRsKyqm4b+/XDdqtrLXzAuS7+huJLO/8ZyBhZ7C1guNfvXhFNEJfucgsNKJeCtJw==} + + '@iconify/types@2.0.0': + resolution: {integrity: sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==} + + '@iconify/utils@3.1.7': + resolution: {integrity: sha512-JZHlwdID+dy+lTgbYC8NEC4zeugqeYsc6jewvzb4c58kHauJn+X7rNwQjxz5p2qSjqaEeQoLkCIQ9v/H4PK0/w==} + + '@intlify/bundle-utils@11.2.7': + resolution: {integrity: sha512-N1u1ZG553SkFxiQ3AEx2Fc7QuGxATjPCHDveHkSP93Imgz8VhHJUZZHEA9pat6oPZC/VcYbP0953EBtPWd+LEA==} + engines: {node: '>= 22.13'} + peerDependencies: + petite-vue-i18n: '*' + vue-i18n: '*' + peerDependenciesMeta: + petite-vue-i18n: + optional: true + vue-i18n: + optional: true + + '@intlify/core-base@9.14.5': + resolution: {integrity: sha512-5ah5FqZG4pOoHjkvs8mjtv+gPKYU0zCISaYNjBNNqYiaITxW8ZtVih3GS/oTOqN8d9/mDLyrjD46GBApNxmlsA==} + engines: {node: '>= 16'} + + '@intlify/message-compiler@11.4.16': + resolution: {integrity: sha512-p4lDWmBAsi3ja+PuEfPRavYyvqkYn/Upxz7UpnyI9LgIIy8XawcGIDzN+k99Z+99etO3HmDXGeTxnJIJGgSZ+g==} + engines: {node: '>= 22'} + + '@intlify/message-compiler@9.14.5': + resolution: {integrity: sha512-IHzgEu61/YIpQV5Pc3aRWScDcnFKWvQA9kigcINcCBXN8mbW+vk9SK+lDxA6STzKQsVJxUPg9ACC52pKKo3SVQ==} + engines: {node: '>= 16'} + + '@intlify/shared@11.4.16': + resolution: {integrity: sha512-xehmkbEgbbNh/V+d8r3hFup0ViaN29YTJSAfRr28C54rxjyZEO0RNQKqW7VVajj16gLdglotNjiq+sIVNtHGzw==} + engines: {node: '>= 22'} + + '@intlify/shared@9.14.5': + resolution: {integrity: sha512-9gB+E53BYuAEMhbCAxVgG38EZrk59sxBtv3jSizNL2hEWlgjBjAw1AwpLHtNaeda12pe6W20OGEa0TwuMSRbyQ==} + engines: {node: '>= 16'} + + '@intlify/unplugin-vue-i18n@11.2.7': + resolution: {integrity: sha512-S+kF2s8tve3GZ93C6Y9K7HtS2NGQrXkbUPO0g7e7Fz2xf1kjurk4cnu7G3hsfy9GPckRSGtUYrgB+54/fRgHUA==} + engines: {node: '>= 22.13'} + peerDependencies: + petite-vue-i18n: '*' + vite: ^6.0.0 || ^7.0.0 || ^8.0.0 + vue: ^3.2.25 + vue-i18n: '*' + peerDependenciesMeta: + petite-vue-i18n: + optional: true + vite: + optional: true + vue-i18n: + optional: true + + '@intlify/vue-i18n-extensions@8.0.0': + resolution: {integrity: sha512-w0+70CvTmuqbskWfzeYhn0IXxllr6mU+IeM2MU0M+j9OW64jkrvqY+pYFWrUnIIC9bEdij3NICruicwd5EgUuQ==} + engines: {node: '>= 18'} + peerDependencies: + '@intlify/shared': ^9.14.5 + '@vue/compiler-dom': ^3.0.0 + vue: ^3.0.0 + vue-i18n: ^9.0.0 || ^10.0.0 || ^11.0.0 + peerDependenciesMeta: + '@intlify/shared': + optional: true + '@vue/compiler-dom': + optional: true + vue: + optional: true + vue-i18n: + optional: true + + '@isaacs/cliui@8.0.2': + resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} + engines: {node: '>=12'} + + '@jest/schemas@29.6.3': + resolution: {integrity: sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + '@jridgewell/gen-mapping@0.3.13': + resolution: {integrity: sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==} + + '@jridgewell/gen-mapping@0.3.5': + resolution: {integrity: sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==} + engines: {node: '>=6.0.0'} + + '@jridgewell/remapping@2.3.5': + resolution: {integrity: sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==} + + '@jridgewell/resolve-uri@3.1.2': + resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} + engines: {node: '>=6.0.0'} + + '@jridgewell/set-array@1.2.1': + resolution: {integrity: sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==} + engines: {node: '>=6.0.0'} + + '@jridgewell/source-map@0.3.6': + resolution: {integrity: sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==} + + '@jridgewell/sourcemap-codec@1.5.0': + resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==} + + '@jridgewell/sourcemap-codec@1.6.0': + resolution: {integrity: sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==} + + '@jridgewell/trace-mapping@0.3.25': + resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==} + + '@jridgewell/trace-mapping@0.3.31': + resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==} + + '@keyv/bigmap@1.3.1': + resolution: {integrity: sha512-WbzE9sdmQtKy8vrNPa9BRnwZh5UF4s1KTmSK0KUVLo3eff5BlQNNWDnFOouNpKfPKDnms9xynJjsMYjMaT/aFQ==} + engines: {node: '>= 18'} + peerDependencies: + keyv: ^5.6.0 + + '@keyv/serialize@1.1.1': + resolution: {integrity: sha512-dXn3FZhPv0US+7dtJsIi2R+c7qWYiReoEh5zUntWCf4oSpMNib8FDhSoed6m3QyZdx5hK7iLFkYk3rNxwt8vTA==} + + '@lezer/common@1.5.4': + resolution: {integrity: sha512-xt3Q4z64xM+xhg4M7NXqw1N//1O74bUFo5kz6fwMeC4qwxSuRdwkYSmjcqCEEKYkNw5e67f2hcNqBoNERAEU0w==} + + '@lezer/highlight@1.2.5': + resolution: {integrity: sha512-O1GMVKgtf5YspFaRzpmqkVgMtIk2HG9uMAbH6wdAIdNh3TVzCsch/+cRi+6l2//UGDKe6NB9BW3cvuR5ezMQ0w==} + + '@lezer/lr@1.4.11': + resolution: {integrity: sha512-UwgZcl1R66H2hDzBrA7kWyYmX6s8p5TQ+e/t7CuvgCtBEPxbEPaHYHu+pJBvTvDotEJpuQkJjbXuHiw5Cixxgw==} + + '@lezer/markdown@1.8.1': + resolution: {integrity: sha512-M5YmEcKWO4mJ45Y1hECwqyu8cLv25EiXOK554PVOvDOWOP0olwelHHQUWr9sjF+d1bENVhy0nfJ8E57XZUTiXg==} + + '@marijn/find-cluster-break@1.0.4': + resolution: {integrity: sha512-Wy0V7+SGUjnF9/TkiM1hKVDPj7jKXduPNboMVtHTA8dySMURWqfg/JZ9E2Sq8JgSJmkl7k7Qe9FLeMSrSraWmQ==} + + '@microsoft/fetch-event-source@2.0.1': + resolution: {integrity: sha512-W6CLUJ2eBMw3Rec70qrsEW0jOm/3twwJv21mrmj2yORiaVmVYGS4sSS5yUwvQc1ZlDLYGPnClVWmUUMagKNsfA==} + + '@napi-rs/lzma-linux-x64-gnu@1.5.1': + resolution: {integrity: sha512-oTXEIha4SsuXdTA4Iyskj0kpdx2yVXdhd75c2v3xGrHFfVMsbhTPZU/nMPL4sWKo4pBHm3aucLaqGlF696dTyQ==} + engines: {node: ^22.20 || ^24.12 || >=25} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@nodable/entities@3.1.0': + resolution: {integrity: sha512-LsS/DjHr+uDM647Gru/cA8+J3a3HfhttwCKLyuoyN7yXTFCxKBtSgMQBvrW9yNPa2/zDRUNuGPaH5QUFoa4arQ==} + + '@nodelib/fs.scandir@2.1.5': + resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} + engines: {node: '>= 8'} + + '@nodelib/fs.stat@2.0.5': + resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==} + engines: {node: '>= 8'} + + '@nodelib/fs.walk@1.2.8': + resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} + engines: {node: '>= 8'} + + '@one-ini/wasm@0.1.1': + resolution: {integrity: sha512-XuySG1E38YScSJoMlqovLru4KTUNSjgVTIjyh7qMX6aNN5HY5Ct5LhRJdxO79JtTzKfzV/bnWpz+zquYrISsvw==} + + '@one-ini/wasm@0.2.1': + resolution: {integrity: sha512-TUqERXGNTifZ9y2g3wPxQrw3HpHv/02DsW3D90T9x0hhonrL1ZqpSmNrU2XkoIq0fP1N6gZfVQzy2Fw1ZvGBNg==} + + '@oxc-parser/binding-android-arm-eabi@0.153.0': + resolution: {integrity: sha512-BcWu25dMwMjHpaDCEidmpAi7rGg1qZoihJeUUH9bD55pVZ0z4Wa5CQgqSTo0R41H81oozisQKW3WqvAN2m77IQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [android] + + '@oxc-parser/binding-android-arm64@0.153.0': + resolution: {integrity: sha512-9l5rdp2DhRqVriBHsNpu5cEf+hizZ4B58rt93HzyQEBUgZiC6qe2oFpaAAnXGCxHGnQExI1s7S2G0QhFacUZ6w==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [android] + + '@oxc-parser/binding-darwin-arm64@0.153.0': + resolution: {integrity: sha512-EcpsyRXHhENDpekpG4QNaSZj2F/BAz4Gh4o89zZwNss86R8KyRSQ6sXbAj74Xyeb4z3j/yBZZ6joQZhraIWyfw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [darwin] + + '@oxc-parser/binding-darwin-x64@0.153.0': + resolution: {integrity: sha512-hlj80HUQy07/2lYp6rmxH+3u+H2ik3rjLR52CUdPApxmZCNxASDUf/+ykTzAHS/fehftmVMATKvPaWmuLHuasg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [darwin] + + '@oxc-parser/binding-freebsd-x64@0.153.0': + resolution: {integrity: sha512-fWRcv2pMSh1qtez46MOu8vuUJ5fiaQZPHSphbWulbL7SHBMKfRgZl2PzjXZYQJbq7NEXyXbgIuIuUm+/Rmkv8w==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [freebsd] + + '@oxc-parser/binding-linux-arm-gnueabihf@0.153.0': + resolution: {integrity: sha512-paZeUK1GXShl/bOJQET1/8AQxayFeuN4SIWAkgTRxE7ZQwv9uYSB2n0648smygP22N7jcI3zxAm0Z+ALNiIKxg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + + '@oxc-parser/binding-linux-arm-musleabihf@0.153.0': + resolution: {integrity: sha512-qFPp5NwMf4K1C0O+DCVGmcbOaYyYAq98Rvv9p4VSfb777iUwlJCqMUxf6QG9N5f5ls4TEX6LitOZHi+6GL6rYQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + + '@oxc-parser/binding-linux-arm64-gnu@0.153.0': + resolution: {integrity: sha512-oufEhZCX7saeo27Logra8cvBR1jQ/yw2zUI2hHmWw3qA/XYqEW31FOvLQBv7DWN32NjVdlcaP11WBBZTJo4k9g==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@oxc-parser/binding-linux-arm64-musl@0.153.0': + resolution: {integrity: sha512-zXYzuAqng85h6+LI3iRm0zeMLX1/K2z41ZAMWxVRgt0D10VvZUaV5q+TEB46KDhoKBpdexoTLC6QoB/EiP2oqQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@oxc-parser/binding-linux-ppc64-gnu@0.153.0': + resolution: {integrity: sha512-J7+NLwLEzdkKM9cKyPHH/AjXXstWOs98KYgLrPPnO4N9MO8EZRBfPNnBcS3S67uMOBkRpUmCl2FhRnWdQ5CbBA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ppc64] + os: [linux] + libc: [glibc] + + '@oxc-parser/binding-linux-riscv64-gnu@0.153.0': + resolution: {integrity: sha512-sD0K11GQTLWylln54nPMMTtgmBbQrR5It/vMpZpy/fogiw8O2AvIE+9LuWUXddrWk9zvFIHGRcSgFn4IHOfoYg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [riscv64] + os: [linux] + libc: [glibc] + + '@oxc-parser/binding-linux-riscv64-musl@0.153.0': + resolution: {integrity: sha512-7L66uql2BhvSz51LwfExjOdn6et/ydTiQxl23VApdKzJhTc3TczA1Qt6VR/UcvlQrL2ZbytIJb447vh7p5wmUw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [riscv64] + os: [linux] + libc: [musl] + + '@oxc-parser/binding-linux-s390x-gnu@0.153.0': + resolution: {integrity: sha512-hXV3T7mNyrPR19rbPYkglkQJtoM/UNo/xwbZeeqdAxEg8PXgb4LXXuxPpGgI4bzRRCWwLUxdDSS58xIyC2u1TA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [s390x] + os: [linux] + libc: [glibc] + + '@oxc-parser/binding-linux-x64-gnu@0.153.0': + resolution: {integrity: sha512-Da8Vqs1xdtoDYtEjmozD7wGgJeLBQkMbR0WUBECOSxodyX5DXy8ySlvJWbukyO2Q0+TM9EK+4LT6tbq0jCg4hQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@oxc-parser/binding-linux-x64-musl@0.153.0': + resolution: {integrity: sha512-zGAPxNTIIw6X5WyTRscIFE/oDjpdNtrrl32ing6NOXdGjzRucadnxBilexLdeYQ9YxixF93GujpXyQ0jw7ddSg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [musl] + + '@oxc-parser/binding-openharmony-arm64@0.153.0': + resolution: {integrity: sha512-GoHzpqP5XyPIp9DHokoEdCp+K4UPl/h1neFj1uXnUB3pJYyOQ7NOhFVOttNUgCGcj2eywAvu5cRivTOSq4S10g==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [openharmony] + + '@oxc-parser/binding-win32-arm64-msvc@0.153.0': + resolution: {integrity: sha512-xGcy12tO9k7zFbeyQzEuilfWfQpyRq23/fLPfN3wjSWuWv58k46fQT1hsO1KFNykZuVGW9xSJE/z592TmAoSDA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [win32] + + '@oxc-parser/binding-win32-ia32-msvc@0.153.0': + resolution: {integrity: sha512-o1ykUjWncvXX6N5a4KebgLjtD8zRui+f1llMhSGoSC9oP2KOqapRpdwmZ3NcNG0axFouwVKmhGBjd+IhA8BksA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ia32] + os: [win32] + + '@oxc-parser/binding-win32-x64-msvc@0.153.0': + resolution: {integrity: sha512-gxQz7G96Up136fd+2zWrP+o6FYGs9NO4Dyv55IoeJFJUDwLFHcLYY11hhA5wQKs0HoM57Q8esQ3nEVhnCdsjAQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [win32] + + '@oxc-project/types@0.153.0': + resolution: {integrity: sha512-jSNrRIyvPVLL5E1z/tS5zLAprosGz/FuI1PWwEOz59j3E4TTTzSpqKb/RDGqJhhW0QHYISGXxq582wGx6T11Tw==} + + '@parcel/watcher-android-arm64@2.5.0': + resolution: {integrity: sha512-qlX4eS28bUcQCdribHkg/herLe+0A9RyYC+mm2PXpncit8z5b3nSqGVzMNR3CmtAOgRutiZ02eIJJgP/b1iEFQ==} + engines: {node: '>= 10.0.0'} + cpu: [arm64] + os: [android] + + '@parcel/watcher-darwin-arm64@2.5.0': + resolution: {integrity: sha512-hyZ3TANnzGfLpRA2s/4U1kbw2ZI4qGxaRJbBH2DCSREFfubMswheh8TeiC1sGZ3z2jUf3s37P0BBlrD3sjVTUw==} + engines: {node: '>= 10.0.0'} + cpu: [arm64] + os: [darwin] + + '@parcel/watcher-darwin-x64@2.5.0': + resolution: {integrity: sha512-9rhlwd78saKf18fT869/poydQK8YqlU26TMiNg7AIu7eBp9adqbJZqmdFOsbZ5cnLp5XvRo9wcFmNHgHdWaGYA==} + engines: {node: '>= 10.0.0'} + cpu: [x64] + os: [darwin] + + '@parcel/watcher-freebsd-x64@2.5.0': + resolution: {integrity: sha512-syvfhZzyM8kErg3VF0xpV8dixJ+RzbUaaGaeb7uDuz0D3FK97/mZ5AJQ3XNnDsXX7KkFNtyQyFrXZzQIcN49Tw==} + engines: {node: '>= 10.0.0'} + cpu: [x64] + os: [freebsd] + + '@parcel/watcher-linux-arm-glibc@2.5.0': + resolution: {integrity: sha512-0VQY1K35DQET3dVYWpOaPFecqOT9dbuCfzjxoQyif1Wc574t3kOSkKevULddcR9znz1TcklCE7Ht6NIxjvTqLA==} + engines: {node: '>= 10.0.0'} + cpu: [arm] + os: [linux] + libc: [glibc] + + '@parcel/watcher-linux-arm-musl@2.5.0': + resolution: {integrity: sha512-6uHywSIzz8+vi2lAzFeltnYbdHsDm3iIB57d4g5oaB9vKwjb6N6dRIgZMujw4nm5r6v9/BQH0noq6DzHrqr2pA==} + engines: {node: '>= 10.0.0'} + cpu: [arm] + os: [linux] + libc: [musl] + + '@parcel/watcher-linux-arm64-glibc@2.5.0': + resolution: {integrity: sha512-BfNjXwZKxBy4WibDb/LDCriWSKLz+jJRL3cM/DllnHH5QUyoiUNEp3GmL80ZqxeumoADfCCP19+qiYiC8gUBjA==} + engines: {node: '>= 10.0.0'} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@parcel/watcher-linux-arm64-musl@2.5.0': + resolution: {integrity: sha512-S1qARKOphxfiBEkwLUbHjCY9BWPdWnW9j7f7Hb2jPplu8UZ3nes7zpPOW9bkLbHRvWM0WDTsjdOTUgW0xLBN1Q==} + engines: {node: '>= 10.0.0'} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@parcel/watcher-linux-x64-glibc@2.5.0': + resolution: {integrity: sha512-d9AOkusyXARkFD66S6zlGXyzx5RvY+chTP9Jp0ypSTC9d4lzyRs9ovGf/80VCxjKddcUvnsGwCHWuF2EoPgWjw==} + engines: {node: '>= 10.0.0'} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@parcel/watcher-linux-x64-musl@2.5.0': + resolution: {integrity: sha512-iqOC+GoTDoFyk/VYSFHwjHhYrk8bljW6zOhPuhi5t9ulqiYq1togGJB5e3PwYVFFfeVgc6pbz3JdQyDoBszVaA==} + engines: {node: '>= 10.0.0'} + cpu: [x64] + os: [linux] + libc: [musl] + + '@parcel/watcher-win32-arm64@2.5.0': + resolution: {integrity: sha512-twtft1d+JRNkM5YbmexfcH/N4znDtjgysFaV9zvZmmJezQsKpkfLYJ+JFV3uygugK6AtIM2oADPkB2AdhBrNig==} + engines: {node: '>= 10.0.0'} + cpu: [arm64] + os: [win32] + + '@parcel/watcher-win32-ia32@2.5.0': + resolution: {integrity: sha512-+rgpsNRKwo8A53elqbbHXdOMtY/tAtTzManTWShB5Kk54N8Q9mzNWV7tV+IbGueCbcj826MfWGU3mprWtuf1TA==} + engines: {node: '>= 10.0.0'} + cpu: [ia32] + os: [win32] + + '@parcel/watcher-win32-x64@2.5.0': + resolution: {integrity: sha512-lPrxve92zEHdgeff3aiu4gDOIt4u7sJYha6wbdEZDCDUhtjTsOMiaJzG5lMY4GkWH8p0fMmO2Ppq5G5XXG+DQw==} + engines: {node: '>= 10.0.0'} + cpu: [x64] + os: [win32] + + '@parcel/watcher@2.5.0': + resolution: {integrity: sha512-i0GV1yJnm2n3Yq1qw6QrUrd/LI9bE8WEBOTtOkpCXHHdyN3TAGgqAK/DAT05z4fq2x04cARXt2pDmjWjL92iTQ==} + engines: {node: '>= 10.0.0'} + + '@pkgjs/parseargs@0.11.0': + resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} + engines: {node: '>=14'} + + '@pkgr/core@0.1.1': + resolution: {integrity: sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==} + engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} + + '@pkgr/core@0.3.6': + resolution: {integrity: sha512-SEeaJLb3qBNF/OaXnaR1NmmBbFYk1zC0ZH/52fATcRPLFg/p791YrcyFFy44Bo9sLaGuSuLp5Q6axbb/O+v/RA==} + engines: {node: ^14.18.0 || >=16.0.0} + + '@purge-icons/core@0.10.0': + resolution: {integrity: sha512-AtJbZv5Yy+vWX5v32DPTr+CW7AkSK8HJx52orDbrYt/9s4lGM2t4KKAmwaTQEH2HYr2HVh1mlqs54/S1s3WT1g==} + + '@purge-icons/generated@0.10.0': + resolution: {integrity: sha512-I+1yN7/yDy/eZzfhAZqKF8Z6FM8D/O1vempbPrHJ0m9HlZwvf8sWXOArPJ2qRQGB6mJUVSpaXkoGBuoz1GQX5A==} + + '@purge-icons/generated@0.9.0': + resolution: {integrity: sha512-s2t+1oVtGDV6KtqfCXtUOhxfeYvOdDF90IVm+nMs/6bUP0HeGZLslguuL/AibpwtfL4FA/oCsIu/RhwapgAdJw==} + + '@quansync/fs@0.1.1': + resolution: {integrity: sha512-sx8J1O/+j2lqs8MvsEz6rs/6UAUpCb4fu7C6EqtMqzbS3CmqLkTDTOMK+DrWukvyUuHzl8DhMjfNJzQDTqfGJg==} + engines: {node: '>=20.18.0'} + + '@quansync/fs@1.1.0': + resolution: {integrity: sha512-qAPG/t3HqML1TlN7sY/pTbEjzFVAKsMjNNMGheyDosro+kT4iw2KCUoHcVdmliwWjorm4elZbgNQyU2eD97eDg==} + + '@rolldown/pluginutils@1.0.1': + resolution: {integrity: sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==} + + '@rollup/plugin-virtual@3.0.2': + resolution: {integrity: sha512-10monEYsBp3scM4/ND4LNH5Rxvh3e/cVeL3jWTgZ2SrQ+BmUoQcopVQvnaMcOnykb1VkxUFuDAN+0FnpTFRy2A==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^2.80.0 + peerDependenciesMeta: + rollup: + optional: true + + '@rollup/pluginutils@4.2.1': + resolution: {integrity: sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ==} + engines: {node: '>= 8.0.0'} + + '@rollup/pluginutils@5.1.3': + resolution: {integrity: sha512-Pnsb6f32CD2W3uCaLZIzDmeFyQ2b8UWMFI7xtwUezpcGBDVDW6y9XgAWIlARiGAo6eNF5FK5aQTr0LFyNyqq5A==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^2.80.0 + peerDependenciesMeta: + rollup: + optional: true + + '@rollup/pluginutils@5.5.1': + resolution: {integrity: sha512-P9ZvnfouRu4MSC+ilERaw6FmZs8zqKhpHxEs4aGDGWQAMzQGXnhvCSvoNwokfNvdt7t3Y5Y4p6gStQgezeIqug==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^2.80.0 + peerDependenciesMeta: + rollup: + optional: true + + '@rollup/rollup-android-arm-eabi@4.65.0': + resolution: {integrity: sha512-t2AnVba25baFdq7gczzS13JyVcdubLVbFX1X04mxrggDrTQPUXNv3XM0k9H1hr5tqvg7AVvtQ720QHAj0iYqhg==} + cpu: [arm] + os: [android] + + '@rollup/rollup-android-arm64@4.65.0': + resolution: {integrity: sha512-dNONUaEwPGhl/nuO2KV8VABWlcjYyU6KtZGN8dQv5OS5JU7JSCxPijVNKXbRJd0iuTzTiJ4TjPt/4bbvDRNiMQ==} + cpu: [arm64] + os: [android] + + '@rollup/rollup-darwin-arm64@4.65.0': + resolution: {integrity: sha512-zWQqUH+9zavr2Bxuzfpuv2SIF3X31cr58TvSQC9o1GhpOvkqRwr60GkZdQcudyT/BEgdpdSafjgd2I13MbTL7g==} + cpu: [arm64] + os: [darwin] + + '@rollup/rollup-darwin-x64@4.65.0': + resolution: {integrity: sha512-RQYreBFWtO4//hIuOaZkYUnF/lPU4lz35dveDimDshWCJvVisVtJ/shmT9bkXK8wFJY+FJF89X6F3Cq1qI3LCw==} + cpu: [x64] + os: [darwin] + + '@rollup/rollup-freebsd-arm64@4.65.0': + resolution: {integrity: sha512-A0NfMj6Cuh/9BE5k3awJKv6HoxFVXIcLAb6SZqAMoxUHPA1ZNNK4RsGuUPD/vL7nEAm9LG+ZzXWWTrnC0XtkpA==} + cpu: [arm64] + os: [freebsd] + + '@rollup/rollup-freebsd-x64@4.65.0': + resolution: {integrity: sha512-BI6/H7q3aP0I7S7GOrjyxTjgEJlSnovXE38+bdxBpuKN6z+d//uF+T+VQ3Q7ltJL/71p17ufartARX9Ja5gOGQ==} + cpu: [x64] + os: [freebsd] + + '@rollup/rollup-linux-arm-gnueabihf@4.65.0': + resolution: {integrity: sha512-W1vUprf09RWaVWnsFP1vlUkEWJzTZlpObOEAYZXt9Fq0UVAOYEkeGr7wBX7McKqqIQskXdBnpiOMgwPujordgA==} + cpu: [arm] + os: [linux] + libc: [glibc] + + '@rollup/rollup-linux-arm-musleabihf@4.65.0': + resolution: {integrity: sha512-s8QTcZWgrl9haFzEGIqyE5BWyo89pFDGLMBFZ752WYxk8DJwNU/O1X6pZgPw829d9/sm6CCHyrMP3aurt76p1Q==} + cpu: [arm] + os: [linux] + libc: [musl] + + '@rollup/rollup-linux-arm64-gnu@4.65.0': + resolution: {integrity: sha512-ke1f6dLRzkqveyjjF2fkEwQYZvxHtNNwjegY8nJrwcO0Bdqr8CzFO/pKE0Bns13cx0qz2Ba2Y0Hs3dSwMdnHxA==} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@rollup/rollup-linux-arm64-musl@4.65.0': + resolution: {integrity: sha512-926SMeUcy4y18Rz/w2aJiUKOnyAnm6czg72bXkQEaeemsll+Wr0hnsjb2BGRpHvWgwAMYy5ACJCotbvfLCfj0A==} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@rollup/rollup-linux-loong64-gnu@4.65.0': + resolution: {integrity: sha512-6T7JNRP1hc4hqF2dUsEoVLOt9K8tmODoCLldtQRYnrddGGQY8Gqe2pM/qMMUo7EMowpP7oa2N95k0/8sYK/ipw==} + cpu: [loong64] + os: [linux] + libc: [glibc] + + '@rollup/rollup-linux-loong64-musl@4.65.0': + resolution: {integrity: sha512-SImGFl1Je5kpyAgOCPONVT7h6ASV8mAUwGRjY7eZvVjPg//PfHOXgI+P241RF/+HqsA4PP3qD527ysWFKNQyhQ==} + cpu: [loong64] + os: [linux] + libc: [musl] + + '@rollup/rollup-linux-ppc64-gnu@4.65.0': + resolution: {integrity: sha512-XeDTbmPF1Yu5asfXGPrMkWoxTDhgryQbmw5Q1+R582O51VNCk23J6f2pDrsAp5YkneBVBwtExx6ZGOb9D2aQ6A==} + cpu: [ppc64] + os: [linux] + libc: [glibc] + + '@rollup/rollup-linux-ppc64-musl@4.65.0': + resolution: {integrity: sha512-VS55JUI/1nsljmV/jfqNkLZXFw8uMO8nNlfoHmSevNf6fO3neuhyDvx9dv3c/Ytt8r/431SL8Qax1dpYvOMZTg==} + cpu: [ppc64] + os: [linux] + libc: [musl] + + '@rollup/rollup-linux-riscv64-gnu@4.65.0': + resolution: {integrity: sha512-Vblw84TbX7RS4la1Y4+yQ7aore/oSyaNtFbppuBr5Vs/4LfBeXKq9dIfoExw6zOvRERqd2rRAjnZRaMhH/0x5w==} + cpu: [riscv64] + os: [linux] + libc: [glibc] + + '@rollup/rollup-linux-riscv64-musl@4.65.0': + resolution: {integrity: sha512-7+gHjtONvKgwR9InTKFaLq53f6YzBJkgeMRBENdWTsQr+spahGqQm8HF5aXpq8i4JaRrOqYyv6Zn1WltDTxaZQ==} + cpu: [riscv64] + os: [linux] + libc: [musl] + + '@rollup/rollup-linux-s390x-gnu@4.65.0': + resolution: {integrity: sha512-KvNDC0J6s4vVHhtJ6KrDXU0Er0au/hmRIBq/+1maCV8TseGupeKizq0bWcrbp2HE1T8xoknvN0Q/KZ/YF0qX3w==} + cpu: [s390x] + os: [linux] + libc: [glibc] + + '@rollup/rollup-linux-x64-gnu@4.65.0': + resolution: {integrity: sha512-GExdD15WPvu/x/drELjVam7vX8EsPgvTMOa/iJL/p/4m/oOqzbb7JXZg8fXR4hlXtg/sF2zyTZ3bR0AEtEMlhQ==} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@rollup/rollup-linux-x64-musl@4.65.0': + resolution: {integrity: sha512-8sT9PemIZfIMED4Vd4KGoOXVDj5CMSWNcGdbheRUx9TYS03yOWdT2Q0lXPyEyNBB9YTilwewIQKNIBk6Nxi0Kg==} + cpu: [x64] + os: [linux] + libc: [musl] + + '@rollup/rollup-openbsd-x64@4.65.0': + resolution: {integrity: sha512-pO6Ehi0jo5yE0R6PltKhJhv9mlIiyzBJk5N5NUF2OF6xtVKI+1bdXxj/rb0jGXy3hck1ELVT0QPY3tzkAm360w==} + cpu: [x64] + os: [openbsd] + + '@rollup/rollup-openharmony-arm64@4.65.0': + resolution: {integrity: sha512-vo7N3/+cjjPDYr8vtxC+qSNgWa9sDvJ7g8N8R5SWqFY4WiNH1ULcAU70SKVyHeiIZOYYwNP9pTipmhN5sl1NPw==} + cpu: [arm64] + os: [openharmony] + + '@rollup/rollup-win32-arm64-msvc@4.65.0': + resolution: {integrity: sha512-ArwvgFAbjKcDM7qqotZ4OVYf+UMT9xH2YzkCzK4+AuZSDihMlz1Ekoe4INwBVXzn2mnJzuIYOcSx07iTBijGRQ==} + cpu: [arm64] + os: [win32] + + '@rollup/rollup-win32-ia32-msvc@4.65.0': + resolution: {integrity: sha512-QGMmK4/cxKE/36FoLMSHQBCyymv/eFTnsCvvsBF0rgmOvVbvX78VWZRerL3dHa77f4pM6Xcc2iGDhJ10w/svKQ==} + cpu: [ia32] + os: [win32] + + '@rollup/rollup-win32-x64-gnu@4.65.0': + resolution: {integrity: sha512-XfKYFWHIPs4HPODIMsGF1IKlS3H1e3WokUZIgpmn4+uNnZBlnRDDHEylNyazbQXwhMKZre68OjtRYbKqb5+j8w==} + cpu: [x64] + os: [win32] + + '@rollup/rollup-win32-x64-msvc@4.65.0': + resolution: {integrity: sha512-wPWi++K4Bs1VR4XihOhfGi4IGX6Cub7FlerTf8X2v+2BtDHddgSqWCXwGD+h2yAe4/niIhNDwAltioOC+wEogQ==} + cpu: [x64] + os: [win32] + + '@sinclair/typebox@0.27.8': + resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} + + '@sphinxxxx/color-conversion@2.2.2': + resolution: {integrity: sha512-XExJS3cLqgrmNBIP3bBw6+1oQ1ksGjFh0+oClDKFYpCCqx/hlqwWO5KO/S63fzUo67SxI9dMrF0y5T/Ey7h8Zw==} + + '@standard-schema/spec@1.1.0': + resolution: {integrity: sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==} + + '@swc/core-darwin-arm64@1.9.3': + resolution: {integrity: sha512-hGfl/KTic/QY4tB9DkTbNuxy5cV4IeejpPD4zo+Lzt4iLlDWIeANL4Fkg67FiVceNJboqg48CUX+APhDHO5G1w==} + engines: {node: '>=10'} + cpu: [arm64] + os: [darwin] + + '@swc/core-darwin-x64@1.9.3': + resolution: {integrity: sha512-IaRq05ZLdtgF5h9CzlcgaNHyg4VXuiStnOFpfNEMuI5fm5afP2S0FHq8WdakUz5WppsbddTdplL+vpeApt/WCQ==} + engines: {node: '>=10'} + cpu: [x64] + os: [darwin] + + '@swc/core-linux-arm-gnueabihf@1.9.3': + resolution: {integrity: sha512-Pbwe7xYprj/nEnZrNBvZfjnTxlBIcfApAGdz2EROhjpPj+FBqBa3wOogqbsuGGBdCphf8S+KPprL1z+oDWkmSQ==} + engines: {node: '>=10'} + cpu: [arm] + os: [linux] + + '@swc/core-linux-arm64-gnu@1.9.3': + resolution: {integrity: sha512-AQ5JZiwNGVV/2K2TVulg0mw/3LYfqpjZO6jDPtR2evNbk9Yt57YsVzS+3vHSlUBQDRV9/jqMuZYVU3P13xrk+g==} + engines: {node: '>=10'} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@swc/core-linux-arm64-musl@1.9.3': + resolution: {integrity: sha512-tzVH480RY6RbMl/QRgh5HK3zn1ZTFsThuxDGo6Iuk1MdwIbdFYUY034heWUTI4u3Db97ArKh0hNL0xhO3+PZdg==} + engines: {node: '>=10'} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@swc/core-linux-x64-gnu@1.9.3': + resolution: {integrity: sha512-ivXXBRDXDc9k4cdv10R21ccBmGebVOwKXT/UdH1PhxUn9m/h8erAWjz5pcELwjiMf27WokqPgaWVfaclDbgE+w==} + engines: {node: '>=10'} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@swc/core-linux-x64-musl@1.9.3': + resolution: {integrity: sha512-ILsGMgfnOz1HwdDz+ZgEuomIwkP1PHT6maigZxaCIuC6OPEhKE8uYna22uU63XvYcLQvZYDzpR3ms47WQPuNEg==} + engines: {node: '>=10'} + cpu: [x64] + os: [linux] + libc: [musl] + + '@swc/core-win32-arm64-msvc@1.9.3': + resolution: {integrity: sha512-e+XmltDVIHieUnNJHtspn6B+PCcFOMYXNJB1GqoCcyinkEIQNwC8KtWgMqUucUbEWJkPc35NHy9k8aCXRmw9Kg==} + engines: {node: '>=10'} + cpu: [arm64] + os: [win32] + + '@swc/core-win32-ia32-msvc@1.9.3': + resolution: {integrity: sha512-rqpzNfpAooSL4UfQnHhkW8aL+oyjqJniDP0qwZfGnjDoJSbtPysHg2LpcOBEdSnEH+uIZq6J96qf0ZFD8AGfXA==} + engines: {node: '>=10'} + cpu: [ia32] + os: [win32] + + '@swc/core-win32-x64-msvc@1.9.3': + resolution: {integrity: sha512-3YJJLQ5suIEHEKc1GHtqVq475guiyqisKSoUnoaRtxkDaW5g1yvPt9IoSLOe2mRs7+FFhGGU693RsBUSwOXSdQ==} + engines: {node: '>=10'} + cpu: [x64] + os: [win32] + + '@swc/core@1.9.3': + resolution: {integrity: sha512-oRj0AFePUhtatX+BscVhnzaAmWjpfAeySpM1TCbxA1rtBDeH/JDhi5yYzAKneDYtVtBvA7ApfeuzhMC9ye4xSg==} + engines: {node: '>=10'} + peerDependencies: + '@swc/helpers': '*' + peerDependenciesMeta: + '@swc/helpers': + optional: true + + '@swc/counter@0.1.3': + resolution: {integrity: sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==} + + '@swc/types@0.1.17': + resolution: {integrity: sha512-V5gRru+aD8YVyCOMAjMpWR1Ui577DD5KSJsHP8RAxopAH22jFz6GZd/qxqjO6MJHQhcsjvjOFXyDhyLQUnMveQ==} + + '@sxzz/popperjs-es@2.11.8': + resolution: {integrity: sha512-wOwESXvvED3S8xBmcPWHs2dUuzrE4XiZeFu7e1hROIJkm02a49N120pmOXxY33sBb6hArItm5W5tcg1cBtV+HQ==} + + '@transloadit/prettier-bytes@0.3.4': + resolution: {integrity: sha512-8/SnIF9Q2k52mbjRVAYLranwkaDTLb+O9r4Z/uo8uNw//SjygKvvbF4BHSOuReufaAyum1q13602VcNud25Dfg==} + + '@types/ace@0.0.52': + resolution: {integrity: sha512-YPF9S7fzpuyrxru+sG/rrTpZkC6gpHBPF14W3x70kqVOD+ks6jkYLapk4yceh36xej7K4HYxcyz9ZDQ2lTvwgQ==} + + '@types/chai@5.2.3': + resolution: {integrity: sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==} + + '@types/conventional-commits-parser@5.0.1': + resolution: {integrity: sha512-7uz5EHdzz2TqoMfV7ee61Egf5y6NkcO4FB/1iCCQnbeiI1F3xzv3vK5dBCXUCLQgGYS+mUeigK1iKQzvED+QnQ==} + + '@types/d3-array@3.2.1': + resolution: {integrity: sha512-Y2Jn2idRrLzUfAKV2LyRImR+y4oa2AntrgID95SHJxuMUrkNXmanDSed71sRNZysveJVt1hLLemQZIady0FpEg==} + + '@types/d3-axis@3.0.6': + resolution: {integrity: sha512-pYeijfZuBd87T0hGn0FO1vQ/cgLk6E1ALJjfkC0oJ8cbwkZl3TpgS8bVBLZN+2jjGgg38epgxb2zmoGtSfvgMw==} + + '@types/d3-brush@3.0.6': + resolution: {integrity: sha512-nH60IZNNxEcrh6L1ZSMNA28rj27ut/2ZmI3r96Zd+1jrZD++zD3LsMIjWlvg4AYrHn/Pqz4CF3veCxGjtbqt7A==} + + '@types/d3-chord@3.0.6': + resolution: {integrity: sha512-LFYWWd8nwfwEmTZG9PfQxd17HbNPksHBiJHaKuY1XeqscXacsS2tyoo6OdRsjf+NQYeB6XrNL3a25E3gH69lcg==} + + '@types/d3-color@3.1.3': + resolution: {integrity: sha512-iO90scth9WAbmgv7ogoq57O9YpKmFBbmoEoCHDB2xMBY0+/KVrqAaCDyCE16dUspeOvIxFFRI+0sEtqDqy2b4A==} + + '@types/d3-contour@3.0.6': + resolution: {integrity: sha512-BjzLgXGnCWjUSYGfH1cpdo41/hgdWETu4YxpezoztawmqsvCeep+8QGfiY6YbDvfgHz/DkjeIkkZVJavB4a3rg==} + + '@types/d3-delaunay@6.0.4': + resolution: {integrity: sha512-ZMaSKu4THYCU6sV64Lhg6qjf1orxBthaC161plr5KuPHo3CNm8DTHiLw/5Eq2b6TsNP0W0iJrUOFscY6Q450Hw==} + + '@types/d3-dispatch@3.0.6': + resolution: {integrity: sha512-4fvZhzMeeuBJYZXRXrRIQnvUYfyXwYmLsdiN7XXmVNQKKw1cM8a5WdID0g1hVFZDqT9ZqZEY5pD44p24VS7iZQ==} + + '@types/d3-drag@3.0.7': + resolution: {integrity: sha512-HE3jVKlzU9AaMazNufooRJ5ZpWmLIoc90A37WU2JMmeq28w1FQqCZswHZ3xR+SuxYftzHq6WU6KJHvqxKzTxxQ==} + + '@types/d3-dsv@3.0.7': + resolution: {integrity: sha512-n6QBF9/+XASqcKK6waudgL0pf/S5XHPPI8APyMLLUHd8NqouBGLsU8MgtO7NINGtPBtk9Kko/W4ea0oAspwh9g==} + + '@types/d3-ease@3.0.2': + resolution: {integrity: sha512-NcV1JjO5oDzoK26oMzbILE6HW7uVXOHLQvHshBUW4UMdZGfiY6v5BeQwh9a9tCzv+CeefZQHJt5SRgK154RtiA==} + + '@types/d3-fetch@3.0.7': + resolution: {integrity: sha512-fTAfNmxSb9SOWNB9IoG5c8Hg6R+AzUHDRlsXsDZsNp6sxAEOP0tkP3gKkNSO/qmHPoBFTxNrjDprVHDQDvo5aA==} + + '@types/d3-force@3.0.10': + resolution: {integrity: sha512-ZYeSaCF3p73RdOKcjj+swRlZfnYpK1EbaDiYICEEp5Q6sUiqFaFQ9qgoshp5CzIyyb/yD09kD9o2zEltCexlgw==} + + '@types/d3-format@3.0.4': + resolution: {integrity: sha512-fALi2aI6shfg7vM5KiR1wNJnZ7r6UuggVqtDA+xiEdPZQwy/trcQaHnwShLuLdta2rTymCNpxYTiMZX/e09F4g==} + + '@types/d3-geo@3.1.0': + resolution: {integrity: sha512-856sckF0oP/diXtS4jNsiQw/UuK5fQG8l/a9VVLeSouf1/PPbBE1i1W852zVwKwYCBkFJJB7nCFTbk6UMEXBOQ==} + + '@types/d3-hierarchy@3.1.7': + resolution: {integrity: sha512-tJFtNoYBtRtkNysX1Xq4sxtjK8YgoWUNpIiUee0/jHGRwqvzYxkq0hGVbbOGSz+JgFxxRu4K8nb3YpG3CMARtg==} + + '@types/d3-interpolate@3.0.4': + resolution: {integrity: sha512-mgLPETlrpVV1YRJIglr4Ez47g7Yxjl1lj7YKsiMCb27VJH9W8NVM6Bb9d8kkpG/uAQS5AmbA48q2IAolKKo1MA==} + + '@types/d3-path@3.1.0': + resolution: {integrity: sha512-P2dlU/q51fkOc/Gfl3Ul9kicV7l+ra934qBFXCFhrZMOL6du1TM0pm1ThYvENukyOn5h9v+yMJ9Fn5JK4QozrQ==} + + '@types/d3-polygon@3.0.2': + resolution: {integrity: sha512-ZuWOtMaHCkN9xoeEMr1ubW2nGWsp4nIql+OPQRstu4ypeZ+zk3YKqQT0CXVe/PYqrKpZAi+J9mTs05TKwjXSRA==} + + '@types/d3-quadtree@3.0.6': + resolution: {integrity: sha512-oUzyO1/Zm6rsxKRHA1vH0NEDG58HrT5icx/azi9MF1TWdtttWl0UIUsjEQBBh+SIkrpd21ZjEv7ptxWys1ncsg==} + + '@types/d3-random@3.0.3': + resolution: {integrity: sha512-Imagg1vJ3y76Y2ea0871wpabqp613+8/r0mCLEBfdtqC7xMSfj9idOnmBYyMoULfHePJyxMAw3nWhJxzc+LFwQ==} + + '@types/d3-scale-chromatic@3.1.0': + resolution: {integrity: sha512-iWMJgwkK7yTRmWqRB5plb1kadXyQ5Sj8V/zYlFGMUBbIPKQScw+Dku9cAAMgJG+z5GYDoMjWGLVOvjghDEFnKQ==} + + '@types/d3-scale@4.0.8': + resolution: {integrity: sha512-gkK1VVTr5iNiYJ7vWDI+yUFFlszhNMtVeneJ6lUTKPjprsvLLI9/tgEGiXJOnlINJA8FyA88gfnQsHbybVZrYQ==} + + '@types/d3-selection@3.0.11': + resolution: {integrity: sha512-bhAXu23DJWsrI45xafYpkQ4NtcKMwWnAC/vKrd2l+nxMFuvOT3XMYTIj2opv8vq8AO5Yh7Qac/nSeP/3zjTK0w==} + + '@types/d3-shape@3.1.6': + resolution: {integrity: sha512-5KKk5aKGu2I+O6SONMYSNflgiP0WfZIQvVUMan50wHsLG1G94JlxEVnCpQARfTtzytuY0p/9PXXZb3I7giofIA==} + + '@types/d3-time-format@4.0.3': + resolution: {integrity: sha512-5xg9rC+wWL8kdDj153qZcsJ0FWiFt0J5RB6LYUNZjwSnesfblqrI/bJ1wBdJ8OQfncgbJG5+2F+qfqnqyzYxyg==} + + '@types/d3-time@3.0.4': + resolution: {integrity: sha512-yuzZug1nkAAaBlBBikKZTgzCeA+k1uy4ZFwWANOfKw5z5LRhV0gNA7gNkKm7HoK+HRN0wX3EkxGk0fpbWhmB7g==} + + '@types/d3-timer@3.0.2': + resolution: {integrity: sha512-Ps3T8E8dZDam6fUyNiMkekK3XUsaUEik+idO9/YjPtfj2qruF8tFBXS7XhtE4iIXBLxhmLjP3SXpLhVf21I9Lw==} + + '@types/d3-transition@3.0.9': + resolution: {integrity: sha512-uZS5shfxzO3rGlu0cC3bjmMFKsXv+SmZZcgp0KD22ts4uGXp5EVYGzu/0YdwZeKmddhcAccYtREJKkPfXkZuCg==} + + '@types/d3-zoom@3.0.8': + resolution: {integrity: sha512-iqMC4/YlFCSlO8+2Ii1GGGliCAY4XdeG748w5vQUbevlbDu0zSjH/+jojorQVBK/se0j6DUFNPBGSqD3YWYnDw==} + + '@types/d3@7.4.3': + resolution: {integrity: sha512-lZXZ9ckh5R8uiFVt8ogUNf+pIrK4EsWrx2Np75WvF/eTpJ0FMHNhjXk8CKEx/+gpHbNQyJWehbFaTvqmHWB3ww==} + + '@types/deep-eql@4.0.2': + resolution: {integrity: sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==} + + '@types/eslint@8.56.12': + resolution: {integrity: sha512-03ruubjWyOHlmljCVoxSuNDdmfZDzsrrz0P2LeJsOXr+ZwFQ+0yQIwNCwt/GYhV7Z31fgtXJTAEs+FYlEL851g==} + + '@types/estree@1.0.6': + resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==} + + '@types/estree@1.0.9': + resolution: {integrity: sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==} + + '@types/event-emitter@0.3.5': + resolution: {integrity: sha512-zx2/Gg0Eg7gwEiOIIh5w9TrhKKTeQh7CPCOPNc0el4pLSwzebA8SmnHwZs2dWlLONvyulykSwGSQxQHLhjGLvQ==} + + '@types/geojson@7946.0.14': + resolution: {integrity: sha512-WCfD5Ht3ZesJUsONdhvm84dmzWOiOzOAqOncN0++w0lBw1o8OuDNJF2McvvCef/yBqb/HYRahp1BYtODFQ8bRg==} + + '@types/json-schema@7.0.15': + resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} + + '@types/jsoneditor@9.9.6': + resolution: {integrity: sha512-SJ29nWBIhnhtU5n72wxhPiuUVd8cnDHd7ZYMqVkzWtdRxTUdS8+oy1pg66yhmM1kcuanX3xmAAKfcyhhBnHEjQ==} + + '@types/lodash-es@4.17.12': + resolution: {integrity: sha512-0NgftHUcV4v34VhXm8QBSftKVXtbkBG3ViCjs6+eJ5a6y6Mi/jiFGPc1sC7QK+9BFhWrURE3EOggmWaSxL9OzQ==} + + '@types/lodash@4.17.13': + resolution: {integrity: sha512-lfx+dftrEZcdBPczf9d0Qv0x+j/rfNCMuC6OcfXmO8gkfeNAY88PgKUbvG56whcN23gc27yenwF6oJZXGFpYxg==} + + '@types/lodash@4.17.25': + resolution: {integrity: sha512-+K1NIO8I+F9/wNulfVvu23QYd0Pe9/OCqRrim4NoYIf1VoEDL90Ve4ClzpyqBLc7NpGGWRvYNCKZ1BE/Jpf8dQ==} + + '@types/node@10.17.60': + resolution: {integrity: sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==} + + '@types/node@20.19.43': + resolution: {integrity: sha512-6oYBAi5ikg4Pl+kGsoYtawUMBT2zZMCvPNF7pVLnHZfd1zf38DRiWn/gT01RYCdUqkv7Fhr+C9ot4/tb+2sVvA==} + + '@types/nprogress@0.2.3': + resolution: {integrity: sha512-k7kRA033QNtC+gLc4VPlfnue58CM1iQLgn1IMAU8VPHGOj7oIHPp9UlhedEnD/Gl8evoCjwkZjlBORtZ3JByUA==} + + '@types/qrcode@1.5.5': + resolution: {integrity: sha512-CdfBi/e3Qk+3Z/fXYShipBT13OJ2fDO2Q2w5CIP5anLTLIndQG9z6P1cnm+8zCWSpm5dnxMFd/uREtb0EXuQzg==} + + '@types/qs@6.15.1': + resolution: {integrity: sha512-GZHUBZR9hckSUhrxmp1nG6NwdpM9fCunJwyThLW1X3AyHgd9IlHb6VANpQQqDr2o/qQp6McZ3y/IA2rVzKzSbw==} + + '@types/retry@0.12.2': + resolution: {integrity: sha512-XISRgDJ2Tc5q4TRqvgJtzsRkFYNJzZrhTdtMoGVBttwzzQJkPnS3WWTFc7kuDRoPtPakl+T+OfdEUjYJj7Jbow==} + + '@types/semver@7.5.8': + resolution: {integrity: sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==} + + '@types/trusted-types@2.0.7': + resolution: {integrity: sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==} + + '@types/video.js@7.3.58': + resolution: {integrity: sha512-1CQjuSrgbv1/dhmcfQ83eVyYbvGyqhTvb2Opxr0QCV+iJ4J6/J+XWQ3Om59WiwCd1MN3rDUHasx5XRrpUtewYQ==} + + '@types/web-bluetooth@0.0.20': + resolution: {integrity: sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow==} + + '@types/web-bluetooth@0.0.21': + resolution: {integrity: sha512-oIQLCGWtcFZy2JW77j9k8nHzAOpqMHLQejDA48XXMWH6tjCQHz5RCFz1bzsmROyL6PUm+LLnUiI4BCn221inxA==} + + '@typescript-eslint/eslint-plugin@7.18.0': + resolution: {integrity: sha512-94EQTWZ40mzBc42ATNIBimBEDltSJ9RQHCC8vc/PDbxi4k8dVwUAv4o98dk50M1zB+JGFxp43FP7f8+FP8R6Sw==} + engines: {node: ^18.18.0 || >=20.0.0} + peerDependencies: + '@typescript-eslint/parser': ^7.0.0 + eslint: ^8.56.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + '@typescript-eslint/parser@6.21.0': + resolution: {integrity: sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + '@typescript-eslint/parser@7.18.0': + resolution: {integrity: sha512-4Z+L8I2OqhZV8qA132M4wNL30ypZGYOQVBfMgxDH/K5UX0PNqTu1c6za9ST5r9+tavvHiTWmBnKzpCJ/GlVFtg==} + engines: {node: ^18.18.0 || >=20.0.0} + peerDependencies: + eslint: ^8.56.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + '@typescript-eslint/project-service@8.72.0': + resolution: {integrity: sha512-bzHngBbmIgzj6TsTjVUCntGx6FFLgE7mPjpO0PzHycOaZHXqS43XnrkFIHRS16LLr/xO6FHSXG3GJFo/F4bSBQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '>=4.8.4 <6.1.0' + + '@typescript-eslint/scope-manager@6.21.0': + resolution: {integrity: sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg==} + engines: {node: ^16.0.0 || >=18.0.0} + + '@typescript-eslint/scope-manager@7.18.0': + resolution: {integrity: sha512-jjhdIE/FPF2B7Z1uzc6i3oWKbGcHb87Qw7AWj6jmEqNOfDFbJWtjt/XfwCpvNkpGWlcJaog5vTR+VV8+w9JflA==} + engines: {node: ^18.18.0 || >=20.0.0} + + '@typescript-eslint/scope-manager@8.26.1': + resolution: {integrity: sha512-6EIvbE5cNER8sqBu6V7+KeMZIC1664d2Yjt+B9EWUXrsyWpxx4lEZrmvxgSKRC6gX+efDL/UY9OpPZ267io3mg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@typescript-eslint/scope-manager@8.72.0': + resolution: {integrity: sha512-JewPyJOYcXBSAS7PIgufscHOwZqhTGyBRiQJhhuDln66tMchxvvt7nJ90JKKIoOelmdHA3kAQbm9cEUHc4JSEA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@typescript-eslint/tsconfig-utils@8.72.0': + resolution: {integrity: sha512-0vbxCf7xLVPSjcOdm6eQbgViH8EDJ8xnl1laLT9yoqSz2YmcSfSg5Vdl0JUvZf6rcuJ0ZivJIuMD4edTg8obaA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '>=4.8.4 <6.1.0' + + '@typescript-eslint/type-utils@7.18.0': + resolution: {integrity: sha512-XL0FJXuCLaDuX2sYqZUUSOJ2sG5/i1AAze+axqmLnSkNEVMVYLF+cbwlB2w8D1tinFuSikHmFta+P+HOofrLeA==} + engines: {node: ^18.18.0 || >=20.0.0} + peerDependencies: + eslint: ^8.56.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + '@typescript-eslint/types@6.21.0': + resolution: {integrity: sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg==} + engines: {node: ^16.0.0 || >=18.0.0} + + '@typescript-eslint/types@7.18.0': + resolution: {integrity: sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ==} + engines: {node: ^18.18.0 || >=20.0.0} + + '@typescript-eslint/types@8.26.1': + resolution: {integrity: sha512-n4THUQW27VmQMx+3P+B0Yptl7ydfceUj4ON/AQILAASwgYdZ/2dhfymRMh5egRUrvK5lSmaOm77Ry+lmXPOgBQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@typescript-eslint/types@8.72.0': + resolution: {integrity: sha512-Adfoy59kxNEjT5E5fnyrp7GpHYuWs8ONbdohu4ez6IU46qDq8LltG90tLmkucZB2uhYL8mqBjtXqGd8yhfjXqQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@typescript-eslint/typescript-estree@6.21.0': + resolution: {integrity: sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + '@typescript-eslint/typescript-estree@7.18.0': + resolution: {integrity: sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA==} + engines: {node: ^18.18.0 || >=20.0.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + '@typescript-eslint/typescript-estree@8.26.1': + resolution: {integrity: sha512-yUwPpUHDgdrv1QJ7YQal3cMVBGWfnuCdKbXw1yyjArax3353rEJP1ZA+4F8nOlQ3RfS2hUN/wze3nlY+ZOhvoA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '>=4.8.4 <5.9.0' + + '@typescript-eslint/typescript-estree@8.72.0': + resolution: {integrity: sha512-gwLfFgWcw15tN2KXDCJvxEOQjPn+P3j/n3eSqkZ5sX4VpW9Cosodr+tWwBZRvJT3TcKx6HnPRGZMCNAiP1Xhug==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '>=4.8.4 <6.1.0' + + '@typescript-eslint/utils@6.21.0': + resolution: {integrity: sha512-NfWVaC8HP9T8cbKQxHcsJBY5YE1O33+jpMwN45qzWWaPDZgLIbo12toGMWnmhvCpd3sIxkpDw3Wv1B3dYrbDQQ==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + + '@typescript-eslint/utils@7.18.0': + resolution: {integrity: sha512-kK0/rNa2j74XuHVcoCZxdFBMF+aq/vH83CXAOHieC+2Gis4mF8jJXT5eAfyD3K0sAxtPuwxaIOIOvhwzVDt/kw==} + engines: {node: ^18.18.0 || >=20.0.0} + peerDependencies: + eslint: ^8.56.0 + + '@typescript-eslint/utils@8.26.1': + resolution: {integrity: sha512-V4Urxa/XtSUroUrnI7q6yUTD3hDtfJ2jzVfeT3VK0ciizfK2q/zGC0iDh1lFMUZR8cImRrep6/q0xd/1ZGPQpg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <5.9.0' + + '@typescript-eslint/visitor-keys@6.21.0': + resolution: {integrity: sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==} + engines: {node: ^16.0.0 || >=18.0.0} + + '@typescript-eslint/visitor-keys@7.18.0': + resolution: {integrity: sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==} + engines: {node: ^18.18.0 || >=20.0.0} + + '@typescript-eslint/visitor-keys@8.26.1': + resolution: {integrity: sha512-AjOC3zfnxd6S4Eiy3jwktJPclqhFHNyd8L6Gycf9WUPoKZpgM5PjkxY1X7uSy61xVpiJDhhk7XT2NVsN3ALTWg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@typescript-eslint/visitor-keys@8.72.0': + resolution: {integrity: sha512-E2mroviasaWecDzTGiGMtuEguuLVOeRggnrIn93CJuxYJzQBHbyymlT08aVQydbBal5538o+JkBKXh2sRuCyIA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@ungap/structured-clone@1.2.0': + resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} + + '@unocss/autocomplete@66.11.0': + resolution: {integrity: sha512-+lxwoW2J8iLfBJkjb1eEzamhWAtrsEEUaiGbdOyl5IQN8CekigUfFJ8UVlJklCVaRyiK1RbIvVWK+SC/kBUkvg==} + + '@unocss/cli@66.11.0': + resolution: {integrity: sha512-OUviuT/PTYIUxbkD7VUhbQgEtEFz4OBfWLAQNP6j0bN6B2YPxY+ejshVWHRP0n8flZfWtUOPJR/Q+inKkKiZaA==} + hasBin: true + + '@unocss/config@0.57.7': + resolution: {integrity: sha512-UG8G9orWEdk/vyDvGUToXYn/RZy/Qjpx66pLsaf5wQK37hkYsBoReAU5v8Ia/6PL1ueJlkcNXLaNpN6/yVoJvg==} + engines: {node: '>=14'} + + '@unocss/config@66.1.0-beta.5': + resolution: {integrity: sha512-RBty/CVvdefTpeLmluQrIQIj+Po5bTIgIgcWgw+A3dMcUN3iRv0mYbw1d3FIRa0Ladx9zKaMxRFss0xkiS13yw==} + engines: {node: '>=14'} + + '@unocss/config@66.11.0': + resolution: {integrity: sha512-ohpkpfN4GAY7itfDJmeKH+KFbAUoKOVRa3ChJLvUgMPFcpnwjxhDB0ePREqTe60K6kL6AblrcfSW2Vs46z9bGQ==} + + '@unocss/core@0.57.7': + resolution: {integrity: sha512-1d36M0CV3yC80J0pqOa5rH1BX6g2iZdtKmIb3oSBN4AWnMCSrrJEPBrUikyMq2TEQTrYWJIVDzv5A9hBUat3TA==} + + '@unocss/core@66.1.0-beta.5': + resolution: {integrity: sha512-1kZzSrB87KKd+xP+vMN7IP03j2UPEykna447aw3UaK5RYTDd/LuVtxoep6gvjN9TJiB4K+Qx0sAtgnfhPpka9Q==} + + '@unocss/core@66.11.0': + resolution: {integrity: sha512-eDMgNWF0LnpNQJXiBEofsAbh2EusQjkVDefBC526U5vOqRwMmqNuYs32rvUwYxf4O/ryIEgFJQAvDv+JpwfSKg==} + + '@unocss/eslint-config@0.57.7': + resolution: {integrity: sha512-EJlI6rV0ZfDCphIiddHSWZVeoHdYDTVohVXGo+NfNOuRuvYWGna3n4hY3VEAiT3mWLK0/0anzHF7X0PNzCR5lQ==} + engines: {node: '>=14'} + + '@unocss/eslint-plugin@0.57.7': + resolution: {integrity: sha512-nwj7UJF7wCfPVl5B7cUB0xrSk6yuVMdMgABnsy4N5xBlds8cclrUO+boaTB9qzh8Lg9nfJVLB3+cW3po2SJoew==} + engines: {node: '>=14'} + + '@unocss/eslint-plugin@66.1.0-beta.5': + resolution: {integrity: sha512-5BRXjE8XJ9Yrf/lmgBCCmpfXRfiaebdS0zhkbmsFJmtXzhhun0epIF2cs/nXIya9rtvne+YKUAPXxIIoHV3lKA==} + engines: {node: '>=14'} + + '@unocss/extractor-arbitrary-variants@66.11.0': + resolution: {integrity: sha512-lYr95OSbeE+3q4P3ACkBA1PBSFT82k827DTo31/2OaMryzE2s9NQVdHRZ2XslHDmyC8eeuddx8I1Cq+cN960Pw==} + + '@unocss/inspector@66.11.0': + resolution: {integrity: sha512-1l+2DzlOEUp1uwI/IQK+YYoqUNOo2aq1opaOExyQlsEphSsIVZeZ9MWf+RUwtUACkkm05729aubvkpV0VydyNw==} + + '@unocss/language-server@66.11.0': + resolution: {integrity: sha512-h7P1f6QID4qAiXiuXGCtcCi+jnlXg1TaJAMpc5ISIBI59H/XtmMBg47TpsY+u/1vXREcNKsKYIR/MUO0E5Y92g==} + hasBin: true + + '@unocss/preset-attributify@66.11.0': + resolution: {integrity: sha512-A6oeH14qMdgQCxPZmIFYgZfSEC555K8Izvc3U6iLl+3k3qsIgRsiqxcS8U+o6Qwk8QXu0E+phUpzHLddTa2jUA==} + + '@unocss/preset-icons@66.11.0': + resolution: {integrity: sha512-MldI3Bi6IgQWaFJ8MtMOEqXx/sveuf+kko8yNEgpa/PpNj1lHsndcJTWP+VGK7PxnHsj/3cqzmdoh2qJhkgs6Q==} + + '@unocss/preset-mini@66.11.0': + resolution: {integrity: sha512-MtzRKtK07OLhMph2dj+YFIhIxjS5WQ9N0I8btBJ7+rsrN/IISo538S8s4Pf3usCSg3ALCN4KX/GRBRx47PS2pQ==} + + '@unocss/preset-tagify@66.11.0': + resolution: {integrity: sha512-6PcgSVd2eKblMZX/YjaFtpyS0dRX/ZUbWamTlgDRhnf6j2nfA5DQHU3BZJNeUr83oXullDxFflPwpfGrV1aOxA==} + + '@unocss/preset-typography@66.11.0': + resolution: {integrity: sha512-s/xbtXG1f0E0n288m2gtxN3GcNMoHPNZZk1Qud60MlZzAtdXVE4G01GRPnUjhUa2xlSHDReJV3ewufrQWyyh+w==} + + '@unocss/preset-uno@66.11.0': + resolution: {integrity: sha512-7Mbelwsvg/qxPGZ9ePzLzn3qwyouck+BeM2SS90OR1MXIoFxobl80FRRCjg+XgCU8RkaBiyyTy1mUdqUjobp8Q==} + + '@unocss/preset-web-fonts@66.11.0': + resolution: {integrity: sha512-x205P3DAMiEIp1bh3KNvo8Hs13fC7r8LJ1mq8YFzAPlOZ5ejiv7/8WkihOba4Zf07FPHUjFDXNX9VPpeIjdMIA==} + + '@unocss/preset-wind3@66.11.0': + resolution: {integrity: sha512-TD0nZjOfPmkLuR0Ax9SEBzCE8F5oKCMBWRqgEcfoSBPRDFfuyM/2BQEsdlbNRJ5JPe97fYFe8tmS64VNXZmgSg==} + + '@unocss/preset-wind4@66.11.0': + resolution: {integrity: sha512-ETXP3l0z8ceI1xPEhNld0ihYAH6y6tKmHlG/D37MmWSA1eQoSZoNriWed/eo9leQVkV5sP7j85DXBG/oAffbQg==} + + '@unocss/preset-wind@66.11.0': + resolution: {integrity: sha512-LBDVrr/YWrQ8vT0bSJlLCINFEg6loSUMlFFM2e8R45NJ5SGlxPz534nOrAbunsewu1bIcqXMZTvhKW6pXS/Rbw==} + + '@unocss/rollup@66.11.0': + resolution: {integrity: sha512-8/EkVkJUHTH27f6oNtMT22FPSl+edNpFGTYYgpF9N+CCUcMKCGTuifF0Svb72ILOpTCKhq+PP3/HPMfb5faI3A==} + peerDependencies: + rolldown: ^1.0.0 + rollup: 4.65.0 + peerDependenciesMeta: + rolldown: + optional: true + rollup: + optional: true + + '@unocss/rule-utils@66.1.0-beta.5': + resolution: {integrity: sha512-G757sAnQAMNRUijgOTut8UkbkncSablI6Viwcq2VP4r0Lhi6RFOv/n6AOTWsDgGeUSuWTa/p3zb3NDHY7ztE9g==} + engines: {node: '>=14'} + + '@unocss/rule-utils@66.11.0': + resolution: {integrity: sha512-QW7B4whiR9x6m7FHEdsDuObFY9lbuoZunVoTvmZZDNSN/GNmdDNzMNmeCSLq1+QeEvz1ac5LnxRXdQzcrQ2MVg==} + + '@unocss/transformer-attributify-jsx@66.11.0': + resolution: {integrity: sha512-V0U6qSuKIilm2IzozdY2ipMgToFJ1SGjCbBdoEIthwzfZ0VvuO7pSy/EPtkW5MiFFISHBA9UMfqSvR3IH1YHyA==} + + '@unocss/transformer-compile-class@66.11.0': + resolution: {integrity: sha512-/o7x70nSHZC210fZ900PvVowLSg0dPk55WBFMzpiXVm5o/SBWJT/fAaSvmdjKz1xEoLbqjJzgbHtTfY4PB99+A==} + + '@unocss/transformer-directives@66.11.0': + resolution: {integrity: sha512-6D6NOA67nk7FH1QsUE3Xb/93Mocwbgqos6LoxdmeO8c3D1Z/fNaJR3rH6z8KH0QXemNciGO0HUCPSjsOR0x1Dg==} + + '@unocss/transformer-variant-group@66.11.0': + resolution: {integrity: sha512-4djiS1UPG6GfA5MDjGurLnYaUHLAaKWl1N7BbDgqXrBWnnKTHobB7fe3MJX94DT7AzmLFjrW5SddeGm4vEh4gw==} + + '@unocss/vite@66.11.0': + resolution: {integrity: sha512-1kfKcuF8bAAf+ZDkvCYsDhAfAz+vM6d5SjntabPSrsv7O1h7++r93Nw/gOE30nrITKZ1UynLE0yXO0GQ2zmrkg==} + peerDependencies: + vite: ^5.0.0-0 || ^6.0.0-0 || ^7.0.0-0 || ^8.0.0-0 + + '@uppy/companion-client@5.1.1': + resolution: {integrity: sha512-DzrOWTbIZHvtgAFXBMYHk2wD27NjpBSVhY2tEiEIUhPd2CxbFRZjHM/N3HOt3VwZEAP471QWFLlJRWPcIY3A2Q==} + peerDependencies: + '@uppy/core': ^5.1.1 + + '@uppy/core@5.0.0': + resolution: {integrity: sha512-UfpissvsoT0/tZJCsqLMEjFUEmLtx4wfKI4NHrHY6jLBdbe/YEmGe3OyeATK3n9yLFppwqtrOEDOpR4AodyCww==} + + '@uppy/store-default@5.0.0': + resolution: {integrity: sha512-hQtCSQ1yGiaval/wVYUWquYGDJ+bpQ7e4FhUUAsRQz1x1K+o7NBtjfp63O9I4Ks1WRoKunpkarZ+as09l02cPw==} + + '@uppy/utils@7.2.0': + resolution: {integrity: sha512-6lC246qszMv6bTyl/+QyHwrudgeguWkA94ME1wHn+a6uRAvmtAEaUManIfGqTJfoKvWAiCJqdJPl5xRJjhAloQ==} + + '@uppy/xhr-upload@5.2.0': + resolution: {integrity: sha512-3LV/X5Of6BINnKplP+CwUJ0a4/7cRFfzxwGyXnW+uCrNQHoo09dttcz3begWHejGvzenQHuUnMO3Fxyc71Pryg==} + peerDependencies: + '@uppy/core': ^5.2.0 + + '@videojs-player/vue@1.0.0': + resolution: {integrity: sha512-WonTezRfKu3fYdQLt/ta+nuKH6gMZUv8l40Jke/j4Lae7IqeO/+lLAmBnh3ni88bwR+vkFXIlZ2Ci7VKInIYJg==} + peerDependencies: + '@types/video.js': 7.x + video.js: 7.x + vue: 3.x + + '@videojs/http-streaming@2.16.3': + resolution: {integrity: sha512-91CJv5PnFBzNBvyEjt+9cPzTK/xoVixARj2g7ZAvItA+5bx8VKdk5RxCz/PP2kdzz9W+NiDUMPkdmTsosmy69Q==} + engines: {node: '>=8', npm: '>=5'} + peerDependencies: + video.js: ^6 || ^7 + + '@videojs/vhs-utils@3.0.5': + resolution: {integrity: sha512-PKVgdo8/GReqdx512F+ombhS+Bzogiofy1LgAj4tN8PfdBx3HSS7V5WfJotKTqtOWGwVfSWsrYN/t09/DSryrw==} + engines: {node: '>=8', npm: '>=5'} + + '@videojs/xhr@2.6.0': + resolution: {integrity: sha512-7J361GiN1tXpm+gd0xz2QWr3xNWBE+rytvo8J3KuggFaLg+U37gZQ2BuPLcnkfGffy2e+ozY70RHC8jt7zjA6Q==} + + '@vitejs/plugin-vue-jsx@5.1.6': + resolution: {integrity: sha512-YXvi4as2clxt6DFw5+a0tTA97ntiQXm/raR8ofNj3aNwwdlVGTiG2gp7EvfZW17P50acL/9bP0ccF4XnqNmlgA==} + engines: {node: ^20.19.0 || >=22.12.0} + peerDependencies: + vite: ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 + vue: ^3.0.0 + + '@vitejs/plugin-vue@6.0.10': + resolution: {integrity: sha512-b80aUQh3n+qEzzZm5oQp3rT2QImeCx58K6eFl/RkJ3d65KW0kTuv5lNsLRVAjbW9YRUpo/wzmvzMgV34bTAItA==} + engines: {node: ^20.19.0 || >=22.12.0} + peerDependencies: + vite: ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 + vue: ^3.2.25 || ^3.6.0-rc.10 + + '@vitest/coverage-v8@4.1.12': + resolution: {integrity: sha512-6S7/iVknKglLAxMFxQGNppBI0iqJS2NgM6FBxavitj7KaDq/vywOWGf6dGu7F2L1Qy0G6S3uTp7aGshHrzK8JA==} + peerDependencies: + '@vitest/browser': 4.1.12 + vitest: 4.1.12 + peerDependenciesMeta: + '@vitest/browser': + optional: true + + '@vitest/expect@4.1.12': + resolution: {integrity: sha512-vFlTt+YEu9WBpNjdGayNmlMVzrWPi1+sv853/7t2FU7hpO5gAFBKHzQmkCq5Xjpr+evegF2994LQT3hF3mRlqQ==} + + '@vitest/mocker@4.1.12': + resolution: {integrity: sha512-fKShNpKZzupWZuY0z7egydvL0sqW4INEZBEExMBMAa6izlENEVHwoXgdaTCaBZ5fwlr4xf2o1wXC83n9RpO+NA==} + peerDependencies: + msw: ^2.4.9 + vite: ^6.0.0 || ^7.0.0 || ^8.0.0 + peerDependenciesMeta: + msw: + optional: true + vite: + optional: true + + '@vitest/pretty-format@4.1.12': + resolution: {integrity: sha512-XW9O8+Mxx4VpCtkYdMJLZQQwsVryP9wk7cPKDxtXFfwSak6yRh5+2fep/Y0XF/ElBvJHq8bcYdi6aeuai0opZA==} + + '@vitest/runner@4.1.12': + resolution: {integrity: sha512-NKlVKCr5QnCe8jijdMnmkpHHU+WTqiLFR6G0pHji9uRjXK9xJl1k1nTw6F3pOOj2PDcsDt2GKQMI7wIsaT491w==} + + '@vitest/snapshot@4.1.12': + resolution: {integrity: sha512-ko1y1Qgb/slzQ9mr+b89Cuqud8WG1TKtsPD8r7ZUBdvVOGt85Af2HwCqHujrhwJq95hs/9RM7fcAPg57o1vlzw==} + + '@vitest/spy@4.1.12': + resolution: {integrity: sha512-RGq9x4JNGNTZHEJxvN0oSiJjeSCExm0n2gZKKJZHY9cX5AVA6M7VJILBT3ZJ/tJ/0J9uWT7fETV9/btoi//vSg==} + + '@vitest/utils@4.1.12': + resolution: {integrity: sha512-Q3awXrwOfEV+qc3WmO5ONyE0yO7Q1gQ9/oyHxGLZ/pl7N3NO/ZztqQwKLuwMkV+CA1JYSIeO3gkHnRDIo4AVaA==} + + '@volar/language-core@1.0.24': + resolution: {integrity: sha512-vTN+alJiWwK0Pax6POqrmevbtFW2dXhjwWiW/MW4f48eDYPLdyURWcr8TixO7EN/nHsUBj2udT7igFKPtjyAKg==} + + '@volar/language-core@1.11.1': + resolution: {integrity: sha512-dOcNn3i9GgZAcJt43wuaEykSluAuOkQgzni1cuxLxTV0nJKanQztp7FxyswdRILaKH+P2XZMPRp2S4MV/pElCw==} + + '@volar/source-map@1.0.24': + resolution: {integrity: sha512-Qsv/tkplx18pgBr8lKAbM1vcDqgkGKQzbChg6NW+v0CZc3G7FLmK+WrqEPzKlN7Cwdc6XVL559Nod8WKAfKr4A==} + + '@volar/source-map@1.11.1': + resolution: {integrity: sha512-hJnOnwZ4+WT5iupLRnuzbULZ42L7BWWPMmruzwtLhJfpDVoZLjNBxHDi2sY2bgZXCKlpU5XcsMFoYrsQmPhfZg==} + + '@volar/typescript@1.0.24': + resolution: {integrity: sha512-f8hCSk+PfKR1/RQHxZ79V1NpDImHoivqoizK+mstphm25tn/YJ/JnKNjZHB+o21fuW0yKlI26NV3jkVb2Cc/7A==} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + '@volar/typescript@1.11.1': + resolution: {integrity: sha512-iU+t2mas/4lYierSnoFOeRFQUhAEMgsFuQxoxvwn5EdQopw43j+J27a4lt9LMInx1gLJBC6qL14WYGlgymaSMQ==} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + '@volar/vue-language-core@1.0.24': + resolution: {integrity: sha512-2NTJzSgrwKu6uYwPqLiTMuAzi7fAY3yFy5PJ255bGJc82If0Xr+cW8pC80vpjG0D/aVLmlwAdO4+Ya2BI8GdDg==} + + '@volar/vue-typescript@1.0.24': + resolution: {integrity: sha512-9a25oHDvGaNC0okRS47uqJI6FxY4hUQZUsxeOUFHcqVxZEv8s17LPuP/pMMXyz7jPygrZubB/qXqHY5jEu/akA==} + deprecated: 'WARNING: This project has been renamed to @vue/typescript. Install using @vue/typescript instead.' + + '@vue/babel-helper-vue-transform-on@2.0.1': + resolution: {integrity: sha512-uZ66EaFbnnZSYqYEyplWvn46GhZ1KuYSThdT68p+am7MgBNbQ3hphTL9L+xSIsWkdktwhPYLwPgVWqo96jDdRA==} + + '@vue/babel-plugin-jsx@2.0.1': + resolution: {integrity: sha512-a8CaLQjD/s4PVdhrLD/zT574ZNPnZBOY+IhdtKWRB4HRZ0I2tXBi5ne7d9eCfaYwp5gU5+4KIyFTV1W1YL9xZA==} + peerDependencies: + '@babel/core': ^7.29.1 + peerDependenciesMeta: + '@babel/core': + optional: true + + '@vue/babel-plugin-resolve-type@2.0.1': + resolution: {integrity: sha512-ybwgIuRGRRBhOU37GImDoWQoz+TlSqap65qVI6iwg/J7FfLTLmMf97TS7xQH9I7Qtr/gp161kYVdhr1ZMraSYQ==} + peerDependencies: + '@babel/core': ^7.29.1 + + '@vue/compiler-core@3.5.13': + resolution: {integrity: sha512-oOdAkwqUfW1WqpwSYJce06wvt6HljgY3fGeM9NcVA1HaYOij3mZG9Rkysn0OHuyUAGMbEbARIpsG+LPVlBJ5/Q==} + + '@vue/compiler-core@3.5.44': + resolution: {integrity: sha512-k34nCytbK8PQ1gR2mGROYOw6Pnv/mumqIdrZ3x2tbyXZDWm7ViKGLTfdB+DRrWqEQsLgGJvn0WN9jBif5zCTLQ==} + + '@vue/compiler-dom@3.5.13': + resolution: {integrity: sha512-ZOJ46sMOKUjO3e94wPdCzQ6P1Lx/vhp2RSvfaab88Ajexs0AHeV0uasYhi99WPaogmBlRHNRuly8xV75cNTMDA==} + + '@vue/compiler-dom@3.5.44': + resolution: {integrity: sha512-W5AoBFWdw1lQAKiHowkfgFKFab82oSRT6sGsPfw/q1GRjsy/ZJFLHGhJyBRIFN9APLTUduDH9U2JAiPOIyKuYg==} + + '@vue/compiler-sfc@3.5.13': + resolution: {integrity: sha512-6VdaljMpD82w6c2749Zhf5T9u5uLBWKnVue6XWxprDobftnletJ8+oel7sexFfM3qIxNmVE7LSFGTpv6obNyaQ==} + + '@vue/compiler-sfc@3.5.44': + resolution: {integrity: sha512-dzHmQ4jXTpdr5FjIQUeykVakN/uzqFbUo9/C5ikBFg3a3PeM6uRxeczx1ZbXBML0/zJstEh3ygYipzR5Z7b2Pw==} + + '@vue/compiler-ssr@3.5.13': + resolution: {integrity: sha512-wMH6vrYHxQl/IybKJagqbquvxpWCuVYpoUJfCqFZwa/JY1GdATAQ+TgVtgrwwMZ0D07QhA99rs/EAAWfvG6KpA==} + + '@vue/compiler-ssr@3.5.44': + resolution: {integrity: sha512-xr5gb1JVHlfXJwSlRz1FeP6uxoazdzHuMTVLE7up+4Vrqxk219CvxLPxD9NXBt47yvZW7+p4DXfyp4O1fkByIA==} + + '@vue/devtools-api@6.6.4': + resolution: {integrity: sha512-sGhTPMuXqZ1rVOk32RylztWkfXTRhuS7vgAKv0zjqk8gbsHkJ7xfFf+jbySxt7tWObEJwyKaHMikV/WGDiQm8g==} + + '@vue/language-core@1.8.27': + resolution: {integrity: sha512-L8Kc27VdQserNaCUNiSFdDl9LWT24ly8Hpwf1ECy3aFb9m6bDhBGQYOujDm21N7EW3moKIOKEanQwe1q5BK+mA==} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + '@vue/reactivity@3.5.12': + resolution: {integrity: sha512-UzaN3Da7xnJXdz4Okb/BGbAaomRHc3RdoWqTzlvd9+WBR5m3J39J1fGcHes7U3za0ruYn/iYy/a1euhMEHvTAg==} + + '@vue/reactivity@3.5.44': + resolution: {integrity: sha512-u+QJdKeBBEADkPdevsL+6E12QlYVfBD8Zcw5qjDQKtamI6l14KyqazJMobhCKelhWN5zpyKUiEDoTyHE93cqWw==} + + '@vue/runtime-core@3.5.44': + resolution: {integrity: sha512-uEa/ndwjhrrhnOfb2p+sZy6zeoamJOISqaLSJGk/8R6nABT1ZldpzcJoPzKj+zHVomVBPcmQYyC2r4LtvDV6CQ==} + + '@vue/runtime-dom@3.5.44': + resolution: {integrity: sha512-3fc4ARcXVhVBaJ3ujWiNZJARD6pkyRcwG+ZYhMzjKtKUp7MAY0HLwr7r3Smep3Li6ZaWT6ewdmx8XqdaD5oNZg==} + + '@vue/server-renderer@3.5.44': + resolution: {integrity: sha512-R4S1UoH4h5Frrauv8Z5XE5TxV9oBiUSgWIC4TyVK1FK+RocRnOLwFA5Xcmo2011RlgJp+AbZCnw6afrhlgRuUQ==} + + '@vue/shared@3.5.12': + resolution: {integrity: sha512-L2RPSAwUFbgZH20etwrXyVyCBu9OxRSi8T/38QsvnkJyvq2LufW2lDCOzm7t/U9C1mkhJGWYfCuFBCmIuNivrg==} + + '@vue/shared@3.5.13': + resolution: {integrity: sha512-/hnE/qP5ZoGpol0a5mDi45bOd7t3tjYJBjsgCsivow7D48cJeV5l05RD82lPqi7gRiphZM37rnhW1l6ZoCNNnQ==} + + '@vue/shared@3.5.44': + resolution: {integrity: sha512-H82XLH0DjmSOdbEwO15x3QTo1f5PWEtv237eLpYKc0mqLu+B8hnq16lFWmuBmNurkeiG3wr+oM1FhOll/YVFRg==} + + '@vue/test-utils@2.5.1': + resolution: {integrity: sha512-V/4a99odJ7hapr0bRt35XxljGk8hefq31gSOnlKTcEq2fUeoj2qb+FcpJYfQu4qfYhW9Ug+O2+CZ3QmZ7gXDzA==} + peerDependencies: + '@vue/compiler-dom': 3.x + '@vue/server-renderer': 3.x + vue: 3.x + peerDependenciesMeta: + '@vue/server-renderer': + optional: true + + '@vueuse/core@10.11.1': + resolution: {integrity: sha512-guoy26JQktXPcz+0n3GukWIy/JDNKti9v6VEMu6kV2sYBsWuGiTU8OWdg+ADfUbHg3/3DlqySDe7JmdHrktiww==} + + '@vueuse/core@14.4.0': + resolution: {integrity: sha512-X4WHz1HlCzCBoYXesUkifzzWBAcZgXG8Fi5iNPQg/epdzOB3gu8Fawj3hvuwYR1nGcXGnvxwYYcUC/71++svtQ==} + peerDependencies: + vue: ^3.5.0 + + '@vueuse/metadata@10.11.1': + resolution: {integrity: sha512-IGa5FXd003Ug1qAZmyE8wF3sJ81xGLSqTqtQ6jaVfkeZ4i5kS2mwQF61yhVqojRnenVew5PldLyRgvdl4YYuSw==} + + '@vueuse/metadata@14.4.0': + resolution: {integrity: sha512-swx/255R6JyHZFJhx845iz5CRWDZdCfvkZOpACWc5+c5WHcG24mv8gUT1WIdFQaHt6dq79rvILd9QnCWiyVm9g==} + + '@vueuse/shared@10.11.1': + resolution: {integrity: sha512-LHpC8711VFZlDaYUXEBbFBCQ7GS3dVU9mjOhhMhXP6txTV4EhYQg/KGnQuvt/sPAtoUKq7VVUnL6mVtFoL42sA==} + + '@vueuse/shared@14.4.0': + resolution: {integrity: sha512-JRgY90Sz8DDtPMsaDflvPMp9xYk69JZAmbuDvAquUVXKr2gEjqtzGNTTthLfckH0BzBqvnu31gb4a8TGLRe79g==} + peerDependencies: + vue: ^3.5.0 + + '@wangeditor-next/basic-modules@3.0.3': + resolution: {integrity: sha512-Z+nBFCsgToh4Mx1zPX6QpIx4VJenuNXFQnEIoPbNR/b29gXEfL1Lnvj/sYDdq8tiLDxhryq175gvRlZyuwEq7w==} + peerDependencies: + '@wangeditor-next/core': '>=1.9.2' + dom7: ^3.0.0 || ^4.0.0 + lodash.throttle: ^4.1.1 + nanoid: ^5.1.16 + slate: ^0.124.0 + snabbdom: ^3.6.0 + + '@wangeditor-next/code-highlight@3.0.2': + resolution: {integrity: sha512-aeAh29f93GwHKnJ/xEjmHSDUfNrFSeo1V/HSF/9CF/7uH2wyRQjfORUA6xFjbAceKDGaPT7A2whp9B751apkvQ==} + peerDependencies: + '@wangeditor-next/core': '>=1.9.2' + dom7: ^3.0.0 || ^4.0.0 + slate: ^0.124.0 + snabbdom: ^3.6.0 + + '@wangeditor-next/core@1.9.5': + resolution: {integrity: sha512-HyTO+xzYq6Ocxf32tv0KUeViXvMzlVwUMxtozi8T9AEYUMD4xrGeFhjjYEsayk+caEBsF+RK/SIGnPghkdgCbA==} + peerDependencies: + '@uppy/core': ^2.1.1 || ^5.0.0 + '@uppy/xhr-upload': ^2.0.3 || ^5.0.0 + dom7: ^3.0.0 || ^4.0.0 + is-hotkey: ^0.2.0 + lodash.camelcase: ^4.3.0 + lodash.clonedeep: ^4.5.0 + lodash.debounce: ^4.0.8 + lodash.foreach: ^4.5.0 + lodash.throttle: ^4.1.1 + lodash.toarray: ^4.4.0 + nanoid: ^5.1.16 + slate: ^0.124.0 + snabbdom: ^3.6.0 + + '@wangeditor-next/editor-for-vue@5.1.14': + resolution: {integrity: sha512-Xkrdo590AhLHvzyR+U246t6T89nIWHz1weAgMuo8jEA2HS5RiUnsA4U6+iUGaQ2E5c8mYQaeNqzHQXUp9Okbiw==} + peerDependencies: + '@wangeditor-next/editor': '>=5.1.0' + vue: ^3.0.5 + + '@wangeditor-next/editor@5.7.16': + resolution: {integrity: sha512-RE+rrQtOUsxCy14g8C6x6HE26PKM50zwxMPqTJUuNuWpM2eihQGy5QEzKv47jhhEN0yJtwqgjGn3saxkkanBDg==} + + '@wangeditor-next/list-module@3.0.3': + resolution: {integrity: sha512-tvA6YRlUplO5ArwQ7Ya6/96eM5VY1KtaNWLcgfvItgQY9AU5wAgr9JbCPnYsivINQlNdRb04dL8cz5YO5K6EHg==} + peerDependencies: + '@wangeditor-next/core': '>=1.9.5' + dom7: ^3.0.0 || ^4.0.0 + slate: ^0.124.0 + snabbdom: ^3.6.0 + + '@wangeditor-next/plugin-mention@1.0.26': + resolution: {integrity: sha512-6H6G+Yk9kYg8KPYxtgMCbftBjs1f8nyjfQu5yoS6YQLASZhyaXRH4lSmIYrSooaJqtcJpHa/Nj08y+lfn+eUkA==} + peerDependencies: + '@wangeditor-next/editor': 5.6.56 + snabbdom: ^3.6.0 + + '@wangeditor-next/table-module@3.0.7': + resolution: {integrity: sha512-IXiXx88EOYND9gXtZqz2mTGkz5jZWaFFqTF1fXUNiOV2Bj33QI8eW09hVBHOT7Q4aFqpNg7roHKlATxRtTYh0A==} + peerDependencies: + '@wangeditor-next/core': '>=1.9.5' + dom7: ^3.0.0 || ^4.0.0 + lodash.debounce: ^4.0.8 + lodash.throttle: ^4.1.1 + nanoid: ^5.1.16 + slate: ^0.124.0 + snabbdom: ^3.6.0 + + '@wangeditor-next/upload-image-module@3.0.3': + resolution: {integrity: sha512-B45MGC+tc/FCUaGXPqSevwXqkkRik07A3LVGQNvfNluJ5NdSWiKLz+Sm+2CTXktpKM+5fBGFQNhMutmy0qjP3w==} + peerDependencies: + '@uppy/core': ^2.0.3 || ^5.0.0 + '@uppy/xhr-upload': ^2.0.3 || ^5.0.0 + '@wangeditor-next/basic-modules': 3.0.3 + '@wangeditor-next/core': '>=1.9.2' + dom7: ^3.0.0 || ^4.0.0 + lodash.foreach: ^4.5.0 + slate: ^0.124.0 + snabbdom: ^3.6.0 + + '@wangeditor-next/video-module@3.0.2': + resolution: {integrity: sha512-cWkedWMrmAiUwUB09BfheoUFE1mg+7fcNOnUjAE2pXNRunyr2US1reVBBaqBymO+bHcJxMCEfP0IclQT8ok13Q==} + peerDependencies: + '@uppy/core': ^2.1.4 || ^5.0.0 + '@uppy/xhr-upload': ^2.0.7 || ^5.0.0 + '@wangeditor-next/core': '>=1.9.2' + dom7: ^3.0.0 || ^4.0.0 + nanoid: ^5.1.16 + slate: ^0.124.0 + snabbdom: ^3.6.0 + + '@xmldom/xmldom@0.8.15': + resolution: {integrity: sha512-/5NV/vDALVFDXgLmfsy9TRCBlKwO2LNBFzpzvb9iIj+jR+eSc6DLYYvVOdivT/jm7MtU6TebYuRmzEOI7w40UA==} + engines: {node: '>=10.0.0'} + + '@zxcvbn-ts/core@3.0.4': + resolution: {integrity: sha512-aQeiT0F09FuJaAqNrxynlAwZ2mW/1MdXakKWNmGM1Qp/VaY6CnB/GfnMS2T8gB2231Esp1/maCWd8vTG4OuShw==} + + JSONStream@1.3.5: + resolution: {integrity: sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==} + hasBin: true + + abbrev@2.0.0: + resolution: {integrity: sha512-6/mh1E2u2YgEsCHdY0Yx5oW+61gZU+1vXaoiHHrpKeuRNNgFvS+/jrwHiQhB5apAf5oB7UB7E19ol2R2LKH8hQ==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + + abbrev@5.0.0: + resolution: {integrity: sha512-/XrFJgzQQQHpti1raDJC6m4ws6aNktmjBlhk8Fdlk7LwCEuDoieEJJY9OFHjfiFJFFRM2tK+Ky/IsfbbmlMu1w==} + engines: {node: ^22.22.2 || ^24.15.0 || >=26.0.0} + + ace-builds@1.39.1: + resolution: {integrity: sha512-HcJbBzx8qY66t9gZo/sQu7pi0wO/CFLdYn1LxQO1WQTfIkMfyc7LRnBpsp/oNCSSU/LL83jXHN1fqyOTuIhUjg==} + + acorn-jsx@5.3.2: + resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} + peerDependencies: + acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 + + acorn@8.14.0: + resolution: {integrity: sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==} + engines: {node: '>=0.4.0'} + hasBin: true + + acorn@8.19.0: + resolution: {integrity: sha512-oJlA3XiRm7Cyk6qFD2Jn8ak9B7jSy0qy00ADO3+8dpT0LSjFihQYv4C02LFCSYJV3Q37xYwwRy5m+IpIiUzqWw==} + engines: {node: '>=0.4.0'} + hasBin: true + + aes-decrypter@3.1.3: + resolution: {integrity: sha512-VkG9g4BbhMBy+N5/XodDeV6F02chEk9IpgRTq/0bS80y4dzy79VH2Gtms02VXomf3HmyRe3yyJYkJ990ns+d6A==} + + agent-base@6.0.2: + resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} + engines: {node: '>= 6.0.0'} + + agent-base@7.1.0: + resolution: {integrity: sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg==} + engines: {node: '>= 14'} + + agent-base@7.1.2: + resolution: {integrity: sha512-JVzqkCNRT+VfqzzgPWDPnwvDheSAUdiMUn3NoLXpDJF5lRqeJqyC9iGsAxIOAW+mzIdq+uP1TvcX6bMtrH0agg==} + engines: {node: '>= 14'} + + ajv@6.15.0: + resolution: {integrity: sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==} + + ajv@8.20.0: + resolution: {integrity: sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==} + + animate.css@4.1.1: + resolution: {integrity: sha512-+mRmCTv6SbCmtYJCN4faJMNFVNN5EuCTTprDTAo7YzIGji2KADmakjVA3+8mVDkZ2Bf09vayB35lSQIex2+QaQ==} + + ansi-escapes@7.0.0: + resolution: {integrity: sha512-GdYO7a61mR0fOlAsvC9/rIHf7L96sBc6dEWzeOu+KAea5bZyQRPIpojrVoI4AXGJS/ycu/fBTdLrUkA4ODrvjw==} + engines: {node: '>=18'} + + ansi-regex@2.1.1: + resolution: {integrity: sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==} + engines: {node: '>=0.10.0'} + + ansi-regex@5.0.1: + resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} + engines: {node: '>=8'} + + ansi-regex@6.4.0: + resolution: {integrity: sha512-KzTVk2tCWAHtYrvvvaP8bJKJq2pVinhLcGEQdtLIYPbmNGNyYe8QwNaTUYQp2J7/vIsUKt5QCqAfUkYyG9DkOw==} + engines: {node: '>=12'} + + ansi-styles@2.2.1: + resolution: {integrity: sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==} + engines: {node: '>=0.10.0'} + + ansi-styles@4.3.0: + resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} + engines: {node: '>=8'} + + ansi-styles@5.2.0: + resolution: {integrity: sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==} + engines: {node: '>=10'} + + ansi-styles@6.2.1: + resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==} + engines: {node: '>=12'} + + anymatch@3.1.3: + resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} + engines: {node: '>= 8'} + + anynum@1.0.1: + resolution: {integrity: sha512-N6//FLET/tXYNM/F6ABca1oH6fWB+KlTt909Le28WMDBk8oaT4vY17DCrwg2MvmuqUKt3Ni4N5dGJ/EoBgcO6A==} + + argparse@1.0.10: + resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} + + argparse@2.0.1: + resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} + + array-ify@1.0.0: + resolution: {integrity: sha512-c5AMf34bKdvPhQ7tBGhqkgKNUzMr4WUs+WDtC2ZUGOUncbxKMTvqxYctiseW3+L4bA8ec+GcZ6/A/FW4m8ukng==} + + array-move@4.0.0: + resolution: {integrity: sha512-+RY54S8OuVvg94THpneQvFRmqWdAHeqtMzgMW6JNurHxe8rsS07cHQdfGkXnTUXiBcyZ0j3SiDIxxj0RPiqCkQ==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + + array-union@2.1.0: + resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} + engines: {node: '>=8'} + + assertion-error@2.0.1: + resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} + engines: {node: '>=12'} + + ast-v8-to-istanbul@1.0.7: + resolution: {integrity: sha512-kFL68AG6ajd8fg248zwM9GQrUWEp79gsmjum34OEXjs4yHuUMZfYKwOLW9GMmB4oNvVrj+EAGxsP7ye2UR9UlA==} + + astral-regex@2.0.0: + resolution: {integrity: sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==} + engines: {node: '>=8'} + + async-validator@4.2.5: + resolution: {integrity: sha512-7HhHjtERjqlNbZtqNqy2rckN/SpOOlmDliet+lP7k+eKZEjPk3DgyeU9lIXLdeLz0uBbbVp+9Qdow9wJWgwwfg==} + + asynckit@0.4.0: + resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} + + autolinker@3.16.2: + resolution: {integrity: sha512-JiYl7j2Z19F9NdTmirENSUUIIL/9MytEWtmzhfmsKPCp9E+G35Y0UNCMoM9tFigxT59qSc8Ml2dlZXOCVTYwuA==} + + autoprefixer@10.6.1: + resolution: {integrity: sha512-cL1Qz6ADZhcEbny/8HPfe99J6HhNoYtpX2LFLIbhgGE7Q1hlQVkYFdetDN7Id3KiQxhDrHwzlHr/YQCnZ8+xSA==} + engines: {node: ^10 || ^12 || >=14} + hasBin: true + peerDependencies: + postcss: 8.5.31 + + axios@0.34.0: + resolution: {integrity: sha512-CkOmqy7BaT4VC9+wRUmSM3LVwCkKK3UYc7koEqIHWRpOTJypwdNctaVOgnOjhHP3599Ubq2K8KqYwfC7c8NdPQ==} + + axios@1.20.0: + resolution: {integrity: sha512-r8aOh8j9cGKpgQAqpzrUHnSIc6a59Y3Xf/cv8sy1DrHCkZHzQGEuoq1tARk6qSyDdtQGSDgpb9kFlruzPvrgwg==} + + balanced-match@1.0.2: + resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + + balanced-match@2.0.0: + resolution: {integrity: sha512-1ugUSr8BHXRnK23KfuYS+gVMC3LB8QGH9W1iGtDPsNWoQbgtXSExkBu2aDR4epiGWZOjZsj6lDl/N/AqqTC3UA==} + + balanced-match@4.0.4: + resolution: {integrity: sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==} + engines: {node: 18 || 20 || >=22} + + baseline-browser-mapping@2.11.33: + resolution: {integrity: sha512-yiVKDX+qCMRKBE084lXvq9EcwFUhKZ2nU8TK1EQQuOgPNR/lmbGxXOeDdlGUqC2Zz11Cs9rk1d/8NfgBmlkt0w==} + engines: {node: '>=6.0.0'} + hasBin: true + + benz-amr-recorder@1.1.5: + resolution: {integrity: sha512-NepctcNTsZHK8NxBb5uKO5p8S+xkbm+vD6GLSkCYdJeEsriexvgumLHpDkanX4QJBcLRMVtg16buWMs+gUPB3g==} + + benz-recorderjs@1.0.5: + resolution: {integrity: sha512-EwedOQo9KLti7HxDi/eZY51PSRbAXnOdEZmLvJ6ro3QQSoF9Y3AXBt57MIllGvVz5vtFYMeikG+GD7qTm3+p9w==} + + binary-extensions@2.3.0: + resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==} + engines: {node: '>=8'} + + boolbase@1.0.0: + resolution: {integrity: sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==} + + bpmn-js-properties-panel@5.23.0: + resolution: {integrity: sha512-4B27LM8oV14A2QWRvazV17h4NxbkNERcqU+AGJmxKImMlLhu9893MWR+pCdTQCTphBdBkuD8ksWm+1wVCedJ7g==} + peerDependencies: + '@bpmn-io/properties-panel': '>= 3.7' + bpmn-js: '>= 11.5' + camunda-bpmn-js-behaviors: '>= 0.4' + diagram-js: '>= 11.9' + + bpmn-js-token-simulation@0.36.2: + resolution: {integrity: sha512-sN7US4gIA5tGs74gYLnZ2Eay+gPqkKPjEttp/VRTeydSg0RGPuGiGwTo1TaLf8cV8FXFCDD2actkQWn/aeg79Q==} + engines: {node: '>= 16'} + + bpmn-js@17.11.1: + resolution: {integrity: sha512-ywCeTg5kvN8lYkU+fHE+YXTGlfKc55lRBn7zW3k1//toeMNPy/PS/uQiujRWdFhMrH5dbtDvlwWukNw2pjWw8Q==} + + bpmn-moddle@8.1.0: + resolution: {integrity: sha512-yI5OAFfYVJwViKTsTsonVfCBPtB3MlefADUORwNIxxBOMp21vnoxuxsdgUWlPH/dvAEZh/+mr8UtqOBNu8NC5Q==} + + brace-expansion@1.1.21: + resolution: {integrity: sha512-9zeA+KLZNNzglF2TPKRQEDyx6Yby7daAkuy8MiPzpXPsYDWi/DRM8jmwUDxokQjYqBpv5DgPiwD4h4ZZSy1Ujw==} + + brace-expansion@2.1.7: + resolution: {integrity: sha512-uZbew1NqdmPDTMJ8ah1y+b+9QEJrfkXFk3RcTQw3X0jW/xRUvFKsg1CfQdSYGdTbXZWExtU3J3ccxtnfw1Fi0g==} + + brace-expansion@5.0.12: + resolution: {integrity: sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ==} + engines: {node: 20 || >=22} + + braces@3.0.3: + resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} + engines: {node: '>=8'} + + browserslist@4.29.4: + resolution: {integrity: sha512-2TcbbiwXEq+N0kD36tykpCfyyQigUXmuwNQbnPp4Xk4PX9JOqVIKjJlIDjpH7uY6tmRGoAd+apeT1p60T8wsdA==} + engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} + hasBin: true + + buffer-from@1.1.2: + resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} + + cac@7.1.0: + resolution: {integrity: sha512-LMDU/U2yA4IPIY8KT0NsNPWEYZvAMkbgyspxJ6btJaYV+WMDOHAZCmB0lsTObiHaRS1V/ztKAl7+TSkTqXyeoA==} + engines: {node: '>=20.19.0'} + + cacheable@2.5.0: + resolution: {integrity: sha512-60cyAOytib/OzBw1JNSoSV/boK1AtHryDIjvVBk7XbN4ugfkM3+Sry7fEjNgPMGgOjuaZPAp8ruZ0Cxafwyq9g==} + + call-bind-apply-helpers@1.0.2: + resolution: {integrity: sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==} + engines: {node: '>= 0.4'} + + call-bound@1.0.4: + resolution: {integrity: sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==} + engines: {node: '>= 0.4'} + + callsites@3.1.0: + resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} + engines: {node: '>=6'} + + camelcase@5.3.1: + resolution: {integrity: sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==} + engines: {node: '>=6'} + + camunda-bpmn-js-behaviors@1.7.2: + resolution: {integrity: sha512-xjLJHc18T40tcYu4JCeYDo1wR5i9+ZqcVnXVP6c4ooAe2gKISbBvFc07gqGpqiwm7TpEBvUfDj3PrRr+ofaf4w==} + peerDependencies: + bpmn-js: '>= 9' + camunda-bpmn-moddle: '>= 7' + zeebe-bpmn-moddle: '>= 0.18' + + camunda-bpmn-moddle@7.0.2: + resolution: {integrity: sha512-I8Hs3bXBOOyBkhjAdaxct9ppbX/uYcLwgvUljgNumXtIzBSAP1gWy/MlJOE6WYqVZO9eLw6+0w42W4pYIMlsCg==} + + caniuse-lite@1.0.30001819: + resolution: {integrity: sha512-LFUqIIAwpzsIuevnKnsR9qnStBcgzPShTX61lBwN9uFkkf8o8zLiebEjbW8AYtZiF+1YKDWfdt/pWDtMuG8Xwg==} + + chai@6.3.0: + resolution: {integrity: sha512-XWAtwJ6OHO+tj0EKCs0Y2UamnyOxseZWltU4x2U2wh8g4AigdjwvtUjvLP2tqkA/avxHEtzxNaqGq/YGNwckKg==} + engines: {node: '>=18'} + + chalk@1.1.3: + resolution: {integrity: sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==} + engines: {node: '>=0.10.0'} + + chalk@4.1.2: + resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} + engines: {node: '>=10'} + + chalk@5.3.0: + resolution: {integrity: sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==} + engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} + + cheerio-select@2.1.0: + resolution: {integrity: sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==} + + cheerio@1.0.0-rc.12: + resolution: {integrity: sha512-VqR8m68vM46BNnuZ5NtnGBKIE/DfN0cRIzg9n40EIq9NOv90ayxLBXA8fXC5gquFRGJSTRqBq25Jt2ECLR431Q==} + engines: {node: '>= 6'} + + chokidar@3.6.0: + resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} + engines: {node: '>= 8.10.0'} + + chokidar@5.0.0: + resolution: {integrity: sha512-TQMmc3w+5AxjpL8iIiwebF73dRDF4fBIieAqGn9RGCWaEVwQ6Fb2cGe31Yns0RRIzii5goJ1Y7xbMwo1TxMplw==} + engines: {node: '>= 20.19.0'} + + classnames@2.5.1: + resolution: {integrity: sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow==} + + cli-cursor@5.0.0: + resolution: {integrity: sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw==} + engines: {node: '>=18'} + + cli-truncate@4.0.0: + resolution: {integrity: sha512-nPdaFdQ0h/GEigbPClz11D0v/ZJEwxmeVZGeMo3Z5StPtUTkA9o1lD6QwoirYiSDzbcwn2XcjwmCp68W1IS4TA==} + engines: {node: '>=18'} + + cliui@6.0.0: + resolution: {integrity: sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==} + + cliui@8.0.1: + resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} + engines: {node: '>=12'} + + clsx@2.1.1: + resolution: {integrity: sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==} + engines: {node: '>=6'} + + codemirror@6.65.7: + resolution: {integrity: sha512-HcfnUFJwI2FvH73YWVbbMh7ObWxZiHIycEhv9ZEXy6e8ZKDjtZKbbYFUtsLN46HFXPvU5V2Uvc2d55Z//oFW5A==} + deprecated: This is an accidentally mis-tagged instance of 5.65.7 + + color-convert@2.0.1: + resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} + engines: {node: '>=7.0.0'} + + color-name@1.1.4: + resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + + colord@2.10.0: + resolution: {integrity: sha512-AidJptpBJmjTclAp9BkLwJi0T93fo5epJnbaZslpg6QVzpHjAiveF55mE9AcUJiGMqRHgMDY8soMsQtuNYMHfw==} + + colorette@2.0.20: + resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==} + + combined-stream@1.0.8: + resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} + engines: {node: '>= 0.8'} + + commander@10.0.1: + resolution: {integrity: sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==} + engines: {node: '>=14'} + + commander@11.1.0: + resolution: {integrity: sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==} + engines: {node: '>=16'} + + commander@12.1.0: + resolution: {integrity: sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==} + engines: {node: '>=18'} + + commander@14.0.3: + resolution: {integrity: sha512-H+y0Jo/T1RZ9qPP4Eh1pkcQcLRglraJaSLoyOtHxu6AapkjWVCy2Sit1QQ4x3Dng8qDlSsZEet7g5Pq06MvTgw==} + engines: {node: '>=20'} + + commander@2.20.3: + resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} + + commander@7.2.0: + resolution: {integrity: sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==} + engines: {node: '>= 10'} + + commander@8.3.0: + resolution: {integrity: sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==} + engines: {node: '>= 12'} + + common-tags@1.8.2: + resolution: {integrity: sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA==} + engines: {node: '>=4.0.0'} + + compare-func@2.0.0: + resolution: {integrity: sha512-zHig5N+tPWARooBnb0Zx1MFcdfpyJrfTJ3Y5L+IFvUm8rM74hHz66z0gw0x4tijh5CorKkKUCnW82R2vmpeCRA==} + + component-event@0.2.1: + resolution: {integrity: sha512-wGA++isMqiDq1jPYeyv2as/Bt/u+3iLW0rEa+8NQ82jAv3TgqMiCM+B2SaBdn2DfLilLjjq736YcezihRYhfxw==} + + compute-scroll-into-view@3.1.1: + resolution: {integrity: sha512-VRhuHOLoKYOy4UbilLbUzbYg93XLjv2PncJC50EuTWPA3gaja1UjBsUP/D/9/juV3vQFr6XBEzn9KCAHdUvOHw==} + + computeds@0.0.1: + resolution: {integrity: sha512-7CEBgcMjVmitjYo5q8JTJVra6X5mQ20uTThdK+0kR7UEaDrAWEQcRiBtWJzga4eRpP6afNwwLsX2SET2JhVB1Q==} + + concat-map@0.0.1: + resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} + + confbox@0.1.8: + resolution: {integrity: sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==} + + config-chain@1.1.13: + resolution: {integrity: sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==} + + consola@3.2.3: + resolution: {integrity: sha512-I5qxpzLv+sJhTVEoLYNcTW+bThDCPsit0vLNKShZx6rLtpilNpmmeTPaeqJb9ZE9dV3DGaeby6Vuhrw38WjeyQ==} + engines: {node: ^14.18.0 || >=16.10.0} + + consola@3.4.2: + resolution: {integrity: sha512-5IKcdX0nnYavi6G7TtOhwkYzyjfJlatbjMjuLSfE2kYT5pMDOilZ4OvMhi637CcDICTmz3wARPoyhqyX1Y+XvA==} + engines: {node: ^14.18.0 || >=16.10.0} + + conventional-changelog-angular@7.0.0: + resolution: {integrity: sha512-ROjNchA9LgfNMTTFSIWPzebCwOGFdgkEq45EnvvrmSLvCtAw0HSmrCs7/ty+wAeYUZyNay0YMUNYFTRL72PkBQ==} + engines: {node: '>=16'} + + conventional-changelog-conventionalcommits@7.0.2: + resolution: {integrity: sha512-NKXYmMR/Hr1DevQegFB4MwfM5Vv0m4UIxKZTTYuD98lpTknaZlSRrDOG4X7wIXpGkfsYxZTghUN+Qq+T0YQI7w==} + engines: {node: '>=16'} + + conventional-commits-parser@5.0.0: + resolution: {integrity: sha512-ZPMl0ZJbw74iS9LuX9YIAiW8pfM5p3yh2o/NbXHbkFuZzY5jvdi5jFycEOkmBW5H5I7nA+D6f3UcsCLP2vvSEA==} + engines: {node: '>=16'} + hasBin: true + + convert-source-map@2.0.0: + resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} + + core-js-pure@3.51.0: + resolution: {integrity: sha512-NE4SFDJ+qzQeqHG2vVSNwopzS6zZNPYJ5kinIqs+OofTqGzOmICgT89E/yvS9XY7rwb3eU1utWXTJ9nVFqv74A==} + + cosmiconfig-typescript-loader@5.1.0: + resolution: {integrity: sha512-7PtBB+6FdsOvZyJtlF3hEPpACq7RQX6BVGsgC7/lfVXnKMvNCu/XY3ykreqG5w/rBNdu2z8LCIKoF3kpHHdHlA==} + engines: {node: '>=v16'} + peerDependencies: + '@types/node': '*' + cosmiconfig: '>=8.2' + typescript: '>=4' + + cosmiconfig@9.0.0: + resolution: {integrity: sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==} + engines: {node: '>=14'} + peerDependencies: + typescript: '>=4.9.5' + peerDependenciesMeta: + typescript: + optional: true + + crelt@1.0.7: + resolution: {integrity: sha512-aK6BbWfhf4U/wCcLHKPJl/xa6VkVstRaPywWtMKGwuOLc/wZTyQYuoxgvZnNsBvv7Kg3YTBQYYBCggcviQczuA==} + + cropperjs@1.7.0: + resolution: {integrity: sha512-AkGnZxr7xAJBa63ObXq5ZKLkh9c8wisC+Ym8VzIDn3KZ+6qRTbBnOl2w2dFOTMzLP5IcfOpEK9PICDywNXhncg==} + + cross-fetch@3.1.8: + resolution: {integrity: sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==} + + cross-spawn@7.0.6: + resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} + engines: {node: '>= 8'} + + crossws@0.4.16: + resolution: {integrity: sha512-gKc2u346c6tZazImz8/4KkRRKW6cEHot3Z3+gzKNSkfHTWkYrXeiidMKYN0JnHqeszIs5++iDaVzP/pWl/efpw==} + peerDependencies: + srvx: '>=0.11.5' + peerDependenciesMeta: + srvx: + optional: true + + crypto-js@4.2.0: + resolution: {integrity: sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==} + + css-functions-list@3.2.3: + resolution: {integrity: sha512-IQOkD3hbR5KrN93MtcYuad6YPuTSUhntLHDuLEbFWE+ff2/XSZNdZG+LcbbIW5AXKg/WFIfYItIzVoHngHXZzA==} + engines: {node: '>=12 || >=16'} + + css-select@5.1.0: + resolution: {integrity: sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==} + + css-select@6.0.0: + resolution: {integrity: sha512-rZZVSLle8v0+EY8QAkDWrKhpgt6SA5OtHsgBnsj6ZaLb5dmDVOWUDtQitd9ydxxvEjhewNudS6eTVU7uOyzvXw==} + + css-tree@2.2.1: + resolution: {integrity: sha512-OA0mILzGc1kCOCSJerOeqDxDQ4HOh+G8NbOJFOTgOCzpw7fCBubk0fEyxp8AgOL/jvLgYA/uV0cMbe43ElF1JA==} + engines: {node: ^10 || ^12.20.0 || ^14.13.0 || >=15.0.0, npm: '>=7.0.0'} + + css-tree@3.2.1: + resolution: {integrity: sha512-X7sjQzceUhu1u7Y/ylrRZFU2FS6LRiFVp6rKLPg23y3x3c3DOKAwuXGDp+PAGjh6CSnCjYeAul8pcT8bAl+lSA==} + engines: {node: ^10 || ^12.20.0 || ^14.13.0 || >=15.0.0} + + css-what@6.1.0: + resolution: {integrity: sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==} + engines: {node: '>= 6'} + + css-what@7.0.0: + resolution: {integrity: sha512-wD5oz5xibMOPHzy13CyGmogB3phdvcDaB5t0W/Nr5Z2O/agcB8YwOz6e2Lsp10pNDzBoDO9nVa3RGs/2BttpHQ==} + engines: {node: '>= 6'} + + cssesc@3.0.0: + resolution: {integrity: sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==} + engines: {node: '>=4'} + hasBin: true + + csso@5.0.5: + resolution: {integrity: sha512-0LrrStPOdJj+SPCCrGhzryycLjwcgUSHBtxNA8aIDxf0GLsRh1cKYhB00Gd1lDOS4yGH69+SNn13+TWbVHETFQ==} + engines: {node: ^10 || ^12.20.0 || ^14.13.0 || >=15.0.0, npm: '>=7.0.0'} + + cssstyle@4.2.1: + resolution: {integrity: sha512-9+vem03dMXG7gDmZ62uqmRiMRNtinIZ9ZyuF6BdxzfOD+FdN5hretzynkn0ReS2DO2GSw76RWHs0UmJPI2zUjw==} + engines: {node: '>=18'} + + csstype@3.2.3: + resolution: {integrity: sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==} + + d3-array@3.2.4: + resolution: {integrity: sha512-tdQAmyA18i4J7wprpYq8ClcxZy3SC31QMeByyCFyRt7BVHdREQZ5lpzoe5mFEYZUWe+oq8HBvk9JjpibyEV4Jg==} + engines: {node: '>=12'} + + d3-axis@3.0.0: + resolution: {integrity: sha512-IH5tgjV4jE/GhHkRV0HiVYPDtvfjHQlQfJHs0usq7M30XcSBvOotpmH1IgkcXsO/5gEQZD43B//fc7SRT5S+xw==} + engines: {node: '>=12'} + + d3-brush@3.0.0: + resolution: {integrity: sha512-ALnjWlVYkXsVIGlOsuWH1+3udkYFI48Ljihfnh8FZPF2QS9o+PzGLBslO0PjzVoHLZ2KCVgAM8NVkXPJB2aNnQ==} + engines: {node: '>=12'} + + d3-chord@3.0.1: + resolution: {integrity: sha512-VE5S6TNa+j8msksl7HwjxMHDM2yNK3XCkusIlpX5kwauBfXuyLAtNg9jCp/iHH61tgI4sb6R/EIMWCqEIdjT/g==} + engines: {node: '>=12'} + + d3-color@3.1.0: + resolution: {integrity: sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA==} + engines: {node: '>=12'} + + d3-contour@4.0.2: + resolution: {integrity: sha512-4EzFTRIikzs47RGmdxbeUvLWtGedDUNkTcmzoeyg4sP/dvCexO47AaQL7VKy/gul85TOxw+IBgA8US2xwbToNA==} + engines: {node: '>=12'} + + d3-delaunay@6.0.4: + resolution: {integrity: sha512-mdjtIZ1XLAM8bm/hx3WwjfHt6Sggek7qH043O8KEjDXN40xi3vx/6pYSVTwLjEgiXQTbvaouWKynLBiUZ6SK6A==} + engines: {node: '>=12'} + + d3-dispatch@3.0.1: + resolution: {integrity: sha512-rzUyPU/S7rwUflMyLc1ETDeBj0NRuHKKAcvukozwhshr6g6c5d8zh4c2gQjY2bZ0dXeGLWc1PF174P2tVvKhfg==} + engines: {node: '>=12'} + + d3-drag@3.0.0: + resolution: {integrity: sha512-pWbUJLdETVA8lQNJecMxoXfH6x+mO2UQo8rSmZ+QqxcbyA3hfeprFgIT//HW2nlHChWeIIMwS2Fq+gEARkhTkg==} + engines: {node: '>=12'} + + d3-dsv@3.0.1: + resolution: {integrity: sha512-UG6OvdI5afDIFP9w4G0mNq50dSOsXHJaRE8arAS5o9ApWnIElp8GZw1Dun8vP8OyHOZ/QJUKUJwxiiCCnUwm+Q==} + engines: {node: '>=12'} + hasBin: true + + d3-ease@3.0.1: + resolution: {integrity: sha512-wR/XK3D3XcLIZwpbvQwQ5fK+8Ykds1ip7A2Txe0yxncXSdq1L9skcG7blcedkOX+ZcgxGAmLX1FrRGbADwzi0w==} + engines: {node: '>=12'} + + d3-fetch@3.0.1: + resolution: {integrity: sha512-kpkQIM20n3oLVBKGg6oHrUchHM3xODkTzjMoj7aWQFq5QEM+R6E4WkzT5+tojDY7yjez8KgCBRoj4aEr99Fdqw==} + engines: {node: '>=12'} + + d3-flextree@2.1.2: + resolution: {integrity: sha512-gJiHrx5uTTHq44bjyIb3xpbmmdZcWLYPKeO9EPVOq8EylMFOiH2+9sWqKAiQ4DcFuOZTAxPOQyv0Rnmji/g15A==} + + d3-force@3.0.0: + resolution: {integrity: sha512-zxV/SsA+U4yte8051P4ECydjD/S+qeYtnaIyAs9tgHCqfguma/aAQDjo85A9Z6EKhBirHRJHXIgJUlffT4wdLg==} + engines: {node: '>=12'} + + d3-format@3.1.0: + resolution: {integrity: sha512-YyUI6AEuY/Wpt8KWLgZHsIU86atmikuoOmCfommt0LYHiQSPjvX2AcFc38PX0CBpr2RCyZhjex+NS/LPOv6YqA==} + engines: {node: '>=12'} + + d3-geo@3.1.1: + resolution: {integrity: sha512-637ln3gXKXOwhalDzinUgY83KzNWZRKbYubaG+fGVuc/dxO64RRljtCTnf5ecMyE1RIdtqpkVcq0IbtU2S8j2Q==} + engines: {node: '>=12'} + + d3-hierarchy@1.1.9: + resolution: {integrity: sha512-j8tPxlqh1srJHAtxfvOUwKNYJkQuBFdM1+JAUfq6xqH5eAqf93L7oG1NVqDa4CpFZNvnNKtCYEUC8KY9yEn9lQ==} + + d3-hierarchy@3.1.2: + resolution: {integrity: sha512-FX/9frcub54beBdugHjDCdikxThEqjnR93Qt7PvQTOHxyiNCAlvMrHhclk3cD5VeAaq9fxmfRp+CnWw9rEMBuA==} + engines: {node: '>=12'} + + d3-interpolate@3.0.1: + resolution: {integrity: sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g==} + engines: {node: '>=12'} + + d3-path@3.1.0: + resolution: {integrity: sha512-p3KP5HCf/bvjBSSKuXid6Zqijx7wIfNW+J/maPs+iwR35at5JCbLUT0LzF1cnjbCHWhqzQTIN2Jpe8pRebIEFQ==} + engines: {node: '>=12'} + + d3-polygon@3.0.1: + resolution: {integrity: sha512-3vbA7vXYwfe1SYhED++fPUQlWSYTTGmFmQiany/gdbiWgU/iEyQzyymwL9SkJjFFuCS4902BSzewVGsHHmHtXg==} + engines: {node: '>=12'} + + d3-quadtree@3.0.1: + resolution: {integrity: sha512-04xDrxQTDTCFwP5H6hRhsRcb9xxv2RzkcsygFzmkSIOJy3PeRJP7sNk3VRIbKXcog561P9oU0/rVH6vDROAgUw==} + engines: {node: '>=12'} + + d3-random@3.0.1: + resolution: {integrity: sha512-FXMe9GfxTxqd5D6jFsQ+DJ8BJS4E/fT5mqqdjovykEB2oFbTMDVdg1MGFxfQW+FBOGoB++k8swBrgwSHT1cUXQ==} + engines: {node: '>=12'} + + d3-scale-chromatic@3.1.0: + resolution: {integrity: sha512-A3s5PWiZ9YCXFye1o246KoscMWqf8BsD9eRiJ3He7C9OBaxKhAd5TFCdEx/7VbKtxxTsu//1mMJFrEt572cEyQ==} + engines: {node: '>=12'} + + d3-scale@4.0.2: + resolution: {integrity: sha512-GZW464g1SH7ag3Y7hXjf8RoUuAFIqklOAq3MRl4OaWabTFJY9PN/E1YklhXLh+OQ3fM9yS2nOkCoS+WLZ6kvxQ==} + engines: {node: '>=12'} + + d3-selection@3.0.0: + resolution: {integrity: sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ==} + engines: {node: '>=12'} + + d3-shape@3.2.0: + resolution: {integrity: sha512-SaLBuwGm3MOViRq2ABk3eLoxwZELpH6zhl3FbAoJ7Vm1gofKx6El1Ib5z23NUEhF9AsGl7y+dzLe5Cw2AArGTA==} + engines: {node: '>=12'} + + d3-time-format@4.1.0: + resolution: {integrity: sha512-dJxPBlzC7NugB2PDLwo9Q8JiTR3M3e4/XANkreKSUxF8vvXKqm1Yfq4Q5dl8budlunRVlUUaDUgFt7eA8D6NLg==} + engines: {node: '>=12'} + + d3-time@3.1.0: + resolution: {integrity: sha512-VqKjzBLejbSMT4IgbmVgDjpkYrNWUYJnbCGo874u7MMKIWsILRX+OpX/gTk8MqjpT1A/c6HY2dCA77ZN0lkQ2Q==} + engines: {node: '>=12'} + + d3-timer@3.0.1: + resolution: {integrity: sha512-ndfJ/JxxMd3nw31uyKoY2naivF+r29V+Lc0svZxe1JvvIRmi8hUsrMvdOwgS1o6uBHmiz91geQ0ylPP0aj1VUA==} + engines: {node: '>=12'} + + d3-transition@3.0.1: + resolution: {integrity: sha512-ApKvfjsSR6tg06xrL434C0WydLr7JewBB3V+/39RMHsaXTOG0zmt/OAXeng5M5LBm0ojmxJrpomQVZ1aPvBL4w==} + engines: {node: '>=12'} + peerDependencies: + d3-selection: 2 - 3 + + d3-zoom@3.0.0: + resolution: {integrity: sha512-b8AmV3kfQaqWAuacbPuNbL6vahnOJflOhexLzMMNLga62+/nh0JzvJ0aO/5a5MVgUFGS7Hu1P9P03o3fJkDCyw==} + engines: {node: '>=12'} + + d3@7.9.0: + resolution: {integrity: sha512-e1U46jVP+w7Iut8Jt8ri1YsPOvFpg46k+K8TpCb0P+zjCkjkPnV7WzfDJzMHy1LnA+wj5pLT1wjO901gLXeEhA==} + engines: {node: '>=12'} + + d@1.0.2: + resolution: {integrity: sha512-MOqHvMWF9/9MX6nza0KgvFH4HpMU0EF5uUDXqX/BtxtU8NfB0QzRtJ8Oe/6SuS4kbhyzVJwjd97EA4PKrzJ8bw==} + engines: {node: '>=0.12'} + + dargs@8.1.0: + resolution: {integrity: sha512-wAV9QHOsNbwnWdNW2FYvE1P56wtgSbM+3SZcdGiWQILwVjACCXDCI3Ai8QlCjMDB8YK5zySiXZYBiwGmNY3lnw==} + engines: {node: '>=12'} + + data-urls@5.0.0: + resolution: {integrity: sha512-ZYP5VBHshaDAiVZxjbRVcFJpc+4xGgT0bK3vzy1HLN8jTO975HEbuYzZJcHoQEY5K1a0z8YayJkyVETa08eNTg==} + engines: {node: '>=18'} + + dayjs@1.11.23: + resolution: {integrity: sha512-QDTCU0M0MxR3hQfnlDJfwekQiaanm1ubOD231u73WBckQ/fsamwRLiE2GBz6D3a/xF1NgfiDLJjXBa1hYOYTtQ==} + + de-indent@1.0.2: + resolution: {integrity: sha512-e/1zu3xH5MQryN2zdVaF0OrdNLUbvWxzMbi+iNA6Bky7l1RoP8a2fIbRocyHclXt/arDrrR6lL3TqFD9pMQTsg==} + + debug@4.3.7: + resolution: {integrity: sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + + debug@4.4.3: + resolution: {integrity: sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + + decamelize@1.2.0: + resolution: {integrity: sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==} + engines: {node: '>=0.10.0'} + + decimal.js@10.6.0: + resolution: {integrity: sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg==} + + deep-is@0.1.4: + resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} + + default-passive-events@2.0.0: + resolution: {integrity: sha512-eMtt76GpDVngZQ3ocgvRcNCklUMwID1PaNbCNxfpDXuiOXttSh0HzBbda1HU9SIUsDc02vb7g9+3I5tlqe/qMQ==} + + defu@6.1.7: + resolution: {integrity: sha512-7z22QmUWiQ/2d0KkdYmANbRUVABpZ9SNYyH5vx6PZ+nE5bcC0l7uFvEfHlyld/HcGBFTL536ClDt3DEcSlEJAQ==} + + delaunator@5.0.1: + resolution: {integrity: sha512-8nvh+XBe96aCESrGOqMp/84b13H9cdKbG5P2ejQCh4d4sK9RL4371qou9drQjMhvnPmhWl5hnmqbEE0fXr9Xnw==} + + delayed-stream@1.0.0: + resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} + engines: {node: '>=0.4.0'} + + destr@2.0.5: + resolution: {integrity: sha512-ugFTXCtDZunbzasqBxrK93Ik/DRYsO6S/fedkWEMKqt04xZ4csmnmwGDBAb07QWNaGMAmnTIemsYZCksjATwsA==} + + detect-libc@1.0.3: + resolution: {integrity: sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==} + engines: {node: '>=0.10'} + hasBin: true + + devframe@1.2.6: + resolution: {integrity: sha512-mHzcm6ADzXgRMWdoSX+5PjwhmwAuC3SpDPi3+URznlpzxJF6tXwy5h1xr82zPKju38EVtdnYRnnP4hZwLK01vA==} + hasBin: true + peerDependencies: + '@devframes/agentic': 1.2.6 + cac: ^7.0.0 + peerDependenciesMeta: + '@devframes/agentic': + optional: true + cac: + optional: true + + diagram-js-direct-editing@3.2.0: + resolution: {integrity: sha512-+pyxeQGBSdLiZX0/tmmsm2qZSvm9YtVzod5W3RMHSTR7VrkUMD6E7EX/W9JQv3ebxO7oIdqFmytmNDDpSHnYEw==} + peerDependencies: + diagram-js: '*' + + diagram-js@12.8.1: + resolution: {integrity: sha512-LF9BiwjbOPpZd0ez5VSlYRbdbEA59YQX43bWvNDp1rLMv0xwZ5yIg4oaYDK82nIQ0kH1tjvoQRpNevMTCgQVyw==} + + diagram-js@14.11.3: + resolution: {integrity: sha512-Seq9BHAXfzKS60L4v4Gvgvv72wOtvrfJQAyyPm9pntSZDMzjoodPSXnEUPud1G2zVCMGEUUW++s0reEdaWgkXA==} + + didi@10.2.2: + resolution: {integrity: sha512-l8NYkYFXV1izHI65EyT8EXOjUZtKmQkHLTT89cSP7HU5J/G7AOj0dXKtLc04EXYlga99PBY18IPjOeZ+c3DI4w==} + engines: {node: '>= 16'} + + didi@9.0.2: + resolution: {integrity: sha512-q2+aj+lnJcUweV7A9pdUrwFr4LHVmRPwTmQLtHPFz4aT7IBoryN6Iy+jmFku+oIzr5ebBkvtBCOb87+dJhb7bg==} + + dijkstrajs@1.0.3: + resolution: {integrity: sha512-qiSlmBq9+BCdCA/L46dw8Uy93mloxsPSbwnm5yrKn2vMPiy8KyAskTF6zuV/j5BMsmOGZDPs7KjU+mjb670kfA==} + + dir-glob@3.0.1: + resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} + engines: {node: '>=8'} + + dlv@1.1.3: + resolution: {integrity: sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==} + + doctrine@3.0.0: + resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} + engines: {node: '>=6.0.0'} + + dom-serializer@2.0.0: + resolution: {integrity: sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==} + + dom-walk@0.1.2: + resolution: {integrity: sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w==} + + dom7@4.0.6: + resolution: {integrity: sha512-emjdpPLhpNubapLFdjNL9tP06Sr+GZkrIHEXLWvOGsytACUrkbeIdjO5g77m00BrHTznnlcNqgmn7pCN192TBA==} + + domelementtype@2.3.0: + resolution: {integrity: sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==} + + domhandler@5.0.3: + resolution: {integrity: sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==} + engines: {node: '>= 4'} + + domify@1.4.2: + resolution: {integrity: sha512-m4yreHcUWHBncGVV7U+yQzc12vIlq0jMrtHZ5mW6dQMiL/7skSYNVX9wqKwOtyO9SGCgevrAFEgOCAHmamHTUA==} + + domify@3.0.0: + resolution: {integrity: sha512-bs2yO68JDFOm6rKv8f0EnrM2cENduhRkpqOtt/s5l5JBA/eqGBZCzLPmdYoHtJ6utgLGgcBajFsEQbl12pT0lQ==} + engines: {node: '>=20'} + + dompurify@3.4.17: + resolution: {integrity: sha512-B/pSlYVHQ58kqISD/yDjuJ1yfzI34m1gF4lAod2bwSRhiN4K5Cl3H8Af7hqB2PmTL911tdEudnnXn5FnhRoz0w==} + + domutils@3.1.0: + resolution: {integrity: sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==} + + domutils@3.2.2: + resolution: {integrity: sha512-6kZKyUajlDuqlHKVX1w7gyslj9MPIXzIFiz/rGu35uC1wMi+kMhQwGhl4lt9unC9Vb9INnY9Z3/ZA3+FhASLaw==} + + dot-prop@5.3.0: + resolution: {integrity: sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==} + engines: {node: '>=8'} + + driver.js@1.10.2: + resolution: {integrity: sha512-L/EMTriJPAmg+5kIFmrjzt3TI+1NblhHOV/UZkfpgU/uxhSflGheynMBxk5oImDSy6seAEkIl6MzNOc0zdoKtg==} + + dunder-proto@1.0.1: + resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==} + engines: {node: '>= 0.4'} + + eastasianwidth@0.2.0: + resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} + + echarts-wordcloud@2.1.0: + resolution: {integrity: sha512-Kt1JmbcROgb+3IMI48KZECK2AP5lG6bSsOEs+AsuwaWJxQom31RTNd6NFYI01E/YaI1PFZeueaupjlmzSQasjQ==} + peerDependencies: + echarts: ^5.0.1 + + echarts@5.5.1: + resolution: {integrity: sha512-Fce8upazaAXUVUVsjgV6mBnGuqgO+JNDlcgF79Dksy4+wgGpQB2lmYoO4TSweFg/mZITdpGHomw/cNBJZj1icA==} + + editorconfig@1.0.7: + resolution: {integrity: sha512-e0GOtq/aTQhVdNyDU9e02+wz9oDDM+SIOQxWME2QRjzRX5yyLAuHDE+0aE8vHb9XRC8XD37eO2u57+F09JqFhw==} + engines: {node: '>=14'} + hasBin: true + + editorconfig@3.0.2: + resolution: {integrity: sha512-T0ix8GhtxyKVfUFEcvdNDt3YGqlwkFHbD4/5bgFUDgFmxhI/cSRAeJ87/Sz//Cq8Eam6JX/e23RkoFO71P7aAA==} + engines: {node: '>=20'} + hasBin: true + + ejs@6.0.1: + resolution: {integrity: sha512-UaaM14yby8U3k02ihS1Bmj5Kz2d7CCQM1scxpgs4Mhkq8F1wR2gl3+Ts4h5Ne4Mnt7M9m4Dw7jsuMr3+xO4vZA==} + engines: {node: '>=0.12.18'} + hasBin: true + + electron-to-chromium@1.5.464: + resolution: {integrity: sha512-nRa65aFge40viPAKxMKULIY8tcXKwKboJWNn4RoKwyWXJ6SP7BnrDGKUTzc64818jIciH0PK7LSF8QzZes19GA==} + + element-plus@2.14.5: + resolution: {integrity: sha512-bghYy/S+qg87enHPXELirhEdDqsVAUGcGpbGIeG8dz0kwpIkGz7gYsifulBshXX74iRtHib85XWQj0uSH2A1Yg==} + peerDependencies: + vue: ^3.3.7 + + emoji-regex@10.4.0: + resolution: {integrity: sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==} + + emoji-regex@8.0.0: + resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + + emoji-regex@9.2.2: + resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} + + entities@4.5.0: + resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} + engines: {node: '>=0.12'} + + entities@7.0.1: + resolution: {integrity: sha512-TWrgLOFUQTH994YUyl1yT4uyavY5nNB5muff+RtWaqNVCAK408b5ZnnbNAUEWLTCpum9w6arT70i1XdQ4UeOPA==} + engines: {node: '>=0.12'} + + env-paths@2.2.1: + resolution: {integrity: sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==} + engines: {node: '>=6'} + + environment@1.1.0: + resolution: {integrity: sha512-xUtoPkMggbz0MPyPiIWr1Kp4aeWJjDZ6SMvURhimjdZgsRuDplF5/s9hcgGhyXMhs+6vpnuoiZ2kFiu3FMnS8Q==} + engines: {node: '>=18'} + + error-ex@1.3.2: + resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} + + es-define-property@1.0.1: + resolution: {integrity: sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==} + engines: {node: '>= 0.4'} + + es-errors@1.3.0: + resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} + engines: {node: '>= 0.4'} + + es-module-lexer@1.5.4: + resolution: {integrity: sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw==} + + es-module-lexer@2.3.2: + resolution: {integrity: sha512-poHGpORABojJJucnV9KbOavETW8lBVnphkW77ER5/BQ5Fz7oXSoCNek7IH3vR5nRjdsEz926ibFYX8KtLQmdyw==} + + es-object-atoms@1.1.2: + resolution: {integrity: sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==} + engines: {node: '>= 0.4'} + + es-set-tostringtag@2.1.0: + resolution: {integrity: sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==} + engines: {node: '>= 0.4'} + + es5-ext@0.10.64: + resolution: {integrity: sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg==} + engines: {node: '>=0.10'} + + es6-iterator@2.0.3: + resolution: {integrity: sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==} + + es6-symbol@3.1.4: + resolution: {integrity: sha512-U9bFFjX8tFiATgtkJ1zg25+KviIXpgRvRHS8sau3GfhVzThRQrOeksPeT0BWW2MNZs1OEWJ1DPXOQMn0KKRkvg==} + engines: {node: '>=0.12'} + + esbuild@0.25.4: + resolution: {integrity: sha512-8pgjLUcUjcgDg+2Q4NYXnPbo/vncAY4UmyaCm0jZevERqCHZIaWwdJHkf8XQtu4AxSKCdvrUbT0XUr1IdZzI8Q==} + engines: {node: '>=18'} + hasBin: true + + esbuild@0.28.2: + resolution: {integrity: sha512-HKVLS8dvII+xoKW9kmqxbRKrnWEXfJJr/FZhhJmiqIB0e053QNYFqOBouTMO/k5sID4MvCiUCvv8b9M4h32wIA==} + engines: {node: '>=18'} + hasBin: true + + escalade@3.2.0: + resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} + engines: {node: '>=6'} + + escape-string-regexp@1.0.5: + resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} + engines: {node: '>=0.8.0'} + + escape-string-regexp@4.0.0: + resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} + engines: {node: '>=10'} + + escape-string-regexp@5.0.0: + resolution: {integrity: sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==} + engines: {node: '>=12'} + + eslint-config-prettier@9.1.0: + resolution: {integrity: sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==} + hasBin: true + peerDependencies: + eslint: '>=7.0.0' + + eslint-define-config@2.1.0: + resolution: {integrity: sha512-QUp6pM9pjKEVannNAbSJNeRuYwW3LshejfyBBpjeMGaJjaDUpVps4C6KVR8R7dWZnD3i0synmrE36znjTkJvdQ==} + engines: {node: '>=18.0.0', npm: '>=9.0.0', pnpm: '>=8.6.0'} + deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. + + eslint-plugin-prettier@5.5.7: + resolution: {integrity: sha512-WjHyn3GrFd+ZR0rzsLiM4zJZ35PZMOE0SUIxzGmnWNG0126yNfJKJzObmmkYDwHJfGlkz3PSlzyG9ez/LJntwg==} + engines: {node: ^14.18.0 || >=16.0.0} + peerDependencies: + '@types/eslint': '>=8.0.0' + eslint: '>=8.0.0' + eslint-config-prettier: '>= 7.0.0 <10.0.0 || >=10.1.0' + prettier: '>=3.0.0' + peerDependenciesMeta: + '@types/eslint': + optional: true + eslint-config-prettier: + optional: true + + eslint-plugin-vue@9.31.0: + resolution: {integrity: sha512-aYMUCgivhz1o4tLkRHj5oq9YgYPM4/EJc0M7TAKRLCUA5OYxRLAhYEVD2nLtTwLyixEFI+/QXSvKU9ESZFgqjQ==} + engines: {node: ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.2.0 || ^7.0.0 || ^8.0.0 || ^9.0.0 + + eslint-scope@7.2.2: + resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + + eslint-visitor-keys@3.4.3: + resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + + eslint-visitor-keys@4.2.0: + resolution: {integrity: sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + eslint-visitor-keys@5.0.1: + resolution: {integrity: sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} + + eslint@8.57.1: + resolution: {integrity: sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + deprecated: This version is no longer supported. Please see https://eslint.org/version-support for other options. + hasBin: true + + esniff@2.0.1: + resolution: {integrity: sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg==} + engines: {node: '>=0.10'} + + espree@9.6.1: + resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + + esquery@1.6.0: + resolution: {integrity: sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==} + engines: {node: '>=0.10'} + + esrecurse@4.3.0: + resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} + engines: {node: '>=4.0'} + + estraverse@5.3.0: + resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} + engines: {node: '>=4.0'} + + estree-walker@2.0.2: + resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} + + estree-walker@3.0.3: + resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} + + esutils@2.0.3: + resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} + engines: {node: '>=0.10.0'} + + event-emitter@0.3.5: + resolution: {integrity: sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==} + + eventemitter3@5.0.1: + resolution: {integrity: sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==} + + execa@8.0.1: + resolution: {integrity: sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==} + engines: {node: '>=16.17'} + + expect-type@1.4.0: + resolution: {integrity: sha512-KfYbmpRm0VbLjEvVa9yGwCi9GI34xvi7A/HXYWQO65CSD2u3MczUJSuwXKFIxlGsgBQizV9q5J9NHj4VG0n+pA==} + engines: {node: '>=12.0.0'} + + ext@1.7.0: + resolution: {integrity: sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==} + + fast-deep-equal@3.1.3: + resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} + + fast-diff@1.3.0: + resolution: {integrity: sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==} + + fast-glob@3.3.2: + resolution: {integrity: sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==} + engines: {node: '>=8.6.0'} + + fast-glob@3.3.3: + resolution: {integrity: sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==} + engines: {node: '>=8.6.0'} + + fast-json-stable-stringify@2.1.0: + resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} + + fast-levenshtein@2.0.6: + resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} + + fast-uri@3.1.9: + resolution: {integrity: sha512-hS/0Wt3Ya043oKXs0sIxrMpKQITXhMLIrVAKKXi4gozGC9v7YRWVnXIZzjNPTO02M9BdxLCWqK1yRXgNziVyJQ==} + + fast-xml-builder@1.3.1: + resolution: {integrity: sha512-pIM/1n3ntFXKYrUZwW7QCK0gAW7XY+wzj1YMIV3tLDvPj/V+zTGJK5e3/4WJfwj0qWw2ElNXiTixda/R+3YSug==} + + fast-xml-parser@5.11.2: + resolution: {integrity: sha512-R9iDuNrQYeQut46cn2r2wHKn4HYzVDvDm5J1wW+koZewykv0yuO2HChTYeZtrULyHIDM9cj9TUXloCsueCQUog==} + hasBin: true + + fastest-levenshtein@1.0.16: + resolution: {integrity: sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==} + engines: {node: '>= 4.9.1'} + + fastq@1.17.1: + resolution: {integrity: sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==} + + fdir@6.5.0: + resolution: {integrity: sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==} + engines: {node: '>=12.0.0'} + peerDependencies: + picomatch: ^4.0.7 + peerDependenciesMeta: + picomatch: + optional: true + + feelers@1.5.1: + resolution: {integrity: sha512-LKIAqtScSfy55Tw62DhBcxIT3k2XnppzWrkmGfsbdad0a+TxMfaLF1CSYhoVRF5FvPAUXvor1Ux/75wtBaDYpA==} + + file-entry-cache@11.1.5: + resolution: {integrity: sha512-+PFTHITI08JIGhnNpGNI8T8inUpgZfk3GNEqfT9R2zZV2iFXg3CvqzSl/uEhs7TSGujYRELEANyDvS8Fj7+S7Q==} + + file-entry-cache@6.0.1: + resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} + engines: {node: ^10.12.0 || >=12.0.0} + + fill-range@7.1.1: + resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} + engines: {node: '>=8'} + + find-up@4.1.0: + resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} + engines: {node: '>=8'} + + find-up@5.0.0: + resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} + engines: {node: '>=10'} + + find-up@7.0.0: + resolution: {integrity: sha512-YyZM99iHrqLKjmt4LJDj58KI+fYyufRLBSYcqycxf//KpBk9FoewoGX0450m9nB44qrZnovzC2oeP5hUibxc/g==} + engines: {node: '>=18'} + + flat-cache@3.2.0: + resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} + engines: {node: ^10.12.0 || >=12.0.0} + + flat-cache@6.1.23: + resolution: {integrity: sha512-f++BY9pTk+983xK1FLzlLpmM0i0z+jHmx3QESGkURMXujQZz1k5wzwX6hjnQ8goaD0B+sYnDK1yZ6MTyZfUaqA==} + + flatted@3.4.4: + resolution: {integrity: sha512-5+ybhBZANEJxaH3X5evAFatUxLfEHSr7n6kYJ+1Qd0mUqr4eu9gIf6GDbWHf8RJijHrjjO8G+la14SlL2SeS1Q==} + + focus-trap@7.8.0: + resolution: {integrity: sha512-/yNdlIkpWbM0ptxno3ONTuf+2g318kh2ez3KSeZN5dZ8YC6AAmgeWz+GasYYiBJPFaYcSAPeu4GfhUaChzIJXA==} + + follow-redirects@1.16.2: + resolution: {integrity: sha512-/kVP2U8z596Ia0gwFrwyIeo74ta5aVmSeU1FfAUMAmcEP5EP7zydmag3SLiN64NaRKef3lxsq7i/g7ltJQDGow==} + engines: {node: '>=4.0'} + peerDependencies: + debug: '*' + peerDependenciesMeta: + debug: + optional: true + + foreground-child@3.3.0: + resolution: {integrity: sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==} + engines: {node: '>=14'} + + form-data@4.0.6: + resolution: {integrity: sha512-vKatAh4SlVfgbv+YtmhiRjhEMJsYpsG1Y2rMQtR+SVSbytsSD1YGzDIcrAJmdFec88u/+VoGmxnl+80gL1tRCQ==} + engines: {node: '>= 6'} + + fraction.js@5.3.4: + resolution: {integrity: sha512-1X1NTtiJphryn/uLQz3whtY6jK3fTqoE3ohKs0tT+Ujr1W59oopxmoEh7Lu5p6vBaPbgoM0bzveAW4Qi5RyWDQ==} + + fs-extra@10.1.0: + resolution: {integrity: sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==} + engines: {node: '>=12'} + + fs.realpath@1.0.0: + resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} + + fsevents@2.3.3: + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + + function-bind@1.1.2: + resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} + + fzf@0.5.2: + resolution: {integrity: sha512-Tt4kuxLXFKHy8KT40zwsUPUkg1CrsgY25FxA2U/j/0WgEDCk3ddc/zLTCCcbSHX9FcKtLuVaDGtGE/STWC+j3Q==} + + gensync@1.0.0-beta.2: + resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} + engines: {node: '>=6.9.0'} + + get-caller-file@2.0.5: + resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} + engines: {node: 6.* || 8.* || >= 10.*} + + get-east-asian-width@1.3.0: + resolution: {integrity: sha512-vpeMIQKxczTD/0s2CdEWHcb0eeJe6TFjxb+J5xgX7hScxqrGuyjmv4c1D4A/gelKfyox0gJJwIHF+fLjeaM8kQ==} + engines: {node: '>=18'} + + get-intrinsic@1.3.0: + resolution: {integrity: sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==} + engines: {node: '>= 0.4'} + + get-proto@1.0.1: + resolution: {integrity: sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==} + engines: {node: '>= 0.4'} + + get-stream@8.0.1: + resolution: {integrity: sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==} + engines: {node: '>=16'} + + git-raw-commits@4.0.0: + resolution: {integrity: sha512-ICsMM1Wk8xSGMowkOmPrzo2Fgmfo4bMHLNX6ytHjajRJUqvHOw/TFapQ+QG75c3X/tTDDhOSRPGC52dDbNM8FQ==} + engines: {node: '>=16'} + hasBin: true + + glob-parent@5.1.2: + resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} + engines: {node: '>= 6'} + + glob-parent@6.0.2: + resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} + engines: {node: '>=10.13.0'} + + glob@10.5.0: + resolution: {integrity: sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==} + deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me + hasBin: true + + glob@13.0.6: + resolution: {integrity: sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw==} + engines: {node: 18 || 20 || >=22} + + glob@7.2.0: + resolution: {integrity: sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==} + deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me + + global-directory@4.0.1: + resolution: {integrity: sha512-wHTUcDUoZ1H5/0iVqEudYW4/kAlN5cZ3j/bXn0Dpbizl9iaUVeWSHqiOjsgk6OW2bkLclbBjzewBz6weQ1zA2Q==} + engines: {node: '>=18'} + + global-modules@2.0.0: + resolution: {integrity: sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A==} + engines: {node: '>=6'} + + global-prefix@3.0.0: + resolution: {integrity: sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==} + engines: {node: '>=6'} + + global@4.4.0: + resolution: {integrity: sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w==} + + globals@13.24.0: + resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==} + engines: {node: '>=8'} + + globby@11.1.0: + resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} + engines: {node: '>=10'} + + globjoin@0.1.4: + resolution: {integrity: sha512-xYfnw62CKG8nLkZBfWbhWwDw02CHty86jfPcc2cr3ZfeuK9ysoVPPEUxf21bAD/rWAgk52SuBrLJlefNy8mvFg==} + + gopd@1.2.0: + resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==} + engines: {node: '>= 0.4'} + + graceful-fs@4.2.11: + resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} + + graphemer@1.4.0: + resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} + + h3@2.0.8: + resolution: {integrity: sha512-ENuKlF9kC6E6PrvY1PUyE0qkrnnPTIt2/v48uyEEfTVfgoiqBCE0uwwf++2XrWwT1gxjQBDLQ8PAsmZVniKvTw==} + engines: {node: '>=20.19.0'} + hasBin: true + peerDependencies: + crossws: ^0.4.12 + ocache: '>=0.3.0' + peerDependenciesMeta: + crossws: + optional: true + ocache: + optional: true + + hammerjs@2.0.8: + resolution: {integrity: sha512-tSQXBXS/MWQOn/RKckawJ61vvsDpCom87JgxiYdGwHdOa0ht0vzUWDlfioofFCRU0L+6NGDt6XzbgoJvZkMeRQ==} + engines: {node: '>=0.8.0'} + + has-ansi@2.0.0: + resolution: {integrity: sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg==} + engines: {node: '>=0.10.0'} + + has-flag@4.0.0: + resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} + engines: {node: '>=8'} + + has-symbols@1.0.3: + resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} + engines: {node: '>= 0.4'} + + has-symbols@1.1.0: + resolution: {integrity: sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==} + engines: {node: '>= 0.4'} + + has-tostringtag@1.0.2: + resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==} + engines: {node: '>= 0.4'} + + hashery@1.5.1: + resolution: {integrity: sha512-iZyKG96/JwPz1N55vj2Ie2vXbhu440zfUfJvSwEqEbeLluk7NnapfGqa7LH0mOsnDxTF85Mx8/dyR6HfqcbmbQ==} + engines: {node: '>=20'} + + hasown@2.0.2: + resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} + engines: {node: '>= 0.4'} + + hasown@2.0.4: + resolution: {integrity: sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==} + engines: {node: '>= 0.4'} + + he@1.2.0: + resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==} + hasBin: true + + highlight.js@11.12.0: + resolution: {integrity: sha512-nbfWpyRMcMrPMmDwJB+dhX/eiaPKtc2RB+0QZskqJ3WjRA/FDS0e9hZrx8EC/lbEv8gXy98FcDbNa/dspAaJMg==} + engines: {node: '>=12.0.0'} + + hookified@1.15.1: + resolution: {integrity: sha512-MvG/clsADq1GPM2KGo2nyfaWVyn9naPiXrqIe4jYjXNZQt238kWyOGrsyc/DmRAQ+Re6yeo6yX/yoNCG5KAEVg==} + + hookified@2.2.0: + resolution: {integrity: sha512-p/LgFzRN5FeoD3DLS6bkUapeye6E4SI6yJs6KetENd18S+FBthqYq2amJUWpt5z0EQwwHemidjY5OqJGEKm5uA==} + + htm@3.1.1: + resolution: {integrity: sha512-983Vyg8NwUE7JkZ6NmOqpCZ+sh1bKv2iYTlUkzlWmA5JD2acKoxd4KVxbMmxX/85mtfdnDmTFoNKcg5DGAvxNQ==} + + html-encoding-sniffer@4.0.0: + resolution: {integrity: sha512-Y22oTqIU4uuPgEemfz7NDJz6OeKf12Lsu+QC+s3BVpda64lTiMYCyGwg5ki4vFxkMwQdeZDl2adZoqUgdFuTgQ==} + engines: {node: '>=18'} + + html-escaper@2.0.2: + resolution: {integrity: sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==} + + html-tags@3.3.1: + resolution: {integrity: sha512-ztqyC3kLto0e9WbNp0aeP+M3kTt+nbaIveGmUxAtZa+8iFgKLUOD4YKM5j+f3QD89bra7UeumolZHKuOXnTmeQ==} + engines: {node: '>=8'} + + html-void-elements@3.0.0: + resolution: {integrity: sha512-bEqo66MRXsUGxWHV5IP0PUiAWwoEjba4VCzg0LjFJBpchPaTfyfCKTG6bc5F8ucKec3q5y6qOdGyYTSBEvhCrg==} + + htmlparser2@8.0.2: + resolution: {integrity: sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA==} + + http-proxy-agent@7.0.2: + resolution: {integrity: sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==} + engines: {node: '>= 14'} + + https-proxy-agent@5.0.1: + resolution: {integrity: sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==} + engines: {node: '>= 6'} + + https-proxy-agent@7.0.6: + resolution: {integrity: sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==} + engines: {node: '>= 14'} + + human-signals@5.0.0: + resolution: {integrity: sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==} + engines: {node: '>=16.17.0'} + + i18next@23.16.8: + resolution: {integrity: sha512-06r/TitrM88Mg5FdUXAKL96dJMzgqLE5dv3ryBAra4KCwD9mJ4ndOTS95ZuymIGoE+2hzfdaMak2X11/es7ZWg==} + + iconv-lite@0.6.3: + resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==} + engines: {node: '>=0.10.0'} + + ids@1.0.5: + resolution: {integrity: sha512-XQ0yom/4KWTL29sLG+tyuycy7UmeaM/79GRtSJq6IG9cJGIPeBz5kwDCguie3TwxaMNIc3WtPi0cTa1XYHicpw==} + + ignore@5.3.2: + resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} + engines: {node: '>= 4'} + + ignore@7.0.14: + resolution: {integrity: sha512-wCBiZ77u1tuWde6G/nfOtLaCTYcFDU5yCzARzK10y+rLhzYoL7a7yEemcopcc2Mzow7gZOIjnV2ym1NYmdiJOQ==} + engines: {node: '>= 4'} + + immutable@5.1.9: + resolution: {integrity: sha512-m8nVez3rwrgmWxtLMt1ZYXB2Lv7OKYn/disyxAlSDYAlKSlFoPPfIAmAM/M5xqL4m4C/wAPw7S2/CNaUii1Hxg==} + + import-fresh@3.3.0: + resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} + engines: {node: '>=6'} + + import-meta-resolve@4.1.0: + resolution: {integrity: sha512-I6fiaX09Xivtk+THaMfAwnA3MVA5Big1WHF1Dfx9hFuvNIWpXnorlkzhcQf6ehrqQiiZECRt1poOAkPmer3ruw==} + + import-meta-resolve@4.2.0: + resolution: {integrity: sha512-Iqv2fzaTQN28s/FwZAoFq0ZSs/7hMAHJVX+w8PZl3cY19Pxk6jFFalxQoIfW2826i/fDLXv8IiEZRIT0lDuWcg==} + + imurmurhash@0.1.4: + resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} + engines: {node: '>=0.8.19'} + + indent-string@4.0.0: + resolution: {integrity: sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==} + engines: {node: '>=8'} + + individual@2.0.0: + resolution: {integrity: sha512-pWt8hBCqJsUWI/HtcfWod7+N9SgAqyPEaF7JQjwzjn5vGrpg6aQ5qeAFQ7dx//UH4J1O+7xqew+gCeeFt6xN/g==} + + inflight@1.0.6: + resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} + deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. + + inherits-browser@0.1.0: + resolution: {integrity: sha512-CJHHvW3jQ6q7lzsXPpapLdMx5hDpSF3FSh45pwsj6bKxJJ8Nl8v43i5yXnr3BdfOimGHKyniewQtnAIp3vyJJw==} + + inherits@2.0.4: + resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + + ini@1.3.8: + resolution: {integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==} + + ini@4.1.1: + resolution: {integrity: sha512-QQnnxNyfvmHFIsj7gkPcYymR8Jdw/o7mp5ZFihxn6h8Ci6fh3Dx4E1gPjpQEpIuPo9XVNY/ZUwh4BPMjGyL01g==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + + internmap@2.0.3: + resolution: {integrity: sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg==} + engines: {node: '>=12'} + + is-arrayish@0.2.1: + resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} + + is-binary-path@2.1.0: + resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} + engines: {node: '>=8'} + + is-core-module@2.15.1: + resolution: {integrity: sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==} + engines: {node: '>= 0.4'} + + is-extglob@2.1.1: + resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} + engines: {node: '>=0.10.0'} + + is-fullwidth-code-point@3.0.0: + resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} + engines: {node: '>=8'} + + is-fullwidth-code-point@4.0.0: + resolution: {integrity: sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==} + engines: {node: '>=12'} + + is-fullwidth-code-point@5.0.0: + resolution: {integrity: sha512-OVa3u9kkBbw7b8Xw5F9P+D/T9X+Z4+JruYVNapTjPYZYUznQ5YfWeFkOj606XYYW8yugTfC8Pj0hYqvi4ryAhA==} + engines: {node: '>=18'} + + is-function@1.0.2: + resolution: {integrity: sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ==} + + is-glob@4.0.3: + resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} + engines: {node: '>=0.10.0'} + + is-hotkey@0.2.0: + resolution: {integrity: sha512-UknnZK4RakDmTgz4PI1wIph5yxSs/mvChWs9ifnlXsKuXgWmOkY/hAE0H/k2MIqH0RlRye0i1oC07MCRSD28Mw==} + + is-network-error@1.3.2: + resolution: {integrity: sha512-PhBY86zaxNZUuWP6h13Vu5oFe0XY6/UlKzQnYFELzGVHygP3MxmvTfYSG7GN3aIab/iWudSMgjSnG9Dq+nHrgA==} + engines: {node: '>=16'} + + is-number@7.0.0: + resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} + engines: {node: '>=0.12.0'} + + is-obj@2.0.0: + resolution: {integrity: sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==} + engines: {node: '>=8'} + + is-path-inside@3.0.3: + resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} + engines: {node: '>=8'} + + is-plain-object@5.0.0: + resolution: {integrity: sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==} + engines: {node: '>=0.10.0'} + + is-potential-custom-element-name@1.0.1: + resolution: {integrity: sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==} + + is-stream@3.0.0: + resolution: {integrity: sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + + is-text-path@2.0.0: + resolution: {integrity: sha512-+oDTluR6WEjdXEJMnC2z6A4FRwFoYuvShVVEGsS7ewc0UTi2QtAKMDJuL4BDEVt+5T7MjFo12RP8ghOM75oKJw==} + engines: {node: '>=8'} + + is-unsafe@2.0.2: + resolution: {integrity: sha512-HgbIHPBH0KHHCcjLfGsCvhtPTVxjaAZlXjwdz7/GQC40SjSe4sfQsar8J5VFo8JOSbarkpV0OLG95bbaNd9aAQ==} + + is-url@1.2.4: + resolution: {integrity: sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww==} + + isexe@2.0.0: + resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + + istanbul-lib-coverage@3.2.2: + resolution: {integrity: sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==} + engines: {node: '>=8'} + + istanbul-lib-report@3.0.1: + resolution: {integrity: sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==} + engines: {node: '>=10'} + + istanbul-reports@3.2.0: + resolution: {integrity: sha512-HGYWWS/ehqTV3xN10i23tkPkpH46MLCIMFNCaaKNavAXTF1RkqxawEPtnjnGZ6XKSInBKkiOA5BKS+aZiY3AvA==} + engines: {node: '>=8'} + + jackspeak@3.4.3: + resolution: {integrity: sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==} + + javascript-natural-sort@0.7.1: + resolution: {integrity: sha512-nO6jcEfZWQXDhOiBtG2KvKyEptz7RVbpGP4vTD2hLBdmNQSsCiicO2Ioinv6UI4y9ukqnBpy+XZ9H6uLNgJTlw==} + + jiti@1.21.6: + resolution: {integrity: sha512-2yTgeWTWzMWkHu6Jp9NKgePDaYHbntiwvYuuJLbbN9vl7DC9DvXKOB2BC3ZZ92D3cvV/aflH0osDfwpHepQ53w==} + hasBin: true + + jiti@2.4.2: + resolution: {integrity: sha512-rg9zJN+G4n2nfJl5MW3BMygZX56zKPNVEYYqq7adpmMh4Jn2QNEwhvQlFy6jPVdcod7txZtKHWnyZiA3a0zP7A==} + hasBin: true + + jiti@2.7.0: + resolution: {integrity: sha512-AC/7JofJvZGrrneWNaEnJeOLUx+JlGt7tNa0wZiRPT4MY1wmfKjt2+6O2p2uz2+skll8OZZmJMNqeke7kKbNgQ==} + hasBin: true + + jmespath@0.16.0: + resolution: {integrity: sha512-9FzQjJ7MATs1tSpnco1K6ayiYE3figslrXA72G2HQ/n76RzvYlofyi5QM+iX4YRs/pu3yzxlVQSST23+dMDknw==} + engines: {node: '>= 0.6.0'} + + js-beautify@1.15.4: + resolution: {integrity: sha512-9/KXeZUKKJwqCXUdBxFJ3vPh467OCckSBmYDwSK/EtV090K+iMJ7zx2S3HLVDIWFQdqMIsZWbnaGiba18aWhaA==} + engines: {node: '>=14'} + hasBin: true + + js-beautify@2.0.3: + resolution: {integrity: sha512-cyFbh3tkPhknnTD/0bLf0T0yy2ZIbqL05mttzbt4y1Zfr7NxqXQZ62dkBLKs3oHH/lpjmDRAnciJiSUyOy8XwQ==} + engines: {node: '>=14'} + hasBin: true + + js-cookie@3.0.8: + resolution: {integrity: sha512-yeJd4aNAdYZQjaon2bpD/Gb0B/omw7HQOsynXXcOiWVCacbBcPlgn8S/d1X6blFSaHao7ozqtW7NZW19xpCtIw==} + + js-tokens@10.0.0: + resolution: {integrity: sha512-lM/UBzQmfJRo9ABXbPWemivdCW8V2G8FHaHdypQaIy523snUjog0W71ayWXTjiR+ixeMyVHN2XcpnTd/liPg/Q==} + + js-tokens@4.0.0: + resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} + + js-tokens@9.0.1: + resolution: {integrity: sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ==} + + js-yaml@4.3.2: + resolution: {integrity: sha512-SFNOvSJ+Dgf/9An904Yx+CgSlIPCkIpao4qo51lpee25TIRejdH3rhR4EZMGoNx3/TP3O+wzWuiTFl4sqbltzA==} + hasBin: true + + jsdom@26.1.0: + resolution: {integrity: sha512-Cvc9WUhxSMEo4McES3P7oK3QaXldCfNWp7pl2NNeiIFlCoLr3kfq9kb1fxftiwk1FLV7CvpvDfonxtzUDeSOPg==} + engines: {node: '>=18'} + peerDependencies: + canvas: ^3.0.0 + peerDependenciesMeta: + canvas: + optional: true + + jsesc@3.0.2: + resolution: {integrity: sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==} + engines: {node: '>=6'} + hasBin: true + + json-buffer@3.0.1: + resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} + + json-parse-even-better-errors@2.3.1: + resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} + + json-schema-traverse@0.4.1: + resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} + + json-schema-traverse@1.0.0: + resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} + + json-source-map@0.6.1: + resolution: {integrity: sha512-1QoztHPsMQqhDq0hlXY5ZqcEdUzxQEIxgFkKl4WUp2pgShObl+9ovi4kRh2TfvAfxAoHOJ9vIMEqk3k4iex7tg==} + + json-stable-stringify-without-jsonify@1.0.1: + resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} + + json5@2.2.3: + resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} + engines: {node: '>=6'} + hasBin: true + + jsonc-eslint-parser@2.4.0: + resolution: {integrity: sha512-WYDyuc/uFcGp6YtM2H0uKmUwieOuzeE/5YocFJLnLfclZ4inf3mRn8ZVy1s7Hxji7Jxm6Ss8gqpexD/GlKoGgg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + + jsoneditor@10.4.3: + resolution: {integrity: sha512-XBVYLkhgiHySC0PkGlac/Mbk738EpNnqBnxCJD4ttKKJ1JRIRngV8bf2zgw/J025jp4AqxOf2G3uDs/27cWHTQ==} + + jsonfile@6.1.0: + resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} + + jsonparse@1.3.1: + resolution: {integrity: sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==} + engines: {'0': node >= 0.2.0} + + jsonrepair@3.13.0: + resolution: {integrity: sha512-5YRzlAQ7tuzV1nAJu3LvDlrKtBFIALHN2+a+I1MGJCt3ldRDBF/bZuvIPzae8Epot6KBXd0awRZZcuoeAsZ/mw==} + hasBin: true + + katex@0.16.47: + resolution: {integrity: sha512-Eeo8Ys1doU1z+x8AZsPpQu+p/QcZBI5PeOo7QGQdy2x2m0MU/hYagBbGOmXwr5KVbEfVuWv9LpnQWeehogurjg==} + hasBin: true + + keycode@2.2.1: + resolution: {integrity: sha512-Rdgz9Hl9Iv4QKi8b0OlCRQEzp4AgVxyCtz5S/+VIHezDmrDhkp2N2TqBWOLz0/gbeREXOOiI9/4b8BY9uw2vFg==} + + keyv@4.5.4: + resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} + + keyv@5.6.0: + resolution: {integrity: sha512-CYDD3SOtsHtyXeEORYRx2qBtpDJFjRTGXUtmNEMGyzYOKj1TE3tycdlho7kA1Ufx9OYWZzg52QFBGALTirzDSw==} + + kind-of@6.0.3: + resolution: {integrity: sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==} + engines: {node: '>=0.10.0'} + + known-css-properties@0.37.0: + resolution: {integrity: sha512-JCDrsP4Z1Sb9JwG0aJ8Eo2r7k4Ou5MwmThS/6lcIe1ICyb7UBJKGRIUUdqc2ASdE/42lgz6zFUnzAIhtXnBVrQ==} + + lang-feel@2.2.0: + resolution: {integrity: sha512-Ebo5nftYsMfJzB3Ny8Oy4oaDXZXb5x61qtVVmKv6aImvAZUbT76mD60ZbEilizjZQzsR2CcU1iMK5sacIa1NVA==} + + levn@0.4.1: + resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} + engines: {node: '>= 0.8.0'} + + lezer-feel@1.4.0: + resolution: {integrity: sha512-kNxG7O38gwpuYy+C3JCRxQNTCE2qu9uTuH5dE3EGVnRhIQMe6rPDz0S8t3urLEOsMud6HI795m6zX2ujfUaqTw==} + + lilconfig@3.1.2: + resolution: {integrity: sha512-eop+wDAvpItUys0FWkHIKeC9ybYrTGbU41U5K7+bttZZeohvnY7M9dZ5kB21GNWiFT2q1OoPTvncPCgSOVO5ow==} + engines: {node: '>=14'} + + lines-and-columns@1.2.4: + resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} + + linkify-it@5.0.2: + resolution: {integrity: sha512-ONTm2jCMAVZjgQa/Fy1kScXsuOoF5NPTsoFBdE1KVIZ2vAh/r9+Bqo+0jINCBYnavTPQZz38QzFTme79ENoN3Q==} + + lint-staged@15.2.10: + resolution: {integrity: sha512-5dY5t743e1byO19P9I4b3x8HJwalIznL5E1FWYnU6OWw33KxNBSLAc6Cy7F2PsFEO8FKnLwjwm5hx7aMF0jzZg==} + engines: {node: '>=18.12.0'} + hasBin: true + + listr2@8.2.5: + resolution: {integrity: sha512-iyAZCeyD+c1gPyE9qpFu8af0Y+MRtmKOncdGoA2S5EY8iFq99dmmvkNnHiWo+pj0s7yH7l3KPIgee77tKpXPWQ==} + engines: {node: '>=18.0.0'} + + local-pkg@0.4.3: + resolution: {integrity: sha512-SFppqq5p42fe2qcZQqqEOiVRXl+WCP1MdT6k7BDEW1j++sp5fIY+/fdRQitvKgB5BrBcmrs5m/L0v2FrU5MY1g==} + engines: {node: '>=14'} + + local-pkg@0.5.1: + resolution: {integrity: sha512-9rrA30MRRP3gBD3HTGnC6cDFpaE1kVDWxWgqWJUN0RvDNAo+Nz/9GxB+nHOH0ifbVFy0hSA1V6vFDvnx54lTEQ==} + engines: {node: '>=14'} + + locate-path@5.0.0: + resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} + engines: {node: '>=8'} + + locate-path@6.0.0: + resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} + engines: {node: '>=10'} + + locate-path@7.2.0: + resolution: {integrity: sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + + lodash-es@4.18.1: + resolution: {integrity: sha512-J8xewKD/Gk22OZbhpOVSwcs60zhd95ESDwezOFuA3/099925PdHJ7OFHNTGtajL3AlZkykD32HykiMo+BIBI8A==} + + lodash-unified@1.0.3: + resolution: {integrity: sha512-WK9qSozxXOD7ZJQlpSqOT+om2ZfcT4yO+03FuzAHD0wF6S0l0090LRPDx3vhTTLZ8cFKpBn+IOcVXK6qOcIlfQ==} + peerDependencies: + '@types/lodash-es': '*' + lodash: ^4.18.1 + lodash-es: '*' + + lodash.camelcase@4.3.0: + resolution: {integrity: sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==} + + lodash.clonedeep@4.5.0: + resolution: {integrity: sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==} + + lodash.debounce@4.0.8: + resolution: {integrity: sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==} + + lodash.foreach@4.5.0: + resolution: {integrity: sha512-aEXTF4d+m05rVOAUG3z4vZZ4xVexLKZGF0lIxuHZ1Hplpk/3B6Z1+/ICICYRLm7c41Z2xiejbkCkJoTlypoXhQ==} + + lodash.isplainobject@4.0.6: + resolution: {integrity: sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==} + + lodash.kebabcase@4.1.1: + resolution: {integrity: sha512-N8XRTIMMqqDgSy4VLKPnJ/+hpGZN+PHQiJnSenYqPaVV/NCqEogTnAdZLQiGKhxX+JCs8waWq2t1XHWKOmlY8g==} + + lodash.merge@4.6.2: + resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} + + lodash.mergewith@4.6.2: + resolution: {integrity: sha512-GK3g5RPZWTRSeLSpgP8Xhra+pnjBC56q9FZYe1d5RN3TJ35dbkGy3YqBSMbyCrlbi+CM9Z3Jk5yTL7RCsqboyQ==} + + lodash.snakecase@4.1.1: + resolution: {integrity: sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw==} + + lodash.startcase@4.4.0: + resolution: {integrity: sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==} + + lodash.throttle@4.1.1: + resolution: {integrity: sha512-wIkUCfVKpVsWo3JSZlc+8MB5it+2AN5W8J7YVMST30UrvcQNZ1Okbj+rbVniijTWE6FGYy4XJq/rHkas8qJMLQ==} + + lodash.toarray@4.4.0: + resolution: {integrity: sha512-QyffEA3i5dma5q2490+SgCvDN0pXLmRGSyAANuVi0HQ01Pkfr9fuoKQW8wm1wGBnJITs/mS7wQvS6VshUEBFCw==} + + lodash.truncate@4.4.2: + resolution: {integrity: sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==} + + lodash.uniq@4.5.0: + resolution: {integrity: sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ==} + + lodash.upperfirst@4.3.1: + resolution: {integrity: sha512-sReKOYJIJf74dhJONhU4e0/shzi1trVbSWDOhKYE5XV2O+H7Sb2Dihwuc7xWxVl+DgFPyTqIN3zMfT9cq5iWDg==} + + lodash@4.18.1: + resolution: {integrity: sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==} + + log-update@6.1.0: + resolution: {integrity: sha512-9ie8ItPR6tjY5uYJh8K/Zrv/RMZ5VOlOWvtZdEHYSTFKZfIBPQa9tOAEeAWhd+AnIneLJ22w5fjOYtoutpWq5w==} + engines: {node: '>=18'} + + loglevel-colored-level-prefix@1.0.0: + resolution: {integrity: sha512-u45Wcxxc+SdAlh4yeF/uKlC1SPUPCy0gullSNKXod5I4bmifzk+Q4lSLExNEVn19tGaJipbZ4V4jbFn79/6mVA==} + + loglevel@1.9.2: + resolution: {integrity: sha512-HgMmCqIJSAKqo68l0rS2AanEWfkxaZ5wNiEFb5ggm08lDs9Xl2KxBlX3PTcaD2chBM1gXAYf491/M2Rv8Jwayg==} + engines: {node: '>= 0.6.0'} + + lru-cache@10.4.3: + resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==} + + lru-cache@11.5.3: + resolution: {integrity: sha512-U4N8FgzmWxc8k1VH8Kr6lQg18U7Fjvby6wXHVRX/ZZ7IwWbRMgrRbP0Wrb5q5NVinryp4SQampHKdvtecItxUg==} + engines: {node: 20 || >=22} + + lru-cache@5.1.1: + resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} + + luxon@3.7.2: + resolution: {integrity: sha512-vtEhXh/gNjI9Yg1u4jX/0YVPMvxzHuGgCm6tC5kZyb08yjGWGnqAjGJvcXbqQR2P3MyMEFnRbpcdFS6PBcLqew==} + engines: {node: '>=12'} + + m3u8-parser@4.8.0: + resolution: {integrity: sha512-UqA2a/Pw3liR6Df3gwxrqghCP17OpPlQj6RBPLYygf/ZSQ4MoSgvdvhvt35qV+3NaaA0FSZx93Ix+2brT1U7cA==} + + magic-string@0.30.14: + resolution: {integrity: sha512-5c99P1WKTed11ZC0HMJOj6CDIue6F8ySu+bJL+85q1zBEIY8IklrJ1eiKC2NDRh3Ct3FcvmJPyQHb9erXMTJNw==} + + magic-string@0.30.17: + resolution: {integrity: sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==} + + magic-string@0.30.21: + resolution: {integrity: sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==} + + magic-string@1.4.4: + resolution: {integrity: sha512-jQz9sVhrZuphH4NrAIHSgkDJCluQO7Ioi4KGRLa7aTUjAODQ13hENX0YIytqYE/rIkO485gQG2LeBxJaW53kkQ==} + + magicast@0.5.5: + resolution: {integrity: sha512-UicdXN8zQ3JHlxVq+28afMXPr1z7WNY6+7EJnzTdQWkTAlMLF5fNCCKxJHBQwGaNGR11581EiQmQzx73+MvszA==} + + make-dir@4.0.0: + resolution: {integrity: sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==} + engines: {node: '>=10'} + + markdown-it@14.3.3: + resolution: {integrity: sha512-L//tDAkjTjJCU6pBUSBTgs3Kg4InVaZuUZog/b6V12UKhcDQ7S78877ibbCanRExwPuYP1CZD7Gd2dxSy1GXRg==} + hasBin: true + + marked@17.0.6: + resolution: {integrity: sha512-gB0gkNafnonOw0obSTEGZTT86IuhILt2Wfx0mWH/1Au83kybTayroZ/V6nS25mN7u8ASy+5fMhgB3XPNrOZdmA==} + engines: {node: '>= 20'} + hasBin: true + + markmap-common@0.16.0: + resolution: {integrity: sha512-q3nlNDMKuWXTm3VwZFY9V5zteL/+iBLZanUK5vS+e26bUbzTSG5VtAzsyJbmgJm1WhwmIIAxbXEnp6JdvtTduA==} + + markmap-html-parser@0.16.1: + resolution: {integrity: sha512-/Mgm4g1qMQ8uEOz8h8K+jPspdgjfw29NqmfTLZSt8yG+vW7fWWduPjGRFc5axAZxCzP7PTzZLEuOxAqOwEg8Bg==} + peerDependencies: + markmap-common: '*' + + markmap-lib@0.16.1: + resolution: {integrity: sha512-jD8VsB67m677IRehGSwwVJDlC6PS+xzDKsJOwdvjZ+ndfXrHa1lyqfvR6mIwvGGUIciF86YEITSKL9hQTHE4Rw==} + peerDependencies: + markmap-common: '*' + + markmap-toolbar@0.17.2: + resolution: {integrity: sha512-WQ05P2xvQmZT0ybRUE0uRzrs30aXlJ6/yEUsA6A9nYEwm8T9jSwBxIM/5zYlkH/XzUcsRRxtCa4k1IWR74gkpQ==} + peerDependencies: + markmap-common: '*' + + markmap-view@0.16.0: + resolution: {integrity: sha512-JOiSEThs8B4bAP9E6rcCWOz2SsMwCBFaR76wLARRVb04C/qLiLmvrm675kNPq4lRBAwtugHCYvjG0otpSlB4Cw==} + peerDependencies: + markmap-common: '*' + + math-intrinsics@1.1.0: + resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==} + engines: {node: '>= 0.4'} + + mathml-tag-names@2.1.3: + resolution: {integrity: sha512-APMBEanjybaPzUrfqU0IMU5I0AswKMH7k8OTLs0vvV4KZpExkTkY87nR/zpbuTPj+gARop7aGUbl11pnDfW6xg==} + + mdn-data@2.0.28: + resolution: {integrity: sha512-aylIc7Z9y4yzHYAJNuESG3hfhC+0Ibp/MAMiaOZgNv4pmEdFyfZhhhny4MNiAfWdBQ1RQ2mfDWmM1x8SvGyp8g==} + + mdn-data@2.27.1: + resolution: {integrity: sha512-9Yubnt3e8A0OKwxYSXyhLymGW4sCufcLG6VdiDdUGVkPhpqLxlvP5vl1983gQjJl3tqbrM731mjaZaP68AgosQ==} + + mdurl@2.0.0: + resolution: {integrity: sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==} + + memoize-one@6.0.0: + resolution: {integrity: sha512-rkpe71W0N0c0Xz6QD0eJETuWAJGnJ9afsl1srmwPrI+yBCkge5EycXXbYRyvL29zZVUWQCY7InPRCv3GDXuZNw==} + + meow@12.1.1: + resolution: {integrity: sha512-BhXM0Au22RwUneMPwSCnyhTOizdWoIEPU9sp0Aqa1PnDMR5Wv2FGXYDjuzJEIX+Eo2Rb8xuYe5jrnm5QowQFkw==} + engines: {node: '>=16.10'} + + meow@13.2.0: + resolution: {integrity: sha512-pxQJQzB6djGPXh08dacEloMFopsOqGVRKFPYvPOt9XDZ1HasbgDZA74CJGreSU4G3Ak7EFJGoiH2auq+yXISgA==} + engines: {node: '>=18'} + + merge-stream@2.0.0: + resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} + + merge2@1.4.1: + resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} + engines: {node: '>= 8'} + + micromatch@4.0.8: + resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==} + engines: {node: '>=8.6'} + + mime-db@1.52.0: + resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} + engines: {node: '>= 0.6'} + + mime-match@1.0.2: + resolution: {integrity: sha512-VXp/ugGDVh3eCLOBCiHZMYWQaTNUHv2IJrut+yXA6+JbLPXHglHwfS/5A5L0ll+jkCY7fIzRJcH6OIunF+c6Cg==} + + mime-types@2.1.35: + resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==} + engines: {node: '>= 0.6'} + + mimic-fn@4.0.0: + resolution: {integrity: sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==} + engines: {node: '>=12'} + + mimic-function@5.0.1: + resolution: {integrity: sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==} + engines: {node: '>=18'} + + min-dash@4.2.2: + resolution: {integrity: sha512-qbhSYUxk6mBaF096B3JOQSumXbKWHenmT97cSpdNzgkWwGjhjhE/KZODCoDNhI2I4C9Cb6R/Q13S4BYkUSXoXQ==} + + min-dash@5.1.0: + resolution: {integrity: sha512-HAvN6XzmCQj+js43G9sJRRw8kj/7DvoxN7qhoIN9Xo5ZN1NMljtpyKs/NunXmw0QSWwlgZzNv6tLeEa4xaZ0tg==} + + min-document@2.19.2: + resolution: {integrity: sha512-8S5I8db/uZN8r9HSLFVWPdJCvYOejMcEC82VIzNUc6Zkklf/d1gg2psfE79/vyhWOj4+J8MtwmoOz3TmvaGu5A==} + + min-dom@4.2.1: + resolution: {integrity: sha512-TMoL8SEEIhUWYgkj7XMSgxmwSyGI+4fP2KFFGnN3FbHfbGHVdsLYSz8LoIsgPhz4dWRmLvxWWSMgzZMJW5sZuA==} + + min-dom@5.3.0: + resolution: {integrity: sha512-0w5FEBgPAyHhmFojW3zxd7we3D+m5XYS3E/06OyvxmbHJoiQVa4Nagj6RWvoAKYRw5xth6cP5TMePc5cR1M9hA==} + + minimatch@10.2.6: + resolution: {integrity: sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==} + engines: {node: 18 || 20 || >=22} + + minimatch@3.1.5: + resolution: {integrity: sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==} + + minimatch@5.1.9: + resolution: {integrity: sha512-7o1wEA2RyMP7Iu7GNba9vc0RWWGACJOCZBJX2GJWip0ikV+wcOsgVuY9uE8CPiyQhkGFSlhuSkZPavN7u1c2Fw==} + engines: {node: '>=10'} + + minimatch@9.0.9: + resolution: {integrity: sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==} + engines: {node: '>=16 || 14 >=14.17'} + + minimist@1.2.8: + resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} + + minipass@7.1.2: + resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==} + engines: {node: '>=16 || 14 >=14.17'} + + minipass@7.1.3: + resolution: {integrity: sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==} + engines: {node: '>=16 || 14 >=14.17'} + + mitt@3.0.1: + resolution: {integrity: sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==} + + mlly@1.7.3: + resolution: {integrity: sha512-xUsx5n/mN0uQf4V548PKQ+YShA4/IW0KI1dZhrNrPCLG+xizETbHTkOa1f8/xut9JRPp8kQuMnz0oqwkTiLo/A==} + + moddle-xml@10.1.0: + resolution: {integrity: sha512-erWckwLt+dYskewKXJso9u+aAZ5172lOiYxSOqKCPTy7L/xmqH1PoeoA7eVC7oJTt3PqF5TkZzUmbjGH6soQBg==} + + moddle@6.2.3: + resolution: {integrity: sha512-bLVN+ZHL3aKnhxc19XtjUfvdJsS3EsiEJC7bT6YPD11qYmTzvsxrGgyYz1Ouof7TZuGw0lDJ1OLmEnxcpQWk3Q==} + + mpd-parser@0.22.1: + resolution: {integrity: sha512-fwBebvpyPUU8bOzvhX0VQZgSohncbgYwUyJJoTSNpmy7ccD2ryiCvM7oRkn/xQH5cv73/xU7rJSNCLjdGFor0Q==} + hasBin: true + + ms@2.1.3: + resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + + muggle-string@0.1.0: + resolution: {integrity: sha512-Tr1knR3d2mKvvWthlk7202rywKbiOm4rVFLsfAaSIhJ6dt9o47W4S+JMtWhd/PW9Wrdew2/S2fSvhz3E2gkfEg==} + + muggle-string@0.3.1: + resolution: {integrity: sha512-ckmWDJjphvd/FvZawgygcUeQCxzvohjFO5RxTjj4eq8kw359gFF3E1brjfI+viLMxss5JrHTDRHZvu2/tuy0Qg==} + + mux.js@6.0.1: + resolution: {integrity: sha512-22CHb59rH8pWGcPGW5Og7JngJ9s+z4XuSlYvnxhLuc58cA1WqGDQPzuG8I+sPm1/p0CdgpzVTaKW408k5DNn8w==} + engines: {node: '>=8', npm: '>=5'} + hasBin: true + + namespace-emitter@2.0.1: + resolution: {integrity: sha512-N/sMKHniSDJBjfrkbS/tpkPj4RAbvW3mr8UAzvlMHyun93XEm83IAvhWtJVHo+RHn/oO8Job5YN4b+wRjSVp5g==} + + nanoid@3.3.20: + resolution: {integrity: sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + + nanoid@5.1.16: + resolution: {integrity: sha512-kVrnsrJqMR8+oLJnGEmSWw9BivK5mt7H3FZatVRjrc5wGqFYuBxX1yG7+A7Gi5AefkX6t/oCkizcQgpu0cY1dQ==} + engines: {node: ^18 || >=20} + hasBin: true + + natural-compare@1.4.0: + resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} + + next-tick@1.1.0: + resolution: {integrity: sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==} + + node-addon-api@7.1.1: + resolution: {integrity: sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==} + + node-fetch-native@1.6.7: + resolution: {integrity: sha512-g9yhqoedzIUm0nTnTqAQvueMPVOuIY16bqgAJJC8XOOubYFNwz6IER9qs0Gq2Xd0+CecCKFjtdDTMA4u4xG06Q==} + + node-fetch@2.7.0: + resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==} + engines: {node: 4.x || >=6.0.0} + peerDependencies: + encoding: ^0.1.0 + peerDependenciesMeta: + encoding: + optional: true + + node-releases@2.0.60: + resolution: {integrity: sha512-OmO8+GM1JUZqXET720VrJCwkjUCXmCMQm0Z3UDDRbfNLHS4NEAvY60j5jiFv0tkKw2PNNlqOLhahVmwJIOLDIQ==} + engines: {node: '>=18'} + + nopt@10.0.1: + resolution: {integrity: sha512-df3sBr/6ax9hSGuC3CspvLlbnX8cP5L5nZwXF8cGN8l0zSWR6BvzmQ6jPUKjvo6+/xdpkNvEcucBNUdBeeV13g==} + engines: {node: ^22.22.2 || ^24.15.0 || >=26.0.0} + hasBin: true + + nopt@7.2.1: + resolution: {integrity: sha512-taM24ViiimT/XntxbPyJQzCG+p4EKOpgD3mxFwW38mGjVUrfERQOeY4EDHjdnptttfHuHQXFx+lTP08Q+mLa/w==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + hasBin: true + + normalize-path@3.0.0: + resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} + engines: {node: '>=0.10.0'} + + normalize-wheel-es@1.2.0: + resolution: {integrity: sha512-Wj7+EJQ8mSuXr2iWfnujrimU35R2W4FAErEyTmJoJ7ucwTn2hOUSsRehMb5RSYkxXGTM7Y9QpvPmp++w5ftoJw==} + + nostics@1.3.0: + resolution: {integrity: sha512-wzRsrJwNlFbqIRQt8aCeL2WE8USip/uuvGSOZV1D02CxX8ABTMbw8IywKjH7yWHETMXbWJI4OBpihg9rmz2Vyg==} + + npm-run-path@5.3.0: + resolution: {integrity: sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + + npm2url@0.2.4: + resolution: {integrity: sha512-arzGp/hQz0Ey+ZGhF64XVH7Xqwd+1Q/po5uGiBbzph8ebX6T0uvt3N7c1nBHQNsQVykQgHhqoRTX7JFcHecGuw==} + + nprogress@0.2.0: + resolution: {integrity: sha512-I19aIingLgR1fmhftnbWWO3dXc0hSxqHQHQb3H8m+K3TnEn/iSeTZZOyvKXWqQESMwuUVnatlCnZdLBZZt2VSA==} + + nth-check@2.1.1: + resolution: {integrity: sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==} + + nwsapi@2.2.28: + resolution: {integrity: sha512-IlVB7OS7qrOsVYlpnFIkETjMwT9jwvmocJmmM+GZU/PAB3uGi9Ezd7vcWhWBUnSc0ya4ppmQITOyP1ez9gg8cg==} + + object-inspect@1.13.4: + resolution: {integrity: sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==} + engines: {node: '>= 0.4'} + + object-refs@0.3.0: + resolution: {integrity: sha512-eP0ywuoWOaDoiake/6kTJlPJhs+k0qNm4nYRzXLNHj6vh+5M3i9R1epJTdxIPGlhWc4fNRQ7a6XJNCX+/L4FOQ==} + + object-refs@0.4.0: + resolution: {integrity: sha512-6kJqKWryKZmtte6QYvouas0/EIJKPI1/MMIuRsiBlNuhIMfqYTggzX2F1AJ2+cDs288xyi9GL7FyasHINR98BQ==} + + obug@2.2.1: + resolution: {integrity: sha512-XrsrhT5sybtKI6wakr2SPOlGZWWYbUXZ7a0jT8/QOeAPau+1X/bSegNe5YR75oJmEZQbKningirmGOEJCIk61Q==} + engines: {node: '>=12.20.0'} + + ofetch@1.5.1: + resolution: {integrity: sha512-2W4oUZlVaqAPAil6FUg/difl6YhqhUR7x2eZY4bQCko22UXg3hptq9KLQdqFClV+Wu85UX7hNtdGTngi/1BxcA==} + + once@1.4.0: + resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} + + onetime@6.0.0: + resolution: {integrity: sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==} + engines: {node: '>=12'} + + onetime@7.0.0: + resolution: {integrity: sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==} + engines: {node: '>=18'} + + optionator@0.9.4: + resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} + engines: {node: '>= 0.8.0'} + + oxc-parser@0.153.0: + resolution: {integrity: sha512-cEnpyyV1OJRXv++SFNw0z8i+2o/cr88rVLaOYJafELDoHM5yHvCAbwGRLvxuany6SNLcbblSMUyZaGzH+quSYg==} + engines: {node: ^20.19.0 || >=22.12.0} + + oxc-walker@1.1.1: + resolution: {integrity: sha512-Hwd7dq28zu/Er99+bpWp16CGwFrhyalJh0W3JOB7XpPvgWo3MqMi2ksWGKuzzA9zt50mJ2pIUwR5lpAdZ9ACNQ==} + peerDependencies: + '@oxc-project/types': '>=0.98.0' + oxc-parser: '>=0.98.0' + rolldown: '>=1.0.0' + peerDependenciesMeta: + '@oxc-project/types': + optional: true + oxc-parser: + optional: true + rolldown: + optional: true + + p-limit@2.3.0: + resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} + engines: {node: '>=6'} + + p-limit@3.1.0: + resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} + engines: {node: '>=10'} + + p-limit@4.0.0: + resolution: {integrity: sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + + p-locate@4.1.0: + resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} + engines: {node: '>=8'} + + p-locate@5.0.0: + resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} + engines: {node: '>=10'} + + p-locate@6.0.0: + resolution: {integrity: sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + + p-retry@6.1.0: + resolution: {integrity: sha512-fJLEQ2KqYBJRuaA/8cKMnqhulqNM+bpcjYtXNex2t3mOXKRYPitAJt9NacSf8XAFzcYahSAbKpobiWDSqHSh2g==} + engines: {node: '>=16.17'} + + p-try@2.2.0: + resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} + engines: {node: '>=6'} + + package-json-from-dist@1.0.1: + resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==} + + package-manager-detector@1.9.0: + resolution: {integrity: sha512-zAMfbta9nPA8AKkA4WdmNAT8R8s6Dk0/xwPsqNnRidMFcLo1YkLuPDTgs2f64XdzS8vbLNnoJ+uUIkgbz7oRHA==} + + parent-module@1.0.1: + resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} + engines: {node: '>=6'} + + parse-json@5.2.0: + resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} + engines: {node: '>=8'} + + parse5-htmlparser2-tree-adapter@7.1.0: + resolution: {integrity: sha512-ruw5xyKs6lrpo9x9rCZqZZnIUntICjQAd0Wsmp396Ul9lN/h+ifgVV1x1gZHi8euej6wTfpqX8j+BFQxF0NS/g==} + + parse5@7.2.1: + resolution: {integrity: sha512-BuBYQYlv1ckiPdQi/ohiivi9Sagc9JG+Ozs0r7b/0iK3sKmrb0b9FdWdBbOdx6hBCM/F9Ir82ofnBhtZOjCRPQ==} + + path-browserify@1.0.1: + resolution: {integrity: sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==} + + path-exists@4.0.0: + resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} + engines: {node: '>=8'} + + path-exists@5.0.0: + resolution: {integrity: sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + + path-expression-matcher@1.6.2: + resolution: {integrity: sha512-enSlaiat05iasnzmgNxRj8reFdj3puY2QpNgP1aPIaVfT6nn9ICuPoFlKHk8EN22HcwewshO+mN2DGbkCEOtqQ==} + engines: {node: '>=14.0.0'} + + path-intersection@2.2.1: + resolution: {integrity: sha512-9u8xvMcSfuOiStv9bPdnRJQhGQXLKurew94n4GPQCdH1nj9QKC9ObbNoIpiRq8skiOBxKkt277PgOoFgAt3/rA==} + + path-intersection@3.1.0: + resolution: {integrity: sha512-3xS3lvv/vuwm5aH2BVvNRvnvwR2Drde7jQClKpCXTYXIMMjcw/EnMhzCgeHwqbCpzi760PEfAkU53vSIlrNr9A==} + engines: {node: '>= 14.20'} + + path-is-absolute@1.0.1: + resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} + engines: {node: '>=0.10.0'} + + path-key@3.1.1: + resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} + engines: {node: '>=8'} + + path-key@4.0.0: + resolution: {integrity: sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==} + engines: {node: '>=12'} + + path-parse@1.0.7: + resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} + + path-scurry@1.11.1: + resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==} + engines: {node: '>=16 || 14 >=14.18'} + + path-scurry@2.0.2: + resolution: {integrity: sha512-3O/iVVsJAPsOnpwWIeD+d6z/7PmqApyQePUtCndjatj/9I5LylHvt5qluFaBT3I5h3r1ejfR056c+FCv+NnNXg==} + engines: {node: 18 || 20 || >=22} + + path-type@4.0.0: + resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} + engines: {node: '>=8'} + + pathe@1.1.2: + resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==} + + pathe@2.0.3: + resolution: {integrity: sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==} + + perfect-debounce@2.1.0: + resolution: {integrity: sha512-LjgdTytVFXeUgtHZr9WYViYSM/g8MkcTPYDlPa3cDqMirHjKiSZPYd6DoL7pK8AJQr+uWkQvCjHNdiMqsrJs+g==} + + picocolors@1.1.1: + resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} + + picomatch@2.3.2: + resolution: {integrity: sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==} + engines: {node: '>=8.6'} + + picomatch@4.0.7: + resolution: {integrity: sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==} + engines: {node: '>=12'} + + picomodal@3.0.0: + resolution: {integrity: sha512-FoR3TDfuLlqUvcEeK5ifpKSVVns6B4BQvc8SDF6THVMuadya6LLtji0QgUDSStw0ZR2J7I6UGi5V2V23rnPWTw==} + + pidtree@0.6.0: + resolution: {integrity: sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g==} + engines: {node: '>=0.10'} + hasBin: true + + pinia-plugin-persistedstate@3.2.3: + resolution: {integrity: sha512-Cm819WBj/s5K5DGw55EwbXDtx+EZzM0YR5AZbq9XE3u0xvXwvX2JnWoFpWIcdzISBHqy9H1UiSIUmXyXqWsQRQ==} + peerDependencies: + pinia: ^2.0.0 + + pinia@2.2.8: + resolution: {integrity: sha512-NRTYy2g+kju5tBRe0oNlriZIbMNvma8ZJrpHsp3qudyiMEA8jMmPPKQ2QMHg0Oc4BkUyQYWagACabrwriCK9HQ==} + peerDependencies: + '@vue/composition-api': ^1.4.0 + typescript: '>=4.4.4' + vue: ^2.6.14 || ^3.5.11 + peerDependenciesMeta: + '@vue/composition-api': + optional: true + typescript: + optional: true + + pkcs7@1.0.4: + resolution: {integrity: sha512-afRERtHn54AlwaF2/+LFszyAANTCggGilmcmILUzEjvs3XgFZT+xE6+QWQcAGmu4xajy+Xtj7acLOPdx5/eXWQ==} + hasBin: true + + pkg-types@1.2.1: + resolution: {integrity: sha512-sQoqa8alT3nHjGuTjuKgOnvjo4cljkufdtLMnO2LBP/wRwuDlo1tkaEdMxCRhyGRPacv/ztlZgDPm2b7FAmEvw==} + + pngjs@5.0.0: + resolution: {integrity: sha512-40QW5YalBNfQo5yRYmiw7Yz6TKKVr3h6970B2YE+3fQpsWcrbj1PzJgxeJ19DRQjhMbKPIuMY8rFaXc8moolVw==} + engines: {node: '>=10.13.0'} + + postcss-html@1.8.1: + resolution: {integrity: sha512-OLF6P7qctfAWayOhLpcVnTGqVeJzu2W3WpIYelfz2+JV5oGxfkcEvweN9U4XpeqE0P98dcD9ssusGwlF0TK0uQ==} + engines: {node: ^12 || >=14} + + postcss-resolve-nested-selector@0.1.6: + resolution: {integrity: sha512-0sglIs9Wmkzbr8lQwEyIzlDOOC9bGmfVKcJTaxv3vMmd3uo4o4DerC3En0bnmgceeql9BfC8hRkp7cg0fjdVqw==} + + postcss-safe-parser@6.0.0: + resolution: {integrity: sha512-FARHN8pwH+WiS2OPCxJI8FuRJpTVnn6ZNFiqAM2aeW2LwTHWWmWgIyKC6cUo0L8aeKiF/14MNvnpls6R2PBeMQ==} + engines: {node: '>=12.0'} + peerDependencies: + postcss: 8.5.31 + + postcss-safe-parser@7.0.1: + resolution: {integrity: sha512-0AioNCJZ2DPYz5ABT6bddIqlhgwhpHZ/l65YAYo0BCIn0xiDpsnTHz0gnoTGk0OXZW0JRs+cDwL8u/teRdz+8A==} + engines: {node: '>=18.0'} + peerDependencies: + postcss: 8.5.31 + + postcss-scss@4.0.9: + resolution: {integrity: sha512-AjKOeiwAitL/MXxQW2DliT28EKukvvbEWx3LBmJIRN8KfBGZbRTxNYW0kSqi1COiTZ57nZ9NW06S6ux//N1c9A==} + engines: {node: '>=12.0'} + peerDependencies: + postcss: 8.5.31 + + postcss-selector-parser@6.1.5: + resolution: {integrity: sha512-TEHFzb5KRDKaOgJ4TYE+0jyJtFbjLvkdVOu0fZ2b6MTWzoqZd4Le+61aEppWkvTlYePgOX4ATL1wsAIPMLTw6Q==} + engines: {node: '>=4'} + + postcss-selector-parser@7.1.7: + resolution: {integrity: sha512-wWBro/7hJ40ye6TPiXkUQoXKCw23xSsjriUvqd7Uls9Sso3oLiON1flc18cCdnjgCRXw4fBVqUJJeOdDTh3P3g==} + engines: {node: '>=4'} + + postcss-sorting@8.0.2: + resolution: {integrity: sha512-M9dkSrmU00t/jK7rF6BZSZauA5MAaBW4i5EnJXspMwt4iqTh/L9j6fgMnbElEOfyRyfLfVbIHj/R52zHzAPe1Q==} + peerDependencies: + postcss: 8.5.31 + + postcss-value-parser@4.2.0: + resolution: {integrity: sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==} + + postcss@8.5.31: + resolution: {integrity: sha512-YUbWYCgErwnMAVkjUnYa+KlMBzGpHwiIt/DE7f0G33AuX2LH9UcTk6KgWxd3zRU+pN3u/C+Xl3EnMLM4Hea7Sg==} + engines: {node: ^10 || ^12 || >=14} + + preact@10.25.0: + resolution: {integrity: sha512-6bYnzlLxXV3OSpUxLdaxBmE7PMOu0aR3pG6lryK/0jmvcDFPlcXGQAt5DpK3RITWiDrfYZRI0druyaK/S9kYLg==} + + preact@10.29.8: + resolution: {integrity: sha512-ej2aVZ+vZ8WO7tvlQWRM9N63A0KzF9q4mWJfDUHgYaIofWY9hu74QdnQrjoPMmZi2/nZ5gN0bJCQF49xQqx09Q==} + peerDependencies: + preact-render-to-string: '>=5' + peerDependenciesMeta: + preact-render-to-string: + optional: true + + prelude-ls@1.2.1: + resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} + engines: {node: '>= 0.8.0'} + + prettier-eslint@16.3.0: + resolution: {integrity: sha512-Lh102TIFCr11PJKUMQ2kwNmxGhTsv/KzUg9QYF2Gkw259g/kPgndZDWavk7/ycbRvj2oz4BPZ1gCU8bhfZH/Xg==} + engines: {node: '>=16.10.0'} + peerDependencies: + prettier-plugin-svelte: ^3.0.0 + svelte-eslint-parser: '*' + peerDependenciesMeta: + prettier-plugin-svelte: + optional: true + svelte-eslint-parser: + optional: true + + prettier-linter-helpers@1.0.1: + resolution: {integrity: sha512-SxToR7P8Y2lWmv/kTzVLC1t/GDI2WGjMwNhLLE9qtH8Q13C+aEmuRlzDst4Up4s0Wc8sF2M+J57iB3cMLqftfg==} + engines: {node: '>=6.0.0'} + + prettier@3.9.10: + resolution: {integrity: sha512-skGHTH1Yb9QvaTC4hWnRTzEYtCpApF0UMBPz+t/0ZPzP8ihefo/btKd+QA7pUE0fEwA1SbS/NmhyEcstdXOIdA==} + engines: {node: '>=14'} + hasBin: true + + pretty-format@29.7.0: + resolution: {integrity: sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + prismjs@1.30.0: + resolution: {integrity: sha512-DEvV2ZF2r2/63V+tK8hQvrR2ZGn10srHbXviTlcv7Kpzw8jWiNTqbVgjO3IY8RxrrOUF8VPMQQFysYYYv0YZxw==} + engines: {node: '>=6'} + + process@0.11.10: + resolution: {integrity: sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==} + engines: {node: '>= 0.6.0'} + + progress@2.0.3: + resolution: {integrity: sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==} + engines: {node: '>=0.4.0'} + + proto-list@1.2.4: + resolution: {integrity: sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==} + + proxy-from-env@1.1.0: + resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==} + + proxy-from-env@2.1.0: + resolution: {integrity: sha512-cJ+oHTW1VAEa8cJslgmUZrc+sjRKgAKl3Zyse6+PV38hZe/V6Z14TbCuXcan9F9ghlz4QrFr2c92TNF82UkYHA==} + engines: {node: '>=10'} + + punycode.js@2.3.1: + resolution: {integrity: sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==} + engines: {node: '>=6'} + + punycode@1.4.1: + resolution: {integrity: sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==} + + punycode@2.3.1: + resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} + engines: {node: '>=6'} + + qified@0.10.1: + resolution: {integrity: sha512-+Owyggi9IxT1ePKGafcI87ubSmxol6smwJ+RAHDQlx9+9cPwFWDiKFFCPuWhr9ignlGpZ9vDQLw67N4dcTVFEA==} + engines: {node: '>=20'} + + qrcode@1.5.4: + resolution: {integrity: sha512-1ca71Zgiu6ORjHqFBDpnSMTR2ReToX4l1Au1VFLyVeBTFavzQnv5JxMFr3ukHVKpSrSA2MCk0lNJSykjUfz7Zg==} + engines: {node: '>=10.13.0'} + hasBin: true + + qs@6.16.1: + resolution: {integrity: sha512-5Px6J7rfHBAGUhNQ3es4YzcOdBBw0SDcVtThJml4RdnKw4tKs2epA0kPZ+K8X+WiHktT93RHVcQ/3ym5aTCgtg==} + engines: {node: '>=0.6'} + + quansync@0.2.8: + resolution: {integrity: sha512-4+saucphJMazjt7iOM27mbFCk+D9dd/zmgMDCzRZ8MEoBfYp7lAvoN38et/phRQF6wOPMy/OROBGgoWeSKyluA==} + + quansync@1.0.0: + resolution: {integrity: sha512-5xZacEEufv3HSTPQuchrvV6soaiACMFnq1H8wkVioctoH3TRha9Sz66lOxRwPK/qZj7HPiSveih9yAyh98gvqA==} + + queue-microtask@1.2.3: + resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} + + randomcolor@0.6.2: + resolution: {integrity: sha512-Mn6TbyYpFgwFuQ8KJKqf3bqqY9O1y37/0jgSK/61PUxV4QfIMv0+K2ioq8DfOjkBslcjwSzRfIDEXfzA9aCx7A==} + + rd@2.0.1: + resolution: {integrity: sha512-/XdKU4UazUZTXFmI0dpABt8jSXPWcEyaGdk340KdHnsEOdkTctlX23aAK7ChQDn39YGNlAJr1M5uvaKt4QnpNw==} + + react-is@18.3.1: + resolution: {integrity: sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==} + + readdirp@3.6.0: + resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} + engines: {node: '>=8.10.0'} + + readdirp@5.1.1: + resolution: {integrity: sha512-Kko+Y5XQ6fM+Ce3dq3m9YGxnacYZYl9cA1wZjaF3Vbry2L3i1qVg8+CAgNPsXRArPMUMCaOR7oa9Nqntc43JKA==} + engines: {node: '>= 20.19.0'} + + remarkable-katex@1.2.1: + resolution: {integrity: sha512-Y1VquJBZnaVsfsVcKW2hmjT+pDL7mp8l5WAVlvuvViltrdok2m1AIKmJv8SsH+mBY84PoMw67t3kTWw1dIm8+g==} + + remarkable@2.0.1: + resolution: {integrity: sha512-YJyMcOH5lrR+kZdmB0aJJ4+93bEojRZ1HGDn9Eagu6ibg7aVZhc3OWbbShRid+Q5eAfsEqWxpe+g5W5nYNfNiA==} + engines: {node: '>= 6.0.0'} + hasBin: true + + require-directory@2.1.1: + resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} + engines: {node: '>=0.10.0'} + + require-from-string@2.0.2: + resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} + engines: {node: '>=0.10.0'} + + require-main-filename@2.0.0: + resolution: {integrity: sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==} + + require-relative@0.8.7: + resolution: {integrity: sha512-AKGr4qvHiryxRb19m3PsLRGuKVAbJLUD7E6eOaHkfKhwc+vSgVOCY5xNvm9EkolBKTOf0GrQAZKLimOCz81Khg==} + + resolve-from@4.0.0: + resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} + engines: {node: '>=4'} + + resolve-from@5.0.0: + resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} + engines: {node: '>=8'} + + resolve@1.22.8: + resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==} + hasBin: true + + restore-cursor@5.1.0: + resolution: {integrity: sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA==} + engines: {node: '>=18'} + + retry@0.13.1: + resolution: {integrity: sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==} + engines: {node: '>= 4'} + + reusify@1.0.4: + resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} + engines: {iojs: '>=1.0.0', node: '>=0.10.0'} + + rfdc@1.4.1: + resolution: {integrity: sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==} + + rimraf@3.0.2: + resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} + deprecated: Rimraf versions prior to v4 are no longer supported + hasBin: true + + rimraf@5.0.10: + resolution: {integrity: sha512-l0OE8wL34P4nJH/H2ffoaniAokM2qSmrtXHmlpvYr5AVVX8msAyW0l8NVJFDxlSK4u3Uh/f41cQheDVdnYijwQ==} + hasBin: true + + robust-predicates@3.0.2: + resolution: {integrity: sha512-IXgzBWvWQwE6PrDI05OvmXUIruQTcoMDzRsOd5CDvHCVLcLHMTSYvOK5Cm46kWqlV3yAbuSpBZdJ5oP5OUoStg==} + + rollup-plugin-purge-icons@0.10.0: + resolution: {integrity: sha512-GD2ftg4L9G/sagIhtCmBn5vdyzePOisniythubpbywP0Q3ix9rZuDeFvgXTPemOsc22pvH7t22ryYQIl0rwGog==} + engines: {node: '>= 12'} + + rollup@2.80.0: + resolution: {integrity: sha512-cIFJOD1DESzpjOBl763Kp1AH7UE/0fcdHe6rZXUdQ9c50uvgigvW97u3IcSeBwOkgqL/PXPBktBCh0KEu5L8XQ==} + engines: {node: '>=10.0.0'} + hasBin: true + + rollup@4.65.0: + resolution: {integrity: sha512-QVCvQUTGDN6JRwi3jVGCY3H4aTHvi9rX0LyoBMkGUvdh/Z6O51CzcLz85BWZaTCDGhl6ySGqYZs+xI1jmPqGcw==} + engines: {node: '>=18.0.0', npm: '>=8.0.0'} + hasBin: true + + rou3@1.0.0: + resolution: {integrity: sha512-ySeaQkSrua+ut9g+65I7FHqOFBaY8tV0FmccXItoq0q21se32Q3u4YiW7/RqXSosWgYJaaKwRHXy3BST9PeCNQ==} + engines: {node: '>=20.19.0'} + + rrweb-cssom@0.8.0: + resolution: {integrity: sha512-guoltQEx+9aMf2gDZ0s62EcV8lsXR+0w8915TC3ITdn2YueuNjdAYh/levpU9nFaoChh9RUS5ZdQMrKfVEN9tw==} + + run-parallel@1.2.0: + resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} + + rust-result@1.0.0: + resolution: {integrity: sha512-6cJzSBU+J/RJCF063onnQf0cDUOHs9uZI1oroSGnHOph+CQTIJ5Pp2hK5kEQq1+7yE/EEWfulSNXAQ2jikPthA==} + + rw@1.3.3: + resolution: {integrity: sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ==} + + safe-json-parse@4.0.0: + resolution: {integrity: sha512-RjZPPHugjK0TOzFrLZ8inw44s9bKox99/0AZW9o/BEQVrJfhI+fIHMErnPyRa89/yRXUUr93q+tiN6zhoVV4wQ==} + + safer-buffer@2.1.2: + resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} + + sass@1.106.1: + resolution: {integrity: sha512-kD+Gi66vycZcbJt+42NC4z4PXNMcCajVrJPhqoKKXy5cOBMmJQt052CxIBcRjwYXeImHYOpu/ydWWGZQIenl7A==} + engines: {node: '>=20.19.0'} + hasBin: true + + sax@1.4.1: + resolution: {integrity: sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==} + + sax@1.6.1: + resolution: {integrity: sha512-42tBVwLWnaQvW5zc4HbZrTuWccECCZfBi92FDuwtqxasH+JbPB3/FOKb1m222K42R4WxuxzzMsTswfzgtSu64Q==} + engines: {node: '>=11.0.0'} + + saxen@8.1.2: + resolution: {integrity: sha512-xUOiiFbc3Ow7p8KMxwsGICPx46ZQvy3+qfNVhrkwfz3Vvq45eGt98Ft5IQaA1R/7Tb5B5MKh9fUR9x3c3nDTxw==} + + saxes@6.0.0: + resolution: {integrity: sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==} + engines: {node: '>=v12.22.7'} + + scroll-into-view-if-needed@3.1.0: + resolution: {integrity: sha512-49oNpRjWRvnU8NyGVmUaYG4jtTkNonFZI86MmGRDqBphEK2EXT9gdEUoQPZhuBM8yWHxCWbobltqYO5M4XrUvQ==} + + scule@1.3.0: + resolution: {integrity: sha512-6FtHJEvt+pVMIB9IBY+IcCJ6Z5f1iQnytgyfKMhDKgmzYG+TeH/wx1y3l27rshSbLiSanrR9ffZDrEsmjlQF2g==} + + semver@6.3.1: + resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} + hasBin: true + + semver@7.6.3: + resolution: {integrity: sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==} + engines: {node: '>=10'} + hasBin: true + + semver@7.8.5: + resolution: {integrity: sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==} + engines: {node: '>=10'} + hasBin: true + + set-blocking@2.0.0: + resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==} + + shebang-command@2.0.0: + resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} + engines: {node: '>=8'} + + shebang-regex@3.0.0: + resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} + engines: {node: '>=8'} + + side-channel-list@1.0.1: + resolution: {integrity: sha512-mjn/0bi/oUURjc5Xl7IaWi/OJJJumuoJFQJfDDyO46+hBWsfaVM65TBHq2eoZBhzl9EchxOijpkbRC8SVBQU0w==} + engines: {node: '>= 0.4'} + + side-channel-map@1.0.1: + resolution: {integrity: sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==} + engines: {node: '>= 0.4'} + + side-channel-weakmap@1.0.2: + resolution: {integrity: sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==} + engines: {node: '>= 0.4'} + + side-channel@1.1.1: + resolution: {integrity: sha512-6x6dK6zJdpTzF4sQeNYxwtvBzf6Eg4GtlesS94HOvTudUeyK2WXAaIfmDgsyslYrRBeFIlsi54AYsFGUuhmvrQ==} + engines: {node: '>= 0.4'} + + siginfo@2.0.0: + resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} + + signal-exit@4.1.0: + resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} + engines: {node: '>=14'} + + signature_pad@3.0.0-beta.4: + resolution: {integrity: sha512-cOf2NhVuTiuNqe2X/ycEmizvCDXk0DoemhsEpnkcGnA4kS5iJYTCqZ9As7tFBbsch45Q1EdX61833+6sjJ8rrw==} + + signature_pad@5.1.4: + resolution: {integrity: sha512-q0wO5a+U+AWPVcVmiNXz7FY4Ad1QiE8wto/3Yn41WVqepoVVYMvkb1CTokaWPUUAHWDLLabH3/acODeWM9jCrg==} + + slash@3.0.0: + resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} + engines: {node: '>=8'} + + slate-history@0.115.0: + resolution: {integrity: sha512-QdUm9aVyQFz6JG4a84Z6Um+tJpZJmsh9bjXwTVTvYiN4rdKbqL6+/4HT94on1WYxe10Q4vY6mA6BCpoYxgF3tQ==} + peerDependencies: + slate: '>=0.114.3' + + slate@0.124.1: + resolution: {integrity: sha512-ii7DwezgvbLAyKtHBIunjTR1kzbNfYLCUKLMzJELlbTZkvHzX4DzN7HKIwcakf6dPxO6AoeT/P7kHOcyTym/hA==} + + slice-ansi@4.0.0: + resolution: {integrity: sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==} + engines: {node: '>=10'} + + slice-ansi@5.0.0: + resolution: {integrity: sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==} + engines: {node: '>=12'} + + slice-ansi@7.1.0: + resolution: {integrity: sha512-bSiSngZ/jWeX93BqeIAbImyTbEihizcwNjFoRUIY/T1wWQsfsm2Vw1agPKylXvQTU7iASGdHhyqRlqQzfz+Htg==} + engines: {node: '>=18'} + + snabbdom@3.6.4: + resolution: {integrity: sha512-VmxEfuw1/Y/eFj5VtMhYnukExpYiPkNzoo3+N3qwAOUDMl8wXgbli5ebR+j0knE3lZ/0eYskLxNcX64uy10N9w==} + engines: {node: '>=12.17.0'} + + sortablejs@1.14.0: + resolution: {integrity: sha512-pBXvQCs5/33fdN1/39pPL0NZF20LeRbLQ5jtnheIPN9JQAaufGjKdWduZn4U7wCtVuzKhmRkI0DFYHYRbB2H1w==} + + sortablejs@1.15.7: + resolution: {integrity: sha512-Kk8wLQPlS+yi1ZEf48a4+fzHa4yxjC30M/Sr2AnQu+f/MPwvvX9XjZ6OWejiz8crBsLwSq8GHqaxaET7u6ux0A==} + + source-map-js@1.2.2: + resolution: {integrity: sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw==} + engines: {node: '>=0.10.0'} + + source-map-support@0.5.21: + resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} + + source-map@0.6.1: + resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} + engines: {node: '>=0.10.0'} + + split2@4.2.0: + resolution: {integrity: sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==} + engines: {node: '>= 10.x'} + + sprintf-js@1.0.3: + resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} + + srvx@1.0.7: + resolution: {integrity: sha512-8h30Qy2cpYkcXgByHNpV4+jp609bU3ic7MqnfyLQ2Fpa8BgjIaI2zfsDKAIbwm8DcYDrCLqm5izF5KeL2nxdvg==} + engines: {node: '>=20.16.0'} + hasBin: true + + ssr-window@4.0.2: + resolution: {integrity: sha512-ISv/Ch+ig7SOtw7G2+qkwfVASzazUnvlDTwypdLoPoySv+6MqlOV10VwPSE6EWkGjhW50lUmghPmpYZXMu/+AQ==} + + stackback@0.0.2: + resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} + + std-env@4.3.0: + resolution: {integrity: sha512-OtU/EgQ1kIm5KwqQpBC6ZEMXrZRui11w8zgfTWp8cdO9B8OaPsbA8bTHO2P+HNo1VlUTGMVBwPhydu6poeXiag==} + + steady-xml@0.1.0: + resolution: {integrity: sha512-5sk17qO2wWRtonTNoBhoKAB35OSsGJOa3+NEa6D+1GS+de+ujDWxnflMkXBrviOfkNrPTUqduAdXhrMJs89nAw==} + engines: {node: '>=12.0.0'} + + string-argv@0.3.2: + resolution: {integrity: sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==} + engines: {node: '>=0.6.19'} + + string-width@4.2.3: + resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} + engines: {node: '>=8'} + + string-width@5.1.2: + resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} + engines: {node: '>=12'} + + string-width@7.2.0: + resolution: {integrity: sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==} + engines: {node: '>=18'} + + strip-ansi@3.0.1: + resolution: {integrity: sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==} + engines: {node: '>=0.10.0'} + + strip-ansi@6.0.1: + resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} + engines: {node: '>=8'} + + strip-ansi@7.2.0: + resolution: {integrity: sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==} + engines: {node: '>=12'} + + strip-final-newline@3.0.0: + resolution: {integrity: sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==} + engines: {node: '>=12'} + + strip-json-comments@3.1.1: + resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} + engines: {node: '>=8'} + + strip-literal@2.1.1: + resolution: {integrity: sha512-631UJ6O00eNGfMiWG78ck80dfBab8X6IVFB51jZK5Icd7XAs60Z5y7QdSd/wGIklnWvRbUNloVzhOKKmutxQ6Q==} + + strnum@2.5.1: + resolution: {integrity: sha512-UM4nTLWzQiDBseVxUGxN0wJzIk0UU89Qi7pKXz9qISo+lhviJikTuikBsK/oFRlpvYHvSdz0TVoLyQ+sEpYwxA==} + + style-mod@4.1.4: + resolution: {integrity: sha512-XXWIQt633/EpAFx8aZDOTjBzrCaGmhvEQlQo6MVPfa2OzO2cWo+4hV9h+6UkHYlXGfy+ODXKUdP7Pthmcu5ATw==} + + stylelint-config-html@1.1.0: + resolution: {integrity: sha512-IZv4IVESjKLumUGi+HWeb7skgO6/g4VMuAYrJdlqQFndgbj6WJAXPhaysvBiXefX79upBdQVumgYcdd17gCpjQ==} + engines: {node: ^12 || >=14} + peerDependencies: + postcss-html: ^1.0.0 + stylelint: '>=14.0.0' + + stylelint-config-recommended@14.0.1: + resolution: {integrity: sha512-bLvc1WOz/14aPImu/cufKAZYfXs/A/owZfSMZ4N+16WGXLoX5lOir53M6odBxvhgmgdxCVnNySJmZKx73T93cg==} + engines: {node: '>=18.12.0'} + peerDependencies: + stylelint: ^16.1.0 + + stylelint-config-standard@36.0.1: + resolution: {integrity: sha512-8aX8mTzJ6cuO8mmD5yon61CWuIM4UD8Q5aBcWKGSf6kg+EC3uhB+iOywpTK4ca6ZL7B49en8yanOFtUW0qNzyw==} + engines: {node: '>=18.12.0'} + peerDependencies: + stylelint: ^16.1.0 + + stylelint-order@6.0.4: + resolution: {integrity: sha512-0UuKo4+s1hgQ/uAxlYU4h0o0HS4NiQDud0NAUNI0aa8FJdmYHA5ZZTFHiV5FpmE3071e9pZx5j0QpVJW5zOCUA==} + peerDependencies: + stylelint: ^14.0.0 || ^15.0.0 || ^16.0.1 + + stylelint@16.26.1: + resolution: {integrity: sha512-v20V59/crfc8sVTAtge0mdafI3AdnzQ2KsWe6v523L4OA1bJO02S7MO2oyXDCS6iWb9ckIPnqAFVItqSBQr7jw==} + engines: {node: '>=18.12.0'} + hasBin: true + + supports-color@2.0.0: + resolution: {integrity: sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==} + engines: {node: '>=0.8.0'} + + supports-color@7.2.0: + resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} + engines: {node: '>=8'} + + supports-hyperlinks@3.2.0: + resolution: {integrity: sha512-zFObLMyZeEwzAoKCyu1B91U79K2t7ApXuQfo8OuxwXLDgcKxuwM+YvcbIhm6QWqz7mHUH1TVytR1PwVVjEuMig==} + engines: {node: '>=14.18'} + + supports-preserve-symlinks-flag@1.0.0: + resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} + engines: {node: '>= 0.4'} + + svg-icon-baker@2.1.2: + resolution: {integrity: sha512-NbZ8LBtiw21aq9zU04sT4uD4j30wPrKBy0TOieCHU2o5nHpI141Q1eETWo/8tC7OROHombkJkgv+S9orWY59sQ==} + engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} + + svg-tags@1.0.0: + resolution: {integrity: sha512-ovssysQTa+luh7A5Weu3Rta6FJlFBBbInjOh722LIt6klpU2/HtdUbszju/G4devcvk8PGt7FCLv5wftu3THUA==} + + svgo@4.1.0: + resolution: {integrity: sha512-bkxnTg1kSU0guhIBmibA6UUhrQmPVA1XsQLN+ylCd+UWzbnLkySOcXpyk1mrl05f+pcaCx2eHb+sp6BgMZWX+Q==} + engines: {node: '>=16'} + hasBin: true + + symbol-tree@3.2.4: + resolution: {integrity: sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==} + + synckit@0.12.3: + resolution: {integrity: sha512-U+/AXT6LWsxnj2vz9HeUuPWBNgdWxjyIEjEPdbJARC9txmgPzo2VEdqnFo4hHaNyMPtycyVJrSaQYeQv/PoyyA==} + engines: {node: ^14.18.0 || >=16.0.0} + + synckit@0.8.8: + resolution: {integrity: sha512-HwOKAP7Wc5aRGYdKH+dw0PRRpbO841v2DENBtjnR5HFWoiNByAl7vrx3p0G/rCyYXQsrxqtX48TImFtPcIHSpQ==} + engines: {node: ^14.18.0 || >=16.0.0} + + synckit@0.9.2: + resolution: {integrity: sha512-vrozgXDQwYO72vHjUb/HnFbQx1exDjoKzqx23aXEg2a9VIg2TSFZ8FmeZpTjUCFMYw7mpX4BE2SFu8wI7asYsw==} + engines: {node: ^14.18.0 || >=16.0.0} + + tabbable@6.5.1: + resolution: {integrity: sha512-dMCuwDUY6Noz3zVKLefBC4wq+aJV20yc7vWmM7uTNGwtQSFF5kX7OUIUsxuVajz/bdt5Xqdah3/0NLjth+cM5A==} + + table@6.9.0: + resolution: {integrity: sha512-9kY+CygyYM6j02t5YFHbNz2FN5QmYGv9zAjVp4lCDjlCw7amdckXlEt/bjMhUIfj4ThGRE4gCUH5+yGnNuPo5A==} + engines: {node: '>=10.0.0'} + + terser@5.51.2: + resolution: {integrity: sha512-bWnjSNscmuI+GJze6ZupnHP8G/cTcsJF+bXCeQknk2SHQsgbNJnLrqiH9jZ2W4STPVXH2mDKKRX3iwPhc9Cn/Q==} + engines: {node: '>=10'} + hasBin: true + + text-extensions@2.4.0: + resolution: {integrity: sha512-te/NtwBwfiNRLf9Ijqx3T0nlqZiQ2XrrtBvu+cLL8ZRrGkO0NHTug8MYFKyoSrv/sHTaSKfilUkizV6XhxMJ3g==} + engines: {node: '>=8'} + + text-table@0.2.0: + resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} + + through@2.3.8: + resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} + + tiny-svg@3.1.3: + resolution: {integrity: sha512-9mwnPqXInRsBmH/DO6NMxBE++9LsqpVXQSSTZGc5bomoKKvL5OX/Hlotw7XVXP6XLRcHWIzZpxfovGqWKgCypQ==} + + tinybench@2.9.0: + resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==} + + tinyexec@0.3.1: + resolution: {integrity: sha512-WiCJLEECkO18gwqIp6+hJg0//p23HXp4S+gGtAKu3mI2F2/sXC4FvHvXvB0zJVVaTPhx1/tOwdbRsa1sOBIKqQ==} + + tinyexec@1.3.1: + resolution: {integrity: sha512-GCvB3aoys96IuDFBMcTB46JOR6mdMtAToqwiW8JlWhsoh1mhHi/xn9ss/Dg7N555GiJyEt2qzoG/NHCwM6h1EA==} + engines: {node: '>=18'} + + tinyglobby@0.2.17: + resolution: {integrity: sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==} + engines: {node: '>=12.0.0'} + + tinyrainbow@3.2.0: + resolution: {integrity: sha512-LgO3D9yZJjApUiuUfl9iFAwrtaX4+lok3wJIqttGoKCHlWUqHqbQpnxCf82L8FjgKsh4iGo78hqJwgL8F6To2A==} + engines: {node: '>=14.0.0'} + + tldts-core@6.1.86: + resolution: {integrity: sha512-Je6p7pkk+KMzMv2XXKmAE3McmolOQFdxkKw0R8EYNr7sELW46JqnNeTX8ybPiQgvg1ymCoF8LXs5fzFaZvJPTA==} + + tldts@6.1.86: + resolution: {integrity: sha512-WMi/OQ2axVTf/ykqCQgXiIct+mSQDFdH2fkwhPwgEwvJ1kSzZRiinb0zF2Xb8u4+OqPChmyI6MEu4EezNJz+FQ==} + hasBin: true + + to-regex-range@5.0.1: + resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} + engines: {node: '>=8.0'} + + tough-cookie@5.1.1: + resolution: {integrity: sha512-Ek7HndSVkp10hmHP9V4qZO1u+pn1RU5sI0Fw+jCU3lyvuMZcgqsNgc6CmJJZyByK4Vm/qotGRJlfgAX8q+4JiA==} + engines: {node: '>=16'} + + tr46@0.0.3: + resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} + + tr46@5.0.0: + resolution: {integrity: sha512-tk2G5R2KRwBd+ZN0zaEXpmzdKyOYksXwywulIX95MBODjSzMIuQnQ3m8JxgbhnL1LeVo7lqQKsYa1O3Htl7K5g==} + engines: {node: '>=18'} + + ts-api-utils@1.4.3: + resolution: {integrity: sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw==} + engines: {node: '>=16'} + peerDependencies: + typescript: '>=4.2.0' + + ts-api-utils@2.0.1: + resolution: {integrity: sha512-dnlgjFSVetynI8nzgJ+qF62efpglpWRk8isUEWZGWlJYySCTD6aKvbUDu+zbPeDakk3bg5H4XpitHukgfL1m9w==} + engines: {node: '>=18.12'} + peerDependencies: + typescript: '>=4.8.4' + + ts-api-utils@2.5.0: + resolution: {integrity: sha512-OJ/ibxhPlqrMM0UiNHJ/0CKQkoKF243/AEmplt3qpRgkW8VG7IfOS41h7V8TjITqdByHzrjcS/2si+y4lIh8NA==} + engines: {node: '>=18.12'} + peerDependencies: + typescript: '>=4.8.4' + + tslib@2.3.0: + resolution: {integrity: sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==} + + tslib@2.8.1: + resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} + + type-check@0.4.0: + resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} + engines: {node: '>= 0.8.0'} + + type-fest@0.20.2: + resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} + engines: {node: '>=10'} + + type@2.7.3: + resolution: {integrity: sha512-8j+1QmAbPvLZow5Qpi6NCaN8FB60p/6x8/vfNqOk/hC+HuvFZhL4+WfekuhQLiqFZXOgQdrs3B+XxEmCc6b3FQ==} + + typescript@5.3.3: + resolution: {integrity: sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==} + engines: {node: '>=14.17'} + hasBin: true + + uc.micro@2.1.0: + resolution: {integrity: sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==} + + ufo@1.5.4: + resolution: {integrity: sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ==} + + ufo@1.6.4: + resolution: {integrity: sha512-JFNbkD1Svwe0KvGi8GOeLcP4kAWQ609twvCdcHxq1oSL8svv39ZuSvajcD8B+5D0eL4+s1Is2D/O6KN3qcTeRA==} + + unconfig-core@7.5.0: + resolution: {integrity: sha512-Su3FauozOGP44ZmKdHy2oE6LPjk51M/TRRjHv2HNCWiDvfvCoxC2lno6jevMA91MYAdCdwP05QnWdWpSbncX/w==} + + unconfig@0.3.13: + resolution: {integrity: sha512-N9Ph5NC4+sqtcOjPfHrRcHekBCadCXWTBzp2VYYbySOHW0PfD9XLCeXshTXjkPYwLrBr9AtSeU0CZmkYECJhng==} + + unconfig@7.3.1: + resolution: {integrity: sha512-LH5WL+un92tGAzWS87k7LkAfwpMdm7V0IXG2FxEjZz/QxiIW5J5LkcrKQThj0aRz6+h/lFmKI9EUXmK/T0bcrw==} + + unconfig@7.5.0: + resolution: {integrity: sha512-oi8Qy2JV4D3UQ0PsopR28CzdQ3S/5A1zwsUwp/rosSbfhJ5z7b90bIyTwi/F7hCLD4SGcZVjDzd4XoUQcEanvA==} + + undici-types@6.21.0: + resolution: {integrity: sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==} + + unicorn-magic@0.1.0: + resolution: {integrity: sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ==} + engines: {node: '>=18'} + + unimport@3.14.2: + resolution: {integrity: sha512-FSxhbAylGGanyuTb3K0Ka3T9mnsD0+cRKbwOS11Li4Lh2whWS091e32JH4bIHrTckxlW9GnExAglADlxXjjzFw==} + + universalify@2.0.1: + resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==} + engines: {node: '>= 10.0.0'} + + unocss@66.11.0: + resolution: {integrity: sha512-fUhpMwVzMVxy4IcaL2sXjJV5Q3UpEKv3U4wfYioHmv7+C07Y8WAmjVgROoXKAUKs+pWlQKwtPMw4ZjMpQX8blA==} + peerDependencies: + '@unocss/astro': 66.11.0 + '@unocss/postcss': 66.11.0 + '@unocss/webpack': 66.11.0 + peerDependenciesMeta: + '@unocss/astro': + optional: true + '@unocss/postcss': + optional: true + '@unocss/webpack': + optional: true + + unplugin-auto-import@0.16.7: + resolution: {integrity: sha512-w7XmnRlchq6YUFJVFGSvG1T/6j8GrdYN6Em9Wf0Ye+HXgD/22kont+WnuCAA0UaUoxtuvRR1u/mXKy63g/hfqQ==} + engines: {node: '>=14'} + peerDependencies: + '@nuxt/kit': ^3.2.2 + '@vueuse/core': '*' + peerDependenciesMeta: + '@nuxt/kit': + optional: true + '@vueuse/core': + optional: true + + unplugin-element-plus@0.8.0: + resolution: {integrity: sha512-jByUGY3FG2B8RJKFryqxx4eNtSTj+Hjlo8edcOdJymewndDQjThZ1pRUQHRjQsbKhTV2jEctJV7t7RJ405UL4g==} + engines: {node: '>=14.19.0'} + + unplugin-utils@0.3.2: + resolution: {integrity: sha512-xVToRh2CTmLk2HnEG7ac4rl1MJTT3RFkpS8B++/SnB0kXvuaavD+n3m/vrzyWQOdJNSZQACnbz01pnppbwV5BA==} + engines: {node: '>=20.19.0'} + + unplugin-vue-components@0.25.2: + resolution: {integrity: sha512-OVmLFqILH6w+eM8fyt/d/eoJT9A6WO51NZLf1vC5c1FZ4rmq2bbGxTy8WP2Jm7xwFdukaIdv819+UI7RClPyCA==} + engines: {node: '>=14'} + peerDependencies: + '@babel/parser': ^7.15.8 + '@nuxt/kit': ^3.2.2 + vue: 2 || 3 + peerDependenciesMeta: + '@babel/parser': + optional: true + '@nuxt/kit': + optional: true + + unplugin@1.16.0: + resolution: {integrity: sha512-5liCNPuJW8dqh3+DM6uNM2EI3MLLpCKp/KY+9pB5M2S2SR2qvvDHhKgBOaTWEbZTAws3CXfB0rKTIolWKL05VQ==} + engines: {node: '>=14.0.0'} + + unplugin@2.3.4: + resolution: {integrity: sha512-m4PjxTurwpWfpMomp8AptjD5yj8qEZN5uQjjGM3TAs9MWWD2tXSSNNj6jGR2FoVGod4293ytyV6SwBbertfyJg==} + engines: {node: '>=18.12.0'} + + update-browserslist-db@1.3.4: + resolution: {integrity: sha512-t8wonIOdQyOjtPd2VktlBu6QjTVTks6v8bSi7kd0r2Vll8TK1JYDZtRRdbmCHOAMphkZgrzK+L+vXK4pyZ8t4A==} + hasBin: true + peerDependencies: + browserslist: 4.29.4 + + uri-js@4.4.1: + resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} + + url-toolkit@2.2.5: + resolution: {integrity: sha512-mtN6xk+Nac+oyJ/PrI7tzfmomRVNFIWKUbG8jdYFt52hxbiReFAXIjYskvu64/dvuW71IcB7lV8l0HvZMac6Jg==} + + url@0.11.4: + resolution: {integrity: sha512-oCwdVC7mTuWiPyjLUz/COz5TLk6wgp0RCsN+wHZ2Ekneac9w8uuV0njcbbie2ME+Vs+d6duwmYuR3HgQXs1fOg==} + engines: {node: '>= 0.4'} + + util-deprecate@1.0.2: + resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} + + uuid@11.1.1: + resolution: {integrity: sha512-vIYxrBCC/N/K+Js3qSN88go7kIfNPssr/hHCesKCQNAjmgvYS2oqr69kIufEG+O4+PfezOH4EbIeHCfFov8ZgQ==} + hasBin: true + + vanilla-picker@2.12.3: + resolution: {integrity: sha512-qVkT1E7yMbUsB2mmJNFmaXMWE2hF8ffqzMMwe9zdAikd8u2VfnsVY2HQcOUi2F38bgbxzlJBEdS1UUhOXdF9GQ==} + + video.js@7.21.6: + resolution: {integrity: sha512-m41TbODrUCToVfK1aljVd296CwDQnCRewpIm5tTXMuV87YYSGw1H+VDOaV45HlpcWSsTWWLF++InDgGJfthfUw==} + + videojs-font@3.2.0: + resolution: {integrity: sha512-g8vHMKK2/JGorSfqAZQUmYYNnXmfec4MLhwtEFS+mMs2IDY398GLysy6BH6K+aS1KMNu/xWZ8Sue/X/mdQPliA==} + + videojs-vtt.js@0.15.5: + resolution: {integrity: sha512-yZbBxvA7QMYn15Lr/ZfhhLPrNpI/RmCSCqgIff57GC2gIrV5YfyzLfLyZMj0NnZSAz8syB4N0nHXpZg9MyrMOQ==} + + vite-plugin-compression@0.5.1: + resolution: {integrity: sha512-5QJKBDc+gNYVqL/skgFAP81Yuzo9R+EAf19d+EtsMF/i8kFUpNi3J/H01QD3Oo8zBQn+NzoCIFkpPLynoOzaJg==} + peerDependencies: + vite: '>=2.0.0' + + vite-plugin-ejs@1.8.0: + resolution: {integrity: sha512-hfZQro418CaRRplB7dfqe5la+dr4GRv/f4bwdMn6Rufz0l4B2mMqcEUJ+wiAUqlNWLsRDtZJUNcguUDGPFNACg==} + peerDependencies: + vite: '>=5.0.0' + + vite-plugin-eslint@1.8.1: + resolution: {integrity: sha512-PqdMf3Y2fLO9FsNPmMX+//2BF5SF8nEWspZdgl4kSt7UvHDRHVVfHvxsD7ULYzZrJDGRxR81Nq7TOFgwMnUang==} + peerDependencies: + eslint: '>=7' + vite: '>=2' + + vite-plugin-progress@0.0.7: + resolution: {integrity: sha512-zyvKdcc/X+6hnw3J1HVV1TKrlFKC4Rh8GnDnWG/2qhRXjqytTcM++xZ+SAPnoDsSyWl8O93ymK0wZRgHAoglEQ==} + engines: {node: '>=14', pnpm: '>=7.0.0'} + peerDependencies: + vite: '>2.0.0-0' + + vite-plugin-purge-icons@0.10.0: + resolution: {integrity: sha512-4fMJKQuBu9lAPJWjqGEytRaxty1pP9bWgQLA68dwbbaCXu6NBrOUb/3kMaUc7TP09kerEk+qTriCk05OZXpjwA==} + engines: {node: '>= 12'} + peerDependencies: + vite: '>=2' + + vite-plugin-svg-icons-ng@1.10.0: + resolution: {integrity: sha512-emPqI3DSeYEQU1zoBFMPW95txGGh+XafCDAJaN1QMnYjN5D1p6sj5mefLnVvcWO+II/Wh7xZ+nHgMdf2jyX/Dw==} + engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} + peerDependencies: + vite: '>=5.0.0' + + vite-plugin-top-level-await@1.4.4: + resolution: {integrity: sha512-QyxQbvcMkgt+kDb12m2P8Ed35Sp6nXP+l8ptGrnHV9zgYDUpraO0CPdlqLSeBqvY2DToR52nutDG7mIHuysdiw==} + peerDependencies: + vite: '>=2.8' + + vite@7.3.7: + resolution: {integrity: sha512-AHEzTORMbi7/7aXp7w7KZ5+DCUdSeLsJz0grY8xHpc9DHdYb0vQu6DqJfm2tOw3gDExNgPgnJTXxM6syYFHaCA==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + peerDependencies: + '@types/node': ^20.19.0 || >=22.12.0 + jiti: '>=1.21.0' + less: ^4.0.0 + lightningcss: ^1.21.0 + sass: ^1.70.0 + sass-embedded: ^1.70.0 + stylus: '>=0.54.8' + sugarss: ^5.0.0 + terser: ^5.16.0 + tsx: ^4.8.1 + yaml: ^2.9.1 + peerDependenciesMeta: + '@types/node': + optional: true + jiti: + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + sass-embedded: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + tsx: + optional: true + yaml: + optional: true + + vitest@4.1.12: + resolution: {integrity: sha512-5eWdz2yb3ajxWF3C8C4TjkXl7FGm3n2E/VlazALrQHzK7nYMSGFnCZto0bbPNl77AwkOZVLk0YnBAejUu0NiWA==} + engines: {node: ^20.0.0 || ^22.0.0 || >=24.0.0} + hasBin: true + peerDependencies: + '@edge-runtime/vm': '*' + '@opentelemetry/api': ^1.9.0 + '@types/node': ^20.0.0 || ^22.0.0 || >=24.0.0 + '@vitest/browser-playwright': 4.1.12 + '@vitest/browser-preview': 4.1.12 + '@vitest/browser-webdriverio': ^4.1.11 + '@vitest/coverage-istanbul': 4.1.12 + '@vitest/coverage-v8': 4.1.12 + '@vitest/ui': 4.1.12 + happy-dom: '*' + jsdom: '*' + vite: ^6.0.0 || ^7.0.0 || ^8.0.0 + peerDependenciesMeta: + '@edge-runtime/vm': + optional: true + '@opentelemetry/api': + optional: true + '@types/node': + optional: true + '@vitest/browser-playwright': + optional: true + '@vitest/browser-preview': + optional: true + '@vitest/browser-webdriverio': + optional: true + '@vitest/coverage-istanbul': + optional: true + '@vitest/coverage-v8': + optional: true + '@vitest/ui': + optional: true + happy-dom: + optional: true + jsdom: + optional: true + + vscode-jsonrpc@9.0.3: + resolution: {integrity: sha512-qETYf9PCl1lVfwR+oBmMfc4vP2nqLNA35ABxorw3j06+xlKRgDVxbLgKm4Y/xPL0YWdeDjLoI4ImICIT3nB0zQ==} + engines: {node: '>=14.0.0'} + + vscode-languageserver-protocol@3.18.4: + resolution: {integrity: sha512-CCXbyr99dafRJzJH/0Ryk7ly5T8XPmSR0//OuF2w4m+9JiOin7zcAT5iET8GRE7Z9taFBejb3GbM0a0mbjdbrg==} + + vscode-languageserver-textdocument@1.0.16: + resolution: {integrity: sha512-qeNEuOi9a3qkqRf7Gfez2WL2VwlBTLCNekHBGO9kxPVUp9XuY15yfTJ9jwvOwKI0I2MhUUfZq95NSp+LK1CLQg==} + + vscode-languageserver-types@3.18.4: + resolution: {integrity: sha512-nQsacoiijvl0fRf2q28uFDrAVwRhdCa3QveiF7/CX0r18mLR5FU/1WskSsCKOjmEbtteKUnY8x8Yzxop+k0zwg==} + + vscode-languageserver@10.1.2: + resolution: {integrity: sha512-pXPWde3RytdeBVEs6PulOOT5OpeXC5GkWRpcT11f5rNn41jviQsAYPyAqJ/0oVGETQLKPJtYbHNiMPlfLb0NTQ==} + hasBin: true + + vue-component-type-helpers@3.3.11: + resolution: {integrity: sha512-LwcxzeliO9fkQcpJG0PoX8X5kmAhKmH9wkpDLxNabwzkQ9Zeib2YVHwFV4pcWmMLfXVfjr/dSV+DaJ3cIPgSNA==} + + vue-demi@0.14.10: + resolution: {integrity: sha512-nMZBOwuzabUO0nLgIcc6rycZEebF6eeUfaiQx9+WSk8e29IbLvPU9feI6tqW4kTo3hvoYAJkMh8n8D0fuISphg==} + engines: {node: '>=12'} + hasBin: true + peerDependencies: + '@vue/composition-api': ^1.0.0-rc.1 + vue: ^3.0.0-0 || ^2.6.0 + peerDependenciesMeta: + '@vue/composition-api': + optional: true + + vue-dompurify-html@4.1.4: + resolution: {integrity: sha512-K0XDSZA4dmMMvAgW8yaCx1kAYQldmgXeHJaLPS0mlSKOu8B+onE06X4KfB5LGyX4jR3rlVosyWJczRBzR0sZ/g==} + peerDependencies: + vue: ^2.7.0 || ^3.0.0 + + vue-eslint-parser@9.4.3: + resolution: {integrity: sha512-2rYRLWlIpaiN8xbPiDyXZXRgLGOtWxERV7ND5fFAv5qo1D2N9Fu9MNajBNc6o13lZ+24DAWCkQCvj4klgmcITg==} + engines: {node: ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: '>=6.0.0' + + vue-i18n@9.14.5: + resolution: {integrity: sha512-0jQ9Em3ymWngyiIkj0+c/k7WgaPO+TNzjKSNq9BvBQaKJECqn9cd9fL4tkDhB5G1QBskGl9YxxbDAhgbFtpe2g==} + engines: {node: '>= 16'} + deprecated: v9 and v10 no longer supported. please migrate to v11. about maintenance status, see https://vue-i18n.intlify.dev/guide/maintenance.html + peerDependencies: + vue: ^3.0.0 + + vue-router@4.4.5: + resolution: {integrity: sha512-4fKZygS8cH1yCyuabAXGUAsyi1b2/o/OKgu/RUb+znIYOxPRxdkytJEx+0wGcpBE1pX6vUgh5jwWOKRGvuA/7Q==} + peerDependencies: + vue: ^3.2.0 + + vue-template-compiler@2.7.16: + resolution: {integrity: sha512-AYbUWAJHLGGQM7+cNTELw+KsOG9nl2CnSv467WobS5Cv9uk3wFcnr1Etsz2sEIHEZvw1U+o9mRlEO6QbZvUPGQ==} + + vue-tsc-files@0.0.6: + resolution: {integrity: sha512-7eHGPafJJxGh/Fpxob1b84Vgvqhhwj6VidPPoBtitvlSF/EMlHG8B37F2hmTLEWfygRdEcw7sw6YD9DC9ZXz/g==} + hasBin: true + peerDependencies: + typescript: '>=4' + + vue-tsc@1.0.24: + resolution: {integrity: sha512-mmU1s5SAqE1nByQAiQnao9oU4vX+mSdsgI8H57SfKH6UVzq/jP9+Dbi2GaV+0b4Cn361d2ln8m6xeU60ApiEXg==} + hasBin: true + peerDependencies: + typescript: '*' + + vue-tsc@1.8.27: + resolution: {integrity: sha512-WesKCAZCRAbmmhuGl3+VrdWItEvfoFIPXOvUJkjULi+x+6G/Dy69yO3TBRJDr9eUlmsNAwVmxsNZxvHKzbkKdg==} + hasBin: true + peerDependencies: + typescript: '*' + + vue-types@5.1.3: + resolution: {integrity: sha512-3Wy6QcZl0VusCCHX3vYrWSILFlrOB2EQDoySnuYmASM5cUp1FivJGfkS5lp1CutDgyRb41g32r/1QCmiBj5i1Q==} + engines: {node: '>=14.0.0'} + peerDependencies: + vue: ^2.0.0 || ^3.0.0 + peerDependenciesMeta: + vue: + optional: true + + vue3-print-nb@0.1.4: + resolution: {integrity: sha512-LExI7viEzplR6ZKQ2b+V4U0cwGYbVD4fut/XHvk3UPGlT5CcvIGs6VlwGp107aKgk6P8Pgx4rco3Rehv2lti3A==} + + vue3-signature@0.2.4: + resolution: {integrity: sha512-XFwwFVK9OG3F085pKIq2SlNVqx32WdFH+TXbGEWc5FfEKpx8oMmZuAwZZ50K/pH2FgmJSE8IRwU9DDhrLpd6iA==} + peerDependencies: + vue: ^3.2.0 + + vue@3.5.44: + resolution: {integrity: sha512-dvvmaOCG7lAMkJTPqPwWeGMsPS6DIsFsfZDUgBp9V6mHf9b3+/wyVwYR4Es+WV6uJC0FKRxp81Obcq0ZwUcGFQ==} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + vuedraggable@4.1.0: + resolution: {integrity: sha512-FU5HCWBmsf20GpP3eudURW3WdWTKIbEIQxh9/8GE806hydR9qZqRRxRE3RjqX7PkuLuMQG/A7n3cfj9rCEchww==} + peerDependencies: + vue: ^3.0.1 + + w3c-keyname@2.2.8: + resolution: {integrity: sha512-dpojBhNsCNN7T82Tm7k26A6G9ML3NkhDsnw9n/eoxSRlVBB4CEtIQ/KTCLI2Fwf3ataSXRhYFkQi3SlnFwPvPQ==} + + w3c-xmlserializer@5.0.0: + resolution: {integrity: sha512-o8qghlI8NZHU1lLPrpi2+Uq7abh4GGPpYANlalzWxyWteJOCsr/P+oPBA49TOLu5FTZO4d3F9MnWJfiMo4BkmA==} + engines: {node: '>=18'} + + wangeditor@4.7.15: + resolution: {integrity: sha512-aPTdREd8BxXVyJ5MI+LU83FQ7u1EPd341iXIorRNYSOvoimNoZ4nPg+yn3FGbB93/owEa6buLw8wdhYnMCJQLg==} + + web-storage-cache@1.1.1: + resolution: {integrity: sha512-D0MieGooOs8RpsrK+vnejXnvh4OOv/+lTFB35JRkJJQt+uOjPE08XpaE0QBLMTRu47B1KGT/Nq3Gbag3Orinzw==} + + webidl-conversions@3.0.1: + resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} + + webidl-conversions@7.0.0: + resolution: {integrity: sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==} + engines: {node: '>=12'} + + webpack-virtual-modules@0.6.2: + resolution: {integrity: sha512-66/V2i5hQanC51vBQKPH4aI8NMAcBW59FVBs+rC7eGHupMyfn34q7rZIE+ETlJ+XTevqfUhVVBgSUNSW2flEUQ==} + + whatwg-encoding@3.1.1: + resolution: {integrity: sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==} + engines: {node: '>=18'} + deprecated: Use @exodus/bytes instead for a more spec-conformant and faster implementation + + whatwg-mimetype@4.0.0: + resolution: {integrity: sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==} + engines: {node: '>=18'} + + whatwg-url@14.1.1: + resolution: {integrity: sha512-mDGf9diDad/giZ/Sm9Xi2YcyzaFpbdLpJPr+E9fSkyQ7KpQD4SdFcugkRQYzhmfI4KeV4Qpnn2sKPdo+kmsgRQ==} + engines: {node: '>=18'} + + whatwg-url@5.0.0: + resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} + + which-module@2.0.1: + resolution: {integrity: sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==} + + which@1.3.1: + resolution: {integrity: sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==} + hasBin: true + + which@2.0.2: + resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} + engines: {node: '>= 8'} + hasBin: true + + why-is-node-running@2.3.0: + resolution: {integrity: sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==} + engines: {node: '>=8'} + hasBin: true + + wildcard@1.1.2: + resolution: {integrity: sha512-DXukZJxpHA8LuotRwL0pP1+rS6CS7FF2qStDDE1C7DDg2rLud2PXRMuEDYIPhgEezwnlHNL4c+N6MfMTjCGTng==} + + word-wrap@1.2.5: + resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} + engines: {node: '>=0.10.0'} + + wrap-ansi@6.2.0: + resolution: {integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==} + engines: {node: '>=8'} + + wrap-ansi@7.0.0: + resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} + engines: {node: '>=10'} + + wrap-ansi@8.1.0: + resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} + engines: {node: '>=12'} + + wrap-ansi@9.0.0: + resolution: {integrity: sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q==} + engines: {node: '>=18'} + + wrappy@1.0.2: + resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} + + write-file-atomic@5.0.1: + resolution: {integrity: sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + + ws@8.22.0: + resolution: {integrity: sha512-Ydggc987+RO0AnWtZ/7Wq9FtNvcrL1b/RO0ud9mWjUPgDrsAAwQSF51sm2hm1XofbU/4jkpGEsLFsZZxU+1DOg==} + engines: {node: '>=10.0.0'} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: '>=5.0.2' + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + + xml-js@1.6.11: + resolution: {integrity: sha512-7rVi2KMfwfWFl+GpPg6m80IVMWXLRjO+PxTq7V2CDhoGak0wzYzFgUY2m4XJ47OGdXd8eLE8EmwfAmdjw7lC1g==} + hasBin: true + + xml-name-validator@4.0.0: + resolution: {integrity: sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==} + engines: {node: '>=12'} + + xml-name-validator@5.0.0: + resolution: {integrity: sha512-EvGK8EJ3DhaHfbRlETOWAS5pO9MZITeauHKJyb8wyajUfQUenkIg2MvLDTZ4T/TgIcm3HU0TFBgWWboAZ30UHg==} + engines: {node: '>=18'} + + xml-naming@0.3.0: + resolution: {integrity: sha512-ghig2TBE/H11aOVgmahA3MhimvkBr6JIYknH/Dhdk10nXwdbIqBJsbfMxpvFPG8bAw77gN29aQWvKpmVoPlvPQ==} + engines: {node: '>=16.0.0'} + + xmlchars@2.2.0: + resolution: {integrity: sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==} + + y18n@4.0.3: + resolution: {integrity: sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==} + + y18n@5.0.8: + resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} + engines: {node: '>=10'} + + yallist@3.1.1: + resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} + + yaml-eslint-parser@1.2.3: + resolution: {integrity: sha512-4wZWvE398hCP7O8n3nXKu/vdq1HcH01ixYlCREaJL5NUMwQ0g3MaGFUBNSlmBtKmhbtVG/Cm6lyYmSVTEVil8A==} + engines: {node: ^14.17.0 || >=16.0.0} + + yaml@2.9.1: + resolution: {integrity: sha512-3NxN8+78OdzbT7C/WjGsyfPAtJaN3FNDsWxv7Y7mcDsT/oOmgW8BpyQQFFBnvZE3j9Y2Sdz1ULFLezL7Eb2yFw==} + engines: {node: '>= 14.6'} + hasBin: true + + yargs-parser@18.1.3: + resolution: {integrity: sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==} + engines: {node: '>=6'} + + yargs-parser@21.1.1: + resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} + engines: {node: '>=12'} + + yargs@15.4.1: + resolution: {integrity: sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==} + engines: {node: '>=8'} + + yargs@17.7.2: + resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} + engines: {node: '>=12'} + + yocto-queue@0.1.0: + resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} + engines: {node: '>=10'} + + yocto-queue@1.1.1: + resolution: {integrity: sha512-b4JR1PFR10y1mKjhHY9LaGo6tmrgjit7hxVIeAmyMw3jegXR4dhYqLaQF5zMXZxY7tLpMyJeLjr1C4rLmkVe8g==} + engines: {node: '>=12.20'} + + zeebe-bpmn-moddle@1.7.0: + resolution: {integrity: sha512-eZ6OXSt0c4n9V/oN/46gTlwDIS3GhWQLt9jbM5uS/YryB4yN8wdrrKrtw+TpyNy0SSKWXNDHyC83nCA2blPO3Q==} + + zrender@5.6.0: + resolution: {integrity: sha512-uzgraf4njmmHAbEUxMJ8Oxg+P3fT04O+9p7gY+wJRVxo8Ge+KmYv0WJev945EH4wFuc4OY2NLXz46FZrWS9xJg==} + +snapshots: + + '@antfu/install-pkg@2.1.0': + dependencies: + package-manager-detector: 1.9.0 + tinyexec: 1.3.1 + + '@antfu/utils@0.7.10': {} + + '@asamuzakjp/css-color@2.8.3': + dependencies: + '@csstools/css-calc': 2.1.1(@csstools/css-parser-algorithms@3.0.4(@csstools/css-tokenizer@3.0.3))(@csstools/css-tokenizer@3.0.3) + '@csstools/css-color-parser': 3.1.0(@csstools/css-parser-algorithms@3.0.4(@csstools/css-tokenizer@3.0.3))(@csstools/css-tokenizer@3.0.3) + '@csstools/css-parser-algorithms': 3.0.4(@csstools/css-tokenizer@3.0.3) + '@csstools/css-tokenizer': 3.0.3 + lru-cache: 10.4.3 + + '@babel/code-frame@7.29.7': + dependencies: + '@babel/helper-validator-identifier': 7.29.7 + js-tokens: 4.0.0 + picocolors: 1.1.1 + + '@babel/compat-data@7.29.7': {} + + '@babel/core@7.29.7(supports-color@7.2.0)': + dependencies: + '@babel/code-frame': 7.29.7 + '@babel/generator': 7.29.8 + '@babel/helper-compilation-targets': 7.29.7 + '@babel/helper-module-transforms': 7.29.7(@babel/core@7.29.7(supports-color@7.2.0))(supports-color@7.2.0) + '@babel/helpers': 7.29.10 + '@babel/parser': 7.29.11 + '@babel/template': 7.29.7 + '@babel/traverse': 7.29.10(supports-color@7.2.0) + '@babel/types': 7.29.11 + '@jridgewell/remapping': 2.3.5 + convert-source-map: 2.0.0 + debug: 4.3.7(supports-color@7.2.0) + gensync: 1.0.0-beta.2 + json5: 2.2.3 + semver: 6.3.1 + transitivePeerDependencies: + - supports-color + + '@babel/generator@7.29.8': + dependencies: + '@babel/parser': 7.29.11 + '@babel/types': 7.29.11 + '@jridgewell/gen-mapping': 0.3.13 + '@jridgewell/trace-mapping': 0.3.31 + jsesc: 3.0.2 + + '@babel/helper-annotate-as-pure@7.29.7': + dependencies: + '@babel/types': 7.29.11 + + '@babel/helper-compilation-targets@7.29.7': + dependencies: + '@babel/compat-data': 7.29.7 + '@babel/helper-validator-option': 7.29.7 + browserslist: 4.29.4 + lru-cache: 5.1.1 + semver: 6.3.1 + + '@babel/helper-create-class-features-plugin@7.29.7(@babel/core@7.29.7(supports-color@7.2.0))(supports-color@7.2.0)': + dependencies: + '@babel/core': 7.29.7(supports-color@7.2.0) + '@babel/helper-annotate-as-pure': 7.29.7 + '@babel/helper-member-expression-to-functions': 7.29.7(supports-color@7.2.0) + '@babel/helper-optimise-call-expression': 7.29.7 + '@babel/helper-replace-supers': 7.29.7(@babel/core@7.29.7(supports-color@7.2.0))(supports-color@7.2.0) + '@babel/helper-skip-transparent-expression-wrappers': 7.29.7(supports-color@7.2.0) + '@babel/traverse': 7.29.10(supports-color@7.2.0) + semver: 6.3.1 + transitivePeerDependencies: + - supports-color + + '@babel/helper-globals@7.29.7': {} + + '@babel/helper-member-expression-to-functions@7.29.7(supports-color@7.2.0)': + dependencies: + '@babel/traverse': 7.29.10(supports-color@7.2.0) + '@babel/types': 7.29.11 + transitivePeerDependencies: + - supports-color + + '@babel/helper-module-imports@7.29.7(supports-color@7.2.0)': + dependencies: + '@babel/traverse': 7.29.10(supports-color@7.2.0) + '@babel/types': 7.29.11 + transitivePeerDependencies: + - supports-color + + '@babel/helper-module-transforms@7.29.7(@babel/core@7.29.7(supports-color@7.2.0))(supports-color@7.2.0)': + dependencies: + '@babel/core': 7.29.7(supports-color@7.2.0) + '@babel/helper-module-imports': 7.29.7(supports-color@7.2.0) + '@babel/helper-validator-identifier': 7.29.7 + '@babel/traverse': 7.29.10(supports-color@7.2.0) + transitivePeerDependencies: + - supports-color + + '@babel/helper-optimise-call-expression@7.29.7': + dependencies: + '@babel/types': 7.29.11 + + '@babel/helper-plugin-utils@7.29.7': {} + + '@babel/helper-replace-supers@7.29.7(@babel/core@7.29.7(supports-color@7.2.0))(supports-color@7.2.0)': + dependencies: + '@babel/core': 7.29.7(supports-color@7.2.0) + '@babel/helper-member-expression-to-functions': 7.29.7(supports-color@7.2.0) + '@babel/helper-optimise-call-expression': 7.29.7 + '@babel/traverse': 7.29.10(supports-color@7.2.0) + transitivePeerDependencies: + - supports-color + + '@babel/helper-skip-transparent-expression-wrappers@7.29.7(supports-color@7.2.0)': + dependencies: + '@babel/traverse': 7.29.10(supports-color@7.2.0) + '@babel/types': 7.29.11 + transitivePeerDependencies: + - supports-color + + '@babel/helper-string-parser@7.29.11': {} + + '@babel/helper-validator-identifier@7.29.7': {} + + '@babel/helper-validator-option@7.29.7': {} + + '@babel/helpers@7.29.10': + dependencies: + '@babel/template': 7.29.7 + '@babel/types': 7.29.11 + + '@babel/parser@7.29.11': + dependencies: + '@babel/types': 7.29.11 + + '@babel/plugin-syntax-jsx@7.29.7(@babel/core@7.29.7(supports-color@7.2.0))': + dependencies: + '@babel/core': 7.29.7(supports-color@7.2.0) + '@babel/helper-plugin-utils': 7.29.7 + + '@babel/plugin-syntax-typescript@7.29.7(@babel/core@7.29.7(supports-color@7.2.0))': + dependencies: + '@babel/core': 7.29.7(supports-color@7.2.0) + '@babel/helper-plugin-utils': 7.29.7 + + '@babel/plugin-transform-typescript@7.29.9(@babel/core@7.29.7(supports-color@7.2.0))(supports-color@7.2.0)': + dependencies: + '@babel/core': 7.29.7(supports-color@7.2.0) + '@babel/helper-annotate-as-pure': 7.29.7 + '@babel/helper-create-class-features-plugin': 7.29.7(@babel/core@7.29.7(supports-color@7.2.0))(supports-color@7.2.0) + '@babel/helper-plugin-utils': 7.29.7 + '@babel/helper-skip-transparent-expression-wrappers': 7.29.7(supports-color@7.2.0) + '@babel/plugin-syntax-typescript': 7.29.7(@babel/core@7.29.7(supports-color@7.2.0)) + transitivePeerDependencies: + - supports-color + + '@babel/runtime-corejs3@7.29.10': + dependencies: + core-js-pure: 3.51.0 + + '@babel/runtime@7.29.10': {} + + '@babel/template@7.29.7': + dependencies: + '@babel/code-frame': 7.29.7 + '@babel/parser': 7.29.11 + '@babel/types': 7.29.11 + + '@babel/traverse@7.29.10(supports-color@7.2.0)': + dependencies: + '@babel/code-frame': 7.29.7 + '@babel/generator': 7.29.8 + '@babel/helper-globals': 7.29.7 + '@babel/parser': 7.29.11 + '@babel/template': 7.29.7 + '@babel/types': 7.29.11 + debug: 4.4.3(supports-color@7.2.0) + transitivePeerDependencies: + - supports-color + + '@babel/types@7.29.11': + dependencies: + '@babel/helper-string-parser': 7.29.11 + '@babel/helper-validator-identifier': 7.29.7 + + '@bcoe/v8-coverage@1.0.2': {} + + '@bpmn-io/cm-theme@0.1.0-alpha.2': + dependencies: + '@codemirror/language': 6.13.1 + '@codemirror/view': 6.43.15 + '@lezer/highlight': 1.2.5 + + '@bpmn-io/diagram-js-ui@0.2.3': + dependencies: + htm: 3.1.1 + preact: 10.25.0 + + '@bpmn-io/extract-process-variables@0.8.0': + dependencies: + min-dash: 4.2.2 + + '@bpmn-io/feel-analyzer@0.5.1': + dependencies: + '@bpmn-io/lezer-feel': 3.0.1 + '@lezer/common': 1.5.4 + + '@bpmn-io/feel-editor@1.9.1': + dependencies: + '@bpmn-io/feel-lint': 1.3.1 + '@codemirror/autocomplete': 6.20.4 + '@codemirror/commands': 6.11.1 + '@codemirror/language': 6.13.1 + '@codemirror/lint': 6.9.7 + '@codemirror/state': 6.7.6 + '@codemirror/view': 6.43.15 + '@lezer/highlight': 1.2.5 + lang-feel: 2.2.0 + min-dom: 4.2.1 + + '@bpmn-io/feel-lint@1.3.1': + dependencies: + '@codemirror/language': 6.13.1 + lezer-feel: 1.4.0 + + '@bpmn-io/feel-lint@3.2.0': + dependencies: + '@bpmn-io/feel-analyzer': 0.5.1 + '@bpmn-io/lezer-feel': 3.0.1 + '@bpmn-io/semver-compat': 0.1.0 + '@codemirror/language': 6.13.1 + + '@bpmn-io/feelin@6.1.1': + dependencies: + '@bpmn-io/lezer-feel': 2.5.0 + '@lezer/common': 1.5.4 + luxon: 3.7.2 + min-dash: 5.1.0 + + '@bpmn-io/lezer-feel@2.5.0': + dependencies: + '@lezer/highlight': 1.2.5 + '@lezer/lr': 1.4.11 + min-dash: 5.1.0 + + '@bpmn-io/lezer-feel@3.0.1': + dependencies: + '@lezer/highlight': 1.2.5 + '@lezer/lr': 1.4.11 + min-dash: 5.1.0 + + '@bpmn-io/properties-panel@3.25.0': + dependencies: + '@bpmn-io/feel-editor': 1.9.1 + '@codemirror/view': 6.43.15 + classnames: 2.5.1 + feelers: 1.5.1 + focus-trap: 7.8.0 + min-dash: 4.2.2 + min-dom: 4.2.1 + + '@bpmn-io/semver-compat@0.1.0': + dependencies: + semver: 7.8.5 + + '@cacheable/memory@2.2.0': + dependencies: + '@cacheable/utils': 2.5.0 + '@keyv/bigmap': 1.3.1(keyv@5.6.0) + hookified: 1.15.1 + keyv: 5.6.0 + + '@cacheable/utils@2.5.0': + dependencies: + hashery: 1.5.1 + keyv: 5.6.0 + + '@codemirror/autocomplete@6.20.4': + dependencies: + '@codemirror/language': 6.13.1 + '@codemirror/state': 6.7.6 + '@codemirror/view': 6.43.15 + '@lezer/common': 1.5.4 + + '@codemirror/commands@6.11.1': + dependencies: + '@codemirror/language': 6.13.1 + '@codemirror/state': 6.7.6 + '@codemirror/view': 6.43.15 + '@lezer/common': 1.5.4 + + '@codemirror/language@6.13.1': + dependencies: + '@codemirror/state': 6.7.6 + '@codemirror/streamparser': 6.0.0 + '@codemirror/view': 6.43.15 + '@lezer/common': 1.5.4 + '@lezer/highlight': 1.2.5 + '@lezer/lr': 1.4.11 + style-mod: 4.1.4 + + '@codemirror/lint@6.9.7': + dependencies: + '@codemirror/state': 6.7.6 + '@codemirror/view': 6.43.15 + crelt: 1.0.7 + + '@codemirror/state@6.7.6': + dependencies: + '@marijn/find-cluster-break': 1.0.4 + + '@codemirror/streamparser@6.0.0': {} + + '@codemirror/view@6.43.15': + dependencies: + '@codemirror/state': 6.7.6 + crelt: 1.0.7 + style-mod: 4.1.4 + w3c-keyname: 2.2.8 + + '@colordx/core@7.3.0': {} + + '@commitlint/cli@19.6.0(@types/node@20.19.43)(typescript@5.3.3)': + dependencies: + '@commitlint/format': 19.5.0 + '@commitlint/lint': 19.6.0 + '@commitlint/load': 19.5.0(@types/node@20.19.43)(typescript@5.3.3) + '@commitlint/read': 19.5.0 + '@commitlint/types': 19.5.0 + tinyexec: 0.3.1 + yargs: 17.7.2 + transitivePeerDependencies: + - '@types/node' + - typescript + + '@commitlint/config-conventional@19.6.0': + dependencies: + '@commitlint/types': 19.5.0 + conventional-changelog-conventionalcommits: 7.0.2 + + '@commitlint/config-validator@19.5.0': + dependencies: + '@commitlint/types': 19.5.0 + ajv: 8.20.0 + + '@commitlint/ensure@19.5.0': + dependencies: + '@commitlint/types': 19.5.0 + lodash.camelcase: 4.3.0 + lodash.kebabcase: 4.1.1 + lodash.snakecase: 4.1.1 + lodash.startcase: 4.4.0 + lodash.upperfirst: 4.3.1 + + '@commitlint/execute-rule@19.5.0': {} + + '@commitlint/format@19.5.0': + dependencies: + '@commitlint/types': 19.5.0 + chalk: 5.3.0 + + '@commitlint/is-ignored@19.6.0': + dependencies: + '@commitlint/types': 19.5.0 + semver: 7.8.5 + + '@commitlint/lint@19.6.0': + dependencies: + '@commitlint/is-ignored': 19.6.0 + '@commitlint/parse': 19.5.0 + '@commitlint/rules': 19.6.0 + '@commitlint/types': 19.5.0 + + '@commitlint/load@19.5.0(@types/node@20.19.43)(typescript@5.3.3)': + dependencies: + '@commitlint/config-validator': 19.5.0 + '@commitlint/execute-rule': 19.5.0 + '@commitlint/resolve-extends': 19.5.0 + '@commitlint/types': 19.5.0 + chalk: 5.3.0 + cosmiconfig: 9.0.0(typescript@5.3.3) + cosmiconfig-typescript-loader: 5.1.0(@types/node@20.19.43)(cosmiconfig@9.0.0(typescript@5.3.3))(typescript@5.3.3) + lodash.isplainobject: 4.0.6 + lodash.merge: 4.6.2 + lodash.uniq: 4.5.0 + transitivePeerDependencies: + - '@types/node' + - typescript + + '@commitlint/message@19.5.0': {} + + '@commitlint/parse@19.5.0': + dependencies: + '@commitlint/types': 19.5.0 + conventional-changelog-angular: 7.0.0 + conventional-commits-parser: 5.0.0 + + '@commitlint/read@19.5.0': + dependencies: + '@commitlint/top-level': 19.5.0 + '@commitlint/types': 19.5.0 + git-raw-commits: 4.0.0 + minimist: 1.2.8 + tinyexec: 0.3.1 + + '@commitlint/resolve-extends@19.5.0': + dependencies: + '@commitlint/config-validator': 19.5.0 + '@commitlint/types': 19.5.0 + global-directory: 4.0.1 + import-meta-resolve: 4.1.0 + lodash.mergewith: 4.6.2 + resolve-from: 5.0.0 + + '@commitlint/rules@19.6.0': + dependencies: + '@commitlint/ensure': 19.5.0 + '@commitlint/message': 19.5.0 + '@commitlint/to-lines': 19.5.0 + '@commitlint/types': 19.5.0 + + '@commitlint/to-lines@19.5.0': {} + + '@commitlint/top-level@19.5.0': + dependencies: + find-up: 7.0.0 + + '@commitlint/types@19.5.0': + dependencies: + '@types/conventional-commits-parser': 5.0.1 + chalk: 5.3.0 + + '@csstools/color-helpers@5.1.0': {} + + '@csstools/css-calc@2.1.1(@csstools/css-parser-algorithms@3.0.4(@csstools/css-tokenizer@3.0.3))(@csstools/css-tokenizer@3.0.3)': + dependencies: + '@csstools/css-parser-algorithms': 3.0.4(@csstools/css-tokenizer@3.0.3) + '@csstools/css-tokenizer': 3.0.3 + + '@csstools/css-calc@2.1.4(@csstools/css-parser-algorithms@3.0.4(@csstools/css-tokenizer@3.0.3))(@csstools/css-tokenizer@3.0.3)': + dependencies: + '@csstools/css-parser-algorithms': 3.0.4(@csstools/css-tokenizer@3.0.3) + '@csstools/css-tokenizer': 3.0.3 + + '@csstools/css-color-parser@3.1.0(@csstools/css-parser-algorithms@3.0.4(@csstools/css-tokenizer@3.0.3))(@csstools/css-tokenizer@3.0.3)': + dependencies: + '@csstools/color-helpers': 5.1.0 + '@csstools/css-calc': 2.1.4(@csstools/css-parser-algorithms@3.0.4(@csstools/css-tokenizer@3.0.3))(@csstools/css-tokenizer@3.0.3) + '@csstools/css-parser-algorithms': 3.0.4(@csstools/css-tokenizer@3.0.3) + '@csstools/css-tokenizer': 3.0.3 + + '@csstools/css-parser-algorithms@3.0.4(@csstools/css-tokenizer@3.0.3)': + dependencies: + '@csstools/css-tokenizer': 3.0.3 + + '@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4)': + dependencies: + '@csstools/css-tokenizer': 3.0.4 + + '@csstools/css-syntax-patches-for-csstree@1.1.15(css-tree@3.2.1)': + optionalDependencies: + css-tree: 3.2.1 + + '@csstools/css-tokenizer@3.0.3': {} + + '@csstools/css-tokenizer@3.0.4': {} + + '@csstools/media-query-list-parser@4.0.3(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4)': + dependencies: + '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) + '@csstools/css-tokenizer': 3.0.4 + + '@csstools/selector-specificity@5.0.0(postcss-selector-parser@7.1.7)': + dependencies: + postcss-selector-parser: 7.1.7 + + '@ctrl/tinycolor@4.2.1': {} + + '@dual-bundle/import-meta-resolve@4.2.1': {} + + '@element-plus/icons-vue@2.3.2(vue@3.5.44(typescript@5.3.3))': + dependencies: + vue: 3.5.44(typescript@5.3.3) + + '@esbuild/aix-ppc64@0.25.4': + optional: true + + '@esbuild/aix-ppc64@0.28.2': + optional: true + + '@esbuild/android-arm64@0.25.4': + optional: true + + '@esbuild/android-arm64@0.28.2': + optional: true + + '@esbuild/android-arm@0.25.4': + optional: true + + '@esbuild/android-arm@0.28.2': + optional: true + + '@esbuild/android-x64@0.25.4': + optional: true + + '@esbuild/android-x64@0.28.2': + optional: true + + '@esbuild/darwin-arm64@0.25.4': + optional: true + + '@esbuild/darwin-arm64@0.28.2': + optional: true + + '@esbuild/darwin-x64@0.25.4': + optional: true + + '@esbuild/darwin-x64@0.28.2': + optional: true + + '@esbuild/freebsd-arm64@0.25.4': + optional: true + + '@esbuild/freebsd-arm64@0.28.2': + optional: true + + '@esbuild/freebsd-x64@0.25.4': + optional: true + + '@esbuild/freebsd-x64@0.28.2': + optional: true + + '@esbuild/linux-arm64@0.25.4': + optional: true + + '@esbuild/linux-arm64@0.28.2': + optional: true + + '@esbuild/linux-arm@0.25.4': + optional: true + + '@esbuild/linux-arm@0.28.2': + optional: true + + '@esbuild/linux-ia32@0.25.4': + optional: true + + '@esbuild/linux-ia32@0.28.2': + optional: true + + '@esbuild/linux-loong64@0.25.4': + optional: true + + '@esbuild/linux-loong64@0.28.2': + optional: true + + '@esbuild/linux-mips64el@0.25.4': + optional: true + + '@esbuild/linux-mips64el@0.28.2': + optional: true + + '@esbuild/linux-ppc64@0.25.4': + optional: true + + '@esbuild/linux-ppc64@0.28.2': + optional: true + + '@esbuild/linux-riscv64@0.25.4': + optional: true + + '@esbuild/linux-riscv64@0.28.2': + optional: true + + '@esbuild/linux-s390x@0.25.4': + optional: true + + '@esbuild/linux-s390x@0.28.2': + optional: true + + '@esbuild/linux-x64@0.25.4': + optional: true + + '@esbuild/linux-x64@0.28.2': + optional: true + + '@esbuild/netbsd-arm64@0.25.4': + optional: true + + '@esbuild/netbsd-arm64@0.28.2': + optional: true + + '@esbuild/netbsd-x64@0.25.4': + optional: true + + '@esbuild/netbsd-x64@0.28.2': + optional: true + + '@esbuild/openbsd-arm64@0.25.4': + optional: true + + '@esbuild/openbsd-arm64@0.28.2': + optional: true + + '@esbuild/openbsd-x64@0.25.4': + optional: true + + '@esbuild/openbsd-x64@0.28.2': + optional: true + + '@esbuild/openharmony-arm64@0.28.2': + optional: true + + '@esbuild/sunos-x64@0.25.4': + optional: true + + '@esbuild/sunos-x64@0.28.2': + optional: true + + '@esbuild/win32-arm64@0.25.4': + optional: true + + '@esbuild/win32-arm64@0.28.2': + optional: true + + '@esbuild/win32-ia32@0.25.4': + optional: true + + '@esbuild/win32-ia32@0.28.2': + optional: true + + '@esbuild/win32-x64@0.25.4': + optional: true + + '@esbuild/win32-x64@0.28.2': + optional: true + + '@eslint-community/eslint-utils@4.4.1(eslint@8.57.1(supports-color@7.2.0))': + dependencies: + eslint: 8.57.1(supports-color@7.2.0) + eslint-visitor-keys: 3.4.3 + + '@eslint-community/regexpp@4.12.1': {} + + '@eslint/eslintrc@2.1.4(supports-color@7.2.0)': + dependencies: + ajv: 6.15.0 + debug: 4.3.7(supports-color@7.2.0) + espree: 9.6.1 + globals: 13.24.0 + ignore: 5.3.2 + import-fresh: 3.3.0 + js-yaml: 4.3.2 + minimatch: 3.1.5 + strip-json-comments: 3.1.1 + transitivePeerDependencies: + - supports-color + + '@eslint/js@8.57.1': {} + + '@floating-ui/core@1.8.0': + dependencies: + '@floating-ui/utils': 0.2.12 + + '@floating-ui/dom@1.8.0': + dependencies: + '@floating-ui/core': 1.8.0 + '@floating-ui/utils': 0.2.12 + + '@floating-ui/utils@0.2.12': {} + + '@form-create/component-elm-checkbox@3.3.0(vue@3.5.44(typescript@5.3.3))': + dependencies: + '@form-create/utils': 3.3.0 + vue: 3.5.44(typescript@5.3.3) + + '@form-create/component-elm-frame@3.3.0(vue@3.5.44(typescript@5.3.3))': + dependencies: + '@form-create/utils': 3.3.0 + vue: 3.5.44(typescript@5.3.3) + + '@form-create/component-elm-group@3.3.0(vue@3.5.44(typescript@5.3.3))': + dependencies: + '@form-create/utils': 3.3.0 + vue: 3.5.44(typescript@5.3.3) + + '@form-create/component-elm-radio@3.3.0(vue@3.5.44(typescript@5.3.3))': + dependencies: + '@form-create/utils': 3.3.0 + vue: 3.5.44(typescript@5.3.3) + + '@form-create/component-elm-select@3.3.0(vue@3.5.44(typescript@5.3.3))': + dependencies: + '@form-create/utils': 3.3.0 + vue: 3.5.44(typescript@5.3.3) + + '@form-create/component-elm-tree@3.3.0(vue@3.5.44(typescript@5.3.3))': + dependencies: + '@form-create/utils': 3.3.0 + vue: 3.5.44(typescript@5.3.3) + + '@form-create/component-elm-upload@3.3.0(vue@3.5.44(typescript@5.3.3))': + dependencies: + '@form-create/utils': 3.3.0 + vue: 3.5.44(typescript@5.3.3) + + '@form-create/component-subform@3.3.0(vue@3.5.44(typescript@5.3.3))': + dependencies: + vue: 3.5.44(typescript@5.3.3) + + '@form-create/component-wangeditor@3.3.0(vue@3.5.44(typescript@5.3.3))': + dependencies: + vue: 3.5.44(typescript@5.3.3) + wangeditor: 4.7.15 + + '@form-create/core@3.3.4(vue@3.5.44(typescript@5.3.3))': + dependencies: + '@form-create/utils': 3.3.0 + vue: 3.5.44(typescript@5.3.3) + + '@form-create/designer@3.5.0(vue@3.5.44(typescript@5.3.3))': + dependencies: + '@form-create/component-wangeditor': 3.3.0(vue@3.5.44(typescript@5.3.3)) + '@form-create/element-ui': 3.3.4(vue@3.5.44(typescript@5.3.3)) + '@form-create/utils': 3.3.0 + codemirror: 6.65.7 + element-plus: 2.14.5(vue@3.5.44(typescript@5.3.3)) + js-beautify: 1.15.4 + marked: 17.0.6 + signature_pad: 5.1.4 + sortablejs: 1.14.0 + vue: 3.5.44(typescript@5.3.3) + vuedraggable: 4.1.0(vue@3.5.44(typescript@5.3.3)) + + '@form-create/element-ui@3.3.4(vue@3.5.44(typescript@5.3.3))': + dependencies: + '@form-create/component-elm-checkbox': 3.3.0(vue@3.5.44(typescript@5.3.3)) + '@form-create/component-elm-frame': 3.3.0(vue@3.5.44(typescript@5.3.3)) + '@form-create/component-elm-group': 3.3.0(vue@3.5.44(typescript@5.3.3)) + '@form-create/component-elm-radio': 3.3.0(vue@3.5.44(typescript@5.3.3)) + '@form-create/component-elm-select': 3.3.0(vue@3.5.44(typescript@5.3.3)) + '@form-create/component-elm-tree': 3.3.0(vue@3.5.44(typescript@5.3.3)) + '@form-create/component-elm-upload': 3.3.0(vue@3.5.44(typescript@5.3.3)) + '@form-create/component-subform': 3.3.0(vue@3.5.44(typescript@5.3.3)) + '@form-create/core': 3.3.4(vue@3.5.44(typescript@5.3.3)) + '@form-create/utils': 3.3.0 + vue: 3.5.44(typescript@5.3.3) + + '@form-create/utils@3.3.0': {} + + '@gera2ld/jsx-dom@2.2.2': + dependencies: + '@babel/runtime': 7.29.10 + + '@humanwhocodes/config-array@0.13.0(supports-color@7.2.0)': + dependencies: + '@humanwhocodes/object-schema': 2.0.3 + debug: 4.3.7(supports-color@7.2.0) + minimatch: 3.1.5 + transitivePeerDependencies: + - supports-color + + '@humanwhocodes/module-importer@1.0.1': {} + + '@humanwhocodes/object-schema@2.0.3': {} + + '@iconify/iconify@2.1.2': + dependencies: + cross-fetch: 3.1.8 + transitivePeerDependencies: + - encoding + + '@iconify/iconify@3.1.1': + dependencies: + '@iconify/types': 2.0.0 + + '@iconify/json@2.2.548': + dependencies: + '@iconify/types': 2.0.0 + pathe: 2.0.3 + + '@iconify/types@2.0.0': {} + + '@iconify/utils@3.1.7': + dependencies: + '@antfu/install-pkg': 2.1.0 + '@iconify/types': 2.0.0 + import-meta-resolve: 4.2.0 + + '@intlify/bundle-utils@11.2.7(vue-i18n@9.14.5(vue@3.5.44(typescript@5.3.3)))': + dependencies: + '@intlify/message-compiler': 11.4.16 + '@intlify/shared': 11.4.16 + acorn: 8.19.0 + esbuild: 0.25.4 + jsonc-eslint-parser: 2.4.0 + source-map-js: 1.2.2 + yaml-eslint-parser: 1.2.3 + optionalDependencies: + vue-i18n: 9.14.5(vue@3.5.44(typescript@5.3.3)) + + '@intlify/core-base@9.14.5': + dependencies: + '@intlify/message-compiler': 9.14.5 + '@intlify/shared': 9.14.5 + + '@intlify/message-compiler@11.4.16': + dependencies: + '@intlify/shared': 11.4.16 + source-map-js: 1.2.2 + + '@intlify/message-compiler@9.14.5': + dependencies: + '@intlify/shared': 9.14.5 + source-map-js: 1.2.2 + + '@intlify/shared@11.4.16': {} + + '@intlify/shared@9.14.5': {} + + '@intlify/unplugin-vue-i18n@11.2.7(@vue/compiler-dom@3.5.44)(rollup@4.65.0)(supports-color@7.2.0)(typescript@5.3.3)(vite@7.3.7(@types/node@20.19.43)(jiti@2.7.0)(sass@1.106.1)(terser@5.51.2)(yaml@2.9.1))(vue-i18n@9.14.5(vue@3.5.44(typescript@5.3.3)))(vue@3.5.44(typescript@5.3.3))': + dependencies: + '@intlify/bundle-utils': 11.2.7(vue-i18n@9.14.5(vue@3.5.44(typescript@5.3.3))) + '@intlify/shared': 11.4.16 + '@intlify/vue-i18n-extensions': 8.0.0(@intlify/shared@11.4.16)(@vue/compiler-dom@3.5.44)(vue-i18n@9.14.5(vue@3.5.44(typescript@5.3.3)))(vue@3.5.44(typescript@5.3.3)) + '@rollup/pluginutils': 5.5.1(rollup@4.65.0) + '@typescript-eslint/scope-manager': 8.72.0 + '@typescript-eslint/typescript-estree': 8.72.0(supports-color@7.2.0)(typescript@5.3.3) + debug: 4.4.3(supports-color@7.2.0) + pathe: 2.0.3 + picocolors: 1.1.1 + tinyglobby: 0.2.17 + unplugin: 2.3.4 + vue: 3.5.44(typescript@5.3.3) + optionalDependencies: + vite: 7.3.7(@types/node@20.19.43)(jiti@2.7.0)(sass@1.106.1)(terser@5.51.2)(yaml@2.9.1) + vue-i18n: 9.14.5(vue@3.5.44(typescript@5.3.3)) + transitivePeerDependencies: + - '@vue/compiler-dom' + - rollup + - supports-color + - typescript + + '@intlify/vue-i18n-extensions@8.0.0(@intlify/shared@11.4.16)(@vue/compiler-dom@3.5.44)(vue-i18n@9.14.5(vue@3.5.44(typescript@5.3.3)))(vue@3.5.44(typescript@5.3.3))': + dependencies: + '@babel/parser': 7.29.11 + optionalDependencies: + '@intlify/shared': 11.4.16 + '@vue/compiler-dom': 3.5.44 + vue: 3.5.44(typescript@5.3.3) + vue-i18n: 9.14.5(vue@3.5.44(typescript@5.3.3)) + + '@isaacs/cliui@8.0.2': + dependencies: + string-width: 5.1.2 + string-width-cjs: string-width@4.2.3 + strip-ansi: 7.2.0 + strip-ansi-cjs: strip-ansi@6.0.1 + wrap-ansi: 8.1.0 + wrap-ansi-cjs: wrap-ansi@7.0.0 + + '@jest/schemas@29.6.3': + dependencies: + '@sinclair/typebox': 0.27.8 + + '@jridgewell/gen-mapping@0.3.13': + dependencies: + '@jridgewell/sourcemap-codec': 1.6.0 + '@jridgewell/trace-mapping': 0.3.31 + + '@jridgewell/gen-mapping@0.3.5': + dependencies: + '@jridgewell/set-array': 1.2.1 + '@jridgewell/sourcemap-codec': 1.5.0 + '@jridgewell/trace-mapping': 0.3.25 + + '@jridgewell/remapping@2.3.5': + dependencies: + '@jridgewell/gen-mapping': 0.3.5 + '@jridgewell/trace-mapping': 0.3.31 + + '@jridgewell/resolve-uri@3.1.2': {} + + '@jridgewell/set-array@1.2.1': {} + + '@jridgewell/source-map@0.3.6': + dependencies: + '@jridgewell/gen-mapping': 0.3.5 + '@jridgewell/trace-mapping': 0.3.25 + + '@jridgewell/sourcemap-codec@1.5.0': {} + + '@jridgewell/sourcemap-codec@1.6.0': {} + + '@jridgewell/trace-mapping@0.3.25': + dependencies: + '@jridgewell/resolve-uri': 3.1.2 + '@jridgewell/sourcemap-codec': 1.5.0 + + '@jridgewell/trace-mapping@0.3.31': + dependencies: + '@jridgewell/resolve-uri': 3.1.2 + '@jridgewell/sourcemap-codec': 1.6.0 + + '@keyv/bigmap@1.3.1(keyv@5.6.0)': + dependencies: + hashery: 1.5.1 + hookified: 1.15.1 + keyv: 5.6.0 + + '@keyv/serialize@1.1.1': {} + + '@lezer/common@1.5.4': {} + + '@lezer/highlight@1.2.5': + dependencies: + '@lezer/common': 1.5.4 + + '@lezer/lr@1.4.11': + dependencies: + '@lezer/common': 1.5.4 + + '@lezer/markdown@1.8.1': + dependencies: + '@lezer/common': 1.5.4 + '@lezer/highlight': 1.2.5 + + '@marijn/find-cluster-break@1.0.4': {} + + '@microsoft/fetch-event-source@2.0.1': {} + + '@napi-rs/lzma-linux-x64-gnu@1.5.1': + optional: true + + '@nodable/entities@3.1.0': {} + + '@nodelib/fs.scandir@2.1.5': + dependencies: + '@nodelib/fs.stat': 2.0.5 + run-parallel: 1.2.0 + + '@nodelib/fs.stat@2.0.5': {} + + '@nodelib/fs.walk@1.2.8': + dependencies: + '@nodelib/fs.scandir': 2.1.5 + fastq: 1.17.1 + + '@one-ini/wasm@0.1.1': {} + + '@one-ini/wasm@0.2.1': {} + + '@oxc-parser/binding-android-arm-eabi@0.153.0': + optional: true + + '@oxc-parser/binding-android-arm64@0.153.0': + optional: true + + '@oxc-parser/binding-darwin-arm64@0.153.0': + optional: true + + '@oxc-parser/binding-darwin-x64@0.153.0': + optional: true + + '@oxc-parser/binding-freebsd-x64@0.153.0': + optional: true + + '@oxc-parser/binding-linux-arm-gnueabihf@0.153.0': + optional: true + + '@oxc-parser/binding-linux-arm-musleabihf@0.153.0': + optional: true + + '@oxc-parser/binding-linux-arm64-gnu@0.153.0': + optional: true + + '@oxc-parser/binding-linux-arm64-musl@0.153.0': + optional: true + + '@oxc-parser/binding-linux-ppc64-gnu@0.153.0': + optional: true + + '@oxc-parser/binding-linux-riscv64-gnu@0.153.0': + optional: true + + '@oxc-parser/binding-linux-riscv64-musl@0.153.0': + optional: true + + '@oxc-parser/binding-linux-s390x-gnu@0.153.0': + optional: true + + '@oxc-parser/binding-linux-x64-gnu@0.153.0': + optional: true + + '@oxc-parser/binding-linux-x64-musl@0.153.0': + optional: true + + '@oxc-parser/binding-openharmony-arm64@0.153.0': + optional: true + + '@oxc-parser/binding-win32-arm64-msvc@0.153.0': + optional: true + + '@oxc-parser/binding-win32-ia32-msvc@0.153.0': + optional: true + + '@oxc-parser/binding-win32-x64-msvc@0.153.0': + optional: true + + '@oxc-project/types@0.153.0': {} + + '@parcel/watcher-android-arm64@2.5.0': + optional: true + + '@parcel/watcher-darwin-arm64@2.5.0': + optional: true + + '@parcel/watcher-darwin-x64@2.5.0': + optional: true + + '@parcel/watcher-freebsd-x64@2.5.0': + optional: true + + '@parcel/watcher-linux-arm-glibc@2.5.0': + optional: true + + '@parcel/watcher-linux-arm-musl@2.5.0': + optional: true + + '@parcel/watcher-linux-arm64-glibc@2.5.0': + optional: true + + '@parcel/watcher-linux-arm64-musl@2.5.0': + optional: true + + '@parcel/watcher-linux-x64-glibc@2.5.0': + optional: true + + '@parcel/watcher-linux-x64-musl@2.5.0': + optional: true + + '@parcel/watcher-win32-arm64@2.5.0': + optional: true + + '@parcel/watcher-win32-ia32@2.5.0': + optional: true + + '@parcel/watcher-win32-x64@2.5.0': + optional: true + + '@parcel/watcher@2.5.0': + dependencies: + detect-libc: 1.0.3 + is-glob: 4.0.3 + micromatch: 4.0.8 + node-addon-api: 7.1.1 + optionalDependencies: + '@parcel/watcher-android-arm64': 2.5.0 + '@parcel/watcher-darwin-arm64': 2.5.0 + '@parcel/watcher-darwin-x64': 2.5.0 + '@parcel/watcher-freebsd-x64': 2.5.0 + '@parcel/watcher-linux-arm-glibc': 2.5.0 + '@parcel/watcher-linux-arm-musl': 2.5.0 + '@parcel/watcher-linux-arm64-glibc': 2.5.0 + '@parcel/watcher-linux-arm64-musl': 2.5.0 + '@parcel/watcher-linux-x64-glibc': 2.5.0 + '@parcel/watcher-linux-x64-musl': 2.5.0 + '@parcel/watcher-win32-arm64': 2.5.0 + '@parcel/watcher-win32-ia32': 2.5.0 + '@parcel/watcher-win32-x64': 2.5.0 + optional: true + + '@pkgjs/parseargs@0.11.0': + optional: true + + '@pkgr/core@0.1.1': {} + + '@pkgr/core@0.3.6': {} + + '@purge-icons/core@0.10.0(supports-color@7.2.0)': + dependencies: + '@iconify/iconify': 2.1.2 + axios: 0.34.0(debug@4.3.7(supports-color@7.2.0)) + debug: 4.3.7(supports-color@7.2.0) + fast-glob: 3.3.2 + fs-extra: 10.1.0 + transitivePeerDependencies: + - encoding + - supports-color + + '@purge-icons/generated@0.10.0': + dependencies: + '@iconify/iconify': 3.1.1 + + '@purge-icons/generated@0.9.0': + dependencies: + '@iconify/iconify': 3.1.1 + + '@quansync/fs@0.1.1': + dependencies: + quansync: 0.2.8 + + '@quansync/fs@1.1.0': + dependencies: + quansync: 1.0.0 + + '@rolldown/pluginutils@1.0.1': {} + + '@rollup/plugin-virtual@3.0.2(rollup@4.65.0)': + optionalDependencies: + rollup: 4.65.0 + + '@rollup/pluginutils@4.2.1': + dependencies: + estree-walker: 2.0.2 + picomatch: 2.3.2 + + '@rollup/pluginutils@5.1.3(rollup@4.65.0)': + dependencies: + '@types/estree': 1.0.6 + estree-walker: 2.0.2 + picomatch: 4.0.7 + optionalDependencies: + rollup: 4.65.0 + + '@rollup/pluginutils@5.5.1(rollup@4.65.0)': + dependencies: + '@types/estree': 1.0.9 + estree-walker: 2.0.2 + picomatch: 4.0.7 + optionalDependencies: + rollup: 4.65.0 + + '@rollup/rollup-android-arm-eabi@4.65.0': + optional: true + + '@rollup/rollup-android-arm64@4.65.0': + optional: true + + '@rollup/rollup-darwin-arm64@4.65.0': + optional: true + + '@rollup/rollup-darwin-x64@4.65.0': + optional: true + + '@rollup/rollup-freebsd-arm64@4.65.0': + optional: true + + '@rollup/rollup-freebsd-x64@4.65.0': + optional: true + + '@rollup/rollup-linux-arm-gnueabihf@4.65.0': + optional: true + + '@rollup/rollup-linux-arm-musleabihf@4.65.0': + optional: true + + '@rollup/rollup-linux-arm64-gnu@4.65.0': + optional: true + + '@rollup/rollup-linux-arm64-musl@4.65.0': + optional: true + + '@rollup/rollup-linux-loong64-gnu@4.65.0': + optional: true + + '@rollup/rollup-linux-loong64-musl@4.65.0': + optional: true + + '@rollup/rollup-linux-ppc64-gnu@4.65.0': + optional: true + + '@rollup/rollup-linux-ppc64-musl@4.65.0': + optional: true + + '@rollup/rollup-linux-riscv64-gnu@4.65.0': + optional: true + + '@rollup/rollup-linux-riscv64-musl@4.65.0': + optional: true + + '@rollup/rollup-linux-s390x-gnu@4.65.0': + optional: true + + '@rollup/rollup-linux-x64-gnu@4.65.0': + optional: true + + '@rollup/rollup-linux-x64-musl@4.65.0': + optional: true + + '@rollup/rollup-openbsd-x64@4.65.0': + optional: true + + '@rollup/rollup-openharmony-arm64@4.65.0': + optional: true + + '@rollup/rollup-win32-arm64-msvc@4.65.0': + optional: true + + '@rollup/rollup-win32-ia32-msvc@4.65.0': + optional: true + + '@rollup/rollup-win32-x64-gnu@4.65.0': + optional: true + + '@rollup/rollup-win32-x64-msvc@4.65.0': + optional: true + + '@sinclair/typebox@0.27.8': {} + + '@sphinxxxx/color-conversion@2.2.2': {} + + '@standard-schema/spec@1.1.0': {} + + '@swc/core-darwin-arm64@1.9.3': + optional: true + + '@swc/core-darwin-x64@1.9.3': + optional: true + + '@swc/core-linux-arm-gnueabihf@1.9.3': + optional: true + + '@swc/core-linux-arm64-gnu@1.9.3': + optional: true + + '@swc/core-linux-arm64-musl@1.9.3': + optional: true + + '@swc/core-linux-x64-gnu@1.9.3': + optional: true + + '@swc/core-linux-x64-musl@1.9.3': + optional: true + + '@swc/core-win32-arm64-msvc@1.9.3': + optional: true + + '@swc/core-win32-ia32-msvc@1.9.3': + optional: true + + '@swc/core-win32-x64-msvc@1.9.3': + optional: true + + '@swc/core@1.9.3': + dependencies: + '@swc/counter': 0.1.3 + '@swc/types': 0.1.17 + optionalDependencies: + '@swc/core-darwin-arm64': 1.9.3 + '@swc/core-darwin-x64': 1.9.3 + '@swc/core-linux-arm-gnueabihf': 1.9.3 + '@swc/core-linux-arm64-gnu': 1.9.3 + '@swc/core-linux-arm64-musl': 1.9.3 + '@swc/core-linux-x64-gnu': 1.9.3 + '@swc/core-linux-x64-musl': 1.9.3 + '@swc/core-win32-arm64-msvc': 1.9.3 + '@swc/core-win32-ia32-msvc': 1.9.3 + '@swc/core-win32-x64-msvc': 1.9.3 + + '@swc/counter@0.1.3': {} + + '@swc/types@0.1.17': + dependencies: + '@swc/counter': 0.1.3 + + '@sxzz/popperjs-es@2.11.8': {} + + '@transloadit/prettier-bytes@0.3.4': {} + + '@types/ace@0.0.52': {} + + '@types/chai@5.2.3': + dependencies: + '@types/deep-eql': 4.0.2 + assertion-error: 2.0.1 + + '@types/conventional-commits-parser@5.0.1': + dependencies: + '@types/node': 20.19.43 + + '@types/d3-array@3.2.1': {} + + '@types/d3-axis@3.0.6': + dependencies: + '@types/d3-selection': 3.0.11 + + '@types/d3-brush@3.0.6': + dependencies: + '@types/d3-selection': 3.0.11 + + '@types/d3-chord@3.0.6': {} + + '@types/d3-color@3.1.3': {} + + '@types/d3-contour@3.0.6': + dependencies: + '@types/d3-array': 3.2.1 + '@types/geojson': 7946.0.14 + + '@types/d3-delaunay@6.0.4': {} + + '@types/d3-dispatch@3.0.6': {} + + '@types/d3-drag@3.0.7': + dependencies: + '@types/d3-selection': 3.0.11 + + '@types/d3-dsv@3.0.7': {} + + '@types/d3-ease@3.0.2': {} + + '@types/d3-fetch@3.0.7': + dependencies: + '@types/d3-dsv': 3.0.7 + + '@types/d3-force@3.0.10': {} + + '@types/d3-format@3.0.4': {} + + '@types/d3-geo@3.1.0': + dependencies: + '@types/geojson': 7946.0.14 + + '@types/d3-hierarchy@3.1.7': {} + + '@types/d3-interpolate@3.0.4': + dependencies: + '@types/d3-color': 3.1.3 + + '@types/d3-path@3.1.0': {} + + '@types/d3-polygon@3.0.2': {} + + '@types/d3-quadtree@3.0.6': {} + + '@types/d3-random@3.0.3': {} + + '@types/d3-scale-chromatic@3.1.0': {} + + '@types/d3-scale@4.0.8': + dependencies: + '@types/d3-time': 3.0.4 + + '@types/d3-selection@3.0.11': {} + + '@types/d3-shape@3.1.6': + dependencies: + '@types/d3-path': 3.1.0 + + '@types/d3-time-format@4.0.3': {} + + '@types/d3-time@3.0.4': {} + + '@types/d3-timer@3.0.2': {} + + '@types/d3-transition@3.0.9': + dependencies: + '@types/d3-selection': 3.0.11 + + '@types/d3-zoom@3.0.8': + dependencies: + '@types/d3-interpolate': 3.0.4 + '@types/d3-selection': 3.0.11 + + '@types/d3@7.4.3': + dependencies: + '@types/d3-array': 3.2.1 + '@types/d3-axis': 3.0.6 + '@types/d3-brush': 3.0.6 + '@types/d3-chord': 3.0.6 + '@types/d3-color': 3.1.3 + '@types/d3-contour': 3.0.6 + '@types/d3-delaunay': 6.0.4 + '@types/d3-dispatch': 3.0.6 + '@types/d3-drag': 3.0.7 + '@types/d3-dsv': 3.0.7 + '@types/d3-ease': 3.0.2 + '@types/d3-fetch': 3.0.7 + '@types/d3-force': 3.0.10 + '@types/d3-format': 3.0.4 + '@types/d3-geo': 3.1.0 + '@types/d3-hierarchy': 3.1.7 + '@types/d3-interpolate': 3.0.4 + '@types/d3-path': 3.1.0 + '@types/d3-polygon': 3.0.2 + '@types/d3-quadtree': 3.0.6 + '@types/d3-random': 3.0.3 + '@types/d3-scale': 4.0.8 + '@types/d3-scale-chromatic': 3.1.0 + '@types/d3-selection': 3.0.11 + '@types/d3-shape': 3.1.6 + '@types/d3-time': 3.0.4 + '@types/d3-time-format': 4.0.3 + '@types/d3-timer': 3.0.2 + '@types/d3-transition': 3.0.9 + '@types/d3-zoom': 3.0.8 + + '@types/deep-eql@4.0.2': {} + + '@types/eslint@8.56.12': + dependencies: + '@types/estree': 1.0.9 + '@types/json-schema': 7.0.15 + + '@types/estree@1.0.6': {} + + '@types/estree@1.0.9': {} + + '@types/event-emitter@0.3.5': {} + + '@types/geojson@7946.0.14': {} + + '@types/json-schema@7.0.15': {} + + '@types/jsoneditor@9.9.6': + dependencies: + '@types/ace': 0.0.52 + ajv: 6.15.0 + + '@types/lodash-es@4.17.12': + dependencies: + '@types/lodash': 4.17.13 + + '@types/lodash@4.17.13': {} + + '@types/lodash@4.17.25': {} + + '@types/node@10.17.60': {} + + '@types/node@20.19.43': + dependencies: + undici-types: 6.21.0 + + '@types/nprogress@0.2.3': {} + + '@types/qrcode@1.5.5': + dependencies: + '@types/node': 20.19.43 + + '@types/qs@6.15.1': {} + + '@types/retry@0.12.2': {} + + '@types/semver@7.5.8': {} + + '@types/trusted-types@2.0.7': + optional: true + + '@types/video.js@7.3.58': {} + + '@types/web-bluetooth@0.0.20': {} + + '@types/web-bluetooth@0.0.21': {} + + '@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@5.3.3))(eslint@8.57.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@5.3.3)': + dependencies: + '@eslint-community/regexpp': 4.12.1 + '@typescript-eslint/parser': 7.18.0(eslint@8.57.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@5.3.3) + '@typescript-eslint/scope-manager': 7.18.0 + '@typescript-eslint/type-utils': 7.18.0(eslint@8.57.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@5.3.3) + '@typescript-eslint/utils': 7.18.0(eslint@8.57.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@5.3.3) + '@typescript-eslint/visitor-keys': 7.18.0 + eslint: 8.57.1(supports-color@7.2.0) + graphemer: 1.4.0 + ignore: 5.3.2 + natural-compare: 1.4.0 + ts-api-utils: 1.4.3(typescript@5.3.3) + optionalDependencies: + typescript: 5.3.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/parser@6.21.0(eslint@8.57.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@5.3.3)': + dependencies: + '@typescript-eslint/scope-manager': 6.21.0 + '@typescript-eslint/types': 6.21.0 + '@typescript-eslint/typescript-estree': 6.21.0(supports-color@7.2.0)(typescript@5.3.3) + '@typescript-eslint/visitor-keys': 6.21.0 + debug: 4.3.7(supports-color@7.2.0) + eslint: 8.57.1(supports-color@7.2.0) + optionalDependencies: + typescript: 5.3.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/parser@7.18.0(eslint@8.57.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@5.3.3)': + dependencies: + '@typescript-eslint/scope-manager': 7.18.0 + '@typescript-eslint/types': 7.18.0 + '@typescript-eslint/typescript-estree': 7.18.0(supports-color@7.2.0)(typescript@5.3.3) + '@typescript-eslint/visitor-keys': 7.18.0 + debug: 4.3.7(supports-color@7.2.0) + eslint: 8.57.1(supports-color@7.2.0) + optionalDependencies: + typescript: 5.3.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/project-service@8.72.0(supports-color@7.2.0)(typescript@5.3.3)': + dependencies: + '@typescript-eslint/tsconfig-utils': 8.72.0(typescript@5.3.3) + '@typescript-eslint/types': 8.72.0 + debug: 4.4.3(supports-color@7.2.0) + typescript: 5.3.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/scope-manager@6.21.0': + dependencies: + '@typescript-eslint/types': 6.21.0 + '@typescript-eslint/visitor-keys': 6.21.0 + + '@typescript-eslint/scope-manager@7.18.0': + dependencies: + '@typescript-eslint/types': 7.18.0 + '@typescript-eslint/visitor-keys': 7.18.0 + + '@typescript-eslint/scope-manager@8.26.1': + dependencies: + '@typescript-eslint/types': 8.26.1 + '@typescript-eslint/visitor-keys': 8.26.1 + + '@typescript-eslint/scope-manager@8.72.0': + dependencies: + '@typescript-eslint/types': 8.72.0 + '@typescript-eslint/visitor-keys': 8.72.0 + + '@typescript-eslint/tsconfig-utils@8.72.0(typescript@5.3.3)': + dependencies: + typescript: 5.3.3 + + '@typescript-eslint/type-utils@7.18.0(eslint@8.57.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@5.3.3)': + dependencies: + '@typescript-eslint/typescript-estree': 7.18.0(supports-color@7.2.0)(typescript@5.3.3) + '@typescript-eslint/utils': 7.18.0(eslint@8.57.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@5.3.3) + debug: 4.3.7(supports-color@7.2.0) + eslint: 8.57.1(supports-color@7.2.0) + ts-api-utils: 1.4.3(typescript@5.3.3) + optionalDependencies: + typescript: 5.3.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/types@6.21.0': {} + + '@typescript-eslint/types@7.18.0': {} + + '@typescript-eslint/types@8.26.1': {} + + '@typescript-eslint/types@8.72.0': {} + + '@typescript-eslint/typescript-estree@6.21.0(supports-color@7.2.0)(typescript@5.3.3)': + dependencies: + '@typescript-eslint/types': 6.21.0 + '@typescript-eslint/visitor-keys': 6.21.0 + debug: 4.4.3(supports-color@7.2.0) + globby: 11.1.0 + is-glob: 4.0.3 + minimatch: 9.0.9 + semver: 7.6.3 + ts-api-utils: 1.4.3(typescript@5.3.3) + optionalDependencies: + typescript: 5.3.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/typescript-estree@7.18.0(supports-color@7.2.0)(typescript@5.3.3)': + dependencies: + '@typescript-eslint/types': 7.18.0 + '@typescript-eslint/visitor-keys': 7.18.0 + debug: 4.3.7(supports-color@7.2.0) + globby: 11.1.0 + is-glob: 4.0.3 + minimatch: 9.0.9 + semver: 7.6.3 + ts-api-utils: 1.4.3(typescript@5.3.3) + optionalDependencies: + typescript: 5.3.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/typescript-estree@8.26.1(supports-color@7.2.0)(typescript@5.3.3)': + dependencies: + '@typescript-eslint/types': 8.26.1 + '@typescript-eslint/visitor-keys': 8.26.1 + debug: 4.4.3(supports-color@7.2.0) + fast-glob: 3.3.3 + is-glob: 4.0.3 + minimatch: 9.0.9 + semver: 7.8.5 + ts-api-utils: 2.0.1(typescript@5.3.3) + typescript: 5.3.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/typescript-estree@8.72.0(supports-color@7.2.0)(typescript@5.3.3)': + dependencies: + '@typescript-eslint/project-service': 8.72.0(supports-color@7.2.0)(typescript@5.3.3) + '@typescript-eslint/tsconfig-utils': 8.72.0(typescript@5.3.3) + '@typescript-eslint/types': 8.72.0 + '@typescript-eslint/visitor-keys': 8.72.0 + debug: 4.4.3(supports-color@7.2.0) + minimatch: 10.2.6 + semver: 7.8.5 + tinyglobby: 0.2.17 + ts-api-utils: 2.5.0(typescript@5.3.3) + typescript: 5.3.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/utils@6.21.0(eslint@8.57.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@5.3.3)': + dependencies: + '@eslint-community/eslint-utils': 4.4.1(eslint@8.57.1(supports-color@7.2.0)) + '@types/json-schema': 7.0.15 + '@types/semver': 7.5.8 + '@typescript-eslint/scope-manager': 6.21.0 + '@typescript-eslint/types': 6.21.0 + '@typescript-eslint/typescript-estree': 6.21.0(supports-color@7.2.0)(typescript@5.3.3) + eslint: 8.57.1(supports-color@7.2.0) + semver: 7.6.3 + transitivePeerDependencies: + - supports-color + - typescript + + '@typescript-eslint/utils@7.18.0(eslint@8.57.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@5.3.3)': + dependencies: + '@eslint-community/eslint-utils': 4.4.1(eslint@8.57.1(supports-color@7.2.0)) + '@typescript-eslint/scope-manager': 7.18.0 + '@typescript-eslint/types': 7.18.0 + '@typescript-eslint/typescript-estree': 7.18.0(supports-color@7.2.0)(typescript@5.3.3) + eslint: 8.57.1(supports-color@7.2.0) + transitivePeerDependencies: + - supports-color + - typescript + + '@typescript-eslint/utils@8.26.1(eslint@8.57.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@5.3.3)': + dependencies: + '@eslint-community/eslint-utils': 4.4.1(eslint@8.57.1(supports-color@7.2.0)) + '@typescript-eslint/scope-manager': 8.26.1 + '@typescript-eslint/types': 8.26.1 + '@typescript-eslint/typescript-estree': 8.26.1(supports-color@7.2.0)(typescript@5.3.3) + eslint: 8.57.1(supports-color@7.2.0) + typescript: 5.3.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/visitor-keys@6.21.0': + dependencies: + '@typescript-eslint/types': 6.21.0 + eslint-visitor-keys: 3.4.3 + + '@typescript-eslint/visitor-keys@7.18.0': + dependencies: + '@typescript-eslint/types': 7.18.0 + eslint-visitor-keys: 3.4.3 + + '@typescript-eslint/visitor-keys@8.26.1': + dependencies: + '@typescript-eslint/types': 8.26.1 + eslint-visitor-keys: 4.2.0 + + '@typescript-eslint/visitor-keys@8.72.0': + dependencies: + '@typescript-eslint/types': 8.72.0 + eslint-visitor-keys: 5.0.1 + + '@ungap/structured-clone@1.2.0': {} + + '@unocss/autocomplete@66.11.0': + dependencies: + fzf: 0.5.2 + lru-cache: 11.5.3 + + '@unocss/cli@66.11.0': + dependencies: + '@jridgewell/remapping': 2.3.5 + '@unocss/config': 66.11.0 + '@unocss/core': 66.11.0 + '@unocss/preset-wind3': 66.11.0 + '@unocss/preset-wind4': 66.11.0 + '@unocss/transformer-directives': 66.11.0 + cac: 7.1.0 + chokidar: 5.0.0 + colorette: 2.0.20 + consola: 3.4.2 + magic-string: 1.4.4 + pathe: 2.0.3 + perfect-debounce: 2.1.0 + tinyglobby: 0.2.17 + unplugin-utils: 0.3.2 + + '@unocss/config@0.57.7': + dependencies: + '@unocss/core': 0.57.7 + unconfig: 0.3.13 + + '@unocss/config@66.1.0-beta.5': + dependencies: + '@unocss/core': 66.1.0-beta.5 + unconfig: 7.3.1 + + '@unocss/config@66.11.0': + dependencies: + '@unocss/core': 66.11.0 + colorette: 2.0.20 + consola: 3.4.2 + unconfig: 7.5.0 + + '@unocss/core@0.57.7': {} + + '@unocss/core@66.1.0-beta.5': {} + + '@unocss/core@66.11.0': {} + + '@unocss/eslint-config@0.57.7(eslint@8.57.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@5.3.3)': + dependencies: + '@unocss/eslint-plugin': 0.57.7(eslint@8.57.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@5.3.3) + transitivePeerDependencies: + - eslint + - supports-color + - typescript + + '@unocss/eslint-plugin@0.57.7(eslint@8.57.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@5.3.3)': + dependencies: + '@typescript-eslint/utils': 6.21.0(eslint@8.57.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@5.3.3) + '@unocss/config': 0.57.7 + '@unocss/core': 0.57.7 + magic-string: 0.30.14 + synckit: 0.8.8 + transitivePeerDependencies: + - eslint + - supports-color + - typescript + + '@unocss/eslint-plugin@66.1.0-beta.5(eslint@8.57.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@5.3.3)': + dependencies: + '@typescript-eslint/utils': 8.26.1(eslint@8.57.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@5.3.3) + '@unocss/config': 66.1.0-beta.5 + '@unocss/core': 66.1.0-beta.5 + '@unocss/rule-utils': 66.1.0-beta.5 + magic-string: 0.30.17 + synckit: 0.9.2 + transitivePeerDependencies: + - eslint + - supports-color + - typescript + + '@unocss/extractor-arbitrary-variants@66.11.0': + dependencies: + '@unocss/core': 66.11.0 + + '@unocss/inspector@66.11.0(cac@7.1.0)(srvx@1.0.7)': + dependencies: + '@unocss/autocomplete': 66.11.0 + '@unocss/config': 66.11.0 + '@unocss/core': 66.11.0 + '@unocss/language-server': 66.11.0 + '@unocss/rule-utils': 66.11.0 + devframe: 1.2.6(cac@7.1.0)(srvx@1.0.7) + tinyglobby: 0.2.17 + unplugin-utils: 0.3.2 + transitivePeerDependencies: + - '@devframes/agentic' + - cac + - ocache + - srvx + + '@unocss/language-server@66.11.0': + dependencies: + '@colordx/core': 7.3.0 + '@unocss/autocomplete': 66.11.0 + '@unocss/config': 66.11.0 + '@unocss/core': 66.11.0 + '@unocss/preset-wind3': 66.11.0 + prettier: 3.9.10 + unconfig: 7.5.0 + vscode-languageserver: 10.1.2 + vscode-languageserver-textdocument: 1.0.16 + + '@unocss/preset-attributify@66.11.0': + dependencies: + '@unocss/core': 66.11.0 + + '@unocss/preset-icons@66.11.0': + dependencies: + '@iconify/utils': 3.1.7 + '@unocss/core': 66.11.0 + ofetch: 1.5.1 + + '@unocss/preset-mini@66.11.0': + dependencies: + '@unocss/core': 66.11.0 + '@unocss/extractor-arbitrary-variants': 66.11.0 + '@unocss/rule-utils': 66.11.0 + + '@unocss/preset-tagify@66.11.0': + dependencies: + '@unocss/core': 66.11.0 + + '@unocss/preset-typography@66.11.0': + dependencies: + '@unocss/core': 66.11.0 + '@unocss/rule-utils': 66.11.0 + + '@unocss/preset-uno@66.11.0': + dependencies: + '@unocss/core': 66.11.0 + '@unocss/preset-wind3': 66.11.0 + + '@unocss/preset-web-fonts@66.11.0': + dependencies: + '@unocss/core': 66.11.0 + ofetch: 1.5.1 + + '@unocss/preset-wind3@66.11.0': + dependencies: + '@unocss/core': 66.11.0 + '@unocss/preset-mini': 66.11.0 + '@unocss/rule-utils': 66.11.0 + + '@unocss/preset-wind4@66.11.0': + dependencies: + '@unocss/core': 66.11.0 + '@unocss/extractor-arbitrary-variants': 66.11.0 + '@unocss/rule-utils': 66.11.0 + + '@unocss/preset-wind@66.11.0': + dependencies: + '@unocss/core': 66.11.0 + '@unocss/preset-wind3': 66.11.0 + + '@unocss/rollup@66.11.0(rollup@4.65.0)': + dependencies: + '@jridgewell/remapping': 2.3.5 + '@unocss/config': 66.11.0 + '@unocss/core': 66.11.0 + chokidar: 5.0.0 + magic-string: 1.4.4 + pathe: 2.0.3 + tinyglobby: 0.2.17 + unplugin-utils: 0.3.2 + optionalDependencies: + rollup: 4.65.0 + + '@unocss/rule-utils@66.1.0-beta.5': + dependencies: + '@unocss/core': 66.11.0 + magic-string: 0.30.17 + + '@unocss/rule-utils@66.11.0': + dependencies: + '@unocss/core': 66.11.0 + magic-string: 1.4.4 + + '@unocss/transformer-attributify-jsx@66.11.0(@oxc-project/types@0.153.0)': + dependencies: + '@unocss/core': 66.11.0 + oxc-parser: 0.153.0 + oxc-walker: 1.1.1(@oxc-project/types@0.153.0)(oxc-parser@0.153.0) + transitivePeerDependencies: + - '@oxc-project/types' + - rolldown + + '@unocss/transformer-compile-class@66.11.0': + dependencies: + '@unocss/core': 66.11.0 + + '@unocss/transformer-directives@66.11.0': + dependencies: + '@unocss/core': 66.11.0 + '@unocss/rule-utils': 66.11.0 + css-tree: 3.2.1 + + '@unocss/transformer-variant-group@66.11.0': + dependencies: + '@unocss/core': 66.11.0 + + '@unocss/vite@66.11.0(cac@7.1.0)(srvx@1.0.7)(vite@7.3.7(@types/node@20.19.43)(jiti@2.7.0)(sass@1.106.1)(terser@5.51.2)(yaml@2.9.1))': + dependencies: + '@jridgewell/remapping': 2.3.5 + '@unocss/config': 66.11.0 + '@unocss/core': 66.11.0 + '@unocss/inspector': 66.11.0(cac@7.1.0)(srvx@1.0.7) + chokidar: 5.0.0 + magic-string: 1.4.4 + pathe: 2.0.3 + tinyglobby: 0.2.17 + unplugin-utils: 0.3.2 + vite: 7.3.7(@types/node@20.19.43)(jiti@2.7.0)(sass@1.106.1)(terser@5.51.2)(yaml@2.9.1) + transitivePeerDependencies: + - '@devframes/agentic' + - cac + - ocache + - srvx + + '@uppy/companion-client@5.1.1(@uppy/core@5.0.0)': + dependencies: + '@uppy/core': 5.0.0 + '@uppy/utils': 7.2.0 + namespace-emitter: 2.0.1 + p-retry: 6.1.0 + transitivePeerDependencies: + - preact-render-to-string + + '@uppy/core@5.0.0': + dependencies: + '@transloadit/prettier-bytes': 0.3.4 + '@uppy/store-default': 5.0.0 + '@uppy/utils': 7.2.0 + lodash: 4.18.1 + mime-match: 1.0.2 + namespace-emitter: 2.0.1 + nanoid: 5.1.16 + preact: 10.29.8 + transitivePeerDependencies: + - preact-render-to-string + + '@uppy/store-default@5.0.0': {} + + '@uppy/utils@7.2.0': + dependencies: + lodash: 4.18.1 + preact: 10.29.8 + transitivePeerDependencies: + - preact-render-to-string + + '@uppy/xhr-upload@5.2.0(@uppy/core@5.0.0)': + dependencies: + '@uppy/companion-client': 5.1.1(@uppy/core@5.0.0) + '@uppy/core': 5.0.0 + '@uppy/utils': 7.2.0 + transitivePeerDependencies: + - preact-render-to-string + + '@videojs-player/vue@1.0.0(@types/video.js@7.3.58)(video.js@7.21.6)(vue@3.5.44(typescript@5.3.3))': + dependencies: + '@types/video.js': 7.3.58 + video.js: 7.21.6 + vue: 3.5.44(typescript@5.3.3) + + '@videojs/http-streaming@2.16.3(video.js@7.21.6)': + dependencies: + '@babel/runtime': 7.29.10 + '@videojs/vhs-utils': 3.0.5 + aes-decrypter: 3.1.3 + global: 4.4.0 + m3u8-parser: 4.8.0 + mpd-parser: 0.22.1 + mux.js: 6.0.1 + video.js: 7.21.6 + + '@videojs/vhs-utils@3.0.5': + dependencies: + '@babel/runtime': 7.29.10 + global: 4.4.0 + url-toolkit: 2.2.5 + + '@videojs/xhr@2.6.0': + dependencies: + '@babel/runtime': 7.29.10 + global: 4.4.0 + is-function: 1.0.2 + + '@vitejs/plugin-vue-jsx@5.1.6(supports-color@7.2.0)(vite@7.3.7(@types/node@20.19.43)(jiti@2.7.0)(sass@1.106.1)(terser@5.51.2)(yaml@2.9.1))(vue@3.5.44(typescript@5.3.3))': + dependencies: + '@babel/core': 7.29.7(supports-color@7.2.0) + '@babel/plugin-syntax-typescript': 7.29.7(@babel/core@7.29.7(supports-color@7.2.0)) + '@babel/plugin-transform-typescript': 7.29.9(@babel/core@7.29.7(supports-color@7.2.0))(supports-color@7.2.0) + '@rolldown/pluginutils': 1.0.1 + '@vue/babel-plugin-jsx': 2.0.1(@babel/core@7.29.7(supports-color@7.2.0))(supports-color@7.2.0) + vite: 7.3.7(@types/node@20.19.43)(jiti@2.7.0)(sass@1.106.1)(terser@5.51.2)(yaml@2.9.1) + vue: 3.5.44(typescript@5.3.3) + transitivePeerDependencies: + - supports-color + + '@vitejs/plugin-vue@6.0.10(vite@7.3.7(@types/node@20.19.43)(jiti@2.7.0)(sass@1.106.1)(terser@5.51.2)(yaml@2.9.1))(vue@3.5.44(typescript@5.3.3))': + dependencies: + '@rolldown/pluginutils': 1.0.1 + vite: 7.3.7(@types/node@20.19.43)(jiti@2.7.0)(sass@1.106.1)(terser@5.51.2)(yaml@2.9.1) + vue: 3.5.44(typescript@5.3.3) + + '@vitest/coverage-v8@4.1.12(vitest@4.1.12)': + dependencies: + '@bcoe/v8-coverage': 1.0.2 + '@vitest/utils': 4.1.12 + ast-v8-to-istanbul: 1.0.7 + istanbul-lib-coverage: 3.2.2 + istanbul-lib-report: 3.0.1 + istanbul-reports: 3.2.0 + magicast: 0.5.5 + obug: 2.2.1 + std-env: 4.3.0 + tinyrainbow: 3.2.0 + vitest: 4.1.12(@types/node@20.19.43)(@vitest/coverage-v8@4.1.12)(jsdom@26.1.0(supports-color@7.2.0))(vite@7.3.7(@types/node@20.19.43)(jiti@2.7.0)(sass@1.106.1)(terser@5.51.2)(yaml@2.9.1)) + + '@vitest/expect@4.1.12': + dependencies: + '@standard-schema/spec': 1.1.0 + '@types/chai': 5.2.3 + '@vitest/spy': 4.1.12 + '@vitest/utils': 4.1.12 + chai: 6.3.0 + tinyrainbow: 3.2.0 + + '@vitest/mocker@4.1.12(vite@7.3.7(@types/node@20.19.43)(jiti@2.7.0)(sass@1.106.1)(terser@5.51.2)(yaml@2.9.1))': + dependencies: + '@vitest/spy': 4.1.12 + estree-walker: 3.0.3 + magic-string: 0.30.21 + optionalDependencies: + vite: 7.3.7(@types/node@20.19.43)(jiti@2.7.0)(sass@1.106.1)(terser@5.51.2)(yaml@2.9.1) + + '@vitest/pretty-format@4.1.12': + dependencies: + tinyrainbow: 3.2.0 + + '@vitest/runner@4.1.12': + dependencies: + '@vitest/utils': 4.1.12 + pathe: 2.0.3 + + '@vitest/snapshot@4.1.12': + dependencies: + '@vitest/pretty-format': 4.1.12 + '@vitest/utils': 4.1.12 + magic-string: 0.30.21 + pathe: 2.0.3 + + '@vitest/spy@4.1.12': {} + + '@vitest/utils@4.1.12': + dependencies: + '@vitest/pretty-format': 4.1.12 + convert-source-map: 2.0.0 + tinyrainbow: 3.2.0 + + '@volar/language-core@1.0.24': + dependencies: + '@volar/source-map': 1.0.24 + muggle-string: 0.1.0 + + '@volar/language-core@1.11.1': + dependencies: + '@volar/source-map': 1.11.1 + + '@volar/source-map@1.0.24': + dependencies: + muggle-string: 0.1.0 + + '@volar/source-map@1.11.1': + dependencies: + muggle-string: 0.3.1 + + '@volar/typescript@1.0.24(typescript@5.3.3)': + dependencies: + '@volar/language-core': 1.0.24 + optionalDependencies: + typescript: 5.3.3 + + '@volar/typescript@1.11.1(typescript@5.3.3)': + dependencies: + '@volar/language-core': 1.11.1 + path-browserify: 1.0.1 + optionalDependencies: + typescript: 5.3.3 + + '@volar/vue-language-core@1.0.24': + dependencies: + '@volar/language-core': 1.0.24 + '@volar/source-map': 1.0.24 + '@vue/compiler-dom': 3.5.13 + '@vue/compiler-sfc': 3.5.13 + '@vue/reactivity': 3.5.12 + '@vue/shared': 3.5.13 + minimatch: 5.1.9 + vue-template-compiler: 2.7.16 + + '@volar/vue-typescript@1.0.24(typescript@5.3.3)': + dependencies: + '@volar/typescript': 1.0.24(typescript@5.3.3) + '@volar/vue-language-core': 1.0.24 + transitivePeerDependencies: + - typescript + + '@vue/babel-helper-vue-transform-on@2.0.1': {} + + '@vue/babel-plugin-jsx@2.0.1(@babel/core@7.29.7(supports-color@7.2.0))(supports-color@7.2.0)': + dependencies: + '@babel/helper-module-imports': 7.29.7(supports-color@7.2.0) + '@babel/helper-plugin-utils': 7.29.7 + '@babel/plugin-syntax-jsx': 7.29.7(@babel/core@7.29.7(supports-color@7.2.0)) + '@babel/template': 7.29.7 + '@babel/traverse': 7.29.10(supports-color@7.2.0) + '@babel/types': 7.29.11 + '@vue/babel-helper-vue-transform-on': 2.0.1 + '@vue/babel-plugin-resolve-type': 2.0.1(@babel/core@7.29.7(supports-color@7.2.0))(supports-color@7.2.0) + '@vue/shared': 3.5.44 + optionalDependencies: + '@babel/core': 7.29.7(supports-color@7.2.0) + transitivePeerDependencies: + - supports-color + + '@vue/babel-plugin-resolve-type@2.0.1(@babel/core@7.29.7(supports-color@7.2.0))(supports-color@7.2.0)': + dependencies: + '@babel/code-frame': 7.29.7 + '@babel/core': 7.29.7(supports-color@7.2.0) + '@babel/helper-module-imports': 7.29.7(supports-color@7.2.0) + '@babel/helper-plugin-utils': 7.29.7 + '@babel/parser': 7.29.11 + '@vue/compiler-sfc': 3.5.44 + transitivePeerDependencies: + - supports-color + + '@vue/compiler-core@3.5.13': + dependencies: + '@babel/parser': 7.29.11 + '@vue/shared': 3.5.13 + entities: 4.5.0 + estree-walker: 2.0.2 + source-map-js: 1.2.2 + + '@vue/compiler-core@3.5.44': + dependencies: + '@babel/parser': 7.29.11 + '@vue/shared': 3.5.44 + entities: 7.0.1 + estree-walker: 2.0.2 + source-map-js: 1.2.2 + + '@vue/compiler-dom@3.5.13': + dependencies: + '@vue/compiler-core': 3.5.13 + '@vue/shared': 3.5.13 + + '@vue/compiler-dom@3.5.44': + dependencies: + '@vue/compiler-core': 3.5.44 + '@vue/shared': 3.5.44 + + '@vue/compiler-sfc@3.5.13': + dependencies: + '@babel/parser': 7.29.11 + '@vue/compiler-core': 3.5.13 + '@vue/compiler-dom': 3.5.13 + '@vue/compiler-ssr': 3.5.13 + '@vue/shared': 3.5.13 + estree-walker: 2.0.2 + magic-string: 0.30.14 + postcss: 8.5.31 + source-map-js: 1.2.2 + + '@vue/compiler-sfc@3.5.44': + dependencies: + '@babel/parser': 7.29.11 + '@vue/compiler-core': 3.5.44 + '@vue/compiler-dom': 3.5.44 + '@vue/compiler-ssr': 3.5.44 + '@vue/shared': 3.5.44 + estree-walker: 2.0.2 + magic-string: 0.30.21 + postcss: 8.5.31 + source-map-js: 1.2.2 + + '@vue/compiler-ssr@3.5.13': + dependencies: + '@vue/compiler-dom': 3.5.13 + '@vue/shared': 3.5.13 + + '@vue/compiler-ssr@3.5.44': + dependencies: + '@vue/compiler-dom': 3.5.44 + '@vue/shared': 3.5.44 + + '@vue/devtools-api@6.6.4': {} + + '@vue/language-core@1.8.27(typescript@5.3.3)': + dependencies: + '@volar/language-core': 1.11.1 + '@volar/source-map': 1.11.1 + '@vue/compiler-dom': 3.5.13 + '@vue/shared': 3.5.13 + computeds: 0.0.1 + minimatch: 9.0.9 + muggle-string: 0.3.1 + path-browserify: 1.0.1 + vue-template-compiler: 2.7.16 + optionalDependencies: + typescript: 5.3.3 + + '@vue/reactivity@3.5.12': + dependencies: + '@vue/shared': 3.5.12 + + '@vue/reactivity@3.5.44': + dependencies: + '@vue/shared': 3.5.44 + + '@vue/runtime-core@3.5.44': + dependencies: + '@vue/reactivity': 3.5.44 + '@vue/shared': 3.5.44 + + '@vue/runtime-dom@3.5.44': + dependencies: + '@vue/reactivity': 3.5.44 + '@vue/runtime-core': 3.5.44 + '@vue/shared': 3.5.44 + csstype: 3.2.3 + + '@vue/server-renderer@3.5.44': + dependencies: + '@vue/compiler-ssr': 3.5.44 + '@vue/runtime-dom': 3.5.44 + '@vue/shared': 3.5.44 + + '@vue/shared@3.5.12': {} + + '@vue/shared@3.5.13': {} + + '@vue/shared@3.5.44': {} + + '@vue/test-utils@2.5.1(@vue/compiler-dom@3.5.44)(@vue/server-renderer@3.5.44)(vue@3.5.44(typescript@5.3.3))': + dependencies: + '@vue/compiler-dom': 3.5.44 + js-beautify: 2.0.3 + vue: 3.5.44(typescript@5.3.3) + vue-component-type-helpers: 3.3.11 + optionalDependencies: + '@vue/server-renderer': 3.5.44 + + '@vueuse/core@10.11.1(vue@3.5.44(typescript@5.3.3))': + dependencies: + '@types/web-bluetooth': 0.0.20 + '@vueuse/metadata': 10.11.1 + '@vueuse/shared': 10.11.1(vue@3.5.44(typescript@5.3.3)) + vue-demi: 0.14.10(vue@3.5.44(typescript@5.3.3)) + transitivePeerDependencies: + - '@vue/composition-api' + - vue + + '@vueuse/core@14.4.0(vue@3.5.44(typescript@5.3.3))': + dependencies: + '@types/web-bluetooth': 0.0.21 + '@vueuse/metadata': 14.4.0 + '@vueuse/shared': 14.4.0(vue@3.5.44(typescript@5.3.3)) + vue: 3.5.44(typescript@5.3.3) + + '@vueuse/metadata@10.11.1': {} + + '@vueuse/metadata@14.4.0': {} + + '@vueuse/shared@10.11.1(vue@3.5.44(typescript@5.3.3))': + dependencies: + vue-demi: 0.14.10(vue@3.5.44(typescript@5.3.3)) + transitivePeerDependencies: + - '@vue/composition-api' + - vue + + '@vueuse/shared@14.4.0(vue@3.5.44(typescript@5.3.3))': + dependencies: + vue: 3.5.44(typescript@5.3.3) + + '@wangeditor-next/basic-modules@3.0.3(@wangeditor-next/core@1.9.5(@uppy/core@5.0.0)(@uppy/xhr-upload@5.2.0(@uppy/core@5.0.0))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.16)(slate@0.124.1)(snabbdom@3.6.4))(dom7@4.0.6)(lodash.throttle@4.1.1)(nanoid@5.1.16)(slate@0.124.1)(snabbdom@3.6.4)': + dependencies: + '@wangeditor-next/core': 1.9.5(@uppy/core@5.0.0)(@uppy/xhr-upload@5.2.0(@uppy/core@5.0.0))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.16)(slate@0.124.1)(snabbdom@3.6.4) + dom7: 4.0.6 + is-url: 1.2.4 + lodash.throttle: 4.1.1 + nanoid: 5.1.16 + slate: 0.124.1 + snabbdom: 3.6.4 + + '@wangeditor-next/code-highlight@3.0.2(@wangeditor-next/core@1.9.5(@uppy/core@5.0.0)(@uppy/xhr-upload@5.2.0(@uppy/core@5.0.0))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.16)(slate@0.124.1)(snabbdom@3.6.4))(dom7@4.0.6)(slate@0.124.1)(snabbdom@3.6.4)': + dependencies: + '@wangeditor-next/core': 1.9.5(@uppy/core@5.0.0)(@uppy/xhr-upload@5.2.0(@uppy/core@5.0.0))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.16)(slate@0.124.1)(snabbdom@3.6.4) + dom7: 4.0.6 + prismjs: 1.30.0 + slate: 0.124.1 + snabbdom: 3.6.4 + + '@wangeditor-next/core@1.9.5(@uppy/core@5.0.0)(@uppy/xhr-upload@5.2.0(@uppy/core@5.0.0))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.16)(slate@0.124.1)(snabbdom@3.6.4)': + dependencies: + '@types/event-emitter': 0.3.5 + '@uppy/core': 5.0.0 + '@uppy/xhr-upload': 5.2.0(@uppy/core@5.0.0) + dom7: 4.0.6 + event-emitter: 0.3.5 + html-void-elements: 3.0.0 + i18next: 23.16.8 + is-hotkey: 0.2.0 + lodash.camelcase: 4.3.0 + lodash.clonedeep: 4.5.0 + lodash.debounce: 4.0.8 + lodash.foreach: 4.5.0 + lodash.throttle: 4.1.1 + lodash.toarray: 4.4.0 + nanoid: 5.1.16 + scroll-into-view-if-needed: 3.1.0 + slate: 0.124.1 + slate-history: 0.115.0(slate@0.124.1) + snabbdom: 3.6.4 + + '@wangeditor-next/editor-for-vue@5.1.14(@wangeditor-next/editor@5.7.16)(vue@3.5.44(typescript@5.3.3))': + dependencies: + '@wangeditor-next/editor': 5.7.16 + vue: 3.5.44(typescript@5.3.3) + + '@wangeditor-next/editor@5.7.16': + dependencies: + '@uppy/core': 5.0.0 + '@uppy/xhr-upload': 5.2.0(@uppy/core@5.0.0) + '@wangeditor-next/basic-modules': 3.0.3(@wangeditor-next/core@1.9.5(@uppy/core@5.0.0)(@uppy/xhr-upload@5.2.0(@uppy/core@5.0.0))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.16)(slate@0.124.1)(snabbdom@3.6.4))(dom7@4.0.6)(lodash.throttle@4.1.1)(nanoid@5.1.16)(slate@0.124.1)(snabbdom@3.6.4) + '@wangeditor-next/code-highlight': 3.0.2(@wangeditor-next/core@1.9.5(@uppy/core@5.0.0)(@uppy/xhr-upload@5.2.0(@uppy/core@5.0.0))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.16)(slate@0.124.1)(snabbdom@3.6.4))(dom7@4.0.6)(slate@0.124.1)(snabbdom@3.6.4) + '@wangeditor-next/core': 1.9.5(@uppy/core@5.0.0)(@uppy/xhr-upload@5.2.0(@uppy/core@5.0.0))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.16)(slate@0.124.1)(snabbdom@3.6.4) + '@wangeditor-next/list-module': 3.0.3(@wangeditor-next/core@1.9.5(@uppy/core@5.0.0)(@uppy/xhr-upload@5.2.0(@uppy/core@5.0.0))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.16)(slate@0.124.1)(snabbdom@3.6.4))(dom7@4.0.6)(slate@0.124.1)(snabbdom@3.6.4) + '@wangeditor-next/table-module': 3.0.7(@wangeditor-next/core@1.9.5(@uppy/core@5.0.0)(@uppy/xhr-upload@5.2.0(@uppy/core@5.0.0))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.16)(slate@0.124.1)(snabbdom@3.6.4))(dom7@4.0.6)(lodash.debounce@4.0.8)(lodash.throttle@4.1.1)(nanoid@5.1.16)(slate@0.124.1)(snabbdom@3.6.4) + '@wangeditor-next/upload-image-module': 3.0.3(@uppy/core@5.0.0)(@uppy/xhr-upload@5.2.0(@uppy/core@5.0.0))(@wangeditor-next/basic-modules@3.0.3(@wangeditor-next/core@1.9.5(@uppy/core@5.0.0)(@uppy/xhr-upload@5.2.0(@uppy/core@5.0.0))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.16)(slate@0.124.1)(snabbdom@3.6.4))(dom7@4.0.6)(lodash.throttle@4.1.1)(nanoid@5.1.16)(slate@0.124.1)(snabbdom@3.6.4))(@wangeditor-next/core@1.9.5(@uppy/core@5.0.0)(@uppy/xhr-upload@5.2.0(@uppy/core@5.0.0))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.16)(slate@0.124.1)(snabbdom@3.6.4))(dom7@4.0.6)(lodash.foreach@4.5.0)(slate@0.124.1)(snabbdom@3.6.4) + '@wangeditor-next/video-module': 3.0.2(@uppy/core@5.0.0)(@uppy/xhr-upload@5.2.0(@uppy/core@5.0.0))(@wangeditor-next/core@1.9.5(@uppy/core@5.0.0)(@uppy/xhr-upload@5.2.0(@uppy/core@5.0.0))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.16)(slate@0.124.1)(snabbdom@3.6.4))(dom7@4.0.6)(nanoid@5.1.16)(slate@0.124.1)(snabbdom@3.6.4) + dom7: 4.0.6 + is-hotkey: 0.2.0 + lodash.camelcase: 4.3.0 + lodash.clonedeep: 4.5.0 + lodash.debounce: 4.0.8 + lodash.foreach: 4.5.0 + lodash.throttle: 4.1.1 + lodash.toarray: 4.4.0 + nanoid: 5.1.16 + slate: 0.124.1 + snabbdom: 3.6.4 + transitivePeerDependencies: + - preact-render-to-string + + '@wangeditor-next/list-module@3.0.3(@wangeditor-next/core@1.9.5(@uppy/core@5.0.0)(@uppy/xhr-upload@5.2.0(@uppy/core@5.0.0))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.16)(slate@0.124.1)(snabbdom@3.6.4))(dom7@4.0.6)(slate@0.124.1)(snabbdom@3.6.4)': + dependencies: + '@wangeditor-next/core': 1.9.5(@uppy/core@5.0.0)(@uppy/xhr-upload@5.2.0(@uppy/core@5.0.0))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.16)(slate@0.124.1)(snabbdom@3.6.4) + dom7: 4.0.6 + slate: 0.124.1 + snabbdom: 3.6.4 + + '@wangeditor-next/plugin-mention@1.0.26(@wangeditor-next/editor@5.7.16)(snabbdom@3.6.4)': + dependencies: + '@wangeditor-next/editor': 5.7.16 + snabbdom: 3.6.4 + + '@wangeditor-next/table-module@3.0.7(@wangeditor-next/core@1.9.5(@uppy/core@5.0.0)(@uppy/xhr-upload@5.2.0(@uppy/core@5.0.0))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.16)(slate@0.124.1)(snabbdom@3.6.4))(dom7@4.0.6)(lodash.debounce@4.0.8)(lodash.throttle@4.1.1)(nanoid@5.1.16)(slate@0.124.1)(snabbdom@3.6.4)': + dependencies: + '@wangeditor-next/core': 1.9.5(@uppy/core@5.0.0)(@uppy/xhr-upload@5.2.0(@uppy/core@5.0.0))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.16)(slate@0.124.1)(snabbdom@3.6.4) + dom7: 4.0.6 + lodash.debounce: 4.0.8 + lodash.throttle: 4.1.1 + nanoid: 5.1.16 + slate: 0.124.1 + snabbdom: 3.6.4 + + '@wangeditor-next/upload-image-module@3.0.3(@uppy/core@5.0.0)(@uppy/xhr-upload@5.2.0(@uppy/core@5.0.0))(@wangeditor-next/basic-modules@3.0.3(@wangeditor-next/core@1.9.5(@uppy/core@5.0.0)(@uppy/xhr-upload@5.2.0(@uppy/core@5.0.0))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.16)(slate@0.124.1)(snabbdom@3.6.4))(dom7@4.0.6)(lodash.throttle@4.1.1)(nanoid@5.1.16)(slate@0.124.1)(snabbdom@3.6.4))(@wangeditor-next/core@1.9.5(@uppy/core@5.0.0)(@uppy/xhr-upload@5.2.0(@uppy/core@5.0.0))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.16)(slate@0.124.1)(snabbdom@3.6.4))(dom7@4.0.6)(lodash.foreach@4.5.0)(slate@0.124.1)(snabbdom@3.6.4)': + dependencies: + '@uppy/core': 5.0.0 + '@uppy/xhr-upload': 5.2.0(@uppy/core@5.0.0) + '@wangeditor-next/basic-modules': 3.0.3(@wangeditor-next/core@1.9.5(@uppy/core@5.0.0)(@uppy/xhr-upload@5.2.0(@uppy/core@5.0.0))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.16)(slate@0.124.1)(snabbdom@3.6.4))(dom7@4.0.6)(lodash.throttle@4.1.1)(nanoid@5.1.16)(slate@0.124.1)(snabbdom@3.6.4) + '@wangeditor-next/core': 1.9.5(@uppy/core@5.0.0)(@uppy/xhr-upload@5.2.0(@uppy/core@5.0.0))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.16)(slate@0.124.1)(snabbdom@3.6.4) + dom7: 4.0.6 + lodash.foreach: 4.5.0 + slate: 0.124.1 + snabbdom: 3.6.4 + + '@wangeditor-next/video-module@3.0.2(@uppy/core@5.0.0)(@uppy/xhr-upload@5.2.0(@uppy/core@5.0.0))(@wangeditor-next/core@1.9.5(@uppy/core@5.0.0)(@uppy/xhr-upload@5.2.0(@uppy/core@5.0.0))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.16)(slate@0.124.1)(snabbdom@3.6.4))(dom7@4.0.6)(nanoid@5.1.16)(slate@0.124.1)(snabbdom@3.6.4)': + dependencies: + '@uppy/core': 5.0.0 + '@uppy/xhr-upload': 5.2.0(@uppy/core@5.0.0) + '@wangeditor-next/core': 1.9.5(@uppy/core@5.0.0)(@uppy/xhr-upload@5.2.0(@uppy/core@5.0.0))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.16)(slate@0.124.1)(snabbdom@3.6.4) + dom7: 4.0.6 + nanoid: 5.1.16 + slate: 0.124.1 + snabbdom: 3.6.4 + + '@xmldom/xmldom@0.8.15': {} + + '@zxcvbn-ts/core@3.0.4': + dependencies: + fastest-levenshtein: 1.0.16 + + JSONStream@1.3.5: + dependencies: + jsonparse: 1.3.1 + through: 2.3.8 + + abbrev@2.0.0: {} + + abbrev@5.0.0: {} + + ace-builds@1.39.1: {} + + acorn-jsx@5.3.2(acorn@8.19.0): + dependencies: + acorn: 8.19.0 + + acorn@8.14.0: {} + + acorn@8.19.0: {} + + aes-decrypter@3.1.3: + dependencies: + '@babel/runtime': 7.29.10 + '@videojs/vhs-utils': 3.0.5 + global: 4.4.0 + pkcs7: 1.0.4 + + agent-base@6.0.2(supports-color@7.2.0): + dependencies: + debug: 4.4.3(supports-color@7.2.0) + transitivePeerDependencies: + - supports-color + + agent-base@7.1.0(supports-color@7.2.0): + dependencies: + debug: 4.4.3(supports-color@7.2.0) + transitivePeerDependencies: + - supports-color + + agent-base@7.1.2(supports-color@7.2.0): + dependencies: + debug: 4.4.3(supports-color@7.2.0) + transitivePeerDependencies: + - supports-color + + ajv@6.15.0: + dependencies: + fast-deep-equal: 3.1.3 + fast-json-stable-stringify: 2.1.0 + json-schema-traverse: 0.4.1 + uri-js: 4.4.1 + + ajv@8.20.0: + dependencies: + fast-deep-equal: 3.1.3 + fast-uri: 3.1.9 + json-schema-traverse: 1.0.0 + require-from-string: 2.0.2 + + animate.css@4.1.1: {} + + ansi-escapes@7.0.0: + dependencies: + environment: 1.1.0 + + ansi-regex@2.1.1: {} + + ansi-regex@5.0.1: {} + + ansi-regex@6.4.0: {} + + ansi-styles@2.2.1: {} + + ansi-styles@4.3.0: + dependencies: + color-convert: 2.0.1 + + ansi-styles@5.2.0: {} + + ansi-styles@6.2.1: {} + + anymatch@3.1.3: + dependencies: + normalize-path: 3.0.0 + picomatch: 2.3.2 + + anynum@1.0.1: {} + + argparse@1.0.10: + dependencies: + sprintf-js: 1.0.3 + + argparse@2.0.1: {} + + array-ify@1.0.0: {} + + array-move@4.0.0: {} + + array-union@2.1.0: {} + + assertion-error@2.0.1: {} + + ast-v8-to-istanbul@1.0.7: + dependencies: + '@jridgewell/trace-mapping': 0.3.31 + estree-walker: 3.0.3 + js-tokens: 10.0.0 + + astral-regex@2.0.0: {} + + async-validator@4.2.5: {} + + asynckit@0.4.0: {} + + autolinker@3.16.2: + dependencies: + tslib: 2.8.1 + + autoprefixer@10.6.1(postcss@8.5.31): + dependencies: + browserslist: 4.29.4 + caniuse-lite: 1.0.30001819 + fraction.js: 5.3.4 + picocolors: 1.1.1 + postcss: 8.5.31 + postcss-value-parser: 4.2.0 + + axios@0.34.0(debug@4.3.7(supports-color@7.2.0)): + dependencies: + follow-redirects: 1.16.2(debug@4.3.7(supports-color@7.2.0)) + form-data: 4.0.6 + proxy-from-env: 1.1.0 + transitivePeerDependencies: + - debug + + axios@1.20.0(debug@4.3.7(supports-color@7.2.0))(supports-color@7.2.0): + dependencies: + follow-redirects: 1.16.2(debug@4.3.7(supports-color@7.2.0)) + form-data: 4.0.6 + https-proxy-agent: 5.0.1(supports-color@7.2.0) + proxy-from-env: 2.1.0 + transitivePeerDependencies: + - debug + - supports-color + + balanced-match@1.0.2: {} + + balanced-match@2.0.0: {} + + balanced-match@4.0.4: {} + + baseline-browser-mapping@2.11.33: {} + + benz-amr-recorder@1.1.5: + dependencies: + benz-recorderjs: 1.0.5 + + benz-recorderjs@1.0.5: {} + + binary-extensions@2.3.0: {} + + boolbase@1.0.0: {} + + bpmn-js-properties-panel@5.23.0(@bpmn-io/properties-panel@3.25.0)(bpmn-js@17.11.1)(camunda-bpmn-js-behaviors@1.7.2(bpmn-js@17.11.1)(camunda-bpmn-moddle@7.0.2)(zeebe-bpmn-moddle@1.7.0))(diagram-js@12.8.1): + dependencies: + '@bpmn-io/extract-process-variables': 0.8.0 + '@bpmn-io/properties-panel': 3.25.0 + array-move: 4.0.0 + bpmn-js: 17.11.1 + camunda-bpmn-js-behaviors: 1.7.2(bpmn-js@17.11.1)(camunda-bpmn-moddle@7.0.2)(zeebe-bpmn-moddle@1.7.0) + diagram-js: 12.8.1 + ids: 1.0.5 + min-dash: 4.2.2 + min-dom: 4.2.1 + + bpmn-js-token-simulation@0.36.2: + dependencies: + inherits-browser: 0.1.0 + min-dash: 4.2.2 + min-dom: 4.2.1 + randomcolor: 0.6.2 + + bpmn-js@17.11.1: + dependencies: + bpmn-moddle: 8.1.0 + diagram-js: 14.11.3 + diagram-js-direct-editing: 3.2.0(diagram-js@14.11.3) + ids: 1.0.5 + inherits-browser: 0.1.0 + min-dash: 4.2.2 + min-dom: 4.2.1 + tiny-svg: 3.1.3 + + bpmn-moddle@8.1.0: + dependencies: + min-dash: 4.2.2 + moddle: 6.2.3 + moddle-xml: 10.1.0 + + brace-expansion@1.1.21: + dependencies: + balanced-match: 1.0.2 + concat-map: 0.0.1 + + brace-expansion@2.1.7: + dependencies: + balanced-match: 1.0.2 + + brace-expansion@5.0.12: + dependencies: + balanced-match: 4.0.4 + + braces@3.0.3: + dependencies: + fill-range: 7.1.1 + + browserslist@4.29.4: + dependencies: + baseline-browser-mapping: 2.11.33 + caniuse-lite: 1.0.30001819 + electron-to-chromium: 1.5.464 + node-releases: 2.0.60 + update-browserslist-db: 1.3.4(browserslist@4.29.4) + + buffer-from@1.1.2: {} + + cac@7.1.0: {} + + cacheable@2.5.0: + dependencies: + '@cacheable/memory': 2.2.0 + '@cacheable/utils': 2.5.0 + hookified: 1.15.1 + keyv: 5.6.0 + qified: 0.10.1 + + call-bind-apply-helpers@1.0.2: + dependencies: + es-errors: 1.3.0 + function-bind: 1.1.2 + + call-bound@1.0.4: + dependencies: + call-bind-apply-helpers: 1.0.2 + get-intrinsic: 1.3.0 + + callsites@3.1.0: {} + + camelcase@5.3.1: {} + + camunda-bpmn-js-behaviors@1.7.2(bpmn-js@17.11.1)(camunda-bpmn-moddle@7.0.2)(zeebe-bpmn-moddle@1.7.0): + dependencies: + bpmn-js: 17.11.1 + camunda-bpmn-moddle: 7.0.2 + ids: 1.0.5 + min-dash: 4.2.2 + zeebe-bpmn-moddle: 1.7.0 + + camunda-bpmn-moddle@7.0.2: {} + + caniuse-lite@1.0.30001819: {} + + chai@6.3.0: {} + + chalk@1.1.3: + dependencies: + ansi-styles: 2.2.1 + escape-string-regexp: 1.0.5 + has-ansi: 2.0.0 + strip-ansi: 3.0.1 + supports-color: 2.0.0 + + chalk@4.1.2: + dependencies: + ansi-styles: 4.3.0 + supports-color: 7.2.0 + + chalk@5.3.0: {} + + cheerio-select@2.1.0: + dependencies: + boolbase: 1.0.0 + css-select: 5.1.0 + css-what: 6.1.0 + domelementtype: 2.3.0 + domhandler: 5.0.3 + domutils: 3.1.0 + + cheerio@1.0.0-rc.12: + dependencies: + cheerio-select: 2.1.0 + dom-serializer: 2.0.0 + domhandler: 5.0.3 + domutils: 3.1.0 + htmlparser2: 8.0.2 + parse5: 7.2.1 + parse5-htmlparser2-tree-adapter: 7.1.0 + + chokidar@3.6.0: + dependencies: + anymatch: 3.1.3 + braces: 3.0.3 + glob-parent: 5.1.2 + is-binary-path: 2.1.0 + is-glob: 4.0.3 + normalize-path: 3.0.0 + readdirp: 3.6.0 + optionalDependencies: + fsevents: 2.3.3 + + chokidar@5.0.0: + dependencies: + readdirp: 5.1.1 + + classnames@2.5.1: {} + + cli-cursor@5.0.0: + dependencies: + restore-cursor: 5.1.0 + + cli-truncate@4.0.0: + dependencies: + slice-ansi: 5.0.0 + string-width: 7.2.0 + + cliui@6.0.0: + dependencies: + string-width: 4.2.3 + strip-ansi: 6.0.1 + wrap-ansi: 6.2.0 + + cliui@8.0.1: + dependencies: + string-width: 4.2.3 + strip-ansi: 6.0.1 + wrap-ansi: 7.0.0 + + clsx@2.1.1: {} + + codemirror@6.65.7: {} + + color-convert@2.0.1: + dependencies: + color-name: 1.1.4 + + color-name@1.1.4: {} + + colord@2.10.0: {} + + colorette@2.0.20: {} + + combined-stream@1.0.8: + dependencies: + delayed-stream: 1.0.0 + + commander@10.0.1: {} + + commander@11.1.0: {} + + commander@12.1.0: {} + + commander@14.0.3: {} + + commander@2.20.3: {} + + commander@7.2.0: {} + + commander@8.3.0: {} + + common-tags@1.8.2: {} + + compare-func@2.0.0: + dependencies: + array-ify: 1.0.0 + dot-prop: 5.3.0 + + component-event@0.2.1: {} + + compute-scroll-into-view@3.1.1: {} + + computeds@0.0.1: {} + + concat-map@0.0.1: {} + + confbox@0.1.8: {} + + config-chain@1.1.13: + dependencies: + ini: 1.3.8 + proto-list: 1.2.4 + + consola@3.2.3: {} + + consola@3.4.2: {} + + conventional-changelog-angular@7.0.0: + dependencies: + compare-func: 2.0.0 + + conventional-changelog-conventionalcommits@7.0.2: + dependencies: + compare-func: 2.0.0 + + conventional-commits-parser@5.0.0: + dependencies: + JSONStream: 1.3.5 + is-text-path: 2.0.0 + meow: 12.1.1 + split2: 4.2.0 + + convert-source-map@2.0.0: {} + + core-js-pure@3.51.0: {} + + cosmiconfig-typescript-loader@5.1.0(@types/node@20.19.43)(cosmiconfig@9.0.0(typescript@5.3.3))(typescript@5.3.3): + dependencies: + '@types/node': 20.19.43 + cosmiconfig: 9.0.0(typescript@5.3.3) + jiti: 1.21.6 + typescript: 5.3.3 + + cosmiconfig@9.0.0(typescript@5.3.3): + dependencies: + env-paths: 2.2.1 + import-fresh: 3.3.0 + js-yaml: 4.3.2 + parse-json: 5.2.0 + optionalDependencies: + typescript: 5.3.3 + + crelt@1.0.7: {} + + cropperjs@1.7.0: {} + + cross-fetch@3.1.8: + dependencies: + node-fetch: 2.7.0 + transitivePeerDependencies: + - encoding + + cross-spawn@7.0.6: + dependencies: + path-key: 3.1.1 + shebang-command: 2.0.0 + which: 2.0.2 + + crossws@0.4.16(srvx@1.0.7): + optionalDependencies: + srvx: 1.0.7 + + crypto-js@4.2.0: {} + + css-functions-list@3.2.3: {} + + css-select@5.1.0: + dependencies: + boolbase: 1.0.0 + css-what: 6.1.0 + domhandler: 5.0.3 + domutils: 3.1.0 + nth-check: 2.1.1 + + css-select@6.0.0: + dependencies: + boolbase: 1.0.0 + css-what: 7.0.0 + domhandler: 5.0.3 + domutils: 3.2.2 + nth-check: 2.1.1 + + css-tree@2.2.1: + dependencies: + mdn-data: 2.0.28 + source-map-js: 1.2.2 + + css-tree@3.2.1: + dependencies: + mdn-data: 2.27.1 + source-map-js: 1.2.2 + + css-what@6.1.0: {} + + css-what@7.0.0: {} + + cssesc@3.0.0: {} + + csso@5.0.5: + dependencies: + css-tree: 2.2.1 + + cssstyle@4.2.1: + dependencies: + '@asamuzakjp/css-color': 2.8.3 + rrweb-cssom: 0.8.0 + + csstype@3.2.3: {} + + d3-array@3.2.4: + dependencies: + internmap: 2.0.3 + + d3-axis@3.0.0: {} + + d3-brush@3.0.0: + dependencies: + d3-dispatch: 3.0.1 + d3-drag: 3.0.0 + d3-interpolate: 3.0.1 + d3-selection: 3.0.0 + d3-transition: 3.0.1(d3-selection@3.0.0) + + d3-chord@3.0.1: + dependencies: + d3-path: 3.1.0 + + d3-color@3.1.0: {} + + d3-contour@4.0.2: + dependencies: + d3-array: 3.2.4 + + d3-delaunay@6.0.4: + dependencies: + delaunator: 5.0.1 + + d3-dispatch@3.0.1: {} + + d3-drag@3.0.0: + dependencies: + d3-dispatch: 3.0.1 + d3-selection: 3.0.0 + + d3-dsv@3.0.1: + dependencies: + commander: 7.2.0 + iconv-lite: 0.6.3 + rw: 1.3.3 + + d3-ease@3.0.1: {} + + d3-fetch@3.0.1: + dependencies: + d3-dsv: 3.0.1 + + d3-flextree@2.1.2: + dependencies: + d3-hierarchy: 1.1.9 + + d3-force@3.0.0: + dependencies: + d3-dispatch: 3.0.1 + d3-quadtree: 3.0.1 + d3-timer: 3.0.1 + + d3-format@3.1.0: {} + + d3-geo@3.1.1: + dependencies: + d3-array: 3.2.4 + + d3-hierarchy@1.1.9: {} + + d3-hierarchy@3.1.2: {} + + d3-interpolate@3.0.1: + dependencies: + d3-color: 3.1.0 + + d3-path@3.1.0: {} + + d3-polygon@3.0.1: {} + + d3-quadtree@3.0.1: {} + + d3-random@3.0.1: {} + + d3-scale-chromatic@3.1.0: + dependencies: + d3-color: 3.1.0 + d3-interpolate: 3.0.1 + + d3-scale@4.0.2: + dependencies: + d3-array: 3.2.4 + d3-format: 3.1.0 + d3-interpolate: 3.0.1 + d3-time: 3.1.0 + d3-time-format: 4.1.0 + + d3-selection@3.0.0: {} + + d3-shape@3.2.0: + dependencies: + d3-path: 3.1.0 + + d3-time-format@4.1.0: + dependencies: + d3-time: 3.1.0 + + d3-time@3.1.0: + dependencies: + d3-array: 3.2.4 + + d3-timer@3.0.1: {} + + d3-transition@3.0.1(d3-selection@3.0.0): + dependencies: + d3-color: 3.1.0 + d3-dispatch: 3.0.1 + d3-ease: 3.0.1 + d3-interpolate: 3.0.1 + d3-selection: 3.0.0 + d3-timer: 3.0.1 + + d3-zoom@3.0.0: + dependencies: + d3-dispatch: 3.0.1 + d3-drag: 3.0.0 + d3-interpolate: 3.0.1 + d3-selection: 3.0.0 + d3-transition: 3.0.1(d3-selection@3.0.0) + + d3@7.9.0: + dependencies: + d3-array: 3.2.4 + d3-axis: 3.0.0 + d3-brush: 3.0.0 + d3-chord: 3.0.1 + d3-color: 3.1.0 + d3-contour: 4.0.2 + d3-delaunay: 6.0.4 + d3-dispatch: 3.0.1 + d3-drag: 3.0.0 + d3-dsv: 3.0.1 + d3-ease: 3.0.1 + d3-fetch: 3.0.1 + d3-force: 3.0.0 + d3-format: 3.1.0 + d3-geo: 3.1.1 + d3-hierarchy: 3.1.2 + d3-interpolate: 3.0.1 + d3-path: 3.1.0 + d3-polygon: 3.0.1 + d3-quadtree: 3.0.1 + d3-random: 3.0.1 + d3-scale: 4.0.2 + d3-scale-chromatic: 3.1.0 + d3-selection: 3.0.0 + d3-shape: 3.2.0 + d3-time: 3.1.0 + d3-time-format: 4.1.0 + d3-timer: 3.0.1 + d3-transition: 3.0.1(d3-selection@3.0.0) + d3-zoom: 3.0.0 + + d@1.0.2: + dependencies: + es5-ext: 0.10.64 + type: 2.7.3 + + dargs@8.1.0: {} + + data-urls@5.0.0: + dependencies: + whatwg-mimetype: 4.0.0 + whatwg-url: 14.1.1 + + dayjs@1.11.23: {} + + de-indent@1.0.2: {} + + debug@4.3.7(supports-color@7.2.0): + dependencies: + ms: 2.1.3 + optionalDependencies: + supports-color: 7.2.0 + + debug@4.4.3(supports-color@7.2.0): + dependencies: + ms: 2.1.3 + optionalDependencies: + supports-color: 7.2.0 + + decamelize@1.2.0: {} + + decimal.js@10.6.0: {} + + deep-is@0.1.4: {} + + default-passive-events@2.0.0: {} + + defu@6.1.7: {} + + delaunator@5.0.1: + dependencies: + robust-predicates: 3.0.2 + + delayed-stream@1.0.0: {} + + destr@2.0.5: {} + + detect-libc@1.0.3: + optional: true + + devframe@1.2.6(cac@7.1.0)(srvx@1.0.7): + dependencies: + crossws: 0.4.16(srvx@1.0.7) + h3: 2.0.8(crossws@0.4.16(srvx@1.0.7)) + nostics: 1.3.0 + pathe: 2.0.3 + optionalDependencies: + cac: 7.1.0 + transitivePeerDependencies: + - ocache + - srvx + + diagram-js-direct-editing@3.2.0(diagram-js@14.11.3): + dependencies: + diagram-js: 14.11.3 + min-dash: 4.2.2 + min-dom: 4.2.1 + + diagram-js@12.8.1: + dependencies: + '@bpmn-io/diagram-js-ui': 0.2.3 + clsx: 2.1.1 + didi: 9.0.2 + hammerjs: 2.0.8 + inherits-browser: 0.1.0 + min-dash: 4.2.2 + min-dom: 4.2.1 + object-refs: 0.3.0 + path-intersection: 2.2.1 + tiny-svg: 3.1.3 + + diagram-js@14.11.3: + dependencies: + '@bpmn-io/diagram-js-ui': 0.2.3 + clsx: 2.1.1 + didi: 10.2.2 + inherits-browser: 0.1.0 + min-dash: 4.2.2 + min-dom: 4.2.1 + object-refs: 0.4.0 + path-intersection: 3.1.0 + tiny-svg: 3.1.3 + + didi@10.2.2: {} + + didi@9.0.2: {} + + dijkstrajs@1.0.3: {} + + dir-glob@3.0.1: + dependencies: + path-type: 4.0.0 + + dlv@1.1.3: {} + + doctrine@3.0.0: + dependencies: + esutils: 2.0.3 + + dom-serializer@2.0.0: + dependencies: + domelementtype: 2.3.0 + domhandler: 5.0.3 + entities: 4.5.0 + + dom-walk@0.1.2: {} + + dom7@4.0.6: + dependencies: + ssr-window: 4.0.2 + + domelementtype@2.3.0: {} + + domhandler@5.0.3: + dependencies: + domelementtype: 2.3.0 + + domify@1.4.2: {} + + domify@3.0.0: {} + + dompurify@3.4.17: + optionalDependencies: + '@types/trusted-types': 2.0.7 + + domutils@3.1.0: + dependencies: + dom-serializer: 2.0.0 + domelementtype: 2.3.0 + domhandler: 5.0.3 + + domutils@3.2.2: + dependencies: + dom-serializer: 2.0.0 + domelementtype: 2.3.0 + domhandler: 5.0.3 + + dot-prop@5.3.0: + dependencies: + is-obj: 2.0.0 + + driver.js@1.10.2: {} + + dunder-proto@1.0.1: + dependencies: + call-bind-apply-helpers: 1.0.2 + es-errors: 1.3.0 + gopd: 1.2.0 + + eastasianwidth@0.2.0: {} + + echarts-wordcloud@2.1.0(echarts@5.5.1): + dependencies: + echarts: 5.5.1 + + echarts@5.5.1: + dependencies: + tslib: 2.3.0 + zrender: 5.6.0 + + editorconfig@1.0.7: + dependencies: + '@one-ini/wasm': 0.1.1 + commander: 10.0.1 + minimatch: 9.0.9 + semver: 7.6.3 + + editorconfig@3.0.2: + dependencies: + '@one-ini/wasm': 0.2.1 + commander: 14.0.3 + minimatch: 10.2.6 + semver: 7.8.5 + + ejs@6.0.1: {} + + electron-to-chromium@1.5.464: {} + + element-plus@2.14.5(vue@3.5.44(typescript@5.3.3)): + dependencies: + '@ctrl/tinycolor': 4.2.1 + '@element-plus/icons-vue': 2.3.2(vue@3.5.44(typescript@5.3.3)) + '@floating-ui/dom': 1.8.0 + '@popperjs/core': '@sxzz/popperjs-es@2.11.8' + '@types/lodash': 4.17.25 + '@types/lodash-es': 4.17.12 + '@vueuse/core': 14.4.0(vue@3.5.44(typescript@5.3.3)) + async-validator: 4.2.5 + dayjs: 1.11.23 + lodash: 4.18.1 + lodash-es: 4.18.1 + lodash-unified: 1.0.3(@types/lodash-es@4.17.12)(lodash-es@4.18.1)(lodash@4.18.1) + memoize-one: 6.0.0 + normalize-wheel-es: 1.2.0 + vue: 3.5.44(typescript@5.3.3) + vue-component-type-helpers: 3.3.11 + + emoji-regex@10.4.0: {} + + emoji-regex@8.0.0: {} + + emoji-regex@9.2.2: {} + + entities@4.5.0: {} + + entities@7.0.1: {} + + env-paths@2.2.1: {} + + environment@1.1.0: {} + + error-ex@1.3.2: + dependencies: + is-arrayish: 0.2.1 + + es-define-property@1.0.1: {} + + es-errors@1.3.0: {} + + es-module-lexer@1.5.4: {} + + es-module-lexer@2.3.2: {} + + es-object-atoms@1.1.2: + dependencies: + es-errors: 1.3.0 + + es-set-tostringtag@2.1.0: + dependencies: + es-errors: 1.3.0 + get-intrinsic: 1.3.0 + has-tostringtag: 1.0.2 + hasown: 2.0.4 + + es5-ext@0.10.64: + dependencies: + es6-iterator: 2.0.3 + es6-symbol: 3.1.4 + esniff: 2.0.1 + next-tick: 1.1.0 + + es6-iterator@2.0.3: + dependencies: + d: 1.0.2 + es5-ext: 0.10.64 + es6-symbol: 3.1.4 + + es6-symbol@3.1.4: + dependencies: + d: 1.0.2 + ext: 1.7.0 + + esbuild@0.25.4: + optionalDependencies: + '@esbuild/aix-ppc64': 0.25.4 + '@esbuild/android-arm': 0.25.4 + '@esbuild/android-arm64': 0.25.4 + '@esbuild/android-x64': 0.25.4 + '@esbuild/darwin-arm64': 0.25.4 + '@esbuild/darwin-x64': 0.25.4 + '@esbuild/freebsd-arm64': 0.25.4 + '@esbuild/freebsd-x64': 0.25.4 + '@esbuild/linux-arm': 0.25.4 + '@esbuild/linux-arm64': 0.25.4 + '@esbuild/linux-ia32': 0.25.4 + '@esbuild/linux-loong64': 0.25.4 + '@esbuild/linux-mips64el': 0.25.4 + '@esbuild/linux-ppc64': 0.25.4 + '@esbuild/linux-riscv64': 0.25.4 + '@esbuild/linux-s390x': 0.25.4 + '@esbuild/linux-x64': 0.25.4 + '@esbuild/netbsd-arm64': 0.25.4 + '@esbuild/netbsd-x64': 0.25.4 + '@esbuild/openbsd-arm64': 0.25.4 + '@esbuild/openbsd-x64': 0.25.4 + '@esbuild/sunos-x64': 0.25.4 + '@esbuild/win32-arm64': 0.25.4 + '@esbuild/win32-ia32': 0.25.4 + '@esbuild/win32-x64': 0.25.4 + + esbuild@0.28.2: + optionalDependencies: + '@esbuild/aix-ppc64': 0.28.2 + '@esbuild/android-arm': 0.28.2 + '@esbuild/android-arm64': 0.28.2 + '@esbuild/android-x64': 0.28.2 + '@esbuild/darwin-arm64': 0.28.2 + '@esbuild/darwin-x64': 0.28.2 + '@esbuild/freebsd-arm64': 0.28.2 + '@esbuild/freebsd-x64': 0.28.2 + '@esbuild/linux-arm': 0.28.2 + '@esbuild/linux-arm64': 0.28.2 + '@esbuild/linux-ia32': 0.28.2 + '@esbuild/linux-loong64': 0.28.2 + '@esbuild/linux-mips64el': 0.28.2 + '@esbuild/linux-ppc64': 0.28.2 + '@esbuild/linux-riscv64': 0.28.2 + '@esbuild/linux-s390x': 0.28.2 + '@esbuild/linux-x64': 0.28.2 + '@esbuild/netbsd-arm64': 0.28.2 + '@esbuild/netbsd-x64': 0.28.2 + '@esbuild/openbsd-arm64': 0.28.2 + '@esbuild/openbsd-x64': 0.28.2 + '@esbuild/openharmony-arm64': 0.28.2 + '@esbuild/sunos-x64': 0.28.2 + '@esbuild/win32-arm64': 0.28.2 + '@esbuild/win32-ia32': 0.28.2 + '@esbuild/win32-x64': 0.28.2 + + escalade@3.2.0: {} + + escape-string-regexp@1.0.5: {} + + escape-string-regexp@4.0.0: {} + + escape-string-regexp@5.0.0: {} + + eslint-config-prettier@9.1.0(eslint@8.57.1(supports-color@7.2.0)): + dependencies: + eslint: 8.57.1(supports-color@7.2.0) + + eslint-define-config@2.1.0: {} + + eslint-plugin-prettier@5.5.7(@types/eslint@8.56.12)(eslint-config-prettier@9.1.0(eslint@8.57.1(supports-color@7.2.0)))(eslint@8.57.1(supports-color@7.2.0))(prettier@3.9.10): + dependencies: + eslint: 8.57.1(supports-color@7.2.0) + prettier: 3.9.10 + prettier-linter-helpers: 1.0.1 + synckit: 0.12.3 + optionalDependencies: + '@types/eslint': 8.56.12 + eslint-config-prettier: 9.1.0(eslint@8.57.1(supports-color@7.2.0)) + + eslint-plugin-vue@9.31.0(eslint@8.57.1(supports-color@7.2.0))(supports-color@7.2.0): + dependencies: + '@eslint-community/eslint-utils': 4.4.1(eslint@8.57.1(supports-color@7.2.0)) + eslint: 8.57.1(supports-color@7.2.0) + globals: 13.24.0 + natural-compare: 1.4.0 + nth-check: 2.1.1 + postcss-selector-parser: 6.1.5 + semver: 7.6.3 + vue-eslint-parser: 9.4.3(eslint@8.57.1(supports-color@7.2.0))(supports-color@7.2.0) + xml-name-validator: 4.0.0 + transitivePeerDependencies: + - supports-color + + eslint-scope@7.2.2: + dependencies: + esrecurse: 4.3.0 + estraverse: 5.3.0 + + eslint-visitor-keys@3.4.3: {} + + eslint-visitor-keys@4.2.0: {} + + eslint-visitor-keys@5.0.1: {} + + eslint@8.57.1(supports-color@7.2.0): + dependencies: + '@eslint-community/eslint-utils': 4.4.1(eslint@8.57.1(supports-color@7.2.0)) + '@eslint-community/regexpp': 4.12.1 + '@eslint/eslintrc': 2.1.4(supports-color@7.2.0) + '@eslint/js': 8.57.1 + '@humanwhocodes/config-array': 0.13.0(supports-color@7.2.0) + '@humanwhocodes/module-importer': 1.0.1 + '@nodelib/fs.walk': 1.2.8 + '@ungap/structured-clone': 1.2.0 + ajv: 6.15.0 + chalk: 4.1.2 + cross-spawn: 7.0.6 + debug: 4.3.7(supports-color@7.2.0) + doctrine: 3.0.0 + escape-string-regexp: 4.0.0 + eslint-scope: 7.2.2 + eslint-visitor-keys: 3.4.3 + espree: 9.6.1 + esquery: 1.6.0 + esutils: 2.0.3 + fast-deep-equal: 3.1.3 + file-entry-cache: 6.0.1 + find-up: 5.0.0 + glob-parent: 6.0.2 + globals: 13.24.0 + graphemer: 1.4.0 + ignore: 5.3.2 + imurmurhash: 0.1.4 + is-glob: 4.0.3 + is-path-inside: 3.0.3 + js-yaml: 4.3.2 + json-stable-stringify-without-jsonify: 1.0.1 + levn: 0.4.1 + lodash.merge: 4.6.2 + minimatch: 3.1.5 + natural-compare: 1.4.0 + optionator: 0.9.4 + strip-ansi: 6.0.1 + text-table: 0.2.0 + transitivePeerDependencies: + - supports-color + + esniff@2.0.1: + dependencies: + d: 1.0.2 + es5-ext: 0.10.64 + event-emitter: 0.3.5 + type: 2.7.3 + + espree@9.6.1: + dependencies: + acorn: 8.19.0 + acorn-jsx: 5.3.2(acorn@8.19.0) + eslint-visitor-keys: 3.4.3 + + esquery@1.6.0: + dependencies: + estraverse: 5.3.0 + + esrecurse@4.3.0: + dependencies: + estraverse: 5.3.0 + + estraverse@5.3.0: {} + + estree-walker@2.0.2: {} + + estree-walker@3.0.3: + dependencies: + '@types/estree': 1.0.9 + + esutils@2.0.3: {} + + event-emitter@0.3.5: + dependencies: + d: 1.0.2 + es5-ext: 0.10.64 + + eventemitter3@5.0.1: {} + + execa@8.0.1: + dependencies: + cross-spawn: 7.0.6 + get-stream: 8.0.1 + human-signals: 5.0.0 + is-stream: 3.0.0 + merge-stream: 2.0.0 + npm-run-path: 5.3.0 + onetime: 6.0.0 + signal-exit: 4.1.0 + strip-final-newline: 3.0.0 + + expect-type@1.4.0: {} + + ext@1.7.0: + dependencies: + type: 2.7.3 + + fast-deep-equal@3.1.3: {} + + fast-diff@1.3.0: {} + + fast-glob@3.3.2: + dependencies: + '@nodelib/fs.stat': 2.0.5 + '@nodelib/fs.walk': 1.2.8 + glob-parent: 5.1.2 + merge2: 1.4.1 + micromatch: 4.0.8 + + fast-glob@3.3.3: + dependencies: + '@nodelib/fs.stat': 2.0.5 + '@nodelib/fs.walk': 1.2.8 + glob-parent: 5.1.2 + merge2: 1.4.1 + micromatch: 4.0.8 + + fast-json-stable-stringify@2.1.0: {} + + fast-levenshtein@2.0.6: {} + + fast-uri@3.1.9: {} + + fast-xml-builder@1.3.1: + dependencies: + path-expression-matcher: 1.6.2 + xml-naming: 0.3.0 + + fast-xml-parser@5.11.2: + dependencies: + '@nodable/entities': 3.1.0 + fast-xml-builder: 1.3.1 + is-unsafe: 2.0.2 + path-expression-matcher: 1.6.2 + strnum: 2.5.1 + xml-naming: 0.3.0 + + fastest-levenshtein@1.0.16: {} + + fastq@1.17.1: + dependencies: + reusify: 1.0.4 + + fdir@6.5.0(picomatch@4.0.7): + optionalDependencies: + picomatch: 4.0.7 + + feelers@1.5.1: + dependencies: + '@bpmn-io/cm-theme': 0.1.0-alpha.2 + '@bpmn-io/feel-lint': 3.2.0 + '@bpmn-io/feelin': 6.1.1 + '@bpmn-io/lezer-feel': 2.5.0 + '@codemirror/autocomplete': 6.20.4 + '@codemirror/commands': 6.11.1 + '@codemirror/language': 6.13.1 + '@codemirror/lint': 6.9.7 + '@codemirror/state': 6.7.6 + '@codemirror/view': 6.43.15 + '@lezer/common': 1.5.4 + '@lezer/highlight': 1.2.5 + '@lezer/lr': 1.4.11 + '@lezer/markdown': 1.8.1 + min-dom: 5.3.0 + + file-entry-cache@11.1.5: + dependencies: + flat-cache: 6.1.23 + + file-entry-cache@6.0.1: + dependencies: + flat-cache: 3.2.0 + + fill-range@7.1.1: + dependencies: + to-regex-range: 5.0.1 + + find-up@4.1.0: + dependencies: + locate-path: 5.0.0 + path-exists: 4.0.0 + + find-up@5.0.0: + dependencies: + locate-path: 6.0.0 + path-exists: 4.0.0 + + find-up@7.0.0: + dependencies: + locate-path: 7.2.0 + path-exists: 5.0.0 + unicorn-magic: 0.1.0 + + flat-cache@3.2.0: + dependencies: + flatted: 3.4.4 + keyv: 4.5.4 + rimraf: 3.0.2 + + flat-cache@6.1.23: + dependencies: + cacheable: 2.5.0 + flatted: 3.4.4 + hookified: 1.15.1 + + flatted@3.4.4: {} + + focus-trap@7.8.0: + dependencies: + tabbable: 6.5.1 + + follow-redirects@1.16.2(debug@4.3.7(supports-color@7.2.0)): + optionalDependencies: + debug: 4.3.7(supports-color@7.2.0) + + foreground-child@3.3.0: + dependencies: + cross-spawn: 7.0.6 + signal-exit: 4.1.0 + + form-data@4.0.6: + dependencies: + asynckit: 0.4.0 + combined-stream: 1.0.8 + es-set-tostringtag: 2.1.0 + hasown: 2.0.4 + mime-types: 2.1.35 + + fraction.js@5.3.4: {} + + fs-extra@10.1.0: + dependencies: + graceful-fs: 4.2.11 + jsonfile: 6.1.0 + universalify: 2.0.1 + + fs.realpath@1.0.0: {} + + fsevents@2.3.3: + optional: true + + function-bind@1.1.2: {} + + fzf@0.5.2: {} + + gensync@1.0.0-beta.2: {} + + get-caller-file@2.0.5: {} + + get-east-asian-width@1.3.0: {} + + get-intrinsic@1.3.0: + dependencies: + call-bind-apply-helpers: 1.0.2 + es-define-property: 1.0.1 + es-errors: 1.3.0 + es-object-atoms: 1.1.2 + function-bind: 1.1.2 + get-proto: 1.0.1 + gopd: 1.2.0 + has-symbols: 1.1.0 + hasown: 2.0.4 + math-intrinsics: 1.1.0 + + get-proto@1.0.1: + dependencies: + dunder-proto: 1.0.1 + es-object-atoms: 1.1.2 + + get-stream@8.0.1: {} + + git-raw-commits@4.0.0: + dependencies: + dargs: 8.1.0 + meow: 12.1.1 + split2: 4.2.0 + + glob-parent@5.1.2: + dependencies: + is-glob: 4.0.3 + + glob-parent@6.0.2: + dependencies: + is-glob: 4.0.3 + + glob@10.5.0: + dependencies: + foreground-child: 3.3.0 + jackspeak: 3.4.3 + minimatch: 9.0.9 + minipass: 7.1.2 + package-json-from-dist: 1.0.1 + path-scurry: 1.11.1 + + glob@13.0.6: + dependencies: + minimatch: 10.2.6 + minipass: 7.1.3 + path-scurry: 2.0.2 + + glob@7.2.0: + dependencies: + fs.realpath: 1.0.0 + inflight: 1.0.6 + inherits: 2.0.4 + minimatch: 3.1.5 + once: 1.4.0 + path-is-absolute: 1.0.1 + + global-directory@4.0.1: + dependencies: + ini: 4.1.1 + + global-modules@2.0.0: + dependencies: + global-prefix: 3.0.0 + + global-prefix@3.0.0: + dependencies: + ini: 1.3.8 + kind-of: 6.0.3 + which: 1.3.1 + + global@4.4.0: + dependencies: + min-document: 2.19.2 + process: 0.11.10 + + globals@13.24.0: + dependencies: + type-fest: 0.20.2 + + globby@11.1.0: + dependencies: + array-union: 2.1.0 + dir-glob: 3.0.1 + fast-glob: 3.3.3 + ignore: 5.3.2 + merge2: 1.4.1 + slash: 3.0.0 + + globjoin@0.1.4: {} + + gopd@1.2.0: {} + + graceful-fs@4.2.11: {} + + graphemer@1.4.0: {} + + h3@2.0.8(crossws@0.4.16(srvx@1.0.7)): + dependencies: + rou3: 1.0.0 + srvx: 1.0.7 + optionalDependencies: + crossws: 0.4.16(srvx@1.0.7) + + hammerjs@2.0.8: {} + + has-ansi@2.0.0: + dependencies: + ansi-regex: 2.1.1 + + has-flag@4.0.0: {} + + has-symbols@1.0.3: {} + + has-symbols@1.1.0: {} + + has-tostringtag@1.0.2: + dependencies: + has-symbols: 1.0.3 + + hashery@1.5.1: + dependencies: + hookified: 1.15.1 + + hasown@2.0.2: + dependencies: + function-bind: 1.1.2 + + hasown@2.0.4: + dependencies: + function-bind: 1.1.2 + + he@1.2.0: {} + + highlight.js@11.12.0: {} + + hookified@1.15.1: {} + + hookified@2.2.0: {} + + htm@3.1.1: {} + + html-encoding-sniffer@4.0.0: + dependencies: + whatwg-encoding: 3.1.1 + + html-escaper@2.0.2: {} + + html-tags@3.3.1: {} + + html-void-elements@3.0.0: {} + + htmlparser2@8.0.2: + dependencies: + domelementtype: 2.3.0 + domhandler: 5.0.3 + domutils: 3.1.0 + entities: 4.5.0 + + http-proxy-agent@7.0.2(supports-color@7.2.0): + dependencies: + agent-base: 7.1.0(supports-color@7.2.0) + debug: 4.3.7(supports-color@7.2.0) + transitivePeerDependencies: + - supports-color + + https-proxy-agent@5.0.1(supports-color@7.2.0): + dependencies: + agent-base: 6.0.2(supports-color@7.2.0) + debug: 4.3.7(supports-color@7.2.0) + transitivePeerDependencies: + - supports-color + + https-proxy-agent@7.0.6(supports-color@7.2.0): + dependencies: + agent-base: 7.1.2(supports-color@7.2.0) + debug: 4.3.7(supports-color@7.2.0) + transitivePeerDependencies: + - supports-color + + human-signals@5.0.0: {} + + i18next@23.16.8: + dependencies: + '@babel/runtime': 7.29.10 + + iconv-lite@0.6.3: + dependencies: + safer-buffer: 2.1.2 + + ids@1.0.5: {} + + ignore@5.3.2: {} + + ignore@7.0.14: {} + + immutable@5.1.9: {} + + import-fresh@3.3.0: + dependencies: + parent-module: 1.0.1 + resolve-from: 4.0.0 + + import-meta-resolve@4.1.0: {} + + import-meta-resolve@4.2.0: {} + + imurmurhash@0.1.4: {} + + indent-string@4.0.0: {} + + individual@2.0.0: {} + + inflight@1.0.6: + dependencies: + once: 1.4.0 + wrappy: 1.0.2 + + inherits-browser@0.1.0: {} + + inherits@2.0.4: {} + + ini@1.3.8: {} + + ini@4.1.1: {} + + internmap@2.0.3: {} + + is-arrayish@0.2.1: {} + + is-binary-path@2.1.0: + dependencies: + binary-extensions: 2.3.0 + + is-core-module@2.15.1: + dependencies: + hasown: 2.0.2 + + is-extglob@2.1.1: {} + + is-fullwidth-code-point@3.0.0: {} + + is-fullwidth-code-point@4.0.0: {} + + is-fullwidth-code-point@5.0.0: + dependencies: + get-east-asian-width: 1.3.0 + + is-function@1.0.2: {} + + is-glob@4.0.3: + dependencies: + is-extglob: 2.1.1 + + is-hotkey@0.2.0: {} + + is-network-error@1.3.2: {} + + is-number@7.0.0: {} + + is-obj@2.0.0: {} + + is-path-inside@3.0.3: {} + + is-plain-object@5.0.0: {} + + is-potential-custom-element-name@1.0.1: {} + + is-stream@3.0.0: {} + + is-text-path@2.0.0: + dependencies: + text-extensions: 2.4.0 + + is-unsafe@2.0.2: {} + + is-url@1.2.4: {} + + isexe@2.0.0: {} + + istanbul-lib-coverage@3.2.2: {} + + istanbul-lib-report@3.0.1: + dependencies: + istanbul-lib-coverage: 3.2.2 + make-dir: 4.0.0 + supports-color: 7.2.0 + + istanbul-reports@3.2.0: + dependencies: + html-escaper: 2.0.2 + istanbul-lib-report: 3.0.1 + + jackspeak@3.4.3: + dependencies: + '@isaacs/cliui': 8.0.2 + optionalDependencies: + '@pkgjs/parseargs': 0.11.0 + + javascript-natural-sort@0.7.1: {} + + jiti@1.21.6: {} + + jiti@2.4.2: {} + + jiti@2.7.0: {} + + jmespath@0.16.0: {} + + js-beautify@1.15.4: + dependencies: + config-chain: 1.1.13 + editorconfig: 1.0.7 + glob: 10.5.0 + js-cookie: 3.0.8 + nopt: 7.2.1 + + js-beautify@2.0.3: + dependencies: + config-chain: 1.1.13 + editorconfig: 3.0.2 + glob: 13.0.6 + js-cookie: 3.0.8 + nopt: 10.0.1 + + js-cookie@3.0.8: {} + + js-tokens@10.0.0: {} + + js-tokens@4.0.0: {} + + js-tokens@9.0.1: {} + + js-yaml@4.3.2: + dependencies: + argparse: 2.0.1 + + jsdom@26.1.0(supports-color@7.2.0): + dependencies: + cssstyle: 4.2.1 + data-urls: 5.0.0 + decimal.js: 10.6.0 + html-encoding-sniffer: 4.0.0 + http-proxy-agent: 7.0.2(supports-color@7.2.0) + https-proxy-agent: 7.0.6(supports-color@7.2.0) + is-potential-custom-element-name: 1.0.1 + nwsapi: 2.2.28 + parse5: 7.2.1 + rrweb-cssom: 0.8.0 + saxes: 6.0.0 + symbol-tree: 3.2.4 + tough-cookie: 5.1.1 + w3c-xmlserializer: 5.0.0 + webidl-conversions: 7.0.0 + whatwg-encoding: 3.1.1 + whatwg-mimetype: 4.0.0 + whatwg-url: 14.1.1 + ws: 8.22.0 + xml-name-validator: 5.0.0 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + + jsesc@3.0.2: {} + + json-buffer@3.0.1: {} + + json-parse-even-better-errors@2.3.1: {} + + json-schema-traverse@0.4.1: {} + + json-schema-traverse@1.0.0: {} + + json-source-map@0.6.1: {} + + json-stable-stringify-without-jsonify@1.0.1: {} + + json5@2.2.3: {} + + jsonc-eslint-parser@2.4.0: + dependencies: + acorn: 8.19.0 + eslint-visitor-keys: 3.4.3 + espree: 9.6.1 + semver: 7.8.5 + + jsoneditor@10.4.3: + dependencies: + ace-builds: 1.39.1 + ajv: 6.15.0 + javascript-natural-sort: 0.7.1 + jmespath: 0.16.0 + json-source-map: 0.6.1 + jsonrepair: 3.13.0 + picomodal: 3.0.0 + vanilla-picker: 2.12.3 + + jsonfile@6.1.0: + dependencies: + universalify: 2.0.1 + optionalDependencies: + graceful-fs: 4.2.11 + + jsonparse@1.3.1: {} + + jsonrepair@3.13.0: {} + + katex@0.16.47: + dependencies: + commander: 8.3.0 + + keycode@2.2.1: {} + + keyv@4.5.4: + dependencies: + json-buffer: 3.0.1 + + keyv@5.6.0: + dependencies: + '@keyv/serialize': 1.1.1 + + kind-of@6.0.3: {} + + known-css-properties@0.37.0: {} + + lang-feel@2.2.0: + dependencies: + '@codemirror/autocomplete': 6.20.4 + '@codemirror/language': 6.13.1 + '@codemirror/state': 6.7.6 + '@codemirror/view': 6.43.15 + '@lezer/common': 1.5.4 + lezer-feel: 1.4.0 + + levn@0.4.1: + dependencies: + prelude-ls: 1.2.1 + type-check: 0.4.0 + + lezer-feel@1.4.0: + dependencies: + '@lezer/highlight': 1.2.5 + '@lezer/lr': 1.4.11 + min-dash: 4.2.2 + + lilconfig@3.1.2: {} + + lines-and-columns@1.2.4: {} + + linkify-it@5.0.2: + dependencies: + uc.micro: 2.1.0 + + lint-staged@15.2.10(supports-color@7.2.0): + dependencies: + chalk: 5.3.0 + commander: 12.1.0 + debug: 4.3.7(supports-color@7.2.0) + execa: 8.0.1 + lilconfig: 3.1.2 + listr2: 8.2.5 + micromatch: 4.0.8 + pidtree: 0.6.0 + string-argv: 0.3.2 + yaml: 2.9.1 + transitivePeerDependencies: + - supports-color + + listr2@8.2.5: + dependencies: + cli-truncate: 4.0.0 + colorette: 2.0.20 + eventemitter3: 5.0.1 + log-update: 6.1.0 + rfdc: 1.4.1 + wrap-ansi: 9.0.0 + + local-pkg@0.4.3: {} + + local-pkg@0.5.1: + dependencies: + mlly: 1.7.3 + pkg-types: 1.2.1 + + locate-path@5.0.0: + dependencies: + p-locate: 4.1.0 + + locate-path@6.0.0: + dependencies: + p-locate: 5.0.0 + + locate-path@7.2.0: + dependencies: + p-locate: 6.0.0 + + lodash-es@4.18.1: {} + + lodash-unified@1.0.3(@types/lodash-es@4.17.12)(lodash-es@4.18.1)(lodash@4.18.1): + dependencies: + '@types/lodash-es': 4.17.12 + lodash: 4.18.1 + lodash-es: 4.18.1 + + lodash.camelcase@4.3.0: {} + + lodash.clonedeep@4.5.0: {} + + lodash.debounce@4.0.8: {} + + lodash.foreach@4.5.0: {} + + lodash.isplainobject@4.0.6: {} + + lodash.kebabcase@4.1.1: {} + + lodash.merge@4.6.2: {} + + lodash.mergewith@4.6.2: {} + + lodash.snakecase@4.1.1: {} + + lodash.startcase@4.4.0: {} + + lodash.throttle@4.1.1: {} + + lodash.toarray@4.4.0: {} + + lodash.truncate@4.4.2: {} + + lodash.uniq@4.5.0: {} + + lodash.upperfirst@4.3.1: {} + + lodash@4.18.1: {} + + log-update@6.1.0: + dependencies: + ansi-escapes: 7.0.0 + cli-cursor: 5.0.0 + slice-ansi: 7.1.0 + strip-ansi: 7.2.0 + wrap-ansi: 9.0.0 + + loglevel-colored-level-prefix@1.0.0: + dependencies: + chalk: 1.1.3 + loglevel: 1.9.2 + + loglevel@1.9.2: {} + + lru-cache@10.4.3: {} + + lru-cache@11.5.3: {} + + lru-cache@5.1.1: + dependencies: + yallist: 3.1.1 + + luxon@3.7.2: {} + + m3u8-parser@4.8.0: + dependencies: + '@babel/runtime': 7.29.10 + '@videojs/vhs-utils': 3.0.5 + global: 4.4.0 + + magic-string@0.30.14: + dependencies: + '@jridgewell/sourcemap-codec': 1.5.0 + + magic-string@0.30.17: + dependencies: + '@jridgewell/sourcemap-codec': 1.5.0 + + magic-string@0.30.21: + dependencies: + '@jridgewell/sourcemap-codec': 1.6.0 + + magic-string@1.4.4: + dependencies: + '@jridgewell/sourcemap-codec': 1.6.0 + + magicast@0.5.5: + dependencies: + '@babel/parser': 7.29.11 + '@babel/types': 7.29.11 + source-map-js: 1.2.2 + + make-dir@4.0.0: + dependencies: + semver: 7.8.5 + + markdown-it@14.3.3: + dependencies: + argparse: 2.0.1 + entities: 4.5.0 + linkify-it: 5.0.2 + mdurl: 2.0.0 + punycode.js: 2.3.1 + uc.micro: 2.1.0 + + marked@17.0.6: {} + + markmap-common@0.16.0: + dependencies: + '@babel/runtime': 7.29.10 + '@gera2ld/jsx-dom': 2.2.2 + npm2url: 0.2.4 + + markmap-html-parser@0.16.1(markmap-common@0.16.0): + dependencies: + '@babel/runtime': 7.29.10 + cheerio: 1.0.0-rc.12 + markmap-common: 0.16.0 + + markmap-lib@0.16.1(markmap-common@0.16.0): + dependencies: + '@babel/runtime': 7.29.10 + highlight.js: 11.12.0 + js-yaml: 4.3.2 + katex: 0.16.47 + markmap-common: 0.16.0 + markmap-html-parser: 0.16.1(markmap-common@0.16.0) + markmap-view: 0.16.0(markmap-common@0.16.0) + prismjs: 1.30.0 + remarkable: 2.0.1 + remarkable-katex: 1.2.1 + + markmap-toolbar@0.17.2(markmap-common@0.16.0): + dependencies: + '@babel/runtime': 7.29.10 + '@gera2ld/jsx-dom': 2.2.2 + markmap-common: 0.16.0 + + markmap-view@0.16.0(markmap-common@0.16.0): + dependencies: + '@babel/runtime': 7.29.10 + '@gera2ld/jsx-dom': 2.2.2 + '@types/d3': 7.4.3 + d3: 7.9.0 + d3-flextree: 2.1.2 + markmap-common: 0.16.0 + + math-intrinsics@1.1.0: {} + + mathml-tag-names@2.1.3: {} + + mdn-data@2.0.28: {} + + mdn-data@2.27.1: {} + + mdurl@2.0.0: {} + + memoize-one@6.0.0: {} + + meow@12.1.1: {} + + meow@13.2.0: {} + + merge-stream@2.0.0: {} + + merge2@1.4.1: {} + + micromatch@4.0.8: + dependencies: + braces: 3.0.3 + picomatch: 2.3.2 + + mime-db@1.52.0: {} + + mime-match@1.0.2: + dependencies: + wildcard: 1.1.2 + + mime-types@2.1.35: + dependencies: + mime-db: 1.52.0 + + mimic-fn@4.0.0: {} + + mimic-function@5.0.1: {} + + min-dash@4.2.2: {} + + min-dash@5.1.0: {} + + min-document@2.19.2: + dependencies: + dom-walk: 0.1.2 + + min-dom@4.2.1: + dependencies: + component-event: 0.2.1 + domify: 1.4.2 + min-dash: 4.2.2 + + min-dom@5.3.0: + dependencies: + domify: 3.0.0 + min-dash: 5.1.0 + + minimatch@10.2.6: + dependencies: + brace-expansion: 5.0.12 + + minimatch@3.1.5: + dependencies: + brace-expansion: 1.1.21 + + minimatch@5.1.9: + dependencies: + brace-expansion: 2.1.7 + + minimatch@9.0.9: + dependencies: + brace-expansion: 2.1.7 + + minimist@1.2.8: {} + + minipass@7.1.2: {} + + minipass@7.1.3: {} + + mitt@3.0.1: {} + + mlly@1.7.3: + dependencies: + acorn: 8.19.0 + pathe: 1.1.2 + pkg-types: 1.2.1 + ufo: 1.5.4 + + moddle-xml@10.1.0: + dependencies: + min-dash: 4.2.2 + moddle: 6.2.3 + saxen: 8.1.2 + + moddle@6.2.3: + dependencies: + min-dash: 4.2.2 + + mpd-parser@0.22.1: + dependencies: + '@babel/runtime': 7.29.10 + '@videojs/vhs-utils': 3.0.5 + '@xmldom/xmldom': 0.8.15 + global: 4.4.0 + + ms@2.1.3: {} + + muggle-string@0.1.0: {} + + muggle-string@0.3.1: {} + + mux.js@6.0.1: + dependencies: + '@babel/runtime': 7.29.10 + global: 4.4.0 + + namespace-emitter@2.0.1: {} + + nanoid@3.3.20: {} + + nanoid@5.1.16: {} + + natural-compare@1.4.0: {} + + next-tick@1.1.0: {} + + node-addon-api@7.1.1: + optional: true + + node-fetch-native@1.6.7: {} + + node-fetch@2.7.0: + dependencies: + whatwg-url: 5.0.0 + + node-releases@2.0.60: {} + + nopt@10.0.1: + dependencies: + abbrev: 5.0.0 + + nopt@7.2.1: + dependencies: + abbrev: 2.0.0 + + normalize-path@3.0.0: {} + + normalize-wheel-es@1.2.0: {} + + nostics@1.3.0: {} + + npm-run-path@5.3.0: + dependencies: + path-key: 4.0.0 + + npm2url@0.2.4: {} + + nprogress@0.2.0: {} + + nth-check@2.1.1: + dependencies: + boolbase: 1.0.0 + + nwsapi@2.2.28: {} + + object-inspect@1.13.4: {} + + object-refs@0.3.0: {} + + object-refs@0.4.0: {} + + obug@2.2.1: {} + + ofetch@1.5.1: + dependencies: + destr: 2.0.5 + node-fetch-native: 1.6.7 + ufo: 1.6.4 + + once@1.4.0: + dependencies: + wrappy: 1.0.2 + + onetime@6.0.0: + dependencies: + mimic-fn: 4.0.0 + + onetime@7.0.0: + dependencies: + mimic-function: 5.0.1 + + optionator@0.9.4: + dependencies: + deep-is: 0.1.4 + fast-levenshtein: 2.0.6 + levn: 0.4.1 + prelude-ls: 1.2.1 + type-check: 0.4.0 + word-wrap: 1.2.5 + + oxc-parser@0.153.0: + dependencies: + '@oxc-project/types': 0.153.0 + optionalDependencies: + '@oxc-parser/binding-android-arm-eabi': 0.153.0 + '@oxc-parser/binding-android-arm64': 0.153.0 + '@oxc-parser/binding-darwin-arm64': 0.153.0 + '@oxc-parser/binding-darwin-x64': 0.153.0 + '@oxc-parser/binding-freebsd-x64': 0.153.0 + '@oxc-parser/binding-linux-arm-gnueabihf': 0.153.0 + '@oxc-parser/binding-linux-arm-musleabihf': 0.153.0 + '@oxc-parser/binding-linux-arm64-gnu': 0.153.0 + '@oxc-parser/binding-linux-arm64-musl': 0.153.0 + '@oxc-parser/binding-linux-ppc64-gnu': 0.153.0 + '@oxc-parser/binding-linux-riscv64-gnu': 0.153.0 + '@oxc-parser/binding-linux-riscv64-musl': 0.153.0 + '@oxc-parser/binding-linux-s390x-gnu': 0.153.0 + '@oxc-parser/binding-linux-x64-gnu': 0.153.0 + '@oxc-parser/binding-linux-x64-musl': 0.153.0 + '@oxc-parser/binding-openharmony-arm64': 0.153.0 + '@oxc-parser/binding-win32-arm64-msvc': 0.153.0 + '@oxc-parser/binding-win32-ia32-msvc': 0.153.0 + '@oxc-parser/binding-win32-x64-msvc': 0.153.0 + + oxc-walker@1.1.1(@oxc-project/types@0.153.0)(oxc-parser@0.153.0): + optionalDependencies: + '@oxc-project/types': 0.153.0 + oxc-parser: 0.153.0 + + p-limit@2.3.0: + dependencies: + p-try: 2.2.0 + + p-limit@3.1.0: + dependencies: + yocto-queue: 0.1.0 + + p-limit@4.0.0: + dependencies: + yocto-queue: 1.1.1 + + p-locate@4.1.0: + dependencies: + p-limit: 2.3.0 + + p-locate@5.0.0: + dependencies: + p-limit: 3.1.0 + + p-locate@6.0.0: + dependencies: + p-limit: 4.0.0 + + p-retry@6.1.0: + dependencies: + '@types/retry': 0.12.2 + is-network-error: 1.3.2 + retry: 0.13.1 + + p-try@2.2.0: {} + + package-json-from-dist@1.0.1: {} + + package-manager-detector@1.9.0: {} + + parent-module@1.0.1: + dependencies: + callsites: 3.1.0 + + parse-json@5.2.0: + dependencies: + '@babel/code-frame': 7.29.7 + error-ex: 1.3.2 + json-parse-even-better-errors: 2.3.1 + lines-and-columns: 1.2.4 + + parse5-htmlparser2-tree-adapter@7.1.0: + dependencies: + domhandler: 5.0.3 + parse5: 7.2.1 + + parse5@7.2.1: + dependencies: + entities: 4.5.0 + + path-browserify@1.0.1: {} + + path-exists@4.0.0: {} + + path-exists@5.0.0: {} + + path-expression-matcher@1.6.2: {} + + path-intersection@2.2.1: {} + + path-intersection@3.1.0: {} + + path-is-absolute@1.0.1: {} + + path-key@3.1.1: {} + + path-key@4.0.0: {} + + path-parse@1.0.7: {} + + path-scurry@1.11.1: + dependencies: + lru-cache: 10.4.3 + minipass: 7.1.2 + + path-scurry@2.0.2: + dependencies: + lru-cache: 11.5.3 + minipass: 7.1.3 + + path-type@4.0.0: {} + + pathe@1.1.2: {} + + pathe@2.0.3: {} + + perfect-debounce@2.1.0: {} + + picocolors@1.1.1: {} + + picomatch@2.3.2: {} + + picomatch@4.0.7: {} + + picomodal@3.0.0: {} + + pidtree@0.6.0: {} + + pinia-plugin-persistedstate@3.2.3(pinia@2.2.8(typescript@5.3.3)(vue@3.5.44(typescript@5.3.3))): + dependencies: + pinia: 2.2.8(typescript@5.3.3)(vue@3.5.44(typescript@5.3.3)) + + pinia@2.2.8(typescript@5.3.3)(vue@3.5.44(typescript@5.3.3)): + dependencies: + '@vue/devtools-api': 6.6.4 + vue: 3.5.44(typescript@5.3.3) + vue-demi: 0.14.10(vue@3.5.44(typescript@5.3.3)) + optionalDependencies: + typescript: 5.3.3 + + pkcs7@1.0.4: + dependencies: + '@babel/runtime': 7.29.10 + + pkg-types@1.2.1: + dependencies: + confbox: 0.1.8 + mlly: 1.7.3 + pathe: 1.1.2 + + pngjs@5.0.0: {} + + postcss-html@1.8.1: + dependencies: + htmlparser2: 8.0.2 + js-tokens: 9.0.1 + postcss: 8.5.31 + postcss-safe-parser: 6.0.0(postcss@8.5.31) + + postcss-resolve-nested-selector@0.1.6: {} + + postcss-safe-parser@6.0.0(postcss@8.5.31): + dependencies: + postcss: 8.5.31 + + postcss-safe-parser@7.0.1(postcss@8.5.31): + dependencies: + postcss: 8.5.31 + + postcss-scss@4.0.9(postcss@8.5.31): + dependencies: + postcss: 8.5.31 + + postcss-selector-parser@6.1.5: + dependencies: + cssesc: 3.0.0 + util-deprecate: 1.0.2 + + postcss-selector-parser@7.1.7: + dependencies: + cssesc: 3.0.0 + util-deprecate: 1.0.2 + + postcss-sorting@8.0.2(postcss@8.5.31): + dependencies: + postcss: 8.5.31 + + postcss-value-parser@4.2.0: {} + + postcss@8.5.31: + dependencies: + nanoid: 3.3.20 + picocolors: 1.1.1 + source-map-js: 1.2.2 + + preact@10.25.0: {} + + preact@10.29.8: {} + + prelude-ls@1.2.1: {} + + prettier-eslint@16.3.0(supports-color@7.2.0): + dependencies: + '@typescript-eslint/parser': 6.21.0(eslint@8.57.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@5.3.3) + common-tags: 1.8.2 + dlv: 1.1.3 + eslint: 8.57.1(supports-color@7.2.0) + indent-string: 4.0.0 + lodash.merge: 4.6.2 + loglevel-colored-level-prefix: 1.0.0 + prettier: 3.9.10 + pretty-format: 29.7.0 + require-relative: 0.8.7 + typescript: 5.3.3 + vue-eslint-parser: 9.4.3(eslint@8.57.1(supports-color@7.2.0))(supports-color@7.2.0) + transitivePeerDependencies: + - supports-color + + prettier-linter-helpers@1.0.1: + dependencies: + fast-diff: 1.3.0 + + prettier@3.9.10: {} + + pretty-format@29.7.0: + dependencies: + '@jest/schemas': 29.6.3 + ansi-styles: 5.2.0 + react-is: 18.3.1 + + prismjs@1.30.0: {} + + process@0.11.10: {} + + progress@2.0.3: {} + + proto-list@1.2.4: {} + + proxy-from-env@1.1.0: {} + + proxy-from-env@2.1.0: {} + + punycode.js@2.3.1: {} + + punycode@1.4.1: {} + + punycode@2.3.1: {} + + qified@0.10.1: + dependencies: + hookified: 2.2.0 + + qrcode@1.5.4: + dependencies: + dijkstrajs: 1.0.3 + pngjs: 5.0.0 + yargs: 15.4.1 + + qs@6.16.1: + dependencies: + es-define-property: 1.0.1 + side-channel: 1.1.1 + + quansync@0.2.8: {} + + quansync@1.0.0: {} + + queue-microtask@1.2.3: {} + + randomcolor@0.6.2: {} + + rd@2.0.1: + dependencies: + '@types/node': 10.17.60 + + react-is@18.3.1: {} + + readdirp@3.6.0: + dependencies: + picomatch: 2.3.2 + + readdirp@5.1.1: {} + + remarkable-katex@1.2.1: {} + + remarkable@2.0.1: + dependencies: + argparse: 1.0.10 + autolinker: 3.16.2 + + require-directory@2.1.1: {} + + require-from-string@2.0.2: {} + + require-main-filename@2.0.0: {} + + require-relative@0.8.7: {} + + resolve-from@4.0.0: {} + + resolve-from@5.0.0: {} + + resolve@1.22.8: + dependencies: + is-core-module: 2.15.1 + path-parse: 1.0.7 + supports-preserve-symlinks-flag: 1.0.0 + + restore-cursor@5.1.0: + dependencies: + onetime: 7.0.0 + signal-exit: 4.1.0 + + retry@0.13.1: {} + + reusify@1.0.4: {} + + rfdc@1.4.1: {} + + rimraf@3.0.2: + dependencies: + glob: 7.2.0 + + rimraf@5.0.10: + dependencies: + glob: 10.5.0 + + robust-predicates@3.0.2: {} + + rollup-plugin-purge-icons@0.10.0(supports-color@7.2.0): + dependencies: + '@purge-icons/core': 0.10.0(supports-color@7.2.0) + '@purge-icons/generated': 0.10.0 + transitivePeerDependencies: + - encoding + - supports-color + + rollup@2.80.0: + optionalDependencies: + fsevents: 2.3.3 + + rollup@4.65.0: + dependencies: + '@types/estree': 1.0.9 + optionalDependencies: + '@napi-rs/lzma-linux-x64-gnu': 1.5.1 + '@rollup/rollup-android-arm-eabi': 4.65.0 + '@rollup/rollup-android-arm64': 4.65.0 + '@rollup/rollup-darwin-arm64': 4.65.0 + '@rollup/rollup-darwin-x64': 4.65.0 + '@rollup/rollup-freebsd-arm64': 4.65.0 + '@rollup/rollup-freebsd-x64': 4.65.0 + '@rollup/rollup-linux-arm-gnueabihf': 4.65.0 + '@rollup/rollup-linux-arm-musleabihf': 4.65.0 + '@rollup/rollup-linux-arm64-gnu': 4.65.0 + '@rollup/rollup-linux-arm64-musl': 4.65.0 + '@rollup/rollup-linux-loong64-gnu': 4.65.0 + '@rollup/rollup-linux-loong64-musl': 4.65.0 + '@rollup/rollup-linux-ppc64-gnu': 4.65.0 + '@rollup/rollup-linux-ppc64-musl': 4.65.0 + '@rollup/rollup-linux-riscv64-gnu': 4.65.0 + '@rollup/rollup-linux-riscv64-musl': 4.65.0 + '@rollup/rollup-linux-s390x-gnu': 4.65.0 + '@rollup/rollup-linux-x64-gnu': 4.65.0 + '@rollup/rollup-linux-x64-musl': 4.65.0 + '@rollup/rollup-openbsd-x64': 4.65.0 + '@rollup/rollup-openharmony-arm64': 4.65.0 + '@rollup/rollup-win32-arm64-msvc': 4.65.0 + '@rollup/rollup-win32-ia32-msvc': 4.65.0 + '@rollup/rollup-win32-x64-gnu': 4.65.0 + '@rollup/rollup-win32-x64-msvc': 4.65.0 + fsevents: 2.3.3 + + rou3@1.0.0: {} + + rrweb-cssom@0.8.0: {} + + run-parallel@1.2.0: + dependencies: + queue-microtask: 1.2.3 + + rust-result@1.0.0: + dependencies: + individual: 2.0.0 + + rw@1.3.3: {} + + safe-json-parse@4.0.0: + dependencies: + rust-result: 1.0.0 + + safer-buffer@2.1.2: {} + + sass@1.106.1: + dependencies: + chokidar: 5.0.0 + immutable: 5.1.9 + source-map-js: 1.2.2 + optionalDependencies: + '@parcel/watcher': 2.5.0 + + sax@1.4.1: {} + + sax@1.6.1: {} + + saxen@8.1.2: {} + + saxes@6.0.0: + dependencies: + xmlchars: 2.2.0 + + scroll-into-view-if-needed@3.1.0: + dependencies: + compute-scroll-into-view: 3.1.1 + + scule@1.3.0: {} + + semver@6.3.1: {} + + semver@7.6.3: {} + + semver@7.8.5: {} + + set-blocking@2.0.0: {} + + shebang-command@2.0.0: + dependencies: + shebang-regex: 3.0.0 + + shebang-regex@3.0.0: {} + + side-channel-list@1.0.1: + dependencies: + es-errors: 1.3.0 + object-inspect: 1.13.4 + + side-channel-map@1.0.1: + dependencies: + call-bound: 1.0.4 + es-errors: 1.3.0 + get-intrinsic: 1.3.0 + object-inspect: 1.13.4 + + side-channel-weakmap@1.0.2: + dependencies: + call-bound: 1.0.4 + es-errors: 1.3.0 + get-intrinsic: 1.3.0 + object-inspect: 1.13.4 + side-channel-map: 1.0.1 + + side-channel@1.1.1: + dependencies: + es-errors: 1.3.0 + object-inspect: 1.13.4 + side-channel-list: 1.0.1 + side-channel-map: 1.0.1 + side-channel-weakmap: 1.0.2 + + siginfo@2.0.0: {} + + signal-exit@4.1.0: {} + + signature_pad@3.0.0-beta.4: {} + + signature_pad@5.1.4: {} + + slash@3.0.0: {} + + slate-history@0.115.0(slate@0.124.1): + dependencies: + slate: 0.124.1 + + slate@0.124.1: {} + + slice-ansi@4.0.0: + dependencies: + ansi-styles: 4.3.0 + astral-regex: 2.0.0 + is-fullwidth-code-point: 3.0.0 + + slice-ansi@5.0.0: + dependencies: + ansi-styles: 6.2.1 + is-fullwidth-code-point: 4.0.0 + + slice-ansi@7.1.0: + dependencies: + ansi-styles: 6.2.1 + is-fullwidth-code-point: 5.0.0 + + snabbdom@3.6.4: {} + + sortablejs@1.14.0: {} + + sortablejs@1.15.7: {} + + source-map-js@1.2.2: {} + + source-map-support@0.5.21: + dependencies: + buffer-from: 1.1.2 + source-map: 0.6.1 + + source-map@0.6.1: {} + + split2@4.2.0: {} + + sprintf-js@1.0.3: {} + + srvx@1.0.7: {} + + ssr-window@4.0.2: {} + + stackback@0.0.2: {} + + std-env@4.3.0: {} + + steady-xml@0.1.0: {} + + string-argv@0.3.2: {} + + string-width@4.2.3: + dependencies: + emoji-regex: 8.0.0 + is-fullwidth-code-point: 3.0.0 + strip-ansi: 6.0.1 + + string-width@5.1.2: + dependencies: + eastasianwidth: 0.2.0 + emoji-regex: 9.2.2 + strip-ansi: 7.2.0 + + string-width@7.2.0: + dependencies: + emoji-regex: 10.4.0 + get-east-asian-width: 1.3.0 + strip-ansi: 7.2.0 + + strip-ansi@3.0.1: + dependencies: + ansi-regex: 2.1.1 + + strip-ansi@6.0.1: + dependencies: + ansi-regex: 5.0.1 + + strip-ansi@7.2.0: + dependencies: + ansi-regex: 6.4.0 + + strip-final-newline@3.0.0: {} + + strip-json-comments@3.1.1: {} + + strip-literal@2.1.1: + dependencies: + js-tokens: 9.0.1 + + strnum@2.5.1: + dependencies: + anynum: 1.0.1 + + style-mod@4.1.4: {} + + stylelint-config-html@1.1.0(postcss-html@1.8.1)(stylelint@16.26.1(supports-color@7.2.0)(typescript@5.3.3)): + dependencies: + postcss-html: 1.8.1 + stylelint: 16.26.1(supports-color@7.2.0)(typescript@5.3.3) + + stylelint-config-recommended@14.0.1(stylelint@16.26.1(supports-color@7.2.0)(typescript@5.3.3)): + dependencies: + stylelint: 16.26.1(supports-color@7.2.0)(typescript@5.3.3) + + stylelint-config-standard@36.0.1(stylelint@16.26.1(supports-color@7.2.0)(typescript@5.3.3)): + dependencies: + stylelint: 16.26.1(supports-color@7.2.0)(typescript@5.3.3) + stylelint-config-recommended: 14.0.1(stylelint@16.26.1(supports-color@7.2.0)(typescript@5.3.3)) + + stylelint-order@6.0.4(stylelint@16.26.1(supports-color@7.2.0)(typescript@5.3.3)): + dependencies: + postcss: 8.5.31 + postcss-sorting: 8.0.2(postcss@8.5.31) + stylelint: 16.26.1(supports-color@7.2.0)(typescript@5.3.3) + + stylelint@16.26.1(supports-color@7.2.0)(typescript@5.3.3): + dependencies: + '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) + '@csstools/css-syntax-patches-for-csstree': 1.1.15(css-tree@3.2.1) + '@csstools/css-tokenizer': 3.0.4 + '@csstools/media-query-list-parser': 4.0.3(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) + '@csstools/selector-specificity': 5.0.0(postcss-selector-parser@7.1.7) + '@dual-bundle/import-meta-resolve': 4.2.1 + balanced-match: 2.0.0 + colord: 2.10.0 + cosmiconfig: 9.0.0(typescript@5.3.3) + css-functions-list: 3.2.3 + css-tree: 3.2.1 + debug: 4.4.3(supports-color@7.2.0) + fast-glob: 3.3.3 + fastest-levenshtein: 1.0.16 + file-entry-cache: 11.1.5 + global-modules: 2.0.0 + globby: 11.1.0 + globjoin: 0.1.4 + html-tags: 3.3.1 + ignore: 7.0.14 + imurmurhash: 0.1.4 + is-plain-object: 5.0.0 + known-css-properties: 0.37.0 + mathml-tag-names: 2.1.3 + meow: 13.2.0 + micromatch: 4.0.8 + normalize-path: 3.0.0 + picocolors: 1.1.1 + postcss: 8.5.31 + postcss-resolve-nested-selector: 0.1.6 + postcss-safe-parser: 7.0.1(postcss@8.5.31) + postcss-selector-parser: 7.1.7 + postcss-value-parser: 4.2.0 + resolve-from: 5.0.0 + string-width: 4.2.3 + supports-hyperlinks: 3.2.0 + svg-tags: 1.0.0 + table: 6.9.0 + write-file-atomic: 5.0.1 + transitivePeerDependencies: + - supports-color + - typescript + + supports-color@2.0.0: {} + + supports-color@7.2.0: + dependencies: + has-flag: 4.0.0 + + supports-hyperlinks@3.2.0: + dependencies: + has-flag: 4.0.0 + supports-color: 7.2.0 + + supports-preserve-symlinks-flag@1.0.0: {} + + svg-icon-baker@2.1.2: + dependencies: + css-tree: 3.2.1 + fast-xml-builder: 1.3.1 + fast-xml-parser: 5.11.2 + svgo: 4.1.0 + + svg-tags@1.0.0: {} + + svgo@4.1.0: + dependencies: + commander: 11.1.0 + css-select: 6.0.0 + css-tree: 3.2.1 + css-what: 7.0.0 + csso: 5.0.5 + picocolors: 1.1.1 + sax: 1.6.1 + + symbol-tree@3.2.4: {} + + synckit@0.12.3: + dependencies: + '@dual-bundle/import-meta-resolve': 4.2.1 + '@pkgr/core': 0.3.6 + + synckit@0.8.8: + dependencies: + '@pkgr/core': 0.1.1 + tslib: 2.8.1 + + synckit@0.9.2: + dependencies: + '@pkgr/core': 0.1.1 + tslib: 2.8.1 + + tabbable@6.5.1: {} + + table@6.9.0: + dependencies: + ajv: 8.20.0 + lodash.truncate: 4.4.2 + slice-ansi: 4.0.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 + + terser@5.51.2: + dependencies: + '@jridgewell/source-map': 0.3.6 + acorn: 8.19.0 + commander: 2.20.3 + source-map-support: 0.5.21 + + text-extensions@2.4.0: {} + + text-table@0.2.0: {} + + through@2.3.8: {} + + tiny-svg@3.1.3: {} + + tinybench@2.9.0: {} + + tinyexec@0.3.1: {} + + tinyexec@1.3.1: {} + + tinyglobby@0.2.17: + dependencies: + fdir: 6.5.0(picomatch@4.0.7) + picomatch: 4.0.7 + + tinyrainbow@3.2.0: {} + + tldts-core@6.1.86: {} + + tldts@6.1.86: + dependencies: + tldts-core: 6.1.86 + + to-regex-range@5.0.1: + dependencies: + is-number: 7.0.0 + + tough-cookie@5.1.1: + dependencies: + tldts: 6.1.86 + + tr46@0.0.3: {} + + tr46@5.0.0: + dependencies: + punycode: 2.3.1 + + ts-api-utils@1.4.3(typescript@5.3.3): + dependencies: + typescript: 5.3.3 + + ts-api-utils@2.0.1(typescript@5.3.3): + dependencies: + typescript: 5.3.3 + + ts-api-utils@2.5.0(typescript@5.3.3): + dependencies: + typescript: 5.3.3 + + tslib@2.3.0: {} + + tslib@2.8.1: {} + + type-check@0.4.0: + dependencies: + prelude-ls: 1.2.1 + + type-fest@0.20.2: {} + + type@2.7.3: {} + + typescript@5.3.3: {} + + uc.micro@2.1.0: {} + + ufo@1.5.4: {} + + ufo@1.6.4: {} + + unconfig-core@7.5.0: + dependencies: + '@quansync/fs': 1.1.0 + quansync: 1.0.0 + + unconfig@0.3.13: + dependencies: + '@antfu/utils': 0.7.10 + defu: 6.1.7 + jiti: 1.21.6 + + unconfig@7.3.1: + dependencies: + '@quansync/fs': 0.1.1 + defu: 6.1.7 + jiti: 2.4.2 + quansync: 0.2.8 + + unconfig@7.5.0: + dependencies: + '@quansync/fs': 1.1.0 + defu: 6.1.7 + jiti: 2.7.0 + quansync: 1.0.0 + unconfig-core: 7.5.0 + + undici-types@6.21.0: {} + + unicorn-magic@0.1.0: {} + + unimport@3.14.2(rollup@4.65.0): + dependencies: + '@rollup/pluginutils': 5.1.3(rollup@4.65.0) + acorn: 8.19.0 + escape-string-regexp: 5.0.0 + estree-walker: 3.0.3 + local-pkg: 0.5.1 + magic-string: 0.30.14 + mlly: 1.7.3 + pathe: 1.1.2 + picomatch: 4.0.7 + pkg-types: 1.2.1 + scule: 1.3.0 + strip-literal: 2.1.1 + tinyglobby: 0.2.17 + unplugin: 1.16.0 + transitivePeerDependencies: + - rollup + + universalify@2.0.1: {} + + unocss@66.11.0(@oxc-project/types@0.153.0)(cac@7.1.0)(rollup@4.65.0)(srvx@1.0.7)(vite@7.3.7(@types/node@20.19.43)(jiti@2.7.0)(sass@1.106.1)(terser@5.51.2)(yaml@2.9.1)): + dependencies: + '@unocss/cli': 66.11.0 + '@unocss/core': 66.11.0 + '@unocss/preset-attributify': 66.11.0 + '@unocss/preset-icons': 66.11.0 + '@unocss/preset-mini': 66.11.0 + '@unocss/preset-tagify': 66.11.0 + '@unocss/preset-typography': 66.11.0 + '@unocss/preset-uno': 66.11.0 + '@unocss/preset-web-fonts': 66.11.0 + '@unocss/preset-wind': 66.11.0 + '@unocss/preset-wind3': 66.11.0 + '@unocss/preset-wind4': 66.11.0 + '@unocss/rollup': 66.11.0(rollup@4.65.0) + '@unocss/transformer-attributify-jsx': 66.11.0(@oxc-project/types@0.153.0) + '@unocss/transformer-compile-class': 66.11.0 + '@unocss/transformer-directives': 66.11.0 + '@unocss/transformer-variant-group': 66.11.0 + '@unocss/vite': 66.11.0(cac@7.1.0)(srvx@1.0.7)(vite@7.3.7(@types/node@20.19.43)(jiti@2.7.0)(sass@1.106.1)(terser@5.51.2)(yaml@2.9.1)) + transitivePeerDependencies: + - '@devframes/agentic' + - '@oxc-project/types' + - cac + - ocache + - rolldown + - rollup + - srvx + - vite + + unplugin-auto-import@0.16.7(@vueuse/core@10.11.1(vue@3.5.44(typescript@5.3.3)))(rollup@4.65.0): + dependencies: + '@antfu/utils': 0.7.10 + '@rollup/pluginutils': 5.1.3(rollup@4.65.0) + fast-glob: 3.3.2 + local-pkg: 0.5.1 + magic-string: 0.30.14 + minimatch: 9.0.9 + unimport: 3.14.2(rollup@4.65.0) + unplugin: 1.16.0 + optionalDependencies: + '@vueuse/core': 10.11.1(vue@3.5.44(typescript@5.3.3)) + transitivePeerDependencies: + - rollup + + unplugin-element-plus@0.8.0(rollup@4.65.0): + dependencies: + '@rollup/pluginutils': 5.1.3(rollup@4.65.0) + es-module-lexer: 1.5.4 + magic-string: 0.30.14 + unplugin: 1.16.0 + transitivePeerDependencies: + - rollup + + unplugin-utils@0.3.2: + dependencies: + pathe: 2.0.3 + picomatch: 4.0.7 + + unplugin-vue-components@0.25.2(@babel/parser@7.29.11)(rollup@4.65.0)(supports-color@7.2.0)(vue@3.5.44(typescript@5.3.3)): + dependencies: + '@antfu/utils': 0.7.10 + '@rollup/pluginutils': 5.1.3(rollup@4.65.0) + chokidar: 3.6.0 + debug: 4.3.7(supports-color@7.2.0) + fast-glob: 3.3.2 + local-pkg: 0.4.3 + magic-string: 0.30.14 + minimatch: 9.0.9 + resolve: 1.22.8 + unplugin: 1.16.0 + vue: 3.5.44(typescript@5.3.3) + optionalDependencies: + '@babel/parser': 7.29.11 + transitivePeerDependencies: + - rollup + - supports-color + + unplugin@1.16.0: + dependencies: + acorn: 8.14.0 + webpack-virtual-modules: 0.6.2 + + unplugin@2.3.4: + dependencies: + acorn: 8.19.0 + picomatch: 4.0.7 + webpack-virtual-modules: 0.6.2 + + update-browserslist-db@1.3.4(browserslist@4.29.4): + dependencies: + browserslist: 4.29.4 + escalade: 3.2.0 + picocolors: 1.1.1 + + uri-js@4.4.1: + dependencies: + punycode: 2.3.1 + + url-toolkit@2.2.5: {} + + url@0.11.4: + dependencies: + punycode: 1.4.1 + qs: 6.16.1 + + util-deprecate@1.0.2: {} + + uuid@11.1.1: {} + + vanilla-picker@2.12.3: + dependencies: + '@sphinxxxx/color-conversion': 2.2.2 + + video.js@7.21.6: + dependencies: + '@babel/runtime': 7.29.10 + '@videojs/http-streaming': 2.16.3(video.js@7.21.6) + '@videojs/vhs-utils': 3.0.5 + '@videojs/xhr': 2.6.0 + aes-decrypter: 3.1.3 + global: 4.4.0 + keycode: 2.2.1 + m3u8-parser: 4.8.0 + mpd-parser: 0.22.1 + mux.js: 6.0.1 + safe-json-parse: 4.0.0 + videojs-font: 3.2.0 + videojs-vtt.js: 0.15.5 + + videojs-font@3.2.0: {} + + videojs-vtt.js@0.15.5: + dependencies: + global: 4.4.0 + + vite-plugin-compression@0.5.1(supports-color@7.2.0)(vite@7.3.7(@types/node@20.19.43)(jiti@2.7.0)(sass@1.106.1)(terser@5.51.2)(yaml@2.9.1)): + dependencies: + chalk: 4.1.2 + debug: 4.3.7(supports-color@7.2.0) + fs-extra: 10.1.0 + vite: 7.3.7(@types/node@20.19.43)(jiti@2.7.0)(sass@1.106.1)(terser@5.51.2)(yaml@2.9.1) + transitivePeerDependencies: + - supports-color + + vite-plugin-ejs@1.8.0(vite@7.3.7(@types/node@20.19.43)(jiti@2.7.0)(sass@1.106.1)(terser@5.51.2)(yaml@2.9.1)): + dependencies: + ejs: 6.0.1 + vite: 7.3.7(@types/node@20.19.43)(jiti@2.7.0)(sass@1.106.1)(terser@5.51.2)(yaml@2.9.1) + + vite-plugin-eslint@1.8.1(eslint@8.57.1(supports-color@7.2.0))(vite@7.3.7(@types/node@20.19.43)(jiti@2.7.0)(sass@1.106.1)(terser@5.51.2)(yaml@2.9.1)): + dependencies: + '@rollup/pluginutils': 4.2.1 + '@types/eslint': 8.56.12 + eslint: 8.57.1(supports-color@7.2.0) + rollup: 2.80.0 + vite: 7.3.7(@types/node@20.19.43)(jiti@2.7.0)(sass@1.106.1)(terser@5.51.2)(yaml@2.9.1) + + vite-plugin-progress@0.0.7(vite@7.3.7(@types/node@20.19.43)(jiti@2.7.0)(sass@1.106.1)(terser@5.51.2)(yaml@2.9.1)): + dependencies: + picocolors: 1.1.1 + progress: 2.0.3 + rd: 2.0.1 + vite: 7.3.7(@types/node@20.19.43)(jiti@2.7.0)(sass@1.106.1)(terser@5.51.2)(yaml@2.9.1) + + vite-plugin-purge-icons@0.10.0(supports-color@7.2.0)(vite@7.3.7(@types/node@20.19.43)(jiti@2.7.0)(sass@1.106.1)(terser@5.51.2)(yaml@2.9.1)): + dependencies: + '@purge-icons/core': 0.10.0(supports-color@7.2.0) + '@purge-icons/generated': 0.10.0 + rollup-plugin-purge-icons: 0.10.0(supports-color@7.2.0) + vite: 7.3.7(@types/node@20.19.43)(jiti@2.7.0)(sass@1.106.1)(terser@5.51.2)(yaml@2.9.1) + transitivePeerDependencies: + - encoding + - supports-color + + vite-plugin-svg-icons-ng@1.10.0(vite@7.3.7(@types/node@20.19.43)(jiti@2.7.0)(sass@1.106.1)(terser@5.51.2)(yaml@2.9.1)): + dependencies: + svg-icon-baker: 2.1.2 + tinyglobby: 0.2.17 + vite: 7.3.7(@types/node@20.19.43)(jiti@2.7.0)(sass@1.106.1)(terser@5.51.2)(yaml@2.9.1) + + vite-plugin-top-level-await@1.4.4(rollup@4.65.0)(vite@7.3.7(@types/node@20.19.43)(jiti@2.7.0)(sass@1.106.1)(terser@5.51.2)(yaml@2.9.1)): + dependencies: + '@rollup/plugin-virtual': 3.0.2(rollup@4.65.0) + '@swc/core': 1.9.3 + uuid: 11.1.1 + vite: 7.3.7(@types/node@20.19.43)(jiti@2.7.0)(sass@1.106.1)(terser@5.51.2)(yaml@2.9.1) + transitivePeerDependencies: + - '@swc/helpers' + - rollup + + vite@7.3.7(@types/node@20.19.43)(jiti@2.7.0)(sass@1.106.1)(terser@5.51.2)(yaml@2.9.1): + dependencies: + esbuild: 0.28.2 + fdir: 6.5.0(picomatch@4.0.7) + picomatch: 4.0.7 + postcss: 8.5.31 + rollup: 4.65.0 + tinyglobby: 0.2.17 + optionalDependencies: + '@types/node': 20.19.43 + fsevents: 2.3.3 + jiti: 2.7.0 + sass: 1.106.1 + terser: 5.51.2 + yaml: 2.9.1 + + vitest@4.1.12(@types/node@20.19.43)(@vitest/coverage-v8@4.1.12)(jsdom@26.1.0(supports-color@7.2.0))(vite@7.3.7(@types/node@20.19.43)(jiti@2.7.0)(sass@1.106.1)(terser@5.51.2)(yaml@2.9.1)): + dependencies: + '@vitest/expect': 4.1.12 + '@vitest/mocker': 4.1.12(vite@7.3.7(@types/node@20.19.43)(jiti@2.7.0)(sass@1.106.1)(terser@5.51.2)(yaml@2.9.1)) + '@vitest/pretty-format': 4.1.12 + '@vitest/runner': 4.1.12 + '@vitest/snapshot': 4.1.12 + '@vitest/spy': 4.1.12 + '@vitest/utils': 4.1.12 + es-module-lexer: 2.3.2 + expect-type: 1.4.0 + magic-string: 0.30.21 + obug: 2.2.1 + pathe: 2.0.3 + picomatch: 4.0.7 + std-env: 4.3.0 + tinybench: 2.9.0 + tinyexec: 1.3.1 + tinyglobby: 0.2.17 + tinyrainbow: 3.2.0 + vite: 7.3.7(@types/node@20.19.43)(jiti@2.7.0)(sass@1.106.1)(terser@5.51.2)(yaml@2.9.1) + why-is-node-running: 2.3.0 + optionalDependencies: + '@types/node': 20.19.43 + '@vitest/coverage-v8': 4.1.12(vitest@4.1.12) + jsdom: 26.1.0(supports-color@7.2.0) + transitivePeerDependencies: + - msw + + vscode-jsonrpc@9.0.3: {} + + vscode-languageserver-protocol@3.18.4: + dependencies: + vscode-jsonrpc: 9.0.3 + vscode-languageserver-types: 3.18.4 + + vscode-languageserver-textdocument@1.0.16: {} + + vscode-languageserver-types@3.18.4: {} + + vscode-languageserver@10.1.2: + dependencies: + vscode-languageserver-protocol: 3.18.4 + + vue-component-type-helpers@3.3.11: {} + + vue-demi@0.14.10(vue@3.5.44(typescript@5.3.3)): + dependencies: + vue: 3.5.44(typescript@5.3.3) + + vue-dompurify-html@4.1.4(vue@3.5.44(typescript@5.3.3)): + dependencies: + dompurify: 3.4.17 + vue: 3.5.44(typescript@5.3.3) + vue-demi: 0.14.10(vue@3.5.44(typescript@5.3.3)) + transitivePeerDependencies: + - '@vue/composition-api' + + vue-eslint-parser@9.4.3(eslint@8.57.1(supports-color@7.2.0))(supports-color@7.2.0): + dependencies: + debug: 4.3.7(supports-color@7.2.0) + eslint: 8.57.1(supports-color@7.2.0) + eslint-scope: 7.2.2 + eslint-visitor-keys: 3.4.3 + espree: 9.6.1 + esquery: 1.6.0 + lodash: 4.18.1 + semver: 7.6.3 + transitivePeerDependencies: + - supports-color + + vue-i18n@9.14.5(vue@3.5.44(typescript@5.3.3)): + dependencies: + '@intlify/core-base': 9.14.5 + '@intlify/shared': 9.14.5 + '@vue/devtools-api': 6.6.4 + vue: 3.5.44(typescript@5.3.3) + + vue-router@4.4.5(vue@3.5.44(typescript@5.3.3)): + dependencies: + '@vue/devtools-api': 6.6.4 + vue: 3.5.44(typescript@5.3.3) + + vue-template-compiler@2.7.16: + dependencies: + de-indent: 1.0.2 + he: 1.2.0 + + vue-tsc-files@0.0.6(typescript@5.3.3): + dependencies: + typescript: 5.3.3 + vue-tsc: 1.0.24(typescript@5.3.3) + + vue-tsc@1.0.24(typescript@5.3.3): + dependencies: + '@volar/vue-language-core': 1.0.24 + '@volar/vue-typescript': 1.0.24(typescript@5.3.3) + typescript: 5.3.3 + + vue-tsc@1.8.27(typescript@5.3.3): + dependencies: + '@volar/typescript': 1.11.1(typescript@5.3.3) + '@vue/language-core': 1.8.27(typescript@5.3.3) + semver: 7.6.3 + typescript: 5.3.3 + + vue-types@5.1.3(vue@3.5.44(typescript@5.3.3)): + dependencies: + is-plain-object: 5.0.0 + optionalDependencies: + vue: 3.5.44(typescript@5.3.3) + + vue3-print-nb@0.1.4(typescript@5.3.3): + dependencies: + vue: 3.5.44(typescript@5.3.3) + transitivePeerDependencies: + - typescript + + vue3-signature@0.2.4(vue@3.5.44(typescript@5.3.3)): + dependencies: + default-passive-events: 2.0.0 + signature_pad: 3.0.0-beta.4 + vue: 3.5.44(typescript@5.3.3) + + vue@3.5.44(typescript@5.3.3): + dependencies: + '@vue/compiler-dom': 3.5.44 + '@vue/compiler-sfc': 3.5.44 + '@vue/runtime-dom': 3.5.44 + '@vue/server-renderer': 3.5.44 + '@vue/shared': 3.5.44 + optionalDependencies: + typescript: 5.3.3 + + vuedraggable@4.1.0(vue@3.5.44(typescript@5.3.3)): + dependencies: + sortablejs: 1.14.0 + vue: 3.5.44(typescript@5.3.3) + + w3c-keyname@2.2.8: {} + + w3c-xmlserializer@5.0.0: + dependencies: + xml-name-validator: 5.0.0 + + wangeditor@4.7.15: + dependencies: + '@babel/runtime': 7.29.10 + '@babel/runtime-corejs3': 7.29.10 + tslib: 2.8.1 + + web-storage-cache@1.1.1: {} + + webidl-conversions@3.0.1: {} + + webidl-conversions@7.0.0: {} + + webpack-virtual-modules@0.6.2: {} + + whatwg-encoding@3.1.1: + dependencies: + iconv-lite: 0.6.3 + + whatwg-mimetype@4.0.0: {} + + whatwg-url@14.1.1: + dependencies: + tr46: 5.0.0 + webidl-conversions: 7.0.0 + + whatwg-url@5.0.0: + dependencies: + tr46: 0.0.3 + webidl-conversions: 3.0.1 + + which-module@2.0.1: {} + + which@1.3.1: + dependencies: + isexe: 2.0.0 + + which@2.0.2: + dependencies: + isexe: 2.0.0 + + why-is-node-running@2.3.0: + dependencies: + siginfo: 2.0.0 + stackback: 0.0.2 + + wildcard@1.1.2: {} + + word-wrap@1.2.5: {} + + wrap-ansi@6.2.0: + dependencies: + ansi-styles: 4.3.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 + + wrap-ansi@7.0.0: + dependencies: + ansi-styles: 4.3.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 + + wrap-ansi@8.1.0: + dependencies: + ansi-styles: 6.2.1 + string-width: 5.1.2 + strip-ansi: 7.2.0 + + wrap-ansi@9.0.0: + dependencies: + ansi-styles: 6.2.1 + string-width: 7.2.0 + strip-ansi: 7.2.0 + + wrappy@1.0.2: {} + + write-file-atomic@5.0.1: + dependencies: + imurmurhash: 0.1.4 + signal-exit: 4.1.0 + + ws@8.22.0: {} + + xml-js@1.6.11: + dependencies: + sax: 1.4.1 + + xml-name-validator@4.0.0: {} + + xml-name-validator@5.0.0: {} + + xml-naming@0.3.0: {} + + xmlchars@2.2.0: {} + + y18n@4.0.3: {} + + y18n@5.0.8: {} + + yallist@3.1.1: {} + + yaml-eslint-parser@1.2.3: + dependencies: + eslint-visitor-keys: 3.4.3 + lodash: 4.18.1 + yaml: 2.9.1 + + yaml@2.9.1: {} + + yargs-parser@18.1.3: + dependencies: + camelcase: 5.3.1 + decamelize: 1.2.0 + + yargs-parser@21.1.1: {} + + yargs@15.4.1: + dependencies: + cliui: 6.0.0 + decamelize: 1.2.0 + find-up: 4.1.0 + get-caller-file: 2.0.5 + require-directory: 2.1.1 + require-main-filename: 2.0.0 + set-blocking: 2.0.0 + string-width: 4.2.3 + which-module: 2.0.1 + y18n: 4.0.3 + yargs-parser: 18.1.3 + + yargs@17.7.2: + dependencies: + cliui: 8.0.1 + escalade: 3.2.0 + get-caller-file: 2.0.5 + require-directory: 2.1.1 + string-width: 4.2.3 + y18n: 5.0.8 + yargs-parser: 21.1.1 + + yocto-queue@0.1.0: {} + + yocto-queue@1.1.1: {} + + zeebe-bpmn-moddle@1.7.0: {} + + zrender@5.6.0: + dependencies: + tslib: 2.3.0 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml new file mode 100644 index 0000000..1baa23d --- /dev/null +++ b/pnpm-workspace.yaml @@ -0,0 +1,56 @@ +allowBuilds: + '@parcel/watcher': true + '@swc/core': true + core-js: true + core-js-pure: true + es5-ext: true + esbuild: true + vue-demi: true + +# 安全修复:将存在已知漏洞的传递依赖提升到修复版本(审计:pnpm audit --registry=https://registry.npmjs.org) +overrides: + 'form-data@4': '^4.0.6' + '@xmldom/xmldom@<0.8.15': '^0.8.15' + 'brace-expansion@1': '^1.1.21' + 'brace-expansion@2': '^2.1.7' + 'glob@10': '^10.5.0' + 'js-yaml@4': '^4.3.2' + 'minimatch@3': '^3.1.5' + 'minimatch@5': '^5.1.9' + 'minimatch@9': '^9.0.9' + 'rollup@2': '^2.80.0' + 'rollup@4': '4.65.0' + 'svgo@3': '^3.3.5' + 'flatted@3': '^3.4.4' + 'picomatch@2': '^2.3.2' + 'picomatch@4': '^4.0.7' + 'lodash@4': '^4.18.1' + 'defu@6': '^6.1.7' + 'postcss@8': '8.5.31' + 'immutable@5': '^5.1.9' + 'linkify-it@5': '^5.0.2' + 'fast-uri@3': '^3.1.9' + 'nanoid@3': '^3.3.20' + 'nanoid@5': '^5.1.16' + 'browserslist@4': '4.29.4' + 'source-map-js@1': '^1.2.2' + 'dompurify@3': '^3.4.17' + '@purge-icons/core>axios': '^0.34.0' + 'follow-redirects@1': '^1.16.2' + 'yaml@2': '^2.9.1' + 'ajv@6': '^6.15.0' + 'ajv@8': '^8.20.0' + 'prismjs@1': '^1.30.0' + 'katex@0.16': '^0.16.47' + 'postcss-selector-parser@6': '^6.1.5' + 'postcss-selector-parser@7': '^7.1.7' + 'colord@2': '^2.10.0' + '@babel/runtime@7': '^7.29.10' + '@babel/helpers@7': '^7.29.10' + '@babel/runtime-corejs3@7': '^7.29.10' + 'qs@6': '6.16.1' + '@intlify/shared@9': '^9.14.5' + 'vite-plugin-top-level-await>uuid': '^11.1.1' + '@babel/core@7': '^7.29.1' + 'min-document@2': '^2.19.1' + 'electron-to-chromium@1': '1.5.464' diff --git a/postcss.config.js b/postcss.config.js new file mode 100644 index 0000000..961986e --- /dev/null +++ b/postcss.config.js @@ -0,0 +1,5 @@ +module.exports = { + plugins: { + autoprefixer: {} + } +} diff --git a/prettier.config.js b/prettier.config.js new file mode 100644 index 0000000..b014bbf --- /dev/null +++ b/prettier.config.js @@ -0,0 +1,22 @@ +module.exports = { + printWidth: 100, // 每行代码长度(默认80) + tabWidth: 2, // 每个tab相当于多少个空格(默认2)ab进行缩进(默认false) + useTabs: false, // 是否使用tab + semi: false, // 声明结尾使用分号(默认true) + vueIndentScriptAndStyle: false, + singleQuote: true, // 使用单引号(默认false) + quoteProps: 'as-needed', + bracketSpacing: true, // 对象字面量的大括号间使用空格(默认true) + trailingComma: 'none', // 多行使用拖尾逗号(默认none) + jsxSingleQuote: false, + // 箭头函数参数括号 默认avoid 可选 avoid| always + // avoid 能省略括号的时候就省略 例如x => x + // always 总是有括号 + arrowParens: 'always', + insertPragma: false, + requirePragma: false, + proseWrap: 'never', + htmlWhitespaceSensitivity: 'strict', + endOfLine: 'auto', + rangeStart: 0 +} diff --git a/public/favicon.ico b/public/favicon.ico new file mode 100644 index 0000000..3ffe619 Binary files /dev/null and b/public/favicon.ico differ diff --git a/public/favicon.png b/public/favicon.png new file mode 100644 index 0000000..f185e1c Binary files /dev/null and b/public/favicon.png differ diff --git a/public/logo.gif b/public/logo.gif new file mode 100644 index 0000000..fdbd32c Binary files /dev/null and b/public/logo.gif differ diff --git a/src/App.vue b/src/App.vue new file mode 100644 index 0000000..44a7762 --- /dev/null +++ b/src/App.vue @@ -0,0 +1,68 @@ + + + diff --git a/src/api/asset/index.ts b/src/api/asset/index.ts new file mode 100644 index 0000000..4449dbb --- /dev/null +++ b/src/api/asset/index.ts @@ -0,0 +1,271 @@ +import request from '@/config/axios' + +/** 资产字典类型,与后端 sql/dm/143_asset.sql 一致 */ +export const ASSET_DICT = { + TYPE: 'asset_type', + STATUS: 'asset_status', + CATEGORY: 'asset_category', + UNIT: 'asset_unit', + SOURCE: 'asset_source', + DEPRECIATION_METHOD: 'asset_depreciation_method', + INVENTORY_RESULT: 'asset_inventory_result', + BILL_TYPE: 'asset_bill_type' +} as const + +/** 审批状态 */ +export const ASSET_BILL_STATUS_OPTIONS = [ + { label: '审批中', value: 1 }, + { label: '审批通过', value: 2 }, + { label: '审批不通过', value: 3 }, + { label: '已取消', value: 4 } +] + +/** 同步任务状态 */ +export const ASSET_SYNC_STATUS_OPTIONS = [ + { label: '待执行', value: 0 }, + { label: '执行中', value: 1 }, + { label: '成功', value: 2 }, + { label: '失败', value: 3 }, + { label: '业务失败', value: 4 }, + { label: '暂不执行', value: 9 } +] + +/** 同步动作 */ +export const ASSET_SYNC_ACTION_OPTIONS = [ + { label: '致远单据', value: 'SEEYON_BILL' }, + { label: '金蝶资产卡片', value: 'KD_ASSET_CARD' }, + { label: '金蝶报销单', value: 'KD_REIMBURSE' }, + { label: '金蝶报销单附件', value: 'KD_ATTACHMENT' }, + { label: '金蝶清理单', value: 'KD_CLEAR' } +] + +/** 资产来源 */ +export const ASSET_ORIGIN_OPTIONS = [ + { label: '财开云入库', value: 1 }, + { label: '致远导入', value: 2 } +] + +/** 日期显示:后端 LocalDate 序列化为 [年, 月, 日] 数组,也兼容 yyyy-MM-dd 文本 */ +export const formatAssetDate = (value?: unknown): string => { + if (Array.isArray(value) && value.length >= 3) { + return `${value[0]}-${String(value[1]).padStart(2, '0')}-${String(value[2]).padStart(2, '0')}` + } + return value ? String(value) : '-' +} + +/** 资产卡片 */ +export interface AssetCardVO { + id: number + assetNo: string + assetName: string + assetType: string + categoryCode?: string + spec?: string + unitCode?: string + quantity?: number + originalValue?: number + taxAmount?: number + taxIncludedValue?: number + sourceCode?: string + depreciationMethod?: string + usefulPeriods?: number + ownerOrgId?: number + ownerOrgName?: string + useDeptId?: number + useDeptName?: string + useUserId?: number + useUserName?: string + manageDeptId?: number + manageDeptName?: string + managerUserId?: number + managerUserName?: string + location?: string + supplierName?: string + acquireDate?: string + warrantyStart?: string + warrantyEnd?: string + invoiceNo?: string + status: number + lockBillId?: number + sourceBillId?: number + remark?: string + seeyonCardId?: string + kingdeeCardNo?: string + origin: number + createTime?: number | string +} + +/** 资产变动流水 */ +export interface AssetCardLogVO { + id: number + cardId: number + billId?: number + billType: string + operatorName?: string + changeTime: number | string + beforeJson?: string + afterJson?: string + remark?: string +} + +/** 资产单据明细 */ +export interface AssetBillItemVO { + id: number + seq: number + cardId?: number + assetNo?: string + assetName?: string + dataJson?: string + targetDeptId?: number + targetUserId?: number + targetLocation?: string + result?: string + remark?: string +} + +/** 同步任务 */ +export interface AssetSyncTaskVO { + id: number + billId: number + cardId?: number + target: string + action: string + dependsOn?: number + status: number + attemptCount: number + nextRetryTime?: number | string + externalNo?: string + requestDigest?: string + responseBody?: string + errorMessage?: string + createTime?: number | string + updateTime?: number | string +} + +/** 资产单据 */ +export interface AssetBillVO { + id: number + billType: string + billNo?: string + processInstanceId?: string + processDefinitionKey?: string + status: number + applyUserName?: string + billDate?: string + summary?: string + assetType?: string + refBillId?: number + extJson?: string + finishTime?: number | string + syncStatus: number + createTime?: number | string + items?: AssetBillItemVO[] + syncTasks?: AssetSyncTaskVO[] +} + +/** 致远导入结果 */ +export interface AssetSeeyonImportVO { + total: number + created: number + updated: number + skipped: number + unmatchedDepts: string[] + unmatchedUsers: string[] + unmatchedCategories: string[] +} + +export interface AssetSupplierVO { + id?: number + name: string + contact?: string + phone?: string + bankName?: string + bankAccount?: string + address?: string + kingdeeSupplierNo?: string + status?: number + remark?: string + createTime?: number | string +} + +export interface AssetNameLibVO { + id?: number + assetType?: string + categoryCode?: string + name: string + status?: number + createTime?: number | string +} + +export interface AssetCodeMappingVO { + id?: number + dictType: string + dictValue: string + scope?: string + seeyonValue?: string + seeyonName?: string + kingdeeValue?: string + remark?: string +} + +export interface AssetOrgMappingVO { + id?: number + deptId?: number + deptName?: string + kind: string + kingdeeOrgNo?: string + kingdeeAccountOrgNo?: string + kingdeeDeptNo?: string + kingdeeStoreplaceNo?: string + seeyonId?: string + remark?: string +} + +/** 金蝶卡片(金蝶查询接口实时取回) */ +export interface AssetKingdeeCardVO { + number?: string + billno?: string + orgNumber?: string + assetcatNumber?: string + assetname?: string + billstatus?: string + bizstatus?: string + realaccountdate?: string + originalVal?: number + accumDepre?: number + netWorth?: number + preResidualVal?: number +} + +export const getCardPage = (params: any) => request.get({ url: '/asset/card/page', params }) +export const getCard = (id: number) => request.get({ url: '/asset/card/get', params: { id } }) +export const getCardLogList = (id: number) => + request.get({ url: '/asset/card/log-list', params: { id } }) +export const getKingdeeCard = (id: number) => + request.get({ url: '/asset/card/kingdee-card', params: { id }, timeout: 60000 }) +export const updateCard = (data: any) => request.put({ url: '/asset/card/update', data }) +export const importSeeyon = () => + request.post({ url: '/asset/card/import-seeyon', timeout: 600000 }) + +export const getBillPage = (params: any) => request.get({ url: '/asset/bill/page', params }) +export const getBill = (id: number) => request.get({ url: '/asset/bill/get', params: { id } }) + +export const getSyncTaskPage = (params: any) => request.get({ url: '/asset/sync-task/page', params }) +export const retrySyncTask = (id: number) => request.put({ url: '/asset/sync-task/retry?id=' + id }) + +export const getSupplierPage = (params: any) => request.get({ url: '/asset/base/supplier/page', params }) +export const saveSupplier = (data: AssetSupplierVO) => request.post({ url: '/asset/base/supplier/save', data }) +export const deleteSupplier = (id: number) => request.delete({ url: '/asset/base/supplier/delete', params: { id } }) +export const getNameLibPage = (params: any) => request.get({ url: '/asset/base/name-lib/page', params }) +export const saveNameLib = (data: AssetNameLibVO) => request.post({ url: '/asset/base/name-lib/save', data }) +export const deleteNameLib = (id: number) => request.delete({ url: '/asset/base/name-lib/delete', params: { id } }) +export const getCodeMappingList = (dictType?: string) => + request.get({ url: '/asset/base/code-mapping/list', params: { dictType } }) +export const saveCodeMapping = (data: AssetCodeMappingVO) => + request.post({ url: '/asset/base/code-mapping/save', data }) +export const deleteCodeMapping = (id: number) => + request.delete({ url: '/asset/base/code-mapping/delete', params: { id } }) +export const getOrgMappingList = () => request.get({ url: '/asset/base/org-mapping/list' }) +export const saveOrgMapping = (data: AssetOrgMappingVO) => request.post({ url: '/asset/base/org-mapping/save', data }) +export const deleteOrgMapping = (id: number) => + request.delete({ url: '/asset/base/org-mapping/delete', params: { id } }) diff --git a/src/api/bpm/category/index.ts b/src/api/bpm/category/index.ts new file mode 100644 index 0000000..3ab8d52 --- /dev/null +++ b/src/api/bpm/category/index.ts @@ -0,0 +1,53 @@ +import request from '@/config/axios' + +// BPM 流程分类 VO +export interface CategoryVO { + id: number // 分类编号 + name: string // 分类名 + code: string // 分类标志 + status: number // 分类状态 + sort: number // 分类排序 +} + +// BPM 流程分类 API +export const CategoryApi = { + // 查询流程分类分页 + getCategoryPage: async (params: PageParam) => { + return await request.get({ url: `/bpm/category/page`, params }) + }, + + // 查询流程分类列表 + getCategorySimpleList: async () => { + return await request.get({ url: `/bpm/category/simple-list` }) + }, + + // 查询流程分类详情 + getCategory: async (id: number) => { + return await request.get({ url: `/bpm/category/get?id=` + id }) + }, + + // 新增流程分类 + createCategory: async (data: CategoryVO) => { + return await request.post({ url: `/bpm/category/create`, data }) + }, + + // 修改流程分类 + updateCategory: async (data: CategoryVO) => { + return await request.post({ url: `/bpm/category/update`, data }) + }, + + // 批量修改流程分类的排序 + updateCategorySortBatch: async (ids: number[]) => { + return await request.post({ + url: `/bpm/category/update-sort-batch`, + params: { + ids: ids.join(',') + } + }) + }, + + // 删除流程分类 + deleteCategory: async (id: number) => { + return await request.post({ url: `/bpm/category/delete?id=` + id }) + } +} diff --git a/src/api/bpm/definition/index.ts b/src/api/bpm/definition/index.ts new file mode 100644 index 0000000..5cc9583 --- /dev/null +++ b/src/api/bpm/definition/index.ts @@ -0,0 +1,29 @@ +import request from '@/config/axios' + +/** 填写页传 forStart,详情读取同时校验当前组织的发起权限。 */ +export const getProcessDefinition = async (id?: string, key?: string, forStart = false) => { + return await request.get({ + url: '/bpm/process-definition/get', + params: { id, key, forStart } + }) +} + +export const getProcessDefinitionPage = async (params) => { + return await request.get({ + url: '/bpm/process-definition/page', + params + }) +} + +export const getProcessDefinitionList = async (params) => { + return await request.get({ + url: '/bpm/process-definition/list', + params + }) +} + +export const getSimpleProcessDefinitionList = async () => { + return await request.get({ + url: '/bpm/process-definition/simple-list' + }) +} diff --git a/src/api/bpm/form/index.ts b/src/api/bpm/form/index.ts new file mode 100644 index 0000000..e4b3c6c --- /dev/null +++ b/src/api/bpm/form/index.ts @@ -0,0 +1,61 @@ +import request from '@/config/axios' +import type { FormStorageSetting } from '@/api/bpm/formData' + +export type FormVO = { + id: number + name: string + conf: string + fields: string[] + status: number + remark: string + createTime: string + storageSetting?: FormStorageSetting // 数据入库配置 +} + +/** 保存模板时只提交业务配置,不携带来源系统的审计字段。 */ +export type FormSaveVO = Omit & { id?: number } + +// 创建工作流的表单定义 +export const createForm = async (data: FormSaveVO) => { + return await request.post({ + url: '/bpm/form/create', + data: data + }) +} + +// 更新工作流的表单定义 +export const updateForm = async (data: FormSaveVO) => { + return await request.post({ + url: '/bpm/form/update', + data: data + }) +} + +// 删除工作流的表单定义 +export const deleteForm = async (id: number) => { + return await request.post({ + url: '/bpm/form/delete?id=' + id + }) +} + +// 获得工作流的表单定义 +export const getForm = async (id: number) => { + return await request.get({ + url: '/bpm/form/get?id=' + id + }) +} + +// 获得工作流的表单定义分页 +export const getFormPage = async (params) => { + return await request.get({ + url: '/bpm/form/page', + params + }) +} + +// 获得动态表单的精简列表 +export const getFormSimpleList = async () => { + return await request.get({ + url: '/bpm/form/simple-list' + }) +} diff --git a/src/api/bpm/formData/index.ts b/src/api/bpm/formData/index.ts new file mode 100644 index 0000000..3da0ab5 --- /dev/null +++ b/src/api/bpm/formData/index.ts @@ -0,0 +1,39 @@ +import request from '@/config/axios' + +/** 表单数据入库配置:是否启用、对应数据表。 */ +export interface FormStorageSetting { + enable: boolean + tableName?: string +} + +/** 控件对应的数据表字段,保存在表单字段规则的 tableColumn 中。 */ +export interface FormTableColumnSetting { + column?: string // 数据表字段名 +} + +/** 可选的数据表。 */ +export interface FormTable { + tableName: string + comment?: string +} + +/** 数据表字段。 */ +export interface FormTableColumn { + name: string + comment?: string + typeName: string + category: 'text' | 'number' | 'datetime' | 'boolean' | 'other' + size?: number + nullable: boolean + hasDefault: boolean + primaryKey: boolean + autoIncrement: boolean + system: boolean +} + +export const getTableList = (): Promise => + request.get({ url: '/bpm/form-data/table-list' }) + +/** 获得数据表字段。 */ +export const getTableColumns = (tableName: string): Promise => + request.get({ url: '/bpm/form-data/table-columns', params: { tableName } }) diff --git a/src/api/bpm/formNumbering.ts b/src/api/bpm/formNumbering.ts new file mode 100644 index 0000000..002f114 --- /dev/null +++ b/src/api/bpm/formNumbering.ts @@ -0,0 +1,5 @@ +import request from '@/config/axios' + +/** 只查询预计编号,不提前占号,提交时由后端加锁重新核定。 */ +export const getNumberingPreview = (numberingType: string): Promise => + request.get({ url: '/bpm/process-instance/numbering-preview', params: { numberingType } }) diff --git a/src/api/bpm/httpCallLog/index.ts b/src/api/bpm/httpCallLog/index.ts new file mode 100644 index 0000000..40fbde9 --- /dev/null +++ b/src/api/bpm/httpCallLog/index.ts @@ -0,0 +1,62 @@ +import request from '@/config/axios' + +/** 流程外部接口调用日志 */ +export interface HttpCallLogVO { + id: number + processInstanceId?: string + processDefinitionKey?: string + processDefinitionName?: string + taskDefinitionKey?: string + callSource: number + requestUrl: string + requestHeaders?: string + requestBody?: string + responseStatus?: number + responseBody?: string + status: number + attemptCount: number + maxAttempts: number + nextRetryTime?: number | string + durationMs?: number + errorMessage?: string + retryTime?: number | string + createTime?: number | string + retryable?: boolean +} + +export interface HttpCallLogPageReqVO extends PageParam { + processInstanceId?: string + processDefinitionName?: string + requestUrl?: string + callSource?: number + status?: number + createTime?: string[] +} + +export const HTTP_CALL_STATUS = { PENDING: 0, SENDING: 1, SUCCESS: 2, FAILED: 3, BUSINESS_FAILED: 4 } as const + +export const HTTP_CALL_SOURCE_OPTIONS = [ + { label: '流程前置通知', value: 1 }, + { label: '流程后置通知', value: 2 }, + { label: '任务前置通知', value: 3 }, + { label: '任务后置通知', value: 4 }, + { label: '触发器请求', value: 5 }, + { label: '触发器回调', value: 6 }, + { label: '任务监听器', value: 7 } +] + +export const HTTP_CALL_STATUS_OPTIONS = [ + { label: '待重试', value: HTTP_CALL_STATUS.PENDING }, + { label: '发送中', value: HTTP_CALL_STATUS.SENDING }, + { label: '成功', value: HTTP_CALL_STATUS.SUCCESS }, + { label: '失败', value: HTTP_CALL_STATUS.FAILED }, + { label: '业务失败', value: HTTP_CALL_STATUS.BUSINESS_FAILED } +] + +// 分页查询调用日志 +export const getHttpCallLogPage = (params: HttpCallLogPageReqVO): Promise> => + request.get({ url: '/bpm/http-call-log/page', params }) + +// 手动重试,返回重试后的记录 +export const retryHttpCall = (id: number): Promise => + request.post({ url: '/bpm/http-call-log/retry?id=' + id }) diff --git a/src/api/bpm/leave/index.ts b/src/api/bpm/leave/index.ts new file mode 100644 index 0000000..4f374b2 --- /dev/null +++ b/src/api/bpm/leave/index.ts @@ -0,0 +1,27 @@ +import request from '@/config/axios' + +export type LeaveVO = { + id: number + status: number + type: number + reason: string + processInstanceId: string + startTime: string + endTime: string + createTime: string +} + +// 创建请假申请 +export const createLeave = async (data: LeaveVO) => { + return await request.post({ url: '/bpm/oa/leave/create', data: data }) +} + +// 获得请假申请 +export const getLeave = async (id: number) => { + return await request.get({ url: '/bpm/oa/leave/get?id=' + id }) +} + +// 获得请假申请分页 +export const getLeavePage = async (params: PageParam) => { + return await request.get({ url: '/bpm/oa/leave/page', params }) +} diff --git a/src/api/bpm/ledger/index.ts b/src/api/bpm/ledger/index.ts new file mode 100644 index 0000000..29afffe --- /dev/null +++ b/src/api/bpm/ledger/index.ts @@ -0,0 +1,167 @@ +import request from '@/config/axios' + +/** 自建表字段 */ +export interface LedgerColumn { + columnName: string + typeName?: string + category?: string + comment?: string + displayName: string + available: boolean + listVisible: boolean + sortNo: number + sortable: boolean +} + +/** 台账筛选项 */ +export interface LedgerFilter { + column: string + label: string + category: string + mode: 'like' | 'eq' | 'range' + dictType?: string + options?: { label: string; value: string | number | boolean }[] +} + +export interface LedgerMeta { + title: string + columns: LedgerColumn[] + filters: LedgerFilter[] + exportable: boolean +} + +export interface LedgerRow { + id: string + processInstanceId?: string + startUserName?: string + createTime?: number | string + values: Record +} + +export interface LedgerDetail { + row: LedgerRow + columns: LedgerColumn[] +} + +export interface LedgerPageReq { + menuCode: string + pageNo?: number + pageSize?: number + filters?: Record + sortColumn?: string + sortOrder?: string +} + +// 获得台账配置 +export const getLedgerMeta = (menuCode: string): Promise => + request.get({ url: '/bpm/ledger/view/meta', params: { menuCode } }) + +// 分页查询台账 +export const getLedgerPage = (data: LedgerPageReq): Promise> => + request.post({ url: '/bpm/ledger/view/page', data }) + +// 查询台账详情 +export const getLedgerDetail = (menuCode: string, id: string): Promise => + request.get({ url: '/bpm/ledger/view/get', params: { menuCode, id } }) + +// 查询审批过程 +export const getLedgerApproval = (menuCode: string, id: string): Promise => + request.get({ url: '/bpm/ledger/view/approval', params: { menuCode, id } }) + +// 导出台账 +export const exportLedger = (data: LedgerPageReq) => + request.download({ url: '/bpm/ledger/view/export', method: 'POST', data }) + +/** 自建表登记 */ +export interface LedgerRegistry { + id: number + applicationId: number + funcCode: string + funcName: string + tableName: string + status: number + tableProblem?: string +} + +export interface LedgerMenuOption { + id: number + funcName: string + tableName: string + columns: LedgerColumn[] +} + +export interface LedgerFilterColumn { + column: string + mode: string +} + +export interface LedgerMenuBinding { + registryId: number + menuCode: string + filterColumns: LedgerFilterColumn[] +} + +// 分页查询自建表登记 +export const getRegistryPage = (params: PageParam & Record): Promise> => + request.get({ url: '/bpm/ledger/registry/page', params }) + +export interface LedgerTableOption { + tableName: string + comment?: string + problem?: string +} + +// 获得可登记的数据库表 +export const getRegistryTableOptions = (applicationId: number): Promise => + request.get({ url: '/bpm/ledger/registry/table-options', params: { applicationId } }) + +// 登记自建表 +export const createRegistry = (data: { + applicationId: number + tableName: string + funcName: string + funcCode: string +}): Promise => request.post({ url: '/bpm/ledger/registry/create', data }) + +// 获得字段配置 +export const getRegistryColumns = (registryId: number): Promise => + request.get({ url: '/bpm/ledger/registry/columns', params: { registryId } }) + +// 保存字段配置 +export const saveRegistryColumns = (registryId: number, columns: LedgerColumn[]) => + request.post({ url: '/bpm/ledger/registry/columns/save', data: { registryId, columns } }) + +// 获得可绑定的自建表 +export const getMenuOptions = (applicationId: number): Promise => + request.get({ url: '/bpm/ledger/menu/options', params: { applicationId } }) + +// 获得菜单绑定,普通菜单返回空 +export const getMenuBinding = (menuId: number): Promise => + request.get({ url: '/bpm/ledger/menu/get', params: { menuId } }) + +// 保存自建表列表菜单 +export const saveLedgerMenu = (data: Record): Promise => + request.post({ url: '/bpm/ledger/menu/save', data }) + +// 获得表单对应的台账入口 +export const getLedgerEntries = (formId: number): Promise<{ menuCode: string }[]> => + request.get({ url: '/bpm/ledger/view/entries', params: { formId } }) + +// 获得流程实例对应的台账记录入口 +export const getLedgerProcessEntry = ( + processInstanceId: string +): Promise<{ menuCode: string; id: string; tableName: string } | null> => + request.get({ url: '/bpm/ledger/view/process-entry', params: { processInstanceId } }) + +export interface LedgerWriteInfo { + funcName: string + status: number + statusName: string + lastTryTime?: string | number + failReason?: string + canRetry: boolean +} + +// 手动重试写入自建表 +export const retryLedgerWrite = (processInstanceId: string) => + request.post({ url: '/bpm/ledger/write/retry', params: { processInstanceId } }) diff --git a/src/api/bpm/model/index.ts b/src/api/bpm/model/index.ts new file mode 100644 index 0000000..66dfff8 --- /dev/null +++ b/src/api/bpm/model/index.ts @@ -0,0 +1,210 @@ +import request from '@/config/axios' +import type { DeptVO } from '@/api/system/dept' +import type { UserVO } from '@/api/system/user' + +/** 发起范围:历史数据不设置此字段,明确切换后使用公司范围与额外人员并集。 */ +export enum BpmStartScopeMode { + ALL = 0, + SPECIFIED = 2 +} + +/** 发起范围配置可跨公司选人,仅返回选项展示所需信息。 */ +export interface ModelStartScopeOptions { + departments: DeptVO[] + users: Pick[] + posts: { id: number; name: string; code: string }[] +} + +export const getModelStartScopeOptions = (): Promise => + request.get({ url: '/bpm/model/start-scope-options' }) + +export type ProcessDefinitionVO = { + id: string + version: number + deploymentTIme: string + suspensionState: number + formType?: number + formCustomCreatePath?: string +} + +export type ModelVO = { + id: number + formName: string + key: string + name: string + description: string + category: string + formType: number + formId: number + formCustomCreatePath: string + formCustomViewPath: string + processDefinition: ProcessDefinitionVO + status: number + remark: string + createTime: string + bpmnXml: string + /** 空值沿用历史规则,额外人员仅在新模式下独立于公司范围。 */ + startScopeMode?: BpmStartScopeMode | null + applicableOrgIds?: number[] + startUserIds?: number[] + startDeptIds?: number[] + /** 指定岗位按当前有效任职动态匹配,与部门、额外人员取并集。 */ + startPostIds?: number[] +} + +export const getModelList = async (name: string | undefined) => { + return await request.get({ url: '/bpm/model/list', params: { name } }) +} + +export const getModel = async (id: string) => { + return await request.get({ url: '/bpm/model/get?id=' + id }) +} + +export const updateModel = async (data: ModelVO) => { + return await request.post({ url: '/bpm/model/update', data: data }) +} + +// 批量修改流程分类的排序 +export const updateModelSortBatch = async (ids: number[]) => { + return await request.post({ + url: `/bpm/model/update-sort-batch`, + params: { + ids: ids.join(',') + } + }) +} + +export const updateModelBpmn = async (data: ModelVO) => { + return await request.post({ url: '/bpm/model/update-bpmn', data: data }) +} + +// 任务状态修改 +export const updateModelState = async (id: number, state: number) => { + const data = { + id: id, + state: state + } + return await request.post({ url: '/bpm/model/update-state', data: data }) +} + +export const createModel = async (data: ModelVO) => { + return await request.post({ url: '/bpm/model/create', data: data }) +} + +export const deleteModel = async (id: number) => { + return await request.post({ url: '/bpm/model/delete?id=' + id }) +} + +export const deployModel = async (id: number) => { + return await request.post({ url: '/bpm/model/deploy?id=' + id }) +} + +/** 批量发布等待时间:几十个流程由后端统一处理,单独放宽默认的 30 秒超时。 */ +const MODEL_BATCH_DEPLOY_TIMEOUT = 10 * 60 * 1000 + +/** 批量发布中单个模型的处理结果。 */ +export interface ModelDeployBatchResultVO { + id: string + success: boolean + errorMessage?: string +} + +/** 一次提交全部模型编号,由后端独立发布各流程并汇总结果。 */ +export const deployModelBatch = async (ids: string[]): Promise => { + return await request.post({ + url: '/bpm/model/deploy-batch', + data: { ids }, + timeout: MODEL_BATCH_DEPLOY_TIMEOUT + }) +} + +/** 模型清理结果:清理前后端会自动归档,归档文件可下载 */ +export interface ModelCleanRespVO { + /** 清理的流程实例数量 */ + cleanedCount: number + archiveFileId?: number + archiveFileName?: string + archiveUrl?: string +} + +/** 清理模型下的流程数据,仅超级管理员可用 */ +export const cleanModel = async (id: number): Promise => { + return await request.post({ url: '/bpm/model/clean?id=' + id }) +} + +/** 流程设计器审批角色候选项 */ +export interface CandidateRoleVO { + id: number + name: string + code?: string +} + +/** 流程设计器审批角色候选项:协同办公应用(CK_OA)内已启用的角色,有流程模型权限即可查询,不受应用管理范围限制 */ +export const getCandidateRoleList = async (): Promise => { + return await request.get({ url: '/bpm/model/candidate-roles' }) +} + +// ========== 流程批量导出与导入 ========== + +/** 流程导出文件:导出接口返回、导入时原样回传 */ +export interface ModelTransferFileVO { + format: string + version: number + exportTime?: string + models: { name: string; key: string; categoryCode?: string; categoryName?: string; [key: string]: unknown }[] +} + +/** 导入处理方式;category_required 表示分类未匹配,需手动选择。 */ +export type ModelImportAction = 'create' | 'conflict' | 'used' | 'category_required' + +/** 流程导入预览行 */ +export interface ModelImportPreviewVO { + sourceKey: string + sourceCategoryCode?: string + sourceCategoryName?: string + category?: string + categoryName?: string + name: string + key: string + formName?: string + action: ModelImportAction +} + +/** 流程导入请求 */ +export interface ModelImportReqVO { + /** 兼容旧调用方统一指定分类,新界面按文件分类自动匹配。 */ + category?: string + /** 未匹配分类的手动选择:原流程标识 -> 目标分类编码。 */ + categoryMappings?: Record + file: ModelTransferFileVO + overwriteNames?: string[] + /** 按原标识选择覆盖,区分不同分类下的同名流程。 */ + overwriteKeys?: string[] +} + +/** 流程导入结果 */ +export interface ModelImportRespVO { + createdNames: string[] + overwrittenNames: string[] + skippedNames: string[] +} + +/** 批量导出流程(含流程设置、流程设计与流程表单) */ +export const exportModels = async ( + ids: string[], + options?: { keyPrefix: string; namePrefix: string } +): Promise => { + return await request.get({ url: '/bpm/model/export', params: { ids: ids.join(','), ...options } }) +} + +/** 预览批量导入:自动匹配分类,未匹配的待选择;在各自目标分类内判断重名,不写入数据。 */ +export const previewImportModels = async ( + data: ModelImportReqVO +): Promise => { + return await request.post({ url: '/bpm/model/import/preview', data }) +} + +/** 批量导入流程,导入的流程为未发布状态 */ +export const importModels = async (data: ModelImportReqVO): Promise => { + return await request.post({ url: '/bpm/model/import', data }) +} diff --git a/src/api/bpm/processAudit/index.ts b/src/api/bpm/processAudit/index.ts new file mode 100644 index 0000000..1661912 --- /dev/null +++ b/src/api/bpm/processAudit/index.ts @@ -0,0 +1,86 @@ +import request from '@/config/axios' + +/** 标记当前用户已打开流程详情。 */ +export const markRead = async (processInstanceId: string, taskId?: string) => { + return await request.post({ + url: '/bpm/process-audit/mark-read', + params: { processInstanceId, taskId } + }) +} + +/** 查询流程实例的完整人工操作日志。 */ +export const getOperationLogList = async (processInstanceId: string) => { + return await request.get({ + url: '/bpm/process-audit/operation-log-list', + params: { processInstanceId } + }) +} + +/** 查询流程实例的用户阅读记录。 */ +export const getReadRecordList = async (processInstanceId: string) => { + return await request.get({ + url: '/bpm/process-audit/read-record-list', + params: { processInstanceId } + }) +} + +/** 修订流程变量请求 */ +export interface ReviseVariablesReqVO { + processInstanceId: string + variables: Record + reason: string +} + +/** 修订审批意见请求 */ +export interface ReviseTaskOpinionReqVO { + taskId: string + opinion: string + reason: string +} + +/** 管理员修订流程表单、附件或文件单号对应的变量。 */ +export const reviseVariables = async (data: ReviseVariablesReqVO) => { + return await request.post({ url: '/bpm/process-audit/revise-variables', data }) +} + +/** 管理员修订指定历史任务的审批意见。 */ +export const reviseTaskOpinion = async (data: ReviseTaskOpinionReqVO) => { + return await request.post({ url: '/bpm/process-audit/revise-task-opinion', data }) +} + +/** 审批人修订本人已完成任务的审批意见。 */ +export const reviseOwnTaskOpinion = async (data: ReviseTaskOpinionReqVO) => { + return await request.post({ url: '/bpm/process-audit/revise-own-task-opinion', data }) +} + +/** 管理员挂起运行中的流程实例。 */ +export const suspendProcess = async (processInstanceId: string, reason: string) => { + return await request.post({ + url: '/bpm/process-audit/suspend', + data: { processInstanceId, reason } + }) +} + +/** 管理员恢复已挂起的流程实例。 */ +export const activateProcess = async (processInstanceId: string, reason: string) => { + return await request.post({ + url: '/bpm/process-audit/activate', + data: { processInstanceId, reason } + }) +} + +/** 查询流程应读人员(处理人、抄送人)的阅读情况,未读人员同样返回。 */ +export const getReadStatusList = async (processInstanceId: string) => { + return await request.get({ + url: '/bpm/process-audit/read-status-list', + params: { processInstanceId } + }) +} + +/** 查询流程审计时间线:全部任务、人工操作、催办、首次阅读按时间合并,仅流程管理员可用。 */ +export const getTimeline = async (processInstanceId: string) => { + return await request.get({ + url: '/bpm/process-audit/timeline', + params: { processInstanceId } + }) +} diff --git a/src/api/bpm/processExpression/index.ts b/src/api/bpm/processExpression/index.ts new file mode 100644 index 0000000..e6b68f3 --- /dev/null +++ b/src/api/bpm/processExpression/index.ts @@ -0,0 +1,42 @@ +import request from '@/config/axios' + +// BPM 流程表达式 VO +export interface ProcessExpressionVO { + id: number // 编号 + name: string // 表达式名字 + status: number // 表达式状态 + expression: string // 表达式 +} + +// BPM 流程表达式 API +export const ProcessExpressionApi = { + // 查询BPM 流程表达式分页 + getProcessExpressionPage: async (params: PageParam) => { + return await request.get({ url: `/bpm/process-expression/page`, params }) + }, + + // 查询BPM 流程表达式详情 + getProcessExpression: async (id: number) => { + return await request.get({ url: `/bpm/process-expression/get?id=` + id }) + }, + + // 新增BPM 流程表达式 + createProcessExpression: async (data: ProcessExpressionVO) => { + return await request.post({ url: `/bpm/process-expression/create`, data }) + }, + + // 修改BPM 流程表达式 + updateProcessExpression: async (data: ProcessExpressionVO) => { + return await request.post({ url: `/bpm/process-expression/update`, data }) + }, + + // 删除BPM 流程表达式 + deleteProcessExpression: async (id: number) => { + return await request.post({ url: `/bpm/process-expression/delete?id=` + id }) + }, + + // 导出BPM 流程表达式 Excel + exportProcessExpression: async (params) => { + return await request.download({ url: `/bpm/process-expression/export-excel`, params }) + } +} diff --git a/src/api/bpm/processInstance/index.ts b/src/api/bpm/processInstance/index.ts new file mode 100644 index 0000000..d6b40fe --- /dev/null +++ b/src/api/bpm/processInstance/index.ts @@ -0,0 +1,177 @@ +import request from '@/config/axios' +import { ProcessDefinitionVO } from '@/api/bpm/model' +import { NodeType, CandidateStrategy } from '@/components/SimpleProcessDesignerV2/src/consts' +export type Task = { + id: string + name: string +} + +export type ProcessInstanceVO = { + id: number + name: string + processDefinitionId: string + category: string + result: number + tasks: Task[] + fields: string[] + status: number + remark: string + businessKey: string + createTime: string + endTime: string + processDefinition?: ProcessDefinitionVO +} + +// 用户信息 +export type User = { + id: number + nickname: string + avatar: string + /** 自选审批人来自用户精简接口,用主任职岗位判断即时展示标题。 */ + deptId?: number + postIds?: number[] +} + +// 审批任务信息 +export type ApprovalTaskInfo = { + id: number + ownerUser: User + assigneeUser: User + status: number + reason: string + // 签名文件编号 + signPicFileId?: number + // 签名图片地址(后端已签名的短时地址,历史任务为旧地址),仅用于展示 + signPicUrl: string + // 按请假、出差代理授权代为办理时的委托人,不为空时显示“代” + principalUser?: User + withdrawn?: boolean // 办理后是否已被撤回 + adminSkipped?: boolean // 是否被管理员跳过 +} + +// 审批节点信息 +export type ApprovalNodeInfo = { + id: number + name: string + /** 后端按节点配置及审批人的共同主岗位计算,缺失时回退 name。 */ + displayName?: string + showApproverPost?: boolean + nodeType: NodeType + candidateStrategy?: CandidateStrategy + /** 本次提交即将进入的节点原规则无人,需要由当前办理人选择。 */ + emptyUserSelect?: boolean + /** 空选跳过后可达的原生自选节点,仍需选择审批人。 */ + requiredUserSelect?: boolean + status: number + startTime?: Date + endTime?: Date + processInstanceId?: string + candidateUsers?: User[] + tasks: ApprovalTaskInfo[] +} + +export const getProcessInstanceMyPage = async (params: PageParam) => { + return await request.get({ url: '/bpm/process-instance/my-page', params }) +} + +export const getProcessInstanceManagerPage = async (params: PageParam) => { + return await request.get({ url: '/bpm/process-instance/manager-page', params }) +} + +export const createProcessInstance = async (data) => { + return await request.post({ url: '/bpm/process-instance/create', data: data }) +} + +export const cancelProcessInstanceByStartUser = async (id: number, reason: string) => { + const data = { + id: id, + reason: reason + } + return await request.post({ url: '/bpm/process-instance/cancel-by-start-user', data: data }) +} + +export const cancelProcessInstanceByAdmin = async (id: number, reason: string) => { + const data = { + id: id, + reason: reason + } + return await request.post({ url: '/bpm/process-instance/cancel-by-admin', data: data }) +} + +export const getProcessInstance = async (id: string) => { + return await request.get({ url: '/bpm/process-instance/get?id=' + id }) +} + +export const getProcessInstanceCopyPage = async (params: PageParam) => { + return await request.get({ url: '/bpm/process-instance/copy/page', params }) +} + +/** 获取流程实例的抄送记录(流转记录中展示抄送节点与被抄送人) */ +export const getProcessInstanceCopyListByProcessInstanceId = async (processInstanceId: string) => { + return await request.get({ + url: '/bpm/process-instance/copy/list-by-process-instance-id', + params: { processInstanceId } + }) +} + +/** GET 方式获取审批详情的查询参数:流程变量序列化为 JSON 字符串 */ +export interface ApprovalDetailQueryReqVO { + processDefinitionId?: string + processInstanceId?: string + activityId?: string + taskId?: string + processVariablesStr?: string +} + +/** 查询下一个执行节点的参数 */ +export interface NextApprovalNodesReqVO { + processInstanceId: string + taskId: string + processVariablesStr?: string + selectedAssigneesStr?: string +} + +// 获取审批详情 +export const getApprovalDetail = async (params: ApprovalDetailQueryReqVO) => { + return await request.get({ url: '/bpm/process-instance/get-approval-detail', params }) +} + +/** POST 方式获取审批详情的请求体:流程变量直接以 JSON 对象传递,避免 GET 查询串过长 */ +export interface ApprovalDetailReqVO { + processDefinitionId?: string + processInstanceId?: string + activityId?: string + taskId?: string + processVariables?: Record + selectedAssignees?: Record +} + +// 获取审批详情(POST,发起页按表单值预测审批节点时使用) +export const getApprovalDetailByPost = async (data: ApprovalDetailReqVO) => { + return await request.post({ url: '/bpm/process-instance/get-approval-detail', data }) +} + +// 获取下一个执行的流程节点 +export const getNextApprovalNodes = async (params: NextApprovalNodesReqVO) => { + return await request.get({ url: '/bpm/process-instance/get-next-approval-nodes', params }) +} + +// 管理员获取下一个执行的流程节点(跳过节点时选择自选审批人,不要求是当前审批人) +export const getNextApprovalNodesByAdmin = async (params: NextApprovalNodesReqVO) => { + return await request.get({ url: '/bpm/process-instance/get-next-approval-nodes-by-admin', params }) +} + +// 获取表单字段权限 +export const getFormFieldsPermission = async (params: Record) => { + return await request.get({ url: '/bpm/process-instance/get-form-fields-permission', params }) +} + +// 获取流程实例的 BPMN 模型视图 +export const getProcessInstanceBpmnModelView = async (id: string) => { + return await request.get({ url: '/bpm/process-instance/get-bpmn-model-view?id=' + id }) +} + +// 获取流程实例打印数据 +export const getProcessInstancePrintData = async (id: string) => { + return await request.get({ url: '/bpm/process-instance/get-print-data?processInstanceId=' + id }) +} diff --git a/src/api/bpm/processListener/index.ts b/src/api/bpm/processListener/index.ts new file mode 100644 index 0000000..ac31fb9 --- /dev/null +++ b/src/api/bpm/processListener/index.ts @@ -0,0 +1,40 @@ +import request from '@/config/axios' + +// BPM 流程监听器 VO +export interface ProcessListenerVO { + id: number // 编号 + name: string // 监听器名字 + type: string // 监听器类型 + status: number // 监听器状态 + event: string // 监听事件 + valueType: string // 监听器值类型 + value: string // 监听器值 +} + +// BPM 流程监听器 API +export const ProcessListenerApi = { + // 查询流程监听器分页 + getProcessListenerPage: async (params: PageParam) => { + return await request.get({ url: `/bpm/process-listener/page`, params }) + }, + + // 查询流程监听器详情 + getProcessListener: async (id: number) => { + return await request.get({ url: `/bpm/process-listener/get?id=` + id }) + }, + + // 新增流程监听器 + createProcessListener: async (data: ProcessListenerVO) => { + return await request.post({ url: `/bpm/process-listener/create`, data }) + }, + + // 修改流程监听器 + updateProcessListener: async (data: ProcessListenerVO) => { + return await request.post({ url: `/bpm/process-listener/update`, data }) + }, + + // 删除流程监听器 + deleteProcessListener: async (id: number) => { + return await request.post({ url: `/bpm/process-listener/delete?id=` + id }) + } +} diff --git a/src/api/bpm/processStorage.ts b/src/api/bpm/processStorage.ts new file mode 100644 index 0000000..2c113db --- /dev/null +++ b/src/api/bpm/processStorage.ts @@ -0,0 +1,19 @@ +import request from '@/config/axios' + +/** 入库接口参数。 */ +export interface ProcessStorageParam { + key: string // 参数标识 + label: string // 参数名称 + required: boolean // 是否必须映射表单字段 +} + +/** 入库接口目录项。 */ +export interface ProcessStorageHandler { + key: string // 接口标识 + name: string // 接口名称 + params: ProcessStorageParam[] // 接口参数 +} + +/** 获得入库接口目录:业务模块注册的接口及其参数。 */ +export const getStorageHandlerList = (): Promise => + request.get({ url: '/bpm/process-storage/handler-list' }) diff --git a/src/api/bpm/revisionApply/index.ts b/src/api/bpm/revisionApply/index.ts new file mode 100644 index 0000000..f89a903 --- /dev/null +++ b/src/api/bpm/revisionApply/index.ts @@ -0,0 +1,25 @@ +import request from '@/config/axios' + +/** 修改申请状态选项。 */ +export const REVISION_APPLY_STATUS_OPTIONS = [ + { label: '审批中', value: 1, type: 'primary' }, + { label: '已生效', value: 2, type: 'success' }, + { label: '已驳回', value: 3, type: 'danger' }, + { label: '已撤销', value: 4, type: 'info' }, + { label: '生效失败', value: 5, type: 'warning' } +] + +/** 提交审批意见修改申请,审批通过后自动生效。 */ +export const createOpinionApply = async (data: { taskId: string; opinion: string; reason: string }) => { + return await request.post({ url: '/bpm/revision-apply/create', data }) +} + +/** 分页查询修改申请。 */ +export const getApplyPage = async (params: PageParam) => { + return await request.get({ url: '/bpm/revision-apply/page', params }) +} + +/** 查询原流程的全部修改申请。 */ +export const getApplyList = async (processInstanceId: string) => { + return await request.get({ url: '/bpm/revision-apply/list-by-process-instance', params: { processInstanceId } }) +} diff --git a/src/api/bpm/simple/index.ts b/src/api/bpm/simple/index.ts new file mode 100644 index 0000000..6e1e995 --- /dev/null +++ b/src/api/bpm/simple/index.ts @@ -0,0 +1,15 @@ +import request from '@/config/axios' + + +export const updateBpmSimpleModel = async (data) => { + return await request.post({ + url: '/bpm/model/simple/update', + data: data + }) +} + +export const getBpmSimpleModel = async (id) => { + return await request.get({ + url: '/bpm/model/simple/get?id=' + id + }) +} diff --git a/src/api/bpm/simulation/index.ts b/src/api/bpm/simulation/index.ts new file mode 100644 index 0000000..6b6db7b --- /dev/null +++ b/src/api/bpm/simulation/index.ts @@ -0,0 +1,104 @@ +import request from '@/config/axios' + +/** 模型已保存配置与指定发布版本二选一;摘要用于避免模型修改后继续沿用旧状态。 */ +export interface SimulationSource { + modelId?: string + processDefinitionId?: string + snapshot?: string +} + +/** 仿真只使用配置快照和精简人员信息,不创建真实流程或任务。 */ +export interface SimulationDefinition { + id: string + modelId?: string + snapshot?: string + name: string + version?: number | null + formConf: string + formFields: string[] + bpmnXml: string + modelType: number + simpleModel?: string + users: SimulationUser[] + startUsers: SimulationUser[] + departments: { id: number; name: string; parentId: number; orgType?: string; disabled: boolean }[] + formDepartments: SimulationDefinition['departments'] +} + +/** 有效任职部门用于模拟组织身份,登录用户保持不变。 */ +export interface SimulationUser { + id: number + nickname: string + deptId?: number + deptIds: number[] + /** 主任职的唯一岗位,副岗与兼职不参与审批节点标题判断。 */ + primaryPostId?: number + primaryPostName?: string +} + +/** 状态只保存在当前页面内存中,每次请求传入计算,不在后台保存。 */ +export interface SimulationState { + activeNodeIds: string[] + waitingJoins: Record + finishedNodeIds: string[] + finishedFlowIds: string[] +} + +/** 当前可选择预览的节点配置;多个节点表示仍有并行分支。 */ +export interface SimulationNode { + id: string + name: string + /** 按发布配置用共同主岗位名称展示审批节点。 */ + showApproverPost?: boolean + type: 'start' | 'approve' | 'automatic' | 'copy' | 'unsupported' | 'end' + supported: boolean + notice?: string + candidateUserIds: number[] + selectAssignees: boolean + fieldPermissions: Record + requiredFields: string[] +} + +export interface SimulationResult { + state: SimulationState + nodes: SimulationNode[] + completed: boolean + notices: string[] + previewNotice?: string +} + +export interface SimulationStep extends SimulationSource { + startUserId: number + startDeptId: number + nodeId?: string + variables: Record + state: SimulationState + selectedAssignees: Record +} + +/** 每次开始都使用独立状态对象,避免不同弹窗之间共享数组。 */ +export const createSimulationState = (): SimulationState => ({ + activeNodeIds: [], waitingJoins: {}, finishedNodeIds: [], finishedFlowIds: [] +}) + +/** 后续计算和表单选项始终沿用打开仿真时的同一个来源。 */ +export const getSimulationSource = (definition: SimulationDefinition): SimulationSource => + definition.modelId ? { modelId: definition.modelId, snapshot: definition.snapshot } + : { processDefinitionId: definition.id } + +export const getSimulationDefinition = (source: SimulationSource): Promise => + request.get({ url: '/bpm/simulation/definition', params: source }) + +export const simulateStep = (data: SimulationStep): Promise => + request.post({ url: '/bpm/simulation/step', data }) + +/** 预测始终使用独立状态,不调用模拟提交或正式审批接口。 */ +export const previewSimulation = (data: SimulationStep): Promise => + request.post({ url: '/bpm/simulation/preview', data }) + +/** 原表单控件通过仿真专属接口取选项,保留原部门关联和范围开关。 */ +export const getSimulationFormUsers = (params: Record) => + request.get({ url: '/bpm/simulation/form-users', params }) + +export const getSimulationFormRoles = (params: Record) => + request.get({ url: '/bpm/simulation/form-roles', params }) diff --git a/src/api/bpm/statistics/index.ts b/src/api/bpm/statistics/index.ts new file mode 100644 index 0000000..6add84d --- /dev/null +++ b/src/api/bpm/statistics/index.ts @@ -0,0 +1,55 @@ +import request from '@/config/axios' + +/** 流程统计查询条件:endTime 为时间范围(任务统计按办结时间,流程统计按发起时间)。 */ +export interface StatisticsReqVO { + /** 时间范围。 */ + endTime?: string[] + /** 流程分类编码。 */ + category?: string + /** 流程标识。 */ + processDefinitionKey?: string + /** 处理人部门编号。 */ + deptId?: number + /** 处理人编号(流程统计为发起人)。 */ + userId?: number +} + +/** 流程维度统计。 */ +export const getProcessSummary = async (params: StatisticsReqVO) => { + return await request.get({ url: '/bpm/statistics/process-summary', params }) +} + +/** 节点维度统计。 */ +export const getNodeSummary = async (params: StatisticsReqVO) => { + return await request.get({ url: '/bpm/statistics/node-summary', params }) +} + +/** 员工耗时排名。 */ +export const getUserRanking = async (params: StatisticsReqVO) => { + return await request.get({ url: '/bpm/statistics/user-ranking', params }) +} + +/** 导出员工耗时排名。 */ +export const exportUserRanking = async (params: StatisticsReqVO) => { + return await request.download({ url: '/bpm/statistics/export-user-ranking', params }) +} + +/** 当前已超时的在办任务。 */ +export const getRunningTimeoutList = async (params: StatisticsReqVO) => { + return await request.get({ url: '/bpm/statistics/running-timeout-list', params }) +} + +/** 分页查询排名排除名单,包含指定人员和用户组。 */ +export const getExcludeUserPage = async (params: PageParam) => { + return await request.get({ url: '/bpm/statistics/exclude-user/page', params }) +} + +/** 新增排名排除记录,userId 与 userGroupId 二选一。 */ +export const createExcludeUser = async (data: { userId?: number; userGroupId?: number; remark?: string }) => { + return await request.post({ url: '/bpm/statistics/exclude-user/create', data }) +} + +/** 删除排名排除记录。 */ +export const deleteExcludeUser = async (id: number) => { + return await request.post({ url: '/bpm/statistics/exclude-user/delete', params: { id } }) +} diff --git a/src/api/bpm/task/index.ts b/src/api/bpm/task/index.ts new file mode 100644 index 0000000..a8fb93a --- /dev/null +++ b/src/api/bpm/task/index.ts @@ -0,0 +1,171 @@ +import request from '@/config/axios' + +/** + * 任务状态枚举 + */ +export enum TaskStatusEnum { + /** + * 跳过 + */ + SKIP = -2, + /** + * 未开始 + */ + NOT_START = -1, + + /** + * 待审批 + */ + WAIT = 0, + /** + * 审批中 + */ + RUNNING = 1, + /** + * 审批通过 + */ + APPROVE = 2, + + /** + * 审批不通过 + */ + REJECT = 3, + + /** + * 已取消 + */ + CANCEL = 4, + /** + * 已退回 + */ + RETURN = 5, + /** + * 审批通过中 + */ + APPROVING = 7 +} + +// 退回策略,值需与后端 BpmReturnStrategyEnum 保持一致 +export enum ReturnStrategyEnum { + REWALK = 1, + TARGET_DECIDES = 2 +} + +// 退回目标节点的后续决定,值需与后端 BpmReturnTargetDecisionEnum 保持一致 +export enum ReturnTargetDecisionEnum { + CONTINUE_BY_RULE = 1, + JUMP_TO_SOURCE = 2 +} + +export const getTaskTodoPage = async (params: PageParam) => { + return await request.get({ url: '/bpm/task/todo-page', params }) +} + +export const getTaskDonePage = async (params: PageParam) => { + return await request.get({ url: '/bpm/task/done-page', params }) +} + +export const getTaskManagerPage = async (params: PageParam) => { + return await request.get({ url: '/bpm/task/manager-page', params }) +} + +export const approveTask = async (data: Record) => { + return await request.post({ url: '/bpm/task/approve', data }) +} + +export const rejectTask = async (data: Record) => { + return await request.post({ url: '/bpm/task/reject', data }) +} + +/** 查询流程实例任务记录;full 为 true 时包含取消、撤回等中间痕迹。 */ +export const getTaskListByProcessInstanceId = async (processInstanceId: string, full = false) => { + return await request.get({ + url: '/bpm/task/list-by-process-instance-id', + params: { processInstanceId, full } + }) +} + +// 获取所有可退回的节点 +export const getTaskListByReturn = async (id: string) => { + return await request.get({ url: '/bpm/task/list-by-return', params: { id } }) +} + +// 退回 +export const returnTask = async (data: Record) => { + return await request.post({ url: '/bpm/task/return', data }) +} + +/** 查询当前任务可安全跳转的后续串行节点。 */ +export const getTaskListByForwardJump = async (id: string) => { + return await request.get({ url: '/bpm/task/list-by-forward-jump', params: { id } }) +} + +/** 当前审批人将流程跳转到选定的后续串行节点。 */ +export const forwardJumpTask = async (data: Record) => { + return await request.post({ url: '/bpm/task/forward-jump', data }) +} + +// 查询当前任务是否处于“退回目标节点决定后续方式”的上下文中 +export const getTaskReturnContext = async (id: string) => { + return await request.get({ url: '/bpm/task/return-context', params: { id } }) +} + +// 委派 +export const delegateTask = async (data: Record) => { + return await request.post({ url: '/bpm/task/delegate', data }) +} + +// 转派 +export const transferTask = async (data: Record) => { + return await request.post({ url: '/bpm/task/transfer', data }) +} + +/** 管理员强制转交当前任务。 */ +export const transferTaskByAdmin = async (data: Record) => { + return await request.post({ url: '/bpm/task/transfer-by-admin', data }) +} + +// 加签 +export const signCreateTask = async (data: Record) => { + return await request.post({ url: '/bpm/task/create-sign', data }) +} + +/** 管理员对当前任务发起加签。 */ +export const signCreateTaskByAdmin = async (data: Record) => { + return await request.post({ url: '/bpm/task/create-sign-by-admin', data }) +} + +// 减签 +export const signDeleteTask = async (data: Record) => { + return await request.post({ url: '/bpm/task/delete-sign', data }) +} + +/** 管理员删除加签产生的审批任务。 */ +export const signDeleteTaskByAdmin = async (data: Record) => { + return await request.post({ url: '/bpm/task/delete-sign-by-admin', data }) +} + +/** 管理员跳过当前唯一活动审批节点。 */ +export const skipTaskByAdmin = async (data: Record) => { + return await request.post({ url: '/bpm/task/skip-by-admin', data }) +} + +// 抄送 +export const copyTask = async (data: Record) => { + return await request.post({ url: '/bpm/task/copy', data }) +} + +// 撤回本人已办任务,reason 选填(最长 200 字),下一节点尚未审批时任务回到本人待办 +export const withdrawTask = async (taskId: string, reason?: string) => { + return await request.post({ url: '/bpm/task/withdraw', params: { taskId, reason: reason || undefined } }) +} + +// 获取我的待办任务 +export const myTodoTask = async (processInstanceId: string) => { + return await request.get({ url: '/bpm/task/my-todo?processInstanceId=' + processInstanceId }) +} + +// 获取减签任务列表 +export const getChildrenTaskList = async (id: string) => { + return await request.get({ url: '/bpm/task/list-by-parent-task-id?parentTaskId=' + id }) +} diff --git a/src/api/bpm/taskAgent/index.ts b/src/api/bpm/taskAgent/index.ts new file mode 100644 index 0000000..ac50aba --- /dev/null +++ b/src/api/bpm/taskAgent/index.ts @@ -0,0 +1,99 @@ +import request from '@/config/axios' + +/** 代理授权保存请求,时间为毫秒时间戳。 */ +export interface TaskAgentSaveReqVO { + /** 授权编号,修改时必填。 */ + id?: number + /** 委托人编号,仅管理员代为设置时使用。 */ + principalUserId?: number + /** 代理人编号。 */ + agentUserId?: number + /** 生效开始时间。 */ + startTime?: number + /** 生效结束时间。 */ + endTime?: number + /** 事由:1 请假、2 出差、3 其他。 */ + reasonType?: number + /** 适用范围:1 全部流程、2 指定流程。 */ + scopeType?: number + /** 指定流程的流程标识列表。 */ + processDefinitionKeys?: string[] + /** 是否同时转移已有待办(仅立即生效时执行)。 */ + transferExisting?: boolean + /** 备注。 */ + remark?: string +} + +/** 代理事由选项。 */ +export const AGENT_REASON_OPTIONS = [ + { label: '请假', value: 1 }, + { label: '出差', value: 2 }, + { label: '其他', value: 3 } +] + +/** 代理适用范围选项。 */ +export const AGENT_SCOPE_OPTIONS = [ + { label: '全部流程', value: 1 }, + { label: '指定流程', value: 2 } +] + +/** 代理授权状态选项。 */ +export const AGENT_STATUS_OPTIONS = [ + { label: '有效', value: 1, type: 'success' }, + { label: '已撤销', value: 2, type: 'info' }, + { label: '已过期', value: 3, type: 'warning' } +] + +/** + * 授权状态的展示标签:有效但尚未到开始时间的显示“未生效”,其余按状态值显示。 + * + * @param status 授权状态 + * @param startTime 开始时间(毫秒时间戳或日期字符串) + */ +export const getAgentStatusOption = (status: unknown, startTime?: unknown) => { + const start = startTime == null || startTime === '' ? NaN : new Date(startTime as number | string).getTime() + if (status === 1 && !Number.isNaN(start) && start > Date.now()) { + return { label: '未生效', value: 1, type: 'primary' } + } + return AGENT_STATUS_OPTIONS.find((item) => item.value === status) +} + +/** 查询本人作为委托人或代理人的授权。 */ +export const getMyAgentPage = async (params: PageParam) => { + return await request.get({ url: '/bpm/task-agent/my-page', params }) +} + +/** 本人设置代理。 */ +export const createAgent = async (data: TaskAgentSaveReqVO) => { + return await request.post({ url: '/bpm/task-agent/create', data }) +} + +/** 本人修改代理。 */ +export const updateAgent = async (data: TaskAgentSaveReqVO) => { + return await request.post({ url: '/bpm/task-agent/update', data }) +} + +/** 本人撤销代理。 */ +export const revokeAgent = async (id: number) => { + return await request.post({ url: '/bpm/task-agent/revoke', params: { id } }) +} + +/** 管理员查询全部代理授权。 */ +export const getAgentPage = async (params: PageParam) => { + return await request.get({ url: '/bpm/task-agent/page', params }) +} + +/** 管理员为他人设置代理。 */ +export const createAgentByAdmin = async (data: TaskAgentSaveReqVO) => { + return await request.post({ url: '/bpm/task-agent/create-by-admin', data }) +} + +/** 管理员修改代理。 */ +export const updateAgentByAdmin = async (data: TaskAgentSaveReqVO) => { + return await request.post({ url: '/bpm/task-agent/update-by-admin', data }) +} + +/** 管理员撤销代理。 */ +export const revokeAgentByAdmin = async (id: number) => { + return await request.post({ url: '/bpm/task-agent/revoke-by-admin', params: { id } }) +} diff --git a/src/api/bpm/taskUrge/index.ts b/src/api/bpm/taskUrge/index.ts new file mode 100644 index 0000000..7c90e14 --- /dev/null +++ b/src/api/bpm/taskUrge/index.ts @@ -0,0 +1,75 @@ +import request from '@/config/axios' + +/** 催办请求:不传 planTime 为立即催办,传 planTime(毫秒时间戳)为预定时间催办。 */ +export interface TaskUrgeCreateReqVO { + /** 流程实例编号。 */ + processInstanceId: string + /** 只催办部分当前处理人时的用户编号,为空时催办全部。 */ + targetUserIds?: number[] + /** 催办内容,为空时使用默认内容。 */ + content?: string + /** 附加通知渠道:SMS 短信、DINGTALK 钉钉,站内信总是发送。 */ + channels?: string[] + /** 预定催办时间。 */ + planTime?: number +} + +/** 催办方式名称。 */ +export const URGE_TYPE_NAMES: Record = { 1: '手动催办', 2: '预定催办', 3: '超时提醒' } + +/** 催办发送状态名称。 */ +export const URGE_SEND_STATUS_NAMES: Record = { + 0: '待发送', + 1: '已发送', + 2: '部分失败', + 3: '已取消' +} + +/** 催办附加通知渠道,站内信总是发送无需传。 */ +export const URGE_CHANNEL = { + /** 短信。 */ + SMS: 'SMS', + /** 钉钉工作通知。 */ + DINGTALK: 'DINGTALK' +} as const + +/** 催办提交结果:发送条数(或催办记录编号)及因距上次催办过近被跳过的人员。 */ +export interface TaskUrgeCreateRespVO { + /** 实际发送的催办条数(按待办任务计)。 */ + urgeCount?: number + /** 生成的催办记录编号,未返回 urgeCount 时按其个数计算条数。 */ + urgeIds?: number[] + /** 距上次催办不足最小间隔而被跳过的人员姓名。 */ + skippedUserNames?: string[] + /** 手动催办最小间隔(分钟),后端返回时用于提示文案。 */ + minIntervalMinutes?: number +} + +/** 立即催办或设置预定催办,返回催办条数及被跳过的人员。 */ +export const createUrge = async (data: TaskUrgeCreateReqVO): Promise => { + return await request.post({ url: '/bpm/task-urge/create', data }) +} + +/** + * 统一解析催办提交结果,兼容旧接口直接返回发送条数的情况。 + * + * @param result createUrge 的返回值 + */ +export const parseUrgeCreateResult = (result: TaskUrgeCreateRespVO | number | null | undefined) => { + if (typeof result === 'number') return { count: result, skippedUserNames: [] as string[], minIntervalMinutes: undefined } + return { + count: result?.urgeCount ?? result?.urgeIds?.length ?? 0, + skippedUserNames: result?.skippedUserNames || [], + minIntervalMinutes: result?.minIntervalMinutes + } +} + +/** 取消尚未发送的预定催办。 */ +export const cancelUrge = async (id: number) => { + return await request.post({ url: '/bpm/task-urge/cancel', params: { id } }) +} + +/** 查询流程的催办记录。 */ +export const getUrgeList = async (processInstanceId: string) => { + return await request.get({ url: '/bpm/task-urge/list-by-process-instance', params: { processInstanceId } }) +} diff --git a/src/api/bpm/userGroup/index.ts b/src/api/bpm/userGroup/index.ts new file mode 100644 index 0000000..0eaba85 --- /dev/null +++ b/src/api/bpm/userGroup/index.ts @@ -0,0 +1,13 @@ +import request from '@/config/axios' + +/** 流程可选的用户分组,取自系统管理“分组管理”,名称带上级路径 */ +export type UserGroupVO = { + id: number + name: string + parentId: number +} + +// 获取用户组精简信息列表(仅启用分组) +export const getUserGroupSimpleList = async (): Promise => { + return await request.get({ url: '/bpm/user-group/simple-list' }) +} diff --git a/src/api/bpm/userHandover/index.ts b/src/api/bpm/userHandover/index.ts new file mode 100644 index 0000000..c1aecca --- /dev/null +++ b/src/api/bpm/userHandover/index.ts @@ -0,0 +1,79 @@ +import request from '@/config/axios' + +/** 移交场景选项(巡检由系统产生,不可手工选择)。 */ +export const HANDOVER_SCENE_OPTIONS = [ + { label: '离职', value: 1 }, + { label: '调岗', value: 2 }, + { label: '手工', value: 3 }, + { label: '巡检', value: 4 } +] + +/** 移交方式选项。 */ +export const HANDOVER_MODE_OPTIONS = [ + { label: '指定接手人', value: 1 }, + { label: '按节点规则重新计算', value: 2 } +] + +/** 移交批次状态选项。 */ +export const HANDOVER_STATUS_OPTIONS = [ + { label: '处理中', value: 1, type: 'primary' }, + { label: '已完成', value: 2, type: 'success' }, + { label: '部分待处理', value: 3, type: 'warning' } +] + +/** 移交明细状态选项。 */ +export const HANDOVER_ITEM_STATUS_OPTIONS = [ + { label: '已移交', value: 1, type: 'success' }, + { label: '待管理员指定', value: 2, type: 'warning' }, + { label: '失败', value: 3, type: 'danger' }, + { label: '已跳过', value: 4, type: 'info' } +] + +/** 查询人员在途待办概况,停用、调岗前提醒用。 */ +export const getRunningSummary = async (userId: number) => { + return await request.get({ url: '/bpm/user-handover/running-summary', params: { userId } }) +} + +/** 批量查询人员待办(不含代理授权),仅返回有待办的人员。 */ +export interface UserRunningTaskSummary { + userId: number + todoCount: number + tasks: { + taskId: string + taskName: string + processInstanceId: string + processInstanceName?: string + suspended: boolean + }[] +} + +/** 每批最多 100 人,组织变更预览按批调用,避免逐人请求。 */ +export const getRunningSummaryBatch = (userIds: number[]): Promise => + request.get({ url: '/bpm/user-handover/running-summary-batch', params: { userIds: userIds.join(',') } }) + +/** 发起人员任务移交,返回批次编号。 */ +export const createHandover = async (data: { + sourceUserId: number + scene: number + mode: number + targetUserId?: number + taskIds?: string[] + reason: string +}) => { + return await request.post({ url: '/bpm/user-handover/create', data }) +} + +/** 为待管理员指定的明细指定接手人。 */ +export const assignHandoverItem = async (data: { itemId: number; targetUserId: number }) => { + return await request.post({ url: '/bpm/user-handover/assign-item', data }) +} + +/** 分页查询移交批次。 */ +export const getHandoverPage = async (params: PageParam) => { + return await request.get({ url: '/bpm/user-handover/page', params }) +} + +/** 查询移交批次及明细。 */ +export const getHandover = async (id: number) => { + return await request.get({ url: '/bpm/user-handover/get', params: { id } }) +} diff --git a/src/api/bpm/workCalendar/index.ts b/src/api/bpm/workCalendar/index.ts new file mode 100644 index 0000000..e960ae4 --- /dev/null +++ b/src/api/bpm/workCalendar/index.ts @@ -0,0 +1,19 @@ +import request from '@/config/axios' + +/** 请假时段:上午 AM / 下午 PM */ +export type LeaveHalfDay = 'AM' | 'PM' + +export interface LeaveDaysReqVO { + /** 开始日期 yyyy-MM-dd */ + startDate: string + startPeriod: LeaveHalfDay + /** 结束日期 yyyy-MM-dd */ + endDate: string + endPeriod: LeaveHalfDay +} + +/** 按工作日历核算请假天数(周一至周五为工作日,节假日不计) */ +export const getLeaveDays = async (params: LeaveDaysReqVO): Promise => { + const result = await request.get({ url: '/bpm/work-calendar/leave-days', params }) + return Number(result?.leaveDays) +} diff --git a/src/api/infra/apiAccessLog/index.ts b/src/api/infra/apiAccessLog/index.ts new file mode 100644 index 0000000..4fa50e1 --- /dev/null +++ b/src/api/infra/apiAccessLog/index.ts @@ -0,0 +1,34 @@ +import request from '@/config/axios' + +export interface ApiAccessLogVO { + id: number + traceId: string + userId: number + userType: number + applicationName: string + requestMethod: string + requestParams: string + responseBody: string + requestUrl: string + userIp: string + userAgent: string + operateModule: string + operateName: string + operateType: number + beginTime: Date + endTime: Date + duration: number + resultCode: number + resultMsg: string + createTime: Date +} + +// 查询列表API 访问日志 +export const getApiAccessLogPage = (params: PageParam) => { + return request.get({ url: '/infra/api-access-log/page', params }) +} + +// 导出API 访问日志 +export const exportApiAccessLog = (params) => { + return request.download({ url: '/infra/api-access-log/export-excel', params }) +} diff --git a/src/api/infra/apiErrorLog/index.ts b/src/api/infra/apiErrorLog/index.ts new file mode 100644 index 0000000..df1529a --- /dev/null +++ b/src/api/infra/apiErrorLog/index.ts @@ -0,0 +1,48 @@ +import request from '@/config/axios' + +export interface ApiErrorLogVO { + id: number + traceId: string + userId: number + userType: number + applicationName: string + requestMethod: string + requestParams: string + requestUrl: string + userIp: string + userAgent: string + exceptionTime: Date + exceptionName: string + exceptionMessage: string + exceptionRootCauseMessage: string + exceptionStackTrace: string + exceptionClassName: string + exceptionFileName: string + exceptionMethodName: string + exceptionLineNumber: number + processUserId: number + processStatus: number + processTime: Date + resultCode: number + createTime: Date +} + +// 查询列表API 访问日志 +export const getApiErrorLogPage = (params: PageParam) => { + return request.get({ url: '/infra/api-error-log/page', params }) +} + +// 更新 API 错误日志的处理状态 +export const updateApiErrorLogPage = (id: number, processStatus: number) => { + return request.post({ + url: '/infra/api-error-log/update-status?id=' + id + '&processStatus=' + processStatus + }) +} + +// 导出API 访问日志 +export const exportApiErrorLog = (params) => { + return request.download({ + url: '/infra/api-error-log/export-excel', + params + }) +} diff --git a/src/api/infra/codegen/index.ts b/src/api/infra/codegen/index.ts new file mode 100644 index 0000000..d57effc --- /dev/null +++ b/src/api/infra/codegen/index.ts @@ -0,0 +1,112 @@ +import request from '@/config/axios' + +export type CodegenTableVO = { + id: number + tableId: number + isParentMenuIdValid: boolean + dataSourceConfigId: number + scene: number + tableName: string + tableComment: string + remark: string + moduleName: string + businessName: string + className: string + classComment: string + author: string + createTime: Date + updateTime: Date + templateType: number + parentMenuId: number +} + +export type CodegenColumnVO = { + id: number + tableId: number + columnName: string + dataType: string + columnComment: string + nullable: number + primaryKey: number + ordinalPosition: number + javaType: string + javaField: string + dictType: string + example: string + createOperation: number + updateOperation: number + listOperation: number + listOperationCondition: string + listOperationResult: number + htmlType: string +} + +export type DatabaseTableVO = { + name: string + comment: string +} + +export type CodegenPreviewVO = { + filePath: string + code: string +} + +export type CodegenUpdateReqVO = { + table: CodegenTableVO | any + columns: CodegenColumnVO[] +} + +// 查询列表代码生成表定义 +export const getCodegenTableList = (dataSourceConfigId: number) => { + return request.get({ url: '/infra/codegen/table/list?dataSourceConfigId=' + dataSourceConfigId }) +} + +// 查询列表代码生成表定义 +export const getCodegenTablePage = (params: PageParam) => { + return request.get({ url: '/infra/codegen/table/page', params }) +} + +// 查询详情代码生成表定义 +export const getCodegenTable = (id: number) => { + return request.get({ url: '/infra/codegen/detail?tableId=' + id }) +} + +// 修改代码生成表定义 +export const updateCodegenTable = (data: CodegenUpdateReqVO) => { + return request.post({ url: '/infra/codegen/update', data }) +} + +// 基于数据库的表结构,同步数据库的表和字段定义 +export const syncCodegenFromDB = (id: number) => { + return request.post({ url: '/infra/codegen/sync-from-db?tableId=' + id }) +} + +// 预览生成代码 +export const previewCodegen = (id: number) => { + return request.get({ url: '/infra/codegen/preview?tableId=' + id }) +} + +// 下载生成代码 +export const downloadCodegen = (id: number) => { + return request.download({ url: '/infra/codegen/download?tableId=' + id }) +} + +// 获得表定义 +export const getSchemaTableList = (params) => { + return request.get({ url: '/infra/codegen/db/table/list', params }) +} + +// 基于数据库的表结构,创建代码生成器的表定义 +export const createCodegenList = (data) => { + return request.post({ url: '/infra/codegen/create-list', data }) +} + +// 删除代码生成表定义 +export const deleteCodegenTable = (id: number) => { + return request.post({ url: '/infra/codegen/delete?tableId=' + id }) +} + +// 批量删除代码生成表定义 +export const deleteCodegenTableList = (ids: number[]) => { + return request.post({ url: '/infra/codegen/delete-list', params: { tableIds: ids.join(',') } }) +} diff --git a/src/api/infra/config/index.ts b/src/api/infra/config/index.ts new file mode 100644 index 0000000..c4ad481 --- /dev/null +++ b/src/api/infra/config/index.ts @@ -0,0 +1,59 @@ +import request from '@/config/axios' + +export interface ConfigVO { + id: number | undefined + category: string + name: string + key: string + value: string + valueType: 'string' | 'number' | 'boolean' | 'json' | 'userGroup' + status: number + type: number + visible: boolean + remark: string + createTime: Date +} + +export const BREADCRUMB_ENABLED_CONFIG_KEY = 'system.ui.breadcrumb.enabled' + +// 查询参数列表 +export const getConfigPage = (params: PageParam) => { + return request.get({ url: '/infra/config/page', params }) +} + +// 查询参数详情 +export const getConfig = (id: number) => { + return request.get({ url: '/infra/config/get?id=' + id }) +} + +// 根据参数键名查询参数值 +export const getConfigKey = (configKey: string) => { + return request.get({ + url: '/infra/config/get-value-by-key?key=' + encodeURIComponent(configKey) + }) +} + +// 新增参数 +export const createConfig = (data: ConfigVO) => { + return request.post({ url: '/infra/config/create', data }) +} + +// 修改参数 +export const updateConfig = (data: ConfigVO) => { + return request.post({ url: '/infra/config/update', data }) +} + +// 删除参数 +export const deleteConfig = (id: number) => { + return request.post({ url: '/infra/config/delete?id=' + id }) +} + +// 批量删除参数 +export const deleteConfigList = (ids: number[]) => { + return request.post({ url: '/infra/config/delete-list', params: { ids: ids.join(',') } }) +} + +// 导出参数 +export const exportConfig = (params) => { + return request.download({ url: '/infra/config/export-excel', params }) +} diff --git a/src/api/infra/dataSourceConfig/index.ts b/src/api/infra/dataSourceConfig/index.ts new file mode 100644 index 0000000..a0da7ae --- /dev/null +++ b/src/api/infra/dataSourceConfig/index.ts @@ -0,0 +1,43 @@ +import request from '@/config/axios' + +export interface DataSourceConfigVO { + id: number | undefined + name: string + url: string + username: string + password: string + createTime?: Date +} + +// 新增数据源配置 +export const createDataSourceConfig = (data: DataSourceConfigVO) => { + return request.post({ url: '/infra/data-source-config/create', data }) +} + +// 修改数据源配置 +export const updateDataSourceConfig = (data: DataSourceConfigVO) => { + return request.post({ url: '/infra/data-source-config/update', data }) +} + +// 删除数据源配置 +export const deleteDataSourceConfig = (id: number) => { + return request.post({ url: '/infra/data-source-config/delete?id=' + id }) +} + +// 批量删除数据源配置 +export const deleteDataSourceConfigList = (ids: number[]) => { + return request.post({ + url: '/infra/data-source-config/delete-list', + params: { ids: ids.join(',') } + }) +} + +// 查询数据源配置详情 +export const getDataSourceConfig = (id: number) => { + return request.get({ url: '/infra/data-source-config/get?id=' + id }) +} + +// 查询数据源配置列表 +export const getDataSourceConfigList = () => { + return request.get({ url: '/infra/data-source-config/list' }) +} diff --git a/src/api/infra/debugLog/index.ts b/src/api/infra/debugLog/index.ts new file mode 100644 index 0000000..dffc799 --- /dev/null +++ b/src/api/infra/debugLog/index.ts @@ -0,0 +1,60 @@ +import request from '@/config/axios' + +/** 联调日志开关与容量状态 */ +export interface DebugLogStatusVO { + enabled: boolean + mqCapacity: number + mqSize: number +} + +/** 平台对 MQ 消息的受理结果 */ +export type MqDebugLogResult = 'ACCEPTED' | 'DUPLICATE' | 'REJECTED' | 'ERROR' + +/** 一条消息队列联调记录 */ +export interface MqDebugLogVO { + id: number + receiveTime: number + topic: string + messageId?: string + sourceChannel?: string + busiKey?: string + publishTime?: string + reconsumeTimes?: number + eventId?: string + eventType?: string + operation?: string + sourceAppId?: string + sourceObjectId?: string + result: MqDebugLogResult + reason?: string + receiptId?: string + body?: string +} + +export interface MqDebugLogPageReqVO extends PageParam { + topic?: string + sourceChannel?: string + result?: MqDebugLogResult + keyword?: string + receiveTime?: string[] +} + +/** 查询联调日志开关与容量。 */ +export const getDebugLogStatus = (): Promise => { + return request.get({ url: '/infra/debug-log/status' }) +} + +/** 分页查询平台收到的 MQ 消息,最新的在前。 */ +export const getMqDebugLogPage = (params: MqDebugLogPageReqVO): Promise> => { + return request.get({ url: '/infra/debug-log/mq/page', params }) +} + +/** 查询一条 MQ 联调记录详情。 */ +export const getMqDebugLog = (id: number): Promise => { + return request.get({ url: '/infra/debug-log/mq/get?id=' + id }) +} + +/** 清空 MQ 联调记录。 */ +export const clearMqDebugLog = () => { + return request.post({ url: '/infra/debug-log/mq/clear' }) +} diff --git a/src/api/infra/demo/demo01/index.ts b/src/api/infra/demo/demo01/index.ts new file mode 100644 index 0000000..f467560 --- /dev/null +++ b/src/api/infra/demo/demo01/index.ts @@ -0,0 +1,50 @@ +import request from '@/config/axios' +import type { Dayjs } from 'dayjs' + +/** 示例联系人信息 */ +export interface Demo01Contact { + id: number // 编号 + name?: string // 名字 + sex?: number // 性别 + birthday?: string | Dayjs // 出生年 + description?: string // 简介 + avatar: string // 头像 +} + +// 示例联系人 API +export const Demo01ContactApi = { + // 查询示例联系人分页 + getDemo01ContactPage: async (params: PageParam) => { + return await request.get({ url: `/infra/demo01-contact/page`, params }) + }, + + // 查询示例联系人详情 + getDemo01Contact: async (id: number) => { + return await request.get({ url: `/infra/demo01-contact/get?id=` + id }) + }, + + // 新增示例联系人 + createDemo01Contact: async (data: Demo01Contact) => { + return await request.post({ url: `/infra/demo01-contact/create`, data }) + }, + + // 修改示例联系人 + updateDemo01Contact: async (data: Demo01Contact) => { + return await request.post({ url: `/infra/demo01-contact/update`, data }) + }, + + // 删除示例联系人 + deleteDemo01Contact: async (id: number) => { + return await request.post({ url: `/infra/demo01-contact/delete?id=` + id }) + }, + + /** 批量删除示例联系人 */ + deleteDemo01ContactList: async (ids: number[]) => { + return await request.post({ url: `/infra/demo01-contact/delete-list?ids=${ids.join(',')}` }) + }, + + // 导出示例联系人 Excel + exportDemo01Contact: async (params) => { + return await request.download({ url: `/infra/demo01-contact/export-excel`, params }) + } +} diff --git a/src/api/infra/demo/demo02/index.ts b/src/api/infra/demo/demo02/index.ts new file mode 100644 index 0000000..55a500c --- /dev/null +++ b/src/api/infra/demo/demo02/index.ts @@ -0,0 +1,37 @@ +import request from '@/config/axios' + +export interface Demo02CategoryVO { + id: number + name: string + parentId: number +} + +// 查询示例分类列表 +export const getDemo02CategoryList = async () => { + return await request.get({ url: `/infra/demo02-category/list` }) +} + +// 查询示例分类详情 +export const getDemo02Category = async (id: number) => { + return await request.get({ url: `/infra/demo02-category/get?id=` + id }) +} + +// 新增示例分类 +export const createDemo02Category = async (data: Demo02CategoryVO) => { + return await request.post({ url: `/infra/demo02-category/create`, data }) +} + +// 修改示例分类 +export const updateDemo02Category = async (data: Demo02CategoryVO) => { + return await request.post({ url: `/infra/demo02-category/update`, data }) +} + +// 删除示例分类 +export const deleteDemo02Category = async (id: number) => { + return await request.post({ url: `/infra/demo02-category/delete?id=` + id }) +} + +// 导出示例分类 Excel +export const exportDemo02Category = async (params) => { + return await request.download({ url: `/infra/demo02-category/export-excel`, params }) +} diff --git a/src/api/infra/demo/demo03/erp/index.ts b/src/api/infra/demo/demo03/erp/index.ts new file mode 100644 index 0000000..c840f3b --- /dev/null +++ b/src/api/infra/demo/demo03/erp/index.ts @@ -0,0 +1,133 @@ +import request from '@/config/axios' +import type { Dayjs } from 'dayjs' + +/** 学生课程信息 */ +export interface Demo03Course { + id: number // 编号 + studentId?: number // 学生编号 + name?: string // 名字 + score?: number // 分数 +} + +/** 学生班级信息 */ +export interface Demo03Grade { + id: number // 编号 + studentId?: number // 学生编号 + name?: string // 名字 + teacher?: string // 班主任 +} + +/** 学生信息 */ +export interface Demo03Student { + id: number // 编号 + name?: string // 名字 + sex?: number // 性别 + birthday?: string | Dayjs // 出生日期 + description?: string // 简介 +} + +// 学生 API +export const Demo03StudentApi = { + // 查询学生分页 + getDemo03StudentPage: async (params: PageParam) => { + return await request.get({ url: `/infra/demo03-student-erp/page`, params }) + }, + + // 查询学生详情 + getDemo03Student: async (id: number) => { + return await request.get({ url: `/infra/demo03-student-erp/get?id=` + id }) + }, + + // 新增学生 + createDemo03Student: async (data: Demo03Student) => { + return await request.post({ url: `/infra/demo03-student-erp/create`, data }) + }, + + // 修改学生 + updateDemo03Student: async (data: Demo03Student) => { + return await request.post({ url: `/infra/demo03-student-erp/update`, data }) + }, + + // 删除学生 + deleteDemo03Student: async (id: number) => { + return await request.post({ url: `/infra/demo03-student-erp/delete?id=` + id }) + }, + + /** 批量删除学生 */ + deleteDemo03StudentList: async (ids: number[]) => { + return await request.post({ + url: `/infra/demo03-student-erp/delete-list?ids=${ids.join(',')}` + }) + }, + + // 导出学生 Excel + exportDemo03Student: async (params) => { + return await request.download({ url: `/infra/demo03-student-erp/export-excel`, params }) + }, + + // ==================== 子表(学生课程) ==================== + + // 获得学生课程分页 + getDemo03CoursePage: async (params) => { + return await request.get({ url: `/infra/demo03-student-erp/demo03-course/page`, params }) + }, + // 新增学生课程 + createDemo03Course: async (data: Demo03Course) => { + return await request.post({ url: `/infra/demo03-student-erp/demo03-course/create`, data }) + }, + + // 修改学生课程 + updateDemo03Course: async (data: Demo03Course) => { + return await request.post({ url: `/infra/demo03-student-erp/demo03-course/update`, data }) + }, + + // 删除学生课程 + deleteDemo03Course: async (id: number) => { + return await request.post({ url: `/infra/demo03-student-erp/demo03-course/delete?id=` + id }) + }, + + /** 批量删除学生课程 */ + deleteDemo03CourseList: async (ids: number[]) => { + return await request.post({ + url: `/infra/demo03-student-erp/demo03-course/delete-list?ids=${ids.join(',')}` + }) + }, + + // 获得学生课程 + getDemo03Course: async (id: number) => { + return await request.get({ url: `/infra/demo03-student-erp/demo03-course/get?id=` + id }) + }, + + // ==================== 子表(学生班级) ==================== + + // 获得学生班级分页 + getDemo03GradePage: async (params) => { + return await request.get({ url: `/infra/demo03-student-erp/demo03-grade/page`, params }) + }, + // 新增学生班级 + createDemo03Grade: async (data: Demo03Grade) => { + return await request.post({ url: `/infra/demo03-student-erp/demo03-grade/create`, data }) + }, + + // 修改学生班级 + updateDemo03Grade: async (data: Demo03Grade) => { + return await request.post({ url: `/infra/demo03-student-erp/demo03-grade/update`, data }) + }, + + // 删除学生班级 + deleteDemo03Grade: async (id: number) => { + return await request.post({ url: `/infra/demo03-student-erp/demo03-grade/delete?id=` + id }) + }, + + /** 批量删除学生班级 */ + deleteDemo03GradeList: async (ids: number[]) => { + return await request.post({ + url: `/infra/demo03-student-erp/demo03-grade/delete-list?ids=${ids.join(',')}` + }) + }, + + // 获得学生班级 + getDemo03Grade: async (id: number) => { + return await request.get({ url: `/infra/demo03-student-erp/demo03-grade/get?id=` + id }) + } +} diff --git a/src/api/infra/demo/demo03/inner/index.ts b/src/api/infra/demo/demo03/inner/index.ts new file mode 100644 index 0000000..5106045 --- /dev/null +++ b/src/api/infra/demo/demo03/inner/index.ts @@ -0,0 +1,87 @@ +import request from '@/config/axios' +import type { Dayjs } from 'dayjs' + +/** 学生课程信息 */ +export interface Demo03Course { + id: number // 编号 + studentId?: number // 学生编号 + name?: string // 名字 + score?: number // 分数 +} + +/** 学生班级信息 */ +export interface Demo03Grade { + id: number // 编号 + studentId?: number // 学生编号 + name?: string // 名字 + teacher?: string // 班主任 +} + +/** 学生信息 */ +export interface Demo03Student { + id: number // 编号 + name?: string // 名字 + sex?: number // 性别 + birthday?: string | Dayjs // 出生日期 + description?: string // 简介 + demo03courses?: Demo03Course[] + demo03grade?: Demo03Grade +} + +// 学生 API +export const Demo03StudentApi = { + // 查询学生分页 + getDemo03StudentPage: async (params: PageParam) => { + return await request.get({ url: `/infra/demo03-student-inner/page`, params }) + }, + + // 查询学生详情 + getDemo03Student: async (id: number) => { + return await request.get({ url: `/infra/demo03-student-inner/get?id=` + id }) + }, + + // 新增学生 + createDemo03Student: async (data: Demo03Student) => { + return await request.post({ url: `/infra/demo03-student-inner/create`, data }) + }, + + // 修改学生 + updateDemo03Student: async (data: Demo03Student) => { + return await request.post({ url: `/infra/demo03-student-inner/update`, data }) + }, + + // 删除学生 + deleteDemo03Student: async (id: number) => { + return await request.post({ url: `/infra/demo03-student-inner/delete?id=` + id }) + }, + + /** 批量删除学生 */ + deleteDemo03StudentList: async (ids: number[]) => { + return await request.post({ + url: `/infra/demo03-student-inner/delete-list?ids=${ids.join(',')}` + }) + }, + + // 导出学生 Excel + exportDemo03Student: async (params) => { + return await request.download({ url: `/infra/demo03-student-inner/export-excel`, params }) + }, + + // ==================== 子表(学生课程) ==================== + + // 获得学生课程列表 + getDemo03CourseListByStudentId: async (studentId) => { + return await request.get({ + url: `/infra/demo03-student-inner/demo03-course/list-by-student-id?studentId=` + studentId + }) + }, + + // ==================== 子表(学生班级) ==================== + + // 获得学生班级 + getDemo03GradeByStudentId: async (studentId) => { + return await request.get({ + url: `/infra/demo03-student-inner/demo03-grade/get-by-student-id?studentId=` + studentId + }) + } +} diff --git a/src/api/infra/demo/demo03/normal/index.ts b/src/api/infra/demo/demo03/normal/index.ts new file mode 100644 index 0000000..b1c3c94 --- /dev/null +++ b/src/api/infra/demo/demo03/normal/index.ts @@ -0,0 +1,87 @@ +import request from '@/config/axios' +import type { Dayjs } from 'dayjs' + +/** 学生课程信息 */ +export interface Demo03Course { + id: number // 编号 + studentId?: number // 学生编号 + name?: string // 名字 + score?: number // 分数 +} + +/** 学生班级信息 */ +export interface Demo03Grade { + id: number // 编号 + studentId?: number // 学生编号 + name?: string // 名字 + teacher?: string // 班主任 +} + +/** 学生信息 */ +export interface Demo03Student { + id: number // 编号 + name?: string // 名字 + sex?: number // 性别 + birthday?: string | Dayjs // 出生日期 + description?: string // 简介 + demo03courses?: Demo03Course[] + demo03grade?: Demo03Grade +} + +// 学生 API +export const Demo03StudentApi = { + // 查询学生分页 + getDemo03StudentPage: async (params: PageParam) => { + return await request.get({ url: `/infra/demo03-student-normal/page`, params }) + }, + + // 查询学生详情 + getDemo03Student: async (id: number) => { + return await request.get({ url: `/infra/demo03-student-normal/get?id=` + id }) + }, + + // 新增学生 + createDemo03Student: async (data: Demo03Student) => { + return await request.post({ url: `/infra/demo03-student-normal/create`, data }) + }, + + // 修改学生 + updateDemo03Student: async (data: Demo03Student) => { + return await request.post({ url: `/infra/demo03-student-normal/update`, data }) + }, + + // 删除学生 + deleteDemo03Student: async (id: number) => { + return await request.post({ url: `/infra/demo03-student-normal/delete?id=` + id }) + }, + + /** 批量删除学生 */ + deleteDemo03StudentList: async (ids: number[]) => { + return await request.post({ + url: `/infra/demo03-student-normal/delete-list?ids=${ids.join(',')}` + }) + }, + + // 导出学生 Excel + exportDemo03Student: async (params) => { + return await request.download({ url: `/infra/demo03-student-normal/export-excel`, params }) + }, + + // ==================== 子表(学生课程) ==================== + + // 获得学生课程列表 + getDemo03CourseListByStudentId: async (studentId) => { + return await request.get({ + url: `/infra/demo03-student-normal/demo03-course/list-by-student-id?studentId=` + studentId + }) + }, + + // ==================== 子表(学生班级) ==================== + + // 获得学生班级 + getDemo03GradeByStudentId: async (studentId) => { + return await request.get({ + url: `/infra/demo03-student-normal/demo03-grade/get-by-student-id?studentId=` + studentId + }) + } +} diff --git a/src/api/infra/file/index.ts b/src/api/infra/file/index.ts new file mode 100644 index 0000000..8171f72 --- /dev/null +++ b/src/api/infra/file/index.ts @@ -0,0 +1,159 @@ +import type { AxiosProgressEvent } from 'axios' +import request from '@/config/axios' + +/** 文件可见性:PUBLIC 公开图片(稳定地址可保存);PRIVATE 私有文件(仅短时签名地址,业务保存 fileId) */ +export type FileVisibility = 'PUBLIC' | 'PRIVATE' + +/** 统一文件上传 / 访问地址 Response VO */ +export interface UnifiedFileRespVO { + // 文件编号 + fileId: number + // 原始文件名 + name: string + // 文件类型(服务端检测) + contentType: string + // 文件大小(字节) + size: number + // 可见性 + visibility: FileVisibility + // 访问地址:公开文件为稳定相对地址;私有文件为短时签名地址,禁止保存 + url: string + // 签名地址过期时间,公开文件为 null + expiresAt: string | null +} + +/** 统一文件上传参数 */ +export interface UnifiedFileUploadReqVO { + // 上传的文件 + file: File | Blob + // 业务目录,需匹配 ^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$,例如 notice-pdf、avatar、bpm-sign、editor + directory?: string + // 是否强制私有(图片默认公开,传 true 时按私有文件存储) + forcePrivate?: boolean +} + +/** 统一上传接口原始返回结构(request.upload 不拆包) */ +export interface UnifiedFileUploadResult { + code: number + data: UnifiedFileRespVO + msg: string +} + +/** 文件管理分页项 */ +export interface UnifiedFileVO { + // 文件编号 + id: number + // 所属应用编号 + applicationId?: number + // 上传时的应用编码 + applicationCode?: string + // 存储年度 + storageYear?: number + // 存储日期 yyyy-MM-dd + storageDate?: string + // 原始文件名 + name: string + // 文件类型 + contentType: string + // 文件大小(字节) + size: number + // 可见性 + visibility: FileVisibility + // 业务模块 + directory?: string + // 来源:PLATFORM 平台上传,OPEN_API 开放接口,MIGRATION 历史迁移 + source?: string + // 仅公开文件返回稳定地址,私有文件为 null + url: string | null + // 创建人 + creator?: string + // 上传人姓名;用户已删除或上传来源非用户时可能为空 + creatorName?: string + // 创建时间 + createTime: Date +} + +/** 文件管理分页查询参数 */ +export interface UnifiedFilePageReqVO extends PageParam { + // 文件编号,精确匹配 + id?: number + // 所属应用编号 + applicationId?: number + // 存储日期范围 [开始, 结束],yyyy-MM-dd,含首尾 + storageDate?: string[] + // 业务模块,精确匹配 + directory?: string + // 原始文件名,前缀匹配 + name?: string + // 字节数区间,含首尾 + sizeMin?: number + sizeMax?: number + // 可见范围 + visibility?: FileVisibility + // 来源 + source?: string +} + +/** + * 上传文件(统一上传入口),返回 CommonResult 原始结构,data 为统一文件对象 + * @param data 上传参数 + * @param onUploadProgress 上传进度回调 + */ +export const uploadUnifiedFile = ( + data: UnifiedFileUploadReqVO, + onUploadProgress?: (evt: AxiosProgressEvent) => void +): Promise => { + return request.upload({ url: '/infra/unified-file/upload', data, onUploadProgress }) +} + +/** + * 获取本人上传文件的新访问地址(仅限当前用户上传的文件,用于保存前预览 / 下载) + * @param fileId 文件编号 + */ +export const getUnifiedFileAccessUrl = (fileId: number) => { + return request.post({ + url: '/infra/unified-file/access-url', + data: { fileId } + }) +} + +/** + * 文件管理:分页查询 + * @param params 查询参数 + */ +export const getUnifiedFilePage = (params: UnifiedFilePageReqVO) => { + return request.get>({ url: '/infra/unified-file/page', params }) +} + +/** + * 文件管理:获取任意文件的新签名访问地址(需 infra:file:query 权限) + * @param fileId 文件编号 + */ +export const getManageFileAccessUrl = (fileId: number) => { + return request.post({ + url: '/infra/unified-file/manage-access-url', + data: { fileId } + }) +} + +/** + * 文件管理:删除文件 + * @param id 文件编号 + */ +export const deleteUnifiedFile = (id: number) => { + return request.post({ url: '/infra/unified-file/delete?id=' + id }) +} + +/** 文件管理的应用筛选项 */ +export interface FileApplicationOption { + id: number + name: string + applicationCode: string +} + +/** + * 文件管理:应用筛选项,当前租户全部应用(需 infra:file:query 权限) + */ +export const getFileApplicationOptions = () => { + return request.get({ url: '/system/application/file-filter-options' }) +} diff --git a/src/api/infra/job/index.ts b/src/api/infra/job/index.ts new file mode 100644 index 0000000..b8ea8c8 --- /dev/null +++ b/src/api/infra/job/index.ts @@ -0,0 +1,68 @@ +import request from '@/config/axios' + +export interface JobVO { + id: number + name: string + status: number + handlerName: string + handlerParam: string + cronExpression: string + retryCount: number + retryInterval: number + monitorTimeout: number + createTime: Date +} + +// 任务列表 +export const getJobPage = (params: PageParam) => { + return request.get({ url: '/infra/job/page', params }) +} + +// 任务详情 +export const getJob = (id: number) => { + return request.get({ url: '/infra/job/get?id=' + id }) +} + +// 新增任务 +export const createJob = (data: JobVO) => { + return request.post({ url: '/infra/job/create', data }) +} + +// 修改定时任务调度 +export const updateJob = (data: JobVO) => { + return request.post({ url: '/infra/job/update', data }) +} + +// 删除定时任务调度 +export const deleteJob = (id: number) => { + return request.post({ url: '/infra/job/delete?id=' + id }) +} + +// 批量删除定时任务调度 +export const deleteJobList = (ids: number[]) => { + return request.post({ url: '/infra/job/delete-list', params: { ids: ids.join(',') } }) +} + +// 导出定时任务调度 +export const exportJob = (params) => { + return request.download({ url: '/system/mechanism/export', params }) +} + +// 任务状态修改 +export const updateJobStatus = (id: number, status: number) => { + const params = { + id, + status + } + return request.post({ url: '/infra/job/update-status', params }) +} + +// 定时任务立即执行一次 +export const runJob = (id: number) => { + return request.post({ url: '/infra/job/trigger?id=' + id }) +} + +// 获得定时任务的下 n 次执行时间 +export const getJobNextTimes = (id: number) => { + return request.get({ url: '/infra/job/get_next_times?id=' + id }) +} diff --git a/src/api/infra/jobLog/index.ts b/src/api/infra/jobLog/index.ts new file mode 100644 index 0000000..ed54761 --- /dev/null +++ b/src/api/infra/jobLog/index.ts @@ -0,0 +1,34 @@ +import request from '@/config/axios' + +export interface JobLogVO { + id: number + jobId: number + handlerName: string + handlerParam: string + cronExpression: string + executeIndex: string + beginTime: Date + endTime: Date + duration: string + status: number + createTime: string + result: string +} + +// 任务日志列表 +export const getJobLogPage = (params: PageParam) => { + return request.get({ url: '/infra/job-log/page', params }) +} + +// 任务日志详情 +export const getJobLog = (id: number) => { + return request.get({ url: '/infra/job-log/get?id=' + id }) +} + +// 导出定时任务日志 +export const exportJobLog = (params) => { + return request.download({ + url: '/infra/job-log/export-excel', + params + }) +} diff --git a/src/api/infra/redis/index.ts b/src/api/infra/redis/index.ts new file mode 100644 index 0000000..f27be77 --- /dev/null +++ b/src/api/infra/redis/index.ts @@ -0,0 +1,8 @@ +import request from '@/config/axios' + +/** + * 获取redis 监控信息 + */ +export const getCache = () => { + return request.get({ url: '/infra/redis/get-monitor-info' }) +} diff --git a/src/api/infra/redis/types.ts b/src/api/infra/redis/types.ts new file mode 100644 index 0000000..548bfe9 --- /dev/null +++ b/src/api/infra/redis/types.ts @@ -0,0 +1,176 @@ +export interface RedisMonitorInfoVO { + info: RedisInfoVO + dbSize: number + commandStats: RedisCommandStatsVO[] +} + +export interface RedisInfoVO { + io_threaded_reads_processed: string + tracking_clients: string + uptime_in_seconds: string + cluster_connections: string + current_cow_size: string + maxmemory_human: string + aof_last_cow_size: string + master_replid2: string + mem_replication_backlog: string + aof_rewrite_scheduled: string + total_net_input_bytes: string + rss_overhead_ratio: string + hz: string + current_cow_size_age: string + redis_build_id: string + errorstat_BUSYGROUP: string + aof_last_bgrewrite_status: string + multiplexing_api: string + client_recent_max_output_buffer: string + allocator_resident: string + mem_fragmentation_bytes: string + aof_current_size: string + repl_backlog_first_byte_offset: string + tracking_total_prefixes: string + redis_mode: string + redis_git_dirty: string + aof_delayed_fsync: string + allocator_rss_bytes: string + repl_backlog_histlen: string + io_threads_active: string + rss_overhead_bytes: string + total_system_memory: string + loading: string + evicted_keys: string + maxclients: string + cluster_enabled: string + redis_version: string + repl_backlog_active: string + mem_aof_buffer: string + allocator_frag_bytes: string + io_threaded_writes_processed: string + instantaneous_ops_per_sec: string + used_memory_human: string + total_error_replies: string + role: string + maxmemory: string + used_memory_lua: string + rdb_current_bgsave_time_sec: string + used_memory_startup: string + used_cpu_sys_main_thread: string + lazyfree_pending_objects: string + aof_pending_bio_fsync: string + used_memory_dataset_perc: string + allocator_frag_ratio: string + arch_bits: string + used_cpu_user_main_thread: string + mem_clients_normal: string + expired_time_cap_reached_count: string + unexpected_error_replies: string + mem_fragmentation_ratio: string + aof_last_rewrite_time_sec: string + master_replid: string + aof_rewrite_in_progress: string + lru_clock: string + maxmemory_policy: string + run_id: string + latest_fork_usec: string + tracking_total_items: string + total_commands_processed: string + expired_keys: string + errorstat_ERR: string + used_memory: string + module_fork_in_progress: string + errorstat_WRONGPASS: string + aof_buffer_length: string + dump_payload_sanitizations: string + mem_clients_slaves: string + keyspace_misses: string + server_time_usec: string + executable: string + lazyfreed_objects: string + db0: string + used_memory_peak_human: string + keyspace_hits: string + rdb_last_cow_size: string + aof_pending_rewrite: string + used_memory_overhead: string + active_defrag_hits: string + tcp_port: string + uptime_in_days: string + used_memory_peak_perc: string + current_save_keys_processed: string + blocked_clients: string + total_reads_processed: string + expire_cycle_cpu_milliseconds: string + sync_partial_err: string + used_memory_scripts_human: string + aof_current_rewrite_time_sec: string + aof_enabled: string + process_supervised: string + master_repl_offset: string + used_memory_dataset: string + used_cpu_user: string + rdb_last_bgsave_status: string + tracking_total_keys: string + atomicvar_api: string + allocator_rss_ratio: string + client_recent_max_input_buffer: string + clients_in_timeout_table: string + aof_last_write_status: string + mem_allocator: string + used_memory_scripts: string + used_memory_peak: string + process_id: string + master_failover_state: string + errorstat_NOAUTH: string + used_cpu_sys: string + repl_backlog_size: string + connected_slaves: string + current_save_keys_total: string + gcc_version: string + total_system_memory_human: string + sync_full: string + connected_clients: string + module_fork_last_cow_size: string + total_writes_processed: string + allocator_active: string + total_net_output_bytes: string + pubsub_channels: string + current_fork_perc: string + active_defrag_key_hits: string + rdb_changes_since_last_save: string + instantaneous_input_kbps: string + used_memory_rss_human: string + configured_hz: string + expired_stale_perc: string + active_defrag_misses: string + used_cpu_sys_children: string + number_of_cached_scripts: string + sync_partial_ok: string + used_memory_lua_human: string + rdb_last_save_time: string + pubsub_patterns: string + slave_expires_tracked_keys: string + redis_git_sha1: string + used_memory_rss: string + rdb_last_bgsave_time_sec: string + os: string + mem_not_counted_for_evict: string + active_defrag_running: string + rejected_connections: string + aof_rewrite_buffer_length: string + total_forks: string + active_defrag_key_misses: string + allocator_allocated: string + aof_base_size: string + instantaneous_output_kbps: string + second_repl_offset: string + rdb_bgsave_in_progress: string + used_cpu_user_children: string + total_connections_received: string + migrate_cached_sockets: string +} + +export interface RedisCommandStatsVO { + command: string + calls: number + usec: number +} diff --git a/src/api/login/index.ts b/src/api/login/index.ts new file mode 100644 index 0000000..a79e446 --- /dev/null +++ b/src/api/login/index.ts @@ -0,0 +1,102 @@ +import request from '@/config/axios' +import type { TokenType } from './types' +import { formatToken, getAuthSession, type AuthSessionSnapshot } from '@/utils/auth' + +// 使用租户名,获得租户编号 +export const getTenantIdByName = (name: string) => { + return request.get({ url: '/system/tenant/get-id-by-name?name=' + name }) +} + +// 登出 +export const loginOut = (session: AuthSessionSnapshot = getAuthSession()) => { + return request.post({ + url: '/system/auth/logout', + headers: { isToken: false, Authorization: formatToken(session.accessToken) }, + authSession: session, + skipAuthRefresh: true + }) +} + +// 获取用户权限信息 +export const getInfo = () => { + return request.get({ url: '/system/auth/get-permission-info' }) +} + +/** 当前登录账号可切换的组织身份,岗位仅用于展示。 */ +export interface OrganizationContext { + userId: number + nickname: string + avatar: string + currentOrganizationKey: string | null + organizations: { + organizationKey: string + organizationId: number + organizationName: string + postNames: string[] + /** 组织身份包含的有效副岗、兼职,用于类型标签展示。 */ + hasDeputy?: boolean + hasPart?: boolean + selected: boolean + }[] +} + +/** 从服务端读取当前组织及账号可用身份,不使用浏览器组织缓存。 */ +export const getOrganizationContext = () => { + return request.get({ url: '/system/auth/organization-context' }) +} + +/** 切换服务端会话的组织身份。 */ +export const switchOrganization = (organizationKey: string) => { + return request.post({ + url: '/system/auth/switch-organization', + data: { organizationKey } + }) +} + +// 获取财开云第一方应用的统一登录地址 +export const getSsoLoginUrl = (applicationCode: string, callbackUrl: string, requestId: string) => { + return request.post({ + url: '/system/sso-client/login-url', + params: { applicationCode, callbackUrl, requestId }, + withCredentials: true, + headers: { isToken: false }, + skipAuthRefresh: true + }) +} + +// 获取财开云第一方应用的统一注销地址 +export const getSsoLogoutUrl = (applicationCode: string, callbackUrl: string, requestId: string, session: AuthSessionSnapshot) => { + return request.post({ + url: '/system/sso-client/logout-url', + params: { applicationCode, callbackUrl, requestId, sessionBinding: session.ssoSessionBinding }, + withCredentials: true, + headers: { isToken: false }, + authSession: session, + skipAuthRefresh: true + }) +} + +// 消费统一登录回调票据并建立当前应用会话 +export const exchangeSsoTicket = (applicationCode: string, ticket: string, loginRequestId: string, clientType: 0 | 1 = 0) => { + return request.post({ + url: '/system/sso-client/exchange', + params: { applicationCode, ticket, loginRequestId, clientType }, + withCredentials: true, + headers: { isToken: false }, + skipAuthRefresh: true + }) +} + +// 获取验证图片以及 token +export const getCode = (data: any) => { + return request.postOriginal({ + url: 'system/captcha/get', data, headers: { isToken: false }, skipAuthRefresh: true + }) +} + +// 滑动或者点选验证 +export const reqCheck = (data: any) => { + return request.postOriginal({ + url: 'system/captcha/check', data, headers: { isToken: false }, skipAuthRefresh: true + }) +} diff --git a/src/api/login/types.ts b/src/api/login/types.ts new file mode 100644 index 0000000..6d4c0bd --- /dev/null +++ b/src/api/login/types.ts @@ -0,0 +1,23 @@ +export type TokenType = { + ssoSessionBinding?: string + id: number // 编号 + accessToken: string // 访问令牌 + refreshToken: string // 刷新令牌 + userId: number // 用户编号 + userType: number //用户类型 + clientId: string //客户端编号 + expiresTime: number //过期时间 +} + +export type UserVO = { + id: number + username: string + nickname: string + deptId: number + email: string + mobile: string + sex: number + avatar: string + loginIp: string + loginDate: string +} diff --git a/src/api/portal/inboxRemind/index.ts b/src/api/portal/inboxRemind/index.ts new file mode 100644 index 0000000..151096d --- /dev/null +++ b/src/api/portal/inboxRemind/index.ts @@ -0,0 +1,53 @@ +import request from '@/config/axios' + +/** 门户站内信的移动端(钉钉)提醒记录 */ +export interface InboxRemindVO { + id: number + inboxId: number + targetType: 'WORK_ITEM' | 'MESSAGE' + recipientUserId: number + recipientName?: string + sourceAppId: string + remindType: string + title?: string + channel: string + /** 0 待发送,1 已发送,2 发送失败,3 已跳过 */ + status: number + retryCount: number + nextTime?: string + sendTime?: string + taskId?: string + lastError?: string + createTime: string +} + +export interface InboxRemindPageReqVO extends PageParam { + recipientUserId?: number + sourceAppId?: string + remindType?: string + channel?: string + status?: number + title?: string + createTime?: string[] +} + +/** 分页查询站内信提醒记录。 */ +export const getInboxRemindPage = (params: InboxRemindPageReqVO): Promise> => { + return request.get({ url: '/portal/inbox-remind/page', params }) +} + +/** 提醒记录来源应用选项,以消息中的 appId 作为筛选值。 */ +export interface InboxRemindApplicationOption { + appId: string + name: string +} + +/** 查询当前租户的提醒来源应用,包含停用应用。 */ +export const getInboxRemindApplicationOptions = (): Promise => { + return request.get({ url: '/system/application/inbox-remind-filter-options' }) +} + +/** 重发一条发送失败或已跳过的提醒。 */ +export const resendInboxRemind = (id: number) => { + return request.post({ url: '/portal/inbox-remind/resend?id=' + id }) +} diff --git a/src/api/portal/integrationEvent/index.ts b/src/api/portal/integrationEvent/index.ts new file mode 100644 index 0000000..d07d368 --- /dev/null +++ b/src/api/portal/integrationEvent/index.ts @@ -0,0 +1,37 @@ +import request from '@/config/axios' + +export interface IntegrationEventVO { + id: number + eventId: string + sourceAppId: string + eventType: 'WORK_ITEM' | 'MESSAGE' + operation: string + sourceObjectId: string + sourceVersion: number + processStatus: number + retryCount: number + resultMessage?: string + createTime: string +} + +export interface IntegrationEventPageReqVO extends PageParam { + sourceAppId?: string + eventType?: string + operation?: string + processStatus?: number + eventId?: string + sourceObjectId?: string + createTime?: string[] +} + +/** 查询第三方系统通过 MQ 送达平台的统一事件。 */ +export const getIntegrationEventPage = ( + params: IntegrationEventPageReqVO +): Promise> => { + return request.get({ url: '/portal/events/page', params }) +} + +/** 重试一条处理失败的入站事件。 */ +export const retryIntegrationEvent = (id: number) => { + return request.post({ url: '/portal/events/retry?id=' + id }) +} diff --git a/src/api/system/application/app.ts b/src/api/system/application/app.ts new file mode 100644 index 0000000..9cce475 --- /dev/null +++ b/src/api/system/application/app.ts @@ -0,0 +1,429 @@ +import request from '@/config/axios' +import { MenuPermission } from '@/utils/menuPermission' +import type { DeptVO } from '@/api/system/dept' + +/** 应用类型:1 内置(平台自有应用,带内置数据范围),2 业务应用。 */ +export enum ApplicationType { + BUILT_IN = 1, + BUSINESS = 2 +} + +/** 应用详情,对应后端 ApplicationRespVO */ +export interface ApplicationVO { + id: number + /** 应用所属组织,决定管理台应用管理范围 */ + deptId: number + deptName?: string + name: string + shortName?: string + applicationCode: string + applicationType: number + defaultApplication: boolean + icon?: string + homeUrl?: string + /** 是否在移动端门户展示 */ + mobileSupported: boolean + /** 移动端展示时必须配置的独立应用地址 */ + mobileHomeUrl?: string + sort: number + /** 是否在 PC 工作台展示;不影响移动端入口、SSO 与开放接口权限 */ + portalVisible?: boolean + /** 是否向本租户所有已登录用户展示已开启的门户入口 */ + allUsersVisible?: boolean + /** 开放接口授权总开关 */ + apiAccessEnabled?: boolean + /** 是否旧单点接入(致远兼容) */ + legacySeeyonEnabled?: boolean + /** 是否旧单点接入(数新认证中心兼容) */ + legacyDatanewEnabled?: boolean + status: number + description?: string + /** MQ 渠道编码,应用的消息 SDK 启动时读取;为空表示未接入消息队列 */ + mqChannel?: string + /** 移动端提醒渠道,逗号分隔(目前只有 DINGTALK);为空表示不提醒 */ + mobileRemindChannels?: string + /** 移动端提醒范围,逗号分隔的站内信类型 */ + mobileRemindTypes?: string + appId: string + secretMask?: string + keyVersion: number + accessTokenValiditySeconds: number + refreshTokenValiditySeconds: number + authVersion: number + version: number + ssoEnabled?: boolean + createTime: Date | string +} + +/** 应用精简信息,对应后端 ApplicationSimpleRespVO */ +export interface ApplicationSimpleVO { + id: number + /** 应用所属组织 */ + deptId: number + deptName?: string + mobileHomeUrl?: string + name: string + shortName?: string + applicationCode: string + applicationType: number + defaultApplication: boolean + icon?: string + homeUrl?: string + status: number + /** MQ 渠道编码,为空表示未接入消息队列 */ + mqChannel?: string +} + +/** 应用分页查询,对应后端 ApplicationPageReqVO */ +export interface ApplicationPageReqVO extends PageParam { + keyword?: string + status?: number +} + +/** 创建应用,对应后端 ApplicationCreateReqVO */ +export interface ApplicationCreateReqVO { + /** 必须属于当前用户所属或分管组织及其下级范围 */ + deptId: number + applicationCode: string + name: string + shortName?: string + icon?: string + /** 是否在 PC 工作台展示;创建时不传按不展示处理,更新时不传保持原值 */ + portalVisible?: boolean + /** 是否全员可见;仅影响门户入口展示 */ + allUsersVisible?: boolean + /** PC 端应用地址,PC 展示开启时必填,须为完整 HTTP/HTTPS 地址 */ + homeUrl?: string + /** 是否在移动端门户展示 */ + mobileSupported: boolean + /** 移动端展示开启时必填 */ + mobileHomeUrl?: string + sort: number + description?: string + /** MQ 渠道编码;传空串表示不登记(更新时会清空已登记的渠道) */ + mqChannel?: string + /** 移动端提醒渠道,逗号分隔;传空串表示不提醒,更新时不传保持原值 */ + mobileRemindChannels?: string + /** 移动端提醒范围,逗号分隔;更新时不传保持原值 */ + mobileRemindTypes?: string + accessTokenValiditySeconds: number + refreshTokenValiditySeconds: number +} + +/** 创建应用结果;原始密钥只会在本次响应中返回 */ +export interface ApplicationCreateRespVO { + applicationId: number + appId: string + appSecretKey: string + adminRoleId: number + status: number +} + +/** 更新应用,对应后端 ApplicationUpdateReqVO */ +export interface ApplicationUpdateReqVO extends ApplicationCreateReqVO { + id: number + version: number +} + +export interface ApplicationUpdateStatusReqVO { + id: number + status: number + version: number +} + +export interface ApplicationRotateSecretRespVO { + appSecretKey: string + keyVersion: number + authVersion: number +} + +/** 独立 SSO 配置,对应后端 ApplicationSsoConfigReqVO */ +export interface ApplicationSsoConfigReqVO { + applicationId: number + ssoEnabled: boolean + launchUrl?: string + callbackUrl?: string +} + +export type ApplicationSsoConfigRespVO = ApplicationSsoConfigReqVO + +/** 旧单点接入(致远兼容)配置,对应后端 ApplicationLegacySeeyonConfigVO */ +export interface ApplicationLegacySeeyonConfigVO { + applicationId: number + enabled: boolean + /** 第三方单点回调地址(原致远第三方系统注册里登记的地址) */ + callbackUrl?: string + /** 致远中该应用的 ID */ + seeyonAppId?: string + /** 推送待办、消息使用的系统注册编码 */ + registerCode?: string + /** 回调参数 from,默认 A8 */ + fromCode?: string + /** 回调参数 interneturl */ + internetUrl?: string + restUsername?: string + /** 读取时为已保存的密码;保存时为空表示不修改 */ + restPassword?: string + /** 允许的来源 IP,每行一个,支持 IPv4 网段 */ + allowedIps?: string + /** 来源 IP 限制:true 拦截名单外的来源,false 只记录 */ + ipEnforced?: boolean + /** ticket 回查返回的身份:loginName 登录名,telNumber 手机号 */ + identityField?: 'loginName' | 'telNumber' + /** 只读:最近的调用来源 IP,lastTime 为毫秒时间戳 */ + recentSourceIps?: { ip: string; lastTime?: number }[] + /** 只读:兼容层 SSO 回调地址 */ + ssoCallbackUrl?: string + /** 只读:兼容层单点登录地址 */ + ssoLaunchUrl?: string +} + +/** 旧单点接入(数新认证中心兼容)配置,对应后端 ApplicationLegacyDatanewConfigVO */ +export interface ApplicationLegacyDatanewConfigVO { + applicationId: number + enabled: boolean + /** 原认证中心分配的系统编码 systemCode */ + systemCode?: string + /** 读取时为已保存的密钥;保存时为空表示不修改 */ + systemSecret?: string + /** 原认证中心的租户标识 tenant,默认 default */ + tenantCode?: string + /** 第三方系统单点登录入口地址 */ + entryUrl?: string + /** 允许的回跳地址前缀,每行一个;为空时只允许与入口地址同源 */ + serviceUrls?: string + /** 返回给第三方的用户名:loginName 登录名,telNumber 手机号 */ + identityField?: 'loginName' | 'telNumber' + /** 只读:兼容层 SSO 回调地址 */ + ssoCallbackUrl?: string + /** 只读:兼容层单点登录地址 */ + ssoLaunchUrl?: string + /** 只读:本环境的认证中心地址(第三方 casServerUrlPrefix) */ + authCenterUrl?: string +} + +/** 开放 API 目录授权项 */ +export interface ApplicationApiGrantItemVO { + apiCode: string + name: string + method: string + pathTemplate: string + requiredScope?: string + granted: boolean + qps: number + maxConcurrency: number + version?: number +} + +/** 应用开放 API 授权配置 */ +export interface ApplicationApiGrantConfigVO { + applicationId: number + enabled: boolean + apiItems: ApplicationApiGrantItemVO[] +} + +/** 应用开放 API 授权配置保存参数 */ +export interface ApplicationApiGrantConfigReqVO { + applicationId: number + enabled: boolean + grantedApiCodes: string[] +} + +/** 应用授权服务端分页结果。 */ +export interface ApplicationApiGrantPageVO { + enabled: boolean + total: number + list: ApplicationApiGrantItemVO[] +} + +/** 仅操作当前行授权,不覆盖其他页。 */ +export interface ApplicationApiGrantStatusReqVO { + applicationId: number + apiCode: string + granted: boolean +} + +export const getApplicationApiGrantPage = (params: { + applicationId: number + pageNo: number + pageSize: number + keyword?: string +}): Promise => + request.get({ url: '/system/application/api-grant-page', params }) + +export const updateApplicationApiGrantStatus = (data: ApplicationApiGrantStatusReqVO): Promise => + request.post({ url: '/system/application/api-grant-status', data }) + +/** 单独修改授权接口限流参数,不改变应用令牌。 */ +export interface ApplicationApiRateLimitReqVO { + applicationId: number + apiCode: string + qps: number + maxConcurrency: number + version: number +} + +export const updateApplicationApiRateLimit = (data: ApplicationApiRateLimitReqVO): Promise => + request.post({ url: '/system/application/api-rate-limit', data }) + +export const updateApplicationApiAccessStatus = (data: { + applicationId: number + enabled: boolean +}): Promise => + request.post({ url: '/system/application/api-access-status', data }) + +/** 平台全局开放接口目录 */ +export interface OpenApiVO { + id: number + apiCode: string + name: string + method: string + pathTemplate: string + requiredScope?: string + status: number +} + +export type OpenApiSaveReqVO = Omit & { id?: number } + +export const getOpenApiList = (): Promise => + request.get({ url: '/system/open-api/list' }) + +export const getOpenApi = (id: number): Promise => + request.get({ url: '/system/open-api/get', params: { id } }) + +export const createOpenApi = (data: OpenApiSaveReqVO): Promise => + request.post({ url: '/system/open-api/create', data }) + +export const updateOpenApi = (data: OpenApiSaveReqVO): Promise => + request.post({ url: '/system/open-api/update', data }) + +export const deleteOpenApi = (id: number): Promise => + request.post({ url: '/system/open-api/delete', params: { id } }) + +// 查询应用分页 +export const getApplicationPage = ( + params: ApplicationPageReqVO, + menuCode?: MenuPermission +): Promise> => { + return request.get({ url: '/system/application/page', params: { ...params, menuCode } }) +} + +// 查询应用精简列表;菜单范围为空时保留历史全量查询语义。 +export const getSimpleApplicationList = (menuCode?: MenuPermission): Promise => { + return request.get({ url: '/system/application/simple-list', params: { menuCode } }) +} + +/** 应用归属组织选项,与应用管理列表使用同一组织范围。 */ +export const getManagedDeptList = (menuCode?: MenuPermission): Promise => { + return request.get({ url: '/system/application/managed-dept-list', params: { menuCode } }) +} + +// 查询应用详情 +export const getApplication = (id: number): Promise => { + return request.get({ url: '/system/application/get?id=' + id }) +} + +// 新增应用;响应包含仅展示一次的原始密钥 +export const createApplication = ( + data: ApplicationCreateReqVO +): Promise => { + return request.post({ url: '/system/application/create', data }) +} + +// 修改应用基础信息 +export const updateApplication = (data: ApplicationUpdateReqVO) => { + return request.post({ url: '/system/application/update', data }) +} + +// 修改应用状态 +export const updateApplicationStatus = (data: ApplicationUpdateStatusReqVO) => { + return request.post({ url: '/system/application/update-status', data }) +} + +// 轮换应用密钥;响应中的原始密钥仅展示一次 +export const rotateApplicationSecret = (id: number): Promise => { + return request.post({ url: '/system/application/rotate-secret?id=' + id }) +} + +// 独立保存应用 SSO 配置 +export const updateApplicationSsoConfig = (data: ApplicationSsoConfigReqVO) => { + return request.post({ url: '/system/application/sso-config', data }) +} + +// 查询应用 SSO 配置 +export const getApplicationSsoConfig = ( + applicationId: number +): Promise => { + return request.get({ url: '/system/application/sso-config', params: { applicationId } }) +} + +/** 查询应用旧单点接入(致远兼容)配置 */ +export const getApplicationLegacySeeyonConfig = ( + applicationId: number +): Promise => + request.get({ url: '/system/application/legacy-seeyon-config', params: { applicationId } }) + +/** 保存应用旧单点接入配置;开启时后端同时把 SSO 地址改为兼容层地址 */ +export const updateApplicationLegacySeeyonConfig = (data: ApplicationLegacySeeyonConfigVO): Promise => + request.post({ url: '/system/application/legacy-seeyon-config', data }) + +/** 查询应用数新认证中心兼容配置 */ +export const getApplicationLegacyDatanewConfig = ( + applicationId: number +): Promise => + request.get({ url: '/system/application/legacy-datanew-config', params: { applicationId } }) + +/** 保存应用数新认证中心兼容配置;开启时后端同时把 SSO 地址改为兼容层地址 */ +export const updateApplicationLegacyDatanewConfig = (data: ApplicationLegacyDatanewConfigVO): Promise => + request.post({ url: '/system/application/legacy-datanew-config', data }) + +// 查询应用开放 API 授权配置 +/** 流程状态通知地址;notifyUrl 为空表示不接收推送 */ +export interface ApplicationNotifyConfigVO { + applicationId: number + notifyUrl?: string +} + +/** 查询应用流程状态通知地址 */ +export const getApplicationNotifyConfig = (applicationId: number): Promise => + request.get({ url: '/system/application/notify-config', params: { applicationId } }) + +/** 保存应用流程状态通知地址,传空表示停用推送 */ +export const saveApplicationNotifyConfig = (data: ApplicationNotifyConfigVO): Promise => + request.post({ url: '/system/application/notify-config', data }) + +/** + * 应用人员、组织数据授权范围,按组织与按数据来源二选一: + * 按组织时勾选的组织自动包含全部下级,未勾选即无权获取;按数据来源时 0 全部、1 人事、2 自建 + */ +export interface ApplicationOrgScopeVO { + applicationId: number + /** 1 按组织,2 按数据来源 */ + mode?: number + deptIds: number[] + dataSource?: number +} + +/** 查询应用授权范围 */ +export const getApplicationOrgScope = (applicationId: number): Promise => + request.get({ url: '/system/application/org-scope', params: { applicationId } }) + +/** 保存应用授权范围 */ +export const saveApplicationOrgScope = (data: ApplicationOrgScopeVO): Promise => + request.post({ url: '/system/application/org-scope', data }) + +export const getApplicationApiGrantConfig = ( + applicationId: number +): Promise => { + return request.get({ url: '/system/application/api-grant-config', params: { applicationId } }) +} + +// 全量保存应用开放 API 授权配置 +export const saveApplicationApiGrantConfig = (data: ApplicationApiGrantConfigReqVO) => { + return request.post({ url: '/system/application/api-grant-config', data }) +} + +// 删除应用 +export const deleteApplication = (id: number) => { + return request.post({ url: '/system/application/delete?id=' + id }) +} diff --git a/src/api/system/application/config.ts b/src/api/system/application/config.ts new file mode 100644 index 0000000..8f4466d --- /dev/null +++ b/src/api/system/application/config.ts @@ -0,0 +1,99 @@ +import request from '@/config/axios' +import type { MenuVO } from '@/api/system/menu' +import type { RoleVO } from '@/api/system/role' +import type { TagVO } from '@/api/system/tag' + +/** 配置范围与后端枚举保持一致,仅用于文件和本次操作。 */ +export enum ApplicationConfigSection { + MENUS = 'MENUS', + ROLES = 'ROLES', + TAGS = 'TAGS' +} + +/** 应用注册下独立授权的配置迁移按钮。 */ +export const ApplicationConfigPermission = { + EXPORT: 'system:application:config-export', + IMPORT: 'system:application:config-import' +} as const + +export const applicationConfigSections = [ + { value: ApplicationConfigSection.MENUS, label: '菜单配置' }, + { value: ApplicationConfigSection.ROLES, label: '角色配置(含权限绑定)' }, + { value: ApplicationConfigSection.TAGS, label: '数据权限定义' } +] + +/** 与后端导入策略保持一致。 */ +export enum ApplicationConfigImportMode { + MERGE = 'MERGE', + REPLACE = 'REPLACE' +} + +/** 完整应用配置文件,引用现有字段,不包含人员授权、密钥或接入配置。 */ +export interface ApplicationConfigPackage { + formatVersion: number + complete: boolean + sections?: ApplicationConfigSection[] + applicationName: string + applicationCode: string + menus: Omit[] + roles: Omit[] + tags: Omit[] + roleMenus: { roleId: number; menuId: number }[] + roleTags: { roleId: number; tagId: number; tagValue?: string }[] + departments: { id: number; name: string; orgCode?: string }[] +} + +export interface ApplicationConfigChange { + category: string + action: string + name: string + detail: string +} + +export interface ApplicationConfigDeptMapping { + sourceId: number + sourceName: string + sourceCode?: string + targetId?: number + targetName?: string +} + +export interface ApplicationConfigPreview { + token?: string + sourceName: string + sourceCode: string + targetName: string + targetCode: string + codeMismatch: boolean + changes: ApplicationConfigChange[] + errors: string[] + warnings: string[] + departments: ApplicationConfigDeptMapping[] +} + +/** 按实际变更在后端逐项校验已有增删改与授权权限。 */ +export const previewApplicationConfig = (data: { + applicationId: number + mode: ApplicationConfigImportMode + sections: ApplicationConfigSection[] + config: ApplicationConfigPackage + departmentMappings: Record + includePresets: boolean +}): Promise => + request.post({ url: '/system/application/config/preview', data }) + +export const exportApplicationConfig = ( + applicationId: number, + sections?: ApplicationConfigSection[] +): Promise => + request.get({ + url: '/system/application/config/export', + params: { applicationId, sections: sections?.join(',') } + }) + +/** 正式执行只提交服务端凭证,不能在确认后偷偷更换文件或目标。 */ +export const importApplicationConfig = ( + token: string, + confirmCodeMismatch: boolean +): Promise => + request.post({ url: '/system/application/config/import', data: { token, confirmCodeMismatch } }) diff --git a/src/api/system/area/index.ts b/src/api/system/area/index.ts new file mode 100644 index 0000000..e91a499 --- /dev/null +++ b/src/api/system/area/index.ts @@ -0,0 +1,11 @@ +import request from '@/config/axios' + +// 获得地区树 +export const getAreaTree = async () => { + return await request.get({ url: '/system/area/tree' }) +} + +// 获得 IP 对应的地区名 +export const getAreaByIp = async (ip: string) => { + return await request.get({ url: '/system/area/get-by-ip?ip=' + ip }) +} diff --git a/src/api/system/dept/index.ts b/src/api/system/dept/index.ts new file mode 100644 index 0000000..6f7ad44 --- /dev/null +++ b/src/api/system/dept/index.ts @@ -0,0 +1,66 @@ +import request from '@/config/axios' +import { CommonStatusEnum } from '@/utils/constants' +import { MenuPermission } from '@/utils/menuPermission' + +export interface DeptVO { + id: number + name: string + shortName?: string // 组织简称,用于任职列表下方的所属单位展示 + parentId: number + orgType?: string + status: number + sort: number + leaderUserId: number + supervisorUserId: number + phone: string + email: string + createTime: Date +} + +// 查询部门(精简)列表 +export const getSimpleDeptList = (): Promise => { + return request.get({ url: '/system/dept/simple-list' }) +} + +/** 按当前菜单查询启用机构树,复用有效任职角色的数据范围。 */ +export const getMenuDeptTree = (menuCode: MenuPermission): Promise => { + return request.get({ + url: '/system/dept/organization-tree', + params: { menuCode, status: CommonStatusEnum.ENABLE } + }) +} + +// 查询部门列表 +export const getDeptList = (params: Record) => { + return request.get({ url: '/system/dept/list', params }) +} + +// 查询部门分页 +export const getDeptPage = async (params: PageParam) => { + return await request.get({ url: '/system/dept/list', params }) +} + +// 查询部门详情 +export const getDept = (id: number) => { + return request.get({ url: '/system/dept/get?id=' + id }) +} + +// 新增部门 +export const createDept = (data: DeptVO) => { + return request.post({ url: '/system/dept/create', data }) +} + +// 修改部门 +export const updateDept = (data: DeptVO) => { + return request.post({ url: '/system/dept/update', data }) +} + +// 删除部门 +export const deleteDept = async (id: number) => { + return await request.post({ url: '/system/dept/delete?id=' + id }) +} + +// 批量删除部门 +export const deleteDeptList = async (ids: number[]) => { + return await request.post({ url: '/system/dept/delete-list', params: { ids: ids.join(',') } }) +} diff --git a/src/api/system/dict/dict.data.ts b/src/api/system/dict/dict.data.ts new file mode 100644 index 0000000..5d3820f --- /dev/null +++ b/src/api/system/dict/dict.data.ts @@ -0,0 +1,68 @@ +import request from '@/config/axios' + +export interface DictDataVO { + id: number + sort: number + label: string + value: string + dictType: string + status: number + colorType: string + cssClass: string + remark: string + createTime: Date +} + +// 查询字典数据(精简)列表 +export const getSimpleDictDataList = () => { + return request.get({ url: '/system/dict-data/simple-list' }) +} + +// 查询字典数据列表 +/** 字典数据分页查询条件 */ +export interface DictDataPageReqVO extends PageParam { + dictType?: string | string[] + label?: string + keyword?: string + remark?: string + status?: number +} + +export const getDictDataPage = (params: DictDataPageReqVO) => { + return request.get({ url: '/system/dict-data/page', params }) +} + +// 查询字典数据详情 +export const getDictData = (id: number) => { + return request.get({ url: '/system/dict-data/get?id=' + id }) +} + +// 根据字典类型查询字典数据 +export const getDictDataByType = (dictType: string) => { + return request.get({ url: '/system/dict-data/type?type=' + dictType }) +} + +// 新增字典数据 +export const createDictData = (data: DictDataVO) => { + return request.post({ url: '/system/dict-data/create', data }) +} + +// 修改字典数据 +export const updateDictData = (data: DictDataVO) => { + return request.post({ url: '/system/dict-data/update', data }) +} + +// 删除字典数据 +export const deleteDictData = (id: number) => { + return request.post({ url: '/system/dict-data/delete?id=' + id }) +} + +// 批量删除字典数据 +export const deleteDictDataList = (ids: number[]) => { + return request.post({ url: '/system/dict-data/delete-list', params: { ids: ids.join(',') } }) +} + +// 导出字典数据 +export const exportDictData = (params: Record) => { + return request.download({ url: '/system/dict-data/export-excel', params }) +} diff --git a/src/api/system/dict/dict.type.ts b/src/api/system/dict/dict.type.ts new file mode 100644 index 0000000..1e0477a --- /dev/null +++ b/src/api/system/dict/dict.type.ts @@ -0,0 +1,87 @@ +import request from '@/config/axios' + +export interface DictTypeVO { + id: number + name: string + type: string + status: number + remark: string + createTime: Date +} + +// 查询字典(精简)列表 +export const getSimpleDictTypeList = (): Promise => { + return request.get({ url: '/system/dict-type/simple-list' }) +} + +// 查询字典列表 +export const getDictTypePage = (params: PageParam) => { + return request.get({ url: '/system/dict-type/page', params }) +} + +// 查询字典详情 +export const getDictType = (id: number) => { + return request.get({ url: '/system/dict-type/get?id=' + id }) +} + +// 新增字典 +export const createDictType = (data: DictTypeVO) => { + return request.post({ url: '/system/dict-type/create', data }) +} + +// 修改字典 +export const updateDictType = (data: DictTypeVO) => { + return request.post({ url: '/system/dict-type/update', data }) +} + +// 删除字典 +export const deleteDictType = (id: number) => { + return request.post({ url: '/system/dict-type/delete?id=' + id }) +} + +// 批量删除字典类型 +export const deleteDictTypeList = (ids: number[]) => { + return request.post({ url: '/system/dict-type/delete-list', params: { ids: ids.join(',') } }) +} + +// 导出字典 +export const exportDictType = (params) => { + return request.download({ + url: '/system/dict-type/export-excel', + params + }) +} + +/** 导出选中类型及其全部字典值,包括停用数据。 */ +export const exportDictPackage = (ids: number[]): Promise => { + return request.download({ + url: '/system/dict-type/export-package', + params: { ids: ids.join(',') }, + timeout: DICT_TRANSFER_TIMEOUT + }) +} + +/** 批量文件操作单独延长等待时间,不改全局请求配置。 */ +const DICT_TRANSFER_TIMEOUT = 120000 + +export interface DictImportResult { + createdTypes: number + updatedTypes: number + skippedTypes: number + createdValues: number + updatedValues: number + skippedValues: number +} + +/** 使用业务编码匹配已有数据,不提交来源系统主键。 */ +export const importDictExcel = (file: File, updateSupport: boolean): Promise => { + const data = new FormData() + data.append('file', file) + return request.post({ + url: '/system/dict-type/import-excel', + params: { updateSupport }, + data, + headersType: 'multipart/form-data', + timeout: DICT_TRANSFER_TIMEOUT + }) +} diff --git a/src/api/system/dingtalkTemplate/index.ts b/src/api/system/dingtalkTemplate/index.ts new file mode 100644 index 0000000..49f482b --- /dev/null +++ b/src/api/system/dingtalkTemplate/index.ts @@ -0,0 +1,99 @@ +import request from '@/config/axios' + +/** 钉钉消息类型:文本 / Markdown / 卡片(带按钮,无跳转地址时按 Markdown 发送) */ +export type DingtalkTemplateMsgType = 'TEXT' | 'MARKDOWN' | 'ACTION_CARD' + +export const DINGTALK_MSG_TYPE_OPTIONS: { label: string; value: DingtalkTemplateMsgType }[] = [ + { label: '文本', value: 'TEXT' }, + { label: 'Markdown', value: 'MARKDOWN' }, + { label: '卡片', value: 'ACTION_CARD' } +] + +export const dingtalkMsgTypeLabel = (type?: string) => + DINGTALK_MSG_TYPE_OPTIONS.find((item) => item.value === type)?.label || type || '-' + +/** 钉钉消息模板,业务按编码引用 */ +export interface DingtalkTemplateVO { + id?: number + code: string + name: string + msgType: DingtalkTemplateMsgType + title?: string + content: string + buttonTitle?: string + /** 可用参数说明,每行一个,形如“{title} 日程标题” */ + paramDesc?: string + status: number + builtIn?: boolean + remark?: string + updateTime?: number | string +} + +export interface DingtalkTemplatePageReqVO extends PageParam { + keyword?: string + msgType?: string + status?: number +} + +export interface DingtalkTemplatePreviewReqVO { + msgType: string + title?: string + content: string + buttonTitle?: string + params?: Record +} + +export interface DingtalkTemplatePreviewRespVO { + msgType: string + title?: string + content: string + buttonTitle?: string +} + +/** 参数说明中的一项 */ +export interface DingtalkTemplateParam { + name: string + desc: string +} + +/** 解析参数说明:每行“{参数名} 说明” */ +export const parseParamDesc = (paramDesc?: string): DingtalkTemplateParam[] => + (paramDesc || '') + .split(/\r?\n/) + .map((line) => line.trim().match(/^\{(\w+)\}\s*(.*)$/)) + .filter((match): match is RegExpMatchArray => !!match) + .map((match) => ({ name: match[1], desc: match[2] })) + +// 查询模板分页 +export const getDingtalkTemplatePage = ( + params: DingtalkTemplatePageReqVO +): Promise> => + request.get({ url: '/system/dingtalk-template/page', params }) + +// 查询模板详情 +export const getDingtalkTemplate = (id: number): Promise => + request.get({ url: '/system/dingtalk-template/get', params: { id } }) + +// 新增模板 +export const createDingtalkTemplate = (data: DingtalkTemplateVO): Promise => + request.post({ url: '/system/dingtalk-template/create', data }) + +// 修改模板 +export const updateDingtalkTemplate = (data: DingtalkTemplateVO): Promise => + request.post({ url: '/system/dingtalk-template/update', data }) + +// 删除模板(内置模板不能删除) +export const deleteDingtalkTemplate = (id: number): Promise => + request.post({ url: '/system/dingtalk-template/delete?id=' + id }) + +// 按编辑中的内容预览 +export const previewDingtalkTemplate = ( + data: DingtalkTemplatePreviewReqVO +): Promise => + request.post({ url: '/system/dingtalk-template/preview', data }) + +// 按已保存的模板发给当前登录人测试 +export const sendTestDingtalkTemplate = (data: { + id: number + params?: Record +}): Promise => request.post({ url: '/system/dingtalk-template/send-test', data }) diff --git a/src/api/system/ehrSync/index.ts b/src/api/system/ehrSync/index.ts new file mode 100644 index 0000000..4a4f89d --- /dev/null +++ b/src/api/system/ehrSync/index.ts @@ -0,0 +1,102 @@ +import request from '@/config/axios' + +/** 人事同步批次 */ +export interface EhrSyncBatchVO { + id: number + /** 触发方式:1 手动,2 定时 */ + triggerType: number + /** 批次状态:0 执行中,1 成功,2 部分成功,3 失败 */ + status: number + personCount: number + createdCount: number + boundCount: number + skippedCount: number + failedCount: number + balanceUserCount: number + balanceFailedCount: number + operatorUserId?: number + operatorUserName?: string + startTime?: number + endTime?: number + errorMessage?: string +} + +/** 人事同步条目:只记新增、关联、跳过和失败 */ +export interface EhrSyncItemVO { + id: number + batchId: number + /** 对象类型:1 人员,2 假期余额 */ + objectType: number + /** 处理结果:1 新增账号,2 关联已有账号,3 跳过,4 失败 */ + actionType: number + ehrPersonId?: string + ehrName?: string + ehrNumber?: string + ehrPhone?: string + ehrDeptPath?: string + userId?: number + username?: string + message?: string + createTime?: number +} + +/** 员工假期余额 */ +export interface EhrLeaveBalanceVO { + id: number + userId: number + nickname?: string + username?: string + mobile?: string + deptName?: string + leaveName: string + balance?: number + syncTime?: number +} + +export interface EhrSyncBatchPageReqVO extends PageParam { + status?: number + triggerType?: number +} + +export interface EhrSyncItemPageReqVO extends PageParam { + batchId: number + objectType?: number + actionType?: number + keyword?: string +} + +export interface EhrLeaveBalancePageReqVO extends PageParam { + keyword?: string + leaveName?: string +} + +// 手动执行一次人事同步,后台执行,返回批次编号 +export const executeEhrSync = (): Promise => { + return request.post({ url: '/system/ehr-sync/execute' }) +} + +// 查询人事同步批次,用于轮询进度 +export const getEhrSyncBatch = (id: number): Promise => { + return request.get({ url: '/system/ehr-sync/batch/get', params: { id } }) +} + +// 分页查询人事同步批次 +export const getEhrSyncBatchPage = ( + params: EhrSyncBatchPageReqVO +): Promise> => { + return request.get({ url: '/system/ehr-sync/batch/page', params }) +} + +// 分页查询人事同步条目 +export const getEhrSyncItemPage = ( + params: EhrSyncItemPageReqVO +): Promise> => { + return request.get({ url: '/system/ehr-sync/item/page', params }) +} + +// 分页查询员工假期余额 +export const getEhrLeaveBalancePage = ( + params: EhrLeaveBalancePageReqVO +): Promise> => { + return request.get({ url: '/system/ehr-sync/leave-balance/page', params }) +} diff --git a/src/api/system/holiday/index.ts b/src/api/system/holiday/index.ts new file mode 100644 index 0000000..3999f91 --- /dev/null +++ b/src/api/system/holiday/index.ts @@ -0,0 +1,79 @@ +import request from '@/config/axios' + +/** + * 节假日日期统一转为 yyyy-MM-dd:后端返回 "yyyy-MM-dd" 字符串, + * 兼容 LocalDate 序列化为 [年, 月, 日] 数组的情况;无法识别时原样转字符串。 + */ +export const formatHolidayDate = (value: unknown): string => { + if (value === undefined || value === null) return '' + if (Array.isArray(value)) { + const [year, month, day] = value.map(Number) + if (!year || !month || !day) return '' + return `${year}-${String(month).padStart(2, '0')}-${String(day).padStart(2, '0')}` + } + return String(value) +} + +/** 节假日,用于请假天数等工作日计算 */ +export interface HolidayVO { + id?: number + /** 节假日日期 yyyy-MM-dd */ + holidayDate: string + /** 日期类型 */ + dayType?: number + name: string + remark?: string + createTime?: number | string +} + +/** 日期类型:放假不计工作日,调休上班计工作日 */ +export const HOLIDAY_DAY_TYPE = { HOLIDAY: 1, MAKEUP_WORKDAY: 2 } as const + +export const HOLIDAY_DAY_TYPE_OPTIONS = [ + { label: '放假', value: HOLIDAY_DAY_TYPE.HOLIDAY }, + { label: '调休上班', value: HOLIDAY_DAY_TYPE.MAKEUP_WORKDAY } +] + +export interface HolidayPageReqVO extends PageParam { + year?: number + name?: string +} + +/** 按日期区间批量新增:区间内逐日生成,已存在的日期跳过 */ +export interface HolidayBatchCreateReqVO { + /** 开始日期 yyyy-MM-dd */ + startDate: string + /** 结束日期 yyyy-MM-dd */ + endDate: string + dayType?: number + name: string + remark?: string +} + +// 查询节假日分页 +export const getHolidayPage = (params: HolidayPageReqVO): Promise> => + request.get({ url: '/system/holiday/page', params }) + +// 查询节假日详情 +export const getHoliday = (id: number): Promise => + request.get({ url: '/system/holiday/get', params: { id } }) + +// 新增节假日 +export const createHoliday = (data: HolidayVO): Promise => + request.post({ url: '/system/holiday/create', data }) + +// 修改节假日(与平台其他管理接口一致使用 POST) +export const updateHoliday = (data: HolidayVO): Promise => + request.post({ url: '/system/holiday/update', data }) + +// 删除节假日 +export const deleteHoliday = (id: number): Promise => + request.post({ url: '/system/holiday/delete?id=' + id }) + +// 按日期区间批量新增节假日,返回值由后端定义(通常为新增条数) +export const batchCreateHoliday = (data: HolidayBatchCreateReqVO): Promise => + request.post({ url: '/system/holiday/batch-create', data }) + +// 查询某年的节假日列表 +export const getHolidayListByYear = (year: number): Promise => + request.get({ url: '/system/holiday/list-by-year', params: { year } }) diff --git a/src/api/system/loginLog/index.ts b/src/api/system/loginLog/index.ts new file mode 100644 index 0000000..a785d75 --- /dev/null +++ b/src/api/system/loginLog/index.ts @@ -0,0 +1,32 @@ +import request from '@/config/axios' + +export interface LoginLogVO { + id: number + logType: number + clientType?: number + traceId: number + userId: number + userType: number + username: string + nickname?: string + userName?: string + result: number + status: number + userIp: string + loginLocation?: string + location?: string + reason?: string + failureReason?: string + userAgent: string + createTime: Date +} + +// 查询登录日志列表 +export const getLoginLogPage = (params: PageParam) => { + return request.get({ url: '/system/login-log/page', params }) +} + +// 导出登录日志 +export const exportLoginLog = (params) => { + return request.download({ url: '/system/login-log/export-excel', params }) +} diff --git a/src/api/system/mail/account/index.ts b/src/api/system/mail/account/index.ts new file mode 100644 index 0000000..e50c86d --- /dev/null +++ b/src/api/system/mail/account/index.ts @@ -0,0 +1,50 @@ +import request from '@/config/axios' + +export interface MailAccountVO { + id: number + mail: string + username: string + password: string + host: string + port: number + sslEnable: boolean + starttlsEnable: boolean +} + +// 查询邮箱账号列表 +export const getMailAccountPage = async (params: PageParam) => { + return await request.get({ url: '/system/mail-account/page', params }) +} + +// 查询邮箱账号详情 +export const getMailAccount = async (id: number) => { + return await request.get({ url: '/system/mail-account/get?id=' + id }) +} + +// 新增邮箱账号 +export const createMailAccount = async (data: MailAccountVO) => { + return await request.post({ url: '/system/mail-account/create', data }) +} + +// 修改邮箱账号 +export const updateMailAccount = async (data: MailAccountVO) => { + return await request.post({ url: '/system/mail-account/update', data }) +} + +// 删除邮箱账号 +export const deleteMailAccount = async (id: number) => { + return await request.post({ url: '/system/mail-account/delete?id=' + id }) +} + +// 批量删除邮箱账号 +export const deleteMailAccountList = async (ids: number[]) => { + return await request.post({ + url: '/system/mail-account/delete-list', + params: { ids: ids.join(',') } + }) +} + +// 获得邮箱账号精简列表 +export const getSimpleMailAccountList = async () => { + return request.get({ url: '/system/mail-account/simple-list' }) +} diff --git a/src/api/system/mail/log/index.ts b/src/api/system/mail/log/index.ts new file mode 100644 index 0000000..409ced6 --- /dev/null +++ b/src/api/system/mail/log/index.ts @@ -0,0 +1,37 @@ +import request from '@/config/axios' + +export interface MailLogVO { + id: number + userId: number + userType: number + toMails: string[] + ccMails?: string[] + bccMails?: string[] + accountId: number + fromMail: string + templateId: number + templateCode: string + templateNickname: string + templateTitle: string + templateContent: string + templateParams: string + sendStatus: number + sendTime: Date + sendMessageId: string + sendException: string +} + +// 查询邮件日志列表 +export const getMailLogPage = async (params: PageParam) => { + return await request.get({ url: '/system/mail-log/page', params }) +} + +// 查询邮件日志详情 +export const getMailLog = async (id: number) => { + return await request.get({ url: '/system/mail-log/get?id=' + id }) +} + +// 导出邮件日志 +export const exportMailLog = (params) => { + return request.download({ url: '/system/mail-log/export-excel', params }) +} diff --git a/src/api/system/mail/template/index.ts b/src/api/system/mail/template/index.ts new file mode 100644 index 0000000..86121db --- /dev/null +++ b/src/api/system/mail/template/index.ts @@ -0,0 +1,58 @@ +import request from '@/config/axios' + +export interface MailTemplateVO { + id?: number + name: string + code: string + accountId: number + nickname: string + title: string + content: string + status: number +} + +export interface MailSendReqVO { + toMails: string[] + ccMails?: string[] + bccMails?: string[] + templateCode: string + templateParams: Map +} + +// 查询邮件模版列表 +export const getMailTemplatePage = async (params: PageParam) => { + return await request.get({ url: '/system/mail-template/page', params }) +} + +// 查询邮件模版详情 +export const getMailTemplate = async (id: number) => { + return await request.get({ url: '/system/mail-template/get?id=' + id }) +} + +// 新增邮件模版 +export const createMailTemplate = async (data: MailTemplateVO) => { + return await request.post({ url: '/system/mail-template/create', data }) +} + +// 修改邮件模版 +export const updateMailTemplate = async (data: MailTemplateVO) => { + return await request.post({ url: '/system/mail-template/update', data }) +} + +// 删除邮件模版 +export const deleteMailTemplate = async (id: number) => { + return await request.post({ url: '/system/mail-template/delete?id=' + id }) +} + +// 批量删除邮件模版 +export const deleteMailTemplateList = async (ids: number[]) => { + return await request.post({ + url: '/system/mail-template/delete-list', + params: { ids: ids.join(',') } + }) +} + +// 发送邮件 +export const sendMail = (data: MailSendReqVO) => { + return request.post({ url: '/system/mail-template/send-mail', data }) +} diff --git a/src/api/system/menu/index.ts b/src/api/system/menu/index.ts new file mode 100644 index 0000000..eb1ea90 --- /dev/null +++ b/src/api/system/menu/index.ts @@ -0,0 +1,52 @@ +import request from '@/config/axios' +import type { MenuPermission } from '@/utils/menuPermission' + +export interface MenuVO { + id: number + applicationId?: number + menuCode: string + name: string + permission: string + type: number + sort: number + parentId: number + path: string + icon: string + component: string + componentName?: string + status: number + visible: boolean + keepAlive: boolean + alwaysShow?: boolean + createTime: Date +} + +// 查询菜单(精简)列表 +export const getSimpleMenusList = (params?: { applicationId?: number; menuCode?: MenuPermission }) => { + return request.get({ url: '/system/menu/simple-list', params }) +} + +// 查询菜单列表 +export const getMenuList = (params: Record) => { + return request.get({ url: '/system/menu/list', params }) +} + +// 获取菜单详情 +export const getMenu = (id: number) => { + return request.get({ url: '/system/menu/get?id=' + id }) +} + +// 新增菜单 +export const createMenu = (data: MenuVO) => { + return request.post({ url: '/system/menu/create', data }) +} + +// 修改菜单 +export const updateMenu = (data: MenuVO) => { + return request.post({ url: '/system/menu/update', data }) +} + +// 删除菜单 +export const deleteMenu = (id: number) => { + return request.post({ url: '/system/menu/delete?id=' + id }) +} diff --git a/src/api/system/notice/index.ts b/src/api/system/notice/index.ts new file mode 100644 index 0000000..c73f606 --- /dev/null +++ b/src/api/system/notice/index.ts @@ -0,0 +1,148 @@ +import request from '@/config/axios' +import type { UnifiedFileRespVO } from '@/api/infra/file' +import type { DeptVO } from '@/api/system/dept' +import type { PostVO } from '@/api/system/post' +import type { UserVO } from '@/api/system/user' +import type { UserGroupVO } from '@/api/system/userGroup' + +/** 信息发布菜单授权的表单及选人选项;发布人组织回显不代表可选范围。 */ +export interface NoticePublishOptions { + all: boolean + /** 全部数据或集团有效任职对应角色具有本级及以下权限。 */ + canPublishGroup: boolean + depts: DeptVO[] + users: UserVO[] + posts: PostVO[] + groups: UserGroupVO[] + publishDeptId: number + publishDeptName: string + publishOrgId?: number + publishOrgName: string +} + +/** 固定按信息发布菜单权限计算,避免借用其他菜单范围。 */ +export const getNoticePublishOptions = (): Promise => + request.get({ url: '/system/notice/publish-options' }) + +/** PDF 转图结果,按页序返回公开稳定图片地址。 */ +export interface NoticePdfImage { + fileId: number + name: string + url: string +} + +/** 将本人上传的 PDF 逐页转换为正文图片。 */ +export const convertNoticePdf = (fileId: number): Promise => { + return request.post({ url: '/system/notice/convert-pdf', params: { fileId }, timeout: 180000 }) +} + +export type PublishScope = 'GROUP' | 'CURRENT' | 'SELECTED_COMPANIES' | 'SPECIFIED_USERS' +export type ContentFormat = 'ONLINE' | 'PDF' +export type PublishChannel = 'INTERNAL' | 'WEBSITE' | 'WECHAT' + +export enum PublishStatus { + DRAFT = 0, + PUBLISHED = 1, + REVOKED = 2 +} + +export interface NoticeVO { + id?: number + title: string + type: number + category?: number + templateCode?: string + publishScope: PublishScope + scopeDeptIds: number[] + scopeUserIds: number[] + publisherName: string + /** 原发布部门,仅用于编辑时解析所属单位,不提交修改发布身份。 */ + publishDeptId?: number + publishDeptName: string + publishOrgName: string + contentFormat: ContentFormat + content: string + // PDF 文件编号(保存时提交,须为本人上传或公告原有文件) + pdfFileId?: number + // PDF 文件名(详情返回) + pdfName?: string + // PDF 访问地址(仅详情返回的短时签名地址,历史公告可能为旧地址),禁止回传保存 + pdfUrl?: string + /** 附件只保存文件编号,访问地址仅详情返回。 */ + attachmentFileIds?: number[] + attachments?: UnifiedFileRespVO[] + coverUrl?: string + viewCount?: number + isCarousel?: boolean + channels: PublishChannel[] + status: number + publishStatus: number + publishTime?: string | Date + /** 公众号草稿同步状态:1 同步中、2 已同步、3 同步失败;未勾选公众号或未发布时为空。 */ + wechatSyncStatus?: WechatSyncStatus + /** 公众号草稿同步结果说明,失败时为原因。 */ + wechatSyncMessage?: string + wechatSyncTime?: string | Date + createTime?: Date +} + +/** 公众号草稿同步状态。 */ +export enum WechatSyncStatus { + SYNCING = 1, + SUCCESS = 2, + FAILED = 3 +} + +// 查询公告列表 +export const getNoticePage = ( + params: PageParam & { title?: string; category?: number; channel?: string } +) => { + return request.get({ url: '/system/notice/page', params }) +} + +// 查询公告详情 +export const getNotice = (id: number) => { + return request.get({ url: '/system/notice/get?id=' + id }) +} + +/** 附件访问前重新校验引用关系并刷新签名地址。 */ +export const getNoticeAttachment = (id: number, fileId: number): Promise => { + return request.get({ url: '/system/notice/attachment', params: { id, fileId } }) +} + +// 新增公告 +export const createNotice = (data: NoticeVO) => { + return request.post({ url: '/system/notice/create', data }) +} + +// 修改公告 +export const updateNotice = (data: NoticeVO) => { + return request.post({ url: '/system/notice/update', data }) +} + +// 删除公告 +export const deleteNotice = (id: number) => { + return request.post({ url: '/system/notice/delete?id=' + id }) +} + +// 批量删除公告 +export const deleteNoticeList = (ids: number[]) => { + return request.post({ url: '/system/notice/delete-list', params: { ids: ids.join(',') } }) +} + +// 推送公告 +export const pushNotice = (id: number) => { + return request.post({ url: '/system/notice/push?id=' + id }) +} + +export const updateNoticePublishStatus = (id: number, publishStatus: PublishStatus) => { + return request.post({ + url: '/system/notice/update-publish-status', + params: { id, publishStatus } + }) +} + +/** 将已发布且勾选公众号的信息同步到公众号草稿箱(失败重试或内容变更后重推)。 */ +export const syncNoticeWechat = (id: number) => { + return request.post({ url: '/system/notice/sync-wechat', params: { id }, timeout: 180000 }) +} diff --git a/src/api/system/notify/message/index.ts b/src/api/system/notify/message/index.ts new file mode 100644 index 0000000..ed17483 --- /dev/null +++ b/src/api/system/notify/message/index.ts @@ -0,0 +1,49 @@ +import request from '@/config/axios' +import qs from 'qs' + +export interface NotifyMessageVO { + id: number + userId: number + userType: number + templateId: number + templateCode: string + templateNickname: string + templateContent: string + templateType: number + templateParams: string + readStatus: boolean + readTime: Date + createTime: Date +} + +// 查询站内信消息列表 +export const getNotifyMessagePage = async (params: PageParam) => { + return await request.get({ url: '/system/notify-message/page', params }) +} + +// 获得我的站内信分页 +export const getMyNotifyMessagePage = async (params: PageParam) => { + return await request.get({ url: '/system/notify-message/my-page', params }) +} + +// 批量标记已读 +export const updateNotifyMessageRead = async (ids) => { + return await request.post({ + url: '/system/notify-message/update-read?' + qs.stringify({ ids: ids }, { indices: false }) + }) +} + +// 标记所有站内信为已读 +export const updateAllNotifyMessageRead = async () => { + return await request.post({ url: '/system/notify-message/update-all-read' }) +} + +// 获取当前用户的最新站内信列表 +export const getUnreadNotifyMessageList = async () => { + return await request.get({ url: '/system/notify-message/get-unread-list' }) +} + +// 获得当前用户的未读站内信数量 +export const getUnreadNotifyMessageCount = async () => { + return await request.get({ url: '/system/notify-message/get-unread-count' }) +} diff --git a/src/api/system/notify/template/index.ts b/src/api/system/notify/template/index.ts new file mode 100644 index 0000000..37a89fd --- /dev/null +++ b/src/api/system/notify/template/index.ts @@ -0,0 +1,57 @@ +import request from '@/config/axios' + +export interface NotifyTemplateVO { + id?: number + name: string + nickname: string + code: string + content: string + type?: number + params: string + status: number + remark: string +} + +export interface NotifySendReqVO { + userId: number | null + templateCode: string + templateParams: Map +} + +// 查询站内信模板列表 +export const getNotifyTemplatePage = async (params: PageParam) => { + return await request.get({ url: '/system/notify-template/page', params }) +} + +// 查询站内信模板详情 +export const getNotifyTemplate = async (id: number) => { + return await request.get({ url: '/system/notify-template/get?id=' + id }) +} + +// 新增站内信模板 +export const createNotifyTemplate = async (data: NotifyTemplateVO) => { + return await request.post({ url: '/system/notify-template/create', data }) +} + +// 修改站内信模板 +export const updateNotifyTemplate = async (data: NotifyTemplateVO) => { + return await request.post({ url: '/system/notify-template/update', data }) +} + +// 删除站内信模板 +export const deleteNotifyTemplate = async (id: number) => { + return await request.post({ url: '/system/notify-template/delete?id=' + id }) +} + +// 批量删除站内信模板 +export const deleteNotifyTemplateList = async (ids: number[]) => { + return await request.post({ + url: '/system/notify-template/delete-list', + params: { ids: ids.join(',') } + }) +} + +// 发送站内信 +export const sendNotify = (data: NotifySendReqVO) => { + return request.post({ url: '/system/notify-template/send-notify', data }) +} diff --git a/src/api/system/oauth2/client.ts b/src/api/system/oauth2/client.ts new file mode 100644 index 0000000..14fe864 --- /dev/null +++ b/src/api/system/oauth2/client.ts @@ -0,0 +1,79 @@ +import request from '@/config/axios' +import { MenuPermission } from '@/utils/menuPermission' + +export interface OAuth2ClientVO { + id: number + code?: string + applicationCode?: string + appCode?: string + clientId: string + secret: string + name: string + applicationName?: string + appName?: string + logo: string + description: string + status: number + defaultApplication?: boolean + applicationType?: number + protocol?: string + mobile?: boolean | number + supportMobile?: boolean | number + trustLevel?: string | number + ssoStatus?: number + sort?: number + pcUrl?: string + workbenchUrl?: string + logoutUrl?: string + issuer?: string + accessTokenValiditySeconds: number + refreshTokenValiditySeconds: number + redirectUris: string[] + autoApprove: boolean + authorizedGrantTypes: string[] + scopes: string[] + autoApproveScopes?: string[] + authorities: string[] + resourceIds: string[] + additionalInformation: string + isAdditionalInformationJson: boolean + createTime: Date +} + +// 查询 OAuth2 客户端的列表 +export const getOAuth2ClientPage = (params: PageParam) => { + return request.get({ url: '/system/oauth2-client/page', params }) +} + +// 查询 OAuth2 客户端的精简列表 +export const getSimpleOAuth2ClientList = (menuCode?: MenuPermission): Promise => { + return request.get({ url: '/system/application/simple-list', params: { menuCode } }) +} + +// 查询 OAuth2 客户端的详情 +export const getOAuth2Client = (id: number) => { + return request.get({ url: '/system/oauth2-client/get?id=' + id }) +} + +// 新增 OAuth2 客户端 +export const createOAuth2Client = (data: OAuth2ClientVO) => { + return request.post({ url: '/system/oauth2-client/create', data }) +} + +// 修改 OAuth2 客户端 +export const updateOAuth2Client = (data: OAuth2ClientVO) => { + return request.post({ url: '/system/oauth2-client/update', data }) +} + +// 删除 OAuth2 +export const deleteOAuth2Client = (id: number) => { + return request.post({ url: '/system/oauth2-client/delete?id=' + id }) +} + +// 批量删除 OAuth2 客户端 +export const deleteOAuth2ClientList = (ids: number[]) => { + return request.post({ + url: '/system/oauth2-client/delete-list', + params: { ids: ids.join(',') } + }) +} diff --git a/src/api/system/oauth2/token.ts b/src/api/system/oauth2/token.ts new file mode 100644 index 0000000..d245afd --- /dev/null +++ b/src/api/system/oauth2/token.ts @@ -0,0 +1,38 @@ +import request from '@/config/axios' + +export interface OAuth2TokenVO { + id: number + accessToken: string + refreshToken: string + userId: number + userType: number + clientId: string + /** 客户端对应的应用名称;历史客户端无法匹配应用时为空。 */ + applicationName?: string + /** 在线菜单授权范围内的用户展示信息,由后端批量填写。 */ + username?: string + nickname?: string + deptPath?: string + /** 登录渠道:0 PC端、1 移动端;历史令牌可能为空。 */ + clientType?: number | null + createTime: Date + expiresTime: Date +} + +export interface OAuth2TokenPageReqVO extends PageParam { + userId?: number + userType?: number + clientId?: string +} + +// 查询 token列表 +export const getAccessTokenPage = ( + params: OAuth2TokenPageReqVO +): Promise> => { + return request.get({ url: '/system/oauth2-token/page', params }) +} + +// 删除 token +export const deleteAccessToken = (accessToken: string) => { + return request.post({ url: '/system/oauth2-token/delete', params: { accessToken } }) +} diff --git a/src/api/system/operatelog/index.ts b/src/api/system/operatelog/index.ts new file mode 100644 index 0000000..0438faa --- /dev/null +++ b/src/api/system/operatelog/index.ts @@ -0,0 +1,33 @@ +import request from '@/config/axios' + +export type OperateLogVO = { + id: number + traceId: string + userType: number + userId: number + userName: string + userAccount?: string + type: string + subType: string + bizId: number + /** 业务对象名称快照。 */ + bizName?: string + action: string + extra: string + requestMethod: string + requestUrl: string + userIp: string + userAgent: string + creator: string + creatorName: string + createTime: Date +} + +// 查询操作日志列表 +export const getOperateLogPage = (params: PageParam) => { + return request.get({ url: '/system/operate-log/page', params }) +} +// 导出操作日志 +export const exportOperateLog = (params: Record) => { + return request.download({ url: '/system/operate-log/export-excel', params }) +} diff --git a/src/api/system/organization/index.ts b/src/api/system/organization/index.ts new file mode 100644 index 0000000..59f5228 --- /dev/null +++ b/src/api/system/organization/index.ts @@ -0,0 +1,249 @@ +import request from '@/config/axios' +import { MenuPermission } from '@/utils/menuPermission' +import type { PostVO } from '@/api/system/post' + +/** 组织管理人员、候选人员精简信息 */ +export interface OrganizationUser { + id: number + nickname: string + mobile?: string + disabled?: boolean // 已停用或离职 +} + +/** 组织信息 */ +export interface Organization { + id: number // 组织id + name?: string // 组织名称 + shortName?: string // 组织简称(兼容页面展示) + orgCode?: string // 组织编号(现有部门数据暂无此字段) + orgType?: string // 组织类型 + parentId: number // 父组织id + parentName?: string // 父组织名称 + sort?: number // 显示顺序 + managerUserIds?: number[] // 部门经理 + deputyManagerUserIds?: number[] // 部门副经理 + postIds?: number[] // 选中的岗位;编辑时不传则保留原有关联 + posts?: PostVO[] // 详情回显当前用户可管理的已有岗位 + supervisorUserId?: number // 分管领导 + managerUsers?: OrganizationUser[] + deputyManagerUsers?: OrganizationUser[] + supervisorUser?: OrganizationUser + phone?: string // 联系电话 + email?: string // 邮箱 + taxNum?: string // 税号(兼容历史页面字段) + contactName?: string // 联系人 + contactMobile?: string // 联系手机 + status?: number // 状态 + remark?: string // 备注 + dataSource?: number // 数据来源:1 人事、2 自建 + employeeCount?: number // 在职人员数量 + createTime?: Date + children?: Organization[] +} + +interface DeptRecord { + id: number + name: string + orgCode?: string + shortName?: string + orgType?: string + parentId?: number + sort?: number + managerUserIds?: number[] + deputyManagerUserIds?: number[] + posts?: PostVO[] + supervisorUserId?: number + managerUsers?: OrganizationUser[] + deputyManagerUsers?: OrganizationUser[] + supervisorUser?: OrganizationUser + phone?: string + email?: string + status?: number + remark?: string + createTime?: Date +} + +interface DeptSavePayload { + id?: number + name: string + orgCode: string + shortName?: string + orgType?: string + parentId: number + sort: number + managerUserIds: number[] + deputyManagerUserIds: number[] + postIds?: number[] // 不传时兼容原有新增、编辑请求 + phone?: string + email?: string + status: number + remark?: string +} + +const toOrganization = (dept: DeptRecord): Organization => ({ + ...dept, + parentId: dept.parentId ?? 0, + shortName: dept.shortName, + orgType: dept.orgType || (dept.parentId ? 'department' : 'group'), + contactMobile: dept.phone +}) + +const toDeptSavePayload = (organization: Organization): DeptSavePayload => ({ + id: organization.id, + name: organization.name || '', + orgCode: organization.orgCode || '', + shortName: organization.shortName, + orgType: organization.orgType, + parentId: organization.parentId ?? 0, + sort: organization.sort ?? 0, + managerUserIds: organization.managerUserIds || [], + deputyManagerUserIds: organization.deputyManagerUserIds || [], + postIds: organization.postIds, + phone: organization.phone || organization.contactMobile, + email: organization.email, + status: organization.status ?? 0, + remark: organization.remark +}) + +export interface OrganizationPageReqVO extends PageParam { + name?: string + orgCode?: string + parentId?: number + taxNum?: string + contactName?: string + contactMobile?: string + status?: number + createTime?: string[] +} + +/** 合并拆分影响预览中的人员。 */ +export interface OrganizationChangeMember { + id: number + name: string + username?: string + deptId: number +} + +/** 影响范围内的启用岗位。 */ +export interface OrganizationChangePosition { + id: number + name: string + code: string +} + +/** 合并拆分前的组织关联数据。 */ +export interface OrganizationChangeImpact { + members: OrganizationChangeMember[] + directMembers: OrganizationChangeMember[] + childCount: number + positions: OrganizationChangePosition[] + roleCount: number +} + +/** 合并组织时可选的岗位和角色范围迁移。 */ +export interface OrganizationMergeRequest { + sourceId: number + targetId: number + migrateMembers: boolean + migrateSubOrgs: boolean + migratePositions: boolean + migrateRoles: boolean +} + +/** 拆分组织时新组织与源组织同级。 */ +export interface OrganizationSplitRequest { + sourceId: number + name: string + orgCode: string + orgType: string + childIds: number[] + userIds: number[] + migrateUserPositions: boolean + copyRoles: boolean +} + +// 组织 API +export const OrganizationApi = { + /** 顶部组织切换使用通用启用组织列表,不依赖组织架构菜单权限。 */ + getSwitcherOrganizations: async (): Promise => { + const list = await request.get({ url: '/system/dept/simple-list' }) + return (list || []).map(toOrganization) + }, + /** 查询合并拆分影响。 */ + getChangeImpact: (id: number): Promise => + request.get({ url: '/system/dept/change-impact', params: { id } }), + + /** 按当前拆分选择刷新影响范围。 */ + getSplitImpact: (id: number, childIds: number[], userIds: number[]): Promise => + request.get({ url: '/system/dept/split-impact', params: { + id, + ...(childIds.length ? { childIds: childIds.join(',') } : {}), + ...(userIds.length ? { userIds: userIds.join(',') } : {}) + } }), + + /** 合并组织及直属关联。 */ + mergeOrganization: (data: OrganizationMergeRequest): Promise => + request.post({ url: '/system/dept/merge', data }), + + /** 从现有组织拆出同级组织。 */ + splitOrganization: (data: OrganizationSplitRequest): Promise => + request.post({ url: '/system/dept/split', data }), + + /** 查询组织架构树,使用组织架构菜单的任职数据范围。 */ + getOrganizationPage: async (params: OrganizationPageReqVO) => { + const list = await request.get({ + url: '/system/dept/organization-tree', + params: { + menuCode: MenuPermission.ORGANIZATION, + name: params.name, + status: params.status + } + }) + const organizations = list.map(toOrganization) + return { + list: organizations, + total: organizations.length + } as PageResult + }, + + // 查询组织详情 + getOrganization: async (id: number) => { + const dept = await request.get({ url: '/system/dept/get?id=' + id }) + return toOrganization(dept) + }, + + /** 当前租户全部未停用的在职人员,供选择部门经理、副经理。 */ + getOrganizationMembers: (deptId?: number): Promise => + request.get({ url: '/system/dept/member-simple-list', params: { deptId } }), + + // 新增组织 + createOrganization: async (data: Organization) => { + return await request.post({ url: '/system/dept/create', data: toDeptSavePayload(data) }) + }, + + // 修改组织 + updateOrganization: async (data: Organization) => { + return await request.post({ url: '/system/dept/update', data: toDeptSavePayload(data) }) + }, + + // 批量保存同级组织的显示顺序 + updateOrganizationSortBatch: async (ids: number[]) => { + return await request.post({ + url: '/system/dept/update-sort-batch', + params: { ids: ids.join(',') } + }) + }, + + // 删除组织 + deleteOrganization: async (id: number) => { + return await request.post({ url: '/system/dept/delete?id=' + id }) + }, + + /** 批量删除组织 */ + deleteOrganizationList: async (ids: number[]) => { + return await request.post({ + url: '/system/dept/delete-list', + params: { ids: ids.join(',') } + }) + } +} diff --git a/src/api/system/param/index.ts b/src/api/system/param/index.ts new file mode 100644 index 0000000..0b8bb99 --- /dev/null +++ b/src/api/system/param/index.ts @@ -0,0 +1,59 @@ +import request from '@/config/axios' + +export type ParamValueType = 'string' | 'number' | 'boolean' | 'json' + +export interface ParamVO { + id: number | undefined + category: string + name: string + key: string + value: string + type?: number + valueType: ParamValueType + status: number + visible: boolean + remark: string + createTime?: Date +} + +export type ParamSaveVO = Pick< + ParamVO, + 'id' | 'category' | 'name' | 'key' | 'value' | 'valueType' | 'status' | 'visible' | 'remark' +> + +const toParamSaveVO = (data: ParamVO): ParamSaveVO => ({ + id: data.id, + category: data.category, + name: data.name, + key: data.key, + value: data.value, + valueType: data.valueType, + status: data.status, + visible: data.visible, + remark: data.remark +}) + +// 查询参数设置列表 +export const getParamPage = (params: PageParam) => { + return request.get({ url: '/infra/config/page', params }) +} + +// 查询参数设置详情 +export const getParam = (id: number) => { + return request.get({ url: '/infra/config/get?id=' + id }) +} + +// 新增参数设置 +export const createParam = (data: ParamVO) => { + return request.post({ url: '/infra/config/create', data: toParamSaveVO(data) }) +} + +// 修改参数设置 +export const updateParam = (data: ParamVO) => { + return request.post({ url: '/infra/config/update', data: toParamSaveVO(data) }) +} + +// 删除参数设置 +export const deleteParam = (id: number) => { + return request.post({ url: '/infra/config/delete?id=' + id }) +} diff --git a/src/api/system/permission/index.ts b/src/api/system/permission/index.ts new file mode 100644 index 0000000..51905dd --- /dev/null +++ b/src/api/system/permission/index.ts @@ -0,0 +1,109 @@ +import request from '@/config/axios' +import type { MenuPermission } from '@/utils/menuPermission' + +/** 同一应用所有有权管理员共享的两类角色预设。 */ +export interface ApplicationRolePresetVO { + applicationId: number + defaultRoleIds: number[] + externalRoleIds: number[] +} + +/** 查询应用角色预设,也用于新增用户回显。 */ +export const getApplicationRolePreset = (applicationId: number, menuCode?: MenuPermission): Promise => + request.get({ url: '/system/permission/role-preset', params: { applicationId, menuCode } }) + +/** 用户角色页范围外可选择的预设,仅提供启用预设角色。 */ +export interface UserRolePresetPreviewVO { + applicationId: number + applicationName: string + applicationShortName?: string + roleId: number + roleName: string + roleCode: string + defaultPreset: boolean + externalPreset: boolean + /** 编辑时回显实际授权;新增时由预设类型决定勾选状态。 */ + assigned: boolean +} + +/** 查询当前租户管理范围外的启用预设;编辑时校验目标用户范围。 */ +export const getUserRolePresetPreview = (userId?: number, menuCode?: MenuPermission): Promise => + request.get({ url: '/system/permission/user-role-preset-preview', params: { userId, menuCode } }) + +/** 保存同一应用的两类角色预设。 */ +export const saveApplicationRolePreset = (data: ApplicationRolePresetVO): Promise => + request.post({ url: '/system/permission/role-preset', data }) + +export interface PermissionAssignUserRoleReqVO { + userId: number + roleIds: number[] +} + +export interface PermissionAssignRoleMenuReqVO { + applicationId?: number + roleId: number + menuIds: number[] +} + +export interface PermissionAssignRoleDataScopeReqVO { + applicationId?: number + roleId: number + dataScope: number + dataScopeDeptIds: number[] +} + +/** 权限变更日志 */ +export interface PermissionChangeLogVO { + id: number + username: string + name: string + type: string + targetType: string + targetId?: number + targetName: string + content: string + userIp?: string + createTime: string | Date +} + +export interface PermissionChangeLogPageReqVO extends PageParam { + keyword?: string + type?: string +} + +// 查询角色拥有的菜单权限 +export const getRoleMenuList = async (roleId: number) => { + return await request.get({ url: '/system/permission/list-role-menus?roleId=' + roleId }) +} + +// 赋予角色菜单权限 +export const assignRoleMenu = async (data: PermissionAssignRoleMenuReqVO) => { + return await request.post({ url: '/system/permission/assign-role-menu', data }) +} + +// 赋予角色数据权限 +export const assignRoleDataScope = async (data: PermissionAssignRoleDataScopeReqVO) => { + return await request.post({ url: '/system/permission/assign-role-data-scope', data }) +} + +// 查询用户拥有的角色数组 +export const getUserRoleList = async (userId: number, menuCode?: MenuPermission) => { + return await request.get({ url: '/system/permission/list-user-roles', params: { userId, menuCode } }) +} + +// 赋予用户角色 +export const assignUserRole = async (data: PermissionAssignUserRoleReqVO, menuCode?: MenuPermission) => { + return await request.post({ url: '/system/permission/assign-user-role', data, params: { menuCode } }) +} + +// 查询权限变更日志分页 +export const getPermissionChangeLogPage = ( + params: PermissionChangeLogPageReqVO +): Promise> => { + return request.get({ url: '/system/permission-log/page', params }) +} + +// 查询权限变更日志详情 +export const getPermissionChangeLog = (id: number): Promise => { + return request.get({ url: '/system/permission-log/get', params: { id } }) +} diff --git a/src/api/system/portal/index.ts b/src/api/system/portal/index.ts new file mode 100644 index 0000000..663eb8c --- /dev/null +++ b/src/api/system/portal/index.ts @@ -0,0 +1,106 @@ +import request from '@/config/axios' + +export interface PortalCardVO { + id: number + cardName: string + cardCode: string + description?: string + sort: number + status: number + visibleType: 'ALL' | 'CUSTOM' + visibleOrgCount: number + visibleGroupCount: number + visibleUserCount: number + version: number + creator?: string + createTime?: Date | string + updater?: string + updateTime?: Date | string +} + +export interface PortalCardPageReqVO extends PageParam { + keyword?: string + status?: number +} + +export interface PortalCardUpdateStatusReqVO { + id: number + status: number + version: number +} + +export interface ResourceVisibilityValue { + visibleType: 'ALL' | 'CUSTOM' + visibleOrgIds: number[] + visibleGroupIds: number[] + visibleUserIds: number[] +} + +export interface PortalCardVisibilityVO extends ResourceVisibilityValue { + id: number + cardName: string + version: number +} + +export interface PortalCardVisibilityUpdateReqVO extends ResourceVisibilityValue { + id: number + version: number +} + +// 查询门户卡片列表 +export const getPortalCardPage = (params: PortalCardPageReqVO) => { + return request.get>({ url: '/portal/cards/page', params }) +} + +// 修改门户卡片状态 +export const updatePortalCardStatus = (data: PortalCardUpdateStatusReqVO) => { + return request.post({ url: '/portal/cards/update-status', data }) +} + +// 查询门户卡片授权范围 +export const getPortalCardVisibility = (id: number): Promise => { + return request.get({ url: '/portal/cards/visibility', params: { id } }) +} + +// 修改门户卡片授权范围 +export const updatePortalCardVisibility = (data: PortalCardVisibilityUpdateReqVO) => { + return request.post({ url: '/portal/cards/update-visibility', data }) +} + +/** 定时主题时间选择方式。 */ +export enum PortalStyleTimeTypeEnum { + Date = 'date', + DateTime = 'datetime' +} + +export interface PortalStyleScheduleVO { + id: number + name: string + themeColor?: string + colorPlacement: 'ambient' | 'nav' | 'immersive' + timeType: PortalStyleTimeTypeEnum + startTime: string + endTime: string + status: number + remark?: string +} + +export interface PortalStyleSchedulePageReqVO extends PageParam { + name?: string + status?: number +} + +export const getPortalStyleSchedulePage = (params: PortalStyleSchedulePageReqVO) => + request.get>({ url: '/portal/style-schedules/page', params }) + +export const createPortalStyleSchedule = (data: Omit) => + request.post({ url: '/portal/style-schedules/create', data }) + +export const updatePortalStyleSchedule = (data: PortalStyleScheduleVO) => + request.post({ url: '/portal/style-schedules/update', data }) + +export const updatePortalStyleScheduleStatus = (data: Pick) => + request.post({ url: '/portal/style-schedules/update-status', data }) + +export const deletePortalStyleSchedule = (id: number) => + request.post({ url: '/portal/style-schedules/delete', params: { id } }) diff --git a/src/api/system/post/index.ts b/src/api/system/post/index.ts new file mode 100644 index 0000000..a01cf17 --- /dev/null +++ b/src/api/system/post/index.ts @@ -0,0 +1,149 @@ +import request from '@/config/axios' +import type { MenuPermission } from '@/utils/menuPermission' + +export type PostType = 'management' | 'ordinary' | 'technical' | 'professional' +export type PostDeptUpdateMode = 'append' | 'remove' | 'replace' + +export interface PostVO { + id?: number + name: string + code: string + type?: PostType + typeName?: string + sort: number + status: number + remark: string + deptIds?: number[] + deptCount?: number + userCount?: number + createTime?: Date + /** 停用前已确认人员及流程引用影响。 */ + impactConfirmed?: boolean + /** 迁移受影响的主岗、副岗及兼职人员;不传则保留原任职。 */ + transferPostId?: number +} + +/** 停用影响中的任职人员,保留同一人员不同组织的任职。 */ +export interface PostImpactUser { + userId: number + userName: string + deptId: number + deptName: string +} + +export interface PostImpactRef { + id: string + name: string +} + +export interface PostDisableImpact { + id: number + name: string + code: string + mainUsers: PostImpactUser[] + deputyUsers: PostImpactUser[] + partUsers: PostImpactUser[] + modelRefs: PostImpactRef[] + instanceRefs: PostImpactRef[] +} + +export interface PostDisableImpactResult { + posts: PostDisableImpact[] + transferPosts: Array<{ id: number; name: string; code: string }> +} + +export interface PostPageReqVO extends PageParam { + keyword?: string + name?: string + code?: string + type?: PostType + status?: number +} + +const normalizePost = (post: PostVO): PostVO => ({ + ...post, + deptIds: Array.isArray(post.deptIds) + ? post.deptIds.map(Number).filter((id) => Number.isFinite(id)) + : [] +}) + +// 查询岗位列表 +export const getPostPage = async (params: PostPageReqVO) => { + const data = await request.get>({ url: '/system/post/page', params }) + return { + ...data, + list: (data.list || []).map(normalizePost) + } +} + +// 获取岗位精简信息列表 +export const getSimplePostList = async (menuCode?: MenuPermission): Promise => { + return await request.get({ url: '/system/post/simple-list', params: { menuCode } }) +} + +// 查询岗位详情 +export const getPost = async (id: number) => { + const data = await request.get({ url: '/system/post/get?id=' + id }) + return normalizePost(data) +} + +// 新增岗位 +export const createPost = async (data: PostVO) => { + return await request.post({ url: '/system/post/create', data }) +} + +// 修改岗位 +export const updatePost = async (data: PostVO) => { + return await request.post({ url: '/system/post/update', data }) +} + +// 删除岗位 +export const deletePost = async (id: number, impactConfirmed?: boolean, transferPostId?: number) => { + return await request.post({ url: '/system/post/delete', params: { id, impactConfirmed, transferPostId } }) +} + +// 批量删除岗位 +export const deletePostList = async (ids: number[], impactConfirmed?: boolean, transferPostId?: number) => { + return await request.post({ + url: '/system/post/delete-list', + params: { ids: ids.join(','), impactConfirmed, transferPostId } + }) +} + +// 批量更新岗位状态 +export const updatePostStatusList = async ( + ids: number[], + status: number, + impactConfirmed?: boolean, + transferPostId?: number +) => { + return await request.post({ + url: '/system/post/update-status-list', + data: { ids, status, impactConfirmed, transferPostId } + }) +} + +/** 查询当前租户内岗位的完整停用影响及可转入的启用岗位。 */ +export const getPostDisableImpact = async (ids: number[]) => { + return await request.get({ + url: '/system/post/disable-impact', + params: { ids: ids.join(',') } + }) +} + +/** 删除预览包含已停用岗位,使用岗位删除权限。 */ +export const getPostDeleteImpact = async (ids: number[]) => { + return await request.get({ + url: '/system/post/delete-impact', + params: { ids: ids.join(',') } + }) +} + +// 批量调整岗位适用组织 +export const updatePostDeptList = async ( + ids: number[], + deptIds: number[], + mode: PostDeptUpdateMode +) => { + return await request.post({ url: '/system/post/update-dept-list', data: { ids, deptIds, mode } }) +} diff --git a/src/api/system/role/index.ts b/src/api/system/role/index.ts new file mode 100644 index 0000000..392f95b --- /dev/null +++ b/src/api/system/role/index.ts @@ -0,0 +1,104 @@ +import request from '@/config/axios' +import type { MenuPermission } from '@/utils/menuPermission' +import type { RoleTagVO } from '@/api/system/tag' + +export interface RoleVO { + id: number + applicationId?: number + /** 是否属于应用的普通用户预设。 */ + defaultPreset?: boolean + /** 是否属于应用的外部协作单位预设。 */ + externalPreset?: boolean + name: string + code: string + sort: number + status: number + type: number + /** 角色已绑定的标签,数据范围由其中的内置数据范围标签决定。 */ + tags?: RoleTagVO[] + remark?: string + createTime: Date +} + +// 查询角色列表 +export const getRolePage = async (params: PageParam) => { + return await request.get({ url: '/system/role/page', params }) +} + +// 查询角色(精简)列表 +export const getSimpleRoleList = async (applicationId?: number, menuCode?: MenuPermission): Promise => { + return await request.get({ url: '/system/role/simple-list', params: { applicationId, menuCode } }) +} + +// 查询角色详情 +export const getRole = async (id: number) => { + return await request.get({ url: '/system/role/get?id=' + id }) +} + +/** 查询角色当前授权的用户编号,供编辑时回显及计算授权差异。 */ +export const getRoleAssignedUserIds = (applicationId: number, roleId: number): Promise => + request.get({ url: '/system/role/assigned-user-ids', params: { applicationId, roleId } }) + +/** 当前角色的单条任职授权,组织为该条任职所属组织。 */ +export interface RoleAuthorizedUser { + id: number + username: string + nickname: string + deptId?: number + deptName?: string + postIds?: string[] + /** 授权来源任职,主岗为空。 */ + positionId?: number + positionType?: 'deputy' | 'part' + hasAccount?: boolean +} + +export interface RoleAuthorizedPosition extends RoleAuthorizedUser { + positionId?: number + positionType?: 'deputy' | 'part' +} + +/** 查询主岗及每条副岗、兼职的独立授权来源。 */ +export const getRoleAssignedUsers = (applicationId: number, roleId: number): Promise => + request.get({ url: '/system/role/assigned-users', params: { applicationId, roleId } }) + +/** 当前角色的待保存授权差异,每条扩展任职按关系编号解除。 */ +export interface RoleAssignUsersRequest { + applicationId: number + roleId: number + addedUserIds: number[] + removedUserIds: number[] + removedPositionIds: number[] +} + +/** 提交授权差异,由后端重新校验保存时的当前组织权限。 */ +export const assignRoleUsers = (data: RoleAssignUsersRequest): Promise => + request.post({ url: '/system/role/assign-users', data }) + +// 新增角色 +export const createRole = async (data: RoleVO) => { + return await request.post({ url: '/system/role/create', data }) +} + +// 修改角色 +export const updateRole = async (data: RoleVO) => { + return await request.post({ url: '/system/role/update', data }) +} + +// 删除角色 +export const deleteRole = async (id: number) => { + return await request.post({ url: '/system/role/delete?id=' + id }) +} + +// 批量删除角色 +export const deleteRoleList = async (ids: number[]) => { + return await request.post({ url: '/system/role/delete-list', params: { ids: ids.join(',') } }) +} + +// 导出角色 +export const exportRole = (params: Record) => { + return request.download({ + url: '/system/role/export-excel', + params + }) +} diff --git a/src/api/system/sms/smsChannel/index.ts b/src/api/system/sms/smsChannel/index.ts new file mode 100644 index 0000000..b1070ca --- /dev/null +++ b/src/api/system/sms/smsChannel/index.ts @@ -0,0 +1,48 @@ +import request from '@/config/axios' + +export interface SmsChannelVO { + id: number + code: string + status: number + signature: string + remark: string + apiKey: string + apiSecret: string + callbackUrl: string + createTime: Date +} + +// 查询短信渠道列表 +export const getSmsChannelPage = (params: PageParam) => { + return request.get({ url: '/system/sms-channel/page', params }) +} + +// 获得短信渠道精简列表 +export function getSimpleSmsChannelList() { + return request.get({ url: '/system/sms-channel/simple-list' }) +} + +// 查询短信渠道详情 +export const getSmsChannel = (id: number) => { + return request.get({ url: '/system/sms-channel/get?id=' + id }) +} + +// 新增短信渠道 +export const createSmsChannel = (data: SmsChannelVO) => { + return request.post({ url: '/system/sms-channel/create', data }) +} + +// 修改短信渠道 +export const updateSmsChannel = (data: SmsChannelVO) => { + return request.post({ url: '/system/sms-channel/update', data }) +} + +// 删除短信渠道 +export const deleteSmsChannel = (id: number) => { + return request.post({ url: '/system/sms-channel/delete?id=' + id }) +} + +// 批量删除短信渠道 +export const deleteSmsChannelList = (ids: number[]) => { + return request.post({ url: '/system/sms-channel/delete-list', params: { ids: ids.join(',') } }) +} diff --git a/src/api/system/sms/smsLog/index.ts b/src/api/system/sms/smsLog/index.ts new file mode 100644 index 0000000..f989171 --- /dev/null +++ b/src/api/system/sms/smsLog/index.ts @@ -0,0 +1,37 @@ +import request from '@/config/axios' + +export interface SmsLogVO { + id: number | null + channelId: number | null + channelCode: string + templateId: number | null + templateCode: string + templateType: number | null + templateContent: string + templateParams: Map | null + apiTemplateId: string + mobile: string + userId: number | null + userType: number | null + sendStatus: number | null + sendTime: Date | null + apiSendCode: string + apiSendMsg: string + apiRequestId: string + apiSerialNo: string + receiveStatus: number | null + receiveTime: Date | null + apiReceiveCode: string + apiReceiveMsg: string + createTime: Date | null +} + +// 查询短信日志列表 +export const getSmsLogPage = (params: PageParam) => { + return request.get({ url: '/system/sms-log/page', params }) +} + +// 导出短信日志 +export const exportSmsLog = (params) => { + return request.download({ url: '/system/sms-log/export-excel', params }) +} diff --git a/src/api/system/sms/smsTemplate/index.ts b/src/api/system/sms/smsTemplate/index.ts new file mode 100644 index 0000000..67bb41d --- /dev/null +++ b/src/api/system/sms/smsTemplate/index.ts @@ -0,0 +1,65 @@ +import request from '@/config/axios' + +export interface SmsTemplateVO { + id?: number + type?: number + status: number + code: string + name: string + content: string + remark: string + apiTemplateId: string + channelId?: number + channelCode?: string + params?: string[] + createTime?: Date +} + +export interface SendSmsReqVO { + mobile: string + templateCode: string + templateParams: Map +} + +// 查询短信模板列表 +export const getSmsTemplatePage = (params: PageParam) => { + return request.get({ url: '/system/sms-template/page', params }) +} + +// 查询短信模板详情 +export const getSmsTemplate = (id: number) => { + return request.get({ url: '/system/sms-template/get?id=' + id }) +} + +// 新增短信模板 +export const createSmsTemplate = (data: SmsTemplateVO) => { + return request.post({ url: '/system/sms-template/create', data }) +} + +// 修改短信模板 +export const updateSmsTemplate = (data: SmsTemplateVO) => { + return request.post({ url: '/system/sms-template/update', data }) +} + +// 删除短信模板 +export const deleteSmsTemplate = (id: number) => { + return request.post({ url: '/system/sms-template/delete?id=' + id }) +} + +// 批量删除短信模板 +export const deleteSmsTemplateList = (ids: number[]) => { + return request.post({ url: '/system/sms-template/delete-list', params: { ids: ids.join(',') } }) +} + +// 导出短信模板 +export const exportSmsTemplate = (params) => { + return request.download({ + url: '/system/sms-template/export-excel', + params + }) +} + +// 发送短信 +export const sendSms = (data: SendSmsReqVO) => { + return request.post({ url: '/system/sms-template/send-sms', data }) +} diff --git a/src/api/system/social/client/index.ts b/src/api/system/social/client/index.ts new file mode 100644 index 0000000..4e51aa3 --- /dev/null +++ b/src/api/system/social/client/index.ts @@ -0,0 +1,38 @@ +import request from '@/config/axios' + +export interface SocialClientVO { + id: number + name: string + socialType: number + userType: number + clientId: string + clientSecret: string + agentId: string + publicKey: string + status: number +} + +// 查询社交客户端列表 +export const getSocialClientPage = async (params) => { + return await request.get({ url: `/system/social-client/page`, params }) +} + +// 查询社交客户端详情 +export const getSocialClient = async (id: number) => { + return await request.get({ url: `/system/social-client/get?id=` + id }) +} + +// 新增社交客户端 +export const createSocialClient = async (data: SocialClientVO) => { + return await request.post({ url: `/system/social-client/create`, data }) +} + +// 修改社交客户端 +export const updateSocialClient = async (data: SocialClientVO) => { + return await request.post({ url: `/system/social-client/update`, data }) +} + +// 删除社交客户端 +export const deleteSocialClient = async (id: number) => { + return await request.post({ url: `/system/social-client/delete?id=` + id }) +} diff --git a/src/api/system/social/user/index.ts b/src/api/system/social/user/index.ts new file mode 100644 index 0000000..8d04e4b --- /dev/null +++ b/src/api/system/social/user/index.ts @@ -0,0 +1,29 @@ +import request from '@/config/axios' + +export interface SocialUserVO { + id: number + type: number + openid: string + token: string + rawTokenInfo: string + nickname: string + avatar: string + rawUserInfo: string + code: string + state: string +} + +// 查询社交用户列表 +export const getSocialUserPage = async (params: PageParam) => { + return await request.get({ url: `/system/social-user/page`, params }) +} + +// 查询社交用户详情 +export const getSocialUser = async (id: number) => { + return await request.get({ url: `/system/social-user/get?id=` + id }) +} + +// 获得绑定社交用户列表 +export const getBindSocialUserList = async () => { + return await request.get({ url: '/system/social-user/get-bind-list' }) +} diff --git a/src/api/system/tag/index.ts b/src/api/system/tag/index.ts new file mode 100644 index 0000000..2876a30 --- /dev/null +++ b/src/api/system/tag/index.ts @@ -0,0 +1,88 @@ +import request from '@/config/axios' +import type { MenuPermission } from '@/utils/menuPermission' + +/** 标签绑定值类型:0 无值,1 组织,2 文本。 */ +export enum TagValueType { + NONE = 0, + DEPT = 1, + TEXT = 2 +} + +/** 平台内置应用保留的数据范围编码前缀,业务应用可自行定义。 */ +export const RESERVED_TAG_PREFIX = 'CK_' + +/** 应用标签。 */ +export interface TagVO { + id: number + applicationId: number + parentId: number + code: string + name: string + valueType: TagValueType + sort: number + status: number + builtIn: boolean + remark?: string + /** 绑定该标签的角色数。 */ + roleCount?: number + createTime?: Date +} + +/** 标签新增、修改请求。 */ +export interface TagSaveReqVO { + id?: number + applicationId: number + parentId?: number + code: string + name: string + valueType?: TagValueType + sort?: number + status?: number + remark?: string +} + +/** 角色已绑定的标签。 */ +export interface RoleTagVO { + id: number + roleId: number + tagId: number + code: string + name: string + valueType: TagValueType + status: number + deptIds?: number[] + value?: string +} + +/** 角色单个标签绑定。 */ +export interface RoleTagAssignItem { + tagId: number + deptIds?: number[] + value?: string +} + +/** 查询应用全部标签(平铺,含停用),menuCode 决定按哪个菜单校验应用范围。 */ +export const getTagTree = (applicationId: number, menuCode?: MenuPermission): Promise => + request.get({ url: '/system/tag/tree', params: { applicationId, menuCode } }) + +/** 查询标签详情。 */ +export const getTag = (id: number): Promise => + request.get({ url: '/system/tag/get', params: { id } }) + +/** 新增标签。 */ +export const createTag = (data: TagSaveReqVO): Promise => + request.post({ url: '/system/tag/create', data }) + +/** 修改标签。 */ +export const updateTag = (data: TagSaveReqVO) => request.post({ url: '/system/tag/update', data }) + +/** 删除标签。 */ +export const deleteTag = (id: number) => request.post({ url: '/system/tag/delete?id=' + id }) + +/** 查询角色已绑定标签。 */ +export const getRoleTagList = (roleId: number): Promise => + request.get({ url: '/system/role-tag/list', params: { roleId } }) + +/** 全量保存角色标签。 */ +export const assignRoleTags = (roleId: number, tags: RoleTagAssignItem[]) => + request.post({ url: '/system/role-tag/assign', data: { roleId, tags } }) diff --git a/src/api/system/tenant/index.ts b/src/api/system/tenant/index.ts new file mode 100644 index 0000000..0e8e023 --- /dev/null +++ b/src/api/system/tenant/index.ts @@ -0,0 +1,73 @@ +import request from '@/config/axios' + +export interface TenantVO { + id: number + name: string + contactName: string + contactMobile: string + status: number + domain: string + packageId: number + username: string + password: string + expireTime: Date + accountCount: number + websites: string[] + createTime: Date +} + +export interface TenantPageReqVO extends PageParam { + name?: string + contactName?: string + contactMobile?: string + status?: number + createTime?: Date[] +} + +export interface TenantExportReqVO { + name?: string + contactName?: string + contactMobile?: string + status?: number + createTime?: Date[] +} + +// 查询租户列表 +export const getTenantPage = (params: TenantPageReqVO) => { + return request.get({ url: '/system/tenant/page', params }) +} + +// 查询租户详情 +export const getTenant = (id: number) => { + return request.get({ url: '/system/tenant/get?id=' + id }) +} + +// 获取租户精简信息列表 +export const getTenantList = () => { + return request.get({ url: '/system/tenant/simple-list' }) +} + +// 新增租户 +export const createTenant = (data: TenantVO) => { + return request.post({ url: '/system/tenant/create', data }) +} + +// 修改租户 +export const updateTenant = (data: TenantVO) => { + return request.post({ url: '/system/tenant/update', data }) +} + +// 删除租户 +export const deleteTenant = (id: number) => { + return request.post({ url: '/system/tenant/delete?id=' + id }) +} + +// 批量删除租户 +export const deleteTenantList = (ids: number[]) => { + return request.post({ url: '/system/tenant/delete-list', params: { ids: ids.join(',') } }) +} + +// 导出租户 +export const exportTenant = (params: TenantExportReqVO) => { + return request.download({ url: '/system/tenant/export-excel', params }) +} diff --git a/src/api/system/tenantPackage/index.ts b/src/api/system/tenantPackage/index.ts new file mode 100644 index 0000000..51a6ae4 --- /dev/null +++ b/src/api/system/tenantPackage/index.ts @@ -0,0 +1,51 @@ +import request from '@/config/axios' + +export interface TenantPackageVO { + id: number + name: string + status: number + remark: string + creator: string + updater: string + updateTime: string + menuIds: number[] + createTime: Date +} + +// 查询租户套餐列表 +export const getTenantPackagePage = (params: PageParam) => { + return request.get({ url: '/system/tenant-package/page', params }) +} + +// 获得租户 +export const getTenantPackage = (id: number) => { + return request.get({ url: '/system/tenant-package/get?id=' + id }) +} + +// 新增租户套餐 +export const createTenantPackage = (data: TenantPackageVO) => { + return request.post({ url: '/system/tenant-package/create', data }) +} + +// 修改租户套餐 +export const updateTenantPackage = (data: TenantPackageVO) => { + return request.post({ url: '/system/tenant-package/update', data }) +} + +// 删除租户套餐 +export const deleteTenantPackage = (id: number) => { + return request.post({ url: '/system/tenant-package/delete?id=' + id }) +} + +// 批量删除租户套餐 +export const deleteTenantPackageList = (ids: number[]) => { + return request.post({ + url: '/system/tenant-package/delete-list', + params: { ids: ids.join(',') } + }) +} + +// 获取租户套餐精简信息列表 +export const getTenantPackageList = () => { + return request.get({ url: '/system/tenant-package/simple-list' }) +} diff --git a/src/api/system/user/deputy.ts b/src/api/system/user/deputy.ts new file mode 100644 index 0000000..f53a99b --- /dev/null +++ b/src/api/system/user/deputy.ts @@ -0,0 +1,67 @@ +import request from '@/config/axios' +import type { MenuPermission } from '@/utils/menuPermission' + +/** 用户副岗信息 */ +export interface UserDeputyVO { + id?: number + userId: number + userName?: string + /** 主岗部门编号,用于定位所属集团或公司。 */ + mainDeptId?: number + mainOrgName?: string + mainDeptName?: string + mainPostName?: string + deputyOrgName?: string + deputyDeptName?: string + deptId: number // 副岗组织 + postId: number // 副岗岗位 + postName?: string + roleIds?: number[] + /** 参与任职角色选择的应用,空选也覆盖预设。 */ + roleApplicationIds?: number[] + roleNames?: string[] + deputyRoleNames?: string[] + roleDisplayNames?: string[] + startTime?: string | number[] + endTime?: string | number[] + status?: number + remark?: string +} + +export interface UserDeputyPageReqVO extends PageParam { + userName?: string + deptId?: number + status?: number +} + +// 查询用户副岗分页 +export const getUserDeputyPage = ( + params: UserDeputyPageReqVO +): Promise> => { + return request.get({ url: '/system/user/deputy/page', params }) +} + +// 查询用户副岗列表 +export const getUserDeputyList = (userId: number, menuCode?: MenuPermission): Promise => { + return request.get({ url: '/system/user/deputy/list', params: { userId, menuCode } }) +} + +// 查询用户副岗详情 +export const getUserDeputy = (id: number, menuCode?: MenuPermission): Promise => { + return request.get({ url: '/system/user/deputy/get', params: { id, menuCode } }) +} + +// 新增用户副岗 +export const createUserDeputy = (data: UserDeputyVO, menuCode?: MenuPermission) => { + return request.post({ url: '/system/user/deputy/create', data, params: { menuCode } }) +} + +// 修改用户副岗 +export const updateUserDeputy = (data: UserDeputyVO, menuCode?: MenuPermission) => { + return request.post({ url: '/system/user/deputy/update', data, params: { menuCode } }) +} + +// 删除用户副岗 +export const deleteUserDeputy = (id: number | undefined, menuCode?: MenuPermission) => { + return request.post({ url: '/system/user/deputy/delete', params: { id, menuCode } }) +} diff --git a/src/api/system/user/dingtalkSync.ts b/src/api/system/user/dingtalkSync.ts new file mode 100644 index 0000000..1f358c4 --- /dev/null +++ b/src/api/system/user/dingtalkSync.ts @@ -0,0 +1,115 @@ +import request from '@/config/axios' + +/** 钉钉同步条目 */ +export interface DingtalkSyncItemVO { + id?: number + /** 对象类型:1 部门,2 人员 */ + objectType: number + objectId: number + objectName: string + /** 动作:1 新增,2 更新,3 登记绑定,4 无需处理,5 解除绑定,6 邀请 */ + actionType: number + /** 状态:0 待执行,1 成功,2 失败,3 冲突,4 跳过 */ + status: number + dingId?: string + message?: string +} + +/** 钉钉同步预览 / 执行结果 */ +export interface DingtalkSyncResultVO { + /** 批次编号,预览为空 */ + batchId?: number + /** 批次状态:1 成功,2 部分成功,3 失败;预览为空 */ + status?: number + plannedCount: number + successCount: number + failedCount: number + conflictCount: number + skippedCount: number + items: DingtalkSyncItemVO[] +} + +// 预览按用户同步到钉钉:校验手机号并按手机号查找钉钉成员,不做任何写入 +export const previewUserDingtalkSync = (userId: number): Promise => { + return request.post({ url: '/system/dingtalk-sync/user/preview', data: { userId } }) +} + +// 按用户同步到钉钉:与手机号相同的钉钉成员绑定,不一致或成员已删除的解除绑定,不新建、不改钉钉 +export const executeUserDingtalkSync = (userId: number): Promise => { + return request.post({ url: '/system/dingtalk-sync/user/execute', data: { userId } }) +} + +// 邀请用户加入钉钉:须开启“钉钉同步-允许邀请”;钉钉已有该手机号成员时只登记绑定,否则在钉钉根部门创建成员或发出加入邀请 +export const inviteUserDingtalk = (userId: number): Promise => { + return request.post({ url: '/system/dingtalk-sync/user/invite', data: { userId } }) +} + +// 查询是否允许邀请:已接入钉钉且配置管理开启“钉钉同步-允许邀请” +export const getDingtalkInviteEnabled = (): Promise => { + return request.get({ url: '/system/dingtalk-sync/invite-enabled' }) +} + +/** 批量用户同步请求:选中用户与部门二选一 */ +export interface DingtalkUserBatchSyncReqVO { + userIds?: number[] + /** 部门编号,同步该部门及其下级部门的在职人员 */ + deptId?: number + /** 只同步尚未绑定钉钉成员的用户 */ + onlyUnsynced?: boolean +} + +/** 钉钉同步批次 */ +export interface DingtalkSyncBatchVO { + id: number + /** 批次状态:0 执行中,1 成功,2 部分成功,3 失败 */ + status: number + /** 同步方式:1 组织树(已停用,仅历史批次),2 单个用户,3 批量用户,4 邀请;更早的历史批次为空 */ + syncType?: number + /** 触发方式:1 手动,2 定时 */ + triggerType?: number + scopeDesc?: string + successCount?: number + failedCount?: number + conflictCount?: number + skippedCount?: number + operatorUserId?: number + /** 操作者姓名;定时任务可返回系统任务。 */ + operatorUserName?: string + startTime?: number + endTime?: number + errorMessage?: string +} + +/** 同步批次分页查询参数 */ +export interface DingtalkSyncBatchPageReqVO extends PageParam { + status?: number + syncType?: number + triggerType?: number +} + +// 批量用户同步到钉钉:登记批次后后台执行,返回执行中的批次编号 +export const executeUserBatchDingtalkSync = ( + data: DingtalkUserBatchSyncReqVO +): Promise => { + return request.post({ url: '/system/dingtalk-sync/user/batch-execute', data }) +} + +// 查询同步批次,用于轮询后台批次进度 +export const getDingtalkSyncBatch = (id: number): Promise => { + return request.get({ url: '/system/dingtalk-sync/batch/get', params: { id } }) +} + +// 分页查询同步批次(同步记录) +export const getDingtalkSyncBatchPage = ( + params: DingtalkSyncBatchPageReqVO +): Promise> => { + return request.get({ url: '/system/dingtalk-sync/batch/page', params }) +} + +// 查询批次条目,可按状态过滤 +export const getDingtalkSyncItemList = ( + batchId: number, + status?: number +): Promise => { + return request.get({ url: '/system/dingtalk-sync/batch/item-list', params: { batchId, status } }) +} diff --git a/src/api/system/user/index.ts b/src/api/system/user/index.ts new file mode 100644 index 0000000..7c6ce8e --- /dev/null +++ b/src/api/system/user/index.ts @@ -0,0 +1,193 @@ +import request from '@/config/axios' +import { MenuPermission } from '@/utils/menuPermission' + +/** 表单联动仅返回有效任职部门,不包含任职角色等管理信息。 */ +export interface UserOrganizationSimple { + mainDeptId?: number | null + currentDeptId?: number | null + organizations: { deptId: number; deptName: string }[] +} + +/** 查询人员的主岗、副岗和兼职组织;本人同时返回当前切换的实际部门。 */ +export const getUserOrganizationSimpleList = (userId: number): Promise => + request.get({ url: '/system/user/organization-simple-list', params: { userId } }) + +/** 人员在指定部门的有效岗位选项,不返回任职角色等管理信息。 */ +export interface UserPostSimple { + id: number + name: string +} + +/** 人员、部门均必填,岗位组件在两项都有值后调用。 */ +export const getUserPostSimpleList = (userId: number, deptId: number): Promise => + request.get({ url: '/system/user/post-simple-list', params: { userId, deptId } }) + +/** 按调用菜单的任职组织及本人权限查询人员选项。 */ +export const getMenuSimpleUserList = (menuCode: MenuPermission): Promise => { + return request.get({ url: '/system/user/menu-simple-list', params: { menuCode } }) +} + +export interface UserVO { + id: number + username: string + hasAccount?: boolean + nickname: string + deptId: number + deptName?: string + postIds: number[] + /** 后端按已授权用户及其主组织回填的实际主岗位名称。 */ + postNames?: string[] + email: string + mobile: string + sex: number + avatar: string + loginIp: string + status: number + employmentStatus: number + /** 数据来源:1 人事、2 自建。 */ + dataSource?: number + remark: string + sort: number + deputyCount?: number + partCount?: number + /** 副岗标签名称,格式为“组织名称-岗位名称”。 */ + deputyPostNames?: string[] + /** 兼职标签名称,格式为“组织名称-岗位名称”。 */ + partPostNames?: string[] + /** 当前筛选岗位对应的副岗、兼职组织。 */ + matchedDeputyDeptNames?: string[] + matchedPartDeptNames?: string[] + officeShortNo?: string + officeRoomNo?: string + hireDate?: string + leaveDate?: string + passwordUpdateTime?: string | Date + forcePasswordChange?: boolean + loginDate: Date + createTime: Date +} + +export interface UserSaveReqVO { + id?: number + username: string + hasAccount?: boolean + nickname: string + deptId?: number + postIds: number[] + email?: string + mobile?: string + sex?: number + avatar?: string + remark?: string + sort: number + officeShortNo?: string + officeRoomNo?: string + hireDate?: string + leaveDate?: string + status?: number + employmentStatus?: number + password?: string + roleIds?: number[] + /** 已展示并参与选择的应用,空选也覆盖对应应用预设。 */ + roleApplicationIds?: number[] + managedDeptIds?: number[] + deputies?: UserPositionDraft[] + parts?: UserPositionDraft[] +} + +/** 新增用户时暂存的副岗、兼职关系。 */ +export interface UserPositionDraft { + deptId: number + postId: number + partNo?: string + startTime: string + endTime?: string + status?: number + roleIds?: number[] + /** 参与任职角色选择的应用,空选也覆盖预设。 */ + roleApplicationIds?: number[] + remark?: string +} + +export interface UserPageReqVO extends PageParam { + keyword?: string + username?: string + mobile?: string + status?: number + /** 仅查询正常或锁定账号,排除停用账号。 */ + accountEnabledOnly?: boolean + employmentStatus?: number + /** 数据来源:1 人事、2 自建。 */ + dataSource?: number + deptId?: number + roleId?: number + postId?: number +} + +// 查询用户管理列表 +export const getUserPage = (params: UserPageReqVO) => { + return request.get({ url: '/system/user/page', params }) +} + +// 查询用户详情 +export const getUser = (id: number) => { + return request.get({ url: '/system/user/get?id=' + id }) +} + +// 获取新增用户建议使用的下一排序号 +export const getNextUserSort = (): Promise => { + return request.get({ url: '/system/user/next-sort' }) +} + +// 新增用户 +export const createUser = (data: UserSaveReqVO) => { + return request.post({ url: '/system/user/create', data }) +} + +// 修改用户 +export const updateUser = (data: UserSaveReqVO) => { + return request.post({ url: '/system/user/update', data }) +} + +// 删除用户 +export const deleteUser = (id: number) => { + return request.post({ url: '/system/user/delete?id=' + id }) +} + +// 批量删除用户 +export const deleteUserList = (ids: number[]) => { + return request.post({ url: '/system/user/delete-list', params: { ids: ids.join(',') } }) +} + +// 用户密码重置 +export const resetUserPassword = (id: number, password: string) => { + const data = { + id, + password + } + return request.post({ url: '/system/user/update-password', data: data }) +} + +// 重置为系统初始密码,并要求用户下次登录后修改密码 +export const resetUserInitialPassword = (id: number) => { + return request.post({ url: '/system/user/reset-initial-password?id=' + id }) +} + +// 解锁因登录失败被锁定的账号(仅超级管理员) +export const unlockUser = (id: number) => { + return request.post({ url: '/system/user/unlock?id=' + id }) +} + +// 用户状态修改 +export const updateUserStatus = (id: number, status: number) => { + const data = { + id, + status + } + return request.post({ url: '/system/user/update-status', data: data }) +} + +// 获取用户精简信息列表 +export const getSimpleUserList = (): Promise => { + return request.get({ url: '/system/user/simple-list' }) +} diff --git a/src/api/system/user/manageDept.ts b/src/api/system/user/manageDept.ts new file mode 100644 index 0000000..b7ed250 --- /dev/null +++ b/src/api/system/user/manageDept.ts @@ -0,0 +1,17 @@ +import request from '@/config/axios' + +export interface UserManageDeptAssignReqVO { + userId: number + deptIds: number[] +} + +// 对应后端 UserController 的 /system/user/manage-dept/list、/assign +// 查询用户分管组织 id 列表 +export const getUserManageDeptList = (userId: number): Promise => { + return request.get({ url: '/system/user/manage-dept/list', params: { userId } }) +} + +// 分配用户分管组织 +export const assignUserManageDept = (data: UserManageDeptAssignReqVO) => { + return request.post({ url: '/system/user/manage-dept/assign', data }) +} diff --git a/src/api/system/user/part.ts b/src/api/system/user/part.ts new file mode 100644 index 0000000..06aab3f --- /dev/null +++ b/src/api/system/user/part.ts @@ -0,0 +1,64 @@ +import request from '@/config/axios' +import type { MenuPermission } from '@/utils/menuPermission' + +/** 用户兼职信息 */ +export interface UserPartVO { + id?: number + userId: number + userName?: string + partNo?: string + /** 主岗部门编号,用于定位所属集团或公司。 */ + mainDeptId?: number + mainOrgName?: string + mainDeptName?: string + mainPostName?: string + partOrgName?: string + partDeptName?: string + deptId: number // 兼职组织 + postId: number // 兼职岗位 + postName?: string + roleIds?: number[] + /** 参与任职角色选择的应用,空选也覆盖预设。 */ + roleApplicationIds?: number[] + roleNames?: string[] + roleDisplayNames?: string[] + startTime?: string | number[] + endTime?: string | number[] + status?: number +} + +export interface UserPartPageReqVO extends PageParam { + userName?: string + deptId?: number + status?: number +} + +// 查询用户兼职分页 +export const getUserPartPage = (params: UserPartPageReqVO): Promise> => { + return request.get({ url: '/system/user/part/page', params }) +} + +// 查询用户兼职列表 +export const getUserPartList = (userId: number, menuCode?: MenuPermission): Promise => { + return request.get({ url: '/system/user/part/list', params: { userId, menuCode } }) +} + +// 查询用户兼职详情 +export const getUserPart = (id: number, menuCode?: MenuPermission): Promise => { + return request.get({ url: '/system/user/part/get', params: { id, menuCode } }) +} + +// 新增用户兼职 +export const createUserPart = (data: UserPartVO, menuCode?: MenuPermission) => { + return request.post({ url: '/system/user/part/create', data, params: { menuCode } }) +} + +// 修改用户兼职 +export const updateUserPart = (data: UserPartVO, menuCode?: MenuPermission) => { + return request.post({ url: '/system/user/part/update', data, params: { menuCode } }) +} + +// 删除用户兼职 +export const deleteUserPart = (id: number | undefined, menuCode?: MenuPermission) => { + return request.post({ url: '/system/user/part/delete', params: { id, menuCode } }) +} diff --git a/src/api/system/user/profile.ts b/src/api/system/user/profile.ts new file mode 100644 index 0000000..5c0b5c4 --- /dev/null +++ b/src/api/system/user/profile.ts @@ -0,0 +1,58 @@ +import request from '@/config/axios' + +export interface ProfileVO { + id: number + username: string + nickname: string + dept: { + id: number + name: string + } + roles: { + id: number + name: string + }[] + posts: { + id: number + name: string + }[] + email: string + mobile: string + sex: number + avatar: string + status: number + remark: string + loginIp: string + loginDate: Date + createTime: Date +} + +export interface UserProfileUpdateReqVO { + currentPassword?: string + nickname?: string + email?: string + mobile?: string + sex?: number + avatar?: string +} + +// 查询用户个人信息 +export const getUserProfile = () => { + return request.get({ url: '/system/user/profile/get' }) +} + +// 修改用户个人信息 +export const updateUserProfile = (data: UserProfileUpdateReqVO) => { + return request.post({ url: '/system/user/profile/update', data }) +} + +// 用户密码重置 +export const updateUserPassword = (oldPassword: string, newPassword: string) => { + return request.post({ + url: '/system/user/profile/update-password', + data: { + oldPassword: oldPassword, + newPassword: newPassword + } + }) +} diff --git a/src/api/system/user/socialUser.ts b/src/api/system/user/socialUser.ts new file mode 100644 index 0000000..cf87c15 --- /dev/null +++ b/src/api/system/user/socialUser.ts @@ -0,0 +1,31 @@ +import request from '@/config/axios' + +// 社交绑定,使用 code 授权码 +export const socialBind = (type, code, state) => { + return request.post({ + url: '/system/social-user/bind', + data: { + type, + code, + state + } + }) +} + +// 取消社交绑定 +export const socialUnbind = (type, openid) => { + return request.post({ + url: '/system/social-user/unbind', + data: { + type, + openid + } + }) +} + +// 社交授权的跳转 +export const socialAuthRedirect = (type, redirectUri) => { + return request.get({ + url: '/system/auth/social-auth-redirect?type=' + type + '&redirectUri=' + redirectUri + }) +} diff --git a/src/api/system/userGroup/index.ts b/src/api/system/userGroup/index.ts new file mode 100644 index 0000000..7e0cbc9 --- /dev/null +++ b/src/api/system/userGroup/index.ts @@ -0,0 +1,123 @@ +import request from '@/config/axios' +import type { MenuPermission } from '@/utils/menuPermission' + +/** 分组动态来源编码,与后端枚举及原型保持一致。 */ +export type GroupRuleType = 'org' | 'group' | 'position' | 'role' +export interface UserGroupMemberRule { + id?: number + type: GroupRuleType + targetId: number + includeChildren: boolean + name?: string + memberIds?: number[] +} +export interface GroupDimension { + id: number + name: string + code?: string + /** 角色归属应用,其他维度不使用。 */ + applicationId?: number + parentId?: number + expanded?: boolean + children?: GroupDimension[] +} +export interface GroupAccountMember { + id: number + name: string + employeeNo: string + orgId?: number + orgIds: number[] + positionIds: number[] + roles: number[] +} +export interface UserGroupMemberOptions { + applications: GroupDimension[] + defaultRoleApplicationId?: number + organizations: GroupDimension[] + positions: GroupDimension[] + roles: GroupDimension[] + users: GroupAccountMember[] +} + +export interface UserGroupVO { + id: number + name: string + code: string + parentId: number + sort: number + status: number + remark?: string + directMemberIds: number[] + memberRules?: UserGroupMemberRule[] + ownMemberIds?: number[] + summaryMemberIds?: number[] + referencedRoleIds?: number[] + createTime?: Date +} + +export interface UserGroupSaveReqVO { + id?: number + name: string + code: string + parentId: number + sort: number + status: number + remark?: string + memberIds: number[] + memberRules?: UserGroupMemberRule[] +} + +export interface UserGroupMergeReqVO { + name: string + code: string + status: number + remark?: string + childGroupIds: number[] +} + +/** 从源分组子树中选出成员,创建同级分组并迁移归属。 */ +export interface UserGroupSplitReqVO { + sourceGroupId: number + name: string + code: string + status: number + remark?: string + memberIds: number[] + ruleIds?: number[] + copyRoleAuthorizations?: boolean +} + +export const getUserGroupList = (): Promise => + request.get({ url: '/system/user-group/list' }) + +/** 选人分组使用调用菜单的任职权限,成员由后端按同一人员范围过滤。 */ +export const getMenuUserGroupList = (menuCode: MenuPermission): Promise => + request.get({ url: '/system/user-group/menu-selection-list', params: { menuCode } }) + +export const createUserGroup = (data: UserGroupSaveReqVO): Promise => + request.post({ url: '/system/user-group/create', data }) + +export const updateUserGroup = (data: UserGroupSaveReqVO) => + request.post({ url: '/system/user-group/update', data }) + +export const deleteUserGroup = (id: number) => + request.post({ url: '/system/user-group/delete', params: { id } }) + +export const updateUserGroupMembers = (groupId: number, memberIds: number[], memberRules?: UserGroupMemberRule[]) => + request.post({ url: '/system/user-group/update-members', data: { groupId, memberIds, memberRules } }) + +/** 分组管理专用四维选项,沿用分组管理权限,不借用其他菜单权限。 */ +export const getUserGroupMemberOptions = (): Promise => + request.get({ url: '/system/user-group/member-options' }) + +export const getRoleGroupIds = (roleId: number): Promise => + request.get({ url: '/system/user-group/role-groups', params: { roleId } }) + +export const saveRoleGroupIds = (roleId: number, groupIds: number[]) => + request.post({ url: '/system/user-group/role-groups', data: { roleId, groupIds } }) + +export const mergeUserGroups = (data: UserGroupMergeReqVO): Promise => + request.post({ url: '/system/user-group/merge', data }) + +export const splitUserGroup = (data: UserGroupSplitReqVO): Promise => + request.post({ url: '/system/user-group/split', data }) diff --git a/src/assets/audio/response.mp3 b/src/assets/audio/response.mp3 new file mode 100644 index 0000000..b7cb777 Binary files /dev/null and b/src/assets/audio/response.mp3 differ diff --git a/src/assets/imgs/avatar.gif b/src/assets/imgs/avatar.gif new file mode 100644 index 0000000..fdbd32c Binary files /dev/null and b/src/assets/imgs/avatar.gif differ diff --git a/src/assets/imgs/avatar.jpg b/src/assets/imgs/avatar.jpg new file mode 100644 index 0000000..d46a70a Binary files /dev/null and b/src/assets/imgs/avatar.jpg differ diff --git a/src/assets/imgs/caikai-logo.png b/src/assets/imgs/caikai-logo.png new file mode 100644 index 0000000..f27e654 Binary files /dev/null and b/src/assets/imgs/caikai-logo.png differ diff --git a/src/assets/imgs/diy/app-nav-bar-mp.png b/src/assets/imgs/diy/app-nav-bar-mp.png new file mode 100644 index 0000000..c982804 Binary files /dev/null and b/src/assets/imgs/diy/app-nav-bar-mp.png differ diff --git a/src/assets/imgs/diy/statusBar.png b/src/assets/imgs/diy/statusBar.png new file mode 100644 index 0000000..b85562e Binary files /dev/null and b/src/assets/imgs/diy/statusBar.png differ diff --git a/src/assets/imgs/iot/device.png b/src/assets/imgs/iot/device.png new file mode 100644 index 0000000..79339cd Binary files /dev/null and b/src/assets/imgs/iot/device.png differ diff --git a/src/assets/imgs/login/brand-lockup.svg b/src/assets/imgs/login/brand-lockup.svg new file mode 100644 index 0000000..3df07c6 --- /dev/null +++ b/src/assets/imgs/login/brand-lockup.svg @@ -0,0 +1,400 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/imgs/login/company-mark.png b/src/assets/imgs/login/company-mark.png new file mode 100644 index 0000000..f27e654 Binary files /dev/null and b/src/assets/imgs/login/company-mark.png differ diff --git a/src/assets/imgs/login/login-city.jpg b/src/assets/imgs/login/login-city.jpg new file mode 100644 index 0000000..8204203 Binary files /dev/null and b/src/assets/imgs/login/login-city.jpg differ diff --git a/src/assets/imgs/login/login-city.png b/src/assets/imgs/login/login-city.png new file mode 100644 index 0000000..a301b9e Binary files /dev/null and b/src/assets/imgs/login/login-city.png differ diff --git a/src/assets/imgs/logo.png b/src/assets/imgs/logo.png new file mode 100644 index 0000000..7e1043f Binary files /dev/null and b/src/assets/imgs/logo.png differ diff --git a/src/assets/imgs/profile.jpg b/src/assets/imgs/profile.jpg new file mode 100644 index 0000000..e4bcf87 Binary files /dev/null and b/src/assets/imgs/profile.jpg differ diff --git a/src/assets/imgs/wechat.png b/src/assets/imgs/wechat.png new file mode 100644 index 0000000..6afc5e4 Binary files /dev/null and b/src/assets/imgs/wechat.png differ diff --git a/src/assets/map/json/china.json b/src/assets/map/json/china.json new file mode 100644 index 0000000..bbc0a83 --- /dev/null +++ b/src/assets/map/json/china.json @@ -0,0 +1,856 @@ +{ + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "id": "710000", + "properties": { + "id": "710000", + "cp": [121.509062, 24.044332], + "name": "台湾", + "childNum": 6 + }, + "geometry": { + "type": "MultiPolygon", + "coordinates": [ + ["@@°Ü¯Û"], + [ + "@@ƛĴÕƊÉɼģºðʀ\\ƎsÆNŌÔĚäœnÜƤɊĂǀĆĴžĤNJŨxĚĮǂƺòƌ‚–âÔ®ĮXŦţƸZûЋƕƑGđ¨ĭMó·ęcëƝɉlÝƯֹÅŃ^Ó·śŃNjƏďíåɛGɉ™¿@ăƑŽ¥ĘWǬÏĶŁâ" + ], + ["@@\\p|WoYG¿¥I†j@¢"], + ["@@…¡‰@ˆV^RqˆBbAŒnTXeRz¤Lž«³I"], + ["@@ÆEE—„kWqë @œ"], + ["@@fced"], + ["@@„¯ɜÄèaì¯ØǓIġĽ"], + ["@@çûĖ롖hòř "] + ], + "encodeOffsets": [ + [[122886, 24033]], + [[123335, 22980]], + [[122375, 24193]], + [[122518, 24117]], + [[124427, 22618]], + [[124862, 26043]], + [[126259, 26318]], + [[127671, 26683]] + ] + } + }, + { + "type": "Feature", + "id": "130000", + "properties": { + "id": "130000", + "cp": [114.502461, 38.045474], + "name": "河北", + "childNum": 3 + }, + "geometry": { + "type": "MultiPolygon", + "coordinates": [ + ["@@o~†Z]‚ªr‰ºc_ħ²G¼s`jΟnüsœłNX_“M`ǽÓnUK…Ĝēs¤­©yrý§uģŒc†JŠ›e"], + ["@@U`Ts¿m‚"], + [ + "@@oºƋÄd–eVŽDJj£€J|Ådz•Ft~žKŨ¸IÆv|”‡¢r}膎onb˜}`RÎÄn°ÒdÞ²„^®’lnÐèĄlðӜ×]ªÆ}LiĂ±Ö`^°Ç¶p®đDcœŋ`–ZÔ’¶êqvFƚ†N®ĆTH®¦O’¾ŠIbÐã´BĐɢŴÆíȦp–ĐÞXR€·nndOž¤’OÀĈƒ­Qg˜µFo|gȒęSWb©osx|hYh•gŃfmÖĩnº€T̒Sp›¢dYĤ¶UĈjl’ǐpäìë|³kÛfw²Xjz~ÂqbTŠÑ„ěŨ@|oM‡’zv¢ZrÃVw¬ŧˏfŒ°ÐT€ªqŽs{Sž¯r æÝlNd®²Ğ džiGʂJ™¼lr}~K¨ŸƐÌWö€™ÆŠzRš¤lêmĞL΄’@¡|q]SvK€ÑcwpÏρ†ĿćènĪWlĄkT}ˆJ”¤~ƒÈT„d„™pddʾĬŠ”ŽBVt„EÀ¢ôPĎƗè@~‚k–ü\\rÊĔÖæW_§¼F˜†´©òDòj’ˆYÈrbĞāøŀG{ƀ|¦ðrb|ÀH`pʞkv‚GpuARhÞÆǶgƊTǼƹS£¨¡ù³ŘÍ]¿Ây™ôEP xX¶¹܇O¡“gÚ¡IwÃ鑦ÅB‡Ï|ǰ…N«úmH¯‹âŸDùŽyŜžŲIÄuШDž•¸dɂ‡‚FŸƒ•›Oh‡đ©OŸ›iÃ`ww^ƒÌkŸ‘ÑH«ƇǤŗĺtFu…{Z}Ö@U‡´…ʚLg®¯Oı°ÃwŸ ^˜—€VbÉs‡ˆmA…ê]]w„§›RRl£‡ȭµu¯b{ÍDěïÿȧŽuT£ġƒěŗƃĝ“Q¨fV†Ƌ•ƅn­a@‘³@šď„yýIĹÊKšŭfċŰóŒxV@tˆƯŒJ”]eƒR¾fe|rHA˜|h~Ėƍl§ÏŠlTíb ØoˆÅbbx³^zÃ͚¶Sj®A”yÂhðk`š«P€”ˈµEF†Û¬Y¨Ļrõqi¼‰Wi°§’б´°^[ˆÀ|ĠO@ÆxO\\tŽa\\tĕtû{ġŒȧXýĪÓjùÎRb›š^ΛfK[ݏděYfíÙTyŽuUSyŌŏů@Oi½’éŅ­aVcř§ax¹XŻác‡žWU£ôãºQ¨÷Ñws¥qEH‰Ù|‰›šYQoŕÇyáĂ£MðoťÊ‰P¡mšWO¡€v†{ôvîēÜISpÌhp¨ ‘j†deŔQÖj˜X³à™Ĉ[n`Yp@Už–cM`’RKhŒEbœ”pŞlNut®Etq‚nsÁŠgA‹iú‹oH‡qCX‡”hfgu“~ϋWP½¢G^}¯ÅīGCŸÑ^ãziMáļMTÃƘrMc|O_ž¯Ŏ´|‡morDkO\\mĆJfl@c̬¢aĦtRıҙ¾ùƀ^juųœK­ƒUFy™—Ɲ…›īÛ÷ąV×qƥV¿aȉd³B›qPBm›aËđŻģm“Å®Vйd^K‡KoŸnYg“¯Xhqa”Ldu¥•ÍpDž¡KąÅƒkĝęěhq‡}HyÓ]¹ǧ£…Í÷¿qáµ§š™g‘¤o^á¾ZE‡¤i`ij{n•ƒOl»ŸWÝĔįhg›F[¿¡—ßkOüš_‰€ū‹i„DZàUtėGylƒ}ŒÓM}€jpEC~¡FtoQi‘šHkk{Ãmï‚" + ] + ], + "encodeOffsets": [[[119712, 40641]], [[121616, 39981]], [[116462, 37237]]] + } + }, + { + "type": "Feature", + "id": "140000", + "properties": { + "id": "140000", + "cp": [111.849248, 36.857014], + "name": "山西", + "childNum": 1 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + "@@Þĩ҃S‰ra}Á€yWix±Üe´lè“ßÓǏok‘ćiµVZģ¡coœ‘TS˹ĪmnÕńe–hZg{gtwªpXaĚThȑp{¶Eh—®RćƑP¿£‘Pmc¸mQÝW•ďȥoÅîɡųAďä³aωJ‘½¥PG­ąSM­™…EÅruµé€‘Yӎ•Ō_d›ĒCo­Èµ]¯_²ÕjāŽK~©ÅØ^ԛkïçămϑk]­±ƒcݯÑÃmQÍ~_a—pm…~ç¡q“ˆu{JÅŧ·Ls}–EyÁÆcI{¤IiCfUc•ƌÃp§]웫vD@¡SÀ‘µM‚ÅwuŽYY‡¡DbÑc¡hƒ×]nkoQdaMç~eD•ÛtT‰©±@¥ù@É¡‰ZcW|WqOJmĩl«ħşvOÓ«IqăV—¥ŸD[mI~Ó¢cehiÍ]Ɠ~ĥqXŠ·eƷœn±“}v•[ěďŽŕ]_‘œ•`‰¹ƒ§ÕōI™o©b­s^}Ét±ū«³p£ÿ·Wµ|¡¥ăFÏs׌¥ŅxŸÊdÒ{ºvĴÎêÌɊ²¶€ü¨|ÞƸµȲ‘LLúÉƎ¤ϊęĔV`„_bª‹S^|ŸdŠzY|dz¥p†ZbÆ£¶ÒK}tĦÔņƠ‚PYzn€ÍvX¶Ěn ĠÔ„zý¦ª˜÷žÑĸَUȌ¸‚dòÜJð´’ìúNM¬ŒXZ´‘¤ŊǸ_tldIš{¦ƀðĠȤ¥NehXnYG‚‡R° ƬDj¬¸|CĞ„Kq‚ºfƐiĺ©ª~ĆOQª ¤@ìǦɌ²æBŒÊ”TœŸ˜ʂōĖ’šĴŞ–ȀœÆÿȄlŤĒö„t”νî¼ĨXhŒ‘˜|ªM¤Ðz" + ], + "encodeOffsets": [[116874, 41716]] + } + }, + { + "type": "Feature", + "id": "150000", + "properties": { + "id": "150000", + "cp": [111.670801, 41.818311], + "name": "内蒙古", + "childNum": 2 + }, + "geometry": { + "type": "MultiPolygon", + "coordinates": [ + [ + "@@¯PqƒFB…‰|S•³C|kñ•H‹d‘iÄ¥sˆʼnő…PóÑÑE^‘ÅPpy_YtS™hQ·aHwsOnʼnÚs©iqj›‰€USiº]ïWš‰«gW¡A–Rë¥_ŽsgÁnUI«m‰…„‹]j‡vV¼euhwqA„aW˜ƒ_µj…»çjioQR¹ēÃßt@r³[ÛlćË^ÍÉáG“›OUۗOB±•XŸkŇ¹£k|e]ol™ŸkVͼÕqtaÏõjgÁ£§U^Œ”RLˆËnX°Ç’Bz†^~wfvˆypV ¯„ƫĉ˭ȫƗŷɿÿĿƑ˃ĝÿÃǃßËőó©ǐȍŒĖM×ÍEyx‹þp]Évïè‘vƀnÂĴÖ@‚‰†V~Ĉv¦wĖt—ējyÄDXÄxGQuv_›i¦aBçw‘˛wD™©{ŸtāmQ€{EJ§KPśƘƿ¥@‰sCT•É}ɃwˆƇy±ŸgÑ“}T[÷kÐ禫…SÒ¥¸ëBX½‰HáŵÀğtSÝÂa[ƣ°¯¦P]£ġ“–“Òk®G²„èQ°óMq}EŠóƐÇ\\ƒ‡@áügQ͋u¥Fƒ“T՛¿Jû‡]|mvāÎYua^WoÀa·­ząÒot×¶CLƗi¯¤mƎHNJ¤îìɾŊìTdåwsRÖgĒųúÍġäÕ}Q¶—ˆ¿A•†‹[¡Œ{d×uQAƒ›M•xV‹vMOmăl«ct[wº_šÇʊŽŸjb£ĦS_é“QZ“_lwgOiýe`YYLq§IÁˆdz£ÙË[ÕªuƏ³ÍT—s·bÁĽäė[›b[ˆŗfãcn¥îC¿÷µ[ŏÀQ­ōšĉm¿Á^£mJVm‡—L[{Ï_£›F¥Ö{ŹA}…×Wu©ÅaųijƳhB{·TQqÙIķˑZđ©Yc|M¡…L•eVUóK_QWk’_ĥ‘¿ãZ•»X\\ĴuUƒè‡lG®ěłTĠğDєOrÍd‚ÆÍz]‹±…ŭ©ŸÅ’]ŒÅÐ}UË¥©Tċ™ïxgckfWgi\\ÏĒ¥HkµE˜ë{»ÏetcG±ahUiñiWsɁˆ·c–C‚Õk]wȑ|ća}w…VaĚ᠞ŒG°ùnM¬¯†{ÈˆÐÆA’¥ÄêJxÙ¢”hP¢Ûˆº€µwWOŸóFŽšÁz^ÀŗÎú´§¢T¤ǻƺSė‰ǵhÝÅQgvBHouʝl_o¿Ga{ïq{¥|ſĿHĂ÷aĝÇq‡Z‘ñiñC³ª—…»E`¨åXēÕqÉû[l•}ç@čƘóO¿¡ƒFUsA‰“ʽīccšocƒ‚ƒÇS}„“£‡IS~ălkĩXçmĈ…ŀЂoÐdxÒuL^T{r@¢‘žÍƒĝKén£kQ™‰yšÅõËXŷƏL§~}kqš»IHėDžjĝŸ»ÑÞoŸå°qTt|r©ÏS‹¯·eŨĕx«È[eMˆ¿yuˆ‘pN~¹ÏyN£{©’—g‹ħWí»Í¾s“əšDž_ÃĀɗ±ą™ijĉʍŌŷ—S›É“A‹±åǥɋ@럣R©ąP©}ĹªƏj¹erƒLDĝ·{i«ƫC£µsKCš…GS|úþX”gp›{ÁX¿Ÿć{ƱȏñZáĔyoÁhA™}ŅĆfdʼn„_¹„Y°ėǩÑ¡H¯¶oMQqð¡Ë™|‘Ñ`ƭŁX½·óۓxğįÅcQ‡ˆ“ƒs«tȋDžF“Ÿù^i‘t«Č¯[›hAi©á¥ÇĚ×l|¹y¯YȵƓ‹ñǙµï‚ċ™Ļ|Dœ™üȭ¶¡˜›oŽäÕG\\ďT¿Òõr¯œŸLguÏYęRƩšɷŌO\\İТæ^Ŋ IJȶȆbÜGŽĝ¬¿ĚVĎgª^íu½jÿĕęjık@Ľƒ]ėl¥Ë‡ĭûÁ„ƒėéV©±ćn©­ȇžÍq¯½•YÃÔʼn“ÉNѝÅÝy¹NqáʅDǡËñ­ƁYÅy̱os§ȋµʽǘǏƬɱà‘ưN¢ƔÊuľýľώȪƺɂļžxœZĈ}ÌʼnŪ˜ĺœŽĭFЛĽ̅ȣͽÒŵìƩÇϋÿȮǡŏçƑůĕ~Ǎ›¼ȳÐUf†dIxÿ\\G ˆzâɏÙOº·pqy£†@ŒŠqþ@Ǟ˽IBäƣzsÂZ†ÁàĻdñ°ŕzéØűzșCìDȐĴĺf®ŽÀľưø@ɜÖÞKĊŇƄ§‚͑těï͡VAġÑÑ»d³öǍÝXĉĕÖ{þĉu¸ËʅğU̎éhɹƆ̗̮ȘNJ֥ड़ࡰţાíϲäʮW¬®ҌeרūȠkɬɻ̼ãüfƠSצɩςåȈHϚÎKdzͲOðÏȆƘ¼CϚǚ࢚˼ФԂ¤ƌžĞ̪Qʤ´¼mȠJˀŸƲÀɠmǐnǔĎȆÞǠN~€ʢĜ‚¶ƌĆĘźʆȬ˪ĚǏĞGȖƴƀj`ĢçĶāàŃºē̃ĖćšYŒÀŎüôQÐÂŎŞdžŞêƖš˜oˆDĤÕºÑǘÛˤ³̀gńƘĔÀ^žªƂ`ªt¾äƚêĦĀ¼Ð€Ĕǎ¨Ȕ»͠^ˮÊȦƤøxRrŜH¤¸ÂxDĝŒ|ø˂˜ƮÐ¬ɚwɲFjĔ²Äw°dždÀɞ_ĸdîàŎjʜêTĞªŌ‡ŜWÈ|tqĢUB~´°ÎFC•ŽU¼pĀēƄN¦¾O¶ŠłKĊOj“Ě”j´ĜYp˜{¦„ˆSĚÍ\\Tš×ªV–÷Ší¨ÅDK°ßtŇĔKš¨ǵÂcḷ̌ĚǣȄĽF‡lġUĵœŇ‹ȣFʉɁƒMğįʏƶɷØŭOǽ«ƽū¹Ʊő̝Ȩ§ȞʘĖiɜɶʦ}¨֪ࠜ̀ƇǬ¹ǨE˦ĥªÔêFŽxúQ„Er´W„rh¤Ɛ \\talĈDJ˜Ü|[Pll̚¸ƎGú´Pž¬W¦†^¦–H]prR“n|or¾wLVnÇIujkmon£cX^Bh`¥V”„¦U¤¸}€xRj–[^xN[~ªŠxQ„‚[`ªHÆÂExx^wšN¶Ê˜|¨ì†˜€MrœdYp‚oRzNy˜ÀDs~€bcfÌ`L–¾n‹|¾T‚°c¨È¢a‚r¤–`[|òDŞĔöxElÖdH„ÀI`„Ď\\Àì~ƎR¼tf•¦^¢ķ¶e”ÐÚMŒptgj–„ɡČÅyġLû™ŇV®ŠÄÈƀ†Ď°P|ªVV†ªj–¬ĚÒêp¬–E|ŬÂc|ÀtƐK fˆ{ĘFǜƌXƲąo½Ę‘\\¥–o}›Ûu£ç­kX‘{uĩ«āíÓUŅßŢq€Ť¥lyň[€oi{¦‹L‡ń‡ðFȪȖ”ĒL„¿Ì‹ˆfŒ£K£ʺ™oqNŸƒwğc`ue—tOj×°KJ±qƒÆġm‰Ěŗos¬…qehqsuœƒH{¸kH¡Š…ÊRǪÇƌbȆ¢´ä܍¢NìÉʖ¦â©Ġu¦öČ^â£Ăh–šĖMÈÄw‚\\fŦ°W ¢¾luŸD„wŠ\\̀ʉÌÛM…Ā[bӞEn}¶Vc…ê“sƒ" + ] + ], + "encodeOffsets": [[[129102, 52189]]] + } + }, + { + "type": "Feature", + "id": "210000", + "properties": { + "id": "210000", + "cp": [123.429096, 41.796767], + "name": "辽宁", + "childNum": 16 + }, + "geometry": { + "type": "MultiPolygon", + "coordinates": [ + ["@@L–Ž@@s™a"], + ["@@MnNm"], + ["@@d‚c"], + ["@@eÀ‚C@b‚“‰"], + ["@@f‡…Xwkbr–Ä`qg"], + ["@@^jtW‘Q"], + ["@@~ Y]c"], + ["@@G`ĔN^_¿Z‚ÃM"], + ["@@iX¶B‹Y"], + ["@@„YƒZ"], + ["@@L_{Epf"], + ["@@^WqCT\\"], + ["@@\\[“‹§t|”¤_"], + ["@@m`n_"], + ["@@Ïxnj{q_×^Giip"], + [ + "@@@œé^B†‡ntˆaÊU—˜Ÿ]x ¯ÄPIJ­°h€ʙK³†VˆÕ@Y~†|EvĹsDŽ¦­L^p²ŸÒG ’Ël]„xxÄ_˜fT¤Ď¤cŽœP„–C¨¸TVjbgH²sdÎdHt`Bˆ—²¬GJję¶[ÐhjeXdlwhšðSȦªVÊπ‹Æ‘Z˜ÆŶ®²†^ŒÎyÅÎcPqń“ĚDMħĜŁH­ˆk„çvV[ij¼W–‚YÀäĦ’‘`XlžR`žôLUVžfK–¢†{NZdĒª’YĸÌÚJRr¸SA|ƴgŴĴÆbvªØX~†źBŽ|¦ÕœEž¤Ð`\\|Kˆ˜UnnI]¤ÀÂĊnŎ™R®Ő¿¶\\ÀøíDm¦ÎbŨab‰œaĘ\\ľã‚¸a˜tÎSƐ´©v\\ÖÚÌǴ¤Â‡¨JKr€Z_Z€fjþhPkx€`Y”’RIŒjJcVf~sCN¤ ˆE‚œhæm‰–sHy¨SðÑÌ\\\\ŸĐRZk°IS§fqŒßýáЍÙÉÖ[^¯ǤŲ„ê´\\¦¬ĆPM¯£Ÿˆ»uïpùzEx€žanµyoluqe¦W^£ÊL}ñrkqWňûP™‰UP¡ôJŠoo·ŒU}£Œ„[·¨@XŒĸŸ“‹‹DXm­Ûݏº‡›GU‹CÁª½{íĂ^cj‡k“¶Ã[q¤“LÉö³cux«zZfƒ²BWÇ®Yß½ve±ÃC•ý£W{Ú^’q^sÑ·¨‹ÍOt“¹·C¥‡GD›rí@wÕKţ݋˜Ÿ«V·i}xËÍ÷‘i©ĝ‡ɝǡ]ƒˆ{c™±OW‹³Ya±Ÿ‰_穂Hžĕoƫ€Ňqƒr³‰Lys[„ñ³¯OS–ďOMisZ†±ÅFC¥Pq{‚Ã[Pg}\\—¿ghćO…•k^ģÁFıĉĥM­oEqqZûěʼn³F‘¦oĵ—hŸÕP{¯~TÍlª‰N‰ßY“Ð{Ps{ÃVU™™eĎwk±ʼnVÓ½ŽJãÇÇ»Jm°dhcÀff‘dF~ˆ€ĀeĖ€d`sx² šƒ®EżĀdQ‹Âd^~ăÔHˆ¦\\›LKpĄVez¤NP ǹӗR™ÆąJSh­a[¦´Âghwm€BÐ¨źhI|žVVŽ—Ž|p] Â¼èNä¶ÜBÖ¼“L`‚¼bØæŒKV”ŸpoœúNZÞÒKxpw|ÊEMnzEQšŽIZ”ŽZ‡NBˆčÚFÜçmĩ‚WĪñt‘ÞĵÇñZ«uD‚±|Əlij¥ãn·±PmÍa‰–da‡ CL‡Ǒkùó¡³Ï«QaċϑOÃ¥ÕđQȥċƭy‹³ÃA" + ] + ], + "encodeOffsets": [ + [[123686, 41445]], + [[126019, 40435]], + [[124393, 40128]], + [[126117, 39963]], + [[125322, 40140]], + [[126686, 40700]], + [[126041, 40374]], + [[125584, 40168]], + [[125453, 40165]], + [[125362, 40214]], + [[125280, 40291]], + [[125774, 39997]], + [[125976, 40496]], + [[125822, 39993]], + [[125509, 40217]], + [[122731, 40949]] + ] + } + }, + { + "type": "Feature", + "id": "220000", + "properties": { "id": "220000", "cp": [125.3245, 43.886841], "name": "吉林", "childNum": 1 }, + "geometry": { + "type": "Polygon", + "coordinates": [ + "@@‘p䔳PClƒFbbÍzš€wBG’ĭ€Z„Åi“»ƒlY­ċ²SgŽkÇ£—^S‰“qd¯•‹R…©éŽ£¯S†\\cZ¹iűƏCuƍÓX‡oR}“M^o•£…R}oªU­F…uuXHlEŕ‡€Ï©¤ÛmTŽþ¤D–²ÄufàÀ­XXȱAe„yYw¬dvõ´KÊ£”\\rµÄl”iˆdā]|DÂVŒœH¹ˆÞ®ÜWnŒC”Œķ W‹§@\\¸‹ƒ~¤‹Vp¸‰póIO¢ŠVOšŇürXql~òÉK]¤¥Xrfkvzpm¶bwyFoúvð‡¼¤ N°ąO¥«³[ƒéǡű_°Õ\\ÚÊĝŽþâőàerR¨­JYlďQ[ ÏYëЧTGz•tnŠß¡gFkMŸāGÁ¤ia É‰™È¹`\\xs€¬dĆkNnuNUŠ–užP@‚vRY¾•–\\¢…ŒGªóĄ~RãÖÎĢù‚đŴÕhQŽxtcæëSɽʼníëlj£ƍG£nj°KƘµDsØÑpyƸ®¿bXp‚]vbÍZuĂ{nˆ^IüœÀSք”¦EŒvRÎûh@℈[‚Əȉô~FNr¯ôçR±ƒ­HÑl•’Ģ–^¤¢‚OðŸŒævxsŒ]ÞÁTĠs¶¿âƊGW¾ìA¦·TѬ†è¥€ÏÐJ¨¼ÒÖ¼ƒƦɄxÊ~S–tD@ŠĂ¼Ŵ¡jlºWžvЉˆzƦZЎ²CH— „Axiukd‹ŒGgetqmcžÛ£Ozy¥cE}|…¾cZ…k‚‰¿uŐã[oxGikfeäT@…šSUwpiÚFM©’£è^ڟ‚`@v¶eň†f h˜eP¶žt“äOlÔUgƒÞzŸU`lœ}ÔÆUvØ_Ō¬Öi^ĉi§²ÃŠB~¡Ĉ™ÚEgc|DC_Ȧm²rBx¼MÔ¦ŮdĨÃâYx‘ƘDVÇĺĿg¿cwÅ\\¹˜¥Yĭlœ¤žOv†šLjM_a W`zļMž·\\swqÝSA‡š—q‰Śij¯Š‘°kŠRē°wx^Đkǂғ„œž“œŽ„‹\\]˜nrĂ}²ĊŲÒøãh·M{yMzysěnĒġV·°“G³¼XÀ““™¤¹i´o¤ŃšŸÈ`̃DzÄUĞd\\i֚ŒˆmÈBĤÜɲDEh LG¾ƀľ{WaŒYÍȏĢĘÔRîĐj‹}Ǟ“ccj‡oUb½š{“h§Ǿ{K‹ƖµÎ÷žGĀÖŠåưÎs­l›•yiē«‹`姝H¥Ae^§„GK}iã\\c]v©ģZ“mÃ|“[M}ģTɟĵ‘Â`À–çm‰‘FK¥ÚíÁbXš³ÌQґHof{‰]e€pt·GŋĜYünĎųVY^’˜ydõkÅZW„«WUa~U·Sb•wGçǑ‚“iW^q‹F‚“›uNĝ—·Ew„‹UtW·Ýďæ©PuqEzwAV•—XR‰ãQ`­©GŒM‡ehc›c”ďϝd‡©ÑW_ϗYƅŒ»…é\\ƒɹ~ǙG³mØ©BšuT§Ĥ½¢Ã_ý‘L¡‘ýŸqT^rme™\\Pp•ZZbƒyŸ’uybQ—efµ]UhĿDCmûvašÙNSkCwn‰cćfv~…Y‹„ÇG" + ], + "encodeOffsets": [[130196, 42528]] + } + }, + { + "type": "Feature", + "id": "230000", + "properties": { + "id": "230000", + "cp": [128.642464, 46.756967], + "name": "黑龙江", + "childNum": 2 + }, + "geometry": { + "type": "MultiPolygon", + "coordinates": [ + [ + "@@UƒµNÿ¥īè灋•HÍøƕ¶LŒǽ|g¨|”™Ža¾pViˆdd”~ÈiŒíďÓQġėǐZ΋ŽXb½|ſÃH½ŸKFgɱCģÛÇA‡n™‹jÕc[VĝDZÃ˄Ç_™ £ń³pŽj£º”š¿”»WH´¯”U¸đĢmžtĜyzzNN|g¸÷äűѱĉā~mq^—Œ[ƒ”››”ƒǁÑďlw]¯xQĔ‰¯l‰’€°řĴrŠ™˜BˆÞTxr[tޏĻN_yŸX`biN™Ku…P›£k‚ZĮ—¦[ºxÆÀdhŽĹŀUÈƗCw’áZħÄŭcÓ¥»NAw±qȥnD`{ChdÙFćš}¢‰A±Äj¨]ĊÕjŋ«×`VuÓś~_kŷVÝyh„“VkÄãPs”Oµ—fŸge‚Ň…µf@u_Ù ÙcŸªNªÙEojVx™T@†ãSefjlwH\\pŏäÀvŠŽlY†½d{†F~¦dyz¤PÜndsrhf‹HcŒvlwjFœ£G˜±DύƥY‡yϊu¹XikĿ¦ÏqƗǀOŜ¨LI|FRĂn sª|Cš˜zxAè¥bœfudTrFWÁ¹Am|˜ĔĕsķÆF‡´Nš‰}ć…UŠÕ@Áijſmužç’uð^ÊýowŒFzØÎĕNőžǏȎôªÌŒDŽàĀÄ˄ĞŀƒʀĀƘŸˮȬƬĊ°ƒUŸzou‡xe]}Ž…AyȑW¯ÌmK‡“Q]‹Īºif¸ÄX|sZt|½ÚUΠlkš^p{f¤lˆºlÆW –€A²˜PVܜPH”Êâ]ÎĈÌÜk´\\@qàsĔÄQºpRij¼èi†`¶—„bXƒrBgxfv»ŽuUiˆŒ^v~”J¬mVp´£Œ´VWrnP½ì¢BX‚¬h™ŠðX¹^TjVœŠriªj™tŊÄm€tPGx¸bgRšŽsT`ZozÆO]’ÒFô҆Oƒ‡ŊŒvŞ”p’cGŒêŠsx´DR–Œ{A†„EOr°Œ•žx|íœbˆ³Wm~DVjºéNN†Ëܲɶ­GƒxŷCStŸ}]ûō•SmtuÇÃĕN•™āg»šíT«u}ç½BĵÞʣ¥ëÊ¡Mێ³ãȅ¡ƋaǩÈÉQ‰†G¢·lG|›„tvgrrf«†ptęŘnŠÅĢr„I²¯LiØsPf˜_vĠd„xM prʹšL¤‹¤‡eˌƒÀđK“žïÙVY§]I‡óáĥ]ķ†Kˆ¥Œj|pŇ\\kzţ¦šnņäÔVĂîά|vW’®l¤èØr‚˜•xm¶ă~lÄƯĄ̈́öȄEÔ¤ØQĄ–Ą»ƢjȦOǺ¨ìSŖÆƬy”Qœv`–cwƒZSÌ®ü±DŽ]ŀç¬B¬©ńzƺŷɄeeOĨS’Œfm Ċ‚ƀP̎ēz©Ċ‚ÄÕÊmgŸÇsJ¥ƔˆŊśæ’΁Ñqv¿íUOµª‰ÂnĦÁ_½ä@ê텣P}Ġ[@gġ}g“ɊדûÏWXá¢užƻÌsNͽƎÁ§č՛AēeL³àydl›¦ĘVçŁpśdžĽĺſʃQíÜçÛġԏsĕ¬—Ǹ¯YßċġHµ ¡eå`ļƒrĉŘóƢFì“ĎWøxÊk†”ƈdƬv|–I|·©NqńRŀƒ¤é”eŊœŀ›ˆàŀU²ŕƀB‚Q£Ď}L¹Îk@©ĈuǰųǨ”Ú§ƈnTËÇéƟÊcfčŤ^Xm‡—HĊĕË«W·ċëx³ǔķÐċJā‚wİ_ĸ˜Ȁ^ôWr­°oú¬Ħ…ŨK~”ȰCĐ´Ƕ£’fNÎèâw¢XnŮeÂÆĶŽ¾¾xäLĴĘlļO¤ÒĨA¢Êɚ¨®‚ØCÔ ŬGƠ”ƦYĜ‡ĘÜƬDJ—g_ͥœ@čŅĻA“¶¯@wÎqC½Ĉ»NŸăëK™ďÍQ“Ùƫ[«Ãí•gßÔÇOÝáW‘ñuZ“¯ĥ€Ÿŕā¡ÑķJu¤E Ÿå¯°WKɱ_d_}}vyŸõu¬ï¹ÓU±½@gÏ¿rýD‰†g…Cd‰µ—°MFYxw¿CG£‹Rƛ½Õ{]L§{qqąš¿BÇƻğëšܭNJË|c²}Fµ}›ÙRsÓpg±ŠQNqǫŋRwŕnéÑÉKŸ†«SeYR…ŋ‹@{¤SJ}šD Ûǖ֍Ÿ]gr¡µŷjqWÛham³~S«“„›Þ]" + ] + ], + "encodeOffsets": [[[134456, 44547]]] + } + }, + { + "type": "Feature", + "id": "320000", + "properties": { + "id": "320000", + "cp": [119.767413, 33.041544], + "name": "江苏", + "childNum": 1 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + "@@cþÅPiŠ`ZŸRu¥É\\]~°ŽY`µ†Óƒ^phÁbnÀşúŽòa–ĬºTÖŒb‚˜e¦¦€{¸ZâćNpŒ©žHr|^ˆmjhŠSEb\\afv`sz^lkŽlj‹Ätg‹¤D˜­¾Xš¿À’|ДiZ„ȀåB·î}GL¢õcßjaŸyBFµÏC^ĭ•cÙt¿sğH]j{s©HM¢ƒQnDÀ©DaÜތ·jgàiDbPufjDk`dPOîƒhw¡ĥ‡¥šG˜ŸP²ĐobºrY†„î¶aHŢ´ ]´‚rılw³r_{£DB_Ûdåuk|ˆŨ¯F Cºyr{XFy™e³Þċ‡¿Â™kĭB¿„MvÛpm`rÚã”@ƹhågËÖƿxnlč¶Åì½Ot¾dJlŠVJʜǀœŞqvnOŠ^ŸJ”Z‘ż·Q}ê͎ÅmµÒ]Žƍ¦Dq}¬R^èĂ´ŀĻĊIԒtžIJyQŐĠMNtœR®òLh‰›Ěs©»œ}OӌGZz¶A\\jĨFˆäOĤ˜HYš†JvÞHNiÜaϚɖnFQlšNM¤ˆB´ĄNöɂtp–Ŭdf先‹qm¿QûŠùއÚb¤uŃJŴu»¹Ą•lȖħŴw̌ŵ²ǹǠ͛hĭłƕrçü±Y™xci‡tğ®jű¢KOķ•Coy`å®VTa­_Ā]ŐÝɞï²ʯÊ^]afYǸÃĆēĪȣJđ͍ôƋĝÄ͎ī‰çÛɈǥ£­ÛmY`ó£Z«§°Ó³QafusNıDž_k}¢m[ÝóDµ—¡RLčiXy‡ÅNïă¡¸iĔϑNÌŕoēdōîåŤûHcs}~Ûwbù¹£¦ÓCt‹OPrƒE^ÒoŠg™ĉIµžÛÅʹK…¤½phMŠü`o怆ŀ" + ], + "encodeOffsets": [[121740, 32276]] + } + }, + { + "type": "Feature", + "id": "330000", + "properties": { + "id": "330000", + "cp": [120.153576, 29.287459], + "name": "浙江", + "childNum": 45 + }, + "geometry": { + "type": "MultiPolygon", + "coordinates": [ + ["@@E^dQ]K"], + ["@@jX^j‡"], + ["@@sfŠbU‡"], + ["@@qP\\xz[ck"], + ["@@‘Rƒ¢‚FX}°[s_"], + ["@@Cbœ\\—}"], + ["@@e|v\\la{u"], + ["@@v~u}"], + ["@@QxÂF¯}"], + ["@@¹nŒvÞs¯o"], + ["@@rSkUEj"], + ["@@bi­ZŒP"], + ["@@p[}INf"], + ["@@À¿€"], + ["@@¹dnbŒ…"], + ["@@rSŸBnR"], + ["@@g~h}"], + ["@@FlEk"], + ["@@OdPc"], + ["@@v[u\\"], + ["@@FjâL~wyoo~›sµL–\\"], + ["@@¬e¹aNˆ"], + ["@@\\nÔ¡q]L³ë\\ÿ®ŒQ֎"], + ["@@ÊA­©[¬"], + ["@@KxŒv­"], + ["@@@hlIk]"], + ["@@pW{o||j"], + ["@@Md|_mC"], + ["@@¢…X£ÏylD¼XˆtH"], + ["@@hlÜ[LykAvyfw^Ež›¤"], + ["@@fp¤Mus“R"], + ["@@®_ma~•LÁ¬šZ"], + ["@@iM„xZ"], + ["@@ZcYd"], + ["@@Z~dOSo|A¿qZv"], + ["@@@`”EN¡v"], + ["@@|–TY{"], + ["@@@n@m"], + ["@@XWkCT\\"], + ["@@ºwšZRkĕWO¢"], + ["@@™X®±Grƪ\\ÔáXq{‹"], + ["@@ůTG°ĄLHm°UC‹"], + [ + "@@¤Ž€aÜx~}dtüGæţŎíĔcŖpMËВj碷ðĄÆMzˆjWKĎ¢Q¶˜À_꒔_Bı€i«pZ€gf€¤Nrq]§ĂN®«H±‡yƳí¾×ŸīàLłčŴǝĂíÀBŖÕªˆŠÁŖHŗʼnåqûõi¨hÜ·ƒñt»¹ýv_[«¸m‰YL¯‰Qª…mĉÅdMˆ•gÇjcº«•ęœ¬­K­´ƒB«Âącoċ\\xKd¡gěŧ«®á’[~ıxu·Å”KsËɏc¢Ù\\ĭƛëbf¹­ģSƒĜkáƉÔ­ĈZB{ŠaM‘µ‰fzʼnfåÂŧįƋǝÊĕġć£g³ne­ą»@­¦S®‚\\ßðCšh™iqªĭiAu‡A­µ”_W¥ƣO\\lċĢttC¨£t`ˆ™PZäuXßBs‡Ļyek€OđġĵHuXBšµ]׌‡­­\\›°®¬F¢¾pµ¼kŘó¬Wät’¸|@ž•L¨¸µr“ºù³Ù~§WI‹ŸZWŽ®’±Ð¨ÒÉx€`‰²pĜ•rOògtÁZ}þÙ]„’¡ŒŸFK‚wsPlU[}¦Rvn`hq¬\\”nQ´ĘRWb”‚_ rtČFI֊kŠŠĦPJ¶ÖÀÖJĈĄTĚòžC ²@Pú…Øzœ©PœCÈÚœĒ±„hŖ‡l¬â~nm¨f©–iļ«m‡nt–u†ÖZÜÄj“ŠLŽ®E̜Fª²iÊxبžIÈhhst" + ], + ["@@o\\V’zRZ}y"], + ["@@†@°¡mۛGĕ¨§Ianá[ýƤjfæ‡ØL–•äGr™"] + ], + "encodeOffsets": [ + [[125592, 31553]], + [[125785, 31436]], + [[125729, 31431]], + [[125513, 31380]], + [[125223, 30438]], + [[125115, 30114]], + [[124815, 29155]], + [[124419, 28746]], + [[124095, 28635]], + [[124005, 28609]], + [[125000, 30713]], + [[125111, 30698]], + [[125078, 30682]], + [[125150, 30684]], + [[124014, 28103]], + [[125008, 31331]], + [[125411, 31468]], + [[125329, 31479]], + [[125626, 30916]], + [[125417, 30956]], + [[125254, 30976]], + [[125199, 30997]], + [[125095, 31058]], + [[125083, 30915]], + [[124885, 31015]], + [[125218, 30798]], + [[124867, 30838]], + [[124755, 30788]], + [[124802, 30809]], + [[125267, 30657]], + [[125218, 30578]], + [[125200, 30562]], + [[124968, 30474]], + [[125167, 30396]], + [[124955, 29879]], + [[124714, 29781]], + [[124762, 29462]], + [[124325, 28754]], + [[123990, 28459]], + [[125366, 31477]], + [[125115, 30363]], + [[125369, 31139]], + [[122495, 31878]], + [[125329, 30690]], + [[125192, 30787]] + ] + } + }, + { + "type": "Feature", + "id": "340000", + "properties": { "id": "340000", "cp": [117.283042, 31.26119], "name": "安徽", "childNum": 3 }, + "geometry": { + "type": "MultiPolygon", + "coordinates": [ + ["@@^iuLX^"], + ["@@‚e©Ehl"], + [ + "@@°ZÆëϵmkǀwÌÕæhºgBĝâqÙĊz›ÖgņtÀÁÊÆá’hEz|WzqD¹€Ÿ°E‡ŧl{ævÜcA`¤C`|´qžxIJkq^³³ŸGšµbƒíZ…¹qpa±ď OH—¦™Ħˆx¢„gPícOl_iCveaOjCh߸i݋bÛªCC¿€m„RV§¢A|t^iĠGÀtÚs–d]ĮÐDE¶zAb àiödK¡~H¸íæAžǿYƒ“j{ď¿‘™À½W—®£ChŒÃsiŒkkly]_teu[bFa‰Tig‡n{]Gqªo‹ĈMYá|·¥f¥—őaSÕė™NµñĞ«ImŒ_m¿Âa]uĜp …Z_§{Cƒäg¤°r[_Yj‰ÆOdý“[ŽI[á·¥“Q_n‡ùgL¾mv™ˊBÜÆ¶ĊJhšp“c¹˜O]iŠ]œ¥ jtsggJǧw×jÉ©±›EFˍ­‰Ki”ÛÃÕYv…s•ˆm¬njĻª•§emná}k«ŕˆƒgđ²Ù›DǤ›í¡ªOy›†×Où±@DŸñSęćăÕIÕ¿IµĥO‰‰jNÕËT¡¿tNæŇàåyķrĕq§ÄĩsWÆßŽF¶žX®¿‰mŒ™w…RIޓfßoG‘³¾©uyH‘į{Ɓħ¯AFnuP…ÍÔzšŒV—dàôº^Ðæd´€‡oG¤{S‰¬ćxã}›ŧ×Kǥĩ«žÕOEзÖdÖsƘѨ[’Û^Xr¢¼˜§xvěƵ`K”§ tÒ´Cvlo¸fzŨð¾NY´ı~ÉĔē…ßúLÃϖ_ÈÏ|]ÂÏFl”g`bšežž€n¾¢pU‚h~ƴ˶_‚r sĄ~cž”ƈ]|r c~`¼{À{ȒiJjz`îÀT¥Û³…]’u}›f…ïQl{skl“oNdŸjŸäËzDvčoQŠďHI¦rb“tHĔ~BmlRš—V_„ħTLnñH±’DžœL‘¼L˜ªl§Ťa¸ŒĚlK²€\\RòvDcÎJbt[¤€D@®hh~kt°ǾzÖ@¾ªdb„YhüóZ ň¶vHrľ\\ʗJuxAT|dmÀO„‹[ÃԋG·ĚąĐlŪÚpSJ¨ĸˆLvÞcPæķŨŽ®mАˆálŸwKhïgA¢ųƩޖ¤OȜm’°ŒK´" + ] + ], + "encodeOffsets": [[[121722, 32278]], [[119475, 30423]], [[119168, 35472]]] + } + }, + { + "type": "Feature", + "id": "350000", + "properties": { + "id": "350000", + "cp": [118.306239, 26.075302], + "name": "福建", + "childNum": 18 + }, + "geometry": { + "type": "MultiPolygon", + "coordinates": [ + ["@@“zht´‡]"], + ["@@aj^~ĆG—©O"], + ["@@ed¨„C}}i"], + ["@@@vˆPGsQ"], + ["@@‰sBz‚ddW]Q"], + ["@@SލQ“{"], + ["@@NŽVucW"], + ["@@qptBAq"], + ["@@‰’¸[mu"], + ["@@Q\\pD]_"], + ["@@jSwUadpF"], + ["@@eXª~ƒ•"], + ["@@AjvFso"], + ["@@fT–›_Çí\\Ÿ™—v|ba¦jZÆy€°"], + ["@@IjJi"], + ["@@wJI€ˆxš«¼AoNe{M­"], + ["@@K‰±¡Óˆ”ČäeZ"], + [ + "@@k¡¹Eh~c®wBk‹UplÀ¡I•~Māe£bN¨gZý¡a±Öcp©PhžI”Ÿ¢Qq…ÇGj‹|¥U™ g[Ky¬ŏ–v@OpˆtÉEŸF„\\@ åA¬ˆV{Xģ‰ĐBy…cpě…¼³Ăp·¤ƒ¥o“hqqÚ¡ŅLsƒ^ᗞ§qlŸÀhH¨MCe»åÇGD¥zPO£čÙkJA¼ß–ėu›ĕeûҍiÁŧSW¥˜QŠûŗ½ùěcݧSùĩąSWó«íęACµ›eR—åǃRCÒÇZÍ¢‹ź±^dlsŒtjD¸•‚ZpužÔâÒH¾oLUêÃÔjjēò´ĄW‚ƛ…^Ñ¥‹ĦŸ@Çò–ŠmŒƒOw¡õyJ†yD}¢ďÑÈġfŠZd–a©º²z£šN–ƒjD°Ötj¶¬ZSÎ~¾c°¶Ðm˜x‚O¸¢Pl´žSL|¥žA†ȪĖM’ņIJg®áIJČĒü` ŽQF‡¬h|ÓJ@zµ |ê³È ¸UÖŬŬÀEttĸr‚]€˜ðŽM¤ĶIJHtÏ A’†žĬkvsq‡^aÎbvŒd–™fÊòSD€´Z^’xPsÞrv‹ƞŀ˜jJd×ŘÉ ®A–ΦĤd€xĆqAŒ†ZR”ÀMźŒnĊ»ŒİÐZ— YX–æJŠyĊ²ˆ·¶q§·–K@·{s‘Xãô«lŗ¶»o½E¡­«¢±¨Yˆ®Ø‹¶^A™vWĶGĒĢžPlzfˆļŽtàAvWYãšO_‡¤sD§ssČġ[kƤPX¦Ž`¶“ž®ˆBBvĪjv©šjx[L¥àï[F…¼ÍË»ğV`«•Ip™}ccÅĥZE‹ãoP…´B@ŠD—¸m±“z«Ƴ—¿å³BRضˆœWlâþäą`“]Z£Tc— ĹGµ¶H™m@_©—kŒ‰¾xĨ‡ôȉðX«½đCIbćqK³Á‹Äš¬OAwã»aLʼn‡ËĥW[“ÂGI—ÂNxij¤D¢ŽîĎÎB§°_JœGsƒ¥E@…¤uć…P‘å†cuMuw¢BI¿‡]zG¹guĮck\\_" + ] + ], + "encodeOffsets": [ + [[123250, 27563]], + [[122541, 27268]], + [[123020, 27189]], + [[122916, 27125]], + [[122887, 26845]], + [[122808, 26762]], + [[122568, 25912]], + [[122778, 26197]], + [[122515, 26757]], + [[122816, 26587]], + [[123388, 27005]], + [[122450, 26243]], + [[122578, 25962]], + [[121255, 25103]], + [[120987, 24903]], + [[122339, 25802]], + [[121042, 25093]], + [[122439, 26024]] + ] + } + }, + { + "type": "Feature", + "id": "360000", + "properties": { + "id": "360000", + "cp": [115.592151, 27.676493], + "name": "江西", + "childNum": 1 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + "@@ĢĨƐgÂMD~ņªe^\\^§„ý©j׍cZ†Ø¨zdÒa¶ˆlҍJŒìõ`oz÷@¤u޸´†ôęöY¼‰HČƶajlÞƩ¥éZ[”|h}^U Œ ¥p„ĄžƦO lt¸Æ €Q\\€ŠaÆ|CnÂOjt­ĚĤd’ÈŒF`’¶„@Ð딠¦ōҞ¨Sêv†HĢûXD®…QgėWiØPÞìºr¤dž€NĠ¢l–•ĄtZoœCƞÔºCxrpĠV®Ê{f_Y`_ƒeq’’®Aot`@o‚DXfkp¨|Šs¬\\D‘ÄSfè©Hn¬…^DhÆyøJh“ØxĢĀLʈ„ƠPżċĄwȠ̦G®ǒĤäTŠÆ~ĦwŠ«|TF¡Šn€c³Ïå¹]ĉđxe{ÎӐ†vOEm°BƂĨİ|G’vz½ª´€H’àp”eJ݆Qšxn‹ÀŠW­žEµàXÅĪt¨ÃĖrÄwÀFÎ|ňÓMå¼ibµ¯»åDT±m[“r«_gŽmQu~¥V\\OkxtL E¢‹ƒ‘Ú^~ýê‹Pó–qo슱_Êw§ÑªåƗ⼋mĉŹ‹¿NQ“…YB‹ąrwģcÍ¥B•Ÿ­ŗÊcØiI—žƝĿuŒqtāwO]‘³YCñTeɕš‹caub͈]trlu€ī…B‘ПGsĵıN£ï—^ķqss¿FūūV՟·´Ç{éĈý‰ÿ›OEˆR_ŸđûIċâJh­ŅıN‘ȩĕB…¦K{Tk³¡OP·wn—µÏd¯}½TÍ«YiµÕsC¯„iM•¤™­•¦¯P|ÿUHv“he¥oFTu‰õ\\ŽOSs‹MòđƇiaºćXŸĊĵà·çhƃ÷ǜ{‘ígu^›đg’m[×zkKN‘¶Õ»lčÓ{XSƉv©_ÈëJbVk„ĔVÀ¤P¾ºÈMÖxlò~ªÚàGĂ¢B„±’ÌŒK˜y’áV‡¼Ã~­…`g›ŸsÙfI›Ƌlę¹e|–~udjˆuTlXµf`¿JdŠ[\\˜„L‚‘²" + ], + "encodeOffsets": [[116689, 26234]] + } + }, + { + "type": "Feature", + "id": "370000", + "properties": { + "id": "370000", + "cp": [118.000923, 36.275807], + "name": "山东", + "childNum": 13 + }, + "geometry": { + "type": "MultiPolygon", + "coordinates": [ + ["@@Xjd]{K"], + ["@@itbFHy"], + ["@@HlGk"], + ["@@T‚ŒGŸy"], + ["@@K¬˜•‹U"], + ["@@WdXc"], + ["@@PtOs"], + ["@@•LnXhc"], + ["@@ppVƒu]Or"], + ["@@cdzAUa"], + ["@@udRhnCI‡"], + ["@@ˆoIƒpR„"], + [ + "@@Ľč{fzƤî’Kš–ÎMĮ]†—ZFˆ½Y]â£ph’™š¶¨râøÀ†ÎǨ¤^ºÄ”Gzˆ~grĚĜlĞÆ„LĆdž¢Îo¦–cv“Kb€gr°Wh”mZp ˆL]LºcU‰Æ­n”żĤÌǜbAnrOAœ´žȊcÀbƦUØrĆUÜøœĬƞ†š˜Ez„VL®öØBkŖÝĐ˹ŧ̄±ÀbÎɜnb²ĦhņBĖ›žįĦåXćì@L¯´ywƕCéõė ƿ¸‘lµ¾Z|†ZWyFYŸ¨Mf~C¿`€à_RÇzwƌfQnny´INoƬˆèôº|sT„JUš›‚L„îVj„ǎ¾Ē؍‚Dz²XPn±ŴPè¸ŔLƔÜƺ_T‘üÃĤBBċȉöA´fa„˜M¨{«M`‡¶d¡ô‰Ö°šmȰBÔjjŒ´PM|”c^d¤u•ƒ¤Û´Œä«ƢfPk¶Môlˆ]Lb„}su^ke{lC‘…M•rDŠÇ­]NÑFsmoõľH‰yGă{{çrnÓE‰‹ƕZGª¹Fj¢ïW…uøCǷ돡ąuhÛ¡^Kx•C`C\\bÅxì²ĝÝ¿_N‰īCȽĿåB¥¢·IŖÕy\\‡¹kx‡Ã£Č×GDyÕ¤ÁçFQ¡„KtŵƋ]CgÏAùSed‡cÚź—ŠuYfƒyMmhUWpSyGwMPqŀ—›Á¼zK›¶†G•­Y§Ëƒ@–´śÇµƕBmœ@Io‚g——Z¯u‹TMx}C‘‰VK‚ï{éƵP—™_K«™pÛÙqċtkkù]gŽ‹Tğwo•ɁsMõ³ă‡AN£™MRkmEʕč™ÛbMjÝGu…IZ™—GPģ‡ãħE[iµBEuŸDPԛ~ª¼ętŠœ]ŒûG§€¡QMsğNPŏįzs£Ug{đJĿļā³]ç«Qr~¥CƎÑ^n¶ÆéÎR~ݏY’I“] P‰umŝrƿ›‰›Iā‹[x‰edz‹L‘¯v¯s¬ÁY…~}…ťuٌg›ƋpÝĄ_ņī¶ÏSR´ÁP~ž¿Cyžċßdwk´Ss•X|t‰`Ä Èð€AªìÎT°¦Dd–€a^lĎDĶÚY°Ž`ĪŴǒˆ”àŠv\\ebŒZH„ŖR¬ŢƱùęO•ÑM­³FۃWp[ƒ" + ] + ], + "encodeOffsets": [ + [[123806, 39303]], + [[123821, 39266]], + [[123742, 39256]], + [[123702, 39203]], + [[123649, 39066]], + [[123847, 38933]], + [[123580, 38839]], + [[123894, 37288]], + [[123043, 36624]], + [[123344, 38676]], + [[123522, 38857]], + [[123628, 38858]], + [[118260, 36742]] + ] + } + }, + { + "type": "Feature", + "id": "410000", + "properties": { + "id": "410000", + "cp": [113.665412, 33.757975], + "name": "河南", + "childNum": 1 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + "@@•ýL™ùµP³swIÓxcŢĞð†´E®žÚPt†ĴXØx¶˜@«ŕŕQGƒ‹Yfa[şu“ßǩ™đš_X³ijÕčC]kbc•¥CS¯ëÍB©÷‹–³­Siˆ_}m˜YTtž³xlàcȂzÀD}ÂOQ³ÐTĨ¯†ƗòËŖ[hœł‹Ŧv~††}ÂZž«¤lPǕ£ªÝŴÅR§ØnhcŒtâk‡nύ­ľŹUÓÝdKuķ‡I§oTũÙďkęĆH¸ÓŒ\\ăŒ¿PcnS{wBIvɘĽ[GqµuŸŇôYgûƒZcaŽ©@½Õǽys¯}lgg@­C\\£as€IdÍuCQñ[L±ęk·‹ţb¨©kK—’»›KC²‘òGKmĨS`ƒ˜UQ™nk}AGē”sqaJ¥ĐGR‰ĎpCuÌy ã iMc”plk|tRk†ðœev~^‘´†¦ÜŽSí¿_iyjI|ȑ|¿_»d}qŸ^{“Ƈdă}Ÿtqµ`Ƴĕg}V¡om½fa™Ço³TTj¥„tĠ—Ry”K{ùÓjuµ{t}uËR‘iŸvGŠçJFjµŠÍyqΘàQÂFewixGw½Yŷpµú³XU›½ġy™łå‰kÚwZXˆ·l„¢Á¢K”zO„Λ΀jc¼htoDHr…|­J“½}JZ_¯iPq{tę½ĕ¦Zpĵø«kQ…Ťƒ]MÛfaQpě±ǽ¾]u­Fu‹÷nƒ™čįADp}AjmcEǒaª³o³ÆÍSƇĈÙDIzˑ赟^ˆKLœ—i—Þñ€[œƒaA²zz‰Ì÷Dœ|[šíijgf‚ÕÞd®|`ƒĆ~„oĠƑô³Ŋ‘D×°¯CsŠøÀ«ì‰UMhTº¨¸ǡîS–Ô„DruÂÇZ•ÖEŽ’vPZ„žW”~؋ÐtĄE¢¦Ðy¸bŠô´oŬ¬Ž²Ês~€€]®tªašpŎJ¨Öº„_ŠŔ–`’Ŗ^Ѝ\\Ĝu–”~m²Ƹ›¸fW‰ĦrƔ}Î^gjdfÔ¡J}\\n C˜¦þWxªJRÔŠu¬ĨĨmF†dM{\\d\\ŠYÊ¢ú@@¦ª²SŠÜsC–}fNècbpRmlØ^g„d¢aÒ¢CZˆZxvÆ¶N¿’¢T@€uCœ¬^ĊðÄn|žlGl’™Rjsp¢ED}€Fio~ÔNŽ‹„~zkĘHVsDzßjƒŬŒŠŢ`Pûàl¢˜\\ÀœEhŽİgÞē X¼Pk–„|m" + ], + "encodeOffsets": [[118256, 37017]] + } + }, + { + "type": "Feature", + "id": "420000", + "properties": { + "id": "420000", + "cp": [113.298572, 30.684355], + "name": "湖北", + "childNum": 3 + }, + "geometry": { + "type": "MultiPolygon", + "coordinates": [ + ["@@AB‚"], + ["@@lskt"], + [ + "@@¾«}{ra®pîÃ\\™›{øCŠËyyB±„b\\›ò˜Ý˜jK›‡L ]ĎĽÌ’JyÚCƈćÎT´Å´pb©È‘dFin~BCo°BĎĚømvŒ®E^vǾ½Ĝ²Ro‚bÜeNŽ„^ĺ£R†¬lĶ÷YoĖ¥Ě¾|sOr°jY`~I”¾®I†{GqpCgyl{‡£œÍƒÍyPL“¡ƒ¡¸kW‡xYlÙæŠšŁĢzœ¾žV´W¶ùŸo¾ZHxjwfx„GNÁ•³Xéæl¶‰EièIH‰ u’jÌQ~v|sv¶Ôi|ú¢Fh˜Qsğ¦ƒSiŠBg™ÐE^ÁÐ{–čnOÂȞUÎóĔ†ÊēIJ}Z³½Mŧïeyp·uk³DsѨŸL“¶_œÅuèw»—€¡WqÜ]\\‘Ò§tƗcÕ¸ÕFÏǝĉăxŻČƟO‡ƒKÉġÿ×wg”÷IÅzCg†]m«ªGeçÃTC’«[‰t§{loWeC@ps_Bp‘­r‘„f_``Z|ei¡—oċMqow€¹DƝӛDYpûs•–‹Ykıǃ}s¥ç³[§ŸcYЧHK„«Qy‰]¢“wwö€¸ïx¼ņ¾Xv®ÇÀµRĠЋžHMž±cÏd„ƒǍũȅȷ±DSyúĝ£ŤĀàtÖÿï[îb\\}pĭÉI±Ñy…¿³x¯N‰o‰|¹H™ÏÛm‹júË~Tš•u˜ęjCöAwě¬R’đl¯ Ñb­‰ŇT†Ŀ_[Œ‘IčĄʿnM¦ğ\\É[T·™k¹œ©oĕ@A¾w•ya¥Y\\¥Âaz¯ãÁ¡k¥ne£Ûw†E©Êō¶˓uoj_Uƒ¡cF¹­[Wv“P©w—huÕyBF“ƒ`R‹qJUw\\i¡{jŸŸEPïÿ½fć…QÑÀQ{ž‚°‡fLԁ~wXg—ītêݾ–ĺ‘Hdˆ³fJd]‹HJ²…E€ƒoU¥†HhwQsƐ»Xmg±çve›]Dm͂PˆoCc¾‹_h”–høYrŊU¶eD°Č_N~øĹĚ·`z’]Äþp¼…äÌQŒv\\rCŒé¾TnkžŐڀÜa‡“¼ÝƆ̶Ûo…d…ĔňТJq’Pb ¾|JŒ¾fXŠƐîĨ_Z¯À}úƲ‹N_ĒĊ^„‘ĈaŐyp»CÇĕKŠšñL³ŠġMŒ²wrIÒŭxjb[œžn«øœ˜—æˆàƒ ^²­h¯Ú€ŐªÞ¸€Y²ĒVø}Ā^İ™´‚LŠÚm„¥ÀJÞ{JVŒųÞŃx×sxxƈē ģMř–ÚðòIf–Ċ“Œ\\Ʈ±ŒdʧĘD†vČ_Àæ~DŒċ´A®µ†¨ØLV¦êHÒ¤" + ] + ], + "encodeOffsets": [[[113712, 34000]], [[115612, 30507]], [[113649, 34054]]] + } + }, + { + "type": "Feature", + "id": "430000", + "properties": { "id": "430000", "cp": [111.782279, 28.09409], "name": "湖南", "childNum": 3 }, + "geometry": { + "type": "MultiPolygon", + "coordinates": [ + ["@@—n„FTs"], + ["@@ßÅÆá‰½ÔXr—†CO™“…ËR‘ïÿĩ­TooQyšÓ[‹ŅBE¬–ÎÓXa„į§Ã¸G °ITxp‰úxÚij¥Ïš–̾ŠedžÄ©ĸG…œàGh‚€M¤–Â_U}Ċ}¢pczfŠþg¤€”ÇòAV‘‹M"], + [ + "@@©K—ƒA·³CQ±Á«³BUŠƑ¹AŠtćOw™D]ŒJiØSm¯b£‘ylƒ›X…HËѱH•«–‘C^õľA–Å§¤É¥„ïyuǙuA¢^{ÌC´­¦ŷJ£^[†“ª¿‡ĕ~•Ƈ…•N… skóā‡¹¿€ï]ă~÷O§­@—Vm¡‹Qđ¦¢Ĥ{ºjԏŽŒª¥nf´•~ÕoŸž×Ûą‹MąıuZœmZcÒ IJβSÊDŽŶ¨ƚƒ’CÖŎªQؼrŭŽ­«}NÏürʬŒmjr€@ĘrTW ­SsdHzƓ^ÇÂyUi¯DÅYlŹu{hTœ}mĉ–¹¥ě‰Dÿë©ıÓ[Oº£ž“¥ót€ł¹MՄžƪƒ`Pš…Di–ÛUоÅ‌ìˆU’ñB“È£ýhe‰dy¡oċ€`pfmjP~‚kZa…ZsÐd°wj§ƒ@€Ĵ®w~^‚kÀÅKvNmX\\¨a“”сqvíó¿F„¤¡@ũÑVw}S@j}¾«pĂr–ªg àÀ²NJ¶¶Dô…K‚|^ª†Ž°LX¾ŴäPᜣEXd›”^¶›IJÞܓ~‘u¸ǔ˜Ž›MRhsR…e†`ÄofIÔ\\Ø  i”ćymnú¨cj ¢»–GČìƊÿШXeĈ¾Oð Fi ¢|[jVxrIQŒ„_E”zAN¦zLU`œcªx”OTu RLÄ¢dV„i`p˔vŎµªÉžF~ƒØ€d¢ºgİàw¸Áb[¦Zb¦–z½xBĖ@ªpº›šlS¸Ö\\Ĕ[N¥ˀmĎă’J\\‹ŀ`€…ňSڊĖÁĐiO“Ĝ«BxDõĚiv—ž–S™Ì}iùŒžÜnšÐºGŠ{Šp°M´w†ÀÒzJ²ò¨ oTçüöoÛÿñŽőФ‚ùTz²CȆȸǎۃƑÐc°dPÎŸğ˶[Ƚu¯½WM¡­Éž“’B·rížnZŸÒ `‡¨GA¾\\pē˜XhÆRC­üWGġu…T靧Ŏѝ©ò³I±³}_‘‹EÃħg®ęisÁPDmÅ{‰b[Rşs·€kPŸŽƥƒóRo”O‹ŸVŸ~]{g\\“êYƪ¦kÝbiċƵŠGZ»Ěõ…ó·³vŝž£ø@pyö_‹ëŽIkѵ‡bcѧy…×dY؎ªiþž¨ƒ[]f]Ņ©C}ÁN‡»hĻħƏ’ĩ" + ] + ], + "encodeOffsets": [[[115640, 30489]], [[112543, 27312]], [[116690, 26230]]] + } + }, + { + "type": "Feature", + "id": "440000", + "properties": { + "id": "440000", + "cp": [113.280637, 23.125178], + "name": "广东", + "childNum": 24 + }, + "geometry": { + "type": "MultiPolygon", + "coordinates": [ + ["@@QdˆAua"], + ["@@ƒlxDLo"], + ["@@sbhNLo"], + ["@@Ă āŸ"], + ["@@WltO[["], + ["@@Krœ]S"], + ["@@e„„I]y"], + ["@@I|„Mym"], + ["@@ƒÛ³LSŒž¼Y"], + ["@@nvºB–ëui©`¾"], + ["@@zdšÛ›Jw®"], + ["@@†°…¯"], + ["@@a yAª¸ËJIx،@€ĀHAmßV¡o•fu•o"], + ["@@šs‰ŗÃÔėAƁ›ZšÄ ~°ČP‚‹äh"], + ["@@‹¶Ý’Ì‚vmĞh­ı‡Q"], + ["@@HœŠdSjĒ¢D}war…“u«ZqadYM"], + ["@@elŒ\\LqqU"], + ["@@~rMo\\"], + ["@@f„^ƒC"], + ["@@øPªoj÷ÍÝħXČx”°Q¨ıXNv"], + ["@@gÇƳˆŽˆ”oˆŠˆ[~tly"], + ["@@E–ÆC¿‘"], + ["@@OŽP"], + [ + "@@w‹†đóg‰™ĝ—[³‹¡VÙæÅöM̳¹pÁaËýý©D©Ü“JŹƕģGą¤{Ùū…ǘO²«BƱéA—Ò‰ĥ‡¡«BhlmtÃPµyU¯uc“d·w_bŝcīímGOŽ|KP’ȏ‡ŹãŝIŕŭŕ@Óoo¿ē‹±ß}Ž…ŭ‚ŸIJWÈCőâUâǙI›ğʼn©I›ijEׅÁ”³Aó›wXJþ±ÌŒÜӔĨ£L]ĈÙƺZǾĆĖMĸĤfŒÎĵl•ŨnȈ‘ĐtF”Š–FĤ–‚êk¶œ^k°f¶gŠŽœ}®Fa˜f`vXŲxl˜„¦–ÔÁ²¬ÐŸ¦pqÊ̲ˆi€XŸØRDÎ}†Ä@ZĠ’s„x®AR~®ETtĄZ†–ƈfŠŠHâÒÐA†µ\\S¸„^wĖkRzŠalŽŜ|E¨ÈNĀňZTŒ’pBh£\\ŒĎƀuXĖtKL–¶G|Ž»ĺEļĞ~ÜĢÛĊrˆO˜Ùîvd]nˆ¬VœÊĜ°R֟pM††–‚ƂªFbwžEÀˆ˜©Œž\\…¤]ŸI®¥D³|ˎ]CöAŤ¦…æ’´¥¸Lv¼€•¢ĽBaô–F~—š®²GÌҐEY„„œzk¤’°ahlV՞I^‹šCxĈPŽsB‰ƒºV‰¸@¾ªR²ĨN]´_eavSi‡vc•}p}Đ¼ƌkJœÚe thœ†_¸ ºx±ò_xN›Ë‹²‘@ƒă¡ßH©Ùñ}wkNÕ¹ÇO½¿£ĕ]ly_WìIžÇª`ŠuTÅxYĒÖ¼k֞’µ‚MžjJÚwn\\h‘œĒv]îh|’È›Ƅøègž¸Ķß ĉĈWb¹ƀdéƌNTtP[ŠöSvrCZžžaGuœbo´ŖÒÇА~¡zCI…özx¢„Pn‹•‰Èñ @ŒĥÒ¦†]ƞŠV}³ăĔñiiÄÓVépKG½Ä‘ÓávYo–C·sit‹iaÀy„ŧΡÈYDÑům}‰ý|m[węõĉZÅxUO}÷N¹³ĉo_qtă“qwµŁYلǝŕ¹tïÛUïmRCº…ˆĭ|µ›ÕÊK™½R‘ē ó]‘–GªęAx–»HO£|ām‡¡diď×YïYWªʼnOeÚtĐ«zđ¹T…ā‡úE™á²\\‹ķÍ}jYàÙÆſ¿Çdğ·ùTßÇţʄ¡XgWÀLJğ·¿ÃˆOj YÇ÷Qě‹i" + ] + ], + "encodeOffsets": [ + [[117381, 22988]], + [[116552, 22934]], + [[116790, 22617]], + [[116973, 22545]], + [[116444, 22536]], + [[116931, 22515]], + [[116496, 22490]], + [[116453, 22449]], + [[113301, 21439]], + [[118726, 21604]], + [[118709, 21486]], + [[113210, 20816]], + [[115482, 22082]], + [[113171, 21585]], + [[113199, 21590]], + [[115232, 22102]], + [[115739, 22373]], + [[115134, 22184]], + [[113056, 21175]], + [[119573, 21271]], + [[119957, 24020]], + [[115859, 22356]], + [[116561, 22649]], + [[116285, 22746]] + ] + } + }, + { + "type": "Feature", + "id": "450000", + "properties": { "id": "450000", "cp": [108.320004, 22.82402], "name": "广西", "childNum": 2 }, + "geometry": { + "type": "MultiPolygon", + "coordinates": [ + ["@@H– TQ§•A"], + [ + "@@ĨʪƒLƒƊDÎĹĐCǦė¸zÚGn£¾›rªŀÜt¬@֛ڈSx~øOŒ˜ŶÐÂæȠ\\„ÈÜObĖw^oބLf¬°bI lTØB̈F£Ć¹gñĤaY“t¿¤VSñœK¸¤nM†¼‚JE±„½¸šŠño‹ÜCƆæĪ^ŠĚQÖ¦^‡ˆˆf´Q†üÜʝz¯šlzUĺš@쇀p¶n]sxtx¶@„~ÒĂJb©gk‚{°‚~c°`ԙ¬rV\\“la¼¤ôá`¯¹LC†ÆbŒxEræO‚v[H­˜„[~|aB£ÖsºdAĐzNÂðsŽÞƔ…Ĥªbƒ–ab`ho¡³F«èVloޤ™ÔRzpp®SŽĪº¨ÖƒºN…ij„d`’a”¦¤F³ºDÎńĀìŠCžĜº¦Ċ•~nS›|gźvZkCÆj°zVÈÁƔ]LÊFZg…čP­kini«‹qǀcz͔Y®¬Ů»qR×ō©DՄ‘§ƙǃŵTÉĩ±ŸıdÑnYY›IJvNĆÌØÜ Öp–}e³¦m‹©iÓ|¹Ÿħņ›|ª¦QF¢Â¬ʖovg¿em‡^ucà÷gՎuŒíÙćĝ}FϼĹ{µHK•sLSđƃr‹č¤[Ag‘oS‹ŇYMÿ§Ç{Fśbky‰lQxĕƒ]T·¶[B…ÑÏGáşşƇe€…•ăYSs­FQ}­Bƒw‘tYğÃ@~…C̀Q ×W‡j˱rÉ¥oÏ ±«ÓÂ¥•ƒ€k—ŽwWűŒmcih³K›~‰µh¯e]lµ›él•E쉕E“ďs‡’mǖŧē`ãògK_ÛsUʝ“ćğ¶hŒöŒO¤Ǜn³Žc‘`¡y‹¦C‘ez€YŠwa™–‘[ďĵűMę§]X˜Î_‚훘Û]é’ÛUćİÕBƣ±…dƒy¹T^džûÅÑŦ·‡PĻþÙ`K€¦˜…¢ÍeœĥR¿Œ³£[~Œäu¼dl‰t‚†W¸oRM¢ď\\zœ}Æzdvň–{ÎXF¶°Â_„ÒÂÏL©Ö•TmuŸ¼ãl‰›īkiqéfA„·Êµ\\őDc¥ÝF“y›Ôć˜c€űH_hL܋êĺШc}rn`½„Ì@¸¶ªVLŒŠhŒ‹\\•Ţĺk~ŽĠið°|gŒtTĭĸ^x‘vK˜VGréAé‘bUu›MJ‰VÃO¡…qĂXËS‰ģãlýàŸ_ju‡YÛÒB†œG^˜é֊¶§ŽƒEG”ÅzěƒƯ¤Ek‡N[kdåucé¬dnYpAyČ{`]þ¯T’bÜÈk‚¡Ġ•vŒàh„ÂƄ¢Jî¶²" + ] + ], + "encodeOffsets": [[[111707, 21520]], [[107619, 25527]]] + } + }, + { + "type": "Feature", + "id": "460000", + "properties": { "id": "460000", "cp": [109.83119, 19.031971], "name": "海南", "childNum": 1 }, + "geometry": { + "type": "Polygon", + "coordinates": [ + "@@š¦Ŝil¢”XƦ‘ƞò–ïè§ŞCêɕrŧůÇąĻõ™·ĉ³œ̅kÇm@ċȧƒŧĥ‰Ľʉ­ƅſ“ȓÒ˦ŝE}ºƑ[ÍĜȋ gÎfǐÏĤ¨êƺ\\Ɔ¸ĠĎvʄȀœÐ¾jNðĀÒRŒšZdž™zÐŘΰH¨Ƣb²_Ġ " + ], + "encodeOffsets": [[112750, 20508]] + } + }, + { + "type": "Feature", + "id": "510000", + "properties": { + "id": "510000", + "cp": [104.065735, 30.659462], + "name": "四川", + "childNum": 2 + }, + "geometry": { + "type": "MultiPolygon", + "coordinates": [ + ["@@LqKr"], + [ + "@@Š[ĻéV£ž_ţġñpG •réÏ·~ąSfy×͂·ºſƽiÍıƣıĻmHH}siaX@iǰÁÃ×t«ƒ­Tƒ¤J–JJŒyJ•ÈŠ`Ohߦ¡uËhIyCjmÿw…ZG……Ti‹SˆsO‰žB²ŸfNmsPaˆ{M{ŠõE‘^Hj}gYpaeuž¯‘oáwHjÁ½M¡pM“–uå‡mni{fk”\\oƒÎqCw†EZ¼K›ĝŠƒAy{m÷L‡wO×SimRI¯rK™õBS«sFe‡]fµ¢óY_ÆPRcue°Cbo׌bd£ŌIHgtrnyPt¦foaXďx›lBowz‹_{ÊéWiêE„GhܸºuFĈIxf®Ž•Y½ĀǙ]¤EyŸF²ċ’w¸¿@g¢§RGv»–áŸW`ÃĵJwi]t¥wO­½a[׈]`Ãi­üL€¦LabbTÀå’c}Íh™Æhˆ‹®BH€î|Ék­¤S†y£„ia©taį·Ɖ`ō¥Uh“O…ƒĝLk}©Fos‰´›Jm„µlŁu—…ø–nÑJWΪ–YÀïAetTžŅ‚ӍG™Ë«bo‰{ıwodƟ½ƒžOġܑµxàNÖ¾P²§HKv¾–]|•B‡ÆåoZ`¡Ø`ÀmºĠ~ÌЧnDž¿¤]wğ@sƒ‰rğu‰~‘Io”[é±¹ ¿žſđӉ@q‹gˆ¹zƱřaí°KtǤV»Ã[ĩǭƑ^ÇÓ@ỗs›Zϕ‹œÅĭ€Ƌ•ěpwDóÖሯneQˌq·•GCœýS]xŸ·ý‹q³•O՜Œ¶Qzßti{ř‰áÍÇWŝŭñzÇW‹pç¿JŒ™‚Xœĩè½cŒF–ÂLiVjx}\\N†ŇĖ¥Ge–“JA¼ÄHfÈu~¸Æ«dE³ÉMA|b˜Ò…˜ćhG¬CM‚õŠ„ƤąAvƒüV€éŀ‰_V̳ĐwQj´·ZeÈÁ¨X´Æ¡Qu·»Ÿ“˜ÕZ³ġqDo‰y`L¬gdp°şŠp¦ėìÅĮZްIä”h‚‘ˆzŠĵœf²å ›ĚрKp‹IN|‹„Ñz]ń……·FU×é»R³™MƒÉ»GM«€ki€™ér™}Ã`¹ăÞmȝnÁîRǀ³ĜoİzŔwǶVÚ£À]ɜ»ĆlƂ²Ġ…þTº·àUȞÏʦ¶†I’«dĽĢdĬ¿–»Ĕ׊h\\c¬†ä²GêëĤł¥ÀǿżÃÆMº}BÕĢyFVvw–ˆxBèĻĒ©Ĉ“tCĢɽŠȣ¦āæ·HĽî“ôNԓ~^¤Ɗœu„œ^s¼{TA¼ø°¢İªDè¾Ň¶ÝJ‘®Z´ğ~Sn|ªWÚ©òzPOȸ‚bð¢|‹øĞŠŒœŒQìÛÐ@Ğ™ǎRS¤Á§d…i“´ezÝúØã]Hq„kIŸþËQǦÃsǤ[E¬ÉŪÍxXƒ·ÖƁİlƞ¹ª¹|XÊwn‘ÆƄmÀêErĒtD®ċæcQƒ”E®³^ĭ¥©l}äQto˜ŖÜqƎkµ–„ªÔĻĴ¡@Ċ°B²Èw^^RsºT£ڿœQP‘JvÄz„^Đ¹Æ¯fLà´GC²‘dt˜­ĀRt¼¤ĦOðğfÔðDŨŁĞƘïžPȆ®âbMüÀXZ ¸£@Ś›»»QÉ­™]d“sÖ×_͖_ÌêŮPrĔĐÕGĂeZÜîĘqBhtO ¤tE[h|Y‹Ô‚ZśÎs´xº±UŒ’ñˆt|O’ĩĠºNbgþŠJy^dÂY Į„]Řz¦gC‚³€R`Šz’¢AjŒ¸CL„¤RÆ»@­Ŏk\\Ç´£YW}z@Z}‰Ã¶“oû¶]´^N‡Ò}èN‚ª–P˜Íy¹`S°´†ATe€VamdUĐwʄvĮÕ\\ƒu‹Æŗ¨Yp¹àZÂm™Wh{á„}WØǍ•Éüw™ga§áCNęÎ[ĀÕĪgÖɪX˜øx¬½Ů¦¦[€—„NΆL€ÜUÖ´òrÙŠxR^–†J˜k„ijnDX{Uƒ~ET{ļº¦PZc”jF²Ė@Žp˜g€ˆ¨“B{ƒu¨ŦyhoÚD®¯¢˜ WòàFΤ¨GDäz¦kŮPœġq˚¥À]€Ÿ˜eŽâÚ´ªKxī„Pˆ—Ö|æ[xäJÞĥ‚s’NÖ½ž€I†¬nĨY´®Ð—ƐŠ€mD™ŝuäđđEb…e’e_™v¡}ìęNJē}q”É埁T¯µRs¡M@}ůa†a­¯wvƉåZwž\\Z{åû^›" + ] + ], + "encodeOffsets": [[[108815, 30935]], [[110617, 31811]]] + } + }, + { + "type": "Feature", + "id": "520000", + "properties": { + "id": "520000", + "cp": [106.713478, 26.578343], + "name": "贵州", + "childNum": 3 + }, + "geometry": { + "type": "MultiPolygon", + "coordinates": [ + ["@@†G\\†lY£‘in"], + ["@@q‚|ˆ‚mc¯tχVSÎ"], + [ + "@@hÑ£Is‡NgßH†›HªķÃh_¹ƒ¡ĝħń¦uيùŽgS¯JHŸ|sÝÅtÁïyMDč»eÕtA¤{b\\}—ƒG®u\\åPFq‹wÅaD…žK°ºâ_£ùbµ”mÁ‹ÛœĹM[q|hlaªāI}тƒµ@swtwm^oµˆD鼊yV™ky°ÉžûÛR…³‚‡eˆ‡¥]RՋěħ[ƅåÛDpŒ”J„iV™™‰ÂF²I…»mN·£›LbÒYb—WsÀbŽ™pki™TZĄă¶HŒq`……ĥ_JŸ¯ae«ƒKpÝx]aĕÛPƒÇȟ[ÁåŵÏő—÷Pw}‡TœÙ@Õs«ĿÛq©½œm¤ÙH·yǥĘĉBµĨÕnđ]K„©„œá‹ŸG纍§Õßg‡ǗĦTèƤƺ{¶ÉHÎd¾ŚÊ·OÐjXWrãLyzÉAL¾ę¢bĶėy_qMĔąro¼hĊžw¶øV¤w”²Ĉ]ʚKx|`ź¦ÂÈdr„cȁbe¸›`I¼čTF´¼Óýȃr¹ÍJ©k_șl³´_pН`oÒh޶pa‚^ÓĔ}D»^Xyœ`d˜[Kv…JPhèhCrĂĚÂ^Êƌ wˆZL­Ġ£šÁbrzOIl’MM”ĪŐžËr×ÎeŦŽtw|Œ¢mKjSǘňĂStÎŦEtqFT†¾†E쬬ôxÌO¢Ÿ KгŀºäY†„”PVgŎ¦Ŋm޼VZwVlŒ„z¤…ž£Tl®ctĽÚó{G­A‡ŒÇgeš~Αd¿æaSba¥KKûj®_ć^\\ؾbP®¦x^sxjĶI_Ä X‚⼕Hu¨Qh¡À@Ëô}ޱžGNìĎlT¸ˆ…`V~R°tbÕĊ`¸úÛtπFDu€[ƒMfqGH·¥yA‰ztMFe|R‚_Gk†ChZeÚ°to˜v`x‹b„ŒDnÐ{E}šZ˜è€x—†NEފREn˜[Pv@{~rĆAB§‚EO¿|UZ~ì„Uf¨J²ĂÝÆ€‚sª–B`„s¶œfvö¦ŠÕ~dÔq¨¸º»uù[[§´sb¤¢zþFœ¢Æ…Àhˆ™ÂˆW\\ıŽËI݊o±ĭŠ£þˆÊs}¡R]ŒěƒD‚g´VG¢‚j±®è†ºÃmpU[Á›‘Œëº°r›ÜbNu¸}Žº¼‡`ni”ºÔXĄ¤¼Ôdaµ€Á_À…†ftQQgœR—‘·Ǔ’v”}Ýלĵ]µœ“Wc¤F²›OĩųãW½¯K‚©…]€{†LóµCIµ±Mß¿hŸ•©āq¬o‚½ž~@i~TUxŪÒ¢@ƒ£ÀEîôruń‚”“‚b[§nWuMÆLl¿]x}ij­€½" + ] + ], + "encodeOffsets": [[[112158, 27383]], [[112105, 27474]], [[112095, 27476]]] + } + }, + { + "type": "Feature", + "id": "530000", + "properties": { + "id": "530000", + "cp": [101.512251, 24.740609], + "name": "云南", + "childNum": 1 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + "@@[„ùx½}ÑRH‘YīĺûsÍn‘iEoã½Ya²ė{c¬ĝg•ĂsA•ØÅwď‚õzFjw}—«Dx¿}UũlŸê™@•HÅ­F‰¨ÇoJ´Ónũuą¡Ã¢pÒŌ“Ø TF²‚xa²ËX€‚cʋlHîAßËŁkŻƑŷÉ©h™W­æßU‡“Ës¡¦}•teèÆ¶StǀÇ}Fd£j‹ĈZĆÆ‹¤T‚č\\Dƒ}O÷š£Uˆ§~ŃG™‚åŃDĝ¸œTsd¶¶Bªš¤u¢ŌĎo~t¾ÍŶÒtD¦Ú„iôö‰€z›ØX²ghįh½Û±¯€ÿm·zR¦Ɵ`ªŊÃh¢rOԍ´£Ym¼èêf¯ŪĽn„†cÚbŒw\\zlvWžªâˆ ¦g–mĿBş£¢ƹřbĥkǫßeeZkÙIKueT»sVesb‘aĕ  ¶®dNœĄÄpªyސ¼—„³BE˜®l‡ŽGœŭCœǶwêżĔÂe„pÍÀQƞpC„–¼ŲÈ­AÎô¶R„ä’Q^Øu¬°š_Èôc´¹ò¨P΢hlϦ´Ħ“Æ´sâDŽŲPnÊD^¯°’Upv†}®BP̪–jǬx–Söwlfòªv€qĸ|`H€­viļ€ndĜ­Ćhň•‚em·FyށqóžSᝑ³X_ĞçêtryvL¤§z„¦c¦¥jnŞk˜ˆlD¤øz½ĜàžĂŧMÅ|áƆàÊcðÂF܎‚áŢ¥\\\\º™İøÒÐJĴ‡„îD¦zK²ǏÎEh~’CD­hMn^ÌöÄ©ČZÀžaü„fɭyœpį´ěFűk]Ôě¢qlÅĆÙa¶~Äqššê€ljN¬¼H„ÊšNQ´ê¼VظE††^ŃÒyŒƒM{ŒJLoÒœęæŸe±Ķ›y‰’‡gã“¯JYÆĭĘëo¥Š‰o¯hcK«z_pŠrC´ĢÖY”—¼ v¸¢RŽÅW³Â§fǸYi³xR´ďUˊ`êĿU„û€uĆBƒƣö‰N€DH«Ĉg†——Ñ‚aB{ÊNF´¬c·Åv}eÇÃGB»”If•¦HňĕM…~[iwjUÁKE•Ž‹¾dĪçW›šI‹èÀŒoÈXòyŞŮÈXâÎŚŠj|àsRy‹µÖ›–Pr´þŒ ¸^wþTDŔ–Hr¸‹žRÌmf‡żÕâCôox–ĜƌÆĮŒ›Ð–œY˜tâŦÔ@]ÈǮƒ\\μģUsȯLbîƲŚºyh‡rŒŠ@ĒԝƀŸÀ²º\\êp“’JŠ}ĠvŠqt„Ġ@^xÀ£È†¨mËÏğ}n¹_¿¢×Y_æpˆÅ–A^{½•Lu¨GO±Õ½ßM¶w’ÁĢۂP‚›Ƣ¼pcIJxŠ|ap̬HšÐŒŊSfsðBZ¿©“XÏÒK•k†÷Eû¿‰S…rEFsÕūk”óVǥʼniTL‚¡n{‹uxţÏh™ôŝ¬ğōN“‘NJkyPaq™Âğ¤K®‡YŸxÉƋÁ]āęDqçgOg†ILu—\\_gz—]W¼ž~CÔē]bµogpў_oď`´³Țkl`IªºÎȄqÔþž»E³ĎSJ»œ_f·‚adÇqƒÇc¥Á_Źw{™L^ɱćx“U£µ÷xgĉp»ĆqNē`rĘzaĵĚ¡K½ÊBzyäKXqiWPÏɸ½řÍcÊG|µƕƣG˛÷Ÿk°_^ý|_zċBZocmø¯hhcæ\\lˆMFlư£Ĝ„ÆyH“„F¨‰µêÕ]—›HA…àӄ^it `þßäkŠĤÎT~Wlÿ¨„ÔPzUC–NVv [jâôDôď[}ž‰z¿–msSh‹¯{jïğl}šĹ[–őŒ‰gK‹©U·µË@¾ƒm_~q¡f¹…ÅË^»‘f³ø}Q•„¡Ö˳gͱ^ǁ…\\ëÃA_—¿bW›Ï[¶ƛ鏝£F{īZgm@|kHǭƁć¦UĔťƒ×ë}ǝƒeďºȡȘÏíBə£āĘPªij¶“ʼnÿ‡y©n‰ď£G¹¡I›Š±LÉĺÑdĉ܇W¥˜‰}g˜Á†{aqÃ¥aŠıęÏZ—ï`" + ], + "encodeOffsets": [[104636, 22969]] + } + }, + { + "type": "Feature", + "id": "540000", + "properties": { "id": "540000", "cp": [89.132212, 30.860361], "name": "西藏", "childNum": 1 }, + "geometry": { + "type": "Polygon", + "coordinates": [ + "@@hžľxŽŖ‰xƒÒVކºÅâAĪÝȆµę¯Ňa±r_w~uSÕň‘qOj]ɄQ…£Z……UDûoY’»©M[‹L¼qãË{V͕çWViŽ]ë©Ä÷àyƛh›ÚU°ŒŒa”d„cQƒ~Mx¥™cc¡ÙaSyF—ցk­ŒuRýq¿Ôµ•QĽ³aG{¿FµëªéĜÿª@¬·–K‰·àariĕĀ«V»Ŷ™Ĵū˜gèLǴŇƶaf‹tŒèBŚ£^Šâ†ǐÝ®–šM¦ÁǞÿ¬LhŸŽJ¾óƾƺcxw‹f]Y…´ƒ¦|œQLn°aœdĊ…œ\\¨o’œǀÍŎœ´ĩĀd`tÊQŞŕ|‚¨C^©œĈ¦„¦ÎJĊ{ŽëĎjª²rЉšl`¼Ą[t|¦St辉PŒÜK¸€d˜Ƅı]s¤—î_v¹ÎVòŦj˜£Əsc—¬_Ğ´|٘¦Avަw`ăaÝaa­¢e¤ı²©ªSªšÈMĄwžÉØŔì@T‘¤—Ę™\\õª@”þo´­xA s”ÂtŎKzó´ÇĊµ¢rž^nĊ­Æ¬×üGž¢‚³ {âĊ]š™G‚~bÀgVjzlhǶf€žOšfdЉªB]pj„•TO–tĊ‚n¤}®¦ƒČ¥d¢¼»ddš”Y¼Žt—¢eȤJ¤}Ǿ¡°§¤AГlc@ĝ”sªćļđAç‡wx•UuzEÖġ~AN¹ÄÅȀݦ¿ģŁéì±H…ãd«g[؉¼ēÀ•cīľġ¬cJ‘µ…ÐʥVȝ¸ßS¹†ý±ğkƁ¼ą^ɛ¤Ûÿ‰b[}¬ōõÃ]ËNm®g@•Bg}ÍF±ǐyL¥íCˆƒIij€Ï÷њį[¹¦[⚍EÛïÁÉdƅß{âNÆāŨߝ¾ě÷yC£‡k­´ÓH@¹†TZ¥¢įƒ·ÌAЧ®—Zc…v½ŸZ­¹|ŕWZqgW“|ieZÅYVӁqdq•bc²R@†c‡¥Rã»Ge†ŸeƃīQ•}J[ғK…¬Ə|o’ėjġĠÑN¡ð¯EBčnwôɍėªƒ²•CλŹġǝʅįĭạ̃ūȹ]ΓͧgšsgȽóϧµǛ†ęgſ¶ҍć`ĘąŌJޚä¤rÅň¥ÖÁUětęuůÞiĊÄÀ\\Æs¦ÓRb|Â^řÌkÄŷ¶½÷‡f±iMݑ›‰@ĥ°G¬ÃM¥n£Øą‚ğ¯ß”§aëbéüÑOčœk£{\\‘eµª×M‘šÉfm«Ƒ{Å׃Gŏǩãy³©WÑăû‚··‘Q—òı}¯ã‰I•éÕÂZ¨īès¶ZÈsŽæĔTŘvŽgÌsN@îá¾ó@‰˜ÙwU±ÉT廣TđŸWxq¹Zo‘b‹s[׌¯cĩv‡Œėŧ³BM|¹k‰ªħ—¥TzNYnݍßpęrñĠĉRS~½ŠěVVе‚õ‡«ŒM££µB•ĉ¥áºae~³AuĐh`Ü³ç@BۘïĿa©|z²Ý¼D”£à貋ŸƒIƒû›I ā€óK¥}rÝ_Á´éMaň¨€~ªSĈ½Ž½KÙóĿeƃÆBŽ·¬ën×W|Uº}LJrƳ˜lŒµ`bÔ`QˆˆÐÓ@s¬ñIŒÍ@ûws¡åQÑßÁ`ŋĴ{Ī“T•ÚÅTSij‚‹Yo|Ç[ǾµMW¢ĭiÕØ¿@˜šMh…pÕ]j†éò¿OƇĆƇp€êĉâlØw–ěsˆǩ‚ĵ¸c…bU¹ř¨WavquSMzeo_^gsÏ·¥Ó@~¯¿RiīB™Š\\”qTGªÇĜçPoŠÿfñòą¦óQīÈáP•œābß{ƒZŗĸIæÅ„hnszÁCËìñšÏ·ąĚÝUm®ó­L·ăU›Èíoù´Êj°ŁŤ_uµ^‘°Œìǖ@tĶĒ¡Æ‡M³Ģ«˜İĨÅ®ğ†RŽāð“ggheÆ¢z‚Ê©Ô\\°ÝĎz~ź¤Pn–MĪÖB£Ÿk™n鄧żćŠ˜ĆK„ǰ¼L¶è‰âz¨u¦¥LDĘz¬ýÎmĘd¾ß”Fz“hg²™Fy¦ĝ¤ċņbΛ@y‚Ąæm°NĮZRÖíŽJ²öLĸÒ¨Y®ƌÐV‰à˜tt_ڀÂyĠzž]Ţh€zĎ{†ĢX”ˆc|šÐqŽšfO¢¤ög‚ÌHNŽ„PKŖœŽ˜Uú´xx[xˆvĐCûŠìÖT¬¸^}Ìsòd´_އKgžLĴ…ÀBon|H@–Êx˜—¦BpŰˆŌ¿fµƌA¾zLjRxжF”œkĄźRzŀˆ~¶[”´Hnª–VƞuĒ­È¨ƎcƽÌm¸ÁÈM¦x͊ëÀxdžB’šú^´W†£–d„kɾĬpœw‚˂ØɦļĬIŚœÊ•n›Ŕa¸™~J°î”lɌxĤÊÈðhÌ®‚g˜T´øŽàCˆŽÀ^ªerrƘdž¢İP|Ė ŸWœªĦ^¶´ÂL„aT±üWƜ˜ǀRšŶUńšĖ[QhlLüA†‹Ü\\†qR›Ą©" + ], + "encodeOffsets": [[90849, 37210]] + } + }, + { + "type": "Feature", + "id": "610000", + "properties": { + "id": "610000", + "cp": [108.948024, 34.263161], + "name": "陕西", + "childNum": 1 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + "@@˜p¢—ȮµšûG™Ħ}Ħšðǚ¶òƄ€jɂz°{ºØkÈęâ¦jª‚Bg‚\\œċ°s¬Ž’]jžú ‚E”Ȍdž¬s„t‡”RˆÆdĠݎwܔ¸ôW¾ƮłÒ_{’Ìšû¼„jº¹¢GǪÒ¯ĘƒZ`ºŊƒecņąš~BÂgzpâēòYǠȰÌTΨÂWœ|fcŸă§uF—Œ@NŸ¢XLƒŠRMº[ğȣſï|¥J™kc`sʼnǷ’Y¹‹W@µ÷K…ãï³ÛIcñ·VȋڍÒķø©—þ¥ƒy‚ÓŸğęmWµÎumZyOŅƟĥÓ~sÑL¤µaŅY¦ocyZ{‰y c]{ŒTa©ƒ`U_Ěē£ωÊƍKù’K¶ȱÝƷ§{û»ÅÁȹÍéuij|¹cÑd‘ŠìUYƒŽO‘uF–ÕÈYvÁCqӃT•Ǣí§·S¹NgŠV¬ë÷Át‡°Dد’C´ʼnƒópģ}„ċcE˅FŸŸéGU¥×K…§­¶³B‹Č}C¿åċ`wġB·¤őcƭ²ő[Å^axwQO…ÿEËߌ•ĤNĔŸwƇˆÄŠńwĪ­Šo[„_KÓª³“ÙnK‰Çƒěœÿ]ď€ă_d©·©Ýŏ°Ù®g]±„Ÿ‡ß˜å›—¬÷m\\›iaǑkěX{¢|ZKlçhLt€Ňîŵ€œè[€É@ƉĄEœ‡tƇÏ˜³­ħZ«mJ…›×¾‘MtÝĦ£IwÄå\\Õ{‡˜ƒOwĬ©LÙ³ÙgBƕŀr̛ĢŭO¥lãyC§HÍ£ßEñŸX¡—­°ÙCgpťz‘ˆb`wI„vA|§”‡—hoĕ@E±“iYd¥OϹS|}F@¾oAO²{tfžÜ—¢Fǂ҈W²°BĤh^Wx{@„¬‚­F¸¡„ķn£P|ŸªĴ@^ĠĈæb–Ôc¶l˜Yi…–^Mi˜cϰÂ[ä€vï¶gv@À“Ĭ·lJ¸sn|¼u~a]’ÆÈtŌºJp’ƒþ£KKf~ЦUbyäIšĺãn‡Ô¿^­žŵMT–hĠܤko¼Ŏìąǜh`[tŒRd²IJ_œXPrɲ‰l‘‚XžiL§àƒ–¹ŽH˜°Ȧqº®QC—bA†„ŌJ¸ĕÚ³ĺ§ `d¨YjžiZvRĺ±öVKkjGȊĐePОZmļKÀ€‚[ŠŽ`ösìh†ïÎoĬdtKÞ{¬èÒÒBŒÔpIJÇĬJŊ¦±J«ˆY§‹@·pH€µàåVKe›pW†ftsAÅqC·¬ko«pHÆuK@oŸHĆۄķhx“e‘n›S³àǍrqƶRbzy€¸ËАl›¼EºpĤ¼Œx¼½~Ğ’”à@†ÚüdK^ˆmÌSj" + ], + "encodeOffsets": [[110234, 38774]] + } + }, + { + "type": "Feature", + "id": "620000", + "properties": { + "id": "620000", + "cp": [103.823557, 36.058039], + "name": "甘肃", + "childNum": 2 + }, + "geometry": { + "type": "MultiPolygon", + "coordinates": [ + ["@@VuUv"], + [ + "@@ũ‹EĠtt~nkh`Q‰¦ÅÄÜdw˜Ab×ĠąJˆ¤DüègĺqBqœj°lI¡ĨÒ¤úSHbš‡ŠjΑBаaZˆ¢KJŽ’O[|A£žDx}Nì•HUnrk„ kp€¼Y kMJn[aG‚áÚÏ[½rc†}aQxOgsPMnUs‡nc‹Z…ž–sKúvA›t„Þġ’£®ĀYKdnFwš¢JE°”Latf`¼h¬we|€Æ‡šbj}GA€·~WŽ”—`†¢MC¤tL©IJ°qdf”O‚“bÞĬ¹ttu`^ZúE`Œ[@„Æsîz®¡’C„ƳƜG²“R‘¢R’m”fŽwĸg܃‚ą G@pzJM½mŠhVy¸uÈÔO±¨{LfæU¶ßGĂq\\ª¬‡²I‚¥IʼnÈīoı‹ÓÑAçÑ|«LÝcspīðÍg…të_õ‰\\ĉñLYnĝg’ŸRǡÁiHLlõUĹ²uQjYi§Z_c¨Ÿ´ĹĖÙ·ŋI…ƒaBD˜­R¹ȥr—¯G•ºß„K¨jWk’ɱŠOq›Wij\\a­‹Q\\sg_ĆǛōëp»£lğۀgS•ŶN®À]ˆÓäm™ĹãJaz¥V}‰Le¤L„ýo‘¹IsŋÅÇ^‘Žbz…³tmEÁ´aйcčecÇN•ĊãÁ\\蝗dNj•]j†—ZµkÓda•ćå]ğij@ ©O{¤ĸm¢ƒE·®ƒ«|@Xwg]A챝‡XǁÑdzªc›wQÚŝñsÕ³ÛV_ýƒ˜¥\\ů¥©¾÷w—Ž©WÕÊĩhÿÖÁRo¸V¬âDb¨šhûx–Ê×nj~Zâƒg|šXÁnßYoº§ZÅŘvŒ[„ĭÖʃuďxcVbnUSf…B¯³_Tzº—ΕO©çMÑ~Mˆ³]µ^püµ”ŠÄY~y@X~¤Z³€[Èōl@®Å¼£QKƒ·Di‹¡By‘ÿ‰Q_´D¥hŗyƒ^ŸĭÁZ]cIzý‰ah¹MĪğP‘s{ò‡‹‘²Vw¹t³Ŝˁ[ŽÑ}X\\gsFŸ£sPAgěp×ëfYHāďÖqēŭOÏë“dLü•\\iŒ”t^c®šRʺ¶—¢H°mˆ‘rYŸ£BŸ¹čIoľu¶uI]vģSQ{ƒUŻ”Å}QÂ|̋°ƅ¤ĩŪU ęĄžÌZҞ\\v˜²PĔ»ƢNHƒĂyAmƂwVmž`”]ȏb•”H`‰Ì¢²ILvĜ—H®¤Dlt_„¢JJÄämèÔDëþgºƫ™”aʎÌrêYi~ ÎݤNpÀA¾Ĕ¼b…ð÷’Žˆ‡®‚”üs”zMzÖĖQdȨý†v§Tè|ªH’þa¸|šÐ ƒwKĢx¦ivr^ÿ ¸l öæfƟĴ·PJv}n\\h¹¶v†·À|\\ƁĚN´Ĝ€çèÁz]ġ¤²¨QÒŨTIl‡ªťØ}¼˗ƦvÄùØE‹’«Fï˛Iq”ōŒTvāÜŏ‚íÛߜÛV—j³âwGăÂíNOŠˆŠPìyV³ʼnĖýZso§HіiYw[߆\\X¦¥c]ÔƩÜ·«j‡ÐqvÁ¦m^ċ±R™¦΋ƈťĚgÀ»IïĨʗƮްƝ˜ĻþÍAƉſ±tÍEÕÞāNU͗¡\\ſčåÒʻĘm ƭÌŹöʥ’ëQ¤µ­ÇcƕªoIýˆ‰Iɐ_mkl³ă‰Ɠ¦j—¡Yz•Ňi–}Msßõ–īʋ —}ƒÁVmŸ_[n}eı­Uĥ¼‘ª•I{ΧDӜƻėoj‘qYhĹT©oūĶ£]ďxĩ‹ǑMĝ‰q`B´ƃ˺Ч—ç~™²ņj@”¥@đ´ί}ĥtPńǾV¬ufӃÉC‹tÓ̻‰…¹£G³€]ƖƾŎĪŪĘ̖¨ʈĢƂlɘ۪üºňUðǜȢƢż̌ȦǼ‚ĤŊɲĖ­Kq´ï¦—ºĒDzņɾªǀÞĈĂD†½ĄĎÌŗĞrôñnŽœN¼â¾ʄľԆ|DŽŽ֦ज़ȗlj̘̭ɺƅêgV̍ʆĠ·ÌĊv|ýĖÕWĊǎÞ´õ¼cÒÒBĢ͢UĜð͒s¨ňƃLĉÕÝ@ɛƯ÷¿Ľ­ĹeȏijëCȚDŲyê×Ŗyò¯ļcÂßY…tÁƤyAã˾J@ǝrý‹‰@¤…rz¸oP¹ɐÚyᐇHŸĀ[Jw…cVeȴϜ»ÈŽĖ}ƒŰŐèȭǢόĀƪÈŶë;Ñ̆ȤМľĮEŔ—ĹŊũ~ËUă{ŸĻƹɁύȩþĽvĽƓÉ@ē„ĽɲßǐƫʾǗĒpäWÐxnsÀ^ƆwW©¦cÅ¡Ji§vúF¶Ž¨c~c¼īŒeXǚ‹\\đ¾JŽwÀďksãA‹fÕ¦L}wa‚o”Z’‹D½†Ml«]eÒÅaɲáo½FõÛ]ĻÒ¡wYR£¢rvÓ®y®LF‹LzĈ„ôe]gx}•|KK}xklL]c¦£fRtív¦†PĤoH{tK" + ] + ], + "encodeOffsets": [[[108619, 36299]], [[108589, 36341]]] + } + }, + { + "type": "Feature", + "id": "630000", + "properties": { "id": "630000", "cp": [96.778916, 35.623178], "name": "青海", "childNum": 2 }, + "geometry": { + "type": "MultiPolygon", + "coordinates": [ + ["@@InJm"], + [ + "@@CƒÆ½OŃĦsΰ~dz¦@@“Ņiš±è}ؘƄ˹A³r_ĞŠǒNΌĐw¤^ŬĵªpĺSZg’rpiƼĘԛ¨C|͖J’©Ħ»®VIJ~f\\m `Un„˜~ʌŸ•ĬàöNt•~ňjy–¢Zi˜Ɣ¥ĄŠk´nl`JʇŠJþ©pdƖ®È£¶ìRʦ‘źõƮËnŸʼėæÑƀĎ[‚˜¢VÎĂMÖÝÎF²sƊƀÎBļýƞ—¯ʘƭðħ¼Jh¿ŦęΌƇš¥²Q]Č¥nuÂÏriˆ¸¬ƪÛ^Ó¦d€¥[Wà…x\\ZŽjҕ¨GtpþYŊĕ´€zUO뇉P‰îMĄÁxH´á˜iÜUà›îÜՁĂÛSuŎ‹r“œJð̬EŒ‘FÁú×uÃÎkr“Ē{V}İ«O_ÌËĬ©ŽÓŧSRѱ§Ģ£^ÂyèçěM³Ƃę{[¸¿u…ºµ[gt£¸OƤĿéYŸõ·kŸq]juw¥Dĩƍ€õÇPéĽG‘ž©ã‡¤G…uȧþRcÕĕNy“yût“ˆ­‡ø‘†ï»a½ē¿BMoᣟÍj}éZËqbʍš“Ƭh¹ìÿÓAçãnIáI`ƒks£CG­ě˜Uy×Cy•…’Ÿ@¶ʡÊBnāzG„ơMē¼±O÷õJËĚăVŸĪũƆ£Œ¯{ËL½Ìzż“„VR|ĠTbuvJvµhĻĖH”Aëáa…­OÇðñęNw‡…œľ·L›mI±íĠĩPÉ×®ÿs—’cB³±JKßĊ«`…ađ»·QAmO’‘Vţéÿ¤¹SQt]]Çx€±¯A@ĉij¢Ó祖•ƒl¶ÅÛr—ŕspãRk~¦ª]Į­´“FR„åd­ČsCqđéFn¿Åƃm’Éx{W©ºƝºįkÕƂƑ¸wWūЩÈFž£\\tÈ¥ÄRÈýÌJ ƒlGr^×äùyÞ³fj”c†€¨£ÂZ|ǓMĝšÏ@ëÜőR‹›ĝ‰Œ÷¡{aïȷPu°ËXÙ{©TmĠ}Y³’­ÞIňµç½©C¡į÷¯B»|St»›]vƒųƒs»”}MÓ ÿʪƟǭA¡fs˜»PY¼c¡»¦c„ċ­¥£~msĉP•–Siƒ^o©A‰Šec‚™PeǵŽkg‚yUi¿h}aH™šĉ^|ᴟ¡HØûÅ«ĉ®]m€¡qĉ¶³ÈyôōLÁst“BŸ®wn±ă¥HSò뚣˜S’ë@לÊăxÇN©™©T±ª£IJ¡fb®ÞbŽb_Ą¥xu¥B—ž{łĝ³«`d˜Ɛt—¤ťiñžÍUuºí`£˜^tƃIJc—·ÛLO‹½Šsç¥Ts{ă\\_»™kϊ±q©čiìĉ|ÍIƒ¥ć¥›€]ª§D{ŝŖÉR_sÿc³Īō›ƿΑ›§p›[ĉ†›c¯bKm›R¥{³„Z†e^ŽŒwx¹dƽŽôIg §Mĕ ƹĴ¿—ǣÜ̓]‹Ý–]snåA{‹eŒƭ`ǻŊĿ\\ijŬű”YÂÿ¬jĖqŽßbЏ•L«¸©@ěĀ©ê¶ìÀEH|´bRľž–Ó¶rÀQþ‹vl®Õ‚E˜TzÜdb ˜hw¤{LR„ƒd“c‹b¯‹ÙVgœ‚ƜßzÃô쮍^jUèXΖ|UäÌ»rKŽ\\ŒªN‘¼pZCü†VY††¤ɃRi^rPҒTÖ}|br°qňb̰ªiƶGQ¾²„x¦PœmlŜ‘[Ĥ¡ΞsĦŸÔÏâ\\ªÚŒU\\f…¢N²§x|¤§„xĔsZPòʛ²SÐqF`ª„VƒÞŜĶƨVZŒÌL`ˆ¢dŐIqr\\oäõ–F礻Ŷ×h¹]Clـ\\¦ďÌį¬řtTӺƙgQÇÓHţĒ”´ÃbEÄlbʔC”|CˆŮˆk„Ʈ[ʼ¬ňœ´KŮÈΰÌζƶlð”ļA†TUvdTŠG†º̼ŠÔ€ŒsÊDԄveOg" + ] + ], + "encodeOffsets": [[[105308, 37219]], [[95370, 40081]]] + } + }, + { + "type": "Feature", + "id": "640000", + "properties": { "id": "640000", "cp": [106.278179, 37.26637], "name": "宁夏", "childNum": 2 }, + "geometry": { + "type": "MultiPolygon", + "coordinates": [ + [ + "@@KëÀęĞ«OęȿȕŸı]ʼn¡åįÕÔ«Ǵõƪ™ĚQÐZhv K°›öqÀѐS[ÃÖHƖčË‡nL]ûc…Ùß@‚“ĝ‘¾}w»»‹oģF¹œ»kÌÏ·{zPƒ§B­¢íyÅt@ƒ@áš]Yv_ssģ¼i߁”ĻL¾ġsKD£¡N_…“˜X¸}B~Haiˆ™Åf{«x»ge_bs“KF¯¡Ix™mELcÿZ¤­Ģ‘ƒÝœsuBLù•t†ŒYdˆmVtNmtOPhRw~bd…¾qÐ\\âÙH\\bImlNZŸ»loƒŸqlVm–Gā§~QCw¤™{A\\‘PKŸNY‡¯bF‡kC¥’sk‹Šs_Ã\\ă«¢ħkJi¯r›rAhĹûç£CU‡ĕĊ_ԗBixÅُĄnªÑaM~ħpOu¥sîeQ¥¤^dkKwlL~{L~–hw^‚ófćƒKyEŒ­K­zuÔ¡qQ¤xZÑ¢^ļöܾEpž±âbÊÑÆ^fk¬…NC¾‘Œ“YpxbK~¥Že֎ŒäBlt¿Đx½I[ĒǙŒWž‹f»Ĭ}d§dµùEuj¨‚IÆ¢¥dXªƅx¿]mtÏwßR͌X¢͎vÆzƂZò®ǢÌʆCrâºMÞzžÆMҔÊÓŊZľ–r°Î®Ȉmª²ĈUªĚøºˆĮ¦ÌĘk„^FłĬhĚiĀ˾iİbjÕ" + ], + ["@@mfwěwMrŢªv@G‰"] + ], + "encodeOffsets": [[[109366, 40242]], [[108600, 36303]]] + } + }, + { + "type": "Feature", + "id": "650000", + "properties": { "id": "650000", "cp": [85.617733, 40.792818], "name": "新疆", "childNum": 1 }, + "geometry": { + "type": "Polygon", + "coordinates": [ + "@@QØĔ²X¨”~ǘBºjʐߨvK”ƔX¨vĊOžÃƒ·¢i@~c—‡ĝe_«”Eš“}QxgɪëÏÃ@sÅyXoŖ{ô«ŸuX…ê•Îf`œC‚¹ÂÿÐGĮÕĞXŪōŸMźÈƺQèĽôe|¿ƸJR¤ĘEjcUóº¯Ĩ_ŘÁMª÷Ð¥Oéȇ¿ÖğǤǷÂF҇zÉx[]­Ĥĝ‰œ¦EP}ûƥé¿İƷTėƫœŕƅ™ƱB»Đ±’ēO…¦E–•}‘`cȺrĦáŖuҞª«IJ‡πdƺÏØZƴwʄ¤ĖGЙǂZ̓èH¶}ÚZצʥĪï|ÇĦMŔ»İĝLj‹ì¥Βœba­¯¥ǕǚkĆŵĦɑĺƯxūД̵nơʃĽá½M»›òmqóŘĝč˾ăC…ćāƿÝɽ©DZŅ¹đ¥˜³ðLrÁ®ɱĕģʼnǻ̋ȥơŻǛȡVï¹Ň۩ûkɗġƁ§ʇė̕ĩũƽō^ƕŠUv£ƁQï“Ƶkŏ½ΉÃŭdzLқʻ«ƭ\\lƒ‡ŭD‡“{ʓDkaFÃÄa“³ŤđÔGRÈƚhSӹŚsİ«ĐË[¥ÚDkº^Øg¼ŵ¸£EÍö•€ůʼnT¡c_‡ËKY‹ƧUśĵ„݃U_©rETÏʜ±OñtYw獃{£¨uM³x½şL©Ùá[ÓÐĥ Νtģ¢\\‚ś’nkO›w¥±ƒT»ƷFɯàĩÞáB¹Æ…ÑUw„੍žĽw[“mG½Èå~‡Æ÷QyŠěCFmĭZī—ŵVÁ™ƿQƛ—ûXS²‰b½KϽĉS›©ŷXĕŸ{ŽĕK·¥Ɨcqq©f¿]‡ßDõU³h—­gËÇïģÉɋw“k¯í}I·šœbmœÉ–ř›īJɥĻˁ×xo›ɹī‡l•c…¤³Xù]‘™DžA¿w͉ì¥wÇN·ÂËnƾƍdǧđ®Ɲv•Um©³G\\“}µĿ‡QyŹl㓛µEw‰LJQ½yƋBe¶ŋÀů‡ož¥A—˜Éw@•{Gpm¿Aij†ŽKLhˆ³`ñcËtW‚±»ÕS‰ëüÿďD‡u\\wwwù³—V›LŕƒOMËGh£õP¡™er™Ïd{“‡ġWÁ…č|yšg^ğyÁzÙs`—s|ÉåªÇ}m¢Ń¨`x¥’ù^•}ƒÌ¥H«‰Yªƅ”Aйn~Ꝛf¤áÀz„gŠÇDIԝ´AňĀ҄¶ûEYospõD[{ù°]u›Jq•U•|Soċxţ[õÔĥkŋÞŭZ˺óYËüċrw €ÞkrťË¿XGÉbřaDü·Ē÷Aê[Ää€I®BÕИÞ_¢āĠpŠÛÄȉĖġDKwbm‡ÄNô‡ŠfœƫVÉvi†dz—H‘‹QµâFšù­Âœ³¦{YGžƒd¢ĚÜO „€{Ö¦ÞÍÀPŒ^b–ƾŠlŽ[„vt×ĈÍE˨¡Đ~´î¸ùÎh€uè`¸ŸHÕŔVºwĠââWò‡@{œÙNÝ´ə²ȕn{¿¥{l—÷eé^e’ďˆXj©î\\ªÑò˜Üìc\\üqˆÕ[Č¡xoÂċªbØ­Œø|€¶ȴZdÆÂšońéŒGš\\”¼C°ÌƁn´nxšÊOĨ’ہƴĸ¢¸òTxÊǪMīИÖŲÃɎOvˆʦƢ~FއRěò—¿ġ~åŊœú‰Nšžš¸qŽ’Ę[Ĕ¶ÂćnÒPĒÜvúĀÊbÖ{Äî¸~Ŕünp¤ÂH¾œĄYÒ©ÊfºmԈĘcDoĬMŬ’˜S¤„s²‚”ʘچžȂVŦ –ŽèW°ªB|IJXŔþÈJĦÆæFĚêŠYĂªĂ]øªŖNÞüA€’fɨJ€˜¯ÎrDDšĤ€`€mz\\„§~D¬{vJÂ˜«lµĂb–¤p€ŌŰNĄ¨ĊXW|ų ¿¾ɄĦƐMT”‡òP˜÷fØĶK¢ȝ˔Sô¹òEð­”`Ɩ½ǒÂň×äı–§ĤƝ§C~¡‚hlå‚ǺŦŞkâ’~}ŽFøàIJaĞ‚fƠ¥Ž„Ŕdž˜®U¸ˆźXœv¢aƆúŪtŠųƠjd•ƺŠƺÅìnrh\\ĺ¯äɝĦ]èpĄ¦´LƞĬŠ´ƤǬ˼Ēɸ¤rºǼ²¨zÌPðŀbþ¹ļD¢¹œ\\ĜÑŚŸ¶ZƄ³àjĨoâŠȴLʉȮŒĐ­ĚăŽÀêZǚŐ¤qȂ\\L¢ŌİfÆs|zºeªÙæ§΢{Ā´ƐÚ¬¨Ĵà²łhʺKÞºÖTŠiƢ¾ªì°`öøu®Ê¾ãØ" + ], + "encodeOffsets": [[88824, 50096]] + } + }, + { + "type": "Feature", + "id": "110000", + "properties": { + "id": "110000", + "cp": [116.405285, 39.904989], + "name": "北京", + "childNum": 1 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + "@@ĽOÁ›ûtŷmiÍt_H»Ĩ±d`й­{bw…Yr“³S]§§o¹€qGtm_Sŧ€“oa›‹FLg‘QN_•dV€@Zom_ć\\ߚc±x¯oœRcfe…£’o§ËgToÛJíĔóu…|wP¤™XnO¢ÉˆŦ¯rNÄā¤zâŖÈRpŢZŠœÚ{GŠrFt¦Òx§ø¹RóäV¤XdˆżâºWbwڍUd®bêņ¾‘jnŎGŃŶŠnzÚSeîĜZczî¾i]͜™QaúÍÔiþĩȨWĢ‹ü|Ėu[qb[swP@ÅğP¿{\\‡¥A¨Ï‘Ѩj¯ŠX\\¯œMK‘pA³[H…īu}}" + ], + "encodeOffsets": [[120023, 41045]] + } + }, + { + "type": "Feature", + "id": "120000", + "properties": { + "id": "120000", + "cp": [117.190182, 39.125596], + "name": "天津", + "childNum": 1 + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + "@@ŬgX§Ü«E…¶Ḟ“¬O_™ïlÁg“z±AXe™µÄĵ{¶]gitgšIj·›¥îakS€‰¨ÐƎk}ĕ{gB—qGf{¿a†U^fI“ư‹³õ{YƒıëNĿžk©ïËZŏ‘R§òoY×Ógc…ĥs¡bġ«@dekąI[nlPqCnp{ˆō³°`{PNdƗqSÄĻNNâyj]äžÒD ĬH°Æ]~¡HO¾ŒX}ÐxŒgp“gWˆrDGˆŒpù‚Š^L‚ˆrzWxˆZ^¨´T\\|~@I‰zƒ–bĤ‹œjeĊªz£®Ĕvě€L†mV¾Ô_ȔNW~zbĬvG†²ZmDM~”~" + ], + "encodeOffsets": [[120237, 41215]] + } + }, + { + "type": "Feature", + "id": "310000", + "properties": { + "id": "310000", + "cp": [121.472644, 31.231706], + "name": "上海", + "childNum": 6 + }, + "geometry": { + "type": "MultiPolygon", + "coordinates": [ + ["@@ɧư¬EpƸÁxc‡"], + ["@@©„ªƒ"], + ["@@”MA‹‘š"], + ["@@Qp݁E§ÉC¾"], + ["@@bŝՕÕEȣÚƥêImɇǦèÜĠŒÚžÃƌÃ͎ó"], + ["@@ǜûȬɋŠŭ™×^‰sYŒɍDŋ‘ŽąñCG²«ªč@h–_p¯A{‡oloY€¬j@IJ`•gQڛhr|ǀ^MIJvtbe´R¯Ô¬¨YŽô¤r]ì†Ƭį"] + ], + "encodeOffsets": [ + [[124702, 32062]], + [[124547, 32200]], + [[124808, 31991]], + [[124726, 32110]], + [[124903, 32376]], + [[124438, 32149]] + ] + } + }, + { + "type": "Feature", + "id": "500000", + "properties": { + "id": "500000", + "cp": [107.304962, 29.533155], + "name": "重庆", + "childNum": 2 + }, + "geometry": { + "type": "MultiPolygon", + "coordinates": [ + [ + "@@vjG~nGŘŬĶȂƀƾ¹¸ØÎezĆT¸}êЖqHŸðqĖ䒊¥^CƒIj–²p…\\_ æüY|[YxƊæuž°xb®…Űb@~¢NQt°¶‚S栓Ê~rljĔëĚ¢~šuf`‘‚†fa‚ĔJåĊ„nÖ]„jƎćÊ@Š£¾a®£Ű{ŶĕF‹ègLk{Y|¡ĜWƔtƬJÑxq‹±ĢN´‰òK‰™–LÈüD|s`ŋ’ć]ƒÃ‰`đŒMûƱ½~Y°ħ`ƏíW‰½eI‹½{aŸ‘OIrÏ¡ĕŇa†p†µÜƅġ‘œ^ÖÛbÙŽŏml½S‹êqDu[R‹ãË»†ÿw`»y‘¸_ĺę}÷`M¯ċfCVµqʼn÷Z•gg“Œ`d½pDO‡ÎCnœ^uf²ènh¼WtƏxRGg¦…pV„†FI±ŽG^ŒIc´ec‡’G•ĹÞ½sëĬ„h˜xW‚}Kӈe­Xsbk”F¦›L‘ØgTkïƵNï¶}Gy“w\\oñ¡nmĈzjŸ•@™Óc£»Wă¹Ój“_m»ˆ¹·~MvÛaqœ»­‰êœ’\\ÂoVnŽÓØÍ™²«‹bq¿efE „€‹Ĝ^Qž~ Évý‡ş¤²Į‰pEİ}zcĺƒL‹½‡š¿gņ›¡ýE¡ya£³t\\¨\\vú»¼§·Ñr_oÒý¥u‚•_n»_ƒ•At©Þűā§IVeëƒY}{VPÀFA¨ąB}q@|Ou—\\Fm‰QF݅Mw˜å}]•€|FmϋCaƒwŒu_p—¯sfÙgY…DHl`{QEfNysBЦzG¸rHe‚„N\\CvEsÐùÜ_·ÖĉsaQ¯€}_U‡†xÃđŠq›NH¬•Äd^ÝŰR¬ã°wećJEž·vÝ·Hgƒ‚éFXjÉê`|yŒpxkAwœWĐpb¥eOsmzwqChóUQl¥F^laf‹anòsr›EvfQdÁUVf—ÎvÜ^efˆtET¬ôA\\œ¢sJŽnQTjP؈xøK|nBz‰„œĞ»LY‚…FDxӄvr“[ehľš•vN”¢o¾NiÂxGp⬐z›bfZo~hGi’]öF|‰|Nb‡tOMn eA±ŠtPT‡LjpYQ|†SH††YĀxinzDJ€Ìg¢và¥Pg‰_–ÇzII‹€II•„£®S¬„Øs쐣ŒN" + ], + ["@@ifjN@s"] + ], + "encodeOffsets": [[[109628, 30765]], [[111725, 31320]]] + } + }, + { + "type": "Feature", + "id": "810000", + "properties": { + "id": "810000", + "cp": [114.173355, 22.320048], + "name": "香港", + "childNum": 5 + }, + "geometry": { + "type": "MultiPolygon", + "coordinates": [ + ["@@AlBk"], + ["@@mŽn"], + ["@@EpFo"], + ["@@ea¢pl¸Eõ¹‡hj[ƒ]ÔCΖ@lj˜¡uBXŸ…•´‹AI¹…[‹yDUˆ]W`çwZkmc–…M›žp€Åv›}I‹oJlcaƒfёKްä¬XJmРđhI®æÔtSHn€Eˆ„ÒrÈc"], + ["@@rMUw‡AS®€e"] + ], + "encodeOffsets": [ + [[117111, 23002]], + [[117072, 22876]], + [[117045, 22887]], + [[116975, 23082]], + [[116882, 22747]] + ] + } + }, + { + "type": "Feature", + "id": "820000", + "properties": { "id": "820000", "cp": [113.54909, 22.198951], "name": "澳门", "childNum": 1 }, + "geometry": { + "type": "Polygon", + "coordinates": ["@@kÊd°å§s"], + "encodeOffsets": [[116279, 22639]] + } + } + ], + "UTF8Encoding": true +} diff --git a/src/assets/svgs/403.svg b/src/assets/svgs/403.svg new file mode 100644 index 0000000..4500596 --- /dev/null +++ b/src/assets/svgs/403.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/svgs/404.svg b/src/assets/svgs/404.svg new file mode 100644 index 0000000..5244d8d --- /dev/null +++ b/src/assets/svgs/404.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/svgs/500.svg b/src/assets/svgs/500.svg new file mode 100644 index 0000000..9c02092 --- /dev/null +++ b/src/assets/svgs/500.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/svgs/bpm/add-user.svg b/src/assets/svgs/bpm/add-user.svg new file mode 100644 index 0000000..bc7bdbf --- /dev/null +++ b/src/assets/svgs/bpm/add-user.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/svgs/bpm/approve.svg b/src/assets/svgs/bpm/approve.svg new file mode 100644 index 0000000..06aa09d --- /dev/null +++ b/src/assets/svgs/bpm/approve.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/svgs/bpm/auditor.svg b/src/assets/svgs/bpm/auditor.svg new file mode 100644 index 0000000..66d2c2c --- /dev/null +++ b/src/assets/svgs/bpm/auditor.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/svgs/bpm/cancel.svg b/src/assets/svgs/bpm/cancel.svg new file mode 100644 index 0000000..ab9b155 --- /dev/null +++ b/src/assets/svgs/bpm/cancel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/svgs/bpm/child-process.svg b/src/assets/svgs/bpm/child-process.svg new file mode 100644 index 0000000..249723f --- /dev/null +++ b/src/assets/svgs/bpm/child-process.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/svgs/bpm/condition.svg b/src/assets/svgs/bpm/condition.svg new file mode 100644 index 0000000..41ea85d --- /dev/null +++ b/src/assets/svgs/bpm/condition.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/svgs/bpm/copy.svg b/src/assets/svgs/bpm/copy.svg new file mode 100644 index 0000000..8ff3bba --- /dev/null +++ b/src/assets/svgs/bpm/copy.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/svgs/bpm/delay.svg b/src/assets/svgs/bpm/delay.svg new file mode 100644 index 0000000..cbc31df --- /dev/null +++ b/src/assets/svgs/bpm/delay.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/svgs/bpm/finish.svg b/src/assets/svgs/bpm/finish.svg new file mode 100644 index 0000000..674c6df --- /dev/null +++ b/src/assets/svgs/bpm/finish.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/svgs/bpm/parallel.svg b/src/assets/svgs/bpm/parallel.svg new file mode 100644 index 0000000..ba0ac67 --- /dev/null +++ b/src/assets/svgs/bpm/parallel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/svgs/bpm/reject.svg b/src/assets/svgs/bpm/reject.svg new file mode 100644 index 0000000..21fd5f6 --- /dev/null +++ b/src/assets/svgs/bpm/reject.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/svgs/bpm/running.svg b/src/assets/svgs/bpm/running.svg new file mode 100644 index 0000000..5908c13 --- /dev/null +++ b/src/assets/svgs/bpm/running.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/svgs/bpm/simple-process-bg.svg b/src/assets/svgs/bpm/simple-process-bg.svg new file mode 100644 index 0000000..eb23ab5 --- /dev/null +++ b/src/assets/svgs/bpm/simple-process-bg.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/svgs/bpm/starter.svg b/src/assets/svgs/bpm/starter.svg new file mode 100644 index 0000000..c12c712 --- /dev/null +++ b/src/assets/svgs/bpm/starter.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/svgs/bpm/transactor.svg b/src/assets/svgs/bpm/transactor.svg new file mode 100644 index 0000000..a9547a7 --- /dev/null +++ b/src/assets/svgs/bpm/transactor.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/svgs/icon.svg b/src/assets/svgs/icon.svg new file mode 100644 index 0000000..7024bec --- /dev/null +++ b/src/assets/svgs/icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/svgs/iot/card-fill.svg b/src/assets/svgs/iot/card-fill.svg new file mode 100644 index 0000000..4c74ecd --- /dev/null +++ b/src/assets/svgs/iot/card-fill.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/svgs/iot/cube.svg b/src/assets/svgs/iot/cube.svg new file mode 100644 index 0000000..200ac1b --- /dev/null +++ b/src/assets/svgs/iot/cube.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/svgs/login-bg.svg b/src/assets/svgs/login-bg.svg new file mode 100644 index 0000000..bbe06c1 --- /dev/null +++ b/src/assets/svgs/login-bg.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/svgs/login-box-bg.svg b/src/assets/svgs/login-box-bg.svg new file mode 100644 index 0000000..ab10040 --- /dev/null +++ b/src/assets/svgs/login-box-bg.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/svgs/member_balance.svg b/src/assets/svgs/member_balance.svg new file mode 100644 index 0000000..5395b23 --- /dev/null +++ b/src/assets/svgs/member_balance.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/svgs/member_expenditure_balance.svg b/src/assets/svgs/member_expenditure_balance.svg new file mode 100644 index 0000000..02d498c --- /dev/null +++ b/src/assets/svgs/member_expenditure_balance.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/svgs/member_level.svg b/src/assets/svgs/member_level.svg new file mode 100644 index 0000000..cbcc686 --- /dev/null +++ b/src/assets/svgs/member_level.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/svgs/member_point.svg b/src/assets/svgs/member_point.svg new file mode 100644 index 0000000..b849ddb --- /dev/null +++ b/src/assets/svgs/member_point.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/svgs/member_recharge_balance.svg b/src/assets/svgs/member_recharge_balance.svg new file mode 100644 index 0000000..7519bb2 --- /dev/null +++ b/src/assets/svgs/member_recharge_balance.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/svgs/message.svg b/src/assets/svgs/message.svg new file mode 100644 index 0000000..14ca817 --- /dev/null +++ b/src/assets/svgs/message.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/svgs/money.svg b/src/assets/svgs/money.svg new file mode 100644 index 0000000..c1580de --- /dev/null +++ b/src/assets/svgs/money.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/svgs/pay/icon/alipay_app.svg b/src/assets/svgs/pay/icon/alipay_app.svg new file mode 100644 index 0000000..ebf1188 --- /dev/null +++ b/src/assets/svgs/pay/icon/alipay_app.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/svgs/pay/icon/alipay_bar.svg b/src/assets/svgs/pay/icon/alipay_bar.svg new file mode 100644 index 0000000..eb1e1e8 --- /dev/null +++ b/src/assets/svgs/pay/icon/alipay_bar.svg @@ -0,0 +1,2 @@ + diff --git a/src/assets/svgs/pay/icon/alipay_pc.svg b/src/assets/svgs/pay/icon/alipay_pc.svg new file mode 100644 index 0000000..2a75277 --- /dev/null +++ b/src/assets/svgs/pay/icon/alipay_pc.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/svgs/pay/icon/alipay_qr.svg b/src/assets/svgs/pay/icon/alipay_qr.svg new file mode 100644 index 0000000..4833750 --- /dev/null +++ b/src/assets/svgs/pay/icon/alipay_qr.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/src/assets/svgs/pay/icon/alipay_wap.svg b/src/assets/svgs/pay/icon/alipay_wap.svg new file mode 100644 index 0000000..87075db --- /dev/null +++ b/src/assets/svgs/pay/icon/alipay_wap.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/svgs/pay/icon/mock.svg b/src/assets/svgs/pay/icon/mock.svg new file mode 100644 index 0000000..e0a6857 --- /dev/null +++ b/src/assets/svgs/pay/icon/mock.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/svgs/pay/icon/wallet.svg b/src/assets/svgs/pay/icon/wallet.svg new file mode 100644 index 0000000..27b09ea --- /dev/null +++ b/src/assets/svgs/pay/icon/wallet.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/svgs/pay/icon/wx_app.svg b/src/assets/svgs/pay/icon/wx_app.svg new file mode 100644 index 0000000..ad40b2a --- /dev/null +++ b/src/assets/svgs/pay/icon/wx_app.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/src/assets/svgs/pay/icon/wx_bar.svg b/src/assets/svgs/pay/icon/wx_bar.svg new file mode 100644 index 0000000..11292e6 --- /dev/null +++ b/src/assets/svgs/pay/icon/wx_bar.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/svgs/pay/icon/wx_lite.svg b/src/assets/svgs/pay/icon/wx_lite.svg new file mode 100644 index 0000000..0c925cf --- /dev/null +++ b/src/assets/svgs/pay/icon/wx_lite.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/svgs/pay/icon/wx_native.svg b/src/assets/svgs/pay/icon/wx_native.svg new file mode 100644 index 0000000..bf3ba2b --- /dev/null +++ b/src/assets/svgs/pay/icon/wx_native.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/svgs/pay/icon/wx_pub.svg b/src/assets/svgs/pay/icon/wx_pub.svg new file mode 100644 index 0000000..3a6d15b --- /dev/null +++ b/src/assets/svgs/pay/icon/wx_pub.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/src/assets/svgs/peoples.svg b/src/assets/svgs/peoples.svg new file mode 100644 index 0000000..aab852e --- /dev/null +++ b/src/assets/svgs/peoples.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/svgs/send.svg b/src/assets/svgs/send.svg new file mode 100644 index 0000000..6fbc984 --- /dev/null +++ b/src/assets/svgs/send.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/svgs/shopping.svg b/src/assets/svgs/shopping.svg new file mode 100644 index 0000000..f395bc7 --- /dev/null +++ b/src/assets/svgs/shopping.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/components/ArticleAttachmentList.vue b/src/components/ArticleAttachmentList.vue new file mode 100644 index 0000000..189aa0e --- /dev/null +++ b/src/components/ArticleAttachmentList.vue @@ -0,0 +1,89 @@ + + + + + diff --git a/src/components/Backtop/index.ts b/src/components/Backtop/index.ts new file mode 100644 index 0000000..96de88d --- /dev/null +++ b/src/components/Backtop/index.ts @@ -0,0 +1,3 @@ +import Backtop from './src/Backtop.vue' + +export { Backtop } diff --git a/src/components/Backtop/src/Backtop.vue b/src/components/Backtop/src/Backtop.vue new file mode 100644 index 0000000..5d79f51 --- /dev/null +++ b/src/components/Backtop/src/Backtop.vue @@ -0,0 +1,17 @@ + + + diff --git a/src/components/BusinessPage/BusinessPage.vue b/src/components/BusinessPage/BusinessPage.vue new file mode 100644 index 0000000..d72ed88 --- /dev/null +++ b/src/components/BusinessPage/BusinessPage.vue @@ -0,0 +1,85 @@ + + + + + diff --git a/src/components/BusinessPage/index.ts b/src/components/BusinessPage/index.ts new file mode 100644 index 0000000..4074acf --- /dev/null +++ b/src/components/BusinessPage/index.ts @@ -0,0 +1 @@ +export { default as BusinessPage } from './BusinessPage.vue' diff --git a/src/components/Card/index.ts b/src/components/Card/index.ts new file mode 100644 index 0000000..f4c0d86 --- /dev/null +++ b/src/components/Card/index.ts @@ -0,0 +1,3 @@ +import CardTitle from './src/CardTitle.vue' + +export { CardTitle } diff --git a/src/components/Card/src/CardTitle.vue b/src/components/Card/src/CardTitle.vue new file mode 100644 index 0000000..76a8356 --- /dev/null +++ b/src/components/Card/src/CardTitle.vue @@ -0,0 +1,37 @@ + + + + + diff --git a/src/components/ColorInput/index.vue b/src/components/ColorInput/index.vue new file mode 100644 index 0000000..63ff73c --- /dev/null +++ b/src/components/ColorInput/index.vue @@ -0,0 +1,34 @@ + + + + + diff --git a/src/components/CommonTree/API.md b/src/components/CommonTree/API.md new file mode 100644 index 0000000..837a765 --- /dev/null +++ b/src/components/CommonTree/API.md @@ -0,0 +1,86 @@ +# CommonTree 组件 API 文档 + +通用左侧树组件,对 Element Plus `ElTree` 和 `ElTreeV2` 做统一封装。默认展开全部节点,提供大数据虚拟渲染、自定义节点、企业图标、同级拖拽排序和编辑图标事件。 + +## 设计目标 + +- 页面保留自己的数据加载、权限判断、业务弹窗和保存逻辑。 +- 组件只负责树展示、选中、展开、同级拖拽约束和节点操作事件。 +- 普通树使用 `ElTree`,支持拖拽排序;虚拟树使用 `ElTreeV2`,用于大数据节点渲染。 +- 默认节点样式对齐组织管理和用户管理左侧树;业务可通过 `#default` 插槽完全接管节点内容。 + +## Props + +| Prop | 类型 | 默认值 | 说明 | +|------|------|--------|------| +| `data` | `CommonTreeNode[]` | 必填 | 树数据 | +| `props` | `CommonTreeProps['props']` | `{ children: 'children', label: 'name', value: 'id' }` | 字段映射,透传给 Element Plus 树;`class` 使用函数形式 | +| `nodeKey` | `string` | `'id'` | 节点唯一键字段 | +| `virtual` | `boolean` | `false` | 是否启用 `ElTreeV2` 虚拟渲染 | +| `height` | `number` | `420` | 虚拟树高度 | +| `itemSize` | `number` | `40` | 虚拟树单行高度 | +| `defaultExpandAll` | `boolean` | `true` | 是否默认展开全部节点 | +| `defaultExpandedKeys` | `Array` | — | 默认展开的节点编号;仅展开这些节点时需同时设置 `defaultExpandAll=false` | +| `highlightCurrent` | `boolean` | `true` | 是否高亮当前节点 | +| `expandOnClickNode` | `boolean` | `false` | 点击节点是否展开/收起 | +| `draggable` | `boolean` | `true` | 是否开启拖拽排序;仅普通树生效 | +| `sameLevelDropOnly` | `boolean` | `true` | 是否只允许同级节点排序 | +| `editable` | `boolean` | `true` | 是否展示编辑入口 | +| `editIconVisible` | `boolean` | `true` | 是否启用编辑图标 | +| `editIconShowMode` | `'hover' \| 'current' \| 'always'` | `'hover'` | 编辑图标展示时机 | +| `showEnterpriseIcon` | `boolean` | `true` | 是否启用企业图标 | +| `enterpriseRootName` | `string` | `'浙江省财开集团'` | 企业归属根节点名称 | +| `enterpriseIconPredicate` | `(data, context) => boolean` | - | 自定义企业图标判断 | +| `emptyText` | `string` | `'暂无数据'` | 空态文案 | +| `filterText` | `string` | — | 按名称本地筛选,匹配公司或部门时保留全部下级;仅展开上级路径和匹配节点的直接下级,更深层级手动展开;清空后恢复完整树及默认展开层级 | +| `currentNodeKey` | `string \| number` | - | 当前选中节点 | + +## Events + +| 事件 | 参数 | 说明 | +|------|------|------| +| `node-click` | `(data, node, event)` | 点击节点 | +| `edit` | `(data, node)` | 点击编辑图标 | +| `node-drop` | `CommonTreeDropPayload` | 拖拽完成 | +| `node-expand` | `(data, node)` | 展开节点 | +| `node-collapse` | `(data, node)` | 收起节点 | + +## Slots + +| 插槽名 | 说明 | 作用域 | +|--------|------|--------| +| `default` | 自定义节点内容 | `{ node, data, label, editable, isEnterpriseCompany, onEdit }` | + +## Expose 方法 + +| 方法 | 参数 | 说明 | +|------|------|------| +| `setCurrentKey` | `(key?)` | 设置当前节点 | +| `getTreeRef` | - | 获取内部树实例 | + +## 企业图标规则 + +默认规则仅在节点满足以下条件时展示企业图标: + +- 节点类型字段为公司:`orgType === 'company'` 或 `type === 'company'`。 +- 节点属于 `enterpriseRootName` 指定根节点的下级节点,或节点自身 `enterpriseName` 等于该根名称。 + +如果接口字段不同,页面应传入 `enterpriseIconPredicate` 显式判断。 + +## 拖拽排序规则 + +`draggable` 默认开启,`sameLevelDropOnly` 默认开启。组件会阻止拖入子级,只允许同一父节点下的 `prev` / `next` 排序。拖拽完成后仅触发 `node-drop`,保存排序由业务页面调用自己的接口完成。 + +虚拟渲染使用 `ElTreeV2`,Element Plus 当前公开 API 不提供普通树完整拖拽属性,因此虚拟模式下不会启用拖拽排序。 + +## 示例 + +```vue + +``` diff --git a/src/components/CommonTree/index.ts b/src/components/CommonTree/index.ts new file mode 100644 index 0000000..7e27125 --- /dev/null +++ b/src/components/CommonTree/index.ts @@ -0,0 +1,5 @@ +import CommonTree from './src/CommonTree.vue' + +export * from './src/types' +export { CommonTree } +export default CommonTree diff --git a/src/components/CommonTree/src/CommonTree.vue b/src/components/CommonTree/src/CommonTree.vue new file mode 100644 index 0000000..013dd09 --- /dev/null +++ b/src/components/CommonTree/src/CommonTree.vue @@ -0,0 +1,456 @@ + + + + + diff --git a/src/components/CommonTree/src/types.ts b/src/components/CommonTree/src/types.ts new file mode 100644 index 0000000..f5c0311 --- /dev/null +++ b/src/components/CommonTree/src/types.ts @@ -0,0 +1,82 @@ +import type { NodeDropType } from 'element-plus' + +export type CommonTreeNodeClass = ( + data: Record, + node: unknown +) => string | Record + +export interface CommonTreeNode { + readonly [key: string]: unknown + id?: string | number + name?: string + label?: string + children?: CommonTreeNode[] + parentId?: string | number + parentName?: string + orgType?: string + type?: string + enterpriseName?: string +} + +export interface CommonTreeProps { + readonly data: CommonTreeNode[] + readonly props?: { + children?: string + label?: string + value?: string + disabled?: string + isLeaf?: string + class?: CommonTreeNodeClass + } + readonly nodeKey?: string + readonly virtual?: boolean + readonly height?: number + readonly itemSize?: number + readonly defaultExpandAll?: boolean + /** 默认展开的节点编号,未指定时沿用 defaultExpandAll。 */ + readonly defaultExpandedKeys?: Array + readonly highlightCurrent?: boolean + readonly expandOnClickNode?: boolean + readonly draggable?: boolean + readonly sameLevelDropOnly?: boolean + readonly editable?: boolean + readonly editIconVisible?: boolean + readonly editIconShowMode?: 'hover' | 'current' | 'always' + readonly showCompanyTag?: boolean + readonly showEnterpriseIcon?: boolean + readonly enterpriseRootName?: string + readonly enterpriseIconPredicate?: (data: CommonTreeNode, context: EnterpriseIconContext) => boolean + readonly emptyText?: string + /** 按名称筛选并保留下级,仅展开匹配节点及上级路径,更深层级手动展开。 */ + readonly filterText?: string + readonly currentNodeKey?: string | number +} + +export interface CommonTreeResolvedProps { + children: string + label: string + value: string + disabled?: string + isLeaf?: string + class?: CommonTreeNodeClass +} + +export interface CommonTreeNodeMeta { + key: string | number + parentKey?: string | number + label: string + level: number + data: CommonTreeNode +} + +export interface EnterpriseIconContext { + readonly meta?: CommonTreeNodeMeta + readonly parents: CommonTreeNode[] + readonly rootName: string +} + +export interface CommonTreeDropPayload { + readonly draggingData?: CommonTreeNode + readonly dropData?: CommonTreeNode + readonly dropType: NodeDropType +} diff --git a/src/components/ConfigGlobal/index.ts b/src/components/ConfigGlobal/index.ts new file mode 100644 index 0000000..dda2462 --- /dev/null +++ b/src/components/ConfigGlobal/index.ts @@ -0,0 +1,3 @@ +import ConfigGlobal from './src/ConfigGlobal.vue' + +export { ConfigGlobal } diff --git a/src/components/ConfigGlobal/src/ConfigGlobal.vue b/src/components/ConfigGlobal/src/ConfigGlobal.vue new file mode 100644 index 0000000..af543df --- /dev/null +++ b/src/components/ConfigGlobal/src/ConfigGlobal.vue @@ -0,0 +1,62 @@ + + + diff --git a/src/components/ContentDetailWrap/index.ts b/src/components/ContentDetailWrap/index.ts new file mode 100644 index 0000000..1871cac --- /dev/null +++ b/src/components/ContentDetailWrap/index.ts @@ -0,0 +1,3 @@ +import ContentDetailWrap from './src/ContentDetailWrap.vue' + +export { ContentDetailWrap } diff --git a/src/components/ContentDetailWrap/src/ContentDetailWrap.vue b/src/components/ContentDetailWrap/src/ContentDetailWrap.vue new file mode 100644 index 0000000..a9eacc0 --- /dev/null +++ b/src/components/ContentDetailWrap/src/ContentDetailWrap.vue @@ -0,0 +1,58 @@ + + + diff --git a/src/components/ContentWrap/index.ts b/src/components/ContentWrap/index.ts new file mode 100644 index 0000000..8c22cc8 --- /dev/null +++ b/src/components/ContentWrap/index.ts @@ -0,0 +1,3 @@ +import ContentWrap from './src/ContentWrap.vue' + +export { ContentWrap } diff --git a/src/components/ContentWrap/src/ContentWrap.vue b/src/components/ContentWrap/src/ContentWrap.vue new file mode 100644 index 0000000..e603596 --- /dev/null +++ b/src/components/ContentWrap/src/ContentWrap.vue @@ -0,0 +1,36 @@ + + + diff --git a/src/components/CountTo/index.ts b/src/components/CountTo/index.ts new file mode 100644 index 0000000..2119f02 --- /dev/null +++ b/src/components/CountTo/index.ts @@ -0,0 +1,3 @@ +import CountTo from './src/CountTo.vue' + +export { CountTo } diff --git a/src/components/CountTo/src/CountTo.vue b/src/components/CountTo/src/CountTo.vue new file mode 100644 index 0000000..7a19bec --- /dev/null +++ b/src/components/CountTo/src/CountTo.vue @@ -0,0 +1,182 @@ + + + diff --git a/src/components/Crontab/index.ts b/src/components/Crontab/index.ts new file mode 100644 index 0000000..6beeef8 --- /dev/null +++ b/src/components/Crontab/index.ts @@ -0,0 +1,2 @@ +import Crontab from './src/Crontab.vue' +export { Crontab } diff --git a/src/components/Crontab/src/Crontab.vue b/src/components/Crontab/src/Crontab.vue new file mode 100644 index 0000000..0914bb7 --- /dev/null +++ b/src/components/Crontab/src/Crontab.vue @@ -0,0 +1,1015 @@ + + + + diff --git a/src/components/Cropper/index.ts b/src/components/Cropper/index.ts new file mode 100644 index 0000000..8fcc618 --- /dev/null +++ b/src/components/Cropper/index.ts @@ -0,0 +1,4 @@ +import CropperImage from './src/Cropper.vue' +import CropperAvatar from './src/CropperAvatar.vue' + +export { CropperImage, CropperAvatar } diff --git a/src/components/Cropper/src/CopperModal.vue b/src/components/Cropper/src/CopperModal.vue new file mode 100644 index 0000000..d9a4e34 --- /dev/null +++ b/src/components/Cropper/src/CopperModal.vue @@ -0,0 +1,261 @@ + + + diff --git a/src/components/Cropper/src/Cropper.vue b/src/components/Cropper/src/Cropper.vue new file mode 100644 index 0000000..871aed8 --- /dev/null +++ b/src/components/Cropper/src/Cropper.vue @@ -0,0 +1,183 @@ + + + diff --git a/src/components/Cropper/src/CropperAvatar.vue b/src/components/Cropper/src/CropperAvatar.vue new file mode 100644 index 0000000..9464c2a --- /dev/null +++ b/src/components/Cropper/src/CropperAvatar.vue @@ -0,0 +1,142 @@ + + + diff --git a/src/components/Cropper/src/types.ts b/src/components/Cropper/src/types.ts new file mode 100644 index 0000000..bcad3b4 --- /dev/null +++ b/src/components/Cropper/src/types.ts @@ -0,0 +1,8 @@ +import type Cropper from 'cropperjs' + +export interface CropendResult { + imgBase64: string + imgInfo: Cropper.Data +} + +export type { Cropper } diff --git a/src/components/DeptSelectForm/index.vue b/src/components/DeptSelectForm/index.vue new file mode 100644 index 0000000..a825871 --- /dev/null +++ b/src/components/DeptSelectForm/index.vue @@ -0,0 +1,127 @@ + + + diff --git a/src/components/Descriptions/index.ts b/src/components/Descriptions/index.ts new file mode 100644 index 0000000..243bc39 --- /dev/null +++ b/src/components/Descriptions/index.ts @@ -0,0 +1,4 @@ +import Descriptions from './src/Descriptions.vue' +import DescriptionsItemLabel from './src/DescriptionsItemLabel.vue' + +export { Descriptions, DescriptionsItemLabel } diff --git a/src/components/Descriptions/src/Descriptions.vue b/src/components/Descriptions/src/Descriptions.vue new file mode 100644 index 0000000..184d95c --- /dev/null +++ b/src/components/Descriptions/src/Descriptions.vue @@ -0,0 +1,167 @@ + + + + + diff --git a/src/components/Descriptions/src/DescriptionsItemLabel.vue b/src/components/Descriptions/src/DescriptionsItemLabel.vue new file mode 100644 index 0000000..4efb2fb --- /dev/null +++ b/src/components/Descriptions/src/DescriptionsItemLabel.vue @@ -0,0 +1,29 @@ + + + + + diff --git a/src/components/Dialog/index.ts b/src/components/Dialog/index.ts new file mode 100644 index 0000000..1655dad --- /dev/null +++ b/src/components/Dialog/index.ts @@ -0,0 +1,3 @@ +import Dialog from './src/Dialog.vue' + +export { Dialog } diff --git a/src/components/Dialog/src/Dialog.vue b/src/components/Dialog/src/Dialog.vue new file mode 100644 index 0000000..8c12020 --- /dev/null +++ b/src/components/Dialog/src/Dialog.vue @@ -0,0 +1,179 @@ + + + + + diff --git a/src/components/DictTag/index.ts b/src/components/DictTag/index.ts new file mode 100644 index 0000000..4db2742 --- /dev/null +++ b/src/components/DictTag/index.ts @@ -0,0 +1,3 @@ +import DictTag from './src/DictTag.vue' + +export { DictTag } diff --git a/src/components/DictTag/src/DictTag.vue b/src/components/DictTag/src/DictTag.vue new file mode 100644 index 0000000..6414eaa --- /dev/null +++ b/src/components/DictTag/src/DictTag.vue @@ -0,0 +1,90 @@ + diff --git a/src/components/DocAlert/index.vue b/src/components/DocAlert/index.vue new file mode 100644 index 0000000..0073266 --- /dev/null +++ b/src/components/DocAlert/index.vue @@ -0,0 +1,34 @@ + + + diff --git a/src/components/Drawer/index.ts b/src/components/Drawer/index.ts new file mode 100644 index 0000000..079c8b4 --- /dev/null +++ b/src/components/Drawer/index.ts @@ -0,0 +1,4 @@ +import Drawer from './src/Drawer.vue' + +export { Drawer } +export default Drawer diff --git a/src/components/Drawer/src/Drawer.vue b/src/components/Drawer/src/Drawer.vue new file mode 100644 index 0000000..791bb55 --- /dev/null +++ b/src/components/Drawer/src/Drawer.vue @@ -0,0 +1,182 @@ + + + + + diff --git a/src/components/Echart/index.ts b/src/components/Echart/index.ts new file mode 100644 index 0000000..4822092 --- /dev/null +++ b/src/components/Echart/index.ts @@ -0,0 +1,3 @@ +import Echart from './src/Echart.vue' + +export { Echart } diff --git a/src/components/Echart/src/Echart.vue b/src/components/Echart/src/Echart.vue new file mode 100644 index 0000000..487f20a --- /dev/null +++ b/src/components/Echart/src/Echart.vue @@ -0,0 +1,120 @@ + + + diff --git a/src/components/Editor/index.ts b/src/components/Editor/index.ts new file mode 100644 index 0000000..0f4e056 --- /dev/null +++ b/src/components/Editor/index.ts @@ -0,0 +1,8 @@ +import Editor from './src/Editor.vue' +import { IDomEditor } from '@wangeditor-next/editor' + +export interface EditorExpose { + getEditorRef: () => Promise +} + +export { Editor } diff --git a/src/components/Editor/src/Editor.vue b/src/components/Editor/src/Editor.vue new file mode 100644 index 0000000..073845d --- /dev/null +++ b/src/components/Editor/src/Editor.vue @@ -0,0 +1,219 @@ + + + + + diff --git a/src/components/Error/index.ts b/src/components/Error/index.ts new file mode 100644 index 0000000..a52c6f9 --- /dev/null +++ b/src/components/Error/index.ts @@ -0,0 +1,3 @@ +import Error from './src/Error.vue' + +export { Error } diff --git a/src/components/Error/src/Error.vue b/src/components/Error/src/Error.vue new file mode 100644 index 0000000..3fd7a17 --- /dev/null +++ b/src/components/Error/src/Error.vue @@ -0,0 +1,58 @@ + + + diff --git a/src/components/Form/index.ts b/src/components/Form/index.ts new file mode 100644 index 0000000..484c7a2 --- /dev/null +++ b/src/components/Form/index.ts @@ -0,0 +1,15 @@ +import Form from './src/Form.vue' +import { ElForm } from 'element-plus' +import { FormSchema, FormSetPropsType } from '@/types/form' + +export interface FormExpose { + setValues: (data: Recordable) => void + setProps: (props: Recordable) => void + delSchema: (field: string) => void + addSchema: (formSchema: FormSchema, index?: number) => void + setSchema: (schemaProps: FormSetPropsType[]) => void + formModel: Recordable + getElFormRef: () => ComponentRef +} + +export { Form } diff --git a/src/components/Form/src/Form.vue b/src/components/Form/src/Form.vue new file mode 100644 index 0000000..358c674 --- /dev/null +++ b/src/components/Form/src/Form.vue @@ -0,0 +1,307 @@ + + + diff --git a/src/components/Form/src/componentMap.ts b/src/components/Form/src/componentMap.ts new file mode 100644 index 0000000..5af9b40 --- /dev/null +++ b/src/components/Form/src/componentMap.ts @@ -0,0 +1,55 @@ +import type { Component } from 'vue' +import { + ElCascader, + ElCheckboxGroup, + ElColorPicker, + ElDatePicker, + ElInput, + ElInputNumber, + ElRadioGroup, + ElRate, + ElSelect, + ElSelectV2, + ElTreeSelect, + ElSlider, + ElSwitch, + ElTimePicker, + ElTimeSelect, + ElTransfer, + ElAutocomplete, + ElDivider +} from 'element-plus' +import { InputPassword } from '@/components/InputPassword' +import { Editor } from '@/components/Editor' +import { UploadImg, UploadImgs, UploadFile } from '@/components/UploadFile' +import { ComponentName } from '@/types/components' + +const componentMap: Recordable = { + Radio: ElRadioGroup, + Checkbox: ElCheckboxGroup, + CheckboxButton: ElCheckboxGroup, + Input: ElInput, + Autocomplete: ElAutocomplete, + InputNumber: ElInputNumber, + Select: ElSelect, + Cascader: ElCascader, + Switch: ElSwitch, + Slider: ElSlider, + TimePicker: ElTimePicker, + DatePicker: ElDatePicker, + Rate: ElRate, + ColorPicker: ElColorPicker, + Transfer: ElTransfer, + Divider: ElDivider, + TimeSelect: ElTimeSelect, + SelectV2: ElSelectV2, + TreeSelect: ElTreeSelect, + RadioButton: ElRadioGroup, + InputPassword: InputPassword, + Editor: Editor, + UploadImg: UploadImg, + UploadImgs: UploadImgs, + UploadFile: UploadFile +} + +export { componentMap } diff --git a/src/components/Form/src/components/useRenderCheckbox.tsx b/src/components/Form/src/components/useRenderCheckbox.tsx new file mode 100644 index 0000000..e151839 --- /dev/null +++ b/src/components/Form/src/components/useRenderCheckbox.tsx @@ -0,0 +1,26 @@ +import { FormSchema } from '@/types/form' +import { ElCheckbox, ElCheckboxButton } from 'element-plus' +import { defineComponent } from 'vue' + +export const useRenderCheckbox = () => { + const renderCheckboxOptions = (item: FormSchema) => { + // 如果有别名,就取别名 + const labelAlias = item?.componentProps?.optionsAlias?.labelField + const valueAlias = item?.componentProps?.optionsAlias?.valueField + const Com = (item.component === 'Checkbox' ? ElCheckbox : ElCheckboxButton) as ReturnType< + typeof defineComponent + > + return item?.componentProps?.options?.map((option) => { + const { ...other } = option + return ( + + {option[labelAlias || 'label']} + + ) + }) + } + + return { + renderCheckboxOptions + } +} diff --git a/src/components/Form/src/components/useRenderRadio.tsx b/src/components/Form/src/components/useRenderRadio.tsx new file mode 100644 index 0000000..d1005ca --- /dev/null +++ b/src/components/Form/src/components/useRenderRadio.tsx @@ -0,0 +1,26 @@ +import { FormSchema } from '@/types/form' +import { ElRadio, ElRadioButton } from 'element-plus' +import { defineComponent } from 'vue' + +export const useRenderRadio = () => { + const renderRadioOptions = (item: FormSchema) => { + // 如果有别名,就取别名 + const labelAlias = item?.componentProps?.optionsAlias?.labelField + const valueAlias = item?.componentProps?.optionsAlias?.valueField + const Com = (item.component === 'Radio' ? ElRadio : ElRadioButton) as ReturnType< + typeof defineComponent + > + return item?.componentProps?.options?.map((option) => { + const { ...other } = option + return ( + + {option[labelAlias || 'label']} + + ) + }) + } + + return { + renderRadioOptions + } +} diff --git a/src/components/Form/src/components/useRenderSelect.tsx b/src/components/Form/src/components/useRenderSelect.tsx new file mode 100644 index 0000000..59b72e6 --- /dev/null +++ b/src/components/Form/src/components/useRenderSelect.tsx @@ -0,0 +1,57 @@ +import { FormSchema } from '@/types/form' +import { ComponentOptions } from '@/types/components' +import { ElOption, ElOptionGroup } from 'element-plus' +import { getSlot } from '@/utils/tsxHelper' +import { Slots } from 'vue' + +export const useRenderSelect = (slots: Slots) => { + // 渲染 select options + const renderSelectOptions = (item: FormSchema) => { + // 如果有别名,就取别名 + const labelAlias = item?.componentProps?.optionsAlias?.labelField + return item?.componentProps?.options?.map((option) => { + if (option?.options?.length) { + return ( + + {() => { + return option?.options?.map((v) => { + return renderSelectOptionItem(item, v) + }) + }} + + ) + } else { + return renderSelectOptionItem(item, option) + } + }) + } + + // 渲染 select option item + const renderSelectOptionItem = (item: FormSchema, option: ComponentOptions) => { + // 如果有别名,就取别名 + const labelAlias = item?.componentProps?.optionsAlias?.labelField + const valueAlias = item?.componentProps?.optionsAlias?.valueField + + const { label, value, ...other } = option + + return ( + + {{ + default: () => + // option 插槽名规则,{field}-option + item?.componentProps?.optionsSlot + ? getSlot(slots, `${item.field}-option`, { item: option }) + : undefined + }} + + ) + } + + return { + renderSelectOptions + } +} diff --git a/src/components/Form/src/helper.ts b/src/components/Form/src/helper.ts new file mode 100644 index 0000000..cdfc8ca --- /dev/null +++ b/src/components/Form/src/helper.ts @@ -0,0 +1,148 @@ +import type { Slots } from 'vue' +import { getSlot } from '@/utils/tsxHelper' +import { PlaceholderModel } from './types' +import { FormSchema } from '@/types/form' +import { ColProps } from '@/types/components' + +/** + * + * @param schema 对应组件数据 + * @returns 返回提示信息对象 + * @description 用于自动设置placeholder + */ +export const setTextPlaceholder = (schema: FormSchema): PlaceholderModel => { + const { t } = useI18n() + const textMap = ['Input', 'Autocomplete', 'InputNumber', 'InputPassword'] + const selectMap = ['Select', 'SelectV2', 'TimePicker', 'DatePicker', 'TimeSelect', 'TimeSelect'] + if (textMap.includes(schema?.component as string)) { + return { + placeholder: t('common.inputText') + schema.label + } + } + if (selectMap.includes(schema?.component as string)) { + // 一些范围选择器 + const twoTextMap = ['datetimerange', 'daterange', 'monthrange', 'datetimerange', 'daterange'] + if ( + twoTextMap.includes( + (schema?.componentProps?.type || schema?.componentProps?.isRange) as string + ) + ) { + return { + startPlaceholder: t('common.startTimeText'), + endPlaceholder: t('common.endTimeText'), + rangeSeparator: '-' + } + } else { + return { + placeholder: t('common.selectText') + schema.label + } + } + } + return {} +} + +/** + * + * @param col 内置栅格 + * @returns 返回栅格属性 + * @description 合并传入进来的栅格属性 + */ +export const setGridProp = (col: ColProps = {}): ColProps => { + const colProps: ColProps = { + // 如果有span,代表用户优先级更高,所以不需要默认栅格 + ...(col.span + ? {} + : { + xs: 24, + sm: 12, + md: 12, + lg: 12, + xl: 12 + }), + ...col + } + return colProps +} + +/** + * + * @param item 传入的组件属性 + * @returns 默认添加 clearable 属性 + */ +export const setComponentProps = (item: FormSchema): Recordable => { + const notNeedClearable = ['ColorPicker'] + const componentProps: Recordable = notNeedClearable.includes(item.component as string) + ? { ...item.componentProps } + : { + clearable: true, + ...item.componentProps + } + // 需要删除额外的属性 + delete componentProps?.slots + return componentProps +} + +/** + * + * @param slots 插槽 + * @param slotsProps 插槽属性 + * @param field 字段名 + */ +export const setItemComponentSlots = ( + slots: Slots, + slotsProps: Recordable = {}, + field: string +): Recordable => { + const slotObj: Recordable = {} + for (const key in slotsProps) { + if (slotsProps[key]) { + // 由于组件有可能重复,需要有一个唯一的前缀 + slotObj[key] = (data: Recordable) => { + return getSlot(slots, `${field}-${key}`, data) + } + } + } + return slotObj +} + +/** + * + * @param schema Form表单结构化数组 + * @param formModel FormModel + * @returns FormModel + * @description 生成对应的formModel + */ +export const initModel = (schema: FormSchema[], formModel: Recordable) => { + const model: Recordable = { ...formModel } + schema.map((v) => { + // 如果是hidden,就删除对应的值 + if (v.hidden) { + delete model[v.field] + } else if (v.component && v.component !== 'Divider') { + const hasField = Reflect.has(model, v.field) + // 如果先前已经有值存在,则不进行重新赋值,而是采用现有的值 + model[v.field] = hasField ? model[v.field] : v.value !== void 0 ? v.value : '' + } + }) + return model +} + +/** + * @param slots 插槽 + * @param field 字段名 + * @returns 返回FormIiem插槽 + */ +export const setFormItemSlots = (slots: Slots, field: string): Recordable => { + const slotObj: Recordable = {} + if (slots[`${field}-error`]) { + slotObj['error'] = (data: Recordable) => { + return getSlot(slots, `${field}-error`, data) + } + } + if (slots[`${field}-label`]) { + slotObj['label'] = (data: Recordable) => { + return getSlot(slots, `${field}-label`, data) + } + } + return slotObj +} diff --git a/src/components/Form/src/types.ts b/src/components/Form/src/types.ts new file mode 100644 index 0000000..dcd01e7 --- /dev/null +++ b/src/components/Form/src/types.ts @@ -0,0 +1,17 @@ +import { FormSchema } from '@/types/form' + +export interface PlaceholderModel { + placeholder?: string + startPlaceholder?: string + endPlaceholder?: string + rangeSeparator?: string +} + +export type FormProps = { + schema?: FormSchema[] + isCol?: boolean + model?: Recordable + autoSetPlaceholder?: boolean + isCustom?: boolean + labelWidth?: string | number +} & Recordable diff --git a/src/components/FormCreate/index.ts b/src/components/FormCreate/index.ts new file mode 100644 index 0000000..9d32778 --- /dev/null +++ b/src/components/FormCreate/index.ts @@ -0,0 +1,4 @@ +import { useFormCreateDesigner } from './src/useFormCreateDesigner' +import { useApiSelect } from './src/components/useApiSelect' + +export { useFormCreateDesigner, useApiSelect } diff --git a/src/components/FormCreate/src/WorkflowFormPreview.vue b/src/components/FormCreate/src/WorkflowFormPreview.vue new file mode 100644 index 0000000..821c0c8 --- /dev/null +++ b/src/components/FormCreate/src/WorkflowFormPreview.vue @@ -0,0 +1,38 @@ + + + diff --git a/src/components/FormCreate/src/components/AmountCalculation.vue b/src/components/FormCreate/src/components/AmountCalculation.vue new file mode 100644 index 0000000..c927dbc --- /dev/null +++ b/src/components/FormCreate/src/components/AmountCalculation.vue @@ -0,0 +1,76 @@ + + + diff --git a/src/components/FormCreate/src/components/AssetCardSelect.vue b/src/components/FormCreate/src/components/AssetCardSelect.vue new file mode 100644 index 0000000..1d55ede --- /dev/null +++ b/src/components/FormCreate/src/components/AssetCardSelect.vue @@ -0,0 +1,173 @@ + + + diff --git a/src/components/FormCreate/src/components/ConfidentialInput.vue b/src/components/FormCreate/src/components/ConfidentialInput.vue new file mode 100644 index 0000000..3a5d149 --- /dev/null +++ b/src/components/FormCreate/src/components/ConfidentialInput.vue @@ -0,0 +1,63 @@ + + + + diff --git a/src/components/FormCreate/src/components/DeptTreeSelect.vue b/src/components/FormCreate/src/components/DeptTreeSelect.vue new file mode 100644 index 0000000..3d8c873 --- /dev/null +++ b/src/components/FormCreate/src/components/DeptTreeSelect.vue @@ -0,0 +1,482 @@ + + + + + + diff --git a/src/components/FormCreate/src/components/DictSelect.vue b/src/components/FormCreate/src/components/DictSelect.vue new file mode 100644 index 0000000..46c140f --- /dev/null +++ b/src/components/FormCreate/src/components/DictSelect.vue @@ -0,0 +1,87 @@ + + + + diff --git a/src/components/FormCreate/src/components/FormColumnWidth.vue b/src/components/FormCreate/src/components/FormColumnWidth.vue new file mode 100644 index 0000000..38613ae --- /dev/null +++ b/src/components/FormCreate/src/components/FormColumnWidth.vue @@ -0,0 +1,24 @@ + + + diff --git a/src/components/FormCreate/src/components/FormTable.vue b/src/components/FormCreate/src/components/FormTable.vue new file mode 100644 index 0000000..0e7b9bf --- /dev/null +++ b/src/components/FormCreate/src/components/FormTable.vue @@ -0,0 +1,232 @@ + + + + + + diff --git a/src/components/FormCreate/src/components/FormTableColumnConfig.vue b/src/components/FormCreate/src/components/FormTableColumnConfig.vue new file mode 100644 index 0000000..af98823 --- /dev/null +++ b/src/components/FormCreate/src/components/FormTableColumnConfig.vue @@ -0,0 +1,76 @@ + + + + + diff --git a/src/components/FormCreate/src/components/FormTableRow.vue b/src/components/FormCreate/src/components/FormTableRow.vue new file mode 100644 index 0000000..35353d3 --- /dev/null +++ b/src/components/FormCreate/src/components/FormTableRow.vue @@ -0,0 +1,13 @@ + + + + diff --git a/src/components/FormCreate/src/components/ItsmProjectMemberSelect.vue b/src/components/FormCreate/src/components/ItsmProjectMemberSelect.vue new file mode 100644 index 0000000..7bc43d3 --- /dev/null +++ b/src/components/FormCreate/src/components/ItsmProjectMemberSelect.vue @@ -0,0 +1,156 @@ + + + diff --git a/src/components/FormCreate/src/components/ItsmProjectSelect.vue b/src/components/FormCreate/src/components/ItsmProjectSelect.vue new file mode 100644 index 0000000..20b2bd9 --- /dev/null +++ b/src/components/FormCreate/src/components/ItsmProjectSelect.vue @@ -0,0 +1,143 @@ + + + diff --git a/src/components/FormCreate/src/components/ItsmResourceSelect.vue b/src/components/FormCreate/src/components/ItsmResourceSelect.vue new file mode 100644 index 0000000..eaaeb98 --- /dev/null +++ b/src/components/FormCreate/src/components/ItsmResourceSelect.vue @@ -0,0 +1,124 @@ + + + diff --git a/src/components/FormCreate/src/components/LeaveDays.vue b/src/components/FormCreate/src/components/LeaveDays.vue new file mode 100644 index 0000000..1870c4c --- /dev/null +++ b/src/components/FormCreate/src/components/LeaveDays.vue @@ -0,0 +1,59 @@ + + + + diff --git a/src/components/FormCreate/src/components/Numbering.vue b/src/components/FormCreate/src/components/Numbering.vue new file mode 100644 index 0000000..a7bcced --- /dev/null +++ b/src/components/FormCreate/src/components/Numbering.vue @@ -0,0 +1,171 @@ + + + + + diff --git a/src/components/FormCreate/src/components/PostSelect.vue b/src/components/FormCreate/src/components/PostSelect.vue new file mode 100644 index 0000000..a79d6fc --- /dev/null +++ b/src/components/FormCreate/src/components/PostSelect.vue @@ -0,0 +1,140 @@ + + + diff --git a/src/components/FormCreate/src/components/ProcessInstanceSelect.vue b/src/components/FormCreate/src/components/ProcessInstanceSelect.vue new file mode 100644 index 0000000..30fb15a --- /dev/null +++ b/src/components/FormCreate/src/components/ProcessInstanceSelect.vue @@ -0,0 +1,211 @@ + + + + + diff --git a/src/components/FormCreate/src/components/ReadonlyValue.vue b/src/components/FormCreate/src/components/ReadonlyValue.vue new file mode 100644 index 0000000..9ddda29 --- /dev/null +++ b/src/components/FormCreate/src/components/ReadonlyValue.vue @@ -0,0 +1,56 @@ + + + diff --git a/src/components/FormCreate/src/components/RoleSelect.vue b/src/components/FormCreate/src/components/RoleSelect.vue new file mode 100644 index 0000000..02e76a2 --- /dev/null +++ b/src/components/FormCreate/src/components/RoleSelect.vue @@ -0,0 +1,144 @@ + + + diff --git a/src/components/FormCreate/src/components/TimeCalculation.vue b/src/components/FormCreate/src/components/TimeCalculation.vue new file mode 100644 index 0000000..993b895 --- /dev/null +++ b/src/components/FormCreate/src/components/TimeCalculation.vue @@ -0,0 +1,107 @@ + + + + + + diff --git a/src/components/FormCreate/src/components/UppercaseAmount.vue b/src/components/FormCreate/src/components/UppercaseAmount.vue new file mode 100644 index 0000000..3807350 --- /dev/null +++ b/src/components/FormCreate/src/components/UppercaseAmount.vue @@ -0,0 +1,49 @@ + + + diff --git a/src/components/FormCreate/src/components/useApiSelect.tsx b/src/components/FormCreate/src/components/useApiSelect.tsx new file mode 100644 index 0000000..107ba8e --- /dev/null +++ b/src/components/FormCreate/src/components/useApiSelect.tsx @@ -0,0 +1,510 @@ +import request from '@/config/axios' +import { isEmpty } from '@/utils/is' +import { ApiSelectProps } from '@/components/FormCreate/src/type' +import { jsonParse } from '@/utils' +import { useProcessFormScope } from '../utils/processFormScope' +import * as DeptApi from '@/api/system/dept' +import UserTreeSelect from '@/components/UserTreeSelect/index.vue' +import { + buildDeclaredParamsTemplate, + buildParamPropDefs, + getCurrentUserValue +} from '@/components/FormCreate/src/config/selectParams' + +export const useApiSelect = (option: ApiSelectProps) => { + return defineComponent({ + name: option.name, + props: { + // 选项标签 + labelField: { + type: String, + default: () => option.labelField ?? 'label' + }, + // 选项的值 + valueField: { + type: String, + default: () => option.valueField ?? 'value' + }, + // api 接口 + url: { + type: String, + default: () => option.url ?? '' + }, + // 请求类型 + method: { + type: String, + default: 'GET' + }, + // 选项解析函数 + parseFunc: { + type: [String, Function], + default: '' + }, + // 请求参数 + data: { + type: String, + default: '' + }, + // 选择器类型,下拉框 select、多选框 checkbox、单选框 radio + selectType: { + type: String, + default: 'select' + }, + // 是否多选 + multiple: { + type: Boolean, + default: false + }, + // 只有明确选“是”才忽略流程范围,未配置的历史字段仍按适用范围查询。 + ignoreProcessScope: { + type: Boolean, + default: false + }, + // 是否远程搜索 + remote: { + type: Boolean, + default: false + }, + // 远程搜索时携带的参数 + remoteField: { + type: String, + default: 'label' + }, + // 返回值类型(用于部门选择器等):id 返回 ID,name 返回名称 + returnType: { + type: String, + default: 'id' + }, + // 组件声明参数的取值配置(如用户选择器的 deptIdSource / deptIdField) + ...buildParamPropDefs(option.paramDefs), + // 自定义请求参数模板(JSON,接口选择器使用):值中 ${form.字段ID} 引用表单字段、${user.属性} 引用当前用户 + params: { + type: String, + default: '' + }, + // 依赖字段为空时不加载选项 + requireParams: { + type: Boolean, + default: true + }, + // form-create 注入的上下文,用于读取其他字段的值、设置自身的值 + formCreateInject: { + type: Object, + default: undefined + } + }, + setup(props) { + const attrs = useAttrs() + // 只有流程表单的人员组件继承范围,接口选择器及普通页面保持原有请求。 + const runtimeScope = useProcessFormScope() + const processScope = option.name === 'UserSelect' ? runtimeScope : undefined + const optionsScope = runtimeScope?.getOptions ? runtimeScope : processScope + // 历史用户复选框也使用多选树,单选框保留标量取值,不要求重存表单配置。 + const selectionMultiple = computed(() => option.name === 'UserSelect' + ? props.selectType === 'checkbox' || (props.selectType !== 'radio' && props.multiple) + : props.multiple) + const options = ref([]) // 下拉数据 + const userDepartments = ref[]>([]) // 只用于层级,不决定候选资格。 + const loading = ref(option.name === 'UserSelect') // 首次渲染即标记人员加载中,避免先显示原始 ID。 + const queryParam = ref() // 当前输入的值 + + /** 参数模板中 ${...} 引用的匹配规则 */ + const REF_PATTERN = /\$\{\s*([^}\s]+)\s*}/g + /** 引用前缀:form. 为表单字段,user. 为当前用户;无前缀视为表单字段(兼容早期写法) */ + const FORM_PREFIX = 'form.' + const USER_PREFIX = 'user.' + + /** 自定义参数模板 JSON,格式错误时视为未配置并提示 */ + const parseCustomTemplate = (): Record => { + if (isEmpty(props.params)) { + return {} + } + const template = jsonParse(props.params) + if (!template || typeof template !== 'object' || Array.isArray(template)) { + console.warn(`下拉组件请求参数模板不是 JSON 对象:${props.params}`) + return {} + } + return template + } + + /** 最终参数模板:组件声明参数的配置 + 自定义模板(同名时以自定义模板为准) */ + const parseParamsTemplate = (): Record => ({ + ...buildDeclaredParamsTemplate(option.paramDefs, props), + ...parseCustomTemplate() + }) + + /** 引用表达式对应的表单字段 ID;引用当前用户时返回 undefined */ + const toFormField = (ref: string) => { + if (ref.startsWith(USER_PREFIX)) { + return undefined + } + return ref.startsWith(FORM_PREFIX) ? ref.substring(FORM_PREFIX.length) : ref + } + + /** 参数模板中引用的表单字段(依赖字段),当前用户不属于依赖字段 */ + const dependFields = computed(() => { + const fields = new Set() + Object.values(parseParamsTemplate()).forEach((value) => { + if (typeof value === 'string') { + for (const match of value.matchAll(REF_PATTERN)) { + const field = toFormField(match[1]) + if (field) { + fields.add(field) + } + } + } + }) + return [...fields] + }) + + /** 读取本表单其他字段的值;未在表单中渲染时返回 undefined */ + const getFieldValue = (field: string) => { + const inject = props.formCreateInject + if (!inject?.api) return undefined + const row = inject.rule && inject.api.getParentSubRule(inject.rule) + return row ? inject.api.getChildrenFormData(row)[field] : inject.api.getValue(field) + } + + /** 解析一个引用表达式的值 */ + const resolveRef = (ref: string) => { + if (ref.startsWith(USER_PREFIX)) { + const key = ref.substring(USER_PREFIX.length) + return runtimeScope?.getCurrentUserValue ? runtimeScope.getCurrentUserValue(key) : getCurrentUserValue(key) + } + return getFieldValue(toFormField(ref) as string) + } + + /** 依赖字段是否有空值 */ + const hasEmptyDependency = () => + dependFields.value.some((field) => isEmpty(getFieldValue(field))) + + /** 按模板生成请求参数:值恰好为 ${字段ID} 时保留原始类型,否则按字符串替换 */ + const buildParams = (): Record => { + const params: Record = {} + Object.entries(parseParamsTemplate()).forEach(([key, value]) => { + if (typeof value !== 'string') { + params[key] = value + return + } + const whole = value.trim().match(/^\$\{\s*([^}\s]+)\s*}$/) + params[key] = whole + ? resolveRef(whole[1]) + : value.replace(REF_PATTERN, (_, ref) => String(resolveRef(ref) ?? '')) + }) + return params + } + + /** 把参数拼接到 GET 请求地址上,空值参数不拼接 */ + const appendQuery = (url: string, params: Record) => { + const query = Object.entries(params) + .filter(([, value]) => !isEmpty(value)) + .map(([key, value]) => `${encodeURIComponent(key)}=${encodeURIComponent(value)}`) + .join('&') + if (!query) { + return url + } + return url.includes('?') ? `${url}&${query}` : `${url}?${query}` + } + + let optionsRevision = 0 // 关联字段或流程切换后,只采用最后一次请求结果。 + const getOptions = async () => { + const revision = ++optionsRevision + loading.value = true + try { + options.value = [] + userDepartments.value = [] + // 接口选择器 + if (isEmpty(props.url)) { + return + } + // 依赖字段未填写时不加载,避免一次性加载全量数据 + if (props.requireParams && hasEmptyDependency()) { + return + } + const templateParams = buildParams() + + // 组织与人员并行读取;受限表单只读取相同流程上下文的组织,失败时不退回全量。 + const departmentRequest = option.name === 'UserSelect' + ? (processScope && (processScope.getCurrentUserValue || props.ignoreProcessScope !== true) + ? processScope.getDepartments(props.ignoreProcessScope) : DeptApi.getSimpleDeptList()) + : Promise.resolve([]) + // 姓名先回显;组织树独立补齐,不让较慢的组织请求阻塞人员标签。 + const updateDepartments = departmentRequest.then((departments) => { + if (revision === optionsRevision) userDepartments.value = departments + }) + + if (processScope && (processScope.getCurrentUserValue || props.ignoreProcessScope !== true)) { + // 树统一按姓名、账号及组织路径搜索,不提前只按昵称过滤。 + await Promise.all([updateDepartments, processScope.getUsers(templateParams, props.ignoreProcessScope).then((data) => { + if (revision === optionsRevision) parseOptions0(data) + })]) + return + } + + // 仿真在数据读取层替代能力,复选框、关联参数和纯本地解析继续使用原控件。 + if (runtimeScope?.getOptions) { + const params = { ...templateParams, + ...(props.remote && queryParam.value != null ? { [props.remoteField]: queryParam.value } : {}) } + const data = await runtimeScope.getOptions({ url: props.url, method: props.method, params }) + if (revision === optionsRevision) parseOptions(data) + return + } + + switch (props.method) { + case 'GET': + let url: string = appendQuery(props.url, templateParams) + if (props.remote) { + if (queryParam.value != undefined) { + if (url.includes('?')) { + url = `${url}&${props.remoteField}=${queryParam.value}` + } else { + url = `${url}?${props.remoteField}=${queryParam.value}` + } + } + } + await Promise.all([updateDepartments, request.get({ url: url }).then((data) => { + if (revision === optionsRevision) parseOptions(data) + })]) + break + case 'POST': + // 固定请求体与参数模板合并;请求体不是 JSON 对象时仅使用参数模板 + const body = jsonParse(props.data) + const data: any = { + ...(body && typeof body === 'object' && !Array.isArray(body) ? body : {}), + ...templateParams + } + if (props.remote) { + data[props.remoteField] = queryParam.value + } + await Promise.all([updateDepartments, request.post({ url: props.url, data: data }).then((result) => { + if (revision === optionsRevision) parseOptions(result) + })]) + break + } + } finally { + // 旧请求结束不能覆盖新一轮关联查询的加载状态。 + if (revision === optionsRevision) loading.value = false + } + } + + function parseOptions(data: any) { + // 情况一:如果有自定义解析函数优先使用自定义解析 + if (!isEmpty(props.parseFunc)) { + const parsed = parseFunc()?.(data) + if (option.name === 'UserSelect') { + // 自定义解析保留自己的取值;仅能按原用户编号匹配时补回组织元数据。 + const originalUsers = new Map((Array.isArray(data) ? data : data?.list ?? []) + .map((user: any) => [String(user.id), user])) + parseOptions0(Array.isArray(parsed) ? parsed.map((item) => { + const original = originalUsers.get(String(item.value)) + return { ...original, ...item, disabled: !!original?.disabled || !!item.disabled } + }) : parsed, true) + } else options.value = parsed + return + } + // 情况二:返回的直接是一个列表 + if (Array.isArray(data)) { + parseOptions0(data) + return + } + // 情况二:返回的是分页数据,尝试读取 list + data = data.list + if (!!data && Array.isArray(data)) { + parseOptions0(data) + return + } + // 情况三:不是标准返回格式 + console.warn( + `接口[${props.url}] 返回结果不是标准格式,建议采用自定义解析函数处理` + ) + } + + function parseOptions0(data: any[], parsed = false) { + if (Array.isArray(data)) { + options.value = data.map((item: any) => { + const label = parsed ? item.label : parseExpression(item, props.labelField) + let value = parsed ? item.value : parseExpression(item, props.valueField) + + // 根据 returnType 决定返回值 + // 如果设置了 returnType 为 'name',则返回 label 作为 value + if (props.returnType === 'name') { + value = label + } + + return { + // 保留用户的部门、账号及任职标记,取值和禁选仍由原接口结果决定。 + ...(option.name === 'UserSelect' ? item : {}), + label: label, + value: value, + disabled: !!item.disabled + } + }) + // 历史名称值或已删除项保留原值展示,不允许作为新的可选项。 + if (processScope) { + const saved = Array.isArray(attrs.modelValue) ? attrs.modelValue : [attrs.modelValue] + saved.filter((value) => value != null && value !== '').forEach((value) => { + if (!options.value.some((item) => String(item.value) === String(value))) { + options.value.push({ label: String(value), value, disabled: true }) + } + }) + } + return + } + console.warn(`接口[${props.url}] 返回结果不是一个数组`) + } + + function parseFunc() { + if (typeof props.parseFunc === 'function') return props.parseFunc + let parse: any = null + if (!!props.parseFunc) { + // 解析字符串函数 + parse = new Function(`return ${props.parseFunc}`)() + } + return parse + } + + function parseExpression(data: any, template: string) { + // 检测是否使用了表达式 + if (template.indexOf('${') === -1) { + return data[template] + } + // 正则表达式匹配模板字符串中的 ${...} + const pattern = /\$\{([^}]*)}/g + // 使用replace函数配合正则表达式和回调函数来进行替换 + return template.replace(pattern, (_, expr) => { + // expr 是匹配到的 ${} 内的表达式(这里是属性名),从 data 中获取对应的值 + const result = data[expr.trim()] // 去除前后空白,以防用户输入带空格的属性名 + if (!result) { + console.warn( + `接口选择器选项模版[${template}][${expr.trim()}] 解析值失败结果为[${result}], 请检查属性名称是否存在于接口返回值中,存在则忽略此条!!!` + ) + } + return result + }) + } + + const remoteMethod = async (query: any) => { + queryParam.value = query + await getOptions() + } + + onMounted(async () => { + await getOptions() + }) + + watch([() => optionsScope?.key.value, () => props.ignoreProcessScope], () => { + void getOptions().catch(() => { /* 请求层统一提示,失败时不退回全量。 */ }) + }) + + let dependencyChangedByUser = false + // 历史回填和程序默认值只刷新选项,主动改选关联字段时才清理旧人员。 + watch(() => props.formCreateInject?.api, (api, _previous, onCleanup) => { + if (!optionsScope || !api) return + const onChange = (field: string, _value: unknown, info: any) => { + if (info?.setFlag || !info?.rule || !dependFields.value.includes(field)) return + const row = api.getParentSubRule(props.formCreateInject?.rule) + if (api.getParentSubRule(info.rule) === row) dependencyChangedByUser = true + } + api.on('change', onChange) + onCleanup(() => api.off('change', onChange)) + }, { immediate: true }) + + // 依赖字段的值实际变化时(按内容比较,详情页重复赋值相同内容不会触发):清空当前值并重新加载选项 + watch( + () => JSON.stringify(dependFields.value.map((field) => getFieldValue(field) ?? null)), + async (value, oldValue) => { + if (value === oldValue) { + return + } + const { api, field } = props.formCreateInject || {} + if (api && field && (!optionsScope || dependencyChangedByUser) && !isEmpty(getFieldValue(field))) { + const row = props.formCreateInject?.rule && api.getParentSubRule(props.formCreateInject.rule) + if (row) api.setChildrenFormData(row, { [field]: selectionMultiple.value ? [] : undefined }, false) + else api.setValue(field, selectionMultiple.value ? [] : undefined) + } + dependencyChangedByUser = false + await getOptions() + } + ) + + const buildSelect = () => { + if (option.name === 'UserSelect') { + return ( + + ) + } + if (props.multiple) { + // fix:多写此步是为了解决 multiple 属性问题 + return ( + + {options.value.map((item, index) => ( + + ))} + + ) + } + return ( + + {options.value.map((item, index) => ( + + ))} + + ) + } + const buildCheckbox = () => { + // 只展示接口返回的真实选项,加载失败或为空时不生成示例数据。 + return ( + + {options.value.map((item, index) => ( + + ))} + + ) + } + const buildRadio = () => { + // 单选与多选保持一致,空列表不提供可提交的示例值。 + return ( + + {options.value.map((item, index) => ( + + {item.label} + + ))} + + ) + } + return () => ( + <> + {option.name === 'UserSelect' || props.selectType === 'select' + ? buildSelect() + : props.selectType === 'radio' + ? buildRadio() + : props.selectType === 'checkbox' + ? buildCheckbox() + : buildSelect()} + + ) + } + }) +} diff --git a/src/components/FormCreate/src/config/assetCardFill.ts b/src/components/FormCreate/src/config/assetCardFill.ts new file mode 100644 index 0000000..b9dd469 --- /dev/null +++ b/src/components/FormCreate/src/config/assetCardFill.ts @@ -0,0 +1,37 @@ +/** 资产选择保存的值:查看时直接显示编号与名称,入库时取 id。 */ +export interface AssetCardValue { + id: number + assetNo?: string + assetName?: string +} + +/** + * 资产选择可带出的资产信息:key 为资产选项接口字段,prop 为组件上配置目标字段的属性名; + * dictType 不为空时,目标是字典选择则带出字典值,否则带出字典名称;kingdee 为 true 时 key 是金蝶卡片接口字段,选中后另行查询金蝶。 + */ +export const ASSET_CARD_FILL_SOURCES: { key: string; prop: string; label: string; dictType?: string; kingdee?: boolean }[] = [ + { key: 'assetNo', prop: 'fillAssetNo', label: '资产编号' }, + { key: 'assetName', prop: 'fillAssetName', label: '资产名称' }, + { key: 'assetType', prop: 'fillAssetType', label: '资产类型', dictType: 'asset_type' }, + { key: 'categoryCode', prop: 'fillCategoryCode', label: '资产分类', dictType: 'asset_category' }, + { key: 'spec', prop: 'fillSpec', label: '规格型号' }, + { key: 'unitCode', prop: 'fillUnitCode', label: '计量单位', dictType: 'asset_unit' }, + { key: 'originalValue', prop: 'fillOriginalValue', label: '原始价值' }, + { key: 'acquireDate', prop: 'fillAcquireDate', label: '取得日期' }, + { key: 'warrantyEnd', prop: 'fillWarrantyEnd', label: '维保到期' }, + { key: 'status', prop: 'fillStatus', label: '资产状态', dictType: 'asset_status' }, + { key: 'useDeptName', prop: 'fillUseDeptName', label: '使用部门' }, + { key: 'useUserName', prop: 'fillUseUserName', label: '使用人' }, + { key: 'location', prop: 'fillLocation', label: '存放地点' }, + { key: 'originalVal', prop: 'fillKingdeeOriginalValue', label: '金蝶原值', kingdee: true }, + { key: 'netWorth', prop: 'fillKingdeeNetWorth', label: '金蝶净值', kingdee: true } +] + +/** 可选资产范围:按单据类型限定资产状态(闲置 901、在用 902、维修中 904)。 */ +export const ASSET_CARD_STATUS_SCOPES: { label: string; value: string }[] = [ + { label: '未报废的全部资产', value: '' }, + { label: '仅闲置(领用)', value: '901' }, + { label: '闲置或在用(移交、维修)', value: '901,902' }, + { label: '仅维修中(维修完工)', value: '904' }, + { label: '闲置、在用或维修中(报废)', value: '901,902,904' } +] diff --git a/src/components/FormCreate/src/config/commonProps.ts b/src/components/FormCreate/src/config/commonProps.ts new file mode 100644 index 0000000..739f53a --- /dev/null +++ b/src/components/FormCreate/src/config/commonProps.ts @@ -0,0 +1,64 @@ +import { watch } from 'vue' +import zhCn from '@form-create/designer/locale/zh-cn.es.js' + +/** 管理台表单设计器使用的分组名称,保留依赖包的其他中文文案。 */ +export const commonPropsLocale = { + ...zhCn, + designer: { ...zhCn.designer, props: '常用配置' } +} + +/** 常用项按填写频率前置;父配置包含的条件联动规则整体保留,不拆分子项。 */ +const commonFields = [ + 'formCreateTableColumn', 'formCreate$required', 'formCreateValue', 'formCreateWrap>labelPosition', 'defaultCurrentTime', 'skipDefaultWhenDisabled', 'defaultCurrentUser', 'defaultCurrentOrganization', + 'calculationType', 'numberingType', 'queryScope', 'allowedDeptIds', 'parentField', 'userField', 'deptField', 'sourceField', + 'selectType', 'type', 'dictType', '_optionType', 'formCreateOptions', 'options', + 'placeholder', 'filterable', 'clearable', 'multiple', 'disabled', 'readonly', 'format', 'valueFormat', + 'returnType', 'pathMode', 'leafOnly', 'initialRows', 'labelWidth', 'titleBold', 'labelBold', 'scrollX', 'columnMinWidth', + 'indexFixed', 'operationFixed', 'fixed', 'min', 'max', 'step', 'precision', + 'maxlength', 'minlength', 'showWordLimit', 'rows', 'accept', 'fileType', 'fileSize', 'limit' +] +const fieldOrder = new Map(commonFields.map((field, index) => [field, index])) +/** 无字段的面板分隔符,仅防止重复分组,不进入业务表单规则或提交数据。 */ +const remainingGroupName = '__commonPropsRemaining' + +/** + * 字段名加粗配置,保存在单个字段的外层表单项上,画布与填报使用同一属性。 + * 设计器的 setBaseRuleConfig 只保留最后一次设置且要求传函数,由 useFormCreateDesigner 统一合并设置。 + */ +export const labelBoldBaseRule = () => ({ + type: 'select', + field: 'formCreateWrap>labelBold', + title: '字段名是否加粗', + value: '', + info: '普通字段默认不加粗;列表、子表单的组件标题和内部字段名按各自开关展示,可在此单独覆盖。', + options: [ + { label: '跟随组件默认', value: '' }, + { label: '加粗', value: true }, + { label: '不加粗', value: false } + ] +}) + +/** 对设计器最终生成的属性规则分组,兼容业务组件、默认值和明细列的追加配置。 */ +export const configureCommonProps = (designer: any) => { + watch(() => designer.propsForm.rule, (rules: Record[]) => { + if (!Array.isArray(rules) || rules.some((rule) => rule?.name === remainingGroupName)) return + const common: Record[] = [] + const remaining: Record[] = [] + rules.forEach((rule) => { + // 业务关联字段(如起止日期字段)同样属于常用配置。 + const field = String(rule?.field || '') + ;(fieldOrder.has(field) || field.endsWith('Field') ? common : remaining).push(rule) + }) + if (!common.length) return + common.sort((left, right) => (fieldOrder.get(left.field) ?? commonFields.length) + - (fieldOrder.get(right.field) ?? commonFields.length)) + // 原规则对象及其 update/control 均保留,避免复制属性带来重复字段或联动失效。 + const grouped = remaining.length ? [ + ...common, + { type: 'elDivider', name: remainingGroupName, wrap: { show: false }, children: ['属性配置'] }, + ...remaining + ] : common + if (grouped.length === rules.length && grouped.every((rule, index) => rule === rules[index])) return + designer.propsForm.rule = grouped + }, { immediate: true, flush: 'sync' }) +} diff --git a/src/components/FormCreate/src/config/detailTable.ts b/src/components/FormCreate/src/config/detailTable.ts new file mode 100644 index 0000000..fe1c50b --- /dev/null +++ b/src/components/FormCreate/src/config/detailTable.ts @@ -0,0 +1,131 @@ +import { FORM_TABLE_ROW } from './useFormTableRule' + +/** 固定位置选项同时用于明细列、序号列与操作列。 */ +const fixedOptions = [ + { label: '不固定', value: '' }, + { label: '固定左侧', value: 'left' }, + { label: '固定右侧', value: 'right' } +] + +/** 组件面板直接修改外层字段名位置,与设计器通用配置及运行端共用同一属性。 */ +const titlePositionRule = () => ({ + type: 'select', + field: 'formCreateWrap>labelPosition', + title: '字段名位置', + value: 'top', + info: '只控制当前子表单或表格表单的标题,不影响内部字段。', + options: [ + { label: '顶部', value: 'top' }, + { label: '左侧', value: 'left' } + ] +}) + +/** 补充原设计器配置及列规则转换,不改动依赖包或表单数据结构。 */ +export const configureDetailTable = (designer: any) => { + const originalColumn = designer.dragRuleList.tableFormColumn + designer.addComponent({ + ...originalColumn, + menu: undefined, + children: FORM_TABLE_ROW, + /** 新建列自带表格行和输入框,列仍负责原生表头与取值结构。 */ + rule(...args: any[]) { + const rule = originalColumn.rule(...args) + rule.children = [designer.makeRule({ + ...designer.dragRuleList[FORM_TABLE_ROW], children: 'input' + })] + return rule + } + }) + const original = designer.dragRuleList.tableForm + designer.addComponent({ + ...original, + // 原菜单项已经存在,仅替换描述规则,避免出现重复入口。 + menu: undefined, + /** 新建列表默认显示序号,旧表单中明确关闭的配置继续保留。 */ + rule(...args: any[]) { + const rule = original.rule(...args) + rule.props = { ...rule.props, showIndex: true, titleBold: true, labelBold: false } + // 沿用公共“字段名位置”配置,新建列表默认将标题放在顶部。 + rule.wrap = { ...rule.wrap, labelPosition: 'top' } + return rule + }, + /** 使用原生序号开关,只统一名称和说明,避免重复生成配置项。 */ + props(...args: any[]) { + return original.props(...args).map((config: any) => + config.field === 'showIndex' + ? { ...config, title: '显示序号', value: true, info: '默认显示序号,关闭后隐藏序号列。' } + : config + ) + }, + loadRule(rule: any) { + const fixed = (rule.props?.columns || []).map((column: any) => column.fixed || '') + const labelBold = (rule.props?.columns || []).map((column: any) => column.labelBold ?? '') + original.loadRule(rule) + rule.children.forEach((column: any, index: number) => { + column.props.fixed = fixed[index] + column.props.labelBold = labelBold[index] + }) + }, + parseRule(rule: any) { + const fixed = (rule.children || []).map((column: any) => column.props?.fixed || '') + const labelBold = (rule.children || []).map((column: any) => column.props?.labelBold ?? '') + original.parseRule(rule) + rule.props.columns.forEach((column: any, index: number) => { + column.fixed = fixed[index] + column.labelBold = labelBold[index] + }) + } + }) + designer.setComponentRuleConfig('tableForm', () => [ + titlePositionRule(), + { + type: 'inputNumber', field: 'initialRows', title: '默认行数', value: 1, + info: '新建或预览时生成的明细行数,0 表示空列表;已有预设明细或回填数据时保留原有行数。', + props: { min: 0, step: 1, precision: 0 } + }, + { + type: 'switch', field: 'titleBold', title: '组件标题是否加粗', value: true, + info: '只控制上方的列表标题,默认加粗。' + }, + { + type: 'switch', field: 'labelBold', title: '内部字段名是否加粗', value: false, + info: '统一控制列表列名,默认不加粗;各列可单独覆盖。' + }, + { type: 'switch', field: 'scrollX', title: '超宽横向滚动', value: true }, + { + type: 'inputNumber', field: 'columnMinWidth', title: '默认列宽(px)', value: 140, + info: '未单独配置宽度的列使用此值,超出容器后横向滚动。', props: { min: 60, step: 10 } + }, + { type: 'select', field: 'indexFixed', title: '序号列固定位置', value: 'left', options: fixedOptions }, + { type: 'select', field: 'operationFixed', title: '操作列固定位置', value: 'right', options: fixedOptions } + ], true) + designer.setComponentRuleConfig('tableFormColumn', () => [ + { + type: 'select', field: 'labelBold', title: '字段名是否加粗', value: '', + options: [ + { label: '跟随列表', value: '' }, + { label: '加粗', value: true }, + { label: '不加粗', value: false } + ] + }, + { type: 'select', field: 'fixed', title: '固定位置', value: '', options: fixedOptions } + ], true) + // 只为新拖入的子表单生成可拖动的默认结构,不向已保存的表单补插字段。 + const group = designer.dragRuleList.group + designer.addComponent({ + ...group, + menu: undefined, + children: FORM_TABLE_ROW, + rule(...args: any[]) { + const rule = group.rule(...args) + rule.props = { ...rule.props, expand: 1 } + // 只设置本组件标题,内部字段仍沿用各自的字段名位置。 + rule.wrap = { ...rule.wrap, labelPosition: 'top' } + rule.children = [designer.makeRule({ + ...designer.dragRuleList[FORM_TABLE_ROW], children: 'input' + })] + return rule + } + }) + designer.setComponentRuleConfig('group', () => [titlePositionRule()], true) +} diff --git a/src/components/FormCreate/src/config/fieldDefaults.ts b/src/components/FormCreate/src/config/fieldDefaults.ts new file mode 100644 index 0000000..28affd2 --- /dev/null +++ b/src/components/FormCreate/src/config/fieldDefaults.ts @@ -0,0 +1,104 @@ +import { applyDynamicDefaults, setupFieldDefaults } from '../utils/fieldDefaults' +import { watch } from 'vue' + +/** 默认值为显式开关,已有表单未开启时保持原有取值行为。 */ +export const configureFieldDefaults = (designer: any) => { + // 设计器的画布通过 factory() 创建独立实例,不共享预览、填报端的解析器。 + // 从画布根规则的已加载上下文取得实际实例,避免另行创建一个不起作用的副本。 + const canvasForm = designer.dragForm.api.rule[0]?.__fc__?.$handle?.fc?.create + if (canvasForm) { + setupFieldDefaults(canvasForm) + designer.dragForm.api.refresh() + } + // 仅为新拖入的标题设置居中,不覆盖已保存表单的对齐配置。 + const title = designer.dragRuleList.fcTitle + designer.addComponent({ + ...title, + menu: undefined, + rule(...args: any[]) { + const rule = title.rule(...args) + rule.props = { ...rule.props, align: 'center' } + return rule + } + }) + // 原生下拉、级联和树选择在新建规则时也开启搜索,使属性面板与画布行为一致。 + ;['select', 'cascader', 'treeSelect'].forEach((name) => { + const original = designer.dragRuleList[name] + if (!original) return + designer.addComponent({ + ...original, + menu: undefined, + rule(...args: any[]) { + // 透传设计器上下文,原生规则依赖其中的翻译函数生成标题和选项。 + const rule = original.rule(...args) + rule.props = { ...rule.props, filterable: true } + return rule + } + }) + }) + // 输入框仍使用原生组件,宽度和整体对齐由统一解析器处理,兼容单行及多行类型。 + ;['input', 'textarea', 'password'].forEach((name) => { + if (!designer.dragRuleList[name]) return + designer.setComponentRuleConfig(name, () => [ + { + // formCreate 前缀让设计器读写字段自身的 value,沿用引擎的默认值与回填行为。 + type: 'input', field: 'formCreateValue', title: '默认值', + info: '新建填报时默认带出的内容,填写人可修改。', + props: { + type: name === 'input' ? 'text' : name, + clearable: true, placeholder: '请输入默认值' + } + }, + { + type: 'input', field: 'width', title: '输入框宽度', + info: '支持像素或百分比,留空沿用原宽度,最大不超出所在区域。', + props: { placeholder: '例如:240px、60%' } + }, + { + type: 'select', field: 'align', title: '对齐方式', value: 'left', + info: '控制输入框整体在字段内容区域内的位置。', + options: [ + { label: '左对齐', value: 'left' }, + { label: '居中', value: 'center' }, + { label: '右对齐', value: 'right' } + ] + } + ], true) + }) + ;['datePicker', 'dateRange'].forEach((name) => { + designer.setComponentRuleConfig(name, () => [ + { + type: 'switch', field: 'defaultCurrentTime', title: '默认当前时间', + info: '首次填报时取当前系统时间,日期类型仅显示日期;已有值不覆盖。' + }, + { + type: 'switch', field: 'skipDefaultWhenDisabled', title: '禁用时不初始化', value: false, + info: '配合默认当前时间使用:禁用、只读或隐藏时不初始化,进入可编辑节点且为空时才带出当前日期。' + } + ], true) + }) + designer.setComponentRuleConfig('UserSelect', () => [{ + type: 'switch', field: 'defaultCurrentUser', title: '默认当前用户', + info: '首次填报时默认选择当前登录用户,多选时作为第一个选中项。' + }], true) + designer.setComponentRuleConfig('group', () => [ + { + type: 'inputNumber', field: 'labelWidth', title: '字段名宽度(px)', value: 90, + info: '统一设置当前子表单内的字段名宽度,不影响外层表格或其他子表单。', + props: { min: 40, step: 10, precision: 0 } + }, + { + type: 'switch', field: 'titleBold', title: '组件标题是否加粗', value: true, + info: '只控制上方的子表单标题,默认加粗。' + }, + { + type: 'switch', field: 'labelBold', title: '内部字段名是否加粗', value: false, + info: '统一控制组内字段名,默认不加粗;各字段可在基础配置中单独覆盖。' + } + ], true) + + // 预览规则是设计器生成的副本,动态值只写入副本,不把当前日期或用户固化到设计稿。 + watch(() => designer.preview.rule, (rules) => { + if (designer.preview.state) applyDynamicDefaults(rules, designer.preview.option?.formData) + }) +} diff --git a/src/components/FormCreate/src/config/index.ts b/src/components/FormCreate/src/config/index.ts new file mode 100644 index 0000000..d87d0d6 --- /dev/null +++ b/src/components/FormCreate/src/config/index.ts @@ -0,0 +1,44 @@ +import { useUploadFileRule } from './useUploadFileRule' +import { useUploadImgRule } from './useUploadImgRule' +import { useUploadImgsRule } from './useUploadImgsRule' +import { useDictSelectRule } from './useDictSelectRule' +import { useEditorRule } from './useEditorRule' +import { useSelectRule } from './useSelectRule' +import { useDeptSelectRule } from './useDeptSelectRule' +import { useRoleSelectRule } from './useRoleSelectRule' +import { usePostSelectRule } from './usePostSelectRule' +import { useProcessInstanceSelectRule } from './useProcessInstanceSelectRule' +import { useLeaveDaysRule } from './useLeaveDaysRule' +import { useTimeCalculationRule } from './useTimeCalculationRule' +import { useUppercaseAmountRule } from './useUppercaseAmountRule' +import { useAmountCalculationRule } from './useAmountCalculationRule' +import { useNumberingRule } from './useNumberingRule' +import { useItsmProjectSelectRule } from './useItsmProjectSelectRule' +import { useAssetCardSelectRule } from './useAssetCardSelectRule' +import { useItsmResourceSelectRule } from './useItsmResourceSelectRule' +import { useItsmProjectMemberSelectRule } from './useItsmProjectMemberSelectRule' +import { useFormTableRule, useFormTableRowRule } from './useFormTableRule' + +export { + useUploadFileRule, + useUploadImgRule, + useUploadImgsRule, + useDictSelectRule, + useEditorRule, + useSelectRule, + useDeptSelectRule, + useRoleSelectRule, + usePostSelectRule, + useProcessInstanceSelectRule, + useLeaveDaysRule, + useTimeCalculationRule, + useUppercaseAmountRule, + useAmountCalculationRule, + useNumberingRule, + useItsmProjectSelectRule, + useAssetCardSelectRule, + useItsmResourceSelectRule, + useItsmProjectMemberSelectRule, + useFormTableRule, + useFormTableRowRule +} diff --git a/src/components/FormCreate/src/config/itsmProjectFill.ts b/src/components/FormCreate/src/config/itsmProjectFill.ts new file mode 100644 index 0000000..b740fe9 --- /dev/null +++ b/src/components/FormCreate/src/config/itsmProjectFill.ts @@ -0,0 +1,31 @@ +/** ITSM 项目选择保存的值:查看时直接显示名称,入库时取 id。 */ +export interface ItsmProjectValue { + id: number + code?: string + name?: string +} + +/** 项目选择可带出的项目台账信息:key 为项目上下文接口字段,prop 为组件上配置目标字段的属性名。 */ +export const ITSM_PROJECT_FILL_SOURCES: { key: string; prop: string; label: string }[] = [ + { key: 'code', prop: 'fillCode', label: '项目编号' }, + { key: 'phase', prop: 'fillPhase', label: '项目阶段' }, + { key: 'applyDeptName', prop: 'fillApplyDeptName', label: '申请部门' }, + { key: 'constructionUnitName', prop: 'fillConstructionUnitName', label: '建设单位' }, + { key: 'contractorUnitName', prop: 'fillContractorUnitName', label: '承建单位' }, + { key: 'constructionManagerUserId', prop: 'fillConstructionManagerUserId', label: '甲方项目经理账号' }, + { key: 'constructionBusinessManagerUserId', prop: 'fillConstructionBusinessManagerUserId', label: '甲方业务项目经理账号' }, + { key: 'constructionBusinessManagerName', prop: 'fillConstructionBusinessManagerName', label: '甲方业务项目经理姓名' }, + { key: 'constructionBusinessManagerPhone', prop: 'fillConstructionBusinessManagerPhone', label: '甲方业务项目经理电话' }, + { key: 'constructionTechnicalManagerUserId', prop: 'fillConstructionTechnicalManagerUserId', label: '甲方技术项目经理账号' }, + { key: 'constructionTechnicalManagerName', prop: 'fillConstructionTechnicalManagerName', label: '甲方技术项目经理姓名' }, + { key: 'constructionTechnicalManagerPhone', prop: 'fillConstructionTechnicalManagerPhone', label: '甲方技术项目经理电话' }, + { key: 'contractorManagerUserId', prop: 'fillContractorManagerUserId', label: '乙方项目经理账号' }, + { key: 'constructionManagerName', prop: 'fillConstructionManagerName', label: '甲方项目经理' }, + { key: 'constructionManagerPhone', prop: 'fillConstructionManagerPhone', label: '甲方联系方式' }, + { key: 'contractorManagerName', prop: 'fillContractorManagerName', label: '乙方项目经理' }, + { key: 'contractorManagerPhone', prop: 'fillContractorManagerPhone', label: '乙方联系方式' }, + { key: 'budget', prop: 'fillBudget', label: '项目预算' }, + { key: 'contractAmount', prop: 'fillContractAmount', label: '合同金额' }, + { key: 'paidAmount', prop: 'fillPaidAmount', label: '已支付金额' }, + { key: 'contractToPay', prop: 'fillContractToPay', label: '合同待支付' } +] diff --git a/src/components/FormCreate/src/config/selectParams.ts b/src/components/FormCreate/src/config/selectParams.ts new file mode 100644 index 0000000..eede065 --- /dev/null +++ b/src/components/FormCreate/src/config/selectParams.ts @@ -0,0 +1,141 @@ +import { useUserStoreWithOut } from '@/store/modules/user' + +/** + * 下拉组件的查询参数声明与取值来源。 + * + * 平台内置的下拉组件(如用户选择器)接口固定、支持的查询参数也固定, + * 因此由组件声明参数名,设计器面板只让使用者选择“值从哪来”,避免手写参数名出错。 + */ + +/** 组件声明的查询参数 */ +export interface SelectParamDef { + name: string // 接口参数名 + label: string // 面板显示名称 + info?: string // 面板提示 +} + +/** 参数值来源 */ +export const PARAM_SOURCE = { + NONE: 'none', // 不设置 + FIELD: 'field', // 表单字段 + CONST: 'const', // 固定值 + USER: 'user' // 当前用户 +} as const + +/** 用户选择器支持的查询参数,对应后端 GET /system/user/simple-list */ +export const USER_SELECT_PARAMS: SelectParamDef[] = [ + { name: 'deptId', label: '按部门过滤', info: '只显示该部门及其子部门的在职人员' } +] + +/** “当前用户”可引用的属性 */ +export const USER_VARIABLE_OPTIONS = [ + { label: '当前用户的部门', value: 'deptId' }, + { label: '当前用户编号', value: 'id' } +] + +/** 参数配置在组件属性中的键名,如 deptIdSource、deptIdField */ +export const paramPropKey = (name: string, suffix: 'Source' | 'Field' | 'Const' | 'User') => + `${name}${suffix}` + +/** 为声明的参数生成组件属性定义,避免这些配置落入 attrs 透传给下拉框 */ +export const buildParamPropDefs = (defs: SelectParamDef[] = []) => { + const propDefs: Record = {} + defs.forEach(({ name }) => { + propDefs[paramPropKey(name, 'Source')] = { type: String, default: PARAM_SOURCE.NONE } + propDefs[paramPropKey(name, 'Field')] = { type: String, default: '' } + propDefs[paramPropKey(name, 'Const')] = { type: String, default: '' } + propDefs[paramPropKey(name, 'User')] = { type: String, default: '' } + }) + return propDefs +} + +/** + * 把声明参数的配置转换为参数模板:表单字段 → ${form.字段ID},当前用户 → ${user.属性},固定值原样保留。 + * 未设置或未填写的参数不出现在模板中。 + */ +export const buildDeclaredParamsTemplate = ( + defs: SelectParamDef[] = [], + props: Record +) => { + const template: Record = {} + defs.forEach(({ name }) => { + const source = props[paramPropKey(name, 'Source')] + const field = props[paramPropKey(name, 'Field')] + const constant = props[paramPropKey(name, 'Const')] + const user = props[paramPropKey(name, 'User')] + if (source === PARAM_SOURCE.FIELD && field) { + template[name] = `\${form.${field}}` + } else if (source === PARAM_SOURCE.CONST && constant !== '') { + template[name] = constant + } else if (source === PARAM_SOURCE.USER && user) { + template[name] = `\${user.${user}}` + } + }) + return template +} + +/** 读取当前登录用户的属性,供 ${user.属性} 使用 */ +export const getCurrentUserValue = (key: string) => { + const user = useUserStoreWithOut().getUser as Record + return user?.[key] +} + +/** + * 生成设计器属性面板中声明参数的配置规则:先选值来源,再按来源填写具体值。 + * + * @param defs 组件声明的参数 + * @param fieldOptions 本表单可引用的字段(选中组件时实时读取) + */ +export const buildParamConfigRules = ( + defs: SelectParamDef[], + fieldOptions: { label: string; value: string }[] +) => + defs.map((def) => ({ + type: 'select', + field: paramPropKey(def.name, 'Source'), + title: def.label, + info: `${def.info ? def.info + '。' : ''}值来源:表单字段(该字段变化时自动清空当前值并重新加载)、固定值、当前用户;不设置则不过滤`, + value: PARAM_SOURCE.NONE, + options: [ + { label: '不设置', value: PARAM_SOURCE.NONE }, + { label: '表单字段', value: PARAM_SOURCE.FIELD }, + { label: '固定值', value: PARAM_SOURCE.CONST }, + { label: '当前用户', value: PARAM_SOURCE.USER } + ], + control: [ + { + value: PARAM_SOURCE.FIELD, + rule: [ + { + type: 'select', + field: paramPropKey(def.name, 'Field'), + title: '引用的表单字段', + options: fieldOptions, + props: { filterable: true, placeholder: '选择本表单的字段' } + } + ] + }, + { + value: PARAM_SOURCE.CONST, + rule: [ + { + type: 'input', + field: paramPropKey(def.name, 'Const'), + title: '固定值', + props: { placeholder: '如部门编号 156' } + } + ] + }, + { + value: PARAM_SOURCE.USER, + rule: [ + { + type: 'select', + field: paramPropKey(def.name, 'User'), + title: '当前用户属性', + options: USER_VARIABLE_OPTIONS + } + ] + } + ] + })) diff --git a/src/components/FormCreate/src/config/selectRule.ts b/src/components/FormCreate/src/config/selectRule.ts new file mode 100644 index 0000000..a9e7535 --- /dev/null +++ b/src/components/FormCreate/src/config/selectRule.ts @@ -0,0 +1,206 @@ +const selectRule = [ + { + type: 'select', + field: 'selectType', + title: '选择器类型', + value: 'select', + options: [ + { label: '下拉框', value: 'select' }, + { label: '单选框', value: 'radio' }, + { label: '多选框', value: 'checkbox' } + ], + // 参考 https://www.form-create.com/v3/guide/control 组件联动,单选框和多选框不需要多选属性 + control: [ + { + value: 'select', + condition: '==', + method: 'hidden', + rule: [ + 'multiple', + 'clearable', + 'collapseTags', + 'multipleLimit', + 'allowCreate', + 'filterable', + 'noMatchText', + 'remote', + 'remoteMethod', + 'reserveKeyword', + 'defaultFirstOption', + 'automaticDropdown' + ] + } + ] + }, + { + type: 'switch', + field: 'filterable', + title: '是否可搜索', + value: true + }, + { type: 'switch', field: 'multiple', title: '是否多选' }, + { + type: 'switch', + field: 'disabled', + title: '是否禁用' + }, + { type: 'switch', field: 'clearable', title: '是否可以清空选项' }, + { + type: 'switch', + field: 'collapseTags', + title: '多选时是否将选中值按文字的形式展示' + }, + { + type: 'inputNumber', + field: 'multipleLimit', + title: '多选时用户最多可以选择的项目数,为 0 则不限制', + props: { min: 0 } + }, + { + type: 'input', + field: 'autocomplete', + title: 'autocomplete 属性' + }, + { type: 'input', field: 'placeholder', title: '占位符' }, + { type: 'switch', field: 'allowCreate', title: '是否允许用户创建新条目' }, + { + type: 'input', + field: 'noMatchText', + title: '搜索条件无匹配时显示的文字' + }, + { type: 'input', field: 'noDataText', title: '选项为空时显示的文字' }, + { + type: 'switch', + field: 'reserveKeyword', + title: '多选且可搜索时,是否在选中一个选项后保留当前的搜索关键词' + }, + { + type: 'switch', + field: 'defaultFirstOption', + title: '在输入框按下回车,选择第一个匹配项' + }, + { + type: 'switch', + field: 'popperAppendToBody', + title: '是否将弹出框插入至 body 元素', + value: true + }, + { + type: 'switch', + field: 'automaticDropdown', + title: '对于不可搜索的 Select,是否在输入框获得焦点后自动弹出选项菜单' + } +] + +const apiSelectRule = [ + { + type: 'input', + field: 'url', + title: 'url 地址', + props: { + placeholder: '/system/user/simple-list' + } + }, + { + type: 'select', + field: 'method', + title: '请求类型', + value: 'GET', + options: [ + { label: 'GET', value: 'GET' }, + { label: 'POST', value: 'POST' } + ], + control: [ + { + value: 'GET', + condition: '!=', + method: 'hidden', + rule: [ + { + type: 'input', + field: 'data', + title: '请求参数 JSON 格式', + props: { + autosize: true, + type: 'textarea', + placeholder: '{"type": 1}' + } + } + ] + } + ] + }, + { + type: 'input', + field: 'labelField', + title: 'label 属性', + info: '可以使用 el 表达式:${属性},来实现复杂数据组合。如:${nickname}-${id}', + props: { + placeholder: 'nickname' + } + }, + { + type: 'input', + field: 'valueField', + title: 'value 属性', + info: '可以使用 el 表达式:${属性},来实现复杂数据组合。如:${nickname}-${id}', + props: { + placeholder: 'id' + } + }, + { + type: 'input', + field: 'parseFunc', + title: '选项解析函数', + info: `data 为接口返回值,需要写一个匿名函数解析返回值为选择器 options 列表 + (data: any)=>{ label: string; value: any }[]`, + props: { + autosize: true, + rows: { minRows: 2, maxRows: 6 }, + type: 'textarea', + placeholder: ` + function (data) { + return data.list.map(item=> ({label: item.nickname,value: item.id})) + }` + } + }, + { + type: 'switch', + field: 'remote', + info: '是否可搜索', + title: '其中的选项是否从服务器远程加载' + }, + { + type: 'input', + field: 'remoteField', + title: '请求参数', + info: '远程请求时请求携带的参数名称,如:name' + } +] + +/** + * 自定义请求参数模板:用于地址由使用者配置的接口选择器,参数名只能由使用者填写。 + * 内置下拉组件(如用户选择器)的参数由组件声明,见 config/selectParams.ts。 + */ +const customParamsRule = { + type: 'input', + field: 'params', + title: '请求参数模板', + info: 'JSON 格式,左边是接口参数名,右边是取值。表单字段:${form.字段ID}(字段 ID 见被引用组件的“基础配置”,该字段变化时自动清空当前值并重新加载);固定值:直接填写,如 1;当前用户:${user.deptId} 或 ${user.id}。示例:{"deptId": "${form.部门字段ID}", "status": 0}', + props: { + autosize: true, + type: 'textarea', + placeholder: '不需要参数时留空,如 {"参数名": "${form.字段ID}"}' + } +} + +/** 引用的表单字段为空时是否跳过加载 */ +const requireParamsRule = { + type: 'switch', + field: 'requireParams', + title: '引用字段为空时不加载选项', + info: '开启后,引用的表单字段还没有值时不发请求、下拉保持为空,避免一次加载全部数据', + value: true +} + +export { selectRule, apiSelectRule, customParamsRule, requireParamsRule } diff --git a/src/components/FormCreate/src/config/tableColumn.ts b/src/components/FormCreate/src/config/tableColumn.ts new file mode 100644 index 0000000..4209a32 --- /dev/null +++ b/src/components/FormCreate/src/config/tableColumn.ts @@ -0,0 +1,108 @@ +import { reactive, watch } from 'vue' +import type { FormTableColumn } from '@/api/bpm/formData' + +/** 属性面板中“对应字段”配置的字段名,设计器按 formCreate 前缀写入规则的 tableColumn。 */ +export const TABLE_COLUMN_FIELD = 'formCreateTableColumn' + +/** 只能对应数字(或文本)字段的控件,与后端校验一致。 */ +const NUMBER_CONTROLS = ['inputnumber', 'el-input-number', 'amountcalculation', 'leavedays', 'timecalculation', 'rate', 'slider'] +/** 可对应日期时间字段的控件。 */ +const DATE_CONTROLS = ['datepicker', 'timepicker'] + +/** 表单编辑页设置的数据入库状态,设计器属性面板据此显示“对应字段”。 */ +export const formStorageState = reactive({ + enabled: false, + tableName: '', + columns: [] as FormTableColumn[], + /** 当前选中的控件 */ + activeRule: null as any, + /** 其他控件已对应的字段 → 控件标题 */ + usedColumns: {} as Record +}) + +const typeOf = (rule: any) => String(rule?.type || '').toLowerCase() + +const isRange = (rule: any) => + String(rule?.props?.type || '').endsWith('range') || rule?.props?.isRange === true + +/** 控件能否对应该字段:文本字段都可以;数字、日期、布尔字段只接受对应类型的控件。 */ +export const isColumnCompatible = (rule: any, column: FormTableColumn) => { + const type = typeOf(rule) + switch (column.category) { + case 'text': + return true + case 'number': + return NUMBER_CONTROLS.includes(type) || type === 'switch' + case 'datetime': + return DATE_CONTROLS.includes(type) && !isRange(rule) + case 'boolean': + return type === 'switch' + default: + return false + } +} + +/** + * 按表单作用域收集字段规则:有字段编码的即为字段,其 children(明细、子表单)不再展开; + * 布局容器继续向下查找,条件插入的字段仍在当前作用域。 + */ +export const collectFieldRules = (rules: any[], result: any[] = []) => { + ;(rules || []).forEach((rule: any) => { + if (!rule || typeof rule !== 'object') return + if (rule.field) { + result.push(rule) + ;(rule.control || []).forEach((control: any) => collectFieldRules([].concat(control?.rule || []), result)) + return + } + collectFieldRules(rule.children || [], result) + }) + return result +} + +/** 是否为当前作用域的字段(明细、子表单内的字段不能入库)。 */ +const isTopField = (rules: any[], field: string) => collectFieldRules(rules).some((rule) => rule.field === field) + +/** 属性面板中的“对应字段”配置项。 */ +const tableColumnRule = () => ({ + type: 'FormTableColumnConfig', + field: TABLE_COLUMN_FIELD, + title: '对应字段' +}) + +/** 表单启用数据入库且选中当前作用域的字段时,在常用配置最前面显示“对应字段”。 */ +export const configureTableColumn = (designer: any) => { + watch( + () => [designer.propsForm.rule, formStorageState.enabled, designer.activeRule] as const, + ([rules, enabled, active]) => { + formStorageState.activeRule = active + if (!Array.isArray(rules)) return + const allRules = designer.getRule() || [] + const show = enabled && !!active?.field && isTopField(allRules, active.field) + if (show) { + const used: Record = {} + collectFieldRules(allRules).forEach((rule) => { + const column = rule.tableColumn?.column + if (column && rule.field !== active.field) used[column] = rule.title || rule.field + }) + formStorageState.usedColumns = used + } + const has = rules.some((rule: any) => rule?.field === TABLE_COLUMN_FIELD) + if (show && !has) { + designer.propsForm.rule = [tableColumnRule(), ...rules] + } else if (!show && has) { + designer.propsForm.rule = rules.filter((rule: any) => rule?.field !== TABLE_COLUMN_FIELD) + } + }, + { immediate: true, flush: 'sync' } + ) +} + +/** 关闭数据入库或换表时,清掉已失效的对应关系,避免保存时报字段不存在。 */ +export const clearInvalidTableColumns = (rules: any[]) => { + const names = new Set(formStorageState.columns.map((column) => column.name)) + collectFieldRules(rules).forEach((rule) => { + if (rule.tableColumn?.column && !names.has(rule.tableColumn.column)) { + delete rule.tableColumn + } + }) +} diff --git a/src/components/FormCreate/src/config/useAmountCalculationRule.ts b/src/components/FormCreate/src/config/useAmountCalculationRule.ts new file mode 100644 index 0000000..16a8467 --- /dev/null +++ b/src/components/FormCreate/src/config/useAmountCalculationRule.ts @@ -0,0 +1,171 @@ +import { generateUUID } from '@/utils' +import { localeProps, makeRequiredRule } from '../utils' +import { AMOUNT_CALCULATION_TYPE as TYPE } from '../utils/amountCalculation' + +/** 与设计器保存的动态字段规则保持一致。 */ +type FieldRule = Record +type FieldOption = { label: string; value: string } +interface ScopedField { + rule: FieldRule + table?: FieldRule + label: string +} + +/** 收集主表、明细表格与重复子表单各自的字段,子表单字段不混入主表作用域。 */ +const collectFields = ( + rules: FieldRule[], table?: FieldRule, fields: ScopedField[] = [], columnLabel = '' +) => { + rules.forEach((rule) => { + if (!rule || typeof rule !== 'object') return + if (rule.field) fields.push({ rule, table, label: columnLabel || rule.title || rule.field }) + const type = String(rule.type).toLowerCase() + if (type === 'tableform') { + ;(rule.props?.columns || []).forEach((column: FieldRule) => { + collectFields(column.rule || [], rule, fields, column.label) + }) + collectFields(rule.children || [], rule, fields) + } else if (type === 'group') { + // 数组型子表单与明细表格使用相同的字段汇总方式,兼容画布和已保存规则。 + collectFields(rule.props?.rule || rule.children || [], rule, fields) + } else if (type !== 'subform') { + collectFields(rule.children || [], table, fields, + type === 'tableformcolumn' ? rule.props?.label : columnLabel) + } + }) + return fields +} + +/** 默认限定同一作用域;项目成员来源可额外包含主表字段,不包含其他列表。 */ +export const getScopedFieldOptions = ( + rules: FieldRule[], currentField: string, types: string[], + predicate: (rule: FieldRule) => boolean = () => true, + includeMain = false +): FieldOption[] => { + const fields = collectFields(rules) + const table = fields.find((entry) => entry.rule.field === currentField)?.table + return fields.filter((entry) => (entry.table === table || (includeMain && !entry.table)) && entry.rule.field !== currentField + && types.includes(String(entry.rule.type).toLowerCase()) && predicate(entry.rule)) + .map((entry) => ({ label: `${entry.label}(${entry.rule.field})`, value: entry.rule.field })) +} + +/** 大写金额只能关联所在作用域内的金额,列表内不引用其他行或其他列表。 */ +export const getScopedAmountOptions = (rules: FieldRule[], currentField: string): FieldOption[] => + getScopedFieldOptions(rules, currentField, ['inputnumber', 'el-input-number', 'amountcalculation']) + +/** 已配置的计算依赖,用于从选项中排除自身及会造成循环引用的字段。 */ +const dependencies = (rule: FieldRule): string[] => { + if (rule.type !== 'AmountCalculation') return [] + const props = rule.props || {} + switch (props.calculationType || TYPE.PRODUCT) { + case TYPE.LIST_SUM: return [props.sumField] + case TYPE.DIFFERENCE: return [props.minuendField, props.subtrahendField] + case TYPE.SUM: return [props.firstField, props.secondField] + default: return [props.quantityField, props.unitPriceField] + } +} + +/** 四种金额计算共用一个业务组件,仅通过配置选择计算方式。 */ +export const useAmountCalculationRule = (getRules: () => FieldRule[]) => { + const name = 'AmountCalculation' + const label = '金额合计' + return { + icon: 'icon-number', label, name, + rule() { + return { + type: name, field: generateUUID(), title: label, info: '', $required: false, + props: { calculationType: TYPE.PRODUCT, inTable: false } + } + }, + props(rule: FieldRule, { t }) { + const fields = collectFields(getRules()) + const ownTable = fields.find((entry) => entry.rule.field === rule.field)?.table + const byField = new Map(fields.map((entry) => [entry.rule.field, entry.rule])) + const dependsOnSelf = (field: string, visited = new Set()): boolean => { + if (!field) return false + if (field === rule.field) return true + if (visited.has(field)) return false + visited.add(field) + const source = byField.get(field) + return !!source && dependencies(source).some((next) => dependsOnSelf(next, visited)) + } + const numericOptions = (table?: FieldRule, includeCalculated = true): FieldOption[] => + fields.filter((entry) => entry.table === table + && (['inputnumber', 'el-input-number'].includes(String(entry.rule.type).toLowerCase()) + || (includeCalculated && entry.rule.type === name)) + && !dependsOnSelf(entry.rule.field)) + .map((entry) => ({ label: `${entry.label}(${entry.rule.field})`, value: entry.rule.field })) + const tables = fields.filter((entry) => !entry.table + && ['tableform', 'group'].includes(String(entry.rule.type).toLowerCase())) + const columnOptions = (field: string) => { + const table = tables.find((entry) => entry.rule.field === field)?.rule + return table ? numericOptions(table) : [] + } + const selectField = (field: string, title: string, options: FieldOption[]) => ({ + type: 'select', field, title, options, + props: { filterable: true, clearable: true, placeholder: '请选择字段' } + }) + /** 三种双字段运算共用作用域开关,保留各自原字段键及相乘的候选限制。 */ + const arithmeticScopeRule = (fieldNames: [string, string], includeCalculated = true) => { + const mainOptions = numericOptions(undefined, includeCalculated) + const rowOptions = ownTable ? numericOptions(ownTable, includeCalculated) : [] + const operandFields = (options: FieldOption[]) => [ + selectField(fieldNames[0], '字段一', options), + selectField(fieldNames[1], '字段二', options) + ] + return { + type: 'switch', field: 'inTable', title: '是否在列表里', value: false, + info: '放在列表或子表单内时开启,仅使用当前行的字段一和字段二。', + // 切换作用域只清理越界引用;初始化回显不清除已经保存的配置。 + update(value: boolean, _rule: FieldRule, api: any, info: { origin: string }) { + if (info.origin === 'init') return + const options = value ? rowOptions : mainOptions + fieldNames.forEach((field) => { + if (!options.some((option) => option.value === api.getValue(field))) { + api.setValue(field, undefined) + } + }) + }, + control: [ + { value: false, rule: operandFields(mainOptions) }, + { value: true, rule: operandFields(rowOptions) } + ] + } + } + return localeProps(t, name + '.props', [ + makeRequiredRule(), + { + type: 'select', field: 'calculationType', title: '计算类型', value: TYPE.PRODUCT, + info: '相乘:字段一 × 字段二;相减:字段一 − 字段二;相加:字段一 + 字段二。', + options: [ + { label: '相乘合计', value: TYPE.PRODUCT }, + { label: '相减合计', value: TYPE.DIFFERENCE }, + { label: '列表字段合计', value: TYPE.LIST_SUM }, + { label: '相加合计', value: TYPE.SUM } + ], + control: [ + { value: TYPE.PRODUCT, rule: [arithmeticScopeRule(['quantityField', 'unitPriceField'], false)] }, + { value: TYPE.LIST_SUM, rule: [ + { + type: 'select', field: 'tableField', title: '选择列表', + options: tables.map((entry) => ({ label: entry.rule.title || entry.rule.field, value: entry.rule.field })), + props: { filterable: true, clearable: true, placeholder: '请选择列表' }, + // 切换列表后同步列选项,清除不属于该列表的旧字段。 + update(value: string, _rule: FieldRule, api: any) { + const options = columnOptions(value) + api.updateRule('sumField', { options }) + if (!options.some((option) => option.value === api.getValue('sumField'))) { + api.setValue('sumField', undefined) + } + } + }, + selectField('sumField', '列表字段', columnOptions(rule.props?.tableField)) + ] }, + { value: TYPE.DIFFERENCE, rule: [arithmeticScopeRule(['minuendField', 'subtrahendField'])] }, + { value: TYPE.SUM, rule: [arithmeticScopeRule(['firstField', 'secondField'])] } + ] + }, + { type: 'input', field: 'placeholder', title: '占位提示', value: '根据关联字段自动计算' } + ]) + } + } +} diff --git a/src/components/FormCreate/src/config/useAssetCardSelectRule.ts b/src/components/FormCreate/src/config/useAssetCardSelectRule.ts new file mode 100644 index 0000000..c89aef9 --- /dev/null +++ b/src/components/FormCreate/src/config/useAssetCardSelectRule.ts @@ -0,0 +1,48 @@ +import { generateUUID } from '@/utils' +import { localeProps, makeRequiredRule } from '../utils' +import { ASSET_CARD_FILL_SOURCES, ASSET_CARD_STATUS_SCOPES } from './assetCardFill' + +type FieldOptionsGetter = (rule: any) => { label: string; value: string }[] + +/** + * 资产选择的设计器规则:从资产台账选资产,可限定可选状态,并把资产信息带出到同一作用域(明细表格内为同一行)的字段。 + * 带出的值只用于填写时展示,审批通过后由后端按资产台账回写。 + * + * @param getFieldOptions 读取同一作用域内可接收带出值的字段 + */ +export const useAssetCardSelectRule = (getFieldOptions: FieldOptionsGetter) => { + const name = 'AssetCardSelect' + const label = '资产选择' + return { + icon: 'icon-select', + name, + label, + rule() { + return { + type: name, + field: generateUUID(), + title: label, + info: '', + $required: true, + props: { clearable: true, statuses: '', placeholder: '输入资产编号、名称或规格搜索' } + } + }, + props(rule: any, { t }) { + const fieldOptions = getFieldOptions(rule) + return localeProps(t, name + '.props', [ + makeRequiredRule(), + { type: 'select', field: 'statuses', title: '可选资产', value: '', options: ASSET_CARD_STATUS_SCOPES }, + { type: 'switch', field: 'clearable', title: '是否可以清空', value: true }, + { type: 'switch', field: 'disabled', title: '是否禁用' }, + { type: 'input', field: 'placeholder', title: '占位符' }, + ...ASSET_CARD_FILL_SOURCES.map((source) => ({ + type: 'select', + field: source.prop, + title: `带出${source.label}`, + options: fieldOptions, + props: { filterable: true, clearable: true, placeholder: '选择接收的字段' } + })) + ]) + } + } +} diff --git a/src/components/FormCreate/src/config/useDeptSelectRule.ts b/src/components/FormCreate/src/config/useDeptSelectRule.ts new file mode 100644 index 0000000..719167e --- /dev/null +++ b/src/components/FormCreate/src/config/useDeptSelectRule.ts @@ -0,0 +1,135 @@ +import { generateUUID } from '@/utils' +import { makeProcessScopeRule } from '../utils/selectionScope' +import { localeProps, makeRequiredRule } from '@/components/FormCreate/src/utils' +import { DeptQueryScope } from '../utils/deptSelect' + +/** + * 部门树选择器的设计器规则。 + * 部门按上下级以树形展示,因此不使用通用下拉的“选择器类型(下拉/单选/多选框)”等配置。 + */ +export const useDeptSelectRule = ( + getUserFields: (rule: Record) => { label: string; value: string }[], + getDeptFields: (rule: Record) => { label: string; value: string }[] +) => { + const label = '部门选择器' + const name = 'DeptSelect' + return { + icon: 'icon-address-card-o', + label, + name, + rule() { + return { + type: name, + field: generateUUID(), + title: label, + info: '', + $required: false, + // 新增部门字段默认仅显示部门名称,保存值仍为部门编号。 + props: { filterable: true, queryScope: DeptQueryScope.ALL, ignoreProcessScope: false, pathMode: 'name' } + } + }, + props(rule, { t }) { + return localeProps(t, name + '.props', [ + makeRequiredRule(), + makeProcessScopeRule(), + { + type: 'select', field: 'align', title: '对齐方式', value: 'left', + info: '控制选择框在字段内容区域内的位置。', + options: [ + { label: '左对齐', value: 'left' }, + { label: '居中', value: 'center' }, + { label: '右对齐', value: 'right' } + ] + }, + { + type: 'input', field: 'width', title: '选择框宽度', value: '100%', + info: '支持像素或百分比,留空默认铺满所在区域,最大不超出所在区域。', + props: { placeholder: '例如:240px、60%' } + }, + { + type: 'select', field: 'queryScope', title: '查询范围', value: DeptQueryScope.ALL, + options: [ + { label: '查询全部', value: DeptQueryScope.ALL }, + { label: '仅集团、所属企业', value: DeptQueryScope.ORGANIZATION } + ], + // 仅切换面板显示,不删除已有表单保存的人员关联配置。 + control: [ + { value: DeptQueryScope.ALL, method: 'display', rule: ['deptSelectUserLink'] }, + { value: DeptQueryScope.ORGANIZATION, method: 'display', rule: ['deptSelectDepartmentLink'] } + ] + }, + { + type: 'select', field: 'parentField', title: '关联上级组织', options: getDeptFields(rule), + info: '关联同一主表或明细行内保存组织编号的其他部门选择器,仅查询所选组织的全部下级(不含自身);支持上级多选。与人员或部门联动的限制取交集。', + props: { clearable: true, filterable: true, placeholder: '请选择部门选择器字段' } + }, + { + type: 'DeptSelect', field: 'allowedDeptIds', title: '可选部门', + info: '未配置时沿用原范围;配置后仅所选部门可选,不自动包含下级。与查询范围、关联上级组织、人员或部门联动的限制取交集。', + props: { + multiple: true, clearable: true, filterable: true, returnType: 'id', + placeholder: '不选则不额外限制可选部门' + } + }, + { + type: 'DeptSelect', field: 'defaultDeptId', title: '默认部门', + info: '首次填报且字段为空时带入,优先于默认当前用户组织;部门须在当前可选范围内,已有值不覆盖。', + props: { + clearable: true, filterable: true, placeholder: '请选择默认部门', + queryScope: rule.props?.queryScope ?? DeptQueryScope.ALL, + allowedDeptIds: rule.props?.allowedDeptIds, + leafOnly: rule.props?.leafOnly ?? false + } + }, + { + type: 'switch', field: 'defaultCurrentOrganization', title: '默认当前用户组织', + info: '首次填报优先使用本人切换后的组织,未切换时使用主组织;已有表单值不覆盖。' + }, + { + type: 'select', field: 'userField', name: 'deptSelectUserLink', title: '关联人员', options: getUserFields(rule), + info: '仅可关联同一主表或同一明细行内保存人员编号的单选人员选择器。切换人员默认带出主组织,也可选其有效副岗、兼职组织;清空人员会清空部门。', + props: { clearable: true, filterable: true, placeholder: '请选择人员字段' } + }, + { + type: 'select', field: 'deptField', name: 'deptSelectDepartmentLink', title: '关联部门', options: getDeptFields(rule), + info: '关联同一主表或明细行内保存部门编号的部门选择器,按所选部门最近一级所属公司或集团展示并带出单位。多部门按单位去重;单选有多个单位时手动选择。清空部门同步清空单位,已有表单值不因打开页面被覆盖。', + props: { clearable: true, filterable: true, placeholder: '请选择部门字段' } + }, + { type: 'switch', field: 'multiple', title: '是否多选' }, + { type: 'switch', field: 'filterable', title: '是否可搜索', value: true }, + { type: 'switch', field: 'clearable', title: '是否可以清空', value: true }, + { + type: 'switch', + field: 'leafOnly', + title: '只能选择末级部门', + info: '关闭时可以选择任意层级的部门(如直接选择研发部)' + }, + { + type: 'select', + field: 'pathMode', + title: '选中后显示', + info: '显示部门路径可以区分同名部门;只有一个顶级组织时,“省略顶级组织”会去掉每条路径都相同的开头', + value: 'name', + options: [ + { label: '部门路径(省略顶级组织)', value: 'omitRoot' }, + { label: '完整路径', value: 'full' }, + { label: '仅部门名称', value: 'name' } + ] + }, + { type: 'switch', field: 'disabled', title: '是否禁用' }, + { type: 'input', field: 'placeholder', title: '占位符' }, + { + type: 'select', + field: 'returnType', + title: '返回值类型', + info: '流程中按表单部门找负责人、分管领导,或其他组件按部门联动时,必须保存部门编号', + value: 'id', + options: [ + { label: '部门编号', value: 'id' }, + { label: '部门名称', value: 'name' } + ] + } + ]) + } + } +} diff --git a/src/components/FormCreate/src/config/useDictSelectRule.ts b/src/components/FormCreate/src/config/useDictSelectRule.ts new file mode 100644 index 0000000..4157023 --- /dev/null +++ b/src/components/FormCreate/src/config/useDictSelectRule.ts @@ -0,0 +1,69 @@ +import { generateUUID } from '@/utils' +import * as DictDataApi from '@/api/system/dict/dict.type' +import { localeProps, makeRequiredRule } from '@/components/FormCreate/src/utils' +import { selectRule } from '@/components/FormCreate/src/config/selectRule' +import { cloneDeep } from 'lodash-es' + +/** + * 字典选择器规则,如果规则使用到动态数据则需要单独配置不能使用 useSelectRule + */ +export const useDictSelectRule = () => { + const label = '字典选择器' + const name = 'DictSelect' + const rules = cloneDeep(selectRule) + const dictOptions = ref<{ label: string; value: string }[]>([]) // 字典类型下拉数据 + onMounted(async () => { + const data = await DictDataApi.getSimpleDictTypeList() + if (!data || data.length === 0) { + return + } + dictOptions.value = + data?.map((item: DictDataApi.DictTypeVO) => ({ + label: item.name, + value: item.type + })) ?? [] + }) + return { + icon: 'icon-doc-text', + label, + name, + // 字典选择器透传 change,允许在表单配置中关联其他字段。 + event: ['change'], + rule() { + return { + type: name, + field: generateUUID(), + title: label, + info: '', + $required: false, + props: { filterable: true } + } + }, + props(_, { t }) { + return localeProps(t, name + '.props', [ + makeRequiredRule(), + { + type: 'select', + field: 'dictType', + title: '字典类型', + value: '', + options: dictOptions.value + }, + { + type: 'select', + field: 'valueType', + title: '字典值类型', + value: 'str', + options: [ + { label: '数字', value: 'int' }, + { label: '字符串', value: 'str' }, + { label: '布尔值', value: 'bool' } + ] + }, + { type: 'input', field: 'parentField', title: '级联上级字段编码' }, + { type: 'input', field: 'dictTypePrefix', title: '级联字典类型前缀' }, + ...rules + ]) + } + } +} diff --git a/src/components/FormCreate/src/config/useEditorRule.ts b/src/components/FormCreate/src/config/useEditorRule.ts new file mode 100644 index 0000000..ac6d9ac --- /dev/null +++ b/src/components/FormCreate/src/config/useEditorRule.ts @@ -0,0 +1,32 @@ +import { generateUUID } from '@/utils' +import { localeProps, makeRequiredRule } from '@/components/FormCreate/src/utils' + +export const useEditorRule = () => { + const label = '富文本' + const name = 'Editor' + return { + icon: 'icon-editor', + label, + name, + rule() { + return { + type: name, + field: generateUUID(), + title: label, + info: '', + $required: false + } + }, + props(_, { t }) { + return localeProps(t, name + '.props', [ + makeRequiredRule(), + { + type: 'input', + field: 'height', + title: '高度' + }, + { type: 'switch', field: 'readonly', title: '是否只读' } + ]) + } + } +} diff --git a/src/components/FormCreate/src/config/useFormTableRule.ts b/src/components/FormCreate/src/config/useFormTableRule.ts new file mode 100644 index 0000000..72a75e7 --- /dev/null +++ b/src/components/FormCreate/src/config/useFormTableRule.ts @@ -0,0 +1,83 @@ +import { localeProps } from '@/components/FormCreate/src/utils' + +export const FORM_TABLE = 'FormTable' +export const FORM_TABLE_ROW = 'FormTableRow' + +/** + * 表单容器的设计器规则。 + * 只负责排版:表头文字、是否显示表头和字段名列都在拖入后配置,不带业务含义。 + * 字段可直接拖入(独占一行),需要一行多列时先拖入“表格行”。 + */ +export const useFormTableRule = () => { + const label = '表单容器' + const name = FORM_TABLE + return { + menu: 'layout', + icon: 'icon-table', + label, + name, + drag: true, + inside: false, + mask: false, + // 拖入时自带一行,工具栏“添加”按钮追加行 + children: FORM_TABLE_ROW, + childrenLen: 1, + // 容器内不再嵌套其他布局(表格行不属于 layout 分类,不受影响) + denyDrag: { menu: ['layout'] }, + rule() { + return { + type: name, + props: { + header: '标题', + showHeader: true, + showLabel: true, + labelWidth: 90 + }, + children: [] + } + }, + props(_, { t }) { + return localeProps(t, name + '.props', [ + { type: 'input', field: 'header', title: '表头文字' }, + { type: 'switch', field: 'showHeader', title: '显示表头', value: true }, + { type: 'switch', field: 'showLabel', title: '显示字段名列', value: true }, + { + type: 'inputNumber', + field: 'labelWidth', + title: '字段名列宽(px)', + value: 90, + props: { min: 40, max: 400, step: 10 } + }, + { type: 'ColorInput', field: 'borderColor', title: '边框颜色' } + ]) + } + } +} + +/** + * 表格行的设计器规则:放进表格容器、重复子表单或表格表单列,拖入几个字段就分几组。 + */ +export const useFormTableRowRule = () => { + const label = '表格行' + const name = FORM_TABLE_ROW + return { + icon: 'icon-row', + label, + name, + drag: true, + inside: false, + mask: false, + allowDragTo: [FORM_TABLE, 'group', 'tableFormColumn'], + denyDrag: { menu: ['layout'] }, + rule() { + return { + type: name, + props: {}, + children: [] + } + }, + props() { + return [] + } + } +} diff --git a/src/components/FormCreate/src/config/useItsmProjectMemberSelectRule.ts b/src/components/FormCreate/src/config/useItsmProjectMemberSelectRule.ts new file mode 100644 index 0000000..8114e70 --- /dev/null +++ b/src/components/FormCreate/src/config/useItsmProjectMemberSelectRule.ts @@ -0,0 +1,59 @@ +import { generateUUID } from '@/utils' +import { localeProps, makeRequiredRule } from '../utils' + +type FieldOptionsGetter = (rule: any) => { label: string; value: string }[] + +/** + * ITSM 项目成员选择的设计器规则:从所选项目的承建单位成员中选择,可带出姓名、电话、岗位。 + * + * @param getProjectFields 读取当前作用域及主表内的项目选择字段 + * @param getFillFields 读取同一作用域内可接收带出值的字段 + */ +export const useItsmProjectMemberSelectRule = ( + getProjectFields: FieldOptionsGetter, + getFillFields: FieldOptionsGetter +) => { + const name = 'ItsmProjectMemberSelect' + const label = '项目成员选择' + return { + icon: 'icon-select', + name, + label, + rule() { + return { + type: name, + field: generateUUID(), + title: label, + info: '', + $required: true, + props: { clearable: true } + } + }, + props(rule: any, { t }) { + const fillOptions = getFillFields(rule) + const fill = (field: string, title: string) => ({ + type: 'select', + field, + title, + options: fillOptions, + props: { filterable: true, clearable: true, placeholder: '选择接收的字段' } + }) + return localeProps(t, name + '.props', [ + makeRequiredRule(), + { + type: 'select', + field: 'projectField', + title: '项目选择字段', + options: getProjectFields(rule), + props: { filterable: true } + }, + fill('fillName', '带出姓名'), + fill('fillPhone', '带出电话'), + fill('fillRole', '带出岗位'), + { type: 'switch', field: 'clearable', title: '是否可以清空', value: true }, + { type: 'switch', field: 'disabled', title: '是否禁用' }, + { type: 'input', field: 'placeholder', title: '占位符' } + ]) + } + } +} diff --git a/src/components/FormCreate/src/config/useItsmProjectSelectRule.ts b/src/components/FormCreate/src/config/useItsmProjectSelectRule.ts new file mode 100644 index 0000000..ccb82f8 --- /dev/null +++ b/src/components/FormCreate/src/config/useItsmProjectSelectRule.ts @@ -0,0 +1,48 @@ +import { generateUUID } from '@/utils' +import { localeProps, makeRequiredRule } from '../utils' +import { ITSM_PROJECT_FILL_SOURCES } from './itsmProjectFill' + +type FieldOptionsGetter = (rule: any) => { label: string; value: string }[] + +/** + * ITSM 项目选择的设计器规则:选择项目后可把项目台账信息带出到同一表单的其他字段。 + * 带出的值只用于填写时展示,金额等关键数据入库时由后端按项目台账重新取值。 + * + * @param getFieldOptions 读取同一作用域内可接收带出值的字段 + */ +export const useItsmProjectSelectRule = (getFieldOptions: FieldOptionsGetter) => { + const name = 'ItsmProjectSelect' + const label = '项目选择' + return { + icon: 'icon-select', + name, + label, + rule() { + return { + type: name, + field: generateUUID(), + title: label, + info: '', + $required: true, + props: { clearable: true, placeholder: '请选择项目' } + } + }, + props(rule: any, { t }) { + const fieldOptions = getFieldOptions(rule) + return localeProps(t, name + '.props', [ + makeRequiredRule(), + { type: 'switch', field: 'includeCompleted', title: '可选已结项项目' }, + { type: 'switch', field: 'clearable', title: '是否可以清空', value: true }, + { type: 'switch', field: 'disabled', title: '是否禁用' }, + { type: 'input', field: 'placeholder', title: '占位符' }, + ...ITSM_PROJECT_FILL_SOURCES.map((source) => ({ + type: 'select', + field: source.prop, + title: `带出${source.label}`, + options: fieldOptions, + props: { filterable: true, clearable: true, placeholder: '选择接收的字段' } + })) + ]) + } + } +} diff --git a/src/components/FormCreate/src/config/useItsmResourceSelectRule.ts b/src/components/FormCreate/src/config/useItsmResourceSelectRule.ts new file mode 100644 index 0000000..a437dca --- /dev/null +++ b/src/components/FormCreate/src/config/useItsmResourceSelectRule.ts @@ -0,0 +1,56 @@ +import { generateUUID } from '@/utils' +import { localeProps, makeRequiredRule } from '../utils' + +/** ITSM 资源选择的设计器规则:搜索资源中心的业务系统或基础设施,可多选。 */ +export const useItsmResourceSelectRule = () => { + const name = 'ItsmResourceSelect' + const label = '资源选择' + return { + icon: 'icon-select', + name, + label, + rule() { + return { + type: name, + field: generateUUID(), + title: label, + info: '', + $required: false, + props: { clearable: true } + } + }, + props(_rule: any, { t }) { + return localeProps(t, name + '.props', [ + makeRequiredRule(), + { + type: 'select', + field: 'resourceKind', + title: '资源类别', + value: '', + options: [ + { label: '全部', value: '' }, + { label: '业务系统', value: 'system' }, + { label: '基础设施', value: 'infra' } + ] + }, + { + type: 'select', + field: 'infraType', + title: '基础设施类型', + value: '', + options: [ + { label: '全部', value: '' }, + { label: '服务器', value: 'server' }, + { label: '数据库', value: 'database' }, + { label: '网络安全设备', value: 'network_security' }, + { label: '中间件', value: 'middleware' } + ] + }, + { type: 'switch', field: 'multiple', title: '是否多选' }, + { type: 'switch', field: 'clearable', title: '是否可以清空', value: true }, + { type: 'switch', field: 'disabled', title: '是否禁用' }, + { type: 'input', field: 'placeholder', title: '占位符' } + ]) + } + } +} diff --git a/src/components/FormCreate/src/config/useLeaveDaysRule.ts b/src/components/FormCreate/src/config/useLeaveDaysRule.ts new file mode 100644 index 0000000..bd00bb3 --- /dev/null +++ b/src/components/FormCreate/src/config/useLeaveDaysRule.ts @@ -0,0 +1,72 @@ +import { generateUUID } from '@/utils' +import { localeProps, makeRequiredRule } from '@/components/FormCreate/src/utils' + +/** 可作为起止日期的字段类型 */ +export const LEAVE_DATE_TYPES = ['datePicker', 'DatePicker'] +/** 可作为上下午的字段类型,取值为“上午/下午”或 AM/PM */ +export const LEAVE_PERIOD_TYPES = ['select', 'radio', 'DictSelect'] + +type FieldOptionsGetter = (rule: any, types: string[]) => { label: string; value: string }[] + +/** + * 请假天数的设计器规则。 + * 只需选择起止日期(及可选的上下午)字段,发起时按工作日历(排除周末和节假日管理中的节假日)自动核算,不可手改。 + * + * @param getFieldOptions 读取当前表单中指定类型的字段,作为下拉选项 + */ +export const useLeaveDaysRule = (getFieldOptions: FieldOptionsGetter) => { + const label = '请假天数' + const name = 'LeaveDays' + return { + icon: 'icon-date', + label, + name, + rule() { + return { + type: name, + field: generateUUID(), + title: label, + info: '', + $required: true + } + }, + props(rule, { t }) { + const dateOptions = getFieldOptions(rule, LEAVE_DATE_TYPES) + const periodOptions = getFieldOptions(rule, LEAVE_PERIOD_TYPES) + return localeProps(t, name + '.props', [ + makeRequiredRule(), + { + type: 'select', + field: 'startDateField', + title: '开始日期', + options: dateOptions, + props: { filterable: true, placeholder: '选择本表单的日期字段' } + }, + { + type: 'select', + field: 'startPeriodField', + title: '开始上下午', + info: '不选时开始日期按全天计', + options: periodOptions, + props: { filterable: true, clearable: true, placeholder: '不选按全天' } + }, + { + type: 'select', + field: 'endDateField', + title: '结束日期', + options: dateOptions, + props: { filterable: true, placeholder: '选择本表单的日期字段' } + }, + { + type: 'select', + field: 'endPeriodField', + title: '结束上下午', + info: '不选时结束日期按全天计', + options: periodOptions, + props: { filterable: true, clearable: true, placeholder: '不选按全天' } + }, + { type: 'input', field: 'placeholder', title: '占位符', value: '根据起止时间自动计算' } + ]) + } + } +} diff --git a/src/components/FormCreate/src/config/useNumberingRule.ts b/src/components/FormCreate/src/config/useNumberingRule.ts new file mode 100644 index 0000000..dc8824a --- /dev/null +++ b/src/components/FormCreate/src/config/useNumberingRule.ts @@ -0,0 +1,60 @@ +import { generateUUID } from '@/utils' +import { localeProps, makeRequiredRule } from '../utils' +import { NUMBERING_BUSINESSES, NUMBERING_TYPE } from '../utils/numbering' + +/** 承办部门仅选择同一主表或明细行中的部门选择器字段。 */ +type FieldOptionsGetter = (rule: any) => { label: string; value: string }[] + +export const useNumberingRule = (getFieldOptions: FieldOptionsGetter) => { + const name = 'Numbering' + const label = '编号' + return { + icon: 'icon-number', + label, + name, + rule() { + return { + type: name, + field: generateUUID(), + title: label, + info: '', + $required: false, + props: { numberingType: NUMBERING_TYPE.CAIXIN_CONTRACT } + } + }, + props(rule, { t }) { + return localeProps(t, name + '.props', [ + makeRequiredRule(), + { + type: 'select', field: 'align', title: '对齐方式', value: 'left', + options: [ + { label: '左对齐', value: 'left' }, + { label: '居中', value: 'center' }, + { label: '右对齐', value: 'right' } + ] + }, + { + type: 'select', field: 'numberingType', title: '业务类型', + info: '财信:ZJCX+年度+流水号;数智:ZCSZ+年度+流水号。同一前缀跨流程递增,每年从0001开始。填写时显示预计编号,提交时重新核定,可能顺延。工会合同仍按部门和日期组合。旧版合并类型请重新选择财信或数智。', + options: [ + ...NUMBERING_BUSINESSES.map(({ label, value }) => ({ label, value })), + // 旧规则只显示兼容提示,不再允许新组件选择合并类型。 + ...(rule.props?.numberingType === NUMBERING_TYPE.CONTRACT + ? [{ label: '旧版财信/数智合同(请重新选择)', value: NUMBERING_TYPE.CONTRACT, disabled: true }] + : []) + ], + props: { placeholder: '请选择业务类型' }, + control: [{ + value: NUMBERING_TYPE.UNION_CONTRACT, + rule: [{ + type: 'select', field: 'sourceField', title: '承办部门字段', + info: '仅可选择部门选择器字段。未选部门仍展示“部”;部门名称已以“部”结尾时不重复追加。', + options: getFieldOptions(rule), + props: { filterable: true, clearable: true, placeholder: '请选择承办部门字段' } + }] + }] + } + ]) + } + } +} diff --git a/src/components/FormCreate/src/config/usePostSelectRule.ts b/src/components/FormCreate/src/config/usePostSelectRule.ts new file mode 100644 index 0000000..913cd66 --- /dev/null +++ b/src/components/FormCreate/src/config/usePostSelectRule.ts @@ -0,0 +1,40 @@ +import { generateUUID } from '@/utils' +import { localeProps, makeRequiredRule } from '../utils' + +type FieldOption = { label: string; value: string } + +/** 岗位支持独立选择;配置关联时,人员、部门两个条件均有值后才加载任职岗位。 */ +export const usePostSelectRule = ( + getFields: (rule: Record, type: 'userselect' | 'deptselect') => FieldOption[] +) => { + const name = 'PostSelect' + const label = '岗位选择器' + return { + icon: 'icon-address-card-o', name, label, + rule() { + return { + type: name, field: generateUUID(), title: label, info: '', $required: false, + props: { filterable: true, clearable: true } + } + }, + props(rule, { t }) { + return localeProps(t, name + '.props', [ + makeRequiredRule(), + { + type: 'select', field: 'userField', title: '关联人员', options: getFields(rule, 'userselect'), + info: '仅可关联当前主表或当前明细内保存人员编号的单选人员选择器。人员、部门均不关联时,可直接选择普通岗位。', + props: { filterable: true, clearable: true, placeholder: '请选择人员字段' } + }, + { + type: 'select', field: 'deptField', title: '关联部门', options: getFields(rule, 'deptselect'), + info: '仅可关联同一作用域内保存部门编号的单选部门选择器。人员和部门都有值后,查询该人员在该部门的有效主岗、副岗、兼职;唯一岗位自动带出,多个时手动选择。', + props: { filterable: true, clearable: true, placeholder: '请选择部门字段' } + }, + { type: 'switch', field: 'filterable', title: '是否可搜索', value: true }, + { type: 'switch', field: 'clearable', title: '是否可以清空', value: true }, + { type: 'switch', field: 'disabled', title: '是否禁用' }, + { type: 'input', field: 'placeholder', title: '占位符' } + ]) + } + } +} diff --git a/src/components/FormCreate/src/config/useProcessInstanceSelectRule.ts b/src/components/FormCreate/src/config/useProcessInstanceSelectRule.ts new file mode 100644 index 0000000..e4c5b4b --- /dev/null +++ b/src/components/FormCreate/src/config/useProcessInstanceSelectRule.ts @@ -0,0 +1,61 @@ +import { generateUUID } from '@/utils' +import { localeProps, makeRequiredRule } from '../utils' + +type FieldRule = Record + +/** 关联来源只允许同一主表或同一明细内保存人员编号的单选用户字段。 */ +const getUserFields = (rules: FieldRule[], currentField: string) => { + const fields: { rule: FieldRule; scope?: FieldRule; label: string }[] = [] + const walk = (list: FieldRule[], scope?: FieldRule, label = '') => { + list.forEach((rule) => { + if (!rule || typeof rule !== 'object') return + if (rule.field) fields.push({ rule, scope, label: label || rule.title || rule.field }) + const type = String(rule.type).toLowerCase() + if (type === 'tableform') { + ;(rule.props?.columns || []).forEach((column: FieldRule) => walk(column.rule || [], rule, column.label)) + walk(rule.children || [], rule) + } else if (type === 'group') { + walk(rule.props?.rule || rule.children || [], rule) + } else if (type !== 'subform') { + walk(rule.children || [], scope, type === 'tableformcolumn' ? rule.props?.label : label) + } + }) + } + walk(rules) + const own = fields.find(({ rule }) => rule.field === currentField) + if (!own) return [] + return fields.filter(({ rule, scope }) => scope === own.scope && rule.field !== currentField + && String(rule.type).toLowerCase() === 'userselect' && !rule.props?.multiple + && rule.props?.returnType !== 'name' && rule.props?.selectType !== 'checkbox' + && (!rule.props?.valueField || rule.props.valueField === 'id')) + .map(({ rule, label }) => ({ label: `${label}(${rule.field})`, value: rule.field })) +} + +/** 关联流程保存实例 ID,查询匹配实际发起人,不匹配目标流程表单内的申请人。 */ +export const useProcessInstanceSelectRule = (getRules: () => FieldRule[]) => { + const name = 'ProcessInstanceSelect' + const label = '关联流程' + return { + icon: 'icon-link', name, label, + rule() { + return { + type: name, field: generateUUID(), title: label, info: '', $required: false, + props: { clearable: true, placeholder: '请选择关联流程' } + } + }, + props(rule: FieldRule, { t }) { + return localeProps(t, name + '.props', [ + makeRequiredRule(), + { + type: 'select', field: 'userField', title: '关联人员', + options: getUserFields(getRules(), rule.field), + info: '先选择同一主表或明细内的单选人员字段。只查询该人员实际发起且当前操作人有权查看的流程;下拉显示流程名称和发起时间。', + props: { filterable: true, clearable: true, placeholder: '请选择人员字段' } + }, + { type: 'switch', field: 'clearable', title: '是否可以清空', value: true }, + { type: 'switch', field: 'disabled', title: '是否禁用' }, + { type: 'input', field: 'placeholder', title: '占位符' } + ]) + } + } +} diff --git a/src/components/FormCreate/src/config/useRoleSelectRule.ts b/src/components/FormCreate/src/config/useRoleSelectRule.ts new file mode 100644 index 0000000..34507dd --- /dev/null +++ b/src/components/FormCreate/src/config/useRoleSelectRule.ts @@ -0,0 +1,33 @@ +import { generateUUID } from '@/utils' +import { localeProps, makeRequiredRule } from '../utils' + +/** OA 角色使用真实编号,选项接口由组件固定,不允许切换为其他应用的数据源。 */ +export const useRoleSelectRule = (getUserFields: (rule: any) => { label: string; value: string }[] = () => []) => { + const name = 'RoleSelect' + const label = '角色选择器' + return { + icon: 'icon-user-o', name, label, + rule() { + return { + type: name, field: generateUUID(), title: label, info: '', $required: false, + props: { multiple: false, filterable: true, clearable: true } + } + }, + props(rule, { t }) { + return localeProps(t, name + '.props', [ + makeRequiredRule(), + { + type: 'select', field: 'userField', title: '关联人员', + info: '先选人员,只展示其拥有的 OA 启用角色;多人取并集。未选角色时默认带出第一个可用角色,仍可手动改选。不关联时展示全部 OA 启用角色。', + props: { clearable: true, filterable: true, placeholder: '请选择表单内用户选择器' }, + options: getUserFields(rule) + }, + { type: 'switch', field: 'multiple', title: '是否多选', info: '选项来自 OA 系统的启用角色。' }, + { type: 'switch', field: 'filterable', title: '是否可搜索', value: true }, + { type: 'switch', field: 'clearable', title: '是否可以清空', value: true }, + { type: 'switch', field: 'disabled', title: '是否禁用' }, + { type: 'input', field: 'placeholder', title: '占位符' } + ]) + } + } +} diff --git a/src/components/FormCreate/src/config/useSelectRule.ts b/src/components/FormCreate/src/config/useSelectRule.ts new file mode 100644 index 0000000..3071321 --- /dev/null +++ b/src/components/FormCreate/src/config/useSelectRule.ts @@ -0,0 +1,38 @@ +import { generateUUID } from '@/utils' +import { localeProps, makeRequiredRule } from '@/components/FormCreate/src/utils' +import { selectRule } from '@/components/FormCreate/src/config/selectRule' +import { SelectRuleOption } from '@/components/FormCreate/src/type' +import { cloneDeep } from 'lodash-es' + +/** + * 通用选择器规则 hook + * + * @param option 规则配置 + */ +export const useSelectRule = (option: SelectRuleOption) => { + const label = option.label + const name = option.name + const rules = cloneDeep(selectRule) + return { + icon: option.icon, + label, + name, + event: option.event, + rule() { + return { + type: name, + field: generateUUID(), + title: label, + info: '', + $required: false, + props: { filterable: true, ...(name === 'UserSelect' ? { ignoreProcessScope: false } : {}) } + } + }, + props(rule, { t }) { + // 配置为函数时每次选中组件重新生成,用于列出当前表单字段等动态选项 + const extraProps = + typeof option.props === 'function' ? option.props(rule) : option.props || [] + return localeProps(t, name + '.props', [makeRequiredRule(), ...extraProps, ...rules]) + } + } +} diff --git a/src/components/FormCreate/src/config/useTimeCalculationRule.ts b/src/components/FormCreate/src/config/useTimeCalculationRule.ts new file mode 100644 index 0000000..c7fd5ce --- /dev/null +++ b/src/components/FormCreate/src/config/useTimeCalculationRule.ts @@ -0,0 +1,41 @@ +import { generateUUID } from '@/utils' +import { localeProps, makeRequiredRule } from '../utils' +import { TIME_CALCULATION_TYPE } from '../utils/timeCalculation' + +/** 日期候选字段已经限定到当前主表或明细行,不跨作用域关联。 */ +type FieldOptionsGetter = (rule: any) => { label: string; value: string }[] + +/** 时间计算业务组件;当前仅提供两个日期计算自然日天数。 */ +export const useTimeCalculationRule = (getDateFields: FieldOptionsGetter) => { + const name = 'TimeCalculation' + const label = '时间计算' + return { + name, label, icon: 'icon-date', + rule() { + return { + type: name, field: generateUUID(), title: '共计天数', info: '', $required: false, + props: { calculationType: TIME_CALCULATION_TYPE.CALENDAR_DAYS } + } + }, + props(rule, { t }) { + const options = getDateFields(rule) + return localeProps(t, name + '.props', [ + makeRequiredRule(), + { + type: 'select', field: 'calculationType', title: '计算类型', + value: TIME_CALCULATION_TYPE.CALENDAR_DAYS, + info: '按自然日计算,包含起止两天;同一天为1天,周末和节假日也计入。', + options: [{ label: '两个日期计算天数', value: TIME_CALCULATION_TYPE.CALENDAR_DAYS }] + }, + { + type: 'select', field: 'startDateField', title: '开始日期', options, + props: { filterable: true, clearable: true, placeholder: '请选择同一主表或明细行的日期字段' } + }, + { + type: 'select', field: 'endDateField', title: '结束日期', options, + props: { filterable: true, clearable: true, placeholder: '请选择同一主表或明细行的日期字段' } + } + ]) + } + } +} diff --git a/src/components/FormCreate/src/config/useUploadFileRule.ts b/src/components/FormCreate/src/config/useUploadFileRule.ts new file mode 100644 index 0000000..7e599ee --- /dev/null +++ b/src/components/FormCreate/src/config/useUploadFileRule.ts @@ -0,0 +1,99 @@ +import { generateUUID } from '@/utils' +import { localeProps, makeRequiredRule } from '@/components/FormCreate/src/utils' +import { UploadDisplayType } from '@/components/UploadFile/src/types' + +export const useUploadFileRule = () => { + const label = '文件上传' + const name = 'UploadFile' + return { + icon: 'icon-upload', + label, + name, + rule() { + return { + type: name, + field: generateUUID(), + title: label, + info: '', + props: { fileSize: 20, fileType: [], displayType: UploadDisplayType.DEFAULT }, + $required: false + } + }, + props(_, { t }) { + return localeProps(t, name + '.props', [ + makeRequiredRule(), + { + type: 'select', + field: 'displayType', + title: '展示类型', + value: UploadDisplayType.DEFAULT, + options: [ + { label: '默认类型', value: UploadDisplayType.DEFAULT }, + { label: '粘贴上传', value: UploadDisplayType.PASTE } + ] + }, + { + type: 'select', + field: 'fileType', + title: '文件类型', + info: '不选择时不限制文件类型', + value: [], // 未选择类型时不限制文件格式。 + options: [ + { label: 'doc', value: 'doc' }, + { label: 'xls', value: 'xls' }, + { label: 'ppt', value: 'ppt' }, + { label: 'txt', value: 'txt' }, + { label: 'pdf', value: 'pdf' }, + // 图片格式按需勾选,与附件上传组件的文件类型限制保持一致。 + { label: 'jpg', value: 'jpg' }, + { label: 'jpeg', value: 'jpeg' }, + { label: 'png', value: 'png' } + ], + props: { + multiple: true, + clearable: true, + placeholder: '不限制文件类型' + } + }, + { + type: 'switch', + field: 'autoUpload', + title: '是否在选取文件后立即进行上传', + value: true + }, + { + type: 'switch', + field: 'drag', + title: '拖拽上传', + value: false + }, + { + type: 'switch', + field: 'isShowTip', + title: '是否显示提示', + value: true + }, + { + type: 'inputNumber', + field: 'fileSize', + title: '大小限制(MB)', + value: 20, + props: { min: 0 } + }, + { + type: 'inputNumber', + field: 'limit', + title: '数量限制', + value: 5, + props: { min: 0 } + }, + { + type: 'switch', + field: 'disabled', + title: '是否禁用', + value: false + } + ]) + } + } +} diff --git a/src/components/FormCreate/src/config/useUploadImgRule.ts b/src/components/FormCreate/src/config/useUploadImgRule.ts new file mode 100644 index 0000000..546cf9d --- /dev/null +++ b/src/components/FormCreate/src/config/useUploadImgRule.ts @@ -0,0 +1,89 @@ +import { generateUUID } from '@/utils' +import { localeProps, makeRequiredRule } from '@/components/FormCreate/src/utils' + +export const useUploadImgRule = () => { + const label = '单图上传' + const name = 'UploadImg' + return { + icon: 'icon-upload', + label, + name, + rule() { + return { + type: name, + field: generateUUID(), + title: label, + info: '', + $required: false + } + }, + props(_, { t }) { + return localeProps(t, name + '.props', [ + makeRequiredRule(), + { + type: 'switch', + field: 'drag', + title: '拖拽上传', + value: false + }, + { + type: 'select', + field: 'fileType', + title: '图片类型限制', + value: ['image/jpeg', 'image/png', 'image/gif'], + options: [ + { label: 'image/apng', value: 'image/apng' }, + { label: 'image/bmp', value: 'image/bmp' }, + { label: 'image/gif', value: 'image/gif' }, + { label: 'image/jpeg', value: 'image/jpeg' }, + { label: 'image/pjpeg', value: 'image/pjpeg' }, + { label: 'image/svg+xml', value: 'image/svg+xml' }, + { label: 'image/tiff', value: 'image/tiff' }, + { label: 'image/webp', value: 'image/webp' }, + { label: 'image/x-icon', value: 'image/x-icon' } + ], + props: { + multiple: true + } + }, + { + type: 'inputNumber', + field: 'fileSize', + title: '大小限制(MB)', + value: 5, + props: { min: 0 } + }, + { + type: 'input', + field: 'height', + title: '组件高度', + value: '150px' + }, + { + type: 'input', + field: 'width', + title: '组件宽度', + value: '150px' + }, + { + type: 'input', + field: 'borderradius', + title: '组件边框圆角', + value: '8px' + }, + { + type: 'switch', + field: 'disabled', + title: '是否显示删除按钮', + value: true + }, + { + type: 'switch', + field: 'showBtnText', + title: '是否显示按钮文字', + value: true + } + ]) + } + } +} diff --git a/src/components/FormCreate/src/config/useUploadImgsRule.ts b/src/components/FormCreate/src/config/useUploadImgsRule.ts new file mode 100644 index 0000000..0bf2378 --- /dev/null +++ b/src/components/FormCreate/src/config/useUploadImgsRule.ts @@ -0,0 +1,84 @@ +import { generateUUID } from '@/utils' +import { localeProps, makeRequiredRule } from '@/components/FormCreate/src/utils' + +export const useUploadImgsRule = () => { + const label = '多图上传' + const name = 'UploadImgs' + return { + icon: 'icon-upload', + label, + name, + rule() { + return { + type: name, + field: generateUUID(), + title: label, + info: '', + $required: false + } + }, + props(_, { t }) { + return localeProps(t, name + '.props', [ + makeRequiredRule(), + { + type: 'switch', + field: 'drag', + title: '拖拽上传', + value: false + }, + { + type: 'select', + field: 'fileType', + title: '图片类型限制', + value: ['image/jpeg', 'image/png', 'image/gif'], + options: [ + { label: 'image/apng', value: 'image/apng' }, + { label: 'image/bmp', value: 'image/bmp' }, + { label: 'image/gif', value: 'image/gif' }, + { label: 'image/jpeg', value: 'image/jpeg' }, + { label: 'image/pjpeg', value: 'image/pjpeg' }, + { label: 'image/svg+xml', value: 'image/svg+xml' }, + { label: 'image/tiff', value: 'image/tiff' }, + { label: 'image/webp', value: 'image/webp' }, + { label: 'image/x-icon', value: 'image/x-icon' } + ], + props: { + multiple: true + } + }, + { + type: 'inputNumber', + field: 'fileSize', + title: '大小限制(MB)', + value: 5, + props: { min: 0 } + }, + { + type: 'inputNumber', + field: 'limit', + title: '数量限制', + value: 5, + props: { min: 0 } + }, + { + type: 'input', + field: 'height', + title: '组件高度', + value: '150px' + }, + { + type: 'input', + field: 'width', + title: '组件宽度', + value: '150px' + }, + { + type: 'input', + field: 'borderradius', + title: '组件边框圆角', + value: '8px' + } + ]) + } + } +} diff --git a/src/components/FormCreate/src/config/useUppercaseAmountRule.ts b/src/components/FormCreate/src/config/useUppercaseAmountRule.ts new file mode 100644 index 0000000..e84b04d --- /dev/null +++ b/src/components/FormCreate/src/config/useUppercaseAmountRule.ts @@ -0,0 +1,38 @@ +import { generateUUID } from '@/utils' +import { localeProps, makeRequiredRule } from '@/components/FormCreate/src/utils' + +type FieldOptionsGetter = (rule: any, types: string[]) => { label: string; value: string }[] + +/** 大写金额:选择计数器或金额合计组件,自动转换为只读的人民币大写。 */ +export const useUppercaseAmountRule = (getFieldOptions: FieldOptionsGetter) => { + const label = '大写金额' + const name = 'UppercaseAmount' + return { + icon: 'icon-number', + label, + name, + rule() { + return { + type: name, + field: generateUUID(), + title: label, + info: '', + $required: false + } + }, + props(rule, { t }) { + return localeProps(t, name + '.props', [ + makeRequiredRule(), + { + type: 'select', + field: 'amountField', + title: '关联金额', + info: '选择当前表单或明细行的计数器、金额合计,自动转换到分,超过两位小数四舍五入', + options: getFieldOptions(rule, ['inputNumber', 'InputNumber', 'el-input-number', 'AmountCalculation']), + props: { filterable: true, clearable: true, placeholder: '请选择金额字段' } + }, + { type: 'input', field: 'placeholder', title: '占位符', value: '根据关联金额自动转换' } + ]) + } + } +} diff --git a/src/components/FormCreate/src/designer-layout.scss b/src/components/FormCreate/src/designer-layout.scss new file mode 100644 index 0000000..1da9373 --- /dev/null +++ b/src/components/FormCreate/src/designer-layout.scss @@ -0,0 +1,66 @@ +// 画布使用独立的列视图,表头底色与预览、填报时保持一致。 +._fc-designer ._fd-table-form ._fd-tf-title { + background: var(--#{$elNamespace}-fill-color-light); + font-weight: var(--fc-detail-label-weight, 400); +} + +// 内部列名默认不加粗,单列的明确设置优先于列表统一设置。 +._fc-designer ._fd-table-form { + --fc-detail-label-weight: 400; +} + +._fc-designer ._fd-table-form[labelbold='true'] { + --fc-detail-label-weight: 600; +} + +._fc-designer ._fd-table-form ._fd-tf-col[labelbold='true'] { + --fc-detail-label-weight: 600; +} + +._fc-designer ._fd-table-form ._fd-tf-col[labelbold='false'] { + --fc-detail-label-weight: 400; +} + +// 明细列表贴齐外层表格单元格,清除设计器列拖拽包装层额外的留白。 +._fc-designer .form-table .#{$elNamespace}-form-item__content:has(> ._fd-table-form) { + padding: 0; +} + +._fc-designer ._fd-table-form { + box-sizing: border-box; + + // 空列表仍保留原生拖入区域,有列后按实际内容撑开。 + &:has(> ._fd-tf-wrap) { + min-height: 0; + } +} + +._fc-designer ._fd-tf-wrap > ._fd-drag-tool { + height: auto; + padding: 0; + margin: 0; +} + +// 仅调整拖拽画布,预览和详情仍由 form-create 按原始规则渲染。 +._fc-designer ._fc-m-drag ._fd-draggable-drag { + display: flex; + flex-wrap: wrap; + align-content: flex-start; + + // 拖拽项默认占整行,将字段的列宽同步给最外层拖拽项。 + @for $span from 0 through 24 { + > ._fc-draggable-item:has( + > ._fd-drag-tool > .fc-form-col.#{$elNamespace}-col-#{$span} + ) { + flex: 0 0 calc(100% / 24 * #{$span}); + width: calc(100% / 24 * #{$span}); + max-width: calc(100% / 24 * #{$span}); + } + } + + // 宽度由外层拖拽项承担,内部字段铺满,避免半行宽被重复计算。 + > ._fc-draggable-item > ._fd-drag-tool > .fc-form-col { + flex: 0 0 100%; + max-width: 100%; + } +} diff --git a/src/components/FormCreate/src/form-layout.scss b/src/components/FormCreate/src/form-layout.scss new file mode 100644 index 0000000..8a9b46e --- /dev/null +++ b/src/components/FormCreate/src/form-layout.scss @@ -0,0 +1,526 @@ +// 禁用字段仍需清晰展示已有内容,统一调整文字和选中标识,不改变禁用操作按钮。 +:is(.form-create, .form-create-m) { + --fc-disabled-text-color: #303333; + + // 附件保留下载入口,取消只读容器内部标签的蓝色底和重复边框。 + .upload-file.upload-file--readonly > .file-list-item { + padding: 6px 0; + background: transparent; + border: 0; + } + + :is( + .#{$elNamespace}-input, + .#{$elNamespace}-textarea, + .#{$elNamespace}-select, + .#{$elNamespace}-cascader, + .#{$elNamespace}-range-editor, + .#{$elNamespace}-checkbox + ) { + --#{$elNamespace}-disabled-text-color: var(--fc-disabled-text-color); + } + + .#{$elNamespace}-radio__input.is-disabled + .#{$elNamespace}-radio__label, + .#{$elNamespace}-select__wrapper.is-disabled .#{$elNamespace}-tag__content, + .#{$elNamespace}-cascader.is-disabled .#{$elNamespace}-tag__content { + color: var(--fc-disabled-text-color); + } + + // 只读单选、多选保留清晰的选中标识,沿用主题色及白色圆点、勾选符号。 + .#{$elNamespace}-radio__input.is-disabled.is-checked .#{$elNamespace}-radio__inner, + .#{$elNamespace}-checkbox__input.is-disabled:is(.is-checked, .is-indeterminate) .#{$elNamespace}-checkbox__inner { + background-color: var(--#{$elNamespace}-color-primary); + border-color: var(--#{$elNamespace}-color-primary); + } + + .#{$elNamespace}-radio__input.is-disabled.is-checked .#{$elNamespace}-radio__inner::after, + .#{$elNamespace}-checkbox__input.is-disabled.is-indeterminate .#{$elNamespace}-checkbox__inner::before { + background-color: var(--#{$elNamespace}-color-white); + } + + .#{$elNamespace}-checkbox__input.is-disabled.is-checked .#{$elNamespace}-checkbox__inner::after { + border-color: var(--#{$elNamespace}-color-white); + } + + // 输入框禁用时会设置 text-fill-color,提示文字单独保持浅色,避免与已有值混淆。 + .#{$elNamespace}-input.is-disabled .#{$elNamespace}-input__inner::placeholder, + .#{$elNamespace}-textarea.is-disabled .#{$elNamespace}-textarea__inner::placeholder, + .#{$elNamespace}-range-editor.is-disabled input::placeholder { + color: var(--#{$elNamespace}-text-color-placeholder); + -webkit-text-fill-color: var(--#{$elNamespace}-text-color-placeholder); + } + + .#{$elNamespace}-select__wrapper.is-disabled .#{$elNamespace}-select__placeholder.is-transparent { + color: var(--#{$elNamespace}-text-color-placeholder); + } +} + +// 只读表单沿用表格边线,值格直接显示内容;可编辑字段继续使用原输入样式。 +.form-create { + .fc-readonly-value { + display: flex; + width: 100%; + min-width: 0; + // 内容 32px + 单元格上下留白 8px + 下边框 1px,与业务表单行高一致。 + min-height: 32px; + color: var(--fc-disabled-text-color); + white-space: pre-wrap; + overflow-wrap: anywhere; + align-items: center; + + > span { min-width: 0; } + } + + // 纯文本与选择器共用字号,直接约束文字节点,避免子元素沿用其他字号。 + .fc-readonly-value, + .fc-readonly-value > span, + .fc-form-item--readonly :is( + .#{$elNamespace}-select__selected-item, + .#{$elNamespace}-select__selected-item > span, + .#{$elNamespace}-tag__content, + .#{$elNamespace}-input__inner, + .#{$elNamespace}-textarea__inner, + .#{$elNamespace}-radio__label, + .#{$elNamespace}-checkbox__label + ) { + font-family: inherit; + font-size: 13px; + font-weight: 400; + line-height: 20px; + } + + .fc-form-item--readonly { + > .#{$elNamespace}-form-item__label::before, + > .#{$elNamespace}-form-item__label-wrap > .#{$elNamespace}-form-item__label::before { + display: none !important; + } + + .#{$elNamespace}-select__wrapper, + .#{$elNamespace}-input__wrapper, + .#{$elNamespace}-textarea__inner, + .#{$elNamespace}-range-editor, + .upload-file--readonly, + .#{$elNamespace}-radio-group, + .#{$elNamespace}-checkbox-group { + padding: 0; + background: transparent; + border: 0; + border-radius: 0; + box-shadow: none !important; + cursor: default; + } + + .#{$elNamespace}-input__inner, + .#{$elNamespace}-textarea__inner { + color: var(--fc-disabled-text-color); + -webkit-text-fill-color: var(--fc-disabled-text-color); + cursor: text; + } + + // 计算组件内部仍保留原输入控件,只清除空值时的输入提示。 + .#{$elNamespace}-input.is-disabled:has(.#{$elNamespace}-input__inner:placeholder-shown) { + &::after { + position: absolute; + left: 0; + color: var(--fc-disabled-text-color); + content: '-'; + } + + .#{$elNamespace}-input__inner::placeholder { + color: transparent; + -webkit-text-fill-color: transparent; + } + } + + // 选择器继续使用已有名称回显,展开长标签和多选值,不显示箭头、清除或删除图标。 + .#{$elNamespace}-select__wrapper { + min-height: 32px; + height: auto; + } + + // 计算字段内部的原控件及单多选,与纯文本使用相同高度。 + .#{$elNamespace}-input__wrapper, + .#{$elNamespace}-range-editor { + min-height: 32px; + height: 32px; + box-sizing: border-box; + } + + .#{$elNamespace}-input__inner { + height: 30px; + } + + .#{$elNamespace}-radio, + .#{$elNamespace}-checkbox { + height: 32px; + } + + // 多选原有负边距用于抵消标签内边距;只读去掉标签外框后应恢复单元格留白。 + .#{$elNamespace}-select__selection.is-near { + margin-left: 0; + } + + .#{$elNamespace}-select__selected-item, + .#{$elNamespace}-select__selected-item > span, + .#{$elNamespace}-select__tags-text, + .#{$elNamespace}-tag__content, + .#{$elNamespace}-cascader__search-input { + max-width: 100%; + height: auto; + white-space: pre-wrap; + overflow-wrap: anywhere; + overflow: visible; + text-overflow: clip; + } + + .#{$elNamespace}-select__suffix, + .#{$elNamespace}-input__prefix, + .#{$elNamespace}-input__suffix, + .#{$elNamespace}-tag__close, + .#{$elNamespace}-input-number__increase, + .#{$elNamespace}-input-number__decrease { + display: none; + } + + .#{$elNamespace}-tag { + height: auto; + padding: 0; + color: var(--fc-disabled-text-color); + background: transparent; + border: 0; + font-size: inherit; + line-height: inherit; + } + + .#{$elNamespace}-select__placeholder.is-transparent { + visibility: hidden; + + &::after { + position: absolute; + inset: 0; + color: var(--fc-disabled-text-color); + content: '-'; + visibility: visible; + } + } + + // 字典的单选、多选只保留已选文字,空集合显示横线。 + :is(.#{$elNamespace}-radio, .#{$elNamespace}-checkbox):not(.is-checked), + .#{$elNamespace}-radio__input, + .#{$elNamespace}-checkbox__input { + display: none; + } + + .#{$elNamespace}-radio__label, + .#{$elNamespace}-checkbox__label { + padding-left: 0; + color: var(--fc-disabled-text-color); + white-space: pre-wrap; + overflow-wrap: anywhere; + } + + :is(.#{$elNamespace}-radio-group, .#{$elNamespace}-checkbox-group):not(:has(.is-checked))::after, + .upload-file--readonly:empty::after { + color: var(--fc-disabled-text-color); + content: '-'; + } + } +} + +// 标题的 h1/h2 类会与 UnoCSS 高度工具类冲突,画布和运行时统一按文字撑高。 +.form-create ._fc-title, +._fc-designer ._fc-title { + height: auto; + padding: 0; + margin: 0 0 12px; + border: 0; + color: #000; + font-weight: 700; + line-height: 1.5; +} + +// 原生 h1/h2 标题自带底部分隔线,提高优先级,避免依赖样式后加载时重新显示。 +:is(.form-create, ._fc-designer) ._fc-title:is(.h1, .h2) { + padding-bottom: 0; + border-bottom: 0; +} + +// 文字说明行补齐右、下边框,上、左边沿用表格已有边线,避免叠加。 +.form-table .fc-form-text { + border-right: 1px solid var(--form-table-border-color); + border-bottom: 1px solid var(--form-table-border-color); +} + +// 字段名独立设置字重,配置写在字段自身的 wrap 中,不影响输入内容或相邻字段。 +.fc-form-item > .#{$elNamespace}-form-item__label { + font-weight: var(--fc-field-label-weight, 400); +} + +.fc-form-item[labelbold='true'] > .#{$elNamespace}-form-item__label { + font-weight: 600; +} + +.fc-form-item[labelbold='false'] > .#{$elNamespace}-form-item__label { + font-weight: 400; +} + +// 列表组件标题使用独立开关,与内部列名加粗配置互不影响。 +.fc-form-item:not([labelbold='false']):has( + > .#{$elNamespace}-form-item__content > ._fc-table-form[data-title-bold='true'] +) > .#{$elNamespace}-form-item__label, +.fc-form-item:not([labelbold='false']):has( + > .#{$elNamespace}-form-item__content > ._fd-table-form:not([titlebold='false']) +) > .#{$elNamespace}-form-item__label { + font-weight: 600; +} + +// 显式关闭组件标题加粗后使用常规字重,不继承外层子表单设置。 +.fc-form-item:not([labelbold='true']):has( + > .#{$elNamespace}-form-item__content > ._fc-table-form[data-title-bold='false'] +) > .#{$elNamespace}-form-item__label, +.fc-form-item:not([labelbold='true']):has( + > .#{$elNamespace}-form-item__content > ._fd-table-form[titlebold='false'] +) > .#{$elNamespace}-form-item__label { + font-weight: 400; +} + +// 日期、时间和计数器默认使用固定宽度,在表单字段中统一铺满内容区域。 +.fc-form-item .#{$elNamespace}-input-number, +.fc-form-item .#{$elNamespace}-date-editor.#{$elNamespace}-input, +.fc-form-item .#{$elNamespace}-date-editor.#{$elNamespace}-input__wrapper { + width: 100%; + min-width: 0; + box-sizing: border-box; +} + +// 表格容器中的顶部字段名作为通栏标题,不再需要嵌套布局容器。 +.form-table .#{$elNamespace}-form-item.#{$elNamespace}-form-item--label-top { + flex-direction: column; + + > .#{$elNamespace}-form-item__label { + width: 100% !important; + border-right: 0; + border-bottom: 1px solid var(--form-table-border-color); + flex: none; + } + + > .#{$elNamespace}-form-item__content { + width: 100%; + box-sizing: border-box; + flex: auto; + } +} + +// 重复子表单中的字段沿用表格单元格样式,每组补齐独立的外边框。 +.form-table ._fc-group-container > .form-create, +.form-table .fc-detail-group__item > .form-create, +.form-table .fc-detail-group__item > .form-create-m { + // 子表单每组独立排版,补齐原本仅由最外层表格提供的上、左边框。 + border-top: 1px solid var(--form-table-border-color); + border-left: 1px solid var(--form-table-border-color); + box-sizing: border-box; +} + +// 限制滚动区域宽度,避免 flex 子项把整个表单或页面撑开。 +.#{$elNamespace}-form-item__content:has(> ._fc-table-form), +._fc-table-form, +._fc-table-form > .form-create, +._fc-table-form > .form-create-m { + min-width: 0; + max-width: 100%; +} + +// 明细列表贴齐外层表格单元格的左右和底边,留白只保留在顶部工具栏。 +.form-table .#{$elNamespace}-form-item__content:has(> ._fc-table-form), +.form-table .#{$elNamespace}-form-item__content:has(> .fc-detail-group) { + padding: 0; +} + +// 分组运行时直接渲染嵌套表单,画布渲染为 _fd-row,四周均贴齐外层单元格。 +.form-table .#{$elNamespace}-form-item__content:has(> .form-create), +.form-table .#{$elNamespace}-form-item__content:has(> .form-create-m), +.form-table .#{$elNamespace}-form-item__content:has(> ._fd-row) { + padding: 0; +} + +.form-table ._fc-table-form > .fc-detail-toolbar, +.form-table .fc-detail-group > .fc-detail-toolbar { + padding: 4px 8px 8px; + margin-bottom: 0; +} + +._fc-table-form .fc-detail-scroll-table { + overflow: visible; + border-spacing: 0; + border-collapse: separate; + + .fc-detail-fixed-left, + .fc-detail-fixed-right { + z-index: 2; + background: var(--#{$elNamespace}-fill-color-blank); + } + + // 所有表头沿用操作列底色,固定列滚动时也保持一致。 + th, + th.fc-detail-fixed-left, + th.fc-detail-fixed-right { + z-index: 3; + background: var(--#{$elNamespace}-fill-color-light); + } + + .fc-detail-fixed-left { + box-shadow: 1px 0 0 var(--#{$elNamespace}-border-color-lighter); + } + + .fc-detail-fixed-right { + box-shadow: -1px 0 0 var(--#{$elNamespace}-border-color-lighter); + } +} + +// 子表单每组使用顶部序号与操作栏,字段区域贴齐外层容器。 +.fc-detail-group { + min-width: 0; + min-height: 0; + + > .fc-detail-group__item { + min-width: 0; + padding: 0; + margin: 0; + } + + .fc-detail-group__header { + display: flex; + align-items: center; + gap: 8px; + padding: 4px 8px; + background: var(--form-table-label-bg, var(--#{$elNamespace}-fill-color-light)); + border-top: 1px solid var(--form-table-border-color, var(--#{$elNamespace}-border-color)); + } + + .fc-detail-group__index { + // 圆形序号使用红底白字,数字居中显示。 + display: inline-flex; + align-items: center; + justify-content: center; + width: 24px; + height: 24px; + flex-shrink: 0; + font-size: 12px; + font-weight: 600; + color: #fff; + background: var(--#{$elNamespace}-color-danger); + border-radius: 50%; + } + + .fc-detail-group__title { + min-width: 0; + overflow-wrap: anywhere; + font-weight: var(--fc-group-title-weight, 600); + } + + .fc-detail-group__actions { + display: flex; + align-items: center; + flex-shrink: 0; + gap: 8px; + margin-left: auto; + } +} + +// 明细工具栏沿用 ITSM 的描边小按钮,独立于下方横向滚动区域。 +._fc-table-form > .fc-detail-toolbar, +.fc-detail-group > .fc-detail-toolbar { + display: flex; + align-items: center; + flex-wrap: wrap; + gap: 8px; + margin-bottom: 8px; +} + +.fc-detail-toolbar > .fc-detail-tool-button { + display: inline-flex; + align-items: center; + justify-content: center; + gap: 4px; + padding: 4px 10px; + color: #475569; + font-family: inherit; + font-size: 12px; + font-weight: 400; + line-height: 16px; + background: #fff; + border: 1px solid #e2e8f0; + border-radius: 8px; + cursor: pointer; + transition: background-color 0.15s; + + > svg { + width: 14px; + height: 14px; + flex-shrink: 0; + } + + &:hover:not(:disabled) { + background: #f8fafc; + } + + &:disabled { + cursor: not-allowed; + opacity: 0.5; + } + + &--danger { + color: var(--#{$elNamespace}-color-danger); + } +} + +// 整行选中采用浅色背景,固定列同样标记;不改变输入组件自身的背景。 +._fc-table-form tr.is-detail-selected > td, +._fc-table-form tr.is-detail-selected > td.fc-detail-fixed-left, +._fc-table-form tr.is-detail-selected > td.fc-detail-fixed-right { + background: color-mix(in srgb, var(--#{$elNamespace}-color-primary-light-9) 40%, var(--#{$elNamespace}-fill-color-blank)); +} + +// 子表单整项选中,边框标记覆盖多行布局,抬头同步展示选中底色。 +.fc-detail-group__item.is-detail-selected { + background: color-mix(in srgb, var(--#{$elNamespace}-color-primary-light-9) 40%, var(--#{$elNamespace}-fill-color-blank)); + outline: 1px solid var(--#{$elNamespace}-color-primary-light-9); + outline-offset: -1px; + + > .fc-detail-group__header { + background: color-mix(in srgb, var(--#{$elNamespace}-color-primary-light-9) 40%, var(--#{$elNamespace}-fill-color-blank)); + } +} + +// 行内删除使用红色文字按钮,首行按钮由明细组件隐藏。 +._fc-table-form .fc-detail-row-delete, +.fc-detail-group .fc-detail-row-delete { + align-items: center; + padding: 0; + color: var(--#{$elNamespace}-color-danger); + font-family: inherit; + font-size: 14px; + line-height: 1.5; + background: transparent; + border: 0; + cursor: pointer; + + &:hover:not(:disabled) { + color: var(--#{$elNamespace}-color-danger-light-3); + } + + &:disabled { + cursor: not-allowed; + opacity: 0.5; + } +} + +// 明细单元格已有边框,内部字段不再继承外层表格容器的单元格边框与留白。 +.form-table ._fc-table-form .#{$elNamespace}-form-item { + height: auto; + border: 0; + + .#{$elNamespace}-form-item__content { + padding: 0; + } +} diff --git a/src/components/FormCreate/src/type/index.ts b/src/components/FormCreate/src/type/index.ts new file mode 100644 index 0000000..500f87e --- /dev/null +++ b/src/components/FormCreate/src/type/index.ts @@ -0,0 +1,34 @@ +import type { SelectParamDef } from '@/components/FormCreate/src/config/selectParams' + +// 左侧拖拽按钮 +export interface MenuItem { + label: string + name: string + icon: string +} + +// 左侧拖拽按钮分类 +export interface Menu { + title: string + name: string + list: MenuItem[] +} + +// 通用下拉组件 Props 类型 +export interface ApiSelectProps { + name: string // 组件名称 + labelField?: string // 选项标签 + valueField?: string // 选项的值 + url?: string // url 接口 + isDict?: boolean // 是否字典选择器 + paramDefs?: SelectParamDef[] // 组件声明的查询参数,设计器面板按参数名展示取值配置 +} + +// 选择组件规则配置类型 +export interface SelectRuleOption { + label: string // label 名称 + name: string // 组件名称 + icon: string // 组件图标 + props?: any[] | ((rule: any) => any[]) // 组件规则;为函数时每次选中组件重新生成(如需列出当前表单字段) + event?: any[] // 事件配置 +} diff --git a/src/components/FormCreate/src/useFormCreateDesigner.ts b/src/components/FormCreate/src/useFormCreateDesigner.ts new file mode 100644 index 0000000..392ce26 --- /dev/null +++ b/src/components/FormCreate/src/useFormCreateDesigner.ts @@ -0,0 +1,351 @@ +import { + useDeptSelectRule, + useRoleSelectRule, + usePostSelectRule, + useProcessInstanceSelectRule, + useDictSelectRule, + useEditorRule, + useFormTableRowRule, + useFormTableRule, + useLeaveDaysRule, + useTimeCalculationRule, + useUppercaseAmountRule, + useAmountCalculationRule, + useNumberingRule, + useItsmProjectSelectRule, + useAssetCardSelectRule, + useItsmResourceSelectRule, + useItsmProjectMemberSelectRule, + useSelectRule, + useUploadFileRule, + useUploadImgRule, + useUploadImgsRule +} from './config' +import { Ref } from 'vue' +import './designer-layout.scss' +import { configureDetailTable } from './config/detailTable' +import { configureFieldDefaults } from './config/fieldDefaults' +import { configureCommonProps, labelBoldBaseRule } from './config/commonProps' +import { configureTableColumn } from './config/tableColumn' +import { getScopedAmountOptions, getScopedFieldOptions } from './config/useAmountCalculationRule' +import { Menu } from '@/components/FormCreate/src/type' +import { + apiSelectRule, + customParamsRule, + requireParamsRule +} from '@/components/FormCreate/src/config/selectRule' +import { + buildParamConfigRules, + USER_SELECT_PARAMS +} from '@/components/FormCreate/src/config/selectParams' +import { generateUUID } from '@/utils' +import { makeProcessScopeRule } from './utils/selectionScope' + +/** + * 表单设计器增强 hook + * 新增 + * - 文件上传 + * - 单图上传 + * - 多图上传 + * - 字典选择器 + * - 用户选择器 + * - 部门选择器 + * - 请假天数 + * - 大写金额 + * - 富文本 + * - 表格容器、表格行 + */ +export const useFormCreateDesigner = async (designer: Ref) => { + const editorRule = useEditorRule() + const uploadFileRule = useUploadFileRule() + const uploadImgRule = useUploadImgRule() + const uploadImgsRule = useUploadImgsRule() + + /** + * 构建表单组件 + */ + const buildFormComponents = () => { + // 移除自带的上传组件规则,使用 uploadFileRule、uploadImgRule、uploadImgsRule 替代 + designer.value?.removeMenuItem('upload') + // 移除自带的富文本组件规则,使用 editorRule 替代 + designer.value?.removeMenuItem('fcEditor') + const components = [editorRule, uploadFileRule, uploadImgRule, uploadImgsRule] + components.forEach((component) => { + // 同时注册分类和完整规则,类型切换依赖菜单项的 rule 方法。 + designer.value?.addComponent({ ...component, menu: 'main' }) + }) + } + + /** + * 构建布局组件:表格容器、表格行(行只能放进表格容器) + */ + const buildLayoutComponents = () => { + ;[useFormTableRule(), useFormTableRowRule()].forEach((component) => { + designer.value?.addComponent(component) + // 指定 menu 的组件会由 addComponent 自动加入菜单,避免重复添加表格容器。 + if ('menu' in component && component.menu) return + designer.value?.appendMenuItem('layout', component) + }) + } + + /** 常用表单布局集中置顶,仅移动菜单项,保留组件原有拖放限制和规则。 */ + const buildFormLayoutMenu = () => { + const editor = designer.value + if (!editor) return + const names = ['fcTitle', 'FormTable', 'FormTableRow', 'text', 'tableForm', 'group'] + const items: Menu['list'] = editor.menuList.flatMap((menu: Menu) => menu.list) + const list = names.flatMap((name) => items.filter((item) => item.name === name)) + names.forEach((name) => editor.removeMenuItem(name)) + editor.addMenu({ name: 'formLayout', title: '表单布局', before: true, list }) + + // 其余布局保持原顺序,表格布局放在该分组末尾。 + const layout: Menu | undefined = editor.menuList.find((menu: Menu) => menu.name === 'layout') + if (layout) { + editor.setMenuItem('layout', [ + ...layout.list.filter((item) => item.name !== 'fcTable'), + ...layout.list.filter((item) => item.name === 'fcTable') + ]) + } + } + + /** + * 当前表单中可被引用的字段(排除组件自身),选中组件时实时读取设计器规则;传入 types 时只列出这些类型的字段 + */ + const getFieldOptions = (currentRule: any, types?: string[]) => { + const options: { label: string; value: string }[] = [] + const walk = (rules: any[]) => { + rules.forEach((rule: any) => { + if ( + rule?.field && + rule.field !== currentRule?.field && + (!types || types.includes(rule.type)) + ) { + options.push({ label: `${rule.title || rule.field}(${rule.field})`, value: rule.field }) + } + if (Array.isArray(rule?.children)) { + walk(rule.children) + } + }) + } + walk(designer.value?.getRule() || []) + return options + } + + const userSelectRule = useSelectRule({ + name: 'UserSelect', + label: '用户选择器', + icon: 'icon-user-o', + // 参数名由组件声明(如按部门过滤),面板只选择取值来源 + props: (rule) => [ + makeProcessScopeRule(), + ...buildParamConfigRules(USER_SELECT_PARAMS, getFieldOptions(rule)), + requireParamsRule + ] + }) + // 关联人员允许多选,仅提供保存编号的同作用域人员字段。 + const roleSelectRule = useRoleSelectRule((rule) => getScopedFieldOptions( + designer.value?.getRule() || [], rule.field, ['userselect'], + (field) => field.props?.returnType !== 'name' + && (!field.props?.valueField || field.props.valueField === 'id') + )) + // 部门选择器按上下级以树形展示 + const deptSelectRule = useDeptSelectRule((rule) => getScopedFieldOptions( + designer.value?.getRule() || [], rule.field, ['userselect'], + (field) => !field.props?.multiple && field.props?.returnType !== 'name' + && field.props?.selectType !== 'checkbox' + && (!field.props?.valueField || field.props.valueField === 'id') + ), (rule) => getScopedFieldOptions( + designer.value?.getRule() || [], rule.field, ['deptselect'], + (field) => field.props?.returnType !== 'name' + )) + const postSelectRule = usePostSelectRule((rule, type) => getScopedFieldOptions( + designer.value?.getRule() || [], rule.field, [type], + (field) => !field.props?.multiple && field.props?.returnType !== 'name' + && field.props?.selectType !== 'checkbox' + && (!field.props?.valueField || field.props.valueField === 'id') + )) + const dictSelectRule = useDictSelectRule() + const processInstanceSelectRule = useProcessInstanceSelectRule(() => designer.value?.getRule() || []) + // 请假天数:属性中选择起止日期、上下午字段 + const leaveDaysRule = useLeaveDaysRule(getFieldOptions) + const apiSelectRule0 = useSelectRule({ + name: 'ApiSelect', + label: '接口选择器', + icon: 'icon-server', + props: [...apiSelectRule, customParamsRule, requireParamsRule], + event: ['click', 'change', 'visibleChange', 'clear', 'blur', 'focus'] + }) + + /** + * 构建系统字段菜单 + */ + const buildSystemMenu = () => { + // 移除自带的下拉选择器组件,使用 currencySelectRule 替代 + // designer.value?.removeMenuItem('select') + // designer.value?.removeMenuItem('radio') + // designer.value?.removeMenuItem('checkbox') + const components = [userSelectRule, roleSelectRule, deptSelectRule, postSelectRule, processInstanceSelectRule, dictSelectRule, apiSelectRule0] + const menu: Menu = { + name: 'system', + title: '系统字段', + list: [] + } + designer.value?.addMenu(menu) + // 分类先创建,由 addComponent 自动加入完整菜单项,避免重复注册。 + components.forEach((component) => { + designer.value?.addComponent({ ...component, menu: menu.name }) + }) + } + + /** 业务组件集中展示,复用原有请假天数及其字段配置。 */ + const buildBusinessMenu = () => { + const getRules = () => designer.value?.getRule() || [] + const components = [ + leaveDaysRule, + useTimeCalculationRule((rule) => getScopedFieldOptions(getRules(), rule.field, ['datepicker'], + (field) => ['date', 'datetime'].includes(field.props?.type || 'date'))), + useUppercaseAmountRule((rule) => getScopedAmountOptions(getRules(), rule.field)), + useAmountCalculationRule(getRules), + useNumberingRule((rule) => getScopedFieldOptions(getRules(), rule.field, ['deptselect'])), + // ITSM 项目选择:带出项目台账信息到同一作用域的文本、数字、字典字段 + useItsmProjectSelectRule((rule) => getScopedFieldOptions(getRules(), rule.field, + ['input', 'inputnumber', 'el-input-number', 'dictselect', 'select'])), + useItsmResourceSelectRule(), + // 资产选择:带出资产台账信息到同一作用域(明细表格内为同一行)的文本、数字、日期、字典字段 + useAssetCardSelectRule((rule) => getScopedFieldOptions(getRules(), rule.field, + ['input', 'inputnumber', 'el-input-number', 'dictselect', 'select', 'datepicker'])), + useItsmProjectMemberSelectRule( + // 列表内成员可关联主表项目,带出目标仍限定在当前行。 + (rule) => getScopedFieldOptions(getRules(), rule.field, ['itsmprojectselect'], undefined, true), + (rule) => getScopedFieldOptions(getRules(), rule.field, ['input', 'select'])) + ] + designer.value?.addMenu({ + name: 'business', + title: '业务组件', + list: [] + }) + // 业务组件沿用设计器的同分类切换,同时保留属性配置和规则工厂。 + components.forEach((component) => { + designer.value?.addComponent({ ...component, menu: 'business' }) + }) + } + + /** + * 修复重复的字段 ID 问题 + * 当复制组件时,自动为新组件生成新的字段 ID + */ + const fixDuplicateFields = () => { + // 获取当前所有规则 + const rules = designer.value?.getRule() || [] + const fieldIds = new Set() + let hasChanges = false + + // 遍历所有规则(含表格容器等布局里的字段),检测并修复重复的字段 ID + const walk = (list: any[]) => { + list.forEach((rule: any) => { + if (rule?.field) { + if (fieldIds.has(rule.field)) { + // 发现重复,生成新的ID + rule.field = generateUUID() + hasChanges = true + } else { + fieldIds.add(rule.field) + } + } + if (Array.isArray(rule?.children)) { + walk(rule.children) + } + }) + } + walk(rules) + + // 如果有重复字段被修复,更新设计器 + if (hasChanges) { + designer.value?.setRule(rules) + } + + return hasChanges + } + + onMounted(async () => { + await nextTick() + buildFormComponents() + buildLayoutComponents() + buildSystemMenu() + buildBusinessMenu() + // 基础组件、系统字段和业务组件可跨分类切换,沿用设计器的字段编号保留逻辑;布局容器不参与。 + const editor = designer.value + if (editor && editor.getConfig('switchType', []) !== false) { + const fields = editor.menuList + .filter((menu: Menu) => ['main', 'system', 'business'].includes(menu.name)) + .flatMap((menu: Menu) => menu.list.map((item) => item.name)) + editor.$props.config.switchType = [...editor.getConfig('switchType', []), fields] + } + configureDetailTable(designer.value) + configureFieldDefaults(designer.value) + configureCommonProps(designer.value) + configureTableColumn(designer.value) + buildFormLayoutMenu() + + // 设计器按组件缓存属性面板;重新选中关联组件时刷新,包含后来新增或重命名的字段。 + watch( + () => designer.value?.activeRule, + (rule) => { + if (['AmountCalculation', 'UppercaseAmount', 'Numbering', 'TimeCalculation', 'DeptSelect', 'PostSelect', 'ProcessInstanceSelect', 'input', 'textarea', 'password'].includes(rule?.type)) { + delete designer.value.cacheProps[rule._fc_id] + } + }, + { flush: 'sync' } + ) + + // 通用基础配置只保留字段名位置和字重,组件不再提供栅格列宽入口。 + designer.value?.setBaseRuleConfig( + () => [ + { + type: 'select', + field: 'formCreateWrap>labelPosition', + title: '字段名位置', + value: '', + options: [ + { label: '跟随表单', value: '' }, + { label: '左侧', value: 'left' }, + { label: '顶部', value: 'top' } + ] + }, + labelBoldBaseRule() + ], + true + ) + + // 设计器切换类型时未复制 col,在面板回填前保留同一字段的原始栅格配置。 + watch( + () => designer.value?.activeRule, + (rule, previousRule) => { + if ( + rule?.field && + rule.field === previousRule?.field && + rule !== previousRule && + rule._menu?.name !== previousRule._menu?.name + ) { + rule.col = { ...previousRule.col } + } + }, + { flush: 'sync' } + ) + + // 监听设计器内容变化,自动修复重复字段ID + let isFixing = false // 防止无限循环 + watch( + () => designer.value?.getRule(), + async () => { + if (!isFixing) { + isFixing = true + await nextTick() + fixDuplicateFields() + isFixing = false + } + }, + { deep: true } + ) + }) +} diff --git a/src/components/FormCreate/src/utils/amountCalculation.ts b/src/components/FormCreate/src/utils/amountCalculation.ts new file mode 100644 index 0000000..136a786 --- /dev/null +++ b/src/components/FormCreate/src/utils/amountCalculation.ts @@ -0,0 +1,99 @@ +/** 金额计算类型,设计器配置和运行时使用相同的取值。 */ +export const AMOUNT_CALCULATION_TYPE = { + PRODUCT: 'product', // 字段一 × 字段二 + LIST_SUM: 'listSum', // 列表指定字段求和 + DIFFERENCE: 'difference', // 字段一 − 字段二 + SUM: 'sum' // 字段一 + 字段二 +} as const + +export type AmountCalculationType = + (typeof AMOUNT_CALCULATION_TYPE)[keyof typeof AMOUNT_CALCULATION_TYPE] + +/** 十进制系数及小数位数,计算过程中不使用二进制浮点数。 */ +interface DecimalValue { + coefficient: bigint + scale: number +} + +const MONEY_SCALE = 2 +const MAX_DECIMAL_DIGITS = 80 + +/** 空白不当成零,合法的数字 0 仍参与计算。 */ +export const isEmptyAmount = (value: unknown) => + value === undefined || value === null || (typeof value === 'string' && !value.trim()) + +/** 兼容计数器传入的数字、金额字符串,以及极小数的科学计数法。 */ +const parseDecimal = (value: unknown): DecimalValue | undefined => { + if (typeof value !== 'number' && typeof value !== 'string') return + if (typeof value === 'number' && !Number.isFinite(value)) return + const matched = String(value).trim().match(/^([+-]?)(\d+)(?:\.(\d*))?(?:e([+-]?\d+))?$/i) + if (!matched) return + const fraction = matched[3] || '' + const exponent = Number(matched[4] || 0) + if (matched[2].length + fraction.length > MAX_DECIMAL_DIGITS || Math.abs(exponent) > MAX_DECIMAL_DIGITS) return + let coefficient = BigInt(matched[2] + fraction) * (matched[1] === '-' ? -1n : 1n) + let scale = fraction.length - exponent + if (scale < 0) { + coefficient *= 10n ** BigInt(-scale) + scale = 0 + } + return { coefficient, scale } +} + +/** 对齐小数位后相加,减法也复用此函数。 */ +const addDecimal = (left: DecimalValue, right: DecimalValue): DecimalValue => { + const scale = Math.max(left.scale, right.scale) + return { + coefficient: left.coefficient * 10n ** BigInt(scale - left.scale) + + right.coefficient * 10n ** BigInt(scale - right.scale), + scale + } +} + +/** 四舍五入到分,保存精确的小数字符串,避免较大金额转 Number 后丢失分位。 */ +const formatMoney = ({ coefficient, scale }: DecimalValue): string => { + const negative = coefficient < 0n + let cents = negative ? -coefficient : coefficient + if (scale > MONEY_SCALE) { + const divisor = 10n ** BigInt(scale - MONEY_SCALE) + cents = cents / divisor + (cents % divisor * 2n >= divisor ? 1n : 0n) + } else { + cents *= 10n ** BigInt(MONEY_SCALE - scale) + } + const digits = cents.toString().padStart(MONEY_SCALE + 1, '0') + return `${negative && cents !== 0n ? '-' : ''}${digits.slice(0, -MONEY_SCALE)}.${digits.slice(-MONEY_SCALE)}` +} + +/** 两个字段相乘、相减或相加;缺项、非法数值时清空结果,不保留上次的金额。 */ +export const calculateFieldAmount = ( + type: AmountCalculationType, + first: unknown, + second: unknown +): string | undefined => { + const left = parseDecimal(first) + const right = parseDecimal(second) + if (!left || !right) return + if (type === AMOUNT_CALCULATION_TYPE.PRODUCT) { + return formatMoney({ coefficient: left.coefficient * right.coefficient, scale: left.scale + right.scale }) + } + if (type === AMOUNT_CALCULATION_TYPE.DIFFERENCE) { + return formatMoney(addDecimal(left, { coefficient: -right.coefficient, scale: right.scale })) + } + if (type === AMOUNT_CALCULATION_TYPE.SUM) { + return formatMoney(addDecimal(left, right)) + } +} + +/** 列表忽略空行;有非空非法金额时不生成不完整的总额,全部为空时保持空白。 */ +export const sumListAmounts = (rows: unknown, field: string): string | undefined => { + if (!field || !Array.isArray(rows)) return + let total: DecimalValue | undefined + for (const row of rows) { + const value = row?.[field] + if (isEmptyAmount(value)) continue + const decimal = parseDecimal(value) + if (!decimal) return + total = total ? addDecimal(total, decimal) : decimal + } + return total ? formatMoney(total) : undefined +} diff --git a/src/components/FormCreate/src/utils/deptSelect.ts b/src/components/FormCreate/src/utils/deptSelect.ts new file mode 100644 index 0000000..8c24360 --- /dev/null +++ b/src/components/FormCreate/src/utils/deptSelect.ts @@ -0,0 +1,47 @@ +/** 部门选择器的查询范围;未配置的历史表单沿用全部组织。 */ +export enum DeptQueryScope { + ALL = 'all', + ORGANIZATION = 'organization' +} + +/** 组织管理中的真实类型:集团和所属企业,不包含部门、外部组织。 */ +const ORGANIZATION_TYPES = new Set(['group', 'company']) + +/** 按真实组织层级取所选部门最近的公司/集团;多个部门的所属单位合并去重。 */ +export const getDepartmentOrganizationIds = (tree: any[], departmentIds: (number | string)[]): (number | string)[] => { + const departments = new Set(departmentIds.map(String)) + const organizations = new Map() + const walk = (nodes: any[], organization?: any) => nodes.forEach((node) => { + const nearest = ORGANIZATION_TYPES.has(node.orgType) ? node : organization + if (departments.has(String(node.id)) && nearest) organizations.set(String(nearest.id), nearest.id) + walk(node.children || [], nearest) + }) + walk(tree) + return [...organizations.values()] +} + +/** + * 上级选择器限定全部下级(不含自身),多选取并集,再按查询范围过滤。 + * 未关联时 parentIds 为 undefined;关联但未选上级时为空数组,不退回全量组织。 + */ +export const filterDeptTree = ( + tree: any[], scope: DeptQueryScope, parentIds?: (number | string)[], + allowedDeptIds?: (number | string)[], leafOnly = false +): any[] => { + const parents = parentIds && new Set(parentIds.map(String)) + // 固定名单只包含明确选择的部门,祖先保留作层级展示,不自动开放下级。 + const allowed = allowedDeptIds?.length ? new Set(allowedDeptIds.map(String)) : undefined + const walk = (nodes: any[], withinParent = !parents): any[] => nodes.flatMap((node) => { + const children = walk(node.children || [], withinParent || !!parents?.has(String(node.id))) + const visible = withinParent + && (scope !== DeptQueryScope.ORGANIZATION || ORGANIZATION_TYPES.has(node.orgType)) + // 被过滤的中间节点不显示,下级组织提升到最近的可见父级。 + if (!visible) return children + if (!allowed) return [{ ...node, children }] + const selectable = allowed.has(String(node.id)) && !node.disabled + && (!leafOnly || !node.children?.length) + return selectable || children.length + ? [{ ...node, children, disabled: !selectable }] : [] + }) + return walk(tree) +} diff --git a/src/components/FormCreate/src/utils/detailActions.ts b/src/components/FormCreate/src/utils/detailActions.ts new file mode 100644 index 0000000..a4d1b25 --- /dev/null +++ b/src/components/FormCreate/src/utils/detailActions.ts @@ -0,0 +1,19 @@ +import { ElMessageBox } from 'element-plus' + +/** 清空后恢复默认项数,同时遵守现有最少、最多项数配置。 */ +export const getInitialDetailCount = (initial: number | undefined, min = 0, max = 0) => { + const count = Math.max(0, Math.floor(initial ?? 1), Math.floor(min)) + return max > 0 ? Math.min(count, Math.floor(max)) : count +} + +/** 取消关闭确认框时保持原数据,只有明确确认才执行批量清空。 */ +export const confirmClearDetails = async () => { + try { + await ElMessageBox.confirm('将删除全部已填写的数据,并恢复初始空白项,是否继续?', '删除全部', { + type: 'warning', confirmButtonText: '确定', cancelButtonText: '取消' + }) + return true + } catch { + return false + } +} diff --git a/src/components/FormCreate/src/utils/fieldDefaults.ts b/src/components/FormCreate/src/utils/fieldDefaults.ts new file mode 100644 index 0000000..392e131 --- /dev/null +++ b/src/components/FormCreate/src/utils/fieldDefaults.ts @@ -0,0 +1,266 @@ +import formCreate from '@form-create/element-ui' +import dayjs from 'dayjs' +import { cloneDeep } from 'lodash-es' +import { getCurrentUserValue } from '../config/selectParams' +import type { Api } from '@form-create/element-ui' +import { markRaw } from 'vue' +import ConfidentialInput from '../components/ConfidentialInput.vue' +import { isProcessFieldReadOnly } from './processFieldPermission' + +/** 表单规则含布局、子表单等动态属性,与 form-create 保持相同结构。 */ +type FieldRule = Record + +/** 仅真正的空值使用默认值,数字 0 和布尔值 false 均为已填写。 */ +const isBlank = (value: unknown) => + value === undefined || value === null || value === '' || (Array.isArray(value) && !value.length) + +/** 收集列内字段默认值,包含布局容器中的字段;每行独立复制,避免数组、对象相互影响。 */ +export const collectColumnDefaults = (rules: FieldRule[], defaults: FieldRule) => { + rules.forEach((rule) => { + if (!rule || typeof rule !== 'object') return + if (rule.field && rule.value !== undefined) defaults[rule.field] = rule.value + if (Array.isArray(rule.children)) collectColumnDefaults(rule.children, defaults) + }) +} + +/** 日期默认值统一使用字段的格式;日期范围和多日期保留各自的数据结构。 */ +const getCurrentDateDefault = (props: FieldRule, now: ReturnType) => { + const pickerType = props.type || 'date' + const formats: Record = { + year: 'YYYY', month: 'YYYY-MM', week: 'YYYY-wo', datetime: 'YYYY-MM-DD HH:mm:ss', + datetimerange: 'YYYY-MM-DD HH:mm:ss' + } + const format = props.valueFormat || formats[pickerType] || 'YYYY-MM-DD' + const value = format === 'x' ? String(now.valueOf()) + : format === 'X' ? String(now.unix()) : now.format(format) + return pickerType.includes('range') ? [value, value] + : pickerType === 'dates' ? [value] : value +} + +/** 禁用、只读或隐藏的字段及其子字段都不应提前生成按节点初始化的日期。 */ +const isDateDefaultDisabled = (rule: FieldRule) => + !!(isProcessFieldReadOnly(rule) || rule.props?.disabled || rule.props?.readonly || rule.props?.readOnly || rule.hidden || rule.display === false) + +/** 新建/预览时初始化;流程页面尚未加载节点权限时,延后处理勾选禁用限制的日期。 */ +export const applyDynamicDefaults = ( + rules: FieldRule[], values: FieldRule = {}, deferDisabledDates = false, + readUser: (key: string) => unknown = getCurrentUserValue +) => { + const now = dayjs() + const walk = (list: FieldRule[], data: FieldRule, parentDisabled = false) => { + list.forEach((rule) => { + if (!rule || typeof rule !== 'object') return + const props = rule.props || {} + const type = String(rule.type || '').toLowerCase() + const disabled = parentDisabled || isDateDefaultDisabled(rule) + // 仅新建填报/模板预览的规则副本允许异步初始化部门;流程详情与历史回填不带此标记。 + if (type === 'deptselect') { + rule.props = { ...props, initializeOrganization: isBlank(rule.value) && isBlank(data[rule.field]) } + } + // 岗位异步查询的唯一结果仅在新建、预览时自动带出,已有岗位不覆盖。 + if (type === 'postselect') { + rule.props = { ...props, initializePost: isBlank(rule.value) && isBlank(data[rule.field]) } + } + if (rule.field && isBlank(rule.value) && isBlank(data[rule.field])) { + if (type === 'datepicker' && props.defaultCurrentTime) { + if (!props.skipDefaultWhenDisabled || (!deferDisabledDates && !disabled)) { + rule.value = getCurrentDateDefault(props, now) + } + } else if (type === 'userselect' && props.defaultCurrentUser) { + const user = readUser(props.returnType === 'name' ? 'nickname' : 'id') + const multiple = props.selectType === 'checkbox' || (props.selectType !== 'radio' && props.multiple) + if (!isBlank(user)) rule.value = multiple ? [user] : user + } + } + if (Array.isArray(rule.children)) walk(rule.children, data, disabled) + // 子表单和明细列保留同样的默认值规则,新增行沿用组件原有的行模板。 + if (Array.isArray(props.rule)) walk(props.rule, data[rule.field] || {}, disabled) + ;(props.columns || []).forEach((column: FieldRule) => { + if (Array.isArray(column.rule)) walk(column.rule, {}, disabled) + }) + // 先生成列的动态默认值,再构造初始明细,避免原生组件回填空对象时清空默认值。 + // 回填数组(包括主动清空后的 [])保持原样,默认行数不是最小行数限制。 + if (type === 'tableform' && rule.field && !Object.prototype.hasOwnProperty.call(data, rule.field)) { + const defaults: FieldRule = {} + ;(props.columns || []).forEach((column: FieldRule) => { + if (Array.isArray(column.rule)) collectColumnDefaults(column.rule, defaults) + }) + const configuredRows = Number(props.initialRows ?? 1) + let count = Number.isFinite(configuredRows) ? Math.max(0, Math.floor(configuredRows)) : 1 + if (Number(props.max) > 0) count = Math.min(count, Math.floor(Number(props.max))) + const rows = Array.isArray(rule.value) && rule.value.length + ? rule.value : Array.from({ length: count }, () => ({})) + rule.value = rows.map((row: FieldRule) => ({ ...cloneDeep(defaults), ...cloneDeep(row) })) + } + }) + } + walk(rules, values) +} + +/** 节点权限生效后,仅为空且可编辑的勾选日期赋值;普通详情及未勾选字段不受影响。 */ +export const applyEnabledDateDefaults = ( + rules: FieldRule[], api: Api | undefined, + writableFields?: string[] +) => { + if (!api) return + const now = dayjs() + const writable = writableFields ? new Set(writableFields) : undefined + const walk = (list: FieldRule[], currentApi: Api, parentDisabled = false, nested = false) => { + list.forEach((rule) => { + if (!rule || typeof rule !== 'object') return + const currentRule = rule.field ? currentApi.getRule(rule.field) : rule + const effectiveRule = currentRule || rule + const props = effectiveRule.props || {} + const disabled = parentDisabled || isDateDefaultDisabled(effectiveRule) + const allowed = !writable || nested || writable.has(rule.field) + if (currentRule && rule.field && String(rule.type).toLowerCase() === 'datepicker' + && props.defaultCurrentTime && props.skipDefaultWhenDisabled && !disabled + && allowed && isBlank(currentRule.value) && isBlank(currentApi.getValue(rule.field))) { + currentApi.setValue(rule.field, getCurrentDateDefault(props, now)) + } + if (Array.isArray(rule.children)) walk(rule.children, currentApi, disabled, nested) + // 子表单及明细按每行真实 API 初始化,继承外层权限,不修改共享列模板。 + if (rule.field && !disabled && allowed && (Array.isArray(props.rule) || Array.isArray(props.columns))) { + const subForms = currentApi.getSubForm(rule.field) + ;(Array.isArray(subForms) ? subForms : [subForms]).forEach((subForm) => { + if (subForm) walk(subForm.rule as FieldRule[], subForm, disabled, true) + }) + } + }) + } + walk(rules, api) +} + +/** 主表单与设计画布各自注册一次,避免重复套用解析器。 */ +const configuredForms = new WeakSet() + +/** 公共渲染入口补齐占位提示,保留组件原有解析器和自定义提示。 */ +export const setupFieldDefaults = (form = formCreate) => { + if (configuredForms.has(form)) return + configuredForms.add(form) + // 文字组件使用原生 div;仅为纯文字规则补齐说明行样式,保留设计器中单独配置的样式。 + const textParser = form.parser('div') + form.parser({ + name: 'div', + merge: true, + mergeProp(ctx: any) { + textParser?.mergeProp?.(ctx) + const { native, children } = ctx.rule + if (!native || !Array.isArray(children) + || children.some((child: unknown) => typeof child !== 'string')) return + // 原生文字没有表单项包装层,使用独立样式类补齐表格中的单元格边框。 + ctx.prop.class = [ctx.prop.class, 'fc-form-text'] + ctx.prop.style = { + background: 'var(--form-table-label-bg, var(--el-fill-color-light))', + color: 'var(--el-text-color-regular)', + padding: '8px 12px', + boxSizing: 'border-box', + lineHeight: '1.5', + ...ctx.prop.style + } + } + }) + // 画布、预览与实际填报统一使用周报附件样式;历史明确设置的大小限制保留。 + const uploadParser = form.parser('UploadFile') + form.parser({ + name: 'UploadFile', + merge: true, + mergeProp(ctx: any) { + uploadParser?.mergeProp?.(ctx) + ctx.prop.props.attachmentStyle = true + ctx.prop.props.fileSize = ctx.rule.props?.fileSize ?? 20 + } + }) + // 子表单统一设置字段名宽度与字重;画布中的 group 会转换为 FcRow,也使用相同规则。 + ;['group', 'FcRow'].forEach((name) => { + const original = form.parser(name) + form.parser({ + name, + merge: true, + mergeProp(ctx: any) { + original?.mergeProp?.(ctx) + if (name === 'FcRow' && ctx.rule._fc_drag_tag !== 'group') return + const props = ctx.prop.props + const configured = Number(String(props.labelWidth ?? props.options?.form?.labelWidth ?? 90).trim().replace(/px$/, '')) + const width = Number.isFinite(configured) && configured > 0 ? configured : 90 + // 组件标题与内部字段名分别设置:标题默认加粗,内部字段名默认常规字重。 + const titleWeight = props.titleBold === false ? 400 : 600 + const labelWeight = props.labelBold === true ? 600 : 400 + ctx.prop.style = { + ...ctx.prop.style, + '--form-table-label-width': `${width}px`, + '--fc-field-label-weight': labelWeight, + '--fc-group-title-weight': titleWeight + } + // 外层标题使用独立字重,内部字段继续通过组件根节点继承 labelWeight。 + ctx.prop.wrap = { + ...ctx.prop.wrap, + style: { ...ctx.prop.wrap?.style, '--fc-field-label-weight': titleWeight } + } + // 展示配置不作为未知属性传给原生子表单组件。 + delete props.labelWidth + delete props.labelBold + delete props.titleBold + } + }) + }) + const inputTypes = new Set(['input', 'textarea', 'password']) + const placeholders: Record = { + input: '请输入', textarea: '请输入', password: '请输入', inputNumber: '请输入', + autoComplete: '请输入', datePicker: '请选择', timePicker: '请选择', + select: '请选择', cascader: '请选择', treeSelect: '请选择', + UserSelect: '请选择', ApiSelect: '请选择', DictSelect: '请选择', DeptSelect: '请选择部门', + PostSelect: '请选择岗位', RoleSelect: '请选择角色' + } + /** 下拉类组件默认支持输入筛选,保留表单中明确关闭搜索的配置。 */ + const searchableTypes = new Set(['select', 'cascader', 'treeSelect', 'UserSelect', 'ApiSelect', 'DictSelect', 'DeptSelect', 'PostSelect', 'RoleSelect']) + Object.entries(placeholders).forEach(([name, placeholder]) => { + const original = form.parser(name) + form.parser({ + name, + merge: true, + // 依赖库的解析上下文未公开具体类型,仅在此处读取组件 props。 + mergeProp(ctx: any) { + original?.mergeProp?.(ctx) + const props = ctx.prop.props + if (inputTypes.has(name)) { + const width = String(props.width ?? '').trim() + // 宽度作用于输入框本身;自动外边距负责整体对齐,字段名和文字排版沿用原规则。 + if (width) { + ctx.prop.style = { + ...ctx.prop.style, + width: /^\d+(\.\d+)?$/.test(width) ? `${width}px` : width, + maxWidth: '100%' + } + } + if (['left', 'center', 'right'].includes(props.align)) { + ctx.prop.style = { + ...ctx.prop.style, + marginLeft: props.align === 'left' ? '0' : 'auto', + marginRight: props.align === 'right' ? '0' : 'auto' + } + } + // 展示属性由解析器消费,不透传成原生输入元素的未知属性。 + delete props.width + delete props.align + } + // 仅配置涉密联动的原生输入框使用包装组件;规则、真实值和原有事件保持不变。 + if (['input', 'textarea', 'password'].includes(name) && props.confidentialField) { + ctx.prop.component = markRaw(ConfidentialInput) + } + if (!props.placeholder) props.placeholder = placeholder + if (searchableTypes.has(name) && ctx.rule.props?.filterable === undefined) { + props.filterable = true + } + if (name === 'datePicker' || name === 'timePicker') { + if (!props.startPlaceholder) props.startPlaceholder = '请选择开始时间' + if (!props.endPlaceholder) props.endPlaceholder = '请选择结束时间' + } + // 配置仅用于初始化,不透传到 Element Plus 的组件或原生节点。 + delete props.defaultCurrentTime + delete props.skipDefaultWhenDisabled + delete props.defaultCurrentUser + } + }) + }) +} diff --git a/src/components/FormCreate/src/utils/group.ts b/src/components/FormCreate/src/utils/group.ts new file mode 100644 index 0000000..8c9e559 --- /dev/null +++ b/src/components/FormCreate/src/utils/group.ts @@ -0,0 +1,164 @@ +import { defineComponent, h } from 'vue' +import formCreate from '@form-create/element-ui' +import { cloneDeep } from 'lodash-es' +import { confirmClearDetails, getInitialDetailCount } from './detailActions' + +/** 调整重复子表单的操作布局,继续复用原组件的数据同步和校验。 */ +export const setupDetailGroup = () => { + const original = formCreate.component('fcGroup') + formCreate.component('fcGroup', defineComponent({ + name: 'DetailGroup', + extends: original, + data() { + return { selectedDetailKey: '', clearingDetails: false } + }, + methods: { + /** 允许点击字段或空白选中整项,嵌套子表单仅选择最内层项。 */ + selectDetail(this: any, key: string, event: Event) { + if (!this.button || this.formCreateInject.preview || this.disabled || this.clearingDetails) return + if ((event.target as Element).closest('.fc-detail-group__item') === event.currentTarget) { + this.selectedDetailKey = key + } + }, + /** 读取当前子表单值,避免复制尚未同步到父表单的最后一次输入。 */ + detailValues(this: any) { + return this.sort.map((key: string, index: number) => { + const api = this.cacheRule[key].$f + if (!api) return this.modelValue[index] + const value = api.formData() + return this.field ? value[this.field] : value + }) + }, + /** 复制数据而非模板,嵌套明细及附件值均与源项解除对象引用。 */ + copySelectedDetail(this: any) { + const index = this.sort.indexOf(this.selectedDetailKey) + if (index < 0 || this.disabled || !this.button || this.formCreateInject.preview + || this.clearingDetails || (this.max > 0 && this.sort.length >= this.max)) return + const values = this.detailValues() + if (this.onBeforeAdd(values) === false) return + values.splice(index + 1, 0, cloneDeep(values[index])) + this.input(values) + }, + /** 整体重建空白项,保留默认值、最少项数和删除前回调。 */ + async clearDetails(this: any) { + if (this.disabled || !this.button || this.formCreateInject.preview || this.clearingDetails) return + this.clearingDetails = true + try { + if (!await confirmClearDetails() || this.disabled) return + const values = this.detailValues() + for (let index = values.length - 1; index >= 0; index--) { + if (await this.onBeforeRemove(values, index) === false) return + } + const count = getInitialDetailCount(this.expand, this.min, this.max) + this.selectedDetailKey = '' + this.sort.slice().forEach((key: string) => this.removeRule(key, true)) + this.input(Array.from({ length: count }, () => + this.defaultValue ? cloneDeep(this.defaultValue) : (this.field ? null : {}))) + } finally { + this.clearingDetails = false + } + }, + /** 顶部新增沿用原生默认值和前置回调,遵守按钮、只读及最多组数配置。 */ + add(this: any) { + if (!this.button || this.formCreateInject.preview || this.clearingDetails + || (this.max > 0 && this.sort.length >= this.max)) return + return original.methods.add.call(this) + }, + /** 首组保留,其余组沿用原生删除前回调与事件。 */ + del(this: any, index: number, key: string) { + if (!this.button || this.formCreateInject.preview || this.clearingDetails + || index === 0 || this.sort.length <= this.min) return + return original.methods.del.call(this, index, key) + } + }, + render(this: any) { + const editable = this.button && !this.formCreateInject.preview + const toolbar = editable + ? h('div', { class: 'fc-detail-toolbar fc-clock', role: 'group', 'aria-label': '子表单操作' }, [ + h('button', { + type: 'button', + class: 'fc-detail-tool-button', + disabled: this.disabled || this.clearingDetails || (this.max > 0 && this.sort.length >= this.max), + onClick: () => this.add() + }, [ + h('svg', { viewBox: '0 0 24 24', fill: 'none', stroke: 'currentColor', 'aria-hidden': 'true' }, [ + h('path', { + 'stroke-linecap': 'round', 'stroke-linejoin': 'round', 'stroke-width': 2, + d: 'M12 4v16m8-8H4' + }) + ]), + '新增' + ]), + h('button', { + type: 'button', class: 'fc-detail-tool-button', + disabled: this.disabled || this.clearingDetails || !this.sort.includes(this.selectedDetailKey) + || (this.max > 0 && this.sort.length >= this.max), + onClick: () => this.copySelectedDetail() + }, '复制'), + h('button', { + type: 'button', class: 'fc-detail-tool-button fc-detail-tool-button--danger', + disabled: this.disabled || this.clearingDetails || !this.sort.length, + onClick: () => this.clearDetails() + }, '删除全部') + ]) + : null + const items = this.sort.map((key: string, index: number) => { + const { rule, options } = this.cacheRule[key] + const title = this.getTitle(index, key) + const actions = editable + ? this.$slots.button + ? this.$slots.button({ + total: this.sort.length, index, vm: this, key, + del: () => this.del(index, key), add: () => this.add() + }) + : [ + index > 0 + ? h('button', { + type: 'button', + class: 'fc-detail-row-delete', + disabled: this.disabled || this.sort.length <= this.min, + onClick: () => this.del(index, key) + }, '删除') + : null, + ...(!this.disabled && this.sortBtn ? this.sortIcon(index, this.sort.length) : []) + ] + : [] + return h('div', { + key, + class: ['fc-detail-group__item', { + 'is-detail-selected': editable && !this.disabled && this.selectedDetailKey === key + }], + onClickCapture: (event: Event) => this.selectDetail(key, event), + onFocusinCapture: (event: Event) => this.selectDetail(key, event) + }, [ + h('div', { class: 'fc-detail-group__header' }, [ + h('span', { class: 'fc-detail-group__index' }, String(index + 1)), + title !== false ? h('span', { class: 'fc-detail-group__title' }, title) : null, + h('div', { class: 'fc-detail-group__actions fc-clock' }, actions) + ]), + h(this.form, { + ...this.$attrs, + key, + disabled: this.disabled, + 'onUpdate:modelValue': (value: any) => this.formData(key, value), + 'onUpdate:api': (api: any) => this.add$f(index, key, api), + inFor: true, + modelValue: this.field + ? { [this.field]: this._value(this.modelValue[index]) } + : this.modelValue[index], + rule, + option: options, + extendOption: true + }) + ]) + }) + // 保留调用方的空状态插槽;原生底部加减按钮不再渲染。 + const empty = !items.length && this.$slots.default + ? this.$slots.default({ vm: this, add: () => this.add() }) + : null + return h('div', { + class: ['_fc-group', 'fc-detail-group', { '_fc-group-disabled': this.disabled }] + }, [toolbar, ...items, empty]) + } + })) +} diff --git a/src/components/FormCreate/src/utils/index.ts b/src/components/FormCreate/src/utils/index.ts new file mode 100644 index 0000000..8e99f7a --- /dev/null +++ b/src/components/FormCreate/src/utils/index.ts @@ -0,0 +1,92 @@ +export function makeRequiredRule() { + return { + type: 'Required', + field: 'formCreate$required', + title: '是否必填' + } +} + +export const localeProps = (t, prefix, rules) => { + return rules.map((rule) => { + if (rule.field === 'formCreate$required') { + rule.title = t('props.required') || rule.title + } else if (rule.field && rule.field !== '_optionType') { + rule.title = t('components.' + prefix + '.' + rule.field) || rule.title + } + return rule + }) +} + +/** + * 解析表单组件的 field, title 等字段(递归,如果组件包含子组件) + * + * @param rule 组件的生成规则 https://www.form-create.com/v3/guide/rule + * @param fields 解析后表单组件字段 + * @param parentTitle 如果是子表单,子表单的标题,默认为空 + */ +/** 明细表列字段的分隔符,与后端 BpmFormFieldIdParseUtils.TABLE_COLUMN_SEPARATOR 一致 */ +export const TABLE_COLUMN_SEPARATOR = '.' + +/** + * 解析明细表(tableForm)各列中的字段,字段编码为“明细表字段.列字段” + * + * 只用于流程审批人、抄送人按明细列取人,不参与字段权限配置 + */ +export const parseTableColumnFields = ( + rule: Record, + fields: Array> = [] +) => { + if (rule?.type === 'tableForm' && rule.field && Array.isArray(rule.props?.columns)) { + const tableTitle = rule.title || rule.field + rule.props.columns.forEach((column: Record) => { + ;(column.rule || []).forEach((item: Record) => { + if (!item?.field) return + fields.push({ + field: `${rule.field}${TABLE_COLUMN_SEPARATOR}${item.field}`, + title: `${tableTitle}.${column.label || item.title || item.field}`, + type: item.type, + required: !!column.required, + props: item.props, + options: item.options + }) + }) + }) + } + if (Array.isArray(rule?.children)) { + rule.children.forEach((child: Record) => parseTableColumnFields(child, fields)) + } + return fields +} + +export const parseFormFields = ( + rule: Record, + fields: Array> = [], + parentTitle: string = '' +) => { + const { type, field, $required, title: tempTitle, children } = rule + if (field && tempTitle) { + let title = tempTitle + if (parentTitle) { + title = `${parentTitle}.${tempTitle}` + } + let required = false + if ($required) { + required = true + } + fields.push({ + field, + title, + type, + required, + // 组件属性和静态选项,供流程条件按组件类型提供右值下拉 + props: rule.props, + options: rule.options + }) + // 子表单(group)内的字段不单独解析,按整个子表单字段参与权限配置 + } + if (children && Array.isArray(children)) { + children.forEach((rule) => { + parseFormFields(rule, fields) + }) + } +} diff --git a/src/components/FormCreate/src/utils/localFormScript.ts b/src/components/FormCreate/src/utils/localFormScript.ts new file mode 100644 index 0000000..f4d9b86 --- /dev/null +++ b/src/components/FormCreate/src/utils/localFormScript.ts @@ -0,0 +1,313 @@ +import { parseExpressionAt } from 'acorn' + +/** 只解释表单本地脚本,不使用 eval/Function,也不向脚本提供浏览器或网络对象。 */ +type Node = any +type Scope = { values: Record; parent?: Scope; self?: any; functionScope?: boolean } +const forbidden = new Set(['constructor', 'prototype', '__proto__']) +const syntax = new Set([ + 'FunctionExpression', 'ArrowFunctionExpression', 'FunctionDeclaration', 'BlockStatement', + 'VariableDeclaration', 'VariableDeclarator', 'ExpressionStatement', 'IfStatement', 'ReturnStatement', + 'ThrowStatement', 'EmptyStatement', 'Identifier', 'Literal', 'ThisExpression', 'ArrayExpression', + 'ObjectExpression', 'Property', 'UnaryExpression', 'BinaryExpression', 'LogicalExpression', + 'ConditionalExpression', 'MemberExpression', 'CallExpression', 'NewExpression', 'ChainExpression', + 'ArrayPattern', 'ObjectPattern', 'AssignmentPattern', 'RestElement', 'SpreadElement', + 'AssignmentExpression', 'UpdateExpression', 'SequenceExpression', 'TemplateLiteral', 'TemplateElement' +]) +const apiMethods = [ + 'getValue', 'setValue', 'formData', 'getRule', 'getRenderRule', 'getParentSubRule', + 'getChildrenFormData', 'setChildrenFormData', 'clearValidateState', 'validateField', 'validateFields', + 'hidden', 'disabled', 'required' +] +const arrayMethods = new Set(['map', 'filter', 'find', 'findIndex', 'some', 'every', 'forEach', + 'reduce', 'includes', 'indexOf', 'join', 'slice', 'concat', 'at', 'flat', 'flatMap']) +const stringMethods = new Set(['split', 'trim', 'trimStart', 'trimEnd', 'slice', 'substring', + 'includes', 'startsWith', 'endsWith', 'indexOf', 'match', 'replace', 'replaceAll', + 'padStart', 'padEnd', 'toUpperCase', 'toLowerCase', 'charAt']) +const dateMethods = new Set(['getTime', 'getDate', 'getDay', 'getMonth', 'getFullYear', + 'getHours', 'getMinutes', 'getSeconds', 'setDate', 'setMonth', 'setFullYear', 'toISOString']) +const cache = new Map() + +/** 识别 form-create 历史格式;立即执行、全局事件等格式仍会在编译时被拒绝。 */ +export const isFormScript = (value: unknown): value is string => typeof value === 'string' + && /^\s*(\$(FNX|FN|EXEC|GLOBAL):|\[\[FORM-CREATE-PREFIX-|function[\s(])/.test(value) + +/** 返回语句只结束当前函数,不能被当作普通计算结果继续执行。 */ +class Returned { + constructor(public value: any) {} +} + +/** 解析一次、每次调用独立作用域;不按字段名、流程名或具体源码摘要维护兼容名单。 */ +export const compileLocalFormScript = (source: string, onError?: (message: string) => void): Function => { + let ast = cache.get(source) + if (!ast) { + let text = source.trim() + if (text.startsWith('$FNX:')) text = `function($inject){\n${text.slice(5)}\n}` + else if (text.startsWith('[[FORM-CREATE-PREFIX-') && text.endsWith('-FORM-CREATE-SUFFIX]]')) { + text = text.slice('[[FORM-CREATE-PREFIX-'.length, -'-FORM-CREATE-SUFFIX]]'.length) + } else if (text.startsWith('$FN:')) text = text.slice(4) + if (text.length > 30000) throw new Error('表单脚本过长') + ast = parseExpressionAt(text, 0, { ecmaVersion: 2022 }) + if (!['FunctionExpression', 'ArrowFunctionExpression'].includes(ast.type) + || text.slice(ast.end).trim().replace(/;$/, '')) throw new Error('仅支持本地表单函数') + const inspect = (node: Node) => { + if (!node || typeof node !== 'object') return + if (node.type && (!syntax.has(node.type) || node.async || node.generator + || (node.type === 'Property' && node.kind !== 'init'))) { + throw new Error(`暂不支持脚本语法 ${node.type}`) + } + Object.entries(node).forEach(([key, value]) => { + if (['start', 'end', 'loc', 'value', 'regex'].includes(key) && node.type === 'Literal') return + if (Array.isArray(value)) value.forEach(inspect) + else if (value && typeof value === 'object') inspect(value) + }) + } + inspect(ast) + if (cache.size >= 200) cache.clear() + cache.set(source, ast) + } + const root = ast + return function (this: any, ...args: any[]) { + let steps = 0 + let depth = 0 + let timers = 0 + const callable = new WeakSet() + const originals = new WeakMap() + const apis = new WeakMap() + const tick = () => { if (++steps > 20000) throw new Error('表单脚本超过本次计算上限') } + const property = (key: any) => { + const name = String(key) + if (forbidden.has(name)) throw new Error(`表单脚本不能访问 ${name}`) + return name + } + const allow = (fn: Function) => { callable.add(fn); return fn } + /** API 只暴露本地字段和校验能力;数据副本不能携带原表单中的可执行函数。 */ + const local = (value: any, level = 0, seen = new WeakMap()): any => { + if (typeof value === 'function') return undefined + if (!value || typeof value !== 'object') return value + if (value instanceof Promise) return value + if (value instanceof Date) return new Date(value.getTime()) + if (level > 12) return undefined + if (seen.has(value)) return seen.get(value) + if (typeof value.getValue === 'function' && typeof value.setValue === 'function') { + if (apis.has(value)) return apis.get(value) + const facade = Object.create(null) + apis.set(value, facade) + apiMethods.forEach((name) => { + if (typeof value[name] !== 'function') return + facade[name] = allow((...items: any[]) => { + tick() + if (typeof items[0] === 'string') property(items[0]) + const input = items.map((item) => item && typeof item === 'object' + ? originals.get(item) || local(item) : item) + return local(value[name](...input)) + }) + }) + return Object.freeze(facade) + } + const copy: any = Array.isArray(value) ? [] : Object.create(null) + seen.set(value, copy) + originals.set(copy, value) + Object.entries(value).forEach(([key, item]) => { + if (!forbidden.has(key) && !key.startsWith('__')) copy[key] = local(item, level + 1, seen) + }) + return copy + } + const globals: Record = Object.assign(Object.create(null), { + undefined, NaN, Infinity, + Number: allow(Number), String: allow(String), Boolean: allow(Boolean), + parseInt: allow(parseInt), parseFloat: allow(parseFloat), isNaN: allow(isNaN), + Date, Error, + Array: { isArray: allow(Array.isArray) }, + JSON: { parse: allow(JSON.parse), stringify: allow(JSON.stringify) }, + Promise: { resolve: allow((value: any) => Promise.resolve(value)) }, + Math: Object.fromEntries(Object.getOwnPropertyNames(Math).map((key) => [key, + typeof Math[key] === 'function' ? allow(Math[key]) : Math[key]])), + setTimeout: allow((callback: Function, delay = 0) => { + if (!callable.has(callback) || ++timers > 16 || delay < 0 || delay > 1000) { + throw new Error('仅允许短时本地表单回调') + } + return setTimeout(() => { try { callback() } catch (error) { onError?.(String(error)) } }, delay) + }) + }) + ;['isFinite', 'isNaN', 'isInteger', 'parseInt', 'parseFloat'].forEach((key) => allow(Number[key])) + const find = (scope: Scope, name: string): Scope | undefined => + Object.prototype.hasOwnProperty.call(scope.values, name) ? scope : scope.parent && find(scope.parent, name) + const read = (scope: Scope, name: string) => { + const target = find(scope, name) + if (!target) throw new Error(`表单脚本未开放 ${name}`) + return target.values[name] + } + const bind = (pattern: Node, value: any, scope: Scope) => { + if (pattern.type === 'Identifier') scope.values[property(pattern.name)] = value + else if (pattern.type === 'AssignmentPattern') bind(pattern.left, + value === undefined ? evaluate(pattern.right, scope) : value, scope) + else if (pattern.type === 'RestElement') bind(pattern.argument, value, scope) + else if (pattern.type === 'ArrayPattern') pattern.elements.forEach((item: Node, index: number) => { + if (item) bind(item, item.type === 'RestElement' ? value?.slice(index) : value?.[index], scope) + }) + else if (pattern.type === 'ObjectPattern') pattern.properties.forEach((item: Node) => { + if (item.type === 'RestElement') throw new Error('暂不支持对象剩余参数') + bind(item.value, value?.[property(item.computed ? evaluate(item.key, scope) : item.key.name ?? item.key.value)], scope) + }) + else throw new Error('暂不支持该参数声明') + } + const makeFunction = (node: Node, parent: Scope): Function => { + const fn = function (this: any, ...items: any[]) { + tick() + if (++depth > 40) { depth--; throw new Error('表单脚本调用层级过深') } + const scope: Scope = { values: Object.create(null), parent, functionScope: true, + self: node.type === 'ArrowFunctionExpression' ? parent.self : this } + node.params.forEach((param: Node, index: number) => bind(param, + param.type === 'RestElement' ? items.slice(index) : items[index], scope)) + if (node.id) scope.values[node.id.name] = fn + try { + return node.body.type === 'BlockStatement' ? statement(node.body, scope) : evaluate(node.body, scope) + } catch (error) { + if (error instanceof Returned) return error.value + throw error + } finally { depth-- } + } + return allow(fn) + } + const members = (node: Node, scope: Scope) => { + const object = evaluate(node.object, scope) + const key = property(node.computed ? evaluate(node.property, scope) : node.property.name) + return { object, key } + } + const invoke = (fn: any, object: any, key: string, values: any[]) => { + tick() + if (typeof fn !== 'function') throw new Error(`表单脚本无法调用 ${key}`) + const native = (Array.isArray(object) && arrayMethods.has(key)) + || (typeof object === 'string' && stringMethods.has(key)) + || (object instanceof Date && dateMethods.has(key)) + || (object instanceof RegExp && key === 'test') + || (object instanceof Promise && ['then', 'catch', 'finally'].includes(key)) + || (typeof object === 'number' && ['toFixed', 'toString'].includes(key)) + if (!callable.has(fn) && !native) throw new Error(`表单脚本未开放方法 ${key}`) + if (values.some((item) => typeof item === 'function' && !callable.has(item))) { + throw new Error('表单脚本不能调用外部回调') + } + return Reflect.apply(fn, object, values) + } + const binary = (operator: string, left: any, right: any) => { + switch (operator) { + case '===': return left === right + case '!==': return left !== right + case '==': return left == right + case '!=': return left != right + case '>': return left > right + case '>=': return left >= right + case '<': return left < right + case '<=': return left <= right + case '+': return left + right + case '-': return left - right + case '*': return left * right + case '/': return left / right + case '%': return left % right + case '**': return left ** right + default: throw new Error(`暂不支持运算 ${operator}`) + } + } + const evaluate = (node: Node, scope: Scope): any => { + tick() + switch (node.type) { + case 'Literal': return node.value + case 'Identifier': return read(scope, node.name) + case 'ThisExpression': return scope.self + case 'ChainExpression': return evaluate(node.expression, scope) + case 'ArrayExpression': return node.elements.flatMap((item: Node) => item?.type === 'SpreadElement' + ? [...evaluate(item.argument, scope)] : [item ? evaluate(item, scope) : undefined]) + case 'ObjectExpression': return Object.fromEntries(node.properties.flatMap((item: Node) => + item.type === 'SpreadElement' ? Object.entries(evaluate(item.argument, scope) || {}).filter(([key]) => !forbidden.has(key)) + : [[property(item.computed ? evaluate(item.key, scope) : item.key.name ?? item.key.value), evaluate(item.value, scope)]])) + case 'FunctionExpression': case 'ArrowFunctionExpression': return makeFunction(node, scope) + case 'MemberExpression': { + const { object, key } = members(node, scope) + if (object == null) return undefined + return object[key] + } + case 'CallExpression': { + let fn: any, object: any, key = '本地函数' + if (node.callee.type === 'MemberExpression') { + const member = members(node.callee, scope) + object = member.object + key = member.key + if (object == null && (node.optional || node.callee.optional)) return undefined + fn = object?.[key] + } else fn = evaluate(node.callee, scope) + if (fn == null && node.optional) return undefined + return invoke(fn, object, key, node.arguments.flatMap((item: Node) => item.type === 'SpreadElement' + ? [...evaluate(item.argument, scope)] : [evaluate(item, scope)])) + } + case 'NewExpression': { + const constructor = evaluate(node.callee, scope) + if (constructor !== Date && constructor !== Error) throw new Error('表单脚本仅允许构造日期和校验错误') + return Reflect.construct(constructor, node.arguments.map((item: Node) => evaluate(item, scope))) + } + case 'UnaryExpression': { + const value = evaluate(node.argument, scope) + switch (node.operator) { + case '!': return !value + case '+': return +value + case '-': return -value + case 'typeof': return typeof value + case 'void': return undefined + default: throw new Error('暂不支持该一元运算') + } + } + case 'BinaryExpression': return binary(node.operator, evaluate(node.left, scope), evaluate(node.right, scope)) + case 'LogicalExpression': { + const left = evaluate(node.left, scope) + return node.operator === '&&' ? left && evaluate(node.right, scope) + : node.operator === '||' ? left || evaluate(node.right, scope) : left ?? evaluate(node.right, scope) + } + case 'ConditionalExpression': return evaluate(node.test, scope) ? evaluate(node.consequent, scope) : evaluate(node.alternate, scope) + case 'SequenceExpression': return node.expressions.map((item: Node) => evaluate(item, scope)).pop() + case 'TemplateLiteral': return node.quasis.map((part: Node, index: number) => part.value.cooked + + (index < node.expressions.length ? String(evaluate(node.expressions[index], scope)) : '')).join('') + case 'AssignmentExpression': case 'UpdateExpression': { + const target = node.left || node.argument + if (target.type !== 'Identifier') throw new Error('请通过表单 API 修改字段') + const owner = find(scope, target.name) + if (!owner || owner.values === globals) throw new Error('不能修改表单脚本的内置能力') + const previous = owner.values[target.name] + owner.values[target.name] = node.type === 'UpdateExpression' ? previous + (node.operator === '++' ? 1 : -1) + : node.operator === '=' ? evaluate(node.right, scope) : binary(node.operator.slice(0, -1), previous, evaluate(node.right, scope)) + return node.type === 'UpdateExpression' && !node.prefix ? previous : owner.values[target.name] + } + default: throw new Error(`暂不支持表达式 ${node.type}`) + } + } + const statement = (node: Node, scope: Scope): any => { + tick() + switch (node.type) { + case 'BlockStatement': { + const block: Scope = { values: Object.create(null), parent: scope, self: scope.self } + node.body.filter((item: Node) => item.type === 'FunctionDeclaration').forEach((item: Node) => statement(item, block)) + node.body.filter((item: Node) => item.type !== 'FunctionDeclaration').forEach((item: Node) => statement(item, block)) + return undefined + } + case 'VariableDeclaration': { + let target = scope + if (node.kind === 'var') while (!target.functionScope && target.parent) target = target.parent + node.declarations.forEach((item: Node) => bind(item.id, item.init ? evaluate(item.init, scope) : undefined, target)) + return undefined + } + case 'FunctionDeclaration': scope.values[node.id.name] = makeFunction(node, scope); return undefined + case 'ExpressionStatement': evaluate(node.expression, scope); return undefined + case 'IfStatement': return evaluate(node.test, scope) ? statement(node.consequent, scope) : node.alternate && statement(node.alternate, scope) + case 'ReturnStatement': throw new Returned(node.argument ? evaluate(node.argument, scope) : undefined) + case 'ThrowStatement': throw evaluate(node.argument, scope) + case 'EmptyStatement': return undefined + default: throw new Error(`暂不支持语句 ${node.type}`) + } + } + const parent: Scope = { values: globals, self: local({ api: this?.api, rule: this?.rule, field: this?.field }) } + const inputs = args.map((value, index) => { + // 校验器的 callback 由 form-create 提供,允许返回本地校验结果。 + return typeof value === 'function' && root.params[index]?.name === 'callback' ? allow(value) : local(value) + }) + try { return makeFunction(root, parent).apply(parent.self, inputs) } + catch (error) { onError?.(error instanceof Error ? error.message : String(error)); throw error } + } +} diff --git a/src/components/FormCreate/src/utils/numbering.ts b/src/components/FormCreate/src/utils/numbering.ts new file mode 100644 index 0000000..2e5a6d9 --- /dev/null +++ b/src/components/FormCreate/src/utils/numbering.ts @@ -0,0 +1,55 @@ +/** 按文档中的业务名称选择编号规则,不把列表行序号作为业务类型。 */ +export const NUMBERING_TYPE = { + CAIXIN_CONTRACT: 'caixin_contract', + SHUZHI_CONTRACT: 'shuzhi_contract', + /** 旧表单无法自动推断财信或数智,保留原规则直到重新选择。 */ + CONTRACT: 'contract', + UNION_CONTRACT: 'union_contract' +} as const + +export type NumberingType = typeof NUMBERING_TYPE[keyof typeof NUMBERING_TYPE] + +/** 财信、数智按各自前缀使用年度流水号;工会合同仍按部门和日期组合。 */ +export const NUMBERING_BUSINESSES = [ + { label: '财信合同', value: NUMBERING_TYPE.CAIXIN_CONTRACT, template: 'ZJCX{YYYY}{SEQ}' }, + { label: '数智合同', value: NUMBERING_TYPE.SHUZHI_CONTRACT, template: 'ZCSZ{YYYY}{SEQ}' }, + { label: '工会合同', value: NUMBERING_TYPE.UNION_CONTRACT, template: '浙财开{字段}{部门后缀}[{YYYY}{MM}{DD}]号' } +] + +/** 兼容此前保存的格式;新组件通过业务类型生成,不再要求手填占位符。 */ +export const DEFAULT_NUMBERING_TEMPLATE = '{YYYY}{MM}{DD}0001' + +/** 兼容旧表单保存的占位文本,填报时允许替换为服务器返回的预计编号。 */ +export const NUMBERING_PENDING_TEXT = '提交后自动生成' + +/** 仅新拆分的财信、数智类型启用流水号,旧业务类型保持兼容。 */ +export const isSequentialNumbering = (type?: NumberingType): boolean => + type === NUMBERING_TYPE.CAIXIN_CONTRACT || type === NUMBERING_TYPE.SHUZHI_CONTRACT + +/** 业务类型优先,未选择类型的旧表单继续使用原来保存的编号格式。 */ +export const getNumberingTemplate = (type?: NumberingType, legacyTemplate?: string): string => + NUMBERING_BUSINESSES.find((business) => business.value === type)?.template + ?? (type === NUMBERING_TYPE.CONTRACT ? 'ZJCK{YYYY}0001' : legacyTemplate ?? DEFAULT_NUMBERING_TEMPLATE) + +/** 仅替换约定占位符;工会合同始终保留固定文字和“部”,部门名称按关联值显示。 */ +export const formatNumbering = ( + template: string, + fieldText = '', + date = new Date() +): string => { + const departmentText = fieldText.trim() + const hasDepartmentSuffix = template.includes('{部门后缀}') + // 旧自定义格式仍沿用缺关联值时留空的约定,工会合同只隐藏部门部分。 + if (template.includes('{字段}') && !departmentText && !hasDepartmentSuffix) return '' + const values: Record = { + YYYY: String(date.getFullYear()), + // 设计器内仅展示样例,正式流水号由后端分配。 + SEQ: '0001', + MM: String(date.getMonth() + 1).padStart(2, '0'), + DD: String(date.getDate()).padStart(2, '0'), + 字段: departmentText, + // 未选部门仍展示“部”;部门名称自带“部”时不再重复追加。 + 部门后缀: departmentText.endsWith('部') ? '' : '部' + } + return template.replace(/\{(YYYY|MM|DD|SEQ|字段|部门后缀)\}/g, (_, token: string) => values[token]) +} diff --git a/src/components/FormCreate/src/utils/processFieldPermission.ts b/src/components/FormCreate/src/utils/processFieldPermission.ts new file mode 100644 index 0000000..ef28943 --- /dev/null +++ b/src/components/FormCreate/src/utils/processFieldPermission.ts @@ -0,0 +1,62 @@ +import formCreate, { type Api } from '@form-create/element-ui' +import { FieldPermissionType } from '@/components/SimpleProcessDesignerV2/src/consts' + +/** 流程权限独立存放,避免覆盖表单固定禁用和 control / hook 的动态禁用状态。 */ +const PROCESS_PERMISSION_EFFECT = 'processFieldPermission' +type FieldRule = Record + +/** 使用引擎的渲染属性层施加限制;可编辑仅移除流程限制,不主动启用表单字段。 */ +formCreate.register(PROCESS_PERMISSION_EFFECT, { + loaded({ value, clearProp, mergeProp }) { + clearProp() + if (value !== FieldPermissionType.WRITE) { + mergeProp({ + props: { disabled: true }, + ...(value === FieldPermissionType.NONE ? { hidden: true } : {}) + }) + } + }, + watch(effect, rule, api) { + effect.clearProp() + if (effect.value !== FieldPermissionType.WRITE) { + effect.mergeProp({ + props: { disabled: true }, + ...(effect.value === FieldPermissionType.NONE ? { hidden: true } : {}) + }) + } + api.sync(rule) + } +}) + +/** 挂载前声明 effect,确保权限刷新、连续办理时引擎能监听后续变化。 */ +export const prepareProcessFieldPermissions = ( + rules: FieldRule[], defaultPermission = FieldPermissionType.READ, + permissions: Record | null = {} +) => { + rules.forEach((rule) => { + if (!rule || typeof rule !== 'object') return + if (rule.field) { + rule.effect = { + ...rule.effect, + // 无当前待办/节点时接口会返回 null,沿用默认只读权限,避免中断详情及时间线加载。 + [PROCESS_PERMISSION_EFFECT]: permissions?.[rule.field] ?? defaultPermission + } + } + if (Array.isArray(rule.children)) prepareProcessFieldPermissions(rule.children, defaultPermission, permissions) + // 动态插入的同层字段同样受节点权限约束;子表单模板由外层字段继承禁用状态。 + ;(rule.control || []).forEach((control: FieldRule) => { + if (Array.isArray(control.rule)) prepareProcessFieldPermissions(control.rule, defaultPermission, permissions) + }) + }) +} + +/** 更新节点权限,不改写字段原始 props.disabled / hidden。 */ +export const applyProcessFieldPermission = (api: Api | undefined, field: string, permission: string) => { + api?.setEffect(field, PROCESS_PERMISSION_EFFECT, permission) +} + +/** 默认值等业务逻辑也需识别渲染层的流程限制,不能只读取 props.disabled。 */ +export const isProcessFieldReadOnly = (rule: FieldRule) => { + const permission = rule.effect?.[PROCESS_PERMISSION_EFFECT] + return permission !== undefined && permission !== FieldPermissionType.WRITE +} diff --git a/src/components/FormCreate/src/utils/processFormScope.ts b/src/components/FormCreate/src/utils/processFormScope.ts new file mode 100644 index 0000000..2760169 --- /dev/null +++ b/src/components/FormCreate/src/utils/processFormScope.ts @@ -0,0 +1,138 @@ +import request from '@/config/axios' +import { computed, inject, provide, type ComputedRef, type InjectionKey } from 'vue' +import type { UserOrganizationSimple } from '@/api/system/user' + +/** 发起使用定义编号,已有实例优先按实例读取其真实发布版本。 */ +interface ProcessFormContext { + processDefinitionId?: string + processInstanceId?: string +} + +/** 部门祖先及历史项可返回,但 disabled 项只允许回显。 */ +interface ProcessDeptOption { + id: number + name: string + parentId: number + orgType?: string + disabled: boolean +} + +/** 人员接口只返回取值与展示所需的数据。 */ +interface ProcessUserOption { + id: number + nickname: string + username?: string + deptId?: number + deptName?: string + positionType?: string // 范围内任职归类:副岗或兼职,不改变原用户编号。 + disabled: boolean +} + +/** OA 角色选项;已保存但停用的角色只允许回显。 */ +export interface ProcessRoleOption { + id: number + name: string + disabled: boolean +} + +/** 流程查看授权后返回的附件地址,仅用于内存缓存,禁止回写表单。 */ +interface ProcessFileAccess { + url: string + name?: string + expiresAt?: string | number | null +} + +/** 同一表单共用请求,避免每个选择器重复查询完整组织和任职关系。 */ +export interface ProcessFormScope { + key: ComputedRef + getDepartments: (ignoreScope?: boolean) => Promise + getRoles: (relatedUserIds?: number[]) => Promise + getUsers: (params: Record, ignoreScope?: boolean) => Promise + getFileAccessUrl: (fileId: number | string) => Promise + /** 仅仿真入口提供本地身份与任职,不修改登录用户或正式接口参数。 */ + getCurrentUserValue?: (key: string) => unknown + getUserOrganizations?: (userId: number) => Promise + /** 仿真可替代通用接口控件的数据读取,保留其原有选择类型和本地选项解析。 */ + getOptions?: (source: { url: string; method: string; params: Record }) => Promise +} + +const PROCESS_FORM_SCOPE: InjectionKey = Symbol('processFormScope') + +/** 专属入口注入数据源,所有字段继续复用原控件的展示和联动逻辑。 */ +export const provideCustomProcessFormScope = (scope: ProcessFormScope) => provide(PROCESS_FORM_SCOPE, scope) + +/** 只在流程填报与详情入口提供;普通设计器及其他业务选择器保持原行为。 */ +export const provideProcessFormScope = (getContext: () => ProcessFormContext) => { + const key = computed(() => JSON.stringify(getContext())) + const departments = new Map>() + const users = new Map>() + const roles = new Map>() + + /** 上下文尚未加载时返回空选项,禁止临时退回全量数据。 */ + const load = (url: string, extra: Record = {}): Promise => { + const context = getContext() + if (!context.processDefinitionId && !context.processInstanceId) return Promise.resolve([]) + return request.get({ url, params: { ...extra, ...context } }) + } + + /** 失败请求移出缓存,下次展开或重建表单可重试。 */ + const cached = (cache: Map>, cacheKey: string, fetch: () => Promise) => { + let pending = cache.get(cacheKey) + if (!pending) { + pending = fetch().catch((error) => { + cache.delete(cacheKey) + throw error + }) + cache.set(cacheKey, pending) + } + return pending + } + + provide(PROCESS_FORM_SCOPE, { + key, + // 过期时重新经过实例读取授权,只从该实例真实引用的附件中取地址。 + getFileAccessUrl: async (fileId) => { + const { processInstanceId } = getContext() + if (!processInstanceId) return undefined + const detail = await request.get({ + url: '/bpm/process-instance/get-approval-detail', params: { processInstanceId } + }) + const findFile = (value: unknown): ProcessFileAccess | undefined => { + if (!value || typeof value !== 'object') return undefined + const file = value as Record + if (String(file.fileId) === String(fileId) && typeof file.url === 'string' && file.url) { + return { + url: file.url, name: typeof file.name === 'string' ? file.name : undefined, + expiresAt: typeof file.expiresAt === 'number' || typeof file.expiresAt === 'string' + ? file.expiresAt : undefined + } + } + for (const child of Object.values(value)) { + const found = findFile(child) + if (found) return found + } + return undefined + } + return findFile(detail?.processInstance?.formVariables) + }, + getDepartments: () => cached(departments, key.value, + () => load('/bpm/form-options/depts')), + // 缓存键包含关联人员并集,避免多个角色字段共用错误的选项。 + getRoles: (relatedUserIds) => cached(roles, JSON.stringify([key.value, relatedUserIds ?? null]), + () => load('/bpm/form-options/roles', relatedUserIds === undefined + ? {} : { relatedUserIds: relatedUserIds.join(',') })), + getUsers: (params) => { + const deptId = params.deptId + // 关联字段有异常取值时收紧为空,不能把非法部门忽略成不限制。 + if (deptId != null && deptId !== '' && !/^[1-9]\d*$/.test(String(deptId))) { + return Promise.resolve([]) + } + return cached(users, JSON.stringify([key.value, deptId ?? null]), + () => load('/bpm/form-options/users', { deptId })) + } + }) +} + +/** 组件只消费最近的流程表单上下文,不读取全局当前组织作为流程范围。 */ +export const useProcessFormScope = () => inject(PROCESS_FORM_SCOPE, undefined) + diff --git a/src/components/FormCreate/src/utils/readonlyFields.ts b/src/components/FormCreate/src/utils/readonlyFields.ts new file mode 100644 index 0000000..fe059f8 --- /dev/null +++ b/src/components/FormCreate/src/utils/readonlyFields.ts @@ -0,0 +1,38 @@ +import { markRaw } from 'vue' +import formCreate from '@form-create/element-ui' +import ReadonlyValue from '../components/ReadonlyValue.vue' + +/** 原生字段直接展示值;实体选择器保留组件,继续解析字典及人员名称。 */ +const textFields = new Set(['input', 'textarea', 'password', 'inputNumber', 'autoComplete', 'datePicker', 'timePicker', 'timeSelect']) + +/** 在运行时按最终禁用状态展示,保留原解析器及字段权限的动态切换。 */ +export const setupReadonlyFields = () => { + const fields = [...textFields, 'select', 'cascader', 'treeSelect', 'radio', 'checkbox', + 'UserSelect', 'ApiSelect', 'DictSelect', 'DeptSelect', 'PostSelect', 'RoleSelect', + 'ProcessInstanceSelect', 'ItsmProjectSelect', 'ItsmResourceSelect', 'ItsmProjectMemberSelect', + 'LeaveDays', 'TimeCalculation', 'UppercaseAmount', 'AmountCalculation', 'Numbering', + 'UploadFile', 'UploadImg', 'UploadImgs'] + fields.forEach((name) => { + const original = formCreate.parser(name) + formCreate.parser({ + name, + merge: true, + // form-create 未公开解析上下文类型,与 fieldDefaults 的扩展方式一致。 + mergeProp(ctx: any) { + original?.mergeProp?.(ctx) + if (ctx.rule._menu) return + const props = ctx.prop.props + const readonly = !!(props.disabled || props.readonly || props.readOnly + || ctx.$handle.vm.props.disabled || ctx.$handle.options.form.disabled) + ctx.prop.wrap.class = [ctx.prop.wrap.class, { 'fc-form-item--readonly': readonly }] + if (!readonly) return + props.collapseTags = false + // 涉密输入保留原组件的判定和遮罩;其他自定义组件也不覆盖。 + if (textFields.has(name) && !ctx.prop.component) { + ctx.prop.component = markRaw(ReadonlyValue) + props.readonlyKind = name + } + } + }) + }) +} diff --git a/src/components/FormCreate/src/utils/selectionScope.ts b/src/components/FormCreate/src/utils/selectionScope.ts new file mode 100644 index 0000000..cc5b5d3 --- /dev/null +++ b/src/components/FormCreate/src/utils/selectionScope.ts @@ -0,0 +1,14 @@ +/** 只有明确选“是”才忽略流程适用范围,历史未配置字段无需补写默认属性。 */ +export const makeProcessScopeRule = () => ({ + type: 'radio', + field: 'ignoreProcessScope', + title: '是否忽略适用范围', + value: false, + info: '选择是时忽略流程适用组织;选择否或未配置时按适用组织筛选。组件原有的关联字段、固定名单等条件仍生效。', + options: [ + { label: '是', value: true }, + { label: '否', value: false } + ] +}) + + diff --git a/src/components/FormCreate/src/utils/tableForm.ts b/src/components/FormCreate/src/utils/tableForm.ts new file mode 100644 index 0000000..644c7d9 --- /dev/null +++ b/src/components/FormCreate/src/utils/tableForm.ts @@ -0,0 +1,280 @@ +import { defineComponent, h } from 'vue' +import formCreate from '@form-create/element-ui' +import { cloneDeep } from 'lodash-es' +import { confirmClearDetails, getInitialDetailCount } from './detailActions' +import { collectColumnDefaults } from './fieldDefaults' + +/** 明细列的固定方向;空值表示随表格滚动。 */ +type FixedSide = '' | 'left' | 'right' +/** 沿用 form-create 的列规则,只补充固定位置。 */ +interface DetailColumn { + hidden?: boolean + fixed?: FixedSide + /** 未设置或为空时跟随列表,布尔值覆盖统一设置。 */ + labelBold?: boolean | '' + style?: { width?: number | string } +} + +const DEFAULT_COLUMN_WIDTH = 140 +const INDEX_WIDTH = 40 +const OPERATION_WIDTH = 70 + +/** 固定列偏移使用像素宽度,旧配置中的 auto 等值回退到默认列宽。 */ +const columnWidth = (value: unknown, fallback: number): number => { + const text = String(value ?? '').trim() + if (!/^\d+(\.\d+)?(px)?$/.test(text)) return fallback + const width = Number.parseFloat(text) + return width > 0 ? width : fallback +} + +/** 扩展原表格组件的布局,保留原有校验、增删行和数组值同步实现。 */ +export const setupDetailTable = () => { + const original = formCreate.component('tableForm') + const component = defineComponent({ + name: 'ScrollableTableForm', + extends: original, + data() { + return { selectedDetailRow: null, clearingDetails: false } + }, + props: { + // 默认行数由新建、预览入口初始化;历史回填和用户增删行不受此参数限制。 + initialRows: { type: Number, default: 1 }, + showIndex: { type: Boolean, default: true }, + // 标题默认加粗,内部列名默认不加粗,各列可单独覆盖。 + titleBold: { type: Boolean, default: true }, + labelBold: { type: Boolean, default: false }, + scrollX: { type: Boolean, default: true }, + columnMinWidth: { type: Number, default: DEFAULT_COLUMN_WIDTH }, + indexFixed: { type: String, default: 'left' }, + operationFixed: { type: String, default: 'right' } + }, + watch: { + columns: { deep: true, handler: 'rebuildTable' }, + scrollX: 'rebuildTable', + columnMinWidth: 'rebuildTable', + indexFixed: 'rebuildTable', + operationFixed: 'rebuildTable', + deletable: 'rebuildTable', + addable: 'rebuildTable', + labelBold: 'rebuildTable', + disabled: 'rebuildTable', + 'formCreateInject.preview': 'rebuildTable' + }, + computed: { + /** 无新增权限或纯展示时不启用复制选中状态。 */ + detailHasSelection(this: any) { + return !this.formCreateInject.preview && this.addable + }, + /** 空状态占位行不计入实际明细行数。 */ + detailRowCount(this: any) { + return this.trs.filter((row: any) => !row._isEmpty).length + } + }, + render(this: any) { + // 图标路径及按钮布局沿用 ITSM 项目档案的明细工具栏。 + const toolbar = !this.formCreateInject.preview && (this.addable || this.deletable) + ? h('div', { class: 'fc-detail-toolbar fc-clock', role: 'group', 'aria-label': '明细操作' }, [ + this.addable ? h('button', { + type: 'button', + class: 'fc-detail-tool-button', + disabled: this.disabled || this.clearingDetails || (!!this.max && this.detailRowCount >= this.max), + onClick: () => this.addRaw(true) + }, [ + h('svg', { viewBox: '0 0 24 24', fill: 'none', stroke: 'currentColor', 'aria-hidden': 'true' }, [ + h('path', { + 'stroke-linecap': 'round', + 'stroke-linejoin': 'round', + 'stroke-width': 2, + d: 'M12 4v16m8-8H4' + }) + ]), + '新建' + ]) : null, + this.addable ? h('button', { + type: 'button', class: 'fc-detail-tool-button', + disabled: this.disabled || this.clearingDetails || !this.trs.includes(this.selectedDetailRow) + || (!!this.max && this.detailRowCount >= this.max), + onClick: () => this.copySelectedDetail() + }, '复制') : null, + this.deletable ? h('button', { + type: 'button', class: 'fc-detail-tool-button fc-detail-tool-button--danger', + disabled: this.disabled || this.clearingDetails || !this.detailRowCount, + onClick: () => this.clearDetails() + }, '删除全部') : null + ]) + : null + return h('div', { + 'data-title-bold': String(this.titleBold), + class: ['_fc-table-form', { '_fc-disabled': this.disabled, '_fc-undeletable': !this.deletable }], + // 捕获阶段识别整行,输入组件停止冒泡时也能正常选中。 + onClickCapture: (event: Event) => this.selectDetailRow(event), + onFocusinCapture: (event: Event) => this.selectDetailRow(event) + }, [ + toolbar, + h(this.Form, { + option: this.options, + rule: this.rule, + extendOption: true, + disabled: this.disabled, + onChange: this.formChange, + api: this.fapi, + 'onUpdate:api': (api: any) => { this.fapi = api }, + onEmitEvent: this.$emit + }) + ]) + }, + methods: { + /** 只选择当前表格自己的数据行,嵌套表格的点击不串到外层。 */ + selectDetailRow(this: any, event: Event) { + if (!this.detailHasSelection || this.disabled || this.clearingDetails) return + const target = event.target as Element + const root = event.currentTarget as Element + if (target.closest('._fc-table-form') !== root) return + const element = target.closest('tr[data-detail-row-index]') + if (!element) return + const row = this.trs[Number(element.getAttribute('data-detail-row-index'))] + if (!row || row._isEmpty || this.selectedDetailRow === row) return + this.selectedDetailRow = row + this.trs.filter((item: any) => !item._isEmpty).forEach((item: any) => this.updateRaw(item)) + }, + /** 使用渲染中的数据,保留隐藏列及尚未同步的输入。 */ + detailValues(this: any) { + return this.trs.filter((row: any) => !row._isEmpty).map((row: any, index: number) => ({ + ...this.modelValue[index], ...this.fapi.getChildrenFormData(row) + })) + }, + /** 整体值交回原组件同步,不复制表单规则中的内部字段标识。 */ + replaceDetails(this: any, values: any[]) { + this.$emit('update:modelValue', values) + this.$emit('change', values) + }, + copySelectedDetail(this: any) { + const index = this.trs.indexOf(this.selectedDetailRow) + if (index < 0 || this.disabled || !this.addable || this.formCreateInject.preview + || this.clearingDetails || (!!this.max && this.detailRowCount >= this.max)) return + const values = this.detailValues() + values.splice(index + 1, 0, cloneDeep(values[index])) + this.replaceDetails(values) + this.$emit('add', values.length) + }, + /** 二次确认后清空;删除回调全部通过才一次更新,避免半途只删除部分数据。 */ + async clearDetails(this: any) { + if (this.disabled || !this.deletable || this.formCreateInject.preview || this.clearingDetails) return + this.clearingDetails = true + try { + if (!await confirmClearDetails() || this.disabled) return + const values = this.detailValues() + for (let index = values.length - 1; index >= 0; index--) { + if (this.beforeRemove && await this.beforeRemove({ index, row: values[index] }) === false) return + } + const count = getInitialDetailCount(this.initialRows, this.min, this.max) + const defaults: Record = {} + this.columns.forEach((column: any) => collectColumnDefaults(column.rule || [], defaults)) + this.selectedDetailRow = null + // 重建行实例,清除残留的联动状态,并恢复各列模板的默认值。 + this.trs.splice(0) + this.rule[0].children[1].children = this.trs + this.oldValue = '' + this.replaceDetails(Array.from({ length: count }, () => cloneDeep(defaults))) + for (let index = values.length - 1; index >= 0; index--) this.$emit('delete', index) + } finally { + this.clearingDetails = false + } + }, + /** 第一行保留,其余行沿用原生删除校验、前置回调及事件。 */ + delRaw(this: any, index: number) { + if (index === 0 || this.formCreateInject.preview || this.clearingDetails) return + return original.methods.delRaw.call(this, index) + }, + /** 更新行号和删除事件后,隐藏第一行的删除按钮。 */ + updateRaw(this: any, row: any) { + const index = this.trs.indexOf(row) + const selected = this.detailHasSelection && !this.disabled && this.selectedDetailRow === row + row.props = { ...row.props, 'data-detail-row-index': index, 'aria-selected': String(selected) } + row.class = `${String(row.class || '').replace(/\bis-detail-selected\b/g, '').trim()}${selected ? ' is-detail-selected' : ''}` + if (this.showIndex !== false) row.children[0].props.innerText = index + 1 + const button = row.children[row.children.length - 1].children[0] + button.props.onClick = () => this.delRaw(index) + button.style = { display: index === 0 ? 'none' : 'inline-flex' } + button.props.disabled = this.disabled + }, + /** 装饰原组件生成的表头和行模板,表头、内容使用相同宽度与固定偏移。 */ + loadRule(this: any) { + original.methods.loadRule.call(this) + const table = this.rule[0] + const header = table.children[0].children[0].children + const row = this.formCreateInject.form.parseJson(this.copyTrs)[0] + header.forEach((cell: any) => { + cell.style = { ...cell.style, fontWeight: this.labelBold ? 600 : 400 } + }) + this.columns.filter((column: DetailColumn) => column.hidden !== true) + .forEach((column: DetailColumn, index: number) => { + if (typeof column.labelBold !== 'boolean') return + const cell = header[index + (this.showIndex === false ? 0 : 1)] + cell.style.fontWeight = column.labelBold ? 600 : 400 + }) + if (this.showIndex !== false) header[0].props = { innerText: '序号' } + // 用文字按钮替换原来的垃圾桶图标,第一行的显示状态由 updateRaw 维护。 + row.children[row.children.length - 1].children = [{ + type: 'button', + native: true, + class: 'fc-detail-row-delete', + props: { type: 'button', innerText: '删除' } + }] + this.copyTrs = this.formCreateInject.form.toJson([row]) + if (!this.scrollX) return + + const minimum = columnWidth(this.columnMinWidth, DEFAULT_COLUMN_WIDTH) + const columns: { width: number; fixed: FixedSide; visible: boolean }[] = [] + if (this.showIndex !== false) { + columns.push({ width: INDEX_WIDTH, fixed: this.indexFixed, visible: true }) + } + this.columns.forEach((column: DetailColumn) => { + if (column.hidden === true) return + columns.push({ + width: columnWidth(column.style?.width, minimum), + fixed: column.fixed || '', + visible: true + }) + }) + columns.push({ + width: OPERATION_WIDTH, + fixed: this.operationFixed, + visible: this.deletable && !this.formCreateInject.preview + }) + + let left = 0 + let right = columns.reduce( + (sum, column) => sum + (column.visible && column.fixed === 'right' ? column.width : 0), + 0 + ) + columns.forEach((column, index) => { + if (!column.visible) return + const style: Record = { + width: `${column.width}px`, + minWidth: `${column.width}px`, + maxWidth: `${column.width}px` + } + if (column.fixed === 'right') right -= column.width + if (column.fixed === 'left' || column.fixed === 'right') { + style.position = 'sticky' + style[column.fixed] = `${column.fixed === 'left' ? left : right}px` + const fixedClass = `fc-detail-fixed-${column.fixed}` + ;[header[index], row.children[index]].forEach((cell) => { + cell.class = `${cell.class || ''} ${fixedClass}` + }) + } + header[index].style = { ...header[index].style, ...style } + row.children[index].style = { ...row.children[index].style, ...style } + if (column.fixed === 'left') left += column.width + }) + const width = columns.reduce((sum, column) => sum + (column.visible ? column.width : 0), 0) + table.class += ' fc-detail-scroll-table' + table.style = { width: `${width}px`, minWidth: '100%' } + this.copyTrs = this.formCreateInject.form.toJson([row]) + } + } + }) + // 只替换运行时组件,设计画布继续使用原有可拖拽的列预览。 + formCreate.component('tableForm', component) +} diff --git a/src/components/FormCreate/src/utils/timeCalculation.ts b/src/components/FormCreate/src/utils/timeCalculation.ts new file mode 100644 index 0000000..57c70ea --- /dev/null +++ b/src/components/FormCreate/src/utils/timeCalculation.ts @@ -0,0 +1,37 @@ +/** 当前仅支持两个日期的自然日天数,包含起止两天。 */ +export const TIME_CALCULATION_TYPE = { CALENDAR_DAYS: 'calendar_days' } as const +export type TimeCalculationType = typeof TIME_CALCULATION_TYPE[keyof typeof TIME_CALCULATION_TYPE] + +/** 用 UTC 日期序号相减,避免夏令时或日期时间部分造成不足整天。 */ +const MILLISECONDS_PER_DAY = 24 * 60 * 60 * 1000 + +/** 单个日期支持日期选择器的字符串、Date 和毫秒时间戳,不把无效日期自动滚到下个月。 */ +const dateOrdinal = (value: unknown): number | undefined => { + let parts: number[] + if (value instanceof Date || typeof value === 'number' + || (typeof value === 'string' && /^\d{13}$/.test(value))) { + const date = value instanceof Date ? value : new Date(Number(value)) + if (!Number.isFinite(date.getTime())) return + parts = [date.getFullYear(), date.getMonth() + 1, date.getDate()] + } else if (typeof value === 'string') { + const match = value.trim().match(/^(\d{4})[-/](\d{1,2})[-/](\d{1,2})(?:[ T].*)?$/) + if (!match) return + parts = match.slice(1).map(Number) + } else return + const [year, month, day] = parts + const date = new Date(0) + date.setUTCFullYear(year, month - 1, day) + if (date.getUTCFullYear() !== year || date.getUTCMonth() !== month - 1 || date.getUTCDate() !== day) return + return Math.floor(date.getTime() / MILLISECONDS_PER_DAY) +} + +/** 未填完整显示零天;无效日期或倒置日期保留错误,由表单校验阻止提交。 */ +export const calculateCalendarDays = (start: unknown, end: unknown): { days?: number; error: string } => { + if (start == null || start === '' || end == null || end === '') return { days: 0, error: '' } + const first = dateOrdinal(start) + const last = dateOrdinal(end) + if (first === undefined || last === undefined) return { error: '请选择有效的开始日期和结束日期' } + if (last < first) return { error: '结束日期不能早于开始日期' } + return { days: last - first + 1, error: '' } +} + diff --git a/src/components/FormCreate/src/utils/uppercaseAmount.ts b/src/components/FormCreate/src/utils/uppercaseAmount.ts new file mode 100644 index 0000000..a189a57 --- /dev/null +++ b/src/components/FormCreate/src/utils/uppercaseAmount.ts @@ -0,0 +1,70 @@ +/** 人民币大写使用的数字、节内单位和四位分节单位。 */ +const DIGITS = '零壹贰叁肆伍陆柒捌玖' +const PLACE_UNITS = ['', '拾', '佰', '仟'] +const GROUP_UNITS = ['', '万', '亿', '万亿'] +const DECIMAL_PLACES = 2 + +/** 将不超过四位的整数转为大写,连续的零只保留一个。 */ +const convertGroup = (value: string): string => { + let text = '' + let pendingZero = false + for (let index = 0; index < value.length; index++) { + const digit = Number(value[index]) + if (digit === 0) { + pendingZero = text.length > 0 + } else { + if (pendingZero) text += DIGITS[0] + text += DIGITS[digit] + PLACE_UNITS[value.length - index - 1] + pendingZero = false + } + } + return text +} + +/** + * 金额转人民币中文大写:精确按十进制四舍五入到分,避免浮点数乘 100 的误差。 + * 支持正负金额及最多十六位整数;空值、非金额和超出范围的值返回空串。 + */ +export const toUppercaseAmount = (value: unknown): string => { + if (typeof value !== 'number' && typeof value !== 'string') return '' + if (typeof value === 'number') { + if (!Number.isFinite(value)) return '' + // 极小的数值可能以科学计数法传入,四舍五入到分后为零。 + if (Math.abs(value) < 0.005) return '零元整' + } + const matched = String(value).trim().match(/^([+-]?)(\d+)(?:\.(\d*))?$/) + if (!matched) return '' + const integer = matched[2].replace(/^0+(?=\d)/, '') + if (integer.length > GROUP_UNITS.length * 4) return '' + const decimal = (matched[3] || '').padEnd(DECIMAL_PLACES, '0') + let cents = BigInt(integer + decimal.slice(0, DECIMAL_PLACES)) + if (Number(decimal[DECIMAL_PLACES] || 0) >= 5) cents += 1n + if (cents === 0n) return '零元整' + + const rounded = cents.toString().padStart(DECIMAL_PLACES + 1, '0') + const whole = rounded.slice(0, -DECIMAL_PLACES) + if (whole.length > GROUP_UNITS.length * 4) return '' + let integerText = '' + let pendingZero = false + for (let end = whole.length, groupIndex = 0; end > 0; end -= 4, groupIndex++) { + const group = whole.slice(Math.max(0, end - 4), end) + if (Number(group) === 0) { + pendingZero = integerText.length > 0 + continue + } + const lowerNeedsZero = integerText && (pendingZero || Number(whole.slice(end, end + 4)) < 1000) + integerText = + convertGroup(group) + + GROUP_UNITS[groupIndex] + + (lowerNeedsZero ? DIGITS[0] : '') + + integerText + pendingZero = false + } + + const jiao = Number(rounded[rounded.length - 2]) + const fen = Number(rounded[rounded.length - 1]) + let fractionText = jiao ? DIGITS[jiao] + '角' : '' + if (fen) fractionText += (!jiao && integerText ? DIGITS[0] : '') + DIGITS[fen] + '分' + else fractionText += '整' + return (matched[1] === '-' ? '负' : '') + (integerText || DIGITS[0]) + '元' + fractionText +} diff --git a/src/components/FormCreate/src/utils/useLeaveFormLinkage.ts b/src/components/FormCreate/src/utils/useLeaveFormLinkage.ts new file mode 100644 index 0000000..4d05d8a --- /dev/null +++ b/src/components/FormCreate/src/utils/useLeaveFormLinkage.ts @@ -0,0 +1,303 @@ +import { computed, nextTick, onScopeDispose, ref, watch, type Ref } from 'vue' +import dayjs from 'dayjs' +import type { Api as FormCreateApi } from '@form-create/element-ui' +import * as WorkCalendarApi from '@/api/bpm/workCalendar' + +/** 请假天数组件类型,与设计器 useLeaveDaysRule、H5 formSchema 保持一致 */ +export const LEAVE_DAYS_TYPE = 'LeaveDays' + +const RANGE_ERROR = '结束时间不能早于开始时间' +/** 挂在校验规则上的标记,避免重复添加 */ +const VALIDATOR_FLAG = '__leaveRangeValidator' + +type HalfDay = WorkCalendarApi.LeaveHalfDay + +/** 请假天数组件配置的字段;上下午字段为空时按全天计 */ +interface LeaveFields { + leaveDays: string + startDate: string + startHalf: string + endDate: string + endHalf: string +} + +/** 请假天数组件在表单规则中的配置(只列出联动用到的属性) */ +interface LeaveDaysRule { + type?: string + field?: string + props?: { + startDateField?: string + startPeriodField?: string + endDateField?: string + endPeriodField?: string + } + children?: unknown +} + +interface LeaveRange { + startDate: string + startPeriod: HalfDay + endDate: string + endPeriod: HalfDay +} + +/** workflow_day_period 保存字符串编码,不能按字典展示标签解析。 */ +const DAY_PERIOD_VALUE = { AM: '001', PM: '002' } as const + +/** 字典编码及历史中文、AM / PM 值统一转为接口时段。 */ +const toPeriod = (half: unknown): HalfDay | null => { + if (half === DAY_PERIOD_VALUE.AM || half === '上午' || half === 'am' || half === 'AM') return 'AM' + if (half === DAY_PERIOD_VALUE.PM || half === '下午' || half === 'pm' || half === 'PM') return 'PM' + return null +} + +/** 日期控件取值可能是 yyyy-MM-dd 字符串、带时间的字符串、时间戳或 Date,统一转为 yyyy-MM-dd */ +const toDateText = (value: unknown): string | null => { + if (value === undefined || value === null || value === '') return null + if (typeof value === 'string') { + const matched = value.match(/^\d{4}-\d{2}-\d{2}/) + if (matched) return matched[0] + } + const parsed = dayjs(value as dayjs.ConfigType) + return parsed.isValid() ? parsed.format('YYYY-MM-DD') : null +} + +/** 半天序号:按天数 * 2 + 上午 0 / 下午 1 比较先后,不依赖字符串格式 */ +const halfDayIndex = (date: string, period: HalfDay): number => + Math.round(dayjs(date).startOf('day').valueOf() / 86400000) * 2 + (period === 'AM' ? 0 : 1) + +/** 在表单规则(含嵌套布局)中查找第一个请假天数组件 */ +const findLeaveDaysRule = (rules: unknown[] | undefined): LeaveDaysRule | undefined => { + for (const item of rules || []) { + if (!item || typeof item !== 'object') continue + const rule = item as LeaveDaysRule + if (rule.type === LEAVE_DAYS_TYPE && rule.field) return rule + const child = findLeaveDaysRule(Array.isArray(rule.children) ? rule.children : undefined) + if (child) return child + } + return undefined +} + +/** + * 请假天数组件(LeaveDays)的发起页联动,表单中有该组件且配置了起止日期字段时生效: + * 1. 结束时段早于开始时段时,在“结束日期”旁提示错误、清空天数并阻止提交; + * 2. 起止齐全且合法时调工作日历接口(排除周末和节假日)自动填写天数,天数不可手改。 + * 起止时间展示属于各表单自己的字段事件配置,这里只负责天数和范围校验。 + * 请假单(oa_qingjiadan)后端发起时还会按工作日重新核算并覆盖天数,这里的结果仅供预览。 + */ +export function useLeaveFormLinkage(options: { + /** 发起页只负责提交前核算,日常联动由组件执行,避免重复请求。 */ + submissionOnly?: boolean + /** 历史只读表单保留保存值,源时段实际变化后再计算。 */ + preserveSaved?: () => boolean + /** form-create 的 v-model 值 */ + formValue: () => Record | undefined + /** form-create 的 API 实例 */ + fApi: Ref +}) { + const rangeError = ref('') + const calculating = ref(false) + const fields = ref(null) + let requestSeq = 0 + // 关闭预览或切换表单后,旧的异步核算结果不再写回。 + onScopeDispose(() => { requestSeq++ }) + + const enabled = computed(() => !!fields.value) + + /** 从当前表单规则读取请假天数组件的字段配置,表单切换后需重新读取 */ + const detect = () => { + let rule: LeaveDaysRule | undefined + try { + rule = findLeaveDaysRule(options.fApi.value?.rule) + } catch { + rule = undefined + } + const props: NonNullable = rule?.props || {} + fields.value = + rule && props.startDateField && props.endDateField + ? { + leaveDays: rule.field!, + startDate: props.startDateField, + startHalf: props.startPeriodField || '', + endDate: props.endDateField, + endHalf: props.endPeriodField || '' + } + : null + } + + const hasField = (field: string): boolean => { + try { + return !!field && !!options.fApi.value?.fields().includes(field) + } catch { + return false + } + } + + /** 写回表单值:只写表单中存在的字段,值未变化时不写,避免触发循环 */ + const setFieldValue = (field: string, value: unknown) => { + const formValue = options.formValue() + if (!formValue || !hasField(field) || formValue[field] === value) return + if (options.fApi.value) { + options.fApi.value.setValue(field, value) + } else { + formValue[field] = value + } + } + + /** 未配置上下午字段时,开始按上午、结束按下午(即全天) */ + const readPeriod = (field: string, whole: HalfDay): HalfDay | null => + field ? toPeriod((options.formValue() || {})[field]) : whole + + const readRange = (): { range: LeaveRange | null; startDate: string | null; endDate: string | null; startPeriod: HalfDay | null; endPeriod: HalfDay | null } => { + const config = fields.value + if (!config) return { range: null, startDate: null, endDate: null, startPeriod: null, endPeriod: null } + const value = options.formValue() || {} + const startDate = toDateText(value[config.startDate]) + const endDate = toDateText(value[config.endDate]) + const startPeriod = readPeriod(config.startHalf, 'AM') + const endPeriod = readPeriod(config.endHalf, 'PM') + const range = + startDate && endDate && startPeriod && endPeriod + ? { startDate, startPeriod, endDate, endPeriod } + : null + return { range, startDate, endDate, startPeriod, endPeriod } + } + + const isReversed = (range: LeaveRange) => + halfDayIndex(range.endDate, range.endPeriod) < halfDayIndex(range.startDate, range.startPeriod) + + /** 在“结束日期”的校验规则中挂一个时段先后校验,使错误提示显示在字段旁,并让 fApi.validate() 失败 */ + const attachValidator = () => { + const api = options.fApi.value + const endDate = fields.value?.endDate + if (!api || !endDate || !hasField(endDate)) return + try { + const rule = api.getRule(endDate) + if (!rule) return + const validate: object[] = Array.isArray(rule.validate) ? [...rule.validate] : [] + if (validate.some((item) => item && (item as Record)[VALIDATOR_FLAG])) return + validate.push({ + [VALIDATOR_FLAG]: true, + trigger: 'change', + validator: (_rule: unknown, _value: unknown, callback: (error?: Error) => void) => { + if (enabled.value && rangeError.value) { + callback(new Error(rangeError.value)) + } else { + callback() + } + } + }) + rule.validate = validate + } catch (error) { + console.warn('[请假天数] 挂载时段校验失败', error) + } + } + + /** 读取组件配置并挂载时段校验;表单加载、字段权限设置之后调用 */ + const applyFieldState = () => { + detect() + if (!enabled.value || !options.fApi.value || options.submissionOnly) return + attachValidator() + } + + const revalidateEndDate = () => { + const endDate = fields.value?.endDate + if (!endDate || !hasField(endDate)) return + nextTick(() => { + options.fApi.value?.validateField?.(endDate)?.catch?.(() => {}) + }) + } + + const refresh = async () => { + // 即使只做提交校验或保留历史值,时段变化也要使旧请求失效。 + const seq = ++requestSeq + const config = fields.value + if (!config || options.submissionOnly || options.preserveSaved?.()) return + const { range } = readRange() + // 1. 先后校验 + const previousError = rangeError.value + rangeError.value = range && isReversed(range) ? RANGE_ERROR : '' + if (rangeError.value || previousError) { + revalidateEndDate() + } + if (!range || rangeError.value) { + // 时段未填完整或不合法时,清空旧天数,避免与当前时段不符 + calculating.value = false + setFieldValue(config.leaveDays, undefined) + return + } + // 2. 核算天数 + calculating.value = true + try { + const days = await WorkCalendarApi.getLeaveDays(range) + if (seq !== requestSeq) return + setFieldValue(config.leaveDays, Number.isFinite(days) ? days : undefined) + } catch (error) { + console.warn('[请假天数] 核算请假天数失败', error) + if (seq === requestSeq) setFieldValue(config.leaveDays, undefined) + } finally { + if (seq === requestSeq) calculating.value = false + } + } + + watch( + () => { + const config = fields.value + if (!config) return [null] + const value = options.formValue() || {} + return [ + config, + value[config.startDate], + config.startHalf ? value[config.startHalf] : undefined, + value[config.endDate], + config.endHalf ? value[config.endHalf] : undefined + ] + }, + (current, previous) => { + if (previous && current.every((item, index) => item === previous[index])) return + refresh() + } + ) + + /** + * 提交前校验(与 H5 FormLaunchView 的 validateLeave 口径一致):重新按工作日历核算一次天数并回写; + * 时段不完整、先后颠倒、核算失败、天数为空或 ≤0 时返回错误文案,通过时返回空串 + */ + const validateBeforeSubmit = async (): Promise => { + const config = fields.value + if (!config) return '' + const { range } = readRange() + if (!range) { + return config.startHalf || config.endHalf + ? '请选择请假开始、结束日期及上下午' + : '请选择请假开始、结束日期' + } + if (isReversed(range)) { + if (rangeError.value !== RANGE_ERROR) { + rangeError.value = RANGE_ERROR + revalidateEndDate() + } + return RANGE_ERROR + } + // 作废进行中的联动核算,以本次结果为准 + const seq = ++requestSeq + calculating.value = true + let days: number + try { + days = await WorkCalendarApi.getLeaveDays(range) + } catch (error) { + console.warn('[请假天数] 提交前核算请假天数失败', error) + return '请假天数核算失败,请稍后重试' + } finally { + if (seq === requestSeq) calculating.value = false + } + // 核算期间时段又被修改,结果已过期 + if (seq !== requestSeq) return '请假时段已变化,请确认请假天数后重新提交' + if (!Number.isFinite(days)) return '请假天数核算失败,请稍后重试' + if (days <= 0) return '所选时段内没有工作日' + setFieldValue(config.leaveDays, days) + return '' + } + + return { enabled, rangeError, calculating, applyFieldState, refresh, validateBeforeSubmit } +} diff --git a/src/components/FormCreate/src/utils/workflowForm.ts b/src/components/FormCreate/src/utils/workflowForm.ts new file mode 100644 index 0000000..b97662c --- /dev/null +++ b/src/components/FormCreate/src/utils/workflowForm.ts @@ -0,0 +1,24 @@ +import formCreate from '@form-create/element-ui' +import { cloneDeep } from 'lodash-es' +import { applyDynamicDefaults } from './fieldDefaults' + +/** 表单模板、流程仿真共用的规则结构,保留 form-create 的布局和扩展属性。 */ +export type WorkflowRule = Record + +/** 统一解析、规则准备、默认值和数据回填;场景差异通过显式能力传入。 */ +export const prepareWorkflowForm = (conf: string, fields: string[], context: { + values?: WorkflowRule + deferDisabledDates?: boolean + getCurrentUserValue?: (key: string) => unknown + parse?: (source: string) => any + prepareRules?: (rules: WorkflowRule[]) => void +} = {}) => { + const parse = context.parse || ((source: string) => formCreate.parseJson(source)) + const option = parse(conf || '{}') as WorkflowRule + const rule = (fields || []).map((source) => parse(source)) as WorkflowRule[] + const values = cloneDeep(context.values ?? option.formData ?? {}) + context.prepareRules?.(rule) + applyDynamicDefaults(rule, values, context.deferDisabledDates, context.getCurrentUserValue) + option.formData = cloneDeep(values) + return { option, rule, value: values } +} diff --git a/src/components/Highlight/index.ts b/src/components/Highlight/index.ts new file mode 100644 index 0000000..3e2d9ed --- /dev/null +++ b/src/components/Highlight/index.ts @@ -0,0 +1,3 @@ +import Highlight from './src/Highlight.vue' + +export { Highlight } diff --git a/src/components/Highlight/src/Highlight.vue b/src/components/Highlight/src/Highlight.vue new file mode 100644 index 0000000..ef923a9 --- /dev/null +++ b/src/components/Highlight/src/Highlight.vue @@ -0,0 +1,65 @@ + diff --git a/src/components/IFrame/index.ts b/src/components/IFrame/index.ts new file mode 100644 index 0000000..9f8cf24 --- /dev/null +++ b/src/components/IFrame/index.ts @@ -0,0 +1,3 @@ +import IFrame from './src/IFrame.vue' + +export { IFrame } diff --git a/src/components/IFrame/src/IFrame.vue b/src/components/IFrame/src/IFrame.vue new file mode 100644 index 0000000..64ffc0e --- /dev/null +++ b/src/components/IFrame/src/IFrame.vue @@ -0,0 +1,47 @@ + + diff --git a/src/components/Icon/index.ts b/src/components/Icon/index.ts new file mode 100644 index 0000000..33d1de3 --- /dev/null +++ b/src/components/Icon/index.ts @@ -0,0 +1,4 @@ +import Icon from './src/Icon.vue' +import IconSelect from './src/IconSelect.vue' + +export { Icon, IconSelect } diff --git a/src/components/Icon/src/Icon.vue b/src/components/Icon/src/Icon.vue new file mode 100644 index 0000000..7e2ec94 --- /dev/null +++ b/src/components/Icon/src/Icon.vue @@ -0,0 +1,86 @@ + + + diff --git a/src/components/Icon/src/IconSelect.vue b/src/components/Icon/src/IconSelect.vue new file mode 100644 index 0000000..76cc6d5 --- /dev/null +++ b/src/components/Icon/src/IconSelect.vue @@ -0,0 +1,239 @@ + + + + + diff --git a/src/components/Icon/src/data.ts b/src/components/Icon/src/data.ts new file mode 100644 index 0000000..2a4ed5a --- /dev/null +++ b/src/components/Icon/src/data.ts @@ -0,0 +1,1961 @@ +export const IconJson = { + 'ep:': [ + 'add-location', + 'aim', + 'alarm-clock', + 'apple', + 'arrow-down', + 'arrow-down-bold', + 'arrow-left', + 'arrow-left-bold', + 'arrow-right', + 'arrow-right-bold', + 'arrow-up', + 'arrow-up-bold', + 'avatar', + 'back', + 'baseball', + 'basketball', + 'bell', + 'bell-filled', + 'bicycle', + 'bottom', + 'bottom-left', + 'bottom-right', + 'bowl', + 'box', + 'briefcase', + 'brush', + 'brush-filled', + 'burger', + 'calendar', + 'camera', + 'camera-filled', + 'caret-bottom', + 'caret-left', + 'caret-right', + 'caret-top', + 'cellphone', + 'chat-dot-round', + 'chat-dot-square', + 'chat-line-round', + 'chat-line-square', + 'chat-round', + 'chat-square', + 'check', + 'checked', + 'cherry', + 'chicken', + 'circle-check', + 'circle-check-filled', + 'circle-close', + 'circle-close-filled', + 'circle-plus', + 'circle-plus-filled', + 'clock', + 'close', + 'close-bold', + 'cloudy', + 'coffee', + 'coffee-cup', + 'coin', + 'cold-drink', + 'collection', + 'collection-tag', + 'comment', + 'compass', + 'connection', + 'coordinate', + 'copy-document', + 'cpu', + 'credit-card', + 'crop', + 'd-arrow-left', + 'd-arrow-right', + 'd-caret', + 'data-analysis', + 'data-board', + 'data-line', + 'delete', + 'delete-filled', + 'delete-location', + 'dessert', + 'discount', + 'dish', + 'dish-dot', + 'document', + 'document-add', + 'document-checked', + 'document-copy', + 'document-delete', + 'document-remove', + 'download', + 'drizzling', + 'edit', + 'edit-pen', + 'eleme', + 'eleme-filled', + 'expand', + 'failed', + 'female', + 'files', + 'film', + 'filter', + 'finished', + 'first-aid-kit', + 'flag', + 'fold', + 'folder', + 'folder-add', + 'folder-checked', + 'folder-delete', + 'folder-opened', + 'folder-remove', + 'food', + 'football', + 'fork-spoon', + 'fries', + 'full-screen', + 'goblet', + 'goblet-full', + 'goblet-square', + 'goblet-square-full', + 'goods', + 'goods-filled', + 'grape', + 'grid', + 'guide', + 'headset', + 'help', + 'help-filled', + 'histogram', + 'home-filled', + 'hot-water', + 'house', + 'ice-cream', + 'ice-cream-round', + 'ice-cream-square', + 'ice-drink', + 'ice-tea', + 'info-filled', + 'iphone', + 'key', + 'knife-fork', + 'lightning', + 'link', + 'list', + 'loading', + 'location', + 'location-filled', + 'location-information', + 'lock', + 'lollipop', + 'magic-stick', + 'magnet', + 'male', + 'management', + 'map-location', + 'medal', + 'menu', + 'message', + 'message-box', + 'mic', + 'microphone', + 'milk-tea', + 'minus', + 'money', + 'monitor', + 'moon', + 'moon-night', + 'more', + 'more-filled', + 'mostly-cloudy', + 'mouse', + 'mug', + 'mute', + 'mute-notification', + 'no-smoking', + 'notebook', + 'notification', + 'odometer', + 'office-building', + 'open', + 'operation', + 'opportunity', + 'orange', + 'paperclip', + 'partly-cloudy', + 'pear', + 'phone', + 'phone-filled', + 'picture', + 'picture-filled', + 'picture-rounded', + 'pie-chart', + 'place', + 'platform', + 'plus', + 'pointer', + 'position', + 'postcard', + 'pouring', + 'present', + 'price-tag', + 'printer', + 'promotion', + 'question-filled', + 'rank', + 'reading', + 'reading-lamp', + 'refresh', + 'refresh-left', + 'refresh-right', + 'refrigerator', + 'remove', + 'remove-filled', + 'right', + 'scale-to-original', + 'school', + 'scissor', + 'search', + 'select', + 'sell', + 'semi-select', + 'service', + 'set-up', + 'setting', + 'share', + 'ship', + 'shop', + 'shopping-bag', + 'shopping-cart', + 'shopping-cart-full', + 'smoking', + 'soccer', + 'sold-out', + 'sort', + 'sort-down', + 'sort-up', + 'stamp', + 'star', + 'star-filled', + 'stopwatch', + 'success-filled', + 'sugar', + 'suitcase', + 'sunny', + 'sunrise', + 'sunset', + 'switch', + 'switch-button', + 'takeaway-box', + 'ticket', + 'tickets', + 'timer', + 'toilet-paper', + 'tools', + 'top', + 'top-left', + 'top-right', + 'trend-charts', + 'trophy', + 'turn-off', + 'umbrella', + 'unlock', + 'upload', + 'upload-filled', + 'user', + 'user-filled', + 'van', + 'video-camera', + 'video-camera-filled', + 'video-pause', + 'video-play', + 'view', + 'wallet', + 'wallet-filled', + 'warning', + 'warning-filled', + 'watch', + 'watermelon', + 'wind-power', + 'zoom-in', + 'zoom-out' + ], + 'fa:': [ + '500px', + 'address-book', + 'address-book-o', + 'address-card', + 'address-card-o', + 'adjust', + 'adn', + 'align-center', + 'align-justify', + 'align-left', + 'amazon', + 'ambulance', + 'american-sign-language-interpreting', + 'anchor', + 'android', + 'angellist', + 'angle-double-left', + 'angle-double-up', + 'angle-down', + 'angle-left', + 'angle-up', + 'apple', + 'archive', + 'area-chart', + 'arrow-circle-left', + 'arrow-circle-o-left', + 'arrow-circle-o-up', + 'arrow-circle-up', + 'arrow-left', + 'arrow-up', + 'arrows', + 'arrows-alt', + 'arrows-h', + 'arrows-v', + 'assistive-listening-systems', + 'asterisk', + 'at', + 'audio-description', + 'automobile', + 'backward', + 'balance-scale', + 'ban', + 'bandcamp', + 'bank', + 'bar-chart', + 'barcode', + 'bars', + 'bath', + 'battery', + 'battery-0', + 'battery-1', + 'battery-2', + 'battery-3', + 'bed', + 'beer', + 'behance', + 'behance-square', + 'bell', + 'bell-o', + 'bell-slash', + 'bell-slash-o', + 'bicycle', + 'binoculars', + 'birthday-cake', + 'bitbucket', + 'bitbucket-square', + 'bitcoin', + 'black-tie', + 'blind', + 'bluetooth', + 'bluetooth-b', + 'bold', + 'bolt', + 'bomb', + 'book', + 'bookmark', + 'bookmark-o', + 'braille', + 'briefcase', + 'bug', + 'building', + 'building-o', + 'bullhorn', + 'bullseye', + 'bus', + 'buysellads', + 'cab', + 'calculator', + 'calendar', + 'calendar-check-o', + 'calendar-minus-o', + 'calendar-o', + 'calendar-plus-o', + 'calendar-times-o', + 'camera', + 'camera-retro', + 'caret-down', + 'caret-left', + 'caret-square-o-left', + 'caret-square-o-up', + 'caret-up', + 'cart-arrow-down', + 'cart-plus', + 'cc', + 'cc-amex', + 'cc-diners-club', + 'cc-discover', + 'cc-jcb', + 'cc-mastercard', + 'cc-paypal', + 'cc-stripe', + 'cc-visa', + 'certificate', + 'chain', + 'chain-broken', + 'check', + 'check-circle', + 'check-circle-o', + 'check-square', + 'check-square-o', + 'chevron-circle-left', + 'chevron-circle-up', + 'chevron-down', + 'chevron-left', + 'chevron-up', + 'child', + 'chrome', + 'circle', + 'circle-o', + 'circle-o-notch', + 'circle-thin', + 'clipboard', + 'clock-o', + 'clone', + 'close', + 'cloud', + 'cloud-download', + 'cloud-upload', + 'cny', + 'code', + 'code-fork', + 'codepen', + 'codiepie', + 'coffee', + 'cog', + 'cogs', + 'columns', + 'comment', + 'comment-o', + 'commenting', + 'commenting-o', + 'comments', + 'comments-o', + 'compass', + 'compress', + 'connectdevelop', + 'contao', + 'copy', + 'copyright', + 'creative-commons', + 'credit-card', + 'credit-card-alt', + 'crop', + 'crosshairs', + 'css3', + 'cube', + 'cubes', + 'cut', + 'cutlery', + 'dashboard', + 'dashcube', + 'database', + 'deaf', + 'dedent', + 'delicious', + 'desktop', + 'deviantart', + 'diamond', + 'digg', + 'dollar', + 'dot-circle-o', + 'download', + 'dribbble', + 'drivers-license', + 'drivers-license-o', + 'dropbox', + 'drupal', + 'edge', + 'edit', + 'eercast', + 'eject', + 'ellipsis-h', + 'ellipsis-v', + 'empire', + 'envelope', + 'envelope-o', + 'envelope-open', + 'envelope-open-o', + 'envelope-square', + 'envira', + 'eraser', + 'etsy', + 'eur', + 'exchange', + 'exclamation', + 'exclamation-circle', + 'exclamation-triangle', + 'expand', + 'expeditedssl', + 'external-link', + 'external-link-square', + 'eye', + 'eye-slash', + 'eyedropper', + 'fa', + 'facebook', + 'facebook-official', + 'facebook-square', + 'fast-backward', + 'fax', + 'feed', + 'female', + 'fighter-jet', + 'file', + 'file-archive-o', + 'file-audio-o', + 'file-code-o', + 'file-excel-o', + 'file-image-o', + 'file-movie-o', + 'file-o', + 'file-pdf-o', + 'file-powerpoint-o', + 'file-text', + 'file-text-o', + 'file-word-o', + 'film', + 'filter', + 'fire', + 'fire-extinguisher', + 'firefox', + 'first-order', + 'flag', + 'flag-checkered', + 'flag-o', + 'flask', + 'flickr', + 'floppy-o', + 'folder', + 'folder-o', + 'folder-open', + 'folder-open-o', + 'font', + 'fonticons', + 'fort-awesome', + 'forumbee', + 'foursquare', + 'free-code-camp', + 'frown-o', + 'futbol-o', + 'gamepad', + 'gavel', + 'gbp', + 'genderless', + 'get-pocket', + 'gg', + 'gg-circle', + 'gift', + 'git', + 'git-square', + 'github', + 'github-alt', + 'github-square', + 'gitlab', + 'gittip', + 'glass', + 'glide', + 'glide-g', + 'globe', + 'google', + 'google-plus', + 'google-plus-circle', + 'google-plus-square', + 'google-wallet', + 'graduation-cap', + 'grav', + 'group', + 'h-square', + 'hacker-news', + 'hand-grab-o', + 'hand-lizard-o', + 'hand-o-left', + 'hand-o-up', + 'hand-paper-o', + 'hand-peace-o', + 'hand-pointer-o', + 'hand-scissors-o', + 'hand-spock-o', + 'handshake-o', + 'hashtag', + 'hdd-o', + 'header', + 'headphones', + 'heart', + 'heart-o', + 'heartbeat', + 'history', + 'home', + 'hospital-o', + 'hourglass', + 'hourglass-1', + 'hourglass-2', + 'hourglass-3', + 'hourglass-o', + 'houzz', + 'html5', + 'i-cursor', + 'id-badge', + 'ils', + 'image', + 'imdb', + 'inbox', + 'indent', + 'industry', + 'info', + 'info-circle', + 'inr', + 'instagram', + 'internet-explorer', + 'intersex', + 'ioxhost', + 'italic', + 'joomla', + 'jsfiddle', + 'key', + 'keyboard-o', + 'krw', + 'language', + 'laptop', + 'lastfm', + 'lastfm-square', + 'leaf', + 'leanpub', + 'lemon-o', + 'level-up', + 'life-bouy', + 'lightbulb-o', + 'line-chart', + 'linkedin', + 'linkedin-square', + 'linode', + 'linux', + 'list', + 'list-alt', + 'list-ol', + 'list-ul', + 'location-arrow', + 'lock', + 'long-arrow-left', + 'long-arrow-up', + 'low-vision', + 'magic', + 'magnet', + 'mail-forward', + 'mail-reply', + 'mail-reply-all', + 'male', + 'map', + 'map-marker', + 'map-o', + 'map-pin', + 'map-signs', + 'mars', + 'mars-double', + 'mars-stroke', + 'mars-stroke-h', + 'mars-stroke-v', + 'maxcdn', + 'meanpath', + 'medium', + 'medkit', + 'meetup', + 'meh-o', + 'mercury', + 'microchip', + 'microphone', + 'microphone-slash', + 'minus', + 'minus-circle', + 'minus-square', + 'minus-square-o', + 'mixcloud', + 'mobile', + 'modx', + 'money', + 'moon-o', + 'motorcycle', + 'mouse-pointer', + 'music', + 'neuter', + 'newspaper-o', + 'object-group', + 'object-ungroup', + 'odnoklassniki', + 'odnoklassniki-square', + 'opencart', + 'openid', + 'opera', + 'optin-monster', + 'pagelines', + 'paint-brush', + 'paper-plane', + 'paper-plane-o', + 'paperclip', + 'paragraph', + 'pause', + 'pause-circle', + 'pause-circle-o', + 'paw', + 'paypal', + 'pencil', + 'pencil-square', + 'percent', + 'phone', + 'phone-square', + 'pie-chart', + 'pied-piper', + 'pied-piper-alt', + 'pied-piper-pp', + 'pinterest', + 'pinterest-p', + 'pinterest-square', + 'plane', + 'play', + 'play-circle', + 'play-circle-o', + 'plug', + 'plus', + 'plus-circle', + 'plus-square', + 'plus-square-o', + 'podcast', + 'power-off', + 'print', + 'product-hunt', + 'puzzle-piece', + 'qq', + 'qrcode', + 'question', + 'question-circle', + 'question-circle-o', + 'quora', + 'quote-left', + 'quote-right', + 'ra', + 'random', + 'ravelry', + 'recycle', + 'reddit', + 'reddit-alien', + 'reddit-square', + 'refresh', + 'registered', + 'renren', + 'repeat', + 'retweet', + 'road', + 'rocket', + 'rotate-left', + 'rouble', + 'rss-square', + 'safari', + 'scribd', + 'search', + 'search-minus', + 'search-plus', + 'sellsy', + 'server', + 'share-alt', + 'share-alt-square', + 'share-square', + 'share-square-o', + 'shield', + 'ship', + 'shirtsinbulk', + 'shopping-bag', + 'shopping-basket', + 'shopping-cart', + 'shower', + 'sign-in', + 'sign-language', + 'sign-out', + 'signal', + 'simplybuilt', + 'sitemap', + 'skyatlas', + 'skype', + 'slack', + 'sliders', + 'slideshare', + 'smile-o', + 'snapchat', + 'snapchat-ghost', + 'snapchat-square', + 'snowflake-o', + 'sort', + 'sort-alpha-asc', + 'sort-alpha-desc', + 'sort-amount-asc', + 'sort-amount-desc', + 'sort-asc', + 'sort-numeric-asc', + 'sort-numeric-desc', + 'soundcloud', + 'space-shuttle', + 'spinner', + 'spoon', + 'spotify', + 'square', + 'square-o', + 'stack-exchange', + 'stack-overflow', + 'star', + 'star-half', + 'star-half-empty', + 'star-o', + 'steam', + 'steam-square', + 'step-backward', + 'stethoscope', + 'sticky-note', + 'sticky-note-o', + 'stop', + 'stop-circle', + 'stop-circle-o', + 'street-view', + 'strikethrough', + 'stumbleupon', + 'stumbleupon-circle', + 'subscript', + 'subway', + 'suitcase', + 'sun-o', + 'superpowers', + 'superscript', + 'table', + 'tablet', + 'tag', + 'tags', + 'tasks', + 'telegram', + 'television', + 'tencent-weibo', + 'terminal', + 'text-height', + 'text-width', + 'th', + 'th-large', + 'th-list', + 'themeisle', + 'thermometer', + 'thermometer-0', + 'thermometer-1', + 'thermometer-2', + 'thermometer-3', + 'thumb-tack', + 'thumbs-down', + 'thumbs-o-up', + 'thumbs-up', + 'ticket', + 'times-circle', + 'times-circle-o', + 'times-rectangle', + 'times-rectangle-o', + 'tint', + 'toggle-off', + 'toggle-on', + 'trademark', + 'train', + 'transgender-alt', + 'trash', + 'trash-o', + 'tree', + 'trello', + 'tripadvisor', + 'trophy', + 'truck', + 'try', + 'tty', + 'tumblr', + 'tumblr-square', + 'twitch', + 'twitter', + 'twitter-square', + 'umbrella', + 'underline', + 'universal-access', + 'unlock', + 'unlock-alt', + 'upload', + 'usb', + 'user', + 'user-circle', + 'user-circle-o', + 'user-md', + 'user-o', + 'user-plus', + 'user-secret', + 'user-times', + 'venus', + 'venus-double', + 'venus-mars', + 'viacoin', + 'viadeo', + 'viadeo-square', + 'video-camera', + 'vimeo', + 'vimeo-square', + 'vine', + 'vk', + 'volume-control-phone', + 'volume-down', + 'volume-off', + 'volume-up', + 'wechat', + 'weibo', + 'whatsapp', + 'wheelchair', + 'wheelchair-alt', + 'wifi', + 'wikipedia-w', + 'window-maximize', + 'window-minimize', + 'window-restore', + 'windows', + 'wordpress', + 'wpbeginner', + 'wpexplorer', + 'wpforms', + 'wrench', + 'xing', + 'xing-square', + 'y-combinator', + 'yahoo', + 'yelp', + 'yoast', + 'youtube', + 'youtube-play', + 'youtube-square' + ], + 'fa-solid:': [ + 'abacus', + 'ad', + 'address-book', + 'address-card', + 'adjust', + 'air-freshener', + 'align-center', + 'align-justify', + 'align-left', + 'align-right', + 'allergies', + 'ambulance', + 'american-sign-language-interpreting', + 'anchor', + 'angle-double-down', + 'angle-double-left', + 'angle-double-right', + 'angle-double-up', + 'angle-down', + 'angle-left', + 'angle-right', + 'angle-up', + 'angry', + 'ankh', + 'apple-alt', + 'archive', + 'archway', + 'arrow-alt-circle-down', + 'arrow-alt-circle-left', + 'arrow-alt-circle-right', + 'arrow-alt-circle-up', + 'arrow-circle-down', + 'arrow-circle-left', + 'arrow-circle-right', + 'arrow-circle-up', + 'arrow-down', + 'arrow-left', + 'arrow-right', + 'arrow-up', + 'arrows-alt', + 'arrows-alt-h', + 'arrows-alt-v', + 'assistive-listening-systems', + 'asterisk', + 'at', + 'atlas', + 'atom', + 'audio-description', + 'award', + 'baby', + 'baby-carriage', + 'backspace', + 'backward', + 'bacon', + 'bacteria', + 'bacterium', + 'bahai', + 'balance-scale', + 'balance-scale-left', + 'balance-scale-right', + 'ban', + 'band-aid', + 'barcode', + 'bars', + 'baseball-ball', + 'basketball-ball', + 'bath', + 'battery-empty', + 'battery-full', + 'battery-half', + 'battery-quarter', + 'battery-three-quarters', + 'bed', + 'beer', + 'bell', + 'bell-slash', + 'bezier-curve', + 'bible', + 'bicycle', + 'biking', + 'binoculars', + 'biohazard', + 'birthday-cake', + 'blender', + 'blender-phone', + 'blind', + 'blog', + 'bold', + 'bolt', + 'bomb', + 'bone', + 'bong', + 'book', + 'book-dead', + 'book-medical', + 'book-open', + 'book-reader', + 'bookmark', + 'border-all', + 'border-none', + 'border-style', + 'bowling-ball', + 'box', + 'box-open', + 'box-tissue', + 'boxes', + 'braille', + 'brain', + 'bread-slice', + 'briefcase', + 'briefcase-medical', + 'broadcast-tower', + 'broom', + 'brush', + 'bug', + 'building', + 'bullhorn', + 'bullseye', + 'burn', + 'bus', + 'bus-alt', + 'business-time', + 'calculator', + 'calculator-alt', + 'calendar', + 'calendar-alt', + 'calendar-check', + 'calendar-day', + 'calendar-minus', + 'calendar-plus', + 'calendar-times', + 'calendar-week', + 'camera', + 'camera-retro', + 'campground', + 'candy-cane', + 'cannabis', + 'capsules', + 'car', + 'car-alt', + 'car-battery', + 'car-crash', + 'car-side', + 'caravan', + 'caret-down', + 'caret-left', + 'caret-right', + 'caret-square-down', + 'caret-square-left', + 'caret-square-right', + 'caret-square-up', + 'caret-up', + 'carrot', + 'cart-arrow-down', + 'cart-plus', + 'cash-register', + 'cat', + 'certificate', + 'chair', + 'chalkboard', + 'chalkboard-teacher', + 'charging-station', + 'chart-area', + 'chart-bar', + 'chart-line', + 'chart-pie', + 'check', + 'check-circle', + 'check-double', + 'check-square', + 'cheese', + 'chess', + 'chess-bishop', + 'chess-board', + 'chess-king', + 'chess-knight', + 'chess-pawn', + 'chess-queen', + 'chess-rook', + 'chevron-circle-down', + 'chevron-circle-left', + 'chevron-circle-right', + 'chevron-circle-up', + 'chevron-down', + 'chevron-left', + 'chevron-right', + 'chevron-up', + 'child', + 'church', + 'circle', + 'circle-notch', + 'city', + 'clinic-medical', + 'clipboard', + 'clipboard-check', + 'clipboard-list', + 'clock', + 'clone', + 'closed-captioning', + 'cloud', + 'cloud-download-alt', + 'cloud-meatball', + 'cloud-moon', + 'cloud-moon-rain', + 'cloud-rain', + 'cloud-showers-heavy', + 'cloud-sun', + 'cloud-sun-rain', + 'cloud-upload-alt', + 'cocktail', + 'code', + 'code-branch', + 'coffee', + 'cog', + 'cogs', + 'coins', + 'columns', + 'comment', + 'comment-alt', + 'comment-dollar', + 'comment-dots', + 'comment-medical', + 'comment-slash', + 'comments', + 'comments-dollar', + 'compact-disc', + 'compass', + 'compress', + 'compress-alt', + 'compress-arrows-alt', + 'concierge-bell', + 'cookie', + 'cookie-bite', + 'copy', + 'copyright', + 'couch', + 'credit-card', + 'crop', + 'crop-alt', + 'cross', + 'crosshairs', + 'crow', + 'crown', + 'crutch', + 'cube', + 'cubes', + 'cut', + 'database', + 'deaf', + 'democrat', + 'desktop', + 'dharmachakra', + 'diagnoses', + 'dice', + 'dice-d20', + 'dice-d6', + 'dice-five', + 'dice-four', + 'dice-one', + 'dice-six', + 'dice-three', + 'dice-two', + 'digital-tachograph', + 'directions', + 'disease', + 'divide', + 'dizzy', + 'dna', + 'dog', + 'dollar-sign', + 'dolly', + 'dolly-flatbed', + 'donate', + 'door-closed', + 'door-open', + 'dot-circle', + 'dove', + 'download', + 'drafting-compass', + 'dragon', + 'draw-polygon', + 'drum', + 'drum-steelpan', + 'drumstick-bite', + 'dumbbell', + 'dumpster', + 'dumpster-fire', + 'dungeon', + 'edit', + 'egg', + 'eject', + 'ellipsis-h', + 'ellipsis-v', + 'empty-set', + 'envelope', + 'envelope-open', + 'envelope-open-text', + 'envelope-square', + 'equals', + 'eraser', + 'ethernet', + 'euro-sign', + 'exchange-alt', + 'exclamation', + 'exclamation-circle', + 'exclamation-triangle', + 'expand', + 'expand-alt', + 'expand-arrows-alt', + 'external-link-alt', + 'external-link-square-alt', + 'eye', + 'eye-dropper', + 'eye-slash', + 'fan', + 'fast-backward', + 'fast-forward', + 'faucet', + 'fax', + 'feather', + 'feather-alt', + 'female', + 'fighter-jet', + 'file', + 'file-alt', + 'file-archive', + 'file-audio', + 'file-code', + 'file-contract', + 'file-csv', + 'file-download', + 'file-excel', + 'file-export', + 'file-image', + 'file-import', + 'file-invoice', + 'file-invoice-dollar', + 'file-medical', + 'file-medical-alt', + 'file-pdf', + 'file-powerpoint', + 'file-prescription', + 'file-signature', + 'file-upload', + 'file-video', + 'file-word', + 'fill', + 'fill-drip', + 'film', + 'filter', + 'fingerprint', + 'fire', + 'fire-alt', + 'fire-extinguisher', + 'first-aid', + 'fish', + 'fist-raised', + 'flag', + 'flag-checkered', + 'flag-usa', + 'flask', + 'flushed', + 'folder', + 'folder-minus', + 'folder-open', + 'folder-plus', + 'font', + 'football-ball', + 'forward', + 'frog', + 'frown', + 'frown-open', + 'function', + 'funnel-dollar', + 'futbol', + 'gamepad', + 'gas-pump', + 'gavel', + 'gem', + 'genderless', + 'ghost', + 'gift', + 'gifts', + 'glass-cheers', + 'glass-martini', + 'glass-martini-alt', + 'glass-whiskey', + 'glasses', + 'globe', + 'globe-africa', + 'globe-americas', + 'globe-asia', + 'globe-europe', + 'golf-ball', + 'gopuram', + 'graduation-cap', + 'greater-than', + 'greater-than-equal', + 'grimace', + 'grin', + 'grin-alt', + 'grin-beam', + 'grin-beam-sweat', + 'grin-hearts', + 'grin-squint', + 'grin-squint-tears', + 'grin-stars', + 'grin-tears', + 'grin-tongue', + 'grin-tongue-squint', + 'grin-tongue-wink', + 'grin-wink', + 'grip-horizontal', + 'grip-lines', + 'grip-lines-vertical', + 'grip-vertical', + 'guitar', + 'h-square', + 'hamburger', + 'hammer', + 'hamsa', + 'hand-holding', + 'hand-holding-heart', + 'hand-holding-medical', + 'hand-holding-usd', + 'hand-holding-water', + 'hand-lizard', + 'hand-middle-finger', + 'hand-paper', + 'hand-peace', + 'hand-point-down', + 'hand-point-left', + 'hand-point-right', + 'hand-point-up', + 'hand-pointer', + 'hand-rock', + 'hand-scissors', + 'hand-sparkles', + 'hand-spock', + 'hands', + 'hands-helping', + 'hands-wash', + 'handshake', + 'handshake-alt-slash', + 'handshake-slash', + 'hanukiah', + 'hard-hat', + 'hashtag', + 'hat-cowboy', + 'hat-cowboy-side', + 'hat-wizard', + 'hdd', + 'head-side-cough', + 'head-side-cough-slash', + 'head-side-mask', + 'head-side-virus', + 'heading', + 'headphones', + 'headphones-alt', + 'headset', + 'heart', + 'heart-broken', + 'heartbeat', + 'helicopter', + 'highlighter', + 'hiking', + 'hippo', + 'history', + 'hockey-puck', + 'holly-berry', + 'home', + 'horse', + 'horse-head', + 'hospital', + 'hospital-alt', + 'hospital-symbol', + 'hospital-user', + 'hot-tub', + 'hotdog', + 'hotel', + 'hourglass', + 'hourglass-end', + 'hourglass-half', + 'hourglass-start', + 'house-damage', + 'house-user', + 'hryvnia', + 'i-cursor', + 'ice-cream', + 'icicles', + 'icons', + 'id-badge', + 'id-card', + 'id-card-alt', + 'igloo', + 'image', + 'images', + 'inbox', + 'indent', + 'industry', + 'infinity', + 'info', + 'info-circle', + 'integral', + 'intersection', + 'italic', + 'jedi', + 'joint', + 'journal-whills', + 'kaaba', + 'key', + 'keyboard', + 'khanda', + 'kiss', + 'kiss-beam', + 'kiss-wink-heart', + 'kiwi-bird', + 'lambda', + 'landmark', + 'language', + 'laptop', + 'laptop-code', + 'laptop-house', + 'laptop-medical', + 'laugh', + 'laugh-beam', + 'laugh-squint', + 'laugh-wink', + 'layer-group', + 'leaf', + 'lemon', + 'less-than', + 'less-than-equal', + 'level-down-alt', + 'level-up-alt', + 'life-ring', + 'lightbulb', + 'link', + 'lira-sign', + 'list', + 'list-alt', + 'list-ol', + 'list-ul', + 'location-arrow', + 'lock', + 'lock-open', + 'long-arrow-alt-down', + 'long-arrow-alt-left', + 'long-arrow-alt-right', + 'long-arrow-alt-up', + 'low-vision', + 'luggage-cart', + 'lungs', + 'lungs-virus', + 'magic', + 'magnet', + 'mail-bulk', + 'male', + 'map', + 'map-marked', + 'map-marked-alt', + 'map-marker', + 'map-marker-alt', + 'map-pin', + 'map-signs', + 'marker', + 'mars', + 'mars-double', + 'mars-stroke', + 'mars-stroke-h', + 'mars-stroke-v', + 'mask', + 'medal', + 'medkit', + 'meh', + 'meh-blank', + 'meh-rolling-eyes', + 'memory', + 'menorah', + 'mercury', + 'meteor', + 'microchip', + 'microphone', + 'microphone-alt', + 'microphone-alt-slash', + 'microphone-slash', + 'microscope', + 'minus', + 'minus-circle', + 'minus-square', + 'mitten', + 'mobile', + 'mobile-alt', + 'money-bill', + 'money-bill-alt', + 'money-bill-wave', + 'money-bill-wave-alt', + 'money-check', + 'money-check-alt', + 'monument', + 'moon', + 'mortar-pestle', + 'mosque', + 'motorcycle', + 'mountain', + 'mouse', + 'mouse-pointer', + 'mug-hot', + 'music', + 'network-wired', + 'neuter', + 'newspaper', + 'not-equal', + 'notes-medical', + 'object-group', + 'object-ungroup', + 'oil-can', + 'om', + 'omega', + 'otter', + 'outdent', + 'pager', + 'paint-brush', + 'paint-roller', + 'palette', + 'pallet', + 'paper-plane', + 'paperclip', + 'parachute-box', + 'paragraph', + 'parking', + 'passport', + 'pastafarianism', + 'paste', + 'pause', + 'pause-circle', + 'paw', + 'peace', + 'pen', + 'pen-alt', + 'pen-fancy', + 'pen-nib', + 'pen-square', + 'pencil-alt', + 'pencil-ruler', + 'people-arrows', + 'people-carry', + 'pepper-hot', + 'percent', + 'percentage', + 'person-booth', + 'phone', + 'phone-alt', + 'phone-slash', + 'phone-square', + 'phone-square-alt', + 'phone-volume', + 'photo-video', + 'pi', + 'piggy-bank', + 'pills', + 'pizza-slice', + 'place-of-worship', + 'plane', + 'plane-arrival', + 'plane-departure', + 'plane-slash', + 'play', + 'play-circle', + 'plug', + 'plus', + 'plus-circle', + 'plus-square', + 'podcast', + 'poll', + 'poll-h', + 'poo', + 'poo-storm', + 'poop', + 'portrait', + 'pound-sign', + 'power-off', + 'pray', + 'praying-hands', + 'prescription', + 'prescription-bottle', + 'prescription-bottle-alt', + 'print', + 'procedures', + 'project-diagram', + 'pump-medical', + 'pump-soap', + 'puzzle-piece', + 'qrcode', + 'question', + 'question-circle', + 'quidditch', + 'quote-left', + 'quote-right', + 'quran', + 'radiation', + 'radiation-alt', + 'rainbow', + 'random', + 'receipt', + 'record-vinyl', + 'recycle', + 'redo', + 'redo-alt', + 'registered', + 'remove-format', + 'reply', + 'reply-all', + 'republican', + 'restroom', + 'retweet', + 'ribbon', + 'ring', + 'road', + 'robot', + 'rocket', + 'route', + 'rss', + 'rss-square', + 'ruble-sign', + 'ruler', + 'ruler-combined', + 'ruler-horizontal', + 'ruler-vertical', + 'running', + 'rupee-sign', + 'sad-cry', + 'sad-tear', + 'satellite', + 'satellite-dish', + 'save', + 'school', + 'screwdriver', + 'scroll', + 'sd-card', + 'search', + 'search-dollar', + 'search-location', + 'search-minus', + 'search-plus', + 'seedling', + 'server', + 'shapes', + 'share', + 'share-alt', + 'share-alt-square', + 'share-square', + 'shekel-sign', + 'shield-alt', + 'shield-virus', + 'ship', + 'shipping-fast', + 'shoe-prints', + 'shopping-bag', + 'shopping-basket', + 'shopping-cart', + 'shower', + 'shuttle-van', + 'sigma', + 'sign', + 'sign-in-alt', + 'sign-language', + 'sign-out-alt', + 'signal', + 'signal-alt', + 'signal-alt-slash', + 'signal-slash', + 'signature', + 'sim-card', + 'sink', + 'sitemap', + 'skating', + 'skiing', + 'skiing-nordic', + 'skull', + 'skull-crossbones', + 'slash', + 'sleigh', + 'sliders-h', + 'smile', + 'smile-beam', + 'smile-wink', + 'smog', + 'smoking', + 'smoking-ban', + 'sms', + 'snowboarding', + 'snowflake', + 'snowman', + 'snowplow', + 'soap', + 'socks', + 'solar-panel', + 'sort', + 'sort-alpha-down', + 'sort-alpha-down-alt', + 'sort-alpha-up', + 'sort-alpha-up-alt', + 'sort-amount-down', + 'sort-amount-down-alt', + 'sort-amount-up', + 'sort-amount-up-alt', + 'sort-down', + 'sort-numeric-down', + 'sort-numeric-down-alt', + 'sort-numeric-up', + 'sort-numeric-up-alt', + 'sort-up', + 'spa', + 'space-shuttle', + 'spell-check', + 'spider', + 'spinner', + 'splotch', + 'spray-can', + 'square', + 'square-full', + 'square-root', + 'square-root-alt', + 'stamp', + 'star', + 'star-and-crescent', + 'star-half', + 'star-half-alt', + 'star-of-david', + 'star-of-life', + 'step-backward', + 'step-forward', + 'stethoscope', + 'sticky-note', + 'stop', + 'stop-circle', + 'stopwatch', + 'stopwatch-20', + 'store', + 'store-alt', + 'store-alt-slash', + 'store-slash', + 'stream', + 'street-view', + 'strikethrough', + 'stroopwafel', + 'subscript', + 'subway', + 'suitcase', + 'suitcase-rolling', + 'sun', + 'superscript', + 'surprise', + 'swatchbook', + 'swimmer', + 'swimming-pool', + 'synagogue', + 'sync', + 'sync-alt', + 'syringe', + 'table', + 'table-tennis', + 'tablet', + 'tablet-alt', + 'tablets', + 'tachometer-alt', + 'tag', + 'tags', + 'tally', + 'tape', + 'tasks', + 'taxi', + 'teeth', + 'teeth-open', + 'temperature-high', + 'temperature-low', + 'tenge', + 'terminal', + 'text-height', + 'text-width', + 'th', + 'th-large', + 'th-list', + 'theater-masks', + 'thermometer', + 'thermometer-empty', + 'thermometer-full', + 'thermometer-half', + 'thermometer-quarter', + 'thermometer-three-quarters', + 'theta', + 'thumbs-down', + 'thumbs-up', + 'thumbtack', + 'ticket-alt', + 'tilde', + 'times', + 'times-circle', + 'tint', + 'tint-slash', + 'tired', + 'toggle-off', + 'toggle-on', + 'toilet', + 'toilet-paper', + 'toilet-paper-slash', + 'toolbox', + 'tools', + 'tooth', + 'torah', + 'torii-gate', + 'tractor', + 'trademark', + 'traffic-light', + 'trailer', + 'train', + 'tram', + 'transgender', + 'transgender-alt', + 'trash', + 'trash-alt', + 'trash-restore', + 'trash-restore-alt', + 'tree', + 'trophy', + 'truck', + 'truck-loading', + 'truck-monster', + 'truck-moving', + 'truck-pickup', + 'tshirt', + 'tty', + 'tv', + 'umbrella', + 'umbrella-beach', + 'underline', + 'undo', + 'undo-alt', + 'union', + 'universal-access', + 'university', + 'unlink', + 'unlock', + 'unlock-alt', + 'upload', + 'user', + 'user-alt', + 'user-alt-slash', + 'user-astronaut', + 'user-check', + 'user-circle', + 'user-clock', + 'user-cog', + 'user-edit', + 'user-friends', + 'user-graduate', + 'user-injured', + 'user-lock', + 'user-md', + 'user-minus', + 'user-ninja', + 'user-nurse', + 'user-plus', + 'user-secret', + 'user-shield', + 'user-slash', + 'user-tag', + 'user-tie', + 'user-times', + 'users', + 'users-cog', + 'users-slash', + 'utensil-spoon', + 'utensils', + 'value-absolute', + 'vector-square', + 'venus', + 'venus-double', + 'venus-mars', + 'vest', + 'vest-patches', + 'vial', + 'vials', + 'video', + 'video-slash', + 'vihara', + 'virus', + 'virus-slash', + 'viruses', + 'voicemail', + 'volleyball-ball', + 'volume', + 'volume-down', + 'volume-mute', + 'volume-off', + 'volume-slash', + 'volume-up', + 'vote-yea', + 'vr-cardboard', + 'walking', + 'wallet', + 'warehouse', + 'water', + 'wave-square', + 'weight', + 'weight-hanging', + 'wheelchair', + 'wifi', + 'wifi-slash', + 'wind', + 'window-close', + 'window-maximize', + 'window-minimize', + 'window-restore', + 'wine-bottle', + 'wine-glass', + 'wine-glass-alt', + 'won-sign', + 'wrench', + 'x-ray', + 'yen-sign', + 'yin-yang' + ] +} diff --git a/src/components/ImageViewer/index.ts b/src/components/ImageViewer/index.ts new file mode 100644 index 0000000..35764d6 --- /dev/null +++ b/src/components/ImageViewer/index.ts @@ -0,0 +1,33 @@ +import ImageViewer from './src/ImageViewer.vue' +import { isClient } from '@/utils/is' +import { createVNode, render, VNode } from 'vue' +import { ImageViewerProps } from './src/types' + +let instance: Nullable = null + +export function createImageViewer(options: ImageViewerProps) { + if (!isClient) return + const { + urlList, + initialIndex = 0, + infinite = true, + hideOnClickModal = false, + teleported = false, + zIndex = 2000, + show = true + } = options + + const propsData: Partial = {} + const container = document.createElement('div') + propsData.urlList = urlList + propsData.initialIndex = initialIndex + propsData.infinite = infinite + propsData.hideOnClickModal = hideOnClickModal + propsData.teleported = teleported + propsData.zIndex = zIndex + propsData.show = show + + document.body.appendChild(container) + instance = createVNode(ImageViewer, propsData) + render(instance, container) +} diff --git a/src/components/ImageViewer/src/ImageViewer.vue b/src/components/ImageViewer/src/ImageViewer.vue new file mode 100644 index 0000000..c84d06b --- /dev/null +++ b/src/components/ImageViewer/src/ImageViewer.vue @@ -0,0 +1,35 @@ + + + diff --git a/src/components/ImageViewer/src/types.ts b/src/components/ImageViewer/src/types.ts new file mode 100644 index 0000000..2fff4c0 --- /dev/null +++ b/src/components/ImageViewer/src/types.ts @@ -0,0 +1,9 @@ +export interface ImageViewerProps { + urlList?: string[] + zIndex?: number + initialIndex?: number + infinite?: boolean + hideOnClickModal?: boolean + teleported?: boolean + show?: boolean +} diff --git a/src/components/ImpactPreview/ImpactPreview.vue b/src/components/ImpactPreview/ImpactPreview.vue new file mode 100644 index 0000000..28f405c --- /dev/null +++ b/src/components/ImpactPreview/ImpactPreview.vue @@ -0,0 +1,43 @@ + + + + + diff --git a/src/components/ImpactPreview/index.ts b/src/components/ImpactPreview/index.ts new file mode 100644 index 0000000..a27f4f4 --- /dev/null +++ b/src/components/ImpactPreview/index.ts @@ -0,0 +1,4 @@ +import ImpactPreview from './ImpactPreview.vue' + +export { ImpactPreview } +export type { ImpactItem } from './ImpactPreview.vue' diff --git a/src/components/Infotip/index.ts b/src/components/Infotip/index.ts new file mode 100644 index 0000000..413fa5f --- /dev/null +++ b/src/components/Infotip/index.ts @@ -0,0 +1,3 @@ +import Infotip from './src/Infotip.vue' + +export { Infotip } diff --git a/src/components/Infotip/src/Infotip.vue b/src/components/Infotip/src/Infotip.vue new file mode 100644 index 0000000..0afd692 --- /dev/null +++ b/src/components/Infotip/src/Infotip.vue @@ -0,0 +1,54 @@ + + + diff --git a/src/components/InputPassword/index.ts b/src/components/InputPassword/index.ts new file mode 100644 index 0000000..1dcc38e --- /dev/null +++ b/src/components/InputPassword/index.ts @@ -0,0 +1,3 @@ +import InputPassword from './src/InputPassword.vue' + +export { InputPassword } diff --git a/src/components/InputPassword/src/InputPassword.vue b/src/components/InputPassword/src/InputPassword.vue new file mode 100644 index 0000000..b8c93e7 --- /dev/null +++ b/src/components/InputPassword/src/InputPassword.vue @@ -0,0 +1,152 @@ + + + + + diff --git a/src/components/JsonEditor/index.ts b/src/components/JsonEditor/index.ts new file mode 100644 index 0000000..037b449 --- /dev/null +++ b/src/components/JsonEditor/index.ts @@ -0,0 +1,3 @@ +import JsonEditor from './src/JsonEditor.vue' + +export { JsonEditor } diff --git a/src/components/JsonEditor/src/JsonEditor.vue b/src/components/JsonEditor/src/JsonEditor.vue new file mode 100644 index 0000000..f3789ee --- /dev/null +++ b/src/components/JsonEditor/src/JsonEditor.vue @@ -0,0 +1,126 @@ + + + + diff --git a/src/components/JsonEditor/types/index.ts b/src/components/JsonEditor/types/index.ts new file mode 100644 index 0000000..b7dadd7 --- /dev/null +++ b/src/components/JsonEditor/types/index.ts @@ -0,0 +1,80 @@ +import { JSONEditorOptions, JSONEditorMode } from 'jsoneditor' + +export interface JsonEditorProps { + /** + * JSON数据,支持双向绑定 + */ + modelValue: any + + /** + * 编辑器模式 + * @default 'tree' + */ + mode?: JSONEditorMode + + /** + * 编辑器高度 + * @default '400px' + */ + height?: string + + /** + * 是否显示模式选择下拉菜单 + * @default false + */ + showModeSelection?: boolean + + /** + * 是否显示导航栏 + * @default false + */ + showNavigationBar?: boolean + + /** + * 是否显示状态栏 + * @default true + */ + showStatusBar?: boolean + + /** + * 是否显示主菜单栏 + * @default true + */ + showMainMenuBar?: boolean + + /** + * JSONEditor配置选项 + * @see https://github.com/josdejong/jsoneditor/blob/develop/docs/api.md + */ + options?: Partial +} + +/** + * JsonEditor组件触发的事件 + */ +export interface JsonEditorEmits { + /** + * 数据更新时触发 + */ + (e: 'update:modelValue', value: any): void + + /** + * 数据变化时触发 + */ + (e: 'change', value: any): void + + /** + * 验证错误时触发 + */ + (e: 'error', errors: any): void +} + +/** + * JsonEditor组件暴露的方法 + */ +export interface JsonEditorExpose { + /** + * 获取原始的JSONEditor实例 + */ + getEditor: () => any +} diff --git a/src/components/LogDetailDrawer/LogDetailDrawer.vue b/src/components/LogDetailDrawer/LogDetailDrawer.vue new file mode 100644 index 0000000..dac3b72 --- /dev/null +++ b/src/components/LogDetailDrawer/LogDetailDrawer.vue @@ -0,0 +1,31 @@ + + + + + diff --git a/src/components/LogDetailDrawer/index.ts b/src/components/LogDetailDrawer/index.ts new file mode 100644 index 0000000..c2613aa --- /dev/null +++ b/src/components/LogDetailDrawer/index.ts @@ -0,0 +1,2 @@ +export { default as LogDetailDrawer } from './LogDetailDrawer.vue' +export type { LogDetailItem } from './types' diff --git a/src/components/LogDetailDrawer/types.ts b/src/components/LogDetailDrawer/types.ts new file mode 100644 index 0000000..b3056ac --- /dev/null +++ b/src/components/LogDetailDrawer/types.ts @@ -0,0 +1,5 @@ +export interface LogDetailItem { + key: string + label: string + value?: string | number | boolean | null +} diff --git a/src/components/MarkdownView/index.vue b/src/components/MarkdownView/index.vue new file mode 100644 index 0000000..93c4e01 --- /dev/null +++ b/src/components/MarkdownView/index.vue @@ -0,0 +1,204 @@ + + + + + diff --git a/src/components/OperateLogV2/index.ts b/src/components/OperateLogV2/index.ts new file mode 100644 index 0000000..f69c222 --- /dev/null +++ b/src/components/OperateLogV2/index.ts @@ -0,0 +1,3 @@ +import OperateLogV2 from './src/OperateLogV2.vue' + +export { OperateLogV2 } diff --git a/src/components/OperateLogV2/src/OperateLogV2.vue b/src/components/OperateLogV2/src/OperateLogV2.vue new file mode 100644 index 0000000..6acc1cc --- /dev/null +++ b/src/components/OperateLogV2/src/OperateLogV2.vue @@ -0,0 +1,105 @@ + + + + + + diff --git a/src/components/OrganizationNodeLabel/index.vue b/src/components/OrganizationNodeLabel/index.vue new file mode 100644 index 0000000..87a478f --- /dev/null +++ b/src/components/OrganizationNodeLabel/index.vue @@ -0,0 +1,42 @@ + + + + + diff --git a/src/components/Pagination/index.vue b/src/components/Pagination/index.vue new file mode 100644 index 0000000..6bb00b3 --- /dev/null +++ b/src/components/Pagination/index.vue @@ -0,0 +1,87 @@ + + + diff --git a/src/components/PublicView/API.md b/src/components/PublicView/API.md new file mode 100644 index 0000000..8f02928 --- /dev/null +++ b/src/components/PublicView/API.md @@ -0,0 +1,572 @@ +# PublicView 组件 API 文档 + +统一列表页组件(搜索 + 工具栏 + 表格 + 分页),通过声明式配置驱动。 + +--- + +## 目录 + +- [快速开始](#快速开始) +- [Props](#props) +- [Events](#events) +- [Slots](#slots) +- [Expose 方法](#expose-方法) +- [Column 配置详解](#column-配置详解) +- [Tab 切换](#tab-切换) +- [工具栏](#工具栏) +- [标准表单动作](#标准表单动作) +- [级联联动](#级联联动) +- [缓存机制](#缓存机制) +- [完整示例](#完整示例) + +--- + +## 快速开始 + +```vue + + + +``` + +--- + +## Props + +| Prop | 类型 | 默认值 | 说明 | +|------|------|--------|------| +| `columns` | `PublicViewColumn[]` | 必填 | 列配置(同时驱动搜索表单和表格) | +| `request` | `(params: Recordable) => Promise` | - | 数据请求函数 | +| `requestTotal` | `(params: Recordable) => Promise<{ total: number; pageNum?: number }>` | - | 独立分页统计请求;请求期间隐藏分页,完成后更新总数与当前页 | +| `beforeRequest` | `(params: Recordable) => Recordable` | - | 请求前参数处理 | +| `afterRequest` | `(res: unknown) => RequestResponse` | - | 响应后数据处理 | +| `defaultSearchParams` | `Recordable` | `{}` | 默认查询条件;初始化和重置时会合并到搜索参数中 | +| `manualSearch` | `boolean` | `false` | 手动查询模式;开启后进入页面不触发列表接口,用户点击筛选或外部调用 `reload` 后才查询 | +| `immediate` | `boolean` | `true` | 是否立即发起请求 | +| `search` | `SearchConfig` | `{}` | 搜索区域配置 | +| `tools` | `ToolItem[]` | `[]` | 工具栏按钮配置 | +| `table` | `TableConfig` | `{}` | 表格配置 | +| `pagination` | `PaginationConfig \| false` | - | 分页配置,`false` 隐藏分页 | +| `showSearch` | `boolean` | `true` | 是否显示搜索区域 | +| `dataSource` | `unknown[]` | - | 静态数据源(优先级高于 request) | +| `cacheKey` | `string` | - | 缓存 key,用于路由切换恢复 | +| `tabs` | `PublicViewTabItem[]` | `[]` | Tab 列表 | +| `activeTab` | `string` | `''` | 当前激活的 Tab | +| `title` | `string` | `''` | 列表标题;与页面标题栏相同(忽略末尾“管理”)时自动隐藏,避免重复 | + +--- + +## 默认查询与手动查询 + +### 默认查询条件 + +通过 `defaultSearchParams` 设置页面进入时的默认查询条件。它适合放置业务固定条件、来自路由的默认状态、当前用户所属组织等不一定展示在搜索表单中的参数。 + +```vue + +``` + +合并规则: + +- 先读取 `columns[].searchDefault`。 +- 再合并 `defaultSearchParams`,同名字段以 `defaultSearchParams` 为准。 +- 若启用 `cacheKey` 且存在缓存,缓存值优先于默认值。 +- 点击重置时恢复到 `columns[].searchDefault + defaultSearchParams`。 + +### 手动查询模式 + +通过 `manualSearch` 控制进入页面是否自动查询。默认关闭,即保持进入页面自动请求的常规列表体验。 + +```vue + +``` + +行为规则: + +- `manualSearch = false`:进入页面按 `immediate` 配置执行,默认自动查询。 +- `manualSearch = true`:进入页面不调用 `request` / `requestTotal`,表格保持空数据;用户点击筛选、分页触发查询,或外部调用 `reload()` 后才请求。 +- `manualSearch` 优先级高于 `immediate`。开启后即使 `immediate = true` 也不自动请求。 +- 静态 `dataSource` 不受 `manualSearch` 影响,仍可直接展示。 + +--- + +## Events + +| 事件 | 参数 | 说明 | +|------|------|------| +| `tab-change` | `(tab: string)` | Tab 切换 | +| `selection-change` | `(rows: TableRow[])` | 表格多选变化 | +| `row-click` | `(row, column, event)` | 行点击 | +| `row-dblclick` | `(row, column, event)` | 行双击 | +| `cell-click` | `(row, column, cell, event)` | 单元格点击 | +| `sort-change` | `(sort)` | 排序变化 | +| `page-change` | `(page, pageSize)` | 分页变化 | +| `loaded` | `(data: RequestResponse)` | 数据加载完成 | +| `error` | `(error: Error)` | 加载失败 | +| `search:reset` | - | 重置按钮点击 | +| `search-collapse` | `(collapsed: boolean)` | 搜索区域折叠变化 | +| `update:searchCollapsed` | `(collapsed: boolean)` | 折叠状态双向绑定 | +| `update:selection` | `(rows: TableRow[])` | 选中行双向绑定 | + +--- + +## Slots + +| 插槽名 | 说明 | 作用域 | +|--------|------|--------| +| `header-extra` | 头部最右侧自定义内容 | `{ total, loading }` | +| `search-${field}` | 自定义搜索字段渲染 | `{ params, column, value, setFieldValue }` | +| `search-action` | 搜索按钮区域扩展 | - | +| `tools-prefix` | 工具栏按钮前置 | - | +| `tools` | 工具栏按钮自定义 | - | +| `table-left` | 表格左侧区域 | - | +| `table-modal` | 表格上方遮罩区域 | - | +| `${field}` | 自定义表格列内容 | `{ row, column, $index }` | +| `${field}-header` | 自定义表格列头 | - | +| `table-header` | 表格上方插槽 | - | +| `table-footer` | 表格下方插槽 | - | +| `empty` | 空数据自定义 | - | + +--- + +## Expose 方法 + +通过 `ref` 获取组件实例后调用: + +```ts +const publicViewRef = ref>() +``` + +| 方法 | 参数 | 说明 | +|------|------|------| +| `reload(keepPage?)` | `keepPage: boolean = true` | 重新加载数据 | +| `reloadAndReset()` | - | 重置搜索 + 清空选中 + 重新加载 | +| `resetSearch()` | - | 重置搜索条件 | +| `setSearchParams(params)` | `Recordable` | 设置搜索参数 | +| `getSearchParams()` | - | 获取当前搜索参数 | +| `getSelectionRows()` | - | 获取选中行 | +| `clearSelection()` | - | 清空选中 | +| `setSelectedRows(rows)` | `TableRow[]` | 设置选中行 | +| `getElTableRef()` | - | 获取 el-table 实例 | +| `getTableData()` | - | 获取表格数据 | +| `getPagination()` | - | 获取分页信息 | +| `setLoading(flag)` | `boolean` | 设置加载状态 | +| `clearCache()` | - | 清除缓存 | + +--- + +## Column 配置详解 + +### PublicViewColumn + +| 字段 | 类型 | 说明 | +|------|------|------| +| `field` | `string` | 字段名(必填) | +| `label` | `string` | 显示标签 | +| `width` | `number \| string` | 列宽度 | +| `minWidth` | `number \| string` | 最小列宽 | +| `fixed` | `'left' \| 'right'` | 固定列 | +| `resizable` | `boolean` | 可调整列宽 | +| `align` | `'left' \| 'center' \| 'right'` | 对齐方式 | +| `sortable` | `boolean \| 'custom'` | 可排序 | +| `showOverflowTooltip` | `boolean` | 是否显示单元格溢出提示;未配置时使用表格全局配置 | +| `hiddenTable` | `boolean` | 表格中隐藏 | +| `hiddenSearch` | `boolean` | 搜索中隐藏 | +| `searchLabel` | `string` | 搜索表单中的标签(覆盖 label) | +| `searchDefault` | `unknown` | 搜索默认值 | +| `required` | `boolean` | 搜索表单必填 | +| `valueType` | `ValueType` | 表单值类型 | +| `dictType` | `string` | 字典类型(自动渲染字典标签) | +| `valueEnum` | `Record` | 枚举值映射 | +| `formProps` | `FormProps` | 表单组件扩展属性 | +| `cellRenderer` | `(scope) => VNode \| string` | 自定义单元格渲染(TSX) | +| `formatter` | `(row, column, cellValue, index) => string` | 格式化函数 | +| `cascade` | `CascadeConfig` | 级联联动配置 | +| `children` | `PublicViewColumn[]` | 多级表头子列 | + +### ValueType 枚举 + +| 值 | 对应组件 | 说明 | +|----|---------|------| +| `'input'` | ElInput | 输入框 | +| `'input-number'` | ElInputNumber | 数字输入框 | +| `'textarea'` | ElInput(type=textarea) | 多行文本 | +| `'input-range'` | 双输入框 | 范围输入 | +| `'select'` | ElSelect | 下拉选择 | +| `'select-tree'` | ElTreeSelect | 树形选择 | +| `'radio'` | ElRadioGroup | 单选组 | +| `'date'` | ElDatePicker(type=date) | 日期选择 | +| `'date-range'` | ElDatePicker(type=daterange) | 日期范围 | +| `'date-time'` | ElDatePicker(type=datetime) | 日期时间 | +| `'date-time-range'` | ElDatePicker(type=datetimerange) | 日期时间范围 | +| `'tag'` | ElTag | 标签(布尔值显示是/否) | +| `'small-tag'` | ElTag(size=small) | 小标签 | +| `'slot'` | 自定义插槽 | 通过 `search-${field}` 插槽自定义 | + +### FormProps + +| 字段 | 类型 | 说明 | +|------|------|------| +| `options` | `SelectOption[]` | 下拉选项 | +| `placeholder` | `string` | 占位文本 | +| `disabled` | `boolean` | 禁用 | +| `clearable` | `boolean` | 可清空(默认 true) | +| `maxlength` | `number` | 最大长度 | +| `rows` | `number` | textarea 行数 | +| `remote` | `boolean` | 远程搜索 | +| `remoteMethod` | `(query) => Promise` | 远程搜索方法 | + +--- + +## Tab 切换 + +通过 `tabs` 和 `activeTab` props 配置 Tab,`tab-change` 事件监听切换: + +```vue + + + +``` + +**注意**:Tab 由 SearchArea 内部渲染,不存在 `#tabs` slot。 + +--- + +## 工具栏 + +### ToolItem + +| 字段 | 类型 | 说明 | +|------|------|------| +| `label` | `string` | 按钮文字(必填) | +| `icon` | `string` | 图标(Icon 组件格式,如 `ep:plus`) | +| `type` | `'primary' \| 'success' \| 'warning' \| 'danger' \| 'info'` | 按钮类型 | +| `plain` | `boolean` | 朴素按钮 | +| `auth` | `string \| string[]` | 权限标识 | +| `disabled` | `boolean` | 禁用 | +| `loading` | `boolean` | 加载中 | +| `show` | `boolean \| ((selection) => boolean)` | 是否显示(支持函数,接收选中行) | +| `onClick` | `(selection: TableRow[]) => void` | 点击回调(接收当前选中行) | + +--- + +## 标准表单动作 + +标准新增、编辑按钮可通过 `createPublicViewFormActions` 生成。它只负责生成工具栏按钮和表格操作列,业务表单仍由页面自行实现。 + +```ts +import PublicView, { createPublicViewFormActions } from '@/components/PublicView' + +const formRef = ref>() + +const openForm = (type: 'create' | 'update', row?: DemoVO) => { + formRef.value?.open(type, row) +} + +const { tools, operationColumn } = createPublicViewFormActions({ + create: { + label: '新增' + }, + update: { + label: '编辑' + }, + open: openForm, + rowActions: [ + { + label: '删除', + type: 'danger', + onClick: (row) => handleDelete(row) + } + ] +}) + +const columns: PublicViewColumn[] = [ + // 业务列... + ...(operationColumn ? [operationColumn] : []) +] +``` + +### CreatePublicViewFormActionsOptions + +| 字段 | 类型 | 说明 | +|------|------|------| +| `open` | `(type: 'create' \| 'update', row?) => void` | 打开业务表单弹窗 | +| `create` | `false \| Omit` | 新增工具栏按钮配置;传 `false` 不生成 | +| `update` | `false \| Omit` | 编辑行按钮配置;传 `false` 不生成 | +| `rowActions` | `PublicViewRowAction[]` | 追加行操作,例如删除、详情 | +| `operationColumn` | `Partial` | 覆盖默认操作列配置 | + +### PublicViewRowAction + +| 字段 | 类型 | 说明 | +|------|------|------| +| `label` | `string` | 按钮文字 | +| `type` | `'primary' \| 'success' \| 'warning' \| 'danger' \| 'info'` | 按钮类型 | +| `auth` | `string \| string[]` | 权限标识 | +| `show` | `boolean \| ((row) => boolean)` | 是否显示 | +| `onClick` | `(row) => void` | 点击回调 | + +--- + +## 级联联动 + +### CascadeConfig + +| 字段 | 类型 | 说明 | +|------|------|------| +| `dependsOn` | `string \| string[]` | 依赖的字段名 | +| `disabledWhen` | `(parentValues: Recordable) => boolean` | 禁用条件 | +| `optionsWhen` | `(parentValues: Recordable) => SelectOption[] \| Promise` | 动态选项 | + +### 禁用联动 + +```ts +const columns = [ + { field: 'province', label: '省份', valueType: 'select', valueEnum: { 'zj': { label: '浙江' } } }, + { + field: 'city', + label: '城市', + valueType: 'select', + cascade: { + dependsOn: 'province', + disabledWhen: (parentValues) => !parentValues.province + } + } +] +``` + +### 异步选项联动 + +```ts +const columns = [ + { + field: 'city', + label: '城市', + valueType: 'select', + cascade: { + dependsOn: 'province', + disabledWhen: (parentValues) => !parentValues.province, + optionsWhen: async (parentValues) => { + const res = await getCityList({ province: parentValues.province }) + return res.map(item => ({ label: item.name, value: item.code })) + } + } + } +] +``` + +**特性**: +- 父字段值变化时,子字段值自动清空 +- 异步加载时显示 loading +- 依赖字段未全部有值时,子字段选项为空 + +--- + +## 缓存机制 + +通过 `cacheKey` 启用路由切换状态恢复: + +```vue + +``` + +**缓存内容**:搜索参数、当前页码、每页条数 + +**清除时机**:离开路由时自动清除(子路由除外) + +**手动清除**:`publicViewRef.value?.clearCache()` + +--- + +## 完整示例 + +### 带 Tab 切换 + 自定义渲染 + 工具栏 + +```vue + + + +``` + +--- + +## 配置常量 + +### DEFAULT_PUBLIC_VIEW_CONFIG + +| 字段 | 默认值 | 说明 | +|------|--------|------| +| `defaultSearchParams` | `{}` | 默认查询条件,初始化和重置时合并到搜索参数中 | +| `manualSearch` | `false` | 是否启用首次进入不自动查询 | +| `immediate` | `true` | 是否进入页面立即请求;`manualSearch = true` 时该配置不生效 | + +### DEFAULT_SEARCH_CONFIG + +| 字段 | 默认值 | 说明 | +|------|--------|------| +| `collapsed` | `false` | 当前是否折叠 | +| `defaultCollapsed` | `true` | 默认是否折叠 | +| `collapsedRows` | `1` | 折叠后显示行数 | +| `labelWidth` | `'auto'` | 标签宽度 | +| `showSearch` | `true` | 显示搜索按钮 | +| `showReset` | `true` | 显示重置按钮 | +| `showCollapse` | `true` | 显示折叠按钮 | +| `debounceWait` | `300` | 防抖等待(ms) | + +### DEFAULT_TABLE_CONFIG + +| 字段 | 默认值 | 说明 | +|------|--------|------| +| `selection` | `true` | 多选框 | +| `showIndex` | `false` | 序号列 | +| `reserveSelection` | `true` | 跨页保留选中 | +| `rowKey` | `'id'` | 行唯一键 | +| `border` | `true` | 边框 | +| `size` | `'default'` | 尺寸 | +| `scrollbarAlwaysOn` | `false` | 表格内容可滚动时始终显示滚动条 | + +### DEFAULT_PAGINATION_CONFIG + +| 字段 | 默认值 | 说明 | +|------|--------|------| +| `pageSize` | `10` | 默认每页条数 | +| `pageSizes` | `[10, 20, 30, 50, 100]` | 可选条数 | +| `align` | `'right'` | 对齐方式 | diff --git a/src/components/PublicView/DESIGN.md b/src/components/PublicView/DESIGN.md new file mode 100644 index 0000000..bf680c1 --- /dev/null +++ b/src/components/PublicView/DESIGN.md @@ -0,0 +1,648 @@ +# PublicView 组件设计细分文档 + +## 1. 目标与边界 + +`PublicView` 用于统一后台列表页的通用展示结构,覆盖图片中的卡片面板、标题统计、查询区、工具栏、表格、分页、加载态、空态和错误态。组件通过声明式配置驱动业务页面,业务页面只负责提供列配置、请求函数、按钮行为和少量自定义插槽。 + +本阶段先完成组件设计,不进入编码实现。后续实现必须保持 `PublicView/src/xxx` 统一目录结构,禁止把搜索、表格、分页、数据请求、缓存和样式全部堆在一个 `.vue` 文件内。 + +## 2. 设计原则 + +- 以 `src/components/PublicView/API.md` 为 API 基础,保持已有 `columns`、`request`、`tools`、`table`、`pagination`、`tabs`、`cacheKey` 等能力。 +- 支持顶层 `defaultSearchParams` 作为默认查询条件,适配隐藏默认条件、路由带入条件、当前用户组织条件等场景。 +- 支持顶层 `manualSearch` 手动查询模式,默认关闭;开启后进入页面不触发列表接口,必须由用户点击筛选或外部调用 `reload()` 后才请求。 +- 组件内部能使用 Element Plus 的地方优先使用 Element Plus,例如 `ElForm`、`ElInput`、`ElSelect`、`ElButton`、`ElTable`、`ElPagination`、`ElTag`、`ElEmpty`、`ElSkeleton`。 +- 按钮主题色不得写死。新增、筛选等主按钮使用 `type="primary"` 或项目主题变量;危险行为用 `type="danger"`;普通按钮使用默认或 `plain`。 +- 样式只负责容器布局和图片还原,不重写 Element Plus 基础交互。需要微调 Element Plus 内部间距时,限定在 PublicView 命名空间内使用 `:deep()`。 +- `PublicView.vue` 只做组合和数据流编排,不承载大段 UI 细节。 +- Props 向下传递,Events 向上传递。搜索参数、分页状态、选中行、折叠状态都通过明确事件或暴露方法管理。 +- `.vue` 文件使用 ` + + + + diff --git a/src/components/PublicView/src/components/PublicViewHeader.vue b/src/components/PublicView/src/components/PublicViewHeader.vue new file mode 100644 index 0000000..b7d38da --- /dev/null +++ b/src/components/PublicView/src/components/PublicViewHeader.vue @@ -0,0 +1,85 @@ + + + + + diff --git a/src/components/PublicView/src/components/PublicViewPagination.vue b/src/components/PublicView/src/components/PublicViewPagination.vue new file mode 100644 index 0000000..64bf32d --- /dev/null +++ b/src/components/PublicView/src/components/PublicViewPagination.vue @@ -0,0 +1,224 @@ + + + + + diff --git a/src/components/PublicView/src/components/PublicViewRender.ts b/src/components/PublicView/src/components/PublicViewRender.ts new file mode 100644 index 0000000..8aca9b4 --- /dev/null +++ b/src/components/PublicView/src/components/PublicViewRender.ts @@ -0,0 +1,15 @@ +import { defineComponent } from 'vue' +import type { PropType, VNode } from 'vue' + +export default defineComponent({ + name: 'PublicViewRender', + props: { + render: { + type: Function as PropType<() => VNode | string | number>, + required: true + } + }, + setup(props) { + return () => props.render() + } +}) diff --git a/src/components/PublicView/src/components/PublicViewSearch.vue b/src/components/PublicView/src/components/PublicViewSearch.vue new file mode 100644 index 0000000..ff98f83 --- /dev/null +++ b/src/components/PublicView/src/components/PublicViewSearch.vue @@ -0,0 +1,257 @@ + + + + + diff --git a/src/components/PublicView/src/components/PublicViewSearchField.vue b/src/components/PublicView/src/components/PublicViewSearchField.vue new file mode 100644 index 0000000..1931592 --- /dev/null +++ b/src/components/PublicView/src/components/PublicViewSearchField.vue @@ -0,0 +1,202 @@ + + + + + diff --git a/src/components/PublicView/src/components/PublicViewState.vue b/src/components/PublicView/src/components/PublicViewState.vue new file mode 100644 index 0000000..a6d5e6e --- /dev/null +++ b/src/components/PublicView/src/components/PublicViewState.vue @@ -0,0 +1,27 @@ + + + + + diff --git a/src/components/PublicView/src/components/PublicViewTable.vue b/src/components/PublicView/src/components/PublicViewTable.vue new file mode 100644 index 0000000..5df47c8 --- /dev/null +++ b/src/components/PublicView/src/components/PublicViewTable.vue @@ -0,0 +1,345 @@ + + + + + diff --git a/src/components/PublicView/src/components/PublicViewTableColumn.vue b/src/components/PublicView/src/components/PublicViewTableColumn.vue new file mode 100644 index 0000000..c5ca9e2 --- /dev/null +++ b/src/components/PublicView/src/components/PublicViewTableColumn.vue @@ -0,0 +1,81 @@ + + + diff --git a/src/components/PublicView/src/components/PublicViewTabs.vue b/src/components/PublicView/src/components/PublicViewTabs.vue new file mode 100644 index 0000000..8e118a4 --- /dev/null +++ b/src/components/PublicView/src/components/PublicViewTabs.vue @@ -0,0 +1,61 @@ + + + + + diff --git a/src/components/PublicView/src/components/PublicViewToolbar.vue b/src/components/PublicView/src/components/PublicViewToolbar.vue new file mode 100644 index 0000000..1ab7152 --- /dev/null +++ b/src/components/PublicView/src/components/PublicViewToolbar.vue @@ -0,0 +1,130 @@ + + + + + diff --git a/src/components/PublicView/src/composables/usePublicViewCache.ts b/src/components/PublicView/src/composables/usePublicViewCache.ts new file mode 100644 index 0000000..0360c20 --- /dev/null +++ b/src/components/PublicView/src/composables/usePublicViewCache.ts @@ -0,0 +1,59 @@ +import { onBeforeUnmount, watch } from 'vue' +import type { Ref } from 'vue' +import type { PublicViewRecord } from '../types' +import { scopedStorageKey } from '@/hooks/web/useCache' + +interface CacheValue { + searchParams: PublicViewRecord + page: number + pageSize: number +} + +const getStorageKey = (cacheKey: string) => scopedStorageKey(`public-view:${cacheKey}`) + +export const readPublicViewCache = (cacheKey?: string): CacheValue | undefined => { + if (!cacheKey) return undefined + const raw = sessionStorage.getItem(getStorageKey(cacheKey)) + if (!raw) return undefined + + try { + return JSON.parse(raw) as CacheValue + } catch { + return undefined + } +} + +export const usePublicViewCache = (options: { + cacheKey?: string + searchParams: Ref + page: Ref + pageSize: Ref +}) => { + const getCache = (): CacheValue | undefined => { + return readPublicViewCache(options.cacheKey) + } + + const writeCache = () => { + if (!options.cacheKey) return + const value: CacheValue = { + searchParams: options.searchParams.value, + page: options.page.value, + pageSize: options.pageSize.value + } + sessionStorage.setItem(getStorageKey(options.cacheKey), JSON.stringify(value)) + } + + const clearCache = () => { + if (!options.cacheKey) return + sessionStorage.removeItem(getStorageKey(options.cacheKey)) + } + + watch([options.searchParams, options.page, options.pageSize], writeCache, { deep: true }) + + onBeforeUnmount(writeCache) + + return { + getCache, + clearCache + } +} diff --git a/src/components/PublicView/src/composables/usePublicViewCascade.ts b/src/components/PublicView/src/composables/usePublicViewCascade.ts new file mode 100644 index 0000000..4c72968 --- /dev/null +++ b/src/components/PublicView/src/composables/usePublicViewCascade.ts @@ -0,0 +1,78 @@ +import { ref, watch } from 'vue' +import type { Ref } from 'vue' +import { getColumnOptions } from '../helper' +import type { PublicViewColumn, PublicViewRecord, PublicViewSelectOption } from '../types' + +const getDependsOn = (column: PublicViewColumn) => { + const dependsOn = column.cascade?.dependsOn + if (!dependsOn) return [] + return Array.isArray(dependsOn) ? dependsOn : [dependsOn] +} + +export const usePublicViewCascade = (options: { + columns: Ref + searchParams: Ref + setFieldValue: (field: string, value: unknown) => void +}) => { + const fieldOptions = ref>({}) + const fieldLoading = ref>({}) + const fieldDisabled = ref>({}) + + const updateColumn = async (column: PublicViewColumn, clearValue = false) => { + if (!column.cascade) { + fieldOptions.value[column.field] = getColumnOptions(column) + fieldDisabled.value[column.field] = Boolean(column.formProps?.disabled) + return + } + + const parentValues = getDependsOn(column).reduce((values, field) => { + values[field] = options.searchParams.value[field] + return values + }, {}) + + if (clearValue) { + options.setFieldValue(column.field, undefined) + } + + const disabled = column.cascade.disabledWhen?.(parentValues) ?? false + fieldDisabled.value[column.field] = disabled || Boolean(column.formProps?.disabled) + + if (!column.cascade.optionsWhen || disabled) { + fieldOptions.value[column.field] = disabled ? [] : getColumnOptions(column) + return + } + + fieldLoading.value[column.field] = true + try { + fieldOptions.value[column.field] = await column.cascade.optionsWhen(parentValues) + } finally { + fieldLoading.value[column.field] = false + } + } + + const refreshAll = () => { + options.columns.value.forEach((column) => { + void updateColumn(column) + }) + } + + watch(options.columns, refreshAll, { immediate: true, deep: true }) + + options.columns.value.forEach((column) => { + const dependsOn = getDependsOn(column) + if (!dependsOn.length) return + + watch( + () => dependsOn.map((field) => options.searchParams.value[field]), + () => { + void updateColumn(column, true) + } + ) + }) + + return { + fieldOptions, + fieldLoading, + fieldDisabled + } +} diff --git a/src/components/PublicView/src/composables/usePublicViewData.ts b/src/components/PublicView/src/composables/usePublicViewData.ts new file mode 100644 index 0000000..14fdac0 --- /dev/null +++ b/src/components/PublicView/src/composables/usePublicViewData.ts @@ -0,0 +1,106 @@ +import { ref, shallowRef } from 'vue' +import type { Ref } from 'vue' +import type { PublicViewRecord, RequestResponse, RequestTotalResponse } from '../types' + +export const usePublicViewData = (options: { + request?: (params: PublicViewRecord) => Promise> + requestTotal?: (params: PublicViewRecord) => Promise + beforeRequest?: (params: PublicViewRecord) => PublicViewRecord + afterRequest?: (res: unknown) => RequestResponse + dataSource?: Row[] + manualSearch: boolean + immediate: boolean + searchParams: Ref + page: Ref + pageSize: Ref + onLoaded?: (data: RequestResponse) => void + onError?: (error: Error) => void + onPageCorrect?: (page: number) => void +}) => { + const loading = shallowRef(false) + const totalLoading = shallowRef(false) + const error = ref() + const tableData = ref(options.dataSource ?? []) + const total = shallowRef(options.dataSource?.length ?? 0) + const hasRequested = shallowRef(Boolean(options.dataSource?.length)) + let requestId = 0 + + const setLoading = (flag: boolean) => { + loading.value = flag + } + + const buildParams = () => { + const params = { + ...options.searchParams.value, + pageNo: options.page.value, + pageNum: options.page.value, + pageSize: options.pageSize.value + } + return options.beforeRequest ? options.beforeRequest(params) : params + } + + const reload = async () => { + if (options.dataSource) { + tableData.value = options.dataSource + total.value = options.dataSource.length + hasRequested.value = true + return + } + + if (!options.request) return + + const currentId = ++requestId + loading.value = true + error.value = undefined + + try { + const params = buildParams() + const response = await options.request(params) + if (currentId !== requestId) return + + const normalized = options.afterRequest ? options.afterRequest(response) : response + tableData.value = normalized.list + total.value = normalized.total + hasRequested.value = true + options.onLoaded?.(normalized) + + if (options.requestTotal) { + totalLoading.value = true + try { + const totalResponse = await options.requestTotal(params) + total.value = totalResponse.total + if (totalResponse.pageNum) { + options.onPageCorrect?.(totalResponse.pageNum) + } + } finally { + totalLoading.value = false + } + } + } catch (err) { + const normalizedError = err instanceof Error ? err : new Error(String(err)) + error.value = normalizedError + options.onError?.(normalizedError) + } finally { + if (currentId === requestId) { + loading.value = false + } + } + } + + if (options.dataSource) { + hasRequested.value = true + } else if (options.immediate && !options.manualSearch) { + void reload() + } + + return { + loading, + totalLoading, + error, + tableData, + total, + hasRequested, + reload, + setLoading + } +} diff --git a/src/components/PublicView/src/composables/usePublicViewPagination.ts b/src/components/PublicView/src/composables/usePublicViewPagination.ts new file mode 100644 index 0000000..1e44796 --- /dev/null +++ b/src/components/PublicView/src/composables/usePublicViewPagination.ts @@ -0,0 +1,38 @@ +import { computed, shallowRef } from 'vue' +import type { PaginationConfig } from '../types' + +export const usePublicViewPagination = ( + pagination: () => PaginationConfig | boolean | undefined, + initial?: { page?: number; pageSize?: number } +) => { + const initialPagination = pagination() + const page = shallowRef(initial?.page ?? 1) + const pageSize = shallowRef( + initial?.pageSize ?? + (typeof initialPagination === 'object' ? (initialPagination.pageSize ?? 10) : 10) + ) + + const paginationEnabled = computed(() => pagination() !== false) + + const setPage = (value: number) => { + page.value = value + } + + const setPageSize = (value: number) => { + pageSize.value = value + page.value = 1 + } + + const resetPage = () => { + page.value = 1 + } + + return { + page, + pageSize, + paginationEnabled, + setPage, + setPageSize, + resetPage + } +} diff --git a/src/components/PublicView/src/composables/usePublicViewSearch.ts b/src/components/PublicView/src/composables/usePublicViewSearch.ts new file mode 100644 index 0000000..a91cea2 --- /dev/null +++ b/src/components/PublicView/src/composables/usePublicViewSearch.ts @@ -0,0 +1,47 @@ +import { computed, ref, watch } from 'vue' +import { createSearchDefaults, filterSearchColumns } from '../helper' +import type { PublicViewColumn, PublicViewRecord } from '../types' + +export const usePublicViewSearch = (options: { + columns: () => PublicViewColumn[] + defaultSearchParams: () => PublicViewRecord + cachedParams: () => PublicViewRecord | undefined +}) => { + const buildDefaults = () => + createSearchDefaults(options.columns(), options.defaultSearchParams()) + + const searchParams = ref({ + ...buildDefaults(), + ...(options.cachedParams() ?? {}) + }) + + const searchColumns = computed(() => filterSearchColumns(options.columns())) + + const setSearchParams = (params: PublicViewRecord) => { + searchParams.value = { ...searchParams.value, ...params } + } + + const setFieldValue = (field: string, value: unknown) => { + searchParams.value = { ...searchParams.value, [field]: value } + } + + const resetSearch = () => { + searchParams.value = buildDefaults() + } + + watch( + () => [options.columns(), options.defaultSearchParams()], + () => { + searchParams.value = { ...buildDefaults(), ...searchParams.value } + }, + { deep: true } + ) + + return { + searchParams, + searchColumns, + setFieldValue, + setSearchParams, + resetSearch + } +} diff --git a/src/components/PublicView/src/composables/usePublicViewSelection.ts b/src/components/PublicView/src/composables/usePublicViewSelection.ts new file mode 100644 index 0000000..6e1f127 --- /dev/null +++ b/src/components/PublicView/src/composables/usePublicViewSelection.ts @@ -0,0 +1,24 @@ +import { ref } from 'vue' + +export const usePublicViewSelection = () => { + const selectionRows = ref([]) + + const onSelectionChange = (rows: Row[]) => { + selectionRows.value = rows + } + + const clearSelection = () => { + selectionRows.value = [] + } + + const setSelectedRows = (rows: Row[]) => { + selectionRows.value = rows + } + + return { + selectionRows, + onSelectionChange, + clearSelection, + setSelectedRows + } +} diff --git a/src/components/PublicView/src/constants.ts b/src/components/PublicView/src/constants.ts new file mode 100644 index 0000000..b4acf0b --- /dev/null +++ b/src/components/PublicView/src/constants.ts @@ -0,0 +1,50 @@ +import type { PaginationConfig, PublicViewPanelConfig, SearchConfig, TableConfig } from './types' + +export const DEFAULT_PUBLIC_VIEW_CONFIG = { + defaultSearchParams: {}, + manualSearch: false, + immediate: true +} + +export const DEFAULT_PANEL_CONFIG: Required = { + shadow: 'never', + borderRadius: 0, + minHeight: 'auto', + fullHeight: false, + bodyPadding: 0 +} + +export const DEFAULT_SEARCH_CONFIG: Required = { + collapsed: false, + defaultCollapsed: true, + collapsedRows: 1, + labelWidth: 'auto', + showSearch: true, + showReset: true, + showCollapse: true, + columns: 4 +} + +export const DEFAULT_TABLE_CONFIG: Required = { + selection: false, + showIndex: false, + reserveSelection: true, + rowKey: 'id', + border: false, + stripe: false, + size: 'default', + height: '', + maxHeight: '', + scrollbarAlwaysOn: false, + align: 'left', + headerAlign: 'left', + showOverflowTooltip: true +} + +export const DEFAULT_PAGINATION_CONFIG: Required = { + pageSize: 10, + pageSizes: [10, 20, 30, 50, 100], + align: 'right', + background: false, + hideOnSinglePage: false +} diff --git a/src/components/PublicView/src/formActions.tsx b/src/components/PublicView/src/formActions.tsx new file mode 100644 index 0000000..ea32db8 --- /dev/null +++ b/src/components/PublicView/src/formActions.tsx @@ -0,0 +1,106 @@ +import { ElButton } from 'element-plus' +import { checkPermi } from '@/utils/permission' +import { normalizeAuth } from './helper' +import type { PublicViewColumn, PublicViewRecord, ToolItem } from './types' + +export const PUBLIC_VIEW_FORM_ACTION = { + CREATE: 'create', + UPDATE: 'update' +} as const + +export type PublicViewFormAction = + (typeof PUBLIC_VIEW_FORM_ACTION)[keyof typeof PUBLIC_VIEW_FORM_ACTION] + +export interface PublicViewRowAction { + label: string + type?: 'primary' | 'success' | 'warning' | 'danger' | 'info' + className?: string + auth?: string | string[] + show?: boolean | ((row: Row) => boolean) + onClick: (row: Row) => void +} + +export interface CreatePublicViewFormActionsOptions { + open: (type: PublicViewFormAction, row?: Row) => void + create?: false | Omit, 'onClick'> + update?: false | Omit, 'onClick'> + rowActions?: PublicViewRowAction[] + operationColumn?: Partial> +} + +export interface PublicViewFormActions { + tools: ToolItem[] + operationColumn?: PublicViewColumn +} + +const canShowRowAction = (action: PublicViewRowAction, row: Row) => { + const hasAuth = normalizeAuth(action.auth) + if (hasAuth.length && !checkPermi(hasAuth)) return false + if (typeof action.show === 'function') return action.show(row) + return action.show !== false +} + +export const createPublicViewFormActions = ( + options: CreatePublicViewFormActionsOptions +): PublicViewFormActions => { + const tools: ToolItem[] = [] + const rowActions: PublicViewRowAction[] = [] + + if (options.create !== false) { + tools.push({ + type: 'primary', + label: '新增', + icon: 'ep:plus', + ...options.create, + onClick: () => options.open(PUBLIC_VIEW_FORM_ACTION.CREATE) + }) + } + + if (options.update !== false) { + rowActions.push({ + type: 'primary', + label: '编辑', + ...options.update, + onClick: (row) => options.open(PUBLIC_VIEW_FORM_ACTION.UPDATE, row) + }) + } + + rowActions.push(...(options.rowActions ?? [])) + + const operationColumn = rowActions.length + ? ({ + field: 'operation', + label: '操作', + width: 120, + fixed: 'right', + hiddenSearch: true, + showOverflowTooltip: false, + ...options.operationColumn, + cellRenderer: ({ row }) => { + const actions = rowActions.filter((action) => canShowRowAction(action, row)) + if (!actions.length) return '' + + return ( + <> + {actions.map((action) => ( + action.onClick(row)} + > + {action.label} + + ))} + + ) + } + } as PublicViewColumn) + : undefined + + return { + tools, + operationColumn + } +} diff --git a/src/components/PublicView/src/helper.ts b/src/components/PublicView/src/helper.ts new file mode 100644 index 0000000..c1aa303 --- /dev/null +++ b/src/components/PublicView/src/helper.ts @@ -0,0 +1,90 @@ +import { h, isVNode } from 'vue' +import type { Slot } from 'vue' +import type { + PublicViewColumn, + PublicViewRecord, + PublicViewSelectOption, + SimpleSelection +} from './types' + +export const normalizeAuth = (auth?: string | string[]) => { + if (!auth) return [] + return Array.isArray(auth) ? auth : [auth] +} + +export const enumToOptions = (valueEnum?: Record) => { + if (!valueEnum) return [] + return Object.entries(valueEnum).map(([value, item]) => ({ + ...item, + value: item.value ?? value + })) +} + +export const getColumnOptions = (column: PublicViewColumn): PublicViewSelectOption[] => { + return column.formProps?.options ?? enumToOptions(column.valueEnum) +} + +export const createSearchDefaults = ( + columns: PublicViewColumn[], + defaultSearchParams: PublicViewRecord = {} +) => { + const params: PublicViewRecord = {} + + const collect = (items: PublicViewColumn[]) => { + items.forEach((column) => { + if (column.children?.length) { + collect(column.children) + } + if (!column.hiddenSearch && column.searchDefault !== undefined) { + params[column.field] = column.searchDefault + } + }) + } + + collect(columns) + return { ...params, ...defaultSearchParams } +} + +export const filterSearchColumns = (columns: PublicViewColumn[]) => { + const result: PublicViewColumn[] = [] + + const collect = (items: PublicViewColumn[]) => { + items.forEach((column) => { + if (column.children?.length) { + collect(column.children) + return + } + if (!column.hiddenSearch) { + result.push(column) + } + }) + } + + collect(columns) + return result +} + +export const filterTableColumns = (columns: PublicViewColumn[]) => { + return columns + .filter((column) => !column.hiddenTable) + .map((column) => ({ + ...column, + children: column.children ? filterTableColumns(column.children) : undefined + })) +} + +export const renderSlotOrContent = (slot: Slot | undefined, props: PublicViewRecord, fallback = '') => { + const content = slot?.(props) + if (content?.length) return content + if (isVNode(fallback)) return fallback + return h('span', fallback) +} + + +/** 忽略末尾“管理”后比较,如“在线用户管理”与菜单名“在线用户”视为同一页面标题。 */ +export const isSamePageTitle = (title: string, pageTitle: string) => { + const normalize = (value: string) => value.trim().replace(/管理$/, '') + const a = normalize(title) + const b = normalize(pageTitle) + return !!a && !!b && (a === b || a.startsWith(b) || b.startsWith(a)) +} diff --git a/src/components/PublicView/src/types.ts b/src/components/PublicView/src/types.ts new file mode 100644 index 0000000..a86adb0 --- /dev/null +++ b/src/components/PublicView/src/types.ts @@ -0,0 +1,181 @@ +import type { Component, VNode } from 'vue' +import type { TableColumnCtx } from 'element-plus' + +export type PublicViewRecord = Record +export type PublicViewKey = string | number + +export interface RequestResponse { + list: Row[] + total: number + pageNum?: number +} + +export interface RequestTotalResponse { + total: number + pageNum?: number +} + +export interface SimpleSelection { + label: string + value?: PublicViewKey | boolean + type?: 'primary' | 'success' | 'warning' | 'danger' | 'info' + disabled?: boolean +} + +export interface PublicViewSelectOption extends SimpleSelection { + children?: PublicViewSelectOption[] +} + +export type ValueType = + | 'input' + | 'input-number' + | 'textarea' + | 'input-range' + | 'select' + | 'select-tree' + | 'radio' + | 'date' + | 'date-range' + | 'date-time' + | 'date-time-range' + | 'tag' + | 'small-tag' + | 'slot' + +export interface PublicViewFormProps { + options?: PublicViewSelectOption[] + placeholder?: string + disabled?: boolean + clearable?: boolean + maxlength?: number + rows?: number + multiple?: boolean + filterable?: boolean + remote?: boolean + remoteMethod?: (query: string) => Promise + props?: PublicViewRecord + [key: string]: unknown +} + +export interface CascadeConfig { + dependsOn: string | string[] + disabledWhen?: (parentValues: PublicViewRecord) => boolean + optionsWhen?: ( + parentValues: PublicViewRecord + ) => PublicViewSelectOption[] | Promise +} + +export interface PublicViewCellScope { + row: Row + column: PublicViewColumn + $index: number +} + +export interface PublicViewColumn { + field: string + label: string + width?: number | string + minWidth?: number | string + fixed?: 'left' | 'right' + resizable?: boolean + align?: 'left' | 'center' | 'right' + headerAlign?: 'left' | 'center' | 'right' + sortable?: boolean | 'custom' + showOverflowTooltip?: boolean + hiddenTable?: boolean + hiddenSearch?: boolean + searchLabel?: string + searchDefault?: unknown + required?: boolean + valueType?: ValueType + dictType?: string + valueEnum?: Record + formProps?: PublicViewFormProps + cellRenderer?: (scope: PublicViewCellScope) => VNode | string | number + formatter?: ( + row: Row, + column: TableColumnCtx>, + cellValue: unknown, + index: number + ) => string | number + cascade?: CascadeConfig + children?: PublicViewColumn[] +} + +export interface SearchConfig { + collapsed?: boolean + defaultCollapsed?: boolean + collapsedRows?: number + labelWidth?: string | number + showSearch?: boolean + showReset?: boolean + showCollapse?: boolean + columns?: number +} + +export interface ToolItem { + label: string + icon?: string | Component + type?: 'primary' | 'success' | 'warning' | 'danger' | 'info' + plain?: boolean + auth?: string | string[] + disabled?: boolean + loading?: boolean + show?: boolean | ((selection: Row[]) => boolean) + onClick?: (selection: Row[]) => void +} + +export interface TableConfig { + selection?: boolean + showIndex?: boolean + reserveSelection?: boolean + rowKey?: string | ((row: Row) => string) + border?: boolean + stripe?: boolean + size?: '' | 'large' | 'default' | 'small' + height?: string | number + maxHeight?: string | number + scrollbarAlwaysOn?: boolean + align?: 'left' | 'center' | 'right' + headerAlign?: 'left' | 'center' | 'right' + showOverflowTooltip?: boolean +} + +export interface PaginationConfig { + pageSize?: number + pageSizes?: number[] + align?: 'left' | 'center' | 'right' + background?: boolean + hideOnSinglePage?: boolean +} + +export interface PublicViewTabItem { + label: string + value: string + badge?: number + disabled?: boolean +} + +export interface PublicViewPanelConfig { + shadow?: 'never' | 'hover' | 'always' + borderRadius?: number | string + minHeight?: number | string + fullHeight?: boolean + bodyPadding?: number | string +} + +export interface PublicViewExpose { + reload: (keepPage?: boolean) => Promise + reloadAndReset: () => Promise + resetSearch: () => void + setSearchParams: (params: PublicViewRecord) => void + getSearchParams: () => PublicViewRecord + getSelectionRows: () => Row[] + clearSelection: () => void + setSelectedRows: (rows: Row[]) => void + getElTableRef: () => unknown + getTableData: () => Row[] + getPagination: () => { page: number; pageSize: number; total: number } + setLoading: (flag: boolean) => void + clearCache: () => void +} diff --git a/src/components/Qrcode/index.ts b/src/components/Qrcode/index.ts new file mode 100644 index 0000000..ce46161 --- /dev/null +++ b/src/components/Qrcode/index.ts @@ -0,0 +1,3 @@ +import Qrcode from './src/Qrcode.vue' + +export { Qrcode } diff --git a/src/components/Qrcode/src/Qrcode.vue b/src/components/Qrcode/src/Qrcode.vue new file mode 100644 index 0000000..f0ce7b7 --- /dev/null +++ b/src/components/Qrcode/src/Qrcode.vue @@ -0,0 +1,253 @@ + + + + + diff --git a/src/components/RouterSearch/index.vue b/src/components/RouterSearch/index.vue new file mode 100644 index 0000000..52425ec --- /dev/null +++ b/src/components/RouterSearch/index.vue @@ -0,0 +1,121 @@ + + + diff --git a/src/components/Search/index.ts b/src/components/Search/index.ts new file mode 100644 index 0000000..fcc6f16 --- /dev/null +++ b/src/components/Search/index.ts @@ -0,0 +1,3 @@ +import Search from './src/Search.vue' + +export { Search } diff --git a/src/components/Search/src/Search.vue b/src/components/Search/src/Search.vue new file mode 100644 index 0000000..bf17aca --- /dev/null +++ b/src/components/Search/src/Search.vue @@ -0,0 +1,157 @@ + + + diff --git a/src/components/SimpleProcessDesignerV2/src/NodeHandler.vue b/src/components/SimpleProcessDesignerV2/src/NodeHandler.vue new file mode 100644 index 0000000..a1f9911 --- /dev/null +++ b/src/components/SimpleProcessDesignerV2/src/NodeHandler.vue @@ -0,0 +1,309 @@ + + + + + diff --git a/src/components/SimpleProcessDesignerV2/src/ProcessNodeTree.vue b/src/components/SimpleProcessDesignerV2/src/ProcessNodeTree.vue new file mode 100644 index 0000000..dddeda6 --- /dev/null +++ b/src/components/SimpleProcessDesignerV2/src/ProcessNodeTree.vue @@ -0,0 +1,150 @@ + + + diff --git a/src/components/SimpleProcessDesignerV2/src/SimpleProcessDesigner.vue b/src/components/SimpleProcessDesignerV2/src/SimpleProcessDesigner.vue new file mode 100644 index 0000000..e55811b --- /dev/null +++ b/src/components/SimpleProcessDesignerV2/src/SimpleProcessDesigner.vue @@ -0,0 +1,244 @@ + + + diff --git a/src/components/SimpleProcessDesignerV2/src/SimpleProcessModel.vue b/src/components/SimpleProcessDesignerV2/src/SimpleProcessModel.vue new file mode 100644 index 0000000..07a8a62 --- /dev/null +++ b/src/components/SimpleProcessDesignerV2/src/SimpleProcessModel.vue @@ -0,0 +1,264 @@ + + + + + diff --git a/src/components/SimpleProcessDesignerV2/src/SimpleProcessViewer.vue b/src/components/SimpleProcessDesignerV2/src/SimpleProcessViewer.vue new file mode 100644 index 0000000..395d44b --- /dev/null +++ b/src/components/SimpleProcessDesignerV2/src/SimpleProcessViewer.vue @@ -0,0 +1,48 @@ + + + diff --git a/src/components/SimpleProcessDesignerV2/src/consts.ts b/src/components/SimpleProcessDesignerV2/src/consts.ts new file mode 100644 index 0000000..ebc27f7 --- /dev/null +++ b/src/components/SimpleProcessDesignerV2/src/consts.ts @@ -0,0 +1,1072 @@ +import { TaskStatusEnum } from '@/api/bpm/task' +import { BpmOperationButtonExtType } from '@/utils/constants' +/** 设计器内置的下拉选项(不从字典取,控制显示顺序) */ +export interface DesignerOption { + label: string + value: number | string +} + +/** + * 节点类型 + */ +export enum NodeType { + /** + * 结束节点 + */ + END_EVENT_NODE = 1, + /** + * 发起人节点 + */ + START_USER_NODE = 10, + /** + * 审批人节点 + */ + USER_TASK_NODE = 11, + + /** + * 抄送人节点 + */ + COPY_TASK_NODE = 12, + + /** + * 办理人节点 + */ + TRANSACTOR_NODE = 13, + + /** + * 延迟器节点 + */ + DELAY_TIMER_NODE = 14, + + /** + * 触发器节点 + */ + TRIGGER_NODE = 15, + + /** + * 子流程节点 + */ + CHILD_PROCESS_NODE = 20, + + /** + * 条件节点 + */ + CONDITION_NODE = 50, + /** + * 条件分支节点 (对应排他网关) + */ + CONDITION_BRANCH_NODE = 51, + /** + * 并行分支节点 (对应并行网关) + */ + PARALLEL_BRANCH_NODE = 52, + + /** + * 包容分支节点 (对应包容网关) + */ + INCLUSIVE_BRANCH_NODE = 53, + /** + * 路由分支节点 + */ + ROUTER_BRANCH_NODE = 54 +} + +export enum NodeId { + /** + * 发起人节点 Id + */ + START_USER_NODE_ID = 'StartUserNode', + + /** + * 发起人节点 Id + */ + END_EVENT_NODE_ID = 'EndEvent' +} + +/** + * 节点结构定义 + */ +export interface SimpleFlowNode { + id: string + type: NodeType + name: string + showText?: string + // 孩子节点 + childNode?: SimpleFlowNode + // 条件节点 + conditionNodes?: SimpleFlowNode[] + // 审批类型 + approveType?: ApproveType + // 候选人策略 + candidateStrategy?: number + // 候选人参数 + candidateParam?: string + // 多人审批方式 + approveMethod?: ApproveMethodType + //通过比例 + approveRatio?: number + // 审批按钮设置 + buttonsSetting?: ButtonSetting[] + // 表单权限 + fieldsPermission?: Array> + // 审批任务超时处理 + timeoutHandler?: TimeoutHandler + // 审批任务拒绝处理 + rejectHandler?: RejectHandler + // 审批人为空的处理 + assignEmptyHandler?: AssignEmptyHandler + // 审批节点的审批人与发起人相同时,对应的处理类型 + assignStartUserHandlerType?: number + // 创建任务监听器 + taskCreateListener?: ListenerHandler + // 创建任务监听器 + taskAssignListener?: ListenerHandler + // 创建任务监听器 + taskCompleteListener?: ListenerHandler + // 条件设置 + conditionSetting?: ConditionSetting + // 活动的状态,用于前端节点状态展示 + activityStatus?: TaskStatusEnum + // 延迟设置 + delaySetting?: DelaySetting + // 路由分支 + routerGroups?: RouterSetting[] + defaultFlowId?: string + // 签名 + signEnable?: boolean + // 审批意见 + reasonRequire?: boolean + // 是否允许审批人修订本人已完成节点的审批意见 + opinionModifyEnable?: boolean + // 审批流标题是否展示审批人的共同主岗位,未配置时默认关闭 + showApproverPost?: boolean + // 跳过表达式 + skipExpression?: string + // 触发器设置 + triggerSetting?: TriggerSetting + // 子流程 + childProcessSetting?: ChildProcessSetting +} +// 候选人策略枚举 ( 用于审批节点。抄送节点 ) +export enum CandidateStrategy { + /** + * 指定角色 + */ + ROLE = 10, + /** + * 部门成员 + */ + DEPT_MEMBER = 20, + /** + * 部门的负责人 + */ + DEPT_LEADER = 21, + /** + * 连续多级部门的负责人 + */ + MULTI_LEVEL_DEPT_LEADER = 23, + /** + * 指定岗位 + */ + POST = 22, + /** + * 指定部门的岗位 + */ + DEPT_POST = 24, + /** + * 指定部门的分管领导 + */ + DEPT_SUPERVISOR = 25, + /** + * 指定部门的部门经理 + */ + DEPT_MANAGER = 26, + /** + * 指定部门的部门副经理 + */ + DEPT_DEPUTY_MANAGER = 27, + /** + * 指定用户 + */ + USER = 30, + /** + * 审批人自选 + */ + APPROVE_USER_SELECT = 34, + /** + * 发起人自选 + */ + START_USER_SELECT = 35, + /** + * 发起人自己 + */ + START_USER = 36, + /** + * 发起人部门负责人 + */ + START_USER_DEPT_LEADER = 37, + /** + * 发起人连续多级部门的负责人 + */ + START_USER_MULTI_LEVEL_DEPT_LEADER = 38, + /** + * 发起人部门分管领导 + */ + START_USER_DEPT_SUPERVISOR = 39, + /** + * 指定用户组 + */ + USER_GROUP = 40, + /** + * 发起人部门的岗位 + */ + START_USER_DEPT_POST = 41, + /** + * 发起人部门经理 + */ + START_USER_DEPT_MANAGER = 42, + /** + * 发起人部门副经理 + */ + START_USER_DEPT_DEPUTY_MANAGER = 43, + /** + * 表单内用户字段 + */ + FORM_USER = 50, + /** + * 表单内部门负责人 + */ + FORM_DEPT_LEADER = 51, + /** + * 表单内部门分管领导 + */ + FORM_DEPT_SUPERVISOR = 52, + /** + * 表单内部门的岗位 + */ + FORM_DEPT_POST = 53, + /** + * 表单内部门经理 + */ + FORM_DEPT_MANAGER = 54, + /** + * 表单内部门副经理 + */ + FORM_DEPT_DEPUTY_MANAGER = 55, + /** + * 表单内用户的部门经理(用户主组织部门,支持明细列、多选) + */ + FORM_USER_DEPT_MANAGER = 56, + /** + * 表单内用户的部门副经理 + */ + FORM_USER_DEPT_DEPUTY_MANAGER = 57, + /** + * 表单内用户的部门分管领导 + */ + FORM_USER_DEPT_SUPERVISOR = 58, + /** + * 表单内部门成员(所选部门本级的有效主岗、副岗和兼职人员) + */ + FORM_DEPT_MEMBER = 59, + /** + * 流程表达式 + */ + EXPRESSION = 60, + /** 表单内角色选择器字段,兼容单选、多选。 */ + FORM_ROLE = 61, + /** 表单所选部门所属最近一级集团/公司的分管领导。 */ + FORM_DEPT_COMPANY_SUPERVISOR = 62 +} + +// 多人审批方式类型枚举 ( 用于审批节点 ) +export enum ApproveMethodType { + /** + * 随机挑选一人审批 + */ + RANDOM_SELECT_ONE_APPROVE = 1, + + /** + * 多人会签(按通过比例) + */ + APPROVE_BY_RATIO = 2, + + /** + * 多人或签(通过只需一人,拒绝只需一人) + */ + ANY_APPROVE = 3, + /** + * 多人依次审批 + */ + SEQUENTIAL_APPROVE = 4 +} + +/** + * 审批拒绝结构定义 + */ +export type RejectHandler = { + // 审批拒绝类型 + type: RejectHandlerType + // 退回节点 Id + returnNodeId?: string +} + +/** + * 审批超时结构定义 + */ +export type TimeoutHandler = { + // 是否开启超时处理 + enable: boolean + // 超时执行的动作 + type?: number + // 超时时间设置 + timeDuration?: string + // 执行动作是自动提醒, 最大提醒次数 + maxRemindCount?: number +} + +/** + * 审批人为空的结构定义 + */ +export type AssignEmptyHandler = { + // 审批人为空的处理类型 + type: AssignEmptyHandlerType + // 指定用户的编号数组 + userIds?: number[] +} + +/** + * 监听器的结构定义 + */ +export type ListenerHandler = { + enable: boolean + path?: string + header?: HttpRequestParam[] + body?: HttpRequestParam[] +} +export type HttpRequestParam = { + key: string + type: number + value: string +} +export enum BpmHttpRequestParamTypeEnum { + /** + * 固定值 + */ + FIXED_VALUE = 1, + /** + * 表单 + */ + FROM_FORM = 2 +} +export const BPM_HTTP_REQUEST_PARAM_TYPES = [ + { + value: 1, + label: '固定值' + }, + { + value: 2, + label: '表单' + } +] + +// 审批拒绝类型枚举 +export enum RejectHandlerType { + /** + * 结束流程 + */ + FINISH_PROCESS = 1, + /** + * 驳回到指定节点 + */ + RETURN_USER_TASK = 2 +} +// 用户任务超时处理类型枚举 +export enum TimeoutHandlerType { + /** + * 自动提醒 + */ + REMINDER = 1, + /** + * 自动同意 + */ + APPROVE = 2, + /** + * 自动拒绝 + */ + REJECT = 3 +} +// 用户任务的审批人为空时,处理类型枚举 +export enum AssignEmptyHandlerType { + /** + * 自动通过 + */ + APPROVE = 1, + /** + * 自动拒绝 + */ + REJECT = 2, + /** + * 指定人员审批 + */ + ASSIGN_USER, + /** + * 转交给流程管理员 + */ + ASSIGN_ADMIN = 4, + /** 原规则无人时由上一节点办理人选择,本次进入节点后消费选择。 */ + PREVIOUS_USER_SELECT = 5 +} +// 用户任务的审批人与发起人相同时,处理类型枚举 +export enum AssignStartUserHandlerType { + /** + * 由发起人对自己审批 + */ + START_USER_AUDIT = 1, + /** + * 自动跳过【参考飞书】:1)如果当前节点还有其他审批人,则交由其他审批人进行审批;2)如果当前节点没有其他审批人,则该节点自动通过 + */ + SKIP = 2, + /** + * 转交给部门负责人审批 + */ + ASSIGN_DEPT_LEADER = 3 +} + +// 用户任务的审批类型。 【参考飞书】 +export enum ApproveType { + /** + * 人工审批 + */ + USER = 1, + /** + * 自动通过 + */ + AUTO_APPROVE = 2, + /** + * 自动拒绝 + */ + AUTO_REJECT = 3 +} + +// 时间单位枚举 +export enum TimeUnitType { + /** + * 分钟 + */ + MINUTE = 1, + /** + * 小时 + */ + HOUR = 2, + /** + * 天 + */ + DAY = 3 +} + +/** + * 条件节点设置结构定义,用于条件节点 + */ +export type ConditionSetting = { + // 条件类型 + conditionType?: ConditionType + // 条件表达式 + conditionExpression?: string + // 条件组 + conditionGroups?: ConditionGroup + // 是否默认的条件 + defaultFlow?: boolean +} + +// 条件配置类型 ( 用于条件节点配置 ) +export enum ConditionType { + /** + * 条件表达式 + */ + EXPRESSION = 1, + + /** + * 条件规则 + */ + RULE = 2 +} +/** + * 表单权限的枚举 + */ +export enum FieldPermissionType { + /** + * 只读 + */ + READ = '1', + /** + * 编辑 + */ + WRITE = '2', + /** + * 隐藏 + */ + NONE = '3' +} +/** + * 操作按钮权限结构定义 + */ +export type ButtonSetting = { + id: OperationButtonType + displayName: string + enable: boolean +} + +// 操作按钮类型枚举 (用于审批节点) +export enum OperationButtonType { + /** + * 通过 + */ + APPROVE = 1, + /** + * 拒绝 + */ + REJECT = 2, + /** + * 转办 + */ + TRANSFER = 3, + /** + * 委派 + */ + DELEGATE = 4, + /** + * 加签 + */ + ADD_SIGN = 5, + /** + * 退回 + */ + RETURN = 6, + /** + * 抄送 + */ + COPY = 7, + /** + * 跳转。数值取自 @/utils/constants 的 BpmOperationButtonExtType.FORWARD_JUMP(8),与后端约定集中维护; + * 新建节点默认关闭,历史节点没有该配置项时视为启用 + */ + FORWARD_JUMP = BpmOperationButtonExtType.FORWARD_JUMP +} + +/** 跳转按钮类型 */ +export const FORWARD_JUMP = OperationButtonType.FORWARD_JUMP + +/** + * 条件规则结构定义 + */ +export type ConditionRule = { + opCode: string + leftSide: string + rightSide: string + // 是否包含子部门,仅主岗部门条件使用 + includeChildren?: boolean + // 判定对象:表单内用户选择器字段,为空表示发起人;仅用户组、岗位、角色、主岗部门条件使用 + subjectField?: string +} + +/** + * 条件组结构定义 + */ +export type ConditionGroup = { + // 条件组的逻辑关系是否为且 + and: boolean + // 条件数组 + conditions: Condition[] +} +/** + * 条件组默认值 + */ +export const DEFAULT_CONDITION_GROUP_VALUE = { + and: true, + conditions: [ + { + and: true, + rules: [ + { + opCode: '==', + leftSide: '', + rightSide: '' + } + ] + } + ] +} + +/** + * 条件结构定义 + */ +export type Condition = { + // 条件规则的逻辑关系是否为且 + and: boolean + rules: ConditionRule[] +} + +export const NODE_DEFAULT_TEXT = new Map() +NODE_DEFAULT_TEXT.set(NodeType.USER_TASK_NODE, '请配置审批人') +NODE_DEFAULT_TEXT.set(NodeType.COPY_TASK_NODE, '请配置抄送人') +NODE_DEFAULT_TEXT.set(NodeType.CONDITION_NODE, '请设置条件') +NODE_DEFAULT_TEXT.set(NodeType.START_USER_NODE, '请设置发起人') +NODE_DEFAULT_TEXT.set(NodeType.DELAY_TIMER_NODE, '请设置延迟器') +NODE_DEFAULT_TEXT.set(NodeType.ROUTER_BRANCH_NODE, '请设置路由节点') +NODE_DEFAULT_TEXT.set(NodeType.TRIGGER_NODE, '请设置触发器') +NODE_DEFAULT_TEXT.set(NodeType.TRANSACTOR_NODE, '请设置办理人') +NODE_DEFAULT_TEXT.set(NodeType.CHILD_PROCESS_NODE, '请设置子流程') + +export const NODE_DEFAULT_NAME = new Map() +NODE_DEFAULT_NAME.set(NodeType.USER_TASK_NODE, '审批人') +NODE_DEFAULT_NAME.set(NodeType.COPY_TASK_NODE, '抄送人') +NODE_DEFAULT_NAME.set(NodeType.CONDITION_NODE, '条件') +NODE_DEFAULT_NAME.set(NodeType.START_USER_NODE, '发起人') +NODE_DEFAULT_NAME.set(NodeType.DELAY_TIMER_NODE, '延迟器') +NODE_DEFAULT_NAME.set(NodeType.ROUTER_BRANCH_NODE, '路由分支') +NODE_DEFAULT_NAME.set(NodeType.TRIGGER_NODE, '触发器') +NODE_DEFAULT_NAME.set(NodeType.TRANSACTOR_NODE, '办理人') +NODE_DEFAULT_NAME.set(NodeType.CHILD_PROCESS_NODE, '子流程') + +// 候选人策略。暂时不从字典中取。 后续可能调整。控制显示顺序 +// 流程配置隐藏部门负责人相关选项,枚举及解析逻辑保留以兼容历史模型。 +export const CANDIDATE_STRATEGY: DesignerOption[] = [ + { label: '指定成员', value: CandidateStrategy.USER }, + { label: '指定角色', value: CandidateStrategy.ROLE }, + { label: '指定岗位', value: CandidateStrategy.POST }, + { label: '部门成员', value: CandidateStrategy.DEPT_MEMBER }, + { label: '部门岗位', value: CandidateStrategy.DEPT_POST }, + { label: '部门经理', value: CandidateStrategy.DEPT_MANAGER }, + { label: '部门副经理', value: CandidateStrategy.DEPT_DEPUTY_MANAGER }, + { label: '部门分管领导', value: CandidateStrategy.DEPT_SUPERVISOR }, + { label: '发起人自选', value: CandidateStrategy.START_USER_SELECT }, + { label: '审批人自选', value: CandidateStrategy.APPROVE_USER_SELECT }, + { label: '发起人本人', value: CandidateStrategy.START_USER }, + { label: '发起人部门经理', value: CandidateStrategy.START_USER_DEPT_MANAGER }, + { label: '发起人部门副经理', value: CandidateStrategy.START_USER_DEPT_DEPUTY_MANAGER }, + { label: '发起人部门分管领导', value: CandidateStrategy.START_USER_DEPT_SUPERVISOR }, + { label: '发起人部门岗位', value: CandidateStrategy.START_USER_DEPT_POST }, + { label: '用户组', value: CandidateStrategy.USER_GROUP }, + { label: '表单内用户字段', value: CandidateStrategy.FORM_USER }, + { label: '表单内用户部门经理', value: CandidateStrategy.FORM_USER_DEPT_MANAGER }, + { label: '表单内用户部门副经理', value: CandidateStrategy.FORM_USER_DEPT_DEPUTY_MANAGER }, + { label: '表单内用户部门分管领导', value: CandidateStrategy.FORM_USER_DEPT_SUPERVISOR }, + { label: '表单内单位分管领导', value: CandidateStrategy.FORM_DEPT_COMPANY_SUPERVISOR }, + { label: '表单内部门成员', value: CandidateStrategy.FORM_DEPT_MEMBER }, + { label: '表单内部门经理', value: CandidateStrategy.FORM_DEPT_MANAGER }, + { label: '表单内部门副经理', value: CandidateStrategy.FORM_DEPT_DEPUTY_MANAGER }, + { label: '表单内部门分管领导', value: CandidateStrategy.FORM_DEPT_SUPERVISOR }, + { label: '表单内部门岗位', value: CandidateStrategy.FORM_DEPT_POST }, + { label: '流程表达式', value: CandidateStrategy.EXPRESSION } +] +// 按表单内用户字段取其部门人员的策略,值为节点摘要中的名称 +export const FORM_USER_DEPT_STRATEGY_LABELS: Record = { + [CandidateStrategy.FORM_USER_DEPT_MANAGER]: '部门经理', + [CandidateStrategy.FORM_USER_DEPT_DEPUTY_MANAGER]: '部门副经理', + [CandidateStrategy.FORM_USER_DEPT_SUPERVISOR]: '部门分管领导' +} +// 审批节点 的审批类型 +export const APPROVE_TYPE: DesignerOption[] = [ + { label: '人工审批', value: ApproveType.USER }, + { label: '自动通过', value: ApproveType.AUTO_APPROVE }, + { label: '自动拒绝', value: ApproveType.AUTO_REJECT } +] + +export const APPROVE_METHODS: DesignerOption[] = [ + { label: '按顺序依次审批', value: ApproveMethodType.SEQUENTIAL_APPROVE }, + { label: '会签(可同时审批,至少 % 人必须审批通过)', value: ApproveMethodType.APPROVE_BY_RATIO }, + { label: '或签(可同时审批,有一人通过即可)', value: ApproveMethodType.ANY_APPROVE }, + { label: '随机挑选一人审批', value: ApproveMethodType.RANDOM_SELECT_ONE_APPROVE } +] + +export const CONDITION_CONFIG_TYPES: DesignerOption[] = [ + { label: '条件规则', value: ConditionType.RULE }, + { label: '条件表达式', value: ConditionType.EXPRESSION } +] + +// 时间单位类型 +export const TIME_UNIT_TYPES: DesignerOption[] = [ + { label: '分钟', value: TimeUnitType.MINUTE }, + { label: '小时', value: TimeUnitType.HOUR }, + { label: '天', value: TimeUnitType.DAY } +] +// 超时处理执行动作类型 +export const TIMEOUT_HANDLER_TYPES: DesignerOption[] = [ + { label: '自动提醒', value: 1 }, + { label: '自动同意', value: 2 }, + { label: '自动拒绝', value: 3 } +] +export const REJECT_HANDLER_TYPES: DesignerOption[] = [ + { label: '终止流程', value: RejectHandlerType.FINISH_PROCESS }, + { label: '驳回到指定节点', value: RejectHandlerType.RETURN_USER_TASK } + // { label: '结束任务', value: RejectHandlerType.FINISH_TASK } +] +export const ASSIGN_EMPTY_HANDLER_TYPES: DesignerOption[] = [ + { label: '自动通过', value: 1 }, + { label: '自动拒绝', value: 2 }, + { label: '指定成员审批', value: 3 }, + { label: '转交给流程管理员', value: 4 }, + { label: '由上一节点办理人选择', value: AssignEmptyHandlerType.PREVIOUS_USER_SELECT } +] +export const ASSIGN_START_USER_HANDLER_TYPES: DesignerOption[] = [ + // 同步隐藏转交部门负责人,历史保存的处理类型仍由原枚举解析。 + { label: '由发起人对自己审批', value: AssignStartUserHandlerType.START_USER_AUDIT }, + { label: '自动跳过', value: AssignStartUserHandlerType.SKIP } +] + +// 比较运算符 +export const COMPARISON_OPERATORS: DesignerOption[] = [ + { + value: '==', + label: '等于' + }, + { + value: '!=', + label: '不等于' + }, + { + value: '>', + label: '大于' + }, + { + value: '>=', + label: '大于等于' + }, + { + value: '<', + label: '小于' + }, + { + value: '<=', + label: '小于等于' + }, + { + value: 'contains', + label: '包含' + }, + { + value: 'notContains', + label: '不包含' + } +] +// 审批操作按钮名称 +export const OPERATION_BUTTON_NAME = new Map() +OPERATION_BUTTON_NAME.set(OperationButtonType.APPROVE, '通过') +OPERATION_BUTTON_NAME.set(OperationButtonType.REJECT, '拒绝') +OPERATION_BUTTON_NAME.set(OperationButtonType.TRANSFER, '转办') +OPERATION_BUTTON_NAME.set(OperationButtonType.DELEGATE, '委派') +OPERATION_BUTTON_NAME.set(OperationButtonType.ADD_SIGN, '加签') +OPERATION_BUTTON_NAME.set(OperationButtonType.RETURN, '退回') +OPERATION_BUTTON_NAME.set(OperationButtonType.COPY, '抄送') +OPERATION_BUTTON_NAME.set(OperationButtonType.FORWARD_JUMP, '跳转') + +// 默认的按钮权限设置 +export const DEFAULT_BUTTON_SETTING: ButtonSetting[] = [ + { id: OperationButtonType.APPROVE, displayName: '通过', enable: true }, + { id: OperationButtonType.REJECT, displayName: '拒绝', enable: true }, + { id: OperationButtonType.TRANSFER, displayName: '转办', enable: true }, + { id: OperationButtonType.DELEGATE, displayName: '委派', enable: true }, + { id: OperationButtonType.ADD_SIGN, displayName: '加签', enable: true }, + { id: OperationButtonType.RETURN, displayName: '退回', enable: true }, + { id: OperationButtonType.FORWARD_JUMP, displayName: '跳转', enable: false } +] + +// 办理人默认的按钮权限设置 +export const TRANSACTOR_DEFAULT_BUTTON_SETTING: ButtonSetting[] = [ + { id: OperationButtonType.APPROVE, displayName: '办理', enable: true }, + { id: OperationButtonType.REJECT, displayName: '拒绝', enable: false }, + { id: OperationButtonType.TRANSFER, displayName: '转办', enable: false }, + { id: OperationButtonType.DELEGATE, displayName: '委派', enable: false }, + { id: OperationButtonType.ADD_SIGN, displayName: '加签', enable: false }, + { id: OperationButtonType.RETURN, displayName: '退回', enable: false }, + { id: OperationButtonType.FORWARD_JUMP, displayName: '跳转', enable: false } +] + +// 发起人的按钮权限。暂时定死,不可以编辑 +export const START_USER_BUTTON_SETTING: ButtonSetting[] = [ + { id: OperationButtonType.APPROVE, displayName: '提交', enable: true }, + { id: OperationButtonType.REJECT, displayName: '拒绝', enable: false }, + { id: OperationButtonType.TRANSFER, displayName: '转办', enable: false }, + { id: OperationButtonType.DELEGATE, displayName: '委派', enable: false }, + { id: OperationButtonType.ADD_SIGN, displayName: '加签', enable: false }, + { id: OperationButtonType.RETURN, displayName: '退回', enable: false }, + { id: OperationButtonType.FORWARD_JUMP, displayName: '跳转', enable: false } +] + +export const MULTI_LEVEL_DEPT: DesignerOption[] = [ + { label: '第 1 级部门', value: 1 }, + { label: '第 2 级部门', value: 2 }, + { label: '第 3 级部门', value: 3 }, + { label: '第 4 级部门', value: 4 }, + { label: '第 5 级部门', value: 5 }, + { label: '第 6 级部门', value: 6 }, + { label: '第 7 级部门', value: 7 }, + { label: '第 8 级部门', value: 8 }, + { label: '第 9 级部门', value: 9 }, + { label: '第 10 级部门', value: 10 }, + { label: '第 11 级部门', value: 11 }, + { label: '第 12 级部门', value: 12 }, + { label: '第 13 级部门', value: 13 }, + { label: '第 14 级部门', value: 14 }, + { label: '第 15 级部门', value: 15 } +] + +/** + * 流程实例的变量枚举 + */ +export enum ProcessVariableEnum { + /** + * 发起用户 ID + */ + START_USER_ID = 'PROCESS_START_USER_ID', + /** + * 发起时间 + */ + START_TIME = 'PROCESS_START_TIME', + /** + * 流程定义名称 + */ + PROCESS_DEFINITION_NAME = 'PROCESS_DEFINITION_NAME', + /** + * 用户组(内置) + */ + USER_GROUP = 'PROCESS_USER_GROUP', + /** 角色(内置):按判定对象实际拥有的启用角色判断 */ + ROLE = 'PROCESS_ROLE', + /** + * 岗位(内置) + */ + POST = 'PROCESS_POST', + /** + * 主岗部门(内置):发起人主组织部门 + */ + MAIN_DEPT = 'PROCESS_MAIN_DEPT' +} + +/** + * 延迟设置 + */ +export type DelaySetting = { + // 延迟类型 + delayType: number + // 延迟时间表达式 + delayTime: string +} +/** + * 延迟类型 + */ +export enum DelayTypeEnum { + /** + * 固定时长 + */ + FIXED_TIME_DURATION = 1, + /** + * 固定日期时间 + */ + FIXED_DATE_TIME = 2 +} +export const DELAY_TYPE = [ + { label: '固定时长', value: DelayTypeEnum.FIXED_TIME_DURATION }, + { label: '固定日期', value: DelayTypeEnum.FIXED_DATE_TIME } +] + +/** + * 路由分支结构定义 + */ +export type RouterSetting = { + nodeId: string + conditionType: ConditionType + conditionExpression: string + conditionGroups: ConditionGroup +} + +// ==================== 触发器相关定义 ==================== +/** + * 触发器节点结构定义 + */ +export type TriggerSetting = { + type: TriggerTypeEnum + httpRequestSetting?: HttpRequestTriggerSetting + formSettings?: FormTriggerSetting[] +} + +/** + * 触发器类型枚举 + */ +export enum TriggerTypeEnum { + /** + * 发送 HTTP 请求触发器 + */ + HTTP_REQUEST = 1, + /** + * 接收 HTTP 回调请求触发器 + */ + HTTP_CALLBACK = 2, + /** + * 表单数据更新触发器 + */ + FORM_UPDATE = 10, + /** + * 表单数据删除触发器 + */ + FORM_DELETE = 11 +} + +/** + * HTTP 请求触发器结构定义 + */ +export type HttpRequestTriggerSetting = { + // 请求 URL + url: string + // 请求头参数设置 + header?: HttpRequestParam[] + // 请求体参数设置 + body?: HttpRequestParam[] + // 请求响应设置 + response?: Record[] + // 失败时是否自动重试,未配置时开启 + retryEnable?: boolean +} + +/** + * 流程表单触发器配置结构定义 + */ +export type FormTriggerSetting = { + // 条件类型 + conditionType?: ConditionType + // 条件表达式 + conditionExpression?: string + // 条件组 + conditionGroups?: ConditionGroup + // 更新表单字段配置 + updateFormFields?: Record + // 删除表单字段配置 + deleteFields?: string[] +} + +export const TRIGGER_TYPES: DesignerOption[] = [ + { label: '发送 HTTP 请求', value: TriggerTypeEnum.HTTP_REQUEST }, + { label: '接收 HTTP 回调', value: TriggerTypeEnum.HTTP_CALLBACK }, + { label: '修改表单数据', value: TriggerTypeEnum.FORM_UPDATE }, + { label: '删除表单数据', value: TriggerTypeEnum.FORM_DELETE } +] + +/** + * 子流程节点结构定义 + */ +export type ChildProcessSetting = { + calledProcessDefinitionKey: string + calledProcessDefinitionName: string + async: boolean + inVariables?: IOParameter[] + outVariables?: IOParameter[] + skipStartUserNode: boolean + startUserSetting: StartUserSetting + timeoutSetting: TimeoutSetting + multiInstanceSetting: MultiInstanceSetting +} +export type IOParameter = { + source: string + target: string +} +export type StartUserSetting = { + type: ChildProcessStartUserTypeEnum + formField?: string + emptyType?: ChildProcessStartUserEmptyTypeEnum +} +export type TimeoutSetting = { + enable: boolean + type?: DelayTypeEnum + timeExpression?: string +} +export type MultiInstanceSetting = { + enable: boolean + sequential?: boolean + approveRatio?: number + sourceType?: ChildProcessMultiInstanceSourceTypeEnum + source?: string +} +export enum ChildProcessStartUserTypeEnum { + /** + * 同主流程发起人 + */ + MAIN_PROCESS_START_USER = 1, + /** + * 表单 + */ + FROM_FORM = 2 +} +export const CHILD_PROCESS_START_USER_TYPE = [ + { label: '同主流程发起人', value: ChildProcessStartUserTypeEnum.MAIN_PROCESS_START_USER }, + { label: '表单', value: ChildProcessStartUserTypeEnum.FROM_FORM } +] +export enum ChildProcessStartUserEmptyTypeEnum { + /** + * 同主流程发起人 + */ + MAIN_PROCESS_START_USER = 1, + /** + * 子流程管理员 + */ + CHILD_PROCESS_ADMIN = 2, + /** + * 主流程管理员 + */ + MAIN_PROCESS_ADMIN = 3 +} +export const CHILD_PROCESS_START_USER_EMPTY_TYPE = [ + { label: '同主流程发起人', value: ChildProcessStartUserEmptyTypeEnum.MAIN_PROCESS_START_USER }, + { label: '子流程管理员', value: ChildProcessStartUserEmptyTypeEnum.CHILD_PROCESS_ADMIN }, + { label: '主流程管理员', value: ChildProcessStartUserEmptyTypeEnum.MAIN_PROCESS_ADMIN } +] +export enum ChildProcessMultiInstanceSourceTypeEnum { + /** + * 固定数量 + */ + FIXED_QUANTITY = 1, + /** + * 数字表单 + */ + NUMBER_FORM = 2, + /** + * 多选表单 + */ + MULTIPLE_FORM = 3 +} +export const CHILD_PROCESS_MULTI_INSTANCE_SOURCE_TYPE = [ + { label: '固定数量', value: ChildProcessMultiInstanceSourceTypeEnum.FIXED_QUANTITY }, + { label: '数字表单', value: ChildProcessMultiInstanceSourceTypeEnum.NUMBER_FORM }, + { label: '多选表单', value: ChildProcessMultiInstanceSourceTypeEnum.MULTIPLE_FORM } +] + +/** 只读预览中审批记录的用户信息 */ +export interface PreviewTaskUser { + id?: number + nickname?: string + deptName?: string + avatar?: string +} + +/** 只读预览时注入的流程任务(审批记录) */ +export interface PreviewTask { + id?: string + taskDefinitionKey?: string + assigneeUser?: PreviewTaskUser + ownerUser?: PreviewTaskUser + createTime?: number | string + endTime?: number | string + status?: number + reason?: string + durationInMillis?: number +} + +/** 只读预览时注入的流程实例 */ +export interface PreviewProcessInstance { + id?: string + startUser?: PreviewTaskUser + startTime?: number | string + endTime?: number | string + status?: number + durationInMillis?: number +} diff --git a/src/components/SimpleProcessDesignerV2/src/index.ts b/src/components/SimpleProcessDesignerV2/src/index.ts new file mode 100644 index 0000000..88de07f --- /dev/null +++ b/src/components/SimpleProcessDesignerV2/src/index.ts @@ -0,0 +1,5 @@ +import SimpleProcessDesigner from './SimpleProcessDesigner.vue' +import SimpleProcessViewer from './SimpleProcessViewer.vue' +import '../theme/simple-process-designer.scss' + +export { SimpleProcessDesigner, SimpleProcessViewer} diff --git a/src/components/SimpleProcessDesignerV2/src/node.ts b/src/components/SimpleProcessDesignerV2/src/node.ts new file mode 100644 index 0000000..c73cab5 --- /dev/null +++ b/src/components/SimpleProcessDesignerV2/src/node.ts @@ -0,0 +1,1007 @@ +import { TaskStatusEnum } from '@/api/bpm/task' +import * as RoleApi from '@/api/system/role' +import * as DeptApi from '@/api/system/dept' +import * as PostApi from '@/api/system/post' +import * as UserApi from '@/api/system/user' +import * as UserGroupApi from '@/api/bpm/userGroup' +import { + SimpleFlowNode, + CandidateStrategy, + NodeType, + ApproveMethodType, + RejectHandlerType, + NODE_DEFAULT_NAME, + AssignStartUserHandlerType, + AssignEmptyHandlerType, + FieldPermissionType, + HttpRequestParam, + ProcessVariableEnum, + ConditionType, + ConditionGroup, + ConditionRule, + COMPARISON_OPERATORS, + FORM_USER_DEPT_STRATEGY_LABELS, + type ButtonSetting +} from './consts' +import { parseFormFields, parseTableColumnFields } from '@/components/FormCreate/src/utils' +import { getDictOptions } from '@/utils/dict' + +export function useWatchNode(props: { flowNode: SimpleFlowNode }): Ref { + const node = ref(props.flowNode) + watch( + () => props.flowNode, + (newValue) => { + node.value = newValue + } + ) + return node +} + +/** 只列出角色选择器,明细字段编码与后端“表字段.列字段”取值方式一致。 */ +const parseRoleFields = (formFields?: string[]) => { + const fields: Array<{ field: string; title: string }> = [] + const walk = (rules: any[], table?: { field: string; title: string }) => { + rules.forEach((rule) => { + if (!rule || typeof rule !== 'object') return + if (String(rule.type).toLowerCase() === 'roleselect' && rule.field) { + fields.push({ + field: table ? `${table.field}.${rule.field}` : rule.field, + title: table ? `${table.title}.${rule.title || rule.field}` : rule.title || rule.field + }) + } + if (String(rule.type).toLowerCase() === 'tableform' && rule.field) { + const scope = { field: rule.field, title: rule.title || rule.field } + ;(rule.props?.columns || []).forEach((column: any) => walk(column.rule || [], scope)) + walk(rule.children || [], scope) + } else { + walk(rule.children || [], table) + } + }) + } + formFields?.forEach((rule) => walk([JSON.parse(rule)])) + return fields +} + +/** 审批与抄送共用角色字段选项,随当前表单配置动态更新。 */ +export function useRoleFieldOptions() { + const formFields = inject>('formFields', ref([])) + return computed(() => parseRoleFields(unref(formFields))) +} + +// 解析 formCreate 所有表单字段, 并返回 +const parseFormCreateFields = (formFields?: string[]) => { + const result: Array> = [] + if (formFields) { + formFields.forEach((fieldStr: string) => { + parseFormFields(JSON.parse(fieldStr), result) + }) + } + return result +} + +/** + * 审批人、抄送人可引用的表单字段:普通字段加明细表各列(“明细表.列”) + */ +export const parseCandidateFormFields = (formFields?: string[]) => { + const result = parseFormCreateFields(formFields) + formFields?.forEach((fieldStr: string) => parseTableColumnFields(JSON.parse(fieldStr), result)) + return result +} + +/** + * 审批人、抄送人可选的表单用户字段、部门字段,含明细表列;非必填字段也可选,取不到值时按“审批人为空”处理 + */ +export function useCandidateFormFieldOptions() { + const formFields = inject>('formFields', ref([])) // 流程表单字段 + const candidateFields = computed(() => parseCandidateFormFields(unref(formFields))) + const userFieldOptions = computed(() => + candidateFields.value.filter( + (item) => item.type === 'UserSelect' && item.field !== ProcessVariableEnum.START_USER_ID + ) + ) + const deptFieldOptions = computed(() => + candidateFields.value.filter((item) => item.type === 'DeptSelect') + ) + return { userFieldOptions, deptFieldOptions } +} + +/** + * @description 表单数据权限配置,用于发起人节点 、审批节点、抄送节点 + */ +/** 节点必填标记可能来自布尔值,或 BPMN 扩展属性里的字符串 */ +const isTrue = (value: unknown) => value === true || value === 'true' + +/** 保存节点字段权限:只有可编辑的字段保留必填标记 */ +export const normalizeFieldsPermission = (fieldsPermission: Array>) => + fieldsPermission.map((item) => ({ + ...item, + required: item.permission === FieldPermissionType.WRITE && isTrue(item.required) + })) + +export function useFormFieldsPermission(defaultPermission: FieldPermissionType) { + // 字段权限配置. 需要有 field, title, permissioin 属性;required 为该节点必填,仅可编辑时生效 + const fieldsPermissionConfig = ref>>([]) + + const formType = inject>('formType', ref()) // 表单类型 + + const formFields = inject>('formFields', ref([])) // 流程表单字段 + + const getNodeConfigFormFields = (nodeFormFields?: Array>) => { + nodeFormFields = toRaw(nodeFormFields) + if (!nodeFormFields || nodeFormFields.length === 0) { + fieldsPermissionConfig.value = getDefaultFieldsPermission(unref(formFields)) + } else { + fieldsPermissionConfig.value = mergeFieldsPermission(nodeFormFields, unref(formFields)) + } + } + // 合并已经设置的表单字段权限,当前流程表单字段 (可能新增,或删除了字段) + const mergeFieldsPermission = ( + formFieldsPermisson: Array>, + formFields?: string[] + ) => { + let mergedFieldsPermission: Array> = [] + if (formFields) { + mergedFieldsPermission = parseFormCreateFields(formFields).map((item) => { + const found = formFieldsPermisson.find( + (fieldPermission) => fieldPermission.field == item.field + ) + const permission = found ? found.permission : defaultPermission + return { + field: item.field, + title: item.title, + permission, + required: permission === FieldPermissionType.WRITE && isTrue(found?.required) + } + }) + } + return mergedFieldsPermission + } + + // 默认的表单权限: 获取表单的所有字段,设置字段默认权限为只读 + const getDefaultFieldsPermission = (formFields?: string[]) => { + let defaultFieldsPermission: Array> = [] + if (formFields) { + defaultFieldsPermission = parseFormCreateFields(formFields).map((item) => { + return { + field: item.field, + title: item.title, + permission: defaultPermission, + required: false + } + }) + } + return defaultFieldsPermission + } + + // 表单字段异步加载或切换后重新解析,避免节点初始化时缓存空的下拉选项 + const formFieldOptions = computed(() => parseFormCreateFields(unref(formFields))) + + return { + formType, + fieldsPermissionConfig, + formFieldOptions, + getNodeConfigFormFields + } +} + +/** + * @description 获取流程表单的字段 + */ +export function useFormFields() { + const formFields = inject>('formFields', ref([])) // 流程表单字段 + return parseFormCreateFields(unref(formFields)) +} + +/** + * @description 获取流程表单的字段和发起人字段 + */ +export function useFormFieldsAndStartUser() { + const injectFormFields = inject>('formFields', ref([])) // 流程表单字段 + const formFields = reactive>>([]) + // 表单异步加载或切换后同步更新,保留数组引用,避免条件摘要使用初始化时的空字段列表。 + watch( + injectFormFields, + (fields) => { + const options = parseFormCreateFields(fields) + options.unshift( + { + field: ProcessVariableEnum.USER_GROUP, + title: '用户组(内置)', + required: true + }, + { + field: ProcessVariableEnum.ROLE, + title: '角色(内置)', + required: true + }, + { + field: ProcessVariableEnum.POST, + title: '岗位(内置)', + required: true + }, + { + field: ProcessVariableEnum.MAIN_DEPT, + title: '主岗部门(内置)', + required: true + }, + { + field: ProcessVariableEnum.START_USER_ID, + title: '发起人', + required: true + } + ) + formFields.splice(0, formFields.length, ...options) + }, + { immediate: true, deep: true } + ) + return formFields +} + +/** 按人判断的内置条件:用户组、岗位、角色、主岗部门,可选择判定对象 */ +export const isBuiltInIdentityVariable = (leftSide?: string) => + leftSide === ProcessVariableEnum.USER_GROUP || + leftSide === ProcessVariableEnum.ROLE || + leftSide === ProcessVariableEnum.POST || + leftSide === ProcessVariableEnum.MAIN_DEPT + +/** + * 条件判定对象可选项:发起人,加表单内的用户选择器字段(按编号取值,不要求必填,字段为空时条件不成立) + */ +export function useConditionSubjectOptions() { + const formFields = inject>('formFields', ref([])) // 流程表单字段 + // 随表单异步加载更新 + return computed(() => [ + { field: ProcessVariableEnum.START_USER_ID, title: '发起人' }, + ...parseFormCreateFields(unref(formFields)).filter( + (item) => + item.type === 'UserSelect' && (!item.props?.valueField || item.props.valueField === 'id') + ) + ]) +} + +/** 选了判定对象时,条件字段只能是用户组、岗位、角色、主岗部门 */ +export const getConditionLeftSideOptions = ( + fieldOptions: Array>, + subjectField?: string +) => + subjectField + ? fieldOptions.filter((item) => isBuiltInIdentityVariable(item.field)) + : fieldOptions + +export type UserTaskFormType = { + candidateStrategy: CandidateStrategy + approveMethod: ApproveMethodType + roleIds?: number[] // 角色 + deptIds?: number[] // 部门 + deptLevel?: number // 部门层级 + userIds?: number[] // 用户 + userGroups?: number[] // 用户组 + postIds?: number[] // 岗位 + expression?: string // 流程表达式 + formUser?: string // 表单内用户字段 + formRole?: string // 表单内角色选择器字段 + formDept?: string // 表单内部门字段 + approveRatio?: number + rejectHandlerType?: RejectHandlerType + returnNodeId?: string + timeoutHandlerEnable?: boolean + timeoutHandlerType?: number + assignEmptyHandlerType?: AssignEmptyHandlerType + assignEmptyHandlerUserIds?: number[] + assignStartUserHandlerType?: AssignStartUserHandlerType + timeDuration?: number + maxRemindCount?: number + buttonsSetting: ButtonSetting[] + taskCreateListenerEnable?: boolean + taskCreateListenerPath?: string + taskCreateListener?: { + header: HttpRequestParam[] + body: HttpRequestParam[] + } + taskAssignListenerEnable?: boolean + taskAssignListenerPath?: string + taskAssignListener?: { + header: HttpRequestParam[] + body: HttpRequestParam[] + } + taskCompleteListenerEnable?: boolean + taskCompleteListenerPath?: string + taskCompleteListener?: { + header: HttpRequestParam[] + body: HttpRequestParam[] + } + signEnable: boolean + reasonRequire: boolean + // 是否允许审批人修改本人已完成任务的审批意见 + opinionModifyEnable: boolean + // 主岗位一致时以岗位名称展示审批节点标题 + showApproverPost: boolean + skipExpression?: string +} + +export type CopyTaskFormType = { + candidateStrategy: CandidateStrategy + roleIds?: number[] // 角色 + deptIds?: number[] // 部门 + deptLevel?: number // 部门层级 + userIds?: number[] // 用户 + userGroups?: number[] // 用户组 + postIds?: number[] // 岗位 + formUser?: string // 表单内用户字段 + formRole?: string // 表单内角色选择器字段 + formDept?: string // 表单内部门字段 + expression?: string // 流程表达式 +} + +/** + * @description 节点表单数据。 用于审批节点、抄送节点 + */ +export function useNodeForm(nodeType: NodeType) { + const roleOptions = inject>('roleList', ref([])) // 角色列表 + const postOptions = inject>('postList', ref([])) // 岗位列表 + const userOptions = inject>('userList', ref([])) // 用户列表 + const deptOptions = inject>('deptList', ref([])) // 部门列表 + const userGroupOptions = inject>('userGroupList', ref([])) // 用户组列表 + const deptTreeOptions = inject('deptTree', ref()) // 部门树 + const formFields = inject>('formFields', ref([])) // 流程表单字段 + const configForm = ref() + if (nodeType === NodeType.USER_TASK_NODE || nodeType === NodeType.TRANSACTOR_NODE) { + configForm.value = { + candidateStrategy: CandidateStrategy.USER, + approveMethod: ApproveMethodType.ANY_APPROVE, // 与新建节点的默认或签方式保持一致 + approveRatio: 100, + rejectHandlerType: RejectHandlerType.FINISH_PROCESS, + assignStartUserHandlerType: AssignStartUserHandlerType.START_USER_AUDIT, + returnNodeId: '', + timeoutHandlerEnable: false, + timeoutHandlerType: 1, + timeDuration: 6, // 默认 6小时 + maxRemindCount: 1, // 默认 提醒 1次 + buttonsSetting: [], + opinionModifyEnable: false, // 默认禁止修改已完成任务的审批意见 + showApproverPost: false // 默认使用原节点名称 + } + } else { + configForm.value = { + candidateStrategy: CandidateStrategy.USER + } + } + + // 已选岗位的名称 + const getPostNames = (): string[] => { + const postIds = configForm.value?.postIds || [] + return (postOptions?.value || []) + .filter((item) => postIds.includes(item.id!)) + .map((item) => item.name) + } + + const getShowText = (): string => { + let showText = '' + // 指定成员 + if (configForm.value?.candidateStrategy === CandidateStrategy.USER) { + if (configForm.value?.userIds!.length > 0) { + const candidateNames: string[] = [] + userOptions?.value.forEach((item) => { + if (configForm.value?.userIds!.includes(item.id)) { + candidateNames.push(item.nickname) + } + }) + showText = `指定成员:${candidateNames.join(',')}` + } + } + // 指定角色 + if (configForm.value?.candidateStrategy === CandidateStrategy.ROLE) { + if (configForm.value.roleIds!.length > 0) { + const candidateNames: string[] = [] + roleOptions?.value.forEach((item) => { + if (configForm.value?.roleIds!.includes(item.id)) { + candidateNames.push(item.name) + } + }) + showText = `指定角色:${candidateNames.join(',')}` + } + } + // 指定部门 + if ( + configForm.value?.candidateStrategy === CandidateStrategy.DEPT_MEMBER || + configForm.value?.candidateStrategy === CandidateStrategy.DEPT_LEADER || + configForm.value?.candidateStrategy === CandidateStrategy.MULTI_LEVEL_DEPT_LEADER || + configForm.value?.candidateStrategy === CandidateStrategy.DEPT_POST || + configForm.value?.candidateStrategy === CandidateStrategy.DEPT_SUPERVISOR || + configForm.value?.candidateStrategy === CandidateStrategy.DEPT_MANAGER || + configForm.value?.candidateStrategy === CandidateStrategy.DEPT_DEPUTY_MANAGER + ) { + if (configForm.value?.deptIds!.length > 0) { + const candidateNames: string[] = [] + deptOptions?.value.forEach((item) => { + if (configForm.value?.deptIds!.includes(item.id!)) { + candidateNames.push(item.name) + } + }) + if (configForm.value.candidateStrategy === CandidateStrategy.DEPT_MEMBER) { + showText = `部门成员:${candidateNames.join(',')}` + } else if (configForm.value.candidateStrategy === CandidateStrategy.DEPT_LEADER) { + showText = `部门的负责人:${candidateNames.join(',')}` + } else if (configForm.value.candidateStrategy === CandidateStrategy.DEPT_POST) { + showText = `部门岗位:${candidateNames.join(',')}-${getPostNames().join(',')}` + } else if (configForm.value.candidateStrategy === CandidateStrategy.DEPT_SUPERVISOR) { + showText = `部门分管领导:${candidateNames.join(',')}` + } else if (configForm.value.candidateStrategy === CandidateStrategy.DEPT_MANAGER) { + showText = `部门经理:${candidateNames.join(',')}` + } else if (configForm.value.candidateStrategy === CandidateStrategy.DEPT_DEPUTY_MANAGER) { + showText = `部门副经理:${candidateNames.join(',')}` + } else { + showText = `多级部门的负责人:${candidateNames.join(',')}` + } + } + } + + // 指定岗位 + if (configForm.value?.candidateStrategy === CandidateStrategy.POST) { + if (configForm.value.postIds!.length > 0) { + showText = `指定岗位: ${getPostNames().join(',')}` + } + } + // 发起人部门的岗位 + if (configForm.value?.candidateStrategy === CandidateStrategy.START_USER_DEPT_POST) { + if (configForm.value.postIds!.length > 0) { + showText = `发起人部门岗位:${getPostNames().join(',')}` + } + } + // 指定用户组 + if (configForm.value?.candidateStrategy === CandidateStrategy.USER_GROUP) { + if (configForm.value?.userGroups!.length > 0) { + const candidateNames: string[] = [] + userGroupOptions?.value.forEach((item) => { + if (configForm.value?.userGroups!.includes(item.id)) { + candidateNames.push(item.name) + } + }) + showText = `指定用户组: ${candidateNames.join(',')}` + } + } + + // 字段删除或切换类型后,阻止保存失效的角色字段引用。 + if (configForm.value?.candidateStrategy === CandidateStrategy.FORM_ROLE) { + const field = parseRoleFields(unref(formFields)).find((item) => item.field === configForm.value?.formRole) + if (!field) { + useMessage().warning('未找到所选的表单角色字段,请确认表单已加载并重新选择') + return '' + } + showText = `表单内角色:${field.title}` + } + // 表单内用户字段 + if (configForm.value?.candidateStrategy === CandidateStrategy.FORM_USER) { + // 内置发起人不属于业务表单字段,需单独解析名称。 + if (configForm.value.formUser === ProcessVariableEnum.START_USER_ID) { + return '表单用户:发起人' + } + const formFieldOptions = parseCandidateFormFields(unref(formFields)) + const item = formFieldOptions.find((item) => item.field === configForm.value?.formUser) + // 字段被删除、切换表单或尚未加载时,提示重新选择,阻止保存无效摘要。 + if (!item?.title) { + useMessage().warning('未找到所选的表单用户字段,请确认表单已加载并重新选择') + return '' + } + showText = `表单用户:${item.title}` + } + + // 表单内用户的部门经理、副经理、部门分管领导 + const formUserDeptLabel = FORM_USER_DEPT_STRATEGY_LABELS[configForm.value?.candidateStrategy ?? -1] + if (formUserDeptLabel) { + const item = parseCandidateFormFields(unref(formFields)).find( + (item) => item.field === configForm.value?.formUser + ) + showText = `${item?.title ?? '表单用户'}的${formUserDeptLabel}` + } + + // 部门成员、单位分管领导均展示引用的部门字段,并阻止保存失效字段。 + if ( + configForm.value?.candidateStrategy === CandidateStrategy.FORM_DEPT_MEMBER || + configForm.value?.candidateStrategy === CandidateStrategy.FORM_DEPT_COMPANY_SUPERVISOR + ) { + const item = parseCandidateFormFields(unref(formFields)).find( + (item) => item.type === 'DeptSelect' && item.field === configForm.value?.formDept + ) + if (!item?.title) { + useMessage().warning('未找到所选的表单部门字段,请确认表单已加载并重新选择') + return '' + } + const label = + configForm.value.candidateStrategy === CandidateStrategy.FORM_DEPT_COMPANY_SUPERVISOR + ? '表单内单位分管领导' + : '表单内部门成员' + showText = `${label}:${item.title}` + } + // 表单内部门负责人 + if (configForm.value?.candidateStrategy === CandidateStrategy.FORM_DEPT_LEADER) { + showText = `表单内部门负责人` + } + // 表单内部门分管领导 + if (configForm.value?.candidateStrategy === CandidateStrategy.FORM_DEPT_SUPERVISOR) { + showText = `表单内部门分管领导` + } + // 表单内部门经理、副经理 + if (configForm.value?.candidateStrategy === CandidateStrategy.FORM_DEPT_MANAGER) { + showText = `表单内部门经理` + } + if (configForm.value?.candidateStrategy === CandidateStrategy.FORM_DEPT_DEPUTY_MANAGER) { + showText = `表单内部门副经理` + } + // 表单内部门的岗位 + if (configForm.value?.candidateStrategy === CandidateStrategy.FORM_DEPT_POST) { + showText = `表单内部门岗位:${getPostNames().join(',')}` + } + + // 审批人自选 + if (configForm.value?.candidateStrategy === CandidateStrategy.APPROVE_USER_SELECT) { + showText = `审批人自选` + } + + // 发起人自选 + if (configForm.value?.candidateStrategy === CandidateStrategy.START_USER_SELECT) { + showText = `发起人自选` + } + // 发起人自己 + if (configForm.value?.candidateStrategy === CandidateStrategy.START_USER) { + showText = `发起人自己` + } + // 发起人的部门负责人 + if (configForm.value?.candidateStrategy === CandidateStrategy.START_USER_DEPT_LEADER) { + showText = `发起人的部门负责人` + } + // 发起人的部门分管领导 + if (configForm.value?.candidateStrategy === CandidateStrategy.START_USER_DEPT_SUPERVISOR) { + showText = `发起人部门分管领导` + } + // 发起人部门经理、副经理 + if (configForm.value?.candidateStrategy === CandidateStrategy.START_USER_DEPT_MANAGER) { + showText = `发起人部门经理` + } + if (configForm.value?.candidateStrategy === CandidateStrategy.START_USER_DEPT_DEPUTY_MANAGER) { + showText = `发起人部门副经理` + } + // 发起人的部门负责人 + if ( + configForm.value?.candidateStrategy === CandidateStrategy.START_USER_MULTI_LEVEL_DEPT_LEADER + ) { + showText = `发起人连续部门负责人` + } + // 流程表达式 + if (configForm.value?.candidateStrategy === CandidateStrategy.EXPRESSION) { + showText = `流程表达式:${configForm.value.expression}` + } + return showText + } + + /** + * 处理候选人参数的赋值 + */ + const handleCandidateParam = () => { + let candidateParam: undefined | string = undefined + if (!configForm.value) { + return candidateParam + } + switch (configForm.value.candidateStrategy) { + case CandidateStrategy.USER: + candidateParam = configForm.value.userIds!.join(',') + break + case CandidateStrategy.ROLE: + candidateParam = configForm.value.roleIds!.join(',') + break + case CandidateStrategy.POST: + case CandidateStrategy.START_USER_DEPT_POST: + candidateParam = configForm.value.postIds!.join(',') + break + case CandidateStrategy.USER_GROUP: + candidateParam = configForm.value.userGroups!.join(',') + break + case CandidateStrategy.FORM_USER: + case CandidateStrategy.FORM_USER_DEPT_MANAGER: + case CandidateStrategy.FORM_USER_DEPT_DEPUTY_MANAGER: + case CandidateStrategy.FORM_USER_DEPT_SUPERVISOR: + candidateParam = configForm.value.formUser! + break + case CandidateStrategy.FORM_ROLE: + candidateParam = configForm.value.formRole! + break + case CandidateStrategy.EXPRESSION: + candidateParam = configForm.value.expression! + break + case CandidateStrategy.DEPT_MEMBER: + case CandidateStrategy.DEPT_LEADER: + candidateParam = configForm.value.deptIds!.join(',') + break + // 发起人部门负责人 + case CandidateStrategy.START_USER_DEPT_LEADER: + case CandidateStrategy.START_USER_MULTI_LEVEL_DEPT_LEADER: + candidateParam = configForm.value.deptLevel + '' + break + // 指定连续多级部门的负责人 + case CandidateStrategy.MULTI_LEVEL_DEPT_LEADER: { + // 候选人参数格式: | 分隔 。左边为部门(多个部门用 , 分隔)。 右边为部门层级 + const deptIds = configForm.value.deptIds!.join(',') + candidateParam = deptIds.concat('|' + configForm.value.deptLevel + '') + break + } + // 表单内部门的负责人 + case CandidateStrategy.FORM_DEPT_LEADER: { + // 候选人参数格式: | 分隔 。左边为表单内部门字段。 右边为部门层级 + const deptFieldOnForm = configForm.value.formDept! + candidateParam = deptFieldOnForm.concat('|' + configForm.value.deptLevel + '') + break + } + // 表单内部门成员、部门/单位分管领导、经理、副经理均使用部门字段标识。 + case CandidateStrategy.FORM_DEPT_MEMBER: + case CandidateStrategy.FORM_DEPT_COMPANY_SUPERVISOR: + case CandidateStrategy.FORM_DEPT_SUPERVISOR: + case CandidateStrategy.FORM_DEPT_MANAGER: + case CandidateStrategy.FORM_DEPT_DEPUTY_MANAGER: + candidateParam = configForm.value.formDept! + break + // 指定部门的分管领导、经理、副经理 + case CandidateStrategy.DEPT_SUPERVISOR: + case CandidateStrategy.DEPT_MANAGER: + case CandidateStrategy.DEPT_DEPUTY_MANAGER: + candidateParam = configForm.value.deptIds!.join(',') + break + // 指定部门的岗位,候选人参数格式: | 分隔 。左边为部门(多个用 , 分隔)。右边为岗位(多个用 , 分隔) + case CandidateStrategy.DEPT_POST: + candidateParam = `${configForm.value.deptIds!.join(',')}|${configForm.value.postIds!.join(',')}` + break + // 表单内部门的岗位,候选人参数格式: | 分隔 。左边为表单内部门字段。右边为岗位(多个用 , 分隔) + case CandidateStrategy.FORM_DEPT_POST: + candidateParam = `${configForm.value.formDept!}|${configForm.value.postIds!.join(',')}` + break + default: + break + } + return candidateParam + } + /** + * 解析候选人参数 + */ + const parseCandidateParam = ( + candidateStrategy: CandidateStrategy, + candidateParam: string | undefined + ) => { + if (!configForm.value || !candidateParam) { + return + } + switch (candidateStrategy) { + case CandidateStrategy.USER: { + configForm.value.userIds = candidateParam.split(',').map((item) => +item) + break + } + case CandidateStrategy.ROLE: + configForm.value.roleIds = candidateParam.split(',').map((item) => +item) + break + case CandidateStrategy.POST: + case CandidateStrategy.START_USER_DEPT_POST: + configForm.value.postIds = candidateParam.split(',').map((item) => +item) + break + case CandidateStrategy.USER_GROUP: + configForm.value.userGroups = candidateParam.split(',').map((item) => +item) + break + case CandidateStrategy.FORM_USER: + case CandidateStrategy.FORM_USER_DEPT_MANAGER: + case CandidateStrategy.FORM_USER_DEPT_DEPUTY_MANAGER: + case CandidateStrategy.FORM_USER_DEPT_SUPERVISOR: + configForm.value.formUser = candidateParam + break + case CandidateStrategy.FORM_ROLE: + configForm.value.formRole = candidateParam + break + case CandidateStrategy.EXPRESSION: + configForm.value.expression = candidateParam + break + case CandidateStrategy.DEPT_MEMBER: + case CandidateStrategy.DEPT_LEADER: + configForm.value.deptIds = candidateParam.split(',').map((item) => +item) + break + // 发起人部门负责人 + case CandidateStrategy.START_USER_DEPT_LEADER: + case CandidateStrategy.START_USER_MULTI_LEVEL_DEPT_LEADER: + configForm.value.deptLevel = +candidateParam + break + // 指定连续多级部门的负责人 + case CandidateStrategy.MULTI_LEVEL_DEPT_LEADER: { + // 候选人参数格式: | 分隔 。左边为部门(多个部门用 , 分隔)。 右边为部门层级 + const paramArray = candidateParam.split('|') + configForm.value.deptIds = paramArray[0].split(',').map((item) => +item) + configForm.value.deptLevel = +paramArray[1] + break + } + // 表单内的部门负责人 + case CandidateStrategy.FORM_DEPT_LEADER: { + // 候选人参数格式: | 分隔 。左边为表单内的部门字段。 右边为部门层级 + const paramArray = candidateParam.split('|') + configForm.value.formDept = paramArray[0] + configForm.value.deptLevel = +paramArray[1] + break + } + case CandidateStrategy.FORM_DEPT_MEMBER: + case CandidateStrategy.FORM_DEPT_COMPANY_SUPERVISOR: + case CandidateStrategy.FORM_DEPT_SUPERVISOR: + case CandidateStrategy.FORM_DEPT_MANAGER: + case CandidateStrategy.FORM_DEPT_DEPUTY_MANAGER: + configForm.value.formDept = candidateParam + break + case CandidateStrategy.DEPT_SUPERVISOR: + case CandidateStrategy.DEPT_MANAGER: + case CandidateStrategy.DEPT_DEPUTY_MANAGER: + configForm.value.deptIds = candidateParam.split(',').map((item) => +item) + break + case CandidateStrategy.DEPT_POST: { + const paramArray = candidateParam.split('|') + configForm.value.deptIds = paramArray[0].split(',').map((item) => +item) + configForm.value.postIds = (paramArray[1] || '') + .split(',') + .filter(Boolean) + .map((item) => +item) + break + } + case CandidateStrategy.FORM_DEPT_POST: { + const paramArray = candidateParam.split('|') + configForm.value.formDept = paramArray[0] + configForm.value.postIds = (paramArray[1] || '') + .split(',') + .filter(Boolean) + .map((item) => +item) + break + } + default: + break + } + } + return { + configForm, + roleOptions, + postOptions, + userOptions, + userGroupOptions, + deptTreeOptions, + handleCandidateParam, + parseCandidateParam, + getShowText + } +} + +/** + * @description 抽屉配置 + */ +export function useDrawer() { + // 抽屉配置是否可见 + const settingVisible = ref(false) + // 关闭配置抽屉 + const closeDrawer = () => { + settingVisible.value = false + } + // 打开配置抽屉 + const openDrawer = () => { + settingVisible.value = true + } + return { + settingVisible, + closeDrawer, + openDrawer + } +} + +/** + * @description 节点名称配置 + */ +export function useNodeName(nodeType: NodeType) { + // 节点名称 + const nodeName = ref() + // 节点名称输入框 + const showInput = ref(false) + // 点击节点名称编辑图标 + const clickIcon = () => { + showInput.value = true + } + // 节点名称输入框失去焦点 + const blurEvent = () => { + showInput.value = false + nodeName.value = nodeName.value || (NODE_DEFAULT_NAME.get(nodeType) as string) + } + return { + nodeName, + showInput, + clickIcon, + blurEvent + } +} + +export function useNodeName2(node: Ref, nodeType: NodeType) { + // 显示节点名称输入框 + const showInput = ref(false) + // 节点名称输入框失去焦点 + const blurEvent = () => { + showInput.value = false + node.value.name = node.value.name || (NODE_DEFAULT_NAME.get(nodeType) as string) + } + // 点击节点标题进行输入 + const clickTitle = () => { + showInput.value = true + } + return { + showInput, + clickTitle, + blurEvent + } +} + +/** + * @description 根据节点任务状态,获取节点任务状态样式 + */ +export function useTaskStatusClass(taskStatus: TaskStatusEnum | undefined): string { + if (!taskStatus) { + return '' + } + if (taskStatus === TaskStatusEnum.APPROVE) { + return 'status-pass' + } + if (taskStatus === TaskStatusEnum.RUNNING) { + return 'status-running' + } + if (taskStatus === TaskStatusEnum.REJECT) { + return 'status-reject' + } + if (taskStatus === TaskStatusEnum.CANCEL) { + return 'status-cancel' + } + return '' +} + +/** 条件规则右值的录入方式:人员、部门、下拉选项或手工输入 */ +export type ConditionValueKind = 'user' | 'dept' | 'options' | 'input' + +/** + * 按左值字段的组件类型确定右值录入方式:用户选择器选人、部门选择器选部门、 + * 字典选择器和配置了静态选项的下拉/单选/多选给出对应选项,其余手工输入 + */ +export const getConditionValueKind = (field?: Record): ConditionValueKind => { + if (!field) return 'input' + if (field.field === ProcessVariableEnum.START_USER_ID) return 'user' + // 返回名称等非编号值的选择器无法按编号比较,仍手工输入 + if (field.type === 'UserSelect') { + return !field.props?.valueField || field.props.valueField === 'id' ? 'user' : 'input' + } + if (field.type === 'DeptSelect') return field.props?.returnType === 'name' ? 'input' : 'dept' + if (field.type === 'DictSelect') return field.props?.dictType ? 'options' : 'input' + return Array.isArray(field.options) && field.options.length > 0 ? 'options' : 'input' +} + +/** 字典选择器、静态下拉的可选值,值统一为字符串,与条件规则存储一致 */ +export const getConditionValueOptions = ( + field?: Record +): Array<{ label: string; value: string }> => { + if (!field) return [] + const options = + field.type === 'DictSelect' ? getDictOptions(field.props?.dictType) : field.options || [] + return options.map((item: Record) => ({ + label: String(item.label ?? item.value), + value: String(item.value) + })) +} + +/** 条件组件文字展示 */ +/** + * @description 条件规则右值的展示文本:内置用户组、岗位、角色、主岗部门显示名称而非编号 + */ +export function useConditionRightSideText(fieldOptions: Array> = []) { + const roleOptions = inject>('roleList', ref([])) + const postOptions = inject>('postList', ref([])) + const deptOptions = inject>('deptList', ref([])) + const userOptions = inject>('userList', ref([])) + const userGroupOptions = inject>('userGroupList', ref([])) + const findName = (options: Array<{ id?: number; name: string }> | undefined, id: string) => + options?.find((item) => String(item.id) === id)?.name ?? id + // 表单字段按组件类型显示人员、部门或选项名称 + const getFieldValueText = (rule: ConditionRule): string => { + const field = fieldOptions.find((item) => item.field === rule.leftSide) + switch (getConditionValueKind(field)) { + case 'user': + return userOptions.value?.find((item) => String(item.id) === rule.rightSide)?.nickname ?? + rule.rightSide + case 'dept': + return findName(deptOptions.value, rule.rightSide) + case 'options': + return ( + getConditionValueOptions(field).find((item) => item.value === rule.rightSide)?.label ?? + rule.rightSide + ) + default: + return rule.rightSide + } + } + return (rule: ConditionRule): string => { + switch (rule.leftSide) { + case ProcessVariableEnum.ROLE: + return findName(roleOptions.value, rule.rightSide) + case ProcessVariableEnum.USER_GROUP: + return findName(userGroupOptions.value, rule.rightSide) + case ProcessVariableEnum.POST: + return findName(postOptions.value, rule.rightSide) + case ProcessVariableEnum.MAIN_DEPT: + return ( + findName(deptOptions.value, rule.rightSide) + (rule.includeChildren ? '(含子部门)' : '') + ) + default: + return getFieldValueText(rule) + } + } +} + +export function getConditionShowText( + conditionType: ConditionType | undefined, + conditionExpression: string | undefined, + conditionGroups: ConditionGroup | undefined, + fieldOptions: Array>, + getRightSideText: (rule: ConditionRule) => string = (rule) => rule.rightSide +) { + let showText = '' + if (conditionType === ConditionType.EXPRESSION) { + if (conditionExpression) { + showText = `表达式:${conditionExpression}` + } + } + if (conditionType === ConditionType.RULE) { + // 条件组是否为与关系 + const groupAnd = conditionGroups?.and + let warningMessage: undefined | string = undefined + const conditionGroup = conditionGroups?.conditions.map((item) => { + return ( + '(' + + item.rules + .map((rule) => { + if (rule.leftSide && rule.rightSide) { + return ( + getRuleLeftSideTitle(fieldOptions, rule) + + ' ' + + getOpName(rule.opCode) + + ' ' + + getRightSideText(rule) + ) + } else { + // 有一条规则不完善。提示错误 + warningMessage = '请完善条件规则' + return '' + } + }) + .join(item.and ? ' 且 ' : ' 或 ') + + ' ) ' + ) + }) + if (warningMessage) { + showText = '' + } else { + showText = conditionGroup!.join(groupAnd ? ' 且 ' : ' 或 ') + } + } + return showText +} + +/** 条件左值名称:判定对象为表单人员时显示为“申请人·岗位” */ +const getRuleLeftSideTitle = (fieldOptions: Array>, rule: ConditionRule) => { + const title = getFormFieldTitle(fieldOptions, rule.leftSide) + if (!rule.subjectField || !isBuiltInIdentityVariable(rule.leftSide)) { + return title + } + const subjectTitle = getFormFieldTitle(fieldOptions, rule.subjectField) ?? rule.subjectField + return `${subjectTitle}·${title?.replace('(内置)', '')}` +} + +/** 获取表单字段名称*/ +const getFormFieldTitle = (fieldOptions: Array>, field: string) => { + const item = fieldOptions.find((item) => item.field === field) + // 字段已移除或暂未加载时显示字段编码,避免摘要中出现 undefined。 + return item?.title || field +} + +/** 获取操作符名称 */ +const getOpName = (opCode: string): string => { + const opName = COMPARISON_OPERATORS.find((item) => item.value === opCode) + return opName?.label ?? '' +} diff --git a/src/components/SimpleProcessDesignerV2/src/nodes-config/ChildProcessNodeConfig.vue b/src/components/SimpleProcessDesignerV2/src/nodes-config/ChildProcessNodeConfig.vue new file mode 100644 index 0000000..c329720 --- /dev/null +++ b/src/components/SimpleProcessDesignerV2/src/nodes-config/ChildProcessNodeConfig.vue @@ -0,0 +1,620 @@ + + + + diff --git a/src/components/SimpleProcessDesignerV2/src/nodes-config/ConditionNodeConfig.vue b/src/components/SimpleProcessDesignerV2/src/nodes-config/ConditionNodeConfig.vue new file mode 100644 index 0000000..69952d0 --- /dev/null +++ b/src/components/SimpleProcessDesignerV2/src/nodes-config/ConditionNodeConfig.vue @@ -0,0 +1,224 @@ + + + + diff --git a/src/components/SimpleProcessDesignerV2/src/nodes-config/CopyTaskNodeConfig.vue b/src/components/SimpleProcessDesignerV2/src/nodes-config/CopyTaskNodeConfig.vue new file mode 100644 index 0000000..c9ad1a6 --- /dev/null +++ b/src/components/SimpleProcessDesignerV2/src/nodes-config/CopyTaskNodeConfig.vue @@ -0,0 +1,470 @@ + + + + diff --git a/src/components/SimpleProcessDesignerV2/src/nodes-config/DelayTimerNodeConfig.vue b/src/components/SimpleProcessDesignerV2/src/nodes-config/DelayTimerNodeConfig.vue new file mode 100644 index 0000000..a947ce1 --- /dev/null +++ b/src/components/SimpleProcessDesignerV2/src/nodes-config/DelayTimerNodeConfig.vue @@ -0,0 +1,190 @@ + + + + diff --git a/src/components/SimpleProcessDesignerV2/src/nodes-config/RouterNodeConfig.vue b/src/components/SimpleProcessDesignerV2/src/nodes-config/RouterNodeConfig.vue new file mode 100644 index 0000000..c33c4c8 --- /dev/null +++ b/src/components/SimpleProcessDesignerV2/src/nodes-config/RouterNodeConfig.vue @@ -0,0 +1,206 @@ + + diff --git a/src/components/SimpleProcessDesignerV2/src/nodes-config/StartUserNodeConfig.vue b/src/components/SimpleProcessDesignerV2/src/nodes-config/StartUserNodeConfig.vue new file mode 100644 index 0000000..40a4304 --- /dev/null +++ b/src/components/SimpleProcessDesignerV2/src/nodes-config/StartUserNodeConfig.vue @@ -0,0 +1,245 @@ + + + + diff --git a/src/components/SimpleProcessDesignerV2/src/nodes-config/TriggerNodeConfig.vue b/src/components/SimpleProcessDesignerV2/src/nodes-config/TriggerNodeConfig.vue new file mode 100644 index 0000000..0c6c0b0 --- /dev/null +++ b/src/components/SimpleProcessDesignerV2/src/nodes-config/TriggerNodeConfig.vue @@ -0,0 +1,544 @@ + + + + diff --git a/src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue b/src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue new file mode 100644 index 0000000..4a3a6c9 --- /dev/null +++ b/src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue @@ -0,0 +1,1201 @@ + + + + + diff --git a/src/components/SimpleProcessDesignerV2/src/nodes-config/components/Condition.vue b/src/components/SimpleProcessDesignerV2/src/nodes-config/components/Condition.vue new file mode 100644 index 0000000..4417ff8 --- /dev/null +++ b/src/components/SimpleProcessDesignerV2/src/nodes-config/components/Condition.vue @@ -0,0 +1,341 @@ + + + + + diff --git a/src/components/SimpleProcessDesignerV2/src/nodes-config/components/ConditionDialog.vue b/src/components/SimpleProcessDesignerV2/src/nodes-config/components/ConditionDialog.vue new file mode 100644 index 0000000..2f34394 --- /dev/null +++ b/src/components/SimpleProcessDesignerV2/src/nodes-config/components/ConditionDialog.vue @@ -0,0 +1,375 @@ + + + + + diff --git a/src/components/SimpleProcessDesignerV2/src/nodes-config/components/ConditionRightSide.vue b/src/components/SimpleProcessDesignerV2/src/nodes-config/components/ConditionRightSide.vue new file mode 100644 index 0000000..b15758a --- /dev/null +++ b/src/components/SimpleProcessDesignerV2/src/nodes-config/components/ConditionRightSide.vue @@ -0,0 +1,137 @@ + + + diff --git a/src/components/SimpleProcessDesignerV2/src/nodes-config/components/HttpRequestParamSetting.vue b/src/components/SimpleProcessDesignerV2/src/nodes-config/components/HttpRequestParamSetting.vue new file mode 100644 index 0000000..7d617ba --- /dev/null +++ b/src/components/SimpleProcessDesignerV2/src/nodes-config/components/HttpRequestParamSetting.vue @@ -0,0 +1,199 @@ + + + + diff --git a/src/components/SimpleProcessDesignerV2/src/nodes-config/components/HttpRequestSetting.vue b/src/components/SimpleProcessDesignerV2/src/nodes-config/components/HttpRequestSetting.vue new file mode 100644 index 0000000..3cc9728 --- /dev/null +++ b/src/components/SimpleProcessDesignerV2/src/nodes-config/components/HttpRequestSetting.vue @@ -0,0 +1,138 @@ + + + + diff --git a/src/components/SimpleProcessDesignerV2/src/nodes-config/components/UserTaskListener.vue b/src/components/SimpleProcessDesignerV2/src/nodes-config/components/UserTaskListener.vue new file mode 100644 index 0000000..728f568 --- /dev/null +++ b/src/components/SimpleProcessDesignerV2/src/nodes-config/components/UserTaskListener.vue @@ -0,0 +1,88 @@ + + + diff --git a/src/components/SimpleProcessDesignerV2/src/nodes/ChildProcessNode.vue b/src/components/SimpleProcessDesignerV2/src/nodes/ChildProcessNode.vue new file mode 100644 index 0000000..0b36244 --- /dev/null +++ b/src/components/SimpleProcessDesignerV2/src/nodes/ChildProcessNode.vue @@ -0,0 +1,106 @@ + + + + + diff --git a/src/components/SimpleProcessDesignerV2/src/nodes/CopyTaskNode.vue b/src/components/SimpleProcessDesignerV2/src/nodes/CopyTaskNode.vue new file mode 100644 index 0000000..8b97ee5 --- /dev/null +++ b/src/components/SimpleProcessDesignerV2/src/nodes/CopyTaskNode.vue @@ -0,0 +1,97 @@ + + + + diff --git a/src/components/SimpleProcessDesignerV2/src/nodes/DelayTimerNode.vue b/src/components/SimpleProcessDesignerV2/src/nodes/DelayTimerNode.vue new file mode 100644 index 0000000..ad6795a --- /dev/null +++ b/src/components/SimpleProcessDesignerV2/src/nodes/DelayTimerNode.vue @@ -0,0 +1,97 @@ + + + + diff --git a/src/components/SimpleProcessDesignerV2/src/nodes/EndEventNode.vue b/src/components/SimpleProcessDesignerV2/src/nodes/EndEventNode.vue new file mode 100644 index 0000000..fc7af27 --- /dev/null +++ b/src/components/SimpleProcessDesignerV2/src/nodes/EndEventNode.vue @@ -0,0 +1,102 @@ + + + diff --git a/src/components/SimpleProcessDesignerV2/src/nodes/ExclusiveNode.vue b/src/components/SimpleProcessDesignerV2/src/nodes/ExclusiveNode.vue new file mode 100644 index 0000000..79ea71f --- /dev/null +++ b/src/components/SimpleProcessDesignerV2/src/nodes/ExclusiveNode.vue @@ -0,0 +1,244 @@ + + + + + diff --git a/src/components/SimpleProcessDesignerV2/src/nodes/InclusiveNode.vue b/src/components/SimpleProcessDesignerV2/src/nodes/InclusiveNode.vue new file mode 100644 index 0000000..f9cebf8 --- /dev/null +++ b/src/components/SimpleProcessDesignerV2/src/nodes/InclusiveNode.vue @@ -0,0 +1,248 @@ + + + + + diff --git a/src/components/SimpleProcessDesignerV2/src/nodes/ParallelNode.vue b/src/components/SimpleProcessDesignerV2/src/nodes/ParallelNode.vue new file mode 100644 index 0000000..1bcbcd0 --- /dev/null +++ b/src/components/SimpleProcessDesignerV2/src/nodes/ParallelNode.vue @@ -0,0 +1,184 @@ + + + diff --git a/src/components/SimpleProcessDesignerV2/src/nodes/RouterNode.vue b/src/components/SimpleProcessDesignerV2/src/nodes/RouterNode.vue new file mode 100644 index 0000000..3997c09 --- /dev/null +++ b/src/components/SimpleProcessDesignerV2/src/nodes/RouterNode.vue @@ -0,0 +1,97 @@ + + + + diff --git a/src/components/SimpleProcessDesignerV2/src/nodes/StartUserNode.vue b/src/components/SimpleProcessDesignerV2/src/nodes/StartUserNode.vue new file mode 100644 index 0000000..43998b1 --- /dev/null +++ b/src/components/SimpleProcessDesignerV2/src/nodes/StartUserNode.vue @@ -0,0 +1,154 @@ + + + diff --git a/src/components/SimpleProcessDesignerV2/src/nodes/TriggerNode.vue b/src/components/SimpleProcessDesignerV2/src/nodes/TriggerNode.vue new file mode 100644 index 0000000..00f1c82 --- /dev/null +++ b/src/components/SimpleProcessDesignerV2/src/nodes/TriggerNode.vue @@ -0,0 +1,97 @@ + + + + diff --git a/src/components/SimpleProcessDesignerV2/src/nodes/UserTaskNode.vue b/src/components/SimpleProcessDesignerV2/src/nodes/UserTaskNode.vue new file mode 100644 index 0000000..992e503 --- /dev/null +++ b/src/components/SimpleProcessDesignerV2/src/nodes/UserTaskNode.vue @@ -0,0 +1,181 @@ + + + diff --git a/src/components/SimpleProcessDesignerV2/src/utils.ts b/src/components/SimpleProcessDesignerV2/src/utils.ts new file mode 100644 index 0000000..f506164 --- /dev/null +++ b/src/components/SimpleProcessDesignerV2/src/utils.ts @@ -0,0 +1,101 @@ +import { TimeUnitType, ApproveType, APPROVE_TYPE, NodeType, SimpleFlowNode } from './consts' + +// 获取条件节点默认的名称 +export const getDefaultConditionNodeName = (index: number, defaultFlow: boolean | undefined): string => { + if (defaultFlow) { + return '其它情况' + } + return '条件' + (index + 1) +} + +// 获取包容分支条件节点默认的名称 +export const getDefaultInclusiveConditionNodeName = (index: number, defaultFlow: boolean | undefined): string => { + if (defaultFlow) { + return '其它情况' + } + return '包容条件' + (index + 1) +} + +export const convertTimeUnit = (strTimeUnit: string) => { + if (strTimeUnit === 'M') { + return TimeUnitType.MINUTE + } + if (strTimeUnit === 'H') { + return TimeUnitType.HOUR + } + if (strTimeUnit === 'D') { + return TimeUnitType.DAY + } + return TimeUnitType.HOUR +} + +export const getApproveTypeText = (approveType: ApproveType): string => { + let approveTypeText = '' + APPROVE_TYPE.forEach((item) => { + if (item.value === approveType) { + approveTypeText = item.label + return + } + }) + return approveTypeText +} + +/** + * 收集配置不完善的节点:需要配置的节点以 showText 为空视为未配置。 + * 发起人、结束节点不校验;默认分支和并行分支头无需条件,但仍递归校验分支内的节点。 + * + * @param node 流程节点树的根节点 + * @param errorNodes 收集结果,递归时复用 + * @return 未配置完整的节点 + */ +export const collectInvalidNodes = ( + node: SimpleFlowNode | undefined, + errorNodes: SimpleFlowNode[] = [] +): SimpleFlowNode[] => { + if (!node) { + return errorNodes + } + const { type, showText, conditionNodes } = node + if (type === NodeType.END_EVENT_NODE) { + return errorNodes + } + if ( + type === NodeType.USER_TASK_NODE || + type === NodeType.TRANSACTOR_NODE || + type === NodeType.COPY_TASK_NODE || + (type === NodeType.CONDITION_NODE && !node.conditionSetting?.defaultFlow) + ) { + if (!showText) { + errorNodes.push(node) + } + } + if ( + type === NodeType.CONDITION_BRANCH_NODE || + type === NodeType.PARALLEL_BRANCH_NODE || + type === NodeType.INCLUSIVE_BRANCH_NODE + ) { + // 并行分支全部执行,跳过无需配置条件的分支头,继续校验分支内的节点。 + conditionNodes?.forEach((item) => + collectInvalidNodes(type === NodeType.PARALLEL_BRANCH_NODE ? item.childNode : item, errorNodes) + ) + } + collectInvalidNodes(node.childNode, errorNodes) + return errorNodes +} + +/** + * 按“谁可以发起”生成发起人节点的展示文本,未指定人员和部门时为全员可发起。 + * + * @param startUserIds 可发起的人员编号 + * @param startDeptIds 可发起的部门编号 + */ +export const getStartUserShowText = (startUserIds?: any[], startDeptIds?: any[]): string => { + const parts: string[] = [] + if (startUserIds?.length) { + parts.push(`指定${startUserIds.length}名人员`) + } + if (startDeptIds?.length) { + parts.push(`指定${startDeptIds.length}个部门`) + } + return parts.length ? `${parts.join('、')}可发起` : '全员' +} diff --git a/src/components/SimpleProcessDesignerV2/theme/iconfont.ttf b/src/components/SimpleProcessDesignerV2/theme/iconfont.ttf new file mode 100644 index 0000000..06f4e31 Binary files /dev/null and b/src/components/SimpleProcessDesignerV2/theme/iconfont.ttf differ diff --git a/src/components/SimpleProcessDesignerV2/theme/iconfont.woff b/src/components/SimpleProcessDesignerV2/theme/iconfont.woff new file mode 100644 index 0000000..0724e75 Binary files /dev/null and b/src/components/SimpleProcessDesignerV2/theme/iconfont.woff differ diff --git a/src/components/SimpleProcessDesignerV2/theme/iconfont.woff2 b/src/components/SimpleProcessDesignerV2/theme/iconfont.woff2 new file mode 100644 index 0000000..c904bb6 Binary files /dev/null and b/src/components/SimpleProcessDesignerV2/theme/iconfont.woff2 differ diff --git a/src/components/SimpleProcessDesignerV2/theme/simple-process-designer.scss b/src/components/SimpleProcessDesignerV2/theme/simple-process-designer.scss new file mode 100644 index 0000000..359f1a8 --- /dev/null +++ b/src/components/SimpleProcessDesignerV2/theme/simple-process-designer.scss @@ -0,0 +1,840 @@ +// 配置节点头部 +.config-header { + display: flex; + flex-direction: column; + + .node-name { + display: flex; + height: 24px; + line-height: 24px; + font-size: 16px; + cursor: pointer; + align-items: center; + } + + .divide-line { + width: 100%; + height: 1px; + margin-top: 16px; + background: #eee; + } + + .config-editable-input { + height: 24px; + max-width: 510px; + font-size: 16px; + line-height: 24px; + border: 1px solid #d9d9d9; + border-radius: 4px; + transition: all 0.3s; + + &:focus { + border-color: #40a9ff; + outline: 0; + box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2); + } + } +} + +// 表单字段权限 +.field-setting-pane { + display: flex; + flex-direction: column; + font-size: 14px; + + .field-setting-desc { + padding-right: 8px; + margin-bottom: 16px; + font-size: 16px; + font-weight: 700; + } + + .field-permit-title { + display: flex; + justify-content: space-between; + align-items: center; + height: 45px; + padding-left: 12px; + line-height: 45px; + background-color: #f8fafc0a; + border: 1px solid #1f38581a; + + .first-title { + text-align: left !important; + } + + .other-titles { + display: flex; + // 权限表头保持列宽,与下方单选、必填列对齐 + flex-shrink: 0; + justify-content: space-between; + } + + .setting-title-label { + display: inline-block; + width: 110px; + padding: 5px 0; + font-size: 13px; + font-weight: 700; + color: #000; + text-align: center; + } + } + + .field-setting-item { + align-items: center; + display: flex; + justify-content: space-between; + height: 38px; + padding-left: 12px; + border: 1px solid #1f38581a; + border-top: 0; + + .field-setting-item-label { + display: inline-block; + // 字段名吸收可用宽度变化,避免挤压权限列 + flex: 1; + min-width: 0; + min-height: 16px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + cursor: text; + } + + .field-setting-item-group { + display: flex; + // 覆盖单选组默认换行,避免窄屏或滚动条导致单选框错位 + flex-wrap: nowrap; + flex-shrink: 0; + justify-content: space-between; + + .item-radio-wrap { + display: inline-block; + width: 110px; + text-align: center; + } + } + + // 节点必填勾选列,与权限单选列等宽 + > .item-radio-wrap { + display: inline-block; + flex-shrink: 0; + width: 110px; + text-align: center; + } + } +} + +// 节点连线气泡卡片样式 +.handler-item-wrapper { + width: 320px; + display: flex; + flex-wrap: wrap; + cursor: pointer; + + .handler-item { + display: flex; + flex-direction: column; + align-items: center; + margin-top: 12px; + } + + .handler-item-icon { + width: 50px; + height: 50px; + background: #fff; + border: 1px solid #e2e2e2; + border-radius: 50%; + user-select: none; + text-align: center; + + &:hover { + background: #e2e2e2; + box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1); + } + + .icon-size { + font-size: 25px; + line-height: 50px; + } + } + + .approve { + color: #ff943e; + } + + .copy { + color: #3296fa; + } + + .condition { + color: #67c23a; + } + + .parallel { + color: #626aef; + } + + .inclusive { + color: #345da2; + } + + .delay { + color: #e47470; + } + + .trigger { + color: #3373d2; + } + + .router { + color: #ca3a31 + } + + .transactor { + color: #330099; + } + + .child-process { + color: #996633; + } + + .async-child-process { + color: #006666; + } + + .handler-item-text { + margin-top: 4px; + width: 80px; + text-align: center; + font-size: 13px; + } +} +// Simple 流程模型样式 +.simple-process-model-container { + height: 100%; + padding-top: 32px; + background-color: #fafafa; + overflow-x: auto; + width: 100%; + + .simple-process-model { + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + transform-origin: 50% 0 0; + min-width: fit-content; + transform: scale(1); + background: url(@/assets/svgs/bpm/simple-process-bg.svg) 0 0 repeat; + // 节点容器 定义节点宽度 + .node-container { + width: 200px; + } + // 节点 + .node-box { + position: relative; + display: flex; + min-height: 70px; + padding: 5px 10px 8px; + cursor: pointer; + background-color: #fff; + flex-direction: column; + border: 2px solid transparent; + border-radius: 8px; + box-shadow: 0 1px 4px 0 rgb(10 30 65 / 16%); + transition: all 0.1s cubic-bezier(0.645, 0.045, 0.355, 1); + + &.status-pass { + background-color: #a9da90; + border-color: #67c23a; + } + + &.status-pass:hover { + border-color: #67c23a; + } + + &.status-running { + background-color: #e7f0fe; + border-color: #5a9cf8; + } + + &.status-running:hover { + border-color: #5a9cf8; + } + + &.status-reject { + background-color: #f6e5e5; + border-color: #e47470; + } + + &.status-reject:hover { + border-color: #e47470; + } + + &:hover { + border-color: #0089ff; + + .node-toolbar { + opacity: 1; + } + + .branch-node-move { + display: flex; + } + } + + // 普通节点标题 + .node-title-container { + display: flex; + padding: 4px; + cursor: pointer; + border-radius: 4px 4px 0 0; + align-items: center; + + .node-title-icon { + display: flex; + align-items: center; + + &.user-task { + color: #ff943e; + } + + &.copy-task { + color: #3296fa; + } + + &.start-user { + color: #676565; + } + + &.delay-node { + color: #e47470; + } + + &.trigger-node { + color: #3373d2; + } + + &.router-node { + color: #ca3a31 + } + + &.transactor-task { + color: #330099; + } + + &.child-process { + color: #996633; + } + + &.async-child-process { + color: #006666; + } + } + + .node-title { + margin-left: 4px; + overflow: hidden; + font-size: 14px; + font-weight: 600; + line-height: 18px; + color: #1f1f1f; + text-overflow: ellipsis; + white-space: nowrap; + + &:hover { + border-bottom: 1px dashed #f60; + } + } + } + + // 条件节点标题 + .branch-node-title-container { + display: flex; + padding: 4px 0; + cursor: pointer; + border-radius: 4px 4px 0 0; + align-items: center; + justify-content: space-between; + + .input-max-width { + max-width: 115px !important; + } + + .branch-title { + overflow: hidden; + font-size: 13px; + font-weight: 600; + color: #f60; + text-overflow: ellipsis; + white-space: nowrap; + + &:hover { + border-bottom: 1px dashed #000; + } + } + + .branch-priority { + min-width: 50px; + font-size: 12px; + } + } + + .node-content { + display: flex; + min-height: 32px; + padding: 4px 8px; + margin-top: 4px; + line-height: 32px; + justify-content: space-between; + align-items: center; + color: #111f2c; + background: rgb(0 0 0 / 3%); + border-radius: 4px; + + .node-text { + display: -webkit-box; + overflow: hidden; + font-size: 14px; + line-height: 24px; + text-overflow: ellipsis; + word-break: break-all; + -webkit-line-clamp: 2; /* 这将限制文本显示为两行 */ + -webkit-box-orient: vertical; + } + } + + //条件节点内容 + .branch-node-content { + display: flex; + min-height: 32px; + padding: 4px 0; + margin-top: 4px; + line-height: 32px; + align-items: center; + color: #111f2c; + border-radius: 4px; + + .branch-node-text { + overflow: hidden; + font-size: 12px; + line-height: 24px; + text-overflow: ellipsis; + word-break: break-all; + -webkit-line-clamp: 2; /* 这将限制文本显示为两行 */ + -webkit-box-orient: vertical; + } + } + + // 节点操作 :删除 + .node-toolbar { + position: absolute; + top: -20px; + right: 0; + display: flex; + opacity: 0; + + .toolbar-icon { + text-align: center; + vertical-align: middle; + } + } + + // 条件节点左右移动 + .branch-node-move { + position: absolute; + display: none; + width: 10px; + height: 100%; + cursor: pointer; + align-items: center; + justify-content: center; + } + + .move-node-left { + top: 0; + left: -2px; + background: rgb(126 134 142 / 8%); + border-bottom-left-radius: 8px; + border-top-left-radius: 8px; + } + + .move-node-right { + top: 0; + right: -2px; + background: rgb(126 134 142 / 8%); + border-top-right-radius: 6px; + border-bottom-right-radius: 6px; + } + } + + .node-config-error { + border-color: #ff5219 !important; + } + // 普通节点包装 + .node-wrapper { + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + } + // 节点连线处理 + .node-handler-wrapper { + position: relative; + display: flex; + height: 70px; + align-items: center; + user-select: none; + justify-content: center; + flex-direction: column; + + &::before { + position: absolute; + top: 0; + z-index: 0; + width: 2px; + height: 100%; + margin: auto; + background-color: #dedede; + content: ''; + } + + .node-handler { + .add-icon { + position: relative; + top: -5px; + display: flex; + width: 25px; + height: 25px; + color: #fff; + cursor: pointer; + background-color: #0089ff; + border-radius: 50%; + align-items: center; + justify-content: center; + + &:hover { + transform: scale(1.1); + } + } + } + + .node-handler-arrow { + position: absolute; + bottom: 0; + left: 50%; + display: flex; + transform: translateX(-50%); + } + } + + // 条件节点包装 + .branch-node-wrapper { + position: relative; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + margin-top: 16px; + + .branch-node-container { + position: relative; + display: flex; + min-width: fit-content; + + &::before { + position: absolute; + left: 50%; + width: 4px; + height: 100%; + background-color: #fafafa; + content: ''; + transform: translate(-50%); + } + + .branch-node-add { + position: absolute; + top: -18px; + left: 50%; + z-index: 1; + height: 36px; + padding: 0 10px; + font-size: 12px; + line-height: 36px; + border: 2px solid #dedede; + border-radius: 18px; + transform: translateX(-50%); + transform-origin: center center; + } + + .branch-node-readonly { + position: absolute; + top: -18px; + left: 50%; + z-index: 1; + display: flex; + width: 36px; + height: 36px; + background-color: #fff; + border: 2px solid #dedede; + border-radius: 50%; + transform: translateX(-50%); + align-items: center; + justify-content: center; + transform-origin: center center; + + &.status-pass { + background-color: #e9f4e2; + border-color: #6bb63c; + } + + &.status-pass:hover { + border-color: #6bb63c; + } + + .icon-size { + font-size: 22px; + &.condition { + color: #67c23a; + } + &.parallel { + color: #626aef; + } + &.inclusive { + color: #345da2; + } + } + } + + .branch-node-item { + position: relative; + display: flex; + flex-direction: column; + align-items: center; + min-width: 280px; + padding: 40px 40px 0; + background: transparent; + border-top: 2px solid #dedede; + border-bottom: 2px solid #dedede; + flex-shrink: 0; + + &::before { + position: absolute; + width: 2px; + height: 100%; + margin: auto; + inset: 0; + background-color: #dedede; + content: ''; + } + } + // 覆盖条件节点第一个节点左上角的线 + .branch-line-first-top { + position: absolute; + top: -5px; + left: -1px; + width: 50%; + height: 7px; + background-color: #fafafa; + content: ''; + } + // 覆盖条件节点第一个节点左下角的线 + .branch-line-first-bottom { + position: absolute; + bottom: -5px; + left: -1px; + width: 50%; + height: 7px; + background-color: #fafafa; + content: ''; + } + // 覆盖条件节点最后一个节点右上角的线 + .branch-line-last-top { + position: absolute; + top: -5px; + right: -1px; + width: 50%; + height: 7px; + background-color: #fafafa; + content: ''; + } + // 覆盖条件节点最后一个节点右下角的线 + .branch-line-last-bottom { + position: absolute; + right: -1px; + bottom: -5px; + width: 50%; + height: 7px; + background-color: #fafafa; + content: ''; + } + } + } + + .node-fixed-name { + display: inline-block; + width: auto; + padding: 0 4px; + overflow: hidden; + text-align: center; + text-overflow: ellipsis; + white-space: nowrap; + } + // 开始节点包装 + .start-node-wrapper { + position: relative; + margin-top: 16px; + + .start-node-container { + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + + .start-node-box { + display: flex; + justify-content: center; + align-items: center; + width: 90px; + height: 36px; + padding: 3px 4px; + color: #212121; + cursor: pointer; + background: #fafafa; + border-radius: 30px; + box-shadow: 0 1px 5px 0 rgb(10 30 65 / 8%); + box-sizing: border-box; + } + } + } + + // 结束节点包装 + .end-node-wrapper { + margin-bottom: 16px; + + .end-node-box { + display: flex; + width: 80px; + height: 36px; + color: #212121; + border: 2px solid #fafafa; + border-radius: 30px; + box-shadow: 0 1px 5px 0 rgb(10 30 65 / 8%); + box-sizing: border-box; + justify-content: center; + align-items: center; + + &.status-pass { + background-color: #a9da90; + border-color: #6bb63c; + } + + &.status-pass:hover { + border-color: #6bb63c; + } + + &.status-reject { + background-color: #f6e5e5; + border-color: #e47470; + } + + &.status-reject:hover { + border-color: #e47470; + } + + &.status-cancel { + background-color: #eaeaeb; + border-color: #919398; + } + + &.status-cancel:hover { + border-color: #919398; + } + } + } + + // 可编辑的 title 输入框 + .editable-title-input { + height: 20px; + max-width: 145px; + margin-left: 4px; + font-size: 12px; + line-height: 20px; + border: 1px solid #d9d9d9; + border-radius: 4px; + transition: all 0.3s; + + &:focus { + border-color: #40a9ff; + outline: 0; + box-shadow: 0 0 0 2px rgb(24 144 255 / 20%); + } + } + } +} + +// iconfont 样式 +@font-face { + font-family: "iconfont"; /* Project id 4495938 */ + src: url('iconfont.woff2?t=1737639517142') format('woff2'), + url('iconfont.woff?t=1737639517142') format('woff'), + url('iconfont.ttf?t=1737639517142') format('truetype'); +} + +.iconfont { + font-family: "iconfont" !important; + font-size: 16px; + font-style: normal; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.icon-trigger:before { + content: "\e6d3"; +} + +.icon-router:before { + content: "\e6b2"; +} + +.icon-delay:before { + content: "\e600"; +} + +.icon-start-user:before { + content: "\e679"; +} + +.icon-inclusive:before { + content: "\e602"; +} + +.icon-copy:before { + content: "\e7eb"; +} + +.icon-transactor:before { + content: "\e61c"; +} + +.icon-exclusive:before { + content: "\e717"; +} + +.icon-approve:before { + content: "\e715"; +} + +.icon-parallel:before { + content: "\e688"; +} + +.icon-async-child-process:before { + content: "\e6f2"; +} + +.icon-child-process:before { + content: "\e6c1"; +} diff --git a/src/components/Sticky/index.ts b/src/components/Sticky/index.ts new file mode 100644 index 0000000..5e1de45 --- /dev/null +++ b/src/components/Sticky/index.ts @@ -0,0 +1,3 @@ +import Sticky from './src/Sticky.vue' + +export { Sticky } diff --git a/src/components/Sticky/src/Sticky.vue b/src/components/Sticky/src/Sticky.vue new file mode 100644 index 0000000..28ecbcb --- /dev/null +++ b/src/components/Sticky/src/Sticky.vue @@ -0,0 +1,143 @@ + + diff --git a/src/components/Table/index.ts b/src/components/Table/index.ts new file mode 100644 index 0000000..689f64a --- /dev/null +++ b/src/components/Table/index.ts @@ -0,0 +1,12 @@ +import Table from './src/Table.vue' +import { ElTable } from 'element-plus' +import { TableSetPropsType } from '@/types/table' + +export interface TableExpose { + setProps: (props: Recordable) => void + setColumn: (columnProps: TableSetPropsType[]) => void + selections: Recordable[] + elTableRef: ComponentRef +} + +export { Table } diff --git a/src/components/Table/src/Table.vue b/src/components/Table/src/Table.vue new file mode 100644 index 0000000..94bdb8d --- /dev/null +++ b/src/components/Table/src/Table.vue @@ -0,0 +1,304 @@ + + diff --git a/src/components/Table/src/helper.ts b/src/components/Table/src/helper.ts new file mode 100644 index 0000000..d8b34a8 --- /dev/null +++ b/src/components/Table/src/helper.ts @@ -0,0 +1,8 @@ +export const setIndex = (reserveIndex: boolean, index: number, size: number, current: number) => { + const newIndex = index + 1 + if (reserveIndex) { + return size * (current - 1) + newIndex + } else { + return newIndex + } +} diff --git a/src/components/Table/src/types.ts b/src/components/Table/src/types.ts new file mode 100644 index 0000000..1c7ff76 --- /dev/null +++ b/src/components/Table/src/types.ts @@ -0,0 +1,26 @@ +import { Pagination, TableColumn } from '@/types/table' + +export type TableProps = { + pageSize?: number + currentPage?: number + // 是否多选 + selection?: boolean + // 是否所有的超出隐藏,优先级低于schema中的showOverflowTooltip, + showOverflowTooltip?: boolean + // 表头 + columns?: TableColumn[] + // 是否展示分页 + pagination?: Pagination | undefined + // 仅对 type=selection 的列有效,类型为 Boolean,为 true 则会在数据更新之后保留之前选中的数据(需指定 row-key) + reserveSelection?: boolean + // 加载状态 + loading?: boolean + // 是否叠加索引 + reserveIndex?: boolean + // 对齐方式 + align?: 'left' | 'center' | 'right' + // 表头对齐方式 + headerAlign?: 'left' | 'center' | 'right' + data?: Recordable + expand?: boolean +} & Recordable diff --git a/src/components/Tooltip/index.ts b/src/components/Tooltip/index.ts new file mode 100644 index 0000000..ab66ddf --- /dev/null +++ b/src/components/Tooltip/index.ts @@ -0,0 +1,3 @@ +import Tooltip from './src/Tooltip.vue' + +export { Tooltip } diff --git a/src/components/Tooltip/src/Tooltip.vue b/src/components/Tooltip/src/Tooltip.vue new file mode 100644 index 0000000..1a2e09c --- /dev/null +++ b/src/components/Tooltip/src/Tooltip.vue @@ -0,0 +1,17 @@ + + diff --git a/src/components/UploadFile/index.ts b/src/components/UploadFile/index.ts new file mode 100644 index 0000000..fe0e58d --- /dev/null +++ b/src/components/UploadFile/index.ts @@ -0,0 +1,6 @@ +import UploadImg from './src/UploadImg.vue' +import UploadImgs from './src/UploadImgs.vue' +import UploadFile from './src/UploadFile.vue' +import UploadButton from './src/UploadButton.vue' + +export { UploadImg, UploadImgs, UploadFile, UploadButton } diff --git a/src/components/UploadFile/src/UploadButton.vue b/src/components/UploadFile/src/UploadButton.vue new file mode 100644 index 0000000..f06c172 --- /dev/null +++ b/src/components/UploadFile/src/UploadButton.vue @@ -0,0 +1,41 @@ + + + + + diff --git a/src/components/UploadFile/src/UploadFile.vue b/src/components/UploadFile/src/UploadFile.vue new file mode 100644 index 0000000..c9badee --- /dev/null +++ b/src/components/UploadFile/src/UploadFile.vue @@ -0,0 +1,796 @@ + + + diff --git a/src/components/UploadFile/src/UploadImg.vue b/src/components/UploadFile/src/UploadImg.vue new file mode 100644 index 0000000..6535c81 --- /dev/null +++ b/src/components/UploadFile/src/UploadImg.vue @@ -0,0 +1,334 @@ + + + + diff --git a/src/components/UploadFile/src/UploadImgs.vue b/src/components/UploadFile/src/UploadImgs.vue new file mode 100644 index 0000000..126a1d8 --- /dev/null +++ b/src/components/UploadFile/src/UploadImgs.vue @@ -0,0 +1,343 @@ + + + + diff --git a/src/components/UploadFile/src/types.ts b/src/components/UploadFile/src/types.ts new file mode 100644 index 0000000..9c2f3c9 --- /dev/null +++ b/src/components/UploadFile/src/types.ts @@ -0,0 +1,19 @@ +/** + * 文件上传组件(UploadFile)的表单值:统一保存 fileId + 文件名,禁止保存私有文件签名地址 + */ +export interface UploadFileValue { + // 文件编号 + fileId: number + // 文件名 + name: string + // 详情接口返回的短时签名地址(保存时由后端剔除,禁止持久化) + url?: string + // 签名地址过期时间 + expiresAt?: string | null +} + +/** 附件展示类型;缺省值沿用现有上传入口,兼容历史表单配置。 */ +export enum UploadDisplayType { + DEFAULT = 'default', + PASTE = 'paste' +} diff --git a/src/components/UploadFile/src/useUpload.ts b/src/components/UploadFile/src/useUpload.ts new file mode 100644 index 0000000..34f6bc0 --- /dev/null +++ b/src/components/UploadFile/src/useUpload.ts @@ -0,0 +1,57 @@ +import * as FileApi from '@/api/infra/file' +import { + UploadRequestOptions, + UploadProgressEvent +} from 'element-plus/es/components/upload/src/upload' +import { AxiosProgressEvent } from 'axios' + +/** + * 获得上传 URL(统一上传入口,仅用于 el-upload 的 action 占位,实际上传走 httpRequest) + */ +export const getUploadUrl = (): string => { + return new URL( + import.meta.env.VITE_API_URL + '/infra/unified-file/upload', + new URL(import.meta.env.VITE_BASE_URL, window.location.origin) + ).href +} + +/** + * 统一文件上传组合式函数 + * @param directory 业务目录 + * @param forcePrivate 是否强制私有(图片也按私有文件存储) + */ +export const useUpload = (directory?: string, forcePrivate?: boolean) => { + // 后端上传地址 + const uploadUrl = getUploadUrl() + // 重写 ElUpload 上传方法:成功时 resolve CommonResult,res.data 为统一文件对象 + const httpRequest = (options: UploadRequestOptions) => { + // 文件上传进度监听 + const uploadProgressHandler = (evt: AxiosProgressEvent) => { + const upEvt: UploadProgressEvent = Object.assign(evt.event) + upEvt.percent = evt.progress ? evt.progress * 100 : 0 + options.onProgress(upEvt) // 触发 el-upload 的 on-progress + } + // 重写 el-upload httpRequest 文件上传成功会走成功的钩子,失败走失败的钩子 + return new Promise((resolve, reject) => { + FileApi.uploadUnifiedFile( + { file: options.file, directory, forcePrivate }, + uploadProgressHandler + ) + .then((res) => { + if (res.code === 0) { + resolve(res) + } else { + reject(res) + } + }) + .catch((res) => { + reject(res) + }) + }) + } + + return { + uploadUrl, + httpRequest + } +} diff --git a/src/components/UploadFile/src/utils.ts b/src/components/UploadFile/src/utils.ts new file mode 100644 index 0000000..32f0cb9 --- /dev/null +++ b/src/components/UploadFile/src/utils.ts @@ -0,0 +1,44 @@ +import type { UploadFileValue } from './types' + +/** + * 从历史地址中截取文件名 + * @param url 文件地址 + */ +const getNameFromUrl = (url: string): string => { + const path = url.split('?')[0] + const name = path.substring(path.lastIndexOf('/') + 1) + try { + return decodeURIComponent(name) || url + } catch { + return name || url + } +} + +/** + * 获取文件上传(UploadFile)表单值中的文件名列表,用于只读展示 + * 新格式为 {fileId,name}[];兼容历史的地址字符串、逗号分隔字符串、字符串数组 + * @param value 表单值 + */ +export const getUploadFileNames = (value: unknown): string[] => { + if (!value) return [] + if (typeof value === 'string') { + return value.split(',').filter(Boolean).map(getNameFromUrl) + } + if (!Array.isArray(value)) return [] + return value + .map((item: string | UploadFileValue) => + typeof item === 'string' ? getNameFromUrl(item) : item?.name + ) + .filter((name): name is string => !!name) +} + +/** + * 获取多图上传(UploadImgs)表单值中的图片地址列表,兼容逗号分隔字符串 + * @param value 表单值 + */ +export const getUploadImgUrls = (value: unknown): string[] => { + if (!value) return [] + if (typeof value === 'string') return value.split(',').filter(Boolean) + if (!Array.isArray(value)) return [] + return value.filter((url): url is string => typeof url === 'string' && !!url) +} diff --git a/src/components/UserSelectForm/index.vue b/src/components/UserSelectForm/index.vue new file mode 100644 index 0000000..122d6e5 --- /dev/null +++ b/src/components/UserSelectForm/index.vue @@ -0,0 +1,180 @@ + + + + diff --git a/src/components/UserTreeSelect/index.vue b/src/components/UserTreeSelect/index.vue new file mode 100644 index 0000000..d3e76c8 --- /dev/null +++ b/src/components/UserTreeSelect/index.vue @@ -0,0 +1,297 @@ + + + + + + + diff --git a/src/components/Verifition/index.ts b/src/components/Verifition/index.ts new file mode 100644 index 0000000..bcfe6d9 --- /dev/null +++ b/src/components/Verifition/index.ts @@ -0,0 +1,3 @@ +import Verify from './src/Verify.vue' + +export { Verify } diff --git a/src/components/Verifition/src/Verify.vue b/src/components/Verifition/src/Verify.vue new file mode 100644 index 0000000..930d0e7 --- /dev/null +++ b/src/components/Verifition/src/Verify.vue @@ -0,0 +1,446 @@ + + + \ No newline at end of file diff --git a/src/components/Verifition/src/Verify/VerifyPictureWord.vue b/src/components/Verifition/src/Verify/VerifyPictureWord.vue new file mode 100644 index 0000000..e1725f8 --- /dev/null +++ b/src/components/Verifition/src/Verify/VerifyPictureWord.vue @@ -0,0 +1,196 @@ + + diff --git a/src/components/Verifition/src/Verify/VerifyPoints.vue b/src/components/Verifition/src/Verify/VerifyPoints.vue new file mode 100644 index 0000000..9d04f29 --- /dev/null +++ b/src/components/Verifition/src/Verify/VerifyPoints.vue @@ -0,0 +1,250 @@ + + diff --git a/src/components/Verifition/src/Verify/VerifySlide.vue b/src/components/Verifition/src/Verify/VerifySlide.vue new file mode 100644 index 0000000..f3c7bfe --- /dev/null +++ b/src/components/Verifition/src/Verify/VerifySlide.vue @@ -0,0 +1,376 @@ + + diff --git a/src/components/Verifition/src/Verify/index.ts b/src/components/Verifition/src/Verify/index.ts new file mode 100644 index 0000000..e027ab3 --- /dev/null +++ b/src/components/Verifition/src/Verify/index.ts @@ -0,0 +1,5 @@ +import VerifySlide from './VerifySlide.vue' +import VerifyPoints from './VerifyPoints.vue' +import VerifyPictureWord from './VerifyPictureWord.vue' + +export { VerifySlide, VerifyPoints, VerifyPictureWord } \ No newline at end of file diff --git a/src/components/Verifition/src/utils/ase.ts b/src/components/Verifition/src/utils/ase.ts new file mode 100644 index 0000000..4f3ba39 --- /dev/null +++ b/src/components/Verifition/src/utils/ase.ts @@ -0,0 +1,14 @@ +import CryptoJS from 'crypto-js' +/** + * @word 要加密的内容 + * @keyWord String 仅使用服务器随机返回的验证码密钥,不设置固定默认密钥 + * */ +export function aesEncrypt(word: string, keyWord: string) { + const key = CryptoJS.enc.Utf8.parse(keyWord) + const srcs = CryptoJS.enc.Utf8.parse(word) + const encrypted = CryptoJS.AES.encrypt(srcs, key, { + mode: CryptoJS.mode.ECB, + padding: CryptoJS.pad.Pkcs7 + }) + return encrypted.toString() +} diff --git a/src/components/Verifition/src/utils/util.ts b/src/components/Verifition/src/utils/util.ts new file mode 100644 index 0000000..15c1627 --- /dev/null +++ b/src/components/Verifition/src/utils/util.ts @@ -0,0 +1,97 @@ +export function resetSize(vm) { + let img_width, img_height, bar_width, bar_height //图片的宽度、高度,移动条的宽度、高度 + const EmployeeWindow = window as any + const parentWidth = vm.$el.parentNode.offsetWidth || EmployeeWindow.offsetWidth + const parentHeight = vm.$el.parentNode.offsetHeight || EmployeeWindow.offsetHeight + if (vm.imgSize.width.indexOf('%') != -1) { + img_width = (parseInt(vm.imgSize.width) / 100) * parentWidth + 'px' + } else { + img_width = vm.imgSize.width + } + + if (vm.imgSize.height.indexOf('%') != -1) { + img_height = (parseInt(vm.imgSize.height) / 100) * parentHeight + 'px' + } else { + img_height = vm.imgSize.height + } + + if (vm.barSize.width.indexOf('%') != -1) { + bar_width = (parseInt(vm.barSize.width) / 100) * parentWidth + 'px' + } else { + bar_width = vm.barSize.width + } + + if (vm.barSize.height.indexOf('%') != -1) { + bar_height = (parseInt(vm.barSize.height) / 100) * parentHeight + 'px' + } else { + bar_height = vm.barSize.height + } + + return { imgWidth: img_width, imgHeight: img_height, barWidth: bar_width, barHeight: bar_height } +} + +export const _code_chars = [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 'a', + 'b', + 'c', + 'd', + 'e', + 'f', + 'g', + 'h', + 'i', + 'j', + 'k', + 'l', + 'm', + 'n', + 'o', + 'p', + 'q', + 'r', + 's', + 't', + 'u', + 'v', + 'w', + 'x', + 'y', + 'z', + 'A', + 'B', + 'C', + 'D', + 'E', + 'F', + 'G', + 'H', + 'I', + 'J', + 'K', + 'L', + 'M', + 'N', + 'O', + 'P', + 'Q', + 'R', + 'S', + 'T', + 'U', + 'V', + 'W', + 'X', + 'Y', + 'Z' +] +export const _code_color1 = ['#fffff0', '#f0ffff', '#f0fff0', '#fff0f0'] +export const _code_color2 = ['#FF0033', '#006699', '#993366', '#FF9900', '#66CC66', '#FF33CC'] diff --git a/src/components/XButton/index.ts b/src/components/XButton/index.ts new file mode 100644 index 0000000..be0f0d4 --- /dev/null +++ b/src/components/XButton/index.ts @@ -0,0 +1,4 @@ +import XButton from './src/XButton.vue' +import XTextButton from './src/XTextButton.vue' + +export { XButton, XTextButton } diff --git a/src/components/XButton/src/XButton.vue b/src/components/XButton/src/XButton.vue new file mode 100644 index 0000000..de98750 --- /dev/null +++ b/src/components/XButton/src/XButton.vue @@ -0,0 +1,50 @@ + + + + diff --git a/src/components/XButton/src/XTextButton.vue b/src/components/XButton/src/XTextButton.vue new file mode 100644 index 0000000..e7a58d0 --- /dev/null +++ b/src/components/XButton/src/XTextButton.vue @@ -0,0 +1,49 @@ + + + + diff --git a/src/components/bpmnProcessDesigner/package/designer/ProcessDesigner.vue b/src/components/bpmnProcessDesigner/package/designer/ProcessDesigner.vue new file mode 100644 index 0000000..fcb77ec --- /dev/null +++ b/src/components/bpmnProcessDesigner/package/designer/ProcessDesigner.vue @@ -0,0 +1,647 @@ + + + diff --git a/src/components/bpmnProcessDesigner/package/designer/ProcessViewer.vue b/src/components/bpmnProcessDesigner/package/designer/ProcessViewer.vue new file mode 100644 index 0000000..c390b90 --- /dev/null +++ b/src/components/bpmnProcessDesigner/package/designer/ProcessViewer.vue @@ -0,0 +1,435 @@ + + + diff --git a/src/components/bpmnProcessDesigner/package/designer/index.ts b/src/components/bpmnProcessDesigner/package/designer/index.ts new file mode 100644 index 0000000..8522846 --- /dev/null +++ b/src/components/bpmnProcessDesigner/package/designer/index.ts @@ -0,0 +1,8 @@ +import MyProcessDesigner from './ProcessDesigner.vue' + +MyProcessDesigner.install = function (Vue) { + Vue.component(MyProcessDesigner.name, MyProcessDesigner) +} + +// 流程图的设计器,可编辑 +export default MyProcessDesigner diff --git a/src/components/bpmnProcessDesigner/package/designer/index2.ts b/src/components/bpmnProcessDesigner/package/designer/index2.ts new file mode 100644 index 0000000..ebe8ca7 --- /dev/null +++ b/src/components/bpmnProcessDesigner/package/designer/index2.ts @@ -0,0 +1,8 @@ +import MyProcessViewer from './ProcessViewer.vue' + +MyProcessViewer.install = function (Vue) { + Vue.component(MyProcessViewer.name, MyProcessViewer) +} + +// 流程图的查看器,不可编辑 +export default MyProcessViewer diff --git a/src/components/bpmnProcessDesigner/package/designer/plugins/content-pad/contentPadProvider.js b/src/components/bpmnProcessDesigner/package/designer/plugins/content-pad/contentPadProvider.js new file mode 100644 index 0000000..8783493 --- /dev/null +++ b/src/components/bpmnProcessDesigner/package/designer/plugins/content-pad/contentPadProvider.js @@ -0,0 +1,423 @@ +import { assign, forEach, isArray } from 'min-dash' + +import { is } from 'bpmn-js/lib/util/ModelUtil' + +import { isExpanded, isEventSubProcess } from 'bpmn-js/lib/util/DiUtil' + +import { isAny } from 'bpmn-js/lib/features/modeling/util/ModelingUtil' + +import { getChildLanes } from 'bpmn-js/lib/features/modeling/util/LaneUtil' + +import { hasPrimaryModifier } from 'diagram-js/lib/util/Mouse' + +/** + * A provider for BPMN 2.0 elements context pad + */ +export default function ContextPadProvider( + config, + injector, + eventBus, + contextPad, + modeling, + elementFactory, + connect, + create, + popupMenu, + canvas, + rules, + translate +) { + config = config || {} + + contextPad.registerProvider(this) + + this._contextPad = contextPad + + this._modeling = modeling + + this._elementFactory = elementFactory + this._connect = connect + this._create = create + this._popupMenu = popupMenu + this._canvas = canvas + this._rules = rules + this._translate = translate + + if (config.autoPlace !== false) { + this._autoPlace = injector.get('autoPlace', false) + } + + eventBus.on('create.end', 250, function (event) { + const context = event.context, + shape = context.shape + + if (!hasPrimaryModifier(event) || !contextPad.isOpen(shape)) { + return + } + + const entries = contextPad.getEntries(shape) + + if (entries.replace) { + entries.replace.action.click(event, shape) + } + }) +} + +ContextPadProvider.$inject = [ + 'config.contextPad', + 'injector', + 'eventBus', + 'contextPad', + 'modeling', + 'elementFactory', + 'connect', + 'create', + 'popupMenu', + 'canvas', + 'rules', + 'translate', + 'elementRegistry' +] + +ContextPadProvider.prototype.getContextPadEntries = function (element) { + const contextPad = this._contextPad, + modeling = this._modeling, + elementFactory = this._elementFactory, + connect = this._connect, + create = this._create, + popupMenu = this._popupMenu, + canvas = this._canvas, + rules = this._rules, + autoPlace = this._autoPlace, + translate = this._translate + + const actions = {} + + if (element.type === 'label') { + return actions + } + + const businessObject = element.businessObject + + function startConnect(event, element) { + connect.start(event, element) + } + + function removeElement() { + modeling.removeElements([element]) + } + + function getReplaceMenuPosition(element) { + const Y_OFFSET = 5 + + const diagramContainer = canvas.getContainer(), + pad = contextPad.getPad(element).html + + const diagramRect = diagramContainer.getBoundingClientRect(), + padRect = pad.getBoundingClientRect() + + const top = padRect.top - diagramRect.top + const left = padRect.left - diagramRect.left + + const pos = { + x: left, + y: top + padRect.height + Y_OFFSET + } + + return pos + } + + /** + * Create an append action + * + * @param {string} type + * @param {string} className + * @param {string} [title] + * @param {Object} [options] + * + * @return {Object} descriptor + */ + function appendAction(type, className, title, options) { + if (typeof title !== 'string') { + options = title + title = translate('Append {type}', { type: type.replace(/^bpmn:/, '') }) + } + + function appendStart(event, element) { + const shape = elementFactory.createShape(assign({ type: type }, options)) + create.start(event, shape, { + source: element + }) + } + + const append = autoPlace + ? function (event, element) { + const shape = elementFactory.createShape(assign({ type: type }, options)) + + autoPlace.append(element, shape) + } + : appendStart + + return { + group: 'model', + className: className, + title: title, + action: { + dragstart: appendStart, + click: append + } + } + } + + function splitLaneHandler(count) { + return function (event, element) { + // actual split + modeling.splitLane(element, count) + + // refresh context pad after split to + // get rid of split icons + contextPad.open(element, true) + } + } + + if (isAny(businessObject, ['bpmn:Lane', 'bpmn:Participant']) && isExpanded(businessObject)) { + const childLanes = getChildLanes(element) + + assign(actions, { + 'lane-insert-above': { + group: 'lane-insert-above', + className: 'bpmn-icon-lane-insert-above', + title: translate('Add Lane above'), + action: { + click: function (event, element) { + modeling.addLane(element, 'top') + } + } + } + }) + + if (childLanes.length < 2) { + if (element.height >= 120) { + assign(actions, { + 'lane-divide-two': { + group: 'lane-divide', + className: 'bpmn-icon-lane-divide-two', + title: translate('Divide into two Lanes'), + action: { + click: splitLaneHandler(2) + } + } + }) + } + + if (element.height >= 180) { + assign(actions, { + 'lane-divide-three': { + group: 'lane-divide', + className: 'bpmn-icon-lane-divide-three', + title: translate('Divide into three Lanes'), + action: { + click: splitLaneHandler(3) + } + } + }) + } + } + + assign(actions, { + 'lane-insert-below': { + group: 'lane-insert-below', + className: 'bpmn-icon-lane-insert-below', + title: translate('Add Lane below'), + action: { + click: function (event, element) { + modeling.addLane(element, 'bottom') + } + } + } + }) + } + + if (is(businessObject, 'bpmn:FlowNode')) { + if (is(businessObject, 'bpmn:EventBasedGateway')) { + assign(actions, { + 'append.receive-task': appendAction( + 'bpmn:ReceiveTask', + 'bpmn-icon-receive-task', + translate('Append ReceiveTask') + ), + 'append.message-intermediate-event': appendAction( + 'bpmn:IntermediateCatchEvent', + 'bpmn-icon-intermediate-event-catch-message', + translate('Append MessageIntermediateCatchEvent'), + { eventDefinitionType: 'bpmn:MessageEventDefinition' } + ), + 'append.timer-intermediate-event': appendAction( + 'bpmn:IntermediateCatchEvent', + 'bpmn-icon-intermediate-event-catch-timer', + translate('Append TimerIntermediateCatchEvent'), + { eventDefinitionType: 'bpmn:TimerEventDefinition' } + ), + 'append.condition-intermediate-event': appendAction( + 'bpmn:IntermediateCatchEvent', + 'bpmn-icon-intermediate-event-catch-condition', + translate('Append ConditionIntermediateCatchEvent'), + { eventDefinitionType: 'bpmn:ConditionalEventDefinition' } + ), + 'append.signal-intermediate-event': appendAction( + 'bpmn:IntermediateCatchEvent', + 'bpmn-icon-intermediate-event-catch-signal', + translate('Append SignalIntermediateCatchEvent'), + { eventDefinitionType: 'bpmn:SignalEventDefinition' } + ) + }) + } else if ( + isEventType(businessObject, 'bpmn:BoundaryEvent', 'bpmn:CompensateEventDefinition') + ) { + assign(actions, { + 'append.compensation-activity': appendAction( + 'bpmn:Task', + 'bpmn-icon-task', + translate('Append compensation activity'), + { + isForCompensation: true + } + ) + }) + } else if ( + !is(businessObject, 'bpmn:EndEvent') && + !businessObject.isForCompensation && + !isEventType(businessObject, 'bpmn:IntermediateThrowEvent', 'bpmn:LinkEventDefinition') && + !isEventSubProcess(businessObject) + ) { + assign(actions, { + 'append.end-event': appendAction( + 'bpmn:EndEvent', + 'bpmn-icon-end-event-none', + translate('Append EndEvent') + ), + 'append.gateway': appendAction( + 'bpmn:ExclusiveGateway', + 'bpmn-icon-gateway-none', + translate('Append Gateway') + ), + 'append.append-task': appendAction( + 'bpmn:UserTask', + 'bpmn-icon-user-task', + translate('Append Task') + ), + 'append.intermediate-event': appendAction( + 'bpmn:IntermediateThrowEvent', + 'bpmn-icon-intermediate-event-none', + translate('Append Intermediate/Boundary Event') + ) + }) + } + } + + if (!popupMenu.isEmpty(element, 'bpmn-replace')) { + // Replace menu entry + assign(actions, { + replace: { + group: 'edit', + className: 'bpmn-icon-screw-wrench', + title: '修改类型', + action: { + click: function (event, element) { + const position = assign(getReplaceMenuPosition(element), { + cursor: { x: event.x, y: event.y } + }) + + popupMenu.open(element, 'bpmn-replace', position) + } + } + } + }) + } + + if ( + isAny(businessObject, [ + 'bpmn:FlowNode', + 'bpmn:InteractionNode', + 'bpmn:DataObjectReference', + 'bpmn:DataStoreReference' + ]) + ) { + assign(actions, { + 'append.text-annotation': appendAction('bpmn:TextAnnotation', 'bpmn-icon-text-annotation'), + + connect: { + group: 'connect', + className: 'bpmn-icon-connection-multi', + title: translate( + 'Connect using ' + + (businessObject.isForCompensation ? '' : 'Sequence/MessageFlow or ') + + 'Association' + ), + action: { + click: startConnect, + dragstart: startConnect + } + } + }) + } + + if (isAny(businessObject, ['bpmn:DataObjectReference', 'bpmn:DataStoreReference'])) { + assign(actions, { + connect: { + group: 'connect', + className: 'bpmn-icon-connection-multi', + title: translate('Connect using DataInputAssociation'), + action: { + click: startConnect, + dragstart: startConnect + } + } + }) + } + + if (is(businessObject, 'bpmn:Group')) { + assign(actions, { + 'append.text-annotation': appendAction('bpmn:TextAnnotation', 'bpmn-icon-text-annotation') + }) + } + + // delete element entry, only show if allowed by rules + let deleteAllowed = rules.allowed('elements.delete', { elements: [element] }) + + if (isArray(deleteAllowed)) { + // was the element returned as a deletion candidate? + deleteAllowed = deleteAllowed[0] === element + } + + if (deleteAllowed) { + assign(actions, { + delete: { + group: 'edit', + className: 'bpmn-icon-trash', + title: translate('Remove'), + action: { + click: removeElement + } + } + }) + } + + return actions +} + +// helpers ///////// + +function isEventType(eventBo, type, definition) { + const isType = eventBo.$instanceOf(type) + let isDefinition = false + + const definitions = eventBo.eventDefinitions || [] + forEach(definitions, function (def) { + if (def.$type === definition) { + isDefinition = true + } + }) + + return isType && isDefinition +} diff --git a/src/components/bpmnProcessDesigner/package/designer/plugins/content-pad/index.js b/src/components/bpmnProcessDesigner/package/designer/plugins/content-pad/index.js new file mode 100644 index 0000000..80009ef --- /dev/null +++ b/src/components/bpmnProcessDesigner/package/designer/plugins/content-pad/index.js @@ -0,0 +1,6 @@ +import CustomContextPadProvider from './contentPadProvider' + +export default { + __init__: ['contextPadProvider'], + contextPadProvider: ['type', CustomContextPadProvider] +} diff --git a/src/components/bpmnProcessDesigner/package/designer/plugins/defaultEmpty.js b/src/components/bpmnProcessDesigner/package/designer/plugins/defaultEmpty.js new file mode 100644 index 0000000..f3bc894 --- /dev/null +++ b/src/components/bpmnProcessDesigner/package/designer/plugins/defaultEmpty.js @@ -0,0 +1,24 @@ +export default (key, name, type) => { + if (!type) type = 'camunda' + const TYPE_TARGET = { + activiti: 'http://activiti.org/bpmn', + camunda: 'http://bpmn.io/schema/bpmn', + flowable: 'http://flowable.org/bpmn' + } + return ` + + + + + + + +` +} diff --git a/src/components/bpmnProcessDesigner/package/designer/plugins/descriptor/activitiDescriptor.json b/src/components/bpmnProcessDesigner/package/designer/plugins/descriptor/activitiDescriptor.json new file mode 100644 index 0000000..94ba8f6 --- /dev/null +++ b/src/components/bpmnProcessDesigner/package/designer/plugins/descriptor/activitiDescriptor.json @@ -0,0 +1,1004 @@ +{ + "name": "Activiti", + "uri": "http://activiti.org/bpmn", + "prefix": "activiti", + "xml": { + "tagAlias": "lowerCase" + }, + "associations": [], + "types": [ + { + "name": "Definitions", + "isAbstract": true, + "extends": ["bpmn:Definitions"], + "properties": [ + { + "name": "diagramRelationId", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "InOutBinding", + "superClass": ["Element"], + "isAbstract": true, + "properties": [ + { + "name": "source", + "isAttr": true, + "type": "String" + }, + { + "name": "sourceExpression", + "isAttr": true, + "type": "String" + }, + { + "name": "target", + "isAttr": true, + "type": "String" + }, + { + "name": "businessKey", + "isAttr": true, + "type": "String" + }, + { + "name": "local", + "isAttr": true, + "type": "Boolean", + "default": false + }, + { + "name": "variables", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "In", + "superClass": ["InOutBinding"], + "meta": { + "allowedIn": ["bpmn:CallActivity"] + } + }, + { + "name": "Out", + "superClass": ["InOutBinding"], + "meta": { + "allowedIn": ["bpmn:CallActivity"] + } + }, + { + "name": "AsyncCapable", + "isAbstract": true, + "extends": ["bpmn:Activity", "bpmn:Gateway", "bpmn:Event"], + "properties": [ + { + "name": "async", + "isAttr": true, + "type": "Boolean", + "default": false + }, + { + "name": "asyncBefore", + "isAttr": true, + "type": "Boolean", + "default": false + }, + { + "name": "asyncAfter", + "isAttr": true, + "type": "Boolean", + "default": false + }, + { + "name": "exclusive", + "isAttr": true, + "type": "Boolean", + "default": true + } + ] + }, + { + "name": "JobPriorized", + "isAbstract": true, + "extends": ["bpmn:Process", "activiti:AsyncCapable"], + "properties": [ + { + "name": "jobPriority", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "SignalEventDefinition", + "isAbstract": true, + "extends": ["bpmn:SignalEventDefinition"], + "properties": [ + { + "name": "async", + "isAttr": true, + "type": "Boolean", + "default": false + } + ] + }, + { + "name": "ErrorEventDefinition", + "isAbstract": true, + "extends": ["bpmn:ErrorEventDefinition"], + "properties": [ + { + "name": "errorCodeVariable", + "isAttr": true, + "type": "String" + }, + { + "name": "errorMessageVariable", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "Error", + "isAbstract": true, + "extends": ["bpmn:Error"], + "properties": [ + { + "name": "activiti:errorMessage", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "PotentialStarter", + "superClass": ["Element"], + "properties": [ + { + "name": "resourceAssignmentExpression", + "type": "bpmn:ResourceAssignmentExpression" + } + ] + }, + { + "name": "FormSupported", + "isAbstract": true, + "extends": ["bpmn:StartEvent", "bpmn:UserTask"], + "properties": [ + { + "name": "formHandlerClass", + "isAttr": true, + "type": "String" + }, + { + "name": "formKey", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "TemplateSupported", + "isAbstract": true, + "extends": ["bpmn:Process", "bpmn:FlowElement"], + "properties": [ + { + "name": "modelerTemplate", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "Initiator", + "isAbstract": true, + "extends": ["bpmn:StartEvent"], + "properties": [ + { + "name": "initiator", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "ScriptTask", + "isAbstract": true, + "extends": ["bpmn:ScriptTask"], + "properties": [ + { + "name": "resultVariable", + "isAttr": true, + "type": "String" + }, + { + "name": "resource", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "Process", + "isAbstract": true, + "extends": ["bpmn:Process"], + "properties": [ + { + "name": "candidateStarterGroups", + "isAttr": true, + "type": "String" + }, + { + "name": "candidateStarterUsers", + "isAttr": true, + "type": "String" + }, + { + "name": "versionTag", + "isAttr": true, + "type": "String" + }, + { + "name": "historyTimeToLive", + "isAttr": true, + "type": "String" + }, + { + "name": "isStartableInTasklist", + "isAttr": true, + "type": "Boolean", + "default": true + }, + { + "name": "executionListener", + "isAbstract": true, + "type": "Expression" + } + ] + }, + { + "name": "EscalationEventDefinition", + "isAbstract": true, + "extends": ["bpmn:EscalationEventDefinition"], + "properties": [ + { + "name": "escalationCodeVariable", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "FormalExpression", + "isAbstract": true, + "extends": ["bpmn:FormalExpression"], + "properties": [ + { + "name": "resource", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "multiinstance_type", + "superClass": ["Element"] + }, + { + "name": "multiinstance_condition", + "superClass": ["Element"] + }, + { + "name": "Assignable", + "extends": ["bpmn:UserTask"], + "properties": [ + { + "name": "assignee", + "isAttr": true, + "type": "String" + }, + { + "name": "candidateUsers", + "isAttr": true, + "type": "String" + }, + { + "name": "candidateGroups", + "isAttr": true, + "type": "String" + }, + { + "name": "dueDate", + "isAttr": true, + "type": "String" + }, + { + "name": "followUpDate", + "isAttr": true, + "type": "String" + }, + { + "name": "priority", + "isAttr": true, + "type": "String" + }, + { + "name": "multiinstance_condition", + "isAttr": true, + "type": "String" + }, + { + "name": "candidateStrategy", + "isAttr": true, + "type": "String" + }, + { + "name": "candidateParam", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "CallActivity", + "extends": ["bpmn:CallActivity"], + "properties": [ + { + "name": "calledElementBinding", + "isAttr": true, + "type": "String", + "default": "latest" + }, + { + "name": "calledElementVersion", + "isAttr": true, + "type": "String" + }, + { + "name": "calledElementVersionTag", + "isAttr": true, + "type": "String" + }, + { + "name": "calledElementTenantId", + "isAttr": true, + "type": "String" + }, + { + "name": "caseRef", + "isAttr": true, + "type": "String" + }, + { + "name": "caseBinding", + "isAttr": true, + "type": "String", + "default": "latest" + }, + { + "name": "caseVersion", + "isAttr": true, + "type": "String" + }, + { + "name": "caseTenantId", + "isAttr": true, + "type": "String" + }, + { + "name": "variableMappingClass", + "isAttr": true, + "type": "String" + }, + { + "name": "variableMappingDelegateExpression", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "ServiceTaskLike", + "extends": [ + "bpmn:ServiceTask", + "bpmn:BusinessRuleTask", + "bpmn:SendTask", + "bpmn:MessageEventDefinition" + ], + "properties": [ + { + "name": "expression", + "isAttr": true, + "type": "String" + }, + { + "name": "class", + "isAttr": true, + "type": "String" + }, + { + "name": "delegateExpression", + "isAttr": true, + "type": "String" + }, + { + "name": "resultVariable", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "DmnCapable", + "extends": ["bpmn:BusinessRuleTask"], + "properties": [ + { + "name": "decisionRef", + "isAttr": true, + "type": "String" + }, + { + "name": "decisionRefBinding", + "isAttr": true, + "type": "String", + "default": "latest" + }, + { + "name": "decisionRefVersion", + "isAttr": true, + "type": "String" + }, + { + "name": "mapDecisionResult", + "isAttr": true, + "type": "String", + "default": "resultList" + }, + { + "name": "decisionRefTenantId", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "ExternalCapable", + "extends": ["activiti:ServiceTaskLike"], + "properties": [ + { + "name": "type", + "isAttr": true, + "type": "String" + }, + { + "name": "topic", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "TaskPriorized", + "extends": ["bpmn:Process", "activiti:ExternalCapable"], + "properties": [ + { + "name": "taskPriority", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "Properties", + "superClass": ["Element"], + "meta": { + "allowedIn": ["*"] + }, + "properties": [ + { + "name": "values", + "type": "Property", + "isMany": true + } + ] + }, + { + "name": "Property", + "superClass": ["Element"], + "properties": [ + { + "name": "id", + "type": "String", + "isAttr": true + }, + { + "name": "name", + "type": "String", + "isAttr": true + }, + { + "name": "value", + "type": "String", + "isAttr": true + } + ] + }, + { + "name": "Connector", + "superClass": ["Element"], + "meta": { + "allowedIn": ["activiti:ServiceTaskLike"] + }, + "properties": [ + { + "name": "inputOutput", + "type": "InputOutput" + }, + { + "name": "connectorId", + "type": "String" + } + ] + }, + { + "name": "InputOutput", + "superClass": ["Element"], + "meta": { + "allowedIn": ["bpmn:FlowNode", "activiti:Connector"] + }, + "properties": [ + { + "name": "inputOutput", + "type": "InputOutput" + }, + { + "name": "connectorId", + "type": "String" + }, + { + "name": "inputParameters", + "isMany": true, + "type": "InputParameter" + }, + { + "name": "outputParameters", + "isMany": true, + "type": "OutputParameter" + } + ] + }, + { + "name": "InputOutputParameter", + "properties": [ + { + "name": "name", + "isAttr": true, + "type": "String" + }, + { + "name": "value", + "isBody": true, + "type": "String" + }, + { + "name": "definition", + "type": "InputOutputParameterDefinition" + } + ] + }, + { + "name": "InputOutputParameterDefinition", + "isAbstract": true + }, + { + "name": "List", + "superClass": ["InputOutputParameterDefinition"], + "properties": [ + { + "name": "items", + "isMany": true, + "type": "InputOutputParameterDefinition" + } + ] + }, + { + "name": "Map", + "superClass": ["InputOutputParameterDefinition"], + "properties": [ + { + "name": "entries", + "isMany": true, + "type": "Entry" + } + ] + }, + { + "name": "Entry", + "properties": [ + { + "name": "key", + "isAttr": true, + "type": "String" + }, + { + "name": "value", + "isBody": true, + "type": "String" + }, + { + "name": "definition", + "type": "InputOutputParameterDefinition" + } + ] + }, + { + "name": "Value", + "superClass": ["InputOutputParameterDefinition"], + "properties": [ + { + "name": "id", + "isAttr": true, + "type": "String" + }, + { + "name": "name", + "isAttr": true, + "type": "String" + }, + { + "name": "value", + "isBody": true, + "type": "String" + } + ] + }, + { + "name": "Script", + "superClass": ["InputOutputParameterDefinition"], + "properties": [ + { + "name": "scriptFormat", + "isAttr": true, + "type": "String" + }, + { + "name": "resource", + "isAttr": true, + "type": "String" + }, + { + "name": "value", + "isBody": true, + "type": "String" + } + ] + }, + { + "name": "Field", + "superClass": ["Element"], + "meta": { + "allowedIn": [ + "activiti:ServiceTaskLike", + "activiti:ExecutionListener", + "activiti:TaskListener" + ] + }, + "properties": [ + { + "name": "name", + "isAttr": true, + "type": "String" + }, + { + "name": "expression", + "type": "String" + }, + { + "name": "stringValue", + "isAttr": true, + "type": "String" + }, + { + "name": "string", + "type": "String" + } + ] + }, + { + "name": "InputParameter", + "superClass": ["InputOutputParameter"] + }, + { + "name": "OutputParameter", + "superClass": ["InputOutputParameter"] + }, + { + "name": "Collectable", + "isAbstract": true, + "extends": ["bpmn:MultiInstanceLoopCharacteristics"], + "superClass": ["activiti:AsyncCapable"], + "properties": [ + { + "name": "collection", + "isAttr": true, + "type": "String" + }, + { + "name": "elementVariable", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "FailedJobRetryTimeCycle", + "superClass": ["Element"], + "meta": { + "allowedIn": ["activiti:AsyncCapable", "bpmn:MultiInstanceLoopCharacteristics"] + }, + "properties": [ + { + "name": "body", + "isBody": true, + "type": "String" + } + ] + }, + { + "name": "ExecutionListener", + "superClass": ["Element"], + "meta": { + "allowedIn": [ + "bpmn:Task", + "bpmn:ServiceTask", + "bpmn:UserTask", + "bpmn:BusinessRuleTask", + "bpmn:ScriptTask", + "bpmn:ReceiveTask", + "bpmn:ManualTask", + "bpmn:ExclusiveGateway", + "bpmn:SequenceFlow", + "bpmn:ParallelGateway", + "bpmn:InclusiveGateway", + "bpmn:EventBasedGateway", + "bpmn:StartEvent", + "bpmn:IntermediateCatchEvent", + "bpmn:IntermediateThrowEvent", + "bpmn:EndEvent", + "bpmn:BoundaryEvent", + "bpmn:CallActivity", + "bpmn:SubProcess", + "bpmn:Process" + ] + }, + "properties": [ + { + "name": "expression", + "isAttr": true, + "type": "String" + }, + { + "name": "class", + "isAttr": true, + "type": "String" + }, + { + "name": "delegateExpression", + "isAttr": true, + "type": "String" + }, + { + "name": "event", + "isAttr": true, + "type": "String" + }, + { + "name": "script", + "type": "Script" + }, + { + "name": "fields", + "type": "Field", + "isMany": true + } + ] + }, + { + "name": "TaskListener", + "superClass": ["Element"], + "meta": { + "allowedIn": ["bpmn:UserTask"] + }, + "properties": [ + { + "name": "expression", + "isAttr": true, + "type": "String" + }, + { + "name": "class", + "isAttr": true, + "type": "String" + }, + { + "name": "delegateExpression", + "isAttr": true, + "type": "String" + }, + { + "name": "event", + "isAttr": true, + "type": "String" + }, + { + "name": "script", + "type": "Script" + }, + { + "name": "fields", + "type": "Field", + "isMany": true + } + ] + }, + { + "name": "FormProperty", + "superClass": ["Element"], + "meta": { + "allowedIn": ["bpmn:StartEvent", "bpmn:UserTask"] + }, + "properties": [ + { + "name": "id", + "type": "String", + "isAttr": true + }, + { + "name": "name", + "type": "String", + "isAttr": true + }, + { + "name": "type", + "type": "String", + "isAttr": true + }, + { + "name": "required", + "type": "String", + "isAttr": true + }, + { + "name": "readable", + "type": "String", + "isAttr": true + }, + { + "name": "writable", + "type": "String", + "isAttr": true + }, + { + "name": "variable", + "type": "String", + "isAttr": true + }, + { + "name": "expression", + "type": "String", + "isAttr": true + }, + { + "name": "datePattern", + "type": "String", + "isAttr": true + }, + { + "name": "default", + "type": "String", + "isAttr": true + }, + { + "name": "values", + "type": "Value", + "isMany": true + } + ] + }, + { + "name": "FormProperty", + "superClass": ["Element"], + "properties": [ + { + "name": "id", + "type": "String", + "isAttr": true + }, + { + "name": "label", + "type": "String", + "isAttr": true + }, + { + "name": "type", + "type": "String", + "isAttr": true + }, + { + "name": "datePattern", + "type": "String", + "isAttr": true + }, + { + "name": "defaultValue", + "type": "String", + "isAttr": true + }, + { + "name": "properties", + "type": "Properties" + }, + { + "name": "validation", + "type": "Validation" + }, + { + "name": "values", + "type": "Value", + "isMany": true + } + ] + }, + { + "name": "Validation", + "superClass": ["Element"], + "properties": [ + { + "name": "constraints", + "type": "Constraint", + "isMany": true + } + ] + }, + { + "name": "Constraint", + "superClass": ["Element"], + "properties": [ + { + "name": "name", + "type": "String", + "isAttr": true + }, + { + "name": "config", + "type": "String", + "isAttr": true + } + ] + }, + { + "name": "ConditionalEventDefinition", + "isAbstract": true, + "extends": ["bpmn:ConditionalEventDefinition"], + "properties": [ + { + "name": "variableName", + "isAttr": true, + "type": "String" + }, + { + "name": "variableEvent", + "isAttr": true, + "type": "String" + } + ] + } + ], + "emumerations": [] +} diff --git a/src/components/bpmnProcessDesigner/package/designer/plugins/descriptor/camundaDescriptor.json b/src/components/bpmnProcessDesigner/package/designer/plugins/descriptor/camundaDescriptor.json new file mode 100644 index 0000000..8322561 --- /dev/null +++ b/src/components/bpmnProcessDesigner/package/designer/plugins/descriptor/camundaDescriptor.json @@ -0,0 +1,1020 @@ +{ + "name": "Camunda", + "uri": "http://camunda.org/schema/1.0/bpmn", + "prefix": "camunda", + "xml": { + "tagAlias": "lowerCase" + }, + "associations": [], + "types": [ + { + "name": "Definitions", + "isAbstract": true, + "extends": ["bpmn:Definitions"], + "properties": [ + { + "name": "diagramRelationId", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "InOutBinding", + "superClass": ["Element"], + "isAbstract": true, + "properties": [ + { + "name": "source", + "isAttr": true, + "type": "String" + }, + { + "name": "sourceExpression", + "isAttr": true, + "type": "String" + }, + { + "name": "target", + "isAttr": true, + "type": "String" + }, + { + "name": "businessKey", + "isAttr": true, + "type": "String" + }, + { + "name": "local", + "isAttr": true, + "type": "Boolean", + "default": false + }, + { + "name": "variables", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "In", + "superClass": ["InOutBinding"], + "meta": { + "allowedIn": ["bpmn:CallActivity", "bpmn:SignalEventDefinition"] + } + }, + { + "name": "Out", + "superClass": ["InOutBinding"], + "meta": { + "allowedIn": ["bpmn:CallActivity"] + } + }, + { + "name": "AsyncCapable", + "isAbstract": true, + "extends": ["bpmn:Activity", "bpmn:Gateway", "bpmn:Event"], + "properties": [ + { + "name": "async", + "isAttr": true, + "type": "Boolean", + "default": false + }, + { + "name": "asyncBefore", + "isAttr": true, + "type": "Boolean", + "default": false + }, + { + "name": "asyncAfter", + "isAttr": true, + "type": "Boolean", + "default": false + }, + { + "name": "exclusive", + "isAttr": true, + "type": "Boolean", + "default": true + } + ] + }, + { + "name": "JobPriorized", + "isAbstract": true, + "extends": ["bpmn:Process", "camunda:AsyncCapable"], + "properties": [ + { + "name": "jobPriority", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "SignalEventDefinition", + "isAbstract": true, + "extends": ["bpmn:SignalEventDefinition"], + "properties": [ + { + "name": "async", + "isAttr": true, + "type": "Boolean", + "default": false + } + ] + }, + { + "name": "ErrorEventDefinition", + "isAbstract": true, + "extends": ["bpmn:ErrorEventDefinition"], + "properties": [ + { + "name": "errorCodeVariable", + "isAttr": true, + "type": "String" + }, + { + "name": "errorMessageVariable", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "Error", + "isAbstract": true, + "extends": ["bpmn:Error"], + "properties": [ + { + "name": "camunda:errorMessage", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "PotentialStarter", + "superClass": ["Element"], + "properties": [ + { + "name": "resourceAssignmentExpression", + "type": "bpmn:ResourceAssignmentExpression" + } + ] + }, + { + "name": "FormSupported", + "isAbstract": true, + "extends": ["bpmn:StartEvent", "bpmn:UserTask"], + "properties": [ + { + "name": "formHandlerClass", + "isAttr": true, + "type": "String" + }, + { + "name": "formKey", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "TemplateSupported", + "isAbstract": true, + "extends": ["bpmn:Process", "bpmn:FlowElement"], + "properties": [ + { + "name": "modelerTemplate", + "isAttr": true, + "type": "String" + }, + { + "name": "modelerTemplateVersion", + "isAttr": true, + "type": "Integer" + } + ] + }, + { + "name": "Initiator", + "isAbstract": true, + "extends": ["bpmn:StartEvent"], + "properties": [ + { + "name": "initiator", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "ScriptTask", + "isAbstract": true, + "extends": ["bpmn:ScriptTask"], + "properties": [ + { + "name": "resultVariable", + "isAttr": true, + "type": "String" + }, + { + "name": "resource", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "Process", + "isAbstract": true, + "extends": ["bpmn:Process"], + "properties": [ + { + "name": "candidateStarterGroups", + "isAttr": true, + "type": "String" + }, + { + "name": "candidateStarterUsers", + "isAttr": true, + "type": "String" + }, + { + "name": "versionTag", + "isAttr": true, + "type": "String" + }, + { + "name": "historyTimeToLive", + "isAttr": true, + "type": "String" + }, + { + "name": "isStartableInTasklist", + "isAttr": true, + "type": "Boolean", + "default": true + } + ] + }, + { + "name": "EscalationEventDefinition", + "isAbstract": true, + "extends": ["bpmn:EscalationEventDefinition"], + "properties": [ + { + "name": "escalationCodeVariable", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "FormalExpression", + "isAbstract": true, + "extends": ["bpmn:FormalExpression"], + "properties": [ + { + "name": "resource", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "Assignable", + "extends": ["bpmn:UserTask"], + "properties": [ + { + "name": "assignee", + "isAttr": true, + "type": "String" + }, + { + "name": "candidateUsers", + "isAttr": true, + "type": "String" + }, + { + "name": "candidateGroups", + "isAttr": true, + "type": "String" + }, + { + "name": "dueDate", + "isAttr": true, + "type": "String" + }, + { + "name": "followUpDate", + "isAttr": true, + "type": "String" + }, + { + "name": "priority", + "isAttr": true, + "type": "String" + }, + { + "name": "candidateStrategy", + "isAttr": true, + "type": "String" + }, + { + "name": "candidateParam", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "CallActivity", + "extends": ["bpmn:CallActivity"], + "properties": [ + { + "name": "calledElementBinding", + "isAttr": true, + "type": "String", + "default": "latest" + }, + { + "name": "calledElementVersion", + "isAttr": true, + "type": "String" + }, + { + "name": "calledElementVersionTag", + "isAttr": true, + "type": "String" + }, + { + "name": "calledElementTenantId", + "isAttr": true, + "type": "String" + }, + { + "name": "caseRef", + "isAttr": true, + "type": "String" + }, + { + "name": "caseBinding", + "isAttr": true, + "type": "String", + "default": "latest" + }, + { + "name": "caseVersion", + "isAttr": true, + "type": "String" + }, + { + "name": "caseTenantId", + "isAttr": true, + "type": "String" + }, + { + "name": "variableMappingClass", + "isAttr": true, + "type": "String" + }, + { + "name": "variableMappingDelegateExpression", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "ServiceTaskLike", + "extends": [ + "bpmn:ServiceTask", + "bpmn:BusinessRuleTask", + "bpmn:SendTask", + "bpmn:MessageEventDefinition" + ], + "properties": [ + { + "name": "expression", + "isAttr": true, + "type": "String" + }, + { + "name": "class", + "isAttr": true, + "type": "String" + }, + { + "name": "delegateExpression", + "isAttr": true, + "type": "String" + }, + { + "name": "resultVariable", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "DmnCapable", + "extends": ["bpmn:BusinessRuleTask"], + "properties": [ + { + "name": "decisionRef", + "isAttr": true, + "type": "String" + }, + { + "name": "decisionRefBinding", + "isAttr": true, + "type": "String", + "default": "latest" + }, + { + "name": "decisionRefVersion", + "isAttr": true, + "type": "String" + }, + { + "name": "mapDecisionResult", + "isAttr": true, + "type": "String", + "default": "resultList" + }, + { + "name": "decisionRefTenantId", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "ExternalCapable", + "extends": ["camunda:ServiceTaskLike"], + "properties": [ + { + "name": "type", + "isAttr": true, + "type": "String" + }, + { + "name": "topic", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "TaskPriorized", + "extends": ["bpmn:Process", "camunda:ExternalCapable"], + "properties": [ + { + "name": "taskPriority", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "Properties", + "superClass": ["Element"], + "meta": { + "allowedIn": ["*"] + }, + "properties": [ + { + "name": "values", + "type": "Property", + "isMany": true + } + ] + }, + { + "name": "Property", + "superClass": ["Element"], + "properties": [ + { + "name": "id", + "type": "String", + "isAttr": true + }, + { + "name": "name", + "type": "String", + "isAttr": true + }, + { + "name": "value", + "type": "String", + "isAttr": true + } + ] + }, + { + "name": "Connector", + "superClass": ["Element"], + "meta": { + "allowedIn": ["camunda:ServiceTaskLike"] + }, + "properties": [ + { + "name": "inputOutput", + "type": "InputOutput" + }, + { + "name": "connectorId", + "type": "String" + } + ] + }, + { + "name": "InputOutput", + "superClass": ["Element"], + "meta": { + "allowedIn": ["bpmn:FlowNode", "camunda:Connector"] + }, + "properties": [ + { + "name": "inputOutput", + "type": "InputOutput" + }, + { + "name": "connectorId", + "type": "String" + }, + { + "name": "inputParameters", + "isMany": true, + "type": "InputParameter" + }, + { + "name": "outputParameters", + "isMany": true, + "type": "OutputParameter" + } + ] + }, + { + "name": "InputOutputParameter", + "properties": [ + { + "name": "name", + "isAttr": true, + "type": "String" + }, + { + "name": "value", + "isBody": true, + "type": "String" + }, + { + "name": "definition", + "type": "InputOutputParameterDefinition" + } + ] + }, + { + "name": "InputOutputParameterDefinition", + "isAbstract": true + }, + { + "name": "List", + "superClass": ["InputOutputParameterDefinition"], + "properties": [ + { + "name": "items", + "isMany": true, + "type": "InputOutputParameterDefinition" + } + ] + }, + { + "name": "Map", + "superClass": ["InputOutputParameterDefinition"], + "properties": [ + { + "name": "entries", + "isMany": true, + "type": "Entry" + } + ] + }, + { + "name": "Entry", + "properties": [ + { + "name": "key", + "isAttr": true, + "type": "String" + }, + { + "name": "value", + "isBody": true, + "type": "String" + }, + { + "name": "definition", + "type": "InputOutputParameterDefinition" + } + ] + }, + { + "name": "Value", + "superClass": ["InputOutputParameterDefinition"], + "properties": [ + { + "name": "id", + "isAttr": true, + "type": "String" + }, + { + "name": "name", + "isAttr": true, + "type": "String" + }, + { + "name": "value", + "isBody": true, + "type": "String" + } + ] + }, + { + "name": "Script", + "superClass": ["InputOutputParameterDefinition"], + "properties": [ + { + "name": "scriptFormat", + "isAttr": true, + "type": "String" + }, + { + "name": "resource", + "isAttr": true, + "type": "String" + }, + { + "name": "value", + "isBody": true, + "type": "String" + } + ] + }, + { + "name": "Field", + "superClass": ["Element"], + "meta": { + "allowedIn": [ + "camunda:ServiceTaskLike", + "camunda:ExecutionListener", + "camunda:TaskListener" + ] + }, + "properties": [ + { + "name": "name", + "isAttr": true, + "type": "String" + }, + { + "name": "expression", + "type": "String" + }, + { + "name": "stringValue", + "isAttr": true, + "type": "String" + }, + { + "name": "string", + "type": "String" + } + ] + }, + { + "name": "InputParameter", + "superClass": ["InputOutputParameter"] + }, + { + "name": "OutputParameter", + "superClass": ["InputOutputParameter"] + }, + { + "name": "Collectable", + "isAbstract": true, + "extends": ["bpmn:MultiInstanceLoopCharacteristics"], + "superClass": ["camunda:AsyncCapable"], + "properties": [ + { + "name": "collection", + "isAttr": true, + "type": "String" + }, + { + "name": "elementVariable", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "FailedJobRetryTimeCycle", + "superClass": ["Element"], + "meta": { + "allowedIn": ["camunda:AsyncCapable", "bpmn:MultiInstanceLoopCharacteristics"] + }, + "properties": [ + { + "name": "body", + "isBody": true, + "type": "String" + } + ] + }, + { + "name": "ExecutionListener", + "superClass": ["Element"], + "meta": { + "allowedIn": [ + "bpmn:Task", + "bpmn:ServiceTask", + "bpmn:UserTask", + "bpmn:BusinessRuleTask", + "bpmn:ScriptTask", + "bpmn:ReceiveTask", + "bpmn:ManualTask", + "bpmn:ExclusiveGateway", + "bpmn:SequenceFlow", + "bpmn:ParallelGateway", + "bpmn:InclusiveGateway", + "bpmn:EventBasedGateway", + "bpmn:StartEvent", + "bpmn:IntermediateCatchEvent", + "bpmn:IntermediateThrowEvent", + "bpmn:EndEvent", + "bpmn:BoundaryEvent", + "bpmn:CallActivity", + "bpmn:SubProcess", + "bpmn:Process" + ] + }, + "properties": [ + { + "name": "expression", + "isAttr": true, + "type": "String" + }, + { + "name": "class", + "isAttr": true, + "type": "String" + }, + { + "name": "delegateExpression", + "isAttr": true, + "type": "String" + }, + { + "name": "event", + "isAttr": true, + "type": "String" + }, + { + "name": "script", + "type": "Script" + }, + { + "name": "fields", + "type": "Field", + "isMany": true + } + ] + }, + { + "name": "TaskListener", + "superClass": ["Element"], + "meta": { + "allowedIn": ["bpmn:UserTask"] + }, + "properties": [ + { + "name": "expression", + "isAttr": true, + "type": "String" + }, + { + "name": "class", + "isAttr": true, + "type": "String" + }, + { + "name": "delegateExpression", + "isAttr": true, + "type": "String" + }, + { + "name": "event", + "isAttr": true, + "type": "String" + }, + { + "name": "script", + "type": "Script" + }, + { + "name": "fields", + "type": "Field", + "isMany": true + }, + { + "name": "id", + "type": "String", + "isAttr": true + }, + { + "name": "eventDefinitions", + "type": "bpmn:TimerEventDefinition", + "isMany": true + } + ] + }, + { + "name": "FormProperty", + "superClass": ["Element"], + "meta": { + "allowedIn": ["bpmn:StartEvent", "bpmn:UserTask"] + }, + "properties": [ + { + "name": "id", + "type": "String", + "isAttr": true + }, + { + "name": "name", + "type": "String", + "isAttr": true + }, + { + "name": "type", + "type": "String", + "isAttr": true + }, + { + "name": "required", + "type": "String", + "isAttr": true + }, + { + "name": "readable", + "type": "String", + "isAttr": true + }, + { + "name": "writable", + "type": "String", + "isAttr": true + }, + { + "name": "variable", + "type": "String", + "isAttr": true + }, + { + "name": "expression", + "type": "String", + "isAttr": true + }, + { + "name": "datePattern", + "type": "String", + "isAttr": true + }, + { + "name": "default", + "type": "String", + "isAttr": true + }, + { + "name": "values", + "type": "Value", + "isMany": true + } + ] + }, + { + "name": "FormData", + "superClass": ["Element"], + "meta": { + "allowedIn": ["bpmn:StartEvent", "bpmn:UserTask"] + }, + "properties": [ + { + "name": "fields", + "type": "FormField", + "isMany": true + }, + { + "name": "businessKey", + "type": "String", + "isAttr": true + } + ] + }, + { + "name": "FormField", + "superClass": ["Element"], + "properties": [ + { + "name": "id", + "type": "String", + "isAttr": true + }, + { + "name": "label", + "type": "String", + "isAttr": true + }, + { + "name": "type", + "type": "String", + "isAttr": true + }, + { + "name": "datePattern", + "type": "String", + "isAttr": true + }, + { + "name": "defaultValue", + "type": "String", + "isAttr": true + }, + { + "name": "properties", + "type": "Properties" + }, + { + "name": "validation", + "type": "Validation" + }, + { + "name": "values", + "type": "Value", + "isMany": true + } + ] + }, + { + "name": "Validation", + "superClass": ["Element"], + "properties": [ + { + "name": "constraints", + "type": "Constraint", + "isMany": true + } + ] + }, + { + "name": "Constraint", + "superClass": ["Element"], + "properties": [ + { + "name": "name", + "type": "String", + "isAttr": true + }, + { + "name": "config", + "type": "String", + "isAttr": true + } + ] + }, + { + "name": "ConditionalEventDefinition", + "isAbstract": true, + "extends": ["bpmn:ConditionalEventDefinition"], + "properties": [ + { + "name": "variableName", + "isAttr": true, + "type": "String" + }, + { + "name": "variableEvents", + "isAttr": true, + "type": "String" + } + ] + } + ], + "emumerations": [] +} diff --git a/src/components/bpmnProcessDesigner/package/designer/plugins/descriptor/flowableDescriptor.json b/src/components/bpmnProcessDesigner/package/designer/plugins/descriptor/flowableDescriptor.json new file mode 100644 index 0000000..bd4191e --- /dev/null +++ b/src/components/bpmnProcessDesigner/package/designer/plugins/descriptor/flowableDescriptor.json @@ -0,0 +1,1498 @@ +{ + "name": "Flowable", + "uri": "http://flowable.org/bpmn", + "prefix": "flowable", + "xml": { + "tagAlias": "lowerCase" + }, + "associations": [], + "types": [ + { + "name": "InOutBinding", + "superClass": ["Element"], + "isAbstract": true, + "properties": [ + { + "name": "source", + "isAttr": true, + "type": "String" + }, + { + "name": "sourceExpression", + "isAttr": true, + "type": "String" + }, + { + "name": "target", + "isAttr": true, + "type": "String" + }, + { + "name": "businessKey", + "isAttr": true, + "type": "String" + }, + { + "name": "local", + "isAttr": true, + "type": "Boolean", + "default": false + }, + { + "name": "variables", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "In", + "superClass": ["InOutBinding"], + "meta": { + "allowedIn": ["bpmn:CallActivity"] + } + }, + { + "name": "Out", + "superClass": ["InOutBinding"], + "meta": { + "allowedIn": ["bpmn:CallActivity"] + } + }, + { + "name": "AsyncCapable", + "isAbstract": true, + "extends": ["bpmn:Activity", "bpmn:Gateway", "bpmn:Event"], + "properties": [ + { + "name": "async", + "isAttr": true, + "type": "Boolean", + "default": false + }, + { + "name": "asyncBefore", + "isAttr": true, + "type": "Boolean", + "default": false + }, + { + "name": "asyncAfter", + "isAttr": true, + "type": "Boolean", + "default": false + }, + { + "name": "exclusive", + "isAttr": true, + "type": "Boolean", + "default": true + } + ] + }, + { + "name": "JobPriorized", + "isAbstract": true, + "extends": ["bpmn:Process", "flowable:AsyncCapable"], + "properties": [ + { + "name": "jobPriority", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "SignalEventDefinition", + "isAbstract": true, + "extends": ["bpmn:SignalEventDefinition"], + "properties": [ + { + "name": "async", + "isAttr": true, + "type": "Boolean", + "default": false + } + ] + }, + { + "name": "ErrorEventDefinition", + "isAbstract": true, + "extends": ["bpmn:ErrorEventDefinition"], + "properties": [ + { + "name": "errorCodeVariable", + "isAttr": true, + "type": "String" + }, + { + "name": "errorMessageVariable", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "Error", + "isAbstract": true, + "extends": ["bpmn:Error"], + "properties": [ + { + "name": "flowable:errorMessage", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "PotentialStarter", + "superClass": ["Element"], + "properties": [ + { + "name": "resourceAssignmentExpression", + "type": "bpmn:ResourceAssignmentExpression" + } + ] + }, + { + "name": "FormSupported", + "isAbstract": true, + "extends": ["bpmn:StartEvent", "bpmn:UserTask"], + "properties": [ + { + "name": "formHandlerClass", + "isAttr": true, + "type": "String" + }, + { + "name": "formKey", + "isAttr": true, + "type": "String" + }, + { + "name": "formType", + "isAttr": true, + "type": "String" + }, + { + "name": "formReadOnly", + "isAttr": true, + "type": "Boolean", + "default": false + }, + { + "name": "formInit", + "isAttr": true, + "type": "Boolean", + "default": true + } + ] + }, + { + "name": "TemplateSupported", + "isAbstract": true, + "extends": ["bpmn:Process", "bpmn:FlowElement"], + "properties": [ + { + "name": "modelerTemplate", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "Initiator", + "isAbstract": true, + "extends": ["bpmn:StartEvent"], + "properties": [ + { + "name": "initiator", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "ScriptTask", + "isAbstract": true, + "extends": ["bpmn:ScriptTask"], + "properties": [ + { + "name": "resultVariable", + "isAttr": true, + "type": "String" + }, + { + "name": "resource", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "Process", + "isAbstract": true, + "extends": ["bpmn:Process"], + "properties": [ + { + "name": "candidateStarterGroups", + "isAttr": true, + "type": "String" + }, + { + "name": "candidateStarterUsers", + "isAttr": true, + "type": "String" + }, + { + "name": "versionTag", + "isAttr": true, + "type": "String" + }, + { + "name": "historyTimeToLive", + "isAttr": true, + "type": "String" + }, + { + "name": "isStartableInTasklist", + "isAttr": true, + "type": "Boolean", + "default": true + } + ] + }, + { + "name": "EscalationEventDefinition", + "isAbstract": true, + "extends": ["bpmn:EscalationEventDefinition"], + "properties": [ + { + "name": "escalationCodeVariable", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "FormalExpression", + "isAbstract": true, + "extends": ["bpmn:FormalExpression"], + "properties": [ + { + "name": "resource", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "Assignable", + "extends": ["bpmn:UserTask"], + "properties": [ + { + "name": "assignee", + "isAttr": true, + "type": "String" + }, + { + "name": "candidateUsers", + "isAttr": true, + "type": "String" + }, + { + "name": "candidateGroups", + "isAttr": true, + "type": "String" + }, + { + "name": "dueDate", + "isAttr": true, + "type": "String" + }, + { + "name": "followUpDate", + "isAttr": true, + "type": "String" + }, + { + "name": "priority", + "isAttr": true, + "type": "String" + }, + { + "name": "candidateStrategy", + "isAttr": true, + "type": "String" + }, + { + "name": "candidateParam", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "Assignee", + "supperClass": "Element", + "meta": { + "allowedIn": ["*"] + }, + "properties": [ + { + "name": "label", + "type": "String", + "isAttr": true + }, + { + "name": "viewId", + "type": "Number", + "isAttr": true + } + ] + }, + { + "name": "CallActivity", + "extends": ["bpmn:CallActivity"], + "properties": [ + { + "name": "calledElementBinding", + "isAttr": true, + "type": "String", + "default": "latest" + }, + { + "name": "calledElementVersion", + "isAttr": true, + "type": "String" + }, + { + "name": "calledElementVersionTag", + "isAttr": true, + "type": "String" + }, + { + "name": "calledElementTenantId", + "isAttr": true, + "type": "String" + }, + { + "name": "caseRef", + "isAttr": true, + "type": "String" + }, + { + "name": "caseBinding", + "isAttr": true, + "type": "String", + "default": "latest" + }, + { + "name": "caseVersion", + "isAttr": true, + "type": "String" + }, + { + "name": "caseTenantId", + "isAttr": true, + "type": "String" + }, + { + "name": "variableMappingClass", + "isAttr": true, + "type": "String" + }, + { + "name": "variableMappingDelegateExpression", + "isAttr": true, + "type": "String" + }, + { + "name": "calledElementType", + "isAttr": true, + "type": "String" + }, + { + "name": "processInstanceName", + "isAttr": true, + "type": "String" + }, + { + "name": "inheritBusinessKey", + "isAttr": true, + "type": "Boolean" + }, + { + "name": "businessKey", + "isAttr": true, + "type": "String" + }, + { + "name": "inheritVariables", + "isAttr": true, + "type": "Boolean" + } + ] + }, + { + "name": "ServiceTaskLike", + "extends": [ + "bpmn:ServiceTask", + "bpmn:BusinessRuleTask", + "bpmn:SendTask", + "bpmn:MessageEventDefinition" + ], + "properties": [ + { + "name": "expression", + "isAttr": true, + "type": "String" + }, + { + "name": "class", + "isAttr": true, + "type": "String" + }, + { + "name": "delegateExpression", + "isAttr": true, + "type": "String" + }, + { + "name": "resultVariable", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "DmnCapable", + "extends": ["bpmn:BusinessRuleTask"], + "properties": [ + { + "name": "decisionRef", + "isAttr": true, + "type": "String" + }, + { + "name": "decisionRefBinding", + "isAttr": true, + "type": "String", + "default": "latest" + }, + { + "name": "decisionRefVersion", + "isAttr": true, + "type": "String" + }, + { + "name": "mapDecisionResult", + "isAttr": true, + "type": "String", + "default": "resultList" + }, + { + "name": "decisionRefTenantId", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "ExternalCapable", + "extends": ["flowable:ServiceTaskLike"], + "properties": [ + { + "name": "type", + "isAttr": true, + "type": "String" + }, + { + "name": "topic", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "TaskPriorized", + "extends": ["bpmn:Process", "flowable:ExternalCapable"], + "properties": [ + { + "name": "taskPriority", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "Properties", + "superClass": ["Element"], + "meta": { + "allowedIn": ["*"] + }, + "properties": [ + { + "name": "values", + "type": "Property", + "isMany": true + } + ] + }, + { + "name": "Property", + "superClass": ["Element"], + "properties": [ + { + "name": "id", + "type": "String", + "isAttr": true + }, + { + "name": "name", + "type": "String", + "isAttr": true + }, + { + "name": "value", + "type": "String", + "isAttr": true + } + ] + }, + { + "name": "Button", + "superClass": ["Element"], + "meta": { + "allowedIn": ["bpmn:UserTask"] + }, + "properties": [ + { + "name": "id", + "type": "String", + "isAttr": true + }, + { + "name": "name", + "type": "String", + "isAttr": true + }, + { + "name": "code", + "type": "String", + "isAttr": true + }, + { + "name": "isHide", + "type": "String", + "isAttr": true + }, + { + "name": "next", + "type": "String", + "isAttr": true + }, + { + "name": "sort", + "type": "Integer", + "isAttr": true + } + ] + }, + { + "name": "Assignee", + "superClass": ["Element"], + "meta": { + "allowedIn": ["bpmn:UserTask"] + }, + "properties": [ + { + "name": "id", + "type": "String", + "isAttr": true + }, + { + "name": "type", + "type": "String", + "isAttr": true + }, + { + "name": "value", + "type": "String", + "isAttr": true + }, + { + "name": "condition", + "type": "String", + "isAttr": true + }, + { + "name": "operationType", + "type": "String", + "isAttr": true + }, + { + "name": "sort", + "type": "Integer", + "isAttr": true + } + ] + }, + { + "name": "Connector", + "superClass": ["Element"], + "meta": { + "allowedIn": ["flowable:ServiceTaskLike"] + }, + "properties": [ + { + "name": "inputOutput", + "type": "InputOutput" + }, + { + "name": "connectorId", + "type": "String" + } + ] + }, + { + "name": "InputOutput", + "superClass": ["Element"], + "meta": { + "allowedIn": ["bpmn:FlowNode", "flowable:Connector"] + }, + "properties": [ + { + "name": "inputOutput", + "type": "InputOutput" + }, + { + "name": "connectorId", + "type": "String" + }, + { + "name": "inputParameters", + "isMany": true, + "type": "InputParameter" + }, + { + "name": "outputParameters", + "isMany": true, + "type": "OutputParameter" + } + ] + }, + { + "name": "InputOutputParameter", + "properties": [ + { + "name": "name", + "isAttr": true, + "type": "String" + }, + { + "name": "value", + "isBody": true, + "type": "String" + }, + { + "name": "definition", + "type": "InputOutputParameterDefinition" + } + ] + }, + { + "name": "InputOutputParameterDefinition", + "isAbstract": true + }, + { + "name": "List", + "superClass": ["InputOutputParameterDefinition"], + "properties": [ + { + "name": "items", + "isMany": true, + "type": "InputOutputParameterDefinition" + } + ] + }, + { + "name": "Map", + "superClass": ["InputOutputParameterDefinition"], + "properties": [ + { + "name": "entries", + "isMany": true, + "type": "Entry" + } + ] + }, + { + "name": "Entry", + "properties": [ + { + "name": "key", + "isAttr": true, + "type": "String" + }, + { + "name": "value", + "isBody": true, + "type": "String" + }, + { + "name": "definition", + "type": "InputOutputParameterDefinition" + } + ] + }, + { + "name": "Value", + "superClass": ["InputOutputParameterDefinition"], + "properties": [ + { + "name": "id", + "isAttr": true, + "type": "String" + }, + { + "name": "name", + "isAttr": true, + "type": "String" + }, + { + "name": "value", + "isBody": true, + "type": "String" + } + ] + }, + { + "name": "Script", + "superClass": ["InputOutputParameterDefinition"], + "properties": [ + { + "name": "scriptFormat", + "isAttr": true, + "type": "String" + }, + { + "name": "resource", + "isAttr": true, + "type": "String" + }, + { + "name": "value", + "isBody": true, + "type": "String" + } + ] + }, + { + "name": "Field", + "superClass": ["Element"], + "meta": { + "allowedIn": [ + "flowable:ServiceTaskLike", + "flowable:ExecutionListener", + "flowable:TaskListener" + ] + }, + "properties": [ + { + "name": "name", + "isAttr": true, + "type": "String" + }, + { + "name": "expression", + "type": "String" + }, + { + "name": "stringValue", + "isAttr": true, + "type": "String" + }, + { + "name": "string", + "type": "String" + } + ] + }, + { + "name": "ChildField", + "superClass": ["Element"], + "properties": [ + { + "name": "id", + "type": "String", + "isAttr": true + }, + { + "name": "name", + "type": "String", + "isAttr": true + }, + { + "name": "type", + "type": "String", + "isAttr": true + }, + { + "name": "required", + "type": "String", + "isAttr": true + }, + { + "name": "readable", + "type": "String", + "isAttr": true + }, + { + "name": "writable", + "type": "String", + "isAttr": true + }, + { + "name": "variable", + "type": "String", + "isAttr": true + }, + { + "name": "expression", + "type": "String", + "isAttr": true + }, + { + "name": "datePattern", + "type": "String", + "isAttr": true + }, + { + "name": "default", + "type": "String", + "isAttr": true + }, + { + "name": "values", + "type": "Value", + "isMany": true + } + ] + }, + { + "name": "InputParameter", + "superClass": ["InputOutputParameter"] + }, + { + "name": "OutputParameter", + "superClass": ["InputOutputParameter"] + }, + { + "name": "Collectable", + "isAbstract": true, + "extends": ["bpmn:MultiInstanceLoopCharacteristics"], + "superClass": ["flowable:AsyncCapable"], + "properties": [ + { + "name": "collection", + "isAttr": true, + "type": "String" + }, + { + "name": "elementVariable", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "FailedJobRetryTimeCycle", + "superClass": ["Element"], + "meta": { + "allowedIn": ["flowable:AsyncCapable", "bpmn:MultiInstanceLoopCharacteristics"] + }, + "properties": [ + { + "name": "body", + "isBody": true, + "type": "String" + } + ] + }, + { + "name": "ExecutionListener", + "superClass": ["Element"], + "meta": { + "allowedIn": [ + "bpmn:Task", + "bpmn:ServiceTask", + "bpmn:UserTask", + "bpmn:BusinessRuleTask", + "bpmn:ScriptTask", + "bpmn:ReceiveTask", + "bpmn:ManualTask", + "bpmn:ExclusiveGateway", + "bpmn:SequenceFlow", + "bpmn:ParallelGateway", + "bpmn:InclusiveGateway", + "bpmn:EventBasedGateway", + "bpmn:StartEvent", + "bpmn:IntermediateCatchEvent", + "bpmn:IntermediateThrowEvent", + "bpmn:EndEvent", + "bpmn:BoundaryEvent", + "bpmn:CallActivity", + "bpmn:SubProcess", + "bpmn:Process" + ] + }, + "properties": [ + { + "name": "expression", + "isAttr": true, + "type": "String" + }, + { + "name": "class", + "isAttr": true, + "type": "String" + }, + { + "name": "delegateExpression", + "isAttr": true, + "type": "String" + }, + { + "name": "event", + "isAttr": true, + "type": "String" + }, + { + "name": "script", + "type": "Script" + }, + { + "name": "fields", + "type": "Field", + "isMany": true + } + ] + }, + { + "name": "TaskListener", + "superClass": ["Element"], + "meta": { + "allowedIn": ["bpmn:UserTask"] + }, + "properties": [ + { + "name": "expression", + "isAttr": true, + "type": "String" + }, + { + "name": "class", + "isAttr": true, + "type": "String" + }, + { + "name": "delegateExpression", + "isAttr": true, + "type": "String" + }, + { + "name": "event", + "isAttr": true, + "type": "String" + }, + { + "name": "script", + "type": "Script" + }, + { + "name": "fields", + "type": "Field", + "isMany": true + }, + { + "name": "id", + "type": "String", + "isAttr": true + }, + { + "name": "eventDefinitions", + "type": "bpmn:TimerEventDefinition", + "isMany": true + } + ] + }, + { + "name": "FormProperty", + "superClass": ["Element"], + "meta": { + "allowedIn": ["bpmn:StartEvent", "bpmn:UserTask"] + }, + "properties": [ + { + "name": "id", + "type": "String", + "isAttr": true + }, + { + "name": "name", + "type": "String", + "isAttr": true + }, + { + "name": "type", + "type": "String", + "isAttr": true + }, + { + "name": "required", + "type": "String", + "isAttr": true + }, + { + "name": "readable", + "type": "String", + "isAttr": true + }, + { + "name": "writable", + "type": "String", + "isAttr": true + }, + { + "name": "variable", + "type": "String", + "isAttr": true + }, + { + "name": "expression", + "type": "String", + "isAttr": true + }, + { + "name": "datePattern", + "type": "String", + "isAttr": true + }, + { + "name": "default", + "type": "String", + "isAttr": true + }, + { + "name": "values", + "type": "Value", + "isMany": true + }, + { + "name": "children", + "type": "ChildField", + "isMany": true + }, + { + "name": "extensionElements", + "type": "bpmn:ExtensionElements", + "isMany": true + } + ] + }, + { + "name": "FormData", + "superClass": ["Element"], + "meta": { + "allowedIn": ["bpmn:StartEvent", "bpmn:UserTask"] + }, + "properties": [ + { + "name": "fields", + "type": "FormField", + "isMany": true + }, + { + "name": "businessKey", + "type": "String", + "isAttr": true + } + ] + }, + { + "name": "FormField", + "superClass": ["Element"], + "properties": [ + { + "name": "id", + "type": "String", + "isAttr": true + }, + { + "name": "label", + "type": "String", + "isAttr": true + }, + { + "name": "type", + "type": "String", + "isAttr": true + }, + { + "name": "datePattern", + "type": "String", + "isAttr": true + }, + { + "name": "defaultValue", + "type": "String", + "isAttr": true + }, + { + "name": "properties", + "type": "Properties" + }, + { + "name": "validation", + "type": "Validation" + }, + { + "name": "values", + "type": "Value", + "isMany": true + } + ] + }, + { + "name": "Validation", + "superClass": ["Element"], + "properties": [ + { + "name": "constraints", + "type": "Constraint", + "isMany": true + } + ] + }, + { + "name": "Constraint", + "superClass": ["Element"], + "properties": [ + { + "name": "name", + "type": "String", + "isAttr": true + }, + { + "name": "config", + "type": "String", + "isAttr": true + } + ] + }, + { + "name": "ConditionalEventDefinition", + "isAbstract": true, + "extends": ["bpmn:ConditionalEventDefinition"], + "properties": [ + { + "name": "variableName", + "isAttr": true, + "type": "String" + }, + { + "name": "variableEvent", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "Condition", + "superClass": ["Element"], + "meta": { + "allowedIn": ["bpmn:SequenceFlow"] + }, + "properties": [ + { + "name": "id", + "type": "String", + "isAttr": true + }, + { + "name": "field", + "type": "String", + "isAttr": true + }, + { + "name": "compare", + "type": "String", + "isAttr": true + }, + { + "name": "value", + "type": "String", + "isAttr": true + }, + { + "name": "logic", + "type": "String", + "isAttr": true + }, + { + "name": "sort", + "type": "Integer", + "isAttr": true + } + ] + }, + { + "name": "AssignStartUserHandlerType", + "superClass": ["Element"], + "meta": { + "allowedIn": ["bpmn:StartEvent", "bpmn:UserTask"] + }, + "properties": [ + { + "name": "value", + "type": "Integer", + "isBody": true + } + ] + }, + { + "name": "RejectHandlerType", + "superClass": ["Element"], + "meta": { + "allowedIn": ["bpmn:UserTask"] + }, + "properties": [ + { + "name": "value", + "type": "Integer", + "isBody": true + } + ] + }, + { + "name": "RejectReturnTaskId", + "superClass": ["Element"], + "meta": { + "allowedIn": ["bpmn:UserTask"] + }, + "properties": [ + { + "name": "value", + "type": "String", + "isBody": true + } + ] + }, + { + "name": "AssignEmptyHandlerType", + "superClass": ["Element"], + "meta": { + "allowedIn": ["bpmn:UserTask"] + }, + "properties": [ + { + "name": "value", + "type": "Integer", + "isBody": true + } + ] + }, + { + "name": "AssignEmptyUserIds", + "superClass": ["Element"], + "meta": { + "allowedIn": ["bpmn:UserTask"] + }, + "properties": [ + { + "name": "value", + "type": "String", + "isBody": true + } + ] + }, + { + "name": "ButtonsSetting", + "superClass": ["Element"], + "meta": { + "allowedIn": ["bpmn:UserTask"] + }, + "properties": [ + { + "name": "flowable:id", + "type": "Integer", + "isAttr": true + }, + { + "name": "flowable:enable", + "type": "Boolean", + "isAttr": true + }, + { + "name": "flowable:displayName", + "type": "String", + "isAttr": true + } + ] + }, + { + "name": "FieldsPermission", + "superClass": ["Element"], + "meta": { + "allowedIn": ["bpmn:UserTask"] + }, + "properties": [ + { + "name": "flowable:field", + "type": "String", + "isAttr": true + }, + { + "name": "flowable:title", + "type": "String", + "isAttr": true + }, + { + "name": "flowable:permission", + "type": "String", + "isAttr": true + }, + { + "name": "flowable:required", + "type": "Boolean", + "isAttr": true + } + ] + }, + { + "name": "BoundaryEventType", + "superClass": ["Element"], + "meta": { + "allowedIn": ["bpmn:BoundaryEvent"] + }, + "properties": [ + { + "name": "value", + "type": "Integer", + "isBody": true + } + ] + }, + { + "name": "TimeoutHandlerType", + "superClass": ["Element"], + "meta": { + "allowedIn": ["bpmn:BoundaryEvent"] + }, + "properties": [ + { + "name": "value", + "type": "Integer", + "isBody": true + } + ] + }, + { + "name": "ApproveType", + "superClass": ["Element"], + "meta": { + "allowedIn": ["bpmn:UserTask"] + }, + "properties": [ + { + "name": "value", + "type": "Integer", + "isBody": true + } + ] + }, + { + "name": "ApproveMethod", + "superClass": ["Element"], + "meta": { + "allowedIn": ["bpmn:UserTask"] + }, + "properties": [ + { + "name": "value", + "type": "Integer", + "isBody": true + } + ] + }, + { + "name": "CandidateStrategy", + "superClass": ["Element"], + "meta": { + "allowedIn": ["bpmn:UserTask"] + }, + "properties": [ + { + "name": "value", + "type": "Integer", + "isBody": true + } + ] + }, + { + "name": "CandidateParam", + "superClass": ["Element"], + "meta": { + "allowedIn": ["bpmn:UserTask"] + }, + "properties": [ + { + "name": "value", + "type": "String", + "isBody": true + } + ] + }, + { + "name": "SignEnable", + "superClass": ["Element"], + "meta": { + "allowedIn": ["bpmn:UserTask"] + }, + "properties": [ + { + "name": "value", + "type": "Boolean", + "isBody": true + } + ] + }, + { + "name": "SkipExpression", + "extends": ["bpmn:UserTask"], + "properties": [ + { + "name": "skipExpression", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "ReasonRequire", + "superClass": ["Element"], + "meta": { + "allowedIn": ["bpmn:UserTask"] + }, + "properties": [ + { + "name": "value", + "type": "Boolean", + "isBody": true + } + ] + } + ], + "emumerations": [] +} diff --git a/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/activiti/activitiExtension.js b/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/activiti/activitiExtension.js new file mode 100644 index 0000000..56ef38a --- /dev/null +++ b/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/activiti/activitiExtension.js @@ -0,0 +1,83 @@ +'use strict' + +import { some } from 'min-dash' + +// const some = require('min-dash').some +// const some = some + +const ALLOWED_TYPES = { + FailedJobRetryTimeCycle: [ + 'bpmn:StartEvent', + 'bpmn:BoundaryEvent', + 'bpmn:IntermediateCatchEvent', + 'bpmn:Activity' + ], + Connector: ['bpmn:EndEvent', 'bpmn:IntermediateThrowEvent'], + Field: ['bpmn:EndEvent', 'bpmn:IntermediateThrowEvent'] +} + +function is(element, type) { + return element && typeof element.$instanceOf === 'function' && element.$instanceOf(type) +} + +function exists(element) { + return element && element.length +} + +function includesType(collection, type) { + return ( + exists(collection) && + some(collection, function (element) { + return is(element, type) + }) + ) +} + +function anyType(element, types) { + return some(types, function (type) { + return is(element, type) + }) +} + +function isAllowed(propName, propDescriptor, newElement) { + const name = propDescriptor.name, + types = ALLOWED_TYPES[name.replace(/activiti:/, '')] + + return name === propName && anyType(newElement, types) +} + +function ActivitiModdleExtension(eventBus) { + eventBus.on( + 'property.clone', + function (context) { + const newElement = context.newElement, + propDescriptor = context.propertyDescriptor + + this.canCloneProperty(newElement, propDescriptor) + }, + this + ) +} + +ActivitiModdleExtension.$inject = ['eventBus'] + +ActivitiModdleExtension.prototype.canCloneProperty = function (newElement, propDescriptor) { + if (isAllowed('activiti:FailedJobRetryTimeCycle', propDescriptor, newElement)) { + return ( + includesType(newElement.eventDefinitions, 'bpmn:TimerEventDefinition') || + includesType(newElement.eventDefinitions, 'bpmn:SignalEventDefinition') || + is(newElement.loopCharacteristics, 'bpmn:MultiInstanceLoopCharacteristics') + ) + } + + if (isAllowed('activiti:Connector', propDescriptor, newElement)) { + return includesType(newElement.eventDefinitions, 'bpmn:MessageEventDefinition') + } + + if (isAllowed('activiti:Field', propDescriptor, newElement)) { + return includesType(newElement.eventDefinitions, 'bpmn:MessageEventDefinition') + } +} + +// module.exports = ActivitiModdleExtension; +export default ActivitiModdleExtension diff --git a/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/activiti/index.js b/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/activiti/index.js new file mode 100644 index 0000000..c22ca34 --- /dev/null +++ b/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/activiti/index.js @@ -0,0 +1,11 @@ +/* + * @author igdianov + * address https://github.com/igdianov/activiti-bpmn-moddle + * */ + +import activitiExtension from './activitiExtension' + +export default { + __init__: ['ActivitiModdleExtension'], + ActivitiModdleExtension: ['type', activitiExtension] +} diff --git a/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/camunda/extension.js b/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/camunda/extension.js new file mode 100644 index 0000000..b8c37a5 --- /dev/null +++ b/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/camunda/extension.js @@ -0,0 +1,151 @@ +'use strict' + +import { isFunction, isObject, some } from 'min-dash' + +// const isFunction = isFunction, +// isObject = isObject, +// some = some +// const isFunction = require('min-dash').isFunction, +// isObject = require('min-dash').isObject, +// some = require('min-dash').some + +const WILDCARD = '*' + +function CamundaModdleExtension(eventBus) { + // eslint-disable-next-line @typescript-eslint/no-this-alias + const self = this + + eventBus.on('moddleCopy.canCopyProperty', function (context) { + const property = context.property, + parent = context.parent + + return self.canCopyProperty(property, parent) + }) +} + +CamundaModdleExtension.$inject = ['eventBus'] + +/** + * Check wether to disallow copying property. + */ +CamundaModdleExtension.prototype.canCopyProperty = function (property, parent) { + // (1) check wether property is allowed in parent + if (isObject(property) && !isAllowedInParent(property, parent)) { + return false + } + + // (2) check more complex scenarios + + if (is(property, 'camunda:InputOutput') && !this.canHostInputOutput(parent)) { + return false + } + + if (isAny(property, ['camunda:Connector', 'camunda:Field']) && !this.canHostConnector(parent)) { + return false + } + + if (is(property, 'camunda:In') && !this.canHostIn(parent)) { + return false + } +} + +CamundaModdleExtension.prototype.canHostInputOutput = function (parent) { + // allowed in camunda:Connector + const connector = getParent(parent, 'camunda:Connector') + + if (connector) { + return true + } + + // special rules inside bpmn:FlowNode + const flowNode = getParent(parent, 'bpmn:FlowNode') + + if (!flowNode) { + return false + } + + if (isAny(flowNode, ['bpmn:StartEvent', 'bpmn:Gateway', 'bpmn:BoundaryEvent'])) { + return false + } + + return !(is(flowNode, 'bpmn:SubProcess') && flowNode.get('triggeredByEvent')) +} + +CamundaModdleExtension.prototype.canHostConnector = function (parent) { + const serviceTaskLike = getParent(parent, 'camunda:ServiceTaskLike') + + if (is(serviceTaskLike, 'bpmn:MessageEventDefinition')) { + // only allow on throw and end events + return getParent(parent, 'bpmn:IntermediateThrowEvent') || getParent(parent, 'bpmn:EndEvent') + } + + return true +} + +CamundaModdleExtension.prototype.canHostIn = function (parent) { + const callActivity = getParent(parent, 'bpmn:CallActivity') + + if (callActivity) { + return true + } + + const signalEventDefinition = getParent(parent, 'bpmn:SignalEventDefinition') + + if (signalEventDefinition) { + // only allow on throw and end events + return getParent(parent, 'bpmn:IntermediateThrowEvent') || getParent(parent, 'bpmn:EndEvent') + } + + return true +} + +// module.exports = CamundaModdleExtension; +export default CamundaModdleExtension + +// helpers ////////// + +function is(element, type) { + return element && isFunction(element.$instanceOf) && element.$instanceOf(type) +} + +function isAny(element, types) { + return some(types, function (t) { + return is(element, t) + }) +} + +function getParent(element, type) { + if (!type) { + return element.$parent + } + + if (is(element, type)) { + return element + } + + if (!element.$parent) { + return + } + + return getParent(element.$parent, type) +} + +function isAllowedInParent(property, parent) { + // (1) find property descriptor + const descriptor = property.$type && property.$model.getTypeDescriptor(property.$type) + + const allowedIn = descriptor && descriptor.meta && descriptor.meta.allowedIn + + if (!allowedIn || isWildcard(allowedIn)) { + return true + } + + // (2) check wether property has parent of allowed type + return some(allowedIn, function (type) { + return getParent(parent, type) + }) +} + +function isWildcard(allowedIn) { + return allowedIn.indexOf(WILDCARD) !== -1 +} diff --git a/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/camunda/index.js b/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/camunda/index.js new file mode 100644 index 0000000..1da1bc7 --- /dev/null +++ b/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/camunda/index.js @@ -0,0 +1,8 @@ +'use strict' + +import extension from './extension' + +export default { + __init__: ['camundaModdleExtension'], + camundaModdleExtension: ['type', extension] +} diff --git a/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/flowable/flowableExtension.js b/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/flowable/flowableExtension.js new file mode 100644 index 0000000..3dcea67 --- /dev/null +++ b/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/flowable/flowableExtension.js @@ -0,0 +1,83 @@ +'use strict' + +import { some } from 'min-dash' + +// const some = some +// const some = require('min-dash').some + +const ALLOWED_TYPES = { + FailedJobRetryTimeCycle: [ + 'bpmn:StartEvent', + 'bpmn:BoundaryEvent', + 'bpmn:IntermediateCatchEvent', + 'bpmn:Activity' + ], + Connector: ['bpmn:EndEvent', 'bpmn:IntermediateThrowEvent'], + Field: ['bpmn:EndEvent', 'bpmn:IntermediateThrowEvent'] +} + +function is(element, type) { + return element && typeof element.$instanceOf === 'function' && element.$instanceOf(type) +} + +function exists(element) { + return element && element.length +} + +function includesType(collection, type) { + return ( + exists(collection) && + some(collection, function (element) { + return is(element, type) + }) + ) +} + +function anyType(element, types) { + return some(types, function (type) { + return is(element, type) + }) +} + +function isAllowed(propName, propDescriptor, newElement) { + const name = propDescriptor.name, + types = ALLOWED_TYPES[name.replace(/flowable:/, '')] + + return name === propName && anyType(newElement, types) +} + +function FlowableModdleExtension(eventBus) { + eventBus.on( + 'property.clone', + function (context) { + const newElement = context.newElement, + propDescriptor = context.propertyDescriptor + + this.canCloneProperty(newElement, propDescriptor) + }, + this + ) +} + +FlowableModdleExtension.$inject = ['eventBus'] + +FlowableModdleExtension.prototype.canCloneProperty = function (newElement, propDescriptor) { + if (isAllowed('flowable:FailedJobRetryTimeCycle', propDescriptor, newElement)) { + return ( + includesType(newElement.eventDefinitions, 'bpmn:TimerEventDefinition') || + includesType(newElement.eventDefinitions, 'bpmn:SignalEventDefinition') || + is(newElement.loopCharacteristics, 'bpmn:MultiInstanceLoopCharacteristics') + ) + } + + if (isAllowed('flowable:Connector', propDescriptor, newElement)) { + return includesType(newElement.eventDefinitions, 'bpmn:MessageEventDefinition') + } + + if (isAllowed('flowable:Field', propDescriptor, newElement)) { + return includesType(newElement.eventDefinitions, 'bpmn:MessageEventDefinition') + } +} + +// module.exports = FlowableModdleExtension; +export default FlowableModdleExtension diff --git a/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/flowable/index.js b/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/flowable/index.js new file mode 100644 index 0000000..6d59b67 --- /dev/null +++ b/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/flowable/index.js @@ -0,0 +1,10 @@ +/* + * @author igdianov + * address https://github.com/igdianov/activiti-bpmn-moddle + * */ +import flowableExtension from './flowableExtension' + +export default { + __init__: ['FlowableModdleExtension'], + FlowableModdleExtension: ['type', flowableExtension] +} diff --git a/src/components/bpmnProcessDesigner/package/designer/plugins/palette/CustomPalette.js b/src/components/bpmnProcessDesigner/package/designer/plugins/palette/CustomPalette.js new file mode 100644 index 0000000..788e4d1 --- /dev/null +++ b/src/components/bpmnProcessDesigner/package/designer/plugins/palette/CustomPalette.js @@ -0,0 +1,233 @@ +import PaletteProvider from 'bpmn-js/lib/features/palette/PaletteProvider' +import { assign } from 'min-dash' + +export default function CustomPalette( + palette, + create, + elementFactory, + spaceTool, + lassoTool, + handTool, + globalConnect, + translate +) { + PaletteProvider.call( + this, + palette, + create, + elementFactory, + spaceTool, + lassoTool, + handTool, + globalConnect, + translate, + 2000 + ) +} + +const F = function () {} // 核心,利用空对象作为中介; +F.prototype = PaletteProvider.prototype // 核心,将父类的原型赋值给空对象F; + +// 利用中介函数重写原型链方法 +F.prototype.getPaletteEntries = function () { + const actions = {}, + create = this._create, + elementFactory = this._elementFactory, + spaceTool = this._spaceTool, + lassoTool = this._lassoTool, + handTool = this._handTool, + globalConnect = this._globalConnect, + translate = this._translate + + function createAction(type, group, className, title, options) { + function createListener(event) { + const shape = elementFactory.createShape(assign({ type: type }, options)) + + if (options) { + shape.businessObject.di.isExpanded = options.isExpanded + } + + create.start(event, shape) + } + + const shortType = type.replace(/^bpmn:/, '') + + return { + group: group, + className: className, + title: title || translate('Create {type}', { type: shortType }), + action: { + dragstart: createListener, + click: createListener + } + } + } + + function createSubprocess(event) { + const subProcess = elementFactory.createShape({ + type: 'bpmn:SubProcess', + x: 0, + y: 0, + isExpanded: true + }) + + const startEvent = elementFactory.createShape({ + type: 'bpmn:StartEvent', + x: 40, + y: 82, + parent: subProcess + }) + + create.start(event, [subProcess, startEvent], { + hints: { + autoSelect: [startEvent] + } + }) + } + + function createParticipant(event) { + create.start(event, elementFactory.createParticipantShape()) + } + + assign(actions, { + 'hand-tool': { + group: 'tools', + className: 'bpmn-icon-hand-tool', + title: '激活抓手工具', + // title: translate("Activate the hand tool"), + action: { + click: function (event) { + handTool.activateHand(event) + } + } + }, + 'lasso-tool': { + group: 'tools', + className: 'bpmn-icon-lasso-tool', + title: translate('Activate the lasso tool'), + action: { + click: function (event) { + lassoTool.activateSelection(event) + } + } + }, + 'space-tool': { + group: 'tools', + className: 'bpmn-icon-space-tool', + title: translate('Activate the create/remove space tool'), + action: { + click: function (event) { + spaceTool.activateSelection(event) + } + } + }, + 'global-connect-tool': { + group: 'tools', + className: 'bpmn-icon-connection-multi', + title: translate('Activate the global connect tool'), + action: { + click: function (event) { + globalConnect.toggle(event) + } + } + }, + 'tool-separator': { + group: 'tools', + separator: true + }, + 'create.start-event': createAction( + 'bpmn:StartEvent', + 'event', + 'bpmn-icon-start-event-none', + translate('Create StartEvent') + ), + 'create.intermediate-event': createAction( + 'bpmn:IntermediateThrowEvent', + 'event', + 'bpmn-icon-intermediate-event-none', + translate('Create Intermediate/Boundary Event') + ), + 'create.end-event': createAction( + 'bpmn:EndEvent', + 'event', + 'bpmn-icon-end-event-none', + translate('Create EndEvent') + ), + 'create.exclusive-gateway': createAction( + 'bpmn:ExclusiveGateway', + 'gateway', + 'bpmn-icon-gateway-none', + translate('Create Gateway') + ), + 'create.user-task': createAction( + 'bpmn:UserTask', + 'activity', + 'bpmn-icon-user-task', + translate('Create User Task') + ), + 'create.call-activity': createAction( + 'bpmn:CallActivity', + 'activity', + 'bpmn-icon-call-activity', + translate('Create Call Activity') + ), + 'create.service-task': createAction( + 'bpmn:ServiceTask', + 'activity', + 'bpmn-icon-service', + translate('Create Service Task') + ), + 'create.data-object': createAction( + 'bpmn:DataObjectReference', + 'data-object', + 'bpmn-icon-data-object', + translate('Create DataObjectReference') + ), + 'create.data-store': createAction( + 'bpmn:DataStoreReference', + 'data-store', + 'bpmn-icon-data-store', + translate('Create DataStoreReference') + ), + 'create.subprocess-expanded': { + group: 'activity', + className: 'bpmn-icon-subprocess-expanded', + title: translate('Create expanded SubProcess'), + action: { + dragstart: createSubprocess, + click: createSubprocess + } + }, + 'create.participant-expanded': { + group: 'collaboration', + className: 'bpmn-icon-participant', + title: translate('Create Pool/Participant'), + action: { + dragstart: createParticipant, + click: createParticipant + } + }, + 'create.group': createAction( + 'bpmn:Group', + 'artifact', + 'bpmn-icon-group', + translate('Create Group') + ) + }) + + return actions +} + +CustomPalette.$inject = [ + 'palette', + 'create', + 'elementFactory', + 'spaceTool', + 'lassoTool', + 'handTool', + 'globalConnect', + 'translate' +] + +CustomPalette.prototype = new F() // 核心,将 F的实例赋值给子类; +CustomPalette.prototype.constructor = CustomPalette // 修复子类CustomPalette的构造器指向,防止原型链的混乱; diff --git a/src/components/bpmnProcessDesigner/package/designer/plugins/palette/index.js b/src/components/bpmnProcessDesigner/package/designer/plugins/palette/index.js new file mode 100644 index 0000000..8e4f3ac --- /dev/null +++ b/src/components/bpmnProcessDesigner/package/designer/plugins/palette/index.js @@ -0,0 +1,22 @@ +// import PaletteModule from "diagram-js/lib/features/palette"; +// import CreateModule from "diagram-js/lib/features/create"; +// import SpaceToolModule from "diagram-js/lib/features/space-tool"; +// import LassoToolModule from "diagram-js/lib/features/lasso-tool"; +// import HandToolModule from "diagram-js/lib/features/hand-tool"; +// import GlobalConnectModule from "diagram-js/lib/features/global-connect"; +// import translate from "diagram-js/lib/i18n/translate"; +// +// import PaletteProvider from "./paletteProvider"; +// +// export default { +// __depends__: [PaletteModule, CreateModule, SpaceToolModule, LassoToolModule, HandToolModule, GlobalConnectModule, translate], +// __init__: ["paletteProvider"], +// paletteProvider: ["type", PaletteProvider] +// }; + +import CustomPalette from './CustomPalette' + +export default { + __init__: ['paletteProvider'], + paletteProvider: ['type', CustomPalette] +} diff --git a/src/components/bpmnProcessDesigner/package/designer/plugins/palette/paletteProvider.js b/src/components/bpmnProcessDesigner/package/designer/plugins/palette/paletteProvider.js new file mode 100644 index 0000000..304875c --- /dev/null +++ b/src/components/bpmnProcessDesigner/package/designer/plugins/palette/paletteProvider.js @@ -0,0 +1,219 @@ +import { assign } from 'min-dash' + +/** + * A palette provider for BPMN 2.0 elements. + */ +export default function PaletteProvider( + palette, + create, + elementFactory, + spaceTool, + lassoTool, + handTool, + globalConnect, + translate +) { + this._palette = palette + this._create = create + this._elementFactory = elementFactory + this._spaceTool = spaceTool + this._lassoTool = lassoTool + this._handTool = handTool + this._globalConnect = globalConnect + this._translate = translate + + palette.registerProvider(this) +} + +PaletteProvider.$inject = [ + 'palette', + 'create', + 'elementFactory', + 'spaceTool', + 'lassoTool', + 'handTool', + 'globalConnect', + 'translate' +] + +PaletteProvider.prototype.getPaletteEntries = function () { + const actions = {}, + create = this._create, + elementFactory = this._elementFactory, + spaceTool = this._spaceTool, + lassoTool = this._lassoTool, + handTool = this._handTool, + globalConnect = this._globalConnect, + translate = this._translate + + function createAction(type, group, className, title, options) { + function createListener(event) { + const shape = elementFactory.createShape(assign({ type: type }, options)) + + if (options) { + shape.businessObject.di.isExpanded = options.isExpanded + } + + create.start(event, shape) + } + + const shortType = type.replace(/^bpmn:/, '') + + return { + group: group, + className: className, + title: title || translate('Create {type}', { type: shortType }), + action: { + dragstart: createListener, + click: createListener + } + } + } + + function createSubprocess(event) { + const subProcess = elementFactory.createShape({ + type: 'bpmn:SubProcess', + x: 0, + y: 0, + isExpanded: true + }) + + const startEvent = elementFactory.createShape({ + type: 'bpmn:StartEvent', + x: 40, + y: 82, + parent: subProcess + }) + + create.start(event, [subProcess, startEvent], { + hints: { + autoSelect: [startEvent] + } + }) + } + + function createParticipant(event) { + create.start(event, elementFactory.createParticipantShape()) + } + + assign(actions, { + 'hand-tool': { + group: 'tools', + className: 'bpmn-icon-hand-tool', + title: translate('Activate the hand tool'), + action: { + click: function (event) { + handTool.activateHand(event) + } + } + }, + 'lasso-tool': { + group: 'tools', + className: 'bpmn-icon-lasso-tool', + title: translate('Activate the lasso tool'), + action: { + click: function (event) { + lassoTool.activateSelection(event) + } + } + }, + 'space-tool': { + group: 'tools', + className: 'bpmn-icon-space-tool', + title: translate('Activate the create/remove space tool'), + action: { + click: function (event) { + spaceTool.activateSelection(event) + } + } + }, + 'global-connect-tool': { + group: 'tools', + className: 'bpmn-icon-connection-multi', + title: translate('Activate the global connect tool'), + action: { + click: function (event) { + globalConnect.toggle(event) + } + } + }, + 'tool-separator': { + group: 'tools', + separator: true + }, + 'create.start-event': createAction( + 'bpmn:StartEvent', + 'event', + 'bpmn-icon-start-event-none', + translate('Create StartEvent') + ), + 'create.intermediate-event': createAction( + 'bpmn:IntermediateThrowEvent', + 'event', + 'bpmn-icon-intermediate-event-none', + translate('Create Intermediate/Boundary Event') + ), + 'create.end-event': createAction( + 'bpmn:EndEvent', + 'event', + 'bpmn-icon-end-event-none', + translate('Create EndEvent') + ), + 'create.exclusive-gateway': createAction( + 'bpmn:ExclusiveGateway', + 'gateway', + 'bpmn-icon-gateway-none', + translate('Create Gateway') + ), + 'create.user-task': createAction( + 'bpmn:UserTask', + 'activity', + 'bpmn-icon-user-task', + translate('Create User Task') + ), + 'create.service-task': createAction( + 'bpmn:ServiceTask', + 'activity', + 'bpmn-icon-service', + translate('Create Service Task') + ), + 'create.data-object': createAction( + 'bpmn:DataObjectReference', + 'data-object', + 'bpmn-icon-data-object', + translate('Create DataObjectReference') + ), + 'create.data-store': createAction( + 'bpmn:DataStoreReference', + 'data-store', + 'bpmn-icon-data-store', + translate('Create DataStoreReference') + ), + 'create.subprocess-expanded': { + group: 'activity', + className: 'bpmn-icon-subprocess-expanded', + title: translate('Create expanded SubProcess'), + action: { + dragstart: createSubprocess, + click: createSubprocess + } + }, + 'create.participant-expanded': { + group: 'collaboration', + className: 'bpmn-icon-participant', + title: translate('Create Pool/Participant'), + action: { + dragstart: createParticipant, + click: createParticipant + } + }, + 'create.group': createAction( + 'bpmn:Group', + 'artifact', + 'bpmn-icon-group', + translate('Create Group') + ) + }) + + return actions +} diff --git a/src/components/bpmnProcessDesigner/package/designer/plugins/translate/customTranslate.js b/src/components/bpmnProcessDesigner/package/designer/plugins/translate/customTranslate.js new file mode 100644 index 0000000..d1796d3 --- /dev/null +++ b/src/components/bpmnProcessDesigner/package/designer/plugins/translate/customTranslate.js @@ -0,0 +1,42 @@ +// import translations from "./zh"; +// +// export default function customTranslate(template, replacements) { +// replacements = replacements || {}; +// +// // Translate +// template = translations[template] || template; +// +// // Replace +// return template.replace(/{([^}]+)}/g, function(_, key) { +// let str = replacements[key]; +// if ( +// translations[replacements[key]] !== null && +// translations[replacements[key]] !== "undefined" +// ) { +// // eslint-disable-next-line no-mixed-spaces-and-tabs +// str = translations[replacements[key]]; +// // eslint-disable-next-line no-mixed-spaces-and-tabs +// } +// return str || "{" + key + "}"; +// }); +// } + +export default function customTranslate(translations) { + return function (template, replacements) { + replacements = replacements || {}; + // 将模板和翻译字典的键统一转换为小写进行匹配 + const lowerTemplate = template.toLowerCase(); + const translation = Object.keys(translations).find(key => key.toLowerCase() === lowerTemplate); + + // 如果找到匹配的翻译,使用翻译后的模板 + if (translation) { + template = translations[translation]; + } + + // 替换模板中的占位符 + return template.replace(/{([^}]+)}/g, function (_, key) { + // 如果替换值存在,返回替换值;否则返回原始占位符 + return replacements[key] !== undefined ? replacements[key] : `{${key}}`; + }); + }; +} \ No newline at end of file diff --git a/src/components/bpmnProcessDesigner/package/designer/plugins/translate/zh.js b/src/components/bpmnProcessDesigner/package/designer/plugins/translate/zh.js new file mode 100644 index 0000000..4407e66 --- /dev/null +++ b/src/components/bpmnProcessDesigner/package/designer/plugins/translate/zh.js @@ -0,0 +1,251 @@ +/** + * This is a sample file that should be replaced with the actual translation. + * + * Checkout https://github.com/bpmn-io/bpmn-js-i18n for a list of available + * translations and labels to translate. + */ +export default { + // 添加部分 + 'Append EndEvent': '追加结束事件', + 'Append Gateway': '追加网关', + 'Append Task': '追加任务', + 'Append Intermediate/Boundary Event': '追加中间抛出事件/边界事件', + TextAnnotation: '文本注释', + 'Activate the global connect tool': '激活全局连接工具', + 'Append {type}': '添加 {type}', + 'Add Lane above': '在上面添加道', + 'Divide into two Lanes': '分割成两个道', + 'Divide into three Lanes': '分割成三个道', + 'Add Lane below': '在下面添加道', + 'Append compensation activity': '追加补偿活动', + 'Change type': '修改类型', + 'Connect using Association': '使用关联连接', + 'Connect using Sequence/MessageFlow or Association': '使用顺序/消息流或者关联连接', + 'Connect using DataInputAssociation': '使用数据输入关联连接', + Remove: '移除', + 'Activate the hand tool': '激活抓手工具', + 'Activate the lasso tool': '激活套索工具', + 'Activate the create/remove space tool': '激活创建/删除空间工具', + 'Create expanded SubProcess': '创建扩展子过程', + 'Create IntermediateThrowEvent/BoundaryEvent': '创建中间抛出事件/边界事件', + 'Create Pool/Participant': '创建池/参与者', + 'Participant Multiplicity': '参与者多重性', + 'Empty pool/participant (removes content)': '清空池/参与者(移除内容)', + 'Empty pool/participant': '收缩池/参与者', + 'Expanded pool/participant': '展开池/参与者', + 'Parallel Multi-Instance': '并行多重事件', + 'Sequential Multi-Instance': '时序多重事件', + DataObjectReference: '数据对象参考', + DataStoreReference: '数据存储参考', + 'Data object reference': '数据对象引用 ', + 'Data store reference': '数据存储引用 ', + Loop: '循环', + 'Ad-hoc': '即席', + 'Create {type}': '创建 {type}', + Task: '任务', + 'Send Task': '发送任务', + 'Receive Task': '接收任务', + 'User Task': '用户任务', + 'Manual Task': '手工任务', + 'Business Rule Task': '业务规则任务', + 'Service Task': '服务任务', + 'Script Task': '脚本任务', + 'Call Activity': '调用活动', + 'Sub-Process (collapsed)': '子流程(折叠的)', + 'Sub-Process (expanded)': '子流程(展开的)', + 'Ad-hoc sub-process': '即席子流程', + 'Ad-hoc sub-process (collapsed)': '即席子流程(折叠的)', + 'Ad-hoc sub-process (expanded)': '即席子流程(展开的)', + 'Start Event': '开始事件', + StartEvent: '开始事件', + 'Intermediate Throw Event': '中间事件', + 'End Event': '结束事件', + EndEvent: '结束事件', + 'Create StartEvent': '创建开始事件', + 'Create EndEvent': '创建结束事件', + 'Create Task': '创建任务', + 'Create User Task': '创建用户任务', + 'Create Call Activity': '创建调用活动', + 'Create Service Task': '创建服务任务', + 'Create Gateway': '创建网关', + 'Create DataObjectReference': '创建数据对象', + 'Create DataStoreReference': '创建数据存储', + 'Create Group': '创建分组', + 'Create Intermediate/Boundary Event': '创建中间/边界事件', + 'Message Start Event': '消息开始事件', + 'Timer Start Event': '定时开始事件', + 'Conditional Start Event': '条件开始事件', + 'Signal Start Event': '信号开始事件', + 'Error Start Event': '错误开始事件', + 'Escalation Start Event': '升级开始事件', + 'Compensation Start Event': '补偿开始事件', + 'Message Start Event (non-interrupting)': '消息开始事件(非中断)', + 'Timer Start Event (non-interrupting)': '定时开始事件(非中断)', + 'Conditional Start Event (non-interrupting)': '条件开始事件(非中断)', + 'Signal Start Event (non-interrupting)': '信号开始事件(非中断)', + 'Escalation Start Event (non-interrupting)': '升级开始事件(非中断)', + 'Message Intermediate Catch Event': '消息中间捕获事件', + 'Message Intermediate Throw Event': '消息中间抛出事件', + 'Timer Intermediate Catch Event': '定时中间捕获事件', + 'Escalation Intermediate Throw Event': '升级中间抛出事件', + 'Conditional Intermediate Catch Event': '条件中间捕获事件', + 'Link Intermediate Catch Event': '链接中间捕获事件', + 'Link Intermediate Throw Event': '链接中间抛出事件', + 'Compensation Intermediate Throw Event': '补偿中间抛出事件', + 'Signal Intermediate Catch Event': '信号中间捕获事件', + 'Signal Intermediate Throw Event': '信号中间抛出事件', + 'Message End Event': '消息结束事件', + 'Escalation End Event': '定时结束事件', + 'Error End Event': '错误结束事件', + 'Cancel End Event': '取消结束事件', + 'Compensation End Event': '补偿结束事件', + 'Signal End Event': '信号结束事件', + 'Terminate End Event': '终止结束事件', + 'Message Boundary Event': '消息边界事件', + 'Message Boundary Event (non-interrupting)': '消息边界事件(非中断)', + 'Timer Boundary Event': '定时边界事件', + 'Timer Boundary Event (non-interrupting)': '定时边界事件(非中断)', + 'Escalation Boundary Event': '升级边界事件', + 'Escalation Boundary Event (non-interrupting)': '升级边界事件(非中断)', + 'Conditional Boundary Event': '条件边界事件', + 'Conditional Boundary Event (non-interrupting)': '条件边界事件(非中断)', + 'Error Boundary Event': '错误边界事件', + 'Cancel Boundary Event': '取消边界事件', + 'Signal Boundary Event': '信号边界事件', + 'Signal Boundary Event (non-interrupting)': '信号边界事件(非中断)', + 'Compensation Boundary Event': '补偿边界事件', + 'Exclusive Gateway': '互斥网关', + 'Parallel Gateway': '并行网关', + 'Inclusive Gateway': '相容网关', + 'Complex Gateway': '复杂网关', + 'Event-based Gateway': '事件网关', + Transaction: '转运', + 'sub-process': '子流程', + 'Event sub-process': '事件子流程', + 'Collapsed Pool': '折叠池', + 'Expanded Pool': '展开池', + + // Errors + 'no parent for {element} in {parent}': '在{parent}里,{element}没有父类', + 'no shape type specified': '没有指定的形状类型', + 'flow elements must be children of pools/participants': '流元素必须是池/参与者的子类', + 'out of bounds release': 'out of bounds release', + 'more than {count} child lanes': '子道大于{count} ', + 'element required': '元素不能为空', + 'diagram not part of bpmn:Definitions': '流程图不符合bpmn规范', + 'no diagram to display': '没有可展示的流程图', + 'no process or collaboration to display': '没有可展示的流程/协作', + 'element {element} referenced by {referenced}#{property} not yet drawn': + '由{referenced}#{property}引用的{element}元素仍未绘制', + 'already rendered {element}': '{element} 已被渲染', + 'failed to import {element}': '导入{element}失败', + //属性面板的参数 + Id: '编号', + Name: '名称', + General: '常规', + Details: '详情', + 'Message Name': '消息名称', + Message: '消息', + Initiator: '创建者', + 'Asynchronous Continuations': '持续异步', + 'Asynchronous Before': '异步前', + 'Asynchronous After': '异步后', + 'Job Configuration': '工作配置', + Exclusive: '排除', + 'Job Priority': '工作优先级', + 'Retry Time Cycle': '重试时间周期', + Documentation: '文档', + 'Element Documentation': '元素文档', + 'History Configuration': '历史配置', + 'History Time To Live': '历史的生存时间', + Forms: '表单', + 'Form Key': '表单key', + 'Form Fields': '表单字段', + 'Business Key': '业务key', + 'Form Field': '表单字段', + ID: '编号', + Type: '类型', + Label: '名称', + 'Default Value': '默认值', + 'Default Flow': '默认流转路径', + 'Conditional Flow': '条件流转路径', + 'Sequence Flow': '普通流转路径', + Validation: '校验', + 'Add Constraint': '添加约束', + Config: '配置', + Properties: '属性', + 'Add Property': '添加属性', + Value: '值', + Listeners: '监听器', + 'Execution Listener': '执行监听', + 'Event Type': '事件类型', + 'Listener Type': '监听器类型', + 'Java Class': 'Java类', + Expression: '表达式', + 'Must provide a value': '必须提供一个值', + 'Delegate Expression': '代理表达式', + Script: '脚本', + 'Script Format': '脚本格式', + 'Script Type': '脚本类型', + 'Inline Script': '内联脚本', + 'External Script': '外部脚本', + Resource: '资源', + 'Field Injection': '字段注入', + Extensions: '扩展', + 'Input/Output': '输入/输出', + 'Input Parameters': '输入参数', + 'Output Parameters': '输出参数', + Parameters: '参数', + 'Output Parameter': '输出参数', + 'Timer Definition Type': '定时器定义类型', + 'Timer Definition': '定时器定义', + Date: '日期', + Duration: '持续', + Cycle: '循环', + Signal: '信号', + 'Signal Name': '信号名称', + Escalation: '升级', + Error: '错误', + 'Link Name': '链接名称', + Condition: '条件名称', + 'Variable Name': '变量名称', + 'Variable Event': '变量事件', + 'Specify more than one variable change event as a comma separated list.': + '多个变量事件以逗号隔开', + 'Wait for Completion': '等待完成', + 'Activity Ref': '活动参考', + 'Version Tag': '版本标签', + Executable: '可执行文件', + 'External Task Configuration': '扩展任务配置', + 'Task Priority': '任务优先级', + External: '外部', + Connector: '连接器', + 'Must configure Connector': '必须配置连接器', + 'Connector Id': '连接器编号', + Implementation: '实现方式', + 'Field Injections': '字段注入', + Fields: '字段', + 'Result Variable': '结果变量', + Topic: '主题', + 'Configure Connector': '配置连接器', + 'Input Parameter': '输入参数', + Assignee: '代理人', + 'Candidate Users': '候选用户', + 'Candidate Groups': '候选组', + 'Due Date': '到期时间', + 'Follow Up Date': '跟踪日期', + Priority: '优先级', + 'The follow up date as an EL expression (e.g. ${someDate} or an ISO date (e.g. 2015-06-26T09:54:00)': + '跟踪日期必须符合EL表达式,如: ${someDate} ,或者一个ISO标准日期,如:2015-06-26T09:54:00', + 'The due date as an EL expression (e.g. ${someDate} or an ISO date (e.g. 2015-06-26T09:54:00)': + '跟踪日期必须符合EL表达式,如: ${someDate} ,或者一个ISO标准日期,如:2015-06-26T09:54:00', + Variables: '变量', + 'Candidate Starter Configuration': '候选人起动器配置', + 'Candidate Starter Groups': '候选人起动器组', + 'This maps to the process definition key.': '这映射到流程定义键。', + 'Candidate Starter Users': '候选人起动器的用户', + 'Specify more than one user as a comma separated list.': '指定多个用户作为逗号分隔的列表。', + 'Tasklist Configuration': 'Tasklist配置', + Startable: '启动', + 'Specify more than one group as a comma separated list.': '指定多个组作为逗号分隔的列表。' +} diff --git a/src/components/bpmnProcessDesigner/package/index.ts b/src/components/bpmnProcessDesigner/package/index.ts new file mode 100644 index 0000000..ce44a3c --- /dev/null +++ b/src/components/bpmnProcessDesigner/package/index.ts @@ -0,0 +1,11 @@ +import MyProcessDesigner from './designer' +import MyProcessPenal from './penal' +import MyProcessViewer from './designer/index2' + +import './theme/index.scss' +import 'bpmn-js/dist/assets/diagram-js.css' +import 'bpmn-js/dist/assets/bpmn-font/css/bpmn.css' +import 'bpmn-js/dist/assets/bpmn-font/css/bpmn-codes.css' +import 'bpmn-js/dist/assets/bpmn-font/css/bpmn-embedded.css' + +export { MyProcessDesigner, MyProcessPenal, MyProcessViewer } diff --git a/src/components/bpmnProcessDesigner/package/palette/ProcessPalette.vue b/src/components/bpmnProcessDesigner/package/palette/ProcessPalette.vue new file mode 100644 index 0000000..5810514 --- /dev/null +++ b/src/components/bpmnProcessDesigner/package/palette/ProcessPalette.vue @@ -0,0 +1,47 @@ + + + + + diff --git a/src/components/bpmnProcessDesigner/package/penal/PropertiesPanel.vue b/src/components/bpmnProcessDesigner/package/penal/PropertiesPanel.vue new file mode 100644 index 0000000..5566487 --- /dev/null +++ b/src/components/bpmnProcessDesigner/package/penal/PropertiesPanel.vue @@ -0,0 +1,256 @@ + + diff --git a/src/components/bpmnProcessDesigner/package/penal/base/ElementBaseInfo.vue b/src/components/bpmnProcessDesigner/package/penal/base/ElementBaseInfo.vue new file mode 100644 index 0000000..8b1ef21 --- /dev/null +++ b/src/components/bpmnProcessDesigner/package/penal/base/ElementBaseInfo.vue @@ -0,0 +1,170 @@ + + diff --git a/src/components/bpmnProcessDesigner/package/penal/custom-config/ElementCustomConfig.vue b/src/components/bpmnProcessDesigner/package/penal/custom-config/ElementCustomConfig.vue new file mode 100644 index 0000000..ac64b79 --- /dev/null +++ b/src/components/bpmnProcessDesigner/package/penal/custom-config/ElementCustomConfig.vue @@ -0,0 +1,39 @@ + + + + + diff --git a/src/components/bpmnProcessDesigner/package/penal/custom-config/components/BoundaryEventTimer.vue b/src/components/bpmnProcessDesigner/package/penal/custom-config/components/BoundaryEventTimer.vue new file mode 100644 index 0000000..f1b25d5 --- /dev/null +++ b/src/components/bpmnProcessDesigner/package/penal/custom-config/components/BoundaryEventTimer.vue @@ -0,0 +1,263 @@ + + + + + diff --git a/src/components/bpmnProcessDesigner/package/penal/custom-config/components/UserTaskCustomConfig.vue b/src/components/bpmnProcessDesigner/package/penal/custom-config/components/UserTaskCustomConfig.vue new file mode 100644 index 0000000..80a9029 --- /dev/null +++ b/src/components/bpmnProcessDesigner/package/penal/custom-config/components/UserTaskCustomConfig.vue @@ -0,0 +1,745 @@ + + + + + + diff --git a/src/components/bpmnProcessDesigner/package/penal/custom-config/data.ts b/src/components/bpmnProcessDesigner/package/penal/custom-config/data.ts new file mode 100644 index 0000000..a45355e --- /dev/null +++ b/src/components/bpmnProcessDesigner/package/penal/custom-config/data.ts @@ -0,0 +1,13 @@ +import UserTaskCustomConfig from './components/UserTaskCustomConfig.vue' +import BoundaryEventTimer from './components/BoundaryEventTimer.vue' + +export const CustomConfigMap = { + UserTask: { + name: '用户任务', + componet: UserTaskCustomConfig + }, + BoundaryEventTimerEventDefinition: { + name: '定时边界事件(非中断)', + componet: BoundaryEventTimer + } +} diff --git a/src/components/bpmnProcessDesigner/package/penal/flow-condition/FlowCondition.vue b/src/components/bpmnProcessDesigner/package/penal/flow-condition/FlowCondition.vue new file mode 100644 index 0000000..a84edfe --- /dev/null +++ b/src/components/bpmnProcessDesigner/package/penal/flow-condition/FlowCondition.vue @@ -0,0 +1,199 @@ + + + diff --git a/src/components/bpmnProcessDesigner/package/penal/form/ElementForm.vue b/src/components/bpmnProcessDesigner/package/penal/form/ElementForm.vue new file mode 100644 index 0000000..9825fcc --- /dev/null +++ b/src/components/bpmnProcessDesigner/package/penal/form/ElementForm.vue @@ -0,0 +1,311 @@ + + + diff --git a/src/components/bpmnProcessDesigner/package/penal/index.js b/src/components/bpmnProcessDesigner/package/penal/index.js new file mode 100644 index 0000000..7fa5617 --- /dev/null +++ b/src/components/bpmnProcessDesigner/package/penal/index.js @@ -0,0 +1,7 @@ +import MyPropertiesPanel from './PropertiesPanel.vue' + +MyPropertiesPanel.install = function (Vue) { + Vue.component(MyPropertiesPanel.name, MyPropertiesPanel) +} + +export default MyPropertiesPanel diff --git a/src/components/bpmnProcessDesigner/package/penal/listeners/ElementListeners.vue b/src/components/bpmnProcessDesigner/package/penal/listeners/ElementListeners.vue new file mode 100644 index 0000000..d42ac5f --- /dev/null +++ b/src/components/bpmnProcessDesigner/package/penal/listeners/ElementListeners.vue @@ -0,0 +1,471 @@ + + diff --git a/src/components/bpmnProcessDesigner/package/penal/listeners/ProcessListenerDialog.vue b/src/components/bpmnProcessDesigner/package/penal/listeners/ProcessListenerDialog.vue new file mode 100644 index 0000000..23a56f9 --- /dev/null +++ b/src/components/bpmnProcessDesigner/package/penal/listeners/ProcessListenerDialog.vue @@ -0,0 +1,85 @@ + + + diff --git a/src/components/bpmnProcessDesigner/package/penal/listeners/UserTaskListeners.vue b/src/components/bpmnProcessDesigner/package/penal/listeners/UserTaskListeners.vue new file mode 100644 index 0000000..fe842eb --- /dev/null +++ b/src/components/bpmnProcessDesigner/package/penal/listeners/UserTaskListeners.vue @@ -0,0 +1,509 @@ + + diff --git a/src/components/bpmnProcessDesigner/package/penal/listeners/template.js b/src/components/bpmnProcessDesigner/package/penal/listeners/template.js new file mode 100644 index 0000000..430dc64 --- /dev/null +++ b/src/components/bpmnProcessDesigner/package/penal/listeners/template.js @@ -0,0 +1,178 @@ +export const template = (isTaskListener) => { + return ` +
+ + + + + + + + +
+ 添加监听器 +
+ + + + + + + + + + + + + + + + + + + + + + + + + + ${ + isTaskListener + ? "" + + "" + + "" + + "" + + "" + + "" + + '' + + '' + + "" + + "" + + '' + : '' + } + + +

+ 注入字段: + 添加字段 +

+ + + + + + + + + + +
+ 取 消 + 保 存 +
+
+ + + + + + + + + + + + + + + + + + + + + +
+ ` +} diff --git a/src/components/bpmnProcessDesigner/package/penal/listeners/utilSelf.ts b/src/components/bpmnProcessDesigner/package/penal/listeners/utilSelf.ts new file mode 100644 index 0000000..d77ba95 --- /dev/null +++ b/src/components/bpmnProcessDesigner/package/penal/listeners/utilSelf.ts @@ -0,0 +1,114 @@ +/** 监听器注入字段表单 */ +export interface ListenerFieldForm { + name?: string + fieldType?: string + string?: string + expression?: string + [key: string]: unknown +} + +/** 监听器详情表单(执行监听器、任务监听器共用) */ +export interface ListenerForm { + id?: string + event?: string + listenerType?: string + class?: string + expression?: string + delegateExpression?: string + scriptFormat?: string + scriptType?: string + value?: string + resource?: string + eventDefinitionType?: string + eventTimeDefinitions?: string + fields?: ListenerFieldForm[] + [key: string]: unknown +} + +// 初始化表单数据 +export function initListenerForm(listener) { + let self = { + ...listener + } + if (listener.script) { + self = { + ...listener, + ...listener.script, + scriptType: listener.script.resource ? 'externalScript' : 'inlineScript' + } + } + if (listener.event === 'timeout' && listener.eventDefinitions) { + if (listener.eventDefinitions.length) { + let k = '' + for (const key in listener.eventDefinitions[0]) { + if (key.indexOf('time') !== -1) { + k = key + self.eventDefinitionType = key.replace('time', '').toLowerCase() + } + } + self.eventTimeDefinitions = listener.eventDefinitions[0][k].body + } + } + return self +} + +export function initListenerType(listener) { + let listenerType + if (listener.class) listenerType = 'classListener' + if (listener.expression) listenerType = 'expressionListener' + if (listener.delegateExpression) listenerType = 'delegateExpressionListener' + if (listener.script) listenerType = 'scriptListener' + return { + ...JSON.parse(JSON.stringify(listener)), + ...(listener.script ?? {}), + listenerType: listenerType + } +} + +/** 将 ProcessListenerDO 转换成 initListenerForm 想同的 Form 对象 */ +export function initListenerForm2(processListener) { + if (processListener.valueType === 'class') { + return { + listenerType: 'classListener', + class: processListener.value, + event: processListener.event, + fields: [] + } + } else if (processListener.valueType === 'expression') { + return { + listenerType: 'expressionListener', + expression: processListener.value, + event: processListener.event, + fields: [] + } + } else if (processListener.valueType === 'delegateExpression') { + return { + listenerType: 'delegateExpressionListener', + delegateExpression: processListener.value, + event: processListener.event, + fields: [] + } + } + throw new Error('未知的监听器类型') +} + +export const listenerType = { + classListener: 'Java 类', + expressionListener: '表达式', + delegateExpressionListener: '代理表达式', + scriptListener: '脚本' +} + +export const eventType = { + create: '创建', + assignment: '指派', + complete: '完成', + delete: '删除', + update: '更新', + timeout: '超时' +} + +export const fieldType = { + string: '字符串', + expression: '表达式' +} diff --git a/src/components/bpmnProcessDesigner/package/penal/multi-instance/ElementMultiInstance.vue b/src/components/bpmnProcessDesigner/package/penal/multi-instance/ElementMultiInstance.vue new file mode 100644 index 0000000..f30a7df --- /dev/null +++ b/src/components/bpmnProcessDesigner/package/penal/multi-instance/ElementMultiInstance.vue @@ -0,0 +1,387 @@ + + + diff --git a/src/components/bpmnProcessDesigner/package/penal/other/ElementOtherConfig.vue b/src/components/bpmnProcessDesigner/package/penal/other/ElementOtherConfig.vue new file mode 100644 index 0000000..fa0991f --- /dev/null +++ b/src/components/bpmnProcessDesigner/package/penal/other/ElementOtherConfig.vue @@ -0,0 +1,56 @@ + + + diff --git a/src/components/bpmnProcessDesigner/package/penal/properties/ElementProperties.vue b/src/components/bpmnProcessDesigner/package/penal/properties/ElementProperties.vue new file mode 100644 index 0000000..a1f1a42 --- /dev/null +++ b/src/components/bpmnProcessDesigner/package/penal/properties/ElementProperties.vue @@ -0,0 +1,184 @@ + + + diff --git a/src/components/bpmnProcessDesigner/package/penal/signal-message/SignalAndMessage.vue b/src/components/bpmnProcessDesigner/package/penal/signal-message/SignalAndMessage.vue new file mode 100644 index 0000000..e74cdec --- /dev/null +++ b/src/components/bpmnProcessDesigner/package/penal/signal-message/SignalAndMessage.vue @@ -0,0 +1,271 @@ + + diff --git a/src/components/bpmnProcessDesigner/package/penal/task/ElementTask.vue b/src/components/bpmnProcessDesigner/package/penal/task/ElementTask.vue new file mode 100644 index 0000000..50984c7 --- /dev/null +++ b/src/components/bpmnProcessDesigner/package/penal/task/ElementTask.vue @@ -0,0 +1,79 @@ + + + diff --git a/src/components/bpmnProcessDesigner/package/penal/task/data.ts b/src/components/bpmnProcessDesigner/package/penal/task/data.ts new file mode 100644 index 0000000..805c9ac --- /dev/null +++ b/src/components/bpmnProcessDesigner/package/penal/task/data.ts @@ -0,0 +1,36 @@ +import UserTask from './task-components/UserTask.vue' +import ServiceTask from './task-components/ServiceTask.vue' +import ScriptTask from './task-components/ScriptTask.vue' +import ReceiveTask from './task-components/ReceiveTask.vue' +import CallActivity from './task-components/CallActivity.vue' + +export const installedComponent = { + UserTask: { + name: '用户任务', + component: UserTask + }, + ServiceTask: { + name: '服务任务', + component: ServiceTask + }, + ScriptTask: { + name: '脚本任务', + component: ScriptTask + }, + ReceiveTask: { + name: '接收任务', + component: ReceiveTask + }, + CallActivity: { + name: '调用活动', + component: CallActivity + } +} + +export const getTaskCollapseItemName = (elementType) => { + return installedComponent[elementType].name +} + +export const isTaskCollapseItemShow = (elementType) => { + return installedComponent[elementType] +} diff --git a/src/components/bpmnProcessDesigner/package/penal/task/task-components/CallActivity.vue b/src/components/bpmnProcessDesigner/package/penal/task/task-components/CallActivity.vue new file mode 100644 index 0000000..b2ea8aa --- /dev/null +++ b/src/components/bpmnProcessDesigner/package/penal/task/task-components/CallActivity.vue @@ -0,0 +1,281 @@ + + + + + diff --git a/src/components/bpmnProcessDesigner/package/penal/task/task-components/HttpHeaderEditor.vue b/src/components/bpmnProcessDesigner/package/penal/task/task-components/HttpHeaderEditor.vue new file mode 100644 index 0000000..5d0a133 --- /dev/null +++ b/src/components/bpmnProcessDesigner/package/penal/task/task-components/HttpHeaderEditor.vue @@ -0,0 +1,178 @@ + + + + + diff --git a/src/components/bpmnProcessDesigner/package/penal/task/task-components/ProcessExpressionDialog.vue b/src/components/bpmnProcessDesigner/package/penal/task/task-components/ProcessExpressionDialog.vue new file mode 100644 index 0000000..8f7fb25 --- /dev/null +++ b/src/components/bpmnProcessDesigner/package/penal/task/task-components/ProcessExpressionDialog.vue @@ -0,0 +1,70 @@ + + + diff --git a/src/components/bpmnProcessDesigner/package/penal/task/task-components/ReceiveTask.vue b/src/components/bpmnProcessDesigner/package/penal/task/task-components/ReceiveTask.vue new file mode 100644 index 0000000..0f4f564 --- /dev/null +++ b/src/components/bpmnProcessDesigner/package/penal/task/task-components/ReceiveTask.vue @@ -0,0 +1,130 @@ + + + diff --git a/src/components/bpmnProcessDesigner/package/penal/task/task-components/ScriptTask.vue b/src/components/bpmnProcessDesigner/package/penal/task/task-components/ScriptTask.vue new file mode 100644 index 0000000..e0ccce7 --- /dev/null +++ b/src/components/bpmnProcessDesigner/package/penal/task/task-components/ScriptTask.vue @@ -0,0 +1,108 @@ + + + diff --git a/src/components/bpmnProcessDesigner/package/penal/task/task-components/ServiceTask.vue b/src/components/bpmnProcessDesigner/package/penal/task/task-components/ServiceTask.vue new file mode 100644 index 0000000..eb7fb90 --- /dev/null +++ b/src/components/bpmnProcessDesigner/package/penal/task/task-components/ServiceTask.vue @@ -0,0 +1,400 @@ + + + diff --git a/src/components/bpmnProcessDesigner/package/penal/task/task-components/UserTask.vue b/src/components/bpmnProcessDesigner/package/penal/task/task-components/UserTask.vue new file mode 100644 index 0000000..a0256d9 --- /dev/null +++ b/src/components/bpmnProcessDesigner/package/penal/task/task-components/UserTask.vue @@ -0,0 +1,558 @@ + + + diff --git a/src/components/bpmnProcessDesigner/package/penal/time-event-config/CycleConfig.vue b/src/components/bpmnProcessDesigner/package/penal/time-event-config/CycleConfig.vue new file mode 100644 index 0000000..302fe73 --- /dev/null +++ b/src/components/bpmnProcessDesigner/package/penal/time-event-config/CycleConfig.vue @@ -0,0 +1,285 @@ + + diff --git a/src/components/bpmnProcessDesigner/package/penal/time-event-config/DurationConfig.vue b/src/components/bpmnProcessDesigner/package/penal/time-event-config/DurationConfig.vue new file mode 100644 index 0000000..1aa6a0b --- /dev/null +++ b/src/components/bpmnProcessDesigner/package/penal/time-event-config/DurationConfig.vue @@ -0,0 +1,86 @@ + + + diff --git a/src/components/bpmnProcessDesigner/package/penal/time-event-config/TimeEventConfig.vue b/src/components/bpmnProcessDesigner/package/penal/time-event-config/TimeEventConfig.vue new file mode 100644 index 0000000..5a3c2c2 --- /dev/null +++ b/src/components/bpmnProcessDesigner/package/penal/time-event-config/TimeEventConfig.vue @@ -0,0 +1,311 @@ + + + + + diff --git a/src/components/bpmnProcessDesigner/package/theme/element-variables.scss b/src/components/bpmnProcessDesigner/package/theme/element-variables.scss new file mode 100644 index 0000000..0646f8e --- /dev/null +++ b/src/components/bpmnProcessDesigner/package/theme/element-variables.scss @@ -0,0 +1,70 @@ +/* 改变主题色变量 */ +$--color-primary: #1890ff; +$--color-danger: #ff4d4f; + +/* 改变 icon 字体路径变量,必需 */ +$--font-path: '~element-ui/lib/theme-chalk/fonts'; + +@use '~element-ui/packages/theme-chalk/src/index'; + +.el-table td, +.el-table th { + color: #333; +} +.el-drawer__header { + padding: 16px 16px 8px 16px; + margin: 0; + line-height: 24px; + font-size: 18px; + color: #303133; + box-sizing: border-box; + border-bottom: 1px solid #e8e8e8; +} +div[class^='el-drawer']:focus, +span:focus { + outline: none; +} +.el-drawer__body { + box-sizing: border-box; + padding: 16px; + width: 100%; + overflow-y: auto; +} + +.el-dialog { + margin-top: 50vh !important; + transform: translateY(-50%); + overflow: hidden; +} +.el-dialog__wrapper { + overflow: hidden; + max-height: 100vh; +} +.el-dialog__header { + padding: 16px 16px 8px 16px; + box-sizing: border-box; + border-bottom: 1px solid #e8e8e8; +} +.el-dialog__body { + padding: 16px; + max-height: 80vh; + box-sizing: border-box; + overflow-y: auto; +} +.el-dialog__footer { + padding: 16px; + box-sizing: border-box; + border-top: 1px solid #e8e8e8; +} +.el-dialog__close { + font-weight: 600; +} +.el-select { + width: 100%; +} +.el-divider:not(.el-divider--horizontal) { + margin: 0 8px; +} +.el-divider.el-divider--horizontal { + margin: 16px 0; +} diff --git a/src/components/bpmnProcessDesigner/package/theme/index.scss b/src/components/bpmnProcessDesigner/package/theme/index.scss new file mode 100644 index 0000000..2404760 --- /dev/null +++ b/src/components/bpmnProcessDesigner/package/theme/index.scss @@ -0,0 +1,117 @@ +@use './process-designer.scss'; +@use './process-panel.scss'; + +$success-color: #4eb819; +$primary-color: #409EFF; +$danger-color: #F56C6C; +$cancel-color: #909399; + +.process-viewer { + position: relative; + border: 1px solid #EFEFEF; + background: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PHBhdHRlcm4gaWQ9ImEiIHdpZHRoPSI0MCIgaGVpZ2h0PSI0MCIgcGF0dGVyblVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+PHBhdGggZD0iTTAgMTBoNDBNMTAgMHY0ME0wIDIwaDQwTTIwIDB2NDBNMCAzMGg0ME0zMCAwdjQwIiBmaWxsPSJub25lIiBzdHJva2U9IiNlMGUwZTAiIG9wYWNpdHk9Ii4yIi8+PHBhdGggZD0iTTQwIDBIMHY0MCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjZTBlMGUwIi8+PC9wYXR0ZXJuPjwvZGVmcz48cmVjdCB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSJ1cmwoI2EpIi8+PC9zdmc+') repeat!important; + + .success-arrow { + fill: $success-color; + stroke: $success-color; + } + + .success-conditional { + fill: white; + stroke: $success-color; + } + + .success.djs-connection { + .djs-visual path { + stroke: $success-color!important; + //marker-end: url(#sequenceflow-end-white-success)!important; + } + } + + .success.djs-connection.condition-expression { + .djs-visual path { + //marker-start: url(#conditional-flow-marker-white-success)!important; + } + } + + .success.djs-shape { + .djs-visual rect { + stroke: $success-color!important; + fill: $success-color!important; + fill-opacity: 0.15!important; + } + + .djs-visual polygon { + stroke: $success-color!important; + } + + .djs-visual path:nth-child(2) { + stroke: $success-color!important; + fill: $success-color!important; + } + + .djs-visual circle { + stroke: $success-color!important; + fill: $success-color!important; + fill-opacity: 0.15!important; + } + } + + .primary.djs-shape { + .djs-visual rect { + stroke: $primary-color!important; + fill: $primary-color!important; + fill-opacity: 0.15!important; + } + + .djs-visual polygon { + stroke: $primary-color!important; + } + + .djs-visual circle { + stroke: $primary-color!important; + fill: $primary-color!important; + fill-opacity: 0.15!important; + } + } + + .danger.djs-shape { + .djs-visual rect { + stroke: $danger-color!important; + fill: $danger-color!important; + fill-opacity: 0.15!important; + } + + .djs-visual polygon { + stroke: $danger-color!important; + } + + .djs-visual circle { + stroke: $danger-color!important; + fill: $danger-color!important; + fill-opacity: 0.15!important; + } + } + + .cancel.djs-shape { + .djs-visual rect { + stroke: $cancel-color!important; + fill: $cancel-color!important; + fill-opacity: 0.15!important; + } + + .djs-visual polygon { + stroke: $cancel-color!important; + } + + .djs-visual circle { + stroke: $cancel-color!important; + fill: $cancel-color!important; + fill-opacity: 0.15!important; + } + } +} + +.process-viewer .djs-tooltip-container, .process-viewer .djs-overlay-container, .process-viewer .djs-palette { + display: none; +} diff --git a/src/components/bpmnProcessDesigner/package/theme/process-designer.scss b/src/components/bpmnProcessDesigner/package/theme/process-designer.scss new file mode 100644 index 0000000..bca0258 --- /dev/null +++ b/src/components/bpmnProcessDesigner/package/theme/process-designer.scss @@ -0,0 +1,159 @@ +@use 'bpmn-js-token-simulation/assets/css/bpmn-js-token-simulation.css'; + +// 边框被 token-simulation 样式覆盖了 +.djs-palette { + background: var(--palette-background-color); + border: solid 1px var(--palette-border-color) !important; + border-radius: 2px; +} + +.my-process-designer { + display: flex; + flex-direction: column; + width: 100%; + height: 100%; + box-sizing: border-box; + .my-process-designer__header { + width: 100%; + min-height: 36px; + .el-button { + text-align: center; + } + .el-button-group { + margin: 4px; + } + .el-tooltip__popper { + .el-button { + width: 100%; + text-align: left; + padding-left: 8px; + padding-right: 8px; + } + .el-button:hover { + background: rgba(64, 158, 255, 0.8); + color: #ffffff; + } + } + .align { + position: relative; + i { + &:after { + content: '|'; + position: absolute; + // transform: rotate(90deg) translate(200%, 60%); + transform: rotate(180deg) translate(271%, -10%); + } + } + } + .align.align-left i { + transform: rotate(90deg); + } + .align.align-right i { + transform: rotate(-90deg); + } + .align.align-top i { + transform: rotate(180deg); + } + .align.align-bottom i { + transform: rotate(0deg); + } + .align.align-center i { + transform: rotate(0deg); + &:after { + // transform: rotate(90deg) translate(0, 60%); + transform: rotate(0deg) translate(-0%, -5%); + } + } + .align.align-middle i { + transform: rotate(-90deg); + &:after { + // transform: rotate(90deg) translate(0, 60%); + transform: rotate(0deg) translate(0, -10%); + } + } + } + .my-process-designer__container { + display: inline-flex; + width: 100%; + flex: 1; + .my-process-designer__canvas { + flex: 1; + height: 100%; + position: relative; + background: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PHBhdHRlcm4gaWQ9ImEiIHdpZHRoPSI0MCIgaGVpZ2h0PSI0MCIgcGF0dGVyblVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+PHBhdGggZD0iTTAgMTBoNDBNMTAgMHY0ME0wIDIwaDQwTTIwIDB2NDBNMCAzMGg0ME0zMCAwdjQwIiBmaWxsPSJub25lIiBzdHJva2U9IiNlMGUwZTAiIG9wYWNpdHk9Ii4yIi8+PHBhdGggZD0iTTQwIDBIMHY0MCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjZTBlMGUwIi8+PC9wYXR0ZXJuPjwvZGVmcz48cmVjdCB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSJ1cmwoI2EpIi8+PC9zdmc+') + repeat !important; + div.toggle-mode { + display: none; + } + } + .my-process-designer__property-panel { + height: 100%; + overflow: scroll; + overflow-y: auto; + z-index: 10; + * { + box-sizing: border-box; + } + } + // svg { + // width: 100%; + // height: 100%; + // min-height: 100%; + // overflow: hidden; + // } + } +} + +//侧边栏配置 +// .djs-palette .two-column .open { +.open { + // .djs-palette.open { + .djs-palette-entries { + div[class^='bpmn-icon-']:before, + div[class*='bpmn-icon-']:before { + line-height: unset; + } + div.entry { + position: relative; + } + div.entry:hover { + &::after { + width: max-content; + content: attr(title); + vertical-align: text-bottom; + position: absolute; + right: -10px; + top: 0; + bottom: 0; + overflow: hidden; + transform: translateX(100%); + font-size: 0.5em; + display: inline-block; + text-decoration: inherit; + font-variant: normal; + text-transform: none; + background: #fafafa; + box-shadow: 0 0 6px #eeeeee; + border: 1px solid #cccccc; + box-sizing: border-box; + padding: 0 16px; + border-radius: 4px; + z-index: 100; + } + } + } +} +pre { + margin: 0; + height: 100%; + overflow: hidden; + max-height: calc(80vh - 32px); + overflow-y: auto; +} +.hljs { + word-break: break-word; + white-space: pre-wrap; +} +.hljs * { + font-family: Consolas, Monaco, monospace; +} diff --git a/src/components/bpmnProcessDesigner/package/theme/process-panel.scss b/src/components/bpmnProcessDesigner/package/theme/process-panel.scss new file mode 100644 index 0000000..f840cdd --- /dev/null +++ b/src/components/bpmnProcessDesigner/package/theme/process-panel.scss @@ -0,0 +1,107 @@ +.process-panel__container { + box-sizing: border-box; + padding: 0 8px; + border-left: 1px solid #eeeeee; + box-shadow: 0 0 8px #cccccc; + max-height: 100%; + overflow-y: scroll; +} +.panel-tab__title { + font-weight: 600; + padding: 0 8px; + font-size: 1.1em; + line-height: 1.2em; + i { + margin-right: 8px; + font-size: 1.2em; + } +} +.panel-tab__content { + width: 100%; + box-sizing: border-box; + border-top: 1px solid #eeeeee; + padding: 8px 16px; + .panel-tab__content--title { + display: flex; + justify-content: space-between; + padding-bottom: 8px; + span { + flex: 1; + text-align: left; + } + } +} +.element-property { + width: 100%; + display: flex; + align-items: flex-start; + margin: 8px 0; + .element-property__label { + display: block; + width: 90px; + text-align: right; + overflow: hidden; + padding-right: 12px; + line-height: 32px; + font-size: 14px; + box-sizing: border-box; + } + .element-property__value { + flex: 1; + line-height: 32px; + } + .el-form-item { + width: 100%; + margin-bottom: 0; + padding-bottom: 18px; + } +} +.list-property { + flex-direction: column; + .element-listener-item { + width: 100%; + display: inline-grid; + grid-template-columns: 16px auto 32px 32px; + grid-column-gap: 8px; + } + .element-listener-item + .element-listener-item { + margin-top: 8px; + } +} +.listener-filed__title { + display: inline-flex; + width: 100%; + justify-content: space-between; + align-items: center; + margin-top: 0; + span { + width: 200px; + text-align: left; + font-size: 14px; + } + i { + margin-right: 8px; + } +} +.element-drawer__button { + margin-top: 8px; + width: 100%; + display: inline-flex; + justify-content: space-around; +} +.element-drawer__button > .el-button { + width: 100%; +} + +.el-collapse-item__content { + padding-bottom: 0; +} +.el-input.is-disabled .el-input__inner { + color: #999999; +} +.el-form-item.el-form-item--mini { + margin-bottom: 0; + & + .el-form-item { + margin-top: 16px; + } +} diff --git a/src/components/bpmnProcessDesigner/package/types.ts b/src/components/bpmnProcessDesigner/package/types.ts new file mode 100644 index 0000000..55aaadd --- /dev/null +++ b/src/components/bpmnProcessDesigner/package/types.ts @@ -0,0 +1,41 @@ +import type Modeler from 'bpmn-js/lib/Modeler' +import type Modeling from 'bpmn-js/lib/features/modeling/Modeling' +import type BpmnFactory from 'bpmn-js/lib/features/modeling/BpmnFactory' +import type ElementFactory from 'bpmn-js/lib/features/modeling/ElementFactory' +import type { Element, Moddle, ModdleElement } from 'bpmn-js/lib/model/Types' + +/** bpmn-js 图形元素(businessObject 等由 bpmn-js 自带类型描述) */ +export type BpmnElement = Element + +/** bpmn-js 模型对象(bpmn-moddle 创建的业务对象) */ +export type BpmnModdleElement = ModdleElement + +/** 元素注册表中用到的成员 */ +export interface BpmnElementRegistry { + get(id: string): BpmnElement | undefined + find(fn: (element: BpmnElement) => boolean): BpmnElement | undefined + filter(fn: (element: BpmnElement) => boolean): BpmnElement[] +} + +/** 属性面板初始化后挂在 window 上的建模器服务集合 */ +export interface BpmnInstances { + modeler: Modeler + modeling: Modeling + moddle: Moddle + eventBus: unknown + bpmnFactory: BpmnFactory + elementFactory: ElementFactory + elementRegistry: BpmnElementRegistry + replace: unknown + selection: unknown + bpmnElement: BpmnElement +} + +declare global { + interface Window { + bpmnInstances?: BpmnInstances | null + } +} + +/** 读取属性面板初始化好的建模器服务集合(调用方保证面板已初始化) */ +export const getBpmnInstances = (): BpmnInstances => window.bpmnInstances! diff --git a/src/components/bpmnProcessDesigner/package/utils.ts b/src/components/bpmnProcessDesigner/package/utils.ts new file mode 100644 index 0000000..96f7973 --- /dev/null +++ b/src/components/bpmnProcessDesigner/package/utils.ts @@ -0,0 +1,79 @@ +import { getBpmnInstances } from './types' + +const bpmnInstances = getBpmnInstances +// 创建监听器实例 +export function createListenerObject(options, isTask, prefix) { + const listenerObj = Object.create(null) + listenerObj.event = options.event + isTask && (listenerObj.id = options.id) // 任务监听器特有的 id 字段 + switch (options.listenerType) { + case 'scriptListener': + listenerObj.script = createScriptObject(options, prefix) + break + case 'expressionListener': + listenerObj.expression = options.expression + break + case 'delegateExpressionListener': + listenerObj.delegateExpression = options.delegateExpression + break + default: + listenerObj.class = options.class + } + // 注入字段 + if (options.fields) { + listenerObj.fields = options.fields.map((field) => { + return createFieldObject(field, prefix) + }) + } + // 任务监听器的 定时器 设置 + if (isTask && options.event === 'timeout' && !!options.eventDefinitionType) { + const timeDefinition = bpmnInstances().moddle.create('bpmn:FormalExpression', { + body: options.eventTimeDefinitions + }) + const TimerEventDefinition = bpmnInstances().moddle.create('bpmn:TimerEventDefinition', { + id: `TimerEventDefinition_${uuid(8)}`, + [`time${options.eventDefinitionType.replace(/^\S/, (s) => s.toUpperCase())}`]: timeDefinition + }) + listenerObj.eventDefinitions = [TimerEventDefinition] + } + return bpmnInstances().moddle.create( + `${prefix}:${isTask ? 'TaskListener' : 'ExecutionListener'}`, + listenerObj + ) +} + +// 创建 监听器的注入字段 实例 +export function createFieldObject(option, prefix) { + const { name, fieldType, string, expression } = option + const fieldConfig = fieldType === 'string' ? { name, string } : { name, expression } + return bpmnInstances().moddle.create(`${prefix}:Field`, fieldConfig) +} + +// 创建脚本实例 +export function createScriptObject(options, prefix) { + const { scriptType, scriptFormat, value, resource } = options + const scriptConfig = + scriptType === 'inlineScript' ? { scriptFormat, value } : { scriptFormat, resource } + return bpmnInstances().moddle.create(`${prefix}:Script`, scriptConfig) +} + +// 更新元素扩展属性 +export function updateElementExtensions(element, extensionList) { + const extensions = bpmnInstances().moddle.create('bpmn:ExtensionElements', { + values: extensionList + }) + // 直接使用原始元素对象,不需要toRaw包装 + bpmnInstances().modeling.updateProperties(element, { + extensionElements: extensions + }) +} + +// 创建一个id +export function uuid(length = 8, chars?) { + let result = '' + const charsString = chars || '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' + for (let i = length; i > 0; --i) { + result += charsString[Math.floor(Math.random() * charsString.length)] + } + return result +} diff --git a/src/components/bpmnProcessDesigner/src/highlight/index.js b/src/components/bpmnProcessDesigner/src/highlight/index.js new file mode 100644 index 0000000..5df38c9 --- /dev/null +++ b/src/components/bpmnProcessDesigner/src/highlight/index.js @@ -0,0 +1,5 @@ +const hljs = require('highlight.js/lib/core') +hljs.registerLanguage('xml', require('highlight.js/lib/languages/xml')) +hljs.registerLanguage('json', require('highlight.js/lib/languages/json')) + +module.exports = hljs diff --git a/src/components/bpmnProcessDesigner/src/modules/custom-renderer/CustomRenderer.js b/src/components/bpmnProcessDesigner/src/modules/custom-renderer/CustomRenderer.js new file mode 100644 index 0000000..e876031 --- /dev/null +++ b/src/components/bpmnProcessDesigner/src/modules/custom-renderer/CustomRenderer.js @@ -0,0 +1,14 @@ +import BpmnRenderer from 'bpmn-js/lib/draw/BpmnRenderer' + +export default function CustomRenderer(config, eventBus, styles, pathMap, canvas, textRenderer) { + BpmnRenderer.call(this, config, eventBus, styles, pathMap, canvas, textRenderer, 2000) + + this.handlers['label'] = function () { + return null + } +} + +const F = function () {} // 核心,利用空对象作为中介; +F.prototype = BpmnRenderer.prototype // 核心,将父类的原型赋值给空对象F; +CustomRenderer.prototype = new F() // 核心,将 F的实例赋值给子类; +CustomRenderer.prototype.constructor = CustomRenderer // 修复子类CustomRenderer的构造器指向,防止原型链的混乱; diff --git a/src/components/bpmnProcessDesigner/src/modules/custom-renderer/index.js b/src/components/bpmnProcessDesigner/src/modules/custom-renderer/index.js new file mode 100644 index 0000000..79d8bd0 --- /dev/null +++ b/src/components/bpmnProcessDesigner/src/modules/custom-renderer/index.js @@ -0,0 +1,6 @@ +import CustomRenderer from './CustomRenderer' + +export default { + __init__: ['customRenderer'], + customRenderer: ['type', CustomRenderer] +} diff --git a/src/components/bpmnProcessDesigner/src/modules/rules/CustomRules.js b/src/components/bpmnProcessDesigner/src/modules/rules/CustomRules.js new file mode 100644 index 0000000..9fa1d14 --- /dev/null +++ b/src/components/bpmnProcessDesigner/src/modules/rules/CustomRules.js @@ -0,0 +1,16 @@ +import BpmnRules from 'bpmn-js/lib/features/rules/BpmnRules' +import inherits from 'inherits' + +export default function CustomRules(eventBus) { + BpmnRules.call(this, eventBus) +} + +inherits(CustomRules, BpmnRules) + +CustomRules.prototype.canDrop = function () { + return false +} + +CustomRules.prototype.canMove = function () { + return false +} diff --git a/src/components/bpmnProcessDesigner/src/modules/rules/index.js b/src/components/bpmnProcessDesigner/src/modules/rules/index.js new file mode 100644 index 0000000..12cf05a --- /dev/null +++ b/src/components/bpmnProcessDesigner/src/modules/rules/index.js @@ -0,0 +1,6 @@ +import CustomRules from './CustomRules' + +export default { + __init__: ['customRules'], + customRules: ['type', CustomRules] +} diff --git a/src/components/bpmnProcessDesigner/src/translations.ts b/src/components/bpmnProcessDesigner/src/translations.ts new file mode 100644 index 0000000..5f9b9a5 --- /dev/null +++ b/src/components/bpmnProcessDesigner/src/translations.ts @@ -0,0 +1,25 @@ +/** + * This is a sample file that should be replaced with the actual translation. + * + * Checkout https://github.com/bpmn-io/bpmn-js-i18n for a list of available + * translations and labels to translate. + */ +export default { + 'Exclusive Gateway': 'Exklusives Gateway', + 'Parallel Gateway': 'Paralleles Gateway', + 'Inclusive Gateway': 'Inklusives Gateway', + 'Complex Gateway': 'Komplexes Gateway', + 'Event based Gateway': 'Ereignis-basiertes Gateway', + 'Message Start Event': '消息启动事件', + 'Timer Start Event': '定时启动事件', + 'Conditional Start Event': '条件启动事件', + 'Signal Start Event': '信号启动事件', + 'Error Start Event': '错误启动事件', + 'Escalation Start Event': '升级启动事件', + 'Compensation Start Event': '补偿启动事件', + 'Message Start Event (non-interrupting)': '消息启动事件 (非中断)', + 'Timer Start Event (non-interrupting)': '定时启动事件 (非中断)', + 'Conditional Start Event (non-interrupting)': '条件启动事件 (非中断)', + 'Signal Start Event (non-interrupting)': '信号启动事件 (非中断)', + 'Escalation Start Event (non-interrupting)': '升级启动事件 (非中断)' +} diff --git a/src/components/bpmnProcessDesigner/src/utils/directive/clickOutSide.js b/src/components/bpmnProcessDesigner/src/utils/directive/clickOutSide.js new file mode 100644 index 0000000..bb71d44 --- /dev/null +++ b/src/components/bpmnProcessDesigner/src/utils/directive/clickOutSide.js @@ -0,0 +1,39 @@ +//outside.js + +const ctx = '@@clickoutsideContext' + +export default { + bind(el, binding, vnode) { + const ele = el + const documentHandler = (e) => { + if (!vnode.context || ele.contains(e.target)) { + return false + } + // 调用指令回调 + if (binding.expression) { + vnode.context[el[ctx].methodName](e) + } else { + el[ctx].bindingFn(e) + } + } + // 将方法添加到ele + ele[ctx] = { + documentHandler, + methodName: binding.expression, + bindingFn: binding.value + } + + setTimeout(() => { + document.addEventListener('touchstart', documentHandler) // 为document绑定事件 + }) + }, + update(el, binding) { + const ele = el + ele[ctx].methodName = binding.expression + ele[ctx].bindingFn = binding.value + }, + unbind(el) { + document.removeEventListener('touchstart', el[ctx].documentHandler) // 解绑 + delete el[ctx] + } +} diff --git a/src/components/bpmnProcessDesigner/src/utils/index.js b/src/components/bpmnProcessDesigner/src/utils/index.js new file mode 100644 index 0000000..7d970ec --- /dev/null +++ b/src/components/bpmnProcessDesigner/src/utils/index.js @@ -0,0 +1,10 @@ +export function debounce(fn, delay = 500) { + let timer + return function (...args) { + if (timer) { + clearTimeout(timer) + timer = null + } + timer = setTimeout(fn.bind(this, ...args), delay) + } +} diff --git a/src/components/bpmnProcessDesigner/src/utils/xml2json.js b/src/components/bpmnProcessDesigner/src/utils/xml2json.js new file mode 100644 index 0000000..ce83820 --- /dev/null +++ b/src/components/bpmnProcessDesigner/src/utils/xml2json.js @@ -0,0 +1,49 @@ +function xmlStr2XmlObj(xmlStr) { + let xmlObj = {} + if (document.all) { + const xmlDom = new window.ActiveXObject('Microsoft.XMLDOM') + xmlDom.loadXML(xmlStr) + xmlObj = xmlDom + } else { + xmlObj = new DOMParser().parseFromString(xmlStr, 'text/xml') + } + return xmlObj +} + +function xml2json(xml) { + try { + let obj = {} + if (xml.children.length > 0) { + for (let i = 0; i < xml.children.length; i++) { + const item = xml.children.item(i) + const nodeName = item.nodeName + if (typeof obj[nodeName] == 'undefined') { + obj[nodeName] = xml2json(item) + } else { + if (typeof obj[nodeName].push == 'undefined') { + const old = obj[nodeName] + obj[nodeName] = [] + obj[nodeName].push(old) + } + obj[nodeName].push(xml2json(item)) + } + } + } else { + obj = xml.textContent + } + return obj + } catch (e) { + console.error(e.message) + } +} + +function xmlObj2json(xml) { + const xmlObj = xmlStr2XmlObj(xml) + let jsonObj = {} + if (xmlObj.childNodes.length > 0) { + jsonObj = xml2json(xmlObj) + } + return jsonObj +} + +export default xmlObj2json diff --git a/src/components/index.ts b/src/components/index.ts new file mode 100644 index 0000000..4d030c3 --- /dev/null +++ b/src/components/index.ts @@ -0,0 +1,6 @@ +import type { App } from 'vue' +import { Icon } from './Icon' + +export const setupGlobCom = (app: App): void => { + app.component('Icon', Icon) +} diff --git a/src/config/axios/config.ts b/src/config/axios/config.ts new file mode 100644 index 0000000..2c8d60e --- /dev/null +++ b/src/config/axios/config.ts @@ -0,0 +1,29 @@ +const config: { + base_url: string + result_code: number | string + default_headers: AxiosHeaders + request_timeout: number +} = { + /** + * api请求基础路径 + */ + base_url: import.meta.env.VITE_API_URL, + + /** + * 接口成功返回状态码 + */ + result_code: 200, + + /** + * 接口请求超时时间 + */ + request_timeout: 30000, + + /** + * 默认接口请求类型 + * 可选值:application/x-www-form-urlencoded multipart/form-data + */ + default_headers: 'application/json' +} + +export { config } diff --git a/src/config/axios/errorCode.ts b/src/config/axios/errorCode.ts new file mode 100644 index 0000000..94d719f --- /dev/null +++ b/src/config/axios/errorCode.ts @@ -0,0 +1,6 @@ +export default { + '401': '认证失败,无法访问系统资源', + '403': '当前操作没有权限', + '404': '访问资源不存在', + default: '系统未知错误,请反馈给管理员' +} diff --git a/src/config/axios/index.ts b/src/config/axios/index.ts new file mode 100644 index 0000000..53a17f0 --- /dev/null +++ b/src/config/axios/index.ts @@ -0,0 +1,59 @@ +import type { AxiosRequestConfig } from 'axios' +import type { AuthSessionSnapshot } from '@/utils/auth' +import { service } from './service' + +import { config } from './config' + +const { default_headers } = config + +/** 请求参数:axios 原生配置 + 本工程扩展字段 */ +export interface RequestOption extends AxiosRequestConfig { + /** Content-Type 简写 */ + headersType?: string + /** 401 时不走刷新令牌流程 */ + skipAuthRefresh?: boolean + /** 发起请求时的登录会话快照,会话变更后忽略旧请求结果 */ + authSession?: AuthSessionSnapshot +} + +const request = (option: RequestOption) => { + const { headersType, headers, ...otherOption } = option + return service({ + ...otherOption, + headers: { + 'Content-Type': headersType || default_headers, + ...headers + } + }) +} +export default { + get: async (option: RequestOption) => { + const res = await request({ method: 'GET', ...option }) + return res.data as unknown as T + }, + post: async (option: RequestOption) => { + const res = await request({ method: 'POST', ...option }) + return res.data as unknown as T + }, + postOriginal: async (option: RequestOption) => { + const res = await request({ method: 'POST', ...option }) + return res + }, + delete: async (option: RequestOption) => { + const res = await request({ method: 'DELETE', ...option }) + return res.data as unknown as T + }, + put: async (option: RequestOption) => { + const res = await request({ method: 'PUT', ...option }) + return res.data as unknown as T + }, + download: async (option: RequestOption) => { + const res = await request({ method: 'GET', responseType: 'blob', ...option }) + return res as unknown as Promise + }, + upload: async (option: RequestOption) => { + option.headersType = 'multipart/form-data' + const res = await request({ method: 'POST', ...option }) + return res as unknown as Promise + } +} diff --git a/src/config/axios/service.ts b/src/config/axios/service.ts new file mode 100644 index 0000000..9d1d031 --- /dev/null +++ b/src/config/axios/service.ts @@ -0,0 +1,306 @@ +import axios, { AxiosError, AxiosInstance, AxiosResponse, InternalAxiosRequestConfig } from 'axios' + +import { ElMessage, ElNotification } from 'element-plus' +import { useMessage } from '@/hooks/web/useMessage' +import qs from 'qs' +import { config } from '@/config/axios/config' +import { + getAuthSession, + getTenantId, + getVisitTenantId, + isAuthSessionCurrent, + removeToken, + setToken, + withAuthSessionLock +} from '@/utils/auth' +import type { AuthSessionSnapshot } from '@/utils/auth' +import errorCode from './errorCode' +import { appUrl, assertPageSession, currentAppPath, isIdentityCenterPage } from '@/utils/ssoFlow' + +import { deleteUserCache } from '@/hooks/web/useCache' +import { + checkSessionReplaced, + isSessionReplacedNoticeOpen, + showSessionReplacedNotice +} from '@/utils/sessionReplaced' + +const tenantEnable = import.meta.env.VITE_APP_TENANT_ENABLE +const { result_code, base_url, request_timeout } = config + +// 需要忽略的提示。忽略后,自动 Promise.reject('error') +const ignoreMsgs = [ + '无效的刷新令牌', // 刷新令牌被删除时,不用提示 + '刷新令牌已过期' // 使用刷新令牌,刷新获取新的访问令牌时,结果因为过期失败,此时需要忽略。否则,会导致继续 401,无法跳转到登出界面 +] +// 是否显示重新登录 +export const isRelogin = { show: false } +let refreshPromise: Promise | undefined +let refreshingToken: string | undefined +// 请求白名单,无须 token 的接口 +const whiteList: string[] = ['/login', '/refresh-token'] + +type SsoRequestConfig = InternalAxiosRequestConfig & { + skipAuthRefresh?: boolean + authRetried?: boolean + authRetryCount?: number + authSession?: AuthSessionSnapshot +} + +/** 后端统一返回结构 */ +interface ApiResult { + code?: number + msg?: string + data?: unknown +} + +/** + * 响应拦截器把响应体解包后返回(由 request.get 等再按调用方的 T 取值), + * axios 的拦截器类型只能声明为 AxiosResponse,这里集中做一次显式转换 + */ +const unwrapBody = (body: ApiResult | Blob) => body as unknown as AxiosResponse + +// 创建axios实例 +const service: AxiosInstance = axios.create({ + baseURL: base_url, // api 的 base_url + timeout: request_timeout, // 请求超时时间 + withCredentials: false, // 禁用 Cookie 等信息 + // 自定义参数序列化函数 + paramsSerializer: (params) => { + return qs.stringify(params, { allowDots: true }) + } +}) + +// request拦截器 +service.interceptors.request.use( + (config: InternalAxiosRequestConfig) => { + const session = getAuthSession() + assertPageSession(session) + // 是否需要设置 token + const isToken = config.headers.isToken === false + || whiteList.some((path) => config.url?.endsWith(path)) + const requestConfig = config as SsoRequestConfig + if (requestConfig.authSession && (requestConfig.authSession.sessionId !== session.sessionId + || requestConfig.authSession.refreshToken !== session.refreshToken)) { + throw new Error('登录会话已变更,请重新操作') + } + if (!isIdentityCenterPage()) requestConfig.authSession = session + if (!isToken) { + if (session.accessToken) config.headers.Authorization = 'Bearer ' + session.accessToken + } + // 设置租户 + if (tenantEnable && tenantEnable === 'true') { + const tenantId = getTenantId() + if (tenantId) config.headers['tenant-id'] = tenantId + // 只有登录时,才设置 visit-tenant-id 访问租户 + const visitTenantId = getVisitTenantId() + if (config.headers.Authorization && visitTenantId) { + config.headers['visit-tenant-id'] = visitTenantId + } + } + const method = config.method?.toUpperCase() + // 防止 GET 请求缓存 + if (method === 'GET') { + config.headers['Cache-Control'] = 'no-cache' + config.headers['Pragma'] = 'no-cache' + } + // 自定义参数序列化函数 + else if (method === 'POST') { + const contentType = config.headers['Content-Type'] || config.headers['content-type'] + if (contentType === 'application/x-www-form-urlencoded') { + if (config.data && typeof config.data !== 'string') { + config.data = qs.stringify(config.data) + } + } + } + return config + }, + (error: AxiosError) => { + console.error('请求发送失败:', error) + return Promise.reject(error) + } +) + +// response 拦截器 +service.interceptors.response.use( + async (response: AxiosResponse) => { + let data = response.data as ApiResult + const config = response.config + const sentSession = (config as SsoRequestConfig).authSession + if (sentSession && sentSession.sessionId !== getAuthSession().sessionId) { + throw new Error('登录会话已变更,已忽略旧请求结果') + } + if (!data) { + // 返回“[HTTP]请求没有返回值”; + throw new Error() + } + + const { t } = useI18n() + // 未设置状态码则默认成功状态 + // 二进制数据则直接返回,例如说 Excel 导出 + if ( + response.request.responseType === 'blob' || + response.request.responseType === 'arraybuffer' + ) { + // 注意:如果导出的响应为 json,说明可能失败了,不直接返回进行下载 + const blob = response.data as Blob + if (blob.type !== 'application/json') { + return unwrapBody(blob) + } + data = await new Response(blob).json() + } + const code = data.code || result_code + // 获取错误信息 + const msg = data.msg || errorCode[code] || errorCode['default'] + if (code === 401 && (config as SsoRequestConfig).skipAuthRefresh) { + return Promise.reject(new Error(msg)) + } else if (code === 401) { + return retryAfterRefresh(config) + } else if (ignoreMsgs.indexOf(msg) !== -1) { + return Promise.reject(new Error(msg)) + } else if (code === 500) { + useMessage().error(t('sys.api.errMsg500')) + return Promise.reject(new Error(msg)) + } else if (code === 901) { + ElMessage.error({ offset: 300, message: t('sys.api.errMsg901') }) + return Promise.reject(new Error(msg)) + } else if (code !== 200) { + // 权限调整后不强制重新登录,菜单可能仍是旧的,后端拒绝时提示刷新 + ElNotification.error({ title: code === 403 ? `${msg},权限可能已调整,请刷新页面` : msg }) + return Promise.reject(Object.assign(new Error(msg), { status: code })) + } else { + return unwrapBody(data) + } + }, + (error: AxiosError) => { + if (error.response?.status === 401 && error.config && !(error.config as SsoRequestConfig).skipAuthRefresh) { + return retryAfterRefresh(error.config) + } + console.error('请求失败:', error) + let { message } = error + const { t } = useI18n() + if (message === 'Network Error') { + message = t('sys.api.errorMessage') + } else if (message.includes('timeout')) { + message = t('sys.api.apiTimeoutMessage') + } else if (message.includes('Request failed with status code')) { + message = t('sys.api.apiRequestFailed') + message.substr(message.length - 3) + } + useMessage().error(message) + return Promise.reject(error) + } +) + +const refreshToken = async (session: AuthSessionSnapshot): Promise => { + const renew = async (): Promise => { + // 等待其他标签页续期后,已更新的令牌可以直接复用。 + if (!isAuthSessionCurrent(session)) return + const response = await axios.post(base_url + '/system/auth/refresh-token', null, { + params: { refreshToken: session.refreshToken }, + headers: { 'tenant-id': getTenantId() }, + timeout: request_timeout + }) + // 旧续期响应不能覆盖其他标签页刚建立的新登录或更新的令牌。 + if (!isAuthSessionCurrent(session)) return + if (![0, 200].includes(response.data?.code) || !response.data?.data?.accessToken) { + if ([400, 401].includes(response.data?.code)) { + throw Object.assign(new Error('刷新令牌无效'), { authInvalid: true }) + } + throw new Error('暂时无法续期,请检查网络后重试') + } + setToken(response.data.data, session.sessionId) + } + await withAuthSessionLock(renew) +} + +const retryWithCurrentToken = (config: SsoRequestConfig): Promise => { + const current = getAuthSession() + if (!current.accessToken || current.refreshToken !== config.authSession?.refreshToken) { + return Promise.reject(new Error('登录会话已变更,请重新操作')) + } + if ((config.authRetryCount || 0) >= 2) { + return Promise.reject(new Error('登录状态正在更新,请重试当前操作')) + } + config.authRetryCount = (config.authRetryCount || 0) + 1 + return service(config) +} + +const retryAfterRefresh = async (config: SsoRequestConfig): Promise => { + const session = config.authSession + const current = getAuthSession() + if (!session || current.refreshToken !== session.refreshToken) { + return Promise.reject(new Error('登录会话已变更,请重新操作')) + } + // 迟到的 401 优先使用已更新的访问令牌,不再重复续期。 + if (current.accessToken && current.accessToken !== session.accessToken) { + return retryWithCurrentToken(config) + } + if (isRelogin.show || !current.refreshToken) return handleAuthorized(session) + if (config.authRetried) { + return Promise.reject(new Error('当前请求认证失败,请重试当前操作')) + } + config.authRetried = true + if (!refreshPromise || refreshingToken !== current.refreshToken) { + refreshPromise = refreshToken(current) + refreshingToken = current.refreshToken + } + const pending = refreshPromise + try { + await pending + } catch (cause) { + if (!isAuthSessionCurrent(current)) return retryWithCurrentToken(config) + const expired = + (cause as { authInvalid?: boolean })?.authInvalid || + (axios.isAxiosError(cause) && [400, 401].includes(cause.response?.status || 0)) + if (expired) return handleAuthorized(current) + const error = new Error('暂时无法续期,请检查网络后重试') + useMessage().error(error.message) + return Promise.reject(error) + } finally { + if (refreshPromise === pending) { + refreshPromise = undefined + refreshingToken = undefined + } + } + return retryWithCurrentToken(config) +} + +const handleAuthorized = (session: AuthSessionSnapshot): Promise => { + if (!isAuthSessionCurrent(session)) { + return Promise.reject(new Error('登录会话已变更,请重新操作')) + } + if (isSessionReplacedNoticeOpen()) { + return Promise.reject(new Error('当前会话已在其他地方登录后退出')) + } + if (!isRelogin.show) { + isRelogin.show = true + void (async () => { + try { + try { + if ( + (session.accessToken || session.refreshToken) && + (await checkSessionReplaced(session.accessToken, session.refreshToken)) + ) { + await showSessionReplacedNotice(session) + return + } + } catch { + // 状态查询失败时维持原有失效会话处理,不能误报异地登录。 + } + await withAuthSessionLock(() => { + if (!isAuthSessionCurrent(session)) return + deleteUserCache() + removeToken() + const query = new URLSearchParams({ forceLogin: '1', reason: 'expired' }) + if (!['/sso/login', '/sso/callback', '/zcy/login'].includes(window.location.pathname)) { + query.set('redirect', currentAppPath()) + } + window.location.replace(appUrl(`/sso/login?${query.toString()}`)) + }) + } finally { + isRelogin.show = false + } + })() + } + return Promise.reject(new Error('登录状态已失效,请重新登录')) +} +export { service } diff --git a/src/directives/index.ts b/src/directives/index.ts new file mode 100644 index 0000000..1b99988 --- /dev/null +++ b/src/directives/index.ts @@ -0,0 +1,24 @@ +import type { App } from 'vue' +import { hasRole } from './permission/hasRole' +import { hasPermi } from './permission/hasPermi' + +/** + * 导出指令:v-xxx + * @methods hasRole 用户权限,用法: v-hasRole + * @methods hasPermi 按钮权限,用法: v-hasPermi + */ +export const setupAuth = (app: App) => { + hasRole(app) + hasPermi(app) +} + +/** + * 导出指令:v-mountedFocus + */ +export const setupMountedFocus = (app: App) => { + app.directive('mountedFocus', { + mounted(el) { + el.focus() + } + }) +} diff --git a/src/directives/permission/hasPermi.ts b/src/directives/permission/hasPermi.ts new file mode 100644 index 0000000..90cd025 --- /dev/null +++ b/src/directives/permission/hasPermi.ts @@ -0,0 +1,31 @@ +import type { App } from 'vue' +import { useUserStore } from '@/store/modules/user' + +const { t } = useI18n() // 国际化 + +/** 判断权限的指令 directive */ +export function hasPermi(app: App) { + app.directive('hasPermi', (el, binding) => { + const { value } = binding + + if (value && value instanceof Array && value.length > 0) { + const hasPermissions = hasPermission(value) + + if (!hasPermissions) { + el.parentNode && el.parentNode.removeChild(el) + } + } else { + throw new Error(t('permission.hasPermission')) + } + }) +} + +/** 判断权限的方法 function */ +const userStore = useUserStore() +const all_permission = '*:*:*' +export const hasPermission = (permission: string[]) => { + return ( + userStore.permissions.has(all_permission) || + permission.some((permission) => userStore.permissions.has(permission)) + ) +} diff --git a/src/directives/permission/hasRole.ts b/src/directives/permission/hasRole.ts new file mode 100644 index 0000000..a512811 --- /dev/null +++ b/src/directives/permission/hasRole.ts @@ -0,0 +1,28 @@ +import type { App } from 'vue' +import { CACHE_KEY, useCache } from '@/hooks/web/useCache' + +const { t } = useI18n() // 国际化 + +export function hasRole(app: App) { + app.directive('hasRole', (el, binding) => { + const { wsCache } = useCache() + const { value } = binding + const super_admin = 'super_admin' + const userInfo = wsCache.get(CACHE_KEY.USER) + const roles = userInfo?.roles || [] + + if (value && value instanceof Array && value.length > 0) { + const roleFlag = value + + const hasRole = roles.some((role: string) => { + return super_admin === role || roleFlag.includes(role) + }) + + if (!hasRole) { + el.parentNode && el.parentNode.removeChild(el) + } + } else { + throw new Error(t('permission.hasRole')) + } + }) +} diff --git a/src/hooks/event/useScrollTo.ts b/src/hooks/event/useScrollTo.ts new file mode 100644 index 0000000..92aec87 --- /dev/null +++ b/src/hooks/event/useScrollTo.ts @@ -0,0 +1,60 @@ +export interface ScrollToParams { + el: HTMLElement + to: number + position: string + duration?: number + callback?: () => void +} + +const easeInOutQuad = (t: number, b: number, c: number, d: number) => { + t /= d / 2 + if (t < 1) { + return (c / 2) * t * t + b + } + t-- + return (-c / 2) * (t * (t - 2) - 1) + b +} +const move = (el: HTMLElement, position: string, amount: number) => { + el[position] = amount +} + +export function useScrollTo({ + el, + position = 'scrollLeft', + to, + duration = 500, + callback +}: ScrollToParams) { + const isActiveRef = ref(false) + const start = el[position] + const change = to - start + const increment = 20 + let currentTime = 0 + + function animateScroll() { + if (!unref(isActiveRef)) { + return + } + currentTime += increment + const val = easeInOutQuad(currentTime, start, change, duration) + move(el, position, val) + if (currentTime < duration && unref(isActiveRef)) { + requestAnimationFrame(animateScroll) + } else { + if (callback) { + callback() + } + } + } + + function run() { + isActiveRef.value = true + animateScroll() + } + + function stop() { + isActiveRef.value = false + } + + return { start: run, stop } +} diff --git a/src/hooks/web/useCache.ts b/src/hooks/web/useCache.ts new file mode 100644 index 0000000..95e443b --- /dev/null +++ b/src/hooks/web/useCache.ts @@ -0,0 +1,67 @@ +/** + * 配置浏览器本地存储的方式,可直接存储对象数组。 + */ + +import WebStorageCache from 'web-storage-cache' + +type CacheType = 'localStorage' | 'sessionStorage' + +// 多个应用部署在同一域名的不同子路径时共享浏览器存储,按部署路径隔离键名;根路径部署保持原键名。 +const STORAGE_SCOPE = (import.meta.env.BASE_URL || '/').replace(/^[./]+|\/+$/g, '') + +export const scopedStorageKey = (key: string): string => + STORAGE_SCOPE ? `${STORAGE_SCOPE}:${key}` : key + +const scopeKeys = >(keys: T): T => + Object.fromEntries(Object.entries(keys).map(([name, key]) => [name, scopedStorageKey(key)])) as T + +export const CACHE_KEY = scopeKeys({ + // 用户相关 + ROLE_ROUTERS: 'ckcloud:roleRouters', + USER: 'ckcloud:user', + VisitTenantId: 'ckcloud:visitTenantId', + APPLICATION_ID: 'ckcloud:applicationId', + CURRENT_ORGANIZATION_ID: 'currentOrganizationId', + CURRENT_ORGANIZATION_NAME: 'currentOrganizationName', + CURRENT_ORGANIZATION_SESSION_ID: 'currentOrganizationSessionId', + // 系统设置 + // 管理台主题缓存使用版本化键,避免发布环境复用旧版本或其他前端写入的暗黑状态。 + IS_DARK: 'ckcloud:manage:isDark:v2', + LANG: 'lang', + THEME: 'theme', + LAYOUT: 'layout', + DICT_CACHE: 'dictCache', + // 旧版“记住密码”登录表单,仅用于清理历史缓存 + LoginForm: 'ckcloud:loginForm', + TenantId: 'ckcloud:tenantId' +}) + +export const useCache = (type: CacheType = 'localStorage') => { + const wsCache: WebStorageCache = new WebStorageCache({ + storage: type + }) + + return { + wsCache + } +} + +export const deleteUserCache = () => { + const { wsCache } = useCache() + wsCache.delete(CACHE_KEY.USER) + wsCache.delete(CACHE_KEY.ROLE_ROUTERS) + wsCache.delete(CACHE_KEY.VisitTenantId) + wsCache.delete(CACHE_KEY.APPLICATION_ID) + wsCache.delete(CACHE_KEY.CURRENT_ORGANIZATION_ID) + wsCache.delete(CACHE_KEY.CURRENT_ORGANIZATION_NAME) + wsCache.delete(CACHE_KEY.CURRENT_ORGANIZATION_SESSION_ID) + clearLegacyLoginForm() +} + +/** 旧版“记住密码”曾把口令写入浏览器存储;内管只走 SSO 登录,进入登录页与退出时都清掉这些历史键。 */ +export const clearLegacyLoginForm = () => { + const { wsCache } = useCache() + wsCache.delete(CACHE_KEY.LoginForm) + // 芋道原版未加前缀的键名 + wsCache.delete('loginForm') +} diff --git a/src/hooks/web/useConfigGlobal.ts b/src/hooks/web/useConfigGlobal.ts new file mode 100644 index 0000000..afb3db3 --- /dev/null +++ b/src/hooks/web/useConfigGlobal.ts @@ -0,0 +1,9 @@ +import { ConfigGlobalTypes } from '@/types/configGlobal' + +export const useConfigGlobal = () => { + const configGlobal = inject('configGlobal', {}) as ConfigGlobalTypes + + return { + configGlobal + } +} diff --git a/src/hooks/web/useCrudSchemas.ts b/src/hooks/web/useCrudSchemas.ts new file mode 100644 index 0000000..cd1dbda --- /dev/null +++ b/src/hooks/web/useCrudSchemas.ts @@ -0,0 +1,326 @@ +import { reactive } from 'vue' +import { AxiosPromise } from 'axios' +import { findIndex } from '@/utils' +import { eachTree, filter, treeMap } from '@/utils/tree' +import { getBoolDictOptions, getDictOptions, getIntDictOptions } from '@/utils/dict' + +import { FormSchema } from '@/types/form' +import { TableColumn } from '@/types/table' +import { DescriptionsSchema } from '@/types/descriptions' +import { ComponentOptions, ComponentProps } from '@/types/components' +import { DictTag } from '@/components/DictTag' +import { cloneDeep, merge } from 'lodash-es' + +export type CrudSchema = Omit & { + isSearch?: boolean // 是否在查询显示 + search?: CrudSearchParams // 查询的详细配置 + isTable?: boolean // 是否在列表显示 + table?: CrudTableParams // 列表的详细配置 + isForm?: boolean // 是否在表单显示 + form?: CrudFormParams // 表单的详细配置 + isDetail?: boolean // 是否在详情显示 + detail?: CrudDescriptionsParams // 详情的详细配置 + children?: CrudSchema[] + dictType?: string // 字典类型 + dictClass?: 'string' | 'number' | 'boolean' // 字典数据类型 string | number | boolean +} + +type CrudSearchParams = { + // 是否显示在查询项 + show?: boolean + // 接口 + api?: () => Promise + // 搜索字段 + field?: string +} & Omit + +type CrudTableParams = { + // 是否显示表头 + show?: boolean + // 列宽配置 + width?: number | string + // 列是否固定在左侧或者右侧 + fixed?: 'left' | 'right' +} & Omit +type CrudFormParams = { + // 是否显示表单项 + show?: boolean + // 接口 + api?: () => Promise +} & Omit + +type CrudDescriptionsParams = { + // 是否显示表单项 + show?: boolean +} & Omit + +interface AllSchemas { + searchSchema: FormSchema[] + tableColumns: TableColumn[] + formSchema: FormSchema[] + detailSchema: DescriptionsSchema[] +} + +const { t } = useI18n() + +// 过滤所有结构 +export const useCrudSchemas = ( + crudSchema: CrudSchema[] +): { + allSchemas: AllSchemas +} => { + // 所有结构数据 + const allSchemas = reactive({ + searchSchema: [], + tableColumns: [], + formSchema: [], + detailSchema: [] + }) + + const searchSchema = filterSearchSchema(crudSchema, allSchemas) + allSchemas.searchSchema = searchSchema || [] + + const tableColumns = filterTableSchema(crudSchema) + allSchemas.tableColumns = tableColumns || [] + + const formSchema = filterFormSchema(crudSchema, allSchemas) + allSchemas.formSchema = formSchema + + const detailSchema = filterDescriptionsSchema(crudSchema) + allSchemas.detailSchema = detailSchema + + return { + allSchemas + } +} + +// 过滤 Search 结构 +const filterSearchSchema = (crudSchema: CrudSchema[], allSchemas: AllSchemas): FormSchema[] => { + const searchSchema: FormSchema[] = [] + + // 获取字典列表队列 + const searchRequestTask: Array<() => Promise> = [] + eachTree(crudSchema, (schemaItem: CrudSchema) => { + // 判断是否显示 + if (schemaItem?.isSearch || schemaItem.search?.show) { + let component = schemaItem?.search?.component || 'Input' + const options: ComponentOptions[] = [] + let comonentProps: ComponentProps = {} + if (schemaItem.dictType) { + const allOptions: ComponentOptions = { label: '全部', value: '' } + options.push(allOptions) + getDictOptions(schemaItem.dictType).forEach((dict) => { + options.push(dict) + }) + comonentProps = { + options: options + } + if (!schemaItem.search?.component) component = 'Select' + } + + // updated by AKing: 解决了当使用默认的dict选项时,form中事件不能触发的问题 + const searchSchemaItem = merge( + { + // 默认为 input + component, + ...schemaItem.search, + field: schemaItem.field, + label: schemaItem.search?.label || schemaItem.label + }, + { componentProps: comonentProps } + ) + if (searchSchemaItem.api) { + searchRequestTask.push(async () => { + const res = await (searchSchemaItem.api as () => AxiosPromise)() + if (res) { + const index = findIndex(allSchemas.searchSchema, (v: FormSchema) => { + return v.field === searchSchemaItem.field + }) + if (index !== -1) { + allSchemas.searchSchema[index]!.componentProps!.options = filterOptions( + res, + searchSchemaItem.componentProps.optionsAlias?.labelField + ) + } + } + }) + } + // 删除不必要的字段 + delete searchSchemaItem.show + + searchSchema.push(searchSchemaItem) + } + }) + for (const task of searchRequestTask) { + task() + } + return searchSchema +} + +// 过滤 table 结构 +const filterTableSchema = (crudSchema: CrudSchema[]): TableColumn[] => { + const tableColumns = treeMap(crudSchema, { + conversion: (schema: CrudSchema) => { + if (schema?.isTable !== false && schema?.table?.show !== false) { + // 增加对 dict 字典数据的支持 + if (!schema.formatter && schema.dictType) { + schema.formatter = (_: Recordable, __: TableColumn, cellValue: string | number | boolean | unknown[]) => { + return h(DictTag, { + type: schema.dictType!, // ! 表示一定不为空 + value: cellValue + }) + } + } + return { + ...schema.table, + ...schema + } + } + } + }) + + // 第一次过滤会有 undefined 所以需要二次过滤 + return filter(tableColumns as TableColumn[], (data) => { + if (data.children === void 0) { + delete data.children + } + return !!data.field + }) +} + +// 过滤 form 结构 +const filterFormSchema = (crudSchema: CrudSchema[], allSchemas: AllSchemas): FormSchema[] => { + const formSchema: FormSchema[] = [] + + // 获取字典列表队列 + const formRequestTask: Array<() => Promise> = [] + + eachTree(crudSchema, (schemaItem: CrudSchema) => { + // 判断是否显示 + if (schemaItem?.isForm !== false && schemaItem?.form?.show !== false) { + let component = schemaItem?.form?.component || 'Input' + let defaultValue: FormSchema['value'] = '' + if (schemaItem.form?.value) { + defaultValue = schemaItem.form?.value + } else { + if (component === 'InputNumber') { + defaultValue = 0 + } + } + let comonentProps: ComponentProps = {} + if (schemaItem.dictType) { + const options: ComponentOptions[] = [] + if (schemaItem.dictClass && schemaItem.dictClass === 'number') { + getIntDictOptions(schemaItem.dictType).forEach((dict) => { + options.push(dict) + }) + } else if (schemaItem.dictClass && schemaItem.dictClass === 'boolean') { + getBoolDictOptions(schemaItem.dictType).forEach((dict) => { + options.push(dict) + }) + } else { + getDictOptions(schemaItem.dictType).forEach((dict) => { + options.push(dict) + }) + } + comonentProps = { + options: options + } + if (!(schemaItem.form && schemaItem.form.component)) component = 'Select' + } + + // updated by AKing: 解决了当使用默认的dict选项时,form中事件不能触发的问题 + const formSchemaItem = merge( + { + // 默认为 input + component, + value: defaultValue, + ...schemaItem.form, + field: schemaItem.field, + label: schemaItem.form?.label || schemaItem.label + }, + { componentProps: comonentProps } + ) + + if (formSchemaItem.api) { + formRequestTask.push(async () => { + const res = await (formSchemaItem.api as () => AxiosPromise)() + if (res) { + const index = findIndex(allSchemas.formSchema, (v: FormSchema) => { + return v.field === formSchemaItem.field + }) + if (index !== -1) { + allSchemas.formSchema[index]!.componentProps!.options = filterOptions( + res, + formSchemaItem.componentProps.optionsAlias?.labelField + ) + } + } + }) + } + + // 删除不必要的字段 + delete formSchemaItem.show + + formSchema.push(formSchemaItem) + } + }) + + for (const task of formRequestTask) { + task() + } + return formSchema +} + +// 过滤 descriptions 结构 +const filterDescriptionsSchema = (crudSchema: CrudSchema[]): DescriptionsSchema[] => { + const descriptionsSchema: FormSchema[] = [] + + eachTree(crudSchema, (schemaItem: CrudSchema) => { + // 判断是否显示 + if (schemaItem?.isDetail !== false && schemaItem.detail?.show !== false) { + const descriptionsSchemaItem = { + ...schemaItem.detail, + field: schemaItem.field, + label: schemaItem.detail?.label || schemaItem.label + } + if (schemaItem.dictType) { + descriptionsSchemaItem.dictType = schemaItem.dictType + } + if (schemaItem.detail?.dateFormat || schemaItem.formatter == 'formatDate') { + // 优先使用 detail 下的配置,如果没有默认为 YYYY-MM-DD HH:mm:ss + descriptionsSchemaItem.dateFormat = schemaItem?.detail?.dateFormat + ? schemaItem?.detail?.dateFormat + : 'YYYY-MM-DD HH:mm:ss' + } + + // 删除不必要的字段 + delete descriptionsSchemaItem.show + + descriptionsSchema.push(descriptionsSchemaItem) + } + }) + + return descriptionsSchema +} + +// 给options添加国际化 +const filterOptions = (options: Recordable, labelField?: string) => { + return options?.map((v: Recordable) => { + if (labelField) { + v['labelField'] = t(v.labelField) + } else { + v['label'] = t(v.label) + } + return v + }) +} + +// 将 tableColumns 指定 fields 放到最前面 +export const sortTableColumns = (tableColumns: TableColumn[], field: string) => { + const fieldIndex = tableColumns.findIndex((item) => item.field === field) + const fieldColumn = cloneDeep(tableColumns[fieldIndex]) + tableColumns.splice(fieldIndex, 1) + // 添加到开头 + tableColumns.unshift(fieldColumn) +} diff --git a/src/hooks/web/useDesign.ts b/src/hooks/web/useDesign.ts new file mode 100644 index 0000000..8ee3b38 --- /dev/null +++ b/src/hooks/web/useDesign.ts @@ -0,0 +1,18 @@ +import variables from '@/styles/global.module.scss' + +export const useDesign = () => { + const scssVariables = variables + + /** + * @param scope 类名 + * @returns 返回空间名-类名 + */ + const getPrefixCls = (scope: string) => { + return `${scssVariables.namespace}-${scope}` + } + + return { + variables: scssVariables, + getPrefixCls + } +} diff --git a/src/hooks/web/useEmitt.ts b/src/hooks/web/useEmitt.ts new file mode 100644 index 0000000..d4efea7 --- /dev/null +++ b/src/hooks/web/useEmitt.ts @@ -0,0 +1,22 @@ +import mitt from 'mitt' + +interface Option { + name: string // 事件名称 + callback: Fn // 回调 +} + +const emitter = mitt() + +export const useEmitt = (option?: Option) => { + if (option) { + emitter.on(option.name, option.callback) + + onBeforeUnmount(() => { + emitter.off(option.name) + }) + } + + return { + emitter + } +} diff --git a/src/hooks/web/useForm.ts b/src/hooks/web/useForm.ts new file mode 100644 index 0000000..53a8a94 --- /dev/null +++ b/src/hooks/web/useForm.ts @@ -0,0 +1,94 @@ +import type { Form, FormExpose } from '@/components/Form' +import type { ElForm } from 'element-plus' +import type { FormProps } from '@/components/Form/src/types' +import { FormSchema, FormSetPropsType } from '@/types/form' + +export const useForm = (props?: FormProps) => { + // From实例 + const formRef = ref() + + // ElForm实例 + const elFormRef = ref>() + + /** + * @param ref Form实例 + * @param elRef ElForm实例 + */ + const register = (ref: typeof Form & FormExpose, elRef: ComponentRef) => { + formRef.value = ref + elFormRef.value = elRef + } + + const getForm = async () => { + await nextTick() + const form = unref(formRef) + if (!form) { + console.error('The form is not registered. Please use the register method to register') + } + return form + } + + // 一些内置的方法 + const methods: { + setProps: (props: Recordable) => void + setValues: (data: Recordable) => void + getFormData: () => Promise + setSchema: (schemaProps: FormSetPropsType[]) => void + addSchema: (formSchema: FormSchema, index?: number) => void + delSchema: (field: string) => void + } = { + setProps: async (props: FormProps = {}) => { + const form = await getForm() + form?.setProps(props) + if (props.model) { + form?.setValues(props.model) + } + }, + + setValues: async (data: Recordable) => { + const form = await getForm() + form?.setValues(data) + }, + + /** + * @param schemaProps 需要设置的schemaProps + */ + setSchema: async (schemaProps: FormSetPropsType[]) => { + const form = await getForm() + form?.setSchema(schemaProps) + }, + + /** + * @param formSchema 需要新增数据 + * @param index 在哪里新增 + */ + addSchema: async (formSchema: FormSchema, index?: number) => { + const form = await getForm() + form?.addSchema(formSchema, index) + }, + + /** + * @param field 删除哪个数据 + */ + delSchema: async (field: string) => { + const form = await getForm() + form?.delSchema(field) + }, + + /** + * @returns form data + */ + getFormData: async (): Promise => { + const form = await getForm() + return form?.formModel as T + } + } + + props && methods.setProps(props) + + return { + register, + elFormRef, + methods + } +} diff --git a/src/hooks/web/useGuide.ts b/src/hooks/web/useGuide.ts new file mode 100644 index 0000000..7fd2fb0 --- /dev/null +++ b/src/hooks/web/useGuide.ts @@ -0,0 +1,49 @@ +import { Config, driver } from 'driver.js' +import 'driver.js/dist/driver.css' +import { useDesign } from '@/hooks/web/useDesign' +import { useI18n } from '@/hooks/web/useI18n' + +const { t } = useI18n() + +const { variables } = useDesign() + +export const useGuide = (options?: Config) => { + const driverObj = driver( + options || { + showProgress: true, + nextBtnText: t('common.nextLabel'), + prevBtnText: t('common.prevLabel'), + doneBtnText: t('common.doneLabel'), + steps: [ + { + element: `#${variables.namespace}-menu`, + popover: { + title: t('common.menu'), + description: t('common.menuDes'), + side: 'right' + } + }, + { + element: `#${variables.namespace}-tool-header`, + popover: { + title: t('common.tool'), + description: t('common.toolDes'), + side: 'left' + } + }, + { + element: `#${variables.namespace}-tags-view`, + popover: { + title: t('common.tagsView'), + description: t('common.tagsViewDes'), + side: 'bottom' + } + } + ] + } + ) + + return { + ...driverObj + } +} diff --git a/src/hooks/web/useI18n.ts b/src/hooks/web/useI18n.ts new file mode 100644 index 0000000..15902c1 --- /dev/null +++ b/src/hooks/web/useI18n.ts @@ -0,0 +1,52 @@ +import { i18n } from '@/plugins/vueI18n' + +type I18nGlobalTranslation = { + (key: string): string + (key: string, locale: string): string + (key: string, locale: string, list: unknown[]): string + (key: string, locale: string, named: Record): string + (key: string, list: unknown[]): string + (key: string, named: Record): string +} + +const getKey = (namespace: string | undefined, key: string) => { + if (!namespace) { + return key + } + if (key.startsWith(namespace)) { + return key + } + return `${namespace}.${key}` +} + +export const useI18n = ( + namespace?: string +): { + t: I18nGlobalTranslation +} => { + const normalFn = { + t: (key: string) => { + return getKey(namespace, key) + } + } + + if (!i18n) { + return normalFn + } + + const { t, ...methods } = i18n.global + // i18n.global 是 legacy / composition 两种 API 的联合类型,这里统一按可变参数翻译函数调用 + const translate = t as (key: string, ...args: unknown[]) => string + + const tFn: I18nGlobalTranslation = (key: string, ...arg: unknown[]) => { + if (!key) return '' + if (!key.includes('.') && !namespace) return key + return translate(getKey(namespace, key), ...arg) + } + return { + ...methods, + t: tFn + } +} + +export const t = (key: string) => key diff --git a/src/hooks/web/useIcon.ts b/src/hooks/web/useIcon.ts new file mode 100644 index 0000000..3500204 --- /dev/null +++ b/src/hooks/web/useIcon.ts @@ -0,0 +1,8 @@ +import { h } from 'vue' +import type { VNode } from 'vue' +import { Icon } from '@/components/Icon' +import { IconTypes } from '@/types/icon' + +export const useIcon = (props: IconTypes): VNode => { + return h(Icon, props) +} diff --git a/src/hooks/web/useLocalPagination.ts b/src/hooks/web/useLocalPagination.ts new file mode 100644 index 0000000..e494a18 --- /dev/null +++ b/src/hooks/web/useLocalPagination.ts @@ -0,0 +1,31 @@ +import { computed, shallowRef, watch, type ComputedRef, type Ref, type WatchSource } from 'vue' + +interface LocalPagination { + page: Ref + pageSize: Ref + total: ComputedRef + pageCount: ComputedRef + rows: ComputedRef + reset: () => void +} + +/** 仅用于完整加载的本地集合;服务端分页继续使用 useTable。 */ +export function useLocalPagination(source: () => readonly T[], options: { pageSize?: number; resetOn?: WatchSource[] } = {}): LocalPagination { + const page = shallowRef(1) + const initialPageSize = Number.isInteger(options.pageSize) && options.pageSize && options.pageSize > 0 ? options.pageSize : 10 + const pageSize = shallowRef(initialPageSize) + const total = computed(() => source().length) + const pageCount = computed(() => Math.max(1, Math.ceil(total.value / pageSize.value))) + const reset = (): void => { page.value = 1 } + watch(pageSize, (value) => { + if (!Number.isInteger(value) || value < 1) pageSize.value = 10 + reset() + }, { flush: 'sync' }) + watch([page, pageCount], () => { + const validPage = Number.isFinite(page.value) ? Math.trunc(page.value) : 1 + page.value = Math.min(pageCount.value, Math.max(1, validPage)) + }, { flush: 'sync', immediate: true }) + if (options.resetOn?.length) watch(options.resetOn, reset, { flush: 'sync' }) + const rows = computed(() => source().slice((page.value - 1) * pageSize.value, page.value * pageSize.value)) + return { page, pageSize, total, pageCount, rows, reset } +} diff --git a/src/hooks/web/useLocale.ts b/src/hooks/web/useLocale.ts new file mode 100644 index 0000000..19e660d --- /dev/null +++ b/src/hooks/web/useLocale.ts @@ -0,0 +1,36 @@ +import type { Ref } from 'vue' +import { i18n } from '@/plugins/vueI18n' +import { useLocaleStoreWithOut } from '@/store/modules/locale' +import { setHtmlPageLang } from '@/plugins/vueI18n/helper' + +const setI18nLanguage = (locale: LocaleType) => { + const localeStore = useLocaleStoreWithOut() + + if (i18n.mode === 'legacy') { + i18n.global.locale = locale + } else { + ;(i18n.global.locale as unknown as Ref).value = locale + } + localeStore.setCurrentLocale({ + lang: locale + }) + setHtmlPageLang(locale) +} + +export const useLocale = () => { + // Switching the language will change the locale of useI18n + // And submit to configuration modification + const changeLocale = async (locale: LocaleType) => { + const globalI18n = i18n.global + + const langModule = await import(`../../locales/${locale}.ts`) + + globalI18n.setLocaleMessage(locale, langModule.default) + + setI18nLanguage(locale) + } + + return { + changeLocale + } +} diff --git a/src/hooks/web/useMessage.ts b/src/hooks/web/useMessage.ts new file mode 100644 index 0000000..636dd83 --- /dev/null +++ b/src/hooks/web/useMessage.ts @@ -0,0 +1,96 @@ +import { ElMessage, ElMessageBox, ElNotification, type ElMessageBoxOptions } from 'element-plus' +import { useI18n } from './useI18n' +export const useMessage = () => { + const { t } = useI18n() + return { + // 消息提示 + info(content: string) { + ElMessage.info(content) + }, + // 错误消息 + error(content: string) { + ElMessage.error(content) + }, + // 成功消息 + success(content: string) { + ElMessage.success(content) + }, + // 警告消息 + warning(content: string) { + ElMessage.warning(content) + }, + // 弹出提示 + alert(content: string) { + ElMessageBox.alert(content, t('common.confirmTitle')) + }, + // 错误提示 + alertError(content: string) { + ElMessageBox.alert(content, t('common.confirmTitle'), { type: 'error' }) + }, + // 成功提示 + alertSuccess(content: string) { + ElMessageBox.alert(content, t('common.confirmTitle'), { type: 'success' }) + }, + // 警告提示 + alertWarning(content: string) { + return ElMessageBox.alert(content, t('common.confirmTitle'), { type: 'warning' }) + }, + // 通知提示 + notify(content: string) { + ElNotification.info(content) + }, + // 错误通知 + notifyError(content: string) { + ElNotification.error(content) + }, + // 成功通知 + notifySuccess(content: string) { + ElNotification.success(content) + }, + // 警告通知 + notifyWarning(content: string) { + ElNotification.warning(content) + }, + // 确认窗体 + confirm(content: string, tip?: string) { + return ElMessageBox.confirm(content, tip ? tip : t('common.confirmTitle'), { + confirmButtonText: t('common.ok'), + cancelButtonText: t('common.cancel'), + type: 'warning' + }) + }, + // 删除窗体 + delConfirm(content?: string, tip?: string) { + return ElMessageBox.confirm( + content ? content : t('common.delMessage'), + tip ? tip : t('common.confirmTitle'), + { + confirmButtonText: t('common.ok'), + cancelButtonText: t('common.cancel'), + type: 'warning' + } + ) + }, + // 导出窗体 + exportConfirm(content?: string, tip?: string) { + return ElMessageBox.confirm( + content ? content : t('common.exportMessage'), + tip ? tip : t('common.confirmTitle'), + { + confirmButtonText: t('common.ok'), + cancelButtonText: t('common.cancel'), + type: 'warning' + } + ) + }, + // 提交内容 + prompt(content: string, tip: string, options: ElMessageBoxOptions = {}) { + return ElMessageBox.prompt(content, tip, { + confirmButtonText: t('common.ok'), + cancelButtonText: t('common.cancel'), + type: 'warning', + ...options + }) + } + } +} diff --git a/src/hooks/web/useNProgress.ts b/src/hooks/web/useNProgress.ts new file mode 100644 index 0000000..6d8c0b9 --- /dev/null +++ b/src/hooks/web/useNProgress.ts @@ -0,0 +1,33 @@ +import { useCssVar } from '@vueuse/core' +import type { NProgressOptions } from 'nprogress' +import NProgress from 'nprogress' +import 'nprogress/nprogress.css' + +const primaryColor = useCssVar('--el-color-primary', document.documentElement) + +export const useNProgress = () => { + NProgress.configure({ showSpinner: false } as NProgressOptions) + + const initColor = async () => { + await nextTick() + const bar = document.getElementById('nprogress')?.getElementsByClassName('bar')[0] as ElRef + if (bar) { + bar.style.background = unref(primaryColor.value) + } + } + + initColor() + + const start = () => { + NProgress.start() + } + + const done = () => { + NProgress.done() + } + + return { + start, + done + } +} diff --git a/src/hooks/web/useNetwork.ts b/src/hooks/web/useNetwork.ts new file mode 100644 index 0000000..66fa446 --- /dev/null +++ b/src/hooks/web/useNetwork.ts @@ -0,0 +1,21 @@ +import { ref, onBeforeUnmount } from 'vue' + +const useNetwork = () => { + const online = ref(true) + + const updateNetwork = () => { + online.value = navigator.onLine + } + + window.addEventListener('online', updateNetwork) + window.addEventListener('offline', updateNetwork) + + onBeforeUnmount(() => { + window.removeEventListener('online', updateNetwork) + window.removeEventListener('offline', updateNetwork) + }) + + return { online } +} + +export { useNetwork } diff --git a/src/hooks/web/useNow.ts b/src/hooks/web/useNow.ts new file mode 100644 index 0000000..09d3176 --- /dev/null +++ b/src/hooks/web/useNow.ts @@ -0,0 +1,60 @@ +import { dateUtil } from '@/utils/dateUtil' +import { reactive, toRefs } from 'vue' +import { tryOnMounted, tryOnUnmounted } from '@vueuse/core' + +export const useNow = (immediate = true) => { + let timer: IntervalHandle + + const state = reactive({ + year: 0, + month: 0, + week: '', + day: 0, + hour: '', + minute: '', + second: 0, + meridiem: '' + }) + + const update = () => { + const now = dateUtil() + + const h = now.format('HH') + const m = now.format('mm') + const s = now.get('s') + + state.year = now.get('y') + state.month = now.get('M') + 1 + state.week = '星期' + ['日', '一', '二', '三', '四', '五', '六'][now.day()] + state.day = now.get('date') + state.hour = h + state.minute = m + state.second = s + + state.meridiem = now.format('A') + } + + function start() { + update() + clearInterval(timer) + timer = setInterval(() => update(), 1000) + } + + function stop() { + clearInterval(timer) + } + + tryOnMounted(() => { + immediate && start() + }) + + tryOnUnmounted(() => { + stop() + }) + + return { + ...toRefs(state), + start, + stop + } +} diff --git a/src/hooks/web/usePageLoading.ts b/src/hooks/web/usePageLoading.ts new file mode 100644 index 0000000..bb89457 --- /dev/null +++ b/src/hooks/web/usePageLoading.ts @@ -0,0 +1,18 @@ +import { useAppStoreWithOut } from '@/store/modules/app' + +const appStore = useAppStoreWithOut() + +export const usePageLoading = () => { + const loadStart = () => { + appStore.setPageLoading(true) + } + + const loadDone = () => { + appStore.setPageLoading(false) + } + + return { + loadStart, + loadDone + } +} diff --git a/src/hooks/web/useTable.ts b/src/hooks/web/useTable.ts new file mode 100644 index 0000000..467cf36 --- /dev/null +++ b/src/hooks/web/useTable.ts @@ -0,0 +1,223 @@ +import download from '@/utils/download' +import { Table, TableExpose } from '@/components/Table' +import { ElMessage, ElMessageBox, ElTable } from 'element-plus' +import { computed, nextTick, reactive, ref, unref, watch } from 'vue' +import type { TableProps } from '@/components/Table/src/types' + +import { TableSetPropsType } from '@/types/table' + +const { t } = useI18n() +interface ResponseType { + list: T[] + total?: number +} + +interface UseTableConfig { + getListApi: (option: Record) => Promise + delListApi?: (option: string | number) => Promise + exportListApi?: (option: Record) => Promise + // 返回数据格式配置 + response?: ResponseType + // 默认传递的参数 + defaultParams?: Recordable + props?: TableProps +} + +interface TableObject { + pageSize: number + currentPage: number + total: number + tableList: T[] + params: Record + loading: boolean + exportLoading: boolean + currentRow: Nullable +} + +export const useTable = (config?: UseTableConfig) => { + const tableObject = reactive>({ + // 页数 + pageSize: 10, + // 当前页 + currentPage: 1, + // 总条数 + total: 10, + // 表格数据 + tableList: [], + // AxiosConfig 配置 + params: { + ...(config?.defaultParams || {}) + }, + // 加载中 + loading: true, + // 导出加载中 + exportLoading: false, + // 当前行的数据 + currentRow: null + }) + + const paramsObj = computed(() => { + return { + ...tableObject.params, + pageSize: tableObject.pageSize, + pageNo: tableObject.currentPage + } + }) + + watch( + () => tableObject.currentPage, + () => { + methods.getList() + } + ) + + watch( + () => tableObject.pageSize, + () => { + // 当前页不为1时,修改页数后会导致多次调用getList方法 + if (tableObject.currentPage === 1) { + methods.getList() + } else { + tableObject.currentPage = 1 + methods.getList() + } + } + ) + + // Table实例 + const tableRef = ref() + + // ElTable实例 + const elTableRef = ref>() + + const register = (ref: typeof Table & TableExpose, elRef: ComponentRef) => { + tableRef.value = ref + elTableRef.value = elRef + } + + const getTable = async () => { + await nextTick() + const table = unref(tableRef) + if (!table) { + console.error('The table is not registered. Please use the register method to register') + } + return table + } + + const delData = async (ids: string | number | string[] | number[]) => { + let idsLength = 1 + if (ids instanceof Array) { + idsLength = ids.length + await Promise.all( + ids.map(async (id: string | number) => { + await (config?.delListApi && config?.delListApi(id)) + }) + ) + } else { + await (config?.delListApi && config?.delListApi(ids)) + } + ElMessage.success(t('common.delSuccess')) + + // 计算出临界点 + tableObject.currentPage = + tableObject.total % tableObject.pageSize === idsLength || tableObject.pageSize === 1 + ? tableObject.currentPage > 1 + ? tableObject.currentPage - 1 + : tableObject.currentPage + : tableObject.currentPage + await methods.getList() + } + + const methods = { + getList: async () => { + tableObject.loading = true + const res = await config?.getListApi(unref(paramsObj)).finally(() => { + tableObject.loading = false + }) + if (res) { + tableObject.tableList = (res as unknown as ResponseType).list + tableObject.total = (res as unknown as ResponseType).total ?? 0 + } + }, + setProps: async (props: TableProps = {}) => { + const table = await getTable() + table?.setProps(props) + }, + setColumn: async (columnProps: TableSetPropsType[]) => { + const table = await getTable() + table?.setColumn(columnProps) + }, + getSelections: async () => { + const table = await getTable() + return (table?.selections || []) as T[] + }, + // 与Search组件结合 + setSearchParams: (data: Recordable) => { + tableObject.params = Object.assign(tableObject.params, { + pageSize: tableObject.pageSize, + pageNo: 1, + ...data + }) + // 页码不等于1时更新页码重新获取数据,页码等于1时重新获取数据 + if (tableObject.currentPage !== 1) { + tableObject.currentPage = 1 + } else { + methods.getList() + } + }, + // 删除数据 + delList: async ( + ids: string | number | string[] | number[], + multiple: boolean, + message = true + ) => { + const tableRef = await getTable() + if (multiple) { + if (!tableRef?.selections.length) { + ElMessage.warning(t('common.delNoData')) + return + } + } + if (message) { + ElMessageBox.confirm(t('common.delMessage'), t('common.confirmTitle'), { + confirmButtonText: t('common.ok'), + cancelButtonText: t('common.cancel'), + type: 'warning' + }).then(async () => { + await delData(ids) + }) + } else { + await delData(ids) + } + }, + // 导出列表 + exportList: async (fileName: string) => { + tableObject.exportLoading = true + ElMessageBox.confirm(t('common.exportMessage'), t('common.confirmTitle'), { + confirmButtonText: t('common.ok'), + cancelButtonText: t('common.cancel'), + type: 'warning' + }) + .then(async () => { + const res = await config?.exportListApi?.(unref(paramsObj)) + if (res) { + download.excel(res as unknown as Blob, fileName) + } + }) + .finally(() => { + tableObject.exportLoading = false + }) + } + } + + config?.props && methods.setProps(config.props) + + return { + register, + elTableRef, + tableObject, + methods, + // 返回 tableMethods 属性,和 tableObject 更统一 + tableMethods: methods + } +} diff --git a/src/hooks/web/useTagsView.ts b/src/hooks/web/useTagsView.ts new file mode 100644 index 0000000..31eadb0 --- /dev/null +++ b/src/hooks/web/useTagsView.ts @@ -0,0 +1,63 @@ +import { useTagsViewStoreWithOut } from '@/store/modules/tagsView' +import { RouteLocationNormalizedLoaded, useRouter } from 'vue-router' +import { computed, nextTick, unref } from 'vue' + +export const useTagsView = () => { + const tagsViewStore = useTagsViewStoreWithOut() + + const { replace, currentRoute } = useRouter() + + const selectedTag = computed(() => tagsViewStore.getSelectedTag) + + const closeAll = (callback?: Fn) => { + tagsViewStore.delAllViews() + callback?.() + } + + const closeLeft = (callback?: Fn) => { + tagsViewStore.delLeftViews(unref(selectedTag) as RouteLocationNormalizedLoaded) + callback?.() + } + + const closeRight = (callback?: Fn) => { + tagsViewStore.delRightViews(unref(selectedTag) as RouteLocationNormalizedLoaded) + callback?.() + } + + const closeOther = (callback?: Fn) => { + tagsViewStore.delOthersViews(unref(selectedTag) as RouteLocationNormalizedLoaded) + callback?.() + } + + const closeCurrent = (view?: RouteLocationNormalizedLoaded, callback?: Fn) => { + if (view?.meta?.affix) return + tagsViewStore.delView(view || unref(currentRoute)) + + callback?.() + } + + const refreshPage = async (view?: RouteLocationNormalizedLoaded, callback?: Fn) => { + tagsViewStore.delCachedView() + const { path, query } = view || unref(currentRoute) + await nextTick() + replace({ + path: '/redirect' + path, + query: query + }) + callback?.() + } + + const setTitle = (title: string, path?: string) => { + tagsViewStore.setTitle(title, path) + } + + return { + closeAll, + closeLeft, + closeRight, + closeOther, + closeCurrent, + refreshPage, + setTitle + } +} diff --git a/src/hooks/web/useTimeAgo.ts b/src/hooks/web/useTimeAgo.ts new file mode 100644 index 0000000..7ca1479 --- /dev/null +++ b/src/hooks/web/useTimeAgo.ts @@ -0,0 +1,49 @@ +import { useTimeAgo as useTimeAgoCore, UseTimeAgoMessages } from '@vueuse/core' +import { useLocaleStoreWithOut } from '@/store/modules/locale' + +const TIME_AGO_MESSAGE_MAP: { + 'zh-CN': UseTimeAgoMessages + en: UseTimeAgoMessages +} = { + 'zh-CN': { + justNow: '刚刚', + invalid: '无效时间', + past: (n) => (n.match(/\d/) ? `${n}前` : n), + future: (n) => (n.match(/\d/) ? `${n}后` : n), + month: (n, past) => (n === 1 ? (past ? '上个月' : '下个月') : `${n} 个月`), + year: (n, past) => (n === 1 ? (past ? '去年' : '明年') : `${n} 年`), + day: (n, past) => (n === 1 ? (past ? '昨天' : '明天') : `${n} 天`), + week: (n, past) => (n === 1 ? (past ? '上周' : '下周') : `${n} 周`), + hour: (n) => `${n} 小时`, + minute: (n) => `${n} 分钟`, + second: (n) => `${n} 秒` + }, + en: { + justNow: 'just now', + invalid: 'Invalid Date', + past: (n) => (n.match(/\d/) ? `${n} ago` : n), + future: (n) => (n.match(/\d/) ? `in ${n}` : n), + month: (n, past) => + n === 1 ? (past ? 'last month' : 'next month') : `${n} month${n > 1 ? 's' : ''}`, + year: (n, past) => + n === 1 ? (past ? 'last year' : 'next year') : `${n} year${n > 1 ? 's' : ''}`, + day: (n, past) => (n === 1 ? (past ? 'yesterday' : 'tomorrow') : `${n} day${n > 1 ? 's' : ''}`), + week: (n, past) => + n === 1 ? (past ? 'last week' : 'next week') : `${n} week${n > 1 ? 's' : ''}`, + hour: (n) => `${n} hour${n > 1 ? 's' : ''}`, + minute: (n) => `${n} minute${n > 1 ? 's' : ''}`, + second: (n) => `${n} second${n > 1 ? 's' : ''}` + } +} + +export const useTimeAgo = (time: Date | number | string) => { + const localeStore = useLocaleStoreWithOut() + + const currentLocale = computed(() => localeStore.getCurrentLocale) + + const timeAgo = useTimeAgoCore(time, { + messages: TIME_AGO_MESSAGE_MAP[unref(currentLocale).lang] + }) + + return timeAgo +} diff --git a/src/hooks/web/useTitle.ts b/src/hooks/web/useTitle.ts new file mode 100644 index 0000000..020a9b7 --- /dev/null +++ b/src/hooks/web/useTitle.ts @@ -0,0 +1,24 @@ +import { watch, ref } from 'vue' +import { isString } from '@/utils/is' +import { useAppStoreWithOut } from '@/store/modules/app' + +const appStore = useAppStoreWithOut() + +export const useTitle = (newTitle?: string) => { + const { t } = useI18n() + const title = ref( + newTitle ? `${appStore.getTitle} - ${t(newTitle as string)}` : appStore.getTitle + ) + + watch( + title, + (n, o) => { + if (isString(n) && n !== o && document) { + document.title = n + } + }, + { immediate: true } + ) + + return title +} diff --git a/src/hooks/web/useValidator.ts b/src/hooks/web/useValidator.ts new file mode 100644 index 0000000..151e35b --- /dev/null +++ b/src/hooks/web/useValidator.ts @@ -0,0 +1,60 @@ +import { useI18n } from '@/hooks/web/useI18n' +import { FormItemRule } from 'element-plus' + +const { t } = useI18n() + +interface LengthRange { + min: number + max: number + message?: string +} + +export const useValidator = () => { + const required = (message?: string): FormItemRule => { + return { + required: true, + message: message || t('common.required') + } + } + + const lengthRange = (options: LengthRange): FormItemRule => { + const { min, max, message } = options + + return { + min, + max, + message: message || t('common.lengthRange', { min, max }) + } + } + + const notSpace = (message?: string): FormItemRule => { + return { + validator: (_, val, callback) => { + if (val?.indexOf(' ') !== -1) { + callback(new Error(message || t('common.notSpace'))) + } else { + callback() + } + } + } + } + + const notSpecialCharacters = (message?: string): FormItemRule => { + return { + validator: (_, val, callback) => { + if (/[`~!@#$%^&*()_+<>?:"{},.\/;'[\]]/gi.test(val)) { + callback(new Error(message || t('common.notSpecialCharacters'))) + } else { + callback() + } + } + } + } + + return { + required, + lengthRange, + notSpace, + notSpecialCharacters + } +} diff --git a/src/hooks/web/useWatermark.ts b/src/hooks/web/useWatermark.ts new file mode 100644 index 0000000..b798895 --- /dev/null +++ b/src/hooks/web/useWatermark.ts @@ -0,0 +1,93 @@ +import { useAppStore } from '@/store/modules/app' +import { watch } from 'vue' + +const domSymbol = Symbol('watermark-dom') +const WATERMARK_FONT_SIZE = 18 +let watermarkStr = '' +let resizeHandler: Fn | undefined + +export const getWatermarkDate = (date = new Date()) => + `${date.getFullYear()}${String(date.getMonth() + 1).padStart(2, '0')}${String(date.getDate()).padStart(2, '0')}` + +export function useWatermark(appendEl: HTMLElement | null = document.body) { + const id = domSymbol.toString() + const appStore = useAppStore() + + const removeWatermark = () => { + const domId = document.getElementById(id) + if (domId) { + const el = appendEl + el && el.removeChild(domId) + } + } + + const clear = () => { + removeWatermark() + if (resizeHandler) { + window.removeEventListener('resize', resizeHandler) + resizeHandler = undefined + } + watermarkStr = '' + } + + const createWatermark = (str: string) => { + removeWatermark() + + const can = document.createElement('canvas') + can.width = 320 + can.height = 200 + + const cans = can.getContext('2d') + if (cans) { + cans.translate(can.width / 2, can.height / 2) + cans.rotate((-25 * Math.PI) / 180) + cans.font = `${WATERMARK_FONT_SIZE}px sans-serif` + cans.fillStyle = appStore.getIsDark ? 'rgba(255, 255, 255, 0.12)' : 'rgba(54, 92, 160, 0.1)' + cans.textAlign = 'center' + cans.textBaseline = 'middle' + cans.fillText(str, 0, 0) + } + + const div = document.createElement('div') + div.id = id + div.style.pointerEvents = 'none' + div.style.top = '0px' + div.style.left = '0px' + div.style.position = 'absolute' + div.style.zIndex = '100000000' + div.style.width = document.documentElement.clientWidth + 'px' + div.style.height = document.documentElement.clientHeight + 'px' + div.style.background = 'url(' + can.toDataURL('image/png') + ') left top repeat' + const el = appendEl + el && el.appendChild(div) + return id + } + + function setWatermark(str: string) { + if (resizeHandler) { + window.removeEventListener('resize', resizeHandler) + } + watermarkStr = str.trim() + if (!watermarkStr) { + clear() + return + } + createWatermark(watermarkStr) + resizeHandler = () => { + createWatermark(watermarkStr) + } + window.addEventListener('resize', resizeHandler) + } + + // 监听主题变化 + watch( + () => appStore.getIsDark, + () => { + if (watermarkStr) { + createWatermark(watermarkStr) + } + } + ) + + return { setWatermark, clear } +} diff --git a/src/layout/Layout.vue b/src/layout/Layout.vue new file mode 100644 index 0000000..138f14b --- /dev/null +++ b/src/layout/Layout.vue @@ -0,0 +1,22 @@ + + + + + diff --git a/src/layout/components/AppView.vue b/src/layout/components/AppView.vue new file mode 100644 index 0000000..e11f631 --- /dev/null +++ b/src/layout/components/AppView.vue @@ -0,0 +1,46 @@ + + + diff --git a/src/layout/components/Breadcrumb/index.ts b/src/layout/components/Breadcrumb/index.ts new file mode 100644 index 0000000..93ffe70 --- /dev/null +++ b/src/layout/components/Breadcrumb/index.ts @@ -0,0 +1,3 @@ +import Breadcrumb from './src/Breadcrumb.vue' + +export { Breadcrumb } diff --git a/src/layout/components/Breadcrumb/src/Breadcrumb.vue b/src/layout/components/Breadcrumb/src/Breadcrumb.vue new file mode 100644 index 0000000..d94db90 --- /dev/null +++ b/src/layout/components/Breadcrumb/src/Breadcrumb.vue @@ -0,0 +1,136 @@ + + + diff --git a/src/layout/components/Breadcrumb/src/helper.ts b/src/layout/components/Breadcrumb/src/helper.ts new file mode 100644 index 0000000..fb3ec19 --- /dev/null +++ b/src/layout/components/Breadcrumb/src/helper.ts @@ -0,0 +1,31 @@ +import { pathResolve } from '@/utils/routerHelper' +import type { RouteMeta } from 'vue-router' + +export const filterBreadcrumb = ( + routes: AppRouteRecordRaw[], + parentPath = '' +): AppRouteRecordRaw[] => { + const res: AppRouteRecordRaw[] = [] + + for (const route of routes) { + const meta = route?.meta as RouteMeta + if (meta.hidden && !meta.canTo) { + continue + } + + const data: AppRouteRecordRaw = + !meta.alwaysShow && route.children?.length === 1 + ? { ...route.children[0], path: pathResolve(route.path, route.children[0].path) } + : { ...route } + + data.path = pathResolve(parentPath, data.path) + + if (data.children) { + data.children = filterBreadcrumb(data.children, data.path) + } + if (data) { + res.push(data) + } + } + return res +} diff --git a/src/layout/components/CkyunHeader.vue b/src/layout/components/CkyunHeader.vue new file mode 100644 index 0000000..abd24e0 --- /dev/null +++ b/src/layout/components/CkyunHeader.vue @@ -0,0 +1,298 @@ + + + + + diff --git a/src/layout/components/CkyunLayout.vue b/src/layout/components/CkyunLayout.vue new file mode 100644 index 0000000..b4960ed --- /dev/null +++ b/src/layout/components/CkyunLayout.vue @@ -0,0 +1,297 @@ + + + + + diff --git a/src/layout/components/Collapse/index.ts b/src/layout/components/Collapse/index.ts new file mode 100644 index 0000000..73f65a3 --- /dev/null +++ b/src/layout/components/Collapse/index.ts @@ -0,0 +1,3 @@ +import Collapse from './src/Collapse.vue' + +export { Collapse } diff --git a/src/layout/components/Collapse/src/Collapse.vue b/src/layout/components/Collapse/src/Collapse.vue new file mode 100644 index 0000000..a8fc7ee --- /dev/null +++ b/src/layout/components/Collapse/src/Collapse.vue @@ -0,0 +1,35 @@ + + + diff --git a/src/layout/components/ContextMenu/index.ts b/src/layout/components/ContextMenu/index.ts new file mode 100644 index 0000000..2a7c1f0 --- /dev/null +++ b/src/layout/components/ContextMenu/index.ts @@ -0,0 +1,10 @@ +import ContextMenu from './src/ContextMenu.vue' +import { ElDropdown } from 'element-plus' +import type { RouteLocationNormalizedLoaded } from 'vue-router' + +export interface ContextMenuExpose { + elDropdownMenuRef: ComponentRef + tagItem: RouteLocationNormalizedLoaded +} + +export { ContextMenu } diff --git a/src/layout/components/ContextMenu/src/ContextMenu.vue b/src/layout/components/ContextMenu/src/ContextMenu.vue new file mode 100644 index 0000000..007cbf6 --- /dev/null +++ b/src/layout/components/ContextMenu/src/ContextMenu.vue @@ -0,0 +1,76 @@ + + + diff --git a/src/layout/components/Footer/index.ts b/src/layout/components/Footer/index.ts new file mode 100644 index 0000000..bd052e0 --- /dev/null +++ b/src/layout/components/Footer/index.ts @@ -0,0 +1,3 @@ +import Footer from './src/Footer.vue' + +export { Footer } diff --git a/src/layout/components/Footer/src/Footer.vue b/src/layout/components/Footer/src/Footer.vue new file mode 100644 index 0000000..98ce7e5 --- /dev/null +++ b/src/layout/components/Footer/src/Footer.vue @@ -0,0 +1,27 @@ + + + diff --git a/src/layout/components/LocaleDropdown/index.ts b/src/layout/components/LocaleDropdown/index.ts new file mode 100644 index 0000000..d02e640 --- /dev/null +++ b/src/layout/components/LocaleDropdown/index.ts @@ -0,0 +1,3 @@ +import LocaleDropdown from './src/LocaleDropdown.vue' + +export { LocaleDropdown } diff --git a/src/layout/components/LocaleDropdown/src/LocaleDropdown.vue b/src/layout/components/LocaleDropdown/src/LocaleDropdown.vue new file mode 100644 index 0000000..95132db --- /dev/null +++ b/src/layout/components/LocaleDropdown/src/LocaleDropdown.vue @@ -0,0 +1,52 @@ + + + diff --git a/src/layout/components/Logo/index.ts b/src/layout/components/Logo/index.ts new file mode 100644 index 0000000..1c4224c --- /dev/null +++ b/src/layout/components/Logo/index.ts @@ -0,0 +1,3 @@ +import Logo from './src/Logo.vue' + +export { Logo } diff --git a/src/layout/components/Logo/src/Logo.vue b/src/layout/components/Logo/src/Logo.vue new file mode 100644 index 0000000..d241130 --- /dev/null +++ b/src/layout/components/Logo/src/Logo.vue @@ -0,0 +1,88 @@ + + + diff --git a/src/layout/components/Menu/index.ts b/src/layout/components/Menu/index.ts new file mode 100644 index 0000000..a6ec696 --- /dev/null +++ b/src/layout/components/Menu/index.ts @@ -0,0 +1,3 @@ +import Menu from './src/Menu.vue' + +export { Menu } diff --git a/src/layout/components/Menu/src/Menu.vue b/src/layout/components/Menu/src/Menu.vue new file mode 100644 index 0000000..497a257 --- /dev/null +++ b/src/layout/components/Menu/src/Menu.vue @@ -0,0 +1,280 @@ + + + + + diff --git a/src/layout/components/Menu/src/components/useRenderMenuItem.tsx b/src/layout/components/Menu/src/components/useRenderMenuItem.tsx new file mode 100644 index 0000000..301313f --- /dev/null +++ b/src/layout/components/Menu/src/components/useRenderMenuItem.tsx @@ -0,0 +1,50 @@ +import { ElSubMenu, ElMenuItem } from 'element-plus' +import { hasOneShowingChild } from '../helper' +import { isUrl } from '@/utils/is' +import { useRenderMenuTitle } from './useRenderMenuTitle' +import { pathResolve } from '@/utils/routerHelper' + +const { renderMenuTitle } = useRenderMenuTitle() + +export const useRenderMenuItem = () => + // allRouters: AppRouteRecordRaw[] = [], + { + const renderMenuItem = (routers: AppRouteRecordRaw[], parentPath = '/') => { + return routers + .filter((v) => !v.meta?.hidden) + .map((v) => { + const meta = v.meta ?? {} + const { oneShowingChild, onlyOneChild } = hasOneShowingChild(v.children, v) + const fullPath = isUrl(v.path) ? v.path : pathResolve(parentPath, v.path) // getAllParentPath(allRouters, v.path).join('/') + + if ( + oneShowingChild && + (!onlyOneChild?.children || onlyOneChild?.noShowingChildren) && + !meta?.alwaysShow + ) { + return ( + + {{ + default: () => renderMenuTitle(onlyOneChild ? onlyOneChild?.meta : meta) + }} + + ) + } else { + return ( + + {{ + title: () => renderMenuTitle(meta), + default: () => renderMenuItem(v.children!, fullPath) + }} + + ) + } + }) + } + + return { + renderMenuItem + } + } diff --git a/src/layout/components/Menu/src/components/useRenderMenuTitle.tsx b/src/layout/components/Menu/src/components/useRenderMenuTitle.tsx new file mode 100644 index 0000000..8941d9d --- /dev/null +++ b/src/layout/components/Menu/src/components/useRenderMenuTitle.tsx @@ -0,0 +1,27 @@ +import type { RouteMeta } from 'vue-router' +import { Icon } from '@/components/Icon' +import { useI18n } from '@/hooks/web/useI18n' + +export const useRenderMenuTitle = () => { + const renderMenuTitle = (meta: RouteMeta) => { + const { t } = useI18n() + const { title = 'Please set title', icon } = meta + + return icon ? ( + <> + + + {t(title as string)} + + + ) : ( + + {t(title as string)} + + ) + } + + return { + renderMenuTitle + } +} diff --git a/src/layout/components/Menu/src/helper.ts b/src/layout/components/Menu/src/helper.ts new file mode 100644 index 0000000..659e240 --- /dev/null +++ b/src/layout/components/Menu/src/helper.ts @@ -0,0 +1,54 @@ +import type { RouteMeta } from 'vue-router' +import { findPath } from '@/utils/tree' + +type OnlyOneChildType = AppRouteRecordRaw & { noShowingChildren?: boolean } + +interface HasOneShowingChild { + oneShowingChild?: boolean + onlyOneChild?: OnlyOneChildType +} + +export const getAllParentPath = (treeData: T[], path: string) => { + const menuList = findPath(treeData, (n) => n.path === path) + return (menuList || []).map((item) => item.path) +} + +export const hasOneShowingChild = ( + children: AppRouteRecordRaw[] = [], + parent: AppRouteRecordRaw +): HasOneShowingChild => { + const onlyOneChild = ref() + + const showingChildren = children.filter((v) => { + const meta = (v.meta ?? {}) as RouteMeta + if (meta.hidden) { + return false + } else { + // Temp set(will be used if only has one showing child) + onlyOneChild.value = v + return true + } + }) + + // When there is only one child router, the child router is displayed by default + if (showingChildren.length === 1) { + return { + oneShowingChild: true, + onlyOneChild: unref(onlyOneChild) + } + } + + // Show parent if there are no child router to display + if (!showingChildren.length) { + onlyOneChild.value = { ...parent, path: '', noShowingChildren: true } + return { + oneShowingChild: true, + onlyOneChild: unref(onlyOneChild) + } + } + + return { + oneShowingChild: false, + onlyOneChild: unref(onlyOneChild) + } +} diff --git a/src/layout/components/Message/index.ts b/src/layout/components/Message/index.ts new file mode 100644 index 0000000..dfe0207 --- /dev/null +++ b/src/layout/components/Message/index.ts @@ -0,0 +1,3 @@ +import Message from './src/Message.vue' + +export { Message } diff --git a/src/layout/components/Message/src/Message.vue b/src/layout/components/Message/src/Message.vue new file mode 100644 index 0000000..13d8863 --- /dev/null +++ b/src/layout/components/Message/src/Message.vue @@ -0,0 +1,137 @@ + + + diff --git a/src/layout/components/Screenfull/index.ts b/src/layout/components/Screenfull/index.ts new file mode 100644 index 0000000..faec2d8 --- /dev/null +++ b/src/layout/components/Screenfull/index.ts @@ -0,0 +1,3 @@ +import Screenfull from './src/Screenfull.vue' + +export { Screenfull } diff --git a/src/layout/components/Screenfull/src/Screenfull.vue b/src/layout/components/Screenfull/src/Screenfull.vue new file mode 100644 index 0000000..4c045f2 --- /dev/null +++ b/src/layout/components/Screenfull/src/Screenfull.vue @@ -0,0 +1,32 @@ + + + diff --git a/src/layout/components/Setting/index.ts b/src/layout/components/Setting/index.ts new file mode 100644 index 0000000..b64c9ad --- /dev/null +++ b/src/layout/components/Setting/index.ts @@ -0,0 +1,3 @@ +import Setting from './src/Setting.vue' + +export { Setting } diff --git a/src/layout/components/Setting/src/Setting.vue b/src/layout/components/Setting/src/Setting.vue new file mode 100644 index 0000000..92ecf41 --- /dev/null +++ b/src/layout/components/Setting/src/Setting.vue @@ -0,0 +1,303 @@ + + + + + diff --git a/src/layout/components/Setting/src/components/ColorRadioPicker.vue b/src/layout/components/Setting/src/components/ColorRadioPicker.vue new file mode 100644 index 0000000..fcc5e75 --- /dev/null +++ b/src/layout/components/Setting/src/components/ColorRadioPicker.vue @@ -0,0 +1,67 @@ + + + + + diff --git a/src/layout/components/Setting/src/components/InterfaceDisplay.vue b/src/layout/components/Setting/src/components/InterfaceDisplay.vue new file mode 100644 index 0000000..3ba5c6b --- /dev/null +++ b/src/layout/components/Setting/src/components/InterfaceDisplay.vue @@ -0,0 +1,236 @@ + + + diff --git a/src/layout/components/Setting/src/components/LayoutRadioPicker.vue b/src/layout/components/Setting/src/components/LayoutRadioPicker.vue new file mode 100644 index 0000000..801686c --- /dev/null +++ b/src/layout/components/Setting/src/components/LayoutRadioPicker.vue @@ -0,0 +1,172 @@ + + + + + diff --git a/src/layout/components/SizeDropdown/index.ts b/src/layout/components/SizeDropdown/index.ts new file mode 100644 index 0000000..516488d --- /dev/null +++ b/src/layout/components/SizeDropdown/index.ts @@ -0,0 +1,3 @@ +import SizeDropdown from './src/SizeDropdown.vue' + +export { SizeDropdown } diff --git a/src/layout/components/SizeDropdown/src/SizeDropdown.vue b/src/layout/components/SizeDropdown/src/SizeDropdown.vue new file mode 100644 index 0000000..3e15224 --- /dev/null +++ b/src/layout/components/SizeDropdown/src/SizeDropdown.vue @@ -0,0 +1,40 @@ + + + diff --git a/src/layout/components/TabMenu/index.ts b/src/layout/components/TabMenu/index.ts new file mode 100644 index 0000000..b5fd71c --- /dev/null +++ b/src/layout/components/TabMenu/index.ts @@ -0,0 +1,3 @@ +import TabMenu from './src/TabMenu.vue' + +export { TabMenu } diff --git a/src/layout/components/TabMenu/src/TabMenu.vue b/src/layout/components/TabMenu/src/TabMenu.vue new file mode 100644 index 0000000..efad6a6 --- /dev/null +++ b/src/layout/components/TabMenu/src/TabMenu.vue @@ -0,0 +1,240 @@ + + + diff --git a/src/layout/components/TabMenu/src/helper.ts b/src/layout/components/TabMenu/src/helper.ts new file mode 100644 index 0000000..cce3932 --- /dev/null +++ b/src/layout/components/TabMenu/src/helper.ts @@ -0,0 +1,51 @@ +import { getAllParentPath } from '@/layout/components/Menu/src/helper' +import type { RouteMeta } from 'vue-router' +import { isUrl } from '@/utils/is' +import { cloneDeep } from 'lodash-es' + +export type TabMapTypes = { + [key: string]: string[] +} + +export const tabPathMap = reactive({}) + +export const initTabMap = (routes: AppRouteRecordRaw[]) => { + for (const v of routes) { + const meta = (v.meta ?? {}) as RouteMeta + if (!meta?.hidden) { + tabPathMap[v.path] = [] + } + } +} + +export const filterMenusPath = ( + routes: AppRouteRecordRaw[], + allRoutes: AppRouteRecordRaw[] +): AppRouteRecordRaw[] => { + const res: AppRouteRecordRaw[] = [] + for (const v of routes) { + let data: Nullable = null + const meta = (v.meta ?? {}) as RouteMeta + if (!meta.hidden || meta.canTo) { + const allParentPath = getAllParentPath(allRoutes, v.path) + + const fullPath = isUrl(v.path) ? v.path : allParentPath.join('/') + + data = cloneDeep(v) + data.path = fullPath + if (v.children && data) { + data.children = filterMenusPath(v.children, allRoutes) + } + + if (data) { + res.push(data) + } + + if (allParentPath.length && Reflect.has(tabPathMap, allParentPath[0])) { + tabPathMap[allParentPath[0]].push(fullPath) + } + } + } + + return res +} diff --git a/src/layout/components/TagsView/index.ts b/src/layout/components/TagsView/index.ts new file mode 100644 index 0000000..30e604a --- /dev/null +++ b/src/layout/components/TagsView/index.ts @@ -0,0 +1,3 @@ +import TagsView from './src/TagsView.vue' + +export { TagsView } diff --git a/src/layout/components/TagsView/src/TagsView.vue b/src/layout/components/TagsView/src/TagsView.vue new file mode 100644 index 0000000..3e60945 --- /dev/null +++ b/src/layout/components/TagsView/src/TagsView.vue @@ -0,0 +1,651 @@ + + + + + diff --git a/src/layout/components/TagsView/src/helper.ts b/src/layout/components/TagsView/src/helper.ts new file mode 100644 index 0000000..22f6a50 --- /dev/null +++ b/src/layout/components/TagsView/src/helper.ts @@ -0,0 +1,21 @@ +import type { RouteMeta, RouteLocationNormalizedLoaded } from 'vue-router' +import { pathResolve } from '@/utils/routerHelper' + +export const filterAffixTags = (routes: AppRouteRecordRaw[], parentPath = '') => { + let tags: RouteLocationNormalizedLoaded[] = [] + routes.forEach((route) => { + const meta = route.meta as RouteMeta + const tagPath = pathResolve(parentPath, route.path) + if (meta?.affix) { + tags.push({ ...route, path: tagPath, fullPath: tagPath } as RouteLocationNormalizedLoaded) + } + if (route.children) { + const tempTags: RouteLocationNormalizedLoaded[] = filterAffixTags(route.children, tagPath) + if (tempTags.length >= 1) { + tags = [...tags, ...tempTags] + } + } + }) + + return tags +} diff --git a/src/layout/components/TenantVisit/index.vue b/src/layout/components/TenantVisit/index.vue new file mode 100644 index 0000000..b1f6954 --- /dev/null +++ b/src/layout/components/TenantVisit/index.vue @@ -0,0 +1,46 @@ + + + diff --git a/src/layout/components/ThemeSwitch/index.ts b/src/layout/components/ThemeSwitch/index.ts new file mode 100644 index 0000000..823a276 --- /dev/null +++ b/src/layout/components/ThemeSwitch/index.ts @@ -0,0 +1,3 @@ +import ThemeSwitch from './src/ThemeSwitch.vue' + +export { ThemeSwitch } diff --git a/src/layout/components/ThemeSwitch/src/ThemeSwitch.vue b/src/layout/components/ThemeSwitch/src/ThemeSwitch.vue new file mode 100644 index 0000000..39a8cfd --- /dev/null +++ b/src/layout/components/ThemeSwitch/src/ThemeSwitch.vue @@ -0,0 +1,46 @@ + + + + diff --git a/src/layout/components/ToolHeader.vue b/src/layout/components/ToolHeader.vue new file mode 100644 index 0000000..be0d5b7 --- /dev/null +++ b/src/layout/components/ToolHeader.vue @@ -0,0 +1,103 @@ + + + diff --git a/src/layout/components/UserInfo/index.ts b/src/layout/components/UserInfo/index.ts new file mode 100644 index 0000000..c3a34ab --- /dev/null +++ b/src/layout/components/UserInfo/index.ts @@ -0,0 +1,3 @@ +import UserInfo from './src/UserInfo.vue' + +export { UserInfo } diff --git a/src/layout/components/UserInfo/src/UserInfo.vue b/src/layout/components/UserInfo/src/UserInfo.vue new file mode 100644 index 0000000..8aa6737 --- /dev/null +++ b/src/layout/components/UserInfo/src/UserInfo.vue @@ -0,0 +1,436 @@ + + + + + diff --git a/src/layout/components/UserInfo/src/components/LockDialog.vue b/src/layout/components/UserInfo/src/components/LockDialog.vue new file mode 100644 index 0000000..ca4f1e8 --- /dev/null +++ b/src/layout/components/UserInfo/src/components/LockDialog.vue @@ -0,0 +1,97 @@ + + + + + diff --git a/src/layout/components/UserInfo/src/components/LockPage.vue b/src/layout/components/UserInfo/src/components/LockPage.vue new file mode 100644 index 0000000..02ad677 --- /dev/null +++ b/src/layout/components/UserInfo/src/components/LockPage.vue @@ -0,0 +1,259 @@ + + + + + diff --git a/src/layout/components/useModuleNavigation.ts b/src/layout/components/useModuleNavigation.ts new file mode 100644 index 0000000..68462bf --- /dev/null +++ b/src/layout/components/useModuleNavigation.ts @@ -0,0 +1,102 @@ +import { computed } from 'vue' +import { useRoute, useRouter } from 'vue-router' +import { usePermissionStore } from '@/store/modules/permission' +import { getFirstVisibleRoutePath, pathResolve } from '@/utils/routerHelper' +import { isUrl } from '@/utils/is' + +const HIDDEN_SYSTEM_MENUS = new Set(['租户管理', '租户套餐']) +const HOME_PATH = '/index' +/** 个人中心为独立隐藏路由,展示时沿用系统管理的导航分组。 */ +const PROFILE_PATH = '/user/profile' +const PERMISSION_LOG_MENU: AppRouteRecordRaw = { + path: '/system/permission-log', + name: 'CkyunPermissionLogMenuEntry', + meta: { + title: '权限变更日志', + icon: 'ep:document-checked' + } +} + +/** 只派生接口菜单的展示分组,不注册路由、不变更菜单或权限。 */ +export function useModuleNavigation() { + const route = useRoute() + const router = useRouter() + const permission = usePermissionStore() + const modules = computed(() => + permission.addRouters.filter((item) => !item.meta?.hidden && item.name !== '404Page') + ) + const resolvePath = (parent: string, path: string): string => + isUrl(path) ? path : pathResolve(parent, path) + const contains = (item: AppRouteRecordRaw, target: string, parent = '/'): boolean => { + const fullPath = resolvePath(parent, item.path) + return ( + fullPath === target || + (fullPath !== '/' && target.startsWith(`${fullPath}/`)) || + !!item.children?.some((child) => contains(child, target, fullPath)) + ) + } + const activeModule = computed(() => { + const target = String(route.meta.activeMenu || route.path) + const matched = modules.value.find((item) => contains(item, target)) + if (matched) return matched + if (route.path === HOME_PATH) return modules.value[0] + if (target !== PERMISSION_LOG_MENU.path && route.path !== PROFILE_PATH) return undefined + return modules.value.find( + (item) => + String(item.meta?.title || '') === '系统管理' || resolvePath('/', item.path) === '/system' + ) + }) + const absoluteChildren = (items: AppRouteRecordRaw[], parent: string): AppRouteRecordRaw[] => + items.map((item) => { + const path = resolvePath(parent, item.path) + return { + ...item, + path, + children: item.children ? absoluteChildren(item.children, path) : undefined + } + }) + const menuTitle = (item: AppRouteRecordRaw): string => String(item.meta?.title || '') + const normalizeSystemMenu = (item: AppRouteRecordRaw): AppRouteRecordRaw => { + const originalTitle = menuTitle(item) + const title = + originalTitle === '在线用户数' + ? '在线用户' + : originalTitle === '审计日志' + ? '系统日志' + : originalTitle + const normalizedChildren = item.children + ?.filter((child) => !HIDDEN_SYSTEM_MENUS.has(menuTitle(child))) + .map(normalizeSystemMenu) + const hasVisibleLogPermission = normalizedChildren?.some( + (child) => !child.meta?.hidden && ['登录日志', '操作日志'].includes(menuTitle(child)) + ) + const completedChildren = + title === '系统日志' && + hasVisibleLogPermission && + !normalizedChildren?.some((child) => menuTitle(child) === '权限变更日志') + ? [...(normalizedChildren || []), PERMISSION_LOG_MENU] + : normalizedChildren + return { + ...item, + meta: title === originalTitle ? item.meta : { ...item.meta, title }, + children: completedChildren + } + } + const normalizeSystemMenus = (items: AppRouteRecordRaw[]): AppRouteRecordRaw[] => + items.filter((item) => !HIDDEN_SYSTEM_MENUS.has(menuTitle(item))).map(normalizeSystemMenu) + const sidebar = computed(() => { + if (!activeModule.value) return [] + const items = absoluteChildren(activeModule.value.children || [], activeModule.value.path) + const isSystemModule = + menuTitle(activeModule.value) === '系统管理' || + resolvePath('/', activeModule.value.path) === '/system' + return isSystemModule ? normalizeSystemMenus(items) : items + }) + const selectModule = (item: AppRouteRecordRaw): void => { + const target = getFirstVisibleRoutePath([item]) + if (!target) return + if (isUrl(target)) window.open(target, '_blank', 'noopener,noreferrer') + else void router.push(target) + } + return { modules, activeModule, sidebar, selectModule } +} diff --git a/src/layout/components/usePageTitleOverride.ts b/src/layout/components/usePageTitleOverride.ts new file mode 100644 index 0000000..6393ac8 --- /dev/null +++ b/src/layout/components/usePageTitleOverride.ts @@ -0,0 +1,10 @@ +import { readonly, ref } from 'vue' + +const pageTitleOverride = ref('') + +export const usePageTitleOverride = () => ({ + pageTitleOverride: readonly(pageTitleOverride), + setPageTitleOverride: (title = '') => { + pageTitleOverride.value = title + } +}) diff --git a/src/layout/components/useRenderLayout.tsx b/src/layout/components/useRenderLayout.tsx new file mode 100644 index 0000000..a631aa0 --- /dev/null +++ b/src/layout/components/useRenderLayout.tsx @@ -0,0 +1,294 @@ +import { computed } from 'vue' +import { useAppStore } from '@/store/modules/app' +import { Menu } from '@/layout/components/Menu' +import { TabMenu } from '@/layout/components/TabMenu' +import { TagsView } from '@/layout/components/TagsView' +import { Logo } from '@/layout/components/Logo' +import AppView from './AppView.vue' +import ToolHeader from './ToolHeader.vue' +import { ElScrollbar } from 'element-plus' +import { useDesign } from '@/hooks/web/useDesign' + +const { getPrefixCls } = useDesign() + +const prefixCls = getPrefixCls('layout') + +const appStore = useAppStore() + +const pageLoading = computed(() => appStore.getPageLoading) + +// 标签页 +const tagsView = computed(() => appStore.getTagsView) + +// 菜单折叠 +const collapse = computed(() => appStore.getCollapse) + +// logo +const logo = computed(() => appStore.logo) + +// 固定头部 +const fixedHeader = computed(() => appStore.getFixedHeader) + +// 是否是移动端 +const mobile = computed(() => appStore.getMobile) + +// 固定菜单 +const fixedMenu = computed(() => appStore.getFixedMenu) + +export const useRenderLayout = () => { + const renderClassic = () => { + return ( + <> +
+ {logo.value ? ( + + ) : undefined} + +
+
+ +
+ + + {tagsView.value ? ( + + ) : undefined} +
+ + +
+
+ + ) + } + + const renderTopLeft = () => { + return ( + <> +
+ {logo.value ? : undefined} + + +
+
+ +
+ + {tagsView.value ? ( + + ) : undefined} + + + +
+
+ + ) + } + + const renderTop = () => { + return ( + <> +
+ {logo.value ? : undefined} + + +
+
+ + {tagsView.value ? ( + + ) : undefined} + + + +
+ + ) + } + + const renderCutMenu = () => { + return ( + <> +
+ {logo.value ? : undefined} + + +
+
+ +
+ + {tagsView.value ? ( + + ) : undefined} + + + +
+
+ + ) + } + + return { + renderClassic, + renderTopLeft, + renderTop, + renderCutMenu + } +} diff --git a/src/locales/en.ts b/src/locales/en.ts new file mode 100644 index 0000000..bd4c0b4 --- /dev/null +++ b/src/locales/en.ts @@ -0,0 +1,462 @@ +export default { + common: { + inputText: 'Please input', + selectText: 'Please select', + startTimeText: 'Start time', + endTimeText: 'End time', + login: 'Login', + required: 'This is required', + loginOut: 'Login out', + document: 'Document', + profile: 'User Center', + reminder: 'Reminder', + loginOutMessage: 'Exit the system?', + back: 'Back', + ok: 'OK', + save: 'Save', + cancel: 'Cancel', + close: 'Close', + reload: 'Reload current', + success: 'Success', + closeTab: 'Close current', + closeTheLeftTab: 'Close left', + closeTheRightTab: 'Close right', + closeOther: 'Close other', + closeAll: 'Close all', + prevLabel: 'Prev', + nextLabel: 'Next', + skipLabel: 'Jump', + doneLabel: 'End', + menu: 'Menu', + menuDes: 'Menu bar rendered in routed structure', + collapse: 'Collapse', + collapseDes: 'Expand and zoom the menu bar', + tagsView: 'Tags view', + tagsViewDes: 'Used to record routing history', + tool: 'Tool', + toolDes: 'Used to set up custom systems', + query: 'Query', + reset: 'Reset', + shrink: 'Put away', + expand: 'Expand', + confirmTitle: 'System Hint', + exportMessage: 'Whether to confirm export data item?', + importMessage: 'Whether to confirm import data item?', + createSuccess: 'Create Success', + updateSuccess: 'Update Success', + delMessage: 'Delete the selected data?', + delDataMessage: 'Delete the data?', + delNoData: 'Please select the data to delete', + delSuccess: 'Deleted successfully', + index: 'Index', + status: 'Status', + createTime: 'Create Time', + updateTime: 'Update Time', + copy: 'Copy', + copySuccess: 'Copy Success', + copyError: 'Copy Error' + }, + lock: { + lockScreen: 'Lock screen', + lock: 'Lock', + lockPassword: 'Lock screen password', + unlock: 'Click to unlock', + backToLogin: 'Back to login', + entrySystem: 'Entry the system', + placeholder: 'Please enter the lock screen password', + message: 'Lock screen password error' + }, + error: { + noPermission: `Sorry, you don't have permission to access this page.`, + pageError: 'Sorry, the page you visited does not exist.', + networkError: 'Sorry, the server reported an error.', + returnToHome: 'Return to home' + }, + permission: { + hasPermission: `Please set the operation permission label value`, + hasRole: `Please set the role permission tag value` + }, + setting: { + projectSetting: 'Project setting', + theme: 'Theme', + layout: 'Layout', + systemTheme: 'System theme', + menuTheme: 'Menu theme', + interfaceDisplay: 'Interface display', + breadcrumb: 'Breadcrumb', + breadcrumbIcon: 'Breadcrumb icon', + collapseMenu: 'Collapse menu', + hamburgerIcon: 'Hamburger icon', + screenfullIcon: 'Screenfull icon', + sizeIcon: 'Size icon', + localeIcon: 'Locale icon', + messageIcon: 'Message icon', + tagsView: 'Tags view', + logo: 'Logo', + greyMode: 'Grey mode', + fixedHeader: 'Fixed header', + headerTheme: 'Header theme', + cutMenu: 'Cut Menu', + copy: 'Copy', + clearAndReset: 'Clear cache and reset', + copySuccess: 'Copy success', + copyFailed: 'Copy failed', + footer: 'Footer', + uniqueOpened: 'Unique opened', + tagsViewIcon: 'Tags view icon', + reExperienced: 'Please exit the login experience again', + fixedMenu: 'Fixed menu' + }, + size: { + default: 'Default', + large: 'Large', + small: 'Small' + }, + login: { + welcome: 'Welcome to the system', + message: 'Backstage management system', + tenantname: 'TenantName', + username: 'Username', + password: 'Password', + code: 'verification code', + login: 'Sign in', + relogin: 'Sign in again', + otherLogin: 'Sign in with', + register: 'Register', + checkPassword: 'Confirm password', + remember: 'Remember me', + hasUser: 'Existing account? Go to login', + forgetPassword: 'Forget password?', + tenantNamePlaceholder: 'Please Enter Tenant Name', + usernamePlaceholder: 'Please Enter Username', + passwordPlaceholder: 'Please Enter Password', + codePlaceholder: 'Please Enter Verification Code', + mobileTitle: 'Mobile sign in', + mobileNumber: 'Mobile Number', + mobileNumberPlaceholder: 'Plaease Enter Mobile Number', + backLogin: 'back', + getSmsCode: 'Get SMS Code', + btnMobile: 'Mobile sign in', + btnQRCode: 'QR code sign in', + qrcode: 'Scan the QR code to log in', + btnRegister: 'Sign up', + SmsSendMsg: 'code has been sent', + resetPassword: "Reset Password", + resetPasswordSuccess: "Reset Password Success", + invalidTenantName:"Invalid Tenant Name" + }, + captcha: { + verify: 'Verify', + verification: 'Please complete security verification', + slide: 'Swipe right to complete verification', + point: 'Please click', + code: 'Please enter the verification code', + success: 'Verification succeeded', + fail: 'verification failed' + }, + router: { + login: 'Login', + home: 'Home', + analysis: 'Analysis', + workplace: 'Workplace' + }, + analysis: { + newUser: 'New user', + unreadInformation: 'Unread information', + transactionAmount: 'Transaction amount', + totalShopping: 'Total Shopping', + monthlySales: 'Monthly sales', + userAccessSource: 'User access source', + january: 'January', + february: 'February', + march: 'March', + april: 'April', + may: 'May', + june: 'June', + july: 'July', + august: 'August', + september: 'September', + october: 'October', + november: 'November', + december: 'December', + estimate: 'Estimate', + actual: 'Actual', + directAccess: 'Airect access', + mailMarketing: 'Mail marketing', + allianceAdvertising: 'Alliance advertising', + videoAdvertising: 'Video advertising', + searchEngines: 'Search engines', + weeklyUserActivity: 'Weekly user activity', + activeQuantity: 'Active quantity', + monday: 'Monday', + tuesday: 'Tuesday', + wednesday: 'Wednesday', + thursday: 'Thursday', + friday: 'Friday', + saturday: 'Saturday', + sunday: 'Sunday' + }, + workplace: { + welcome: 'Hello', + happyDay: 'Wish you happy every day!', + toady: `It's sunny today`, + notice: 'Announcement', + project: 'Project', + access: 'Project access', + toDo: 'To do', + introduction: 'A serious introduction', + shortcutOperation: 'Quick entry', + operation: 'Operation', + index: 'Index', + personal: 'Personal', + team: 'Team', + quote: 'Quote', + contribution: 'Contribution', + hot: 'Hot', + yield: 'Yield', + dynamic: 'Dynamic', + push: 'push', + follow: 'Follow' + }, + form: { + input: 'Input', + inputNumber: 'InputNumber', + default: 'Default', + icon: 'Icon', + mixed: 'Mixed', + textarea: 'Textarea', + slot: 'Slot', + position: 'Position', + autocomplete: 'Autocomplete', + select: 'Select', + selectGroup: 'Select Group', + selectV2: 'SelectV2', + cascader: 'Cascader', + switch: 'Switch', + rate: 'Rate', + colorPicker: 'Color Picker', + transfer: 'Transfer', + render: 'Render', + radio: 'Radio', + button: 'Button', + checkbox: 'Checkbox', + slider: 'Slider', + datePicker: 'Date Picker', + shortcuts: 'Shortcuts', + today: 'Today', + yesterday: 'Yesterday', + aWeekAgo: 'A week ago', + week: 'Week', + year: 'Year', + month: 'Month', + dates: 'Dates', + daterange: 'Date Range', + monthrange: 'Month Range', + dateTimePicker: 'DateTimePicker', + dateTimerange: 'Datetime Range', + timePicker: 'Time Picker', + timeSelect: 'Time Select', + inputPassword: 'input Password', + passwordStrength: 'Password Strength', + operate: 'operate', + change: 'Change', + restore: 'Restore', + disabled: 'Disabled', + disablement: 'Disablement', + delete: 'Delete', + add: 'Add', + setValue: 'Set value', + resetValue: 'Reset value', + set: 'Set', + subitem: 'Subitem', + formValidation: 'Form validation', + verifyReset: 'Verify reset', + remark: 'Remark' + }, + watermark: { + watermark: 'Watermark' + }, + table: { + table: 'Table', + index: 'Index', + title: 'Title', + author: 'Author', + createTime: 'Create time', + action: 'Action', + pagination: 'pagination', + reserveIndex: 'Reserve index', + restoreIndex: 'Restore index', + showSelections: 'Show selections', + hiddenSelections: 'Restore selections', + showExpandedRows: 'Show expanded rows', + hiddenExpandedRows: 'Hidden expanded rows', + header: 'Header' + }, + action: { + create: 'Create', + add: 'Add', + del: 'Delete', + delete: 'Delete', + edit: 'Edit', + update: 'Update', + preview: 'Preview', + more: 'More', + sync: 'Sync', + save: 'Save', + detail: 'Detail', + export: 'Export', + import: 'Import', + generate: 'Generate', + logout: 'Login Out', + test: 'Test', + typeCreate: 'Dict Type Create', + typeUpdate: 'Dict Type Eidt', + dataCreate: 'Dict Data Create', + dataUpdate: 'Dict Data Eidt', + fileUpload: 'File Upload' + }, + dialog: { + dialog: 'Dialog', + open: 'Open', + close: 'Close' + }, + sys: { + api: { + operationFailed: 'Operation failed', + errorTip: 'Error Tip', + errorMessage: 'The operation failed, the system is abnormal!', + timeoutMessage: 'Login timed out, please log in again!', + apiTimeoutMessage: 'The interface request timed out, please refresh the page and try again!', + apiRequestFailed: 'The interface request failed, please try again later!', + networkException: 'network anomaly', + networkExceptionMsg: + 'Please check if your network connection is normal! The network is abnormal', + + errMsg401: 'The user does not have permission (token, user name, password error)!', + errMsg403: 'The user is authorized, but access is forbidden!', + errMsg404: 'Network request error, the resource was not found!', + errMsg405: 'Network request error, request method not allowed!', + errMsg408: 'Network request timed out!', + errMsg500: 'Server error, please contact the administrator!', + errMsg501: 'The network is not implemented!', + errMsg502: 'Network Error!', + errMsg503: 'The service is unavailable, the server is temporarily overloaded or maintained!', + errMsg504: 'Network timeout!', + errMsg505: 'The http version does not support the request!', + errMsg901: 'Demo mode, no write operations are possible!' + }, + app: { + logoutTip: 'Reminder', + logoutMessage: 'Confirm to exit the system?', + menuLoading: 'Menu loading...' + }, + exception: { + backLogin: 'Back Login', + backHome: 'Back Home', + subTitle403: "Sorry, you don't have access to this page.", + subTitle404: 'Sorry, the page you visited does not exist.', + subTitle500: 'Sorry, the server is reporting an error.', + noDataTitle: 'No data on the current page.', + networkErrorTitle: 'Network Error', + networkErrorSubTitle: + 'Sorry, Your network connection has been disconnected, please check your network!' + }, + lock: { + unlock: 'Click to unlock', + alert: 'Lock screen password error', + backToLogin: 'Back to login', + entry: 'Enter the system', + placeholder: 'Please enter the lock screen password or user password' + }, + login: { + backSignIn: 'Back sign in', + mobileSignInFormTitle: 'Mobile sign in', + qrSignInFormTitle: 'Qr code sign in', + signInFormTitle: 'Sign in', + signUpFormTitle: 'Sign up', + forgetFormTitle: 'Reset password', + + signInTitle: 'Backstage management system', + signInDesc: 'Enter your personal details and get started!', + policy: 'I agree to the xxx Privacy Policy', + scanSign: `scanning the code to complete the login`, + + loginButton: 'Sign in', + registerButton: 'Sign up', + rememberMe: 'Remember me', + forgetPassword: 'Forget Password?', + otherSignIn: 'Sign in with', + + // notify + loginSuccessTitle: 'Login successful', + loginSuccessDesc: 'Welcome back', + + // placeholder + accountPlaceholder: 'Please input username', + passwordPlaceholder: 'Please input password', + smsPlaceholder: 'Please input sms code', + mobilePlaceholder: 'Please input mobile', + policyPlaceholder: 'Register after checking', + diffPwd: 'The two passwords are inconsistent', + + userName: 'Username', + password: 'Password', + confirmPassword: 'Confirm Password', + email: 'Email', + smsCode: 'SMS code', + mobile: 'Mobile' + } + }, + profile: { + user: { + title: 'Personal Information', + username: 'User Name', + nickname: 'Nick Name', + mobile: 'Phone Number', + email: 'User Mail', + dept: 'Department', + posts: 'Position', + roles: 'Own Role', + sex: 'Sex', + man: 'Man', + woman: 'Woman', + createTime: 'Created Date' + }, + info: { + title: 'Basic Information', + basicInfo: 'Basic Information', + resetPwd: 'Reset Password', + userSocial: 'Social Information' + }, + rules: { + nickname: 'Please Enter User Nickname', + mail: 'Please Input The Email Address', + truemail: 'Please Input The Correct Email Address', + phone: 'Please Enter The Phone Number', + truephone: 'Please Enter The Correct Phone Number' + }, + password: { + oldPassword: 'Old PassWord', + newPassword: 'New Password', + confirmPassword: 'Confirm Password', + oldPwdMsg: 'Please Enter Old Password', + newPwdMsg: 'Please Enter New Password', + cfPwdMsg: 'Please Enter Confirm Password', + diffPwd: 'The Passwords Entered Twice No Match' + } + }, + cropper: { + selectImage: 'Select Image', + uploadSuccess: 'Uploaded success!', + modalTitle: 'Avatar upload', + okText: 'Confirm and upload', + btn_reset: 'Reset', + btn_rotate_left: 'Counterclockwise rotation', + btn_rotate_right: 'Clockwise rotation', + btn_scale_x: 'Flip horizontal', + btn_scale_y: 'Flip vertical', + btn_zoom_in: 'Zoom in', + btn_zoom_out: 'Zoom out', + preview: 'Preivew' + } +} \ No newline at end of file diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts new file mode 100644 index 0000000..6a65a16 --- /dev/null +++ b/src/locales/zh-CN.ts @@ -0,0 +1,459 @@ +export default { + common: { + inputText: '请输入', + selectText: '请选择', + startTimeText: '开始时间', + endTimeText: '结束时间', + login: '登录', + required: '该项为必填项', + loginOut: '退出系统', + document: '项目文档', + profile: '个人中心', + reminder: '温馨提示', + loginOutMessage: '是否退出本系统?', + back: '返回', + ok: '确定', + save: '保存', + cancel: '取消', + close: '关闭', + reload: '重新加载', + success: '成功', + closeTab: '关闭标签页', + closeTheLeftTab: '关闭左侧标签页', + closeTheRightTab: '关闭右侧标签页', + closeOther: '关闭其他标签页', + closeAll: '关闭全部标签页', + prevLabel: '上一步', + nextLabel: '下一步', + skipLabel: '跳过', + doneLabel: '结束', + menu: '菜单', + menuDes: '以路由的结构渲染的菜单栏', + collapse: '展开缩收', + collapseDes: '展开和缩放菜单栏', + tagsView: '标签页', + tagsViewDes: '用于记录路由历史记录', + tool: '工具', + toolDes: '用于设置定制系统', + query: '查询', + reset: '重置', + shrink: '收起', + expand: '展开', + confirmTitle: '系统提示', + exportMessage: '是否确认导出数据项?', + importMessage: '是否确认导入数据项?', + createSuccess: '新增成功', + updateSuccess: '修改成功', + delMessage: '是否删除所选中数据?', + delDataMessage: '是否删除数据?', + delNoData: '请选择需要删除的数据', + delSuccess: '删除成功', + index: '序号', + status: '状态', + createTime: '创建时间', + updateTime: '更新时间', + copy: '复制', + copySuccess: '复制成功', + copyError: '复制失败' + }, + lock: { + lockScreen: '锁定屏幕', + lock: '锁定', + lockPassword: '锁屏密码', + unlock: '点击解锁', + backToLogin: '返回登录', + entrySystem: '进入系统', + placeholder: '请输入锁屏密码', + message: '锁屏密码错误' + }, + error: { + noPermission: `抱歉,您无权访问此页面。`, + pageError: '抱歉,您访问的页面不存在。', + networkError: '抱歉,服务器报告错误。', + returnToHome: '返回首页' + }, + permission: { + hasPermission: `请设置操作权限标签值`, + hasRole: `请设置角色权限标签值` + }, + setting: { + projectSetting: '项目配置', + theme: '主题', + layout: '布局', + systemTheme: '系统主题', + menuTheme: '菜单主题', + interfaceDisplay: '界面显示', + breadcrumb: '面包屑', + breadcrumbIcon: '面包屑图标', + collapseMenu: '折叠菜单', + hamburgerIcon: '折叠图标', + screenfullIcon: '全屏图标', + sizeIcon: '尺寸图标', + localeIcon: '多语言图标', + messageIcon: '消息图标', + tagsView: '标签页', + tagsViewImmerse: '标签页沉浸', + logo: '标志', + greyMode: '灰色模式', + fixedHeader: '固定头部', + headerTheme: '头部主题', + cutMenu: '切割菜单', + copy: '拷贝', + clearAndReset: '清除缓存并且重置', + copySuccess: '拷贝成功', + copyFailed: '拷贝失败', + footer: '页脚', + uniqueOpened: '菜单手风琴', + tagsViewIcon: '标签页图标', + reExperienced: '请重新退出登录体验', + fixedMenu: '固定菜单' + }, + size: { + default: '默认', + large: '大', + small: '小' + }, + login: { + welcome: '欢迎使用本系统', + message: '开箱即用的中后台管理系统', + tenantname: '租户名称', + username: '用户名', + password: '密码', + code: '验证码', + login: '登录', + relogin: '重新登录', + otherLogin: '其他登录方式', + register: '注册', + checkPassword: '确认密码', + remember: '记住我', + hasUser: '已有账号?去登录', + forgetPassword: '忘记密码?', + tenantNamePlaceholder: '请输入租户名称', + usernamePlaceholder: '请输入用户名', + passwordPlaceholder: '请输入密码', + codePlaceholder: '请输入验证码', + mobileTitle: '手机登录', + mobileNumber: '手机号码', + mobileNumberPlaceholder: '请输入手机号码', + backLogin: '返回', + getSmsCode: '获取验证码', + btnMobile: '手机登录', + btnQRCode: '二维码登录', + qrcode: '扫描二维码登录', + btnRegister: '注册', + SmsSendMsg: '验证码已发送', + resetPassword: '重置密码', + resetPasswordSuccess: '重置密码成功', + invalidTenantName: '无效的租户名称' + }, + captcha: { + verify: '验证', + verification: '请完成安全验证', + slide: '向右滑动完成验证', + point: '请依次点击', + code: '请输入验证码', + success: '验证成功', + fail: '验证失败' + }, + router: { + login: '登录', + socialLogin: '社交登录', + home: '首页', + analysis: '分析页', + workplace: '工作台' + }, + analysis: { + newUser: '新增用户', + unreadInformation: '未读消息', + transactionAmount: '成交金额', + totalShopping: '购物总量', + monthlySales: '每月销售额', + userAccessSource: '用户访问来源', + january: '一月', + february: '二月', + march: '三月', + april: '四月', + may: '五月', + june: '六月', + july: '七月', + august: '八月', + september: '九月', + october: '十月', + november: '十一月', + december: '十二月', + estimate: '预计', + actual: '实际', + directAccess: '直接访问', + mailMarketing: '邮件营销', + allianceAdvertising: '联盟广告', + videoAdvertising: '视频广告', + searchEngines: '搜索引擎', + weeklyUserActivity: '每周用户活跃量', + activeQuantity: '活跃量', + monday: '周一', + tuesday: '周二', + wednesday: '周三', + thursday: '周四', + friday: '周五', + saturday: '周六', + sunday: '周日' + }, + workplace: { + welcome: '你好', + happyDay: '祝你开心每一天!', + toady: '今日晴', + notice: '通知公告', + project: '项目数', + access: '项目访问', + toDo: '待办', + introduction: '一个正经的简介', + shortcutOperation: '快捷入口', + operation: '操作', + index: '指数', + personal: '个人', + team: '团队', + quote: '引用', + contribution: '贡献', + hot: '热度', + yield: '产量', + dynamic: '动态', + push: '推送', + follow: '关注' + }, + form: { + input: '输入框', + inputNumber: '数字输入框', + default: '默认', + icon: '图标', + mixed: '复合型', + textarea: '多行文本', + slot: '插槽', + position: '位置', + autocomplete: '自动补全', + select: '选择器', + selectGroup: '选项分组', + selectV2: '虚拟列表选择器', + cascader: '级联选择器', + switch: '开关', + rate: '评分', + colorPicker: '颜色选择器', + transfer: '穿梭框', + render: '渲染器', + radio: '单选框', + button: '按钮', + checkbox: '多选框', + slider: '滑块', + datePicker: '日期选择器', + shortcuts: '快捷选项', + today: '今天', + yesterday: '昨天', + aWeekAgo: '一周前', + week: '周', + year: '年', + month: '月', + dates: '日期', + daterange: '日期范围', + monthrange: '月份范围', + dateTimePicker: '日期时间选择器', + dateTimerange: '日期时间范围', + timePicker: '时间选择器', + timeSelect: '时间选择', + inputPassword: '密码输入框', + passwordStrength: '密码强度', + operate: '操作', + change: '更改', + restore: '还原', + disabled: '禁用', + disablement: '解除禁用', + delete: '删除', + add: '添加', + setValue: '设置值', + resetValue: '重置值', + set: '设置', + subitem: '子项', + formValidation: '表单验证', + verifyReset: '验证重置', + remark: '备注' + }, + watermark: { + watermark: '水印' + }, + table: { + table: '表格', + index: '序号', + title: '标题', + author: '作者', + createTime: '创建时间', + action: '操作', + pagination: '分页', + reserveIndex: '叠加序号', + restoreIndex: '还原序号', + showSelections: '显示多选', + hiddenSelections: '隐藏多选', + showExpandedRows: '显示展开行', + hiddenExpandedRows: '隐藏展开行', + header: '头部' + }, + action: { + create: '新增', + add: '新增', + del: '删除', + delete: '删除', + edit: '编辑', + update: '编辑', + preview: '预览', + more: '更多', + sync: '同步', + save: '保存', + detail: '详情', + export: '导出', + import: '导入', + generate: '生成', + logout: '强制退出', + test: '测试', + typeCreate: '字典类型新增', + typeUpdate: '字典类型编辑', + dataCreate: '字典数据新增', + dataUpdate: '字典数据编辑' + }, + dialog: { + dialog: '弹窗', + open: '打开', + close: '关闭' + }, + sys: { + api: { + operationFailed: '操作失败', + errorTip: '错误提示', + errorMessage: '操作失败,系统异常!', + timeoutMessage: '登录超时,请重新登录!', + apiTimeoutMessage: '接口请求超时,请刷新页面重试!', + apiRequestFailed: '请求出错,请稍候重试', + networkException: '网络异常', + networkExceptionMsg: '网络异常,请检查您的网络连接是否正常!', + errMsg401: '用户没有权限(令牌、用户名、密码错误)!', + errMsg403: '用户得到授权,但是访问是被禁止的。!', + errMsg404: '网络请求错误,未找到该资源!', + errMsg405: '网络请求错误,请求方法未允许!', + errMsg408: '网络请求超时!', + errMsg500: '服务器错误,请联系管理员!', + errMsg501: '网络未实现!', + errMsg502: '网络错误!', + errMsg503: '服务不可用,服务器暂时过载或维护!', + errMsg504: '网络超时!', + errMsg505: 'http版本不支持该请求!', + errMsg901: '演示模式,无法进行写操作!' + }, + app: { + logoutTip: '温馨提醒', + logoutMessage: '是否确认退出系统?', + menuLoading: '菜单加载中...' + }, + exception: { + backLogin: '返回登录', + backHome: '返回首页', + subTitle403: '抱歉,您无权访问此页面。', + subTitle404: '抱歉,您访问的页面不存在。', + subTitle500: '抱歉,服务器报告错误。', + noDataTitle: '当前页无数据', + networkErrorTitle: '网络错误', + networkErrorSubTitle: '抱歉,您的网络连接已断开,请检查您的网络!' + }, + lock: { + unlock: '点击解锁', + alert: '锁屏密码错误', + backToLogin: '返回登录', + entry: '进入系统', + placeholder: '请输入锁屏密码或者用户密码' + }, + login: { + backSignIn: '返回', + signInFormTitle: '登录', + ssoFormTitle: '三方授权', + mobileSignInFormTitle: '手机登录', + qrSignInFormTitle: '二维码登录', + signUpFormTitle: '注册', + forgetFormTitle: '重置密码', + signInTitle: '开箱即用的中后台管理系统', + signInDesc: '输入您的个人详细信息开始使用!', + policy: '我同意xxx隐私政策', + scanSign: `扫码后点击"确认",即可完成登录`, + loginButton: '登录', + registerButton: '注册', + rememberMe: '记住我', + forgetPassword: '忘记密码?', + otherSignIn: '其他登录方式', + // notify + loginSuccessTitle: '登录成功', + loginSuccessDesc: '欢迎回来', + // placeholder + accountPlaceholder: '请输入账号', + passwordPlaceholder: '请输入密码', + smsPlaceholder: '请输入验证码', + mobilePlaceholder: '请输入手机号码', + policyPlaceholder: '勾选后才能注册', + diffPwd: '两次输入密码不一致', + userName: '账号', + password: '密码', + confirmPassword: '确认密码', + email: '邮箱', + smsCode: '短信验证码', + mobile: '手机号码' + } + }, + profile: { + user: { + title: '个人信息', + username: '用户名称', + nickname: '用户昵称', + mobile: '手机号码', + email: '用户邮箱', + dept: '所属部门', + posts: '所属岗位', + roles: '所属角色', + sex: '性别', + man: '男', + woman: '女', + createTime: '创建日期' + }, + info: { + title: '基本信息', + basicInfo: '基本设置', + resetPwd: '密码设置', + userSocial: '社交绑定' + }, + rules: { + nickname: '请输入用户昵称', + mail: '请输入邮箱地址', + truemail: '请输入正确的邮箱地址', + phone: '请输入正确的手机号码', + truephone: '请输入正确的手机号码' + }, + password: { + oldPassword: '旧密码', + newPassword: '新密码', + confirmPassword: '确认密码', + oldPwdMsg: '请输入旧密码', + newPwdMsg: '请输入新密码', + cfPwdMsg: '请输入确认密码', + newPwdRules: '长度在 8 到 16 个字符', + pwdRules: '长度在 6 到 20 个字符', + diffPwd: '两次输入密码不一致' + } + }, + cropper: { + selectImage: '选择图片', + uploadSuccess: '上传成功', + modalTitle: '头像上传', + okText: '确认并上传', + btn_reset: '重置', + btn_rotate_left: '逆时针旋转', + btn_rotate_right: '顺时针旋转', + btn_scale_x: '水平翻转', + btn_scale_y: '垂直翻转', + btn_zoom_in: '放大', + btn_zoom_out: '缩小', + preview: '预览' + }, + 'OAuth 2.0': 'OAuth 2.0' // 避免菜单名是 OAuth 2.0 时,一直 warn 报错 +} \ No newline at end of file diff --git a/src/main.ts b/src/main.ts new file mode 100644 index 0000000..a4f921d --- /dev/null +++ b/src/main.ts @@ -0,0 +1,81 @@ +// 引入unocss css +import '@/plugins/unocss' + +// 导入全局的svg图标 +import '@/plugins/svgIcon' +// 引入全局样式 +import '@/styles/index.scss' + +// 引入动画 +import '@/plugins/animate.css' + +// 初始化多语言 +import { setupI18n } from '@/plugins/vueI18n' + +// 引入状态管理 +import { setupStore } from '@/store' + +// 全局组件 +import { setupGlobCom } from '@/components' + +// 引入 element-plus +import { setupElementPlus } from '@/plugins/elementPlus' + +// 引入 form-create +import { setupFormCreate } from '@/plugins/formCreate' + +// 路由 +import router, { setupRouter } from '@/router' + +// 指令 +import { setupAuth, setupMountedFocus } from '@/directives' + +import { createApp } from 'vue' + +import App from './App.vue' + +import './permission' + +import Logger from '@/utils/Logger' + +import VueDOMPurifyHTML from 'vue-dompurify-html' // 注册 v-dompurify-html 指令,渲染 HTML 前先消毒 + +// wangEditor 插件注册 + +import print from 'vue3-print-nb' // 打印插件 + +// 创建实例 +const setupAll = async () => { + const app = createApp(App) + + await setupI18n(app) + + setupStore(app) + + setupGlobCom(app) + + setupElementPlus(app) + + setupFormCreate(app) + + setupRouter(app) + + // directives 指令 + setupAuth(app) + setupMountedFocus(app) + + // wangEditor 插件注册 + + await router.isReady() + + app.use(VueDOMPurifyHTML) + + // 打印 + app.use(print) + + app.mount('#app') +} + +setupAll() + +Logger.prettyPrimary(`欢迎使用`, import.meta.env.VITE_APP_TITLE) diff --git a/src/permission.ts b/src/permission.ts new file mode 100644 index 0000000..b651c69 --- /dev/null +++ b/src/permission.ts @@ -0,0 +1,166 @@ +import router from './router' +import type { RouteRecordRaw } from 'vue-router' +import { getAccessToken } from '@/utils/auth' +import { useTitle } from '@/hooks/web/useTitle' +import { useNProgress } from '@/hooks/web/useNProgress' +import { usePageLoading } from '@/hooks/web/usePageLoading' +import { useDictStoreWithOut } from '@/store/modules/dict' +import { useUserStoreWithOut } from '@/store/modules/user' +import { usePermissionStoreWithOut } from '@/store/modules/permission' +import { assertPageSession } from '@/utils/ssoFlow' +import { isRelogin } from '@/config/axios/service' +import { getFirstVisibleRoutePath } from '@/utils/routerHelper' + +const { start, done } = useNProgress() + +const { loadStart, loadDone } = usePageLoading() + +const parseURL = ( + url: string | null | undefined +): { basePath: string; paramsObject: { [key: string]: string } } => { + // 如果输入为 null 或 undefined,返回空字符串和空对象 + if (url == null) { + return { basePath: '', paramsObject: {} } + } + + // 找到问号 (?) 的位置,它之前是基础路径,之后是查询参数 + const questionMarkIndex = url.indexOf('?') + let basePath = url + const paramsObject: { [key: string]: string } = {} + + // 如果找到了问号,说明有查询参数 + if (questionMarkIndex !== -1) { + // 获取 basePath + basePath = url.substring(0, questionMarkIndex) + + // 从 URL 中获取查询字符串部分 + const queryString = url.substring(questionMarkIndex + 1) + + // 使用 URLSearchParams 遍历参数 + const searchParams = new URLSearchParams(queryString) + searchParams.forEach((value, key) => { + // 封装进 paramsObject 对象 + paramsObject[key] = value + }) + } + + // 返回 basePath 和 paramsObject + return { basePath, paramsObject } +} + +// 路由不重定向白名单 +const whiteList = [ + '/login', + '/social-login', + '/auth-redirect', + '/bind', + '/register', + '/oauthLogin/gitee', + '/zcy/login', + '/sso/login', + '/sso/callback' +] + +const forcePasswordChangeRoute = (redirect?: string) => ({ + path: '/user/profile', + query: { + forcePasswordChange: '1', + ...(redirect ? { redirect } : {}) + }, + replace: true +}) + +// 路由加载前 +router.beforeEach(async (to, from, next) => { + assertPageSession() + start() + loadStart() + // 回调与认证中心登录页必须能在旧令牌仍在本地时正常执行,不能先被旧会话的用户信息请求拦截。 + if (to.path === '/sso/login' || to.path === '/sso/callback' || to.path === '/zcy/login') { + next() + return + } + if (getAccessToken()) { + if (to.path === '/login') { + next({ path: '/' }) + } else if (to.path === '/auth-status' || to.path === '/403') { + next() + } else { + const dictStore = useDictStoreWithOut() + const userStore = useUserStoreWithOut() + const permissionStore = usePermissionStoreWithOut() + // 异步加载字典 + if (!dictStore.getIsSetDict) { + void dictStore.setDictMap().catch(() => undefined) + } + if (!userStore.getIsSetUser) { + try { + await userStore.setUserInfoAction() + } catch (error) { + if (isRelogin.show) { + // 令牌已失效(如权限变更、强制下线),请求层正在清理并跳转统一登录;此时进入账号状态页, + // 会使重新登录后的回跳地址变成“暂时无法加载账号信息”。 + next(false) + } else if (!getAccessToken()) { + next({ path: '/sso/login', query: { forceLogin: '1', reason: 'expired' } }) + } else { + next({ path: '/auth-status', query: { + reason: (error as { status?: number; response?: { status?: number } }).status === 403 + || (error as { response?: { status?: number } }).response?.status === 403 + ? 'forbidden' : 'load-failed', + redirect: to.fullPath + } }) + } + return + } + if (!getAccessToken()) { + next({ path: '/sso/login', query: { forceLogin: '1', reason: 'expired' } }) + return + } + // 后端过滤菜单 + await permissionStore.generateRoutes() + permissionStore.getAddRouters.forEach((route) => { + router.addRoute(route as unknown as RouteRecordRaw) // 动态添加可访问路由表 + }) + if (userStore.getForcePasswordChange && to.path !== '/user/profile') { + next(forcePasswordChangeRoute(to.fullPath)) + return + } + if (to.path !== '/user/profile' && permissionStore.getAddRouters.every((route) => route.name === '404Page')) { + next({ path: '/auth-status', query: { reason: 'no-menu' } }) + return + } + const redirectPath = from.query.redirect || to.path + // 修复跳转时不带参数的问题 + const requestedPath = decodeURIComponent(redirectPath as string) + const { basePath } = parseURL(requestedPath) + const firstMenuPath = getFirstVisibleRoutePath(permissionStore.addRouters) + const redirect = + ['/', '/index'].includes(basePath) && firstMenuPath ? firstMenuPath : requestedPath + const { paramsObject: query } = parseURL(redirect) + const nextData = to.path === redirect ? { ...to, replace: true } : { path: redirect, query } + next(nextData) + } else { + if (userStore.getForcePasswordChange && to.path !== '/user/profile') { + next(forcePasswordChangeRoute(to.fullPath)) + } else if (to.path !== '/user/profile' && permissionStore.getAddRouters.every((route) => route.name === '404Page')) { + next({ path: '/auth-status', query: { reason: 'no-menu' } }) + } else { + next() + } + } + } + } else { + if (whiteList.indexOf(to.path) !== -1) { + next() + } else { + next(`/sso/login?redirect=${encodeURIComponent(to.fullPath)}`) // 未登录时统一进入 SSO + } + } +}) + +router.afterEach((to) => { + useTitle(to?.meta?.title as string) + done() // 结束Progress + loadDone() +}) diff --git a/src/plugins/animate.css/index.ts b/src/plugins/animate.css/index.ts new file mode 100644 index 0000000..3e93451 --- /dev/null +++ b/src/plugins/animate.css/index.ts @@ -0,0 +1 @@ +import 'animate.css' diff --git a/src/plugins/echarts/index.ts b/src/plugins/echarts/index.ts new file mode 100644 index 0000000..3a402de --- /dev/null +++ b/src/plugins/echarts/index.ts @@ -0,0 +1,51 @@ +import * as echarts from 'echarts/core' + +import { + BarChart, + FunnelChart, + GaugeChart, + LineChart, + MapChart, + PictorialBarChart, + PieChart, + RadarChart +} from 'echarts/charts' + +import { + AriaComponent, + DataZoomComponent, + GridComponent, + LegendComponent, + ParallelComponent, + PolarComponent, + TitleComponent, + ToolboxComponent, + TooltipComponent, + VisualMapComponent +} from 'echarts/components' + +import { CanvasRenderer } from 'echarts/renderers' + +echarts.use([ + LegendComponent, + TitleComponent, + TooltipComponent, + ToolboxComponent, + DataZoomComponent, + GridComponent, + PolarComponent, + AriaComponent, + ParallelComponent, + VisualMapComponent, + BarChart, + LineChart, + PieChart, + MapChart, + CanvasRenderer, + PictorialBarChart, + RadarChart, + GaugeChart, + FunnelChart +]) + +export default echarts diff --git a/src/plugins/elementPlus/index.ts b/src/plugins/elementPlus/index.ts new file mode 100644 index 0000000..c3e11fb --- /dev/null +++ b/src/plugins/elementPlus/index.ts @@ -0,0 +1,23 @@ +import type { App } from 'vue' +// 需要全局引入一些组件,如ElScrollbar,不然一些下拉项样式有问题 +import { ElLoading, ElScrollbar, ElButton, ElInputNumber } from 'element-plus' + +const plugins = [ElLoading] + +const components = [ElScrollbar, ElButton] + +// 全局修改 el-input-number 默认 controls-position = right +// element-plus 无 setPropsDefaults API(vant 提供),通过修改组件 props 默认值实现 +const inputNumberProps = ElInputNumber.props as Record +inputNumberProps.controlsPosition.default = 'right' +inputNumberProps.align.default = 'left' + +export const setupElementPlus = (app: App) => { + plugins.forEach((plugin) => { + app.use(plugin) + }) + + components.forEach((component) => { + app.component(component.name, component) + }) +} diff --git a/src/plugins/formCreate/index.ts b/src/plugins/formCreate/index.ts new file mode 100644 index 0000000..85d2c74 --- /dev/null +++ b/src/plugins/formCreate/index.ts @@ -0,0 +1,186 @@ +import type { App } from 'vue' +// 👇使用 form-create 需额外全局引入 element plus 组件 +import { + // ElAutocomplete, + // ElButton, + // ElCascader, + // ElCheckbox, + // ElCheckboxButton, + // ElCheckboxGroup, + // ElCol, + // ElColorPicker, + // ElDatePicker, + // ElDialog, + // ElForm, + // ElInput, + // ElInputNumber, + // ElPopover, + // ElRadio, + // ElRadioButton, + // ElRadioGroup, + // ElRate, + // ElRow, + // ElSelect, + // ElSlider, + // ElSwitch, + // ElTimePicker, + // ElTooltip, + // ElTree, + // ElUpload, + // ElIcon, + // ElProgress, + // 以上会由 @form-create/element-ui/auto-import 自动引入 + ElAlert, + ElTransfer, + ElAside, + ElContainer, + ElDivider, + ElHeader, + ElMain, + ElPopconfirm, + ElTable, + ElTableColumn, + ElTabPane, + ElTabs, + ElDropdown, + ElDropdownMenu, + ElDropdownItem, + ElBadge, + ElTag, + ElText, + ElMenu, + ElMenuItem, + ElFooter, + ElMessage, + ElCollapse, + ElCollapseItem, + ElCard, + ElTreeSelect + // ElFormItem, + // ElOption +} from 'element-plus' +import FcDesigner from '@form-create/designer' +import formCreate from '@form-create/element-ui' +import install from '@form-create/element-ui/auto-import' + +//======================= 自定义组件 ======================= +import { UploadFile, UploadImg, UploadImgs } from '@/components/UploadFile' +import { useApiSelect } from '@/components/FormCreate' +import { USER_SELECT_PARAMS } from '@/components/FormCreate/src/config/selectParams' +import { Editor } from '@/components/Editor' +import DictSelect from '@/components/FormCreate/src/components/DictSelect.vue' +// 部门选择器:按上下级展示的部门树,注册名为 DeptSelect +import DeptSelect from '@/components/FormCreate/src/components/DeptTreeSelect.vue' +// 岗位选择器:人员、部门同时有值后查询实际任职岗位。 +import PostSelect from '@/components/FormCreate/src/components/PostSelect.vue' +// 角色选择器固定使用 OA 角色,填报与历史详情共用同一名称回显。 +import RoleSelect from '@/components/FormCreate/src/components/RoleSelect.vue' +// 关联流程:以表单关联人员的实际发起流程作为可选项。 +import ProcessInstanceSelect from '@/components/FormCreate/src/components/ProcessInstanceSelect.vue' +// 请假天数:只读展示,发起页按工作日历核算后写入 +import LeaveDays from '@/components/FormCreate/src/components/LeaveDays.vue' +// 两个日期的自然日天数计算,独立于请假工作日历。 +import TimeCalculation from '@/components/FormCreate/src/components/TimeCalculation.vue' +// 大写金额:关联计数器,自动转换并只读展示。 +import UppercaseAmount from '@/components/FormCreate/src/components/UppercaseAmount.vue' +// 金额合计:数量单价相乘、明细列求和、两个金额字段相减。 +import AmountCalculation from '@/components/FormCreate/src/components/AmountCalculation.vue' +// 普通业务编号:前端拼接文字、日期和关联值,尾号固定,不承担唯一 ID。 +import Numbering from '@/components/FormCreate/src/components/Numbering.vue' +// ITSM 项目选择:保存项目编号与名称,可带出项目台账信息。 +import ItsmProjectSelect from '@/components/FormCreate/src/components/ItsmProjectSelect.vue' +import AssetCardSelect from '@/components/FormCreate/src/components/AssetCardSelect.vue' +// ITSM 资源选择、项目成员选择:保存编号与名称,流程表单入库时由后端校验。 +import ItsmResourceSelect from '@/components/FormCreate/src/components/ItsmResourceSelect.vue' +import ItsmProjectMemberSelect from '@/components/FormCreate/src/components/ItsmProjectMemberSelect.vue' +// 表格容器、表格行:纯排版容器,字段名在左、组件在右 +import FormTable from '@/components/FormCreate/src/components/FormTable.vue' +import FormTableRow from '@/components/FormCreate/src/components/FormTableRow.vue' +// 表单数据入库:设计器属性面板中选择控件对应的数据表字段 +import FormTableColumnConfig from '@/components/FormCreate/src/components/FormTableColumnConfig.vue' +import { setupDetailTable } from '@/components/FormCreate/src/utils/tableForm' +import { setupDetailGroup } from '@/components/FormCreate/src/utils/group' +import { setupFieldDefaults } from '@/components/FormCreate/src/utils/fieldDefaults' +import { setupReadonlyFields } from '@/components/FormCreate/src/utils/readonlyFields' +import '@/components/FormCreate/src/form-layout.scss' + +const UserSelect = useApiSelect({ + name: 'UserSelect', + labelField: 'nickname', + valueField: 'id', + url: '/system/user/simple-list', + // 后端接口支持的查询参数,设计器面板按参数名展示取值配置 + paramDefs: USER_SELECT_PARAMS +}) +const ApiSelect = useApiSelect({ + name: 'ApiSelect' +}) + +const components = [ + ElAlert, + ElTransfer, + ElAside, + ElContainer, + ElDivider, + ElHeader, + ElMain, + ElPopconfirm, + ElTable, + ElTableColumn, + ElTabPane, + ElTabs, + ElTreeSelect, + ElDropdown, + ElDropdownMenu, + ElDropdownItem, + ElBadge, + ElTag, + ElText, + ElMenu, + ElMenuItem, + ElFooter, + ElMessage, + // ElFormItem, + // ElOption, + UploadImg, + UploadImgs, + UploadFile, + DictSelect, + UserSelect, + DeptSelect, + PostSelect, + RoleSelect, + ProcessInstanceSelect, + LeaveDays, + TimeCalculation, + UppercaseAmount, + AmountCalculation, + Numbering, + ItsmProjectSelect, + AssetCardSelect, + ItsmResourceSelect, + ItsmProjectMemberSelect, + FormTable, + FormTableRow, + FormTableColumnConfig, + ApiSelect, + Editor, + ElCollapse, + ElCollapseItem, + ElCard +] + +// 参考 http://www.form-create.com/v3/element-ui/auto-import.html 文档 +export const setupFormCreate = (app: App) => { + setupDetailTable() + setupDetailGroup() + setupFieldDefaults() + // 与 OA 统一只读字段展示,编辑状态及流程权限仍由原控件和权限层控制。 + setupReadonlyFields() + components.forEach((component) => { + app.component(component.name, component) + }) + formCreate.use(install) + app.use(formCreate) + app.use(FcDesigner) +} diff --git a/src/plugins/svgIcon/index.ts b/src/plugins/svgIcon/index.ts new file mode 100644 index 0000000..b5b7f70 --- /dev/null +++ b/src/plugins/svgIcon/index.ts @@ -0,0 +1,3 @@ +import 'virtual:svg-icons-register' + +import '@purge-icons/generated' diff --git a/src/plugins/unocss/index.ts b/src/plugins/unocss/index.ts new file mode 100644 index 0000000..d366b5a --- /dev/null +++ b/src/plugins/unocss/index.ts @@ -0,0 +1 @@ +import 'virtual:uno.css' diff --git a/src/plugins/vueI18n/helper.ts b/src/plugins/vueI18n/helper.ts new file mode 100644 index 0000000..da6bc8c --- /dev/null +++ b/src/plugins/vueI18n/helper.ts @@ -0,0 +1,3 @@ +export const setHtmlPageLang = (locale: LocaleType) => { + document.querySelector('html')?.setAttribute('lang', locale) +} diff --git a/src/plugins/vueI18n/index.ts b/src/plugins/vueI18n/index.ts new file mode 100644 index 0000000..f845b13 --- /dev/null +++ b/src/plugins/vueI18n/index.ts @@ -0,0 +1,42 @@ +import type { App } from 'vue' +import { createI18n } from 'vue-i18n' +import { useLocaleStoreWithOut } from '@/store/modules/locale' +import type { I18n, I18nOptions } from 'vue-i18n' +import { setHtmlPageLang } from './helper' + +export let i18n: ReturnType + +const createI18nOptions = async (): Promise => { + const localeStore = useLocaleStoreWithOut() + const locale = localeStore.getCurrentLocale + const localeMap = localeStore.getLocaleMap + const defaultLocal = await import(`../../locales/${locale.lang}.ts`) + const message = defaultLocal.default ?? {} + + setHtmlPageLang(locale.lang) + + localeStore.setCurrentLocale({ + lang: locale.lang + // elLocale: elLocal + }) + + return { + legacy: false, + locale: locale.lang, + fallbackLocale: locale.lang, + messages: { + [locale.lang]: message + }, + availableLocales: localeMap.map((v) => v.lang), + sync: true, + silentTranslationWarn: true, + missingWarn: false, + silentFallbackWarn: true + } +} + +export const setupI18n = async (app: App) => { + const options = await createI18nOptions() + i18n = createI18n(options) as I18n + app.use(i18n) +} diff --git a/src/router/index.ts b/src/router/index.ts new file mode 100644 index 0000000..4e861c6 --- /dev/null +++ b/src/router/index.ts @@ -0,0 +1,36 @@ +import type { App } from 'vue' +import type { RouteRecordRaw } from 'vue-router' +import { createRouter, createWebHistory } from 'vue-router' +import remainingRouter from './modules/remaining' + +// 创建路由实例 +const router = createRouter({ + history: createWebHistory(import.meta.env.VITE_BASE_PATH), // createWebHashHistory URL带#,createWebHistory URL不带# + strict: true, + routes: remainingRouter as RouteRecordRaw[], + scrollBehavior: () => { + // 新开标签时、返回标签时,滚动条回到顶部,否则会保留上次标签的滚动位置。 + const scrollbarWrap = document.querySelector('.v-layout-content-scrollbar .el-scrollbar__wrap') + if (scrollbarWrap) { + // scrollbarWrap.scrollTo({ left: 0, top: 0, behavior: 'auto' }) + scrollbarWrap.scrollTop = 0 + } + return { left: 0, top: 0 } + } +}) + +export const resetRouter = (): void => { + const resetWhiteNameList = ['Redirect', 'Login', 'NoFound', 'Home'] + router.getRoutes().forEach((route) => { + const { name } = route + if (name && !resetWhiteNameList.includes(name as string)) { + router.hasRoute(name) && router.removeRoute(name) + } + }) +} + +export const setupRouter = (app: App) => { + app.use(router) +} + +export default router diff --git a/src/router/modules/remaining.ts b/src/router/modules/remaining.ts new file mode 100644 index 0000000..8f9c6fd --- /dev/null +++ b/src/router/modules/remaining.ts @@ -0,0 +1,223 @@ +import { Layout } from '@/utils/routerHelper' + +const { t } = useI18n() +/** + * redirect: noredirect 当设置 noredirect 的时候该路由在面包屑导航中不可被点击 + * name:'router-name' 设定路由的名字,一定要填写不然使用时会出现各种问题 + * meta : { + hidden: true 当设置 true 的时候该路由不会再侧边栏出现 如404,login等页面(默认 false) + + alwaysShow: true 当你一个路由下面的 children 声明的路由大于1个时,自动会变成嵌套的模式, + 只有一个时,会将那个子路由当做根路由显示在侧边栏, + 若你想不管路由下面的 children 声明的个数都显示你的根路由, + 你可以设置 alwaysShow: true,这样它就会忽略之前定义的规则, + 一直显示根路由(默认 false) + + title: 'title' 设置该路由在侧边栏和面包屑中展示的名字 + + icon: 'svg-name' 设置该路由的图标 + + noCache: true 如果设置为true,则不会被 缓存(默认 false) + + breadcrumb: false 如果设置为false,则不会在breadcrumb面包屑中显示(默认 true) + + affix: true 如果设置为true,则会一直固定在tag项中(默认 false) + + noTagsView: true 如果设置为true,则不会出现在tag中(默认 false) + + activeMenu: '/dashboard' 显示高亮的路由路径 + + followAuth: '/dashboard' 跟随哪个路由进行权限过滤 + + canTo: true 设置为true即使hidden为true,也依然可以进行路由跳转(默认 false) + } + **/ +const remainingRouter: AppRouteRecordRaw[] = [ + { + path: '/redirect', + component: Layout, + name: 'Redirect', + children: [ + { + path: '/redirect/:path(.*)', + name: 'Redirect', + component: () => import('@/views/Redirect/Redirect.vue'), + meta: {} + } + ], + meta: { + hidden: true, + noTagsView: true + } + }, + { + path: '/', + component: Layout, + redirect: '/index', + name: 'Home', + meta: {}, + children: [ + { + path: 'index', + component: () => import('@/views/Home/Index.vue'), + name: 'Index', + meta: { + title: t('router.home'), + icon: 'ep:home-filled', + noCache: false, + affix: true + } + } + ] + }, + + // 强制改密与右上角个人资料入口不依赖后端业务菜单授权。 + { + path: '/user', + component: Layout, + name: 'UserProfileLayout', + meta: { hidden: true }, + children: [ + { + path: 'profile', + component: () => import('@/views/Profile/Index.vue'), + name: 'UserProfile', + meta: { hidden: true, title: '个人资料', noTagsView: true } + } + ] + }, + + { + path: '/login', + redirect: '/sso/login', + name: 'Login', + meta: { + hidden: true, + title: t('router.login'), + noTagsView: true + } + }, + { + path: '/sso', + redirect: '/sso/login', + name: 'SSOLogin', + meta: { + hidden: true, + title: t('router.login'), + noTagsView: true + } + }, + { + path: '/zcy/login', + component: () => import('@/views/Login/UnifiedLogin.vue'), + name: 'UnifiedLogin', + meta: { + hidden: true, + title: '财开云统一登录', + noTagsView: true + } + }, + { + path: '/sso/login', + component: () => import('@/views/Login/SsoLaunch.vue'), + name: 'CkyunSsoLaunch', + meta: { + hidden: true, + title: '统一登录', + noTagsView: true + } + }, + { + path: '/sso/callback', + component: () => import('@/views/Login/SsoCallback.vue'), + name: 'CkyunSsoCallback', + meta: { + hidden: true, + title: '统一登录', + noTagsView: true + } + }, + { + path: '/auth-status', + component: () => import('@/views/Login/AuthStatus.vue'), + name: 'AuthStatus', + meta: { + hidden: true, + title: '访问状态', + noTagsView: true + } + }, + { + // 直接账号 / 社交登录签发的令牌绑定门户应用,内管只能走 SSO 登录,旧地址统一重定向 + path: '/social-login', + redirect: '/sso/login', + name: 'SocialLogin', + meta: { + hidden: true, + title: t('router.socialLogin'), + noTagsView: true + } + }, + { + path: '/403', + component: () => import('@/views/Error/403.vue'), + name: 'NoAccess', + meta: { + hidden: true, + title: '403', + noTagsView: true + } + }, + { + path: '/404', + component: () => import('@/views/Error/404.vue'), + name: 'NoFound', + meta: { + hidden: true, + title: '404', + noTagsView: true + } + }, + { + path: '/500', + component: () => import('@/views/Error/500.vue'), + name: 'Error', + meta: { + hidden: true, + title: '500', + noTagsView: true + } + }, + { + path: '/system/bpm', + component: Layout, + name: 'bpm', + meta: { hidden: true }, + children: [ + { + // 资产单据“查看流程” + path: 'process-instance/detail', + component: () => import('@/views/system/bpm/processInstance/detail/index.vue'), + name: 'BpmProcessInstanceDetail', + meta: { noCache: true, hidden: true, canTo: true, title: '流程详情' }, + props: (route) => ({ + id: route.query.id, + taskId: route.query.taskId, + activityId: route.query.activityId + }) + } + ] + }, + { + path: '/:pathMatch(.*)*', + component: () => import('@/views/Error/404.vue'), + name: '', + meta: { + title: '404', + hidden: true, + breadcrumb: false + } + } +] + +export default remainingRouter diff --git a/src/router/workflow.ts b/src/router/workflow.ts new file mode 100644 index 0000000..4528216 --- /dev/null +++ b/src/router/workflow.ts @@ -0,0 +1,7 @@ +export const SYSTEM_WORKFLOW_PATHS = { + root: '/system/bpm', + model: '/system/bpm/model', + form: '/system/bpm/form', + category: '/system/bpm/category', + instance: '/system/bpm/instance' +} as const diff --git a/src/store/index.ts b/src/store/index.ts new file mode 100644 index 0000000..63f0045 --- /dev/null +++ b/src/store/index.ts @@ -0,0 +1,12 @@ +import type { App } from 'vue' +import { createPinia } from 'pinia' +import piniaPluginPersistedstate from 'pinia-plugin-persistedstate' + +const store = createPinia() +store.use(piniaPluginPersistedstate) + +export const setupStore = (app: App) => { + app.use(store) +} + +export { store } diff --git a/src/store/modules/app.ts b/src/store/modules/app.ts new file mode 100644 index 0000000..bbc56d1 --- /dev/null +++ b/src/store/modules/app.ts @@ -0,0 +1,322 @@ +import { CACHE_KEY, useCache } from '@/hooks/web/useCache' +import { ElementPlusSize } from '@/types/elementPlus' +import { LayoutType } from '@/types/layout' +import { ThemeTypes } from '@/types/theme' +import { humpToUnderline, setCssVar } from '@/utils' +import { getCssColorVariable, hexToRGB, mix } from '@/utils/color' +import { ElMessage } from 'element-plus' +import { defineStore } from 'pinia' +import { store } from '../index' + +const { wsCache } = useCache() + +interface AppState { + breadcrumb: boolean + breadcrumbIcon: boolean + collapse: boolean + uniqueOpened: boolean + hamburger: boolean + screenfull: boolean + search: boolean + size: boolean + locale: boolean + message: boolean + tagsView: boolean + tagsViewImmerse: boolean + tagsViewIcon: boolean + logo: boolean + fixedHeader: boolean + greyMode: boolean + pageLoading: boolean + layout: LayoutType + title: string + userInfo: string + isDark: boolean + currentSize: ElementPlusSize + sizeMap: ElementPlusSize[] + mobile: boolean + footer: boolean + theme: ThemeTypes + fixedMenu: boolean +} + +export const useAppStore = defineStore('app', { + state: (): AppState => { + return { + userInfo: 'userInfo', // 登录信息存储字段-建议每个项目换一个字段,避免与其他项目冲突 + sizeMap: ['default', 'large', 'small'], + mobile: false, // 是否是移动端 + title: import.meta.env.VITE_APP_TITLE, // 标题 + pageLoading: false, // 路由跳转loading + + breadcrumb: false, // 面包屑,由系统参数加载后决定是否显示 + breadcrumbIcon: true, // 面包屑图标 + collapse: false, // 折叠菜单 + uniqueOpened: true, // 是否只保持一个子菜单的展开 + hamburger: true, // 折叠图标 + screenfull: true, // 全屏图标 + search: true, // 搜索图标 + size: true, // 尺寸图标 + locale: true, // 多语言图标 + message: true, // 消息图标 + tagsView: true, // 标签页 + tagsViewImmerse: false, // 标签页沉浸 + tagsViewIcon: true, // 是否显示标签图标 + logo: true, // logo + fixedHeader: true, // 固定toolheader + footer: true, // 显示页脚 + greyMode: false, // 是否开始灰色模式,用于特殊悼念日 + fixedMenu: wsCache.get('fixedMenu') || false, // 是否固定菜单 + + layout: wsCache.get(CACHE_KEY.LAYOUT) || 'classic', // layout布局 + isDark: wsCache.get(CACHE_KEY.IS_DARK) || false, // 是否是暗黑模式 + currentSize: wsCache.get('default') || 'default', // 组件尺寸 + theme: wsCache.get(CACHE_KEY.THEME) || { + // 主题色 + elColorPrimary: '#dc2626', + // 左侧菜单边框颜色 + leftMenuBorderColor: 'inherit', + // 左侧菜单背景颜色 + leftMenuBgColor: '#001529', + // 左侧菜单浅色背景颜色 + leftMenuBgLightColor: '#0f2438', + // 左侧菜单选中背景颜色 + leftMenuBgActiveColor: 'var(--el-color-primary)', + // 左侧菜单收起选中背景颜色 + leftMenuCollapseBgActiveColor: 'var(--el-color-primary)', + // 左侧菜单字体颜色 + leftMenuTextColor: '#bfcbd9', + // 左侧菜单选中字体颜色 + leftMenuTextActiveColor: '#fff', + // logo字体颜色 + logoTitleTextColor: '#fff', + // logo边框颜色 + logoBorderColor: 'inherit', + // 头部背景颜色 + topHeaderBgColor: '#fff', + // 头部字体颜色 + topHeaderTextColor: 'inherit', + // 头部悬停颜色 + topHeaderHoverColor: '#f6f6f6', + // 头部边框颜色 + topToolBorderColor: '#eee' + } + } + }, + getters: { + getBreadcrumb(): boolean { + return this.breadcrumb + }, + getBreadcrumbIcon(): boolean { + return this.breadcrumbIcon + }, + getCollapse(): boolean { + return this.collapse + }, + getUniqueOpened(): boolean { + return this.uniqueOpened + }, + getHamburger(): boolean { + return this.hamburger + }, + getScreenfull(): boolean { + return this.screenfull + }, + getSize(): boolean { + return this.size + }, + getLocale(): boolean { + return this.locale + }, + getMessage(): boolean { + return this.message + }, + getTagsView(): boolean { + return this.tagsView + }, + getTagsViewImmerse(): boolean { + return this.tagsViewImmerse + }, + getTagsViewIcon(): boolean { + return this.tagsViewIcon + }, + getLogo(): boolean { + return this.logo + }, + getFixedHeader(): boolean { + return this.fixedHeader + }, + getGreyMode(): boolean { + return this.greyMode + }, + getFixedMenu(): boolean { + return this.fixedMenu + }, + getPageLoading(): boolean { + return this.pageLoading + }, + getLayout(): LayoutType { + return this.layout + }, + getTitle(): string { + return this.title + }, + getUserInfo(): string { + return this.userInfo + }, + getIsDark(): boolean { + return this.isDark + }, + getCurrentSize(): ElementPlusSize { + return this.currentSize + }, + getSizeMap(): ElementPlusSize[] { + return this.sizeMap + }, + getMobile(): boolean { + return this.mobile + }, + getTheme(): ThemeTypes { + return this.theme + }, + getFooter(): boolean { + return this.footer + } + }, + actions: { + setPrimaryLight() { + if (this.theme.elColorPrimary) { + const elColorPrimary = this.theme.elColorPrimary + const color = this.isDark ? '#000000' : '#ffffff' + const lightList = [3, 5, 7, 8, 9] + lightList.forEach((v) => { + setCssVar(`--el-color-primary-light-${v}`, mix(color, elColorPrimary, v / 10)) + }) + setCssVar(`--el-color-primary-dark-2`, mix(color, elColorPrimary, 0.2)) + + this.setAllColorRgbVars() + } + }, + + // 处理element自带的主题色和辅助色的-rgb切换主题变化,如:--el-color-primary-rgb + setAllColorRgbVars() { + // 需要处理的颜色类型列表 + const colorTypes = ['primary', 'success', 'warning', 'danger', 'error', 'info'] + + colorTypes.forEach((type) => { + // 获取当前颜色值 + const colorValue = getCssColorVariable(`--el-color-${type}`) + if (colorValue) { + // 转换为rgba并提取RGB部分 + const rgbaString = hexToRGB(colorValue, 1) + const rgbValues = rgbaString.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)/i) + if (rgbValues) { + const [, r, g, b] = rgbValues + // 设置对应的RGB变量 + setCssVar(`--el-color-${type}-rgb`, `${r}, ${g}, ${b}`) + } + } + }) + }, + setBreadcrumb(breadcrumb: boolean) { + this.breadcrumb = breadcrumb + }, + setBreadcrumbIcon(breadcrumbIcon: boolean) { + this.breadcrumbIcon = breadcrumbIcon + }, + setCollapse(collapse: boolean) { + this.collapse = collapse + }, + setUniqueOpened(uniqueOpened: boolean) { + this.uniqueOpened = uniqueOpened + }, + setHamburger(hamburger: boolean) { + this.hamburger = hamburger + }, + setScreenfull(screenfull: boolean) { + this.screenfull = screenfull + }, + setSize(size: boolean) { + this.size = size + }, + setLocale(locale: boolean) { + this.locale = locale + }, + setMessage(message: boolean) { + this.message = message + }, + setTagsView(tagsView: boolean) { + this.tagsView = tagsView + }, + setTagsViewImmerse(tagsViewImmerse: boolean) { + this.tagsViewImmerse = tagsViewImmerse + }, + setTagsViewIcon(tagsViewIcon: boolean) { + this.tagsViewIcon = tagsViewIcon + }, + setLogo(logo: boolean) { + this.logo = logo + }, + setFixedHeader(fixedHeader: boolean) { + this.fixedHeader = fixedHeader + }, + setGreyMode(greyMode: boolean) { + this.greyMode = greyMode + }, + setFixedMenu(fixedMenu: boolean) { + wsCache.set('fixedMenu', fixedMenu) + this.fixedMenu = fixedMenu + }, + setPageLoading(pageLoading: boolean) { + this.pageLoading = pageLoading + }, + setLayout(layout: LayoutType) { + if (this.mobile && layout !== 'classic') { + ElMessage.warning('移动端模式下不支持切换其他布局') + return + } + this.layout = layout + wsCache.set(CACHE_KEY.LAYOUT, this.layout) + }, + setTitle(title: string) { + this.title = title + }, + setIsDark(isDark: boolean) { + this.isDark = isDark + if (this.isDark) { + document.documentElement.classList.add('dark') + document.documentElement.classList.remove('light') + } else { + document.documentElement.classList.add('light') + document.documentElement.classList.remove('dark') + } + wsCache.set(CACHE_KEY.IS_DARK, this.isDark) + this.setPrimaryLight() + }, + setCurrentSize(currentSize: ElementPlusSize) { + this.currentSize = currentSize + wsCache.set('currentSize', this.currentSize) + }, + setMobile(mobile: boolean) { + this.mobile = mobile + }, + setTheme(theme: ThemeTypes) { + this.theme = Object.assign(this.theme, theme) + wsCache.set(CACHE_KEY.THEME, this.theme) + }, + setCssVarTheme() { + for (const key in this.theme) { + setCssVar(`--${humpToUnderline(key)}`, this.theme[key]) + } + this.setPrimaryLight() + }, + setFooter(footer: boolean) { + this.footer = footer + } + }, + persist: false +}) + +export const useAppStoreWithOut = () => { + return useAppStore(store) +} diff --git a/src/store/modules/bpm/simpleWorkflow.ts b/src/store/modules/bpm/simpleWorkflow.ts new file mode 100644 index 0000000..2942951 --- /dev/null +++ b/src/store/modules/bpm/simpleWorkflow.ts @@ -0,0 +1,55 @@ +import { store } from '../../index' +import { defineStore } from 'pinia' + +export const useWorkFlowStore = defineStore('simpleWorkflow', { + state: () => ({ + tableId: '', + isTried: false, + promoterDrawer: false, + approverDrawer: false, + approverConfig1: {}, + copyerDrawer: false, + copyerConfig: {}, + conditionDrawer: false, + conditionsConfig1: { + conditionNodes: [] + }, + userTaskConfig: {} + }), + actions: { + setTableId(payload) { + this.tableId = payload + }, + setIsTried(payload) { + this.isTried = payload + }, + setPromoter(payload) { + this.promoterDrawer = payload + }, + setApproverDrawer(payload) { + this.approverDrawer = payload + }, + setApproverConfig(payload) { + this.approverConfig1 = payload + }, + setCopyerDrawer(payload) { + this.copyerDrawer = payload + }, + setCopyerConfig(payload) { + this.copyerConfig = payload + }, + setCondition(payload) { + this.conditionDrawer = payload + }, + setConditionsConfig(payload) { + this.conditionsConfig1 = payload + }, + setUserTaskConfig(payload) { + this.userTaskConfig = payload + } + } +}) + +export const useWorkFlowStoreWithOut = () => { + return useWorkFlowStore(store) +} diff --git a/src/store/modules/dict.ts b/src/store/modules/dict.ts new file mode 100644 index 0000000..e44fb78 --- /dev/null +++ b/src/store/modules/dict.ts @@ -0,0 +1,103 @@ +import { defineStore } from 'pinia' +import { store } from '../index' +import type { DictDataVO } from '@/api/system/dict/dict.data' +import { CACHE_KEY, useCache } from '@/hooks/web/useCache' +const { wsCache } = useCache('sessionStorage') +import { getSimpleDictDataList } from '@/api/system/dict/dict.data' + +export interface DictValueType { + value: string + label: string + clorType?: string + cssClass?: string +} +export interface DictTypeType { + dictType: string + dictValue: DictValueType[] +} +export interface DictState { + dictMap: Map + isSetDict: boolean +} + +export const useDictStore = defineStore('dict', { + state: (): DictState => ({ + dictMap: new Map(), + isSetDict: false + }), + getters: { + getDictMap(): Recordable { + const dictMap = wsCache.get(CACHE_KEY.DICT_CACHE) + if (dictMap) { + this.dictMap = dictMap + } + return this.dictMap + }, + getIsSetDict(): boolean { + return this.isSetDict + } + }, + actions: { + async setDictMap() { + const dictMap = wsCache.get(CACHE_KEY.DICT_CACHE) + if (dictMap) { + this.dictMap = dictMap + this.isSetDict = true + } else { + const res = await getSimpleDictDataList() + // 设置数据 + const dictDataMap = new Map() + res.forEach((dictData: DictDataVO) => { + // 获得 dictType 层级 + const enumValueObj = dictDataMap[dictData.dictType] + if (!enumValueObj) { + dictDataMap[dictData.dictType] = [] + } + // 处理 dictValue 层级 + dictDataMap[dictData.dictType].push({ + value: dictData.value, + label: dictData.label, + colorType: dictData.colorType, + cssClass: dictData.cssClass + }) + }) + this.dictMap = dictDataMap + this.isSetDict = true + wsCache.set(CACHE_KEY.DICT_CACHE, dictDataMap, { exp: 60 }) // 60 秒 过期 + } + }, + getDictByType(type: string) { + if (!this.isSetDict) { + this.setDictMap() + } + return this.dictMap[type] + }, + async resetDict() { + wsCache.delete(CACHE_KEY.DICT_CACHE) + const res = await getSimpleDictDataList() + // 设置数据 + const dictDataMap = new Map() + res.forEach((dictData: DictDataVO) => { + // 获得 dictType 层级 + const enumValueObj = dictDataMap[dictData.dictType] + if (!enumValueObj) { + dictDataMap[dictData.dictType] = [] + } + // 处理 dictValue 层级 + dictDataMap[dictData.dictType].push({ + value: dictData.value, + label: dictData.label, + colorType: dictData.colorType, + cssClass: dictData.cssClass + }) + }) + this.dictMap = dictDataMap + this.isSetDict = true + wsCache.set(CACHE_KEY.DICT_CACHE, dictDataMap, { exp: 60 }) // 60 秒 过期 + } + } +}) + +export const useDictStoreWithOut = () => { + return useDictStore(store) +} diff --git a/src/store/modules/locale.ts b/src/store/modules/locale.ts new file mode 100644 index 0000000..1fc772a --- /dev/null +++ b/src/store/modules/locale.ts @@ -0,0 +1,59 @@ +import { defineStore } from 'pinia' +import { store } from '../index' +import zhCn from 'element-plus/es/locale/lang/zh-cn' +import en from 'element-plus/es/locale/lang/en' +import { CACHE_KEY, useCache } from '@/hooks/web/useCache' +import { LocaleDropdownType } from '@/types/localeDropdown' + +const { wsCache } = useCache() + +const elLocaleMap = { + 'zh-CN': zhCn, + en: en +} +interface LocaleState { + currentLocale: LocaleDropdownType + localeMap: LocaleDropdownType[] +} + +export const useLocaleStore = defineStore('locales', { + state: (): LocaleState => { + return { + currentLocale: { + lang: wsCache.get(CACHE_KEY.LANG) || 'zh-CN', + elLocale: elLocaleMap[wsCache.get(CACHE_KEY.LANG) || 'zh-CN'] + }, + // 多语言 + localeMap: [ + { + lang: 'zh-CN', + name: '简体中文' + }, + { + lang: 'en', + name: 'English' + } + ] + } + }, + getters: { + getCurrentLocale(): LocaleDropdownType { + return this.currentLocale + }, + getLocaleMap(): LocaleDropdownType[] { + return this.localeMap + } + }, + actions: { + setCurrentLocale(localeMap: LocaleDropdownType) { + // this.locale = Object.assign(this.locale, localeMap) + this.currentLocale.lang = localeMap?.lang + this.currentLocale.elLocale = elLocaleMap[localeMap?.lang] + wsCache.set(CACHE_KEY.LANG, localeMap?.lang) + } + } +}) + +export const useLocaleStoreWithOut = () => { + return useLocaleStore(store) +} diff --git a/src/store/modules/lock.ts b/src/store/modules/lock.ts new file mode 100644 index 0000000..870326e --- /dev/null +++ b/src/store/modules/lock.ts @@ -0,0 +1,49 @@ +import { defineStore } from 'pinia' +import { store } from '@/store' +import { scopedStorageKey } from '@/hooks/web/useCache' + +interface lockInfo { + isLock?: boolean + password?: string +} + +interface LockState { + lockInfo: lockInfo +} + +export const useLockStore = defineStore('lock', { + state: (): LockState => { + return { + lockInfo: { + // isLock: false, // 是否锁定屏幕 + // password: '' // 锁屏密码 + } + } + }, + getters: { + getLockInfo(): lockInfo { + return this.lockInfo + } + }, + actions: { + setLockInfo(lockInfo: lockInfo) { + this.lockInfo = lockInfo + }, + resetLockInfo() { + this.lockInfo = {} + }, + unLock(password: string) { + if (this.lockInfo?.password === password) { + this.resetLockInfo() + return true + } else { + return false + } + } + }, + persist: { key: scopedStorageKey('lock') } +}) + +export const useLockStoreWithOut = () => { + return useLockStore(store) +} diff --git a/src/store/modules/permission.ts b/src/store/modules/permission.ts new file mode 100644 index 0000000..2ff8111 --- /dev/null +++ b/src/store/modules/permission.ts @@ -0,0 +1,71 @@ +import { defineStore } from 'pinia' +import { store } from '@/store' +import { cloneDeep } from 'lodash-es' +import remainingRouter from '@/router/modules/remaining' +import { flatMultiLevelRoutes, generateRoute } from '@/utils/routerHelper' +import { CACHE_KEY, useCache } from '@/hooks/web/useCache' + +const { wsCache } = useCache() + +export interface PermissionState { + routers: AppRouteRecordRaw[] + addRouters: AppRouteRecordRaw[] + menuTabRouters: AppRouteRecordRaw[] +} + +export const usePermissionStore = defineStore('permission', { + state: (): PermissionState => ({ + routers: [], + addRouters: [], + menuTabRouters: [] + }), + getters: { + getRouters(): AppRouteRecordRaw[] { + return this.routers + }, + getAddRouters(): AppRouteRecordRaw[] { + return flatMultiLevelRoutes(cloneDeep(this.addRouters)) + }, + getMenuTabRouters(): AppRouteRecordRaw[] { + return this.menuTabRouters + } + }, + actions: { + async generateRoutes(): Promise { + return new Promise(async (resolve) => { + // 获得菜单列表,它在登录的时候,setUserInfoAction 方法中已经进行获取 + let res: AppCustomRouteRecordRaw[] = [] + const roleRouters = wsCache.get(CACHE_KEY.ROLE_ROUTERS) + if (roleRouters) { + res = roleRouters as AppCustomRouteRecordRaw[] + } + const routerMap: AppRouteRecordRaw[] = generateRoute(res) + // 动态路由,404一定要放到最后面 + // preschooler:vue-router@4以后已支持静态404路由,此处可不再追加 + this.addRouters = routerMap.concat([ + { + path: '/:path(.*)*', + // redirect: '/404', + component: () => import('@/views/Error/404.vue'), + name: '404Page', + meta: { + hidden: true, + breadcrumb: false + } + } + ]) + // 渲染菜单的所有路由 + this.routers = cloneDeep(remainingRouter).concat(routerMap) + resolve() + }) + }, + setMenuTabRouters(routers: AppRouteRecordRaw[]): void { + this.menuTabRouters = routers + } + }, + persist: false +}) + +export const usePermissionStoreWithOut = () => { + return usePermissionStore(store) +} diff --git a/src/store/modules/tagsView.ts b/src/store/modules/tagsView.ts new file mode 100644 index 0000000..a33f2ff --- /dev/null +++ b/src/store/modules/tagsView.ts @@ -0,0 +1,183 @@ +import router from '@/router' +import type { RouteLocationNormalizedLoaded } from 'vue-router' +import { getRawRoute } from '@/utils/routerHelper' +import { defineStore } from 'pinia' +import { store } from '../index' +import { findIndex } from '@/utils' +import { useUserStoreWithOut } from './user' + +export interface TagsViewState { + visitedViews: RouteLocationNormalizedLoaded[] + cachedViews: Set + selectedTag?: RouteLocationNormalizedLoaded +} + +export const useTagsViewStore = defineStore('tagsView', { + state: (): TagsViewState => ({ + visitedViews: [], + cachedViews: new Set(), + selectedTag: undefined + }), + getters: { + getVisitedViews(): RouteLocationNormalizedLoaded[] { + return this.visitedViews + }, + getCachedViews(): string[] { + return Array.from(this.cachedViews) + }, + getSelectedTag(): RouteLocationNormalizedLoaded | undefined { + return this.selectedTag + } + }, + actions: { + // 新增缓存和tag + addView(view: RouteLocationNormalizedLoaded): void { + this.addVisitedView(view) + this.addCachedView() + }, + // 新增tag + addVisitedView(view: RouteLocationNormalizedLoaded) { + if (this.visitedViews.some((v) => v.fullPath === view.fullPath)) return + if (view.meta?.noTagsView) return + const visitedView = Object.assign({}, view, { title: view.meta?.title || 'no-name' }) + + if (visitedView.meta) { + const titleSuffixList: string[] = [] + this.visitedViews.forEach((v) => { + if (v.path === visitedView.path && v.meta?.title === visitedView.meta?.title) { + titleSuffixList.push(v.meta?.titleSuffix || '1') + } + }) + if (titleSuffixList.length) { + let titleSuffix = 1 + while (titleSuffixList.includes(`${titleSuffix}`)) { + titleSuffix += 1 + } + visitedView.meta.titleSuffix = titleSuffix === 1 ? undefined : `${titleSuffix}` + } + } + + this.visitedViews.push(visitedView) + }, + // 新增缓存 + addCachedView() { + const cacheMap: Set = new Set() + for (const v of this.visitedViews) { + const item = getRawRoute(v) + const needCache = !item.meta?.noCache + if (!needCache) { + continue + } + const name = item.name as string + cacheMap.add(name) + } + if (Array.from(this.cachedViews).sort().toString() === Array.from(cacheMap).sort().toString()) + return + this.cachedViews = cacheMap + }, + // 删除某个 + delView(view: RouteLocationNormalizedLoaded) { + this.delVisitedView(view) + this.delCachedView() + }, + // 删除tag + delVisitedView(view: RouteLocationNormalizedLoaded) { + for (const [i, v] of this.visitedViews.entries()) { + if (v.fullPath === view.fullPath) { + this.visitedViews.splice(i, 1) + break + } + } + }, + // 删除缓存 + delCachedView() { + const route = router.currentRoute.value + const index = findIndex(this.getCachedViews, (v) => v === route.name) + // 需要注释,解决“标签页刷新无效”。 + // for (const v of this.visitedViews) { + // if (v.name === route.name) { + // return + // } + // } + if (index > -1) { + this.cachedViews.delete(this.getCachedViews[index]) + } + }, + // 删除所有缓存和tag + delAllViews() { + this.delAllVisitedViews() + this.delCachedView() + }, + // 删除所有tag + delAllVisitedViews() { + const userStore = useUserStoreWithOut() + + // const affixTags = this.visitedViews.filter((tag) => tag.meta.affix) + this.visitedViews = userStore.getUser + ? this.visitedViews.filter((tag) => tag?.meta?.affix) + : [] + }, + // 删除其他 + delOthersViews(view: RouteLocationNormalizedLoaded) { + this.delOthersVisitedViews(view) + this.addCachedView() + }, + // 删除其他tag + delOthersVisitedViews(view: RouteLocationNormalizedLoaded) { + this.visitedViews = this.visitedViews.filter((v) => { + return v?.meta?.affix || v.fullPath === view.fullPath + }) + }, + // 删除左侧 + delLeftViews(view: RouteLocationNormalizedLoaded) { + const index = findIndex( + this.visitedViews, + (v) => v.fullPath === view.fullPath + ) + if (index > -1) { + this.visitedViews = this.visitedViews.filter((v, i) => { + return v?.meta?.affix || v.fullPath === view.fullPath || i > index + }) + this.addCachedView() + } + }, + // 删除右侧 + delRightViews(view: RouteLocationNormalizedLoaded) { + const index = findIndex( + this.visitedViews, + (v) => v.fullPath === view.fullPath + ) + if (index > -1) { + this.visitedViews = this.visitedViews.filter((v, i) => { + return v?.meta?.affix || v.fullPath === view.fullPath || i < index + }) + this.addCachedView() + } + }, + updateVisitedView(view: RouteLocationNormalizedLoaded) { + for (let v of this.visitedViews) { + if (v.fullPath === view.fullPath) { + v = Object.assign(v, view) + break + } + } + }, + // 设置当前选中的 tag + setSelectedTag(tag: RouteLocationNormalizedLoaded) { + this.selectedTag = tag + }, + setTitle(title: string, path?: string) { + for (const v of this.visitedViews) { + if (v.path === (path ?? this.selectedTag?.path)) { + v.meta.title = title + break + } + } + } + }, + persist: false +}) + +export const useTagsViewStoreWithOut = () => { + return useTagsViewStore(store) +} diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts new file mode 100644 index 0000000..159ca1f --- /dev/null +++ b/src/store/modules/user.ts @@ -0,0 +1,134 @@ +import { store } from '@/store' +import { defineStore } from 'pinia' +import { getAccessToken, getAuthSession, isAuthSessionCurrent, removeToken, withAuthSessionLock } from '@/utils/auth' +import { CACHE_KEY, useCache, deleteUserCache } from '@/hooks/web/useCache' +import { getInfo, loginOut } from '@/api/login' +import { assertPageSession } from '@/utils/ssoFlow' + +const { wsCache } = useCache() + +interface UserVO { + id: number + avatar: string + nickname: string + deptId: number + forcePasswordChange?: boolean +} + +interface UserInfoVO { + // USER 缓存 + permissions: Set + roles: string[] + isSetUser: boolean + user: UserVO +} + +export const useUserStore = defineStore('admin-user', { + state: (): UserInfoVO => ({ + permissions: new Set(), + roles: [], + isSetUser: false, + user: { + id: 0, + avatar: '', + nickname: '', + deptId: 0 + } + }), + getters: { + getPermissions(): Set { + return this.permissions + }, + getRoles(): string[] { + return this.roles + }, + getIsSetUser(): boolean { + return this.isSetUser + }, + getUser(): UserVO { + return this.user + }, + getForcePasswordChange(): boolean { + return Boolean(this.user.forcePasswordChange) + } + }, + actions: { + async setUserInfoAction() { + const session = getAuthSession() + if (!getAccessToken()) { + this.resetState() + return null + } + // 每次重建会话都以服务端为准;缓存不能掩盖踢下线、权限撤销或网络故障。 + const userInfo = await getInfo() + await withAuthSessionLock(() => { + assertPageSession() + if (getAuthSession().sessionId !== session.sessionId) { + throw new Error('登录会话已变更,请重新加载账号信息') + } + this.permissions = new Set(userInfo.permissions || []) + this.roles = userInfo.roles + this.user = userInfo.user + this.isSetUser = true + wsCache.set(CACHE_KEY.USER, userInfo) + wsCache.set(CACHE_KEY.ROLE_ROUTERS, userInfo.menus) + }) + }, + async setUserAvatarAction(avatar: string) { + await withAuthSessionLock(() => { + assertPageSession() + const userInfo = wsCache.get(CACHE_KEY.USER) + if (!userInfo?.user) return + this.user.avatar = avatar + userInfo.user.avatar = avatar + wsCache.set(CACHE_KEY.USER, userInfo) + }) + }, + async setUserNicknameAction(nickname: string) { + await withAuthSessionLock(() => { + assertPageSession() + const userInfo = wsCache.get(CACHE_KEY.USER) + if (!userInfo?.user) return + this.user.nickname = nickname + userInfo.user.nickname = nickname + wsCache.set(CACHE_KEY.USER, userInfo) + }) + }, + async clearForcePasswordChange() { + await withAuthSessionLock(() => { + assertPageSession() + const userInfo = wsCache.get(CACHE_KEY.USER) + this.user.forcePasswordChange = false + if (userInfo?.user) { + userInfo.user.forcePasswordChange = false + wsCache.set(CACHE_KEY.USER, userInfo) + } + }) + }, + async loginOut() { + const session = getAuthSession() + await loginOut(session) + await withAuthSessionLock(() => { + if (!isAuthSessionCurrent(session)) return + removeToken() + deleteUserCache() // 删除用户缓存 + this.resetState() + }) + }, + resetState() { + this.permissions = new Set() + this.roles = [] + this.isSetUser = false + this.user = { + id: 0, + avatar: '', + nickname: '', + deptId: 0 + } + } + } +}) + +export const useUserStoreWithOut = () => { + return useUserStore(store) +} diff --git a/src/styles/FormCreate/fonts/fontello.woff b/src/styles/FormCreate/fonts/fontello.woff new file mode 100644 index 0000000..1e00f49 Binary files /dev/null and b/src/styles/FormCreate/fonts/fontello.woff differ diff --git a/src/styles/FormCreate/index.scss b/src/styles/FormCreate/index.scss new file mode 100644 index 0000000..bb62000 --- /dev/null +++ b/src/styles/FormCreate/index.scss @@ -0,0 +1,22 @@ +// 使用字体图标来源 https://fontello.com/ + +@font-face { + font-family: 'fc-icon'; + src: url('@/styles/FormCreate/fonts/fontello.woff') format('woff'); +} + +.icon-doc-text:before { + content: '\f0f6'; +} + +.icon-server:before { + content: '\f233'; +} + +.icon-address-card-o:before { + content: '\f2bc'; +} + +.icon-user-o:before { + content: '\f2c0'; +} diff --git a/src/styles/global.module.scss b/src/styles/global.module.scss new file mode 100644 index 0000000..af793f0 --- /dev/null +++ b/src/styles/global.module.scss @@ -0,0 +1,6 @@ +@use './variables.scss' as *; +// 导出变量 +:export { + namespace: $namespace; + elNamespace: $elNamespace; +} diff --git a/src/styles/index.scss b/src/styles/index.scss new file mode 100644 index 0000000..da9b71b --- /dev/null +++ b/src/styles/index.scss @@ -0,0 +1,526 @@ +@use './var.css'; +@use './FormCreate/index.scss'; +@use './theme.scss'; +@use './list-page.scss'; +@use 'element-plus/theme-chalk/dark/css-vars.css'; + +:root { + --ckyun-brand-gradient: linear-gradient(135deg, #991b1b 0%, #c2410c 100%); + --ckyun-brand-gradient-hover: linear-gradient(135deg, #861717 0%, #ad390a 100%); + --ckyun-brand-border-color: transparent; + --ckyun-button-border-color: #d1d5db; + --ckyun-button-font-size: 12px; + --ckyun-button-font-weight: 500; + --ckyun-button-line-height: 16px; + --ckyun-button-height: 30px; + --ckyun-button-height-small: 24px; + --ckyun-button-height-large: 36px; + --ckyun-button-padding-inline: 12px; + --ckyun-button-primary-padding-inline: 12px; + --ckyun-button-icon-gap: 4px; + --ckyun-button-radius: 6px; + --ckyun-button-danger-color: #dc2626; + --ckyun-button-danger-hover-color: #b91c1c; + --ckyun-button-primary-shadow: 0 1px 3px rgb(0 0 0 / 10%), 0 1px 2px -1px rgb(0 0 0 / 10%); + --ckyun-content-font-family: Inter, system-ui, -apple-system, 'PingFang SC', 'Microsoft YaHei', + sans-serif; + --ckyun-content-font-size: 12px; + --ckyun-content-line-height: 16px; + --ckyun-content-label-font-size: 10px; + --ckyun-content-label-line-height: 15px; + --ckyun-content-tag-line-height: 13.3333px; + --ckyun-content-title-font-size: 18px; + --ckyun-content-title-font-weight: 700; + --ckyun-content-title-line-height: 28px; + --ckyun-content-value-font-weight: 500; + --ckyun-content-metric-font-size: 14px; + --ckyun-content-metric-font-weight: 700; + --ckyun-content-metric-line-height: 20px; + --ckyun-page-content-height: calc(100vh - 96px); + --ckyun-pagination-font-size: 12px; + --ckyun-pagination-font-weight: 400; + --ckyun-pagination-line-height: 16px; + --ckyun-pagination-button-height: 26px; + --ckyun-pagination-button-padding-inline: 8px; + --ckyun-pagination-button-radius: 4px; + --ckyun-pagination-select-height: 27px; + --ckyun-pagination-select-radius: 6px; + --ckyun-pagination-container-height: 44px; + --ckyun-selection-font-size: 12px; + --ckyun-selection-font-weight: 400; + --ckyun-selection-line-height: 16px; + --ckyun-selection-title-font-weight: 500; + --ckyun-selection-meta-font-size: 10px; + --ckyun-selection-meta-line-height: 15px; + --ckyun-selection-checkbox-size: 14px; + --ckyun-selection-row-height: 28px; + --ckyun-upload-file-width: 448px; + --ckyun-upload-dropzone-height: 118px; + --ckyun-upload-file-row-height: 34px; + --ckyun-upload-file-radius: 6px; + --ckyun-upload-dropzone-border-color: #d1d5db; + --ckyun-upload-dropzone-hover-color: var(--el-color-primary-light-3); + --ckyun-upload-file-surface-color: #eff6ff; + --ckyun-upload-file-border-color: #dbeafe; + --ckyun-upload-file-icon-color: #3b82f6; + --ckyun-form-drawer-width: 448px; + --ckyun-form-drawer-header-height: 57px; + --ckyun-form-drawer-footer-height: 63px; + --ckyun-form-drawer-padding: 20px; + --ckyun-form-field-gap: 16px; + --ckyun-form-label-gap: 4px; + --ckyun-form-label-color: #374151; + --ckyun-form-control-height: 30px; + --ckyun-form-select-height: 31px; + --ckyun-form-control-radius: 6px; + --ckyun-list-section-gap: 16px; + --ckyun-list-toolbar-gap: 8px; + --ckyun-list-toolbar-icon-size: 12px; + --ckyun-list-search-grid-gap: 12px; + --ckyun-list-search-control-height: 30px; + --ckyun-list-search-control-radius: 8px; + --ckyun-list-search-action-padding-inline: 16px; + --ckyun-list-search-action-radius: 8px; + --ckyun-table-radius: 8px; + --ckyun-list-panel-shadow: 0 1px 3px rgb(0 0 0 / 10%), 0 1px 2px -1px rgb(0 0 0 / 10%); + --ckyun-table-header-height: 37px; + --ckyun-table-header-bg: #f9fafb; + --ckyun-table-row-height: 45px; + --ckyun-tree-table-row-height: 47px; + --ckyun-tree-table-cell-padding-block: 10px; + --ckyun-table-cell-padding-inline: 12px; + --ckyun-table-first-column-font-weight: 600; + --ckyun-table-first-column-color: #111827; + --ckyun-table-tag-height: 19px; + --ckyun-table-tag-padding-inline: 7px; + --ckyun-table-tag-radius: 4px; + --ckyun-table-action-gap: 8px; + --ckyun-table-action-primary-color: var(--ckyun-button-danger-color); + --ckyun-table-action-secondary-color: #6b7280; + --ckyun-table-switch-width: 36px; + --ckyun-table-switch-height: 20px; + --ckyun-table-switch-on-color: var(--ckyun-button-danger-color); + --ckyun-table-tree-toggle-size: 16px; + --ckyun-table-tree-toggle-gap: 4px; + --ckyun-table-tree-toggle-color: var(--el-text-color-placeholder); + --ckyun-compact-select-width: 110px; + --ckyun-compact-select-height: 31px; + --ckyun-compact-select-radius: 6px; + --el-color-primary: #b42318; + --el-color-primary-light-3: #c95f57; + --el-color-primary-light-5: #d9918c; + --el-color-primary-light-7: #e9c2bf; + --el-color-primary-light-8: #f1d8d6; + --el-color-primary-light-9: #fbf1f0; + --el-color-primary-dark-2: #901c13; + --top-header-text-color: #fff; + // 顶栏纯色深红;不用 --el-color-primary-dark-2,它会被运行时主题按浅色重算。 + --ckyun-header-bg-color: #9f1520; + --app-content-bg-color: var(--el-fill-color-light); + --el-font-size-base: 13px; + --el-font-size-small: 12px; + --el-font-size-extra-small: 12px; + --el-component-size: 32px; + --el-component-size-small: 28px; + --el-component-size-large: 36px; + --el-menu-item-font-size: 12px; +} + +body { + font-size: 13px; +} + +// 后台内页字体基线。客户需要调整时优先修改上面的 ckyun-content 变量。 +.ckyun-page-content { + font-family: var(--ckyun-content-font-family); + font-size: var(--ckyun-content-font-size); + line-height: var(--ckyun-content-line-height); +} + +// 抽屉、弹窗内的角色、组织等勾选面板统一字体与选择控件尺寸。 +.ckyun-selection-panel { + font-family: var(--ckyun-content-font-family); + font-size: var(--ckyun-selection-font-size); + font-weight: var(--ckyun-selection-font-weight); + line-height: var(--ckyun-selection-line-height); +} + +.ckyun-selection-panel button, +.ckyun-selection-panel input, +.ckyun-selection-panel .#{$elNamespace}-input__inner, +.ckyun-selection-panel .#{$elNamespace}-checkbox, +.ckyun-selection-panel .#{$elNamespace}-checkbox__label, +.ckyun-selection-panel .#{$elNamespace}-tree, +.ckyun-selection-panel .#{$elNamespace}-tree-node__label, +.ckyun-selection-panel .#{$elNamespace}-tag { + font-family: inherit; + font-size: var(--ckyun-selection-font-size); + font-weight: var(--ckyun-selection-font-weight); + line-height: var(--ckyun-selection-line-height); +} + +.ckyun-selection-panel .#{$elNamespace}-checkbox__inner { + width: var(--ckyun-selection-checkbox-size); + height: var(--ckyun-selection-checkbox-size); +} + +.ckyun-selection-panel .#{$elNamespace}-checkbox { + height: var(--ckyun-selection-row-height); +} + +.ckyun-selection-panel .#{$elNamespace}-tree-node__content { + min-height: var(--ckyun-selection-row-height); + font-size: var(--ckyun-selection-font-size); + line-height: var(--ckyun-selection-line-height); +} + +.ckyun-page-content .#{$elNamespace}-button, +.ckyun-page-content .#{$elNamespace}-form, +.ckyun-page-content .#{$elNamespace}-form-item, +.ckyun-page-content .#{$elNamespace}-form-item__label, +.ckyun-page-content .#{$elNamespace}-form-item__content, +.ckyun-page-content .#{$elNamespace}-input, +.ckyun-page-content .#{$elNamespace}-input__inner, +.ckyun-page-content .#{$elNamespace}-select, +.ckyun-page-content .#{$elNamespace}-select__wrapper, +.ckyun-page-content .#{$elNamespace}-select__input, +.ckyun-page-content .#{$elNamespace}-textarea, +.ckyun-page-content .#{$elNamespace}-textarea__inner, +.ckyun-page-content .#{$elNamespace}-radio, +.ckyun-page-content .#{$elNamespace}-checkbox, +.ckyun-page-content .#{$elNamespace}-table, +.ckyun-page-content .#{$elNamespace}-tree { + font-family: inherit; + font-size: var(--ckyun-content-font-size); +} + +// 下拉浮层会挂载到 body,无法继承页面容器,因此在这里统一字体。 +.#{$elNamespace}-select__popper, +.#{$elNamespace}-dropdown__popper, +.#{$elNamespace}-cascader__dropdown, +.#{$elNamespace}-picker__popper, +.#{$elNamespace}-popover { + font-family: var(--ckyun-content-font-family); + font-size: var(--ckyun-content-font-size); + line-height: var(--ckyun-content-line-height); +} + +.#{$elNamespace}-select-dropdown__item.#{$elNamespace}-select-dropdown__item, +.#{$elNamespace}-dropdown-menu__item.#{$elNamespace}-dropdown-menu__item, +.#{$elNamespace}-cascader-node.#{$elNamespace}-cascader-node { + font-family: inherit; + font-size: var(--ckyun-content-font-size); + font-weight: 400; +} + +// Select 选项保留组件默认行高,与固定高度一致以保持文字垂直居中。 +.#{$elNamespace}-dropdown-menu__item.#{$elNamespace}-dropdown-menu__item, +.#{$elNamespace}-cascader-node.#{$elNamespace}-cascader-node { + line-height: var(--ckyun-content-line-height); +} + +.#{$elNamespace}-select-dropdown__item.#{$elNamespace}-select-dropdown__item.is-selected { + font-weight: 400; +} + +.reset-margin [class*='#{$elNamespace}-icon'] + span { + margin-left: 2px !important; +} + +// 解决抽屉弹出时,body宽度变化的问题 +.#{$elNamespace}-popup-parent--hidden { + width: 100% !important; +} + +// 解决表格内容超过表格总宽度后,横向滚动条前端顶不到表格边缘的问题 +.#{$elNamespace}-scrollbar__bar { + display: flex; + justify-content: flex-start; +} + +/* nprogress 适配 element-plus 的主题色 */ +#nprogress { + & .bar { + background-color: var(--el-color-primary) !important; + } + + & .peg { + box-shadow: + 0 0 10px var(--el-color-primary), + 0 0 5px var(--el-color-primary) !important; + } + + & .spinner-icon { + border-top-color: var(--el-color-primary); + border-left-color: var(--el-color-primary); + } +} + +$button-prefix-cls: #{$elNamespace}-button; + +.#{$button-prefix-cls}.#{$button-prefix-cls} { + --el-button-size: var(--ckyun-button-height); + + box-sizing: border-box; + height: var(--ckyun-button-height); + min-height: var(--ckyun-button-height); + padding: 0 var(--ckyun-button-padding-inline); + font-family: var(--ckyun-content-font-family); + font-size: var(--ckyun-button-font-size); + font-weight: var(--ckyun-button-font-weight); + line-height: var(--ckyun-button-line-height); + border-radius: var(--ckyun-button-radius); + + > [class*='#{$elNamespace}-icon'] + span { + margin-left: var(--ckyun-button-icon-gap); + } + + .#{$elNamespace}-icon--right { + margin-left: var(--ckyun-button-icon-gap); + } +} + +.#{$button-prefix-cls}--default.#{$button-prefix-cls}--default { + --el-button-size: var(--ckyun-button-height); +} + +.#{$button-prefix-cls}--small.#{$button-prefix-cls}--small { + --el-button-size: var(--ckyun-button-height-small); + --ckyun-button-primary-padding-inline: 10px; + + height: var(--ckyun-button-height-small); + min-height: var(--ckyun-button-height-small); + padding: 0 10px; + border-radius: var(--ckyun-button-radius); +} + +.#{$button-prefix-cls}--large.#{$button-prefix-cls}--large { + --el-button-size: var(--ckyun-button-height-large); + --ckyun-button-primary-padding-inline: 15px; + + height: var(--ckyun-button-height-large); + min-height: var(--ckyun-button-height-large); + padding: 0 15px; + font-size: var(--el-font-size-base); +} + +.#{$button-prefix-cls}:not(.#{$button-prefix-cls}--primary):not( + .#{$button-prefix-cls}--success + ):not(.#{$button-prefix-cls}--warning):not(.#{$button-prefix-cls}--danger):not( + .#{$button-prefix-cls}--info + ):not(.is-link):not(.is-text) { + --el-button-text-color: #1f2937; + --el-button-bg-color: #fff; + --el-button-border-color: var(--ckyun-button-border-color); + --el-button-hover-text-color: var(--el-color-primary); + --el-button-hover-bg-color: var(--el-color-primary-light-9); + --el-button-hover-border-color: var(--el-color-primary-light-5); + --el-button-active-text-color: var(--el-color-primary-dark-2); + --el-button-active-border-color: var(--el-color-primary-dark-2); +} + +.#{$button-prefix-cls}--primary:not(.is-plain):not(.is-link):not(.is-text) { + padding-right: var(--ckyun-button-primary-padding-inline); + padding-left: var(--ckyun-button-primary-padding-inline); + background: var(--ckyun-brand-gradient); + border-color: var(--ckyun-brand-border-color); + border-width: 0; + box-shadow: var(--ckyun-button-primary-shadow); + + &:hover, + &:focus { + background: var(--ckyun-brand-gradient-hover); + border-color: var(--el-color-primary-dark-2); + } + + &:active { + background: var(--ckyun-brand-gradient-hover); + border-color: #78140f; + box-shadow: none; + } + + &.is-disabled, + &.is-disabled:hover, + &.is-disabled:focus { + background: var(--ckyun-brand-gradient); + border-color: var(--ckyun-brand-border-color); + box-shadow: none; + opacity: 0.55; + } +} + +.#{$button-prefix-cls}--danger:not(.is-plain):not(.is-link):not(.is-text) { + --el-button-bg-color: var(--ckyun-button-danger-color); + --el-button-border-color: var(--ckyun-button-danger-color); + --el-button-hover-bg-color: var(--ckyun-button-danger-hover-color); + --el-button-hover-border-color: var(--ckyun-button-danger-hover-color); + --el-button-active-bg-color: var(--ckyun-button-danger-hover-color); + --el-button-active-border-color: var(--ckyun-button-danger-hover-color); + + border-width: 0; + box-shadow: var(--ckyun-button-primary-shadow); +} + +.#{$button-prefix-cls}.is-round { + padding: 8px 15px; +} + +.#{$elNamespace}-form { + --el-component-size: 32px; + + font-size: var(--el-font-size-base); +} + +.#{$elNamespace}-form-item { + --font-size: 14px; + + font-size: var(--font-size); +} + +.#{$elNamespace}-form-item__label, +.#{$elNamespace}-form-item__content { + font-size: var(--el-font-size-base); +} + +.#{$elNamespace}-input, +.#{$elNamespace}-input-number, +.#{$elNamespace}-select, +.#{$elNamespace}-date-editor, +.#{$elNamespace}-cascader, +.#{$elNamespace}-textarea, +.#{$elNamespace}-radio, +.#{$elNamespace}-checkbox, +.#{$elNamespace}-switch, +.#{$elNamespace}-table, +.#{$elNamespace}-pagination, +.#{$elNamespace}-dialog, +.#{$elNamespace}-drawer, +.#{$elNamespace}-dropdown-menu, +.#{$elNamespace}-message, +.#{$elNamespace}-notification, +.#{$elNamespace}-popover, +.#{$elNamespace}-tooltip__trigger, +.#{$elNamespace}-tabs, +.#{$elNamespace}-tag, +.#{$elNamespace}-tree { + font-size: var(--el-font-size-base); +} + +// 弹窗统一居中显示,内容过高时仅滚动弹窗主体。 +.#{$elNamespace}-overlay-dialog { + display: flex; + align-items: center; + justify-content: center; + overflow: hidden; +} + +.#{$elNamespace}-dialog { + position: relative !important; + display: flex; + flex-direction: column; + margin: 0 !important; +} + +.#{$elNamespace}-dialog:not(.is-fullscreen) { + max-height: 85vh; +} + +.#{$elNamespace}-dialog__body { + flex: 1; + min-height: 0; + padding: 30px 20px 20px !important; + overflow-y: auto; + font-size: 16px !important; +} + +.#{$elNamespace}-input, +.#{$elNamespace}-input-number, +.#{$elNamespace}-select, +.#{$elNamespace}-cascader, +.#{$elNamespace}-date-editor { + --el-input-height: 32px; + --el-select-input-height: 32px; +} + +.#{$elNamespace}-input__wrapper, +.#{$elNamespace}-select__wrapper, +.#{$elNamespace}-cascader .#{$elNamespace}-input__wrapper, +.#{$elNamespace}-date-editor.#{$elNamespace}-input, +.#{$elNamespace}-date-editor.#{$elNamespace}-input__wrapper, +.#{$elNamespace}-date-editor .#{$elNamespace}-input__wrapper { + min-height: 32px; +} + +.#{$elNamespace}-input__inner, +.#{$elNamespace}-select__input, +.#{$elNamespace}-cascader__search-input { + font-size: var(--el-font-size-base); +} + +.#{$elNamespace}-input-number { + height: 32px; + line-height: 32px; +} + +.#{$elNamespace}-input-number .#{$elNamespace}-input__inner { + height: auto; + text-align: left; +} + +.#{$elNamespace}-menu, +.#{$elNamespace}-menu-item, +.#{$elNamespace}-sub-menu__title { + font-size: var(--el-font-size-base); +} + +.#{$elNamespace}-table { + --el-table-header-text-color: var(--el-text-color-primary); +} + +.#{$elNamespace}-table th, +.#{$elNamespace}-table td, +.#{$elNamespace}-table .cell { + font-size: var(--el-font-size-base); +} + +// Shared table appearance; page-specific rules may override it where needed. +.#{$elNamespace}-table { + width: 100%; + font-size: var(--ckyun-content-font-size); + + .#{$elNamespace}-table__header th.#{$elNamespace}-table__cell { + height: var(--ckyun-table-header-height); + padding: 0; + color: #374151; + background: var(--ckyun-table-header-bg); + border-bottom-color: #e5e7eb; + } + + .#{$elNamespace}-table__header .cell, + .#{$elNamespace}-table__body .cell { + padding: 0 var(--ckyun-table-cell-padding-inline); + font-size: var(--ckyun-content-font-size); + line-height: var(--ckyun-content-line-height); + text-align: left; + } + + .#{$elNamespace}-table__header .cell { + font-weight: 600; + } + + .#{$elNamespace}-table__body td.#{$elNamespace}-table__cell { + height: var(--ckyun-table-row-height); + padding: 8px 0; + color: #374151; + border-bottom-color: #f3f4f6; + } + + .#{$elNamespace}-table__body td:first-child .cell { + color: var(--ckyun-table-first-column-color); + font-weight: var(--ckyun-table-first-column-font-weight); + } + + .#{$elNamespace}-table__row:hover > td.#{$elNamespace}-table__cell { + background: var(--el-fill-color-extra-light); + } +} diff --git a/src/styles/list-page.scss b/src/styles/list-page.scss new file mode 100644 index 0000000..ca98601 --- /dev/null +++ b/src/styles/list-page.scss @@ -0,0 +1,139 @@ +@use './variables.scss' as *; + +// 旧列表页(el-form + el-table)套用列表页规范,见 docs/LIST_PAGE_SPEC.md。 +// 新页面请直接使用 PublicView。 +.ckyun-list-page { + display: flex; + width: calc(100% + var(--app-content-padding) * 2); + height: var(--ckyun-page-content-height); + min-height: 0; + margin: calc(0px - var(--app-content-padding)); + overflow: hidden; + background: var(--app-content-bg-color); + box-sizing: border-box; + flex-direction: column; +} + +// 工具栏行:页面级操作,放在查询条件下面、左对齐 +.ckyun-list-page__toolbar { + display: flex; + min-height: 48px; + padding: 4px 16px; + background: var(--el-bg-color); + box-sizing: border-box; + flex: 0 0 auto; + flex-wrap: wrap; + align-items: center; + gap: var(--ckyun-list-toolbar-gap); + + .#{$elNamespace}-button + .#{$elNamespace}-button { + margin-left: 0; + } +} + +// ② 搜索区:白底通栏,标签在上,4 列网格,筛选/重置在最后一列右侧 +.ckyun-list-page__search.#{$elNamespace}-form { + display: grid; + padding: 12px 16px 14px; + background: var(--el-bg-color); + border-bottom: 1px solid var(--el-border-color-lighter); + box-shadow: + 0 3px 3px -3px rgb(0 0 0 / 10%), + 0 2px 2px -2px rgb(0 0 0 / 10%); + flex: 0 0 auto; + grid-template-columns: repeat(4, minmax(0, 1fr)); + gap: var(--ckyun-list-search-grid-gap); + align-items: end; + + @media (width <= 1200px) { + grid-template-columns: repeat(3, minmax(0, 1fr)); + } + + @media (width <= 768px) { + grid-template-columns: 1fr; + } + + .#{$elNamespace}-form-item { + margin: 0; + } + + .#{$elNamespace}-form-item__label { + height: auto; + margin-bottom: 4px; + line-height: 16px; + } + + // 旧页面写死的 !w-240px 等宽度改为占满所在列 + .#{$elNamespace}-input, + .#{$elNamespace}-select, + .#{$elNamespace}-date-editor { + width: 100% !important; + } + + .#{$elNamespace}-date-editor.#{$elNamespace}-input__wrapper { + box-sizing: border-box; + } +} + +// 按钮行在查询条件下面时,与搜索区连成一块白底,分隔线和阴影移到按钮行底部 +.ckyun-list-page__search.#{$elNamespace}-form:has(+ .ckyun-list-page__toolbar) { + padding-bottom: 0; + border-bottom: 0; + box-shadow: none; +} + +.ckyun-list-page__search + .ckyun-list-page__toolbar { + border-bottom: 1px solid var(--el-border-color-lighter); + box-shadow: + 0 3px 3px -3px rgb(0 0 0 / 10%), + 0 2px 2px -2px rgb(0 0 0 / 10%); +} + +.ckyun-list-page__search-actions.#{$elNamespace}-form-item { + grid-column: -2 / -1; + + .#{$elNamespace}-form-item__content { + justify-content: flex-end; + gap: var(--ckyun-list-toolbar-gap); + } + + .#{$elNamespace}-button + .#{$elNamespace}-button { + margin-left: 0; + } +} + +// ③ 表格卡片:四周 16px,圆角 + 阴影 +.ckyun-list-page__table { + min-height: 0; + margin: var(--ckyun-list-section-gap); + overflow: auto; + background: var(--el-bg-color); + border-radius: var(--ckyun-table-radius); + box-shadow: var(--ckyun-list-panel-shadow); + flex: 0 1 auto; + + .#{$elNamespace}-table { + --el-table-header-bg-color: var(--ckyun-table-header-bg); + } + + .#{$elNamespace}-table th.#{$elNamespace}-table__cell { + height: var(--ckyun-table-header-height); + padding: 0; + font-weight: 600; + color: var(--el-text-color-primary); + } + + .#{$elNamespace}-table td.#{$elNamespace}-table__cell { + height: var(--ckyun-table-row-height); + padding: 0; + } + + .#{$elNamespace}-table .cell { + padding: 0 var(--ckyun-table-cell-padding-inline); + } +} + +// ④ 分页条:贴底 +.ckyun-list-page__pagination { + margin-top: auto; +} diff --git a/src/styles/theme.scss b/src/styles/theme.scss new file mode 100644 index 0000000..39b03b3 --- /dev/null +++ b/src/styles/theme.scss @@ -0,0 +1,6 @@ +// .text-color { +// color: var(--el-text-color-regular); +// } +// .dark .dark\:text-color { +// color: rgba(255, 255, 255, var(--dark-text-color)); +// } diff --git a/src/styles/var.css b/src/styles/var.css new file mode 100644 index 0000000..44f9405 --- /dev/null +++ b/src/styles/var.css @@ -0,0 +1,74 @@ +:root { + --login-bg-color: #293146; + + --left-menu-max-width: 200px; + + --left-menu-min-width: 64px; + + --left-menu-bg-color: #001529; + + --left-menu-bg-light-color: #0f2438; + + --left-menu-bg-active-color: var(--el-color-primary); + + --left-menu-text-color: #bfcbd9; + + --left-menu-text-active-color: #fff; + + --left-menu-collapse-bg-active-color: var(--el-color-primary); + /* left menu end */ + + /* logo start */ + --logo-height: 50px; + + --logo-title-text-color: #fff; + /* logo end */ + + /* header start */ + --top-header-bg-color: '#fff'; + + --top-header-text-color: 'inherit'; + + --top-header-hover-color: #f6f6f6; + + --top-tool-height: var(--logo-height); + + --top-tool-p-x: 0; + + --tags-view-height: 35px; + /* header start */ + + /* tab menu start */ + --tab-menu-max-width: 80px; + + --tab-menu-min-width: 30px; + + --tab-menu-collapse-height: 36px; + /* tab menu end */ + + --app-content-padding: 20px; + + --app-content-bg-color: #f5f7f9; + + --app-footer-height: 50px; + + --transition-time-02: 0.2s; +} + +.dark { + --app-content-bg-color: var(--el-bg-color); +} + +html, +body { + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +*, +:after, +:before { + margin: 0; + padding: 0; + box-sizing: border-box; +} diff --git a/src/styles/variables.scss b/src/styles/variables.scss new file mode 100644 index 0000000..00b66f1 --- /dev/null +++ b/src/styles/variables.scss @@ -0,0 +1,4 @@ +// 命名空间 +$namespace: v; +// el命名空间 +$elNamespace: el; diff --git a/src/types/auto-components.d.ts b/src/types/auto-components.d.ts new file mode 100644 index 0000000..1842d20 --- /dev/null +++ b/src/types/auto-components.d.ts @@ -0,0 +1,220 @@ +/* eslint-disable */ +/* prettier-ignore */ +// @ts-nocheck +// Generated by unplugin-vue-components +// Read more: https://github.com/vuejs/core/pull/3399 +export {} + +declare module 'vue' { + export interface GlobalComponents { + AmountCalculation: typeof import('./../components/FormCreate/src/components/AmountCalculation.vue')['default'] + ArticleAttachmentList: typeof import('./../components/ArticleAttachmentList.vue')['default'] + AssetCardSelect: typeof import('./../components/FormCreate/src/components/AssetCardSelect.vue')['default'] + Backtop: typeof import('./../components/Backtop/src/Backtop.vue')['default'] + BoundaryEventTimer: typeof import('./../components/bpmnProcessDesigner/package/penal/custom-config/components/BoundaryEventTimer.vue')['default'] + BusinessPage: typeof import('./../components/BusinessPage/BusinessPage.vue')['default'] + CallActivity: typeof import('./../components/bpmnProcessDesigner/package/penal/task/task-components/CallActivity.vue')['default'] + CardTitle: typeof import('./../components/Card/src/CardTitle.vue')['default'] + ChildProcessNode: typeof import('./../components/SimpleProcessDesignerV2/src/nodes/ChildProcessNode.vue')['default'] + ChildProcessNodeConfig: typeof import('./../components/SimpleProcessDesignerV2/src/nodes-config/ChildProcessNodeConfig.vue')['default'] + ColorInput: typeof import('./../components/ColorInput/index.vue')['default'] + CommonTree: typeof import('./../components/CommonTree/src/CommonTree.vue')['default'] + Condition: typeof import('./../components/SimpleProcessDesignerV2/src/nodes-config/components/Condition.vue')['default'] + ConditionDialog: typeof import('./../components/SimpleProcessDesignerV2/src/nodes-config/components/ConditionDialog.vue')['default'] + ConditionNodeConfig: typeof import('./../components/SimpleProcessDesignerV2/src/nodes-config/ConditionNodeConfig.vue')['default'] + ConditionRightSide: typeof import('./../components/SimpleProcessDesignerV2/src/nodes-config/components/ConditionRightSide.vue')['default'] + ConfidentialInput: typeof import('./../components/FormCreate/src/components/ConfidentialInput.vue')['default'] + ConfigGlobal: typeof import('./../components/ConfigGlobal/src/ConfigGlobal.vue')['default'] + ContentDetailWrap: typeof import('./../components/ContentDetailWrap/src/ContentDetailWrap.vue')['default'] + ContentWrap: typeof import('./../components/ContentWrap/src/ContentWrap.vue')['default'] + CopperModal: typeof import('./../components/Cropper/src/CopperModal.vue')['default'] + CopyTaskNode: typeof import('./../components/SimpleProcessDesignerV2/src/nodes/CopyTaskNode.vue')['default'] + CopyTaskNodeConfig: typeof import('./../components/SimpleProcessDesignerV2/src/nodes-config/CopyTaskNodeConfig.vue')['default'] + CountTo: typeof import('./../components/CountTo/src/CountTo.vue')['default'] + Crontab: typeof import('./../components/Crontab/src/Crontab.vue')['default'] + Cropper: typeof import('./../components/Cropper/src/Cropper.vue')['default'] + CropperAvatar: typeof import('./../components/Cropper/src/CropperAvatar.vue')['default'] + CycleConfig: typeof import('./../components/bpmnProcessDesigner/package/penal/time-event-config/CycleConfig.vue')['default'] + DelayTimerNode: typeof import('./../components/SimpleProcessDesignerV2/src/nodes/DelayTimerNode.vue')['default'] + DelayTimerNodeConfig: typeof import('./../components/SimpleProcessDesignerV2/src/nodes-config/DelayTimerNodeConfig.vue')['default'] + DeptSelectForm: typeof import('./../components/DeptSelectForm/index.vue')['default'] + DeptTreeSelect: typeof import('./../components/FormCreate/src/components/DeptTreeSelect.vue')['default'] + Descriptions: typeof import('./../components/Descriptions/src/Descriptions.vue')['default'] + DescriptionsItemLabel: typeof import('./../components/Descriptions/src/DescriptionsItemLabel.vue')['default'] + Dialog: typeof import('./../components/Dialog/src/Dialog.vue')['default'] + DictSelect: typeof import('./../components/FormCreate/src/components/DictSelect.vue')['default'] + DictTag: typeof import('./../components/DictTag/src/DictTag.vue')['default'] + DocAlert: typeof import('./../components/DocAlert/index.vue')['default'] + Drawer: typeof import('./../components/Drawer/src/Drawer.vue')['default'] + DurationConfig: typeof import('./../components/bpmnProcessDesigner/package/penal/time-event-config/DurationConfig.vue')['default'] + Echart: typeof import('./../components/Echart/src/Echart.vue')['default'] + Editor: typeof import('./../components/Editor/src/Editor.vue')['default'] + ElAlert: typeof import('element-plus/es')['ElAlert'] + ElAvatar: typeof import('element-plus/es')['ElAvatar'] + ElBadge: typeof import('element-plus/es')['ElBadge'] + ElButton: typeof import('element-plus/es')['ElButton'] + ElButtonGroup: typeof import('element-plus/es')['ElButtonGroup'] + ElCard: typeof import('element-plus/es')['ElCard'] + ElCheckbox: typeof import('element-plus/es')['ElCheckbox'] + ElCheckboxGroup: typeof import('element-plus/es')['ElCheckboxGroup'] + ElCol: typeof import('element-plus/es')['ElCol'] + ElCollapse: typeof import('element-plus/es')['ElCollapse'] + ElCollapseItem: typeof import('element-plus/es')['ElCollapseItem'] + ElCollapseTransition: typeof import('element-plus/es')['ElCollapseTransition'] + ElColorPicker: typeof import('element-plus/es')['ElColorPicker'] + ElDatePicker: typeof import('element-plus/es')['ElDatePicker'] + ElDescriptions: typeof import('element-plus/es')['ElDescriptions'] + ElDescriptionsItem: typeof import('element-plus/es')['ElDescriptionsItem'] + ElDialog: typeof import('element-plus/es')['ElDialog'] + ElDivider: typeof import('element-plus/es')['ElDivider'] + ElDrawer: typeof import('element-plus/es')['ElDrawer'] + ElDropdown: typeof import('element-plus/es')['ElDropdown'] + ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem'] + ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu'] + ElementBaseInfo: typeof import('./../components/bpmnProcessDesigner/package/penal/base/ElementBaseInfo.vue')['default'] + ElementCustomConfig: typeof import('./../components/bpmnProcessDesigner/package/penal/custom-config/ElementCustomConfig.vue')['default'] + ElementForm: typeof import('./../components/bpmnProcessDesigner/package/penal/form/ElementForm.vue')['default'] + ElementListeners: typeof import('./../components/bpmnProcessDesigner/package/penal/listeners/ElementListeners.vue')['default'] + ElementMultiInstance: typeof import('./../components/bpmnProcessDesigner/package/penal/multi-instance/ElementMultiInstance.vue')['default'] + ElementOtherConfig: typeof import('./../components/bpmnProcessDesigner/package/penal/other/ElementOtherConfig.vue')['default'] + ElementProperties: typeof import('./../components/bpmnProcessDesigner/package/penal/properties/ElementProperties.vue')['default'] + ElementTask: typeof import('./../components/bpmnProcessDesigner/package/penal/task/ElementTask.vue')['default'] + ElEmpty: typeof import('element-plus/es')['ElEmpty'] + ElForm: typeof import('element-plus/es')['ElForm'] + ElFormItem: typeof import('element-plus/es')['ElFormItem'] + ElIcon: typeof import('element-plus/es')['ElIcon'] + ElImage: typeof import('element-plus/es')['ElImage'] + ElImageViewer: typeof import('element-plus/es')['ElImageViewer'] + ElInput: typeof import('element-plus/es')['ElInput'] + ElInputNumber: typeof import('element-plus/es')['ElInputNumber'] + ElLink: typeof import('element-plus/es')['ElLink'] + ElOption: typeof import('element-plus/es')['ElOption'] + ElPagination: typeof import('element-plus/es')['ElPagination'] + ElPopover: typeof import('element-plus/es')['ElPopover'] + ElRadio: typeof import('element-plus/es')['ElRadio'] + ElRadioButton: typeof import('element-plus/es')['ElRadioButton'] + ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup'] + ElResult: typeof import('element-plus/es')['ElResult'] + ElRow: typeof import('element-plus/es')['ElRow'] + ElScrollbar: typeof import('element-plus/es')['ElScrollbar'] + ElSelect: typeof import('element-plus/es')['ElSelect'] + ElSelectV2: typeof import('element-plus/es')['ElSelectV2'] + ElSkeleton: typeof import('element-plus/es')['ElSkeleton'] + ElSpace: typeof import('element-plus/es')['ElSpace'] + ElSwitch: typeof import('element-plus/es')['ElSwitch'] + ElTable: typeof import('element-plus/es')['ElTable'] + ElTableColumn: typeof import('element-plus/es')['ElTableColumn'] + ElTabPane: typeof import('element-plus/es')['ElTabPane'] + ElTabs: typeof import('element-plus/es')['ElTabs'] + ElTag: typeof import('element-plus/es')['ElTag'] + ElText: typeof import('element-plus/es')['ElText'] + ElTimeline: typeof import('element-plus/es')['ElTimeline'] + ElTimelineItem: typeof import('element-plus/es')['ElTimelineItem'] + ElTooltip: typeof import('element-plus/es')['ElTooltip'] + ElTransfer: typeof import('element-plus/es')['ElTransfer'] + ElTree: typeof import('element-plus/es')['ElTree'] + ElTreeSelect: typeof import('element-plus/es')['ElTreeSelect'] + ElUpload: typeof import('element-plus/es')['ElUpload'] + EndEventNode: typeof import('./../components/SimpleProcessDesignerV2/src/nodes/EndEventNode.vue')['default'] + Error: typeof import('./../components/Error/src/Error.vue')['default'] + ExclusiveNode: typeof import('./../components/SimpleProcessDesignerV2/src/nodes/ExclusiveNode.vue')['default'] + FlowCondition: typeof import('./../components/bpmnProcessDesigner/package/penal/flow-condition/FlowCondition.vue')['default'] + Form: typeof import('./../components/Form/src/Form.vue')['default'] + FormColumnWidth: typeof import('./../components/FormCreate/src/components/FormColumnWidth.vue')['default'] + FormTable: typeof import('./../components/FormCreate/src/components/FormTable.vue')['default'] + FormTableColumnConfig: typeof import('./../components/FormCreate/src/components/FormTableColumnConfig.vue')['default'] + FormTableRow: typeof import('./../components/FormCreate/src/components/FormTableRow.vue')['default'] + Highlight: typeof import('./../components/Highlight/src/Highlight.vue')['default'] + HttpHeaderEditor: typeof import('./../components/bpmnProcessDesigner/package/penal/task/task-components/HttpHeaderEditor.vue')['default'] + HttpRequestParamSetting: typeof import('./../components/SimpleProcessDesignerV2/src/nodes-config/components/HttpRequestParamSetting.vue')['default'] + HttpRequestSetting: typeof import('./../components/SimpleProcessDesignerV2/src/nodes-config/components/HttpRequestSetting.vue')['default'] + Icon: typeof import('./../components/Icon/src/Icon.vue')['default'] + IconSelect: typeof import('./../components/Icon/src/IconSelect.vue')['default'] + IFrame: typeof import('./../components/IFrame/src/IFrame.vue')['default'] + ImageViewer: typeof import('./../components/ImageViewer/src/ImageViewer.vue')['default'] + ImpactPreview: typeof import('./../components/ImpactPreview/ImpactPreview.vue')['default'] + InclusiveNode: typeof import('./../components/SimpleProcessDesignerV2/src/nodes/InclusiveNode.vue')['default'] + Infotip: typeof import('./../components/Infotip/src/Infotip.vue')['default'] + InputPassword: typeof import('./../components/InputPassword/src/InputPassword.vue')['default'] + ItsmProjectMemberSelect: typeof import('./../components/FormCreate/src/components/ItsmProjectMemberSelect.vue')['default'] + ItsmProjectSelect: typeof import('./../components/FormCreate/src/components/ItsmProjectSelect.vue')['default'] + ItsmResourceSelect: typeof import('./../components/FormCreate/src/components/ItsmResourceSelect.vue')['default'] + JsonEditor: typeof import('./../components/JsonEditor/src/JsonEditor.vue')['default'] + LeaveDays: typeof import('./../components/FormCreate/src/components/LeaveDays.vue')['default'] + LogDetailDrawer: typeof import('./../components/LogDetailDrawer/LogDetailDrawer.vue')['default'] + MarkdownView: typeof import('./../components/MarkdownView/index.vue')['default'] + NodeHandler: typeof import('./../components/SimpleProcessDesignerV2/src/NodeHandler.vue')['default'] + Numbering: typeof import('./../components/FormCreate/src/components/Numbering.vue')['default'] + OperateLogV2: typeof import('./../components/OperateLogV2/src/OperateLogV2.vue')['default'] + OrganizationNodeLabel: typeof import('./../components/OrganizationNodeLabel/index.vue')['default'] + Pagination: typeof import('./../components/Pagination/index.vue')['default'] + ParallelNode: typeof import('./../components/SimpleProcessDesignerV2/src/nodes/ParallelNode.vue')['default'] + PostSelect: typeof import('./../components/FormCreate/src/components/PostSelect.vue')['default'] + ProcessDesigner: typeof import('./../components/bpmnProcessDesigner/package/designer/ProcessDesigner.vue')['default'] + ProcessExpressionDialog: typeof import('./../components/bpmnProcessDesigner/package/penal/task/task-components/ProcessExpressionDialog.vue')['default'] + ProcessInstanceSelect: typeof import('./../components/FormCreate/src/components/ProcessInstanceSelect.vue')['default'] + ProcessListenerDialog: typeof import('./../components/bpmnProcessDesigner/package/penal/listeners/ProcessListenerDialog.vue')['default'] + ProcessNodeTree: typeof import('./../components/SimpleProcessDesignerV2/src/ProcessNodeTree.vue')['default'] + ProcessPalette: typeof import('./../components/bpmnProcessDesigner/package/palette/ProcessPalette.vue')['default'] + ProcessViewer: typeof import('./../components/bpmnProcessDesigner/package/designer/ProcessViewer.vue')['default'] + PropertiesPanel: typeof import('./../components/bpmnProcessDesigner/package/penal/PropertiesPanel.vue')['default'] + PublicView: typeof import('./../components/PublicView/src/PublicView.vue')['default'] + PublicViewHeader: typeof import('./../components/PublicView/src/components/PublicViewHeader.vue')['default'] + PublicViewPagination: typeof import('./../components/PublicView/src/components/PublicViewPagination.vue')['default'] + PublicViewSearch: typeof import('./../components/PublicView/src/components/PublicViewSearch.vue')['default'] + PublicViewSearchField: typeof import('./../components/PublicView/src/components/PublicViewSearchField.vue')['default'] + PublicViewState: typeof import('./../components/PublicView/src/components/PublicViewState.vue')['default'] + PublicViewTable: typeof import('./../components/PublicView/src/components/PublicViewTable.vue')['default'] + PublicViewTableColumn: typeof import('./../components/PublicView/src/components/PublicViewTableColumn.vue')['default'] + PublicViewTabs: typeof import('./../components/PublicView/src/components/PublicViewTabs.vue')['default'] + PublicViewToolbar: typeof import('./../components/PublicView/src/components/PublicViewToolbar.vue')['default'] + Qrcode: typeof import('./../components/Qrcode/src/Qrcode.vue')['default'] + ReadonlyValue: typeof import('./../components/FormCreate/src/components/ReadonlyValue.vue')['default'] + ReceiveTask: typeof import('./../components/bpmnProcessDesigner/package/penal/task/task-components/ReceiveTask.vue')['default'] + RoleSelect: typeof import('./../components/FormCreate/src/components/RoleSelect.vue')['default'] + RouterLink: typeof import('vue-router')['RouterLink'] + RouterNode: typeof import('./../components/SimpleProcessDesignerV2/src/nodes/RouterNode.vue')['default'] + RouterNodeConfig: typeof import('./../components/SimpleProcessDesignerV2/src/nodes-config/RouterNodeConfig.vue')['default'] + RouterSearch: typeof import('./../components/RouterSearch/index.vue')['default'] + RouterView: typeof import('vue-router')['RouterView'] + ScriptTask: typeof import('./../components/bpmnProcessDesigner/package/penal/task/task-components/ScriptTask.vue')['default'] + Search: typeof import('./../components/Search/src/Search.vue')['default'] + ServiceTask: typeof import('./../components/bpmnProcessDesigner/package/penal/task/task-components/ServiceTask.vue')['default'] + SignalAndMessage: typeof import('./../components/bpmnProcessDesigner/package/penal/signal-message/SignalAndMessage.vue')['default'] + SimpleProcessDesigner: typeof import('./../components/SimpleProcessDesignerV2/src/SimpleProcessDesigner.vue')['default'] + SimpleProcessModel: typeof import('./../components/SimpleProcessDesignerV2/src/SimpleProcessModel.vue')['default'] + SimpleProcessViewer: typeof import('./../components/SimpleProcessDesignerV2/src/SimpleProcessViewer.vue')['default'] + StartUserNode: typeof import('./../components/SimpleProcessDesignerV2/src/nodes/StartUserNode.vue')['default'] + StartUserNodeConfig: typeof import('./../components/SimpleProcessDesignerV2/src/nodes-config/StartUserNodeConfig.vue')['default'] + Sticky: typeof import('./../components/Sticky/src/Sticky.vue')['default'] + Table: typeof import('./../components/Table/src/Table.vue')['default'] + TimeCalculation: typeof import('./../components/FormCreate/src/components/TimeCalculation.vue')['default'] + TimeEventConfig: typeof import('./../components/bpmnProcessDesigner/package/penal/time-event-config/TimeEventConfig.vue')['default'] + Tooltip: typeof import('./../components/Tooltip/src/Tooltip.vue')['default'] + TriggerNode: typeof import('./../components/SimpleProcessDesignerV2/src/nodes/TriggerNode.vue')['default'] + TriggerNodeConfig: typeof import('./../components/SimpleProcessDesignerV2/src/nodes-config/TriggerNodeConfig.vue')['default'] + UploadButton: typeof import('./../components/UploadFile/src/UploadButton.vue')['default'] + UploadFile: typeof import('./../components/UploadFile/src/UploadFile.vue')['default'] + UploadImg: typeof import('./../components/UploadFile/src/UploadImg.vue')['default'] + UploadImgs: typeof import('./../components/UploadFile/src/UploadImgs.vue')['default'] + UppercaseAmount: typeof import('./../components/FormCreate/src/components/UppercaseAmount.vue')['default'] + UserSelectForm: typeof import('./../components/UserSelectForm/index.vue')['default'] + UserTask: typeof import('./../components/bpmnProcessDesigner/package/penal/task/task-components/UserTask.vue')['default'] + UserTaskCustomConfig: typeof import('./../components/bpmnProcessDesigner/package/penal/custom-config/components/UserTaskCustomConfig.vue')['default'] + UserTaskListener: typeof import('./../components/SimpleProcessDesignerV2/src/nodes-config/components/UserTaskListener.vue')['default'] + UserTaskListeners: typeof import('./../components/bpmnProcessDesigner/package/penal/listeners/UserTaskListeners.vue')['default'] + UserTaskNode: typeof import('./../components/SimpleProcessDesignerV2/src/nodes/UserTaskNode.vue')['default'] + UserTaskNodeConfig: typeof import('./../components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue')['default'] + UserTreeSelect: typeof import('./../components/UserTreeSelect/index.vue')['default'] + Verify: typeof import('./../components/Verifition/src/Verify.vue')['default'] + VerifyPictureWord: typeof import('./../components/Verifition/src/Verify/VerifyPictureWord.vue')['default'] + VerifyPoints: typeof import('./../components/Verifition/src/Verify/VerifyPoints.vue')['default'] + VerifySlide: typeof import('./../components/Verifition/src/Verify/VerifySlide.vue')['default'] + WorkflowFormPreview: typeof import('./../components/FormCreate/src/WorkflowFormPreview.vue')['default'] + XButton: typeof import('./../components/XButton/src/XButton.vue')['default'] + XTextButton: typeof import('./../components/XButton/src/XTextButton.vue')['default'] + } + export interface ComponentCustomProperties { + vLoading: typeof import('element-plus/es')['ElLoadingDirective'] + } +} diff --git a/src/types/auto-imports.d.ts b/src/types/auto-imports.d.ts new file mode 100644 index 0000000..0ce66b0 --- /dev/null +++ b/src/types/auto-imports.d.ts @@ -0,0 +1,82 @@ +/* eslint-disable */ +/* prettier-ignore */ +// @ts-nocheck +// noinspection JSUnusedGlobalSymbols +// Generated by unplugin-auto-import +export {} +declare global { + const DICT_TYPE: typeof import('@/utils/dict')['DICT_TYPE'] + const EffectScope: typeof import('vue')['EffectScope'] + const ElMessageBox: typeof import('element-plus/es')['ElMessageBox'] + const computed: typeof import('vue')['computed'] + const createApp: typeof import('vue')['createApp'] + const customRef: typeof import('vue')['customRef'] + const defineAsyncComponent: typeof import('vue')['defineAsyncComponent'] + const defineComponent: typeof import('vue')['defineComponent'] + const effectScope: typeof import('vue')['effectScope'] + const getCurrentInstance: typeof import('vue')['getCurrentInstance'] + const getCurrentScope: typeof import('vue')['getCurrentScope'] + const h: typeof import('vue')['h'] + const inject: typeof import('vue')['inject'] + const isProxy: typeof import('vue')['isProxy'] + const isReactive: typeof import('vue')['isReactive'] + const isReadonly: typeof import('vue')['isReadonly'] + const isRef: typeof import('vue')['isRef'] + const markRaw: typeof import('vue')['markRaw'] + const nextTick: typeof import('vue')['nextTick'] + const onActivated: typeof import('vue')['onActivated'] + const onBeforeMount: typeof import('vue')['onBeforeMount'] + const onBeforeRouteLeave: typeof import('vue-router')['onBeforeRouteLeave'] + const onBeforeRouteUpdate: typeof import('vue-router')['onBeforeRouteUpdate'] + const onBeforeUnmount: typeof import('vue')['onBeforeUnmount'] + const onBeforeUpdate: typeof import('vue')['onBeforeUpdate'] + const onDeactivated: typeof import('vue')['onDeactivated'] + const onErrorCaptured: typeof import('vue')['onErrorCaptured'] + const onMounted: typeof import('vue')['onMounted'] + const onRenderTracked: typeof import('vue')['onRenderTracked'] + const onRenderTriggered: typeof import('vue')['onRenderTriggered'] + const onScopeDispose: typeof import('vue')['onScopeDispose'] + const onServerPrefetch: typeof import('vue')['onServerPrefetch'] + const onUnmounted: typeof import('vue')['onUnmounted'] + const onUpdated: typeof import('vue')['onUpdated'] + const onWatcherCleanup: typeof import('vue')['onWatcherCleanup'] + const provide: typeof import('vue')['provide'] + const reactive: typeof import('vue')['reactive'] + const readonly: typeof import('vue')['readonly'] + const ref: typeof import('vue')['ref'] + const required: typeof import('@/utils/formRules')['required'] + const resolveComponent: typeof import('vue')['resolveComponent'] + const shallowReactive: typeof import('vue')['shallowReactive'] + const shallowReadonly: typeof import('vue')['shallowReadonly'] + const shallowRef: typeof import('vue')['shallowRef'] + const toRaw: typeof import('vue')['toRaw'] + const toRef: typeof import('vue')['toRef'] + const toRefs: typeof import('vue')['toRefs'] + const toValue: typeof import('vue')['toValue'] + const triggerRef: typeof import('vue')['triggerRef'] + const unref: typeof import('vue')['unref'] + const useAttrs: typeof import('vue')['useAttrs'] + const useCrudSchemas: typeof import('@/hooks/web/useCrudSchemas')['useCrudSchemas'] + const useCssModule: typeof import('vue')['useCssModule'] + const useCssVars: typeof import('vue')['useCssVars'] + const useI18n: typeof import('@/hooks/web/useI18n')['useI18n'] + const useId: typeof import('vue')['useId'] + const useLink: typeof import('vue-router')['useLink'] + const useMessage: typeof import('@/hooks/web/useMessage')['useMessage'] + const useModel: typeof import('vue')['useModel'] + const useRoute: typeof import('vue-router')['useRoute'] + const useRouter: typeof import('vue-router')['useRouter'] + const useSlots: typeof import('vue')['useSlots'] + const useTable: typeof import('@/hooks/web/useTable')['useTable'] + const useTemplateRef: typeof import('vue')['useTemplateRef'] + const watch: typeof import('vue')['watch'] + const watchEffect: typeof import('vue')['watchEffect'] + const watchPostEffect: typeof import('vue')['watchPostEffect'] + const watchSyncEffect: typeof import('vue')['watchSyncEffect'] +} +// for type re-export +declare global { + // @ts-ignore + export type { Component, ComponentPublicInstance, ComputedRef, DirectiveBinding, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, MaybeRef, MaybeRefOrGetter, VNode, WritableComputedRef } from 'vue' + import('vue') +} diff --git a/src/types/components.d.ts b/src/types/components.d.ts new file mode 100644 index 0000000..8de1f33 --- /dev/null +++ b/src/types/components.d.ts @@ -0,0 +1,56 @@ +export type ComponentName = + | 'Radio' + | 'RadioButton' + | 'Checkbox' + | 'CheckboxButton' + | 'Input' + | 'Autocomplete' + | 'InputNumber' + | 'Select' + | 'Cascader' + | 'Switch' + | 'Slider' + | 'TimePicker' + | 'DatePicker' + | 'Rate' + | 'ColorPicker' + | 'Transfer' + | 'Divider' + | 'TimeSelect' + | 'SelectV2' + | 'TreeSelect' + | 'InputPassword' + | 'Editor' + | 'UploadImg' + | 'UploadImgs' + | 'UploadFile' + +export type ColProps = { + span?: number + xs?: number + sm?: number + md?: number + lg?: number + xl?: number + tag?: string +} + +export type ComponentOptions = { + label?: string + value?: FormValueType + disabled?: boolean + key?: string | number + children?: ComponentOptions[] + options?: ComponentOptions[] +} & Recordable + +export type ComponentOptionsAlias = { + labelField?: string + valueField?: string +} + +export type ComponentProps = { + optionsAlias?: ComponentOptionsAlias + options?: ComponentOptions[] + optionsSlot?: boolean +} & Recordable diff --git a/src/types/configGlobal.d.ts b/src/types/configGlobal.d.ts new file mode 100644 index 0000000..f6d7b3c --- /dev/null +++ b/src/types/configGlobal.d.ts @@ -0,0 +1,4 @@ +import { ElementPlusSize } from './elementPlus' +export interface ConfigGlobalTypes { + size?: ElementPlusSize +} diff --git a/src/types/contextMenu.d.ts b/src/types/contextMenu.d.ts new file mode 100644 index 0000000..0738d0e --- /dev/null +++ b/src/types/contextMenu.d.ts @@ -0,0 +1,7 @@ +export type contextMenuSchema = { + disabled?: boolean + divided?: boolean + icon?: string + label: string + command?: (item: contextMenuSchema) => void +} diff --git a/src/types/descriptions.d.ts b/src/types/descriptions.d.ts new file mode 100644 index 0000000..af6d68c --- /dev/null +++ b/src/types/descriptions.d.ts @@ -0,0 +1,14 @@ +export interface DescriptionsSchema { + span?: number // 占多少分 + field: string // 字段名 + label?: string // label名 + mappedField?: string // 字段映射 + width?: string | number + minWidth?: string | number + align?: 'left' | 'center' | 'right' + labelAlign?: 'left' | 'center' | 'right' + className?: string + labelClassName?: string + dateFormat?: string // add by 星语:支持时间的格式化 + dictType?: string // add by 星语:支持 dict 字典数据 +} diff --git a/src/types/elementPlus.d.ts b/src/types/elementPlus.d.ts new file mode 100644 index 0000000..2c6b76e --- /dev/null +++ b/src/types/elementPlus.d.ts @@ -0,0 +1,3 @@ +export type ElementPlusSize = 'default' | 'small' | 'large' + +export type ElementPlusInfoType = 'success' | 'info' | 'warning' | 'danger' diff --git a/src/types/form.d.ts b/src/types/form.d.ts new file mode 100644 index 0000000..b685138 --- /dev/null +++ b/src/types/form.d.ts @@ -0,0 +1,44 @@ +import type { CSSProperties } from 'vue' +import { ColProps, ComponentProps, ComponentName } from '@/types/components' +import type { AxiosPromise } from 'axios' + +export type FormSetPropsType = { + field: string + path: string + value: unknown +} + +export type FormValueType = string | number | string[] | number[] | boolean | undefined | null + +export type FormItemProps = { + labelWidth?: string | number + required?: boolean + rules?: Recordable + error?: string + showMessage?: boolean + inlineMessage?: boolean + style?: CSSProperties +} + +export type FormSchema = { + // 唯一值 + field: string + // 标题 + label?: string + // 提示 + labelMessage?: string + // col组件属性 + colProps?: ColProps + // 表单组件属性,slots对应的是表单组件的插槽,规则:${field}-xxx,具体可以查看element-plus文档 + componentProps?: { slots?: Recordable } & ComponentProps + // formItem组件属性 + formItemProps?: FormItemProps + // 渲染的组件 + component?: ComponentName + // 初始值 + value?: FormValueType + // 是否隐藏 + hidden?: boolean + // 远程加载下拉项 + api?: () => AxiosPromise +} diff --git a/src/types/icon.d.ts b/src/types/icon.d.ts new file mode 100644 index 0000000..d1ffcdb --- /dev/null +++ b/src/types/icon.d.ts @@ -0,0 +1,5 @@ +export interface IconTypes { + size?: number + color?: string + icon: string +} diff --git a/src/types/infoTip.d.ts b/src/types/infoTip.d.ts new file mode 100644 index 0000000..6eff083 --- /dev/null +++ b/src/types/infoTip.d.ts @@ -0,0 +1,4 @@ +export interface TipSchema { + label: string + keys?: string[] +} diff --git a/src/types/layout.d.ts b/src/types/layout.d.ts new file mode 100644 index 0000000..cad3e2a --- /dev/null +++ b/src/types/layout.d.ts @@ -0,0 +1 @@ +export type LayoutType = 'classic' | 'topLeft' | 'top' | 'cutMenu' diff --git a/src/types/localeDropdown.d.ts b/src/types/localeDropdown.d.ts new file mode 100644 index 0000000..c749dce --- /dev/null +++ b/src/types/localeDropdown.d.ts @@ -0,0 +1,10 @@ +export interface Language { + el: Recordable + name: string +} + +export interface LocaleDropdownType { + lang: LocaleType + name?: string + elLocale?: Language +} diff --git a/src/types/qrcode.d.ts b/src/types/qrcode.d.ts new file mode 100644 index 0000000..86cdf0b --- /dev/null +++ b/src/types/qrcode.d.ts @@ -0,0 +1,9 @@ +export interface QrcodeLogo { + src?: string + logoSize?: number + bgColor?: string + borderSize?: number + crossOrigin?: string + borderRadius?: number + logoRadius?: number +} diff --git a/src/types/table.d.ts b/src/types/table.d.ts new file mode 100644 index 0000000..d043b87 --- /dev/null +++ b/src/types/table.d.ts @@ -0,0 +1,44 @@ +export type TableColumn = { + field: string + label?: string + width?: number | string + fixed?: 'left' | 'right' + children?: TableColumn[] +} & Recordable + +export type VxeTableColumn = { + field: string + title?: string + children?: TableColumn[] +} & Recordable + +export type TableSlotDefault = { + row: Recordable + column: TableColumn + $index: number +} & Recordable + +export interface Pagination { + small?: boolean + background?: boolean + pageSize?: number + defaultPageSize?: number + total?: number + pageCount?: number + pagerCount?: number + currentPage?: number + defaultCurrentPage?: number + layout?: string + pageSizes?: number[] + popperClass?: string + prevText?: string + nextText?: string + disabled?: boolean + hideOnSinglePage?: boolean +} + +export interface TableSetPropsType { + field: string + path: string + value: unknown +} diff --git a/src/types/theme.d.ts b/src/types/theme.d.ts new file mode 100644 index 0000000..ad649b0 --- /dev/null +++ b/src/types/theme.d.ts @@ -0,0 +1,16 @@ +export type ThemeTypes = { + elColorPrimary?: string + leftMenuBorderColor?: string + leftMenuBgColor?: string + leftMenuBgLightColor?: string + leftMenuBgActiveColor?: string + leftMenuCollapseBgActiveColor?: string + leftMenuTextColor?: string + leftMenuTextActiveColor?: string + logoTitleTextColor?: string + logoBorderColor?: string + topHeaderBgColor?: string + topHeaderTextColor?: string + topHeaderHoverColor?: string + topToolBorderColor?: string +} diff --git a/src/utils/Logger.ts b/src/utils/Logger.ts new file mode 100644 index 0000000..dc8e587 --- /dev/null +++ b/src/utils/Logger.ts @@ -0,0 +1,100 @@ +const isArray = function (obj: unknown): boolean { + return Object.prototype.toString.call(obj) === '[object Array]' +} + +const Logger = () => {} + +Logger.typeColor = function (type: string) { + let color = '' + switch (type) { + case 'primary': + color = '#2d8cf0' + break + case 'success': + color = '#19be6b' + break + case 'info': + color = '#909399' + break + case 'warn': + color = '#ff9900' + break + case 'error': + color = '#f03f14' + break + default: + color = '#35495E' + break + } + return color +} + +Logger.print = function (type = 'default', text: unknown, back = false) { + if (typeof text === 'object') { + // 如果是對象則調用打印對象方式 + isArray(text) ? console.table(text) : console.dir(text) + return + } + if (back) { + // 如果是打印帶背景圖的 + console.info( + `%c ${text} `, + `background:${Logger.typeColor(type)}; padding: 2px; border-radius: 4px; color: #fff;` + ) + } else { + console.info( + `%c ${text} `, + `border: 1px solid ${Logger.typeColor(type)}; + padding: 2px; border-radius: 4px; + color: ${Logger.typeColor(type)};` + ) + } +} + +Logger.printBack = function (type = 'primary', text) { + this.print(type, text, true) +} + +Logger.pretty = function (type = 'primary', title, text) { + if (typeof text === 'object') { + console.group('Console Group', title) + console.info( + `%c ${title}`, + `background:${Logger.typeColor(type)};border:1px solid ${Logger.typeColor(type)}; + padding: 1px; border-radius: 4px; color: #fff;` + ) + isArray(text) ? console.table(text) : console.dir(text) + console.groupEnd() + return + } + console.info( + `%c ${title} %c ${text} %c`, + `background:${Logger.typeColor(type)};border:1px solid ${Logger.typeColor(type)}; + padding: 1px; border-radius: 4px 0 0 4px; color: #fff;`, + `border:1px solid ${Logger.typeColor(type)}; + padding: 1px; border-radius: 0 4px 4px 0; color: ${Logger.typeColor(type)};`, + 'background:transparent' + ) +} + +Logger.prettyPrimary = function (title, ...text) { + text.forEach((t) => this.pretty('primary', title, t)) +} + +Logger.prettySuccess = function (title, ...text) { + text.forEach((t) => this.pretty('success', title, t)) +} + +Logger.prettyWarn = function (title, ...text) { + text.forEach((t) => this.pretty('warn', title, t)) +} + +Logger.prettyError = function (title, ...text) { + text.forEach((t) => this.pretty('error', title, t)) +} + +Logger.prettyInfo = function (title, ...text) { + text.forEach((t) => this.pretty('info', title, t)) +} + +export default Logger diff --git a/src/utils/auth.ts b/src/utils/auth.ts new file mode 100644 index 0000000..8f02387 --- /dev/null +++ b/src/utils/auth.ts @@ -0,0 +1,144 @@ +import { useCache, CACHE_KEY, scopedStorageKey } from '@/hooks/web/useCache' +import { TokenType } from '@/api/login/types' +import { useMessage } from '@/hooks/web/useMessage' + +const { wsCache } = useCache() + +export const AUTH_SESSION_KEY = scopedStorageKey('ckcloud:auth-session:v1') +const AUTH_SESSION_LOCK = 'caikaiyun-manage:refresh-token' +const ALLOW_INSECURE_HTTP_SSO = import.meta.env.VITE_ALLOW_INSECURE_HTTP_SSO === 'true' +let authSessionLockHeld = false +let insecureHttpQueue: Promise = Promise.resolve() + +export const requireAuthSessionLock = (): LockManager | undefined => { + if (navigator.locks) return navigator.locks + // 局域网 HTTP 测试地址不是安全上下文,仅专用测试制品允许页内串行降级。 + if (ALLOW_INSECURE_HTTP_SSO && window.location.protocol === 'http:') return undefined + const message = '当前浏览器不支持安全的跨标签页登录,请使用 HTTPS 和支持 Web Locks 的现代浏览器。' + useMessage().error(message) + throw new Error(message) +} + +// All token writers share this lock. Callers already inside it must not reacquire it. +export const withAuthSessionLock = (action: () => T | Promise): Promise => { + const locks = requireAuthSessionLock() + const run = async (): Promise => { + authSessionLockHeld = true + try { + return await action() + } finally { + authSessionLockHeld = false + } + } + if (locks) return locks.request(AUTH_SESSION_LOCK, run) + const previous = insecureHttpQueue + let releaseQueue!: () => void + insecureHttpQueue = new Promise((resolve) => { + releaseQueue = resolve + }) + return previous.then(run).finally(releaseQueue) +} + +export const assertAuthSessionLockHeld = (): void => { + if (!authSessionLockHeld) throw new Error('登录状态必须在跨标签页锁内更新') +} + +export interface AuthSessionSnapshot { + accessToken: string + refreshToken: string + sessionId: string + ssoSessionBinding: string +} + +export const getAuthSession = (): AuthSessionSnapshot => { + try { + const value: unknown = JSON.parse(localStorage.getItem(AUTH_SESSION_KEY) || 'null') + if (value && typeof value === 'object') { + const session = value as Partial + if ( + typeof session.accessToken === 'string' && + typeof session.refreshToken === 'string' && + typeof session.sessionId === 'string' && + typeof session.ssoSessionBinding === 'string' + ) { + return session as AuthSessionSnapshot + } + } + } catch { + // Corrupt or legacy storage is not a usable login session. + } + return { accessToken: '', refreshToken: '', sessionId: '', ssoSessionBinding: '' } +} + +export const getAccessToken = (): string => getAuthSession().accessToken +export const getRefreshToken = (): string => getAuthSession().refreshToken + +export const createAuthNonce = (): string => + Array.from(crypto.getRandomValues(new Uint8Array(32)), (value) => + value.toString(16).padStart(2, '0') + ).join('') + +let pageSessionId = getAuthSession().sessionId + +export const isPageSessionCurrent = (session: AuthSessionSnapshot = getAuthSession()): boolean => + session.sessionId === pageSessionId + +export const isAuthSessionCurrent = (session: AuthSessionSnapshot): boolean => { + const current = getAuthSession() + return ( + current.sessionId === session.sessionId && + current.accessToken === session.accessToken && + current.refreshToken === session.refreshToken + ) +} + +// 设置token +export const setToken = (token: TokenType, sessionId = createAuthNonce()): void => { + assertAuthSessionLockHeld() + if (!token.accessToken || !token.refreshToken || !sessionId) { + throw new Error('登录响应不完整,请重新登录') + } + const previous = getAuthSession() + // A single storage write prevents other tabs from observing mixed token pairs. + localStorage.setItem( + AUTH_SESSION_KEY, + JSON.stringify({ + accessToken: token.accessToken, + refreshToken: token.refreshToken, + sessionId, + ssoSessionBinding: + token.ssoSessionBinding ?? + (sessionId === previous.sessionId ? previous.ssoSessionBinding : '') + }) + ) + pageSessionId = sessionId +} + +// 删除token +export const removeToken = (): void => { + assertAuthSessionLockHeld() + localStorage.removeItem(AUTH_SESSION_KEY) + pageSessionId = '' +} + +/** 格式化token(jwt格式) */ +export const formatToken = (token: string): string => { + return 'Bearer ' + token +} +// ========== 租户相关 ========== + +export const getTenantId = () => { + return wsCache.get(CACHE_KEY.TenantId) +} + +export const setTenantId = (tenantId: number) => { + wsCache.set(CACHE_KEY.TenantId, tenantId) +} + +export const getVisitTenantId = () => { + return wsCache.get(CACHE_KEY.VisitTenantId) +} + +export const setVisitTenantId = (visitTenantId: number) => { + wsCache.set(CACHE_KEY.VisitTenantId, visitTenantId) +} diff --git a/src/utils/color.ts b/src/utils/color.ts new file mode 100644 index 0000000..2c19cfd --- /dev/null +++ b/src/utils/color.ts @@ -0,0 +1,137 @@ +/** + * 判断是否 十六进制颜色值. + * 输入形式可为 #fff000 #f00 + * + * @param String color 十六进制颜色值 + * @return Boolean + */ +export const isHexColor = (color: string) => { + const reg = /^#([0-9a-fA-F]{3}|[0-9a-fA-f]{6})$/ + return reg.test(color) +} + +/** + * Transform a HEX color to its RGB representation + * @param {string} hex The color to transform + * @returns The RGB representation of the passed color + */ +export const hexToRGB = (hex: string, opacity?: number) => { + let sHex = hex.toLowerCase() + if (isHexColor(hex)) { + if (sHex.length === 4) { + let sColorNew = '#' + for (let i = 1; i < 4; i += 1) { + sColorNew += sHex.slice(i, i + 1).concat(sHex.slice(i, i + 1)) + } + sHex = sColorNew + } + const sColorChange: number[] = [] + for (let i = 1; i < 7; i += 2) { + sColorChange.push(parseInt('0x' + sHex.slice(i, i + 2))) + } + return opacity + ? 'RGBA(' + sColorChange.join(',') + ',' + opacity + ')' + : 'RGB(' + sColorChange.join(',') + ')' + } + return sHex +} + +export const colorIsDark = (color: string) => { + if (!isHexColor(color)) return + const [r, g, b] = hexToRGB(color) + .replace(/(?:\(|\)|rgb|RGB)*/g, '') + .split(',') + .map((item) => Number(item)) + return r * 0.299 + g * 0.578 + b * 0.114 < 192 +} + +/** + * Lightens a 6 char HEX color according to the passed percentage + * @param {string} color The color to change + * @param {number} amount The amount to change the color by + * @returns {string} The processed color represented as HEX + */ +export const lighten = (color: string, amount: number) => { + color = color.indexOf('#') >= 0 ? color.substring(1, color.length) : color + amount = Math.trunc((255 * amount) / 100) + return `#${addLight(color.substring(0, 2), amount)}${addLight( + color.substring(2, 4), + amount + )}${addLight(color.substring(4, 6), amount)}` +} + +/* Suma el porcentaje indicado a un color (RR, GG o BB) hexadecimal para aclararlo */ +/** + * Sums the passed percentage to the R, G or B of a HEX color + * @param {string} color The color to change + * @param {number} amount The amount to change the color by + * @returns {string} The processed part of the color + */ +const addLight = (color: string, amount: number) => { + const cc = parseInt(color, 16) + amount + const c = cc > 255 ? 255 : cc + return c.toString(16).length > 1 ? c.toString(16) : `0${c.toString(16)}` +} + +// 预设颜色 +export const PREDEFINE_COLORS = [ + '#ff4500', + '#ff8c00', + '#ffd700', + '#90ee90', + '#00ced1', + '#1e90ff', + '#c71585', + '#409EFF', + '#909399', + '#C0C4CC', + '#b7390b', + '#ff7800', + '#fad400', + '#5b8c5f', + '#00babd', + '#1f73c3', + '#711f57' +] + +/** + * Mixes two colors. + * + * @param {string} color1 - The first color, should be a 6-digit hexadecimal color code starting with `#`. + * @param {string} color2 - The second color, should be a 6-digit hexadecimal color code starting with `#`. + * @param {number} [weight=0.5] - The weight of color1 in the mix, should be a number between 0 and 1, where 0 represents 100% of color2, and 1 represents 100% of color1. + * @returns {string} The mixed color, a 6-digit hexadecimal color code starting with `#`. + */ +export const mix = (color1: string, color2: string, weight: number = 0.5): string => { + let color = '#' + for (let i = 0; i <= 2; i++) { + const c1 = parseInt(color1.substring(1 + i * 2, 3 + i * 2), 16) + const c2 = parseInt(color2.substring(1 + i * 2, 3 + i * 2), 16) + const c = Math.round(c1 * weight + c2 * (1 - weight)) + color += c.toString(16).padStart(2, '0') + } + return color +} + +/** + * getCssColorVariable + * @description 获取css变量的颜色值 + * @param colorVariable css变量名 + * @param opacity 透明度 + * @returns {string} 颜色值 + * @example getCssColorVariable('--el-color-primary', 0.5) + * @example getCssColorVariable('--el-color-primary') + * @example getCssColorVariable() + */ +export const getCssColorVariable = ( + colorVariable: string = '--el-color-primary', + opacity?: number +) => { + const colorValue = getComputedStyle(document.documentElement) + .getPropertyValue(colorVariable) + .trim() + if (colorValue) { + return opacity ? hexToRGB(colorValue, opacity) : colorValue + } + return '' +} diff --git a/src/utils/constants.ts b/src/utils/constants.ts new file mode 100644 index 0000000..7ee1b8d --- /dev/null +++ b/src/utils/constants.ts @@ -0,0 +1,166 @@ +/** + * + * 枚举类 + */ + +// ========== COMMON 模块 ========== +// 全局通用状态枚举 +export const CommonStatusEnum = { + ENABLE: 0, // 开启 + DISABLE: 1 // 禁用 +} + +// 系统用户任职状态 +export const SystemUserEmploymentStatusEnum = { + ACTIVE: 0, // 在职 + LEFT: 1 // 离职 +} + +// 组织与人员数据来源 +export const OrgDataSourceEnum = { + EHR: 1, // 人事 + SELF_BUILT: 2 // 自建 +} + +export const orgDataSourceOptions = [ + { label: '人事', value: OrgDataSourceEnum.EHR }, + { label: '自建', value: OrgDataSourceEnum.SELF_BUILT } +] + +// 系统用户账号状态 +export const SystemUserAccountStatusEnum = { + NORMAL: 0, // 正常 + DISABLED: 1, // 停用 + LOCKED: 2 // 锁定 +} + +// 全局用户类型枚举 +export const UserTypeEnum = { + MEMBER: 1, // 会员 + ADMIN: 2 // 管理员 +} + +// ========== SYSTEM 模块 ========== +/** + * 菜单的类型枚举 + */ +export const SystemMenuTypeEnum = { + DIR: 1, // 目录 + MENU: 2, // 菜单 + BUTTON: 3 // 按钮 +} + +/** + * 角色的类型枚举 + */ +export const SystemRoleTypeEnum = { + SYSTEM: 1, // 内置角色 + CUSTOM: 2 // 自定义角色 +} + +/** 超级管理员角色编码:拥有全部功能和全部数据权限,不分配菜单和数据权限 */ +export const SUPER_ADMIN_ROLE_CODE = 'super_admin' + +/** + * 数据权限的范围枚举 + */ +export const SystemDataScopeEnum = { + ALL: 1, // 全部数据权限 + DEPT_CUSTOM: 2, // 指定部门数据权限 + DEPT_ONLY: 3, // 部门数据权限 + DEPT_AND_CHILD: 4, // 部门及以下数据权限 + DEPT_SELF: 5, // 仅本人数据权限 + MANAGED_DEPT: 6 // 已废弃,仅用于识别历史分管组织数据权限,禁止新增分配 +} + +/** + * 用户的社交平台的类型枚举 + */ +export const SystemUserSocialTypeEnum = { + DINGTALK: { + title: '钉钉', + type: 20, + source: 'dingtalk', + img: 'https://s1.ax1x.com/2022/05/22/OzMDRs.png' + }, + WECHAT_ENTERPRISE: { + title: '企业微信', + type: 30, + source: 'wechat_enterprise', + img: 'https://s1.ax1x.com/2022/05/22/OzMrzn.png' + } +} + +// ========== INFRA 模块 ========== +/** + * 代码生成模板类型 + */ +export const InfraCodegenTemplateTypeEnum = { + CRUD: 1, // 基础 CRUD + TREE: 2, // 树形 CRUD + SUB: 15 // 主子表 CRUD +} + +/** + * 任务状态的枚举 + */ +export const InfraJobStatusEnum = { + INIT: 0, // 初始化中 + NORMAL: 1, // 运行中 + STOP: 2 // 暂停运行 +} + +/** + * API 异常数据的处理状态 + */ +export const InfraApiErrorLogProcessStatusEnum = { + INIT: 0, // 未处理 + DONE: 1, // 已处理 + IGNORE: 2 // 已忽略 +} + +// ========== BPM 模块 ========== + +export const BpmModelType = { + BPMN: 10, // BPMN 设计器 + SIMPLE: 20 // 简易设计器 +} + +export const BpmModelFormType = { + NORMAL: 10, // 流程表单 + CUSTOM: 20 // 业务表单 +} + +export const BpmProcessInstanceStatus = { + NOT_START: -1, // 未开始 + RUNNING: 1, // 审批中 + APPROVE: 2, // 审批通过 + REJECT: 3, // 审批不通过 + CANCEL: 4 // 已取消 +} + +/** + * 审批节点按钮配置中,设计器内置枚举(OperationButtonType)之外由财开云扩展的按钮类型。 + * 数值与后端节点按钮配置保持一致,如后端调整只需改这里。 + */ +export const BpmOperationButtonExtType = { + FORWARD_JUMP: 8 // 向后跳转;节点没有该配置项时视为启用(兼容存量模型) +} + +export const BpmAutoApproveType = { + NONE: 0, // 不自动通过 + APPROVE_ALL: 1, // 仅审批一次,后续重复的审批节点均自动通过 + APPROVE_SEQUENT: 2 // 仅针对连续审批的节点自动通过 +} + +// ========== 门户消息 ========== + +/** 门户统一消息的工作项 / 消息类型(取值与后端枚举一致) */ +export const PortalMessageTypeEnum = { + /** 待办 */ + PENDING: 'TODO', + CC: 'CC', + WARNING: 'WARNING', + NOTICE: 'NOTICE', + BUSINESS: 'BUSINESS' +} as const diff --git a/src/utils/dateUtil.ts b/src/utils/dateUtil.ts new file mode 100644 index 0000000..ec0c7e8 --- /dev/null +++ b/src/utils/dateUtil.ts @@ -0,0 +1,6 @@ +/** + * 锁屏页(useNow)使用的日期工具,统一走 dayjs + */ +import dayjs from 'dayjs' + +export const dateUtil = dayjs diff --git a/src/utils/dict.ts b/src/utils/dict.ts new file mode 100644 index 0000000..5c98a49 --- /dev/null +++ b/src/utils/dict.ts @@ -0,0 +1,158 @@ +/** + * 数据字典工具类 + */ +import { useDictStoreWithOut } from '@/store/modules/dict' +import { ElementPlusInfoType } from '@/types/elementPlus' + +const dictStore = useDictStoreWithOut() + +/** + * 获取 dictType 对应的数据字典数组 + * + * @param dictType 数据类型 + * @returns {*|Array} 数据字典数组 + */ +export interface DictDataType { + dictType: string + label: string + value: string | number | boolean + colorType: ElementPlusInfoType | '' + cssClass: string +} + +export interface NumberDictDataType extends DictDataType { + value: number +} + +export interface StringDictDataType extends DictDataType { + value: string +} + +/** 可与字典值比较的原始值(比较时统一转为字符串) */ +export type DictValue = string | number | boolean | null | undefined + +export const getDictOptions = (dictType: string) => { + return dictStore.getDictByType(dictType) || [] +} + +export const getIntDictOptions = (dictType: string): NumberDictDataType[] => { + // 获得通用的 DictDataType 列表 + const dictOptions: DictDataType[] = getDictOptions(dictType) + // 转换成 number 类型的 NumberDictDataType 类型 + // why 需要特殊转换:避免 IDEA 在 v-for="dict in getIntDictOptions(...)" 时,el-option 的 key 会告警 + const dictOption: NumberDictDataType[] = [] + dictOptions.forEach((dict: DictDataType) => { + dictOption.push({ + ...dict, + value: parseInt(dict.value + '') + }) + }) + return dictOption +} + +export const getStrDictOptions = (dictType: string) => { + // 获得通用的 DictDataType 列表 + const dictOptions: DictDataType[] = getDictOptions(dictType) + // 转换成 string 类型的 StringDictDataType 类型 + // why 需要特殊转换:避免 IDEA 在 v-for="dict in getStrDictOptions(...)" 时,el-option 的 key 会告警 + const dictOption: StringDictDataType[] = [] + dictOptions.forEach((dict: DictDataType) => { + dictOption.push({ + ...dict, + value: dict.value + '' + }) + }) + return dictOption +} + +export const getBoolDictOptions = (dictType: string) => { + const dictOption: DictDataType[] = [] + const dictOptions: DictDataType[] = getDictOptions(dictType) + dictOptions.forEach((dict: DictDataType) => { + dictOption.push({ + ...dict, + value: dict.value + '' === 'true' + }) + }) + return dictOption +} + +/** + * 获取指定字典类型的指定值对应的字典对象 + * @param dictType 字典类型 + * @param value 字典值 + * @return DictDataType 字典对象 + */ +export const getDictObj = (dictType: string, value: DictValue): DictDataType | undefined => { + const dictOptions: DictDataType[] = getDictOptions(dictType) + for (const dict of dictOptions) { + if (dict.value === value + '') { + return dict + } + } +} + +/** + * 获得字典数据的文本展示 + * + * @param dictType 字典类型 + * @param value 字典数据的值 + * @return 字典名称 + */ +export const getDictLabel = (dictType: string, value: DictValue): string => { + const dictOptions: DictDataType[] = getDictOptions(dictType) + const dictLabel = ref('') + dictOptions.forEach((dict: DictDataType) => { + if (dict.value === value + '') { + dictLabel.value = dict.label + } + }) + return dictLabel.value +} + +export enum DICT_TYPE { + USER_TYPE = 'user_type', + COMMON_STATUS = 'common_status', + TERMINAL = 'terminal', // 终端 + DATE_INTERVAL = 'date_interval', // 数据间隔 + + // ========== SYSTEM 模块 ========== + SYSTEM_USER_SEX = 'system_user_sex', + SYSTEM_MENU_TYPE = 'system_menu_type', + SYSTEM_ROLE_TYPE = 'system_role_type', + SYSTEM_DATA_SCOPE = 'system_data_scope', + SYSTEM_NOTICE_TYPE = 'system_notice_type', + SYSTEM_LOGIN_TYPE = 'system_login_type', + SYSTEM_LOGIN_RESULT = 'system_login_result', + SYSTEM_SMS_CHANNEL_CODE = 'system_sms_channel_code', + SYSTEM_SMS_TEMPLATE_TYPE = 'system_sms_template_type', + SYSTEM_SMS_SEND_STATUS = 'system_sms_send_status', + SYSTEM_SMS_RECEIVE_STATUS = 'system_sms_receive_status', + SYSTEM_OAUTH2_GRANT_TYPE = 'system_oauth2_grant_type', + SYSTEM_MAIL_SEND_STATUS = 'system_mail_send_status', + SYSTEM_NOTIFY_TEMPLATE_TYPE = 'system_notify_template_type', + SYSTEM_SOCIAL_TYPE = 'system_social_type', + SYSTEM_PARAM_TYPE = 'system_param_type', // 参数类型 + + // ========== INFRA 模块 ========== + INFRA_BOOLEAN_STRING = 'infra_boolean_string', + INFRA_JOB_STATUS = 'infra_job_status', + INFRA_JOB_LOG_STATUS = 'infra_job_log_status', + INFRA_API_ERROR_LOG_PROCESS_STATUS = 'infra_api_error_log_process_status', + INFRA_CONFIG_TYPE = 'infra_config_type', + INFRA_CODEGEN_TEMPLATE_TYPE = 'infra_codegen_template_type', + INFRA_CODEGEN_FRONT_TYPE = 'infra_codegen_front_type', + INFRA_CODEGEN_SCENE = 'infra_codegen_scene', + INFRA_FILE_STORAGE = 'infra_file_storage', + INFRA_OPERATE_TYPE = 'infra_operate_type', + + // ========== BPM 模块 ========== + BPM_MODEL_TYPE = 'bpm_model_type', + BPM_MODEL_FORM_TYPE = 'bpm_model_form_type', + BPM_TASK_CANDIDATE_STRATEGY = 'bpm_task_candidate_strategy', + BPM_PROCESS_INSTANCE_STATUS = 'bpm_process_instance_status', + BPM_TASK_STATUS = 'bpm_task_status', + BPM_OA_LEAVE_TYPE = 'bpm_oa_leave_type', + BPM_PROCESS_LISTENER_TYPE = 'bpm_process_listener_type', + BPM_PROCESS_LISTENER_VALUE_TYPE = 'bpm_process_listener_value_type' +} diff --git a/src/utils/download.ts b/src/utils/download.ts new file mode 100644 index 0000000..e7951e1 --- /dev/null +++ b/src/utils/download.ts @@ -0,0 +1,100 @@ +const download0 = (data: Blob, fileName: string, mineType: string) => { + // 创建 blob + const blob = new Blob([data], { type: mineType }) + // 创建 href 超链接,点击进行下载 + window.URL = window.URL || window.webkitURL + const href = URL.createObjectURL(blob) + const downA = document.createElement('a') + downA.href = href + downA.download = fileName + downA.click() + // 销毁超连接 + window.URL.revokeObjectURL(href) +} + +const download = { + // 下载 Excel 方法 + excel: (data: Blob, fileName: string) => { + download0(data, fileName, 'application/vnd.ms-excel') + }, + // 下载 Word 方法 + word: (data: Blob, fileName: string) => { + download0(data, fileName, 'application/msword') + }, + // 下载 Zip 方法 + zip: (data: Blob, fileName: string) => { + download0(data, fileName, 'application/zip') + }, + // 下载 Html 方法 + html: (data: Blob, fileName: string) => { + download0(data, fileName, 'text/html') + }, + // 下载 Markdown 方法 + markdown: (data: Blob, fileName: string) => { + download0(data, fileName, 'text/markdown') + }, + // 下载 Json 方法 + json: (data: Blob, fileName: string) => { + download0(data, fileName, 'application/json') + }, + // 下载图片(允许跨域) + image: ({ + url, + canvasWidth, + canvasHeight, + drawWithImageSize = true + }: { + url: string + canvasWidth?: number // 指定画布宽度 + canvasHeight?: number // 指定画布高度 + drawWithImageSize?: boolean // 将图片绘制在画布上时带上图片的宽高值, 默认是要带上的 + }) => { + const image = new Image() + // image.setAttribute('crossOrigin', 'anonymous') + image.src = url + image.onload = () => { + const canvas = document.createElement('canvas') + canvas.width = canvasWidth || image.width + canvas.height = canvasHeight || image.height + const ctx = canvas.getContext('2d') as CanvasRenderingContext2D + ctx?.clearRect(0, 0, canvas.width, canvas.height) + if (drawWithImageSize) { + ctx.drawImage(image, 0, 0, image.width, image.height) + } else { + ctx.drawImage(image, 0, 0) + } + const url = canvas.toDataURL('image/png') + const a = document.createElement('a') + a.href = url + a.download = 'image.png' + a.click() + } + }, + base64ToFile: (base64: string, fileName: string) => { + // 将base64按照 , 进行分割 将前缀 与后续内容分隔开 + const data = base64.split(',') + // 利用正则表达式 从前缀中获取图片的类型信息(image/png、image/jpeg、image/webp等) + const type = (data[0].match(/:(.*?);/) as RegExpMatchArray)[1] + // 从图片的类型信息中 获取具体的文件格式后缀(png、jpeg、webp) + const suffix = type.split('/')[1] + // 使用atob()对base64数据进行解码 结果是一个文件数据流 以字符串的格式输出 + const bstr = window.atob(data[1]) + // 获取解码结果字符串的长度 + let n = bstr.length + // 根据解码结果字符串的长度创建一个等长的整形数字数组 + // 但在创建时 所有元素初始值都为 0 + const u8arr = new Uint8Array(n) + // 将整形数组的每个元素填充为解码结果字符串对应位置字符的UTF-16 编码单元 + while (n--) { + // charCodeAt():获取给定索引处字符对应的 UTF-16 代码单元 + u8arr[n] = bstr.charCodeAt(n) + } + + // 将File文件对象返回给方法的调用者 + return new File([u8arr], `${fileName}.${suffix}`, { + type: type + }) + } +} + +export default download diff --git a/src/utils/filt.ts b/src/utils/filt.ts new file mode 100644 index 0000000..63f3df5 --- /dev/null +++ b/src/utils/filt.ts @@ -0,0 +1,17 @@ + +/** + * @description: base64 to blob + */ +export const dataURLtoBlob = (base64Buf: string): Blob => { + const arr = base64Buf.split(',') + const typeItem = arr[0] + const mime = typeItem.match(/:(.*?);/)![1] + const bstr = window.atob(arr[1]) + let n = bstr.length + const u8arr = new Uint8Array(n) + while (n--) { + u8arr[n] = bstr.charCodeAt(n) + } + return new Blob([u8arr], { type: mime }) +} + diff --git a/src/utils/formCreate.ts b/src/utils/formCreate.ts new file mode 100644 index 0000000..d5fa41d --- /dev/null +++ b/src/utils/formCreate.ts @@ -0,0 +1,83 @@ +/** + * 针对 https://github.com/xaboy/form-create-designer 封装的工具类 + */ +import { isRef, type Ref } from 'vue' +import formCreate from '@form-create/element-ui' + +/** form-create 的规则 / 配置对象(结构由 form-create 定义,这里只做透传) */ +export type FormCreateObject = Record + +/** FcDesigner 组件实例中本工具用到的方法 */ +export interface FormDesignerInstance { + getOption: () => FormCreateObject + getRule: () => FormCreateObject[] + setOption: (option: FormCreateObject) => void + setRule: (rule: FormCreateObject[]) => void +} + +/** form-create 渲染所需的数据:option 表单配置、rule 字段规则、value 表单值 */ +export interface FormCreatePreview { + option?: FormCreateObject + rule?: FormCreateObject[] + value?: object +} + +// form-create 的 toJson / parseJson 类型只声明了规则数组,实际也用于序列化表单配置对象 +const toJson = formCreate.toJson as unknown as (value: object) => string +const parseJson = formCreate.parseJson as unknown as (json: string) => FormCreateObject + +const unwrapDesigner = (designerRef: Ref) => { + const designer = designerRef.value + if (!designer) { + throw new Error('表单设计器尚未初始化') + } + return designer +} + +/** 编码表单 Conf */ +export const encodeConf = (designerRef: Ref): string => { + return toJson(unwrapDesigner(designerRef).getOption()) +} + +/** 解码表单 Conf */ +export const decodeConf = (conf: string): FormCreateObject => { + return parseJson(conf) +} + +/** 编码表单 Fields */ +export const encodeFields = (designerRef: Ref): string[] => { + return unwrapDesigner(designerRef) + .getRule() + .map((item) => toJson(item)) +} + +/** 解码表单 Fields */ +export const decodeFields = (fields: string[]): FormCreateObject[] => { + return fields.map((item) => parseJson(item)) +} + +/** 设置表单的 Conf 和 Fields,适用 FcDesigner 场景 */ +export const setConfAndFields = ( + designerRef: Ref, + conf: string, + fields: string[] +) => { + const designer = unwrapDesigner(designerRef) + designer.setOption(decodeConf(conf)) + designer.setRule(decodeFields(fields)) +} + +/** 设置表单的 Conf 和 Fields,适用 form-create 场景 */ +export const setConfAndFields2 = ( + detailPreview: FormCreatePreview | Ref, + conf: string, + fields: string[], + value?: object +) => { + const target = isRef(detailPreview) ? detailPreview.value : detailPreview + target.option = decodeConf(conf) + target.rule = decodeFields(fields) + if (value) { + target.value = value + } +} diff --git a/src/utils/formRules.ts b/src/utils/formRules.ts new file mode 100644 index 0000000..2989867 --- /dev/null +++ b/src/utils/formRules.ts @@ -0,0 +1,7 @@ +const { t } = useI18n() + +// 必填项 +export const required = { + required: true, + message: t('common.required') +} diff --git a/src/utils/formatTime.ts b/src/utils/formatTime.ts new file mode 100644 index 0000000..6a921f9 --- /dev/null +++ b/src/utils/formatTime.ts @@ -0,0 +1,60 @@ +import dayjs from 'dayjs' + +/** + * 时间日期转换 + * @param date 当前时间,new Date() 格式 + * @param format 需要转换的时间格式字符串 + * @description format 字符串随意,如 `YYYY-MM、YYYY-MM-DD` + * @description format 季度:"YYYY-MM-DD HH:mm:ss QQQQ" + * @description format 星期:"YYYY-MM-DD HH:mm:ss WWW" + * @description format 几周:"YYYY-MM-DD HH:mm:ss ZZZ" + * @description format 季度 + 星期 + 几周:"YYYY-MM-DD HH:mm:ss WWW QQQQ ZZZ" + * @returns 返回拼接后的时间字符串 + */ +export function formatDate(date: dayjs.ConfigType, format?: string): string { + // 日期不存在,则返回空 + if (!date) { + return '' + } + // 日期存在,则进行格式化 + return date ? dayjs(date).format(format ?? 'YYYY-MM-DD HH:mm:ss') : '' +} + +/** + * 将毫秒,转换成时间字符串。例如说,xx 分钟 + * + * @param ms 毫秒 + * @returns {string} 字符串 + */ +export function formatPast2(ms: number): string { + const day = Math.floor(ms / (24 * 60 * 60 * 1000)) + const hour = Math.floor(ms / (60 * 60 * 1000) - day * 24) + const minute = Math.floor(ms / (60 * 1000) - day * 24 * 60 - hour * 60) + const second = Math.floor(ms / 1000 - day * 24 * 60 * 60 - hour * 60 * 60 - minute * 60) + if (day > 0) { + return day + ' 天' + hour + ' 小时 ' + minute + ' 分钟' + } + if (hour > 0) { + return hour + ' 小时 ' + minute + ' 分钟' + } + if (minute > 0) { + return minute + ' 分钟' + } + if (second > 0) { + return second + ' 秒' + } else { + return 0 + ' 秒' + } +} + +/** + * element plus 的时间 Formatter 实现,使用 YYYY-MM-DD HH:mm:ss 格式 + * + * @param row 行数据 + * @param column 字段 + * @param cellValue 字段值 + */ +export function dateFormatter(_row: unknown, _column: unknown, cellValue: unknown): string { + return cellValue ? formatDate(cellValue as dayjs.ConfigType) : '' +} + diff --git a/src/utils/index.ts b/src/utils/index.ts new file mode 100644 index 0000000..2132cf9 --- /dev/null +++ b/src/utils/index.ts @@ -0,0 +1,155 @@ +/** + * @param str 需要转下划线的驼峰字符串 + * @returns 字符串下划线 + */ +export const humpToUnderline = (str: string): string => { + return str.replace(/([A-Z])/g, '-$1').toLowerCase() +} + +export const setCssVar = (prop: string, val: string, dom = document.documentElement) => { + dom.style.setProperty(prop, val) +} + +/** + * 查找数组对象的某个下标 + * @param {Array} ary 查找的数组 + * @param {Functon} fn 判断的方法 + */ +// eslint-disable-next-line +export const findIndex = (ary: Array, fn: Fn): number => { + if (ary.findIndex) { + return ary.findIndex(fn) + } + let index = -1 + ary.some((item: T, i: number, ary: Array) => { + const ret: T = fn(item, i, ary) + if (ret) { + index = i + return ret + } + }) + return index +} + +export const trim = (str: string) => { + return str.replace(/(^\s*)|(\s*$)/g, '') +} + +/** + * @param {Date | number | string} time 需要转换的时间 + * @param {String} fmt 需要转换的格式 如 yyyy-MM-dd、yyyy-MM-dd HH:mm:ss + */ +export function formatTime(time: Date | number | string, fmt: string) { + if (!time) return '' + else { + const date = new Date(time) + const o: Record = { + 'M+': date.getMonth() + 1, + 'd+': date.getDate(), + 'H+': date.getHours(), + 'm+': date.getMinutes(), + 's+': date.getSeconds(), + 'q+': Math.floor((date.getMonth() + 3) / 3), + S: date.getMilliseconds() + } + if (/(y+)/.test(fmt)) { + fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length)) + } + for (const k in o) { + if (new RegExp('(' + k + ')').test(fmt)) { + fmt = fmt.replace( + RegExp.$1, + RegExp.$1.length === 1 ? String(o[k]) : ('00' + o[k]).substr(('' + o[k]).length) + ) + } + } + return fmt + } +} + +export const generateUUID = () => { + if (typeof crypto === 'object') { + if (typeof crypto.randomUUID === 'function') { + return crypto.randomUUID() + } + if (typeof crypto.getRandomValues === 'function' && typeof Uint8Array === 'function') { + const callback = (c: string) => { + const num = Number(c) + return (num ^ (crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (num / 4)))).toString( + 16 + ) + } + return '10000000-1000-4000-8000-100000000000'.replace(/[018]/g, callback) + } + } + let timestamp = new Date().getTime() + let performanceNow = + (typeof performance !== 'undefined' && performance.now && performance.now() * 1000) || 0 + return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => { + let random = Math.random() * 16 + if (timestamp > 0) { + random = (timestamp + random) % 16 | 0 + timestamp = Math.floor(timestamp / 16) + } else { + random = (performanceNow + random) % 16 | 0 + performanceNow = Math.floor(performanceNow / 16) + } + return (c === 'x' ? random : (random & 0x3) | 0x8).toString(16) + }) +} + +/** + * element plus 的文件大小 Formatter 实现 + * + * @param row 行数据 + * @param column 字段 + * @param cellValue 字段值 + */ +export const fileSizeFormatter = (_row: unknown, _column: unknown, cellValue: unknown) => { + const fileSize = cellValue + const unitArr = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'] + const srcSize = parseFloat(String(fileSize)) + const index = Math.floor(Math.log(srcSize) / Math.log(1024)) + const size = srcSize / Math.pow(1024, index) + const sizeStr = size.toFixed(2) //保留的小数位数 + return sizeStr + ' ' + unitArr[index] +} + +/** + * 获取链接的参数值 + * @param key 参数键名 + * @param urlStr 链接地址,默认为当前浏览器的地址 + */ +export const getUrlValue = (key: string, urlStr: string = location.href): string => { + if (!urlStr || !key) return '' + const url = new URL(decodeURIComponent(urlStr)) + return url.searchParams.get(key) ?? '' +} + +/** + * 解析 JSON 字符串 + * + * @param str + */ +export function jsonParse(str: string) { + try { + return JSON.parse(str) + } catch (e) { + console.warn(`str[${str}] 不是一个 JSON 字符串`) + return str + } +} + +/** + * 截取字符串 + * + * @param str 字符串 + * @param start 开始位置 + * @param end 结束位置 + */ +export const subString = (str: string, start: number, end: number) => { + if (str.length > end) { + return str.slice(start, end) + } + return str +} diff --git a/src/utils/is.ts b/src/utils/is.ts new file mode 100644 index 0000000..187680d --- /dev/null +++ b/src/utils/is.ts @@ -0,0 +1,78 @@ +// copy to vben-admin + +const toString = Object.prototype.toString + +export const is = (val: unknown, type: string) => { + return toString.call(val) === `[object ${type}]` +} + +export const isDef = (val?: T): val is T => { + return typeof val !== 'undefined' +} + +export const isUnDef = (val?: T): val is T => { + return !isDef(val) +} + +export const isObject = (val: unknown): val is Record => { + return val !== null && is(val, 'Object') +} + +export const isEmpty = (val: unknown): boolean => { + if (val === null || val === undefined || typeof val === 'undefined') { + return true + } + if (isArray(val) || isString(val)) { + return val.length === 0 + } + + if (val instanceof Map || val instanceof Set) { + return val.size === 0 + } + + if (isObject(val)) { + return Object.keys(val).length === 0 + } + + return false +} + +export const isNull = (val: unknown): val is null => { + return val === null +} + +export const isNumber = (val: unknown): val is number => { + return is(val, 'Number') +} + +export const isString = (val: unknown): val is string => { + return is(val, 'String') +} + +export const isFunction = (val: unknown): val is Function => { + return typeof val === 'function' +} + +export const isBoolean = (val: unknown): val is boolean => { + return is(val, 'Boolean') +} + +export const isArray = (val: unknown): val is unknown[] => { + return Array.isArray(val) +} + +export const isServer = typeof window === 'undefined' + +export const isClient = !isServer + +export const isUrl = (path: string): boolean => { + // fix:修复hash路由无法跳转的问题 + const reg = + /(((^https?:(?:\/\/)?)(?:[-:&=\+\$,\w]+@)?[A-Za-z0-9.-]+(?::\d+)?|(?:www.|[-:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%#\/.\w-_]*)?\??(?:[-\+=&%@.\w_]*)#?(?:[\w]*))?)$/ + return reg.test(path) +} + +export const isDark = (): boolean => { + return window.matchMedia('(prefers-color-scheme: dark)').matches +} + diff --git a/src/utils/menuPermission.ts b/src/utils/menuPermission.ts new file mode 100644 index 0000000..54ba269 --- /dev/null +++ b/src/utils/menuPermission.ts @@ -0,0 +1,35 @@ +/** 菜单数据权限标识,与后端菜单配置的 permission 保持一致。 */ +export enum MenuPermission { + /** 组织架构。 */ + ORGANIZATION = 'CD_ORG', + /** 岗位管理。 */ + POST = 'CD_POST', + /** 用户列表。 */ + USER_LIST = 'CD_USER_LIST', + /** 副岗管理。 */ + USER_DEPUTY = 'CD_USER_DEPUTY', + /** 兼职管理。 */ + USER_PART = 'CD_USER_PART', + /** 应用注册,使用 permission 而非 menuCode 字段。 */ + APPLICATION_REGISTER = 'APP_REGISTER', + /** 菜单管理。 */ + APPLICATION_MENU = 'CD_APP_MENU', + /** 角色管理。 */ + APPLICATION_ROLE = 'CD_APP_ROLE', + /** 标签管理。 */ + APPLICATION_TAG = 'CD_APP_TAG', + /** 自建表登记管理。 */ + APPLICATION_LEDGER_REGISTRY = 'CD_APP_LEDGER_REGISTRY', + /** 应用授权。 */ + APPLICATION_GRANT = 'SYSTEM_APPLICATION_GRANT', + /** 信息发布。 */ + INFO_PUBLISH = 'system:infopublish:list', + /** 在线用户。 */ + ONLINE_USER = 'system:online:list', + /** 登录日志,保留已有菜单编码拼写。 */ + LOGIN_LOG = 'CD_SYSTEM_LOAGIN_LOG', + /** 操作日志。 */ + OPERATE_LOG = 'CD_SYSTEM_OPERATE', + /** 权限变更日志。 */ + PERMISSION_LOG = 'CD_SYSTEM_PERMISSION_LOG' +} diff --git a/src/utils/parameterValue.ts b/src/utils/parameterValue.ts new file mode 100644 index 0000000..927e817 --- /dev/null +++ b/src/utils/parameterValue.ts @@ -0,0 +1,25 @@ +export type ParameterType = 'string' | 'number' | 'boolean' | 'json' +export interface ParameterValidation { valid: boolean; message?: string } + +/** 验证声明类型,避免空白、无穷大等值被 Number 隐式转换后接受。 */ +export function validateParameterValue(value: string, type: ParameterType): ParameterValidation { + if (type === 'number' && (!value.trim() || !Number.isFinite(Number(value)))) { + return { valid: false, message: '请输入合法的有限数字' } + } + if (type === 'boolean' && value !== 'true' && value !== 'false') { + return { valid: false, message: '请选择「是」或「否」' } + } + if (type === 'json') { + try { JSON.parse(value) } catch { return { valid: false, message: '请输入合法的 JSON' } } + } + return { valid: true } +} + +export function parseParameterValue(value: string, type: ParameterType): unknown { + const validation = validateParameterValue(value, type) + if (!validation.valid) throw new Error(validation.message) + if (type === 'number') return Number(value) + if (type === 'boolean') return value === 'true' + if (type === 'json') return JSON.parse(value) as unknown + return value +} diff --git a/src/utils/permission.ts b/src/utils/permission.ts new file mode 100644 index 0000000..4138173 --- /dev/null +++ b/src/utils/permission.ts @@ -0,0 +1,36 @@ +import { CACHE_KEY, useCache } from '@/hooks/web/useCache' +import {hasPermission} from "@/directives/permission/hasPermi"; + + +const { t } = useI18n() // 国际化 + +/** + * 字符权限校验 + * @param {Array} value 校验值 + * @returns {Boolean} + */ +export function checkPermi(permission: string[]) { + return hasPermission(permission) +} + +/** + * 角色权限校验 + * @param {string[]} value 校验值 + * @returns {Boolean} + */ +export function checkRole(value: string[]) { + if (value && value instanceof Array && value.length > 0) { + const { wsCache } = useCache() + const permissionRoles = value + const super_admin = 'super_admin' + const userInfo = wsCache.get(CACHE_KEY.USER) + const roles = userInfo?.roles || [] + const hasRole = roles.some((role: string) => { + return super_admin === role || permissionRoles.includes(role) + }) + return !!hasRole + } else { + console.error(t('permission.hasRole')) + return false + } +} diff --git a/src/utils/propTypes.ts b/src/utils/propTypes.ts new file mode 100644 index 0000000..863f55c --- /dev/null +++ b/src/utils/propTypes.ts @@ -0,0 +1,24 @@ +import { VueTypeValidableDef, VueTypesInterface, createTypes, toValidableType } from 'vue-types' +import { CSSProperties } from 'vue' + +type PropTypes = VueTypesInterface & { + readonly style: VueTypeValidableDef +} +const newPropTypes = createTypes({ + func: undefined, + bool: undefined, + string: undefined, + number: undefined, + object: undefined, + integer: undefined +}) as PropTypes + +class propTypes extends newPropTypes { + static get style() { + return toValidableType('style', { + type: [String, Object] + }) + } +} + +export { propTypes } diff --git a/src/utils/routerHelper.ts b/src/utils/routerHelper.ts new file mode 100644 index 0000000..dbba383 --- /dev/null +++ b/src/utils/routerHelper.ts @@ -0,0 +1,269 @@ +import type { RouteLocationNormalized, RouteMeta, Router, RouteRecordNormalized } from 'vue-router' +import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router' +import { isUrl } from '@/utils/is' +import { cloneDeep, omit } from 'lodash-es' +import qs from 'qs' +import type { Component } from 'vue' + +const modules = import.meta.glob('../views/**/*.{vue,tsx}') +/** + * 注册一个异步组件 + * @param componentPath 例:/bpm/oa/leave/detail + */ +export const registerComponent = (componentPath: string) => { + for (const item in modules) { + if (item.includes(componentPath)) { + // 使用异步组件的方式来动态加载组件 + return defineAsyncComponent(modules[item] as () => Promise) + } + } +} +/* Layout */ +export const Layout = () => import('@/layout/Layout.vue') + +// 按照路由中meta下的rank等级升序来排序路由 +interface RankedRoute { + name?: unknown + path?: string + meta?: { rank?: number | null } +} + +export const ascending = (arr: T[]) => { + arr.forEach((v) => { + if (v?.meta?.rank === null) v.meta.rank = undefined + if (v?.meta?.rank === 0) { + if (v.name !== 'home' && v.path !== '/') { + console.warn('rank only the home page can be 0') + } + } + }) + return arr.sort((a, b) => { + return (a?.meta?.rank as number) - (b?.meta?.rank as number) + }) +} + +export const getRawRoute = (route: RouteLocationNormalized): RouteLocationNormalized => { + if (!route) return route + const { matched, ...opt } = route + return { + ...opt, + matched: (matched + ? matched.map((item) => ({ + meta: item.meta, + name: item.name, + path: item.path + })) + : undefined) as RouteRecordNormalized[] + } +} + +// 后端控制路由生成 +export const generateRoute = (routes: AppCustomRouteRecordRaw[]): AppRouteRecordRaw[] => { + const res: AppRouteRecordRaw[] = [] + const modulesRoutesKeys = Object.keys(modules) + for (const route of routes) { + // 1. 生成 meta 菜单元数据 + const meta = { + title: route.name, + icon: route.icon, + hidden: !route.visible, + noCache: !route.keepAlive, + alwaysShow: + route.children && + route.children.length > 0 && + (route.alwaysShow !== undefined ? route.alwaysShow : true) + } as RouteMeta + // 特殊逻辑:如果后端配置的 MenuDO.component 包含 ?,则表示需要传递参数 + // 此时,我们需要解析参数,并且将参数放到 meta.query 中 + // 这样,后续在 Vue 文件中,可以通过 const { currentRoute } = useRouter() 中,通过 meta.query 获取到参数 + if (route.component && route.component.indexOf('?') > -1) { + const query = route.component.split('?')[1] + route.component = route.component.split('?')[0] + meta.query = qs.parse(query) + } + + // 2. 生成 data(AppRouteRecordRaw) + // 路由地址转首字母大写驼峰,作为路由名称,适配keepAlive + let data: AppRouteRecordRaw = { + path: + route.path.indexOf('?') > -1 && !isUrl(route.path) ? route.path.split('?')[0] : route.path, // 注意,需要排除 http 这种 url,避免它带 ? 参数被截取掉 + name: + route.componentName && route.componentName.length > 0 + ? route.componentName + : toCamelCase(route.path, true), + redirect: route.redirect, + meta: meta + } + //处理顶级非目录路由 + if (!route.children && route.parentId == 0 && route.component) { + data.component = Layout + data.meta = { + hidden: meta.hidden + } + data.name = toCamelCase(route.path, true) + 'Parent' + data.redirect = '' + meta.alwaysShow = true + const childrenData: AppRouteRecordRaw = { + path: '', + name: + route.componentName && route.componentName.length > 0 + ? route.componentName + : toCamelCase(route.path, true), + redirect: route.redirect, + meta: meta + } + const index = route?.component + ? modulesRoutesKeys.findIndex((ev) => ev.includes(route.component)) + : modulesRoutesKeys.findIndex((ev) => ev.includes(route.path)) + childrenData.component = modules[modulesRoutesKeys[index]] + data.children = [childrenData] + } else { + // 目录 + if (route.children?.length) { + data.component = Layout + data.redirect = getRedirect(route.path, route.children) + // 外链 + } else if (isUrl(route.path)) { + data = { + path: '/external-link', + component: Layout, + meta: { + name: route.name + }, + children: [data] + } as AppRouteRecordRaw + // 菜单 + } else { + // 对后端传component组件路径和不传做兼容(如果后端传component组件路径,那么path可以随便写,如果不传,component组件路径会根path保持一致) + const index = route?.component + ? modulesRoutesKeys.findIndex((ev) => ev.includes(route.component)) + : modulesRoutesKeys.findIndex((ev) => ev.includes(route.path)) + data.component = modules[modulesRoutesKeys[index]] + } + if (route.children) { + data.children = generateRoute(route.children) + } + } + res.push(data as AppRouteRecordRaw) + } + return res +} +export const getRedirect = (parentPath: string, children: AppCustomRouteRecordRaw[]) => { + if (!children || children.length == 0) { + return parentPath + } + const path = generateRoutePath(parentPath, children[0].path) + // 递归子节点 + if (children[0].children) return getRedirect(path, children[0].children) +} +const generateRoutePath = (parentPath: string, path: string) => { + if (parentPath.endsWith('/')) { + parentPath = parentPath.slice(0, -1) // 移除默认的 / + } + if (!path.startsWith('/')) { + path = '/' + path + } + return parentPath + path +} +export const pathResolve = (parentPath: string, path: string) => { + if (isUrl(path)) return path + if (!path) return parentPath // 修复 path 为空时返回 parentPath,避免拼接出错 https://t.zsxq.com/QVr6b + if (path.startsWith('/')) return path + const childPath = `/${path}` + return `${parentPath}${childPath}`.replace(/\/+/g, '/') +} + +export const getFirstVisibleRoutePath = ( + routes: AppRouteRecordRaw[], + parentPath = '/' +): string | undefined => { + for (const route of routes) { + if (route.meta?.hidden) continue + const path = pathResolve(parentPath, route.path) + const childPath = getFirstVisibleRoutePath(route.children || [], path) + if (childPath) return childPath + if (!route.children?.length) return path + } + return undefined +} + +// 路由降级 +export const flatMultiLevelRoutes = (routes: AppRouteRecordRaw[]) => { + const modules: AppRouteRecordRaw[] = cloneDeep(routes) + for (let index = 0; index < modules.length; index++) { + const route = modules[index] + if (!isMultipleRoute(route)) { + continue + } + promoteRouteLevel(route) + } + return modules +} + +// 层级是否大于2 +const isMultipleRoute = (route: AppRouteRecordRaw) => { + if (!route || !Reflect.has(route, 'children') || !route.children?.length) { + return false + } + + const children = route.children + + let flag = false + for (let index = 0; index < children.length; index++) { + const child = children[index] + if (child.children?.length) { + flag = true + break + } + } + return flag +} + +// 生成二级路由 +const promoteRouteLevel = (route: AppRouteRecordRaw) => { + let router: Router | null = createRouter({ + routes: [route as RouteRecordRaw], + history: createWebHashHistory() + }) + + const routes = router.getRoutes() + addToChildren(routes, route.children || [], route) + router = null + + route.children = route.children?.map((item) => omit(item, 'children')) +} + +// 添加所有子菜单 +const addToChildren = ( + routes: RouteRecordNormalized[], + children: AppRouteRecordRaw[], + routeModule: AppRouteRecordRaw +) => { + for (let index = 0; index < children.length; index++) { + const child = children[index] + const route = routes.find((item) => item.name === child.name) + if (!route) { + continue + } + routeModule.children = routeModule.children || [] + if (!routeModule.children.find((item) => item.name === route.name)) { + routeModule.children?.push(route as unknown as AppRouteRecordRaw) + } + if (child.children?.length) { + addToChildren(routes, child.children, routeModule) + } + } +} +const toCamelCase = (str: string, upperCaseFirst: boolean) => { + str = (str || '') + .replace(/-(.)/g, function (group1: string) { + return group1.toUpperCase() + }) + .replaceAll('-', '') + + if (upperCaseFirst && str) { + str = str.charAt(0).toUpperCase() + str.slice(1) + } + + return str +} diff --git a/src/utils/sessionReplaced.ts b/src/utils/sessionReplaced.ts new file mode 100644 index 0000000..a2f942e --- /dev/null +++ b/src/utils/sessionReplaced.ts @@ -0,0 +1,90 @@ +import axios from 'axios' +import { config } from '@/config/axios/config' +import { deleteUserCache } from '@/hooks/web/useCache' +import { useMessage } from '@/hooks/web/useMessage' +import { getAuthSession, isAuthSessionCurrent, removeToken, withAuthSessionLock } from '@/utils/auth' +import type { AuthSessionSnapshot } from '@/utils/auth' +import { appUrl, currentAppPath } from '@/utils/ssoFlow' + +const CHECK_INTERVAL_MS = 15_000 +let noticePromise: Promise | undefined + +const onAuthPage = (): boolean => + /\/(?:sso\/(?:login|callback)|zcy\/login|login)$/.test(window.location.pathname) + +/** 独立于业务请求拦截器检查被踢标记;网络失败不能判定为被踢。 */ +export const checkSessionReplaced = async ( + token: string, + refreshToken: string +): Promise => { + const response = await axios.get<{ code: number; data: boolean }>( + `${config.base_url}/system/auth/session-replaced`, + { headers: { 'X-Session-Token': token, 'X-Refresh-Token': refreshToken }, timeout: 5000 } + ) + return [0, 200].includes(response.data.code) && response.data.data === true +} + +export const isSessionReplacedNoticeOpen = (): boolean => Boolean(noticePromise) + +/** 先解释被踢原因,用户关闭提示后才清除本地会话并进入密码登录页。 */ +export const showSessionReplacedNotice = (session: AuthSessionSnapshot): Promise => { + if (!isAuthSessionCurrent(session)) return Promise.resolve() + if (noticePromise) return noticePromise + noticePromise = (async () => { + try { + await useMessage().alertWarning('您的账号已在其他地方登录,当前会话已退出。') + } catch { + // 关闭提示也不能继续使用已被撤销的令牌。 + } + // 等待确认期间,其他标签页可能已经重新登录。 + await withAuthSessionLock(() => { + if (!isAuthSessionCurrent(session)) return + deleteUserCache() + removeToken() + const query = new URLSearchParams({ forceLogin: '1', reason: 'replaced' }) + if (!onAuthPage()) { + query.set( + 'redirect', + currentAppPath() + ) + } + window.location.replace(appUrl(`/sso/login?${query.toString()}`)) + }) + })().finally(() => { + noticePromise = undefined + }) + return noticePromise +} + +/** 页面空闲时定期检测,切回页面时立即补查;未登录页和回调页不检测。 */ +export const startSessionReplacedWatch = (): (() => void) => { + let checking = false + const check = async (): Promise => { + const session = getAuthSession() + const { accessToken: token, refreshToken } = session + if ((!token && !refreshToken) || checking || noticePromise || onAuthPage()) return + checking = true + try { + if ( + (await checkSessionReplaced(token, refreshToken)) && + isAuthSessionCurrent(session) + ) { + void showSessionReplacedNotice(session) + } + } catch { + // 保留登录态,下一轮继续检查。 + } finally { + checking = false + } + } + const onVisible = (): void => { + if (!document.hidden) void check() + } + const timer = window.setInterval(() => void check(), CHECK_INTERVAL_MS) + document.addEventListener('visibilitychange', onVisible) + void check() + return () => { + window.clearInterval(timer) + document.removeEventListener('visibilitychange', onVisible) + } +} diff --git a/src/utils/ssoFlow.ts b/src/utils/ssoFlow.ts new file mode 100644 index 0000000..4bd7012 --- /dev/null +++ b/src/utils/ssoFlow.ts @@ -0,0 +1,179 @@ +import { + createAuthNonce, + getAuthSession, + isPageSessionCurrent, + requireAuthSessionLock, + withAuthSessionLock, + assertAuthSessionLockHeld, + type AuthSessionSnapshot +} from '@/utils/auth' +import { scopedStorageKey } from '@/hooks/web/useCache' + +/** 统一登录时上报的应用编码;同一套管理端前端可按部署分别登记为不同应用(如资产管理 CK_ASSET)。 */ +export const APP_CODE = import.meta.env.VITE_APP_CODE || 'CK_ASSET' + +const FLOW_KEY = scopedStorageKey('ckcloud:sso-flow:v2') +const ACTIVE_FLOW_KEY = scopedStorageKey('ckcloud:active-auth-flow:v2') +// Match the identity center's recovery window; a new flow still supersedes this one. +const FLOW_TTL_MS = 8 * 60 * 60 * 1000 + +export interface SsoFlow { + requestId: string + kind: 'login' | 'logout' + session: AuthSessionSnapshot + redirect: string + /** 门户指定的部门身份;只在管理台登录后由后端验证并切换。 */ + organizationKey?: string + createdAt: number + logoutIncomplete?: boolean +} + +export const appUrl = (path = '/'): string => { + const base = new URL(import.meta.env.BASE_URL || '/', window.location.origin) + return new URL( + path.replace(/^\/+/, ''), + base.href.endsWith('/') ? base : base.href + '/' + ).toString() +} + +// A dedicated test build maps the current application port to its browser-reachable identity center. +export const browserSsoUrl = (serverUrl: string): string => { + const configuration = import.meta.env.VITE_SSO_CENTER_PORT_MAP?.trim() + if (!configuration) return serverUrl + const ports = new Map() + for (const rawEntry of configuration.split(',')) { + const [source, target, extra] = rawEntry.split(':').map((value) => value.trim()) + if (extra !== undefined || !/^\d{1,5}$/.test(source) || !/^\d{1,5}$/.test(target)) { + throw new Error('SSO 认证中心端口映射配置无效') + } + ports.set(source, target) + } + const currentPort = window.location.port || (window.location.protocol === 'https:' ? '443' : '80') + const targetPort = ports.get(currentPort) + if (!targetPort) return serverUrl + const target = new URL(serverUrl) + target.protocol = window.location.protocol + target.hostname = window.location.hostname + target.port = targetPort + return target.toString() +} + +export const currentAppPath = (): string => { + const basePath = new URL(appUrl()).pathname + const path = window.location.pathname.startsWith(basePath) + ? '/' + window.location.pathname.slice(basePath.length) + : '/' + return path + window.location.search + window.location.hash +} + +export const isIdentityCenterPage = (): boolean => + new URL(window.location.href).pathname === new URL(appUrl('/zcy/login')).pathname + +export const safeRedirect = (value: unknown): string => { + if ( + typeof value !== 'string' || + !value.startsWith('/') || + value.startsWith('//') || + value.includes('\\') + ) + return '/' + const base = new URL(appUrl()) + const target = new URL(appUrl(value)) + if (target.origin !== base.origin || !target.pathname.startsWith(base.pathname)) return '/' + const path = '/' + target.pathname.slice(base.pathname.length) + if (/^\/(?:sso(?:\/|$)|zcy\/login|login(?:\/|$))/.test(path)) return '/' + // 账号状态页只说明上一次加载失败的原因,重新登录后不能再回到该页。 + if (/^\/(?:auth-status|403)(?:\/|$)/.test(path)) return '/' + return path + target.search + target.hash +} + +export const beginSsoFlow = ( + kind: SsoFlow['kind'], redirect: unknown = '/', organizationKey?: string +): Promise => + withAuthSessionLock(() => beginSsoFlowLocked(kind, redirect, organizationKey)) + +export const beginSsoFlowLocked = ( + kind: SsoFlow['kind'], redirect: unknown = '/', organizationKey?: string +): SsoFlow => { + assertAuthSessionLockHeld() + const session = getAuthSession() + assertPageSession(session) + const flow: SsoFlow = { + requestId: createAuthNonce(), + kind, + session, + redirect: safeRedirect(redirect), + organizationKey: kind === 'login' ? organizationKey : undefined, + createdAt: Date.now() + } + sessionStorage.setItem(FLOW_KEY, JSON.stringify(flow)) + localStorage.setItem(ACTIVE_FLOW_KEY, flow.requestId) + return flow +} + +export const assertSsoFlowCurrent = (flow: SsoFlow): void => { + if ( + localStorage.getItem(ACTIVE_FLOW_KEY) !== flow.requestId || + getAuthSession().sessionId !== flow.session.sessionId || + Date.now() - flow.createdAt > FLOW_TTL_MS + ) { + throw new Error('登录状态已变更,请重新发起操作') + } +} + +export const consumeSsoFlow = (requestId: unknown, kind: SsoFlow['kind']): SsoFlow => { + requireAuthSessionLock() + const stored = sessionStorage.getItem(FLOW_KEY) + if (!stored || typeof requestId !== 'string' || !requestId) + throw new Error('登录请求已失效,请重新登录') + const flow = JSON.parse(stored) as SsoFlow + if ( + flow.requestId !== requestId || + flow.kind !== kind || + !flow.session || + typeof flow.createdAt !== 'number' || + (flow.organizationKey !== undefined && typeof flow.organizationKey !== 'string') + ) + throw new Error('登录请求不匹配,请重新登录') + assertSsoFlowCurrent(flow) + // Consume before making a request; refresh/back cannot replay a callback. + sessionStorage.removeItem(FLOW_KEY) + return flow +} + +export const completeSsoFlow = (flow: SsoFlow): void => { + assertAuthSessionLockHeld() + if (localStorage.getItem(ACTIVE_FLOW_KEY) === flow.requestId) { + localStorage.removeItem(ACTIVE_FLOW_KEY) + } + sessionStorage.removeItem(FLOW_KEY) +} + +export const saveLoggedOutFlow = (flow: SsoFlow): void => { + assertAuthSessionLockHeld() + flow.session = getAuthSession() + sessionStorage.setItem(FLOW_KEY, JSON.stringify(flow)) +} + +export const assertPageSession = (session: AuthSessionSnapshot = getAuthSession()): void => { + if (isIdentityCenterPage()) return + if (isPageSessionCurrent(session)) return + window.location.replace(appUrl(session.accessToken ? '/' : '/sso/callback')) + throw new Error('其他标签页已更改登录状态,请等待页面重新加载') +} + +export const startAuthSessionSync = (): (() => void) => { + const check = (): void => { + if (isIdentityCenterPage()) return + if (!isPageSessionCurrent()) { + window.location.replace(appUrl(getAuthSession().accessToken ? '/' : '/sso/callback')) + } + } + // 登录和退出通过 storage 同步;页面恢复不强制导航,避免切换 Tab 或打开 F12 误触发整页刷新。 + window.addEventListener('storage', check) + window.addEventListener('pageshow', check) + return () => { + window.removeEventListener('storage', check) + window.removeEventListener('pageshow', check) + } +} diff --git a/src/utils/ssoLogout.ts b/src/utils/ssoLogout.ts new file mode 100644 index 0000000..6666df1 --- /dev/null +++ b/src/utils/ssoLogout.ts @@ -0,0 +1,57 @@ +import { getSsoLogoutUrl, loginOut } from '@/api/login' +import { removeToken, withAuthSessionLock } from '@/utils/auth' +import { deleteUserCache } from '@/hooks/web/useCache' +import { + APP_CODE, + appUrl, + beginSsoFlowLocked, + assertSsoFlowCurrent, + browserSsoUrl, + saveLoggedOutFlow +} from '@/utils/ssoFlow' + +let logoutPending = false + +const performLogout = async (): Promise => { + const flow = beginSsoFlowLocked('logout') + let logoutUrl = '' + try { + if (flow.session.ssoSessionBinding) { + logoutUrl = await getSsoLogoutUrl( + APP_CODE, + appUrl('/sso/callback'), + flow.requestId, + flow.session + ) + } + } catch { + assertSsoFlowCurrent(flow) + flow.logoutIncomplete = true + } + assertSsoFlowCurrent(flow) + try { + if (flow.session.accessToken) await loginOut(flow.session) + } catch { + assertSsoFlowCurrent(flow) + flow.logoutIncomplete = true + } + assertSsoFlowCurrent(flow) + removeToken() + deleteUserCache() + // Local cleanup must remain possible when the application or center is unavailable. + saveLoggedOutFlow(flow) + const localCallback = new URL(appUrl('/sso/callback')) + localCallback.searchParams.set('logout', '1') + localCallback.searchParams.set('requestId', flow.requestId) + window.location.replace(logoutUrl ? browserSsoUrl(logoutUrl) : localCallback.toString()) +} + +export const logoutFromSso = async (): Promise => { + if (logoutPending) return + logoutPending = true + try { + await withAuthSessionLock(performLogout) + } finally { + logoutPending = false + } +} diff --git a/src/utils/tree.ts b/src/utils/tree.ts new file mode 100644 index 0000000..f4d36f0 --- /dev/null +++ b/src/utils/tree.ts @@ -0,0 +1,285 @@ +interface TreeHelperConfig { + id: string + children: string + pid: string +} + +const DEFAULT_CONFIG: TreeHelperConfig = { + id: 'id', + children: 'children', + pid: 'pid' +} +export const defaultProps = { + children: 'children', + label: 'name', + value: 'id', + isLeaf: 'leaf', + emitPath: false // 用于 cascader 组件:在选中节点改变时,是否返回由该节点所在的各级菜单的值所组成的数组,若设置 false,则只返回该节点的值 +} + +/** 组织树同级内部组织在前、外部协作单位在后,各组保留原顺序,下级递归处理。 */ +export const sortOrganizationTree = ( + nodes: T[] +): void => { + nodes.sort((left, right) => Number(left.orgType === 'external') - Number(right.orgType === 'external')) + nodes.forEach((node) => { + if (node.children?.length) sortOrganizationTree(node.children) + }) +} + +const getConfig = (config: Partial) => Object.assign({}, DEFAULT_CONFIG, config) + +/** 以字段名动态访问的树节点 */ +type TreeRecord = Record + +/** 读取节点上的子节点数组(字段名可配置) */ +const childrenOf = (node: T, key: string): T[] | undefined => + (node as TreeRecord)[key] as T[] | undefined + +export const treeToList = ( + tree: T[], + config: Partial = {} +): T[] => { + config = getConfig(config) + const { children } = config + const result: T[] = [...tree] + for (let i = 0; i < result.length; i++) { + const childList = childrenOf(result[i], children!) + if (!childList) continue + result.splice(i + 1, 0, ...childList) + } + return result +} + +export const findNode = ( + tree: T[], + func: (node: T) => unknown, + config: Partial = {} +): T | null => { + config = getConfig(config) + const { children } = config + const list = [...tree] + for (const node of list) { + if (func(node)) return node + const childList = childrenOf(node, children!) + childList && list.push(...childList) + } + return null +} + +export const findPath = ( + tree: T[], + func: (node: T) => unknown, + config: Partial = {} +): T[] | null => { + config = getConfig(config) + const path: T[] = [] + const list = [...tree] + const visitedSet = new Set() + const { children } = config + while (list.length) { + const node = list[0] + if (visitedSet.has(node)) { + path.pop() + list.shift() + } else { + visitedSet.add(node) + const childList = childrenOf(node, children!) + childList && list.unshift(...childList) + path.push(node) + if (func(node)) { + return path + } + } + } + return null +} + +export const filter = ( + tree: T[], + func: (n: T) => boolean, + config: Partial = {} +): T[] => { + config = getConfig(config) + const children = config.children as string + + function listFilter(list: T[]): T[] { + return list + .map((node) => ({ ...node })) + .filter((node) => { + const record = node as TreeRecord + const childList = childrenOf(node, children) + record[children] = childList && listFilter(childList) + const filtered = childrenOf(node, children) + return func(node) || (filtered && filtered.length) + }) + } + + return listFilter(tree) +} + +export const forEach = ( + tree: T[], + func: (n: T) => unknown, + config: Partial = {} +): void => { + config = getConfig(config) + const list: T[] = [...tree] + const { children } = config + for (let i = 0; i < list.length; i++) { + // func 返回true就终止遍历,避免大量节点场景下无意义循环,引起浏览器卡顿 + if (func(list[i])) { + return + } + const childList = children ? childrenOf(list[i], children) : undefined + children && childList && list.splice(i + 1, 0, ...childList) + } +} + +/** + * @description: Extract tree specified structure + */ +export const treeMap = ( + treeData: T[], + opt: { children?: string; conversion: Fn } +): T[] => { + return treeData.map((item) => treeMapEach(item, opt)) +} + +/** + * @description: Extract tree specified structure + */ +export const treeMapEach = ( + data: T, + { children = 'children', conversion }: { children?: string; conversion: Fn } +) => { + const childList = childrenOf(data, children) + const haveChildren = Array.isArray(childList) && childList.length > 0 + const conversionData = conversion(data) || {} + if (haveChildren) { + return { + ...conversionData, + [children]: childList.map((i) => + treeMapEach(i, { + children, + conversion + }) + ) + } + } else { + return { + ...conversionData + } + } +} + +/** + * 递归遍历树结构 + * @param treeDatas 树 + * @param callBack 回调 + * @param parentNode 父节点 + */ +export const eachTree = (treeDatas: T[], callBack: Fn, parentNode = {}) => { + treeDatas.forEach((element) => { + const newNode = callBack(element, parentNode) || element + const childList = childrenOf(element, 'children') + if (childList) { + eachTree(childList, callBack, newNode) + } + }) +} + +/** + * 构造树型结构数据 + * @param {*} data 数据源 + * @param {*} id id字段 默认 'id' + * @param {*} parentId 父节点字段 默认 'parentId' + * @param {*} children 孩子节点字段 默认 'children' + */ +export const handleTree = ( + data: T[], + id?: string, + parentId?: string, + children?: string +): R[] => { + if (!Array.isArray(data)) { + console.warn('data must be an array') + return [] + } + const config = { + id: id || 'id', + parentId: parentId || 'parentId', + childrenList: children || 'children' + } + + const childrenListMap: Record = {} + const nodeIds: Record = {} + const tree: T[] = [] + const field = (item: T, key: string) => (item as TreeRecord)[key] as string + + for (const d of data) { + const parentId = field(d, config.parentId) + if (childrenListMap[parentId] == null) { + childrenListMap[parentId] = [] + } + nodeIds[field(d, config.id)] = d + childrenListMap[parentId].push(d) + } + + for (const d of data) { + const parentId = field(d, config.parentId) + if (nodeIds[parentId] == null) { + tree.push(d) + } + } + + for (const t of tree) { + adaptToChildrenList(t) + } + + function adaptToChildrenList(o: T) { + if (childrenListMap[field(o, config.id)] !== null) { + ;(o as TreeRecord)[config.childrenList] = childrenListMap[field(o, config.id)] + } + const childList = childrenOf(o, config.childrenList) + if (childList) { + for (const c of childList) { + adaptToChildrenList(c) + } + } + } + + // 节点已挂上 children 字段,结果类型由调用方按树节点类型(R)声明 + return tree as unknown as R[] +} + +/** + * 构造树型结构数据(按父子字段关联,返回根节点列表;不修改入参) + * @param data 数据源 + * @param id id字段 默认 'id' + * @param parentId 父节点字段 默认 'parentId' + * @param children 孩子节点字段 默认 'children' + * @param rootId 根Id 默认取所有 parentId 中的最小值,再缺省为 0 + */ +export const handleTree2 = ( + data: T[], + id = 'id', + parentId = 'parentId', + children = 'children', + rootId?: string | number +): T[] => { + const field = (item: T, key: string) => (item as Record)[key] + const root = + rootId || Math.min(...data.map((item) => Number(field(item, parentId)))) || 0 + // 对源数据深度克隆 + const cloneData: T[] = JSON.parse(JSON.stringify(data)) + return cloneData.filter((father) => { + const branchArr = cloneData.filter((child) => field(father, id) === field(child, parentId)) + if (branchArr.length > 0) { + ;(father as Record)[children] = branchArr + } + // 返回第一层 + return field(father, parentId) === root + }) +} + diff --git a/src/utils/tsxHelper.ts b/src/utils/tsxHelper.ts new file mode 100644 index 0000000..6087fa3 --- /dev/null +++ b/src/utils/tsxHelper.ts @@ -0,0 +1,16 @@ +import { Slots } from 'vue' +import { isFunction } from '@/utils/is' + +export const getSlot = (slots: Slots, slot = 'default', data?: Recordable) => { + // Reflect.has 判断一个对象是否存在某个属性 + if (!slots || !Reflect.has(slots, slot)) { + return null + } + if (!isFunction(slots[slot])) { + console.error(`${slot} is not a function!`) + return null + } + const slotFn = slots[slot] + if (!slotFn) return null + return slotFn(data) +} diff --git a/src/views/Error/403.vue b/src/views/Error/403.vue new file mode 100644 index 0000000..3e8fc4b --- /dev/null +++ b/src/views/Error/403.vue @@ -0,0 +1,18 @@ + + diff --git a/src/views/Error/404.vue b/src/views/Error/404.vue new file mode 100644 index 0000000..90438c4 --- /dev/null +++ b/src/views/Error/404.vue @@ -0,0 +1,17 @@ + + diff --git a/src/views/Error/500.vue b/src/views/Error/500.vue new file mode 100644 index 0000000..53a7566 --- /dev/null +++ b/src/views/Error/500.vue @@ -0,0 +1,17 @@ + + diff --git a/src/views/Home/Index.vue b/src/views/Home/Index.vue new file mode 100644 index 0000000..95e6f4d --- /dev/null +++ b/src/views/Home/Index.vue @@ -0,0 +1,27 @@ + + diff --git a/src/views/Home/Index2.vue b/src/views/Home/Index2.vue new file mode 100644 index 0000000..c9429ab --- /dev/null +++ b/src/views/Home/Index2.vue @@ -0,0 +1,319 @@ + + + + diff --git a/src/views/Home/echarts-data.ts b/src/views/Home/echarts-data.ts new file mode 100644 index 0000000..56093f4 --- /dev/null +++ b/src/views/Home/echarts-data.ts @@ -0,0 +1,308 @@ +import { EChartsOption } from 'echarts' + +const { t } = useI18n() + +export const lineOptions: EChartsOption = { + title: { + text: t('analysis.monthlySales'), + left: 'center' + }, + xAxis: { + data: [ + t('analysis.january'), + t('analysis.february'), + t('analysis.march'), + t('analysis.april'), + t('analysis.may'), + t('analysis.june'), + t('analysis.july'), + t('analysis.august'), + t('analysis.september'), + t('analysis.october'), + t('analysis.november'), + t('analysis.december') + ], + boundaryGap: false, + axisTick: { + show: false + } + }, + grid: { + left: 20, + right: 20, + bottom: 20, + top: 80, + containLabel: true + }, + tooltip: { + trigger: 'axis', + axisPointer: { + type: 'cross' + }, + padding: [5, 10] + }, + yAxis: { + axisTick: { + show: false + } + }, + legend: { + data: [t('analysis.estimate'), t('analysis.actual')], + top: 50 + }, + series: [ + { + name: t('analysis.estimate'), + smooth: true, + type: 'line', + data: [100, 120, 161, 134, 105, 160, 165, 114, 163, 185, 118, 123], + animationDuration: 2800, + animationEasing: 'cubicInOut' + }, + { + name: t('analysis.actual'), + smooth: true, + type: 'line', + itemStyle: {}, + data: [120, 82, 91, 154, 162, 140, 145, 250, 134, 56, 99, 123], + animationDuration: 2800, + animationEasing: 'quadraticOut' + } + ] +} + +export const pieOptions: EChartsOption = { + title: { + text: t('analysis.userAccessSource'), + left: 'center' + }, + tooltip: { + trigger: 'item', + formatter: '{a}
{b} : {c} ({d}%)' + }, + legend: { + orient: 'vertical', + left: 'left', + data: [ + t('analysis.directAccess'), + t('analysis.mailMarketing'), + t('analysis.allianceAdvertising'), + t('analysis.videoAdvertising'), + t('analysis.searchEngines') + ] + }, + series: [ + { + name: t('analysis.userAccessSource'), + type: 'pie', + radius: '55%', + center: ['50%', '60%'], + data: [ + { value: 335, name: t('analysis.directAccess') }, + { value: 310, name: t('analysis.mailMarketing') }, + { value: 234, name: t('analysis.allianceAdvertising') }, + { value: 135, name: t('analysis.videoAdvertising') }, + { value: 1548, name: t('analysis.searchEngines') } + ] + } + ] +} + +export const barOptions: EChartsOption = { + title: { + text: t('analysis.weeklyUserActivity'), + left: 'center' + }, + tooltip: { + trigger: 'axis', + axisPointer: { + type: 'shadow' + } + }, + grid: { + left: 50, + right: 20, + bottom: 20 + }, + xAxis: { + type: 'category', + data: [ + t('analysis.monday'), + t('analysis.tuesday'), + t('analysis.wednesday'), + t('analysis.thursday'), + t('analysis.friday'), + t('analysis.saturday'), + t('analysis.sunday') + ], + axisTick: { + alignWithLabel: true + } + }, + yAxis: { + type: 'value' + }, + series: [ + { + name: t('analysis.activeQuantity'), + data: [13253, 34235, 26321, 12340, 24643, 1322, 1324], + type: 'bar' + } + ] +} + +export const radarOption: EChartsOption = { + legend: { + data: [t('workplace.personal'), t('workplace.team')] + }, + radar: { + // shape: 'circle', + indicator: [ + { name: t('workplace.quote'), max: 65 }, + { name: t('workplace.contribution'), max: 160 }, + { name: t('workplace.hot'), max: 300 }, + { name: t('workplace.yield'), max: 130 }, + { name: t('workplace.follow'), max: 100 } + ] + }, + series: [ + { + name: `xxx${t('workplace.index')}`, + type: 'radar', + data: [ + { + value: [42, 30, 20, 35, 80], + name: t('workplace.personal') + }, + { + value: [50, 140, 290, 100, 90], + name: t('workplace.team') + } + ] + } + ] +} + +export const wordOptions = { + series: [ + { + type: 'wordCloud', + gridSize: 2, + sizeRange: [12, 50], + rotationRange: [-90, 90], + shape: 'pentagon', + width: 600, + height: 400, + drawOutOfBound: true, + textStyle: { + color: function () { + return ( + 'rgb(' + + [ + Math.round(Math.random() * 160), + Math.round(Math.random() * 160), + Math.round(Math.random() * 160) + ].join(',') + + ')' + ) + } + }, + emphasis: { + textStyle: { + shadowBlur: 10, + shadowColor: '#333' + } + }, + data: [ + { + name: 'Sam S Club', + value: 10000, + textStyle: { + color: 'black' + }, + emphasis: { + textStyle: { + color: 'red' + } + } + }, + { + name: 'Macys', + value: 6181 + }, + { + name: 'Amy Schumer', + value: 4386 + }, + { + name: 'Jurassic World', + value: 4055 + }, + { + name: 'Charter Communications', + value: 2467 + }, + { + name: 'Chick Fil A', + value: 2244 + }, + { + name: 'Planet Fitness', + value: 1898 + }, + { + name: 'Pitch Perfect', + value: 1484 + }, + { + name: 'Express', + value: 1112 + }, + { + name: 'Home', + value: 965 + }, + { + name: 'Johnny Depp', + value: 847 + }, + { + name: 'Lena Dunham', + value: 582 + }, + { + name: 'Lewis Hamilton', + value: 555 + }, + { + name: 'KXAN', + value: 550 + }, + { + name: 'Mary Ellen Mark', + value: 462 + }, + { + name: 'Farrah Abraham', + value: 366 + }, + { + name: 'Rita Ora', + value: 360 + }, + { + name: 'Serena Williams', + value: 282 + }, + { + name: 'NCAA baseball tournament', + value: 273 + }, + { + name: 'Point Break', + value: 265 + } + ] + } + ] +} diff --git a/src/views/Home/types.ts b/src/views/Home/types.ts new file mode 100644 index 0000000..956636a --- /dev/null +++ b/src/views/Home/types.ts @@ -0,0 +1,57 @@ +export type WorkplaceTotal = { + project: number + access: number + todo: number +} + +export type Project = { + name: string + icon: string + message: string + personal: string + time: Date | number | string + color: string +} + +export type Notice = { + title: string + type: string + keys: string[] + date: Date | number | string +} + +export type Shortcut = { + name: string + icon: string + url: string + color: string +} + +export type RadarData = { + personal: number + team: number + max: number + name: string +} +export type AnalysisTotalTypes = { + users: number + messages: number + moneys: number + shoppings: number +} + +export type UserAccessSource = { + value: number + name: string +} + +export type WeeklyUserActivity = { + value: number + name: string +} + +export type MonthlySales = { + name: string + estimate: number + actual: number +} diff --git a/src/views/Login/AuthStatus.vue b/src/views/Login/AuthStatus.vue new file mode 100644 index 0000000..16b1e13 --- /dev/null +++ b/src/views/Login/AuthStatus.vue @@ -0,0 +1,60 @@ + + + + + diff --git a/src/views/Login/SsoCallback.vue b/src/views/Login/SsoCallback.vue new file mode 100644 index 0000000..c026134 --- /dev/null +++ b/src/views/Login/SsoCallback.vue @@ -0,0 +1,102 @@ + + + + + diff --git a/src/views/Login/SsoLaunch.vue b/src/views/Login/SsoLaunch.vue new file mode 100644 index 0000000..706b759 --- /dev/null +++ b/src/views/Login/SsoLaunch.vue @@ -0,0 +1,65 @@ + + + + + diff --git a/src/views/Login/UnifiedLogin.vue b/src/views/Login/UnifiedLogin.vue new file mode 100644 index 0000000..c58878c --- /dev/null +++ b/src/views/Login/UnifiedLogin.vue @@ -0,0 +1,684 @@ + + + + + diff --git a/src/views/Login/components/AccountLoginForm.vue b/src/views/Login/components/AccountLoginForm.vue new file mode 100644 index 0000000..af5cd9c --- /dev/null +++ b/src/views/Login/components/AccountLoginForm.vue @@ -0,0 +1,488 @@ + + + + + diff --git a/src/views/Login/components/LoginCityScene.vue b/src/views/Login/components/LoginCityScene.vue new file mode 100644 index 0000000..340d63c --- /dev/null +++ b/src/views/Login/components/LoginCityScene.vue @@ -0,0 +1,469 @@ + + + + + diff --git a/src/views/Profile/Index.vue b/src/views/Profile/Index.vue new file mode 100644 index 0000000..6628bfa --- /dev/null +++ b/src/views/Profile/Index.vue @@ -0,0 +1,81 @@ + + + diff --git a/src/views/Profile/components/BasicInfo.vue b/src/views/Profile/components/BasicInfo.vue new file mode 100644 index 0000000..898aeb8 --- /dev/null +++ b/src/views/Profile/components/BasicInfo.vue @@ -0,0 +1,164 @@ + + + diff --git a/src/views/Profile/components/ProfileUser.vue b/src/views/Profile/components/ProfileUser.vue new file mode 100644 index 0000000..e226af0 --- /dev/null +++ b/src/views/Profile/components/ProfileUser.vue @@ -0,0 +1,118 @@ + + + + diff --git a/src/views/Profile/components/ResetPwd.vue b/src/views/Profile/components/ResetPwd.vue new file mode 100644 index 0000000..9896c67 --- /dev/null +++ b/src/views/Profile/components/ResetPwd.vue @@ -0,0 +1,81 @@ + + diff --git a/src/views/Profile/components/UserAvatar.vue b/src/views/Profile/components/UserAvatar.vue new file mode 100644 index 0000000..6e18d0f --- /dev/null +++ b/src/views/Profile/components/UserAvatar.vue @@ -0,0 +1,54 @@ + + + + diff --git a/src/views/Profile/components/UserSocial.vue b/src/views/Profile/components/UserSocial.vue new file mode 100644 index 0000000..8d25354 --- /dev/null +++ b/src/views/Profile/components/UserSocial.vue @@ -0,0 +1,107 @@ + + diff --git a/src/views/Profile/components/index.ts b/src/views/Profile/components/index.ts new file mode 100644 index 0000000..9e1883c --- /dev/null +++ b/src/views/Profile/components/index.ts @@ -0,0 +1,7 @@ +import BasicInfo from './BasicInfo.vue' +import ProfileUser from './ProfileUser.vue' +import ResetPwd from './ResetPwd.vue' +import UserAvatarVue from './UserAvatar.vue' +import UserSocial from './UserSocial.vue' + +export { BasicInfo, ProfileUser, ResetPwd, UserAvatarVue, UserSocial } diff --git a/src/views/Redirect/Redirect.vue b/src/views/Redirect/Redirect.vue new file mode 100644 index 0000000..f7717ce --- /dev/null +++ b/src/views/Redirect/Redirect.vue @@ -0,0 +1,28 @@ + + diff --git a/src/views/asset/base/index.vue b/src/views/asset/base/index.vue new file mode 100644 index 0000000..5709b43 --- /dev/null +++ b/src/views/asset/base/index.vue @@ -0,0 +1,345 @@ + + + + + diff --git a/src/views/asset/bill/AssetBillDetail.vue b/src/views/asset/bill/AssetBillDetail.vue new file mode 100644 index 0000000..360021d --- /dev/null +++ b/src/views/asset/bill/AssetBillDetail.vue @@ -0,0 +1,91 @@ + + + + + diff --git a/src/views/asset/bill/index.vue b/src/views/asset/bill/index.vue new file mode 100644 index 0000000..79c2e2f --- /dev/null +++ b/src/views/asset/bill/index.vue @@ -0,0 +1,92 @@ + + + + + diff --git a/src/views/asset/card/index.vue b/src/views/asset/card/index.vue new file mode 100644 index 0000000..303a44e --- /dev/null +++ b/src/views/asset/card/index.vue @@ -0,0 +1,438 @@ + + + + + diff --git a/src/views/asset/sync/index.vue b/src/views/asset/sync/index.vue new file mode 100644 index 0000000..4bf7bcf --- /dev/null +++ b/src/views/asset/sync/index.vue @@ -0,0 +1,159 @@ + + + + + diff --git a/src/views/system/bpm/processInstance/detail/LedgerWriteStatus.vue b/src/views/system/bpm/processInstance/detail/LedgerWriteStatus.vue new file mode 100644 index 0000000..6612035 --- /dev/null +++ b/src/views/system/bpm/processInstance/detail/LedgerWriteStatus.vue @@ -0,0 +1,78 @@ + + + + + diff --git a/src/views/system/bpm/processInstance/detail/PrintDialog.vue b/src/views/system/bpm/processInstance/detail/PrintDialog.vue new file mode 100644 index 0000000..fde1602 --- /dev/null +++ b/src/views/system/bpm/processInstance/detail/PrintDialog.vue @@ -0,0 +1,593 @@ + + + + + diff --git a/src/views/system/bpm/processInstance/detail/ProcessInstanceAdminOperations.vue b/src/views/system/bpm/processInstance/detail/ProcessInstanceAdminOperations.vue new file mode 100644 index 0000000..f79fcf1 --- /dev/null +++ b/src/views/system/bpm/processInstance/detail/ProcessInstanceAdminOperations.vue @@ -0,0 +1,519 @@ + + + diff --git a/src/views/system/bpm/processInstance/detail/ProcessInstanceBpmnViewer.vue b/src/views/system/bpm/processInstance/detail/ProcessInstanceBpmnViewer.vue new file mode 100644 index 0000000..8be1c74 --- /dev/null +++ b/src/views/system/bpm/processInstance/detail/ProcessInstanceBpmnViewer.vue @@ -0,0 +1,60 @@ + + + diff --git a/src/views/system/bpm/processInstance/detail/ProcessInstanceOperationButton.vue b/src/views/system/bpm/processInstance/detail/ProcessInstanceOperationButton.vue new file mode 100644 index 0000000..532420a --- /dev/null +++ b/src/views/system/bpm/processInstance/detail/ProcessInstanceOperationButton.vue @@ -0,0 +1,1353 @@ + + + + diff --git a/src/views/system/bpm/processInstance/detail/ProcessInstanceSimpleViewer.vue b/src/views/system/bpm/processInstance/detail/ProcessInstanceSimpleViewer.vue new file mode 100644 index 0000000..0da6d63 --- /dev/null +++ b/src/views/system/bpm/processInstance/detail/ProcessInstanceSimpleViewer.vue @@ -0,0 +1,174 @@ + + + + diff --git a/src/views/system/bpm/processInstance/detail/ProcessInstanceTaskList.vue b/src/views/system/bpm/processInstance/detail/ProcessInstanceTaskList.vue new file mode 100644 index 0000000..62858e5 --- /dev/null +++ b/src/views/system/bpm/processInstance/detail/ProcessInstanceTaskList.vue @@ -0,0 +1,389 @@ + + diff --git a/src/views/system/bpm/processInstance/detail/ProcessInstanceTimeline.vue b/src/views/system/bpm/processInstance/detail/ProcessInstanceTimeline.vue new file mode 100644 index 0000000..fe4a850 --- /dev/null +++ b/src/views/system/bpm/processInstance/detail/ProcessInstanceTimeline.vue @@ -0,0 +1,446 @@ + + + + diff --git a/src/views/system/bpm/processInstance/detail/ProcessInstanceUrge.vue b/src/views/system/bpm/processInstance/detail/ProcessInstanceUrge.vue new file mode 100644 index 0000000..b912876 --- /dev/null +++ b/src/views/system/bpm/processInstance/detail/ProcessInstanceUrge.vue @@ -0,0 +1,190 @@ + + + diff --git a/src/views/system/bpm/processInstance/detail/SignDialog.vue b/src/views/system/bpm/processInstance/detail/SignDialog.vue new file mode 100644 index 0000000..ef84885 --- /dev/null +++ b/src/views/system/bpm/processInstance/detail/SignDialog.vue @@ -0,0 +1,58 @@ + + + + + diff --git a/src/views/system/bpm/processInstance/detail/index.vue b/src/views/system/bpm/processInstance/detail/index.vue new file mode 100644 index 0000000..7b8dac9 --- /dev/null +++ b/src/views/system/bpm/processInstance/detail/index.vue @@ -0,0 +1,541 @@ + + + + diff --git a/src/views/system/bpm/processInstance/detail/processPrint.ts b/src/views/system/bpm/processInstance/detail/processPrint.ts new file mode 100644 index 0000000..698d4f0 --- /dev/null +++ b/src/views/system/bpm/processInstance/detail/processPrint.ts @@ -0,0 +1,251 @@ +/** 把详情页已渲染的控件转为静态文字,保留表单布局以及人员、部门、字典的显示名称。 */ +export const createProcessPrintHtml = (source: HTMLElement): string => { + /** 组织类型角标只用于选人界面,不属于公司或部门的真实名称。 */ + const getPrintLabel = (element: Element): string => { + const label = element.cloneNode(true) as Element + label.querySelectorAll('.dept-kind-tag').forEach((tag) => tag.remove()) + return label.textContent?.trim() || '' + } + const copy = source.cloneNode(true) as HTMLElement + const originals = [source, ...source.querySelectorAll('*')] + const copies = [copy, ...copy.querySelectorAll('*')] + // 保存原模块位置,区分上下衔接的模块与同一行并排的模块。 + const tableBounds = new Map() + + originals.forEach((element, index) => { + const target = copies[index] + const style = window.getComputedStyle(element) + // 不把当前查看人无权查看的字段及组件内部隐藏内容带入打印。 + if (style.display === 'none' || style.visibility === 'hidden') { + target.remove() + return + } + target.removeAttribute('id') + if (element.matches('.form-table')) { + tableBounds.set(target, element.getBoundingClientRect()) + } + if (element.matches('.el-form-item__label')) { + target.dataset.printLabelWidth = style.width + target.dataset.printLabelWeight = style.fontWeight + } + if ( + [style.overflowX, style.overflowY].some((overflow) => ['auto', 'scroll'].includes(overflow)) + ) { + target.classList.add('process-print-expand') + } + if (element instanceof HTMLInputElement && target instanceof HTMLInputElement) { + target.value = element.value + target.checked = element.checked + } else if (element instanceof HTMLTextAreaElement && target instanceof HTMLTextAreaElement) { + target.value = element.value + } else if (element instanceof HTMLSelectElement && target instanceof HTMLSelectElement) { + Array.from(element.options).forEach((option, i) => { + target.options[i].selected = option.selected + }) + } else if (element instanceof HTMLCanvasElement) { + // cloneNode 不复制画布像素,手写内容须转成图片才会出现在打印副本中。 + const image = document.createElement('img') + image.src = element.toDataURL() + image.style.width = `${element.clientWidth}px` + image.style.maxWidth = '100%' + target.replaceWith(image) + } + // 多选折叠时优先从对应下拉列表补齐已选名称,不打印“+N”之类的交互提示。 + if (element.matches('.el-select')) { + const listId = element.querySelector('input[aria-controls]')?.getAttribute('aria-controls') + const list = listId ? document.getElementById(listId) : null + const labels = Array.from( + list?.querySelectorAll('.el-select-dropdown__item.is-selected') || [] + ) + .map(getPrintLabel) + .filter(Boolean) + if (labels.length) target.dataset.printSelectedLabels = labels.join('、') + } + }) + + /** 只修改副本,打印预览不触发原表单的校验、联动及保存事件。 */ + const replaceWithText = (element: Element, text: string) => { + const value = document.createElement('span') + value.className = 'process-print-value' + value.textContent = text + element.replaceWith(value) + } + + // 附件的文件名按钮转成文字,下载、上传、删除等操作不进入纸面。 + copy.querySelectorAll('.upload-file-attachment-name').forEach((element) => { + replaceWithText(element, element.textContent?.trim() || '') + }) + copy + .querySelectorAll( + [ + '.fc-detail-toolbar', + '.fc-detail-group__actions', + '.fc-detail-row-delete', + '.dept-kind-tag', + '.el-upload', + '.el-upload__tip', + '.el-upload-list__item-delete', + '.el-form-item__error', + '.el-loading-mask', + '.el-scrollbar__bar', + '.w-e-toolbar', + 'button', + 'script', + 'iframe', + '[role="tooltip"]' + ].join(',') + ) + .forEach((element) => element.remove()) + + // 先替换组合控件,再处理内部原生输入框,避免把选项名称误换成搜索词或编号。 + copy + .querySelectorAll( + [ + '.el-select', + '.el-cascader', + '.el-date-editor', + '.el-input-number', + '.el-switch', + '.el-input', + '.el-textarea', + 'select', + 'textarea', + 'input' + ].join(',') + ) + .forEach((element) => { + if (!copy.contains(element)) return + let text = '' + if (element.matches('.el-select')) { + text = + element.dataset.printSelectedLabels || + Array.from( + element.querySelectorAll( + '.el-select__selected-item:not(.el-select__input-wrapper):not(.is-transparent)' + ) + ) + .filter((item) => !/^\s*\+\s*\d+\s*$/.test(item.textContent || '')) + .map(getPrintLabel) + .filter(Boolean) + .join('、') + } else if (element.matches('.el-cascader')) { + const tags = Array.from(element.querySelectorAll('.el-tag__content')).map((item) => + item.textContent?.trim() + ) + text = tags.length ? tags.join('、') : element.querySelector('input')?.value || '' + } else if (element.matches('.el-switch')) { + text = + element.querySelector('.el-switch__label.is-active')?.textContent?.trim() || + (element.classList.contains('is-checked') ? '是' : '否') + } else if (element instanceof HTMLSelectElement) { + text = Array.from(element.selectedOptions) + .map((item) => item.textContent) + .join('、') + } else if ( + element instanceof HTMLInputElement && + ['checkbox', 'radio'].includes(element.type) + ) { + replaceWithText(element, element.checked ? '☑' : '☐') + return + } else { + const inputs = element.matches('input, textarea') + ? [element as HTMLInputElement | HTMLTextAreaElement] + : Array.from( + element.querySelectorAll('input, textarea') + ) + text = inputs + .filter((input) => input.type !== 'hidden') + .map((input) => + input.type === 'password' ? '•'.repeat(input.value.length) : input.value + ) + .join(' 至 ') + } + replaceWithText(element, text) + }) + // 明细原来按像素横向滚动;改成列宽比例,让窄纸面也保留完整列,序号列仍相对较窄。 + copy.querySelectorAll('.fc-detail-scroll-table').forEach((table) => { + const width = Number.parseFloat(table.style.width) + table.querySelectorAll('th, td').forEach((cell) => { + const cellWidth = Number.parseFloat(cell.style.width) + if (width > 0 && cellWidth > 0) cell.style.width = `${(cellWidth / width) * 100}%` + cell.style.minWidth = '0' + cell.style.maxWidth = 'none' + }) + }) + // 纸面使用原生表格单元格承载标签及正文,避免浏览器打印 Flex 行时背景覆盖边线。 + Array.from(copy.querySelectorAll('.form-table-row')).reverse().forEach((row) => { + const table = document.createElement('table') + table.className = 'process-print-form-row' + const columns = document.createElement('colgroup') + const body = table.createTBody() + const tr = body.insertRow() + Array.from(row.children).forEach((column) => { + const item = column.matches('.el-form-item') ? column : column.querySelector(':scope > .el-form-item') + const label = item?.querySelector( + ':scope > .el-form-item__label, :scope > .el-form-item__label-wrap > .el-form-item__label' + ) + const content = item?.querySelector(':scope > .el-form-item__content') + const labelColumn = document.createElement('col') + // 顶部标题的测量宽度是整行宽度,不能作为左侧标签列宽,否则会把明细挤出纸面。 + if (label && item?.classList.contains('el-form-item--label-top')) { + columns.append(labelColumn, document.createElement('col')) + const cell = tr.insertCell() + cell.className = 'process-print-form-section' + cell.colSpan = 2 + const title = document.createElement('div') + title.className = 'process-print-section-title' + title.style.fontWeight = label.dataset.printLabelWeight || '400' + title.append(...Array.from(label.childNodes)) + const value = document.createElement('div') + value.className = 'process-print-section-content' + value.append(...Array.from((content || column).childNodes)) + cell.append(title, value) + return + } + if (label) { + labelColumn.style.width = label.dataset.printLabelWidth || 'var(--form-table-label-width, 90px)' + const cell = tr.insertCell() + cell.className = 'process-print-form-label' + cell.style.fontWeight = label.dataset.printLabelWeight || '400' + cell.append(...Array.from(label.childNodes)) + } + columns.append(labelColumn, document.createElement('col')) + const cell = tr.insertCell() + cell.className = 'process-print-form-cell' + if (!label) cell.colSpan = 2 + cell.append(...Array.from((content || column).childNodes)) + }) + table.prepend(columns) + row.replaceWith(table) + }) + // 跨过列、表单项等布局包装查找前一模块;仅上下对齐且中间无其他内容时共用接缝。 + copy.querySelectorAll('.form-table').forEach((table) => { + let branch: Element | null = table + while (branch && branch !== copy && !branch.previousElementSibling) { + branch = branch.parentElement + } + let previous = branch === copy ? null : branch?.previousElementSibling + while (previous && !previous.matches('.form-table') && previous.lastElementChild) { + previous = previous.lastElementChild + } + const currentBounds = tableBounds.get(table) + const previousBounds = previous && tableBounds.get(previous) + if ( + currentBounds && previousBounds && + currentBounds.top >= previousBounds.bottom - 1 && + Math.abs(currentBounds.left - previousBounds.left) < 1 && + Math.abs(currentBounds.right - previousBounds.right) < 1 + ) { + table.classList.add('process-print-table-continuation') + } + }) + // 去除复制后的可点击行为;保留附件、图片、普通文本和原有栅格/合并单元格结构。 + copy.querySelectorAll('*').forEach((element) => { + Array.from(element.attributes).forEach((attribute) => { + if (/^on/i.test(attribute.name)) element.removeAttribute(attribute.name) + }) + element.removeAttribute('contenteditable') + element.removeAttribute('tabindex') + }) + return copy.outerHTML +} diff --git a/src/views/system/bpm/processInstance/detail/types.ts b/src/views/system/bpm/processInstance/detail/types.ts new file mode 100644 index 0000000..d1a91f1 --- /dev/null +++ b/src/views/system/bpm/processInstance/detail/types.ts @@ -0,0 +1,98 @@ +/** + * 流程实例详情页各组件共用的视图类型。 + * 接口层(@/api/bpm/processInstance、@/api/bpm/task)只声明了部分字段,这里按详情接口实际返回补齐页面用到的字段。 + */ +import type { User } from '@/api/bpm/processInstance' +import type { NodeType } from '@/components/SimpleProcessDesignerV2/src/consts' + +/** 流程详情中的用户信息(任务处理人、发起人等带部门名称) */ +export interface ProcessUserVO extends User { + deptName?: string +} + +/** 时间字段:后端返回毫秒时间戳,部分接口返回字符串 */ +export type ProcessDateValue = number | string | Date + +/** 审批详情接口返回的流程实例 */ +export interface ProcessInstanceDetailVO { + id: string + name?: string + status: number + businessKey?: string + startTime?: ProcessDateValue + startUser?: ProcessUserVO + /** 最新有效(含修订)的表单值 */ + formVariables?: Record + /** 是否被管理员挂起 */ + suspended?: boolean + suspendTime?: ProcessDateValue + suspendUserName?: string + suspendReason?: string +} + +/** 审批详情接口返回的流程定义 */ +export interface ProcessDefinitionDetailVO { + id?: string + modelType?: number + formType?: number + formConf?: string + formFields?: string[] + formCustomViewPath?: string + /** 普通用户是否可切换查看完整流程痕迹 */ + userCanViewFullHistory?: boolean + /** 默认痕迹展示模式:1 简洁,2 完整 */ + historyDisplayMode?: number +} + +/** 任务上配置的操作按钮 */ +export interface TaskButtonSetting { + enable: boolean + displayName: string +} + +/** 流程任务(待办任务、任务记录) */ +export interface ProcessTaskVO { + id: string + name: string + status: number + reason?: string + createTime?: ProcessDateValue + endTime?: ProcessDateValue + durationInMillis?: number + taskDefinitionKey: string + parentTaskId?: string + assigneeUser?: ProcessUserVO + ownerUser?: ProcessUserVO + /** 代理办理时的委托人 */ + principalUser?: ProcessUserVO + adminSkipped?: boolean + withdrawn?: boolean + reasonRevised?: boolean + /** 最新一次审批意见修订的原因,用于已修订标签提示。 */ + revisionReason?: string + originalReason?: string + opinionModifiable?: boolean + formId?: number + formName?: string + formConf?: string + formFields?: string[] + formVariables?: Record + signEnable?: boolean + reasonRequire?: boolean + nodeType?: NodeType + buttonsSetting?: Record + /** 加签产生的子任务 */ + children?: ProcessTaskVO[] +} + +/** 可退回、可向后跳转的节点 */ +export interface ProcessTaskNodeVO { + taskDefinitionKey: string + name: string +} + +/** 当前任务的“退回目标节点决定后续方式”上下文 */ +export interface TaskReturnContextVO { + targetDecisionRequired?: boolean + sourceTaskName?: string +} diff --git a/src/views/system/bpm/processInstance/detail/useProcessDetailBack.ts b/src/views/system/bpm/processInstance/detail/useProcessDetailBack.ts new file mode 100644 index 0000000..dbee9dc --- /dev/null +++ b/src/views/system/bpm/processInstance/detail/useProcessDetailBack.ts @@ -0,0 +1,49 @@ +import { SYSTEM_WORKFLOW_PATHS } from '@/router/workflow' + +/** + * 流程详情页的返回 / 关闭行为。 + * + * 1. 由其他窗口(如门户待办)以新窗口打开、且本窗口内没有上一页时:关闭当前窗口; + * 2. 应用内有上一页时:返回上一页; + * 3. 直接打开链接等没有上一页的情况:跳转到当前用户可访问的流程列表(流程实例 → 我的流程 → 首页)。 + */ +export const useProcessDetailBack = () => { + const router = useRouter() + + /** vue-router 在 history.state.back 中记录应用内上一页,新窗口首次加载时为空 */ + const hasAppHistory = () => !!window.history.state?.back + + /** 是否为其他窗口脚本打开的弹出窗口,且窗口内没有可返回的页面 */ + const isPopupWindow = computed(() => !!window.opener && !hasAppHistory()) + + /** 返回箭头的提示文字:弹出窗口为“关闭”,其余为“返回” */ + const backLabel = computed(() => (isPopupWindow.value ? '关闭' : '返回')) + + /** 选择第一个已注册(有权限)的列表路由作为兜底返回地址,未命中时回到首页 */ + const resolveFallbackPath = () => { + const candidates = [SYSTEM_WORKFLOW_PATHS.instance, '/bpm/task/my'] + const available = candidates.find((path) => { + const matched = router.resolve(path).matched + return matched.length > 0 && !matched[matched.length - 1].path.includes(':pathMatch') + }) + return available || '/' + } + + const handleBack = () => { + if (isPopupWindow.value) { + window.close() + // 浏览器拒绝关闭(例如非脚本打开的窗口)时,退回到列表页,避免按钮无响应 + setTimeout(() => { + if (!window.closed) router.push(resolveFallbackPath()) + }, 300) + return + } + if (hasAppHistory()) { + router.back() + return + } + router.push(resolveFallbackPath()) + } + + return { backLabel, handleBack } +} diff --git a/src/views/system/prototype-list.scss b/src/views/system/prototype-list.scss new file mode 100644 index 0000000..0dfc8f2 --- /dev/null +++ b/src/views/system/prototype-list.scss @@ -0,0 +1,175 @@ +@use 'variables.scss' as *; + +$table-prefix-cls: #{$elNamespace}-table; +$tag-prefix-cls: #{$elNamespace}-tag; +$button-prefix-cls: #{$elNamespace}-button; +$switch-prefix-cls: #{$elNamespace}-switch; + +.prototype-list-page { + box-sizing: border-box; + display: flex; + width: calc(100% + var(--app-content-padding) + var(--app-content-padding)); + height: var(--ckyun-page-content-height); + min-height: 0; + margin: calc(0px - var(--app-content-padding)); + overflow: hidden; + font-family: var(--ckyun-content-font-family); + font-size: var(--ckyun-content-font-size); +} + +.prototype-list-page :deep(.public-view) { + display: flex; + height: 100%; + min-height: 0; + flex: 1 1 auto; + flex-direction: column; +} + +.prototype-list-page :deep(.public-view__panel) { + // Override the panel's inline min-height so nested lists can shrink within the viewport. + min-height: 0 !important; + flex: 1 1 auto; +} + +.prototype-list-page :deep(.public-view-search) { + box-shadow: 0 3px 3px -3px rgb(0 0 0 / 10%), 0 2px 2px -2px rgb(0 0 0 / 10%); +} + +.prototype-list-page :deep(.public-view-table) { + min-height: 0; + flex: 0 1 auto; + margin-top: var(--ckyun-list-section-gap); + margin-bottom: var(--ckyun-list-section-gap); + overflow: hidden !important; + border-radius: var(--ckyun-table-radius); + box-shadow: var(--ckyun-list-panel-shadow); +} + +.prototype-list-page :deep(.#{$table-prefix-cls}__inner-wrapper) { + overflow: hidden !important; + border-radius: inherit; +} + +.prototype-list-page :deep(.public-view-pagination) { + flex: 0 0 auto; + min-height: var(--ckyun-pagination-container-height); + margin-top: auto; +} + +.prototype-list-page :deep(.public-view-table__inner) { + font-family: inherit; +} + +.prototype-list-page :deep(.#{$table-prefix-cls}__header th.#{$table-prefix-cls}__cell) { + height: var(--ckyun-table-header-height); + padding: 0; + color: #374151; + background: var(--ckyun-table-header-bg); + border-bottom-color: #e5e7eb; +} + +.prototype-list-page :deep(.#{$table-prefix-cls}__header .cell), +.prototype-list-page :deep(.#{$table-prefix-cls}__body .cell) { + padding: 0 var(--ckyun-table-cell-padding-inline); + font-size: var(--ckyun-content-font-size); + line-height: var(--ckyun-content-line-height); + text-align: left; +} + +.prototype-list-page :deep(.#{$table-prefix-cls}__header .cell) { + font-weight: 600; +} + +.prototype-list-page :deep(.#{$table-prefix-cls}__body td.#{$table-prefix-cls}__cell) { + height: var(--ckyun-table-row-height); + padding: 8px 0; + color: #374151; + border-bottom-color: #f3f4f6; +} + +.prototype-list-page.ckyun-tree-table + :deep(.#{$table-prefix-cls}__body td.#{$table-prefix-cls}__cell) { + height: var(--ckyun-tree-table-row-height); + padding: var(--ckyun-tree-table-cell-padding-block) 0; +} + +.prototype-list-page :deep(.#{$table-prefix-cls}__body td:first-child .cell) { + color: var(--ckyun-table-first-column-color); + font-weight: var(--ckyun-table-first-column-font-weight); +} + +.prototype-list-page :deep(.public-view-table .#{$tag-prefix-cls}) { + height: var(--ckyun-table-tag-height); + min-height: var(--ckyun-table-tag-height); + padding: 0 var(--ckyun-table-tag-padding-inline); + font-size: var(--ckyun-content-label-font-size); + font-weight: var(--ckyun-content-value-font-weight); + line-height: var(--ckyun-content-label-line-height); + border-radius: var(--ckyun-table-tag-radius); +} + +.prototype-list-page :deep(.public-view-table .#{$button-prefix-cls}.is-link) { + height: var(--ckyun-content-line-height); + min-height: var(--ckyun-content-line-height); + padding: 0; + font-family: inherit; + font-size: var(--ckyun-content-font-size); + font-weight: var(--ckyun-content-value-font-weight); + line-height: var(--ckyun-content-line-height); + border: 0; +} + +.prototype-list-page + :deep(.public-view-table .#{$button-prefix-cls}.is-link + .#{$button-prefix-cls}.is-link) { + margin-left: var(--ckyun-table-action-gap); +} + +.prototype-list-page + :deep(.public-view-table .ckyun-table-action--primary.#{$button-prefix-cls}.is-link) { + color: var(--ckyun-table-action-primary-color); +} + +.prototype-list-page + :deep(.public-view-table .ckyun-table-action--secondary.#{$button-prefix-cls}.is-link) { + color: var(--ckyun-table-action-secondary-color); +} + +.prototype-list-page :deep(.#{$table-prefix-cls}__expand-icon) { + box-sizing: border-box; + width: var(--ckyun-table-tree-toggle-size); + height: var(--ckyun-table-tree-toggle-size); + margin-right: var(--ckyun-table-tree-toggle-gap); + font-family: inherit; + line-height: var(--ckyun-table-tree-toggle-size); + color: var(--ckyun-table-tree-toggle-color); + flex: 0 0 var(--ckyun-table-tree-toggle-size); +} + +.prototype-list-page :deep(.ckyun-table-switch.#{$switch-prefix-cls}) { + --el-switch-on-color: var(--ckyun-table-switch-on-color); + + width: var(--ckyun-table-switch-width); + height: var(--ckyun-table-switch-height); + margin-left: 0 !important; +} + +.prototype-list-page :deep(.ckyun-table-switch .#{$switch-prefix-cls}__core) { + height: var(--ckyun-table-switch-height); + min-width: var(--ckyun-table-switch-width); +} + +@media (width <= 768px) { + .prototype-list-page { + display: block; + width: auto; + height: auto; + min-height: auto; + margin: calc(0px - var(--app-content-padding)); + overflow: visible; + } + + .prototype-list-page :deep(.public-view) { + display: block; + height: auto; + } +} diff --git a/stylelint.config.js b/stylelint.config.js new file mode 100644 index 0000000..b336785 --- /dev/null +++ b/stylelint.config.js @@ -0,0 +1,235 @@ +module.exports = { + root: true, + plugins: ['stylelint-order'], + customSyntax: 'postcss-html', + extends: ['stylelint-config-standard'], + rules: { + 'selector-pseudo-class-no-unknown': [ + true, + { + ignorePseudoClasses: ['global', 'deep'] + } + ], + 'at-rule-no-unknown': [ + true, + { + ignoreAtRules: ['function', 'if', 'each', 'include', 'mixin', 'extend'] + } + ], + 'media-query-no-invalid': null, + 'function-no-unknown': null, + 'no-empty-source': null, + 'named-grid-areas-no-invalid': null, + // 'unicode-bom': 'never', + 'no-descending-specificity': null, + 'font-family-no-missing-generic-family-keyword': null, + // 'declaration-colon-space-after': 'always-single-line', + // 'declaration-colon-space-before': 'never', + // 'declaration-block-trailing-semicolon': null, + 'rule-empty-line-before': [ + 'always', + { + ignore: ['after-comment', 'first-nested'] + } + ], + 'unit-no-unknown': [ + true, + { + ignoreUnits: ['rpx'] + } + ], + 'order/order': [ + [ + 'dollar-variables', + 'custom-properties', + 'at-rules', + 'declarations', + { + type: 'at-rule', + name: 'supports' + }, + { + type: 'at-rule', + name: 'media' + }, + 'rules' + ], + { + severity: 'warning' + } + ], + // Specify the alphabetical order of the attributes in the declaration block + 'order/properties-order': [ + 'position', + 'top', + 'right', + 'bottom', + 'left', + 'z-index', + 'display', + 'float', + 'width', + 'height', + 'max-width', + 'max-height', + 'min-width', + 'min-height', + 'padding', + 'padding-top', + 'padding-right', + 'padding-bottom', + 'padding-left', + 'margin', + 'margin-top', + 'margin-right', + 'margin-bottom', + 'margin-left', + 'margin-collapse', + 'margin-top-collapse', + 'margin-right-collapse', + 'margin-bottom-collapse', + 'margin-left-collapse', + 'overflow', + 'overflow-x', + 'overflow-y', + 'clip', + 'clear', + 'font', + 'font-family', + 'font-size', + 'font-smoothing', + 'osx-font-smoothing', + 'font-style', + 'font-weight', + 'hyphens', + 'src', + 'line-height', + 'letter-spacing', + 'word-spacing', + 'color', + 'text-align', + 'text-decoration', + 'text-indent', + 'text-overflow', + 'text-rendering', + 'text-size-adjust', + 'text-shadow', + 'text-transform', + 'word-break', + 'word-wrap', + 'white-space', + 'vertical-align', + 'list-style', + 'list-style-type', + 'list-style-position', + 'list-style-image', + 'pointer-events', + 'cursor', + 'background', + 'background-attachment', + 'background-color', + 'background-image', + 'background-position', + 'background-repeat', + 'background-size', + 'border', + 'border-collapse', + 'border-top', + 'border-right', + 'border-bottom', + 'border-left', + 'border-color', + 'border-image', + 'border-top-color', + 'border-right-color', + 'border-bottom-color', + 'border-left-color', + 'border-spacing', + 'border-style', + 'border-top-style', + 'border-right-style', + 'border-bottom-style', + 'border-left-style', + 'border-width', + 'border-top-width', + 'border-right-width', + 'border-bottom-width', + 'border-left-width', + 'border-radius', + 'border-top-right-radius', + 'border-bottom-right-radius', + 'border-bottom-left-radius', + 'border-top-left-radius', + 'border-radius-topright', + 'border-radius-bottomright', + 'border-radius-bottomleft', + 'border-radius-topleft', + 'content', + 'quotes', + 'outline', + 'outline-offset', + 'opacity', + 'filter', + 'visibility', + 'size', + 'zoom', + 'transform', + 'box-align', + 'box-flex', + 'box-orient', + 'box-pack', + 'box-shadow', + 'box-sizing', + 'table-layout', + 'animation', + 'animation-delay', + 'animation-duration', + 'animation-iteration-count', + 'animation-name', + 'animation-play-state', + 'animation-timing-function', + 'animation-fill-mode', + 'transition', + 'transition-delay', + 'transition-duration', + 'transition-property', + 'transition-timing-function', + 'background-clip', + 'backface-visibility', + 'resize', + 'appearance', + 'user-select', + 'interpolation-mode', + 'direction', + 'marks', + 'page', + 'set-link-source', + 'unicode-bidi', + 'speak' + ] + }, + ignoreFiles: ['**/*.js', '**/*.jsx', '**/*.tsx', '**/*.ts'], + overrides: [ + { + files: ['*.vue', '**/*.vue', '*.html', '**/*.html'], + extends: ['stylelint-config-recommended', 'stylelint-config-html'], + rules: { + 'keyframes-name-pattern': null, + 'selector-class-pattern': null, + 'no-duplicate-selectors': null, + 'selector-pseudo-class-no-unknown': [ + true, + { + ignorePseudoClasses: ['deep', 'global'] + } + ], + 'selector-pseudo-element-no-unknown': [ + true, + { + ignorePseudoElements: ['v-deep', 'v-global', 'v-slotted'] + } + ] + } + } + ] +} diff --git a/tests/e2e/auth_states.py b/tests/e2e/auth_states.py new file mode 100644 index 0000000..fcae8c1 --- /dev/null +++ b/tests/e2e/auth_states.py @@ -0,0 +1,209 @@ +"""Isolated login UX regression checks against the local Vite server. + +All API responses and tokens are test doubles. No real account, browser profile or CAPTCHA is used. +Run: python tests/e2e/auth_states.py +""" + +from playwright.sync_api import sync_playwright +import re +import os + + +ORIGIN = "http://127.0.0.1:9000" +CORS = {"access-control-allow-origin": "*", "access-control-allow-headers": "*"} +EVIDENCE_DIR = os.environ.get("LOGIN_UX_EVIDENCE_DIR") + + +def mock(route, code, data=None, msg="test response"): + route.fulfill(json={"code": code, "data": data, "msg": msg}, headers=CORS) + + +def context_page(browser): + context = browser.new_context() + page = context.new_page() + page.route("**/system/sso-client/login-url**", lambda route: mock(route, 500)) + page.route("**/system/dict-data/simple-list**", lambda route: mock(route, 200, [])) + return context, page + + +def set_fake_token(page): + # 缺少签名字段的请求停留在“登录请求无效”页,作为不跳转的空白宿主页。 + page.goto(ORIGIN + "/zcy/login?appId=isolated", wait_until="networkidle") + page.evaluate("""async () => { + const auth = await import('/src/utils/auth.ts') + auth.setToken({accessToken: 'isolated-access', refreshToken: 'isolated-refresh'}) + auth.setTenantId(1) + }""") + + +def check_no_token(browser): + context, page = context_page(browser) + page.goto(ORIGIN + "/system/group", wait_until="domcontentloaded") + page.wait_for_url(re.compile(r"/sso/login(?:\?.*)?$"), wait_until="domcontentloaded") + assert "forceLogin" not in page.url # ordinary first visit may reuse a valid center session + print("no token -> SSO login: PASS") + context.close() + + +def check_expired_page(browser): + context, page = context_page(browser) + # 失效表单不再停留,自动回门户重新发起登录(有中心会话时免密进入)。 + page.goto(ORIGIN + "/zcy/login?loginToken=old&error=登录请求已失效", wait_until="commit") + page.wait_for_url(re.compile(r"127\.0\.0\.1:8081/|/ckcloud-portal/"), wait_until="commit") + print("expired login request -> back to portal: PASS") + context.close() + + +def check_refresh_success(browser): + context, page = context_page(browser) + set_fake_token(page) + page.goto(ORIGIN + "/403", wait_until="networkidle") + calls = {"api": 0, "refresh": 0} + + def api(route): + calls["api"] += 1 + if calls["api"] == 1: + mock(route, 401, msg="访问令牌已过期") + else: + mock(route, 200, {"ok": True}) + + def refresh(route): + calls["refresh"] += 1 + mock(route, 0, {"accessToken": "isolated-new-access", "refreshToken": "isolated-refresh"}) + + page.route("**/system/auth/get-permission-info**", api) + page.route("**/system/auth/refresh-token**", refresh) + result = page.evaluate("""async () => { + const {service} = await import('/src/config/axios/service.ts') + return (await service.get('/system/auth/get-permission-info')).data.ok + }""") + assert result and calls == {"api": 2, "refresh": 1} + assert page.url.endswith("/403") + print("expired access token -> one refresh and transparent retry: PASS") + context.close() + + +def check_refresh_failure(browser, http_401=False): + context, page = context_page(browser) + set_fake_token(page) + page.goto(ORIGIN + "/403", wait_until="networkidle") + if http_401: + page.route("**/system/auth/get-permission-info**", lambda route: route.fulfill(status=401, headers=CORS)) + else: + page.route("**/system/auth/get-permission-info**", lambda route: mock(route, 401, msg="访问令牌已被撤销")) + page.route("**/system/auth/refresh-token**", lambda route: mock(route, 400, msg="无效的刷新令牌")) + page.evaluate("""async () => { + const {service} = await import('/src/config/axios/service.ts') + try { await service.get('/system/auth/get-permission-info') } catch {} + }""") + page.wait_for_url(re.compile(r"/sso/login\?forceLogin=1.*$"), wait_until="domcontentloaded") + print(("HTTP 401" if http_401 else "business 401") + " + failed refresh -> forced password login: PASS") + context.close() + + +def check_temporary_failure_and_operation_forbidden(browser): + context, page = context_page(browser) + set_fake_token(page) + page.goto(ORIGIN + "/403", wait_until="networkidle") + page.route("**/system/auth/get-permission-info**", lambda route: mock(route, 401, msg="访问令牌已过期")) + page.route("**/system/auth/refresh-token**", lambda route: route.abort("failed")) + result = page.evaluate("""async () => { + const {service} = await import('/src/config/axios/service.ts') + const auth = await import('/src/utils/auth.ts') + try { await service.get('/system/auth/get-permission-info') } catch {} + return Boolean(auth.getAccessToken()) + }""") + assert result and page.url.endswith("/403") + print("refresh network failure -> keep session and page: PASS") + + page.route("**/system/test/forbidden**", lambda route: mock(route, 403, msg="没有权限")) + result = page.evaluate("""async () => { + const {service} = await import('/src/config/axios/service.ts') + try { await service.get('/system/test/forbidden') } catch (error) { return error.status } + }""") + assert result == 403 and page.url.endswith("/403") + print("operation 403 -> remain on page, no login redirect: PASS") + context.close() + + +def check_missing_ticket(browser): + context, page = context_page(browser) + set_fake_token(page) + page.goto(ORIGIN + "/sso/callback", wait_until="domcontentloaded") + page.wait_for_url(re.compile(r"/sso/login\?forceLogin=1.*$"), wait_until="domcontentloaded") + print("missing SSO ticket -> fresh password login: PASS") + context.close() + + +def check_concurrent_expiry(browser): + context, page = context_page(browser) + set_fake_token(page) + page.goto(ORIGIN + "/403", wait_until="networkidle") + calls = {"refresh": 0} + page.route("**/system/auth/get-permission-info**", lambda route: mock(route, 401, msg="访问令牌已过期")) + + def refresh(route): + calls["refresh"] += 1 + mock(route, 400, msg="无效的刷新令牌") + + page.route("**/system/auth/refresh-token**", refresh) + result = page.evaluate("""async () => { + const {service} = await import('/src/config/axios/service.ts') + const calls = Array.from({length: 3}, () => service.get('/system/auth/get-permission-info')) + return (await Promise.allSettled(calls)).map(item => item.status) + }""") + page.wait_for_url(re.compile(r"/sso/login\?forceLogin=1.*$"), wait_until="domcontentloaded") + assert result == ["rejected"] * 3 and calls["refresh"] == 1 + print("concurrent 401 -> one refresh, all requests settled: PASS") + context.close() + + +def check_forced_password_change(browser): + context, page = context_page(browser) + set_fake_token(page) + page.route("**/system/auth/get-permission-info**", lambda route: mock(route, 0, + {"user": {"id": 1, "nickname": "测试用户", "deptId": 1, "forcePasswordChange": True}, + "permissions": [], "roles": [], "menus": []})) + page.route("**/system/user/profile/**", lambda route: mock(route, 0, {})) + page.goto(ORIGIN + "/system/group", wait_until="domcontentloaded") + page.wait_for_url(re.compile(r"/user/profile\?forcePasswordChange=1.*$"), wait_until="domcontentloaded") + page.get_by_text("密码设置").first.wait_for() + print("forced password change -> usable profile page without menus: PASS") + context.close() + + +def check_network_and_permission(browser): + for response, expected in [("network", "暂时无法加载账号信息"), ("forbidden", "当前账号没有访问权限"), + ("empty", "当前账号暂无可访问的管理台菜单")]: + context, page = context_page(browser) + set_fake_token(page) + if response == "network": + page.route("**/system/auth/get-permission-info**", lambda route: route.abort("failed")) + elif response == "forbidden": + page.route("**/system/auth/get-permission-info**", lambda route: mock(route, 403, msg="没有权限")) + else: + page.route("**/system/auth/get-permission-info**", lambda route: mock(route, 200, + {"user": {"id": 1, "nickname": "测试用户", "deptId": 1}, "permissions": [], "roles": [], "menus": []})) + page.goto(ORIGIN + "/system/group", wait_until="domcontentloaded") + page.wait_for_url(re.compile(r"/auth-status\?.*$"), wait_until="domcontentloaded") + page.get_by_text(expected).wait_for() + assert page.get_by_role("button", name="切换账号").count() == 1 + if EVIDENCE_DIR: + page.screenshot(path=os.path.join(EVIDENCE_DIR, response + "-status.png"), full_page=True) + print(response + " -> explanation, not login loop: PASS") + context.close() + + +with sync_playwright() as playwright: + browser = playwright.chromium.launch(headless=True) + check_no_token(browser) + check_expired_page(browser) + check_refresh_success(browser) + check_refresh_failure(browser) + check_refresh_failure(browser, http_401=True) + check_temporary_failure_and_operation_forbidden(browser) + check_missing_ticket(browser) + check_concurrent_expiry(browser) + check_forced_password_change(browser) + check_network_and_permission(browser) + browser.close() diff --git a/tests/e2e/grant_initialization.py b/tests/e2e/grant_initialization.py new file mode 100644 index 0000000..88b648a --- /dev/null +++ b/tests/e2e/grant_initialization.py @@ -0,0 +1,73 @@ +"""Regression: the preselected/default application loads grants and master status.""" + +from playwright.sync_api import sync_playwright + +ORIGIN = "http://127.0.0.1:9000" + + +def mock(route, code, data=None): + route.fulfill(json={"code": code, "data": data, "msg": "test response"}, + headers={"access-control-allow-origin": "*"}) + + +def main(): + with sync_playwright() as playwright: + browser = playwright.chromium.launch(headless=True) + context = browser.new_context() + page = context.new_page() + page.route("**/admin-api/**", lambda route: mock(route, 0, [])) + page.route("**/system/sso-client/login-url**", lambda route: mock(route, 500)) + page.route("**/system/dict-data/simple-list**", lambda route: mock(route, 200, [])) + page.goto(ORIGIN + "/zcy/login?expired=1", wait_until="networkidle") + page.evaluate("""async () => { + const auth = await import('/src/utils/auth.ts') + auth.setToken({accessToken: 'isolated-access', refreshToken: 'isolated-refresh'}) + auth.setTenantId(1) + }""") + calls = [] + menus = [{ + "id": 5015, "parentId": 0, "name": "应用中心", "path": "/system/application", + "component": "Layout", "visible": True, "keepAlive": True, + "children": [{ + "id": 5088, "parentId": 5015, "name": "应用授权", "path": "grant", + "component": "system/application/grant/index", "componentName": "SystemApplicationGrant", + "visible": True, "keepAlive": True + }] + }] + page.route("**/system/auth/get-permission-info**", lambda route: mock(route, 0, { + "user": {"id": 1, "nickname": "测试用户", "deptId": 1}, + "permissions": ["system:application:api-grant"], "roles": ["super_admin"], "menus": menus + })) + page.route("**/system/application/simple-list**", lambda route: mock(route, 0, [ + {"id": 1, "name": "财开云", "status": 0} + ])) + + def grant_page(route): + calls.append(route.request.url) + mock(route, 0, {"enabled": True, "total": 1, "list": [{ + "id": 11, "apiCode": "document.read", "name": "文件读取", "method": "GET", + "pathTemplate": "/open-api/v1/file", "requiredScope": "file.read", "granted": True + }]}) + + page.route("**/system/application/api-grant-page**", grant_page) + page.goto(ORIGIN + "/system/application/grant?applicationId=1", wait_until="networkidle") + try: + page.get_by_text("文件读取").wait_for(timeout=10000) + except Exception: + print("url", page.url, "grant calls", calls, "page", page.locator("body").inner_text()[:1500]) + raise + assert len(calls) == 1 and "applicationId=1" in calls[0], calls + assert page.locator(".application-grant__master .el-switch.is-checked").count() == 1 + print("preselected application -> grant list and enabled master: PASS") + calls.clear() + page.goto(ORIGIN + "/system/application/grant", wait_until="networkidle") + page.get_by_text("文件读取").wait_for(timeout=10000) + assert len(calls) == 1 and "applicationId=1" in calls[0], calls + assert page.locator(".application-grant__master .el-switch.is-checked").count() == 1 + print("default application -> grant list and enabled master: PASS") + context.close() + browser.close() + + +if __name__ == "__main__": + main() diff --git a/tests/unit/components/smoke.spec.ts b/tests/unit/components/smoke.spec.ts new file mode 100644 index 0000000..cd067e2 --- /dev/null +++ b/tests/unit/components/smoke.spec.ts @@ -0,0 +1,157 @@ +import { flushPromises, mount, shallowMount } from '@vue/test-utils' +import type { Component } from 'vue' +import { appPlugins, loginAsAdmin, mockBackend } from '../helpers/app' + +/** + * 组件冒烟测试:逐个挂载 src/components 与 src/layout 下的组件(子组件浅渲染), + * 走真实的 request 封装(网络层替换为空数据),断言能渲染出 DOM 且不抛异常。 + * 用于发现导入错误、setup 运行时异常、模板引用了不存在的变量等回归。 + */ +const pages = import.meta.glob<{ default: Component }>('/src/{components,layout}/**/*.vue') + +interface SmokeOptions { + /** 必填 props 的最小合法值 */ + props?: Record + /** 父组件通过 provide 注入的数据 */ + provide?: Record + /** 通过 ref 调用子组件方法的页面需完整渲染子组件 */ + deep?: boolean + /** 默认插槽内容 */ + slots?: Record + /** 无法在 jsdom 中渲染的页面,写明原因 */ + skip?: string +} + +const node = (type: number, extra: Record = {}) => ({ + id: `node-${type}`, + name: '节点', + type, + showText: '', + conditionNodes: [], + ...extra +}) + +const options: Record = { + '/src/components/DictTag/src/DictTag.vue': { props: { type: 'common_status', value: 0 } }, + '/src/components/MarkdownView/index.vue': { props: { content: '# 标题\n\n正文' } }, + '/src/components/Highlight/src/Highlight.vue': { slots: { default: '财开云平台' } }, + '/src/components/Echart/src/Echart.vue': { skip: 'echarts 依赖 canvas,jsdom 不支持' }, + '/src/components/Qrcode/src/Qrcode.vue': { skip: '二维码绘制依赖 canvas,jsdom 不支持' }, + '/src/components/Cropper/src/CopperModal.vue': { skip: '裁剪依赖 canvas 与 cropperjs,jsdom 不支持' }, + '/src/components/Cropper/src/CropperAvatar.vue': { skip: '裁剪依赖 canvas 与 cropperjs,jsdom 不支持' }, + '/src/components/PublicView/src/PublicView.vue': { + deep: true, + props: { + columns: [{ label: '名称', field: 'name' }], + request: () => Promise.resolve({ list: [{ name: '张三' }], total: 1 }) + } + }, + '/src/components/PublicView/src/components/PublicViewSearch.vue': { + props: { + columns: [{ label: '名称', field: 'name' }], + params: {}, + config: { defaultCollapsed: false, labelWidth: 'auto', span: 6, showReset: true, collapseRows: 1 }, + fieldOptions: {}, + fieldLoading: {}, + fieldDisabled: {} + } + }, + '/src/components/PublicView/src/components/PublicViewSearchField.vue': { + props: { column: { label: '名称', field: 'name', valueType: 'input' }, modelValue: '' } + }, + '/src/components/PublicView/src/components/PublicViewTable.vue': { + props: { + columns: [{ label: '名称', field: 'name' }], + data: [{ name: '张三' }], + loading: false, + config: { height: undefined, border: true, stripe: false, rowKey: 'id', selection: false, index: false }, + hasRequested: true + } + }, + '/src/components/PublicView/src/components/PublicViewTableColumn.vue': { + props: { column: { label: '名称', field: 'name' } } + }, + '/src/components/PublicView/src/components/PublicViewTabs.vue': { + props: { tabs: [{ label: '全部', value: 'all' }], activeTab: 'all' } + }, + '/src/components/PublicView/src/components/PublicViewToolbar.vue': { + props: { tools: [{ label: '新增', key: 'add' }], selection: [] } + }, + '/src/components/SimpleProcessDesignerV2/src/SimpleProcessDesigner.vue': { + skip: '依赖完整模型数据与表单字段注入,在流程模型编辑页中浏览器回归' + }, + '/src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue': { + props: { flowNode: node(11) } + }, + '/src/components/SimpleProcessDesignerV2/src/nodes-config/components/HttpRequestSetting.vue': { + props: { + setting: { url: '', header: [], body: [], response: [] }, + responseEnable: true, + formItemPrefix: 'httpRequestSetting' + } + }, + '/src/components/SimpleProcessDesignerV2/src/nodes/ChildProcessNode.vue': { props: { flowNode: node(20) } }, + '/src/components/SimpleProcessDesignerV2/src/nodes/CopyTaskNode.vue': { props: { flowNode: node(12) } }, + '/src/components/SimpleProcessDesignerV2/src/nodes/DelayTimerNode.vue': { props: { flowNode: node(14) } }, + '/src/components/SimpleProcessDesignerV2/src/nodes/ExclusiveNode.vue': { props: { flowNode: node(51) } }, + '/src/components/SimpleProcessDesignerV2/src/nodes/InclusiveNode.vue': { props: { flowNode: node(53) } }, + '/src/components/SimpleProcessDesignerV2/src/nodes/ParallelNode.vue': { props: { flowNode: node(52) } }, + '/src/components/SimpleProcessDesignerV2/src/nodes/RouterNode.vue': { props: { flowNode: node(54) } }, + '/src/components/SimpleProcessDesignerV2/src/nodes/StartUserNode.vue': { props: { flowNode: node(10) } }, + '/src/components/SimpleProcessDesignerV2/src/nodes/TriggerNode.vue': { props: { flowNode: node(15) } }, + '/src/components/SimpleProcessDesignerV2/src/nodes/UserTaskNode.vue': { props: { flowNode: node(11) } }, + '/src/components/bpmnProcessDesigner/package/designer/ProcessDesigner.vue': { skip: '依赖 bpmn-js 建模器实例(window.bpmnInstances),需在流程设计器中浏览器回归' }, + '/src/components/bpmnProcessDesigner/package/penal/signal-message/SignalAndMessage.vue': { skip: '依赖 bpmn-js 建模器实例(window.bpmnInstances),需在流程设计器中浏览器回归' }, + '/src/components/bpmnProcessDesigner/package/penal/task/ElementTask.vue': { skip: '依赖 bpmn-js 建模器实例(window.bpmnInstances),需在流程设计器中浏览器回归' }, + '/src/components/bpmnProcessDesigner/package/penal/task/task-components/ReceiveTask.vue': { skip: '依赖 bpmn-js 建模器实例(window.bpmnInstances),需在流程设计器中浏览器回归' }, + '/src/components/bpmnProcessDesigner/package/penal/task/task-components/ScriptTask.vue': { skip: '依赖 bpmn-js 建模器实例(window.bpmnInstances),需在流程设计器中浏览器回归' }, + '/src/components/bpmnProcessDesigner/package/penal/task/task-components/ServiceTask.vue': { skip: '依赖 bpmn-js 建模器实例(window.bpmnInstances),需在流程设计器中浏览器回归' }, + '/src/components/bpmnProcessDesigner/package/penal/task/task-components/UserTask.vue': { skip: '依赖 bpmn-js 建模器实例(window.bpmnInstances),需在流程设计器中浏览器回归' }, + '/src/components/bpmnProcessDesigner/package/penal/flow-condition/FlowCondition.vue': { + skip: '依赖 bpmn-js 建模器实例(window.bpmnInstances),需在流程设计器中浏览器回归' + }, + '/src/layout/components/TagsView/src/TagsView.vue': { skip: '依赖真实路由表与当前路由,在布局中浏览器回归' }, + '/src/layout/components/Breadcrumb/src/Breadcrumb.vue': { skip: '依赖真实路由表与当前路由,在布局中浏览器回归' }, + '/src/layout/components/CkyunHeader.vue': { props: { modules: [], activeModule: undefined } } +} + +const entries = Object.keys(pages) + .sort() + .filter((path) => !options[path]?.skip) + +describe('components / layout 冒烟渲染', () => { + it('跳过的页面都写明了原因', () => { + for (const [path, option] of Object.entries(options)) { + expect(Object.keys(pages)).toContain(path) + if (option.skip !== undefined) expect(option.skip.length).toBeGreaterThan(5) + } + }) + + beforeEach(async () => { + await loginAsAdmin() + }) + + it.each(entries)('%s', async (path) => { + mockBackend() + const errors: unknown[] = [] + const mod = await pages[path]() + const option = options[path] ?? {} + const wrapper = (option.deep ? mount : shallowMount)(mod.default, { + props: option.props, + slots: option.slots, + global: { + plugins: appPlugins(), + provide: option.provide, + config: { + errorHandler: (err) => { + errors.push(err) + } + } + } + }) + await flushPromises() + expect(errors).toEqual([]) + expect(wrapper.html().length).toBeGreaterThan(0) + wrapper.unmount() + }) +}) diff --git a/tests/unit/config/axios.spec.ts b/tests/unit/config/axios.spec.ts new file mode 100644 index 0000000..659b906 --- /dev/null +++ b/tests/unit/config/axios.spec.ts @@ -0,0 +1,203 @@ +import { Blob as NodeBlob } from 'node:buffer' +import axios, { type AxiosAdapter, type AxiosResponse, type InternalAxiosRequestConfig } from 'axios' +import { ElMessage, ElNotification } from 'element-plus' +import request from '@/config/axios' +import { service } from '@/config/axios/service' +import { getAuthSession, setToken, withAuthSessionLock } from '@/utils/auth' +import type { TokenType } from '@/api/login/types' + +vi.mock('element-plus', async (importOriginal) => { + const actual = await importOriginal() + return { + ...actual, + ElMessage: Object.assign(vi.fn(), { error: vi.fn(), success: vi.fn(), warning: vi.fn(), info: vi.fn() }), + ElNotification: Object.assign(vi.fn(), { error: vi.fn(), info: vi.fn() }), + ElMessageBox: Object.assign(vi.fn(), { alert: vi.fn().mockResolvedValue(undefined) }) + } +}) + +vi.mock('@/utils/sessionReplaced', () => ({ + checkSessionReplaced: vi.fn().mockResolvedValue(false), + isSessionReplacedNoticeOpen: vi.fn().mockReturnValue(false), + showSessionReplacedNotice: vi.fn().mockResolvedValue(undefined) +})) + +const token = (access: string, refresh = 'refresh-1'): TokenType => ({ + id: 1, + accessToken: access, + refreshToken: refresh, + userId: 1, + userType: 2, + clientId: 'ckcloud', + expiresTime: Date.now() + 60_000 +}) + +const login = (access = 'access-1', refresh = 'refresh-1') => + withAuthSessionLock(() => setToken(token(access, refresh), 'session-1')) + +type Responder = (config: InternalAxiosRequestConfig) => Partial | Promise> + +/** 用自定义 adapter 代替网络层,记录每次请求的配置 */ +const mockAdapter = (responder: Responder) => { + const calls: InternalAxiosRequestConfig[] = [] + const adapter: AxiosAdapter = async (config) => { + calls.push(config) + const partial = await responder(config) + return { + status: 200, + statusText: 'OK', + headers: {}, + config, + request: { responseType: config.responseType }, + data: undefined, + ...partial + } as AxiosResponse + } + service.defaults.adapter = adapter + return calls +} + +describe('config/axios 请求封装', () => { + it('携带访问令牌,GET 禁用缓存,成功时返回 data 字段', async () => { + await login() + const calls = mockAdapter(() => ({ data: { code: 200, data: { id: 7 } } })) + const result = await request.get<{ id: number }>({ url: '/system/user/get', params: { id: 7 } }) + expect(result).toEqual({ id: 7 }) + expect(calls[0].headers.Authorization).toBe('Bearer access-1') + expect(calls[0].headers['Cache-Control']).toBe('no-cache') + expect(calls[0].params).toEqual({ id: 7 }) + }) + + it('白名单接口与 isToken=false 不带令牌', async () => { + await login() + const calls = mockAdapter(() => ({ data: { code: 200, data: true } })) + await request.post({ url: '/system/auth/login', data: {} }) + await request.get({ url: '/public', headers: { isToken: false } }) + expect(calls[0].headers.Authorization).toBeUndefined() + expect(calls[1].headers.Authorization).toBeUndefined() + }) + + it('表单编码的 POST 自动序列化请求体', async () => { + await login() + const calls = mockAdapter(() => ({ data: { code: 200, data: null } })) + await request.post({ + url: '/x', + data: { a: 1, b: 'c' }, + headersType: 'application/x-www-form-urlencoded' + }) + expect(calls[0].data).toBe('a=1&b=c') + }) + + it('业务错误码:500 提示通用错误,403 提示刷新,其他码通知后台消息', async () => { + await login() + mockAdapter((config) => { + if (config.url === '/e500') return { data: { code: 500, msg: '内部错误' } } + if (config.url === '/e403') return { data: { code: 403, msg: '没有权限' } } + return { data: { code: 1002, msg: '用户名已存在' } } + }) + await expect(request.get({ url: '/e500' })).rejects.toThrow('内部错误') + expect(ElMessage.error).toHaveBeenCalled() + await expect(request.get({ url: '/e403' })).rejects.toMatchObject({ status: 403 }) + expect(ElNotification.error).toHaveBeenCalledWith({ title: '没有权限,权限可能已调整,请刷新页面' }) + await expect(request.get({ url: '/e1002' })).rejects.toThrow('用户名已存在') + expect(ElNotification.error).toHaveBeenCalledWith({ title: '用户名已存在' }) + }) + + it('无后台消息时按错误码表兜底', async () => { + await login() + mockAdapter(() => ({ data: { code: 404 } })) + await expect(request.get({ url: '/missing' })).rejects.toThrow('访问资源不存在') + }) + + it('401 时用刷新令牌续期并以新令牌重试原请求', async () => { + await login('old-access', 'refresh-1') + // 后端续期只换发访问令牌,刷新令牌保持不变 + const post = vi.spyOn(axios, 'post').mockResolvedValue({ + data: { code: 0, data: token('new-access', 'refresh-1') } + }) + const calls = mockAdapter((config) => + config.headers.Authorization === 'Bearer new-access' + ? { data: { code: 200, data: 'ok' } } + : { data: { code: 401, msg: '未登录' } } + ) + await expect(request.get({ url: '/system/user/page' })).resolves.toBe('ok') + expect(post).toHaveBeenCalledOnce() + expect(post.mock.calls[0][0]).toContain('/system/auth/refresh-token') + expect(post.mock.calls[0][2]?.params).toEqual({ refreshToken: 'refresh-1' }) + expect(calls).toHaveLength(2) + expect(getAuthSession()).toMatchObject({ accessToken: 'new-access', refreshToken: 'refresh-1' }) + }) + + it('并发 401 只续期一次', async () => { + await login('old-access', 'refresh-1') + const post = vi.spyOn(axios, 'post').mockImplementation( + () => + new Promise((resolve) => + setTimeout(() => resolve({ data: { code: 200, data: token('new-access', 'refresh-1') } }), 5) + ) + ) + mockAdapter((config) => + config.headers.Authorization === 'Bearer new-access' + ? { data: { code: 200, data: config.url } } + : { data: { code: 401 } } + ) + const results = await Promise.all([ + request.get({ url: '/a' }), + request.get({ url: '/b' }), + request.get({ url: '/c' }) + ]) + expect(results).toEqual(['/a', '/b', '/c']) + expect(post).toHaveBeenCalledTimes(1) + }) + + it('刷新令牌失效时清除本地会话并拒绝请求', async () => { + await login('old-access', 'refresh-1') + vi.spyOn(axios, 'post').mockResolvedValue({ data: { code: 401, msg: '刷新令牌已过期' } }) + mockAdapter(() => ({ data: { code: 401 } })) + await expect(request.get({ url: '/x' })).rejects.toThrow('登录状态已失效,请重新登录') + await vi.waitFor(() => expect(getAuthSession().accessToken).toBe('')) + }) + + it('skipAuthRefresh 的 401 直接失败,不续期', async () => { + await login() + const post = vi.spyOn(axios, 'post') + mockAdapter(() => ({ data: { code: 401, msg: '未登录' } })) + await expect(request.get({ url: '/x', skipAuthRefresh: true })).rejects.toThrow('未登录') + expect(post).not.toHaveBeenCalled() + }) + + it('下载:二进制响应原样返回,JSON 错误体按业务错误处理', async () => { + await login() + const file = new Blob(['a,b'], { type: 'application/vnd.ms-excel' }) + mockAdapter((config) => + config.url === '/export-ok' + ? { data: file } + : { + // 用 Node 的 Blob,便于源码中 new Response(blob).json() 读取(jsdom 的 Blob 不被 undici 识别) + data: new NodeBlob([JSON.stringify({ code: 1001, msg: '导出失败' })], { + type: 'application/json' + }) + } + ) + await expect(request.download({ url: '/export-ok' })).resolves.toBe(file) + await expect(request.download({ url: '/export-bad' })).rejects.toThrow('导出失败') + }) + + it('网络异常与超时给出中文提示', async () => { + await login() + service.defaults.adapter = async () => { + throw new axios.AxiosError('timeout of 30000ms exceeded', 'ECONNABORTED') + } + await expect(request.get({ url: '/slow' })).rejects.toThrow('timeout') + expect(ElMessage.error).toHaveBeenCalled() + }) + + it('会话已被其他标签页替换时拒绝旧请求结果', async () => { + await login('access-1', 'refresh-1') + mockAdapter(async () => { + await withAuthSessionLock(() => setToken(token('access-2', 'refresh-9'), 'session-2')) + return { data: { code: 200, data: 'stale' } } + }) + await expect(request.get({ url: '/x' })).rejects.toThrow('登录会话已变更') + }) +}) diff --git a/tests/unit/helpers/app.ts b/tests/unit/helpers/app.ts new file mode 100644 index 0000000..c7fd47f --- /dev/null +++ b/tests/unit/helpers/app.ts @@ -0,0 +1,102 @@ +import type { App, Plugin } from 'vue' +import type { AxiosResponse, InternalAxiosRequestConfig } from 'axios' +import { createMemoryHistory, createRouter, type Router } from 'vue-router' +import VueDOMPurifyHTML from 'vue-dompurify-html' +import { setupAuth, setupMountedFocus } from '@/directives' +import { setupElementPlus } from '@/plugins/elementPlus' +import { setupGlobCom } from '@/components' +import { service } from '@/config/axios/service' +import { useUserStore } from '@/store/modules/user' +import { getAuthSession, setToken, withAuthSessionLock } from '@/utils/auth' + +export interface RecordedRequest { + method: string + url: string + params?: unknown + data?: unknown +} + +export type Responder = (request: RecordedRequest) => unknown + +/** 分页接口返回空页,其余返回空数组;可按 URL 定制 */ +export const defaultResponder: Responder = (request) => + /page|list-page/i.test(request.url) ? { list: [], total: 0 } : [] + +/** + * 以 axios adapter 替换网络层:业务代码走真实的 request 封装与拦截器, + * 只把响应换成测试数据,并记录发出的请求。 + */ +export const mockBackend = (responder: Responder = defaultResponder) => { + const requests: RecordedRequest[] = [] + service.defaults.adapter = async (config: InternalAxiosRequestConfig) => { + const request: RecordedRequest = { + method: (config.method || 'get').toUpperCase(), + url: config.url || '', + params: config.params, + data: typeof config.data === 'string' ? safeJson(config.data) : config.data + } + requests.push(request) + return { + status: 200, + statusText: 'OK', + headers: {}, + config, + request: { responseType: config.responseType }, + data: { code: 200, data: responder(request), msg: '' } + } as AxiosResponse + } + return requests +} + +const safeJson = (value: string) => { + try { + return JSON.parse(value) + } catch { + return value + } +} + +/** 已登录、拥有全部权限的管理员会话 */ +export const loginAsAdmin = async () => { + if (!getAuthSession().accessToken) { + await withAuthSessionLock(() => + setToken( + { + id: 1, + accessToken: 'test-access', + refreshToken: 'test-refresh', + userId: 1, + userType: 2, + clientId: 'ckcloud', + expiresTime: 0 + }, + 'test-session' + ) + ) + } + const userStore = useUserStore() + userStore.permissions = new Set(['*:*:*']) + userStore.roles = ['super_admin'] + userStore.user = { id: 1, avatar: '', nickname: '管理员', deptId: 1 } + userStore.isSetUser = true +} + +export const createTestRouter = (): Router => + createRouter({ + history: createMemoryHistory(), + routes: [{ path: '/:pathMatch(.*)*', name: 'any', component: { render: () => null } }] + }) + +/** 与 main.ts 一致的全局注册(不含 i18n / 打印等与渲染无关的插件) */ +export const appPlugins = (router: Router = createTestRouter()): Plugin[] => [ + router, + VueDOMPurifyHTML, + { + install(app: App) { + setupElementPlus(app) + setupGlobCom(app) + setupAuth(app) + setupMountedFocus(app) + } + } +] diff --git a/tests/unit/hooks/hooks.spec.ts b/tests/unit/hooks/hooks.spec.ts new file mode 100644 index 0000000..68f1374 --- /dev/null +++ b/tests/unit/hooks/hooks.spec.ts @@ -0,0 +1,172 @@ +import { defineComponent, h, nextTick, ref, resolveDirective, withDirectives } from 'vue' +import { mount } from '@vue/test-utils' +import VueDOMPurifyHTML from 'vue-dompurify-html' +import { ElMessage, ElMessageBox } from 'element-plus' +import { CACHE_KEY, clearLegacyLoginForm, scopedStorageKey, useCache } from '@/hooks/web/useCache' +import { useLocalPagination } from '@/hooks/web/useLocalPagination' +import { useValidator } from '@/hooks/web/useValidator' +import { useMessage } from '@/hooks/web/useMessage' +import { useI18n } from '@/hooks/web/useI18n' +import { useTitle } from '@/hooks/web/useTitle' +import { useDictStore } from '@/store/modules/dict' +import { DictTag } from '@/components/DictTag' +import { getDictLabel, getDictObj, getIntDictOptions, getStrDictOptions, getBoolDictOptions } from '@/utils/dict' + +vi.mock('element-plus', async (importOriginal) => { + const actual = await importOriginal() + return { + ...actual, + ElMessage: Object.assign(vi.fn(), { error: vi.fn(), success: vi.fn(), warning: vi.fn(), info: vi.fn() }), + ElMessageBox: Object.assign(vi.fn(), { + alert: vi.fn().mockResolvedValue('confirm'), + confirm: vi.fn().mockResolvedValue('confirm'), + prompt: vi.fn().mockResolvedValue({ value: '理由' }) + }) + } +}) + +describe('hooks/useCache', () => { + it('根路径部署时键名不加前缀,读写 localStorage', () => { + expect(scopedStorageKey('k')).toBe('k') + const { wsCache } = useCache() + wsCache.set(CACHE_KEY.LANG, 'zh-CN') + expect(wsCache.get(CACHE_KEY.LANG)).toBe('zh-CN') + expect(localStorage.getItem(CACHE_KEY.LANG)).toContain('zh-CN') + }) + + it('进入登录页清除旧版“记住密码”缓存的口令', () => { + const { wsCache } = useCache() + wsCache.set(CACHE_KEY.LoginForm, { username: 'admin', password: 'secret', rememberMe: true }) + wsCache.set('loginForm', { password: 'legacy' }) + clearLegacyLoginForm() + expect(wsCache.get(CACHE_KEY.LoginForm)).toBeNull() + expect(wsCache.get('loginForm')).toBeNull() + expect(JSON.stringify(localStorage)).not.toContain('secret') + }) +}) + +describe('hooks/useLocalPagination', () => { + it('按页切片、页码越界纠正、数据变化后重置', () => { + const source = ref(Array.from({ length: 25 }, (_, i) => i + 1)) + const keyword = ref('') + const pager = useLocalPagination(() => source.value, { pageSize: 10, resetOn: [keyword] }) + expect(pager.total.value).toBe(25) + expect(pager.pageCount.value).toBe(3) + expect(pager.rows.value).toEqual([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) + pager.page.value = 3 + expect(pager.rows.value).toEqual([21, 22, 23, 24, 25]) + pager.page.value = 99 + expect(pager.page.value).toBe(3) + keyword.value = 'x' + expect(pager.page.value).toBe(1) + pager.pageSize.value = 0 + expect(pager.pageSize.value).toBe(10) + source.value = [1] + expect(pager.pageCount.value).toBe(1) + }) +}) + +describe('hooks/useValidator', () => { + const { required, lengthRange, notSpace, notSpecialCharacters } = useValidator() + const run = (rule: ReturnType, value: string) => + new Promise((resolve) => + (rule.validator as (r: unknown, v: string, cb: (e?: Error) => void) => void)({}, value, resolve) + ) + + it('必填与长度规则', () => { + expect(required('请输入名称')).toEqual({ required: true, message: '请输入名称' }) + expect(lengthRange({ min: 2, max: 8, message: '2-8 位' })).toEqual({ min: 2, max: 8, message: '2-8 位' }) + }) + + it('不允许空格与特殊字符', async () => { + expect(await run(notSpace('不能有空格'), 'a b')).toBeInstanceOf(Error) + expect(await run(notSpace(), 'ab')).toBeUndefined() + expect(await run(notSpecialCharacters('非法'), 'a { + it('消息与确认框统一走 element-plus', async () => { + const message = useMessage() + message.success('保存成功') + message.error('失败') + expect(ElMessage.success).toHaveBeenCalledWith('保存成功') + expect(ElMessage.error).toHaveBeenCalledWith('失败') + await message.alertWarning('注意') + expect(ElMessageBox.alert).toHaveBeenCalled() + }) +}) + +describe('hooks/useI18n 与 useTitle', () => { + it('未安装 i18n 时原样返回 key(带命名空间)', () => { + expect(useI18n().t('common.ok')).toBe('common.ok') + expect(useI18n('login').t('title')).toBe('login.title') + }) + + it('useTitle 同步 document.title', async () => { + const title = useTitle() + await nextTick() + expect(document.title).toBe(title.value) + title.value = '财开云平台 - 用户管理' + await nextTick() + expect(document.title).toBe('财开云平台 - 用户管理') + }) +}) + +describe('utils/dict 与 DictTag 组件', () => { + beforeEach(() => { + const store = useDictStore() + store.isSetDict = true + store.dictMap = { + common_status: [ + { value: '0', label: '开启', colorType: 'success', cssClass: '' }, + { value: '1', label: '关闭', colorType: 'info', cssClass: '#b7390b' } + ], + infra_boolean_string: [{ value: 'true', label: '是', colorType: '', cssClass: '' }] + } as unknown as Map + }) + + it('字典取值转换', () => { + expect(getIntDictOptions('common_status').map((d) => d.value)).toEqual([0, 1]) + expect(getStrDictOptions('common_status').map((d) => d.value)).toEqual(['0', '1']) + expect(getBoolDictOptions('infra_boolean_string')[0].value).toBe(true) + expect(getDictLabel('common_status', 1)).toBe('关闭') + expect(getDictObj('common_status', 0)?.colorType).toBe('success') + expect(getDictLabel('not_exist', 1)).toBe('') + }) + + it('DictTag 按值渲染标签,支持逗号分隔多值与自定义颜色', () => { + const one = mount(DictTag, { props: { type: 'common_status', value: 0 } }) + expect(one.text()).toBe('开启') + const many = mount(DictTag, { props: { type: 'common_status', value: '0,1' } }) + expect(many.findAll('.el-tag')).toHaveLength(2) + expect(many.html()).toContain('background-color: rgb(183, 57, 11)') + const empty = mount(DictTag, { props: { type: 'common_status', value: '' } }) + expect(empty.text()).toBe('') + }) +}) + +describe('v-dompurify-html 消毒指令', () => { + it('渲染 HTML 时移除脚本与事件处理器', () => { + // 与业务模板中 v-dompurify-html 等价的渲染函数写法 + const Rendered = defineComponent({ + props: { html: { type: String, required: true } }, + setup(props) { + const purify = resolveDirective('dompurify-html')! + return () => withDirectives(h('div', { class: 'box' }), [[purify, props.html]]) + } + }) + const wrapper = mount(Rendered, { + props: { + html: '加粗链接' + }, + global: { plugins: [VueDOMPurifyHTML] } + }) + const html = wrapper.find('.box').html() + expect(html).toContain('加粗') + expect(html).not.toContain('onerror') + expect(html).not.toContain('>() + Object.defineProperty(navigator, 'locks', { + configurable: true, + value: { + request: (name: string, callback: () => unknown) => { + const previous = queue.get(name) ?? Promise.resolve() + const next = previous.then(() => callback()) + queue.set( + name, + next.catch(() => undefined) + ) + return next + } + } + }) +} + +// element-plus 部分组件依赖 matchMedia / ResizeObserver +if (!window.matchMedia) { + window.matchMedia = (query: string) => + ({ + matches: false, + media: query, + onchange: null, + addListener: () => undefined, + removeListener: () => undefined, + addEventListener: () => undefined, + removeEventListener: () => undefined, + dispatchEvent: () => false + }) as MediaQueryList +} +if (!('ResizeObserver' in window)) { + class ResizeObserverStub { + observe() {} + unobserve() {} + disconnect() {} + } + Object.defineProperty(window, 'ResizeObserver', { value: ResizeObserverStub }) +} + +config.global.stubs = { transition: false } + +afterEach(() => { + localStorage.clear() + sessionStorage.clear() +}) diff --git a/tests/unit/store/stores.spec.ts b/tests/unit/store/stores.spec.ts new file mode 100644 index 0000000..9ec1b06 --- /dev/null +++ b/tests/unit/store/stores.spec.ts @@ -0,0 +1,218 @@ +import { createPinia, setActivePinia } from 'pinia' +import type { RouteLocationNormalizedLoaded } from 'vue-router' +import { useUserStore } from '@/store/modules/user' +import { useDictStore } from '@/store/modules/dict' +import { usePermissionStore } from '@/store/modules/permission' +import { useTagsViewStore } from '@/store/modules/tagsView' +import { CACHE_KEY, useCache } from '@/hooks/web/useCache' +import { getAuthSession, setToken, withAuthSessionLock } from '@/utils/auth' +import * as LoginApi from '@/api/login' +import * as DictDataApi from '@/api/system/dict/dict.data' + +vi.mock('@/api/login', () => ({ + getInfo: vi.fn(), + loginOut: vi.fn().mockResolvedValue(undefined) +})) +vi.mock('@/api/system/dict/dict.data', () => ({ + getSimpleDictDataList: vi.fn() +})) + +const { wsCache } = useCache() +// 字典缓存在 sessionStorage +const { wsCache: sessionCache } = useCache('sessionStorage') + +const login = () => + withAuthSessionLock(() => + setToken( + { + id: 1, + accessToken: 'a', + refreshToken: 'r', + userId: 1, + userType: 2, + clientId: 'c', + expiresTime: 0 + }, + 's1' + ) + ) + +beforeEach(() => { + setActivePinia(createPinia()) +}) + +describe('store/user', () => { + it('无令牌时重置状态且不请求用户信息', async () => { + const store = useUserStore() + await expect(store.setUserInfoAction()).resolves.toBeNull() + expect(LoginApi.getInfo).not.toHaveBeenCalled() + expect(store.getIsSetUser).toBe(false) + }) + + it('登录后加载权限、角色、用户并写入缓存', async () => { + await login() + vi.mocked(LoginApi.getInfo).mockResolvedValue({ + permissions: ['system:user:query', 'system:user:update'], + roles: ['APP_ADMIN'], + user: { id: 9, avatar: '', nickname: '张三', deptId: 3 }, + menus: [{ id: 1, path: '/system' }] + } as never) + const store = useUserStore() + await store.setUserInfoAction() + expect(store.getPermissions.has('system:user:update')).toBe(true) + expect(store.getRoles).toEqual(['APP_ADMIN']) + expect(store.getUser.nickname).toBe('张三') + expect(store.getIsSetUser).toBe(true) + expect(wsCache.get(CACHE_KEY.ROLE_ROUTERS)).toEqual([{ id: 1, path: '/system' }]) + + await store.setUserNicknameAction('李四') + await store.setUserAvatarAction('/a.png') + expect(wsCache.get(CACHE_KEY.USER).user).toMatchObject({ nickname: '李四', avatar: '/a.png' }) + }) + + it('强制改密标记可清除', async () => { + await login() + vi.mocked(LoginApi.getInfo).mockResolvedValue({ + permissions: [], + roles: [], + user: { id: 1, avatar: '', nickname: 'a', deptId: 1, forcePasswordChange: true }, + menus: [] + } as never) + const store = useUserStore() + await store.setUserInfoAction() + expect(store.getForcePasswordChange).toBe(true) + await store.clearForcePasswordChange() + expect(store.getForcePasswordChange).toBe(false) + expect(wsCache.get(CACHE_KEY.USER).user.forcePasswordChange).toBe(false) + }) + + it('退出登录清除令牌、用户缓存与旧版记住的口令', async () => { + await login() + wsCache.set(CACHE_KEY.USER, { user: { id: 1 } }) + wsCache.set(CACHE_KEY.LoginForm, { username: 'u', password: 'p' }) + const store = useUserStore() + store.permissions = new Set(['x']) + await store.loginOut() + expect(LoginApi.loginOut).toHaveBeenCalled() + expect(getAuthSession().accessToken).toBe('') + expect(wsCache.get(CACHE_KEY.USER)).toBeNull() + expect(wsCache.get(CACHE_KEY.LoginForm)).toBeNull() + expect(store.getPermissions.size).toBe(0) + }) +}) + +describe('store/dict', () => { + const dictData = [ + { dictType: 'common_status', value: '0', label: '开启', colorType: 'primary', cssClass: '' }, + { dictType: 'common_status', value: '1', label: '关闭', colorType: 'info', cssClass: '' }, + { dictType: 'system_user_sex', value: '1', label: '男', colorType: '', cssClass: '' } + ] + + it('首次加载按 dictType 分组并缓存', async () => { + vi.mocked(DictDataApi.getSimpleDictDataList).mockResolvedValue(dictData as never) + const store = useDictStore() + await store.setDictMap() + expect(store.getIsSetDict).toBe(true) + expect(store.getDictByType('common_status')).toHaveLength(2) + expect(store.getDictByType('system_user_sex')[0]).toMatchObject({ value: '1', label: '男' }) + expect(sessionCache.get(CACHE_KEY.DICT_CACHE)).toBeTruthy() + }) + + it('缓存命中时不再请求接口', async () => { + sessionCache.set(CACHE_KEY.DICT_CACHE, { cached_type: [{ value: 'x', label: 'X' }] }) + const store = useDictStore() + await store.setDictMap() + expect(DictDataApi.getSimpleDictDataList).not.toHaveBeenCalled() + expect(store.getDictByType('cached_type')[0].label).toBe('X') + }) + + it('resetDict 强制重新拉取', async () => { + sessionCache.set(CACHE_KEY.DICT_CACHE, { old: [] }) + vi.mocked(DictDataApi.getSimpleDictDataList).mockResolvedValue(dictData as never) + const store = useDictStore() + await store.resetDict() + expect(DictDataApi.getSimpleDictDataList).toHaveBeenCalledOnce() + expect(store.getDictByType('old')).toBeUndefined() + expect(store.getDictByType('common_status')).toHaveLength(2) + }) +}) + +describe('store/permission', () => { + it('根据缓存菜单生成动态路由并在末尾追加 404', async () => { + wsCache.set(CACHE_KEY.ROLE_ROUTERS, [ + { + id: 1, + parentId: 0, + name: '系统管理', + path: '/system', + icon: 'ep:setting', + visible: true, + keepAlive: true, + children: [ + { + id: 2, + parentId: 1, + name: '用户管理', + path: 'user', + component: 'system/user/user/index', + componentName: 'SystemUser', + visible: true, + keepAlive: true + } + ] + } + ]) + const store = usePermissionStore() + await store.generateRoutes() + const added = store.addRouters + expect(added[0]).toMatchObject({ path: '/system', meta: { title: '系统管理', alwaysShow: true } }) + expect(typeof added[0].component).toBe('function') + expect(added[0].children![0]).toMatchObject({ name: 'SystemUser', meta: { title: '用户管理' } }) + expect(added[added.length - 1].name).toBe('404Page') + expect(store.getRouters.some((r) => r.path === '/system')).toBe(true) + store.setMenuTabRouters(added) + expect(store.getMenuTabRouters).toBe(added) + }) +}) + +describe('store/tagsView', () => { + const view = (path: string, extra: Partial = {}) => + ({ + path, + fullPath: path, + name: path.replace(/\W/g, '') || 'root', + meta: { title: path }, + matched: [], + ...extra + }) as unknown as RouteLocationNormalizedLoaded + + it('新增标签去重、同名标题加序号并维护缓存', () => { + const store = useTagsViewStore() + store.addView(view('/a')) + store.addView(view('/a')) + store.addView(view('/a', { fullPath: '/a?id=2' })) + store.addView(view('/b', { meta: { title: '/b', noCache: true } } as never)) + store.addView(view('/hidden', { meta: { title: 'h', noTagsView: true } } as never)) + expect(store.getVisitedViews.map((v) => v.fullPath)).toEqual(['/a', '/a?id=2', '/b']) + expect(store.getVisitedViews[1].meta.titleSuffix).toBe('2') + expect([...store.getCachedViews]).toEqual(['a']) + }) + + it('关闭左侧、右侧、其他与修改标题', () => { + const store = useTagsViewStore() + ;['/1', '/2', '/3', '/4'].forEach((p) => store.addView(view(p))) + store.delLeftViews(view('/2')) + expect(store.getVisitedViews.map((v) => v.path)).toEqual(['/2', '/3', '/4']) + store.delRightViews(view('/3')) + expect(store.getVisitedViews.map((v) => v.path)).toEqual(['/2', '/3']) + store.delOthersViews(view('/3')) + expect(store.getVisitedViews.map((v) => v.path)).toEqual(['/3']) + store.setSelectedTag(view('/3')) + store.setTitle('新标题') + expect(store.getVisitedViews[0].meta.title).toBe('新标题') + store.updateVisitedView(view('/3', { query: { x: '1' } } as never)) + expect(store.getVisitedViews[0].query).toEqual({ x: '1' }) + store.delView(view('/3')) + expect(store.getVisitedViews).toHaveLength(0) + }) +}) diff --git a/tests/unit/utils/auth.spec.ts b/tests/unit/utils/auth.spec.ts new file mode 100644 index 0000000..afcd367 --- /dev/null +++ b/tests/unit/utils/auth.spec.ts @@ -0,0 +1,153 @@ +import { + AUTH_SESSION_KEY, + assertAuthSessionLockHeld, + createAuthNonce, + formatToken, + getAccessToken, + getAuthSession, + getRefreshToken, + getTenantId, + getVisitTenantId, + isAuthSessionCurrent, + isPageSessionCurrent, + removeToken, + setTenantId, + setToken, + setVisitTenantId, + withAuthSessionLock +} from '@/utils/auth' +import { + appUrl, + assertSsoFlowCurrent, + beginSsoFlow, + completeSsoFlow, + consumeSsoFlow, + currentAppPath, + isIdentityCenterPage, + safeRedirect +} from '@/utils/ssoFlow' +import type { TokenType } from '@/api/login/types' + +const token = (access: string, refresh: string, binding?: string): TokenType => ({ + id: 1, + accessToken: access, + refreshToken: refresh, + userId: 1, + userType: 2, + clientId: 'ckcloud', + expiresTime: 0, + ssoSessionBinding: binding +}) + +describe('utils/auth 登录会话', () => { + it('无会话或存储损坏时返回空会话', () => { + expect(getAuthSession()).toEqual({ + accessToken: '', + refreshToken: '', + sessionId: '', + ssoSessionBinding: '' + }) + localStorage.setItem(AUTH_SESSION_KEY, '{broken') + expect(getAccessToken()).toBe('') + localStorage.setItem(AUTH_SESSION_KEY, JSON.stringify({ accessToken: 1 })) + expect(getRefreshToken()).toBe('') + }) + + it('令牌只能在跨标签页锁内写入', () => { + expect(() => setToken(token('a', 'r'))).toThrow('登录状态必须在跨标签页锁内更新') + expect(() => assertAuthSessionLockHeld()).toThrow() + }) + + it('锁内一次写入完整令牌对,同会话续期保留 SSO 绑定', async () => { + await withAuthSessionLock(() => setToken(token('a1', 'r1', 'bind-1'), 'sid')) + expect(getAuthSession()).toEqual({ + accessToken: 'a1', + refreshToken: 'r1', + sessionId: 'sid', + ssoSessionBinding: 'bind-1' + }) + expect(isPageSessionCurrent()).toBe(true) + await withAuthSessionLock(() => setToken(token('a2', 'r1'), 'sid')) + expect(getAuthSession().ssoSessionBinding).toBe('bind-1') + const snapshot = getAuthSession() + expect(isAuthSessionCurrent(snapshot)).toBe(true) + await withAuthSessionLock(() => setToken(token('a3', 'r1'), 'sid')) + expect(isAuthSessionCurrent(snapshot)).toBe(false) + }) + + it('不完整的登录响应被拒绝', async () => { + await expect(withAuthSessionLock(() => setToken(token('', 'r')))).rejects.toThrow( + '登录响应不完整' + ) + }) + + it('removeToken 清除会话', async () => { + await withAuthSessionLock(() => setToken(token('a', 'r'), 'sid')) + await withAuthSessionLock(() => removeToken()) + expect(getAccessToken()).toBe('') + }) + + it('锁按顺序串行执行', async () => { + const order: number[] = [] + await Promise.all([ + withAuthSessionLock(async () => { + await new Promise((r) => setTimeout(r, 10)) + order.push(1) + }), + withAuthSessionLock(() => { + order.push(2) + }) + ]) + expect(order).toEqual([1, 2]) + }) + + it('随机数、令牌格式与租户缓存', () => { + expect(createAuthNonce()).toMatch(/^[0-9a-f]{64}$/) + expect(formatToken('x')).toBe('Bearer x') + setTenantId(1) + setVisitTenantId(2) + expect(getTenantId()).toBe(1) + expect(getVisitTenantId()).toBe(2) + }) +}) + +describe('utils/ssoFlow 单点登录流程', () => { + it('appUrl / currentAppPath / isIdentityCenterPage', () => { + expect(appUrl('/sso/login')).toBe(`${location.origin}/sso/login`) + expect(currentAppPath()).toBe(location.pathname + location.search + location.hash) + expect(isIdentityCenterPage()).toBe(false) + }) + + it('safeRedirect 只允许站内业务路径,拦截外链与登录页', () => { + expect(safeRedirect('/system/user?id=1#x')).toBe('/system/user?id=1#x') + expect(safeRedirect('//evil.com/a')).toBe('/') + expect(safeRedirect('https://evil.com')).toBe('/') + expect(safeRedirect('/a\\b')).toBe('/') + expect(safeRedirect('/sso/callback')).toBe('/') + expect(safeRedirect('/zcy/login')).toBe('/') + expect(safeRedirect('/auth-status')).toBe('/') + expect(safeRedirect('/403')).toBe('/') + expect(safeRedirect(123)).toBe('/') + }) + + it('发起的流程只能被同一 requestId 与类型消费一次', async () => { + const flow = await beginSsoFlow('login', '/system/user', 'org-1') + expect(flow.redirect).toBe('/system/user') + expect(flow.organizationKey).toBe('org-1') + expect(() => consumeSsoFlow('other', 'login')).toThrow('登录请求不匹配') + expect(() => consumeSsoFlow(flow.requestId, 'logout')).toThrow('登录请求不匹配') + const consumed = consumeSsoFlow(flow.requestId, 'login') + expect(consumed.requestId).toBe(flow.requestId) + expect(() => consumeSsoFlow(flow.requestId, 'login')).toThrow('登录请求已失效') + }) + + it('新流程覆盖旧流程,过期流程失效', async () => { + const first = await beginSsoFlow('login') + await beginSsoFlow('logout') + expect(() => assertSsoFlowCurrent(first)).toThrow('登录状态已变更') + const second = await beginSsoFlow('login') + expect(() => assertSsoFlowCurrent({ ...second, createdAt: Date.now() - 9 * 3600_000 })).toThrow() + await withAuthSessionLock(() => completeSsoFlow(second)) + expect(() => assertSsoFlowCurrent(second)).toThrow() + }) +}) diff --git a/tests/unit/utils/color.spec.ts b/tests/unit/utils/color.spec.ts new file mode 100644 index 0000000..147fca6 --- /dev/null +++ b/tests/unit/utils/color.spec.ts @@ -0,0 +1,36 @@ +import { colorIsDark, getCssColorVariable, hexToRGB, isHexColor, lighten, mix } from '@/utils/color' + +describe('utils/color', () => { + it('isHexColor 只接受 3/6 位十六进制', () => { + expect(isHexColor('#fff')).toBe(true) + expect(isHexColor('#B7390B')).toBe(true) + expect(isHexColor('fff')).toBe(false) + expect(isHexColor('#ffff')).toBe(false) + }) + + it('hexToRGB 支持简写与透明度,非法值原样返回小写', () => { + expect(hexToRGB('#fff')).toBe('RGB(255,255,255)') + expect(hexToRGB('#000000', 0.5)).toBe('RGBA(0,0,0,0.5)') + expect(hexToRGB('RED')).toBe('red') + }) + + it('colorIsDark 按亮度判断', () => { + expect(colorIsDark('#000000')).toBe(true) + expect(colorIsDark('#ffffff')).toBe(false) + expect(colorIsDark('nope')).toBeUndefined() + }) + + it('lighten 与 mix 计算结果', () => { + expect(lighten('#000000', 100)).toBe('#ffffff') + expect(lighten('101010', 0)).toBe('#101010') + expect(mix('#ffffff', '#000000', 0.5)).toBe('#808080') + expect(mix('#ff0000', '#0000ff', 1)).toBe('#ff0000') + }) + + it('getCssColorVariable 读取根节点变量', () => { + document.documentElement.style.setProperty('--el-color-primary', '#409eff') + expect(getCssColorVariable()).toBe('#409eff') + expect(getCssColorVariable('--el-color-primary', 0.2)).toBe('RGBA(64,158,255,0.2)') + expect(getCssColorVariable('--not-exist')).toBe('') + }) +}) diff --git a/tests/unit/utils/index.spec.ts b/tests/unit/utils/index.spec.ts new file mode 100644 index 0000000..c26eec3 --- /dev/null +++ b/tests/unit/utils/index.spec.ts @@ -0,0 +1,87 @@ +import { + fileSizeFormatter, + findIndex, + formatTime, + generateUUID, + getUrlValue, + humpToUnderline, + jsonParse, + setCssVar, + subString, + trim +} from '@/utils' +import { dateFormatter, formatDate, formatPast2 } from '@/utils/formatTime' + +describe('utils/index', () => { + it('字符串工具', () => { + expect(humpToUnderline('leftMenuWidth')).toBe('left-menu-width') + expect(trim(' a b ')).toBe('a b') + expect(subString('abcdef', 0, 3)).toBe('abc') + expect(subString('ab', 0, 3)).toBe('ab') + }) + + it('findIndex 返回首个命中下标', () => { + expect(findIndex([1, 2, 3], (v: number) => v > 1)).toBe(1) + expect(findIndex([1], (v: number) => v > 5)).toBe(-1) + }) + + it('formatTime 支持年月日时分秒', () => { + const date = new Date(2026, 9, 27, 8, 5, 9) + expect(formatTime(date, 'yyyy-MM-dd HH:mm:ss')).toBe('2026-10-27 08:05:09') + expect(formatTime(date.getTime(), 'yy/M/d')).toBe('26/10/27') + expect(formatTime('', 'yyyy')).toBe('') + }) + + it('generateUUID 生成 v4 格式', () => { + const id = generateUUID() + expect(id).toMatch(/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/) + expect(generateUUID()).not.toBe(id) + }) + + it('fileSizeFormatter 以 1024 进位', () => { + expect(fileSizeFormatter(null, null, 1024)).toBe('1.00 KB') + expect(fileSizeFormatter(null, null, '1572864')).toBe('1.50 MB') + expect(fileSizeFormatter(null, null, 10)).toBe('10.00 Bytes') + }) + + it('getUrlValue 读取查询参数', () => { + expect(getUrlValue('id', 'https://a.com/x?id=12&b=2')).toBe('12') + expect(getUrlValue('none', 'https://a.com/x?id=12')).toBe('') + expect(getUrlValue('', 'https://a.com')).toBe('') + }) + + it('jsonParse 失败时原样返回', () => { + const warn = vi.spyOn(console, 'warn').mockImplementation(() => undefined) + expect(jsonParse('{"a":1}')).toEqual({ a: 1 }) + expect(jsonParse('not json')).toBe('not json') + expect(warn).toHaveBeenCalledOnce() + }) + + it('setCssVar 写入样式变量', () => { + const el = document.createElement('div') + setCssVar('--x', '10px', el) + expect(el.style.getPropertyValue('--x')).toBe('10px') + }) +}) + +describe('utils/formatTime', () => { + it('formatDate 默认格式与自定义格式', () => { + const d = new Date(2026, 0, 2, 3, 4, 5) + expect(formatDate(d)).toBe('2026-01-02 03:04:05') + expect(formatDate(d, 'YYYY/MM/DD')).toBe('2026/01/02') + expect(formatDate(null)).toBe('') + }) + + it('formatPast2 把毫秒转成中文时长', () => { + expect(formatPast2(0)).toBe('0 秒') + expect(formatPast2(5_000)).toBe('5 秒') + expect(formatPast2(3 * 60_000)).toBe('3 分钟') + expect(formatPast2(2 * 3_600_000 + 60_000)).toBe('2 小时 1 分钟') + expect(formatPast2(26 * 3_600_000)).toBe('1 天2 小时 0 分钟') + }) + + it('dateFormatter 用于表格列', () => { + expect(dateFormatter({}, {}, new Date(2026, 9, 1))).toBe('2026-10-01 00:00:00') + expect(dateFormatter({}, {}, undefined)).toBe('') + }) +}) diff --git a/tests/unit/utils/is.spec.ts b/tests/unit/utils/is.spec.ts new file mode 100644 index 0000000..5437119 --- /dev/null +++ b/tests/unit/utils/is.spec.ts @@ -0,0 +1,50 @@ +import { + is, + isArray, + isBoolean, + isDef, + isEmpty, + isFunction, + isNull, + isNumber, + isObject, + isString, + isUnDef, + isUrl +} from '@/utils/is' + +describe('utils/is', () => { + it('基础类型判断', () => { + expect(is(new Date(), 'Date')).toBe(true) + expect(isDef(0)).toBe(true) + expect(isUnDef(undefined)).toBe(true) + expect(isObject({})).toBe(true) + expect(isObject(null)).toBe(false) + expect(isObject([])).toBe(false) + expect(isNull(null)).toBe(true) + expect(isNumber(1)).toBe(true) + expect(isNumber('1')).toBe(false) + expect(isString('a')).toBe(true) + expect(isFunction(() => 1)).toBe(true) + expect(isBoolean(false)).toBe(true) + expect(isArray([1])).toBe(true) + }) + + it('isEmpty 覆盖空值、字符串、数组、Map/Set 与对象', () => { + expect(isEmpty(null)).toBe(true) + expect(isEmpty(undefined)).toBe(true) + expect(isEmpty('')).toBe(true) + expect(isEmpty([])).toBe(true) + expect(isEmpty(new Map())).toBe(true) + expect(isEmpty(new Set([1]))).toBe(false) + expect(isEmpty({})).toBe(true) + expect(isEmpty({ a: 1 })).toBe(false) + expect(isEmpty(0)).toBe(false) + }) + + it('isUrl 识别外链', () => { + expect(isUrl('https://cxtest.zjsck.com:8443/portal/')).toBe(true) + expect(isUrl('http://a.com/x?y=1#z')).toBe(true) + expect(isUrl('/system/user')).toBe(false) + }) +}) diff --git a/tests/unit/utils/parameterValue.spec.ts b/tests/unit/utils/parameterValue.spec.ts new file mode 100644 index 0000000..8b1af1b --- /dev/null +++ b/tests/unit/utils/parameterValue.spec.ts @@ -0,0 +1,33 @@ +import { parseParameterValue, validateParameterValue } from '@/utils/parameterValue' + +describe('utils/parameterValue', () => { + it('number 类型拒绝空白、非数字与无穷大', () => { + expect(validateParameterValue('', 'number').valid).toBe(false) + expect(validateParameterValue(' ', 'number').valid).toBe(false) + expect(validateParameterValue('abc', 'number')).toEqual({ + valid: false, + message: '请输入合法的有限数字' + }) + expect(validateParameterValue('Infinity', 'number').valid).toBe(false) + expect(validateParameterValue('12.5', 'number')).toEqual({ valid: true }) + }) + + it('boolean 类型只接受 true/false 字面量', () => { + expect(validateParameterValue('true', 'boolean').valid).toBe(true) + expect(validateParameterValue('false', 'boolean').valid).toBe(true) + expect(validateParameterValue('1', 'boolean').message).toBe('请选择「是」或「否」') + }) + + it('json 类型校验语法', () => { + expect(validateParameterValue('{"a":1}', 'json').valid).toBe(true) + expect(validateParameterValue('{a:1}', 'json').message).toBe('请输入合法的 JSON') + }) + + it('按声明类型解析,非法值抛出校验信息', () => { + expect(parseParameterValue('42', 'number')).toBe(42) + expect(parseParameterValue('false', 'boolean')).toBe(false) + expect(parseParameterValue('[1,2]', 'json')).toEqual([1, 2]) + expect(parseParameterValue(' raw ', 'string')).toBe(' raw ') + expect(() => parseParameterValue('x', 'number')).toThrow('请输入合法的有限数字') + }) +}) diff --git a/tests/unit/utils/permission.spec.ts b/tests/unit/utils/permission.spec.ts new file mode 100644 index 0000000..0bf0553 --- /dev/null +++ b/tests/unit/utils/permission.spec.ts @@ -0,0 +1,89 @@ +import { defineComponent, h, withDirectives, resolveDirective, createApp } from 'vue' +import { mount } from '@vue/test-utils' +import { MenuPermission } from '@/utils/menuPermission' +import { checkPermi, checkRole } from '@/utils/permission' +import { hasPermission } from '@/directives/permission/hasPermi' +import { setupAuth, setupMountedFocus } from '@/directives' +import { useUserStore } from '@/store/modules/user' +import { CACHE_KEY, useCache } from '@/hooks/web/useCache' + +const { wsCache } = useCache() + +const grant = (...permissions: string[]) => { + useUserStore().permissions = new Set(permissions) +} + +describe('utils/permission 与 v-hasPermi / v-hasRole', () => { + it('checkPermi 命中任一权限或全部权限通配', () => { + grant('system:user:query') + expect(checkPermi(['system:user:query', 'x'])).toBe(true) + expect(checkPermi(['system:user:delete'])).toBe(false) + grant('*:*:*') + expect(hasPermission(['anything'])).toBe(true) + }) + + it('checkRole 读取缓存用户角色,超管放行,空参数返回 false', () => { + const error = vi.spyOn(console, 'error').mockImplementation(() => undefined) + wsCache.set(CACHE_KEY.USER, { roles: ['APP_ADMIN'] }) + expect(checkRole(['APP_ADMIN'])).toBe(true) + expect(checkRole(['OTHER'])).toBe(false) + wsCache.set(CACHE_KEY.USER, { roles: ['super_admin'] }) + expect(checkRole(['OTHER'])).toBe(true) + expect(checkRole([])).toBe(false) + expect(error).toHaveBeenCalled() + }) + + const Buttons = defineComponent({ + setup() { + const hasPermi = resolveDirective('hasPermi')! + const hasRole = resolveDirective('hasRole')! + return () => + h('div', [ + withDirectives(h('button', { id: 'del' }, '删除'), [[hasPermi, ['system:user:delete']]]), + withDirectives(h('button', { id: 'query' }, '查询'), [[hasPermi, ['system:user:query']]]), + withDirectives(h('button', { id: 'admin' }, '管理'), [[hasRole, ['APP_ADMIN']]]) + ]) + } + }) + + it('无权限的按钮被移除,有权限的保留', () => { + grant('system:user:query') + wsCache.set(CACHE_KEY.USER, { roles: ['VIEWER'] }) + const wrapper = mount(Buttons, { global: { plugins: [{ install: setupAuth }] } }) + expect(wrapper.find('#query').exists()).toBe(true) + expect(wrapper.find('#del').exists()).toBe(false) + expect(wrapper.find('#admin').exists()).toBe(false) + }) + + it('角色匹配时保留按钮', () => { + grant() + wsCache.set(CACHE_KEY.USER, { roles: ['APP_ADMIN'] }) + const wrapper = mount(Buttons, { global: { plugins: [{ install: setupAuth }] } }) + expect(wrapper.find('#admin').exists()).toBe(true) + }) + + it('指令值为空时抛错,提示使用方式', () => { + const app = createApp({ render: () => null }) + setupAuth(app) + const directive = app.directive('hasPermi') as ( + el: Element, + binding: { value: unknown } + ) => void + expect(() => directive(document.createElement('i'), { value: [] })).toThrow() + }) + + it('v-mountedFocus 挂载后聚焦', () => { + const Input = defineComponent({ + setup() { + const focus = resolveDirective('mountedFocus')! + return () => withDirectives(h('input', { id: 'i' }), [[focus]]) + } + }) + const wrapper = mount(Input, { + attachTo: document.body, + global: { plugins: [{ install: setupMountedFocus }] } + }) + expect(document.activeElement?.id).toBe('i') + wrapper.unmount() + }) +}) diff --git a/tests/unit/utils/tree.spec.ts b/tests/unit/utils/tree.spec.ts new file mode 100644 index 0000000..c640bba --- /dev/null +++ b/tests/unit/utils/tree.spec.ts @@ -0,0 +1,101 @@ +import { + eachTree, + filter, + findNode, + findPath, + forEach, + handleTree, + handleTree2, + treeMap, + treeToList +} from '@/utils/tree' + +interface Dept { + id: number + parentId: number + name: string + children?: Dept[] +} + +const flat = (): Dept[] => [ + { id: 1, parentId: 0, name: '财开' }, + { id: 2, parentId: 1, name: '信息部' }, + { id: 3, parentId: 1, name: '财务部' }, + { id: 4, parentId: 2, name: '开发组' }, + { id: 5, parentId: 99, name: '孤立节点' } +] + +describe('utils/tree', () => { + it('handleTree 按 parentId 组装树,父节点不存在的作为根', () => { + const tree = handleTree(flat()) + expect(tree.map((n) => n.id)).toEqual([1, 5]) + expect(tree[0].children!.map((n) => n.id)).toEqual([2, 3]) + expect(tree[0].children![0].children![0].name).toBe('开发组') + }) + + it('handleTree 非数组输入返回空数组', () => { + const warn = vi.spyOn(console, 'warn').mockImplementation(() => undefined) + expect(handleTree(null as unknown as Dept[])).toEqual([]) + expect(warn).toHaveBeenCalled() + }) + + it('handleTree 支持自定义字段名', () => { + const data = [ + { key: 'a', pid: '', label: 'A' }, + { key: 'b', pid: 'a', label: 'B' } + ] + const tree = handleTree>(data, 'key', 'pid', 'items') + expect(tree).toHaveLength(1) + expect((tree[0].items as unknown[]).length).toBe(1) + }) + + it('handleTree2 以 rootId 取根且不修改入参', () => { + const files = [ + { id: 'src', parentId: '/', label: 'src' }, + { id: 'src/a.ts', parentId: 'src', label: 'a.ts' } + ] + const tree = handleTree2(files, 'id', 'parentId', 'children', '/') + expect(tree).toHaveLength(1) + expect((tree[0] as { children?: unknown[] }).children).toHaveLength(1) + expect('children' in files[0]).toBe(false) + // 默认根取最小 parentId + const numeric = handleTree2(flat().slice(0, 4)) + expect(numeric.map((n) => n.id)).toEqual([1]) + }) + + it('treeToList / findNode / findPath / forEach 遍历', () => { + const tree = handleTree(flat()) + expect(treeToList(tree).map((n) => n.id)).toEqual([1, 2, 4, 3, 5]) + expect(findNode(tree, (n) => n.id === 4)?.name).toBe('开发组') + expect(findNode(tree, (n) => n.id === 404)).toBeNull() + expect(findPath(tree, (n) => n.id === 4)?.map((n) => n.id)).toEqual([1, 2, 4]) + expect(findPath(tree, (n) => n.id === 404)).toBeNull() + const visited: number[] = [] + forEach(tree, (n) => { + visited.push(n.id) + return n.id === 2 // 返回 true 终止遍历 + }) + expect(visited).toEqual([1, 2]) + }) + + it('filter 保留命中节点及其祖先', () => { + const tree = handleTree(flat()) + const result = filter(tree, (n) => n.name === '开发组') + expect(result.map((n) => n.id)).toEqual([1]) + expect(result[0].children!.map((n) => n.id)).toEqual([2]) + expect(result[0].children![0].children!.map((n) => n.id)).toEqual([4]) + }) + + it('treeMap 转换结构,eachTree 传入父节点', () => { + const tree = handleTree(flat()) + const mapped = treeMap(tree, { conversion: (n: Dept) => ({ value: n.id, label: n.name }) }) + expect(mapped[0]).toMatchObject({ value: 1, label: '财开' }) + expect((mapped[0] as unknown as { children: unknown[] }).children).toHaveLength(2) + const parents: Record = {} + eachTree(tree, (node: Dept, parent: Dept) => { + parents[node.id] = parent.name + }) + expect(parents[4]).toBe('信息部') + expect(parents[1]).toBeUndefined() + }) +}) diff --git a/tests/unit/views/smoke.spec.ts b/tests/unit/views/smoke.spec.ts new file mode 100644 index 0000000..366e08a --- /dev/null +++ b/tests/unit/views/smoke.spec.ts @@ -0,0 +1,67 @@ +import { flushPromises, mount, shallowMount } from '@vue/test-utils' +import type { Component } from 'vue' +import { appPlugins, loginAsAdmin, mockBackend } from '../helpers/app' + +/** + * 页面冒烟测试:逐个挂载 src/views 下的页面与页面组件(子组件浅渲染), + * 走真实的 request 封装(网络层替换为空数据),断言能渲染出 DOM 且不抛异常。 + * 用于发现导入错误、setup 运行时异常、模板引用了不存在的变量等回归。 + */ +const pages = import.meta.glob<{ default: Component }>('/src/views/**/*.vue') + +interface SmokeOptions { + /** 必填 props 的最小合法值 */ + props?: Record + /** 父组件通过 provide 注入的数据 */ + provide?: Record + /** 通过 ref 调用子组件方法的页面需完整渲染子组件 */ + deep?: boolean + /** 无法在 jsdom 中渲染的页面,写明原因 */ + skip?: string +} + +const options: Record = { + '/src/views/Home/Index2.vue': { skip: 'echarts-wordcloud 依赖 canvas,jsdom 不支持' }, + '/src/views/Redirect/Redirect.vue': { skip: '依赖路由 params.path,由路由守卫在浏览器中验证' }, + '/src/views/Profile/components/BasicInfo.vue': { deep: true } +} + +const entries = Object.keys(pages) + .sort() + .filter((path) => !options[path]?.skip) + +describe('views 冒烟渲染', () => { + it('跳过的页面都写明了原因', () => { + for (const [path, option] of Object.entries(options)) { + expect(Object.keys(pages)).toContain(path) + if (option.skip !== undefined) expect(option.skip.length).toBeGreaterThan(5) + } + }) + + beforeEach(async () => { + await loginAsAdmin() + }) + + it.each(entries)('%s', async (path) => { + mockBackend() + const errors: unknown[] = [] + const mod = await pages[path]() + const option = options[path] ?? {} + const wrapper = (option.deep ? mount : shallowMount)(mod.default, { + props: option.props, + global: { + plugins: appPlugins(), + provide: option.provide, + config: { + errorHandler: (err) => { + errors.push(err) + } + } + } + }) + await flushPromises() + expect(errors).toEqual([]) + expect(wrapper.html().length).toBeGreaterThan(0) + wrapper.unmount() + }) +}) diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..38376ef --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,43 @@ +{ + "compilerOptions": { + "target": "esnext", + "useDefineForClassFields": true, + "module": "esnext", + "moduleResolution": "node", + "strict": true, + "jsx": "preserve", + "sourceMap": true, + "resolveJsonModule": true, + "esModuleInterop": true, + "lib": ["esnext", "dom"], + "baseUrl": "./", + "allowJs": true, + "forceConsistentCasingInFileNames": true, + "allowSyntheticDefaultImports": true, + "strictFunctionTypes": false, + "noUnusedLocals": true, + "noUnusedParameters": true, + "experimentalDecorators": true, + "noImplicitAny": false, + "skipLibCheck": true, + "paths": { + "@/*": ["src/*"] + }, + "types": [ + // "@intlify/unplugin-vue-i18n/types", + "vite/client" + // "element-plus/global", + // "@types/qrcode", + // "vite-plugin-svg-icons/client" + ], + "outDir": "target", // 请保留这个属性,防止tsconfig.json文件报错 + "typeRoots": ["./node_modules/@types/", "./types"] + }, + "include": [ + "src", + "types/**/*.d.ts", + "src/types/auto-imports.d.ts", + "src/types/auto-components.d.ts" + ], + "exclude": ["dist", "target", "node_modules"] +} diff --git a/types/components.d.ts b/types/components.d.ts new file mode 100644 index 0000000..9d0ba09 --- /dev/null +++ b/types/components.d.ts @@ -0,0 +1,8 @@ +declare module 'vue' { + export interface GlobalComponents { + Icon: typeof import('@/components/Icon')['Icon'] + DictTag: typeof import('@/components/DictTag')['DictTag'] + } +} + +export {} diff --git a/types/env.d.ts b/types/env.d.ts new file mode 100644 index 0000000..c7ab80d --- /dev/null +++ b/types/env.d.ts @@ -0,0 +1,36 @@ +/// + +declare module '*.vue' { + import { DefineComponent } from 'vue' + // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types + const component: DefineComponent<{}, {}, any> + export default component +} + +interface ImportMetaEnv { + readonly VITE_APP_TITLE: string + /** 统一登录应用编码,默认 CKCLOUD */ + readonly VITE_APP_CODE?: string + readonly VITE_PORT: number + readonly VITE_OPEN: string + readonly VITE_DEV: string + readonly VITE_APP_TENANT_ENABLE: string + readonly VITE_APP_DOCALERT_ENABLE: string + readonly VITE_BASE_URL: string + readonly VITE_API_URL: string + readonly VITE_BASE_PATH: string + readonly VITE_DROP_DEBUGGER: string + readonly VITE_DROP_CONSOLE: string + readonly VITE_SOURCEMAP: string + readonly VITE_OUT_DIR: string + readonly VITE_GOVIEW_URL: string + readonly VITE_ALLOW_INSECURE_HTTP_SSO?: string + readonly VITE_SSO_CENTER_PORT_MAP?: string + // API 加解密相关配置 +} + +declare global { + interface ImportMeta { + readonly env: ImportMetaEnv + } +} diff --git a/types/global.d.ts b/types/global.d.ts new file mode 100644 index 0000000..eebe9bb --- /dev/null +++ b/types/global.d.ts @@ -0,0 +1,58 @@ +export {} +declare global { + interface Fn { + (...arg: T[]): T + } + + type Nullable = T | null + + type ElRef = Nullable + + type Recordable = Record + + type ComponentRef = InstanceType + + type LocaleType = 'zh-CN' | 'en' + + declare type TimeoutHandle = ReturnType + declare type IntervalHandle = ReturnType + + type AxiosHeaders = + | 'application/json' + | 'application/x-www-form-urlencoded' + | 'multipart/form-data' + + type AxiosMethod = 'get' | 'post' | 'delete' | 'put' | 'GET' | 'POST' | 'DELETE' | 'PUT' + + type AxiosResponseType = 'arraybuffer' | 'blob' | 'document' | 'json' | 'text' | 'stream' + + interface AxiosConfig { + params?: any + data?: any + url?: string + method?: AxiosMethod + headersType?: string + responseType?: AxiosResponseType + } + + interface IResponse { + code: string + data: T extends any ? T : T & any + } + + interface PageParam { + pageSize?: number + pageNo?: number + } + + interface Tree { + id: number + name: string + children?: Tree[] | any[] + } + // 分页数据公共返回 + interface PageResult { + list: T // 数据 + total: number // 总量 + } +} diff --git a/types/router.d.ts b/types/router.d.ts new file mode 100644 index 0000000..7a595db --- /dev/null +++ b/types/router.d.ts @@ -0,0 +1,86 @@ +import type { RouteRecordRaw } from 'vue-router' +import { defineComponent } from 'vue' + +/** +* redirect: noredirect 当设置 noredirect 的时候该路由在面包屑导航中不可被点击 +* name:'router-name' 设定路由的名字,一定要填写不然使用时会出现各种问题 +* meta : { + hidden: true 当设置 true 的时候该路由不会再侧边栏出现 如404,login等页面(默认 false) + + alwaysShow: true 当你一个路由下面的 children 声明的路由大于1个时,自动会变成嵌套的模式, + 只有一个时,会将那个子路由当做根路由显示在侧边栏, + 若你想不管路由下面的 children 声明的个数都显示你的根路由, + 你可以设置 alwaysShow: true,这样它就会忽略之前定义的规则, + 一直显示根路由(默认 false) + + title: 'title' 设置该路由在侧边栏和面包屑中展示的名字 + + titleSuffix: '2' 当 path 和 title 重复时的后缀或备注 + + icon: 'svg-name' 设置该路由的图标 + + noCache: true 如果设置为true,则不会被 缓存(默认 false) + + breadcrumb: false 如果设置为false,则不会在breadcrumb面包屑中显示(默认 true) + + affix: true 如果设置为true,则会一直固定在tag项中(默认 false) + + noTagsView: true 如果设置为true,则不会出现在tag中(默认 false) + + activeMenu: '/home' 显示高亮的路由路径 + + followAuth: '/home' 跟随哪个路由进行权限过滤 + + canTo: true 设置为true即使hidden为true,也依然可以进行路由跳转(默认 false) + } +**/ +declare module 'vue-router' { + interface RouteMeta extends Record { + hidden?: boolean + alwaysShow?: boolean + title?: string + titleSuffix?: string + icon?: string + noCache?: boolean + breadcrumb?: boolean + affix?: boolean + activeMenu?: string + /** 页面标题栏返回按钮的目标路径。 */ + pageBackPath?: string + noTagsView?: boolean + followAuth?: string + canTo?: boolean + } +} + +type Component = + | ReturnType + | (() => Promise) + | (() => Promise) + +declare global { + interface AppRouteRecordRaw extends Omit { + name: string + meta: RouteMeta + component?: Component | string + children?: AppRouteRecordRaw[] + props?: Recordable + fullPath?: string + keepAlive?: boolean + } + + interface AppCustomRouteRecordRaw extends Omit { + icon: any + name: string + meta: RouteMeta + component: string + componentName?: string + path: string + redirect: string + children?: AppCustomRouteRecordRaw[] + keepAlive?: boolean + visible?: boolean + parentId?: number + alwaysShow?: boolean + } +} diff --git a/types/wangeditor-types.d.ts b/types/wangeditor-types.d.ts new file mode 100644 index 0000000..2363f56 --- /dev/null +++ b/types/wangeditor-types.d.ts @@ -0,0 +1,27 @@ +import { SlateDescendant } from '@wangeditor-next/editor' + +declare module 'slate' { + interface CustomTypes { + // 扩展 text + Text: { + text: string + bold?: boolean + italic?: boolean + code?: boolean + through?: boolean + underline?: boolean + sup?: boolean + sub?: boolean + color?: string + bgColor?: string + fontSize?: string + fontFamily?: string + } + + // 扩展 Element 的 type 属性 + Element: { + type: string + children: SlateDescendant[] + } + } +} diff --git a/uno.config.ts b/uno.config.ts new file mode 100644 index 0000000..15e0ec7 --- /dev/null +++ b/uno.config.ts @@ -0,0 +1,105 @@ +import { defineConfig, toEscapedSelector as e, presetWind3 } from 'unocss' + +export default defineConfig({ + // ...UnoCSS options + rules: [ + [ + /^custom-hover$/, + ([], { rawSelector }) => { + const selector = e(rawSelector) + return ` +${selector} { + display: flex; + height: 100%; + padding: 0 10px; + cursor: pointer; + align-items: center; + transition: background var(--transition-time-02); +} +/* you can have multiple rules */ +${selector}:hover { + background-color: var(--top-header-hover-color); +} +.dark ${selector}:hover { + background-color: var(--el-bg-color-overlay); +} +` + } + ], + [ + /^layout-border__left$/, + ([], { rawSelector }) => { + const selector = e(rawSelector) + return ` +${selector}:before { + content: ""; + position: absolute; + top: 0; + left: 0; + height: 100%; + background-color: var(--el-border-color); + z-index: 3; +} +` + } + ], + [ + /^layout-border__right$/, + ([], { rawSelector }) => { + const selector = e(rawSelector) + return ` +${selector}:after { + content: ""; + position: absolute; + top: 0; + right: 0; + width: 1px; + height: 100%; + background-color: var(--el-border-color); + z-index: 3; +} +` + } + ], + [ + /^layout-border__top$/, + ([], { rawSelector }) => { + const selector = e(rawSelector) + return ` +${selector}:before { + content: ""; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 1px; + background-color: var(--el-border-color); + z-index: 3; +} +` + } + ], + [ + /^layout-border__bottom$/, + ([], { rawSelector }) => { + const selector = e(rawSelector) + return ` +${selector}:after { + content: ""; + position: absolute; + bottom: 0; + left: 0; + width: 100%; + height: 1px; + background-color: var(--el-border-color); + z-index: 3; +} +` + } + ] + ], + presets: [presetWind3({ dark: 'class', attributify: false })], + shortcuts: { + 'wh-full': 'w-full h-full' + } +}) diff --git a/vite.config.ts b/vite.config.ts new file mode 100644 index 0000000..acb05f2 --- /dev/null +++ b/vite.config.ts @@ -0,0 +1,97 @@ +/// +import {resolve} from 'path' +import type {ConfigEnv, UserConfig} from 'vite' +import {loadEnv} from 'vite' +import {createVitePlugins} from './build/vite' +import {exclude, include} from "./build/vite/optimize" +// 当前执行node命令时文件夹的地址(工作目录) +const root = process.cwd() + +// 路径查找 +function pathResolve(dir: string) { + return resolve(root, '.', dir) +} + +// https://vitejs.dev/config/ +export default ({mode}: ConfigEnv): UserConfig => { + const env = loadEnv(mode, root) + return { + base: env.VITE_BASE_PATH, + root: root, + // 服务端渲染 + server: { + port: Number(env.VITE_PORT) || undefined, // 端口号 + host: "0.0.0.0", + open: env.VITE_OPEN === 'true' + }, + // 项目使用的vite插件。 单独提取到build/vite/plugin中管理 + plugins: createVitePlugins(), + css: { + preprocessorOptions: { + scss: { + // 通过 Sass 搜索路径加载公共变量,兼容 macOS 下的绝对路径解析。 + loadPaths: [pathResolve('src/styles')], + additionalData: '@use "variables.scss" as *;\n', + javascriptEnabled: true, + silenceDeprecations: ["legacy-js-api"], // 参考自 https://stackoverflow.com/questions/78997907/the-legacy-js-api-is-deprecated-and-will-be-removed-in-dart-sass-2-0-0 + } + } + }, + resolve: { + extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.scss', '.css'], + alias: [ + { + find: 'vue-i18n', + replacement: 'vue-i18n/dist/vue-i18n.cjs.js' + }, + { + find: /^@\//, + replacement: `${pathResolve('src')}/` + } + ] + }, + build: { + minify: 'terser', + outDir: env.VITE_OUT_DIR || 'dist', + sourcemap: env.VITE_SOURCEMAP === 'true' ? 'inline' : false, + // brotliSize: false, + terserOptions: { + compress: { + drop_debugger: env.VITE_DROP_DEBUGGER === 'true', + drop_console: env.VITE_DROP_CONSOLE === 'true' + } + }, + rollupOptions: { + output: { + manualChunks: { + echarts: ['echarts'], // 将 echarts 单独打包 + 'form-create': ['@form-create/element-ui'], // 表单组件单独打包 + 'form-designer': ['@form-create/designer'], + } + }, + }, + }, + optimizeDeps: {include, exclude}, + // 单元测试:复用上面的别名、插件(自动导入)与 SCSS 配置 + test: { + environment: 'jsdom', + globals: true, + include: ['tests/unit/**/*.spec.ts'], + setupFiles: ['tests/unit/setup.ts'], + css: false, + // element-plus 的按需样式(.css)需经 Vite 处理,不能交给 Node 直接加载 + server: {deps: {inline: ['element-plus']}}, + restoreMocks: true, + clearMocks: true, + testTimeout: 30000, + coverage: { + provider: 'v8', + reporter: ['text-summary', 'text', 'html', 'lcov'], + reportsDirectory: 'coverage', + // 统计全部业务源码(含未被测试加载的文件);仅排除类型声明与生成文件 + include: ['src/**/*.{ts,tsx,vue}'], + exclude: ['src/**/*.d.ts', 'src/types/**'] + } + } + } +} diff --git a/web-types.json b/web-types.json new file mode 100644 index 0000000..602f212 --- /dev/null +++ b/web-types.json @@ -0,0 +1,19 @@ +{ + "$schema": "https://json.schemastore.org/web-types", + "framework": "vue", + "name": "name written in package.json", + "version": "version written in package.json", + "contributions": { + "html": { + "types-syntax": "typescript", + "attributes": [ + { + "name": "v-hasPermi" + }, + { + "name": "v-hasRole" + } + ] + } + } +}