commit 75da20582ae800ff2d9871c4fff97af817671bd4 Author: Qi <3194726156@qq.com> Date: Thu Aug 7 21:32:38 2025 +0800 初始化 diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..dccf841 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,19 @@ +root = true + +[*] +charset=utf-8 +end_of_line=lf +insert_final_newline=true +indent_style=space +indent_size=2 +max_line_length = 100 + +[*.{yml,yaml,json}] +indent_style = space +indent_size = 2 + +[*.md] +trim_trailing_whitespace = false + +[Makefile] +indent_style = tab diff --git a/.env b/.env new file mode 100644 index 0000000..621a5f9 --- /dev/null +++ b/.env @@ -0,0 +1,22 @@ +# port +VITE_PORT = 3100 + +# 网站标题 +VITE_GLOB_APP_TITLE = JeecgBoot 企业级低代码平台 + +# 简称,此变量只能是字符/下划线 +VITE_GLOB_APP_SHORT_NAME = JeecgBoot_Pro + +# 单点登录服务端地址 +VITE_GLOB_APP_CAS_BASE_URL=http://cas.test.com:8443/cas + +# 是否开启单点登录 +VITE_GLOB_APP_OPEN_SSO = false + +# 开启微前端模式 +VITE_GLOB_APP_OPEN_QIANKUN=true + +# 文件预览地址 +VITE_GLOB_ONLINE_VIEW_URL=http://fileview.jeecg.com/onlinePreview + + diff --git a/.env.development b/.env.development new file mode 100644 index 0000000..fb3498c --- /dev/null +++ b/.env.development @@ -0,0 +1,33 @@ +# 是否打开mock +VITE_USE_MOCK = true + +# 发布路径 +VITE_PUBLIC_PATH = / + + +# 跨域代理,您可以配置多个 ,请注意,没有换行符 +VITE_PROXY = [["/jeecgboot","http://localhost:8080/jeecg-boot"],["/upload","http://localhost:3300/upload"]] + +#后台接口全路径地址(必填) +VITE_GLOB_DOMAIN_URL=http://localhost:8080/jeecg-boot + +#后台接口父地址(必填) +VITE_GLOB_API_URL=/jeecgboot + +# 接口前缀 +VITE_GLOB_API_URL_PREFIX= + +#微前端qiankun应用,命名必须以VITE_APP_SUB_开头,jeecg-app-1为子应用的项目名称,也是子应用的路由父路径 +VITE_APP_SUB_jeecg-app-1 = '//localhost:8092' + + +# 填写后将作为乾坤子应用启动,主应用注册时AppName需保持一致(放开 VITE_GLOB_QIANKUN_MICRO_APP_NAME 参数表示jeecg-vue3将以乾坤子应用模式启动) +#VITE_GLOB_QIANKUN_MICRO_APP_NAME=jeecg-vue3 +# 作为乾坤子应用启动时必填,需与qiankun主应用注册子应用时填写的 entry 保持一致 +#VITE_GLOB_QIANKUN_MICRO_APP_ENTRY=//localhost:3001/jeecg-vue3 + +# 全局隐藏哪些布局。可选属性:sider,header,multi-tabs;多个用逗号隔开 +#VITE_GLOB_HIDE_LAYOUT_TYPES=sider,header,multi-tabs + +# 在线文档编辑版本。可选属性:wps, offlineWps(离线版) ,onlyoffice +VITE_GLOB_ONLINE_DOCUMENT_VERSION=wps diff --git a/.env.prod_electron b/.env.prod_electron new file mode 100644 index 0000000..ca01335 --- /dev/null +++ b/.env.prod_electron @@ -0,0 +1,38 @@ +# 是否启用mock +VITE_USE_MOCK = false + +# 后台接口父地址(必填) +# 【Electron下需要与 VITE_GLOB_DOMAIN_URL 配置保持一致】 +VITE_GLOB_API_URL=https://api3.boot.jeecg.com + +# 后台接口全路径地址(必填) +VITE_GLOB_DOMAIN_URL=https://api3.boot.jeecg.com + +# 接口父路径前缀 +VITE_GLOB_API_URL_PREFIX= + +# 在线文档编辑版本。可选属性:wps, offlineWps(离线版), onlyoffice +VITE_GLOB_ONLINE_DOCUMENT_VERSION=wps + +# 全局隐藏哪些布局。可选属性:sider,header,multi-tabs;多个用逗号隔开 +#VITE_GLOB_HIDE_LAYOUT_TYPES=sider,header,multi-tabs + +# ----------------------------------------- +# ------------ 以下参数不建议修改 ------------ +# ----------------------------------------- + +# 发布路径 +# 【election下只能是 . 开头的相对路径,建议为 ./ 】 +VITE_PUBLIC_PATH = ./ + +# 是否启用gzip或brotli压缩 +# 选项值: gzip | brotli | none +# 如果需要多个可以使用“,”分隔 +# 【electron下由于是本地html文件访问,所以不需要压缩】 +VITE_BUILD_COMPRESS = 'none' + +# 使用压缩时是否删除原始文件,默认为false +VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE = false + +# ※ 请勿修改此项 ※ +VITE_GLOB_RUN_PLATFORM=electron diff --git a/.env.production b/.env.production new file mode 100644 index 0000000..74f6ee8 --- /dev/null +++ b/.env.production @@ -0,0 +1,34 @@ +# 是否启用mock +VITE_USE_MOCK = false + +# 发布路径 +VITE_PUBLIC_PATH = / + +# 是否启用gzip或brotli压缩 +# 选项值: gzip | brotli | none +# 如果需要多个可以使用“,”分隔 +VITE_BUILD_COMPRESS = 'gzip' + +# 使用压缩时是否删除原始文件,默认为false +VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE = false + +#后台接口父地址(必填) +VITE_GLOB_API_URL=/jeecgboot + +#后台接口全路径地址(必填) +VITE_GLOB_DOMAIN_URL=http://jeecg-boot-system:8080/jeecg-boot + +# 接口父路径前缀 +VITE_GLOB_API_URL_PREFIX= + + +# 填写后将作为乾坤子应用启动,主应用注册时AppName需保持一致(放开 VITE_GLOB_QIANKUN_MICRO_APP_NAME 参数表示jeecg-vue3将以乾坤子应用模式启动) +#VITE_GLOB_QIANKUN_MICRO_APP_NAME=jeecg-vue3 +# 作为乾坤子应用启动时必填,需与qiankun主应用注册子应用时填写的 entry 保持一致 +#VITE_GLOB_QIANKUN_MICRO_APP_ENTRY=//qiankun.boot3.jeecg.com/jeecg-vue3 + +# 全局隐藏哪些布局。可选属性:sider,header,multi-tabs;多个用逗号隔开 +#VITE_GLOB_HIDE_LAYOUT_TYPES=sider,header,multi-tabs + +# 在线文档编辑版本。可选属性:wps, offlineWps(离线版), onlyoffice +VITE_GLOB_ONLINE_DOCUMENT_VERSION=wps diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..348631b --- /dev/null +++ b/.eslintignore @@ -0,0 +1,15 @@ + +*.sh +node_modules +*.md +*.woff +*.ttf +.vscode +.idea +dist +/public +/docs +.husky +.local +/bin +Dockerfile diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 0000000..5fcac9e --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,78 @@ +// @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', + 'plugin:jest/recommended', + ], + rules: { + 'vue/script-setup-uses-vars': 'error', + '@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': [ + 'error', + { + argsIgnorePattern: '^_', + varsIgnorePattern: '^_', + }, + ], + 'no-unused-vars': [ + 'error', + { + argsIgnorePattern: '^_', + varsIgnorePattern: '^_', + }, + ], + '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/html-self-closing': [ + 'error', + { + html: { + void: 'always', + normal: 'never', + component: 'always', + }, + svg: 'always', + math: 'always', + }, + ], + }, +}); diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0150e17 --- /dev/null +++ b/.gitignore @@ -0,0 +1,35 @@ +node_modules +.DS_Store +.github +dist +.cache + +tests/server/static +tests/server/static/upload + +.local +# local env files +.env.local +.env.*.local +.eslintcache + +# Log files +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* + +# Editor directories and files +.idea +.svn +# .vscode +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? +/os_del.cmd +os_del.cmd +/.vscode/ +/.history/ +/svn clear.bat diff --git a/.gitpod.yml b/.gitpod.yml new file mode 100644 index 0000000..2191895 --- /dev/null +++ b/.gitpod.yml @@ -0,0 +1,6 @@ +ports: + - port: 3344 + onOpen: open-preview +tasks: + - init: yarn + command: yarn dev diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..24e8600 --- /dev/null +++ b/.npmrc @@ -0,0 +1,5 @@ +shamefully-hoist=true +strict-peer-dependencies=false + +electron_mirror=https://npmmirror.com/mirrors/electron/ +electron_builder_binaries_mirror=https://npmmirror.com/mirrors/electron-builder-binaries/ diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..f7e39e6 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,9 @@ +/dist/* +.local +.output.js +/node_modules/** + +**/*.svg +**/*.sh + +/public/* diff --git a/.stylelintignore b/.stylelintignore new file mode 100644 index 0000000..0517076 --- /dev/null +++ b/.stylelintignore @@ -0,0 +1,3 @@ +/dist/* +/public/* +public/* diff --git a/.yarnclean b/.yarnclean new file mode 100644 index 0000000..3e556ef --- /dev/null +++ b/.yarnclean @@ -0,0 +1,48 @@ +# test directories +__tests__ +test +tests +powered-test + +# asset directories +docs +doc +website +images +assets + +# examples +example +examples + +# code coverage directories +coverage +.nyc_output + +# build scripts +Makefile +Gulpfile.js +Gruntfile.js + +# configs +appveyor.yml +circle.yml +codeship-services.yml +codeship-steps.yml +wercker.yml +.tern-project +.gitattributes +.editorconfig +.*ignore +.eslintrc +.jshintrc +.flowconfig +.documentup.json +.yarn-metadata.json +.travis.yml + +# misc +*.md + +!istanbul-reports/lib/html/assets +!istanbul-api/node_modules/istanbul-reports/lib/html/assets diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..742c117 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,30 @@ +FROM registry.cn-hangzhou.aliyuncs.com/dockerhub_mirror/nginx +MAINTAINER jeecgos@163.com +VOLUME /tmp +ENV LANG en_US.UTF-8 +RUN echo "server { \ + listen 80; \ + location /jeecgboot/ { \ + proxy_pass http://jeecg-boot-system:8080/jeecg-boot/; \ + proxy_redirect off; \ + proxy_set_header Host jeecg-boot-system; \ + proxy_set_header X-Real-IP \$remote_addr; \ + proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for; \ + } \ + #解决Router(mode: 'history')模式下,刷新路由地址不能找到页面的问题 \ + location / { \ + root /var/www/html/; \ + index index.html index.htm; \ + if (!-e \$request_filename) { \ + rewrite ^(.*)\$ /index.html?s=\$1 last; \ + break; \ + } \ + } \ + access_log /var/log/nginx/access.log ; \ + } " > /etc/nginx/conf.d/default.conf \ + && mkdir -p /var/www \ + && mkdir -p /var/www/html + +ADD dist/ /var/www/html/ +EXPOSE 80 +EXPOSE 443 diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..de1700e --- /dev/null +++ b/LICENSE @@ -0,0 +1,33 @@ +MIT License + +Copyright (c) 2020-present, Jeecg + +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. + +In any case, you must not make any such use of this software as to develop software which may be considered competitive with this software. + + JeecgBoot 是由 北京国炬信息技术有限公司 发行的软件。 总部位于北京,地址:中国·北京·朝阳区科荟前街1号院奥林佳泰大厦。邮箱:jeecgos@163.com +本软件受适用的国家软件著作权法(包括国际条约)和开源协议 双重保护许可。 + +开源协议中文释意如下: +1.JeecgBoot开源版本无任何限制,在遵循本开源协议条款下,允许商用使用,不会造成侵权行为。 +2.允许基于本平台软件开展业务系统开发。 +3.在任何情况下,您不得使用本软件开发可能被认为与本软件竞争的软件。 + +最终解释权归:http://www.jeecg.com diff --git a/README.md b/README.md new file mode 100644 index 0000000..3b3eee3 --- /dev/null +++ b/README.md @@ -0,0 +1,106 @@ +JeecgBoot 企业级低代码开发平台 +=============== +当前最新版本: 3.8.1(预计发布时间:2025-04-21) + +[![AUR](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg)](https://github.com/zhangdaiscott/jeecg-boot/blob/master/LICENSE) +[![](https://img.shields.io/badge/Author-北京国炬软件-orange.svg)](http://jeecg.com/aboutusIndex) +[![](https://img.shields.io/badge/version-3.8.1-brightgreen.svg)](https://github.com +/zhangdaiscott/jeecg-boot) +[![GitHub stars](https://img.shields.io/github/stars/zhangdaiscott/jeecg-boot.svg?style=social&label=Stars)](https://github.com/zhangdaiscott/jeecg-boot) +[![GitHub forks](https://img.shields.io/github/forks/zhangdaiscott/jeecg-boot.svg?style=social&label=Fork)](https://github.com/zhangdaiscott/jeecg-boot) + + + +## 简介 +JeecgBoot-Vue3采用 Vue3.0、Vite、 Ant-Design-Vue4、TypeScript 等新技术方案,包括二次封装组件、utils、hooks、动态菜单、权限校验、按钮级别权限控制等功能。 + +> 强大的代码生成器让前后端代码一键生成! JeecgBoot引领低代码开发模式(OnlineCoding-> 代码生成-> 手工MERGE), 帮助解决Java项目70%的重复工作,让开发更多关注业务。既能快速提高效率,节省成本,同时又不失灵活性 + + +## 开发环境搭建 + +- [前端开发环境准备](https://help.jeecg.com/setup/dev) +- [前端项目快速启动](https://help.jeecg.com/setup/startup) +- [通过IDEA启动项目](https://help.jeecg.com/java/setup/idea/startup) + +## 技术文档 + +- 官方文档:[https://help.jeecg.com](https://help.jeecg.com) +- 快速入门:[快速入门](http://jeecg.com/doc/quickstart) | [常见问题](http://help.jeecg.com/qa) +- QQ交流群:964611995、⑩716488839(满)、⑨808791225(满)、其他满 +- 在线演示 : [系统演示](http://boot3.jeecg.com) | [APP演示](http://jeecg.com/appIndex) +> 演示系统的登录账号密码,请点击 [获取账号密码](http://jeecg.com/doc/demo) 获取 + + +## 安装与使用 + +* 本地环境安装 `Node.js 、npm 、pnpm` +* Node.js 版本建议`v20.15.0`,要求`Node 20+` 版本以上 + + ` ( 因为Vite5 不再支持已 EOL 的 Node.js 14 / 16 / 17 / 19,现在需要 Node.js 18 / 20+ )` + + + +- Get the project code + +```bash +git clone https://github.com/jeecgboot/JeecgBoot.git +``` + +- Installation dependencies + +```bash +cd JeecgBoot/jeecgboot-vue3 + +pnpm install +``` + +- 配置接口地址 `.env.development` + +```bash +VITE_PROXY = [["/jeecgboot","http://localhost:8080/jeecg-boot"],["/upload","http://localhost:3300/upload"]] +VITE_GLOB_DOMAIN_URL=http://localhost:8080/jeecg-boot +``` + +> 说明:把`http://localhost:8080/jeecg-boot` 换成自己地址,其他不用改。 + + +- run + +```bash +pnpm dev +``` + + +- build + +```bash +pnpm build +``` + +## 入门必备 + +本项目需要一定前端基础知识,请确保掌握 Vue 的基础知识,以便能处理一些常见的问题。 建议在开发前先学一下以下内容,提前了解和学习这些知识,会对项目理解非常有帮助: + +* [JeecgBoot文档](http://help.jeecg.com) +* [Vue3 文档](https://cn.vuejs.org/) +* [Vben文档](https://doc.vvbin.cn) +* [Ant-Design-Vue](https://www.antdv.com/docs/vue/introduce-cn/) +* [TypeScript](https://www.typescriptlang.org/) +* [Vue-router](https://router.vuejs.org/zh) +* [Es6](https://es6.ruanyifeng.com/) +* [Vitejs](https://cn.vitejs.dev/guide/) +* [Pinia(vuex替代方案)](https://pinia.esm.dev/introduction.html) +* [Vue-RFCS](https://github.com/vuejs/rfcs) +* [vxetable文档](https://vxetable.cn) + + +## 浏览器支持 + +**本地开发**推荐使用`Chrome 最新版`浏览器,**不支持**`Chrome 90`以下版本。 + +**生产环境**支持现代浏览器,不支持 IE。 + +| [![IE](https://raw.githubusercontent.com/alrra/browser-logos/master/src/archive/internet-explorer_9-11/internet-explorer_9-11_48x48.png)](http://godban.github.io/browsers-support-badges/)IE | [![ Edge](https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png)](http://godban.github.io/browsers-support-badges/)Edge | [![Firefox](https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png)](http://godban.github.io/browsers-support-badges/)Firefox | [![Chrome](https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png)](http://godban.github.io/browsers-support-badges/)Chrome | [![Safari](https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png)](http://godban.github.io/browsers-support-badges/)Safari | +| --- | --- | --- | --- | --- | +| not support | last 2 versions | last 2 versions | last 2 versions | last 2 versions | diff --git a/build/config/themeConfig.ts b/build/config/themeConfig.ts new file mode 100644 index 0000000..8dbe118 --- /dev/null +++ b/build/config/themeConfig.ts @@ -0,0 +1,79 @@ +import { generate } from '@ant-design/colors'; + +export const primaryColor = '#1890FF'; + +export const darkMode = 'light'; + +type Fn = (...arg: any) => any; + +type GenerateTheme = 'default' | 'dark'; + +export interface GenerateColorsParams { + mixLighten: Fn; + mixDarken: Fn; + tinycolor: any; + color?: string; +} + +export function generateAntColors(color: string, theme: GenerateTheme = 'default') { + return generate(color, { + theme, + }); +} + +export function getThemeColors(color?: string) { + const tc = color || primaryColor; + const lightColors = generateAntColors(tc); + const primary = lightColors[5]; + const modeColors = generateAntColors(primary, 'dark'); + + return [...lightColors, ...modeColors]; +} + +export function generateColors({ + color = primaryColor, + mixLighten, + mixDarken, + tinycolor, +}: GenerateColorsParams) { + const arr = new Array(19).fill(0); + const lightens = arr.map((_t, i) => { + return mixLighten(color, i / 5); + }); + + const darkens = arr.map((_t, i) => { + return mixDarken(color, i / 5); + }); + + const alphaColors = arr.map((_t, i) => { + return tinycolor(color) + .setAlpha(i / 20) + .toRgbString(); + }); + + const shortAlphaColors = alphaColors.map((item) => item.replace(/\s/g, '').replace(/0\./g, '.')); + + const tinycolorLightens = arr + .map((_t, i) => { + return tinycolor(color) + .lighten(i * 5) + .toHexString(); + }) + .filter((item) => item !== '#ffffff'); + + const tinycolorDarkens = arr + .map((_t, i) => { + return tinycolor(color) + .darken(i * 5) + .toHexString(); + }) + .filter((item) => item !== '#000000'); + return [ + ...lightens, + ...darkens, + ...alphaColors, + ...shortAlphaColors, + ...tinycolorDarkens, + ...tinycolorLightens, + ].filter((item) => !item.includes('-')); +} diff --git a/build/constant.ts b/build/constant.ts new file mode 100644 index 0000000..2c6119c --- /dev/null +++ b/build/constant.ts @@ -0,0 +1,6 @@ +/** + * The name of the configuration file entered in the production environment + */ +export const GLOB_CONFIG_FILE_NAME = '_app.config.js'; + +export const OUTPUT_DIR = 'dist'; diff --git a/build/generate/generateModifyVars.ts b/build/generate/generateModifyVars.ts new file mode 100644 index 0000000..705d339 --- /dev/null +++ b/build/generate/generateModifyVars.ts @@ -0,0 +1,49 @@ +import { primaryColor } from '../config/themeConfig'; +// import { getThemeVariables } from 'ant-design-vue/dist/theme'; +import { resolve } from 'path'; +import { generate } from '@ant-design/colors'; +import { theme } from 'ant-design-vue/lib'; +import convertLegacyToken from 'ant-design-vue/lib/theme/convertLegacyToken'; +const { defaultAlgorithm, defaultSeed } = theme; + +function generateAntColors(color: string, theme: 'default' | 'dark' = 'default') { + return generate(color, { + theme, + }); +} + +/** + * less global variable + */ +export function generateModifyVars() { + const palettes = generateAntColors(primaryColor); + const primary = palettes[5]; + + const primaryColorObj: Record = {}; + + for (let index = 0; index < 10; index++) { + primaryColorObj[`primary-${index + 1}`] = palettes[index]; + } + + const mapToken = defaultAlgorithm(defaultSeed); + const v3Token = convertLegacyToken(mapToken); + return { + ...v3Token, + // ...modifyVars, + // Used for global import to avoid the need to import each style file separately + // reference: Avoid repeated references + hack: `true; @import (reference) "${resolve('src/design/config.less')}";`, + 'primary-color': primary, + ...primaryColorObj, + 'info-color': primary, + 'processing-color': primary, + 'success-color': '#55D187', // Success color + 'error-color': '#ED6F6F', // False color + 'warning-color': '#EFBD47', // Warning color + //'border-color-base': '#EEEEEE', + 'font-size-base': '14px', // Main font size + 'border-radius-base': '2px', // Component/float fillet + 'link-color': primary, // Link color + 'app-content-background': '#fafafa', // Link color + }; +} diff --git a/build/generate/icon/index.ts b/build/generate/icon/index.ts new file mode 100644 index 0000000..1b1bfd7 --- /dev/null +++ b/build/generate/icon/index.ts @@ -0,0 +1,68 @@ +import path from 'path'; +import fs from 'fs-extra'; +import inquirer from 'inquirer'; +import colors from 'picocolors'; +import pkg from '../../../package.json'; + +async function generateIcon() { + const dir = path.resolve(process.cwd(), 'node_modules/@iconify/json'); + + const raw = await fs.readJSON(path.join(dir, 'collections.json')); + + const collections = Object.entries(raw).map(([id, v]) => ({ + ...(v as any), + id, + })); + + const choices = collections.map((item) => ({ key: item.id, value: item.id, name: item.name })); + + inquirer + .prompt([ + { + type: 'list', + name: 'useType', + choices: [ + { key: 'local', value: 'local', name: 'Local' }, + { key: 'onLine', value: 'onLine', name: 'OnLine' }, + ], + message: 'How to use icons?', + }, + { + type: 'list', + name: 'iconSet', + choices: choices, + message: 'Select the icon set that needs to be generated?', + }, + { + type: 'input', + name: 'output', + message: 'Select the icon set that needs to be generated?', + default: 'src/components/Icon/data', + }, + ]) + .then(async (answers) => { + const { iconSet, output, useType } = answers; + const outputDir = path.resolve(process.cwd(), output); + fs.ensureDir(outputDir); + const genCollections = collections.filter((item) => [iconSet].includes(item.id)); + const prefixSet: string[] = []; + for (const info of genCollections) { + const data = await fs.readJSON(path.join(dir, 'json', `${info.id}.json`)); + if (data) { + const { prefix } = data; + const isLocal = useType === 'local'; + const icons = Object.keys(data.icons).map((item) => `${isLocal ? prefix + ':' : ''}${item}`); + + await fs.writeFileSync( + path.join(output, `icons.data.ts`), + `export default ${isLocal ? JSON.stringify(icons) : JSON.stringify({ prefix, icons })}` + ); + prefixSet.push(prefix); + } + } + fs.emptyDir(path.join(process.cwd(), 'node_modules/.vite')); + console.log(`✨ ${colors.cyan(`[${pkg.name}]`)}` + ' - Icon generated successfully:' + `[${prefixSet}]`); + }); +} + +generateIcon(); diff --git a/build/getConfigFileName.ts b/build/getConfigFileName.ts new file mode 100644 index 0000000..46cb902 --- /dev/null +++ b/build/getConfigFileName.ts @@ -0,0 +1,7 @@ +/** + * Get the configuration file variable name + * @param env + */ +export const getConfigFileName = (env: Record) => { + return `__PRODUCTION__${env.VITE_GLOB_APP_SHORT_NAME || '__APP'}__CONF__`.toUpperCase().replace(/\s/g, ''); +}; diff --git a/build/script/buildConf.ts b/build/script/buildConf.ts new file mode 100644 index 0000000..4a1d824 --- /dev/null +++ b/build/script/buildConf.ts @@ -0,0 +1,57 @@ +/** + * 生成外部配置文件,用于生产发布后配置,无需重新打包 + */ +import { GLOB_CONFIG_FILE_NAME, OUTPUT_DIR } from '../constant'; +import fs, { writeFileSync } from 'fs-extra'; +import colors from 'picocolors'; + +import { getEnvConfig, getRootPath } from '../utils'; +import { getConfigFileName } from '../getConfigFileName'; + +import pkg from '../../package.json'; + +interface CreateConfigParams { + configName: string; + config: any; + configFileName?: string; +} + +function createConfig(params: CreateConfigParams) { + const { configName, config, configFileName } = params; + try { + const windowConf = `window.${configName}`; + // Ensure that the variable will not be modified + let configStr = `${windowConf}=${JSON.stringify(config)};`; + configStr += ` + Object.freeze(${windowConf}); + Object.defineProperty(window, "${configName}", { + configurable: false, + writable: false, + }); + `.replace(/\s/g, ''); + + fs.mkdirp(getRootPath(OUTPUT_DIR)); + writeFileSync(getRootPath(`${OUTPUT_DIR}/${configFileName}`), configStr); + + console.log(colors.cyan(`✨ [${pkg.name}]`) + ` - configuration file is build successfully:`); + console.log(colors.gray(OUTPUT_DIR + '/' + colors.green(configFileName)) + '\n'); + + // update-begin--author:sunjianlei---date:20250423---for:【QQYUN-9685】构建 electron 桌面应用 + // 如果是 Electron 环境,还需要将配置文件写入到 JSON 文件中 + if (config.VITE_GLOB_RUN_PLATFORM === 'electron') { + writeFileSync(getRootPath(`${OUTPUT_DIR}/electron/env.json`), JSON.stringify(config)); + console.log(colors.cyan(`✨ [${pkg.name}]`) + ` - electron env file is build successfully:`); + console.log(colors.gray(OUTPUT_DIR + '/' + colors.green('electron/env.json')) + '\n'); + } + // update-end----author:sunjianlei---date:20250423---for:【QQYUN-9685】构建 electron 桌面应用 + + } catch (error) { + console.log(colors.red('configuration file configuration file failed to package:\n' + error)); + } +} + +export function runBuildConfig() { + const config = getEnvConfig(); + const configFileName = getConfigFileName(config); + createConfig({ config, configName: configFileName, configFileName: GLOB_CONFIG_FILE_NAME }); +} diff --git a/build/script/copyChat.ts b/build/script/copyChat.ts new file mode 100644 index 0000000..0811181 --- /dev/null +++ b/build/script/copyChat.ts @@ -0,0 +1,14 @@ +const fs = require('fs-extra'); +const path = require('path'); + +const sourceDir = path.join(__dirname, '../../src/views/super/airag/aiapp/chat/js'); // 源目录 +const destDir = path.join(__dirname, '../../dist', 'chat'); // 目标目录 + +// 复制目录 +fs.copy(sourceDir, destDir) + .then(() => { + console.log(`成功将 ${sourceDir} 复制到 ${destDir}`); + }) + .catch(err => { + console.error(`复制目录失败: ${err.message}`); + }); \ No newline at end of file diff --git a/build/script/postBuild.ts b/build/script/postBuild.ts new file mode 100644 index 0000000..42635d8 --- /dev/null +++ b/build/script/postBuild.ts @@ -0,0 +1,23 @@ +// #!/usr/bin/env node + +import { runBuildConfig } from './buildConf'; +import colors from 'picocolors'; + +import pkg from '../../package.json'; + +export const runBuild = async () => { + try { + const argvList = process.argv.splice(2); + + // Generate configuration file + if (!argvList.includes('disabled-config')) { + runBuildConfig(); + } + + console.log(`✨ ${colors.cyan(`[${pkg.name}]`)}` + ' - build successfully!'); + } catch (error) { + console.log(colors.red('vite build error:\n' + error)); + process.exit(1); + } +}; +runBuild(); diff --git a/build/utils.ts b/build/utils.ts new file mode 100644 index 0000000..9490116 --- /dev/null +++ b/build/utils.ts @@ -0,0 +1,102 @@ +import fs from 'fs'; +import path from 'path'; +import dotenv from 'dotenv'; + +export function isDevFn(mode: string): boolean { + return mode === 'development'; +} + +export function isProdFn(mode: string): boolean { + return mode === 'production'; +} + +/** + * Whether to generate package preview + */ +export function isReportMode(): boolean { + return process.env.REPORT === 'true'; +} + +// Read all environment variable configuration files to process.env +export function wrapperEnv(envConf: Recordable): ViteEnv { + const ret: any = {}; + + for (const envName of Object.keys(envConf)) { + let realName = envConf[envName].replace(/\\n/g, '\n'); + realName = realName === 'true' ? true : realName === 'false' ? false : realName; + + if (envName === 'VITE_PORT') { + realName = Number(realName); + } + if (envName === 'VITE_PROXY' && realName) { + try { + realName = JSON.parse(realName.replace(/'/g, '"')); + } catch (error) { + realName = ''; + } + } + ret[envName] = realName; + if (typeof realName === 'string') { + process.env[envName] = realName; + } else if (typeof realName === 'object') { + process.env[envName] = JSON.stringify(realName); + } + } + return ret; +} + +/** + * 获取当前环境下生效的配置文件名 + */ +function getConfFiles() { + + // update-begin--author:sunjianlei---date:20250411---for:【QQYUN-9685】构建 electron 桌面应用 + const {VITE_GLOB_RUN_PLATFORM} = process.env + if (VITE_GLOB_RUN_PLATFORM === 'electron') { + return ['.env', '.env.prod_electron']; + } + // update-end----author:sunjianlei---date:20250411---for:【QQYUN-9685】构建 electron 桌面应用 + + const script = process.env.npm_lifecycle_script; + // update-begin--author:liaozhiyang---date:20240326---for:【QQYUN-8690】修正获取当前环境下的文件名 + const reg = new RegExp('NODE_ENV=([a-z_\\d]+)'); + // update-end--author:liaozhiyang---date:20240326---for:【QQYUN-8690】修正获取当前环境下的文件名 + const result = reg.exec(script as string) as any; + if (result) { + const mode = result[1] as string; + return ['.env', `.env.${mode}`]; + } + return ['.env', '.env.production']; +} + +/** + * Get the environment variables starting with the specified prefix + * @param match prefix + * @param confFiles ext + */ +export function getEnvConfig(match = 'VITE_GLOB_', confFiles = getConfFiles()) { + let envConfig = {}; + confFiles.forEach((item) => { + try { + const env = dotenv.parse(fs.readFileSync(path.resolve(process.cwd(), item))); + envConfig = { ...envConfig, ...env }; + } catch (e) { + console.error(`Error in parsing ${item}`, e); + } + }); + const reg = new RegExp(`^(${match})`); + Object.keys(envConfig).forEach((key) => { + if (!reg.test(key)) { + Reflect.deleteProperty(envConfig, key); + } + }); + return envConfig; +} + +/** + * Get user root directory + * @param dir file path + */ +export function getRootPath(...dir: string[]) { + return path.resolve(process.cwd(), ...dir); +} diff --git a/build/vite/plugin/compress.ts b/build/vite/plugin/compress.ts new file mode 100644 index 0000000..a76d3f8 --- /dev/null +++ b/build/vite/plugin/compress.ts @@ -0,0 +1,36 @@ +/** + * Used to package and output gzip. Note that this does not work properly in Vite, the specific reason is still being investigated + * https://github.com/anncwb/vite-plugin-compression + */ +import type { PluginOption } from 'vite'; +import compressPlugin from 'vite-plugin-compression'; + +export function configCompressPlugin(compress: 'gzip' | 'brotli' | 'none', deleteOriginFile = false): PluginOption | PluginOption[] { + const compressList = compress.split(','); + + const plugins: PluginOption[] = []; + + if (compressList.includes('gzip')) { + plugins.push( + compressPlugin({ + verbose: true, + disable: false, + threshold: 10240, + algorithm: 'gzip', + ext: '.gz', + deleteOriginFile, + }) + ); + } + + if (compressList.includes('brotli')) { + plugins.push( + compressPlugin({ + ext: '.br', + algorithm: 'brotliCompress', + deleteOriginFile, + }) + ); + } + return plugins; +} diff --git a/build/vite/plugin/electron.ts b/build/vite/plugin/electron.ts new file mode 100644 index 0000000..5b597e9 --- /dev/null +++ b/build/vite/plugin/electron.ts @@ -0,0 +1,34 @@ +// import electron from 'vite-plugin-electron/simple' +// +// export function configElectronPlugin(_viteEnv: ViteEnv, isBuild: boolean) { +// return electron({ +// main: { +// // 主进程入口 +// entry: 'electron/main.ts', +// vite: { +// build: { +// sourcemap: !isBuild, +// outDir: 'dist/electron', +// }, +// }, +// onstart: ({startup}) => { +// // 开发热重载 +// startup() +// }, +// }, +// preload: { +// input: 'electron/preload/index.ts', +// vite: { +// build: { +// sourcemap: !isBuild, +// outDir: 'dist/electron/preload', +// }, +// }, +// onstart: ({startup}) => { +// // 开发热重载 +// startup() +// }, +// } +// }) +// +// } diff --git a/build/vite/plugin/html.ts b/build/vite/plugin/html.ts new file mode 100644 index 0000000..f770efb --- /dev/null +++ b/build/vite/plugin/html.ts @@ -0,0 +1,45 @@ +/** + * Plugin to minimize and use ejs template syntax in index.html. + * https://github.com/anncwb/vite-plugin-html + */ +import type { PluginOption } from 'vite'; +import { createHtmlPlugin } from 'vite-plugin-html'; +import pkg from '../../../package.json'; +import { GLOB_CONFIG_FILE_NAME } from '../../constant'; + +export function configHtmlPlugin(env: ViteEnv, isBuild: boolean, isQiankunMicro: boolean) { + const { VITE_GLOB_APP_TITLE, VITE_PUBLIC_PATH } = env; + + const path = VITE_PUBLIC_PATH.endsWith('/') ? VITE_PUBLIC_PATH : `${VITE_PUBLIC_PATH}/`; + + const getAppConfigSrc = () => { + return `${path || '/'}${GLOB_CONFIG_FILE_NAME}?v=${pkg.version}-${new Date().getTime()}`; + }; + + // 【JEECG作为乾坤子应用】补充静态资源前缀 + const {VITE_GLOB_QIANKUN_MICRO_APP_ENTRY} = env; + const basePublicPath = isQiankunMicro ? VITE_GLOB_QIANKUN_MICRO_APP_ENTRY : ''; + + const htmlPlugin: PluginOption[] = createHtmlPlugin({ + minify: isBuild, + inject: { + // 修改模板html的标题 + data: { + title: VITE_GLOB_APP_TITLE, + basePublicPath: basePublicPath, + }, + // 将app.config.js文件注入到模板html中 + tags: isBuild + ? [ + { + tag: 'script', + attrs: { + src: getAppConfigSrc(), + }, + }, + ] + : [], + }, + }); + return htmlPlugin; +} diff --git a/build/vite/plugin/imagemin.ts b/build/vite/plugin/imagemin.ts new file mode 100644 index 0000000..785b65a --- /dev/null +++ b/build/vite/plugin/imagemin.ts @@ -0,0 +1,35 @@ +// 【图片压缩插件】 +// Image resource files used to compress the output of the production environment +// https://github.com/anncwb/vite-plugin-imagemin +import viteImagemin from 'vite-plugin-imagemin'; + +export function configImageminPlugin() { + const plugin = viteImagemin({ + gifsicle: { + optimizationLevel: 7, + interlaced: false, + }, + optipng: { + optimizationLevel: 7, + }, + mozjpeg: { + quality: 20, + }, + pngquant: { + quality: [0.8, 0.9], + speed: 4, + }, + svgo: { + plugins: [ + { + name: 'removeViewBox', + }, + { + name: 'removeEmptyAttrs', + active: false, + }, + ], + }, + }); + return plugin; +} diff --git a/build/vite/plugin/index.ts b/build/vite/plugin/index.ts new file mode 100644 index 0000000..bce6561 --- /dev/null +++ b/build/vite/plugin/index.ts @@ -0,0 +1,91 @@ +import { PluginOption } from 'vite'; +import vue from '@vitejs/plugin-vue'; +import vueJsx from '@vitejs/plugin-vue-jsx'; +import purgeIcons from 'vite-plugin-purge-icons'; +import UnoCSS from 'unocss/vite'; +import { presetTypography, presetUno } from 'unocss'; + +// 本地调试https配置方法 +import VitePluginCertificate from 'vite-plugin-mkcert'; +//[issues/555]开发环境,vscode断点调试,文件或行数对不上 +import vueSetupExtend from 'vite-plugin-vue-setup-extend-plus'; +import { configHtmlPlugin } from './html'; +import { configMockPlugin } from './mock'; +import { configCompressPlugin } from './compress'; +import { configVisualizerConfig } from './visualizer'; +import { configThemePlugin } from './theme'; +import { configSvgIconsPlugin } from './svgSprite'; +import { configQiankunMicroPlugin } from './qiankunMicro'; +// // electron plugin +// import { configElectronPlugin } from "./electron"; +// //预编译加载插件(不支持vite3作废) +// import OptimizationPersist from 'vite-plugin-optimize-persist'; +// import PkgConfig from 'vite-plugin-package-config'; + +/** + * + * @param viteEnv + * @param isBuild + * @param isQiankunMicro 是否【JEECG作为乾坤子应用】 + */ +export function createVitePlugins(viteEnv: ViteEnv, isBuild: boolean, isQiankunMicro: boolean) { + const { VITE_USE_MOCK, VITE_BUILD_COMPRESS, VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE } = viteEnv; + + const vitePlugins: (PluginOption | PluginOption[])[] = [ + // have to + vue(), + // have to + vueJsx(), + // support name + vueSetupExtend(), + // @ts-ignore + VitePluginCertificate({ + source: 'coding', + }), + ]; + + vitePlugins.push(UnoCSS({ presets: [presetUno(), presetTypography()] })); + + // vite-plugin-html + vitePlugins.push(configHtmlPlugin(viteEnv, isBuild, isQiankunMicro)); + + // vite-plugin-svg-icons + vitePlugins.push(configSvgIconsPlugin(isBuild)); + + // vite-plugin-mock + VITE_USE_MOCK && vitePlugins.push(configMockPlugin(isBuild)); + + // vite-plugin-purge-icons + vitePlugins.push(purgeIcons()); + + // rollup-plugin-visualizer + vitePlugins.push(configVisualizerConfig()); + + // vite-plugin-theme + vitePlugins.push(configThemePlugin(isBuild)); + + // 【JEECG作为乾坤子应用】注册乾坤子应用模式插件 + if (isQiankunMicro) { + // vite-plugin-qiankun + vitePlugins.push(...configQiankunMicroPlugin(viteEnv)) + } + + // // electron plugin + // const isElectron = viteEnv.VITE_GLOB_RUN_PLATFORM === 'electron'; + // if (isElectron) { + // vitePlugins.push(configElectronPlugin(viteEnv, isBuild)) + // } + + // The following plugins only work in the production environment + if (isBuild) { + + // rollup-plugin-gzip + vitePlugins.push(configCompressPlugin(VITE_BUILD_COMPRESS, VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE)); + + } + + // //vite-plugin-theme【预编译加载插件,解决vite首次打开界面加载慢问题】 + // vitePlugins.push(PkgConfig()); + // vitePlugins.push(OptimizationPersist()); + return vitePlugins; +} diff --git a/build/vite/plugin/mock.ts b/build/vite/plugin/mock.ts new file mode 100644 index 0000000..d241e26 --- /dev/null +++ b/build/vite/plugin/mock.ts @@ -0,0 +1,19 @@ +/** + * Mock plugin for development and production. + * https://github.com/anncwb/vite-plugin-mock + */ +import { viteMockServe } from 'vite-plugin-mock'; + +export function configMockPlugin(isBuild: boolean) { + return viteMockServe({ + ignore: /^\_/, + mockPath: 'mock', + localEnabled: !isBuild, + prodEnabled: isBuild, + injectCode: ` + import { setupProdMockServer } from '../mock/_createProductionServer'; + + setupProdMockServer(); + `, + }); +} diff --git a/build/vite/plugin/qiankunMicro.ts b/build/vite/plugin/qiankunMicro.ts new file mode 100644 index 0000000..aa965e0 --- /dev/null +++ b/build/vite/plugin/qiankunMicro.ts @@ -0,0 +1,16 @@ +import qiankun from 'vite-plugin-qiankun'; + +/** + * 【JEECG作为乾坤子应用】Vite适配乾坤以子应用模式运行 + * @param env + */ +export function configQiankunMicroPlugin(env: ViteEnv) { + const {VITE_GLOB_QIANKUN_MICRO_APP_NAME} = env + + return [ + qiankun(VITE_GLOB_QIANKUN_MICRO_APP_NAME!, { + useDevMode: true, + }) + ] + +} diff --git a/build/vite/plugin/styleImport.ts b/build/vite/plugin/styleImport.ts new file mode 100644 index 0000000..30d5874 --- /dev/null +++ b/build/vite/plugin/styleImport.ts @@ -0,0 +1,82 @@ +/** + * 【样式按需加载插件 ——主要处理antd的样式】 + * Introduces component library styles on demand. + * https://github.com/anncwb/vite-plugin-style-import + */ +import { createStyleImportPlugin } from 'vite-plugin-style-import'; + +export function configStyleImportPlugin(_isBuild: boolean) { + if (!_isBuild) { + return []; + } + const styleImportPlugin = createStyleImportPlugin({ + libs: [ + { + libraryName: 'ant-design-vue', + esModule: true, + resolveStyle: (name) => { + // 这里是无需额外引入样式文件的“子组件”列表 + const ignoreList = [ + 'anchor-link', + 'sub-menu', + 'menu-item', + 'menu-divider', + 'menu-item-group', + 'breadcrumb-item', + 'breadcrumb-separator', + 'form-item', + 'step', + 'select-option', + 'select-opt-group', + 'card-grid', + 'card-meta', + 'collapse-panel', + 'descriptions-item', + 'list-item', + 'list-item-meta', + 'table-column', + 'table-column-group', + 'tab-pane', + 'tab-content', + 'timeline-item', + 'tree-node', + 'skeleton-input', + 'skeleton-avatar', + 'skeleton-title', + 'skeleton-paragraph', + 'skeleton-image', + 'skeleton-button', + ]; + // 这里是需要额外引入样式的子组件列表 + // 单独引入子组件时需引入组件样式,否则会在打包后导致子组件样式丢失 + const replaceList = { + 'typography-text': 'typography', + 'typography-title': 'typography', + 'typography-paragraph': 'typography', + 'typography-link': 'typography', + 'dropdown-button': 'dropdown', + 'input-password': 'input', + 'input-search': 'input', + 'input-group': 'input', + 'radio-group': 'radio', + 'checkbox-group': 'checkbox', + 'layout-sider': 'layout', + 'layout-content': 'layout', + 'layout-footer': 'layout', + 'layout-header': 'layout', + 'month-picker': 'date-picker', + 'range-picker': 'date-picker', + 'image-preview-group': 'image', + }; + + return ignoreList.includes(name) + ? '' + : replaceList.hasOwnProperty(name) + ? `ant-design-vue/es/${replaceList[name]}/style/index` + : `ant-design-vue/es/${name}/style/index`; + }, + }, + ], + }); + return styleImportPlugin; +} diff --git a/build/vite/plugin/svgSprite.ts b/build/vite/plugin/svgSprite.ts new file mode 100644 index 0000000..61f637f --- /dev/null +++ b/build/vite/plugin/svgSprite.ts @@ -0,0 +1,17 @@ +/** + * Vite Plugin for fast creating SVG sprites. + * https://github.com/anncwb/vite-plugin-svg-icons + */ + +import { createSvgIconsPlugin } from 'vite-plugin-svg-icons'; +import path from 'path'; + +export function configSvgIconsPlugin(isBuild: boolean) { + const svgIconsPlugin = createSvgIconsPlugin({ + iconDirs: [path.resolve(process.cwd(), 'src/assets/icons')], + svgoOptions: isBuild, + // default + symbolId: 'icon-[dir]-[name]', + }); + return svgIconsPlugin; +} diff --git a/build/vite/plugin/theme.ts b/build/vite/plugin/theme.ts new file mode 100644 index 0000000..542769d --- /dev/null +++ b/build/vite/plugin/theme.ts @@ -0,0 +1,100 @@ +/** + * Vite plugin for website theme color switching + * https://github.com/anncwb/vite-plugin-theme + */ +import type { PluginOption } from 'vite'; +import path from 'path'; +import { viteThemePlugin, antdDarkThemePlugin, mixLighten, mixDarken, tinycolor } from '@rys-fe/vite-plugin-theme'; +import { getThemeColors, generateColors } from '../../config/themeConfig'; +import { generateModifyVars } from '../../generate/generateModifyVars'; + +export function configThemePlugin(isBuild: boolean): PluginOption[] { + const colors = generateColors({ + mixDarken, + mixLighten, + tinycolor, + }); + + // update-begin-修复编译后主题色切换不生效黑屏的问题----------------------- + // https://github.com/vbenjs/vue-vben-admin/issues/1445 + // 抽取出viteThemePlugin插件,下方会根据不同环境设置enforce + const vite_theme_plugin = viteThemePlugin({ + resolveSelector: (s) => { + s = s.trim(); + switch (s) { + case '.ant-steps-item-process .ant-steps-item-icon > .ant-steps-icon': + return '.ant-steps-item-icon > .ant-steps-icon'; + case '.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled)': + case '.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):hover': + case '.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):active': + return s; + case '.ant-steps-item-icon > .ant-steps-icon': + return s; + case '.ant-select-item-option-selected:not(.ant-select-item-option-disabled)': + return s; + default: + if (s.indexOf('.ant-btn') >= -1) { + // 按钮被重新定制过,需要过滤掉class防止覆盖 + return s; + } + } + return s.startsWith('[data-theme') ? s : `[data-theme] ${s}`; + }, + colorVariables: [...getThemeColors(), ...colors], + }); + vite_theme_plugin.forEach(function (item) { + //对vite:theme插件特殊配置 + if ('vite:theme' === item.name) { + // 打包时去除enforce: "post",vite 2.6.x适配,否则生成app-theme-style为空,因为async transform(code, id) {的code没有正确获取 + if (isBuild) { + delete item.enforce; + } + } + }); + // update-end-修复编译后主题色切换不生效黑屏的问题----------------------- + + const plugin = [ + vite_theme_plugin, + antdDarkThemePlugin({ + preloadFiles: [ + // path.resolve(process.cwd(), 'node_modules/ant-design-vue/dist/reset.css'), + //path.resolve(process.cwd(), 'node_modules/ant-design-vue/dist/antd.dark.less'), + path.resolve(process.cwd(), 'src/design/index.less'), + ], + filter: (id) => (isBuild ? !id.endsWith('antd.less') : true), + // extractCss: false, + darkModifyVars: { + ...generateModifyVars(true), + 'text-color': '#c9d1d9', + 'primary-1': 'rgb(255 255 255 / 8%)', + 'text-color-base': '#c9d1d9', + 'component-background': '#151515', + 'heading-color': 'rgb(255 255 255 / 65%)', + // black: '#0e1117', + // #8b949e + 'text-color-secondary': '#8b949e', + 'border-color-base': '#303030', + 'header-light-bottom-border-color': '#303030', + // 'border-color-split': '#30363d', + 'item-active-bg': '#111b26', + 'app-content-background': '#1e1e1e', + 'tree-node-selected-bg': '#11263c', + + 'alert-success-border-color': '#274916', + 'alert-success-bg-color': '#162312', + 'alert-success-icon-color': '#49aa19', + 'alert-info-border-color': '#153450', + 'alert-info-bg-color': '#111b26', + 'alert-info-icon-color': '#177ddc', + 'alert-warning-border-color': '#594214', + 'alert-warning-bg-color': '#2b2111', + 'alert-warning-icon-color': '#d89614', + 'alert-error-border-color': '#58181c', + 'alert-error-bg-color': '#2a1215', + 'alert-error-icon-color': '#a61d24', + }, + }), + ]; + + return plugin as unknown as PluginOption[]; +} diff --git a/build/vite/plugin/visualizer.ts b/build/vite/plugin/visualizer.ts new file mode 100644 index 0000000..75d4451 --- /dev/null +++ b/build/vite/plugin/visualizer.ts @@ -0,0 +1,17 @@ +/** + * Package file volume analysis + */ +import visualizer from 'rollup-plugin-visualizer'; +import { isReportMode } from '../../utils'; + +export function configVisualizerConfig() { + if (isReportMode()) { + return visualizer({ + filename: './node_modules/.cache/visualizer/stats.html', + open: true, + gzipSize: true, + brotliSize: true, + }) as Plugin; + } + return []; +} diff --git a/build/vite/proxy.ts b/build/vite/proxy.ts new file mode 100644 index 0000000..8525397 --- /dev/null +++ b/build/vite/proxy.ts @@ -0,0 +1,34 @@ +/** + * Used to parse the .env.development proxy configuration + */ +import type { ProxyOptions } from 'vite'; + +type ProxyItem = [string, string]; + +type ProxyList = ProxyItem[]; + +type ProxyTargetList = Record; + +const httpsRE = /^https:\/\//; + +/** + * Generate proxy + * @param list + */ +export function createProxy(list: ProxyList = []) { + const ret: ProxyTargetList = {}; + for (const [prefix, target] of list) { + const isHttps = httpsRE.test(target); + + // https://github.com/http-party/node-http-proxy#options + ret[prefix] = { + target: target, + changeOrigin: true, + ws: true, + rewrite: (path) => path.replace(new RegExp(`^${prefix}`), ''), + // https is require secure=false + ...(isHttps ? { secure: false } : {}), + }; + } + return ret; +} diff --git a/commitlint.config.js b/commitlint.config.js new file mode 100644 index 0000000..ac977af --- /dev/null +++ b/commitlint.config.js @@ -0,0 +1,32 @@ +module.exports = { + ignores: [(commit) => commit.includes('init')], + extends: ['@commitlint/config-conventional'], + rules: { + 'body-leading-blank': [2, 'always'], + 'footer-leading-blank': [1, 'always'], + 'header-max-length': [2, 'always', 108], + 'subject-empty': [2, 'never'], + 'type-empty': [2, 'never'], + 'type-enum': [ + 2, + 'always', + [ + 'feat', + 'fix', + 'perf', + 'style', + 'docs', + 'test', + 'refactor', + 'build', + 'ci', + 'chore', + 'revert', + 'wip', + 'workflow', + 'types', + 'release', + ], + ], + }, +}; diff --git a/electron-builder.yaml b/electron-builder.yaml new file mode 100644 index 0000000..05a01e0 --- /dev/null +++ b/electron-builder.yaml @@ -0,0 +1,24 @@ +appId: 'com.jeecg.boot3' +# 产品名称 +productName: 'jeecgboot' +files: + # 仅包含 dist 目录下所有文件 + - 'dist/**/*' + # 特别排除 node_modules 目录 + - '!node_modules' +directories: + # 输出目录 + output: 'dist-electron' +win: + # win exe 程序图标 + icon: 'electron/icons/app.ico' + artifactName: 'jeecgboot-setup-${version}.exe' +# 安装包配置 +nsis: + oneClick: false + # 是否允许用户选择安装目录 + allowToChangeInstallationDirectory: true + # 是否创建桌面快捷方式 + createDesktopShortcut: true + # 安装程序的图标 + installerIcon: 'electron/icons/installer.ico' diff --git a/electron.md b/electron.md new file mode 100644 index 0000000..c10e4c2 --- /dev/null +++ b/electron.md @@ -0,0 +1,35 @@ +# Electron桌面应用打包 + +- 1.安装依赖很慢,得10分钟左右 +- 2.electron桌面应用打包文档 + https://help.jeecg.com/ui/setup/electron-build +- 3.临时注释掉electron功能 + 注释代码:build/vite/plugin/electron.ts + 修改build/vite/plugin/index.ts,搜索`electron plugin`注释相关逻辑代码 + 修改package.json删除相关依赖 + +```yaml +{ + "main": "dist/electron/main.js", + "scripts": { + "electron:dev": "cross-env VITE_GLOB_RUN_PLATFORM=electron npm run dev", + "electron:build-all": "npm run electron:build-web && npm run electron:build-app", + "electron:build-web": "cross-env VITE_GLOB_RUN_PLATFORM=electron NODE_ENV=production NODE_OPTIONS=--max-old-space-size=8192 vite build --mode prod_electron && cross-env VITE_GLOB_RUN_PLATFORM=electron esno ./build/script/postBuild.ts && esno ./build/script/copyChat.ts", + "electron:build-app": "esno ./electron/script/buildBefore.ts && electron-builder && esno ./electron/script/buildAfter.ts", + }, + "devDependencies": { + "electron": "35.1.4", + "electron-builder": "^26.0.12", + "vite-plugin-electron": "^0.29.0", + }, +} + +``` + + +# Electron桌面通知示例和代码位置 + +1. 代码位置:electron/utils/tray.ts +2. 发送系统通知调用:sendDesktopNotice +3. 开始托盘图标闪动调用:startBlink +4. 停止托盘图标闪动调用:stopBlink diff --git a/electron/env.ts b/electron/env.ts new file mode 100644 index 0000000..e6add32 --- /dev/null +++ b/electron/env.ts @@ -0,0 +1,18 @@ +// 不能直接使用 process.env,会报错 +export const $ps = process; + +export const isDev = !!$ps.env.VITE_DEV_SERVER_URL; + +export const $env = getEnv(); + +function getEnv() { + if (isDev) { + return $ps.env; + } + // 非开发环境,从 JSON 文件中获取环境变量 + const env = require('./env.json'); + return { + ...$ps.env, + ...env, + }; +} diff --git a/electron/icons/app.ico b/electron/icons/app.ico new file mode 100644 index 0000000..c0fbd91 Binary files /dev/null and b/electron/icons/app.ico differ diff --git a/electron/icons/installer.ico b/electron/icons/installer.ico new file mode 100644 index 0000000..001572e Binary files /dev/null and b/electron/icons/installer.ico differ diff --git a/electron/ipc/index.ts b/electron/ipc/index.ts new file mode 100644 index 0000000..c8427ae --- /dev/null +++ b/electron/ipc/index.ts @@ -0,0 +1,4 @@ +import {ipcMain} from 'electron' +import {openInBrowser} from "../utils"; + +ipcMain.on('open-in-browser', (event, url) => openInBrowser(url)); diff --git a/electron/main.ts b/electron/main.ts new file mode 100644 index 0000000..d4dc81d --- /dev/null +++ b/electron/main.ts @@ -0,0 +1,56 @@ +import './ipc'; + +import { app, BrowserWindow, Menu } from 'electron'; +import { isDev } from './env'; +import { createMainWindow, createIndexWindow } from './utils/window'; +import { getAppInfo} from "./utils"; + +// 隐藏所有菜单 +Menu.setApplicationMenu(null); + +let mainWindow: BrowserWindow | null = null; + +function main() { + mainWindow = createMainWindow(); + return mainWindow; +} + +// 非开发环境,只允许一个实例运行 +if (!isDev) { + // 是否取得了单一实例锁 + const gotTheLock = app.requestSingleInstanceLock(); + + if (gotTheLock) { + app.on('second-instance', () => { + // 开启一个新的窗口 + createIndexWindow(); + }); + } else { + // 没有取得单一实例锁,则退出应用 + app.exit(0); + } +} + +// 生命周期管理 +app.whenReady().then(() => { + // 获取应用信息 + const $appInfo = getAppInfo(); + if ($appInfo?.productName && $appInfo?.appId) { + app.setName($appInfo.productName); + app.setAppUserModelId($appInfo.appId); + } + + main(); + + app.on('activate', () => { + if (BrowserWindow.getAllWindows().length === 0) { + main(); + } + }); +}); + +app.on('window-all-closed', () => { + if (process.platform !== 'darwin') { + app.quit(); + } +}); diff --git a/electron/paths.ts b/electron/paths.ts new file mode 100644 index 0000000..ff3c991 --- /dev/null +++ b/electron/paths.ts @@ -0,0 +1,18 @@ +import path from 'path' +import {isDev} from "./env"; + +export const _PATHS = getPaths() + +function getPaths() { + const _root = __dirname; + const publicRoot = path.join(_root, isDev ? '../../public' : '..'); + const preloadRoot = path.join(_root, 'preload') + + return { + electronRoot: _root, + publicRoot, + preloadRoot, + + appIcon: path.join(_root, `icons/app.ico`).replace(/[\\/]dist[\\/]/, '/'), + } +} \ No newline at end of file diff --git a/electron/preload/index.ts b/electron/preload/index.ts new file mode 100644 index 0000000..ce7c02f --- /dev/null +++ b/electron/preload/index.ts @@ -0,0 +1,5 @@ +import {contextBridge, ipcRenderer} from 'electron' + +contextBridge.exposeInMainWorld('_ELECTRON_PRELOAD_UTILS_', { + openInBrowser: (url: string) => ipcRenderer.send('open-in-browser', url), +}); diff --git a/electron/script/buildAfter.ts b/electron/script/buildAfter.ts new file mode 100644 index 0000000..50024ea --- /dev/null +++ b/electron/script/buildAfter.ts @@ -0,0 +1 @@ +console.log('build elctron is done.'); \ No newline at end of file diff --git a/electron/script/buildBefore.ts b/electron/script/buildBefore.ts new file mode 100644 index 0000000..d1eac5d --- /dev/null +++ b/electron/script/buildBefore.ts @@ -0,0 +1,27 @@ +import path from 'path'; +import fs from 'fs'; + +const root = path.join(__dirname, '../../'); +const electronDistRoot = path.join(root, 'dist/electron'); + +let yamlName = 'electron-builder.yaml'; +const sourcePath = fs.readFileSync(path.join(root, yamlName), 'utf-8'); + +try { + // 通过正则表达式匹配 appId 和 productName + const appIdMatch = sourcePath.match(/appId:\s*['"]([^'"]+)['"]/); + const productNameMatch = sourcePath.match(/productName:\s*['"]([^'"]+)['"]/); + if (appIdMatch && productNameMatch) { + const fileContent = `${appIdMatch[0]}\n${productNameMatch[0]}`; + yamlName = 'env.yaml'; + const targetPath = path.join(electronDistRoot, yamlName); + fs.writeFileSync(targetPath, fileContent, 'utf-8'); + console.log(`✨ write dist ${yamlName} successfully.`); + } else { + throw new Error('appId or productName not found'); + } +} catch (e) { + console.error(e); + console.error(`请检查 ${yamlName} 是否存在,或者内容是否正确`); + process.exit(1); +} diff --git a/electron/utils/index.ts b/electron/utils/index.ts new file mode 100644 index 0000000..6bc206d --- /dev/null +++ b/electron/utils/index.ts @@ -0,0 +1,31 @@ +import fs from 'fs'; +import path from 'path' +import {shell, dialog} from 'electron' +import {_PATHS} from "../paths"; +import {isDev} from "../env"; + +// 通过浏览器打开链接 +export function openInBrowser(url: string) { + return shell.openExternal(url); +} + + +export function getAppInfo(): any { + try { + const yamlPath = isDev ? path.join(_PATHS.publicRoot, '../electron-builder.yaml') : path.join(_PATHS.electronRoot, 'env.yaml'); + const yamlContent = fs.readFileSync(yamlPath, 'utf-8'); + // 通过正则表达式匹配 appId 和 productName + const appIdMatch = yamlContent.match(/appId:\s*['"]([^'"]+)['"]/); + const productNameMatch = yamlContent.match(/productName:\s*['"]([^'"]+)['"]/); + const appId = appIdMatch ? appIdMatch[1] : ''; + const productName = productNameMatch ? productNameMatch[1] : ''; + return {appId, productName} + } catch (e) { + dialog.showMessageBoxSync(null, { + type: 'error', + title: '错误', + message: '应用启动失败,请从官网下载最新版本安装包后重新安装!', + }); + process.exit(-1); + } +} diff --git a/electron/utils/tray.ts b/electron/utils/tray.ts new file mode 100644 index 0000000..2d91391 --- /dev/null +++ b/electron/utils/tray.ts @@ -0,0 +1,181 @@ +// tray = 系统托盘 +import path from 'path'; +import {Tray, Menu, app, dialog, nativeImage, BrowserWindow, Notification} from 'electron'; +import {_PATHS} from '../paths'; +import {$env, isDev} from '../env'; + +const TrayIcons = { + normal: nativeImage.createFromPath(path.join(_PATHS.publicRoot, 'logo.png')), + empty: nativeImage.createEmpty(), +}; + +// 创建托盘图标 +export function createTray(win: BrowserWindow) { + const tray = new Tray(TrayIcons.normal); + + const TrayUtils = useTray(tray, win); + + tray.setToolTip($env.VITE_GLOB_APP_TITLE! + (isDev ? ' (开发环境)' : '')); + + // 左键托盘图标显示主窗口 + tray.on('click', () => TrayUtils.showMainWindow()); + // 右键托盘图标显示托盘菜单 + tray.on('right-click', () => showTrayContextMenu()); + + function showTrayContextMenu() { + const trayContextMenu = getTrayMenus(win, TrayUtils); + // 弹出托盘菜单,不使用 setContextMenu 方法是因为要实时更新菜单内容 + tray.popUpContextMenu(trayContextMenu); + } +} + +export function useTray(tray: Tray, win: BrowserWindow) { + let isBlinking = false; + let blinkTimer: NodeJS.Timeout | null = null; + + function showMainWindow() { + win.show(); + } + + // 开始闪动 + function startBlink() { + isBlinking = true; + tray.setImage(TrayIcons.empty); + blinkTimer = setTimeout(() => { + tray.setImage(TrayIcons.normal); + setTimeout(() => { + if (isBlinking) { + startBlink(); + } + }, 500); + }, 500); + } + + // 结束闪动 + function stopBlink() { + isBlinking = false; + if (blinkTimer) { + clearTimeout(blinkTimer); + blinkTimer = null; + } + tray.setImage(TrayIcons.normal); + } + + // 发送桌面通知 + function sendDesktopNotice() { + // 判断是否支持桌面通知 + if (!Notification.isSupported()) { + // todo 实际开发中不需要提示,直接返回或者换一种提示方式 + dialog.showMessageBoxSync(win, { + type: 'error', + title: '错误', + message: '当前系统不支持桌面通知', + }); + return; + } + const ins = new Notification({ + title: '通知标题', + subtitle: '通知副标题', + body: '通知内容第一行\n通知内容第二行', + icon: TrayIcons.normal.resize({width: 32, height: 32}), + }); + + ins.on('click', () => { + dialog.showMessageBoxSync(win, { + type: 'info', + title: '提示', + message: '通知被点击', + }); + }); + + ins.show(); + } + + return { + showMainWindow, + + startBlink, + stopBlink, + isBlinking: () => isBlinking, + + sendDesktopNotice, + }; +} + +const MenuIcon = { + exit: nativeImage + .createFromDataURL( + 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAA7EAAAOxAGVKw4bAAACJ0lEQVR4nH1TzWvUQBRP7fpxsWqVXsSLiAevRWhhN28msRJo981kay4WRBCF/QdEFJpbaUHw4kFBQTwUKX4gKh48KPiBBcGLJ1F0uzPZ7ibWXf0DIjObielS+mDIm/fxm9/85sWyBixN06E0CIaV3wB2XhC8puOWNZSG4Y7B+k2mi7Kl9l2n9rHnzvbWJoLRYn7r5jTViQjwzM8ynlC+AFyVgN2NU8G+Rnn6QETx3FfP223A/jeHfWqCsAUJ7Hlryh9Te0nYqiDsz9rE6VHVIABvNwEf/ADYk4OsZPeVFbwiCHtcZBVR9k4CJhJmDuUxwEVJ8H4fINOkC9Vjbeq/UTR1IgPturX3f93Z35+B7ddxgJL6dih/skF9zE9KCJ//5bDLpii1+npIuzolKTubC5gBxzarJo6vWWjrUP+etFlF+ds9lRFOXalN+NPEmxvRDS3KH34v8+PFIgNmTh0EahH+InGCwzoQEbYcuTMnlR8aYbaxGHFvRNiznssP6sA65UsxrdU1+hYnFhlpAGAkdvzlPLFu88mY8pcrVjCsxcqGapC2eYW249/tUH4xS4QaVQLeigi/YWJqPl4DlNRSrAwzSaoXIspeWUYrI9qXINglgT1qAt5JPG+kkNN5BSAJuyoJfhAVdmST4PlPBFASNs6rIgnspqC8HlF+SQAuRQTfKpYiEy6fwuIdP42P71T+t0l/TBKcE8AXm4DXBfB6w50+apgUhf4HZ5j+Z5+zNTAAAAAASUVORK5CYII=' + ) + .resize({ + width: 16, + height: 16, + }), +}; + +// 设置托盘菜单 +function getTrayMenus(win: BrowserWindow, TrayUtils: ReturnType) { + const {startBlink, stopBlink, sendDesktopNotice} = TrayUtils; + const isBlinking = TrayUtils.isBlinking(); + + return Menu.buildFromTemplate([ + ...(isDev + ? [ + { + label: '开发工具', + submenu: [ + { + label: '以下菜单仅显示在开发环境', + sublabel: '当前为开发环境', + enabled: false, + }, + {type: 'separator'}, + { + label: '切换 DevTools', + click: () => win.webContents.toggleDevTools(), + }, + { + label: `托盘图标${isBlinking ? '停止' : '开始'}闪烁`, + sublabel: '模拟新消息提醒', + click: () => (isBlinking ? stopBlink() : startBlink()), + }, + { + label: '发送桌面通知示例', + click: () => sendDesktopNotice(), + }, + ], + }, + {type: 'separator'}, + ] + : ([] as any)), + { + label: '显示主窗口', + // 文件图标 + icon: TrayIcons.normal.resize({width: 16, height: 16}), + click: () => win.show(), + }, + {type: 'separator'}, + { + label: '退出', + // base64图标 + icon: MenuIcon.exit, + click: () => { + // 弹出是否确认退出提示框 + const choice = dialog.showMessageBoxSync(win, { + type: 'question', + title: '提示', + message: '确定要退出应用吗?', + buttons: ['退出', '取消'], + defaultId: 1, + cancelId: 1, + noLink: true, + }); + // 用户选择了退出,直接 exit + if (choice === 0) { + // global.isQuitting = true; + app.exit(0); + } + }, + }, + ]); +} diff --git a/electron/utils/window.ts b/electron/utils/window.ts new file mode 100644 index 0000000..368a144 --- /dev/null +++ b/electron/utils/window.ts @@ -0,0 +1,85 @@ +import type {BrowserWindowConstructorOptions} from 'electron'; +import {BrowserWindow, dialog} from 'electron'; +import path from 'path'; +import {_PATHS} from '../paths'; +import {$env, isDev} from '../env'; +import {createTray} from './tray'; + +// 创建窗口 +export function createBrowserWindow(options?: BrowserWindowConstructorOptions) { + const win = new BrowserWindow({ + width: 1200, + height: 800, + webPreferences: { + preload: path.join(_PATHS.preloadRoot, 'index.js'), + nodeIntegration: false, + contextIsolation: true, + }, + // 应用图标 + icon: isDev ? _PATHS.appIcon : void 0, + ...options, + }); + + // 设置窗口打开处理器 + win.webContents.setWindowOpenHandler(({url}) => { + const win = createBrowserWindow(); + win.loadURL(url); + // 阻止创建新窗口,因为已经被接管 + return {action: 'deny'}; + }); + + // 当 beforeunload 阻止窗口关闭时触发 + win.webContents.on('will-prevent-unload', () => { + const choice = dialog.showMessageBoxSync(win, { + type: 'question', + title: '确认关闭吗?', + message: '系统可能不会保存您所做的更改。', + buttons: ['关闭', '取消'], + defaultId: 1, + cancelId: 1, + noLink: true, + }); + // 用户选择了关闭,直接销毁窗口 + if (choice === 0) { + win.destroy(); + } + }); + + return win; +} + +// 创建主窗口、系统托盘 +export function createMainWindow() { + const win = createIndexWindow() + + // 设置系统托盘图标 + createTray(win); + + // 主窗口尝试关闭时,默认不直接退出应用,而是隐藏到托盘 + win.on('close', (event) => { + event.preventDefault(); + win.hide(); + }); + + return win; +} + +// 创建索引窗口 +export function createIndexWindow() { + const win = createBrowserWindow({ + width: 1600, + height: 1000, + title: $env.VITE_GLOB_APP_TITLE!, + }); + + // 开发环境加载Vite服务,生产加载打包文件 + if (isDev) { + win.loadURL($env.VITE_DEV_SERVER_URL!) + // 开发环境下,自动打开调试工具 + // win.webContents.openDevTools() + } else { + win.loadFile(path.join(_PATHS.publicRoot, 'index.html')); + } + + return win; +} diff --git a/index.html b/index.html new file mode 100644 index 0000000..245a4a9 --- /dev/null +++ b/index.html @@ -0,0 +1,181 @@ + + + + + + + + + <%= title %> + + + + + + +
+ +
+
+ +
+ +
+
<%= title %>
+
+
+
+ + + + + + diff --git a/jest.config.mjs b/jest.config.mjs new file mode 100644 index 0000000..162e72b --- /dev/null +++ b/jest.config.mjs @@ -0,0 +1,36 @@ +export default { + preset: 'ts-jest', + roots: ['/tests/'], + clearMocks: true, + moduleDirectories: ['node_modules', 'src'], + moduleFileExtensions: ['js', 'ts', 'vue', 'tsx', 'jsx', 'json', 'node'], + modulePaths: ['/src', '/node_modules'], + testMatch: [ + '**/tests/**/*.[jt]s?(x)', + '**/?(*.)+(spec|test).[tj]s?(x)', + '(/__tests__/.*|(\\.|/)(test|spec))\\.(js|ts)$', + ], + testPathIgnorePatterns: [ + '/tests/server/', + '/tests/__mocks__/', + '/node_modules/', + ], + transform: { + '^.+\\.tsx?$': 'ts-jest', + }, + transformIgnorePatterns: ['/tests/__mocks__/', '/node_modules/'], + // A map from regular expressions to module names that allow to stub out resources with a single module + moduleNameMapper: { + '\\.(vs|fs|vert|frag|glsl|jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': + '/tests/__mocks__/fileMock.ts', + '\\.(sass|s?css|less)$': '/tests/__mocks__/styleMock.ts', + '\\?worker$': '/tests/__mocks__/workerMock.ts', + '^/@/(.*)$': '/src/$1', + }, + testEnvironment: 'jsdom', + verbose: true, + collectCoverage: false, + coverageDirectory: 'coverage', + collectCoverageFrom: ['src/**/*.{js,ts,vue}'], + coveragePathIgnorePatterns: ['^.+\\.d\\.ts$'], +}; diff --git a/mock/_createProductionServer.ts b/mock/_createProductionServer.ts new file mode 100644 index 0000000..8f47c23 --- /dev/null +++ b/mock/_createProductionServer.ts @@ -0,0 +1,18 @@ +import { createProdMockServer } from 'vite-plugin-mock/es/createProdMockServer'; + +const modules = import.meta.glob('./**/*.ts', { eager: true }); + +const mockModules: any[] = []; +Object.keys(modules).forEach((key) => { + if (key.includes('/_')) { + return; + } + mockModules.push(...(modules as Recordable)[key].default); +}); + +/** + * Used in a production environment. Need to manually import all modules + */ +export function setupProdMockServer() { + createProdMockServer(mockModules); +} diff --git a/mock/_util.ts b/mock/_util.ts new file mode 100644 index 0000000..6a171d5 --- /dev/null +++ b/mock/_util.ts @@ -0,0 +1,63 @@ +// Interface data format used to return a unified format + +export function resultSuccess(result: T, { message = 'ok' } = {}) { + return { + code: 0, + result, + message, + type: 'success', + }; +} + +export function resultPageSuccess( + pageNo: number, + pageSize: number, + list: T[], + { message = 'ok' } = {} +) { + const pageData = pagination(pageNo, pageSize, list); + + return { + ...resultSuccess({ + records: pageData, + total: list.length, + }), + message, + }; +} + +export function resultError(message = 'Request failed', { code = -1, result = null } = {}) { + return { + code, + result, + message, + type: 'error', + }; +} + +export function pagination(pageNo: number, pageSize: number, array: T[]): T[] { + const offset = (pageNo - 1) * Number(pageSize); + const ret = + offset + Number(pageSize) >= array.length + ? array.slice(offset, array.length) + : array.slice(offset, offset + Number(pageSize)); + return ret; +} + +export interface requestParams { + method: string; + body: any; + headers?: { authorization?: string }; + query: any; +} + +/** + * @description 本函数用于从request数据中获取token,请根据项目的实际情况修改 + * + */ +export function getRequestToken({ headers }: requestParams): string | undefined { + return headers?.authorization; +} + +//TODO 接口父路径(写死不够灵活) +export const baseUrl = '/jeecgboot/mock'; diff --git a/mock/demo/account.ts b/mock/demo/account.ts new file mode 100644 index 0000000..a8a31c2 --- /dev/null +++ b/mock/demo/account.ts @@ -0,0 +1,70 @@ +import { MockMethod } from 'vite-plugin-mock'; +import { resultSuccess, resultError, baseUrl } from '../_util'; +import { ResultEnum } from '../../src/enums/httpEnum'; +const userInfo = { + name: 'Jeecg', + userid: '00000001', + email: 'test@gmail.com', + signature: '海纳百川,有容乃大', + introduction: '微笑着,努力着,欣赏着', + title: '交互专家', + group: '某某某事业群-某某平台部-某某技术部-UED', + tags: [ + { + key: '0', + label: '很有想法的', + }, + { + key: '1', + label: '专注设计', + }, + { + key: '2', + label: '辣~', + }, + { + key: '3', + label: '大长腿', + }, + { + key: '4', + label: '川妹子', + }, + { + key: '5', + label: '海纳百川', + }, + ], + notifyCount: 12, + unreadCount: 11, + country: 'China', + address: 'Xiamen City 77', + phone: '0592-268888888', +}; + +export default [ + { + url: `${baseUrl}/account/getAccountInfo`, + timeout: 1000, + method: 'get', + response: () => { + return resultSuccess(userInfo); + }, + }, + { + url: `${baseUrl}/user/sessionTimeout`, + method: 'post', + statusCode: 401, + response: () => { + return resultError(); + }, + }, + { + url: '/basic-api/user/tokenExpired', + method: 'post', + statusCode: 200, + response: () => { + return resultError('Token Expired!', { code: ResultEnum.TIMEOUT as number }); + }, + }, +] as MockMethod[]; diff --git a/mock/demo/select-demo.ts b/mock/demo/select-demo.ts new file mode 100644 index 0000000..cb77aec --- /dev/null +++ b/mock/demo/select-demo.ts @@ -0,0 +1,37 @@ +import { MockMethod } from 'vite-plugin-mock'; +import { resultSuccess, baseUrl } from '../_util'; + +const demoList = (keyword, count = 20) => { + const result = { + list: [] as any[], + }; + for (let index = 0; index < count; index++) { + //根据搜索关键词做一下匹配 + let name = `选项${index}`; + if(keyword && name.indexOf(keyword)!=-1){ + result.list.push({ + name: `选项${index}`, + id: `${index}`, + }); + }else if(!keyword){ + result.list.push({ + name: `选项${index}`, + id: `${index}`, + }); + } + } + return result; +}; + +export default [ + { + url: `${baseUrl}/select/getDemoOptions`, + timeout: 1000, + method: 'get', + response: ({ query }) => { + const { keyword,count} = query; + console.log("查询条件:", keyword); + return resultSuccess(demoList(keyword,count)); + }, + }, +] as MockMethod[]; diff --git a/mock/demo/system.ts b/mock/demo/system.ts new file mode 100644 index 0000000..940c04e --- /dev/null +++ b/mock/demo/system.ts @@ -0,0 +1,298 @@ +import { MockMethod } from 'vite-plugin-mock'; +import { resultError, resultPageSuccess, resultSuccess, baseUrl } from '../_util'; + +const accountList = (() => { + const result: any[] = []; + for (let index = 0; index < 20; index++) { + result.push({ + id: `${index}`, + account: '@first', + email: '@email', + nickname: '@cname()', + role: '@first', + createTime: '@datetime', + remark: '@cword(10,20)', + 'status|1': ['0', '1'], + }); + } + return result; +})(); + +const userList = (() => { + const result: any[] = []; + for (let index = 0; index < 20; index++) { + result.push({ + id: `${index}`, + username: '@first', + email: '@email', + realname: '@cname()', + createTime: '@datetime', + remark: '@cword(10,20)', + avatar: 'https://q1.qlogo.cn/g?b=qq&nk=190848757&s=640' + }); + } + return result; +})(); + +const roleList = (() => { + const result: any[] = []; + for (let index = 0; index < 4; index++) { + result.push({ + id: index + 1, + orderNo: `${index + 1}`, + roleName: ['超级管理员', '管理员', '文章管理员', '普通用户'][index], + roleValue: '@first', + createTime: '@datetime', + remark: '@cword(10,20)', + menu: [['0', '1', '2'], ['0', '1'], ['0', '2'], ['2']][index], + 'status|1': ['0', '1'], + }); + } + return result; +})(); + +const newRoleList = (() => { + const result: any[] = []; + for (let index = 0; index < 4; index++) { + result.push({ + id: index + 1, + orderNo: `${index + 1}`, + roleName: ['超级管理员', '管理员', '文章管理员', '普通用户'][index], + roleCode: '@first', + createTime: '@datetime', + remark: '@cword(10,20)' + }); + } + return result; +})(); + +const testList = (() => { + const result: any[] = []; + for (let index = 0; index < 4; index++) { + result.push({ + id: index + 1, + orderNo: `${index + 1}`, + testName: ['数据1', '数据2', '数据3', '数据4'][index], + testValue: '@first', + createTime: '@datetime' + }); + } + return result; +})(); + +const tableDemoList = (() => { + const result: any[] = []; + for (let index = 0; index < 4; index++) { + result.push({ + id: index + 1, + orderCode: '2008200' + `${index + 1}`, + orderMoney: '@natural(1000,3000)', + ctype: '@natural(1,2)', + content: '@cword(10,20)', + orderDate: '@datetime' + }); + } + return result; +})(); + +const deptList = (() => { + const result: any[] = []; + for (let index = 0; index < 3; index++) { + result.push({ + id: `${index}`, + deptName: ['华东分部', '华南分部', '西北分部'][index], + orderNo: index + 1, + createTime: '@datetime', + remark: '@cword(10,20)', + 'status|1': ['0', '0', '1'], + children: (() => { + const children: any[] = []; + for (let j = 0; j < 4; j++) { + children.push({ + id: `${index}-${j}`, + deptName: ['研发部', '市场部', '商务部', '财务部'][j], + orderNo: j + 1, + createTime: '@datetime', + remark: '@cword(10,20)', + 'status|1': ['0', '1'], + parentDept: `${index}`, + children: undefined, + }); + } + return children; + })(), + }); + } + return result; +})(); + +const menuList = (() => { + const result: any[] = []; + for (let index = 0; index < 3; index++) { + result.push({ + id: `${index}`, + icon: ['ion:layers-outline', 'ion:git-compare-outline', 'ion:tv-outline'][index], + component: 'LAYOUT', + type: '0', + menuName: ['Dashboard', '权限管理', '功能'][index], + permission: '', + orderNo: index + 1, + createTime: '@datetime', + 'status|1': ['0', '0', '1'], + children: (() => { + const children: any[] = []; + for (let j = 0; j < 4; j++) { + children.push({ + id: `${index}-${j}`, + type: '1', + menuName: ['菜单1', '菜单2', '菜单3', '菜单4'][j], + icon: 'ion:document', + permission: ['menu1:view', 'menu2:add', 'menu3:update', 'menu4:del'][index], + component: [ + '/dashboard/welcome/index', + '/dashboard/Analysis/index', + '/dashboard/workbench/index', + '/dashboard/test/index', + ][j], + orderNo: j + 1, + createTime: '@datetime', + 'status|1': ['0', '1'], + parentMenu: `${index}`, + children: (() => { + const children: any[] = []; + for (let k = 0; k < 4; k++) { + children.push({ + id: `${index}-${j}-${k}`, + type: '2', + menuName: '按钮' + (j + 1) + '-' + (k + 1), + icon: '', + permission: + ['menu1:view', 'menu2:add', 'menu3:update', 'menu4:del'][index] + + ':btn' + + (k + 1), + component: [ + '/dashboard/welcome/index', + '/dashboard/Analysis/index', + '/dashboard/workbench/index', + '/dashboard/test/index', + ][j], + orderNo: j + 1, + createTime: '@datetime', + 'status|1': ['0', '1'], + parentMenu: `${index}-${j}`, + children: undefined, + }); + } + return children; + })(), + }); + } + return children; + })(), + }); + } + return result; +})(); + +export default [ + { + url: `${baseUrl}/system/getAccountList`, + timeout: 100, + method: 'get', + response: ({ query }) => { + const { page = 1, pageSize = 20 } = query; + return resultPageSuccess(page, pageSize, accountList); + }, + }, + { + url: `${baseUrl}/sys/user/list`, + timeout: 100, + method: 'get', + response: ({ query }) => { + const { page = 1, pageSize = 20 } = query; + return resultPageSuccess(page, pageSize, userList); + }, + }, + { + url: `${baseUrl}/system/getRoleListByPage`, + timeout: 100, + method: 'get', + response: ({ query }) => { + const { page = 1, pageSize = 20 } = query; + return resultPageSuccess(page, pageSize, roleList); + }, + }, + { + url: `${baseUrl}/sys/role/list`, + timeout: 100, + method: 'get', + response: ({ query }) => { + const { page = 1, pageSize = 20 } = query; + return resultPageSuccess(page, pageSize, newRoleList); + }, + }, + { + url: `${baseUrl}/system/getTestListByPage`, + timeout: 100, + method: 'get', + response: ({ query }) => { + const { page = 1, pageSize = 20 } = query; + return resultPageSuccess(page, pageSize, testList); + }, + }, + { + url: `${baseUrl}/system/getDemoTableListByPage`, + timeout: 100, + method: 'get', + response: ({ query }) => { + const { page = 1, pageSize = 20 } = query; + return resultPageSuccess(page, pageSize, tableDemoList); + }, + }, + { + url: `${baseUrl}/system/setRoleStatus`, + timeout: 500, + method: 'post', + response: ({ query }) => { + const { id, status } = query; + return resultSuccess({ id, status }); + }, + }, + { + url: `${baseUrl}/system/getAllRoleList`, + timeout: 100, + method: 'get', + response: () => { + return resultSuccess(roleList); + }, + }, + { + url: `${baseUrl}/system/getDeptList`, + timeout: 100, + method: 'get', + response: () => { + return resultSuccess(deptList); + }, + }, + { + url: `${baseUrl}/system/getMenuList`, + timeout: 100, + method: 'get', + response: () => { + return resultSuccess(menuList); + }, + }, + { + url: `${baseUrl}/system/accountExist`, + timeout: 500, + method: 'post', + response: ({ body }) => { + const { account } = body || {}; + if (account && account.indexOf('admin') !== -1) { + return resultError('该字段不能包含admin'); + } else { + return resultSuccess(`${account} can use`); + } + }, + }, +] as MockMethod[]; diff --git a/mock/demo/table-demo.ts b/mock/demo/table-demo.ts new file mode 100644 index 0000000..db6b809 --- /dev/null +++ b/mock/demo/table-demo.ts @@ -0,0 +1,57 @@ +import { MockMethod } from 'vite-plugin-mock'; +import { Random } from 'mockjs'; +import { resultPageSuccess, baseUrl } from '../_util'; + +function getRandomPics(count = 10): string[] { + const arr: string[] = []; + for (let i = 0; i < count; i++) { + arr.push(Random.image('800x600', Random.color(), Random.color(), Random.title())); + } + return arr; +} + +const demoList = (() => { + const result: any[] = []; + for (let index = 0; index < 200; index++) { + result.push({ + id: `${index}`, + beginTime: '@datetime', + endTime: '@datetime', + address: '@city()', + name: '@cname()', + name1: '@cname()', + name2: '@cname()', + name3: '@cname()', + name4: '@cname()', + name5: '@cname()', + name6: '@cname()', + name7: '@cname()', + name8: '@cname()', + avatar: Random.image('400x400', Random.color(), Random.color(), Random.first()), + imgArr: getRandomPics(Math.ceil(Math.random() * 3) + 1), + imgs: getRandomPics(Math.ceil(Math.random() * 3) + 1), + age: Math.ceil(Math.random() * 30) + 1, + score: Math.ceil(Math.random() * 80) + 1, + date: `@date('yyyy-MM-dd')`, + time: `@time('HH:mm')`, + 'no|100000-10000000': 100000, + 'status|1': ['normal', 'enable', 'disable'], + }); + } + return result; +})(); + +export default [ + { + url: `${baseUrl}/table/getDemoList`, + timeout: 100, + method: 'get', + response: ({ query }) => { + const { page = 1, pageSize = 20 } = query; + // update-begin--author:liaozhiyang---date:20240730---for:【issues/6943】mock翻页之后数据id和图片没自动刷新 + const pageNo = +(query.pageNo ?? page); + return resultPageSuccess(pageNo, +pageSize, demoList); + // update-end--author:liaozhiyang---date:20240730---for:【issues/6943】mock翻页之后数据id和图片没自动刷新 + }, + }, +] as MockMethod[]; diff --git a/mock/demo/tree-demo.ts b/mock/demo/tree-demo.ts new file mode 100644 index 0000000..388d913 --- /dev/null +++ b/mock/demo/tree-demo.ts @@ -0,0 +1,38 @@ +import { MockMethod } from 'vite-plugin-mock'; +import { resultSuccess, baseUrl } from '../_util'; + +const demoTreeList = (keyword) => { + const result = { + list: [] as Recordable[], + }; + for (let index = 0; index < 5; index++) { + const children: Recordable[] = []; + for (let j = 0; j < 3; j++) { + children.push({ + title: `${keyword ?? ''}选项${index}-${j}`, + value: `${index}-${j}`, + key: `${index}-${j}`, + }); + } + result.list.push({ + title: `${keyword ?? ''}选项${index}`, + value: `${index}`, + key: `${index}`, + children, + }); + } + return result; +}; + +export default [ + { + url: `${baseUrl}/tree/getDemoOptions`, + timeout: 1000, + method: 'get', + response: ({ query }) => { + const { keyword } = query; + console.log("查询条件:", keyword); + return resultSuccess(demoTreeList(keyword)); + }, + }, +] as MockMethod[]; diff --git a/mock/sys/menu.ts b/mock/sys/menu.ts new file mode 100644 index 0000000..73bda64 --- /dev/null +++ b/mock/sys/menu.ts @@ -0,0 +1,270 @@ +import { resultSuccess, resultError, getRequestToken, requestParams,baseUrl} from '../_util'; +import { MockMethod } from 'vite-plugin-mock'; +import { createFakeUserList } from './user'; + +// single +const dashboardRoute = { + path: '/dashboard', + name: 'Dashboard', + component: 'LAYOUT', + redirect: '/dashboard/analysis', + meta: { + title: 'routes.dashboard.dashboard', + hideChildrenInMenu: true, + icon: 'bx:bx-home', + }, + children: [ + { + path: 'analysis', + name: 'Analysis', + component: '/dashboard/Analysis/index', + meta: { + hideMenu: true, + hideBreadcrumb: true, + title: 'routes.dashboard.analysis', + currentActiveMenu: '/dashboard', + icon: 'bx:bx-home', + }, + }, + { + path: 'workbench', + name: 'Workbench', + component: '/dashboard/workbench/index', + meta: { + hideMenu: true, + hideBreadcrumb: true, + title: 'routes.dashboard.workbench', + currentActiveMenu: '/dashboard', + icon: 'bx:bx-home', + }, + }, + ], +}; + +const backRoute = { + path: 'back', + name: 'PermissionBackDemo', + meta: { + title: 'routes.demo.permission.back', + }, + + children: [ + { + path: 'page', + name: 'BackAuthPage', + component: '/demo/permission/back/index', + meta: { + title: 'routes.demo.permission.backPage', + }, + }, + { + path: 'btn', + name: 'BackAuthBtn', + component: '/demo/permission/back/Btn', + meta: { + title: 'routes.demo.permission.backBtn', + }, + }, + ], +}; + +const authRoute = { + path: '/permission', + name: 'Permission', + component: 'LAYOUT', + redirect: '/permission/front/page', + meta: { + icon: 'carbon:user-role', + title: 'routes.demo.permission.permission', + }, + children: [backRoute], +}; + +const levelRoute = { + path: '/level', + name: 'Level', + component: 'LAYOUT', + redirect: '/level/menu1/menu1-1', + meta: { + icon: 'carbon:user-role', + title: 'routes.demo.level.level', + }, + + children: [ + { + path: 'menu1', + name: 'Menu1Demo', + meta: { + title: 'Menu1', + }, + children: [ + { + path: 'menu1-1', + name: 'Menu11Demo', + meta: { + title: 'Menu1-1', + }, + children: [ + { + path: 'menu1-1-1', + name: 'Menu111Demo', + component: '/demo/level/Menu111', + meta: { + title: 'Menu111', + }, + }, + ], + }, + { + path: 'menu1-2', + name: 'Menu12Demo', + component: '/demo/level/Menu12', + meta: { + title: 'Menu1-2', + }, + }, + ], + }, + { + path: 'menu2', + name: 'Menu2Demo', + component: '/demo/level/Menu2', + meta: { + title: 'Menu2', + }, + }, + ], +}; + +const sysRoute = { + path: '/system', + name: 'System', + component: 'LAYOUT', + redirect: '/system/account', + meta: { + icon: 'ion:settings-outline', + title: 'routes.demo.system.moduleName', + }, + children: [ + { + path: 'account', + name: 'AccountManagement', + meta: { + title: 'routes.demo.system.account', + ignoreKeepAlive: true, + }, + component: '/demo/system/account/index', + }, + { + path: 'account_detail/:id', + name: 'AccountDetail', + meta: { + hideMenu: true, + title: 'routes.demo.system.account_detail', + ignoreKeepAlive: true, + showMenu: false, + currentActiveMenu: '/system/account', + }, + component: '/demo/system/account/AccountDetail', + }, + { + path: 'role', + name: 'RoleManagement', + meta: { + title: 'routes.demo.system.role', + ignoreKeepAlive: true, + }, + component: '/demo/system/role/index', + }, + + { + path: 'menu', + name: 'MenuManagement', + meta: { + title: 'routes.demo.system.menu', + ignoreKeepAlive: true, + }, + component: '/demo/system/menu/index', + }, + { + path: 'dept', + name: 'DeptManagement', + meta: { + title: 'routes.demo.system.dept', + ignoreKeepAlive: true, + }, + component: '/demo/system/dept/index', + }, + { + path: 'changePassword', + name: 'ChangePassword', + meta: { + title: 'routes.demo.system.password', + ignoreKeepAlive: true, + }, + component: '/demo/system/password/index', + }, + ], +}; + +const linkRoute = { + path: '/link', + name: 'Link', + component: 'LAYOUT', + meta: { + icon: 'ion:tv-outline', + title: 'routes.demo.iframe.frame', + }, + children: [ + { + path: 'doc', + name: 'Doc', + meta: { + title: 'routes.demo.iframe.doc', + frameSrc: 'https://vvbin.cn/doc-next/', + }, + }, + { + path: 'https://vvbin.cn/doc-next/', + name: 'DocExternal', + component: 'LAYOUT', + meta: { + title: 'routes.demo.iframe.docExternal', + }, + }, + ], +}; + +export default [ + { + url: `${baseUrl}/sys/permission/getUserPermissionByToken`, + timeout: 1000, + method: 'get', + response: (request: requestParams) => { + const token = getRequestToken(request); + if (!token) { + return resultError('Invalid token!'); + } + const checkUser = createFakeUserList().find((item) => item.token === token); + if (!checkUser) { + return resultError('Invalid user token!'); + } + const id = checkUser.userId; + let menu: Object[]; + switch (id) { + case '1': + dashboardRoute.redirect = dashboardRoute.path + '/' + dashboardRoute.children[0].path; + menu = [dashboardRoute, authRoute, levelRoute, sysRoute, linkRoute]; + break; + case '2': + dashboardRoute.redirect = dashboardRoute.path + '/' + dashboardRoute.children[1].path; + menu = [dashboardRoute, authRoute, levelRoute, linkRoute]; + break; + default: + menu = []; + } + + return resultSuccess(menu); + }, + }, +] as MockMethod[]; diff --git a/mock/sys/user.ts b/mock/sys/user.ts new file mode 100644 index 0000000..34175e7 --- /dev/null +++ b/mock/sys/user.ts @@ -0,0 +1,124 @@ +import { MockMethod } from 'vite-plugin-mock'; +import { resultError, resultSuccess, getRequestToken, requestParams, baseUrl } from '../_util'; +export function createFakeUserList() { + return [ + { + userId: '1', + username: 'admin', + realname: '管理员', + avatar: 'https://q1.qlogo.cn/g?b=qq&nk=190848757&s=640', + desc: 'manager', + password: '123456', + token: 'fakeToken1', + homePath: '/dashboard/analysis', + roles: [ + { + roleName: 'Super Admin', + value: 'super', + }, + ], + }, + { + userId: '2', + username: 'jeecg', + password: '123456', + realname: '测试用户', + avatar: 'https://q1.qlogo.cn/g?b=qq&nk=339449197&s=640', + desc: 'tester', + token: 'fakeToken2', + homePath: '/dashboard/workbench', + roles: [ + { + roleName: 'Tester', + value: 'test', + }, + ], + }, + ]; +} + +const fakeCodeList: any = { + '1': ['1000', '3000', '5000'], + + '2': ['2000', '4000', '6000'], +}; + +export default [ + // mock user login + { + url: `${baseUrl}/sys/login`, + timeout: 200, + method: 'post', + response: ({ body }) => { + const { username, password } = body; + const checkUser = createFakeUserList().find( + (item) => item.username === username && password === item.password + ); + if (!checkUser) { + return resultError('Incorrect account or password!'); + } + const { userId, username: _username, token, realname, desc, roles } = checkUser; + return resultSuccess({ + roles, + userId, + username: _username, + token, + realname, + desc, + }); + }, + }, + { + url: `${baseUrl}/sys/user/getUserInfo`, + method: 'get', + response: (request: requestParams) => { + const token = getRequestToken(request); + if (!token) return resultError('Invalid token'); + const checkUser = createFakeUserList().find((item) => item.token === token); + if (!checkUser) { + return resultError('The corresponding user information was not obtained!'); + } + return resultSuccess(checkUser); + }, + }, + { + url: `${baseUrl}/sys/permission/getPermCode`, + timeout: 200, + method: 'get', + response: (request: requestParams) => { + const token = getRequestToken(request); + if (!token) return resultError('Invalid token'); + const checkUser = createFakeUserList().find((item) => item.token === token); + if (!checkUser) { + return resultError('Invalid token!'); + } + const codeList = fakeCodeList[checkUser.userId]; + + return resultSuccess(codeList); + }, + }, + { + url: `${baseUrl}/sys/logout`, + timeout: 200, + method: 'get', + response: (request: requestParams) => { + const token = getRequestToken(request); + if (!token) return resultError('Invalid token'); + const checkUser = createFakeUserList().find((item) => item.token === token); + if (!checkUser) { + return resultError('Invalid token!'); + } + return resultSuccess(undefined, { message: 'Token has been destroyed' }); + }, + }, + { + url: `${baseUrl}/sys/randomImage/1629428467008`, + timeout: 200, + method: 'get', + response: (request: requestParams) => { + const result = + 'data:image/jpg;base64,/9j/4AAQSkZJRgABAgAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAAjAGkDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD3h/ME5lErCKNSHi8rO44yCp65/P060gmdbbIaKecxl0VDsEmOmMk8cgZ96dcypFGpkEm0uOUzxznJI6DjnPH54ryTWNW1+P436T4ftNev4LTU7Brhw9tbCSHiZxGrNCcKCijkMeuSSOAD1KJ7hrTZNK0d1Iz7egGVPRSV6HGRkE4z1xV5SWQEqVJGSpxke3FeYL4n1PSfi5pXhK7vxrFlf27XVveyQRrcQHa4KFo1CMhMLdFUjfy2F59NjZm3Bl2kMRxnGO3JA7Y/HI7UAVrjfbWt3NJLNKmCwVAoaNcc4PHTk8+n5rKs1tDGtsdw5X94GkOT90ls5xnr14PYDNeUfDzxvq3xCuNZvG8SNp1zBKHtdFgtYpFjhAADuWXfKpJwwRkIwcFd6geg+Dm12Tw9bN4hkX+0Y5bmKcLGVV9s7KjLkA7dijBPLAgnJ5oWgGrb36zBtqyPh9oKwuvG4DncByCeeexPsLHm7jH5amSNxnzFI2gY479/bNVrxYZpRD57Q3JRkikRFLxlgfmUspGQEbrkccg8V5l8PfEOt6h4p8YW+r+JJf7M8OXZhjWWC2jjMQaZSZWWNSMLGDkFQD1BHFAHq7usMcksjnYoLHI+6AOen0pqllZfNkUMWZVUdG5yOvOcD+dcclt4j1/XlvtM8T3dn4cIc7kgt2a4PGwwBoTiLqfMZm34+VQpVz0Ou2t/eWfk2GrXGmTNxHcW9ukxV8EAOrqwKZIJ+6fl+8M0AXjHcb5GWdcN9xWjyF6ehGe/5j05jmdri3cxPJGI3YOAOXABGARnGTjkcjpwenmvwt8Y61czeIdM8b6g0esaW3mTR3SwQJFAB99dijcOpZySoBjI+8TXR+EtK16SNdR1rWL64WUNPaWtxbxQGBXbKCVY0VjKq/f525dgBxuKA6i4ZfsSEyq0R275Wm8v5f7wZe/TjgHNWqiiSWNEV5vNwp3MygFj68cAdeMen4y0wKk6Mtysp3yQsvktEoyPmI+YgnGB9O57dPIfGML3H7SnhaGO+msXfS2C3EIjLqcXPTzFZeenIPXjnFeyiIJIzx4XzH3SZBO75ccc8dF/L3zXHah4D0K58US+ILuLUPtcMeI5l1G5WT5i+VjYSDYCW2hVIHLDaMg0AX9K8FaVZ+IJPEVxPc6rrTAxLf3rqzRJgKURUVUToeQoPzNk8mt0qRJF5uTMVdBNGuAucHoScdByeOPcAxRw3MdzOpuC3nZkQiEBY8EcMf4sggfRT0qYQSJBJGJWlGwKodirZxjlxzzxzjIOfYAA8Tn+HehfErRoPGvhDUP7J1uQCaWK3YmJLpQWZT0aN95X5xxgBgp3ZPb/AAi8U6r4q8BRajriv9qW5khFy6hBcrkEOoCqAAW2cZ5Q85yBdtPAfhSTSv7Og0mWxiWH7PcQ288lq86Y2/vjEy+cCM8sW6t6mukt9PttNsobLTbC0gtY34gjURIgzuJVVGM55xxz3oAnZf8ASI38vcQrLu3fdBwenccfy96+abbwjqHiu8+K1lpt/NFJBqYlW1MwSO5KzzECRmBJwA2ASBuKljxkfSF9ai7jeESzRtJGy5R3UAdCcoVIOGOCCD36qMc9oHgHw/oGrSalpMd1a3DuWnRb6Z1lYr/y2VnYOw3sQT03Z96AMn4W+PP+Et0xrLVZmi8TaerRX9pJH5Rba2BIE9egbGMMSCACtdxOHuYmXy3CCVRjIHmLkbs5HTrx3A9DXJN8LvCraj/adpa3SajtZBqC6rdGaMhdgw3mZOB8uMjgY9q39X0Sx1myuLLUknWwbLSLDdyQrKGUhgxRlOPvZUnac5OT0AseQfEHT7u71CP4keHrbTZJtFSGWQ/Zmk+3gMytMByDGm0BXwrbVdwwVYmPqXhvxDZeKdEj1bRL6AWM42NvT9/DLtVQkmWOXBx16jbjIINGl+GdPs9I/seG6nSAfIY7e/n3qqEBVSQuZI1A25RWABOOhO7P8NeA/DejRveaBpb2IuW2k/bJmDxjIDlJNyk4LYyOjHBGaAOwjeQogYxtIuBNtbhTjPH6cHsalqlbWMFrcSNuVnkkeZAwG5c/eI79wOO2O+SbtABSMiuMMoYZBwRnkHIP50UUALRRRQAUUUUAFFFFACBVUsVUAscsQOpxjn8AKWiigBFVUQIihVUYAAwAKY8EUkqSOgZ0BCk9uQf5qD+FFFAElFFFAH//2Q=='; + return resultSuccess(result); + }, + }, +] as MockMethod[]; diff --git a/npm b/npm new file mode 100644 index 0000000..e69de29 diff --git a/package.json b/package.json new file mode 100644 index 0000000..922ba25 --- /dev/null +++ b/package.json @@ -0,0 +1,183 @@ +{ + "name": "jeecgboot-vue3", + "version": "3.8.1", + "author": { + "name": "北京国炬信息技术有限公司", + "email": "jeecgos@163.com", + "url": "https://www.jeecg.com" + }, + "scripts": { + "pinstall": "pnpm install", + "clean:cache": "rimraf node_modules/.cache/ && rimraf node_modules/.vite", + "dev": "vite", + "build": "cross-env NODE_ENV=production NODE_OPTIONS=--max-old-space-size=8192 vite build && esno ./build/script/postBuild.ts", + "build:report": "pnpm clean:cache && cross-env REPORT=true npm run build", + "preview": "npm run build && vite preview", + "reinstall": "rimraf pnpm-lock.yaml && rimraf yarn.lock && rimraf package.lock.json && rimraf node_modules && npm run install", + "clean:lib": "rimraf node_modules", + "gen:icon": "esno ./build/generate/icon/index.ts", + "batch:prettier": "prettier --write \"src/**/*.{js,json,tsx,css,less,scss,vue,html,md}\"", + "upgrade:log": "conventional-changelog -p angular -i CHANGELOG.md -s", + "husky:install": "husky install" + }, + "dependencies": { + "@jeecg/online": "3.7.4", + "@jeecg/aiflow": "1.1.1", + "@logicflow/core": "^2.0.10", + "@logicflow/extension": "^2.0.14", + "@logicflow/vue-node-registry": "^1.0.12", + "@iconify/iconify": "^3.1.1", + "@ant-design/colors": "^7.2.0", + "@ant-design/icons-vue": "^7.0.1", + "@vue/shared": "^3.5.13", + "@vueuse/core": "^10.11.1", + "@tinymce/tinymce-vue": "4.0.7", + "@zxcvbn-ts/core": "^3.0.4", + "ant-design-vue": "^4.2.6", + "axios": "^1.7.9", + "china-area-data": "^5.0.1", + "@vant/area-data": "^1.5.2", + "clipboard": "^2.0.11", + "codemirror": "^5.65.18", + "cron-parser": "^4.9.0", + "cropperjs": "^1.6.2", + "crypto-js": "^4.2.0", + "dayjs": "^1.11.13", + "dom-align": "^1.12.4", + "echarts": "^5.6.0", + "emoji-mart-vue-fast": "^15.0.3", + "enquire.js": "^2.1.6", + "intro.js": "^7.2.0", + "lodash-es": "^4.17.21", + "lodash.get": "^4.4.2", + "markdown-it": "^14.1.0", + "markdown-it-link-attributes": "^4.0.1", + "event-source-polyfill": "^1.0.31", + "highlight.js": "^11.11.1", + "@traptitech/markdown-it-katex": "^3.6.0", + "md5": "^2.3.0", + "mockjs": "^1.1.0", + "nprogress": "^0.2.0", + "path-to-regexp": "^6.3.0", + "pinia": "2.1.7", + "print-js": "^1.6.0", + "qs": "^6.13.1", + "qrcode": "^1.5.4", + "resize-observer-polyfill": "^1.5.1", + "showdown": "^2.1.0", + "sortablejs": "^1.15.6", + "swagger-ui-dist": "^5.21.0", + "tinymce": "6.6.2", + "vditor": "^3.10.8", + "vue": "^3.5.13", + "vue-cropper": "^0.6.5", + "vue-cropperjs": "^5.0.0", + "vue-i18n": "^9.14.2", + "vue-infinite-scroll": "^2.0.2", + "vue-print-nb-jeecg": "^1.0.12", + "vue-router": "^4.5.0", + "vue-types": "^5.1.3", + "vuedraggable": "^4.1.0", + "vxe-table": "4.13.31", + "vxe-table-plugin-antd": "4.0.8", + "vxe-pc-ui": "4.6.12", + "xe-utils": "3.5.26", + "xss": "^1.0.15" + }, + "devDependencies": { + "@commitlint/cli": "^18.6.1", + "@commitlint/config-conventional": "^18.6.3", + "@iconify/json": "^2.2.292", + "@purge-icons/generated": "^0.10.0", + "@types/codemirror": "^5.60.15", + "@types/crypto-js": "^4.2.2", + "@types/fs-extra": "^11.0.4", + "@types/inquirer": "^9.0.7", + "@types/intro.js": "^5.1.5", + "@types/jest": "^29.5.14", + "@types/lodash-es": "^4.17.12", + "@types/mockjs": "^1.0.10", + "@types/node": "^20.17.12", + "@types/nprogress": "^0.2.3", + "@types/qrcode": "^1.5.5", + "@types/qs": "^6.9.17", + "@types/showdown": "^2.0.6", + "@types/sortablejs": "^1.15.8", + "@typescript-eslint/eslint-plugin": "^6.21.0", + "@typescript-eslint/parser": "^6.21.0", + "@vitejs/plugin-vue": "^5.2.1", + "@vitejs/plugin-vue-jsx": "^4.1.1", + "@vue/compiler-sfc": "^3.5.13", + "@vue/test-utils": "^2.4.6", + "autoprefixer": "^10.4.20", + "commitizen": "^4.3.1", + "conventional-changelog-cli": "^4.1.0", + "cross-env": "^7.0.3", + "cz-git": "^1.11.0", + "czg": "^1.11.0", + "dotenv": "^16.4.7", + "eslint": "^8.57.1", + "eslint-config-prettier": "^9.1.0", + "eslint-define-config": "^2.1.0", + "eslint-plugin-jest": "^27.9.0", + "eslint-plugin-prettier": "^5.2.1", + "eslint-plugin-vue": "^9.32.0", + "esno": "^4.8.0", + "fs-extra": "^11.2.0", + "http-server": "^14.1.1", + "husky": "^8.0.3", + "inquirer": "^9.3.7", + "is-ci": "^3.0.1", + "jest": "^29.7.0", + "less": "^4.2.1", + "lint-staged": "15.2.2", + "npm-run-all": "^4.1.5", + "picocolors": "^1.1.1", + "postcss": "^8.4.49", + "postcss-html": "^1.7.0", + "postcss-less": "^6.0.0", + "prettier": "^3.4.2", + "pretty-quick": "^4.0.0", + "rimraf": "^5.0.10", + "rollup": "^4.30.0", + "rollup-plugin-visualizer": "^5.13.1", + "stylelint": "^16.12.0", + "stylelint-config-prettier": "^9.0.5", + "stylelint-config-recommended": "^14.0.1", + "stylelint-config-recommended-vue": "^1.5.0", + "stylelint-config-standard": "^36.0.1", + "stylelint-order": "^6.0.4", + "ts-jest": "^29.2.5", + "ts-node": "^10.9.2", + "typescript": "^4.9.5", + "vite": "^6.0.7", + "vite-plugin-compression": "^0.5.1", + "vite-plugin-html": "^3.2.2", + "vite-plugin-mkcert": "^1.17.6", + "vite-plugin-mock": "^2.9.8", + "vite-plugin-optimize-persist": "^0.1.2", + "vite-plugin-package-config": "^0.1.1", + "vite-plugin-purge-icons": "^0.10.0", + "vite-plugin-svg-icons": "^2.0.1", + "vite-plugin-qiankun": "^1.0.15", + "@rys-fe/vite-plugin-theme": "^0.8.6", + "vite-plugin-vue-setup-extend-plus": "^0.1.0", + "unocss": "^0.58.9", + "vue-eslint-parser": "^9.4.3", + "vue-tsc": "^1.8.27", + "dingtalk-jsapi": "^3.0.42", + "big.js": "^6.2.2" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/jeecgboot/JeecgBoot.git" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/jeecgboot/JeecgBoot/issues" + }, + "homepage": "https://www.jeecg.com", + "engines": { + "node": "^18 || >=20" + } +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml new file mode 100644 index 0000000..ef12711 --- /dev/null +++ b/pnpm-lock.yaml @@ -0,0 +1,13334 @@ +lockfileVersion: '9.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +importers: + + .: + dependencies: + '@ant-design/colors': + specifier: ^7.2.0 + version: 7.2.0 + '@ant-design/icons-vue': + specifier: ^7.0.1 + version: 7.0.1(vue@3.5.13(typescript@4.9.5)) + '@iconify/iconify': + specifier: ^3.1.1 + version: 3.1.1 + '@jeecg/aiflow': + specifier: 1.1.1 + version: 1.1.1 + '@jeecg/online': + specifier: 3.7.4 + version: 3.7.4 + '@logicflow/core': + specifier: ^2.0.10 + version: 2.0.16 + '@logicflow/extension': + specifier: ^2.0.14 + version: 2.0.21(@logicflow/core@2.0.16) + '@logicflow/vue-node-registry': + specifier: ^1.0.12 + version: 1.0.18(@logicflow/core@2.0.16)(vue@3.5.13(typescript@4.9.5)) + '@tinymce/tinymce-vue': + specifier: 4.0.7 + version: 4.0.7(vue@3.5.13(typescript@4.9.5)) + '@traptitech/markdown-it-katex': + specifier: ^3.6.0 + version: 3.6.0 + '@vant/area-data': + specifier: ^1.5.2 + version: 1.5.2 + '@vue/shared': + specifier: ^3.5.13 + version: 3.5.13 + '@vueuse/core': + specifier: ^10.11.1 + version: 10.11.1(vue@3.5.13(typescript@4.9.5)) + '@zxcvbn-ts/core': + specifier: ^3.0.4 + version: 3.0.4 + ant-design-vue: + specifier: ^4.2.6 + version: 4.2.6(vue@3.5.13(typescript@4.9.5)) + axios: + specifier: ^1.7.9 + version: 1.8.4(debug@4.4.0) + china-area-data: + specifier: ^5.0.1 + version: 5.0.1 + clipboard: + specifier: ^2.0.11 + version: 2.0.11 + codemirror: + specifier: ^5.65.18 + version: 5.65.18 + cron-parser: + specifier: ^4.9.0 + version: 4.9.0 + cropperjs: + specifier: ^1.6.2 + version: 1.6.2 + crypto-js: + specifier: ^4.2.0 + version: 4.2.0 + dayjs: + specifier: ^1.11.13 + version: 1.11.13 + dom-align: + specifier: ^1.12.4 + version: 1.12.4 + echarts: + specifier: ^5.6.0 + version: 5.6.0 + emoji-mart-vue-fast: + specifier: ^15.0.3 + version: 15.0.3(vue@3.5.13(typescript@4.9.5)) + enquire.js: + specifier: ^2.1.6 + version: 2.1.6 + event-source-polyfill: + specifier: ^1.0.31 + version: 1.0.31 + highlight.js: + specifier: ^11.11.1 + version: 11.11.1 + intro.js: + specifier: ^7.2.0 + version: 7.2.0 + lodash-es: + specifier: ^4.17.21 + version: 4.17.21 + lodash.get: + specifier: ^4.4.2 + version: 4.4.2 + markdown-it: + specifier: ^14.1.0 + version: 14.1.0 + markdown-it-link-attributes: + specifier: ^4.0.1 + version: 4.0.1 + md5: + specifier: ^2.3.0 + version: 2.3.0 + mockjs: + specifier: ^1.1.0 + version: 1.1.0 + nprogress: + specifier: ^0.2.0 + version: 0.2.0 + path-to-regexp: + specifier: ^6.3.0 + version: 6.3.0 + pinia: + specifier: 2.1.7 + version: 2.1.7(typescript@4.9.5)(vue@3.5.13(typescript@4.9.5)) + print-js: + specifier: ^1.6.0 + version: 1.6.0 + qrcode: + specifier: ^1.5.4 + version: 1.5.4 + qs: + specifier: ^6.13.1 + version: 6.13.1 + resize-observer-polyfill: + specifier: ^1.5.1 + version: 1.5.1 + showdown: + specifier: ^2.1.0 + version: 2.1.0 + sortablejs: + specifier: ^1.15.6 + version: 1.15.6 + swagger-ui-dist: + specifier: ^5.21.0 + version: 5.24.1 + tinymce: + specifier: 6.6.2 + version: 6.6.2 + vditor: + specifier: ^3.10.8 + version: 3.10.8 + vue: + specifier: ^3.5.13 + version: 3.5.13(typescript@4.9.5) + vue-cropper: + specifier: ^0.6.5 + version: 0.6.5 + vue-cropperjs: + specifier: ^5.0.0 + version: 5.0.0(vue@3.5.13(typescript@4.9.5)) + vue-i18n: + specifier: ^9.14.2 + version: 9.14.2(vue@3.5.13(typescript@4.9.5)) + vue-infinite-scroll: + specifier: ^2.0.2 + version: 2.0.2 + vue-print-nb-jeecg: + specifier: ^1.0.12 + version: 1.0.12 + vue-router: + specifier: ^4.5.0 + version: 4.5.0(vue@3.5.13(typescript@4.9.5)) + vue-types: + specifier: ^5.1.3 + version: 5.1.3(vue@3.5.13(typescript@4.9.5)) + vuedraggable: + specifier: ^4.1.0 + version: 4.1.0(vue@3.5.13(typescript@4.9.5)) + vxe-pc-ui: + specifier: 4.6.12 + version: 4.6.12(vue@3.5.13(typescript@4.9.5)) + vxe-table: + specifier: 4.13.31 + version: 4.13.31(vue@3.5.13(typescript@4.9.5)) + vxe-table-plugin-antd: + specifier: 4.0.8 + version: 4.0.8(vxe-table@4.13.31(vue@3.5.13(typescript@4.9.5))) + xe-utils: + specifier: 3.5.26 + version: 3.5.26 + xss: + specifier: ^1.0.15 + version: 1.0.15 + devDependencies: + '@commitlint/cli': + specifier: ^18.6.1 + version: 18.6.1(@types/node@20.17.12)(typescript@4.9.5) + '@commitlint/config-conventional': + specifier: ^18.6.3 + version: 18.6.3 + '@iconify/json': + specifier: ^2.2.292 + version: 2.2.292 + '@purge-icons/generated': + specifier: ^0.10.0 + version: 0.10.0 + '@rys-fe/vite-plugin-theme': + specifier: ^0.8.6 + version: 0.8.6(vite@6.0.7(@types/node@20.17.12)(jiti@2.4.2)(less@4.2.1)(terser@5.37.0)(tsx@4.19.2)) + '@types/codemirror': + specifier: ^5.60.15 + version: 5.60.15 + '@types/crypto-js': + specifier: ^4.2.2 + version: 4.2.2 + '@types/fs-extra': + specifier: ^11.0.4 + version: 11.0.4 + '@types/inquirer': + specifier: ^9.0.7 + version: 9.0.7 + '@types/intro.js': + specifier: ^5.1.5 + version: 5.1.5 + '@types/jest': + specifier: ^29.5.14 + version: 29.5.14 + '@types/lodash-es': + specifier: ^4.17.12 + version: 4.17.12 + '@types/mockjs': + specifier: ^1.0.10 + version: 1.0.10 + '@types/node': + specifier: ^20.17.12 + version: 20.17.12 + '@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.17 + version: 6.9.17 + '@types/showdown': + specifier: ^2.0.6 + version: 2.0.6 + '@types/sortablejs': + specifier: ^1.15.8 + version: 1.15.8 + '@typescript-eslint/eslint-plugin': + specifier: ^6.21.0 + version: 6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@4.9.5))(eslint@8.57.1)(typescript@4.9.5) + '@typescript-eslint/parser': + specifier: ^6.21.0 + version: 6.21.0(eslint@8.57.1)(typescript@4.9.5) + '@vitejs/plugin-vue': + specifier: ^5.2.1 + version: 5.2.1(vite@6.0.7(@types/node@20.17.12)(jiti@2.4.2)(less@4.2.1)(terser@5.37.0)(tsx@4.19.2))(vue@3.5.13(typescript@4.9.5)) + '@vitejs/plugin-vue-jsx': + specifier: ^4.1.1 + version: 4.1.1(vite@6.0.7(@types/node@20.17.12)(jiti@2.4.2)(less@4.2.1)(terser@5.37.0)(tsx@4.19.2))(vue@3.5.13(typescript@4.9.5)) + '@vue/compiler-sfc': + specifier: ^3.5.13 + version: 3.5.13 + '@vue/test-utils': + specifier: ^2.4.6 + version: 2.4.6 + autoprefixer: + specifier: ^10.4.20 + version: 10.4.20(postcss@8.4.49) + big.js: + specifier: ^6.2.2 + version: 6.2.2 + commitizen: + specifier: ^4.3.1 + version: 4.3.1(@types/node@20.17.12)(typescript@4.9.5) + conventional-changelog-cli: + specifier: ^4.1.0 + version: 4.1.0 + cross-env: + specifier: ^7.0.3 + version: 7.0.3 + cz-git: + specifier: ^1.11.0 + version: 1.11.0 + czg: + specifier: ^1.11.0 + version: 1.11.0 + dingtalk-jsapi: + specifier: ^3.0.42 + version: 3.0.42 + dotenv: + specifier: ^16.4.7 + version: 16.4.7 + eslint: + specifier: ^8.57.1 + version: 8.57.1 + eslint-config-prettier: + specifier: ^9.1.0 + version: 9.1.0(eslint@8.57.1) + eslint-define-config: + specifier: ^2.1.0 + version: 2.1.0 + eslint-plugin-jest: + specifier: ^27.9.0 + version: 27.9.0(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@4.9.5))(eslint@8.57.1)(typescript@4.9.5))(eslint@8.57.1)(jest@29.7.0(@types/node@20.17.12)(ts-node@10.9.2(@types/node@20.17.12)(typescript@4.9.5)))(typescript@4.9.5) + eslint-plugin-prettier: + specifier: ^5.2.1 + version: 5.2.1(eslint-config-prettier@9.1.0(eslint@8.57.1))(eslint@8.57.1)(prettier@3.4.2) + eslint-plugin-vue: + specifier: ^9.32.0 + version: 9.32.0(eslint@8.57.1) + esno: + specifier: ^4.8.0 + version: 4.8.0 + fs-extra: + specifier: ^11.2.0 + version: 11.2.0 + http-server: + specifier: ^14.1.1 + version: 14.1.1 + husky: + specifier: ^8.0.3 + version: 8.0.3 + inquirer: + specifier: ^9.3.7 + version: 9.3.7 + is-ci: + specifier: ^3.0.1 + version: 3.0.1 + jest: + specifier: ^29.7.0 + version: 29.7.0(@types/node@20.17.12)(ts-node@10.9.2(@types/node@20.17.12)(typescript@4.9.5)) + less: + specifier: ^4.2.1 + version: 4.2.1 + lint-staged: + specifier: 15.2.2 + version: 15.2.2 + npm-run-all: + specifier: ^4.1.5 + version: 4.1.5 + picocolors: + specifier: ^1.1.1 + version: 1.1.1 + postcss: + specifier: ^8.4.49 + version: 8.4.49 + postcss-html: + specifier: ^1.7.0 + version: 1.7.0 + postcss-less: + specifier: ^6.0.0 + version: 6.0.0(postcss@8.4.49) + prettier: + specifier: ^3.4.2 + version: 3.4.2 + pretty-quick: + specifier: ^4.0.0 + version: 4.0.0(prettier@3.4.2) + rimraf: + specifier: ^5.0.10 + version: 5.0.10 + rollup: + specifier: ^4.30.0 + version: 4.30.0 + rollup-plugin-visualizer: + specifier: ^5.13.1 + version: 5.13.1(rollup@4.30.0) + stylelint: + specifier: ^16.12.0 + version: 16.12.0(typescript@4.9.5) + stylelint-config-prettier: + specifier: ^9.0.5 + version: 9.0.5(stylelint@16.12.0(typescript@4.9.5)) + stylelint-config-recommended: + specifier: ^14.0.1 + version: 14.0.1(stylelint@16.12.0(typescript@4.9.5)) + stylelint-config-recommended-vue: + specifier: ^1.5.0 + version: 1.5.0(postcss-html@1.7.0)(stylelint@16.12.0(typescript@4.9.5)) + stylelint-config-standard: + specifier: ^36.0.1 + version: 36.0.1(stylelint@16.12.0(typescript@4.9.5)) + stylelint-order: + specifier: ^6.0.4 + version: 6.0.4(stylelint@16.12.0(typescript@4.9.5)) + ts-jest: + specifier: ^29.2.5 + version: 29.2.5(@babel/core@7.26.0)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.0))(jest@29.7.0(@types/node@20.17.12)(ts-node@10.9.2(@types/node@20.17.12)(typescript@4.9.5)))(typescript@4.9.5) + ts-node: + specifier: ^10.9.2 + version: 10.9.2(@types/node@20.17.12)(typescript@4.9.5) + typescript: + specifier: ^4.9.5 + version: 4.9.5 + unocss: + specifier: ^0.58.9 + version: 0.58.9(postcss@8.4.49)(rollup@4.30.0)(vite@6.0.7(@types/node@20.17.12)(jiti@2.4.2)(less@4.2.1)(terser@5.37.0)(tsx@4.19.2)) + vite: + specifier: ^6.0.7 + version: 6.0.7(@types/node@20.17.12)(jiti@2.4.2)(less@4.2.1)(terser@5.37.0)(tsx@4.19.2) + vite-plugin-compression: + specifier: ^0.5.1 + version: 0.5.1(vite@6.0.7(@types/node@20.17.12)(jiti@2.4.2)(less@4.2.1)(terser@5.37.0)(tsx@4.19.2)) + vite-plugin-html: + specifier: ^3.2.2 + version: 3.2.2(vite@6.0.7(@types/node@20.17.12)(jiti@2.4.2)(less@4.2.1)(terser@5.37.0)(tsx@4.19.2)) + vite-plugin-mkcert: + specifier: ^1.17.6 + version: 1.17.6(vite@6.0.7(@types/node@20.17.12)(jiti@2.4.2)(less@4.2.1)(terser@5.37.0)(tsx@4.19.2)) + vite-plugin-mock: + specifier: ^2.9.8 + version: 2.9.8(mockjs@1.1.0)(vite@6.0.7(@types/node@20.17.12)(jiti@2.4.2)(less@4.2.1)(terser@5.37.0)(tsx@4.19.2)) + vite-plugin-optimize-persist: + specifier: ^0.1.2 + version: 0.1.2(vite-plugin-package-config@0.1.1(vite@6.0.7(@types/node@20.17.12)(jiti@2.4.2)(less@4.2.1)(terser@5.37.0)(tsx@4.19.2)))(vite@6.0.7(@types/node@20.17.12)(jiti@2.4.2)(less@4.2.1)(terser@5.37.0)(tsx@4.19.2)) + vite-plugin-package-config: + specifier: ^0.1.1 + version: 0.1.1(vite@6.0.7(@types/node@20.17.12)(jiti@2.4.2)(less@4.2.1)(terser@5.37.0)(tsx@4.19.2)) + vite-plugin-purge-icons: + specifier: ^0.10.0 + version: 0.10.0(vite@6.0.7(@types/node@20.17.12)(jiti@2.4.2)(less@4.2.1)(terser@5.37.0)(tsx@4.19.2)) + vite-plugin-qiankun: + specifier: ^1.0.15 + version: 1.0.15(typescript@4.9.5)(vite@6.0.7(@types/node@20.17.12)(jiti@2.4.2)(less@4.2.1)(terser@5.37.0)(tsx@4.19.2)) + vite-plugin-svg-icons: + specifier: ^2.0.1 + version: 2.0.1(vite@6.0.7(@types/node@20.17.12)(jiti@2.4.2)(less@4.2.1)(terser@5.37.0)(tsx@4.19.2)) + vite-plugin-vue-setup-extend-plus: + specifier: ^0.1.0 + version: 0.1.0 + vue-eslint-parser: + specifier: ^9.4.3 + version: 9.4.3(eslint@8.57.1) + vue-tsc: + specifier: ^1.8.27 + version: 1.8.27(typescript@4.9.5) + +packages: + + '@ampproject/remapping@2.3.0': + resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==} + engines: {node: '>=6.0.0'} + + '@ant-design/colors@6.0.0': + resolution: {integrity: sha512-qAZRvPzfdWHtfameEGP2Qvuf838NhergR35o+EuVyB5XvSA98xod5r4utvi4TJ3ywmevm290g9nsCG5MryrdWQ==} + + '@ant-design/colors@7.2.0': + resolution: {integrity: sha512-bjTObSnZ9C/O8MB/B4OUtd/q9COomuJAR2SYfhxLyHvCKn4EKwCN3e+fWGMo7H5InAyV0wL17jdE9ALrdOW/6A==} + + '@ant-design/fast-color@2.0.6': + resolution: {integrity: sha512-y2217gk4NqL35giHl72o6Zzqji9O7vHh9YmhUVkPtAOpoTCH4uWxo/pr4VE8t0+ChEPs0qo4eJRC5Q1eXWo3vA==} + engines: {node: '>=8.x'} + + '@ant-design/icons-svg@4.4.2': + resolution: {integrity: sha512-vHbT+zJEVzllwP+CM+ul7reTEfBR0vgxFe7+lREAsAA7YGsYpboiq2sQNeQeRvh09GfQgs/GyFEvZpJ9cLXpXA==} + + '@ant-design/icons-vue@7.0.1': + resolution: {integrity: sha512-eCqY2unfZK6Fe02AwFlDHLfoyEFreP6rBwAZMIJ1LugmfMiVgwWDYlp1YsRugaPtICYOabV1iWxXdP12u9U43Q==} + peerDependencies: + vue: '>=3.0.3' + + '@antfu/install-pkg@0.4.1': + resolution: {integrity: sha512-T7yB5QNG29afhWVkVq7XeIMBa5U/vs9mX69YqayXypPRmYzUmzwnYltplHmPtZ4HPCn+sQKeXW8I47wCbuBOjw==} + + '@antfu/utils@0.7.10': + resolution: {integrity: sha512-+562v9k4aI80m1+VuMHehNJWLOFjBnXn3tdOitzD0il5b7smkSBal4+a3oKiQTbrwMmN/TBUMDvbdoWDehgOww==} + + '@antv/hierarchy@0.6.14': + resolution: {integrity: sha512-V3uknf7bhynOqQDw2sg+9r9DwZ9pc6k/EcqyTFdfXB1+ydr7urisP0MipIuimucvQKN+Qkd+d6w601r1UIroqQ==, tarball: https://registry.npmmirror.com/@antv/hierarchy/-/hierarchy-0.6.14.tgz} + + '@babel/code-frame@7.26.2': + resolution: {integrity: sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==} + engines: {node: '>=6.9.0'} + + '@babel/compat-data@7.26.3': + resolution: {integrity: sha512-nHIxvKPniQXpmQLb0vhY3VaFb3S0YrTAwpOWJZh1wn3oJPjJk9Asva204PsBdmAE8vpzfHudT8DB0scYvy9q0g==} + engines: {node: '>=6.9.0'} + + '@babel/core@7.26.0': + resolution: {integrity: sha512-i1SLeK+DzNnQ3LL/CswPCa/E5u4lh1k6IAEphON8F+cXt0t9euTshDru0q7/IqMa1PMPz5RnHuHscF8/ZJsStg==} + engines: {node: '>=6.9.0'} + + '@babel/generator@7.26.3': + resolution: {integrity: sha512-6FF/urZvD0sTeO7k6/B15pMLC4CHUv1426lzr3N01aHJTl046uCAh9LXW/fzeXXjPNCJ6iABW5XaWOsIZB93aQ==} + engines: {node: '>=6.9.0'} + + '@babel/helper-annotate-as-pure@7.25.9': + resolution: {integrity: sha512-gv7320KBUFJz1RnylIg5WWYPRXKZ884AGkYpgpWW02TH66Dl+HaC1t1CKd0z3R4b6hdYEcmrNZHUmfCP+1u3/g==} + engines: {node: '>=6.9.0'} + + '@babel/helper-compilation-targets@7.25.9': + resolution: {integrity: sha512-j9Db8Suy6yV/VHa4qzrj9yZfZxhLWQdVnRlXxmKLYlhWUVB1sB2G5sxuWYXk/whHD9iW76PmNzxZ4UCnTQTVEQ==} + engines: {node: '>=6.9.0'} + + '@babel/helper-create-class-features-plugin@7.25.9': + resolution: {integrity: sha512-UTZQMvt0d/rSz6KI+qdu7GQze5TIajwTS++GUozlw8VBJDEOAqSXwm1WvmYEZwqdqSGQshRocPDqrt4HBZB3fQ==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + + '@babel/helper-member-expression-to-functions@7.25.9': + resolution: {integrity: sha512-wbfdZ9w5vk0C0oyHqAJbc62+vet5prjj01jjJ8sKn3j9h3MQQlflEdXYvuqRWjHnM12coDEqiC1IRCi0U/EKwQ==} + engines: {node: '>=6.9.0'} + + '@babel/helper-module-imports@7.25.9': + resolution: {integrity: sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw==} + engines: {node: '>=6.9.0'} + + '@babel/helper-module-transforms@7.26.0': + resolution: {integrity: sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + + '@babel/helper-optimise-call-expression@7.25.9': + resolution: {integrity: sha512-FIpuNaz5ow8VyrYcnXQTDRGvV6tTjkNtCK/RYNDXGSLlUD6cBuQTSw43CShGxjvfBTfcUA/r6UhUCbtYqkhcuQ==} + engines: {node: '>=6.9.0'} + + '@babel/helper-plugin-utils@7.25.9': + resolution: {integrity: sha512-kSMlyUVdWe25rEsRGviIgOWnoT/nfABVWlqt9N19/dIPWViAOW2s9wznP5tURbs/IDuNk4gPy3YdYRgH3uxhBw==} + engines: {node: '>=6.9.0'} + + '@babel/helper-replace-supers@7.25.9': + resolution: {integrity: sha512-IiDqTOTBQy0sWyeXyGSC5TBJpGFXBkRynjBeXsvbhQFKj2viwJC76Epz35YLU1fpe/Am6Vppb7W7zM4fPQzLsQ==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + + '@babel/helper-skip-transparent-expression-wrappers@7.25.9': + resolution: {integrity: sha512-K4Du3BFa3gvyhzgPcntrkDgZzQaq6uozzcpGbOO1OEJaI+EJdqWIMTLgFgQf6lrfiDFo5FU+BxKepI9RmZqahA==} + engines: {node: '>=6.9.0'} + + '@babel/helper-string-parser@7.25.9': + resolution: {integrity: sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==} + engines: {node: '>=6.9.0'} + + '@babel/helper-validator-identifier@7.25.9': + resolution: {integrity: sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==} + engines: {node: '>=6.9.0'} + + '@babel/helper-validator-option@7.25.9': + resolution: {integrity: sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw==} + engines: {node: '>=6.9.0'} + + '@babel/helpers@7.26.0': + resolution: {integrity: sha512-tbhNuIxNcVb21pInl3ZSjksLCvgdZy9KwJ8brv993QtIVKJBBkYXz4q4ZbAv31GdnC+R90np23L5FbEBlthAEw==} + engines: {node: '>=6.9.0'} + + '@babel/parser@7.26.3': + resolution: {integrity: sha512-WJ/CvmY8Mea8iDXo6a7RK2wbmJITT5fN3BEkRuFlxVyNx8jOKIIhmC4fSkTcPcf8JyavbBwIe6OpiCOBXt/IcA==} + engines: {node: '>=6.0.0'} + hasBin: true + + '@babel/plugin-syntax-async-generators@7.8.4': + resolution: {integrity: sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-bigint@7.8.3': + resolution: {integrity: sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-class-properties@7.12.13': + resolution: {integrity: sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-class-static-block@7.14.5': + resolution: {integrity: sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-import-attributes@7.26.0': + resolution: {integrity: sha512-e2dttdsJ1ZTpi3B9UYGLw41hifAubg19AtCu/2I/F1QNVclOBr1dYpTdmdyZ84Xiz43BS/tCUkMAZNLv12Pi+A==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-import-meta@7.10.4': + resolution: {integrity: sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-json-strings@7.8.3': + resolution: {integrity: sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-jsx@7.25.9': + resolution: {integrity: sha512-ld6oezHQMZsZfp6pWtbjaNDF2tiiCYYDqQszHt5VV437lewP9aSi2Of99CK0D0XB21k7FLgnLcmQKyKzynfeAA==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-logical-assignment-operators@7.10.4': + resolution: {integrity: sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-nullish-coalescing-operator@7.8.3': + resolution: {integrity: sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-numeric-separator@7.10.4': + resolution: {integrity: sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-object-rest-spread@7.8.3': + resolution: {integrity: sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-optional-catch-binding@7.8.3': + resolution: {integrity: sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-optional-chaining@7.8.3': + resolution: {integrity: sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-private-property-in-object@7.14.5': + resolution: {integrity: sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-top-level-await@7.14.5': + resolution: {integrity: sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-typescript@7.25.9': + resolution: {integrity: sha512-hjMgRy5hb8uJJjUcdWunWVcoi9bGpJp8p5Ol1229PoN6aytsLwNMgmdftO23wnCLMfVmTwZDWMPNq/D1SY60JQ==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-transform-modules-commonjs@7.26.3': + resolution: {integrity: sha512-MgR55l4q9KddUDITEzEFYn5ZsGDXMSsU9E+kh7fjRXTIC3RHqfCo8RPRbyReYJh44HQ/yomFkqbOFohXvDCiIQ==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-transform-typescript@7.26.3': + resolution: {integrity: sha512-6+5hpdr6mETwSKjmJUdYw0EIkATiQhnELWlE3kJFBwSg/BGIVwVaVbX+gOXBCdc7Ln1RXZxyWGecIXhUfnl7oA==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/preset-typescript@7.26.0': + resolution: {integrity: sha512-NMk1IGZ5I/oHhoXEElcm+xUnL/szL6xflkFZmoEU9xj1qSJXpiS7rsspYo92B4DRCDvZn2erT5LdsCeXAKNCkg==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/runtime@7.26.0': + resolution: {integrity: sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw==} + engines: {node: '>=6.9.0'} + + '@babel/template@7.25.9': + resolution: {integrity: sha512-9DGttpmPvIxBb/2uwpVo3dqJ+O6RooAFOS+lB+xDqoE2PVCE8nfoHMdZLpfCQRLwvohzXISPZcgxt80xLfsuwg==} + engines: {node: '>=6.9.0'} + + '@babel/traverse@7.26.4': + resolution: {integrity: sha512-fH+b7Y4p3yqvApJALCPJcwb0/XaOSgtK4pzV6WVjPR5GLFQBRI7pfoX2V2iM48NXvX07NUxxm1Vw98YjqTcU5w==} + engines: {node: '>=6.9.0'} + + '@babel/types@7.26.3': + resolution: {integrity: sha512-vN5p+1kl59GVKMvTHt55NzzmYVxprfJD+ql7U9NFIfKCBkYE55LYtS+WtPlaYOyzydrKI8Nezd+aZextrd+FMA==} + engines: {node: '>=6.9.0'} + + '@bcoe/v8-coverage@0.2.3': + resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} + + '@commitlint/cli@18.6.1': + resolution: {integrity: sha512-5IDE0a+lWGdkOvKH892HHAZgbAjcj1mT5QrfA/SVbLJV/BbBMGyKN0W5mhgjekPJJwEQdVNvhl9PwUacY58Usw==} + engines: {node: '>=v18'} + hasBin: true + + '@commitlint/config-conventional@18.6.3': + resolution: {integrity: sha512-8ZrRHqF6je+TRaFoJVwszwnOXb/VeYrPmTwPhf0WxpzpGTcYy1p0SPyZ2eRn/sRi/obnWAcobtDAq6+gJQQNhQ==} + engines: {node: '>=v18'} + + '@commitlint/config-validator@18.6.1': + resolution: {integrity: sha512-05uiToBVfPhepcQWE1ZQBR/Io3+tb3gEotZjnI4tTzzPk16NffN6YABgwFQCLmzZefbDcmwWqJWc2XT47q7Znw==} + engines: {node: '>=v18'} + + '@commitlint/config-validator@19.5.0': + resolution: {integrity: sha512-CHtj92H5rdhKt17RmgALhfQt95VayrUo2tSqY9g2w+laAXyk7K/Ef6uPm9tn5qSIwSmrLjKaXK9eiNuxmQrDBw==} + engines: {node: '>=v18'} + + '@commitlint/ensure@18.6.1': + resolution: {integrity: sha512-BPm6+SspyxQ7ZTsZwXc7TRQL5kh5YWt3euKmEIBZnocMFkJevqs3fbLRb8+8I/cfbVcAo4mxRlpTPfz8zX7SnQ==} + engines: {node: '>=v18'} + + '@commitlint/execute-rule@18.6.1': + resolution: {integrity: sha512-7s37a+iWyJiGUeMFF6qBlyZciUkF8odSAnHijbD36YDctLhGKoYltdvuJ/AFfRm6cBLRtRk9cCVPdsEFtt/2rg==} + engines: {node: '>=v18'} + + '@commitlint/execute-rule@19.5.0': + resolution: {integrity: sha512-aqyGgytXhl2ejlk+/rfgtwpPexYyri4t8/n4ku6rRJoRhGZpLFMqrZ+YaubeGysCP6oz4mMA34YSTaSOKEeNrg==} + engines: {node: '>=v18'} + + '@commitlint/format@18.6.1': + resolution: {integrity: sha512-K8mNcfU/JEFCharj2xVjxGSF+My+FbUHoqR+4GqPGrHNqXOGNio47ziiR4HQUPKtiNs05o8/WyLBoIpMVOP7wg==} + engines: {node: '>=v18'} + + '@commitlint/is-ignored@18.6.1': + resolution: {integrity: sha512-MOfJjkEJj/wOaPBw5jFjTtfnx72RGwqYIROABudOtJKW7isVjFe9j0t8xhceA02QebtYf4P/zea4HIwnXg8rvA==} + engines: {node: '>=v18'} + + '@commitlint/lint@18.6.1': + resolution: {integrity: sha512-8WwIFo3jAuU+h1PkYe5SfnIOzp+TtBHpFr4S8oJWhu44IWKuVx6GOPux3+9H1iHOan/rGBaiacicZkMZuluhfQ==} + engines: {node: '>=v18'} + + '@commitlint/load@18.6.1': + resolution: {integrity: sha512-p26x8734tSXUHoAw0ERIiHyW4RaI4Bj99D8YgUlVV9SedLf8hlWAfyIFhHRIhfPngLlCe0QYOdRKYFt8gy56TA==} + engines: {node: '>=v18'} + + '@commitlint/load@19.6.1': + resolution: {integrity: sha512-kE4mRKWWNju2QpsCWt428XBvUH55OET2N4QKQ0bF85qS/XbsRGG1MiTByDNlEVpEPceMkDr46LNH95DtRwcsfA==} + engines: {node: '>=v18'} + + '@commitlint/message@18.6.1': + resolution: {integrity: sha512-VKC10UTMLcpVjMIaHHsY1KwhuTQtdIKPkIdVEwWV+YuzKkzhlI3aNy6oo1eAN6b/D2LTtZkJe2enHmX0corYRw==} + engines: {node: '>=v18'} + + '@commitlint/parse@18.6.1': + resolution: {integrity: sha512-eS/3GREtvVJqGZrwAGRwR9Gdno3YcZ6Xvuaa+vUF8j++wsmxrA2En3n0ccfVO2qVOLJC41ni7jSZhQiJpMPGOQ==} + engines: {node: '>=v18'} + + '@commitlint/read@18.6.1': + resolution: {integrity: sha512-ia6ODaQFzXrVul07ffSgbZGFajpe8xhnDeLIprLeyfz3ivQU1dIoHp7yz0QIorZ6yuf4nlzg4ZUkluDrGN/J/w==} + engines: {node: '>=v18'} + + '@commitlint/resolve-extends@18.6.1': + resolution: {integrity: sha512-ifRAQtHwK+Gj3Bxj/5chhc4L2LIc3s30lpsyW67yyjsETR6ctHAHRu1FSpt0KqahK5xESqoJ92v6XxoDRtjwEQ==} + engines: {node: '>=v18'} + + '@commitlint/resolve-extends@19.5.0': + resolution: {integrity: sha512-CU/GscZhCUsJwcKTJS9Ndh3AKGZTNFIOoQB2n8CmFnizE0VnEuJoum+COW+C1lNABEeqk6ssfc1Kkalm4bDklA==} + engines: {node: '>=v18'} + + '@commitlint/rules@18.6.1': + resolution: {integrity: sha512-kguM6HxZDtz60v/zQYOe0voAtTdGybWXefA1iidjWYmyUUspO1zBPQEmJZ05/plIAqCVyNUTAiRPWIBKLCrGew==} + engines: {node: '>=v18'} + + '@commitlint/to-lines@18.6.1': + resolution: {integrity: sha512-Gl+orGBxYSNphx1+83GYeNy5N0dQsHBQ9PJMriaLQDB51UQHCVLBT/HBdOx5VaYksivSf5Os55TLePbRLlW50Q==} + engines: {node: '>=v18'} + + '@commitlint/top-level@18.6.1': + resolution: {integrity: sha512-HyiHQZUTf0+r0goTCDs/bbVv/LiiQ7AVtz6KIar+8ZrseB9+YJAIo8HQ2IC2QT1y3N1lbW6OqVEsTHjbT6hGSw==} + engines: {node: '>=v18'} + + '@commitlint/types@18.6.1': + resolution: {integrity: sha512-gwRLBLra/Dozj2OywopeuHj2ac26gjGkz2cZ+86cTJOdtWfiRRr4+e77ZDAGc6MDWxaWheI+mAV5TLWWRwqrFg==} + engines: {node: '>=v18'} + + '@commitlint/types@19.5.0': + resolution: {integrity: sha512-DSHae2obMSMkAtTBSOulg5X7/z+rGLxcXQIkg3OmWvY6wifojge5uVMydfhUvs7yQj+V7jNmRZ2Xzl8GJyqRgg==} + engines: {node: '>=v18'} + + '@cspotcode/source-map-support@0.8.1': + resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} + engines: {node: '>=12'} + + '@csstools/css-parser-algorithms@3.0.4': + resolution: {integrity: sha512-Up7rBoV77rv29d3uKHUIVubz1BTcgyUK72IvCQAbfbMv584xHcGKCKbWh7i8hPrRJ7qU4Y8IO3IY9m+iTB7P3A==} + engines: {node: '>=18'} + peerDependencies: + '@csstools/css-tokenizer': ^3.0.3 + + '@csstools/css-tokenizer@3.0.3': + resolution: {integrity: sha512-UJnjoFsmxfKUdNYdWgOB0mWUypuLvAfQPH1+pyvRJs6euowbFkFC6P13w1l8mJyi3vxYMxc9kld5jZEGRQs6bw==} + engines: {node: '>=18'} + + '@csstools/media-query-list-parser@4.0.2': + resolution: {integrity: sha512-EUos465uvVvMJehckATTlNqGj4UJWkTmdWuDMjqvSUkjGpmOyFZBVwb4knxCm/k2GMTXY+c/5RkdndzFYWeX5A==} + engines: {node: '>=18'} + peerDependencies: + '@csstools/css-parser-algorithms': ^3.0.4 + '@csstools/css-tokenizer': ^3.0.3 + + '@csstools/selector-specificity@5.0.0': + resolution: {integrity: sha512-PCqQV3c4CoVm3kdPhyeZ07VmBRdH2EpMFA/pd9OASpOEC3aXNGoqPDAZ80D0cLpMBxnmk0+yNhGsEx31hq7Gtw==} + engines: {node: '>=18'} + peerDependencies: + postcss-selector-parser: ^7.0.0 + + '@ctrl/tinycolor@3.6.1': + resolution: {integrity: sha512-SITSV6aIXsuVNV3f3O0f2n/cgyEDWoSqtZMYiAmcsYHydcKrOz3gUxB/iXd/Qf08+IZX4KpgNbvUdMBmWz+kcA==} + engines: {node: '>=10'} + + '@dual-bundle/import-meta-resolve@4.1.0': + resolution: {integrity: sha512-+nxncfwHM5SgAtrVzgpzJOI1ol0PkumhVo469KCf9lUi21IGcY90G98VuHm9VRrUypmAzawAHO9bs6hqeADaVg==} + + '@emotion/hash@0.9.2': + resolution: {integrity: sha512-MyqliTZGuOm3+5ZRSaaBGP3USLw6+EGykkwZns2EPC5g8jJ4z9OrdZY9apkl3+UP9+sdz76YYkwCKP5gh8iY3g==} + + '@emotion/unitless@0.8.1': + resolution: {integrity: sha512-KOEGMu6dmJZtpadb476IsZBclKvILjopjUii3V+7MnXIQCYh8W3NgNcgwo21n9LXZX6EDIKvqfjYxXebDwxKmQ==} + + '@esbuild/aix-ppc64@0.23.1': + resolution: {integrity: sha512-6VhYk1diRqrhBAqpJEdjASR/+WVRtfjpqKuNw11cLiaWpAT/Uu+nokB+UJnevzy/P9C/ty6AOe0dwueMrGh/iQ==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [aix] + + '@esbuild/aix-ppc64@0.24.2': + resolution: {integrity: sha512-thpVCb/rhxE/BnMLQ7GReQLLN8q9qbHmI55F4489/ByVg2aQaQ6kbcLb6FHkocZzQhxc4gx0sCk0tJkKBFzDhA==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [aix] + + '@esbuild/android-arm64@0.23.1': + resolution: {integrity: sha512-xw50ipykXcLstLeWH7WRdQuysJqejuAGPd30vd1i5zSyKK3WE+ijzHmLKxdiCMtH1pHz78rOg0BKSYOSB/2Khw==} + engines: {node: '>=18'} + cpu: [arm64] + os: [android] + + '@esbuild/android-arm64@0.24.2': + resolution: {integrity: sha512-cNLgeqCqV8WxfcTIOeL4OAtSmL8JjcN6m09XIgro1Wi7cF4t/THaWEa7eL5CMoMBdjoHOTh/vwTO/o2TRXIyzg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [android] + + '@esbuild/android-arm@0.23.1': + resolution: {integrity: sha512-uz6/tEy2IFm9RYOyvKl88zdzZfwEfKZmnX9Cj1BHjeSGNuGLuMD1kR8y5bteYmwqKm1tj8m4cb/aKEorr6fHWQ==} + engines: {node: '>=18'} + cpu: [arm] + os: [android] + + '@esbuild/android-arm@0.24.2': + resolution: {integrity: sha512-tmwl4hJkCfNHwFB3nBa8z1Uy3ypZpxqxfTQOcHX+xRByyYgunVbZ9MzUUfb0RxaHIMnbHagwAxuTL+tnNM+1/Q==} + engines: {node: '>=18'} + cpu: [arm] + os: [android] + + '@esbuild/android-x64@0.23.1': + resolution: {integrity: sha512-nlN9B69St9BwUoB+jkyU090bru8L0NA3yFvAd7k8dNsVH8bi9a8cUAUSEcEEgTp2z3dbEDGJGfP6VUnkQnlReg==} + engines: {node: '>=18'} + cpu: [x64] + os: [android] + + '@esbuild/android-x64@0.24.2': + resolution: {integrity: sha512-B6Q0YQDqMx9D7rvIcsXfmJfvUYLoP722bgfBlO5cGvNVb5V/+Y7nhBE3mHV9OpxBf4eAS2S68KZztiPaWq4XYw==} + engines: {node: '>=18'} + cpu: [x64] + os: [android] + + '@esbuild/darwin-arm64@0.23.1': + resolution: {integrity: sha512-YsS2e3Wtgnw7Wq53XXBLcV6JhRsEq8hkfg91ESVadIrzr9wO6jJDMZnCQbHm1Guc5t/CdDiFSSfWP58FNuvT3Q==} + engines: {node: '>=18'} + cpu: [arm64] + os: [darwin] + + '@esbuild/darwin-arm64@0.24.2': + resolution: {integrity: sha512-kj3AnYWc+CekmZnS5IPu9D+HWtUI49hbnyqk0FLEJDbzCIQt7hg7ucF1SQAilhtYpIujfaHr6O0UHlzzSPdOeA==} + engines: {node: '>=18'} + cpu: [arm64] + os: [darwin] + + '@esbuild/darwin-x64@0.23.1': + resolution: {integrity: sha512-aClqdgTDVPSEGgoCS8QDG37Gu8yc9lTHNAQlsztQ6ENetKEO//b8y31MMu2ZaPbn4kVsIABzVLXYLhCGekGDqw==} + engines: {node: '>=18'} + cpu: [x64] + os: [darwin] + + '@esbuild/darwin-x64@0.24.2': + resolution: {integrity: sha512-WeSrmwwHaPkNR5H3yYfowhZcbriGqooyu3zI/3GGpF8AyUdsrrP0X6KumITGA9WOyiJavnGZUwPGvxvwfWPHIA==} + engines: {node: '>=18'} + cpu: [x64] + os: [darwin] + + '@esbuild/freebsd-arm64@0.23.1': + resolution: {integrity: sha512-h1k6yS8/pN/NHlMl5+v4XPfikhJulk4G+tKGFIOwURBSFzE8bixw1ebjluLOjfwtLqY0kewfjLSrO6tN2MgIhA==} + engines: {node: '>=18'} + cpu: [arm64] + os: [freebsd] + + '@esbuild/freebsd-arm64@0.24.2': + resolution: {integrity: sha512-UN8HXjtJ0k/Mj6a9+5u6+2eZ2ERD7Edt1Q9IZiB5UZAIdPnVKDoG7mdTVGhHJIeEml60JteamR3qhsr1r8gXvg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [freebsd] + + '@esbuild/freebsd-x64@0.23.1': + resolution: {integrity: sha512-lK1eJeyk1ZX8UklqFd/3A60UuZ/6UVfGT2LuGo3Wp4/z7eRTRYY+0xOu2kpClP+vMTi9wKOfXi2vjUpO1Ro76g==} + engines: {node: '>=18'} + cpu: [x64] + os: [freebsd] + + '@esbuild/freebsd-x64@0.24.2': + resolution: {integrity: sha512-TvW7wE/89PYW+IevEJXZ5sF6gJRDY/14hyIGFXdIucxCsbRmLUcjseQu1SyTko+2idmCw94TgyaEZi9HUSOe3Q==} + engines: {node: '>=18'} + cpu: [x64] + os: [freebsd] + + '@esbuild/linux-arm64@0.23.1': + resolution: {integrity: sha512-/93bf2yxencYDnItMYV/v116zff6UyTjo4EtEQjUBeGiVpMmffDNUyD9UN2zV+V3LRV3/on4xdZ26NKzn6754g==} + engines: {node: '>=18'} + cpu: [arm64] + os: [linux] + + '@esbuild/linux-arm64@0.24.2': + resolution: {integrity: sha512-7HnAD6074BW43YvvUmE/35Id9/NB7BeX5EoNkK9obndmZBUk8xmJJeU7DwmUeN7tkysslb2eSl6CTrYz6oEMQg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [linux] + + '@esbuild/linux-arm@0.23.1': + resolution: {integrity: sha512-CXXkzgn+dXAPs3WBwE+Kvnrf4WECwBdfjfeYHpMeVxWE0EceB6vhWGShs6wi0IYEqMSIzdOF1XjQ/Mkm5d7ZdQ==} + engines: {node: '>=18'} + cpu: [arm] + os: [linux] + + '@esbuild/linux-arm@0.24.2': + resolution: {integrity: sha512-n0WRM/gWIdU29J57hJyUdIsk0WarGd6To0s+Y+LwvlC55wt+GT/OgkwoXCXvIue1i1sSNWblHEig00GBWiJgfA==} + engines: {node: '>=18'} + cpu: [arm] + os: [linux] + + '@esbuild/linux-ia32@0.23.1': + resolution: {integrity: sha512-VTN4EuOHwXEkXzX5nTvVY4s7E/Krz7COC8xkftbbKRYAl96vPiUssGkeMELQMOnLOJ8k3BY1+ZY52tttZnHcXQ==} + engines: {node: '>=18'} + cpu: [ia32] + os: [linux] + + '@esbuild/linux-ia32@0.24.2': + resolution: {integrity: sha512-sfv0tGPQhcZOgTKO3oBE9xpHuUqguHvSo4jl+wjnKwFpapx+vUDcawbwPNuBIAYdRAvIDBfZVvXprIj3HA+Ugw==} + engines: {node: '>=18'} + cpu: [ia32] + os: [linux] + + '@esbuild/linux-loong64@0.14.54': + resolution: {integrity: sha512-bZBrLAIX1kpWelV0XemxBZllyRmM6vgFQQG2GdNb+r3Fkp0FOh1NJSvekXDs7jq70k4euu1cryLMfU+mTXlEpw==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + + '@esbuild/linux-loong64@0.23.1': + resolution: {integrity: sha512-Vx09LzEoBa5zDnieH8LSMRToj7ir/Jeq0Gu6qJ/1GcBq9GkfoEAoXvLiW1U9J1qE/Y/Oyaq33w5p2ZWrNNHNEw==} + engines: {node: '>=18'} + cpu: [loong64] + os: [linux] + + '@esbuild/linux-loong64@0.24.2': + resolution: {integrity: sha512-CN9AZr8kEndGooS35ntToZLTQLHEjtVB5n7dl8ZcTZMonJ7CCfStrYhrzF97eAecqVbVJ7APOEe18RPI4KLhwQ==} + engines: {node: '>=18'} + cpu: [loong64] + os: [linux] + + '@esbuild/linux-mips64el@0.23.1': + resolution: {integrity: sha512-nrFzzMQ7W4WRLNUOU5dlWAqa6yVeI0P78WKGUo7lg2HShq/yx+UYkeNSE0SSfSure0SqgnsxPvmAUu/vu0E+3Q==} + engines: {node: '>=18'} + cpu: [mips64el] + os: [linux] + + '@esbuild/linux-mips64el@0.24.2': + resolution: {integrity: sha512-iMkk7qr/wl3exJATwkISxI7kTcmHKE+BlymIAbHO8xanq/TjHaaVThFF6ipWzPHryoFsesNQJPE/3wFJw4+huw==} + engines: {node: '>=18'} + cpu: [mips64el] + os: [linux] + + '@esbuild/linux-ppc64@0.23.1': + resolution: {integrity: sha512-dKN8fgVqd0vUIjxuJI6P/9SSSe/mB9rvA98CSH2sJnlZ/OCZWO1DJvxj8jvKTfYUdGfcq2dDxoKaC6bHuTlgcw==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [linux] + + '@esbuild/linux-ppc64@0.24.2': + resolution: {integrity: sha512-shsVrgCZ57Vr2L8mm39kO5PPIb+843FStGt7sGGoqiiWYconSxwTiuswC1VJZLCjNiMLAMh34jg4VSEQb+iEbw==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [linux] + + '@esbuild/linux-riscv64@0.23.1': + resolution: {integrity: sha512-5AV4Pzp80fhHL83JM6LoA6pTQVWgB1HovMBsLQ9OZWLDqVY8MVobBXNSmAJi//Csh6tcY7e7Lny2Hg1tElMjIA==} + engines: {node: '>=18'} + cpu: [riscv64] + os: [linux] + + '@esbuild/linux-riscv64@0.24.2': + resolution: {integrity: sha512-4eSFWnU9Hhd68fW16GD0TINewo1L6dRrB+oLNNbYyMUAeOD2yCK5KXGK1GH4qD/kT+bTEXjsyTCiJGHPZ3eM9Q==} + engines: {node: '>=18'} + cpu: [riscv64] + os: [linux] + + '@esbuild/linux-s390x@0.23.1': + resolution: {integrity: sha512-9ygs73tuFCe6f6m/Tb+9LtYxWR4c9yg7zjt2cYkjDbDpV/xVn+68cQxMXCjUpYwEkze2RcU/rMnfIXNRFmSoDw==} + engines: {node: '>=18'} + cpu: [s390x] + os: [linux] + + '@esbuild/linux-s390x@0.24.2': + resolution: {integrity: sha512-S0Bh0A53b0YHL2XEXC20bHLuGMOhFDO6GN4b3YjRLK//Ep3ql3erpNcPlEFed93hsQAjAQDNsvcK+hV90FubSw==} + engines: {node: '>=18'} + cpu: [s390x] + os: [linux] + + '@esbuild/linux-x64@0.23.1': + resolution: {integrity: sha512-EV6+ovTsEXCPAp58g2dD68LxoP/wK5pRvgy0J/HxPGB009omFPv3Yet0HiaqvrIrgPTBuC6wCH1LTOY91EO5hQ==} + engines: {node: '>=18'} + cpu: [x64] + os: [linux] + + '@esbuild/linux-x64@0.24.2': + resolution: {integrity: sha512-8Qi4nQcCTbLnK9WoMjdC9NiTG6/E38RNICU6sUNqK0QFxCYgoARqVqxdFmWkdonVsvGqWhmm7MO0jyTqLqwj0Q==} + engines: {node: '>=18'} + cpu: [x64] + os: [linux] + + '@esbuild/netbsd-arm64@0.24.2': + resolution: {integrity: sha512-wuLK/VztRRpMt9zyHSazyCVdCXlpHkKm34WUyinD2lzK07FAHTq0KQvZZlXikNWkDGoT6x3TD51jKQ7gMVpopw==} + engines: {node: '>=18'} + cpu: [arm64] + os: [netbsd] + + '@esbuild/netbsd-x64@0.23.1': + resolution: {integrity: sha512-aevEkCNu7KlPRpYLjwmdcuNz6bDFiE7Z8XC4CPqExjTvrHugh28QzUXVOZtiYghciKUacNktqxdpymplil1beA==} + engines: {node: '>=18'} + cpu: [x64] + os: [netbsd] + + '@esbuild/netbsd-x64@0.24.2': + resolution: {integrity: sha512-VefFaQUc4FMmJuAxmIHgUmfNiLXY438XrL4GDNV1Y1H/RW3qow68xTwjZKfj/+Plp9NANmzbH5R40Meudu8mmw==} + engines: {node: '>=18'} + cpu: [x64] + os: [netbsd] + + '@esbuild/openbsd-arm64@0.23.1': + resolution: {integrity: sha512-3x37szhLexNA4bXhLrCC/LImN/YtWis6WXr1VESlfVtVeoFJBRINPJ3f0a/6LV8zpikqoUg4hyXw0sFBt5Cr+Q==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openbsd] + + '@esbuild/openbsd-arm64@0.24.2': + resolution: {integrity: sha512-YQbi46SBct6iKnszhSvdluqDmxCJA+Pu280Av9WICNwQmMxV7nLRHZfjQzwbPs3jeWnuAhE9Jy0NrnJ12Oz+0A==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openbsd] + + '@esbuild/openbsd-x64@0.23.1': + resolution: {integrity: sha512-aY2gMmKmPhxfU+0EdnN+XNtGbjfQgwZj43k8G3fyrDM/UdZww6xrWxmDkuz2eCZchqVeABjV5BpildOrUbBTqA==} + engines: {node: '>=18'} + cpu: [x64] + os: [openbsd] + + '@esbuild/openbsd-x64@0.24.2': + resolution: {integrity: sha512-+iDS6zpNM6EnJyWv0bMGLWSWeXGN/HTaF/LXHXHwejGsVi+ooqDfMCCTerNFxEkM3wYVcExkeGXNqshc9iMaOA==} + engines: {node: '>=18'} + cpu: [x64] + os: [openbsd] + + '@esbuild/sunos-x64@0.23.1': + resolution: {integrity: sha512-RBRT2gqEl0IKQABT4XTj78tpk9v7ehp+mazn2HbUeZl1YMdaGAQqhapjGTCe7uw7y0frDi4gS0uHzhvpFuI1sA==} + engines: {node: '>=18'} + cpu: [x64] + os: [sunos] + + '@esbuild/sunos-x64@0.24.2': + resolution: {integrity: sha512-hTdsW27jcktEvpwNHJU4ZwWFGkz2zRJUz8pvddmXPtXDzVKTTINmlmga3ZzwcuMpUvLw7JkLy9QLKyGpD2Yxig==} + engines: {node: '>=18'} + cpu: [x64] + os: [sunos] + + '@esbuild/win32-arm64@0.23.1': + resolution: {integrity: sha512-4O+gPR5rEBe2FpKOVyiJ7wNDPA8nGzDuJ6gN4okSA1gEOYZ67N8JPk58tkWtdtPeLz7lBnY6I5L3jdsr3S+A6A==} + engines: {node: '>=18'} + cpu: [arm64] + os: [win32] + + '@esbuild/win32-arm64@0.24.2': + resolution: {integrity: sha512-LihEQ2BBKVFLOC9ZItT9iFprsE9tqjDjnbulhHoFxYQtQfai7qfluVODIYxt1PgdoyQkz23+01rzwNwYfutxUQ==} + engines: {node: '>=18'} + cpu: [arm64] + os: [win32] + + '@esbuild/win32-ia32@0.23.1': + resolution: {integrity: sha512-BcaL0Vn6QwCwre3Y717nVHZbAa4UBEigzFm6VdsVdT/MbZ38xoj1X9HPkZhbmaBGUD1W8vxAfffbDe8bA6AKnQ==} + engines: {node: '>=18'} + cpu: [ia32] + os: [win32] + + '@esbuild/win32-ia32@0.24.2': + resolution: {integrity: sha512-q+iGUwfs8tncmFC9pcnD5IvRHAzmbwQ3GPS5/ceCyHdjXubwQWI12MKWSNSMYLJMq23/IUCvJMS76PDqXe1fxA==} + engines: {node: '>=18'} + cpu: [ia32] + os: [win32] + + '@esbuild/win32-x64@0.23.1': + resolution: {integrity: sha512-BHpFFeslkWrXWyUPnbKm+xYYVYruCinGcftSBaa8zoF9hZO4BcSCFUvHVTtzpIY6YzUnYtuEhZ+C9iEXjxnasg==} + engines: {node: '>=18'} + cpu: [x64] + os: [win32] + + '@esbuild/win32-x64@0.24.2': + resolution: {integrity: sha512-7VTgWzgMGvup6aSqDPLiW5zHaxYJGTO4OokMjIlrCtf+VpEL+cXKtCvg723iguPYI5oaUNdS+/V7OU2gvXVWEg==} + 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} + + '@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 + + '@hutson/parse-repository-url@5.0.0': + resolution: {integrity: sha512-e5+YUKENATs1JgYHMzTr2MW/NDcXGfYFAuOQU8gJgF/kEh4EqKgfGrfLI67bMD4tbhZVlkigz/9YYwWcbOFthg==} + engines: {node: '>=10.13.0'} + + '@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.292': + resolution: {integrity: sha512-N8/nQwGRML6runV7H1LZ7S3ihwLdHXC4Hxa0nl9e7iu4BIgKgMEF7j/LP87xV5Oae7ZF+viAGaJpPrgXVsUeNQ==} + + '@iconify/types@2.0.0': + resolution: {integrity: sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==} + + '@iconify/utils@2.2.1': + resolution: {integrity: sha512-0/7J7hk4PqXmxo5PDBDxmnecw5PxklZJfNjIVG9FM0mEfVrvfudS22rYWsqVk6gR3UJ/mSYS90X4R3znXnqfNA==} + + '@inquirer/figures@1.0.9': + resolution: {integrity: sha512-BXvGj0ehzrngHTPTDqUoDT3NXL8U0RxUk2zJm2A66RhCEIWdtU1v6GuUqNAgArW4PQ9CinqIWyHdQgdwOj06zQ==} + engines: {node: '>=18'} + + '@intlify/core-base@9.14.2': + resolution: {integrity: sha512-DZyQ4Hk22sC81MP4qiCDuU+LdaYW91A6lCjq8AWPvY3+mGMzhGDfOCzvyR6YBQxtlPjFqMoFk9ylnNYRAQwXtQ==} + engines: {node: '>= 16'} + + '@intlify/message-compiler@9.14.2': + resolution: {integrity: sha512-YsKKuV4Qv4wrLNsvgWbTf0E40uRv+Qiw1BeLQ0LAxifQuhiMe+hfTIzOMdWj/ZpnTDj4RSZtkXjJM7JDiiB5LQ==} + engines: {node: '>= 16'} + + '@intlify/shared@9.14.2': + resolution: {integrity: sha512-uRAHAxYPeF+G5DBIboKpPgC/Waecd4Jz8ihtkpJQD5ycb5PwXp0k/+hBGl5dAjwF7w+l74kz/PKA8r8OK//RUw==} + engines: {node: '>= 16'} + + '@isaacs/cliui@8.0.2': + resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} + engines: {node: '>=12'} + + '@istanbuljs/load-nyc-config@1.1.0': + resolution: {integrity: sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==} + engines: {node: '>=8'} + + '@istanbuljs/schema@0.1.3': + resolution: {integrity: sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==} + engines: {node: '>=8'} + + '@jeecg/aiflow@1.1.1': + resolution: {integrity: sha512-tzX3RXsayssfmMmYFaj7fZJtGdLCZ/AuBnqEafdarIWHx/W5LqWae+o1zo0dyl/QUwMpYYjQJlKBjR8DS20Z0A==} + + '@jeecg/online@3.7.4': + resolution: {integrity: sha512-P5aWkN2GpnkLpTLSS3dxgXAAXh4JzaqBDa+QtA+J4QQnhMtVGwZBObig9rag2vU6rkBLxvggbOpmalwyfFr9fQ==} + + '@jest/console@29.7.0': + resolution: {integrity: sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + '@jest/core@29.7.0': + resolution: {integrity: sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + peerDependencies: + node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 + peerDependenciesMeta: + node-notifier: + optional: true + + '@jest/environment@29.7.0': + resolution: {integrity: sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + '@jest/expect-utils@29.7.0': + resolution: {integrity: sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + '@jest/expect@29.7.0': + resolution: {integrity: sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + '@jest/fake-timers@29.7.0': + resolution: {integrity: sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + '@jest/globals@29.7.0': + resolution: {integrity: sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + '@jest/reporters@29.7.0': + resolution: {integrity: sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + peerDependencies: + node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 + peerDependenciesMeta: + node-notifier: + optional: true + + '@jest/schemas@29.6.3': + resolution: {integrity: sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + '@jest/source-map@29.6.3': + resolution: {integrity: sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + '@jest/test-result@29.7.0': + resolution: {integrity: sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + '@jest/test-sequencer@29.7.0': + resolution: {integrity: sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + '@jest/transform@29.7.0': + resolution: {integrity: sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + '@jest/types@29.6.3': + resolution: {integrity: sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + '@jridgewell/gen-mapping@0.3.8': + resolution: {integrity: sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==} + engines: {node: '>=6.0.0'} + + '@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/trace-mapping@0.3.25': + resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==} + + '@jridgewell/trace-mapping@0.3.9': + resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} + + '@logicflow/core@2.0.16': + resolution: {integrity: sha512-KoNdY5g7WcAtfk7sMe+uOOso28mw6dwCHgLKmnzC0nenASD0HGWhFq+Yo7ktHP2asMXUISPb9hbQA221NcYZdg==, tarball: https://registry.npmmirror.com/@logicflow/core/-/core-2.0.16.tgz} + + '@logicflow/extension@2.0.21': + resolution: {integrity: sha512-SdYBOnDlCEOEElScGFIprgxqH0fv39ur7suyYzhiWUaWjL/TpvIESgqcR/ujE9aolFNTtzv2USc6xPcrouc4PQ==, tarball: https://registry.npmmirror.com/@logicflow/extension/-/extension-2.0.21.tgz} + peerDependencies: + '@logicflow/core': 2.0.16 + + '@logicflow/vue-node-registry@1.0.18': + resolution: {integrity: sha512-dqTojTpUowYVikE5gj3YQTday/aRYlNHAkX/PGObWWT2VyaymPdKclj5hxIGLGJhZlffBxjzWfxDzr6C7HOntQ==, tarball: https://registry.npmmirror.com/@logicflow/vue-node-registry/-/vue-node-registry-1.0.18.tgz} + peerDependencies: + '@logicflow/core': 2.0.16 + '@vue/composition-api': ^1.0.0-rc.10 + vue: ^2.0.0 || >=3.0.0 + peerDependenciesMeta: + '@vue/composition-api': + optional: true + + '@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'} + + '@octokit/auth-token@4.0.0': + resolution: {integrity: sha512-tY/msAuJo6ARbK6SPIxZrPBms3xPbfwBrulZe0Wtr/DIY9lje2HeV1uoebShn6mx7SjCHif6EjMvoREj+gZ+SA==} + engines: {node: '>= 18'} + + '@octokit/core@5.2.0': + resolution: {integrity: sha512-1LFfa/qnMQvEOAdzlQymH0ulepxbxnCYAKJZfMci/5XJyIHWgEYnDmgnKakbTh7CH2tFQ5O60oYDvns4i9RAIg==} + engines: {node: '>= 18'} + + '@octokit/endpoint@9.0.5': + resolution: {integrity: sha512-ekqR4/+PCLkEBF6qgj8WqJfvDq65RH85OAgrtnVp1mSxaXF03u2xW/hUdweGS5654IlC0wkNYC18Z50tSYTAFw==} + engines: {node: '>= 18'} + + '@octokit/graphql@7.1.0': + resolution: {integrity: sha512-r+oZUH7aMFui1ypZnAvZmn0KSqAUgE1/tUXIWaqUCa1758ts/Jio84GZuzsvUkme98kv0WFY8//n0J1Z+vsIsQ==} + engines: {node: '>= 18'} + + '@octokit/openapi-types@22.2.0': + resolution: {integrity: sha512-QBhVjcUa9W7Wwhm6DBFu6ZZ+1/t/oYxqc2tp81Pi41YNuJinbFRx8B133qVOrAaBbF7D/m0Et6f9/pZt9Rc+tg==} + + '@octokit/plugin-paginate-rest@11.3.1': + resolution: {integrity: sha512-ryqobs26cLtM1kQxqeZui4v8FeznirUsksiA+RYemMPJ7Micju0WSkv50dBksTuZks9O5cg4wp+t8fZ/cLY56g==} + engines: {node: '>= 18'} + peerDependencies: + '@octokit/core': '5' + + '@octokit/plugin-request-log@4.0.1': + resolution: {integrity: sha512-GihNqNpGHorUrO7Qa9JbAl0dbLnqJVrV8OXe2Zm5/Y4wFkZQDfTreBzVmiRfJVfE4mClXdihHnbpyyO9FSX4HA==} + engines: {node: '>= 18'} + peerDependencies: + '@octokit/core': '5' + + '@octokit/plugin-rest-endpoint-methods@13.2.2': + resolution: {integrity: sha512-EI7kXWidkt3Xlok5uN43suK99VWqc8OaIMktY9d9+RNKl69juoTyxmLoWPIZgJYzi41qj/9zU7G/ljnNOJ5AFA==} + engines: {node: '>= 18'} + peerDependencies: + '@octokit/core': ^5 + + '@octokit/request-error@5.1.0': + resolution: {integrity: sha512-GETXfE05J0+7H2STzekpKObFe765O5dlAKUTLNGeH+x47z7JjXHfsHKo5z21D/o/IOZTUEI6nyWyR+bZVP/n5Q==} + engines: {node: '>= 18'} + + '@octokit/request@8.4.0': + resolution: {integrity: sha512-9Bb014e+m2TgBeEJGEbdplMVWwPmL1FPtggHQRkV+WVsMggPtEkLKPlcVYm/o8xKLkpJ7B+6N8WfQMtDLX2Dpw==} + engines: {node: '>= 18'} + + '@octokit/rest@20.1.1': + resolution: {integrity: sha512-MB4AYDsM5jhIHro/dq4ix1iWTLGToIGk6cWF5L6vanFaMble5jTX/UBQyiv05HsWnwUtY8JrfHy2LWfKwihqMw==} + engines: {node: '>= 18'} + + '@octokit/types@13.6.2': + resolution: {integrity: sha512-WpbZfZUcZU77DrSW4wbsSgTPfKcp286q3ItaIgvSbBpZJlu6mnYXAkjZz6LVZPXkEvLIM8McanyZejKTYUHipA==} + + '@one-ini/wasm@0.1.1': + resolution: {integrity: sha512-XuySG1E38YScSJoMlqovLru4KTUNSjgVTIjyh7qMX6aNN5HY5Ct5LhRJdxO79JtTzKfzV/bnWpz+zquYrISsvw==} + + '@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} + + '@polka/url@1.0.0-next.28': + resolution: {integrity: sha512-8LduaNlMZGwdZ6qWrKlfa+2M4gahzFkprZiAt2TF8uS0qQgBizKXpXURqvTJ4WtmupWxaLqjRb2UCTe72mu+Aw==} + + '@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==} + + '@rollup/pluginutils@4.2.1': + resolution: {integrity: sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ==} + engines: {node: '>= 8.0.0'} + + '@rollup/pluginutils@5.1.4': + resolution: {integrity: sha512-USm05zrsFxYLPdWWq+K3STlWiT/3ELn3RcV5hJMghpeAIhxfsUIg6mt12CBJBInWMV4VneoV7SfGv8xIwo2qNQ==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + + '@rollup/rollup-android-arm-eabi@4.30.0': + resolution: {integrity: sha512-qFcFto9figFLz2g25DxJ1WWL9+c91fTxnGuwhToCl8BaqDsDYMl/kOnBXAyAqkkzAWimYMSWNPWEjt+ADAHuoQ==} + cpu: [arm] + os: [android] + + '@rollup/rollup-android-arm64@4.30.0': + resolution: {integrity: sha512-vqrQdusvVl7dthqNjWCL043qelBK+gv9v3ZiqdxgaJvmZyIAAXMjeGVSqZynKq69T7062T5VrVTuikKSAAVP6A==} + cpu: [arm64] + os: [android] + + '@rollup/rollup-darwin-arm64@4.30.0': + resolution: {integrity: sha512-617pd92LhdA9+wpixnzsyhVft3szYiN16aNUMzVkf2N+yAk8UXY226Bfp36LvxYTUt7MO/ycqGFjQgJ0wlMaWQ==} + cpu: [arm64] + os: [darwin] + + '@rollup/rollup-darwin-x64@4.30.0': + resolution: {integrity: sha512-Y3b4oDoaEhCypg8ajPqigKDcpi5ZZovemQl9Edpem0uNv6UUjXv7iySBpGIUTSs2ovWOzYpfw9EbFJXF/fJHWw==} + cpu: [x64] + os: [darwin] + + '@rollup/rollup-freebsd-arm64@4.30.0': + resolution: {integrity: sha512-3REQJ4f90sFIBfa0BUokiCdrV/E4uIjhkWe1bMgCkhFXbf4D8YN6C4zwJL881GM818qVYE9BO3dGwjKhpo2ABA==} + cpu: [arm64] + os: [freebsd] + + '@rollup/rollup-freebsd-x64@4.30.0': + resolution: {integrity: sha512-ZtY3Y8icbe3Cc+uQicsXG5L+CRGUfLZjW6j2gn5ikpltt3Whqjfo5mkyZ86UiuHF9Q3ZsaQeW7YswlHnN+lAcg==} + cpu: [x64] + os: [freebsd] + + '@rollup/rollup-linux-arm-gnueabihf@4.30.0': + resolution: {integrity: sha512-bsPGGzfiHXMhQGuFGpmo2PyTwcrh2otL6ycSZAFTESviUoBOuxF7iBbAL5IJXc/69peXl5rAtbewBFeASZ9O0g==} + cpu: [arm] + os: [linux] + + '@rollup/rollup-linux-arm-musleabihf@4.30.0': + resolution: {integrity: sha512-kvyIECEhs2DrrdfQf++maCWJIQ974EI4txlz1nNSBaCdtf7i5Xf1AQCEJWOC5rEBisdaMFFnOWNLYt7KpFqy5A==} + cpu: [arm] + os: [linux] + + '@rollup/rollup-linux-arm64-gnu@4.30.0': + resolution: {integrity: sha512-CFE7zDNrokaotXu+shwIrmWrFxllg79vciH4E/zeK7NitVuWEaXRzS0mFfFvyhZfn8WfVOG/1E9u8/DFEgK7WQ==} + cpu: [arm64] + os: [linux] + + '@rollup/rollup-linux-arm64-musl@4.30.0': + resolution: {integrity: sha512-MctNTBlvMcIBP0t8lV/NXiUwFg9oK5F79CxLU+a3xgrdJjfBLVIEHSAjQ9+ipofN2GKaMLnFFXLltg1HEEPaGQ==} + cpu: [arm64] + os: [linux] + + '@rollup/rollup-linux-loongarch64-gnu@4.30.0': + resolution: {integrity: sha512-fBpoYwLEPivL3q368+gwn4qnYnr7GVwM6NnMo8rJ4wb0p/Y5lg88vQRRP077gf+tc25akuqd+1Sxbn9meODhwA==} + cpu: [loong64] + os: [linux] + + '@rollup/rollup-linux-powerpc64le-gnu@4.30.0': + resolution: {integrity: sha512-1hiHPV6dUaqIMXrIjN+vgJqtfkLpqHS1Xsg0oUfUVD98xGp1wX89PIXgDF2DWra1nxAd8dfE0Dk59MyeKaBVAw==} + cpu: [ppc64] + os: [linux] + + '@rollup/rollup-linux-riscv64-gnu@4.30.0': + resolution: {integrity: sha512-U0xcC80SMpEbvvLw92emHrNjlS3OXjAM0aVzlWfar6PR0ODWCTQtKeeB+tlAPGfZQXicv1SpWwRz9Hyzq3Jx3g==} + cpu: [riscv64] + os: [linux] + + '@rollup/rollup-linux-s390x-gnu@4.30.0': + resolution: {integrity: sha512-VU/P/IODrNPasgZDLIFJmMiLGez+BN11DQWfTVlViJVabyF3JaeaJkP6teI8760f18BMGCQOW9gOmuzFaI1pUw==} + cpu: [s390x] + os: [linux] + + '@rollup/rollup-linux-x64-gnu@4.30.0': + resolution: {integrity: sha512-laQVRvdbKmjXuFA3ZiZj7+U24FcmoPlXEi2OyLfbpY2MW1oxLt9Au8q9eHd0x6Pw/Kw4oe9gwVXWwIf2PVqblg==} + cpu: [x64] + os: [linux] + + '@rollup/rollup-linux-x64-musl@4.30.0': + resolution: {integrity: sha512-3wzKzduS7jzxqcOvy/ocU/gMR3/QrHEFLge5CD7Si9fyHuoXcidyYZ6jyx8OPYmCcGm3uKTUl+9jUSAY74Ln5A==} + cpu: [x64] + os: [linux] + + '@rollup/rollup-win32-arm64-msvc@4.30.0': + resolution: {integrity: sha512-jROwnI1+wPyuv696rAFHp5+6RFhXGGwgmgSfzE8e4xfit6oLRg7GyMArVUoM3ChS045OwWr9aTnU+2c1UdBMyw==} + cpu: [arm64] + os: [win32] + + '@rollup/rollup-win32-ia32-msvc@4.30.0': + resolution: {integrity: sha512-duzweyup5WELhcXx5H1jokpr13i3BV9b48FMiikYAwk/MT1LrMYYk2TzenBd0jj4ivQIt58JWSxc19y4SvLP4g==} + cpu: [ia32] + os: [win32] + + '@rollup/rollup-win32-x64-msvc@4.30.0': + resolution: {integrity: sha512-DYvxS0M07PvgvavMIybCOBYheyrqlui6ZQBHJs6GqduVzHSZ06TPPvlfvnYstjODHQ8UUXFwt5YE+h0jFI8kwg==} + cpu: [x64] + os: [win32] + + '@rys-fe/vite-plugin-theme@0.8.6': + resolution: {integrity: sha512-9j6yMhNRCDxv4Wpimo0EDZf/KU5FgJtjMPVYBaFv4SPClLOEx5kkpcRuDrVBaB4IzM1qizRlxUK4jd9Klxyqig==} + peerDependencies: + vite: '>=2.0.0-beta.49' + + '@scarf/scarf@1.4.0': + resolution: {integrity: sha512-xxeapPiUXdZAE3che6f3xogoJPeZgig6omHEy1rIY5WVsB3H2BHNnZH+gHG6x91SCWyQCzWGsuL2Hh3ClO5/qQ==, tarball: https://registry.npmmirror.com/@scarf/scarf/-/scarf-1.4.0.tgz} + + '@simonwep/pickr@1.8.2': + resolution: {integrity: sha512-/l5w8BIkrpP6n1xsetx9MWPWlU6OblN5YgZZphxan0Tq4BByTCETL6lyIeY8lagalS2Nbt4F2W034KHLIiunKA==} + + '@sinclair/typebox@0.27.8': + resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} + + '@sinonjs/commons@3.0.1': + resolution: {integrity: sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==} + + '@sinonjs/fake-timers@10.3.0': + resolution: {integrity: sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==} + + '@sphinxxxx/color-conversion@2.2.2': + resolution: {integrity: sha512-XExJS3cLqgrmNBIP3bBw6+1oQ1ksGjFh0+oClDKFYpCCqx/hlqwWO5KO/S63fzUo67SxI9dMrF0y5T/Ey7h8Zw==, tarball: https://registry.npmmirror.com/@sphinxxxx/color-conversion/-/color-conversion-2.2.2.tgz} + + '@tinymce/tinymce-vue@4.0.7': + resolution: {integrity: sha512-1esB8wGWrjPCY+rK8vy3QB1cxwXo7HLJWuNrcyPl6LOVR+QJjub0OiV/C+TUEsLN6OpCtRv+QnIqMC5vXz783Q==} + peerDependencies: + vue: ^3.0.0 + + '@traptitech/markdown-it-katex@3.6.0': + resolution: {integrity: sha512-CnJzTWxsgLGXFdSrWRaGz7GZ1kUUi8g3E9HzJmeveX1YwVJavrKYqysktfHZQsujdnRqV5O7g8FPKEA/aeTkOQ==} + + '@trysound/sax@0.2.0': + resolution: {integrity: sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==} + engines: {node: '>=10.13.0'} + + '@tsconfig/node10@1.0.11': + resolution: {integrity: sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==} + + '@tsconfig/node12@1.0.11': + resolution: {integrity: sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==} + + '@tsconfig/node14@1.0.3': + resolution: {integrity: sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==} + + '@tsconfig/node16@1.0.4': + resolution: {integrity: sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==} + + '@types/babel__core@7.20.5': + resolution: {integrity: sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==} + + '@types/babel__generator@7.6.8': + resolution: {integrity: sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==} + + '@types/babel__template@7.4.4': + resolution: {integrity: sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==} + + '@types/babel__traverse@7.20.6': + resolution: {integrity: sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==} + + '@types/codemirror@5.60.15': + resolution: {integrity: sha512-dTOvwEQ+ouKJ/rE9LT1Ue2hmP6H1mZv5+CCnNWu2qtiOe2LQa9lCprEY20HxiDmV/Bxh+dXjywmy5aKvoGjULA==} + + '@types/conventional-commits-parser@5.0.1': + resolution: {integrity: sha512-7uz5EHdzz2TqoMfV7ee61Egf5y6NkcO4FB/1iCCQnbeiI1F3xzv3vK5dBCXUCLQgGYS+mUeigK1iKQzvED+QnQ==} + + '@types/crypto-js@4.2.2': + resolution: {integrity: sha512-sDOLlVbHhXpAUAL0YHDUUwDZf3iN4Bwi4W6a0W0b+QcAezUbRtH4FVb+9J4h+XFPW7l/gQ9F8qC7P+Ec4k8QVQ==} + + '@types/estree@1.0.6': + resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==} + + '@types/fs-extra@11.0.4': + resolution: {integrity: sha512-yTbItCNreRooED33qjunPthRcSjERP1r4MqCZc7wv0u2sUkzTFp45tgUfS5+r7FrZPdmCCNflLhVSP/o+SemsQ==} + + '@types/graceful-fs@4.1.9': + resolution: {integrity: sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==} + + '@types/inquirer@9.0.7': + resolution: {integrity: sha512-Q0zyBupO6NxGRZut/JdmqYKOnN95Eg5V8Csg3PGKkP+FnvsUZx1jAyK7fztIszxxMuoBA6E3KXWvdZVXIpx60g==} + + '@types/intro.js@5.1.5': + resolution: {integrity: sha512-TT1d8ayz07svlBcoqh26sNpQaU6bBpdFcCC+IMZHp46NNX2mYAHAVefM3wCmQSd4UWhhObeMjFByw2IaPKOXlw==} + + '@types/istanbul-lib-coverage@2.0.6': + resolution: {integrity: sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==} + + '@types/istanbul-lib-report@3.0.3': + resolution: {integrity: sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==} + + '@types/istanbul-reports@3.0.4': + resolution: {integrity: sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==} + + '@types/jest@29.5.14': + resolution: {integrity: sha512-ZN+4sdnLUbo8EVvVc2ao0GFW6oVrQRPn4K2lglySj7APvSrgzxHiNNK99us4WDMi57xxA2yggblIAMNhXOotLQ==} + + '@types/json-schema@7.0.15': + resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} + + '@types/jsonfile@6.1.4': + resolution: {integrity: sha512-D5qGUYwjvnNNextdU59/+fI+spnwtTFmyQP0h+PfIOSkNfpU6AOICUOkm4i0OnSk+NyjdPJrxCDro0sJsWlRpQ==} + + '@types/lodash-es@4.17.12': + resolution: {integrity: sha512-0NgftHUcV4v34VhXm8QBSftKVXtbkBG3ViCjs6+eJ5a6y6Mi/jiFGPc1sC7QK+9BFhWrURE3EOggmWaSxL9OzQ==} + + '@types/lodash@4.17.14': + resolution: {integrity: sha512-jsxagdikDiDBeIRaPYtArcT8my4tN1og7MtMRquFT3XNA6axxyHDRUemqDz/taRDdOUn0GnGHRCuff4q48sW9A==} + + '@types/minimist@1.2.5': + resolution: {integrity: sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==} + + '@types/mockjs@1.0.10': + resolution: {integrity: sha512-SXgrhajHG7boLv6oU93CcmdDm0HYRiceuz6b+7z+/2lCJPTWDv0V5YiwFHT2ejE4bQqgSXQiVPQYPWv7LGsK1g==} + + '@types/node@14.18.63': + resolution: {integrity: sha512-fAtCfv4jJg+ExtXhvCkCqUKZ+4ok/JQk01qDKhL5BDDoS3AxKXhV5/MAVUZyQnSEd2GT92fkgZl0pz0Q0AzcIQ==} + + '@types/node@20.17.12': + resolution: {integrity: sha512-vo/wmBgMIiEA23A/knMfn/cf37VnuF52nZh5ZoW0GWt4e4sxNquibrMRJ7UQsA06+MBx9r/H1jsI9grYjQCQlw==} + + '@types/normalize-package-data@2.4.4': + resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} + + '@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.9.17': + resolution: {integrity: sha512-rX4/bPcfmvxHDv0XjfJELTTr+iB+tn032nPILqHm5wbthUUUuVtNGGqzhya9XUxjTP8Fpr0qYgSZZKxGY++svQ==} + + '@types/semver@7.5.8': + resolution: {integrity: sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==} + + '@types/showdown@2.0.6': + resolution: {integrity: sha512-pTvD/0CIeqe4x23+YJWlX2gArHa8G0J0Oh6GKaVXV7TAeickpkkZiNOgFcFcmLQ5lB/K0qBJL1FtRYltBfbGCQ==} + + '@types/sortablejs@1.15.8': + resolution: {integrity: sha512-b79830lW+RZfwaztgs1aVPgbasJ8e7AXtZYHTELNXZPsERt4ymJdjV4OccDbHQAvHrCcFpbF78jkm0R6h/pZVg==} + + '@types/stack-utils@2.0.3': + resolution: {integrity: sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==} + + '@types/svgo@2.6.4': + resolution: {integrity: sha512-l4cmyPEckf8moNYHdJ+4wkHvFxjyW6ulm9l4YGaOxeyBWPhBOT0gvni1InpFPdzx1dKf/2s62qGITwxNWnPQng==} + + '@types/tern@0.23.9': + resolution: {integrity: sha512-ypzHFE/wBzh+BlH6rrBgS5I/Z7RD21pGhZ2rltb/+ZrVM1awdZwjx7hE5XfuYgHWk9uvV5HLZN3SloevCAp3Bw==} + + '@types/through@0.0.33': + resolution: {integrity: sha512-HsJ+z3QuETzP3cswwtzt2vEIiHBk/dCcHGhbmG5X3ecnwFD/lPrMpliGXxSCg03L9AhrdwA4Oz/qfspkDW+xGQ==} + + '@types/tinycolor2@1.4.6': + resolution: {integrity: sha512-iEN8J0BoMnsWBqjVbWH/c0G0Hh7O21lpR2/+PrvAVgWdzL7eexIFm4JN/Wn10PTcmNdtS6U67r499mlWMXOxNw==} + + '@types/web-bluetooth@0.0.20': + resolution: {integrity: sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow==} + + '@types/yargs-parser@21.0.3': + resolution: {integrity: sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==} + + '@types/yargs@17.0.33': + resolution: {integrity: sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA==} + + '@typescript-eslint/eslint-plugin@6.21.0': + resolution: {integrity: sha512-oy9+hTPCUFpngkEZUSzbf9MxI65wbKFoQYsgPdILTfbUldp5ovUuphZVe4i30emU9M/kP+T64Di0mxl7dSw3MA==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + '@typescript-eslint/parser': ^6.0.0 || ^6.0.0-alpha + eslint: ^7.0.0 || ^8.0.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/scope-manager@5.62.0': + resolution: {integrity: sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.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/type-utils@6.21.0': + resolution: {integrity: sha512-rZQI7wHfao8qMX3Rd3xqeYSMCL3SoiSQLBATSiVKARdFGCYSRvmViieZjqc58jKgs8Y8i9YvVVhRbHSTA4VBag==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + '@typescript-eslint/types@5.62.0': + resolution: {integrity: sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + + '@typescript-eslint/types@6.21.0': + resolution: {integrity: sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg==} + engines: {node: ^16.0.0 || >=18.0.0} + + '@typescript-eslint/typescript-estree@5.62.0': + resolution: {integrity: sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + '@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/utils@5.62.0': + resolution: {integrity: sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || ^8.0.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/visitor-keys@5.62.0': + resolution: {integrity: sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + + '@typescript-eslint/visitor-keys@6.21.0': + resolution: {integrity: sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==} + engines: {node: ^16.0.0 || >=18.0.0} + + '@ungap/structured-clone@1.2.1': + resolution: {integrity: sha512-fEzPV3hSkSMltkw152tJKNARhOupqbH96MZWyRjNaYZOMIzbrTeQDG+MTc6Mr2pgzFQzFxAfmhGDNP5QK++2ZA==} + + '@unocss/astro@0.58.9': + resolution: {integrity: sha512-VWfHNC0EfawFxLfb3uI+QcMGBN+ju+BYtutzeZTjilLKj31X2UpqIh8fepixL6ljgZzB3fweqg2xtUMC0gMnoQ==} + peerDependencies: + vite: ^2.9.0 || ^3.0.0-0 || ^4.0.0 || ^5.0.0-0 + peerDependenciesMeta: + vite: + optional: true + + '@unocss/cli@0.58.9': + resolution: {integrity: sha512-q7qlwX3V6UaqljWUQ5gMj36yTA9eLuuRywahdQWt1ioy4aPF/MEEfnMBZf/ntrqf5tIT5TO8fE11nvCco2Q/sA==} + engines: {node: '>=14'} + hasBin: true + + '@unocss/config@0.58.9': + resolution: {integrity: sha512-90wRXIyGNI8UenWxvHUcH4l4rgq813MsTzYWsf6ZKyLLvkFjV2b2EfGXI27GPvZ7fVE1OAqx+wJNTw8CyQxwag==} + engines: {node: '>=14'} + + '@unocss/core@0.58.9': + resolution: {integrity: sha512-wYpPIPPsOIbIoMIDuH8ihehJk5pAZmyFKXIYO/Kro98GEOFhz6lJoLsy6/PZuitlgp2/TSlubUuWGjHWvp5osw==} + + '@unocss/extractor-arbitrary-variants@0.58.9': + resolution: {integrity: sha512-M/BvPdbEEMdhcFQh/z2Bf9gylO1Ky/ZnpIvKWS1YJPLt4KA7UWXSUf+ZNTFxX+X58Is5qAb5hNh/XBQmL3gbXg==} + + '@unocss/inspector@0.58.9': + resolution: {integrity: sha512-uRzqkCNeBmEvFePXcfIFcQPMlCXd9/bLwa5OkBthiOILwQdH1uRIW3GWAa2SWspu+kZLP0Ly3SjZ9Wqi+5ZtTw==} + + '@unocss/postcss@0.58.9': + resolution: {integrity: sha512-PnKmH6Qhimw35yO6u6yx9SHaX2NmvbRNPDvMDHA/1xr3M8L0o8U88tgKbWfm65NEGF3R1zJ9A8rjtZn/LPkgPA==} + engines: {node: '>=14'} + peerDependencies: + postcss: ^8.4.21 + + '@unocss/preset-attributify@0.58.9': + resolution: {integrity: sha512-ucP+kXRFcwmBmHohUVv31bE/SejMAMo7Hjb0QcKVLyHlzRWUJsfNR+jTAIGIUSYxN7Q8MeigYsongGo3nIeJnQ==} + + '@unocss/preset-icons@0.58.9': + resolution: {integrity: sha512-9dS48+yAunsbS0ylOW2Wisozwpn3nGY1CqTiidkUnrMnrZK3al579A7srUX9NyPWWDjprO7eU/JkWbdDQSmFFA==} + + '@unocss/preset-mini@0.58.9': + resolution: {integrity: sha512-m4aDGYtueP8QGsU3FsyML63T/w5Mtr4htme2jXy6m50+tzC1PPHaIBstMTMQfLc6h8UOregPJyGHB5iYQZGEvQ==} + + '@unocss/preset-tagify@0.58.9': + resolution: {integrity: sha512-obh75XrRmxYwrQMflzvhQUMeHwd/R9bEDhTWUW9aBTolBy4eNypmQwOhHCKh5Xi4Dg6o0xj6GWC/jcCj1SPLog==} + + '@unocss/preset-typography@0.58.9': + resolution: {integrity: sha512-hrsaqKlcZni3Vh4fwXC+lP9e92FQYbqtmlZw2jpxlVwwH5aLzwk4d4MiFQGyhCfzuSDYm0Zd52putFVV02J7bA==} + + '@unocss/preset-uno@0.58.9': + resolution: {integrity: sha512-Fze+X2Z/EegCkRdDRgwwvFBmXBenNR1AG8KxAyz8iPeWbhOBaRra2sn2ScryrfH6SbJHpw26ZyJXycAdS0Fq3A==} + + '@unocss/preset-web-fonts@0.58.9': + resolution: {integrity: sha512-XtiO+Z+RYnNYomNkS2XxaQiY++CrQZKOfNGw5htgIrb32QtYVQSkyYQ3jDw7JmMiCWlZ4E72cV/zUb++WrZLxg==} + + '@unocss/preset-wind@0.58.9': + resolution: {integrity: sha512-7l+7Vx5UoN80BmJKiqDXaJJ6EUqrnUQYv8NxCThFi5lYuHzxsYWZPLU3k3XlWRUQt8XL+6rYx7mMBmD7EUSHyw==} + + '@unocss/reset@0.58.9': + resolution: {integrity: sha512-nA2pg3tnwlquq+FDOHyKwZvs20A6iBsKPU7Yjb48JrNnzoaXqE+O9oN6782IG2yKVW4AcnsAnAnM4cxXhGzy1w==} + + '@unocss/rule-utils@0.58.9': + resolution: {integrity: sha512-45bDa+elmlFLthhJmKr2ltKMAB0yoXnDMQ6Zp5j3OiRB7dDMBkwYRPvHLvIe+34Ey7tDt/kvvDPtWMpPl2quUQ==} + engines: {node: '>=14'} + + '@unocss/scope@0.58.9': + resolution: {integrity: sha512-BIwcpx0R3bE0rYa9JVDJTk0GX32EBvnbvufBpNkWfC5tb7g+B7nMkVq9ichanksYCCxrIQQo0mrIz5PNzu9sGA==} + + '@unocss/transformer-attributify-jsx-babel@0.58.9': + resolution: {integrity: sha512-UGaQoGZg+3QrsPtnGHPECmsGn4EQb2KSdZ4eGEn2YssjKv+CcQhzRvpEUgnuF/F+jGPkCkS/G/YEQBHRWBY54Q==} + + '@unocss/transformer-attributify-jsx@0.58.9': + resolution: {integrity: sha512-jpL3PRwf8t43v1agUdQn2EHGgfdWfvzsMxFtoybO88xzOikzAJaaouteNtojc/fQat2T9iBduDxVj5egdKmhdQ==} + + '@unocss/transformer-compile-class@0.58.9': + resolution: {integrity: sha512-l2VpCqelJ6Tgc1kfSODxBtg7fCGPVRr2EUzTg1LrGYKa2McbKuc/wV/2DWKHGxL6+voWi7a2C9XflqGDXXutuQ==} + + '@unocss/transformer-directives@0.58.9': + resolution: {integrity: sha512-pLOUsdoY2ugVntJXg0xuGjO9XZ2xCiMxTPRtpZ4TsEzUtdEzMswR06Y8VWvNciTB/Zqxcz9ta8rD0DKePOfSuw==} + + '@unocss/transformer-variant-group@0.58.9': + resolution: {integrity: sha512-3A6voHSnFcyw6xpcZT6oxE+KN4SHRnG4z862tdtWvRGcN+jGyNr20ylEZtnbk4xj0VNMeGHHQRZ0WLvmrAwvOQ==} + + '@unocss/vite@0.58.9': + resolution: {integrity: sha512-mmppBuulAHCal+sC0Qz36Y99t0HicAmznpj70Kzwl7g/yvXwm58/DW2OnpCWw+uA8/JBft/+z3zE+XvrI+T1HA==} + peerDependencies: + vite: ^2.9.0 || ^3.0.0-0 || ^4.0.0 || ^5.0.0-0 + + '@vant/area-data@1.5.2': + resolution: {integrity: sha512-Gtxgt6Rjgopt6234ANpO0bBsSwtjZ23lBlVDHIy8Mi2NJqyoj1vgVWY0dri8/2LCZAWzQ6EnwRrUVViUZ0cvMA==} + + '@vitejs/plugin-vue-jsx@4.1.1': + resolution: {integrity: sha512-uMJqv/7u1zz/9NbWAD3XdjaY20tKTf17XVfQ9zq4wY1BjsB/PjpJPMe2xiG39QpP4ZdhYNhm4Hvo66uJrykNLA==} + engines: {node: ^18.0.0 || >=20.0.0} + peerDependencies: + vite: ^5.0.0 || ^6.0.0 + vue: ^3.0.0 + + '@vitejs/plugin-vue@5.2.1': + resolution: {integrity: sha512-cxh314tzaWwOLqVes2gnnCtvBDcM1UMdn+iFR+UjAn411dPT3tOmqrJjbMd7koZpMAmBM/GqeV4n9ge7JSiJJQ==} + engines: {node: ^18.0.0 || >=20.0.0} + peerDependencies: + vite: ^5.0.0 || ^6.0.0 + vue: ^3.2.25 + + '@volar/language-core@1.11.1': + resolution: {integrity: sha512-dOcNn3i9GgZAcJt43wuaEykSluAuOkQgzni1cuxLxTV0nJKanQztp7FxyswdRILaKH+P2XZMPRp2S4MV/pElCw==} + + '@volar/source-map@1.11.1': + resolution: {integrity: sha512-hJnOnwZ4+WT5iupLRnuzbULZ42L7BWWPMmruzwtLhJfpDVoZLjNBxHDi2sY2bgZXCKlpU5XcsMFoYrsQmPhfZg==} + + '@volar/typescript@1.11.1': + resolution: {integrity: sha512-iU+t2mas/4lYierSnoFOeRFQUhAEMgsFuQxoxvwn5EdQopw43j+J27a4lt9LMInx1gLJBC6qL14WYGlgymaSMQ==} + + '@vue/babel-helper-vue-transform-on@1.2.5': + resolution: {integrity: sha512-lOz4t39ZdmU4DJAa2hwPYmKc8EsuGa2U0L9KaZaOJUt0UwQNjNA3AZTq6uEivhOKhhG1Wvy96SvYBoFmCg3uuw==} + + '@vue/babel-plugin-jsx@1.2.5': + resolution: {integrity: sha512-zTrNmOd4939H9KsRIGmmzn3q2zvv1mjxkYZHgqHZgDrXz5B1Q3WyGEjO2f+JrmKghvl1JIRcvo63LgM1kH5zFg==} + peerDependencies: + '@babel/core': ^7.0.0-0 + peerDependenciesMeta: + '@babel/core': + optional: true + + '@vue/babel-plugin-resolve-type@1.2.5': + resolution: {integrity: sha512-U/ibkQrf5sx0XXRnUZD1mo5F7PkpKyTbfXM3a3rC4YnUz6crHEz9Jg09jzzL6QYlXNto/9CePdOg/c87O4Nlfg==} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@vue/compiler-core@3.5.13': + resolution: {integrity: sha512-oOdAkwqUfW1WqpwSYJce06wvt6HljgY3fGeM9NcVA1HaYOij3mZG9Rkysn0OHuyUAGMbEbARIpsG+LPVlBJ5/Q==} + + '@vue/compiler-dom@3.5.13': + resolution: {integrity: sha512-ZOJ46sMOKUjO3e94wPdCzQ6P1Lx/vhp2RSvfaab88Ajexs0AHeV0uasYhi99WPaogmBlRHNRuly8xV75cNTMDA==} + + '@vue/compiler-sfc@3.5.13': + resolution: {integrity: sha512-6VdaljMpD82w6c2749Zhf5T9u5uLBWKnVue6XWxprDobftnletJ8+oel7sexFfM3qIxNmVE7LSFGTpv6obNyaQ==} + + '@vue/compiler-ssr@3.5.13': + resolution: {integrity: sha512-wMH6vrYHxQl/IybKJagqbquvxpWCuVYpoUJfCqFZwa/JY1GdATAQ+TgVtgrwwMZ0D07QhA99rs/EAAWfvG6KpA==} + + '@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.13': + resolution: {integrity: sha512-NaCwtw8o48B9I6L1zl2p41OHo/2Z4wqYGGIK1Khu5T7yxrn+ATOixn/Udn2m+6kZKB/J7cuT9DbWWhRxqixACg==} + + '@vue/runtime-core@3.5.13': + resolution: {integrity: sha512-Fj4YRQ3Az0WTZw1sFe+QDb0aXCerigEpw418pw1HBUKFtnQHWzwojaukAs2X/c9DQz4MQ4bsXTGlcpGxU/RCIw==} + + '@vue/runtime-dom@3.5.13': + resolution: {integrity: sha512-dLaj94s93NYLqjLiyFzVs9X6dWhTdAlEAciC3Moq7gzAc13VJUdCnjjRurNM6uTLFATRHexHCTu/Xp3eW6yoog==} + + '@vue/server-renderer@3.5.13': + resolution: {integrity: sha512-wAi4IRJV/2SAW3htkTlB+dHeRmpTiVIK1OGLWV1yeStVSebSQQOwGwIq0D3ZIoBj2C2qpgz5+vX9iEBkTdk5YA==} + peerDependencies: + vue: 3.5.13 + + '@vue/shared@3.5.13': + resolution: {integrity: sha512-/hnE/qP5ZoGpol0a5mDi45bOd7t3tjYJBjsgCsivow7D48cJeV5l05RD82lPqi7gRiphZM37rnhW1l6ZoCNNnQ==} + + '@vue/test-utils@2.4.6': + resolution: {integrity: sha512-FMxEjOpYNYiFe0GkaHsnJPXFHxQ6m4t8vI/ElPGpMWxZKpmRvQ33OIrvRXemy6yha03RxhOlQuy+gZMC3CQSow==} + + '@vueuse/core@10.11.1': + resolution: {integrity: sha512-guoy26JQktXPcz+0n3GukWIy/JDNKti9v6VEMu6kV2sYBsWuGiTU8OWdg+ADfUbHg3/3DlqySDe7JmdHrktiww==} + + '@vueuse/metadata@10.11.1': + resolution: {integrity: sha512-IGa5FXd003Ug1qAZmyE8wF3sJ81xGLSqTqtQ6jaVfkeZ4i5kS2mwQF61yhVqojRnenVew5PldLyRgvdl4YYuSw==} + + '@vueuse/shared@10.11.1': + resolution: {integrity: sha512-LHpC8711VFZlDaYUXEBbFBCQ7GS3dVU9mjOhhMhXP6txTV4EhYQg/KGnQuvt/sPAtoUKq7VVUnL6mVtFoL42sA==} + + '@vxe-ui/core@4.1.5': + resolution: {integrity: sha512-IgRwVueejOGC5t+bVmBAUkoUplvp1R77pfYX6bb4fcLEPUdBGOdm4I0LCKTDWQ24Mj3Bki7wNpt3sdtEZEzdoA==, tarball: https://registry.npmmirror.com/@vxe-ui/core/-/core-4.1.5.tgz} + peerDependencies: + vue: ^3.2.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} + + acorn-jsx@5.3.2: + resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} + peerDependencies: + acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 + + acorn-walk@8.3.4: + resolution: {integrity: sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==} + engines: {node: '>=0.4.0'} + + acorn@8.14.0: + resolution: {integrity: sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==} + engines: {node: '>=0.4.0'} + hasBin: true + + add-stream@1.0.0: + resolution: {integrity: sha512-qQLMr+8o0WC4FZGQTcJiKBVC59JylcPSrTtk6usvmIDFUOCKegapy1VHQwRbFMOFyb/inzUVqHs+eMYKDM1YeQ==} + + ajv@6.12.6: + resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} + + ajv@8.17.1: + resolution: {integrity: sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==} + + ansi-escapes@4.3.2: + resolution: {integrity: sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==} + engines: {node: '>=8'} + + 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.1.0: + resolution: {integrity: sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==} + engines: {node: '>=12'} + + ansi-styles@2.2.1: + resolution: {integrity: sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==} + engines: {node: '>=0.10.0'} + + ansi-styles@3.2.1: + resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} + engines: {node: '>=4'} + + 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'} + + ant-design-vue@4.2.6: + resolution: {integrity: sha512-t7eX13Yj3i9+i5g9lqFyYneoIb3OzTvQjq9Tts1i+eiOd3Eva/6GagxBSXM1fOCjqemIu0FYVE1ByZ/38epR3Q==} + engines: {node: '>=12.22.0'} + peerDependencies: + vue: '>=3.2.0' + + anymatch@3.1.3: + resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} + engines: {node: '>= 8'} + + arg@4.1.3: + resolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==} + + argparse@1.0.10: + resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} + + argparse@2.0.1: + resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} + + arr-diff@4.0.0: + resolution: {integrity: sha512-YVIQ82gZPGBebQV/a8dar4AitzCQs0jjXwMPZllpXMaGjXPYVUawSxQrRsjhjupyVxEvbHgUmIhKVlND+j02kA==} + engines: {node: '>=0.10.0'} + + arr-flatten@1.1.0: + resolution: {integrity: sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==} + engines: {node: '>=0.10.0'} + + arr-union@3.1.0: + resolution: {integrity: sha512-sKpyeERZ02v1FeCZT8lrfJq5u6goHCtpTAzPwJYe7c8SPFOboNjNg1vz2L4VTn9T4PQxEx13TbXLmYUcS6Ug7Q==} + engines: {node: '>=0.10.0'} + + array-buffer-byte-length@1.0.2: + resolution: {integrity: sha512-LHE+8BuR7RYGDKvnrmcuSq3tDcKv9OFEXQt/HpbZhY7V6h0zlUXutnAD82GiFx9rdieCMjkvtcsPqBwgUl1Iiw==} + engines: {node: '>= 0.4'} + + array-ify@1.0.0: + resolution: {integrity: sha512-c5AMf34bKdvPhQ7tBGhqkgKNUzMr4WUs+WDtC2ZUGOUncbxKMTvqxYctiseW3+L4bA8ec+GcZ6/A/FW4m8ukng==} + + array-tree-filter@2.1.0: + resolution: {integrity: sha512-4ROwICNlNw/Hqa9v+rk5h22KjmzB1JGTMVKP2AKJBOCgb0yL0ASf0+YvCcLNNwquOHNX48jkeZIJ3a+oOQqKcw==} + + array-union@2.1.0: + resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} + engines: {node: '>=8'} + + array-unique@0.3.2: + resolution: {integrity: sha512-SleRWjh9JUud2wH1hPs9rZBZ33H6T9HOiL0uwGnGx9FpE6wKGyfWugmbkEOIs6qWrZhg0LWeLziLrEwQJhs5mQ==} + engines: {node: '>=0.10.0'} + + arraybuffer.prototype.slice@1.0.4: + resolution: {integrity: sha512-BNoCY6SXXPQ7gF2opIP4GBE+Xw7U+pHMYKuzjgCN3GwiaIR09UUeKfheyIry77QtrCBlC0KK0q5/TER/tYh3PQ==} + engines: {node: '>= 0.4'} + + arrify@1.0.1: + resolution: {integrity: sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==} + engines: {node: '>=0.10.0'} + + assign-symbols@1.0.0: + resolution: {integrity: sha512-Q+JC7Whu8HhmTdBph/Tq59IoRtoy6KAm5zzPv00WdujX82lbAL8K7WVjne7vdCsAmbF4AYaDOPyO3k0kl8qIrw==} + engines: {node: '>=0.10.0'} + + 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==} + + async@2.6.4: + resolution: {integrity: sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==} + + async@3.2.6: + resolution: {integrity: sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==} + + asynckit@0.4.0: + resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==, tarball: https://registry.npmmirror.com/asynckit/-/asynckit-0.4.0.tgz} + + at-least-node@1.0.0: + resolution: {integrity: sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==} + engines: {node: '>= 4.0.0'} + + atob@2.1.2: + resolution: {integrity: sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==} + engines: {node: '>= 4.5.0'} + hasBin: true + + autoprefixer@10.4.20: + resolution: {integrity: sha512-XY25y5xSv/wEoqzDyXXME4AFfkZI0P23z6Fs3YgymDnKJkCGOnkL0iTxCa85UTqaSgfcqyf3UA6+c7wUvx/16g==} + engines: {node: ^10 || ^12 || >=14} + hasBin: true + peerDependencies: + postcss: ^8.1.0 + + available-typed-arrays@1.0.7: + resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==} + engines: {node: '>= 0.4'} + + axios@0.26.1: + resolution: {integrity: sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==, tarball: https://registry.npmmirror.com/axios/-/axios-0.26.1.tgz} + + axios@1.8.4: + resolution: {integrity: sha512-eBSYY4Y68NNlHbHBMdeDmKNtDgXWhQsJcGqzO3iLUM0GraQFSS9cVgPX5I9b3lbdFKyYoAEGAZF1DwhTaljNAw==, tarball: https://registry.npmmirror.com/axios/-/axios-1.8.4.tgz} + + babel-jest@29.7.0: + resolution: {integrity: sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + peerDependencies: + '@babel/core': ^7.8.0 + + babel-plugin-istanbul@6.1.1: + resolution: {integrity: sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==} + engines: {node: '>=8'} + + babel-plugin-jest-hoist@29.6.3: + resolution: {integrity: sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + babel-plugin-transform-runtime@6.23.0: + resolution: {integrity: sha512-cpGMVC1vt/772y3jx1gwSaTitQVZuFDlllgreMsZ+rTYC6jlYXRyf5FQOgSnckOiA5QmzbXTyBY2A5AmZXF1fA==} + + babel-preset-current-node-syntax@1.1.0: + resolution: {integrity: sha512-ldYss8SbBlWva1bs28q78Ju5Zq1F+8BrqBZZ0VFhLBvhh6lCpC2o3gDJi/5DRLs9FgYZCnmPYIVFU4lRXCkyUw==} + peerDependencies: + '@babel/core': ^7.0.0 + + babel-preset-jest@29.6.3: + resolution: {integrity: sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + peerDependencies: + '@babel/core': ^7.0.0 + + babel-runtime@6.26.0: + resolution: {integrity: sha512-ITKNuq2wKlW1fJg9sSW52eepoYgZBggvOAHC0u/CYu/qxQ9EVzThCgR69BnSXLHjy2f7SY5zaQ4yt7H9ZVxY2g==} + + balanced-match@1.0.2: + resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + + balanced-match@2.0.0: + resolution: {integrity: sha512-1ugUSr8BHXRnK23KfuYS+gVMC3LB8QGH9W1iGtDPsNWoQbgtXSExkBu2aDR4epiGWZOjZsj6lDl/N/AqqTC3UA==} + + base64-js@1.5.1: + resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} + + base@0.11.2: + resolution: {integrity: sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==} + engines: {node: '>=0.10.0'} + + basic-auth@2.0.1: + resolution: {integrity: sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==} + engines: {node: '>= 0.8'} + + before-after-hook@2.2.3: + resolution: {integrity: sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==} + + big.js@5.2.2: + resolution: {integrity: sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==} + + big.js@6.2.2: + resolution: {integrity: sha512-y/ie+Faknx7sZA5MfGA2xKlu0GDv8RWrXGsmlteyJQ2lvoKv9GBK/fpRMc2qlSoBAgNxrixICFCBefIq8WCQpQ==} + + binary-extensions@2.3.0: + resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==} + engines: {node: '>=8'} + + bl@4.1.0: + resolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==} + + bluebird@3.7.2: + resolution: {integrity: sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==} + + boolbase@1.0.0: + resolution: {integrity: sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==} + + brace-expansion@1.1.11: + resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} + + brace-expansion@2.0.1: + resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} + + braces@2.3.2: + resolution: {integrity: sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==} + engines: {node: '>=0.10.0'} + + braces@3.0.3: + resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} + engines: {node: '>=8'} + + browserslist@4.24.3: + resolution: {integrity: sha512-1CPmv8iobE2fyRMV97dAcMVegvvWKxmq94hkLiAkUGwKVTyDLw33K+ZxiFrREKmmps4rIw6grcCFCnTMSZ/YiA==} + engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} + hasBin: true + + bs-logger@0.2.6: + resolution: {integrity: sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==} + engines: {node: '>= 6'} + + bser@2.1.1: + resolution: {integrity: sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==} + + buffer-from@1.1.2: + resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} + + buffer@5.7.1: + resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} + + cac@6.7.14: + resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} + engines: {node: '>=8'} + + cache-base@1.0.1: + resolution: {integrity: sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==} + engines: {node: '>=0.10.0'} + + cachedir@2.3.0: + resolution: {integrity: sha512-A+Fezp4zxnit6FanDmv9EqXNAi3vt9DWp51/71UEhXukb7QUuvtv9344h91dyAxuTLoSYJFU299qzR3tzwPAhw==} + engines: {node: '>=6'} + + call-bind-apply-helpers@1.0.1: + resolution: {integrity: sha512-BhYE+WDaywFg2TBWYNXAE+8B1ATnThNBqXHP5nQu0jWJdVvY2hvkpyB3qOmtmDePiS5/BDQ8wASEWGMWRG148g==} + engines: {node: '>= 0.4'} + + call-bind@1.0.8: + resolution: {integrity: sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==} + engines: {node: '>= 0.4'} + + call-bound@1.0.3: + resolution: {integrity: sha512-YTd+6wGlNlPxSuri7Y6X8tY2dmm12UMH66RpKMhiX6rsk5wXXnYgbUcOt8kiS31/AjfoTOvCsE+w8nZQLQnzHA==} + engines: {node: '>= 0.4'} + + callsites@3.1.0: + resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} + engines: {node: '>=6'} + + camel-case@4.1.2: + resolution: {integrity: sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw==} + + camelcase-keys@6.2.2: + resolution: {integrity: sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==} + engines: {node: '>=8'} + + camelcase@5.3.1: + resolution: {integrity: sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==} + engines: {node: '>=6'} + + camelcase@6.3.0: + resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} + engines: {node: '>=10'} + + caniuse-lite@1.0.30001690: + resolution: {integrity: sha512-5ExiE3qQN6oF8Clf8ifIDcMRCRE/dMGcETG/XGMD8/XiXm6HXQgQTh1yZYLXXpSOsEUlJm1Xr7kGULZTuGtP/w==} + + chalk@1.1.3: + resolution: {integrity: sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==} + engines: {node: '>=0.10.0'} + + chalk@2.4.2: + resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} + engines: {node: '>=4'} + + 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} + + chalk@5.4.1: + resolution: {integrity: sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w==} + engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} + + char-regex@1.0.2: + resolution: {integrity: sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==} + engines: {node: '>=10'} + + chardet@0.7.0: + resolution: {integrity: sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==} + + charenc@0.0.2: + resolution: {integrity: sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA==} + + cheerio-select@2.1.0: + resolution: {integrity: sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==} + + cheerio@1.0.0: + resolution: {integrity: sha512-quS9HgjQpdaXOvsZz82Oz7uxtXiy6UIsIQcpBj7HRw2M63Skasm9qlDocAM7jNuaxdhpPU7c4kJN+gA5MCu4ww==} + engines: {node: '>=18.17'} + + china-area-data@5.0.1: + resolution: {integrity: sha512-BQDPpiv5Nn+018ekcJK2oSD9PAD+E1bvXB0wgabc//dFVS/KvRqCgg0QOEUt3vBkx9XzB5a9BmkJCEZDBxVjVw==} + + chokidar@3.6.0: + resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} + engines: {node: '>= 8.10.0'} + + ci-info@3.9.0: + resolution: {integrity: sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==} + engines: {node: '>=8'} + + cjs-module-lexer@1.4.1: + resolution: {integrity: sha512-cuSVIHi9/9E/+821Qjdvngor+xpnlwnuwIyZOaLmHBVdXL+gP+I6QQB9VkO7RI77YIcTV+S1W9AreJ5eN63JBA==} + + class-utils@0.3.6: + resolution: {integrity: sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==} + engines: {node: '>=0.10.0'} + + classnames@2.5.1: + resolution: {integrity: sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow==, tarball: https://registry.npmmirror.com/classnames/-/classnames-2.5.1.tgz} + + clean-css@5.3.3: + resolution: {integrity: sha512-D5J+kHaVb/wKSFcyyV75uCn8fiY4sV38XJoe4CUyGQ+mOU/fMVYUdH1hJC+CJQ5uY3EnW27SbJYS4X8BiLrAFg==} + engines: {node: '>= 10.0'} + + cli-cursor@3.1.0: + resolution: {integrity: sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==} + engines: {node: '>=8'} + + cli-cursor@5.0.0: + resolution: {integrity: sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw==} + engines: {node: '>=18'} + + cli-spinners@2.9.2: + resolution: {integrity: sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==} + engines: {node: '>=6'} + + cli-truncate@4.0.0: + resolution: {integrity: sha512-nPdaFdQ0h/GEigbPClz11D0v/ZJEwxmeVZGeMo3Z5StPtUTkA9o1lD6QwoirYiSDzbcwn2XcjwmCp68W1IS4TA==} + engines: {node: '>=18'} + + cli-width@3.0.0: + resolution: {integrity: sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==} + engines: {node: '>= 10'} + + cli-width@4.1.0: + resolution: {integrity: sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==} + engines: {node: '>= 12'} + + clipboard@2.0.11: + resolution: {integrity: sha512-C+0bbOqkezLIsmWSvlsXS0Q0bmkugu7jcfMIACB+RDEntIzQIkdr148we28AfSloQLRdZlYL/QYyrq05j/3Faw==} + + 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'} + + clone@1.0.4: + resolution: {integrity: sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==} + engines: {node: '>=0.8'} + + clone@2.1.2: + resolution: {integrity: sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==} + engines: {node: '>=0.8'} + + co@4.6.0: + resolution: {integrity: sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==} + engines: {iojs: '>= 1.0.0', node: '>= 0.12.0'} + + codemirror@5.65.18: + resolution: {integrity: sha512-Gaz4gHnkbHMGgahNt3CA5HBk5lLQBqmD/pBgeB4kQU6OedZmqMBjlRF0LSrp2tJ4wlLNPm2FfaUd1pDy0mdlpA==} + + collect-v8-coverage@1.0.2: + resolution: {integrity: sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==} + + collection-visit@1.0.0: + resolution: {integrity: sha512-lNkKvzEeMBBjUGHZ+q6z9pSJla0KWAQPvtzhEV9+iGyQYG+pBpl7xKDhxoNSOZH2hhv0v5k0y2yAM4o4SjoSkw==} + engines: {node: '>=0.10.0'} + + color-convert@1.9.3: + resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} + + color-convert@2.0.1: + resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} + engines: {node: '>=7.0.0'} + + color-name@1.1.3: + resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==} + + color-name@1.1.4: + resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + + colord@2.9.3: + resolution: {integrity: sha512-jeC1axXpnb0/2nn/Y1LPuLdgXBLH7aDcHu4KEKfqw3CUhX7ZpfBSlPKyqXE6btIgEzfWtrX3/tyBCaCvXvMkOw==} + + colorette@2.0.20: + resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==} + + combined-stream@1.0.8: + resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==, tarball: https://registry.npmmirror.com/combined-stream/-/combined-stream-1.0.8.tgz} + 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@13.0.0: + resolution: {integrity: sha512-oPYleIY8wmTVzkvQq10AEok6YcTC4sRUBl8F9gVuwchGVUCTbl/vhLTaQqutuuySYOsu8YTgV+OxKc/8Yvx+mQ==} + engines: {node: '>=18'} + + 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'} + + commander@9.5.0: + resolution: {integrity: sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==} + engines: {node: ^12.20.0 || >=14} + + commitizen@4.3.1: + resolution: {integrity: sha512-gwAPAVTy/j5YcOOebcCRIijn+mSjWJC+IYKivTu6aG8Ei/scoXgfsMRnuAk6b0GRste2J4NGxVdMN3ZpfNaVaw==} + engines: {node: '>= 12'} + hasBin: true + + compare-func@2.0.0: + resolution: {integrity: sha512-zHig5N+tPWARooBnb0Zx1MFcdfpyJrfTJ3Y5L+IFvUm8rM74hHz66z0gw0x4tijh5CorKkKUCnW82R2vmpeCRA==} + + component-emitter@1.3.1: + resolution: {integrity: sha512-T0+barUSQRTUQASh8bx02dl+DhF54GtIDY13Y3m9oWTklKbb3Wv974meRpeZ3lp1JpLVECWWNHC4vaG2XHXouQ==} + + compute-scroll-into-view@1.0.20: + resolution: {integrity: sha512-UCB0ioiyj8CRjtrvaceBLqqhZCVP+1B8+NWQhmdsm0VXOJtobBCf1dBQmebCCo34qZmUwZfIH2MZLqNHazrfjg==} + + 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==} + + connect-history-api-fallback@1.6.0: + resolution: {integrity: sha512-e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg==} + engines: {node: '>=0.8'} + + connect@3.7.0: + resolution: {integrity: sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ==} + engines: {node: '>= 0.10.0'} + + consola@2.15.3: + resolution: {integrity: sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw==} + + consola@3.3.3: + resolution: {integrity: sha512-Qil5KwghMzlqd51UXM0b6fyaGHtOC22scxrwrz4A2882LyUMwQjnvaedN1HAeXzphspQ6CpHkzMAWxBTUruDLg==} + 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-atom@4.0.0: + resolution: {integrity: sha512-q2YtiN7rnT1TGwPTwjjBSIPIzDJCRE+XAUahWxnh+buKK99Kks4WLMHoexw38GXx9OUxAsrp44f9qXe5VEMYhw==} + engines: {node: '>=16'} + + conventional-changelog-cli@4.1.0: + resolution: {integrity: sha512-MscvILWZ6nWOoC+p/3Nn3D2cVLkjeQjyZPUr0bQ+vUORE/SPrkClJh8BOoMNpS4yk+zFJ5LlgXACxH6XGQoRXA==} + engines: {node: '>=16'} + hasBin: true + + conventional-changelog-codemirror@4.0.0: + resolution: {integrity: sha512-hQSojc/5imn1GJK3A75m9hEZZhc3urojA5gMpnar4JHmgLnuM3CUIARPpEk86glEKr3c54Po3WV/vCaO/U8g3Q==} + engines: {node: '>=16'} + + conventional-changelog-conventionalcommits@7.0.2: + resolution: {integrity: sha512-NKXYmMR/Hr1DevQegFB4MwfM5Vv0m4UIxKZTTYuD98lpTknaZlSRrDOG4X7wIXpGkfsYxZTghUN+Qq+T0YQI7w==} + engines: {node: '>=16'} + + conventional-changelog-core@7.0.0: + resolution: {integrity: sha512-UYgaB1F/COt7VFjlYKVE/9tTzfU3VUq47r6iWf6lM5T7TlOxr0thI63ojQueRLIpVbrtHK4Ffw+yQGduw2Bhdg==} + engines: {node: '>=16'} + + conventional-changelog-ember@4.0.0: + resolution: {integrity: sha512-D0IMhwcJUg1Y8FSry6XAplEJcljkHVlvAZddhhsdbL1rbsqRsMfGx/PIkPYq0ru5aDgn+OxhQ5N5yR7P9mfsvA==} + engines: {node: '>=16'} + + conventional-changelog-eslint@5.0.0: + resolution: {integrity: sha512-6JtLWqAQIeJLn/OzUlYmzd9fKeNSWmQVim9kql+v4GrZwLx807kAJl3IJVc3jTYfVKWLxhC3BGUxYiuVEcVjgA==} + engines: {node: '>=16'} + + conventional-changelog-express@4.0.0: + resolution: {integrity: sha512-yWyy5c7raP9v7aTvPAWzqrztACNO9+FEI1FSYh7UP7YT1AkWgv5UspUeB5v3Ibv4/o60zj2o9GF2tqKQ99lIsw==} + engines: {node: '>=16'} + + conventional-changelog-jquery@5.0.0: + resolution: {integrity: sha512-slLjlXLRNa/icMI3+uGLQbtrgEny3RgITeCxevJB+p05ExiTgHACP5p3XiMKzjBn80n+Rzr83XMYfRInEtCPPw==} + engines: {node: '>=16'} + + conventional-changelog-jshint@4.0.0: + resolution: {integrity: sha512-LyXq1bbl0yG0Ai1SbLxIk8ZxUOe3AjnlwE6sVRQmMgetBk+4gY9EO3d00zlEt8Y8gwsITytDnPORl8al7InTjg==} + engines: {node: '>=16'} + + conventional-changelog-preset-loader@4.1.0: + resolution: {integrity: sha512-HozQjJicZTuRhCRTq4rZbefaiCzRM2pr6u2NL3XhrmQm4RMnDXfESU6JKu/pnKwx5xtdkYfNCsbhN5exhiKGJA==} + engines: {node: '>=16'} + + conventional-changelog-writer@7.0.1: + resolution: {integrity: sha512-Uo+R9neH3r/foIvQ0MKcsXkX642hdm9odUp7TqgFS7BsalTcjzRlIfWZrZR1gbxOozKucaKt5KAbjW8J8xRSmA==} + engines: {node: '>=16'} + hasBin: true + + conventional-changelog@5.1.0: + resolution: {integrity: sha512-aWyE/P39wGYRPllcCEZDxTVEmhyLzTc9XA6z6rVfkuCD2UBnhV/sgSOKbQrEG5z9mEZJjnopjgQooTKxEg8mAg==} + engines: {node: '>=16'} + + conventional-commit-types@3.0.0: + resolution: {integrity: sha512-SmmCYnOniSsAa9GqWOeLqc179lfr5TRu5b4QFDkbsrJ5TZjPJx85wtOr3zn+1dbeNiXDKGPbZ72IKbPhLXh/Lg==} + + conventional-commits-filter@4.0.0: + resolution: {integrity: sha512-rnpnibcSOdFcdclpFwWa+pPlZJhXE7l+XK04zxhbWrhgpR96h33QLz8hITTXbcYICxVr3HZFtbtUAQ+4LdBo9A==} + 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==} + + copy-anything@2.0.6: + resolution: {integrity: sha512-1j20GZTsvKNkc4BY3NpMOM8tt///wY3FpIzozTOFO2ffuZcV61nojHXVKIy3WM+7ADCy5FVhdZYHYDdgTU0yJw==} + + copy-descriptor@0.1.1: + resolution: {integrity: sha512-XgZ0pFcakEUlbwQEVNg3+QAis1FyTL3Qel9FYy8pSkQqoG3PNoT0bOCQtOXcOkur21r2Eq2kI+IE+gsmAEVlYw==} + engines: {node: '>=0.10.0'} + + core-js@2.6.12: + resolution: {integrity: sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==} + deprecated: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js. + + core-js@3.39.0: + resolution: {integrity: sha512-raM0ew0/jJUqkJ0E6e8UDtl+y/7ktFivgWvqw8dNSQeNWoSDLvQ1H/RN3aPXB9tBd4/FhyR4RDPGhsNIMsAn7g==} + + cors@2.8.5: + resolution: {integrity: sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==} + engines: {node: '>= 0.10'} + + corser@2.0.1: + resolution: {integrity: sha512-utCYNzRSQIZNPIcGZdQc92UVJYAhtGAteCFg0yRaFm8f0P+CPtyGyHXJcGXnffjCybUCEx3FQ2G7U3/o9eIkVQ==} + engines: {node: '>= 0.4.0'} + + 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-typescript-loader@6.1.0: + resolution: {integrity: sha512-tJ1w35ZRUiM5FeTzT7DtYWAFFv37ZLqSRkGi2oeCK1gPhvaWjkAtfXvLmvE1pRfxxp9aQo6ba/Pvg1dKj05D4g==} + engines: {node: '>=v18'} + peerDependencies: + '@types/node': '*' + cosmiconfig: '>=9' + typescript: '>=5' + + cosmiconfig@8.3.6: + resolution: {integrity: sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA==} + engines: {node: '>=14'} + peerDependencies: + typescript: '>=4.9.5' + peerDependenciesMeta: + typescript: + optional: true + + cosmiconfig@9.0.0: + resolution: {integrity: sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==} + engines: {node: '>=14'} + peerDependencies: + typescript: '>=4.9.5' + peerDependenciesMeta: + typescript: + optional: true + + create-jest@29.7.0: + resolution: {integrity: sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + hasBin: true + + create-require@1.1.1: + resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==} + + cron-parser@4.9.0: + resolution: {integrity: sha512-p0SaNjrHOnQeR8/VnfGbmg9te2kfyYSQ7Sc/j/6DtPL3JQvKxmjO9TSjNFpujqV3vEYYBvNNvXSxzyksBWAx1Q==} + engines: {node: '>=12.0.0'} + + cropperjs@1.6.2: + resolution: {integrity: sha512-nhymn9GdnV3CqiEHJVai54TULFAE3VshJTXSqSJKa8yXAKyBKDWdhHarnlIPrshJ0WMFTGuFvG02YjLXfPiuOA==} + + cross-env@7.0.3: + resolution: {integrity: sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==} + engines: {node: '>=10.14', npm: '>=6', yarn: '>=1'} + hasBin: true + + cross-fetch@3.2.0: + resolution: {integrity: sha512-Q+xVJLoGOeIMXZmbUK4HYk+69cQH6LudR0Vu/pRm2YlU/hDV9CiS0gKUMaWY5f2NeUH9C1nV3bsTlCo0FsTV1Q==} + + cross-spawn@6.0.6: + resolution: {integrity: sha512-VqCUuhcd1iB+dsv8gxPttb5iZh/D0iubSP21g36KXdEuf6I5JiioesUVjpCdHV9MZRUfVFlvwtIUyPfxo5trtw==} + engines: {node: '>=4.8'} + + cross-spawn@7.0.6: + resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} + engines: {node: '>= 8'} + + crypt@0.0.2: + resolution: {integrity: sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow==} + + 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@4.3.0: + resolution: {integrity: sha512-wPpOYtnsVontu2mODhA19JrqWxNsfdatRKd64kmpRbQgh1KtItko5sTnEpPdpSaJszTOhEMlF/RPz28qj4HqhQ==} + + css-select@5.1.0: + resolution: {integrity: sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==} + + css-tree@1.1.3: + resolution: {integrity: sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q==} + engines: {node: '>=8.0.0'} + + css-tree@2.3.1: + resolution: {integrity: sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==} + engines: {node: ^10 || ^12.20.0 || ^14.13.0 || >=15.0.0} + + css-tree@3.1.0: + resolution: {integrity: sha512-0eW44TGN5SQXU1mWSkKwFstI/22X2bG1nYzZTYMAWjylYURhse752YgbE4Cx46AC+bAvI+/dYTPRk1LqSUnu6w==} + 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'} + + cssesc@3.0.0: + resolution: {integrity: sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==} + engines: {node: '>=4'} + hasBin: true + + cssfilter@0.0.10: + resolution: {integrity: sha512-FAaLDaplstoRsDR8XGYH51znUN0UY7nMc6Z9/fvE8EXGwvJE9hu7W2vHwx1+bd6gCYnln9nLbzxFTrcO9YQDZw==} + + csso@4.2.0: + resolution: {integrity: sha512-wvlcdIbf6pwKEk7vHj8/Bkc0B4ylXZruLvOgs9doS5eOsOpuodOV2zJChSpkp+pRpYQLQMeF04nr3Z68Sta9jA==} + engines: {node: '>=8.0.0'} + + csstype@3.1.3: + resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==} + + cz-conventional-changelog@3.3.0: + resolution: {integrity: sha512-U466fIzU5U22eES5lTNiNbZ+d8dfcHcssH4o7QsdWaCcRs/feIPCxKYSWkYBNs5mny7MvEfwpTLWjvbm94hecw==} + engines: {node: '>= 10'} + + cz-git@1.11.0: + resolution: {integrity: sha512-FCNkpyVmNPX0P8kHtX8uoFcXsJ4bjivMXVS5vc/qCyM8jj+Tuqo6CXQjGQKwKl0Lk9VNz7o6JfPoU/mM/XhxqA==} + engines: {node: '>=v12.20.0'} + + czg@1.11.0: + resolution: {integrity: sha512-go39avnHPvDn1HF4LS1qxj5XPGCQexZ9+y8f+0VlE9plZgRyWUOl4rUCwE4vD1azouIhz/KaauB45A7jPfMxpw==} + engines: {node: '>=v12.20.0'} + hasBin: true + + dargs@7.0.0: + resolution: {integrity: sha512-2iy1EkLdlBzQGvbweYRFxmFath8+K7+AKB0TlhHWkNuH+TmovaMH/Wp7V7R4u7f4SnX3OgLsU9t1NI9ioDnUpg==} + engines: {node: '>=8'} + + dargs@8.1.0: + resolution: {integrity: sha512-wAV9QHOsNbwnWdNW2FYvE1P56wtgSbM+3SZcdGiWQILwVjACCXDCI3Ai8QlCjMDB8YK5zySiXZYBiwGmNY3lnw==} + engines: {node: '>=12'} + + data-view-buffer@1.0.2: + resolution: {integrity: sha512-EmKO5V3OLXh1rtK2wgXRansaK1/mtVdTUEiEI0W8RkvgT05kfxaH29PliLnpLP73yYO6142Q72QNa8Wx/A5CqQ==} + engines: {node: '>= 0.4'} + + data-view-byte-length@1.0.2: + resolution: {integrity: sha512-tuhGbE6CfTM9+5ANGf+oQb72Ky/0+s3xKUpHvShfiz2RxMFgFPjsXuRLBVMtvMs15awe45SRb83D6wH4ew6wlQ==} + engines: {node: '>= 0.4'} + + data-view-byte-offset@1.0.1: + resolution: {integrity: sha512-BS8PfmtDGnrgYdOonGZQdLZslWIeCGFP9tpan0hi1Co2Zr2NKADsvGYA8XxuG/4UWgJ6Cjtv+YJnB6MM69QGlQ==} + engines: {node: '>= 0.4'} + + dayjs@1.11.13: + resolution: {integrity: sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg==} + + de-indent@1.0.2: + resolution: {integrity: sha512-e/1zu3xH5MQryN2zdVaF0OrdNLUbvWxzMbi+iNA6Bky7l1RoP8a2fIbRocyHclXt/arDrrR6lL3TqFD9pMQTsg==} + + debug@2.6.9: + resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + + debug@3.2.7: + resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + + debug@4.3.4: + resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + + debug@4.4.0: + resolution: {integrity: sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + + decamelize-keys@1.1.1: + resolution: {integrity: sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg==} + engines: {node: '>=0.10.0'} + + decamelize@1.2.0: + resolution: {integrity: sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==} + engines: {node: '>=0.10.0'} + + decode-uri-component@0.2.2: + resolution: {integrity: sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==} + engines: {node: '>=0.10'} + + dedent@0.7.0: + resolution: {integrity: sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==} + + dedent@1.5.3: + resolution: {integrity: sha512-NHQtfOOW68WD8lgypbLA5oT+Bt0xXJhiYvoR6SmmNXZfpzOGXwdKWmcwG8N7PwVVWV3eF/68nmD9BaJSsTBhyQ==} + peerDependencies: + babel-plugin-macros: ^3.1.0 + peerDependenciesMeta: + babel-plugin-macros: + optional: true + + deep-is@0.1.4: + resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} + + deepmerge@4.3.1: + resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==} + engines: {node: '>=0.10.0'} + + defaults@1.0.4: + resolution: {integrity: sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==} + + define-data-property@1.1.4: + resolution: {integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==} + engines: {node: '>= 0.4'} + + define-lazy-prop@2.0.0: + resolution: {integrity: sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==} + engines: {node: '>=8'} + + define-properties@1.2.1: + resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==} + engines: {node: '>= 0.4'} + + define-property@0.2.5: + resolution: {integrity: sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==} + engines: {node: '>=0.10.0'} + + define-property@1.0.0: + resolution: {integrity: sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==} + engines: {node: '>=0.10.0'} + + define-property@2.0.2: + resolution: {integrity: sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==} + engines: {node: '>=0.10.0'} + + defu@6.1.4: + resolution: {integrity: sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==} + + delayed-stream@1.0.0: + resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==, tarball: https://registry.npmmirror.com/delayed-stream/-/delayed-stream-1.0.0.tgz} + engines: {node: '>=0.4.0'} + + delegate@3.2.0: + resolution: {integrity: sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw==} + + deprecation@2.3.1: + resolution: {integrity: sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==} + + destr@2.0.3: + resolution: {integrity: sha512-2N3BOUU4gYMpTP24s5rF5iP7BDr7uNTCs4ozw3kf/eKfvWSIu93GEBi5m427YoyJoeOzQ5smuu4nNAPGb8idSQ==} + + detect-file@1.0.0: + resolution: {integrity: sha512-DtCOLG98P007x7wiiOmfI0fi3eIKyWiLTGJ2MDnVi/E04lWGbf+JzrRHMm0rgIIZJGtHpKpbVgLWHrv8xXpc3Q==} + engines: {node: '>=0.10.0'} + + detect-indent@6.1.0: + resolution: {integrity: sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==} + engines: {node: '>=8'} + + detect-newline@3.1.0: + resolution: {integrity: sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==} + engines: {node: '>=8'} + + diff-match-patch@1.0.5: + resolution: {integrity: sha512-IayShXAgj/QMXgB0IWmKx+rOPuGMhqm5w6jvFxmVenXKIzRqTAAsbBPT3kWQeGANj3jGgvcvv4yK6SxqYmikgw==} + + diff-sequences@29.6.3: + resolution: {integrity: sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + diff@4.0.2: + resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==} + engines: {node: '>=0.3.1'} + + dijkstrajs@1.0.3: + resolution: {integrity: sha512-qiSlmBq9+BCdCA/L46dw8Uy93mloxsPSbwnm5yrKn2vMPiy8KyAskTF6zuV/j5BMsmOGZDPs7KjU+mjb670kfA==} + + dingtalk-jsapi@3.0.42: + resolution: {integrity: sha512-cIJ+3HUnSRVAanCip5yT1rEoLPrj97BxjYKpB33sgwUDStmfPgyEzG8Hux/Sq2zYJNH6riEA9PflsDnevr1f/g==} + + dir-glob@3.0.1: + resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} + engines: {node: '>=8'} + + doctrine@3.0.0: + resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} + engines: {node: '>=6.0.0'} + + dom-align@1.12.4: + resolution: {integrity: sha512-R8LUSEay/68zE5c8/3BDxiTEvgb4xZTF0RKmAHfiEVN3klfIpXfi2/QCoiWPccVQ0J/ZGdz9OjzL4uJEP/MRAw==} + + dom-scroll-into-view@2.0.1: + resolution: {integrity: sha512-bvVTQe1lfaUr1oFzZX80ce9KLDlZ3iU+XGNE/bz9HnGdklTieqsbmsLHe+rT2XWqopvL0PckkYqN7ksmm5pe3w==} + + dom-serializer@0.2.2: + resolution: {integrity: sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==} + + dom-serializer@1.4.1: + resolution: {integrity: sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag==} + + dom-serializer@2.0.0: + resolution: {integrity: sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==} + + dom-zindex@1.0.6: + resolution: {integrity: sha512-FKWIhiU96bi3xpP9ewRMgANsoVmMUBnMnmpCT6dPMZOunVYJQmJhSRruoI0XSPoHeIif3kyEuiHbFrOJwEJaEA==, tarball: https://registry.npmmirror.com/dom-zindex/-/dom-zindex-1.0.6.tgz} + + domelementtype@1.3.1: + resolution: {integrity: sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==} + + domelementtype@2.3.0: + resolution: {integrity: sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==} + + domhandler@2.4.2: + resolution: {integrity: sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==} + + domhandler@4.3.1: + resolution: {integrity: sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ==} + engines: {node: '>= 4'} + + domhandler@5.0.3: + resolution: {integrity: sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==} + engines: {node: '>= 4'} + + domutils@1.7.0: + resolution: {integrity: sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==} + + domutils@2.8.0: + resolution: {integrity: sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==} + + domutils@3.2.1: + resolution: {integrity: sha512-xWXmuRnN9OMP6ptPd2+H0cCbcYBULa5YDTbMm/2lvkWvNA3O4wcW+GvzooqBuNM8yy6pl3VIAeJTUUWUbfI5Fw==} + + dot-case@3.0.4: + resolution: {integrity: sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==} + + dot-prop@5.3.0: + resolution: {integrity: sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==} + engines: {node: '>=8'} + + dotenv-expand@8.0.3: + resolution: {integrity: sha512-SErOMvge0ZUyWd5B0NXMQlDkN+8r+HhVUsxgOO7IoPDOdDRD2JjExpN6y3KnFR66jsJMwSn1pqIivhU5rcJiNg==} + engines: {node: '>=12'} + + dotenv@16.4.7: + resolution: {integrity: sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==} + engines: {node: '>=12'} + + dunder-proto@1.0.1: + resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==} + engines: {node: '>= 0.4'} + + duplexer@0.1.2: + resolution: {integrity: sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==} + + eastasianwidth@0.2.0: + resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} + + echarts@5.6.0: + resolution: {integrity: sha512-oTbVTsXfKuEhxftHqL5xprgLoc0k7uScAwtryCgWF6hPYFLRwOUHiFmHGCBKP5NPFNkDVopOieyUqYGH8Fa3kA==} + + editorconfig@1.0.4: + resolution: {integrity: sha512-L9Qe08KWTlqYMVvMcTIvMAdl1cDUubzRNYL+WfA4bLDMHe4nemKkpmYzkznE1FwLKu0EEmy6obgQKzMJrg4x9Q==} + engines: {node: '>=14'} + hasBin: true + + ee-first@1.1.1: + resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} + + ejs@3.1.10: + resolution: {integrity: sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==} + engines: {node: '>=0.10.0'} + hasBin: true + + electron-to-chromium@1.5.76: + resolution: {integrity: sha512-CjVQyG7n7Sr+eBXE86HIulnL5N8xZY1sgmOPGuq/F0Rr0FJq63lg0kEtOIDfZBk44FnDLf6FUJ+dsJcuiUDdDQ==} + + emittery@0.13.1: + resolution: {integrity: sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==} + engines: {node: '>=12'} + + emoji-mart-vue-fast@15.0.3: + resolution: {integrity: sha512-PBCzUb2iSLIF8LBHvp63vB3EWhrpGs0fg2JcHnHVKVNFOQeahkbU2NpkCtwFFa/Ed3ODKGUG9mcTzws4owxj4w==} + peerDependencies: + vue: '>2.0.0' + + 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==} + + emojis-list@3.0.0: + resolution: {integrity: sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==} + engines: {node: '>= 4'} + + encodeurl@1.0.2: + resolution: {integrity: sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==} + engines: {node: '>= 0.8'} + + encoding-sniffer@0.2.0: + resolution: {integrity: sha512-ju7Wq1kg04I3HtiYIOrUrdfdDvkyO9s5XM8QAj/bN61Yo/Vb4vgJxy5vi4Yxk01gWHbrofpPtpxM8bKger9jhg==} + + enquire.js@2.1.6: + resolution: {integrity: sha512-/KujNpO+PT63F7Hlpu4h3pE3TokKRHN26JYmQpPyjkRD/N57R7bPDNojMXdi7uveAKjYB7yQnartCxZnFWr0Xw==} + + entities@1.1.2: + resolution: {integrity: sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==} + + entities@2.2.0: + resolution: {integrity: sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==} + + entities@4.5.0: + resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} + 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'} + + errno@0.1.8: + resolution: {integrity: sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==} + hasBin: true + + error-ex@1.3.2: + resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} + + es-abstract@1.23.9: + resolution: {integrity: sha512-py07lI0wjxAC/DcfK1S6G7iANonniZwTISvdPzk9hzeH0IZIshbuuFxLIU96OyF89Yb9hiqWn8M/bY83KY5vzA==} + engines: {node: '>= 0.4'} + + 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-object-atoms@1.0.0: + resolution: {integrity: sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==} + engines: {node: '>= 0.4'} + + es-set-tostringtag@2.1.0: + resolution: {integrity: sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==} + engines: {node: '>= 0.4'} + + es-to-primitive@1.3.0: + resolution: {integrity: sha512-w+5mJ3GuFL+NjVtJlvydShqE1eN3h3PbI7/5LAsYJP/2qtuMXjfL2LpHSRqo4b4eSF5K/DH1JXKUAHSB2UW50g==} + engines: {node: '>= 0.4'} + + esbuild-android-64@0.14.54: + resolution: {integrity: sha512-Tz2++Aqqz0rJ7kYBfz+iqyE3QMycD4vk7LBRyWaAVFgFtQ/O8EJOnVmTOiDWYZ/uYzB4kvP+bqejYdVKzE5lAQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + + esbuild-android-arm64@0.14.54: + resolution: {integrity: sha512-F9E+/QDi9sSkLaClO8SOV6etqPd+5DgJje1F9lOWoNncDdOBL2YF59IhsWATSt0TLZbYCf3pNlTHvVV5VfHdvg==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + + esbuild-darwin-64@0.14.54: + resolution: {integrity: sha512-jtdKWV3nBviOd5v4hOpkVmpxsBy90CGzebpbO9beiqUYVMBtSc0AL9zGftFuBon7PNDcdvNCEuQqw2x0wP9yug==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + + esbuild-darwin-arm64@0.14.54: + resolution: {integrity: sha512-OPafJHD2oUPyvJMrsCvDGkRrVCar5aVyHfWGQzY1dWnzErjrDuSETxwA2HSsyg2jORLY8yBfzc1MIpUkXlctmw==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + + esbuild-freebsd-64@0.14.54: + resolution: {integrity: sha512-OKwd4gmwHqOTp4mOGZKe/XUlbDJ4Q9TjX0hMPIDBUWWu/kwhBAudJdBoxnjNf9ocIB6GN6CPowYpR/hRCbSYAg==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + + esbuild-freebsd-arm64@0.14.54: + resolution: {integrity: sha512-sFwueGr7OvIFiQT6WeG0jRLjkjdqWWSrfbVwZp8iMP+8UHEHRBvlaxL6IuKNDwAozNUmbb8nIMXa7oAOARGs1Q==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + + esbuild-linux-32@0.14.54: + resolution: {integrity: sha512-1ZuY+JDI//WmklKlBgJnglpUL1owm2OX+8E1syCD6UAxcMM/XoWd76OHSjl/0MR0LisSAXDqgjT3uJqT67O3qw==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + + esbuild-linux-64@0.14.54: + resolution: {integrity: sha512-EgjAgH5HwTbtNsTqQOXWApBaPVdDn7XcK+/PtJwZLT1UmpLoznPd8c5CxqsH2dQK3j05YsB3L17T8vE7cp4cCg==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + + esbuild-linux-arm64@0.14.54: + resolution: {integrity: sha512-WL71L+0Rwv+Gv/HTmxTEmpv0UgmxYa5ftZILVi2QmZBgX3q7+tDeOQNqGtdXSdsL8TQi1vIaVFHUPDe0O0kdig==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + + esbuild-linux-arm@0.14.54: + resolution: {integrity: sha512-qqz/SjemQhVMTnvcLGoLOdFpCYbz4v4fUo+TfsWG+1aOu70/80RV6bgNpR2JCrppV2moUQkww+6bWxXRL9YMGw==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + + esbuild-linux-mips64le@0.14.54: + resolution: {integrity: sha512-qTHGQB8D1etd0u1+sB6p0ikLKRVuCWhYQhAHRPkO+OF3I/iSlTKNNS0Lh2Oc0g0UFGguaFZZiPJdJey3AGpAlw==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + + esbuild-linux-ppc64le@0.14.54: + resolution: {integrity: sha512-j3OMlzHiqwZBDPRCDFKcx595XVfOfOnv68Ax3U4UKZ3MTYQB5Yz3X1mn5GnodEVYzhtZgxEBidLWeIs8FDSfrQ==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + + esbuild-linux-riscv64@0.14.54: + resolution: {integrity: sha512-y7Vt7Wl9dkOGZjxQZnDAqqn+XOqFD7IMWiewY5SPlNlzMX39ocPQlOaoxvT4FllA5viyV26/QzHtvTjVNOxHZg==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + + esbuild-linux-s390x@0.14.54: + resolution: {integrity: sha512-zaHpW9dziAsi7lRcyV4r8dhfG1qBidQWUXweUjnw+lliChJqQr+6XD71K41oEIC3Mx1KStovEmlzm+MkGZHnHA==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + + esbuild-netbsd-64@0.14.54: + resolution: {integrity: sha512-PR01lmIMnfJTgeU9VJTDY9ZerDWVFIUzAtJuDHwwceppW7cQWjBBqP48NdeRtoP04/AtO9a7w3viI+PIDr6d+w==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + + esbuild-openbsd-64@0.14.54: + resolution: {integrity: sha512-Qyk7ikT2o7Wu76UsvvDS5q0amJvmRzDyVlL0qf5VLsLchjCa1+IAvd8kTBgUxD7VBUUVgItLkk609ZHUc1oCaw==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + + esbuild-plugin-alias@0.1.2: + resolution: {integrity: sha512-WsX0OJy8IGOsGZV+4oHEU5B6XQUpxOsZN1iSoYf9COTDbY7WXcOwd1oCLYNWUIWCExyGXSghIGq2k7sXBldxwQ==} + + esbuild-sunos-64@0.14.54: + resolution: {integrity: sha512-28GZ24KmMSeKi5ueWzMcco6EBHStL3B6ubM7M51RmPwXQGLe0teBGJocmWhgwccA1GeFXqxzILIxXpHbl9Q/Kw==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + + esbuild-windows-32@0.14.54: + resolution: {integrity: sha512-T+rdZW19ql9MjS7pixmZYVObd9G7kcaZo+sETqNH4RCkuuYSuv9AGHUVnPoP9hhuE1WM1ZimHz1CIBHBboLU7w==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + + esbuild-windows-64@0.14.54: + resolution: {integrity: sha512-AoHTRBUuYwXtZhjXZbA1pGfTo8cJo3vZIcWGLiUcTNgHpJJMC1rVA44ZereBHMJtotyN71S8Qw0npiCIkW96cQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + + esbuild-windows-arm64@0.14.54: + resolution: {integrity: sha512-M0kuUvXhot1zOISQGXwWn6YtS+Y/1RT9WrVIOywZnJHo3jCDyewAc79aKNQWFCQm+xNHVTq9h8dZKvygoXQQRg==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + + esbuild@0.11.23: + resolution: {integrity: sha512-iaiZZ9vUF5wJV8ob1tl+5aJTrwDczlvGP0JoMmnpC2B0ppiMCu8n8gmy5ZTGl5bcG081XBVn+U+jP+mPFm5T5Q==} + hasBin: true + + esbuild@0.14.54: + resolution: {integrity: sha512-Cy9llcy8DvET5uznocPyqL3BFRrFXSVqbgpMJ9Wz8oVjZlh/zUSNbPRbov0VX7VxN2JH1Oa0uNxZ7eLRb62pJA==} + engines: {node: '>=12'} + hasBin: true + + esbuild@0.23.1: + resolution: {integrity: sha512-VVNz/9Sa0bs5SELtn3f7qhJCDPCF5oMEl5cO9/SSinpE9hbPVvxbd572HH5AKiP7WD8INO53GgfDDhRjkylHEg==} + engines: {node: '>=18'} + hasBin: true + + esbuild@0.24.2: + resolution: {integrity: sha512-+9egpBW8I3CD5XPe0n6BfT5fxLzxrlDzqydF3aviG+9ni1lDC/OvMHcxqEFV0+LANZG5R1bFMWfUrjVsdwxJvA==} + engines: {node: '>=18'} + hasBin: true + + escalade@3.2.0: + resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} + engines: {node: '>=6'} + + escape-html@1.0.3: + resolution: {integrity: sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==} + + escape-string-regexp@1.0.5: + resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} + engines: {node: '>=0.8.0'} + + escape-string-regexp@2.0.0: + resolution: {integrity: sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==} + engines: {node: '>=8'} + + escape-string-regexp@4.0.0: + resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} + engines: {node: '>=10'} + + 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'} + + eslint-plugin-jest@27.9.0: + resolution: {integrity: sha512-QIT7FH7fNmd9n4se7FFKHbsLKGQiw885Ds6Y/sxKgCZ6natwCsXdgPOADnYVxN2QrRweF0FZWbJ6S7Rsn7llug==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + peerDependencies: + '@typescript-eslint/eslint-plugin': ^5.0.0 || ^6.0.0 || ^7.0.0 + eslint: ^7.0.0 || ^8.0.0 + jest: '*' + peerDependenciesMeta: + '@typescript-eslint/eslint-plugin': + optional: true + jest: + optional: true + + eslint-plugin-prettier@5.2.1: + resolution: {integrity: sha512-gH3iR3g4JfF+yYPaJYkN7jEl9QbweL/YfkoRlNnuIEHEz1vHVlCmWOS+eGGiRuzHQXdJFCOTxRgvju9b8VUmrw==} + engines: {node: ^14.18.0 || >=16.0.0} + peerDependencies: + '@types/eslint': '>=8.0.0' + eslint: '>=8.0.0' + eslint-config-prettier: '*' + prettier: '>=3.0.0' + peerDependenciesMeta: + '@types/eslint': + optional: true + eslint-config-prettier: + optional: true + + eslint-plugin-vue@9.32.0: + resolution: {integrity: sha512-b/Y05HYmnB/32wqVcjxjHZzNpwxj1onBOvqW89W+V+XNG1dRuaFbNd3vT9CLbr2LXjEoq+3vn8DanWf7XU22Ug==} + engines: {node: ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.2.0 || ^7.0.0 || ^8.0.0 || ^9.0.0 + + eslint-scope@5.1.1: + resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==} + engines: {node: '>=8.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@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 + + esno@4.8.0: + resolution: {integrity: sha512-acMtooReAQGzLU0zcuEDHa8S62meh5aIyi8jboYxyvAePdmuWx2Mpwmt0xjwO0bs9/SXf+dvXJ0QJoDWw814Iw==} + hasBin: true + + espree@9.6.1: + resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + + esprima@4.0.1: + resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} + engines: {node: '>=4'} + hasBin: true + + 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@4.3.0: + resolution: {integrity: sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==} + 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==} + + esutils@2.0.3: + resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} + engines: {node: '>=0.10.0'} + + etag@1.8.1: + resolution: {integrity: sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==} + engines: {node: '>= 0.6'} + + event-source-polyfill@1.0.31: + resolution: {integrity: sha512-4IJSItgS/41IxN5UVAVuAyczwZF7ZIEsM1XAoUzIHA6A+xzusEZUutdXz2Nr+MQPLxfTiCvqE79/C8HT8fKFvA==} + + eventemitter3@4.0.7: + resolution: {integrity: sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==} + + eventemitter3@5.0.1: + resolution: {integrity: sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==} + + execa@5.1.1: + resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==} + engines: {node: '>=10'} + + execa@8.0.1: + resolution: {integrity: sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==} + engines: {node: '>=16.17'} + + exit@0.1.2: + resolution: {integrity: sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==} + engines: {node: '>= 0.8.0'} + + expand-brackets@2.1.4: + resolution: {integrity: sha512-w/ozOKR9Obk3qoWeY/WDi6MFta9AoMR+zud60mdnbniMcBxRuFJyDt2LdX/14A1UABeqk+Uk+LDfUpvoGKppZA==} + engines: {node: '>=0.10.0'} + + expand-tilde@2.0.2: + resolution: {integrity: sha512-A5EmesHW6rfnZ9ysHQjPdJRni0SRar0tjtG5MNtm9n5TUvsYU8oozprtRD4AqHxcZWWlVuAmQo2nWKfN9oyjTw==} + engines: {node: '>=0.10.0'} + + expect@29.7.0: + resolution: {integrity: sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + extend-shallow@2.0.1: + resolution: {integrity: sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==} + engines: {node: '>=0.10.0'} + + extend-shallow@3.0.2: + resolution: {integrity: sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==} + engines: {node: '>=0.10.0'} + + external-editor@3.1.0: + resolution: {integrity: sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==} + engines: {node: '>=4'} + + extglob@2.0.4: + resolution: {integrity: sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==} + engines: {node: '>=0.10.0'} + + 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.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.0.5: + resolution: {integrity: sha512-5JnBCWpFlMo0a3ciDy/JckMzzv1U9coZrIhedq+HXxxUfDTAiS0LA8OKVao4G9BxmCVck/jtA5r3KAtRWEyD8Q==} + + fastest-levenshtein@1.0.16: + resolution: {integrity: sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==} + engines: {node: '>= 4.9.1'} + + fastq@1.18.0: + resolution: {integrity: sha512-QKHXPW0hD8g4UET03SdOdunzSouc9N4AuHdsX8XNcTsuz+yYFILVNIX4l9yHABMhiEI9Db0JTTIpu0wB+Y1QQw==} + + fb-watchman@2.0.2: + resolution: {integrity: sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==} + + figures@3.2.0: + resolution: {integrity: sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==} + engines: {node: '>=8'} + + file-entry-cache@6.0.1: + resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} + engines: {node: ^10.12.0 || >=12.0.0} + + file-entry-cache@9.1.0: + resolution: {integrity: sha512-/pqPFG+FdxWQj+/WSuzXSDaNzxgTLr/OrR1QuqfEZzDakpdYE70PwUxL7BPUa8hpjbvY1+qvCl8k+8Tq34xJgg==} + engines: {node: '>=18'} + + filelist@1.0.4: + resolution: {integrity: sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==} + + fill-range@4.0.0: + resolution: {integrity: sha512-VcpLTWqWDiTerugjj8e3+esbg+skS3M9e54UuR3iCeIDMXCLTsAH8hTSzDQU/X6/6t3eYkOKoZSef2PlU6U1XQ==} + engines: {node: '>=0.10.0'} + + fill-range@7.1.1: + resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} + engines: {node: '>=8'} + + finalhandler@1.1.2: + resolution: {integrity: sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==} + engines: {node: '>= 0.8'} + + find-node-modules@2.1.3: + resolution: {integrity: sha512-UC2I2+nx1ZuOBclWVNdcnbDR5dlrOdVb7xNjmT/lHE+LsgztWks3dG7boJ37yTS/venXw84B/mAW9uHVoC5QRg==} + + find-root@1.1.0: + resolution: {integrity: sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==} + + 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@6.3.0: + resolution: {integrity: sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + + findup-sync@4.0.0: + resolution: {integrity: sha512-6jvvn/12IC4quLBL1KNokxC7wWTvYncaVUYSoxWw7YykPLuRrnv4qdHcSOywOI5RpkOVGeQRtWM8/q+G6W6qfQ==} + engines: {node: '>= 8'} + + flat-cache@3.2.0: + resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} + engines: {node: ^10.12.0 || >=12.0.0} + + flat-cache@5.0.0: + resolution: {integrity: sha512-JrqFmyUl2PnPi1OvLyTVHnQvwQ0S+e6lGSwu8OkAZlSaNIZciTY2H/cOOROxsBA1m/LZNHDsqAgDZt6akWcjsQ==} + engines: {node: '>=18'} + + flatted@3.3.2: + resolution: {integrity: sha512-AiwGJM8YcNOaobumgtng+6NHuOqC3A7MixFeDafM3X9cIUM+xUXoS5Vfgf+OihAYe20fxqNM9yPBXJzRtZ/4eA==} + + follow-redirects@1.15.9: + resolution: {integrity: sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==, tarball: https://registry.npmmirror.com/follow-redirects/-/follow-redirects-1.15.9.tgz} + engines: {node: '>=4.0'} + peerDependencies: + debug: '*' + peerDependenciesMeta: + debug: + optional: true + + for-each@0.3.3: + resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} + + for-in@1.0.2: + resolution: {integrity: sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==} + engines: {node: '>=0.10.0'} + + foreground-child@3.3.0: + resolution: {integrity: sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==} + engines: {node: '>=14'} + + form-data@4.0.1: + resolution: {integrity: sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==, tarball: https://registry.npmmirror.com/form-data/-/form-data-4.0.1.tgz} + engines: {node: '>= 6'} + + fraction.js@4.3.7: + resolution: {integrity: sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==} + + fragment-cache@0.2.1: + resolution: {integrity: sha512-GMBAbW9antB8iZRHLoGw0b3HANt57diZYFO/HL1JGIC1MjKrdmhxvrJbupnVvpys0zsz7yBApXdQyfepKly2kA==} + engines: {node: '>=0.10.0'} + + fs-extra@10.1.0: + resolution: {integrity: sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==} + engines: {node: '>=12'} + + fs-extra@11.2.0: + resolution: {integrity: sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==} + engines: {node: '>=14.14'} + + fs-extra@9.1.0: + resolution: {integrity: sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==} + engines: {node: '>=10'} + + 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==} + + function.prototype.name@1.1.8: + resolution: {integrity: sha512-e5iwyodOHhbMr/yNrc7fDYG4qlbIvI5gajyzPnb5TCwyhjApznQh1BMFou9b30SevY43gCJKXycoCBjMbsuW0Q==} + engines: {node: '>= 0.4'} + + functions-have-names@1.2.3: + resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} + + 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.2.7: + resolution: {integrity: sha512-VW6Pxhsrk0KAOqs3WEd0klDiF/+V7gQOpAvY1jVU/LHmaD/kQO4523aiJuikX/QAKYiW6x8Jh+RJej1almdtCA==} + engines: {node: '>= 0.4'} + + get-package-type@0.1.0: + resolution: {integrity: sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==} + engines: {node: '>=8.0.0'} + + get-proto@1.0.1: + resolution: {integrity: sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==} + engines: {node: '>= 0.4'} + + get-stream@6.0.1: + resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} + engines: {node: '>=10'} + + get-stream@8.0.1: + resolution: {integrity: sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==} + engines: {node: '>=16'} + + get-symbol-description@1.1.0: + resolution: {integrity: sha512-w9UMqWwJxHNOvoNzSJ2oPF5wvYcvP7jUvYzhp67yEhTi17ZDBBC1z9pTdGuzjD+EFIqLSYRweZjqfiPzQ06Ebg==} + engines: {node: '>= 0.4'} + + get-tsconfig@4.8.1: + resolution: {integrity: sha512-k9PN+cFBmaLWtVz29SkUoqU5O0slLuHJXt/2P+tMVFT+phsSGXGkp9t3rQIqdz0e+06EHNGs3oM6ZX1s2zHxRg==} + + get-value@2.0.6: + resolution: {integrity: sha512-Ln0UQDlxH1BapMu3GPtf7CuYNwRZf2gwCuPqbyG6pB8WfmFpzqcy4xtAaAMUhnNqjMKTiCPZG2oMT3YSx8U2NA==} + engines: {node: '>=0.10.0'} + + git-raw-commits@2.0.11: + resolution: {integrity: sha512-VnctFhw+xfj8Va1xtfEqCUD2XDrbAPSJx+hSrE5K7fGdjZruW7XV+QOrN7LF/RJyvspRiD2I0asWsxFp0ya26A==} + engines: {node: '>=10'} + hasBin: true + + git-raw-commits@4.0.0: + resolution: {integrity: sha512-ICsMM1Wk8xSGMowkOmPrzo2Fgmfo4bMHLNX6ytHjajRJUqvHOw/TFapQ+QG75c3X/tTDDhOSRPGC52dDbNM8FQ==} + engines: {node: '>=16'} + hasBin: true + + git-semver-tags@7.0.1: + resolution: {integrity: sha512-NY0ZHjJzyyNXHTDZmj+GG7PyuAKtMsyWSwh07CR2hOZFa+/yoTsXci/nF2obzL8UDhakFNkD9gNdt/Ed+cxh2Q==} + 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.4.5: + resolution: {integrity: sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==} + hasBin: true + + glob@7.2.3: + resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} + deprecated: Glob versions prior to v9 are no longer supported + + global-directory@4.0.1: + resolution: {integrity: sha512-wHTUcDUoZ1H5/0iVqEudYW4/kAlN5cZ3j/bXn0Dpbizl9iaUVeWSHqiOjsgk6OW2bkLclbBjzewBz6weQ1zA2Q==} + engines: {node: '>=18'} + + global-dirs@0.1.1: + resolution: {integrity: sha512-NknMLn7F2J7aflwFOlGdNIuCDpN3VGoSoB+aap3KABFWbHVn1TCgFC+np23J8W2BiZbjfEw3BFBycSMv1AFblg==} + engines: {node: '>=4'} + + global-modules@1.0.0: + resolution: {integrity: sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==} + engines: {node: '>=0.10.0'} + + global-modules@2.0.0: + resolution: {integrity: sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A==} + engines: {node: '>=6'} + + global-prefix@1.0.2: + resolution: {integrity: sha512-5lsx1NUDHtSjfg0eHlmYvZKv8/nVqX4ckFbM+FrGcQ+04KWcWFo9P5MxPZYSzUvyzmdTbI7Eix8Q4IbELDqzKg==} + engines: {node: '>=0.10.0'} + + global-prefix@3.0.0: + resolution: {integrity: sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==} + engines: {node: '>=6'} + + globals@11.12.0: + resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} + engines: {node: '>=4'} + + globals@13.24.0: + resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==} + engines: {node: '>=8'} + + globals@15.14.0: + resolution: {integrity: sha512-OkToC372DtlQeje9/zHIo5CT8lRP/FUgEOKBEhU4e0abL7J7CD24fD9ohiLN5hagG/kWCYj4K5oaxxtj2Z0Dig==} + engines: {node: '>=18'} + + globalthis@1.0.4: + resolution: {integrity: sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==} + engines: {node: '>= 0.4'} + + globby@11.1.0: + resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} + engines: {node: '>=10'} + + globjoin@0.1.4: + resolution: {integrity: sha512-xYfnw62CKG8nLkZBfWbhWwDw02CHty86jfPcc2cr3ZfeuK9ysoVPPEUxf21bAD/rWAgk52SuBrLJlefNy8mvFg==} + + good-listener@1.2.2: + resolution: {integrity: sha512-goW1b+d9q/HIwbVYZzZ6SsTr4IgE+WA44A0GmPIQstuOrgsFcT7VEJ48nmr9GaRtNu0XTKacFLGnBPAM6Afouw==} + + 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==} + + gzip-size@6.0.0: + resolution: {integrity: sha512-ax7ZYomf6jqPTQ4+XCpUGyXKHk5WweS+e05MBO4/y3WJ5RkmPXNKvX+bx1behVILVwr6JSQvZAku021CHPXG3Q==} + engines: {node: '>=10'} + + handlebars@4.7.8: + resolution: {integrity: sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==} + engines: {node: '>=0.4.7'} + hasBin: true + + hard-rejection@2.1.0: + resolution: {integrity: sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==} + engines: {node: '>=6'} + + has-ansi@2.0.0: + resolution: {integrity: sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg==} + engines: {node: '>=0.10.0'} + + has-bigints@1.1.0: + resolution: {integrity: sha512-R3pbpkcIqv2Pm3dUwgjclDRVmWpTJW2DcMzcIhEXEx1oh/CEMObMm3KLmRJOdvhM7o4uQBnwr8pzRK2sJWIqfg==} + engines: {node: '>= 0.4'} + + has-flag@1.0.0: + resolution: {integrity: sha512-DyYHfIYwAJmjAjSSPKANxI8bFY9YtFrgkAfinBojQ8YJTOuOuav64tMUJv584SES4xl74PmuaevIyaLESHdTAA==} + engines: {node: '>=0.10.0'} + + has-flag@3.0.0: + resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} + engines: {node: '>=4'} + + has-flag@4.0.0: + resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} + engines: {node: '>=8'} + + has-property-descriptors@1.0.2: + resolution: {integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==} + + has-proto@1.2.0: + resolution: {integrity: sha512-KIL7eQPfHQRC8+XluaIw7BHUwwqL19bQn4hzNgdr+1wXoU0KKj6rufu47lhY7KbJR2C6T6+PfyN0Ea7wkSS+qQ==} + 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'} + + has-value@0.3.1: + resolution: {integrity: sha512-gpG936j8/MzaeID5Yif+577c17TxaDmhuyVgSwtnL/q8UUTySg8Mecb+8Cf1otgLoD7DDH75axp86ER7LFsf3Q==} + engines: {node: '>=0.10.0'} + + has-value@1.0.0: + resolution: {integrity: sha512-IBXk4GTsLYdQ7Rvt+GRBrFSVEkmuOUy4re0Xjd9kJSUQpnTrWR4/y9RpfexN9vkAPMFuQoeWKwqzPozRTlasGw==} + engines: {node: '>=0.10.0'} + + has-values@0.1.4: + resolution: {integrity: sha512-J8S0cEdWuQbqD9//tlZxiMuMNmxB8PlEwvYwuxsTmR1G5RXUePEX/SJn7aD0GMLieuZYSwNH0cQuJGwnYunXRQ==} + engines: {node: '>=0.10.0'} + + has-values@1.0.0: + resolution: {integrity: sha512-ODYZC64uqzmtfGMEAX/FvZiRyWLpAC3vYnNunURUnkGVTS+mI0smVsWaPydRBsE3g+ok7h960jChO8mFcWlHaQ==} + engines: {node: '>=0.10.0'} + + hasown@2.0.2: + resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} + engines: {node: '>= 0.4'} + + he@1.2.0: + resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==} + hasBin: true + + highlight.js@11.11.1: + resolution: {integrity: sha512-Xwwo44whKBVCYoliBQwaPvtd/2tYFkRQtXDWj1nackaV2JPXx3L0+Jvd8/qCJ2p+ML0/XVkJ2q+Mr+UVdpJK5w==} + engines: {node: '>=12.0.0'} + + hoist-non-react-statics@2.5.5: + resolution: {integrity: sha512-rqcy4pJo55FTTLWt+bU8ukscqHeE/e9KWvsOW2b/a3afxQZhwkQdT1rPPCJ0rYXdj4vNcasY8zHTH+jF/qStxw==, tarball: https://registry.npmmirror.com/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz} + + homedir-polyfill@1.0.3: + resolution: {integrity: sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==} + engines: {node: '>=0.10.0'} + + hosted-git-info@2.8.9: + resolution: {integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==} + + hosted-git-info@4.1.0: + resolution: {integrity: sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==} + engines: {node: '>=10'} + + hosted-git-info@7.0.2: + resolution: {integrity: sha512-puUZAUKT5m8Zzvs72XWy3HtvVbTWljRE66cP60bxJzAqf2DgICo7lYTY2IHUmLnNpjYvw5bvmoHvPc0QO2a62w==} + engines: {node: ^16.14.0 || >=18.0.0} + + html-encoding-sniffer@3.0.0: + resolution: {integrity: sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA==} + engines: {node: '>=12'} + + html-escaper@2.0.2: + resolution: {integrity: sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==} + + html-minifier-terser@6.1.0: + resolution: {integrity: sha512-YXxSlJBZTP7RS3tWnQw74ooKa6L9b9i9QYXY21eUEvhZ3u9XLfv6OnFsQq6RxkhHygsaUMvYsZRV5rU/OVNZxw==} + engines: {node: '>=12'} + hasBin: true + + html-tags@3.3.1: + resolution: {integrity: sha512-ztqyC3kLto0e9WbNp0aeP+M3kTt+nbaIveGmUxAtZa+8iFgKLUOD4YKM5j+f3QD89bra7UeumolZHKuOXnTmeQ==} + engines: {node: '>=8'} + + htmlparser2@3.10.1: + resolution: {integrity: sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ==} + + htmlparser2@8.0.2: + resolution: {integrity: sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA==} + + htmlparser2@9.1.0: + resolution: {integrity: sha512-5zfg6mHUoaer/97TxnGpxmbR7zJtPwIYFMZ/H5ucTlPZhKvtum05yiPK3Mgai3a0DyVxv7qYqoweaEd2nrYQzQ==} + + http-proxy@1.18.1: + resolution: {integrity: sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==} + engines: {node: '>=8.0.0'} + + http-server@14.1.1: + resolution: {integrity: sha512-+cbxadF40UXd9T01zUHgA+rlo2Bg1Srer4+B4NwIHdaGxAGGv59nYRnGGDJ9LBk7alpS0US+J+bLLdQOOkJq4A==} + engines: {node: '>=12'} + hasBin: true + + human-signals@2.1.0: + resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} + engines: {node: '>=10.17.0'} + + human-signals@5.0.0: + resolution: {integrity: sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==} + engines: {node: '>=16.17.0'} + + husky@8.0.3: + resolution: {integrity: sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg==} + engines: {node: '>=14'} + hasBin: true + + iconv-lite@0.4.24: + resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} + engines: {node: '>=0.10.0'} + + iconv-lite@0.6.3: + resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==} + engines: {node: '>=0.10.0'} + + ieee754@1.2.1: + resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} + + ignore@5.3.2: + resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} + engines: {node: '>= 4'} + + ignore@6.0.2: + resolution: {integrity: sha512-InwqeHHN2XpumIkMvpl/DCJVrAHgCsG5+cn1XlnLWGwtZBm8QJfSusItfrwx81CTp5agNZqpKU2J/ccC5nGT4A==} + engines: {node: '>= 4'} + + image-size@0.5.5: + resolution: {integrity: sha512-6TDAlDPZxUFCv+fuOkIoXT/V/f3Qbq8e37p+YOiYrUv3v9cc3/6x78VdfPgFVaB9dZYeLUfKgHRebpkm/oP2VQ==} + engines: {node: '>=0.10.0'} + hasBin: true + + import-fresh@3.3.0: + resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} + engines: {node: '>=6'} + + import-local@3.2.0: + resolution: {integrity: sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==} + engines: {node: '>=8'} + hasBin: true + + import-meta-resolve@4.1.0: + resolution: {integrity: sha512-I6fiaX09Xivtk+THaMfAwnA3MVA5Big1WHF1Dfx9hFuvNIWpXnorlkzhcQf6ehrqQiiZECRt1poOAkPmer3ruw==} + + 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'} + + 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@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} + + inquirer@8.2.5: + resolution: {integrity: sha512-QAgPDQMEgrDssk1XiwwHoOGYF9BAbUcc1+j+FhEvaOt8/cKRqyLn0U5qA6F74fGhTMGxf92pOvPBeh29jQJDTQ==} + engines: {node: '>=12.0.0'} + + inquirer@9.3.7: + resolution: {integrity: sha512-LJKFHCSeIRq9hanN14IlOtPSTe3lNES7TYDTE2xxdAy1LS5rYphajK1qtwvj3YmQXvvk0U2Vbmcni8P9EIQW9w==} + engines: {node: '>=18'} + + internal-slot@1.1.0: + resolution: {integrity: sha512-4gd7VpWNQNB4UKKCFFVcp1AVv+FMOgs9NKzjHKusc8jTMhd5eL1NqQqOpE0KzMds804/yHlglp3uxgluOqAPLw==} + engines: {node: '>= 0.4'} + + intro.js@7.2.0: + resolution: {integrity: sha512-qbMfaB70rOXVBceIWNYnYTpVTiZsvQh/MIkfdQbpA9di9VBfj1GigUPfcCv3aOfsbrtPcri8vTLTA4FcEDcHSQ==} + + is-accessor-descriptor@1.0.1: + resolution: {integrity: sha512-YBUanLI8Yoihw923YeFUS5fs0fF2f5TSFTNiYAAzhhDscDa3lEqYuz1pDOEP5KvX94I9ey3vsqjJcLVFVU+3QA==} + engines: {node: '>= 0.10'} + + is-array-buffer@3.0.5: + resolution: {integrity: sha512-DDfANUiiG2wC1qawP66qlTugJeL5HyzMpfr8lLK+jMQirGzNod0B12cFB/9q838Ru27sBwfw78/rdoU7RERz6A==} + engines: {node: '>= 0.4'} + + is-arrayish@0.2.1: + resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} + + is-async-function@2.1.0: + resolution: {integrity: sha512-GExz9MtyhlZyXYLxzlJRj5WUCE661zhDa1Yna52CN57AJsymh+DvXXjyveSioqSRdxvUrdKdvqB1b5cVKsNpWQ==} + engines: {node: '>= 0.4'} + + is-bigint@1.1.0: + resolution: {integrity: sha512-n4ZT37wG78iz03xPRKJrHTdZbe3IicyucEtdRsV5yglwc3GyUfbAfpSeD0FJ41NbUNSt5wbhqfp1fS+BgnvDFQ==} + engines: {node: '>= 0.4'} + + is-binary-path@2.1.0: + resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} + engines: {node: '>=8'} + + is-boolean-object@1.2.1: + resolution: {integrity: sha512-l9qO6eFlUETHtuihLcYOaLKByJ1f+N4kthcU9YjHy3N+B3hWv0y/2Nd0mu/7lTFnRQHTrSdXF50HQ3bl5fEnng==} + engines: {node: '>= 0.4'} + + is-buffer@1.1.6: + resolution: {integrity: sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==} + + is-callable@1.2.7: + resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} + engines: {node: '>= 0.4'} + + is-ci@3.0.1: + resolution: {integrity: sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==} + hasBin: true + + is-core-module@2.16.1: + resolution: {integrity: sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==} + engines: {node: '>= 0.4'} + + is-data-descriptor@1.0.1: + resolution: {integrity: sha512-bc4NlCDiCr28U4aEsQ3Qs2491gVq4V8G7MQyws968ImqjKuYtTJXrl7Vq7jsN7Ly/C3xj5KWFrY7sHNeDkAzXw==} + engines: {node: '>= 0.4'} + + is-data-view@1.0.2: + resolution: {integrity: sha512-RKtWF8pGmS87i2D6gqQu/l7EYRlVdfzemCJN/P3UOs//x1QE7mfhvzHIApBTRf7axvT6DMGwSwBXYCT0nfB9xw==} + engines: {node: '>= 0.4'} + + is-date-object@1.1.0: + resolution: {integrity: sha512-PwwhEakHVKTdRNVOw+/Gyh0+MzlCl4R6qKvkhuvLtPMggI1WAHt9sOwZxQLSGpUaDnrdyDsomoRgNnCfKNSXXg==} + engines: {node: '>= 0.4'} + + is-descriptor@0.1.7: + resolution: {integrity: sha512-C3grZTvObeN1xud4cRWl366OMXZTj0+HGyk4hvfpx4ZHt1Pb60ANSXqCK7pdOTeUQpRzECBSTphqvD7U+l22Eg==} + engines: {node: '>= 0.4'} + + is-descriptor@1.0.3: + resolution: {integrity: sha512-JCNNGbwWZEVaSPtS45mdtrneRWJFp07LLmykxeFV5F6oBvNF8vHSfJuJgoT472pSfk+Mf8VnlrspaFBHWM8JAw==} + engines: {node: '>= 0.4'} + + is-docker@2.2.1: + resolution: {integrity: sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==} + engines: {node: '>=8'} + hasBin: true + + is-extendable@0.1.1: + resolution: {integrity: sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==} + engines: {node: '>=0.10.0'} + + is-extendable@1.0.1: + resolution: {integrity: sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==} + engines: {node: '>=0.10.0'} + + is-extglob@2.1.1: + resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} + engines: {node: '>=0.10.0'} + + is-finalizationregistry@1.1.1: + resolution: {integrity: sha512-1pC6N8qWJbWoPtEjgcL2xyhQOP491EQjeUo3qTKcmV8YSDDJrOepfG8pcC7h/QgnQHYSv0mJ3Z/ZWxmatVrysg==} + engines: {node: '>= 0.4'} + + 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-generator-fn@2.1.0: + resolution: {integrity: sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==} + engines: {node: '>=6'} + + is-generator-function@1.1.0: + resolution: {integrity: sha512-nPUB5km40q9e8UfN/Zc24eLlzdSf9OfKByBw9CIdw4H1giPMeA0OIJvbchsCu4npfI2QcMVBsGEBHKZ7wLTWmQ==} + engines: {node: '>= 0.4'} + + is-glob@4.0.3: + resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} + engines: {node: '>=0.10.0'} + + is-interactive@1.0.0: + resolution: {integrity: sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==} + engines: {node: '>=8'} + + is-map@2.0.3: + resolution: {integrity: sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==} + engines: {node: '>= 0.4'} + + is-number-object@1.1.1: + resolution: {integrity: sha512-lZhclumE1G6VYD8VHe35wFaIif+CTy5SJIi5+3y4psDgWu4wPDoBhF8NxUOinEc7pHgiTsT6MaBb92rKhhD+Xw==} + engines: {node: '>= 0.4'} + + is-number@3.0.0: + resolution: {integrity: sha512-4cboCqIpliH+mAvFNegjZQ4kgKc3ZUhQVr3HvWbSh5q3WH2v82ct+T2Y1hdU5Gdtorx/cLifQjqCbL7bpznLTg==} + engines: {node: '>=0.10.0'} + + 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-obj@1.1.0: + resolution: {integrity: sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==} + engines: {node: '>=0.10.0'} + + is-plain-object@2.0.4: + resolution: {integrity: sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==} + engines: {node: '>=0.10.0'} + + is-plain-object@3.0.1: + resolution: {integrity: sha512-Xnpx182SBMrr/aBik8y+GuR4U1L9FqMSojwDQwPMmxyC6bvEqly9UBCxhauBF5vNh2gwWJNX6oDV7O+OM4z34g==} + engines: {node: '>=0.10.0'} + + is-plain-object@5.0.0: + resolution: {integrity: sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==} + engines: {node: '>=0.10.0'} + + is-regex@1.2.1: + resolution: {integrity: sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==} + engines: {node: '>= 0.4'} + + is-set@2.0.3: + resolution: {integrity: sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==} + engines: {node: '>= 0.4'} + + is-shared-array-buffer@1.0.4: + resolution: {integrity: sha512-ISWac8drv4ZGfwKl5slpHG9OwPNty4jOWPRIhBpxOoD+hqITiwuipOQ2bNthAzwA3B4fIjO4Nln74N0S9byq8A==} + engines: {node: '>= 0.4'} + + is-stream@2.0.1: + resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==} + engines: {node: '>=8'} + + is-stream@3.0.0: + resolution: {integrity: sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + + is-string@1.1.1: + resolution: {integrity: sha512-BtEeSsoaQjlSPBemMQIrY1MY0uM6vnS1g5fmufYOtnxLGUZM2178PKbhsk7Ffv58IX+ZtcvoGwccYsh0PglkAA==} + engines: {node: '>= 0.4'} + + is-symbol@1.1.1: + resolution: {integrity: sha512-9gGx6GTtCQM73BgmHQXfDmLtfjjTUDSyoxTCbp5WtoixAhfgsDirWIcVQ/IHpvI5Vgd5i/J5F7B9cN/WlVbC/w==} + engines: {node: '>= 0.4'} + + is-text-path@2.0.0: + resolution: {integrity: sha512-+oDTluR6WEjdXEJMnC2z6A4FRwFoYuvShVVEGsS7ewc0UTi2QtAKMDJuL4BDEVt+5T7MjFo12RP8ghOM75oKJw==} + engines: {node: '>=8'} + + is-typed-array@1.1.15: + resolution: {integrity: sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==} + engines: {node: '>= 0.4'} + + is-unicode-supported@0.1.0: + resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==} + engines: {node: '>=10'} + + is-utf8@0.2.1: + resolution: {integrity: sha512-rMYPYvCzsXywIsldgLaSoPlw5PfoB/ssr7hY4pLfcodrA5M/eArza1a9VmTiNIBNMjOGr1Ow9mTyU2o69U6U9Q==} + + is-weakmap@2.0.2: + resolution: {integrity: sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==} + engines: {node: '>= 0.4'} + + is-weakref@1.1.0: + resolution: {integrity: sha512-SXM8Nwyys6nT5WP6pltOwKytLV7FqQ4UiibxVmW+EIosHcmCqkkjViTb5SNssDlkCiEYRP1/pdWUKVvZBmsR2Q==} + engines: {node: '>= 0.4'} + + is-weakset@2.0.4: + resolution: {integrity: sha512-mfcwb6IzQyOKTs84CQMrOwW4gQcaTOAWJ0zzJCl2WSPDrWk/OzDaImWFH3djXhb24g4eudZfLRozAvPGw4d9hQ==} + engines: {node: '>= 0.4'} + + is-what@3.14.1: + resolution: {integrity: sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA==} + + is-windows@1.0.2: + resolution: {integrity: sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==} + engines: {node: '>=0.10.0'} + + is-wsl@2.2.0: + resolution: {integrity: sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==} + engines: {node: '>=8'} + + isarray@1.0.0: + resolution: {integrity: sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==} + + isarray@2.0.5: + resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==} + + isexe@2.0.0: + resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + + isobject@2.1.0: + resolution: {integrity: sha512-+OUdGJlgjOBZDfxnDjYYG6zp487z0JGNQq3cYQYg5f5hKR+syHMsaztzGeml/4kGG55CSpKSpWTY+jYGgsHLgA==} + engines: {node: '>=0.10.0'} + + isobject@3.0.1: + resolution: {integrity: sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==} + engines: {node: '>=0.10.0'} + + istanbul-lib-coverage@3.2.2: + resolution: {integrity: sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==} + engines: {node: '>=8'} + + istanbul-lib-instrument@5.2.1: + resolution: {integrity: sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==} + engines: {node: '>=8'} + + istanbul-lib-instrument@6.0.3: + resolution: {integrity: sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q==} + engines: {node: '>=10'} + + istanbul-lib-report@3.0.1: + resolution: {integrity: sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==} + engines: {node: '>=10'} + + istanbul-lib-source-maps@4.0.1: + resolution: {integrity: sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==} + engines: {node: '>=10'} + + istanbul-reports@3.1.7: + resolution: {integrity: sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==} + engines: {node: '>=8'} + + jackspeak@3.4.3: + resolution: {integrity: sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==} + + jake@10.9.2: + resolution: {integrity: sha512-2P4SQ0HrLQ+fw6llpLnOaGAvN2Zu6778SJMrCUwns4fOoG9ayrTiZk3VV8sCPkVZF8ab0zksVpS8FDY5pRCNBA==} + engines: {node: '>=10'} + hasBin: true + + jest-changed-files@29.7.0: + resolution: {integrity: sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-circus@29.7.0: + resolution: {integrity: sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-cli@29.7.0: + resolution: {integrity: sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + hasBin: true + peerDependencies: + node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 + peerDependenciesMeta: + node-notifier: + optional: true + + jest-config@29.7.0: + resolution: {integrity: sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + peerDependencies: + '@types/node': '*' + ts-node: '>=9.0.0' + peerDependenciesMeta: + '@types/node': + optional: true + ts-node: + optional: true + + jest-diff@29.7.0: + resolution: {integrity: sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-docblock@29.7.0: + resolution: {integrity: sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-each@29.7.0: + resolution: {integrity: sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-environment-node@29.7.0: + resolution: {integrity: sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-get-type@29.6.3: + resolution: {integrity: sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-haste-map@29.7.0: + resolution: {integrity: sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-leak-detector@29.7.0: + resolution: {integrity: sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-matcher-utils@29.7.0: + resolution: {integrity: sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-message-util@29.7.0: + resolution: {integrity: sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-mock@29.7.0: + resolution: {integrity: sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-pnp-resolver@1.2.3: + resolution: {integrity: sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==} + engines: {node: '>=6'} + peerDependencies: + jest-resolve: '*' + peerDependenciesMeta: + jest-resolve: + optional: true + + jest-regex-util@29.6.3: + resolution: {integrity: sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-resolve-dependencies@29.7.0: + resolution: {integrity: sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-resolve@29.7.0: + resolution: {integrity: sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-runner@29.7.0: + resolution: {integrity: sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-runtime@29.7.0: + resolution: {integrity: sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-snapshot@29.7.0: + resolution: {integrity: sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-util@29.7.0: + resolution: {integrity: sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-validate@29.7.0: + resolution: {integrity: sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-watcher@29.7.0: + resolution: {integrity: sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-worker@29.7.0: + resolution: {integrity: sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest@29.7.0: + resolution: {integrity: sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + hasBin: true + peerDependencies: + node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 + peerDependenciesMeta: + node-notifier: + optional: true + + jiti@1.21.7: + resolution: {integrity: sha512-/imKNG4EbWNrVjoNC/1H5/9GFy+tqjGBHCaSsN+P2RnPqjsLmv6UD3Ej+Kj8nBWaRAwyk7kK5ZUc+OEatnTR3A==} + hasBin: true + + jiti@2.4.2: + resolution: {integrity: sha512-rg9zJN+G4n2nfJl5MW3BMygZX56zKPNVEYYqq7adpmMh4Jn2QNEwhvQlFy6jPVdcod7txZtKHWnyZiA3a0zP7A==} + hasBin: true + + js-base64@2.6.4: + resolution: {integrity: sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ==} + + js-beautify@1.15.1: + resolution: {integrity: sha512-ESjNzSlt/sWE8sciZH8kBF8BPlwXPwhR6pWKAw8bw4Bwj+iZcnKW6ONWUutJ7eObuBZQpiIb8S7OYspWrKt7rA==} + engines: {node: '>=14'} + hasBin: true + + js-cookie@3.0.5: + resolution: {integrity: sha512-cEiJEAEoIbWfCZYKWhVwFuvPX1gETRYPw6LlaTKoxD3s2AkXzkCjnp6h0V77ozyqj0jakteJ4YqDJT830+lVGw==} + engines: {node: '>=14'} + + js-tokens@4.0.0: + resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} + + js-tokens@9.0.1: + resolution: {integrity: sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ==} + + js-yaml@3.14.1: + resolution: {integrity: sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==} + hasBin: true + + js-yaml@4.1.0: + resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} + hasBin: true + + jsesc@3.1.0: + resolution: {integrity: sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==} + engines: {node: '>=6'} + hasBin: true + + json-buffer@3.0.1: + resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} + + json-parse-better-errors@1.0.2: + resolution: {integrity: sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==} + + json-parse-even-better-errors@2.3.1: + resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} + + json-parse-even-better-errors@3.0.2: + resolution: {integrity: sha512-fi0NG4bPjCHunUJffmLd0gxssIgkNmArMvis4iNah6Owg1MCJjWhEcDLmsK6iGkJq3tHwbDkTlce70/tmXN4cQ==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + + 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-stable-stringify-without-jsonify@1.0.1: + resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} + + json-stringify-safe@5.0.1: + resolution: {integrity: sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==} + + json5@1.0.2: + resolution: {integrity: sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==} + hasBin: true + + json5@2.2.3: + resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} + engines: {node: '>=6'} + hasBin: true + + 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} + + katex@0.16.19: + resolution: {integrity: sha512-3IA6DYVhxhBabjSLTNO9S4+OliA3Qvb8pBQXMfC4WxXJgLwZgnfDl0BmB4z6nBMdznBsZ+CGM8DrGZ5hcguDZg==} + hasBin: true + + keyv@4.5.4: + resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} + + kind-of@3.2.2: + resolution: {integrity: sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==} + engines: {node: '>=0.10.0'} + + kind-of@4.0.0: + resolution: {integrity: sha512-24XsCxmEbRwEDbz/qz3stgin8TTzZ1ESR56OMCN0ujYg+vRutNSiOj9bHH9u85DKgXguraugV5sFuvbD4FW/hw==} + engines: {node: '>=0.10.0'} + + kind-of@5.1.0: + resolution: {integrity: sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==} + engines: {node: '>=0.10.0'} + + kind-of@6.0.3: + resolution: {integrity: sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==} + engines: {node: '>=0.10.0'} + + kleur@3.0.3: + resolution: {integrity: sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==} + engines: {node: '>=6'} + + known-css-properties@0.35.0: + resolution: {integrity: sha512-a/RAk2BfKk+WFGhhOCAYqSiFLc34k8Mt/6NWRI4joER0EYUzXIcFivjjnoD3+XU1DggLn/tZc3DOAgke7l8a4A==} + + kolorist@1.8.0: + resolution: {integrity: sha512-Y+60/zizpJ3HRH8DCss+q95yr6145JXZo46OTpFvDZWLfRCE4qChOyk1b26nMaNpfHHgxagk9dXT5OP0Tfe+dQ==} + + less@4.2.1: + resolution: {integrity: sha512-CasaJidTIhWmjcqv0Uj5vccMI7pJgfD9lMkKtlnTHAdJdYK/7l8pM9tumLyJ0zhbD4KJLo/YvTj+xznQd5NBhg==} + engines: {node: '>=6'} + hasBin: true + + leven@3.1.0: + resolution: {integrity: sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==} + engines: {node: '>=6'} + + levn@0.4.1: + resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} + engines: {node: '>= 0.8.0'} + + lilconfig@3.0.0: + resolution: {integrity: sha512-K2U4W2Ff5ibV7j7ydLr+zLAkIg5JJ4lPn1Ltsdt+Tz/IjQ8buJ55pZAxoP34lqIiwtF9iAvtLv3JGv7CAyAg+g==} + engines: {node: '>=14'} + + lines-and-columns@1.2.4: + resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} + + lines-and-columns@2.0.4: + resolution: {integrity: sha512-wM1+Z03eypVAVUCE7QdSqpVIvelbOakn1M0bPDoA4SGWPx3sNDVUiMo3L6To6WWGClB7VyXnhQ4Sn7gxiJbE6A==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + + linkify-it@5.0.0: + resolution: {integrity: sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==} + + lint-staged@15.2.2: + resolution: {integrity: sha512-TiTt93OPh1OZOsb5B7k96A/ATl2AjIZo+vnzFZ6oHK5FuTk63ByDtxGQpHm+kFETjEWqgkF95M8FRXKR/LEBcw==} + engines: {node: '>=18.12.0'} + hasBin: true + + listr2@8.0.1: + resolution: {integrity: sha512-ovJXBXkKGfq+CwmKTjluEqFi3p4h8xvkxGQQAQan22YCgef4KZ1mKGjzfGh6PL6AW5Csw0QiQPNuQyH+6Xk3hA==} + engines: {node: '>=18.0.0'} + + load-json-file@4.0.0: + resolution: {integrity: sha512-Kx8hMakjX03tiGTLAIdJ+lL0htKnXjEZN6hk/tozf/WOuYGdZBJrZ+rCJRbVCugsjB3jMLn9746NsQIf5VjBMw==} + engines: {node: '>=4'} + + loader-utils@1.4.2: + resolution: {integrity: sha512-I5d00Pd/jwMD2QCduo657+YM/6L3KZu++pmX9VFncxaxvHcru9jx1lBaFft+r4Mt2jK0Yhp41XlRAihzPxHNCg==} + engines: {node: '>=4.0.0'} + + 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.17.21: + resolution: {integrity: sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==} + + lodash.camelcase@4.3.0: + resolution: {integrity: sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==} + + lodash.get@4.4.2: + resolution: {integrity: sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==} + + lodash.isfunction@3.0.9: + resolution: {integrity: sha512-AirXNj15uRIMMPihnkInB4i3NHeb4iBtNg9WRWuK2o31S+ePwwNmDPaTL3o7dTJ+VXNZim7rFs4rxN4YU1oUJw==} + + 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.map@4.6.0: + resolution: {integrity: sha512-worNHGKLDetmcEYDvh2stPCrrQRkP20E4l0iIS7F8EvzMqBBi7ltvFN5m1HvTf1P7Jk1txKhvFcmYsCr8O2F1Q==} + + lodash.memoize@4.1.2: + resolution: {integrity: sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==} + + 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.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.17.21: + resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} + + log-symbols@4.1.0: + resolution: {integrity: sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==} + engines: {node: '>=10'} + + log-update@6.1.0: + resolution: {integrity: sha512-9ie8ItPR6tjY5uYJh8K/Zrv/RMZ5VOlOWvtZdEHYSTFKZfIBPQa9tOAEeAWhd+AnIneLJ22w5fjOYtoutpWq5w==} + engines: {node: '>=18'} + + longest@2.0.1: + resolution: {integrity: sha512-Ajzxb8CM6WAnFjgiloPsI3bF+WCxcvhdIG3KNA2KN962+tdBsHcuQ4k4qX/EcS/2CRkcc0iAkR956Nib6aXU/Q==} + engines: {node: '>=0.10.0'} + + loose-envify@1.4.0: + resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} + hasBin: true + + lower-case@2.0.2: + resolution: {integrity: sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==} + + lru-cache@10.4.3: + resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==} + + lru-cache@5.1.1: + resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} + + lru-cache@6.0.0: + resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} + engines: {node: '>=10'} + + luxon@3.5.0: + resolution: {integrity: sha512-rh+Zjr6DNfUYR3bPwJEnuwDdqMbxZW7LOQfUN4B54+Cl+0o5zaU9RJ6bcidfDtC1cWCZXQ+nvX8bf6bAji37QQ==} + engines: {node: '>=12'} + + magic-string@0.30.17: + resolution: {integrity: sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==} + + make-dir@2.1.0: + resolution: {integrity: sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==} + engines: {node: '>=6'} + + make-dir@4.0.0: + resolution: {integrity: sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==} + engines: {node: '>=10'} + + make-error@1.3.6: + resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} + + makeerror@1.0.12: + resolution: {integrity: sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==} + + map-cache@0.2.2: + resolution: {integrity: sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg==} + engines: {node: '>=0.10.0'} + + map-obj@1.0.1: + resolution: {integrity: sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==} + engines: {node: '>=0.10.0'} + + map-obj@4.3.0: + resolution: {integrity: sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==} + engines: {node: '>=8'} + + map-visit@1.0.0: + resolution: {integrity: sha512-4y7uGv8bd2WdM9vpQsiQNo41Ln1NvhvDRuVt0k2JZQ+ezN2uaQes7lZeZ+QQUHOLQAtDaBJ+7wCbi+ab/KFs+w==} + engines: {node: '>=0.10.0'} + + markdown-it-link-attributes@4.0.1: + resolution: {integrity: sha512-pg5OK0jPLg62H4k7M9mRJLT61gUp9nvG0XveKYHMOOluASo9OEF13WlXrpAp2aj35LbedAy3QOCgQCw0tkLKAQ==} + + markdown-it@14.1.0: + resolution: {integrity: sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==} + hasBin: true + + 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==} + + md5@2.3.0: + resolution: {integrity: sha512-T1GITYmFaKuO91vxyoQMFETst+O71VUPEU3ze5GNzDm0OWdP8v1ziTaAEPUr/3kLsY3Sftgz242A1SetQiDL7g==} + + mdn-data@2.0.14: + resolution: {integrity: sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==} + + mdn-data@2.0.30: + resolution: {integrity: sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==} + + mdn-data@2.12.2: + resolution: {integrity: sha512-IEn+pegP1aManZuckezWCO+XZQDplx1366JoVhTpMpBB1sPey/SbveZQUosKiKiGYjg1wH4pMlNgXbCiYgihQA==} + + mdurl@2.0.0: + resolution: {integrity: sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==} + + medium-editor@5.23.3: + resolution: {integrity: sha512-he9/TdjX8f8MGdXGfCs8AllrYnqXJJvjNkDKmPg3aPW/uoIrlRqtkFthrwvmd+u4QyzEiadhCCM0EwTiRdUCJw==, tarball: https://registry.npmmirror.com/medium-editor/-/medium-editor-5.23.3.tgz} + + memorystream@0.3.1: + resolution: {integrity: sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw==} + engines: {node: '>= 0.10.0'} + + 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'} + + meow@8.1.2: + resolution: {integrity: sha512-r85E3NdZ+mpYk1C6RjPFEMSE+s1iZMuHtsHAqY0DT3jZczl0diWUZ8g6oU7h0M9cD2EL+PzaYghhCLzR0ZNn5Q==} + engines: {node: '>=10'} + + merge-options@1.0.1: + resolution: {integrity: sha512-iuPV41VWKWBIOpBsjoxjDZw8/GbSfZ2mk7N1453bwMrfzdrIk7EzBd+8UVR6rkw67th7xnk9Dytl3J+lHPdxvg==} + engines: {node: '>=4'} + + 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'} + + merge@2.1.1: + resolution: {integrity: sha512-jz+Cfrg9GWOZbQAnDQ4hlVnQky+341Yk5ru8bZSe6sIDTCIg8n9i/u7hSQGSVOF3C7lH6mGtqjkiT9G4wFLL0w==} + + micromatch@3.1.0: + resolution: {integrity: sha512-3StSelAE+hnRvMs8IdVW7Uhk8CVed5tp+kLLGlBP6WiRAXS21GPGu/Nat4WNPXj2Eoc24B02SaeoyozPMfj0/g==} + engines: {node: '>=0.10.0'} + + micromatch@4.0.5: + resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==} + engines: {node: '>=8.6'} + + micromatch@4.0.8: + resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==} + engines: {node: '>=8.6'} + + mime-db@1.52.0: + resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==, tarball: https://registry.npmmirror.com/mime-db/-/mime-db-1.52.0.tgz} + engines: {node: '>= 0.6'} + + mime-types@2.1.35: + resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==, tarball: https://registry.npmmirror.com/mime-types/-/mime-types-2.1.35.tgz} + engines: {node: '>= 0.6'} + + mime@1.6.0: + resolution: {integrity: sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==} + engines: {node: '>=4'} + hasBin: true + + mimic-fn@2.1.0: + resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==} + engines: {node: '>=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-indent@1.0.1: + resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==} + engines: {node: '>=4'} + + minimatch@3.1.2: + resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} + + minimatch@5.1.6: + resolution: {integrity: sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==} + engines: {node: '>=10'} + + minimatch@9.0.1: + resolution: {integrity: sha512-0jWhJpD/MdhPXwPuiRkCbfYfSKp2qnn2eOc279qI7f+osl/l+prKSrvhg157zSYvx/1nmgn2NqdT6k2Z7zSH9w==} + engines: {node: '>=16 || 14 >=14.17'} + + minimatch@9.0.3: + resolution: {integrity: sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==} + engines: {node: '>=16 || 14 >=14.17'} + + minimatch@9.0.5: + resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} + engines: {node: '>=16 || 14 >=14.17'} + + minimist-options@4.1.0: + resolution: {integrity: sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==} + engines: {node: '>= 6'} + + minimist@1.2.7: + resolution: {integrity: sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==} + + minimist@1.2.8: + resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} + + minipass@7.1.2: + resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==} + engines: {node: '>=16 || 14 >=14.17'} + + mixin-deep@1.3.2: + resolution: {integrity: sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==} + engines: {node: '>=0.10.0'} + + mkdirp@0.5.6: + resolution: {integrity: sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==} + hasBin: true + + mlly@1.7.3: + resolution: {integrity: sha512-xUsx5n/mN0uQf4V548PKQ+YShA4/IW0KI1dZhrNrPCLG+xizETbHTkOa1f8/xut9JRPp8kQuMnz0oqwkTiLo/A==} + + mobx-preact@3.0.0: + resolution: {integrity: sha512-ijan/cBs3WmRye87E5+3JmoFBB00KDAwNA3pm7bMwYLPHBAXlN86aC3gdrXw8aKzM5RI8V3a993PphzPv6P4FA==, tarball: https://registry.npmmirror.com/mobx-preact/-/mobx-preact-3.0.0.tgz} + peerDependencies: + mobx: 5.x + preact: '>=8' + + mobx-utils@5.6.2: + resolution: {integrity: sha512-a/WlXyGkp6F12b01sTarENpxbmlRgPHFyR1Xv2bsSjQBm5dcOtd16ONb40/vOqck8L99NHpI+C9MXQ+SZ8f+yw==, tarball: https://registry.npmmirror.com/mobx-utils/-/mobx-utils-5.6.2.tgz} + peerDependencies: + mobx: ^4.13.1 || ^5.13.1 + + mobx@5.15.7: + resolution: {integrity: sha512-wyM3FghTkhmC+hQjyPGGFdpehrcX1KOXsDuERhfK2YbJemkUhEB+6wzEN639T21onxlfYBmriA1PFnvxTUhcKw==, tarball: https://registry.npmmirror.com/mobx/-/mobx-5.15.7.tgz} + + mockjs@1.1.0: + resolution: {integrity: sha512-eQsKcWzIaZzEZ07NuEyO4Nw65g0hdWAyurVol1IPl1gahRwY+svqzfgfey8U8dahLwG44d6/RwEzuK52rSa/JQ==} + hasBin: true + + mousetrap@1.6.5: + resolution: {integrity: sha512-QNo4kEepaIBwiT8CDhP98umTetp+JNfQYBWvC1pc6/OAibuXtRcxZ58Qz8skvEHYvURne/7R8T5VoOI7rDsEUA==, tarball: https://registry.npmmirror.com/mousetrap/-/mousetrap-1.6.5.tgz} + + mri@1.2.0: + resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} + engines: {node: '>=4'} + + mrmime@2.0.0: + resolution: {integrity: sha512-eu38+hdgojoyq63s+yTpN4XMBdt5l8HhMhc4VKLO9KM5caLIBvUm4thi7fFaxyTmCKeNnXZ5pAlBwCUnhA09uw==} + engines: {node: '>=10'} + + ms@2.0.0: + resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==} + + ms@2.1.2: + resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} + + ms@2.1.3: + resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + + muggle-string@0.3.1: + resolution: {integrity: sha512-ckmWDJjphvd/FvZawgygcUeQCxzvohjFO5RxTjj4eq8kw359gFF3E1brjfI+viLMxss5JrHTDRHZvu2/tuy0Qg==} + + mute-stream@0.0.8: + resolution: {integrity: sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==} + + mute-stream@1.0.0: + resolution: {integrity: sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + + nanoid@3.3.8: + resolution: {integrity: sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + + nanomatch@1.2.13: + resolution: {integrity: sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==} + engines: {node: '>=0.10.0'} + + nanopop@2.4.2: + resolution: {integrity: sha512-NzOgmMQ+elxxHeIha+OG/Pv3Oc3p4RU2aBhwWwAqDpXrdTbtRylbRLQztLy8dMMwfl6pclznBdfUhccEn9ZIzw==} + + natural-compare@1.4.0: + resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} + + needle@3.3.1: + resolution: {integrity: sha512-6k0YULvhpw+RoLNiQCRKOl09Rv1dPLr8hHnVjHqdolKwDrdNyk+Hmrthi4lIGPPz3r39dLx0hsF5s40sZ3Us4Q==} + engines: {node: '>= 4.4.x'} + hasBin: true + + neo-async@2.6.2: + resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==} + + nice-try@1.0.5: + resolution: {integrity: sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==} + + no-case@3.0.4: + resolution: {integrity: sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==} + + node-fetch-native@1.6.4: + resolution: {integrity: sha512-IhOigYzAKHd244OC0JIMIUrjzctirCmPkaIfhDeGcEETWof5zKYUW7e7MYvChGWh/4CJeXEgsRyGzuF334rOOQ==} + + 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-html-parser@5.4.2: + resolution: {integrity: sha512-RaBPP3+51hPne/OolXxcz89iYvQvKOydaqoePpOgXcrOKZhjVIzmpKZz+Hd/RBO2/zN2q6CNJhQzucVz+u3Jyw==} + + node-int64@0.4.0: + resolution: {integrity: sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==} + + node-releases@2.0.19: + resolution: {integrity: sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==} + + 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-package-data@2.5.0: + resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==} + + normalize-package-data@3.0.3: + resolution: {integrity: sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA==} + engines: {node: '>=10'} + + normalize-package-data@6.0.2: + resolution: {integrity: sha512-V6gygoYb/5EmNI+MEGrWkC+e6+Rr7mTmfHrxDbLzxQogBkgzo76rkok0Am6thgSF7Mv2nLOajAJj5vDJZEFn7g==} + engines: {node: ^16.14.0 || >=18.0.0} + + normalize-path@3.0.0: + resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} + engines: {node: '>=0.10.0'} + + normalize-range@0.1.2: + resolution: {integrity: sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==} + engines: {node: '>=0.10.0'} + + npm-run-all@4.1.5: + resolution: {integrity: sha512-Oo82gJDAVcaMdi3nuoKFavkIHBRVqQ1qvMb+9LHk/cF4P6B2m8aP04hGf7oL6wZ9BuGwX1onlLhpuoofSyoQDQ==} + engines: {node: '>= 4'} + hasBin: true + + npm-run-path@4.0.1: + resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==} + engines: {node: '>=8'} + + npm-run-path@5.3.0: + resolution: {integrity: sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + + nprogress@0.2.0: + resolution: {integrity: sha512-I19aIingLgR1fmhftnbWWO3dXc0hSxqHQHQb3H8m+K3TnEn/iSeTZZOyvKXWqQESMwuUVnatlCnZdLBZZt2VSA==} + + nth-check@2.1.1: + resolution: {integrity: sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==} + + object-assign@4.1.1: + resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} + engines: {node: '>=0.10.0'} + + object-copy@0.1.0: + resolution: {integrity: sha512-79LYn6VAb63zgtmAteVOWo9Vdj71ZVBy3Pbse+VqxDpEP83XuujMrGqHIwAXJ5I/aM0zU7dIyIAhifVTPrNItQ==} + engines: {node: '>=0.10.0'} + + object-inspect@1.13.3: + resolution: {integrity: sha512-kDCGIbxkDSXE3euJZZXzc6to7fCrKHNI/hSRQnRuQ+BWjFNzZwiFF8fj/6o2t2G9/jTj8PSIYTfCLelLZEeRpA==} + engines: {node: '>= 0.4'} + + object-keys@1.1.1: + resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==} + engines: {node: '>= 0.4'} + + object-visit@1.0.1: + resolution: {integrity: sha512-GBaMwwAVK9qbQN3Scdo0OyvgPW7l3lnaVMj84uTOZlswkX0KpF6fyDBJhtTthf7pymztoN36/KEr1DyhF96zEA==} + engines: {node: '>=0.10.0'} + + object.assign@4.1.7: + resolution: {integrity: sha512-nK28WOo+QIjBkDduTINE4JkF/UJJKyf2EJxvJKfblDpyg0Q+pkOHNTL0Qwy6NP6FhE/EnzV73BxxqcJaXY9anw==} + engines: {node: '>= 0.4'} + + object.pick@1.3.0: + resolution: {integrity: sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ==} + engines: {node: '>=0.10.0'} + + ofetch@1.4.1: + resolution: {integrity: sha512-QZj2DfGplQAr2oj9KzceK9Hwz6Whxazmn85yYeVuS3u9XTMOGMRx0kO95MQ+vLsj/S/NwBDMMLU5hpxvI6Tklw==} + + on-finished@2.3.0: + resolution: {integrity: sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==} + engines: {node: '>= 0.8'} + + once@1.4.0: + resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} + + onetime@5.1.2: + resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==} + engines: {node: '>=6'} + + 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'} + + open@8.4.2: + resolution: {integrity: sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==} + engines: {node: '>=12'} + + opener@1.5.2: + resolution: {integrity: sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==} + hasBin: true + + optionator@0.9.4: + resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} + engines: {node: '>= 0.8.0'} + + ora@5.4.1: + resolution: {integrity: sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==} + engines: {node: '>=10'} + + os-tmpdir@1.0.2: + resolution: {integrity: sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==} + engines: {node: '>=0.10.0'} + + own-keys@1.0.1: + resolution: {integrity: sha512-qFOyK5PjiWZd+QQIh+1jhdb9LpxTF0qs7Pm8o5QHYZ0M3vKqSqzsZaEB6oWlxZ+q2sJBMI/Ktgd2N5ZwQoRHfg==} + engines: {node: '>= 0.4'} + + 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-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@0.2.8: + resolution: {integrity: sha512-ts9KSdroZisdvKMWVAVCXiKqnqNfXz4+IbrBG8/BWx/TR5le+jfenvoBuIZ6UWM9nz47W7AbD9qYfAwfWMIwzA==} + + param-case@3.0.4: + resolution: {integrity: sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A==} + + parent-module@1.0.1: + resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} + engines: {node: '>=6'} + + parse-json@4.0.0: + resolution: {integrity: sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==} + engines: {node: '>=4'} + + parse-json@5.2.0: + resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} + engines: {node: '>=8'} + + parse-json@7.1.1: + resolution: {integrity: sha512-SgOTCX/EZXtZxBE5eJ97P4yGM5n37BwRU+YMsH4vNzFqJV/oWFXXCmwFlgWUM4PrakybVOueJJ6pwHqSVhTFDw==} + engines: {node: '>=16'} + + parse-node-version@1.0.1: + resolution: {integrity: sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==} + engines: {node: '>= 0.10'} + + parse-passwd@1.0.0: + resolution: {integrity: sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q==} + engines: {node: '>=0.10.0'} + + parse5-htmlparser2-tree-adapter@7.1.0: + resolution: {integrity: sha512-ruw5xyKs6lrpo9x9rCZqZZnIUntICjQAd0Wsmp396Ul9lN/h+ifgVV1x1gZHi8euej6wTfpqX8j+BFQxF0NS/g==} + + parse5-parser-stream@7.1.2: + resolution: {integrity: sha512-JyeQc9iwFLn5TbvvqACIF/VXG6abODeB3Fwmv/TGdLk2LfbWkaySGY72at4+Ty7EkPZj854u4CrICqNk2qIbow==} + + parse5@7.2.1: + resolution: {integrity: sha512-BuBYQYlv1ckiPdQi/ohiivi9Sagc9JG+Ozs0r7b/0iK3sKmrb0b9FdWdBbOdx6hBCM/F9Ir82ofnBhtZOjCRPQ==} + + parseurl@1.3.3: + resolution: {integrity: sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==} + engines: {node: '>= 0.8'} + + pascal-case@3.1.2: + resolution: {integrity: sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==} + + pascalcase@0.1.1: + resolution: {integrity: sha512-XHXfu/yOQRy9vYOtUDVMN60OEJjW013GoObG1o+xwQTpB9eYJX/BjXMsdW13ZDPruFhYYn0AG22w0xgQMwl3Nw==} + engines: {node: '>=0.10.0'} + + 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-is-absolute@1.0.1: + resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} + engines: {node: '>=0.10.0'} + + path-key@2.0.1: + resolution: {integrity: sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==} + engines: {node: '>=4'} + + 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-to-regexp@6.3.0: + resolution: {integrity: sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ==} + + path-type@3.0.0: + resolution: {integrity: sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==} + engines: {node: '>=4'} + + path-type@4.0.0: + resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} + engines: {node: '>=8'} + + pathe@0.2.0: + resolution: {integrity: sha512-sTitTPYnn23esFR3RlqYBWn4c45WGeLcsKzQiUpXJAyfcWkolvlYpV8FLo7JishK946oQwMFUCHXQ9AjGPKExw==} + + pathe@1.1.2: + resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==} + + perfect-debounce@1.0.0: + resolution: {integrity: sha512-xCy9V055GLEqoFaHoC1SoLIaLmWctgCUaBaWxDZ7/Zx4CTyX7cJQLJOok/orfjZAh9kEYpjJa4d0KcJmCbctZA==} + + picocolors@1.1.1: + resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} + + picomatch@2.3.1: + resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} + engines: {node: '>=8.6'} + + picomatch@3.0.1: + resolution: {integrity: sha512-I3EurrIQMlRc9IaAZnqRR044Phh2DXY+55o7uJ0V+hYZAcQYSuFWsc9q5PvyDHUSCe1Qxn/iBz+78s86zWnGag==} + engines: {node: '>=10'} + + picomatch@4.0.2: + resolution: {integrity: sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==} + engines: {node: '>=12'} + + pidtree@0.3.1: + resolution: {integrity: sha512-qQbW94hLHEqCg7nhby4yRC7G2+jYHY4Rguc2bjw7Uug4GIJuu1tvf2uHaZv5Q8zdt+WKJ6qK1FOI6amaWUo5FA==} + engines: {node: '>=0.10'} + hasBin: true + + pidtree@0.6.0: + resolution: {integrity: sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g==} + engines: {node: '>=0.10'} + hasBin: true + + pify@3.0.0: + resolution: {integrity: sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==} + engines: {node: '>=4'} + + pify@4.0.1: + resolution: {integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==} + engines: {node: '>=6'} + + pinia@2.1.7: + resolution: {integrity: sha512-+C2AHFtcFqjPih0zpYuvof37SFxMQ7OEG2zV9jRI12i9BOy3YQVAHwdKtyyc8pDcDyIc33WCIsZaCFWU7WWxGQ==} + peerDependencies: + '@vue/composition-api': ^1.4.0 + typescript: '>=4.4.4' + vue: ^2.6.14 || ^3.3.0 + peerDependenciesMeta: + '@vue/composition-api': + optional: true + typescript: + optional: true + + pirates@4.0.6: + resolution: {integrity: sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==} + engines: {node: '>= 6'} + + pkg-dir@4.2.0: + resolution: {integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==} + engines: {node: '>=8'} + + pkg-types@1.3.0: + resolution: {integrity: sha512-kS7yWjVFCkIw9hqdJBoMxDdzEngmkr5FXeWZZfQ6GoYacjVnsW6l2CcYW/0ThD0vF4LPJgVYnrg4d0uuhwYQbg==} + + pngjs@5.0.0: + resolution: {integrity: sha512-40QW5YalBNfQo5yRYmiw7Yz6TKKVr3h6970B2YE+3fQpsWcrbj1PzJgxeJ19DRQjhMbKPIuMY8rFaXc8moolVw==} + engines: {node: '>=10.13.0'} + + portfinder@1.0.32: + resolution: {integrity: sha512-on2ZJVVDXRADWE6jnQaX0ioEylzgBpQk8r55NE4wjXW1ZxO+BgDlY6DXwj20i0V8eB4SenDQ00WEaxfiIQPcxg==} + engines: {node: '>= 0.12.0'} + + posix-character-classes@0.1.1: + resolution: {integrity: sha512-xTgYBc3fuo7Yt7JbiuFxSYGToMoz8fLoE6TC9Wx1P/u+LfeThMOAqmuyECnlBaaJb+u1m9hHiXUEtwW4OzfUJg==} + engines: {node: '>=0.10.0'} + + possible-typed-array-names@1.0.0: + resolution: {integrity: sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==} + engines: {node: '>= 0.4'} + + postcss-html@1.7.0: + resolution: {integrity: sha512-MfcMpSUIaR/nNgeVS8AyvyDugXlADjN9AcV7e5rDfrF1wduIAGSkL4q2+wgrZgA3sHVAHLDO9FuauHhZYW2nBw==} + engines: {node: ^12 || >=14} + + postcss-less@6.0.0: + resolution: {integrity: sha512-FPX16mQLyEjLzEuuJtxA8X3ejDLNGGEG503d2YGZR5Ask1SpDN8KmZUMpzCvyalWRywAn1n1VOA5dcqfCLo5rg==} + engines: {node: '>=12'} + peerDependencies: + postcss: ^8.3.5 + + postcss-prefix-selector@1.16.1: + resolution: {integrity: sha512-Umxu+FvKMwlY6TyDzGFoSUnzW+NOfMBLyC1tAkIjgX+Z/qGspJeRjVC903D7mx7TuBpJlwti2ibXtWuA7fKMeQ==} + peerDependencies: + postcss: '>4 <9' + + 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.3.3 + + postcss-safe-parser@7.0.1: + resolution: {integrity: sha512-0AioNCJZ2DPYz5ABT6bddIqlhgwhpHZ/l65YAYo0BCIn0xiDpsnTHz0gnoTGk0OXZW0JRs+cDwL8u/teRdz+8A==} + engines: {node: '>=18.0'} + peerDependencies: + postcss: ^8.4.31 + + postcss-selector-parser@6.1.2: + resolution: {integrity: sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg==} + engines: {node: '>=4'} + + postcss-selector-parser@7.0.0: + resolution: {integrity: sha512-9RbEr1Y7FFfptd/1eEdntyjMwLeghW1bHX9GWjXo19vx4ytPQhANltvVxDggzJl7mnWM+dX28kb6cyS/4iQjlQ==} + engines: {node: '>=4'} + + postcss-sorting@8.0.2: + resolution: {integrity: sha512-M9dkSrmU00t/jK7rF6BZSZauA5MAaBW4i5EnJXspMwt4iqTh/L9j6fgMnbElEOfyRyfLfVbIHj/R52zHzAPe1Q==} + peerDependencies: + postcss: ^8.4.20 + + postcss-value-parser@4.2.0: + resolution: {integrity: sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==} + + postcss@5.2.18: + resolution: {integrity: sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==} + engines: {node: '>=0.12'} + + postcss@8.4.49: + resolution: {integrity: sha512-OCVPnIObs4N29kxTjzLfUryOkvZEq+pf8jTF0lg8E7uETuWHA+v7j3c/xJmiqpX450191LlmZfUKkXxkTry7nA==} + engines: {node: ^10 || ^12 || >=14} + + posthtml-parser@0.2.1: + resolution: {integrity: sha512-nPC53YMqJnc/+1x4fRYFfm81KV2V+G9NZY+hTohpYg64Ay7NemWWcV4UWuy/SgMupqQ3kJ88M/iRfZmSnxT+pw==} + + posthtml-rename-id@1.0.12: + resolution: {integrity: sha512-UKXf9OF/no8WZo9edRzvuMenb6AD5hDLzIepJW+a4oJT+T/Lx7vfMYWT4aWlGNQh0WMhnUx1ipN9OkZ9q+ddEw==} + + posthtml-render@1.4.0: + resolution: {integrity: sha512-W1779iVHGfq0Fvh2PROhCe2QhB8mEErgqzo1wpIt36tCgChafP+hbXIhLDOM8ePJrZcFs0vkNEtdibEWVqChqw==} + engines: {node: '>=10'} + + posthtml-svg-mode@1.0.3: + resolution: {integrity: sha512-hEqw9NHZ9YgJ2/0G7CECOeuLQKZi8HjWLkBaSVtOWjygQ9ZD8P7tqeowYs7WrFdKsWEKG7o+IlsPY8jrr0CJpQ==} + + posthtml@0.9.2: + resolution: {integrity: sha512-spBB5sgC4cv2YcW03f/IAUN1pgDJWNWD8FzkyY4mArLUMJW+KlQhlmUdKAHQuPfb00Jl5xIfImeOsf6YL8QK7Q==} + engines: {node: '>=0.10.0'} + + preact@10.26.9: + resolution: {integrity: sha512-SSjF9vcnF27mJK1XyFMNJzFd5u3pQiATFqoaDy03XuN00u4ziveVVEGt5RKJrDR8MHE/wJo9Nnad56RLzS2RMA==, tarball: https://registry.npmmirror.com/preact/-/preact-10.26.9.tgz} + + prelude-ls@1.2.1: + resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} + engines: {node: '>= 0.8.0'} + + prettier-linter-helpers@1.0.0: + resolution: {integrity: sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==} + engines: {node: '>=6.0.0'} + + prettier@3.4.2: + resolution: {integrity: sha512-e9MewbtFo+Fevyuxn/4rrcDAaq0IYxPGLvObpQjiZBMAzB9IGmzlnG9RZy3FFas+eBMu2vA0CszMeduow5dIuQ==} + 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} + + pretty-quick@4.0.0: + resolution: {integrity: sha512-M+2MmeufXb/M7Xw3Afh1gxcYpj+sK0AxEfnfF958ktFeAyi5MsKY5brymVURQLgPLV1QaF5P4pb2oFJ54H3yzQ==} + engines: {node: '>=14'} + hasBin: true + peerDependencies: + prettier: ^3.0.0 + + print-js@1.6.0: + resolution: {integrity: sha512-BfnOIzSKbqGRtO4o0rnj/K3681BSd2QUrsIZy/+WdCIugjIswjmx3lDEZpXB2ruGf9d4b3YNINri81+J0FsBWg==} + + promise-polyfill@7.1.2: + resolution: {integrity: sha512-FuEc12/eKqqoRYIGBrUptCBRhobL19PS2U31vMNTfyck1FxPyMfgsXyW4Mav85y/ZN1hop3hOwRlUDok23oYfQ==} + + prompts@2.4.2: + resolution: {integrity: sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==} + engines: {node: '>= 6'} + + proto-list@1.2.4: + resolution: {integrity: sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==} + + proxy-from-env@1.1.0: + resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==, tarball: https://registry.npmmirror.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz} + + prr@1.0.1: + resolution: {integrity: sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==} + + punycode.js@2.3.1: + resolution: {integrity: sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==} + engines: {node: '>=6'} + + punycode@2.3.1: + resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} + engines: {node: '>=6'} + + pure-rand@6.1.0: + resolution: {integrity: sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==} + + qrcode@1.5.4: + resolution: {integrity: sha512-1ca71Zgiu6ORjHqFBDpnSMTR2ReToX4l1Au1VFLyVeBTFavzQnv5JxMFr3ukHVKpSrSA2MCk0lNJSykjUfz7Zg==} + engines: {node: '>=10.13.0'} + hasBin: true + + qs@6.13.1: + resolution: {integrity: sha512-EJPeIn0CYrGu+hli1xilKAPXODtJ12T0sP63Ijx2/khC2JtuaN3JyNIpvmnkmaEtha9ocbG4A4cMcr+TvqvwQg==} + engines: {node: '>=0.6'} + + query-string@4.3.4: + resolution: {integrity: sha512-O2XLNDBIg1DnTOa+2XrIwSiXEV8h2KImXUnjhhn2+UsvZ+Es2uyd5CCRTNQlDGbzUQOW3aYCBx9rVA6dzsiY7Q==} + engines: {node: '>=0.10.0'} + + queue-microtask@1.2.3: + resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} + + quick-lru@4.0.1: + resolution: {integrity: sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==} + engines: {node: '>=8'} + + rangy@1.3.2: + resolution: {integrity: sha512-fS1C4MOyk8T+ZJZdLcgrukPWxkyDXa+Hd2Kj+Zg4wIK71yrWgmjzHubzPMY1G+WD9EgGxMp3fIL0zQ1ickmSWA==, tarball: https://registry.npmmirror.com/rangy/-/rangy-1.3.2.tgz} + + react-is@18.3.1: + resolution: {integrity: sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==} + + read-pkg-up@10.1.0: + resolution: {integrity: sha512-aNtBq4jR8NawpKJQldrQcSW9y/d+KWH4v24HWkHljOZ7H0av+YTGANBzRh9A5pw7v/bLVsLVPpOhJ7gHNVy8lA==} + engines: {node: '>=16'} + + read-pkg-up@7.0.1: + resolution: {integrity: sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==} + engines: {node: '>=8'} + + read-pkg@3.0.0: + resolution: {integrity: sha512-BLq/cCO9two+lBgiTYNqD6GdtK8s4NpaWrl6/rCO9w0TUS8oJl7cmToOZfRYllKTISY6nt1U7jQ53brmKqY6BA==} + engines: {node: '>=4'} + + read-pkg@5.2.0: + resolution: {integrity: sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==} + engines: {node: '>=8'} + + read-pkg@8.1.0: + resolution: {integrity: sha512-PORM8AgzXeskHO/WEv312k9U03B8K9JSiWF/8N9sUuFjBa+9SF2u6K7VClzXwDXab51jCd8Nd36CNM+zR97ScQ==} + engines: {node: '>=16'} + + readable-stream@3.6.2: + resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} + engines: {node: '>= 6'} + + readdirp@3.6.0: + resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} + engines: {node: '>=8.10.0'} + + redent@3.0.0: + resolution: {integrity: sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==} + engines: {node: '>=8'} + + reflect.getprototypeof@1.0.10: + resolution: {integrity: sha512-00o4I+DVrefhv+nX0ulyi3biSHCPDe+yLv5o/p6d/UVlirijB8E16FtfwSAi4g3tcqrQ4lRAqQSoFEZJehYEcw==} + engines: {node: '>= 0.4'} + + regenerator-runtime@0.11.1: + resolution: {integrity: sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==} + + regenerator-runtime@0.14.1: + resolution: {integrity: sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==} + + regex-not@1.0.2: + resolution: {integrity: sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==} + engines: {node: '>=0.10.0'} + + regexp.prototype.flags@1.5.4: + resolution: {integrity: sha512-dYqgNSZbDwkaJ2ceRd9ojCGjBq+mOm9LmtXnAnEGyHhN/5R7iDW2TRw3h+o/jCFxus3P2LfWIIiwowAjANm7IA==} + engines: {node: '>= 0.4'} + + relateurl@0.2.7: + resolution: {integrity: sha512-G08Dxvm4iDN3MLM0EsP62EDV9IuhXPR6blNz6Utcp7zyV3tr4HVNINt6MpaRWbxoOHT3Q7YN2P+jaHX8vUbgog==} + engines: {node: '>= 0.10'} + + repeat-element@1.1.4: + resolution: {integrity: sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==} + engines: {node: '>=0.10.0'} + + repeat-string@1.6.1: + resolution: {integrity: sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==} + engines: {node: '>=0.10'} + + 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==} + + requires-port@1.0.0: + resolution: {integrity: sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==} + + resize-observer-polyfill@1.5.1: + resolution: {integrity: sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg==} + + resolve-cwd@3.0.0: + resolution: {integrity: sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==} + engines: {node: '>=8'} + + resolve-dir@1.0.1: + resolution: {integrity: sha512-R7uiTjECzvOsWSfdM0QKFNBVFcK27aHOUwdvK53BcW8zqnGdYp0Fbj82cy54+2A4P2tFM22J5kRfe1R+lM/1yg==} + engines: {node: '>=0.10.0'} + + 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-global@1.0.0: + resolution: {integrity: sha512-zFa12V4OLtT5XUX/Q4VLvTfBf+Ok0SPc1FNGM/z9ctUdiU618qwKpWnd0CHs3+RqROfyEg/DhuHbMWYqcgljEw==} + engines: {node: '>=8'} + + resolve-pkg-maps@1.0.0: + resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} + + resolve-url@0.2.1: + resolution: {integrity: sha512-ZuF55hVUQaaczgOIwqWzkEcEidmlD/xl44x1UZnhOXcYuFN2S6+rcxpG+C1N3So0wvNI3DmJICUFfu2SxhBmvg==} + deprecated: https://github.com/lydell/resolve-url#deprecated + + resolve.exports@2.0.3: + resolution: {integrity: sha512-OcXjMsGdhL4XnbShKpAcSqPMzQoYkYyhbEaeSko47MjRP9NfEQMhZkXL1DoFlt9LWQn4YttrdnV6X2OiyzBi+A==} + engines: {node: '>=10'} + + resolve@1.22.10: + resolution: {integrity: sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==} + engines: {node: '>= 0.4'} + hasBin: true + + restore-cursor@3.1.0: + resolution: {integrity: sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==} + engines: {node: '>=8'} + + restore-cursor@5.1.0: + resolution: {integrity: sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA==} + engines: {node: '>=18'} + + ret@0.1.15: + resolution: {integrity: sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==} + engines: {node: '>=0.12'} + + 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 + + rollup-plugin-purge-icons@0.10.0: + resolution: {integrity: sha512-GD2ftg4L9G/sagIhtCmBn5vdyzePOisniythubpbywP0Q3ix9rZuDeFvgXTPemOsc22pvH7t22ryYQIl0rwGog==} + engines: {node: '>= 12'} + + rollup-plugin-visualizer@5.13.1: + resolution: {integrity: sha512-vMg8i6BprL8aFm9DKvL2c8AwS8324EgymYQo9o6E26wgVvwMhsJxS37aNL6ZsU7X9iAcMYwdME7gItLfG5fwJg==} + engines: {node: '>=18'} + hasBin: true + peerDependencies: + rolldown: 1.x + rollup: 2.x || 3.x || 4.x + peerDependenciesMeta: + rolldown: + optional: true + rollup: + optional: true + + rollup@4.30.0: + resolution: {integrity: sha512-sDnr1pcjTgUT69qBksNF1N1anwfbyYG6TBQ22b03bII8EdiUQ7J0TlozVaTMjT/eEJAO49e1ndV7t+UZfL1+vA==} + engines: {node: '>=18.0.0', npm: '>=8.0.0'} + hasBin: true + + run-async@2.4.1: + resolution: {integrity: sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==} + engines: {node: '>=0.12.0'} + + run-async@3.0.0: + resolution: {integrity: sha512-540WwVDOMxA6dN6We19EcT9sc3hkXPw5mzRNGM3FkdN/vtE9NFvj5lFAPNwUDmJjXidm3v7TC1cTE7t17Ulm1Q==} + engines: {node: '>=0.12.0'} + + run-parallel@1.2.0: + resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} + + rxjs@7.8.1: + resolution: {integrity: sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==} + + safe-array-concat@1.1.3: + resolution: {integrity: sha512-AURm5f0jYEOydBj7VQlVvDrjeFgthDdEF5H1dP+6mNpoXOMo1quQqJ4wvJDyRZ9+pO3kGWoOdmV08cSv2aJV6Q==} + engines: {node: '>=0.4'} + + safe-buffer@5.1.2: + resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==} + + safe-buffer@5.2.1: + resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} + + safe-push-apply@1.0.0: + resolution: {integrity: sha512-iKE9w/Z7xCzUMIZqdBsp6pEQvwuEebH4vdpjcDWnyzaI6yl6O9FHvVpmGelvEHNsoY6wGblkxR6Zty/h00WiSA==} + engines: {node: '>= 0.4'} + + safe-regex-test@1.1.0: + resolution: {integrity: sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw==} + engines: {node: '>= 0.4'} + + safe-regex@1.1.0: + resolution: {integrity: sha512-aJXcif4xnaNUzvUuC5gcb46oTS7zvg4jpMTnuqtrEPlR3vFr4pxtdTwaF1Qs3Enjn9HK+ZlwQui+a7z0SywIzg==} + + safer-buffer@2.1.2: + resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} + + sax@1.4.1: + resolution: {integrity: sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==} + + scroll-into-view-if-needed@2.2.31: + resolution: {integrity: sha512-dGCXy99wZQivjmjIqihaBQNjryrz5rueJY7eHfTdyWEiR4ttYpsajb14rn9s5d4DY4EcY6+4+U/maARBXJedkA==} + + secure-compare@3.0.1: + resolution: {integrity: sha512-AckIIV90rPDcBcglUwXPF3kg0P0qmPsPXAj6BBEENQE1p5yA1xfmDJzfi1Tappj37Pv2mVbKpL3Z1T+Nn7k1Qw==} + + select@1.1.2: + resolution: {integrity: sha512-OwpTSOfy6xSs1+pwcNrv0RBMOzI39Lp3qQKUTPVVPRjCdNa5JH/oPRiqsesIskK8TVgmRiHwO4KXlV2Li9dANA==} + + semver@5.7.2: + resolution: {integrity: sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==} + hasBin: true + + semver@6.3.1: + resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} + hasBin: true + + semver@7.6.0: + resolution: {integrity: sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==} + engines: {node: '>=10'} + hasBin: true + + semver@7.6.3: + resolution: {integrity: sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==} + engines: {node: '>=10'} + hasBin: true + + set-blocking@2.0.0: + resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==} + + set-function-length@1.2.2: + resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==} + engines: {node: '>= 0.4'} + + set-function-name@2.0.2: + resolution: {integrity: sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==} + engines: {node: '>= 0.4'} + + set-proto@1.0.0: + resolution: {integrity: sha512-RJRdvCo6IAnPdsvP/7m6bsQqNnn1FCBX5ZNtFL98MmFF/4xAIJTIg1YbHW5DC2W5SKZanrC6i4HsJqlajw/dZw==} + engines: {node: '>= 0.4'} + + set-value@2.0.1: + resolution: {integrity: sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==} + engines: {node: '>=0.10.0'} + + shallow-equal@1.2.1: + resolution: {integrity: sha512-S4vJDjHHMBaiZuT9NPb616CSmLf618jawtv3sufLl6ivK8WocjAo58cXwbRV1cgqxH0Qbv+iUt6m05eqEa2IRA==} + + shebang-command@1.2.0: + resolution: {integrity: sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==} + engines: {node: '>=0.10.0'} + + shebang-command@2.0.0: + resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} + engines: {node: '>=8'} + + shebang-regex@1.0.0: + resolution: {integrity: sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==} + engines: {node: '>=0.10.0'} + + shebang-regex@3.0.0: + resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} + engines: {node: '>=8'} + + shell-quote@1.8.2: + resolution: {integrity: sha512-AzqKpGKjrj7EM6rKVQEPpB288oCfnrEIuyoT9cyF4nmGa7V8Zk6f7RRqYisX8X9m+Q7bd632aZW4ky7EhbQztA==} + engines: {node: '>= 0.4'} + + showdown@2.1.0: + resolution: {integrity: sha512-/6NVYu4U819R2pUIk79n67SYgJHWCce0a5xTP979WbNp0FL9MN1I1QK662IDU1b6JzKTvmhgI7T7JYIxBi3kMQ==} + hasBin: true + + side-channel-list@1.0.0: + resolution: {integrity: sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==} + 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.0: + resolution: {integrity: sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==} + engines: {node: '>= 0.4'} + + signal-exit@3.0.7: + resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} + + signal-exit@4.1.0: + resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} + engines: {node: '>=14'} + + sirv@2.0.4: + resolution: {integrity: sha512-94Bdh3cC2PKrbgSOUqTiGPWVZeSiXfKOVZNJniWoqrWrRkB1CJzBU3NEbiTsPcYy1lDsANA/THzS+9WBiy5nfQ==} + engines: {node: '>= 10'} + + sisteransi@1.0.5: + resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} + + slash@3.0.0: + resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} + engines: {node: '>=8'} + + 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'} + + snapdragon-node@2.1.1: + resolution: {integrity: sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==} + engines: {node: '>=0.10.0'} + + snapdragon-util@3.0.1: + resolution: {integrity: sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==} + engines: {node: '>=0.10.0'} + + snapdragon@0.8.2: + resolution: {integrity: sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==} + engines: {node: '>=0.10.0'} + + sortablejs@1.14.0: + resolution: {integrity: sha512-pBXvQCs5/33fdN1/39pPL0NZF20LeRbLQ5jtnheIPN9JQAaufGjKdWduZn4U7wCtVuzKhmRkI0DFYHYRbB2H1w==} + + sortablejs@1.15.6: + resolution: {integrity: sha512-aNfiuwMEpfBM/CN6LY0ibyhxPfPbyFeBTYJKCvzkJ2GkUpazIt3H+QIPAMHwqQ7tMKaHz1Qj+rJJCqljnf4p3A==} + + source-map-js@1.2.1: + resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} + engines: {node: '>=0.10.0'} + + source-map-resolve@0.5.3: + resolution: {integrity: sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==} + deprecated: See https://github.com/lydell/source-map-resolve#deprecated + + source-map-support@0.5.13: + resolution: {integrity: sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==} + + source-map-support@0.5.21: + resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} + + source-map-url@0.4.1: + resolution: {integrity: sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==} + deprecated: See https://github.com/lydell/source-map-url#deprecated + + source-map@0.5.7: + resolution: {integrity: sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==} + engines: {node: '>=0.10.0'} + + source-map@0.6.1: + resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} + engines: {node: '>=0.10.0'} + + source-map@0.7.4: + resolution: {integrity: sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==} + engines: {node: '>= 8'} + + spdx-correct@3.2.0: + resolution: {integrity: sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==} + + spdx-exceptions@2.5.0: + resolution: {integrity: sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==} + + spdx-expression-parse@3.0.1: + resolution: {integrity: sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==} + + spdx-license-ids@3.0.20: + resolution: {integrity: sha512-jg25NiDV/1fLtSgEgyvVyDunvaNHbuwF9lfNV17gSmPFAlYzdfNBlLtLzXTevwkPj7DhGbmN9VnmJIgLnhvaBw==} + + split-string@3.1.0: + resolution: {integrity: sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==} + engines: {node: '>=0.10.0'} + + split2@3.2.2: + resolution: {integrity: sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg==} + + split2@4.2.0: + resolution: {integrity: sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==} + engines: {node: '>= 10.x'} + + sprintf-js@1.0.3: + resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} + + stable@0.1.8: + resolution: {integrity: sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==} + deprecated: 'Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility' + + stack-utils@2.0.6: + resolution: {integrity: sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==} + engines: {node: '>=10'} + + static-extend@0.1.2: + resolution: {integrity: sha512-72E9+uLc27Mt718pMHt9VMNiAL4LMsmDbBva8mxWUCkT07fSzEGMYUCk0XWY6lp0j6RBAG4cJ3mWuZv2OE3s0g==} + engines: {node: '>=0.10.0'} + + statuses@1.5.0: + resolution: {integrity: sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==} + engines: {node: '>= 0.6'} + + strict-uri-encode@1.1.0: + resolution: {integrity: sha512-R3f198pcvnB+5IpnBlRkphuE9n46WyVl8I39W/ZUTZLz4nqSP/oLYUrcnJrw462Ds8he4YKMov2efsTIw1BDGQ==} + engines: {node: '>=0.10.0'} + + string-argv@0.3.2: + resolution: {integrity: sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==} + engines: {node: '>=0.6.19'} + + string-length@4.0.2: + resolution: {integrity: sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==} + engines: {node: '>=10'} + + 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'} + + string.prototype.padend@3.1.6: + resolution: {integrity: sha512-XZpspuSB7vJWhvJc9DLSlrXl1mcA2BdoY5jjnS135ydXqLoqhs96JjDtCkjJEQHvfqZIp9hBuBMgI589peyx9Q==} + engines: {node: '>= 0.4'} + + string.prototype.trim@1.2.10: + resolution: {integrity: sha512-Rs66F0P/1kedk5lyYyH9uBzuiI/kNRmwJAR9quK6VOtIpZ2G+hMZd+HQbbv25MgCA6gEffoMZYxlTod4WcdrKA==} + engines: {node: '>= 0.4'} + + string.prototype.trimend@1.0.9: + resolution: {integrity: sha512-G7Ok5C6E/j4SGfyLCloXTrngQIQU3PWtXGst3yM7Bea9FRURf1S42ZHlZZtsNque2FN2PoUhfZXYLNWwEr4dLQ==} + engines: {node: '>= 0.4'} + + string.prototype.trimstart@1.0.8: + resolution: {integrity: sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==} + engines: {node: '>= 0.4'} + + string_decoder@1.3.0: + resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} + + 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.1.0: + resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==} + engines: {node: '>=12'} + + strip-bom@3.0.0: + resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} + engines: {node: '>=4'} + + strip-bom@4.0.0: + resolution: {integrity: sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==} + engines: {node: '>=8'} + + strip-final-newline@2.0.0: + resolution: {integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==} + engines: {node: '>=6'} + + strip-final-newline@3.0.0: + resolution: {integrity: sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==} + engines: {node: '>=12'} + + strip-indent@3.0.0: + resolution: {integrity: sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==} + engines: {node: '>=8'} + + strip-json-comments@3.1.1: + resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} + engines: {node: '>=8'} + + 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-prettier@9.0.5: + resolution: {integrity: sha512-U44lELgLZhbAD/xy/vncZ2Pq8sh2TnpiPvo38Ifg9+zeioR+LAkHu0i6YORIOxFafZoVg0xqQwex6e6F25S5XA==} + engines: {node: '>= 12'} + hasBin: true + peerDependencies: + stylelint: '>= 11.x < 15' + + stylelint-config-recommended-vue@1.5.0: + resolution: {integrity: sha512-65TAK/clUqkNtkZLcuytoxU0URQYlml+30Nhop7sRkCZ/mtWdXt7T+spPSB3KMKlb+82aEVJ4OrcstyDBdbosg==} + 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.12.0: + resolution: {integrity: sha512-F8zZ3L/rBpuoBZRvI4JVT20ZanPLXfQLzMOZg1tzPflRVh9mKpOZ8qcSIhh1my3FjAjZWG4T2POwGnmn6a6hbg==} + engines: {node: '>=18.12.0'} + hasBin: true + + stylis@4.3.4: + resolution: {integrity: sha512-osIBl6BGUmSfDkyH2mB7EFvCJntXDrLhKjHTRj/rK6xLH0yuPrHULDRQzKokSOD4VoorhtKpfcfW1GAntu8now==} + + supports-color@2.0.0: + resolution: {integrity: sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==} + engines: {node: '>=0.8.0'} + + supports-color@3.2.3: + resolution: {integrity: sha512-Jds2VIYDrlp5ui7t8abHN2bjAu4LV/q4N2KivFPpGH0lrka0BMq/33AmECUXlKPcHigkNaqfXRENFju+rlcy+A==} + engines: {node: '>=0.8.0'} + + supports-color@5.5.0: + resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} + engines: {node: '>=4'} + + supports-color@7.2.0: + resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} + engines: {node: '>=8'} + + supports-color@8.1.1: + resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==} + engines: {node: '>=10'} + + supports-hyperlinks@3.1.0: + resolution: {integrity: sha512-2rn0BZ+/f7puLOHZm1HOJfwBggfaHXUpPUSSG/SWM4TWp5KCfmNYwnC3hruy2rZlMnmWZ+QAGpZfchu3f3695A==} + engines: {node: '>=14.18'} + + supports-preserve-symlinks-flag@1.0.0: + resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} + engines: {node: '>= 0.4'} + + svg-baker@1.7.0: + resolution: {integrity: sha512-nibslMbkXOIkqKVrfcncwha45f97fGuAOn1G99YwnwTj8kF9YiM6XexPcUso97NxOm6GsP0SIvYVIosBis1xLg==} + + svg-tags@1.0.0: + resolution: {integrity: sha512-ovssysQTa+luh7A5Weu3Rta6FJlFBBbInjOh722LIt6klpU2/HtdUbszju/G4devcvk8PGt7FCLv5wftu3THUA==} + + svgo@2.8.0: + resolution: {integrity: sha512-+N/Q9kV1+F+UeWYoSiULYo4xYSDQlTgb+ayMobAXPwMnLvop7oxKMo9OzIrX5x3eS4L4f2UHhc9axXwY8DpChg==} + engines: {node: '>=10.13.0'} + hasBin: true + + swagger-ui-dist@5.24.1: + resolution: {integrity: sha512-ITeWc7CCAfK53u8jnV39UNqStQZjSt+bVYtJHsOEL3vVj/WV9/8HmsF8Ej4oD8r+Xk1HpWyeW/t59r1QNeAcUQ==, tarball: https://registry.npmmirror.com/swagger-ui-dist/-/swagger-ui-dist-5.24.1.tgz} + + synckit@0.9.2: + resolution: {integrity: sha512-vrozgXDQwYO72vHjUb/HnFbQx1exDjoKzqx23aXEg2a9VIg2TSFZ8FmeZpTjUCFMYw7mpX4BE2SFu8wI7asYsw==} + engines: {node: ^14.18.0 || >=16.0.0} + + table@6.9.0: + resolution: {integrity: sha512-9kY+CygyYM6j02t5YFHbNz2FN5QmYGv9zAjVp4lCDjlCw7amdckXlEt/bjMhUIfj4ThGRE4gCUH5+yGnNuPo5A==} + engines: {node: '>=10.0.0'} + + temp-dir@3.0.0: + resolution: {integrity: sha512-nHc6S/bwIilKHNRgK/3jlhDoIHcp45YgyiwcAk46Tr0LfEqGBVpmiAyuiuxeVE44m3mXnEeVhaipLOEWmH+Njw==} + engines: {node: '>=14.16'} + + tempfile@5.0.0: + resolution: {integrity: sha512-bX655WZI/F7EoTDw9JvQURqAXiPHi8o8+yFxPF2lWYyz1aHnmMRuXWqL6YB6GmeO0o4DIYWHLgGNi/X64T+X4Q==} + engines: {node: '>=14.18'} + + terser@5.37.0: + resolution: {integrity: sha512-B8wRRkmre4ERucLM/uXx4MOV5cbnOlVAqUst+1+iLKPI0dOgFO28f84ptoQt9HEI537PMzfYa/d+GEPKTRXmYA==} + engines: {node: '>=10'} + hasBin: true + + test-exclude@6.0.0: + resolution: {integrity: sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==} + engines: {node: '>=8'} + + 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==} + + throttle-debounce@5.0.2: + resolution: {integrity: sha512-B71/4oyj61iNH0KeCamLuE2rmKuTO5byTOSVwECM5FA7TiAiAW+UqTKZ9ERueC4qvgSttUhdmq1mXC3kJqGX7A==} + engines: {node: '>=12.22'} + + through2@4.0.2: + resolution: {integrity: sha512-iOqSav00cVxEEICeD7TjLB1sueEL+81Wpzp2bY17uZjZN0pWZPuo4suZ/61VujxmqSGFfgOcNuTZ85QJwNZQpw==} + + through@2.3.8: + resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} + + tiny-emitter@2.1.0: + resolution: {integrity: sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==} + + tinycolor2@1.6.0: + resolution: {integrity: sha512-XPaBkWQJdsf3pLKJV9p4qN/S+fm2Oj8AIPo1BTUhg5oxkvm9+SVEGFdhyOz7tTdUTfvxMiAs4sp6/eZO2Ew+pw==} + + tinyexec@0.3.2: + resolution: {integrity: sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==} + + tinymce@5.10.9: + resolution: {integrity: sha512-5bkrors87X9LhYX2xq8GgPHrIgJYHl87YNs+kBcjQ5I3CiUgzo/vFcGvT3MZQ9QHsEeYMhYO6a5CLGGffR8hMg==} + + tinymce@6.6.2: + resolution: {integrity: sha512-ShoaznNP3qI8dPtEnYt3ByhAJfMhzIY1K04CoFu1IPDeAxmAZCUJLgfiplo8etP4wN8zrBIxHEqpwYYb2IllOQ==} + + tmp@0.0.33: + resolution: {integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==} + engines: {node: '>=0.6.0'} + + tmpl@1.0.5: + resolution: {integrity: sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==} + + to-object-path@0.3.0: + resolution: {integrity: sha512-9mWHdnGRuh3onocaHzukyvCZhzvr6tiflAy/JRFXcJX0TjgfWA9pk9t8CMbzmBE4Jfw58pXbkngtBtqYxzNEyg==} + engines: {node: '>=0.10.0'} + + to-regex-range@2.1.1: + resolution: {integrity: sha512-ZZWNfCjUokXXDGXFpZehJIkZqq91BcULFq/Pi7M5i4JnxXdhMKAK682z8bCW3o8Hj1wuuzoKcW3DfVzaP6VuNg==} + engines: {node: '>=0.10.0'} + + to-regex-range@5.0.1: + resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} + engines: {node: '>=8.0'} + + to-regex@3.0.2: + resolution: {integrity: sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==} + engines: {node: '>=0.10.0'} + + totalist@3.0.1: + resolution: {integrity: sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==} + engines: {node: '>=6'} + + tr46@0.0.3: + resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} + + traverse@0.6.10: + resolution: {integrity: sha512-hN4uFRxbK+PX56DxYiGHsTn2dME3TVr9vbNqlQGcGcPhJAn+tdP126iA+TArMpI4YSgnTkMWyoLl5bf81Hi5TA==} + engines: {node: '>= 0.4'} + + trim-newlines@3.0.1: + resolution: {integrity: sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==} + engines: {node: '>=8'} + + ts-api-utils@1.4.3: + resolution: {integrity: sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw==} + engines: {node: '>=16'} + peerDependencies: + typescript: '>=4.2.0' + + ts-jest@29.2.5: + resolution: {integrity: sha512-KD8zB2aAZrcKIdGk4OwpJggeLcH1FgrICqDSROWqlnJXGCXK4Mn6FcdK2B6670Xr73lHMG1kHw8R87A0ecZ+vA==} + engines: {node: ^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0} + hasBin: true + peerDependencies: + '@babel/core': '>=7.0.0-beta.0 <8' + '@jest/transform': ^29.0.0 + '@jest/types': ^29.0.0 + babel-jest: ^29.0.0 + esbuild: '*' + jest: ^29.0.0 + typescript: '>=4.3 <6' + peerDependenciesMeta: + '@babel/core': + optional: true + '@jest/transform': + optional: true + '@jest/types': + optional: true + babel-jest: + optional: true + esbuild: + optional: true + + ts-node@10.9.2: + resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==} + hasBin: true + peerDependencies: + '@swc/core': '>=1.2.50' + '@swc/wasm': '>=1.2.50' + '@types/node': '*' + typescript: '>=2.7' + peerDependenciesMeta: + '@swc/core': + optional: true + '@swc/wasm': + optional: true + + tslib@1.14.1: + resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} + + tslib@2.3.0: + resolution: {integrity: sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==} + + tslib@2.8.1: + resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} + + tsutils@3.21.0: + resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} + engines: {node: '>= 6'} + peerDependencies: + typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' + + tsx@4.19.2: + resolution: {integrity: sha512-pOUl6Vo2LUq/bSa8S5q7b91cgNSjctn9ugq/+Mvow99qW6x/UZYwzxy/3NmqoT66eHYfCVvFvACC58UBPFf28g==} + engines: {node: '>=18.0.0'} + hasBin: true + + type-check@0.4.0: + resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} + engines: {node: '>= 0.8.0'} + + type-detect@4.0.8: + resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==} + engines: {node: '>=4'} + + type-fest@0.18.1: + resolution: {integrity: sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw==} + engines: {node: '>=10'} + + type-fest@0.20.2: + resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} + engines: {node: '>=10'} + + type-fest@0.21.3: + resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==} + engines: {node: '>=10'} + + type-fest@0.6.0: + resolution: {integrity: sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==} + engines: {node: '>=8'} + + type-fest@0.8.1: + resolution: {integrity: sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==} + engines: {node: '>=8'} + + type-fest@3.13.1: + resolution: {integrity: sha512-tLq3bSNx+xSpwvAJnzrK0Ep5CLNWjvFTOp71URMaAEWBfRb9nnJiBoUe0tF8bI4ZFO3omgBR6NvnbzVUT3Ly4g==} + engines: {node: '>=14.16'} + + type-fest@4.31.0: + resolution: {integrity: sha512-yCxltHW07Nkhv/1F6wWBr8kz+5BGMfP+RbRSYFnegVb0qV/UMT0G0ElBloPVerqn4M2ZV80Ir1FtCcYv1cT6vQ==} + engines: {node: '>=16'} + + typed-array-buffer@1.0.3: + resolution: {integrity: sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==} + engines: {node: '>= 0.4'} + + typed-array-byte-length@1.0.3: + resolution: {integrity: sha512-BaXgOuIxz8n8pIq3e7Atg/7s+DpiYrxn4vdot3w9KbnBhcRQq6o3xemQdIfynqSeXeDrF32x+WvfzmOjPiY9lg==} + engines: {node: '>= 0.4'} + + typed-array-byte-offset@1.0.4: + resolution: {integrity: sha512-bTlAFB/FBYMcuX81gbL4OcpH5PmlFHqlCCpAl8AlEzMz5k53oNDvN8p1PNOWLEmI2x4orp3raOFB51tv9X+MFQ==} + engines: {node: '>= 0.4'} + + typed-array-length@1.0.7: + resolution: {integrity: sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg==} + engines: {node: '>= 0.4'} + + typedarray.prototype.slice@1.0.5: + resolution: {integrity: sha512-q7QNVDGTdl702bVFiI5eY4l/HkgCM6at9KhcFbgUAzezHFbOVy4+0O/lCjsABEQwbZPravVfBIiBVGo89yzHFg==} + engines: {node: '>= 0.4'} + + typescript@4.9.5: + resolution: {integrity: sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==} + engines: {node: '>=4.2.0'} + hasBin: true + + uc.micro@2.1.0: + resolution: {integrity: sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==} + + ufo@1.5.4: + resolution: {integrity: sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ==} + + uglify-js@3.19.3: + resolution: {integrity: sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==} + engines: {node: '>=0.8.0'} + hasBin: true + + unbox-primitive@1.1.0: + resolution: {integrity: sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw==} + engines: {node: '>= 0.4'} + + unconfig@0.3.13: + resolution: {integrity: sha512-N9Ph5NC4+sqtcOjPfHrRcHekBCadCXWTBzp2VYYbySOHW0PfD9XLCeXshTXjkPYwLrBr9AtSeU0CZmkYECJhng==} + + undici-types@6.19.8: + resolution: {integrity: sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==} + + undici@6.21.0: + resolution: {integrity: sha512-BUgJXc752Kou3oOIuU1i+yZZypyZRqNPW0vqoMPl8VaoalSfeR0D8/t4iAS3yirs79SSMTxTag+ZC86uswv+Cw==} + engines: {node: '>=18.17'} + + union-value@1.0.1: + resolution: {integrity: sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==} + engines: {node: '>=0.10.0'} + + union@0.5.0: + resolution: {integrity: sha512-N6uOhuW6zO95P3Mel2I2zMsbsanvvtgn6jVqJv4vbVcz/JN0OkL9suomjQGmWtxJQXOCqUJvquc1sMeNz/IwlA==} + engines: {node: '>= 0.8.0'} + + universal-user-agent@6.0.1: + resolution: {integrity: sha512-yCzhz6FN2wU1NiiQRogkTQszlQSlpWaw8SvVegAc+bDxbzHgh1vX8uIe8OYyMH6DwH+sdTJsgMl36+mSMdRJIQ==} + + universalify@2.0.1: + resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==} + engines: {node: '>= 10.0.0'} + + unocss@0.58.9: + resolution: {integrity: sha512-aqANXXP0RrtN4kSaTLn/7I6wh8o45LUdVgPzGu7Fan2DfH2+wpIs6frlnlHlOymnb+52dp6kXluQinddaUKW1A==} + engines: {node: '>=14'} + peerDependencies: + '@unocss/webpack': 0.58.9 + vite: ^2.9.0 || ^3.0.0-0 || ^4.0.0 || ^5.0.0-0 + peerDependenciesMeta: + '@unocss/webpack': + optional: true + vite: + optional: true + + unpipe@1.0.0: + resolution: {integrity: sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==} + engines: {node: '>= 0.8'} + + unset-value@1.0.0: + resolution: {integrity: sha512-PcA2tsuGSF9cnySLHTLSh2qrQiJ70mn+r+Glzxv2TWZblxsxCC52BDlZoPCsz7STd9pN7EZetkWZBAvk4cgZdQ==} + engines: {node: '>=0.10.0'} + + update-browserslist-db@1.1.1: + resolution: {integrity: sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==} + hasBin: true + peerDependencies: + browserslist: '>= 4.21.0' + + uri-js@4.4.1: + resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} + + urix@0.1.0: + resolution: {integrity: sha512-Am1ousAhSLBeB9cG/7k7r2R0zj50uDRlZHPGbazid5s9rlF1F/QKYObEKSIunSjIOkJZqwRRLpvewjEkM7pSqg==} + deprecated: Please see https://github.com/lydell/urix#deprecated + + url-join@4.0.1: + resolution: {integrity: sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA==} + + use@3.1.1: + resolution: {integrity: sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==} + engines: {node: '>=0.10.0'} + + util-deprecate@1.0.2: + resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} + + utils-merge@1.0.1: + resolution: {integrity: sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==} + engines: {node: '>= 0.4.0'} + + uuid@9.0.1: + resolution: {integrity: sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==, tarball: https://registry.npmmirror.com/uuid/-/uuid-9.0.1.tgz} + hasBin: true + + v8-compile-cache-lib@3.0.1: + resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} + + v8-to-istanbul@9.3.0: + resolution: {integrity: sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==} + engines: {node: '>=10.12.0'} + + validate-npm-package-license@3.0.4: + resolution: {integrity: sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==} + + vanilla-picker@2.12.3: + resolution: {integrity: sha512-qVkT1E7yMbUsB2mmJNFmaXMWE2hF8ffqzMMwe9zdAikd8u2VfnsVY2HQcOUi2F38bgbxzlJBEdS1UUhOXdF9GQ==, tarball: https://registry.npmmirror.com/vanilla-picker/-/vanilla-picker-2.12.3.tgz} + + vary@1.1.2: + resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==} + engines: {node: '>= 0.8'} + + vditor@3.10.8: + resolution: {integrity: sha512-u9npjvMuGJVk0QGbpqiGAmvgiR4QvMVpNQYrvFYZ/yWDtTFLZrHmLxuUbtswotR6KY10u5kVuaoSEoBGGWQGjQ==} + + vite-plugin-compression@0.5.1: + resolution: {integrity: sha512-5QJKBDc+gNYVqL/skgFAP81Yuzo9R+EAf19d+EtsMF/i8kFUpNi3J/H01QD3Oo8zBQn+NzoCIFkpPLynoOzaJg==} + peerDependencies: + vite: '>=2.0.0' + + vite-plugin-html@3.2.2: + resolution: {integrity: sha512-vb9C9kcdzcIo/Oc3CLZVS03dL5pDlOFuhGlZYDCJ840BhWl/0nGeZWf3Qy7NlOayscY4Cm/QRgULCQkEZige5Q==} + peerDependencies: + vite: '>=2.0.0' + + vite-plugin-mkcert@1.17.6: + resolution: {integrity: sha512-4JR1RN0HEg/w17eRQJ/Ve2pSa6KCVQcQO6yKtIaKQCFDyd63zGfXHWpygBkvvRSpqa0GcqNKf0fjUJ0HiJQXVQ==} + engines: {node: '>=v16.7.0'} + peerDependencies: + vite: '>=3' + + vite-plugin-mock@2.9.8: + resolution: {integrity: sha512-YTQM5Sn7t+/DNOwTkr+W26QGTCk1PrDkhGHslTJ90lIPJhJtDTwuSkEYMAuLP9TcVQ/qExTFx/x/GE3kxJ05sw==} + engines: {node: '>=12.0.0'} + peerDependencies: + mockjs: '>=1.1.0' + vite: '>=2.0.0' + + vite-plugin-optimize-persist@0.1.2: + resolution: {integrity: sha512-H/Ebn2kZO8PvwUF08SsT5K5xMJNCWKoGX71+e9/ER3yNj7GHiFjNQlvGg5ih/zEx09MZ9m7WCxOwmEKbeIVzww==} + peerDependencies: + vite: ^2.0.0 + vite-plugin-package-config: ^0.1.0 + + vite-plugin-package-config@0.1.1: + resolution: {integrity: sha512-w9B3I8ZnqoyhlbzimXjXNk85imrMZgvI9m8f6j3zonK5IVA5KXzpT+PZOHlDz8lqh1vqvoEI1uhy+ZDoLAiA/w==} + peerDependencies: + vite: ^2.0.0 + + vite-plugin-purge-icons@0.10.0: + resolution: {integrity: sha512-4fMJKQuBu9lAPJWjqGEytRaxty1pP9bWgQLA68dwbbaCXu6NBrOUb/3kMaUc7TP09kerEk+qTriCk05OZXpjwA==} + engines: {node: '>= 12'} + peerDependencies: + vite: '>=2' + + vite-plugin-qiankun@1.0.15: + resolution: {integrity: sha512-0QB0Wr8Eu/LGcuJAfuNXDb7BAFDszo3GCxq4bzgXdSFAlK425u1/UGMxaDEBVA1uPFrLsZPzig83Ufdfl6J45A==} + peerDependencies: + typescript: '>=4' + vite: '>=2' + + vite-plugin-svg-icons@2.0.1: + resolution: {integrity: sha512-6ktD+DhV6Rz3VtedYvBKKVA2eXF+sAQVaKkKLDSqGUfnhqXl3bj5PPkVTl3VexfTuZy66PmINi8Q6eFnVfRUmA==} + peerDependencies: + vite: '>=2.0.0' + + vite-plugin-vue-setup-extend-plus@0.1.0: + resolution: {integrity: sha512-pa27KIsHIBvBMv4xz9uB3UCfAuP2tr7PLlFhCS9vw+aXd326LEHsvhqd3hCQDOR5MjlQVyQH6vwuGr3u+KRiiw==} + + vite@6.0.7: + resolution: {integrity: sha512-RDt8r/7qx9940f8FcOIAH9PTViRrghKaK2K1jY3RaAURrEUbm9Du1mJ72G+jlhtG3WwodnfzY8ORQZbBavZEAQ==} + engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} + hasBin: true + peerDependencies: + '@types/node': ^18.0.0 || ^20.0.0 || >=22.0.0 + jiti: '>=1.21.0' + less: '*' + lightningcss: ^1.21.0 + sass: '*' + sass-embedded: '*' + stylus: '*' + sugarss: '*' + terser: ^5.16.0 + tsx: ^4.8.1 + yaml: ^2.4.2 + 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 + + vue-component-type-helpers@2.2.0: + resolution: {integrity: sha512-cYrAnv2me7bPDcg9kIcGwjJiSB6Qyi08+jLDo9yuvoFQjzHiPTzML7RnkJB1+3P6KMsX/KbCD4QE3Tv/knEllw==} + + vue-cropper@0.6.5: + resolution: {integrity: sha512-lSvY6IpeA/Tv/iPZ/FOkMHVRBPSlm7t57nuHEZFBMRNOH8ElvfqVlnHGDOAMlvPhh9gHiddiQoASS+fY0MFX0g==} + + vue-cropperjs@5.0.0: + resolution: {integrity: sha512-RhnC8O33uRZNkn74aiHZwNHnBJOXWlS4P6gsRI0lw4cZlWjKSCywZI9oSI9POlIPI6OYv30jvnHMXGch85tw7w==} + peerDependencies: + vue: '>=3.0.0' + + 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-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.2: + resolution: {integrity: sha512-JK9Pm80OqssGJU2Y6F7DcM8RFHqVG4WkuCqOZTVsXkEzZME7ABejAUqUdA931zEBedc4thBgSUWxeQh4uocJAQ==} + engines: {node: '>= 16'} + peerDependencies: + vue: ^3.0.0 + + vue-infinite-scroll@2.0.2: + resolution: {integrity: sha512-n+YghR059YmciANGJh9SsNWRi1YZEBVlODtmnb/12zI+4R72QZSWd+EuZ5mW6auEo/yaJXgxzwsuhvALVnm73A==} + + vue-print-nb-jeecg@1.0.12: + resolution: {integrity: sha512-jHyWm6/TxB1iU2nHL7upQdHVdxb1SJQ9n3XKeYTaruFdbSphLo1vDtTunS2qVCjupk8lui7FlF5rxxSNr0zjZg==} + + vue-router@4.5.0: + resolution: {integrity: sha512-HDuk+PuH5monfNuY+ct49mNmkCRK4xJAV9Ts4z9UFc4rzdDnxQLyCMGGc8pKhZhHTVzfanpNwB/lwqevcBwI4w==} + peerDependencies: + vue: ^3.2.0 + + vue-template-compiler@2.7.16: + resolution: {integrity: sha512-AYbUWAJHLGGQM7+cNTELw+KsOG9nl2CnSv467WobS5Cv9uk3wFcnr1Etsz2sEIHEZvw1U+o9mRlEO6QbZvUPGQ==} + + vue-tsc@1.8.27: + resolution: {integrity: sha512-WesKCAZCRAbmmhuGl3+VrdWItEvfoFIPXOvUJkjULi+x+6G/Dy69yO3TBRJDr9eUlmsNAwVmxsNZxvHKzbkKdg==} + hasBin: true + peerDependencies: + typescript: '*' + + vue-types@3.0.2: + resolution: {integrity: sha512-IwUC0Aq2zwaXqy74h4WCvFCUtoV0iSWr0snWnE9TnU18S66GAQyqQbRf2qfJtUuiFsBf6qp0MEwdonlwznlcrw==} + engines: {node: '>=10.15.0'} + peerDependencies: + vue: ^3.0.0 + + 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 + + vue@3.5.13: + resolution: {integrity: sha512-wmeiSMxkZCSc+PM2w2VRsOYAZC8GdipNFRTsLSfodVqI9mbejKeXEGr8SckuLnrQPGe3oJN5c3K0vpoU9q/wCQ==} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + vuedraggable@4.1.0: + resolution: {integrity: sha512-FU5HCWBmsf20GpP3eudURW3WdWTKIbEIQxh9/8GE806hydR9qZqRRxRE3RjqX7PkuLuMQG/A7n3cfj9rCEchww==} + peerDependencies: + vue: ^3.0.1 + + vxe-pc-ui@4.6.12: + resolution: {integrity: sha512-57sRB/ksP8ip4l0hPcph5qXt/qGlrCjO2/Y6ZL4sHkGdb+CBWgbzvUPcq3GYgSSPdZg+Ae++UcGqgRGMZss+RQ==, tarball: https://registry.npmmirror.com/vxe-pc-ui/-/vxe-pc-ui-4.6.12.tgz} + + vxe-table-plugin-antd@4.0.8: + resolution: {integrity: sha512-/ZGw8Iz0R6YfDnf7FL3A0VZpQnxEjRnfE0DW4dQTuLnFCP6UmQqQuKVWU9Vj7vPGM3x3p8rwAVHtU8YtMCXZqQ==, tarball: https://registry.npmmirror.com/vxe-table-plugin-antd/-/vxe-table-plugin-antd-4.0.8.tgz} + peerDependencies: + vxe-table: ^4.5.0 + + vxe-table@4.13.31: + resolution: {integrity: sha512-ibSM7jXYwJyY+eqXoRy/yXEVLENGFzL96cOEwtnFjBYbbaZV6/ptlM3tsyewGFBCUo5AtIyM+98hswxfjyXxMA==, tarball: https://registry.npmmirror.com/vxe-table/-/vxe-table-4.13.31.tgz} + + walker@1.0.8: + resolution: {integrity: sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==} + + warning@4.0.3: + resolution: {integrity: sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w==} + + wcwidth@1.0.1: + resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} + + webidl-conversions@3.0.1: + resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} + + whatwg-encoding@2.0.0: + resolution: {integrity: sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==} + engines: {node: '>=12'} + + whatwg-encoding@3.1.1: + resolution: {integrity: sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==} + engines: {node: '>=18'} + + whatwg-mimetype@4.0.0: + resolution: {integrity: sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==} + engines: {node: '>=18'} + + whatwg-url@5.0.0: + resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} + + which-boxed-primitive@1.1.1: + resolution: {integrity: sha512-TbX3mj8n0odCBFVlY8AxkqcHASw3L60jIuF8jFP78az3C2YhmGvqbHBpAjTRH2/xqYunrJ9g1jSyjCjpoWzIAA==} + engines: {node: '>= 0.4'} + + which-builtin-type@1.2.1: + resolution: {integrity: sha512-6iBczoX+kDQ7a3+YJBnh3T+KZRxM/iYNPXicqk66/Qfm1b93iu+yOImkg0zHbj5LNOcNv1TEADiZ0xa34B4q6Q==} + engines: {node: '>= 0.4'} + + which-collection@1.0.2: + resolution: {integrity: sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==} + engines: {node: '>= 0.4'} + + which-module@2.0.1: + resolution: {integrity: sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==} + + which-typed-array@1.1.18: + resolution: {integrity: sha512-qEcY+KJYlWyLH9vNbsr6/5j59AXk5ni5aakf8ldzBvGde6Iz4sxZGkJyWSAueTG7QhOvNRYb1lDdFmL5Td0QKA==} + engines: {node: '>= 0.4'} + + 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 + + word-wrap@1.2.5: + resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} + engines: {node: '>=0.10.0'} + + wordwrap@1.0.0: + resolution: {integrity: sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==} + + 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@4.0.2: + resolution: {integrity: sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + + write-file-atomic@5.0.1: + resolution: {integrity: sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + + xe-utils@3.5.26: + resolution: {integrity: sha512-u9R7RqWDumamToEelrCv2nVA2PBJSPPUubvmiMcuHeFxwbYeBsouoi/opejmr7AdPlSj92FifF7IKFzFrczU7w==} + + xe-utils@3.7.5: + resolution: {integrity: sha512-wDjqnXw02EQxf2jqlE1nhvT9HP3PDVcyrol5whDJN/NOvnMyXIzcwEiPB/H2T3aq07f2QQXsSs4Z8g5L3BVH5A==, tarball: https://registry.npmmirror.com/xe-utils/-/xe-utils-3.7.5.tgz} + + xml-name-validator@4.0.0: + resolution: {integrity: sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==} + engines: {node: '>=12'} + + xss@1.0.15: + resolution: {integrity: sha512-FVdlVVC67WOIPvfOwhoMETV72f6GbW7aOabBC3WxN/oUdoEMDyLz4OgRv5/gck2ZeNqEQu+Tb0kloovXOfpYVg==} + engines: {node: '>= 0.10.0'} + hasBin: true + + 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==} + + yallist@4.0.0: + resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} + + yaml@2.3.4: + resolution: {integrity: sha512-8aAvwVUSHpfEqTQ4w/KMlf3HcRdt50E5ODIQJBw1fQ5RL34xabzxtUlzTXVqc4rkZsPbvrXKWnABCD7kWSmocA==} + engines: {node: '>= 14'} + + yargs-parser@18.1.3: + resolution: {integrity: sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==} + engines: {node: '>=6'} + + yargs-parser@20.2.9: + resolution: {integrity: sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==} + engines: {node: '>=10'} + + 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'} + + yn@3.1.1: + resolution: {integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==} + engines: {node: '>=6'} + + 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'} + + yoctocolors-cjs@2.1.2: + resolution: {integrity: sha512-cYVsTjKl8b+FrnidjibDWskAv7UKOfcwaVZdp/it9n1s9fU3IkgDbhdIRKCW4JDsAlECJY0ytoVPT3sK6kideA==} + engines: {node: '>=18'} + + zrender@5.6.1: + resolution: {integrity: sha512-OFXkDJKcrlx5su2XbzJvj/34Q3m6PvyCZkVPHGYpcCJ52ek4U/ymZyfuV1nKE23AyBJ51E/6Yr0mhZ7xGTO4ag==} + +snapshots: + + '@ampproject/remapping@2.3.0': + dependencies: + '@jridgewell/gen-mapping': 0.3.8 + '@jridgewell/trace-mapping': 0.3.25 + + '@ant-design/colors@6.0.0': + dependencies: + '@ctrl/tinycolor': 3.6.1 + + '@ant-design/colors@7.2.0': + dependencies: + '@ant-design/fast-color': 2.0.6 + + '@ant-design/fast-color@2.0.6': + dependencies: + '@babel/runtime': 7.26.0 + + '@ant-design/icons-svg@4.4.2': {} + + '@ant-design/icons-vue@7.0.1(vue@3.5.13(typescript@4.9.5))': + dependencies: + '@ant-design/colors': 6.0.0 + '@ant-design/icons-svg': 4.4.2 + vue: 3.5.13(typescript@4.9.5) + + '@antfu/install-pkg@0.4.1': + dependencies: + package-manager-detector: 0.2.8 + tinyexec: 0.3.2 + + '@antfu/utils@0.7.10': {} + + '@antv/hierarchy@0.6.14': {} + + '@babel/code-frame@7.26.2': + dependencies: + '@babel/helper-validator-identifier': 7.25.9 + js-tokens: 4.0.0 + picocolors: 1.1.1 + + '@babel/compat-data@7.26.3': {} + + '@babel/core@7.26.0': + dependencies: + '@ampproject/remapping': 2.3.0 + '@babel/code-frame': 7.26.2 + '@babel/generator': 7.26.3 + '@babel/helper-compilation-targets': 7.25.9 + '@babel/helper-module-transforms': 7.26.0(@babel/core@7.26.0) + '@babel/helpers': 7.26.0 + '@babel/parser': 7.26.3 + '@babel/template': 7.25.9 + '@babel/traverse': 7.26.4 + '@babel/types': 7.26.3 + convert-source-map: 2.0.0 + debug: 4.4.0 + gensync: 1.0.0-beta.2 + json5: 2.2.3 + semver: 6.3.1 + transitivePeerDependencies: + - supports-color + + '@babel/generator@7.26.3': + dependencies: + '@babel/parser': 7.26.3 + '@babel/types': 7.26.3 + '@jridgewell/gen-mapping': 0.3.8 + '@jridgewell/trace-mapping': 0.3.25 + jsesc: 3.1.0 + + '@babel/helper-annotate-as-pure@7.25.9': + dependencies: + '@babel/types': 7.26.3 + + '@babel/helper-compilation-targets@7.25.9': + dependencies: + '@babel/compat-data': 7.26.3 + '@babel/helper-validator-option': 7.25.9 + browserslist: 4.24.3 + lru-cache: 5.1.1 + semver: 6.3.1 + + '@babel/helper-create-class-features-plugin@7.25.9(@babel/core@7.26.0)': + dependencies: + '@babel/core': 7.26.0 + '@babel/helper-annotate-as-pure': 7.25.9 + '@babel/helper-member-expression-to-functions': 7.25.9 + '@babel/helper-optimise-call-expression': 7.25.9 + '@babel/helper-replace-supers': 7.25.9(@babel/core@7.26.0) + '@babel/helper-skip-transparent-expression-wrappers': 7.25.9 + '@babel/traverse': 7.26.4 + semver: 6.3.1 + transitivePeerDependencies: + - supports-color + + '@babel/helper-member-expression-to-functions@7.25.9': + dependencies: + '@babel/traverse': 7.26.4 + '@babel/types': 7.26.3 + transitivePeerDependencies: + - supports-color + + '@babel/helper-module-imports@7.25.9': + dependencies: + '@babel/traverse': 7.26.4 + '@babel/types': 7.26.3 + transitivePeerDependencies: + - supports-color + + '@babel/helper-module-transforms@7.26.0(@babel/core@7.26.0)': + dependencies: + '@babel/core': 7.26.0 + '@babel/helper-module-imports': 7.25.9 + '@babel/helper-validator-identifier': 7.25.9 + '@babel/traverse': 7.26.4 + transitivePeerDependencies: + - supports-color + + '@babel/helper-optimise-call-expression@7.25.9': + dependencies: + '@babel/types': 7.26.3 + + '@babel/helper-plugin-utils@7.25.9': {} + + '@babel/helper-replace-supers@7.25.9(@babel/core@7.26.0)': + dependencies: + '@babel/core': 7.26.0 + '@babel/helper-member-expression-to-functions': 7.25.9 + '@babel/helper-optimise-call-expression': 7.25.9 + '@babel/traverse': 7.26.4 + transitivePeerDependencies: + - supports-color + + '@babel/helper-skip-transparent-expression-wrappers@7.25.9': + dependencies: + '@babel/traverse': 7.26.4 + '@babel/types': 7.26.3 + transitivePeerDependencies: + - supports-color + + '@babel/helper-string-parser@7.25.9': {} + + '@babel/helper-validator-identifier@7.25.9': {} + + '@babel/helper-validator-option@7.25.9': {} + + '@babel/helpers@7.26.0': + dependencies: + '@babel/template': 7.25.9 + '@babel/types': 7.26.3 + + '@babel/parser@7.26.3': + dependencies: + '@babel/types': 7.26.3 + + '@babel/plugin-syntax-async-generators@7.8.4(@babel/core@7.26.0)': + dependencies: + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 + + '@babel/plugin-syntax-bigint@7.8.3(@babel/core@7.26.0)': + dependencies: + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 + + '@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.26.0)': + dependencies: + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 + + '@babel/plugin-syntax-class-static-block@7.14.5(@babel/core@7.26.0)': + dependencies: + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 + + '@babel/plugin-syntax-import-attributes@7.26.0(@babel/core@7.26.0)': + dependencies: + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 + + '@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.26.0)': + dependencies: + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 + + '@babel/plugin-syntax-json-strings@7.8.3(@babel/core@7.26.0)': + dependencies: + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 + + '@babel/plugin-syntax-jsx@7.25.9(@babel/core@7.26.0)': + dependencies: + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 + + '@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.26.0)': + dependencies: + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 + + '@babel/plugin-syntax-nullish-coalescing-operator@7.8.3(@babel/core@7.26.0)': + dependencies: + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 + + '@babel/plugin-syntax-numeric-separator@7.10.4(@babel/core@7.26.0)': + dependencies: + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 + + '@babel/plugin-syntax-object-rest-spread@7.8.3(@babel/core@7.26.0)': + dependencies: + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 + + '@babel/plugin-syntax-optional-catch-binding@7.8.3(@babel/core@7.26.0)': + dependencies: + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 + + '@babel/plugin-syntax-optional-chaining@7.8.3(@babel/core@7.26.0)': + dependencies: + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 + + '@babel/plugin-syntax-private-property-in-object@7.14.5(@babel/core@7.26.0)': + dependencies: + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 + + '@babel/plugin-syntax-top-level-await@7.14.5(@babel/core@7.26.0)': + dependencies: + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 + + '@babel/plugin-syntax-typescript@7.25.9(@babel/core@7.26.0)': + dependencies: + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 + + '@babel/plugin-transform-modules-commonjs@7.26.3(@babel/core@7.26.0)': + dependencies: + '@babel/core': 7.26.0 + '@babel/helper-module-transforms': 7.26.0(@babel/core@7.26.0) + '@babel/helper-plugin-utils': 7.25.9 + transitivePeerDependencies: + - supports-color + + '@babel/plugin-transform-typescript@7.26.3(@babel/core@7.26.0)': + dependencies: + '@babel/core': 7.26.0 + '@babel/helper-annotate-as-pure': 7.25.9 + '@babel/helper-create-class-features-plugin': 7.25.9(@babel/core@7.26.0) + '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-skip-transparent-expression-wrappers': 7.25.9 + '@babel/plugin-syntax-typescript': 7.25.9(@babel/core@7.26.0) + transitivePeerDependencies: + - supports-color + + '@babel/preset-typescript@7.26.0(@babel/core@7.26.0)': + dependencies: + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-validator-option': 7.25.9 + '@babel/plugin-syntax-jsx': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-modules-commonjs': 7.26.3(@babel/core@7.26.0) + '@babel/plugin-transform-typescript': 7.26.3(@babel/core@7.26.0) + transitivePeerDependencies: + - supports-color + + '@babel/runtime@7.26.0': + dependencies: + regenerator-runtime: 0.14.1 + + '@babel/template@7.25.9': + dependencies: + '@babel/code-frame': 7.26.2 + '@babel/parser': 7.26.3 + '@babel/types': 7.26.3 + + '@babel/traverse@7.26.4': + dependencies: + '@babel/code-frame': 7.26.2 + '@babel/generator': 7.26.3 + '@babel/parser': 7.26.3 + '@babel/template': 7.25.9 + '@babel/types': 7.26.3 + debug: 4.4.0 + globals: 11.12.0 + transitivePeerDependencies: + - supports-color + + '@babel/types@7.26.3': + dependencies: + '@babel/helper-string-parser': 7.25.9 + '@babel/helper-validator-identifier': 7.25.9 + + '@bcoe/v8-coverage@0.2.3': {} + + '@commitlint/cli@18.6.1(@types/node@20.17.12)(typescript@4.9.5)': + dependencies: + '@commitlint/format': 18.6.1 + '@commitlint/lint': 18.6.1 + '@commitlint/load': 18.6.1(@types/node@20.17.12)(typescript@4.9.5) + '@commitlint/read': 18.6.1 + '@commitlint/types': 18.6.1 + execa: 5.1.1 + lodash.isfunction: 3.0.9 + resolve-from: 5.0.0 + resolve-global: 1.0.0 + yargs: 17.7.2 + transitivePeerDependencies: + - '@types/node' + - typescript + + '@commitlint/config-conventional@18.6.3': + dependencies: + '@commitlint/types': 18.6.1 + conventional-changelog-conventionalcommits: 7.0.2 + + '@commitlint/config-validator@18.6.1': + dependencies: + '@commitlint/types': 18.6.1 + ajv: 8.17.1 + + '@commitlint/config-validator@19.5.0': + dependencies: + '@commitlint/types': 19.5.0 + ajv: 8.17.1 + optional: true + + '@commitlint/ensure@18.6.1': + dependencies: + '@commitlint/types': 18.6.1 + 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@18.6.1': {} + + '@commitlint/execute-rule@19.5.0': + optional: true + + '@commitlint/format@18.6.1': + dependencies: + '@commitlint/types': 18.6.1 + chalk: 4.1.2 + + '@commitlint/is-ignored@18.6.1': + dependencies: + '@commitlint/types': 18.6.1 + semver: 7.6.0 + + '@commitlint/lint@18.6.1': + dependencies: + '@commitlint/is-ignored': 18.6.1 + '@commitlint/parse': 18.6.1 + '@commitlint/rules': 18.6.1 + '@commitlint/types': 18.6.1 + + '@commitlint/load@18.6.1(@types/node@20.17.12)(typescript@4.9.5)': + dependencies: + '@commitlint/config-validator': 18.6.1 + '@commitlint/execute-rule': 18.6.1 + '@commitlint/resolve-extends': 18.6.1 + '@commitlint/types': 18.6.1 + chalk: 4.1.2 + cosmiconfig: 8.3.6(typescript@4.9.5) + cosmiconfig-typescript-loader: 5.1.0(@types/node@20.17.12)(cosmiconfig@8.3.6(typescript@4.9.5))(typescript@4.9.5) + lodash.isplainobject: 4.0.6 + lodash.merge: 4.6.2 + lodash.uniq: 4.5.0 + resolve-from: 5.0.0 + transitivePeerDependencies: + - '@types/node' + - typescript + + '@commitlint/load@19.6.1(@types/node@20.17.12)(typescript@4.9.5)': + 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.4.1 + cosmiconfig: 9.0.0(typescript@4.9.5) + cosmiconfig-typescript-loader: 6.1.0(@types/node@20.17.12)(cosmiconfig@9.0.0(typescript@4.9.5))(typescript@4.9.5) + lodash.isplainobject: 4.0.6 + lodash.merge: 4.6.2 + lodash.uniq: 4.5.0 + transitivePeerDependencies: + - '@types/node' + - typescript + optional: true + + '@commitlint/message@18.6.1': {} + + '@commitlint/parse@18.6.1': + dependencies: + '@commitlint/types': 18.6.1 + conventional-changelog-angular: 7.0.0 + conventional-commits-parser: 5.0.0 + + '@commitlint/read@18.6.1': + dependencies: + '@commitlint/top-level': 18.6.1 + '@commitlint/types': 18.6.1 + git-raw-commits: 2.0.11 + minimist: 1.2.8 + + '@commitlint/resolve-extends@18.6.1': + dependencies: + '@commitlint/config-validator': 18.6.1 + '@commitlint/types': 18.6.1 + import-fresh: 3.3.0 + lodash.mergewith: 4.6.2 + resolve-from: 5.0.0 + resolve-global: 1.0.0 + + '@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 + optional: true + + '@commitlint/rules@18.6.1': + dependencies: + '@commitlint/ensure': 18.6.1 + '@commitlint/message': 18.6.1 + '@commitlint/to-lines': 18.6.1 + '@commitlint/types': 18.6.1 + execa: 5.1.1 + + '@commitlint/to-lines@18.6.1': {} + + '@commitlint/top-level@18.6.1': + dependencies: + find-up: 5.0.0 + + '@commitlint/types@18.6.1': + dependencies: + chalk: 4.1.2 + + '@commitlint/types@19.5.0': + dependencies: + '@types/conventional-commits-parser': 5.0.1 + chalk: 5.4.1 + optional: true + + '@cspotcode/source-map-support@0.8.1': + dependencies: + '@jridgewell/trace-mapping': 0.3.9 + + '@csstools/css-parser-algorithms@3.0.4(@csstools/css-tokenizer@3.0.3)': + dependencies: + '@csstools/css-tokenizer': 3.0.3 + + '@csstools/css-tokenizer@3.0.3': {} + + '@csstools/media-query-list-parser@4.0.2(@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/selector-specificity@5.0.0(postcss-selector-parser@7.0.0)': + dependencies: + postcss-selector-parser: 7.0.0 + + '@ctrl/tinycolor@3.6.1': {} + + '@dual-bundle/import-meta-resolve@4.1.0': {} + + '@emotion/hash@0.9.2': {} + + '@emotion/unitless@0.8.1': {} + + '@esbuild/aix-ppc64@0.23.1': + optional: true + + '@esbuild/aix-ppc64@0.24.2': + optional: true + + '@esbuild/android-arm64@0.23.1': + optional: true + + '@esbuild/android-arm64@0.24.2': + optional: true + + '@esbuild/android-arm@0.23.1': + optional: true + + '@esbuild/android-arm@0.24.2': + optional: true + + '@esbuild/android-x64@0.23.1': + optional: true + + '@esbuild/android-x64@0.24.2': + optional: true + + '@esbuild/darwin-arm64@0.23.1': + optional: true + + '@esbuild/darwin-arm64@0.24.2': + optional: true + + '@esbuild/darwin-x64@0.23.1': + optional: true + + '@esbuild/darwin-x64@0.24.2': + optional: true + + '@esbuild/freebsd-arm64@0.23.1': + optional: true + + '@esbuild/freebsd-arm64@0.24.2': + optional: true + + '@esbuild/freebsd-x64@0.23.1': + optional: true + + '@esbuild/freebsd-x64@0.24.2': + optional: true + + '@esbuild/linux-arm64@0.23.1': + optional: true + + '@esbuild/linux-arm64@0.24.2': + optional: true + + '@esbuild/linux-arm@0.23.1': + optional: true + + '@esbuild/linux-arm@0.24.2': + optional: true + + '@esbuild/linux-ia32@0.23.1': + optional: true + + '@esbuild/linux-ia32@0.24.2': + optional: true + + '@esbuild/linux-loong64@0.14.54': + optional: true + + '@esbuild/linux-loong64@0.23.1': + optional: true + + '@esbuild/linux-loong64@0.24.2': + optional: true + + '@esbuild/linux-mips64el@0.23.1': + optional: true + + '@esbuild/linux-mips64el@0.24.2': + optional: true + + '@esbuild/linux-ppc64@0.23.1': + optional: true + + '@esbuild/linux-ppc64@0.24.2': + optional: true + + '@esbuild/linux-riscv64@0.23.1': + optional: true + + '@esbuild/linux-riscv64@0.24.2': + optional: true + + '@esbuild/linux-s390x@0.23.1': + optional: true + + '@esbuild/linux-s390x@0.24.2': + optional: true + + '@esbuild/linux-x64@0.23.1': + optional: true + + '@esbuild/linux-x64@0.24.2': + optional: true + + '@esbuild/netbsd-arm64@0.24.2': + optional: true + + '@esbuild/netbsd-x64@0.23.1': + optional: true + + '@esbuild/netbsd-x64@0.24.2': + optional: true + + '@esbuild/openbsd-arm64@0.23.1': + optional: true + + '@esbuild/openbsd-arm64@0.24.2': + optional: true + + '@esbuild/openbsd-x64@0.23.1': + optional: true + + '@esbuild/openbsd-x64@0.24.2': + optional: true + + '@esbuild/sunos-x64@0.23.1': + optional: true + + '@esbuild/sunos-x64@0.24.2': + optional: true + + '@esbuild/win32-arm64@0.23.1': + optional: true + + '@esbuild/win32-arm64@0.24.2': + optional: true + + '@esbuild/win32-ia32@0.23.1': + optional: true + + '@esbuild/win32-ia32@0.24.2': + optional: true + + '@esbuild/win32-x64@0.23.1': + optional: true + + '@esbuild/win32-x64@0.24.2': + optional: true + + '@eslint-community/eslint-utils@4.4.1(eslint@8.57.1)': + dependencies: + eslint: 8.57.1 + eslint-visitor-keys: 3.4.3 + + '@eslint-community/regexpp@4.12.1': {} + + '@eslint/eslintrc@2.1.4': + dependencies: + ajv: 6.12.6 + debug: 4.4.0 + espree: 9.6.1 + globals: 13.24.0 + ignore: 5.3.2 + import-fresh: 3.3.0 + js-yaml: 4.1.0 + minimatch: 3.1.2 + strip-json-comments: 3.1.1 + transitivePeerDependencies: + - supports-color + + '@eslint/js@8.57.1': {} + + '@humanwhocodes/config-array@0.13.0': + dependencies: + '@humanwhocodes/object-schema': 2.0.3 + debug: 4.4.0 + minimatch: 3.1.2 + transitivePeerDependencies: + - supports-color + + '@humanwhocodes/module-importer@1.0.1': {} + + '@humanwhocodes/object-schema@2.0.3': {} + + '@hutson/parse-repository-url@5.0.0': {} + + '@iconify/iconify@2.1.2': + dependencies: + cross-fetch: 3.2.0 + transitivePeerDependencies: + - encoding + + '@iconify/iconify@3.1.1': + dependencies: + '@iconify/types': 2.0.0 + + '@iconify/json@2.2.292': + dependencies: + '@iconify/types': 2.0.0 + pathe: 1.1.2 + + '@iconify/types@2.0.0': {} + + '@iconify/utils@2.2.1': + dependencies: + '@antfu/install-pkg': 0.4.1 + '@antfu/utils': 0.7.10 + '@iconify/types': 2.0.0 + debug: 4.4.0 + globals: 15.14.0 + kolorist: 1.8.0 + local-pkg: 0.5.1 + mlly: 1.7.3 + transitivePeerDependencies: + - supports-color + + '@inquirer/figures@1.0.9': {} + + '@intlify/core-base@9.14.2': + dependencies: + '@intlify/message-compiler': 9.14.2 + '@intlify/shared': 9.14.2 + + '@intlify/message-compiler@9.14.2': + dependencies: + '@intlify/shared': 9.14.2 + source-map-js: 1.2.1 + + '@intlify/shared@9.14.2': {} + + '@isaacs/cliui@8.0.2': + dependencies: + string-width: 5.1.2 + string-width-cjs: string-width@4.2.3 + strip-ansi: 7.1.0 + strip-ansi-cjs: strip-ansi@6.0.1 + wrap-ansi: 8.1.0 + wrap-ansi-cjs: wrap-ansi@7.0.0 + + '@istanbuljs/load-nyc-config@1.1.0': + dependencies: + camelcase: 5.3.1 + find-up: 4.1.0 + get-package-type: 0.1.0 + js-yaml: 3.14.1 + resolve-from: 5.0.0 + + '@istanbuljs/schema@0.1.3': {} + + '@jeecg/aiflow@1.1.1': {} + + '@jeecg/online@3.7.4': {} + + '@jest/console@29.7.0': + dependencies: + '@jest/types': 29.6.3 + '@types/node': 20.17.12 + chalk: 4.1.2 + jest-message-util: 29.7.0 + jest-util: 29.7.0 + slash: 3.0.0 + + '@jest/core@29.7.0(ts-node@10.9.2(@types/node@20.17.12)(typescript@4.9.5))': + dependencies: + '@jest/console': 29.7.0 + '@jest/reporters': 29.7.0 + '@jest/test-result': 29.7.0 + '@jest/transform': 29.7.0 + '@jest/types': 29.6.3 + '@types/node': 20.17.12 + ansi-escapes: 4.3.2 + chalk: 4.1.2 + ci-info: 3.9.0 + exit: 0.1.2 + graceful-fs: 4.2.11 + jest-changed-files: 29.7.0 + jest-config: 29.7.0(@types/node@20.17.12)(ts-node@10.9.2(@types/node@20.17.12)(typescript@4.9.5)) + jest-haste-map: 29.7.0 + jest-message-util: 29.7.0 + jest-regex-util: 29.6.3 + jest-resolve: 29.7.0 + jest-resolve-dependencies: 29.7.0 + jest-runner: 29.7.0 + jest-runtime: 29.7.0 + jest-snapshot: 29.7.0 + jest-util: 29.7.0 + jest-validate: 29.7.0 + jest-watcher: 29.7.0 + micromatch: 4.0.8 + pretty-format: 29.7.0 + slash: 3.0.0 + strip-ansi: 6.0.1 + transitivePeerDependencies: + - babel-plugin-macros + - supports-color + - ts-node + + '@jest/environment@29.7.0': + dependencies: + '@jest/fake-timers': 29.7.0 + '@jest/types': 29.6.3 + '@types/node': 20.17.12 + jest-mock: 29.7.0 + + '@jest/expect-utils@29.7.0': + dependencies: + jest-get-type: 29.6.3 + + '@jest/expect@29.7.0': + dependencies: + expect: 29.7.0 + jest-snapshot: 29.7.0 + transitivePeerDependencies: + - supports-color + + '@jest/fake-timers@29.7.0': + dependencies: + '@jest/types': 29.6.3 + '@sinonjs/fake-timers': 10.3.0 + '@types/node': 20.17.12 + jest-message-util: 29.7.0 + jest-mock: 29.7.0 + jest-util: 29.7.0 + + '@jest/globals@29.7.0': + dependencies: + '@jest/environment': 29.7.0 + '@jest/expect': 29.7.0 + '@jest/types': 29.6.3 + jest-mock: 29.7.0 + transitivePeerDependencies: + - supports-color + + '@jest/reporters@29.7.0': + dependencies: + '@bcoe/v8-coverage': 0.2.3 + '@jest/console': 29.7.0 + '@jest/test-result': 29.7.0 + '@jest/transform': 29.7.0 + '@jest/types': 29.6.3 + '@jridgewell/trace-mapping': 0.3.25 + '@types/node': 20.17.12 + chalk: 4.1.2 + collect-v8-coverage: 1.0.2 + exit: 0.1.2 + glob: 7.2.3 + graceful-fs: 4.2.11 + istanbul-lib-coverage: 3.2.2 + istanbul-lib-instrument: 6.0.3 + istanbul-lib-report: 3.0.1 + istanbul-lib-source-maps: 4.0.1 + istanbul-reports: 3.1.7 + jest-message-util: 29.7.0 + jest-util: 29.7.0 + jest-worker: 29.7.0 + slash: 3.0.0 + string-length: 4.0.2 + strip-ansi: 6.0.1 + v8-to-istanbul: 9.3.0 + transitivePeerDependencies: + - supports-color + + '@jest/schemas@29.6.3': + dependencies: + '@sinclair/typebox': 0.27.8 + + '@jest/source-map@29.6.3': + dependencies: + '@jridgewell/trace-mapping': 0.3.25 + callsites: 3.1.0 + graceful-fs: 4.2.11 + + '@jest/test-result@29.7.0': + dependencies: + '@jest/console': 29.7.0 + '@jest/types': 29.6.3 + '@types/istanbul-lib-coverage': 2.0.6 + collect-v8-coverage: 1.0.2 + + '@jest/test-sequencer@29.7.0': + dependencies: + '@jest/test-result': 29.7.0 + graceful-fs: 4.2.11 + jest-haste-map: 29.7.0 + slash: 3.0.0 + + '@jest/transform@29.7.0': + dependencies: + '@babel/core': 7.26.0 + '@jest/types': 29.6.3 + '@jridgewell/trace-mapping': 0.3.25 + babel-plugin-istanbul: 6.1.1 + chalk: 4.1.2 + convert-source-map: 2.0.0 + fast-json-stable-stringify: 2.1.0 + graceful-fs: 4.2.11 + jest-haste-map: 29.7.0 + jest-regex-util: 29.6.3 + jest-util: 29.7.0 + micromatch: 4.0.8 + pirates: 4.0.6 + slash: 3.0.0 + write-file-atomic: 4.0.2 + transitivePeerDependencies: + - supports-color + + '@jest/types@29.6.3': + dependencies: + '@jest/schemas': 29.6.3 + '@types/istanbul-lib-coverage': 2.0.6 + '@types/istanbul-reports': 3.0.4 + '@types/node': 20.17.12 + '@types/yargs': 17.0.33 + chalk: 4.1.2 + + '@jridgewell/gen-mapping@0.3.8': + dependencies: + '@jridgewell/set-array': 1.2.1 + '@jridgewell/sourcemap-codec': 1.5.0 + '@jridgewell/trace-mapping': 0.3.25 + + '@jridgewell/resolve-uri@3.1.2': {} + + '@jridgewell/set-array@1.2.1': {} + + '@jridgewell/source-map@0.3.6': + dependencies: + '@jridgewell/gen-mapping': 0.3.8 + '@jridgewell/trace-mapping': 0.3.25 + + '@jridgewell/sourcemap-codec@1.5.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.9': + dependencies: + '@jridgewell/resolve-uri': 3.1.2 + '@jridgewell/sourcemap-codec': 1.5.0 + + '@logicflow/core@2.0.16': + dependencies: + classnames: 2.5.1 + lodash-es: 4.17.21 + mobx: 5.15.7 + mobx-preact: 3.0.0(mobx@5.15.7)(preact@10.26.9) + mobx-utils: 5.6.2(mobx@5.15.7) + mousetrap: 1.6.5 + preact: 10.26.9 + uuid: 9.0.1 + + '@logicflow/extension@2.0.21(@logicflow/core@2.0.16)': + dependencies: + '@antv/hierarchy': 0.6.14 + '@logicflow/core': 2.0.16 + classnames: 2.5.1 + lodash-es: 4.17.21 + medium-editor: 5.23.3 + mobx: 5.15.7 + preact: 10.26.9 + rangy: 1.3.2 + vanilla-picker: 2.12.3 + + '@logicflow/vue-node-registry@1.0.18(@logicflow/core@2.0.16)(vue@3.5.13(typescript@4.9.5))': + dependencies: + '@logicflow/core': 2.0.16 + lodash-es: 4.17.21 + vue: 3.5.13(typescript@4.9.5) + vue-demi: 0.14.10(vue@3.5.13(typescript@4.9.5)) + + '@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.18.0 + + '@octokit/auth-token@4.0.0': {} + + '@octokit/core@5.2.0': + dependencies: + '@octokit/auth-token': 4.0.0 + '@octokit/graphql': 7.1.0 + '@octokit/request': 8.4.0 + '@octokit/request-error': 5.1.0 + '@octokit/types': 13.6.2 + before-after-hook: 2.2.3 + universal-user-agent: 6.0.1 + + '@octokit/endpoint@9.0.5': + dependencies: + '@octokit/types': 13.6.2 + universal-user-agent: 6.0.1 + + '@octokit/graphql@7.1.0': + dependencies: + '@octokit/request': 8.4.0 + '@octokit/types': 13.6.2 + universal-user-agent: 6.0.1 + + '@octokit/openapi-types@22.2.0': {} + + '@octokit/plugin-paginate-rest@11.3.1(@octokit/core@5.2.0)': + dependencies: + '@octokit/core': 5.2.0 + '@octokit/types': 13.6.2 + + '@octokit/plugin-request-log@4.0.1(@octokit/core@5.2.0)': + dependencies: + '@octokit/core': 5.2.0 + + '@octokit/plugin-rest-endpoint-methods@13.2.2(@octokit/core@5.2.0)': + dependencies: + '@octokit/core': 5.2.0 + '@octokit/types': 13.6.2 + + '@octokit/request-error@5.1.0': + dependencies: + '@octokit/types': 13.6.2 + deprecation: 2.3.1 + once: 1.4.0 + + '@octokit/request@8.4.0': + dependencies: + '@octokit/endpoint': 9.0.5 + '@octokit/request-error': 5.1.0 + '@octokit/types': 13.6.2 + universal-user-agent: 6.0.1 + + '@octokit/rest@20.1.1': + dependencies: + '@octokit/core': 5.2.0 + '@octokit/plugin-paginate-rest': 11.3.1(@octokit/core@5.2.0) + '@octokit/plugin-request-log': 4.0.1(@octokit/core@5.2.0) + '@octokit/plugin-rest-endpoint-methods': 13.2.2(@octokit/core@5.2.0) + + '@octokit/types@13.6.2': + dependencies: + '@octokit/openapi-types': 22.2.0 + + '@one-ini/wasm@0.1.1': {} + + '@pkgjs/parseargs@0.11.0': + optional: true + + '@pkgr/core@0.1.1': {} + + '@polka/url@1.0.0-next.28': {} + + '@purge-icons/core@0.10.0': + dependencies: + '@iconify/iconify': 2.1.2 + axios: 0.26.1(debug@4.4.0) + debug: 4.4.0 + fast-glob: 3.3.3 + fs-extra: 10.1.0 + transitivePeerDependencies: + - encoding + - supports-color + + '@purge-icons/generated@0.10.0': + dependencies: + '@iconify/iconify': 3.1.1 + + '@rollup/pluginutils@4.2.1': + dependencies: + estree-walker: 2.0.2 + picomatch: 2.3.1 + + '@rollup/pluginutils@5.1.4(rollup@4.30.0)': + dependencies: + '@types/estree': 1.0.6 + estree-walker: 2.0.2 + picomatch: 4.0.2 + optionalDependencies: + rollup: 4.30.0 + + '@rollup/rollup-android-arm-eabi@4.30.0': + optional: true + + '@rollup/rollup-android-arm64@4.30.0': + optional: true + + '@rollup/rollup-darwin-arm64@4.30.0': + optional: true + + '@rollup/rollup-darwin-x64@4.30.0': + optional: true + + '@rollup/rollup-freebsd-arm64@4.30.0': + optional: true + + '@rollup/rollup-freebsd-x64@4.30.0': + optional: true + + '@rollup/rollup-linux-arm-gnueabihf@4.30.0': + optional: true + + '@rollup/rollup-linux-arm-musleabihf@4.30.0': + optional: true + + '@rollup/rollup-linux-arm64-gnu@4.30.0': + optional: true + + '@rollup/rollup-linux-arm64-musl@4.30.0': + optional: true + + '@rollup/rollup-linux-loongarch64-gnu@4.30.0': + optional: true + + '@rollup/rollup-linux-powerpc64le-gnu@4.30.0': + optional: true + + '@rollup/rollup-linux-riscv64-gnu@4.30.0': + optional: true + + '@rollup/rollup-linux-s390x-gnu@4.30.0': + optional: true + + '@rollup/rollup-linux-x64-gnu@4.30.0': + optional: true + + '@rollup/rollup-linux-x64-musl@4.30.0': + optional: true + + '@rollup/rollup-win32-arm64-msvc@4.30.0': + optional: true + + '@rollup/rollup-win32-ia32-msvc@4.30.0': + optional: true + + '@rollup/rollup-win32-x64-msvc@4.30.0': + optional: true + + '@rys-fe/vite-plugin-theme@0.8.6(vite@6.0.7(@types/node@20.17.12)(jiti@2.4.2)(less@4.2.1)(terser@5.37.0)(tsx@4.19.2))': + dependencies: + '@types/node': 14.18.63 + '@types/tinycolor2': 1.4.6 + chalk: 4.1.2 + clean-css: 5.3.3 + debug: 4.4.0 + esbuild: 0.11.23 + esbuild-plugin-alias: 0.1.2 + tinycolor2: 1.6.0 + vite: 6.0.7(@types/node@20.17.12)(jiti@2.4.2)(less@4.2.1)(terser@5.37.0)(tsx@4.19.2) + transitivePeerDependencies: + - supports-color + + '@scarf/scarf@1.4.0': {} + + '@simonwep/pickr@1.8.2': + dependencies: + core-js: 3.39.0 + nanopop: 2.4.2 + + '@sinclair/typebox@0.27.8': {} + + '@sinonjs/commons@3.0.1': + dependencies: + type-detect: 4.0.8 + + '@sinonjs/fake-timers@10.3.0': + dependencies: + '@sinonjs/commons': 3.0.1 + + '@sphinxxxx/color-conversion@2.2.2': {} + + '@tinymce/tinymce-vue@4.0.7(vue@3.5.13(typescript@4.9.5))': + dependencies: + tinymce: 5.10.9 + vue: 3.5.13(typescript@4.9.5) + + '@traptitech/markdown-it-katex@3.6.0': + dependencies: + katex: 0.16.19 + + '@trysound/sax@0.2.0': {} + + '@tsconfig/node10@1.0.11': {} + + '@tsconfig/node12@1.0.11': {} + + '@tsconfig/node14@1.0.3': {} + + '@tsconfig/node16@1.0.4': {} + + '@types/babel__core@7.20.5': + dependencies: + '@babel/parser': 7.26.3 + '@babel/types': 7.26.3 + '@types/babel__generator': 7.6.8 + '@types/babel__template': 7.4.4 + '@types/babel__traverse': 7.20.6 + + '@types/babel__generator@7.6.8': + dependencies: + '@babel/types': 7.26.3 + + '@types/babel__template@7.4.4': + dependencies: + '@babel/parser': 7.26.3 + '@babel/types': 7.26.3 + + '@types/babel__traverse@7.20.6': + dependencies: + '@babel/types': 7.26.3 + + '@types/codemirror@5.60.15': + dependencies: + '@types/tern': 0.23.9 + + '@types/conventional-commits-parser@5.0.1': + dependencies: + '@types/node': 20.17.12 + optional: true + + '@types/crypto-js@4.2.2': {} + + '@types/estree@1.0.6': {} + + '@types/fs-extra@11.0.4': + dependencies: + '@types/jsonfile': 6.1.4 + '@types/node': 20.17.12 + + '@types/graceful-fs@4.1.9': + dependencies: + '@types/node': 20.17.12 + + '@types/inquirer@9.0.7': + dependencies: + '@types/through': 0.0.33 + rxjs: 7.8.1 + + '@types/intro.js@5.1.5': {} + + '@types/istanbul-lib-coverage@2.0.6': {} + + '@types/istanbul-lib-report@3.0.3': + dependencies: + '@types/istanbul-lib-coverage': 2.0.6 + + '@types/istanbul-reports@3.0.4': + dependencies: + '@types/istanbul-lib-report': 3.0.3 + + '@types/jest@29.5.14': + dependencies: + expect: 29.7.0 + pretty-format: 29.7.0 + + '@types/json-schema@7.0.15': {} + + '@types/jsonfile@6.1.4': + dependencies: + '@types/node': 20.17.12 + + '@types/lodash-es@4.17.12': + dependencies: + '@types/lodash': 4.17.14 + + '@types/lodash@4.17.14': {} + + '@types/minimist@1.2.5': {} + + '@types/mockjs@1.0.10': {} + + '@types/node@14.18.63': {} + + '@types/node@20.17.12': + dependencies: + undici-types: 6.19.8 + + '@types/normalize-package-data@2.4.4': {} + + '@types/nprogress@0.2.3': {} + + '@types/qrcode@1.5.5': + dependencies: + '@types/node': 20.17.12 + + '@types/qs@6.9.17': {} + + '@types/semver@7.5.8': {} + + '@types/showdown@2.0.6': {} + + '@types/sortablejs@1.15.8': {} + + '@types/stack-utils@2.0.3': {} + + '@types/svgo@2.6.4': + dependencies: + '@types/node': 20.17.12 + + '@types/tern@0.23.9': + dependencies: + '@types/estree': 1.0.6 + + '@types/through@0.0.33': + dependencies: + '@types/node': 20.17.12 + + '@types/tinycolor2@1.4.6': {} + + '@types/web-bluetooth@0.0.20': {} + + '@types/yargs-parser@21.0.3': {} + + '@types/yargs@17.0.33': + dependencies: + '@types/yargs-parser': 21.0.3 + + '@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@4.9.5))(eslint@8.57.1)(typescript@4.9.5)': + dependencies: + '@eslint-community/regexpp': 4.12.1 + '@typescript-eslint/parser': 6.21.0(eslint@8.57.1)(typescript@4.9.5) + '@typescript-eslint/scope-manager': 6.21.0 + '@typescript-eslint/type-utils': 6.21.0(eslint@8.57.1)(typescript@4.9.5) + '@typescript-eslint/utils': 6.21.0(eslint@8.57.1)(typescript@4.9.5) + '@typescript-eslint/visitor-keys': 6.21.0 + debug: 4.4.0 + eslint: 8.57.1 + graphemer: 1.4.0 + ignore: 5.3.2 + natural-compare: 1.4.0 + semver: 7.6.3 + ts-api-utils: 1.4.3(typescript@4.9.5) + optionalDependencies: + typescript: 4.9.5 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@4.9.5)': + dependencies: + '@typescript-eslint/scope-manager': 6.21.0 + '@typescript-eslint/types': 6.21.0 + '@typescript-eslint/typescript-estree': 6.21.0(typescript@4.9.5) + '@typescript-eslint/visitor-keys': 6.21.0 + debug: 4.4.0 + eslint: 8.57.1 + optionalDependencies: + typescript: 4.9.5 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/scope-manager@5.62.0': + dependencies: + '@typescript-eslint/types': 5.62.0 + '@typescript-eslint/visitor-keys': 5.62.0 + + '@typescript-eslint/scope-manager@6.21.0': + dependencies: + '@typescript-eslint/types': 6.21.0 + '@typescript-eslint/visitor-keys': 6.21.0 + + '@typescript-eslint/type-utils@6.21.0(eslint@8.57.1)(typescript@4.9.5)': + dependencies: + '@typescript-eslint/typescript-estree': 6.21.0(typescript@4.9.5) + '@typescript-eslint/utils': 6.21.0(eslint@8.57.1)(typescript@4.9.5) + debug: 4.4.0 + eslint: 8.57.1 + ts-api-utils: 1.4.3(typescript@4.9.5) + optionalDependencies: + typescript: 4.9.5 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/types@5.62.0': {} + + '@typescript-eslint/types@6.21.0': {} + + '@typescript-eslint/typescript-estree@5.62.0(typescript@4.9.5)': + dependencies: + '@typescript-eslint/types': 5.62.0 + '@typescript-eslint/visitor-keys': 5.62.0 + debug: 4.4.0 + globby: 11.1.0 + is-glob: 4.0.3 + semver: 7.6.3 + tsutils: 3.21.0(typescript@4.9.5) + optionalDependencies: + typescript: 4.9.5 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/typescript-estree@6.21.0(typescript@4.9.5)': + dependencies: + '@typescript-eslint/types': 6.21.0 + '@typescript-eslint/visitor-keys': 6.21.0 + debug: 4.4.0 + globby: 11.1.0 + is-glob: 4.0.3 + minimatch: 9.0.3 + semver: 7.6.3 + ts-api-utils: 1.4.3(typescript@4.9.5) + optionalDependencies: + typescript: 4.9.5 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/utils@5.62.0(eslint@8.57.1)(typescript@4.9.5)': + dependencies: + '@eslint-community/eslint-utils': 4.4.1(eslint@8.57.1) + '@types/json-schema': 7.0.15 + '@types/semver': 7.5.8 + '@typescript-eslint/scope-manager': 5.62.0 + '@typescript-eslint/types': 5.62.0 + '@typescript-eslint/typescript-estree': 5.62.0(typescript@4.9.5) + eslint: 8.57.1 + eslint-scope: 5.1.1 + semver: 7.6.3 + transitivePeerDependencies: + - supports-color + - typescript + + '@typescript-eslint/utils@6.21.0(eslint@8.57.1)(typescript@4.9.5)': + dependencies: + '@eslint-community/eslint-utils': 4.4.1(eslint@8.57.1) + '@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(typescript@4.9.5) + eslint: 8.57.1 + semver: 7.6.3 + transitivePeerDependencies: + - supports-color + - typescript + + '@typescript-eslint/visitor-keys@5.62.0': + dependencies: + '@typescript-eslint/types': 5.62.0 + eslint-visitor-keys: 3.4.3 + + '@typescript-eslint/visitor-keys@6.21.0': + dependencies: + '@typescript-eslint/types': 6.21.0 + eslint-visitor-keys: 3.4.3 + + '@ungap/structured-clone@1.2.1': {} + + '@unocss/astro@0.58.9(rollup@4.30.0)(vite@6.0.7(@types/node@20.17.12)(jiti@2.4.2)(less@4.2.1)(terser@5.37.0)(tsx@4.19.2))': + dependencies: + '@unocss/core': 0.58.9 + '@unocss/reset': 0.58.9 + '@unocss/vite': 0.58.9(rollup@4.30.0)(vite@6.0.7(@types/node@20.17.12)(jiti@2.4.2)(less@4.2.1)(terser@5.37.0)(tsx@4.19.2)) + optionalDependencies: + vite: 6.0.7(@types/node@20.17.12)(jiti@2.4.2)(less@4.2.1)(terser@5.37.0)(tsx@4.19.2) + transitivePeerDependencies: + - rollup + + '@unocss/cli@0.58.9(rollup@4.30.0)': + dependencies: + '@ampproject/remapping': 2.3.0 + '@rollup/pluginutils': 5.1.4(rollup@4.30.0) + '@unocss/config': 0.58.9 + '@unocss/core': 0.58.9 + '@unocss/preset-uno': 0.58.9 + cac: 6.7.14 + chokidar: 3.6.0 + colorette: 2.0.20 + consola: 3.3.3 + fast-glob: 3.3.3 + magic-string: 0.30.17 + pathe: 1.1.2 + perfect-debounce: 1.0.0 + transitivePeerDependencies: + - rollup + + '@unocss/config@0.58.9': + dependencies: + '@unocss/core': 0.58.9 + unconfig: 0.3.13 + + '@unocss/core@0.58.9': {} + + '@unocss/extractor-arbitrary-variants@0.58.9': + dependencies: + '@unocss/core': 0.58.9 + + '@unocss/inspector@0.58.9': + dependencies: + '@unocss/core': 0.58.9 + '@unocss/rule-utils': 0.58.9 + gzip-size: 6.0.0 + sirv: 2.0.4 + + '@unocss/postcss@0.58.9(postcss@8.4.49)': + dependencies: + '@unocss/config': 0.58.9 + '@unocss/core': 0.58.9 + '@unocss/rule-utils': 0.58.9 + css-tree: 2.3.1 + fast-glob: 3.3.3 + magic-string: 0.30.17 + postcss: 8.4.49 + + '@unocss/preset-attributify@0.58.9': + dependencies: + '@unocss/core': 0.58.9 + + '@unocss/preset-icons@0.58.9': + dependencies: + '@iconify/utils': 2.2.1 + '@unocss/core': 0.58.9 + ofetch: 1.4.1 + transitivePeerDependencies: + - supports-color + + '@unocss/preset-mini@0.58.9': + dependencies: + '@unocss/core': 0.58.9 + '@unocss/extractor-arbitrary-variants': 0.58.9 + '@unocss/rule-utils': 0.58.9 + + '@unocss/preset-tagify@0.58.9': + dependencies: + '@unocss/core': 0.58.9 + + '@unocss/preset-typography@0.58.9': + dependencies: + '@unocss/core': 0.58.9 + '@unocss/preset-mini': 0.58.9 + + '@unocss/preset-uno@0.58.9': + dependencies: + '@unocss/core': 0.58.9 + '@unocss/preset-mini': 0.58.9 + '@unocss/preset-wind': 0.58.9 + '@unocss/rule-utils': 0.58.9 + + '@unocss/preset-web-fonts@0.58.9': + dependencies: + '@unocss/core': 0.58.9 + ofetch: 1.4.1 + + '@unocss/preset-wind@0.58.9': + dependencies: + '@unocss/core': 0.58.9 + '@unocss/preset-mini': 0.58.9 + '@unocss/rule-utils': 0.58.9 + + '@unocss/reset@0.58.9': {} + + '@unocss/rule-utils@0.58.9': + dependencies: + '@unocss/core': 0.58.9 + magic-string: 0.30.17 + + '@unocss/scope@0.58.9': {} + + '@unocss/transformer-attributify-jsx-babel@0.58.9': + dependencies: + '@babel/core': 7.26.0 + '@babel/plugin-syntax-jsx': 7.25.9(@babel/core@7.26.0) + '@babel/preset-typescript': 7.26.0(@babel/core@7.26.0) + '@unocss/core': 0.58.9 + transitivePeerDependencies: + - supports-color + + '@unocss/transformer-attributify-jsx@0.58.9': + dependencies: + '@unocss/core': 0.58.9 + + '@unocss/transformer-compile-class@0.58.9': + dependencies: + '@unocss/core': 0.58.9 + + '@unocss/transformer-directives@0.58.9': + dependencies: + '@unocss/core': 0.58.9 + '@unocss/rule-utils': 0.58.9 + css-tree: 2.3.1 + + '@unocss/transformer-variant-group@0.58.9': + dependencies: + '@unocss/core': 0.58.9 + + '@unocss/vite@0.58.9(rollup@4.30.0)(vite@6.0.7(@types/node@20.17.12)(jiti@2.4.2)(less@4.2.1)(terser@5.37.0)(tsx@4.19.2))': + dependencies: + '@ampproject/remapping': 2.3.0 + '@rollup/pluginutils': 5.1.4(rollup@4.30.0) + '@unocss/config': 0.58.9 + '@unocss/core': 0.58.9 + '@unocss/inspector': 0.58.9 + '@unocss/scope': 0.58.9 + '@unocss/transformer-directives': 0.58.9 + chokidar: 3.6.0 + fast-glob: 3.3.3 + magic-string: 0.30.17 + vite: 6.0.7(@types/node@20.17.12)(jiti@2.4.2)(less@4.2.1)(terser@5.37.0)(tsx@4.19.2) + transitivePeerDependencies: + - rollup + + '@vant/area-data@1.5.2': {} + + '@vitejs/plugin-vue-jsx@4.1.1(vite@6.0.7(@types/node@20.17.12)(jiti@2.4.2)(less@4.2.1)(terser@5.37.0)(tsx@4.19.2))(vue@3.5.13(typescript@4.9.5))': + dependencies: + '@babel/core': 7.26.0 + '@babel/plugin-transform-typescript': 7.26.3(@babel/core@7.26.0) + '@vue/babel-plugin-jsx': 1.2.5(@babel/core@7.26.0) + vite: 6.0.7(@types/node@20.17.12)(jiti@2.4.2)(less@4.2.1)(terser@5.37.0)(tsx@4.19.2) + vue: 3.5.13(typescript@4.9.5) + transitivePeerDependencies: + - supports-color + + '@vitejs/plugin-vue@5.2.1(vite@6.0.7(@types/node@20.17.12)(jiti@2.4.2)(less@4.2.1)(terser@5.37.0)(tsx@4.19.2))(vue@3.5.13(typescript@4.9.5))': + dependencies: + vite: 6.0.7(@types/node@20.17.12)(jiti@2.4.2)(less@4.2.1)(terser@5.37.0)(tsx@4.19.2) + vue: 3.5.13(typescript@4.9.5) + + '@volar/language-core@1.11.1': + dependencies: + '@volar/source-map': 1.11.1 + + '@volar/source-map@1.11.1': + dependencies: + muggle-string: 0.3.1 + + '@volar/typescript@1.11.1': + dependencies: + '@volar/language-core': 1.11.1 + path-browserify: 1.0.1 + + '@vue/babel-helper-vue-transform-on@1.2.5': {} + + '@vue/babel-plugin-jsx@1.2.5(@babel/core@7.26.0)': + dependencies: + '@babel/helper-module-imports': 7.25.9 + '@babel/helper-plugin-utils': 7.25.9 + '@babel/plugin-syntax-jsx': 7.25.9(@babel/core@7.26.0) + '@babel/template': 7.25.9 + '@babel/traverse': 7.26.4 + '@babel/types': 7.26.3 + '@vue/babel-helper-vue-transform-on': 1.2.5 + '@vue/babel-plugin-resolve-type': 1.2.5(@babel/core@7.26.0) + html-tags: 3.3.1 + svg-tags: 1.0.0 + optionalDependencies: + '@babel/core': 7.26.0 + transitivePeerDependencies: + - supports-color + + '@vue/babel-plugin-resolve-type@1.2.5(@babel/core@7.26.0)': + dependencies: + '@babel/code-frame': 7.26.2 + '@babel/core': 7.26.0 + '@babel/helper-module-imports': 7.25.9 + '@babel/helper-plugin-utils': 7.25.9 + '@babel/parser': 7.26.3 + '@vue/compiler-sfc': 3.5.13 + transitivePeerDependencies: + - supports-color + + '@vue/compiler-core@3.5.13': + dependencies: + '@babel/parser': 7.26.3 + '@vue/shared': 3.5.13 + entities: 4.5.0 + estree-walker: 2.0.2 + source-map-js: 1.2.1 + + '@vue/compiler-dom@3.5.13': + dependencies: + '@vue/compiler-core': 3.5.13 + '@vue/shared': 3.5.13 + + '@vue/compiler-sfc@3.5.13': + dependencies: + '@babel/parser': 7.26.3 + '@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.17 + postcss: 8.4.49 + source-map-js: 1.2.1 + + '@vue/compiler-ssr@3.5.13': + dependencies: + '@vue/compiler-dom': 3.5.13 + '@vue/shared': 3.5.13 + + '@vue/devtools-api@6.6.4': {} + + '@vue/language-core@1.8.27(typescript@4.9.5)': + 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.5 + muggle-string: 0.3.1 + path-browserify: 1.0.1 + vue-template-compiler: 2.7.16 + optionalDependencies: + typescript: 4.9.5 + + '@vue/reactivity@3.5.13': + dependencies: + '@vue/shared': 3.5.13 + + '@vue/runtime-core@3.5.13': + dependencies: + '@vue/reactivity': 3.5.13 + '@vue/shared': 3.5.13 + + '@vue/runtime-dom@3.5.13': + dependencies: + '@vue/reactivity': 3.5.13 + '@vue/runtime-core': 3.5.13 + '@vue/shared': 3.5.13 + csstype: 3.1.3 + + '@vue/server-renderer@3.5.13(vue@3.5.13(typescript@4.9.5))': + dependencies: + '@vue/compiler-ssr': 3.5.13 + '@vue/shared': 3.5.13 + vue: 3.5.13(typescript@4.9.5) + + '@vue/shared@3.5.13': {} + + '@vue/test-utils@2.4.6': + dependencies: + js-beautify: 1.15.1 + vue-component-type-helpers: 2.2.0 + + '@vueuse/core@10.11.1(vue@3.5.13(typescript@4.9.5))': + dependencies: + '@types/web-bluetooth': 0.0.20 + '@vueuse/metadata': 10.11.1 + '@vueuse/shared': 10.11.1(vue@3.5.13(typescript@4.9.5)) + vue-demi: 0.14.10(vue@3.5.13(typescript@4.9.5)) + transitivePeerDependencies: + - '@vue/composition-api' + - vue + + '@vueuse/metadata@10.11.1': {} + + '@vueuse/shared@10.11.1(vue@3.5.13(typescript@4.9.5))': + dependencies: + vue-demi: 0.14.10(vue@3.5.13(typescript@4.9.5)) + transitivePeerDependencies: + - '@vue/composition-api' + - vue + + '@vxe-ui/core@4.1.5(vue@3.5.13(typescript@4.9.5))': + dependencies: + dom-zindex: 1.0.6 + vue: 3.5.13(typescript@4.9.5) + xe-utils: 3.7.5 + + '@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: {} + + acorn-jsx@5.3.2(acorn@8.14.0): + dependencies: + acorn: 8.14.0 + + acorn-walk@8.3.4: + dependencies: + acorn: 8.14.0 + + acorn@8.14.0: {} + + add-stream@1.0.0: {} + + ajv@6.12.6: + 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.17.1: + dependencies: + fast-deep-equal: 3.1.3 + fast-uri: 3.0.5 + json-schema-traverse: 1.0.0 + require-from-string: 2.0.2 + + ansi-escapes@4.3.2: + dependencies: + type-fest: 0.21.3 + + ansi-escapes@7.0.0: + dependencies: + environment: 1.1.0 + + ansi-regex@2.1.1: {} + + ansi-regex@5.0.1: {} + + ansi-regex@6.1.0: {} + + ansi-styles@2.2.1: {} + + ansi-styles@3.2.1: + dependencies: + color-convert: 1.9.3 + + ansi-styles@4.3.0: + dependencies: + color-convert: 2.0.1 + + ansi-styles@5.2.0: {} + + ansi-styles@6.2.1: {} + + ant-design-vue@4.2.6(vue@3.5.13(typescript@4.9.5)): + dependencies: + '@ant-design/colors': 6.0.0 + '@ant-design/icons-vue': 7.0.1(vue@3.5.13(typescript@4.9.5)) + '@babel/runtime': 7.26.0 + '@ctrl/tinycolor': 3.6.1 + '@emotion/hash': 0.9.2 + '@emotion/unitless': 0.8.1 + '@simonwep/pickr': 1.8.2 + array-tree-filter: 2.1.0 + async-validator: 4.2.5 + csstype: 3.1.3 + dayjs: 1.11.13 + dom-align: 1.12.4 + dom-scroll-into-view: 2.0.1 + lodash: 4.17.21 + lodash-es: 4.17.21 + resize-observer-polyfill: 1.5.1 + scroll-into-view-if-needed: 2.2.31 + shallow-equal: 1.2.1 + stylis: 4.3.4 + throttle-debounce: 5.0.2 + vue: 3.5.13(typescript@4.9.5) + vue-types: 3.0.2(vue@3.5.13(typescript@4.9.5)) + warning: 4.0.3 + + anymatch@3.1.3: + dependencies: + normalize-path: 3.0.0 + picomatch: 2.3.1 + + arg@4.1.3: {} + + argparse@1.0.10: + dependencies: + sprintf-js: 1.0.3 + + argparse@2.0.1: {} + + arr-diff@4.0.0: {} + + arr-flatten@1.1.0: {} + + arr-union@3.1.0: {} + + array-buffer-byte-length@1.0.2: + dependencies: + call-bound: 1.0.3 + is-array-buffer: 3.0.5 + + array-ify@1.0.0: {} + + array-tree-filter@2.1.0: {} + + array-union@2.1.0: {} + + array-unique@0.3.2: {} + + arraybuffer.prototype.slice@1.0.4: + dependencies: + array-buffer-byte-length: 1.0.2 + call-bind: 1.0.8 + define-properties: 1.2.1 + es-abstract: 1.23.9 + es-errors: 1.3.0 + get-intrinsic: 1.2.7 + is-array-buffer: 3.0.5 + + arrify@1.0.1: {} + + assign-symbols@1.0.0: {} + + astral-regex@2.0.0: {} + + async-validator@4.2.5: {} + + async@2.6.4: + dependencies: + lodash: 4.17.21 + + async@3.2.6: {} + + asynckit@0.4.0: {} + + at-least-node@1.0.0: {} + + atob@2.1.2: {} + + autoprefixer@10.4.20(postcss@8.4.49): + dependencies: + browserslist: 4.24.3 + caniuse-lite: 1.0.30001690 + fraction.js: 4.3.7 + normalize-range: 0.1.2 + picocolors: 1.1.1 + postcss: 8.4.49 + postcss-value-parser: 4.2.0 + + available-typed-arrays@1.0.7: + dependencies: + possible-typed-array-names: 1.0.0 + + axios@0.26.1(debug@4.4.0): + dependencies: + follow-redirects: 1.15.9(debug@4.4.0) + transitivePeerDependencies: + - debug + + axios@1.8.4(debug@4.4.0): + dependencies: + follow-redirects: 1.15.9(debug@4.4.0) + form-data: 4.0.1 + proxy-from-env: 1.1.0 + transitivePeerDependencies: + - debug + + babel-jest@29.7.0(@babel/core@7.26.0): + dependencies: + '@babel/core': 7.26.0 + '@jest/transform': 29.7.0 + '@types/babel__core': 7.20.5 + babel-plugin-istanbul: 6.1.1 + babel-preset-jest: 29.6.3(@babel/core@7.26.0) + chalk: 4.1.2 + graceful-fs: 4.2.11 + slash: 3.0.0 + transitivePeerDependencies: + - supports-color + + babel-plugin-istanbul@6.1.1: + dependencies: + '@babel/helper-plugin-utils': 7.25.9 + '@istanbuljs/load-nyc-config': 1.1.0 + '@istanbuljs/schema': 0.1.3 + istanbul-lib-instrument: 5.2.1 + test-exclude: 6.0.0 + transitivePeerDependencies: + - supports-color + + babel-plugin-jest-hoist@29.6.3: + dependencies: + '@babel/template': 7.25.9 + '@babel/types': 7.26.3 + '@types/babel__core': 7.20.5 + '@types/babel__traverse': 7.20.6 + + babel-plugin-transform-runtime@6.23.0: + dependencies: + babel-runtime: 6.26.0 + + babel-preset-current-node-syntax@1.1.0(@babel/core@7.26.0): + dependencies: + '@babel/core': 7.26.0 + '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.26.0) + '@babel/plugin-syntax-bigint': 7.8.3(@babel/core@7.26.0) + '@babel/plugin-syntax-class-properties': 7.12.13(@babel/core@7.26.0) + '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.26.0) + '@babel/plugin-syntax-import-attributes': 7.26.0(@babel/core@7.26.0) + '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.26.0) + '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.26.0) + '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.26.0) + '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.26.0) + '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.26.0) + '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.26.0) + '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.26.0) + '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.26.0) + '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.26.0) + '@babel/plugin-syntax-top-level-await': 7.14.5(@babel/core@7.26.0) + + babel-preset-jest@29.6.3(@babel/core@7.26.0): + dependencies: + '@babel/core': 7.26.0 + babel-plugin-jest-hoist: 29.6.3 + babel-preset-current-node-syntax: 1.1.0(@babel/core@7.26.0) + + babel-runtime@6.26.0: + dependencies: + core-js: 2.6.12 + regenerator-runtime: 0.11.1 + + balanced-match@1.0.2: {} + + balanced-match@2.0.0: {} + + base64-js@1.5.1: {} + + base@0.11.2: + dependencies: + cache-base: 1.0.1 + class-utils: 0.3.6 + component-emitter: 1.3.1 + define-property: 1.0.0 + isobject: 3.0.1 + mixin-deep: 1.3.2 + pascalcase: 0.1.1 + + basic-auth@2.0.1: + dependencies: + safe-buffer: 5.1.2 + + before-after-hook@2.2.3: {} + + big.js@5.2.2: {} + + big.js@6.2.2: {} + + binary-extensions@2.3.0: {} + + bl@4.1.0: + dependencies: + buffer: 5.7.1 + inherits: 2.0.4 + readable-stream: 3.6.2 + + bluebird@3.7.2: {} + + boolbase@1.0.0: {} + + brace-expansion@1.1.11: + dependencies: + balanced-match: 1.0.2 + concat-map: 0.0.1 + + brace-expansion@2.0.1: + dependencies: + balanced-match: 1.0.2 + + braces@2.3.2: + dependencies: + arr-flatten: 1.1.0 + array-unique: 0.3.2 + extend-shallow: 2.0.1 + fill-range: 4.0.0 + isobject: 3.0.1 + repeat-element: 1.1.4 + snapdragon: 0.8.2 + snapdragon-node: 2.1.1 + split-string: 3.1.0 + to-regex: 3.0.2 + transitivePeerDependencies: + - supports-color + + braces@3.0.3: + dependencies: + fill-range: 7.1.1 + + browserslist@4.24.3: + dependencies: + caniuse-lite: 1.0.30001690 + electron-to-chromium: 1.5.76 + node-releases: 2.0.19 + update-browserslist-db: 1.1.1(browserslist@4.24.3) + + bs-logger@0.2.6: + dependencies: + fast-json-stable-stringify: 2.1.0 + + bser@2.1.1: + dependencies: + node-int64: 0.4.0 + + buffer-from@1.1.2: {} + + buffer@5.7.1: + dependencies: + base64-js: 1.5.1 + ieee754: 1.2.1 + + cac@6.7.14: {} + + cache-base@1.0.1: + dependencies: + collection-visit: 1.0.0 + component-emitter: 1.3.1 + get-value: 2.0.6 + has-value: 1.0.0 + isobject: 3.0.1 + set-value: 2.0.1 + to-object-path: 0.3.0 + union-value: 1.0.1 + unset-value: 1.0.0 + + cachedir@2.3.0: {} + + call-bind-apply-helpers@1.0.1: + dependencies: + es-errors: 1.3.0 + function-bind: 1.1.2 + + call-bind@1.0.8: + dependencies: + call-bind-apply-helpers: 1.0.1 + es-define-property: 1.0.1 + get-intrinsic: 1.2.7 + set-function-length: 1.2.2 + + call-bound@1.0.3: + dependencies: + call-bind-apply-helpers: 1.0.1 + get-intrinsic: 1.2.7 + + callsites@3.1.0: {} + + camel-case@4.1.2: + dependencies: + pascal-case: 3.1.2 + tslib: 2.8.1 + + camelcase-keys@6.2.2: + dependencies: + camelcase: 5.3.1 + map-obj: 4.3.0 + quick-lru: 4.0.1 + + camelcase@5.3.1: {} + + camelcase@6.3.0: {} + + caniuse-lite@1.0.30001690: {} + + 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@2.4.2: + dependencies: + ansi-styles: 3.2.1 + escape-string-regexp: 1.0.5 + supports-color: 5.5.0 + + chalk@4.1.2: + dependencies: + ansi-styles: 4.3.0 + supports-color: 7.2.0 + + chalk@5.3.0: {} + + chalk@5.4.1: + optional: true + + char-regex@1.0.2: {} + + chardet@0.7.0: {} + + charenc@0.0.2: {} + + 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.2.1 + + cheerio@1.0.0: + dependencies: + cheerio-select: 2.1.0 + dom-serializer: 2.0.0 + domhandler: 5.0.3 + domutils: 3.2.1 + encoding-sniffer: 0.2.0 + htmlparser2: 9.1.0 + parse5: 7.2.1 + parse5-htmlparser2-tree-adapter: 7.1.0 + parse5-parser-stream: 7.1.2 + undici: 6.21.0 + whatwg-mimetype: 4.0.0 + + china-area-data@5.0.1: {} + + 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 + + ci-info@3.9.0: {} + + cjs-module-lexer@1.4.1: {} + + class-utils@0.3.6: + dependencies: + arr-union: 3.1.0 + define-property: 0.2.5 + isobject: 3.0.1 + static-extend: 0.1.2 + + classnames@2.5.1: {} + + clean-css@5.3.3: + dependencies: + source-map: 0.6.1 + + cli-cursor@3.1.0: + dependencies: + restore-cursor: 3.1.0 + + cli-cursor@5.0.0: + dependencies: + restore-cursor: 5.1.0 + + cli-spinners@2.9.2: {} + + cli-truncate@4.0.0: + dependencies: + slice-ansi: 5.0.0 + string-width: 7.2.0 + + cli-width@3.0.0: {} + + cli-width@4.1.0: {} + + clipboard@2.0.11: + dependencies: + good-listener: 1.2.2 + select: 1.1.2 + tiny-emitter: 2.1.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 + + clone@1.0.4: {} + + clone@2.1.2: {} + + co@4.6.0: {} + + codemirror@5.65.18: {} + + collect-v8-coverage@1.0.2: {} + + collection-visit@1.0.0: + dependencies: + map-visit: 1.0.0 + object-visit: 1.0.1 + + color-convert@1.9.3: + dependencies: + color-name: 1.1.3 + + color-convert@2.0.1: + dependencies: + color-name: 1.1.4 + + color-name@1.1.3: {} + + color-name@1.1.4: {} + + colord@2.9.3: {} + + colorette@2.0.20: {} + + combined-stream@1.0.8: + dependencies: + delayed-stream: 1.0.0 + + commander@10.0.1: {} + + commander@11.1.0: {} + + commander@13.0.0: {} + + commander@2.20.3: {} + + commander@7.2.0: {} + + commander@8.3.0: {} + + commander@9.5.0: {} + + commitizen@4.3.1(@types/node@20.17.12)(typescript@4.9.5): + dependencies: + cachedir: 2.3.0 + cz-conventional-changelog: 3.3.0(@types/node@20.17.12)(typescript@4.9.5) + dedent: 0.7.0 + detect-indent: 6.1.0 + find-node-modules: 2.1.3 + find-root: 1.1.0 + fs-extra: 9.1.0 + glob: 7.2.3 + inquirer: 8.2.5 + is-utf8: 0.2.1 + lodash: 4.17.21 + minimist: 1.2.7 + strip-bom: 4.0.0 + strip-json-comments: 3.1.1 + transitivePeerDependencies: + - '@types/node' + - typescript + + compare-func@2.0.0: + dependencies: + array-ify: 1.0.0 + dot-prop: 5.3.0 + + component-emitter@1.3.1: {} + + compute-scroll-into-view@1.0.20: {} + + 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 + + connect-history-api-fallback@1.6.0: {} + + connect@3.7.0: + dependencies: + debug: 2.6.9 + finalhandler: 1.1.2 + parseurl: 1.3.3 + utils-merge: 1.0.1 + transitivePeerDependencies: + - supports-color + + consola@2.15.3: {} + + consola@3.3.3: {} + + conventional-changelog-angular@7.0.0: + dependencies: + compare-func: 2.0.0 + + conventional-changelog-atom@4.0.0: {} + + conventional-changelog-cli@4.1.0: + dependencies: + add-stream: 1.0.0 + conventional-changelog: 5.1.0 + meow: 12.1.1 + tempfile: 5.0.0 + + conventional-changelog-codemirror@4.0.0: {} + + conventional-changelog-conventionalcommits@7.0.2: + dependencies: + compare-func: 2.0.0 + + conventional-changelog-core@7.0.0: + dependencies: + '@hutson/parse-repository-url': 5.0.0 + add-stream: 1.0.0 + conventional-changelog-writer: 7.0.1 + conventional-commits-parser: 5.0.0 + git-raw-commits: 4.0.0 + git-semver-tags: 7.0.1 + hosted-git-info: 7.0.2 + normalize-package-data: 6.0.2 + read-pkg: 8.1.0 + read-pkg-up: 10.1.0 + + conventional-changelog-ember@4.0.0: {} + + conventional-changelog-eslint@5.0.0: {} + + conventional-changelog-express@4.0.0: {} + + conventional-changelog-jquery@5.0.0: {} + + conventional-changelog-jshint@4.0.0: + dependencies: + compare-func: 2.0.0 + + conventional-changelog-preset-loader@4.1.0: {} + + conventional-changelog-writer@7.0.1: + dependencies: + conventional-commits-filter: 4.0.0 + handlebars: 4.7.8 + json-stringify-safe: 5.0.1 + meow: 12.1.1 + semver: 7.6.3 + split2: 4.2.0 + + conventional-changelog@5.1.0: + dependencies: + conventional-changelog-angular: 7.0.0 + conventional-changelog-atom: 4.0.0 + conventional-changelog-codemirror: 4.0.0 + conventional-changelog-conventionalcommits: 7.0.2 + conventional-changelog-core: 7.0.0 + conventional-changelog-ember: 4.0.0 + conventional-changelog-eslint: 5.0.0 + conventional-changelog-express: 4.0.0 + conventional-changelog-jquery: 5.0.0 + conventional-changelog-jshint: 4.0.0 + conventional-changelog-preset-loader: 4.1.0 + + conventional-commit-types@3.0.0: {} + + conventional-commits-filter@4.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: {} + + copy-anything@2.0.6: + dependencies: + is-what: 3.14.1 + + copy-descriptor@0.1.1: {} + + core-js@2.6.12: {} + + core-js@3.39.0: {} + + cors@2.8.5: + dependencies: + object-assign: 4.1.1 + vary: 1.1.2 + + corser@2.0.1: {} + + cosmiconfig-typescript-loader@5.1.0(@types/node@20.17.12)(cosmiconfig@8.3.6(typescript@4.9.5))(typescript@4.9.5): + dependencies: + '@types/node': 20.17.12 + cosmiconfig: 8.3.6(typescript@4.9.5) + jiti: 1.21.7 + typescript: 4.9.5 + + cosmiconfig-typescript-loader@6.1.0(@types/node@20.17.12)(cosmiconfig@9.0.0(typescript@4.9.5))(typescript@4.9.5): + dependencies: + '@types/node': 20.17.12 + cosmiconfig: 9.0.0(typescript@4.9.5) + jiti: 2.4.2 + typescript: 4.9.5 + optional: true + + cosmiconfig@8.3.6(typescript@4.9.5): + dependencies: + import-fresh: 3.3.0 + js-yaml: 4.1.0 + parse-json: 5.2.0 + path-type: 4.0.0 + optionalDependencies: + typescript: 4.9.5 + + cosmiconfig@9.0.0(typescript@4.9.5): + dependencies: + env-paths: 2.2.1 + import-fresh: 3.3.0 + js-yaml: 4.1.0 + parse-json: 5.2.0 + optionalDependencies: + typescript: 4.9.5 + + create-jest@29.7.0(@types/node@20.17.12)(ts-node@10.9.2(@types/node@20.17.12)(typescript@4.9.5)): + dependencies: + '@jest/types': 29.6.3 + chalk: 4.1.2 + exit: 0.1.2 + graceful-fs: 4.2.11 + jest-config: 29.7.0(@types/node@20.17.12)(ts-node@10.9.2(@types/node@20.17.12)(typescript@4.9.5)) + jest-util: 29.7.0 + prompts: 2.4.2 + transitivePeerDependencies: + - '@types/node' + - babel-plugin-macros + - supports-color + - ts-node + + create-require@1.1.1: {} + + cron-parser@4.9.0: + dependencies: + luxon: 3.5.0 + + cropperjs@1.6.2: {} + + cross-env@7.0.3: + dependencies: + cross-spawn: 7.0.6 + + cross-fetch@3.2.0: + dependencies: + node-fetch: 2.7.0 + transitivePeerDependencies: + - encoding + + cross-spawn@6.0.6: + dependencies: + nice-try: 1.0.5 + path-key: 2.0.1 + semver: 5.7.2 + shebang-command: 1.2.0 + which: 1.3.1 + + cross-spawn@7.0.6: + dependencies: + path-key: 3.1.1 + shebang-command: 2.0.0 + which: 2.0.2 + + crypt@0.0.2: {} + + crypto-js@4.2.0: {} + + css-functions-list@3.2.3: {} + + css-select@4.3.0: + dependencies: + boolbase: 1.0.0 + css-what: 6.1.0 + domhandler: 4.3.1 + domutils: 2.8.0 + nth-check: 2.1.1 + + css-select@5.1.0: + dependencies: + boolbase: 1.0.0 + css-what: 6.1.0 + domhandler: 5.0.3 + domutils: 3.2.1 + nth-check: 2.1.1 + + css-tree@1.1.3: + dependencies: + mdn-data: 2.0.14 + source-map: 0.6.1 + + css-tree@2.3.1: + dependencies: + mdn-data: 2.0.30 + source-map-js: 1.2.1 + + css-tree@3.1.0: + dependencies: + mdn-data: 2.12.2 + source-map-js: 1.2.1 + + css-what@6.1.0: {} + + cssesc@3.0.0: {} + + cssfilter@0.0.10: {} + + csso@4.2.0: + dependencies: + css-tree: 1.1.3 + + csstype@3.1.3: {} + + cz-conventional-changelog@3.3.0(@types/node@20.17.12)(typescript@4.9.5): + dependencies: + chalk: 2.4.2 + commitizen: 4.3.1(@types/node@20.17.12)(typescript@4.9.5) + conventional-commit-types: 3.0.0 + lodash.map: 4.6.0 + longest: 2.0.1 + word-wrap: 1.2.5 + optionalDependencies: + '@commitlint/load': 19.6.1(@types/node@20.17.12)(typescript@4.9.5) + transitivePeerDependencies: + - '@types/node' + - typescript + + cz-git@1.11.0: {} + + czg@1.11.0: {} + + dargs@7.0.0: {} + + dargs@8.1.0: {} + + data-view-buffer@1.0.2: + dependencies: + call-bound: 1.0.3 + es-errors: 1.3.0 + is-data-view: 1.0.2 + + data-view-byte-length@1.0.2: + dependencies: + call-bound: 1.0.3 + es-errors: 1.3.0 + is-data-view: 1.0.2 + + data-view-byte-offset@1.0.1: + dependencies: + call-bound: 1.0.3 + es-errors: 1.3.0 + is-data-view: 1.0.2 + + dayjs@1.11.13: {} + + de-indent@1.0.2: {} + + debug@2.6.9: + dependencies: + ms: 2.0.0 + + debug@3.2.7: + dependencies: + ms: 2.1.3 + + debug@4.3.4: + dependencies: + ms: 2.1.2 + + debug@4.4.0: + dependencies: + ms: 2.1.3 + + decamelize-keys@1.1.1: + dependencies: + decamelize: 1.2.0 + map-obj: 1.0.1 + + decamelize@1.2.0: {} + + decode-uri-component@0.2.2: {} + + dedent@0.7.0: {} + + dedent@1.5.3: {} + + deep-is@0.1.4: {} + + deepmerge@4.3.1: {} + + defaults@1.0.4: + dependencies: + clone: 1.0.4 + + define-data-property@1.1.4: + dependencies: + es-define-property: 1.0.1 + es-errors: 1.3.0 + gopd: 1.2.0 + + define-lazy-prop@2.0.0: {} + + define-properties@1.2.1: + dependencies: + define-data-property: 1.1.4 + has-property-descriptors: 1.0.2 + object-keys: 1.1.1 + + define-property@0.2.5: + dependencies: + is-descriptor: 0.1.7 + + define-property@1.0.0: + dependencies: + is-descriptor: 1.0.3 + + define-property@2.0.2: + dependencies: + is-descriptor: 1.0.3 + isobject: 3.0.1 + + defu@6.1.4: {} + + delayed-stream@1.0.0: {} + + delegate@3.2.0: {} + + deprecation@2.3.1: {} + + destr@2.0.3: {} + + detect-file@1.0.0: {} + + detect-indent@6.1.0: {} + + detect-newline@3.1.0: {} + + diff-match-patch@1.0.5: {} + + diff-sequences@29.6.3: {} + + diff@4.0.2: {} + + dijkstrajs@1.0.3: {} + + dingtalk-jsapi@3.0.42: + dependencies: + promise-polyfill: 7.1.2 + + dir-glob@3.0.1: + dependencies: + path-type: 4.0.0 + + doctrine@3.0.0: + dependencies: + esutils: 2.0.3 + + dom-align@1.12.4: {} + + dom-scroll-into-view@2.0.1: {} + + dom-serializer@0.2.2: + dependencies: + domelementtype: 2.3.0 + entities: 2.2.0 + + dom-serializer@1.4.1: + dependencies: + domelementtype: 2.3.0 + domhandler: 4.3.1 + entities: 2.2.0 + + dom-serializer@2.0.0: + dependencies: + domelementtype: 2.3.0 + domhandler: 5.0.3 + entities: 4.5.0 + + dom-zindex@1.0.6: {} + + domelementtype@1.3.1: {} + + domelementtype@2.3.0: {} + + domhandler@2.4.2: + dependencies: + domelementtype: 1.3.1 + + domhandler@4.3.1: + dependencies: + domelementtype: 2.3.0 + + domhandler@5.0.3: + dependencies: + domelementtype: 2.3.0 + + domutils@1.7.0: + dependencies: + dom-serializer: 0.2.2 + domelementtype: 1.3.1 + + domutils@2.8.0: + dependencies: + dom-serializer: 1.4.1 + domelementtype: 2.3.0 + domhandler: 4.3.1 + + domutils@3.2.1: + dependencies: + dom-serializer: 2.0.0 + domelementtype: 2.3.0 + domhandler: 5.0.3 + + dot-case@3.0.4: + dependencies: + no-case: 3.0.4 + tslib: 2.8.1 + + dot-prop@5.3.0: + dependencies: + is-obj: 2.0.0 + + dotenv-expand@8.0.3: {} + + dotenv@16.4.7: {} + + dunder-proto@1.0.1: + dependencies: + call-bind-apply-helpers: 1.0.1 + es-errors: 1.3.0 + gopd: 1.2.0 + + duplexer@0.1.2: {} + + eastasianwidth@0.2.0: {} + + echarts@5.6.0: + dependencies: + tslib: 2.3.0 + zrender: 5.6.1 + + editorconfig@1.0.4: + dependencies: + '@one-ini/wasm': 0.1.1 + commander: 10.0.1 + minimatch: 9.0.1 + semver: 7.6.3 + + ee-first@1.1.1: {} + + ejs@3.1.10: + dependencies: + jake: 10.9.2 + + electron-to-chromium@1.5.76: {} + + emittery@0.13.1: {} + + emoji-mart-vue-fast@15.0.3(vue@3.5.13(typescript@4.9.5)): + dependencies: + '@babel/runtime': 7.26.0 + core-js: 3.39.0 + vue: 3.5.13(typescript@4.9.5) + + emoji-regex@10.4.0: {} + + emoji-regex@8.0.0: {} + + emoji-regex@9.2.2: {} + + emojis-list@3.0.0: {} + + encodeurl@1.0.2: {} + + encoding-sniffer@0.2.0: + dependencies: + iconv-lite: 0.6.3 + whatwg-encoding: 3.1.1 + + enquire.js@2.1.6: {} + + entities@1.1.2: {} + + entities@2.2.0: {} + + entities@4.5.0: {} + + env-paths@2.2.1: {} + + environment@1.1.0: {} + + errno@0.1.8: + dependencies: + prr: 1.0.1 + optional: true + + error-ex@1.3.2: + dependencies: + is-arrayish: 0.2.1 + + es-abstract@1.23.9: + dependencies: + array-buffer-byte-length: 1.0.2 + arraybuffer.prototype.slice: 1.0.4 + available-typed-arrays: 1.0.7 + call-bind: 1.0.8 + call-bound: 1.0.3 + data-view-buffer: 1.0.2 + data-view-byte-length: 1.0.2 + data-view-byte-offset: 1.0.1 + es-define-property: 1.0.1 + es-errors: 1.3.0 + es-object-atoms: 1.0.0 + es-set-tostringtag: 2.1.0 + es-to-primitive: 1.3.0 + function.prototype.name: 1.1.8 + get-intrinsic: 1.2.7 + get-proto: 1.0.1 + get-symbol-description: 1.1.0 + globalthis: 1.0.4 + gopd: 1.2.0 + has-property-descriptors: 1.0.2 + has-proto: 1.2.0 + has-symbols: 1.1.0 + hasown: 2.0.2 + internal-slot: 1.1.0 + is-array-buffer: 3.0.5 + is-callable: 1.2.7 + is-data-view: 1.0.2 + is-regex: 1.2.1 + is-shared-array-buffer: 1.0.4 + is-string: 1.1.1 + is-typed-array: 1.1.15 + is-weakref: 1.1.0 + math-intrinsics: 1.1.0 + object-inspect: 1.13.3 + object-keys: 1.1.1 + object.assign: 4.1.7 + own-keys: 1.0.1 + regexp.prototype.flags: 1.5.4 + safe-array-concat: 1.1.3 + safe-push-apply: 1.0.0 + safe-regex-test: 1.1.0 + set-proto: 1.0.0 + string.prototype.trim: 1.2.10 + string.prototype.trimend: 1.0.9 + string.prototype.trimstart: 1.0.8 + typed-array-buffer: 1.0.3 + typed-array-byte-length: 1.0.3 + typed-array-byte-offset: 1.0.4 + typed-array-length: 1.0.7 + unbox-primitive: 1.1.0 + which-typed-array: 1.1.18 + + es-define-property@1.0.1: {} + + es-errors@1.3.0: {} + + es-object-atoms@1.0.0: + dependencies: + es-errors: 1.3.0 + + es-set-tostringtag@2.1.0: + dependencies: + es-errors: 1.3.0 + get-intrinsic: 1.2.7 + has-tostringtag: 1.0.2 + hasown: 2.0.2 + + es-to-primitive@1.3.0: + dependencies: + is-callable: 1.2.7 + is-date-object: 1.1.0 + is-symbol: 1.1.1 + + esbuild-android-64@0.14.54: + optional: true + + esbuild-android-arm64@0.14.54: + optional: true + + esbuild-darwin-64@0.14.54: + optional: true + + esbuild-darwin-arm64@0.14.54: + optional: true + + esbuild-freebsd-64@0.14.54: + optional: true + + esbuild-freebsd-arm64@0.14.54: + optional: true + + esbuild-linux-32@0.14.54: + optional: true + + esbuild-linux-64@0.14.54: + optional: true + + esbuild-linux-arm64@0.14.54: + optional: true + + esbuild-linux-arm@0.14.54: + optional: true + + esbuild-linux-mips64le@0.14.54: + optional: true + + esbuild-linux-ppc64le@0.14.54: + optional: true + + esbuild-linux-riscv64@0.14.54: + optional: true + + esbuild-linux-s390x@0.14.54: + optional: true + + esbuild-netbsd-64@0.14.54: + optional: true + + esbuild-openbsd-64@0.14.54: + optional: true + + esbuild-plugin-alias@0.1.2: {} + + esbuild-sunos-64@0.14.54: + optional: true + + esbuild-windows-32@0.14.54: + optional: true + + esbuild-windows-64@0.14.54: + optional: true + + esbuild-windows-arm64@0.14.54: + optional: true + + esbuild@0.11.23: {} + + esbuild@0.14.54: + optionalDependencies: + '@esbuild/linux-loong64': 0.14.54 + esbuild-android-64: 0.14.54 + esbuild-android-arm64: 0.14.54 + esbuild-darwin-64: 0.14.54 + esbuild-darwin-arm64: 0.14.54 + esbuild-freebsd-64: 0.14.54 + esbuild-freebsd-arm64: 0.14.54 + esbuild-linux-32: 0.14.54 + esbuild-linux-64: 0.14.54 + esbuild-linux-arm: 0.14.54 + esbuild-linux-arm64: 0.14.54 + esbuild-linux-mips64le: 0.14.54 + esbuild-linux-ppc64le: 0.14.54 + esbuild-linux-riscv64: 0.14.54 + esbuild-linux-s390x: 0.14.54 + esbuild-netbsd-64: 0.14.54 + esbuild-openbsd-64: 0.14.54 + esbuild-sunos-64: 0.14.54 + esbuild-windows-32: 0.14.54 + esbuild-windows-64: 0.14.54 + esbuild-windows-arm64: 0.14.54 + + esbuild@0.23.1: + optionalDependencies: + '@esbuild/aix-ppc64': 0.23.1 + '@esbuild/android-arm': 0.23.1 + '@esbuild/android-arm64': 0.23.1 + '@esbuild/android-x64': 0.23.1 + '@esbuild/darwin-arm64': 0.23.1 + '@esbuild/darwin-x64': 0.23.1 + '@esbuild/freebsd-arm64': 0.23.1 + '@esbuild/freebsd-x64': 0.23.1 + '@esbuild/linux-arm': 0.23.1 + '@esbuild/linux-arm64': 0.23.1 + '@esbuild/linux-ia32': 0.23.1 + '@esbuild/linux-loong64': 0.23.1 + '@esbuild/linux-mips64el': 0.23.1 + '@esbuild/linux-ppc64': 0.23.1 + '@esbuild/linux-riscv64': 0.23.1 + '@esbuild/linux-s390x': 0.23.1 + '@esbuild/linux-x64': 0.23.1 + '@esbuild/netbsd-x64': 0.23.1 + '@esbuild/openbsd-arm64': 0.23.1 + '@esbuild/openbsd-x64': 0.23.1 + '@esbuild/sunos-x64': 0.23.1 + '@esbuild/win32-arm64': 0.23.1 + '@esbuild/win32-ia32': 0.23.1 + '@esbuild/win32-x64': 0.23.1 + + esbuild@0.24.2: + optionalDependencies: + '@esbuild/aix-ppc64': 0.24.2 + '@esbuild/android-arm': 0.24.2 + '@esbuild/android-arm64': 0.24.2 + '@esbuild/android-x64': 0.24.2 + '@esbuild/darwin-arm64': 0.24.2 + '@esbuild/darwin-x64': 0.24.2 + '@esbuild/freebsd-arm64': 0.24.2 + '@esbuild/freebsd-x64': 0.24.2 + '@esbuild/linux-arm': 0.24.2 + '@esbuild/linux-arm64': 0.24.2 + '@esbuild/linux-ia32': 0.24.2 + '@esbuild/linux-loong64': 0.24.2 + '@esbuild/linux-mips64el': 0.24.2 + '@esbuild/linux-ppc64': 0.24.2 + '@esbuild/linux-riscv64': 0.24.2 + '@esbuild/linux-s390x': 0.24.2 + '@esbuild/linux-x64': 0.24.2 + '@esbuild/netbsd-arm64': 0.24.2 + '@esbuild/netbsd-x64': 0.24.2 + '@esbuild/openbsd-arm64': 0.24.2 + '@esbuild/openbsd-x64': 0.24.2 + '@esbuild/sunos-x64': 0.24.2 + '@esbuild/win32-arm64': 0.24.2 + '@esbuild/win32-ia32': 0.24.2 + '@esbuild/win32-x64': 0.24.2 + + escalade@3.2.0: {} + + escape-html@1.0.3: {} + + escape-string-regexp@1.0.5: {} + + escape-string-regexp@2.0.0: {} + + escape-string-regexp@4.0.0: {} + + eslint-config-prettier@9.1.0(eslint@8.57.1): + dependencies: + eslint: 8.57.1 + + eslint-define-config@2.1.0: {} + + eslint-plugin-jest@27.9.0(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@4.9.5))(eslint@8.57.1)(typescript@4.9.5))(eslint@8.57.1)(jest@29.7.0(@types/node@20.17.12)(ts-node@10.9.2(@types/node@20.17.12)(typescript@4.9.5)))(typescript@4.9.5): + dependencies: + '@typescript-eslint/utils': 5.62.0(eslint@8.57.1)(typescript@4.9.5) + eslint: 8.57.1 + optionalDependencies: + '@typescript-eslint/eslint-plugin': 6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@4.9.5))(eslint@8.57.1)(typescript@4.9.5) + jest: 29.7.0(@types/node@20.17.12)(ts-node@10.9.2(@types/node@20.17.12)(typescript@4.9.5)) + transitivePeerDependencies: + - supports-color + - typescript + + eslint-plugin-prettier@5.2.1(eslint-config-prettier@9.1.0(eslint@8.57.1))(eslint@8.57.1)(prettier@3.4.2): + dependencies: + eslint: 8.57.1 + prettier: 3.4.2 + prettier-linter-helpers: 1.0.0 + synckit: 0.9.2 + optionalDependencies: + eslint-config-prettier: 9.1.0(eslint@8.57.1) + + eslint-plugin-vue@9.32.0(eslint@8.57.1): + dependencies: + '@eslint-community/eslint-utils': 4.4.1(eslint@8.57.1) + eslint: 8.57.1 + globals: 13.24.0 + natural-compare: 1.4.0 + nth-check: 2.1.1 + postcss-selector-parser: 6.1.2 + semver: 7.6.3 + vue-eslint-parser: 9.4.3(eslint@8.57.1) + xml-name-validator: 4.0.0 + transitivePeerDependencies: + - supports-color + + eslint-scope@5.1.1: + dependencies: + esrecurse: 4.3.0 + estraverse: 4.3.0 + + eslint-scope@7.2.2: + dependencies: + esrecurse: 4.3.0 + estraverse: 5.3.0 + + eslint-visitor-keys@3.4.3: {} + + eslint@8.57.1: + dependencies: + '@eslint-community/eslint-utils': 4.4.1(eslint@8.57.1) + '@eslint-community/regexpp': 4.12.1 + '@eslint/eslintrc': 2.1.4 + '@eslint/js': 8.57.1 + '@humanwhocodes/config-array': 0.13.0 + '@humanwhocodes/module-importer': 1.0.1 + '@nodelib/fs.walk': 1.2.8 + '@ungap/structured-clone': 1.2.1 + ajv: 6.12.6 + chalk: 4.1.2 + cross-spawn: 7.0.6 + debug: 4.4.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.1.0 + json-stable-stringify-without-jsonify: 1.0.1 + levn: 0.4.1 + lodash.merge: 4.6.2 + minimatch: 3.1.2 + natural-compare: 1.4.0 + optionator: 0.9.4 + strip-ansi: 6.0.1 + text-table: 0.2.0 + transitivePeerDependencies: + - supports-color + + esno@4.8.0: + dependencies: + tsx: 4.19.2 + + espree@9.6.1: + dependencies: + acorn: 8.14.0 + acorn-jsx: 5.3.2(acorn@8.14.0) + eslint-visitor-keys: 3.4.3 + + esprima@4.0.1: {} + + esquery@1.6.0: + dependencies: + estraverse: 5.3.0 + + esrecurse@4.3.0: + dependencies: + estraverse: 5.3.0 + + estraverse@4.3.0: {} + + estraverse@5.3.0: {} + + estree-walker@2.0.2: {} + + esutils@2.0.3: {} + + etag@1.8.1: {} + + event-source-polyfill@1.0.31: {} + + eventemitter3@4.0.7: {} + + eventemitter3@5.0.1: {} + + execa@5.1.1: + dependencies: + cross-spawn: 7.0.6 + get-stream: 6.0.1 + human-signals: 2.1.0 + is-stream: 2.0.1 + merge-stream: 2.0.0 + npm-run-path: 4.0.1 + onetime: 5.1.2 + signal-exit: 3.0.7 + strip-final-newline: 2.0.0 + + 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 + + exit@0.1.2: {} + + expand-brackets@2.1.4: + dependencies: + debug: 2.6.9 + define-property: 0.2.5 + extend-shallow: 2.0.1 + posix-character-classes: 0.1.1 + regex-not: 1.0.2 + snapdragon: 0.8.2 + to-regex: 3.0.2 + transitivePeerDependencies: + - supports-color + + expand-tilde@2.0.2: + dependencies: + homedir-polyfill: 1.0.3 + + expect@29.7.0: + dependencies: + '@jest/expect-utils': 29.7.0 + jest-get-type: 29.6.3 + jest-matcher-utils: 29.7.0 + jest-message-util: 29.7.0 + jest-util: 29.7.0 + + extend-shallow@2.0.1: + dependencies: + is-extendable: 0.1.1 + + extend-shallow@3.0.2: + dependencies: + assign-symbols: 1.0.0 + is-extendable: 1.0.1 + + external-editor@3.1.0: + dependencies: + chardet: 0.7.0 + iconv-lite: 0.4.24 + tmp: 0.0.33 + + extglob@2.0.4: + dependencies: + array-unique: 0.3.2 + define-property: 1.0.0 + expand-brackets: 2.1.4 + extend-shallow: 2.0.1 + fragment-cache: 0.2.1 + regex-not: 1.0.2 + snapdragon: 0.8.2 + to-regex: 3.0.2 + transitivePeerDependencies: + - supports-color + + fast-deep-equal@3.1.3: {} + + fast-diff@1.3.0: {} + + 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.0.5: {} + + fastest-levenshtein@1.0.16: {} + + fastq@1.18.0: + dependencies: + reusify: 1.0.4 + + fb-watchman@2.0.2: + dependencies: + bser: 2.1.1 + + figures@3.2.0: + dependencies: + escape-string-regexp: 1.0.5 + + file-entry-cache@6.0.1: + dependencies: + flat-cache: 3.2.0 + + file-entry-cache@9.1.0: + dependencies: + flat-cache: 5.0.0 + + filelist@1.0.4: + dependencies: + minimatch: 5.1.6 + + fill-range@4.0.0: + dependencies: + extend-shallow: 2.0.1 + is-number: 3.0.0 + repeat-string: 1.6.1 + to-regex-range: 2.1.1 + + fill-range@7.1.1: + dependencies: + to-regex-range: 5.0.1 + + finalhandler@1.1.2: + dependencies: + debug: 2.6.9 + encodeurl: 1.0.2 + escape-html: 1.0.3 + on-finished: 2.3.0 + parseurl: 1.3.3 + statuses: 1.5.0 + unpipe: 1.0.0 + transitivePeerDependencies: + - supports-color + + find-node-modules@2.1.3: + dependencies: + findup-sync: 4.0.0 + merge: 2.1.1 + + find-root@1.1.0: {} + + 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@6.3.0: + dependencies: + locate-path: 7.2.0 + path-exists: 5.0.0 + + findup-sync@4.0.0: + dependencies: + detect-file: 1.0.0 + is-glob: 4.0.3 + micromatch: 4.0.8 + resolve-dir: 1.0.1 + + flat-cache@3.2.0: + dependencies: + flatted: 3.3.2 + keyv: 4.5.4 + rimraf: 3.0.2 + + flat-cache@5.0.0: + dependencies: + flatted: 3.3.2 + keyv: 4.5.4 + + flatted@3.3.2: {} + + follow-redirects@1.15.9(debug@4.4.0): + optionalDependencies: + debug: 4.4.0 + + for-each@0.3.3: + dependencies: + is-callable: 1.2.7 + + for-in@1.0.2: {} + + foreground-child@3.3.0: + dependencies: + cross-spawn: 7.0.6 + signal-exit: 4.1.0 + + form-data@4.0.1: + dependencies: + asynckit: 0.4.0 + combined-stream: 1.0.8 + mime-types: 2.1.35 + + fraction.js@4.3.7: {} + + fragment-cache@0.2.1: + dependencies: + map-cache: 0.2.2 + + fs-extra@10.1.0: + dependencies: + graceful-fs: 4.2.11 + jsonfile: 6.1.0 + universalify: 2.0.1 + + fs-extra@11.2.0: + dependencies: + graceful-fs: 4.2.11 + jsonfile: 6.1.0 + universalify: 2.0.1 + + fs-extra@9.1.0: + dependencies: + at-least-node: 1.0.0 + 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: {} + + function.prototype.name@1.1.8: + dependencies: + call-bind: 1.0.8 + call-bound: 1.0.3 + define-properties: 1.2.1 + functions-have-names: 1.2.3 + hasown: 2.0.2 + is-callable: 1.2.7 + + functions-have-names@1.2.3: {} + + gensync@1.0.0-beta.2: {} + + get-caller-file@2.0.5: {} + + get-east-asian-width@1.3.0: {} + + get-intrinsic@1.2.7: + dependencies: + call-bind-apply-helpers: 1.0.1 + es-define-property: 1.0.1 + es-errors: 1.3.0 + es-object-atoms: 1.0.0 + function-bind: 1.1.2 + get-proto: 1.0.1 + gopd: 1.2.0 + has-symbols: 1.1.0 + hasown: 2.0.2 + math-intrinsics: 1.1.0 + + get-package-type@0.1.0: {} + + get-proto@1.0.1: + dependencies: + dunder-proto: 1.0.1 + es-object-atoms: 1.0.0 + + get-stream@6.0.1: {} + + get-stream@8.0.1: {} + + get-symbol-description@1.1.0: + dependencies: + call-bound: 1.0.3 + es-errors: 1.3.0 + get-intrinsic: 1.2.7 + + get-tsconfig@4.8.1: + dependencies: + resolve-pkg-maps: 1.0.0 + + get-value@2.0.6: {} + + git-raw-commits@2.0.11: + dependencies: + dargs: 7.0.0 + lodash: 4.17.21 + meow: 8.1.2 + split2: 3.2.2 + through2: 4.0.2 + + git-raw-commits@4.0.0: + dependencies: + dargs: 8.1.0 + meow: 12.1.1 + split2: 4.2.0 + + git-semver-tags@7.0.1: + dependencies: + meow: 12.1.1 + semver: 7.6.3 + + glob-parent@5.1.2: + dependencies: + is-glob: 4.0.3 + + glob-parent@6.0.2: + dependencies: + is-glob: 4.0.3 + + glob@10.4.5: + dependencies: + foreground-child: 3.3.0 + jackspeak: 3.4.3 + minimatch: 9.0.5 + minipass: 7.1.2 + package-json-from-dist: 1.0.1 + path-scurry: 1.11.1 + + glob@7.2.3: + dependencies: + fs.realpath: 1.0.0 + inflight: 1.0.6 + inherits: 2.0.4 + minimatch: 3.1.2 + once: 1.4.0 + path-is-absolute: 1.0.1 + + global-directory@4.0.1: + dependencies: + ini: 4.1.1 + optional: true + + global-dirs@0.1.1: + dependencies: + ini: 1.3.8 + + global-modules@1.0.0: + dependencies: + global-prefix: 1.0.2 + is-windows: 1.0.2 + resolve-dir: 1.0.1 + + global-modules@2.0.0: + dependencies: + global-prefix: 3.0.0 + + global-prefix@1.0.2: + dependencies: + expand-tilde: 2.0.2 + homedir-polyfill: 1.0.3 + ini: 1.3.8 + is-windows: 1.0.2 + which: 1.3.1 + + global-prefix@3.0.0: + dependencies: + ini: 1.3.8 + kind-of: 6.0.3 + which: 1.3.1 + + globals@11.12.0: {} + + globals@13.24.0: + dependencies: + type-fest: 0.20.2 + + globals@15.14.0: {} + + globalthis@1.0.4: + dependencies: + define-properties: 1.2.1 + gopd: 1.2.0 + + 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: {} + + good-listener@1.2.2: + dependencies: + delegate: 3.2.0 + + gopd@1.2.0: {} + + graceful-fs@4.2.11: {} + + graphemer@1.4.0: {} + + gzip-size@6.0.0: + dependencies: + duplexer: 0.1.2 + + handlebars@4.7.8: + dependencies: + minimist: 1.2.8 + neo-async: 2.6.2 + source-map: 0.6.1 + wordwrap: 1.0.0 + optionalDependencies: + uglify-js: 3.19.3 + + hard-rejection@2.1.0: {} + + has-ansi@2.0.0: + dependencies: + ansi-regex: 2.1.1 + + has-bigints@1.1.0: {} + + has-flag@1.0.0: {} + + has-flag@3.0.0: {} + + has-flag@4.0.0: {} + + has-property-descriptors@1.0.2: + dependencies: + es-define-property: 1.0.1 + + has-proto@1.2.0: + dependencies: + dunder-proto: 1.0.1 + + has-symbols@1.1.0: {} + + has-tostringtag@1.0.2: + dependencies: + has-symbols: 1.1.0 + + has-value@0.3.1: + dependencies: + get-value: 2.0.6 + has-values: 0.1.4 + isobject: 2.1.0 + + has-value@1.0.0: + dependencies: + get-value: 2.0.6 + has-values: 1.0.0 + isobject: 3.0.1 + + has-values@0.1.4: {} + + has-values@1.0.0: + dependencies: + is-number: 3.0.0 + kind-of: 4.0.0 + + hasown@2.0.2: + dependencies: + function-bind: 1.1.2 + + he@1.2.0: {} + + highlight.js@11.11.1: {} + + hoist-non-react-statics@2.5.5: {} + + homedir-polyfill@1.0.3: + dependencies: + parse-passwd: 1.0.0 + + hosted-git-info@2.8.9: {} + + hosted-git-info@4.1.0: + dependencies: + lru-cache: 6.0.0 + + hosted-git-info@7.0.2: + dependencies: + lru-cache: 10.4.3 + + html-encoding-sniffer@3.0.0: + dependencies: + whatwg-encoding: 2.0.0 + + html-escaper@2.0.2: {} + + html-minifier-terser@6.1.0: + dependencies: + camel-case: 4.1.2 + clean-css: 5.3.3 + commander: 8.3.0 + he: 1.2.0 + param-case: 3.0.4 + relateurl: 0.2.7 + terser: 5.37.0 + + html-tags@3.3.1: {} + + htmlparser2@3.10.1: + dependencies: + domelementtype: 1.3.1 + domhandler: 2.4.2 + domutils: 1.7.0 + entities: 1.1.2 + inherits: 2.0.4 + readable-stream: 3.6.2 + + htmlparser2@8.0.2: + dependencies: + domelementtype: 2.3.0 + domhandler: 5.0.3 + domutils: 3.2.1 + entities: 4.5.0 + + htmlparser2@9.1.0: + dependencies: + domelementtype: 2.3.0 + domhandler: 5.0.3 + domutils: 3.2.1 + entities: 4.5.0 + + http-proxy@1.18.1: + dependencies: + eventemitter3: 4.0.7 + follow-redirects: 1.15.9(debug@4.4.0) + requires-port: 1.0.0 + transitivePeerDependencies: + - debug + + http-server@14.1.1: + dependencies: + basic-auth: 2.0.1 + chalk: 4.1.2 + corser: 2.0.1 + he: 1.2.0 + html-encoding-sniffer: 3.0.0 + http-proxy: 1.18.1 + mime: 1.6.0 + minimist: 1.2.8 + opener: 1.5.2 + portfinder: 1.0.32 + secure-compare: 3.0.1 + union: 0.5.0 + url-join: 4.0.1 + transitivePeerDependencies: + - debug + - supports-color + + human-signals@2.1.0: {} + + human-signals@5.0.0: {} + + husky@8.0.3: {} + + iconv-lite@0.4.24: + dependencies: + safer-buffer: 2.1.2 + + iconv-lite@0.6.3: + dependencies: + safer-buffer: 2.1.2 + + ieee754@1.2.1: {} + + ignore@5.3.2: {} + + ignore@6.0.2: {} + + image-size@0.5.5: {} + + import-fresh@3.3.0: + dependencies: + parent-module: 1.0.1 + resolve-from: 4.0.0 + + import-local@3.2.0: + dependencies: + pkg-dir: 4.2.0 + resolve-cwd: 3.0.0 + + import-meta-resolve@4.1.0: + optional: true + + imurmurhash@0.1.4: {} + + indent-string@4.0.0: {} + + inflight@1.0.6: + dependencies: + once: 1.4.0 + wrappy: 1.0.2 + + inherits@2.0.4: {} + + ini@1.3.8: {} + + ini@4.1.1: + optional: true + + inquirer@8.2.5: + dependencies: + ansi-escapes: 4.3.2 + chalk: 4.1.2 + cli-cursor: 3.1.0 + cli-width: 3.0.0 + external-editor: 3.1.0 + figures: 3.2.0 + lodash: 4.17.21 + mute-stream: 0.0.8 + ora: 5.4.1 + run-async: 2.4.1 + rxjs: 7.8.1 + string-width: 4.2.3 + strip-ansi: 6.0.1 + through: 2.3.8 + wrap-ansi: 7.0.0 + + inquirer@9.3.7: + dependencies: + '@inquirer/figures': 1.0.9 + ansi-escapes: 4.3.2 + cli-width: 4.1.0 + external-editor: 3.1.0 + mute-stream: 1.0.0 + ora: 5.4.1 + run-async: 3.0.0 + rxjs: 7.8.1 + string-width: 4.2.3 + strip-ansi: 6.0.1 + wrap-ansi: 6.2.0 + yoctocolors-cjs: 2.1.2 + + internal-slot@1.1.0: + dependencies: + es-errors: 1.3.0 + hasown: 2.0.2 + side-channel: 1.1.0 + + intro.js@7.2.0: {} + + is-accessor-descriptor@1.0.1: + dependencies: + hasown: 2.0.2 + + is-array-buffer@3.0.5: + dependencies: + call-bind: 1.0.8 + call-bound: 1.0.3 + get-intrinsic: 1.2.7 + + is-arrayish@0.2.1: {} + + is-async-function@2.1.0: + dependencies: + call-bound: 1.0.3 + get-proto: 1.0.1 + has-tostringtag: 1.0.2 + safe-regex-test: 1.1.0 + + is-bigint@1.1.0: + dependencies: + has-bigints: 1.1.0 + + is-binary-path@2.1.0: + dependencies: + binary-extensions: 2.3.0 + + is-boolean-object@1.2.1: + dependencies: + call-bound: 1.0.3 + has-tostringtag: 1.0.2 + + is-buffer@1.1.6: {} + + is-callable@1.2.7: {} + + is-ci@3.0.1: + dependencies: + ci-info: 3.9.0 + + is-core-module@2.16.1: + dependencies: + hasown: 2.0.2 + + is-data-descriptor@1.0.1: + dependencies: + hasown: 2.0.2 + + is-data-view@1.0.2: + dependencies: + call-bound: 1.0.3 + get-intrinsic: 1.2.7 + is-typed-array: 1.1.15 + + is-date-object@1.1.0: + dependencies: + call-bound: 1.0.3 + has-tostringtag: 1.0.2 + + is-descriptor@0.1.7: + dependencies: + is-accessor-descriptor: 1.0.1 + is-data-descriptor: 1.0.1 + + is-descriptor@1.0.3: + dependencies: + is-accessor-descriptor: 1.0.1 + is-data-descriptor: 1.0.1 + + is-docker@2.2.1: {} + + is-extendable@0.1.1: {} + + is-extendable@1.0.1: + dependencies: + is-plain-object: 2.0.4 + + is-extglob@2.1.1: {} + + is-finalizationregistry@1.1.1: + dependencies: + call-bound: 1.0.3 + + 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-generator-fn@2.1.0: {} + + is-generator-function@1.1.0: + dependencies: + call-bound: 1.0.3 + get-proto: 1.0.1 + has-tostringtag: 1.0.2 + safe-regex-test: 1.1.0 + + is-glob@4.0.3: + dependencies: + is-extglob: 2.1.1 + + is-interactive@1.0.0: {} + + is-map@2.0.3: {} + + is-number-object@1.1.1: + dependencies: + call-bound: 1.0.3 + has-tostringtag: 1.0.2 + + is-number@3.0.0: + dependencies: + kind-of: 3.2.2 + + is-number@7.0.0: {} + + is-obj@2.0.0: {} + + is-path-inside@3.0.3: {} + + is-plain-obj@1.1.0: {} + + is-plain-object@2.0.4: + dependencies: + isobject: 3.0.1 + + is-plain-object@3.0.1: {} + + is-plain-object@5.0.0: {} + + is-regex@1.2.1: + dependencies: + call-bound: 1.0.3 + gopd: 1.2.0 + has-tostringtag: 1.0.2 + hasown: 2.0.2 + + is-set@2.0.3: {} + + is-shared-array-buffer@1.0.4: + dependencies: + call-bound: 1.0.3 + + is-stream@2.0.1: {} + + is-stream@3.0.0: {} + + is-string@1.1.1: + dependencies: + call-bound: 1.0.3 + has-tostringtag: 1.0.2 + + is-symbol@1.1.1: + dependencies: + call-bound: 1.0.3 + has-symbols: 1.1.0 + safe-regex-test: 1.1.0 + + is-text-path@2.0.0: + dependencies: + text-extensions: 2.4.0 + + is-typed-array@1.1.15: + dependencies: + which-typed-array: 1.1.18 + + is-unicode-supported@0.1.0: {} + + is-utf8@0.2.1: {} + + is-weakmap@2.0.2: {} + + is-weakref@1.1.0: + dependencies: + call-bound: 1.0.3 + + is-weakset@2.0.4: + dependencies: + call-bound: 1.0.3 + get-intrinsic: 1.2.7 + + is-what@3.14.1: {} + + is-windows@1.0.2: {} + + is-wsl@2.2.0: + dependencies: + is-docker: 2.2.1 + + isarray@1.0.0: {} + + isarray@2.0.5: {} + + isexe@2.0.0: {} + + isobject@2.1.0: + dependencies: + isarray: 1.0.0 + + isobject@3.0.1: {} + + istanbul-lib-coverage@3.2.2: {} + + istanbul-lib-instrument@5.2.1: + dependencies: + '@babel/core': 7.26.0 + '@babel/parser': 7.26.3 + '@istanbuljs/schema': 0.1.3 + istanbul-lib-coverage: 3.2.2 + semver: 6.3.1 + transitivePeerDependencies: + - supports-color + + istanbul-lib-instrument@6.0.3: + dependencies: + '@babel/core': 7.26.0 + '@babel/parser': 7.26.3 + '@istanbuljs/schema': 0.1.3 + istanbul-lib-coverage: 3.2.2 + semver: 7.6.3 + transitivePeerDependencies: + - supports-color + + istanbul-lib-report@3.0.1: + dependencies: + istanbul-lib-coverage: 3.2.2 + make-dir: 4.0.0 + supports-color: 7.2.0 + + istanbul-lib-source-maps@4.0.1: + dependencies: + debug: 4.4.0 + istanbul-lib-coverage: 3.2.2 + source-map: 0.6.1 + transitivePeerDependencies: + - supports-color + + istanbul-reports@3.1.7: + 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 + + jake@10.9.2: + dependencies: + async: 3.2.6 + chalk: 4.1.2 + filelist: 1.0.4 + minimatch: 3.1.2 + + jest-changed-files@29.7.0: + dependencies: + execa: 5.1.1 + jest-util: 29.7.0 + p-limit: 3.1.0 + + jest-circus@29.7.0: + dependencies: + '@jest/environment': 29.7.0 + '@jest/expect': 29.7.0 + '@jest/test-result': 29.7.0 + '@jest/types': 29.6.3 + '@types/node': 20.17.12 + chalk: 4.1.2 + co: 4.6.0 + dedent: 1.5.3 + is-generator-fn: 2.1.0 + jest-each: 29.7.0 + jest-matcher-utils: 29.7.0 + jest-message-util: 29.7.0 + jest-runtime: 29.7.0 + jest-snapshot: 29.7.0 + jest-util: 29.7.0 + p-limit: 3.1.0 + pretty-format: 29.7.0 + pure-rand: 6.1.0 + slash: 3.0.0 + stack-utils: 2.0.6 + transitivePeerDependencies: + - babel-plugin-macros + - supports-color + + jest-cli@29.7.0(@types/node@20.17.12)(ts-node@10.9.2(@types/node@20.17.12)(typescript@4.9.5)): + dependencies: + '@jest/core': 29.7.0(ts-node@10.9.2(@types/node@20.17.12)(typescript@4.9.5)) + '@jest/test-result': 29.7.0 + '@jest/types': 29.6.3 + chalk: 4.1.2 + create-jest: 29.7.0(@types/node@20.17.12)(ts-node@10.9.2(@types/node@20.17.12)(typescript@4.9.5)) + exit: 0.1.2 + import-local: 3.2.0 + jest-config: 29.7.0(@types/node@20.17.12)(ts-node@10.9.2(@types/node@20.17.12)(typescript@4.9.5)) + jest-util: 29.7.0 + jest-validate: 29.7.0 + yargs: 17.7.2 + transitivePeerDependencies: + - '@types/node' + - babel-plugin-macros + - supports-color + - ts-node + + jest-config@29.7.0(@types/node@20.17.12)(ts-node@10.9.2(@types/node@20.17.12)(typescript@4.9.5)): + dependencies: + '@babel/core': 7.26.0 + '@jest/test-sequencer': 29.7.0 + '@jest/types': 29.6.3 + babel-jest: 29.7.0(@babel/core@7.26.0) + chalk: 4.1.2 + ci-info: 3.9.0 + deepmerge: 4.3.1 + glob: 7.2.3 + graceful-fs: 4.2.11 + jest-circus: 29.7.0 + jest-environment-node: 29.7.0 + jest-get-type: 29.6.3 + jest-regex-util: 29.6.3 + jest-resolve: 29.7.0 + jest-runner: 29.7.0 + jest-util: 29.7.0 + jest-validate: 29.7.0 + micromatch: 4.0.8 + parse-json: 5.2.0 + pretty-format: 29.7.0 + slash: 3.0.0 + strip-json-comments: 3.1.1 + optionalDependencies: + '@types/node': 20.17.12 + ts-node: 10.9.2(@types/node@20.17.12)(typescript@4.9.5) + transitivePeerDependencies: + - babel-plugin-macros + - supports-color + + jest-diff@29.7.0: + dependencies: + chalk: 4.1.2 + diff-sequences: 29.6.3 + jest-get-type: 29.6.3 + pretty-format: 29.7.0 + + jest-docblock@29.7.0: + dependencies: + detect-newline: 3.1.0 + + jest-each@29.7.0: + dependencies: + '@jest/types': 29.6.3 + chalk: 4.1.2 + jest-get-type: 29.6.3 + jest-util: 29.7.0 + pretty-format: 29.7.0 + + jest-environment-node@29.7.0: + dependencies: + '@jest/environment': 29.7.0 + '@jest/fake-timers': 29.7.0 + '@jest/types': 29.6.3 + '@types/node': 20.17.12 + jest-mock: 29.7.0 + jest-util: 29.7.0 + + jest-get-type@29.6.3: {} + + jest-haste-map@29.7.0: + dependencies: + '@jest/types': 29.6.3 + '@types/graceful-fs': 4.1.9 + '@types/node': 20.17.12 + anymatch: 3.1.3 + fb-watchman: 2.0.2 + graceful-fs: 4.2.11 + jest-regex-util: 29.6.3 + jest-util: 29.7.0 + jest-worker: 29.7.0 + micromatch: 4.0.8 + walker: 1.0.8 + optionalDependencies: + fsevents: 2.3.3 + + jest-leak-detector@29.7.0: + dependencies: + jest-get-type: 29.6.3 + pretty-format: 29.7.0 + + jest-matcher-utils@29.7.0: + dependencies: + chalk: 4.1.2 + jest-diff: 29.7.0 + jest-get-type: 29.6.3 + pretty-format: 29.7.0 + + jest-message-util@29.7.0: + dependencies: + '@babel/code-frame': 7.26.2 + '@jest/types': 29.6.3 + '@types/stack-utils': 2.0.3 + chalk: 4.1.2 + graceful-fs: 4.2.11 + micromatch: 4.0.8 + pretty-format: 29.7.0 + slash: 3.0.0 + stack-utils: 2.0.6 + + jest-mock@29.7.0: + dependencies: + '@jest/types': 29.6.3 + '@types/node': 20.17.12 + jest-util: 29.7.0 + + jest-pnp-resolver@1.2.3(jest-resolve@29.7.0): + optionalDependencies: + jest-resolve: 29.7.0 + + jest-regex-util@29.6.3: {} + + jest-resolve-dependencies@29.7.0: + dependencies: + jest-regex-util: 29.6.3 + jest-snapshot: 29.7.0 + transitivePeerDependencies: + - supports-color + + jest-resolve@29.7.0: + dependencies: + chalk: 4.1.2 + graceful-fs: 4.2.11 + jest-haste-map: 29.7.0 + jest-pnp-resolver: 1.2.3(jest-resolve@29.7.0) + jest-util: 29.7.0 + jest-validate: 29.7.0 + resolve: 1.22.10 + resolve.exports: 2.0.3 + slash: 3.0.0 + + jest-runner@29.7.0: + dependencies: + '@jest/console': 29.7.0 + '@jest/environment': 29.7.0 + '@jest/test-result': 29.7.0 + '@jest/transform': 29.7.0 + '@jest/types': 29.6.3 + '@types/node': 20.17.12 + chalk: 4.1.2 + emittery: 0.13.1 + graceful-fs: 4.2.11 + jest-docblock: 29.7.0 + jest-environment-node: 29.7.0 + jest-haste-map: 29.7.0 + jest-leak-detector: 29.7.0 + jest-message-util: 29.7.0 + jest-resolve: 29.7.0 + jest-runtime: 29.7.0 + jest-util: 29.7.0 + jest-watcher: 29.7.0 + jest-worker: 29.7.0 + p-limit: 3.1.0 + source-map-support: 0.5.13 + transitivePeerDependencies: + - supports-color + + jest-runtime@29.7.0: + dependencies: + '@jest/environment': 29.7.0 + '@jest/fake-timers': 29.7.0 + '@jest/globals': 29.7.0 + '@jest/source-map': 29.6.3 + '@jest/test-result': 29.7.0 + '@jest/transform': 29.7.0 + '@jest/types': 29.6.3 + '@types/node': 20.17.12 + chalk: 4.1.2 + cjs-module-lexer: 1.4.1 + collect-v8-coverage: 1.0.2 + glob: 7.2.3 + graceful-fs: 4.2.11 + jest-haste-map: 29.7.0 + jest-message-util: 29.7.0 + jest-mock: 29.7.0 + jest-regex-util: 29.6.3 + jest-resolve: 29.7.0 + jest-snapshot: 29.7.0 + jest-util: 29.7.0 + slash: 3.0.0 + strip-bom: 4.0.0 + transitivePeerDependencies: + - supports-color + + jest-snapshot@29.7.0: + dependencies: + '@babel/core': 7.26.0 + '@babel/generator': 7.26.3 + '@babel/plugin-syntax-jsx': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-syntax-typescript': 7.25.9(@babel/core@7.26.0) + '@babel/types': 7.26.3 + '@jest/expect-utils': 29.7.0 + '@jest/transform': 29.7.0 + '@jest/types': 29.6.3 + babel-preset-current-node-syntax: 1.1.0(@babel/core@7.26.0) + chalk: 4.1.2 + expect: 29.7.0 + graceful-fs: 4.2.11 + jest-diff: 29.7.0 + jest-get-type: 29.6.3 + jest-matcher-utils: 29.7.0 + jest-message-util: 29.7.0 + jest-util: 29.7.0 + natural-compare: 1.4.0 + pretty-format: 29.7.0 + semver: 7.6.3 + transitivePeerDependencies: + - supports-color + + jest-util@29.7.0: + dependencies: + '@jest/types': 29.6.3 + '@types/node': 20.17.12 + chalk: 4.1.2 + ci-info: 3.9.0 + graceful-fs: 4.2.11 + picomatch: 2.3.1 + + jest-validate@29.7.0: + dependencies: + '@jest/types': 29.6.3 + camelcase: 6.3.0 + chalk: 4.1.2 + jest-get-type: 29.6.3 + leven: 3.1.0 + pretty-format: 29.7.0 + + jest-watcher@29.7.0: + dependencies: + '@jest/test-result': 29.7.0 + '@jest/types': 29.6.3 + '@types/node': 20.17.12 + ansi-escapes: 4.3.2 + chalk: 4.1.2 + emittery: 0.13.1 + jest-util: 29.7.0 + string-length: 4.0.2 + + jest-worker@29.7.0: + dependencies: + '@types/node': 20.17.12 + jest-util: 29.7.0 + merge-stream: 2.0.0 + supports-color: 8.1.1 + + jest@29.7.0(@types/node@20.17.12)(ts-node@10.9.2(@types/node@20.17.12)(typescript@4.9.5)): + dependencies: + '@jest/core': 29.7.0(ts-node@10.9.2(@types/node@20.17.12)(typescript@4.9.5)) + '@jest/types': 29.6.3 + import-local: 3.2.0 + jest-cli: 29.7.0(@types/node@20.17.12)(ts-node@10.9.2(@types/node@20.17.12)(typescript@4.9.5)) + transitivePeerDependencies: + - '@types/node' + - babel-plugin-macros + - supports-color + - ts-node + + jiti@1.21.7: {} + + jiti@2.4.2: + optional: true + + js-base64@2.6.4: {} + + js-beautify@1.15.1: + dependencies: + config-chain: 1.1.13 + editorconfig: 1.0.4 + glob: 10.4.5 + js-cookie: 3.0.5 + nopt: 7.2.1 + + js-cookie@3.0.5: {} + + js-tokens@4.0.0: {} + + js-tokens@9.0.1: {} + + js-yaml@3.14.1: + dependencies: + argparse: 1.0.10 + esprima: 4.0.1 + + js-yaml@4.1.0: + dependencies: + argparse: 2.0.1 + + jsesc@3.1.0: {} + + json-buffer@3.0.1: {} + + json-parse-better-errors@1.0.2: {} + + json-parse-even-better-errors@2.3.1: {} + + json-parse-even-better-errors@3.0.2: {} + + json-schema-traverse@0.4.1: {} + + json-schema-traverse@1.0.0: {} + + json-stable-stringify-without-jsonify@1.0.1: {} + + json-stringify-safe@5.0.1: {} + + json5@1.0.2: + dependencies: + minimist: 1.2.8 + + json5@2.2.3: {} + + jsonfile@6.1.0: + dependencies: + universalify: 2.0.1 + optionalDependencies: + graceful-fs: 4.2.11 + + jsonparse@1.3.1: {} + + katex@0.16.19: + dependencies: + commander: 8.3.0 + + keyv@4.5.4: + dependencies: + json-buffer: 3.0.1 + + kind-of@3.2.2: + dependencies: + is-buffer: 1.1.6 + + kind-of@4.0.0: + dependencies: + is-buffer: 1.1.6 + + kind-of@5.1.0: {} + + kind-of@6.0.3: {} + + kleur@3.0.3: {} + + known-css-properties@0.35.0: {} + + kolorist@1.8.0: {} + + less@4.2.1: + dependencies: + copy-anything: 2.0.6 + parse-node-version: 1.0.1 + tslib: 2.8.1 + optionalDependencies: + errno: 0.1.8 + graceful-fs: 4.2.11 + image-size: 0.5.5 + make-dir: 2.1.0 + mime: 1.6.0 + needle: 3.3.1 + source-map: 0.6.1 + + leven@3.1.0: {} + + levn@0.4.1: + dependencies: + prelude-ls: 1.2.1 + type-check: 0.4.0 + + lilconfig@3.0.0: {} + + lines-and-columns@1.2.4: {} + + lines-and-columns@2.0.4: {} + + linkify-it@5.0.0: + dependencies: + uc.micro: 2.1.0 + + lint-staged@15.2.2: + dependencies: + chalk: 5.3.0 + commander: 11.1.0 + debug: 4.3.4 + execa: 8.0.1 + lilconfig: 3.0.0 + listr2: 8.0.1 + micromatch: 4.0.5 + pidtree: 0.6.0 + string-argv: 0.3.2 + yaml: 2.3.4 + transitivePeerDependencies: + - supports-color + + listr2@8.0.1: + 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 + + load-json-file@4.0.0: + dependencies: + graceful-fs: 4.2.11 + parse-json: 4.0.0 + pify: 3.0.0 + strip-bom: 3.0.0 + + loader-utils@1.4.2: + dependencies: + big.js: 5.2.2 + emojis-list: 3.0.0 + json5: 1.0.2 + + local-pkg@0.5.1: + dependencies: + mlly: 1.7.3 + pkg-types: 1.3.0 + + 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.17.21: {} + + lodash.camelcase@4.3.0: {} + + lodash.get@4.4.2: {} + + lodash.isfunction@3.0.9: {} + + lodash.isplainobject@4.0.6: {} + + lodash.kebabcase@4.1.1: {} + + lodash.map@4.6.0: {} + + lodash.memoize@4.1.2: {} + + lodash.merge@4.6.2: {} + + lodash.mergewith@4.6.2: {} + + lodash.snakecase@4.1.1: {} + + lodash.startcase@4.4.0: {} + + lodash.truncate@4.4.2: {} + + lodash.uniq@4.5.0: {} + + lodash.upperfirst@4.3.1: {} + + lodash@4.17.21: {} + + log-symbols@4.1.0: + dependencies: + chalk: 4.1.2 + is-unicode-supported: 0.1.0 + + log-update@6.1.0: + dependencies: + ansi-escapes: 7.0.0 + cli-cursor: 5.0.0 + slice-ansi: 7.1.0 + strip-ansi: 7.1.0 + wrap-ansi: 9.0.0 + + longest@2.0.1: {} + + loose-envify@1.4.0: + dependencies: + js-tokens: 4.0.0 + + lower-case@2.0.2: + dependencies: + tslib: 2.8.1 + + lru-cache@10.4.3: {} + + lru-cache@5.1.1: + dependencies: + yallist: 3.1.1 + + lru-cache@6.0.0: + dependencies: + yallist: 4.0.0 + + luxon@3.5.0: {} + + magic-string@0.30.17: + dependencies: + '@jridgewell/sourcemap-codec': 1.5.0 + + make-dir@2.1.0: + dependencies: + pify: 4.0.1 + semver: 5.7.2 + optional: true + + make-dir@4.0.0: + dependencies: + semver: 7.6.3 + + make-error@1.3.6: {} + + makeerror@1.0.12: + dependencies: + tmpl: 1.0.5 + + map-cache@0.2.2: {} + + map-obj@1.0.1: {} + + map-obj@4.3.0: {} + + map-visit@1.0.0: + dependencies: + object-visit: 1.0.1 + + markdown-it-link-attributes@4.0.1: {} + + markdown-it@14.1.0: + dependencies: + argparse: 2.0.1 + entities: 4.5.0 + linkify-it: 5.0.0 + mdurl: 2.0.0 + punycode.js: 2.3.1 + uc.micro: 2.1.0 + + math-intrinsics@1.1.0: {} + + mathml-tag-names@2.1.3: {} + + md5@2.3.0: + dependencies: + charenc: 0.0.2 + crypt: 0.0.2 + is-buffer: 1.1.6 + + mdn-data@2.0.14: {} + + mdn-data@2.0.30: {} + + mdn-data@2.12.2: {} + + mdurl@2.0.0: {} + + medium-editor@5.23.3: {} + + memorystream@0.3.1: {} + + meow@12.1.1: {} + + meow@13.2.0: {} + + meow@8.1.2: + dependencies: + '@types/minimist': 1.2.5 + camelcase-keys: 6.2.2 + decamelize-keys: 1.1.1 + hard-rejection: 2.1.0 + minimist-options: 4.1.0 + normalize-package-data: 3.0.3 + read-pkg-up: 7.0.1 + redent: 3.0.0 + trim-newlines: 3.0.1 + type-fest: 0.18.1 + yargs-parser: 20.2.9 + + merge-options@1.0.1: + dependencies: + is-plain-obj: 1.1.0 + + merge-stream@2.0.0: {} + + merge2@1.4.1: {} + + merge@2.1.1: {} + + micromatch@3.1.0: + dependencies: + arr-diff: 4.0.0 + array-unique: 0.3.2 + braces: 2.3.2 + define-property: 1.0.0 + extend-shallow: 2.0.1 + extglob: 2.0.4 + fragment-cache: 0.2.1 + kind-of: 5.1.0 + nanomatch: 1.2.13 + object.pick: 1.3.0 + regex-not: 1.0.2 + snapdragon: 0.8.2 + to-regex: 3.0.2 + transitivePeerDependencies: + - supports-color + + micromatch@4.0.5: + dependencies: + braces: 3.0.3 + picomatch: 2.3.1 + + micromatch@4.0.8: + dependencies: + braces: 3.0.3 + picomatch: 2.3.1 + + mime-db@1.52.0: {} + + mime-types@2.1.35: + dependencies: + mime-db: 1.52.0 + + mime@1.6.0: {} + + mimic-fn@2.1.0: {} + + mimic-fn@4.0.0: {} + + mimic-function@5.0.1: {} + + min-indent@1.0.1: {} + + minimatch@3.1.2: + dependencies: + brace-expansion: 1.1.11 + + minimatch@5.1.6: + dependencies: + brace-expansion: 2.0.1 + + minimatch@9.0.1: + dependencies: + brace-expansion: 2.0.1 + + minimatch@9.0.3: + dependencies: + brace-expansion: 2.0.1 + + minimatch@9.0.5: + dependencies: + brace-expansion: 2.0.1 + + minimist-options@4.1.0: + dependencies: + arrify: 1.0.1 + is-plain-obj: 1.1.0 + kind-of: 6.0.3 + + minimist@1.2.7: {} + + minimist@1.2.8: {} + + minipass@7.1.2: {} + + mixin-deep@1.3.2: + dependencies: + for-in: 1.0.2 + is-extendable: 1.0.1 + + mkdirp@0.5.6: + dependencies: + minimist: 1.2.8 + + mlly@1.7.3: + dependencies: + acorn: 8.14.0 + pathe: 1.1.2 + pkg-types: 1.3.0 + ufo: 1.5.4 + + mobx-preact@3.0.0(mobx@5.15.7)(preact@10.26.9): + dependencies: + hoist-non-react-statics: 2.5.5 + mobx: 5.15.7 + preact: 10.26.9 + + mobx-utils@5.6.2(mobx@5.15.7): + dependencies: + mobx: 5.15.7 + + mobx@5.15.7: {} + + mockjs@1.1.0: + dependencies: + commander: 13.0.0 + + mousetrap@1.6.5: {} + + mri@1.2.0: {} + + mrmime@2.0.0: {} + + ms@2.0.0: {} + + ms@2.1.2: {} + + ms@2.1.3: {} + + muggle-string@0.3.1: {} + + mute-stream@0.0.8: {} + + mute-stream@1.0.0: {} + + nanoid@3.3.8: {} + + nanomatch@1.2.13: + dependencies: + arr-diff: 4.0.0 + array-unique: 0.3.2 + define-property: 2.0.2 + extend-shallow: 3.0.2 + fragment-cache: 0.2.1 + is-windows: 1.0.2 + kind-of: 6.0.3 + object.pick: 1.3.0 + regex-not: 1.0.2 + snapdragon: 0.8.2 + to-regex: 3.0.2 + transitivePeerDependencies: + - supports-color + + nanopop@2.4.2: {} + + natural-compare@1.4.0: {} + + needle@3.3.1: + dependencies: + iconv-lite: 0.6.3 + sax: 1.4.1 + optional: true + + neo-async@2.6.2: {} + + nice-try@1.0.5: {} + + no-case@3.0.4: + dependencies: + lower-case: 2.0.2 + tslib: 2.8.1 + + node-fetch-native@1.6.4: {} + + node-fetch@2.7.0: + dependencies: + whatwg-url: 5.0.0 + + node-html-parser@5.4.2: + dependencies: + css-select: 4.3.0 + he: 1.2.0 + + node-int64@0.4.0: {} + + node-releases@2.0.19: {} + + nopt@7.2.1: + dependencies: + abbrev: 2.0.0 + + normalize-package-data@2.5.0: + dependencies: + hosted-git-info: 2.8.9 + resolve: 1.22.10 + semver: 5.7.2 + validate-npm-package-license: 3.0.4 + + normalize-package-data@3.0.3: + dependencies: + hosted-git-info: 4.1.0 + is-core-module: 2.16.1 + semver: 7.6.3 + validate-npm-package-license: 3.0.4 + + normalize-package-data@6.0.2: + dependencies: + hosted-git-info: 7.0.2 + semver: 7.6.3 + validate-npm-package-license: 3.0.4 + + normalize-path@3.0.0: {} + + normalize-range@0.1.2: {} + + npm-run-all@4.1.5: + dependencies: + ansi-styles: 3.2.1 + chalk: 2.4.2 + cross-spawn: 6.0.6 + memorystream: 0.3.1 + minimatch: 3.1.2 + pidtree: 0.3.1 + read-pkg: 3.0.0 + shell-quote: 1.8.2 + string.prototype.padend: 3.1.6 + + npm-run-path@4.0.1: + dependencies: + path-key: 3.1.1 + + npm-run-path@5.3.0: + dependencies: + path-key: 4.0.0 + + nprogress@0.2.0: {} + + nth-check@2.1.1: + dependencies: + boolbase: 1.0.0 + + object-assign@4.1.1: {} + + object-copy@0.1.0: + dependencies: + copy-descriptor: 0.1.1 + define-property: 0.2.5 + kind-of: 3.2.2 + + object-inspect@1.13.3: {} + + object-keys@1.1.1: {} + + object-visit@1.0.1: + dependencies: + isobject: 3.0.1 + + object.assign@4.1.7: + dependencies: + call-bind: 1.0.8 + call-bound: 1.0.3 + define-properties: 1.2.1 + es-object-atoms: 1.0.0 + has-symbols: 1.1.0 + object-keys: 1.1.1 + + object.pick@1.3.0: + dependencies: + isobject: 3.0.1 + + ofetch@1.4.1: + dependencies: + destr: 2.0.3 + node-fetch-native: 1.6.4 + ufo: 1.5.4 + + on-finished@2.3.0: + dependencies: + ee-first: 1.1.1 + + once@1.4.0: + dependencies: + wrappy: 1.0.2 + + onetime@5.1.2: + dependencies: + mimic-fn: 2.1.0 + + onetime@6.0.0: + dependencies: + mimic-fn: 4.0.0 + + onetime@7.0.0: + dependencies: + mimic-function: 5.0.1 + + open@8.4.2: + dependencies: + define-lazy-prop: 2.0.0 + is-docker: 2.2.1 + is-wsl: 2.2.0 + + opener@1.5.2: {} + + 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 + + ora@5.4.1: + dependencies: + bl: 4.1.0 + chalk: 4.1.2 + cli-cursor: 3.1.0 + cli-spinners: 2.9.2 + is-interactive: 1.0.0 + is-unicode-supported: 0.1.0 + log-symbols: 4.1.0 + strip-ansi: 6.0.1 + wcwidth: 1.0.1 + + os-tmpdir@1.0.2: {} + + own-keys@1.0.1: + dependencies: + get-intrinsic: 1.2.7 + object-keys: 1.1.1 + safe-push-apply: 1.0.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-try@2.2.0: {} + + package-json-from-dist@1.0.1: {} + + package-manager-detector@0.2.8: {} + + param-case@3.0.4: + dependencies: + dot-case: 3.0.4 + tslib: 2.8.1 + + parent-module@1.0.1: + dependencies: + callsites: 3.1.0 + + parse-json@4.0.0: + dependencies: + error-ex: 1.3.2 + json-parse-better-errors: 1.0.2 + + parse-json@5.2.0: + dependencies: + '@babel/code-frame': 7.26.2 + error-ex: 1.3.2 + json-parse-even-better-errors: 2.3.1 + lines-and-columns: 1.2.4 + + parse-json@7.1.1: + dependencies: + '@babel/code-frame': 7.26.2 + error-ex: 1.3.2 + json-parse-even-better-errors: 3.0.2 + lines-and-columns: 2.0.4 + type-fest: 3.13.1 + + parse-node-version@1.0.1: {} + + parse-passwd@1.0.0: {} + + parse5-htmlparser2-tree-adapter@7.1.0: + dependencies: + domhandler: 5.0.3 + parse5: 7.2.1 + + parse5-parser-stream@7.1.2: + dependencies: + parse5: 7.2.1 + + parse5@7.2.1: + dependencies: + entities: 4.5.0 + + parseurl@1.3.3: {} + + pascal-case@3.1.2: + dependencies: + no-case: 3.0.4 + tslib: 2.8.1 + + pascalcase@0.1.1: {} + + path-browserify@1.0.1: {} + + path-exists@4.0.0: {} + + path-exists@5.0.0: {} + + path-is-absolute@1.0.1: {} + + path-key@2.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-to-regexp@6.3.0: {} + + path-type@3.0.0: + dependencies: + pify: 3.0.0 + + path-type@4.0.0: {} + + pathe@0.2.0: {} + + pathe@1.1.2: {} + + perfect-debounce@1.0.0: {} + + picocolors@1.1.1: {} + + picomatch@2.3.1: {} + + picomatch@3.0.1: {} + + picomatch@4.0.2: {} + + pidtree@0.3.1: {} + + pidtree@0.6.0: {} + + pify@3.0.0: {} + + pify@4.0.1: + optional: true + + pinia@2.1.7(typescript@4.9.5)(vue@3.5.13(typescript@4.9.5)): + dependencies: + '@vue/devtools-api': 6.6.4 + vue: 3.5.13(typescript@4.9.5) + vue-demi: 0.14.10(vue@3.5.13(typescript@4.9.5)) + optionalDependencies: + typescript: 4.9.5 + + pirates@4.0.6: {} + + pkg-dir@4.2.0: + dependencies: + find-up: 4.1.0 + + pkg-types@1.3.0: + dependencies: + confbox: 0.1.8 + mlly: 1.7.3 + pathe: 1.1.2 + + pngjs@5.0.0: {} + + portfinder@1.0.32: + dependencies: + async: 2.6.4 + debug: 3.2.7 + mkdirp: 0.5.6 + transitivePeerDependencies: + - supports-color + + posix-character-classes@0.1.1: {} + + possible-typed-array-names@1.0.0: {} + + postcss-html@1.7.0: + dependencies: + htmlparser2: 8.0.2 + js-tokens: 9.0.1 + postcss: 8.4.49 + postcss-safe-parser: 6.0.0(postcss@8.4.49) + + postcss-less@6.0.0(postcss@8.4.49): + dependencies: + postcss: 8.4.49 + + postcss-prefix-selector@1.16.1(postcss@5.2.18): + dependencies: + postcss: 5.2.18 + + postcss-resolve-nested-selector@0.1.6: {} + + postcss-safe-parser@6.0.0(postcss@8.4.49): + dependencies: + postcss: 8.4.49 + + postcss-safe-parser@7.0.1(postcss@8.4.49): + dependencies: + postcss: 8.4.49 + + postcss-selector-parser@6.1.2: + dependencies: + cssesc: 3.0.0 + util-deprecate: 1.0.2 + + postcss-selector-parser@7.0.0: + dependencies: + cssesc: 3.0.0 + util-deprecate: 1.0.2 + + postcss-sorting@8.0.2(postcss@8.4.49): + dependencies: + postcss: 8.4.49 + + postcss-value-parser@4.2.0: {} + + postcss@5.2.18: + dependencies: + chalk: 1.1.3 + js-base64: 2.6.4 + source-map: 0.5.7 + supports-color: 3.2.3 + + postcss@8.4.49: + dependencies: + nanoid: 3.3.8 + picocolors: 1.1.1 + source-map-js: 1.2.1 + + posthtml-parser@0.2.1: + dependencies: + htmlparser2: 3.10.1 + isobject: 2.1.0 + + posthtml-rename-id@1.0.12: + dependencies: + escape-string-regexp: 1.0.5 + + posthtml-render@1.4.0: {} + + posthtml-svg-mode@1.0.3: + dependencies: + merge-options: 1.0.1 + posthtml: 0.9.2 + posthtml-parser: 0.2.1 + posthtml-render: 1.4.0 + + posthtml@0.9.2: + dependencies: + posthtml-parser: 0.2.1 + posthtml-render: 1.4.0 + + preact@10.26.9: {} + + prelude-ls@1.2.1: {} + + prettier-linter-helpers@1.0.0: + dependencies: + fast-diff: 1.3.0 + + prettier@3.4.2: {} + + pretty-format@29.7.0: + dependencies: + '@jest/schemas': 29.6.3 + ansi-styles: 5.2.0 + react-is: 18.3.1 + + pretty-quick@4.0.0(prettier@3.4.2): + dependencies: + execa: 5.1.1 + find-up: 5.0.0 + ignore: 5.3.2 + mri: 1.2.0 + picocolors: 1.1.1 + picomatch: 3.0.1 + prettier: 3.4.2 + tslib: 2.8.1 + + print-js@1.6.0: {} + + promise-polyfill@7.1.2: {} + + prompts@2.4.2: + dependencies: + kleur: 3.0.3 + sisteransi: 1.0.5 + + proto-list@1.2.4: {} + + proxy-from-env@1.1.0: {} + + prr@1.0.1: + optional: true + + punycode.js@2.3.1: {} + + punycode@2.3.1: {} + + pure-rand@6.1.0: {} + + qrcode@1.5.4: + dependencies: + dijkstrajs: 1.0.3 + pngjs: 5.0.0 + yargs: 15.4.1 + + qs@6.13.1: + dependencies: + side-channel: 1.1.0 + + query-string@4.3.4: + dependencies: + object-assign: 4.1.1 + strict-uri-encode: 1.1.0 + + queue-microtask@1.2.3: {} + + quick-lru@4.0.1: {} + + rangy@1.3.2: {} + + react-is@18.3.1: {} + + read-pkg-up@10.1.0: + dependencies: + find-up: 6.3.0 + read-pkg: 8.1.0 + type-fest: 4.31.0 + + read-pkg-up@7.0.1: + dependencies: + find-up: 4.1.0 + read-pkg: 5.2.0 + type-fest: 0.8.1 + + read-pkg@3.0.0: + dependencies: + load-json-file: 4.0.0 + normalize-package-data: 2.5.0 + path-type: 3.0.0 + + read-pkg@5.2.0: + dependencies: + '@types/normalize-package-data': 2.4.4 + normalize-package-data: 2.5.0 + parse-json: 5.2.0 + type-fest: 0.6.0 + + read-pkg@8.1.0: + dependencies: + '@types/normalize-package-data': 2.4.4 + normalize-package-data: 6.0.2 + parse-json: 7.1.1 + type-fest: 4.31.0 + + readable-stream@3.6.2: + dependencies: + inherits: 2.0.4 + string_decoder: 1.3.0 + util-deprecate: 1.0.2 + + readdirp@3.6.0: + dependencies: + picomatch: 2.3.1 + + redent@3.0.0: + dependencies: + indent-string: 4.0.0 + strip-indent: 3.0.0 + + reflect.getprototypeof@1.0.10: + dependencies: + call-bind: 1.0.8 + define-properties: 1.2.1 + es-abstract: 1.23.9 + es-errors: 1.3.0 + es-object-atoms: 1.0.0 + get-intrinsic: 1.2.7 + get-proto: 1.0.1 + which-builtin-type: 1.2.1 + + regenerator-runtime@0.11.1: {} + + regenerator-runtime@0.14.1: {} + + regex-not@1.0.2: + dependencies: + extend-shallow: 3.0.2 + safe-regex: 1.1.0 + + regexp.prototype.flags@1.5.4: + dependencies: + call-bind: 1.0.8 + define-properties: 1.2.1 + es-errors: 1.3.0 + get-proto: 1.0.1 + gopd: 1.2.0 + set-function-name: 2.0.2 + + relateurl@0.2.7: {} + + repeat-element@1.1.4: {} + + repeat-string@1.6.1: {} + + require-directory@2.1.1: {} + + require-from-string@2.0.2: {} + + require-main-filename@2.0.0: {} + + requires-port@1.0.0: {} + + resize-observer-polyfill@1.5.1: {} + + resolve-cwd@3.0.0: + dependencies: + resolve-from: 5.0.0 + + resolve-dir@1.0.1: + dependencies: + expand-tilde: 2.0.2 + global-modules: 1.0.0 + + resolve-from@4.0.0: {} + + resolve-from@5.0.0: {} + + resolve-global@1.0.0: + dependencies: + global-dirs: 0.1.1 + + resolve-pkg-maps@1.0.0: {} + + resolve-url@0.2.1: {} + + resolve.exports@2.0.3: {} + + resolve@1.22.10: + dependencies: + is-core-module: 2.16.1 + path-parse: 1.0.7 + supports-preserve-symlinks-flag: 1.0.0 + + restore-cursor@3.1.0: + dependencies: + onetime: 5.1.2 + signal-exit: 3.0.7 + + restore-cursor@5.1.0: + dependencies: + onetime: 7.0.0 + signal-exit: 4.1.0 + + ret@0.1.15: {} + + reusify@1.0.4: {} + + rfdc@1.4.1: {} + + rimraf@3.0.2: + dependencies: + glob: 7.2.3 + + rimraf@5.0.10: + dependencies: + glob: 10.4.5 + + rollup-plugin-purge-icons@0.10.0: + dependencies: + '@purge-icons/core': 0.10.0 + '@purge-icons/generated': 0.10.0 + transitivePeerDependencies: + - encoding + - supports-color + + rollup-plugin-visualizer@5.13.1(rollup@4.30.0): + dependencies: + open: 8.4.2 + picomatch: 4.0.2 + source-map: 0.7.4 + yargs: 17.7.2 + optionalDependencies: + rollup: 4.30.0 + + rollup@4.30.0: + dependencies: + '@types/estree': 1.0.6 + optionalDependencies: + '@rollup/rollup-android-arm-eabi': 4.30.0 + '@rollup/rollup-android-arm64': 4.30.0 + '@rollup/rollup-darwin-arm64': 4.30.0 + '@rollup/rollup-darwin-x64': 4.30.0 + '@rollup/rollup-freebsd-arm64': 4.30.0 + '@rollup/rollup-freebsd-x64': 4.30.0 + '@rollup/rollup-linux-arm-gnueabihf': 4.30.0 + '@rollup/rollup-linux-arm-musleabihf': 4.30.0 + '@rollup/rollup-linux-arm64-gnu': 4.30.0 + '@rollup/rollup-linux-arm64-musl': 4.30.0 + '@rollup/rollup-linux-loongarch64-gnu': 4.30.0 + '@rollup/rollup-linux-powerpc64le-gnu': 4.30.0 + '@rollup/rollup-linux-riscv64-gnu': 4.30.0 + '@rollup/rollup-linux-s390x-gnu': 4.30.0 + '@rollup/rollup-linux-x64-gnu': 4.30.0 + '@rollup/rollup-linux-x64-musl': 4.30.0 + '@rollup/rollup-win32-arm64-msvc': 4.30.0 + '@rollup/rollup-win32-ia32-msvc': 4.30.0 + '@rollup/rollup-win32-x64-msvc': 4.30.0 + fsevents: 2.3.3 + + run-async@2.4.1: {} + + run-async@3.0.0: {} + + run-parallel@1.2.0: + dependencies: + queue-microtask: 1.2.3 + + rxjs@7.8.1: + dependencies: + tslib: 2.8.1 + + safe-array-concat@1.1.3: + dependencies: + call-bind: 1.0.8 + call-bound: 1.0.3 + get-intrinsic: 1.2.7 + has-symbols: 1.1.0 + isarray: 2.0.5 + + safe-buffer@5.1.2: {} + + safe-buffer@5.2.1: {} + + safe-push-apply@1.0.0: + dependencies: + es-errors: 1.3.0 + isarray: 2.0.5 + + safe-regex-test@1.1.0: + dependencies: + call-bound: 1.0.3 + es-errors: 1.3.0 + is-regex: 1.2.1 + + safe-regex@1.1.0: + dependencies: + ret: 0.1.15 + + safer-buffer@2.1.2: {} + + sax@1.4.1: + optional: true + + scroll-into-view-if-needed@2.2.31: + dependencies: + compute-scroll-into-view: 1.0.20 + + secure-compare@3.0.1: {} + + select@1.1.2: {} + + semver@5.7.2: {} + + semver@6.3.1: {} + + semver@7.6.0: + dependencies: + lru-cache: 6.0.0 + + semver@7.6.3: {} + + set-blocking@2.0.0: {} + + set-function-length@1.2.2: + dependencies: + define-data-property: 1.1.4 + es-errors: 1.3.0 + function-bind: 1.1.2 + get-intrinsic: 1.2.7 + gopd: 1.2.0 + has-property-descriptors: 1.0.2 + + set-function-name@2.0.2: + dependencies: + define-data-property: 1.1.4 + es-errors: 1.3.0 + functions-have-names: 1.2.3 + has-property-descriptors: 1.0.2 + + set-proto@1.0.0: + dependencies: + dunder-proto: 1.0.1 + es-errors: 1.3.0 + es-object-atoms: 1.0.0 + + set-value@2.0.1: + dependencies: + extend-shallow: 2.0.1 + is-extendable: 0.1.1 + is-plain-object: 2.0.4 + split-string: 3.1.0 + + shallow-equal@1.2.1: {} + + shebang-command@1.2.0: + dependencies: + shebang-regex: 1.0.0 + + shebang-command@2.0.0: + dependencies: + shebang-regex: 3.0.0 + + shebang-regex@1.0.0: {} + + shebang-regex@3.0.0: {} + + shell-quote@1.8.2: {} + + showdown@2.1.0: + dependencies: + commander: 9.5.0 + + side-channel-list@1.0.0: + dependencies: + es-errors: 1.3.0 + object-inspect: 1.13.3 + + side-channel-map@1.0.1: + dependencies: + call-bound: 1.0.3 + es-errors: 1.3.0 + get-intrinsic: 1.2.7 + object-inspect: 1.13.3 + + side-channel-weakmap@1.0.2: + dependencies: + call-bound: 1.0.3 + es-errors: 1.3.0 + get-intrinsic: 1.2.7 + object-inspect: 1.13.3 + side-channel-map: 1.0.1 + + side-channel@1.1.0: + dependencies: + es-errors: 1.3.0 + object-inspect: 1.13.3 + side-channel-list: 1.0.0 + side-channel-map: 1.0.1 + side-channel-weakmap: 1.0.2 + + signal-exit@3.0.7: {} + + signal-exit@4.1.0: {} + + sirv@2.0.4: + dependencies: + '@polka/url': 1.0.0-next.28 + mrmime: 2.0.0 + totalist: 3.0.1 + + sisteransi@1.0.5: {} + + slash@3.0.0: {} + + 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 + + snapdragon-node@2.1.1: + dependencies: + define-property: 1.0.0 + isobject: 3.0.1 + snapdragon-util: 3.0.1 + + snapdragon-util@3.0.1: + dependencies: + kind-of: 3.2.2 + + snapdragon@0.8.2: + dependencies: + base: 0.11.2 + debug: 2.6.9 + define-property: 0.2.5 + extend-shallow: 2.0.1 + map-cache: 0.2.2 + source-map: 0.5.7 + source-map-resolve: 0.5.3 + use: 3.1.1 + transitivePeerDependencies: + - supports-color + + sortablejs@1.14.0: {} + + sortablejs@1.15.6: {} + + source-map-js@1.2.1: {} + + source-map-resolve@0.5.3: + dependencies: + atob: 2.1.2 + decode-uri-component: 0.2.2 + resolve-url: 0.2.1 + source-map-url: 0.4.1 + urix: 0.1.0 + + source-map-support@0.5.13: + dependencies: + buffer-from: 1.1.2 + source-map: 0.6.1 + + source-map-support@0.5.21: + dependencies: + buffer-from: 1.1.2 + source-map: 0.6.1 + + source-map-url@0.4.1: {} + + source-map@0.5.7: {} + + source-map@0.6.1: {} + + source-map@0.7.4: {} + + spdx-correct@3.2.0: + dependencies: + spdx-expression-parse: 3.0.1 + spdx-license-ids: 3.0.20 + + spdx-exceptions@2.5.0: {} + + spdx-expression-parse@3.0.1: + dependencies: + spdx-exceptions: 2.5.0 + spdx-license-ids: 3.0.20 + + spdx-license-ids@3.0.20: {} + + split-string@3.1.0: + dependencies: + extend-shallow: 3.0.2 + + split2@3.2.2: + dependencies: + readable-stream: 3.6.2 + + split2@4.2.0: {} + + sprintf-js@1.0.3: {} + + stable@0.1.8: {} + + stack-utils@2.0.6: + dependencies: + escape-string-regexp: 2.0.0 + + static-extend@0.1.2: + dependencies: + define-property: 0.2.5 + object-copy: 0.1.0 + + statuses@1.5.0: {} + + strict-uri-encode@1.1.0: {} + + string-argv@0.3.2: {} + + string-length@4.0.2: + dependencies: + char-regex: 1.0.2 + strip-ansi: 6.0.1 + + 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.1.0 + + string-width@7.2.0: + dependencies: + emoji-regex: 10.4.0 + get-east-asian-width: 1.3.0 + strip-ansi: 7.1.0 + + string.prototype.padend@3.1.6: + dependencies: + call-bind: 1.0.8 + define-properties: 1.2.1 + es-abstract: 1.23.9 + es-object-atoms: 1.0.0 + + string.prototype.trim@1.2.10: + dependencies: + call-bind: 1.0.8 + call-bound: 1.0.3 + define-data-property: 1.1.4 + define-properties: 1.2.1 + es-abstract: 1.23.9 + es-object-atoms: 1.0.0 + has-property-descriptors: 1.0.2 + + string.prototype.trimend@1.0.9: + dependencies: + call-bind: 1.0.8 + call-bound: 1.0.3 + define-properties: 1.2.1 + es-object-atoms: 1.0.0 + + string.prototype.trimstart@1.0.8: + dependencies: + call-bind: 1.0.8 + define-properties: 1.2.1 + es-object-atoms: 1.0.0 + + string_decoder@1.3.0: + dependencies: + safe-buffer: 5.2.1 + + 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.1.0: + dependencies: + ansi-regex: 6.1.0 + + strip-bom@3.0.0: {} + + strip-bom@4.0.0: {} + + strip-final-newline@2.0.0: {} + + strip-final-newline@3.0.0: {} + + strip-indent@3.0.0: + dependencies: + min-indent: 1.0.1 + + strip-json-comments@3.1.1: {} + + stylelint-config-html@1.1.0(postcss-html@1.7.0)(stylelint@16.12.0(typescript@4.9.5)): + dependencies: + postcss-html: 1.7.0 + stylelint: 16.12.0(typescript@4.9.5) + + stylelint-config-prettier@9.0.5(stylelint@16.12.0(typescript@4.9.5)): + dependencies: + stylelint: 16.12.0(typescript@4.9.5) + + stylelint-config-recommended-vue@1.5.0(postcss-html@1.7.0)(stylelint@16.12.0(typescript@4.9.5)): + dependencies: + postcss-html: 1.7.0 + semver: 7.6.3 + stylelint: 16.12.0(typescript@4.9.5) + stylelint-config-html: 1.1.0(postcss-html@1.7.0)(stylelint@16.12.0(typescript@4.9.5)) + stylelint-config-recommended: 14.0.1(stylelint@16.12.0(typescript@4.9.5)) + + stylelint-config-recommended@14.0.1(stylelint@16.12.0(typescript@4.9.5)): + dependencies: + stylelint: 16.12.0(typescript@4.9.5) + + stylelint-config-standard@36.0.1(stylelint@16.12.0(typescript@4.9.5)): + dependencies: + stylelint: 16.12.0(typescript@4.9.5) + stylelint-config-recommended: 14.0.1(stylelint@16.12.0(typescript@4.9.5)) + + stylelint-order@6.0.4(stylelint@16.12.0(typescript@4.9.5)): + dependencies: + postcss: 8.4.49 + postcss-sorting: 8.0.2(postcss@8.4.49) + stylelint: 16.12.0(typescript@4.9.5) + + stylelint@16.12.0(typescript@4.9.5): + dependencies: + '@csstools/css-parser-algorithms': 3.0.4(@csstools/css-tokenizer@3.0.3) + '@csstools/css-tokenizer': 3.0.3 + '@csstools/media-query-list-parser': 4.0.2(@csstools/css-parser-algorithms@3.0.4(@csstools/css-tokenizer@3.0.3))(@csstools/css-tokenizer@3.0.3) + '@csstools/selector-specificity': 5.0.0(postcss-selector-parser@7.0.0) + '@dual-bundle/import-meta-resolve': 4.1.0 + balanced-match: 2.0.0 + colord: 2.9.3 + cosmiconfig: 9.0.0(typescript@4.9.5) + css-functions-list: 3.2.3 + css-tree: 3.1.0 + debug: 4.4.0 + fast-glob: 3.3.3 + fastest-levenshtein: 1.0.16 + file-entry-cache: 9.1.0 + global-modules: 2.0.0 + globby: 11.1.0 + globjoin: 0.1.4 + html-tags: 3.3.1 + ignore: 6.0.2 + imurmurhash: 0.1.4 + is-plain-object: 5.0.0 + known-css-properties: 0.35.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.4.49 + postcss-resolve-nested-selector: 0.1.6 + postcss-safe-parser: 7.0.1(postcss@8.4.49) + postcss-selector-parser: 7.0.0 + postcss-value-parser: 4.2.0 + resolve-from: 5.0.0 + string-width: 4.2.3 + supports-hyperlinks: 3.1.0 + svg-tags: 1.0.0 + table: 6.9.0 + write-file-atomic: 5.0.1 + transitivePeerDependencies: + - supports-color + - typescript + + stylis@4.3.4: {} + + supports-color@2.0.0: {} + + supports-color@3.2.3: + dependencies: + has-flag: 1.0.0 + + supports-color@5.5.0: + dependencies: + has-flag: 3.0.0 + + supports-color@7.2.0: + dependencies: + has-flag: 4.0.0 + + supports-color@8.1.1: + dependencies: + has-flag: 4.0.0 + + supports-hyperlinks@3.1.0: + dependencies: + has-flag: 4.0.0 + supports-color: 7.2.0 + + supports-preserve-symlinks-flag@1.0.0: {} + + svg-baker@1.7.0: + dependencies: + bluebird: 3.7.2 + clone: 2.1.2 + he: 1.2.0 + image-size: 0.5.5 + loader-utils: 1.4.2 + merge-options: 1.0.1 + micromatch: 3.1.0 + postcss: 5.2.18 + postcss-prefix-selector: 1.16.1(postcss@5.2.18) + posthtml-rename-id: 1.0.12 + posthtml-svg-mode: 1.0.3 + query-string: 4.3.4 + traverse: 0.6.10 + transitivePeerDependencies: + - supports-color + + svg-tags@1.0.0: {} + + svgo@2.8.0: + dependencies: + '@trysound/sax': 0.2.0 + commander: 7.2.0 + css-select: 4.3.0 + css-tree: 1.1.3 + csso: 4.2.0 + picocolors: 1.1.1 + stable: 0.1.8 + + swagger-ui-dist@5.24.1: + dependencies: + '@scarf/scarf': 1.4.0 + + synckit@0.9.2: + dependencies: + '@pkgr/core': 0.1.1 + tslib: 2.8.1 + + table@6.9.0: + dependencies: + ajv: 8.17.1 + lodash.truncate: 4.4.2 + slice-ansi: 4.0.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 + + temp-dir@3.0.0: {} + + tempfile@5.0.0: + dependencies: + temp-dir: 3.0.0 + + terser@5.37.0: + dependencies: + '@jridgewell/source-map': 0.3.6 + acorn: 8.14.0 + commander: 2.20.3 + source-map-support: 0.5.21 + + test-exclude@6.0.0: + dependencies: + '@istanbuljs/schema': 0.1.3 + glob: 7.2.3 + minimatch: 3.1.2 + + text-extensions@2.4.0: {} + + text-table@0.2.0: {} + + throttle-debounce@5.0.2: {} + + through2@4.0.2: + dependencies: + readable-stream: 3.6.2 + + through@2.3.8: {} + + tiny-emitter@2.1.0: {} + + tinycolor2@1.6.0: {} + + tinyexec@0.3.2: {} + + tinymce@5.10.9: {} + + tinymce@6.6.2: {} + + tmp@0.0.33: + dependencies: + os-tmpdir: 1.0.2 + + tmpl@1.0.5: {} + + to-object-path@0.3.0: + dependencies: + kind-of: 3.2.2 + + to-regex-range@2.1.1: + dependencies: + is-number: 3.0.0 + repeat-string: 1.6.1 + + to-regex-range@5.0.1: + dependencies: + is-number: 7.0.0 + + to-regex@3.0.2: + dependencies: + define-property: 2.0.2 + extend-shallow: 3.0.2 + regex-not: 1.0.2 + safe-regex: 1.1.0 + + totalist@3.0.1: {} + + tr46@0.0.3: {} + + traverse@0.6.10: + dependencies: + gopd: 1.2.0 + typedarray.prototype.slice: 1.0.5 + which-typed-array: 1.1.18 + + trim-newlines@3.0.1: {} + + ts-api-utils@1.4.3(typescript@4.9.5): + dependencies: + typescript: 4.9.5 + + ts-jest@29.2.5(@babel/core@7.26.0)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.0))(jest@29.7.0(@types/node@20.17.12)(ts-node@10.9.2(@types/node@20.17.12)(typescript@4.9.5)))(typescript@4.9.5): + dependencies: + bs-logger: 0.2.6 + ejs: 3.1.10 + fast-json-stable-stringify: 2.1.0 + jest: 29.7.0(@types/node@20.17.12)(ts-node@10.9.2(@types/node@20.17.12)(typescript@4.9.5)) + jest-util: 29.7.0 + json5: 2.2.3 + lodash.memoize: 4.1.2 + make-error: 1.3.6 + semver: 7.6.3 + typescript: 4.9.5 + yargs-parser: 21.1.1 + optionalDependencies: + '@babel/core': 7.26.0 + '@jest/transform': 29.7.0 + '@jest/types': 29.6.3 + babel-jest: 29.7.0(@babel/core@7.26.0) + + ts-node@10.9.2(@types/node@20.17.12)(typescript@4.9.5): + dependencies: + '@cspotcode/source-map-support': 0.8.1 + '@tsconfig/node10': 1.0.11 + '@tsconfig/node12': 1.0.11 + '@tsconfig/node14': 1.0.3 + '@tsconfig/node16': 1.0.4 + '@types/node': 20.17.12 + acorn: 8.14.0 + acorn-walk: 8.3.4 + arg: 4.1.3 + create-require: 1.1.1 + diff: 4.0.2 + make-error: 1.3.6 + typescript: 4.9.5 + v8-compile-cache-lib: 3.0.1 + yn: 3.1.1 + + tslib@1.14.1: {} + + tslib@2.3.0: {} + + tslib@2.8.1: {} + + tsutils@3.21.0(typescript@4.9.5): + dependencies: + tslib: 1.14.1 + typescript: 4.9.5 + + tsx@4.19.2: + dependencies: + esbuild: 0.23.1 + get-tsconfig: 4.8.1 + optionalDependencies: + fsevents: 2.3.3 + + type-check@0.4.0: + dependencies: + prelude-ls: 1.2.1 + + type-detect@4.0.8: {} + + type-fest@0.18.1: {} + + type-fest@0.20.2: {} + + type-fest@0.21.3: {} + + type-fest@0.6.0: {} + + type-fest@0.8.1: {} + + type-fest@3.13.1: {} + + type-fest@4.31.0: {} + + typed-array-buffer@1.0.3: + dependencies: + call-bound: 1.0.3 + es-errors: 1.3.0 + is-typed-array: 1.1.15 + + typed-array-byte-length@1.0.3: + dependencies: + call-bind: 1.0.8 + for-each: 0.3.3 + gopd: 1.2.0 + has-proto: 1.2.0 + is-typed-array: 1.1.15 + + typed-array-byte-offset@1.0.4: + dependencies: + available-typed-arrays: 1.0.7 + call-bind: 1.0.8 + for-each: 0.3.3 + gopd: 1.2.0 + has-proto: 1.2.0 + is-typed-array: 1.1.15 + reflect.getprototypeof: 1.0.10 + + typed-array-length@1.0.7: + dependencies: + call-bind: 1.0.8 + for-each: 0.3.3 + gopd: 1.2.0 + is-typed-array: 1.1.15 + possible-typed-array-names: 1.0.0 + reflect.getprototypeof: 1.0.10 + + typedarray.prototype.slice@1.0.5: + dependencies: + call-bind: 1.0.8 + define-properties: 1.2.1 + es-abstract: 1.23.9 + es-errors: 1.3.0 + get-proto: 1.0.1 + math-intrinsics: 1.1.0 + typed-array-buffer: 1.0.3 + typed-array-byte-offset: 1.0.4 + + typescript@4.9.5: {} + + uc.micro@2.1.0: {} + + ufo@1.5.4: {} + + uglify-js@3.19.3: + optional: true + + unbox-primitive@1.1.0: + dependencies: + call-bound: 1.0.3 + has-bigints: 1.1.0 + has-symbols: 1.1.0 + which-boxed-primitive: 1.1.1 + + unconfig@0.3.13: + dependencies: + '@antfu/utils': 0.7.10 + defu: 6.1.4 + jiti: 1.21.7 + + undici-types@6.19.8: {} + + undici@6.21.0: {} + + union-value@1.0.1: + dependencies: + arr-union: 3.1.0 + get-value: 2.0.6 + is-extendable: 0.1.1 + set-value: 2.0.1 + + union@0.5.0: + dependencies: + qs: 6.13.1 + + universal-user-agent@6.0.1: {} + + universalify@2.0.1: {} + + unocss@0.58.9(postcss@8.4.49)(rollup@4.30.0)(vite@6.0.7(@types/node@20.17.12)(jiti@2.4.2)(less@4.2.1)(terser@5.37.0)(tsx@4.19.2)): + dependencies: + '@unocss/astro': 0.58.9(rollup@4.30.0)(vite@6.0.7(@types/node@20.17.12)(jiti@2.4.2)(less@4.2.1)(terser@5.37.0)(tsx@4.19.2)) + '@unocss/cli': 0.58.9(rollup@4.30.0) + '@unocss/core': 0.58.9 + '@unocss/extractor-arbitrary-variants': 0.58.9 + '@unocss/postcss': 0.58.9(postcss@8.4.49) + '@unocss/preset-attributify': 0.58.9 + '@unocss/preset-icons': 0.58.9 + '@unocss/preset-mini': 0.58.9 + '@unocss/preset-tagify': 0.58.9 + '@unocss/preset-typography': 0.58.9 + '@unocss/preset-uno': 0.58.9 + '@unocss/preset-web-fonts': 0.58.9 + '@unocss/preset-wind': 0.58.9 + '@unocss/reset': 0.58.9 + '@unocss/transformer-attributify-jsx': 0.58.9 + '@unocss/transformer-attributify-jsx-babel': 0.58.9 + '@unocss/transformer-compile-class': 0.58.9 + '@unocss/transformer-directives': 0.58.9 + '@unocss/transformer-variant-group': 0.58.9 + '@unocss/vite': 0.58.9(rollup@4.30.0)(vite@6.0.7(@types/node@20.17.12)(jiti@2.4.2)(less@4.2.1)(terser@5.37.0)(tsx@4.19.2)) + optionalDependencies: + vite: 6.0.7(@types/node@20.17.12)(jiti@2.4.2)(less@4.2.1)(terser@5.37.0)(tsx@4.19.2) + transitivePeerDependencies: + - postcss + - rollup + - supports-color + + unpipe@1.0.0: {} + + unset-value@1.0.0: + dependencies: + has-value: 0.3.1 + isobject: 3.0.1 + + update-browserslist-db@1.1.1(browserslist@4.24.3): + dependencies: + browserslist: 4.24.3 + escalade: 3.2.0 + picocolors: 1.1.1 + + uri-js@4.4.1: + dependencies: + punycode: 2.3.1 + + urix@0.1.0: {} + + url-join@4.0.1: {} + + use@3.1.1: {} + + util-deprecate@1.0.2: {} + + utils-merge@1.0.1: {} + + uuid@9.0.1: {} + + v8-compile-cache-lib@3.0.1: {} + + v8-to-istanbul@9.3.0: + dependencies: + '@jridgewell/trace-mapping': 0.3.25 + '@types/istanbul-lib-coverage': 2.0.6 + convert-source-map: 2.0.0 + + validate-npm-package-license@3.0.4: + dependencies: + spdx-correct: 3.2.0 + spdx-expression-parse: 3.0.1 + + vanilla-picker@2.12.3: + dependencies: + '@sphinxxxx/color-conversion': 2.2.2 + + vary@1.1.2: {} + + vditor@3.10.8: + dependencies: + diff-match-patch: 1.0.5 + + vite-plugin-compression@0.5.1(vite@6.0.7(@types/node@20.17.12)(jiti@2.4.2)(less@4.2.1)(terser@5.37.0)(tsx@4.19.2)): + dependencies: + chalk: 4.1.2 + debug: 4.4.0 + fs-extra: 10.1.0 + vite: 6.0.7(@types/node@20.17.12)(jiti@2.4.2)(less@4.2.1)(terser@5.37.0)(tsx@4.19.2) + transitivePeerDependencies: + - supports-color + + vite-plugin-html@3.2.2(vite@6.0.7(@types/node@20.17.12)(jiti@2.4.2)(less@4.2.1)(terser@5.37.0)(tsx@4.19.2)): + dependencies: + '@rollup/pluginutils': 4.2.1 + colorette: 2.0.20 + connect-history-api-fallback: 1.6.0 + consola: 2.15.3 + dotenv: 16.4.7 + dotenv-expand: 8.0.3 + ejs: 3.1.10 + fast-glob: 3.3.3 + fs-extra: 10.1.0 + html-minifier-terser: 6.1.0 + node-html-parser: 5.4.2 + pathe: 0.2.0 + vite: 6.0.7(@types/node@20.17.12)(jiti@2.4.2)(less@4.2.1)(terser@5.37.0)(tsx@4.19.2) + + vite-plugin-mkcert@1.17.6(vite@6.0.7(@types/node@20.17.12)(jiti@2.4.2)(less@4.2.1)(terser@5.37.0)(tsx@4.19.2)): + dependencies: + '@octokit/rest': 20.1.1 + axios: 1.8.4(debug@4.4.0) + debug: 4.4.0 + picocolors: 1.1.1 + vite: 6.0.7(@types/node@20.17.12)(jiti@2.4.2)(less@4.2.1)(terser@5.37.0)(tsx@4.19.2) + transitivePeerDependencies: + - supports-color + + vite-plugin-mock@2.9.8(mockjs@1.1.0)(vite@6.0.7(@types/node@20.17.12)(jiti@2.4.2)(less@4.2.1)(terser@5.37.0)(tsx@4.19.2)): + dependencies: + '@types/mockjs': 1.0.10 + chalk: 4.1.2 + chokidar: 3.6.0 + connect: 3.7.0 + debug: 4.4.0 + esbuild: 0.14.54 + fast-glob: 3.3.3 + mockjs: 1.1.0 + path-to-regexp: 6.3.0 + vite: 6.0.7(@types/node@20.17.12)(jiti@2.4.2)(less@4.2.1)(terser@5.37.0)(tsx@4.19.2) + transitivePeerDependencies: + - supports-color + + vite-plugin-optimize-persist@0.1.2(vite-plugin-package-config@0.1.1(vite@6.0.7(@types/node@20.17.12)(jiti@2.4.2)(less@4.2.1)(terser@5.37.0)(tsx@4.19.2)))(vite@6.0.7(@types/node@20.17.12)(jiti@2.4.2)(less@4.2.1)(terser@5.37.0)(tsx@4.19.2)): + dependencies: + debug: 4.4.0 + fs-extra: 10.1.0 + vite: 6.0.7(@types/node@20.17.12)(jiti@2.4.2)(less@4.2.1)(terser@5.37.0)(tsx@4.19.2) + vite-plugin-package-config: 0.1.1(vite@6.0.7(@types/node@20.17.12)(jiti@2.4.2)(less@4.2.1)(terser@5.37.0)(tsx@4.19.2)) + transitivePeerDependencies: + - supports-color + + vite-plugin-package-config@0.1.1(vite@6.0.7(@types/node@20.17.12)(jiti@2.4.2)(less@4.2.1)(terser@5.37.0)(tsx@4.19.2)): + dependencies: + debug: 4.4.0 + vite: 6.0.7(@types/node@20.17.12)(jiti@2.4.2)(less@4.2.1)(terser@5.37.0)(tsx@4.19.2) + transitivePeerDependencies: + - supports-color + + vite-plugin-purge-icons@0.10.0(vite@6.0.7(@types/node@20.17.12)(jiti@2.4.2)(less@4.2.1)(terser@5.37.0)(tsx@4.19.2)): + dependencies: + '@purge-icons/core': 0.10.0 + '@purge-icons/generated': 0.10.0 + rollup-plugin-purge-icons: 0.10.0 + vite: 6.0.7(@types/node@20.17.12)(jiti@2.4.2)(less@4.2.1)(terser@5.37.0)(tsx@4.19.2) + transitivePeerDependencies: + - encoding + - supports-color + + vite-plugin-qiankun@1.0.15(typescript@4.9.5)(vite@6.0.7(@types/node@20.17.12)(jiti@2.4.2)(less@4.2.1)(terser@5.37.0)(tsx@4.19.2)): + dependencies: + cheerio: 1.0.0 + typescript: 4.9.5 + vite: 6.0.7(@types/node@20.17.12)(jiti@2.4.2)(less@4.2.1)(terser@5.37.0)(tsx@4.19.2) + + vite-plugin-svg-icons@2.0.1(vite@6.0.7(@types/node@20.17.12)(jiti@2.4.2)(less@4.2.1)(terser@5.37.0)(tsx@4.19.2)): + dependencies: + '@types/svgo': 2.6.4 + cors: 2.8.5 + debug: 4.4.0 + etag: 1.8.1 + fs-extra: 10.1.0 + pathe: 0.2.0 + svg-baker: 1.7.0 + svgo: 2.8.0 + vite: 6.0.7(@types/node@20.17.12)(jiti@2.4.2)(less@4.2.1)(terser@5.37.0)(tsx@4.19.2) + transitivePeerDependencies: + - supports-color + + vite-plugin-vue-setup-extend-plus@0.1.0: {} + + vite@6.0.7(@types/node@20.17.12)(jiti@2.4.2)(less@4.2.1)(terser@5.37.0)(tsx@4.19.2): + dependencies: + esbuild: 0.24.2 + postcss: 8.4.49 + rollup: 4.30.0 + optionalDependencies: + '@types/node': 20.17.12 + fsevents: 2.3.3 + jiti: 2.4.2 + less: 4.2.1 + terser: 5.37.0 + tsx: 4.19.2 + + vue-component-type-helpers@2.2.0: {} + + vue-cropper@0.6.5: {} + + vue-cropperjs@5.0.0(vue@3.5.13(typescript@4.9.5)): + dependencies: + cropperjs: 1.6.2 + vue: 3.5.13(typescript@4.9.5) + + vue-demi@0.14.10(vue@3.5.13(typescript@4.9.5)): + dependencies: + vue: 3.5.13(typescript@4.9.5) + + vue-eslint-parser@9.4.3(eslint@8.57.1): + dependencies: + debug: 4.4.0 + eslint: 8.57.1 + eslint-scope: 7.2.2 + eslint-visitor-keys: 3.4.3 + espree: 9.6.1 + esquery: 1.6.0 + lodash: 4.17.21 + semver: 7.6.3 + transitivePeerDependencies: + - supports-color + + vue-i18n@9.14.2(vue@3.5.13(typescript@4.9.5)): + dependencies: + '@intlify/core-base': 9.14.2 + '@intlify/shared': 9.14.2 + '@vue/devtools-api': 6.6.4 + vue: 3.5.13(typescript@4.9.5) + + vue-infinite-scroll@2.0.2: {} + + vue-print-nb-jeecg@1.0.12: + dependencies: + babel-plugin-transform-runtime: 6.23.0 + + vue-router@4.5.0(vue@3.5.13(typescript@4.9.5)): + dependencies: + '@vue/devtools-api': 6.6.4 + vue: 3.5.13(typescript@4.9.5) + + vue-template-compiler@2.7.16: + dependencies: + de-indent: 1.0.2 + he: 1.2.0 + + vue-tsc@1.8.27(typescript@4.9.5): + dependencies: + '@volar/typescript': 1.11.1 + '@vue/language-core': 1.8.27(typescript@4.9.5) + semver: 7.6.3 + typescript: 4.9.5 + + vue-types@3.0.2(vue@3.5.13(typescript@4.9.5)): + dependencies: + is-plain-object: 3.0.1 + vue: 3.5.13(typescript@4.9.5) + + vue-types@5.1.3(vue@3.5.13(typescript@4.9.5)): + dependencies: + is-plain-object: 5.0.0 + optionalDependencies: + vue: 3.5.13(typescript@4.9.5) + + vue@3.5.13(typescript@4.9.5): + dependencies: + '@vue/compiler-dom': 3.5.13 + '@vue/compiler-sfc': 3.5.13 + '@vue/runtime-dom': 3.5.13 + '@vue/server-renderer': 3.5.13(vue@3.5.13(typescript@4.9.5)) + '@vue/shared': 3.5.13 + optionalDependencies: + typescript: 4.9.5 + + vuedraggable@4.1.0(vue@3.5.13(typescript@4.9.5)): + dependencies: + sortablejs: 1.14.0 + vue: 3.5.13(typescript@4.9.5) + + vxe-pc-ui@4.6.12(vue@3.5.13(typescript@4.9.5)): + dependencies: + '@vxe-ui/core': 4.1.5(vue@3.5.13(typescript@4.9.5)) + transitivePeerDependencies: + - vue + + vxe-table-plugin-antd@4.0.8(vxe-table@4.13.31(vue@3.5.13(typescript@4.9.5))): + dependencies: + vxe-table: 4.13.31(vue@3.5.13(typescript@4.9.5)) + + vxe-table@4.13.31(vue@3.5.13(typescript@4.9.5)): + dependencies: + vxe-pc-ui: 4.6.12(vue@3.5.13(typescript@4.9.5)) + transitivePeerDependencies: + - vue + + walker@1.0.8: + dependencies: + makeerror: 1.0.12 + + warning@4.0.3: + dependencies: + loose-envify: 1.4.0 + + wcwidth@1.0.1: + dependencies: + defaults: 1.0.4 + + webidl-conversions@3.0.1: {} + + whatwg-encoding@2.0.0: + dependencies: + iconv-lite: 0.6.3 + + whatwg-encoding@3.1.1: + dependencies: + iconv-lite: 0.6.3 + + whatwg-mimetype@4.0.0: {} + + whatwg-url@5.0.0: + dependencies: + tr46: 0.0.3 + webidl-conversions: 3.0.1 + + which-boxed-primitive@1.1.1: + dependencies: + is-bigint: 1.1.0 + is-boolean-object: 1.2.1 + is-number-object: 1.1.1 + is-string: 1.1.1 + is-symbol: 1.1.1 + + which-builtin-type@1.2.1: + dependencies: + call-bound: 1.0.3 + function.prototype.name: 1.1.8 + has-tostringtag: 1.0.2 + is-async-function: 2.1.0 + is-date-object: 1.1.0 + is-finalizationregistry: 1.1.1 + is-generator-function: 1.1.0 + is-regex: 1.2.1 + is-weakref: 1.1.0 + isarray: 2.0.5 + which-boxed-primitive: 1.1.1 + which-collection: 1.0.2 + which-typed-array: 1.1.18 + + which-collection@1.0.2: + dependencies: + is-map: 2.0.3 + is-set: 2.0.3 + is-weakmap: 2.0.2 + is-weakset: 2.0.4 + + which-module@2.0.1: {} + + which-typed-array@1.1.18: + dependencies: + available-typed-arrays: 1.0.7 + call-bind: 1.0.8 + call-bound: 1.0.3 + for-each: 0.3.3 + gopd: 1.2.0 + has-tostringtag: 1.0.2 + + which@1.3.1: + dependencies: + isexe: 2.0.0 + + which@2.0.2: + dependencies: + isexe: 2.0.0 + + word-wrap@1.2.5: {} + + wordwrap@1.0.0: {} + + 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.1.0 + + wrap-ansi@9.0.0: + dependencies: + ansi-styles: 6.2.1 + string-width: 7.2.0 + strip-ansi: 7.1.0 + + wrappy@1.0.2: {} + + write-file-atomic@4.0.2: + dependencies: + imurmurhash: 0.1.4 + signal-exit: 3.0.7 + + write-file-atomic@5.0.1: + dependencies: + imurmurhash: 0.1.4 + signal-exit: 4.1.0 + + xe-utils@3.5.26: {} + + xe-utils@3.7.5: {} + + xml-name-validator@4.0.0: {} + + xss@1.0.15: + dependencies: + commander: 2.20.3 + cssfilter: 0.0.10 + + y18n@4.0.3: {} + + y18n@5.0.8: {} + + yallist@3.1.1: {} + + yallist@4.0.0: {} + + yaml@2.3.4: {} + + yargs-parser@18.1.3: + dependencies: + camelcase: 5.3.1 + decamelize: 1.2.0 + + yargs-parser@20.2.9: {} + + 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 + + yn@3.1.1: {} + + yocto-queue@0.1.0: {} + + yocto-queue@1.1.1: {} + + yoctocolors-cjs@2.1.2: {} + + zrender@5.6.1: + dependencies: + tslib: 2.3.0 diff --git a/postcss.config.js b/postcss.config.js new file mode 100644 index 0000000..a47ef4f --- /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..f16d810 --- /dev/null +++ b/prettier.config.js @@ -0,0 +1,20 @@ +module.exports = { + printWidth: 150, + tabWidth: 2, + useTabs: false, + semi: true, //语句末尾使用分号 + vueIndentScriptAndStyle: true, + singleQuote: true, // 使用单引号 + quoteProps: 'as-needed', + bracketSpacing: true, + trailingComma: 'es5', + jsxBracketSameLine: false, + jsxSingleQuote: false, + 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..ddd5fb3 Binary files /dev/null and b/public/favicon.ico differ diff --git a/public/logo.png b/public/logo.png new file mode 100644 index 0000000..8072ced Binary files /dev/null and b/public/logo.png differ diff --git a/public/resource/img/logo.png b/public/resource/img/logo.png new file mode 100644 index 0000000..8072ced Binary files /dev/null and b/public/resource/img/logo.png differ diff --git a/public/resource/js/iconfont.js b/public/resource/js/iconfont.js new file mode 100644 index 0000000..8bb5237 --- /dev/null +++ b/public/resource/js/iconfont.js @@ -0,0 +1 @@ +window._iconfont_svg_string_3814468='',function(l){var c=(c=document.getElementsByTagName("script"))[c.length-1],h=c.getAttribute("data-injectcss"),c=c.getAttribute("data-disable-injectsvg");if(!c){var a,o,t,z,i,v=function(c,h){h.parentNode.insertBefore(c,h)};if(h&&!l.__iconfont__svg__cssinject__){l.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(c){console&&console.log(c)}}a=function(){var c,h=document.createElement("div");h.innerHTML=l._iconfont_svg_string_3814468,(h=h.getElementsByTagName("svg")[0])&&(h.setAttribute("aria-hidden","true"),h.style.position="absolute",h.style.width=0,h.style.height=0,h.style.overflow="hidden",h=h,(c=document.body).firstChild?v(h,c.firstChild):c.appendChild(h))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(a,0):(o=function(){document.removeEventListener("DOMContentLoaded",o,!1),a()},document.addEventListener("DOMContentLoaded",o,!1)):document.attachEvent&&(t=a,z=l.document,i=!1,m(),z.onreadystatechange=function(){"complete"==z.readyState&&(z.onreadystatechange=null,s())})}function s(){i||(i=!0,t())}function m(){try{z.documentElement.doScroll("left")}catch(c){return void setTimeout(m,50)}s()}}(window); \ No newline at end of file diff --git a/public/resource/tinymce/langs/en.js b/public/resource/tinymce/langs/en.js new file mode 100644 index 0000000..27337c3 --- /dev/null +++ b/public/resource/tinymce/langs/en.js @@ -0,0 +1,419 @@ +tinymce.addI18n('es', { + Redo: 'Rehacer', + Undo: 'Deshacer', + Cut: 'Cortar', + Copy: 'Copiar', + Paste: 'Pegar', + 'Select all': 'Seleccionar todo', + 'New document': 'Nuevo documento', + Ok: 'Ok', + Cancel: 'Cancelar', + 'Visual aids': 'Ayudas visuales', + Bold: 'Negrita', + Italic: 'Cursiva', + Underline: 'Subrayado', + Strikethrough: 'Tachado', + Superscript: 'Super\u00edndice', + Subscript: 'Sub\u00edndice', + 'Clear formatting': 'Limpiar formato', + 'Align left': 'Alinear a la izquierda', + 'Align center': 'Alinear al centro', + 'Align right': 'Alinear a la derecha', + Justify: 'Justificar', + 'Bullet list': 'Lista de vi\u00f1etas', + 'Numbered list': 'Lista numerada', + 'Decrease indent': 'Disminuir sangr\u00eda', + 'Increase indent': 'Incrementar sangr\u00eda', + Close: 'Cerrar', + Formats: 'Formatos', + "Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X\/C\/V keyboard shortcuts instead.": 'Su navegador no es compatible con el acceso directo al portapapeles. Use las teclas Crtl+X\/C\/V de su teclado.', + Headers: 'Encabezados', + 'Header 1': 'Encabezado 1', + 'Header 2': 'Encabezado 2', + 'Header 3': 'Encabezado 3', + 'Header 4': 'Encabezado 4', + 'Header 5': 'Encabezado 5', + 'Header 6': 'Encabezado 6', + Headings: 'Encabezados', + 'Heading 1': 'Encabezado 1', + 'Heading 2': 'Encabezado 2', + 'Heading 3': 'Encabezado 3', + 'Heading 4': 'Encabezado 4', + 'Heading 5': 'Encabezado 5', + 'Heading 6': 'Encabezado 6', + Preformatted: 'Con formato previo', + Div: 'Div', + Pre: 'Pre', + Code: 'C\u00f3digo', + Paragraph: 'P\u00e1rrafo', + Blockquote: 'Blockquote', + Inline: 'Alineado', + Blocks: 'Bloques', + 'Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.': 'Pegar est\u00e1 ahora en modo de texto plano. El contenido se pegar\u00e1 como texto plano hasta que desactive esta opci\u00f3n.', + Fonts: 'Fuentes', + 'Font Sizes': 'Tama\u00f1os de fuente', + Class: 'Clase', + 'Browse for an image': 'Buscar una imagen', + OR: 'OR', + 'Drop an image here': 'Arrastre una imagen aqu\u00ed', + Upload: 'Cargar', + Block: 'Bloque', + Align: 'Alinear', + Default: 'Por defecto', + Circle: 'C\u00edrculo', + Disc: 'Disco', + Square: 'Cuadrado', + 'Lower Alpha': 'Inferior Alfa', + 'Lower Greek': 'Inferior Griega', + 'Lower Roman': 'Inferior Romana', + 'Upper Alpha': 'Superior Alfa', + 'Upper Roman': 'Superior Romana', + 'Anchor...': 'Anclaje...', + Name: 'Nombre', + Id: 'Id', + 'Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores.': 'Deber\u00eda comenzar por una letra, seguida solo de letras, n\u00fameros, guiones, puntos, dos puntos o guiones bajos.', + 'You have unsaved changes are you sure you want to navigate away?': 'Tiene cambios sin guardar. \u00bfEst\u00e1 seguro de que quiere salir?', + 'Restore last draft': 'Restaurar el \u00faltimo borrador', + 'Special character...': 'Car\u00e1cter especial...', + 'Source code': 'C\u00f3digo fuente', + 'Insert\/Edit code sample': 'Insertar\/editar c\u00f3digo de prueba', + Language: 'Idioma', + 'Code sample...': 'Ejemplo de c\u00f3digo...', + 'Color Picker': 'Selector de colores', + R: 'R', + G: 'V', + B: 'A', + 'Left to right': 'De izquierda a derecha', + 'Right to left': 'De derecha a izquierda', + 'Emoticons...': 'Emoticones...', + 'Metadata and Document Properties': 'Metadatos y propiedades del documento', + Title: 'T\u00edtulo', + Keywords: 'Palabras clave', + Description: 'Descripci\u00f3n', + Robots: 'Robots', + Author: 'Autor', + Encoding: 'Codificaci\u00f3n', + Fullscreen: 'Pantalla completa', + Action: 'Acci\u00f3n', + Shortcut: 'Atajo', + Help: 'Ayuda', + Address: 'Direcci\u00f3n', + 'Focus to menubar': 'Enfocar la barra del men\u00fa', + 'Focus to toolbar': 'Enfocar la barra de herramientas', + 'Focus to element path': 'Enfocar la ruta del elemento', + 'Focus to contextual toolbar': 'Enfocar la barra de herramientas contextual', + 'Insert link (if link plugin activated)': 'Insertar enlace (si el complemento de enlace est\u00e1 activado)', + 'Save (if save plugin activated)': 'Guardar (si el componente de salvar est\u00e1 activado)', + 'Find (if searchreplace plugin activated)': 'Buscar (si el complemento buscar-remplazar est\u00e1 activado)', + 'Plugins installed ({0}):': 'Plugins instalados ({0}):', + 'Premium plugins:': 'Complementos premium:', + 'Learn more...': 'Aprende m\u00e1s...', + 'You are using {0}': 'Estas usando {0}', + Plugins: 'Complementos', + 'Handy Shortcuts': 'Accesos directos', + 'Horizontal line': 'L\u00ednea horizontal', + 'Insert\/edit image': 'Insertar\/editar imagen', + 'Image description': 'Descripci\u00f3n de la imagen', + Source: 'Enlace', + Dimensions: 'Dimensiones', + 'Constrain proportions': 'Restringir proporciones', + General: 'General', + Advanced: 'Avanzado', + Style: 'Estilo', + 'Vertical space': 'Espacio vertical', + 'Horizontal space': 'Espacio horizontal', + Border: 'Borde', + 'Insert image': 'Insertar imagen', + 'Image...': 'Imagen...', + 'Image list': 'Lista de im\u00e1genes', + 'Rotate counterclockwise': 'Girar a la izquierda', + 'Rotate clockwise': 'Girar a la derecha', + 'Flip vertically': 'Invertir verticalmente', + 'Flip horizontally': 'Invertir horizontalmente', + 'Edit image': 'Editar imagen', + 'Image options': 'Opciones de imagen', + 'Zoom in': 'Acercar', + 'Zoom out': 'Alejar', + Crop: 'Recortar', + Resize: 'Redimensionar', + Orientation: 'Orientaci\u00f3n', + Brightness: 'Brillo', + Sharpen: 'Forma', + Contrast: 'Contraste', + 'Color levels': 'Niveles de color', + Gamma: 'Gamma', + Invert: 'Invertir', + Apply: 'Aplicar', + Back: 'Atr\u00e1s', + 'Insert date\/time': 'Insertar fecha\/hora', + 'Date\/time': 'Fecha\/hora', + 'Insert\/Edit Link': 'Insertar\/editar enlace', + 'Insert\/edit link': 'Insertar\/editar enlace', + 'Text to display': 'Texto para mostrar', + Url: 'URL', + 'Open link in...': 'Abrir enlace en...', + 'Current window': 'Ventana actual', + None: 'Ninguno', + 'New window': 'Nueva ventana', + 'Remove link': 'Quitar enlace', + Anchors: 'Anclas', + 'Link...': 'Enlace...', + 'Paste or type a link': 'Pega o introduce un enlace', + 'The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?': 'El enlace que has introducido no parece ser una direcci\u00f3n de correo electr\u00f3nico. Quieres a\u00f1adir el prefijo necesario mailto: ?', + 'The URL you entered seems to be an external link. Do you want to add the required http:\/\/ prefix?': 'El enlace que has introducido no parece ser una enlace externo. Quieres a\u00f1adir el prefijo necesario http:\/\/ ?', + 'Link list': 'Lista de enlaces', + 'Insert video': 'Insertar video', + 'Insert\/edit video': 'Insertar\/editar video', + 'Insert\/edit media': 'Insertar\/editar medio', + 'Alternative source': 'Enlace alternativo', + 'Alternative source URL': 'Origen de URL alternativo', + 'Media poster (Image URL)': 'P\u00f3ster de medio (URL de imagen)', + 'Paste your embed code below:': 'Pega tu c\u00f3digo embebido debajo', + Embed: 'Incrustado', + 'Media...': 'Medios...', + 'Nonbreaking space': 'Espacio fijo', + 'Page break': 'Salto de p\u00e1gina', + 'Paste as text': 'Pegar como texto', + Preview: 'Previsualizar', + 'Print...': 'Imprimir...', + Save: 'Guardar', + Find: 'Buscar', + 'Replace with': 'Reemplazar con', + Replace: 'Reemplazar', + 'Replace all': 'Reemplazar todo', + Previous: 'Anterior', + Next: 'Siguiente', + 'Find and replace...': 'Buscar y reemplazar...', + 'Could not find the specified string.': 'No se encuentra la cadena de texto especificada', + 'Match case': 'Coincidencia exacta', + 'Find whole words only': 'Solo palabras completas', + 'Spell check': 'Revisar ortograf\u00eda', + Ignore: 'Ignorar', + 'Ignore all': 'Ignorar todos', + Finish: 'Finalizar', + 'Add to Dictionary': 'A\u00f1adir al Diccionario', + 'Insert table': 'Insertar tabla', + 'Table properties': 'Propiedades de la tabla', + 'Delete table': 'Eliminar tabla', + Cell: 'Celda', + Row: 'Fila', + Column: 'Columna', + 'Cell properties': 'Propiedades de la celda', + 'Merge cells': 'Combinar celdas', + 'Split cell': 'Dividir celdas', + 'Insert row before': 'Insertar fila antes', + 'Insert row after': 'Insertar fila despu\u00e9s ', + 'Delete row': 'Eliminar fila', + 'Row properties': 'Propiedades de la fila', + 'Cut row': 'Cortar fila', + 'Copy row': 'Copiar fila', + 'Paste row before': 'Pegar la fila antes', + 'Paste row after': 'Pegar la fila despu\u00e9s', + 'Insert column before': 'Insertar columna antes', + 'Insert column after': 'Insertar columna despu\u00e9s', + 'Delete column': 'Eliminar columna', + Cols: 'Columnas', + Rows: 'Filas', + Width: 'Ancho', + Height: 'Alto', + 'Cell spacing': 'Espacio entre celdas', + 'Cell padding': 'Relleno de celda', + 'Show caption': 'Mostrar t\u00edtulo', + Left: 'Izquierda', + Center: 'Centrado', + Right: 'Derecha', + 'Cell type': 'Tipo de celda', + Scope: '\u00c1mbito', + Alignment: 'Alineaci\u00f3n', + 'H Align': 'Alineamiento Horizontal', + 'V Align': 'Alineamiento Vertical', + Top: 'Arriba', + Middle: 'Centro', + Bottom: 'Abajo', + 'Header cell': 'Celda de la cebecera', + 'Row group': 'Grupo de filas', + 'Column group': 'Grupo de columnas', + 'Row type': 'Tipo de fila', + Header: 'Cabecera', + Body: 'Cuerpo', + Footer: 'Pie de p\u00e1gina', + 'Border color': 'Color del borde', + 'Insert template...': 'Insertar plantilla...', + Templates: 'Plantillas', + Template: 'Plantilla', + 'Text color': 'Color del texto', + 'Background color': 'Color de fondo', + 'Custom...': 'Personalizar...', + 'Custom color': 'Color personalizado', + 'No color': 'Sin color', + 'Remove color': 'Quitar color', + 'Table of Contents': 'Tabla de contenidos', + 'Show blocks': 'Mostrar bloques', + 'Show invisible characters': 'Mostrar caracteres invisibles', + 'Word count': 'Contar palabras', + Count: 'Recuento', + Document: 'Documento', + Selection: 'Selecci\u00f3n', + Words: 'Palabras', + 'Words: {0}': 'Palabras: {0}', + '{0} words': '{0} palabras', + File: 'Archivo', + Edit: 'Editar', + Insert: 'Insertar', + View: 'Ver', + Format: 'Formato', + Table: 'Tabla', + Tools: 'Herramientas', + 'Powered by {0}': 'Desarrollado por {0}', + 'Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help': '\u00c1rea de texto enriquecido. Pulse ALT-F9 para el menu. Pulse ALT-F10 para la barra de herramientas. Pulse ALT-0 para ayuda', + 'Image title': 'Titulo de imagen', + 'Border width': 'Ancho de borde', + 'Border style': 'Estilo de borde', + Error: 'Error', + Warn: 'Advertencia', + Valid: 'V\u00e1lido', + 'To open the popup, press Shift+Enter': 'Para abrir el elemento emergente, pulse May\u00fas+Intro', + 'Rich Text Area. Press ALT-0 for help.': '\u00c1rea de texto enriquecido. Pulse ALT-0 para abrir la ayuda.', + 'System Font': 'Fuente de sistema', + 'Failed to upload image: {0}': 'Fallo al cargar imagen: {0}', + 'Failed to load plugin: {0} from url {1}': 'Fallo al cargar complemento: {0} desde URL {1}', + 'Failed to load plugin url: {0}': 'Fallo al cargar URL del complemento: {0}', + 'Failed to initialize plugin: {0}': 'Fallo al iniciar el complemento: {0}', + example: 'ejemplo', + Search: 'Buscar', + All: 'Todo', + Currency: 'Divisa', + Text: 'Texto', + Quotations: 'Comillas', + Mathematical: 'S\u00edmbolo matem\u00e1tico', + 'Extended Latin': 'Latino extendido A', + Symbols: 'S\u00edmbolos', + Arrows: 'Flechas', + 'User Defined': 'Definido por el usuario', + 'dollar sign': 'signo de d\u00f3lar', + 'currency sign': 'signo de divisa', + 'euro-currency sign': 'signo de euro', + 'colon sign': 'signo de dos puntos', + 'cruzeiro sign': 'signo de cruceiro', + 'french franc sign': 'signo de franco franc\u00e9s', + 'lira sign': 'signo de lira', + 'mill sign': 'signo de mill', + 'naira sign': 'signo de naira', + 'peseta sign': 'signo de peseta', + 'rupee sign': 'signo de rupia', + 'won sign': 'signo de won', + 'new sheqel sign': 'signo de nuevo s\u00e9quel', + 'dong sign': 'signo de dong', + 'kip sign': 'signo de kip', + 'tugrik sign': 'signo de tugrik', + 'drachma sign': 'signo de dracma', + 'german penny symbol': 'signo de penique alem\u00e1n', + 'peso sign': 'signo de peso', + 'guarani sign': 'signo de guaran\u00ed', + 'austral sign': 'signo de austral', + 'hryvnia sign': 'signo de grivna', + 'cedi sign': 'signo de cedi', + 'livre tournois sign': 'signo de libra tornesa', + 'spesmilo sign': 'signo de spesmilo', + 'tenge sign': 'signo de tenge', + 'indian rupee sign': 'signo de rupia india', + 'turkish lira sign': 'signo de lira turca', + 'nordic mark sign': 'signo de marco n\u00f3rdico', + 'manat sign': 'signo de manat', + 'ruble sign': 'signo de rublo', + 'yen character': 'car\u00e1cter de yen', + 'yuan character': 'car\u00e1cter de yuan', + 'yuan character, in hong kong and taiwan': 'car\u00e1cter de yuan en Hong Kong y Taiw\u00e1n', + 'yen\/yuan character variant one': 'Variante uno de car\u00e1cter de yen\/yuan', + 'Loading emoticons...': 'Cargando emoticonos...', + 'Could not load emoticons': 'No se han podido cargar los emoticonos', + People: 'Personas', + 'Animals and Nature': 'Animales y naturaleza', + 'Food and Drink': 'Comida y bebida', + Activity: 'Actividad', + 'Travel and Places': 'Viajes y lugares', + Objects: 'Objetos', + Flags: 'Banderas', + Characters: 'Caracteres', + 'Characters (no spaces)': 'Caracteres (sin espacios)', + '{0} characters': '{0} caracteres', + 'Error: Form submit field collision.': 'Error: Colisi\u00f3n de campo al enviar formulario.', + 'Error: No form element found.': 'Error: No se encuentra ning\u00fan elemento de formulario.', + Update: 'Actualizar', + 'Color swatch': 'Muestrario de colores', + Turquoise: 'Turquesa', + Green: 'Verde', + Blue: 'Azul', + Purple: 'P\u00farpura', + 'Navy Blue': 'Azul marino', + 'Dark Turquoise': 'Turquesa oscuro', + 'Dark Green': 'Verde oscuro', + 'Medium Blue': 'Azul medio', + 'Medium Purple': 'P\u00farpura medio', + 'Midnight Blue': 'Azul medio', + Yellow: 'Amarillo', + Orange: 'Naranja', + Red: 'Rojo', + 'Light Gray': 'Gris claro', + Gray: 'Gris', + 'Dark Yellow': 'Amarillo oscuro', + 'Dark Orange': 'Naranja oscuro', + 'Dark Red': 'Rojo oscuro', + 'Medium Gray': 'Gris medio', + 'Dark Gray': 'Gris oscuro', + 'Light Green': 'Verde claro', + 'Light Yellow': 'Amarillo claro', + 'Light Red': 'Rojo claro', + 'Light Purple': 'Morado claro', + 'Light Blue': 'Azul claro', + 'Dark Purple': 'Morado oscuro', + 'Dark Blue': 'Azul oscuro', + Black: 'Negro', + White: 'Blanco', + 'Switch to or from fullscreen mode': 'Activar o desactivar modo pantalla completa', + 'Open help dialog': 'Abrir di\u00e1logo de ayuda', + history: 'historial', + styles: 'estilos', + formatting: 'formato', + alignment: 'alineaci\u00f3n', + indentation: 'sangr\u00eda', + 'permanent pen': 'bol\u00edgrafo permanente', + comments: 'comentarios', + 'Format Painter': 'Copiar formato', + 'Insert\/edit iframe': 'Insertar\/editar iframe', + Capitalization: 'Uso de may\u00fasculas', + lowercase: 'min\u00fasculas', + UPPERCASE: 'MAY\u00daSCULAS', + 'Title Case': 'Tipo T\u00edtulo', + 'Permanent Pen Properties': 'Propiedades del bol\u00edgrafo permanente', + 'Permanent pen properties...': 'Propiedades del bol\u00edgrafo permanente...', + Font: 'Fuente', + Size: 'Tama\u00f1o', + 'More...': 'M\u00e1s...', + 'Spellcheck Language': 'Corrector', + 'Select...': 'Seleccionar...', + Preferences: 'Preferencias', + Yes: 'S\u00ed', + No: 'No', + 'Keyboard Navigation': 'Navegaci\u00f3n con el teclado', + Version: 'Versi\u00f3n', + Anchor: 'Ancla', + 'Special character': 'Car\u00e1cter especial', + 'Code sample': 'Ejemplo de c\u00f3digo', + Color: 'Color', + Emoticons: 'Emoticonos', + 'Document properties': 'Propiedades del documento', + Image: 'Imagen', + 'Insert link': 'Insertar enlace', + Target: 'Destino', + Link: 'Enlace', + Poster: 'Miniatura', + Media: 'Media', + Print: 'Imprimir', + Prev: 'Anterior', + 'Find and replace': 'Buscar y reemplazar', + 'Whole words': 'Palabras completas', + Spellcheck: 'Corrector ortogr\u00e1fico', + Caption: 'Subt\u00edtulo', + 'Insert template': 'Insertar plantilla' +}) diff --git a/public/resource/tinymce/langs/zh_CN.js b/public/resource/tinymce/langs/zh_CN.js new file mode 100644 index 0000000..f9d8b5c --- /dev/null +++ b/public/resource/tinymce/langs/zh_CN.js @@ -0,0 +1,389 @@ +tinymce.addI18n('zh_CN',{ +"Redo": "\u91cd\u505a", +"Undo": "\u64a4\u9500", +"Cut": "\u526a\u5207", +"Copy": "\u590d\u5236", +"Paste": "\u7c98\u8d34", +"Select all": "\u5168\u9009", +"New document": "\u65b0\u6587\u4ef6", +"Ok": "\u786e\u5b9a", +"Cancel": "\u53d6\u6d88", +"Visual aids": "\u7f51\u683c\u7ebf", +"Bold": "\u7c97\u4f53", +"Italic": "\u659c\u4f53", +"Underline": "\u4e0b\u5212\u7ebf", +"Strikethrough": "\u5220\u9664\u7ebf", +"Superscript": "\u4e0a\u6807", +"Subscript": "\u4e0b\u6807", +"Clear formatting": "\u6e05\u9664\u683c\u5f0f", +"Align left": "\u5de6\u8fb9\u5bf9\u9f50", +"Align center": "\u4e2d\u95f4\u5bf9\u9f50", +"Align right": "\u53f3\u8fb9\u5bf9\u9f50", +"Justify": "\u4e24\u7aef\u5bf9\u9f50", +"Bullet list": "\u9879\u76ee\u7b26\u53f7", +"Numbered list": "\u7f16\u53f7\u5217\u8868", +"Decrease indent": "\u51cf\u5c11\u7f29\u8fdb", +"Increase indent": "\u589e\u52a0\u7f29\u8fdb", +"Close": "\u5173\u95ed", +"Formats": "\u683c\u5f0f", +"Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X\/C\/V keyboard shortcuts instead.": "\u4f60\u7684\u6d4f\u89c8\u5668\u4e0d\u652f\u6301\u6253\u5f00\u526a\u8d34\u677f\uff0c\u8bf7\u4f7f\u7528Ctrl+X\/C\/V\u7b49\u5feb\u6377\u952e\u3002", +"Headers": "\u6807\u9898", +"Header 1": "\u6807\u98981", +"Header 2": "\u6807\u98982", +"Header 3": "\u6807\u98983", +"Header 4": "\u6807\u98984", +"Header 5": "\u6807\u98985", +"Header 6": "\u6807\u98986", +"Headings": "\u6807\u9898", +"Heading 1": "\u6807\u98981", +"Heading 2": "\u6807\u98982", +"Heading 3": "\u6807\u98983", +"Heading 4": "\u6807\u98984", +"Heading 5": "\u6807\u98985", +"Heading 6": "\u6807\u98986", +"Preformatted": "\u9884\u5148\u683c\u5f0f\u5316\u7684", +"Div": "Div", +"Pre": "Pre", +"Code": "\u4ee3\u7801", +"Paragraph": "\u6bb5\u843d", +"Blockquote": "\u5f15\u6587\u533a\u5757", +"Inline": "\u6587\u672c", +"Blocks": "\u57fa\u5757", +"Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.": "\u5f53\u524d\u4e3a\u7eaf\u6587\u672c\u7c98\u8d34\u6a21\u5f0f\uff0c\u518d\u6b21\u70b9\u51fb\u53ef\u4ee5\u56de\u5230\u666e\u901a\u7c98\u8d34\u6a21\u5f0f\u3002", +"Fonts": "\u5b57\u4f53", +"Font Sizes": "\u5b57\u53f7", +"Class": "\u7c7b\u578b", +"Browse for an image": "\u6d4f\u89c8\u56fe\u50cf", +"OR": "\u6216", +"Drop an image here": "\u62d6\u653e\u4e00\u5f20\u56fe\u50cf\u81f3\u6b64", +"Upload": "\u4e0a\u4f20", +"Block": "\u5757", +"Align": "\u5bf9\u9f50", +"Default": "\u9ed8\u8ba4", +"Circle": "\u7a7a\u5fc3\u5706", +"Disc": "\u5b9e\u5fc3\u5706", +"Square": "\u65b9\u5757", +"Lower Alpha": "\u5c0f\u5199\u82f1\u6587\u5b57\u6bcd", +"Lower Greek": "\u5c0f\u5199\u5e0c\u814a\u5b57\u6bcd", +"Lower Roman": "\u5c0f\u5199\u7f57\u9a6c\u5b57\u6bcd", +"Upper Alpha": "\u5927\u5199\u82f1\u6587\u5b57\u6bcd", +"Upper Roman": "\u5927\u5199\u7f57\u9a6c\u5b57\u6bcd", +"Anchor...": "\u951a\u70b9...", +"Name": "\u540d\u79f0", +"Id": "\u6807\u8bc6\u7b26", +"Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores.": "\u6807\u8bc6\u7b26\u5e94\u8be5\u4ee5\u5b57\u6bcd\u5f00\u5934\uff0c\u540e\u8ddf\u5b57\u6bcd\u3001\u6570\u5b57\u3001\u7834\u6298\u53f7\u3001\u70b9\u3001\u5192\u53f7\u6216\u4e0b\u5212\u7ebf\u3002", +"You have unsaved changes are you sure you want to navigate away?": "\u4f60\u8fd8\u6709\u6587\u6863\u5c1a\u672a\u4fdd\u5b58\uff0c\u786e\u5b9a\u8981\u79bb\u5f00\uff1f", +"Restore last draft": "\u6062\u590d\u4e0a\u6b21\u7684\u8349\u7a3f", +"Special characters...": "\u7279\u6b8a\u5b57\u7b26...", +"Source code": "\u6e90\u4ee3\u7801", +"Insert\/Edit code sample": "\u63d2\u5165\/\u7f16\u8f91\u4ee3\u7801\u793a\u4f8b", +"Language": "\u8bed\u8a00", +"Code sample...": "\u793a\u4f8b\u4ee3\u7801...", +"Color Picker": "\u9009\u8272\u5668", +"R": "R", +"G": "G", +"B": "B", +"Left to right": "\u4ece\u5de6\u5230\u53f3", +"Right to left": "\u4ece\u53f3\u5230\u5de6", +"Emoticons...": "\u8868\u60c5\u7b26\u53f7...", +"Metadata and Document Properties": "\u5143\u6570\u636e\u548c\u6587\u6863\u5c5e\u6027", +"Title": "\u6807\u9898", +"Keywords": "\u5173\u952e\u8bcd", +"Description": "\u63cf\u8ff0", +"Robots": "\u673a\u5668\u4eba", +"Author": "\u4f5c\u8005", +"Encoding": "\u7f16\u7801", +"Fullscreen": "\u5168\u5c4f", +"Action": "\u64cd\u4f5c", +"Shortcut": "\u5feb\u6377\u952e", +"Help": "\u5e2e\u52a9", +"Address": "\u5730\u5740", +"Focus to menubar": "\u79fb\u52a8\u7126\u70b9\u5230\u83dc\u5355\u680f", +"Focus to toolbar": "\u79fb\u52a8\u7126\u70b9\u5230\u5de5\u5177\u680f", +"Focus to element path": "\u79fb\u52a8\u7126\u70b9\u5230\u5143\u7d20\u8def\u5f84", +"Focus to contextual toolbar": "\u79fb\u52a8\u7126\u70b9\u5230\u4e0a\u4e0b\u6587\u83dc\u5355", +"Insert link (if link plugin activated)": "\u63d2\u5165\u94fe\u63a5 (\u5982\u679c\u94fe\u63a5\u63d2\u4ef6\u5df2\u6fc0\u6d3b)", +"Save (if save plugin activated)": "\u4fdd\u5b58(\u5982\u679c\u4fdd\u5b58\u63d2\u4ef6\u5df2\u6fc0\u6d3b)", +"Find (if searchreplace plugin activated)": "\u67e5\u627e(\u5982\u679c\u67e5\u627e\u66ff\u6362\u63d2\u4ef6\u5df2\u6fc0\u6d3b)", +"Plugins installed ({0}):": "\u5df2\u5b89\u88c5\u63d2\u4ef6 ({0}):", +"Premium plugins:": "\u4f18\u79c0\u63d2\u4ef6\uff1a", +"Learn more...": "\u4e86\u89e3\u66f4\u591a...", +"You are using {0}": "\u4f60\u6b63\u5728\u4f7f\u7528 {0}", +"Plugins": "\u63d2\u4ef6", +"Handy Shortcuts": "\u5feb\u6377\u952e", +"Horizontal line": "\u6c34\u5e73\u5206\u5272\u7ebf", +"Insert\/edit image": "\u63d2\u5165\/\u7f16\u8f91\u56fe\u7247", +"Image description": "\u56fe\u7247\u63cf\u8ff0", +"Source": "\u5730\u5740", +"Dimensions": "\u5927\u5c0f", +"Constrain proportions": "\u4fdd\u6301\u7eb5\u6a2a\u6bd4", +"General": "\u666e\u901a", +"Advanced": "\u9ad8\u7ea7", +"Style": "\u6837\u5f0f", +"Vertical space": "\u5782\u76f4\u8fb9\u8ddd", +"Horizontal space": "\u6c34\u5e73\u8fb9\u8ddd", +"Border": "\u8fb9\u6846", +"Insert image": "\u63d2\u5165\u56fe\u7247", +"Image...": "\u56fe\u7247...", +"Image list": "\u56fe\u7247\u5217\u8868", +"Rotate counterclockwise": "\u9006\u65f6\u9488\u65cb\u8f6c", +"Rotate clockwise": "\u987a\u65f6\u9488\u65cb\u8f6c", +"Flip vertically": "\u5782\u76f4\u7ffb\u8f6c", +"Flip horizontally": "\u6c34\u5e73\u7ffb\u8f6c", +"Edit image": "\u7f16\u8f91\u56fe\u7247", +"Image options": "\u56fe\u7247\u9009\u9879", +"Zoom in": "\u653e\u5927", +"Zoom out": "\u7f29\u5c0f", +"Crop": "\u88c1\u526a", +"Resize": "\u8c03\u6574\u5927\u5c0f", +"Orientation": "\u65b9\u5411", +"Brightness": "\u4eae\u5ea6", +"Sharpen": "\u9510\u5316", +"Contrast": "\u5bf9\u6bd4\u5ea6", +"Color levels": "\u989c\u8272\u5c42\u6b21", +"Gamma": "\u4f3d\u9a6c\u503c", +"Invert": "\u53cd\u8f6c", +"Apply": "\u5e94\u7528", +"Back": "\u540e\u9000", +"Insert date\/time": "\u63d2\u5165\u65e5\u671f\/\u65f6\u95f4", +"Date\/time": "\u65e5\u671f\/\u65f6\u95f4", +"Insert\/Edit Link": "\u63d2\u5165\/\u7f16\u8f91\u94fe\u63a5", +"Insert\/edit link": "\u63d2\u5165\/\u7f16\u8f91\u94fe\u63a5", +"Text to display": "\u663e\u793a\u6587\u5b57", +"Url": "\u5730\u5740", +"Open link in...": "\u94fe\u63a5\u6253\u5f00\u4f4d\u7f6e...", +"Current window": "\u5f53\u524d\u7a97\u53e3", +"None": "\u65e0", +"New window": "\u5728\u65b0\u7a97\u53e3\u6253\u5f00", +"Remove link": "\u5220\u9664\u94fe\u63a5", +"Anchors": "\u951a\u70b9", +"Link...": "\u94fe\u63a5...", +"Paste or type a link": "\u7c98\u8d34\u6216\u8f93\u5165\u94fe\u63a5", +"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?": "\u4f60\u6240\u586b\u5199\u7684URL\u5730\u5740\u4e3a\u90ae\u4ef6\u5730\u5740\uff0c\u9700\u8981\u52a0\u4e0amailto:\u524d\u7f00\u5417\uff1f", +"The URL you entered seems to be an external link. Do you want to add the required http:\/\/ prefix?": "\u4f60\u6240\u586b\u5199\u7684URL\u5730\u5740\u5c5e\u4e8e\u5916\u90e8\u94fe\u63a5\uff0c\u9700\u8981\u52a0\u4e0ahttp:\/\/:\u524d\u7f00\u5417\uff1f", +"Link list": "\u94fe\u63a5\u5217\u8868", +"Insert video": "\u63d2\u5165\u89c6\u9891", +"Insert\/edit video": "\u63d2\u5165\/\u7f16\u8f91\u89c6\u9891", +"Insert\/edit media": "\u63d2\u5165\/\u7f16\u8f91\u5a92\u4f53", +"Alternative source": "\u955c\u50cf", +"Alternative source URL": "\u66ff\u4ee3\u6765\u6e90\u7f51\u5740", +"Media poster (Image URL)": "\u5c01\u9762(\u56fe\u7247\u5730\u5740)", +"Paste your embed code below:": "\u5c06\u5185\u5d4c\u4ee3\u7801\u7c98\u8d34\u5728\u4e0b\u9762:", +"Embed": "\u5185\u5d4c", +"Media...": "\u591a\u5a92\u4f53...", +"Nonbreaking space": "\u4e0d\u95f4\u65ad\u7a7a\u683c", +"Page break": "\u5206\u9875\u7b26", +"Paste as text": "\u7c98\u8d34\u4e3a\u6587\u672c", +"Preview": "\u9884\u89c8", +"Print...": "\u6253\u5370...", +"Save": "\u4fdd\u5b58", +"Find": "\u67e5\u627e", +"Replace with": "\u66ff\u6362\u4e3a", +"Replace": "\u66ff\u6362", +"Replace all": "\u5168\u90e8\u66ff\u6362", +"Previous": "\u4e0a\u4e00\u4e2a", +"Next": "\u4e0b\u4e00\u4e2a", +"Find and replace...": "\u67e5\u627e\u5e76\u66ff\u6362...", +"Could not find the specified string.": "\u672a\u627e\u5230\u641c\u7d22\u5185\u5bb9.", +"Match case": "\u533a\u5206\u5927\u5c0f\u5199", +"Find whole words only": "\u5168\u5b57\u5339\u914d", +"Spell check": "\u62fc\u5199\u68c0\u67e5", +"Ignore": "\u5ffd\u7565", +"Ignore all": "\u5168\u90e8\u5ffd\u7565", +"Finish": "\u5b8c\u6210", +"Add to Dictionary": "\u6dfb\u52a0\u5230\u5b57\u5178", +"Insert table": "\u63d2\u5165\u8868\u683c", +"Table properties": "\u8868\u683c\u5c5e\u6027", +"Delete table": "\u5220\u9664\u8868\u683c", +"Cell": "\u5355\u5143\u683c", +"Row": "\u884c", +"Column": "\u5217", +"Cell properties": "\u5355\u5143\u683c\u5c5e\u6027", +"Merge cells": "\u5408\u5e76\u5355\u5143\u683c", +"Split cell": "\u62c6\u5206\u5355\u5143\u683c", +"Insert row before": "\u5728\u4e0a\u65b9\u63d2\u5165", +"Insert row after": "\u5728\u4e0b\u65b9\u63d2\u5165", +"Delete row": "\u5220\u9664\u884c", +"Row properties": "\u884c\u5c5e\u6027", +"Cut row": "\u526a\u5207\u884c", +"Copy row": "\u590d\u5236\u884c", +"Paste row before": "\u7c98\u8d34\u5230\u4e0a\u65b9", +"Paste row after": "\u7c98\u8d34\u5230\u4e0b\u65b9", +"Insert column before": "\u5728\u5de6\u4fa7\u63d2\u5165", +"Insert column after": "\u5728\u53f3\u4fa7\u63d2\u5165", +"Delete column": "\u5220\u9664\u5217", +"Cols": "\u5217", +"Rows": "\u884c", +"Width": "\u5bbd", +"Height": "\u9ad8", +"Cell spacing": "\u5355\u5143\u683c\u5916\u95f4\u8ddd", +"Cell padding": "\u5355\u5143\u683c\u5185\u8fb9\u8ddd", +"Show caption": "\u663e\u793a\u6807\u9898", +"Left": "\u5de6\u5bf9\u9f50", +"Center": "\u5c45\u4e2d", +"Right": "\u53f3\u5bf9\u9f50", +"Cell type": "\u5355\u5143\u683c\u7c7b\u578b", +"Scope": "\u8303\u56f4", +"Alignment": "\u5bf9\u9f50\u65b9\u5f0f", +"H Align": "\u6c34\u5e73\u5bf9\u9f50", +"V Align": "\u5782\u76f4\u5bf9\u9f50", +"Top": "\u9876\u90e8\u5bf9\u9f50", +"Middle": "\u5782\u76f4\u5c45\u4e2d", +"Bottom": "\u5e95\u90e8\u5bf9\u9f50", +"Header cell": "\u8868\u5934\u5355\u5143\u683c", +"Row group": "\u884c\u7ec4", +"Column group": "\u5217\u7ec4", +"Row type": "\u884c\u7c7b\u578b", +"Header": "\u8868\u5934", +"Body": "\u8868\u4f53", +"Footer": "\u8868\u5c3e", +"Border color": "\u8fb9\u6846\u989c\u8272", +"Insert template...": "\u63d2\u5165\u6a21\u677f...", +"Templates": "\u6a21\u677f", +"Template": "\u6a21\u677f", +"Text color": "\u6587\u5b57\u989c\u8272", +"Background color": "\u80cc\u666f\u8272", +"Custom...": "\u81ea\u5b9a\u4e49...", +"Custom color": "\u81ea\u5b9a\u4e49\u989c\u8272", +"No color": "\u65e0", +"Remove color": "\u79fb\u9664\u989c\u8272", +"Table of Contents": "\u5185\u5bb9\u5217\u8868", +"Show blocks": "\u663e\u793a\u533a\u5757\u8fb9\u6846", +"Show invisible characters": "\u663e\u793a\u4e0d\u53ef\u89c1\u5b57\u7b26", +"Word count": "\u5b57\u6570", +"Words: {0}": "\u5b57\u6570\uff1a{0}", +"{0} words": "{0} \u5b57", +"File": "\u6587\u4ef6", +"Edit": "\u7f16\u8f91", +"Insert": "\u63d2\u5165", +"View": "\u89c6\u56fe", +"Format": "\u683c\u5f0f", +"Table": "\u8868\u683c", +"Tools": "\u5de5\u5177", +"Powered by {0}": "\u7531{0}\u9a71\u52a8", +"Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help": "\u5728\u7f16\u8f91\u533a\u6309ALT-F9\u6253\u5f00\u83dc\u5355\uff0c\u6309ALT-F10\u6253\u5f00\u5de5\u5177\u680f\uff0c\u6309ALT-0\u67e5\u770b\u5e2e\u52a9", +"Image title": "\u56fe\u7247\u6807\u9898", +"Border width": "\u8fb9\u6846\u5bbd\u5ea6", +"Border style": "\u8fb9\u6846\u6837\u5f0f", +"Error": "\u9519\u8bef", +"Warn": "\u8b66\u544a", +"Valid": "\u6709\u6548", +"To open the popup, press Shift+Enter": "\u6309Shitf+Enter\u952e\u6253\u5f00\u5bf9\u8bdd\u6846", +"Rich Text Area. Press ALT-0 for help.": "\u7f16\u8f91\u533a\u3002\u6309Alt+0\u952e\u6253\u5f00\u5e2e\u52a9\u3002", +"System Font": "\u7cfb\u7edf\u5b57\u4f53", +"Failed to upload image: {0}": "\u56fe\u7247\u4e0a\u4f20\u5931\u8d25: {0}", +"Failed to load plugin: {0} from url {1}": "\u63d2\u4ef6\u52a0\u8f7d\u5931\u8d25: {0} \u6765\u81ea\u94fe\u63a5 {1}", +"Failed to load plugin url: {0}": "\u63d2\u4ef6\u52a0\u8f7d\u5931\u8d25 \u94fe\u63a5: {0}", +"Failed to initialize plugin: {0}": "\u63d2\u4ef6\u521d\u59cb\u5316\u5931\u8d25: {0}", +"example": "\u793a\u4f8b", +"Search": "\u641c\u7d22", +"All": "\u5168\u90e8", +"Currency": "\u8d27\u5e01", +"Text": "\u6587\u5b57", +"Quotations": "\u5f15\u7528", +"Mathematical": "\u6570\u5b66", +"Extended Latin": "\u62c9\u4e01\u8bed\u6269\u5145", +"Symbols": "\u7b26\u53f7", +"Arrows": "\u7bad\u5934", +"User Defined": "\u81ea\u5b9a\u4e49", +"dollar sign": "\u7f8e\u5143\u7b26\u53f7", +"currency sign": "\u8d27\u5e01\u7b26\u53f7", +"euro-currency sign": "\u6b27\u5143\u7b26\u53f7", +"colon sign": "\u5192\u53f7", +"cruzeiro sign": "\u514b\u9c81\u8d5b\u7f57\u5e01\u7b26\u53f7", +"french franc sign": "\u6cd5\u90ce\u7b26\u53f7", +"lira sign": "\u91cc\u62c9\u7b26\u53f7", +"mill sign": "\u5bc6\u5c14\u7b26\u53f7", +"naira sign": "\u5948\u62c9\u7b26\u53f7", +"peseta sign": "\u6bd4\u585e\u5854\u7b26\u53f7", +"rupee sign": "\u5362\u6bd4\u7b26\u53f7", +"won sign": "\u97e9\u5143\u7b26\u53f7", +"new sheqel sign": "\u65b0\u8c22\u514b\u5c14\u7b26\u53f7", +"dong sign": "\u8d8a\u5357\u76fe\u7b26\u53f7", +"kip sign": "\u8001\u631d\u57fa\u666e\u7b26\u53f7", +"tugrik sign": "\u56fe\u683c\u91cc\u514b\u7b26\u53f7", +"drachma sign": "\u5fb7\u62c9\u514b\u9a6c\u7b26\u53f7", +"german penny symbol": "\u5fb7\u56fd\u4fbf\u58eb\u7b26\u53f7", +"peso sign": "\u6bd4\u7d22\u7b26\u53f7", +"guarani sign": "\u74dc\u62c9\u5c3c\u7b26\u53f7", +"austral sign": "\u6fb3\u5143\u7b26\u53f7", +"hryvnia sign": "\u683c\u91cc\u592b\u5c3c\u4e9a\u7b26\u53f7", +"cedi sign": "\u585e\u5730\u7b26\u53f7", +"livre tournois sign": "\u91cc\u5f17\u5f17\u5c14\u7b26\u53f7", +"spesmilo sign": "spesmilo\u7b26\u53f7", +"tenge sign": "\u575a\u6208\u7b26\u53f7", +"indian rupee sign": "\u5370\u5ea6\u5362\u6bd4", +"turkish lira sign": "\u571f\u8033\u5176\u91cc\u62c9", +"nordic mark sign": "\u5317\u6b27\u9a6c\u514b", +"manat sign": "\u9a6c\u7eb3\u7279\u7b26\u53f7", +"ruble sign": "\u5362\u5e03\u7b26\u53f7", +"yen character": "\u65e5\u5143\u5b57\u6837", +"yuan character": "\u4eba\u6c11\u5e01\u5143\u5b57\u6837", +"yuan character, in hong kong and taiwan": "\u5143\u5b57\u6837\uff08\u6e2f\u53f0\u5730\u533a\uff09", +"yen\/yuan character variant one": "\u5143\u5b57\u6837\uff08\u5927\u5199\uff09", +"Loading emoticons...": "\u52a0\u8f7d\u8868\u60c5\u7b26\u53f7...", +"Could not load emoticons": "\u4e0d\u80fd\u52a0\u8f7d\u8868\u60c5\u7b26\u53f7", +"People": "\u4eba\u7c7b", +"Animals and Nature": "\u52a8\u7269\u548c\u81ea\u7136", +"Food and Drink": "\u98df\u7269\u548c\u996e\u54c1", +"Activity": "\u6d3b\u52a8", +"Travel and Places": "\u65c5\u6e38\u548c\u5730\u70b9", +"Objects": "\u7269\u4ef6", +"Flags": "\u65d7\u5e1c", +"Characters": "\u5b57\u7b26", +"Characters (no spaces)": "\u5b57\u7b26(\u65e0\u7a7a\u683c)", +"Error: Form submit field collision.": "\u9519\u8bef: \u8868\u5355\u63d0\u4ea4\u5b57\u6bb5\u51b2\u7a81\u3002", +"Error: No form element found.": "\u9519\u8bef: \u6ca1\u6709\u8868\u5355\u63a7\u4ef6\u3002", +"Update": "\u66f4\u65b0", +"Color swatch": "\u989c\u8272\u6837\u672c", +"Turquoise": "\u9752\u7eff\u8272", +"Green": "\u7eff\u8272", +"Blue": "\u84dd\u8272", +"Purple": "\u7d2b\u8272", +"Navy Blue": "\u6d77\u519b\u84dd", +"Dark Turquoise": "\u6df1\u84dd\u7eff\u8272", +"Dark Green": "\u6df1\u7eff\u8272", +"Medium Blue": "\u4e2d\u84dd\u8272", +"Medium Purple": "\u4e2d\u7d2b\u8272", +"Midnight Blue": "\u6df1\u84dd\u8272", +"Yellow": "\u9ec4\u8272", +"Orange": "\u6a59\u8272", +"Red": "\u7ea2\u8272", +"Light Gray": "\u6d45\u7070\u8272", +"Gray": "\u7070\u8272", +"Dark Yellow": "\u6697\u9ec4\u8272", +"Dark Orange": "\u6df1\u6a59\u8272", +"Dark Red": "\u6df1\u7ea2\u8272", +"Medium Gray": "\u4e2d\u7070\u8272", +"Dark Gray": "\u6df1\u7070\u8272", +"Black": "\u9ed1\u8272", +"White": "\u767d\u8272", +"Switch to or from fullscreen mode": "\u5207\u6362\u5168\u5c4f\u6a21\u5f0f", +"Open help dialog": "\u6253\u5f00\u5e2e\u52a9\u5bf9\u8bdd\u6846", +"history": "\u5386\u53f2", +"styles": "\u6837\u5f0f", +"formatting": "\u683c\u5f0f\u5316", +"alignment": "\u5bf9\u9f50", +"indentation": "\u7f29\u8fdb", +"permanent pen": "\u8bb0\u53f7\u7b14", +"comments": "\u5907\u6ce8", +"Anchor": "\u951a\u70b9", +"Special character": "\u7279\u6b8a\u7b26\u53f7", +"Code sample": "\u4ee3\u7801\u793a\u4f8b", +"Color": "\u989c\u8272", +"Emoticons": "\u8868\u60c5", +"Document properties": "\u6587\u6863\u5c5e\u6027", +"Image": "\u56fe\u7247", +"Insert link": "\u63d2\u5165\u94fe\u63a5", +"Target": "\u6253\u5f00\u65b9\u5f0f", +"Link": "\u94fe\u63a5", +"Poster": "\u5c01\u9762", +"Media": "\u5a92\u4f53", +"Print": "\u6253\u5370", +"Prev": "\u4e0a\u4e00\u4e2a", +"Find and replace": "\u67e5\u627e\u548c\u66ff\u6362", +"Whole words": "\u5168\u5b57\u5339\u914d", +"Spellcheck": "\u62fc\u5199\u68c0\u67e5", +"Caption": "\u6807\u9898", +"Insert template": "\u63d2\u5165\u6a21\u677f" +}); \ No newline at end of file diff --git a/public/resource/tinymce/skins/ui/jeecg/content.css b/public/resource/tinymce/skins/ui/jeecg/content.css new file mode 100644 index 0000000..c9dc16d --- /dev/null +++ b/public/resource/tinymce/skins/ui/jeecg/content.css @@ -0,0 +1,711 @@ +/** +* Copyright (c) Tiny Technologies, Inc. All rights reserved. +* Licensed under the LGPL or a commercial license. +* For LGPL see License.txt in the project root for license information. +* For commercial licenses see https://www.tiny.cloud/ +*/ +.mce-content-body .mce-item-anchor { + background: transparent url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'8'%20height%3D'12'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'M0%200L8%200%208%2012%204.09117821%209%200%2012z'%2F%3E%3C%2Fsvg%3E%0A") no-repeat center; + cursor: default; + display: inline-block; + height: 12px !important; + padding: 0 2px; + -webkit-user-modify: read-only; + -moz-user-modify: read-only; + -webkit-user-select: all; + -ms-user-select: all; + user-select: all; + width: 8px !important; +} +.mce-content-body .mce-item-anchor[data-mce-selected] { + outline-offset: 1px; +} +.tox-comments-visible .tox-comment { + background-color: #fff0b7; +} +.tox-comments-visible .tox-comment--active { + background-color: #ffe168; +} +.tox-checklist > li:not(.tox-checklist--hidden) { + list-style: none; + margin: 0.25em 0; +} +.tox-checklist > li:not(.tox-checklist--hidden)::before { + content: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cg%20id%3D%22checklist-unchecked%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Crect%20id%3D%22Rectangle%22%20width%3D%2215%22%20height%3D%2215%22%20x%3D%22.5%22%20y%3D%22.5%22%20fill-rule%3D%22nonzero%22%20stroke%3D%22%234C4C4C%22%20rx%3D%222%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E%0A"); + cursor: pointer; + height: 1em; + margin-left: -1.5em; + margin-top: 0.125em; + position: absolute; + width: 1em; +} +.tox-checklist li:not(.tox-checklist--hidden).tox-checklist--checked::before { + content: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cg%20id%3D%22checklist-checked%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Crect%20id%3D%22Rectangle%22%20width%3D%2216%22%20height%3D%2216%22%20fill%3D%22%234099FF%22%20fill-rule%3D%22nonzero%22%20rx%3D%222%22%2F%3E%3Cpath%20id%3D%22Path%22%20fill%3D%22%23FFF%22%20fill-rule%3D%22nonzero%22%20d%3D%22M11.5703186%2C3.14417309%20C11.8516238%2C2.73724603%2012.4164781%2C2.62829933%2012.83558%2C2.89774797%20C13.260121%2C3.17069355%2013.3759736%2C3.72932262%2013.0909105%2C4.14168582%20L7.7580587%2C11.8560195%20C7.43776896%2C12.3193404%206.76483983%2C12.3852142%206.35607322%2C11.9948725%20L3.02491697%2C8.8138662%20C2.66090143%2C8.46625845%202.65798871%2C7.89594698%203.01850234%2C7.54483354%20C3.373942%2C7.19866177%203.94940006%2C7.19592841%204.30829608%2C7.5386474%20L6.85276923%2C9.9684299%20L11.5703186%2C3.14417309%20Z%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E%0A"); +} +[dir=rtl] .tox-checklist > li:not(.tox-checklist--hidden)::before { + margin-left: 0; + margin-right: -1.5em; +} +/* stylelint-disable */ +/* http://prismjs.com/ */ +/** + * prism.js default theme for JavaScript, CSS and HTML + * Based on dabblet (http://dabblet.com) + * @author Lea Verou + */ +code[class*="language-"], +pre[class*="language-"] { + color: black; + background: none; + text-shadow: 0 1px white; + font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; + font-size: 1em; + text-align: left; + white-space: pre; + word-spacing: normal; + word-break: normal; + word-wrap: normal; + line-height: 1.5; + -moz-tab-size: 4; + tab-size: 4; + -webkit-hyphens: none; + -ms-hyphens: none; + hyphens: none; +} +pre[class*="language-"]::selection, +pre[class*="language-"] ::selection, +code[class*="language-"]::selection, +code[class*="language-"] ::selection { + text-shadow: none; + background: #b3d4fc; +} +@media print { + code[class*="language-"], + pre[class*="language-"] { + text-shadow: none; + } +} +/* Code blocks */ +pre[class*="language-"] { + padding: 1em; + margin: 0.5em 0; + overflow: auto; +} +:not(pre) > code[class*="language-"], +pre[class*="language-"] { + background: #f5f2f0; +} +/* Inline code */ +:not(pre) > code[class*="language-"] { + padding: 0.1em; + border-radius: 0.3em; + white-space: normal; +} +.token.comment, +.token.prolog, +.token.doctype, +.token.cdata { + color: slategray; +} +.token.punctuation { + color: #999; +} +.namespace { + opacity: 0.7; +} +.token.property, +.token.tag, +.token.boolean, +.token.number, +.token.constant, +.token.symbol, +.token.deleted { + color: #905; +} +.token.selector, +.token.attr-name, +.token.string, +.token.char, +.token.builtin, +.token.inserted { + color: #690; +} +.token.operator, +.token.entity, +.token.url, +.language-css .token.string, +.style .token.string { + color: #9a6e3a; + background: hsla(0, 0%, 100%, 0.5); +} +.token.atrule, +.token.attr-value, +.token.keyword { + color: #07a; +} +.token.function, +.token.class-name { + color: #DD4A68; +} +.token.regex, +.token.important, +.token.variable { + color: #e90; +} +.token.important, +.token.bold { + font-weight: bold; +} +.token.italic { + font-style: italic; +} +.token.entity { + cursor: help; +} +/* stylelint-enable */ +.mce-content-body { + overflow-wrap: break-word; + word-wrap: break-word; +} +.mce-content-body .mce-visual-caret { + background-color: black; + background-color: currentColor; + position: absolute; +} +.mce-content-body .mce-visual-caret-hidden { + display: none; +} +.mce-content-body *[data-mce-caret] { + left: -1000px; + margin: 0; + padding: 0; + position: absolute; + right: auto; + top: 0; +} +.mce-content-body .mce-offscreen-selection { + left: -2000000px; + max-width: 1000000px; + position: absolute; +} +.mce-content-body *[contentEditable=false] { + cursor: default; +} +.mce-content-body *[contentEditable=true] { + cursor: text; +} +.tox-cursor-format-painter { + cursor: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%0A%20%20%3Cg%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M15%2C6%20C15%2C5.45%2014.55%2C5%2014%2C5%20L6%2C5%20C5.45%2C5%205%2C5.45%205%2C6%20L5%2C10%20C5%2C10.55%205.45%2C11%206%2C11%20L14%2C11%20C14.55%2C11%2015%2C10.55%2015%2C10%20L15%2C9%20L16%2C9%20L16%2C12%20L9%2C12%20L9%2C19%20C9%2C19.55%209.45%2C20%2010%2C20%20L11%2C20%20C11.55%2C20%2012%2C19.55%2012%2C19%20L12%2C14%20L18%2C14%20L18%2C7%20L15%2C7%20L15%2C6%20Z%22%2F%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M1%2C1%20L8.25%2C1%20C8.66421356%2C1%209%2C1.33578644%209%2C1.75%20L9%2C1.75%20C9%2C2.16421356%208.66421356%2C2.5%208.25%2C2.5%20L2.5%2C2.5%20L2.5%2C8.25%20C2.5%2C8.66421356%202.16421356%2C9%201.75%2C9%20L1.75%2C9%20C1.33578644%2C9%201%2C8.66421356%201%2C8.25%20L1%2C1%20Z%22%2F%3E%0A%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A"), default; +} +.mce-content-body figure.align-left { + float: left; +} +.mce-content-body figure.align-right { + float: right; +} +.mce-content-body figure.image.align-center { + display: table; + margin-left: auto; + margin-right: auto; +} +.mce-preview-object { + border: 1px solid gray; + display: inline-block; + line-height: 0; + margin: 0 2px 0 2px; + position: relative; +} +.mce-preview-object .mce-shim { + background: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7); + height: 100%; + left: 0; + position: absolute; + top: 0; + width: 100%; +} +.mce-preview-object[data-mce-selected="2"] .mce-shim { + display: none; +} +.mce-object { + background: transparent url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M4%203h16a1%201%200%200%201%201%201v16a1%201%200%200%201-1%201H4a1%201%200%200%201-1-1V4a1%201%200%200%201%201-1zm1%202v14h14V5H5zm4.79%202.565l5.64%204.028a.5.5%200%200%201%200%20.814l-5.64%204.028a.5.5%200%200%201-.79-.407V7.972a.5.5%200%200%201%20.79-.407z%22%2F%3E%3C%2Fsvg%3E%0A") no-repeat center; + border: 1px dashed #aaa; +} +.mce-pagebreak { + border: 1px dashed #aaa; + cursor: default; + display: block; + height: 5px; + margin-top: 15px; + page-break-before: always; + width: 100%; +} +@media print { + .mce-pagebreak { + border: 0; + } +} +.tiny-pageembed .mce-shim { + background: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7); + height: 100%; + left: 0; + position: absolute; + top: 0; + width: 100%; +} +.tiny-pageembed[data-mce-selected="2"] .mce-shim { + display: none; +} +.tiny-pageembed { + display: inline-block; + position: relative; +} +.tiny-pageembed--21by9, +.tiny-pageembed--16by9, +.tiny-pageembed--4by3, +.tiny-pageembed--1by1 { + display: block; + overflow: hidden; + padding: 0; + position: relative; + width: 100%; +} +.tiny-pageembed--21by9 { + padding-top: 42.857143%; +} +.tiny-pageembed--16by9 { + padding-top: 56.25%; +} +.tiny-pageembed--4by3 { + padding-top: 75%; +} +.tiny-pageembed--1by1 { + padding-top: 100%; +} +.tiny-pageembed--21by9 iframe, +.tiny-pageembed--16by9 iframe, +.tiny-pageembed--4by3 iframe, +.tiny-pageembed--1by1 iframe { + border: 0; + height: 100%; + left: 0; + position: absolute; + top: 0; + width: 100%; +} +.mce-content-body[data-mce-placeholder] { + position: relative; +} +.mce-content-body[data-mce-placeholder]:not(.mce-visualblocks)::before { + color: rgba(84, 111, 94, 0.7); + content: attr(data-mce-placeholder); + position: absolute; +} +.mce-content-body:not([dir=rtl])[data-mce-placeholder]:not(.mce-visualblocks)::before { + left: 1px; +} +.mce-content-body[dir=rtl][data-mce-placeholder]:not(.mce-visualblocks)::before { + right: 1px; +} +.mce-content-body div.mce-resizehandle { + background-color: #4099ff; + border-color: #4099ff; + border-style: solid; + border-width: 1px; + box-sizing: border-box; + height: 10px; + position: absolute; + width: 10px; + z-index: 10000; +} +.mce-content-body div.mce-resizehandle:hover { + background-color: #4099ff; +} +.mce-content-body div.mce-resizehandle:nth-of-type(1) { + cursor: nwse-resize; +} +.mce-content-body div.mce-resizehandle:nth-of-type(2) { + cursor: nesw-resize; +} +.mce-content-body div.mce-resizehandle:nth-of-type(3) { + cursor: nwse-resize; +} +.mce-content-body div.mce-resizehandle:nth-of-type(4) { + cursor: nesw-resize; +} +.mce-content-body .mce-resize-backdrop { + z-index: 10000; +} +.mce-content-body .mce-clonedresizable { + cursor: default; + opacity: 0.5; + outline: 1px dashed black; + position: absolute; + z-index: 10001; +} +.mce-content-body .mce-clonedresizable.mce-resizetable-columns th, +.mce-content-body .mce-clonedresizable.mce-resizetable-columns td { + border: 0; +} +.mce-content-body .mce-resize-helper { + background: #555; + background: rgba(0, 0, 0, 0.75); + border: 1px; + border-radius: 3px; + color: white; + display: none; + font-family: sans-serif; + font-size: 12px; + line-height: 14px; + margin: 5px 10px; + padding: 5px; + position: absolute; + white-space: nowrap; + z-index: 10002; +} +.tox-rtc-user-selection { + position: relative; +} +.tox-rtc-user-cursor { + bottom: 0; + cursor: default; + position: absolute; + top: 0; + width: 2px; +} +.tox-rtc-user-cursor::before { + background-color: inherit; + border-radius: 50%; + content: ''; + display: block; + height: 8px; + position: absolute; + right: -3px; + top: -3px; + width: 8px; +} +.tox-rtc-user-cursor:hover::after { + background-color: inherit; + border-radius: 100px; + box-sizing: border-box; + color: #fff; + content: attr(data-user); + display: block; + font-size: 12px; + font-weight: normal; + left: -5px; + min-height: 8px; + min-width: 8px; + padding: 0 12px; + position: absolute; + top: -11px; + white-space: nowrap; + z-index: 1000; +} +.tox-rtc-user-selection--1 .tox-rtc-user-cursor { + background-color: #2dc26b; +} +.tox-rtc-user-selection--2 .tox-rtc-user-cursor { + background-color: #e03e2d; +} +.tox-rtc-user-selection--3 .tox-rtc-user-cursor { + background-color: #f1c40f; +} +.tox-rtc-user-selection--4 .tox-rtc-user-cursor { + background-color: #3598db; +} +.tox-rtc-user-selection--5 .tox-rtc-user-cursor { + background-color: #b96ad9; +} +.tox-rtc-user-selection--6 .tox-rtc-user-cursor { + background-color: #e67e23; +} +.tox-rtc-user-selection--7 .tox-rtc-user-cursor { + background-color: #aaa69d; +} +.tox-rtc-user-selection--8 .tox-rtc-user-cursor { + background-color: #f368e0; +} +.tox-rtc-remote-image { + background: #eaeaea url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%2236%22%20height%3D%2212%22%20viewBox%3D%220%200%2036%2012%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%3Ccircle%20cx%3D%226%22%20cy%3D%226%22%20r%3D%223%22%20fill%3D%22rgba(0%2C%200%2C%200%2C%20.2)%22%3E%0A%20%20%20%20%3Canimate%20attributeName%3D%22r%22%20values%3D%223%3B5%3B3%22%20calcMode%3D%22linear%22%20dur%3D%221s%22%20repeatCount%3D%22indefinite%22%20%2F%3E%0A%20%20%3C%2Fcircle%3E%0A%20%20%3Ccircle%20cx%3D%2218%22%20cy%3D%226%22%20r%3D%223%22%20fill%3D%22rgba(0%2C%200%2C%200%2C%20.2)%22%3E%0A%20%20%20%20%3Canimate%20attributeName%3D%22r%22%20values%3D%223%3B5%3B3%22%20calcMode%3D%22linear%22%20begin%3D%22.33s%22%20dur%3D%221s%22%20repeatCount%3D%22indefinite%22%20%2F%3E%0A%20%20%3C%2Fcircle%3E%0A%20%20%3Ccircle%20cx%3D%2230%22%20cy%3D%226%22%20r%3D%223%22%20fill%3D%22rgba(0%2C%200%2C%200%2C%20.2)%22%3E%0A%20%20%20%20%3Canimate%20attributeName%3D%22r%22%20values%3D%223%3B5%3B3%22%20calcMode%3D%22linear%22%20begin%3D%22.66s%22%20dur%3D%221s%22%20repeatCount%3D%22indefinite%22%20%2F%3E%0A%20%20%3C%2Fcircle%3E%0A%3C%2Fsvg%3E%0A") no-repeat center center; + border: 1px solid #ccc; + min-height: 240px; + min-width: 320px; +} +.mce-match-marker { + background: #aaa; + color: #fff; +} +.mce-match-marker-selected { + background: #39f; + color: #fff; +} +.mce-match-marker-selected::selection { + background: #39f; + color: #fff; +} +.mce-content-body img[data-mce-selected], +.mce-content-body video[data-mce-selected], +.mce-content-body audio[data-mce-selected], +.mce-content-body object[data-mce-selected], +.mce-content-body embed[data-mce-selected], +.mce-content-body table[data-mce-selected] { + outline: 3px solid #b4d7ff; +} +.mce-content-body hr[data-mce-selected] { + outline: 3px solid #b4d7ff; + outline-offset: 1px; +} +.mce-content-body *[contentEditable=false] *[contentEditable=true]:focus { + outline: 3px solid #b4d7ff; +} +.mce-content-body *[contentEditable=false] *[contentEditable=true]:hover { + outline: 3px solid #b4d7ff; +} +.mce-content-body *[contentEditable=false][data-mce-selected] { + cursor: not-allowed; + outline: 3px solid #b4d7ff; +} +.mce-content-body.mce-content-readonly *[contentEditable=true]:focus, +.mce-content-body.mce-content-readonly *[contentEditable=true]:hover { + outline: none; +} +.mce-content-body *[data-mce-selected="inline-boundary"] { + background-color: #b4d7ff; +} +.mce-content-body .mce-edit-focus { + outline: 3px solid #b4d7ff; +} +.mce-content-body td[data-mce-selected], +.mce-content-body th[data-mce-selected] { + position: relative; +} +.mce-content-body td[data-mce-selected]::selection, +.mce-content-body th[data-mce-selected]::selection { + background: none; +} +.mce-content-body td[data-mce-selected] *, +.mce-content-body th[data-mce-selected] * { + outline: none; + -webkit-touch-callout: none; + -webkit-user-select: none; + -ms-user-select: none; + user-select: none; +} +.mce-content-body td[data-mce-selected]::after, +.mce-content-body th[data-mce-selected]::after { + background-color: rgba(180, 215, 255, 0.7); + border: 1px solid rgba(180, 215, 255, 0.7); + bottom: -1px; + content: ''; + left: -1px; + mix-blend-mode: multiply; + position: absolute; + right: -1px; + top: -1px; +} +@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) { + .mce-content-body td[data-mce-selected]::after, + .mce-content-body th[data-mce-selected]::after { + border-color: rgba(0, 84, 180, 0.7); + } +} +.mce-content-body img::selection { + background: none; +} +.ephox-snooker-resizer-bar { + background-color: #b4d7ff; + opacity: 0; + -webkit-user-select: none; + -ms-user-select: none; + user-select: none; +} +.ephox-snooker-resizer-cols { + cursor: col-resize; +} +.ephox-snooker-resizer-rows { + cursor: row-resize; +} +.ephox-snooker-resizer-bar.ephox-snooker-resizer-bar-dragging { + opacity: 1; +} +.mce-spellchecker-word { + background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'4'%20height%3D'4'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20stroke%3D'%23ff0000'%20fill%3D'none'%20stroke-linecap%3D'round'%20stroke-opacity%3D'.75'%20d%3D'M0%203L2%201%204%203'%2F%3E%3C%2Fsvg%3E%0A"); + background-position: 0 calc(100% + 1px); + background-repeat: repeat-x; + background-size: auto 6px; + cursor: default; + height: 2rem; +} +.mce-spellchecker-grammar { + background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'4'%20height%3D'4'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20stroke%3D'%2300A835'%20fill%3D'none'%20stroke-linecap%3D'round'%20d%3D'M0%203L2%201%204%203'%2F%3E%3C%2Fsvg%3E%0A"); + background-position: 0 calc(100% + 1px); + background-repeat: repeat-x; + background-size: auto 6px; + cursor: default; +} +.mce-toc { + border: 1px solid gray; +} +.mce-toc h2 { + margin: 4px; +} +.mce-toc li { + list-style-type: none; +} +table[style*="border-width: 0px"], +.mce-item-table:not([border]), +.mce-item-table[border="0"], +table[style*="border-width: 0px"] td, +.mce-item-table:not([border]) td, +.mce-item-table[border="0"] td, +table[style*="border-width: 0px"] th, +.mce-item-table:not([border]) th, +.mce-item-table[border="0"] th, +table[style*="border-width: 0px"] caption, +.mce-item-table:not([border]) caption, +.mce-item-table[border="0"] caption { + border: 1px dashed #bbb; +} +.mce-visualblocks p, +.mce-visualblocks h1, +.mce-visualblocks h2, +.mce-visualblocks h3, +.mce-visualblocks h4, +.mce-visualblocks h5, +.mce-visualblocks h6, +.mce-visualblocks div:not([data-mce-bogus]), +.mce-visualblocks section, +.mce-visualblocks article, +.mce-visualblocks blockquote, +.mce-visualblocks address, +.mce-visualblocks pre, +.mce-visualblocks figure, +.mce-visualblocks figcaption, +.mce-visualblocks hgroup, +.mce-visualblocks aside, +.mce-visualblocks ul, +.mce-visualblocks ol, +.mce-visualblocks dl { + background-repeat: no-repeat; + border: 1px dashed #bbb; + margin-left: 3px; + padding-top: 10px; +} +.mce-visualblocks p { + background-image: url(data:image/gif;base64,R0lGODlhCQAJAJEAAAAAAP///7u7u////yH5BAEAAAMALAAAAAAJAAkAAAIQnG+CqCN/mlyvsRUpThG6AgA7); +} +.mce-visualblocks h1 { + background-image: url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGu1JuxHoAfRNRW3TWXyF2YiRUAOw==); +} +.mce-visualblocks h2 { + background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8Hybbx4oOuqgTynJd6bGlWg3DkJzoaUAAAOw==); +} +.mce-visualblocks h3 { + background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIZjI8Hybbx4oOuqgTynJf2Ln2NOHpQpmhAAQA7); +} +.mce-visualblocks h4 { + background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxInR0zqeAdhtJlXwV1oCll2HaWgAAOw==); +} +.mce-visualblocks h5 { + background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjane4iq5GlW05GgIkIZUAAAOw==); +} +.mce-visualblocks h6 { + background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjan04jep1iZ1XRlAo5bVgAAOw==); +} +.mce-visualblocks div:not([data-mce-bogus]) { + background-image: url(data:image/gif;base64,R0lGODlhEgAKAIABALu7u////yH5BAEAAAEALAAAAAASAAoAAAIfjI9poI0cgDywrhuxfbrzDEbQM2Ei5aRjmoySW4pAAQA7); +} +.mce-visualblocks section { + background-image: url(data:image/gif;base64,R0lGODlhKAAKAIABALu7u////yH5BAEAAAEALAAAAAAoAAoAAAI5jI+pywcNY3sBWHdNrplytD2ellDeSVbp+GmWqaDqDMepc8t17Y4vBsK5hDyJMcI6KkuYU+jpjLoKADs=); +} +.mce-visualblocks article { + background-image: url(data:image/gif;base64,R0lGODlhKgAKAIABALu7u////yH5BAEAAAEALAAAAAAqAAoAAAI6jI+pywkNY3wG0GBvrsd2tXGYSGnfiF7ikpXemTpOiJScasYoDJJrjsG9gkCJ0ag6KhmaIe3pjDYBBQA7); +} +.mce-visualblocks blockquote { + background-image: url(data:image/gif;base64,R0lGODlhPgAKAIABALu7u////yH5BAEAAAEALAAAAAA+AAoAAAJPjI+py+0Knpz0xQDyuUhvfoGgIX5iSKZYgq5uNL5q69asZ8s5rrf0yZmpNkJZzFesBTu8TOlDVAabUyatguVhWduud3EyiUk45xhTTgMBBQA7); +} +.mce-visualblocks address { + background-image: url(data:image/gif;base64,R0lGODlhLQAKAIABALu7u////yH5BAEAAAEALAAAAAAtAAoAAAI/jI+pywwNozSP1gDyyZcjb3UaRpXkWaXmZW4OqKLhBmLs+K263DkJK7OJeifh7FicKD9A1/IpGdKkyFpNmCkAADs=); +} +.mce-visualblocks pre { + background-image: url(data:image/gif;base64,R0lGODlhFQAKAIABALu7uwAAACH5BAEAAAEALAAAAAAVAAoAAAIjjI+ZoN0cgDwSmnpz1NCueYERhnibZVKLNnbOq8IvKpJtVQAAOw==); +} +.mce-visualblocks figure { + background-image: url(data:image/gif;base64,R0lGODlhJAAKAIAAALu7u////yH5BAEAAAEALAAAAAAkAAoAAAI0jI+py+2fwAHUSFvD3RlvG4HIp4nX5JFSpnZUJ6LlrM52OE7uSWosBHScgkSZj7dDKnWAAgA7); +} +.mce-visualblocks figcaption { + border: 1px dashed #bbb; +} +.mce-visualblocks hgroup { + background-image: url(data:image/gif;base64,R0lGODlhJwAKAIABALu7uwAAACH5BAEAAAEALAAAAAAnAAoAAAI3jI+pywYNI3uB0gpsRtt5fFnfNZaVSYJil4Wo03Hv6Z62uOCgiXH1kZIIJ8NiIxRrAZNMZAtQAAA7); +} +.mce-visualblocks aside { + background-image: url(data:image/gif;base64,R0lGODlhHgAKAIABAKqqqv///yH5BAEAAAEALAAAAAAeAAoAAAItjI+pG8APjZOTzgtqy7I3f1yehmQcFY4WKZbqByutmW4aHUd6vfcVbgudgpYCADs=); +} +.mce-visualblocks ul { + background-image: url(data:image/gif;base64,R0lGODlhDQAKAIAAALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGuYnqUVSjvw26DzzXiqIDlVwAAOw==); +} +.mce-visualblocks ol { + background-image: url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybH6HHt0qourxC6CvzXieHyeWQAAOw==); +} +.mce-visualblocks dl { + background-image: url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybEOnmOvUoWznTqeuEjNSCqeGRUAOw==); +} +.mce-visualblocks:not([dir=rtl]) p, +.mce-visualblocks:not([dir=rtl]) h1, +.mce-visualblocks:not([dir=rtl]) h2, +.mce-visualblocks:not([dir=rtl]) h3, +.mce-visualblocks:not([dir=rtl]) h4, +.mce-visualblocks:not([dir=rtl]) h5, +.mce-visualblocks:not([dir=rtl]) h6, +.mce-visualblocks:not([dir=rtl]) div:not([data-mce-bogus]), +.mce-visualblocks:not([dir=rtl]) section, +.mce-visualblocks:not([dir=rtl]) article, +.mce-visualblocks:not([dir=rtl]) blockquote, +.mce-visualblocks:not([dir=rtl]) address, +.mce-visualblocks:not([dir=rtl]) pre, +.mce-visualblocks:not([dir=rtl]) figure, +.mce-visualblocks:not([dir=rtl]) figcaption, +.mce-visualblocks:not([dir=rtl]) hgroup, +.mce-visualblocks:not([dir=rtl]) aside, +.mce-visualblocks:not([dir=rtl]) ul, +.mce-visualblocks:not([dir=rtl]) ol, +.mce-visualblocks:not([dir=rtl]) dl { + margin-left: 3px; +} +.mce-visualblocks[dir=rtl] p, +.mce-visualblocks[dir=rtl] h1, +.mce-visualblocks[dir=rtl] h2, +.mce-visualblocks[dir=rtl] h3, +.mce-visualblocks[dir=rtl] h4, +.mce-visualblocks[dir=rtl] h5, +.mce-visualblocks[dir=rtl] h6, +.mce-visualblocks[dir=rtl] div:not([data-mce-bogus]), +.mce-visualblocks[dir=rtl] section, +.mce-visualblocks[dir=rtl] article, +.mce-visualblocks[dir=rtl] blockquote, +.mce-visualblocks[dir=rtl] address, +.mce-visualblocks[dir=rtl] pre, +.mce-visualblocks[dir=rtl] figure, +.mce-visualblocks[dir=rtl] figcaption, +.mce-visualblocks[dir=rtl] hgroup, +.mce-visualblocks[dir=rtl] aside, +.mce-visualblocks[dir=rtl] ul, +.mce-visualblocks[dir=rtl] ol, +.mce-visualblocks[dir=rtl] dl { + background-position-x: right; + margin-right: 3px; +} +.mce-nbsp, +.mce-shy { + background: #aaa; +} +.mce-shy::after { + content: '-'; +} +body { + font-family: sans-serif; +} +table { + border-collapse: collapse; +} diff --git a/public/resource/tinymce/skins/ui/jeecg/content.inline.css b/public/resource/tinymce/skins/ui/jeecg/content.inline.css new file mode 100644 index 0000000..9eebd5b --- /dev/null +++ b/public/resource/tinymce/skins/ui/jeecg/content.inline.css @@ -0,0 +1,705 @@ +/** +* Copyright (c) Tiny Technologies, Inc. All rights reserved. +* Licensed under the LGPL or a commercial license. +* For LGPL see License.txt in the project root for license information. +* For commercial licenses see https://www.tiny.cloud/ +*/ +.mce-content-body .mce-item-anchor { + background: transparent url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'8'%20height%3D'12'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'M0%200L8%200%208%2012%204.09117821%209%200%2012z'%2F%3E%3C%2Fsvg%3E%0A") no-repeat center; + cursor: default; + display: inline-block; + height: 12px !important; + padding: 0 2px; + -webkit-user-modify: read-only; + -moz-user-modify: read-only; + -webkit-user-select: all; + -ms-user-select: all; + user-select: all; + width: 8px !important; +} +.mce-content-body .mce-item-anchor[data-mce-selected] { + outline-offset: 1px; +} +.tox-comments-visible .tox-comment { + background-color: #fff0b7; +} +.tox-comments-visible .tox-comment--active { + background-color: #ffe168; +} +.tox-checklist > li:not(.tox-checklist--hidden) { + list-style: none; + margin: 0.25em 0; +} +.tox-checklist > li:not(.tox-checklist--hidden)::before { + content: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cg%20id%3D%22checklist-unchecked%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Crect%20id%3D%22Rectangle%22%20width%3D%2215%22%20height%3D%2215%22%20x%3D%22.5%22%20y%3D%22.5%22%20fill-rule%3D%22nonzero%22%20stroke%3D%22%234C4C4C%22%20rx%3D%222%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E%0A"); + cursor: pointer; + height: 1em; + margin-left: -1.5em; + margin-top: 0.125em; + position: absolute; + width: 1em; +} +.tox-checklist li:not(.tox-checklist--hidden).tox-checklist--checked::before { + content: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cg%20id%3D%22checklist-checked%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Crect%20id%3D%22Rectangle%22%20width%3D%2216%22%20height%3D%2216%22%20fill%3D%22%234099FF%22%20fill-rule%3D%22nonzero%22%20rx%3D%222%22%2F%3E%3Cpath%20id%3D%22Path%22%20fill%3D%22%23FFF%22%20fill-rule%3D%22nonzero%22%20d%3D%22M11.5703186%2C3.14417309%20C11.8516238%2C2.73724603%2012.4164781%2C2.62829933%2012.83558%2C2.89774797%20C13.260121%2C3.17069355%2013.3759736%2C3.72932262%2013.0909105%2C4.14168582%20L7.7580587%2C11.8560195%20C7.43776896%2C12.3193404%206.76483983%2C12.3852142%206.35607322%2C11.9948725%20L3.02491697%2C8.8138662%20C2.66090143%2C8.46625845%202.65798871%2C7.89594698%203.01850234%2C7.54483354%20C3.373942%2C7.19866177%203.94940006%2C7.19592841%204.30829608%2C7.5386474%20L6.85276923%2C9.9684299%20L11.5703186%2C3.14417309%20Z%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E%0A"); +} +[dir=rtl] .tox-checklist > li:not(.tox-checklist--hidden)::before { + margin-left: 0; + margin-right: -1.5em; +} +/* stylelint-disable */ +/* http://prismjs.com/ */ +/** + * prism.js default theme for JavaScript, CSS and HTML + * Based on dabblet (http://dabblet.com) + * @author Lea Verou + */ +code[class*="language-"], +pre[class*="language-"] { + color: black; + background: none; + text-shadow: 0 1px white; + font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; + font-size: 1em; + text-align: left; + white-space: pre; + word-spacing: normal; + word-break: normal; + word-wrap: normal; + line-height: 1.5; + -moz-tab-size: 4; + tab-size: 4; + -webkit-hyphens: none; + -ms-hyphens: none; + hyphens: none; +} +pre[class*="language-"]::selection, +pre[class*="language-"] ::selection, +code[class*="language-"]::selection, +code[class*="language-"] ::selection { + text-shadow: none; + background: #b3d4fc; +} +@media print { + code[class*="language-"], + pre[class*="language-"] { + text-shadow: none; + } +} +/* Code blocks */ +pre[class*="language-"] { + padding: 1em; + margin: 0.5em 0; + overflow: auto; +} +:not(pre) > code[class*="language-"], +pre[class*="language-"] { + background: #f5f2f0; +} +/* Inline code */ +:not(pre) > code[class*="language-"] { + padding: 0.1em; + border-radius: 0.3em; + white-space: normal; +} +.token.comment, +.token.prolog, +.token.doctype, +.token.cdata { + color: slategray; +} +.token.punctuation { + color: #999; +} +.namespace { + opacity: 0.7; +} +.token.property, +.token.tag, +.token.boolean, +.token.number, +.token.constant, +.token.symbol, +.token.deleted { + color: #905; +} +.token.selector, +.token.attr-name, +.token.string, +.token.char, +.token.builtin, +.token.inserted { + color: #690; +} +.token.operator, +.token.entity, +.token.url, +.language-css .token.string, +.style .token.string { + color: #9a6e3a; + background: hsla(0, 0%, 100%, 0.5); +} +.token.atrule, +.token.attr-value, +.token.keyword { + color: #07a; +} +.token.function, +.token.class-name { + color: #DD4A68; +} +.token.regex, +.token.important, +.token.variable { + color: #e90; +} +.token.important, +.token.bold { + font-weight: bold; +} +.token.italic { + font-style: italic; +} +.token.entity { + cursor: help; +} +/* stylelint-enable */ +.mce-content-body { + overflow-wrap: break-word; + word-wrap: break-word; +} +.mce-content-body .mce-visual-caret { + background-color: black; + background-color: currentColor; + position: absolute; +} +.mce-content-body .mce-visual-caret-hidden { + display: none; +} +.mce-content-body *[data-mce-caret] { + left: -1000px; + margin: 0; + padding: 0; + position: absolute; + right: auto; + top: 0; +} +.mce-content-body .mce-offscreen-selection { + left: -2000000px; + max-width: 1000000px; + position: absolute; +} +.mce-content-body *[contentEditable=false] { + cursor: default; +} +.mce-content-body *[contentEditable=true] { + cursor: text; +} +.tox-cursor-format-painter { + cursor: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%0A%20%20%3Cg%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M15%2C6%20C15%2C5.45%2014.55%2C5%2014%2C5%20L6%2C5%20C5.45%2C5%205%2C5.45%205%2C6%20L5%2C10%20C5%2C10.55%205.45%2C11%206%2C11%20L14%2C11%20C14.55%2C11%2015%2C10.55%2015%2C10%20L15%2C9%20L16%2C9%20L16%2C12%20L9%2C12%20L9%2C19%20C9%2C19.55%209.45%2C20%2010%2C20%20L11%2C20%20C11.55%2C20%2012%2C19.55%2012%2C19%20L12%2C14%20L18%2C14%20L18%2C7%20L15%2C7%20L15%2C6%20Z%22%2F%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M1%2C1%20L8.25%2C1%20C8.66421356%2C1%209%2C1.33578644%209%2C1.75%20L9%2C1.75%20C9%2C2.16421356%208.66421356%2C2.5%208.25%2C2.5%20L2.5%2C2.5%20L2.5%2C8.25%20C2.5%2C8.66421356%202.16421356%2C9%201.75%2C9%20L1.75%2C9%20C1.33578644%2C9%201%2C8.66421356%201%2C8.25%20L1%2C1%20Z%22%2F%3E%0A%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A"), default; +} +.mce-content-body figure.align-left { + float: left; +} +.mce-content-body figure.align-right { + float: right; +} +.mce-content-body figure.image.align-center { + display: table; + margin-left: auto; + margin-right: auto; +} +.mce-preview-object { + border: 1px solid gray; + display: inline-block; + line-height: 0; + margin: 0 2px 0 2px; + position: relative; +} +.mce-preview-object .mce-shim { + background: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7); + height: 100%; + left: 0; + position: absolute; + top: 0; + width: 100%; +} +.mce-preview-object[data-mce-selected="2"] .mce-shim { + display: none; +} +.mce-object { + background: transparent url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M4%203h16a1%201%200%200%201%201%201v16a1%201%200%200%201-1%201H4a1%201%200%200%201-1-1V4a1%201%200%200%201%201-1zm1%202v14h14V5H5zm4.79%202.565l5.64%204.028a.5.5%200%200%201%200%20.814l-5.64%204.028a.5.5%200%200%201-.79-.407V7.972a.5.5%200%200%201%20.79-.407z%22%2F%3E%3C%2Fsvg%3E%0A") no-repeat center; + border: 1px dashed #aaa; +} +.mce-pagebreak { + border: 1px dashed #aaa; + cursor: default; + display: block; + height: 5px; + margin-top: 15px; + page-break-before: always; + width: 100%; +} +@media print { + .mce-pagebreak { + border: 0; + } +} +.tiny-pageembed .mce-shim { + background: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7); + height: 100%; + left: 0; + position: absolute; + top: 0; + width: 100%; +} +.tiny-pageembed[data-mce-selected="2"] .mce-shim { + display: none; +} +.tiny-pageembed { + display: inline-block; + position: relative; +} +.tiny-pageembed--21by9, +.tiny-pageembed--16by9, +.tiny-pageembed--4by3, +.tiny-pageembed--1by1 { + display: block; + overflow: hidden; + padding: 0; + position: relative; + width: 100%; +} +.tiny-pageembed--21by9 { + padding-top: 42.857143%; +} +.tiny-pageembed--16by9 { + padding-top: 56.25%; +} +.tiny-pageembed--4by3 { + padding-top: 75%; +} +.tiny-pageembed--1by1 { + padding-top: 100%; +} +.tiny-pageembed--21by9 iframe, +.tiny-pageembed--16by9 iframe, +.tiny-pageembed--4by3 iframe, +.tiny-pageembed--1by1 iframe { + border: 0; + height: 100%; + left: 0; + position: absolute; + top: 0; + width: 100%; +} +.mce-content-body[data-mce-placeholder] { + position: relative; +} +.mce-content-body[data-mce-placeholder]:not(.mce-visualblocks)::before { + color: rgba(84, 111, 94, 0.7); + content: attr(data-mce-placeholder); + position: absolute; +} +.mce-content-body:not([dir=rtl])[data-mce-placeholder]:not(.mce-visualblocks)::before { + left: 1px; +} +.mce-content-body[dir=rtl][data-mce-placeholder]:not(.mce-visualblocks)::before { + right: 1px; +} +.mce-content-body div.mce-resizehandle { + background-color: #4099ff; + border-color: #4099ff; + border-style: solid; + border-width: 1px; + box-sizing: border-box; + height: 10px; + position: absolute; + width: 10px; + z-index: 10000; +} +.mce-content-body div.mce-resizehandle:hover { + background-color: #4099ff; +} +.mce-content-body div.mce-resizehandle:nth-of-type(1) { + cursor: nwse-resize; +} +.mce-content-body div.mce-resizehandle:nth-of-type(2) { + cursor: nesw-resize; +} +.mce-content-body div.mce-resizehandle:nth-of-type(3) { + cursor: nwse-resize; +} +.mce-content-body div.mce-resizehandle:nth-of-type(4) { + cursor: nesw-resize; +} +.mce-content-body .mce-resize-backdrop { + z-index: 10000; +} +.mce-content-body .mce-clonedresizable { + cursor: default; + opacity: 0.5; + outline: 1px dashed black; + position: absolute; + z-index: 10001; +} +.mce-content-body .mce-clonedresizable.mce-resizetable-columns th, +.mce-content-body .mce-clonedresizable.mce-resizetable-columns td { + border: 0; +} +.mce-content-body .mce-resize-helper { + background: #555; + background: rgba(0, 0, 0, 0.75); + border: 1px; + border-radius: 3px; + color: white; + display: none; + font-family: sans-serif; + font-size: 12px; + line-height: 14px; + margin: 5px 10px; + padding: 5px; + position: absolute; + white-space: nowrap; + z-index: 10002; +} +.tox-rtc-user-selection { + position: relative; +} +.tox-rtc-user-cursor { + bottom: 0; + cursor: default; + position: absolute; + top: 0; + width: 2px; +} +.tox-rtc-user-cursor::before { + background-color: inherit; + border-radius: 50%; + content: ''; + display: block; + height: 8px; + position: absolute; + right: -3px; + top: -3px; + width: 8px; +} +.tox-rtc-user-cursor:hover::after { + background-color: inherit; + border-radius: 100px; + box-sizing: border-box; + color: #fff; + content: attr(data-user); + display: block; + font-size: 12px; + font-weight: normal; + left: -5px; + min-height: 8px; + min-width: 8px; + padding: 0 12px; + position: absolute; + top: -11px; + white-space: nowrap; + z-index: 1000; +} +.tox-rtc-user-selection--1 .tox-rtc-user-cursor { + background-color: #2dc26b; +} +.tox-rtc-user-selection--2 .tox-rtc-user-cursor { + background-color: #e03e2d; +} +.tox-rtc-user-selection--3 .tox-rtc-user-cursor { + background-color: #f1c40f; +} +.tox-rtc-user-selection--4 .tox-rtc-user-cursor { + background-color: #3598db; +} +.tox-rtc-user-selection--5 .tox-rtc-user-cursor { + background-color: #b96ad9; +} +.tox-rtc-user-selection--6 .tox-rtc-user-cursor { + background-color: #e67e23; +} +.tox-rtc-user-selection--7 .tox-rtc-user-cursor { + background-color: #aaa69d; +} +.tox-rtc-user-selection--8 .tox-rtc-user-cursor { + background-color: #f368e0; +} +.tox-rtc-remote-image { + background: #eaeaea url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%2236%22%20height%3D%2212%22%20viewBox%3D%220%200%2036%2012%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%3Ccircle%20cx%3D%226%22%20cy%3D%226%22%20r%3D%223%22%20fill%3D%22rgba(0%2C%200%2C%200%2C%20.2)%22%3E%0A%20%20%20%20%3Canimate%20attributeName%3D%22r%22%20values%3D%223%3B5%3B3%22%20calcMode%3D%22linear%22%20dur%3D%221s%22%20repeatCount%3D%22indefinite%22%20%2F%3E%0A%20%20%3C%2Fcircle%3E%0A%20%20%3Ccircle%20cx%3D%2218%22%20cy%3D%226%22%20r%3D%223%22%20fill%3D%22rgba(0%2C%200%2C%200%2C%20.2)%22%3E%0A%20%20%20%20%3Canimate%20attributeName%3D%22r%22%20values%3D%223%3B5%3B3%22%20calcMode%3D%22linear%22%20begin%3D%22.33s%22%20dur%3D%221s%22%20repeatCount%3D%22indefinite%22%20%2F%3E%0A%20%20%3C%2Fcircle%3E%0A%20%20%3Ccircle%20cx%3D%2230%22%20cy%3D%226%22%20r%3D%223%22%20fill%3D%22rgba(0%2C%200%2C%200%2C%20.2)%22%3E%0A%20%20%20%20%3Canimate%20attributeName%3D%22r%22%20values%3D%223%3B5%3B3%22%20calcMode%3D%22linear%22%20begin%3D%22.66s%22%20dur%3D%221s%22%20repeatCount%3D%22indefinite%22%20%2F%3E%0A%20%20%3C%2Fcircle%3E%0A%3C%2Fsvg%3E%0A") no-repeat center center; + border: 1px solid #ccc; + min-height: 240px; + min-width: 320px; +} +.mce-match-marker { + background: #aaa; + color: #fff; +} +.mce-match-marker-selected { + background: #39f; + color: #fff; +} +.mce-match-marker-selected::selection { + background: #39f; + color: #fff; +} +.mce-content-body img[data-mce-selected], +.mce-content-body video[data-mce-selected], +.mce-content-body audio[data-mce-selected], +.mce-content-body object[data-mce-selected], +.mce-content-body embed[data-mce-selected], +.mce-content-body table[data-mce-selected] { + outline: 3px solid #b4d7ff; +} +.mce-content-body hr[data-mce-selected] { + outline: 3px solid #b4d7ff; + outline-offset: 1px; +} +.mce-content-body *[contentEditable=false] *[contentEditable=true]:focus { + outline: 3px solid #b4d7ff; +} +.mce-content-body *[contentEditable=false] *[contentEditable=true]:hover { + outline: 3px solid #b4d7ff; +} +.mce-content-body *[contentEditable=false][data-mce-selected] { + cursor: not-allowed; + outline: 3px solid #b4d7ff; +} +.mce-content-body.mce-content-readonly *[contentEditable=true]:focus, +.mce-content-body.mce-content-readonly *[contentEditable=true]:hover { + outline: none; +} +.mce-content-body *[data-mce-selected="inline-boundary"] { + background-color: #b4d7ff; +} +.mce-content-body .mce-edit-focus { + outline: 3px solid #b4d7ff; +} +.mce-content-body td[data-mce-selected], +.mce-content-body th[data-mce-selected] { + position: relative; +} +.mce-content-body td[data-mce-selected]::selection, +.mce-content-body th[data-mce-selected]::selection { + background: none; +} +.mce-content-body td[data-mce-selected] *, +.mce-content-body th[data-mce-selected] * { + outline: none; + -webkit-touch-callout: none; + -webkit-user-select: none; + -ms-user-select: none; + user-select: none; +} +.mce-content-body td[data-mce-selected]::after, +.mce-content-body th[data-mce-selected]::after { + background-color: rgba(180, 215, 255, 0.7); + border: 1px solid rgba(180, 215, 255, 0.7); + bottom: -1px; + content: ''; + left: -1px; + mix-blend-mode: multiply; + position: absolute; + right: -1px; + top: -1px; +} +@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) { + .mce-content-body td[data-mce-selected]::after, + .mce-content-body th[data-mce-selected]::after { + border-color: rgba(0, 84, 180, 0.7); + } +} +.mce-content-body img::selection { + background: none; +} +.ephox-snooker-resizer-bar { + background-color: #b4d7ff; + opacity: 0; + -webkit-user-select: none; + -ms-user-select: none; + user-select: none; +} +.ephox-snooker-resizer-cols { + cursor: col-resize; +} +.ephox-snooker-resizer-rows { + cursor: row-resize; +} +.ephox-snooker-resizer-bar.ephox-snooker-resizer-bar-dragging { + opacity: 1; +} +.mce-spellchecker-word { + background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'4'%20height%3D'4'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20stroke%3D'%23ff0000'%20fill%3D'none'%20stroke-linecap%3D'round'%20stroke-opacity%3D'.75'%20d%3D'M0%203L2%201%204%203'%2F%3E%3C%2Fsvg%3E%0A"); + background-position: 0 calc(100% + 1px); + background-repeat: repeat-x; + background-size: auto 6px; + cursor: default; + height: 2rem; +} +.mce-spellchecker-grammar { + background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'4'%20height%3D'4'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20stroke%3D'%2300A835'%20fill%3D'none'%20stroke-linecap%3D'round'%20d%3D'M0%203L2%201%204%203'%2F%3E%3C%2Fsvg%3E%0A"); + background-position: 0 calc(100% + 1px); + background-repeat: repeat-x; + background-size: auto 6px; + cursor: default; +} +.mce-toc { + border: 1px solid gray; +} +.mce-toc h2 { + margin: 4px; +} +.mce-toc li { + list-style-type: none; +} +table[style*="border-width: 0px"], +.mce-item-table:not([border]), +.mce-item-table[border="0"], +table[style*="border-width: 0px"] td, +.mce-item-table:not([border]) td, +.mce-item-table[border="0"] td, +table[style*="border-width: 0px"] th, +.mce-item-table:not([border]) th, +.mce-item-table[border="0"] th, +table[style*="border-width: 0px"] caption, +.mce-item-table:not([border]) caption, +.mce-item-table[border="0"] caption { + border: 1px dashed #bbb; +} +.mce-visualblocks p, +.mce-visualblocks h1, +.mce-visualblocks h2, +.mce-visualblocks h3, +.mce-visualblocks h4, +.mce-visualblocks h5, +.mce-visualblocks h6, +.mce-visualblocks div:not([data-mce-bogus]), +.mce-visualblocks section, +.mce-visualblocks article, +.mce-visualblocks blockquote, +.mce-visualblocks address, +.mce-visualblocks pre, +.mce-visualblocks figure, +.mce-visualblocks figcaption, +.mce-visualblocks hgroup, +.mce-visualblocks aside, +.mce-visualblocks ul, +.mce-visualblocks ol, +.mce-visualblocks dl { + background-repeat: no-repeat; + border: 1px dashed #bbb; + margin-left: 3px; + padding-top: 10px; +} +.mce-visualblocks p { + background-image: url(data:image/gif;base64,R0lGODlhCQAJAJEAAAAAAP///7u7u////yH5BAEAAAMALAAAAAAJAAkAAAIQnG+CqCN/mlyvsRUpThG6AgA7); +} +.mce-visualblocks h1 { + background-image: url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGu1JuxHoAfRNRW3TWXyF2YiRUAOw==); +} +.mce-visualblocks h2 { + background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8Hybbx4oOuqgTynJd6bGlWg3DkJzoaUAAAOw==); +} +.mce-visualblocks h3 { + background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIZjI8Hybbx4oOuqgTynJf2Ln2NOHpQpmhAAQA7); +} +.mce-visualblocks h4 { + background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxInR0zqeAdhtJlXwV1oCll2HaWgAAOw==); +} +.mce-visualblocks h5 { + background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjane4iq5GlW05GgIkIZUAAAOw==); +} +.mce-visualblocks h6 { + background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjan04jep1iZ1XRlAo5bVgAAOw==); +} +.mce-visualblocks div:not([data-mce-bogus]) { + background-image: url(data:image/gif;base64,R0lGODlhEgAKAIABALu7u////yH5BAEAAAEALAAAAAASAAoAAAIfjI9poI0cgDywrhuxfbrzDEbQM2Ei5aRjmoySW4pAAQA7); +} +.mce-visualblocks section { + background-image: url(data:image/gif;base64,R0lGODlhKAAKAIABALu7u////yH5BAEAAAEALAAAAAAoAAoAAAI5jI+pywcNY3sBWHdNrplytD2ellDeSVbp+GmWqaDqDMepc8t17Y4vBsK5hDyJMcI6KkuYU+jpjLoKADs=); +} +.mce-visualblocks article { + background-image: url(data:image/gif;base64,R0lGODlhKgAKAIABALu7u////yH5BAEAAAEALAAAAAAqAAoAAAI6jI+pywkNY3wG0GBvrsd2tXGYSGnfiF7ikpXemTpOiJScasYoDJJrjsG9gkCJ0ag6KhmaIe3pjDYBBQA7); +} +.mce-visualblocks blockquote { + background-image: url(data:image/gif;base64,R0lGODlhPgAKAIABALu7u////yH5BAEAAAEALAAAAAA+AAoAAAJPjI+py+0Knpz0xQDyuUhvfoGgIX5iSKZYgq5uNL5q69asZ8s5rrf0yZmpNkJZzFesBTu8TOlDVAabUyatguVhWduud3EyiUk45xhTTgMBBQA7); +} +.mce-visualblocks address { + background-image: url(data:image/gif;base64,R0lGODlhLQAKAIABALu7u////yH5BAEAAAEALAAAAAAtAAoAAAI/jI+pywwNozSP1gDyyZcjb3UaRpXkWaXmZW4OqKLhBmLs+K263DkJK7OJeifh7FicKD9A1/IpGdKkyFpNmCkAADs=); +} +.mce-visualblocks pre { + background-image: url(data:image/gif;base64,R0lGODlhFQAKAIABALu7uwAAACH5BAEAAAEALAAAAAAVAAoAAAIjjI+ZoN0cgDwSmnpz1NCueYERhnibZVKLNnbOq8IvKpJtVQAAOw==); +} +.mce-visualblocks figure { + background-image: url(data:image/gif;base64,R0lGODlhJAAKAIAAALu7u////yH5BAEAAAEALAAAAAAkAAoAAAI0jI+py+2fwAHUSFvD3RlvG4HIp4nX5JFSpnZUJ6LlrM52OE7uSWosBHScgkSZj7dDKnWAAgA7); +} +.mce-visualblocks figcaption { + border: 1px dashed #bbb; +} +.mce-visualblocks hgroup { + background-image: url(data:image/gif;base64,R0lGODlhJwAKAIABALu7uwAAACH5BAEAAAEALAAAAAAnAAoAAAI3jI+pywYNI3uB0gpsRtt5fFnfNZaVSYJil4Wo03Hv6Z62uOCgiXH1kZIIJ8NiIxRrAZNMZAtQAAA7); +} +.mce-visualblocks aside { + background-image: url(data:image/gif;base64,R0lGODlhHgAKAIABAKqqqv///yH5BAEAAAEALAAAAAAeAAoAAAItjI+pG8APjZOTzgtqy7I3f1yehmQcFY4WKZbqByutmW4aHUd6vfcVbgudgpYCADs=); +} +.mce-visualblocks ul { + background-image: url(data:image/gif;base64,R0lGODlhDQAKAIAAALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGuYnqUVSjvw26DzzXiqIDlVwAAOw==); +} +.mce-visualblocks ol { + background-image: url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybH6HHt0qourxC6CvzXieHyeWQAAOw==); +} +.mce-visualblocks dl { + background-image: url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybEOnmOvUoWznTqeuEjNSCqeGRUAOw==); +} +.mce-visualblocks:not([dir=rtl]) p, +.mce-visualblocks:not([dir=rtl]) h1, +.mce-visualblocks:not([dir=rtl]) h2, +.mce-visualblocks:not([dir=rtl]) h3, +.mce-visualblocks:not([dir=rtl]) h4, +.mce-visualblocks:not([dir=rtl]) h5, +.mce-visualblocks:not([dir=rtl]) h6, +.mce-visualblocks:not([dir=rtl]) div:not([data-mce-bogus]), +.mce-visualblocks:not([dir=rtl]) section, +.mce-visualblocks:not([dir=rtl]) article, +.mce-visualblocks:not([dir=rtl]) blockquote, +.mce-visualblocks:not([dir=rtl]) address, +.mce-visualblocks:not([dir=rtl]) pre, +.mce-visualblocks:not([dir=rtl]) figure, +.mce-visualblocks:not([dir=rtl]) figcaption, +.mce-visualblocks:not([dir=rtl]) hgroup, +.mce-visualblocks:not([dir=rtl]) aside, +.mce-visualblocks:not([dir=rtl]) ul, +.mce-visualblocks:not([dir=rtl]) ol, +.mce-visualblocks:not([dir=rtl]) dl { + margin-left: 3px; +} +.mce-visualblocks[dir=rtl] p, +.mce-visualblocks[dir=rtl] h1, +.mce-visualblocks[dir=rtl] h2, +.mce-visualblocks[dir=rtl] h3, +.mce-visualblocks[dir=rtl] h4, +.mce-visualblocks[dir=rtl] h5, +.mce-visualblocks[dir=rtl] h6, +.mce-visualblocks[dir=rtl] div:not([data-mce-bogus]), +.mce-visualblocks[dir=rtl] section, +.mce-visualblocks[dir=rtl] article, +.mce-visualblocks[dir=rtl] blockquote, +.mce-visualblocks[dir=rtl] address, +.mce-visualblocks[dir=rtl] pre, +.mce-visualblocks[dir=rtl] figure, +.mce-visualblocks[dir=rtl] figcaption, +.mce-visualblocks[dir=rtl] hgroup, +.mce-visualblocks[dir=rtl] aside, +.mce-visualblocks[dir=rtl] ul, +.mce-visualblocks[dir=rtl] ol, +.mce-visualblocks[dir=rtl] dl { + background-position-x: right; + margin-right: 3px; +} +.mce-nbsp, +.mce-shy { + background: #aaa; +} +.mce-shy::after { + content: '-'; +} diff --git a/public/resource/tinymce/skins/ui/jeecg/content.inline.min.css b/public/resource/tinymce/skins/ui/jeecg/content.inline.min.css new file mode 100644 index 0000000..9acf095 --- /dev/null +++ b/public/resource/tinymce/skins/ui/jeecg/content.inline.min.css @@ -0,0 +1,7 @@ +/** +* Copyright (c) Tiny Technologies, Inc. All rights reserved. +* Licensed under the LGPL or a commercial license. +* For LGPL see License.txt in the project root for license information. +* For commercial licenses see https://www.tiny.cloud/ +*/ +.mce-content-body .mce-item-anchor{background:transparent url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'8'%20height%3D'12'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'M0%200L8%200%208%2012%204.09117821%209%200%2012z'%2F%3E%3C%2Fsvg%3E%0A") no-repeat center;cursor:default;display:inline-block;height:12px!important;padding:0 2px;-webkit-user-modify:read-only;-moz-user-modify:read-only;-webkit-user-select:all;-ms-user-select:all;user-select:all;width:8px!important}.mce-content-body .mce-item-anchor[data-mce-selected]{outline-offset:1px}.tox-comments-visible .tox-comment{background-color:#fff0b7}.tox-comments-visible .tox-comment--active{background-color:#ffe168}.tox-checklist>li:not(.tox-checklist--hidden){list-style:none;margin:.25em 0}.tox-checklist>li:not(.tox-checklist--hidden)::before{content:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cg%20id%3D%22checklist-unchecked%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Crect%20id%3D%22Rectangle%22%20width%3D%2215%22%20height%3D%2215%22%20x%3D%22.5%22%20y%3D%22.5%22%20fill-rule%3D%22nonzero%22%20stroke%3D%22%234C4C4C%22%20rx%3D%222%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E%0A");cursor:pointer;height:1em;margin-left:-1.5em;margin-top:.125em;position:absolute;width:1em}.tox-checklist li:not(.tox-checklist--hidden).tox-checklist--checked::before{content:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cg%20id%3D%22checklist-checked%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Crect%20id%3D%22Rectangle%22%20width%3D%2216%22%20height%3D%2216%22%20fill%3D%22%234099FF%22%20fill-rule%3D%22nonzero%22%20rx%3D%222%22%2F%3E%3Cpath%20id%3D%22Path%22%20fill%3D%22%23FFF%22%20fill-rule%3D%22nonzero%22%20d%3D%22M11.5703186%2C3.14417309%20C11.8516238%2C2.73724603%2012.4164781%2C2.62829933%2012.83558%2C2.89774797%20C13.260121%2C3.17069355%2013.3759736%2C3.72932262%2013.0909105%2C4.14168582%20L7.7580587%2C11.8560195%20C7.43776896%2C12.3193404%206.76483983%2C12.3852142%206.35607322%2C11.9948725%20L3.02491697%2C8.8138662%20C2.66090143%2C8.46625845%202.65798871%2C7.89594698%203.01850234%2C7.54483354%20C3.373942%2C7.19866177%203.94940006%2C7.19592841%204.30829608%2C7.5386474%20L6.85276923%2C9.9684299%20L11.5703186%2C3.14417309%20Z%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E%0A")}[dir=rtl] .tox-checklist>li:not(.tox-checklist--hidden)::before{margin-left:0;margin-right:-1.5em}code[class*=language-],pre[class*=language-]{color:#000;background:0 0;text-shadow:0 1px #fff;font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;tab-size:4;-webkit-hyphens:none;-ms-hyphens:none;hyphens:none}code[class*=language-] ::selection,code[class*=language-]::selection,pre[class*=language-] ::selection,pre[class*=language-]::selection{text-shadow:none;background:#b3d4fc}@media print{code[class*=language-],pre[class*=language-]{text-shadow:none}}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto}:not(pre)>code[class*=language-],pre[class*=language-]{background:#f5f2f0}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#708090}.token.punctuation{color:#999}.namespace{opacity:.7}.token.boolean,.token.constant,.token.deleted,.token.number,.token.property,.token.symbol,.token.tag{color:#905}.token.attr-name,.token.builtin,.token.char,.token.inserted,.token.selector,.token.string{color:#690}.language-css .token.string,.style .token.string,.token.entity,.token.operator,.token.url{color:#9a6e3a;background:hsla(0,0%,100%,.5)}.token.atrule,.token.attr-value,.token.keyword{color:#07a}.token.class-name,.token.function{color:#dd4a68}.token.important,.token.regex,.token.variable{color:#e90}.token.bold,.token.important{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help}.mce-content-body{overflow-wrap:break-word;word-wrap:break-word}.mce-content-body .mce-visual-caret{background-color:#000;background-color:currentColor;position:absolute}.mce-content-body .mce-visual-caret-hidden{display:none}.mce-content-body [data-mce-caret]{left:-1000px;margin:0;padding:0;position:absolute;right:auto;top:0}.mce-content-body .mce-offscreen-selection{left:-2000000px;max-width:1000000px;position:absolute}.mce-content-body [contentEditable=false]{cursor:default}.mce-content-body [contentEditable=true]{cursor:text}.tox-cursor-format-painter{cursor:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%0A%20%20%3Cg%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M15%2C6%20C15%2C5.45%2014.55%2C5%2014%2C5%20L6%2C5%20C5.45%2C5%205%2C5.45%205%2C6%20L5%2C10%20C5%2C10.55%205.45%2C11%206%2C11%20L14%2C11%20C14.55%2C11%2015%2C10.55%2015%2C10%20L15%2C9%20L16%2C9%20L16%2C12%20L9%2C12%20L9%2C19%20C9%2C19.55%209.45%2C20%2010%2C20%20L11%2C20%20C11.55%2C20%2012%2C19.55%2012%2C19%20L12%2C14%20L18%2C14%20L18%2C7%20L15%2C7%20L15%2C6%20Z%22%2F%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M1%2C1%20L8.25%2C1%20C8.66421356%2C1%209%2C1.33578644%209%2C1.75%20L9%2C1.75%20C9%2C2.16421356%208.66421356%2C2.5%208.25%2C2.5%20L2.5%2C2.5%20L2.5%2C8.25%20C2.5%2C8.66421356%202.16421356%2C9%201.75%2C9%20L1.75%2C9%20C1.33578644%2C9%201%2C8.66421356%201%2C8.25%20L1%2C1%20Z%22%2F%3E%0A%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A"),default}.mce-content-body figure.align-left{float:left}.mce-content-body figure.align-right{float:right}.mce-content-body figure.image.align-center{display:table;margin-left:auto;margin-right:auto}.mce-preview-object{border:1px solid gray;display:inline-block;line-height:0;margin:0 2px 0 2px;position:relative}.mce-preview-object .mce-shim{background:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7);height:100%;left:0;position:absolute;top:0;width:100%}.mce-preview-object[data-mce-selected="2"] .mce-shim{display:none}.mce-object{background:transparent url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M4%203h16a1%201%200%200%201%201%201v16a1%201%200%200%201-1%201H4a1%201%200%200%201-1-1V4a1%201%200%200%201%201-1zm1%202v14h14V5H5zm4.79%202.565l5.64%204.028a.5.5%200%200%201%200%20.814l-5.64%204.028a.5.5%200%200%201-.79-.407V7.972a.5.5%200%200%201%20.79-.407z%22%2F%3E%3C%2Fsvg%3E%0A") no-repeat center;border:1px dashed #aaa}.mce-pagebreak{border:1px dashed #aaa;cursor:default;display:block;height:5px;margin-top:15px;page-break-before:always;width:100%}@media print{.mce-pagebreak{border:0}}.tiny-pageembed .mce-shim{background:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7);height:100%;left:0;position:absolute;top:0;width:100%}.tiny-pageembed[data-mce-selected="2"] .mce-shim{display:none}.tiny-pageembed{display:inline-block;position:relative}.tiny-pageembed--16by9,.tiny-pageembed--1by1,.tiny-pageembed--21by9,.tiny-pageembed--4by3{display:block;overflow:hidden;padding:0;position:relative;width:100%}.tiny-pageembed--21by9{padding-top:42.857143%}.tiny-pageembed--16by9{padding-top:56.25%}.tiny-pageembed--4by3{padding-top:75%}.tiny-pageembed--1by1{padding-top:100%}.tiny-pageembed--16by9 iframe,.tiny-pageembed--1by1 iframe,.tiny-pageembed--21by9 iframe,.tiny-pageembed--4by3 iframe{border:0;height:100%;left:0;position:absolute;top:0;width:100%}.mce-content-body[data-mce-placeholder]{position:relative}.mce-content-body[data-mce-placeholder]:not(.mce-visualblocks)::before{color:rgba(84,111,94,.7);content:attr(data-mce-placeholder);position:absolute}.mce-content-body:not([dir=rtl])[data-mce-placeholder]:not(.mce-visualblocks)::before{left:1px}.mce-content-body[dir=rtl][data-mce-placeholder]:not(.mce-visualblocks)::before{right:1px}.mce-content-body div.mce-resizehandle{background-color:#4099ff;border-color:#4099ff;border-style:solid;border-width:1px;box-sizing:border-box;height:10px;position:absolute;width:10px;z-index:10000}.mce-content-body div.mce-resizehandle:hover{background-color:#4099ff}.mce-content-body div.mce-resizehandle:nth-of-type(1){cursor:nwse-resize}.mce-content-body div.mce-resizehandle:nth-of-type(2){cursor:nesw-resize}.mce-content-body div.mce-resizehandle:nth-of-type(3){cursor:nwse-resize}.mce-content-body div.mce-resizehandle:nth-of-type(4){cursor:nesw-resize}.mce-content-body .mce-resize-backdrop{z-index:10000}.mce-content-body .mce-clonedresizable{cursor:default;opacity:.5;outline:1px dashed #000;position:absolute;z-index:10001}.mce-content-body .mce-clonedresizable.mce-resizetable-columns td,.mce-content-body .mce-clonedresizable.mce-resizetable-columns th{border:0}.mce-content-body .mce-resize-helper{background:#555;background:rgba(0,0,0,.75);border:1px;border-radius:3px;color:#fff;display:none;font-family:sans-serif;font-size:12px;line-height:14px;margin:5px 10px;padding:5px;position:absolute;white-space:nowrap;z-index:10002}.tox-rtc-user-selection{position:relative}.tox-rtc-user-cursor{bottom:0;cursor:default;position:absolute;top:0;width:2px}.tox-rtc-user-cursor::before{background-color:inherit;border-radius:50%;content:'';display:block;height:8px;position:absolute;right:-3px;top:-3px;width:8px}.tox-rtc-user-cursor:hover::after{background-color:inherit;border-radius:100px;box-sizing:border-box;color:#fff;content:attr(data-user);display:block;font-size:12px;font-weight:400;left:-5px;min-height:8px;min-width:8px;padding:0 12px;position:absolute;top:-11px;white-space:nowrap;z-index:1000}.tox-rtc-user-selection--1 .tox-rtc-user-cursor{background-color:#2dc26b}.tox-rtc-user-selection--2 .tox-rtc-user-cursor{background-color:#e03e2d}.tox-rtc-user-selection--3 .tox-rtc-user-cursor{background-color:#f1c40f}.tox-rtc-user-selection--4 .tox-rtc-user-cursor{background-color:#3598db}.tox-rtc-user-selection--5 .tox-rtc-user-cursor{background-color:#b96ad9}.tox-rtc-user-selection--6 .tox-rtc-user-cursor{background-color:#e67e23}.tox-rtc-user-selection--7 .tox-rtc-user-cursor{background-color:#aaa69d}.tox-rtc-user-selection--8 .tox-rtc-user-cursor{background-color:#f368e0}.tox-rtc-remote-image{background:#eaeaea url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%2236%22%20height%3D%2212%22%20viewBox%3D%220%200%2036%2012%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%3Ccircle%20cx%3D%226%22%20cy%3D%226%22%20r%3D%223%22%20fill%3D%22rgba(0%2C%200%2C%200%2C%20.2)%22%3E%0A%20%20%20%20%3Canimate%20attributeName%3D%22r%22%20values%3D%223%3B5%3B3%22%20calcMode%3D%22linear%22%20dur%3D%221s%22%20repeatCount%3D%22indefinite%22%20%2F%3E%0A%20%20%3C%2Fcircle%3E%0A%20%20%3Ccircle%20cx%3D%2218%22%20cy%3D%226%22%20r%3D%223%22%20fill%3D%22rgba(0%2C%200%2C%200%2C%20.2)%22%3E%0A%20%20%20%20%3Canimate%20attributeName%3D%22r%22%20values%3D%223%3B5%3B3%22%20calcMode%3D%22linear%22%20begin%3D%22.33s%22%20dur%3D%221s%22%20repeatCount%3D%22indefinite%22%20%2F%3E%0A%20%20%3C%2Fcircle%3E%0A%20%20%3Ccircle%20cx%3D%2230%22%20cy%3D%226%22%20r%3D%223%22%20fill%3D%22rgba(0%2C%200%2C%200%2C%20.2)%22%3E%0A%20%20%20%20%3Canimate%20attributeName%3D%22r%22%20values%3D%223%3B5%3B3%22%20calcMode%3D%22linear%22%20begin%3D%22.66s%22%20dur%3D%221s%22%20repeatCount%3D%22indefinite%22%20%2F%3E%0A%20%20%3C%2Fcircle%3E%0A%3C%2Fsvg%3E%0A") no-repeat center center;border:1px solid #ccc;min-height:240px;min-width:320px}.mce-match-marker{background:#aaa;color:#fff}.mce-match-marker-selected{background:#39f;color:#fff}.mce-match-marker-selected::selection{background:#39f;color:#fff}.mce-content-body audio[data-mce-selected],.mce-content-body embed[data-mce-selected],.mce-content-body img[data-mce-selected],.mce-content-body object[data-mce-selected],.mce-content-body table[data-mce-selected],.mce-content-body video[data-mce-selected]{outline:3px solid #b4d7ff}.mce-content-body hr[data-mce-selected]{outline:3px solid #b4d7ff;outline-offset:1px}.mce-content-body [contentEditable=false] [contentEditable=true]:focus{outline:3px solid #b4d7ff}.mce-content-body [contentEditable=false] [contentEditable=true]:hover{outline:3px solid #b4d7ff}.mce-content-body [contentEditable=false][data-mce-selected]{cursor:not-allowed;outline:3px solid #b4d7ff}.mce-content-body.mce-content-readonly [contentEditable=true]:focus,.mce-content-body.mce-content-readonly [contentEditable=true]:hover{outline:0}.mce-content-body [data-mce-selected=inline-boundary]{background-color:#b4d7ff}.mce-content-body .mce-edit-focus{outline:3px solid #b4d7ff}.mce-content-body td[data-mce-selected],.mce-content-body th[data-mce-selected]{position:relative}.mce-content-body td[data-mce-selected]::selection,.mce-content-body th[data-mce-selected]::selection{background:0 0}.mce-content-body td[data-mce-selected] *,.mce-content-body th[data-mce-selected] *{outline:0;-webkit-touch-callout:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.mce-content-body td[data-mce-selected]::after,.mce-content-body th[data-mce-selected]::after{background-color:rgba(180,215,255,.7);border:1px solid rgba(180,215,255,.7);bottom:-1px;content:'';left:-1px;mix-blend-mode:multiply;position:absolute;right:-1px;top:-1px}@media screen and (-ms-high-contrast:active),(-ms-high-contrast:none){.mce-content-body td[data-mce-selected]::after,.mce-content-body th[data-mce-selected]::after{border-color:rgba(0,84,180,.7)}}.mce-content-body img::selection{background:0 0}.ephox-snooker-resizer-bar{background-color:#b4d7ff;opacity:0;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ephox-snooker-resizer-cols{cursor:col-resize}.ephox-snooker-resizer-rows{cursor:row-resize}.ephox-snooker-resizer-bar.ephox-snooker-resizer-bar-dragging{opacity:1}.mce-spellchecker-word{background-image:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'4'%20height%3D'4'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20stroke%3D'%23ff0000'%20fill%3D'none'%20stroke-linecap%3D'round'%20stroke-opacity%3D'.75'%20d%3D'M0%203L2%201%204%203'%2F%3E%3C%2Fsvg%3E%0A");background-position:0 calc(100% + 1px);background-repeat:repeat-x;background-size:auto 6px;cursor:default;height:2rem}.mce-spellchecker-grammar{background-image:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'4'%20height%3D'4'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20stroke%3D'%2300A835'%20fill%3D'none'%20stroke-linecap%3D'round'%20d%3D'M0%203L2%201%204%203'%2F%3E%3C%2Fsvg%3E%0A");background-position:0 calc(100% + 1px);background-repeat:repeat-x;background-size:auto 6px;cursor:default}.mce-toc{border:1px solid gray}.mce-toc h2{margin:4px}.mce-toc li{list-style-type:none}.mce-item-table:not([border]),.mce-item-table:not([border]) caption,.mce-item-table:not([border]) td,.mce-item-table:not([border]) th,.mce-item-table[border="0"],.mce-item-table[border="0"] caption,.mce-item-table[border="0"] td,.mce-item-table[border="0"] th,table[style*="border-width: 0px"],table[style*="border-width: 0px"] caption,table[style*="border-width: 0px"] td,table[style*="border-width: 0px"] th{border:1px dashed #bbb}.mce-visualblocks address,.mce-visualblocks article,.mce-visualblocks aside,.mce-visualblocks blockquote,.mce-visualblocks div:not([data-mce-bogus]),.mce-visualblocks dl,.mce-visualblocks figcaption,.mce-visualblocks figure,.mce-visualblocks h1,.mce-visualblocks h2,.mce-visualblocks h3,.mce-visualblocks h4,.mce-visualblocks h5,.mce-visualblocks h6,.mce-visualblocks hgroup,.mce-visualblocks ol,.mce-visualblocks p,.mce-visualblocks pre,.mce-visualblocks section,.mce-visualblocks ul{background-repeat:no-repeat;border:1px dashed #bbb;margin-left:3px;padding-top:10px}.mce-visualblocks p{background-image:url(data:image/gif;base64,R0lGODlhCQAJAJEAAAAAAP///7u7u////yH5BAEAAAMALAAAAAAJAAkAAAIQnG+CqCN/mlyvsRUpThG6AgA7)}.mce-visualblocks h1{background-image:url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGu1JuxHoAfRNRW3TWXyF2YiRUAOw==)}.mce-visualblocks h2{background-image:url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8Hybbx4oOuqgTynJd6bGlWg3DkJzoaUAAAOw==)}.mce-visualblocks h3{background-image:url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIZjI8Hybbx4oOuqgTynJf2Ln2NOHpQpmhAAQA7)}.mce-visualblocks h4{background-image:url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxInR0zqeAdhtJlXwV1oCll2HaWgAAOw==)}.mce-visualblocks h5{background-image:url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjane4iq5GlW05GgIkIZUAAAOw==)}.mce-visualblocks h6{background-image:url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjan04jep1iZ1XRlAo5bVgAAOw==)}.mce-visualblocks div:not([data-mce-bogus]){background-image:url(data:image/gif;base64,R0lGODlhEgAKAIABALu7u////yH5BAEAAAEALAAAAAASAAoAAAIfjI9poI0cgDywrhuxfbrzDEbQM2Ei5aRjmoySW4pAAQA7)}.mce-visualblocks section{background-image:url(data:image/gif;base64,R0lGODlhKAAKAIABALu7u////yH5BAEAAAEALAAAAAAoAAoAAAI5jI+pywcNY3sBWHdNrplytD2ellDeSVbp+GmWqaDqDMepc8t17Y4vBsK5hDyJMcI6KkuYU+jpjLoKADs=)}.mce-visualblocks article{background-image:url(data:image/gif;base64,R0lGODlhKgAKAIABALu7u////yH5BAEAAAEALAAAAAAqAAoAAAI6jI+pywkNY3wG0GBvrsd2tXGYSGnfiF7ikpXemTpOiJScasYoDJJrjsG9gkCJ0ag6KhmaIe3pjDYBBQA7)}.mce-visualblocks blockquote{background-image:url(data:image/gif;base64,R0lGODlhPgAKAIABALu7u////yH5BAEAAAEALAAAAAA+AAoAAAJPjI+py+0Knpz0xQDyuUhvfoGgIX5iSKZYgq5uNL5q69asZ8s5rrf0yZmpNkJZzFesBTu8TOlDVAabUyatguVhWduud3EyiUk45xhTTgMBBQA7)}.mce-visualblocks address{background-image:url(data:image/gif;base64,R0lGODlhLQAKAIABALu7u////yH5BAEAAAEALAAAAAAtAAoAAAI/jI+pywwNozSP1gDyyZcjb3UaRpXkWaXmZW4OqKLhBmLs+K263DkJK7OJeifh7FicKD9A1/IpGdKkyFpNmCkAADs=)}.mce-visualblocks pre{background-image:url(data:image/gif;base64,R0lGODlhFQAKAIABALu7uwAAACH5BAEAAAEALAAAAAAVAAoAAAIjjI+ZoN0cgDwSmnpz1NCueYERhnibZVKLNnbOq8IvKpJtVQAAOw==)}.mce-visualblocks figure{background-image:url(data:image/gif;base64,R0lGODlhJAAKAIAAALu7u////yH5BAEAAAEALAAAAAAkAAoAAAI0jI+py+2fwAHUSFvD3RlvG4HIp4nX5JFSpnZUJ6LlrM52OE7uSWosBHScgkSZj7dDKnWAAgA7)}.mce-visualblocks figcaption{border:1px dashed #bbb}.mce-visualblocks hgroup{background-image:url(data:image/gif;base64,R0lGODlhJwAKAIABALu7uwAAACH5BAEAAAEALAAAAAAnAAoAAAI3jI+pywYNI3uB0gpsRtt5fFnfNZaVSYJil4Wo03Hv6Z62uOCgiXH1kZIIJ8NiIxRrAZNMZAtQAAA7)}.mce-visualblocks aside{background-image:url(data:image/gif;base64,R0lGODlhHgAKAIABAKqqqv///yH5BAEAAAEALAAAAAAeAAoAAAItjI+pG8APjZOTzgtqy7I3f1yehmQcFY4WKZbqByutmW4aHUd6vfcVbgudgpYCADs=)}.mce-visualblocks ul{background-image:url(data:image/gif;base64,R0lGODlhDQAKAIAAALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGuYnqUVSjvw26DzzXiqIDlVwAAOw==)}.mce-visualblocks ol{background-image:url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybH6HHt0qourxC6CvzXieHyeWQAAOw==)}.mce-visualblocks dl{background-image:url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybEOnmOvUoWznTqeuEjNSCqeGRUAOw==)}.mce-visualblocks:not([dir=rtl]) address,.mce-visualblocks:not([dir=rtl]) article,.mce-visualblocks:not([dir=rtl]) aside,.mce-visualblocks:not([dir=rtl]) blockquote,.mce-visualblocks:not([dir=rtl]) div:not([data-mce-bogus]),.mce-visualblocks:not([dir=rtl]) dl,.mce-visualblocks:not([dir=rtl]) figcaption,.mce-visualblocks:not([dir=rtl]) figure,.mce-visualblocks:not([dir=rtl]) h1,.mce-visualblocks:not([dir=rtl]) h2,.mce-visualblocks:not([dir=rtl]) h3,.mce-visualblocks:not([dir=rtl]) h4,.mce-visualblocks:not([dir=rtl]) h5,.mce-visualblocks:not([dir=rtl]) h6,.mce-visualblocks:not([dir=rtl]) hgroup,.mce-visualblocks:not([dir=rtl]) ol,.mce-visualblocks:not([dir=rtl]) p,.mce-visualblocks:not([dir=rtl]) pre,.mce-visualblocks:not([dir=rtl]) section,.mce-visualblocks:not([dir=rtl]) ul{margin-left:3px}.mce-visualblocks[dir=rtl] address,.mce-visualblocks[dir=rtl] article,.mce-visualblocks[dir=rtl] aside,.mce-visualblocks[dir=rtl] blockquote,.mce-visualblocks[dir=rtl] div:not([data-mce-bogus]),.mce-visualblocks[dir=rtl] dl,.mce-visualblocks[dir=rtl] figcaption,.mce-visualblocks[dir=rtl] figure,.mce-visualblocks[dir=rtl] h1,.mce-visualblocks[dir=rtl] h2,.mce-visualblocks[dir=rtl] h3,.mce-visualblocks[dir=rtl] h4,.mce-visualblocks[dir=rtl] h5,.mce-visualblocks[dir=rtl] h6,.mce-visualblocks[dir=rtl] hgroup,.mce-visualblocks[dir=rtl] ol,.mce-visualblocks[dir=rtl] p,.mce-visualblocks[dir=rtl] pre,.mce-visualblocks[dir=rtl] section,.mce-visualblocks[dir=rtl] ul{background-position-x:right;margin-right:3px}.mce-nbsp,.mce-shy{background:#aaa}.mce-shy::after{content:'-'} \ No newline at end of file diff --git a/public/resource/tinymce/skins/ui/jeecg/content.min.css b/public/resource/tinymce/skins/ui/jeecg/content.min.css new file mode 100644 index 0000000..e9a1d89 --- /dev/null +++ b/public/resource/tinymce/skins/ui/jeecg/content.min.css @@ -0,0 +1,7 @@ +/** +* Copyright (c) Tiny Technologies, Inc. All rights reserved. +* Licensed under the LGPL or a commercial license. +* For LGPL see License.txt in the project root for license information. +* For commercial licenses see https://www.tiny.cloud/ +*/ +.mce-content-body .mce-item-anchor{background:transparent url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'8'%20height%3D'12'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'M0%200L8%200%208%2012%204.09117821%209%200%2012z'%2F%3E%3C%2Fsvg%3E%0A") no-repeat center;cursor:default;display:inline-block;height:12px!important;padding:0 2px;-webkit-user-modify:read-only;-moz-user-modify:read-only;-webkit-user-select:all;-ms-user-select:all;user-select:all;width:8px!important}.mce-content-body .mce-item-anchor[data-mce-selected]{outline-offset:1px}.tox-comments-visible .tox-comment{background-color:#fff0b7}.tox-comments-visible .tox-comment--active{background-color:#ffe168}.tox-checklist>li:not(.tox-checklist--hidden){list-style:none;margin:.25em 0}.tox-checklist>li:not(.tox-checklist--hidden)::before{content:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cg%20id%3D%22checklist-unchecked%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Crect%20id%3D%22Rectangle%22%20width%3D%2215%22%20height%3D%2215%22%20x%3D%22.5%22%20y%3D%22.5%22%20fill-rule%3D%22nonzero%22%20stroke%3D%22%234C4C4C%22%20rx%3D%222%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E%0A");cursor:pointer;height:1em;margin-left:-1.5em;margin-top:.125em;position:absolute;width:1em}.tox-checklist li:not(.tox-checklist--hidden).tox-checklist--checked::before{content:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cg%20id%3D%22checklist-checked%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Crect%20id%3D%22Rectangle%22%20width%3D%2216%22%20height%3D%2216%22%20fill%3D%22%234099FF%22%20fill-rule%3D%22nonzero%22%20rx%3D%222%22%2F%3E%3Cpath%20id%3D%22Path%22%20fill%3D%22%23FFF%22%20fill-rule%3D%22nonzero%22%20d%3D%22M11.5703186%2C3.14417309%20C11.8516238%2C2.73724603%2012.4164781%2C2.62829933%2012.83558%2C2.89774797%20C13.260121%2C3.17069355%2013.3759736%2C3.72932262%2013.0909105%2C4.14168582%20L7.7580587%2C11.8560195%20C7.43776896%2C12.3193404%206.76483983%2C12.3852142%206.35607322%2C11.9948725%20L3.02491697%2C8.8138662%20C2.66090143%2C8.46625845%202.65798871%2C7.89594698%203.01850234%2C7.54483354%20C3.373942%2C7.19866177%203.94940006%2C7.19592841%204.30829608%2C7.5386474%20L6.85276923%2C9.9684299%20L11.5703186%2C3.14417309%20Z%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E%0A")}[dir=rtl] .tox-checklist>li:not(.tox-checklist--hidden)::before{margin-left:0;margin-right:-1.5em}code[class*=language-],pre[class*=language-]{color:#000;background:0 0;text-shadow:0 1px #fff;font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;tab-size:4;-webkit-hyphens:none;-ms-hyphens:none;hyphens:none}code[class*=language-] ::selection,code[class*=language-]::selection,pre[class*=language-] ::selection,pre[class*=language-]::selection{text-shadow:none;background:#b3d4fc}@media print{code[class*=language-],pre[class*=language-]{text-shadow:none}}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto}:not(pre)>code[class*=language-],pre[class*=language-]{background:#f5f2f0}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#708090}.token.punctuation{color:#999}.namespace{opacity:.7}.token.boolean,.token.constant,.token.deleted,.token.number,.token.property,.token.symbol,.token.tag{color:#905}.token.attr-name,.token.builtin,.token.char,.token.inserted,.token.selector,.token.string{color:#690}.language-css .token.string,.style .token.string,.token.entity,.token.operator,.token.url{color:#9a6e3a;background:hsla(0,0%,100%,.5)}.token.atrule,.token.attr-value,.token.keyword{color:#07a}.token.class-name,.token.function{color:#dd4a68}.token.important,.token.regex,.token.variable{color:#e90}.token.bold,.token.important{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help}.mce-content-body{overflow-wrap:break-word;word-wrap:break-word}.mce-content-body .mce-visual-caret{background-color:#000;background-color:currentColor;position:absolute}.mce-content-body .mce-visual-caret-hidden{display:none}.mce-content-body [data-mce-caret]{left:-1000px;margin:0;padding:0;position:absolute;right:auto;top:0}.mce-content-body .mce-offscreen-selection{left:-2000000px;max-width:1000000px;position:absolute}.mce-content-body [contentEditable=false]{cursor:default}.mce-content-body [contentEditable=true]{cursor:text}.tox-cursor-format-painter{cursor:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%0A%20%20%3Cg%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M15%2C6%20C15%2C5.45%2014.55%2C5%2014%2C5%20L6%2C5%20C5.45%2C5%205%2C5.45%205%2C6%20L5%2C10%20C5%2C10.55%205.45%2C11%206%2C11%20L14%2C11%20C14.55%2C11%2015%2C10.55%2015%2C10%20L15%2C9%20L16%2C9%20L16%2C12%20L9%2C12%20L9%2C19%20C9%2C19.55%209.45%2C20%2010%2C20%20L11%2C20%20C11.55%2C20%2012%2C19.55%2012%2C19%20L12%2C14%20L18%2C14%20L18%2C7%20L15%2C7%20L15%2C6%20Z%22%2F%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M1%2C1%20L8.25%2C1%20C8.66421356%2C1%209%2C1.33578644%209%2C1.75%20L9%2C1.75%20C9%2C2.16421356%208.66421356%2C2.5%208.25%2C2.5%20L2.5%2C2.5%20L2.5%2C8.25%20C2.5%2C8.66421356%202.16421356%2C9%201.75%2C9%20L1.75%2C9%20C1.33578644%2C9%201%2C8.66421356%201%2C8.25%20L1%2C1%20Z%22%2F%3E%0A%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A"),default}.mce-content-body figure.align-left{float:left}.mce-content-body figure.align-right{float:right}.mce-content-body figure.image.align-center{display:table;margin-left:auto;margin-right:auto}.mce-preview-object{border:1px solid gray;display:inline-block;line-height:0;margin:0 2px 0 2px;position:relative}.mce-preview-object .mce-shim{background:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7);height:100%;left:0;position:absolute;top:0;width:100%}.mce-preview-object[data-mce-selected="2"] .mce-shim{display:none}.mce-object{background:transparent url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M4%203h16a1%201%200%200%201%201%201v16a1%201%200%200%201-1%201H4a1%201%200%200%201-1-1V4a1%201%200%200%201%201-1zm1%202v14h14V5H5zm4.79%202.565l5.64%204.028a.5.5%200%200%201%200%20.814l-5.64%204.028a.5.5%200%200%201-.79-.407V7.972a.5.5%200%200%201%20.79-.407z%22%2F%3E%3C%2Fsvg%3E%0A") no-repeat center;border:1px dashed #aaa}.mce-pagebreak{border:1px dashed #aaa;cursor:default;display:block;height:5px;margin-top:15px;page-break-before:always;width:100%}@media print{.mce-pagebreak{border:0}}.tiny-pageembed .mce-shim{background:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7);height:100%;left:0;position:absolute;top:0;width:100%}.tiny-pageembed[data-mce-selected="2"] .mce-shim{display:none}.tiny-pageembed{display:inline-block;position:relative}.tiny-pageembed--16by9,.tiny-pageembed--1by1,.tiny-pageembed--21by9,.tiny-pageembed--4by3{display:block;overflow:hidden;padding:0;position:relative;width:100%}.tiny-pageembed--21by9{padding-top:42.857143%}.tiny-pageembed--16by9{padding-top:56.25%}.tiny-pageembed--4by3{padding-top:75%}.tiny-pageembed--1by1{padding-top:100%}.tiny-pageembed--16by9 iframe,.tiny-pageembed--1by1 iframe,.tiny-pageembed--21by9 iframe,.tiny-pageembed--4by3 iframe{border:0;height:100%;left:0;position:absolute;top:0;width:100%}.mce-content-body[data-mce-placeholder]{position:relative}.mce-content-body[data-mce-placeholder]:not(.mce-visualblocks)::before{color:rgba(84,111,94,.7);content:attr(data-mce-placeholder);position:absolute}.mce-content-body:not([dir=rtl])[data-mce-placeholder]:not(.mce-visualblocks)::before{left:1px}.mce-content-body[dir=rtl][data-mce-placeholder]:not(.mce-visualblocks)::before{right:1px}.mce-content-body div.mce-resizehandle{background-color:#4099ff;border-color:#4099ff;border-style:solid;border-width:1px;box-sizing:border-box;height:10px;position:absolute;width:10px;z-index:10000}.mce-content-body div.mce-resizehandle:hover{background-color:#4099ff}.mce-content-body div.mce-resizehandle:nth-of-type(1){cursor:nwse-resize}.mce-content-body div.mce-resizehandle:nth-of-type(2){cursor:nesw-resize}.mce-content-body div.mce-resizehandle:nth-of-type(3){cursor:nwse-resize}.mce-content-body div.mce-resizehandle:nth-of-type(4){cursor:nesw-resize}.mce-content-body .mce-resize-backdrop{z-index:10000}.mce-content-body .mce-clonedresizable{cursor:default;opacity:.5;outline:1px dashed #000;position:absolute;z-index:10001}.mce-content-body .mce-clonedresizable.mce-resizetable-columns td,.mce-content-body .mce-clonedresizable.mce-resizetable-columns th{border:0}.mce-content-body .mce-resize-helper{background:#555;background:rgba(0,0,0,.75);border:1px;border-radius:3px;color:#fff;display:none;font-family:sans-serif;font-size:12px;line-height:14px;margin:5px 10px;padding:5px;position:absolute;white-space:nowrap;z-index:10002}.tox-rtc-user-selection{position:relative}.tox-rtc-user-cursor{bottom:0;cursor:default;position:absolute;top:0;width:2px}.tox-rtc-user-cursor::before{background-color:inherit;border-radius:50%;content:'';display:block;height:8px;position:absolute;right:-3px;top:-3px;width:8px}.tox-rtc-user-cursor:hover::after{background-color:inherit;border-radius:100px;box-sizing:border-box;color:#fff;content:attr(data-user);display:block;font-size:12px;font-weight:400;left:-5px;min-height:8px;min-width:8px;padding:0 12px;position:absolute;top:-11px;white-space:nowrap;z-index:1000}.tox-rtc-user-selection--1 .tox-rtc-user-cursor{background-color:#2dc26b}.tox-rtc-user-selection--2 .tox-rtc-user-cursor{background-color:#e03e2d}.tox-rtc-user-selection--3 .tox-rtc-user-cursor{background-color:#f1c40f}.tox-rtc-user-selection--4 .tox-rtc-user-cursor{background-color:#3598db}.tox-rtc-user-selection--5 .tox-rtc-user-cursor{background-color:#b96ad9}.tox-rtc-user-selection--6 .tox-rtc-user-cursor{background-color:#e67e23}.tox-rtc-user-selection--7 .tox-rtc-user-cursor{background-color:#aaa69d}.tox-rtc-user-selection--8 .tox-rtc-user-cursor{background-color:#f368e0}.tox-rtc-remote-image{background:#eaeaea url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%2236%22%20height%3D%2212%22%20viewBox%3D%220%200%2036%2012%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%3Ccircle%20cx%3D%226%22%20cy%3D%226%22%20r%3D%223%22%20fill%3D%22rgba(0%2C%200%2C%200%2C%20.2)%22%3E%0A%20%20%20%20%3Canimate%20attributeName%3D%22r%22%20values%3D%223%3B5%3B3%22%20calcMode%3D%22linear%22%20dur%3D%221s%22%20repeatCount%3D%22indefinite%22%20%2F%3E%0A%20%20%3C%2Fcircle%3E%0A%20%20%3Ccircle%20cx%3D%2218%22%20cy%3D%226%22%20r%3D%223%22%20fill%3D%22rgba(0%2C%200%2C%200%2C%20.2)%22%3E%0A%20%20%20%20%3Canimate%20attributeName%3D%22r%22%20values%3D%223%3B5%3B3%22%20calcMode%3D%22linear%22%20begin%3D%22.33s%22%20dur%3D%221s%22%20repeatCount%3D%22indefinite%22%20%2F%3E%0A%20%20%3C%2Fcircle%3E%0A%20%20%3Ccircle%20cx%3D%2230%22%20cy%3D%226%22%20r%3D%223%22%20fill%3D%22rgba(0%2C%200%2C%200%2C%20.2)%22%3E%0A%20%20%20%20%3Canimate%20attributeName%3D%22r%22%20values%3D%223%3B5%3B3%22%20calcMode%3D%22linear%22%20begin%3D%22.66s%22%20dur%3D%221s%22%20repeatCount%3D%22indefinite%22%20%2F%3E%0A%20%20%3C%2Fcircle%3E%0A%3C%2Fsvg%3E%0A") no-repeat center center;border:1px solid #ccc;min-height:240px;min-width:320px}.mce-match-marker{background:#aaa;color:#fff}.mce-match-marker-selected{background:#39f;color:#fff}.mce-match-marker-selected::selection{background:#39f;color:#fff}.mce-content-body audio[data-mce-selected],.mce-content-body embed[data-mce-selected],.mce-content-body img[data-mce-selected],.mce-content-body object[data-mce-selected],.mce-content-body table[data-mce-selected],.mce-content-body video[data-mce-selected]{outline:3px solid #b4d7ff}.mce-content-body hr[data-mce-selected]{outline:3px solid #b4d7ff;outline-offset:1px}.mce-content-body [contentEditable=false] [contentEditable=true]:focus{outline:3px solid #b4d7ff}.mce-content-body [contentEditable=false] [contentEditable=true]:hover{outline:3px solid #b4d7ff}.mce-content-body [contentEditable=false][data-mce-selected]{cursor:not-allowed;outline:3px solid #b4d7ff}.mce-content-body.mce-content-readonly [contentEditable=true]:focus,.mce-content-body.mce-content-readonly [contentEditable=true]:hover{outline:0}.mce-content-body [data-mce-selected=inline-boundary]{background-color:#b4d7ff}.mce-content-body .mce-edit-focus{outline:3px solid #b4d7ff}.mce-content-body td[data-mce-selected],.mce-content-body th[data-mce-selected]{position:relative}.mce-content-body td[data-mce-selected]::selection,.mce-content-body th[data-mce-selected]::selection{background:0 0}.mce-content-body td[data-mce-selected] *,.mce-content-body th[data-mce-selected] *{outline:0;-webkit-touch-callout:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.mce-content-body td[data-mce-selected]::after,.mce-content-body th[data-mce-selected]::after{background-color:rgba(180,215,255,.7);border:1px solid rgba(180,215,255,.7);bottom:-1px;content:'';left:-1px;mix-blend-mode:multiply;position:absolute;right:-1px;top:-1px}@media screen and (-ms-high-contrast:active),(-ms-high-contrast:none){.mce-content-body td[data-mce-selected]::after,.mce-content-body th[data-mce-selected]::after{border-color:rgba(0,84,180,.7)}}.mce-content-body img::selection{background:0 0}.ephox-snooker-resizer-bar{background-color:#b4d7ff;opacity:0;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ephox-snooker-resizer-cols{cursor:col-resize}.ephox-snooker-resizer-rows{cursor:row-resize}.ephox-snooker-resizer-bar.ephox-snooker-resizer-bar-dragging{opacity:1}.mce-spellchecker-word{background-image:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'4'%20height%3D'4'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20stroke%3D'%23ff0000'%20fill%3D'none'%20stroke-linecap%3D'round'%20stroke-opacity%3D'.75'%20d%3D'M0%203L2%201%204%203'%2F%3E%3C%2Fsvg%3E%0A");background-position:0 calc(100% + 1px);background-repeat:repeat-x;background-size:auto 6px;cursor:default;height:2rem}.mce-spellchecker-grammar{background-image:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'4'%20height%3D'4'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20stroke%3D'%2300A835'%20fill%3D'none'%20stroke-linecap%3D'round'%20d%3D'M0%203L2%201%204%203'%2F%3E%3C%2Fsvg%3E%0A");background-position:0 calc(100% + 1px);background-repeat:repeat-x;background-size:auto 6px;cursor:default}.mce-toc{border:1px solid gray}.mce-toc h2{margin:4px}.mce-toc li{list-style-type:none}.mce-item-table:not([border]),.mce-item-table:not([border]) caption,.mce-item-table:not([border]) td,.mce-item-table:not([border]) th,.mce-item-table[border="0"],.mce-item-table[border="0"] caption,.mce-item-table[border="0"] td,.mce-item-table[border="0"] th,table[style*="border-width: 0px"],table[style*="border-width: 0px"] caption,table[style*="border-width: 0px"] td,table[style*="border-width: 0px"] th{border:1px dashed #bbb}.mce-visualblocks address,.mce-visualblocks article,.mce-visualblocks aside,.mce-visualblocks blockquote,.mce-visualblocks div:not([data-mce-bogus]),.mce-visualblocks dl,.mce-visualblocks figcaption,.mce-visualblocks figure,.mce-visualblocks h1,.mce-visualblocks h2,.mce-visualblocks h3,.mce-visualblocks h4,.mce-visualblocks h5,.mce-visualblocks h6,.mce-visualblocks hgroup,.mce-visualblocks ol,.mce-visualblocks p,.mce-visualblocks pre,.mce-visualblocks section,.mce-visualblocks ul{background-repeat:no-repeat;border:1px dashed #bbb;margin-left:3px;padding-top:10px}.mce-visualblocks p{background-image:url(data:image/gif;base64,R0lGODlhCQAJAJEAAAAAAP///7u7u////yH5BAEAAAMALAAAAAAJAAkAAAIQnG+CqCN/mlyvsRUpThG6AgA7)}.mce-visualblocks h1{background-image:url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGu1JuxHoAfRNRW3TWXyF2YiRUAOw==)}.mce-visualblocks h2{background-image:url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8Hybbx4oOuqgTynJd6bGlWg3DkJzoaUAAAOw==)}.mce-visualblocks h3{background-image:url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIZjI8Hybbx4oOuqgTynJf2Ln2NOHpQpmhAAQA7)}.mce-visualblocks h4{background-image:url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxInR0zqeAdhtJlXwV1oCll2HaWgAAOw==)}.mce-visualblocks h5{background-image:url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjane4iq5GlW05GgIkIZUAAAOw==)}.mce-visualblocks h6{background-image:url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjan04jep1iZ1XRlAo5bVgAAOw==)}.mce-visualblocks div:not([data-mce-bogus]){background-image:url(data:image/gif;base64,R0lGODlhEgAKAIABALu7u////yH5BAEAAAEALAAAAAASAAoAAAIfjI9poI0cgDywrhuxfbrzDEbQM2Ei5aRjmoySW4pAAQA7)}.mce-visualblocks section{background-image:url(data:image/gif;base64,R0lGODlhKAAKAIABALu7u////yH5BAEAAAEALAAAAAAoAAoAAAI5jI+pywcNY3sBWHdNrplytD2ellDeSVbp+GmWqaDqDMepc8t17Y4vBsK5hDyJMcI6KkuYU+jpjLoKADs=)}.mce-visualblocks article{background-image:url(data:image/gif;base64,R0lGODlhKgAKAIABALu7u////yH5BAEAAAEALAAAAAAqAAoAAAI6jI+pywkNY3wG0GBvrsd2tXGYSGnfiF7ikpXemTpOiJScasYoDJJrjsG9gkCJ0ag6KhmaIe3pjDYBBQA7)}.mce-visualblocks blockquote{background-image:url(data:image/gif;base64,R0lGODlhPgAKAIABALu7u////yH5BAEAAAEALAAAAAA+AAoAAAJPjI+py+0Knpz0xQDyuUhvfoGgIX5iSKZYgq5uNL5q69asZ8s5rrf0yZmpNkJZzFesBTu8TOlDVAabUyatguVhWduud3EyiUk45xhTTgMBBQA7)}.mce-visualblocks address{background-image:url(data:image/gif;base64,R0lGODlhLQAKAIABALu7u////yH5BAEAAAEALAAAAAAtAAoAAAI/jI+pywwNozSP1gDyyZcjb3UaRpXkWaXmZW4OqKLhBmLs+K263DkJK7OJeifh7FicKD9A1/IpGdKkyFpNmCkAADs=)}.mce-visualblocks pre{background-image:url(data:image/gif;base64,R0lGODlhFQAKAIABALu7uwAAACH5BAEAAAEALAAAAAAVAAoAAAIjjI+ZoN0cgDwSmnpz1NCueYERhnibZVKLNnbOq8IvKpJtVQAAOw==)}.mce-visualblocks figure{background-image:url(data:image/gif;base64,R0lGODlhJAAKAIAAALu7u////yH5BAEAAAEALAAAAAAkAAoAAAI0jI+py+2fwAHUSFvD3RlvG4HIp4nX5JFSpnZUJ6LlrM52OE7uSWosBHScgkSZj7dDKnWAAgA7)}.mce-visualblocks figcaption{border:1px dashed #bbb}.mce-visualblocks hgroup{background-image:url(data:image/gif;base64,R0lGODlhJwAKAIABALu7uwAAACH5BAEAAAEALAAAAAAnAAoAAAI3jI+pywYNI3uB0gpsRtt5fFnfNZaVSYJil4Wo03Hv6Z62uOCgiXH1kZIIJ8NiIxRrAZNMZAtQAAA7)}.mce-visualblocks aside{background-image:url(data:image/gif;base64,R0lGODlhHgAKAIABAKqqqv///yH5BAEAAAEALAAAAAAeAAoAAAItjI+pG8APjZOTzgtqy7I3f1yehmQcFY4WKZbqByutmW4aHUd6vfcVbgudgpYCADs=)}.mce-visualblocks ul{background-image:url(data:image/gif;base64,R0lGODlhDQAKAIAAALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGuYnqUVSjvw26DzzXiqIDlVwAAOw==)}.mce-visualblocks ol{background-image:url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybH6HHt0qourxC6CvzXieHyeWQAAOw==)}.mce-visualblocks dl{background-image:url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybEOnmOvUoWznTqeuEjNSCqeGRUAOw==)}.mce-visualblocks:not([dir=rtl]) address,.mce-visualblocks:not([dir=rtl]) article,.mce-visualblocks:not([dir=rtl]) aside,.mce-visualblocks:not([dir=rtl]) blockquote,.mce-visualblocks:not([dir=rtl]) div:not([data-mce-bogus]),.mce-visualblocks:not([dir=rtl]) dl,.mce-visualblocks:not([dir=rtl]) figcaption,.mce-visualblocks:not([dir=rtl]) figure,.mce-visualblocks:not([dir=rtl]) h1,.mce-visualblocks:not([dir=rtl]) h2,.mce-visualblocks:not([dir=rtl]) h3,.mce-visualblocks:not([dir=rtl]) h4,.mce-visualblocks:not([dir=rtl]) h5,.mce-visualblocks:not([dir=rtl]) h6,.mce-visualblocks:not([dir=rtl]) hgroup,.mce-visualblocks:not([dir=rtl]) ol,.mce-visualblocks:not([dir=rtl]) p,.mce-visualblocks:not([dir=rtl]) pre,.mce-visualblocks:not([dir=rtl]) section,.mce-visualblocks:not([dir=rtl]) ul{margin-left:3px}.mce-visualblocks[dir=rtl] address,.mce-visualblocks[dir=rtl] article,.mce-visualblocks[dir=rtl] aside,.mce-visualblocks[dir=rtl] blockquote,.mce-visualblocks[dir=rtl] div:not([data-mce-bogus]),.mce-visualblocks[dir=rtl] dl,.mce-visualblocks[dir=rtl] figcaption,.mce-visualblocks[dir=rtl] figure,.mce-visualblocks[dir=rtl] h1,.mce-visualblocks[dir=rtl] h2,.mce-visualblocks[dir=rtl] h3,.mce-visualblocks[dir=rtl] h4,.mce-visualblocks[dir=rtl] h5,.mce-visualblocks[dir=rtl] h6,.mce-visualblocks[dir=rtl] hgroup,.mce-visualblocks[dir=rtl] ol,.mce-visualblocks[dir=rtl] p,.mce-visualblocks[dir=rtl] pre,.mce-visualblocks[dir=rtl] section,.mce-visualblocks[dir=rtl] ul{background-position-x:right;margin-right:3px}.mce-nbsp,.mce-shy{background:#aaa}.mce-shy::after{content:'-'}body{font-family:sans-serif}table{border-collapse:collapse} \ No newline at end of file diff --git a/public/resource/tinymce/skins/ui/jeecg/content.mobile.css b/public/resource/tinymce/skins/ui/jeecg/content.mobile.css new file mode 100644 index 0000000..64783f0 --- /dev/null +++ b/public/resource/tinymce/skins/ui/jeecg/content.mobile.css @@ -0,0 +1,29 @@ +/** +* Copyright (c) Tiny Technologies, Inc. All rights reserved. +* Licensed under the LGPL or a commercial license. +* For LGPL see License.txt in the project root for license information. +* For commercial licenses see https://www.tiny.cloud/ +*/ +.tinymce-mobile-unfocused-selections .tinymce-mobile-unfocused-selection { + /* Note: this file is used inside the content, so isn't part of theming */ + background-color: green; + display: inline-block; + opacity: 0.5; + position: absolute; +} +body { + -webkit-text-size-adjust: none; +} +body img { + /* this is related to the content margin */ + max-width: 96vw; +} +body table img { + max-width: 95%; +} +body { + font-family: sans-serif; +} +table { + border-collapse: collapse; +} diff --git a/public/resource/tinymce/skins/ui/jeecg/content.mobile.min.css b/public/resource/tinymce/skins/ui/jeecg/content.mobile.min.css new file mode 100644 index 0000000..1b87246 --- /dev/null +++ b/public/resource/tinymce/skins/ui/jeecg/content.mobile.min.css @@ -0,0 +1,7 @@ +/** +* Copyright (c) Tiny Technologies, Inc. All rights reserved. +* Licensed under the LGPL or a commercial license. +* For LGPL see License.txt in the project root for license information. +* For commercial licenses see https://www.tiny.cloud/ +*/ +.tinymce-mobile-unfocused-selections .tinymce-mobile-unfocused-selection{background-color:green;display:inline-block;opacity:.5;position:absolute}body{-webkit-text-size-adjust:none}body img{max-width:96vw}body table img{max-width:95%}body{font-family:sans-serif}table{border-collapse:collapse} \ No newline at end of file diff --git a/public/resource/tinymce/skins/ui/jeecg/fonts/tinymce-mobile.woff b/public/resource/tinymce/skins/ui/jeecg/fonts/tinymce-mobile.woff new file mode 100644 index 0000000..1e3be03 Binary files /dev/null and b/public/resource/tinymce/skins/ui/jeecg/fonts/tinymce-mobile.woff differ diff --git a/public/resource/tinymce/skins/ui/jeecg/skin.css b/public/resource/tinymce/skins/ui/jeecg/skin.css new file mode 100644 index 0000000..7d54f3c --- /dev/null +++ b/public/resource/tinymce/skins/ui/jeecg/skin.css @@ -0,0 +1,3045 @@ +/** +* Copyright (c) Tiny Technologies, Inc. All rights reserved. +* Licensed under the LGPL or a commercial license. +* For LGPL see License.txt in the project root for license information. +* For commercial licenses see https://www.tiny.cloud/ +*/ +.tox { + box-shadow: none; + box-sizing: content-box; + color: rgba(84, 111, 94, 0.85); + cursor: auto; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; + font-size: 10px; + font-style: normal; + font-weight: normal; + line-height: normal; + -webkit-tap-highlight-color: transparent; + text-decoration: none; + text-shadow: none; + text-transform: none; + vertical-align: initial; + white-space: normal; +} +.tox *:not(svg):not(rect) { + box-sizing: inherit; + color: inherit; + cursor: inherit; + direction: inherit; + font-family: inherit; + font-size: inherit; + font-style: inherit; + font-weight: inherit; + line-height: inherit; + -webkit-tap-highlight-color: inherit; + text-align: inherit; + text-decoration: inherit; + text-shadow: inherit; + text-transform: inherit; + vertical-align: inherit; + white-space: inherit; +} +.tox *:not(svg):not(rect) { + /* stylelint-disable-line no-duplicate-selectors */ + background: transparent; + border: 0; + box-shadow: none; + float: none; + height: auto; + margin: 0; + max-width: none; + outline: 0; + padding: 0; + position: static; + width: auto; +} +.tox:not([dir=rtl]) { + direction: ltr; + text-align: left; +} +.tox[dir=rtl] { + direction: rtl; + text-align: right; +} +.tox-tinymce { + border: 1px solid #d9d9d9; + border-radius: 0px; + box-shadow: none; + box-sizing: border-box; + display: flex; + flex-direction: column; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; + overflow: hidden; + position: relative; + visibility: inherit !important; +} +.tox-tinymce-inline { + border: none; + box-shadow: none; +} +.tox-tinymce-inline .tox-editor-header { + background-color: transparent; + border: 1px solid #d9d9d9; + border-radius: 0px; + box-shadow: none; +} +.tox-tinymce-aux { + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; + z-index: 1300; +} +.tox-tinymce *:focus, +.tox-tinymce-aux *:focus { + outline: none; +} +button::-moz-focus-inner { + border: 0; +} +.tox[dir=rtl] .tox-icon--flip svg { + transform: rotateY(180deg); +} +.tox .accessibility-issue__header { + align-items: center; + display: flex; + margin-bottom: 2.5px; +} +.tox .accessibility-issue__description { + align-items: stretch; + border: 1px solid #d9d9d9; + border-radius: 3px; + display: flex; + justify-content: space-between; +} +.tox .accessibility-issue__description > div { + padding-bottom: 2.5px; +} +.tox .accessibility-issue__description > div > div { + align-items: center; + display: flex; + margin-bottom: 2.5px; +} +.tox .accessibility-issue__description > *:last-child:not(:only-child) { + border-color: #d9d9d9; + border-style: solid; +} +.tox .accessibility-issue__repair { + margin-top: 16px; +} +.tox .tox-dialog__body-content .accessibility-issue--info .accessibility-issue__description { + background-color: rgba(10, 143, 233, 0.1); + border-color: rgba(10, 143, 233, 0.4); + color: rgba(84, 111, 94, 0.85); +} +.tox .tox-dialog__body-content .accessibility-issue--info .accessibility-issue__description > *:last-child { + border-color: rgba(10, 143, 233, 0.4); +} +.tox .tox-dialog__body-content .accessibility-issue--info .tox-form__group h2 { + color: #0a8fe9; +} +.tox .tox-dialog__body-content .accessibility-issue--info .tox-icon svg { + fill: #0a8fe9; +} +.tox .tox-dialog__body-content .accessibility-issue--info a .tox-icon { + color: #0a8fe9; +} +.tox .tox-dialog__body-content .accessibility-issue--warn .accessibility-issue__description { + background-color: rgba(255, 165, 0, 0.1); + border-color: rgba(255, 165, 0, 0.5); + color: rgba(84, 111, 94, 0.85); +} +.tox .tox-dialog__body-content .accessibility-issue--warn .accessibility-issue__description > *:last-child { + border-color: rgba(255, 165, 0, 0.5); +} +.tox .tox-dialog__body-content .accessibility-issue--warn .tox-form__group h2 { + color: #cc8500; +} +.tox .tox-dialog__body-content .accessibility-issue--warn .tox-icon svg { + fill: #cc8500; +} +.tox .tox-dialog__body-content .accessibility-issue--warn a .tox-icon { + color: #cc8500; +} +.tox .tox-dialog__body-content .accessibility-issue--error .accessibility-issue__description { + background-color: rgba(204, 0, 0, 0.1); + border-color: rgba(204, 0, 0, 0.4); + color: rgba(84, 111, 94, 0.85); +} +.tox .tox-dialog__body-content .accessibility-issue--error .accessibility-issue__description > *:last-child { + border-color: rgba(204, 0, 0, 0.4); +} +.tox .tox-dialog__body-content .accessibility-issue--error .tox-form__group h2 { + color: #c00; +} +.tox .tox-dialog__body-content .accessibility-issue--error .tox-icon svg { + fill: #c00; +} +.tox .tox-dialog__body-content .accessibility-issue--error a .tox-icon { + color: #c00; +} +.tox .tox-dialog__body-content .accessibility-issue--success .accessibility-issue__description { + background-color: rgba(120, 171, 70, 0.1); + border-color: rgba(120, 171, 70, 0.4); + color: rgba(84, 111, 94, 0.85); +} +.tox .tox-dialog__body-content .accessibility-issue--success .accessibility-issue__description > *:last-child { + border-color: rgba(120, 171, 70, 0.4); +} +.tox .tox-dialog__body-content .accessibility-issue--success .tox-form__group h2 { + color: #78AB46; +} +.tox .tox-dialog__body-content .accessibility-issue--success .tox-icon svg { + fill: #78AB46; +} +.tox .tox-dialog__body-content .accessibility-issue--success a .tox-icon { + color: #78AB46; +} +.tox .tox-dialog__body-content .accessibility-issue__header h1, +.tox .tox-dialog__body-content .tox-form__group .accessibility-issue__description h2 { + margin-top: 0; +} +.tox:not([dir=rtl]) .tox-dialog__body-content .accessibility-issue__header .tox-button { + margin-left: 2.5px; +} +.tox:not([dir=rtl]) .tox-dialog__body-content .accessibility-issue__header > *:nth-last-child(2) { + margin-left: auto; +} +.tox:not([dir=rtl]) .tox-dialog__body-content .accessibility-issue__description { + padding: 2.5px 2.5px 2.5px 5px; +} +.tox:not([dir=rtl]) .tox-dialog__body-content .accessibility-issue__description > *:last-child { + border-left-width: 1px; + padding-left: 2.5px; +} +.tox[dir=rtl] .tox-dialog__body-content .accessibility-issue__header .tox-button { + margin-right: 2.5px; +} +.tox[dir=rtl] .tox-dialog__body-content .accessibility-issue__header > *:nth-last-child(2) { + margin-right: auto; +} +.tox[dir=rtl] .tox-dialog__body-content .accessibility-issue__description { + padding: 2.5px 5px 2.5px 2.5px; +} +.tox[dir=rtl] .tox-dialog__body-content .accessibility-issue__description > *:last-child { + border-right-width: 1px; + padding-right: 2.5px; +} +.tox .tox-anchorbar { + display: flex; + flex: 0 0 auto; +} +.tox .tox-bar { + display: flex; + flex: 0 0 auto; +} +.tox .tox-button { + background-color: #0a8fe9; + background-image: none; + background-position: 0 0; + background-repeat: repeat; + border-color: #0a8fe9; + border-radius: 3px; + border-style: solid; + border-width: 1px; + box-shadow: none; + box-sizing: border-box; + color: #fff; + cursor: pointer; + display: inline-block; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; + font-size: 8.75px; + font-style: normal; + font-weight: normal; + letter-spacing: normal; + line-height: 24px; + margin: 0; + outline: none; + padding: 2.5px 10px; + text-align: center; + text-decoration: none; + text-transform: none; + white-space: nowrap; +} +.tox .tox-button[disabled] { + background-color: #0a8fe9; + background-image: none; + border-color: #0a8fe9; + box-shadow: none; + color: rgba(255, 255, 255, 0.5); + cursor: not-allowed; +} +.tox .tox-button:focus:not(:disabled) { + background-color: #0980d1; + background-image: none; + border-color: #0980d1; + box-shadow: none; + color: #fff; +} +.tox .tox-button:hover:not(:disabled) { + background-color: #0980d1; + background-image: none; + border-color: #0980d1; + box-shadow: none; + color: #fff; +} +.tox .tox-button:active:not(:disabled) { + background-color: #0871b8; + background-image: none; + border-color: #0871b8; + box-shadow: none; + color: #fff; +} +.tox .tox-button--secondary { + background-color: #f0f0f0; + background-image: none; + background-position: 0 0; + background-repeat: repeat; + border-color: #f0f0f0; + border-radius: 3px; + border-style: solid; + border-width: 1px; + box-shadow: none; + color: rgba(84, 111, 94, 0.85); + font-size: 8.75px; + font-style: normal; + font-weight: normal; + letter-spacing: normal; + outline: none; + padding: 2.5px 10px; + text-decoration: none; + text-transform: none; +} +.tox .tox-button--secondary[disabled] { + background-color: #f0f0f0; + background-image: none; + border-color: #f0f0f0; + box-shadow: none; + color: rgba(84, 111, 94, 0.5); +} +.tox .tox-button--secondary:focus:not(:disabled) { + background-color: #e3e3e3; + background-image: none; + border-color: #e3e3e3; + box-shadow: none; + color: rgba(84, 111, 94, 0.85); +} +.tox .tox-button--secondary:hover:not(:disabled) { + background-color: #e3e3e3; + background-image: none; + border-color: #e3e3e3; + box-shadow: none; + color: rgba(84, 111, 94, 0.85); +} +.tox .tox-button--secondary:active:not(:disabled) { + background-color: #d6d6d6; + background-image: none; + border-color: #d6d6d6; + box-shadow: none; + color: rgba(84, 111, 94, 0.85); +} +.tox .tox-button--icon, +.tox .tox-button.tox-button--icon, +.tox .tox-button.tox-button--secondary.tox-button--icon { + padding: 2.5px; +} +.tox .tox-button--icon .tox-icon svg, +.tox .tox-button.tox-button--icon .tox-icon svg, +.tox .tox-button.tox-button--secondary.tox-button--icon .tox-icon svg { + display: block; + fill: currentColor; +} +.tox .tox-button-link { + background: 0; + border: none; + box-sizing: border-box; + cursor: pointer; + display: inline-block; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; + font-size: 10px; + font-weight: normal; + line-height: 1.3; + margin: 0; + padding: 0; + white-space: nowrap; +} +.tox .tox-button-link--sm { + font-size: 8.75px; +} +.tox .tox-button--naked { + background-color: transparent; + border-color: transparent; + box-shadow: unset; + color: rgba(84, 111, 94, 0.85); +} +.tox .tox-button--naked[disabled] { + background-color: #f0f0f0; + border-color: #f0f0f0; + box-shadow: none; + color: rgba(84, 111, 94, 0.5); +} +.tox .tox-button--naked:hover:not(:disabled) { + background-color: #e3e3e3; + border-color: #e3e3e3; + box-shadow: none; + color: rgba(84, 111, 94, 0.85); +} +.tox .tox-button--naked:focus:not(:disabled) { + background-color: #e3e3e3; + border-color: #e3e3e3; + box-shadow: none; + color: rgba(84, 111, 94, 0.85); +} +.tox .tox-button--naked:active:not(:disabled) { + background-color: #d6d6d6; + border-color: #d6d6d6; + box-shadow: none; + color: rgba(84, 111, 94, 0.85); +} +.tox .tox-button--naked .tox-icon svg { + fill: currentColor; +} +.tox .tox-button--naked.tox-button--icon:hover:not(:disabled) { + color: rgba(84, 111, 94, 0.85); +} +.tox .tox-checkbox { + align-items: center; + border-radius: 3px; + cursor: pointer; + display: flex; + height: 36px; + min-width: 36px; +} +.tox .tox-checkbox__input { + /* Hide from view but visible to screen readers */ + height: 1px; + overflow: hidden; + position: absolute; + top: auto; + width: 1px; +} +.tox .tox-checkbox__icons { + align-items: center; + border-radius: 3px; + box-shadow: 0 0 0 2px transparent; + box-sizing: content-box; + display: flex; + height: 24px; + justify-content: center; + padding: calc(2.5px - 1px); + width: 24px; +} +.tox .tox-checkbox__icons .tox-checkbox-icon__unchecked svg { + display: block; + fill: rgba(84, 111, 94, 0.3); +} +.tox .tox-checkbox__icons .tox-checkbox-icon__indeterminate svg { + display: none; + fill: #0a8fe9; +} +.tox .tox-checkbox__icons .tox-checkbox-icon__checked svg { + display: none; + fill: #0a8fe9; +} +.tox .tox-checkbox--disabled { + color: rgba(84, 111, 94, 0.5); + cursor: not-allowed; +} +.tox .tox-checkbox--disabled .tox-checkbox__icons .tox-checkbox-icon__checked svg { + fill: rgba(84, 111, 94, 0.5); +} +.tox .tox-checkbox--disabled .tox-checkbox__icons .tox-checkbox-icon__unchecked svg { + fill: rgba(84, 111, 94, 0.5); +} +.tox .tox-checkbox--disabled .tox-checkbox__icons .tox-checkbox-icon__indeterminate svg { + fill: rgba(84, 111, 94, 0.5); +} +.tox input.tox-checkbox__input:checked + .tox-checkbox__icons .tox-checkbox-icon__unchecked svg { + display: none; +} +.tox input.tox-checkbox__input:checked + .tox-checkbox__icons .tox-checkbox-icon__checked svg { + display: block; +} +.tox input.tox-checkbox__input:indeterminate + .tox-checkbox__icons .tox-checkbox-icon__unchecked svg { + display: none; +} +.tox input.tox-checkbox__input:indeterminate + .tox-checkbox__icons .tox-checkbox-icon__indeterminate svg { + display: block; +} +.tox input.tox-checkbox__input:focus + .tox-checkbox__icons { + border-radius: 3px; + box-shadow: inset 0 0 0 1px #0a8fe9; + padding: calc(2.5px - 1px); +} +.tox:not([dir=rtl]) .tox-checkbox__label { + margin-left: 2.5px; +} +.tox:not([dir=rtl]) .tox-checkbox__input { + left: -10000px; +} +.tox:not([dir=rtl]) .tox-bar .tox-checkbox { + margin-left: 2.5px; +} +.tox[dir=rtl] .tox-checkbox__label { + margin-right: 2.5px; +} +.tox[dir=rtl] .tox-checkbox__input { + right: -10000px; +} +.tox[dir=rtl] .tox-bar .tox-checkbox { + margin-right: 2.5px; +} +.tox { + /* stylelint-disable-next-line no-descending-specificity */ +} +.tox .tox-collection--toolbar .tox-collection__group { + display: flex; + padding: 0; +} +.tox .tox-collection--grid .tox-collection__group { + display: flex; + flex-wrap: wrap; + max-height: 208px; + overflow-x: hidden; + overflow-y: auto; + padding: 0; +} +.tox .tox-collection--list .tox-collection__group { + border-bottom-width: 0; + border-color: #d9d9d9; + border-left-width: 0; + border-right-width: 0; + border-style: solid; + border-top-width: 1px; + padding: 2.5px 0; +} +.tox .tox-collection--list .tox-collection__group:first-child { + border-top-width: 0; +} +.tox .tox-collection__group-heading { + background-color: #f3f3f3; + color: rgba(84, 111, 94, 0.7); + cursor: default; + font-size: 12px; + font-style: normal; + font-weight: normal; + margin-bottom: 2.5px; + margin-top: -2.5px; + padding: 2.5px 5px; + text-transform: none; + -webkit-touch-callout: none; + -webkit-user-select: none; + -ms-user-select: none; + user-select: none; +} +.tox .tox-collection__item { + align-items: center; + color: rgba(84, 111, 94, 0.85); + cursor: pointer; + display: flex; + -webkit-touch-callout: none; + -webkit-user-select: none; + -ms-user-select: none; + user-select: none; +} +.tox .tox-collection--list .tox-collection__item { + padding: 2.5px 5px; +} +.tox .tox-collection--toolbar .tox-collection__item { + border-radius: 3px; + padding: 2.5px; +} +.tox .tox-collection--grid .tox-collection__item { + border-radius: 3px; + padding: 2.5px; +} +.tox .tox-collection--list .tox-collection__item--enabled { + background-color: #fff; + color: rgba(84, 111, 94, 0.85); +} +.tox .tox-collection--list .tox-collection__item--active { + background-color: #e5e9e7; +} +.tox .tox-collection--toolbar .tox-collection__item--enabled { + background-color: #e5e9e7; + color: rgba(84, 111, 94, 0.85); +} +.tox .tox-collection--toolbar .tox-collection__item--active { + background-color: #e5e9e7; +} +.tox .tox-collection--grid .tox-collection__item--enabled { + background-color: #e5e9e7; + color: rgba(84, 111, 94, 0.85); +} +.tox .tox-collection--grid .tox-collection__item--active:not(.tox-collection__item--state-disabled) { + background-color: #e5e9e7; + color: rgba(84, 111, 94, 0.85); +} +.tox .tox-collection--list .tox-collection__item--active:not(.tox-collection__item--state-disabled) { + color: rgba(84, 111, 94, 0.85); +} +.tox .tox-collection--toolbar .tox-collection__item--active:not(.tox-collection__item--state-disabled) { + color: rgba(84, 111, 94, 0.85); +} +.tox .tox-collection__item-icon, +.tox .tox-collection__item-checkmark { + align-items: center; + display: flex; + height: 24px; + justify-content: center; + width: 24px; +} +.tox .tox-collection__item-icon svg, +.tox .tox-collection__item-checkmark svg { + fill: currentColor; +} +.tox .tox-collection--toolbar-lg .tox-collection__item-icon { + height: 48px; + width: 48px; +} +.tox .tox-collection__item-label { + color: currentColor; + display: inline-block; + flex: 1; + -ms-flex-preferred-size: auto; + font-size: 8.75px; + font-style: normal; + font-weight: normal; + line-height: 24px; + text-transform: none; + word-break: break-all; +} +.tox .tox-collection__item-accessory { + color: rgba(84, 111, 94, 0.7); + display: inline-block; + font-size: 8.75px; + height: 24px; + line-height: 24px; + text-transform: none; +} +.tox .tox-collection__item-caret { + align-items: center; + display: flex; + min-height: 24px; +} +.tox .tox-collection__item-caret::after { + content: ''; + font-size: 0; + min-height: inherit; +} +.tox .tox-collection__item-caret svg { + fill: rgba(84, 111, 94, 0.85); +} +.tox .tox-collection__item--state-disabled { + background-color: transparent; + color: rgba(84, 111, 94, 0.5); + cursor: not-allowed; +} +.tox .tox-collection__item--state-disabled .tox-collection__item-caret svg { + fill: rgba(84, 111, 94, 0.5); +} +.tox .tox-collection--list .tox-collection__item:not(.tox-collection__item--enabled) .tox-collection__item-checkmark svg { + display: none; +} +.tox .tox-collection--list .tox-collection__item:not(.tox-collection__item--enabled) .tox-collection__item-accessory + .tox-collection__item-checkmark { + display: none; +} +.tox .tox-collection--horizontal { + background-color: #fff; + border: 1px solid #d9d9d9; + border-radius: 3px; + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15); + display: flex; + flex: 0 0 auto; + flex-shrink: 0; + flex-wrap: nowrap; + margin-bottom: 0; + overflow-x: auto; + padding: 0; +} +.tox .tox-collection--horizontal .tox-collection__group { + align-items: center; + display: flex; + flex-wrap: nowrap; + margin: 0; + padding: 0 2.5px; +} +.tox .tox-collection--horizontal .tox-collection__item { + height: 34px; + margin: 2px 0 3px 0; + padding: 0 4px; +} +.tox .tox-collection--horizontal .tox-collection__item-label { + white-space: nowrap; +} +.tox .tox-collection--horizontal .tox-collection__item-caret { + margin-left: 4px; +} +.tox .tox-collection__item-container { + display: flex; +} +.tox .tox-collection__item-container--row { + align-items: center; + flex: 1 1 auto; + flex-direction: row; +} +.tox .tox-collection__item-container--row.tox-collection__item-container--align-left { + margin-right: auto; +} +.tox .tox-collection__item-container--row.tox-collection__item-container--align-right { + justify-content: flex-end; + margin-left: auto; +} +.tox .tox-collection__item-container--row.tox-collection__item-container--valign-top { + align-items: flex-start; + margin-bottom: auto; +} +.tox .tox-collection__item-container--row.tox-collection__item-container--valign-middle { + align-items: center; +} +.tox .tox-collection__item-container--row.tox-collection__item-container--valign-bottom { + align-items: flex-end; + margin-top: auto; +} +.tox .tox-collection__item-container--column { + -ms-grid-row-align: center; + align-self: center; + flex: 1 1 auto; + flex-direction: column; +} +.tox .tox-collection__item-container--column.tox-collection__item-container--align-left { + align-items: flex-start; +} +.tox .tox-collection__item-container--column.tox-collection__item-container--align-right { + align-items: flex-end; +} +.tox .tox-collection__item-container--column.tox-collection__item-container--valign-top { + align-self: flex-start; +} +.tox .tox-collection__item-container--column.tox-collection__item-container--valign-middle { + -ms-grid-row-align: center; + align-self: center; +} +.tox .tox-collection__item-container--column.tox-collection__item-container--valign-bottom { + align-self: flex-end; +} +.tox:not([dir=rtl]) .tox-collection--horizontal .tox-collection__group:not(:last-of-type) { + border-right: 1px solid #d9d9d9; +} +.tox:not([dir=rtl]) .tox-collection--list .tox-collection__item > *:not(:first-child) { + margin-left: 5px; +} +.tox:not([dir=rtl]) .tox-collection--list .tox-collection__item > .tox-collection__item-label:first-child { + margin-left: 2.5px; +} +.tox:not([dir=rtl]) .tox-collection__item-accessory { + margin-left: 10px; + text-align: right; +} +.tox:not([dir=rtl]) .tox-collection .tox-collection__item-caret { + margin-left: 10px; +} +.tox[dir=rtl] .tox-collection--horizontal .tox-collection__group:not(:last-of-type) { + border-left: 1px solid #d9d9d9; +} +.tox[dir=rtl] .tox-collection--list .tox-collection__item > *:not(:first-child) { + margin-right: 5px; +} +.tox[dir=rtl] .tox-collection--list .tox-collection__item > .tox-collection__item-label:first-child { + margin-right: 2.5px; +} +.tox[dir=rtl] .tox-collection__item-accessory { + margin-right: 10px; + text-align: left; +} +.tox[dir=rtl] .tox-collection .tox-collection__item-caret { + margin-right: 10px; + transform: rotateY(180deg); +} +.tox[dir=rtl] .tox-collection--horizontal .tox-collection__item-caret { + margin-right: 4px; +} +.tox .tox-color-picker-container { + display: flex; + flex-direction: row; + height: 225px; + margin: 0; +} +.tox .tox-sv-palette { + box-sizing: border-box; + display: flex; + height: 100%; +} +.tox .tox-sv-palette-spectrum { + height: 100%; +} +.tox .tox-sv-palette, +.tox .tox-sv-palette-spectrum { + width: 225px; +} +.tox .tox-sv-palette-thumb { + background: none; + border: 1px solid black; + border-radius: 50%; + box-sizing: content-box; + height: 12px; + position: absolute; + width: 12px; +} +.tox .tox-sv-palette-inner-thumb { + border: 1px solid white; + border-radius: 50%; + height: 10px; + position: absolute; + width: 10px; +} +.tox .tox-hue-slider { + box-sizing: border-box; + height: 100%; + width: 25px; +} +.tox .tox-hue-slider-spectrum { + background: linear-gradient(to bottom, #f00, #ff0080, #f0f, #8000ff, #00f, #0080ff, #0ff, #00ff80, #0f0, #80ff00, #ff0, #ff8000, #f00); + height: 100%; + width: 100%; +} +.tox .tox-hue-slider, +.tox .tox-hue-slider-spectrum { + width: 20px; +} +.tox .tox-hue-slider-thumb { + background: white; + border: 1px solid black; + box-sizing: content-box; + height: 4px; + width: 100%; +} +.tox .tox-rgb-form { + display: flex; + flex-direction: column; + justify-content: space-between; +} +.tox .tox-rgb-form div { + align-items: center; + display: flex; + justify-content: space-between; + margin-bottom: 5px; + width: inherit; +} +.tox .tox-rgb-form input { + width: 6em; +} +.tox .tox-rgb-form input.tox-invalid { + /* Need !important to override Chrome's focus styling unfortunately */ + border: 1px solid red !important; +} +.tox .tox-rgb-form .tox-rgba-preview { + border: 1px solid black; + flex-grow: 2; + margin-bottom: 0; +} +.tox:not([dir=rtl]) .tox-sv-palette { + margin-right: 15px; +} +.tox:not([dir=rtl]) .tox-hue-slider { + margin-right: 15px; +} +.tox:not([dir=rtl]) .tox-hue-slider-thumb { + margin-left: -1px; +} +.tox:not([dir=rtl]) .tox-rgb-form label { + margin-right: 0.5em; +} +.tox[dir=rtl] .tox-sv-palette { + margin-left: 15px; +} +.tox[dir=rtl] .tox-hue-slider { + margin-left: 15px; +} +.tox[dir=rtl] .tox-hue-slider-thumb { + margin-right: -1px; +} +.tox[dir=rtl] .tox-rgb-form label { + margin-left: 0.5em; +} +.tox .tox-toolbar .tox-swatches, +.tox .tox-toolbar__primary .tox-swatches, +.tox .tox-toolbar__overflow .tox-swatches { + margin: 2px 0 3px 4px; +} +.tox .tox-collection--list .tox-collection__group .tox-swatches-menu { + border: 0; + margin: -2.5px 0; +} +.tox .tox-swatches__row { + display: flex; +} +.tox .tox-swatch { + height: 30px; + transition: transform 0.15s, box-shadow 0.15s; + width: 30px; +} +.tox .tox-swatch:hover, +.tox .tox-swatch:focus { + box-shadow: 0 0 0 1px rgba(127, 127, 127, 0.3) inset; + transform: scale(0.8); +} +.tox .tox-swatch--remove { + align-items: center; + display: flex; + justify-content: center; +} +.tox .tox-swatch--remove svg path { + stroke: #e74c3c; +} +.tox .tox-swatches__picker-btn { + align-items: center; + background-color: transparent; + border: 0; + cursor: pointer; + display: flex; + height: 30px; + justify-content: center; + outline: none; + padding: 0; + width: 30px; +} +.tox .tox-swatches__picker-btn svg { + height: 24px; + width: 24px; +} +.tox .tox-swatches__picker-btn:hover { + background: #e5e9e7; +} +.tox:not([dir=rtl]) .tox-swatches__picker-btn { + margin-left: auto; +} +.tox[dir=rtl] .tox-swatches__picker-btn { + margin-right: auto; +} +.tox .tox-comment-thread { + background: #fff; + position: relative; +} +.tox .tox-comment-thread > *:not(:first-child) { + margin-top: 5px; +} +.tox .tox-comment { + background: #fff; + border: 1px solid #d9d9d9; + border-radius: 3px; + box-shadow: 0 4px 8px 0 rgba(84, 111, 94, 0.1); + padding: 5px 5px 10px 5px; + position: relative; +} +.tox .tox-comment__header { + align-items: center; + color: rgba(84, 111, 94, 0.85); + display: flex; + justify-content: space-between; +} +.tox .tox-comment__date { + color: rgba(84, 111, 94, 0.7); + font-size: 12px; +} +.tox .tox-comment__body { + color: rgba(84, 111, 94, 0.85); + font-size: 8.75px; + font-style: normal; + font-weight: normal; + line-height: 1.3; + margin-top: 5px; + position: relative; + text-transform: initial; +} +.tox .tox-comment__body textarea { + resize: none; + white-space: normal; + width: 100%; +} +.tox .tox-comment__expander { + padding-top: 5px; +} +.tox .tox-comment__expander p { + color: rgba(84, 111, 94, 0.7); + font-size: 8.75px; + font-style: normal; +} +.tox .tox-comment__body p { + margin: 0; +} +.tox .tox-comment__buttonspacing { + padding-top: 10px; + text-align: center; +} +.tox .tox-comment-thread__overlay::after { + background: #fff; + bottom: 0; + content: ""; + display: flex; + left: 0; + opacity: 0.9; + position: absolute; + right: 0; + top: 0; + z-index: 5; +} +.tox .tox-comment__reply { + display: flex; + flex-shrink: 0; + flex-wrap: wrap; + justify-content: flex-end; + margin-top: 5px; +} +.tox .tox-comment__reply > *:first-child { + margin-bottom: 5px; + width: 100%; +} +.tox .tox-comment__edit { + display: flex; + flex-wrap: wrap; + justify-content: flex-end; + margin-top: 10px; +} +.tox .tox-comment__gradient::after { + background: linear-gradient(rgba(255, 255, 255, 0), #fff); + bottom: 0; + content: ""; + display: block; + height: 5em; + margin-top: -40px; + position: absolute; + width: 100%; +} +.tox .tox-comment__overlay { + background: #fff; + bottom: 0; + display: flex; + flex-direction: column; + flex-grow: 1; + left: 0; + opacity: 0.9; + position: absolute; + right: 0; + text-align: center; + top: 0; + z-index: 5; +} +.tox .tox-comment__loading-text { + align-items: center; + color: rgba(84, 111, 94, 0.85); + display: flex; + flex-direction: column; + position: relative; +} +.tox .tox-comment__loading-text > div { + padding-bottom: 10px; +} +.tox .tox-comment__overlaytext { + bottom: 0; + flex-direction: column; + font-size: 8.75px; + left: 0; + padding: 1em; + position: absolute; + right: 0; + top: 0; + z-index: 10; +} +.tox .tox-comment__overlaytext p { + background-color: #fff; + box-shadow: 0 0 8px 8px #fff; + color: rgba(84, 111, 94, 0.85); + text-align: center; +} +.tox .tox-comment__overlaytext div:nth-of-type(2) { + font-size: 0.8em; +} +.tox .tox-comment__busy-spinner { + align-items: center; + background-color: #fff; + bottom: 0; + display: flex; + justify-content: center; + left: 0; + position: absolute; + right: 0; + top: 0; + z-index: 20; +} +.tox .tox-comment__scroll { + display: flex; + flex-direction: column; + flex-shrink: 1; + overflow: auto; +} +.tox .tox-conversations { + margin: 5px; +} +.tox:not([dir=rtl]) .tox-comment__edit { + margin-left: 5px; +} +.tox:not([dir=rtl]) .tox-comment__buttonspacing > *:last-child, +.tox:not([dir=rtl]) .tox-comment__edit > *:last-child, +.tox:not([dir=rtl]) .tox-comment__reply > *:last-child { + margin-left: 5px; +} +.tox[dir=rtl] .tox-comment__edit { + margin-right: 5px; +} +.tox[dir=rtl] .tox-comment__buttonspacing > *:last-child, +.tox[dir=rtl] .tox-comment__edit > *:last-child, +.tox[dir=rtl] .tox-comment__reply > *:last-child { + margin-right: 5px; +} +.tox .tox-user { + align-items: center; + display: flex; +} +.tox .tox-user__avatar svg { + fill: rgba(84, 111, 94, 0.7); +} +.tox .tox-user__name { + color: rgba(84, 111, 94, 0.7); + font-size: 12px; + font-style: normal; + font-weight: normal; + text-transform: uppercase; +} +.tox:not([dir=rtl]) .tox-user__avatar svg { + margin-right: 5px; +} +.tox:not([dir=rtl]) .tox-user__avatar + .tox-user__name { + margin-left: 5px; +} +.tox[dir=rtl] .tox-user__avatar svg { + margin-left: 5px; +} +.tox[dir=rtl] .tox-user__avatar + .tox-user__name { + margin-right: 5px; +} +.tox .tox-dialog-wrap { + align-items: center; + bottom: 0; + display: flex; + justify-content: center; + left: 0; + position: fixed; + right: 0; + top: 0; + z-index: 1100; +} +.tox .tox-dialog-wrap__backdrop { + background-color: rgba(255, 255, 255, 0.75); + bottom: 0; + left: 0; + position: absolute; + right: 0; + top: 0; + z-index: 1; +} +.tox .tox-dialog-wrap__backdrop--opaque { + background-color: #fff; +} +.tox .tox-dialog { + background-color: #fff; + border-color: #d9d9d9; + border-radius: 3px; + border-style: solid; + border-width: 1px; + box-shadow: 0 16px 16px -10px rgba(84, 111, 94, 0.15), 0 0 40px 1px rgba(84, 111, 94, 0.15); + display: flex; + flex-direction: column; + max-height: 100%; + max-width: 480px; + overflow: hidden; + position: relative; + width: 95vw; + z-index: 2; +} +@media only screen and (max-width:767px) { + body:not(.tox-force-desktop) .tox .tox-dialog { + align-self: flex-start; + margin: 5px auto; + width: calc(100vw - 10px); + } +} +.tox .tox-dialog-inline { + z-index: 1100; +} +.tox .tox-dialog__header { + align-items: center; + background-color: #fff; + border-bottom: none; + color: rgba(84, 111, 94, 0.85); + display: flex; + font-size: 10px; + justify-content: space-between; + padding: 5px 10px 0 10px; + position: relative; +} +.tox .tox-dialog__header .tox-button { + z-index: 1; +} +.tox .tox-dialog__draghandle { + cursor: grab; + height: 100%; + left: 0; + position: absolute; + top: 0; + width: 100%; +} +.tox .tox-dialog__draghandle:active { + cursor: grabbing; +} +.tox .tox-dialog__dismiss { + margin-left: auto; +} +.tox .tox-dialog__title { + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; + font-size: 12.5px; + font-style: normal; + font-weight: normal; + line-height: 1.3; + margin: 0; + text-transform: none; +} +.tox .tox-dialog__body { + color: rgba(84, 111, 94, 0.85); + display: flex; + flex: 1; + -ms-flex-preferred-size: auto; + font-size: 10px; + font-style: normal; + font-weight: normal; + line-height: 1.3; + min-width: 0; + text-align: left; + text-transform: none; +} +@media only screen and (max-width:767px) { + body:not(.tox-force-desktop) .tox .tox-dialog__body { + flex-direction: column; + } +} +.tox .tox-dialog__body-nav { + align-items: flex-start; + display: flex; + flex-direction: column; + padding: 10px 10px; +} +@media only screen and (max-width:767px) { + body:not(.tox-force-desktop) .tox .tox-dialog__body-nav { + flex-direction: row; + -webkit-overflow-scrolling: touch; + overflow-x: auto; + padding-bottom: 0; + } +} +.tox .tox-dialog__body-nav-item { + border-bottom: 2px solid transparent; + color: rgba(84, 111, 94, 0.7); + display: inline-block; + font-size: 8.75px; + line-height: 1.3; + margin-bottom: 5px; + text-decoration: none; + white-space: nowrap; +} +.tox .tox-dialog__body-nav-item:focus { + background-color: rgba(10, 143, 233, 0.1); +} +.tox .tox-dialog__body-nav-item--active { + border-bottom: 2px solid #0a8fe9; + color: #0a8fe9; +} +.tox .tox-dialog__body-content { + box-sizing: border-box; + display: flex; + flex: 1; + flex-direction: column; + -ms-flex-preferred-size: auto; + max-height: 650px; + overflow: auto; + -webkit-overflow-scrolling: touch; + padding: 10px 10px; +} +.tox .tox-dialog__body-content > * { + margin-bottom: 0; + margin-top: 10px; +} +.tox .tox-dialog__body-content > *:first-child { + margin-top: 0; +} +.tox .tox-dialog__body-content > *:last-child { + margin-bottom: 0; +} +.tox .tox-dialog__body-content > *:only-child { + margin-bottom: 0; + margin-top: 0; +} +.tox .tox-dialog__body-content a { + color: #0a8fe9; + cursor: pointer; + text-decoration: none; +} +.tox .tox-dialog__body-content a:hover, +.tox .tox-dialog__body-content a:focus { + color: #0871b8; + text-decoration: none; +} +.tox .tox-dialog__body-content a:active { + color: #0871b8; + text-decoration: none; +} +.tox .tox-dialog__body-content svg { + fill: rgba(84, 111, 94, 0.85); +} +.tox .tox-dialog__body-content ul { + display: block; + list-style-type: disc; + margin-bottom: 10px; + -webkit-margin-end: 0; + margin-inline-end: 0; + -webkit-margin-start: 0; + margin-inline-start: 0; + -webkit-padding-start: 2.5rem; + padding-inline-start: 2.5rem; +} +.tox .tox-dialog__body-content .tox-form__group h1 { + color: rgba(84, 111, 94, 0.85); + font-size: 12.5px; + font-style: normal; + font-weight: normal; + letter-spacing: normal; + margin-bottom: 10px; + margin-top: 2rem; + text-transform: none; +} +.tox .tox-dialog__body-content .tox-form__group h2 { + color: rgba(84, 111, 94, 0.85); + font-size: 10px; + font-style: normal; + font-weight: normal; + letter-spacing: normal; + margin-bottom: 10px; + margin-top: 2rem; + text-transform: none; +} +.tox .tox-dialog__body-content .tox-form__group p { + margin-bottom: 10px; +} +.tox .tox-dialog__body-content .tox-form__group h1:first-child, +.tox .tox-dialog__body-content .tox-form__group h2:first-child, +.tox .tox-dialog__body-content .tox-form__group p:first-child { + margin-top: 0; +} +.tox .tox-dialog__body-content .tox-form__group h1:last-child, +.tox .tox-dialog__body-content .tox-form__group h2:last-child, +.tox .tox-dialog__body-content .tox-form__group p:last-child { + margin-bottom: 0; +} +.tox .tox-dialog__body-content .tox-form__group h1:only-child, +.tox .tox-dialog__body-content .tox-form__group h2:only-child, +.tox .tox-dialog__body-content .tox-form__group p:only-child { + margin-bottom: 0; + margin-top: 0; +} +.tox .tox-dialog--width-lg { + height: 650px; + max-width: 1200px; +} +.tox .tox-dialog--width-md { + max-width: 800px; +} +.tox .tox-dialog--width-md .tox-dialog__body-content { + overflow: auto; +} +.tox .tox-dialog__body-content--centered { + text-align: center; +} +.tox .tox-dialog__footer { + align-items: center; + background-color: #fff; + border-top: 1px solid #d9d9d9; + display: flex; + justify-content: space-between; + padding: 5px 10px; +} +.tox .tox-dialog__footer-start, +.tox .tox-dialog__footer-end { + display: flex; +} +.tox .tox-dialog__busy-spinner { + align-items: center; + background-color: rgba(255, 255, 255, 0.75); + bottom: 0; + display: flex; + justify-content: center; + left: 0; + position: absolute; + right: 0; + top: 0; + z-index: 3; +} +.tox .tox-dialog__table { + border-collapse: collapse; + width: 100%; +} +.tox .tox-dialog__table thead th { + font-weight: normal; + padding-bottom: 5px; +} +.tox .tox-dialog__table tbody tr { + border-bottom: 1px solid #d9d9d9; +} +.tox .tox-dialog__table tbody tr:last-child { + border-bottom: none; +} +.tox .tox-dialog__table td { + padding-bottom: 5px; + padding-top: 5px; +} +.tox .tox-dialog__popups { + position: absolute; + width: 100%; + z-index: 1100; +} +.tox .tox-dialog__body-iframe { + display: flex; + flex: 1; + flex-direction: column; + -ms-flex-preferred-size: auto; +} +.tox .tox-dialog__body-iframe .tox-navobj { + display: flex; + flex: 1; + -ms-flex-preferred-size: auto; +} +.tox .tox-dialog__body-iframe .tox-navobj :nth-child(2) { + flex: 1; + -ms-flex-preferred-size: auto; + height: 100%; +} +.tox .tox-dialog-dock-fadeout { + opacity: 0; + visibility: hidden; +} +.tox .tox-dialog-dock-fadein { + opacity: 1; + visibility: visible; +} +.tox .tox-dialog-dock-transition { + transition: visibility 0s linear 0.3s, opacity 0.3s ease; +} +.tox .tox-dialog-dock-transition.tox-dialog-dock-fadein { + transition-delay: 0s; +} +.tox.tox-platform-ie { + /* IE11 CSS styles go here */ +} +.tox.tox-platform-ie .tox-dialog-wrap { + position: -ms-device-fixed; +} +@media only screen and (max-width:767px) { + body:not(.tox-force-desktop) .tox:not([dir=rtl]) .tox-dialog__body-nav { + margin-right: 0; + } +} +@media only screen and (max-width:767px) { + body:not(.tox-force-desktop) .tox:not([dir=rtl]) .tox-dialog__body-nav-item:not(:first-child) { + margin-left: 5px; + } +} +.tox:not([dir=rtl]) .tox-dialog__footer .tox-dialog__footer-start > *, +.tox:not([dir=rtl]) .tox-dialog__footer .tox-dialog__footer-end > * { + margin-left: 5px; +} +.tox[dir=rtl] .tox-dialog__body { + text-align: right; +} +@media only screen and (max-width:767px) { + body:not(.tox-force-desktop) .tox[dir=rtl] .tox-dialog__body-nav { + margin-left: 0; + } +} +@media only screen and (max-width:767px) { + body:not(.tox-force-desktop) .tox[dir=rtl] .tox-dialog__body-nav-item:not(:first-child) { + margin-right: 5px; + } +} +.tox[dir=rtl] .tox-dialog__footer .tox-dialog__footer-start > *, +.tox[dir=rtl] .tox-dialog__footer .tox-dialog__footer-end > * { + margin-right: 5px; +} +body.tox-dialog__disable-scroll { + overflow: hidden; +} +.tox .tox-dropzone-container { + display: flex; + flex: 1; + -ms-flex-preferred-size: auto; +} +.tox .tox-dropzone { + align-items: center; + background: #fff; + border: 2px dashed #d9d9d9; + box-sizing: border-box; + display: flex; + flex-direction: column; + flex-grow: 1; + justify-content: center; + min-height: 100px; + padding: 10px; +} +.tox .tox-dropzone p { + color: rgba(84, 111, 94, 0.7); + margin: 0 0 10px 0; +} +.tox .tox-edit-area { + display: flex; + flex: 1; + -ms-flex-preferred-size: auto; + overflow: hidden; + position: relative; +} +.tox .tox-edit-area__iframe { + background-color: #fff; + border: 0; + box-sizing: border-box; + flex: 1; + -ms-flex-preferred-size: auto; + height: 100%; + position: absolute; + width: 100%; +} +.tox.tox-inline-edit-area { + border: 1px dotted #d9d9d9; +} +.tox .tox-editor-container { + display: flex; + flex: 1 1 auto; + flex-direction: column; + overflow: hidden; +} +.tox .tox-editor-header { + z-index: 1; +} +.tox:not(.tox-tinymce-inline) .tox-editor-header { + box-shadow: none; + transition: box-shadow 0.5s; +} +.tox.tox-tinymce--toolbar-bottom .tox-editor-header, +.tox.tox-tinymce-inline .tox-editor-header { + margin-bottom: -1px; +} +.tox.tox-tinymce--toolbar-sticky-on .tox-editor-header { + background-color: transparent; + box-shadow: 0 4px 4px -3px rgba(0, 0, 0, 0.25); +} +.tox-editor-dock-fadeout { + opacity: 0; + visibility: hidden; +} +.tox-editor-dock-fadein { + opacity: 1; + visibility: visible; +} +.tox-editor-dock-transition { + transition: visibility 0s linear 0.25s, opacity 0.25s ease; +} +.tox-editor-dock-transition.tox-editor-dock-fadein { + transition-delay: 0s; +} +.tox .tox-control-wrap { + flex: 1; + position: relative; +} +.tox .tox-control-wrap:not(.tox-control-wrap--status-invalid) .tox-control-wrap__status-icon-invalid, +.tox .tox-control-wrap:not(.tox-control-wrap--status-unknown) .tox-control-wrap__status-icon-unknown, +.tox .tox-control-wrap:not(.tox-control-wrap--status-valid) .tox-control-wrap__status-icon-valid { + display: none; +} +.tox .tox-control-wrap svg { + display: block; +} +.tox .tox-control-wrap__status-icon-wrap { + position: absolute; + top: 50%; + transform: translateY(-50%); +} +.tox .tox-control-wrap__status-icon-invalid svg { + fill: #c00; +} +.tox .tox-control-wrap__status-icon-unknown svg { + fill: orange; +} +.tox .tox-control-wrap__status-icon-valid svg { + fill: green; +} +.tox:not([dir=rtl]) .tox-control-wrap--status-invalid .tox-textfield, +.tox:not([dir=rtl]) .tox-control-wrap--status-unknown .tox-textfield, +.tox:not([dir=rtl]) .tox-control-wrap--status-valid .tox-textfield { + padding-right: 20px; +} +.tox:not([dir=rtl]) .tox-control-wrap__status-icon-wrap { + right: 2.5px; +} +.tox[dir=rtl] .tox-control-wrap--status-invalid .tox-textfield, +.tox[dir=rtl] .tox-control-wrap--status-unknown .tox-textfield, +.tox[dir=rtl] .tox-control-wrap--status-valid .tox-textfield { + padding-left: 20px; +} +.tox[dir=rtl] .tox-control-wrap__status-icon-wrap { + left: 2.5px; +} +.tox .tox-autocompleter { + max-width: 25em; +} +.tox .tox-autocompleter .tox-menu { + max-width: 25em; +} +.tox .tox-autocompleter .tox-autocompleter-highlight { + font-weight: normal; +} +.tox .tox-color-input { + display: flex; + position: relative; + z-index: 1; +} +.tox .tox-color-input .tox-textfield { + z-index: -1; +} +.tox .tox-color-input span { + border-color: rgba(84, 111, 94, 0.2); + border-radius: 3px; + border-style: solid; + border-width: 1px; + box-shadow: none; + box-sizing: border-box; + height: 24px; + position: absolute; + top: 6px; + width: 24px; +} +.tox .tox-color-input span:hover:not([aria-disabled=true]), +.tox .tox-color-input span:focus:not([aria-disabled=true]) { + border-color: #0a8fe9; + cursor: pointer; +} +.tox .tox-color-input span::before { + background-image: linear-gradient(45deg, rgba(0, 0, 0, 0.25) 25%, transparent 25%), linear-gradient(-45deg, rgba(0, 0, 0, 0.25) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, rgba(0, 0, 0, 0.25) 75%), linear-gradient(-45deg, transparent 75%, rgba(0, 0, 0, 0.25) 75%); + background-position: 0 0, 0 6px, 6px -6px, -6px 0; + background-size: 12px 12px; + border: 1px solid #fff; + border-radius: 3px; + box-sizing: border-box; + content: ''; + height: 24px; + left: -1px; + position: absolute; + top: -1px; + width: 24px; + z-index: -1; +} +.tox .tox-color-input span[aria-disabled=true] { + cursor: not-allowed; +} +.tox:not([dir=rtl]) .tox-color-input { + /* stylelint-disable-next-line no-descending-specificity */ +} +.tox:not([dir=rtl]) .tox-color-input .tox-textfield { + padding-left: 36px; +} +.tox:not([dir=rtl]) .tox-color-input span { + left: 6px; +} +.tox[dir="rtl"] .tox-color-input { + /* stylelint-disable-next-line no-descending-specificity */ +} +.tox[dir="rtl"] .tox-color-input .tox-textfield { + padding-right: 36px; +} +.tox[dir="rtl"] .tox-color-input span { + right: 6px; +} +.tox .tox-label, +.tox .tox-toolbar-label { + color: rgba(84, 111, 94, 0.7); + display: block; + font-size: 8.75px; + font-style: normal; + font-weight: normal; + line-height: 1.3; + padding: 0 5px 0 0; + text-transform: none; + white-space: nowrap; +} +.tox .tox-toolbar-label { + padding: 0 5px; +} +.tox[dir=rtl] .tox-label { + padding: 0 0 0 5px; +} +.tox .tox-form { + display: flex; + flex: 1; + flex-direction: column; + -ms-flex-preferred-size: auto; +} +.tox .tox-form__group { + box-sizing: border-box; + margin-bottom: 2.5px; +} +.tox .tox-form-group--maximize { + flex: 1; +} +.tox .tox-form__group--error { + color: #c00; +} +.tox .tox-form__group--collection { + display: flex; +} +.tox .tox-form__grid { + display: flex; + flex-direction: row; + flex-wrap: wrap; + justify-content: space-between; +} +.tox .tox-form__grid--2col > .tox-form__group { + width: calc(50% - (5px / 2)); +} +.tox .tox-form__grid--3col > .tox-form__group { + width: calc(100% / 3 - (5px / 2)); +} +.tox .tox-form__grid--4col > .tox-form__group { + width: calc(25% - (5px / 2)); +} +.tox .tox-form__controls-h-stack { + align-items: center; + display: flex; +} +.tox .tox-form__group--inline { + align-items: center; + display: flex; +} +.tox .tox-form__group--stretched { + display: flex; + flex: 1; + flex-direction: column; + -ms-flex-preferred-size: auto; +} +.tox .tox-form__group--stretched .tox-textarea { + flex: 1; + -ms-flex-preferred-size: auto; +} +.tox .tox-form__group--stretched .tox-navobj { + display: flex; + flex: 1; + -ms-flex-preferred-size: auto; +} +.tox .tox-form__group--stretched .tox-navobj :nth-child(2) { + flex: 1; + -ms-flex-preferred-size: auto; + height: 100%; +} +.tox:not([dir=rtl]) .tox-form__controls-h-stack > *:not(:first-child) { + margin-left: 2.5px; +} +.tox[dir=rtl] .tox-form__controls-h-stack > *:not(:first-child) { + margin-right: 2.5px; +} +.tox .tox-lock.tox-locked .tox-lock-icon__unlock, +.tox .tox-lock:not(.tox-locked) .tox-lock-icon__lock { + display: none; +} +.tox .tox-textfield, +.tox .tox-toolbar-textfield, +.tox .tox-listboxfield .tox-listbox--select, +.tox .tox-textarea { + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + background-color: #fff; + border-color: #d9d9d9; + border-radius: 3px; + border-style: solid; + border-width: 1px; + box-shadow: none; + box-sizing: border-box; + color: rgba(84, 111, 94, 0.85); + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; + font-size: 10px; + line-height: 24px; + margin: 0; + min-height: 34px; + outline: none; + padding: 5px 3.25px; + resize: none; + width: 100%; +} +.tox .tox-textfield[disabled], +.tox .tox-textarea[disabled] { + background-color: #f2f2f2; + color: rgba(84, 111, 94, 0.85); + cursor: not-allowed; +} +.tox .tox-textfield:focus, +.tox .tox-listboxfield .tox-listbox--select:focus, +.tox .tox-textarea:focus { + background-color: #fff; + border-color: #0a8fe9; + box-shadow: none; + outline: none; +} +.tox .tox-toolbar-textfield { + border-width: 0; + margin-bottom: 3px; + margin-top: 2px; + max-width: 250px; +} +.tox .tox-naked-btn { + background-color: transparent; + border: 0; + border-color: transparent; + box-shadow: unset; + color: #0a8fe9; + cursor: pointer; + display: block; + margin: 0; + padding: 0; +} +.tox .tox-naked-btn svg { + display: block; + fill: rgba(84, 111, 94, 0.85); +} +.tox:not([dir=rtl]) .tox-toolbar-textfield + * { + margin-left: 2.5px; +} +.tox[dir=rtl] .tox-toolbar-textfield + * { + margin-right: 2.5px; +} +.tox .tox-listboxfield { + cursor: pointer; + position: relative; +} +.tox .tox-listboxfield .tox-listbox--select[disabled] { + background-color: #f2f2f2; + color: rgba(84, 111, 94, 0.85); + cursor: not-allowed; +} +.tox .tox-listbox__select-label { + cursor: default; + flex: 1; + margin: 0 4px; +} +.tox .tox-listbox__select-chevron { + align-items: center; + display: flex; + justify-content: center; + width: 10px; +} +.tox .tox-listbox__select-chevron svg { + fill: rgba(84, 111, 94, 0.85); +} +.tox .tox-listboxfield .tox-listbox--select { + align-items: center; + display: flex; +} +.tox:not([dir=rtl]) .tox-listboxfield svg { + right: 5px; +} +.tox[dir=rtl] .tox-listboxfield svg { + left: 5px; +} +.tox .tox-selectfield { + cursor: pointer; + position: relative; +} +.tox .tox-selectfield select { + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + background-color: #fff; + border-color: #d9d9d9; + border-radius: 3px; + border-style: solid; + border-width: 1px; + box-shadow: none; + box-sizing: border-box; + color: rgba(84, 111, 94, 0.85); + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; + font-size: 10px; + line-height: 24px; + margin: 0; + min-height: 34px; + outline: none; + padding: 5px 3.25px; + resize: none; + width: 100%; +} +.tox .tox-selectfield select[disabled] { + background-color: #f2f2f2; + color: rgba(84, 111, 94, 0.85); + cursor: not-allowed; +} +.tox .tox-selectfield select::-ms-expand { + display: none; +} +.tox .tox-selectfield select:focus { + background-color: #fff; + border-color: #0a8fe9; + box-shadow: none; + outline: none; +} +.tox .tox-selectfield svg { + pointer-events: none; + position: absolute; + top: 50%; + transform: translateY(-50%); +} +.tox:not([dir=rtl]) .tox-selectfield select[size="0"], +.tox:not([dir=rtl]) .tox-selectfield select[size="1"] { + padding-right: 15px; +} +.tox:not([dir=rtl]) .tox-selectfield svg { + right: 5px; +} +.tox[dir=rtl] .tox-selectfield select[size="0"], +.tox[dir=rtl] .tox-selectfield select[size="1"] { + padding-left: 15px; +} +.tox[dir=rtl] .tox-selectfield svg { + left: 5px; +} +.tox .tox-textarea { + -webkit-appearance: textarea; + -moz-appearance: textarea; + appearance: textarea; + white-space: pre-wrap; +} +.tox-fullscreen { + border: 0; + height: 100%; + left: 0; + margin: 0; + overflow: hidden; + -ms-scroll-chaining: none; + overscroll-behavior: none; + padding: 0; + position: fixed; + top: 0; + touch-action: pinch-zoom; + width: 100%; +} +.tox.tox-tinymce.tox-fullscreen .tox-statusbar__resize-handle { + display: none; +} +.tox.tox-tinymce.tox-fullscreen { + background-color: transparent; + z-index: 1200; +} +.tox-shadowhost.tox-fullscreen { + z-index: 1200; +} +.tox-fullscreen .tox.tox-tinymce-aux, +.tox-fullscreen ~ .tox.tox-tinymce-aux { + z-index: 1201; +} +.tox .tox-help__more-link { + list-style: none; + margin-top: 1em; +} +.tox .tox-image-tools { + width: 100%; +} +.tox .tox-image-tools__toolbar { + align-items: center; + display: flex; + justify-content: center; +} +.tox .tox-image-tools__image { + background-color: #666; + height: 380px; + overflow: auto; + position: relative; + width: 100%; +} +.tox .tox-image-tools__image, +.tox .tox-image-tools__image + .tox-image-tools__toolbar { + margin-top: 5px; +} +.tox .tox-image-tools__image-bg { + background: url(data:image/gif;base64,R0lGODdhDAAMAIABAMzMzP///ywAAAAADAAMAAACFoQfqYeabNyDMkBQb81Uat85nxguUAEAOw==); +} +.tox .tox-image-tools__toolbar > .tox-spacer { + flex: 1; + -ms-flex-preferred-size: auto; +} +.tox .tox-croprect-block { + background: black; + filter: alpha(opacity=50); + opacity: 0.5; + position: absolute; + zoom: 1; +} +.tox .tox-croprect-handle { + border: 2px solid white; + height: 20px; + left: 0; + position: absolute; + top: 0; + width: 20px; +} +.tox .tox-croprect-handle-move { + border: 0; + cursor: move; + position: absolute; +} +.tox .tox-croprect-handle-nw { + border-width: 2px 0 0 2px; + cursor: nw-resize; + left: 100px; + margin: -2px 0 0 -2px; + top: 100px; +} +.tox .tox-croprect-handle-ne { + border-width: 2px 2px 0 0; + cursor: ne-resize; + left: 200px; + margin: -2px 0 0 -20px; + top: 100px; +} +.tox .tox-croprect-handle-sw { + border-width: 0 0 2px 2px; + cursor: sw-resize; + left: 100px; + margin: -20px 2px 0 -2px; + top: 200px; +} +.tox .tox-croprect-handle-se { + border-width: 0 2px 2px 0; + cursor: se-resize; + left: 200px; + margin: -20px 0 0 -20px; + top: 200px; +} +.tox:not([dir=rtl]) .tox-image-tools__toolbar > .tox-slider:not(:first-of-type) { + margin-left: 5px; +} +.tox:not([dir=rtl]) .tox-image-tools__toolbar > .tox-button + .tox-slider { + margin-left: 20px; +} +.tox:not([dir=rtl]) .tox-image-tools__toolbar > .tox-slider + .tox-button { + margin-left: 20px; +} +.tox[dir=rtl] .tox-image-tools__toolbar > .tox-slider:not(:first-of-type) { + margin-right: 5px; +} +.tox[dir=rtl] .tox-image-tools__toolbar > .tox-button + .tox-slider { + margin-right: 20px; +} +.tox[dir=rtl] .tox-image-tools__toolbar > .tox-slider + .tox-button { + margin-right: 20px; +} +.tox .tox-insert-table-picker { + display: flex; + flex-wrap: wrap; + width: 110px; +} +.tox .tox-insert-table-picker > div { + border-color: #d9d9d9; + border-style: solid; + border-width: 0 1px 1px 0; + box-sizing: border-box; + height: 11px; + width: 11px; +} +.tox .tox-collection--list .tox-collection__group .tox-insert-table-picker { + margin: -2.5px 0; +} +.tox .tox-insert-table-picker .tox-insert-table-picker__selected { + background-color: rgba(10, 143, 233, 0.5); + border-color: rgba(10, 143, 233, 0.5); +} +.tox .tox-insert-table-picker__label { + color: rgba(84, 111, 94, 0.7); + display: block; + font-size: 8.75px; + padding: 2.5px; + text-align: center; + width: 100%; +} +.tox:not([dir=rtl]) { + /* stylelint-disable-next-line no-descending-specificity */ +} +.tox:not([dir=rtl]) .tox-insert-table-picker > div:nth-child(10n) { + border-right: 0; +} +.tox[dir=rtl] { + /* stylelint-disable-next-line no-descending-specificity */ +} +.tox[dir=rtl] .tox-insert-table-picker > div:nth-child(10n+1) { + border-right: 0; +} +.tox { + /* stylelint-disable */ + /* stylelint-enable */ +} +.tox .tox-menu { + background-color: #fff; + border: 1px solid #d9d9d9; + border-radius: 3px; + box-shadow: 0 4px 8px 0 rgba(84, 111, 94, 0.1); + display: inline-block; + overflow: hidden; + vertical-align: top; + z-index: 1150; +} +.tox .tox-menu.tox-collection.tox-collection--list { + padding: 0; +} +.tox .tox-menu.tox-collection.tox-collection--toolbar { + padding: 2.5px; +} +.tox .tox-menu.tox-collection.tox-collection--grid { + padding: 2.5px; +} +.tox .tox-menu__label h1, +.tox .tox-menu__label h2, +.tox .tox-menu__label h3, +.tox .tox-menu__label h4, +.tox .tox-menu__label h5, +.tox .tox-menu__label h6, +.tox .tox-menu__label p, +.tox .tox-menu__label blockquote, +.tox .tox-menu__label code { + margin: 0; +} +.tox .tox-menubar { + background: url("data:image/svg+xml;charset=utf8,%3Csvg height='39px' viewBox='0 0 40 39px' width='40' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='0' y='38px' width='100' height='1' fill='%23d9d9d9'/%3E%3C/svg%3E") left 0 top 0 #fff; + background-color: #fff; + display: flex; + flex: 0 0 auto; + flex-shrink: 0; + flex-wrap: wrap; + padding: 0 4px 0 4px; +} +.tox.tox-tinymce:not(.tox-tinymce-inline) .tox-editor-header:not(:first-child) .tox-menubar { + border-top: 1px solid #d9d9d9; +} +/* Deprecated. Remove in next major release */ +.tox .tox-mbtn { + align-items: center; + background: transparent; + border: 0; + border-radius: 3px; + box-shadow: none; + color: #817f7c; + display: flex; + flex: 0 0 auto; + font-size: 8.75px; + font-style: normal; + font-weight: normal; + height: 34px; + justify-content: center; + margin: 2px 0 3px 0; + outline: none; + overflow: hidden; + padding: 0 4px; + text-transform: none; + width: auto; +} +.tox .tox-mbtn[disabled] { + background-color: transparent; + border: 0; + box-shadow: none; + color: rgba(129, 127, 124, 0.5); + cursor: not-allowed; +} +.tox .tox-mbtn:focus:not(:disabled) { + background: #e5e9e7; + border: 0; + box-shadow: none; + color: #0a9fe5; +} +.tox .tox-mbtn--active { + background: #e5e9e7; + border: 0; + box-shadow: none; + color: rgba(41, 159, 250, 0.88); +} +.tox .tox-mbtn:hover:not(:disabled):not(.tox-mbtn--active) { + background: #e5e9e7; + border: 0; + box-shadow: none; + color: #0a9fe5; +} +.tox .tox-mbtn__select-label { + cursor: default; + font-weight: normal; + margin: 0 4px; +} +.tox .tox-mbtn[disabled] .tox-mbtn__select-label { + cursor: not-allowed; +} +.tox .tox-mbtn__select-chevron { + align-items: center; + display: flex; + justify-content: center; + width: 16px; + display: none; +} +.tox .tox-notification { + border-radius: 3px; + border-style: solid; + border-width: 1px; + box-shadow: none; + box-sizing: border-box; + display: -ms-grid; + display: grid; + font-size: 8.75px; + font-weight: normal; + -ms-grid-columns: minmax(40px, 1fr) auto minmax(40px, 1fr); + grid-template-columns: minmax(40px, 1fr) auto minmax(40px, 1fr); + margin-top: 2.5px; + opacity: 0; + padding: 2.5px; + transition: transform 100ms ease-in, opacity 150ms ease-in; +} +.tox .tox-notification p { + font-size: 8.75px; + font-weight: normal; +} +.tox .tox-notification a { + cursor: pointer; + text-decoration: underline; +} +.tox .tox-notification--in { + opacity: 1; +} +.tox .tox-notification--success { + background-color: #e4eeda; + border-color: #d7e6c8; + color: rgba(84, 111, 94, 0.85); +} +.tox .tox-notification--success p { + color: rgba(84, 111, 94, 0.85); +} +.tox .tox-notification--success a { + color: #547831; +} +.tox .tox-notification--success svg { + fill: rgba(84, 111, 94, 0.85); +} +.tox .tox-notification--error { + background-color: #f8dede; + border-color: #f2bfbf; + color: rgba(84, 111, 94, 0.85); +} +.tox .tox-notification--error p { + color: rgba(84, 111, 94, 0.85); +} +.tox .tox-notification--error a { + color: #c00; +} +.tox .tox-notification--error svg { + fill: rgba(84, 111, 94, 0.85); +} +.tox .tox-notification--warn, +.tox .tox-notification--warning { + background-color: #fffaea; + border-color: #ffe89d; + color: rgba(84, 111, 94, 0.85); +} +.tox .tox-notification--warn p, +.tox .tox-notification--warning p { + color: rgba(84, 111, 94, 0.85); +} +.tox .tox-notification--warn a, +.tox .tox-notification--warning a { + color: rgba(84, 111, 94, 0.85); +} +.tox .tox-notification--warn svg, +.tox .tox-notification--warning svg { + fill: rgba(84, 111, 94, 0.85); +} +.tox .tox-notification--info { + background-color: #d9edf7; + border-color: #779ecb; + color: rgba(84, 111, 94, 0.85); +} +.tox .tox-notification--info p { + color: rgba(84, 111, 94, 0.85); +} +.tox .tox-notification--info a { + color: rgba(84, 111, 94, 0.85); +} +.tox .tox-notification--info svg { + fill: rgba(84, 111, 94, 0.85); +} +.tox .tox-notification__body { + -ms-grid-row-align: center; + align-self: center; + color: rgba(84, 111, 94, 0.85); + font-size: 14px; + -ms-grid-column-span: 1; + grid-column-end: 3; + -ms-grid-column: 2; + grid-column-start: 2; + -ms-grid-row-span: 1; + grid-row-end: 2; + -ms-grid-row: 1; + grid-row-start: 1; + text-align: center; + white-space: normal; + word-break: break-all; + word-break: break-word; +} +.tox .tox-notification__body > * { + margin: 0; +} +.tox .tox-notification__body > * + * { + margin-top: 1rem; +} +.tox .tox-notification__icon { + -ms-grid-row-align: center; + align-self: center; + -ms-grid-column-span: 1; + grid-column-end: 2; + -ms-grid-column: 1; + grid-column-start: 1; + -ms-grid-row-span: 1; + grid-row-end: 2; + -ms-grid-row: 1; + grid-row-start: 1; + -ms-grid-column-align: end; + justify-self: end; +} +.tox .tox-notification__icon svg { + display: block; +} +.tox .tox-notification__dismiss { + -ms-grid-row-align: start; + align-self: start; + -ms-grid-column-span: 1; + grid-column-end: 4; + -ms-grid-column: 3; + grid-column-start: 3; + -ms-grid-row-span: 1; + grid-row-end: 2; + -ms-grid-row: 1; + grid-row-start: 1; + -ms-grid-column-align: end; + justify-self: end; +} +.tox .tox-notification .tox-progress-bar { + -ms-grid-column-span: 3; + grid-column-end: 4; + -ms-grid-column: 1; + grid-column-start: 1; + -ms-grid-row-span: 1; + grid-row-end: 3; + -ms-grid-row: 2; + grid-row-start: 2; + -ms-grid-column-align: center; + justify-self: center; +} +.tox .tox-pop { + display: inline-block; + position: relative; +} +.tox .tox-pop--resizing { + transition: width 0.1s ease; +} +.tox .tox-pop--resizing .tox-toolbar, +.tox .tox-pop--resizing .tox-toolbar__group { + flex-wrap: nowrap; +} +.tox .tox-pop--transition { + transition: 0.15s ease; + transition-property: left, right, top, bottom; +} +.tox .tox-pop--transition::before, +.tox .tox-pop--transition::after { + transition: all 0.15s, visibility 0s, opacity 0.075s ease 0.075s; +} +.tox .tox-pop__dialog { + background-color: #fff; + border: 1px solid #d9d9d9; + border-radius: 3px; + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15); + min-width: 0; + overflow: hidden; +} +.tox .tox-pop__dialog > *:not(.tox-toolbar) { + margin: 2.5px 2.5px 2.5px 5px; +} +.tox .tox-pop__dialog .tox-toolbar { + background-color: transparent; + margin-bottom: -1px; +} +.tox .tox-pop::before, +.tox .tox-pop::after { + border-style: solid; + content: ''; + display: block; + height: 0; + opacity: 1; + position: absolute; + width: 0; +} +.tox .tox-pop.tox-pop--inset::before, +.tox .tox-pop.tox-pop--inset::after { + opacity: 0; + transition: all 0s 0.15s, visibility 0s, opacity 0.075s ease; +} +.tox .tox-pop.tox-pop--bottom::before, +.tox .tox-pop.tox-pop--bottom::after { + left: 50%; + top: 100%; +} +.tox .tox-pop.tox-pop--bottom::after { + border-color: #fff transparent transparent transparent; + border-width: 8px; + margin-left: -8px; + margin-top: -1px; +} +.tox .tox-pop.tox-pop--bottom::before { + border-color: #d9d9d9 transparent transparent transparent; + border-width: 9px; + margin-left: -9px; +} +.tox .tox-pop.tox-pop--top::before, +.tox .tox-pop.tox-pop--top::after { + left: 50%; + top: 0; + transform: translateY(-100%); +} +.tox .tox-pop.tox-pop--top::after { + border-color: transparent transparent #fff transparent; + border-width: 8px; + margin-left: -8px; + margin-top: 1px; +} +.tox .tox-pop.tox-pop--top::before { + border-color: transparent transparent #d9d9d9 transparent; + border-width: 9px; + margin-left: -9px; +} +.tox .tox-pop.tox-pop--left::before, +.tox .tox-pop.tox-pop--left::after { + left: 0; + top: calc(50% - 1px); + transform: translateY(-50%); +} +.tox .tox-pop.tox-pop--left::after { + border-color: transparent #fff transparent transparent; + border-width: 8px; + margin-left: -15px; +} +.tox .tox-pop.tox-pop--left::before { + border-color: transparent #d9d9d9 transparent transparent; + border-width: 10px; + margin-left: -19px; +} +.tox .tox-pop.tox-pop--right::before, +.tox .tox-pop.tox-pop--right::after { + left: 100%; + top: calc(50% + 1px); + transform: translateY(-50%); +} +.tox .tox-pop.tox-pop--right::after { + border-color: transparent transparent transparent #fff; + border-width: 8px; + margin-left: -1px; +} +.tox .tox-pop.tox-pop--right::before { + border-color: transparent transparent transparent #d9d9d9; + border-width: 10px; + margin-left: -1px; +} +.tox .tox-pop.tox-pop--align-left::before, +.tox .tox-pop.tox-pop--align-left::after { + left: 20px; +} +.tox .tox-pop.tox-pop--align-right::before, +.tox .tox-pop.tox-pop--align-right::after { + left: calc(100% - 20px); +} +.tox .tox-sidebar-wrap { + display: flex; + flex-direction: row; + flex-grow: 1; + -ms-flex-preferred-size: 0; + min-height: 0; +} +.tox .tox-sidebar { + background-color: #fff; + display: flex; + flex-direction: row; + justify-content: flex-end; +} +.tox .tox-sidebar__slider { + display: flex; + overflow: hidden; +} +.tox .tox-sidebar__pane-container { + display: flex; +} +.tox .tox-sidebar__pane { + display: flex; +} +.tox .tox-sidebar--sliding-closed { + opacity: 0; +} +.tox .tox-sidebar--sliding-open { + opacity: 1; +} +.tox .tox-sidebar--sliding-growing, +.tox .tox-sidebar--sliding-shrinking { + transition: width 0.5s ease, opacity 0.5s ease; +} +.tox .tox-selector { + background-color: #4099ff; + border-color: #4099ff; + border-style: solid; + border-width: 1px; + box-sizing: border-box; + display: inline-block; + height: 10px; + position: absolute; + width: 10px; +} +.tox.tox-platform-touch .tox-selector { + height: 12px; + width: 12px; +} +.tox .tox-slider { + align-items: center; + display: flex; + flex: 1; + -ms-flex-preferred-size: auto; + height: 24px; + justify-content: center; + position: relative; +} +.tox .tox-slider__rail { + background-color: transparent; + border: 1px solid #d9d9d9; + border-radius: 3px; + height: 10px; + min-width: 120px; + width: 100%; +} +.tox .tox-slider__handle { + background-color: #0a8fe9; + border: 2px solid #0871b8; + border-radius: 3px; + box-shadow: none; + height: 24px; + left: 50%; + position: absolute; + top: 50%; + transform: translateX(-50%) translateY(-50%); + width: 14px; +} +.tox .tox-source-code { + overflow: auto; +} +.tox .tox-spinner { + display: flex; +} +.tox .tox-spinner > div { + animation: tam-bouncing-dots 1.5s ease-in-out 0s infinite both; + background-color: rgba(84, 111, 94, 0.7); + border-radius: 100%; + height: 5px; + width: 5px; +} +.tox .tox-spinner > div:nth-child(1) { + animation-delay: -0.32s; +} +.tox .tox-spinner > div:nth-child(2) { + animation-delay: -0.16s; +} +@keyframes tam-bouncing-dots { + 0%, + 80%, + 100% { + transform: scale(0); + } + 40% { + transform: scale(1); + } +} +.tox:not([dir=rtl]) .tox-spinner > div:not(:first-child) { + margin-left: 2.5px; +} +.tox[dir=rtl] .tox-spinner > div:not(:first-child) { + margin-right: 2.5px; +} +.tox .tox-statusbar { + align-items: center; + background-color: #fff; + border-top: 1px solid #d9d9d9; + color: rgba(84, 111, 94, 0.7); + display: flex; + flex: 0 0 auto; + font-size: 12px; + font-weight: normal; + height: 18px; + overflow: hidden; + padding: 0 5px; + position: relative; + text-transform: uppercase; +} +.tox .tox-statusbar__text-container { + display: flex; + flex: 1 1 auto; + justify-content: flex-end; + overflow: hidden; +} +.tox .tox-statusbar__path { + display: flex; + flex: 1 1 auto; + margin-right: auto; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.tox .tox-statusbar__path > * { + display: inline; + white-space: nowrap; +} +.tox .tox-statusbar__wordcount { + flex: 0 0 auto; + margin-left: 1ch; +} +.tox .tox-statusbar a, +.tox .tox-statusbar__path-item, +.tox .tox-statusbar__wordcount { + color: rgba(84, 111, 94, 0.7); + text-decoration: none; +} +.tox .tox-statusbar a:hover:not(:disabled):not([aria-disabled=true]), +.tox .tox-statusbar__path-item:hover:not(:disabled):not([aria-disabled=true]), +.tox .tox-statusbar__wordcount:hover:not(:disabled):not([aria-disabled=true]), +.tox .tox-statusbar a:focus:not(:disabled):not([aria-disabled=true]), +.tox .tox-statusbar__path-item:focus:not(:disabled):not([aria-disabled=true]), +.tox .tox-statusbar__wordcount:focus:not(:disabled):not([aria-disabled=true]) { + cursor: pointer; + text-decoration: underline; +} +.tox .tox-statusbar__resize-handle { + align-items: flex-end; + align-self: stretch; + cursor: nwse-resize; + display: flex; + flex: 0 0 auto; + justify-content: flex-end; + margin-left: auto; + margin-right: -5px; + padding-left: 1ch; +} +.tox .tox-statusbar__resize-handle svg { + display: block; + fill: rgba(84, 111, 94, 0.7); +} +.tox .tox-statusbar__resize-handle:focus svg { + background-color: #e5e9e7; + border-radius: 1px; + box-shadow: 0 0 0 2px #e5e9e7; +} +.tox:not([dir=rtl]) .tox-statusbar__path > * { + margin-right: 2.5px; +} +.tox:not([dir=rtl]) .tox-statusbar__branding { + margin-left: 1ch; +} +.tox[dir=rtl] .tox-statusbar { + flex-direction: row-reverse; +} +.tox[dir=rtl] .tox-statusbar__path > * { + margin-left: 2.5px; +} +.tox .tox-throbber { + z-index: 1299; +} +.tox .tox-throbber__busy-spinner { + align-items: center; + background-color: rgba(255, 255, 255, 0.6); + bottom: 0; + display: flex; + justify-content: center; + left: 0; + position: absolute; + right: 0; + top: 0; +} +.tox .tox-tbtn { + align-items: center; + background: transparent; + border: 0; + border-radius: 3px; + box-shadow: none; + color: #817f7c; + display: flex; + flex: 0 0 auto; + font-size: 8.75px; + font-style: normal; + font-weight: normal; + height: 34px; + justify-content: center; + margin: 2px 0 3px 0; + outline: none; + overflow: hidden; + padding: 0; + text-transform: none; + width: 34px; +} +.tox .tox-tbtn svg { + display: block; + fill: #817f7c; +} +.tox .tox-tbtn.tox-tbtn-more { + padding-left: 5px; + padding-right: 5px; + width: inherit; +} +.tox .tox-tbtn:focus { + background: #e5e9e7; + border: 0; + box-shadow: none; +} +.tox .tox-tbtn:hover { + background: #e5e9e7; + border: 0; + box-shadow: none; + color: #0a9fe5; +} +.tox .tox-tbtn:hover svg { + fill: #0a9fe5; +} +.tox .tox-tbtn:active { + background: #e5e9e7; + border: 0; + box-shadow: none; + color: rgba(41, 159, 250, 0.88); +} +.tox .tox-tbtn:active svg { + fill: rgba(41, 159, 250, 0.88); +} +.tox .tox-tbtn--disabled, +.tox .tox-tbtn--disabled:hover, +.tox .tox-tbtn:disabled, +.tox .tox-tbtn:disabled:hover { + background: transparent; + border: 0; + box-shadow: none; + color: rgba(129, 127, 124, 0.5); + cursor: not-allowed; +} +.tox .tox-tbtn--disabled svg, +.tox .tox-tbtn--disabled:hover svg, +.tox .tox-tbtn:disabled svg, +.tox .tox-tbtn:disabled:hover svg { + /* stylelint-disable-line no-descending-specificity */ + fill: rgba(129, 127, 124, 0.5); +} +.tox .tox-tbtn--enabled, +.tox .tox-tbtn--enabled:hover { + background: #e5e9e7; + border: 0; + box-shadow: none; + color: rgba(41, 159, 250, 0.88); +} +.tox .tox-tbtn--enabled > *, +.tox .tox-tbtn--enabled:hover > * { + transform: none; +} +.tox .tox-tbtn--enabled svg, +.tox .tox-tbtn--enabled:hover svg { + /* stylelint-disable-line no-descending-specificity */ + fill: rgba(41, 159, 250, 0.88); +} +.tox .tox-tbtn:focus:not(.tox-tbtn--disabled) { + color: #ee930e; +} +.tox .tox-tbtn:focus:not(.tox-tbtn--disabled) svg { + fill: #ee930e; +} +.tox .tox-tbtn:active > * { + transform: none; +} +.tox .tox-tbtn--md { + height: 51px; + width: 51px; +} +.tox .tox-tbtn--lg { + flex-direction: column; + height: 68px; + width: 68px; +} +.tox .tox-tbtn--return { + -ms-grid-row-align: stretch; + align-self: stretch; + height: unset; + width: 16px; +} +.tox .tox-tbtn--labeled { + padding: 0 4px; + width: unset; +} +.tox .tox-tbtn__vlabel { + display: block; + font-size: 10px; + font-weight: normal; + letter-spacing: -0.025em; + margin-bottom: 2.5px; + white-space: nowrap; +} +.tox .tox-tbtn--select { + margin: 2px 0 3px 0; + padding: 0 4px; + width: auto; +} +.tox .tox-tbtn__select-label { + cursor: default; + font-weight: normal; + margin: 0 4px; +} +.tox .tox-tbtn__select-chevron { + align-items: center; + display: flex; + justify-content: center; + width: 10px; +} +.tox .tox-tbtn__select-chevron svg { + fill: rgba(129, 127, 124, 0.5); +} +.tox .tox-tbtn--bespoke .tox-tbtn__select-label { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + width: 7em; +} +.tox .tox-split-button { + border: 0; + border-radius: 3px; + box-sizing: border-box; + display: flex; + margin: 2px 0 3px 0; + overflow: hidden; +} +.tox .tox-split-button:hover { + box-shadow: 0 0 0 1px #e5e9e7 inset; +} +.tox .tox-split-button:focus { + background: #e5e9e7; + box-shadow: none; + color: #ee930e; +} +.tox .tox-split-button > * { + border-radius: 0; +} +.tox .tox-split-button__chevron { + width: 10px; +} +.tox .tox-split-button__chevron svg { + fill: rgba(129, 127, 124, 0.5); +} +.tox .tox-split-button .tox-tbtn { + margin: 0; +} +.tox.tox-platform-touch .tox-split-button .tox-tbtn:first-child { + width: 30px; +} +.tox.tox-platform-touch .tox-split-button__chevron { + width: 14px; +} +.tox .tox-split-button.tox-tbtn--disabled:hover, +.tox .tox-split-button.tox-tbtn--disabled:focus, +.tox .tox-split-button.tox-tbtn--disabled .tox-tbtn:hover, +.tox .tox-split-button.tox-tbtn--disabled .tox-tbtn:focus { + background: transparent; + box-shadow: none; + color: rgba(129, 127, 124, 0.5); +} +.tox .tox-toolbar-overlord { + background-color: #fff; +} +.tox .tox-toolbar, +.tox .tox-toolbar__primary, +.tox .tox-toolbar__overflow { + background: url("data:image/svg+xml;charset=utf8,%3Csvg height='39px' viewBox='0 0 40 39px' width='40' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='0' y='38px' width='100' height='1' fill='%23d9d9d9'/%3E%3C/svg%3E") left 0 top 0 #fff; + background-color: #fff; + display: flex; + flex: 0 0 auto; + flex-shrink: 0; + flex-wrap: wrap; + padding: 0 0; +} +.tox .tox-toolbar__overflow.tox-toolbar__overflow--closed { + height: 0; + opacity: 0; + padding-bottom: 0; + padding-top: 0; + visibility: hidden; +} +.tox .tox-toolbar__overflow--growing { + transition: height 0.3s ease, opacity 0.2s linear 0.1s; +} +.tox .tox-toolbar__overflow--shrinking { + transition: opacity 0.3s ease, height 0.2s linear 0.1s, visibility 0s linear 0.3s; +} +.tox .tox-menubar + .tox-toolbar, +.tox .tox-menubar + .tox-toolbar-overlord .tox-toolbar__primary { + border-top: 1px solid #d9d9d9; + margin-top: -1px; +} +.tox .tox-toolbar--scrolling { + flex-wrap: nowrap; + overflow-x: auto; +} +.tox .tox-pop .tox-toolbar { + border-width: 0; +} +.tox .tox-toolbar--no-divider { + background-image: none; +} +.tox-tinymce:not(.tox-tinymce-inline) .tox-editor-header:not(:first-child) .tox-toolbar:first-child, +.tox-tinymce:not(.tox-tinymce-inline) .tox-editor-header:not(:first-child) .tox-toolbar-overlord:first-child .tox-toolbar__primary { + border-top: 1px solid #d9d9d9; +} +.tox.tox-tinymce-aux .tox-toolbar__overflow { + background-color: #fff; + border: 1px solid #d9d9d9; + border-radius: 3px; + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15); +} +.tox .tox-toolbar__group { + align-items: center; + display: flex; + flex-wrap: wrap; + margin: 0 0; + padding: 0 4px 0 4px; +} +.tox .tox-toolbar__group--pull-right { + margin-left: auto; +} +.tox .tox-toolbar--scrolling .tox-toolbar__group { + flex-shrink: 0; + flex-wrap: nowrap; +} +.tox:not([dir=rtl]) .tox-toolbar__group:not(:last-of-type) { + border-right: 1px solid #d9d9d9; +} +.tox[dir=rtl] .tox-toolbar__group:not(:last-of-type) { + border-left: 1px solid #d9d9d9; +} +.tox .tox-tooltip { + display: inline-block; + padding: 5px; + position: relative; +} +.tox .tox-tooltip__body { + background-color: rgba(84, 111, 94, 0.85); + border-radius: 3px; + box-shadow: 0 2px 4px rgba(84, 111, 94, 0.3); + color: rgba(255, 255, 255, 0.75); + font-size: 8.75px; + font-style: normal; + font-weight: normal; + padding: 2.5px 5px; + text-transform: none; +} +.tox .tox-tooltip__arrow { + position: absolute; +} +.tox .tox-tooltip--down .tox-tooltip__arrow { + border-left: 5px solid transparent; + border-right: 5px solid transparent; + border-top: 5px solid rgba(84, 111, 94, 0.85); + bottom: 0; + left: 50%; + position: absolute; + transform: translateX(-50%); +} +.tox .tox-tooltip--up .tox-tooltip__arrow { + border-bottom: 5px solid rgba(84, 111, 94, 0.85); + border-left: 5px solid transparent; + border-right: 5px solid transparent; + left: 50%; + position: absolute; + top: 0; + transform: translateX(-50%); +} +.tox .tox-tooltip--right .tox-tooltip__arrow { + border-bottom: 5px solid transparent; + border-left: 5px solid rgba(84, 111, 94, 0.85); + border-top: 5px solid transparent; + position: absolute; + right: 0; + top: 50%; + transform: translateY(-50%); +} +.tox .tox-tooltip--left .tox-tooltip__arrow { + border-bottom: 5px solid transparent; + border-right: 5px solid rgba(84, 111, 94, 0.85); + border-top: 5px solid transparent; + left: 0; + position: absolute; + top: 50%; + transform: translateY(-50%); +} +.tox .tox-well { + border: 1px solid #d9d9d9; + border-radius: 3px; + padding: 5px; + width: 100%; +} +.tox .tox-well > *:first-child { + margin-top: 0; +} +.tox .tox-well > *:last-child { + margin-bottom: 0; +} +.tox .tox-well > *:only-child { + margin: 0; +} +.tox .tox-custom-editor { + border: 1px solid #d9d9d9; + border-radius: 3px; + display: flex; + flex: 1; + position: relative; +} +/* stylelint-disable */ +.tox { + /* stylelint-enable */ +} +.tox .tox-dialog-loading::before { + background-color: rgba(0, 0, 0, 0.5); + content: ""; + height: 100%; + position: absolute; + width: 100%; + z-index: 1000; +} +.tox .tox-tab { + cursor: pointer; +} +.tox .tox-dialog__content-js { + display: flex; + flex: 1; + -ms-flex-preferred-size: auto; +} +.tox .tox-dialog__body-content .tox-collection { + display: flex; + flex: 1; + -ms-flex-preferred-size: auto; +} +.tox .tox-image-tools-edit-panel { + height: 60px; +} +.tox .tox-image-tools__sidebar { + height: 60px; +} diff --git a/public/resource/tinymce/skins/ui/jeecg/skin.min.css b/public/resource/tinymce/skins/ui/jeecg/skin.min.css new file mode 100644 index 0000000..c86e0c1 --- /dev/null +++ b/public/resource/tinymce/skins/ui/jeecg/skin.min.css @@ -0,0 +1,7 @@ +/** +* Copyright (c) Tiny Technologies, Inc. All rights reserved. +* Licensed under the LGPL or a commercial license. +* For LGPL see License.txt in the project root for license information. +* For commercial licenses see https://www.tiny.cloud/ +*/ +.tox{box-shadow:none;box-sizing:content-box;color:rgba(84,111,94,.85);cursor:auto;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:10px;font-style:normal;font-weight:400;line-height:normal;-webkit-tap-highlight-color:transparent;text-decoration:none;text-shadow:none;text-transform:none;vertical-align:initial;white-space:normal}.tox :not(svg):not(rect){box-sizing:inherit;color:inherit;cursor:inherit;direction:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;line-height:inherit;-webkit-tap-highlight-color:inherit;text-align:inherit;text-decoration:inherit;text-shadow:inherit;text-transform:inherit;vertical-align:inherit;white-space:inherit}.tox :not(svg):not(rect){background:0 0;border:0;box-shadow:none;float:none;height:auto;margin:0;max-width:none;outline:0;padding:0;position:static;width:auto}.tox:not([dir=rtl]){direction:ltr;text-align:left}.tox[dir=rtl]{direction:rtl;text-align:right}.tox-tinymce{border:1px solid #d9d9d9;border-radius:0;box-shadow:none;box-sizing:border-box;display:flex;flex-direction:column;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;overflow:hidden;position:relative;visibility:inherit!important}.tox-tinymce-inline{border:none;box-shadow:none}.tox-tinymce-inline .tox-editor-header{background-color:transparent;border:1px solid #d9d9d9;border-radius:0;box-shadow:none}.tox-tinymce-aux{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;z-index:1300}.tox-tinymce :focus,.tox-tinymce-aux :focus{outline:0}button::-moz-focus-inner{border:0}.tox[dir=rtl] .tox-icon--flip svg{transform:rotateY(180deg)}.tox .accessibility-issue__header{align-items:center;display:flex;margin-bottom:2.5px}.tox .accessibility-issue__description{align-items:stretch;border:1px solid #d9d9d9;border-radius:3px;display:flex;justify-content:space-between}.tox .accessibility-issue__description>div{padding-bottom:2.5px}.tox .accessibility-issue__description>div>div{align-items:center;display:flex;margin-bottom:2.5px}.tox .accessibility-issue__description>:last-child:not(:only-child){border-color:#d9d9d9;border-style:solid}.tox .accessibility-issue__repair{margin-top:16px}.tox .tox-dialog__body-content .accessibility-issue--info .accessibility-issue__description{background-color:rgba(10,143,233,.1);border-color:rgba(10,143,233,.4);color:rgba(84,111,94,.85)}.tox .tox-dialog__body-content .accessibility-issue--info .accessibility-issue__description>:last-child{border-color:rgba(10,143,233,.4)}.tox .tox-dialog__body-content .accessibility-issue--info .tox-form__group h2{color:#0a8fe9}.tox .tox-dialog__body-content .accessibility-issue--info .tox-icon svg{fill:#0a8fe9}.tox .tox-dialog__body-content .accessibility-issue--info a .tox-icon{color:#0a8fe9}.tox .tox-dialog__body-content .accessibility-issue--warn .accessibility-issue__description{background-color:rgba(255,165,0,.1);border-color:rgba(255,165,0,.5);color:rgba(84,111,94,.85)}.tox .tox-dialog__body-content .accessibility-issue--warn .accessibility-issue__description>:last-child{border-color:rgba(255,165,0,.5)}.tox .tox-dialog__body-content .accessibility-issue--warn .tox-form__group h2{color:#cc8500}.tox .tox-dialog__body-content .accessibility-issue--warn .tox-icon svg{fill:#cc8500}.tox .tox-dialog__body-content .accessibility-issue--warn a .tox-icon{color:#cc8500}.tox .tox-dialog__body-content .accessibility-issue--error .accessibility-issue__description{background-color:rgba(204,0,0,.1);border-color:rgba(204,0,0,.4);color:rgba(84,111,94,.85)}.tox .tox-dialog__body-content .accessibility-issue--error .accessibility-issue__description>:last-child{border-color:rgba(204,0,0,.4)}.tox .tox-dialog__body-content .accessibility-issue--error .tox-form__group h2{color:#c00}.tox .tox-dialog__body-content .accessibility-issue--error .tox-icon svg{fill:#c00}.tox .tox-dialog__body-content .accessibility-issue--error a .tox-icon{color:#c00}.tox .tox-dialog__body-content .accessibility-issue--success .accessibility-issue__description{background-color:rgba(120,171,70,.1);border-color:rgba(120,171,70,.4);color:rgba(84,111,94,.85)}.tox .tox-dialog__body-content .accessibility-issue--success .accessibility-issue__description>:last-child{border-color:rgba(120,171,70,.4)}.tox .tox-dialog__body-content .accessibility-issue--success .tox-form__group h2{color:#78ab46}.tox .tox-dialog__body-content .accessibility-issue--success .tox-icon svg{fill:#78ab46}.tox .tox-dialog__body-content .accessibility-issue--success a .tox-icon{color:#78ab46}.tox .tox-dialog__body-content .accessibility-issue__header h1,.tox .tox-dialog__body-content .tox-form__group .accessibility-issue__description h2{margin-top:0}.tox:not([dir=rtl]) .tox-dialog__body-content .accessibility-issue__header .tox-button{margin-left:2.5px}.tox:not([dir=rtl]) .tox-dialog__body-content .accessibility-issue__header>:nth-last-child(2){margin-left:auto}.tox:not([dir=rtl]) .tox-dialog__body-content .accessibility-issue__description{padding:2.5px 2.5px 2.5px 5px}.tox:not([dir=rtl]) .tox-dialog__body-content .accessibility-issue__description>:last-child{border-left-width:1px;padding-left:2.5px}.tox[dir=rtl] .tox-dialog__body-content .accessibility-issue__header .tox-button{margin-right:2.5px}.tox[dir=rtl] .tox-dialog__body-content .accessibility-issue__header>:nth-last-child(2){margin-right:auto}.tox[dir=rtl] .tox-dialog__body-content .accessibility-issue__description{padding:2.5px 5px 2.5px 2.5px}.tox[dir=rtl] .tox-dialog__body-content .accessibility-issue__description>:last-child{border-right-width:1px;padding-right:2.5px}.tox .tox-anchorbar{display:flex;flex:0 0 auto}.tox .tox-bar{display:flex;flex:0 0 auto}.tox .tox-button{background-color:#0a8fe9;background-image:none;background-position:0 0;background-repeat:repeat;border-color:#0a8fe9;border-radius:3px;border-style:solid;border-width:1px;box-shadow:none;box-sizing:border-box;color:#fff;cursor:pointer;display:inline-block;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:8.75px;font-style:normal;font-weight:400;letter-spacing:normal;line-height:24px;margin:0;outline:0;padding:2.5px 10px;text-align:center;text-decoration:none;text-transform:none;white-space:nowrap}.tox .tox-button[disabled]{background-color:#0a8fe9;background-image:none;border-color:#0a8fe9;box-shadow:none;color:rgba(255,255,255,.5);cursor:not-allowed}.tox .tox-button:focus:not(:disabled){background-color:#0980d1;background-image:none;border-color:#0980d1;box-shadow:none;color:#fff}.tox .tox-button:hover:not(:disabled){background-color:#0980d1;background-image:none;border-color:#0980d1;box-shadow:none;color:#fff}.tox .tox-button:active:not(:disabled){background-color:#0871b8;background-image:none;border-color:#0871b8;box-shadow:none;color:#fff}.tox .tox-button--secondary{background-color:#f0f0f0;background-image:none;background-position:0 0;background-repeat:repeat;border-color:#f0f0f0;border-radius:3px;border-style:solid;border-width:1px;box-shadow:none;color:rgba(84,111,94,.85);font-size:8.75px;font-style:normal;font-weight:400;letter-spacing:normal;outline:0;padding:2.5px 10px;text-decoration:none;text-transform:none}.tox .tox-button--secondary[disabled]{background-color:#f0f0f0;background-image:none;border-color:#f0f0f0;box-shadow:none;color:rgba(84,111,94,.5)}.tox .tox-button--secondary:focus:not(:disabled){background-color:#e3e3e3;background-image:none;border-color:#e3e3e3;box-shadow:none;color:rgba(84,111,94,.85)}.tox .tox-button--secondary:hover:not(:disabled){background-color:#e3e3e3;background-image:none;border-color:#e3e3e3;box-shadow:none;color:rgba(84,111,94,.85)}.tox .tox-button--secondary:active:not(:disabled){background-color:#d6d6d6;background-image:none;border-color:#d6d6d6;box-shadow:none;color:rgba(84,111,94,.85)}.tox .tox-button--icon,.tox .tox-button.tox-button--icon,.tox .tox-button.tox-button--secondary.tox-button--icon{padding:2.5px}.tox .tox-button--icon .tox-icon svg,.tox .tox-button.tox-button--icon .tox-icon svg,.tox .tox-button.tox-button--secondary.tox-button--icon .tox-icon svg{display:block;fill:currentColor}.tox .tox-button-link{background:0;border:none;box-sizing:border-box;cursor:pointer;display:inline-block;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:10px;font-weight:400;line-height:1.3;margin:0;padding:0;white-space:nowrap}.tox .tox-button-link--sm{font-size:8.75px}.tox .tox-button--naked{background-color:transparent;border-color:transparent;box-shadow:unset;color:rgba(84,111,94,.85)}.tox .tox-button--naked[disabled]{background-color:#f0f0f0;border-color:#f0f0f0;box-shadow:none;color:rgba(84,111,94,.5)}.tox .tox-button--naked:hover:not(:disabled){background-color:#e3e3e3;border-color:#e3e3e3;box-shadow:none;color:rgba(84,111,94,.85)}.tox .tox-button--naked:focus:not(:disabled){background-color:#e3e3e3;border-color:#e3e3e3;box-shadow:none;color:rgba(84,111,94,.85)}.tox .tox-button--naked:active:not(:disabled){background-color:#d6d6d6;border-color:#d6d6d6;box-shadow:none;color:rgba(84,111,94,.85)}.tox .tox-button--naked .tox-icon svg{fill:currentColor}.tox .tox-button--naked.tox-button--icon:hover:not(:disabled){color:rgba(84,111,94,.85)}.tox .tox-checkbox{align-items:center;border-radius:3px;cursor:pointer;display:flex;height:36px;min-width:36px}.tox .tox-checkbox__input{height:1px;overflow:hidden;position:absolute;top:auto;width:1px}.tox .tox-checkbox__icons{align-items:center;border-radius:3px;box-shadow:0 0 0 2px transparent;box-sizing:content-box;display:flex;height:24px;justify-content:center;padding:calc(2.5px - 1px);width:24px}.tox .tox-checkbox__icons .tox-checkbox-icon__unchecked svg{display:block;fill:rgba(84,111,94,.3)}.tox .tox-checkbox__icons .tox-checkbox-icon__indeterminate svg{display:none;fill:#0a8fe9}.tox .tox-checkbox__icons .tox-checkbox-icon__checked svg{display:none;fill:#0a8fe9}.tox .tox-checkbox--disabled{color:rgba(84,111,94,.5);cursor:not-allowed}.tox .tox-checkbox--disabled .tox-checkbox__icons .tox-checkbox-icon__checked svg{fill:rgba(84,111,94,.5)}.tox .tox-checkbox--disabled .tox-checkbox__icons .tox-checkbox-icon__unchecked svg{fill:rgba(84,111,94,.5)}.tox .tox-checkbox--disabled .tox-checkbox__icons .tox-checkbox-icon__indeterminate svg{fill:rgba(84,111,94,.5)}.tox input.tox-checkbox__input:checked+.tox-checkbox__icons .tox-checkbox-icon__unchecked svg{display:none}.tox input.tox-checkbox__input:checked+.tox-checkbox__icons .tox-checkbox-icon__checked svg{display:block}.tox input.tox-checkbox__input:indeterminate+.tox-checkbox__icons .tox-checkbox-icon__unchecked svg{display:none}.tox input.tox-checkbox__input:indeterminate+.tox-checkbox__icons .tox-checkbox-icon__indeterminate svg{display:block}.tox input.tox-checkbox__input:focus+.tox-checkbox__icons{border-radius:3px;box-shadow:inset 0 0 0 1px #0a8fe9;padding:calc(2.5px - 1px)}.tox:not([dir=rtl]) .tox-checkbox__label{margin-left:2.5px}.tox:not([dir=rtl]) .tox-checkbox__input{left:-10000px}.tox:not([dir=rtl]) .tox-bar .tox-checkbox{margin-left:2.5px}.tox[dir=rtl] .tox-checkbox__label{margin-right:2.5px}.tox[dir=rtl] .tox-checkbox__input{right:-10000px}.tox[dir=rtl] .tox-bar .tox-checkbox{margin-right:2.5px}.tox .tox-collection--toolbar .tox-collection__group{display:flex;padding:0}.tox .tox-collection--grid .tox-collection__group{display:flex;flex-wrap:wrap;max-height:208px;overflow-x:hidden;overflow-y:auto;padding:0}.tox .tox-collection--list .tox-collection__group{border-bottom-width:0;border-color:#d9d9d9;border-left-width:0;border-right-width:0;border-style:solid;border-top-width:1px;padding:2.5px 0}.tox .tox-collection--list .tox-collection__group:first-child{border-top-width:0}.tox .tox-collection__group-heading{background-color:#f3f3f3;color:rgba(84,111,94,.7);cursor:default;font-size:12px;font-style:normal;font-weight:400;margin-bottom:2.5px;margin-top:-2.5px;padding:2.5px 5px;text-transform:none;-webkit-touch-callout:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.tox .tox-collection__item{align-items:center;color:rgba(84,111,94,.85);cursor:pointer;display:flex;-webkit-touch-callout:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.tox .tox-collection--list .tox-collection__item{padding:2.5px 5px}.tox .tox-collection--toolbar .tox-collection__item{border-radius:3px;padding:2.5px}.tox .tox-collection--grid .tox-collection__item{border-radius:3px;padding:2.5px}.tox .tox-collection--list .tox-collection__item--enabled{background-color:#fff;color:rgba(84,111,94,.85)}.tox .tox-collection--list .tox-collection__item--active{background-color:#e5e9e7}.tox .tox-collection--toolbar .tox-collection__item--enabled{background-color:#e5e9e7;color:rgba(84,111,94,.85)}.tox .tox-collection--toolbar .tox-collection__item--active{background-color:#e5e9e7}.tox .tox-collection--grid .tox-collection__item--enabled{background-color:#e5e9e7;color:rgba(84,111,94,.85)}.tox .tox-collection--grid .tox-collection__item--active:not(.tox-collection__item--state-disabled){background-color:#e5e9e7;color:rgba(84,111,94,.85)}.tox .tox-collection--list .tox-collection__item--active:not(.tox-collection__item--state-disabled){color:rgba(84,111,94,.85)}.tox .tox-collection--toolbar .tox-collection__item--active:not(.tox-collection__item--state-disabled){color:rgba(84,111,94,.85)}.tox .tox-collection__item-checkmark,.tox .tox-collection__item-icon{align-items:center;display:flex;height:24px;justify-content:center;width:24px}.tox .tox-collection__item-checkmark svg,.tox .tox-collection__item-icon svg{fill:currentColor}.tox .tox-collection--toolbar-lg .tox-collection__item-icon{height:48px;width:48px}.tox .tox-collection__item-label{color:currentColor;display:inline-block;flex:1;-ms-flex-preferred-size:auto;font-size:8.75px;font-style:normal;font-weight:400;line-height:24px;text-transform:none;word-break:break-all}.tox .tox-collection__item-accessory{color:rgba(84,111,94,.7);display:inline-block;font-size:8.75px;height:24px;line-height:24px;text-transform:none}.tox .tox-collection__item-caret{align-items:center;display:flex;min-height:24px}.tox .tox-collection__item-caret::after{content:'';font-size:0;min-height:inherit}.tox .tox-collection__item-caret svg{fill:rgba(84,111,94,.85)}.tox .tox-collection__item--state-disabled{background-color:transparent;color:rgba(84,111,94,.5);cursor:not-allowed}.tox .tox-collection__item--state-disabled .tox-collection__item-caret svg{fill:rgba(84,111,94,.5)}.tox .tox-collection--list .tox-collection__item:not(.tox-collection__item--enabled) .tox-collection__item-checkmark svg{display:none}.tox .tox-collection--list .tox-collection__item:not(.tox-collection__item--enabled) .tox-collection__item-accessory+.tox-collection__item-checkmark{display:none}.tox .tox-collection--horizontal{background-color:#fff;border:1px solid #d9d9d9;border-radius:3px;box-shadow:0 1px 3px rgba(0,0,0,.15);display:flex;flex:0 0 auto;flex-shrink:0;flex-wrap:nowrap;margin-bottom:0;overflow-x:auto;padding:0}.tox .tox-collection--horizontal .tox-collection__group{align-items:center;display:flex;flex-wrap:nowrap;margin:0;padding:0 2.5px}.tox .tox-collection--horizontal .tox-collection__item{height:34px;margin:2px 0 3px 0;padding:0 4px}.tox .tox-collection--horizontal .tox-collection__item-label{white-space:nowrap}.tox .tox-collection--horizontal .tox-collection__item-caret{margin-left:4px}.tox .tox-collection__item-container{display:flex}.tox .tox-collection__item-container--row{align-items:center;flex:1 1 auto;flex-direction:row}.tox .tox-collection__item-container--row.tox-collection__item-container--align-left{margin-right:auto}.tox .tox-collection__item-container--row.tox-collection__item-container--align-right{justify-content:flex-end;margin-left:auto}.tox .tox-collection__item-container--row.tox-collection__item-container--valign-top{align-items:flex-start;margin-bottom:auto}.tox .tox-collection__item-container--row.tox-collection__item-container--valign-middle{align-items:center}.tox .tox-collection__item-container--row.tox-collection__item-container--valign-bottom{align-items:flex-end;margin-top:auto}.tox .tox-collection__item-container--column{-ms-grid-row-align:center;align-self:center;flex:1 1 auto;flex-direction:column}.tox .tox-collection__item-container--column.tox-collection__item-container--align-left{align-items:flex-start}.tox .tox-collection__item-container--column.tox-collection__item-container--align-right{align-items:flex-end}.tox .tox-collection__item-container--column.tox-collection__item-container--valign-top{align-self:flex-start}.tox .tox-collection__item-container--column.tox-collection__item-container--valign-middle{-ms-grid-row-align:center;align-self:center}.tox .tox-collection__item-container--column.tox-collection__item-container--valign-bottom{align-self:flex-end}.tox:not([dir=rtl]) .tox-collection--horizontal .tox-collection__group:not(:last-of-type){border-right:1px solid #d9d9d9}.tox:not([dir=rtl]) .tox-collection--list .tox-collection__item>:not(:first-child){margin-left:5px}.tox:not([dir=rtl]) .tox-collection--list .tox-collection__item>.tox-collection__item-label:first-child{margin-left:2.5px}.tox:not([dir=rtl]) .tox-collection__item-accessory{margin-left:10px;text-align:right}.tox:not([dir=rtl]) .tox-collection .tox-collection__item-caret{margin-left:10px}.tox[dir=rtl] .tox-collection--horizontal .tox-collection__group:not(:last-of-type){border-left:1px solid #d9d9d9}.tox[dir=rtl] .tox-collection--list .tox-collection__item>:not(:first-child){margin-right:5px}.tox[dir=rtl] .tox-collection--list .tox-collection__item>.tox-collection__item-label:first-child{margin-right:2.5px}.tox[dir=rtl] .tox-collection__item-accessory{margin-right:10px;text-align:left}.tox[dir=rtl] .tox-collection .tox-collection__item-caret{margin-right:10px;transform:rotateY(180deg)}.tox[dir=rtl] .tox-collection--horizontal .tox-collection__item-caret{margin-right:4px}.tox .tox-color-picker-container{display:flex;flex-direction:row;height:225px;margin:0}.tox .tox-sv-palette{box-sizing:border-box;display:flex;height:100%}.tox .tox-sv-palette-spectrum{height:100%}.tox .tox-sv-palette,.tox .tox-sv-palette-spectrum{width:225px}.tox .tox-sv-palette-thumb{background:0 0;border:1px solid #000;border-radius:50%;box-sizing:content-box;height:12px;position:absolute;width:12px}.tox .tox-sv-palette-inner-thumb{border:1px solid #fff;border-radius:50%;height:10px;position:absolute;width:10px}.tox .tox-hue-slider{box-sizing:border-box;height:100%;width:25px}.tox .tox-hue-slider-spectrum{background:linear-gradient(to bottom,red,#ff0080,#f0f,#8000ff,#00f,#0080ff,#0ff,#00ff80,#0f0,#80ff00,#ff0,#ff8000,red);height:100%;width:100%}.tox .tox-hue-slider,.tox .tox-hue-slider-spectrum{width:20px}.tox .tox-hue-slider-thumb{background:#fff;border:1px solid #000;box-sizing:content-box;height:4px;width:100%}.tox .tox-rgb-form{display:flex;flex-direction:column;justify-content:space-between}.tox .tox-rgb-form div{align-items:center;display:flex;justify-content:space-between;margin-bottom:5px;width:inherit}.tox .tox-rgb-form input{width:6em}.tox .tox-rgb-form input.tox-invalid{border:1px solid red!important}.tox .tox-rgb-form .tox-rgba-preview{border:1px solid #000;flex-grow:2;margin-bottom:0}.tox:not([dir=rtl]) .tox-sv-palette{margin-right:15px}.tox:not([dir=rtl]) .tox-hue-slider{margin-right:15px}.tox:not([dir=rtl]) .tox-hue-slider-thumb{margin-left:-1px}.tox:not([dir=rtl]) .tox-rgb-form label{margin-right:.5em}.tox[dir=rtl] .tox-sv-palette{margin-left:15px}.tox[dir=rtl] .tox-hue-slider{margin-left:15px}.tox[dir=rtl] .tox-hue-slider-thumb{margin-right:-1px}.tox[dir=rtl] .tox-rgb-form label{margin-left:.5em}.tox .tox-toolbar .tox-swatches,.tox .tox-toolbar__overflow .tox-swatches,.tox .tox-toolbar__primary .tox-swatches{margin:2px 0 3px 4px}.tox .tox-collection--list .tox-collection__group .tox-swatches-menu{border:0;margin:-2.5px 0}.tox .tox-swatches__row{display:flex}.tox .tox-swatch{height:30px;transition:transform .15s,box-shadow .15s;width:30px}.tox .tox-swatch:focus,.tox .tox-swatch:hover{box-shadow:0 0 0 1px rgba(127,127,127,.3) inset;transform:scale(.8)}.tox .tox-swatch--remove{align-items:center;display:flex;justify-content:center}.tox .tox-swatch--remove svg path{stroke:#e74c3c}.tox .tox-swatches__picker-btn{align-items:center;background-color:transparent;border:0;cursor:pointer;display:flex;height:30px;justify-content:center;outline:0;padding:0;width:30px}.tox .tox-swatches__picker-btn svg{height:24px;width:24px}.tox .tox-swatches__picker-btn:hover{background:#e5e9e7}.tox:not([dir=rtl]) .tox-swatches__picker-btn{margin-left:auto}.tox[dir=rtl] .tox-swatches__picker-btn{margin-right:auto}.tox .tox-comment-thread{background:#fff;position:relative}.tox .tox-comment-thread>:not(:first-child){margin-top:5px}.tox .tox-comment{background:#fff;border:1px solid #d9d9d9;border-radius:3px;box-shadow:0 4px 8px 0 rgba(84,111,94,.1);padding:5px 5px 10px 5px;position:relative}.tox .tox-comment__header{align-items:center;color:rgba(84,111,94,.85);display:flex;justify-content:space-between}.tox .tox-comment__date{color:rgba(84,111,94,.7);font-size:12px}.tox .tox-comment__body{color:rgba(84,111,94,.85);font-size:8.75px;font-style:normal;font-weight:400;line-height:1.3;margin-top:5px;position:relative;text-transform:initial}.tox .tox-comment__body textarea{resize:none;white-space:normal;width:100%}.tox .tox-comment__expander{padding-top:5px}.tox .tox-comment__expander p{color:rgba(84,111,94,.7);font-size:8.75px;font-style:normal}.tox .tox-comment__body p{margin:0}.tox .tox-comment__buttonspacing{padding-top:10px;text-align:center}.tox .tox-comment-thread__overlay::after{background:#fff;bottom:0;content:"";display:flex;left:0;opacity:.9;position:absolute;right:0;top:0;z-index:5}.tox .tox-comment__reply{display:flex;flex-shrink:0;flex-wrap:wrap;justify-content:flex-end;margin-top:5px}.tox .tox-comment__reply>:first-child{margin-bottom:5px;width:100%}.tox .tox-comment__edit{display:flex;flex-wrap:wrap;justify-content:flex-end;margin-top:10px}.tox .tox-comment__gradient::after{background:linear-gradient(rgba(255,255,255,0),#fff);bottom:0;content:"";display:block;height:5em;margin-top:-40px;position:absolute;width:100%}.tox .tox-comment__overlay{background:#fff;bottom:0;display:flex;flex-direction:column;flex-grow:1;left:0;opacity:.9;position:absolute;right:0;text-align:center;top:0;z-index:5}.tox .tox-comment__loading-text{align-items:center;color:rgba(84,111,94,.85);display:flex;flex-direction:column;position:relative}.tox .tox-comment__loading-text>div{padding-bottom:10px}.tox .tox-comment__overlaytext{bottom:0;flex-direction:column;font-size:8.75px;left:0;padding:1em;position:absolute;right:0;top:0;z-index:10}.tox .tox-comment__overlaytext p{background-color:#fff;box-shadow:0 0 8px 8px #fff;color:rgba(84,111,94,.85);text-align:center}.tox .tox-comment__overlaytext div:nth-of-type(2){font-size:.8em}.tox .tox-comment__busy-spinner{align-items:center;background-color:#fff;bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0;z-index:20}.tox .tox-comment__scroll{display:flex;flex-direction:column;flex-shrink:1;overflow:auto}.tox .tox-conversations{margin:5px}.tox:not([dir=rtl]) .tox-comment__edit{margin-left:5px}.tox:not([dir=rtl]) .tox-comment__buttonspacing>:last-child,.tox:not([dir=rtl]) .tox-comment__edit>:last-child,.tox:not([dir=rtl]) .tox-comment__reply>:last-child{margin-left:5px}.tox[dir=rtl] .tox-comment__edit{margin-right:5px}.tox[dir=rtl] .tox-comment__buttonspacing>:last-child,.tox[dir=rtl] .tox-comment__edit>:last-child,.tox[dir=rtl] .tox-comment__reply>:last-child{margin-right:5px}.tox .tox-user{align-items:center;display:flex}.tox .tox-user__avatar svg{fill:rgba(84,111,94,.7)}.tox .tox-user__name{color:rgba(84,111,94,.7);font-size:12px;font-style:normal;font-weight:400;text-transform:uppercase}.tox:not([dir=rtl]) .tox-user__avatar svg{margin-right:5px}.tox:not([dir=rtl]) .tox-user__avatar+.tox-user__name{margin-left:5px}.tox[dir=rtl] .tox-user__avatar svg{margin-left:5px}.tox[dir=rtl] .tox-user__avatar+.tox-user__name{margin-right:5px}.tox .tox-dialog-wrap{align-items:center;bottom:0;display:flex;justify-content:center;left:0;position:fixed;right:0;top:0;z-index:1100}.tox .tox-dialog-wrap__backdrop{background-color:rgba(255,255,255,.75);bottom:0;left:0;position:absolute;right:0;top:0;z-index:1}.tox .tox-dialog-wrap__backdrop--opaque{background-color:#fff}.tox .tox-dialog{background-color:#fff;border-color:#d9d9d9;border-radius:3px;border-style:solid;border-width:1px;box-shadow:0 16px 16px -10px rgba(84,111,94,.15),0 0 40px 1px rgba(84,111,94,.15);display:flex;flex-direction:column;max-height:100%;max-width:480px;overflow:hidden;position:relative;width:95vw;z-index:2}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox .tox-dialog{align-self:flex-start;margin:5px auto;width:calc(100vw - 10px)}}.tox .tox-dialog-inline{z-index:1100}.tox .tox-dialog__header{align-items:center;background-color:#fff;border-bottom:none;color:rgba(84,111,94,.85);display:flex;font-size:10px;justify-content:space-between;padding:5px 10px 0 10px;position:relative}.tox .tox-dialog__header .tox-button{z-index:1}.tox .tox-dialog__draghandle{cursor:grab;height:100%;left:0;position:absolute;top:0;width:100%}.tox .tox-dialog__draghandle:active{cursor:grabbing}.tox .tox-dialog__dismiss{margin-left:auto}.tox .tox-dialog__title{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:12.5px;font-style:normal;font-weight:400;line-height:1.3;margin:0;text-transform:none}.tox .tox-dialog__body{color:rgba(84,111,94,.85);display:flex;flex:1;-ms-flex-preferred-size:auto;font-size:10px;font-style:normal;font-weight:400;line-height:1.3;min-width:0;text-align:left;text-transform:none}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox .tox-dialog__body{flex-direction:column}}.tox .tox-dialog__body-nav{align-items:flex-start;display:flex;flex-direction:column;padding:10px 10px}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox .tox-dialog__body-nav{flex-direction:row;-webkit-overflow-scrolling:touch;overflow-x:auto;padding-bottom:0}}.tox .tox-dialog__body-nav-item{border-bottom:2px solid transparent;color:rgba(84,111,94,.7);display:inline-block;font-size:8.75px;line-height:1.3;margin-bottom:5px;text-decoration:none;white-space:nowrap}.tox .tox-dialog__body-nav-item:focus{background-color:rgba(10,143,233,.1)}.tox .tox-dialog__body-nav-item--active{border-bottom:2px solid #0a8fe9;color:#0a8fe9}.tox .tox-dialog__body-content{box-sizing:border-box;display:flex;flex:1;flex-direction:column;-ms-flex-preferred-size:auto;max-height:650px;overflow:auto;-webkit-overflow-scrolling:touch;padding:10px 10px}.tox .tox-dialog__body-content>*{margin-bottom:0;margin-top:10px}.tox .tox-dialog__body-content>:first-child{margin-top:0}.tox .tox-dialog__body-content>:last-child{margin-bottom:0}.tox .tox-dialog__body-content>:only-child{margin-bottom:0;margin-top:0}.tox .tox-dialog__body-content a{color:#0a8fe9;cursor:pointer;text-decoration:none}.tox .tox-dialog__body-content a:focus,.tox .tox-dialog__body-content a:hover{color:#0871b8;text-decoration:none}.tox .tox-dialog__body-content a:active{color:#0871b8;text-decoration:none}.tox .tox-dialog__body-content svg{fill:rgba(84,111,94,.85)}.tox .tox-dialog__body-content ul{display:block;list-style-type:disc;margin-bottom:10px;-webkit-margin-end:0;margin-inline-end:0;-webkit-margin-start:0;margin-inline-start:0;-webkit-padding-start:2.5rem;padding-inline-start:2.5rem}.tox .tox-dialog__body-content .tox-form__group h1{color:rgba(84,111,94,.85);font-size:12.5px;font-style:normal;font-weight:400;letter-spacing:normal;margin-bottom:10px;margin-top:2rem;text-transform:none}.tox .tox-dialog__body-content .tox-form__group h2{color:rgba(84,111,94,.85);font-size:10px;font-style:normal;font-weight:400;letter-spacing:normal;margin-bottom:10px;margin-top:2rem;text-transform:none}.tox .tox-dialog__body-content .tox-form__group p{margin-bottom:10px}.tox .tox-dialog__body-content .tox-form__group h1:first-child,.tox .tox-dialog__body-content .tox-form__group h2:first-child,.tox .tox-dialog__body-content .tox-form__group p:first-child{margin-top:0}.tox .tox-dialog__body-content .tox-form__group h1:last-child,.tox .tox-dialog__body-content .tox-form__group h2:last-child,.tox .tox-dialog__body-content .tox-form__group p:last-child{margin-bottom:0}.tox .tox-dialog__body-content .tox-form__group h1:only-child,.tox .tox-dialog__body-content .tox-form__group h2:only-child,.tox .tox-dialog__body-content .tox-form__group p:only-child{margin-bottom:0;margin-top:0}.tox .tox-dialog--width-lg{height:650px;max-width:1200px}.tox .tox-dialog--width-md{max-width:800px}.tox .tox-dialog--width-md .tox-dialog__body-content{overflow:auto}.tox .tox-dialog__body-content--centered{text-align:center}.tox .tox-dialog__footer{align-items:center;background-color:#fff;border-top:1px solid #d9d9d9;display:flex;justify-content:space-between;padding:5px 10px}.tox .tox-dialog__footer-end,.tox .tox-dialog__footer-start{display:flex}.tox .tox-dialog__busy-spinner{align-items:center;background-color:rgba(255,255,255,.75);bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0;z-index:3}.tox .tox-dialog__table{border-collapse:collapse;width:100%}.tox .tox-dialog__table thead th{font-weight:400;padding-bottom:5px}.tox .tox-dialog__table tbody tr{border-bottom:1px solid #d9d9d9}.tox .tox-dialog__table tbody tr:last-child{border-bottom:none}.tox .tox-dialog__table td{padding-bottom:5px;padding-top:5px}.tox .tox-dialog__popups{position:absolute;width:100%;z-index:1100}.tox .tox-dialog__body-iframe{display:flex;flex:1;flex-direction:column;-ms-flex-preferred-size:auto}.tox .tox-dialog__body-iframe .tox-navobj{display:flex;flex:1;-ms-flex-preferred-size:auto}.tox .tox-dialog__body-iframe .tox-navobj :nth-child(2){flex:1;-ms-flex-preferred-size:auto;height:100%}.tox .tox-dialog-dock-fadeout{opacity:0;visibility:hidden}.tox .tox-dialog-dock-fadein{opacity:1;visibility:visible}.tox .tox-dialog-dock-transition{transition:visibility 0s linear .3s,opacity .3s ease}.tox .tox-dialog-dock-transition.tox-dialog-dock-fadein{transition-delay:0s}.tox.tox-platform-ie .tox-dialog-wrap{position:-ms-device-fixed}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox:not([dir=rtl]) .tox-dialog__body-nav{margin-right:0}}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox:not([dir=rtl]) .tox-dialog__body-nav-item:not(:first-child){margin-left:5px}}.tox:not([dir=rtl]) .tox-dialog__footer .tox-dialog__footer-end>*,.tox:not([dir=rtl]) .tox-dialog__footer .tox-dialog__footer-start>*{margin-left:5px}.tox[dir=rtl] .tox-dialog__body{text-align:right}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox[dir=rtl] .tox-dialog__body-nav{margin-left:0}}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox[dir=rtl] .tox-dialog__body-nav-item:not(:first-child){margin-right:5px}}.tox[dir=rtl] .tox-dialog__footer .tox-dialog__footer-end>*,.tox[dir=rtl] .tox-dialog__footer .tox-dialog__footer-start>*{margin-right:5px}body.tox-dialog__disable-scroll{overflow:hidden}.tox .tox-dropzone-container{display:flex;flex:1;-ms-flex-preferred-size:auto}.tox .tox-dropzone{align-items:center;background:#fff;border:2px dashed #d9d9d9;box-sizing:border-box;display:flex;flex-direction:column;flex-grow:1;justify-content:center;min-height:100px;padding:10px}.tox .tox-dropzone p{color:rgba(84,111,94,.7);margin:0 0 10px 0}.tox .tox-edit-area{display:flex;flex:1;-ms-flex-preferred-size:auto;overflow:hidden;position:relative}.tox .tox-edit-area__iframe{background-color:#fff;border:0;box-sizing:border-box;flex:1;-ms-flex-preferred-size:auto;height:100%;position:absolute;width:100%}.tox.tox-inline-edit-area{border:1px dotted #d9d9d9}.tox .tox-editor-container{display:flex;flex:1 1 auto;flex-direction:column;overflow:hidden}.tox .tox-editor-header{z-index:1}.tox:not(.tox-tinymce-inline) .tox-editor-header{box-shadow:none;transition:box-shadow .5s}.tox.tox-tinymce--toolbar-bottom .tox-editor-header,.tox.tox-tinymce-inline .tox-editor-header{margin-bottom:-1px}.tox.tox-tinymce--toolbar-sticky-on .tox-editor-header{background-color:transparent;box-shadow:0 4px 4px -3px rgba(0,0,0,.25)}.tox-editor-dock-fadeout{opacity:0;visibility:hidden}.tox-editor-dock-fadein{opacity:1;visibility:visible}.tox-editor-dock-transition{transition:visibility 0s linear .25s,opacity .25s ease}.tox-editor-dock-transition.tox-editor-dock-fadein{transition-delay:0s}.tox .tox-control-wrap{flex:1;position:relative}.tox .tox-control-wrap:not(.tox-control-wrap--status-invalid) .tox-control-wrap__status-icon-invalid,.tox .tox-control-wrap:not(.tox-control-wrap--status-unknown) .tox-control-wrap__status-icon-unknown,.tox .tox-control-wrap:not(.tox-control-wrap--status-valid) .tox-control-wrap__status-icon-valid{display:none}.tox .tox-control-wrap svg{display:block}.tox .tox-control-wrap__status-icon-wrap{position:absolute;top:50%;transform:translateY(-50%)}.tox .tox-control-wrap__status-icon-invalid svg{fill:#c00}.tox .tox-control-wrap__status-icon-unknown svg{fill:orange}.tox .tox-control-wrap__status-icon-valid svg{fill:green}.tox:not([dir=rtl]) .tox-control-wrap--status-invalid .tox-textfield,.tox:not([dir=rtl]) .tox-control-wrap--status-unknown .tox-textfield,.tox:not([dir=rtl]) .tox-control-wrap--status-valid .tox-textfield{padding-right:20px}.tox:not([dir=rtl]) .tox-control-wrap__status-icon-wrap{right:2.5px}.tox[dir=rtl] .tox-control-wrap--status-invalid .tox-textfield,.tox[dir=rtl] .tox-control-wrap--status-unknown .tox-textfield,.tox[dir=rtl] .tox-control-wrap--status-valid .tox-textfield{padding-left:20px}.tox[dir=rtl] .tox-control-wrap__status-icon-wrap{left:2.5px}.tox .tox-autocompleter{max-width:25em}.tox .tox-autocompleter .tox-menu{max-width:25em}.tox .tox-autocompleter .tox-autocompleter-highlight{font-weight:400}.tox .tox-color-input{display:flex;position:relative;z-index:1}.tox .tox-color-input .tox-textfield{z-index:-1}.tox .tox-color-input span{border-color:rgba(84,111,94,.2);border-radius:3px;border-style:solid;border-width:1px;box-shadow:none;box-sizing:border-box;height:24px;position:absolute;top:6px;width:24px}.tox .tox-color-input span:focus:not([aria-disabled=true]),.tox .tox-color-input span:hover:not([aria-disabled=true]){border-color:#0a8fe9;cursor:pointer}.tox .tox-color-input span::before{background-image:linear-gradient(45deg,rgba(0,0,0,.25) 25%,transparent 25%),linear-gradient(-45deg,rgba(0,0,0,.25) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,rgba(0,0,0,.25) 75%),linear-gradient(-45deg,transparent 75%,rgba(0,0,0,.25) 75%);background-position:0 0,0 6px,6px -6px,-6px 0;background-size:12px 12px;border:1px solid #fff;border-radius:3px;box-sizing:border-box;content:'';height:24px;left:-1px;position:absolute;top:-1px;width:24px;z-index:-1}.tox .tox-color-input span[aria-disabled=true]{cursor:not-allowed}.tox:not([dir=rtl]) .tox-color-input .tox-textfield{padding-left:36px}.tox:not([dir=rtl]) .tox-color-input span{left:6px}.tox[dir=rtl] .tox-color-input .tox-textfield{padding-right:36px}.tox[dir=rtl] .tox-color-input span{right:6px}.tox .tox-label,.tox .tox-toolbar-label{color:rgba(84,111,94,.7);display:block;font-size:8.75px;font-style:normal;font-weight:400;line-height:1.3;padding:0 5px 0 0;text-transform:none;white-space:nowrap}.tox .tox-toolbar-label{padding:0 5px}.tox[dir=rtl] .tox-label{padding:0 0 0 5px}.tox .tox-form{display:flex;flex:1;flex-direction:column;-ms-flex-preferred-size:auto}.tox .tox-form__group{box-sizing:border-box;margin-bottom:2.5px}.tox .tox-form-group--maximize{flex:1}.tox .tox-form__group--error{color:#c00}.tox .tox-form__group--collection{display:flex}.tox .tox-form__grid{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between}.tox .tox-form__grid--2col>.tox-form__group{width:calc(50% - (5px / 2))}.tox .tox-form__grid--3col>.tox-form__group{width:calc(100% / 3 - (5px / 2))}.tox .tox-form__grid--4col>.tox-form__group{width:calc(25% - (5px / 2))}.tox .tox-form__controls-h-stack{align-items:center;display:flex}.tox .tox-form__group--inline{align-items:center;display:flex}.tox .tox-form__group--stretched{display:flex;flex:1;flex-direction:column;-ms-flex-preferred-size:auto}.tox .tox-form__group--stretched .tox-textarea{flex:1;-ms-flex-preferred-size:auto}.tox .tox-form__group--stretched .tox-navobj{display:flex;flex:1;-ms-flex-preferred-size:auto}.tox .tox-form__group--stretched .tox-navobj :nth-child(2){flex:1;-ms-flex-preferred-size:auto;height:100%}.tox:not([dir=rtl]) .tox-form__controls-h-stack>:not(:first-child){margin-left:2.5px}.tox[dir=rtl] .tox-form__controls-h-stack>:not(:first-child){margin-right:2.5px}.tox .tox-lock.tox-locked .tox-lock-icon__unlock,.tox .tox-lock:not(.tox-locked) .tox-lock-icon__lock{display:none}.tox .tox-listboxfield .tox-listbox--select,.tox .tox-textarea,.tox .tox-textfield,.tox .tox-toolbar-textfield{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#d9d9d9;border-radius:3px;border-style:solid;border-width:1px;box-shadow:none;box-sizing:border-box;color:rgba(84,111,94,.85);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:10px;line-height:24px;margin:0;min-height:34px;outline:0;padding:5px 3.25px;resize:none;width:100%}.tox .tox-textarea[disabled],.tox .tox-textfield[disabled]{background-color:#f2f2f2;color:rgba(84,111,94,.85);cursor:not-allowed}.tox .tox-listboxfield .tox-listbox--select:focus,.tox .tox-textarea:focus,.tox .tox-textfield:focus{background-color:#fff;border-color:#0a8fe9;box-shadow:none;outline:0}.tox .tox-toolbar-textfield{border-width:0;margin-bottom:3px;margin-top:2px;max-width:250px}.tox .tox-naked-btn{background-color:transparent;border:0;border-color:transparent;box-shadow:unset;color:#0a8fe9;cursor:pointer;display:block;margin:0;padding:0}.tox .tox-naked-btn svg{display:block;fill:rgba(84,111,94,.85)}.tox:not([dir=rtl]) .tox-toolbar-textfield+*{margin-left:2.5px}.tox[dir=rtl] .tox-toolbar-textfield+*{margin-right:2.5px}.tox .tox-listboxfield{cursor:pointer;position:relative}.tox .tox-listboxfield .tox-listbox--select[disabled]{background-color:#f2f2f2;color:rgba(84,111,94,.85);cursor:not-allowed}.tox .tox-listbox__select-label{cursor:default;flex:1;margin:0 4px}.tox .tox-listbox__select-chevron{align-items:center;display:flex;justify-content:center;width:10px}.tox .tox-listbox__select-chevron svg{fill:rgba(84,111,94,.85)}.tox .tox-listboxfield .tox-listbox--select{align-items:center;display:flex}.tox:not([dir=rtl]) .tox-listboxfield svg{right:5px}.tox[dir=rtl] .tox-listboxfield svg{left:5px}.tox .tox-selectfield{cursor:pointer;position:relative}.tox .tox-selectfield select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#d9d9d9;border-radius:3px;border-style:solid;border-width:1px;box-shadow:none;box-sizing:border-box;color:rgba(84,111,94,.85);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:10px;line-height:24px;margin:0;min-height:34px;outline:0;padding:5px 3.25px;resize:none;width:100%}.tox .tox-selectfield select[disabled]{background-color:#f2f2f2;color:rgba(84,111,94,.85);cursor:not-allowed}.tox .tox-selectfield select::-ms-expand{display:none}.tox .tox-selectfield select:focus{background-color:#fff;border-color:#0a8fe9;box-shadow:none;outline:0}.tox .tox-selectfield svg{pointer-events:none;position:absolute;top:50%;transform:translateY(-50%)}.tox:not([dir=rtl]) .tox-selectfield select[size="0"],.tox:not([dir=rtl]) .tox-selectfield select[size="1"]{padding-right:15px}.tox:not([dir=rtl]) .tox-selectfield svg{right:5px}.tox[dir=rtl] .tox-selectfield select[size="0"],.tox[dir=rtl] .tox-selectfield select[size="1"]{padding-left:15px}.tox[dir=rtl] .tox-selectfield svg{left:5px}.tox .tox-textarea{-webkit-appearance:textarea;-moz-appearance:textarea;appearance:textarea;white-space:pre-wrap}.tox-fullscreen{border:0;height:100%;left:0;margin:0;overflow:hidden;-ms-scroll-chaining:none;overscroll-behavior:none;padding:0;position:fixed;top:0;touch-action:pinch-zoom;width:100%}.tox.tox-tinymce.tox-fullscreen .tox-statusbar__resize-handle{display:none}.tox.tox-tinymce.tox-fullscreen{background-color:transparent;z-index:1200}.tox-shadowhost.tox-fullscreen{z-index:1200}.tox-fullscreen .tox.tox-tinymce-aux,.tox-fullscreen~.tox.tox-tinymce-aux{z-index:1201}.tox .tox-help__more-link{list-style:none;margin-top:1em}.tox .tox-image-tools{width:100%}.tox .tox-image-tools__toolbar{align-items:center;display:flex;justify-content:center}.tox .tox-image-tools__image{background-color:#666;height:380px;overflow:auto;position:relative;width:100%}.tox .tox-image-tools__image,.tox .tox-image-tools__image+.tox-image-tools__toolbar{margin-top:5px}.tox .tox-image-tools__image-bg{background:url(data:image/gif;base64,R0lGODdhDAAMAIABAMzMzP///ywAAAAADAAMAAACFoQfqYeabNyDMkBQb81Uat85nxguUAEAOw==)}.tox .tox-image-tools__toolbar>.tox-spacer{flex:1;-ms-flex-preferred-size:auto}.tox .tox-croprect-block{background:#000;opacity:.5;position:absolute;zoom:1}.tox .tox-croprect-handle{border:2px solid #fff;height:20px;left:0;position:absolute;top:0;width:20px}.tox .tox-croprect-handle-move{border:0;cursor:move;position:absolute}.tox .tox-croprect-handle-nw{border-width:2px 0 0 2px;cursor:nw-resize;left:100px;margin:-2px 0 0 -2px;top:100px}.tox .tox-croprect-handle-ne{border-width:2px 2px 0 0;cursor:ne-resize;left:200px;margin:-2px 0 0 -20px;top:100px}.tox .tox-croprect-handle-sw{border-width:0 0 2px 2px;cursor:sw-resize;left:100px;margin:-20px 2px 0 -2px;top:200px}.tox .tox-croprect-handle-se{border-width:0 2px 2px 0;cursor:se-resize;left:200px;margin:-20px 0 0 -20px;top:200px}.tox:not([dir=rtl]) .tox-image-tools__toolbar>.tox-slider:not(:first-of-type){margin-left:5px}.tox:not([dir=rtl]) .tox-image-tools__toolbar>.tox-button+.tox-slider{margin-left:20px}.tox:not([dir=rtl]) .tox-image-tools__toolbar>.tox-slider+.tox-button{margin-left:20px}.tox[dir=rtl] .tox-image-tools__toolbar>.tox-slider:not(:first-of-type){margin-right:5px}.tox[dir=rtl] .tox-image-tools__toolbar>.tox-button+.tox-slider{margin-right:20px}.tox[dir=rtl] .tox-image-tools__toolbar>.tox-slider+.tox-button{margin-right:20px}.tox .tox-insert-table-picker{display:flex;flex-wrap:wrap;width:110px}.tox .tox-insert-table-picker>div{border-color:#d9d9d9;border-style:solid;border-width:0 1px 1px 0;box-sizing:border-box;height:11px;width:11px}.tox .tox-collection--list .tox-collection__group .tox-insert-table-picker{margin:-2.5px 0}.tox .tox-insert-table-picker .tox-insert-table-picker__selected{background-color:rgba(10,143,233,.5);border-color:rgba(10,143,233,.5)}.tox .tox-insert-table-picker__label{color:rgba(84,111,94,.7);display:block;font-size:8.75px;padding:2.5px;text-align:center;width:100%}.tox:not([dir=rtl]) .tox-insert-table-picker>div:nth-child(10n){border-right:0}.tox[dir=rtl] .tox-insert-table-picker>div:nth-child(10n+1){border-right:0}.tox .tox-menu{background-color:#fff;border:1px solid #d9d9d9;border-radius:3px;box-shadow:0 4px 8px 0 rgba(84,111,94,.1);display:inline-block;overflow:hidden;vertical-align:top;z-index:1150}.tox .tox-menu.tox-collection.tox-collection--list{padding:0}.tox .tox-menu.tox-collection.tox-collection--toolbar{padding:2.5px}.tox .tox-menu.tox-collection.tox-collection--grid{padding:2.5px}.tox .tox-menu__label blockquote,.tox .tox-menu__label code,.tox .tox-menu__label h1,.tox .tox-menu__label h2,.tox .tox-menu__label h3,.tox .tox-menu__label h4,.tox .tox-menu__label h5,.tox .tox-menu__label h6,.tox .tox-menu__label p{margin:0}.tox .tox-menubar{background:url("data:image/svg+xml;charset=utf8,%3Csvg height='39px' viewBox='0 0 40 39px' width='40' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='0' y='38px' width='100' height='1' fill='%23d9d9d9'/%3E%3C/svg%3E") left 0 top 0 #fff;background-color:#fff;display:flex;flex:0 0 auto;flex-shrink:0;flex-wrap:wrap;padding:0 4px 0 4px}.tox.tox-tinymce:not(.tox-tinymce-inline) .tox-editor-header:not(:first-child) .tox-menubar{border-top:1px solid #d9d9d9}.tox .tox-mbtn{align-items:center;background:0 0;border:0;border-radius:3px;box-shadow:none;color:#817f7c;display:flex;flex:0 0 auto;font-size:8.75px;font-style:normal;font-weight:400;height:34px;justify-content:center;margin:2px 0 3px 0;outline:0;overflow:hidden;padding:0 4px;text-transform:none;width:auto}.tox .tox-mbtn[disabled]{background-color:transparent;border:0;box-shadow:none;color:rgba(129,127,124,.5);cursor:not-allowed}.tox .tox-mbtn:focus:not(:disabled){background:#e5e9e7;border:0;box-shadow:none;color:#0a9fe5}.tox .tox-mbtn--active{background:#e5e9e7;border:0;box-shadow:none;color:rgba(41,159,250,.88)}.tox .tox-mbtn:hover:not(:disabled):not(.tox-mbtn--active){background:#e5e9e7;border:0;box-shadow:none;color:#0a9fe5}.tox .tox-mbtn__select-label{cursor:default;font-weight:400;margin:0 4px}.tox .tox-mbtn[disabled] .tox-mbtn__select-label{cursor:not-allowed}.tox .tox-mbtn__select-chevron{align-items:center;display:flex;justify-content:center;width:16px;display:none}.tox .tox-notification{border-radius:3px;border-style:solid;border-width:1px;box-shadow:none;box-sizing:border-box;display:-ms-grid;display:grid;font-size:8.75px;font-weight:400;-ms-grid-columns:minmax(40px,1fr) auto minmax(40px,1fr);grid-template-columns:minmax(40px,1fr) auto minmax(40px,1fr);margin-top:2.5px;opacity:0;padding:2.5px;transition:transform .1s ease-in,opacity 150ms ease-in}.tox .tox-notification p{font-size:8.75px;font-weight:400}.tox .tox-notification a{cursor:pointer;text-decoration:underline}.tox .tox-notification--in{opacity:1}.tox .tox-notification--success{background-color:#e4eeda;border-color:#d7e6c8;color:rgba(84,111,94,.85)}.tox .tox-notification--success p{color:rgba(84,111,94,.85)}.tox .tox-notification--success a{color:#547831}.tox .tox-notification--success svg{fill:rgba(84,111,94,.85)}.tox .tox-notification--error{background-color:#f8dede;border-color:#f2bfbf;color:rgba(84,111,94,.85)}.tox .tox-notification--error p{color:rgba(84,111,94,.85)}.tox .tox-notification--error a{color:#c00}.tox .tox-notification--error svg{fill:rgba(84,111,94,.85)}.tox .tox-notification--warn,.tox .tox-notification--warning{background-color:#fffaea;border-color:#ffe89d;color:rgba(84,111,94,.85)}.tox .tox-notification--warn p,.tox .tox-notification--warning p{color:rgba(84,111,94,.85)}.tox .tox-notification--warn a,.tox .tox-notification--warning a{color:rgba(84,111,94,.85)}.tox .tox-notification--warn svg,.tox .tox-notification--warning svg{fill:rgba(84,111,94,.85)}.tox .tox-notification--info{background-color:#d9edf7;border-color:#779ecb;color:rgba(84,111,94,.85)}.tox .tox-notification--info p{color:rgba(84,111,94,.85)}.tox .tox-notification--info a{color:rgba(84,111,94,.85)}.tox .tox-notification--info svg{fill:rgba(84,111,94,.85)}.tox .tox-notification__body{-ms-grid-row-align:center;align-self:center;color:rgba(84,111,94,.85);font-size:14px;-ms-grid-column-span:1;grid-column-end:3;-ms-grid-column:2;grid-column-start:2;-ms-grid-row-span:1;grid-row-end:2;-ms-grid-row:1;grid-row-start:1;text-align:center;white-space:normal;word-break:break-all;word-break:break-word}.tox .tox-notification__body>*{margin:0}.tox .tox-notification__body>*+*{margin-top:1rem}.tox .tox-notification__icon{-ms-grid-row-align:center;align-self:center;-ms-grid-column-span:1;grid-column-end:2;-ms-grid-column:1;grid-column-start:1;-ms-grid-row-span:1;grid-row-end:2;-ms-grid-row:1;grid-row-start:1;-ms-grid-column-align:end;justify-self:end}.tox .tox-notification__icon svg{display:block}.tox .tox-notification__dismiss{-ms-grid-row-align:start;align-self:start;-ms-grid-column-span:1;grid-column-end:4;-ms-grid-column:3;grid-column-start:3;-ms-grid-row-span:1;grid-row-end:2;-ms-grid-row:1;grid-row-start:1;-ms-grid-column-align:end;justify-self:end}.tox .tox-notification .tox-progress-bar{-ms-grid-column-span:3;grid-column-end:4;-ms-grid-column:1;grid-column-start:1;-ms-grid-row-span:1;grid-row-end:3;-ms-grid-row:2;grid-row-start:2;-ms-grid-column-align:center;justify-self:center}.tox .tox-pop{display:inline-block;position:relative}.tox .tox-pop--resizing{transition:width .1s ease}.tox .tox-pop--resizing .tox-toolbar,.tox .tox-pop--resizing .tox-toolbar__group{flex-wrap:nowrap}.tox .tox-pop--transition{transition:.15s ease;transition-property:left,right,top,bottom}.tox .tox-pop--transition::after,.tox .tox-pop--transition::before{transition:all .15s,visibility 0s,opacity 75ms ease 75ms}.tox .tox-pop__dialog{background-color:#fff;border:1px solid #d9d9d9;border-radius:3px;box-shadow:0 1px 3px rgba(0,0,0,.15);min-width:0;overflow:hidden}.tox .tox-pop__dialog>:not(.tox-toolbar){margin:2.5px 2.5px 2.5px 5px}.tox .tox-pop__dialog .tox-toolbar{background-color:transparent;margin-bottom:-1px}.tox .tox-pop::after,.tox .tox-pop::before{border-style:solid;content:'';display:block;height:0;opacity:1;position:absolute;width:0}.tox .tox-pop.tox-pop--inset::after,.tox .tox-pop.tox-pop--inset::before{opacity:0;transition:all 0s .15s,visibility 0s,opacity 75ms ease}.tox .tox-pop.tox-pop--bottom::after,.tox .tox-pop.tox-pop--bottom::before{left:50%;top:100%}.tox .tox-pop.tox-pop--bottom::after{border-color:#fff transparent transparent transparent;border-width:8px;margin-left:-8px;margin-top:-1px}.tox .tox-pop.tox-pop--bottom::before{border-color:#d9d9d9 transparent transparent transparent;border-width:9px;margin-left:-9px}.tox .tox-pop.tox-pop--top::after,.tox .tox-pop.tox-pop--top::before{left:50%;top:0;transform:translateY(-100%)}.tox .tox-pop.tox-pop--top::after{border-color:transparent transparent #fff transparent;border-width:8px;margin-left:-8px;margin-top:1px}.tox .tox-pop.tox-pop--top::before{border-color:transparent transparent #d9d9d9 transparent;border-width:9px;margin-left:-9px}.tox .tox-pop.tox-pop--left::after,.tox .tox-pop.tox-pop--left::before{left:0;top:calc(50% - 1px);transform:translateY(-50%)}.tox .tox-pop.tox-pop--left::after{border-color:transparent #fff transparent transparent;border-width:8px;margin-left:-15px}.tox .tox-pop.tox-pop--left::before{border-color:transparent #d9d9d9 transparent transparent;border-width:10px;margin-left:-19px}.tox .tox-pop.tox-pop--right::after,.tox .tox-pop.tox-pop--right::before{left:100%;top:calc(50% + 1px);transform:translateY(-50%)}.tox .tox-pop.tox-pop--right::after{border-color:transparent transparent transparent #fff;border-width:8px;margin-left:-1px}.tox .tox-pop.tox-pop--right::before{border-color:transparent transparent transparent #d9d9d9;border-width:10px;margin-left:-1px}.tox .tox-pop.tox-pop--align-left::after,.tox .tox-pop.tox-pop--align-left::before{left:20px}.tox .tox-pop.tox-pop--align-right::after,.tox .tox-pop.tox-pop--align-right::before{left:calc(100% - 20px)}.tox .tox-sidebar-wrap{display:flex;flex-direction:row;flex-grow:1;-ms-flex-preferred-size:0;min-height:0}.tox .tox-sidebar{background-color:#fff;display:flex;flex-direction:row;justify-content:flex-end}.tox .tox-sidebar__slider{display:flex;overflow:hidden}.tox .tox-sidebar__pane-container{display:flex}.tox .tox-sidebar__pane{display:flex}.tox .tox-sidebar--sliding-closed{opacity:0}.tox .tox-sidebar--sliding-open{opacity:1}.tox .tox-sidebar--sliding-growing,.tox .tox-sidebar--sliding-shrinking{transition:width .5s ease,opacity .5s ease}.tox .tox-selector{background-color:#4099ff;border-color:#4099ff;border-style:solid;border-width:1px;box-sizing:border-box;display:inline-block;height:10px;position:absolute;width:10px}.tox.tox-platform-touch .tox-selector{height:12px;width:12px}.tox .tox-slider{align-items:center;display:flex;flex:1;-ms-flex-preferred-size:auto;height:24px;justify-content:center;position:relative}.tox .tox-slider__rail{background-color:transparent;border:1px solid #d9d9d9;border-radius:3px;height:10px;min-width:120px;width:100%}.tox .tox-slider__handle{background-color:#0a8fe9;border:2px solid #0871b8;border-radius:3px;box-shadow:none;height:24px;left:50%;position:absolute;top:50%;transform:translateX(-50%) translateY(-50%);width:14px}.tox .tox-source-code{overflow:auto}.tox .tox-spinner{display:flex}.tox .tox-spinner>div{animation:tam-bouncing-dots 1.5s ease-in-out 0s infinite both;background-color:rgba(84,111,94,.7);border-radius:100%;height:5px;width:5px}.tox .tox-spinner>div:nth-child(1){animation-delay:-.32s}.tox .tox-spinner>div:nth-child(2){animation-delay:-.16s}@keyframes tam-bouncing-dots{0%,100%,80%{transform:scale(0)}40%{transform:scale(1)}}.tox:not([dir=rtl]) .tox-spinner>div:not(:first-child){margin-left:2.5px}.tox[dir=rtl] .tox-spinner>div:not(:first-child){margin-right:2.5px}.tox .tox-statusbar{align-items:center;background-color:#fff;border-top:1px solid #d9d9d9;color:rgba(84,111,94,.7);display:flex;flex:0 0 auto;font-size:12px;font-weight:400;height:18px;overflow:hidden;padding:0 5px;position:relative;text-transform:uppercase}.tox .tox-statusbar__text-container{display:flex;flex:1 1 auto;justify-content:flex-end;overflow:hidden}.tox .tox-statusbar__path{display:flex;flex:1 1 auto;margin-right:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tox .tox-statusbar__path>*{display:inline;white-space:nowrap}.tox .tox-statusbar__wordcount{flex:0 0 auto;margin-left:1ch}.tox .tox-statusbar a,.tox .tox-statusbar__path-item,.tox .tox-statusbar__wordcount{color:rgba(84,111,94,.7);text-decoration:none}.tox .tox-statusbar a:focus:not(:disabled):not([aria-disabled=true]),.tox .tox-statusbar a:hover:not(:disabled):not([aria-disabled=true]),.tox .tox-statusbar__path-item:focus:not(:disabled):not([aria-disabled=true]),.tox .tox-statusbar__path-item:hover:not(:disabled):not([aria-disabled=true]),.tox .tox-statusbar__wordcount:focus:not(:disabled):not([aria-disabled=true]),.tox .tox-statusbar__wordcount:hover:not(:disabled):not([aria-disabled=true]){cursor:pointer;text-decoration:underline}.tox .tox-statusbar__resize-handle{align-items:flex-end;align-self:stretch;cursor:nwse-resize;display:flex;flex:0 0 auto;justify-content:flex-end;margin-left:auto;margin-right:-5px;padding-left:1ch}.tox .tox-statusbar__resize-handle svg{display:block;fill:rgba(84,111,94,.7)}.tox .tox-statusbar__resize-handle:focus svg{background-color:#e5e9e7;border-radius:1px;box-shadow:0 0 0 2px #e5e9e7}.tox:not([dir=rtl]) .tox-statusbar__path>*{margin-right:2.5px}.tox:not([dir=rtl]) .tox-statusbar__branding{margin-left:1ch}.tox[dir=rtl] .tox-statusbar{flex-direction:row-reverse}.tox[dir=rtl] .tox-statusbar__path>*{margin-left:2.5px}.tox .tox-throbber{z-index:1299}.tox .tox-throbber__busy-spinner{align-items:center;background-color:rgba(255,255,255,.6);bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0}.tox .tox-tbtn{align-items:center;background:0 0;border:0;border-radius:3px;box-shadow:none;color:#817f7c;display:flex;flex:0 0 auto;font-size:8.75px;font-style:normal;font-weight:400;height:34px;justify-content:center;margin:2px 0 3px 0;outline:0;overflow:hidden;padding:0;text-transform:none;width:34px}.tox .tox-tbtn svg{display:block;fill:#817f7c}.tox .tox-tbtn.tox-tbtn-more{padding-left:5px;padding-right:5px;width:inherit}.tox .tox-tbtn:focus{background:#e5e9e7;border:0;box-shadow:none}.tox .tox-tbtn:hover{background:#e5e9e7;border:0;box-shadow:none;color:#0a9fe5}.tox .tox-tbtn:hover svg{fill:#0a9fe5}.tox .tox-tbtn:active{background:#e5e9e7;border:0;box-shadow:none;color:rgba(41,159,250,.88)}.tox .tox-tbtn:active svg{fill:rgba(41,159,250,.88)}.tox .tox-tbtn--disabled,.tox .tox-tbtn--disabled:hover,.tox .tox-tbtn:disabled,.tox .tox-tbtn:disabled:hover{background:0 0;border:0;box-shadow:none;color:rgba(129,127,124,.5);cursor:not-allowed}.tox .tox-tbtn--disabled svg,.tox .tox-tbtn--disabled:hover svg,.tox .tox-tbtn:disabled svg,.tox .tox-tbtn:disabled:hover svg{fill:rgba(129,127,124,.5)}.tox .tox-tbtn--enabled,.tox .tox-tbtn--enabled:hover{background:#e5e9e7;border:0;box-shadow:none;color:rgba(41,159,250,.88)}.tox .tox-tbtn--enabled:hover>*,.tox .tox-tbtn--enabled>*{transform:none}.tox .tox-tbtn--enabled svg,.tox .tox-tbtn--enabled:hover svg{fill:rgba(41,159,250,.88)}.tox .tox-tbtn:focus:not(.tox-tbtn--disabled){color:#ee930e}.tox .tox-tbtn:focus:not(.tox-tbtn--disabled) svg{fill:#ee930e}.tox .tox-tbtn:active>*{transform:none}.tox .tox-tbtn--md{height:51px;width:51px}.tox .tox-tbtn--lg{flex-direction:column;height:68px;width:68px}.tox .tox-tbtn--return{-ms-grid-row-align:stretch;align-self:stretch;height:unset;width:16px}.tox .tox-tbtn--labeled{padding:0 4px;width:unset}.tox .tox-tbtn__vlabel{display:block;font-size:10px;font-weight:400;letter-spacing:-.025em;margin-bottom:2.5px;white-space:nowrap}.tox .tox-tbtn--select{margin:2px 0 3px 0;padding:0 4px;width:auto}.tox .tox-tbtn__select-label{cursor:default;font-weight:400;margin:0 4px}.tox .tox-tbtn__select-chevron{align-items:center;display:flex;justify-content:center;width:10px}.tox .tox-tbtn__select-chevron svg{fill:rgba(129,127,124,.5)}.tox .tox-tbtn--bespoke .tox-tbtn__select-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:7em}.tox .tox-split-button{border:0;border-radius:3px;box-sizing:border-box;display:flex;margin:2px 0 3px 0;overflow:hidden}.tox .tox-split-button:hover{box-shadow:0 0 0 1px #e5e9e7 inset}.tox .tox-split-button:focus{background:#e5e9e7;box-shadow:none;color:#ee930e}.tox .tox-split-button>*{border-radius:0}.tox .tox-split-button__chevron{width:10px}.tox .tox-split-button__chevron svg{fill:rgba(129,127,124,.5)}.tox .tox-split-button .tox-tbtn{margin:0}.tox.tox-platform-touch .tox-split-button .tox-tbtn:first-child{width:30px}.tox.tox-platform-touch .tox-split-button__chevron{width:14px}.tox .tox-split-button.tox-tbtn--disabled .tox-tbtn:focus,.tox .tox-split-button.tox-tbtn--disabled .tox-tbtn:hover,.tox .tox-split-button.tox-tbtn--disabled:focus,.tox .tox-split-button.tox-tbtn--disabled:hover{background:0 0;box-shadow:none;color:rgba(129,127,124,.5)}.tox .tox-toolbar-overlord{background-color:#fff}.tox .tox-toolbar,.tox .tox-toolbar__overflow,.tox .tox-toolbar__primary{background:url("data:image/svg+xml;charset=utf8,%3Csvg height='39px' viewBox='0 0 40 39px' width='40' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='0' y='38px' width='100' height='1' fill='%23d9d9d9'/%3E%3C/svg%3E") left 0 top 0 #fff;background-color:#fff;display:flex;flex:0 0 auto;flex-shrink:0;flex-wrap:wrap;padding:0 0}.tox .tox-toolbar__overflow.tox-toolbar__overflow--closed{height:0;opacity:0;padding-bottom:0;padding-top:0;visibility:hidden}.tox .tox-toolbar__overflow--growing{transition:height .3s ease,opacity .2s linear .1s}.tox .tox-toolbar__overflow--shrinking{transition:opacity .3s ease,height .2s linear .1s,visibility 0s linear .3s}.tox .tox-menubar+.tox-toolbar,.tox .tox-menubar+.tox-toolbar-overlord .tox-toolbar__primary{border-top:1px solid #d9d9d9;margin-top:-1px}.tox .tox-toolbar--scrolling{flex-wrap:nowrap;overflow-x:auto}.tox .tox-pop .tox-toolbar{border-width:0}.tox .tox-toolbar--no-divider{background-image:none}.tox-tinymce:not(.tox-tinymce-inline) .tox-editor-header:not(:first-child) .tox-toolbar-overlord:first-child .tox-toolbar__primary,.tox-tinymce:not(.tox-tinymce-inline) .tox-editor-header:not(:first-child) .tox-toolbar:first-child{border-top:1px solid #d9d9d9}.tox.tox-tinymce-aux .tox-toolbar__overflow{background-color:#fff;border:1px solid #d9d9d9;border-radius:3px;box-shadow:0 1px 3px rgba(0,0,0,.15)}.tox .tox-toolbar__group{align-items:center;display:flex;flex-wrap:wrap;margin:0 0;padding:0 4px 0 4px}.tox .tox-toolbar__group--pull-right{margin-left:auto}.tox .tox-toolbar--scrolling .tox-toolbar__group{flex-shrink:0;flex-wrap:nowrap}.tox:not([dir=rtl]) .tox-toolbar__group:not(:last-of-type){border-right:1px solid #d9d9d9}.tox[dir=rtl] .tox-toolbar__group:not(:last-of-type){border-left:1px solid #d9d9d9}.tox .tox-tooltip{display:inline-block;padding:5px;position:relative}.tox .tox-tooltip__body{background-color:rgba(84,111,94,.85);border-radius:3px;box-shadow:0 2px 4px rgba(84,111,94,.3);color:rgba(255,255,255,.75);font-size:8.75px;font-style:normal;font-weight:400;padding:2.5px 5px;text-transform:none}.tox .tox-tooltip__arrow{position:absolute}.tox .tox-tooltip--down .tox-tooltip__arrow{border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid rgba(84,111,94,.85);bottom:0;left:50%;position:absolute;transform:translateX(-50%)}.tox .tox-tooltip--up .tox-tooltip__arrow{border-bottom:5px solid rgba(84,111,94,.85);border-left:5px solid transparent;border-right:5px solid transparent;left:50%;position:absolute;top:0;transform:translateX(-50%)}.tox .tox-tooltip--right .tox-tooltip__arrow{border-bottom:5px solid transparent;border-left:5px solid rgba(84,111,94,.85);border-top:5px solid transparent;position:absolute;right:0;top:50%;transform:translateY(-50%)}.tox .tox-tooltip--left .tox-tooltip__arrow{border-bottom:5px solid transparent;border-right:5px solid rgba(84,111,94,.85);border-top:5px solid transparent;left:0;position:absolute;top:50%;transform:translateY(-50%)}.tox .tox-well{border:1px solid #d9d9d9;border-radius:3px;padding:5px;width:100%}.tox .tox-well>:first-child{margin-top:0}.tox .tox-well>:last-child{margin-bottom:0}.tox .tox-well>:only-child{margin:0}.tox .tox-custom-editor{border:1px solid #d9d9d9;border-radius:3px;display:flex;flex:1;position:relative}.tox .tox-dialog-loading::before{background-color:rgba(0,0,0,.5);content:"";height:100%;position:absolute;width:100%;z-index:1000}.tox .tox-tab{cursor:pointer}.tox .tox-dialog__content-js{display:flex;flex:1;-ms-flex-preferred-size:auto}.tox .tox-dialog__body-content .tox-collection{display:flex;flex:1;-ms-flex-preferred-size:auto}.tox .tox-image-tools-edit-panel{height:60px}.tox .tox-image-tools__sidebar{height:60px} \ No newline at end of file diff --git a/public/resource/tinymce/skins/ui/jeecg/skin.mobile.css b/public/resource/tinymce/skins/ui/jeecg/skin.mobile.css new file mode 100644 index 0000000..df458d5 --- /dev/null +++ b/public/resource/tinymce/skins/ui/jeecg/skin.mobile.css @@ -0,0 +1,677 @@ +/** +* Copyright (c) Tiny Technologies, Inc. All rights reserved. +* Licensed under the LGPL or a commercial license. +* For LGPL see License.txt in the project root for license information. +* For commercial licenses see https://www.tiny.cloud/ +*/ +/* RESET all the things! */ +.tinymce-mobile-outer-container { + all: initial; + display: block; +} +.tinymce-mobile-outer-container * { + border: 0; + box-sizing: initial; + cursor: inherit; + float: none; + line-height: 1; + margin: 0; + outline: 0; + padding: 0; + -webkit-tap-highlight-color: transparent; + /* TBIO-3691, stop the gray flicker on touch. */ + text-shadow: none; + white-space: nowrap; +} +.tinymce-mobile-icon-arrow-back::before { + content: "\e5cd"; +} +.tinymce-mobile-icon-image::before { + content: "\e412"; +} +.tinymce-mobile-icon-cancel-circle::before { + content: "\e5c9"; +} +.tinymce-mobile-icon-full-dot::before { + content: "\e061"; +} +.tinymce-mobile-icon-align-center::before { + content: "\e234"; +} +.tinymce-mobile-icon-align-left::before { + content: "\e236"; +} +.tinymce-mobile-icon-align-right::before { + content: "\e237"; +} +.tinymce-mobile-icon-bold::before { + content: "\e238"; +} +.tinymce-mobile-icon-italic::before { + content: "\e23f"; +} +.tinymce-mobile-icon-unordered-list::before { + content: "\e241"; +} +.tinymce-mobile-icon-ordered-list::before { + content: "\e242"; +} +.tinymce-mobile-icon-font-size::before { + content: "\e245"; +} +.tinymce-mobile-icon-underline::before { + content: "\e249"; +} +.tinymce-mobile-icon-link::before { + content: "\e157"; +} +.tinymce-mobile-icon-unlink::before { + content: "\eca2"; +} +.tinymce-mobile-icon-color::before { + content: "\e891"; +} +.tinymce-mobile-icon-previous::before { + content: "\e314"; +} +.tinymce-mobile-icon-next::before { + content: "\e315"; +} +.tinymce-mobile-icon-large-font::before, +.tinymce-mobile-icon-style-formats::before { + content: "\e264"; +} +.tinymce-mobile-icon-undo::before { + content: "\e166"; +} +.tinymce-mobile-icon-redo::before { + content: "\e15a"; +} +.tinymce-mobile-icon-removeformat::before { + content: "\e239"; +} +.tinymce-mobile-icon-small-font::before { + content: "\e906"; +} +.tinymce-mobile-icon-readonly-back::before, +.tinymce-mobile-format-matches::after { + content: "\e5ca"; +} +.tinymce-mobile-icon-small-heading::before { + content: "small"; +} +.tinymce-mobile-icon-large-heading::before { + content: "large"; +} +.tinymce-mobile-icon-small-heading::before, +.tinymce-mobile-icon-large-heading::before { + font-family: sans-serif; + font-size: 80%; +} +.tinymce-mobile-mask-edit-icon::before { + content: "\e254"; +} +.tinymce-mobile-icon-back::before { + content: "\e5c4"; +} +.tinymce-mobile-icon-heading::before { + /* TODO: Translate */ + content: "Headings"; + font-family: sans-serif; + font-size: 80%; + font-weight: bold; +} +.tinymce-mobile-icon-h1::before { + content: "H1"; + font-weight: bold; +} +.tinymce-mobile-icon-h2::before { + content: "H2"; + font-weight: bold; +} +.tinymce-mobile-icon-h3::before { + content: "H3"; + font-weight: bold; +} +.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask { + align-items: center; + display: flex; + justify-content: center; + background: rgba(51, 51, 51, 0.5); + height: 100%; + position: absolute; + top: 0; + width: 100%; +} +.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask .tinymce-mobile-content-container { + align-items: center; + border-radius: 50%; + display: flex; + flex-direction: column; + font-family: sans-serif; + font-size: 1em; + justify-content: space-between; +} +.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask .tinymce-mobile-content-container .mixin-menu-item { + align-items: center; + display: flex; + justify-content: center; + border-radius: 50%; + height: 2.1em; + width: 2.1em; +} +.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask .tinymce-mobile-content-container .tinymce-mobile-content-tap-section { + align-items: center; + display: flex; + justify-content: center; + flex-direction: column; + font-size: 1em; +} +@media only screen and (min-device-width:700px) { + .tinymce-mobile-outer-container .tinymce-mobile-disabled-mask .tinymce-mobile-content-container .tinymce-mobile-content-tap-section { + font-size: 1.2em; + } +} +.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask .tinymce-mobile-content-container .tinymce-mobile-content-tap-section .tinymce-mobile-mask-tap-icon { + align-items: center; + display: flex; + justify-content: center; + border-radius: 50%; + height: 2.1em; + width: 2.1em; + background-color: white; + color: #207ab7; +} +.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask .tinymce-mobile-content-container .tinymce-mobile-content-tap-section .tinymce-mobile-mask-tap-icon::before { + content: "\e900"; + font-family: 'tinymce-mobile', sans-serif; +} +.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask .tinymce-mobile-content-container .tinymce-mobile-content-tap-section:not(.tinymce-mobile-mask-tap-icon-selected) .tinymce-mobile-mask-tap-icon { + z-index: 2; +} +.tinymce-mobile-android-container.tinymce-mobile-android-maximized { + background: #ffffff; + border: none; + bottom: 0; + display: flex; + flex-direction: column; + left: 0; + position: fixed; + right: 0; + top: 0; +} +.tinymce-mobile-android-container:not(.tinymce-mobile-android-maximized) { + position: relative; +} +.tinymce-mobile-android-container .tinymce-mobile-editor-socket { + display: flex; + flex-grow: 1; +} +.tinymce-mobile-android-container .tinymce-mobile-editor-socket iframe { + display: flex !important; + flex-grow: 1; + height: auto !important; +} +.tinymce-mobile-android-scroll-reload { + overflow: hidden; +} +:not(.tinymce-mobile-readonly-mode) > .tinymce-mobile-android-selection-context-toolbar { + margin-top: 23px; +} +.tinymce-mobile-toolstrip { + background: #fff; + display: flex; + flex: 0 0 auto; + z-index: 1; +} +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar { + align-items: center; + background-color: #fff; + border-bottom: 1px solid #cccccc; + display: flex; + flex: 1; + height: 2.5em; + width: 100%; + /* Make it no larger than the toolstrip, so that it needs to scroll */ +} +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group { + align-items: center; + display: flex; + height: 100%; + flex-shrink: 1; +} +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group > div { + align-items: center; + display: flex; + height: 100%; + flex: 1; +} +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group.tinymce-mobile-exit-container { + background: #f44336; +} +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group.tinymce-mobile-toolbar-scrollable-group { + flex-grow: 1; +} +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group .tinymce-mobile-toolbar-group-item { + padding-left: 0.5em; + padding-right: 0.5em; +} +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group .tinymce-mobile-toolbar-group-item.tinymce-mobile-toolbar-button { + align-items: center; + display: flex; + height: 80%; + margin-left: 2px; + margin-right: 2px; +} +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group .tinymce-mobile-toolbar-group-item.tinymce-mobile-toolbar-button.tinymce-mobile-toolbar-button-selected { + background: #d4dbd7; + color: #cccccc; +} +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group:first-of-type, +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group:last-of-type { + background: #207ab7; + color: #eceff1; +} +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar { + /* Note, this file is imported inside .tinymce-mobile-context-toolbar, so that prefix is on everything here. */ +} +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group { + align-items: center; + display: flex; + height: 100%; + flex: 1; + padding-bottom: 0.4em; + padding-top: 0.4em; + /* Make any buttons appearing on the left and right display in the centre (e.g. color edges) */ + /* For widgets like the colour picker, use the whole height */ +} +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog { + display: flex; + min-height: 1.5em; + overflow: hidden; + padding-left: 0; + padding-right: 0; + position: relative; + width: 100%; +} +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain { + display: flex; + height: 100%; + transition: left cubic-bezier(0.4, 0, 1, 1) 0.15s; + width: 100%; +} +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen { + display: flex; + flex: 0 0 auto; + justify-content: space-between; + width: 100%; +} +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen input { + font-family: Sans-serif; +} +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-input-container { + display: flex; + flex-grow: 1; + position: relative; +} +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-input-container .tinymce-mobile-input-container-x { + -ms-grid-row-align: center; + align-self: center; + background: inherit; + border: none; + border-radius: 50%; + color: #888; + font-size: 0.6em; + font-weight: bold; + height: 100%; + padding-right: 2px; + position: absolute; + right: 0; +} +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-input-container.tinymce-mobile-input-container-empty .tinymce-mobile-input-container-x { + display: none; +} +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-icon-previous, +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-icon-next { + align-items: center; + display: flex; +} +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-icon-previous::before, +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-icon-next::before { + align-items: center; + display: flex; + font-weight: bold; + height: 100%; + padding-left: 0.5em; + padding-right: 0.5em; +} +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-icon-previous.tinymce-mobile-toolbar-navigation-disabled::before, +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-icon-next.tinymce-mobile-toolbar-navigation-disabled::before { + visibility: hidden; +} +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-dot-item { + color: #cccccc; + font-size: 10px; + line-height: 10px; + margin: 0 2px; + padding-top: 3px; +} +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-dot-item.tinymce-mobile-dot-active { + color: #d4dbd7; +} +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-icon-large-font::before, +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-icon-large-heading::before { + margin-left: 0.5em; + margin-right: 0.9em; +} +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-icon-small-font::before, +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-icon-small-heading::before { + margin-left: 0.9em; + margin-right: 0.5em; +} +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider { + display: flex; + flex: 1; + margin-left: 0; + margin-right: 0; + padding: 0.28em 0; + position: relative; +} +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider .tinymce-mobile-slider-size-container { + align-items: center; + display: flex; + flex-grow: 1; + height: 100%; +} +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider .tinymce-mobile-slider-size-container .tinymce-mobile-slider-size-line { + background: #cccccc; + display: flex; + flex: 1; + height: 0.2em; + margin-bottom: 0.3em; + margin-top: 0.3em; +} +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider.tinymce-mobile-hue-slider-container { + padding-left: 2em; + padding-right: 2em; +} +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider.tinymce-mobile-hue-slider-container .tinymce-mobile-slider-gradient-container { + align-items: center; + display: flex; + flex-grow: 1; + height: 100%; +} +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider.tinymce-mobile-hue-slider-container .tinymce-mobile-slider-gradient-container .tinymce-mobile-slider-gradient { + background: linear-gradient(to right, hsl(0, 100%, 50%) 0%, hsl(60, 100%, 50%) 17%, hsl(120, 100%, 50%) 33%, hsl(180, 100%, 50%) 50%, hsl(240, 100%, 50%) 67%, hsl(300, 100%, 50%) 83%, hsl(0, 100%, 50%) 100%); + display: flex; + flex: 1; + height: 0.2em; + margin-bottom: 0.3em; + margin-top: 0.3em; +} +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider.tinymce-mobile-hue-slider-container .tinymce-mobile-hue-slider-black { + /* Not part of theming */ + background: black; + height: 0.2em; + margin-bottom: 0.3em; + margin-top: 0.3em; + width: 1.2em; +} +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider.tinymce-mobile-hue-slider-container .tinymce-mobile-hue-slider-white { + /* Not part of theming */ + background: white; + height: 0.2em; + margin-bottom: 0.3em; + margin-top: 0.3em; + width: 1.2em; +} +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider .tinymce-mobile-slider-thumb { + /* vertically centering trick (margin: auto, top: 0, bottom: 0). On iOS and Safari, if you leave + * out these values, then it shows the thumb at the top of the spectrum. This is probably because it is + * absolutely positioned with only a left value, and not a top. Note, on Chrome it seems to be fine without + * this approach. + */ + align-items: center; + background-clip: padding-box; + background-color: #455a64; + border: 0.5em solid rgba(136, 136, 136, 0); + border-radius: 3em; + bottom: 0; + color: #fff; + display: flex; + height: 0.5em; + justify-content: center; + left: -10px; + margin: auto; + position: absolute; + top: 0; + transition: border 120ms cubic-bezier(0.39, 0.58, 0.57, 1); + width: 0.5em; +} +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider .tinymce-mobile-slider-thumb.tinymce-mobile-thumb-active { + border: 0.5em solid rgba(136, 136, 136, 0.39); +} +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serializer-wrapper, +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group > div { + align-items: center; + display: flex; + height: 100%; + flex: 1; +} +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serializer-wrapper { + flex-direction: column; + justify-content: center; +} +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-toolbar-group-item { + align-items: center; + display: flex; +} +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-toolbar-group-item:not(.tinymce-mobile-serialised-dialog) { + height: 100%; +} +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-dot-container { + display: flex; +} +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group input { + background: #ffffff; + border: none; + border-radius: 0; + color: #455a64; + flex-grow: 1; + font-size: 0.85em; + padding-bottom: 0.1em; + padding-left: 5px; + padding-top: 0.1em; +} +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group input::-webkit-input-placeholder { + /* WebKit, Blink, Edge */ + color: #888; +} +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group input:-ms-input-placeholder { + /* WebKit, Blink, Edge */ + color: #888; +} +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group input::placeholder { + /* WebKit, Blink, Edge */ + color: #888; +} +/* dropup */ +.tinymce-mobile-dropup { + background: white; + display: flex; + overflow: hidden; + width: 100%; +} +.tinymce-mobile-dropup.tinymce-mobile-dropup-shrinking { + transition: height 0.3s ease-out; +} +.tinymce-mobile-dropup.tinymce-mobile-dropup-growing { + transition: height 0.3s ease-in; +} +.tinymce-mobile-dropup.tinymce-mobile-dropup-closed { + flex-grow: 0; +} +.tinymce-mobile-dropup.tinymce-mobile-dropup-open:not(.tinymce-mobile-dropup-growing) { + flex-grow: 1; +} +/* TODO min-height for device size and orientation */ +.tinymce-mobile-ios-container .tinymce-mobile-dropup:not(.tinymce-mobile-dropup-closed) { + min-height: 200px; +} +@media only screen and (orientation: landscape) { + .tinymce-mobile-dropup:not(.tinymce-mobile-dropup-closed) { + min-height: 200px; + } +} +@media only screen and (min-device-width : 320px) and (max-device-width : 568px) and (orientation : landscape) { + .tinymce-mobile-ios-container .tinymce-mobile-dropup:not(.tinymce-mobile-dropup-closed) { + min-height: 150px; + } +} +/* styles menu */ +.tinymce-mobile-styles-menu { + font-family: sans-serif; + outline: 4px solid black; + overflow: hidden; + position: relative; + width: 100%; +} +.tinymce-mobile-styles-menu [role="menu"] { + display: flex; + flex-direction: column; + height: 100%; + position: absolute; + width: 100%; +} +.tinymce-mobile-styles-menu [role="menu"].transitioning { + transition: transform 0.5s ease-in-out; +} +.tinymce-mobile-styles-menu .tinymce-mobile-styles-item { + border-bottom: 1px solid #ddd; + color: #455a64; + cursor: pointer; + display: flex; + padding: 1em 1em; + position: relative; +} +.tinymce-mobile-styles-menu .tinymce-mobile-styles-collapser .tinymce-mobile-styles-collapse-icon::before { + color: #455a64; + content: "\e314"; + font-family: 'tinymce-mobile', sans-serif; +} +.tinymce-mobile-styles-menu .tinymce-mobile-styles-item.tinymce-mobile-styles-item-is-menu::after { + color: #455a64; + content: "\e315"; + font-family: 'tinymce-mobile', sans-serif; + padding-left: 1em; + padding-right: 1em; + position: absolute; + right: 0; +} +.tinymce-mobile-styles-menu .tinymce-mobile-styles-item.tinymce-mobile-format-matches::after { + font-family: 'tinymce-mobile', sans-serif; + padding-left: 1em; + padding-right: 1em; + position: absolute; + right: 0; +} +.tinymce-mobile-styles-menu .tinymce-mobile-styles-separator, +.tinymce-mobile-styles-menu .tinymce-mobile-styles-collapser { + align-items: center; + background: #fff; + border-top: #455a64; + color: #455a64; + display: flex; + min-height: 2.5em; + padding-left: 1em; + padding-right: 1em; +} +.tinymce-mobile-styles-menu [data-transitioning-destination="before"][data-transitioning-state], +.tinymce-mobile-styles-menu [data-transitioning-state="before"] { + transform: translate(-100%); +} +.tinymce-mobile-styles-menu [data-transitioning-destination="current"][data-transitioning-state], +.tinymce-mobile-styles-menu [data-transitioning-state="current"] { + transform: translate(0%); +} +.tinymce-mobile-styles-menu [data-transitioning-destination="after"][data-transitioning-state], +.tinymce-mobile-styles-menu [data-transitioning-state="after"] { + transform: translate(100%); +} +@font-face { + font-family: 'tinymce-mobile'; + font-style: normal; + font-weight: normal; + src: url('fonts/tinymce-mobile.woff?8x92w3') format('woff'); +} +@media (min-device-width: 700px) { + .tinymce-mobile-outer-container, + .tinymce-mobile-outer-container input { + font-size: 25px; + } +} +@media (max-device-width: 700px) { + .tinymce-mobile-outer-container, + .tinymce-mobile-outer-container input { + font-size: 18px; + } +} +.tinymce-mobile-icon { + font-family: 'tinymce-mobile', sans-serif; +} +.mixin-flex-and-centre { + align-items: center; + display: flex; + justify-content: center; +} +.mixin-flex-bar { + align-items: center; + display: flex; + height: 100%; +} +.tinymce-mobile-outer-container .tinymce-mobile-editor-socket iframe { + background-color: #fff; + width: 100%; +} +.tinymce-mobile-editor-socket .tinymce-mobile-mask-edit-icon { + /* Note, on the iPod touch in landscape, this isn't visible when the navbar appears */ + background-color: #207ab7; + border-radius: 50%; + bottom: 1em; + color: white; + font-size: 1em; + height: 2.1em; + position: fixed; + right: 2em; + width: 2.1em; + align-items: center; + display: flex; + justify-content: center; +} +@media only screen and (min-device-width:700px) { + .tinymce-mobile-editor-socket .tinymce-mobile-mask-edit-icon { + font-size: 1.2em; + } +} +.tinymce-mobile-outer-container:not(.tinymce-mobile-fullscreen-maximized) .tinymce-mobile-editor-socket { + height: 300px; + overflow: hidden; +} +.tinymce-mobile-outer-container:not(.tinymce-mobile-fullscreen-maximized) .tinymce-mobile-editor-socket iframe { + height: 100%; +} +.tinymce-mobile-outer-container:not(.tinymce-mobile-fullscreen-maximized) .tinymce-mobile-toolstrip { + display: none; +} +/* + Note, that if you don't include this (::-webkit-file-upload-button), the toolbar width gets + increased and the whole body becomes scrollable. It's important! + */ +input[type="file"]::-webkit-file-upload-button { + display: none; +} +@media only screen and (min-device-width : 320px) and (max-device-width : 568px) and (orientation : landscape) { + .tinymce-mobile-ios-container .tinymce-mobile-editor-socket .tinymce-mobile-mask-edit-icon { + bottom: 50%; + } +} diff --git a/public/resource/tinymce/skins/ui/jeecg/skin.mobile.min.css b/public/resource/tinymce/skins/ui/jeecg/skin.mobile.min.css new file mode 100644 index 0000000..eaad954 --- /dev/null +++ b/public/resource/tinymce/skins/ui/jeecg/skin.mobile.min.css @@ -0,0 +1,7 @@ +/** +* Copyright (c) Tiny Technologies, Inc. All rights reserved. +* Licensed under the LGPL or a commercial license. +* For LGPL see License.txt in the project root for license information. +* For commercial licenses see https://www.tiny.cloud/ +*/ +.tinymce-mobile-outer-container{all:initial;display:block}.tinymce-mobile-outer-container *{border:0;box-sizing:initial;cursor:inherit;float:none;line-height:1;margin:0;outline:0;padding:0;-webkit-tap-highlight-color:transparent;text-shadow:none;white-space:nowrap}.tinymce-mobile-icon-arrow-back::before{content:"\e5cd"}.tinymce-mobile-icon-image::before{content:"\e412"}.tinymce-mobile-icon-cancel-circle::before{content:"\e5c9"}.tinymce-mobile-icon-full-dot::before{content:"\e061"}.tinymce-mobile-icon-align-center::before{content:"\e234"}.tinymce-mobile-icon-align-left::before{content:"\e236"}.tinymce-mobile-icon-align-right::before{content:"\e237"}.tinymce-mobile-icon-bold::before{content:"\e238"}.tinymce-mobile-icon-italic::before{content:"\e23f"}.tinymce-mobile-icon-unordered-list::before{content:"\e241"}.tinymce-mobile-icon-ordered-list::before{content:"\e242"}.tinymce-mobile-icon-font-size::before{content:"\e245"}.tinymce-mobile-icon-underline::before{content:"\e249"}.tinymce-mobile-icon-link::before{content:"\e157"}.tinymce-mobile-icon-unlink::before{content:"\eca2"}.tinymce-mobile-icon-color::before{content:"\e891"}.tinymce-mobile-icon-previous::before{content:"\e314"}.tinymce-mobile-icon-next::before{content:"\e315"}.tinymce-mobile-icon-large-font::before,.tinymce-mobile-icon-style-formats::before{content:"\e264"}.tinymce-mobile-icon-undo::before{content:"\e166"}.tinymce-mobile-icon-redo::before{content:"\e15a"}.tinymce-mobile-icon-removeformat::before{content:"\e239"}.tinymce-mobile-icon-small-font::before{content:"\e906"}.tinymce-mobile-format-matches::after,.tinymce-mobile-icon-readonly-back::before{content:"\e5ca"}.tinymce-mobile-icon-small-heading::before{content:"small"}.tinymce-mobile-icon-large-heading::before{content:"large"}.tinymce-mobile-icon-large-heading::before,.tinymce-mobile-icon-small-heading::before{font-family:sans-serif;font-size:80%}.tinymce-mobile-mask-edit-icon::before{content:"\e254"}.tinymce-mobile-icon-back::before{content:"\e5c4"}.tinymce-mobile-icon-heading::before{content:"Headings";font-family:sans-serif;font-size:80%;font-weight:700}.tinymce-mobile-icon-h1::before{content:"H1";font-weight:700}.tinymce-mobile-icon-h2::before{content:"H2";font-weight:700}.tinymce-mobile-icon-h3::before{content:"H3";font-weight:700}.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask{align-items:center;display:flex;justify-content:center;background:rgba(51,51,51,.5);height:100%;position:absolute;top:0;width:100%}.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask .tinymce-mobile-content-container{align-items:center;border-radius:50%;display:flex;flex-direction:column;font-family:sans-serif;font-size:1em;justify-content:space-between}.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask .tinymce-mobile-content-container .mixin-menu-item{align-items:center;display:flex;justify-content:center;border-radius:50%;height:2.1em;width:2.1em}.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask .tinymce-mobile-content-container .tinymce-mobile-content-tap-section{align-items:center;display:flex;justify-content:center;flex-direction:column;font-size:1em}@media only screen and (min-device-width:700px){.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask .tinymce-mobile-content-container .tinymce-mobile-content-tap-section{font-size:1.2em}}.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask .tinymce-mobile-content-container .tinymce-mobile-content-tap-section .tinymce-mobile-mask-tap-icon{align-items:center;display:flex;justify-content:center;border-radius:50%;height:2.1em;width:2.1em;background-color:#fff;color:#207ab7}.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask .tinymce-mobile-content-container .tinymce-mobile-content-tap-section .tinymce-mobile-mask-tap-icon::before{content:"\e900";font-family:tinymce-mobile,sans-serif}.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask .tinymce-mobile-content-container .tinymce-mobile-content-tap-section:not(.tinymce-mobile-mask-tap-icon-selected) .tinymce-mobile-mask-tap-icon{z-index:2}.tinymce-mobile-android-container.tinymce-mobile-android-maximized{background:#fff;border:none;bottom:0;display:flex;flex-direction:column;left:0;position:fixed;right:0;top:0}.tinymce-mobile-android-container:not(.tinymce-mobile-android-maximized){position:relative}.tinymce-mobile-android-container .tinymce-mobile-editor-socket{display:flex;flex-grow:1}.tinymce-mobile-android-container .tinymce-mobile-editor-socket iframe{display:flex!important;flex-grow:1;height:auto!important}.tinymce-mobile-android-scroll-reload{overflow:hidden}:not(.tinymce-mobile-readonly-mode)>.tinymce-mobile-android-selection-context-toolbar{margin-top:23px}.tinymce-mobile-toolstrip{background:#fff;display:flex;flex:0 0 auto;z-index:1}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar{align-items:center;background-color:#fff;border-bottom:1px solid #ccc;display:flex;flex:1;height:2.5em;width:100%}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group{align-items:center;display:flex;height:100%;flex-shrink:1}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group>div{align-items:center;display:flex;height:100%;flex:1}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group.tinymce-mobile-exit-container{background:#f44336}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group.tinymce-mobile-toolbar-scrollable-group{flex-grow:1}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group .tinymce-mobile-toolbar-group-item{padding-left:.5em;padding-right:.5em}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group .tinymce-mobile-toolbar-group-item.tinymce-mobile-toolbar-button{align-items:center;display:flex;height:80%;margin-left:2px;margin-right:2px}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group .tinymce-mobile-toolbar-group-item.tinymce-mobile-toolbar-button.tinymce-mobile-toolbar-button-selected{background:#d4dbd7;color:#ccc}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group:first-of-type,.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group:last-of-type{background:#207ab7;color:#eceff1}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group{align-items:center;display:flex;height:100%;flex:1;padding-bottom:.4em;padding-top:.4em}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog{display:flex;min-height:1.5em;overflow:hidden;padding-left:0;padding-right:0;position:relative;width:100%}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain{display:flex;height:100%;transition:left cubic-bezier(.4,0,1,1) .15s;width:100%}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen{display:flex;flex:0 0 auto;justify-content:space-between;width:100%}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen input{font-family:Sans-serif}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-input-container{display:flex;flex-grow:1;position:relative}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-input-container .tinymce-mobile-input-container-x{-ms-grid-row-align:center;align-self:center;background:inherit;border:none;border-radius:50%;color:#888;font-size:.6em;font-weight:700;height:100%;padding-right:2px;position:absolute;right:0}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-input-container.tinymce-mobile-input-container-empty .tinymce-mobile-input-container-x{display:none}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-icon-next,.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-icon-previous{align-items:center;display:flex}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-icon-next::before,.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-icon-previous::before{align-items:center;display:flex;font-weight:700;height:100%;padding-left:.5em;padding-right:.5em}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-icon-next.tinymce-mobile-toolbar-navigation-disabled::before,.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-icon-previous.tinymce-mobile-toolbar-navigation-disabled::before{visibility:hidden}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-dot-item{color:#ccc;font-size:10px;line-height:10px;margin:0 2px;padding-top:3px}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-dot-item.tinymce-mobile-dot-active{color:#d4dbd7}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-icon-large-font::before,.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-icon-large-heading::before{margin-left:.5em;margin-right:.9em}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-icon-small-font::before,.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-icon-small-heading::before{margin-left:.9em;margin-right:.5em}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider{display:flex;flex:1;margin-left:0;margin-right:0;padding:.28em 0;position:relative}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider .tinymce-mobile-slider-size-container{align-items:center;display:flex;flex-grow:1;height:100%}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider .tinymce-mobile-slider-size-container .tinymce-mobile-slider-size-line{background:#ccc;display:flex;flex:1;height:.2em;margin-bottom:.3em;margin-top:.3em}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider.tinymce-mobile-hue-slider-container{padding-left:2em;padding-right:2em}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider.tinymce-mobile-hue-slider-container .tinymce-mobile-slider-gradient-container{align-items:center;display:flex;flex-grow:1;height:100%}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider.tinymce-mobile-hue-slider-container .tinymce-mobile-slider-gradient-container .tinymce-mobile-slider-gradient{background:linear-gradient(to right,red 0,#feff00 17%,#0f0 33%,#00feff 50%,#00f 67%,#ff00fe 83%,red 100%);display:flex;flex:1;height:.2em;margin-bottom:.3em;margin-top:.3em}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider.tinymce-mobile-hue-slider-container .tinymce-mobile-hue-slider-black{background:#000;height:.2em;margin-bottom:.3em;margin-top:.3em;width:1.2em}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider.tinymce-mobile-hue-slider-container .tinymce-mobile-hue-slider-white{background:#fff;height:.2em;margin-bottom:.3em;margin-top:.3em;width:1.2em}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider .tinymce-mobile-slider-thumb{align-items:center;background-clip:padding-box;background-color:#455a64;border:.5em solid rgba(136,136,136,0);border-radius:3em;bottom:0;color:#fff;display:flex;height:.5em;justify-content:center;left:-10px;margin:auto;position:absolute;top:0;transition:border 120ms cubic-bezier(.39,.58,.57,1);width:.5em}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider .tinymce-mobile-slider-thumb.tinymce-mobile-thumb-active{border:.5em solid rgba(136,136,136,.39)}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serializer-wrapper,.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group>div{align-items:center;display:flex;height:100%;flex:1}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serializer-wrapper{flex-direction:column;justify-content:center}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-toolbar-group-item{align-items:center;display:flex}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-toolbar-group-item:not(.tinymce-mobile-serialised-dialog){height:100%}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-dot-container{display:flex}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group input{background:#fff;border:none;border-radius:0;color:#455a64;flex-grow:1;font-size:.85em;padding-bottom:.1em;padding-left:5px;padding-top:.1em}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group input::-webkit-input-placeholder{color:#888}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group input:-ms-input-placeholder{color:#888}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group input::placeholder{color:#888}.tinymce-mobile-dropup{background:#fff;display:flex;overflow:hidden;width:100%}.tinymce-mobile-dropup.tinymce-mobile-dropup-shrinking{transition:height .3s ease-out}.tinymce-mobile-dropup.tinymce-mobile-dropup-growing{transition:height .3s ease-in}.tinymce-mobile-dropup.tinymce-mobile-dropup-closed{flex-grow:0}.tinymce-mobile-dropup.tinymce-mobile-dropup-open:not(.tinymce-mobile-dropup-growing){flex-grow:1}.tinymce-mobile-ios-container .tinymce-mobile-dropup:not(.tinymce-mobile-dropup-closed){min-height:200px}@media only screen and (orientation:landscape){.tinymce-mobile-dropup:not(.tinymce-mobile-dropup-closed){min-height:200px}}@media only screen and (min-device-width :320px) and (max-device-width :568px) and (orientation :landscape){.tinymce-mobile-ios-container .tinymce-mobile-dropup:not(.tinymce-mobile-dropup-closed){min-height:150px}}.tinymce-mobile-styles-menu{font-family:sans-serif;outline:4px solid #000;overflow:hidden;position:relative;width:100%}.tinymce-mobile-styles-menu [role=menu]{display:flex;flex-direction:column;height:100%;position:absolute;width:100%}.tinymce-mobile-styles-menu [role=menu].transitioning{transition:transform .5s ease-in-out}.tinymce-mobile-styles-menu .tinymce-mobile-styles-item{border-bottom:1px solid #ddd;color:#455a64;cursor:pointer;display:flex;padding:1em 1em;position:relative}.tinymce-mobile-styles-menu .tinymce-mobile-styles-collapser .tinymce-mobile-styles-collapse-icon::before{color:#455a64;content:"\e314";font-family:tinymce-mobile,sans-serif}.tinymce-mobile-styles-menu .tinymce-mobile-styles-item.tinymce-mobile-styles-item-is-menu::after{color:#455a64;content:"\e315";font-family:tinymce-mobile,sans-serif;padding-left:1em;padding-right:1em;position:absolute;right:0}.tinymce-mobile-styles-menu .tinymce-mobile-styles-item.tinymce-mobile-format-matches::after{font-family:tinymce-mobile,sans-serif;padding-left:1em;padding-right:1em;position:absolute;right:0}.tinymce-mobile-styles-menu .tinymce-mobile-styles-collapser,.tinymce-mobile-styles-menu .tinymce-mobile-styles-separator{align-items:center;background:#fff;border-top:#455a64;color:#455a64;display:flex;min-height:2.5em;padding-left:1em;padding-right:1em}.tinymce-mobile-styles-menu [data-transitioning-destination=before][data-transitioning-state],.tinymce-mobile-styles-menu [data-transitioning-state=before]{transform:translate(-100%)}.tinymce-mobile-styles-menu [data-transitioning-destination=current][data-transitioning-state],.tinymce-mobile-styles-menu [data-transitioning-state=current]{transform:translate(0)}.tinymce-mobile-styles-menu [data-transitioning-destination=after][data-transitioning-state],.tinymce-mobile-styles-menu [data-transitioning-state=after]{transform:translate(100%)}@font-face{font-family:tinymce-mobile;font-style:normal;font-weight:400;src:url(fonts/tinymce-mobile.woff?8x92w3) format('woff')}@media (min-device-width:700px){.tinymce-mobile-outer-container,.tinymce-mobile-outer-container input{font-size:25px}}@media (max-device-width:700px){.tinymce-mobile-outer-container,.tinymce-mobile-outer-container input{font-size:18px}}.tinymce-mobile-icon{font-family:tinymce-mobile,sans-serif}.mixin-flex-and-centre{align-items:center;display:flex;justify-content:center}.mixin-flex-bar{align-items:center;display:flex;height:100%}.tinymce-mobile-outer-container .tinymce-mobile-editor-socket iframe{background-color:#fff;width:100%}.tinymce-mobile-editor-socket .tinymce-mobile-mask-edit-icon{background-color:#207ab7;border-radius:50%;bottom:1em;color:#fff;font-size:1em;height:2.1em;position:fixed;right:2em;width:2.1em;align-items:center;display:flex;justify-content:center}@media only screen and (min-device-width:700px){.tinymce-mobile-editor-socket .tinymce-mobile-mask-edit-icon{font-size:1.2em}}.tinymce-mobile-outer-container:not(.tinymce-mobile-fullscreen-maximized) .tinymce-mobile-editor-socket{height:300px;overflow:hidden}.tinymce-mobile-outer-container:not(.tinymce-mobile-fullscreen-maximized) .tinymce-mobile-editor-socket iframe{height:100%}.tinymce-mobile-outer-container:not(.tinymce-mobile-fullscreen-maximized) .tinymce-mobile-toolstrip{display:none}input[type=file]::-webkit-file-upload-button{display:none}@media only screen and (min-device-width :320px) and (max-device-width :568px) and (orientation :landscape){.tinymce-mobile-ios-container .tinymce-mobile-editor-socket .tinymce-mobile-mask-edit-icon{bottom:50%}} \ No newline at end of file diff --git a/public/resource/tinymce/skins/ui/oxide-dark/content.inline.min.css b/public/resource/tinymce/skins/ui/oxide-dark/content.inline.min.css new file mode 100644 index 0000000..748f313 --- /dev/null +++ b/public/resource/tinymce/skins/ui/oxide-dark/content.inline.min.css @@ -0,0 +1,239 @@ +/** + * Copyright (c) Tiny Technologies, Inc. All rights reserved. + * Licensed under the LGPL or a commercial license. + * For LGPL see License.txt in the project root for license information. + * For commercial licenses see https://www.tiny.cloud/ + */ +.mce-content-body .mce-item-anchor{display: inline-block;width: 8px !important;height: 12px !important;padding: 0 2px;cursor: default;background: transparent url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'8'%20height%3D'12'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'M0%200L8%200%208%2012%204.09117821%209%200%2012z'%2F%3E%3C%2Fsvg%3E%0A") no-repeat center;-webkit-user-select: all;-moz-user-select: all;-ms-user-select: all;user-select: all;-webkit-user-modify: read-only;-moz-user-modify: read-only;} + +.mce-content-body .mce-item-anchor[data-mce-selected]{outline-offset: 1px;} + +.tox-comments-visible .tox-comment{background-color: #fff0b7;} + +.tox-comments-visible .tox-comment--active{background-color: #ffe168;} + +.tox-checklist>li:not(.tox-checklist--hidden){margin: .25em 0;list-style: none;} + +.tox-checklist>li:not(.tox-checklist--hidden)::before{position: absolute;width: 1em;height: 1em;margin-top: .125em;margin-left: -1.5em;cursor: pointer;background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cg%20id%3D%22checklist-unchecked%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Crect%20id%3D%22Rectangle%22%20width%3D%2215%22%20height%3D%2215%22%20x%3D%22.5%22%20y%3D%22.5%22%20fill-rule%3D%22nonzero%22%20stroke%3D%22%234C4C4C%22%20rx%3D%222%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E%0A");background-size: 100%;content: '';} + +.tox-checklist li:not(.tox-checklist--hidden).tox-checklist--checked::before{background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cg%20id%3D%22checklist-checked%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Crect%20id%3D%22Rectangle%22%20width%3D%2216%22%20height%3D%2216%22%20fill%3D%22%234099FF%22%20fill-rule%3D%22nonzero%22%20rx%3D%222%22%2F%3E%3Cpath%20id%3D%22Path%22%20fill%3D%22%23FFF%22%20fill-rule%3D%22nonzero%22%20d%3D%22M11.5703186%2C3.14417309%20C11.8516238%2C2.73724603%2012.4164781%2C2.62829933%2012.83558%2C2.89774797%20C13.260121%2C3.17069355%2013.3759736%2C3.72932262%2013.0909105%2C4.14168582%20L7.7580587%2C11.8560195%20C7.43776896%2C12.3193404%206.76483983%2C12.3852142%206.35607322%2C11.9948725%20L3.02491697%2C8.8138662%20C2.66090143%2C8.46625845%202.65798871%2C7.89594698%203.01850234%2C7.54483354%20C3.373942%2C7.19866177%203.94940006%2C7.19592841%204.30829608%2C7.5386474%20L6.85276923%2C9.9684299%20L11.5703186%2C3.14417309%20Z%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E%0A");} + +[dir=rtl] .tox-checklist>li:not(.tox-checklist--hidden)::before{margin-right: -1.5em;margin-left: 0;} + +code[class*=language-],pre[class*=language-]{font-family: Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size: .875rem;-webkit-hyphens: none;-ms-hyphens: none;hyphens: none;line-height: 1.5;word-spacing: normal;color: #000;text-shadow: 0 1px #fff;word-break: normal;word-wrap: normal;white-space: pre;-moz-tab-size: 4;tab-size: 4;} + +code[class*=language-] ::-moz-selection,code[class*=language-]::-moz-selection,pre[class*=language-] ::-moz-selection,pre[class*=language-]::-moz-selection{text-shadow: none;background: #b3d4fc;} + +code[class*=language-] ::selection,code[class*=language-]::selection,pre[class*=language-] ::selection,pre[class*=language-]::selection{text-shadow: none;background: #b3d4fc;}@media print{code[class*=language-],pre[class*=language-]{text-shadow: none;}} + +pre[class*=language-]{padding: 1em;margin: .5em 0;overflow: auto;} + +:not(pre)>code[class*=language-],pre[class*=language-]{background: 0 0 !important;border: 1px solid #ccc;} + +:not(pre)>code[class*=language-]{padding: .1em;border-radius: .3em;} + +.token.cdata,.token.comment,.token.doctype,.token.prolog{color: #708090;} + +.token.punctuation{color: #999;} + +.namespace{opacity: .7;} + +.token.boolean,.token.constant,.token.deleted,.token.number,.token.property,.token.symbol,.token.tag{color: #905;} + +.token.attr-name,.token.builtin,.token.char,.token.inserted,.token.selector,.token.string{color: #690;} + +.language-css .token.string,.style .token.string,.token.entity,.token.operator,.token.url{color: #a67f59;background: hsla(0,0%,100%,.5);} + +.token.atrule,.token.attr-value,.token.keyword{color: #07a;} + +.token.function{color: #dd4a68;} + +.token.important,.token.regex,.token.variable{color: #e90;} + +.token.bold,.token.important{font-weight: 700;} + +.token.italic{font-style: italic;} + +.token.entity{cursor: help;} + +:not([dir=rtl]) code[class*=language-],:not([dir=rtl]) pre[class*=language-]{text-align: left;direction: ltr;} + +[dir=rtl] code[class*=language-],[dir=rtl] pre[class*=language-]{text-align: right;direction: rtl;} + +.mce-content-body{overflow-wrap: break-word;word-wrap: break-word;} + +.mce-content-body .mce-visual-caret{position: absolute;background-color: #000;background-color: currentColor;} + +.mce-content-body .mce-visual-caret-hidden{display: none;} + +.mce-content-body [data-mce-caret]{position: absolute;top: 0;right: auto;left: -1000px;padding: 0;margin: 0;} + +.mce-content-body .mce-offscreen-selection{position: absolute;left: -9999999999px;max-width: 1000000px;} + +.mce-content-body [contentEditable=false]{cursor: default;} + +.mce-content-body [contentEditable=true]{cursor: text;} + +.tox-cursor-format-painter{cursor: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%0A%20%20%3Cg%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M15%2C6%20C15%2C5.45%2014.55%2C5%2014%2C5%20L6%2C5%20C5.45%2C5%205%2C5.45%205%2C6%20L5%2C10%20C5%2C10.55%205.45%2C11%206%2C11%20L14%2C11%20C14.55%2C11%2015%2C10.55%2015%2C10%20L15%2C9%20L16%2C9%20L16%2C12%20L9%2C12%20L9%2C19%20C9%2C19.55%209.45%2C20%2010%2C20%20L11%2C20%20C11.55%2C20%2012%2C19.55%2012%2C19%20L12%2C14%20L18%2C14%20L18%2C7%20L15%2C7%20L15%2C6%20Z%22%2F%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M1%2C1%20L8.25%2C1%20C8.66421356%2C1%209%2C1.33578644%209%2C1.75%20L9%2C1.75%20C9%2C2.16421356%208.66421356%2C2.5%208.25%2C2.5%20L2.5%2C2.5%20L2.5%2C8.25%20C2.5%2C8.66421356%202.16421356%2C9%201.75%2C9%20L1.75%2C9%20C1.33578644%2C9%201%2C8.66421356%201%2C8.25%20L1%2C1%20Z%22%2F%3E%0A%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A"),default;} + +.mce-content-body figure.align-left{float: left;} + +.mce-content-body figure.align-right{float: right;} + +.mce-content-body figure.image.align-center{display: table;margin-right: auto;margin-left: auto;} + +.mce-preview-object{position: relative;display: inline-block;margin: 0 2px 0 2px;line-height: 0;border: 1px solid gray;} + +.mce-preview-object .mce-shim{position: absolute;top: 0;left: 0;width: 100%;height: 100%;background: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7);} + +.mce-preview-object[data-mce-selected="2"] .mce-shim{display: none;} + +.mce-object{background: transparent url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M4%203h16a1%201%200%200%201%201%201v16a1%201%200%200%201-1%201H4a1%201%200%200%201-1-1V4a1%201%200%200%201%201-1zm1%202v14h14V5H5zm4.79%202.565l5.64%204.028a.5.5%200%200%201%200%20.814l-5.64%204.028a.5.5%200%200%201-.79-.407V7.972a.5.5%200%200%201%20.79-.407z%22%2F%3E%3C%2Fsvg%3E%0A") no-repeat center;border: 1px dashed #aaa;} + +.mce-pagebreak{display: block;width: 100%;height: 5px;margin-top: 15px;cursor: default;border: 1px dashed #aaa;page-break-before: always;}@media print{.mce-pagebreak{border: 0;}} + +.tiny-pageembed .mce-shim{position: absolute;top: 0;left: 0;width: 100%;height: 100%;background: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7);} + +.tiny-pageembed[data-mce-selected="2"] .mce-shim{display: none;} + +.tiny-pageembed{position: relative;display: inline-block;} + +.tiny-pageembed--16by9,.tiny-pageembed--1by1,.tiny-pageembed--21by9,.tiny-pageembed--4by3{position: relative;display: block;width: 100%;padding: 0;overflow: hidden;} + +.tiny-pageembed--16by9::before,.tiny-pageembed--1by1::before,.tiny-pageembed--21by9::before,.tiny-pageembed--4by3::before{display: block;content: "";} + +.tiny-pageembed--21by9::before{padding-top: 42.857143%;} + +.tiny-pageembed--16by9::before{padding-top: 56.25%;} + +.tiny-pageembed--4by3::before{padding-top: 75%;} + +.tiny-pageembed--1by1::before{padding-top: 100%;} + +.tiny-pageembed--16by9 iframe,.tiny-pageembed--1by1 iframe,.tiny-pageembed--21by9 iframe,.tiny-pageembed--4by3 iframe{position: absolute;top: 0;left: 0;width: 100%;height: 100%;border: 0;} + +.mce-content-body div.mce-resizehandle{position: absolute;z-index: 10000;width: 10px;height: 10px;background-color: #4099ff;border-color: #4099ff;border-style: solid;border-width: 1px;box-sizing: border-box;} + +.mce-content-body div.mce-resizehandle:hover{background-color: #4099ff;} + +.mce-content-body div.mce-resizehandle:nth-of-type(1){cursor: nwse-resize;} + +.mce-content-body div.mce-resizehandle:nth-of-type(2){cursor: nesw-resize;} + +.mce-content-body div.mce-resizehandle:nth-of-type(3){cursor: nwse-resize;} + +.mce-content-body div.mce-resizehandle:nth-of-type(4){cursor: nesw-resize;} + +.mce-content-body .mce-clonedresizable{position: absolute;z-index: 10000;outline: 1px dashed #000;opacity: .5;} + +.mce-content-body .mce-resize-helper{position: absolute;z-index: 10001;display: none;padding: 5px;margin: 5px 10px;font-family: sans-serif;font-size: 12px;line-height: 14px;color: #fff;white-space: nowrap;background: #555;background: rgba(0,0,0,.75);border: 1px;border-radius: 3px;} + +.mce-match-marker{color: #fff;background: #aaa;} + +.mce-match-marker-selected{color: #fff;background: #39f;} + +.mce-content-body img[data-mce-selected],.mce-content-body table[data-mce-selected]{outline: 3px solid #b4d7ff;} + +.mce-content-body hr[data-mce-selected]{outline: 3px solid #b4d7ff;outline-offset: 1px;} + +.mce-content-body [contentEditable=false] [contentEditable=true]:focus{outline: 3px solid #b4d7ff;} + +.mce-content-body [contentEditable=false] [contentEditable=true]:hover{outline: 3px solid #b4d7ff;} + +.mce-content-body [contentEditable=false][data-mce-selected]{cursor: not-allowed;outline: 3px solid #b4d7ff;} + +.mce-content-body.mce-content-readonly [contentEditable=true]:focus,.mce-content-body.mce-content-readonly [contentEditable=true]:hover{outline: 0;} + +.mce-content-body [data-mce-selected=inline-boundary]{background-color: #b4d7ff;} + +.mce-content-body .mce-edit-focus{outline: 3px solid #b4d7ff;} + +.mce-content-body td[data-mce-selected],.mce-content-body th[data-mce-selected]{background-color: #b4d7ff !important;} + +.mce-content-body td[data-mce-selected]::-moz-selection,.mce-content-body th[data-mce-selected]::-moz-selection{background: 0 0;} + +.mce-content-body td[data-mce-selected]::selection,.mce-content-body th[data-mce-selected]::selection{background: 0 0;} + +.mce-content-body td[data-mce-selected] *,.mce-content-body th[data-mce-selected] *{-webkit-touch-callout: none;-webkit-user-select: none;-moz-user-select: none;-ms-user-select: none;user-select: none;} + +.mce-content-body img::-moz-selection{background: 0 0;} + +.mce-content-body img::selection{background: 0 0;} + +.ephox-snooker-resizer-bar{background-color: #b4d7ff;opacity: 0;} + +.ephox-snooker-resizer-cols{cursor: col-resize;} + +.ephox-snooker-resizer-rows{cursor: row-resize;} + +.ephox-snooker-resizer-bar.ephox-snooker-resizer-bar-dragging{opacity: 1;} + +.mce-spellchecker-word{height: 2rem;cursor: default;background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'4'%20height%3D'4'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20stroke%3D'%23ff0000'%20fill%3D'none'%20stroke-linecap%3D'round'%20stroke-opacity%3D'.5'%20d%3D'M0%203L2%201%204%203'%2F%3E%3C%2Fsvg%3E%0A");background-position: 0 calc(100% + 1px);background-repeat: repeat-x;background-size: auto 6px;} + +.mce-spellchecker-grammar{cursor: default;background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'4'%20height%3D'4'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20stroke%3D'%23008800'%20fill%3D'none'%20stroke-linecap%3D'round'%20d%3D'M0%203L2%201%204%203'%2F%3E%3C%2Fsvg%3E%0A");background-position: 0 calc(100% + 1px);background-repeat: repeat-x;background-size: auto 6px;} + +.mce-toc{border: 1px solid gray;} + +.mce-toc h2{margin: 4px;} + +.mce-toc li{list-style-type: none;} + +.mce-item-table,.mce-item-table caption,.mce-item-table td,.mce-item-table th{border: 1px dashed #bbb;} + +.mce-visualblocks address,.mce-visualblocks article,.mce-visualblocks aside,.mce-visualblocks blockquote,.mce-visualblocks div:not([data-mce-bogus]),.mce-visualblocks dl,.mce-visualblocks figcaption,.mce-visualblocks figure,.mce-visualblocks h1,.mce-visualblocks h2,.mce-visualblocks h3,.mce-visualblocks h4,.mce-visualblocks h5,.mce-visualblocks h6,.mce-visualblocks hgroup,.mce-visualblocks ol,.mce-visualblocks p,.mce-visualblocks pre,.mce-visualblocks section,.mce-visualblocks ul{padding-top: 10px;margin-left: 3px;background-repeat: no-repeat;border: 1px dashed #bbb;} + +.mce-visualblocks p{background-image: url(data:image/gif;base64,R0lGODlhCQAJAJEAAAAAAP///7u7u////yH5BAEAAAMALAAAAAAJAAkAAAIQnG+CqCN/mlyvsRUpThG6AgA7);} + +.mce-visualblocks h1{background-image: url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGu1JuxHoAfRNRW3TWXyF2YiRUAOw==);} + +.mce-visualblocks h2{background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8Hybbx4oOuqgTynJd6bGlWg3DkJzoaUAAAOw==);} + +.mce-visualblocks h3{background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIZjI8Hybbx4oOuqgTynJf2Ln2NOHpQpmhAAQA7);} + +.mce-visualblocks h4{background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxInR0zqeAdhtJlXwV1oCll2HaWgAAOw==);} + +.mce-visualblocks h5{background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjane4iq5GlW05GgIkIZUAAAOw==);} + +.mce-visualblocks h6{background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjan04jep1iZ1XRlAo5bVgAAOw==);} + +.mce-visualblocks div:not([data-mce-bogus]){background-image: url(data:image/gif;base64,R0lGODlhEgAKAIABALu7u////yH5BAEAAAEALAAAAAASAAoAAAIfjI9poI0cgDywrhuxfbrzDEbQM2Ei5aRjmoySW4pAAQA7);} + +.mce-visualblocks section{background-image: url(data:image/gif;base64,R0lGODlhKAAKAIABALu7u////yH5BAEAAAEALAAAAAAoAAoAAAI5jI+pywcNY3sBWHdNrplytD2ellDeSVbp+GmWqaDqDMepc8t17Y4vBsK5hDyJMcI6KkuYU+jpjLoKADs=);} + +.mce-visualblocks article{background-image: url(data:image/gif;base64,R0lGODlhKgAKAIABALu7u////yH5BAEAAAEALAAAAAAqAAoAAAI6jI+pywkNY3wG0GBvrsd2tXGYSGnfiF7ikpXemTpOiJScasYoDJJrjsG9gkCJ0ag6KhmaIe3pjDYBBQA7);} + +.mce-visualblocks blockquote{background-image: url(data:image/gif;base64,R0lGODlhPgAKAIABALu7u////yH5BAEAAAEALAAAAAA+AAoAAAJPjI+py+0Knpz0xQDyuUhvfoGgIX5iSKZYgq5uNL5q69asZ8s5rrf0yZmpNkJZzFesBTu8TOlDVAabUyatguVhWduud3EyiUk45xhTTgMBBQA7);} + +.mce-visualblocks address{background-image: url(data:image/gif;base64,R0lGODlhLQAKAIABALu7u////yH5BAEAAAEALAAAAAAtAAoAAAI/jI+pywwNozSP1gDyyZcjb3UaRpXkWaXmZW4OqKLhBmLs+K263DkJK7OJeifh7FicKD9A1/IpGdKkyFpNmCkAADs=);} + +.mce-visualblocks pre{background-image: url(data:image/gif;base64,R0lGODlhFQAKAIABALu7uwAAACH5BAEAAAEALAAAAAAVAAoAAAIjjI+ZoN0cgDwSmnpz1NCueYERhnibZVKLNnbOq8IvKpJtVQAAOw==);} + +.mce-visualblocks figure{background-image: url(data:image/gif;base64,R0lGODlhJAAKAIAAALu7u////yH5BAEAAAEALAAAAAAkAAoAAAI0jI+py+2fwAHUSFvD3RlvG4HIp4nX5JFSpnZUJ6LlrM52OE7uSWosBHScgkSZj7dDKnWAAgA7);} + +.mce-visualblocks figcaption{border: 1px dashed #bbb;} + +.mce-visualblocks hgroup{background-image: url(data:image/gif;base64,R0lGODlhJwAKAIABALu7uwAAACH5BAEAAAEALAAAAAAnAAoAAAI3jI+pywYNI3uB0gpsRtt5fFnfNZaVSYJil4Wo03Hv6Z62uOCgiXH1kZIIJ8NiIxRrAZNMZAtQAAA7);} + +.mce-visualblocks aside{background-image: url(data:image/gif;base64,R0lGODlhHgAKAIABAKqqqv///yH5BAEAAAEALAAAAAAeAAoAAAItjI+pG8APjZOTzgtqy7I3f1yehmQcFY4WKZbqByutmW4aHUd6vfcVbgudgpYCADs=);} + +.mce-visualblocks ul{background-image: url(data:image/gif;base64,R0lGODlhDQAKAIAAALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGuYnqUVSjvw26DzzXiqIDlVwAAOw==);} + +.mce-visualblocks ol{background-image: url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybH6HHt0qourxC6CvzXieHyeWQAAOw==);} + +.mce-visualblocks dl{background-image: url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybEOnmOvUoWznTqeuEjNSCqeGRUAOw==);} + +.mce-visualblocks:not([dir=rtl]) address,.mce-visualblocks:not([dir=rtl]) article,.mce-visualblocks:not([dir=rtl]) aside,.mce-visualblocks:not([dir=rtl]) blockquote,.mce-visualblocks:not([dir=rtl]) div:not([data-mce-bogus]),.mce-visualblocks:not([dir=rtl]) dl,.mce-visualblocks:not([dir=rtl]) figcaption,.mce-visualblocks:not([dir=rtl]) figure,.mce-visualblocks:not([dir=rtl]) h1,.mce-visualblocks:not([dir=rtl]) h2,.mce-visualblocks:not([dir=rtl]) h3,.mce-visualblocks:not([dir=rtl]) h4,.mce-visualblocks:not([dir=rtl]) h5,.mce-visualblocks:not([dir=rtl]) h6,.mce-visualblocks:not([dir=rtl]) hgroup,.mce-visualblocks:not([dir=rtl]) ol,.mce-visualblocks:not([dir=rtl]) p,.mce-visualblocks:not([dir=rtl]) pre,.mce-visualblocks:not([dir=rtl]) section,.mce-visualblocks:not([dir=rtl]) ul{margin-left: 3px;} + +.mce-visualblocks[dir=rtl] address,.mce-visualblocks[dir=rtl] article,.mce-visualblocks[dir=rtl] aside,.mce-visualblocks[dir=rtl] blockquote,.mce-visualblocks[dir=rtl] div:not([data-mce-bogus]),.mce-visualblocks[dir=rtl] dl,.mce-visualblocks[dir=rtl] figcaption,.mce-visualblocks[dir=rtl] figure,.mce-visualblocks[dir=rtl] h1,.mce-visualblocks[dir=rtl] h2,.mce-visualblocks[dir=rtl] h3,.mce-visualblocks[dir=rtl] h4,.mce-visualblocks[dir=rtl] h5,.mce-visualblocks[dir=rtl] h6,.mce-visualblocks[dir=rtl] hgroup,.mce-visualblocks[dir=rtl] ol,.mce-visualblocks[dir=rtl] p,.mce-visualblocks[dir=rtl] pre,.mce-visualblocks[dir=rtl] section,.mce-visualblocks[dir=rtl] ul{background-position-x: right;margin-right: 3px;} + +.mce-nbsp,.mce-shy{background: #aaa;} + +.mce-shy::after{content: '-';} + +.tox-toolbar-dock-fadeout{opacity: 0;visibility: hidden;} + +.tox-toolbar-dock-fadein{opacity: 1;visibility: visible;} + +.tox-toolbar-dock-transition{transition: visibility 0s linear .3s,opacity .3s ease;} + +.tox-toolbar-dock-transition.tox-toolbar-dock-fadein{transition-delay: 0s;} diff --git a/public/resource/tinymce/skins/ui/oxide-dark/content.min.css b/public/resource/tinymce/skins/ui/oxide-dark/content.min.css new file mode 100644 index 0000000..6e7165f --- /dev/null +++ b/public/resource/tinymce/skins/ui/oxide-dark/content.min.css @@ -0,0 +1,235 @@ +/** + * Copyright (c) Tiny Technologies, Inc. All rights reserved. + * Licensed under the LGPL or a commercial license. + * For LGPL see License.txt in the project root for license information. + * For commercial licenses see https://www.tiny.cloud/ + */ +.mce-content-body .mce-item-anchor{display: inline-block;width: 8px !important;height: 12px !important;padding: 0 2px;cursor: default;background: transparent url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'8'%20height%3D'12'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'M0%200L8%200%208%2012%204.09117821%209%200%2012z'%2F%3E%3C%2Fsvg%3E%0A") no-repeat center;-webkit-user-select: all;-moz-user-select: all;-ms-user-select: all;user-select: all;-webkit-user-modify: read-only;-moz-user-modify: read-only;} + +.mce-content-body .mce-item-anchor[data-mce-selected]{outline-offset: 1px;} + +.tox-comments-visible .tox-comment{background-color: #fff0b7;} + +.tox-comments-visible .tox-comment--active{background-color: #ffe168;} + +.tox-checklist>li:not(.tox-checklist--hidden){margin: .25em 0;list-style: none;} + +.tox-checklist>li:not(.tox-checklist--hidden)::before{position: absolute;width: 1em;height: 1em;margin-top: .125em;margin-left: -1.5em;cursor: pointer;background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cg%20id%3D%22checklist-unchecked%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Crect%20id%3D%22Rectangle%22%20width%3D%2215%22%20height%3D%2215%22%20x%3D%22.5%22%20y%3D%22.5%22%20fill-rule%3D%22nonzero%22%20stroke%3D%22%234C4C4C%22%20rx%3D%222%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E%0A");background-size: 100%;content: '';} + +.tox-checklist li:not(.tox-checklist--hidden).tox-checklist--checked::before{background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cg%20id%3D%22checklist-checked%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Crect%20id%3D%22Rectangle%22%20width%3D%2216%22%20height%3D%2216%22%20fill%3D%22%234099FF%22%20fill-rule%3D%22nonzero%22%20rx%3D%222%22%2F%3E%3Cpath%20id%3D%22Path%22%20fill%3D%22%23FFF%22%20fill-rule%3D%22nonzero%22%20d%3D%22M11.5703186%2C3.14417309%20C11.8516238%2C2.73724603%2012.4164781%2C2.62829933%2012.83558%2C2.89774797%20C13.260121%2C3.17069355%2013.3759736%2C3.72932262%2013.0909105%2C4.14168582%20L7.7580587%2C11.8560195%20C7.43776896%2C12.3193404%206.76483983%2C12.3852142%206.35607322%2C11.9948725%20L3.02491697%2C8.8138662%20C2.66090143%2C8.46625845%202.65798871%2C7.89594698%203.01850234%2C7.54483354%20C3.373942%2C7.19866177%203.94940006%2C7.19592841%204.30829608%2C7.5386474%20L6.85276923%2C9.9684299%20L11.5703186%2C3.14417309%20Z%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E%0A");} + +[dir=rtl] .tox-checklist>li:not(.tox-checklist--hidden)::before{margin-right: -1.5em;margin-left: 0;} + +code[class*=language-],pre[class*=language-]{font-family: Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size: .875rem;-webkit-hyphens: none;-ms-hyphens: none;hyphens: none;line-height: 1.5;word-spacing: normal;color: #000;text-shadow: 0 1px #fff;word-break: normal;word-wrap: normal;white-space: pre;-moz-tab-size: 4;tab-size: 4;} + +code[class*=language-] ::-moz-selection,code[class*=language-]::-moz-selection,pre[class*=language-] ::-moz-selection,pre[class*=language-]::-moz-selection{text-shadow: none;background: #b3d4fc;} + +code[class*=language-] ::selection,code[class*=language-]::selection,pre[class*=language-] ::selection,pre[class*=language-]::selection{text-shadow: none;background: #b3d4fc;}@media print{code[class*=language-],pre[class*=language-]{text-shadow: none;}} + +pre[class*=language-]{padding: 1em;margin: .5em 0;overflow: auto;} + +:not(pre)>code[class*=language-],pre[class*=language-]{background: 0 0 !important;border: 1px solid #ccc;} + +:not(pre)>code[class*=language-]{padding: .1em;border-radius: .3em;} + +.token.cdata,.token.comment,.token.doctype,.token.prolog{color: #708090;} + +.token.punctuation{color: #999;} + +.namespace{opacity: .7;} + +.token.boolean,.token.constant,.token.deleted,.token.number,.token.property,.token.symbol,.token.tag{color: #905;} + +.token.attr-name,.token.builtin,.token.char,.token.inserted,.token.selector,.token.string{color: #690;} + +.language-css .token.string,.style .token.string,.token.entity,.token.operator,.token.url{color: #a67f59;background: hsla(0,0%,100%,.5);} + +.token.atrule,.token.attr-value,.token.keyword{color: #07a;} + +.token.function{color: #dd4a68;} + +.token.important,.token.regex,.token.variable{color: #e90;} + +.token.bold,.token.important{font-weight: 700;} + +.token.italic{font-style: italic;} + +.token.entity{cursor: help;} + +:not([dir=rtl]) code[class*=language-],:not([dir=rtl]) pre[class*=language-]{text-align: left;direction: ltr;} + +[dir=rtl] code[class*=language-],[dir=rtl] pre[class*=language-]{text-align: right;direction: rtl;} + +.mce-content-body{overflow-wrap: break-word;word-wrap: break-word;} + +.mce-content-body .mce-visual-caret{position: absolute;background-color: #000;background-color: currentColor;} + +.mce-content-body .mce-visual-caret-hidden{display: none;} + +.mce-content-body [data-mce-caret]{position: absolute;top: 0;right: auto;left: -1000px;padding: 0;margin: 0;} + +.mce-content-body .mce-offscreen-selection{position: absolute;left: -9999999999px;max-width: 1000000px;} + +.mce-content-body [contentEditable=false]{cursor: default;} + +.mce-content-body [contentEditable=true]{cursor: text;} + +.tox-cursor-format-painter{cursor: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%0A%20%20%3Cg%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M15%2C6%20C15%2C5.45%2014.55%2C5%2014%2C5%20L6%2C5%20C5.45%2C5%205%2C5.45%205%2C6%20L5%2C10%20C5%2C10.55%205.45%2C11%206%2C11%20L14%2C11%20C14.55%2C11%2015%2C10.55%2015%2C10%20L15%2C9%20L16%2C9%20L16%2C12%20L9%2C12%20L9%2C19%20C9%2C19.55%209.45%2C20%2010%2C20%20L11%2C20%20C11.55%2C20%2012%2C19.55%2012%2C19%20L12%2C14%20L18%2C14%20L18%2C7%20L15%2C7%20L15%2C6%20Z%22%2F%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M1%2C1%20L8.25%2C1%20C8.66421356%2C1%209%2C1.33578644%209%2C1.75%20L9%2C1.75%20C9%2C2.16421356%208.66421356%2C2.5%208.25%2C2.5%20L2.5%2C2.5%20L2.5%2C8.25%20C2.5%2C8.66421356%202.16421356%2C9%201.75%2C9%20L1.75%2C9%20C1.33578644%2C9%201%2C8.66421356%201%2C8.25%20L1%2C1%20Z%22%2F%3E%0A%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A"),default;} + +.mce-content-body figure.align-left{float: left;} + +.mce-content-body figure.align-right{float: right;} + +.mce-content-body figure.image.align-center{display: table;margin-right: auto;margin-left: auto;} + +.mce-preview-object{position: relative;display: inline-block;margin: 0 2px 0 2px;line-height: 0;border: 1px solid gray;} + +.mce-preview-object .mce-shim{position: absolute;top: 0;left: 0;width: 100%;height: 100%;background: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7);} + +.mce-preview-object[data-mce-selected="2"] .mce-shim{display: none;} + +.mce-object{background: transparent url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M4%203h16a1%201%200%200%201%201%201v16a1%201%200%200%201-1%201H4a1%201%200%200%201-1-1V4a1%201%200%200%201%201-1zm1%202v14h14V5H5zm4.79%202.565l5.64%204.028a.5.5%200%200%201%200%20.814l-5.64%204.028a.5.5%200%200%201-.79-.407V7.972a.5.5%200%200%201%20.79-.407z%22%2F%3E%3C%2Fsvg%3E%0A") no-repeat center;border: 1px dashed #aaa;} + +.mce-pagebreak{display: block;width: 100%;height: 5px;margin-top: 15px;cursor: default;border: 1px dashed #aaa;page-break-before: always;}@media print{.mce-pagebreak{border: 0;}} + +.tiny-pageembed .mce-shim{position: absolute;top: 0;left: 0;width: 100%;height: 100%;background: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7);} + +.tiny-pageembed[data-mce-selected="2"] .mce-shim{display: none;} + +.tiny-pageembed{position: relative;display: inline-block;} + +.tiny-pageembed--16by9,.tiny-pageembed--1by1,.tiny-pageembed--21by9,.tiny-pageembed--4by3{position: relative;display: block;width: 100%;padding: 0;overflow: hidden;} + +.tiny-pageembed--16by9::before,.tiny-pageembed--1by1::before,.tiny-pageembed--21by9::before,.tiny-pageembed--4by3::before{display: block;content: "";} + +.tiny-pageembed--21by9::before{padding-top: 42.857143%;} + +.tiny-pageembed--16by9::before{padding-top: 56.25%;} + +.tiny-pageembed--4by3::before{padding-top: 75%;} + +.tiny-pageembed--1by1::before{padding-top: 100%;} + +.tiny-pageembed--16by9 iframe,.tiny-pageembed--1by1 iframe,.tiny-pageembed--21by9 iframe,.tiny-pageembed--4by3 iframe{position: absolute;top: 0;left: 0;width: 100%;height: 100%;border: 0;} + +.mce-content-body div.mce-resizehandle{position: absolute;z-index: 10000;width: 10px;height: 10px;background-color: #4099ff;border-color: #4099ff;border-style: solid;border-width: 1px;box-sizing: border-box;} + +.mce-content-body div.mce-resizehandle:hover{background-color: #4099ff;} + +.mce-content-body div.mce-resizehandle:nth-of-type(1){cursor: nwse-resize;} + +.mce-content-body div.mce-resizehandle:nth-of-type(2){cursor: nesw-resize;} + +.mce-content-body div.mce-resizehandle:nth-of-type(3){cursor: nwse-resize;} + +.mce-content-body div.mce-resizehandle:nth-of-type(4){cursor: nesw-resize;} + +.mce-content-body .mce-clonedresizable{position: absolute;z-index: 10000;outline: 1px dashed #000;opacity: .5;} + +.mce-content-body .mce-resize-helper{position: absolute;z-index: 10001;display: none;padding: 5px;margin: 5px 10px;font-family: sans-serif;font-size: 12px;line-height: 14px;color: #fff;white-space: nowrap;background: #555;background: rgba(0,0,0,.75);border: 1px;border-radius: 3px;} + +.mce-match-marker{color: #fff;background: #aaa;} + +.mce-match-marker-selected{color: #fff;background: #39f;} + +.mce-content-body img[data-mce-selected],.mce-content-body table[data-mce-selected]{outline: 3px solid #b4d7ff;} + +.mce-content-body hr[data-mce-selected]{outline: 3px solid #b4d7ff;outline-offset: 1px;} + +.mce-content-body [contentEditable=false] [contentEditable=true]:focus{outline: 3px solid #b4d7ff;} + +.mce-content-body [contentEditable=false] [contentEditable=true]:hover{outline: 3px solid #b4d7ff;} + +.mce-content-body [contentEditable=false][data-mce-selected]{cursor: not-allowed;outline: 3px solid #b4d7ff;} + +.mce-content-body.mce-content-readonly [contentEditable=true]:focus,.mce-content-body.mce-content-readonly [contentEditable=true]:hover{outline: 0;} + +.mce-content-body [data-mce-selected=inline-boundary]{background-color: #b4d7ff;} + +.mce-content-body .mce-edit-focus{outline: 3px solid #b4d7ff;} + +.mce-content-body td[data-mce-selected],.mce-content-body th[data-mce-selected]{background-color: #b4d7ff !important;} + +.mce-content-body td[data-mce-selected]::-moz-selection,.mce-content-body th[data-mce-selected]::-moz-selection{background: 0 0;} + +.mce-content-body td[data-mce-selected]::selection,.mce-content-body th[data-mce-selected]::selection{background: 0 0;} + +.mce-content-body td[data-mce-selected] *,.mce-content-body th[data-mce-selected] *{-webkit-touch-callout: none;-webkit-user-select: none;-moz-user-select: none;-ms-user-select: none;user-select: none;} + +.mce-content-body img::-moz-selection{background: 0 0;} + +.mce-content-body img::selection{background: 0 0;} + +.ephox-snooker-resizer-bar{background-color: #b4d7ff;opacity: 0;} + +.ephox-snooker-resizer-cols{cursor: col-resize;} + +.ephox-snooker-resizer-rows{cursor: row-resize;} + +.ephox-snooker-resizer-bar.ephox-snooker-resizer-bar-dragging{opacity: 1;} + +.mce-spellchecker-word{height: 2rem;cursor: default;background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'4'%20height%3D'4'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20stroke%3D'%23ff0000'%20fill%3D'none'%20stroke-linecap%3D'round'%20stroke-opacity%3D'.5'%20d%3D'M0%203L2%201%204%203'%2F%3E%3C%2Fsvg%3E%0A");background-position: 0 calc(100% + 1px);background-repeat: repeat-x;background-size: auto 6px;} + +.mce-spellchecker-grammar{cursor: default;background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'4'%20height%3D'4'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20stroke%3D'%23008800'%20fill%3D'none'%20stroke-linecap%3D'round'%20d%3D'M0%203L2%201%204%203'%2F%3E%3C%2Fsvg%3E%0A");background-position: 0 calc(100% + 1px);background-repeat: repeat-x;background-size: auto 6px;} + +.mce-toc{border: 1px solid gray;} + +.mce-toc h2{margin: 4px;} + +.mce-toc li{list-style-type: none;} + +.mce-item-table,.mce-item-table caption,.mce-item-table td,.mce-item-table th{border: 1px dashed #bbb;} + +.mce-visualblocks address,.mce-visualblocks article,.mce-visualblocks aside,.mce-visualblocks blockquote,.mce-visualblocks div:not([data-mce-bogus]),.mce-visualblocks dl,.mce-visualblocks figcaption,.mce-visualblocks figure,.mce-visualblocks h1,.mce-visualblocks h2,.mce-visualblocks h3,.mce-visualblocks h4,.mce-visualblocks h5,.mce-visualblocks h6,.mce-visualblocks hgroup,.mce-visualblocks ol,.mce-visualblocks p,.mce-visualblocks pre,.mce-visualblocks section,.mce-visualblocks ul{padding-top: 10px;margin-left: 3px;background-repeat: no-repeat;border: 1px dashed #bbb;} + +.mce-visualblocks p{background-image: url(data:image/gif;base64,R0lGODlhCQAJAJEAAAAAAP///7u7u////yH5BAEAAAMALAAAAAAJAAkAAAIQnG+CqCN/mlyvsRUpThG6AgA7);} + +.mce-visualblocks h1{background-image: url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGu1JuxHoAfRNRW3TWXyF2YiRUAOw==);} + +.mce-visualblocks h2{background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8Hybbx4oOuqgTynJd6bGlWg3DkJzoaUAAAOw==);} + +.mce-visualblocks h3{background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIZjI8Hybbx4oOuqgTynJf2Ln2NOHpQpmhAAQA7);} + +.mce-visualblocks h4{background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxInR0zqeAdhtJlXwV1oCll2HaWgAAOw==);} + +.mce-visualblocks h5{background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjane4iq5GlW05GgIkIZUAAAOw==);} + +.mce-visualblocks h6{background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjan04jep1iZ1XRlAo5bVgAAOw==);} + +.mce-visualblocks div:not([data-mce-bogus]){background-image: url(data:image/gif;base64,R0lGODlhEgAKAIABALu7u////yH5BAEAAAEALAAAAAASAAoAAAIfjI9poI0cgDywrhuxfbrzDEbQM2Ei5aRjmoySW4pAAQA7);} + +.mce-visualblocks section{background-image: url(data:image/gif;base64,R0lGODlhKAAKAIABALu7u////yH5BAEAAAEALAAAAAAoAAoAAAI5jI+pywcNY3sBWHdNrplytD2ellDeSVbp+GmWqaDqDMepc8t17Y4vBsK5hDyJMcI6KkuYU+jpjLoKADs=);} + +.mce-visualblocks article{background-image: url(data:image/gif;base64,R0lGODlhKgAKAIABALu7u////yH5BAEAAAEALAAAAAAqAAoAAAI6jI+pywkNY3wG0GBvrsd2tXGYSGnfiF7ikpXemTpOiJScasYoDJJrjsG9gkCJ0ag6KhmaIe3pjDYBBQA7);} + +.mce-visualblocks blockquote{background-image: url(data:image/gif;base64,R0lGODlhPgAKAIABALu7u////yH5BAEAAAEALAAAAAA+AAoAAAJPjI+py+0Knpz0xQDyuUhvfoGgIX5iSKZYgq5uNL5q69asZ8s5rrf0yZmpNkJZzFesBTu8TOlDVAabUyatguVhWduud3EyiUk45xhTTgMBBQA7);} + +.mce-visualblocks address{background-image: url(data:image/gif;base64,R0lGODlhLQAKAIABALu7u////yH5BAEAAAEALAAAAAAtAAoAAAI/jI+pywwNozSP1gDyyZcjb3UaRpXkWaXmZW4OqKLhBmLs+K263DkJK7OJeifh7FicKD9A1/IpGdKkyFpNmCkAADs=);} + +.mce-visualblocks pre{background-image: url(data:image/gif;base64,R0lGODlhFQAKAIABALu7uwAAACH5BAEAAAEALAAAAAAVAAoAAAIjjI+ZoN0cgDwSmnpz1NCueYERhnibZVKLNnbOq8IvKpJtVQAAOw==);} + +.mce-visualblocks figure{background-image: url(data:image/gif;base64,R0lGODlhJAAKAIAAALu7u////yH5BAEAAAEALAAAAAAkAAoAAAI0jI+py+2fwAHUSFvD3RlvG4HIp4nX5JFSpnZUJ6LlrM52OE7uSWosBHScgkSZj7dDKnWAAgA7);} + +.mce-visualblocks figcaption{border: 1px dashed #bbb;} + +.mce-visualblocks hgroup{background-image: url(data:image/gif;base64,R0lGODlhJwAKAIABALu7uwAAACH5BAEAAAEALAAAAAAnAAoAAAI3jI+pywYNI3uB0gpsRtt5fFnfNZaVSYJil4Wo03Hv6Z62uOCgiXH1kZIIJ8NiIxRrAZNMZAtQAAA7);} + +.mce-visualblocks aside{background-image: url(data:image/gif;base64,R0lGODlhHgAKAIABAKqqqv///yH5BAEAAAEALAAAAAAeAAoAAAItjI+pG8APjZOTzgtqy7I3f1yehmQcFY4WKZbqByutmW4aHUd6vfcVbgudgpYCADs=);} + +.mce-visualblocks ul{background-image: url(data:image/gif;base64,R0lGODlhDQAKAIAAALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGuYnqUVSjvw26DzzXiqIDlVwAAOw==);} + +.mce-visualblocks ol{background-image: url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybH6HHt0qourxC6CvzXieHyeWQAAOw==);} + +.mce-visualblocks dl{background-image: url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybEOnmOvUoWznTqeuEjNSCqeGRUAOw==);} + +.mce-visualblocks:not([dir=rtl]) address,.mce-visualblocks:not([dir=rtl]) article,.mce-visualblocks:not([dir=rtl]) aside,.mce-visualblocks:not([dir=rtl]) blockquote,.mce-visualblocks:not([dir=rtl]) div:not([data-mce-bogus]),.mce-visualblocks:not([dir=rtl]) dl,.mce-visualblocks:not([dir=rtl]) figcaption,.mce-visualblocks:not([dir=rtl]) figure,.mce-visualblocks:not([dir=rtl]) h1,.mce-visualblocks:not([dir=rtl]) h2,.mce-visualblocks:not([dir=rtl]) h3,.mce-visualblocks:not([dir=rtl]) h4,.mce-visualblocks:not([dir=rtl]) h5,.mce-visualblocks:not([dir=rtl]) h6,.mce-visualblocks:not([dir=rtl]) hgroup,.mce-visualblocks:not([dir=rtl]) ol,.mce-visualblocks:not([dir=rtl]) p,.mce-visualblocks:not([dir=rtl]) pre,.mce-visualblocks:not([dir=rtl]) section,.mce-visualblocks:not([dir=rtl]) ul{margin-left: 3px;} + +.mce-visualblocks[dir=rtl] address,.mce-visualblocks[dir=rtl] article,.mce-visualblocks[dir=rtl] aside,.mce-visualblocks[dir=rtl] blockquote,.mce-visualblocks[dir=rtl] div:not([data-mce-bogus]),.mce-visualblocks[dir=rtl] dl,.mce-visualblocks[dir=rtl] figcaption,.mce-visualblocks[dir=rtl] figure,.mce-visualblocks[dir=rtl] h1,.mce-visualblocks[dir=rtl] h2,.mce-visualblocks[dir=rtl] h3,.mce-visualblocks[dir=rtl] h4,.mce-visualblocks[dir=rtl] h5,.mce-visualblocks[dir=rtl] h6,.mce-visualblocks[dir=rtl] hgroup,.mce-visualblocks[dir=rtl] ol,.mce-visualblocks[dir=rtl] p,.mce-visualblocks[dir=rtl] pre,.mce-visualblocks[dir=rtl] section,.mce-visualblocks[dir=rtl] ul{background-position-x: right;margin-right: 3px;} + +.mce-nbsp,.mce-shy{background: #aaa;} + +.mce-shy::after{content: '-';} + +body{font-family: sans-serif;} + +table{border-collapse: collapse;} diff --git a/public/resource/tinymce/skins/ui/oxide-dark/content.mobile.min.css b/public/resource/tinymce/skins/ui/oxide-dark/content.mobile.min.css new file mode 100644 index 0000000..c052252 --- /dev/null +++ b/public/resource/tinymce/skins/ui/oxide-dark/content.mobile.min.css @@ -0,0 +1,17 @@ +/** + * Copyright (c) Tiny Technologies, Inc. All rights reserved. + * Licensed under the LGPL or a commercial license. + * For LGPL see License.txt in the project root for license information. + * For commercial licenses see https://www.tiny.cloud/ + */ +.tinymce-mobile-unfocused-selections .tinymce-mobile-unfocused-selection{position: absolute;display: inline-block;background-color: green;opacity: .5;} + +body{-webkit-text-size-adjust: none;} + +body img{max-width: 96vw;} + +body table img{max-width: 95%;} + +body{font-family: sans-serif;} + +table{border-collapse: collapse;} diff --git a/public/resource/tinymce/skins/ui/oxide-dark/skin.min.css b/public/resource/tinymce/skins/ui/oxide-dark/skin.min.css new file mode 100644 index 0000000..d8dc9b2 --- /dev/null +++ b/public/resource/tinymce/skins/ui/oxide-dark/skin.min.css @@ -0,0 +1,875 @@ +/** + * Copyright (c) Tiny Technologies, Inc. All rights reserved. + * Licensed under the LGPL or a commercial license. + * For LGPL see License.txt in the project root for license information. + * For commercial licenses see https://www.tiny.cloud/ + */ +.tox{font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size: 16px;font-style: normal;font-weight: 400;line-height: normal;color: #222f3e;text-decoration: none;text-shadow: none;text-transform: none;white-space: normal;vertical-align: initial;cursor: auto;box-sizing: content-box;-webkit-tap-highlight-color: transparent;} + +.tox :not(svg){font-family: inherit;font-size: inherit;font-style: inherit;font-weight: inherit;line-height: inherit;color: inherit;text-align: inherit;text-decoration: inherit;text-shadow: inherit;text-transform: inherit;white-space: inherit;vertical-align: inherit;cursor: inherit;box-sizing: inherit;direction: inherit;-webkit-tap-highlight-color: inherit;} + +.tox :not(svg){position: static;float: none;width: auto;height: auto;max-width: none;padding: 0;margin: 0;background: 0 0;border: 0;outline: 0;} + +.tox:not([dir=rtl]){text-align: left;direction: ltr;} + +.tox[dir=rtl]{text-align: right;direction: rtl;} + +.tox-tinymce{position: relative;display: flex;overflow: hidden;font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;border: 1px solid #000;border-radius: 0;visibility: inherit !important;box-shadow: none;box-sizing: border-box;flex-direction: column;} + +.tox-editor-container{display: flex;flex: 1 1 auto;flex-direction: column;overflow: hidden;} + +.tox-editor-container>:first-child{border-top: none !important;} + +.tox-tinymce-aux{font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;} + +.tox-tinymce :focus,.tox-tinymce-aux :focus{outline: 0;} + +button::-moz-focus-inner{border: 0;} + +.tox-silver-sink{z-index: 1300;} + +.tox .tox-anchorbar{display: flex;flex: 0 0 auto;} + +.tox .tox-bar{display: flex;flex: 0 0 auto;} + +.tox .tox-button{display: inline-block;padding: 4px 16px;margin: 0;font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size: 14px;font-weight: 700;line-height: 24px;letter-spacing: 1;color: #fff;text-align: center;text-decoration: none;text-transform: capitalize;white-space: nowrap;cursor: pointer;background-color: #207ab7;background-image: none;background-position: none;background-repeat: none;border-color: #207ab7;border-style: solid;border-width: 1px;border-radius: 3px;outline: 0;box-shadow: none;box-sizing: border-box;} + +.tox .tox-button[disabled]{color: rgba(255,255,255,.5);cursor: not-allowed;background-color: #207ab7;background-image: none;border-color: #207ab7;box-shadow: none;} + +.tox .tox-button:focus:not(:disabled){color: #fff;background-color: #1c6ca1;background-image: none;border-color: #1c6ca1;box-shadow: none;} + +.tox .tox-button:hover:not(:disabled){color: #fff;background-color: #1c6ca1;background-image: none;border-color: #1c6ca1;box-shadow: none;} + +.tox .tox-button:active:not(:disabled){color: #fff;background-color: #185d8c;background-image: none;border-color: #185d8c;box-shadow: none;} + +.tox .tox-button--secondary{padding: 4px 16px;color: #fff;text-decoration: none;text-transform: capitalize;background-color: #3d546f;background-image: none;background-position: none;background-repeat: none;border-color: #3d546f;border-style: solid;border-width: 1px;border-radius: 3px;outline: 0;box-shadow: none;} + +.tox .tox-button--secondary[disabled]{color: rgba(255,255,255,.5);background-color: #3d546f;background-image: none;border-color: #3d546f;box-shadow: none;} + +.tox .tox-button--secondary:focus:not(:disabled){color: #fff;background-color: #34485f;background-image: none;border-color: #34485f;box-shadow: none;} + +.tox .tox-button--secondary:hover:not(:disabled){color: #fff;background-color: #34485f;background-image: none;border-color: #34485f;box-shadow: none;} + +.tox .tox-button--secondary:active:not(:disabled){color: #fff;background-color: #2b3b4e;background-image: none;border-color: #2b3b4e;box-shadow: none;} + +.tox .tox-button--icon,.tox .tox-button.tox-button--icon,.tox .tox-button.tox-button--secondary.tox-button--icon{padding: 4px;} + +.tox .tox-button--icon .tox-icon svg,.tox .tox-button.tox-button--icon .tox-icon svg,.tox .tox-button.tox-button--secondary.tox-button--icon .tox-icon svg{display: block;fill: currentColor;} + +.tox .tox-button-link{display: inline-block;padding: 0;margin: 0;font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size: 16px;font-weight: 400;line-height: 1.3;white-space: nowrap;cursor: pointer;background: 0;border: none;box-sizing: border-box;} + +.tox .tox-button-link--sm{font-size: 14px;} + +.tox .tox-button--naked{color: #fff;background-color: transparent;border-color: transparent;box-shadow: unset;} + +.tox .tox-button--naked:hover:not(:disabled){color: #fff;background-color: #34485f;border-color: #34485f;box-shadow: none;} + +.tox .tox-button--naked:focus:not(:disabled){color: #fff;background-color: #34485f;border-color: #34485f;box-shadow: none;} + +.tox .tox-button--naked:active:not(:disabled){color: #fff;background-color: #2b3b4e;border-color: #2b3b4e;box-shadow: none;} + +.tox .tox-button--naked .tox-icon svg{fill: currentColor;} + +.tox .tox-button--naked.tox-button--icon{color: currentColor;} + +.tox .tox-button--naked.tox-button--icon:hover:not(:disabled){color: #fff;} + +.tox .tox-checkbox{display: flex;height: 36px;min-width: 36px;cursor: pointer;border-radius: 3px;align-items: center;} + +.tox .tox-checkbox__input{position: absolute;top: auto;left: -10000px;width: 1px;height: 1px;overflow: hidden;} + +.tox .tox-checkbox__icons{width: 24px;height: 24px;padding: calc(4px - 1px);border-radius: 3px;box-shadow: 0 0 0 2px transparent;box-sizing: content-box;} + +.tox .tox-checkbox__icons .tox-checkbox-icon__unchecked svg{display: block;fill: rgba(255,255,255,.2);} + +.tox .tox-checkbox__icons .tox-checkbox-icon__indeterminate svg{display: none;fill: #207ab7;} + +.tox .tox-checkbox__icons .tox-checkbox-icon__checked svg{display: none;fill: #207ab7;} + +.tox input.tox-checkbox__input:checked+.tox-checkbox__icons .tox-checkbox-icon__unchecked svg{display: none;} + +.tox input.tox-checkbox__input:checked+.tox-checkbox__icons .tox-checkbox-icon__checked svg{display: block;} + +.tox input.tox-checkbox__input:indeterminate+.tox-checkbox__icons .tox-checkbox-icon__unchecked svg{display: none;} + +.tox input.tox-checkbox__input:indeterminate+.tox-checkbox__icons .tox-checkbox-icon__indeterminate svg{display: block;} + +.tox input.tox-checkbox__input:focus+.tox-checkbox__icons{padding: calc(4px - 1px);border-radius: 3px;box-shadow: inset 0 0 0 1px #207ab7;} + +.tox:not([dir=rtl]) .tox-checkbox__label{margin-left: 4px;} + +.tox:not([dir=rtl]) .tox-bar .tox-checkbox{margin-left: 4px;} + +.tox[dir=rtl] .tox-checkbox__label{margin-right: 4px;} + +.tox[dir=rtl] .tox-bar .tox-checkbox{margin-right: 4px;} + +.tox .tox-collection--toolbar .tox-collection__group{display: flex;padding: 0;} + +.tox .tox-collection--grid .tox-collection__group{display: flex;max-height: 208px;padding: 0;overflow-x: hidden;overflow-y: auto;flex-wrap: wrap;} + +.tox .tox-collection--list .tox-collection__group{padding: 4px 0;border-color: #1a1a1a;border-style: solid;border-top-width: 1px;border-right-width: 0;border-bottom-width: 0;border-left-width: 0;} + +.tox .tox-collection--list .tox-collection__group:first-child{border-top-width: 0;} + +.tox .tox-collection__group-heading{padding: 4px 8px;margin-top: -4px;margin-bottom: 4px;font-size: 12px;font-style: normal;font-weight: 400;color: #fff;text-transform: none;cursor: default;background-color: #333;-webkit-user-select: none;-moz-user-select: none;-ms-user-select: none;user-select: none;-webkit-touch-callout: none;} + +.tox .tox-collection__item{display: flex;color: #fff;cursor: pointer;-webkit-user-select: none;-moz-user-select: none;-ms-user-select: none;user-select: none;align-items: center;-webkit-touch-callout: none;} + +.tox .tox-collection--list .tox-collection__item{padding: 4px 8px;} + +.tox .tox-collection--toolbar .tox-collection__item{padding: 4px;border-radius: 3px;} + +.tox .tox-collection--grid .tox-collection__item{padding: 4px;border-radius: 3px;} + +.tox .tox-collection--list .tox-collection__item--enabled{color: contrast(inherit,#222f3e,#fff);background-color: inherit;} + +.tox .tox-collection--list .tox-collection__item--active:not(.tox-collection__item--state-disabled){color: #fff;background-color: #434e5b;} + +.tox .tox-collection--toolbar .tox-collection__item--enabled{color: #fff;background-color: #6f7882;} + +.tox .tox-collection--toolbar .tox-collection__item--active:not(.tox-collection__item--state-disabled){color: #fff;background-color: #434e5b;} + +.tox .tox-collection--grid .tox-collection__item--enabled{color: #fff;background-color: #6f7882;} + +.tox .tox-collection--grid .tox-collection__item--active:not(.tox-collection__item--state-disabled){color: #fff;background-color: #434e5b;} + +.tox .tox-collection__item--state-disabled{color: rgba(255,255,255,.5);cursor: default;background-color: transparent;} + +.tox .tox-collection__item-icon{display: flex;width: 24px;height: 24px;align-items: center;justify-content: center;} + +.tox .tox-collection__item-icon svg{fill: currentColor;} + +.tox .tox-collection--toolbar-lg .tox-collection__item-icon{width: 48px;height: 48px;} + +.tox .tox-collection__item[role=menuitemcheckbox]:not(.tox-collection__item--enabled) .tox-collection__item-checkmark svg{display: none;} + +.tox .tox-collection__item-label{display: inline-block;font-size: 14px;font-style: normal;font-weight: 400;line-height: 24px;color: currentColor;text-transform: none;word-break: break-all;flex: 1;-ms-flex-preferred-size: auto;} + +.tox .tox-collection__item-accessory{display: inline-block;height: 24px;font-size: 14px;line-height: 24px;color: rgba(255,255,255,.5);text-transform: normal;} + +.tox .tox-collection__item-caret{align-items: center;display: flex;min-height: 24px;} + +.tox .tox-collection__item-caret::after{min-height: inherit;font-size: 0;content: '';} + +.tox:not([dir=rtl]) .tox-collection--list .tox-collection__item>:not(:first-child){margin-left: 8px;} + +.tox:not([dir=rtl]) .tox-collection--list .tox-collection__item-label:first-child{margin-left: 4px;} + +.tox:not([dir=rtl]) .tox-collection__item-accessory{margin-left: 16px;text-align: right;} + +.tox:not([dir=rtl]) .tox-collection__item-caret{margin-left: 16px;} + +.tox[dir=rtl] .tox-collection--list .tox-collection__item>:not(:first-child){margin-right: 8px;} + +.tox[dir=rtl] .tox-collection--list .tox-collection__item-label:first-child{margin-right: 4px;} + +.tox[dir=rtl] .tox-collection__item-icon-rtl .tox-collection__item-icon svg{transform: rotateY(180deg);} + +.tox[dir=rtl] .tox-collection__item-accessory{margin-right: 16px;text-align: left;} + +.tox[dir=rtl] .tox-collection__item-caret{margin-right: 16px;transform: rotateY(180deg);} + +.tox .tox-color-picker-container{display: flex;flex-direction: row;height: 225px;margin: 0;} + +.tox .tox-sv-palette{display: flex;height: 100%;box-sizing: border-box;} + +.tox .tox-sv-palette-spectrum{height: 100%;} + +.tox .tox-sv-palette,.tox .tox-sv-palette-spectrum{width: 225px;} + +.tox .tox-sv-palette-thumb{position: absolute;width: 12px;height: 12px;background: 0 0;border: 1px solid #000;border-radius: 50%;box-sizing: content-box;} + +.tox .tox-sv-palette-inner-thumb{position: absolute;width: 10px;height: 10px;border: 1px solid #fff;border-radius: 50%;} + +.tox .tox-hue-slider{width: 25px;height: 100%;box-sizing: border-box;} + +.tox .tox-hue-slider-spectrum{width: 100%;height: 100%;background: linear-gradient(to bottom,red,#ff0080,#f0f,#8000ff,#00f,#0080ff,#0ff,#00ff80,#0f0,#80ff00,#ff0,#ff8000,red);} + +.tox .tox-hue-slider,.tox .tox-hue-slider-spectrum{width: 20px;} + +.tox .tox-hue-slider-thumb{width: 100%;height: 4px;background: #fff;border: 1px solid #000;box-sizing: content-box;} + +.tox .tox-rgb-form{display: flex;flex-direction: column;justify-content: space-between;} + +.tox .tox-rgb-form div{display: flex;width: inherit;margin-bottom: 5px;align-items: center;justify-content: space-between;} + +.tox .tox-rgb-form input{width: 6em;} + +.tox .tox-rgb-form input.tox-invalid{border: 1px solid red !important;} + +.tox .tox-rgb-form .tox-rgba-preview{margin-bottom: 0;border: 1px solid #000;flex-grow: 2;} + +.tox:not([dir=rtl]) .tox-sv-palette{margin-right: 15px;} + +.tox:not([dir=rtl]) .tox-hue-slider{margin-right: 15px;} + +.tox:not([dir=rtl]) .tox-hue-slider-thumb{margin-left: -1px;} + +.tox:not([dir=rtl]) .tox-rgb-form label{margin-right: .5em;} + +.tox[dir=rtl] .tox-sv-palette{margin-left: 15px;} + +.tox[dir=rtl] .tox-hue-slider{margin-left: 15px;} + +.tox[dir=rtl] .tox-hue-slider-thumb{margin-right: -1px;} + +.tox[dir=rtl] .tox-rgb-form label{margin-left: .5em;} + +.tox .tox-toolbar .tox-swatches,.tox .tox-toolbar__overflow .tox-swatches,.tox .tox-toolbar__primary .tox-swatches{margin: 2px 0 3px 4px;} + +.tox .tox-collection--list .tox-collection__group .tox-swatches-menu{margin: -4px 0;border: 0;} + +.tox .tox-swatches__row{display: flex;} + +.tox .tox-swatch{width: 30px;height: 30px;transition: transform .15s,box-shadow .15s;} + +.tox .tox-swatch:focus,.tox .tox-swatch:hover{transform: scale(.8);box-shadow: 0 0 0 1px rgba(127,127,127,.3) inset;} + +.tox .tox-swatch--remove{align-items: center;display: flex;justify-content: center;} + +.tox .tox-swatch--remove svg path{stroke: #e74c3c;} + +.tox .tox-swatches__picker-btn{display: flex;width: 30px;height: 30px;padding: 0;cursor: pointer;background-color: transparent;border: 0;outline: 0;align-items: center;justify-content: center;} + +.tox .tox-swatches__picker-btn svg{width: 24px;height: 24px;} + +.tox .tox-swatches__picker-btn:hover{background: #434e5b;} + +.tox:not([dir=rtl]) .tox-swatches__picker-btn{margin-left: auto;} + +.tox[dir=rtl] .tox-swatches__picker-btn{margin-right: auto;} + +.tox .tox-comment-thread{position: relative;background: #2b3b4e;} + +.tox .tox-comment-thread>:not(:first-child){margin-top: 8px;} + +.tox .tox-comment{position: relative;padding: 8px 8px 16px 8px;background: #2b3b4e;border: 1px solid #000;border-radius: 3px;box-shadow: 0 4px 8px 0 rgba(34,47,62,.1);} + +.tox .tox-comment__header{display: flex;color: #fff;align-items: center;justify-content: space-between;} + +.tox .tox-comment__date{font-size: 12px;color: rgba(255,255,255,.5);} + +.tox .tox-comment__body{position: relative;margin-top: 8px;font-size: 14px;font-style: normal;font-weight: 400;line-height: 1.3;color: #fff;text-transform: initial;} + +.tox .tox-comment__body textarea{width: 100%;white-space: normal;resize: none;} + +.tox .tox-comment__expander{padding-top: 8px;} + +.tox .tox-comment__expander p{font-size: 14px;font-style: normal;color: rgba(255,255,255,.5);} + +.tox .tox-comment__body p{margin: 0;} + +.tox .tox-comment__buttonspacing{padding-top: 16px;text-align: center;} + +.tox .tox-comment-thread__overlay::after{position: absolute;top: 0;right: 0;bottom: 0;left: 0;z-index: 5;display: flex;background: #2b3b4e;content: "";opacity: .9;} + +.tox .tox-comment__reply{display: flex;flex-shrink: 0;flex-wrap: wrap;justify-content: flex-end;margin-top: 8px;} + +.tox .tox-comment__reply>:first-child{width: 100%;margin-bottom: 8px;} + +.tox .tox-comment__edit{display: flex;flex-wrap: wrap;justify-content: flex-end;margin-top: 16px;} + +.tox .tox-comment__gradient::after{position: absolute;bottom: 0;display: block;width: 100%;height: 5em;margin-top: -40px;background: linear-gradient(rgba(43,59,78,0),#2b3b4e);content: "";} + +.tox .tox-comment__overlay{position: absolute;top: 0;right: 0;bottom: 0;left: 0;z-index: 5;display: flex;text-align: center;background: #2b3b4e;opacity: .9;flex-direction: column;flex-grow: 1;} + +.tox .tox-comment__loading-text{position: relative;display: flex;color: #fff;align-items: center;flex-direction: column;} + +.tox .tox-comment__loading-text>div{padding-bottom: 16px;} + +.tox .tox-comment__overlaytext{position: absolute;top: 0;right: 0;bottom: 0;left: 0;z-index: 10;padding: 1em;font-size: 14px;flex-direction: column;} + +.tox .tox-comment__overlaytext p{color: #fff;text-align: center;background-color: #2b3b4e;box-shadow: 0 0 8px 8px #2b3b4e;} + +.tox .tox-comment__overlaytext div:nth-of-type(2){font-size: .8em;} + +.tox .tox-comment__busy-spinner{position: absolute;top: 0;right: 0;bottom: 0;left: 0;z-index: 1103;display: flex;background-color: #2b3b4e;align-items: center;justify-content: center;} + +.tox .tox-comment__scroll{display: flex;flex-direction: column;flex-shrink: 1;overflow: auto;} + +.tox .tox-conversations{margin: 8px;} + +.tox:not([dir=rtl]) .tox-comment__edit{margin-left: 8px;} + +.tox:not([dir=rtl]) .tox-comment__buttonspacing>:last-child,.tox:not([dir=rtl]) .tox-comment__edit>:last-child,.tox:not([dir=rtl]) .tox-comment__reply>:last-child{margin-left: 8px;} + +.tox[dir=rtl] .tox-comment__edit{margin-right: 8px;} + +.tox[dir=rtl] .tox-comment__buttonspacing>:last-child,.tox[dir=rtl] .tox-comment__edit>:last-child,.tox[dir=rtl] .tox-comment__reply>:last-child{margin-right: 8px;} + +.tox .tox-user{align-items: center;display: flex;} + +.tox .tox-user__avatar svg{fill: rgba(255,255,255,.5);} + +.tox .tox-user__name{font-size: 12px;font-style: normal;font-weight: 700;color: rgba(255,255,255,.5);text-transform: uppercase;} + +.tox:not([dir=rtl]) .tox-user__avatar svg{margin-right: 8px;} + +.tox:not([dir=rtl]) .tox-user__avatar+.tox-user__name{margin-left: 8px;} + +.tox[dir=rtl] .tox-user__avatar svg{margin-left: 8px;} + +.tox[dir=rtl] .tox-user__avatar+.tox-user__name{margin-right: 8px;} + +.tox .tox-dialog-wrap{position: fixed;top: 0;right: 0;bottom: 0;left: 0;z-index: 1100;display: flex;align-items: center;justify-content: center;} + +.tox .tox-dialog-wrap__backdrop{position: absolute;top: 0;right: 0;bottom: 0;left: 0;z-index: 1101;background-color: rgba(34,47,62,.75);} + +.tox .tox-dialog{position: relative;z-index: 1102;display: flex;width: 95vw;max-width: 480px;max-height: 100%;overflow: hidden;background-color: #2b3b4e;border-color: #000;border-style: solid;border-width: 1px;border-radius: 3px;box-shadow: 0 16px 16px -10px rgba(34,47,62,.15),0 0 40px 1px rgba(34,47,62,.15);flex-direction: column;} + +.tox .tox-dialog__header{position: relative;display: flex;padding: 8px 16px 0 16px;margin-bottom: 16px;font-size: 16px;color: #fff;background-color: #2b3b4e;border-bottom: none;align-items: center;justify-content: space-between;} + +.tox .tox-dialog__header .tox-button{z-index: 1;} + +.tox .tox-dialog__draghandle{position: absolute;top: 0;left: 0;width: 100%;height: 100%;cursor: grab;} + +.tox .tox-dialog__draghandle:active{cursor: grabbing;} + +.tox .tox-dialog__dismiss{margin-left: auto;} + +.tox .tox-dialog__title{margin: 0;font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size: 20px;font-style: normal;font-weight: 400;line-height: 1.3;text-transform: normal;} + +.tox .tox-dialog__body{display: flex;min-width: 0;padding: 0 16px;font-size: 16px;font-style: normal;font-weight: 400;line-height: 1.3;color: #fff;text-align: left;text-transform: normal;flex: 1;-ms-flex-preferred-size: auto;} + +.tox .tox-dialog__body-nav{align-items: flex-start;display: flex;flex-direction: column;} + +.tox .tox-dialog__body-nav-item{display: inline-block;margin-bottom: 8px;font-size: 14px;line-height: 1.3;color: rgba(255,255,255,.5);text-decoration: none;border-bottom: 2px solid transparent;} + +.tox .tox-dialog__body-nav-item--active{color: #207ab7;border-bottom: 2px solid #207ab7;} + +.tox .tox-dialog__body-content{display: flex;flex: 1;flex-direction: column;-ms-flex-preferred-size: auto;max-height: 650px;overflow: auto;} + +.tox .tox-dialog__body-content>*{margin-top: 16px;margin-bottom: 0;} + +.tox .tox-dialog__body-content>:first-child{margin-top: 0;} + +.tox .tox-dialog__body-content>:last-child{margin-bottom: 0;} + +.tox .tox-dialog__body-content>:only-child{margin-top: 0;margin-bottom: 0;} + +.tox .tox-dialog--width-lg{height: 650px;max-width: 1200px;} + +.tox .tox-dialog--width-md{max-width: 800px;} + +.tox .tox-dialog--width-md .tox-dialog__body-content{overflow: auto;} + +.tox .tox-dialog__body-content--centered{text-align: center;} + +.tox .tox-dialog__body-content--spacious{margin-bottom: 16px;} + +.tox .tox-dialog__footer{display: flex;padding: 8px 16px;margin-top: 16px;background-color: #2b3b4e;border-top: 1px solid #000;align-items: center;justify-content: space-between;} + +.tox .tox-dialog__busy-spinner{position: absolute;top: 0;right: 0;bottom: 0;left: 0;z-index: 1103;display: flex;background-color: rgba(34,47,62,.75);align-items: center;justify-content: center;} + +.tox .tox-dialog__table{width: 100%;border-collapse: collapse;} + +.tox .tox-dialog__table thead th{padding-bottom: 8px;font-weight: 700;} + +.tox .tox-dialog__table tbody tr{border-bottom: 1px solid #000;} + +.tox .tox-dialog__table tbody tr:last-child{border-bottom: none;} + +.tox .tox-dialog__table td{padding-top: 8px;padding-bottom: 8px;} + +.tox .tox-dialog__popups{position: absolute;z-index: 1100;width: 100%;} + +.tox .tox-dialog__body-iframe{display: flex;flex: 1;flex-direction: column;-ms-flex-preferred-size: auto;} + +.tox .tox-dialog__body-iframe .tox-navobj{display: flex;flex: 1;-ms-flex-preferred-size: auto;} + +.tox .tox-dialog__body-iframe .tox-navobj :nth-child(2){flex: 1;-ms-flex-preferred-size: auto;height: 100%;} + +body.tox-dialog__disable-scroll{overflow: hidden;} + +.tox.tox-platform-ie .tox-dialog-wrap{position: -ms-device-fixed;} + +.tox:not([dir=rtl]) .tox-dialog__body-nav{margin-right: 32px;} + +.tox:not([dir=rtl]) .tox-dialog__footer .tox-dialog__footer-end>*,.tox:not([dir=rtl]) .tox-dialog__footer .tox-dialog__footer-start>*{margin-left: 8px;} + +.tox[dir=rtl] .tox-dialog__body{text-align: right;} + +.tox[dir=rtl] .tox-dialog__body-nav{margin-left: 32px;} + +.tox[dir=rtl] .tox-dialog__footer .tox-dialog__footer-end>*,.tox[dir=rtl] .tox-dialog__footer .tox-dialog__footer-start>*{margin-right: 8px;} + +.tox .tox-dropzone-container{display: flex;flex: 1;-ms-flex-preferred-size: auto;} + +.tox .tox-dropzone{display: flex;min-height: 100px;padding: 10px;background: #fff;border: 2px dashed #000;box-sizing: border-box;align-items: center;flex-direction: column;flex-grow: 1;justify-content: center;} + +.tox .tox-dropzone p{margin: 0 0 16px 0;color: rgba(255,255,255,.5);} + +.tox .tox-edit-area{position: relative;display: flex;overflow: hidden;border-top: 1px solid #000;flex: 1;-ms-flex-preferred-size: auto;} + +.tox .tox-edit-area__iframe{position: absolute;width: 100%;height: 100%;background-color: #fff;border: 0;box-sizing: border-box;flex: 1;-ms-flex-preferred-size: auto;} + +.tox.tox-inline-edit-area{border: 1px dotted #000;} + +.tox .tox-control-wrap{flex: 1;position: relative;} + +.tox .tox-control-wrap:not(.tox-control-wrap--status-invalid) .tox-control-wrap__status-icon-invalid,.tox .tox-control-wrap:not(.tox-control-wrap--status-unknown) .tox-control-wrap__status-icon-unknown,.tox .tox-control-wrap:not(.tox-control-wrap--status-valid) .tox-control-wrap__status-icon-valid{display: none;} + +.tox .tox-control-wrap svg{display: block;} + +.tox .tox-control-wrap__status-icon-wrap{position: absolute;top: 50%;transform: translateY(-50%);} + +.tox .tox-control-wrap__status-icon-invalid svg{fill: #c00;} + +.tox .tox-control-wrap__status-icon-unknown svg{fill: orange;} + +.tox .tox-control-wrap__status-icon-valid svg{fill: green;} + +.tox:not([dir=rtl]) .tox-control-wrap--status-invalid .tox-textfield,.tox:not([dir=rtl]) .tox-control-wrap--status-unknown .tox-textfield,.tox:not([dir=rtl]) .tox-control-wrap--status-valid .tox-textfield{padding-right: 32px;} + +.tox:not([dir=rtl]) .tox-control-wrap__status-icon-wrap{right: 4px;} + +.tox[dir=rtl] .tox-control-wrap--status-invalid .tox-textfield,.tox[dir=rtl] .tox-control-wrap--status-unknown .tox-textfield,.tox[dir=rtl] .tox-control-wrap--status-valid .tox-textfield{padding-left: 32px;} + +.tox[dir=rtl] .tox-control-wrap__status-icon-wrap{left: 4px;} + +.tox .tox-autocompleter{max-width: 25em;} + +.tox .tox-autocompleter .tox-menu{max-width: 25em;} + +.tox .tox-color-input{display: flex;} + +.tox .tox-color-input .tox-textfield{display: flex;border-radius: 3px 0 0 3px;} + +.tox .tox-color-input span{display: flex;width: 35px;cursor: pointer;border-color: rgba(34,47,62,.2);border-style: solid;border-width: 1px 1px 1px 0;border-radius: 0 3px 3px 0;box-shadow: none;box-sizing: border-box;} + +.tox .tox-color-input span:focus{border-color: #207ab7;} + +.tox[dir=rtl] .tox-color-input .tox-textfield{border-radius: 0 3px 3px 0;} + +.tox[dir=rtl] .tox-color-input span{border-width: 1px 0 1px 1px;border-radius: 3px 0 0 3px;} + +.tox .tox-label,.tox .tox-toolbar-label{display: block;padding: 0 8px 0 0;font-size: 14px;font-style: normal;font-weight: 400;line-height: 1.3;color: rgba(255,255,255,.5);text-transform: normal;white-space: nowrap;} + +.tox .tox-toolbar-label{padding: 0 8px;} + +.tox[dir=rtl] .tox-label{padding: 0 0 0 8px;} + +.tox .tox-form{display: flex;flex: 1;flex-direction: column;-ms-flex-preferred-size: auto;} + +.tox .tox-form__group{margin-bottom: 4px;box-sizing: border-box;} + +.tox .tox-form__group--error{color: #c00;} + +.tox .tox-form__group--collection{display: flex;} + +.tox .tox-form__grid{display: flex;flex-direction: row;flex-wrap: wrap;justify-content: space-between;} + +.tox .tox-form__grid--2col>.tox-form__group{width: calc(50% - (8px / 2));} + +.tox .tox-form__grid--3col>.tox-form__group{width: calc(100% / 3 - (8px / 2));} + +.tox .tox-form__grid--4col>.tox-form__group{width: calc(25% - (8px / 2));} + +.tox .tox-form__controls-h-stack{align-items: center;display: flex;} + +.tox .tox-form__group--inline{align-items: center;display: flex;} + +.tox .tox-form__group--stretched{display: flex;flex: 1;flex-direction: column;-ms-flex-preferred-size: auto;} + +.tox .tox-form__group--stretched .tox-textarea{flex: 1;-ms-flex-preferred-size: auto;} + +.tox .tox-form__group--stretched .tox-navobj{display: flex;flex: 1;-ms-flex-preferred-size: auto;} + +.tox .tox-form__group--stretched .tox-navobj :nth-child(2){flex: 1;-ms-flex-preferred-size: auto;height: 100%;} + +.tox:not([dir=rtl]) .tox-form__controls-h-stack>:not(:first-child){margin-left: 4px;} + +.tox[dir=rtl] .tox-form__controls-h-stack>:not(:first-child){margin-right: 4px;} + +.tox .tox-lock.tox-locked .tox-lock-icon__unlock,.tox .tox-lock:not(.tox-locked) .tox-lock-icon__lock{display: none;} + +.tox .tox-textarea,.tox .tox-textfield,.tox .tox-toolbar-textfield,.tox:not([dir=rtl]) .tox-selectfield select,.tox[dir=rtl] .tox-selectfield select{width: 100%;padding: 5px 4.75px;margin: 0;font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size: 16px;line-height: 24px;color: #fff;background-color: #2b3b4e;border-color: #000;border-style: solid;border-width: 1px;border-radius: 3px;outline: 0;box-shadow: none;box-sizing: border-box;resize: none;-webkit-appearance: none;-moz-appearance: none;appearance: none;} + +.tox .tox-selectfield select:focus,.tox .tox-textarea:focus,.tox .tox-textfield:focus{border-color: #207ab7;outline: 0;box-shadow: none;} + +.tox .tox-toolbar-textfield{max-width: 250px;margin-top: 2px;margin-bottom: 3px;border-width: 0;} + +.tox .tox-naked-btn{display: block;padding: 0;margin: 0;color: #207ab7;cursor: pointer;background-color: transparent;border: 0;border-color: transparent;box-shadow: unset;} + +.tox .tox-naked-btn svg{display: block;fill: #fff;} + +.tox:not([dir=rtl]) .tox-toolbar-textfield+*{margin-left: 4px;} + +.tox[dir=rtl] .tox-toolbar-textfield+*{margin-right: 4px;} + +.tox .tox-selectfield{position: relative;cursor: pointer;} + +.tox .tox-selectfield select::-ms-expand{display: none;} + +.tox .tox-selectfield svg{position: absolute;top: 50%;pointer-events: none;transform: translateY(-50%);} + +.tox:not([dir=rtl]) .tox-selectfield select{padding-right: 24px;} + +.tox:not([dir=rtl]) .tox-selectfield svg{right: 8px;} + +.tox[dir=rtl] .tox-selectfield select{padding-left: 24px;} + +.tox[dir=rtl] .tox-selectfield svg{left: 8px;} + +.tox .tox-textarea{white-space: pre-wrap;-webkit-appearance: textarea;-moz-appearance: textarea;appearance: textarea;} + +.tox-fullscreen{position: fixed;top: 0;left: 0;width: 100%;height: 100%;padding: 0;margin: 0;overflow: hidden;border: 0;} + +.tox-fullscreen .tox.tox-tinymce.tox-fullscreen .tox-statusbar__resize-handle{display: none;} + +.tox-fullscreen .tox.tox-tinymce.tox-fullscreen{z-index: 1200;} + +.tox-fullscreen .tox.tox-tinymce-aux{z-index: 1201;} + +.tox .tox-image-tools{width: 100%;} + +.tox .tox-image-tools__toolbar{align-items: center;display: flex;justify-content: center;} + +.tox .tox-image-tools__image{position: relative;width: 100%;height: 380px;overflow: auto;background-color: #666;} + +.tox .tox-image-tools__image,.tox .tox-image-tools__image+.tox-image-tools__toolbar{margin-top: 8px;} + +.tox .tox-image-tools__image-bg{background: url(data:image/gif;base64,R0lGODdhDAAMAIABAMzMzP///ywAAAAADAAMAAACFoQfqYeabNyDMkBQb81Uat85nxguUAEAOw==);} + +.tox .tox-image-tools__toolbar>.tox-spacer{flex: 1;-ms-flex-preferred-size: auto;} + +.tox .tox-croprect-block{position: absolute;background: #000;opacity: .5;zoom: 1;} + +.tox .tox-croprect-handle{position: absolute;top: 0;left: 0;width: 20px;height: 20px;border: 2px solid #fff;} + +.tox .tox-croprect-handle-move{position: absolute;cursor: move;border: 0;} + +.tox .tox-croprect-handle-nw{top: 100px;left: 100px;margin: -2px 0 0 -2px;cursor: nw-resize;border-width: 2px 0 0 2px;} + +.tox .tox-croprect-handle-ne{top: 100px;left: 200px;margin: -2px 0 0 -20px;cursor: ne-resize;border-width: 2px 2px 0 0;} + +.tox .tox-croprect-handle-sw{top: 200px;left: 100px;margin: -20px 2px 0 -2px;cursor: sw-resize;border-width: 0 0 2px 2px;} + +.tox .tox-croprect-handle-se{top: 200px;left: 200px;margin: -20px 0 0 -20px;cursor: se-resize;border-width: 0 2px 2px 0;} + +.tox:not([dir=rtl]) .tox-image-tools__toolbar>.tox-slider:not(:first-of-type){margin-left: 8px;} + +.tox:not([dir=rtl]) .tox-image-tools__toolbar>.tox-button+.tox-slider{margin-left: 32px;} + +.tox:not([dir=rtl]) .tox-image-tools__toolbar>.tox-slider+.tox-button{margin-left: 32px;} + +.tox[dir=rtl] .tox-image-tools__toolbar>.tox-slider:not(:first-of-type){margin-right: 8px;} + +.tox[dir=rtl] .tox-image-tools__toolbar>.tox-button+.tox-slider{margin-right: 32px;} + +.tox[dir=rtl] .tox-image-tools__toolbar>.tox-slider+.tox-button{margin-right: 32px;} + +.tox .tox-insert-table-picker{display: flex;flex-wrap: wrap;width: 169px;} + +.tox .tox-insert-table-picker>div{width: 16px;height: 16px;border-color: #070a0d;border-style: solid;border-width: 0 1px 1px 0;box-sizing: content-box;} + +.tox .tox-collection--list .tox-collection__group .tox-insert-table-picker{margin: -4px 0;} + +.tox .tox-insert-table-picker .tox-insert-table-picker__selected{background-color: rgba(32,122,183,.5);border-color: rgba(32,122,183,.5);} + +.tox .tox-insert-table-picker__label{display: block;width: 100%;padding: 4px;font-size: 14px;color: #fff;text-align: center;} + +.tox:not([dir=rtl]) .tox-insert-table-picker>div:nth-child(10n){border-right: 0;} + +.tox[dir=rtl] .tox-insert-table-picker>div:nth-child(10n+1){border-right: 0;} + +.tox .tox-menu{z-index: 1;display: inline-block;overflow: hidden;vertical-align: top;background-color: #2b3b4e;border: 1px solid #000;border-radius: 3px;box-shadow: 0 4px 8px 0 rgba(34,47,62,.1);} + +.tox .tox-menu.tox-collection.tox-collection--list{padding: 0;} + +.tox .tox-menu.tox-collection.tox-collection--toolbar{padding: 4px;} + +.tox .tox-menu.tox-collection.tox-collection--grid{padding: 4px;} + +.tox .tox-menu__label blockquote,.tox .tox-menu__label code,.tox .tox-menu__label h1,.tox .tox-menu__label h2,.tox .tox-menu__label h3,.tox .tox-menu__label h4,.tox .tox-menu__label h5,.tox .tox-menu__label h6,.tox .tox-menu__label p{margin: 0;} + +.tox .tox-menubar{display: flex;padding: 0 4px;margin-bottom: -1px;background: url("data:image/svg+xml;charset=utf8,%3Csvg height='43px' viewBox='0 0 40 43px' width='40' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='0' y='42px' width='100' height='1' fill='%23000000'/%3E%3C/svg%3E") left 0 top 0 #222f3e;background-color: #222f3e;flex: 0 0 auto;flex-shrink: 0;flex-wrap: wrap;} + +.tox .tox-mbtn{display: flex;width: auto;height: 34px;padding: 0 4px;margin: 2px 0 3px 0;overflow: hidden;font-size: 14px;font-style: normal;font-weight: 400;color: #fff;text-transform: normal;background: 0 0;border: 0;border-radius: 3px;outline: 0;box-shadow: none;align-items: center;flex: 0 0 auto;justify-content: center;} + +.tox .tox-mbtn[disabled]{color: rgba(255,255,255,.5);cursor: not-allowed;background-color: none;border-color: none;box-shadow: none;} + +.tox .tox-mbtn:hover:not(:disabled){color: #fff;background: #434e5b;box-shadow: none;} + +.tox .tox-mbtn:focus:not(:disabled){color: #fff;background: #434e5b;box-shadow: none;} + +.tox .tox-mbtn--active{color: #fff;background: #6f7882;box-shadow: none;} + +.tox .tox-mbtn__select-label{margin: 0 4px;font-weight: 400;cursor: default;} + +.tox .tox-mbtn[disabled] .tox-mbtn__select-label{cursor: not-allowed;} + +.tox .tox-mbtn__select-chevron{display: flex;display: none;width: 16px;align-items: center;justify-content: center;} + +.tox .tox-notification{display: grid;padding: 5px;margin-top: 5px;background-color: #fffaea;border-color: #ffe89d;border-style: solid;border-width: 1px;opacity: 0;box-sizing: border-box;transition: transform .1s ease-in,opacity 150ms ease-in;grid-template-columns: minmax(40px,1fr) auto minmax(40px,1fr);} + +.tox .tox-notification--in{opacity: 1;} + +.tox .tox-notification--success{background-color: #dff0d8;border-color: #d6e9c6;} + +.tox .tox-notification--error{background-color: #f2dede;border-color: #ebccd1;} + +.tox .tox-notification--warn{background-color: #fcf8e3;border-color: #faebcc;} + +.tox .tox-notification--info{background-color: #d9edf7;border-color: #779ecb;} + +.tox .tox-notification__body{font-size: 14px;color: #fff;text-align: center;word-break: break-all;word-break: break-word;white-space: normal;align-self: center;grid-column-end: 3;-ms-grid-column-span: 1;grid-column-start: 2;grid-row-end: 2;grid-row-start: 1;} + +.tox .tox-notification__body>*{margin: 0;} + +.tox .tox-notification__body>*+*{margin-top: 1rem;} + +.tox .tox-notification__icon{align-self: center;-ms-grid-column-align: end;grid-column-end: 2;-ms-grid-column-span: 1;grid-column-start: 1;grid-row-end: 2;grid-row-start: 1;justify-self: end;} + +.tox .tox-notification__icon svg{display: block;} + +.tox .tox-notification__dismiss{align-self: start;-ms-grid-column-align: end;grid-column-end: 4;-ms-grid-column-span: 1;grid-column-start: 3;grid-row-end: 2;grid-row-start: 1;justify-self: end;} + +.tox .tox-notification .tox-progress-bar{-ms-grid-column-align: center;grid-column-end: 4;-ms-grid-column-span: 3;grid-column-start: 1;grid-row-end: 3;-ms-grid-row-span: 1;grid-row-start: 2;justify-self: center;} + +.tox .tox-pop{position: relative;display: inline-block;} + +.tox .tox-pop--resizing{transition: width .1s ease;} + +.tox .tox-pop--resizing .tox-toolbar{flex-wrap: nowrap;} + +.tox .tox-pop__dialog{min-width: 0;overflow: hidden;background-color: #222f3e;border: 1px solid #000;border-radius: 3px;box-shadow: 0 1px 3px rgba(0,0,0,.15);} + +.tox .tox-pop__dialog>:not(.tox-toolbar){margin: 4px 4px 4px 8px;} + +.tox .tox-pop__dialog .tox-toolbar{background-color: transparent;} + +.tox .tox-pop::after,.tox .tox-pop::before{position: absolute;display: block;width: 0;height: 0;border-style: solid;content: '';} + +.tox .tox-pop.tox-pop--bottom::after,.tox .tox-pop.tox-pop--bottom::before{top: 100%;left: 50%;} + +.tox .tox-pop.tox-pop--bottom::after{margin-top: -1px;margin-left: -8px;border-color: #222f3e transparent transparent transparent;border-width: 8px;} + +.tox .tox-pop.tox-pop--bottom::before{margin-left: -9px;border-color: #000 transparent transparent transparent;border-width: 9px;} + +.tox .tox-pop.tox-pop--top::after,.tox .tox-pop.tox-pop--top::before{top: 0;left: 50%;transform: translateY(-100%);} + +.tox .tox-pop.tox-pop--top::after{margin-top: 1px;margin-left: -8px;border-color: transparent transparent #222f3e transparent;border-width: 8px;} + +.tox .tox-pop.tox-pop--top::before{margin-left: -9px;border-color: transparent transparent #000 transparent;border-width: 9px;} + +.tox .tox-pop.tox-pop--left::after,.tox .tox-pop.tox-pop--left::before{top: calc(50% - 1px);left: 0;transform: translateY(-50%);} + +.tox .tox-pop.tox-pop--left::after{margin-left: -15px;border-color: transparent #222f3e transparent transparent;border-width: 8px;} + +.tox .tox-pop.tox-pop--left::before{margin-left: -19px;border-color: transparent #000 transparent transparent;border-width: 10px;} + +.tox .tox-pop.tox-pop--right::after,.tox .tox-pop.tox-pop--right::before{top: calc(50% + 1px);left: 100%;transform: translateY(-50%);} + +.tox .tox-pop.tox-pop--right::after{margin-left: -1px;border-color: transparent transparent transparent #222f3e;border-width: 8px;} + +.tox .tox-pop.tox-pop--right::before{margin-left: -1px;border-color: transparent transparent transparent #000;border-width: 10px;} + +.tox .tox-pop.tox-pop--align-left::after,.tox .tox-pop.tox-pop--align-left::before{left: 20px;} + +.tox .tox-pop.tox-pop--align-right::after,.tox .tox-pop.tox-pop--align-right::before{left: calc(100% - 20px);} + +.tox .tox-sidebar-wrap{display: flex;flex-direction: row;flex-grow: 1;min-height: 0;} + +.tox .tox-sidebar{display: flex;flex-direction: row;justify-content: flex-end;} + +.tox .tox-sidebar__slider{display: flex;overflow: hidden;} + +.tox .tox-sidebar__pane-container{display: flex;} + +.tox .tox-sidebar__pane{display: flex;} + +.tox .tox-sidebar--sliding-closed{opacity: 0;} + +.tox .tox-sidebar--sliding-open{opacity: 1;} + +.tox .tox-sidebar--sliding-growing,.tox .tox-sidebar--sliding-shrinking{transition: width .5s ease,opacity .5s ease;} + +.tox .tox-slider{position: relative;display: flex;height: 24px;align-items: center;flex: 1;-ms-flex-preferred-size: auto;justify-content: center;} + +.tox .tox-slider__rail{width: 100%;height: 10px;min-width: 120px;background-color: transparent;border: 1px solid #000;border-radius: 3px;} + +.tox .tox-slider__handle{position: absolute;top: 50%;left: 50%;width: 14px;height: 24px;background-color: #207ab7;border: 2px solid #185d8c;border-radius: 3px;transform: translateX(-50%) translateY(-50%);box-shadow: none;} + +.tox .tox-source-code{overflow: auto;} + +.tox .tox-spinner{display: flex;} + +.tox .tox-spinner>div{width: 8px;height: 8px;background-color: rgba(255,255,255,.5);border-radius: 100%;animation: tam-bouncing-dots 1.5s ease-in-out 0s infinite both;} + +.tox .tox-spinner>div:nth-child(1){animation-delay: -.32s;} + +.tox .tox-spinner>div:nth-child(2){animation-delay: -.16s;}@keyframes tam-bouncing-dots{0%,100%,80%{transform: scale(0);} + +40%{transform: scale(1);}} + +.tox:not([dir=rtl]) .tox-spinner>div:not(:first-child){margin-left: 4px;} + +.tox[dir=rtl] .tox-spinner>div:not(:first-child){margin-right: 4px;} + +.tox .tox-statusbar{position: relative;display: flex;height: 18px;padding: 0 8px;overflow: hidden;font-size: 12px;color: rgba(255,255,255,.5);text-transform: uppercase;background-color: #222f3e;border-top: 1px solid #000;align-items: center;flex: 0 0 auto;} + +.tox .tox-statusbar a{color: rgba(255,255,255,.5);text-decoration: none;} + +.tox .tox-statusbar a:hover{text-decoration: underline;} + +.tox .tox-statusbar__text-container{display: flex;flex: 1 1 auto;justify-content: flex-end;overflow: hidden;} + +.tox .tox-statusbar__path{display: flex;flex: 1 1 auto;margin-right: auto;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;} + +.tox .tox-statusbar__path>*{display: inline;white-space: nowrap;} + +.tox .tox-statusbar__wordcount{flex: 0 0 auto;margin-left: 1ch;} + +.tox .tox-statusbar__resize-handle{display: flex;padding-left: 1ch;margin-right: -8px;margin-left: auto;cursor: nwse-resize;align-items: flex-end;align-self: stretch;flex: 0 0 auto;justify-content: flex-end;} + +.tox .tox-statusbar__resize-handle svg{display: block;fill: rgba(255,255,255,.5);} + +.tox:not([dir=rtl]) .tox-statusbar__path>*{margin-right: 4px;} + +.tox:not([dir=rtl]) .tox-statusbar__branding{margin-left: 1ch;} + +.tox[dir=rtl] .tox-statusbar{flex-direction: row-reverse;} + +.tox[dir=rtl] .tox-statusbar__path>*{margin-left: 4px;} + +.tox .tox-throbber{z-index: 1400;} + +.tox .tox-throbber__busy-spinner{position: absolute;top: 0;right: 0;bottom: 0;left: 0;display: flex;background-color: rgba(34,47,62,.6);align-items: center;justify-content: center;} + +.tox .tox-tbtn{display: flex;width: 34px;height: 34px;padding: 0;margin: 2px 0 3px 0;overflow: hidden;font-size: 14px;font-style: normal;font-weight: 400;color: #fff;text-transform: normal;background: 0 0;border: 0;border-radius: 3px;outline: 0;box-shadow: none;align-items: center;flex: 0 0 auto;justify-content: center;} + +.tox .tox-tbtn svg{display: block;fill: #fff;} + +.tox .tox-tbtn.tox-tbtn-more{width: inherit;padding-right: 5px;padding-left: 5px;} + +.tox .tox-tbtn--enabled{color: #fff;background: #6f7882;box-shadow: none;} + +.tox .tox-tbtn--enabled>*{transform: none;} + +.tox .tox-tbtn--enabled svg{fill: #fff;} + +.tox .tox-tbtn:hover{color: #fff;background: #434e5b;box-shadow: none;} + +.tox .tox-tbtn:hover svg{fill: #fff;} + +.tox .tox-tbtn:focus{color: #fff;background: #434e5b;box-shadow: none;} + +.tox .tox-tbtn:focus svg{fill: #fff;} + +.tox .tox-tbtn:active{color: #fff;background: #6f7882;box-shadow: none;} + +.tox .tox-tbtn:active svg{fill: #fff;} + +.tox .tox-tbtn--disabled,.tox .tox-tbtn--disabled:hover,.tox .tox-tbtn:disabled,.tox .tox-tbtn:disabled:hover{color: rgba(255,255,255,.5);cursor: not-allowed;background: 0 0;box-shadow: none;} + +.tox .tox-tbtn--disabled svg,.tox .tox-tbtn--disabled:hover svg,.tox .tox-tbtn:disabled svg,.tox .tox-tbtn:disabled:hover svg{fill: rgba(255,255,255,.5);} + +.tox .tox-tbtn:active>*{transform: none;} + +.tox .tox-tbtn--md{width: 51px;height: 51px;} + +.tox .tox-tbtn--lg{width: 68px;height: 68px;flex-direction: column;} + +.tox .tox-tbtn--return{width: 16px;height: unset;align-self: stretch;} + +.tox .tox-tbtn--labeled{width: unset;padding: 0 4px;} + +.tox .tox-tbtn__vlabel{display: block;margin-bottom: 4px;font-size: 10px;font-weight: 400;letter-spacing: -.025em;white-space: nowrap;} + +.tox .tox-tbtn--select{width: auto;padding: 0 4px;margin: 2px 0 3px 0;} + +.tox .tox-tbtn__select-label{margin: 0 4px;font-weight: 400;cursor: default;} + +.tox .tox-tbtn__select-chevron{align-items: center;display: flex;justify-content: center;width: 16px;} + +.tox .tox-tbtn__select-chevron svg{fill: rgba(255,255,255,.5);} + +.tox .tox-tbtn--bespoke .tox-tbtn__select-label{width: 7em;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;} + +.tox .tox-split-button{display: flex;margin: 2px 0 3px 0;overflow: hidden;border: 0;border-radius: 3px;box-sizing: border-box;} + +.tox .tox-split-button:hover{box-shadow: 0 0 0 1px #434e5b inset;} + +.tox .tox-split-button:focus{color: #fff;background: #434e5b;box-shadow: none;} + +.tox .tox-split-button>*{border-radius: 0;} + +.tox .tox-split-button__chevron{width: 16px;} + +.tox .tox-split-button__chevron svg{fill: rgba(255,255,255,.5);} + +.tox .tox-pop .tox-split-button__chevron svg{transform: rotate(-90deg);} + +.tox .tox-split-button .tox-tbtn{margin: 0;} + +.tox .tox-split-button.tox-tbtn--disabled .tox-tbtn:focus,.tox .tox-split-button.tox-tbtn--disabled .tox-tbtn:hover,.tox .tox-split-button.tox-tbtn--disabled:focus,.tox .tox-split-button.tox-tbtn--disabled:hover{color: rgba(255,255,255,.5);background: 0 0;box-shadow: none;} + +.tox .tox-toolbar,.tox .tox-toolbar__overflow,.tox .tox-toolbar__primary{display: flex;padding: 0 0;margin-bottom: -1px;background: url("data:image/svg+xml;charset=utf8,%3Csvg height='39px' viewBox='0 0 40 39px' width='40' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='0' y='38px' width='100' height='1' fill='%23000000'/%3E%3C/svg%3E") left 0 top 0 #222f3e;background-color: #222f3e;border-top: 1px solid #000;flex: 0 0 auto;flex-shrink: 0;flex-wrap: wrap;} + +.tox .tox-toolbar__overflow.tox-toolbar__overflow--closed{height: 0;opacity: 0;visibility: hidden;} + +.tox .tox-toolbar__overflow--growing{transition: height .3s ease,opacity .2s linear .1s;} + +.tox .tox-toolbar__overflow--shrinking{transition: opacity .3s ease,height .2s linear .1s,visibility 0s linear .3s;} + +.tox .tox-pop .tox-toolbar{border-width: 0;} + +.tox .tox-toolbar--no-divider{background-image: none;} + +.tox.tox-tinymce-aux .tox-toolbar__overflow{background-color: #222f3e;border: 1px solid #000;border-radius: 3px;box-shadow: 0 1px 3px rgba(0,0,0,.15);} + +.tox.tox-tinymce-aux:not([dir=rtl]) .tox-toolbar__overflow{margin-left: 4px;} + +.tox[dir=rtl] .tox-tbtn__icon-rtl svg{transform: rotateY(180deg);} + +.tox[dir=rtl].tox-tinymce-aux .tox-toolbar__overflow{margin-right: 4px;} + +.tox .tox-toolbar__group{display: flex;padding: 0 4px;margin: 0 0;align-items: center;flex-wrap: wrap;} + +.tox .tox-toolbar__group--pull-right{margin-left: auto;} + +.tox:not([dir=rtl]) .tox-toolbar__group:not(:last-of-type){border-right: 1px solid #000;} + +.tox[dir=rtl] .tox-toolbar__group:not(:last-of-type){border-left: 1px solid #000;} + +.tox .tox-tooltip{position: relative;display: inline-block;padding: 8px;} + +.tox .tox-tooltip__body{padding: 4px 8px;font-size: 14px;font-style: normal;font-weight: 400;color: rgba(255,255,255,.75);text-transform: normal;background-color: #3d546f;border-radius: 3px;box-shadow: 0 2px 4px rgba(34,47,62,.3);} + +.tox .tox-tooltip__arrow{position: absolute;} + +.tox .tox-tooltip--down .tox-tooltip__arrow{position: absolute;bottom: 0;left: 50%;border-top: 8px solid #3d546f;border-right: 8px solid transparent;border-left: 8px solid transparent;transform: translateX(-50%);} + +.tox .tox-tooltip--up .tox-tooltip__arrow{position: absolute;top: 0;left: 50%;border-right: 8px solid transparent;border-bottom: 8px solid #3d546f;border-left: 8px solid transparent;transform: translateX(-50%);} + +.tox .tox-tooltip--right .tox-tooltip__arrow{position: absolute;top: 50%;right: 0;border-top: 8px solid transparent;border-bottom: 8px solid transparent;border-left: 8px solid #3d546f;transform: translateY(-50%);} + +.tox .tox-tooltip--left .tox-tooltip__arrow{position: absolute;top: 50%;left: 0;border-top: 8px solid transparent;border-right: 8px solid #3d546f;border-bottom: 8px solid transparent;transform: translateY(-50%);} + +.tox .tox-well{width: 100%;padding: 8px;border: 1px solid #000;border-radius: 3px;} + +.tox .tox-well>:first-child{margin-top: 0;} + +.tox .tox-well>:last-child{margin-bottom: 0;} + +.tox .tox-well>:only-child{margin: 0;} + +.tox .tox-custom-editor{display: flex;height: 525px;border: 1px solid #000;border-radius: 3px;} + +.tox .tox-dialog-loading::before{position: absolute;z-index: 1000;width: 100%;height: 100%;background-color: rgba(0,0,0,.5);content: "";} + +.tox .tox-tab{cursor: pointer;} + +.tox .tox-dialog__content-js{display: flex;flex: 1;-ms-flex-preferred-size: auto;} + +.tox .tox-dialog__body-content .tox-collection{display: flex;flex: 1;-ms-flex-preferred-size: auto;} + +.tox ul{display: block;list-style-type: disc;-webkit-margin-before: 1em;margin-block-start: 1em;-webkit-margin-after: 1em;margin-block-end: 1em;-webkit-margin-start: 0;margin-inline-start: 0;-webkit-margin-end: 0;margin-inline-end: 0;-webkit-padding-start: 40px;padding-inline-start: 40px;} + +.tox a{color: #2276d2;cursor: pointer;} + +.tox .tox-image-tools-edit-panel{height: 60px;} + +.tox .tox-image-tools__sidebar{height: 60px;} diff --git a/public/resource/tinymce/skins/ui/oxide-dark/skin.mobile.min.css b/public/resource/tinymce/skins/ui/oxide-dark/skin.mobile.min.css new file mode 100644 index 0000000..14847d0 --- /dev/null +++ b/public/resource/tinymce/skins/ui/oxide-dark/skin.mobile.min.css @@ -0,0 +1,239 @@ +/** + * Copyright (c) Tiny Technologies, Inc. All rights reserved. + * Licensed under the LGPL or a commercial license. + * For LGPL see License.txt in the project root for license information. + * For commercial licenses see https://www.tiny.cloud/ + */ +.tinymce-mobile-outer-container{all: initial;display: block;} + +.tinymce-mobile-outer-container *{float: none;padding: 0;margin: 0;line-height: 1;text-shadow: none;white-space: nowrap;cursor: inherit;border: 0;outline: 0;box-sizing: initial;-webkit-tap-highlight-color: transparent;} + +.tinymce-mobile-icon-arrow-back::before{content: "\e5cd";} + +.tinymce-mobile-icon-image::before{content: "\e412";} + +.tinymce-mobile-icon-cancel-circle::before{content: "\e5c9";} + +.tinymce-mobile-icon-full-dot::before{content: "\e061";} + +.tinymce-mobile-icon-align-center::before{content: "\e234";} + +.tinymce-mobile-icon-align-left::before{content: "\e236";} + +.tinymce-mobile-icon-align-right::before{content: "\e237";} + +.tinymce-mobile-icon-bold::before{content: "\e238";} + +.tinymce-mobile-icon-italic::before{content: "\e23f";} + +.tinymce-mobile-icon-unordered-list::before{content: "\e241";} + +.tinymce-mobile-icon-ordered-list::before{content: "\e242";} + +.tinymce-mobile-icon-font-size::before{content: "\e245";} + +.tinymce-mobile-icon-underline::before{content: "\e249";} + +.tinymce-mobile-icon-link::before{content: "\e157";} + +.tinymce-mobile-icon-unlink::before{content: "\eca2";} + +.tinymce-mobile-icon-color::before{content: "\e891";} + +.tinymce-mobile-icon-previous::before{content: "\e314";} + +.tinymce-mobile-icon-next::before{content: "\e315";} + +.tinymce-mobile-icon-large-font::before,.tinymce-mobile-icon-style-formats::before{content: "\e264";} + +.tinymce-mobile-icon-undo::before{content: "\e166";} + +.tinymce-mobile-icon-redo::before{content: "\e15a";} + +.tinymce-mobile-icon-removeformat::before{content: "\e239";} + +.tinymce-mobile-icon-small-font::before{content: "\e906";} + +.tinymce-mobile-format-matches::after,.tinymce-mobile-icon-readonly-back::before{content: "\e5ca";} + +.tinymce-mobile-icon-small-heading::before{content: "small";} + +.tinymce-mobile-icon-large-heading::before{content: "large";} + +.tinymce-mobile-icon-large-heading::before,.tinymce-mobile-icon-small-heading::before{font-family: sans-serif;font-size: 80%;} + +.tinymce-mobile-mask-edit-icon::before{content: "\e254";} + +.tinymce-mobile-icon-back::before{content: "\e5c4";} + +.tinymce-mobile-icon-heading::before{font-family: sans-serif;font-size: 80%;font-weight: 700;content: "Headings";} + +.tinymce-mobile-icon-h1::before{font-weight: 700;content: "H1";} + +.tinymce-mobile-icon-h2::before{font-weight: 700;content: "H2";} + +.tinymce-mobile-icon-h3::before{font-weight: 700;content: "H3";} + +.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask{position: absolute;top: 0;display: flex;width: 100%;height: 100%;background: rgba(51,51,51,.5);align-items: center;justify-content: center;} + +.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask .tinymce-mobile-content-container{display: flex;font-family: sans-serif;font-size: 1em;border-radius: 50%;align-items: center;flex-direction: column;justify-content: space-between;} + +.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask .tinymce-mobile-content-container .mixin-menu-item{display: flex;width: 2.1em;height: 2.1em;border-radius: 50%;align-items: center;justify-content: center;} + +.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask .tinymce-mobile-content-container .tinymce-mobile-content-tap-section{align-items: center;display: flex;justify-content: center;flex-direction: column;font-size: 1em;}@media only screen and (min-device-width: 700px){.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask .tinymce-mobile-content-container .tinymce-mobile-content-tap-section{font-size: 1.2em;}} + +.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask .tinymce-mobile-content-container .tinymce-mobile-content-tap-section .tinymce-mobile-mask-tap-icon{display: flex;width: 2.1em;height: 2.1em;color: #207ab7;background-color: #fff;border-radius: 50%;align-items: center;justify-content: center;} + +.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask .tinymce-mobile-content-container .tinymce-mobile-content-tap-section .tinymce-mobile-mask-tap-icon::before{font-family: tinymce-mobile,sans-serif;content: "\e900";} + +.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask .tinymce-mobile-content-container .tinymce-mobile-content-tap-section:not(.tinymce-mobile-mask-tap-icon-selected) .tinymce-mobile-mask-tap-icon{z-index: 2;} + +.tinymce-mobile-android-container.tinymce-mobile-android-maximized{position: fixed;top: 0;right: 0;bottom: 0;left: 0;display: flex;background: #fff;border: none;flex-direction: column;} + +.tinymce-mobile-android-container:not(.tinymce-mobile-android-maximized){position: relative;} + +.tinymce-mobile-android-container .tinymce-mobile-editor-socket{display: flex;flex-grow: 1;} + +.tinymce-mobile-android-container .tinymce-mobile-editor-socket iframe{display: flex !important;flex-grow: 1;height: auto !important;} + +.tinymce-mobile-android-scroll-reload{overflow: hidden;} + +:not(.tinymce-mobile-readonly-mode)>.tinymce-mobile-android-selection-context-toolbar{margin-top: 23px;} + +.tinymce-mobile-toolstrip{z-index: 1;display: flex;background: #fff;flex: 0 0 auto;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar{display: flex;width: 100%;height: 2.5em;background-color: #fff;border-bottom: 1px solid #ccc;align-items: center;flex: 1;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group{align-items: center;display: flex;height: 100%;flex-shrink: 1;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group>div{align-items: center;display: flex;height: 100%;flex: 1;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group.tinymce-mobile-exit-container{background: #f44336;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group.tinymce-mobile-toolbar-scrollable-group{flex-grow: 1;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group .tinymce-mobile-toolbar-group-item{padding-right: .5em;padding-left: .5em;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group .tinymce-mobile-toolbar-group-item.tinymce-mobile-toolbar-button{display: flex;height: 80%;margin-right: 2px;margin-left: 2px;align-items: center;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group .tinymce-mobile-toolbar-group-item.tinymce-mobile-toolbar-button.tinymce-mobile-toolbar-button-selected{color: #ccc;background: #c8cbcf;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group:first-of-type,.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group:last-of-type{color: #eceff1;background: #207ab7;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group{display: flex;height: 100%;padding-top: .4em;padding-bottom: .4em;align-items: center;flex: 1;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog{position: relative;display: flex;width: 100%;min-height: 1.5em;padding-right: 0;padding-left: 0;overflow: hidden;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain{display: flex;width: 100%;height: 100%;transition: left cubic-bezier(.4,0,1,1) .15s;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen{display: flex;flex: 0 0 auto;justify-content: space-between;width: 100%;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen input{font-family: sans-serif;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-input-container{position: relative;display: flex;flex-grow: 1;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-input-container .tinymce-mobile-input-container-x{position: absolute;right: 0;height: 100%;padding-right: 2px;font-size: .6em;font-weight: 700;color: #888;background: inherit;border: none;border-radius: 50%;align-self: center;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-input-container.tinymce-mobile-input-container-empty .tinymce-mobile-input-container-x{display: none;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-icon-next,.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-icon-previous{align-items: center;display: flex;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-icon-next::before,.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-icon-previous::before{display: flex;height: 100%;padding-right: .5em;padding-left: .5em;font-weight: 700;align-items: center;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-icon-next.tinymce-mobile-toolbar-navigation-disabled::before,.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-icon-previous.tinymce-mobile-toolbar-navigation-disabled::before{visibility: hidden;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-dot-item{padding-top: 3px;margin: 0 2px;font-size: 10px;line-height: 10px;color: #ccc;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-dot-item.tinymce-mobile-dot-active{color: #c8cbcf;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-icon-large-font::before,.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-icon-large-heading::before{margin-right: .9em;margin-left: .5em;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-icon-small-font::before,.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-icon-small-heading::before{margin-right: .5em;margin-left: .9em;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider{position: relative;display: flex;padding: .28em 0;margin-right: 0;margin-left: 0;flex: 1;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider .tinymce-mobile-slider-size-container{align-items: center;display: flex;flex-grow: 1;height: 100%;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider .tinymce-mobile-slider-size-container .tinymce-mobile-slider-size-line{display: flex;height: .2em;margin-top: .3em;margin-bottom: .3em;background: #ccc;flex: 1;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider.tinymce-mobile-hue-slider-container{padding-right: 2em;padding-left: 2em;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider.tinymce-mobile-hue-slider-container .tinymce-mobile-slider-gradient-container{align-items: center;display: flex;flex-grow: 1;height: 100%;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider.tinymce-mobile-hue-slider-container .tinymce-mobile-slider-gradient-container .tinymce-mobile-slider-gradient{display: flex;height: .2em;margin-top: .3em;margin-bottom: .3em;background: linear-gradient(to right,red 0,#feff00 17%,#0f0 33%,#00feff 50%,#00f 67%,#ff00fe 83%,red 100%);flex: 1;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider.tinymce-mobile-hue-slider-container .tinymce-mobile-hue-slider-black{width: 1.2em;height: .2em;margin-top: .3em;margin-bottom: .3em;background: #000;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider.tinymce-mobile-hue-slider-container .tinymce-mobile-hue-slider-white{width: 1.2em;height: .2em;margin-top: .3em;margin-bottom: .3em;background: #fff;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider .tinymce-mobile-slider-thumb{position: absolute;top: 0;bottom: 0;left: -10px;display: flex;width: .5em;height: .5em;margin: auto;color: #fff;background-color: #455a64;border: .5em solid rgba(136,136,136,0);border-radius: 3em;transition: border 120ms cubic-bezier(.39,.58,.57,1);background-clip: padding-box;align-items: center;justify-content: center;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider .tinymce-mobile-slider-thumb.tinymce-mobile-thumb-active{border: .5em solid rgba(136,136,136,.39);} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serializer-wrapper,.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group>div{align-items: center;display: flex;height: 100%;flex: 1;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serializer-wrapper{flex-direction: column;justify-content: center;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-toolbar-group-item{align-items: center;display: flex;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-toolbar-group-item:not(.tinymce-mobile-serialised-dialog){height: 100%;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-dot-container{display: flex;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group input{padding-top: .1em;padding-bottom: .1em;padding-left: 5px;font-size: .85em;color: #455a64;background: #fff;border: none;border-radius: 0;flex-grow: 1;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group input::-webkit-input-placeholder{color: #888;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group input::placeholder{color: #888;} + +.tinymce-mobile-dropup{display: flex;width: 100%;overflow: hidden;background: #fff;} + +.tinymce-mobile-dropup.tinymce-mobile-dropup-shrinking{transition: height .3s ease-out;} + +.tinymce-mobile-dropup.tinymce-mobile-dropup-growing{transition: height .3s ease-in;} + +.tinymce-mobile-dropup.tinymce-mobile-dropup-closed{flex-grow: 0;} + +.tinymce-mobile-dropup.tinymce-mobile-dropup-open:not(.tinymce-mobile-dropup-growing){flex-grow: 1;} + +.tinymce-mobile-ios-container .tinymce-mobile-dropup:not(.tinymce-mobile-dropup-closed){min-height: 200px;}@media only screen and (orientation: landscape){.tinymce-mobile-dropup:not(.tinymce-mobile-dropup-closed){min-height: 200px;}}@media only screen and (min-device-width: 320px) and (max-device-width: 568px) and (orientation: landscape){.tinymce-mobile-ios-container .tinymce-mobile-dropup:not(.tinymce-mobile-dropup-closed){min-height: 150px;}} + +.tinymce-mobile-styles-menu{position: relative;width: 100%;overflow: hidden;font-family: sans-serif;outline: 4px solid #000;} + +.tinymce-mobile-styles-menu [role=menu]{position: absolute;display: flex;width: 100%;height: 100%;flex-direction: column;} + +.tinymce-mobile-styles-menu [role=menu].transitioning{transition: transform .5s ease-in-out;} + +.tinymce-mobile-styles-menu .tinymce-mobile-styles-item{position: relative;display: flex;padding: 1em 1em;color: #455a64;cursor: pointer;border-bottom: 1px solid #ddd;} + +.tinymce-mobile-styles-menu .tinymce-mobile-styles-collapser .tinymce-mobile-styles-collapse-icon::before{font-family: tinymce-mobile,sans-serif;color: #455a64;content: "\e314";} + +.tinymce-mobile-styles-menu .tinymce-mobile-styles-item.tinymce-mobile-styles-item-is-menu::after{position: absolute;right: 0;padding-right: 1em;padding-left: 1em;font-family: tinymce-mobile,sans-serif;color: #455a64;content: "\e315";} + +.tinymce-mobile-styles-menu .tinymce-mobile-styles-item.tinymce-mobile-format-matches::after{position: absolute;right: 0;padding-right: 1em;padding-left: 1em;font-family: tinymce-mobile,sans-serif;} + +.tinymce-mobile-styles-menu .tinymce-mobile-styles-collapser,.tinymce-mobile-styles-menu .tinymce-mobile-styles-separator{display: flex;min-height: 2.5em;padding-right: 1em;padding-left: 1em;color: #455a64;background: #fff;border-top: #455a64;align-items: center;} + +.tinymce-mobile-styles-menu [data-transitioning-destination=before][data-transitioning-state],.tinymce-mobile-styles-menu [data-transitioning-state=before]{transform: translate(-100%);} + +.tinymce-mobile-styles-menu [data-transitioning-destination=current][data-transitioning-state],.tinymce-mobile-styles-menu [data-transitioning-state=current]{transform: translate(0);} + +.tinymce-mobile-styles-menu [data-transitioning-destination=after][data-transitioning-state],.tinymce-mobile-styles-menu [data-transitioning-state=after]{transform: translate(100%);}@font-face{font-family: tinymce-mobile;font-style: normal;font-weight: 400;src: url(fonts/tinymce-mobile.woff?8x92w3) format('woff');}@media (min-device-width: 700px){.tinymce-mobile-outer-container,.tinymce-mobile-outer-container input{font-size: 25px;}}@media (max-device-width: 700px){.tinymce-mobile-outer-container,.tinymce-mobile-outer-container input{font-size: 18px;}} + +.tinymce-mobile-icon{font-family: tinymce-mobile,sans-serif;} + +.mixin-flex-and-centre{align-items: center;display: flex;justify-content: center;} + +.mixin-flex-bar{align-items: center;display: flex;height: 100%;} + +.tinymce-mobile-outer-container .tinymce-mobile-editor-socket iframe{width: 100%;background-color: #fff;} + +.tinymce-mobile-editor-socket .tinymce-mobile-mask-edit-icon{position: fixed;right: 2em;bottom: 1em;display: flex;width: 2.1em;height: 2.1em;font-size: 1em;color: #fff;background-color: #207ab7;border-radius: 50%;align-items: center;justify-content: center;}@media only screen and (min-device-width: 700px){.tinymce-mobile-editor-socket .tinymce-mobile-mask-edit-icon{font-size: 1.2em;}} + +.tinymce-mobile-outer-container:not(.tinymce-mobile-fullscreen-maximized) .tinymce-mobile-editor-socket{height: 300px;overflow: hidden;} + +.tinymce-mobile-outer-container:not(.tinymce-mobile-fullscreen-maximized) .tinymce-mobile-editor-socket iframe{height: 100%;} + +.tinymce-mobile-outer-container:not(.tinymce-mobile-fullscreen-maximized) .tinymce-mobile-toolstrip{display: none;} + +input[type=file]::-webkit-file-upload-button{display: none;}@media only screen and (min-device-width: 320px) and (max-device-width: 568px) and (orientation: landscape){.tinymce-mobile-ios-container .tinymce-mobile-editor-socket .tinymce-mobile-mask-edit-icon{bottom: 50%;}} diff --git a/public/resource/tinymce/skins/ui/oxide/content.inline.min.css b/public/resource/tinymce/skins/ui/oxide/content.inline.min.css new file mode 100644 index 0000000..748f313 --- /dev/null +++ b/public/resource/tinymce/skins/ui/oxide/content.inline.min.css @@ -0,0 +1,239 @@ +/** + * Copyright (c) Tiny Technologies, Inc. All rights reserved. + * Licensed under the LGPL or a commercial license. + * For LGPL see License.txt in the project root for license information. + * For commercial licenses see https://www.tiny.cloud/ + */ +.mce-content-body .mce-item-anchor{display: inline-block;width: 8px !important;height: 12px !important;padding: 0 2px;cursor: default;background: transparent url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'8'%20height%3D'12'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'M0%200L8%200%208%2012%204.09117821%209%200%2012z'%2F%3E%3C%2Fsvg%3E%0A") no-repeat center;-webkit-user-select: all;-moz-user-select: all;-ms-user-select: all;user-select: all;-webkit-user-modify: read-only;-moz-user-modify: read-only;} + +.mce-content-body .mce-item-anchor[data-mce-selected]{outline-offset: 1px;} + +.tox-comments-visible .tox-comment{background-color: #fff0b7;} + +.tox-comments-visible .tox-comment--active{background-color: #ffe168;} + +.tox-checklist>li:not(.tox-checklist--hidden){margin: .25em 0;list-style: none;} + +.tox-checklist>li:not(.tox-checklist--hidden)::before{position: absolute;width: 1em;height: 1em;margin-top: .125em;margin-left: -1.5em;cursor: pointer;background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cg%20id%3D%22checklist-unchecked%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Crect%20id%3D%22Rectangle%22%20width%3D%2215%22%20height%3D%2215%22%20x%3D%22.5%22%20y%3D%22.5%22%20fill-rule%3D%22nonzero%22%20stroke%3D%22%234C4C4C%22%20rx%3D%222%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E%0A");background-size: 100%;content: '';} + +.tox-checklist li:not(.tox-checklist--hidden).tox-checklist--checked::before{background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cg%20id%3D%22checklist-checked%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Crect%20id%3D%22Rectangle%22%20width%3D%2216%22%20height%3D%2216%22%20fill%3D%22%234099FF%22%20fill-rule%3D%22nonzero%22%20rx%3D%222%22%2F%3E%3Cpath%20id%3D%22Path%22%20fill%3D%22%23FFF%22%20fill-rule%3D%22nonzero%22%20d%3D%22M11.5703186%2C3.14417309%20C11.8516238%2C2.73724603%2012.4164781%2C2.62829933%2012.83558%2C2.89774797%20C13.260121%2C3.17069355%2013.3759736%2C3.72932262%2013.0909105%2C4.14168582%20L7.7580587%2C11.8560195%20C7.43776896%2C12.3193404%206.76483983%2C12.3852142%206.35607322%2C11.9948725%20L3.02491697%2C8.8138662%20C2.66090143%2C8.46625845%202.65798871%2C7.89594698%203.01850234%2C7.54483354%20C3.373942%2C7.19866177%203.94940006%2C7.19592841%204.30829608%2C7.5386474%20L6.85276923%2C9.9684299%20L11.5703186%2C3.14417309%20Z%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E%0A");} + +[dir=rtl] .tox-checklist>li:not(.tox-checklist--hidden)::before{margin-right: -1.5em;margin-left: 0;} + +code[class*=language-],pre[class*=language-]{font-family: Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size: .875rem;-webkit-hyphens: none;-ms-hyphens: none;hyphens: none;line-height: 1.5;word-spacing: normal;color: #000;text-shadow: 0 1px #fff;word-break: normal;word-wrap: normal;white-space: pre;-moz-tab-size: 4;tab-size: 4;} + +code[class*=language-] ::-moz-selection,code[class*=language-]::-moz-selection,pre[class*=language-] ::-moz-selection,pre[class*=language-]::-moz-selection{text-shadow: none;background: #b3d4fc;} + +code[class*=language-] ::selection,code[class*=language-]::selection,pre[class*=language-] ::selection,pre[class*=language-]::selection{text-shadow: none;background: #b3d4fc;}@media print{code[class*=language-],pre[class*=language-]{text-shadow: none;}} + +pre[class*=language-]{padding: 1em;margin: .5em 0;overflow: auto;} + +:not(pre)>code[class*=language-],pre[class*=language-]{background: 0 0 !important;border: 1px solid #ccc;} + +:not(pre)>code[class*=language-]{padding: .1em;border-radius: .3em;} + +.token.cdata,.token.comment,.token.doctype,.token.prolog{color: #708090;} + +.token.punctuation{color: #999;} + +.namespace{opacity: .7;} + +.token.boolean,.token.constant,.token.deleted,.token.number,.token.property,.token.symbol,.token.tag{color: #905;} + +.token.attr-name,.token.builtin,.token.char,.token.inserted,.token.selector,.token.string{color: #690;} + +.language-css .token.string,.style .token.string,.token.entity,.token.operator,.token.url{color: #a67f59;background: hsla(0,0%,100%,.5);} + +.token.atrule,.token.attr-value,.token.keyword{color: #07a;} + +.token.function{color: #dd4a68;} + +.token.important,.token.regex,.token.variable{color: #e90;} + +.token.bold,.token.important{font-weight: 700;} + +.token.italic{font-style: italic;} + +.token.entity{cursor: help;} + +:not([dir=rtl]) code[class*=language-],:not([dir=rtl]) pre[class*=language-]{text-align: left;direction: ltr;} + +[dir=rtl] code[class*=language-],[dir=rtl] pre[class*=language-]{text-align: right;direction: rtl;} + +.mce-content-body{overflow-wrap: break-word;word-wrap: break-word;} + +.mce-content-body .mce-visual-caret{position: absolute;background-color: #000;background-color: currentColor;} + +.mce-content-body .mce-visual-caret-hidden{display: none;} + +.mce-content-body [data-mce-caret]{position: absolute;top: 0;right: auto;left: -1000px;padding: 0;margin: 0;} + +.mce-content-body .mce-offscreen-selection{position: absolute;left: -9999999999px;max-width: 1000000px;} + +.mce-content-body [contentEditable=false]{cursor: default;} + +.mce-content-body [contentEditable=true]{cursor: text;} + +.tox-cursor-format-painter{cursor: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%0A%20%20%3Cg%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M15%2C6%20C15%2C5.45%2014.55%2C5%2014%2C5%20L6%2C5%20C5.45%2C5%205%2C5.45%205%2C6%20L5%2C10%20C5%2C10.55%205.45%2C11%206%2C11%20L14%2C11%20C14.55%2C11%2015%2C10.55%2015%2C10%20L15%2C9%20L16%2C9%20L16%2C12%20L9%2C12%20L9%2C19%20C9%2C19.55%209.45%2C20%2010%2C20%20L11%2C20%20C11.55%2C20%2012%2C19.55%2012%2C19%20L12%2C14%20L18%2C14%20L18%2C7%20L15%2C7%20L15%2C6%20Z%22%2F%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M1%2C1%20L8.25%2C1%20C8.66421356%2C1%209%2C1.33578644%209%2C1.75%20L9%2C1.75%20C9%2C2.16421356%208.66421356%2C2.5%208.25%2C2.5%20L2.5%2C2.5%20L2.5%2C8.25%20C2.5%2C8.66421356%202.16421356%2C9%201.75%2C9%20L1.75%2C9%20C1.33578644%2C9%201%2C8.66421356%201%2C8.25%20L1%2C1%20Z%22%2F%3E%0A%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A"),default;} + +.mce-content-body figure.align-left{float: left;} + +.mce-content-body figure.align-right{float: right;} + +.mce-content-body figure.image.align-center{display: table;margin-right: auto;margin-left: auto;} + +.mce-preview-object{position: relative;display: inline-block;margin: 0 2px 0 2px;line-height: 0;border: 1px solid gray;} + +.mce-preview-object .mce-shim{position: absolute;top: 0;left: 0;width: 100%;height: 100%;background: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7);} + +.mce-preview-object[data-mce-selected="2"] .mce-shim{display: none;} + +.mce-object{background: transparent url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M4%203h16a1%201%200%200%201%201%201v16a1%201%200%200%201-1%201H4a1%201%200%200%201-1-1V4a1%201%200%200%201%201-1zm1%202v14h14V5H5zm4.79%202.565l5.64%204.028a.5.5%200%200%201%200%20.814l-5.64%204.028a.5.5%200%200%201-.79-.407V7.972a.5.5%200%200%201%20.79-.407z%22%2F%3E%3C%2Fsvg%3E%0A") no-repeat center;border: 1px dashed #aaa;} + +.mce-pagebreak{display: block;width: 100%;height: 5px;margin-top: 15px;cursor: default;border: 1px dashed #aaa;page-break-before: always;}@media print{.mce-pagebreak{border: 0;}} + +.tiny-pageembed .mce-shim{position: absolute;top: 0;left: 0;width: 100%;height: 100%;background: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7);} + +.tiny-pageembed[data-mce-selected="2"] .mce-shim{display: none;} + +.tiny-pageembed{position: relative;display: inline-block;} + +.tiny-pageembed--16by9,.tiny-pageembed--1by1,.tiny-pageembed--21by9,.tiny-pageembed--4by3{position: relative;display: block;width: 100%;padding: 0;overflow: hidden;} + +.tiny-pageembed--16by9::before,.tiny-pageembed--1by1::before,.tiny-pageembed--21by9::before,.tiny-pageembed--4by3::before{display: block;content: "";} + +.tiny-pageembed--21by9::before{padding-top: 42.857143%;} + +.tiny-pageembed--16by9::before{padding-top: 56.25%;} + +.tiny-pageembed--4by3::before{padding-top: 75%;} + +.tiny-pageembed--1by1::before{padding-top: 100%;} + +.tiny-pageembed--16by9 iframe,.tiny-pageembed--1by1 iframe,.tiny-pageembed--21by9 iframe,.tiny-pageembed--4by3 iframe{position: absolute;top: 0;left: 0;width: 100%;height: 100%;border: 0;} + +.mce-content-body div.mce-resizehandle{position: absolute;z-index: 10000;width: 10px;height: 10px;background-color: #4099ff;border-color: #4099ff;border-style: solid;border-width: 1px;box-sizing: border-box;} + +.mce-content-body div.mce-resizehandle:hover{background-color: #4099ff;} + +.mce-content-body div.mce-resizehandle:nth-of-type(1){cursor: nwse-resize;} + +.mce-content-body div.mce-resizehandle:nth-of-type(2){cursor: nesw-resize;} + +.mce-content-body div.mce-resizehandle:nth-of-type(3){cursor: nwse-resize;} + +.mce-content-body div.mce-resizehandle:nth-of-type(4){cursor: nesw-resize;} + +.mce-content-body .mce-clonedresizable{position: absolute;z-index: 10000;outline: 1px dashed #000;opacity: .5;} + +.mce-content-body .mce-resize-helper{position: absolute;z-index: 10001;display: none;padding: 5px;margin: 5px 10px;font-family: sans-serif;font-size: 12px;line-height: 14px;color: #fff;white-space: nowrap;background: #555;background: rgba(0,0,0,.75);border: 1px;border-radius: 3px;} + +.mce-match-marker{color: #fff;background: #aaa;} + +.mce-match-marker-selected{color: #fff;background: #39f;} + +.mce-content-body img[data-mce-selected],.mce-content-body table[data-mce-selected]{outline: 3px solid #b4d7ff;} + +.mce-content-body hr[data-mce-selected]{outline: 3px solid #b4d7ff;outline-offset: 1px;} + +.mce-content-body [contentEditable=false] [contentEditable=true]:focus{outline: 3px solid #b4d7ff;} + +.mce-content-body [contentEditable=false] [contentEditable=true]:hover{outline: 3px solid #b4d7ff;} + +.mce-content-body [contentEditable=false][data-mce-selected]{cursor: not-allowed;outline: 3px solid #b4d7ff;} + +.mce-content-body.mce-content-readonly [contentEditable=true]:focus,.mce-content-body.mce-content-readonly [contentEditable=true]:hover{outline: 0;} + +.mce-content-body [data-mce-selected=inline-boundary]{background-color: #b4d7ff;} + +.mce-content-body .mce-edit-focus{outline: 3px solid #b4d7ff;} + +.mce-content-body td[data-mce-selected],.mce-content-body th[data-mce-selected]{background-color: #b4d7ff !important;} + +.mce-content-body td[data-mce-selected]::-moz-selection,.mce-content-body th[data-mce-selected]::-moz-selection{background: 0 0;} + +.mce-content-body td[data-mce-selected]::selection,.mce-content-body th[data-mce-selected]::selection{background: 0 0;} + +.mce-content-body td[data-mce-selected] *,.mce-content-body th[data-mce-selected] *{-webkit-touch-callout: none;-webkit-user-select: none;-moz-user-select: none;-ms-user-select: none;user-select: none;} + +.mce-content-body img::-moz-selection{background: 0 0;} + +.mce-content-body img::selection{background: 0 0;} + +.ephox-snooker-resizer-bar{background-color: #b4d7ff;opacity: 0;} + +.ephox-snooker-resizer-cols{cursor: col-resize;} + +.ephox-snooker-resizer-rows{cursor: row-resize;} + +.ephox-snooker-resizer-bar.ephox-snooker-resizer-bar-dragging{opacity: 1;} + +.mce-spellchecker-word{height: 2rem;cursor: default;background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'4'%20height%3D'4'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20stroke%3D'%23ff0000'%20fill%3D'none'%20stroke-linecap%3D'round'%20stroke-opacity%3D'.5'%20d%3D'M0%203L2%201%204%203'%2F%3E%3C%2Fsvg%3E%0A");background-position: 0 calc(100% + 1px);background-repeat: repeat-x;background-size: auto 6px;} + +.mce-spellchecker-grammar{cursor: default;background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'4'%20height%3D'4'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20stroke%3D'%23008800'%20fill%3D'none'%20stroke-linecap%3D'round'%20d%3D'M0%203L2%201%204%203'%2F%3E%3C%2Fsvg%3E%0A");background-position: 0 calc(100% + 1px);background-repeat: repeat-x;background-size: auto 6px;} + +.mce-toc{border: 1px solid gray;} + +.mce-toc h2{margin: 4px;} + +.mce-toc li{list-style-type: none;} + +.mce-item-table,.mce-item-table caption,.mce-item-table td,.mce-item-table th{border: 1px dashed #bbb;} + +.mce-visualblocks address,.mce-visualblocks article,.mce-visualblocks aside,.mce-visualblocks blockquote,.mce-visualblocks div:not([data-mce-bogus]),.mce-visualblocks dl,.mce-visualblocks figcaption,.mce-visualblocks figure,.mce-visualblocks h1,.mce-visualblocks h2,.mce-visualblocks h3,.mce-visualblocks h4,.mce-visualblocks h5,.mce-visualblocks h6,.mce-visualblocks hgroup,.mce-visualblocks ol,.mce-visualblocks p,.mce-visualblocks pre,.mce-visualblocks section,.mce-visualblocks ul{padding-top: 10px;margin-left: 3px;background-repeat: no-repeat;border: 1px dashed #bbb;} + +.mce-visualblocks p{background-image: url(data:image/gif;base64,R0lGODlhCQAJAJEAAAAAAP///7u7u////yH5BAEAAAMALAAAAAAJAAkAAAIQnG+CqCN/mlyvsRUpThG6AgA7);} + +.mce-visualblocks h1{background-image: url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGu1JuxHoAfRNRW3TWXyF2YiRUAOw==);} + +.mce-visualblocks h2{background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8Hybbx4oOuqgTynJd6bGlWg3DkJzoaUAAAOw==);} + +.mce-visualblocks h3{background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIZjI8Hybbx4oOuqgTynJf2Ln2NOHpQpmhAAQA7);} + +.mce-visualblocks h4{background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxInR0zqeAdhtJlXwV1oCll2HaWgAAOw==);} + +.mce-visualblocks h5{background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjane4iq5GlW05GgIkIZUAAAOw==);} + +.mce-visualblocks h6{background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjan04jep1iZ1XRlAo5bVgAAOw==);} + +.mce-visualblocks div:not([data-mce-bogus]){background-image: url(data:image/gif;base64,R0lGODlhEgAKAIABALu7u////yH5BAEAAAEALAAAAAASAAoAAAIfjI9poI0cgDywrhuxfbrzDEbQM2Ei5aRjmoySW4pAAQA7);} + +.mce-visualblocks section{background-image: url(data:image/gif;base64,R0lGODlhKAAKAIABALu7u////yH5BAEAAAEALAAAAAAoAAoAAAI5jI+pywcNY3sBWHdNrplytD2ellDeSVbp+GmWqaDqDMepc8t17Y4vBsK5hDyJMcI6KkuYU+jpjLoKADs=);} + +.mce-visualblocks article{background-image: url(data:image/gif;base64,R0lGODlhKgAKAIABALu7u////yH5BAEAAAEALAAAAAAqAAoAAAI6jI+pywkNY3wG0GBvrsd2tXGYSGnfiF7ikpXemTpOiJScasYoDJJrjsG9gkCJ0ag6KhmaIe3pjDYBBQA7);} + +.mce-visualblocks blockquote{background-image: url(data:image/gif;base64,R0lGODlhPgAKAIABALu7u////yH5BAEAAAEALAAAAAA+AAoAAAJPjI+py+0Knpz0xQDyuUhvfoGgIX5iSKZYgq5uNL5q69asZ8s5rrf0yZmpNkJZzFesBTu8TOlDVAabUyatguVhWduud3EyiUk45xhTTgMBBQA7);} + +.mce-visualblocks address{background-image: url(data:image/gif;base64,R0lGODlhLQAKAIABALu7u////yH5BAEAAAEALAAAAAAtAAoAAAI/jI+pywwNozSP1gDyyZcjb3UaRpXkWaXmZW4OqKLhBmLs+K263DkJK7OJeifh7FicKD9A1/IpGdKkyFpNmCkAADs=);} + +.mce-visualblocks pre{background-image: url(data:image/gif;base64,R0lGODlhFQAKAIABALu7uwAAACH5BAEAAAEALAAAAAAVAAoAAAIjjI+ZoN0cgDwSmnpz1NCueYERhnibZVKLNnbOq8IvKpJtVQAAOw==);} + +.mce-visualblocks figure{background-image: url(data:image/gif;base64,R0lGODlhJAAKAIAAALu7u////yH5BAEAAAEALAAAAAAkAAoAAAI0jI+py+2fwAHUSFvD3RlvG4HIp4nX5JFSpnZUJ6LlrM52OE7uSWosBHScgkSZj7dDKnWAAgA7);} + +.mce-visualblocks figcaption{border: 1px dashed #bbb;} + +.mce-visualblocks hgroup{background-image: url(data:image/gif;base64,R0lGODlhJwAKAIABALu7uwAAACH5BAEAAAEALAAAAAAnAAoAAAI3jI+pywYNI3uB0gpsRtt5fFnfNZaVSYJil4Wo03Hv6Z62uOCgiXH1kZIIJ8NiIxRrAZNMZAtQAAA7);} + +.mce-visualblocks aside{background-image: url(data:image/gif;base64,R0lGODlhHgAKAIABAKqqqv///yH5BAEAAAEALAAAAAAeAAoAAAItjI+pG8APjZOTzgtqy7I3f1yehmQcFY4WKZbqByutmW4aHUd6vfcVbgudgpYCADs=);} + +.mce-visualblocks ul{background-image: url(data:image/gif;base64,R0lGODlhDQAKAIAAALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGuYnqUVSjvw26DzzXiqIDlVwAAOw==);} + +.mce-visualblocks ol{background-image: url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybH6HHt0qourxC6CvzXieHyeWQAAOw==);} + +.mce-visualblocks dl{background-image: url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybEOnmOvUoWznTqeuEjNSCqeGRUAOw==);} + +.mce-visualblocks:not([dir=rtl]) address,.mce-visualblocks:not([dir=rtl]) article,.mce-visualblocks:not([dir=rtl]) aside,.mce-visualblocks:not([dir=rtl]) blockquote,.mce-visualblocks:not([dir=rtl]) div:not([data-mce-bogus]),.mce-visualblocks:not([dir=rtl]) dl,.mce-visualblocks:not([dir=rtl]) figcaption,.mce-visualblocks:not([dir=rtl]) figure,.mce-visualblocks:not([dir=rtl]) h1,.mce-visualblocks:not([dir=rtl]) h2,.mce-visualblocks:not([dir=rtl]) h3,.mce-visualblocks:not([dir=rtl]) h4,.mce-visualblocks:not([dir=rtl]) h5,.mce-visualblocks:not([dir=rtl]) h6,.mce-visualblocks:not([dir=rtl]) hgroup,.mce-visualblocks:not([dir=rtl]) ol,.mce-visualblocks:not([dir=rtl]) p,.mce-visualblocks:not([dir=rtl]) pre,.mce-visualblocks:not([dir=rtl]) section,.mce-visualblocks:not([dir=rtl]) ul{margin-left: 3px;} + +.mce-visualblocks[dir=rtl] address,.mce-visualblocks[dir=rtl] article,.mce-visualblocks[dir=rtl] aside,.mce-visualblocks[dir=rtl] blockquote,.mce-visualblocks[dir=rtl] div:not([data-mce-bogus]),.mce-visualblocks[dir=rtl] dl,.mce-visualblocks[dir=rtl] figcaption,.mce-visualblocks[dir=rtl] figure,.mce-visualblocks[dir=rtl] h1,.mce-visualblocks[dir=rtl] h2,.mce-visualblocks[dir=rtl] h3,.mce-visualblocks[dir=rtl] h4,.mce-visualblocks[dir=rtl] h5,.mce-visualblocks[dir=rtl] h6,.mce-visualblocks[dir=rtl] hgroup,.mce-visualblocks[dir=rtl] ol,.mce-visualblocks[dir=rtl] p,.mce-visualblocks[dir=rtl] pre,.mce-visualblocks[dir=rtl] section,.mce-visualblocks[dir=rtl] ul{background-position-x: right;margin-right: 3px;} + +.mce-nbsp,.mce-shy{background: #aaa;} + +.mce-shy::after{content: '-';} + +.tox-toolbar-dock-fadeout{opacity: 0;visibility: hidden;} + +.tox-toolbar-dock-fadein{opacity: 1;visibility: visible;} + +.tox-toolbar-dock-transition{transition: visibility 0s linear .3s,opacity .3s ease;} + +.tox-toolbar-dock-transition.tox-toolbar-dock-fadein{transition-delay: 0s;} diff --git a/public/resource/tinymce/skins/ui/oxide/content.min.css b/public/resource/tinymce/skins/ui/oxide/content.min.css new file mode 100644 index 0000000..6e7165f --- /dev/null +++ b/public/resource/tinymce/skins/ui/oxide/content.min.css @@ -0,0 +1,235 @@ +/** + * Copyright (c) Tiny Technologies, Inc. All rights reserved. + * Licensed under the LGPL or a commercial license. + * For LGPL see License.txt in the project root for license information. + * For commercial licenses see https://www.tiny.cloud/ + */ +.mce-content-body .mce-item-anchor{display: inline-block;width: 8px !important;height: 12px !important;padding: 0 2px;cursor: default;background: transparent url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'8'%20height%3D'12'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'M0%200L8%200%208%2012%204.09117821%209%200%2012z'%2F%3E%3C%2Fsvg%3E%0A") no-repeat center;-webkit-user-select: all;-moz-user-select: all;-ms-user-select: all;user-select: all;-webkit-user-modify: read-only;-moz-user-modify: read-only;} + +.mce-content-body .mce-item-anchor[data-mce-selected]{outline-offset: 1px;} + +.tox-comments-visible .tox-comment{background-color: #fff0b7;} + +.tox-comments-visible .tox-comment--active{background-color: #ffe168;} + +.tox-checklist>li:not(.tox-checklist--hidden){margin: .25em 0;list-style: none;} + +.tox-checklist>li:not(.tox-checklist--hidden)::before{position: absolute;width: 1em;height: 1em;margin-top: .125em;margin-left: -1.5em;cursor: pointer;background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cg%20id%3D%22checklist-unchecked%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Crect%20id%3D%22Rectangle%22%20width%3D%2215%22%20height%3D%2215%22%20x%3D%22.5%22%20y%3D%22.5%22%20fill-rule%3D%22nonzero%22%20stroke%3D%22%234C4C4C%22%20rx%3D%222%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E%0A");background-size: 100%;content: '';} + +.tox-checklist li:not(.tox-checklist--hidden).tox-checklist--checked::before{background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cg%20id%3D%22checklist-checked%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Crect%20id%3D%22Rectangle%22%20width%3D%2216%22%20height%3D%2216%22%20fill%3D%22%234099FF%22%20fill-rule%3D%22nonzero%22%20rx%3D%222%22%2F%3E%3Cpath%20id%3D%22Path%22%20fill%3D%22%23FFF%22%20fill-rule%3D%22nonzero%22%20d%3D%22M11.5703186%2C3.14417309%20C11.8516238%2C2.73724603%2012.4164781%2C2.62829933%2012.83558%2C2.89774797%20C13.260121%2C3.17069355%2013.3759736%2C3.72932262%2013.0909105%2C4.14168582%20L7.7580587%2C11.8560195%20C7.43776896%2C12.3193404%206.76483983%2C12.3852142%206.35607322%2C11.9948725%20L3.02491697%2C8.8138662%20C2.66090143%2C8.46625845%202.65798871%2C7.89594698%203.01850234%2C7.54483354%20C3.373942%2C7.19866177%203.94940006%2C7.19592841%204.30829608%2C7.5386474%20L6.85276923%2C9.9684299%20L11.5703186%2C3.14417309%20Z%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E%0A");} + +[dir=rtl] .tox-checklist>li:not(.tox-checklist--hidden)::before{margin-right: -1.5em;margin-left: 0;} + +code[class*=language-],pre[class*=language-]{font-family: Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size: .875rem;-webkit-hyphens: none;-ms-hyphens: none;hyphens: none;line-height: 1.5;word-spacing: normal;color: #000;text-shadow: 0 1px #fff;word-break: normal;word-wrap: normal;white-space: pre;-moz-tab-size: 4;tab-size: 4;} + +code[class*=language-] ::-moz-selection,code[class*=language-]::-moz-selection,pre[class*=language-] ::-moz-selection,pre[class*=language-]::-moz-selection{text-shadow: none;background: #b3d4fc;} + +code[class*=language-] ::selection,code[class*=language-]::selection,pre[class*=language-] ::selection,pre[class*=language-]::selection{text-shadow: none;background: #b3d4fc;}@media print{code[class*=language-],pre[class*=language-]{text-shadow: none;}} + +pre[class*=language-]{padding: 1em;margin: .5em 0;overflow: auto;} + +:not(pre)>code[class*=language-],pre[class*=language-]{background: 0 0 !important;border: 1px solid #ccc;} + +:not(pre)>code[class*=language-]{padding: .1em;border-radius: .3em;} + +.token.cdata,.token.comment,.token.doctype,.token.prolog{color: #708090;} + +.token.punctuation{color: #999;} + +.namespace{opacity: .7;} + +.token.boolean,.token.constant,.token.deleted,.token.number,.token.property,.token.symbol,.token.tag{color: #905;} + +.token.attr-name,.token.builtin,.token.char,.token.inserted,.token.selector,.token.string{color: #690;} + +.language-css .token.string,.style .token.string,.token.entity,.token.operator,.token.url{color: #a67f59;background: hsla(0,0%,100%,.5);} + +.token.atrule,.token.attr-value,.token.keyword{color: #07a;} + +.token.function{color: #dd4a68;} + +.token.important,.token.regex,.token.variable{color: #e90;} + +.token.bold,.token.important{font-weight: 700;} + +.token.italic{font-style: italic;} + +.token.entity{cursor: help;} + +:not([dir=rtl]) code[class*=language-],:not([dir=rtl]) pre[class*=language-]{text-align: left;direction: ltr;} + +[dir=rtl] code[class*=language-],[dir=rtl] pre[class*=language-]{text-align: right;direction: rtl;} + +.mce-content-body{overflow-wrap: break-word;word-wrap: break-word;} + +.mce-content-body .mce-visual-caret{position: absolute;background-color: #000;background-color: currentColor;} + +.mce-content-body .mce-visual-caret-hidden{display: none;} + +.mce-content-body [data-mce-caret]{position: absolute;top: 0;right: auto;left: -1000px;padding: 0;margin: 0;} + +.mce-content-body .mce-offscreen-selection{position: absolute;left: -9999999999px;max-width: 1000000px;} + +.mce-content-body [contentEditable=false]{cursor: default;} + +.mce-content-body [contentEditable=true]{cursor: text;} + +.tox-cursor-format-painter{cursor: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%0A%20%20%3Cg%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M15%2C6%20C15%2C5.45%2014.55%2C5%2014%2C5%20L6%2C5%20C5.45%2C5%205%2C5.45%205%2C6%20L5%2C10%20C5%2C10.55%205.45%2C11%206%2C11%20L14%2C11%20C14.55%2C11%2015%2C10.55%2015%2C10%20L15%2C9%20L16%2C9%20L16%2C12%20L9%2C12%20L9%2C19%20C9%2C19.55%209.45%2C20%2010%2C20%20L11%2C20%20C11.55%2C20%2012%2C19.55%2012%2C19%20L12%2C14%20L18%2C14%20L18%2C7%20L15%2C7%20L15%2C6%20Z%22%2F%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M1%2C1%20L8.25%2C1%20C8.66421356%2C1%209%2C1.33578644%209%2C1.75%20L9%2C1.75%20C9%2C2.16421356%208.66421356%2C2.5%208.25%2C2.5%20L2.5%2C2.5%20L2.5%2C8.25%20C2.5%2C8.66421356%202.16421356%2C9%201.75%2C9%20L1.75%2C9%20C1.33578644%2C9%201%2C8.66421356%201%2C8.25%20L1%2C1%20Z%22%2F%3E%0A%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A"),default;} + +.mce-content-body figure.align-left{float: left;} + +.mce-content-body figure.align-right{float: right;} + +.mce-content-body figure.image.align-center{display: table;margin-right: auto;margin-left: auto;} + +.mce-preview-object{position: relative;display: inline-block;margin: 0 2px 0 2px;line-height: 0;border: 1px solid gray;} + +.mce-preview-object .mce-shim{position: absolute;top: 0;left: 0;width: 100%;height: 100%;background: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7);} + +.mce-preview-object[data-mce-selected="2"] .mce-shim{display: none;} + +.mce-object{background: transparent url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M4%203h16a1%201%200%200%201%201%201v16a1%201%200%200%201-1%201H4a1%201%200%200%201-1-1V4a1%201%200%200%201%201-1zm1%202v14h14V5H5zm4.79%202.565l5.64%204.028a.5.5%200%200%201%200%20.814l-5.64%204.028a.5.5%200%200%201-.79-.407V7.972a.5.5%200%200%201%20.79-.407z%22%2F%3E%3C%2Fsvg%3E%0A") no-repeat center;border: 1px dashed #aaa;} + +.mce-pagebreak{display: block;width: 100%;height: 5px;margin-top: 15px;cursor: default;border: 1px dashed #aaa;page-break-before: always;}@media print{.mce-pagebreak{border: 0;}} + +.tiny-pageembed .mce-shim{position: absolute;top: 0;left: 0;width: 100%;height: 100%;background: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7);} + +.tiny-pageembed[data-mce-selected="2"] .mce-shim{display: none;} + +.tiny-pageembed{position: relative;display: inline-block;} + +.tiny-pageembed--16by9,.tiny-pageembed--1by1,.tiny-pageembed--21by9,.tiny-pageembed--4by3{position: relative;display: block;width: 100%;padding: 0;overflow: hidden;} + +.tiny-pageembed--16by9::before,.tiny-pageembed--1by1::before,.tiny-pageembed--21by9::before,.tiny-pageembed--4by3::before{display: block;content: "";} + +.tiny-pageembed--21by9::before{padding-top: 42.857143%;} + +.tiny-pageembed--16by9::before{padding-top: 56.25%;} + +.tiny-pageembed--4by3::before{padding-top: 75%;} + +.tiny-pageembed--1by1::before{padding-top: 100%;} + +.tiny-pageembed--16by9 iframe,.tiny-pageembed--1by1 iframe,.tiny-pageembed--21by9 iframe,.tiny-pageembed--4by3 iframe{position: absolute;top: 0;left: 0;width: 100%;height: 100%;border: 0;} + +.mce-content-body div.mce-resizehandle{position: absolute;z-index: 10000;width: 10px;height: 10px;background-color: #4099ff;border-color: #4099ff;border-style: solid;border-width: 1px;box-sizing: border-box;} + +.mce-content-body div.mce-resizehandle:hover{background-color: #4099ff;} + +.mce-content-body div.mce-resizehandle:nth-of-type(1){cursor: nwse-resize;} + +.mce-content-body div.mce-resizehandle:nth-of-type(2){cursor: nesw-resize;} + +.mce-content-body div.mce-resizehandle:nth-of-type(3){cursor: nwse-resize;} + +.mce-content-body div.mce-resizehandle:nth-of-type(4){cursor: nesw-resize;} + +.mce-content-body .mce-clonedresizable{position: absolute;z-index: 10000;outline: 1px dashed #000;opacity: .5;} + +.mce-content-body .mce-resize-helper{position: absolute;z-index: 10001;display: none;padding: 5px;margin: 5px 10px;font-family: sans-serif;font-size: 12px;line-height: 14px;color: #fff;white-space: nowrap;background: #555;background: rgba(0,0,0,.75);border: 1px;border-radius: 3px;} + +.mce-match-marker{color: #fff;background: #aaa;} + +.mce-match-marker-selected{color: #fff;background: #39f;} + +.mce-content-body img[data-mce-selected],.mce-content-body table[data-mce-selected]{outline: 3px solid #b4d7ff;} + +.mce-content-body hr[data-mce-selected]{outline: 3px solid #b4d7ff;outline-offset: 1px;} + +.mce-content-body [contentEditable=false] [contentEditable=true]:focus{outline: 3px solid #b4d7ff;} + +.mce-content-body [contentEditable=false] [contentEditable=true]:hover{outline: 3px solid #b4d7ff;} + +.mce-content-body [contentEditable=false][data-mce-selected]{cursor: not-allowed;outline: 3px solid #b4d7ff;} + +.mce-content-body.mce-content-readonly [contentEditable=true]:focus,.mce-content-body.mce-content-readonly [contentEditable=true]:hover{outline: 0;} + +.mce-content-body [data-mce-selected=inline-boundary]{background-color: #b4d7ff;} + +.mce-content-body .mce-edit-focus{outline: 3px solid #b4d7ff;} + +.mce-content-body td[data-mce-selected],.mce-content-body th[data-mce-selected]{background-color: #b4d7ff !important;} + +.mce-content-body td[data-mce-selected]::-moz-selection,.mce-content-body th[data-mce-selected]::-moz-selection{background: 0 0;} + +.mce-content-body td[data-mce-selected]::selection,.mce-content-body th[data-mce-selected]::selection{background: 0 0;} + +.mce-content-body td[data-mce-selected] *,.mce-content-body th[data-mce-selected] *{-webkit-touch-callout: none;-webkit-user-select: none;-moz-user-select: none;-ms-user-select: none;user-select: none;} + +.mce-content-body img::-moz-selection{background: 0 0;} + +.mce-content-body img::selection{background: 0 0;} + +.ephox-snooker-resizer-bar{background-color: #b4d7ff;opacity: 0;} + +.ephox-snooker-resizer-cols{cursor: col-resize;} + +.ephox-snooker-resizer-rows{cursor: row-resize;} + +.ephox-snooker-resizer-bar.ephox-snooker-resizer-bar-dragging{opacity: 1;} + +.mce-spellchecker-word{height: 2rem;cursor: default;background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'4'%20height%3D'4'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20stroke%3D'%23ff0000'%20fill%3D'none'%20stroke-linecap%3D'round'%20stroke-opacity%3D'.5'%20d%3D'M0%203L2%201%204%203'%2F%3E%3C%2Fsvg%3E%0A");background-position: 0 calc(100% + 1px);background-repeat: repeat-x;background-size: auto 6px;} + +.mce-spellchecker-grammar{cursor: default;background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'4'%20height%3D'4'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20stroke%3D'%23008800'%20fill%3D'none'%20stroke-linecap%3D'round'%20d%3D'M0%203L2%201%204%203'%2F%3E%3C%2Fsvg%3E%0A");background-position: 0 calc(100% + 1px);background-repeat: repeat-x;background-size: auto 6px;} + +.mce-toc{border: 1px solid gray;} + +.mce-toc h2{margin: 4px;} + +.mce-toc li{list-style-type: none;} + +.mce-item-table,.mce-item-table caption,.mce-item-table td,.mce-item-table th{border: 1px dashed #bbb;} + +.mce-visualblocks address,.mce-visualblocks article,.mce-visualblocks aside,.mce-visualblocks blockquote,.mce-visualblocks div:not([data-mce-bogus]),.mce-visualblocks dl,.mce-visualblocks figcaption,.mce-visualblocks figure,.mce-visualblocks h1,.mce-visualblocks h2,.mce-visualblocks h3,.mce-visualblocks h4,.mce-visualblocks h5,.mce-visualblocks h6,.mce-visualblocks hgroup,.mce-visualblocks ol,.mce-visualblocks p,.mce-visualblocks pre,.mce-visualblocks section,.mce-visualblocks ul{padding-top: 10px;margin-left: 3px;background-repeat: no-repeat;border: 1px dashed #bbb;} + +.mce-visualblocks p{background-image: url(data:image/gif;base64,R0lGODlhCQAJAJEAAAAAAP///7u7u////yH5BAEAAAMALAAAAAAJAAkAAAIQnG+CqCN/mlyvsRUpThG6AgA7);} + +.mce-visualblocks h1{background-image: url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGu1JuxHoAfRNRW3TWXyF2YiRUAOw==);} + +.mce-visualblocks h2{background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8Hybbx4oOuqgTynJd6bGlWg3DkJzoaUAAAOw==);} + +.mce-visualblocks h3{background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIZjI8Hybbx4oOuqgTynJf2Ln2NOHpQpmhAAQA7);} + +.mce-visualblocks h4{background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxInR0zqeAdhtJlXwV1oCll2HaWgAAOw==);} + +.mce-visualblocks h5{background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjane4iq5GlW05GgIkIZUAAAOw==);} + +.mce-visualblocks h6{background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjan04jep1iZ1XRlAo5bVgAAOw==);} + +.mce-visualblocks div:not([data-mce-bogus]){background-image: url(data:image/gif;base64,R0lGODlhEgAKAIABALu7u////yH5BAEAAAEALAAAAAASAAoAAAIfjI9poI0cgDywrhuxfbrzDEbQM2Ei5aRjmoySW4pAAQA7);} + +.mce-visualblocks section{background-image: url(data:image/gif;base64,R0lGODlhKAAKAIABALu7u////yH5BAEAAAEALAAAAAAoAAoAAAI5jI+pywcNY3sBWHdNrplytD2ellDeSVbp+GmWqaDqDMepc8t17Y4vBsK5hDyJMcI6KkuYU+jpjLoKADs=);} + +.mce-visualblocks article{background-image: url(data:image/gif;base64,R0lGODlhKgAKAIABALu7u////yH5BAEAAAEALAAAAAAqAAoAAAI6jI+pywkNY3wG0GBvrsd2tXGYSGnfiF7ikpXemTpOiJScasYoDJJrjsG9gkCJ0ag6KhmaIe3pjDYBBQA7);} + +.mce-visualblocks blockquote{background-image: url(data:image/gif;base64,R0lGODlhPgAKAIABALu7u////yH5BAEAAAEALAAAAAA+AAoAAAJPjI+py+0Knpz0xQDyuUhvfoGgIX5iSKZYgq5uNL5q69asZ8s5rrf0yZmpNkJZzFesBTu8TOlDVAabUyatguVhWduud3EyiUk45xhTTgMBBQA7);} + +.mce-visualblocks address{background-image: url(data:image/gif;base64,R0lGODlhLQAKAIABALu7u////yH5BAEAAAEALAAAAAAtAAoAAAI/jI+pywwNozSP1gDyyZcjb3UaRpXkWaXmZW4OqKLhBmLs+K263DkJK7OJeifh7FicKD9A1/IpGdKkyFpNmCkAADs=);} + +.mce-visualblocks pre{background-image: url(data:image/gif;base64,R0lGODlhFQAKAIABALu7uwAAACH5BAEAAAEALAAAAAAVAAoAAAIjjI+ZoN0cgDwSmnpz1NCueYERhnibZVKLNnbOq8IvKpJtVQAAOw==);} + +.mce-visualblocks figure{background-image: url(data:image/gif;base64,R0lGODlhJAAKAIAAALu7u////yH5BAEAAAEALAAAAAAkAAoAAAI0jI+py+2fwAHUSFvD3RlvG4HIp4nX5JFSpnZUJ6LlrM52OE7uSWosBHScgkSZj7dDKnWAAgA7);} + +.mce-visualblocks figcaption{border: 1px dashed #bbb;} + +.mce-visualblocks hgroup{background-image: url(data:image/gif;base64,R0lGODlhJwAKAIABALu7uwAAACH5BAEAAAEALAAAAAAnAAoAAAI3jI+pywYNI3uB0gpsRtt5fFnfNZaVSYJil4Wo03Hv6Z62uOCgiXH1kZIIJ8NiIxRrAZNMZAtQAAA7);} + +.mce-visualblocks aside{background-image: url(data:image/gif;base64,R0lGODlhHgAKAIABAKqqqv///yH5BAEAAAEALAAAAAAeAAoAAAItjI+pG8APjZOTzgtqy7I3f1yehmQcFY4WKZbqByutmW4aHUd6vfcVbgudgpYCADs=);} + +.mce-visualblocks ul{background-image: url(data:image/gif;base64,R0lGODlhDQAKAIAAALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGuYnqUVSjvw26DzzXiqIDlVwAAOw==);} + +.mce-visualblocks ol{background-image: url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybH6HHt0qourxC6CvzXieHyeWQAAOw==);} + +.mce-visualblocks dl{background-image: url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybEOnmOvUoWznTqeuEjNSCqeGRUAOw==);} + +.mce-visualblocks:not([dir=rtl]) address,.mce-visualblocks:not([dir=rtl]) article,.mce-visualblocks:not([dir=rtl]) aside,.mce-visualblocks:not([dir=rtl]) blockquote,.mce-visualblocks:not([dir=rtl]) div:not([data-mce-bogus]),.mce-visualblocks:not([dir=rtl]) dl,.mce-visualblocks:not([dir=rtl]) figcaption,.mce-visualblocks:not([dir=rtl]) figure,.mce-visualblocks:not([dir=rtl]) h1,.mce-visualblocks:not([dir=rtl]) h2,.mce-visualblocks:not([dir=rtl]) h3,.mce-visualblocks:not([dir=rtl]) h4,.mce-visualblocks:not([dir=rtl]) h5,.mce-visualblocks:not([dir=rtl]) h6,.mce-visualblocks:not([dir=rtl]) hgroup,.mce-visualblocks:not([dir=rtl]) ol,.mce-visualblocks:not([dir=rtl]) p,.mce-visualblocks:not([dir=rtl]) pre,.mce-visualblocks:not([dir=rtl]) section,.mce-visualblocks:not([dir=rtl]) ul{margin-left: 3px;} + +.mce-visualblocks[dir=rtl] address,.mce-visualblocks[dir=rtl] article,.mce-visualblocks[dir=rtl] aside,.mce-visualblocks[dir=rtl] blockquote,.mce-visualblocks[dir=rtl] div:not([data-mce-bogus]),.mce-visualblocks[dir=rtl] dl,.mce-visualblocks[dir=rtl] figcaption,.mce-visualblocks[dir=rtl] figure,.mce-visualblocks[dir=rtl] h1,.mce-visualblocks[dir=rtl] h2,.mce-visualblocks[dir=rtl] h3,.mce-visualblocks[dir=rtl] h4,.mce-visualblocks[dir=rtl] h5,.mce-visualblocks[dir=rtl] h6,.mce-visualblocks[dir=rtl] hgroup,.mce-visualblocks[dir=rtl] ol,.mce-visualblocks[dir=rtl] p,.mce-visualblocks[dir=rtl] pre,.mce-visualblocks[dir=rtl] section,.mce-visualblocks[dir=rtl] ul{background-position-x: right;margin-right: 3px;} + +.mce-nbsp,.mce-shy{background: #aaa;} + +.mce-shy::after{content: '-';} + +body{font-family: sans-serif;} + +table{border-collapse: collapse;} diff --git a/public/resource/tinymce/skins/ui/oxide/content.mobile.min.css b/public/resource/tinymce/skins/ui/oxide/content.mobile.min.css new file mode 100644 index 0000000..c052252 --- /dev/null +++ b/public/resource/tinymce/skins/ui/oxide/content.mobile.min.css @@ -0,0 +1,17 @@ +/** + * Copyright (c) Tiny Technologies, Inc. All rights reserved. + * Licensed under the LGPL or a commercial license. + * For LGPL see License.txt in the project root for license information. + * For commercial licenses see https://www.tiny.cloud/ + */ +.tinymce-mobile-unfocused-selections .tinymce-mobile-unfocused-selection{position: absolute;display: inline-block;background-color: green;opacity: .5;} + +body{-webkit-text-size-adjust: none;} + +body img{max-width: 96vw;} + +body table img{max-width: 95%;} + +body{font-family: sans-serif;} + +table{border-collapse: collapse;} diff --git a/public/resource/tinymce/skins/ui/oxide/fonts/tinymce-mobile.woff b/public/resource/tinymce/skins/ui/oxide/fonts/tinymce-mobile.woff new file mode 100644 index 0000000..1e3be03 Binary files /dev/null and b/public/resource/tinymce/skins/ui/oxide/fonts/tinymce-mobile.woff differ diff --git a/public/resource/tinymce/skins/ui/oxide/skin.min.css b/public/resource/tinymce/skins/ui/oxide/skin.min.css new file mode 100644 index 0000000..5886c59 --- /dev/null +++ b/public/resource/tinymce/skins/ui/oxide/skin.min.css @@ -0,0 +1,875 @@ +/** + * Copyright (c) Tiny Technologies, Inc. All rights reserved. + * Licensed under the LGPL or a commercial license. + * For LGPL see License.txt in the project root for license information. + * For commercial licenses see https://www.tiny.cloud/ + */ +.tox{font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size: 16px;font-style: normal;font-weight: 400;line-height: normal;color: #222f3e;text-decoration: none;text-shadow: none;text-transform: none;white-space: normal;vertical-align: initial;cursor: auto;box-sizing: content-box;-webkit-tap-highlight-color: transparent;} + +.tox :not(svg){font-family: inherit;font-size: inherit;font-style: inherit;font-weight: inherit;line-height: inherit;color: inherit;text-align: inherit;text-decoration: inherit;text-shadow: inherit;text-transform: inherit;white-space: inherit;vertical-align: inherit;cursor: inherit;box-sizing: inherit;direction: inherit;-webkit-tap-highlight-color: inherit;} + +.tox :not(svg){position: static;float: none;width: auto;height: auto;max-width: none;padding: 0;margin: 0;background: 0 0;border: 0;outline: 0;} + +.tox:not([dir=rtl]){text-align: left;direction: ltr;} + +.tox[dir=rtl]{text-align: right;direction: rtl;} + +.tox-tinymce{position: relative;display: flex;overflow: hidden;font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;border: 1px solid #ccc;border-radius: 0;visibility: inherit !important;box-shadow: none;box-sizing: border-box;flex-direction: column;} + +.tox-editor-container{display: flex;flex: 1 1 auto;flex-direction: column;overflow: hidden;} + +.tox-editor-container>:first-child{border-top: none !important;} + +.tox-tinymce-aux{font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;} + +.tox-tinymce :focus,.tox-tinymce-aux :focus{outline: 0;} + +button::-moz-focus-inner{border: 0;} + +.tox-silver-sink{z-index: 1300;} + +.tox .tox-anchorbar{display: flex;flex: 0 0 auto;} + +.tox .tox-bar{display: flex;flex: 0 0 auto;} + +.tox .tox-button{display: inline-block;padding: 4px 16px;margin: 0;font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size: 14px;font-weight: 700;line-height: 24px;letter-spacing: 1;color: #fff;text-align: center;text-decoration: none;text-transform: capitalize;white-space: nowrap;cursor: pointer;background-color: #207ab7;background-image: none;background-position: none;background-repeat: none;border-color: #207ab7;border-style: solid;border-width: 1px;border-radius: 3px;outline: 0;box-shadow: none;box-sizing: border-box;} + +.tox .tox-button[disabled]{color: rgba(255,255,255,.5);cursor: not-allowed;background-color: #207ab7;background-image: none;border-color: #207ab7;box-shadow: none;} + +.tox .tox-button:focus:not(:disabled){color: #fff;background-color: #1c6ca1;background-image: none;border-color: #1c6ca1;box-shadow: none;} + +.tox .tox-button:hover:not(:disabled){color: #fff;background-color: #1c6ca1;background-image: none;border-color: #1c6ca1;box-shadow: none;} + +.tox .tox-button:active:not(:disabled){color: #fff;background-color: #185d8c;background-image: none;border-color: #185d8c;box-shadow: none;} + +.tox .tox-button--secondary{padding: 4px 16px;color: #222f3e;text-decoration: none;text-transform: capitalize;background-color: #f0f0f0;background-image: none;background-position: none;background-repeat: none;border-color: #f0f0f0;border-style: solid;border-width: 1px;border-radius: 3px;outline: 0;box-shadow: none;} + +.tox .tox-button--secondary[disabled]{color: rgba(34,47,62,.5);background-color: #f0f0f0;background-image: none;border-color: #f0f0f0;box-shadow: none;} + +.tox .tox-button--secondary:focus:not(:disabled){color: #222f3e;background-color: #e3e3e3;background-image: none;border-color: #e3e3e3;box-shadow: none;} + +.tox .tox-button--secondary:hover:not(:disabled){color: #222f3e;background-color: #e3e3e3;background-image: none;border-color: #e3e3e3;box-shadow: none;} + +.tox .tox-button--secondary:active:not(:disabled){color: #222f3e;background-color: #d6d6d6;background-image: none;border-color: #d6d6d6;box-shadow: none;} + +.tox .tox-button--icon,.tox .tox-button.tox-button--icon,.tox .tox-button.tox-button--secondary.tox-button--icon{padding: 4px;} + +.tox .tox-button--icon .tox-icon svg,.tox .tox-button.tox-button--icon .tox-icon svg,.tox .tox-button.tox-button--secondary.tox-button--icon .tox-icon svg{display: block;fill: currentColor;} + +.tox .tox-button-link{display: inline-block;padding: 0;margin: 0;font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size: 16px;font-weight: 400;line-height: 1.3;white-space: nowrap;cursor: pointer;background: 0;border: none;box-sizing: border-box;} + +.tox .tox-button-link--sm{font-size: 14px;} + +.tox .tox-button--naked{color: #222f3e;background-color: transparent;border-color: transparent;box-shadow: unset;} + +.tox .tox-button--naked:hover:not(:disabled){color: #222f3e;background-color: #e3e3e3;border-color: #e3e3e3;box-shadow: none;} + +.tox .tox-button--naked:focus:not(:disabled){color: #222f3e;background-color: #e3e3e3;border-color: #e3e3e3;box-shadow: none;} + +.tox .tox-button--naked:active:not(:disabled){color: #222f3e;background-color: #d6d6d6;border-color: #d6d6d6;box-shadow: none;} + +.tox .tox-button--naked .tox-icon svg{fill: currentColor;} + +.tox .tox-button--naked.tox-button--icon{color: currentColor;} + +.tox .tox-button--naked.tox-button--icon:hover:not(:disabled){color: #222f3e;} + +.tox .tox-checkbox{display: flex;height: 36px;min-width: 36px;cursor: pointer;border-radius: 3px;align-items: center;} + +.tox .tox-checkbox__input{position: absolute;top: auto;left: -10000px;width: 1px;height: 1px;overflow: hidden;} + +.tox .tox-checkbox__icons{width: 24px;height: 24px;padding: calc(4px - 1px);border-radius: 3px;box-shadow: 0 0 0 2px transparent;box-sizing: content-box;} + +.tox .tox-checkbox__icons .tox-checkbox-icon__unchecked svg{display: block;fill: rgba(34,47,62,.3);} + +.tox .tox-checkbox__icons .tox-checkbox-icon__indeterminate svg{display: none;fill: #207ab7;} + +.tox .tox-checkbox__icons .tox-checkbox-icon__checked svg{display: none;fill: #207ab7;} + +.tox input.tox-checkbox__input:checked+.tox-checkbox__icons .tox-checkbox-icon__unchecked svg{display: none;} + +.tox input.tox-checkbox__input:checked+.tox-checkbox__icons .tox-checkbox-icon__checked svg{display: block;} + +.tox input.tox-checkbox__input:indeterminate+.tox-checkbox__icons .tox-checkbox-icon__unchecked svg{display: none;} + +.tox input.tox-checkbox__input:indeterminate+.tox-checkbox__icons .tox-checkbox-icon__indeterminate svg{display: block;} + +.tox input.tox-checkbox__input:focus+.tox-checkbox__icons{padding: calc(4px - 1px);border-radius: 3px;box-shadow: inset 0 0 0 1px #207ab7;} + +.tox:not([dir=rtl]) .tox-checkbox__label{margin-left: 4px;} + +.tox:not([dir=rtl]) .tox-bar .tox-checkbox{margin-left: 4px;} + +.tox[dir=rtl] .tox-checkbox__label{margin-right: 4px;} + +.tox[dir=rtl] .tox-bar .tox-checkbox{margin-right: 4px;} + +.tox .tox-collection--toolbar .tox-collection__group{display: flex;padding: 0;} + +.tox .tox-collection--grid .tox-collection__group{display: flex;max-height: 208px;padding: 0;overflow-x: hidden;overflow-y: auto;flex-wrap: wrap;} + +.tox .tox-collection--list .tox-collection__group{padding: 4px 0;border-color: #ccc;border-style: solid;border-top-width: 1px;border-right-width: 0;border-bottom-width: 0;border-left-width: 0;} + +.tox .tox-collection--list .tox-collection__group:first-child{border-top-width: 0;} + +.tox .tox-collection__group-heading{padding: 4px 8px;margin-top: -4px;margin-bottom: 4px;font-size: 12px;font-style: normal;font-weight: 400;color: rgba(34,47,62,.7);text-transform: none;cursor: default;background-color: #e6e6e6;-webkit-user-select: none;-moz-user-select: none;-ms-user-select: none;user-select: none;-webkit-touch-callout: none;} + +.tox .tox-collection__item{display: flex;color: #222f3e;cursor: pointer;-webkit-user-select: none;-moz-user-select: none;-ms-user-select: none;user-select: none;align-items: center;-webkit-touch-callout: none;} + +.tox .tox-collection--list .tox-collection__item{padding: 4px 8px;} + +.tox .tox-collection--toolbar .tox-collection__item{padding: 4px;border-radius: 3px;} + +.tox .tox-collection--grid .tox-collection__item{padding: 4px;border-radius: 3px;} + +.tox .tox-collection--list .tox-collection__item--enabled{color: contrast(inherit,#222f3e,#fff);background-color: inherit;} + +.tox .tox-collection--list .tox-collection__item--active:not(.tox-collection__item--state-disabled){color: #222f3e;background-color: #dee0e2;} + +.tox .tox-collection--toolbar .tox-collection__item--enabled{color: #222f3e;background-color: #c8cbcf;} + +.tox .tox-collection--toolbar .tox-collection__item--active:not(.tox-collection__item--state-disabled){color: #222f3e;background-color: #dee0e2;} + +.tox .tox-collection--grid .tox-collection__item--enabled{color: #222f3e;background-color: #c8cbcf;} + +.tox .tox-collection--grid .tox-collection__item--active:not(.tox-collection__item--state-disabled){color: #222f3e;background-color: #dee0e2;} + +.tox .tox-collection__item--state-disabled{color: rgba(34,47,62,.5);cursor: default;background-color: transparent;} + +.tox .tox-collection__item-icon{display: flex;width: 24px;height: 24px;align-items: center;justify-content: center;} + +.tox .tox-collection__item-icon svg{fill: currentColor;} + +.tox .tox-collection--toolbar-lg .tox-collection__item-icon{width: 48px;height: 48px;} + +.tox .tox-collection__item[role=menuitemcheckbox]:not(.tox-collection__item--enabled) .tox-collection__item-checkmark svg{display: none;} + +.tox .tox-collection__item-label{display: inline-block;font-size: 14px;font-style: normal;font-weight: 400;line-height: 24px;color: currentColor;text-transform: none;word-break: break-all;flex: 1;-ms-flex-preferred-size: auto;} + +.tox .tox-collection__item-accessory{display: inline-block;height: 24px;font-size: 14px;line-height: 24px;color: rgba(34,47,62,.7);text-transform: normal;} + +.tox .tox-collection__item-caret{align-items: center;display: flex;min-height: 24px;} + +.tox .tox-collection__item-caret::after{min-height: inherit;font-size: 0;content: '';} + +.tox:not([dir=rtl]) .tox-collection--list .tox-collection__item>:not(:first-child){margin-left: 8px;} + +.tox:not([dir=rtl]) .tox-collection--list .tox-collection__item-label:first-child{margin-left: 4px;} + +.tox:not([dir=rtl]) .tox-collection__item-accessory{margin-left: 16px;text-align: right;} + +.tox:not([dir=rtl]) .tox-collection__item-caret{margin-left: 16px;} + +.tox[dir=rtl] .tox-collection--list .tox-collection__item>:not(:first-child){margin-right: 8px;} + +.tox[dir=rtl] .tox-collection--list .tox-collection__item-label:first-child{margin-right: 4px;} + +.tox[dir=rtl] .tox-collection__item-icon-rtl .tox-collection__item-icon svg{transform: rotateY(180deg);} + +.tox[dir=rtl] .tox-collection__item-accessory{margin-right: 16px;text-align: left;} + +.tox[dir=rtl] .tox-collection__item-caret{margin-right: 16px;transform: rotateY(180deg);} + +.tox .tox-color-picker-container{display: flex;flex-direction: row;height: 225px;margin: 0;} + +.tox .tox-sv-palette{display: flex;height: 100%;box-sizing: border-box;} + +.tox .tox-sv-palette-spectrum{height: 100%;} + +.tox .tox-sv-palette,.tox .tox-sv-palette-spectrum{width: 225px;} + +.tox .tox-sv-palette-thumb{position: absolute;width: 12px;height: 12px;background: 0 0;border: 1px solid #000;border-radius: 50%;box-sizing: content-box;} + +.tox .tox-sv-palette-inner-thumb{position: absolute;width: 10px;height: 10px;border: 1px solid #fff;border-radius: 50%;} + +.tox .tox-hue-slider{width: 25px;height: 100%;box-sizing: border-box;} + +.tox .tox-hue-slider-spectrum{width: 100%;height: 100%;background: linear-gradient(to bottom,red,#ff0080,#f0f,#8000ff,#00f,#0080ff,#0ff,#00ff80,#0f0,#80ff00,#ff0,#ff8000,red);} + +.tox .tox-hue-slider,.tox .tox-hue-slider-spectrum{width: 20px;} + +.tox .tox-hue-slider-thumb{width: 100%;height: 4px;background: #fff;border: 1px solid #000;box-sizing: content-box;} + +.tox .tox-rgb-form{display: flex;flex-direction: column;justify-content: space-between;} + +.tox .tox-rgb-form div{display: flex;width: inherit;margin-bottom: 5px;align-items: center;justify-content: space-between;} + +.tox .tox-rgb-form input{width: 6em;} + +.tox .tox-rgb-form input.tox-invalid{border: 1px solid red !important;} + +.tox .tox-rgb-form .tox-rgba-preview{margin-bottom: 0;border: 1px solid #000;flex-grow: 2;} + +.tox:not([dir=rtl]) .tox-sv-palette{margin-right: 15px;} + +.tox:not([dir=rtl]) .tox-hue-slider{margin-right: 15px;} + +.tox:not([dir=rtl]) .tox-hue-slider-thumb{margin-left: -1px;} + +.tox:not([dir=rtl]) .tox-rgb-form label{margin-right: .5em;} + +.tox[dir=rtl] .tox-sv-palette{margin-left: 15px;} + +.tox[dir=rtl] .tox-hue-slider{margin-left: 15px;} + +.tox[dir=rtl] .tox-hue-slider-thumb{margin-right: -1px;} + +.tox[dir=rtl] .tox-rgb-form label{margin-left: .5em;} + +.tox .tox-toolbar .tox-swatches,.tox .tox-toolbar__overflow .tox-swatches,.tox .tox-toolbar__primary .tox-swatches{margin: 2px 0 3px 4px;} + +.tox .tox-collection--list .tox-collection__group .tox-swatches-menu{margin: -4px 0;border: 0;} + +.tox .tox-swatches__row{display: flex;} + +.tox .tox-swatch{width: 30px;height: 30px;transition: transform .15s,box-shadow .15s;} + +.tox .tox-swatch:focus,.tox .tox-swatch:hover{transform: scale(.8);box-shadow: 0 0 0 1px rgba(127,127,127,.3) inset;} + +.tox .tox-swatch--remove{align-items: center;display: flex;justify-content: center;} + +.tox .tox-swatch--remove svg path{stroke: #e74c3c;} + +.tox .tox-swatches__picker-btn{display: flex;width: 30px;height: 30px;padding: 0;cursor: pointer;background-color: transparent;border: 0;outline: 0;align-items: center;justify-content: center;} + +.tox .tox-swatches__picker-btn svg{width: 24px;height: 24px;} + +.tox .tox-swatches__picker-btn:hover{background: #dee0e2;} + +.tox:not([dir=rtl]) .tox-swatches__picker-btn{margin-left: auto;} + +.tox[dir=rtl] .tox-swatches__picker-btn{margin-right: auto;} + +.tox .tox-comment-thread{position: relative;background: #fff;} + +.tox .tox-comment-thread>:not(:first-child){margin-top: 8px;} + +.tox .tox-comment{position: relative;padding: 8px 8px 16px 8px;background: #fff;border: 1px solid #ccc;border-radius: 3px;box-shadow: 0 4px 8px 0 rgba(34,47,62,.1);} + +.tox .tox-comment__header{display: flex;color: #222f3e;align-items: center;justify-content: space-between;} + +.tox .tox-comment__date{font-size: 12px;color: rgba(34,47,62,.7);} + +.tox .tox-comment__body{position: relative;margin-top: 8px;font-size: 14px;font-style: normal;font-weight: 400;line-height: 1.3;color: #222f3e;text-transform: initial;} + +.tox .tox-comment__body textarea{width: 100%;white-space: normal;resize: none;} + +.tox .tox-comment__expander{padding-top: 8px;} + +.tox .tox-comment__expander p{font-size: 14px;font-style: normal;color: rgba(34,47,62,.7);} + +.tox .tox-comment__body p{margin: 0;} + +.tox .tox-comment__buttonspacing{padding-top: 16px;text-align: center;} + +.tox .tox-comment-thread__overlay::after{position: absolute;top: 0;right: 0;bottom: 0;left: 0;z-index: 5;display: flex;background: #fff;content: "";opacity: .9;} + +.tox .tox-comment__reply{display: flex;flex-shrink: 0;flex-wrap: wrap;justify-content: flex-end;margin-top: 8px;} + +.tox .tox-comment__reply>:first-child{width: 100%;margin-bottom: 8px;} + +.tox .tox-comment__edit{display: flex;flex-wrap: wrap;justify-content: flex-end;margin-top: 16px;} + +.tox .tox-comment__gradient::after{position: absolute;bottom: 0;display: block;width: 100%;height: 5em;margin-top: -40px;background: linear-gradient(rgba(255,255,255,0),#fff);content: "";} + +.tox .tox-comment__overlay{position: absolute;top: 0;right: 0;bottom: 0;left: 0;z-index: 5;display: flex;text-align: center;background: #fff;opacity: .9;flex-direction: column;flex-grow: 1;} + +.tox .tox-comment__loading-text{position: relative;display: flex;color: #222f3e;align-items: center;flex-direction: column;} + +.tox .tox-comment__loading-text>div{padding-bottom: 16px;} + +.tox .tox-comment__overlaytext{position: absolute;top: 0;right: 0;bottom: 0;left: 0;z-index: 10;padding: 1em;font-size: 14px;flex-direction: column;} + +.tox .tox-comment__overlaytext p{color: #222f3e;text-align: center;background-color: #fff;box-shadow: 0 0 8px 8px #fff;} + +.tox .tox-comment__overlaytext div:nth-of-type(2){font-size: .8em;} + +.tox .tox-comment__busy-spinner{position: absolute;top: 0;right: 0;bottom: 0;left: 0;z-index: 1103;display: flex;background-color: #fff;align-items: center;justify-content: center;} + +.tox .tox-comment__scroll{display: flex;flex-direction: column;flex-shrink: 1;overflow: auto;} + +.tox .tox-conversations{margin: 8px;} + +.tox:not([dir=rtl]) .tox-comment__edit{margin-left: 8px;} + +.tox:not([dir=rtl]) .tox-comment__buttonspacing>:last-child,.tox:not([dir=rtl]) .tox-comment__edit>:last-child,.tox:not([dir=rtl]) .tox-comment__reply>:last-child{margin-left: 8px;} + +.tox[dir=rtl] .tox-comment__edit{margin-right: 8px;} + +.tox[dir=rtl] .tox-comment__buttonspacing>:last-child,.tox[dir=rtl] .tox-comment__edit>:last-child,.tox[dir=rtl] .tox-comment__reply>:last-child{margin-right: 8px;} + +.tox .tox-user{align-items: center;display: flex;} + +.tox .tox-user__avatar svg{fill: rgba(34,47,62,.7);} + +.tox .tox-user__name{font-size: 12px;font-style: normal;font-weight: 700;color: rgba(34,47,62,.7);text-transform: uppercase;} + +.tox:not([dir=rtl]) .tox-user__avatar svg{margin-right: 8px;} + +.tox:not([dir=rtl]) .tox-user__avatar+.tox-user__name{margin-left: 8px;} + +.tox[dir=rtl] .tox-user__avatar svg{margin-left: 8px;} + +.tox[dir=rtl] .tox-user__avatar+.tox-user__name{margin-right: 8px;} + +.tox .tox-dialog-wrap{position: fixed;top: 0;right: 0;bottom: 0;left: 0;z-index: 1100;display: flex;align-items: center;justify-content: center;} + +.tox .tox-dialog-wrap__backdrop{position: absolute;top: 0;right: 0;bottom: 0;left: 0;z-index: 1101;background-color: rgba(255,255,255,.75);} + +.tox .tox-dialog{position: relative;z-index: 1102;display: flex;width: 95vw;max-width: 480px;max-height: 100%;overflow: hidden;background-color: #fff;border-color: #ccc;border-style: solid;border-width: 1px;border-radius: 3px;box-shadow: 0 16px 16px -10px rgba(34,47,62,.15),0 0 40px 1px rgba(34,47,62,.15);flex-direction: column;} + +.tox .tox-dialog__header{position: relative;display: flex;padding: 8px 16px 0 16px;margin-bottom: 16px;font-size: 16px;color: #222f3e;background-color: #fff;border-bottom: none;align-items: center;justify-content: space-between;} + +.tox .tox-dialog__header .tox-button{z-index: 1;} + +.tox .tox-dialog__draghandle{position: absolute;top: 0;left: 0;width: 100%;height: 100%;cursor: grab;} + +.tox .tox-dialog__draghandle:active{cursor: grabbing;} + +.tox .tox-dialog__dismiss{margin-left: auto;} + +.tox .tox-dialog__title{margin: 0;font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size: 20px;font-style: normal;font-weight: 400;line-height: 1.3;text-transform: normal;} + +.tox .tox-dialog__body{display: flex;min-width: 0;padding: 0 16px;font-size: 16px;font-style: normal;font-weight: 400;line-height: 1.3;color: #222f3e;text-align: left;text-transform: normal;flex: 1;-ms-flex-preferred-size: auto;} + +.tox .tox-dialog__body-nav{align-items: flex-start;display: flex;flex-direction: column;} + +.tox .tox-dialog__body-nav-item{display: inline-block;margin-bottom: 8px;font-size: 14px;line-height: 1.3;color: rgba(34,47,62,.7);text-decoration: none;border-bottom: 2px solid transparent;} + +.tox .tox-dialog__body-nav-item--active{color: #207ab7;border-bottom: 2px solid #207ab7;} + +.tox .tox-dialog__body-content{display: flex;flex: 1;flex-direction: column;-ms-flex-preferred-size: auto;max-height: 650px;overflow: auto;} + +.tox .tox-dialog__body-content>*{margin-top: 16px;margin-bottom: 0;} + +.tox .tox-dialog__body-content>:first-child{margin-top: 0;} + +.tox .tox-dialog__body-content>:last-child{margin-bottom: 0;} + +.tox .tox-dialog__body-content>:only-child{margin-top: 0;margin-bottom: 0;} + +.tox .tox-dialog--width-lg{height: 650px;max-width: 1200px;} + +.tox .tox-dialog--width-md{max-width: 800px;} + +.tox .tox-dialog--width-md .tox-dialog__body-content{overflow: auto;} + +.tox .tox-dialog__body-content--centered{text-align: center;} + +.tox .tox-dialog__body-content--spacious{margin-bottom: 16px;} + +.tox .tox-dialog__footer{display: flex;padding: 8px 16px;margin-top: 16px;background-color: #fff;border-top: 1px solid #ccc;align-items: center;justify-content: space-between;} + +.tox .tox-dialog__busy-spinner{position: absolute;top: 0;right: 0;bottom: 0;left: 0;z-index: 1103;display: flex;background-color: rgba(255,255,255,.75);align-items: center;justify-content: center;} + +.tox .tox-dialog__table{width: 100%;border-collapse: collapse;} + +.tox .tox-dialog__table thead th{padding-bottom: 8px;font-weight: 700;} + +.tox .tox-dialog__table tbody tr{border-bottom: 1px solid #ccc;} + +.tox .tox-dialog__table tbody tr:last-child{border-bottom: none;} + +.tox .tox-dialog__table td{padding-top: 8px;padding-bottom: 8px;} + +.tox .tox-dialog__popups{position: absolute;z-index: 1100;width: 100%;} + +.tox .tox-dialog__body-iframe{display: flex;flex: 1;flex-direction: column;-ms-flex-preferred-size: auto;} + +.tox .tox-dialog__body-iframe .tox-navobj{display: flex;flex: 1;-ms-flex-preferred-size: auto;} + +.tox .tox-dialog__body-iframe .tox-navobj :nth-child(2){flex: 1;-ms-flex-preferred-size: auto;height: 100%;} + +body.tox-dialog__disable-scroll{overflow: hidden;} + +.tox.tox-platform-ie .tox-dialog-wrap{position: -ms-device-fixed;} + +.tox:not([dir=rtl]) .tox-dialog__body-nav{margin-right: 32px;} + +.tox:not([dir=rtl]) .tox-dialog__footer .tox-dialog__footer-end>*,.tox:not([dir=rtl]) .tox-dialog__footer .tox-dialog__footer-start>*{margin-left: 8px;} + +.tox[dir=rtl] .tox-dialog__body{text-align: right;} + +.tox[dir=rtl] .tox-dialog__body-nav{margin-left: 32px;} + +.tox[dir=rtl] .tox-dialog__footer .tox-dialog__footer-end>*,.tox[dir=rtl] .tox-dialog__footer .tox-dialog__footer-start>*{margin-right: 8px;} + +.tox .tox-dropzone-container{display: flex;flex: 1;-ms-flex-preferred-size: auto;} + +.tox .tox-dropzone{display: flex;min-height: 100px;padding: 10px;background: #fff;border: 2px dashed #ccc;box-sizing: border-box;align-items: center;flex-direction: column;flex-grow: 1;justify-content: center;} + +.tox .tox-dropzone p{margin: 0 0 16px 0;color: rgba(34,47,62,.7);} + +.tox .tox-edit-area{position: relative;display: flex;overflow: hidden;border-top: 1px solid #ccc;flex: 1;-ms-flex-preferred-size: auto;} + +.tox .tox-edit-area__iframe{position: absolute;width: 100%;height: 100%;background-color: #fff;border: 0;box-sizing: border-box;flex: 1;-ms-flex-preferred-size: auto;} + +.tox.tox-inline-edit-area{border: 1px dotted #ccc;} + +.tox .tox-control-wrap{flex: 1;position: relative;} + +.tox .tox-control-wrap:not(.tox-control-wrap--status-invalid) .tox-control-wrap__status-icon-invalid,.tox .tox-control-wrap:not(.tox-control-wrap--status-unknown) .tox-control-wrap__status-icon-unknown,.tox .tox-control-wrap:not(.tox-control-wrap--status-valid) .tox-control-wrap__status-icon-valid{display: none;} + +.tox .tox-control-wrap svg{display: block;} + +.tox .tox-control-wrap__status-icon-wrap{position: absolute;top: 50%;transform: translateY(-50%);} + +.tox .tox-control-wrap__status-icon-invalid svg{fill: #c00;} + +.tox .tox-control-wrap__status-icon-unknown svg{fill: orange;} + +.tox .tox-control-wrap__status-icon-valid svg{fill: green;} + +.tox:not([dir=rtl]) .tox-control-wrap--status-invalid .tox-textfield,.tox:not([dir=rtl]) .tox-control-wrap--status-unknown .tox-textfield,.tox:not([dir=rtl]) .tox-control-wrap--status-valid .tox-textfield{padding-right: 32px;} + +.tox:not([dir=rtl]) .tox-control-wrap__status-icon-wrap{right: 4px;} + +.tox[dir=rtl] .tox-control-wrap--status-invalid .tox-textfield,.tox[dir=rtl] .tox-control-wrap--status-unknown .tox-textfield,.tox[dir=rtl] .tox-control-wrap--status-valid .tox-textfield{padding-left: 32px;} + +.tox[dir=rtl] .tox-control-wrap__status-icon-wrap{left: 4px;} + +.tox .tox-autocompleter{max-width: 25em;} + +.tox .tox-autocompleter .tox-menu{max-width: 25em;} + +.tox .tox-color-input{display: flex;} + +.tox .tox-color-input .tox-textfield{display: flex;border-radius: 3px 0 0 3px;} + +.tox .tox-color-input span{display: flex;width: 35px;cursor: pointer;border-color: rgba(34,47,62,.2);border-style: solid;border-width: 1px 1px 1px 0;border-radius: 0 3px 3px 0;box-shadow: none;box-sizing: border-box;} + +.tox .tox-color-input span:focus{border-color: #207ab7;} + +.tox[dir=rtl] .tox-color-input .tox-textfield{border-radius: 0 3px 3px 0;} + +.tox[dir=rtl] .tox-color-input span{border-width: 1px 0 1px 1px;border-radius: 3px 0 0 3px;} + +.tox .tox-label,.tox .tox-toolbar-label{display: block;padding: 0 8px 0 0;font-size: 14px;font-style: normal;font-weight: 400;line-height: 1.3;color: rgba(34,47,62,.7);text-transform: normal;white-space: nowrap;} + +.tox .tox-toolbar-label{padding: 0 8px;} + +.tox[dir=rtl] .tox-label{padding: 0 0 0 8px;} + +.tox .tox-form{display: flex;flex: 1;flex-direction: column;-ms-flex-preferred-size: auto;} + +.tox .tox-form__group{margin-bottom: 4px;box-sizing: border-box;} + +.tox .tox-form__group--error{color: #c00;} + +.tox .tox-form__group--collection{display: flex;} + +.tox .tox-form__grid{display: flex;flex-direction: row;flex-wrap: wrap;justify-content: space-between;} + +.tox .tox-form__grid--2col>.tox-form__group{width: calc(50% - (8px / 2));} + +.tox .tox-form__grid--3col>.tox-form__group{width: calc(100% / 3 - (8px / 2));} + +.tox .tox-form__grid--4col>.tox-form__group{width: calc(25% - (8px / 2));} + +.tox .tox-form__controls-h-stack{align-items: center;display: flex;} + +.tox .tox-form__group--inline{align-items: center;display: flex;} + +.tox .tox-form__group--stretched{display: flex;flex: 1;flex-direction: column;-ms-flex-preferred-size: auto;} + +.tox .tox-form__group--stretched .tox-textarea{flex: 1;-ms-flex-preferred-size: auto;} + +.tox .tox-form__group--stretched .tox-navobj{display: flex;flex: 1;-ms-flex-preferred-size: auto;} + +.tox .tox-form__group--stretched .tox-navobj :nth-child(2){flex: 1;-ms-flex-preferred-size: auto;height: 100%;} + +.tox:not([dir=rtl]) .tox-form__controls-h-stack>:not(:first-child){margin-left: 4px;} + +.tox[dir=rtl] .tox-form__controls-h-stack>:not(:first-child){margin-right: 4px;} + +.tox .tox-lock.tox-locked .tox-lock-icon__unlock,.tox .tox-lock:not(.tox-locked) .tox-lock-icon__lock{display: none;} + +.tox .tox-textarea,.tox .tox-textfield,.tox .tox-toolbar-textfield,.tox:not([dir=rtl]) .tox-selectfield select,.tox[dir=rtl] .tox-selectfield select{width: 100%;padding: 5px 4.75px;margin: 0;font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size: 16px;line-height: 24px;color: #222f3e;background-color: #fff;border-color: #ccc;border-style: solid;border-width: 1px;border-radius: 3px;outline: 0;box-shadow: none;box-sizing: border-box;resize: none;-webkit-appearance: none;-moz-appearance: none;appearance: none;} + +.tox .tox-selectfield select:focus,.tox .tox-textarea:focus,.tox .tox-textfield:focus{border-color: #207ab7;outline: 0;box-shadow: none;} + +.tox .tox-toolbar-textfield{max-width: 250px;margin-top: 2px;margin-bottom: 3px;border-width: 0;} + +.tox .tox-naked-btn{display: block;padding: 0;margin: 0;color: #207ab7;cursor: pointer;background-color: transparent;border: 0;border-color: transparent;box-shadow: unset;} + +.tox .tox-naked-btn svg{display: block;fill: #222f3e;} + +.tox:not([dir=rtl]) .tox-toolbar-textfield+*{margin-left: 4px;} + +.tox[dir=rtl] .tox-toolbar-textfield+*{margin-right: 4px;} + +.tox .tox-selectfield{position: relative;cursor: pointer;} + +.tox .tox-selectfield select::-ms-expand{display: none;} + +.tox .tox-selectfield svg{position: absolute;top: 50%;pointer-events: none;transform: translateY(-50%);} + +.tox:not([dir=rtl]) .tox-selectfield select{padding-right: 24px;} + +.tox:not([dir=rtl]) .tox-selectfield svg{right: 8px;} + +.tox[dir=rtl] .tox-selectfield select{padding-left: 24px;} + +.tox[dir=rtl] .tox-selectfield svg{left: 8px;} + +.tox .tox-textarea{white-space: pre-wrap;-webkit-appearance: textarea;-moz-appearance: textarea;appearance: textarea;} + +.tox-fullscreen{position: fixed;top: 0;left: 0;width: 100%;height: 100%;padding: 0;margin: 0;overflow: hidden;border: 0;} + +.tox-fullscreen .tox.tox-tinymce.tox-fullscreen .tox-statusbar__resize-handle{display: none;} + +.tox-fullscreen .tox.tox-tinymce.tox-fullscreen{z-index: 1200;} + +.tox-fullscreen .tox.tox-tinymce-aux{z-index: 1201;} + +.tox .tox-image-tools{width: 100%;} + +.tox .tox-image-tools__toolbar{align-items: center;display: flex;justify-content: center;} + +.tox .tox-image-tools__image{position: relative;width: 100%;height: 380px;overflow: auto;background-color: #666;} + +.tox .tox-image-tools__image,.tox .tox-image-tools__image+.tox-image-tools__toolbar{margin-top: 8px;} + +.tox .tox-image-tools__image-bg{background: url(data:image/gif;base64,R0lGODdhDAAMAIABAMzMzP///ywAAAAADAAMAAACFoQfqYeabNyDMkBQb81Uat85nxguUAEAOw==);} + +.tox .tox-image-tools__toolbar>.tox-spacer{flex: 1;-ms-flex-preferred-size: auto;} + +.tox .tox-croprect-block{position: absolute;background: #000;opacity: .5;zoom: 1;} + +.tox .tox-croprect-handle{position: absolute;top: 0;left: 0;width: 20px;height: 20px;border: 2px solid #fff;} + +.tox .tox-croprect-handle-move{position: absolute;cursor: move;border: 0;} + +.tox .tox-croprect-handle-nw{top: 100px;left: 100px;margin: -2px 0 0 -2px;cursor: nw-resize;border-width: 2px 0 0 2px;} + +.tox .tox-croprect-handle-ne{top: 100px;left: 200px;margin: -2px 0 0 -20px;cursor: ne-resize;border-width: 2px 2px 0 0;} + +.tox .tox-croprect-handle-sw{top: 200px;left: 100px;margin: -20px 2px 0 -2px;cursor: sw-resize;border-width: 0 0 2px 2px;} + +.tox .tox-croprect-handle-se{top: 200px;left: 200px;margin: -20px 0 0 -20px;cursor: se-resize;border-width: 0 2px 2px 0;} + +.tox:not([dir=rtl]) .tox-image-tools__toolbar>.tox-slider:not(:first-of-type){margin-left: 8px;} + +.tox:not([dir=rtl]) .tox-image-tools__toolbar>.tox-button+.tox-slider{margin-left: 32px;} + +.tox:not([dir=rtl]) .tox-image-tools__toolbar>.tox-slider+.tox-button{margin-left: 32px;} + +.tox[dir=rtl] .tox-image-tools__toolbar>.tox-slider:not(:first-of-type){margin-right: 8px;} + +.tox[dir=rtl] .tox-image-tools__toolbar>.tox-button+.tox-slider{margin-right: 32px;} + +.tox[dir=rtl] .tox-image-tools__toolbar>.tox-slider+.tox-button{margin-right: 32px;} + +.tox .tox-insert-table-picker{display: flex;flex-wrap: wrap;width: 169px;} + +.tox .tox-insert-table-picker>div{width: 16px;height: 16px;border-color: #ccc;border-style: solid;border-width: 0 1px 1px 0;box-sizing: content-box;} + +.tox .tox-collection--list .tox-collection__group .tox-insert-table-picker{margin: -4px 0;} + +.tox .tox-insert-table-picker .tox-insert-table-picker__selected{background-color: rgba(32,122,183,.5);border-color: rgba(32,122,183,.5);} + +.tox .tox-insert-table-picker__label{display: block;width: 100%;padding: 4px;font-size: 14px;color: rgba(34,47,62,.7);text-align: center;} + +.tox:not([dir=rtl]) .tox-insert-table-picker>div:nth-child(10n){border-right: 0;} + +.tox[dir=rtl] .tox-insert-table-picker>div:nth-child(10n+1){border-right: 0;} + +.tox .tox-menu{z-index: 1;display: inline-block;overflow: hidden;vertical-align: top;background-color: #fff;border: 1px solid #ccc;border-radius: 3px;box-shadow: 0 4px 8px 0 rgba(34,47,62,.1);} + +.tox .tox-menu.tox-collection.tox-collection--list{padding: 0;} + +.tox .tox-menu.tox-collection.tox-collection--toolbar{padding: 4px;} + +.tox .tox-menu.tox-collection.tox-collection--grid{padding: 4px;} + +.tox .tox-menu__label blockquote,.tox .tox-menu__label code,.tox .tox-menu__label h1,.tox .tox-menu__label h2,.tox .tox-menu__label h3,.tox .tox-menu__label h4,.tox .tox-menu__label h5,.tox .tox-menu__label h6,.tox .tox-menu__label p{margin: 0;} + +.tox .tox-menubar{display: flex;padding: 0 4px;margin-bottom: -1px;background: url("data:image/svg+xml;charset=utf8,%3Csvg height='43px' viewBox='0 0 40 43px' width='40' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='0' y='42px' width='100' height='1' fill='%23cccccc'/%3E%3C/svg%3E") left 0 top 0 #fff;background-color: #fff;flex: 0 0 auto;flex-shrink: 0;flex-wrap: wrap;} + +.tox .tox-mbtn{display: flex;width: auto;height: 34px;padding: 0 4px;margin: 2px 0 3px 0;overflow: hidden;font-size: 14px;font-style: normal;font-weight: 400;color: #222f3e;text-transform: normal;background: 0 0;border: 0;border-radius: 3px;outline: 0;box-shadow: none;align-items: center;flex: 0 0 auto;justify-content: center;} + +.tox .tox-mbtn[disabled]{color: rgba(34,47,62,.5);cursor: not-allowed;background-color: none;border-color: none;box-shadow: none;} + +.tox .tox-mbtn:hover:not(:disabled){color: #222f3e;background: #dee0e2;box-shadow: none;} + +.tox .tox-mbtn:focus:not(:disabled){color: #222f3e;background: #dee0e2;box-shadow: none;} + +.tox .tox-mbtn--active{color: #222f3e;background: #c8cbcf;box-shadow: none;} + +.tox .tox-mbtn__select-label{margin: 0 4px;font-weight: 400;cursor: default;} + +.tox .tox-mbtn[disabled] .tox-mbtn__select-label{cursor: not-allowed;} + +.tox .tox-mbtn__select-chevron{display: flex;display: none;width: 16px;align-items: center;justify-content: center;} + +.tox .tox-notification{display: grid;padding: 5px;margin-top: 5px;background-color: #fffaea;border-color: #ffe89d;border-style: solid;border-width: 1px;opacity: 0;box-sizing: border-box;transition: transform .1s ease-in,opacity 150ms ease-in;grid-template-columns: minmax(40px,1fr) auto minmax(40px,1fr);} + +.tox .tox-notification--in{opacity: 1;} + +.tox .tox-notification--success{background-color: #dff0d8;border-color: #d6e9c6;} + +.tox .tox-notification--error{background-color: #f2dede;border-color: #ebccd1;} + +.tox .tox-notification--warn{background-color: #fcf8e3;border-color: #faebcc;} + +.tox .tox-notification--info{background-color: #d9edf7;border-color: #779ecb;} + +.tox .tox-notification__body{font-size: 14px;color: #222f3e;text-align: center;word-break: break-all;word-break: break-word;white-space: normal;align-self: center;grid-column-end: 3;-ms-grid-column-span: 1;grid-column-start: 2;grid-row-end: 2;grid-row-start: 1;} + +.tox .tox-notification__body>*{margin: 0;} + +.tox .tox-notification__body>*+*{margin-top: 1rem;} + +.tox .tox-notification__icon{align-self: center;-ms-grid-column-align: end;grid-column-end: 2;-ms-grid-column-span: 1;grid-column-start: 1;grid-row-end: 2;grid-row-start: 1;justify-self: end;} + +.tox .tox-notification__icon svg{display: block;} + +.tox .tox-notification__dismiss{align-self: start;-ms-grid-column-align: end;grid-column-end: 4;-ms-grid-column-span: 1;grid-column-start: 3;grid-row-end: 2;grid-row-start: 1;justify-self: end;} + +.tox .tox-notification .tox-progress-bar{-ms-grid-column-align: center;grid-column-end: 4;-ms-grid-column-span: 3;grid-column-start: 1;grid-row-end: 3;-ms-grid-row-span: 1;grid-row-start: 2;justify-self: center;} + +.tox .tox-pop{position: relative;display: inline-block;} + +.tox .tox-pop--resizing{transition: width .1s ease;} + +.tox .tox-pop--resizing .tox-toolbar{flex-wrap: nowrap;} + +.tox .tox-pop__dialog{min-width: 0;overflow: hidden;background-color: #fff;border: 1px solid #ccc;border-radius: 3px;box-shadow: 0 1px 3px rgba(0,0,0,.15);} + +.tox .tox-pop__dialog>:not(.tox-toolbar){margin: 4px 4px 4px 8px;} + +.tox .tox-pop__dialog .tox-toolbar{background-color: transparent;} + +.tox .tox-pop::after,.tox .tox-pop::before{position: absolute;display: block;width: 0;height: 0;border-style: solid;content: '';} + +.tox .tox-pop.tox-pop--bottom::after,.tox .tox-pop.tox-pop--bottom::before{top: 100%;left: 50%;} + +.tox .tox-pop.tox-pop--bottom::after{margin-top: -1px;margin-left: -8px;border-color: #fff transparent transparent transparent;border-width: 8px;} + +.tox .tox-pop.tox-pop--bottom::before{margin-left: -9px;border-color: #ccc transparent transparent transparent;border-width: 9px;} + +.tox .tox-pop.tox-pop--top::after,.tox .tox-pop.tox-pop--top::before{top: 0;left: 50%;transform: translateY(-100%);} + +.tox .tox-pop.tox-pop--top::after{margin-top: 1px;margin-left: -8px;border-color: transparent transparent #fff transparent;border-width: 8px;} + +.tox .tox-pop.tox-pop--top::before{margin-left: -9px;border-color: transparent transparent #ccc transparent;border-width: 9px;} + +.tox .tox-pop.tox-pop--left::after,.tox .tox-pop.tox-pop--left::before{top: calc(50% - 1px);left: 0;transform: translateY(-50%);} + +.tox .tox-pop.tox-pop--left::after{margin-left: -15px;border-color: transparent #fff transparent transparent;border-width: 8px;} + +.tox .tox-pop.tox-pop--left::before{margin-left: -19px;border-color: transparent #ccc transparent transparent;border-width: 10px;} + +.tox .tox-pop.tox-pop--right::after,.tox .tox-pop.tox-pop--right::before{top: calc(50% + 1px);left: 100%;transform: translateY(-50%);} + +.tox .tox-pop.tox-pop--right::after{margin-left: -1px;border-color: transparent transparent transparent #fff;border-width: 8px;} + +.tox .tox-pop.tox-pop--right::before{margin-left: -1px;border-color: transparent transparent transparent #ccc;border-width: 10px;} + +.tox .tox-pop.tox-pop--align-left::after,.tox .tox-pop.tox-pop--align-left::before{left: 20px;} + +.tox .tox-pop.tox-pop--align-right::after,.tox .tox-pop.tox-pop--align-right::before{left: calc(100% - 20px);} + +.tox .tox-sidebar-wrap{display: flex;flex-direction: row;flex-grow: 1;min-height: 0;} + +.tox .tox-sidebar{display: flex;flex-direction: row;justify-content: flex-end;} + +.tox .tox-sidebar__slider{display: flex;overflow: hidden;} + +.tox .tox-sidebar__pane-container{display: flex;} + +.tox .tox-sidebar__pane{display: flex;} + +.tox .tox-sidebar--sliding-closed{opacity: 0;} + +.tox .tox-sidebar--sliding-open{opacity: 1;} + +.tox .tox-sidebar--sliding-growing,.tox .tox-sidebar--sliding-shrinking{transition: width .5s ease,opacity .5s ease;} + +.tox .tox-slider{position: relative;display: flex;height: 24px;align-items: center;flex: 1;-ms-flex-preferred-size: auto;justify-content: center;} + +.tox .tox-slider__rail{width: 100%;height: 10px;min-width: 120px;background-color: transparent;border: 1px solid #ccc;border-radius: 3px;} + +.tox .tox-slider__handle{position: absolute;top: 50%;left: 50%;width: 14px;height: 24px;background-color: #207ab7;border: 2px solid #185d8c;border-radius: 3px;transform: translateX(-50%) translateY(-50%);box-shadow: none;} + +.tox .tox-source-code{overflow: auto;} + +.tox .tox-spinner{display: flex;} + +.tox .tox-spinner>div{width: 8px;height: 8px;background-color: rgba(34,47,62,.7);border-radius: 100%;animation: tam-bouncing-dots 1.5s ease-in-out 0s infinite both;} + +.tox .tox-spinner>div:nth-child(1){animation-delay: -.32s;} + +.tox .tox-spinner>div:nth-child(2){animation-delay: -.16s;}@keyframes tam-bouncing-dots{0%,100%,80%{transform: scale(0);} + +40%{transform: scale(1);}} + +.tox:not([dir=rtl]) .tox-spinner>div:not(:first-child){margin-left: 4px;} + +.tox[dir=rtl] .tox-spinner>div:not(:first-child){margin-right: 4px;} + +.tox .tox-statusbar{position: relative;display: flex;height: 18px;padding: 0 8px;overflow: hidden;font-size: 12px;color: rgba(34,47,62,.7);text-transform: uppercase;background-color: #fff;border-top: 1px solid #ccc;align-items: center;flex: 0 0 auto;} + +.tox .tox-statusbar a{color: rgba(34,47,62,.7);text-decoration: none;} + +.tox .tox-statusbar a:hover{text-decoration: underline;} + +.tox .tox-statusbar__text-container{display: flex;flex: 1 1 auto;justify-content: flex-end;overflow: hidden;} + +.tox .tox-statusbar__path{display: flex;flex: 1 1 auto;margin-right: auto;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;} + +.tox .tox-statusbar__path>*{display: inline;white-space: nowrap;} + +.tox .tox-statusbar__wordcount{flex: 0 0 auto;margin-left: 1ch;} + +.tox .tox-statusbar__resize-handle{display: flex;padding-left: 1ch;margin-right: -8px;margin-left: auto;cursor: nwse-resize;align-items: flex-end;align-self: stretch;flex: 0 0 auto;justify-content: flex-end;} + +.tox .tox-statusbar__resize-handle svg{display: block;fill: rgba(34,47,62,.7);} + +.tox:not([dir=rtl]) .tox-statusbar__path>*{margin-right: 4px;} + +.tox:not([dir=rtl]) .tox-statusbar__branding{margin-left: 1ch;} + +.tox[dir=rtl] .tox-statusbar{flex-direction: row-reverse;} + +.tox[dir=rtl] .tox-statusbar__path>*{margin-left: 4px;} + +.tox .tox-throbber{z-index: 1400;} + +.tox .tox-throbber__busy-spinner{position: absolute;top: 0;right: 0;bottom: 0;left: 0;display: flex;background-color: rgba(255,255,255,.6);align-items: center;justify-content: center;} + +.tox .tox-tbtn{display: flex;width: 34px;height: 34px;padding: 0;margin: 2px 0 3px 0;overflow: hidden;font-size: 14px;font-style: normal;font-weight: 400;color: #222f3e;text-transform: normal;background: 0 0;border: 0;border-radius: 3px;outline: 0;box-shadow: none;align-items: center;flex: 0 0 auto;justify-content: center;} + +.tox .tox-tbtn svg{display: block;fill: #222f3e;} + +.tox .tox-tbtn.tox-tbtn-more{width: inherit;padding-right: 5px;padding-left: 5px;} + +.tox .tox-tbtn--enabled{color: #222f3e;background: #c8cbcf;box-shadow: none;} + +.tox .tox-tbtn--enabled>*{transform: none;} + +.tox .tox-tbtn--enabled svg{fill: #222f3e;} + +.tox .tox-tbtn:hover{color: #222f3e;background: #dee0e2;box-shadow: none;} + +.tox .tox-tbtn:hover svg{fill: #222f3e;} + +.tox .tox-tbtn:focus{color: #222f3e;background: #dee0e2;box-shadow: none;} + +.tox .tox-tbtn:focus svg{fill: #222f3e;} + +.tox .tox-tbtn:active{color: #222f3e;background: #c8cbcf;box-shadow: none;} + +.tox .tox-tbtn:active svg{fill: #222f3e;} + +.tox .tox-tbtn--disabled,.tox .tox-tbtn--disabled:hover,.tox .tox-tbtn:disabled,.tox .tox-tbtn:disabled:hover{color: rgba(34,47,62,.5);cursor: not-allowed;background: 0 0;box-shadow: none;} + +.tox .tox-tbtn--disabled svg,.tox .tox-tbtn--disabled:hover svg,.tox .tox-tbtn:disabled svg,.tox .tox-tbtn:disabled:hover svg{fill: rgba(34,47,62,.5);} + +.tox .tox-tbtn:active>*{transform: none;} + +.tox .tox-tbtn--md{width: 51px;height: 51px;} + +.tox .tox-tbtn--lg{width: 68px;height: 68px;flex-direction: column;} + +.tox .tox-tbtn--return{width: 16px;height: unset;align-self: stretch;} + +.tox .tox-tbtn--labeled{width: unset;padding: 0 4px;} + +.tox .tox-tbtn__vlabel{display: block;margin-bottom: 4px;font-size: 10px;font-weight: 400;letter-spacing: -.025em;white-space: nowrap;} + +.tox .tox-tbtn--select{width: auto;padding: 0 4px;margin: 2px 0 3px 0;} + +.tox .tox-tbtn__select-label{margin: 0 4px;font-weight: 400;cursor: default;} + +.tox .tox-tbtn__select-chevron{align-items: center;display: flex;justify-content: center;width: 16px;} + +.tox .tox-tbtn__select-chevron svg{fill: rgba(34,47,62,.7);} + +.tox .tox-tbtn--bespoke .tox-tbtn__select-label{width: 7em;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;} + +.tox .tox-split-button{display: flex;margin: 2px 0 3px 0;overflow: hidden;border: 0;border-radius: 3px;box-sizing: border-box;} + +.tox .tox-split-button:hover{box-shadow: 0 0 0 1px #dee0e2 inset;} + +.tox .tox-split-button:focus{color: #222f3e;background: #dee0e2;box-shadow: none;} + +.tox .tox-split-button>*{border-radius: 0;} + +.tox .tox-split-button__chevron{width: 16px;} + +.tox .tox-split-button__chevron svg{fill: rgba(34,47,62,.7);} + +.tox .tox-pop .tox-split-button__chevron svg{transform: rotate(-90deg);} + +.tox .tox-split-button .tox-tbtn{margin: 0;} + +.tox .tox-split-button.tox-tbtn--disabled .tox-tbtn:focus,.tox .tox-split-button.tox-tbtn--disabled .tox-tbtn:hover,.tox .tox-split-button.tox-tbtn--disabled:focus,.tox .tox-split-button.tox-tbtn--disabled:hover{color: rgba(34,47,62,.5);background: 0 0;box-shadow: none;} + +.tox .tox-toolbar,.tox .tox-toolbar__overflow,.tox .tox-toolbar__primary{display: flex;padding: 0 0;margin-bottom: -1px;background: url("data:image/svg+xml;charset=utf8,%3Csvg height='39px' viewBox='0 0 40 39px' width='40' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='0' y='38px' width='100' height='1' fill='%23cccccc'/%3E%3C/svg%3E") left 0 top 0 #fff;background-color: #fff;border-top: 1px solid #ccc;flex: 0 0 auto;flex-shrink: 0;flex-wrap: wrap;} + +.tox .tox-toolbar__overflow.tox-toolbar__overflow--closed{height: 0;opacity: 0;visibility: hidden;} + +.tox .tox-toolbar__overflow--growing{transition: height .3s ease,opacity .2s linear .1s;} + +.tox .tox-toolbar__overflow--shrinking{transition: opacity .3s ease,height .2s linear .1s,visibility 0s linear .3s;} + +.tox .tox-pop .tox-toolbar{border-width: 0;} + +.tox .tox-toolbar--no-divider{background-image: none;} + +.tox.tox-tinymce-aux .tox-toolbar__overflow{background-color: #fff;border: 1px solid #ccc;border-radius: 3px;box-shadow: 0 1px 3px rgba(0,0,0,.15);} + +.tox.tox-tinymce-aux:not([dir=rtl]) .tox-toolbar__overflow{margin-left: 4px;} + +.tox[dir=rtl] .tox-tbtn__icon-rtl svg{transform: rotateY(180deg);} + +.tox[dir=rtl].tox-tinymce-aux .tox-toolbar__overflow{margin-right: 4px;} + +.tox .tox-toolbar__group{display: flex;padding: 0 4px;margin: 0 0;align-items: center;flex-wrap: wrap;} + +.tox .tox-toolbar__group--pull-right{margin-left: auto;} + +.tox:not([dir=rtl]) .tox-toolbar__group:not(:last-of-type){border-right: 1px solid #ccc;} + +.tox[dir=rtl] .tox-toolbar__group:not(:last-of-type){border-left: 1px solid #ccc;} + +.tox .tox-tooltip{position: relative;display: inline-block;padding: 8px;} + +.tox .tox-tooltip__body{padding: 4px 8px;font-size: 14px;font-style: normal;font-weight: 400;color: rgba(255,255,255,.75);text-transform: normal;background-color: #222f3e;border-radius: 3px;box-shadow: 0 2px 4px rgba(34,47,62,.3);} + +.tox .tox-tooltip__arrow{position: absolute;} + +.tox .tox-tooltip--down .tox-tooltip__arrow{position: absolute;bottom: 0;left: 50%;border-top: 8px solid #222f3e;border-right: 8px solid transparent;border-left: 8px solid transparent;transform: translateX(-50%);} + +.tox .tox-tooltip--up .tox-tooltip__arrow{position: absolute;top: 0;left: 50%;border-right: 8px solid transparent;border-bottom: 8px solid #222f3e;border-left: 8px solid transparent;transform: translateX(-50%);} + +.tox .tox-tooltip--right .tox-tooltip__arrow{position: absolute;top: 50%;right: 0;border-top: 8px solid transparent;border-bottom: 8px solid transparent;border-left: 8px solid #222f3e;transform: translateY(-50%);} + +.tox .tox-tooltip--left .tox-tooltip__arrow{position: absolute;top: 50%;left: 0;border-top: 8px solid transparent;border-right: 8px solid #222f3e;border-bottom: 8px solid transparent;transform: translateY(-50%);} + +.tox .tox-well{width: 100%;padding: 8px;border: 1px solid #ccc;border-radius: 3px;} + +.tox .tox-well>:first-child{margin-top: 0;} + +.tox .tox-well>:last-child{margin-bottom: 0;} + +.tox .tox-well>:only-child{margin: 0;} + +.tox .tox-custom-editor{display: flex;height: 525px;border: 1px solid #ccc;border-radius: 3px;} + +.tox .tox-dialog-loading::before{position: absolute;z-index: 1000;width: 100%;height: 100%;background-color: rgba(0,0,0,.5);content: "";} + +.tox .tox-tab{cursor: pointer;} + +.tox .tox-dialog__content-js{display: flex;flex: 1;-ms-flex-preferred-size: auto;} + +.tox .tox-dialog__body-content .tox-collection{display: flex;flex: 1;-ms-flex-preferred-size: auto;} + +.tox ul{display: block;list-style-type: disc;-webkit-margin-before: 1em;margin-block-start: 1em;-webkit-margin-after: 1em;margin-block-end: 1em;-webkit-margin-start: 0;margin-inline-start: 0;-webkit-margin-end: 0;margin-inline-end: 0;-webkit-padding-start: 40px;padding-inline-start: 40px;} + +.tox a{color: #2276d2;cursor: pointer;} + +.tox .tox-image-tools-edit-panel{height: 60px;} + +.tox .tox-image-tools__sidebar{height: 60px;} diff --git a/public/resource/tinymce/skins/ui/oxide/skin.mobile.min.css b/public/resource/tinymce/skins/ui/oxide/skin.mobile.min.css new file mode 100644 index 0000000..14847d0 --- /dev/null +++ b/public/resource/tinymce/skins/ui/oxide/skin.mobile.min.css @@ -0,0 +1,239 @@ +/** + * Copyright (c) Tiny Technologies, Inc. All rights reserved. + * Licensed under the LGPL or a commercial license. + * For LGPL see License.txt in the project root for license information. + * For commercial licenses see https://www.tiny.cloud/ + */ +.tinymce-mobile-outer-container{all: initial;display: block;} + +.tinymce-mobile-outer-container *{float: none;padding: 0;margin: 0;line-height: 1;text-shadow: none;white-space: nowrap;cursor: inherit;border: 0;outline: 0;box-sizing: initial;-webkit-tap-highlight-color: transparent;} + +.tinymce-mobile-icon-arrow-back::before{content: "\e5cd";} + +.tinymce-mobile-icon-image::before{content: "\e412";} + +.tinymce-mobile-icon-cancel-circle::before{content: "\e5c9";} + +.tinymce-mobile-icon-full-dot::before{content: "\e061";} + +.tinymce-mobile-icon-align-center::before{content: "\e234";} + +.tinymce-mobile-icon-align-left::before{content: "\e236";} + +.tinymce-mobile-icon-align-right::before{content: "\e237";} + +.tinymce-mobile-icon-bold::before{content: "\e238";} + +.tinymce-mobile-icon-italic::before{content: "\e23f";} + +.tinymce-mobile-icon-unordered-list::before{content: "\e241";} + +.tinymce-mobile-icon-ordered-list::before{content: "\e242";} + +.tinymce-mobile-icon-font-size::before{content: "\e245";} + +.tinymce-mobile-icon-underline::before{content: "\e249";} + +.tinymce-mobile-icon-link::before{content: "\e157";} + +.tinymce-mobile-icon-unlink::before{content: "\eca2";} + +.tinymce-mobile-icon-color::before{content: "\e891";} + +.tinymce-mobile-icon-previous::before{content: "\e314";} + +.tinymce-mobile-icon-next::before{content: "\e315";} + +.tinymce-mobile-icon-large-font::before,.tinymce-mobile-icon-style-formats::before{content: "\e264";} + +.tinymce-mobile-icon-undo::before{content: "\e166";} + +.tinymce-mobile-icon-redo::before{content: "\e15a";} + +.tinymce-mobile-icon-removeformat::before{content: "\e239";} + +.tinymce-mobile-icon-small-font::before{content: "\e906";} + +.tinymce-mobile-format-matches::after,.tinymce-mobile-icon-readonly-back::before{content: "\e5ca";} + +.tinymce-mobile-icon-small-heading::before{content: "small";} + +.tinymce-mobile-icon-large-heading::before{content: "large";} + +.tinymce-mobile-icon-large-heading::before,.tinymce-mobile-icon-small-heading::before{font-family: sans-serif;font-size: 80%;} + +.tinymce-mobile-mask-edit-icon::before{content: "\e254";} + +.tinymce-mobile-icon-back::before{content: "\e5c4";} + +.tinymce-mobile-icon-heading::before{font-family: sans-serif;font-size: 80%;font-weight: 700;content: "Headings";} + +.tinymce-mobile-icon-h1::before{font-weight: 700;content: "H1";} + +.tinymce-mobile-icon-h2::before{font-weight: 700;content: "H2";} + +.tinymce-mobile-icon-h3::before{font-weight: 700;content: "H3";} + +.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask{position: absolute;top: 0;display: flex;width: 100%;height: 100%;background: rgba(51,51,51,.5);align-items: center;justify-content: center;} + +.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask .tinymce-mobile-content-container{display: flex;font-family: sans-serif;font-size: 1em;border-radius: 50%;align-items: center;flex-direction: column;justify-content: space-between;} + +.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask .tinymce-mobile-content-container .mixin-menu-item{display: flex;width: 2.1em;height: 2.1em;border-radius: 50%;align-items: center;justify-content: center;} + +.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask .tinymce-mobile-content-container .tinymce-mobile-content-tap-section{align-items: center;display: flex;justify-content: center;flex-direction: column;font-size: 1em;}@media only screen and (min-device-width: 700px){.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask .tinymce-mobile-content-container .tinymce-mobile-content-tap-section{font-size: 1.2em;}} + +.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask .tinymce-mobile-content-container .tinymce-mobile-content-tap-section .tinymce-mobile-mask-tap-icon{display: flex;width: 2.1em;height: 2.1em;color: #207ab7;background-color: #fff;border-radius: 50%;align-items: center;justify-content: center;} + +.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask .tinymce-mobile-content-container .tinymce-mobile-content-tap-section .tinymce-mobile-mask-tap-icon::before{font-family: tinymce-mobile,sans-serif;content: "\e900";} + +.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask .tinymce-mobile-content-container .tinymce-mobile-content-tap-section:not(.tinymce-mobile-mask-tap-icon-selected) .tinymce-mobile-mask-tap-icon{z-index: 2;} + +.tinymce-mobile-android-container.tinymce-mobile-android-maximized{position: fixed;top: 0;right: 0;bottom: 0;left: 0;display: flex;background: #fff;border: none;flex-direction: column;} + +.tinymce-mobile-android-container:not(.tinymce-mobile-android-maximized){position: relative;} + +.tinymce-mobile-android-container .tinymce-mobile-editor-socket{display: flex;flex-grow: 1;} + +.tinymce-mobile-android-container .tinymce-mobile-editor-socket iframe{display: flex !important;flex-grow: 1;height: auto !important;} + +.tinymce-mobile-android-scroll-reload{overflow: hidden;} + +:not(.tinymce-mobile-readonly-mode)>.tinymce-mobile-android-selection-context-toolbar{margin-top: 23px;} + +.tinymce-mobile-toolstrip{z-index: 1;display: flex;background: #fff;flex: 0 0 auto;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar{display: flex;width: 100%;height: 2.5em;background-color: #fff;border-bottom: 1px solid #ccc;align-items: center;flex: 1;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group{align-items: center;display: flex;height: 100%;flex-shrink: 1;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group>div{align-items: center;display: flex;height: 100%;flex: 1;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group.tinymce-mobile-exit-container{background: #f44336;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group.tinymce-mobile-toolbar-scrollable-group{flex-grow: 1;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group .tinymce-mobile-toolbar-group-item{padding-right: .5em;padding-left: .5em;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group .tinymce-mobile-toolbar-group-item.tinymce-mobile-toolbar-button{display: flex;height: 80%;margin-right: 2px;margin-left: 2px;align-items: center;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group .tinymce-mobile-toolbar-group-item.tinymce-mobile-toolbar-button.tinymce-mobile-toolbar-button-selected{color: #ccc;background: #c8cbcf;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group:first-of-type,.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group:last-of-type{color: #eceff1;background: #207ab7;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group{display: flex;height: 100%;padding-top: .4em;padding-bottom: .4em;align-items: center;flex: 1;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog{position: relative;display: flex;width: 100%;min-height: 1.5em;padding-right: 0;padding-left: 0;overflow: hidden;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain{display: flex;width: 100%;height: 100%;transition: left cubic-bezier(.4,0,1,1) .15s;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen{display: flex;flex: 0 0 auto;justify-content: space-between;width: 100%;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen input{font-family: sans-serif;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-input-container{position: relative;display: flex;flex-grow: 1;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-input-container .tinymce-mobile-input-container-x{position: absolute;right: 0;height: 100%;padding-right: 2px;font-size: .6em;font-weight: 700;color: #888;background: inherit;border: none;border-radius: 50%;align-self: center;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-input-container.tinymce-mobile-input-container-empty .tinymce-mobile-input-container-x{display: none;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-icon-next,.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-icon-previous{align-items: center;display: flex;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-icon-next::before,.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-icon-previous::before{display: flex;height: 100%;padding-right: .5em;padding-left: .5em;font-weight: 700;align-items: center;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-icon-next.tinymce-mobile-toolbar-navigation-disabled::before,.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-icon-previous.tinymce-mobile-toolbar-navigation-disabled::before{visibility: hidden;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-dot-item{padding-top: 3px;margin: 0 2px;font-size: 10px;line-height: 10px;color: #ccc;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-dot-item.tinymce-mobile-dot-active{color: #c8cbcf;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-icon-large-font::before,.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-icon-large-heading::before{margin-right: .9em;margin-left: .5em;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-icon-small-font::before,.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-icon-small-heading::before{margin-right: .5em;margin-left: .9em;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider{position: relative;display: flex;padding: .28em 0;margin-right: 0;margin-left: 0;flex: 1;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider .tinymce-mobile-slider-size-container{align-items: center;display: flex;flex-grow: 1;height: 100%;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider .tinymce-mobile-slider-size-container .tinymce-mobile-slider-size-line{display: flex;height: .2em;margin-top: .3em;margin-bottom: .3em;background: #ccc;flex: 1;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider.tinymce-mobile-hue-slider-container{padding-right: 2em;padding-left: 2em;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider.tinymce-mobile-hue-slider-container .tinymce-mobile-slider-gradient-container{align-items: center;display: flex;flex-grow: 1;height: 100%;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider.tinymce-mobile-hue-slider-container .tinymce-mobile-slider-gradient-container .tinymce-mobile-slider-gradient{display: flex;height: .2em;margin-top: .3em;margin-bottom: .3em;background: linear-gradient(to right,red 0,#feff00 17%,#0f0 33%,#00feff 50%,#00f 67%,#ff00fe 83%,red 100%);flex: 1;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider.tinymce-mobile-hue-slider-container .tinymce-mobile-hue-slider-black{width: 1.2em;height: .2em;margin-top: .3em;margin-bottom: .3em;background: #000;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider.tinymce-mobile-hue-slider-container .tinymce-mobile-hue-slider-white{width: 1.2em;height: .2em;margin-top: .3em;margin-bottom: .3em;background: #fff;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider .tinymce-mobile-slider-thumb{position: absolute;top: 0;bottom: 0;left: -10px;display: flex;width: .5em;height: .5em;margin: auto;color: #fff;background-color: #455a64;border: .5em solid rgba(136,136,136,0);border-radius: 3em;transition: border 120ms cubic-bezier(.39,.58,.57,1);background-clip: padding-box;align-items: center;justify-content: center;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider .tinymce-mobile-slider-thumb.tinymce-mobile-thumb-active{border: .5em solid rgba(136,136,136,.39);} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serializer-wrapper,.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group>div{align-items: center;display: flex;height: 100%;flex: 1;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serializer-wrapper{flex-direction: column;justify-content: center;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-toolbar-group-item{align-items: center;display: flex;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-toolbar-group-item:not(.tinymce-mobile-serialised-dialog){height: 100%;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-dot-container{display: flex;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group input{padding-top: .1em;padding-bottom: .1em;padding-left: 5px;font-size: .85em;color: #455a64;background: #fff;border: none;border-radius: 0;flex-grow: 1;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group input::-webkit-input-placeholder{color: #888;} + +.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group input::placeholder{color: #888;} + +.tinymce-mobile-dropup{display: flex;width: 100%;overflow: hidden;background: #fff;} + +.tinymce-mobile-dropup.tinymce-mobile-dropup-shrinking{transition: height .3s ease-out;} + +.tinymce-mobile-dropup.tinymce-mobile-dropup-growing{transition: height .3s ease-in;} + +.tinymce-mobile-dropup.tinymce-mobile-dropup-closed{flex-grow: 0;} + +.tinymce-mobile-dropup.tinymce-mobile-dropup-open:not(.tinymce-mobile-dropup-growing){flex-grow: 1;} + +.tinymce-mobile-ios-container .tinymce-mobile-dropup:not(.tinymce-mobile-dropup-closed){min-height: 200px;}@media only screen and (orientation: landscape){.tinymce-mobile-dropup:not(.tinymce-mobile-dropup-closed){min-height: 200px;}}@media only screen and (min-device-width: 320px) and (max-device-width: 568px) and (orientation: landscape){.tinymce-mobile-ios-container .tinymce-mobile-dropup:not(.tinymce-mobile-dropup-closed){min-height: 150px;}} + +.tinymce-mobile-styles-menu{position: relative;width: 100%;overflow: hidden;font-family: sans-serif;outline: 4px solid #000;} + +.tinymce-mobile-styles-menu [role=menu]{position: absolute;display: flex;width: 100%;height: 100%;flex-direction: column;} + +.tinymce-mobile-styles-menu [role=menu].transitioning{transition: transform .5s ease-in-out;} + +.tinymce-mobile-styles-menu .tinymce-mobile-styles-item{position: relative;display: flex;padding: 1em 1em;color: #455a64;cursor: pointer;border-bottom: 1px solid #ddd;} + +.tinymce-mobile-styles-menu .tinymce-mobile-styles-collapser .tinymce-mobile-styles-collapse-icon::before{font-family: tinymce-mobile,sans-serif;color: #455a64;content: "\e314";} + +.tinymce-mobile-styles-menu .tinymce-mobile-styles-item.tinymce-mobile-styles-item-is-menu::after{position: absolute;right: 0;padding-right: 1em;padding-left: 1em;font-family: tinymce-mobile,sans-serif;color: #455a64;content: "\e315";} + +.tinymce-mobile-styles-menu .tinymce-mobile-styles-item.tinymce-mobile-format-matches::after{position: absolute;right: 0;padding-right: 1em;padding-left: 1em;font-family: tinymce-mobile,sans-serif;} + +.tinymce-mobile-styles-menu .tinymce-mobile-styles-collapser,.tinymce-mobile-styles-menu .tinymce-mobile-styles-separator{display: flex;min-height: 2.5em;padding-right: 1em;padding-left: 1em;color: #455a64;background: #fff;border-top: #455a64;align-items: center;} + +.tinymce-mobile-styles-menu [data-transitioning-destination=before][data-transitioning-state],.tinymce-mobile-styles-menu [data-transitioning-state=before]{transform: translate(-100%);} + +.tinymce-mobile-styles-menu [data-transitioning-destination=current][data-transitioning-state],.tinymce-mobile-styles-menu [data-transitioning-state=current]{transform: translate(0);} + +.tinymce-mobile-styles-menu [data-transitioning-destination=after][data-transitioning-state],.tinymce-mobile-styles-menu [data-transitioning-state=after]{transform: translate(100%);}@font-face{font-family: tinymce-mobile;font-style: normal;font-weight: 400;src: url(fonts/tinymce-mobile.woff?8x92w3) format('woff');}@media (min-device-width: 700px){.tinymce-mobile-outer-container,.tinymce-mobile-outer-container input{font-size: 25px;}}@media (max-device-width: 700px){.tinymce-mobile-outer-container,.tinymce-mobile-outer-container input{font-size: 18px;}} + +.tinymce-mobile-icon{font-family: tinymce-mobile,sans-serif;} + +.mixin-flex-and-centre{align-items: center;display: flex;justify-content: center;} + +.mixin-flex-bar{align-items: center;display: flex;height: 100%;} + +.tinymce-mobile-outer-container .tinymce-mobile-editor-socket iframe{width: 100%;background-color: #fff;} + +.tinymce-mobile-editor-socket .tinymce-mobile-mask-edit-icon{position: fixed;right: 2em;bottom: 1em;display: flex;width: 2.1em;height: 2.1em;font-size: 1em;color: #fff;background-color: #207ab7;border-radius: 50%;align-items: center;justify-content: center;}@media only screen and (min-device-width: 700px){.tinymce-mobile-editor-socket .tinymce-mobile-mask-edit-icon{font-size: 1.2em;}} + +.tinymce-mobile-outer-container:not(.tinymce-mobile-fullscreen-maximized) .tinymce-mobile-editor-socket{height: 300px;overflow: hidden;} + +.tinymce-mobile-outer-container:not(.tinymce-mobile-fullscreen-maximized) .tinymce-mobile-editor-socket iframe{height: 100%;} + +.tinymce-mobile-outer-container:not(.tinymce-mobile-fullscreen-maximized) .tinymce-mobile-toolstrip{display: none;} + +input[type=file]::-webkit-file-upload-button{display: none;}@media only screen and (min-device-width: 320px) and (max-device-width: 568px) and (orientation: landscape){.tinymce-mobile-ios-container .tinymce-mobile-editor-socket .tinymce-mobile-mask-edit-icon{bottom: 50%;}} diff --git a/src/App.vue b/src/App.vue new file mode 100644 index 0000000..2d5a076 --- /dev/null +++ b/src/App.vue @@ -0,0 +1,110 @@ + + + + diff --git a/src/api/common/api.ts b/src/api/common/api.ts new file mode 100644 index 0000000..19365dd --- /dev/null +++ b/src/api/common/api.ts @@ -0,0 +1,156 @@ +import { defHttp } from '/@/utils/http/axios'; +import { message } from 'ant-design-vue'; +import { useGlobSetting } from '/@/hooks/setting'; +const globSetting = useGlobSetting(); +const baseUploadUrl = globSetting.uploadUrl; +enum Api { + positionList = '/sys/position/list', + userList = '/sys/user/list', + roleList = '/sys/role/list', + queryDepartTreeSync = '/sys/sysDepart/queryDepartTreeSync', + queryTreeList = '/sys/sysDepart/queryTreeList', + loadTreeData = '/sys/category/loadTreeData', + loadDictItem = '/sys/category/loadDictItem/', + getDictItems = '/sys/dict/getDictItems/', + getTableList = '/sys/user/queryUserComponentData', + getCategoryData = '/sys/category/loadAllData', + refreshDragCache = '/drag/page/refreshCache', +} + +/** + * 上传父路径 + */ +export const uploadUrl = `${baseUploadUrl}/sys/common/upload`; + +/** + * 职务列表 + * @param params + */ +export const getPositionList = (params) => { + return defHttp.get({ url: Api.positionList, params }); +}; + +/** + * 用户列表 + * @param params + */ +export const getUserList = (params) => { + return defHttp.get({ url: Api.userList, params }); +}; + +/** + * 角色列表 + * @param params + */ +export const getRoleList = (params) => { + return defHttp.get({ url: Api.roleList, params }); +}; + +/** + * 异步获取部门树列表 + */ +export const queryDepartTreeSync = (params?) => { + return defHttp.get({ url: Api.queryDepartTreeSync, params }); +}; +/** + * 获取部门树列表 + */ +export const queryTreeList = (params?) => { + return defHttp.get({ url: Api.queryTreeList, params }); +}; + +/** + * 分类字典树控件 加载节点 + */ +export const loadTreeData = (params?) => { + return defHttp.get({ url: Api.loadTreeData, params }); +}; + +/** + * 根据字典code加载字典text + */ +export const loadDictItem = (params?) => { + return defHttp.get({ url: Api.loadDictItem, params }); +}; + +/** + * 根据字典code加载字典text + */ +export const getDictItems = (dictCode) => { + return defHttp.get({ url: Api.getDictItems + dictCode }, { joinTime: false }); +}; +/** + * 部门用户modal选择列表加载list + */ +export const getTableList = (params) => { + return defHttp.get({ url: Api.getTableList, params }); +}; +/** + * 加载全部分类字典数据 + */ +export const loadCategoryData = (params) => { + return defHttp.get({ url: Api.getCategoryData, params }); +}; +/** + * 文件上传 + */ +export const uploadFile = (params, success) => { + return defHttp.uploadFile({ url: uploadUrl }, params, { success }); +}; +/** + * 下载文件 + * @param url 文件路径 + * @param fileName 文件名 + * @param parameter + * @returns {*} + */ +export const downloadFile = (url, fileName?, parameter?) => { + return getFileblob(url, parameter).then((data) => { + if (!data || data.size === 0) { + message.warning('文件下载失败'); + return; + } + if (typeof window.navigator.msSaveBlob !== 'undefined') { + window.navigator.msSaveBlob(new Blob([data]), fileName); + } else { + let url = window.URL.createObjectURL(new Blob([data])); + let link = document.createElement('a'); + link.style.display = 'none'; + link.href = url; + link.setAttribute('download', fileName); + document.body.appendChild(link); + link.click(); + document.body.removeChild(link); //下载完成移除元素 + window.URL.revokeObjectURL(url); //释放掉blob对象 + } + }); +}; + +/** + * 下载文件 用于excel导出 + * @param url + * @param parameter + * @returns {*} + */ +export const getFileblob = (url, parameter) => { + return defHttp.get( + { + url: url, + params: parameter, + responseType: 'blob', + }, + { isTransformResponse: false } + ); +}; + +/** + * 【用于评论功能】自定义文件上传-方法 + */ +export const uploadMyFile = (url, data) => { + return defHttp.uploadMyFile(url, data); +}; +/** + * 刷新仪表盘缓存 + * @param params + */ +export const refreshDragCache = () => defHttp.get({ url: Api.refreshDragCache }, { isTransformResponse: false }); diff --git a/src/api/demo/account.ts b/src/api/demo/account.ts new file mode 100644 index 0000000..2c3ea06 --- /dev/null +++ b/src/api/demo/account.ts @@ -0,0 +1,16 @@ +import { defHttp } from '/@/utils/http/axios'; +import { GetAccountInfoModel } from './model/accountModel'; + +enum Api { + ACCOUNT_INFO = '/mock/account/getAccountInfo', + SESSION_TIMEOUT = '/mock/user/sessionTimeout', + TOKEN_EXPIRED = '/mock/user/tokenExpired', +} + +// Get personal center-basic settings + +export const accountInfoApi = () => defHttp.get({ url: Api.ACCOUNT_INFO }); + +export const sessionTimeoutApi = () => defHttp.post({ url: Api.SESSION_TIMEOUT }); + +export const tokenExpiredApi = () => defHttp.post({ url: Api.TOKEN_EXPIRED }); diff --git a/src/api/demo/error.ts b/src/api/demo/error.ts new file mode 100644 index 0000000..3ce6072 --- /dev/null +++ b/src/api/demo/error.ts @@ -0,0 +1,12 @@ +import { defHttp } from '/@/utils/http/axios'; + +enum Api { + // The address does not exist + Error = '/error', +} + +/** + * @description: Trigger ajax error + */ + +export const fireErrorApi = () => defHttp.get({ url: Api.Error }); diff --git a/src/api/demo/model/accountModel.ts b/src/api/demo/model/accountModel.ts new file mode 100644 index 0000000..4594393 --- /dev/null +++ b/src/api/demo/model/accountModel.ts @@ -0,0 +1,7 @@ +export interface GetAccountInfoModel { + email: string; + name: string; + introduction: string; + phone: string; + address: string; +} diff --git a/src/api/demo/model/optionsModel.ts b/src/api/demo/model/optionsModel.ts new file mode 100644 index 0000000..c15ef8f --- /dev/null +++ b/src/api/demo/model/optionsModel.ts @@ -0,0 +1,15 @@ +import { BasicFetchResult } from '/@/api/model/baseModel'; + +export interface DemoOptionsItem { + label: string; + value: string; +} + +export interface selectParams { + id: number | string; +} + +/** + * @description: Request list return value + */ +export type DemoOptionsGetResultModel = BasicFetchResult; diff --git a/src/api/demo/model/systemModel.ts b/src/api/demo/model/systemModel.ts new file mode 100644 index 0000000..72904de --- /dev/null +++ b/src/api/demo/model/systemModel.ts @@ -0,0 +1,103 @@ +import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel'; + +export type AccountParams = BasicPageParams & { + account?: string; + nickname?: string; +}; + +export type RoleParams = { + roleName?: string; + status?: string; +}; + +export type TestParams = { + testName?: string; +}; + +export type RolePageParams = BasicPageParams & RoleParams; + +export type TestPageParams = BasicPageParams & TestParams; + +export type UserPageParams = BasicPageParams & UserParams; + +export type DeptParams = { + deptName?: string; + status?: string; +}; + +export type UserParams = { + username?: string; +}; + +export type MenuParams = { + menuName?: string; + status?: string; +}; + +export interface AccountListItem { + id: string; + account: string; + email: string; + nickname: string; + role: number; + createTime: string; + remark: string; + status: number; +} + +export interface DeptListItem { + id: string; + orderNo: string; + createTime: string; + remark: string; + status: number; +} + +export interface MenuListItem { + id: string; + orderNo: string; + createTime: string; + status: number; + icon: string; + component: string; + permission: string; +} + +export interface RoleListItem { + id: string; + roleName: string; + roleValue: string; + status: number; + orderNo: string; + createTime: string; +} +export interface TestListItem { + id: string; + testName: string; + testValue: string; + createTime: string; +} + +export interface UserListItem { + id: string; + username: string; + password: string; + realname: string; +} + +/** + * @description: Request list return value + */ +export type AccountListGetResultModel = BasicFetchResult; + +export type DeptListGetResultModel = BasicFetchResult; + +export type MenuListGetResultModel = BasicFetchResult; + +export type RolePageListGetResultModel = BasicFetchResult; + +export type RoleListGetResultModel = RoleListItem[]; + +export type TestListGetResultModel = TestListItem[]; + +export type UserListGetResultModel = UserListItem[]; diff --git a/src/api/demo/model/tableModel.ts b/src/api/demo/model/tableModel.ts new file mode 100644 index 0000000..322a8b4 --- /dev/null +++ b/src/api/demo/model/tableModel.ts @@ -0,0 +1,20 @@ +import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel'; +/** + * @description: Request list interface parameters + */ +export type DemoParams = BasicPageParams; + +export interface DemoListItem { + id: string; + beginTime: string; + endTime: string; + address: string; + name: string; + no: number; + status: number; +} + +/** + * @description: Request list return value + */ +export type DemoListGetResultModel = BasicFetchResult; diff --git a/src/api/demo/select.ts b/src/api/demo/select.ts new file mode 100644 index 0000000..9fb5cae --- /dev/null +++ b/src/api/demo/select.ts @@ -0,0 +1,10 @@ +import { defHttp } from '/@/utils/http/axios'; +import { DemoOptionsItem, selectParams } from './model/optionsModel'; +enum Api { + OPTIONS_LIST = '/mock/select/getDemoOptions', +} + +/** + * @description: Get sample options value + */ +export const optionsListApi = (params?: selectParams) => defHttp.get({ url: Api.OPTIONS_LIST, params }); diff --git a/src/api/demo/system.ts b/src/api/demo/system.ts new file mode 100644 index 0000000..01c1fd5 --- /dev/null +++ b/src/api/demo/system.ts @@ -0,0 +1,45 @@ +import { + AccountParams, + DeptListItem, + MenuParams, + RoleParams, + TestPageParams, + RolePageParams, + MenuListGetResultModel, + DeptListGetResultModel, + AccountListGetResultModel, + RolePageListGetResultModel, + RoleListGetResultModel, + TestListGetResultModel, +} from './model/systemModel'; +import { defHttp } from '/@/utils/http/axios'; + +enum Api { + AccountList = '/mock/system/getAccountList', + IsAccountExist = '/mock/system/accountExist', + DeptList = '/mock/system/getDeptList', + setRoleStatus = '/mock/system/setRoleStatus', + MenuList = '/mock/system/getMenuList', + RolePageList = '/mock/system/getRoleListByPage', + DemoTableList = '/mock/system/getDemoTableListByPage', + TestPageList = '/mock/system/getTestListByPage', + GetAllRoleList = '/mock/system/getAllRoleList', +} + +export const getAccountList = (params: AccountParams) => defHttp.get({ url: Api.AccountList, params }); + +export const getDeptList = (params?: DeptListItem) => defHttp.get({ url: Api.DeptList, params }); + +export const getMenuList = (params?: MenuParams) => defHttp.get({ url: Api.MenuList, params }); + +export const getRoleListByPage = (params?: RolePageParams) => defHttp.get({ url: Api.RolePageList, params }); + +export const getAllRoleList = (params?: RoleParams) => defHttp.get({ url: Api.GetAllRoleList, params }); + +export const setRoleStatus = (id: number, status: string) => defHttp.post({ url: Api.setRoleStatus, params: { id, status } }); + +export const getTestListByPage = (params?: TestPageParams) => defHttp.get({ url: Api.TestPageList, params }); + +export const getDemoTableListByPage = (params) => defHttp.get({ url: Api.DemoTableList, params }); + +export const isAccountExist = (account: string) => defHttp.post({ url: Api.IsAccountExist, params: { account } }, { errorMessageMode: 'none' }); diff --git a/src/api/demo/table.ts b/src/api/demo/table.ts new file mode 100644 index 0000000..41ada55 --- /dev/null +++ b/src/api/demo/table.ts @@ -0,0 +1,19 @@ +import { defHttp } from '/@/utils/http/axios'; +import { DemoParams, DemoListGetResultModel } from './model/tableModel'; + +enum Api { + DEMO_LIST = '/mock/table/getDemoList', +} + +/** + * @description: Get sample list value + */ + +export const demoListApi = (params: DemoParams) => + defHttp.get({ + url: Api.DEMO_LIST, + params, + headers: { + ignoreCancelToken: true, + }, + }); diff --git a/src/api/demo/tree.ts b/src/api/demo/tree.ts new file mode 100644 index 0000000..8fe3acf --- /dev/null +++ b/src/api/demo/tree.ts @@ -0,0 +1,10 @@ +import { defHttp } from '/@/utils/http/axios'; + +enum Api { + TREE_OPTIONS_LIST = '/mock/tree/getDemoOptions', +} + +/** + * @description: Get sample options value + */ +export const treeOptionsListApi = (params?: Recordable) => defHttp.get({ url: Api.TREE_OPTIONS_LIST, params }); diff --git a/src/api/model/baseModel.ts b/src/api/model/baseModel.ts new file mode 100644 index 0000000..7a4d797 --- /dev/null +++ b/src/api/model/baseModel.ts @@ -0,0 +1,14 @@ +export interface BasicPageParams { + page: number; + pageSize: number; +} + +export interface BasicFetchResult { + items: T[]; + total: number; +} + +export interface BasicResult { + records: T[]; + total: number; +} diff --git a/src/api/sys/menu.ts b/src/api/sys/menu.ts new file mode 100644 index 0000000..27d9ba5 --- /dev/null +++ b/src/api/sys/menu.ts @@ -0,0 +1,43 @@ +import { defHttp } from '/@/utils/http/axios'; +import { getMenuListResultModel } from './model/menuModel'; + +enum Api { + GetMenuList = '/sys/permission/getUserPermissionByToken', + // 【QQYUN-8487】 + // SwitchVue3Menu = '/sys/switchVue3Menu', +} + +/** + * @description: Get user menu based on id + */ + +export const getMenuList = () => { + return new Promise((resolve) => { + //为了兼容mock和接口数据 + defHttp.get({ url: Api.GetMenuList }).then((res) => { + if (Array.isArray(res)) { + resolve(res); + } else { + resolve(res['menu']); + } + }); + }); +}; + +/** + * @description: 获取后台菜单权限和按钮权限 + */ +export function getBackMenuAndPerms() { + return defHttp.get({ url: Api.GetMenuList }); +} + +/** + * 切换成vue3菜单 + */ + // update-begin--author:liaozhiyang---date:20240313---for:【QQYUN-8487】注释掉判断菜单是否vue2版本逻辑代码 +// export const switchVue3Menu = () => { +// return new Promise((resolve) => { +// defHttp.get({ url: Api.SwitchVue3Menu }); +// }); +// }; +// update-end--author:liaozhiyang---date:20240313---for:【QQYUN-8487】注释掉判断菜单是否vue2版本逻辑代码 diff --git a/src/api/sys/model/menuModel.ts b/src/api/sys/model/menuModel.ts new file mode 100644 index 0000000..8d19eea --- /dev/null +++ b/src/api/sys/model/menuModel.ts @@ -0,0 +1,16 @@ +import type { RouteMeta } from 'vue-router'; +export interface RouteItem { + path: string; + component: any; + meta: RouteMeta; + name?: string; + alias?: string | string[]; + redirect?: string; + caseSensitive?: boolean; + children?: RouteItem[]; +} + +/** + * @description: Get menu return value + */ +export type getMenuListResultModel = RouteItem[]; diff --git a/src/api/sys/model/uploadModel.ts b/src/api/sys/model/uploadModel.ts new file mode 100644 index 0000000..d770c64 --- /dev/null +++ b/src/api/sys/model/uploadModel.ts @@ -0,0 +1,5 @@ +export interface UploadApiResult { + message: string; + code: number; + url: string; +} diff --git a/src/api/sys/model/userModel.ts b/src/api/sys/model/userModel.ts new file mode 100644 index 0000000..f1d9be7 --- /dev/null +++ b/src/api/sys/model/userModel.ts @@ -0,0 +1,58 @@ +/** + * @description: Login interface parameters + */ +export interface LoginParams { + username: string; + password: string; +} + +export interface ThirdLoginParams { + token: string; + thirdType: string; +} + +export interface RoleInfo { + roleName: string; + value: string; +} + +/** + * @description: Login interface return value + */ +export interface LoginResultModel { + userId: string | number; + token: string; + role: RoleInfo; + userInfo?: any +} + +/** + * @description: Get user information return value + */ +export interface GetUserInfoModel { + roles: RoleInfo[]; + // 用户id + userId: string | number; + // 用户名 + username: string; + // 真实名字 + realname: string; + // 头像 + avatar: string; + // 介绍 + desc?: string; + // 用户信息 + userInfo?: any; + // 缓存字典项 + sysAllDictItems?: any; +} + +/** + * @description: Get user information return value + */ +export interface GetResultModel { + code: number; + message: string; + result: object; + success: Boolean; +} diff --git a/src/api/sys/upload.ts b/src/api/sys/upload.ts new file mode 100644 index 0000000..1a83e93 --- /dev/null +++ b/src/api/sys/upload.ts @@ -0,0 +1,32 @@ +import { UploadApiResult } from './model/uploadModel'; +import { defHttp } from '/@/utils/http/axios'; +import { UploadFileParams } from '/#/axios'; +import { useGlobSetting } from '/@/hooks/setting'; + +const { uploadUrl = '' } = useGlobSetting(); + +/** + * @description: Upload interface + */ +export function uploadApi(params: UploadFileParams, onUploadProgress: (progressEvent: ProgressEvent) => void) { + return defHttp.uploadFile( + { + url: uploadUrl, + onUploadProgress, + }, + params + ); +} +/** + * @description: Upload interface + */ +export function uploadImg(params: UploadFileParams, onUploadProgress: (progressEvent: ProgressEvent) => void) { + return defHttp.uploadFile( + { + url: `${uploadUrl}/sys/common/upload`, + onUploadProgress, + }, + params, + { isReturnResponse: true } + ); +} diff --git a/src/api/sys/user.ts b/src/api/sys/user.ts new file mode 100644 index 0000000..5ed47e3 --- /dev/null +++ b/src/api/sys/user.ts @@ -0,0 +1,222 @@ +import { defHttp } from '/@/utils/http/axios'; +import { LoginParams, LoginResultModel, GetUserInfoModel } from './model/userModel'; + +import { ErrorMessageMode } from '/#/axios'; +import { useMessage } from '/@/hooks/web/useMessage'; +import { useUserStoreWithOut } from '/@/store/modules/user'; +import { setAuthCache } from '/@/utils/auth'; +import { TOKEN_KEY } from '/@/enums/cacheEnum'; +import { router } from '/@/router'; +import { PageEnum } from '/@/enums/pageEnum'; +import { ExceptionEnum } from "@/enums/exceptionEnum"; + +const { createErrorModal } = useMessage(); +enum Api { + Login = '/sys/login', + phoneLogin = '/sys/phoneLogin', + Logout = '/sys/logout', + GetUserInfo = '/sys/user/getUserInfo', + // 获取系统权限 + // 1、查询用户拥有的按钮/表单访问权限 + // 2、所有权限 + // 3、系统安全模式 + GetPermCode = '/sys/permission/getPermCode', + //新加的获取图形验证码的接口 + getInputCode = '/sys/randomImage', + //获取短信验证码的接口 + getCaptcha = '/sys/sms', + //注册接口 + registerApi = '/sys/user/register', + //校验用户接口 + checkOnlyUser = '/sys/user/checkOnlyUser', + //SSO登录校验 + validateCasLogin = '/sys/cas/client/validateLogin', + //校验手机号 + phoneVerify = '/sys/user/phoneVerification', + //修改密码 + passwordChange = '/sys/user/passwordChange', + //第三方登录 + thirdLogin = '/sys/thirdLogin/getLoginUser', + //第三方登录 + getThirdCaptcha = '/sys/thirdSms', + //获取二维码信息 + getLoginQrcode = '/sys/getLoginQrcode', + //监控二维码扫描状态 + getQrcodeToken = '/sys/getQrcodeToken', +} + +/** + * @description: user login api + */ +export function loginApi(params: LoginParams, mode: ErrorMessageMode = 'modal') { + return defHttp.post( + { + url: Api.Login, + params, + }, + { + errorMessageMode: mode, + } + ); +} + +/** + * @description: user phoneLogin api + */ +export function phoneLoginApi(params: LoginParams, mode: ErrorMessageMode = 'modal') { + return defHttp.post( + { + url: Api.phoneLogin, + params, + }, + { + errorMessageMode: mode, + } + ); +} + +/** + * @description: getUserInfo + */ +export function getUserInfo() { + return defHttp.get({ url: Api.GetUserInfo }, {}).catch((e) => { + // update-begin--author:zyf---date:20220425---for:【VUEN-76】捕获接口超时异常,跳转到登录界面 + if (e && (e.message.includes('timeout') || e.message.includes('401'))) { + //接口不通时跳转到登录界面 + const userStore = useUserStoreWithOut(); + userStore.setToken(''); + setAuthCache(TOKEN_KEY, null); + + // update-begin-author:sunjianlei date:20230306 for: 修复登录成功后,没有正确重定向的问题 + router.push({ + path: PageEnum.BASE_LOGIN, + query: { + // 传入当前的路由,登录成功后跳转到当前路由 + redirect: router.currentRoute.value.fullPath, + } + }); + // update-end-author:sunjianlei date:20230306 for: 修复登录成功后,没有正确重定向的问题 + + } + // update-end--author:zyf---date:20220425---for:【VUEN-76】捕获接口超时异常,跳转到登录界面 + }); +} + +export function getPermCode() { + return defHttp.get({ url: Api.GetPermCode }); +} + +export function doLogout() { + return defHttp.get({ url: Api.Logout }); +} + +export function getCodeInfo(currdatetime) { + let url = Api.getInputCode + `/${currdatetime}`; + return defHttp.get({ url: url }); +} +/** + * @description: 获取短信验证码 + */ +export function getCaptcha(params) { + return new Promise((resolve, reject) => { + defHttp.post({ url: Api.getCaptcha, params }, { isTransformResponse: false }).then((res) => { + console.log(res); + if (res.success) { + resolve(true); + } else { + //update-begin---author:wangshuai---date:2024-04-18---for:【QQYUN-9005】同一个IP,1分钟超过5次短信,则提示需要验证码--- + if(res.code != ExceptionEnum.PHONE_SMS_FAIL_CODE){ + createErrorModal({ title: '错误提示', content: res.message || '未知问题' }); + reject(); + } + reject(res); + //update-end---author:wangshuai---date:2024-04-18---for:【QQYUN-9005】同一个IP,1分钟超过5次短信,则提示需要验证码--- + } + }).catch((res)=>{ + createErrorModal({ title: '错误提示', content: res.message || '未知问题' }); + reject(); + }); + }); +} + +/** + * @description: 注册接口 + */ +export function register(params) { + return defHttp.post({ url: Api.registerApi, params }, { isReturnNativeResponse: true }); +} + +/** + *校验用户是否存在 + * @param params + */ +export const checkOnlyUser = (params) => defHttp.get({ url: Api.checkOnlyUser, params }, { isTransformResponse: false }); +/** + *校验手机号码 + * @param params + */ +export const phoneVerify = (params) => defHttp.post({ url: Api.phoneVerify, params }, { isTransformResponse: false }); +/** + *密码修改 + * @param params + */ +export const passwordChange = (params) => defHttp.get({ url: Api.passwordChange, params }, { isTransformResponse: false }); +/** + * @description: 第三方登录 + */ +export function thirdLogin(params, mode: ErrorMessageMode = 'modal') { + //==========begin 第三方登录/auth2登录需要传递租户id=========== + let tenantId = "0"; + if(!params.tenantId){ + tenantId = params.tenantId; + } + //==========end 第三方登录/auth2登录需要传递租户id=========== + return defHttp.get( + { + url: `${Api.thirdLogin}/${params.token}/${params.thirdType}/${tenantId}`, + }, + { + errorMessageMode: mode, + } + ); +} +/** + * @description: 获取第三方短信验证码 + */ +export function setThirdCaptcha(params) { + return new Promise((resolve, reject) => { + defHttp.post({ url: Api.getThirdCaptcha, params }, { isTransformResponse: false }).then((res) => { + console.log(res); + if (res.success) { + resolve(true); + } else { + createErrorModal({ title: '错误提示', content: res.message || '未知问题' }); + reject(); + } + }); + }); +} + +/** + * 获取登录二维码信息 + */ +export function getLoginQrcode() { + let url = Api.getLoginQrcode; + return defHttp.get({ url: url }); +} + +/** + * 监控扫码状态 + */ +export function getQrcodeToken(params) { + let url = Api.getQrcodeToken; + return defHttp.get({ url: url, params }); +} + +/** + * SSO登录校验 + */ +export async function validateCasLogin(params) { + let url = Api.validateCasLogin; + return defHttp.get({ url: url, params }); +} diff --git a/src/assets/icons/download-count.svg b/src/assets/icons/download-count.svg new file mode 100644 index 0000000..1c95195 --- /dev/null +++ b/src/assets/icons/download-count.svg @@ -0,0 +1 @@ +Asset 91 \ No newline at end of file diff --git a/src/assets/icons/dynamic-avatar-1.svg b/src/assets/icons/dynamic-avatar-1.svg new file mode 100644 index 0000000..e1553e5 --- /dev/null +++ b/src/assets/icons/dynamic-avatar-1.svg @@ -0,0 +1 @@ +Asset 15 \ No newline at end of file diff --git a/src/assets/icons/dynamic-avatar-2.svg b/src/assets/icons/dynamic-avatar-2.svg new file mode 100644 index 0000000..c4c1722 --- /dev/null +++ b/src/assets/icons/dynamic-avatar-2.svg @@ -0,0 +1 @@ +Asset 16 \ No newline at end of file diff --git a/src/assets/icons/dynamic-avatar-3.svg b/src/assets/icons/dynamic-avatar-3.svg new file mode 100644 index 0000000..81145f9 --- /dev/null +++ b/src/assets/icons/dynamic-avatar-3.svg @@ -0,0 +1 @@ +Asset 17 \ No newline at end of file diff --git a/src/assets/icons/dynamic-avatar-4.svg b/src/assets/icons/dynamic-avatar-4.svg new file mode 100644 index 0000000..e586ed4 --- /dev/null +++ b/src/assets/icons/dynamic-avatar-4.svg @@ -0,0 +1 @@ +Asset 120 \ No newline at end of file diff --git a/src/assets/icons/dynamic-avatar-5.svg b/src/assets/icons/dynamic-avatar-5.svg new file mode 100644 index 0000000..746e4b8 --- /dev/null +++ b/src/assets/icons/dynamic-avatar-5.svg @@ -0,0 +1 @@ +Asset 110 \ No newline at end of file diff --git a/src/assets/icons/dynamic-avatar-6.svg b/src/assets/icons/dynamic-avatar-6.svg new file mode 100644 index 0000000..b2432f2 --- /dev/null +++ b/src/assets/icons/dynamic-avatar-6.svg @@ -0,0 +1 @@ +Asset 100 \ No newline at end of file diff --git a/src/assets/icons/js/iconfont.js b/src/assets/icons/js/iconfont.js new file mode 100644 index 0000000..dead26b --- /dev/null +++ b/src/assets/icons/js/iconfont.js @@ -0,0 +1 @@ +window._iconfont_svg_string_3814468='',function(l){var c=(c=document.getElementsByTagName("script"))[c.length-1],h=c.getAttribute("data-injectcss"),c=c.getAttribute("data-disable-injectsvg");if(!c){var a,t,o,z,i,v=function(c,h){h.parentNode.insertBefore(c,h)};if(h&&!l.__iconfont__svg__cssinject__){l.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(c){console&&console.log(c)}}a=function(){var c,h=document.createElement("div");h.innerHTML=l._iconfont_svg_string_3814468,(h=h.getElementsByTagName("svg")[0])&&(h.setAttribute("aria-hidden","true"),h.style.position="absolute",h.style.width=0,h.style.height=0,h.style.overflow="hidden",h=h,(c=document.body).firstChild?v(h,c.firstChild):c.appendChild(h))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(a,0):(t=function(){document.removeEventListener("DOMContentLoaded",t,!1),a()},document.addEventListener("DOMContentLoaded",t,!1)):document.attachEvent&&(o=a,z=l.document,i=!1,m(),z.onreadystatechange=function(){"complete"==z.readyState&&(z.onreadystatechange=null,s())})}function s(){i||(i=!0,o())}function m(){try{z.documentElement.doScroll("left")}catch(c){return void setTimeout(m,50)}s()}}(window); \ No newline at end of file diff --git a/src/assets/icons/lock.svg b/src/assets/icons/lock.svg new file mode 100644 index 0000000..c55da4d --- /dev/null +++ b/src/assets/icons/lock.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/moon.svg b/src/assets/icons/moon.svg new file mode 100644 index 0000000..e6667f0 --- /dev/null +++ b/src/assets/icons/moon.svg @@ -0,0 +1,16 @@ + + + + + + + + + diff --git a/src/assets/icons/reload-01.svg b/src/assets/icons/reload-01.svg new file mode 100644 index 0000000..2f73719 --- /dev/null +++ b/src/assets/icons/reload-01.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/robot.svg b/src/assets/icons/robot.svg new file mode 100644 index 0000000..a1f035a --- /dev/null +++ b/src/assets/icons/robot.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/sun.svg b/src/assets/icons/sun.svg new file mode 100644 index 0000000..a3997cb --- /dev/null +++ b/src/assets/icons/sun.svg @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/icons/test.svg b/src/assets/icons/test.svg new file mode 100644 index 0000000..244252d --- /dev/null +++ b/src/assets/icons/test.svg @@ -0,0 +1,21 @@ + + + + Icon1@3x + Created with Sketch. + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/assets/icons/total-sales.svg b/src/assets/icons/total-sales.svg new file mode 100644 index 0000000..eff7964 --- /dev/null +++ b/src/assets/icons/total-sales.svg @@ -0,0 +1 @@ +Asset 500 \ No newline at end of file diff --git a/src/assets/icons/transaction.svg b/src/assets/icons/transaction.svg new file mode 100644 index 0000000..7ba9e2f --- /dev/null +++ b/src/assets/icons/transaction.svg @@ -0,0 +1 @@ +Asset 480% \ No newline at end of file diff --git a/src/assets/icons/visit-count.svg b/src/assets/icons/visit-count.svg new file mode 100644 index 0000000..ba2a306 --- /dev/null +++ b/src/assets/icons/visit-count.svg @@ -0,0 +1 @@ +Asset 510 \ No newline at end of file diff --git a/src/assets/images/ai/aiflow.png b/src/assets/images/ai/aiflow.png new file mode 100644 index 0000000..49ffd3d Binary files /dev/null and b/src/assets/images/ai/aiflow.png differ diff --git a/src/assets/images/ai/avatar.jpg b/src/assets/images/ai/avatar.jpg new file mode 100644 index 0000000..9be9587 Binary files /dev/null and b/src/assets/images/ai/avatar.jpg differ diff --git a/src/assets/images/checkcode.png b/src/assets/images/checkcode.png new file mode 100644 index 0000000..844fa70 Binary files /dev/null and b/src/assets/images/checkcode.png differ diff --git a/src/assets/images/cms_bpm.png b/src/assets/images/cms_bpm.png new file mode 100644 index 0000000..afac2cf Binary files /dev/null and b/src/assets/images/cms_bpm.png differ diff --git a/src/assets/images/cms_oa.png b/src/assets/images/cms_oa.png new file mode 100644 index 0000000..727d0c0 Binary files /dev/null and b/src/assets/images/cms_oa.png differ diff --git a/src/assets/images/daiban.png b/src/assets/images/daiban.png new file mode 100644 index 0000000..19002c1 Binary files /dev/null and b/src/assets/images/daiban.png differ diff --git a/src/assets/images/demo.png b/src/assets/images/demo.png new file mode 100644 index 0000000..1a45c98 Binary files /dev/null and b/src/assets/images/demo.png differ diff --git a/src/assets/images/department.png b/src/assets/images/department.png new file mode 100644 index 0000000..07bfac2 Binary files /dev/null and b/src/assets/images/department.png differ diff --git a/src/assets/images/drag_cover.png b/src/assets/images/drag_cover.png new file mode 100644 index 0000000..b95fa73 Binary files /dev/null and b/src/assets/images/drag_cover.png differ diff --git a/src/assets/images/duban.png b/src/assets/images/duban.png new file mode 100644 index 0000000..1597486 Binary files /dev/null and b/src/assets/images/duban.png differ diff --git a/src/assets/images/guaz.png b/src/assets/images/guaz.png new file mode 100644 index 0000000..7ba480f Binary files /dev/null and b/src/assets/images/guaz.png differ diff --git a/src/assets/images/header.jpg b/src/assets/images/header.jpg new file mode 100644 index 0000000..977584b Binary files /dev/null and b/src/assets/images/header.jpg differ diff --git a/src/assets/images/link.png b/src/assets/images/link.png new file mode 100644 index 0000000..4a0319c Binary files /dev/null and b/src/assets/images/link.png differ diff --git a/src/assets/images/logo.png b/src/assets/images/logo.png new file mode 100644 index 0000000..8072ced Binary files /dev/null and b/src/assets/images/logo.png differ diff --git a/src/assets/images/nodata.png b/src/assets/images/nodata.png new file mode 100644 index 0000000..2cebdb3 Binary files /dev/null and b/src/assets/images/nodata.png differ diff --git a/src/assets/images/panel_cover.png b/src/assets/images/panel_cover.png new file mode 100644 index 0000000..faf0065 Binary files /dev/null and b/src/assets/images/panel_cover.png differ diff --git a/src/assets/images/pdf4.jpg b/src/assets/images/pdf4.jpg new file mode 100644 index 0000000..10166e0 Binary files /dev/null and b/src/assets/images/pdf4.jpg differ diff --git a/src/assets/images/people.png b/src/assets/images/people.png new file mode 100644 index 0000000..19ed1be Binary files /dev/null and b/src/assets/images/people.png differ diff --git a/src/assets/images/placeholderImage.png b/src/assets/images/placeholderImage.png new file mode 100644 index 0000000..65fbf52 Binary files /dev/null and b/src/assets/images/placeholderImage.png differ diff --git a/src/assets/images/process_no_form.png b/src/assets/images/process_no_form.png new file mode 100644 index 0000000..46e3cab Binary files /dev/null and b/src/assets/images/process_no_form.png differ diff --git a/src/assets/images/setting.png b/src/assets/images/setting.png new file mode 100644 index 0000000..8e2e11c Binary files /dev/null and b/src/assets/images/setting.png differ diff --git a/src/assets/images/template_cover.jpg b/src/assets/images/template_cover.jpg new file mode 100644 index 0000000..ee2e502 Binary files /dev/null and b/src/assets/images/template_cover.jpg differ diff --git a/src/assets/images/wallet.png b/src/assets/images/wallet.png new file mode 100644 index 0000000..ec10bea Binary files /dev/null and b/src/assets/images/wallet.png differ diff --git a/src/assets/images/zaiban.png b/src/assets/images/zaiban.png new file mode 100644 index 0000000..46b1f6e Binary files /dev/null and b/src/assets/images/zaiban.png differ diff --git a/src/assets/less/JAreaLinkage.less b/src/assets/less/JAreaLinkage.less new file mode 100644 index 0000000..4fea722 --- /dev/null +++ b/src/assets/less/JAreaLinkage.less @@ -0,0 +1,258 @@ +.area-zoom-in-top-enter-active, +.area-zoom-in-top-leave-active { + opacity: 1; + transform: scaleY(1); +} + +.area-zoom-in-top-enter, +.area-zoom-in-top-leave-active { + opacity: 0; + transform: scaleY(0); +} + +.area-select { + box-sizing: border-box; + margin: 0; + padding: 0; + color: rgba(0, 0, 0, 0.65); + font-size: 14px; + font-variant: tabular-nums; + line-height: 1.5; + list-style: none; + font-feature-settings: 'tnum'; + position: relative; + outline: 0; + display: block; + background-color: #fff; + border: 1px solid #d9d9d9; + border-top-width: 1.02px; + border-radius: 4px; + outline: none; + transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1); + -webkit-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.area-select-wrap .area-select { + display: inline-block; +} + +.area-select * { + box-sizing: border-box; +} + +.area-select:hover { + border-color: #40a9ff; + border-right-width: 1px !important; + outline: 0; +} + +.area-select:active { + box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2); +} + +.area-select.small { + width: 126px; +} + +.area-select.medium { + width: 160px; +} + +.area-select.large { + width: 194px; +} + +.area-select.is-disabled { + background: #eceff5; + cursor: not-allowed; +} + +.area-select.is-disabled:hover { + border-color: #e1e2e6; +} + +.area-select.is-disabled .area-selected-trigger { + cursor: not-allowed; +} + +.area-select .area-selected-trigger { + position: relative; + display: block; + font-size: 14px; + cursor: pointer; + margin: 0; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + height: 100%; + padding: 8px 20px 7px 12px; +} + +.area-select .area-select-icon { + position: absolute; + top: 50%; + margin-top: -2px; + right: 6px; + content: ''; + width: 0; + height: 0; + border: 6px solid transparent; + border-top-color: rgba(0, 0, 0, 0.25); + transition: all 0.3s linear; + transform-origin: center; +} + +.area-select .area-select-icon.active { + margin-top: -8px; + transform: rotate(180deg); +} + +.area-selectable-list-wrap { + position: absolute; + width: 100%; + max-height: 275px; + z-index: 15000; + background-color: #fff; + box-sizing: border-box; + overflow-x: auto; + margin: 2px 0; + border-radius: 4px; + outline: none; + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); + + transition: opacity 0.15s, transform 0.3s !important; + transform-origin: center top !important; +} + +.area-selectable-list { + position: relative; + margin: 0; + padding: 6px 0; + width: 100%; + font-size: 14px; + color: #565656; + list-style: none; +} + +.area-selectable-list .area-select-option { + position: relative; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + cursor: pointer; + padding: 0 15px 0 10px; + height: 32px; + line-height: 32px; +} + +.area-selectable-list .area-select-option.hover { + background-color: #e6f7ff; +} + +.area-selectable-list .area-select-option.selected { + color: rgba(0, 0, 0, 0.65); + font-weight: 600; + background-color: #efefef; +} + +.cascader-menu-list-wrap { + position: absolute; + white-space: nowrap; + z-index: 15000; + background-color: #fff; + box-sizing: border-box; + overflow: hidden; + font-size: 0; + margin: 2px 0; + border-radius: 4px; + outline: none; + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); + + transition: opacity 0.15s, transform 0.3s !important; + transform-origin: center top !important; +} + +.cascader-menu-list { + position: relative; + margin: 0; + font-size: 14px; + color: #565656; + padding: 6px 0; + list-style: none; + display: inline-block; + height: 204px; + overflow-x: hidden; + overflow-y: auto; + min-width: 160px; + vertical-align: top; + background-color: #fff; + border-right: 1px solid #e4e7ed; +} + +.cascader-menu-list:last-child { + border-right: none; +} + +.cascader-menu-list .cascader-menu-option { + position: relative; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + cursor: pointer; + padding: 0 15px 0 10px; + height: 32px; + line-height: 32px; +} + +.cascader-menu-list .cascader-menu-option.hover, +.cascader-menu-list .cascader-menu-option:hover { + background-color: #e6f7ff; +} + +.cascader-menu-list .cascader-menu-option.selected { + color: rgba(0, 0, 0, 0.65); + font-weight: 600; + background-color: #efefef; +} + +.cascader-menu-list .cascader-menu-option.cascader-menu-extensible:after { + position: absolute; + top: 50%; + margin-top: -4px; + right: 5px; + content: ''; + width: 0; + height: 0; + border: 4px solid transparent; + border-left-color: #a1a4ad; +} + +.cascader-menu-list::-webkit-scrollbar, +.area-selectable-list-wrap::-webkit-scrollbar { + width: 8px; + background: transparent; +} + +.area-selectable-list-wrap::-webkit-scrollbar-button:vertical:decremen, +.area-selectable-list-wrap::-webkit-scrollbar-button:vertical:end:decrement, +.area-selectable-list-wrap::-webkit-scrollbar-button:vertical:increment, +.area-selectable-list-wrap::-webkit-scrollbar-button:vertical:start:increment, +.cascader-menu-list::-webkit-scrollbar-button:vertical:decremen, +.cascader-menu-list::-webkit-scrollbar-button:vertical:end:decrement, +.cascader-menu-list::-webkit-scrollbar-button:vertical:increment, +.cascader-menu-list::-webkit-scrollbar-button:vertical:start:increment { + display: none; +} + +.cascader-menu-list::-webkit-scrollbar-thumb:vertical, +.area-selectable-list-wrap::-webkit-scrollbar-thumb:vertical { + background-color: #b8b8b8; + border-radius: 4px; +} + +.cascader-menu-list::-webkit-scrollbar-thumb:vertical:hover, +.area-selectable-list-wrap::-webkit-scrollbar-thumb:vertical:hover { + background-color: #777; +} diff --git a/src/assets/loginmini/icon/icon-code.png b/src/assets/loginmini/icon/icon-code.png new file mode 100644 index 0000000..142d3ab Binary files /dev/null and b/src/assets/loginmini/icon/icon-code.png differ diff --git a/src/assets/loginmini/icon/icon-eye-g.png b/src/assets/loginmini/icon/icon-eye-g.png new file mode 100644 index 0000000..8cf83d6 Binary files /dev/null and b/src/assets/loginmini/icon/icon-eye-g.png differ diff --git a/src/assets/loginmini/icon/icon-eye-k.png b/src/assets/loginmini/icon/icon-eye-k.png new file mode 100644 index 0000000..e1cacb0 Binary files /dev/null and b/src/assets/loginmini/icon/icon-eye-k.png differ diff --git a/src/assets/loginmini/icon/icon-line-msg.png b/src/assets/loginmini/icon/icon-line-msg.png new file mode 100644 index 0000000..08e7bea Binary files /dev/null and b/src/assets/loginmini/icon/icon-line-msg.png differ diff --git a/src/assets/loginmini/icon/icon-line-pad.png b/src/assets/loginmini/icon/icon-line-pad.png new file mode 100644 index 0000000..2aaccec Binary files /dev/null and b/src/assets/loginmini/icon/icon-line-pad.png differ diff --git a/src/assets/loginmini/icon/icon-line-tel.png b/src/assets/loginmini/icon/icon-line-tel.png new file mode 100644 index 0000000..c3efe1c Binary files /dev/null and b/src/assets/loginmini/icon/icon-line-tel.png differ diff --git a/src/assets/loginmini/icon/icon-line-user.png b/src/assets/loginmini/icon/icon-line-user.png new file mode 100644 index 0000000..30a280c Binary files /dev/null and b/src/assets/loginmini/icon/icon-line-user.png differ diff --git a/src/assets/loginmini/icon/icon-password.png b/src/assets/loginmini/icon/icon-password.png new file mode 100644 index 0000000..edf6d31 Binary files /dev/null and b/src/assets/loginmini/icon/icon-password.png differ diff --git a/src/assets/loginmini/icon/icon-success.png b/src/assets/loginmini/icon/icon-success.png new file mode 100644 index 0000000..aa3a233 Binary files /dev/null and b/src/assets/loginmini/icon/icon-success.png differ diff --git a/src/assets/loginmini/icon/icon-user.png b/src/assets/loginmini/icon/icon-user.png new file mode 100644 index 0000000..968fc1a Binary files /dev/null and b/src/assets/loginmini/icon/icon-user.png differ diff --git a/src/assets/loginmini/icon/icon_dow.png b/src/assets/loginmini/icon/icon_dow.png new file mode 100644 index 0000000..03d928d Binary files /dev/null and b/src/assets/loginmini/icon/icon_dow.png differ diff --git a/src/assets/loginmini/icon/jeecg_ad.png b/src/assets/loginmini/icon/jeecg_ad.png new file mode 100644 index 0000000..19a2583 Binary files /dev/null and b/src/assets/loginmini/icon/jeecg_ad.png differ diff --git a/src/assets/loginmini/icon/jeecg_ad_text.png b/src/assets/loginmini/icon/jeecg_ad_text.png new file mode 100644 index 0000000..8725482 Binary files /dev/null and b/src/assets/loginmini/icon/jeecg_ad_text.png differ diff --git a/src/assets/loginmini/icon/jeecg_bg.png b/src/assets/loginmini/icon/jeecg_bg.png new file mode 100644 index 0000000..b1bb62f Binary files /dev/null and b/src/assets/loginmini/icon/jeecg_bg.png differ diff --git a/src/assets/loginmini/icon/jeecg_logo.png b/src/assets/loginmini/icon/jeecg_logo.png new file mode 100644 index 0000000..109687f Binary files /dev/null and b/src/assets/loginmini/icon/jeecg_logo.png differ diff --git a/src/assets/loginmini/icon/logo.png b/src/assets/loginmini/icon/logo.png new file mode 100644 index 0000000..ad1cb65 Binary files /dev/null and b/src/assets/loginmini/icon/logo.png differ diff --git a/src/assets/loginmini/style/base.less b/src/assets/loginmini/style/base.less new file mode 100644 index 0000000..c6777c7 --- /dev/null +++ b/src/assets/loginmini/style/base.less @@ -0,0 +1,365 @@ +::-webkit-input-placeholder { + /* WebKit browsers */ + color: #868686; + font-size: 15px; +} + +::-moz-placeholder { + /* Mozilla Firefox 19+ */ + color: #868686; + font-size: 15px; +} + +:-ms-input-placeholder { + /* Internet Explorer 10+ */ + color: #868686; + font-size: 15px; +} + +input:-webkit-autofill { + transition: background-color 5000s ease-in-out 0s; +} + +html { + scroll-behavior: smooth; +} + +html, +body { + color: #333; + margin: 0; + height: 100%; + font-family: 'Myriad Set Pro', 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + font-weight: normal; +} + +* { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +a { + text-decoration: none; + color: #000; +} + +a, +label, +button, +input, +select { + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); +} + +img { + max-width: 100%; + height: auto; + display: block; + border: 0; +} + +body { + background: #e3f0ff; + color: #666; +} + +html, +body, +div, +dl, +dt, +dd, +ol, +ul, +li, +h1, +h2, +h3, +h4, +h5, +h6, +p, +blockquote, +pre, +button, +fieldset, +form, +input, +legend, +textarea, +th, +td { + margin: 0; + padding: 0; +} + +a { + text-decoration: none; + color: #08acee; +} + +button { + outline: 0; +} + +button, +input, +optgroup, +select, +textarea { + margin: 0; + font: inherit; + color: inherit; + outline: none; +} + +li { + list-style: none; +} + +a { + color: #666; +} + +.clearfix::after { + clear: both; + content: '.'; + display: block; + height: 0; + visibility: hidden; +} + +.clearfix { +} + +.divHeight { + width: 100%; + height: 10px; + background: #f5f5f5; + position: relative; + overflow: hidden; +} + +.r-line { + position: relative; +} + +.r-line:after { + content: ''; + position: absolute; + z-index: 0; + top: 0; + right: 0; + height: 100%; + border-right: 1px solid #d9d9d9; + -webkit-transform: scaleX(0.5); + transform: scaleX(0.5); + -webkit-transform-origin: 100% 0; + transform-origin: 100% 0; +} + +.b-line { + position: relative; +} + +.b-line:after { + content: ''; + position: absolute; + z-index: 2; + bottom: 0; + left: 0; + width: 100%; + height: 1px; + border-bottom: 1px solid #dedede; + -webkit-transform: scaleY(0.5); + transform: scaleY(0.5); + -webkit-transform-origin: 0 100%; + transform-origin: 0 100%; +} + +.aui-arrow { + position: relative; + padding-right: 0.8rem; +} + +.aui-arrow span { + font-size: 0.8rem; + color: #9b9b9b; +} + +.aui-arrow:after { + content: ' '; + display: inline-block; + height: 6px; + width: 6px; + border-width: 2px 2px 0 0; + border-color: #848484; + border-style: solid; + -webkit-transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0); + transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0); + position: relative; + position: absolute; + top: 50%; + margin-top: -4px; + right: 2px; + border-radius: 1px; +} + +.aui-flex { + display: -webkit-box; + display: -webkit-flex; + display: flex; + -webkit-box-align: center; + -webkit-align-items: center; + align-items: center; + position: relative; +} + +.aui-flex-box { + -webkit-box-flex: 1; + -webkit-flex: 1; + flex: 1; + min-width: 0; + font-size: 14px; + color: #333; +} + +/* 必要布局样式css */ +.aui-flexView { + width: 100%; + height: 100%; + margin: 0 auto; + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-box-orient: vertical; + -webkit-box-direction: normal; + -webkit-flex-direction: column; + -ms-flex-direction: column; + flex-direction: column; +} + +.aui-scrollView { + width: 100%; + height: 100%; + -webkit-box-flex: 1; + -webkit-flex: 1; + -ms-flex: 1; + flex: 1; + overflow-y: auto; + overflow-x: hidden; + -webkit-overflow-scrolling: touch; + position: relative; + padding-bottom: 53px; +} + +.aui-navBar { + height: 44px; + position: relative; + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + z-index: 102; + background-color: #5064eb; +} + +.aui-navBar-item { + height: 44px; + min-width: 15%; + -webkit-box-flex: 0; + -webkit-flex: 0 0 15%; + -ms-flex: 0 0 15%; + flex: 0 0 15%; + padding: 0 0.9rem; + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-box-align: center; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; + font-size: 0.7rem; + white-space: nowrap; + overflow: hidden; + color: #808080; + position: relative; +} + +.aui-navBar-item:first-child { + -webkit-box-ordinal-group: 2; + -webkit-order: 1; + -ms-flex-order: 1; + order: 1; + margin-right: -25%; + font-size: 0.9rem; + font-weight: bold; +} + +.aui-navBar-item:last-child { + -webkit-box-ordinal-group: 4; + -webkit-order: 3; + -ms-flex-order: 3; + order: 3; + -webkit-box-pack: end; + -webkit-justify-content: flex-end; + -ms-flex-pack: end; + justify-content: flex-end; +} + +.aui-center { + -webkit-box-ordinal-group: 3; + -webkit-order: 2; + -ms-flex-order: 2; + order: 2; + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-box-pack: center; + -webkit-justify-content: center; + -ms-flex-pack: center; + justify-content: center; + -webkit-box-align: center; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; + height: 44px; + width: 80%; + margin-left: 22%; +} + +.aui-center-title { + text-align: center; + width: 100%; + white-space: nowrap; + overflow: hidden; + display: block; + text-overflow: ellipsis; + font-size: 0.95rem; + color: #fff; + font-weight: 500; +} + +.icon { + width: 20px; + height: 20px; + display: block; + border: none; + float: left; + background-size: 20px; + background-repeat: no-repeat; + position: relative; +} + +.login-background-img { + background-image: url(../icon/jeecg_bg.png); + background-size: cover; + background-position: top center; + background-repeat: no-repeat; +} diff --git a/src/assets/loginmini/style/home.less b/src/assets/loginmini/style/home.less new file mode 100644 index 0000000..908dc7a --- /dev/null +++ b/src/assets/loginmini/style/home.less @@ -0,0 +1,612 @@ +.aui-content { + padding: 40px 60px; + min-height: 100vh; +} + +.aui-container { + max-width: 1000px; + margin: 0 auto; + box-shadow: 0 4px 8px 1px rgba(0, 0, 0, 0.2); + position: fixed; + top: 50%; + left: 50%; + width: 92%; + height: auto; + -webkit-transform: translateX(-50%) translateY(-50%); + -moz-transform: translateX(-50%) translateY(-50%); + -ms-transform: translateX(-50%) translateY(-50%); + transform: translateX(-50%) translateY(-50%); + -webkit-transform: translateX(-50%) translateY(-50%); +} + +.aui-form { + width: 100%; + background: #eee; + display: -webkit-box; + display: -moz-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; +} + +.aui-image { + padding: 180px 80px; + flex-basis: 60%; + -webkit-flex-basis: 60%; + background-color: #0198cd; + background-image: url(../icon/jeecg_ad.png); + background-size: cover; +} + +.aui-image-text { + top: 50%; + left: 50%; + width: 100%; +} + +.aui-formBox { + flex-basis: 40%; + -webkit-flex-basis: 40%; + box-sizing: border-box; + padding: 30px 20px; + background: #fff; + box-shadow: 2px 9px 49px -17px rgba(0, 0, 0, 0.1); +} + +.aui-logo { + width: 180px; + height: 80px; + position: absolute; + top: 2%; + left: 8%; + z-index: 4; +} + +.aui-account-line { + padding-top: 20px; + padding-bottom: 40px; +} + +.aui-code-line { + position: absolute; + right: 0; + top: 0; + border-left: 3px solid #fff; + height: 42px; + padding: 0 15px; + line-height: 40px; + font-size: 14px; + cursor: pointer; +} + +.aui-eye { + position: absolute; + right: 20px; + top: 10px; + width: 20px; + cursor: pointer; +} + +.aui-input-line { + background: #f5f5f9; + border-radius: 2px; + position: relative; + margin: 12px 0; +} + +.aui-input-line input { + width: 100%; + padding: 12px 10px; + border: none; + color: #333333; + font-size: 14px; + background: unset; + padding-left: 40px; +} + +.aui-input-line .icon { + position: absolute; + top: 10px; + left: 10px; +} + +.icon-line-user { + background-image: url(../icon/icon-line-user.png); +} + +.icon-line-tel { + background-image: url(../icon/icon-line-tel.png); +} + +.icon-line-msg { + background-image: url(../icon/icon-line-msg.png); +} + +.icon-line-pad { + background-image: url(../icon/icon-line-pad.png); +} + +.aui-forgot .aui-input-line input { + padding-left: 20px; +} + +.aui-forgot .aui-input-line { + background: none; + border: 1px solid #dbdbdb; + border-radius: 2px; +} + +.aui-forgot .aui-input-line:focus { + border-color: #1b90ff; +} + +.aui-forgot .aui-input-line:hover { + border-color: #1b90ff; +} + +.aui-forgot .aui-input-line .aui-code-line { + border-left: 1px solid #dbdbdb; + height: 40px; + color: #1b90ff; +} + +.aui-step-box { + width: 100%; + height: auto; + position: relative; + overflow: hidden; + margin-top: 50px; + margin-bottom: 20px; +} + +.aui-step-box::after { + position: absolute; + top: 20px; + left: 50%; + width: 76%; + margin-left: -38%; + height: 1px; + background: #bcbcbc; + content: ''; +} + +.aui-step-item { + width: 33.333%; + float: left; + text-align: center; + position: relative; + z-index: 2; +} + +.aui-step-tags em { + width: 40px; + height: 40px; + border: 8px solid #fff; + line-height: 1.3; + border-radius: 100px; + background: #bcbcbc; + display: block; + margin: 0 auto; + font-style: normal; + color: #fff; + font-size: 19px; + font-weight: 500; +} + +.aui-step-tags p { + font-size: 14px; + color: #bcbcbc; +} + +.activeStep .aui-step-tags em { + background: #1b90ff; +} + +.activeStep .aui-step-tags p { + color: #1b90ff; +} + +.aui-success { + position: absolute; + top: 50%; + left: 50%; + height: 80px; + width: 100%; + margin-top: -40px; + margin-left: -50%; +} + +.aui-success-icon { + width: 40px; + margin: 0 auto; +} + +.aui-success h3 { + width: 100%; + text-align: center; + color: #515151; + font-size: 18px; + padding-top: 20px; +} + +.aui-form-nav { + text-align: center; + padding-bottom: 20px; +} + +.aui-form-nav .aui-flex-box { + color: #040404; + font-size: 18px; + font-weight: 500; + cursor: pointer; +} + +.aui-clear-left { + text-align: left; +} + +.aui-clear-left .activeNav::after { + left: 18px; +} + +.activeNav { + position: relative; +} + +.activeNav::after { + content: ''; + position: absolute; + z-index: 0; + bottom: -10px; + left: 50%; + margin-left: -15px; + width: 30px; + height: 4px; + background: #1b90ff; + border-radius: 100px; +} + +.phone .aui-inputClear { + padding-left: 0; +} + +.phone .aui-inputClear input { + //padding-left: 1px; +} + +.phone .aui-inputClear .aui-code { + text-align: right; + width: auto; + bottom: 10px; +} + +.phone .aui-inputClear .aui-code a { + color: #1b90ff; + font-size: 14px; +} + +.phoneChina { + position: absolute; + bottom: 10px; + left: 0; + font-size: 14px; + color: #040404; +} + +.phoneChina::after { + position: absolute; + right: -25px; + bottom: 0; + content: ''; + background-image: url(../icon/icon_dow.png); + background-size: 18px; + width: 18px; + height: 18px; +} + +.phoneChina:before { + position: absolute; + right: -42px; + bottom: -15px; + content: ' '; + background: #fff; + width: 18px; + height: 18px; +} + +.aui-ewm { + width: 280px; + margin: 0 auto; +} + +.aui-formEwm { + padding: 50px 40px 55px 40px; +} + +.aui-inputClear { + width: 100%; + border-bottom: 1px solid #cccccc; + position: relative; + padding-left: 20px; + background: #fff; + margin-bottom: 8px; + margin-top: 20px; +} + +.aui-inputClear .icon { + position: absolute; + top: 10px; + left: 0; +} + +.aui-inputClear input { + width: 100%; + padding: 10px; + border: none; + color: #333333; + font-size: 14px; + background: none; +} + +.aui-code { + position: absolute; + right: 8px; + bottom: 0; + width: 115px; + cursor: pointer; +} + +.icon-code { + background-image: url(../icon/icon-user.png); +} + +.icon-password { + background-image: url(../icon/icon-password.png); +} + +.icon-code { + background-image: url(../icon/icon-code.png); +} + +.aui-inputClear:focus { + border-bottom: 1px solid #1b90ff; +} + +.aui-inputClear:hover { + border-bottom: 1px solid #1b90ff; +} + +.aui-choice { + position: relative; + font-size: 12px; + display: -webkit-box; + display: -webkit-flex; + display: flex; + -webkit-box-align: center; + -webkit-align-items: center; + align-items: center; + position: relative; + color: #040404; +} + +.aui-choice input { + width: 14px; + height: 14px; + cursor: pointer; +} + +.aui-forget a { + color: #1b90ff; + font-size: 12px; +} + +.aui-forget a:hover { + text-decoration: underline; +} + +.aui-formButton { + padding-top: 10px; +} + +.aui-formButton a { + height: 42px; + padding: 10px 15px; + font-size: 14px; + border-radius: 8px; + border-color: #67b5ff; + background: #1b90ff; + width: 100%; + cursor: pointer; + border: none; + color: #fff; + margin: 8px 0; + display: block; + text-align: center; +} + +.aui-formButton a:focus { + opacity: 0.9; +} + +.aui-formButton a:hover { + opacity: 0.9; +} + +.aui-formButton .aui-linek-code { + background: #fff; + color: #3c3c3c; + border: 1px solid #dbdbdb; +} + +.aui-formButton .aui-linek-code:hover { + color: #1b90ff; + border: 1px solid #1b90ff; +} + +.aui-third-text { + font-size: 12px; + color: #3c3c3c; + margin-top: 25px; + margin-bottom: 25px; +} + +.aui-third-text span { + color: #afafaf; + display: block; + width: 38%; + margin: 0 auto; + text-align: center; + position: relative; + background: #fff; + z-index: 100; + font-size: 12px; +} + +.aui-third-border { + position: relative; +} + +.aui-third-border::after { + content: ''; + position: absolute; + z-index: 0; + top: 8px; + left: 0; + width: 100%; + height: 1px; + border-top: 1px solid #d9d9d9; + -webkit-transform: scaleY(0.5); + transform: scaleY(0.5); + -webkit-transform-origin: 0 100%; + transform-origin: 0 100%; +} + +.aui-third-login { + width: 30px; + height: 30px; + margin: 0 auto; + border-radius: 100px; +} + +.aui-third-login a { + font-size: 22px; + margin: 0 auto; + border-radius: 100px; + display: inline-block; + color: #888; +} + +.aui-third-login a:hover { + color: #1b90ff; + cursor: pointer; +} + +.aui-third-login:hover { + cursor: pointer; +} + +@media (max-width: 320px) { + .aui-form { + flex-direction: column; + } + + .aui-image { + order: 2; + display: none; + } + + .aui-container { + width: 100%; + max-width: 550px; + margin-top: 10px; + } + + .aui-content { + justify-content: initial; + width: 100%; + padding: 20px; + } +} + +@media (min-width: 321px) and (max-width: 375px) { + .aui-form { + flex-direction: column; + } + + .aui-image { + order: 2; + display: none; + } + + .aui-container { + width: 90%; + max-width: 550px; + } + + .aui-content { + justify-content: initial; + width: 100%; + padding: 20px; + } +} + +@media (min-width: 375px) and (max-width: 425px) { + .aui-form { + flex-direction: column; + } + + .aui-image { + order: 2; + display: none; + } + + .aui-container { + width: 90%; + max-width: 550px; + } + + .aui-content { + justify-content: initial; + width: 100%; + padding: 40px; + } +} + +@media (min-width: 425px) and (max-width: 768px) { + .aui-form { + flex-direction: column; + } + + .aui-image { + order: 2; + display: none; + } + + .aui-container { + width: 90%; + max-width: 550px; + } + + .aui-content { + justify-content: initial; + width: 100%; + padding: 40px; + } + + .aui-step-box::after { + width: 70%; + margin-left: -35%; + } +} + +@media only screen and (max-width: 767px) { + .aui-logo { + top: 3%; + } +} + +@media screen and (max-width: 300px) { + .aui-logo { + top: 3%; + } +} diff --git a/src/assets/svg/fileType/excel.svg b/src/assets/svg/fileType/excel.svg new file mode 100644 index 0000000..debdb36 --- /dev/null +++ b/src/assets/svg/fileType/excel.svg @@ -0,0 +1 @@ +MACWIN图形/印刷产品/思维导图影视/广告代码通用工业/建筑 \ No newline at end of file diff --git a/src/assets/svg/fileType/image.png b/src/assets/svg/fileType/image.png new file mode 100644 index 0000000..0284ad7 Binary files /dev/null and b/src/assets/svg/fileType/image.png differ diff --git a/src/assets/svg/fileType/other.svg b/src/assets/svg/fileType/other.svg new file mode 100644 index 0000000..59b0c41 --- /dev/null +++ b/src/assets/svg/fileType/other.svg @@ -0,0 +1 @@ +MACWIN图形/印刷产品/思维导图影视/广告代码通用工业/建筑 \ No newline at end of file diff --git a/src/assets/svg/fileType/pdf.svg b/src/assets/svg/fileType/pdf.svg new file mode 100644 index 0000000..67c0f10 --- /dev/null +++ b/src/assets/svg/fileType/pdf.svg @@ -0,0 +1 @@ +MACWIN图形/印刷产品/思维导图影视/广告代码通用工业/建筑 \ No newline at end of file diff --git a/src/assets/svg/fileType/txt.svg b/src/assets/svg/fileType/txt.svg new file mode 100644 index 0000000..602c3b9 --- /dev/null +++ b/src/assets/svg/fileType/txt.svg @@ -0,0 +1 @@ +MACWIN图形/印刷产品/思维导图影视/广告代码通用工业/建筑 \ No newline at end of file diff --git a/src/assets/svg/fileType/word.svg b/src/assets/svg/fileType/word.svg new file mode 100644 index 0000000..16aa1a4 --- /dev/null +++ b/src/assets/svg/fileType/word.svg @@ -0,0 +1 @@ +MACWIN图形/印刷产品/思维导图影视/广告代码通用工业/建筑 \ No newline at end of file diff --git a/src/assets/svg/illustration.svg b/src/assets/svg/illustration.svg new file mode 100644 index 0000000..b45215b --- /dev/null +++ b/src/assets/svg/illustration.svg @@ -0,0 +1 @@ +Asset 336 \ No newline at end of file diff --git a/src/assets/svg/login-bg-dark.svg b/src/assets/svg/login-bg-dark.svg new file mode 100644 index 0000000..888da7a --- /dev/null +++ b/src/assets/svg/login-bg-dark.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/svg/login-bg.svg b/src/assets/svg/login-bg.svg new file mode 100644 index 0000000..7b66baf --- /dev/null +++ b/src/assets/svg/login-bg.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/src/assets/svg/login-box-bg.svg b/src/assets/svg/login-box-bg.svg new file mode 100644 index 0000000..ee7dbdc --- /dev/null +++ b/src/assets/svg/login-box-bg.svg @@ -0,0 +1 @@ +responsive \ No newline at end of file diff --git a/src/assets/svg/net-error.svg b/src/assets/svg/net-error.svg new file mode 100644 index 0000000..81f2004 --- /dev/null +++ b/src/assets/svg/net-error.svg @@ -0,0 +1 @@ +personal settings \ No newline at end of file diff --git a/src/assets/svg/no-data.svg b/src/assets/svg/no-data.svg new file mode 100644 index 0000000..2b9f257 --- /dev/null +++ b/src/assets/svg/no-data.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/svg/preview/p-rotate.svg b/src/assets/svg/preview/p-rotate.svg new file mode 100644 index 0000000..5153a81 --- /dev/null +++ b/src/assets/svg/preview/p-rotate.svg @@ -0,0 +1 @@ + diff --git a/src/assets/svg/preview/resume.svg b/src/assets/svg/preview/resume.svg new file mode 100644 index 0000000..0e86c5f --- /dev/null +++ b/src/assets/svg/preview/resume.svg @@ -0,0 +1 @@ + diff --git a/src/assets/svg/preview/scale.svg b/src/assets/svg/preview/scale.svg new file mode 100644 index 0000000..1f7adae --- /dev/null +++ b/src/assets/svg/preview/scale.svg @@ -0,0 +1 @@ + diff --git a/src/assets/svg/preview/unrotate.svg b/src/assets/svg/preview/unrotate.svg new file mode 100644 index 0000000..e4708be --- /dev/null +++ b/src/assets/svg/preview/unrotate.svg @@ -0,0 +1 @@ + diff --git a/src/assets/svg/preview/unscale.svg b/src/assets/svg/preview/unscale.svg new file mode 100644 index 0000000..1359b34 --- /dev/null +++ b/src/assets/svg/preview/unscale.svg @@ -0,0 +1 @@ + diff --git a/src/components/Application/index.ts b/src/components/Application/index.ts new file mode 100644 index 0000000..d7c5133 --- /dev/null +++ b/src/components/Application/index.ts @@ -0,0 +1,15 @@ +import { withInstall } from '/@/utils'; + +import appLogo from './src/AppLogo.vue'; +import appProvider from './src/AppProvider.vue'; +import appSearch from './src/search/AppSearch.vue'; +import appLocalePicker from './src/AppLocalePicker.vue'; +import appDarkModeToggle from './src/AppDarkModeToggle.vue'; + +export { useAppProviderContext } from './src/useAppContext'; + +export const AppLogo = withInstall(appLogo); +export const AppProvider = withInstall(appProvider); +export const AppSearch = withInstall(appSearch); +export const AppLocalePicker = withInstall(appLocalePicker); +export const AppDarkModeToggle = withInstall(appDarkModeToggle); diff --git a/src/components/Application/src/AppDarkModeToggle.vue b/src/components/Application/src/AppDarkModeToggle.vue new file mode 100644 index 0000000..6b07d92 --- /dev/null +++ b/src/components/Application/src/AppDarkModeToggle.vue @@ -0,0 +1,76 @@ + + + diff --git a/src/components/Application/src/AppLocalePicker.vue b/src/components/Application/src/AppLocalePicker.vue new file mode 100644 index 0000000..d600bba --- /dev/null +++ b/src/components/Application/src/AppLocalePicker.vue @@ -0,0 +1,76 @@ + + + + + diff --git a/src/components/Application/src/AppLogo.vue b/src/components/Application/src/AppLogo.vue new file mode 100644 index 0000000..bd1a570 --- /dev/null +++ b/src/components/Application/src/AppLogo.vue @@ -0,0 +1,93 @@ + + + + diff --git a/src/components/Application/src/AppProvider.vue b/src/components/Application/src/AppProvider.vue new file mode 100644 index 0000000..4c277bd --- /dev/null +++ b/src/components/Application/src/AppProvider.vue @@ -0,0 +1,77 @@ + diff --git a/src/components/Application/src/search/AppSearch.vue b/src/components/Application/src/search/AppSearch.vue new file mode 100644 index 0000000..63d346e --- /dev/null +++ b/src/components/Application/src/search/AppSearch.vue @@ -0,0 +1,33 @@ + diff --git a/src/components/Application/src/search/AppSearchFooter.vue b/src/components/Application/src/search/AppSearchFooter.vue new file mode 100644 index 0000000..06e1372 --- /dev/null +++ b/src/components/Application/src/search/AppSearchFooter.vue @@ -0,0 +1,55 @@ + + + + diff --git a/src/components/Application/src/search/AppSearchKeyItem.vue b/src/components/Application/src/search/AppSearchKeyItem.vue new file mode 100644 index 0000000..aba36a5 --- /dev/null +++ b/src/components/Application/src/search/AppSearchKeyItem.vue @@ -0,0 +1,11 @@ + + diff --git a/src/components/Application/src/search/AppSearchModal.vue b/src/components/Application/src/search/AppSearchModal.vue new file mode 100644 index 0000000..d5f2290 --- /dev/null +++ b/src/components/Application/src/search/AppSearchModal.vue @@ -0,0 +1,260 @@ + + + + diff --git a/src/components/Application/src/search/useMenuSearch.ts b/src/components/Application/src/search/useMenuSearch.ts new file mode 100644 index 0000000..6b6ef40 --- /dev/null +++ b/src/components/Application/src/search/useMenuSearch.ts @@ -0,0 +1,183 @@ +import type { Menu } from '/@/router/types'; +import { ref, onBeforeMount, unref, Ref, nextTick } from 'vue'; +import { getMenus } from '/@/router/menus'; +import { cloneDeep } from 'lodash-es'; +import { filter, forEach } from '/@/utils/helper/treeHelper'; +import { useGo } from '/@/hooks/web/usePage'; +import { useScrollTo } from '/@/hooks/event/useScrollTo'; +import { onKeyStroke, useDebounceFn } from '@vueuse/core'; +import { useI18n } from '/@/hooks/web/useI18n'; +import { URL_HASH_TAB } from '/@/utils'; + +export interface SearchResult { + name: string; + path: string; + icon?: string; + internalOrExternal: boolean; +} + +// Translate special characters +function transform(c: string) { + const code: string[] = ['$', '(', ')', '*', '+', '.', '[', ']', '?', '\\', '^', '{', '}', '|']; + return code.includes(c) ? `\\${c}` : c; +} + +function createSearchReg(key: string) { + const keys = [...key].map((item) => transform(item)); + const str = ['', ...keys, ''].join('.*'); + return new RegExp(str, 'i'); +} + +export function useMenuSearch(refs: Ref, scrollWrap: Ref, emit: EmitType) { + const searchResult = ref([]); + const keyword = ref(''); + const activeIndex = ref(-1); + + let menuList: Menu[] = []; + + const { t } = useI18n(); + const go = useGo(); + const handleSearch = useDebounceFn(search, 200); + + onBeforeMount(async () => { + const list = await getMenus(); + menuList = cloneDeep(list); + forEach(menuList, (item) => { + item.name = t(item.name); + }); + }); + + function search(e: ChangeEvent) { + e?.stopPropagation(); + const key = e.target.value; + keyword.value = key.trim(); + if (!key) { + searchResult.value = []; + return; + } + const reg = createSearchReg(unref(keyword)); + const filterMenu = filter(menuList, (item) => { + // 【issues/33】包含子菜单时,不添加到搜索队列 + if (Array.isArray(item.children)) { + return false; + } + return reg.test(item.name) && !item.hideMenu; + }); + searchResult.value = handlerSearchResult(filterMenu, reg); + activeIndex.value = 0; + } + + function handlerSearchResult(filterMenu: Menu[], reg: RegExp, parent?: Menu) { + const ret: SearchResult[] = []; + filterMenu.forEach((item) => { + const { name, path, icon, children, hideMenu, meta, internalOrExternal } = item; + if (!hideMenu && reg.test(name) && (!children?.length || meta?.hideChildrenInMenu)) { + ret.push({ + name: parent?.name ? `${parent.name} > ${name}` : name, + path, + icon, + internalOrExternal + }); + } + if (!meta?.hideChildrenInMenu && Array.isArray(children) && children.length) { + ret.push(...handlerSearchResult(children, reg, item)); + } + }); + return ret; + } + + // Activate when the mouse moves to a certain line + function handleMouseenter(e: any) { + const index = e.target.dataset.index; + activeIndex.value = Number(index); + } + + // Arrow key up + function handleUp() { + if (!searchResult.value.length) return; + activeIndex.value--; + if (activeIndex.value < 0) { + activeIndex.value = searchResult.value.length - 1; + } + handleScroll(); + } + + // Arrow key down + function handleDown() { + if (!searchResult.value.length) return; + activeIndex.value++; + if (activeIndex.value > searchResult.value.length - 1) { + activeIndex.value = 0; + } + handleScroll(); + } + + // When the keyboard up and down keys move to an invisible place + // the scroll bar needs to scroll automatically + function handleScroll() { + const refList = unref(refs); + if (!refList || !Array.isArray(refList) || refList.length === 0 || !unref(scrollWrap)) { + return; + } + + const index = unref(activeIndex); + const currentRef = refList[index]; + if (!currentRef) { + return; + } + const wrapEl = unref(scrollWrap); + if (!wrapEl) { + return; + } + const scrollHeight = currentRef.offsetTop + currentRef.offsetHeight; + const wrapHeight = wrapEl.offsetHeight; + const { start } = useScrollTo({ + el: wrapEl, + duration: 100, + to: scrollHeight - wrapHeight, + }); + start(); + } + + // enter keyboard event + async function handleEnter() { + if (!searchResult.value.length) { + return; + } + const result = unref(searchResult); + const index = unref(activeIndex); + if (result.length === 0 || index < 0) { + return; + } + const to = result[index]; + handleClose(); + await nextTick(); + + // update-begin--author:liaozhiyang---date:20230803---for:【QQYUN-8369】搜索区分大小写,外部链接新页打开 + if (to.internalOrExternal) { + // update-begin--author:liaozhiyang---date:20240402---for:【QQYUN-8773】配置外部网址在顶部菜单模式和搜索打不开 + const path = to.path.replace(URL_HASH_TAB, '#'); + window.open(path, '_blank'); + // update-end--author:liaozhiyang---date:20240402---for:【QQYUN-8773】配置外部网址在顶部菜单模式和搜索打不开 + } else { + go(to.path); + } + // update-end--author:liaozhiyang---date:20230803---for:【QQYUN-8369】搜索区分大小写,外部链接新页打开 + } + + // close search modal + function handleClose() { + searchResult.value = []; + emit('close'); + } + + // enter search + onKeyStroke('Enter', handleEnter); + // Monitor keyboard arrow keys + onKeyStroke('ArrowUp', handleUp); + onKeyStroke('ArrowDown', handleDown); + // esc close + onKeyStroke('Escape', handleClose); + + return { handleSearch, searchResult, keyword, activeIndex, handleMouseenter, handleEnter }; +} diff --git a/src/components/Application/src/useAppContext.ts b/src/components/Application/src/useAppContext.ts new file mode 100644 index 0000000..8bdfb4f --- /dev/null +++ b/src/components/Application/src/useAppContext.ts @@ -0,0 +1,17 @@ +import { InjectionKey, Ref } from 'vue'; +import { createContext, useContext } from '/@/hooks/core/useContext'; + +export interface AppProviderContextProps { + prefixCls: Ref; + isMobile: Ref; +} + +const key: InjectionKey = Symbol(); + +export function createAppProviderContext(context: AppProviderContextProps) { + return createContext(context, key); +} + +export function useAppProviderContext() { + return useContext(key); +} diff --git a/src/components/Authority/index.ts b/src/components/Authority/index.ts new file mode 100644 index 0000000..2f0eab7 --- /dev/null +++ b/src/components/Authority/index.ts @@ -0,0 +1,4 @@ +import { withInstall } from '/@/utils'; +import authority from './src/Authority.vue'; + +export const Authority = withInstall(authority); diff --git a/src/components/Authority/src/Authority.vue b/src/components/Authority/src/Authority.vue new file mode 100644 index 0000000..0d35938 --- /dev/null +++ b/src/components/Authority/src/Authority.vue @@ -0,0 +1,45 @@ + + diff --git a/src/components/Basic/index.ts b/src/components/Basic/index.ts new file mode 100644 index 0000000..97a53a1 --- /dev/null +++ b/src/components/Basic/index.ts @@ -0,0 +1,8 @@ +import { withInstall } from '/@/utils'; +import basicArrow from './src/BasicArrow.vue'; +import basicTitle from './src/BasicTitle.vue'; +import basicHelp from './src/BasicHelp.vue'; + +export const BasicArrow = withInstall(basicArrow); +export const BasicTitle = withInstall(basicTitle); +export const BasicHelp = withInstall(basicHelp); diff --git a/src/components/Basic/src/BasicArrow.vue b/src/components/Basic/src/BasicArrow.vue new file mode 100644 index 0000000..6a4cd01 --- /dev/null +++ b/src/components/Basic/src/BasicArrow.vue @@ -0,0 +1,84 @@ + + + + diff --git a/src/components/Basic/src/BasicHelp.vue b/src/components/Basic/src/BasicHelp.vue new file mode 100644 index 0000000..396bd75 --- /dev/null +++ b/src/components/Basic/src/BasicHelp.vue @@ -0,0 +1,112 @@ + + diff --git a/src/components/Basic/src/BasicTitle.vue b/src/components/Basic/src/BasicTitle.vue new file mode 100644 index 0000000..7a796cb --- /dev/null +++ b/src/components/Basic/src/BasicTitle.vue @@ -0,0 +1,80 @@ + + + diff --git a/src/components/Button/index.ts b/src/components/Button/index.ts new file mode 100644 index 0000000..71bd2e4 --- /dev/null +++ b/src/components/Button/index.ts @@ -0,0 +1,11 @@ +import { withInstall } from '/@/utils'; +import type { ExtractPropTypes } from 'vue'; +import button from './src/BasicButton.vue'; +import jUploadButton from './src/JUploadButton.vue'; +import popConfirmButton from './src/PopConfirmButton.vue'; +import { buttonProps } from './src/props'; + +export const Button = withInstall(button); +export const JUploadButton = withInstall(jUploadButton); +export const PopConfirmButton = withInstall(popConfirmButton); +export declare type ButtonProps = Partial>; diff --git a/src/components/Button/src/BasicButton.vue b/src/components/Button/src/BasicButton.vue new file mode 100644 index 0000000..efbb7c3 --- /dev/null +++ b/src/components/Button/src/BasicButton.vue @@ -0,0 +1,41 @@ + + + + diff --git a/src/components/Button/src/JUploadButton.vue b/src/components/Button/src/JUploadButton.vue new file mode 100644 index 0000000..19dddde --- /dev/null +++ b/src/components/Button/src/JUploadButton.vue @@ -0,0 +1,41 @@ + + + + diff --git a/src/components/Button/src/PopConfirmButton.vue b/src/components/Button/src/PopConfirmButton.vue new file mode 100644 index 0000000..05d0f9a --- /dev/null +++ b/src/components/Button/src/PopConfirmButton.vue @@ -0,0 +1,56 @@ + diff --git a/src/components/Button/src/props.ts b/src/components/Button/src/props.ts new file mode 100644 index 0000000..b5026d6 --- /dev/null +++ b/src/components/Button/src/props.ts @@ -0,0 +1,21 @@ +export const buttonProps = { + color: { type: String, validator: (v) => ['error', 'warning', 'success', ''].includes(v) }, + loading: { type: Boolean }, + disabled: { type: Boolean }, + /** + * Text before icon. + */ + preIcon: { type: String }, + /** + * Text after icon. + */ + postIcon: { type: String }, + type: { type: String }, + /** + * preIcon and postIcon icon size. + * @default: 15 + */ + iconSize: { type: Number, default: 15 }, + isUpload: { type: Boolean, default: false }, + onClick: { type: Function as PropType<(...args) => any>, default: null }, +}; diff --git a/src/components/CardList/index.ts b/src/components/CardList/index.ts new file mode 100644 index 0000000..b977c1b --- /dev/null +++ b/src/components/CardList/index.ts @@ -0,0 +1,4 @@ +import { withInstall } from '/@/utils'; +import cardList from './src/CardList.vue'; + +export const CardList = withInstall(cardList); diff --git a/src/components/CardList/src/CardList.vue b/src/components/CardList/src/CardList.vue new file mode 100644 index 0000000..e2d369c --- /dev/null +++ b/src/components/CardList/src/CardList.vue @@ -0,0 +1,164 @@ + + diff --git a/src/components/CardList/src/data.ts b/src/components/CardList/src/data.ts new file mode 100644 index 0000000..ac56cad --- /dev/null +++ b/src/components/CardList/src/data.ts @@ -0,0 +1,25 @@ +import { ref } from 'vue'; +//每行个数 +export const grid = ref(12); +// slider属性 +export const useSlider = (min = 6, max = 12) => { + // 每行显示个数滑动条 + const getMarks = () => { + const l = {}; + for (let i = min; i < max + 1; i++) { + l[i] = { + style: { + color: '#fff', + }, + label: i, + }; + } + return l; + }; + return { + min, + max, + marks: getMarks(), + step: 1, + }; +}; diff --git a/src/components/ClickOutSide/index.ts b/src/components/ClickOutSide/index.ts new file mode 100644 index 0000000..5e7dd2d --- /dev/null +++ b/src/components/ClickOutSide/index.ts @@ -0,0 +1,4 @@ +import { withInstall } from '/@/utils'; +import clickOutSide from './src/ClickOutSide.vue'; + +export const ClickOutSide = withInstall(clickOutSide); diff --git a/src/components/ClickOutSide/src/ClickOutSide.vue b/src/components/ClickOutSide/src/ClickOutSide.vue new file mode 100644 index 0000000..c043cc1 --- /dev/null +++ b/src/components/ClickOutSide/src/ClickOutSide.vue @@ -0,0 +1,19 @@ + + diff --git a/src/components/CodeEditor/index.ts b/src/components/CodeEditor/index.ts new file mode 100644 index 0000000..3255431 --- /dev/null +++ b/src/components/CodeEditor/index.ts @@ -0,0 +1,4 @@ +import { withInstall } from '/@/utils'; +import codeEditor from './src/CodeEditor.vue'; + +export const CodeEditor = withInstall(codeEditor); diff --git a/src/components/CodeEditor/src/CodeEditor.vue b/src/components/CodeEditor/src/CodeEditor.vue new file mode 100644 index 0000000..28abd7b --- /dev/null +++ b/src/components/CodeEditor/src/CodeEditor.vue @@ -0,0 +1,49 @@ + + + + diff --git a/src/components/CodeEditor/src/codemirror/CodeMirror.vue b/src/components/CodeEditor/src/codemirror/CodeMirror.vue new file mode 100644 index 0000000..2d3bca1 --- /dev/null +++ b/src/components/CodeEditor/src/codemirror/CodeMirror.vue @@ -0,0 +1,102 @@ + + + diff --git a/src/components/CodeEditor/src/codemirror/codeMirror.ts b/src/components/CodeEditor/src/codemirror/codeMirror.ts new file mode 100644 index 0000000..e04f51b --- /dev/null +++ b/src/components/CodeEditor/src/codemirror/codeMirror.ts @@ -0,0 +1,21 @@ +import CodeMirror from 'codemirror'; +import './codemirror.css'; +import 'codemirror/theme/idea.css'; +import 'codemirror/theme/material-palenight.css'; +// import 'codemirror/addon/lint/lint.css'; + +// modes +import 'codemirror/mode/javascript/javascript'; +import 'codemirror/mode/css/css'; +import 'codemirror/mode/htmlmixed/htmlmixed'; +// addons +// import 'codemirror/addon/edit/closebrackets'; +// import 'codemirror/addon/edit/closetag'; +// import 'codemirror/addon/comment/comment'; +// import 'codemirror/addon/fold/foldcode'; +// import 'codemirror/addon/fold/foldgutter'; +// import 'codemirror/addon/fold/brace-fold'; +// import 'codemirror/addon/fold/indent-fold'; +// import 'codemirror/addon/lint/json-lint'; +// import 'codemirror/addon/fold/comment-fold'; +export { CodeMirror }; diff --git a/src/components/CodeEditor/src/codemirror/codemirror.css b/src/components/CodeEditor/src/codemirror/codemirror.css new file mode 100644 index 0000000..dc7c681 --- /dev/null +++ b/src/components/CodeEditor/src/codemirror/codemirror.css @@ -0,0 +1,539 @@ +/* BASICS */ + +.CodeMirror { + --base: #545281; + --comment: hsl(210, 25%, 60%); + --keyword: #af4ab1; + --variable: #0055d1; + --function: #c25205; + --string: #2ba46d; + --number: #c25205; + --tags: #d00; + --qualifier: #ff6032; + --important: var(--string); + + position: relative; + height: auto; + height: 100%; + overflow: hidden; + font-family: var(--font-code); + background: white; + direction: ltr; +} + +/* PADDING */ + +.CodeMirror-lines { + min-height: 1px; /* prevents collapsing before first draw */ + padding: 4px 0; /* Vertical padding around content */ + cursor: text; +} + +.CodeMirror-scrollbar-filler, +.CodeMirror-gutter-filler { + background-color: white; /* The little square between H and V scrollbars */ +} + +/* GUTTER */ + +.CodeMirror-gutters { + position: absolute; + top: 0; + left: 0; + z-index: 3; + min-height: 100%; + white-space: nowrap; + background-color: transparent; + border-right: 1px solid #ddd; +} + +.CodeMirror-linenumber { + min-width: 20px; + padding: 0 3px 0 5px; + color: var(--comment); + text-align: right; + white-space: nowrap; + opacity: 0.6; +} + +.CodeMirror-guttermarker { + color: black; +} + +.CodeMirror-guttermarker-subtle { + color: #999; +} + +/* FOLD GUTTER */ + +.CodeMirror-foldmarker { + font-family: arial; + line-height: 0.3; + color: #414141; + text-shadow: #f96 1px 1px 2px, #f96 -1px -1px 2px, #f96 1px -1px 2px, #f96 -1px 1px 2px; + cursor: pointer; +} + +.CodeMirror-foldgutter { + width: 0.7em; +} + +.CodeMirror-foldgutter-open, +.CodeMirror-foldgutter-folded { + cursor: pointer; +} + +.CodeMirror-foldgutter-open::after, +.CodeMirror-foldgutter-folded::after { + position: relative; + top: -0.1em; + display: inline-block; + font-size: 0.8em; + content: '>'; + opacity: 0.8; + transform: rotate(90deg); + transition: transform 0.2s; +} + +.CodeMirror-foldgutter-folded::after { + transform: none; +} + +/* CURSOR */ + +.CodeMirror-cursor { + position: absolute; + width: 0; + pointer-events: none; + border-right: none; + border-left: 1px solid black; +} + +/* Shown when moving in bi-directional text */ +.CodeMirror div.CodeMirror-secondarycursor { + border-left: 1px solid silver; +} + +.cm-fat-cursor .CodeMirror-cursor { + width: auto; + background: #7e7; + border: 0 !important; +} + +.cm-fat-cursor div.CodeMirror-cursors { + z-index: 1; +} + +.cm-fat-cursor-mark { + background-color: rgba(20, 255, 20, 0.5); + -webkit-animation: blink 1.06s steps(1) infinite; + -moz-animation: blink 1.06s steps(1) infinite; + animation: blink 1.06s steps(1) infinite; +} + +.cm-animate-fat-cursor { + width: auto; + background-color: #7e7; + border: 0; + -webkit-animation: blink 1.06s steps(1) infinite; + -moz-animation: blink 1.06s steps(1) infinite; + animation: blink 1.06s steps(1) infinite; +} +@-moz-keyframes blink { + 50% { + background-color: transparent; + } +} +@-webkit-keyframes blink { + 50% { + background-color: transparent; + } +} +@keyframes blink { + 50% { + background-color: transparent; + } +} + +.cm-tab { + display: inline-block; + text-decoration: inherit; +} + +.CodeMirror-rulers { + position: absolute; + top: -50px; + right: 0; + bottom: -20px; + left: 0; + overflow: hidden; +} + +.CodeMirror-ruler { + position: absolute; + top: 0; + bottom: 0; + border-left: 1px solid #ccc; +} + +/* DEFAULT THEME */ +.cm-s-default.CodeMirror { + background-color: transparent; +} + +.cm-s-default .cm-header { + color: blue; +} + +.cm-s-default .cm-quote { + color: #090; +} + +.cm-negative { + color: #d44; +} + +.cm-positive { + color: #292; +} + +.cm-header, +.cm-strong { + font-weight: bold; +} + +.cm-em { + font-style: italic; +} + +.cm-link { + text-decoration: underline; +} + +.cm-strikethrough { + text-decoration: line-through; +} + +.cm-s-default .cm-atom, +.cm-s-default .cm-def, +.cm-s-default .cm-property, +.cm-s-default .cm-variable-2, +.cm-s-default .cm-variable-3, +.cm-s-default .cm-punctuation { + color: var(--base); +} + +.cm-s-default .cm-hr, +.cm-s-default .cm-comment { + color: var(--comment); +} + +.cm-s-default .cm-attribute, +.cm-s-default .cm-keyword { + color: var(--keyword); +} + +.cm-s-default .cm-variable { + color: var(--variable); +} + +.cm-s-default .cm-bracket, +.cm-s-default .cm-tag { + color: var(--tags); +} + +.cm-s-default .cm-number { + color: var(--number); +} + +.cm-s-default .cm-string, +.cm-s-default .cm-string-2 { + color: var(--string); +} + +.cm-s-default .cm-type { + color: #085; +} + +.cm-s-default .cm-meta { + color: #555; +} + +.cm-s-default .cm-qualifier { + color: var(--qualifier); +} + +.cm-s-default .cm-builtin { + color: #7539ff; +} + +.cm-s-default .cm-link { + color: var(--flash); +} + +.cm-s-default .cm-error { + color: #ff008c; +} + +.cm-invalidchar { + color: #ff008c; +} + +.CodeMirror-composing { + border-bottom: 2px solid; +} + +/* Default styles for common addons */ + +div.CodeMirror span.CodeMirror-matchingbracket { + color: #0b0; +} + +div.CodeMirror span.CodeMirror-nonmatchingbracket { + color: #a22; +} + +.CodeMirror-matchingtag { + background: rgba(255, 150, 0, 0.3); +} + +.CodeMirror-activeline-background { + background: #e8f2ff; +} + +/* STOP */ + +/* The rest of this file contains styles related to the mechanics of + the editor. You probably shouldn't touch them. */ + +.CodeMirror-scroll { + position: relative; + height: 100%; + padding-bottom: 30px; + margin-right: -30px; + + /* 30px is the magic margin used to hide the element's real scrollbars */ + + /* See overflow: hidden in .CodeMirror */ + margin-bottom: -30px; + overflow: scroll !important; /* Things will break if this is overridden */ + outline: none; /* Prevent dragging from highlighting the element */ +} + +.CodeMirror-sizer { + position: relative; + margin-bottom: 20px !important; + border-right: 30px solid transparent; +} + +/* The fake, visible scrollbars. Used to force redraw during scrolling + before actual scrolling happens, thus preventing shaking and + flickering artifacts. */ +.CodeMirror-vscrollbar, +.CodeMirror-hscrollbar, +.CodeMirror-scrollbar-filler, +.CodeMirror-gutter-filler { + position: absolute; + z-index: 6; + display: none; +} + +.CodeMirror-vscrollbar { + top: 0; + right: 0; + overflow-x: hidden; + overflow-y: scroll; +} + +.CodeMirror-hscrollbar { + bottom: 0; + left: 0; + overflow-x: scroll; + overflow-y: hidden; +} + +.CodeMirror-scrollbar-filler { + right: 0; + bottom: 0; +} + +.CodeMirror-gutter-filler { + bottom: 0; + left: 0; +} + +.CodeMirror-gutter { + display: inline-block; + height: 100%; + margin-bottom: -30px; + white-space: normal; + vertical-align: top; +} + +.CodeMirror-gutter-wrapper { + position: absolute; + z-index: 4; + background: none !important; + border: none !important; +} + +.CodeMirror-gutter-background { + position: absolute; + top: 0; + bottom: 0; + z-index: 4; +} + +.CodeMirror-gutter-elt { + position: absolute; + z-index: 4; + cursor: default; +} + +.CodeMirror-gutter-wrapper ::selection { + background-color: transparent; +} + +.CodeMirror-gutter-wrapper ::-moz-selection { + background-color: transparent; +} + +.CodeMirror pre { + position: relative; + z-index: 2; + padding: 0 4px; /* Horizontal padding of content */ + margin: 0; + overflow: visible; + font-family: inherit; + font-size: inherit; + line-height: inherit; + color: inherit; + word-wrap: normal; + white-space: pre; + background: transparent; + border-width: 0; + + /* Reset some styles that the rest of the page might have set */ + -moz-border-radius: 0; + -webkit-border-radius: 0; + border-radius: 0; + -webkit-tap-highlight-color: transparent; + -webkit-font-variant-ligatures: contextual; + font-variant-ligatures: contextual; +} + +.CodeMirror-wrap pre { + word-break: normal; + word-wrap: break-word; + white-space: pre-wrap; +} + +.CodeMirror-linebackground { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 0; +} + +.CodeMirror-linewidget { + position: relative; + z-index: 2; + padding: 0.1px; /* Force widget margins to stay inside of the container */ +} + +.CodeMirror-rtl pre { + direction: rtl; +} + +.CodeMirror-code { + outline: none; +} + +/* Force content-box sizing for the elements where we expect it */ +.CodeMirror-scroll, +.CodeMirror-sizer, +.CodeMirror-gutter, +.CodeMirror-gutters, +.CodeMirror-linenumber { + -moz-box-sizing: content-box; + box-sizing: content-box; +} + +.CodeMirror-measure { + position: absolute; + width: 100%; + height: 0; + overflow: hidden; + visibility: hidden; +} + +.CodeMirror-measure pre { + position: static; +} + +div.CodeMirror-cursors { + position: relative; + z-index: 3; + visibility: hidden; +} + +div.CodeMirror-dragcursors { + visibility: visible; +} + +.CodeMirror-focused div.CodeMirror-cursors { + visibility: visible; +} + +.CodeMirror-selected { + background: #d9d9d9; +} + +.CodeMirror-focused .CodeMirror-selected { + background: #d7d4f0; +} + +.CodeMirror-crosshair { + cursor: crosshair; +} + +.CodeMirror-line::selection, +.CodeMirror-line > span::selection, +.CodeMirror-line > span > span::selection { + background: #d7d4f0; +} + +.CodeMirror-line::-moz-selection, +.CodeMirror-line > span::-moz-selection, +.CodeMirror-line > span > span::-moz-selection { + background: #d7d4f0; +} + +.cm-searching { + background-color: #ffa; + background-color: rgba(255, 255, 0, 0.4); +} + +/* Used to force a border model for a node */ +.cm-force-border { + padding-right: 0.1px; +} + +@media print { + /* Hide the cursor when printing */ + .CodeMirror div.CodeMirror-cursors { + visibility: hidden; + } +} + +/* See issue #2901 */ +.cm-tab-wrap-hack::after { + content: ''; +} + +/* Help users use markselection to safely style text background */ +span.CodeMirror-selectedtext { + background: none; +} diff --git a/src/components/CodeEditor/src/typing.ts b/src/components/CodeEditor/src/typing.ts new file mode 100644 index 0000000..34b5ed1 --- /dev/null +++ b/src/components/CodeEditor/src/typing.ts @@ -0,0 +1,5 @@ +export enum MODE { + JSON = 'application/json', + HTML = 'htmlmixed', + JS = 'javascript', +} diff --git a/src/components/Container/index.ts b/src/components/Container/index.ts new file mode 100644 index 0000000..e1230a0 --- /dev/null +++ b/src/components/Container/index.ts @@ -0,0 +1,10 @@ +import { withInstall } from '/@/utils'; +import collapseContainer from './src/collapse/CollapseContainer.vue'; +import scrollContainer from './src/ScrollContainer.vue'; +import lazyContainer from './src/LazyContainer.vue'; + +export const CollapseContainer = withInstall(collapseContainer); +export const ScrollContainer = withInstall(scrollContainer); +export const LazyContainer = withInstall(lazyContainer); + +export * from './src/typing'; diff --git a/src/components/Container/src/LazyContainer.vue b/src/components/Container/src/LazyContainer.vue new file mode 100644 index 0000000..4e26242 --- /dev/null +++ b/src/components/Container/src/LazyContainer.vue @@ -0,0 +1,138 @@ + + diff --git a/src/components/Container/src/ScrollContainer.vue b/src/components/Container/src/ScrollContainer.vue new file mode 100644 index 0000000..65c71ed --- /dev/null +++ b/src/components/Container/src/ScrollContainer.vue @@ -0,0 +1,93 @@ + + + + diff --git a/src/components/Container/src/collapse/CollapseContainer.vue b/src/components/Container/src/collapse/CollapseContainer.vue new file mode 100644 index 0000000..29c3643 --- /dev/null +++ b/src/components/Container/src/collapse/CollapseContainer.vue @@ -0,0 +1,107 @@ + + + diff --git a/src/components/Container/src/collapse/CollapseHeader.vue b/src/components/Container/src/collapse/CollapseHeader.vue new file mode 100644 index 0000000..4196c0a --- /dev/null +++ b/src/components/Container/src/collapse/CollapseHeader.vue @@ -0,0 +1,38 @@ + + diff --git a/src/components/Container/src/typing.ts b/src/components/Container/src/typing.ts new file mode 100644 index 0000000..86c03be --- /dev/null +++ b/src/components/Container/src/typing.ts @@ -0,0 +1,17 @@ +export type ScrollType = 'default' | 'main'; + +export interface CollapseContainerOptions { + canExpand?: boolean; + title?: string; + helpMessage?: Array | string; +} +export interface ScrollContainerOptions { + enableScroll?: boolean; + type?: ScrollType; +} + +export type ScrollActionType = RefType<{ + scrollBottom: () => void; + getScrollWrap: () => Nullable; + scrollTo: (top: number) => void; +}>; diff --git a/src/components/ContextMenu/index.ts b/src/components/ContextMenu/index.ts new file mode 100644 index 0000000..ed294d7 --- /dev/null +++ b/src/components/ContextMenu/index.ts @@ -0,0 +1,3 @@ +export { createContextMenu, destroyContextMenu } from './src/createContextMenu'; + +export * from './src/typing'; diff --git a/src/components/ContextMenu/src/ContextMenu.vue b/src/components/ContextMenu/src/ContextMenu.vue new file mode 100644 index 0000000..deb3376 --- /dev/null +++ b/src/components/ContextMenu/src/ContextMenu.vue @@ -0,0 +1,198 @@ + + diff --git a/src/components/ContextMenu/src/createContextMenu.ts b/src/components/ContextMenu/src/createContextMenu.ts new file mode 100644 index 0000000..8f7a1c8 --- /dev/null +++ b/src/components/ContextMenu/src/createContextMenu.ts @@ -0,0 +1,75 @@ +import contextMenuVue from './ContextMenu.vue'; +import { isClient } from '/@/utils/is'; +import { CreateContextOptions, ContextMenuProps } from './typing'; +import { createVNode, render } from 'vue'; + +const menuManager: { + domList: Element[]; + resolve: Fn; +} = { + domList: [], + resolve: () => {}, +}; + +export const createContextMenu = function (options: CreateContextOptions) { + const { event } = options || {}; + + event && event?.preventDefault(); + + if (!isClient) { + return; + } + return new Promise((resolve) => { + const body = document.body; + + const container = document.createElement('div'); + const propsData: Partial = {}; + if (options.styles) { + propsData.styles = options.styles; + } + + if (options.items) { + propsData.items = options.items; + } + + if (options.event) { + propsData.customEvent = event; + propsData.axis = { x: event.clientX, y: event.clientY }; + } + + const vm = createVNode(contextMenuVue, propsData); + render(vm, container); + + const handleClick = function () { + menuManager.resolve(''); + }; + + menuManager.domList.push(container); + + const remove = function () { + menuManager.domList.forEach((dom: Element) => { + try { + dom && body.removeChild(dom); + } catch (error) {} + }); + body.removeEventListener('click', handleClick); + body.removeEventListener('scroll', handleClick); + }; + + menuManager.resolve = function (arg) { + remove(); + resolve(arg); + }; + remove(); + body.appendChild(container); + body.addEventListener('click', handleClick); + body.addEventListener('scroll', handleClick); + }); +}; + +export const destroyContextMenu = function () { + if (menuManager) { + menuManager.resolve(''); + menuManager.domList = []; + } +}; diff --git a/src/components/ContextMenu/src/typing.ts b/src/components/ContextMenu/src/typing.ts new file mode 100644 index 0000000..899d36b --- /dev/null +++ b/src/components/ContextMenu/src/typing.ts @@ -0,0 +1,35 @@ +export interface Axis { + x: number; + y: number; +} + +export interface ContextMenuItem { + label: string; + icon?: string; + disabled?: boolean; + handler?: Fn; + divider?: boolean; + children?: ContextMenuItem[]; +} +export interface CreateContextOptions { + event: MouseEvent; + icon?: string; + styles?: any; + items?: ContextMenuItem[]; +} + +export interface ContextMenuProps { + event?: MouseEvent; + styles?: any; + items: ContextMenuItem[]; + customEvent?: MouseEvent; + axis?: Axis; + width?: number; + showIcon?: boolean; +} + +export interface ItemContentProps { + showIcon: boolean | undefined; + item: ContextMenuItem; + handler: Fn; +} diff --git a/src/components/CountDown/index.ts b/src/components/CountDown/index.ts new file mode 100644 index 0000000..9809416 --- /dev/null +++ b/src/components/CountDown/index.ts @@ -0,0 +1,6 @@ +import { withInstall } from '/@/utils'; +import countButton from './src/CountButton.vue'; +import countdownInput from './src/CountdownInput.vue'; + +export const CountdownInput = withInstall(countdownInput); +export const CountButton = withInstall(countButton); diff --git a/src/components/CountDown/src/CountButton.vue b/src/components/CountDown/src/CountButton.vue new file mode 100644 index 0000000..6f21c3e --- /dev/null +++ b/src/components/CountDown/src/CountButton.vue @@ -0,0 +1,73 @@ + + diff --git a/src/components/CountDown/src/CountdownInput.vue b/src/components/CountDown/src/CountdownInput.vue new file mode 100644 index 0000000..6a49f77 --- /dev/null +++ b/src/components/CountDown/src/CountdownInput.vue @@ -0,0 +1,54 @@ + + + diff --git a/src/components/CountDown/src/useCountdown.ts b/src/components/CountDown/src/useCountdown.ts new file mode 100644 index 0000000..316d69a --- /dev/null +++ b/src/components/CountDown/src/useCountdown.ts @@ -0,0 +1,51 @@ +import { ref, unref } from 'vue'; +import { tryOnUnmounted } from '@vueuse/core'; + +export function useCountdown(count: number) { + const currentCount = ref(count); + + const isStart = ref(false); + + let timerId: ReturnType | null; + + function clear() { + timerId && window.clearInterval(timerId); + } + + function stop() { + isStart.value = false; + clear(); + timerId = null; + } + + function start() { + if (unref(isStart) || !!timerId) { + return; + } + isStart.value = true; + timerId = setInterval(() => { + if (unref(currentCount) === 1) { + stop(); + currentCount.value = count; + } else { + currentCount.value -= 1; + } + }, 1000); + } + + function reset() { + currentCount.value = count; + stop(); + } + + function restart() { + reset(); + start(); + } + + tryOnUnmounted(() => { + reset(); + }); + + return { start, reset, restart, clear, stop, currentCount, isStart }; +} diff --git a/src/components/CountTo/index.ts b/src/components/CountTo/index.ts new file mode 100644 index 0000000..36a4e65 --- /dev/null +++ b/src/components/CountTo/index.ts @@ -0,0 +1,4 @@ +import { withInstall } from '/@/utils'; +import countTo from './src/CountTo.vue'; + +export const CountTo = withInstall(countTo); diff --git a/src/components/CountTo/src/CountTo.vue b/src/components/CountTo/src/CountTo.vue new file mode 100644 index 0000000..7de3361 --- /dev/null +++ b/src/components/CountTo/src/CountTo.vue @@ -0,0 +1,110 @@ + + diff --git a/src/components/Cropper/index.ts b/src/components/Cropper/index.ts new file mode 100644 index 0000000..88d6d1d --- /dev/null +++ b/src/components/Cropper/index.ts @@ -0,0 +1,7 @@ +import { withInstall } from '/@/utils'; +import cropperImage from './src/Cropper.vue'; +import avatarCropper from './src/CropperAvatar.vue'; + +export * from './src/typing'; +export const CropperImage = withInstall(cropperImage); +export const CropperAvatar = withInstall(avatarCropper); diff --git a/src/components/Cropper/src/CopperModal.vue b/src/components/Cropper/src/CopperModal.vue new file mode 100644 index 0000000..33a6fef --- /dev/null +++ b/src/components/Cropper/src/CopperModal.vue @@ -0,0 +1,237 @@ + + + + diff --git a/src/components/Cropper/src/Cropper.vue b/src/components/Cropper/src/Cropper.vue new file mode 100644 index 0000000..99176d7 --- /dev/null +++ b/src/components/Cropper/src/Cropper.vue @@ -0,0 +1,181 @@ + + + diff --git a/src/components/Cropper/src/CropperAvatar.vue b/src/components/Cropper/src/CropperAvatar.vue new file mode 100644 index 0000000..e95329a --- /dev/null +++ b/src/components/Cropper/src/CropperAvatar.vue @@ -0,0 +1,136 @@ + + + + diff --git a/src/components/Cropper/src/typing.ts b/src/components/Cropper/src/typing.ts new file mode 100644 index 0000000..e76cc6f --- /dev/null +++ b/src/components/Cropper/src/typing.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/Description/index.ts b/src/components/Description/index.ts new file mode 100644 index 0000000..58277d0 --- /dev/null +++ b/src/components/Description/index.ts @@ -0,0 +1,6 @@ +import { withInstall } from '/@/utils'; +import description from './src/Description.vue'; + +export * from './src/typing'; +export { useDescription } from './src/useDescription'; +export const Description = withInstall(description); diff --git a/src/components/Description/src/Description.vue b/src/components/Description/src/Description.vue new file mode 100644 index 0000000..17b8c74 --- /dev/null +++ b/src/components/Description/src/Description.vue @@ -0,0 +1,181 @@ + diff --git a/src/components/Description/src/typing.ts b/src/components/Description/src/typing.ts new file mode 100644 index 0000000..897b7d2 --- /dev/null +++ b/src/components/Description/src/typing.ts @@ -0,0 +1,47 @@ +import type { VNode, CSSProperties } from 'vue'; +import type { CollapseContainerOptions } from '/@/components/Container/index'; +import type { DescriptionsProps } from 'ant-design-vue/es/descriptions/index'; + +export interface DescItem { + labelMinWidth?: number; + contentMinWidth?: number; + labelStyle?: CSSProperties; + field: string; + label: string | VNode | JSX.Element; + // Merge column + span?: number; + show?: (...arg: any) => boolean; + // render + render?: (val: any, data: Recordable) => VNode | undefined | JSX.Element | Element | string | number; +} + +export interface DescriptionProps extends DescriptionsProps { + // Whether to include the collapse component + useCollapse?: boolean; + /** + * item configuration + * @type DescItem + */ + schema: DescItem[]; + /** + * 数据 + * @type object + */ + data: Recordable; + /** + * Built-in CollapseContainer component configuration + * @type CollapseContainerOptions + */ + collapseOptions?: CollapseContainerOptions; +} + +export interface DescInstance { + setDescProps(descProps: Partial): void; +} + +export type Register = (descInstance: DescInstance) => void; + +/** + * @description: + */ +export type UseDescReturnType = [Register, DescInstance]; diff --git a/src/components/Description/src/useDescription.ts b/src/components/Description/src/useDescription.ts new file mode 100644 index 0000000..d1037d0 --- /dev/null +++ b/src/components/Description/src/useDescription.ts @@ -0,0 +1,28 @@ +import type { DescriptionProps, DescInstance, UseDescReturnType } from './typing'; +import { ref, getCurrentInstance, unref } from 'vue'; +import { isProdMode } from '/@/utils/env'; + +export function useDescription(props?: Partial): UseDescReturnType { + if (!getCurrentInstance()) { + throw new Error('useDescription() can only be used inside setup() or functional components!'); + } + const desc = ref>(null); + const loaded = ref(false); + + function register(instance: DescInstance) { + if (unref(loaded) && isProdMode()) { + return; + } + desc.value = instance; + props && instance.setDescProps(props); + loaded.value = true; + } + + const methods: DescInstance = { + setDescProps: (descProps: Partial): void => { + unref(desc)?.setDescProps(descProps); + }, + }; + + return [register, methods]; +} diff --git a/src/components/Drawer/index.ts b/src/components/Drawer/index.ts new file mode 100644 index 0000000..820ade5 --- /dev/null +++ b/src/components/Drawer/index.ts @@ -0,0 +1,6 @@ +import { withInstall } from '/@/utils'; +import basicDrawer from './src/BasicDrawer.vue'; + +export const BasicDrawer = withInstall(basicDrawer); +export * from './src/typing'; +export { useDrawer, useDrawerInner } from './src/useDrawer'; diff --git a/src/components/Drawer/src/BasicDrawer.vue b/src/components/Drawer/src/BasicDrawer.vue new file mode 100644 index 0000000..0381a99 --- /dev/null +++ b/src/components/Drawer/src/BasicDrawer.vue @@ -0,0 +1,254 @@ + + + diff --git a/src/components/Drawer/src/components/DrawerFooter.vue b/src/components/Drawer/src/components/DrawerFooter.vue new file mode 100644 index 0000000..9e6d322 --- /dev/null +++ b/src/components/Drawer/src/components/DrawerFooter.vue @@ -0,0 +1,75 @@ + + + + diff --git a/src/components/Drawer/src/components/DrawerHeader.vue b/src/components/Drawer/src/components/DrawerHeader.vue new file mode 100644 index 0000000..5eaa44f --- /dev/null +++ b/src/components/Drawer/src/components/DrawerHeader.vue @@ -0,0 +1,74 @@ + + + + diff --git a/src/components/Drawer/src/props.ts b/src/components/Drawer/src/props.ts new file mode 100644 index 0000000..398f251 --- /dev/null +++ b/src/components/Drawer/src/props.ts @@ -0,0 +1,47 @@ +import type { PropType } from 'vue'; + +import { useI18n } from '/@/hooks/web/useI18n'; +const { t } = useI18n(); + +export const footerProps = { + confirmLoading: { type: Boolean }, + /** + * @description: Show close button + */ + showCancelBtn: { type: Boolean, default: true }, + cancelButtonProps: Object as PropType, + cancelText: { type: String, default: t('common.cancelText') }, + /** + * @description: Show confirmation button + */ + showOkBtn: { type: Boolean, default: true }, + okButtonProps: Object as PropType, + okText: { type: String, default: t('common.okText') }, + okType: { type: String, default: 'primary' }, + showFooter: { type: Boolean }, + footerHeight: { + type: [String, Number] as PropType, + default: 60, + }, +}; +export const basicProps = { + class: {type: [String, Object, Array]}, + isDetail: { type: Boolean }, + title: { type: String, default: '' }, + loadingText: { type: String }, + showDetailBack: { type: Boolean, default: true }, + visible: { type: Boolean }, + open: { type: Boolean }, + loading: { type: Boolean }, + maskClosable: { type: Boolean, default: true }, + getContainer: { + type: [Object, String, Function, Boolean] as PropType, + default: () => 'body', + }, + closeFunc: { + type: [Function, Object] as PropType, + default: null, + }, + destroyOnClose: { type: Boolean }, + ...footerProps, +}; diff --git a/src/components/Drawer/src/typing.ts b/src/components/Drawer/src/typing.ts new file mode 100644 index 0000000..b129073 --- /dev/null +++ b/src/components/Drawer/src/typing.ts @@ -0,0 +1,199 @@ +import type { ButtonProps } from 'ant-design-vue/lib/button/buttonTypes'; +import type { CSSProperties, VNodeChild, ComputedRef } from 'vue'; +import type { ScrollContainerOptions } from '/@/components/Container/index'; + +export interface DrawerInstance { + setDrawerProps: (props: Partial | boolean) => void; + emitVisible?: (visible: boolean, uid: number) => void; +} + +export interface ReturnMethods extends DrawerInstance { + openDrawer: (visible?: boolean, data?: T, openOnSet?: boolean) => void; + closeDrawer: () => void; + getVisible?: ComputedRef; + getOpen?: ComputedRef; +} + +export type RegisterFn = (drawerInstance: DrawerInstance, uuid?: string) => void; + +export interface ReturnInnerMethods extends DrawerInstance { + closeDrawer: () => void; + changeLoading: (loading: boolean) => void; + changeOkLoading: (loading: boolean) => void; + getVisible?: ComputedRef; + getOpen?: ComputedRef; +} + +export type UseDrawerReturnType = [RegisterFn, ReturnMethods]; + +export type UseDrawerInnerReturnType = [RegisterFn, ReturnInnerMethods]; + +export interface DrawerFooterProps { + showOkBtn: boolean; + showCancelBtn: boolean; + /** + * Text of the Cancel button + * @default 'cancel' + * @type string + */ + cancelText: string; + /** + * Text of the OK button + * @default 'OK' + * @type string + */ + okText: string; + + /** + * Button type of the OK button + * @default 'primary' + * @type string + */ + okType: 'primary' | 'danger' | 'dashed' | 'ghost' | 'default'; + /** + * The ok button props, follow jsx rules + * @type object + */ + okButtonProps: { props: ButtonProps; on: {} }; + + /** + * The cancel button props, follow jsx rules + * @type object + */ + cancelButtonProps: { props: ButtonProps; on: {} }; + /** + * Whether to apply loading visual effect for OK button or not + * @default false + * @type boolean + */ + confirmLoading: boolean; + + showFooter: boolean; + footerHeight: string | number; +} +export interface DrawerProps extends DrawerFooterProps { + isDetail?: boolean; + loading?: boolean; + showDetailBack?: boolean; + visible?: boolean; + open?: boolean; + /** + * Built-in ScrollContainer component configuration + * @type ScrollContainerOptions + */ + scrollOptions?: ScrollContainerOptions; + closeFunc?: () => Promise; + triggerWindowResize?: boolean; + /** + * Whether a close (x) button is visible on top right of the Drawer dialog or not. + * @default true + * @type boolean + */ + closable?: boolean; + + /** + * Whether to unmount child components on closing drawer or not. + * @default false + * @type boolean + */ + destroyOnClose?: boolean; + + /** + * Return the mounted node for Drawer. + * @default 'body' + * @type any ( HTMLElement| () => HTMLElement | string) + */ + getContainer?: () => HTMLElement | string; + + /** + * Whether to show mask or not. + * @default true + * @type boolean + */ + mask?: boolean; + + /** + * Clicking on the mask (area outside the Drawer) to close the Drawer or not. + * @default true + * @type boolean + */ + maskClosable?: boolean; + + /** + * Style for Drawer's mask element. + * @default {} + * @type object + */ + maskStyle?: CSSProperties; + + /** + * The title for Drawer. + * @type any (string | slot) + */ + title?: VNodeChild | JSX.Element; + + /** + * The class name of the container of the Drawer dialog. + * @type string + */ + class?: string; + // 兼容老版本的写法(后续可能会删除,优先写class) + wrapClassName?: string; + + /** + * Style of wrapper element which **contains mask** compare to `drawerStyle` + * @type object + */ + wrapStyle?: CSSProperties; + + /** + * Style of the popup layer element + * @type object + */ + drawerStyle?: CSSProperties; + + /** + * Style of floating layer, typically used for adjusting its position. + * @type object + */ + bodyStyle?: CSSProperties; + headerStyle?: CSSProperties; + + /** + * Width of the Drawer dialog. + * @default 256 + * @type string | number + */ + width?: string | number; + + /** + * placement is top or bottom, height of the Drawer dialog. + * @type string | number + */ + height?: string | number; + + /** + * The z-index of the Drawer. + * @default 1000 + * @type number + */ + zIndex?: number; + + /** + * The placement of the Drawer. + * @default 'right' + * @type string + */ + placement?: 'top' | 'right' | 'bottom' | 'left'; + afterVisibleChange?: (visible?: boolean) => void; + keyboard?: boolean; + /** + * Specify a callback that will be called when a user clicks mask, close button or Cancel button. + */ + onClose?: (e?: Event) => void; +} +export interface DrawerActionType { + scrollBottom: () => void; + scrollTo: (to: number) => void; + getScrollWrap: () => Element | null; +} diff --git a/src/components/Drawer/src/useDrawer.ts b/src/components/Drawer/src/useDrawer.ts new file mode 100644 index 0000000..62a65c3 --- /dev/null +++ b/src/components/Drawer/src/useDrawer.ts @@ -0,0 +1,156 @@ +import type { UseDrawerReturnType, DrawerInstance, ReturnMethods, DrawerProps, UseDrawerInnerReturnType } from './typing'; +import { ref, getCurrentInstance, unref, reactive, watchEffect, nextTick, toRaw, computed } from 'vue'; +import { isProdMode } from '/@/utils/env'; +import { isFunction } from '/@/utils/is'; +import { tryOnUnmounted } from '@vueuse/core'; +import { isEqual } from 'lodash-es'; +import { error } from '/@/utils/log'; + +const dataTransferRef = reactive({}); + +const visibleData = reactive<{ [key: number]: boolean }>({}); + +/** + * @description: Applicable to separate drawer and call outside + */ +export function useDrawer(): UseDrawerReturnType { + if (!getCurrentInstance()) { + throw new Error('useDrawer() can only be used inside setup() or functional components!'); + } + const drawer = ref(null); + const loaded = ref>(false); + const uid = ref(''); + + function register(drawerInstance: DrawerInstance, uuid: string) { + isProdMode() && + tryOnUnmounted(() => { + drawer.value = null; + loaded.value = null; + dataTransferRef[unref(uid)] = null; + }); + + if (unref(loaded) && isProdMode() && drawerInstance === unref(drawer)) { + return; + } + uid.value = uuid; + drawer.value = drawerInstance; + loaded.value = true; + + drawerInstance.emitVisible = (visible: boolean, uid: number) => { + visibleData[uid] = visible; + }; + } + + const getInstance = () => { + const instance = unref(drawer); + if (!instance) { + error('useDrawer instance is undefined!'); + } + return instance; + }; + + const methods: ReturnMethods = { + setDrawerProps: (props: Partial): void => { + getInstance()?.setDrawerProps(props); + }, + + getVisible: computed((): boolean => { + return visibleData[~~unref(uid)]; + }), + + getOpen: computed((): boolean => { + return visibleData[~~unref(uid)]; + }), + + openDrawer: (visible = true, data?: T, openOnSet = true): void => { + // update-begin--author:liaozhiyang---date:20231218---for:【QQYUN-6366】升级到antd4.x + getInstance()?.setDrawerProps({ + open: visible, + }); + // update-end--author:liaozhiyang---date:20231218---for:【QQYUN-6366】升级到antd4.x + if (!data) return; + + if (openOnSet) { + dataTransferRef[unref(uid)] = null; + dataTransferRef[unref(uid)] = toRaw(data); + return; + } + const equal = isEqual(toRaw(dataTransferRef[unref(uid)]), toRaw(data)); + if (!equal) { + dataTransferRef[unref(uid)] = toRaw(data); + } + }, + closeDrawer: () => { + // update-begin--author:liaozhiyang---date:20231218---for:【QQYUN-6366】升级到antd4.x + getInstance()?.setDrawerProps({ open: false }); + // update-end--author:liaozhiyang---date:20231218---for:【QQYUN-6366】升级到antd4.x + }, + }; + + return [register, methods]; +} + +export const useDrawerInner = (callbackFn?: Fn): UseDrawerInnerReturnType => { + const drawerInstanceRef = ref>(null); + const currentInstance = getCurrentInstance(); + const uidRef = ref(''); + + if (!getCurrentInstance()) { + throw new Error('useDrawerInner() can only be used inside setup() or functional components!'); + } + + const getInstance = () => { + const instance = unref(drawerInstanceRef); + if (!instance) { + error('useDrawerInner instance is undefined!'); + return; + } + return instance; + }; + + const register = (modalInstance: DrawerInstance, uuid: string) => { + isProdMode() && + tryOnUnmounted(() => { + drawerInstanceRef.value = null; + }); + + uidRef.value = uuid; + drawerInstanceRef.value = modalInstance; + currentInstance?.emit('register', modalInstance, uuid); + }; + + watchEffect(() => { + const data = dataTransferRef[unref(uidRef)]; + if (!data) return; + if (!callbackFn || !isFunction(callbackFn)) return; + nextTick(() => { + callbackFn(data); + }); + }); + + return [ + register, + { + changeLoading: (loading = true) => { + getInstance()?.setDrawerProps({ loading }); + }, + + changeOkLoading: (loading = true) => { + getInstance()?.setDrawerProps({ confirmLoading: loading }); + }, + getVisible: computed((): boolean => { + return visibleData[~~unref(uidRef)]; + }), + getOpen: computed((): boolean => { + return visibleData[~~unref(uidRef)]; + }), + closeDrawer: () => { + getInstance()?.setDrawerProps({ open: false }); + }, + + setDrawerProps: (props: Partial) => { + getInstance()?.setDrawerProps(props); + }, + }, + ]; +}; diff --git a/src/components/Dropdown/index.ts b/src/components/Dropdown/index.ts new file mode 100644 index 0000000..80439e5 --- /dev/null +++ b/src/components/Dropdown/index.ts @@ -0,0 +1,5 @@ +import { withInstall } from '/@/utils'; +import dropdown from './src/Dropdown.vue'; + +export * from './src/typing'; +export const Dropdown = withInstall(dropdown); diff --git a/src/components/Dropdown/src/Dropdown.vue b/src/components/Dropdown/src/Dropdown.vue new file mode 100644 index 0000000..676aac9 --- /dev/null +++ b/src/components/Dropdown/src/Dropdown.vue @@ -0,0 +1,119 @@ + + + + + diff --git a/src/components/Dropdown/src/typing.ts b/src/components/Dropdown/src/typing.ts new file mode 100644 index 0000000..29de8cb --- /dev/null +++ b/src/components/Dropdown/src/typing.ts @@ -0,0 +1,9 @@ +export interface DropMenu { + onClick?: Fn; + to?: string; + icon?: string; + event: string | number; + text: string; + disabled?: boolean; + divider?: boolean; +} diff --git a/src/components/Form/index.ts b/src/components/Form/index.ts new file mode 100644 index 0000000..f9f47b4 --- /dev/null +++ b/src/components/Form/index.ts @@ -0,0 +1,36 @@ +import BasicForm from './src/BasicForm.vue'; + +export * from './src/types/form'; +export * from './src/types/formItem'; + +export { useComponentRegister } from './src/hooks/useComponentRegister'; +export { useForm } from './src/hooks/useForm'; + +export { default as ApiSelect } from './src/components/ApiSelect.vue'; +export { default as RadioButtonGroup } from './src/components/RadioButtonGroup.vue'; +export { default as ApiTreeSelect } from './src/components/ApiTreeSelect.vue'; +export { default as ApiRadioGroup } from './src/components/ApiRadioGroup.vue'; +//Jeecg自定义组件 +export { default as JAreaLinkage } from './src/jeecg/components/JAreaLinkage.vue'; +export { default as JSelectUser } from './src/jeecg/components/JSelectUser.vue'; +export { default as JSelectDept } from './src/jeecg/components/JSelectDept.vue'; +export { default as JCodeEditor } from './src/jeecg/components/JCodeEditor.vue'; +export { default as JCategorySelect } from './src/jeecg/components/JCategorySelect.vue'; +export { default as JSelectMultiple } from './src/jeecg/components/JSelectMultiple.vue'; +export { default as JPopup } from './src/jeecg/components/JPopup.vue'; +export { default as JAreaSelect } from './src/jeecg/components/JAreaSelect.vue'; +export { JEasyCron, JEasyCronInner, JEasyCronModal } from '/@/components/Form/src/jeecg/components/JEasyCron'; +export { default as JCheckbox } from './src/jeecg/components/JCheckbox.vue'; +export { default as JInput } from './src/jeecg/components/JInput.vue'; +export { default as JEllipsis } from './src/jeecg/components/JEllipsis.vue'; +export { default as JDictSelectTag } from './src/jeecg/components/JDictSelectTag.vue'; +export { default as JTreeSelect } from './src/jeecg/components/JTreeSelect.vue'; +export { default as JSearchSelect } from './src/jeecg/components/JSearchSelect.vue'; +export { default as JSelectUserByDept } from './src/jeecg/components/JSelectUserByDept.vue'; +export { default as JSelectUserByDepartment } from './src/jeecg/components/JSelectUserByDepartment.vue'; +export { default as JEditor } from './src/jeecg/components/JEditor.vue'; +export { default as JImageUpload } from './src/jeecg/components/JImageUpload.vue'; +// Jeecg自定义校验 +export { JCronValidator } from '/@/components/Form/src/jeecg/components/JEasyCron'; + +export { BasicForm }; diff --git a/src/components/Form/src/BasicForm.vue b/src/components/Form/src/BasicForm.vue new file mode 100644 index 0000000..6a70a56 --- /dev/null +++ b/src/components/Form/src/BasicForm.vue @@ -0,0 +1,436 @@ + + + diff --git a/src/components/Form/src/componentMap.ts b/src/components/Form/src/componentMap.ts new file mode 100644 index 0000000..8f71df0 --- /dev/null +++ b/src/components/Form/src/componentMap.ts @@ -0,0 +1,187 @@ +/** + * 目前实现了异步加载的组件清单 : + * JAreaLinkage + * JEditor + * JMarkdownEditor + * JCodeEditor + * JEasyCron + */ +import type { Component } from 'vue'; +import type { ComponentType } from './types/index'; +import { createAsyncComponent } from '/@/utils/factory/createAsyncComponent'; +/** + * Component list, register here to setting it in the form + */ +import { + Input, + Select, + Radio, + Checkbox, + AutoComplete, + Cascader, + DatePicker, + InputNumber, + Switch, + TimePicker, + TreeSelect, + Slider, + Rate, + Divider, +} from 'ant-design-vue'; +import ApiRadioGroup from './components/ApiRadioGroup.vue'; +import RadioButtonGroup from './components/RadioButtonGroup.vue'; +import ApiSelect from './components/ApiSelect.vue'; +import ApiTreeSelect from './components/ApiTreeSelect.vue'; +import { BasicUpload } from '/@/components/Upload'; +import { StrengthMeter } from '/@/components/StrengthMeter'; +import { IconPicker } from '/@/components/Icon'; +import { CountdownInput } from '/@/components/CountDown'; +//自定义组件 +// import JAreaLinkage from './jeecg/components/JAreaLinkage.vue'; +import JSelectUser from './jeecg/components/JSelectUser.vue'; +import JSelectPosition from './jeecg/components/JSelectPosition.vue'; +import JSelectRole from './jeecg/components/JSelectRole.vue'; +import JImageUpload from './jeecg/components/JImageUpload.vue'; +import JDictSelectTag from './jeecg/components/JDictSelectTag.vue'; +import JSelectDept from './jeecg/components/JSelectDept.vue'; +import JAreaSelect from './jeecg/components/JAreaSelect.vue'; +import JEditor from './jeecg/components/JEditor.vue'; +// import JMarkdownEditor from './jeecg/components/JMarkdownEditor.vue'; +import JSelectInput from './jeecg/components/JSelectInput.vue'; +// import JCodeEditor from './jeecg/components/JCodeEditor.vue'; +import JCategorySelect from './jeecg/components/JCategorySelect.vue'; +import JSelectMultiple from './jeecg/components/JSelectMultiple.vue'; +import JPopup from './jeecg/components/JPopup.vue'; +// update-begin--author:liaozhiyang---date:20240130---for:【QQYUN-7961】popupDict字典 +import JPopupDict from './jeecg/components/JPopupDict.vue'; +// update-end--author:liaozhiyang---date:20240130---for:【QQYUN-7961】popupDict字典 +import JSwitch from './jeecg/components/JSwitch.vue'; +import JTreeDict from './jeecg/components/JTreeDict.vue'; +import JInputPop from './jeecg/components/JInputPop.vue'; +// import { JEasyCron } from './jeecg/components/JEasyCron'; +import JCheckbox from './jeecg/components/JCheckbox.vue'; +import JInput from './jeecg/components/JInput.vue'; +import JTreeSelect from './jeecg/components/JTreeSelect.vue'; +import JEllipsis from './jeecg/components/JEllipsis.vue'; +import JSelectUserByDept from './jeecg/components/JSelectUserByDept.vue'; +import JSelectUserByDepartment from './jeecg/components/JSelectUserByDepartment.vue'; +import JLinkTableCard from './jeecg/components/JLinkTableCard/JLinkTableCard.vue'; +import JUpload from './jeecg/components/JUpload/JUpload.vue'; +import JSearchSelect from './jeecg/components/JSearchSelect.vue'; +import JAddInput from './jeecg/components/JAddInput.vue'; +import { Time } from '/@/components/Time'; +import JRangeNumber from './jeecg/components/JRangeNumber.vue'; +import UserSelect from './jeecg/components/userSelect/index.vue'; +import JRangeDate from './jeecg/components/JRangeDate.vue' +import JRangeTime from './jeecg/components/JRangeTime.vue' +import JInputSelect from './jeecg/components/JInputSelect.vue' +import RoleSelectInput from './jeecg/components/roleSelect/RoleSelectInput.vue'; +import {DatePickerInFilter, CascaderPcaInFilter} from "@/components/InFilter"; + +const componentMap = new Map(); + +componentMap.set('Time', Time); +componentMap.set('Input', Input); +componentMap.set('InputGroup', Input.Group); +componentMap.set('InputPassword', Input.Password); +componentMap.set('InputSearch', Input.Search); +componentMap.set('InputTextArea', Input.TextArea); +componentMap.set('InputNumber', InputNumber); +componentMap.set('AutoComplete', AutoComplete); + +componentMap.set('Select', Select); +componentMap.set('ApiSelect', ApiSelect); +componentMap.set('TreeSelect', TreeSelect); +componentMap.set('ApiTreeSelect', ApiTreeSelect); +componentMap.set('ApiRadioGroup', ApiRadioGroup); +componentMap.set('Switch', Switch); +componentMap.set('RadioButtonGroup', RadioButtonGroup); +componentMap.set('RadioGroup', Radio.Group); +componentMap.set('Checkbox', Checkbox); +componentMap.set('CheckboxGroup', Checkbox.Group); +componentMap.set('Cascader', Cascader); +componentMap.set('Slider', Slider); +componentMap.set('Rate', Rate); + +componentMap.set('DatePicker', DatePicker); +componentMap.set('MonthPicker', DatePicker.MonthPicker); +componentMap.set('RangePicker', DatePicker.RangePicker); +componentMap.set('WeekPicker', DatePicker.WeekPicker); +componentMap.set('TimePicker', TimePicker); +componentMap.set('DatePickerInFilter', DatePickerInFilter); +componentMap.set('StrengthMeter', StrengthMeter); +componentMap.set('IconPicker', IconPicker); +componentMap.set('InputCountDown', CountdownInput); + +componentMap.set('Upload', BasicUpload); +componentMap.set('Divider', Divider); + +//注册自定义组件 + +componentMap.set( + 'JAreaLinkage', + createAsyncComponent(() => import('./jeecg/components/JAreaLinkage.vue')) +); +componentMap.set('JSelectPosition', JSelectPosition); +componentMap.set('JSelectUser', JSelectUser); +componentMap.set('JSelectRole', JSelectRole); +componentMap.set('JImageUpload', JImageUpload); +componentMap.set('JDictSelectTag', JDictSelectTag); +componentMap.set('JSelectDept', JSelectDept); +componentMap.set('JAreaSelect', JAreaSelect); +componentMap.set('JLinkTableCard', JLinkTableCard); +// componentMap.set( +// 'JEditor', +// createAsyncComponent(() => import('./jeecg/components/JEditor.vue')) +// ); +componentMap.set('JEditor', JEditor); +componentMap.set( + 'JMarkdownEditor', + createAsyncComponent(() => import('./jeecg/components/JMarkdownEditor.vue')) +); +componentMap.set('JSelectInput', JSelectInput); +componentMap.set( + 'JCodeEditor', + createAsyncComponent(() => import('./jeecg/components/JCodeEditor.vue')) +); +componentMap.set('JCategorySelect', JCategorySelect); +componentMap.set('JSelectMultiple', JSelectMultiple); +componentMap.set('JPopup', JPopup); +// update-begin--author:liaozhiyang---date:20240130---for:【QQYUN-7961】popupDict字典 +componentMap.set('JPopupDict', JPopupDict); +// update-end--author:liaozhiyang---date:20240130---for:【QQYUN-7961】popupDict字典 +componentMap.set('JSwitch', JSwitch); +componentMap.set('JTreeDict', JTreeDict); +componentMap.set('JInputPop', JInputPop); +componentMap.set( + 'JEasyCron', + createAsyncComponent(() => import('./jeecg/components/JEasyCron/EasyCronInput.vue')) +); +componentMap.set('JCheckbox', JCheckbox); +componentMap.set('JInput', JInput); +componentMap.set('JTreeSelect', JTreeSelect); +componentMap.set('JEllipsis', JEllipsis); +componentMap.set('JSelectUserByDept', JSelectUserByDept); +componentMap.set('JSelectUserByDepartment', JSelectUserByDepartment); +componentMap.set('JUpload', JUpload); +componentMap.set('JSearchSelect', JSearchSelect); +componentMap.set('JAddInput', JAddInput); +componentMap.set('JRangeNumber', JRangeNumber); +componentMap.set('CascaderPcaInFilter', CascaderPcaInFilter); +componentMap.set('UserSelect', UserSelect); +componentMap.set('RangeDate', JRangeDate); +componentMap.set('RangeTime', JRangeTime); +componentMap.set('RoleSelect', RoleSelectInput); +componentMap.set('JInputSelect', JInputSelect); + + + +export function add(compName: ComponentType, component: Component) { + componentMap.set(compName, component); +} + +export function del(compName: ComponentType) { + componentMap.delete(compName); +} + +export { componentMap }; diff --git a/src/components/Form/src/components/ApiRadioGroup.vue b/src/components/Form/src/components/ApiRadioGroup.vue new file mode 100644 index 0000000..b58b421 --- /dev/null +++ b/src/components/Form/src/components/ApiRadioGroup.vue @@ -0,0 +1,130 @@ + + + diff --git a/src/components/Form/src/components/ApiSelect.vue b/src/components/Form/src/components/ApiSelect.vue new file mode 100644 index 0000000..8bb7c12 --- /dev/null +++ b/src/components/Form/src/components/ApiSelect.vue @@ -0,0 +1,246 @@ + + diff --git a/src/components/Form/src/components/ApiTreeSelect.vue b/src/components/Form/src/components/ApiTreeSelect.vue new file mode 100644 index 0000000..8d6cd20 --- /dev/null +++ b/src/components/Form/src/components/ApiTreeSelect.vue @@ -0,0 +1,88 @@ + + + diff --git a/src/components/Form/src/components/FormAction.vue b/src/components/Form/src/components/FormAction.vue new file mode 100644 index 0000000..091a146 --- /dev/null +++ b/src/components/Form/src/components/FormAction.vue @@ -0,0 +1,141 @@ + + + diff --git a/src/components/Form/src/components/FormItem.vue b/src/components/Form/src/components/FormItem.vue new file mode 100644 index 0000000..68ee3dc --- /dev/null +++ b/src/components/Form/src/components/FormItem.vue @@ -0,0 +1,550 @@ + diff --git a/src/components/Form/src/components/Middleware.vue b/src/components/Form/src/components/Middleware.vue new file mode 100644 index 0000000..3fdd3f1 --- /dev/null +++ b/src/components/Form/src/components/Middleware.vue @@ -0,0 +1,24 @@ + + + + + diff --git a/src/components/Form/src/components/RadioButtonGroup.vue b/src/components/Form/src/components/RadioButtonGroup.vue new file mode 100644 index 0000000..c2c7b22 --- /dev/null +++ b/src/components/Form/src/components/RadioButtonGroup.vue @@ -0,0 +1,57 @@ + + + diff --git a/src/components/Form/src/container/JFormContainer.vue b/src/components/Form/src/container/JFormContainer.vue new file mode 100644 index 0000000..2005747 --- /dev/null +++ b/src/components/Form/src/container/JFormContainer.vue @@ -0,0 +1,221 @@ + + + + diff --git a/src/components/Form/src/helper.ts b/src/components/Form/src/helper.ts new file mode 100644 index 0000000..3ba699a --- /dev/null +++ b/src/components/Form/src/helper.ts @@ -0,0 +1,88 @@ +import type { ValidationRule } from 'ant-design-vue/lib/form/Form'; +import type { ComponentType } from './types/index'; +import { useI18n } from '/@/hooks/web/useI18n'; +import { dateUtil } from '/@/utils/dateUtil'; +import { isNumber, isObject } from '/@/utils/is'; + +const { t } = useI18n(); + +/** + * @description: 生成placeholder + */ +export function createPlaceholderMessage(component: ComponentType) { + if (component.includes('Input') || component.includes('Complete')) { + return t('common.inputText'); + } + if (component.includes('Picker')) { + return t('common.chooseText'); + } + if ( + component.includes('Select') || + component.includes('Cascader') || + component.includes('Checkbox') || + component.includes('Radio') || + component.includes('Switch') + ) { + // return `请选择${label}`; + return t('common.chooseText'); + } + return ''; +} + +const DATE_TYPE = ['DatePicker', 'MonthPicker', 'WeekPicker', 'TimePicker']; + +function genType() { + return [...DATE_TYPE, 'RangePicker']; +} + +export function setComponentRuleType(rule: ValidationRule, component: ComponentType, valueFormat: string) { + //update-begin---author:wangshuai---date:2024-02-01---for:【QQYUN-8176】编辑表单中,校验必填时,如果组件是ApiSelect,打开编辑页面时,即使该字段有值,也会提示请选择--- + //https://github.com/vbenjs/vue-vben-admin/pull/3082 github修复原文 + if (Reflect.has(rule, 'type')) { + return; + } + //update-end---author:wangshuai---date:2024-02-01---for:【QQYUN-8176】编辑表单中,校验必填时,如果组件是ApiSelect,打开编辑页面时,即使该字段有值,也会提示请选择--- + if (['DatePicker', 'MonthPicker', 'WeekPicker', 'TimePicker'].includes(component)) { + rule.type = valueFormat ? 'string' : 'object'; + } else if (['RangePicker', 'Upload', 'CheckboxGroup', 'TimePicker'].includes(component)) { + rule.type = 'array'; + } else if (['InputNumber'].includes(component)) { + rule.type = 'number'; + } +} + +export function processDateValue(attr: Recordable, component: string) { + const { valueFormat, value } = attr; + if (valueFormat) { + attr.value = isObject(value) ? dateUtil(value).format(valueFormat) : value; + } else if (DATE_TYPE.includes(component) && value) { + attr.value = dateUtil(attr.value); + } +} + +export function handleInputNumberValue(component?: ComponentType, val?: any) { + if (!component) return val; + if (['Input', 'InputPassword', 'InputSearch', 'InputTextArea'].includes(component)) { + return val && isNumber(val) ? `${val}` : val; + } + return val; +} +/** +*liaozhiyang +*2023-12-26 +*某些组件的传值需要把字符串类型转成数值类型 +*/ +export function handleInputStringValue(component?: ComponentType, val?: any) { + if (!component) return val; + // update-begin--author:liaozhiyang---date:20240517---for:【TV360X-13】InputNumber设置精确3位小数传入''变成了0.00 + if (['InputNumber'].includes(component) && typeof val === 'string' && val != '') { + return Number(val); + } + // update-end--author:liaozhiyang---date:20240517---for:【TV360X-13】InputNumber设置精确3位小数传入''变成了0.00 + return val; +} + +/** + * 时间字段 + */ +export const dateItemType = genType(); diff --git a/src/components/Form/src/hooks/useAdvanced.ts b/src/components/Form/src/hooks/useAdvanced.ts new file mode 100644 index 0000000..34ea0e8 --- /dev/null +++ b/src/components/Form/src/hooks/useAdvanced.ts @@ -0,0 +1,167 @@ +import type { ColEx } from '../types'; +import type { AdvanceState } from '../types/hooks'; +import type { ComputedRef, Ref } from 'vue'; +import type { FormProps, FormSchema } from '../types/form'; +import { computed, unref, watch } from 'vue'; +import { isBoolean, isFunction, isNumber, isObject } from '/@/utils/is'; +import { useBreakpoint } from '/@/hooks/event/useBreakpoint'; +import { useDebounceFn } from '@vueuse/core'; + +const BASIC_COL_LEN = 24; + +interface UseAdvancedContext { + advanceState: AdvanceState; + emit: EmitType; + getProps: ComputedRef; + getSchema: ComputedRef; + formModel: Recordable; + defaultValueRef: Ref; +} + +export default function ({ advanceState, emit, getProps, getSchema, formModel, defaultValueRef }: UseAdvancedContext) { + const { realWidthRef, screenEnum, screenRef } = useBreakpoint(); + + const getEmptySpan = computed((): number => { + if (!advanceState.isAdvanced) { + return 0; + } + // For some special cases, you need to manually specify additional blank lines + const emptySpan = unref(getProps).emptySpan || 0; + + if (isNumber(emptySpan)) { + return emptySpan; + } + if (isObject(emptySpan)) { + const { span = 0 } = emptySpan; + const screen = unref(screenRef) as string; + + const screenSpan = (emptySpan as any)[screen.toLowerCase()]; + return screenSpan || span || 0; + } + return 0; + }); + + const debounceUpdateAdvanced = useDebounceFn(updateAdvanced, 30); + + watch( + [() => unref(getSchema), () => advanceState.isAdvanced, () => unref(realWidthRef)], + () => { + const { showAdvancedButton } = unref(getProps); + if (showAdvancedButton) { + debounceUpdateAdvanced(); + } + }, + { immediate: true } + ); + + function getAdvanced(itemCol: Partial, itemColSum = 0, isLastAction = false, index = 0) { + const width = unref(realWidthRef); + + const mdWidth = + parseInt(itemCol.md as string) || parseInt(itemCol.xs as string) || parseInt(itemCol.sm as string) || (itemCol.span as number) || BASIC_COL_LEN; + + const lgWidth = parseInt(itemCol.lg as string) || mdWidth; + const xlWidth = parseInt(itemCol.xl as string) || lgWidth; + const xxlWidth = parseInt(itemCol.xxl as string) || xlWidth; + if (width <= screenEnum.LG) { + itemColSum += mdWidth; + } else if (width < screenEnum.XL) { + itemColSum += lgWidth; + } else if (width < screenEnum.XXL) { + itemColSum += xlWidth; + } else { + itemColSum += xxlWidth; + } + + let autoAdvancedCol = unref(getProps).autoAdvancedCol ?? 3; + + if (isLastAction) { + advanceState.hideAdvanceBtn = unref(getSchema).length <= autoAdvancedCol; + // update-begin--author:sunjianlei---date:20211108---for: 注释掉该逻辑,使小于等于2行时,也显示展开收起按钮 + /* if (itemColSum <= BASIC_COL_LEN * 2) { + // 小于等于2行时,不显示折叠和展开按钮 + advanceState.hideAdvanceBtn = true; + advanceState.isAdvanced = true; + } else */ + // update-end--author:sunjianlei---date:20211108---for: 注释掉该逻辑,使小于等于2行时,也显示展开收起按钮 + // update-begin--author:liaozhiyang---date:202401009---for:【issues/7261】表格上方查询项autoAdvancedLine配置没有效果(删除autoAdvancedLine) + /*if (itemColSum > BASIC_COL_LEN * 2 && itemColSum <= BASIC_COL_LEN * (unref(getProps).autoAdvancedLine || 3)) { + advanceState.hideAdvanceBtn = false; + + // 默认超过 3 行折叠 + } else*/ + // update-end--author:liaozhiyang---date:202401009---for:【issues/7261】表格上方查询项autoAdvancedLine配置没有效果(删除autoAdvancedLine) + if (!advanceState.isLoad) { + advanceState.isLoad = true; + advanceState.isAdvanced = !advanceState.isAdvanced; + // update-begin--author:sunjianlei---date:20211108---for: 如果总列数大于 autoAdvancedCol,就默认折叠 + if (unref(getSchema).length > autoAdvancedCol) { + advanceState.hideAdvanceBtn = false; + advanceState.isAdvanced = false; + } + // update-end--author:sunjianlei---date:20211108---for: 如果总列数大于 autoAdvancedCol,就默认折叠 + } + return { isAdvanced: advanceState.isAdvanced, itemColSum }; + } + if (itemColSum > BASIC_COL_LEN * (unref(getProps).alwaysShowLines || 1)) { + return { isAdvanced: advanceState.isAdvanced, itemColSum }; + } else if (!advanceState.isAdvanced && index + 1 > autoAdvancedCol) { + // 如果当前是收起状态,并且当前列下标 > autoAdvancedCol,就隐藏 + return { isAdvanced: false, itemColSum }; + } else { + // The first line is always displayed + return { isAdvanced: true, itemColSum }; + } + } + + function updateAdvanced() { + let itemColSum = 0; + let realItemColSum = 0; + const { baseColProps = {} } = unref(getProps); + + const schemas = unref(getSchema); + for (let i = 0; i < schemas.length; i++) { + const schema = schemas[i]; + const { show, colProps } = schema; + let isShow = true; + + if (isBoolean(show)) { + isShow = show; + } + + if (isFunction(show)) { + isShow = show({ + schema: schema, + model: formModel, + field: schema.field, + values: { + ...unref(defaultValueRef), + ...formModel, + }, + }); + } + + if (isShow && (colProps || baseColProps)) { + const { itemColSum: sum, isAdvanced } = getAdvanced({ ...baseColProps, ...colProps }, itemColSum, false, i); + + itemColSum = sum || 0; + if (isAdvanced) { + realItemColSum = itemColSum; + } + schema.isAdvanced = isAdvanced; + } + } + + advanceState.actionSpan = (realItemColSum % BASIC_COL_LEN) + unref(getEmptySpan); + + getAdvanced(unref(getProps).actionColOptions || { span: BASIC_COL_LEN }, itemColSum, true); + + emit('advanced-change'); + } + + function handleToggleAdvanced() { + advanceState.isAdvanced = !advanceState.isAdvanced; + } + + return { handleToggleAdvanced }; +} diff --git a/src/components/Form/src/hooks/useAutoFocus.ts b/src/components/Form/src/hooks/useAutoFocus.ts new file mode 100644 index 0000000..85dcc2f --- /dev/null +++ b/src/components/Form/src/hooks/useAutoFocus.ts @@ -0,0 +1,35 @@ +import type { ComputedRef, Ref } from 'vue'; +import type { FormSchema, FormActionType, FormProps } from '../types/form'; + +import { unref, nextTick, watchEffect } from 'vue'; + +interface UseAutoFocusContext { + getSchema: ComputedRef; + getProps: ComputedRef; + isInitedDefault: Ref; + formElRef: Ref; +} +export async function useAutoFocus({ getSchema, getProps, formElRef, isInitedDefault }: UseAutoFocusContext) { + watchEffect(async () => { + if (unref(isInitedDefault) || !unref(getProps).autoFocusFirstItem) { + return; + } + await nextTick(); + const schemas = unref(getSchema); + const formEl = unref(formElRef); + const el = (formEl as any)?.$el as HTMLElement; + if (!formEl || !el || !schemas || schemas.length === 0) { + return; + } + + const firstItem = schemas[0]; + // Only open when the first form item is input type + if (!firstItem.component.includes('Input')) { + return; + } + + const inputEl = el.querySelector('.ant-row:first-child input') as Nullable; + if (!inputEl) return; + inputEl?.focus(); + }); +} diff --git a/src/components/Form/src/hooks/useComponentRegister.ts b/src/components/Form/src/hooks/useComponentRegister.ts new file mode 100644 index 0000000..218aaa9 --- /dev/null +++ b/src/components/Form/src/hooks/useComponentRegister.ts @@ -0,0 +1,11 @@ +import type { ComponentType } from '../types/index'; +import { tryOnUnmounted } from '@vueuse/core'; +import { add, del } from '../componentMap'; +import type { Component } from 'vue'; + +export function useComponentRegister(compName: ComponentType, comp: Component) { + add(compName, comp); + tryOnUnmounted(() => { + del(compName); + }); +} diff --git a/src/components/Form/src/hooks/useForm.ts b/src/components/Form/src/hooks/useForm.ts new file mode 100644 index 0000000..8239bb8 --- /dev/null +++ b/src/components/Form/src/hooks/useForm.ts @@ -0,0 +1,159 @@ +import type { FormProps, FormActionType, UseFormReturnType, FormSchema } from '../types/form'; +import type { NamePath, ValidateOptions } from 'ant-design-vue/lib/form/interface'; +import type { DynamicProps } from '/#/utils'; +import { handleRangeValue } from '../utils/formUtils'; +import { ref, onUnmounted, unref, nextTick, watch } from 'vue'; +import { isProdMode } from '/@/utils/env'; +import { error } from '/@/utils/log'; +import { getDynamicProps, getValueType, getValueTypeBySchema } from '/@/utils'; +import { add } from "/@/components/Form/src/componentMap"; +//集成online专用控件 +import { OnlineSelectCascade, LinkTableCard, LinkTableSelect } from '@jeecg/online'; + +export declare type ValidateFields = (nameList?: NamePath[], options?: ValidateOptions) => Promise; + +type Props = Partial>; + +export function useForm(props?: Props): UseFormReturnType { + const formRef = ref>(null); + const loadedRef = ref>(false); + + //集成online专用控件 + add("OnlineSelectCascade", OnlineSelectCascade) + add("LinkTableCard", LinkTableCard) + add("LinkTableSelect", LinkTableSelect) + + async function getForm() { + const form = unref(formRef); + if (!form) { + error('The form instance has not been obtained, please make sure that the form has been rendered when performing the form operation!'); + } + await nextTick(); + return form as FormActionType; + } + + function register(instance: FormActionType) { + isProdMode() && + onUnmounted(() => { + formRef.value = null; + loadedRef.value = null; + }); + if (unref(loadedRef) && isProdMode() && instance === unref(formRef)) return; + + formRef.value = instance; + loadedRef.value = true; + + watch( + () => props, + () => { + props && instance.setProps(getDynamicProps(props)); + }, + { + immediate: true, + deep: true, + } + ); + } + + const methods: FormActionType = { + scrollToField: async (name: NamePath, options?: ScrollOptions | undefined) => { + const form = await getForm(); + form.scrollToField(name, options); + }, + setProps: async (formProps: Partial) => { + const form = await getForm(); + form.setProps(formProps); + }, + + updateSchema: async (data: Partial | Partial[]) => { + const form = await getForm(); + form.updateSchema(data); + }, + + resetSchema: async (data: Partial | Partial[]) => { + const form = await getForm(); + form.resetSchema(data); + }, + + clearValidate: async (name?: string | string[]) => { + const form = await getForm(); + form.clearValidate(name); + }, + + resetFields: async () => { + getForm().then(async (form) => { + await form.resetFields(); + }); + }, + + removeSchemaByFiled: async (field: string | string[]) => { + unref(formRef)?.removeSchemaByFiled(field); + }, + + // TODO promisify + getFieldsValue: () => { + //update-begin-author:taoyan date:2022-7-5 for: VUEN-1341【流程】编码方式 流程节点编辑表单时,填写数据报错 包括用户组件、部门组件、省市区 + let values = unref(formRef)?.getFieldsValue() as T; + if(values){ + Object.keys(values).map(key=>{ + if (values[key] instanceof Array) { + // update-begin-author:sunjianlei date:20221205 for: 【issues/4330】判断如果是对象数组,则不拼接 + let isObject = typeof (values[key][0] || '') === 'object'; + if (!isObject) { + values[key] = values[key].join(','); + } + // update-end-author:sunjianlei date:20221205 for: 【issues/4330】判断如果是对象数组,则不拼接 + } + }); + } + return values; + //update-end-author:taoyan date:2022-7-5 for: VUEN-1341【流程】编码方式 流程节点编辑表单时,填写数据报错 包括用户组件、部门组件、省市区 + }, + + setFieldsValue: async (values: T) => { + const form = await getForm(); + form.setFieldsValue(values); + }, + + appendSchemaByField: async (schema: FormSchema, prefixField: string | undefined, first: boolean) => { + const form = await getForm(); + form.appendSchemaByField(schema, prefixField, first); + }, + + submit: async (): Promise => { + const form = await getForm(); + return form.submit(); + }, + + /** + * 表单验证并返回表单值 + * @update:添加表单值转换逻辑 + * @updateBy:zyf + * @updateDate:2021-09-02 + */ + validate: async (nameList?: NamePath[]): Promise => { + const form = await getForm(); + let getProps = props || form.getProps; + let values = form.validate(nameList).then((values) => { + for (let key in values) { + if (values[key] instanceof Array) { + let valueType = getValueTypeBySchema(form.getSchemaByField(key)!); + if (valueType === 'string') { + values[key] = values[key].join(','); + } + } + } + //--@updateBy-begin----author:liusq---date:20210916------for:处理区域事件字典信息------ + return handleRangeValue(getProps, values); + //--@updateBy-end----author:liusq---date:20210916------for:处理区域事件字典信息------ + }); + return values; + }, + validateFields: async (nameList?: NamePath[], options?: ValidateOptions): Promise => { + const form = await getForm(); + return form.validateFields(nameList, options); + }, + }; + + return [register, methods]; +} diff --git a/src/components/Form/src/hooks/useFormContext.ts b/src/components/Form/src/hooks/useFormContext.ts new file mode 100644 index 0000000..01dfadd --- /dev/null +++ b/src/components/Form/src/hooks/useFormContext.ts @@ -0,0 +1,17 @@ +import type { InjectionKey } from 'vue'; +import { createContext, useContext } from '/@/hooks/core/useContext'; + +export interface FormContextProps { + resetAction: () => Promise; + submitAction: () => Promise; +} + +const key: InjectionKey = Symbol(); + +export function createFormContext(context: FormContextProps) { + return createContext(context, key); +} + +export function useFormContext() { + return useContext(key); +} diff --git a/src/components/Form/src/hooks/useFormEvents.ts b/src/components/Form/src/hooks/useFormEvents.ts new file mode 100644 index 0000000..c750958 --- /dev/null +++ b/src/components/Form/src/hooks/useFormEvents.ts @@ -0,0 +1,297 @@ +import type { ComputedRef, Ref } from 'vue'; +import type { FormProps, FormSchema, FormActionType } from '../types/form'; +import type { NamePath, ValidateOptions } from 'ant-design-vue/lib/form/interface'; +import { unref, toRaw } from 'vue'; +import { isArray, isFunction, isObject, isString } from '/@/utils/is'; +import { deepMerge, getValueType } from '/@/utils'; +import { dateItemType, handleInputNumberValue, handleInputStringValue } from '../helper'; +import { dateUtil } from '/@/utils/dateUtil'; +import { cloneDeep, uniqBy } from 'lodash-es'; +import { error } from '/@/utils/log'; + +interface UseFormActionContext { + emit: EmitType; + getProps: ComputedRef; + getSchema: ComputedRef; + formModel: Recordable; + defaultValueRef: Ref; + formElRef: Ref; + schemaRef: Ref; + handleFormValues: Fn; +} +export function useFormEvents({ + emit, + getProps, + formModel, + getSchema, + defaultValueRef, + formElRef, + schemaRef, + handleFormValues, +}: UseFormActionContext) { + async function resetFields(): Promise { + const { resetFunc, submitOnReset } = unref(getProps); + resetFunc && isFunction(resetFunc) && (await resetFunc()); + + const formEl = unref(formElRef); + if (!formEl) return; + + Object.keys(formModel).forEach((key) => { + formModel[key] = defaultValueRef.value[key]; + }); + clearValidate(); + emit('reset', toRaw(formModel)); + submitOnReset && handleSubmit(); + } + + /** + * @description: Set form value + */ + async function setFieldsValue(values: Recordable): Promise { + const fields = unref(getSchema) + .map((item) => item.field) + .filter(Boolean); + + const validKeys: string[] = []; + Object.keys(values).forEach((key) => { + const schema = unref(getSchema).find((item) => item.field === key); + let value = values[key]; + + //antd3升级后,online表单时间控件选中值报js错 TypeError: Reflect.has called on non-object + if(!(values instanceof Object)){ + return; + } + + const hasKey = Reflect.has(values, key); + + value = handleInputNumberValue(schema?.component, value); + // update-begin--author:liaozhiyang---date:20231226---for:【QQYUN-7535】popup回填字段inputNumber组件验证错误 + value = handleInputStringValue(schema?.component, value); + // update-end--author:liaozhiyang---date:20231226---for:【QQYUN-7535】popup回填字段inputNumber组件验证错误 + // 0| '' is allow + if (hasKey && fields.includes(key)) { + // time type + if (itemIsDateType(key)) { + if (Array.isArray(value)) { + const arr: any[] = []; + for (const ele of value) { + arr.push(ele ? dateUtil(ele) : null); + } + formModel[key] = arr; + } else { + const { componentProps } = schema || {}; + let _props = componentProps as any; + if (typeof componentProps === 'function') { + _props = _props({ formModel }); + } + formModel[key] = value ? (_props?.valueFormat ? value : dateUtil(value)) : null; + } + } else { + formModel[key] = value; + } + validKeys.push(key); + } + }); + validateFields(validKeys).catch((_) => {}); + } + + /** + * 根据字段名获取schema + * @param field + */ + function getSchemaByField(field: string): Nullable { + if (!isString(field)) { + return null + } + const schemaList: FormSchema[] = unref(getSchema); + const index = schemaList.findIndex((schema) => schema.field === field); + if (index !== -1) { + return cloneDeep(schemaList[index]); + } + return null + } + + /** + * @description: Delete based on field name + */ + async function removeSchemaByFiled(fields: string | string[]): Promise { + const schemaList: FormSchema[] = cloneDeep(unref(getSchema)); + if (!fields) { + return; + } + + let fieldList: string[] = isString(fields) ? [fields] : fields; + if (isString(fields)) { + fieldList = [fields]; + } + for (const field of fieldList) { + _removeSchemaByFiled(field, schemaList); + } + schemaRef.value = schemaList; + } + + /** + * @description: Delete based on field name + */ + function _removeSchemaByFiled(field: string, schemaList: FormSchema[]): void { + if (isString(field)) { + const index = schemaList.findIndex((schema) => schema.field === field); + if (index !== -1) { + delete formModel[field]; + schemaList.splice(index, 1); + } + } + } + + /** + * @description: Insert after a certain field, if not insert the last + */ + async function appendSchemaByField(schema: FormSchema, prefixField?: string, first = false) { + const schemaList: FormSchema[] = cloneDeep(unref(getSchema)); + + const index = schemaList.findIndex((schema) => schema.field === prefixField); + const hasInList = schemaList.some((item) => item.field === prefixField || schema.field); + + if (!hasInList) return; + + if (!prefixField || index === -1 || first) { + first ? schemaList.unshift(schema) : schemaList.push(schema); + schemaRef.value = schemaList; + return; + } + if (index !== -1) { + schemaList.splice(index + 1, 0, schema); + } + schemaRef.value = schemaList; + } + + async function resetSchema(data: Partial | Partial[]) { + let updateData: Partial[] = []; + if (isObject(data)) { + updateData.push(data as FormSchema); + } + if (isArray(data)) { + updateData = [...data]; + } + + const hasField = updateData.every((item) => item.component === 'Divider' || (Reflect.has(item, 'field') && item.field)); + + if (!hasField) { + error('All children of the form Schema array that need to be updated must contain the `field` field'); + return; + } + schemaRef.value = updateData as FormSchema[]; + } + + async function updateSchema(data: Partial | Partial[]) { + let updateData: Partial[] = []; + if (isObject(data)) { + updateData.push(data as FormSchema); + } + if (isArray(data)) { + updateData = [...data]; + } + + const hasField = updateData.every((item) => item.component === 'Divider' || (Reflect.has(item, 'field') && item.field)); + + if (!hasField) { + error('All children of the form Schema array that need to be updated must contain the `field` field'); + return; + } + const schema: FormSchema[] = []; + updateData.forEach((item) => { + unref(getSchema).forEach((val) => { + if (val.field === item.field) { + const newSchema = deepMerge(val, item); + schema.push(newSchema as FormSchema); + } else { + schema.push(val); + } + }); + }); + schemaRef.value = uniqBy(schema, 'field'); + } + + function getFieldsValue(): Recordable { + const formEl = unref(formElRef); + if (!formEl) return {}; + return handleFormValues(toRaw(unref(formModel))); + } + + /** + * @description: Is it time + */ + function itemIsDateType(key: string) { + return unref(getSchema).some((item) => { + return item.field === key ? dateItemType.includes(item.component) : false; + }); + } + + async function validateFields(nameList?: NamePath[] | undefined, options?: ValidateOptions) { + return unref(formElRef)?.validateFields(nameList, options); + } + + async function validate(nameList?: NamePath[] | undefined) { + return await unref(formElRef)?.validate(nameList); + } + + async function clearValidate(name?: string | string[]) { + await unref(formElRef)?.clearValidate(name); + } + + async function scrollToField(name: NamePath, options?: ScrollOptions | undefined) { + await unref(formElRef)?.scrollToField(name, options); + } + + /** + * @description: Form submission + */ + async function handleSubmit(e?: Event): Promise { + e && e.preventDefault(); + const { submitFunc } = unref(getProps); + if (submitFunc && isFunction(submitFunc)) { + await submitFunc(); + return; + } + const formEl = unref(formElRef); + if (!formEl) return; + try { + const values = await validate(); + //update-begin---author:zhangdaihao Date:20140212 for:[bug号]树机构调整------------ + //--updateBy-begin----author:zyf---date:20211206------for:对查询表单提交的数组处理成字符串------ + for (let key in values) { + if (values[key] instanceof Array) { + let valueType = getValueType(getProps, key); + if (valueType === 'string') { + values[key] = values[key].join(','); + } + } + } + //--updateBy-end----author:zyf---date:20211206------for:对查询表单提交的数组处理成字符串------ + const res = handleFormValues(values); + emit('submit', res); + } catch (error) { + //update-begin-author:taoyan date:2022-11-4 for: 列表查询表单会触发校验错误导致重置失败,原因不明 + emit('submit', {}); + console.error('query form validate error, please ignore!', error) + //throw new Error(error); + //update-end-author:taoyan date:2022-11-4 for: 列表查询表单会触发校验错误导致重置失败,原因不明 + } + } + + return { + handleSubmit, + clearValidate, + validate, + validateFields, + getFieldsValue, + updateSchema, + resetSchema, + getSchemaByField, + appendSchemaByField, + removeSchemaByFiled, + resetFields, + setFieldsValue, + scrollToField, + }; +} diff --git a/src/components/Form/src/hooks/useFormValues.ts b/src/components/Form/src/hooks/useFormValues.ts new file mode 100644 index 0000000..db63c8d --- /dev/null +++ b/src/components/Form/src/hooks/useFormValues.ts @@ -0,0 +1,59 @@ +import { isArray, isFunction, isObject, isString, isNullOrUnDef } from '/@/utils/is'; +import { unref } from 'vue'; +import type { Ref, ComputedRef } from 'vue'; +import type { FormProps, FormSchema } from '../types/form'; +import dayjs from "dayjs"; +import { set } from 'lodash-es'; +import { handleRangeValue } from '/@/components/Form/src/utils/formUtils'; + +interface UseFormValuesContext { + defaultValueRef: Ref; + getSchema: ComputedRef; + getProps: ComputedRef; + formModel: Recordable; +} +export function useFormValues({ defaultValueRef, getSchema, formModel, getProps }: UseFormValuesContext) { + // Processing form values + function handleFormValues(values: Recordable) { + if (!isObject(values)) { + return {}; + } + const res: Recordable = {}; + for (const item of Object.entries(values)) { + let [, value] = item; + const [key] = item; + if (!key || (isArray(value) && value.length === 0) || isFunction(value)) { + continue; + } + const transformDateFunc = unref(getProps).transformDateFunc; + if (isObject(value)) { + value = transformDateFunc?.(value); + } + // 判断是否是dayjs实例 + if (isArray(value) && dayjs.isDayjs(value[0]) && dayjs.isDayjs(value[1])) { + value = value.map((item) => transformDateFunc?.(item)); + } + // Remove spaces + if (isString(value)) { + value = value.trim(); + } + set(res, key, value); + } + return handleRangeValue(getProps, res); + } + + function initDefault() { + const schemas = unref(getSchema); + const obj: Recordable = {}; + schemas.forEach((item) => { + const { defaultValue } = item; + if (!isNullOrUnDef(defaultValue)) { + obj[item.field] = defaultValue; + formModel[item.field] = defaultValue; + } + }); + defaultValueRef.value = obj; + } + + return { handleFormValues, initDefault }; +} diff --git a/src/components/Form/src/hooks/useLabelWidth.ts b/src/components/Form/src/hooks/useLabelWidth.ts new file mode 100644 index 0000000..1ce84f4 --- /dev/null +++ b/src/components/Form/src/hooks/useLabelWidth.ts @@ -0,0 +1,47 @@ +import type { Ref } from 'vue'; +import type { FormProps, FormSchema } from '../types/form'; + +import { computed, unref } from 'vue'; +import { isNumber } from '/@/utils/is'; + +export function useItemLabelWidth(schemaItemRef: Ref, propsRef: Ref) { + return computed(() => { + const schemaItem = unref(schemaItemRef); + const { labelCol = {}, wrapperCol = {} } = schemaItem.itemProps || {}; + const { labelWidth, disabledLabelWidth } = schemaItem; + + const { labelWidth: globalLabelWidth, labelCol: globalLabelCol, wrapperCol: globWrapperCol,layout } = unref(propsRef); + + // update-begin--author:sunjianlei---date:20211104---for: 禁用全局 labelWidth,不自动设置 textAlign -------- + if (disabledLabelWidth) { + return { labelCol, wrapperCol }; + } + // update-begin--author:sunjianlei---date:20211104---for: 禁用全局 labelWidth,不自动设置 textAlign -------- + + // If labelWidth is set globally, all items setting + if (!globalLabelWidth && !labelWidth && !globalLabelCol) { + labelCol.style = { + textAlign: 'left', + }; + return { labelCol, wrapperCol }; + } + let width = labelWidth || globalLabelWidth; + let col = { ...globalLabelCol, ...labelCol }; + const wrapCol = { ...globWrapperCol, ...wrapperCol }; + + if (width) { + width = isNumber(width) ? `${width}px` : width; + // update-begin--author:liaozhiyang---date:20240717---for:【issues/6865】配置单个的labelWidth不生效 + col = {}; + // update-end--author:liaozhiyang---date:20240717---for:【issues/6865】配置单个的labelWidth不生效 + } + + return { + labelCol: { style: { width: width ? width : '100%' }, ...col }, + wrapperCol: { + style: { width: layout === 'vertical' ? '100%' : `calc(100% - ${width})` }, + ...wrapCol, + }, + }; + }); +} diff --git a/src/components/Form/src/jeecg/components/JAddInput.vue b/src/components/Form/src/jeecg/components/JAddInput.vue new file mode 100644 index 0000000..f3bd2d6 --- /dev/null +++ b/src/components/Form/src/jeecg/components/JAddInput.vue @@ -0,0 +1,123 @@ + + + diff --git a/src/components/Form/src/jeecg/components/JAreaLinkage.vue b/src/components/Form/src/jeecg/components/JAreaLinkage.vue new file mode 100644 index 0000000..a16a42c --- /dev/null +++ b/src/components/Form/src/jeecg/components/JAreaLinkage.vue @@ -0,0 +1,149 @@ + + diff --git a/src/components/Form/src/jeecg/components/JAreaSelect.vue b/src/components/Form/src/jeecg/components/JAreaSelect.vue new file mode 100644 index 0000000..f57205b --- /dev/null +++ b/src/components/Form/src/jeecg/components/JAreaSelect.vue @@ -0,0 +1,168 @@ + + + diff --git a/src/components/Form/src/jeecg/components/JCategorySelect.vue b/src/components/Form/src/jeecg/components/JCategorySelect.vue new file mode 100644 index 0000000..5e9a407 --- /dev/null +++ b/src/components/Form/src/jeecg/components/JCategorySelect.vue @@ -0,0 +1,268 @@ + + + diff --git a/src/components/Form/src/jeecg/components/JCheckbox.vue b/src/components/Form/src/jeecg/components/JCheckbox.vue new file mode 100644 index 0000000..299090f --- /dev/null +++ b/src/components/Form/src/jeecg/components/JCheckbox.vue @@ -0,0 +1,128 @@ + + + + diff --git a/src/components/Form/src/jeecg/components/JCodeEditor.vue b/src/components/Form/src/jeecg/components/JCodeEditor.vue new file mode 100644 index 0000000..a28e078 --- /dev/null +++ b/src/components/Form/src/jeecg/components/JCodeEditor.vue @@ -0,0 +1,382 @@ + + + + + diff --git a/src/components/Form/src/jeecg/components/JDictSelectTag.vue b/src/components/Form/src/jeecg/components/JDictSelectTag.vue new file mode 100644 index 0000000..c810622 --- /dev/null +++ b/src/components/Form/src/jeecg/components/JDictSelectTag.vue @@ -0,0 +1,243 @@ + + + diff --git a/src/components/Form/src/jeecg/components/JEasyCron/EasyCronInner.vue b/src/components/Form/src/jeecg/components/JEasyCron/EasyCronInner.vue new file mode 100644 index 0000000..fd0aa46 --- /dev/null +++ b/src/components/Form/src/jeecg/components/JEasyCron/EasyCronInner.vue @@ -0,0 +1,321 @@ + + + + diff --git a/src/components/Form/src/jeecg/components/JEasyCron/EasyCronInput.vue b/src/components/Form/src/jeecg/components/JEasyCron/EasyCronInput.vue new file mode 100644 index 0000000..51e8abe --- /dev/null +++ b/src/components/Form/src/jeecg/components/JEasyCron/EasyCronInput.vue @@ -0,0 +1,63 @@ + + + + + diff --git a/src/components/Form/src/jeecg/components/JEasyCron/EasyCronModal.vue b/src/components/Form/src/jeecg/components/JEasyCron/EasyCronModal.vue new file mode 100644 index 0000000..5824cd0 --- /dev/null +++ b/src/components/Form/src/jeecg/components/JEasyCron/EasyCronModal.vue @@ -0,0 +1,28 @@ + + + diff --git a/src/components/Form/src/jeecg/components/JEasyCron/LICENSE b/src/components/Form/src/jeecg/components/JEasyCron/LICENSE new file mode 100644 index 0000000..08eddc9 --- /dev/null +++ b/src/components/Form/src/jeecg/components/JEasyCron/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 知行合一 + +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/src/components/Form/src/jeecg/components/JEasyCron/easy.cron.data.ts b/src/components/Form/src/jeecg/components/JEasyCron/easy.cron.data.ts new file mode 100644 index 0000000..335a8c0 --- /dev/null +++ b/src/components/Form/src/jeecg/components/JEasyCron/easy.cron.data.ts @@ -0,0 +1,10 @@ +import { propTypes } from '/@/utils/propTypes'; + +export const cronEmits = ['change', 'update:value']; +export const cronProps = { + value: propTypes.string.def(''), + disabled: propTypes.bool.def(false), + hideSecond: propTypes.bool.def(false), + hideYear: propTypes.bool.def(false), + remote: propTypes.func, +}; diff --git a/src/components/Form/src/jeecg/components/JEasyCron/easy.cron.inner.less b/src/components/Form/src/jeecg/components/JEasyCron/easy.cron.inner.less new file mode 100644 index 0000000..3aab6ba --- /dev/null +++ b/src/components/Form/src/jeecg/components/JEasyCron/easy.cron.inner.less @@ -0,0 +1,59 @@ +//noinspection LessUnresolvedVariable +@prefix-cls: ~'@{namespace}-easy-cron-inner'; + +.@{prefix-cls} { + .content { + .ant-checkbox-wrapper + .ant-checkbox-wrapper { + margin-left: 0; + } + } + + &-config-list { + text-align: left; + margin: 0 10px 10px 10px; + + .item { + margin-top: 5px; + font-size: 14px; + + span { + padding: 0 2px; + } + } + + .choice { + padding: 5px 8px; + } + + .w60 { + width: 60px; + min-width: 60px; + } + + .w80 { + width: 80px; + min-width: 80px; + } + + .list { + margin: 0 20px; + } + + .list-check-item { + padding: 1px 3px; + width: 4em; + } + + .list-cn .list-check-item { + width: 5em; + } + + .tip-info { + color: #999; + } + } + + .allow-click { + cursor: pointer; + } +} diff --git a/src/components/Form/src/jeecg/components/JEasyCron/easy.cron.input.less b/src/components/Form/src/jeecg/components/JEasyCron/easy.cron.input.less new file mode 100644 index 0000000..d72aa15 --- /dev/null +++ b/src/components/Form/src/jeecg/components/JEasyCron/easy.cron.input.less @@ -0,0 +1,14 @@ +//noinspection LessUnresolvedVariable +@prefix-cls: ~'@{namespace}-easy-cron-input'; + +.@{prefix-cls} { + a.open-btn { + cursor: pointer; + + .app-iconify { + position: relative; + top: 1px; + right: 2px; + } + } +} diff --git a/src/components/Form/src/jeecg/components/JEasyCron/index.ts b/src/components/Form/src/jeecg/components/JEasyCron/index.ts new file mode 100644 index 0000000..1513f0d --- /dev/null +++ b/src/components/Form/src/jeecg/components/JEasyCron/index.ts @@ -0,0 +1,6 @@ +// 原开源项目地址:https://gitee.com/toktok/easy-cron + +export { default as JEasyCron } from './EasyCronInput.vue'; +export { default as JEasyCronInner } from './EasyCronInner.vue'; +export { default as JEasyCronModal } from './EasyCronModal.vue'; +export { default as JCronValidator } from './validator'; diff --git a/src/components/Form/src/jeecg/components/JEasyCron/tabs/DayUI.vue b/src/components/Form/src/jeecg/components/JEasyCron/tabs/DayUI.vue new file mode 100644 index 0000000..1cd215c --- /dev/null +++ b/src/components/Form/src/jeecg/components/JEasyCron/tabs/DayUI.vue @@ -0,0 +1,94 @@ + + + diff --git a/src/components/Form/src/jeecg/components/JEasyCron/tabs/HourUI.vue b/src/components/Form/src/jeecg/components/JEasyCron/tabs/HourUI.vue new file mode 100644 index 0000000..c3c5224 --- /dev/null +++ b/src/components/Form/src/jeecg/components/JEasyCron/tabs/HourUI.vue @@ -0,0 +1,59 @@ + + + diff --git a/src/components/Form/src/jeecg/components/JEasyCron/tabs/MinuteUI.vue b/src/components/Form/src/jeecg/components/JEasyCron/tabs/MinuteUI.vue new file mode 100644 index 0000000..34617bf --- /dev/null +++ b/src/components/Form/src/jeecg/components/JEasyCron/tabs/MinuteUI.vue @@ -0,0 +1,59 @@ + + + diff --git a/src/components/Form/src/jeecg/components/JEasyCron/tabs/MonthUI.vue b/src/components/Form/src/jeecg/components/JEasyCron/tabs/MonthUI.vue new file mode 100644 index 0000000..78f7f4e --- /dev/null +++ b/src/components/Form/src/jeecg/components/JEasyCron/tabs/MonthUI.vue @@ -0,0 +1,59 @@ + + + diff --git a/src/components/Form/src/jeecg/components/JEasyCron/tabs/SecondUI.vue b/src/components/Form/src/jeecg/components/JEasyCron/tabs/SecondUI.vue new file mode 100644 index 0000000..6b65b85 --- /dev/null +++ b/src/components/Form/src/jeecg/components/JEasyCron/tabs/SecondUI.vue @@ -0,0 +1,59 @@ + + + diff --git a/src/components/Form/src/jeecg/components/JEasyCron/tabs/WeekUI.vue b/src/components/Form/src/jeecg/components/JEasyCron/tabs/WeekUI.vue new file mode 100644 index 0000000..c3b15dc --- /dev/null +++ b/src/components/Form/src/jeecg/components/JEasyCron/tabs/WeekUI.vue @@ -0,0 +1,125 @@ + + + diff --git a/src/components/Form/src/jeecg/components/JEasyCron/tabs/YearUI.vue b/src/components/Form/src/jeecg/components/JEasyCron/tabs/YearUI.vue new file mode 100644 index 0000000..2be7972 --- /dev/null +++ b/src/components/Form/src/jeecg/components/JEasyCron/tabs/YearUI.vue @@ -0,0 +1,49 @@ + + + diff --git a/src/components/Form/src/jeecg/components/JEasyCron/tabs/useTabMixin.ts b/src/components/Form/src/jeecg/components/JEasyCron/tabs/useTabMixin.ts new file mode 100644 index 0000000..291ca19 --- /dev/null +++ b/src/components/Form/src/jeecg/components/JEasyCron/tabs/useTabMixin.ts @@ -0,0 +1,199 @@ +// 主要用于日和星期的互斥使用 +import { computed, inject, reactive, ref, unref, watch } from 'vue'; +import { propTypes } from '/@/utils/propTypes'; + +export enum TypeEnum { + unset = 'UNSET', + every = 'EVERY', + range = 'RANGE', + loop = 'LOOP', + work = 'WORK', + last = 'LAST', + specify = 'SPECIFY', +} + +// use 公共 props +export function useTabProps(options) { + const defaultValue = options?.defaultValue ?? '?'; + return { + value: propTypes.string.def(defaultValue), + disabled: propTypes.bool.def(false), + ...options?.props, + }; +} + +// use 公共 emits +export function useTabEmits() { + return ['change', 'update:value']; +} + +// use 公共 setup +export function useTabSetup(props, context, options) { + const { emit } = context; + const prefixCls = inject('prefixCls'); + const defaultValue = ref(options?.defaultValue ?? '?'); + // 类型 + const type = ref(options.defaultType ?? TypeEnum.every); + const valueList = ref([]); + // 对于不同的类型,所定义的值也有所不同 + const valueRange = reactive(options.valueRange); + const valueLoop = reactive(options.valueLoop); + const valueWeek = reactive(options.valueWeek); + const valueWork = ref(options.valueWork); + const maxValue = ref(options.maxValue); + const minValue = ref(options.minValue); + + // 根据不同的类型计算出的value + const computeValue = computed(() => { + let valueArray: any[] = []; + switch (type.value) { + case TypeEnum.unset: + valueArray.push('?'); + break; + case TypeEnum.every: + valueArray.push('*'); + break; + case TypeEnum.range: + valueArray.push(`${valueRange.start}-${valueRange.end}`); + break; + case TypeEnum.loop: + valueArray.push(`${valueLoop.start}/${valueLoop.interval}`); + break; + case TypeEnum.work: + valueArray.push(`${valueWork.value}W`); + break; + case TypeEnum.last: + valueArray.push('L'); + break; + case TypeEnum.specify: + if (valueList.value.length === 0) { + valueList.value.push(minValue.value); + } + valueArray.push(valueList.value.join(',')); + break; + default: + valueArray.push(defaultValue.value); + break; + } + return valueArray.length > 0 ? valueArray.join('') : defaultValue.value; + }); + // 指定值范围区间,介于最小值和最大值之间 + const specifyRange = computed(() => { + let range: number[] = []; + if (maxValue.value != null) { + for (let i = minValue.value; i <= maxValue.value; i++) { + range.push(i); + } + } + return range; + }); + + watch( + () => props.value, + (val) => { + if (val !== computeValue.value) { + parseValue(val); + } + }, + { immediate: true } + ); + + watch(computeValue, (v) => updateValue(v)); + + function updateValue(value) { + emit('change', value); + emit('update:value', value); + } + + /** + * parseValue + * @param value + */ + function parseValue(value) { + if (value === computeValue.value) { + return; + } + try { + if (!value || value === defaultValue.value) { + type.value = TypeEnum.every; + } else if (value.indexOf('?') >= 0) { + type.value = TypeEnum.unset; + } else if (value.indexOf('-') >= 0) { + type.value = TypeEnum.range; + const values = value.split('-'); + if (values.length >= 2) { + valueRange.start = parseInt(values[0]); + valueRange.end = parseInt(values[1]); + } + } else if (value.indexOf('/') >= 0) { + type.value = TypeEnum.loop; + const values = value.split('/'); + if (values.length >= 2) { + valueLoop.start = value[0] === '*' ? 0 : parseInt(values[0]); + valueLoop.interval = parseInt(values[1]); + } + } else if (value.indexOf('W') >= 0) { + type.value = TypeEnum.work; + const values = value.split('W'); + if (!values[0] && !isNaN(values[0])) { + valueWork.value = parseInt(values[0]); + } + } else if (value.indexOf('L') >= 0) { + type.value = TypeEnum.last; + } else if (value.indexOf(',') >= 0 || !isNaN(value)) { + type.value = TypeEnum.specify; + valueList.value = value.split(',').map((item) => parseInt(item)); + } else { + type.value = TypeEnum.every; + } + } catch (e) { + type.value = TypeEnum.every; + } + } + + const beforeRadioAttrs = computed(() => ({ + class: ['choice'], + disabled: props.disabled || unref(options.disabled), + })); + const inputNumberAttrs = computed(() => ({ + class: ['w60'], + max: maxValue.value, + min: minValue.value, + precision: 0, + })); + const typeRangeAttrs = computed(() => ({ + disabled: type.value !== TypeEnum.range || props.disabled || unref(options.disabled), + ...inputNumberAttrs.value, + })); + const typeLoopAttrs = computed(() => ({ + disabled: type.value !== TypeEnum.loop || props.disabled || unref(options.disabled), + ...inputNumberAttrs.value, + })); + const typeSpecifyAttrs = computed(() => ({ + disabled: type.value !== TypeEnum.specify || props.disabled || unref(options.disabled), + class: ['list-check-item'], + })); + + return { + type, + TypeEnum, + prefixCls, + defaultValue, + valueRange, + valueLoop, + valueWeek, + valueList, + valueWork, + maxValue, + minValue, + computeValue, + specifyRange, + updateValue, + parseValue, + beforeRadioAttrs, + inputNumberAttrs, + typeRangeAttrs, + typeLoopAttrs, + typeSpecifyAttrs, + }; +} diff --git a/src/components/Form/src/jeecg/components/JEasyCron/validator.ts b/src/components/Form/src/jeecg/components/JEasyCron/validator.ts new file mode 100644 index 0000000..308f1e8 --- /dev/null +++ b/src/components/Form/src/jeecg/components/JEasyCron/validator.ts @@ -0,0 +1,48 @@ +import CronParser from 'cron-parser'; +import type { ValidatorRule } from 'ant-design-vue/lib/form/interface'; + +const cronRule: ValidatorRule = { + validator({}, value) { + // 没填写就不校验 + if (!value) { + return Promise.resolve(); + } + const values: string[] = value.split(' ').filter((item) => !!item); + if (values.length > 7) { + return Promise.reject('Cron表达式最多7项!'); + } + // 检查第7项 + let val: string = value; + if (values.length === 7) { + const year = values[6]; + if (year !== '*' && year !== '?') { + let yearValues: string[] = []; + if (year.indexOf('-') >= 0) { + yearValues = year.split('-'); + } else if (year.indexOf('/')) { + yearValues = year.split('/'); + } else { + yearValues = [year]; + } + // 判断是否都是数字 + const checkYear = yearValues.some((item) => isNaN(Number(item))); + if (checkYear) { + return Promise.reject('Cron表达式参数[年]错误:' + year); + } + } + // 取其中的前六项 + val = values.slice(0, 6).join(' '); + } + // 6位 没有年 + // 5位没有秒、年 + try { + const iter = CronParser.parseExpression(val); + iter.next(); + return Promise.resolve(); + } catch (e) { + return Promise.reject('Cron表达式错误:' + e); + } + }, +}; + +export default cronRule.validator; diff --git a/src/components/Form/src/jeecg/components/JEditor.vue b/src/components/Form/src/jeecg/components/JEditor.vue new file mode 100644 index 0000000..9600cf9 --- /dev/null +++ b/src/components/Form/src/jeecg/components/JEditor.vue @@ -0,0 +1,47 @@ + + + + + diff --git a/src/components/Form/src/jeecg/components/JEllipsis.vue b/src/components/Form/src/jeecg/components/JEllipsis.vue new file mode 100644 index 0000000..fed14ac --- /dev/null +++ b/src/components/Form/src/jeecg/components/JEllipsis.vue @@ -0,0 +1,21 @@ + + diff --git a/src/components/Form/src/jeecg/components/JFormContainer.vue b/src/components/Form/src/jeecg/components/JFormContainer.vue new file mode 100644 index 0000000..6fe2398 --- /dev/null +++ b/src/components/Form/src/jeecg/components/JFormContainer.vue @@ -0,0 +1,62 @@ + + + + + diff --git a/src/components/Form/src/jeecg/components/JImageUpload.vue b/src/components/Form/src/jeecg/components/JImageUpload.vue new file mode 100644 index 0000000..a3c37df --- /dev/null +++ b/src/components/Form/src/jeecg/components/JImageUpload.vue @@ -0,0 +1,287 @@ + + + diff --git a/src/components/Form/src/jeecg/components/JImportModal.vue b/src/components/Form/src/jeecg/components/JImportModal.vue new file mode 100644 index 0000000..4f87121 --- /dev/null +++ b/src/components/Form/src/jeecg/components/JImportModal.vue @@ -0,0 +1,192 @@ + + + diff --git a/src/components/Form/src/jeecg/components/JInput.vue b/src/components/Form/src/jeecg/components/JInput.vue new file mode 100644 index 0000000..f5c413e --- /dev/null +++ b/src/components/Form/src/jeecg/components/JInput.vue @@ -0,0 +1,110 @@ + + + + + diff --git a/src/components/Form/src/jeecg/components/JInputPop.vue b/src/components/Form/src/jeecg/components/JInputPop.vue new file mode 100644 index 0000000..96bf878 --- /dev/null +++ b/src/components/Form/src/jeecg/components/JInputPop.vue @@ -0,0 +1,126 @@ + + + + + diff --git a/src/components/Form/src/jeecg/components/JInputSelect.vue b/src/components/Form/src/jeecg/components/JInputSelect.vue new file mode 100644 index 0000000..f537a3c --- /dev/null +++ b/src/components/Form/src/jeecg/components/JInputSelect.vue @@ -0,0 +1,77 @@ + + + + + diff --git a/src/components/Form/src/jeecg/components/JLinkTableCard/JLinkTableCard.vue b/src/components/Form/src/jeecg/components/JLinkTableCard/JLinkTableCard.vue new file mode 100644 index 0000000..15663d3 --- /dev/null +++ b/src/components/Form/src/jeecg/components/JLinkTableCard/JLinkTableCard.vue @@ -0,0 +1,379 @@ + + + + + diff --git a/src/components/Form/src/jeecg/components/JLinkTableCard/components/LinkTableListModal.vue b/src/components/Form/src/jeecg/components/JLinkTableCard/components/LinkTableListModal.vue new file mode 100644 index 0000000..55953e7 --- /dev/null +++ b/src/components/Form/src/jeecg/components/JLinkTableCard/components/LinkTableListModal.vue @@ -0,0 +1,320 @@ + + + + + diff --git a/src/components/Form/src/jeecg/components/JLinkTableCard/hooks/useLinkTable.ts b/src/components/Form/src/jeecg/components/JLinkTableCard/hooks/useLinkTable.ts new file mode 100644 index 0000000..91b3244 --- /dev/null +++ b/src/components/Form/src/jeecg/components/JLinkTableCard/hooks/useLinkTable.ts @@ -0,0 +1,358 @@ +import { defHttp } from '/@/utils/http/axios'; +import { ref, watchEffect, computed, reactive } from 'vue'; +import { pick } from 'lodash-es'; +import { filterMultiDictText } from '/@/utils/dict/JDictSelectUtil'; +import { getFileAccessHttpUrl } from '/@/utils/common/compUtils'; + +function queryTableData(tableName, params) { + const url = '/online/cgform/api/getData/' + tableName; + return defHttp.get({ url, params }); +} + +function queryTableColumns(tableName, params) { + const url = '/online/cgform/api/getColumns/' + tableName; + return defHttp.get({ url, params }); +} + +export function useLinkTable(props) { + //TODO 目前只支持查询第一页的数据,可以输入关键字搜索 + const pageNo = ref('1'); + // 查询列 + const baseParam = ref({}); + // 搜素条件 + const searchParam = ref({}); + // 第一个文本列 + const mainContentField = ref(''); + //权限数据 + const auths = reactive({ + add: true, + update: true, + }); + + //显示列 + const textFieldArray = computed(() => { + if (props.textField) { + return props.textField.split(','); + } + return []; + }); + const otherColumns = ref([]); + // 展示的列 配置的很多列,但是只展示三行 + const realShowColumns = computed(() => { + const columns = otherColumns.value; + if (props.multi == true) { + return columns.slice(0, 3); + } else { + return columns.slice(0, 6); + } + }); + + watchEffect(async () => { + const table = props.tableName; + if (table) { + const valueField = props.valueField || ''; + const textField = props.textField || ''; + const arr: any[] = []; + if (valueField) { + arr.push(valueField); + } + if (textField) { + const temp = textField.split(','); + mainContentField.value = temp[0]; + for (const field of temp) { + arr.push(field); + } + } + const imageField = props.imageField || ''; + if (imageField) { + arr.push(imageField); + } + baseParam.value = { + linkTableSelectFields: arr.join(','), + }; + await resetTableColumns(); + await reloadTableLinkOptions(); + } + }); + + const otherFields = computed(() => { + const textField = props.textField || ''; + const others: any[] = []; + let labelField = ''; + if (textField) { + const temp = textField.split(','); + labelField = temp[0]; + for (let i = 0; i < temp.length; i++) { + if (i > 0) { + others.push(temp[i]); + } + } + } + return { + others, + labelField, + }; + }); + + // 选项 + const selectOptions = ref([]); + const tableColumns = ref([]); + const dictOptions = ref({}); + + async function resetTableColumns() { + const params = baseParam.value; + const data = await queryTableColumns(props.tableName, params); + tableColumns.value = data.columns; + if (data.columns) { + const imageField = props.imageField; + const arr = data.columns.filter((c) => c.dataIndex != mainContentField.value && c.dataIndex != imageField); + otherColumns.value = arr; + } + dictOptions.value = data.dictOptions; + // 权限数据 + console.log('隐藏的按钮', data.hideColumns); + if (data.hideColumns) { + const hideCols = data.hideColumns; + if (hideCols.indexOf('add') >= 0) { + auths.add = false; + } else { + auths.add = true; + } + if (hideCols.indexOf('update') >= 0) { + auths.update = false; + } else { + auths.update = true; + } + } + } + + async function reloadTableLinkOptions() { + const params = getLoadDataParams(); + const data = await queryTableData(props.tableName, params); + const records = data.records; + //tableTitle.value = data.head.tableTxt; + const dataList: any[] = []; + const { others, labelField } = otherFields.value; + const imageField = props.imageField; + if (records && records.length > 0) { + for (const rd of records) { + const temp = { ...rd }; + transData(temp); + const result = Object.assign({}, pick(temp, others), { id: temp.id, label: temp[labelField], value: temp[props.valueField] }); + if (imageField) { + result[imageField] = temp[imageField]; + } + dataList.push(result); + } + } + //添加一个空对象 为add操作占位 + // update-begin--author:liaozhiyang---date:20240607---for:【TV360X-1095】高级查询关联记录去掉编辑按钮及去掉记录按钮 + props.editBtnShow && dataList.push({}); + // update-end--author:liaozhiyang---date:20240607---for:【TV360X-1095】高级查询关联记录去掉编辑按钮及去掉记录按钮 + selectOptions.value = dataList; + } + + /** + * 数据简单翻译-字典 + * @param data + */ + function transData(data) { + const columns = tableColumns.value; + const dictInfo = dictOptions.value; + for (const c of columns) { + const { dataIndex, customRender } = c; + if (data[dataIndex] || data[dataIndex] === 0) { + if (customRender && customRender == dataIndex) { + //这样的就是 字典数据了 可以直接翻译 + if (dictInfo[customRender]) { + data[dataIndex] = filterMultiDictText(dictInfo[customRender], data[dataIndex]); + continue; + } + } + } + // 兼容后台翻译字段 + const dictText = data[dataIndex + '_dictText']; + if (dictText) { + data[dataIndex] = dictText; + } + } + } + + //获取加载数据的查询条件 + function getLoadDataParams() { + const params = Object.assign({ pageSize: 100, pageNo: pageNo.value }, baseParam.value, searchParam.value); + return params; + } + + //设置查询条件 + function addQueryParams(text) { + if (!text) { + searchParam.value = {}; + } else { + const arr = textFieldArray.value; + const params: any[] = []; + const fields: any[] = []; + for (let i = 0; i < arr.length; i++) { + if (i <= 1) { + fields.push(arr[i]); + params.push({ field: arr[i], rule: 'like', val: text }); + } + } + // params[arr[i]] = `*${text}*` + // params['selectConditionFields'] = fields.join(',') + // searchParam.value = params; + params['superQueryMatchType'] = 'or'; + params['superQueryParams'] = encodeURI(JSON.stringify(params)); + searchParam.value = params; + } + } + + async function loadOne(value) { + if (!value) { + return []; + } + let valueFieldName = props.valueField; + let params = { + ...baseParam.value, + pageSize: 100, + pageNo: pageNo.value, + }; + params['superQueryMatchType'] = 'and'; + let valueCondition = [{ field: valueFieldName, rule: 'in', val: value }]; + params['superQueryParams'] = encodeURI(JSON.stringify(valueCondition)); + const data = await queryTableData(props.tableName, params); + let records = data.records; + //tableTitle.value = data.head.tableTxt; + let dataList: any[] = []; + if (records && records.length > 0) { + for (let item of records) { + let temp = { ...item }; + transData(temp); + dataList.push(temp); + } + } + return dataList; + } + + /** + * true:数据一致;false:数据不一致 + * @param arr + * @param value + */ + function compareData(arr, value) { + if (!arr || arr.length == 0) { + return false; + } + const valueArray = value.split(','); + if (valueArray.length != arr.length) { + return false; + } + let flag = true; + for (const item of arr) { + const temp = item[props.valueField]; + if (valueArray.indexOf(temp) < 0) { + flag = false; + } + } + return flag; + } + + function formatData(formData) { + Object.keys(formData).map((k) => { + if (formData[k] instanceof Array) { + formData[k] = formData[k].join(','); + } + }); + } + + function initFormData(formData, linkFieldArray, record) { + if (!record) { + record = {}; + } + if (linkFieldArray && linkFieldArray.length > 0) { + for (const str of linkFieldArray) { + const arr = str.split(','); + //["表单字段,表字典字段"] + const field = arr[0]; + const dictField = arr[1]; + if (!formData[field]) { + const value = record[dictField] || ''; + formData[field] = [value]; + } else { + formData[field].push(record[dictField]); + } + } + } + } + + // 获取图片地址 + function getImageSrc(item) { + if (props.imageField) { + let url = item[props.imageField]; + // update-begin--author:liaozhiyang---date:20250517---for:【TV360X-38】关联记录空间,被关联数据优多个图片时,封面图片不展示 + if (typeof url === 'string') { + // 有多张图时默认取第一张 + url = url.split(',')[0]; + } + // update-end--author:liaozhiyang---date:20250517---for:【TV360X-38】关联记录空间,被关联数据优多个图片时,封面图片不展示 + return getFileAccessHttpUrl(url); + } + return ''; + } + const showImage = computed(() => { + if (props.imageField) { + return true; + } else { + return false; + } + }); + + return { + pageNo, + otherColumns, + realShowColumns, + selectOptions, + reloadTableLinkOptions, + textFieldArray, + addQueryParams, + tableColumns, + transData, + mainContentField, + loadOne, + compareData, + formatData, + initFormData, + getImageSrc, + showImage, + auths, + }; +} + +/** + * 使用固定高度的modal + */ +export function useFixedHeightModal() { + const minWidth = 800; + const popModalFixedWidth = ref(800); + let tempWidth = window.innerWidth - 300; + if (tempWidth < minWidth) { + tempWidth = minWidth; + } + popModalFixedWidth.value = tempWidth; + + // 弹窗高度控制 + const popBodyStyle = ref({}); + function resetBodyStyle() { + const height = window.innerHeight - 210; + popBodyStyle.value = { + height: height + 'px', + overflowY: 'auto', + }; + } + + return { + popModalFixedWidth, + popBodyStyle, + resetBodyStyle, + }; +} diff --git a/src/components/Form/src/jeecg/components/JLinkTableCard/hooks/useTableColumns.ts b/src/components/Form/src/jeecg/components/JLinkTableCard/hooks/useTableColumns.ts new file mode 100644 index 0000000..a272a52 --- /dev/null +++ b/src/components/Form/src/jeecg/components/JLinkTableCard/hooks/useTableColumns.ts @@ -0,0 +1,567 @@ +import type { Ref } from 'vue'; +import { HrefSlots, OnlineColumn } from '/@/components/jeecg/OnLine/types/onlineConfig'; +import { filterMultiDictText } from '/@/utils/dict/JDictSelectUtil'; +import { computed, defineAsyncComponent, h, reactive, ref, toRaw, unref, watch, markRaw } from 'vue'; +import { useRouter } from 'vue-router'; +import { getFileAccessHttpUrl } from '/@/utils/common/compUtils'; +import { getAreaTextByCode } from '/@/components/Form/src/utils/Area'; +import { createImgPreview } from '/@/components/Preview/index'; +import { importViewsFile, _eval } from '/@/utils'; +import { useModal } from '/@/components/Modal'; +import { getToken } from '/@/utils/auth'; +import { downloadFile } from '/@/api/common/api'; +import { getWeekMonthQuarterYear, split } from '/@/utils'; +/** + * 获取实际列表需要的column配置 + * @param onlineTableContext 从数据库中查出来的数据 + * @param extConfigJson 扩展配置JSON + */ +export function useTableColumns(onlineTableContext, extConfigJson: Ref) { + // 获取路由器对象 href跳转用到 + let router = useRouter(); + + // 列信息 + const columns = ref>([]); + // 是否有bpm_status + //const hasBpmStatus = ref(false) + // 字典信息 + const dictOptionInfo = ref({}); + //已选择的值 + const selectedKeys = ref([]); + //选择的行记录 + //const selectRows = ref>([]); + // 选择列配置 --computed有问题 + const rowSelection = ref(null); + // 是否有滚动条 + let enableScrollBar = ref(true); + // table属性scroll + let tableScroll = computed(() => { + if (enableScrollBar.value == true) { + return undefined; + } else { + // X轴没有滚动条 + return { x: false }; + } + }); + + //用于 online列表的 某列的点击弹窗事件-弹窗显示其他表单 + const [registerOnlineHrefModal, { openModal: openOnlineHrefModal }] = useModal(); + const hrefMainTableId = ref('') + // 用于 online表单中 弹出别的表单 + const [registerPopModal, { openModal: openPopModal }] = useModal(); + const popTableId = ref('') + + // 对查询列信息的请求结果 处理方法 + function handleColumnResult(result, type = 'checkbox') { + // 字典设置 + dictOptionInfo.value = result.dictOptions; + // rowSelection设置 + if (result.checkboxFlag == 'Y') { + rowSelection.value = { + selectedRowKeys: selectedKeys, + onChange: onSelectChange, + type, + }; + } else { + rowSelection.value = null; + } + // 是否允许滚动条 + enableScrollBar.value = result.scrollFlag == 1; + + let dataColumns = result.columns; + dataColumns.forEach((column) => { + // update-begin--author:liaozhiyang---date:20230818---for:【QQYUN-4161】列支持固定功能 + if (column.fieldExtendJson) { + const json = JSON.parse(column.fieldExtendJson); + if (!!json.isFixed) { + column.fixed = 'left'; + } + } + // update-end--author:liaozhiyang---date:20230818---for:【QQYUN-4161】列支持固定功能 + // update-begin--author:liaozhiyang---date:20240517---for:【TV360X-129】增加富文本控件配置href跳转 + if (column.hrefSlotName && column.scopedSlots) { + const obj = result.fieldHrefSlots?.find((item) => item.slotName === column.hrefSlotName); + if (obj) { + column.fieldHref = obj; + } + } + // update-end--author:liaozhiyang---date:20240517---for:【TV360X-129】增加富文本控件配置href跳转 + Object.keys(column).map((key) => { + // 删掉空值的字段(不删除 空字符串('') 或 数字 0 ) + if (column[key] == null) { + delete column[key]; + } + }); + }); + + // href 跳转 + let fieldHrefSlots: HrefSlots[] = result.fieldHrefSlots; + const fieldHrefSlotKeysMap = {}; + fieldHrefSlots.forEach((item) => (fieldHrefSlotKeysMap[item.slotName] = item)); + + let tableColumns: OnlineColumn[] = []; + // 处理列中的 href 跳转和 dict 字典,使两者可以兼容存在 + tableColumns = handleColumnHrefAndDict(dataColumns, fieldHrefSlotKeysMap); + // 是否有 bpm_status字段 如果有,列表操作按钮需要增加提交流程按钮 + bpmStatusFilter(tableColumns); + + console.log('-----列表列配置----', tableColumns); + // 如果是树列表 需要设置第一列字段 及 第一列align + if (onlineTableContext.isTree() === true) { + // 找到第一列的配置 + let firstField = result.textField; + let index = -1; + for (let i = 0; i < tableColumns.length; i++) { + if (tableColumns[i].dataIndex == firstField) { + index = i; + break; + } + } + if (index > 0) { + //如果是0或是-1不需要处理 + let deleteColumns = tableColumns.splice(index, 1); + tableColumns.unshift(deleteColumns[0]); + } + //第一列居左 + if (tableColumns.length > 0) { + tableColumns[0].align = 'left'; + } + } + columns.value = tableColumns; + // 列发生了变化,需要重新渲染表格 + onlineTableContext.reloadTable(); + } + + /** + * 表格选择事件 [expose] + * @param selectedRowKeys + * @param selectRow + */ + function onSelectChange(selectedRowKeys, selectedRows) { + selectedKeys.value = selectedRowKeys; + onlineTableContext['selectedRows'] = toRaw(selectedRows); + onlineTableContext['selectedRowKeys'] = toRaw(selectedRowKeys); + } + + /** + * 处理列的href和字典翻译 + */ + function handleColumnHrefAndDict(columns: OnlineColumn[], fieldHrefSlotKeysMap: {}): OnlineColumn[] { + for (let column of columns) { + let { customRender, hrefSlotName, fieldType } = column; + // online 报表中类型配置为日期(yyyy-MM-dd ),但是实际展示为日期时间格式(yyyy-MM-dd HH:mm:ss) issues/3042 + if (fieldType == 'date' || fieldType == 'Date') { + column.customRender = ({ text }) => { + if (!text) { + return ''; + } + if (text.length > 10) { + return text.substring(0, 10); + } + return text; + }; + } else if (fieldType == 'link_table') { + // 关联记录列表展示 + // update-begin--author:liaozhiyang---date:20250318---for:【issues/7930】表格列表中支持关联记录配置是否只读 + const fieldExtendJson = column.fieldExtendJson ?? '{}'; + const json = JSON.parse(fieldExtendJson); + // update-end--author:liaozhiyang---date:20250318---for:【issues/7930】表格列表中支持关联记录配置是否只读 + column.customRender = ({ text, record }) => { + if (!text) { + return ''; + } + if(onlineTableContext.isPopList===true){ + // 如果是弹窗的列表,关联记录的列只支持数据翻译,不需要跳转逻辑 + return record[column.dataIndex+"_dictText"] + }else{ + let tempIdArray = (text+'').split(','); + //update-begin-author:taoyan date:2023-2-15 for: QQYUN-4286【online表单】主子表开启联合查询 功能测试报错打不开 + let tempLabelArray = []; + if(record[column.dataIndex+"_dictText"]){ + tempLabelArray = record[column.dataIndex+"_dictText"].split(','); + } + //update-end-author:taoyan date:2023-2-15 for: QQYUN-4286【online表单】主子表开启联合查询 功能测试报错打不开 + let renderResult:any = [] + if(renderResult.length==0){ + return '' + } + //如果需要显示全,但是会换行:display: flex;width: 100%;flex-wrap: wrap;flex-direction: row; + return h('div',{style:{'overflow':'hidden'}}, renderResult); + } + }; + } else if (fieldType === 'popup_dict') { + // update-begin--author:liaozhiyang---date:20240402---for:【QQYUN-8833】JPopupDict的列表翻译 + column.customRender = ({ text, record }) => { + const dict = record[column.dataIndex + '_dictText']; + if (dict != undefined) { + return record[column.dataIndex + '_dictText']; + } + return text; + }; + // update-end--author:liaozhiyang---date:20240402---for:【QQYUN-8833】JPopupDict的列表翻译 + } else { + if (!hrefSlotName && column.scopedSlots && column.scopedSlots.customRender) { + //【Online报表】字典和href互斥 这里通过fieldHrefSlotKeysMap 先找到是href的列 + if (fieldHrefSlotKeysMap.hasOwnProperty(column.scopedSlots.customRender)) { + hrefSlotName = column.scopedSlots.customRender; + } + } + // 如果 customRender 有值则代表使用了字典 + // 如果 hrefSlotName 有值则代表使用了href跳转 + // 两者可以兼容。兼容的具体思路为:先获取到字典替换的值,再添加href链接跳转 + if (customRender || hrefSlotName) { + let dictCode = customRender as string; + let replaceFlag = '_replace_text_'; + // 自定义渲染函数的列 需要手动配置ellipsis + column.ellipsis = true; + column.customRender = ({ text, record }) => { + let value = text; + // 如果 dictCode 有值,就进行字典转换 + if (dictCode) { + if (dictCode.startsWith(replaceFlag)) { + let textFieldName = dictCode.replace(replaceFlag, ''); + value = record[textFieldName]; + } else { + value = filterMultiDictText(unref(dictOptionInfo)[dictCode], text + ''); + } + } + // 扩展参数设置列的内容长度 + if (column.showLength) { + if (value && value.length > column.showLength) { + value = value.substr(0, column.showLength) + '...'; + } + } + // 如果 hrefSlotName 有值,就生成一个 a 标签,包裹住字典替换后(或原生)的值 + if (hrefSlotName) { + let field = fieldHrefSlotKeysMap[hrefSlotName]; + if (field) { + return h( + 'a', + { + onClick: () => handleClickFieldHref(field, record), + }, + value + ); + } + } + return value; + }; + } + + // 老版本叫scopedSlots 新版叫slots + if (column.scopedSlots) { + // slot的列 需要手动配置ellipsis + column.ellipsis = true; + let slots = column.scopedSlots; + column['slots'] = slots; + delete column.scopedSlots; + } + } + } + return columns; + } + + /** + * href 点击事件 + * @param field + * @param record + */ + function handleClickFieldHref(field, record) { + let href = field.href; + let urlPattern = /(ht|f)tp(s?)\:\/\/[0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*(:(0-9)*)*(\/?)([a-zA-Z0-9\-\.\?\,\'\/\\\+&%\$#_]*)?/; + let compPattern = /\.vue(\?.*)?$/; + let jsPattern = /{{([^}]+)}}/g; // {{ xxx }} + if (typeof href === 'string') { + if(href.startsWith('ONLINE:')){ + // ONLINE:tableId:fieldName + let arr = href.split(':') + hrefMainTableId.value = arr[1]; + let fieldName = arr[2]; + openOnlineHrefModal(true, { + isUpdate: true, + disableSubmit: true, + hideSub: true, + record:{id: record[fieldName]}, + }) + }else{ + href = href.trim().replace(/\${([^}]+)?}/g, (_s1, s2) => record[s2]); + // 执行 {{...}} JS增强语句 + if (jsPattern.test(href)) { + href = href.replace(jsPattern, function (text, s0) { + try { + // 支持 {{ ACCESS_TOKEN }} 占位符 + if (s0.trim() === 'ACCESS_TOKEN') { + return getToken() + } + + // update-begin--author:liaozhiyang---date:20230904---for:【QQYUN-6390】eval替换成new Function,解决build警告 + return _eval(s0); + // update-end--author:liaozhiyang---date:20230904---for:【QQYUN-6390】eval替换成new Function,解决build警告 + } catch (e) { + console.error(e); + return text; + } + }); + } + if (urlPattern.test(href)) { + window.open(href, '_blank'); + } else if (compPattern.test(href)) { + // 处理弹框 + openHrefCompModal(href); + } else { + router.push(href); + } + } + } + } + + // 样式 + const dialogStyle = { + top: 0, + left: 0, + height: '100%', + margin: 0, + padding: 0, + }; + + // update-begin--author:liaozhiyang---date:20231218---for:【QQYUN-6366】升级到antd4.x + // 弹窗属性配置 + const hrefComponent = reactive({ + model: { + title: '', + okText: '关闭', + width: '100%', + open: false, + destroyOnClose: true, + style: dialogStyle, + // dialogStyle: dialogStyle, + bodyStyle: { padding: '8px', height: 'calc(100vh - 108px)', overflow: 'auto', overflowX: 'hidden' }, + // 隐藏掉取消按钮 + cancelButtonProps: { style: { display: 'none' } }, + }, + on: { + ok: () => (hrefComponent.model.open = false), + cancel: () => (hrefComponent.model.open = false), + }, + is: null, + params: {}, + }); + // update-end--author:liaozhiyang---date:20231218---for:【QQYUN-6366】升级到antd4.x + + // 超链点击事件--> 打开一个modal窗口 + function openHrefCompModal(href) { + // 解析 href 参数 + let index = href.indexOf('?'); + let path = href; + if (index !== -1) { + path = href.substring(0, index); + let paramString = href.substring(index + 1, href.length); + let paramArray = paramString.split('&'); + let params = {}; + paramArray.forEach((paramObject) => { + let paramItem = paramObject.split('='); + params[paramItem[0]] = paramItem[1]; + }); + hrefComponent.params = params; + } else { + hrefComponent.params = {}; + } + // update-begin--author:liaozhiyang---date:20231218---for:【QQYUN-6366】升级到antd4.x + hrefComponent.model.open = true; + // update-end--author:liaozhiyang---date:20231218---for:【QQYUN-6366】升级到antd4.x + hrefComponent.model.title = '操作'; + hrefComponent.is = markRaw(defineAsyncComponent(() => importViewsFile(path))); + } + + //如果是树列表 操作列只能右侧固定 + let fixedAction:any = 'left'; + if(onlineTableContext.isTree()){ + fixedAction = 'right' + } + const actionColumn = reactive({ + title: '操作', + dataIndex: 'action', + slots: { customRender: 'action' }, + fixed: fixedAction, + align: 'center', + width: 150, + }); + + // 监听扩展参数的固定列配置,动态改变操作列的固定方式 + watch(() => extConfigJson?.value, () => { + if (extConfigJson?.value?.tableFixedAction === 1) { + actionColumn.fixed = extConfigJson?.value?.tableFixedActionType || 'right'; + // 如果是树列表 操作列只能右侧固定 + if(onlineTableContext.isTree()){ + actionColumn.fixed = 'right' + } + } + }); + + // 流程按钮状态 + function bpmStatusFilter(tableColumns: OnlineColumn[]): boolean { + let flag = false; + for (let i = 0; i < tableColumns.length; i++) { + let item = tableColumns[i]; + let fieldName = item.dataIndex; + if (fieldName!.toLowerCase() == 'bpm_status') { + flag = true; + break; + } + } + onlineTableContext['hasBpmStatus'] = flag; + return flag; + } + + /** + * 文件 + * @param text + */ + function downloadRowFile(text, record, column, id) { + if (!text) { + return; + } + // update-begin--author:liaozhiyang---date:20240124---for:【QQYUN-8020】online 表单有多个文件走下载接口 + if (text.indexOf(',') > 0) { + downloadFile(`/online/cgform/field/download/${id}/${record.id}/${column.dataIndex}`, `文件_${record.id}.zip`); + } else { + const url = getFileAccessHttpUrl(text); + window.open(url); + } + // update-end--author:liaozhiyang---date:20240124---for:【QQYUN-8020】online 表单有多个文件走下载接口 + } + + /** + * 图片 + * @param text + */ + function getImgView(text) { + if (text && text.indexOf(',') > 0) { + // update-begin--author:liaozhiyang---date:20250325---for:【issues/7990】图片参数中包含逗号会错误的识别成多张图 + text = split(text)[0]; + // update-end--author:liaozhiyang---date:20250325---for:【issues/7990】图片参数中包含逗号会错误的识别成多张图 + } + return getFileAccessHttpUrl(text); + } + + /** + * 根据编码获取省市区文本 + * @param code + */ + function getPcaText(code) { + if (!code) { + return ''; + } + return getAreaTextByCode(code); + } + + /** + * 日期格式化 + * @param text + */ + function getFormatDate(text, column) { + if (!text) { + return ''; + } + let a = text; + if (a.length > 10) { + a = a.substring(0, 10); + } + // update-begin--author:liaozhiyang---date:20240430---for:【issues/6094】online 日期(年月日)控件增加年、年月,年周,年季度等格式 + let fieldExtendJson = column?.fieldExtendJson; + if (fieldExtendJson) { + fieldExtendJson = JSON.parse(fieldExtendJson); + if (fieldExtendJson.picker && fieldExtendJson.picker != 'default') { + const result = getWeekMonthQuarterYear(a); + return result[fieldExtendJson.picker]; + } + } + // update-end--author:liaozhiyang---date:20240430---for:【issues/6094】online 日期(年月日)控件增加年、年月,年周,年季度等格式 + return a; + } + + watch(selectedKeys, () => { + onlineTableContext['selectedRowKeys'] = toRaw(selectedKeys.value); + }); + + onlineTableContext['clearSelectedRow'] = () => { + selectedKeys.value = []; + onlineTableContext['selectedRows'] = []; + onlineTableContext['selectedRowKeys'] = []; + }; + + /** + * 预览列表 cell 图片 + * @param text + */ + function viewOnlineCellImage(text) { + if (text) { + let imgList: any = []; + // update-begin--author:liaozhiyang---date:20250325---for:【issues/7990】图片参数中包含逗号会错误的识别成多张图 + const arr = split(text); + // update-end--author:liaozhiyang---date:20250325---for:【issues/7990】图片参数中包含逗号会错误的识别成多张图 + for (let str of arr) { + if (str) { + imgList.push(getFileAccessHttpUrl(str)); + } + } + createImgPreview({ imageList: imgList }); + } + } + + /** + * link table控件在列表上显示 支持点击跳转表单 + * @param id + * @param hrefTableName + */ + const onlinePopModalRef = ref(); + async function handleClickLinkTable(id, hrefTableName, isListReadOnly){ + popTableId.value = hrefTableName; + let formStatus = await onlinePopModalRef.value.getFormStatus(); + // 判断当前表单是否支持编辑,不能编辑跳详情表单 + if(formStatus==true){ + hrefMainTableId.value = hrefTableName; + openOnlineHrefModal(true, { + isUpdate: true, + disableSubmit: true, + hideSub: true, + record:{id: id}, + }) + }else{ + openPopModal(true, { + isUpdate: true, + // update-begin--author:liaozhiyang---date:20250318---for:【issues/7930】表格列表中支持关联记录配置是否只读 + disableSubmit: isListReadOnly ? true : false, + // update-end--author:liaozhiyang---date:20250318---for:【issues/7930】表格列表中支持关联记录配置是否只读 + record: { + id: id + } + }); + } + } + + return { + columns, + actionColumn, + selectedKeys, + rowSelection, + enableScrollBar, + tableScroll, + downloadRowFile, + getImgView, + getPcaText, + getFormatDate, + handleColumnResult, + onSelectChange, + hrefComponent, + viewOnlineCellImage, + hrefMainTableId, + registerOnlineHrefModal, + registerPopModal, + openPopModal, + openOnlineHrefModal, + onlinePopModalRef, + popTableId, + handleClickFieldHref, + }; +} diff --git a/src/components/Form/src/jeecg/components/JMarkdownEditor.vue b/src/components/Form/src/jeecg/components/JMarkdownEditor.vue new file mode 100644 index 0000000..1ecd5ba --- /dev/null +++ b/src/components/Form/src/jeecg/components/JMarkdownEditor.vue @@ -0,0 +1,62 @@ + + + + + diff --git a/src/components/Form/src/jeecg/components/JPopup.vue b/src/components/Form/src/jeecg/components/JPopup.vue new file mode 100644 index 0000000..84c1f56 --- /dev/null +++ b/src/components/Form/src/jeecg/components/JPopup.vue @@ -0,0 +1,200 @@ + + + + diff --git a/src/components/Form/src/jeecg/components/JPopupDict.vue b/src/components/Form/src/jeecg/components/JPopupDict.vue new file mode 100644 index 0000000..99d5f02 --- /dev/null +++ b/src/components/Form/src/jeecg/components/JPopupDict.vue @@ -0,0 +1,240 @@ + + + + diff --git a/src/components/Form/src/jeecg/components/JRangeDate.vue b/src/components/Form/src/jeecg/components/JRangeDate.vue new file mode 100644 index 0000000..8aa9953 --- /dev/null +++ b/src/components/Form/src/jeecg/components/JRangeDate.vue @@ -0,0 +1,65 @@ + + + + + diff --git a/src/components/Form/src/jeecg/components/JRangeNumber.vue b/src/components/Form/src/jeecg/components/JRangeNumber.vue new file mode 100644 index 0000000..6e84a77 --- /dev/null +++ b/src/components/Form/src/jeecg/components/JRangeNumber.vue @@ -0,0 +1,93 @@ + + + + + diff --git a/src/components/Form/src/jeecg/components/JRangeTime.vue b/src/components/Form/src/jeecg/components/JRangeTime.vue new file mode 100644 index 0000000..645b99d --- /dev/null +++ b/src/components/Form/src/jeecg/components/JRangeTime.vue @@ -0,0 +1,53 @@ + + + \ No newline at end of file diff --git a/src/components/Form/src/jeecg/components/JSearchSelect.vue b/src/components/Form/src/jeecg/components/JSearchSelect.vue new file mode 100644 index 0000000..6c0776d --- /dev/null +++ b/src/components/Form/src/jeecg/components/JSearchSelect.vue @@ -0,0 +1,576 @@ + + + + + diff --git a/src/components/Form/src/jeecg/components/JSelectDept.vue b/src/components/Form/src/jeecg/components/JSelectDept.vue new file mode 100644 index 0000000..3a96688 --- /dev/null +++ b/src/components/Form/src/jeecg/components/JSelectDept.vue @@ -0,0 +1,207 @@ + + + + diff --git a/src/components/Form/src/jeecg/components/JSelectInput.vue b/src/components/Form/src/jeecg/components/JSelectInput.vue new file mode 100644 index 0000000..9fa1c65 --- /dev/null +++ b/src/components/Form/src/jeecg/components/JSelectInput.vue @@ -0,0 +1,89 @@ + + + + + diff --git a/src/components/Form/src/jeecg/components/JSelectMultiple.vue b/src/components/Form/src/jeecg/components/JSelectMultiple.vue new file mode 100644 index 0000000..3e7dab9 --- /dev/null +++ b/src/components/Form/src/jeecg/components/JSelectMultiple.vue @@ -0,0 +1,199 @@ + + + + diff --git a/src/components/Form/src/jeecg/components/JSelectPosition.vue b/src/components/Form/src/jeecg/components/JSelectPosition.vue new file mode 100644 index 0000000..ef13e8d --- /dev/null +++ b/src/components/Form/src/jeecg/components/JSelectPosition.vue @@ -0,0 +1,178 @@ + + + + diff --git a/src/components/Form/src/jeecg/components/JSelectRole.vue b/src/components/Form/src/jeecg/components/JSelectRole.vue new file mode 100644 index 0000000..0d3c751 --- /dev/null +++ b/src/components/Form/src/jeecg/components/JSelectRole.vue @@ -0,0 +1,168 @@ + + + + diff --git a/src/components/Form/src/jeecg/components/JSelectUser.vue b/src/components/Form/src/jeecg/components/JSelectUser.vue new file mode 100644 index 0000000..8c8dca7 --- /dev/null +++ b/src/components/Form/src/jeecg/components/JSelectUser.vue @@ -0,0 +1,222 @@ + + + + diff --git a/src/components/Form/src/jeecg/components/JSelectUserByDepartment.vue b/src/components/Form/src/jeecg/components/JSelectUserByDepartment.vue new file mode 100644 index 0000000..1fdd5d3 --- /dev/null +++ b/src/components/Form/src/jeecg/components/JSelectUserByDepartment.vue @@ -0,0 +1,176 @@ + + + + diff --git a/src/components/Form/src/jeecg/components/JSelectUserByDept.vue b/src/components/Form/src/jeecg/components/JSelectUserByDept.vue new file mode 100644 index 0000000..38d22db --- /dev/null +++ b/src/components/Form/src/jeecg/components/JSelectUserByDept.vue @@ -0,0 +1,158 @@ + + + + diff --git a/src/components/Form/src/jeecg/components/JSwitch.vue b/src/components/Form/src/jeecg/components/JSwitch.vue new file mode 100644 index 0000000..ba2ae4f --- /dev/null +++ b/src/components/Form/src/jeecg/components/JSwitch.vue @@ -0,0 +1,85 @@ + + + + + diff --git a/src/components/Form/src/jeecg/components/JTreeDict.vue b/src/components/Form/src/jeecg/components/JTreeDict.vue new file mode 100644 index 0000000..783d0ce --- /dev/null +++ b/src/components/Form/src/jeecg/components/JTreeDict.vue @@ -0,0 +1,141 @@ + + + + + diff --git a/src/components/Form/src/jeecg/components/JTreeSelect.vue b/src/components/Form/src/jeecg/components/JTreeSelect.vue new file mode 100644 index 0000000..9e9da55 --- /dev/null +++ b/src/components/Form/src/jeecg/components/JTreeSelect.vue @@ -0,0 +1,471 @@ + + + + diff --git a/src/components/Form/src/jeecg/components/JUpload/JUpload.vue b/src/components/Form/src/jeecg/components/JUpload/JUpload.vue new file mode 100644 index 0000000..66a0fe0 --- /dev/null +++ b/src/components/Form/src/jeecg/components/JUpload/JUpload.vue @@ -0,0 +1,468 @@ + + + + + diff --git a/src/components/Form/src/jeecg/components/JUpload/JUploadModal.vue b/src/components/Form/src/jeecg/components/JUpload/JUploadModal.vue new file mode 100644 index 0000000..083e1ec --- /dev/null +++ b/src/components/Form/src/jeecg/components/JUpload/JUploadModal.vue @@ -0,0 +1,45 @@ + + + diff --git a/src/components/Form/src/jeecg/components/JUpload/components/UploadItemActions.vue b/src/components/Form/src/jeecg/components/JUpload/components/UploadItemActions.vue new file mode 100644 index 0000000..61586ab --- /dev/null +++ b/src/components/Form/src/jeecg/components/JUpload/components/UploadItemActions.vue @@ -0,0 +1,90 @@ + + + diff --git a/src/components/Form/src/jeecg/components/JUpload/index.ts b/src/components/Form/src/jeecg/components/JUpload/index.ts new file mode 100644 index 0000000..740bf2d --- /dev/null +++ b/src/components/Form/src/jeecg/components/JUpload/index.ts @@ -0,0 +1,3 @@ +export { UploadTypeEnum } from './upload.data'; +export { default as JUpload } from './JUpload.vue'; +export { default as JUploadModal } from './JUploadModal.vue'; diff --git a/src/components/Form/src/jeecg/components/JUpload/upload.data.ts b/src/components/Form/src/jeecg/components/JUpload/upload.data.ts new file mode 100644 index 0000000..820146d --- /dev/null +++ b/src/components/Form/src/jeecg/components/JUpload/upload.data.ts @@ -0,0 +1,5 @@ +export enum UploadTypeEnum { + all = 'all', + image = 'image', + file = 'file', +} diff --git a/src/components/Form/src/jeecg/components/base/JSelectBiz.vue b/src/components/Form/src/jeecg/components/base/JSelectBiz.vue new file mode 100644 index 0000000..4e6d4fd --- /dev/null +++ b/src/components/Form/src/jeecg/components/base/JSelectBiz.vue @@ -0,0 +1,154 @@ + + + diff --git a/src/components/Form/src/jeecg/components/base/JTreeBiz.vue b/src/components/Form/src/jeecg/components/base/JTreeBiz.vue new file mode 100644 index 0000000..cd65c5f --- /dev/null +++ b/src/components/Form/src/jeecg/components/base/JTreeBiz.vue @@ -0,0 +1,91 @@ + + + diff --git a/src/components/Form/src/jeecg/components/modal/DeptSelectModal.vue b/src/components/Form/src/jeecg/components/modal/DeptSelectModal.vue new file mode 100644 index 0000000..3d31268 --- /dev/null +++ b/src/components/Form/src/jeecg/components/modal/DeptSelectModal.vue @@ -0,0 +1,131 @@ + + + diff --git a/src/components/Form/src/jeecg/components/modal/JPopupOnlReportModal.vue b/src/components/Form/src/jeecg/components/modal/JPopupOnlReportModal.vue new file mode 100644 index 0000000..7660a35 --- /dev/null +++ b/src/components/Form/src/jeecg/components/modal/JPopupOnlReportModal.vue @@ -0,0 +1,354 @@ + + + + + diff --git a/src/components/Form/src/jeecg/components/modal/JSelectUserByDepartmentModal.vue b/src/components/Form/src/jeecg/components/modal/JSelectUserByDepartmentModal.vue new file mode 100644 index 0000000..1e533f5 --- /dev/null +++ b/src/components/Form/src/jeecg/components/modal/JSelectUserByDepartmentModal.vue @@ -0,0 +1,833 @@ + + + + + diff --git a/src/components/Form/src/jeecg/components/modal/PositionSelectModal.vue b/src/components/Form/src/jeecg/components/modal/PositionSelectModal.vue new file mode 100644 index 0000000..5e27e80 --- /dev/null +++ b/src/components/Form/src/jeecg/components/modal/PositionSelectModal.vue @@ -0,0 +1,194 @@ + + + diff --git a/src/components/Form/src/jeecg/components/modal/RoleSelectModal.vue b/src/components/Form/src/jeecg/components/modal/RoleSelectModal.vue new file mode 100644 index 0000000..7e6fea2 --- /dev/null +++ b/src/components/Form/src/jeecg/components/modal/RoleSelectModal.vue @@ -0,0 +1,130 @@ + + + diff --git a/src/components/Form/src/jeecg/components/modal/UserSelectByDepModal.vue b/src/components/Form/src/jeecg/components/modal/UserSelectByDepModal.vue new file mode 100644 index 0000000..ba5540f --- /dev/null +++ b/src/components/Form/src/jeecg/components/modal/UserSelectByDepModal.vue @@ -0,0 +1,249 @@ + + + + + diff --git a/src/components/Form/src/jeecg/components/modal/UserSelectModal.vue b/src/components/Form/src/jeecg/components/modal/UserSelectModal.vue new file mode 100644 index 0000000..9810fd1 --- /dev/null +++ b/src/components/Form/src/jeecg/components/modal/UserSelectModal.vue @@ -0,0 +1,306 @@ + + + diff --git a/src/components/Form/src/jeecg/components/positionSelect/PositionSelectModal.vue b/src/components/Form/src/jeecg/components/positionSelect/PositionSelectModal.vue new file mode 100644 index 0000000..88866c1 --- /dev/null +++ b/src/components/Form/src/jeecg/components/positionSelect/PositionSelectModal.vue @@ -0,0 +1,282 @@ + + + + + + diff --git a/src/components/Form/src/jeecg/components/roleSelect/RoleSelectInput.vue b/src/components/Form/src/jeecg/components/roleSelect/RoleSelectInput.vue new file mode 100644 index 0000000..d4911b8 --- /dev/null +++ b/src/components/Form/src/jeecg/components/roleSelect/RoleSelectInput.vue @@ -0,0 +1,243 @@ + + + + + diff --git a/src/components/Form/src/jeecg/components/roleSelect/RoleSelectModal.vue b/src/components/Form/src/jeecg/components/roleSelect/RoleSelectModal.vue new file mode 100644 index 0000000..f49b6d7 --- /dev/null +++ b/src/components/Form/src/jeecg/components/roleSelect/RoleSelectModal.vue @@ -0,0 +1,321 @@ + + + + + + diff --git a/src/components/Form/src/jeecg/components/userSelect/SelectedUserItem.vue b/src/components/Form/src/jeecg/components/userSelect/SelectedUserItem.vue new file mode 100644 index 0000000..0384c6c --- /dev/null +++ b/src/components/Form/src/jeecg/components/userSelect/SelectedUserItem.vue @@ -0,0 +1,150 @@ + + + + + diff --git a/src/components/Form/src/jeecg/components/userSelect/UserList.vue b/src/components/Form/src/jeecg/components/userSelect/UserList.vue new file mode 100644 index 0000000..16baa81 --- /dev/null +++ b/src/components/Form/src/jeecg/components/userSelect/UserList.vue @@ -0,0 +1,193 @@ + + + + + diff --git a/src/components/Form/src/jeecg/components/userSelect/UserListAndDepart.vue b/src/components/Form/src/jeecg/components/userSelect/UserListAndDepart.vue new file mode 100644 index 0000000..6187d4b --- /dev/null +++ b/src/components/Form/src/jeecg/components/userSelect/UserListAndDepart.vue @@ -0,0 +1,195 @@ + + + + + diff --git a/src/components/Form/src/jeecg/components/userSelect/UserListAndRole.vue b/src/components/Form/src/jeecg/components/userSelect/UserListAndRole.vue new file mode 100644 index 0000000..f095e49 --- /dev/null +++ b/src/components/Form/src/jeecg/components/userSelect/UserListAndRole.vue @@ -0,0 +1,151 @@ + + + + + diff --git a/src/components/Form/src/jeecg/components/userSelect/UserSelectModal.vue b/src/components/Form/src/jeecg/components/userSelect/UserSelectModal.vue new file mode 100644 index 0000000..e27f6ad --- /dev/null +++ b/src/components/Form/src/jeecg/components/userSelect/UserSelectModal.vue @@ -0,0 +1,376 @@ + + + + + diff --git a/src/components/Form/src/jeecg/components/userSelect/index.vue b/src/components/Form/src/jeecg/components/userSelect/index.vue new file mode 100644 index 0000000..754ea5f --- /dev/null +++ b/src/components/Form/src/jeecg/components/userSelect/index.vue @@ -0,0 +1,273 @@ + + + + + diff --git a/src/components/Form/src/jeecg/components/userSelect/useUserSelect.ts b/src/components/Form/src/jeecg/components/userSelect/useUserSelect.ts new file mode 100644 index 0000000..2ef7a2e --- /dev/null +++ b/src/components/Form/src/jeecg/components/userSelect/useUserSelect.ts @@ -0,0 +1,11 @@ +/** + * 用户选择组件支持选择 我自己,以表达式的形式传值 + */ +export const mySelfExpress = '#{sys_user_code}'; + +/** + * 用户列表 我自己的数据 + */ +export const mySelfData = { + id: mySelfExpress, username: mySelfExpress, realname: '当前用户', avatarIcon: 'idcard-outlined', avatarColor: 'rgb(75 176 79)' +} diff --git a/src/components/Form/src/jeecg/hooks/useCodeHinting.ts b/src/components/Form/src/jeecg/hooks/useCodeHinting.ts new file mode 100644 index 0000000..09a7fe7 --- /dev/null +++ b/src/components/Form/src/jeecg/hooks/useCodeHinting.ts @@ -0,0 +1,143 @@ +export const useCodeHinting = (CodeMirror, keywords, language) => { + const currentKeywords: any = [...keywords]; + const codeHintingMount = (coder) => { + if (keywords.length) { + coder.setOption('mode', language); + setTimeout(() => { + coder!.on('cursorActivity', function () { + coder?.showHint({ + completeSingle: false, + // container: containerRef.value + }); + }); + }, 1e3); + } + }; + + const codeHintingRegistry = () => { + // 自定义关键词(.的上一级) + const customKeywords: string[] = []; + + currentKeywords.forEach((item) => { + if (item.superiors) { + customKeywords.push(item.superiors); + } + }); + const funcsHint = (cm, callback) => { + // 获取光标位置 + const cur = cm.getCursor(); + // 获取当前单词的信息 + const token = cm.getTokenAt(cur); + const start = token.start; + const end = cur.ch; + const str = token.string; + let recordKeyword = null; + console.log('光标位置:', cur, '单词信息:', token, `start:${start},end:${end},str:${str}`); + + if (str.length) { + if (str === '.') { + // 查找.前面是否有定义的关键词 + const curLineCode = cm.getLine(cur.line); + for (let i = 0, len = customKeywords.length; i < len; i++) { + const k = curLineCode.slice(-(customKeywords[i].length + 1), -1); + if (customKeywords.includes(k)) { + recordKeyword = k; + break; + } + } + } else { + // 查找单词前面是否有.this(.关键词) + const curLineCode = cm.getLine(cur.line); + for (let i = 0, len = customKeywords.length; i < len; i++) { + const k = curLineCode.slice(start - (customKeywords[i].length + 1), start); + if (k.substr(-1) === '.' && customKeywords.includes(k.replace('.', ''))) { + recordKeyword = k.replace('.', ''); + break; + } + } + } + const findIdx = (a, b) => a.toLowerCase().indexOf(b.toLowerCase()); + let list = currentKeywords.filter((item) => { + if (recordKeyword) { + // 查特定对象下的属性or方法 + return item.superiors === recordKeyword; + } else { + // 查全局属性或者方法 + return item.superiors == undefined; + } + }); + if (str === '.') { + if (recordKeyword == null) { + list = []; + } + } else { + list = list + .filter((item) => { + const { text } = item; + const index = findIdx(text, str); + let result = text.startsWith('.') ? index === 1 : index === 0; + return result; + }) + .sort((a, b) => { + if (findIdx(a.text, str) < findIdx(b.text, str)) { + return -1; + } else { + return 1; + } + }); + } + + if (list.length === 1) { + // 只有一个时可能是自己输入,输到最后需要去掉提示。 + const item = list[0]; + if (item.text === str || item.text.substring(1) === str) { + list = []; + } + } + if (list.length) { + // 当str不是点时去掉点 + if (str != '.') { + list = list.map((item) => { + if (item.text.indexOf('.') === 0) { + return { ...item, text: item.text.substring(1) }; + } + return item; + }); + } + callback({ + list: list, + from: CodeMirror.Pos(cur.line, start), + to: CodeMirror.Pos(cur.line, end), + }); + // update-begin--author:liaozhiyang---date:20240429---for:【QQYUN-8865】js增强加上鼠标移入提示 + const item = currentKeywords[0]; + if (item?.desc) { + setTimeout(() => { + const elem: HTMLUListElement = document.querySelector('.CodeMirror-hints')!; + if (elem) { + const childElems = elem.children; + Array.from(childElems).forEach((item) => { + const displayText = item.textContent; + const findItem = currentKeywords.find((item) => item.displayText === displayText); + if (findItem) { + item.setAttribute('title', findItem.desc); + } + }); + } + }, 0); + } + // update-end--author:liaozhiyang---date:20240429---for:【QQYUN-8865】js增强加上鼠标移入提示 + } else { + } + } + }; + funcsHint.async = true; + funcsHint.supportsSelection = true; + // 自动补全 + keywords.length && CodeMirror.registerHelper('hint', language, funcsHint); + }; + return { + codeHintingRegistry, + codeHintingMount, + }; +}; diff --git a/src/components/Form/src/jeecg/hooks/useSelectBiz.ts b/src/components/Form/src/jeecg/hooks/useSelectBiz.ts new file mode 100644 index 0000000..3f71305 --- /dev/null +++ b/src/components/Form/src/jeecg/hooks/useSelectBiz.ts @@ -0,0 +1,185 @@ +import { inject, reactive, ref, watch, unref, Ref } from 'vue'; +import { useMessage } from '/@/hooks/web/useMessage'; +import { isEmpty } from '@/utils/is'; + +export function useSelectBiz(getList, props, emit?) { + //接收下拉框选项 + const selectOptions = inject('selectOptions', ref>([])); + //接收已选择的值 + const selectValues = inject('selectValues', reactive({ value: [], change: false })); + // 是否正在加载回显 + const loadingEcho = inject>('loadingEcho', ref(false)); + //数据集 + const dataSource = ref>([]); + //已选择的值 + const checkedKeys = ref>([]); + //选则的行记录 + const selectRows = ref>([]); + //提示弹窗 + const $message = useMessage(); + // 是否是首次加载回显,只有首次加载,才会显示 loading + let isFirstLoadEcho = true; + + /** + * 监听selectValues变化 + */ + watch( + selectValues, + () => { + //update-begin-author:liusq---date:2023-10-19--for: [issues/788]判断有设置数值才去加载 + //if (selectValues['change'] == false && !isEmpty(selectValues['value'])) { + if (selectValues['change'] == false && !isEmpty(selectValues['value'])) { + //update-end-author:liusq---date:2023-10-19--for: [issues/788]判断有设置数值才去加载 + //update-begin---author:wangshuai ---date:20220412 for:[VUEN-672]发文草稿箱编辑时拟稿人显示用户名------------ + // update-begin-author:liaozhiyang---date:2024-11-11--for:【issues/7405】部门选择用户同时全部选择两页用户,回显到父页面。第二页用户显示的不是真是姓名 + let params = { isMultiTranslate: 'true', pageSize: selectValues.value?.length }; + // update-end-author:liaozhiyang---date:2024-10-11--for:【issues/7405】部门选择用户同时全部选择两页用户,回显到父页面。第二页用户显示的不是真是姓名 + params[props.rowKey] = selectValues['value'].join(','); + //update-end---author:wangshuai ---date:20220412 for:[VUEN-672]发文草稿箱编辑时拟稿人显示用户名-------------- + loadingEcho.value = isFirstLoadEcho; + isFirstLoadEcho = false; + getDataSource(params, true) + .then() + .finally(() => { + loadingEcho.value = isFirstLoadEcho; + }); + } + //设置列表默认选中 + // update-begin--author:liaozhiyang---date:20250423---for:【QQYUN-12155】弹窗中勾选,再点取消,值被选中了 + checkedKeys['value'] = [...selectValues['value']]; + // update-end--author:liaozhiyang---date:20250423---for:【QQYUN-12155】弹窗中勾选,再点取消,值被选中了 + }, + { immediate: true } + ); + + async function onSelectChange(selectedRowKeys: (string | number)[], selectRow) { + checkedKeys.value = selectedRowKeys; + //判断全选的问题checkedKeys和selectRows必须一致 + if (props.showSelected && unref(checkedKeys).length !== unref(selectRow).length) { + let { records } = await getList({ + code: unref(checkedKeys).join(','), + pageSize: unref(checkedKeys).length, + }); + selectRows.value = records; + } else { + selectRows.value = selectRow; + } + } + + /** + * 选择列配置 + */ + const rowSelection = { + //update-begin-author:liusq---date:20220517--for: 动态设置rowSelection的type值,默认是'checkbox' --- + type: props.isRadioSelection ? 'radio' : 'checkbox', + //update-end-author:liusq---date:20220517--for: 动态设置rowSelection的type值,默认是'checkbox' --- + columnWidth: 20, + selectedRowKeys: checkedKeys, + onChange: onSelectChange, + //update-begin-author:wangshuai---date:20221102--for: [VUEN-2562]用户选择,跨页选择后,只有当前页人员 --- + //table4.4.0新增属性选中之后是否清空上一页下一页的数据,默认false + preserveSelectedRowKeys:true, + //update-end-author:wangshuai---date:20221102--for: [VUEN-2562]用户选择,跨页选择后,只有当前页人员 --- + }; + + /** + * 序号列配置 + */ + const indexColumnProps = { + dataIndex: 'index', + width: 50, + }; + + /** + * 加载列表数据集 + * @param params + * @param flag 是否是默认回显模式加载 + */ + async function getDataSource(params, flag) { + let { records } = await getList(params); + dataSource.value = records; + if (flag) { + let options = []; + records.forEach((item) => { + options.push({ label: item[props.labelKey], value: item[props.rowKey] }); + }); + selectOptions.value = options; + } + } + async function initSelectRows() { + let { records } = await getList({ + code: selectValues['value'].join(','), + pageSize: selectValues['value'].length, + }); + // update-begin--author:liaozhiyang---date:20250423---for:【QQYUN-12155】弹窗中勾选,再点取消,值被选中了 + checkedKeys['value'] = [...selectValues['value']]; + // update-end--author:liaozhiyang---date:20250423---for:【QQYUN-12155】弹窗中勾选,再点取消,值被选中了 + selectRows['value'] = records; + } + + /** + * 弹出框显示隐藏触发事件 + */ + async function visibleChange(visible) { + if (visible) { + // update-begin--author:liaozhiyang---date:20250423---for:【QQYUN-12179】弹窗勾选了值,点击取消再次打开弹窗遗留了上次的勾选的值 + checkedKeys['value'] = [...selectValues['value']]; + // update-begin--author:liaozhiyang---date:20250423---for:【QQYUN-12179】弹窗勾选了值,点击取消再次打开弹窗遗留了上次的勾选的值 + //设置列表默认选中 + props.showSelected && initSelectRows(); + } else { + // update-begin--author:liaozhiyang---date:20240517---for:【QQYUN-9366】用户选择组件取消和关闭会把选择数据带入 + emit?.('close'); + // update-end--author:liaozhiyang---date:20240517---for:【QQYUN-9366】用户选择组件取消和关闭会把选择数据带入 + } + } + + /** + * 确定选择 + */ + function getSelectResult(success) { + let options = []; + let values = []; + selectRows.value.forEach((item) => { + options.push({ label: item[props.labelKey], value: item[props.rowKey] }); + }); + checkedKeys.value.forEach((item) => { + values.push(item); + }); + selectOptions.value = options; + if (props.maxSelectCount && values.length > props.maxSelectCount) { + $message.createMessage.warning(`最多只能选择${props.maxSelectCount}条数据`); + return false; + } + success && success(options, values); + } + //删除已选择的信息 + function handleDeleteSelected(record) { + //update-begin---author:wangshuai ---date:20230404 for:【issues/424】开启右侧列表后,在右侧列表中删除用户时,逻辑有问题------------ + checkedKeys.value = checkedKeys.value.filter((item) => item != record[props.rowKey]); + selectRows.value = selectRows.value.filter((item) => item[props.rowKey] !== record[props.rowKey]); + //update-end---author:wangshuai ---date:20230404 for:【issues/424】开启右侧列表后,在右侧列表中删除用户时,逻辑有问题------------ + } + //清空选择项 + function reset() { + checkedKeys.value = []; + selectRows.value = []; + } + return [ + { + onSelectChange, + getDataSource, + visibleChange, + selectOptions, + selectValues, + rowSelection, + indexColumnProps, + checkedKeys, + selectRows, + dataSource, + getSelectResult, + handleDeleteSelected, + reset, + }, + ]; +} diff --git a/src/components/Form/src/jeecg/hooks/useTreeBiz.ts b/src/components/Form/src/jeecg/hooks/useTreeBiz.ts new file mode 100644 index 0000000..ee8da4a --- /dev/null +++ b/src/components/Form/src/jeecg/hooks/useTreeBiz.ts @@ -0,0 +1,284 @@ +import type { Ref } from 'vue'; +import { inject, reactive, ref, computed, unref, watch, nextTick } from 'vue'; +import { TreeActionType } from '/@/components/Tree'; +import { listToTree } from '/@/utils/common/compUtils'; +import { isEqual } from 'lodash-es'; + +export function useTreeBiz(treeRef, getList, props, realProps, emit) { + //接收下拉框选项 + const selectOptions = inject('selectOptions', ref>([])); + //接收已选择的值 + const selectValues = inject('selectValues', reactive({})); + // 是否正在加载回显 + const loadingEcho = inject>('loadingEcho', ref(false)); + //数据集 + const treeData = ref>([]); + //已选择的值 + const checkedKeys = ref>([]); + //选则的行记录 + const selectRows = ref>([]); + //是否是打开弹框模式 + const openModal = ref(false); + // 是否开启父子关联,如果不可以多选,就始终取消父子关联 + const getCheckStrictly = computed(() => (realProps.multiple ? props.checkStrictly : true)); + // 是否是首次加载回显,只有首次加载,才会显示 loading + let isFirstLoadEcho = true; + let prevSelectValues = []; + /** + * 监听selectValues变化 + */ + watch( + selectValues, + ({ value: values }: Recordable) => { + if(!values){ + return; + } + // update-begin--author:liaozhiyang---date:20250604---for:【issues/8232】代码设置JSelectDept组件值没翻译 + if (values.length > 0) { + // 防止多次请求 + if (isEqual(values, prevSelectValues)) return; + prevSelectValues = values; + loadingEcho.value = isFirstLoadEcho; + isFirstLoadEcho = false; + onLoadData(null, values.join(',')).finally(() => { + loadingEcho.value = false; + }); + // update-end--author:liaozhiyang---date:20250604---for:【issues/8232】代码设置JSelectDept组件值没翻译 + } + }, + { immediate: true } + ); + + /** + * 获取树实例 + */ + function getTree() { + const tree = unref(treeRef); + if (!tree) { + throw new Error('tree is null!'); + } + return tree; + } + + /** + * 设置树展开级别 + */ + function expandTree() { + nextTick(() => { + if (props.defaultExpandLevel && props.defaultExpandLevel > 0) { + getTree().filterByLevel(props.defaultExpandLevel); + } + //设置列表默认选中 + checkedKeys.value = selectValues['value']; + }).then(); + } + + /** + * 树节点选择 + */ + function onSelect(keys, info) { + if (props.checkable == false) { + checkedKeys.value = props.checkStrictly ? keys.checked : keys; + const { selectedNodes } = info; + let rows = []; + selectedNodes.forEach((item) => { + rows.push(item); + }); + selectRows.value = rows; + } + } + + /** + * 树节点选择 + */ + function onCheck(keys, info) { + if (props.checkable == true) { + // 如果不能多选,就只保留最后一个选中的 + if (!realProps.multiple) { + if (info.checked) { + //update-begin-author:taoyan date:20220408 for: 单选模式下,设定rowKey,无法选中数据- + checkedKeys.value = [info.node.eventKey]; + let rowKey = props.rowKey; + let temp = info.checkedNodes.find((n) => n[rowKey] === info.node.eventKey); + selectRows.value = [temp]; + //update-end-author:taoyan date:20220408 for: 单选模式下,设定rowKey,无法选中数据- + } else { + checkedKeys.value = []; + selectRows.value = []; + } + return; + } + checkedKeys.value = props.checkStrictly ? keys.checked : keys; + const { checkedNodes } = info; + let rows = []; + checkedNodes.forEach((item) => { + rows.push(item); + }); + selectRows.value = rows; + } + } + + /** + * 勾选全部 + */ + async function checkALL(checkAll) { + getTree().checkAll(checkAll); + //update-begin---author:wangshuai ---date:20230403 for:【issues/394】所属部门树操作全部勾选不生效/【issues/4646】部门全部勾选后,点击确认按钮,部门信息丢失------------ + await nextTick(); + checkedKeys.value = getTree().getCheckedKeys(); + if(checkAll){ + getTreeRow(); + }else{ + selectRows.value = []; + } + //update-end---author:wangshuai ---date:20230403 for:【issues/394】所属部门树操作全部勾选不生效/【issues/4646】部门全部勾选后,点击确认按钮,部门信息丢失------------ + } + + /** + * 获取数列表 + * @param res + */ + function getTreeRow() { + let ids = ""; + if(unref(checkedKeys).length>0){ + ids = checkedKeys.value.join(","); + } + getList({ids:ids}).then((res) =>{ + selectRows.value = res; + }) + } + + /** + * 展开全部 + */ + function expandAll(expandAll) { + getTree().expandAll(expandAll); + } + + /** + * 加载树数据 + */ + async function onLoadData(treeNode, ids) { + let params = {}; + let startPid = ''; + if (treeNode) { + startPid = treeNode.eventKey; + //update-begin---author:wangshuai ---date:20220407 for:rowkey不设置成id,sync开启异步的时候,点击上级下级不显示------------ + params['pid'] = treeNode.value; + //update-end---author:wangshuai ---date:20220407 for:rowkey不设置成id,sync开启异步的时候,点击上级下级不显示------------ + } + if (ids) { + startPid = ''; + params['ids'] = ids; + } + let record = await getList(params); + let optionData = record; + if (!props.serverTreeData) { + //前端处理数据为tree结构 + record = listToTree(record, props, startPid); + if (record.length == 0 && treeNode) { + checkHasChild(startPid, treeData.value); + } + } + + if (openModal.value == true) { + //弹框模式下加载全部数据 + if (!treeNode) { + treeData.value = record; + } else { + return new Promise((resolve: (value?: unknown) => void) => { + if (!treeNode.children) { + resolve(); + return; + } + const asyncTreeAction: TreeActionType | null = unref(treeRef); + if (asyncTreeAction) { + asyncTreeAction.updateNodeByKey(treeNode.eventKey, { children: record }); + asyncTreeAction.setExpandedKeys([treeNode.eventKey, ...asyncTreeAction.getExpandedKeys()]); + } + resolve(); + return; + }); + } + expandTree(); + } else { + const options = []; + optionData.forEach((item) => { + //update-begin-author:taoyan date:2022-7-4 for: issues/I5F3P4 online配置部门选择后编辑,查看数据应该显示部门名称,不是部门代码 + options.push({ label: item[props.labelKey], value: item[props.rowKey] }); + //update-end-author:taoyan date:2022-7-4 for: issues/I5F3P4 online配置部门选择后编辑,查看数据应该显示部门名称,不是部门代码 + }); + selectOptions.value = options; + } + } + + /** + * 异步加载时检测是否含有下级节点 + * @param pid 父节点 + * @param treeArray tree数据 + */ + function checkHasChild(pid, treeArray) { + if (treeArray && treeArray.length > 0) { + for (let item of treeArray) { + if (item.key == pid) { + if (!item.child) { + item.isLeaf = true; + } + break; + } else { + checkHasChild(pid, item.children); + } + } + } + } + + /** + * 获取已选择数据 + */ + function getSelectTreeData(success) { + const options = []; + const values = []; + selectRows.value.forEach((item) => { + options.push({ label: item[props.labelKey], value: item[props.rowKey] }); + }); + checkedKeys.value.forEach((item) => { + values.push(item); + }); + selectOptions.value = options; + success && success(options, values); + } + + /** + * 弹出框显示隐藏触发事件 + */ + async function visibleChange(visible) { + if (visible) { + //弹出框打开时加载全部数据 + openModal.value = true; + await onLoadData(null, null); + } else { + openModal.value = false; + // update-begin--author:liaozhiyang---date:20240527---for:【TV360X-414】部门设置了默认值,查询重置变成空了(同步JSelectUser组件改法) + emit?.('close'); + // update-end--author:liaozhiyang---date:20240527---for:【TV360X-414】部门设置了默认值,查询重置变成空了(同步JSelectUser组件改法) + } + } + + return [ + { + visibleChange, + selectOptions, + selectValues, + onLoadData, + onCheck, + onSelect, + checkALL, + expandAll, + checkedKeys, + selectRows, + treeData, + getCheckStrictly, + getSelectTreeData, + }, + ]; +} diff --git a/src/components/Form/src/jeecg/props/props.ts b/src/components/Form/src/jeecg/props/props.ts new file mode 100644 index 0000000..3a5fa79 --- /dev/null +++ b/src/components/Form/src/jeecg/props/props.ts @@ -0,0 +1,87 @@ +//下拉选择框组件公共props +import { propTypes } from '/@/utils/propTypes'; + +export const selectProps = { + //是否多选 + isRadioSelection: { + type: Boolean, + //update-begin---author:wangshuai ---date:20220527 for:部门用户组件默认应该单选,否则其他地方有问题------------ + default: false, + //update-end---author:wangshuai ---date:20220527 for:部门用户组件默认应该单选,否则其他地方有问题-------------- + }, + //回传value字段名 + rowKey: { + type: String, + default: 'id', + }, + //回传文本字段名 + labelKey: { + type: String, + default: 'name', + }, + //查询参数 + params: { + type: Object, + default: () => {}, + }, + //是否显示选择按钮 + showButton: propTypes.bool.def(true), + //是否显示右侧选中列表 + showSelected: propTypes.bool.def(false), + //最大选择数量 + maxSelectCount: { + type: Number, + default: 0, + }, +}; + +//树形选择组件公共props +export const treeProps = { + //回传value字段名 + rowKey: { + type: String, + default: 'key', + }, + //回传文本字段名 + labelKey: { + type: String, + default: 'title', + }, + //初始展开的层级 + defaultExpandLevel: { + type: [Number], + default: 0, + }, + //根pid值 + startPid: { + type: [Number, String], + default: '', + }, + //主键字段 + primaryKey: { + type: [String], + default: 'id', + }, + //父ID字段 + parentKey: { + type: [String], + default: 'parentId', + }, + //title字段 + titleKey: { + type: [String], + default: 'title', + }, + //是否开启服务端转换tree数据结构 + serverTreeData: propTypes.bool.def(true), + //是否开启异步加载数据 + sync: propTypes.bool.def(true), + //是否显示选择按钮 + showButton: propTypes.bool.def(true), + //是否显示复选框 + checkable: propTypes.bool.def(true), + //checkable 状态下节点选择完全受控(父子节点选中状态不再关联) + checkStrictly: propTypes.bool.def(false), + // 是否允许多选,默认 true + multiple: propTypes.bool.def(true), +}; diff --git a/src/components/Form/src/props.ts b/src/components/Form/src/props.ts new file mode 100644 index 0000000..c7755bf --- /dev/null +++ b/src/components/Form/src/props.ts @@ -0,0 +1,123 @@ +import type { FieldMapToTime, FormSchema } from './types/form'; +import type { CSSProperties, PropType } from 'vue'; +import type { ColEx } from './types'; +import type { TableActionType } from '/@/components/Table'; +import type { ButtonProps } from 'ant-design-vue/es/button/buttonTypes'; +import type { RowProps } from 'ant-design-vue/lib/grid/Row'; +import dayjs from "dayjs"; +import { propTypes } from '/@/utils/propTypes'; +import componentSetting from '/@/settings/componentSetting'; + +const { form } = componentSetting; +export const basicProps = { + model: { + type: Object as PropType, + default: {}, + }, + // 标签宽度 固定宽度 + labelWidth: { + type: [Number, String] as PropType, + default: 0, + }, + fieldMapToTime: { + type: Array as PropType, + default: () => [], + }, + fieldMapToNumber: { + type: Array as PropType, + default: () => [], + }, + compact: propTypes.bool, + // 表单配置规则 + schemas: { + type: [Array] as PropType, + default: () => [], + }, + mergeDynamicData: { + type: Object as PropType, + default: null, + }, + baseRowStyle: { + type: Object as PropType, + }, + baseColProps: { + type: Object as PropType>, + }, + autoSetPlaceHolder: propTypes.bool.def(true), + // 在INPUT组件上单击回车时,是否自动提交 + autoSubmitOnEnter: propTypes.bool.def(false), + submitOnReset: propTypes.bool, + size: propTypes.oneOf(['default', 'small', 'large']).def('default'), + // 禁用表单 + disabled: propTypes.bool, + emptySpan: { + type: [Number, Object] as PropType, + default: 0, + }, + // 是否显示收起展开按钮 + showAdvancedButton: propTypes.bool, + // 转化时间 + transformDateFunc: { + type: Function as PropType, + default: (date: any) => { + // 判断是否是dayjs实例 + return dayjs.isDayjs(date) ? date?.format('YYYY-MM-DD HH:mm:ss') : date; + }, + }, + rulesMessageJoinLabel: propTypes.bool.def(true), + // 【jeecg】超过3列自动折叠 + autoAdvancedCol: propTypes.number.def(3), + // update-begin--author:liaozhiyang---date:202401009---for:【issues/7261】表格上方查询项autoAdvancedLine配置没有效果(删除autoAdvancedLine) + // 超过3行自动折叠 + // autoAdvancedLine: propTypes.number.def(3), + // update-end--author:liaozhiyang---date:202401009---for:【issues/7261】表格上方查询项autoAdvancedLine配置没有效果(删除autoAdvancedLine) + // 不受折叠影响的行数 + alwaysShowLines: propTypes.number.def(1), + + // 是否显示操作按钮 + showActionButtonGroup: propTypes.bool.def(true), + // 操作列Col配置 + actionColOptions: Object as PropType>, + // 显示重置按钮 + showResetButton: propTypes.bool.def(true), + // 是否聚焦第一个输入框,只在第一个表单项为input的时候作用 + autoFocusFirstItem: propTypes.bool, + // 重置按钮配置 + resetButtonOptions: Object as PropType>, + + // 显示确认按钮 + showSubmitButton: propTypes.bool.def(true), + // 确认按钮配置 + submitButtonOptions: Object as PropType>, + + // 自定义重置函数 + resetFunc: Function as PropType<() => Promise>, + submitFunc: Function as PropType<() => Promise>, + + // 以下为默认props + hideRequiredMark: propTypes.bool, + + labelCol: { + type: Object as PropType>, + default: form.labelCol, + }, + + layout: propTypes.oneOf(['horizontal', 'vertical', 'inline']).def('horizontal'), + tableAction: { + type: Object as PropType, + }, + + wrapperCol: { + type: Object as PropType>, + default: form.wrapperCol, + }, + + colon: propTypes.bool.def(form.colon), + + labelAlign: propTypes.string, + + rowProps: Object as PropType, + + // 当表单是查询条件的时候 当表单改变后自动查询,不需要点击查询按钮 + autoSearch: propTypes.bool.def(false), +}; diff --git a/src/components/Form/src/types/form.ts b/src/components/Form/src/types/form.ts new file mode 100644 index 0000000..4b55009 --- /dev/null +++ b/src/components/Form/src/types/form.ts @@ -0,0 +1,231 @@ +import type { NamePath, RuleObject, ValidateOptions } from 'ant-design-vue/lib/form/interface'; +import type { VNode, ComputedRef } from 'vue'; +import type { ButtonProps as AntdButtonProps } from '/@/components/Button'; +import type { FormItem } from './formItem'; +import type { ColEx, ComponentType } from './index'; +import type { TableActionType } from '/@/components/Table/src/types/table'; +import type { CSSProperties } from 'vue'; +import type { RowProps } from 'ant-design-vue/lib/grid/Row'; + +export type FieldMapToTime = [string, [string, string], string?][]; +export type FieldMapToNumber = [string, [string, string]][]; + +export type Rule = RuleObject & { + trigger?: 'blur' | 'change' | ['change', 'blur']; +}; + +export interface RenderCallbackParams { + schema: FormSchema; + values: Recordable; + model: Recordable; + field: string; +} + +export interface ButtonProps extends AntdButtonProps { + text?: string; +} + +export interface FormActionType { + submit: () => Promise; + setFieldsValue: (values: T) => Promise; + resetFields: () => Promise; + getFieldsValue: () => Recordable; + clearValidate: (name?: string | string[]) => Promise; + updateSchema: (data: Partial | Partial[]) => Promise; + resetSchema: (data: Partial | Partial[]) => Promise; + setProps: (formProps: Partial) => Promise; + getProps: ComputedRef>; + getSchemaByField: (field: string) => Nullable; + removeSchemaByFiled: (field: string | string[]) => Promise; + appendSchemaByField: (schema: FormSchema, prefixField: string | undefined, first?: boolean | undefined) => Promise; + validateFields: (nameList?: NamePath[], options?: ValidateOptions) => Promise; + validate: (nameList?: NamePath[]) => Promise; + scrollToField: (name: NamePath, options?: ScrollOptions) => Promise; +} + +export type RegisterFn = (formInstance: FormActionType) => void; + +export type UseFormReturnType = [RegisterFn, FormActionType]; + +export interface FormProps { + layout?: 'vertical' | 'inline' | 'horizontal'; + // Form value + model?: Recordable; + // The width of all items in the entire form + labelWidth?: number | string; + //alignment + labelAlign?: 'left' | 'right'; + //Row configuration for the entire form + rowProps?: RowProps; + // Submit form on reset + submitOnReset?: boolean; + // Col configuration for the entire form + labelCol?: Partial | null; + // Col configuration for the entire form + wrapperCol?: Partial | null; + + // General row style + baseRowStyle?: CSSProperties; + + // General col configuration + baseColProps?: Partial; + + // Form configuration rules + schemas?: FormSchema[]; + // Function values used to merge into dynamic control form items + mergeDynamicData?: Recordable; + // Compact mode for search forms + compact?: boolean; + // Blank line span + emptySpan?: number | Partial; + // Internal component size of the form + size?: 'default' | 'small' | 'large'; + // Whether to disable + disabled?: boolean; + // Time interval fields are mapped into multiple + fieldMapToTime?: FieldMapToTime; + // number interval fields are mapped into multiple + fieldMapToNumber?: FieldMapToNumber; + // Placeholder is set automatically + autoSetPlaceHolder?: boolean; + // Auto submit on press enter on input + autoSubmitOnEnter?: boolean; + // Check whether the information is added to the label + rulesMessageJoinLabel?: boolean; + // 是否显示展开收起按钮 + showAdvancedButton?: boolean; + // Whether to focus on the first input box, only works when the first form item is input + autoFocusFirstItem?: boolean; + // 【jeecg】如果 showAdvancedButton 为 true,超过指定列数默认折叠,默认为3 + autoAdvancedCol?: number; + // 如果 showAdvancedButton 为 true,超过指定行数行默认折叠 + // update-begin--author:liaozhiyang---date:202401009---for:【issues/7261】表格上方查询项autoAdvancedLine配置没有效果(删除autoAdvancedLine) + // autoAdvancedLine?: number; + // update-end--author:liaozhiyang---date:202401009---for:【issues/7261】表格上方查询项autoAdvancedLine配置没有效果(删除autoAdvancedLine) + // 折叠时始终保持显示的行数 + alwaysShowLines?: number; + // Whether to show the operation button + showActionButtonGroup?: boolean; + + // Reset button configuration + resetButtonOptions?: Partial; + + // Confirm button configuration + submitButtonOptions?: Partial; + + // Operation column configuration + actionColOptions?: Partial; + + // Show reset button + showResetButton?: boolean; + // Show confirmation button + showSubmitButton?: boolean; + + resetFunc?: () => Promise; + submitFunc?: () => Promise; + transformDateFunc?: (date: any) => string; + colon?: boolean; +} +export interface FormSchema { + // Field name + field: string; + // Event name triggered by internal value change, default change + changeEvent?: string; + // Variable name bound to v-model Default value + valueField?: string; + // Label name + // update-begin--author:liaozhiyang---date:20240724---for:【issues/6908】多语言无刷新切换时,BasicColumn和FormSchema里面的值不能正常切换 + label: string | VNode | Fn; + // update-end--author:liaozhiyang---date:20240724---for:【issues/6908】多语言无刷新切换时,BasicColumn和FormSchema里面的值不能正常切换 + // Auxiliary text + subLabel?: string; + // Help text on the right side of the text + helpMessage?: string | string[] | ((renderCallbackParams: RenderCallbackParams) => string | string[]); + // BaseHelp component props + helpComponentProps?: Partial; + // Label width, if it is passed, the labelCol and WrapperCol configured by itemProps will be invalid + labelWidth?: string | number; + // Disable the adjustment of labelWidth with global settings of formModel, and manually set labelCol and wrapperCol by yourself + disabledLabelWidth?: boolean; + // render component + component: ComponentType; + // Component parameters + componentProps?: + | ((opt: { schema: FormSchema; tableAction: TableActionType; formActionType: FormActionType; formModel: Recordable }) => Recordable) + | object; + // Required + required?: boolean | ((renderCallbackParams: RenderCallbackParams) => boolean); + + suffix?: string | number | VueNode | ((values: RenderCallbackParams) => string | number | VueNode); + // 【QQYUN-12876】是否是紧凑型 suffix(当组件宽度未占满时,可紧挨着组件右侧) + suffixCompact?: boolean; + + // Validation rules + rules?: Rule[]; + // Check whether the information is added to the label + rulesMessageJoinLabel?: boolean; + + // Reference formModelItem + itemProps?: Partial | ((renderCallbackParams: RenderCallbackParams) => Partial); + + // col configuration outside formModelItem + colProps?: Partial; + + // 默认值 + defaultValue?: any; + isAdvanced?: boolean; + + // Matching details components + span?: number; + + ifShow?: boolean | ((renderCallbackParams: RenderCallbackParams) => boolean); + + show?: boolean | ((renderCallbackParams: RenderCallbackParams) => boolean); + + // Render the content in the form-item tag + render?: (renderCallbackParams: RenderCallbackParams) => VNode | VNode[] | string; + + // Rendering col content requires outer wrapper form-item + renderColContent?: (renderCallbackParams: RenderCallbackParams) => VNode | VNode[] | string; + + renderComponentContent?: ((renderCallbackParams: RenderCallbackParams) => any) | VNode | VNode[] | string; + + // Custom slot, in from-item + slot?: string; + + // Custom slot, similar to renderColContent + colSlot?: string; + + dynamicDisabled?: boolean | ((renderCallbackParams: RenderCallbackParams) => boolean); + + dynamicRules?: (renderCallbackParams: RenderCallbackParams) => Rule[]; + // update-begin--author:liaozhiyang---date:20240308---for:【QQYUN-8377】formSchema props支持动态修改 + // 设置组件props的key + dynamicPropskey?: string; + dynamicPropsVal?: ((renderCallbackParams: RenderCallbackParams) => any); + // update-end--author:liaozhiyang---date:20240308---for:【QQYUN-8377】formSchema props支持动态修改 + + // 这个属性自定义的 用于自定义的业务 比如在表单打开的时候修改表单的禁用状态,但是又不能重写componentProps,因为他的内容太多了,所以使用dynamicDisabled和buss实现 + buss?: any; + + //label字数控制(label宽度) + labelLength?: number; + // update-begin--author:liaozhiyang---date:20240529---for【TV360X-460】basicForm支持v-auth指令(权限控制显隐) + auth?: string; + // update-end--author:liaozhiyang---date:20240529---for【TV360X-460】basicForm支持v-auth指令(权限控制显隐) +} +export interface HelpComponentProps { + maxWidth: string; + // Whether to display the serial number + showIndex: boolean; + // Text list + text: any; + // colour + color: string; + // font size + fontSize: string; + icon: string; + absolute: boolean; + // Positioning + position: any; +} diff --git a/src/components/Form/src/types/formItem.ts b/src/components/Form/src/types/formItem.ts new file mode 100644 index 0000000..77b238a --- /dev/null +++ b/src/components/Form/src/types/formItem.ts @@ -0,0 +1,91 @@ +import type { NamePath } from 'ant-design-vue/lib/form/interface'; +import type { ColProps } from 'ant-design-vue/lib/grid/Col'; +import type { HTMLAttributes, VNodeChild } from 'vue'; + +export interface FormItem { + /** + * Used with label, whether to display : after label text. + * @default true + * @type boolean + */ + colon?: boolean; + + /** + * The extra prompt message. It is similar to help. Usage example: to display error message and prompt message at the same time. + * @type any (string | slot) + */ + extra?: string | VNodeChild | JSX.Element; + + /** + * Used with validateStatus, this option specifies the validation status icon. Recommended to be used only with Input. + * @default false + * @type boolean + */ + hasFeedback?: boolean; + + /** + * The prompt message. If not provided, the prompt message will be generated by the validation rule. + * @type any (string | slot) + */ + help?: string | VNodeChild | JSX.Element; + + /** + * Label test + * @type any (string | slot) + */ + label?: string | VNodeChild | JSX.Element; + + /** + * The layout of label. You can set span offset to something like {span: 3, offset: 12} or sm: {span: 3, offset: 12} same as with + * @type Col + */ + labelCol?: ColProps & HTMLAttributes; + + /** + * Whether provided or not, it will be generated by the validation rule. + * @default false + * @type boolean + */ + required?: boolean; + + /** + * The validation status. If not provided, it will be generated by validation rule. options: 'success' 'warning' 'error' 'validating' + * @type string + */ + validateStatus?: '' | 'success' | 'warning' | 'error' | 'validating'; + + /** + * The layout for input controls, same as labelCol + * @type Col + */ + wrapperCol?: ColProps; + /** + * Set sub label htmlFor. + */ + htmlFor?: string; + /** + * text align of label + */ + labelAlign?: 'left' | 'right'; + /** + * a key of model. In the setting of validate and resetFields method, the attribute is required + */ + name?: NamePath; + /** + * validation rules of form + */ + rules?: object | object[]; + /** + * Whether to automatically associate form fields. In most cases, you can setting automatic association. + * If the conditions for automatic association are not met, you can manually associate them. See the notes below. + */ + autoLink?: boolean; + /** + * Whether stop validate on first rule of error for this field. + */ + validateFirst?: boolean; + /** + * When to validate the value of children node + */ + validateTrigger?: string | string[] | false; +} diff --git a/src/components/Form/src/types/hooks.ts b/src/components/Form/src/types/hooks.ts new file mode 100644 index 0000000..0308e73 --- /dev/null +++ b/src/components/Form/src/types/hooks.ts @@ -0,0 +1,6 @@ +export interface AdvanceState { + isAdvanced: boolean; + hideAdvanceBtn: boolean; + isLoad: boolean; + actionSpan: number; +} diff --git a/src/components/Form/src/types/index.ts b/src/components/Form/src/types/index.ts new file mode 100644 index 0000000..dae5164 --- /dev/null +++ b/src/components/Form/src/types/index.ts @@ -0,0 +1,162 @@ +type ColSpanType = number | string; + +export interface ColEx { + style?: any; + /** + * raster number of cells to occupy, 0 corresponds to display: none + * @default none (0) + * @type ColSpanType + */ + span?: ColSpanType; + + /** + * raster order, used in flex layout mode + * @default 0 + * @type ColSpanType + */ + order?: ColSpanType; + + /** + * the layout fill of flex + * @default none + * @type ColSpanType + */ + flex?: ColSpanType; + + /** + * the number of cells to offset Col from the left + * @default 0 + * @type ColSpanType + */ + offset?: ColSpanType; + + /** + * the number of cells that raster is moved to the right + * @default 0 + * @type ColSpanType + */ + push?: ColSpanType; + + /** + * the number of cells that raster is moved to the left + * @default 0 + * @type ColSpanType + */ + pull?: ColSpanType; + + /** + * <576px and also default setting, could be a span value or an object containing above props + * @type { span: ColSpanType, offset: ColSpanType } | ColSpanType + */ + xs?: { span: ColSpanType; offset?: ColSpanType } | ColSpanType; + + /** + * ≥576px, could be a span value or an object containing above props + * @type { span: ColSpanType, offset: ColSpanType } | ColSpanType + */ + sm?: { span: ColSpanType; offset?: ColSpanType } | ColSpanType; + + /** + * ≥768px, could be a span value or an object containing above props + * @type { span: ColSpanType, offset: ColSpanType } | ColSpanType + */ + md?: { span: ColSpanType; offset?: ColSpanType } | ColSpanType; + + /** + * ≥992px, could be a span value or an object containing above props + * @type { span: ColSpanType, offset: ColSpanType } | ColSpanType + */ + lg?: { span: ColSpanType; offset?: ColSpanType } | ColSpanType; + + /** + * ≥1200px, could be a span value or an object containing above props + * @type { span: ColSpanType, offset: ColSpanType } | ColSpanType + */ + xl?: { span: ColSpanType; offset?: ColSpanType } | ColSpanType; + + /** + * ≥1600px, could be a span value or an object containing above props + * @type { span: ColSpanType, offset: ColSpanType } | ColSpanType + */ + xxl?: { span: ColSpanType; offset?: ColSpanType } | ColSpanType; +} + +export type ComponentType = + | 'Input' + | 'InputGroup' + | 'InputPassword' + | 'InputSearch' + | 'InputTextArea' + | 'InputNumber' + | 'InputCountDown' + | 'Select' + | 'ApiSelect' + | 'TreeSelect' + | 'ApiTreeSelect' + | 'ApiRadioGroup' + | 'RadioButtonGroup' + | 'RadioGroup' + | 'Checkbox' + | 'CheckboxGroup' + | 'AutoComplete' + | 'Cascader' + | 'DatePicker' + | 'MonthPicker' + | 'RangePicker' + | 'WeekPicker' + | 'TimePicker' + | 'DatePickerInFilter' + | 'Switch' + | 'StrengthMeter' + | 'Upload' + | 'IconPicker' + | 'Render' + | 'Slider' + | 'Rate' + | 'Divider' + | 'JAreaLinkage' + | 'JSelectPosition' + | 'JSelectRole' + | 'JSelectUser' + | 'JImageUpload' + | 'JDictSelectTag' + | 'JSelectDept' + | 'JAreaSelect' + | 'JEditor' + | 'JMarkdownEditor' + | 'JSelectInput' + | 'JCodeEditor' + | 'JCategorySelect' + | 'JSelectMultiple' + | 'JPopup' + | 'JPopupDict' + | 'JSwitch' + | 'JEasyCron' + | 'JTreeDict' + | 'JInputPop' + | 'JCheckbox' + | 'JInput' + | 'JTreeSelect' + | 'JEllipsis' + | 'JSelectUserByDept' + | 'JSelectUserByDepartment' + | 'JUpload' + | 'JSearchSelect' + | 'JAddInput' + | 'Time' + | 'OnlineSelectCascade' + | 'LinkTableCard' + | 'LinkTableSelect' + | 'LinkTableForQuery' + | 'CascaderPcaForQuery' + | 'CascaderPcaInFilter' + | 'UserSelect' + | 'RoleSelect' + | 'RangeDate' + | 'RangeNumber' + | 'linkRecordSelect' + | 'RangeTime' + | 'JRangeNumber' + | 'JLinkTableCard' + | 'JInputSelect'; + diff --git a/src/components/Form/src/utils/Area.ts b/src/components/Form/src/utils/Area.ts new file mode 100644 index 0000000..27a70cc --- /dev/null +++ b/src/components/Form/src/utils/Area.ts @@ -0,0 +1,113 @@ +import {pcaa as REGION_DATA} from "@/utils/areaData/pcaUtils"; + +/** + * Area 属性all的类型 + */ +interface PlainPca { + id: string; + text: string; + pid: string; + index: Number; +} + +/** + * 省市区工具类 -解决列表省市区组件的翻译问题 + */ +class Area { + all: PlainPca[]; + + /** + * 构造器 + * @param pcaa + */ + constructor(pcaa?) { + if (!pcaa) { + pcaa = REGION_DATA; + } + let arr: PlainPca[] = []; + const province = pcaa['86']; + Object.keys(province).map((key) => { + arr.push({ id: key, text: province[key], pid: '86', index: 1 }); + const city = pcaa[key]; + Object.keys(city).map((key2) => { + arr.push({ id: key2, text: city[key2], pid: key, index: 2 }); + const qu = pcaa[key2]; + if (qu) { + Object.keys(qu).map((key3) => { + arr.push({ id: key3, text: qu[key3], pid: key2, index: 3 }); + }); + } + }); + }); + this.all = arr; + } + + get pca() { + return this.all; + } + + getCode(text) { + if (!text || text.length == 0) { + return ''; + } + for (let item of this.all) { + if (item.text === text) { + return item.id; + } + } + } + +//update-begin-author:liusq---date:20230404--for: [issue/382]省市区组件JAreaLinkage数据不回显--- + getText(code,index=3) { + if (!code || code.length == 0) { + return ''; + } + let arr = []; + this.getAreaBycode(code, arr, index); + return arr.join('/'); + } +//update-end-author:liusq---date:20230404--for: [issue/382]省市区组件JAreaLinkage数据不回显--- + + getRealCode(code) { + let arr = []; + this.getPcode(code, arr, 3); + return arr; + } + + getPcode(id, arr, index) { + for (let item of this.all) { + if (item.id === id && item.index == index) { + arr.unshift(id); + if (item.pid != '86') { + this.getPcode(item.pid, arr, --index); + } + } + } + } + + getAreaBycode(code, arr, index) { + for (let item of this.all) { + if (item.id === code && item.index == index) { + arr.unshift(item.text); + if (item.pid != '86') { + this.getAreaBycode(item.pid, arr, --index); + } + } + } + } +} +const jeecgAreaData = new Area(); + +// 根据code找文本 +const getAreaTextByCode = function (code) { + let index = 3; + //update-begin-author:liusq---date:20220531--for: 判断code是否是多code逗号分割的字符串,是的话,获取最后一位的code --- + if (code && code.includes(',')) { + index = code.split(",").length; + code = code.substr(code.lastIndexOf(',') + 1); + } + //update-end-author:liusq---date:20220531--for: 判断code是否是多code逗号分割的字符串,是的话,获取最后一位的code --- + return jeecgAreaData.getText(code,index); +}; + +export { getAreaTextByCode }; diff --git a/src/components/Form/src/utils/GroupRequest.ts b/src/components/Form/src/utils/GroupRequest.ts new file mode 100644 index 0000000..ce813df --- /dev/null +++ b/src/components/Form/src/utils/GroupRequest.ts @@ -0,0 +1,27 @@ +import { getAuthCache, setAuthCache } from '/@/utils/auth'; +/** + * 将一个请求分组 + * + * @param getPromise 传入一个可以获取到Promise对象的方法 + * @param groupId 分组ID,如果不传或者为空则不分组 + * @param expire 过期时间,默认 半分钟 + */ +export function httpGroupRequest(getPromise, groupId, expire = 1000 * 30) { + if (groupId == null || groupId === '') { + console.log('--------popup----------getFrom DB-------with---no--groupId '); + return getPromise(); + } + + if (getAuthCache(groupId)) { + console.log('---------popup--------getFrom Cache--------groupId = ' + groupId); + return Promise.resolve(getAuthCache(groupId)); + } else { + console.log('--------popup----------getFrom DB---------groupId = ' + groupId); + } + + // 还没有发出请求,就发出第一次的请求 + return getPromise().then((res) => { + setAuthCache(groupId, res); + return Promise.resolve(res); + }); +} diff --git a/src/components/Form/src/utils/areaDataUtil.js b/src/components/Form/src/utils/areaDataUtil.js new file mode 100644 index 0000000..df96a73 --- /dev/null +++ b/src/components/Form/src/utils/areaDataUtil.js @@ -0,0 +1,193 @@ +import {pcaa as REGION_DATA} from "@/utils/areaData/pcaUtils"; +import { cloneDeep } from 'lodash-es'; + +// code转汉字大对象 +const CodeToText = {}; +// 汉字转code大对象 +const TextToCode = {}; +const provinceObject = REGION_DATA['86']; // 省份对象 +const regionData = []; +let provinceAndCityData = []; + +CodeToText[''] = '全部'; + +// 计算省 +for (const prop in provinceObject) { + regionData.push({ + value: prop, // 省份code值 + label: provinceObject[prop], // 省份汉字 + }); + CodeToText[prop] = provinceObject[prop]; + TextToCode[provinceObject[prop]] = { + code: prop, + }; + TextToCode[provinceObject[prop]]['全部'] = { + code: '', + }; +} +// 计算市 +for (let i = 0, len = regionData.length; i < len; i++) { + const provinceCode = regionData[i].value; + const provinceText = regionData[i].label; + const provinceChildren = []; + for (const prop in REGION_DATA[provinceCode]) { + provinceChildren.push({ + value: prop, + label: REGION_DATA[provinceCode][prop], + }); + CodeToText[prop] = REGION_DATA[provinceCode][prop]; + TextToCode[provinceText][REGION_DATA[provinceCode][prop]] = { + code: prop, + }; + TextToCode[provinceText][REGION_DATA[provinceCode][prop]]['全部'] = { + code: '', + }; + } + if (provinceChildren.length) { + regionData[i].children = provinceChildren; + } +} +provinceAndCityData = cloneDeep(regionData); + +// 计算区 +for (let i = 0, len = regionData.length; i < len; i++) { + const province = regionData[i].children; + const provinceText = regionData[i].label; + if (province) { + for (let j = 0, len = province.length; j < len; j++) { + const cityCode = province[j].value; + const cityText = province[j].label; + const cityChildren = []; + for (const prop in REGION_DATA[cityCode]) { + cityChildren.push({ + value: prop, + label: REGION_DATA[cityCode][prop], + }); + CodeToText[prop] = REGION_DATA[cityCode][prop]; + TextToCode[provinceText][cityText][REGION_DATA[cityCode][prop]] = { + code: prop, + }; + } + if (cityChildren.length) { + province[j].children = cityChildren; + } + } + } +} + +// 添加“全部”选项 +const provinceAndCityDataPlus = cloneDeep(provinceAndCityData); +provinceAndCityDataPlus.unshift({ + value: '', + label: '全部', +}); +for (let i = 0, len = provinceAndCityDataPlus.length; i < len; i++) { + const province = provinceAndCityDataPlus[i].children; + if (province && province.length) { + province.unshift({ + value: '', + label: '全部', + }); + for (let j = 0, len = province.length; j < len; j++) { + const city = province[j].children; + if (city && city.length) { + city.unshift({ + value: '', + label: '全部', + }); + } + } + } +} + +const regionDataPlus = cloneDeep(regionData); +regionDataPlus.unshift({ + value: '', + label: '全部', +}); +for (let i = 0, len = regionDataPlus.length; i < len; i++) { + const province = regionDataPlus[i].children; + if (province && province.length) { + province.unshift({ + value: '', + label: '全部', + }); + + for (let j = 0, len = province.length; j < len; j++) { + const city = province[j].children; + if (city && city.length) { + city.unshift({ + value: '', + label: '全部', + }); + } + } + } +} +//--begin--@updateBy:liusq----date:20210922---for:省市区三级联动需求方法----- +//省份数据 +const provinceOptions = []; +for (const prop in provinceObject) { + provinceOptions.push({ + value: prop, // 省份code值 + label: provinceObject[prop], // 省份汉字 + }); +} +/** + * 根据code获取下拉option的数据 + * @param code + * @returns [] + */ +function getDataByCode(code) { + let data = []; + for (const prop in REGION_DATA[code]) { + data.push({ + value: prop, // 省份code值 + label: REGION_DATA[code][prop], // 省份汉字 + }); + } + return data; +} + +/** + * 获取全部省市区的层级 + * @type {Array} + */ +const pca = []; +Object.keys(provinceObject).map((province) => { + pca.push({ id: province, text: provinceObject[province], pid: '86', index: 1 }); + const cityObject = REGION_DATA[province]; + Object.keys(cityObject).map((city) => { + pca.push({ id: city, text: cityObject[city], pid: province, index: 2 }); + const areaObject = REGION_DATA[city]; + if (areaObject) { + Object.keys(areaObject).map((area) => { + pca.push({ id: area, text: areaObject[area], pid: city, index: 3 }); + }); + } + }); +}); + +/** + * 根据code反推value + * @param code + * @param level + * @returns {Array} + */ +function getRealCode(code, level) { + let arr = []; + getPcode(code, arr, level); + return arr; +} +function getPcode(id, arr, index) { + for (let item of pca) { + if (item.id === id && item.index == index) { + arr.unshift(id); + if (item.pid != '86') { + getPcode(item.pid, arr, --index); + } + } + } +} +//--end--@updateBy:liusq----date:20210922---for:省市区三级联动需求方法----- +export { provinceAndCityData, regionData, provinceAndCityDataPlus, regionDataPlus, getDataByCode, provinceOptions, getRealCode }; diff --git a/src/components/Form/src/utils/formUtils.ts b/src/components/Form/src/utils/formUtils.ts new file mode 100644 index 0000000..689cec0 --- /dev/null +++ b/src/components/Form/src/utils/formUtils.ts @@ -0,0 +1,75 @@ +import { unref } from 'vue'; +import { dateUtil } from '/@/utils/dateUtil'; + +/** + * 表单区间时间数值字段转换 + * @param props + * @param values + */ +export function handleRangeValue(props, values) { + //判断是否配置并处理fieldMapToTime + const fieldMapToTime = unref(props)?.fieldMapToTime; + fieldMapToTime && (values = handleRangeTimeValue(props, values)); + //判断是否配置并处理fieldMapToNumber + const fieldMapToNumber = unref(props)?.fieldMapToNumber; + fieldMapToNumber && (values = handleRangeNumberValue(props, values)); + return values; +} +/** + * 处理时间转换成2个字段 + * @param props + * @param values + */ +export function handleRangeTimeValue(props, values) { + const fieldMapToTime = unref(props).fieldMapToTime; + if (!fieldMapToTime || !Array.isArray(fieldMapToTime)) { + return values; + } + for (const [field, [startTimeKey, endTimeKey], format = 'YYYY-MM-DD'] of fieldMapToTime) { + if (!field || !startTimeKey || !endTimeKey || !values[field]) { + continue; + } + + // 【issues/I53G9Y】 日期区间组件有可能是字符串 + let timeValue = values[field]; + if (!Array.isArray(timeValue)) { + timeValue = timeValue.split(','); + } + const [startTime, endTime]: string[] = timeValue; + //update-begin---author:wangshuai---date:2024-10-08---for:【issues/7216】当RangePicker组件值允许开始/结束为空时,表单的fieldMapToTime处理异常--- + startTime && (values[startTimeKey] = dateUtil(startTime).format(format)); + endTime && (values[endTimeKey] = dateUtil(endTime).format(format)); + //update-end---author:wangshuai---date:2024-10-08---for:【issues/7216】当RangePicker组件值允许开始/结束为空时,表单的fieldMapToTime处理异常--- + Reflect.deleteProperty(values, field); + } + return values; +} +/** + * 处理数字转换成2个字段 + * @param props + * @param values + * @updateby liusq + * @updateDate:2021-09-16 + */ +export function handleRangeNumberValue(props, values) { + const fieldMapToNumber = unref(props).fieldMapToNumber; + if (!fieldMapToNumber || !Array.isArray(fieldMapToNumber)) { + return values; + } + for (const [field, [startNumberKey, endNumberKey]] of fieldMapToNumber) { + if (!field || !startNumberKey || !endNumberKey || !values[field]) { + continue; + } + //update-begin-author:taoyan date:2022-5-10 for: 用于数值的范围查询 数组格式的中间转换不知道哪里出了问题,这里会变成字符串,需要再强制转成数组 + let temp = values[field]; + if (typeof temp === 'string') { + temp = temp.split(','); + } + const [startNumber, endNumber]: number[] = temp; + //update-end-author:taoyan date:2022-5-10 for: 用于数值的范围查询 数组格式的中间转换不知道哪里出了问题,这里会变成字符串,需要再强制转成数组 + values[startNumberKey] = startNumber; + values[endNumberKey] = endNumber; + Reflect.deleteProperty(values, field); + } + return values; +} diff --git a/src/components/Icon/data/icons.data.ts b/src/components/Icon/data/icons.data.ts new file mode 100644 index 0000000..bcac58e --- /dev/null +++ b/src/components/Icon/data/icons.data.ts @@ -0,0 +1,791 @@ +export default [ + 'ant-design:account-book-filled', + 'ant-design:account-book-outlined', + 'ant-design:account-book-twotone', + 'ant-design:aim-outlined', + 'ant-design:alert-filled', + 'ant-design:alert-outlined', + 'ant-design:alert-twotone', + 'ant-design:alibaba-outlined', + 'ant-design:align-center-outlined', + 'ant-design:align-left-outlined', + 'ant-design:align-right-outlined', + 'ant-design:alipay-circle-filled', + 'ant-design:alipay-circle-outlined', + 'ant-design:alipay-outlined', + 'ant-design:alipay-square-filled', + 'ant-design:aliwangwang-filled', + 'ant-design:aliwangwang-outlined', + 'ant-design:aliyun-outlined', + 'ant-design:amazon-circle-filled', + 'ant-design:amazon-outlined', + 'ant-design:amazon-square-filled', + 'ant-design:android-filled', + 'ant-design:android-outlined', + 'ant-design:ant-cloud-outlined', + 'ant-design:ant-design-outlined', + 'ant-design:apartment-outlined', + 'ant-design:api-filled', + 'ant-design:api-outlined', + 'ant-design:api-twotone', + 'ant-design:apple-filled', + 'ant-design:apple-outlined', + 'ant-design:appstore-add-outlined', + 'ant-design:appstore-filled', + 'ant-design:appstore-outlined', + 'ant-design:appstore-twotone', + 'ant-design:area-chart-outlined', + 'ant-design:arrow-down-outlined', + 'ant-design:arrow-left-outlined', + 'ant-design:arrow-right-outlined', + 'ant-design:arrow-up-outlined', + 'ant-design:arrows-alt-outlined', + 'ant-design:audio-filled', + 'ant-design:audio-muted-outlined', + 'ant-design:audio-outlined', + 'ant-design:audio-twotone', + 'ant-design:audit-outlined', + 'ant-design:backward-filled', + 'ant-design:backward-outlined', + 'ant-design:bank-filled', + 'ant-design:bank-outlined', + 'ant-design:bank-twotone', + 'ant-design:bar-chart-outlined', + 'ant-design:barcode-outlined', + 'ant-design:bars-outlined', + 'ant-design:behance-circle-filled', + 'ant-design:behance-outlined', + 'ant-design:behance-square-filled', + 'ant-design:behance-square-outlined', + 'ant-design:bell-filled', + 'ant-design:bell-outlined', + 'ant-design:bell-twotone', + 'ant-design:bg-colors-outlined', + 'ant-design:block-outlined', + 'ant-design:bold-outlined', + 'ant-design:book-filled', + 'ant-design:book-outlined', + 'ant-design:book-twotone', + 'ant-design:border-bottom-outlined', + 'ant-design:border-horizontal-outlined', + 'ant-design:border-inner-outlined', + 'ant-design:border-left-outlined', + 'ant-design:border-outer-outlined', + 'ant-design:border-outlined', + 'ant-design:border-right-outlined', + 'ant-design:border-top-outlined', + 'ant-design:border-verticle-outlined', + 'ant-design:borderless-table-outlined', + 'ant-design:box-plot-filled', + 'ant-design:box-plot-outlined', + 'ant-design:box-plot-twotone', + 'ant-design:branches-outlined', + 'ant-design:bug-filled', + 'ant-design:bug-outlined', + 'ant-design:bug-twotone', + 'ant-design:build-filled', + 'ant-design:build-outlined', + 'ant-design:build-twotone', + 'ant-design:bulb-filled', + 'ant-design:bulb-outlined', + 'ant-design:bulb-twotone', + 'ant-design:calculator-filled', + 'ant-design:calculator-outlined', + 'ant-design:calculator-twotone', + 'ant-design:calendar-filled', + 'ant-design:calendar-outlined', + 'ant-design:calendar-twotone', + 'ant-design:camera-filled', + 'ant-design:camera-outlined', + 'ant-design:camera-twotone', + 'ant-design:car-filled', + 'ant-design:car-outlined', + 'ant-design:car-twotone', + 'ant-design:caret-down-filled', + 'ant-design:caret-down-outlined', + 'ant-design:caret-left-filled', + 'ant-design:caret-left-outlined', + 'ant-design:caret-right-filled', + 'ant-design:caret-right-outlined', + 'ant-design:caret-up-filled', + 'ant-design:caret-up-outlined', + 'ant-design:carry-out-filled', + 'ant-design:carry-out-outlined', + 'ant-design:carry-out-twotone', + 'ant-design:check-circle-filled', + 'ant-design:check-circle-outlined', + 'ant-design:check-circle-twotone', + 'ant-design:check-outlined', + 'ant-design:check-square-filled', + 'ant-design:check-square-outlined', + 'ant-design:check-square-twotone', + 'ant-design:chrome-filled', + 'ant-design:chrome-outlined', + 'ant-design:ci-circle-filled', + 'ant-design:ci-circle-outlined', + 'ant-design:ci-circle-twotone', + 'ant-design:ci-outlined', + 'ant-design:ci-twotone', + 'ant-design:clear-outlined', + 'ant-design:clock-circle-filled', + 'ant-design:clock-circle-outlined', + 'ant-design:clock-circle-twotone', + 'ant-design:close-circle-filled', + 'ant-design:close-circle-outlined', + 'ant-design:close-circle-twotone', + 'ant-design:close-outlined', + 'ant-design:close-square-filled', + 'ant-design:close-square-outlined', + 'ant-design:close-square-twotone', + 'ant-design:cloud-download-outlined', + 'ant-design:cloud-filled', + 'ant-design:cloud-outlined', + 'ant-design:cloud-server-outlined', + 'ant-design:cloud-sync-outlined', + 'ant-design:cloud-twotone', + 'ant-design:cloud-upload-outlined', + 'ant-design:cluster-outlined', + 'ant-design:code-filled', + 'ant-design:code-outlined', + 'ant-design:code-sandbox-circle-filled', + 'ant-design:code-sandbox-outlined', + 'ant-design:code-sandbox-square-filled', + 'ant-design:code-twotone', + 'ant-design:codepen-circle-filled', + 'ant-design:codepen-circle-outlined', + 'ant-design:codepen-outlined', + 'ant-design:codepen-square-filled', + 'ant-design:coffee-outlined', + 'ant-design:column-height-outlined', + 'ant-design:column-width-outlined', + 'ant-design:comment-outlined', + 'ant-design:compass-filled', + 'ant-design:compass-outlined', + 'ant-design:compass-twotone', + 'ant-design:compress-outlined', + 'ant-design:console-sql-outlined', + 'ant-design:contacts-filled', + 'ant-design:contacts-outlined', + 'ant-design:contacts-twotone', + 'ant-design:container-filled', + 'ant-design:container-outlined', + 'ant-design:container-twotone', + 'ant-design:control-filled', + 'ant-design:control-outlined', + 'ant-design:control-twotone', + 'ant-design:copy-filled', + 'ant-design:copy-outlined', + 'ant-design:copy-twotone', + 'ant-design:copyright-circle-filled', + 'ant-design:copyright-circle-outlined', + 'ant-design:copyright-circle-twotone', + 'ant-design:copyright-outlined', + 'ant-design:copyright-twotone', + 'ant-design:credit-card-filled', + 'ant-design:credit-card-outlined', + 'ant-design:credit-card-twotone', + 'ant-design:crown-filled', + 'ant-design:crown-outlined', + 'ant-design:crown-twotone', + 'ant-design:customer-service-filled', + 'ant-design:customer-service-outlined', + 'ant-design:customer-service-twotone', + 'ant-design:dash-outlined', + 'ant-design:dashboard-filled', + 'ant-design:dashboard-outlined', + 'ant-design:dashboard-twotone', + 'ant-design:database-filled', + 'ant-design:database-outlined', + 'ant-design:database-twotone', + 'ant-design:delete-column-outlined', + 'ant-design:delete-filled', + 'ant-design:delete-outlined', + 'ant-design:delete-row-outlined', + 'ant-design:delete-twotone', + 'ant-design:delivered-procedure-outlined', + 'ant-design:deployment-unit-outlined', + 'ant-design:desktop-outlined', + 'ant-design:diff-filled', + 'ant-design:diff-outlined', + 'ant-design:diff-twotone', + 'ant-design:dingding-outlined', + 'ant-design:dingtalk-circle-filled', + 'ant-design:dingtalk-outlined', + 'ant-design:dingtalk-square-filled', + 'ant-design:disconnect-outlined', + 'ant-design:dislike-filled', + 'ant-design:dislike-outlined', + 'ant-design:dislike-twotone', + 'ant-design:dollar-circle-filled', + 'ant-design:dollar-circle-outlined', + 'ant-design:dollar-circle-twotone', + 'ant-design:dollar-outlined', + 'ant-design:dollar-twotone', + 'ant-design:dot-chart-outlined', + 'ant-design:double-left-outlined', + 'ant-design:double-right-outlined', + 'ant-design:down-circle-filled', + 'ant-design:down-circle-outlined', + 'ant-design:down-circle-twotone', + 'ant-design:down-outlined', + 'ant-design:down-square-filled', + 'ant-design:down-square-outlined', + 'ant-design:down-square-twotone', + 'ant-design:download-outlined', + 'ant-design:drag-outlined', + 'ant-design:dribbble-circle-filled', + 'ant-design:dribbble-outlined', + 'ant-design:dribbble-square-filled', + 'ant-design:dribbble-square-outlined', + 'ant-design:dropbox-circle-filled', + 'ant-design:dropbox-outlined', + 'ant-design:dropbox-square-filled', + 'ant-design:edit-filled', + 'ant-design:edit-outlined', + 'ant-design:edit-twotone', + 'ant-design:ellipsis-outlined', + 'ant-design:enter-outlined', + 'ant-design:environment-filled', + 'ant-design:environment-outlined', + 'ant-design:environment-twotone', + 'ant-design:euro-circle-filled', + 'ant-design:euro-circle-outlined', + 'ant-design:euro-circle-twotone', + 'ant-design:euro-outlined', + 'ant-design:euro-twotone', + 'ant-design:exception-outlined', + 'ant-design:exclamation-circle-filled', + 'ant-design:exclamation-circle-outlined', + 'ant-design:exclamation-circle-twotone', + 'ant-design:exclamation-outlined', + 'ant-design:expand-alt-outlined', + 'ant-design:expand-outlined', + 'ant-design:experiment-filled', + 'ant-design:experiment-outlined', + 'ant-design:experiment-twotone', + 'ant-design:export-outlined', + 'ant-design:eye-filled', + 'ant-design:eye-invisible-filled', + 'ant-design:eye-invisible-outlined', + 'ant-design:eye-invisible-twotone', + 'ant-design:eye-outlined', + 'ant-design:eye-twotone', + 'ant-design:facebook-filled', + 'ant-design:facebook-outlined', + 'ant-design:fall-outlined', + 'ant-design:fast-backward-filled', + 'ant-design:fast-backward-outlined', + 'ant-design:fast-forward-filled', + 'ant-design:fast-forward-outlined', + 'ant-design:field-binary-outlined', + 'ant-design:field-number-outlined', + 'ant-design:field-string-outlined', + 'ant-design:field-time-outlined', + 'ant-design:file-add-filled', + 'ant-design:file-add-outlined', + 'ant-design:file-add-twotone', + 'ant-design:file-done-outlined', + 'ant-design:file-excel-filled', + 'ant-design:file-excel-outlined', + 'ant-design:file-excel-twotone', + 'ant-design:file-exclamation-filled', + 'ant-design:file-exclamation-outlined', + 'ant-design:file-exclamation-twotone', + 'ant-design:file-filled', + 'ant-design:file-gif-outlined', + 'ant-design:file-image-filled', + 'ant-design:file-image-outlined', + 'ant-design:file-image-twotone', + 'ant-design:file-jpg-outlined', + 'ant-design:file-markdown-filled', + 'ant-design:file-markdown-outlined', + 'ant-design:file-markdown-twotone', + 'ant-design:file-outlined', + 'ant-design:file-pdf-filled', + 'ant-design:file-pdf-outlined', + 'ant-design:file-pdf-twotone', + 'ant-design:file-ppt-filled', + 'ant-design:file-ppt-outlined', + 'ant-design:file-ppt-twotone', + 'ant-design:file-protect-outlined', + 'ant-design:file-search-outlined', + 'ant-design:file-sync-outlined', + 'ant-design:file-text-filled', + 'ant-design:file-text-outlined', + 'ant-design:file-text-twotone', + 'ant-design:file-twotone', + 'ant-design:file-unknown-filled', + 'ant-design:file-unknown-outlined', + 'ant-design:file-unknown-twotone', + 'ant-design:file-word-filled', + 'ant-design:file-word-outlined', + 'ant-design:file-word-twotone', + 'ant-design:file-zip-filled', + 'ant-design:file-zip-outlined', + 'ant-design:file-zip-twotone', + 'ant-design:filter-filled', + 'ant-design:filter-outlined', + 'ant-design:filter-twotone', + 'ant-design:fire-filled', + 'ant-design:fire-outlined', + 'ant-design:fire-twotone', + 'ant-design:flag-filled', + 'ant-design:flag-outlined', + 'ant-design:flag-twotone', + 'ant-design:folder-add-filled', + 'ant-design:folder-add-outlined', + 'ant-design:folder-add-twotone', + 'ant-design:folder-filled', + 'ant-design:folder-open-filled', + 'ant-design:folder-open-outlined', + 'ant-design:folder-open-twotone', + 'ant-design:folder-outlined', + 'ant-design:folder-twotone', + 'ant-design:folder-view-outlined', + 'ant-design:font-colors-outlined', + 'ant-design:font-size-outlined', + 'ant-design:fork-outlined', + 'ant-design:form-outlined', + 'ant-design:format-painter-filled', + 'ant-design:format-painter-outlined', + 'ant-design:forward-filled', + 'ant-design:forward-outlined', + 'ant-design:frown-filled', + 'ant-design:frown-outlined', + 'ant-design:frown-twotone', + 'ant-design:fullscreen-exit-outlined', + 'ant-design:fullscreen-outlined', + 'ant-design:function-outlined', + 'ant-design:fund-filled', + 'ant-design:fund-outlined', + 'ant-design:fund-projection-screen-outlined', + 'ant-design:fund-twotone', + 'ant-design:fund-view-outlined', + 'ant-design:funnel-plot-filled', + 'ant-design:funnel-plot-outlined', + 'ant-design:funnel-plot-twotone', + 'ant-design:gateway-outlined', + 'ant-design:gif-outlined', + 'ant-design:gift-filled', + 'ant-design:gift-outlined', + 'ant-design:gift-twotone', + 'ant-design:github-filled', + 'ant-design:github-outlined', + 'ant-design:gitlab-filled', + 'ant-design:gitlab-outlined', + 'ant-design:global-outlined', + 'ant-design:gold-filled', + 'ant-design:gold-outlined', + 'ant-design:gold-twotone', + 'ant-design:golden-filled', + 'ant-design:google-circle-filled', + 'ant-design:google-outlined', + 'ant-design:google-plus-circle-filled', + 'ant-design:google-plus-outlined', + 'ant-design:google-plus-square-filled', + 'ant-design:google-square-filled', + 'ant-design:group-outlined', + 'ant-design:hdd-filled', + 'ant-design:hdd-outlined', + 'ant-design:hdd-twotone', + 'ant-design:heart-filled', + 'ant-design:heart-outlined', + 'ant-design:heart-twotone', + 'ant-design:heat-map-outlined', + 'ant-design:highlight-filled', + 'ant-design:highlight-outlined', + 'ant-design:highlight-twotone', + 'ant-design:history-outlined', + 'ant-design:holder-outlined', + 'ant-design:home-filled', + 'ant-design:home-outlined', + 'ant-design:home-twotone', + 'ant-design:hourglass-filled', + 'ant-design:hourglass-outlined', + 'ant-design:hourglass-twotone', + 'ant-design:html5-filled', + 'ant-design:html5-outlined', + 'ant-design:html5-twotone', + 'ant-design:idcard-filled', + 'ant-design:idcard-outlined', + 'ant-design:idcard-twotone', + 'ant-design:ie-circle-filled', + 'ant-design:ie-outlined', + 'ant-design:ie-square-filled', + 'ant-design:import-outlined', + 'ant-design:inbox-outlined', + 'ant-design:info-circle-filled', + 'ant-design:info-circle-outlined', + 'ant-design:info-circle-twotone', + 'ant-design:info-outlined', + 'ant-design:insert-row-above-outlined', + 'ant-design:insert-row-below-outlined', + 'ant-design:insert-row-left-outlined', + 'ant-design:insert-row-right-outlined', + 'ant-design:instagram-filled', + 'ant-design:instagram-outlined', + 'ant-design:insurance-filled', + 'ant-design:insurance-outlined', + 'ant-design:insurance-twotone', + 'ant-design:interaction-filled', + 'ant-design:interaction-outlined', + 'ant-design:interaction-twotone', + 'ant-design:issues-close-outlined', + 'ant-design:italic-outlined', + 'ant-design:key-outlined', + 'ant-design:laptop-outlined', + 'ant-design:layout-filled', + 'ant-design:layout-outlined', + 'ant-design:layout-twotone', + 'ant-design:left-circle-filled', + 'ant-design:left-circle-outlined', + 'ant-design:left-circle-twotone', + 'ant-design:left-outlined', + 'ant-design:left-square-filled', + 'ant-design:left-square-outlined', + 'ant-design:left-square-twotone', + 'ant-design:like-filled', + 'ant-design:like-outlined', + 'ant-design:like-twotone', + 'ant-design:line-chart-outlined', + 'ant-design:line-height-outlined', + 'ant-design:line-outlined', + 'ant-design:link-outlined', + 'ant-design:linkedin-filled', + 'ant-design:linkedin-outlined', + 'ant-design:loading-3-quarters-outlined', + 'ant-design:loading-outlined', + 'ant-design:lock-filled', + 'ant-design:lock-outlined', + 'ant-design:lock-twotone', + 'ant-design:login-outlined', + 'ant-design:logout-outlined', + 'ant-design:mac-command-filled', + 'ant-design:mac-command-outlined', + 'ant-design:mail-filled', + 'ant-design:mail-outlined', + 'ant-design:mail-twotone', + 'ant-design:man-outlined', + 'ant-design:medicine-box-filled', + 'ant-design:medicine-box-outlined', + 'ant-design:medicine-box-twotone', + 'ant-design:medium-circle-filled', + 'ant-design:medium-outlined', + 'ant-design:medium-square-filled', + 'ant-design:medium-workmark-outlined', + 'ant-design:meh-filled', + 'ant-design:meh-outlined', + 'ant-design:meh-twotone', + 'ant-design:menu-fold-outlined', + 'ant-design:menu-outlined', + 'ant-design:menu-unfold-outlined', + 'ant-design:merge-cells-outlined', + 'ant-design:message-filled', + 'ant-design:message-outlined', + 'ant-design:message-twotone', + 'ant-design:minus-circle-filled', + 'ant-design:minus-circle-outlined', + 'ant-design:minus-circle-twotone', + 'ant-design:minus-outlined', + 'ant-design:minus-square-filled', + 'ant-design:minus-square-outlined', + 'ant-design:minus-square-twotone', + 'ant-design:mobile-filled', + 'ant-design:mobile-outlined', + 'ant-design:mobile-twotone', + 'ant-design:money-collect-filled', + 'ant-design:money-collect-outlined', + 'ant-design:money-collect-twotone', + 'ant-design:monitor-outlined', + 'ant-design:more-outlined', + 'ant-design:node-collapse-outlined', + 'ant-design:node-expand-outlined', + 'ant-design:node-index-outlined', + 'ant-design:notification-filled', + 'ant-design:notification-outlined', + 'ant-design:notification-twotone', + 'ant-design:number-outlined', + 'ant-design:one-to-one-outlined', + 'ant-design:ordered-list-outlined', + 'ant-design:paper-clip-outlined', + 'ant-design:partition-outlined', + 'ant-design:pause-circle-filled', + 'ant-design:pause-circle-outlined', + 'ant-design:pause-circle-twotone', + 'ant-design:pause-outlined', + 'ant-design:pay-circle-filled', + 'ant-design:pay-circle-outlined', + 'ant-design:percentage-outlined', + 'ant-design:phone-filled', + 'ant-design:phone-outlined', + 'ant-design:phone-twotone', + 'ant-design:pic-center-outlined', + 'ant-design:pic-left-outlined', + 'ant-design:pic-right-outlined', + 'ant-design:picture-filled', + 'ant-design:picture-outlined', + 'ant-design:picture-twotone', + 'ant-design:pie-chart-filled', + 'ant-design:pie-chart-outlined', + 'ant-design:pie-chart-twotone', + 'ant-design:play-circle-filled', + 'ant-design:play-circle-outlined', + 'ant-design:play-circle-twotone', + 'ant-design:play-square-filled', + 'ant-design:play-square-outlined', + 'ant-design:play-square-twotone', + 'ant-design:plus-circle-filled', + 'ant-design:plus-circle-outlined', + 'ant-design:plus-circle-twotone', + 'ant-design:plus-outlined', + 'ant-design:plus-square-filled', + 'ant-design:plus-square-outlined', + 'ant-design:plus-square-twotone', + 'ant-design:pound-circle-filled', + 'ant-design:pound-circle-outlined', + 'ant-design:pound-circle-twotone', + 'ant-design:pound-outlined', + 'ant-design:poweroff-outlined', + 'ant-design:printer-filled', + 'ant-design:printer-outlined', + 'ant-design:printer-twotone', + 'ant-design:profile-filled', + 'ant-design:profile-outlined', + 'ant-design:profile-twotone', + 'ant-design:project-filled', + 'ant-design:project-outlined', + 'ant-design:project-twotone', + 'ant-design:property-safety-filled', + 'ant-design:property-safety-outlined', + 'ant-design:property-safety-twotone', + 'ant-design:pull-request-outlined', + 'ant-design:pushpin-filled', + 'ant-design:pushpin-outlined', + 'ant-design:pushpin-twotone', + 'ant-design:qq-circle-filled', + 'ant-design:qq-outlined', + 'ant-design:qq-square-filled', + 'ant-design:qrcode-outlined', + 'ant-design:question-circle-filled', + 'ant-design:question-circle-outlined', + 'ant-design:question-circle-twotone', + 'ant-design:question-outlined', + 'ant-design:radar-chart-outlined', + 'ant-design:radius-bottomleft-outlined', + 'ant-design:radius-bottomright-outlined', + 'ant-design:radius-setting-outlined', + 'ant-design:radius-upleft-outlined', + 'ant-design:radius-upright-outlined', + 'ant-design:read-filled', + 'ant-design:read-outlined', + 'ant-design:reconciliation-filled', + 'ant-design:reconciliation-outlined', + 'ant-design:reconciliation-twotone', + 'ant-design:red-envelope-filled', + 'ant-design:red-envelope-outlined', + 'ant-design:red-envelope-twotone', + 'ant-design:reddit-circle-filled', + 'ant-design:reddit-outlined', + 'ant-design:reddit-square-filled', + 'ant-design:redo-outlined', + 'ant-design:reload-outlined', + 'ant-design:rest-filled', + 'ant-design:rest-outlined', + 'ant-design:rest-twotone', + 'ant-design:retweet-outlined', + 'ant-design:right-circle-filled', + 'ant-design:right-circle-outlined', + 'ant-design:right-circle-twotone', + 'ant-design:right-outlined', + 'ant-design:right-square-filled', + 'ant-design:right-square-outlined', + 'ant-design:right-square-twotone', + 'ant-design:rise-outlined', + 'ant-design:robot-filled', + 'ant-design:robot-outlined', + 'ant-design:rocket-filled', + 'ant-design:rocket-outlined', + 'ant-design:rocket-twotone', + 'ant-design:rollback-outlined', + 'ant-design:rotate-left-outlined', + 'ant-design:rotate-right-outlined', + 'ant-design:safety-certificate-filled', + 'ant-design:safety-certificate-outlined', + 'ant-design:safety-certificate-twotone', + 'ant-design:safety-outlined', + 'ant-design:save-filled', + 'ant-design:save-outlined', + 'ant-design:save-twotone', + 'ant-design:scan-outlined', + 'ant-design:schedule-filled', + 'ant-design:schedule-outlined', + 'ant-design:schedule-twotone', + 'ant-design:scissor-outlined', + 'ant-design:search-outlined', + 'ant-design:security-scan-filled', + 'ant-design:security-scan-outlined', + 'ant-design:security-scan-twotone', + 'ant-design:select-outlined', + 'ant-design:send-outlined', + 'ant-design:setting-filled', + 'ant-design:setting-outlined', + 'ant-design:setting-twotone', + 'ant-design:shake-outlined', + 'ant-design:share-alt-outlined', + 'ant-design:shop-filled', + 'ant-design:shop-outlined', + 'ant-design:shop-twotone', + 'ant-design:shopping-cart-outlined', + 'ant-design:shopping-filled', + 'ant-design:shopping-outlined', + 'ant-design:shopping-twotone', + 'ant-design:shrink-outlined', + 'ant-design:signal-filled', + 'ant-design:sisternode-outlined', + 'ant-design:sketch-circle-filled', + 'ant-design:sketch-outlined', + 'ant-design:sketch-square-filled', + 'ant-design:skin-filled', + 'ant-design:skin-outlined', + 'ant-design:skin-twotone', + 'ant-design:skype-filled', + 'ant-design:skype-outlined', + 'ant-design:slack-circle-filled', + 'ant-design:slack-outlined', + 'ant-design:slack-square-filled', + 'ant-design:slack-square-outlined', + 'ant-design:sliders-filled', + 'ant-design:sliders-outlined', + 'ant-design:sliders-twotone', + 'ant-design:small-dash-outlined', + 'ant-design:smile-filled', + 'ant-design:smile-outlined', + 'ant-design:smile-twotone', + 'ant-design:snippets-filled', + 'ant-design:snippets-outlined', + 'ant-design:snippets-twotone', + 'ant-design:solution-outlined', + 'ant-design:sort-ascending-outlined', + 'ant-design:sort-descending-outlined', + 'ant-design:sound-filled', + 'ant-design:sound-outlined', + 'ant-design:sound-twotone', + 'ant-design:split-cells-outlined', + 'ant-design:star-filled', + 'ant-design:star-outlined', + 'ant-design:star-twotone', + 'ant-design:step-backward-filled', + 'ant-design:step-backward-outlined', + 'ant-design:step-forward-filled', + 'ant-design:step-forward-outlined', + 'ant-design:stock-outlined', + 'ant-design:stop-filled', + 'ant-design:stop-outlined', + 'ant-design:stop-twotone', + 'ant-design:strikethrough-outlined', + 'ant-design:subnode-outlined', + 'ant-design:swap-left-outlined', + 'ant-design:swap-outlined', + 'ant-design:swap-right-outlined', + 'ant-design:switcher-filled', + 'ant-design:switcher-outlined', + 'ant-design:switcher-twotone', + 'ant-design:sync-outlined', + 'ant-design:table-outlined', + 'ant-design:tablet-filled', + 'ant-design:tablet-outlined', + 'ant-design:tablet-twotone', + 'ant-design:tag-filled', + 'ant-design:tag-outlined', + 'ant-design:tag-twotone', + 'ant-design:tags-filled', + 'ant-design:tags-outlined', + 'ant-design:tags-twotone', + 'ant-design:taobao-circle-filled', + 'ant-design:taobao-circle-outlined', + 'ant-design:taobao-outlined', + 'ant-design:taobao-square-filled', + 'ant-design:team-outlined', + 'ant-design:thunderbolt-filled', + 'ant-design:thunderbolt-outlined', + 'ant-design:thunderbolt-twotone', + 'ant-design:to-top-outlined', + 'ant-design:tool-filled', + 'ant-design:tool-outlined', + 'ant-design:tool-twotone', + 'ant-design:trademark-circle-filled', + 'ant-design:trademark-circle-outlined', + 'ant-design:trademark-circle-twotone', + 'ant-design:trademark-outlined', + 'ant-design:transaction-outlined', + 'ant-design:translation-outlined', + 'ant-design:trophy-filled', + 'ant-design:trophy-outlined', + 'ant-design:trophy-twotone', + 'ant-design:twitter-circle-filled', + 'ant-design:twitter-outlined', + 'ant-design:twitter-square-filled', + 'ant-design:underline-outlined', + 'ant-design:undo-outlined', + 'ant-design:ungroup-outlined', + 'ant-design:unlock-filled', + 'ant-design:unlock-outlined', + 'ant-design:unlock-twotone', + 'ant-design:unordered-list-outlined', + 'ant-design:up-circle-filled', + 'ant-design:up-circle-outlined', + 'ant-design:up-circle-twotone', + 'ant-design:up-outlined', + 'ant-design:up-square-filled', + 'ant-design:up-square-outlined', + 'ant-design:up-square-twotone', + 'ant-design:upload-outlined', + 'ant-design:usb-filled', + 'ant-design:usb-outlined', + 'ant-design:usb-twotone', + 'ant-design:user-add-outlined', + 'ant-design:user-delete-outlined', + 'ant-design:user-outlined', + 'ant-design:user-switch-outlined', + 'ant-design:usergroup-add-outlined', + 'ant-design:usergroup-delete-outlined', + 'ant-design:verified-outlined', + 'ant-design:vertical-align-bottom-outlined', + 'ant-design:vertical-align-middle-outlined', + 'ant-design:vertical-align-top-outlined', + 'ant-design:vertical-left-outlined', + 'ant-design:vertical-right-outlined', + 'ant-design:video-camera-add-outlined', + 'ant-design:video-camera-filled', + 'ant-design:video-camera-outlined', + 'ant-design:video-camera-twotone', + 'ant-design:wallet-filled', + 'ant-design:wallet-outlined', + 'ant-design:wallet-twotone', + 'ant-design:warning-filled', + 'ant-design:warning-outlined', + 'ant-design:warning-twotone', + 'ant-design:wechat-filled', + 'ant-design:wechat-outlined', + 'ant-design:weibo-circle-filled', + 'ant-design:weibo-circle-outlined', + 'ant-design:weibo-outlined', + 'ant-design:weibo-square-filled', + 'ant-design:weibo-square-outlined', + 'ant-design:whats-app-outlined', + 'ant-design:wifi-outlined', + 'ant-design:windows-filled', + 'ant-design:windows-outlined', + 'ant-design:woman-outlined', + 'ant-design:yahoo-filled', + 'ant-design:yahoo-outlined', + 'ant-design:youtube-filled', + 'ant-design:youtube-outlined', + 'ant-design:yuque-filled', + 'ant-design:yuque-outlined', + 'ant-design:zhihu-circle-filled', + 'ant-design:zhihu-outlined', + 'ant-design:zhihu-square-filled', + 'ant-design:zoom-in-outlined', + 'ant-design:zoom-out-outlined', +]; diff --git a/src/components/Icon/index.ts b/src/components/Icon/index.ts new file mode 100644 index 0000000..01e7d23 --- /dev/null +++ b/src/components/Icon/index.ts @@ -0,0 +1,7 @@ +import Icon from './src/Icon.vue'; +import SvgIcon from './src/SvgIcon.vue'; +import IconPicker from './src/IconPicker.vue'; + +export { Icon, IconPicker, SvgIcon }; + +export default Icon; diff --git a/src/components/Icon/src/Icon.vue b/src/components/Icon/src/Icon.vue new file mode 100644 index 0000000..d6b1349 --- /dev/null +++ b/src/components/Icon/src/Icon.vue @@ -0,0 +1,101 @@ + + + diff --git a/src/components/Icon/src/IconList.vue b/src/components/Icon/src/IconList.vue new file mode 100644 index 0000000..6a37961 --- /dev/null +++ b/src/components/Icon/src/IconList.vue @@ -0,0 +1,197 @@ + + + + + diff --git a/src/components/Icon/src/IconPicker.vue b/src/components/Icon/src/IconPicker.vue new file mode 100644 index 0000000..290f6b2 --- /dev/null +++ b/src/components/Icon/src/IconPicker.vue @@ -0,0 +1,252 @@ + + + diff --git a/src/components/Icon/src/SvgIcon.vue b/src/components/Icon/src/SvgIcon.vue new file mode 100644 index 0000000..20bfcca --- /dev/null +++ b/src/components/Icon/src/SvgIcon.vue @@ -0,0 +1,61 @@ + + + diff --git a/src/components/InFilter/CascaderPcaInFilter.vue b/src/components/InFilter/CascaderPcaInFilter.vue new file mode 100644 index 0000000..a3786bd --- /dev/null +++ b/src/components/InFilter/CascaderPcaInFilter.vue @@ -0,0 +1,39 @@ + + + + + + + + diff --git a/src/components/InFilter/DatePickerInFilter.vue b/src/components/InFilter/DatePickerInFilter.vue new file mode 100644 index 0000000..6f74af7 --- /dev/null +++ b/src/components/InFilter/DatePickerInFilter.vue @@ -0,0 +1,142 @@ + + + + + + + + diff --git a/src/components/InFilter/index.ts b/src/components/InFilter/index.ts new file mode 100644 index 0000000..b37c83c --- /dev/null +++ b/src/components/InFilter/index.ts @@ -0,0 +1,2 @@ +export {default as DatePickerInFilter} from './DatePickerInFilter.vue'; +export {default as CascaderPcaInFilter} from './CascaderPcaInFilter.vue'; diff --git a/src/components/JDragNotice/JDragNotice.vue b/src/components/JDragNotice/JDragNotice.vue new file mode 100644 index 0000000..6b51315 --- /dev/null +++ b/src/components/JDragNotice/JDragNotice.vue @@ -0,0 +1,54 @@ + + + + + diff --git a/src/components/JVxeCustom/index.ts b/src/components/JVxeCustom/index.ts new file mode 100644 index 0000000..5625d0f --- /dev/null +++ b/src/components/JVxeCustom/index.ts @@ -0,0 +1,33 @@ +import { registerComponent, registerAsyncComponent, registerASyncComponentReal } from '/@/components/jeecg/JVxeTable'; +import { JVxeTypes } from '/@/components/jeecg/JVxeTable/types'; +import { DictSearchSpanCell, DictSearchInputCell } from './src/components/JVxeSelectDictSearchCell'; +import { createAsyncComponent } from '/@/utils/factory/createAsyncComponent'; +export async function registerJVxeCustom() { + // ----------------- ⚠ 注意事项 ⚠ ----------------- + // 当组件内包含 BasicModal 时,必须使用异步引入! + // 否则将会导致 i18n 失效! + // ----------------- ⚠ 注意事项 ⚠ ----------------- + + // 注册【Popup】(普通封装方式) + await registerAsyncComponent(JVxeTypes.popup, import('./src/components/JVxePopupCell.vue')); + + // 注册【字典搜索下拉】组件(高级封装方式) + registerComponent(JVxeTypes.selectDictSearch, DictSearchInputCell, DictSearchSpanCell); + + // 注册【文件上传】组件 + await registerAsyncComponent(JVxeTypes.file, import('./src/components/JVxeFileCell.vue')); + // 注册【图片上传】组件 + await registerAsyncComponent(JVxeTypes.image, import('./src/components/JVxeImageCell.vue')); + // 注册【用户选择】组件 + await registerAsyncComponent(JVxeTypes.userSelect, import('./src/components/JVxeUserSelectCell.vue')); + // 注册【部门选择】组件 + await registerAsyncComponent(JVxeTypes.departSelect, import('./src/components/JVxeDepartSelectCell.vue')); + // 注册【省市区选择】组件 + // await registerAsyncComponent(JVxeTypes.pca, import('./src/components/JVxePcaCell.vue')); + // update-begin--author:liaozhiyang---date:20240308---for:【QQYUN-8241】为避免首次加载china-area-data,JVxePcaCell组件需异步加载 + registerASyncComponentReal( + JVxeTypes.pca, + createAsyncComponent(() => import('./src/components/JVxePcaCell.vue')) + ); + // update-end--author:liaozhiyang---date:20240308---for:【QQYUN-8241】为避免首次加载china-area-data,JVxePcaCell组件需异步加载 +} diff --git a/src/components/JVxeCustom/src/components/JVxeDepartSelectCell.vue b/src/components/JVxeCustom/src/components/JVxeDepartSelectCell.vue new file mode 100644 index 0000000..0a23d59 --- /dev/null +++ b/src/components/JVxeCustom/src/components/JVxeDepartSelectCell.vue @@ -0,0 +1,216 @@ + + + + + diff --git a/src/components/JVxeCustom/src/components/JVxeFileCell.vue b/src/components/JVxeCustom/src/components/JVxeFileCell.vue new file mode 100644 index 0000000..6a65155 --- /dev/null +++ b/src/components/JVxeCustom/src/components/JVxeFileCell.vue @@ -0,0 +1,78 @@ + + + + + diff --git a/src/components/JVxeCustom/src/components/JVxeImageCell.vue b/src/components/JVxeCustom/src/components/JVxeImageCell.vue new file mode 100644 index 0000000..13a43e1 --- /dev/null +++ b/src/components/JVxeCustom/src/components/JVxeImageCell.vue @@ -0,0 +1,148 @@ + + + + diff --git a/src/components/JVxeCustom/src/components/JVxePcaCell.vue b/src/components/JVxeCustom/src/components/JVxePcaCell.vue new file mode 100644 index 0000000..b547892 --- /dev/null +++ b/src/components/JVxeCustom/src/components/JVxePcaCell.vue @@ -0,0 +1,77 @@ + + + + diff --git a/src/components/JVxeCustom/src/components/JVxePopupCell.vue b/src/components/JVxeCustom/src/components/JVxePopupCell.vue new file mode 100644 index 0000000..2e6f0ba --- /dev/null +++ b/src/components/JVxeCustom/src/components/JVxePopupCell.vue @@ -0,0 +1,75 @@ + + diff --git a/src/components/JVxeCustom/src/components/JVxeSelectDictSearchCell.ts b/src/components/JVxeCustom/src/components/JVxeSelectDictSearchCell.ts new file mode 100644 index 0000000..e03c395 --- /dev/null +++ b/src/components/JVxeCustom/src/components/JVxeSelectDictSearchCell.ts @@ -0,0 +1,288 @@ +import { computed, ref, watch, defineComponent, h } from 'vue'; +import { cloneDeep, debounce } from 'lodash-es'; +import { defHttp } from '/@/utils/http/axios'; +import { filterDictText } from '/@/utils/dict/JDictSelectUtil'; +import { ajaxGetDictItems, getDictItemsByCode } from '/@/utils/dict'; +import { JVxeComponent } from '/@/components/jeecg/JVxeTable/types'; +import { dispatchEvent } from '/@/components/jeecg/JVxeTable/utils'; +import { useResolveComponent as rc } from '/@/components/jeecg/JVxeTable/hooks'; +import { useJVxeComponent, useJVxeCompProps } from '/@/components/jeecg/JVxeTable/hooks'; +import { useMessage } from '/@/hooks/web/useMessage'; + +/** value - label map,防止重复查询(刷新清空缓存) */ +const LabelMap = new Map(); +// 请求id +let requestId = 0; + +/** 显示组件,自带翻译 */ +export const DictSearchSpanCell = defineComponent({ + name: 'JVxeSelectSearchSpanCell', + props: useJVxeCompProps(), + setup(props: JVxeComponent.Props) { + const { innerOptions, innerSelectValue, innerValue } = useSelectDictSearch(props); + return () => { + return h('span', {}, [filterDictText(innerOptions.value, innerSelectValue.value || innerValue.value)]); + }; + }, +}); + +// 输入选择组件 +export const DictSearchInputCell = defineComponent({ + name: 'JVxeSelectSearchInputCell', + props: useJVxeCompProps(), + setup(props: JVxeComponent.Props) { + const { createMessage } = useMessage(); + const { dict, loading, isAsync, options, innerOptions, originColumn, cellProps, innerSelectValue, handleChangeCommon } = + useSelectDictSearch(props); + const hasRequest = ref(false); + // 提示信息 + const tipsContent = computed(() => { + return originColumn.value.tipsContent || '请输入搜索内容'; + }); + // 筛选函数 + const filterOption = computed(() => { + if (isAsync.value) { + //【jeecgboot-vue3/issues/I5QRT8】JVxeTypes.selectDictSearch sync问题 + return ()=>true; + } + return (input, option) => option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0; + }); + + /** 加载数据 */ + const loadData = debounce((value) => { + const currentRequestId = ++requestId; + loading.value = true; + innerOptions.value = []; + if (value == null || value.trim() === '') { + loading.value = false; + hasRequest.value = false; + return; + } + // 字典code格式:table,text,code + hasRequest.value = true; + loadDictByKeyword(dict.value, value) + .then((res) => { + if (currentRequestId !== requestId) { + return; + } + let { success, result, message } = res; + if (success) { + innerOptions.value = result; + result.forEach((item) => { + LabelMap.set(item.value, [item]); + }); + } else { + createMessage.warning(message || '查询失败'); + } + }) + .finally(() => { + loading.value = false; + }); + }, 300); + + function handleChange(selectedValue) { + innerSelectValue.value = selectedValue; + handleChangeCommon(innerSelectValue.value); + } + + function handleSearch(value) { + if (isAsync.value) { + // 在输入时也应该开启加载,因为loadData加了消抖,所以会有800ms的用户主观上认为的卡顿时间 + loading.value = true; + if (innerOptions.value.length > 0) { + innerOptions.value = []; + } + loadData(value); + } + } + + function renderOptionItem() { + let optionItems: any[] = []; + options.value.forEach(({ value, text, label, title, disabled }) => { + optionItems.push( + h( + rc('a-select-option'), + { + key: value, + value: value, + disabled: disabled, + }, + { + default: () => text || label || title, + } + ) + ); + }); + return optionItems; + } + + return () => { + return h( + rc('a-select'), + { + ...cellProps.value, + value: innerSelectValue.value, + filterOption: filterOption.value, + showSearch: true, + allowClear: true, + autofocus: true, + defaultOpen: true, + style: 'width: 100%', + onSearch: handleSearch, + onChange: handleChange, + }, + { + default: () => renderOptionItem(), + notFoundContent: () => { + if (loading.value) { + return h(rc('a-spin'), { size: 'small' }); + } else if (hasRequest.value) { + return h('div', '没有查询到任何数据'); + } else { + return h('div', [tipsContent.value]); + } + }, + } + ); + }; + }, + // 【组件增强】注释详见:JVxeComponent.Enhanced + enhanced: { + aopEvents: { + editActived({ $event }) { + dispatchEvent({ + $event, + props: this.props, + className: '.ant-select .ant-select-selection-search-input', + isClick: false, + handler: (el) => el.focus(), + }); + }, + }, + } as JVxeComponent.EnhancedPartial, +}); + +function useSelectDictSearch(props) { + const setup = useJVxeComponent(props); + const { innerValue, originColumn } = setup; + + // 加载状态 + const loading = ref(false); + // 内部选择值 + const innerSelectValue = ref(null); + // 内部 options + const innerOptions = ref([]); + + const dict = computed(() => originColumn.value.dict); + // 是否是异步模式 + const isAsync = computed(() => { + let isAsync = originColumn.value.async; + return isAsync != null && isAsync !== '' ? !!isAsync : true; + }); + const options = computed(() => { + if (isAsync.value) { + return innerOptions.value; + } else { + return originColumn.value.options || []; + } + }); + + /** 公共属性监听 */ + watch( + innerValue, + (value: string) => { + if (value == null || value === '') { + innerSelectValue.value = null; + } else { + loadDataByValue(value); + } + }, + { immediate: true } + ); + watch(dict, () => loadDataByDict()); + + // 根据 value 查询数据,用于回显 + async function loadDataByValue(value) { + if (isAsync.value) { + if (innerSelectValue.value !== value) { + if (LabelMap.has(value)) { + innerOptions.value = cloneDeep(LabelMap.get(value)); + } else { + let result = await loadDictItem(dict.value, value); + if (result && result.length > 0) { + innerOptions.value = [{ value: value, text: result[0] }]; + LabelMap.set(value, cloneDeep(innerOptions.value)); + } + } + } + } + innerSelectValue.value = (value || '').toString(); + } + + // 初始化字典 + async function loadDataByDict() { + if (!isAsync.value) { + // 如果字典项集合有数据 + if (!originColumn.value.options || originColumn.value.options.length === 0) { + // 根据字典Code, 初始化字典数组 + let dictStr = ''; + if (dict.value) { + let arr = dict.value.split(','); + if (arr[0].indexOf('where') > 0) { + let tbInfo = arr[0].split('where'); + dictStr = tbInfo[0].trim() + ',' + arr[1] + ',' + arr[2] + ',' + encodeURIComponent(tbInfo[1]); + } else { + dictStr = dict.value; + } + if (dict.value.indexOf(',') === -1) { + //优先从缓存中读取字典配置 + let cache = getDictItemsByCode(dict.value); + if (cache) { + innerOptions.value = cache; + return; + } + } + let { success, result } = await ajaxGetDictItems(dictStr, null); + if (success) { + innerOptions.value = result; + } + } + } + } + } + + return { + ...setup, + loading, + innerOptions, + innerSelectValue, + dict, + isAsync, + options, + }; +} + +/** 获取字典项 */ +function loadDictItem(dict: string, key: string) { + return defHttp.get({ + url: `/sys/dict/loadDictItem/${dict}`, + params: { + key: key, + }, + }); +} + +/** 根据关键字获取字典项(搜索) */ +function loadDictByKeyword(dict: string, keyword: string) { + return defHttp.get( + { + url: `/sys/dict/loadDict/${dict}`, + params: { + keyword: keyword, + }, + }, + { + isTransformResponse: false, + } + ); +} diff --git a/src/components/JVxeCustom/src/components/JVxeUserSelectCell.vue b/src/components/JVxeCustom/src/components/JVxeUserSelectCell.vue new file mode 100644 index 0000000..6891370 --- /dev/null +++ b/src/components/JVxeCustom/src/components/JVxeUserSelectCell.vue @@ -0,0 +1,107 @@ + + + + + diff --git a/src/components/JVxeCustom/src/hooks/useFileCell.ts b/src/components/JVxeCustom/src/hooks/useFileCell.ts new file mode 100644 index 0000000..4a8bcc3 --- /dev/null +++ b/src/components/JVxeCustom/src/hooks/useFileCell.ts @@ -0,0 +1,102 @@ +import { computed } from 'vue'; +import { fileGetValue, fileSetValue, useJVxeUploadCell } from '/@/components/jeecg/JVxeTable/src/hooks/cells/useJVxeUploadCell'; +import { uploadUrl } from '/@/api/common/api'; +import { JUploadModal, UploadTypeEnum } from '/@/components/Form/src/jeecg/components/JUpload'; +import { useModal } from '/@/components/Modal'; +import { JVxeComponent } from '/@/components/jeecg/JVxeTable/src/types/JVxeComponent'; +import { Icon } from '/@/components/Icon'; +import { Dropdown } from 'ant-design-vue'; +import { LoadingOutlined } from '@ant-design/icons-vue'; + +export function useFileCell(props, fileType: UploadTypeEnum, options?) { + const setup = useJVxeUploadCell(props, { token: true, action: uploadUrl, ...options }); + + const { innerFile, handleChangeCommon, originColumn } = setup; + const [registerModel, { openModal }] = useModal(); + + // 截取文件名 + const ellipsisFileName = computed(() => { + let length = 5; + let file = innerFile.value; + if (!file || !file.name) { + return ''; + } + if (file.name.length > length) { + return file.name.substr(0, length) + '…'; + } + return file.name; + }); + + const modalValue = computed(() => { + if (innerFile.value) { + if (innerFile.value['url']) { + return innerFile.value['url']; + } else if (innerFile.value['path']) { + return innerFile.value['path']; + } + } + return ''; + }); + + const maxCount = computed(() => { + let maxCount = originColumn.value.maxCount; + // online 扩展JSON + if (originColumn.value && originColumn.value.fieldExtendJson) { + let json = JSON.parse(originColumn.value.fieldExtendJson); + maxCount = json.uploadnum ? json.uploadnum : 0; + } + return maxCount ?? 0; + }); + + // 点击更多按钮 + function handleMoreOperation() { + openModal(true, { + removeConfirm: true, + mover: true, + download: true, + ...originColumn.value.props, + maxCount: maxCount.value, + fileType: fileType, + }); + } + + // 更多上传回调 + function onModalChange(path) { + if (path) { + // update-begin--author:liaozhiyang---date:20240524---for:【TV360X-235】富文本禁用状态下图片上传按钮文字看不清 + if (innerFile.value === null) { + innerFile.value = {}; + } + // update-end-author:liaozhiyang---date:20240524---for:【TV360X-235】富文本禁用状态下图片上传按钮文字看不清 + innerFile.value.path = path; + handleChangeCommon(innerFile.value); + } else { + //update-begin-author:liusq date:2023-06-05 for: [issues/530]JVxeTable 的JVxeTypes.image类型,无法全部删除上传图片 + handleChangeCommon(null); + //update-end-author:liusq date:2023-06-05 for: [issues/530]JVxeTable 的JVxeTypes.image类型,无法全部删除上传图片 + } + } + + return { + ...setup, + modalValue, + maxCount, + ellipsisFileName, + registerModel, + onModalChange, + handleMoreOperation, + }; +} + +export const components = { + Icon, + Dropdown, + LoadingOutlined, + JUploadModal, +}; + +export const enhanced = { + switches: { visible: true }, + getValue: (value) => fileGetValue(value), + setValue: (value) => fileSetValue(value), +} as JVxeComponent.EnhancedPartial; diff --git a/src/components/Loading/index.ts b/src/components/Loading/index.ts new file mode 100644 index 0000000..3673a44 --- /dev/null +++ b/src/components/Loading/index.ts @@ -0,0 +1,5 @@ +import Loading from './src/Loading.vue'; + +export { Loading }; +export { useLoading } from './src/useLoading'; +export { createLoading } from './src/createLoading'; diff --git a/src/components/Loading/src/Loading.vue b/src/components/Loading/src/Loading.vue new file mode 100644 index 0000000..f626b18 --- /dev/null +++ b/src/components/Loading/src/Loading.vue @@ -0,0 +1,79 @@ + + + diff --git a/src/components/Loading/src/createLoading.ts b/src/components/Loading/src/createLoading.ts new file mode 100644 index 0000000..5efff7f --- /dev/null +++ b/src/components/Loading/src/createLoading.ts @@ -0,0 +1,65 @@ +import { VNode, defineComponent } from 'vue'; +import type { LoadingProps } from './typing'; + +import { createVNode, render, reactive, h } from 'vue'; +import Loading from './Loading.vue'; + +export function createLoading(props?: Partial, target?: HTMLElement, wait = false) { + let vm: Nullable = null; + const data = reactive({ + tip: '', + loading: true, + ...props, + }); + + const LoadingWrap = defineComponent({ + render() { + return h(Loading, { ...data }); + }, + }); + + vm = createVNode(LoadingWrap); + + if (wait) { + // TODO fix https://github.com/anncwb/vue-Jeecg-admin/issues/438 + setTimeout(() => { + render(vm, document.createElement('div')); + }, 0); + } else { + render(vm, document.createElement('div')); + } + + function close() { + if (vm?.el && vm.el.parentNode) { + vm.el.parentNode.removeChild(vm.el); + } + } + + function open(target: HTMLElement = document.body) { + if (!vm || !vm.el) { + return; + } + target.appendChild(vm.el as HTMLElement); + } + + if (target) { + open(target); + } + return { + vm, + close, + open, + setTip: (tip: string) => { + data.tip = tip; + }, + setLoading: (loading: boolean) => { + data.loading = loading; + }, + get loading() { + return data.loading; + }, + get $el() { + return vm?.el as HTMLElement; + }, + }; +} diff --git a/src/components/Loading/src/typing.ts b/src/components/Loading/src/typing.ts new file mode 100644 index 0000000..9af60e6 --- /dev/null +++ b/src/components/Loading/src/typing.ts @@ -0,0 +1,10 @@ +import { SizeEnum } from '/@/enums/sizeEnum'; + +export interface LoadingProps { + tip: string; + size: SizeEnum; + absolute: boolean; + loading: boolean; + background: string; + theme: 'dark' | 'light'; +} diff --git a/src/components/Loading/src/useLoading.ts b/src/components/Loading/src/useLoading.ts new file mode 100644 index 0000000..b5f1215 --- /dev/null +++ b/src/components/Loading/src/useLoading.ts @@ -0,0 +1,47 @@ +import { unref } from 'vue'; +import { createLoading } from './createLoading'; +import type { LoadingProps } from './typing'; +import type { Ref } from 'vue'; + +export interface UseLoadingOptions { + target?: any; + props?: Partial; +} + +interface Fn { + (): void; +} + +export function useLoading(props: Partial): [Fn, Fn, (string) => void]; +export function useLoading(opt: Partial): [Fn, Fn, (string) => void]; + +export function useLoading(opt: Partial | Partial): [Fn, Fn, (string) => void] { + let props: Partial; + let target: HTMLElement | Ref = document.body; + + if (Reflect.has(opt, 'target') || Reflect.has(opt, 'props')) { + const options = opt as Partial; + props = options.props || {}; + target = options.target || document.body; + } else { + props = opt as Partial; + } + + const instance = createLoading(props, undefined, true); + + const open = (): void => { + const t = unref(target as Ref); + if (!t) return; + instance.open(t); + }; + + const close = (): void => { + instance.close(); + }; + + const setTip = (tip: string) => { + instance.setTip(tip); + }; + + return [open, close, setTip]; +} diff --git a/src/components/Markdown/index.ts b/src/components/Markdown/index.ts new file mode 100644 index 0000000..d337681 --- /dev/null +++ b/src/components/Markdown/index.ts @@ -0,0 +1,7 @@ +import { withInstall } from '/@/utils'; +import markDown from './src/Markdown.vue'; +import markDownViewer from './src/MarkdownViewer.vue'; + +export const MarkDown = withInstall(markDown); +export const MarkdownViewer = withInstall(markDownViewer); +export * from './src/typing'; diff --git a/src/components/Markdown/src/Markdown.vue b/src/components/Markdown/src/Markdown.vue new file mode 100644 index 0000000..d6b6352 --- /dev/null +++ b/src/components/Markdown/src/Markdown.vue @@ -0,0 +1,259 @@ + + + diff --git a/src/components/Markdown/src/MarkdownViewer.vue b/src/components/Markdown/src/MarkdownViewer.vue new file mode 100644 index 0000000..7a25869 --- /dev/null +++ b/src/components/Markdown/src/MarkdownViewer.vue @@ -0,0 +1,130 @@ + + + + + diff --git a/src/components/Markdown/src/typing.ts b/src/components/Markdown/src/typing.ts new file mode 100644 index 0000000..b4bb465 --- /dev/null +++ b/src/components/Markdown/src/typing.ts @@ -0,0 +1,4 @@ +import Vditor from 'vditor'; +export interface MarkDownActionType { + getVditor: () => Vditor; +} diff --git a/src/components/Menu/index.ts b/src/components/Menu/index.ts new file mode 100644 index 0000000..4a59225 --- /dev/null +++ b/src/components/Menu/index.ts @@ -0,0 +1,3 @@ +import BasicMenu from './src/BasicMenu.vue'; + +export { BasicMenu }; diff --git a/src/components/Menu/src/BasicMenu.vue b/src/components/Menu/src/BasicMenu.vue new file mode 100644 index 0000000..328d6c1 --- /dev/null +++ b/src/components/Menu/src/BasicMenu.vue @@ -0,0 +1,261 @@ + + + diff --git a/src/components/Menu/src/components/BasicMenuItem.vue b/src/components/Menu/src/components/BasicMenuItem.vue new file mode 100644 index 0000000..fd54497 --- /dev/null +++ b/src/components/Menu/src/components/BasicMenuItem.vue @@ -0,0 +1,20 @@ + + diff --git a/src/components/Menu/src/components/BasicSubMenuItem.vue b/src/components/Menu/src/components/BasicSubMenuItem.vue new file mode 100644 index 0000000..bc358c6 --- /dev/null +++ b/src/components/Menu/src/components/BasicSubMenuItem.vue @@ -0,0 +1,134 @@ + + + diff --git a/src/components/Menu/src/components/MenuItemContent.vue b/src/components/Menu/src/components/MenuItemContent.vue new file mode 100644 index 0000000..3044fbc --- /dev/null +++ b/src/components/Menu/src/components/MenuItemContent.vue @@ -0,0 +1,34 @@ + + diff --git a/src/components/Menu/src/index.less b/src/components/Menu/src/index.less new file mode 100644 index 0000000..c969109 --- /dev/null +++ b/src/components/Menu/src/index.less @@ -0,0 +1,76 @@ +@basic-menu-prefix-cls: ~'@{namespace}-basic-menu'; + +.app-top-menu-popup { + min-width: 150px; +} + +.@{basic-menu-prefix-cls} { + width: 100%; + + .ant-menu-item { + transition: unset; + } + + &__sidebar-hor { + &.ant-menu-horizontal { + display: flex; + align-items: center; + + &.ant-menu-dark { + background-color: transparent; + // update-begin--author:liaozhiyang---date:20240407---for:【QQYUN-8762】顶部菜单模式文字调整 + color: rgba(255 ,255 ,255, 1); + // update-end--author:liaozhiyang---date:20240407---for:【QQYUN-8762】顶部菜单模式文字调整 + .ant-menu-submenu:hover, + .ant-menu-item-open, + .ant-menu-submenu-open, + .ant-menu-item-selected, + .ant-menu-submenu-selected, + .ant-menu-item:hover, + .ant-menu-item-active, + .ant-menu:not(.ant-menu-inline) .ant-menu-submenu-open, + .ant-menu-submenu-active, + .ant-menu-submenu-title:hover { + color: #fff; + background-color: @top-menu-active-bg-color !important; + } + + .ant-menu-item:hover, + .ant-menu-item-active, + .ant-menu:not(.ant-menu-inline) .ant-menu-submenu-open, + .ant-menu-submenu-active, + .ant-menu-submenu-title:hover { + background-color: @top-menu-active-bg-color; + } + + .@{basic-menu-prefix-cls}-item__level1 { + background-color: transparent; + + &.ant-menu-item-selected, + &.ant-menu-submenu-selected { + background-color: @top-menu-active-bg-color !important; + } + } + + .ant-menu-item, + .ant-menu-submenu { + &.@{basic-menu-prefix-cls}-item__level1, + .ant-menu-submenu-title { + height: @header-height; + line-height: @header-height; + } + } + } + } + } + + .ant-menu-submenu, + .ant-menu-submenu-inline { + transition: unset; + } + + .ant-menu-inline.ant-menu-sub { + box-shadow: unset !important; + transition: unset; + } +} diff --git a/src/components/Menu/src/props.ts b/src/components/Menu/src/props.ts new file mode 100644 index 0000000..ed3f010 --- /dev/null +++ b/src/components/Menu/src/props.ts @@ -0,0 +1,60 @@ +import type { Menu } from '/@/router/types'; +import type { PropType } from 'vue'; + +import { MenuModeEnum, MenuTypeEnum } from '/@/enums/menuEnum'; +import { ThemeEnum } from '/@/enums/appEnum'; +import { propTypes } from '/@/utils/propTypes'; +import type { MenuTheme } from 'ant-design-vue'; +import type { MenuMode } from 'ant-design-vue/lib/menu/src/interface'; +export const basicProps = { + items: { + type: Array as PropType, + default: () => [], + }, + collapsedShowTitle: propTypes.bool, + // 最好是4 倍数 + inlineIndent: propTypes.number.def(20), + // 菜单组件的mode属性 + mode: { + type: String as PropType, + default: MenuModeEnum.INLINE, + }, + + type: { + type: String as PropType, + default: MenuTypeEnum.MIX, + }, + theme: { + type: String as PropType, + default: ThemeEnum.DARK, + }, + inlineCollapsed: propTypes.bool, + mixSider: propTypes.bool, + + isHorizontal: propTypes.bool, + accordion: propTypes.bool.def(true), + beforeClickFn: { + type: Function as PropType<(key: string) => Promise>, + }, +}; + +export const itemProps = { + item: { + type: Object as PropType, + default: {}, + }, + level: propTypes.number, + theme: propTypes.oneOf(['dark', 'light']), + showTitle: propTypes.bool, + isHorizontal: propTypes.bool, +}; + +export const contentProps = { + item: { + type: Object as PropType, + default: null, + }, + showTitle: propTypes.bool.def(true), + level: propTypes.number.def(0), + isHorizontal: propTypes.bool.def(true), +}; diff --git a/src/components/Menu/src/types.ts b/src/components/Menu/src/types.ts new file mode 100644 index 0000000..ad711c2 --- /dev/null +++ b/src/components/Menu/src/types.ts @@ -0,0 +1,25 @@ +// import { ComputedRef } from 'vue'; +// import { ThemeEnum } from '/@/enums/appEnum'; +// import { MenuModeEnum } from '/@/enums/menuEnum'; +export interface MenuState { + // 默认选中的列表 + defaultSelectedKeys: string[]; + + // 模式 + // mode: MenuModeEnum; + + // // 主题 + // theme: ComputedRef | ThemeEnum; + + // 缩进 + inlineIndent?: number; + + // 展开数组 + openKeys: string[]; + + // 当前选中的菜单项 key 数组 + selectedKeys: string[]; + + // 收缩状态下展开的数组 + collapsedOpenKeys: string[]; +} diff --git a/src/components/Menu/src/useBasicMenuContext.ts b/src/components/Menu/src/useBasicMenuContext.ts new file mode 100644 index 0000000..4e687c7 --- /dev/null +++ b/src/components/Menu/src/useBasicMenuContext.ts @@ -0,0 +1,16 @@ +import type { InjectionKey, Ref } from 'vue'; +import { createContext, useContext } from '/@/hooks/core/useContext'; + +export interface BasicRootMenuContextProps { + menuState: any; +} + +const key: InjectionKey = Symbol(); + +export function createBasicRootMenuContext(context: BasicRootMenuContextProps) { + return createContext(context, key, { readonly: false, native: true }); +} + +export function useBasicRootMenuContext() { + return useContext(key); +} diff --git a/src/components/Menu/src/useOpenKeys.ts b/src/components/Menu/src/useOpenKeys.ts new file mode 100644 index 0000000..3e35eac --- /dev/null +++ b/src/components/Menu/src/useOpenKeys.ts @@ -0,0 +1,78 @@ +import { MenuModeEnum } from '/@/enums/menuEnum'; +import type { Menu as MenuType } from '/@/router/types'; +import type { MenuState } from './types'; + +import { computed, Ref, toRaw } from 'vue'; + +import { unref } from 'vue'; +import { uniq } from 'lodash-es'; +import { useMenuSetting } from '/@/hooks/setting/useMenuSetting'; +import { getAllParentPath } from '/@/router/helper/menuHelper'; +import { useTimeoutFn } from '/@/hooks/core/useTimeout'; + +export function useOpenKeys(menuState: MenuState, menus: Ref, mode: Ref, accordion: Ref) { + const { getCollapsed, getIsMixSidebar } = useMenuSetting(); + + async function setOpenKeys(path: string) { + if (mode.value === MenuModeEnum.HORIZONTAL) { + return; + } + const native = unref(getIsMixSidebar); + useTimeoutFn( + () => { + const menuList = toRaw(menus.value); + if (menuList?.length === 0) { + menuState.openKeys = []; + return; + } + if (!unref(accordion)) { + menuState.openKeys = uniq([...menuState.openKeys, ...getAllParentPath(menuList, path)]); + } else { + menuState.openKeys = getAllParentPath(menuList, path); + } + }, + 16, + !native + ); + } + + const getOpenKeys = computed(() => { + const collapse = unref(getIsMixSidebar) ? false : unref(getCollapsed); + + return collapse ? menuState.collapsedOpenKeys : menuState.openKeys; + }); + + /** + * @description: 重置值 + */ + function resetKeys() { + menuState.selectedKeys = []; + menuState.openKeys = []; + } + + function handleOpenChange(openKeys: string[]) { + if (unref(mode) === MenuModeEnum.HORIZONTAL || !unref(accordion) || unref(getIsMixSidebar)) { + menuState.openKeys = openKeys; + } else { + // const menuList = toRaw(menus.value); + // getAllParentPath(menuList, path); + const rootSubMenuKeys: string[] = []; + for (const { children, path } of unref(menus)) { + if (children && children.length > 0) { + rootSubMenuKeys.push(path); + } + } + if (!unref(getCollapsed)) { + const latestOpenKey = openKeys.find((key) => menuState.openKeys.indexOf(key) === -1); + if (rootSubMenuKeys.indexOf(latestOpenKey as string) === -1) { + menuState.openKeys = openKeys; + } else { + menuState.openKeys = latestOpenKey ? [latestOpenKey] : []; + } + } else { + menuState.collapsedOpenKeys = openKeys; + } + } + } + return { setOpenKeys, resetKeys, getOpenKeys, handleOpenChange }; +} diff --git a/src/components/Modal/index.ts b/src/components/Modal/index.ts new file mode 100644 index 0000000..6188c5c --- /dev/null +++ b/src/components/Modal/index.ts @@ -0,0 +1,8 @@ +import { withInstall } from '/@/utils'; +import './src/index.less'; +import basicModal from './src/BasicModal.vue'; + +export const BasicModal = withInstall(basicModal); +export { useModalContext } from './src/hooks/useModalContext'; +export { useModal, useModalInner } from './src/hooks/useModal'; +export * from './src/typing'; diff --git a/src/components/Modal/src/BasicModal.vue b/src/components/Modal/src/BasicModal.vue new file mode 100644 index 0000000..29092f8 --- /dev/null +++ b/src/components/Modal/src/BasicModal.vue @@ -0,0 +1,329 @@ + + + diff --git a/src/components/Modal/src/JModal/JModal.vue b/src/components/Modal/src/JModal/JModal.vue new file mode 100644 index 0000000..a08d697 --- /dev/null +++ b/src/components/Modal/src/JModal/JModal.vue @@ -0,0 +1,339 @@ + + + + + + + diff --git a/src/components/Modal/src/components/Modal.tsx b/src/components/Modal/src/components/Modal.tsx new file mode 100644 index 0000000..f2def6d --- /dev/null +++ b/src/components/Modal/src/components/Modal.tsx @@ -0,0 +1,31 @@ +import { Modal } from 'ant-design-vue'; +import { defineComponent, toRefs, unref } from 'vue'; +import { basicProps } from '../props'; +import { useModalDragMove } from '../hooks/useModalDrag'; +import { useAttrs } from '/@/hooks/core/useAttrs'; +import { extendSlots } from '/@/utils/helper/tsxHelper'; +import { omit } from 'lodash-es'; + +export default defineComponent({ + name: 'Modal', + inheritAttrs: false, + props: omit(basicProps, ['visible']), + emits: ['cancel'], + setup(props, { slots, emit }) { + const { open, draggable, destroyOnClose } = toRefs(props); + const attrs = useAttrs(); + useModalDragMove({ + visible: open, + destroyOnClose, + draggable, + }); + const onCancel = (e: Event) => { + emit('cancel', e); + }; + + return () => { + const propsData = { ...unref(attrs), ...props, onCancel } as Recordable; + return {extendSlots(slots)}; + }; + }, +}); diff --git a/src/components/Modal/src/components/ModalClose.vue b/src/components/Modal/src/components/ModalClose.vue new file mode 100644 index 0000000..141c953 --- /dev/null +++ b/src/components/Modal/src/components/ModalClose.vue @@ -0,0 +1,161 @@ + + + diff --git a/src/components/Modal/src/components/ModalFooter.vue b/src/components/Modal/src/components/ModalFooter.vue new file mode 100644 index 0000000..7bc5786 --- /dev/null +++ b/src/components/Modal/src/components/ModalFooter.vue @@ -0,0 +1,34 @@ + + diff --git a/src/components/Modal/src/components/ModalHeader.vue b/src/components/Modal/src/components/ModalHeader.vue new file mode 100644 index 0000000..bf6c112 --- /dev/null +++ b/src/components/Modal/src/components/ModalHeader.vue @@ -0,0 +1,22 @@ + + diff --git a/src/components/Modal/src/components/ModalWrapper.vue b/src/components/Modal/src/components/ModalWrapper.vue new file mode 100644 index 0000000..b583f0f --- /dev/null +++ b/src/components/Modal/src/components/ModalWrapper.vue @@ -0,0 +1,221 @@ + + diff --git a/src/components/Modal/src/hooks/useModal.ts b/src/components/Modal/src/hooks/useModal.ts new file mode 100644 index 0000000..ff51fef --- /dev/null +++ b/src/components/Modal/src/hooks/useModal.ts @@ -0,0 +1,156 @@ +import type { UseModalReturnType, ModalMethods, ModalProps, ReturnMethods, UseModalInnerReturnType } from '../typing'; +import { ref, onUnmounted, unref, getCurrentInstance, reactive, watchEffect, nextTick, toRaw } from 'vue'; +import { isProdMode } from '/@/utils/env'; +import { isFunction } from '/@/utils/is'; +import { isEqual } from 'lodash-es'; +import { tryOnUnmounted } from '@vueuse/core'; +import { error } from '/@/utils/log'; +import { computed } from 'vue'; + +const dataTransfer = reactive({}); + +const visibleData = reactive<{ [key: number]: boolean }>({}); + +/** + * @description: Applicable to independent modal and call outside + */ +export function useModal(): UseModalReturnType { + const modal = ref>(null); + const loaded = ref>(false); + const uid = ref(''); + + function register(modalMethod: ModalMethods, uuid: string) { + if (!getCurrentInstance()) { + throw new Error('useModal() can only be used inside setup() or functional components!'); + } + uid.value = uuid; + isProdMode() && + onUnmounted(() => { + modal.value = null; + loaded.value = false; + dataTransfer[unref(uid)] = null; + }); + if (unref(loaded) && isProdMode() && modalMethod === unref(modal)) return; + + modal.value = modalMethod; + loaded.value = true; + modalMethod.emitVisible = (visible: boolean, uid: number) => { + visibleData[uid] = visible; + }; + } + + const getInstance = () => { + const instance = unref(modal); + if (!instance) { + error('useModal instance is undefined!'); + } + return instance; + }; + + const methods: ReturnMethods = { + setModalProps: (props: Partial): void => { + getInstance()?.setModalProps(props); + }, + + getVisible: computed((): boolean => { + return visibleData[~~unref(uid)]; + }), + getOpen: computed((): boolean => { + return visibleData[~~unref(uid)]; + }), + redoModalHeight: () => { + getInstance()?.redoModalHeight?.(); + }, + + openModal: (visible = true, data?: T, openOnSet = true): void => { + // update-begin--author:liaozhiyang---date:20231218---for:【QQYUN-6366】升级到antd4.x + getInstance()?.setModalProps({ + open: visible, + }); + // update-end--author:liaozhiyang---date:20231218---for:【QQYUN-6366】升级到antd4.x + + if (!data) return; + const id = unref(uid); + if (openOnSet) { + dataTransfer[id] = null; + dataTransfer[id] = toRaw(data); + return; + } + const equal = isEqual(toRaw(dataTransfer[id]), toRaw(data)); + if (!equal) { + dataTransfer[id] = toRaw(data); + } + }, + + closeModal: () => { + // update-begin--author:liaozhiyang---date:20231218---for:【QQYUN-6366】升级到antd4.x + getInstance()?.setModalProps({ open: false }); + // update-end--author:liaozhiyang---date:20231218---for:【QQYUN-6366】升级到antd4.x + }, + }; + return [register, methods]; +} + +export const useModalInner = (callbackFn?: Fn): UseModalInnerReturnType => { + const modalInstanceRef = ref>(null); + const currentInstance = getCurrentInstance(); + const uidRef = ref(''); + + const getInstance = () => { + const instance = unref(modalInstanceRef); + if (!instance) { + error('useModalInner instance is undefined!'); + } + return instance; + }; + + const register = (modalInstance: ModalMethods, uuid: string) => { + isProdMode() && + tryOnUnmounted(() => { + modalInstanceRef.value = null; + }); + uidRef.value = uuid; + modalInstanceRef.value = modalInstance; + currentInstance?.emit('register', modalInstance, uuid); + }; + + watchEffect(() => { + const data = dataTransfer[unref(uidRef)]; + if (!data) return; + if (!callbackFn || !isFunction(callbackFn)) return; + nextTick(() => { + callbackFn(data); + }); + }); + + return [ + register, + { + changeLoading: (loading = true) => { + getInstance()?.setModalProps({ loading }); + }, + getVisible: computed((): boolean => { + return visibleData[~~unref(uidRef)]; + }), + getOpen: computed((): boolean => { + return visibleData[~~unref(uidRef)]; + }), + changeOkLoading: (loading = true) => { + getInstance()?.setModalProps({ confirmLoading: loading }); + }, + + closeModal: () => { + getInstance()?.setModalProps({ open: false }); + }, + + setModalProps: (props: Partial) => { + getInstance()?.setModalProps(props); + }, + + redoModalHeight: () => { + const callRedo = getInstance()?.redoModalHeight; + callRedo && callRedo(); + }, + }, + ]; +}; diff --git a/src/components/Modal/src/hooks/useModalContext.ts b/src/components/Modal/src/hooks/useModalContext.ts new file mode 100644 index 0000000..94d4c4e --- /dev/null +++ b/src/components/Modal/src/hooks/useModalContext.ts @@ -0,0 +1,16 @@ +import { InjectionKey } from 'vue'; +import { createContext, useContext } from '/@/hooks/core/useContext'; + +export interface ModalContextProps { + redoModalHeight: () => void; +} + +const key: InjectionKey = Symbol(); + +export function createModalContext(context: ModalContextProps) { + return createContext(context, key); +} + +export function useModalContext() { + return useContext(key); +} diff --git a/src/components/Modal/src/hooks/useModalDrag.ts b/src/components/Modal/src/hooks/useModalDrag.ts new file mode 100644 index 0000000..220bfc4 --- /dev/null +++ b/src/components/Modal/src/hooks/useModalDrag.ts @@ -0,0 +1,112 @@ +import { Ref, unref, watchEffect } from 'vue'; +import { useTimeoutFn } from '/@/hooks/core/useTimeout'; + +export interface UseModalDragMoveContext { + draggable: Ref; + destroyOnClose: Ref | undefined; + visible: Ref; +} + +export function useModalDragMove(context: UseModalDragMoveContext) { + const getStyle = (dom: any, attr: any) => { + return getComputedStyle(dom)[attr]; + }; + const drag = (wrap: any) => { + if (!wrap) return; + wrap.setAttribute('data-drag', unref(context.draggable)); + const dialogHeaderEl = wrap.querySelector('.ant-modal-header'); + const dragDom = wrap.querySelector('.ant-modal'); + + if (!dialogHeaderEl || !dragDom || !unref(context.draggable)) return; + + dialogHeaderEl.style.cursor = 'move'; + + dialogHeaderEl.onmousedown = (e: any) => { + if (!e) return; + // 鼠标按下,计算当前元素距离可视区的距离 + const disX = e.clientX; + const disY = e.clientY; + const screenWidth = document.body.clientWidth; // body当前宽度 + const screenHeight = document.documentElement.clientHeight; // 可见区域高度(应为body高度,可某些环境下无法获取) + + const dragDomWidth = dragDom.offsetWidth; // 对话框宽度 + const dragDomheight = dragDom.offsetHeight; // 对话框高度 + + const minDragDomLeft = dragDom.offsetLeft; + + const maxDragDomLeft = screenWidth - dragDom.offsetLeft - dragDomWidth; + const minDragDomTop = dragDom.offsetTop; + let maxDragDomTop = screenHeight - dragDom.offsetTop - dragDomheight; + //update-begin-author:liusq---date:20230407--for: [issue/430]弹出页面出现自动吸顶,无法移动和显示头部--- + if(maxDragDomTop<0){ + maxDragDomTop = screenHeight - dragDom.offsetTop + } + //update-end-author:liusq---date:20230407--for: [issue/430]弹出页面出现自动吸顶,无法移动和显示头部--- + // 获取到的值带px 正则匹配替换 + const domLeft = getStyle(dragDom, 'left'); + const domTop = getStyle(dragDom, 'top'); + let styL = +domLeft; + let styT = +domTop; + + // 注意在ie中 第一次获取到的值为组件自带50% 移动之后赋值为px + if (domLeft.includes('%')) { + styL = +document.body.clientWidth * (+domLeft.replace(/%/g, '') / 100); + styT = +document.body.clientHeight * (+domTop.replace(/%/g, '') / 100); + } else { + styL = +domLeft.replace(/px/g, ''); + styT = +domTop.replace(/px/g, ''); + } + + document.onmousemove = function (e) { + // 通过事件委托,计算移动的距离 + let left = e.clientX - disX; + let top = e.clientY - disY; + + // 边界处理 + if (-left > minDragDomLeft) { + left = -minDragDomLeft; + } else if (left > maxDragDomLeft) { + left = maxDragDomLeft; + } + + if (-top > minDragDomTop) { + top = -minDragDomTop; + } else if (top > maxDragDomTop) { + top = maxDragDomTop; + } + + // 移动当前元素 + dragDom.style.cssText += `;left:${left + styL}px;top:${top + styT}px;`; + }; + + document.onmouseup = () => { + document.onmousemove = null; + document.onmouseup = null; + }; + }; + }; + + const handleDrag = () => { + const dragWraps = document.querySelectorAll('.ant-modal-wrap'); + for (const wrap of Array.from(dragWraps)) { + if (!wrap) continue; + const display = getStyle(wrap, 'display'); + const draggable = wrap.getAttribute('data-drag'); + if (display !== 'none') { + // 拖拽位置 + if (draggable === null || unref(context.destroyOnClose)) { + drag(wrap); + } + } + } + }; + + watchEffect(() => { + if (!unref(context.visible) || !unref(context.draggable)) { + return; + } + useTimeoutFn(() => { + handleDrag(); + }, 30); + }); +} diff --git a/src/components/Modal/src/hooks/useModalFullScreen.ts b/src/components/Modal/src/hooks/useModalFullScreen.ts new file mode 100644 index 0000000..b53563a --- /dev/null +++ b/src/components/Modal/src/hooks/useModalFullScreen.ts @@ -0,0 +1,43 @@ +import { computed, Ref, ref, unref } from 'vue'; + +export interface UseFullScreenContext { + wrapClassName: Ref; + modalWrapperRef: Ref; + extHeightRef: Ref; +} + +export function useFullScreen(context: UseFullScreenContext) { + // const formerHeightRef = ref(0); + const fullScreenRef = ref(false); + + const getWrapClassName = computed(() => { + const clsName = unref(context.wrapClassName) || ''; + return unref(fullScreenRef) ? `fullscreen-modal ${clsName} ` : unref(clsName); + }); + + function handleFullScreen(e: Event) { + e && e.stopPropagation(); + fullScreenRef.value = !unref(fullScreenRef); + + // const modalWrapper = unref(context.modalWrapperRef); + + // if (!modalWrapper) return; + + // const wrapperEl = modalWrapper.$el as HTMLElement; + // if (!wrapperEl) return; + // const modalWrapSpinEl = wrapperEl.querySelector('.ant-spin-nested-loading') as HTMLElement; + + // if (!modalWrapSpinEl) return; + + // if (!unref(formerHeightRef) && unref(fullScreenRef)) { + // formerHeightRef.value = modalWrapSpinEl.offsetHeight; + // } + + // if (unref(fullScreenRef)) { + // modalWrapSpinEl.style.height = `${window.innerHeight - unref(context.extHeightRef)}px`; + // } else { + // modalWrapSpinEl.style.height = `${unref(formerHeightRef)}px`; + // } + } + return { getWrapClassName, handleFullScreen, fullScreenRef }; +} diff --git a/src/components/Modal/src/index.less b/src/components/Modal/src/index.less new file mode 100644 index 0000000..d39a0bc --- /dev/null +++ b/src/components/Modal/src/index.less @@ -0,0 +1,142 @@ +.ant-modal-root .fullscreen-modal { + overflow: hidden; + + .ant-modal { + top: 0 !important; + right: 0 !important; + bottom: 0 !important; + left: 0 !important; + width: 100% !important; + height: 100% !important; + max-width: 100% !important; + max-height: 100% !important; + + &-content { + height: 100%; + } + + .ant-modal-header, + .@{namespace}-basic-title { + cursor: default !important; + } + // update-begin--author:liaozhiyang---date:20241225---for:【issues/7601】ant-design-vue@4.2.6后弹窗全屏底部有空隙 + & > div:has( > .ant-modal-content) { + height: 100%; + } + // update-end--author:liaozhiyang---date:20241225---for:【issues/7601】ant-design-vue@4.2.6后弹窗全屏底部有空隙 + } +} + +.ant-modal { + width: 520px; + padding-bottom: 0; + + .ant-modal-body > .scrollbar { + padding: 14px; + } + + .ant-modal-title { + font-size: 16px; + font-weight: bold; + line-height: 16px; + + .base-title { + cursor: move !important; + } + } + + .ant-modal-body { + padding: 0; + + > .scrollbar > .scrollbar__bar.is-horizontal { + display: none; + } + } + + .ant-modal-large { + top: 60px; + + &--mini { + top: 16px; + } + } + + .ant-modal-header { + padding: 16px; + } + + .ant-modal-content { + box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); + } + + .ant-modal-footer { + button + button { + margin-left: 10px; + } + } + + .ant-modal-close { + font-weight: normal; + outline: none; + } + + .ant-modal-close-x { + // update-begin--author:liaozhiyang---date:20241010---for:【issues/7260】原生a-modal关闭按钮位置偏移 + // display: inline-block; + // width: 96px; + // height: 56px; + // line-height: 56px; + // update-end--author:liaozhiyang---date:20241010---for:【issues/7260】原生a-modal关闭按钮位置偏移 + } + + .ant-modal-confirm-body { + .ant-modal-confirm-content { + // color: #fff; + + > * { + color: @text-color-help-dark; + } + } + } + + .ant-modal-confirm-confirm.error .ant-modal-confirm-body > .anticon { + color: @error-color; + } + + .ant-modal-confirm-btns { + .ant-btn:last-child { + margin-right: 0; + } + } + + .ant-modal-confirm-info { + .ant-modal-confirm-body > .anticon { + color: @warning-color; + } + } + + .ant-modal-confirm-confirm.success { + .ant-modal-confirm-body > .anticon { + color: @success-color; + } + } +} + +.ant-modal-confirm .ant-modal-body { + padding: 24px !important; +} +@media screen and (max-height: 600px) { + .ant-modal { + top: 60px; + } +} +@media screen and (max-height: 540px) { + .ant-modal { + top: 30px; + } +} +@media screen and (max-height: 480px) { + .ant-modal { + top: 10px; + } +} diff --git a/src/components/Modal/src/props.ts b/src/components/Modal/src/props.ts new file mode 100644 index 0000000..4112690 --- /dev/null +++ b/src/components/Modal/src/props.ts @@ -0,0 +1,91 @@ +import type { PropType, CSSProperties } from 'vue'; +import type { ModalWrapperProps } from './typing'; +import { ButtonProps } from 'ant-design-vue/es/button/buttonTypes'; +import { useI18n } from '/@/hooks/web/useI18n'; + +const { t } = useI18n(); + +export const modalProps = { + visible: { type: Boolean }, + scrollTop: { type: Boolean, default: true }, + height: { type: Number }, + minHeight: { type: Number }, + // open drag + draggable: { type: Boolean, default: true }, + centered: { type: Boolean }, + cancelText: { type: String, default: t('common.cancelText') }, + okText: { type: String, default: t('common.okText') }, + + closeFunc: Function as PropType<() => Promise>, + + modalHeaderHeight: Number, + modalFooterHeight: Number, +}; + +export const basicProps = Object.assign({}, modalProps, { + defaultFullscreen: { type: Boolean }, + // Can it be full screen + canFullscreen: { type: Boolean, default: true }, + // After enabling the wrapper, the bottom can be increased in height + wrapperFooterOffset: { type: Number, default: 0 }, + // Warm reminder message + helpMessage: [String, Array] as PropType, + // Whether to setting wrapper + useWrapper: { type: Boolean, default: true }, + loading: { type: Boolean }, + loadingTip: { type: String }, + /** + * @description: Show close button + */ + showCancelBtn: { type: Boolean, default: true }, + /** + * @description: Show confirmation button + */ + showOkBtn: { type: Boolean, default: true }, + + wrapperProps: Object as PropType>, + + afterClose: Function as PropType<() => Promise>, + + bodyStyle: Object as PropType, + + closable: { type: Boolean, default: true }, + + closeIcon: Object as PropType, + + confirmLoading: { type: Boolean }, + + destroyOnClose: { type: Boolean }, + + footer: Object as PropType, + + getContainer: Function as PropType<() => any>, + + mask: { type: Boolean, default: true }, + + maskClosable: { type: Boolean, default: true }, + keyboard: { type: Boolean, default: true }, + + maskStyle: Object as PropType, + + okType: { type: String, default: 'primary' }, + + okButtonProps: Object as PropType, + + cancelButtonProps: Object as PropType, + + title: { type: String }, + + visible: { type: Boolean }, + + open: { type: Boolean }, + + width: [String, Number] as PropType, + + wrapClassName: { type: String }, + + zIndex: { type: Number }, + maxHeight: { type: Number }, + // 是否开启评论区域 + enableComment: { type: Boolean, default: false }, +}); diff --git a/src/components/Modal/src/typing.ts b/src/components/Modal/src/typing.ts new file mode 100644 index 0000000..1d7fb9f --- /dev/null +++ b/src/components/Modal/src/typing.ts @@ -0,0 +1,217 @@ +import type { ButtonProps } from 'ant-design-vue/lib/button/buttonTypes'; +import type { CSSProperties, VNodeChild, ComputedRef } from 'vue'; +/** + * @description: 弹窗对外暴露的方法 + */ +export interface ModalMethods { + setModalProps: (props: Partial) => void; + emitVisible?: (visible: boolean, uid: number) => void; + redoModalHeight?: () => void; +} + +export type RegisterFn = (modalMethods: ModalMethods, uuid?: string) => void; + +export interface ReturnMethods extends ModalMethods { + openModal: (props?: boolean, data?: T, openOnSet?: boolean) => void; + closeModal: () => void; + getVisible?: ComputedRef; + getOpen?: ComputedRef; +} + +export type UseModalReturnType = [RegisterFn, ReturnMethods]; + +export interface ReturnInnerMethods extends ModalMethods { + closeModal: () => void; + changeLoading: (loading: boolean) => void; + changeOkLoading: (loading: boolean) => void; + getVisible?: ComputedRef; + getOpen?: ComputedRef; + redoModalHeight: () => void; +} + +export type UseModalInnerReturnType = [RegisterFn, ReturnInnerMethods]; + +export interface ModalProps { + minHeight?: number; + height?: number; + // 启用wrapper后 底部可以适当增加高度 + wrapperFooterOffset?: number; + draggable?: boolean; + scrollTop?: boolean; + + // 是否可以进行全屏 + canFullscreen?: boolean; + defaultFullscreen?: boolean; + visible?: boolean; + open?: boolean; + // 温馨提醒信息 + helpMessage: string | string[]; + + // 是否使用modalWrapper + useWrapper: boolean; + + loading: boolean; + loadingTip?: string; + + wrapperProps: Omit; + + showOkBtn: boolean; + showCancelBtn: boolean; + closeFunc: () => Promise; + + /** + * Specify a function that will be called when modal is closed completely. + * @type Function + */ + afterClose?: () => any; + + /** + * Body style for modal body element. Such as height, padding etc. + * @default {} + * @type object + */ + bodyStyle?: CSSProperties; + + /** + * Text of the Cancel button + * @default 'cancel' + * @type string + */ + cancelText?: string; + + /** + * Centered Modal + * @default false + * @type boolean + */ + centered?: boolean; + + /** + * Whether a close (x) button is visible on top right of the modal dialog or not + * @default true + * @type boolean + */ + closable?: boolean; + /** + * Whether a close (x) button is visible on top right of the modal dialog or not + */ + closeIcon?: VNodeChild | JSX.Element; + + /** + * Whether to apply loading visual effect for OK button or not + * @default false + * @type boolean + */ + confirmLoading?: boolean; + + /** + * Whether to unmount child components on onClose + * @default false + * @type boolean + */ + destroyOnClose?: boolean; + + /** + * Footer content, set as :footer="null" when you don't need default buttons + * @default OK and Cancel buttons + * @type any (string | slot) + */ + footer?: VNodeChild | JSX.Element; + + /** + * Return the mount node for Modal + * @default () => document.body + * @type Function + */ + getContainer?: (instance: any) => HTMLElement; + + /** + * Whether show mask or not. + * @default true + * @type boolean + */ + mask?: boolean; + + /** + * Whether to close the modal dialog when the mask (area outside the modal) is clicked + * @default true + * @type boolean + */ + maskClosable?: boolean; + + /** + * Style for modal's mask element. + * @default {} + * @type object + */ + maskStyle?: CSSProperties; + + /** + * Text of the OK button + * @default 'OK' + * @type string + */ + okText?: string; + + /** + * Button type of the OK button + * @default 'primary' + * @type string + */ + okType?: 'primary' | 'danger' | 'dashed' | 'ghost' | 'default'; + + /** + * The ok button props, follow jsx rules + * @type object + */ + okButtonProps?: ButtonProps; + + /** + * The cancel button props, follow jsx rules + * @type object + */ + cancelButtonProps?: ButtonProps; + + /** + * The modal dialog's title + * @type any (string | slot) + */ + title?: VNodeChild | JSX.Element; + + /** + * Width of the modal dialog + * @default 520 + * @type string | number + */ + width?: string | number; + + /** + * The class name of the container of the modal dialog + * @type string + */ + wrapClassName?: string; + + /** + * The z-index of the Modal + * @default 1000 + * @type number + */ + zIndex?: number; + + enableComment?: boolean; + + modalHeaderHeight: number; + modalFooterHeight: number; +} + +export interface ModalWrapperProps { + footerOffset?: number; + loading: boolean; + modalHeaderHeight: number; + modalFooterHeight: number; + minHeight: number; + height: number; + visible: boolean; + fullScreen: boolean; + useWrapper: boolean; +} diff --git a/src/components/Page/index.ts b/src/components/Page/index.ts new file mode 100644 index 0000000..d096264 --- /dev/null +++ b/src/components/Page/index.ts @@ -0,0 +1,7 @@ +import { withInstall } from '/@/utils'; + +import pageFooter from './src/PageFooter.vue'; +import pageWrapper from './src/PageWrapper.vue'; + +export const PageFooter = withInstall(pageFooter); +export const PageWrapper = withInstall(pageWrapper); diff --git a/src/components/Page/injectionKey.ts b/src/components/Page/injectionKey.ts new file mode 100644 index 0000000..9cc4278 --- /dev/null +++ b/src/components/Page/injectionKey.ts @@ -0,0 +1 @@ +export const PageWrapperFixedHeightKey = 'PageWrapperFixedHeight'; diff --git a/src/components/Page/src/PageFooter.vue b/src/components/Page/src/PageFooter.vue new file mode 100644 index 0000000..5440d2a --- /dev/null +++ b/src/components/Page/src/PageFooter.vue @@ -0,0 +1,49 @@ + + + diff --git a/src/components/Page/src/PageWrapper.vue b/src/components/Page/src/PageWrapper.vue new file mode 100644 index 0000000..a9a5536 --- /dev/null +++ b/src/components/Page/src/PageWrapper.vue @@ -0,0 +1,186 @@ + + + diff --git a/src/components/Preview/index.ts b/src/components/Preview/index.ts new file mode 100644 index 0000000..c0b4685 --- /dev/null +++ b/src/components/Preview/index.ts @@ -0,0 +1,2 @@ +export { default as ImagePreview } from './src/Preview.vue'; +export { createImgPreview } from './src/functional'; diff --git a/src/components/Preview/src/Functional.vue b/src/components/Preview/src/Functional.vue new file mode 100644 index 0000000..7de37ec --- /dev/null +++ b/src/components/Preview/src/Functional.vue @@ -0,0 +1,528 @@ + + diff --git a/src/components/Preview/src/Preview.vue b/src/components/Preview/src/Preview.vue new file mode 100644 index 0000000..3bb0b14 --- /dev/null +++ b/src/components/Preview/src/Preview.vue @@ -0,0 +1,94 @@ + + + diff --git a/src/components/Preview/src/functional.ts b/src/components/Preview/src/functional.ts new file mode 100644 index 0000000..e4b27d6 --- /dev/null +++ b/src/components/Preview/src/functional.ts @@ -0,0 +1,18 @@ +import type { Options, Props } from './typing'; +import ImgPreview from './Functional.vue'; +import { isClient } from '/@/utils/is'; +import { createVNode, render } from 'vue'; + +let instance: ReturnType | null = null; + +export function createImgPreview(options: Options) { + if (!isClient) return; + const propsData: Partial = {}; + const container = document.createElement('div'); + Object.assign(propsData, { show: true, index: 0, scaleStep: 100 }, options); + + instance = createVNode(ImgPreview, propsData); + render(instance, container); + document.body.appendChild(container); + return instance.component?.exposed; +} diff --git a/src/components/Preview/src/typing.ts b/src/components/Preview/src/typing.ts new file mode 100644 index 0000000..bbb8a83 --- /dev/null +++ b/src/components/Preview/src/typing.ts @@ -0,0 +1,49 @@ +export interface Options { + show?: boolean; + imageList: string[]; + index?: number; + scaleStep?: number; + defaultWidth?: number; + maskClosable?: boolean; + rememberState?: boolean; + onImgLoad?: ({ index: number, url: string, dom: HTMLImageElement }) => void; + onImgError?: ({ index: number, url: string, dom: HTMLImageElement }) => void; +} + +export interface Props { + show: boolean; + instance: Props; + imageList: string[]; + index: number; + scaleStep: number; + defaultWidth: number; + maskClosable: boolean; + rememberState: boolean; +} + +export interface PreviewActions { + resume: () => void; + close: () => void; + prev: () => void; + next: () => void; + setScale: (scale: number) => void; + setRotate: (rotate: number) => void; +} + +export interface ImageProps { + alt?: string; + fallback?: string; + src: string; + width: string | number; + height?: string | number; + placeholder?: string | boolean; + preview?: + | boolean + | { + visible?: boolean; + onVisibleChange?: (visible: boolean, prevVisible: boolean) => void; + getContainer: string | HTMLElement | (() => HTMLElement); + }; +} + +export type ImageItem = string | ImageProps; diff --git a/src/components/Qrcode/index.ts b/src/components/Qrcode/index.ts new file mode 100644 index 0000000..16a2f40 --- /dev/null +++ b/src/components/Qrcode/index.ts @@ -0,0 +1,5 @@ +import { withInstall } from '/@/utils'; +import qrCode from './src/Qrcode.vue'; + +export const QrCode = withInstall(qrCode); +export * from './src/typing'; diff --git a/src/components/Qrcode/src/Qrcode.vue b/src/components/Qrcode/src/Qrcode.vue new file mode 100644 index 0000000..494053a --- /dev/null +++ b/src/components/Qrcode/src/Qrcode.vue @@ -0,0 +1,117 @@ + + diff --git a/src/components/Qrcode/src/drawCanvas.ts b/src/components/Qrcode/src/drawCanvas.ts new file mode 100644 index 0000000..82aee5f --- /dev/null +++ b/src/components/Qrcode/src/drawCanvas.ts @@ -0,0 +1,32 @@ +import { toCanvas } from 'qrcode'; +import type { QRCodeRenderersOptions } from 'qrcode'; +import { RenderQrCodeParams, ContentType } from './typing'; +import { cloneDeep } from 'lodash-es'; + +export const renderQrCode = ({ canvas, content, width = 0, options: params = {} }: RenderQrCodeParams) => { + const options = cloneDeep(params); + // 容错率,默认对内容少的二维码采用高容错率,内容多的二维码采用低容错率 + options.errorCorrectionLevel = options.errorCorrectionLevel || getErrorCorrectionLevel(content); + + return getOriginWidth(content, options).then((_width: number) => { + options.scale = width === 0 ? undefined : (width / _width) * 4; + return toCanvas(canvas, content, options); + }); +}; + +// 得到原QrCode的大小,以便缩放得到正确的QrCode大小 +function getOriginWidth(content: ContentType, options: QRCodeRenderersOptions) { + const _canvas = document.createElement('canvas'); + return toCanvas(_canvas, content, options).then(() => _canvas.width); +} + +// 对于内容少的QrCode,增大容错率 +function getErrorCorrectionLevel(content: ContentType) { + if (content.length > 36) { + return 'M'; + } else if (content.length > 16) { + return 'Q'; + } else { + return 'H'; + } +} diff --git a/src/components/Qrcode/src/drawLogo.ts b/src/components/Qrcode/src/drawLogo.ts new file mode 100644 index 0000000..dbfe292 --- /dev/null +++ b/src/components/Qrcode/src/drawLogo.ts @@ -0,0 +1,81 @@ +import { isString } from '/@/utils/is'; +import { RenderQrCodeParams, LogoType } from './typing'; +export const drawLogo = ({ canvas, logo }: RenderQrCodeParams) => { + if (!logo) { + return new Promise((resolve) => { + resolve((canvas as HTMLCanvasElement).toDataURL()); + }); + } + const canvasWidth = (canvas as HTMLCanvasElement).width; + const { logoSize = 0.15, bgColor = '#ffffff', borderSize = 0.05, crossOrigin, borderRadius = 8, logoRadius = 0 } = logo as LogoType; + + const logoSrc: string = isString(logo) ? logo : logo.src; + const logoWidth = canvasWidth * logoSize; + const logoXY = (canvasWidth * (1 - logoSize)) / 2; + const logoBgWidth = canvasWidth * (logoSize + borderSize); + const logoBgXY = (canvasWidth * (1 - logoSize - borderSize)) / 2; + + const ctx = canvas.getContext('2d'); + if (!ctx) return; + + // logo 底色 + canvasRoundRect(ctx)(logoBgXY, logoBgXY, logoBgWidth, logoBgWidth, borderRadius); + ctx.fillStyle = bgColor; + ctx.fill(); + + // logo + const image = new Image(); + if (crossOrigin || logoRadius) { + image.setAttribute('crossOrigin', crossOrigin || 'anonymous'); + } + image.src = logoSrc; + + // 使用image绘制可以避免某些跨域情况 + const drawLogoWithImage = (image: CanvasImageSource) => { + ctx.drawImage(image, logoXY, logoXY, logoWidth, logoWidth); + }; + + // 使用canvas绘制以获得更多的功能 + const drawLogoWithCanvas = (image: HTMLImageElement) => { + const canvasImage = document.createElement('canvas'); + canvasImage.width = logoXY + logoWidth; + canvasImage.height = logoXY + logoWidth; + const imageCanvas = canvasImage.getContext('2d'); + if (!imageCanvas || !ctx) return; + imageCanvas.drawImage(image, logoXY, logoXY, logoWidth, logoWidth); + + canvasRoundRect(ctx)(logoXY, logoXY, logoWidth, logoWidth, logoRadius); + if (!ctx) return; + const fillStyle = ctx.createPattern(canvasImage, 'no-repeat'); + if (fillStyle) { + ctx.fillStyle = fillStyle; + ctx.fill(); + } + }; + + // 将 logo绘制到 canvas上 + return new Promise((resolve) => { + image.onload = () => { + logoRadius ? drawLogoWithCanvas(image) : drawLogoWithImage(image); + resolve((canvas as HTMLCanvasElement).toDataURL()); + }; + }); +}; + +// copy来的方法,用于绘制圆角 +function canvasRoundRect(ctx: CanvasRenderingContext2D) { + return (x: number, y: number, w: number, h: number, r: number) => { + const minSize = Math.min(w, h); + if (r > minSize / 2) { + r = minSize / 2; + } + ctx.beginPath(); + ctx.moveTo(x + r, y); + ctx.arcTo(x + w, y, x + w, y + h, r); + ctx.arcTo(x + w, y + h, x, y + h, r); + ctx.arcTo(x, y + h, x, y, r); + ctx.arcTo(x, y, x + w, y, r); + ctx.closePath(); + return ctx; + }; +} diff --git a/src/components/Qrcode/src/qrcodePlus.ts b/src/components/Qrcode/src/qrcodePlus.ts new file mode 100644 index 0000000..6439861 --- /dev/null +++ b/src/components/Qrcode/src/qrcodePlus.ts @@ -0,0 +1,4 @@ +// 参考 qr-code-with-logo 进行ts版本修改 +import { toCanvas } from './toCanvas'; +export * from './typing'; +export { toCanvas }; diff --git a/src/components/Qrcode/src/toCanvas.ts b/src/components/Qrcode/src/toCanvas.ts new file mode 100644 index 0000000..f74d596 --- /dev/null +++ b/src/components/Qrcode/src/toCanvas.ts @@ -0,0 +1,10 @@ +import { renderQrCode } from './drawCanvas'; +import { drawLogo } from './drawLogo'; +import { RenderQrCodeParams } from './typing'; +export const toCanvas = (options: RenderQrCodeParams) => { + return renderQrCode(options) + .then(() => { + return options; + }) + .then(drawLogo) as Promise; +}; diff --git a/src/components/Qrcode/src/typing.ts b/src/components/Qrcode/src/typing.ts new file mode 100644 index 0000000..3a037e9 --- /dev/null +++ b/src/components/Qrcode/src/typing.ts @@ -0,0 +1,38 @@ +import type { QRCodeSegment, QRCodeRenderersOptions } from 'qrcode'; + +export type ContentType = string | QRCodeSegment[]; + +export type { QRCodeRenderersOptions }; + +export type LogoType = { + src: string; + logoSize: number; + borderColor: string; + bgColor: string; + borderSize: number; + crossOrigin: string; + borderRadius: number; + logoRadius: number; +}; + +export interface RenderQrCodeParams { + canvas: any; + content: ContentType; + width?: number; + options?: QRCodeRenderersOptions; + logo?: LogoType | string; + image?: HTMLImageElement; + downloadName?: string; + download?: boolean | Fn; +} + +export type ToCanvasFn = (options: RenderQrCodeParams) => Promise; + +export interface QrCodeActionType { + download: (fileName?: string) => void; +} + +export interface QrcodeDoneEventParams { + url: string; + ctx?: CanvasRenderingContext2D | null; +} diff --git a/src/components/Scrollbar/index.ts b/src/components/Scrollbar/index.ts new file mode 100644 index 0000000..e5b2cb2 --- /dev/null +++ b/src/components/Scrollbar/index.ts @@ -0,0 +1,8 @@ +/** + * copy from element-ui + */ + +import Scrollbar from './src/Scrollbar.vue'; + +export { Scrollbar }; +export type { ScrollbarType } from './src/types'; diff --git a/src/components/Scrollbar/src/Scrollbar.vue b/src/components/Scrollbar/src/Scrollbar.vue new file mode 100644 index 0000000..3ea4a02 --- /dev/null +++ b/src/components/Scrollbar/src/Scrollbar.vue @@ -0,0 +1,193 @@ + + + diff --git a/src/components/Scrollbar/src/bar.ts b/src/components/Scrollbar/src/bar.ts new file mode 100644 index 0000000..d56b56c --- /dev/null +++ b/src/components/Scrollbar/src/bar.ts @@ -0,0 +1,92 @@ +import { defineComponent, h, computed, ref, getCurrentInstance, onUnmounted, inject, Ref } from 'vue'; +import { on, off } from '/@/utils/domUtils'; + +import { renderThumbStyle, BAR_MAP } from './util'; + +export default defineComponent({ + name: 'Bar', + + props: { + vertical: Boolean, + size: String, + move: Number, + }, + + setup(props) { + const instance = getCurrentInstance(); + const thumb = ref(); + const wrap = inject('scroll-bar-wrap', {} as Ref>) as any; + const bar = computed(() => { + return BAR_MAP[props.vertical ? 'vertical' : 'horizontal']; + }); + const barStore = ref({}); + const cursorDown = ref(); + const clickThumbHandler = (e: any) => { + // prevent click event of right button + if (e.ctrlKey || e.button === 2) { + return; + } + window.getSelection()?.removeAllRanges(); + startDrag(e); + barStore.value[bar.value.axis] = + e.currentTarget[bar.value.offset] - (e[bar.value.client] - e.currentTarget.getBoundingClientRect()[bar.value.direction]); + }; + + const clickTrackHandler = (e: any) => { + const offset = Math.abs(e.target.getBoundingClientRect()[bar.value.direction] - e[bar.value.client]); + const thumbHalf = thumb.value[bar.value.offset] / 2; + const thumbPositionPercentage = ((offset - thumbHalf) * 100) / instance?.vnode.el?.[bar.value.offset]; + + wrap.value[bar.value.scroll] = (thumbPositionPercentage * wrap.value[bar.value.scrollSize]) / 100; + }; + const startDrag = (e: any) => { + e.stopImmediatePropagation(); + cursorDown.value = true; + on(document, 'mousemove', mouseMoveDocumentHandler); + on(document, 'mouseup', mouseUpDocumentHandler); + document.onselectstart = () => false; + }; + + const mouseMoveDocumentHandler = (e: any) => { + if (cursorDown.value === false) return; + const prevPage = barStore.value[bar.value.axis]; + + if (!prevPage) return; + + const offset = (instance?.vnode.el?.getBoundingClientRect()[bar.value.direction] - e[bar.value.client]) * -1; + const thumbClickPosition = thumb.value[bar.value.offset] - prevPage; + const thumbPositionPercentage = ((offset - thumbClickPosition) * 100) / instance?.vnode.el?.[bar.value.offset]; + wrap.value[bar.value.scroll] = (thumbPositionPercentage * wrap.value[bar.value.scrollSize]) / 100; + }; + + function mouseUpDocumentHandler() { + cursorDown.value = false; + barStore.value[bar.value.axis] = 0; + off(document, 'mousemove', mouseMoveDocumentHandler); + document.onselectstart = null; + } + + onUnmounted(() => { + off(document, 'mouseup', mouseUpDocumentHandler); + }); + + return () => + h( + 'div', + { + class: ['scrollbar__bar', 'is-' + bar.value.key], + onMousedown: clickTrackHandler, + }, + h('div', { + ref: thumb, + class: 'scrollbar__thumb', + onMousedown: clickThumbHandler, + style: renderThumbStyle({ + size: props.size, + move: props.move, + bar: bar.value, + }), + }) + ); + }, +}); diff --git a/src/components/Scrollbar/src/types.d.ts b/src/components/Scrollbar/src/types.d.ts new file mode 100644 index 0000000..4c7eeea --- /dev/null +++ b/src/components/Scrollbar/src/types.d.ts @@ -0,0 +1,18 @@ +export interface BarMapItem { + offset: string; + scroll: string; + scrollSize: string; + size: string; + key: string; + axis: string; + client: string; + direction: string; +} +export interface BarMap { + vertical: BarMapItem; + horizontal: BarMapItem; +} + +export interface ScrollbarType { + wrap: ElRef; +} diff --git a/src/components/Scrollbar/src/util.ts b/src/components/Scrollbar/src/util.ts new file mode 100644 index 0000000..b7c4845 --- /dev/null +++ b/src/components/Scrollbar/src/util.ts @@ -0,0 +1,50 @@ +import type { BarMap } from './types'; +export const BAR_MAP: BarMap = { + vertical: { + offset: 'offsetHeight', + scroll: 'scrollTop', + scrollSize: 'scrollHeight', + size: 'height', + key: 'vertical', + axis: 'Y', + client: 'clientY', + direction: 'top', + }, + horizontal: { + offset: 'offsetWidth', + scroll: 'scrollLeft', + scrollSize: 'scrollWidth', + size: 'width', + key: 'horizontal', + axis: 'X', + client: 'clientX', + direction: 'left', + }, +}; + +// @ts-ignore +export function renderThumbStyle({ move, size, bar }) { + const style = {} as any; + const translate = `translate${bar.axis}(${move}%)`; + + style[bar.size] = size; + style.transform = translate; + style.msTransform = translate; + style.webkitTransform = translate; + + return style; +} + +function extend(to: T, _from: K): T & K { + return Object.assign(to, _from); +} + +export function toObject(arr: Array): Recordable { + const res = {}; + for (let i = 0; i < arr.length; i++) { + if (arr[i]) { + extend(res, arr[i]); + } + } + return res; +} diff --git a/src/components/SimpleMenu/index.ts b/src/components/SimpleMenu/index.ts new file mode 100644 index 0000000..0dfd248 --- /dev/null +++ b/src/components/SimpleMenu/index.ts @@ -0,0 +1,2 @@ +export { default as SimpleMenu } from './src/SimpleMenu.vue'; +export { default as SimpleMenuTag } from './src/SimpleMenuTag.vue'; diff --git a/src/components/SimpleMenu/src/SimpleMenu.vue b/src/components/SimpleMenu/src/SimpleMenu.vue new file mode 100644 index 0000000..3bdf4c4 --- /dev/null +++ b/src/components/SimpleMenu/src/SimpleMenu.vue @@ -0,0 +1,195 @@ + + + diff --git a/src/components/SimpleMenu/src/SimpleMenuTag.vue b/src/components/SimpleMenu/src/SimpleMenuTag.vue new file mode 100644 index 0000000..b7d3cb3 --- /dev/null +++ b/src/components/SimpleMenu/src/SimpleMenuTag.vue @@ -0,0 +1,68 @@ + + diff --git a/src/components/SimpleMenu/src/SimpleSubMenu.vue b/src/components/SimpleMenu/src/SimpleSubMenu.vue new file mode 100644 index 0000000..278a7db --- /dev/null +++ b/src/components/SimpleMenu/src/SimpleSubMenu.vue @@ -0,0 +1,117 @@ + + diff --git a/src/components/SimpleMenu/src/components/Menu.vue b/src/components/SimpleMenu/src/components/Menu.vue new file mode 100644 index 0000000..80c0f65 --- /dev/null +++ b/src/components/SimpleMenu/src/components/Menu.vue @@ -0,0 +1,148 @@ + + + + diff --git a/src/components/SimpleMenu/src/components/MenuCollapseTransition.vue b/src/components/SimpleMenu/src/components/MenuCollapseTransition.vue new file mode 100644 index 0000000..5295439 --- /dev/null +++ b/src/components/SimpleMenu/src/components/MenuCollapseTransition.vue @@ -0,0 +1,78 @@ + + diff --git a/src/components/SimpleMenu/src/components/MenuItem.vue b/src/components/SimpleMenu/src/components/MenuItem.vue new file mode 100644 index 0000000..0b7afc7 --- /dev/null +++ b/src/components/SimpleMenu/src/components/MenuItem.vue @@ -0,0 +1,127 @@ + + + diff --git a/src/components/SimpleMenu/src/components/SubMenuItem.vue b/src/components/SimpleMenu/src/components/SubMenuItem.vue new file mode 100644 index 0000000..e52f214 --- /dev/null +++ b/src/components/SimpleMenu/src/components/SubMenuItem.vue @@ -0,0 +1,319 @@ + + + diff --git a/src/components/SimpleMenu/src/components/menu.less b/src/components/SimpleMenu/src/components/menu.less new file mode 100644 index 0000000..4d25785 --- /dev/null +++ b/src/components/SimpleMenu/src/components/menu.less @@ -0,0 +1,340 @@ +@menu-prefix-cls: ~'@{namespace}-menu'; +@menu-popup-prefix-cls: ~'@{namespace}-menu-popup'; +@submenu-popup-prefix-cls: ~'@{namespace}-menu-submenu-popup'; + +@transition-time: 0.2s; +@menu-dark-subsidiary-color: rgba(255, 255, 255, 0.7); + +.light-border { + &::after { + position: absolute; + top: 0; + right: 0; + bottom: 0; + display: block; + width: 2px; + background-color: @primary-color; + content: ''; + } +} + +.@{menu-prefix-cls}-menu-popover { + .ant-popover-arrow { + display: none; + } + + .ant-popover-inner-content { + padding: 0; + } + + .@{menu-prefix-cls} { + &-opened > * > &-submenu-title-icon { + transform: translateY(-50%) rotate(90deg) !important; + } + + &-item, + &-submenu-title { + position: relative; + z-index: 1; + padding: 10px 14px; + color: @menu-dark-subsidiary-color; + cursor: pointer; + transition: all @transition-time @ease-in-out; + + &-icon { + position: absolute; + top: 50%; + right: 18px; + transform: translateY(-50%) rotate(-90deg); + transition: transform @transition-time @ease-in-out; + } + } + + &-dark { + .@{menu-prefix-cls}-item, + .@{menu-prefix-cls}-submenu-title { + color: @menu-dark-subsidiary-color; + // background: @menu-dark-active-bg; + + &:hover { + color: #fff; + } + + &-selected { + color: #fff; + background-color: @primary-color !important; + } + } + // 彩色模式(绿色,橘红等) + &.bright { + .@{menu-prefix-cls}-item, + .@{menu-prefix-cls}-submenu-title { + color: #fff; + &:hover { + color: rgba(255, 255, 255, 0.8); + } + } + } + } + + &-light { + .@{menu-prefix-cls}-item, + .@{menu-prefix-cls}-submenu-title { + color: @text-color-base; + + &:hover { + color: @primary-color; + } + + &-selected { + z-index: 2; + color: @primary-color; + background-color: fade(@primary-color, 10); + + .light-border(); + } + } + } + } +} + +.content(); +.content() { + .@{menu-prefix-cls} { + position: relative; + display: block; + width: 100%; + padding: 0; + margin: 0; + font-size: @font-size-base; + color: @text-color-base; + list-style: none; + outline: none; + + // .collapse-transition { + // transition: @transition-time height ease-in-out, @transition-time padding-top ease-in-out, + // @transition-time padding-bottom ease-in-out; + // } + + &-light { + background-color: #fff; + color: rgba(0, 0, 0, 0.65); + .@{menu-prefix-cls} { + color: rgba(0, 0, 0, 0.65); + } + .@{namespace}-menu-submenu:not(.@{namespace}-menu-item-active) .@{namespace}-menu-submenu-title { + .anticon { + color: rgba(0, 0, 0, 0.9); + } + } + .@{menu-prefix-cls}-submenu-active { + color: @primary-color !important; + + &-border { + .light-border(); + } + } + } + + &-dark { + .@{menu-prefix-cls}-submenu-active { + color: #fff !important; + } + } + + &-item { + position: relative; + z-index: 1; + display: flex; + font-size: @font-size-base; + list-style: none; + cursor: pointer; + outline: none; + align-items: center; + + &:hover, + &:active { + color: inherit; + } + } + + &-item > i { + margin-right: 6px; + } + + &-submenu-title > i, + &-submenu-title span > i { + margin-right: 8px; + } + + // vertical + &-vertical &-item, + &-vertical &-submenu-title { + position: relative; + z-index: 1; + padding: 14px 24px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + cursor: pointer; + + &:hover { + color: @primary-color; + } + + .@{menu-prefix-cls}-tooltip { + width: calc(100% - 0px); + padding: 12px 0; + text-align: center; + } + .@{menu-prefix-cls}-submenu-popup { + padding: 12px 0; + } + } + + &-vertical &-submenu-collapse { + .@{submenu-popup-prefix-cls} { + display: flex; + justify-content: center; + align-items: center; + } + .@{menu-prefix-cls}-submenu-collapsed-show-tit { + flex-direction: column; + } + } + + &-vertical&-collapse &-item, + &-vertical&-collapse &-submenu-title { + padding: 0 0; + } + + &-vertical &-submenu-title-icon { + position: absolute; + top: 50%; + right: 18px; + transform: translateY(-50%); + } + + &-submenu-title-icon { + transition: transform @transition-time @ease-in-out; + } + + &-vertical &-opened > * > &-submenu-title-icon { + transform: translateY(-50%) rotate(180deg); + } + + &-vertical &-submenu { + &-nested { + padding-left: 20px; + } + .@{menu-prefix-cls}-item { + padding-left: 43px; + } + } + + &-light&-vertical &-item { + &-active:not(.@{menu-prefix-cls}-submenu) { + z-index: 2; + color: @primary-color; + background-color: fade(@primary-color, 10); + + .light-border(); + } + &-active.@{menu-prefix-cls}-submenu { + color: @primary-color; + } + } + + &-light&-vertical&-collapse { + > li.@{menu-prefix-cls}-item-active, + .@{menu-prefix-cls}-submenu-active { + position: relative; + background-color: fade(@primary-color, 5); + + &::after { + display: none; + } + + &::before { + position: absolute; + top: 0; + left: 0; + width: 3px; + height: 100%; + background-color: @primary-color; + content: ''; + } + } + } + + &-dark&-vertical &-item, + &-dark&-vertical &-submenu-title { + color: @menu-dark-subsidiary-color; + &-active:not(.@{menu-prefix-cls}-submenu) { + color: #fff !important; + background-color: @primary-color !important; + } + + &:hover { + color: #fff; + } + } + // update-begin--author:liaozhiyang---date:20240408---for:【QQYUN-8922】左侧导航栏文字颜色调整区分彩色和暗黑 + &-dark&-vertical&.bright &-item, + &-dark&-vertical.bright &-submenu-title { + color: rgba(255, 255, 255, 1); + &-active:not(.@{menu-prefix-cls}-submenu) { + color: #fff !important; + background-color: @primary-color !important; + } + + &:hover { + color: rgba(255, 255, 255, 0.8); + } + } + // update-end--author:liaozhiyang---date:20240408---for:【QQYUN-8922】左侧导航栏文字颜色调整区分彩色和暗黑 + + &-dark&-vertical&-collapse { + > li.@{menu-prefix-cls}-item-active, + .@{menu-prefix-cls}-submenu-active { + position: relative; + color: #fff !important; + background-color: @primary-color !important; + + &::before { + position: absolute; + top: 0; + left: 0; + width: 3px; + height: 100%; + background-color: @primary-color; + content: ''; + } + + .@{menu-prefix-cls}-submenu-collapse { + background-color: transparent; + } + } + } + + &-dark&-vertical &-submenu &-item { + &-active, + &-active:hover { + color: #fff; + border-right: none; + } + } + + &-dark&-vertical &-child-item-active > &-submenu-title { + color: #fff; + } + + &-dark&-vertical &-opened { + .@{menu-prefix-cls}-submenu-has-parent-submenu { + .@{menu-prefix-cls}-submenu-title { + background-color: transparent; + } + } + } + } +} diff --git a/src/components/SimpleMenu/src/components/types.ts b/src/components/SimpleMenu/src/components/types.ts new file mode 100644 index 0000000..d828e89 --- /dev/null +++ b/src/components/SimpleMenu/src/components/types.ts @@ -0,0 +1,25 @@ +import { Ref } from 'vue'; + +export interface Props { + theme: string; + activeName?: string | number | undefined; + openNames: string[]; + accordion: boolean; + width: string; + collapsedWidth: string; + indentSize: number; + collapse: boolean; + activeSubMenuNames: (string | number)[]; +} + +export interface SubMenuProvider { + addSubMenu: (name: string | number, update?: boolean) => void; + removeSubMenu: (name: string | number, update?: boolean) => void; + removeAll: () => void; + sliceIndex: (index: number) => void; + isRemoveAllPopup: Ref; + getOpenNames: () => (string | number)[]; + handleMouseleave?: Fn; + level: number; + props: Props; +} diff --git a/src/components/SimpleMenu/src/components/useMenu.ts b/src/components/SimpleMenu/src/components/useMenu.ts new file mode 100644 index 0000000..8830559 --- /dev/null +++ b/src/components/SimpleMenu/src/components/useMenu.ts @@ -0,0 +1,84 @@ +import { computed, ComponentInternalInstance, unref } from 'vue'; +import type { CSSProperties } from 'vue'; + +export function useMenuItem(instance: ComponentInternalInstance | null) { + const getParentMenu = computed(() => { + return findParentMenu(['Menu', 'SubMenu']); + }); + + const getParentRootMenu = computed(() => { + return findParentMenu(['Menu']); + }); + + const getParentSubMenu = computed(() => { + return findParentMenu(['SubMenu']); + }); + + const getItemStyle = computed((): CSSProperties => { + let parent = instance?.parent; + if (!parent) return {}; + const indentSize = (unref(getParentRootMenu)?.props.indentSize as number) ?? 20; + let padding = indentSize; + + if (unref(getParentRootMenu)?.props.collapse) { + padding = indentSize; + } else { + while (parent && parent.type.name !== 'Menu') { + if (parent.type.name === 'SubMenu') { + padding += indentSize; + } + parent = parent.parent; + } + } + return { paddingLeft: padding + 'px' }; + }); + + function findParentMenu(name: string[]) { + let parent = instance?.parent; + if (!parent) return null; + while (parent && name.indexOf(parent.type.name!) === -1) { + parent = parent.parent; + } + return parent; + } + + function getParentList() { + let parent = instance; + if (!parent) + return { + uidList: [], + list: [], + }; + const ret: any[] = []; + while (parent && parent.type.name !== 'Menu') { + if (parent.type.name === 'SubMenu') { + ret.push(parent); + } + parent = parent.parent; + } + return { + uidList: ret.map((item) => item.uid), + list: ret, + }; + } + + function getParentInstance(instance: ComponentInternalInstance, name = 'SubMenu') { + let parent = instance.parent; + while (parent) { + if (parent.type.name !== name) { + return parent; + } + parent = parent.parent; + } + return parent; + } + + return { + getParentMenu, + getParentInstance, + getParentRootMenu, + getParentList, + getParentSubMenu, + getItemStyle, + }; +} diff --git a/src/components/SimpleMenu/src/components/useSimpleMenuContext.ts b/src/components/SimpleMenu/src/components/useSimpleMenuContext.ts new file mode 100644 index 0000000..f3d8100 --- /dev/null +++ b/src/components/SimpleMenu/src/components/useSimpleMenuContext.ts @@ -0,0 +1,18 @@ +import type { InjectionKey, Ref } from 'vue'; +import type { Emitter } from '/@/utils/mitt'; +import { createContext, useContext } from '/@/hooks/core/useContext'; + +export interface SimpleRootMenuContextProps { + rootMenuEmitter: Emitter; + activeName: Ref; +} + +const key: InjectionKey = Symbol(); + +export function createSimpleRootMenuContext(context: SimpleRootMenuContextProps) { + return createContext(context, key, { readonly: false, native: true }); +} + +export function useSimpleRootMenuContext() { + return useContext(key); +} diff --git a/src/components/SimpleMenu/src/index.less b/src/components/SimpleMenu/src/index.less new file mode 100644 index 0000000..4f9c9ce --- /dev/null +++ b/src/components/SimpleMenu/src/index.less @@ -0,0 +1,77 @@ +@simple-prefix-cls: ~'@{namespace}-simple-menu'; +@prefix-cls: ~'@{namespace}-menu'; + +.@{prefix-cls} { + &-dark&-vertical .@{simple-prefix-cls}__parent { + background-color: @sider-dark-bg-color; + > .@{prefix-cls}-submenu-title { + background-color: @sider-dark-bg-color; + } + } + + &-dark&-vertical .@{simple-prefix-cls}__children, + &-dark&-popup .@{simple-prefix-cls}__children { + background-color: @sider-dark-lighten-bg-color; + > .@{prefix-cls}-submenu-title { + background-color: @sider-dark-lighten-bg-color; + } + } + + .collapse-title { + overflow: hidden; + font-size: 12px; + text-overflow: ellipsis; + white-space: nowrap; + } +} + +.@{simple-prefix-cls} { + &-sub-title { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + transition: all 0.3s; + } + + &-tag { + position: absolute; + top: calc(50% - 8px); + right: 30px; + display: inline-block; + padding: 2px 3px; + margin-right: 4px; + font-size: 10px; + line-height: 14px; + color: #fff; + border-radius: 2px; + + &--collapse { + top: 6px !important; + right: 2px; + } + + &--dot { + top: calc(50% - 2px); + width: 6px; + height: 6px; + padding: 0; + border-radius: 50%; + } + + &--primary { + background-color: @primary-color; + } + + &--error { + background-color: @error-color; + } + + &--success { + background-color: @success-color; + } + + &--warn { + background-color: @warning-color; + } + } +} diff --git a/src/components/SimpleMenu/src/types.ts b/src/components/SimpleMenu/src/types.ts new file mode 100644 index 0000000..2e292d4 --- /dev/null +++ b/src/components/SimpleMenu/src/types.ts @@ -0,0 +1,5 @@ +export interface MenuState { + activeName: string; + openNames: string[]; + activeSubMenuNames: string[]; +} diff --git a/src/components/SimpleMenu/src/useOpenKeys.ts b/src/components/SimpleMenu/src/useOpenKeys.ts new file mode 100644 index 0000000..c38b92c --- /dev/null +++ b/src/components/SimpleMenu/src/useOpenKeys.ts @@ -0,0 +1,44 @@ +import type { Menu as MenuType } from '/@/router/types'; +import type { MenuState } from './types'; + +import { computed, Ref, toRaw } from 'vue'; + +import { unref } from 'vue'; +import { uniq } from 'lodash-es'; +import { getAllParentPath } from '/@/router/helper/menuHelper'; + +import { useTimeoutFn } from '/@/hooks/core/useTimeout'; +import { useDebounceFn } from '@vueuse/core'; + +export function useOpenKeys(menuState: MenuState, menus: Ref, accordion: Ref, mixSider: Ref, collapse: Ref) { + const debounceSetOpenKeys = useDebounceFn(setOpenKeys, 50); + async function setOpenKeys(path: string) { + const native = !mixSider.value; + const menuList = toRaw(menus.value); + useTimeoutFn( + () => { + if (menuList?.length === 0) { + menuState.activeSubMenuNames = []; + menuState.openNames = []; + return; + } + const keys = getAllParentPath(menuList, path); + + if (!unref(accordion)) { + menuState.openNames = uniq([...menuState.openNames, ...keys]); + } else { + menuState.openNames = keys; + } + menuState.activeSubMenuNames = menuState.openNames; + }, + 30, + native + ); + } + + const getOpenKeys = computed(() => { + return unref(collapse) ? [] : menuState.openNames; + }); + + return { setOpenKeys: debounceSetOpenKeys, getOpenKeys }; +} diff --git a/src/components/StrengthMeter/index.ts b/src/components/StrengthMeter/index.ts new file mode 100644 index 0000000..9763afa --- /dev/null +++ b/src/components/StrengthMeter/index.ts @@ -0,0 +1,4 @@ +import { withInstall } from '/@/utils'; +import strengthMeter from './src/StrengthMeter.vue'; + +export const StrengthMeter = withInstall(strengthMeter); diff --git a/src/components/StrengthMeter/src/StrengthMeter.vue b/src/components/StrengthMeter/src/StrengthMeter.vue new file mode 100644 index 0000000..4b3c582 --- /dev/null +++ b/src/components/StrengthMeter/src/StrengthMeter.vue @@ -0,0 +1,139 @@ + + + + diff --git a/src/components/Table/index.ts b/src/components/Table/index.ts new file mode 100644 index 0000000..7fe08c9 --- /dev/null +++ b/src/components/Table/index.ts @@ -0,0 +1,10 @@ +export { default as BasicTable } from './src/BasicTable.vue'; +export { default as TableAction } from './src/components/TableAction.vue'; +export { default as EditTableHeaderIcon } from './src/components/EditTableHeaderIcon.vue'; +export { default as TableImg } from './src/components/TableImg.vue'; +export * from './src/types/table'; +export * from './src/types/pagination'; +export * from './src/types/tableAction'; +export { useTable } from './src/hooks/useTable'; +export type { FormSchema, FormProps } from '/@/components/Form/src/types/form'; +export type { EditRecordRow } from './src/components/editable'; diff --git a/src/components/Table/src/BasicTable.vue b/src/components/Table/src/BasicTable.vue new file mode 100644 index 0000000..ad26405 --- /dev/null +++ b/src/components/Table/src/BasicTable.vue @@ -0,0 +1,633 @@ + + + diff --git a/src/components/Table/src/componentMap.ts b/src/components/Table/src/componentMap.ts new file mode 100644 index 0000000..0578a60 --- /dev/null +++ b/src/components/Table/src/componentMap.ts @@ -0,0 +1,26 @@ +import type { Component } from 'vue'; +import { Input, Select, Checkbox, InputNumber, Switch, DatePicker, TimePicker } from 'ant-design-vue'; +import type { ComponentType } from './types/componentType'; +import { ApiSelect, ApiTreeSelect } from '/@/components/Form'; + +const componentMap = new Map(); + +componentMap.set('Input', Input); +componentMap.set('InputNumber', InputNumber); +componentMap.set('Select', Select); +componentMap.set('ApiSelect', ApiSelect); +componentMap.set('ApiTreeSelect', ApiTreeSelect); +componentMap.set('Switch', Switch); +componentMap.set('Checkbox', Checkbox); +componentMap.set('DatePicker', DatePicker); +componentMap.set('TimePicker', TimePicker); + +export function add(compName: ComponentType, component: Component) { + componentMap.set(compName, component); +} + +export function del(compName: ComponentType) { + componentMap.delete(compName); +} + +export { componentMap }; diff --git a/src/components/Table/src/components/CustomSelectHeader.vue b/src/components/Table/src/components/CustomSelectHeader.vue new file mode 100644 index 0000000..7a385e4 --- /dev/null +++ b/src/components/Table/src/components/CustomSelectHeader.vue @@ -0,0 +1,67 @@ + + + + + diff --git a/src/components/Table/src/components/EditTableHeaderIcon.vue b/src/components/Table/src/components/EditTableHeaderIcon.vue new file mode 100644 index 0000000..369820e --- /dev/null +++ b/src/components/Table/src/components/EditTableHeaderIcon.vue @@ -0,0 +1,16 @@ + + diff --git a/src/components/Table/src/components/ExpandIcon.tsx b/src/components/Table/src/components/ExpandIcon.tsx new file mode 100644 index 0000000..3d1d98d --- /dev/null +++ b/src/components/Table/src/components/ExpandIcon.tsx @@ -0,0 +1,23 @@ +import { BasicArrow } from '/@/components/Basic'; + +export default () => { + return (props: Recordable) => { + if (!props.expandable) { + if (props.needIndentSpaced) { + return ; + } else { + return ; + } + } + return ( + { + props.onExpand(props.record, e); + }} + expand={props.expanded} + /> + ); + }; +}; diff --git a/src/components/Table/src/components/HeaderCell.vue b/src/components/Table/src/components/HeaderCell.vue new file mode 100644 index 0000000..81bfaa8 --- /dev/null +++ b/src/components/Table/src/components/HeaderCell.vue @@ -0,0 +1,57 @@ + + + diff --git a/src/components/Table/src/components/TableAction.vue b/src/components/Table/src/components/TableAction.vue new file mode 100644 index 0000000..5044212 --- /dev/null +++ b/src/components/Table/src/components/TableAction.vue @@ -0,0 +1,319 @@ + + + diff --git a/src/components/Table/src/components/TableFooter.vue b/src/components/Table/src/components/TableFooter.vue new file mode 100644 index 0000000..162e778 --- /dev/null +++ b/src/components/Table/src/components/TableFooter.vue @@ -0,0 +1,153 @@ + + + diff --git a/src/components/Table/src/components/TableHeader.vue b/src/components/Table/src/components/TableHeader.vue new file mode 100644 index 0000000..f936b75 --- /dev/null +++ b/src/components/Table/src/components/TableHeader.vue @@ -0,0 +1,165 @@ + + + diff --git a/src/components/Table/src/components/TableImg.vue b/src/components/Table/src/components/TableImg.vue new file mode 100644 index 0000000..29a0907 --- /dev/null +++ b/src/components/Table/src/components/TableImg.vue @@ -0,0 +1,76 @@ + + + diff --git a/src/components/Table/src/components/TableSummary.tsx b/src/components/Table/src/components/TableSummary.tsx new file mode 100644 index 0000000..63709b4 --- /dev/null +++ b/src/components/Table/src/components/TableSummary.tsx @@ -0,0 +1,163 @@ +import type { PropType, VNode } from 'vue'; +import { defineComponent, unref, computed, isVNode } from 'vue'; +import { cloneDeep, pick } from 'lodash-es'; +import { isFunction } from '/@/utils/is'; +import type { BasicColumn } from '../types/table'; +import { INDEX_COLUMN_FLAG } from '../const'; +import { propTypes } from '/@/utils/propTypes'; +import { useTableContext } from '../hooks/useTableContext'; +import { TableSummary, TableSummaryRow, TableSummaryCell } from 'ant-design-vue'; + +const SUMMARY_ROW_KEY = '_row'; +const SUMMARY_INDEX_KEY = '_index'; +export default defineComponent({ + name: 'BasicTableSummary', + components: { TableSummary, TableSummaryRow, TableSummaryCell }, + props: { + summaryFunc: { + type: Function as PropType, + }, + summaryData: { + type: Array as PropType, + }, + rowKey: propTypes.string.def('key'), + // 是否有展开列 + hasExpandedRow: propTypes.bool, + data: { + type: Object as PropType, + default: () => {}, + }, + }, + setup(props) { + const table = useTableContext(); + + const getDataSource = computed((): Recordable[] => { + const { + summaryFunc, + summaryData, + data: { pageData }, + } = props; + if (summaryData?.length) { + summaryData.forEach((item, i) => (item[props.rowKey] = `${i}`)); + return summaryData; + } + if (!isFunction(summaryFunc)) { + return []; + } + let dataSource = cloneDeep(unref(pageData)); + dataSource = summaryFunc(dataSource); + dataSource.forEach((item, i) => { + item[props.rowKey] = `${i}`; + }); + return dataSource; + }); + + const getColumns = computed(() => { + const dataSource = unref(getDataSource); + let columns: BasicColumn[] = cloneDeep(table.getColumns({ sort: true })); + columns = columns.filter((item) => !item.defaultHidden); + const index = columns.findIndex((item) => item.flag === INDEX_COLUMN_FLAG); + const hasRowSummary = dataSource.some((item) => Reflect.has(item, SUMMARY_ROW_KEY)); + const hasIndexSummary = dataSource.some((item) => Reflect.has(item, SUMMARY_INDEX_KEY)); + + // 是否有序号列 + let hasIndexCol = false; + // 是否有选择列 + const hasSelection = table.getRowSelection() && hasRowSummary; + + if (index !== -1) { + if (hasIndexSummary) { + hasIndexCol = true; + columns[index].customSummaryRender = ({ record }) => record[SUMMARY_INDEX_KEY]; + columns[index].ellipsis = false; + } else { + Reflect.deleteProperty(columns[index], 'customSummaryRender'); + } + } + + if (hasSelection) { + const isFixed = columns.some((col) => col.fixed === 'left' || col.fixed === true); + columns.unshift({ + width: 60, + title: 'selection', + key: 'selectionKey', + align: 'center', + ...(isFixed ? { fixed: 'left' } : {}), + customSummaryRender: ({ record }) => (hasIndexCol ? '' : record[SUMMARY_ROW_KEY]), + }); + } + + if (props.hasExpandedRow) { + const isFixed = columns.some((col) => col.fixed === 'left'); + columns.unshift({ + width: 50, + title: 'expandedRow', + key: 'expandedRowKey', + align: 'center', + ...(isFixed ? { fixed: 'left' } : {}), + customSummaryRender: () => '', + }); + } + return columns; + }); + + function isRenderCell(data: any) { + return data && typeof data === 'object' && !Array.isArray(data) && !isVNode(data); + } + + const getValues = (row: Recordable, col: BasicColumn, index: number) => { + const value = row[col.dataIndex as string]; + let childNode: VNode | JSX.Element | string | number | undefined | null; + childNode = value; + if (col.customSummaryRender) { + const renderData = col.customSummaryRender({ + text: value, + value, + record: row, + index, + column: cloneDeep(col), + }); + if (isRenderCell(renderData)) { + childNode = renderData.children; + } else { + childNode = renderData; + } + if (typeof childNode === 'object' && !Array.isArray(childNode) && !isVNode(childNode)) { + childNode = null; + } + if (Array.isArray(childNode) && childNode.length === 1) { + childNode = childNode[0]; + } + return childNode; + } + return childNode; + }; + + const getCellProps = (col: BasicColumn) => { + const cellProps = pick(col, ['colSpan', 'rowSpan', 'align']); + return { + ...cellProps, + }; + }; + + return () => { + return ( + + {(unref(getDataSource) || []).map((row) => { + return ( + + {unref(getColumns).map((col, index) => { + return ( + + {getValues(row, col, index)} + + ); + })} + + ); + })} + + ); + }; + }, +}); diff --git a/src/components/Table/src/components/TableTitle.vue b/src/components/Table/src/components/TableTitle.vue new file mode 100644 index 0000000..0b797e1 --- /dev/null +++ b/src/components/Table/src/components/TableTitle.vue @@ -0,0 +1,53 @@ + + + diff --git a/src/components/Table/src/components/editable/CellComponent.ts b/src/components/Table/src/components/editable/CellComponent.ts new file mode 100644 index 0000000..e07898d --- /dev/null +++ b/src/components/Table/src/components/editable/CellComponent.ts @@ -0,0 +1,38 @@ +import type { FunctionalComponent, defineComponent } from 'vue'; +import type { ComponentType } from '../../types/componentType'; +import { componentMap } from '/@/components/Table/src/componentMap'; + +import { Popover } from 'ant-design-vue'; +import { h } from 'vue'; + +export interface ComponentProps { + component: ComponentType; + rule: boolean; + popoverVisible: boolean; + ruleMessage: string; + getPopupContainer?: Fn; +} + +export const CellComponent: FunctionalComponent = ( + { component = 'Input', rule = true, ruleMessage, popoverVisible, getPopupContainer }: ComponentProps, + { attrs } +) => { + const Comp = componentMap.get(component) as typeof defineComponent; + + const DefaultComp = h(Comp, attrs); + if (!rule) { + return DefaultComp; + } + return h( + Popover, + { + overlayClassName: 'edit-cell-rule-popover', + open: !!popoverVisible, + ...(getPopupContainer ? { getPopupContainer } : {}), + }, + { + default: () => DefaultComp, + content: () => ruleMessage, + } + ); +}; diff --git a/src/components/Table/src/components/editable/EditableCell.vue b/src/components/Table/src/components/editable/EditableCell.vue new file mode 100644 index 0000000..edc2541 --- /dev/null +++ b/src/components/Table/src/components/editable/EditableCell.vue @@ -0,0 +1,515 @@ + + + diff --git a/src/components/Table/src/components/editable/helper.ts b/src/components/Table/src/components/editable/helper.ts new file mode 100644 index 0000000..d901729 --- /dev/null +++ b/src/components/Table/src/components/editable/helper.ts @@ -0,0 +1,28 @@ +import { ComponentType } from '../../types/componentType'; +import { useI18n } from '/@/hooks/web/useI18n'; + +const { t } = useI18n(); + +/** + * @description: 生成placeholder + */ +export function createPlaceholderMessage(component: ComponentType) { + if (component.includes('Input')) { + return t('common.inputText'); + } + if (component.includes('Picker')) { + return t('common.chooseText'); + } + + if ( + component.includes('Select') || + component.includes('Checkbox') || + component.includes('Radio') || + component.includes('Switch') || + component.includes('DatePicker') || + component.includes('TimePicker') + ) { + return t('common.chooseText'); + } + return ''; +} diff --git a/src/components/Table/src/components/editable/index.ts b/src/components/Table/src/components/editable/index.ts new file mode 100644 index 0000000..4191473 --- /dev/null +++ b/src/components/Table/src/components/editable/index.ts @@ -0,0 +1,78 @@ +import type { BasicColumn } from '/@/components/Table/src/types/table'; + +import { h, Ref, toRaw } from 'vue'; + +import EditableCell from './EditableCell.vue'; +import { isArray } from '/@/utils/is'; + +interface Params { + text: string; + record: Recordable; + index: number; +} + +export function renderEditCell(column: BasicColumn) { + return ({ text: value, record, index }: Params) => { + toRaw(record).onValid = async () => { + if (isArray(record?.validCbs)) { + // update-begin--author:liaozhiyang---date:20240424---for:【issues/1165】解决canResize为true时第一行校验不过 + const validFns = (record?.validCbs || []).map((item) => { + const [fn] = Object.values(item); + // @ts-ignore + return fn(); + }); + // update-end--author:liaozhiyang---date:20240424---for:【issues/1165】解决canResize为true时第一行校验不过 + const res = await Promise.all(validFns); + return res.every((item) => !!item); + } else { + return false; + } + }; + + toRaw(record).onEdit = async (edit: boolean, submit = false) => { + if (!submit) { + record.editable = edit; + } + + if (!edit && submit) { + if (!(await record.onValid())) return false; + const res = await record.onSubmitEdit?.(); + if (res) { + record.editable = false; + return true; + } + return false; + } + // cancel + if (!edit && !submit) { + record.onCancelEdit?.(); + } + return true; + }; + + return h(EditableCell, { + value, + record, + column, + index, + }); + }; +} + +interface Cbs { + [key: string]: Fn; +} + +export type EditRecordRow = Partial< + { + onEdit: (editable: boolean, submit?: boolean) => Promise; + onValid: () => Promise; + editable: boolean; + onCancel: Fn; + onSubmit: Fn; + submitCbs: Cbs[]; + cancelCbs: Cbs[]; + validCbs: Cbs[]; + editValueRefs: Recordable; + } & T +>; diff --git a/src/components/Table/src/components/settings/ColumnSetting.vue b/src/components/Table/src/components/settings/ColumnSetting.vue new file mode 100644 index 0000000..adba5f5 --- /dev/null +++ b/src/components/Table/src/components/settings/ColumnSetting.vue @@ -0,0 +1,591 @@ + + + diff --git a/src/components/Table/src/components/settings/FullScreenSetting.vue b/src/components/Table/src/components/settings/FullScreenSetting.vue new file mode 100644 index 0000000..046d647 --- /dev/null +++ b/src/components/Table/src/components/settings/FullScreenSetting.vue @@ -0,0 +1,48 @@ + + diff --git a/src/components/Table/src/components/settings/RedoSetting.vue b/src/components/Table/src/components/settings/RedoSetting.vue new file mode 100644 index 0000000..e584c13 --- /dev/null +++ b/src/components/Table/src/components/settings/RedoSetting.vue @@ -0,0 +1,45 @@ + + diff --git a/src/components/Table/src/components/settings/SizeSetting.vue b/src/components/Table/src/components/settings/SizeSetting.vue new file mode 100644 index 0000000..355816c --- /dev/null +++ b/src/components/Table/src/components/settings/SizeSetting.vue @@ -0,0 +1,99 @@ + + diff --git a/src/components/Table/src/components/settings/index.vue b/src/components/Table/src/components/settings/index.vue new file mode 100644 index 0000000..3a615ad --- /dev/null +++ b/src/components/Table/src/components/settings/index.vue @@ -0,0 +1,74 @@ + + + diff --git a/src/components/Table/src/const.ts b/src/components/Table/src/const.ts new file mode 100644 index 0000000..9968ec5 --- /dev/null +++ b/src/components/Table/src/const.ts @@ -0,0 +1,30 @@ +import componentSetting from '/@/settings/componentSetting'; + +const { table } = componentSetting; + +const { pageSizeOptions, defaultPageSize, defaultSize, fetchSetting, defaultSortFn, defaultFilterFn } = table; + +export const ROW_KEY = 'key'; + +// Optional display number per page; +export const PAGE_SIZE_OPTIONS = pageSizeOptions; + +// Number of items displayed per page +export const PAGE_SIZE = defaultPageSize; + +// Common interface field settings +export const FETCH_SETTING = fetchSetting; + +// Configure general sort function +export const DEFAULT_SORT_FN = defaultSortFn; + +export const DEFAULT_FILTER_FN = defaultFilterFn; + +// Default layout of table cells +export const DEFAULT_ALIGN = 'center'; +// Default Size +export const DEFAULT_SIZE = defaultSize; + +export const INDEX_COLUMN_FLAG = 'INDEX'; + +export const ACTION_COLUMN_FLAG = 'ACTION'; diff --git a/src/components/Table/src/hooks/useColumns.ts b/src/components/Table/src/hooks/useColumns.ts new file mode 100644 index 0000000..fdfb769 --- /dev/null +++ b/src/components/Table/src/hooks/useColumns.ts @@ -0,0 +1,370 @@ +import type { BasicColumn, BasicTableProps, CellFormat, GetColumnsParams } from '../types/table'; +import type { PaginationProps } from '../types/pagination'; +import type { ComputedRef } from 'vue'; +import { Table } from 'ant-design-vue'; +import { computed, Ref, ref, toRaw, unref, watch, reactive } from 'vue'; +import { renderEditCell } from '../components/editable'; +import { usePermission } from '/@/hooks/web/usePermission'; +import { useI18n } from '/@/hooks/web/useI18n'; +import { isArray, isBoolean, isFunction, isMap, isString } from '/@/utils/is'; +import { cloneDeep, isEqual } from 'lodash-es'; +import { formatToDate } from '/@/utils/dateUtil'; +import { ACTION_COLUMN_FLAG, DEFAULT_ALIGN, INDEX_COLUMN_FLAG, PAGE_SIZE } from '../const'; +import { CUS_SEL_COLUMN_KEY } from './useCustomSelection'; + +function handleItem(item: BasicColumn, ellipsis: boolean) { + const { key, dataIndex, children } = item; + item.align = item.align || DEFAULT_ALIGN; + if (ellipsis) { + if (!key) { + item.key = dataIndex; + } + if (!isBoolean(item.ellipsis)) { + Object.assign(item, { + ellipsis, + }); + } + } + if (children && children.length) { + handleChildren(children, !!ellipsis); + } +} + +function handleChildren(children: BasicColumn[] | undefined, ellipsis: boolean) { + if (!children) return; + children.forEach((item) => { + const { children } = item; + handleItem(item, ellipsis); + handleChildren(children, ellipsis); + }); +} + +function handleIndexColumn(propsRef: ComputedRef, getPaginationRef: ComputedRef, columns: BasicColumn[]) { + const { t } = useI18n(); + + const { showIndexColumn, indexColumnProps, isTreeTable } = unref(propsRef); + + let pushIndexColumns = false; + if (unref(isTreeTable)) { + return; + } + columns.forEach(() => { + const indIndex = columns.findIndex((column) => column.flag === INDEX_COLUMN_FLAG); + if (showIndexColumn) { + pushIndexColumns = indIndex === -1; + } else if (!showIndexColumn && indIndex !== -1) { + columns.splice(indIndex, 1); + } + }); + // update-begin--author:liaozhiyang---date:20240611---for:【TV360X-105】列展示设置问题[列展示复选框不应该判断序号列复选框的状态] + if (columns.length === 0 && showIndexColumn) { + const indIndex = columns.findIndex((column) => column.flag === INDEX_COLUMN_FLAG); + if (indIndex === -1) { + pushIndexColumns = true; + } + } + // update-end--author:liaozhiyang---date:20240611---for:【TV360X-105】列展示设置问题[列展示复选框不应该判断序号列复选框的状态] + if (!pushIndexColumns) return; + + const isFixedLeft = columns.some((item) => item.fixed === 'left'); + + columns.unshift({ + flag: INDEX_COLUMN_FLAG, + // update-begin--author:liaozhiyang---date:20240724---for:【TV360X-1634】密度是宽松模式时,序号列表头换行了 + width: propsRef.value.size === 'large' ? 65 : 50, + // update-end--author:liaozhiyang---date:20240724---for:【TV360X-1634】密度是宽松模式时,序号列表头换行了 + title: t('component.table.index'), + align: 'center', + customRender: ({ index }) => { + const getPagination = unref(getPaginationRef); + if (isBoolean(getPagination)) { + return `${index + 1}`; + } + const { current = 1, pageSize = PAGE_SIZE } = getPagination; + return ((current < 1 ? 1 : current) - 1) * pageSize + index + 1; + }, + ...(isFixedLeft + ? { + fixed: 'left', + } + : {}), + ...indexColumnProps, + }); +} + +function handleActionColumn(propsRef: ComputedRef, columns: BasicColumn[]) { + const { actionColumn, showActionColumn } = unref(propsRef); + if (!actionColumn || !showActionColumn) return; + + const hasIndex = columns.findIndex((column) => column.flag === ACTION_COLUMN_FLAG); + if (hasIndex === -1) { + columns.push({ + ...columns[hasIndex], + ...actionColumn, + flag: ACTION_COLUMN_FLAG, + }); + } +} + +export function useColumns( + propsRef: ComputedRef, + getPaginationRef: ComputedRef, + handleCustomSelectColumn: Fn +) { + const columnsRef = ref(unref(propsRef).columns) as unknown as Ref; + let cacheColumns = unref(propsRef).columns; + + const getColumnsRef = computed(() => { + const columns = cloneDeep(unref(columnsRef)); + // update-begin--author:liaozhiyang---date:20240724---for:【issues/6908】多语言无刷新切换时,BasicColumn和FormSchema里面的值不能正常切换 + if (isArray(columns)) { + columns.forEach((item) => { + item.title = isFunction(item.title) ? item.title() : item.title; + }); + } + // update-end--author:liaozhiyang---date:20240724---for:【issues/6908】多语言无刷新切换时,BasicColumn和FormSchema里面的值不能正常切换 + handleIndexColumn(propsRef, getPaginationRef, columns); + handleActionColumn(propsRef, columns); + // update-begin--author:sunjianlei---date:220230630---for:【QQYUN-5571】自封装选择列,解决数据行选择卡顿问题 + handleCustomSelectColumn(columns); + // update-end--author:sunjianlei---date:220230630---for:【QQYUN-5571】自封装选择列,解决数据行选择卡顿问题 + + if (!columns) { + return []; + } + const { ellipsis } = unref(propsRef); + + columns.forEach((item) => { + const { customRender, slots } = item; + + handleItem(item, Reflect.has(item, 'ellipsis') ? !!item.ellipsis : !!ellipsis && !customRender && !slots); + }); + return columns; + }); + + function isIfShow(column: BasicColumn): boolean { + const ifShow = column.ifShow; + + let isIfShow = true; + + if (isBoolean(ifShow)) { + isIfShow = ifShow; + } + if (isFunction(ifShow)) { + isIfShow = ifShow(column); + } + return isIfShow; + } + const { hasPermission } = usePermission(); + + const getViewColumns = computed(() => { + const viewColumns = sortFixedColumn(unref(getColumnsRef)); + + const columns = cloneDeep(viewColumns); + const formatEditColumn = (columns) => { + return columns.map((column) => { + // update-begin--author:liaozhiyang---date:20230718---for: 【issues-179】antd3 一些警告以及报错(针对表格) + if(column.slots?.customRender) { + // slots的备份,兼容老的写法,转成新写法避免控制台警告 + column.slotsBak = column.slots; + delete column.slots; + } + // update-end--author:liaozhiyang---date:20230718---for: 【issues-179】antd3 一些警告以及报错(针对表格) + + const { slots, customRender, format, edit, editRow, flag, title: metaTitle } = column; + + if (!slots || !slots?.title) { + // column.slots = { title: `header-${dataIndex}`, ...(slots || {}) }; + column.customTitle = column.title as string; + Reflect.deleteProperty(column, 'title'); + } + //update-begin-author:taoyan date:20211203 for:【online报表】分组标题显示错误,都显示成了联系信息 LOWCOD-2343 + if (column.children) { + column.title = metaTitle; + } + //update-end-author:taoyan date:20211203 for:【online报表】分组标题显示错误,都显示成了联系信息 LOWCOD-2343 + + const isDefaultAction = [INDEX_COLUMN_FLAG, ACTION_COLUMN_FLAG].includes(flag!); + if (!customRender && format && !edit && !isDefaultAction) { + column.customRender = ({ text, record, index }) => { + return formatCell(text, format, record, index); + }; + } + + // edit table + if ((edit || editRow) && !isDefaultAction) { + column.customRender = renderEditCell(column); + } + // update-begin--author:liaozhiyang---date:20241021---for:【pull/7333】修复分组表头可编辑表格失效问题 + if (column.children?.length) { + formatEditColumn(column.children.filter((item) => hasPermission(column.auth) && isIfShow(column))); + } + // update-end--author:liaozhiyang---date:20241021---for:【pull/7333】修复分组表头可编辑表格失效问题 + return reactive(column); + }); + }; + // update-begin--author:liaozhiyang---date:20241021---for:【pull/7333】修复分组表头可编辑表格失效问题 + const result = formatEditColumn(columns.filter((item) => hasPermission(item.auth) && isIfShow(item))); + // update-end--author:liaozhiyang---date:20241021---for:【pull/7333】修复分组表头可编辑表格失效问题 + // update-begin--author:liaozhiyang---date:20230919---for:【QQYUN-6387】展开写法(去掉报错) + if (propsRef.value.expandedRowKeys && !propsRef.value.isTreeTable) { + let index = 0; + const findIndex = result.findIndex((item) => item.key === CUS_SEL_COLUMN_KEY); + if (findIndex != -1) { + index = findIndex + 1; + } + const next: any = result[index + 1]; + let expand = Table.EXPAND_COLUMN; + if (next && (next['fixed'] == true || next['fixed'] == 'left')) { + expand = Object.assign(expand, { fixed: 'left' }); + } + result.splice(index, 0, expand); + } + return result; + // update-end--author:liaozhiyang---date:20230919---for:【QQYUN-6387】展开写法(去掉报错) + }); + + watch( + () => unref(propsRef).columns, + (columns) => { + columnsRef.value = columns; + cacheColumns = columns?.filter((item) => !item.flag) ?? []; + } + ); + + function setCacheColumnsByField(dataIndex: string | undefined, value: Partial) { + if (!dataIndex || !value) { + return; + } + cacheColumns.forEach((item) => { + if (item.dataIndex === dataIndex) { + Object.assign(item, value); + return; + } + }); + } + + // update-begin--author:sunjianlei---date:20220523---for: 【VUEN-1089】合并vben最新版代码,解决表格字段排序问题 + /** + * set columns + * @param columnList key|column + */ + function setColumns(columnList: Partial[] | (string | string[])[]) { + const columns = cloneDeep(columnList); + if (!isArray(columns)) return; + + if (columns.length <= 0) { + columnsRef.value = []; + return; + } + + const firstColumn = columns[0]; + + const cacheKeys = cacheColumns.map((item) => item.dataIndex); + + if (!isString(firstColumn) && !isArray(firstColumn)) { + columnsRef.value = columns as BasicColumn[]; + } else { + const columnKeys = (columns as (string | string[])[]).map((m) => m.toString()); + const newColumns: BasicColumn[] = []; + cacheColumns.forEach((item) => { + newColumns.push({ + ...item, + defaultHidden: !columnKeys.includes(item.dataIndex?.toString() || (item.key as string)), + }); + }); + // Sort according to another array + if (!isEqual(cacheKeys, columns)) { + newColumns.sort((prev, next) => { + return columnKeys.indexOf(prev.dataIndex?.toString() as string) - columnKeys.indexOf(next.dataIndex?.toString() as string); + }); + } + columnsRef.value = newColumns; + } + } + // update-end--author:sunjianlei---date:20220523---for: 【VUEN-1089】合并vben最新版代码,解决表格字段排序问题 + + function getColumns(opt?: GetColumnsParams) { + const { ignoreIndex, ignoreAction, sort } = opt || {}; + let columns = toRaw(unref(getColumnsRef)); + if (ignoreIndex) { + columns = columns.filter((item) => item.flag !== INDEX_COLUMN_FLAG); + } + if (ignoreAction) { + columns = columns.filter((item) => item.flag !== ACTION_COLUMN_FLAG); + } + // update-begin--author:sunjianlei---date:220230630---for:【QQYUN-5571】自封装选择列,解决数据行选择卡顿问题 + // 过滤自定义选择列 + columns = columns.filter((item) => item.key !== CUS_SEL_COLUMN_KEY); + // update-enb--author:sunjianlei---date:220230630---for:【QQYUN-5571】自封装选择列,解决数据行选择卡顿问题 + + if (sort) { + columns = sortFixedColumn(columns); + } + + return columns; + } + function getCacheColumns() { + return cacheColumns; + } + + return { + getColumnsRef, + getCacheColumns, + getColumns, + setColumns, + getViewColumns, + setCacheColumnsByField, + }; +} + +function sortFixedColumn(columns: BasicColumn[]) { + const fixedLeftColumns: BasicColumn[] = []; + const fixedRightColumns: BasicColumn[] = []; + const defColumns: BasicColumn[] = []; + for (const column of columns) { + if (column.fixed === 'left') { + fixedLeftColumns.push(column); + continue; + } + if (column.fixed === 'right') { + fixedRightColumns.push(column); + continue; + } + defColumns.push(column); + } + return [...fixedLeftColumns, ...defColumns, ...fixedRightColumns].filter((item) => !item.defaultHidden); +} + +// format cell +export function formatCell(text: string, format: CellFormat, record: Recordable, index: number) { + if (!format) { + return text; + } + + // custom function + if (isFunction(format)) { + return format(text, record, index); + } + + try { + // date type + const DATE_FORMAT_PREFIX = 'date|'; + if (isString(format) && format.startsWith(DATE_FORMAT_PREFIX)) { + const dateFormat = format.replace(DATE_FORMAT_PREFIX, ''); + + if (!dateFormat) { + return text; + } + return formatToDate(text, dateFormat); + } + + // Map + if (isMap(format)) { + return format.get(text); + } + } catch (error) { + return text; + } +} + diff --git a/src/components/Table/src/hooks/useColumnsCache.ts b/src/components/Table/src/hooks/useColumnsCache.ts new file mode 100644 index 0000000..2d5f8e8 --- /dev/null +++ b/src/components/Table/src/hooks/useColumnsCache.ts @@ -0,0 +1,149 @@ +import { computed, nextTick, unref, watchEffect } from 'vue'; +import { router } from '/@/router'; +import { useRoute } from 'vue-router'; +import { createLocalStorage } from '/@/utils/cache'; +import { useTableContext } from './useTableContext'; +import { useMessage } from '/@/hooks/web/useMessage'; + +/** + * 列表配置缓存 + */ +export function useColumnsCache(opt, setColumns, handleColumnFixed) { + let isInit = false; + const table = useTableContext(); + const $ls = createLocalStorage(); + const { createMessage: $message } = useMessage(); + const route = useRoute(); + // 列表配置缓存key + const cacheKey = computed(() => { + // update-begin--author:liaozhiyang---date:20240226---for:【QQYUN-8367】online报表配置列展示保存,影响到其他页面的table字段的显示隐藏(开发环境热更新会有此问题,生产环境无问题) + const path = route.path; + let key = path.replace(/[\/\\]/g, '_'); + // update-end--author:liaozhiyang---date:20240226---for:【QQYUN-8367】online报表配置列展示保存,影响到其他页面的table字段的显示隐藏(开发环境热更新会有此问题,生产环境无问题) + let cacheKey = table.getBindValues.value.tableSetting?.cacheKey; + if (cacheKey) { + key += ':' + cacheKey; + } + return 'columnCache:' + key; + }); + + watchEffect(() => { + const columns = table.getColumns(); + if (columns.length) { + init(); + } + }); + + async function init() { + if (isInit) { + return; + } + isInit = true; + let columnCache = $ls.get(cacheKey.value); + if (columnCache && columnCache.checkedList) { + const { checkedList, sortedList, sortableOrder, checkIndex } = columnCache; + await nextTick(); + // checkbox的排序缓存 + opt.sortableOrder.value = sortableOrder; + // checkbox的选中缓存 + opt.state.checkedList = checkedList; + // tableColumn的排序缓存 + opt.plainSortOptions.value.sort((prev, next) => { + return sortedList.indexOf(prev.value) - sortedList.indexOf(next.value); + }); + // 重新排序tableColumn + checkedList.sort((prev, next) => sortedList.indexOf(prev) - sortedList.indexOf(next)); + // 是否显示行号列 + if (checkIndex) { + table.setProps({ showIndexColumn: true }); + } + setColumns(checkedList); + // 设置固定列 + setColumnFixed(columnCache); + } + } + + /** 设置被固定的列 */ + async function setColumnFixed(columnCache) { + const { fixedColumns } = columnCache; + const columns = opt.plainOptions.value; + for (const column of columns) { + let fixedCol = fixedColumns.find((fc) => fc.key === (column.key || column.dataIndex)); + if (fixedCol) { + await nextTick(); + handleColumnFixed(column, fixedCol.fixed); + } + } + } + + // 判断列固定状态 + const fixedReg = /^(true|left|right)$/; + + /** 获取被固定的列 */ + function getFixedColumns() { + let fixedColumns: any[] = []; + const columns = opt.plainOptions.value; + for (const column of columns) { + if (fixedReg.test((column.fixed ?? '').toString())) { + fixedColumns.push({ + key: column.key || column.dataIndex, + fixed: column.fixed === true ? 'left' : column.fixed, + }); + } + } + return fixedColumns; + } + + /** 保存列配置 */ + function saveSetting() { + const { checkedList } = opt.state; + // update-begin--author:liaozhiyang---date:20240611---for:【TV360X-105】列展示设置问题[重置之后保存的顺序还是上次的] + let sortedList = []; + if (opt.restAfterOptions.value) { + sortedList = opt.restAfterOptions.value.map((item) => item.value); + } else { + sortedList = unref(opt.plainSortOptions).map((item) => item.value); + } + // update-end--author:liaozhiyang---date:20240611---for:【TV360X-105】列展示设置问题[重置之后保存的顺序还是上次的] + $ls.set(cacheKey.value, { + // 保存的列 + checkedList, + // 排序后的列 + sortedList, + // 是否显示行号列 + checkIndex: unref(opt.checkIndex), + // checkbox原始排序 + sortableOrder: unref(opt.sortableOrder), + // 固定列 + fixedColumns: getFixedColumns(), + }); + $message.success('保存成功'); + // 保存之后直接关闭 + opt.popoverVisible.value = false; + } + + /** 重置(删除)列配置 */ + async function resetSetting() { + // 重置固定列 + await resetFixedColumn(); + $ls.remove(cacheKey.value); + $message.success('重置成功'); + } + + async function resetFixedColumn() { + const columns = opt.plainOptions.value; + for (const column of columns) { + column.fixed; + if (fixedReg.test((column.fixed ?? '').toString())) { + await nextTick(); + handleColumnFixed(column, null); + } + } + } + + return { + saveSetting, + resetSetting, + getCache: () => $ls.get(cacheKey.value), + }; +} diff --git a/src/components/Table/src/hooks/useCustomRow.ts b/src/components/Table/src/hooks/useCustomRow.ts new file mode 100644 index 0000000..6d322ff --- /dev/null +++ b/src/components/Table/src/hooks/useCustomRow.ts @@ -0,0 +1,108 @@ +import type { ComputedRef } from 'vue'; +import type { BasicTableProps } from '../types/table'; +import { unref } from 'vue'; +import { ROW_KEY } from '../const'; +import { isString, isFunction } from '/@/utils/is'; + +interface Options { + setSelectedRowKeys: (keys: string[]) => void; + getSelectRowKeys: () => string[]; + clearSelectedRowKeys: () => void; + emit: EmitType; + getAutoCreateKey: ComputedRef; +} + +function getKey(record: Recordable, rowKey: string | ((record: Record) => string) | undefined, autoCreateKey?: boolean) { + if (!rowKey || autoCreateKey) { + return record[ROW_KEY]; + } + if (isString(rowKey)) { + return record[rowKey]; + } + if (isFunction(rowKey)) { + return record[rowKey(record)]; + } + return null; +} + +export function useCustomRow( + propsRef: ComputedRef, + { setSelectedRowKeys, getSelectRowKeys, getAutoCreateKey, clearSelectedRowKeys, emit }: Options +) { + const customRow = (record: Recordable, index: number) => { + return { + onClick: (e: Event) => { + e?.stopPropagation(); + function handleClick() { + const { rowSelection, rowKey, clickToRowSelect } = unref(propsRef); + if (!rowSelection || !clickToRowSelect) return; + const keys = getSelectRowKeys(); + const key = getKey(record, rowKey, unref(getAutoCreateKey)); + if (!key) return; + + const isCheckbox = rowSelection.type === 'checkbox'; + if (isCheckbox) { + // 找到tr + const tr: HTMLElement = (e as MouseEvent).composedPath?.().find((dom: HTMLElement) => dom.tagName === 'TR') as HTMLElement; + if (!tr) return; + // 找到Checkbox,检查是否为disabled + const checkBox = tr.querySelector('input[type=checkbox]'); + if (!checkBox || checkBox.hasAttribute('disabled')) return; + if (!keys.includes(key)) { + setSelectedRowKeys([...keys, key]); + return; + } + const keyIndex = keys.findIndex((item) => item === key); + keys.splice(keyIndex, 1); + setSelectedRowKeys(keys); + return; + } + + const isRadio = rowSelection.type === 'radio'; + if (isRadio) { + // update-begin--author:liaozhiyang---date:20231016---for:【QQYUN-6794】table列表增加radio禁用功能 + const rowSelection = propsRef.value.rowSelection; + if (rowSelection.getCheckboxProps) { + const result = rowSelection.getCheckboxProps(record); + if (result.disabled) { + return; + } + } + // update-end--author:liaozhiyang---date:20231016---for:【QQYUN-6794】table列表增加radio禁用功能 + if (!keys.includes(key)) { + if (keys.length) { + clearSelectedRowKeys(); + } + setSelectedRowKeys([key]); + return; + } else { + // update-begin--author:liaozhiyang---date:20240527---for:【TV360X-359】erp主表点击已选中的选到了最后一个 + // 点击已经选中的,直接return不在做操作 + return; + // update-end--author:liaozhiyang---date:20240527---for:【TV360X-359】erp主表点击已选中的选到了最后一个 + } + clearSelectedRowKeys(); + } + } + handleClick(); + emit('row-click', record, index, e); + }, + onDblclick: (event: Event) => { + emit('row-dbClick', record, index, event); + }, + onContextmenu: (event: Event) => { + emit('row-contextmenu', record, index, event); + }, + onMouseenter: (event: Event) => { + emit('row-mouseenter', record, index, event); + }, + onMouseleave: (event: Event) => { + emit('row-mouseleave', record, index, event); + }, + }; + }; + + return { + customRow, + }; +} diff --git a/src/components/Table/src/hooks/useCustomSelection.tsx b/src/components/Table/src/hooks/useCustomSelection.tsx new file mode 100644 index 0000000..38c6fa7 --- /dev/null +++ b/src/components/Table/src/hooks/useCustomSelection.tsx @@ -0,0 +1,757 @@ +import type { BasicColumn } from '/@/components/Table'; +import type { Ref, ComputedRef } from 'vue'; +import type { BasicTableProps, PaginationProps, TableRowSelection } from '/@/components/Table'; +import { computed, nextTick, onUnmounted, ref, toRaw, unref, watch, watchEffect } from 'vue'; +import { omit, isEqual } from 'lodash-es'; +import { throttle } from 'lodash-es'; +import { Checkbox, Radio } from 'ant-design-vue'; +import { isFunction } from '/@/utils/is'; +import { findNodeAll } from '/@/utils/helper/treeHelper'; +import { ROW_KEY } from '/@/components/Table/src/const'; +import { onMountedOrActivated } from '/@/hooks/core/onMountedOrActivated'; +import { useMessage } from '/@/hooks/web/useMessage'; +import { ModalFunc } from 'ant-design-vue/lib/modal/Modal'; + +// 自定义选择列的key +export const CUS_SEL_COLUMN_KEY = 'j-custom-selected-column'; + +/** + * 自定义选择列 + */ +export function useCustomSelection( + propsRef: ComputedRef, + emit: EmitType, + wrapRef: Ref, + getPaginationRef: ComputedRef, + tableData: Ref, + childrenColumnName: ComputedRef +) { + const { createConfirm } = useMessage(); + // 表格body元素 + const bodyEl = ref(); + // body元素高度 + const bodyHeight = ref(0); + // 表格tr高度 + const rowHeight = ref(0); + // body 滚动高度 + const scrollTop = ref(0); + // 选择的key + const selectedKeys = ref([]); + // 选择的行 + const selectedRows = ref([]); + // 变更的行 + let changeRows: Recordable[] = []; + let allSelected: boolean = false; + + let timer; + + // 扁平化数据,children数据也会放到一起 + const flattedData = computed(() => { + // update-begin--author:liaozhiyang---date:20231016---for:【QQYUN-6774】解决checkbox禁用后全选仍能勾选问题 + const data = flattenData(tableData.value, childrenColumnName.value); + const rowSelection = propsRef.value.rowSelection; + if (rowSelection?.type === 'checkbox' && rowSelection.getCheckboxProps) { + for (let i = 0, len = data.length; i < len; i++) { + const record = data[i]; + const result = rowSelection.getCheckboxProps(record); + if (result.disabled) { + data.splice(i, 1); + i--; + len--; + } + } + } + return data; + // update-end--author:liaozhiyang---date:20231016---for:【QQYUN-6774】解决checkbox禁用后全选仍能勾选问题 + }); + + const getRowSelectionRef = computed((): TableRowSelection | null => { + const { rowSelection } = unref(propsRef); + if (!rowSelection) { + return null; + } + + return { + preserveSelectedRowKeys: true, + // selectedRowKeys: unref(selectedKeys), + // onChange: (selectedRowKeys: string[]) => { + // setSelectedRowKeys(selectedRowKeys); + // }, + ...omit(rowSelection, ['onChange', 'selectedRowKeys']), + }; + }); + + // 是否是单选 + const isRadio = computed(() => { + return getRowSelectionRef.value?.type === 'radio'; + }); + + const getAutoCreateKey = computed(() => { + return unref(propsRef).autoCreateKey && !unref(propsRef).rowKey; + }); + + // 列key字段 + const getRowKey = computed(() => { + const { rowKey } = unref(propsRef); + return unref(getAutoCreateKey) ? ROW_KEY : rowKey; + }); + // 获取行的key字段数据 + const getRecordKey = (record) => { + if (!getRowKey.value) { + return record[ROW_KEY]; + } else if (isFunction(getRowKey.value)) { + return getRowKey.value(record); + } else { + return record[getRowKey.value]; + } + }; + + // 分页配置 + const getPagination = computed(() => { + return typeof getPaginationRef.value === 'boolean' ? {} : getPaginationRef.value; + }); + // 当前页条目数量 + const currentPageSize = computed(() => { + const { pageSize = 10, total = flattedData.value.length } = getPagination.value; + return pageSize > total ? total : pageSize; + }); + + // 选择列表头props + const selectHeaderProps = computed(() => { + return { + onSelectAll, + isRadio: isRadio.value, + selectedLength: flattedData.value.filter((data) => selectedKeys.value.includes(getRecordKey(data))).length, + // update-begin--author:liaozhiyang---date:20240511---for:【QQYUN-9289】解决表格条数不足pageSize数量时行数全部勾选但是全选框不勾选 + // 【TV360X-53】为空时会报错,加强判断 + pageSize: flattedData.value?.length ?? 0, + // update-end--author:liaozhiyang---date:20240511---for:【QQYUN-9289】解决表格条数不足pageSize数量时行数全部勾选但是全选框不勾选 + // 【QQYUN-6774】解决checkbox禁用后全选仍能勾选问题 + disabled: flattedData.value.length == 0, + hideSelectAll: unref(propsRef)?.rowSelection?.hideSelectAll, + }; + }); + + // 监听传入的selectedRowKeys + // update-begin--author:liaozhiyang---date:20240306---for:【QQYUN-8390】部门人员组件点击重置未清空(selectedRowKeys.value=[],watch没监听到加deep) + watch( + () => unref(propsRef)?.rowSelection?.selectedRowKeys, + (val: string[]) => { + // 解决selectedRowKeys在页面调用处使用ref失效 + const value = unref(val); + if (Array.isArray(value) && !sameArray(value, selectedKeys.value)) { + // update-begin--author:liaozhiyang---date:20250429---for:【issues/8163】关联记录夸页数据丢失 + // 延迟是为了等watch selectedRows + setTimeout(() => { + setSelectedRowKeys(value); + }, 0); + // update-end--author:liaozhiyang---date:20250429---for:【issues/8163】关联记录夸页数据丢失 + } + }, + { + immediate: true, + deep: true + } + ); + // update-end--author:liaozhiyang---date:20240306---for:【QQYUN-8390】部门人员组件点击重置未清空(selectedRowKeys.value=[],watch没监听到加deep) + // update-begin--author:liaozhiyang---date:20250429---for:【issues/8163】关联记录夸页数据丢失 + // 编辑时selectedRows可能会回填 + watch( + () => unref(propsRef)?.rowSelection?.selectedRows, + (val: string[]) => { + const value: any = unref(val); + if (Array.isArray(value) && !sameArray(value, selectedRows.value)) { + selectedRows.value = value; + } + }, + { + immediate: true, + deep: true, + } + ); + // update-end--author:liaozhiyang---date:20250429---for:【issues/8163】关联记录夸页数据丢失 + /** + * 2024-03-06 + * liaozhiyang + * 判断是否同一个数组 (引用地址,长度,元素位置信息相同才是同一个数组。数组元素只有字符串) + */ + function sameArray(a, b) { + if (a === b) { + if (a.length === b.length) { + return a.toString() === b.toString(); + } else { + return false; + } + } else { + // update-begin--author:liaozhiyang---date:20240425---for:【QQYUN-9123】popupdict打开弹窗打开程序运行 + if (isEqual(a, b)) { + return true; + } + // update-end--author:liaozhiyang---date:20240425---for:【QQYUN-9123】popupdict打开弹窗打开程序运行 + return false; + } + } + + // 当任意一个变化时,触发同步检测 + watch([selectedKeys, selectedRows], () => { + nextTick(() => { + syncSelectedRows(); + }); + }); + + // 监听滚动条事件 + const onScrollTopChange = throttle((e) => (scrollTop.value = e?.target?.scrollTop), 150); + + let bodyResizeObserver: Nullable = null; + // 获取首行行高 + watchEffect(() => { + // update-begin--author:liaozhiyang---date:20241111---for:【issues/7442】basicTable从默认切换到宽松紧凑时多选框显示异常 + // 这种写法是为了监听到 size 的变化 + propsRef.value.size && void 0; + // update-end--author:liaozhiyang---date:20241111---for:【issues/7442】basicTable从默认切换到宽松紧凑时多选框显示异常 + if (bodyEl.value) { + // 监听div高度变化 + bodyResizeObserver = new ResizeObserver((entries) => { + for (let entry of entries) { + if (entry.target === bodyEl.value && entry.contentRect) { + const { height } = entry.contentRect; + bodyHeight.value = Math.ceil(height); + } + } + updateRowHeight(); + }); + bodyResizeObserver.observe(bodyEl.value); + } + rowHeight.value = 50; + }); + + onMountedOrActivated(async () => { + bodyEl.value = await getTableBody(wrapRef.value!); + bodyEl.value.addEventListener('scroll', onScrollTopChange); + }); + onUnmounted(() => { + if (bodyEl.value) { + bodyEl.value?.removeEventListener('scroll', onScrollTopChange); + } + if (bodyResizeObserver != null) { + bodyResizeObserver.disconnect(); + } + }); + + // 更新首行行高 + function updateRowHeight() { + const el = bodyEl.value?.querySelector('tbody.ant-table-tbody tr.ant-table-row') as HTMLDivElement; + if (el) { + // update-begin--author:liaozhiyang---date:20241111---for:【issues/7442】basicTable从默认切换到宽松紧凑时多选框显示异常 + nextTick(() => rowHeight.value = el.offsetHeight); + // update-end--author:liaozhiyang---date:20241111---for:【issues/7442】basicTable从默认切换到宽松紧凑时多选框显示异常 + } + } + + // 选择全部 + function onSelectAll(checked: boolean, flag = 'currentPage') { + // update-begin--author:liaozhiyang---date:20231122---for:【issues/5577】BasicTable组件全选和取消全选时不触发onSelectAll事件 + if (unref(propsRef)?.rowSelection?.onSelectAll) { + allSelected = checked; + changeRows = getInvertRows(selectedRows.value, checked, flag); + } + // update-end--author:liaozhiyang---date:20231122---for:【issues/5577】BasicTable组件全选和取消全选时不触发onSelectAll事件 + // 取消全选 + if (!checked) { + // update-begin--author:liaozhiyang---date:20240510---for:【issues/1173】取消全选只是当前页面取消 + // update-begin--author:liaozhiyang---date:20240808---for:【issues/6958】取消没触发onSelectAll事件,跨页选中后 changeRows 为空 + if (flag === 'allPage') { + selectedKeys.value = []; + selectedRows.value = []; + } else { + flattedData.value.forEach((item) => { + updateSelected(item, false); + }); + } + emitChange('all'); + // update-end--author:liaozhiyang---date:20240808---for:【issues/6958】取消没触发onSelectAll事件,跨页选中后 changeRows 为空 + // update-end--author:liaozhiyang---date:20240510---for:【issues/1173】取消全选只是当前页面取消 + return; + } + let modal: Nullable> = null; + // 全选 + const checkAll = () => { + if (modal != null) { + modal.update({ + content: '正在分批全选,请稍后……', + cancelButtonProps: { disabled: true }, + }); + } + let showCount = 0; + // 最小选中数量 + let minSelect = 100; + const hidden: Recordable[] = []; + flattedData.value.forEach((item, index, array) => { + if (array.length > 120) { + if (showCount <= minSelect && recordIsShow(index, Math.max((minSelect - 10) / 2, 3))) { + showCount++; + updateSelected(item, checked); + } else { + hidden.push(item); + } + } else { + updateSelected(item, checked); + } + }); + if (hidden.length > 0) { + return batchesSelectAll(hidden, checked, minSelect); + } else { + emitChange('all'); + } + }; + + // 当数据量大于120条时,全选会导致页面卡顿,需进行慢速全选 + if (flattedData.value.length > 120) { + modal = createConfirm({ + title: '全选', + content: '当前数据量较大,全选可能会导致页面卡顿,确定要执行此操作吗?', + iconType: 'warning', + onOk: () => checkAll(), + }); + } else { + checkAll(); + } + } + + // 分批全选 + function batchesSelectAll(hidden: Recordable[], checked: boolean, minSelect: number) { + return new Promise((resolve) => { + (function call() { + // 每隔半秒钟,选择100条数据 + setTimeout(() => { + const list = hidden.splice(0, minSelect); + if (list.length > 0) { + list.forEach((item) => { + updateSelected(item, checked); + }); + call(); + } else { + setTimeout(() => { + emitChange('all'); + // update-begin--author:liaozhiyang---date:20230811---for:【QQYUN-5687】批量选择,提示成功后,又来一个提示 + setTimeout(() =>resolve(), 0); + // update-end--author:liaozhiyang---date:20230811---for:【QQYUN-5687】批量选择,提示成功后,又来一个提示 + }, 500); + } + }, 300); + })(); + }); + } + + // 选中单个 + function onSelect(record, checked) { + onSelectChild(record, checked); + updateSelected(record, checked); + onSelectParent(record, checked); + emitChange(); + } + + function updateSelected(record, checked) { + const recordKey = getRecordKey(record); + if (isRadio.value) { + selectedKeys.value = [recordKey]; + selectedRows.value = [record]; + return; + } + const index = selectedKeys.value.findIndex((key) => key === recordKey); + if (checked) { + if (index === -1) { + selectedKeys.value.push(recordKey); + selectedRows.value.push(record); + } + } else { + if (index !== -1) { + selectedKeys.value.splice(index, 1); + selectedRows.value.splice(index, 1); + } + } + // update-begin--author:liaozhiyang---date:20240919---for:【issues/7200】basicTable选中后没有选中样式 + clearTimeout(timer); + timer = setTimeout(() => { + selectedKeys.value = [...selectedKeys.value]; + }, 0); + // update-end--author:liaozhiyang---date:20240919---for:【issues/7200】basicTable选中后没有选中样式 + } + + // 调用用户自定义的onChange事件 + function emitChange(mode = 'single') { + const { rowSelection } = unref(propsRef); + if (rowSelection) { + const { onChange } = rowSelection; + if (onChange && isFunction(onChange)) { + setTimeout(() => { + onChange(selectedKeys.value, selectedRows.value); + }, 0); + } + } + emit('selection-change', { + keys: getSelectRowKeys(), + rows: getSelectRows(), + }); + // update-begin--author:liaozhiyang---date:20231122---for:【issues/5577】BasicTable组件全选和取消全选时不触发onSelectAll事件 + if (mode == 'all') { + const rowSelection = unref(propsRef)?.rowSelection; + if (rowSelection?.onSelectAll) { + rowSelection.onSelectAll(allSelected, toRaw(getSelectRows()), toRaw(changeRows)); + } + } + // update-end--author:liaozhiyang---date:20231122---for:【issues/5577】BasicTable组件全选和取消全选时不触发 + } + // update-begin--author:liusq---date:20240819---for:树形表格设置层级关联不生效 + /** + * 层级关联时,选中下级数据 + * @param record + * @param checked + */ + function onSelectChild(record, checked) { + if (unref(propsRef)?.isTreeTable && unref(propsRef)?.rowSelection?.checkStrictly === false && !isRadio.value) { + if (record[childrenColumnName.value] && record[childrenColumnName.value].length > 0) { + record[childrenColumnName.value].forEach((children) => { + updateSelected(children, checked); + if (children[childrenColumnName.value] && children[childrenColumnName.value].length > 0) { + onSelectChild(children, checked); + } + }); + } + } + } + // update-end--author:liusq---date:20240819---for:树形表格设置层级关联不生效 + /** + * 2024-09-24 + * liaozhiyang + * 层级关联时,选中上级数据 + * 【issues/7217】BasicTable树形表格设置checkStrictly无效 + * */ + function onSelectParent(record, checked) { + if (unref(propsRef)?.isTreeTable && unref(propsRef)?.rowSelection?.checkStrictly === false && !isRadio.value) { + let condition = true, + currentRecord = record; + while (condition) { + const parentRecord: any = findParent(tableData.value, currentRecord, childrenColumnName.value); + if (parentRecord) { + const childrenRecordKeys: any = []; + parentRecord[childrenColumnName.value].forEach((item) => { + childrenRecordKeys.push(getRecordKey(item)); + }); + if (checked === true) { + const isSubSet = childrenRecordKeys.every((item) => selectedKeys.value.includes(item)); + isSubSet && updateSelected(parentRecord, checked); + } else if (checked === false) { + updateSelected(parentRecord, checked); + } + if (tableData.value.find((item) => getRecordKey(item) === getRecordKey(parentRecord))) { + // 循环终止 + condition = false; + } else { + currentRecord = parentRecord; + } + } else { + // 循环终止 + condition = false; + } + } + } + function findParent(tree, record, children = 'children') { + let parent = null; + function search(nodes) { + for (let node of nodes) { + if (node[children]?.some((child) => getRecordKey(child) === getRecordKey(record))) { + parent = node; + return true; + } + if (node[children] && search(node[children])) { + return true; + } + } + return false; + } + search(tree); + return parent; + } + } + // 用于判断是否是自定义选择列 + function isCustomSelection(column: BasicColumn) { + return column.key === CUS_SEL_COLUMN_KEY; + } + + /** + * 判断当前行是否可视,虚拟滚动用 + * @param index 行下标 + * @param threshold 前后阈值,默认可视区域前后显示3条 + */ + function recordIsShow(index: number, threshold = 3) { + // 只有数据量大于50条时,才会进行虚拟滚动 + const isVirtual = flattedData.value.length > 50; + if (isVirtual) { + // 根据 scrollTop、bodyHeight、rowHeight 计算出当前行是否可视(阈值前后3条) + // flag1 = 判断当前行是否在可视区域上方3条 + const flag1 = scrollTop.value - rowHeight.value * threshold < index * rowHeight.value; + // flag2 = 判断当前行是否在可视区域下方3条 + const flag2 = index * rowHeight.value < scrollTop.value + bodyHeight.value + rowHeight.value * threshold; + // 全部条件满足时,才显示当前行 + return flag1 && flag2; + } + return true; + } + + // 自定义渲染Body + function bodyCustomRender(params) { + const { index } = params; + // update-begin--author:liaozhiyang---date:20231009--for:【issues/776】显示100条/页,复选框只能显示3个的问题 + if (propsRef.value.canResize && !recordIsShow(index)) { + return ''; + } + if (isRadio.value) { + return renderRadioComponent(params); + } else { + return renderCheckboxComponent(params); + } + // update-end--author:liaozhiyang---date:20231009---for:【issues/776】显示100条/页,复选框只能显示3个的问题 + } + + /** + * 渲染checkbox组件 + */ + function renderCheckboxComponent({ record }) { + const recordKey = getRecordKey(record); + // 获取用户自定义checkboxProps + const checkboxProps = ((getCheckboxProps) => { + if (typeof getCheckboxProps === 'function') { + try { + return getCheckboxProps(record) ?? {}; + } catch (error) { + console.error(error); + } + } + return {}; + })(propsRef.value.rowSelection?.getCheckboxProps); + return ( + onSelect(record, checked)} + // update-begin--author:liaozhiyang---date:20230326---for:【QQYUN-8694】BasicTable在使用clickToRowSelect=true下,selection-change 事件在触发多次 + onClick={(e) => e.stopPropagation()} + // update-end--author:liaozhiyang---date:20230326---for:【QQYUN-8694】BasicTable在使用clickToRowSelect=true下,selection-change 事件在触发多次 + /> + ); + } + + /** + * 渲染radio组件 + */ + function renderRadioComponent({ record }) { + const recordKey = getRecordKey(record); + // update-begin--author:liaozhiyang---date:20231016---for:【QQYUN-6794】table列表增加radio禁用功能 + // 获取用户自定义radioProps + const checkboxProps = (() => { + const rowSelection = propsRef.value.rowSelection; + if (rowSelection?.getCheckboxProps) { + return rowSelection.getCheckboxProps(record); + } + return {}; + })(); + // update-end--author:liaozhiyang---date:20231016---for:【QQYUN-6794】table列表增加radio禁用功能 + return ( + onSelect(record, checked)} + // update-begin--author:liaozhiyang---date:20230326---for:【QQYUN-8694】BasicTable在使用clickToRowSelect=true下,selection-change 事件在触发多次 + onClick={(e) => e.stopPropagation()} + // update-end--author:liaozhiyang---date:20230326---for:【QQYUN-8694】BasicTable在使用clickToRowSelect=true下,selection-change 事件在触发多次 + /> + ); + } + + // 创建选择列 + function handleCustomSelectColumn(columns: BasicColumn[]) { + // update-begin--author:liaozhiyang---date:20230919---for:【issues/757】JPopup表格的选择列固定配置不生效 + const rowSelection = propsRef.value.rowSelection; + if (!rowSelection) { + return; + } + const isFixedLeft = rowSelection.fixed || columns.some((item) => item.fixed === 'left'); + // update-begin--author:liaozhiyang---date:20230919---for:【issues/757】JPopup表格的选择列固定配置不生效 + columns.unshift({ + title: '选择列', + flag: 'CHECKBOX', + key: CUS_SEL_COLUMN_KEY, + width: 50, + minWidth: 50, + maxWidth: 50, + align: 'center', + ...(isFixedLeft ? { fixed: 'left' } : {}), + customRender: bodyCustomRender, + }); + } + + // 清空所有选择 + function clearSelectedRowKeys() { + onSelectAll(false, 'allPage'); + } + + // 通过 selectedKeys 同步 selectedRows + function syncSelectedRows() { + if (selectedKeys.value.length !== selectedRows.value.length) { + // update-begin--author:liaozhiyang---date:20250429---for:【issues/8163】关联记录夸页数据丢失 + // 延迟是为了等watch selectedRows + setTimeout(() => { + setSelectedRowKeys(selectedKeys.value); + }, 0); + // update-end--author:liaozhiyang---date:20250429---for:【issues/8163】关联记录夸页数据丢失 + } + } + + // 设置选择的key + function setSelectedRowKeys(rowKeys: string[]) { + const isSomeRowKeys = selectedKeys.value === rowKeys; + selectedKeys.value = rowKeys; + const allSelectedRows = findNodeAll( + toRaw(unref(flattedData)).concat(toRaw(unref(selectedRows))), + (item) => rowKeys.includes(getRecordKey(item)), + { + children: propsRef.value.childrenColumnName ?? 'children', + } + ); + const trueSelectedRows: any[] = []; + rowKeys.forEach((key: string) => { + const found = allSelectedRows.find((item) => getRecordKey(item) === key); + found && trueSelectedRows.push(found); + }); + // update-begin--author:liaozhiyang---date:20231103---for:【issues/828】解决卡死问题 + if (!(isSomeRowKeys && equal(selectedRows.value, trueSelectedRows))) { + selectedRows.value = trueSelectedRows; + emitChange(); + } + // update-end--author:liaozhiyang---date:20231103---for:【issues/828】解决卡死问题 + } + /** + *2023-11-03 + *廖志阳 + *检测selectedRows.value和trueSelectedRows是否相等,防止死循环 + */ + function equal(oldVal, newVal) { + let oldKeys = [], + newKeys = []; + if (oldVal.length === newVal.length) { + oldKeys = oldVal.map((item) => getRecordKey(item)); + newKeys = newVal.map((item) => getRecordKey(item)); + for (let i = 0, len = oldKeys.length; i < len; i++) { + const findItem = newKeys.find((item) => item === oldKeys[i]); + if (!findItem) { + return false; + } + } + return true; + } + return false; + } + /** + *2024-08-08 + *廖志阳 + *根据全选或者反选(或者使用clearSelectedRowKeys()方法)返回源数据中这次需要变更的数据 + */ + function getInvertRows(selectedRows: any, checked: boolean, flag): any { + if (flag == 'currentPage') { + const curPageRows = findNodeAll(toRaw(unref(flattedData)), () => true, { + children: propsRef.value.childrenColumnName ?? 'children', + }); + const selectedkeys = selectedRows.map((item) => getRecordKey(item)); + const result: any = []; + curPageRows.forEach((item) => { + const curRowkey = getRecordKey(item); + const index = selectedkeys.findIndex((item) => item === curRowkey); + if (index == -1) { + checked && result.push(toRaw(item)); + } else { + !checked && result.push(toRaw(item)); + } + }); + return result; + } else { + return toRaw(selectedRows); + } + } + function getSelectRows() { + return unref(selectedRows) as T[]; + } + + function getSelectRowKeys() { + return unref(selectedKeys); + } + + function getRowSelection() { + return unref(getRowSelectionRef)!; + } + + function deleteSelectRowByKey(key: string) { + const index = selectedKeys.value.findIndex((item) => item === key); + if (index !== -1) { + selectedKeys.value.splice(index, 1); + selectedRows.value.splice(index, 1); + } + } + + // 【QQYUN-5837】动态计算 expandIconColumnIndex + const getExpandIconColumnIndex = computed(() => { + const { expandIconColumnIndex } = unref(propsRef); + // 未设置选择列,则保持不变 + if (getRowSelectionRef.value == null) { + return expandIconColumnIndex; + } + // 设置了选择列,并且未传入 index 参数,则返回 1 + if (expandIconColumnIndex == null) { + return 1; + } + return expandIconColumnIndex; + }); + + return { + getRowSelection, + getRowSelectionRef, + getSelectRows, + getSelectRowKeys, + setSelectedRowKeys, + deleteSelectRowByKey, + selectHeaderProps, + isCustomSelection, + handleCustomSelectColumn, + clearSelectedRowKeys, + getExpandIconColumnIndex, + }; +} + +function getTableBody(wrap: HTMLDivElement) { + return new Promise((resolve) => { + (function fn() { + const bodyEl = wrap.querySelector('.ant-table-wrapper .ant-table-body') as HTMLDivElement; + if (bodyEl) { + resolve(bodyEl); + } else { + setTimeout(fn, 100); + } + })(); + }); +} + +function flattenData(data: RecordType[] | undefined, childrenColumnName: string): RecordType[] { + let list: RecordType[] = []; + (data || []).forEach((record) => { + list.push(record); + + if (record && typeof record === 'object' && childrenColumnName in record) { + list = [...list, ...flattenData((record as any)[childrenColumnName], childrenColumnName)]; + } + }); + + return list; +} + diff --git a/src/components/Table/src/hooks/useDataSource.ts b/src/components/Table/src/hooks/useDataSource.ts new file mode 100644 index 0000000..6d1ec98 --- /dev/null +++ b/src/components/Table/src/hooks/useDataSource.ts @@ -0,0 +1,349 @@ +import type { BasicTableProps, FetchParams, SorterResult } from '../types/table'; +import type { PaginationProps } from '../types/pagination'; +import { ref, unref, ComputedRef, computed, onMounted, watch, reactive, Ref, watchEffect } from 'vue'; +import { useTimeoutFn } from '/@/hooks/core/useTimeout'; +import { buildUUID } from '/@/utils/uuid'; +import { isFunction, isBoolean } from '/@/utils/is'; +import { get, cloneDeep } from 'lodash-es'; +import { FETCH_SETTING, ROW_KEY, PAGE_SIZE } from '../const'; + +interface ActionType { + getPaginationInfo: ComputedRef; + setPagination: (info: Partial) => void; + setLoading: (loading: boolean) => void; + // update-begin--author:sunjianlei---date:220220419---for:由于 getFieldsValue 返回的不是逗号分割的数据,所以改用 validate + validate: () => Recordable; + // update-end--author:sunjianlei---date:220220419---for:由于 getFieldsValue 返回的不是逗号分割的数据,所以改用 validate + clearSelectedRowKeys: () => void; + tableData: Ref; +} + +interface SearchState { + sortInfo: Recordable; + filterInfo: Record; +} +export function useDataSource( + propsRef: ComputedRef, + { getPaginationInfo, setPagination, setLoading, validate, clearSelectedRowKeys, tableData }: ActionType, + emit: EmitType +) { + const searchState = reactive({ + sortInfo: {}, + filterInfo: {}, + }); + const dataSourceRef = ref([]); + const rawDataSourceRef = ref({}); + + watchEffect(() => { + tableData.value = unref(dataSourceRef); + }); + + watch( + () => unref(propsRef).dataSource, + () => { + const { dataSource, api } = unref(propsRef); + !api && dataSource && (dataSourceRef.value = dataSource); + }, + { + immediate: true, + } + ); + + function handleTableChange(pagination: PaginationProps, filters: Partial>, sorter: SorterResult) { + const { clearSelectOnPageChange, sortFn, filterFn } = unref(propsRef); + if (clearSelectOnPageChange) { + clearSelectedRowKeys(); + } + setPagination(pagination); + + const params: Recordable = {}; + if (sorter && isFunction(sortFn)) { + const sortInfo = sortFn(sorter); + searchState.sortInfo = sortInfo; + params.sortInfo = sortInfo; + } + + if (filters && isFunction(filterFn)) { + const filterInfo = filterFn(filters); + searchState.filterInfo = filterInfo; + params.filterInfo = filterInfo; + } + fetch(params); + } + + function setTableKey(items: any[]) { + if (!items || !Array.isArray(items)) return; + items.forEach((item) => { + if (!item[ROW_KEY]) { + item[ROW_KEY] = buildUUID(); + } + if (item.children && item.children.length) { + setTableKey(item.children); + } + }); + } + + const getAutoCreateKey = computed(() => { + return unref(propsRef).autoCreateKey && !unref(propsRef).rowKey; + }); + + const getRowKey = computed(() => { + const { rowKey } = unref(propsRef); + return unref(getAutoCreateKey) ? ROW_KEY : rowKey; + }); + + const getDataSourceRef = computed(() => { + const dataSource = unref(dataSourceRef); + if (!dataSource || dataSource.length === 0) { + return unref(dataSourceRef); + } + if (unref(getAutoCreateKey)) { + const firstItem = dataSource[0]; + const lastItem = dataSource[dataSource.length - 1]; + + if (firstItem && lastItem) { + if (!firstItem[ROW_KEY] || !lastItem[ROW_KEY]) { + const data = cloneDeep(unref(dataSourceRef)); + data.forEach((item) => { + if (!item[ROW_KEY]) { + item[ROW_KEY] = buildUUID(); + } + if (item.children && item.children.length) { + setTableKey(item.children); + } + }); + dataSourceRef.value = data; + } + } + } + return unref(dataSourceRef); + }); + + async function updateTableData(index: number, key: string, value: any) { + const record = dataSourceRef.value[index]; + if (record) { + dataSourceRef.value[index][key] = value; + } + return dataSourceRef.value[index]; + } + + function updateTableDataRecord(rowKey: string | number, record: Recordable): Recordable | undefined { + const row = findTableDataRecord(rowKey); + + if (row) { + for (const field in row) { + if (Reflect.has(record, field)) row[field] = record[field]; + //update-begin---author:wangshuai---date:2024-06-11---for:【TV360X-437】树表 部分组件编辑完后,列表未刷新--- + if (Reflect.has(record, field + '_dictText')) { + row[field + '_dictText'] = record[field + '_dictText']; + } + //update-end---author:wangshuai---date:2024-06-11---for:【TV360X-437】树表 部分组件编辑完后,列表未刷新--- + } + return row; + } + } + function deleteTableDataRecord(rowKey: string | number | string[] | number[]) { + if (!dataSourceRef.value || dataSourceRef.value.length == 0) return; + const rowKeyName = unref(getRowKey); + if (!rowKeyName) return; + const rowKeys = !Array.isArray(rowKey) ? [rowKey] : rowKey; + for (const key of rowKeys) { + let index: number | undefined = dataSourceRef.value.findIndex((row) => { + let targetKeyName: string; + if (typeof rowKeyName === 'function') { + targetKeyName = rowKeyName(row); + } else { + targetKeyName = rowKeyName as string; + } + return row[targetKeyName] === key; + }); + if (index >= 0) { + dataSourceRef.value.splice(index, 1); + } + index = unref(propsRef).dataSource?.findIndex((row) => { + let targetKeyName: string; + if (typeof rowKeyName === 'function') { + targetKeyName = rowKeyName(row); + } else { + targetKeyName = rowKeyName as string; + } + return row[targetKeyName] === key; + }); + if (typeof index !== 'undefined' && index !== -1) unref(propsRef).dataSource?.splice(index, 1); + } + setPagination({ + total: unref(propsRef).dataSource?.length, + }); + } + + function insertTableDataRecord(record: Recordable, index: number): Recordable | undefined { + // if (!dataSourceRef.value || dataSourceRef.value.length == 0) return; + index = index ?? dataSourceRef.value?.length; + unref(dataSourceRef).splice(index, 0, record); + return unref(dataSourceRef); + } + function findTableDataRecord(rowKey: string | number) { + if (!dataSourceRef.value || dataSourceRef.value.length == 0) return; + + const rowKeyName = unref(getRowKey); + if (!rowKeyName) return; + + const { childrenColumnName = 'children' } = unref(propsRef); + + const findRow = (array: any[]) => { + let ret; + array.some(function iter(r) { + if (typeof rowKeyName === 'function') { + if ((rowKeyName(r) as string) === rowKey) { + ret = r; + return true; + } + } else { + if (Reflect.has(r, rowKeyName) && r[rowKeyName] === rowKey) { + ret = r; + return true; + } + } + return r[childrenColumnName] && r[childrenColumnName].some(iter); + }); + return ret; + }; + + // const row = dataSourceRef.value.find(r => { + // if (typeof rowKeyName === 'function') { + // return (rowKeyName(r) as string) === rowKey + // } else { + // return Reflect.has(r, rowKeyName) && r[rowKeyName] === rowKey + // } + // }) + return findRow(dataSourceRef.value); + } + + async function fetch(opt?: FetchParams) { + const { api, searchInfo, defSort, fetchSetting, beforeFetch, afterFetch, useSearchForm, pagination } = unref(propsRef); + if (!api || !isFunction(api)) return; + try { + setLoading(true); + const { pageField, sizeField, listField, totalField } = Object.assign({}, FETCH_SETTING, fetchSetting); + let pageParams: Recordable = {}; + + const { current = 1, pageSize = PAGE_SIZE } = unref(getPaginationInfo) as PaginationProps; + + if ((isBoolean(pagination) && !pagination) || isBoolean(getPaginationInfo)) { + pageParams = {}; + } else { + pageParams[pageField] = (opt && opt.page) || current; + pageParams[sizeField] = pageSize; + } + + const { sortInfo = {}, filterInfo } = searchState; + + let params: Recordable = { + ...pageParams, + // 由于 getFieldsValue 返回的不是逗号分割的数据,所以改用 validate + ...(useSearchForm ? await validate() : {}), + ...searchInfo, + ...defSort, + ...(opt?.searchInfo ?? {}), + ...sortInfo, + ...filterInfo, + ...(opt?.sortInfo ?? {}), + ...(opt?.filterInfo ?? {}), + }; + if (beforeFetch && isFunction(beforeFetch)) { + params = (await beforeFetch(params)) || params; + } + // update-begin--author:liaozhiyang---date:20240227---for:【QQYUN-8316】table查询条件,请求剔除空字符串字段 + for (let item of Object.entries(params)) { + const [key, val] = item; + if (val === '') { + delete params[key]; + }; + }; + // update-end--author:liaozhiyang---date:20240227---for:【QQYUN-8316】table查询条件,请求剔除空字符串字段 + const res = await api(params); + rawDataSourceRef.value = res; + + const isArrayResult = Array.isArray(res); + + let resultItems: Recordable[] = isArrayResult ? res : get(res, listField); + const resultTotal: number = isArrayResult ? 0 : get(res, totalField); + + // 假如数据变少,导致总页数变少并小于当前选中页码,通过getPaginationRef获取到的页码是不正确的,需获取正确的页码再次执行 + if (resultTotal) { + const currentTotalPage = Math.ceil(Number(resultTotal) / pageSize); + if (current > currentTotalPage) { + setPagination({ + current: currentTotalPage, + }); + return await fetch(opt); + } + } + + if (afterFetch && isFunction(afterFetch)) { + resultItems = (await afterFetch(resultItems)) || resultItems; + } + dataSourceRef.value = resultItems; + setPagination({ + total: Number(resultTotal) || 0, + }); + if (opt && opt.page) { + setPagination({ + current: opt.page || 1, + }); + } + emit('fetch-success', { + items: unref(resultItems), + total: Number(resultTotal), + }); + return resultItems; + } catch (error) { + emit('fetch-error', error); + dataSourceRef.value = []; + setPagination({ + total: 0, + }); + } finally { + setLoading(false); + } + } + + function setTableData(values: T[]) { + dataSourceRef.value = values; + } + + function getDataSource() { + return getDataSourceRef.value as T[]; + } + + function getRawDataSource() { + return rawDataSourceRef.value as T; + } + + async function reload(opt?: FetchParams) { + return await fetch(opt); + } + + onMounted(() => { + useTimeoutFn(() => { + unref(propsRef).immediate && fetch(); + }, 16); + }); + + return { + getDataSourceRef, + getDataSource, + getRawDataSource, + getRowKey, + setTableData, + getAutoCreateKey, + fetch, + reload, + updateTableData, + updateTableDataRecord, + deleteTableDataRecord, + insertTableDataRecord, + findTableDataRecord, + handleTableChange, + }; +} diff --git a/src/components/Table/src/hooks/useLoading.ts b/src/components/Table/src/hooks/useLoading.ts new file mode 100644 index 0000000..0a670b0 --- /dev/null +++ b/src/components/Table/src/hooks/useLoading.ts @@ -0,0 +1,21 @@ +import { ref, ComputedRef, unref, computed, watch } from 'vue'; +import type { BasicTableProps } from '../types/table'; + +export function useLoading(props: ComputedRef) { + const loadingRef = ref(unref(props).loading); + + watch( + () => unref(props).loading, + (loading) => { + loadingRef.value = loading; + } + ); + + const getLoading = computed(() => unref(loadingRef)); + + function setLoading(loading: boolean) { + loadingRef.value = loading; + } + + return { getLoading, setLoading }; +} diff --git a/src/components/Table/src/hooks/usePagination.tsx b/src/components/Table/src/hooks/usePagination.tsx new file mode 100644 index 0000000..d90eb29 --- /dev/null +++ b/src/components/Table/src/hooks/usePagination.tsx @@ -0,0 +1,85 @@ +import type { PaginationProps } from '../types/pagination'; +import type { BasicTableProps } from '../types/table'; +import { computed, unref, ref, ComputedRef, watch } from 'vue'; +import { LeftOutlined, RightOutlined } from '@ant-design/icons-vue'; +import { isBoolean } from '/@/utils/is'; +import { PAGE_SIZE, PAGE_SIZE_OPTIONS } from '../const'; +import { useI18n } from '/@/hooks/web/useI18n'; + +interface ItemRender { + page: number; + type: 'page' | 'prev' | 'next'; + originalElement: any; +} + +function itemRender({ page, type, originalElement }: ItemRender) { + if (type === 'prev') { + return page === 0 ? null : ; + } else if (type === 'next') { + return page === 1 ? null : ; + } + return originalElement; +} + +export function usePagination(refProps: ComputedRef) { + const { t } = useI18n(); + + const configRef = ref({}); + const show = ref(true); + + watch( + () => unref(refProps).pagination, + (pagination) => { + if (!isBoolean(pagination) && pagination) { + configRef.value = { + ...unref(configRef), + ...(pagination ?? {}), + }; + } + } + ); + + const getPaginationInfo = computed((): PaginationProps | boolean => { + const { pagination } = unref(refProps); + + if (!unref(show) || (isBoolean(pagination) && !pagination)) { + return false; + } + + return { + current: 1, + pageSize: PAGE_SIZE, + size: 'small', + defaultPageSize: PAGE_SIZE, + showTotal: (total) => t('component.table.total', { total }), + showSizeChanger: true, + pageSizeOptions: PAGE_SIZE_OPTIONS, + itemRender: itemRender, + showQuickJumper: true, + ...(isBoolean(pagination) ? {} : pagination), + ...unref(configRef), + }; + }); + + function setPagination(info: Partial) { + const paginationInfo = unref(getPaginationInfo); + configRef.value = { + ...(!isBoolean(paginationInfo) ? paginationInfo : {}), + ...info, + }; + } + + function getPagination() { + return unref(getPaginationInfo); + } + + function getShowPagination() { + return unref(show); + } + + async function setShowPagination(flag: boolean) { + show.value = flag; + } + + return { getPagination, getPaginationInfo, setShowPagination, getShowPagination, setPagination }; +} diff --git a/src/components/Table/src/hooks/useRowSelection.ts b/src/components/Table/src/hooks/useRowSelection.ts new file mode 100644 index 0000000..c9ee5e2 --- /dev/null +++ b/src/components/Table/src/hooks/useRowSelection.ts @@ -0,0 +1,127 @@ +import { isFunction } from '/@/utils/is'; +import type { BasicTableProps, TableRowSelection } from '../types/table'; +import { computed, ComputedRef, nextTick, Ref, ref, toRaw, unref, watch } from 'vue'; +import { ROW_KEY } from '../const'; +import { omit } from 'lodash-es'; +import { findNodeAll } from '/@/utils/helper/treeHelper'; + +export function useRowSelection(propsRef: ComputedRef, tableData: Ref, emit: EmitType) { + const selectedRowKeysRef = ref([]); + const selectedRowRef = ref([]); + + const getRowSelectionRef = computed((): TableRowSelection | null => { + const { rowSelection } = unref(propsRef); + if (!rowSelection) { + return null; + } + + return { + // AntDV3.0 之后使用远程加载数据进行分页时, + // 默认会清空上一页选择的行数据(导致无法跨页选择), + // 将此属性设置为 true 即可解决。 + preserveSelectedRowKeys: true, + selectedRowKeys: unref(selectedRowKeysRef), + onChange: (selectedRowKeys: string[]) => { + setSelectedRowKeys(selectedRowKeys); + }, + ...omit(rowSelection, ['onChange']), + }; + }); + + watch( + () => unref(propsRef).rowSelection?.selectedRowKeys, + (v: string[]) => { + setSelectedRowKeys(v); + } + ); + + watch( + () => unref(selectedRowKeysRef), + () => { + nextTick(() => { + const { rowSelection } = unref(propsRef); + if (rowSelection) { + const { onChange } = rowSelection; + if (onChange && isFunction(onChange)) onChange(getSelectRowKeys(), getSelectRows()); + } + //update-begin---author:scott ---date:2023-06-19 for:【issues/503】table行选择时卡顿明显 #503--- + //table行选择时卡顿明显 #503 + if (unref(tableData).length > 0) { + emit('selection-change', { + keys: getSelectRowKeys(), + rows: getSelectRows(), + }); + } + //update-end---author:scott ---date::2023-06-19 for:【issues/503】table行选择时卡顿明显 #503--- + }); + }, + { deep: true } + ); + + const getAutoCreateKey = computed(() => { + return unref(propsRef).autoCreateKey && !unref(propsRef).rowKey; + }); + + const getRowKey = computed(() => { + const { rowKey } = unref(propsRef); + return unref(getAutoCreateKey) ? ROW_KEY : rowKey; + }); + + function setSelectedRowKeys(rowKeys: string[]) { + selectedRowKeysRef.value = rowKeys; + const allSelectedRows = findNodeAll( + toRaw(unref(tableData)).concat(toRaw(unref(selectedRowRef))), + (item) => rowKeys.includes(item[unref(getRowKey) as string]), + { + children: propsRef.value.childrenColumnName ?? 'children', + } + ); + const trueSelectedRows: any[] = []; + rowKeys.forEach((key: string) => { + const found = allSelectedRows.find((item) => item[unref(getRowKey) as string] === key); + found && trueSelectedRows.push(found); + }); + selectedRowRef.value = trueSelectedRows; + } + + function setSelectedRows(rows: Recordable[]) { + selectedRowRef.value = rows; + } + + function clearSelectedRowKeys() { + selectedRowRef.value = []; + selectedRowKeysRef.value = []; + } + + function deleteSelectRowByKey(key: string) { + const selectedRowKeys = unref(selectedRowKeysRef); + const index = selectedRowKeys.findIndex((item) => item === key); + if (index !== -1) { + unref(selectedRowKeysRef).splice(index, 1); + } + } + + function getSelectRowKeys() { + return unref(selectedRowKeysRef); + } + + function getSelectRows() { + // const ret = toRaw(unref(selectedRowRef)).map((item) => toRaw(item)); + return unref(selectedRowRef) as T[]; + } + + function getRowSelection() { + return unref(getRowSelectionRef)!; + } + + return { + getRowSelection, + getRowSelectionRef, + getSelectRows, + getSelectRowKeys, + setSelectedRowKeys, + clearSelectedRowKeys, + deleteSelectRowByKey, + setSelectedRows, + }; +} diff --git a/src/components/Table/src/hooks/useTable.ts b/src/components/Table/src/hooks/useTable.ts new file mode 100644 index 0000000..40575a3 --- /dev/null +++ b/src/components/Table/src/hooks/useTable.ts @@ -0,0 +1,168 @@ +import type { BasicTableProps, TableActionType, FetchParams, BasicColumn } from '../types/table'; +import type { PaginationProps } from '../types/pagination'; +import type { DynamicProps } from '/#/utils'; +import type { FormActionType } from '/@/components/Form'; +import type { WatchStopHandle } from 'vue'; +import { getDynamicProps } from '/@/utils'; +import { ref, onUnmounted, unref, watch, toRaw } from 'vue'; +import { isProdMode } from '/@/utils/env'; +import { error } from '/@/utils/log'; + +type Props = Partial>; + +type UseTableMethod = TableActionType & { + getForm: () => FormActionType; +}; + +export function useTable(tableProps?: Props): [ + (instance: TableActionType, formInstance: UseTableMethod) => void, + TableActionType & { + getForm: () => FormActionType; + } +] { + const tableRef = ref>(null); + const loadedRef = ref>(false); + const formRef = ref>(null); + + let stopWatch: WatchStopHandle; + + function register(instance: TableActionType, formInstance: UseTableMethod) { + isProdMode() && + onUnmounted(() => { + tableRef.value = null; + loadedRef.value = null; + }); + + if (unref(loadedRef) && isProdMode() && instance === unref(tableRef)) return; + + tableRef.value = instance; + formRef.value = formInstance; + tableProps && instance.setProps(getDynamicProps(tableProps)); + loadedRef.value = true; + + stopWatch?.(); + + stopWatch = watch( + () => tableProps, + () => { + tableProps && instance.setProps(getDynamicProps(tableProps)); + }, + { + immediate: true, + deep: true, + } + ); + } + + function getTableInstance(): TableActionType { + const table = unref(tableRef); + if (!table) { + error('The table instance has not been obtained yet, please make sure the table is presented when performing the table operation!'); + } + return table as TableActionType; + } + + function getTableRef(){ + return tableRef; + } + + const methods: TableActionType & { + getForm: () => FormActionType; + } & { + getTableRef: () => any; + } = { + reload: async (opt?: FetchParams) => { + return await getTableInstance().reload(opt); + }, + setProps: (props: Partial) => { + getTableInstance().setProps(props); + }, + redoHeight: () => { + getTableInstance().redoHeight(); + }, + setLoading: (loading: boolean) => { + getTableInstance().setLoading(loading); + }, + getDataSource: () => { + return getTableInstance().getDataSource(); + }, + getRawDataSource: () => { + return getTableInstance().getRawDataSource(); + }, + getColumns: ({ ignoreIndex = false }: { ignoreIndex?: boolean } = {}) => { + const columns = getTableInstance().getColumns({ ignoreIndex }) || []; + return toRaw(columns); + }, + setColumns: (columns: BasicColumn[]) => { + getTableInstance().setColumns(columns); + }, + setTableData: (values: any[]) => { + return getTableInstance().setTableData(values); + }, + setPagination: (info: Partial) => { + return getTableInstance().setPagination(info); + }, + deleteSelectRowByKey: (key: string) => { + getTableInstance().deleteSelectRowByKey(key); + }, + getSelectRowKeys: () => { + return toRaw(getTableInstance().getSelectRowKeys()); + }, + getSelectRows: () => { + return toRaw(getTableInstance().getSelectRows()); + }, + clearSelectedRowKeys: () => { + getTableInstance().clearSelectedRowKeys(); + }, + setSelectedRowKeys: (keys: string[] | number[]) => { + getTableInstance().setSelectedRowKeys(keys); + }, + getPaginationRef: () => { + return getTableInstance().getPaginationRef(); + }, + getSize: () => { + return toRaw(getTableInstance().getSize()); + }, + updateTableData: (index: number, key: string, value: any) => { + return getTableInstance().updateTableData(index, key, value); + }, + deleteTableDataRecord: (rowKey: string | number | string[] | number[]) => { + return getTableInstance().deleteTableDataRecord(rowKey); + }, + insertTableDataRecord: (record: Recordable | Recordable[], index?: number) => { + return getTableInstance().insertTableDataRecord(record, index); + }, + updateTableDataRecord: (rowKey: string | number, record: Recordable) => { + return getTableInstance().updateTableDataRecord(rowKey, record); + }, + findTableDataRecord: (rowKey: string | number) => { + return getTableInstance().findTableDataRecord(rowKey); + }, + getRowSelection: () => { + return toRaw(getTableInstance().getRowSelection()); + }, + getCacheColumns: () => { + return toRaw(getTableInstance().getCacheColumns()); + }, + getForm: () => { + return unref(formRef) as unknown as FormActionType; + }, + setShowPagination: async (show: boolean) => { + getTableInstance().setShowPagination(show); + }, + getShowPagination: () => { + return toRaw(getTableInstance().getShowPagination()); + }, + expandAll: () => { + getTableInstance().expandAll(); + }, + collapseAll: () => { + getTableInstance().collapseAll(); + }, + getTableRef: () => { + return getTableRef(); + } + }; + + return [register, methods]; +} diff --git a/src/components/Table/src/hooks/useTableContext.ts b/src/components/Table/src/hooks/useTableContext.ts new file mode 100644 index 0000000..b657bb2 --- /dev/null +++ b/src/components/Table/src/hooks/useTableContext.ts @@ -0,0 +1,22 @@ +import type { Ref } from 'vue'; +import type { BasicTableProps, TableActionType } from '../types/table'; +import { provide, inject, ComputedRef } from 'vue'; + +const key = Symbol('basic-table'); + +type Instance = TableActionType & { + wrapRef: Ref>; + getBindValues: ComputedRef; +}; + +type RetInstance = Omit & { + getBindValues: ComputedRef; +}; + +export function createTableContext(instance: Instance) { + provide(key, instance); +} + +export function useTableContext(): RetInstance { + return inject(key) as RetInstance; +} diff --git a/src/components/Table/src/hooks/useTableExpand.ts b/src/components/Table/src/hooks/useTableExpand.ts new file mode 100644 index 0000000..96bd3e0 --- /dev/null +++ b/src/components/Table/src/hooks/useTableExpand.ts @@ -0,0 +1,61 @@ +import type { ComputedRef, Ref } from 'vue'; +import type { BasicTableProps } from '../types/table'; +import { computed, unref, ref, toRaw, watch } from 'vue'; +import { ROW_KEY } from '../const'; + +export function useTableExpand(propsRef: ComputedRef, tableData: Ref, emit: EmitType) { + const expandedRowKeys = ref([]); + + const getAutoCreateKey = computed(() => { + return unref(propsRef).autoCreateKey && !unref(propsRef).rowKey; + }); + + const getRowKey = computed(() => { + const { rowKey } = unref(propsRef); + return unref(getAutoCreateKey) ? ROW_KEY : rowKey; + }); + + const getExpandOption = computed(() => { + const { isTreeTable } = unref(propsRef); + if (!isTreeTable) return {}; + + return { + expandedRowKeys: unref(expandedRowKeys), + onExpandedRowsChange: (keys: string[]) => { + expandedRowKeys.value = keys; + emit('expanded-rows-change', keys); + }, + }; + }); + + // 监听并同步props中的expandedRowKeys + watch(() => propsRef.value?.expandedRowKeys, (keys) => { + if (Array.isArray(keys)) { + expandedRowKeys.value = keys; + } + }, {immediate: true}); + + function expandAll() { + const keys = getAllKeys(); + expandedRowKeys.value = keys; + } + + function getAllKeys(data?: Recordable[]) { + const keys: string[] = []; + const { childrenColumnName } = unref(propsRef); + toRaw(data || unref(tableData)).forEach((item) => { + keys.push(item[unref(getRowKey) as string]); + const children = item[childrenColumnName || 'children']; + if (children?.length) { + keys.push(...getAllKeys(children)); + } + }); + return keys; + } + + function collapseAll() { + expandedRowKeys.value = []; + } + + return { getExpandOption, expandAll, collapseAll }; +} diff --git a/src/components/Table/src/hooks/useTableFooter.ts b/src/components/Table/src/hooks/useTableFooter.ts new file mode 100644 index 0000000..bc19cd2 --- /dev/null +++ b/src/components/Table/src/hooks/useTableFooter.ts @@ -0,0 +1,72 @@ +import type { ComputedRef, Ref, Slots } from 'vue'; +import type { BasicTableProps } from '../types/table'; +import { unref, computed, h, nextTick, watchEffect } from 'vue'; +import TableFooter from '../components/TableFooter.vue'; +import { useEventListener } from '/@/hooks/event/useEventListener'; + +export function useTableFooter( + propsRef: ComputedRef, + slots: Slots, + scrollRef: ComputedRef<{ + x: string | number | true; + y: Nullable; + scrollToFirstRowOnChange: boolean; + }>, + tableElRef: Ref, + getDataSourceRef: ComputedRef +) { + const getIsEmptyData = computed(() => { + return (unref(getDataSourceRef) || []).length === 0; + }); + + // 是否有展开行 + const hasExpandedRow = computed(() => Object.keys(slots).includes('expandedRowRender')) + + const getFooterProps = computed((): Recordable | undefined => { + const { summaryFunc, showSummary, summaryData, bordered } = unref(propsRef); + return showSummary && !unref(getIsEmptyData) ? () => h(TableFooter, { + bordered, + summaryFunc, + summaryData, + scroll: unref(scrollRef), + hasExpandedRow: hasExpandedRow.value + }) : undefined; + }); + + watchEffect(() => { + handleSummary(); + }); + + function handleSummary() { + const { showSummary, canResize } = unref(propsRef); + if (!showSummary || unref(getIsEmptyData)) return; + nextTick(() => { + const tableEl = unref(tableElRef); + if (!tableEl) return; + let bodyDom; + // update-begin--author:liaozhiyang---date:20241111---for:【issues/7422】BasicTable列表canResize属性为true时合计行不能横向滚动 + if (canResize) { + setTimeout(() => { + bodyDom = tableEl.$el.querySelector('.ant-table-body'); + }, 0); + } else { + bodyDom = tableEl.$el.querySelector('.ant-table-content'); + } + setTimeout(() => { + useEventListener({ + el: bodyDom, + name: 'scroll', + listener: () => { + const footerBodyDom = tableEl.$el.querySelector('.ant-table-footer .ant-table-content') as HTMLDivElement; + if (!footerBodyDom || !bodyDom) return; + footerBodyDom.scrollLeft = bodyDom.scrollLeft; + }, + wait: 0, + options: true, + }); + }, 0); + // update-end--author:liaozhiyang---date:20241111---for:【issues/7422】BasicTable列表canResize属性为true时合计行不能横向滚动 + }); + } + return { getFooterProps }; +} diff --git a/src/components/Table/src/hooks/useTableForm.ts b/src/components/Table/src/hooks/useTableForm.ts new file mode 100644 index 0000000..2add5e1 --- /dev/null +++ b/src/components/Table/src/hooks/useTableForm.ts @@ -0,0 +1,51 @@ +import type { ComputedRef, Slots } from 'vue'; +import type { BasicTableProps, FetchParams } from '../types/table'; +import { unref, computed } from 'vue'; +import type { FormProps } from '/@/components/Form'; +import { isFunction } from '/@/utils/is'; + +export function useTableForm( + propsRef: ComputedRef, + slots: Slots, + fetch: (opt?: FetchParams | undefined) => Promise, + getLoading: ComputedRef +) { + const getFormProps = computed((): Partial => { + const { formConfig } = unref(propsRef); + const { submitButtonOptions, autoSubmitOnEnter} = formConfig || {}; + return { + showAdvancedButton: true, + ...formConfig, + submitButtonOptions: { loading: unref(getLoading), ...submitButtonOptions }, + compact: true, + //update-begin-author:liusq---date:20230605--for: [issues/568]设置 autoSubmitOnEnter: false 不生效 --- + autoSubmitOnEnter: autoSubmitOnEnter, + //update-end-author:liusq---date:20230605--for: [issues/568]设置 autoSubmitOnEnter: false 不生效 --- + }; + }); + + const getFormSlotKeys: ComputedRef = computed(() => { + const keys = Object.keys(slots); + return keys.map((item) => (item.startsWith('form-') ? item : null)).filter((item) => !!item) as string[]; + }); + + function replaceFormSlotKey(key: string) { + if (!key) return ''; + return key?.replace?.(/form\-/, '') ?? ''; + } + + function handleSearchInfoChange(info: Recordable) { + const { handleSearchInfoFn } = unref(propsRef); + if (handleSearchInfoFn && isFunction(handleSearchInfoFn)) { + info = handleSearchInfoFn(info) || info; + } + fetch({ searchInfo: info, page: 1 }); + } + + return { + getFormProps, + replaceFormSlotKey, + getFormSlotKeys, + handleSearchInfoChange, + }; +} diff --git a/src/components/Table/src/hooks/useTableHeader.ts b/src/components/Table/src/hooks/useTableHeader.ts new file mode 100644 index 0000000..597b5ec --- /dev/null +++ b/src/components/Table/src/hooks/useTableHeader.ts @@ -0,0 +1,58 @@ +import type { ComputedRef, Slots } from 'vue'; +import type { BasicTableProps, InnerHandlers } from '../types/table'; +import { unref, computed, h } from 'vue'; +import TableHeader from '../components/TableHeader.vue'; +import { isString } from '/@/utils/is'; +import { getSlot } from '/@/utils/helper/tsxHelper'; + +export function useTableHeader(propsRef: ComputedRef, slots: Slots, handlers: InnerHandlers) { + const getHeaderProps = computed((): Recordable => { + const { title, showTableSetting, titleHelpMessage, tableSetting } = unref(propsRef); + const hideTitle = !slots.tableTitle && !title && !slots.toolbar && !showTableSetting; + if (hideTitle && !isString(title)) { + return {}; + } + + return { + title: hideTitle + ? null + : () => + h( + TableHeader, + { + title, + titleHelpMessage, + showTableSetting, + tableSetting, + onColumnsChange: handlers.onColumnsChange, + } as Recordable, + { + ...(slots.toolbar + ? { + toolbar: () => getSlot(slots, 'toolbar'), + } + : {}), + ...(slots.tableTitle + ? { + tableTitle: () => getSlot(slots, 'tableTitle'), + } + : {}), + ...(slots.headerTop + ? { + headerTop: () => getSlot(slots, 'headerTop'), + } + : {}), + //添加tableTop插槽 + ...(slots.tableTop + ? { + tableTop: () => getSlot(slots, 'tableTop'), + } + : {}), + // 添加alertAfter插槽 + ...(slots.alertAfter ? { alertAfter: () => getSlot(slots, 'alertAfter') } : {}), + } + ), + }; + }); + return { getHeaderProps }; +} diff --git a/src/components/Table/src/hooks/useTableScroll.ts b/src/components/Table/src/hooks/useTableScroll.ts new file mode 100644 index 0000000..f25918c --- /dev/null +++ b/src/components/Table/src/hooks/useTableScroll.ts @@ -0,0 +1,236 @@ +import type { BasicTableProps, TableRowSelection, BasicColumn } from '../types/table'; +import type { Ref, ComputedRef, Slots } from 'vue'; +import { computed, unref, ref, nextTick, watch } from 'vue'; +import { getViewportOffset } from '/@/utils/domUtils'; +import { isBoolean } from '/@/utils/is'; +import { useWindowSizeFn } from '/@/hooks/event/useWindowSizeFn'; +import { useModalContext } from '/@/components/Modal'; +import { onMountedOrActivated } from '/@/hooks/core/onMountedOrActivated'; +import { useDebounceFn } from '@vueuse/core'; +import componentSetting from '/@/settings/componentSetting'; + +export function useTableScroll( + propsRef: ComputedRef, + tableElRef: Ref, + columnsRef: ComputedRef, + rowSelectionRef: ComputedRef | null>, + getDataSourceRef: ComputedRef, + slots: Slots, + getPaginationInfo: ComputedRef +) { + const tableHeightRef: Ref> = ref(null); + + const modalFn = useModalContext(); + + // Greater than animation time 280 + const debounceRedoHeight = useDebounceFn(redoHeight, 100); + + const getCanResize = computed(() => { + const { canResize, scroll } = unref(propsRef); + return canResize && !(scroll || {}).y; + }); + + watch( + () => [unref(getCanResize), unref(getDataSourceRef)?.length], + () => { + debounceRedoHeight(); + }, + { + flush: 'post', + } + ); + + function redoHeight() { + nextTick(() => { + calcTableHeight(); + }); + } + + function setHeight(heigh: number) { + tableHeightRef.value = heigh; + // Solve the problem of modal adaptive height calculation when the form is placed in the modal + modalFn?.redoModalHeight?.(); + } + + // No need to repeat queries + let paginationEl: HTMLElement | null; + let footerEl: HTMLElement | null; + let bodyEl: HTMLElement | null; + + async function calcTableHeight() { + const { resizeHeightOffset, pagination, maxHeight, minHeight } = unref(propsRef); + const tableData = unref(getDataSourceRef); + + const table = unref(tableElRef); + if (!table) return; + + const tableEl: Element = table.$el; + if (!tableEl) return; + + if (!bodyEl) { + //update-begin-author:taoyan date:2023-2-11 for: issues/355 前端-jeecgboot-vue3 3.4.4版本,BasicTable高度自适应功能失效,设置BasicTable组件maxHeight失效; 原因已找到,请看详情 + bodyEl = tableEl.querySelector('.ant-table-tbody'); + //update-end-author:taoyan date:2023-2-11 for: issues/355 前端-jeecgboot-vue3 3.4.4版本,BasicTable高度自适应功能失效,设置BasicTable组件maxHeight失效; 原因已找到,请看详情 + if (!bodyEl) return; + } + + const hasScrollBarY = bodyEl.scrollHeight > bodyEl.clientHeight; + const hasScrollBarX = bodyEl.scrollWidth > bodyEl.clientWidth; + + if (hasScrollBarY) { + tableEl.classList.contains('hide-scrollbar-y') && tableEl.classList.remove('hide-scrollbar-y'); + } else { + !tableEl.classList.contains('hide-scrollbar-y') && tableEl.classList.add('hide-scrollbar-y'); + } + + if (hasScrollBarX) { + tableEl.classList.contains('hide-scrollbar-x') && tableEl.classList.remove('hide-scrollbar-x'); + } else { + !tableEl.classList.contains('hide-scrollbar-x') && tableEl.classList.add('hide-scrollbar-x'); + } + + bodyEl!.style.height = 'unset'; + + if (!unref(getCanResize) || ( !tableData || tableData.length === 0)) return; + + await nextTick(); + //Add a delay to get the correct bottomIncludeBody paginationHeight footerHeight headerHeight + + const headEl = tableEl.querySelector('.ant-table-thead'); + + if (!headEl) return; + + // Table height from bottom + const { bottomIncludeBody } = getViewportOffset(headEl); + // Table height from bottom height-custom offset + + const paddingHeight = 32; + // Pager height + let paginationHeight = 2; + if (!isBoolean(pagination)) { + paginationEl = tableEl.querySelector('.ant-pagination') as HTMLElement; + if (paginationEl) { + const offsetHeight = paginationEl.offsetHeight; + paginationHeight += offsetHeight || 0; + } else { + // TODO First fix 24 + paginationHeight += 24; + } + } else { + paginationHeight = -8; + } + + let footerHeight = 0; + // update-begin--author:liaozhiyang---date:20240424---for:【issues/1137】BasicTable自适应高度计算没有减去尾部高度 + footerEl = tableEl.querySelector('.ant-table-footer'); + if (footerEl) { + const offsetHeight = footerEl.offsetHeight; + footerHeight = offsetHeight || 0; + } + // update-end--author:liaozhiyang---date:20240424---for:【issues/1137】BasicTable自适应高度计算没有减去尾部高度 + + let headerHeight = 0; + if (headEl) { + headerHeight = (headEl as HTMLElement).offsetHeight; + } + + let height = bottomIncludeBody - (resizeHeightOffset || 0) - paddingHeight - paginationHeight - footerHeight - headerHeight; + // update-begin--author:liaozhiyang---date:20240603---for【TV360X-861】列表查询区域不可往上滚动 + // 10+6(外层边距padding:10 + 内层padding-bottom:6) + height -= 16; + // update-end--author:liaozhiyang---date:20240603---for:【TV360X-861】列表查询区域不可往上滚动 + + height = (height < minHeight! ? (minHeight as number) : height) ?? height; + height = (height > maxHeight! ? (maxHeight as number) : height) ?? height; + setHeight(height); + + bodyEl!.style.height = `${height}px`; + // update-begin--author:liaozhiyang---date:20240609---for【issues/8374】分页始终显示在底部 + nextTick(() => { + if (maxHeight === undefined) { + if (unref(getPaginationInfo) && unref(getDataSourceRef).length) { + const pageSize = unref(getPaginationInfo)?.pageSize; + const current = unref(getPaginationInfo)?.current; + const total = unref(getPaginationInfo)?.total; + const tableBody = tableEl.querySelector('.ant-table-body') as HTMLElement; + const tr = tableEl.querySelector('.ant-table-tbody')?.children ?? []; + const lastrEl = tr[tr.length - 1] as HTMLElement; + const trHeight = lastrEl.offsetHeight; + const dataHeight = trHeight * pageSize; + if (tableBody && lastrEl) { + // update-begin--author:liaozhiyang---date:20250702---for:【issues/8532】online权限管理中的按钮权限第一页数据看不到 + // table是否隐藏(隐藏的table不能吸底) + const isTableBodyHide = tableBody.offsetHeight == 0 && tableBody.offsetWidth == 0; + if (isTableBodyHide) { + return; + } + // update-end--author:liaozhiyang---date:20250702---for:【issues/8532】online权限管理中的按钮权限第一页数据看不到 + if (current === 1 && pageSize > unref(getDataSourceRef).length && total <= pageSize) { + tableBody.style.height = `${height}px`; + } else { + tableBody.style.height = `${dataHeight < height ? dataHeight : height}px`; + } + } + } + } + }); + // update-end--author:liaozhiyang---date:20240609---for【issues/8374】分页始终显示在底部 + } + useWindowSizeFn(calcTableHeight, 280); + onMountedOrActivated(() => { + calcTableHeight(); + nextTick(() => { + debounceRedoHeight(); + }); + }); + + const getScrollX = computed(() => { + let width = 0; + // update-begin--author:liaozhiyang---date:20230922---for:【QQYUN-6391】在线表单列表字段过多时,列头和数据对不齐 + // if (unref(rowSelectionRef)) { + // width += 60; + // } + // update-end--author:liaozhiyang---date:20230922---for:【QQYUN-6391】在线表单列表字段过多时,列头和数据对不齐 + // update-begin--author:liaozhiyang---date:20230925---for:【issues/5411】BasicTable 配置maxColumnWidth 未生效 + const { maxColumnWidth } = unref(propsRef); + // TODO props ?? 0; + const NORMAL_WIDTH = maxColumnWidth ?? 150; + // update-end--author:liaozhiyang---date:20230925---for:【issues/5411】BasicTable 配置maxColumnWidth 未生效 + // date-begin--author:liaozhiyang---date:20250716---for:【QQYUN-13122】有数十个字段时只展示2个字段,其余字段为ifShow:false会有滚动条 + const columns = unref(columnsRef).filter((item) => !(item.defaultHidden == true || item.ifShow == false)) + // date-end--author:liaozhiyang---date:20250716---for:【QQYUN-13122】有数十个字段时只展示2个字段,其余字段为ifShow:false会有滚动条 + columns.forEach((item) => { + width += Number.parseInt(item.width as string) || 0; + }); + const unsetWidthColumns = columns.filter((item) => !Reflect.has(item, 'width')); + + const len = unsetWidthColumns.length; + if (len !== 0) { + width += len * NORMAL_WIDTH; + } + // update-begin--author:liaozhiyang---date:202401009---for:【TV360X-116】内嵌风格字段较多时表格错位 + if (slots.expandedRowRender) { + width += propsRef.value.expandColumnWidth; + } + // update-end--author:liaozhiyang---date:202401009---for:【TV360X-116】内嵌风格字段较多时表格错位 + const table = unref(tableElRef); + const tableWidth = table?.$el?.offsetWidth ?? 0; + return tableWidth > width ? '100%' : width; + }); + + const getScrollRef = computed(() => { + const tableHeight = unref(tableHeightRef); + const { canResize, scroll } = unref(propsRef); + const { table } = componentSetting; + return { + x: unref(getScrollX), + y: canResize ? tableHeight : null, + // update-begin--author:liaozhiyang---date:20240424---for:【issues/1188】BasicTable加上scrollToFirstRowOnChange类型定义 + scrollToFirstRowOnChange: table.scrollToFirstRowOnChange, + // update-end--author:liaozhiyang---date:20240424---for:【issues/1188】BasicTable加上scrollToFirstRowOnChange类型定义 + ...scroll, + }; + }); + + return { getScrollRef, redoHeight }; +} diff --git a/src/components/Table/src/hooks/useTableStyle.ts b/src/components/Table/src/hooks/useTableStyle.ts new file mode 100644 index 0000000..f15aa7c --- /dev/null +++ b/src/components/Table/src/hooks/useTableStyle.ts @@ -0,0 +1,57 @@ +import type { ComputedRef } from 'vue'; +import type { BasicTableProps, TableCustomRecord } from '../types/table'; +import { unref } from 'vue'; +import { isFunction } from '/@/utils/is'; +import { ROW_KEY } from '/@/components/Table/src/const'; + +export function useTableStyle(propsRef: ComputedRef, prefixCls: string) { + /** + * 2024-09-19 + * liaozhiyang + * 【issues/7200】basicTable选中后没有选中样式 + * */ + const isChecked = (propsRef, record) => { + const getAutoCreateKey = () => { + return unref(propsRef).autoCreateKey && !unref(propsRef).rowKey; + }; + const getRowKey = () => { + const { rowKey } = unref(propsRef); + return getAutoCreateKey() ? ROW_KEY : rowKey; + }; + // 获取行的key字段数据 + const getRecordKey = (record) => { + const key = getRowKey(); + if (!key) { + return record[ROW_KEY]; + } else if (isFunction(key)) { + return key(record); + } else { + return record[key]; + } + }; + const { rowSelection } = unref(propsRef); + if (rowSelection?.selectedRowKeys?.length) { + return rowSelection.selectedRowKeys.includes(getRecordKey(record)); + } + return false; + }; + + function getRowClassName(record: TableCustomRecord, index: number) { + const { striped, rowClassName } = unref(propsRef); + const classNames: string[] = []; + if (striped) { + classNames.push((index || 0) % 2 === 1 ? `${prefixCls}-row__striped` : ''); + } + if (rowClassName && isFunction(rowClassName)) { + classNames.push(rowClassName(record, index)); + } + // update-begin--author:liaozhiyang---date:20240919---for:【issues/7200】basicTable选中后没有选中样式 + if (isChecked(propsRef, record)) { + classNames.push('ant-table-row-selected'); + } + // update-end--author:liaozhiyang---date:20240919---for:【issues/7200】basicTable选中后没有选中样式 + return classNames.filter((cls) => !!cls).join(' '); + } + + return { getRowClassName }; +} diff --git a/src/components/Table/src/props.ts b/src/components/Table/src/props.ts new file mode 100644 index 0000000..e46882e --- /dev/null +++ b/src/components/Table/src/props.ts @@ -0,0 +1,150 @@ +import type { PropType } from 'vue'; +import type { PaginationProps } from './types/pagination'; +import type { BasicColumn, FetchSetting, TableSetting, SorterResult, TableCustomRecord, TableRowSelection, SizeType } from './types/table'; +import type { FormProps } from '/@/components/Form'; +import { DEFAULT_FILTER_FN, DEFAULT_SORT_FN, FETCH_SETTING, DEFAULT_SIZE } from './const'; +import { propTypes } from '/@/utils/propTypes'; + +export const basicProps = { + clickToRowSelect: propTypes.bool.def(true), + isTreeTable: propTypes.bool.def(false), + tableSetting: propTypes.shape({}), + inset: propTypes.bool, + sortFn: { + type: Function as PropType<(sortInfo: SorterResult) => any>, + default: DEFAULT_SORT_FN, + }, + filterFn: { + type: Function as PropType<(data: Partial>) => any>, + default: DEFAULT_FILTER_FN, + }, + showTableSetting: propTypes.bool, + autoCreateKey: propTypes.bool.def(true), + striped: propTypes.bool.def(false), + showSummary: propTypes.bool, + summaryFunc: { + type: [Function, Array] as PropType<(...arg: any[]) => any[]>, + default: null, + }, + summaryData: { + type: Array as PropType, + default: null, + }, + indentSize: propTypes.number.def(24), + canColDrag: propTypes.bool.def(true), + api: { + type: Function as PropType<(...arg: any[]) => Promise>, + default: null, + }, + beforeFetch: { + type: Function as PropType, + default: null, + }, + afterFetch: { + type: Function as PropType, + default: null, + }, + handleSearchInfoFn: { + type: Function as PropType, + default: null, + }, + fetchSetting: { + type: Object as PropType, + default: () => { + return FETCH_SETTING; + }, + }, + // 立即请求接口 + immediate: propTypes.bool.def(true), + emptyDataIsShowTable: propTypes.bool.def(true), + // 额外的请求参数 + searchInfo: { + type: Object as PropType, + default: null, + }, + // 默认的排序参数 + defSort: { + type: Object as PropType, + default: null, + }, + // 使用搜索表单 + useSearchForm: propTypes.bool, + // 表单配置 + formConfig: { + type: Object as PropType>, + default: null, + }, + columns: { + type: [Array] as PropType, + default: () => [], + }, + showIndexColumn: propTypes.bool.def(true), + indexColumnProps: { + type: Object as PropType, + default: null, + }, + showActionColumn: { + type: Boolean, + default: true, + }, + actionColumn: { + type: Object as PropType, + default: null, + }, + ellipsis: propTypes.bool.def(true), + canResize: propTypes.bool.def(true), + clearSelectOnPageChange: propTypes.bool, + resizeHeightOffset: propTypes.number.def(0), + rowSelection: { + type: Object as PropType, + default: null, + }, + title: { + type: [String, Function] as PropType string)>, + default: null, + }, + titleHelpMessage: { + type: [String, Array] as PropType, + }, + minHeight: propTypes.number, + maxHeight: propTypes.number, + // update-begin--author:liaozhiyang---date:202401009---for:【TV360X-116】内嵌风格字段较多时表格错位 + expandColumnWidth: propTypes.number.def(48), + // update-end--author:liaozhiyang---date:202401009---for:【TV360X-116】内嵌风格字段较多时表格错位 + // 统一设置列最大宽度 + maxColumnWidth: propTypes.number, + dataSource: { + type: Array as PropType, + default: null, + }, + rowKey: { + type: [String, Function] as PropType string)>, + default: '', + }, + bordered: propTypes.bool, + pagination: { + type: [Object, Boolean] as PropType, + default: null, + }, + loading: propTypes.bool, + rowClassName: { + type: Function as PropType<(record: TableCustomRecord, index: number) => string>, + }, + scroll: { + // update-begin--author:liaozhiyang---date:20240424---for:【issues/1188】BasicTable加上scrollToFirstRowOnChange类型定义 + type: Object as PropType<{ x?: number | true; y?: number; scrollToFirstRowOnChange?: boolean }>, + // update-end--author:liaozhiyang---date:20240424---for:【issues/1188】BasicTable加上scrollToFirstRowOnChange类型定义 + default: null, + }, + beforeEditSubmit: { + type: Function as PropType<(data: { record: Recordable; index: number; key: string | number; value: any }) => Promise>, + }, + size: { + type: String as PropType, + default: DEFAULT_SIZE, + }, + expandedRowKeys: { + type: Array, + default: null, + }, +}; diff --git a/src/components/Table/src/types/column.ts b/src/components/Table/src/types/column.ts new file mode 100644 index 0000000..5637c19 --- /dev/null +++ b/src/components/Table/src/types/column.ts @@ -0,0 +1,198 @@ +import { VNodeChild } from 'vue'; + +export interface ColumnFilterItem { + text?: string; + value?: string; + children?: any; +} + +export declare type SortOrder = 'ascend' | 'descend'; + +export interface RecordProps { + text: any; + record: T; + index: number; +} + +export interface FilterDropdownProps { + prefixCls?: string; + setSelectedKeys?: (selectedKeys: string[]) => void; + selectedKeys?: string[]; + confirm?: () => void; + clearFilters?: () => void; + filters?: ColumnFilterItem[]; + getPopupContainer?: (triggerNode: HTMLElement) => HTMLElement; + visible?: boolean; +} + +export declare type CustomRenderFunction = (record: RecordProps) => VNodeChild | JSX.Element; + +export interface ColumnProps { + /** + * specify how content is aligned + * @default 'left' + * @type string + */ + align?: 'left' | 'right' | 'center'; + + /** + * ellipsize cell content, not working with sorter and filters for now. + * tableLayout would be fixed when ellipsis is true. + * @default false + * @type boolean + */ + ellipsis?: boolean; + + /** + * Span of this column's title + * @type number + */ + colSpan?: number; + + /** + * Display field of the data record, could be set like a.b.c + * @type string + */ + dataIndex?: string; + + /** + * Default filtered values + * @type string[] + */ + defaultFilteredValue?: string[]; + + /** + * Default order of sorted values: 'ascend' 'descend' null + * @type string + */ + defaultSortOrder?: SortOrder; + + /** + * Customized filter overlay + * @type any (slot) + */ + filterDropdown?: VNodeChild | JSX.Element | ((props: FilterDropdownProps) => VNodeChild | JSX.Element); + + /** + * Whether filterDropdown is visible + * @type boolean + */ + filterDropdownOpen?: boolean; + + /** + * Whether the dataSource is filtered + * @default false + * @type boolean + */ + filtered?: boolean; + + /** + * Controlled filtered value, filter icon will highlight + * @type string[] + */ + filteredValue?: string[]; + + /** + * Customized filter icon + * @default false + * @type any + */ + filterIcon?: boolean | VNodeChild | JSX.Element; + + /** + * Whether multiple filters can be selected + * @default true + * @type boolean + */ + filterMultiple?: boolean; + + /** + * Filter menu config + * @type object[] + */ + filters?: ColumnFilterItem[]; + + /** + * Set column to be fixed: true(same as left) 'left' 'right' + * @default false + * @type boolean | string + */ + fixed?: boolean | 'left' | 'right'; + + /** + * Unique key of this column, you can ignore this prop if you've set a unique dataIndex + * @type string + */ + key?: string; + + /** + * Renderer of the table cell. The return value should be a VNode, or an object for colSpan/rowSpan config + * @type Function | ScopedSlot + */ + customRender?: CustomRenderFunction | VNodeChild | JSX.Element; + + /** + * Sort function for local sort, see Array.sort's compareFunction. If you need sort buttons only, set to true + * @type boolean | Function + */ + sorter?: boolean | Function; + + /** + * Order of sorted values: 'ascend' 'descend' false + * @type boolean | string + */ + sortOrder?: boolean | SortOrder; + + /** + * supported sort way, could be 'ascend', 'descend' + * @default ['ascend', 'descend'] + * @type string[] + */ + sortDirections?: SortOrder[]; + + /** + * Title of this column + * @type any (string | slot) + */ + title?: VNodeChild | JSX.Element; + + /** + * Width of this column + * @type string | number + */ + width?: string | number; + + /** + * Set props on per cell + * @type Function + */ + customCell?: (record: T, rowIndex: number) => object; + + /** + * Set props on per header cell + * @type object + */ + customHeaderCell?: (column: ColumnProps) => object; + // update-begin--author:liaozhiyang---date:20240425---for:【pull/1201】添加antd的TableSummary功能兼容老的summary(表尾合计) + customSummaryRender?: CustomRenderFunction | VNodeChild | JSX.Element; + // update-end--author:liaozhiyang---date:20240425---for:【pull/1201】添加antd的TableSummary功能兼容老的summary(表尾合计) + + /** + * Callback executed when the confirm filter button is clicked, Use as a filter event when using template or jsx + * @type Function + */ + onFilter?: (value: any, record: T) => boolean; + + /** + * Callback executed when filterDropdownOpen is changed, Use as a filterDropdownVisible event when using template or jsx + * @type Function + */ + onFilterDropdownVisibleChange?: (visible: boolean) => void; + + /** + * When using columns, you can setting this property to configure the properties that support the slot, + * such as slots: { filterIcon: 'XXX'} + * @type object + */ + slots?: Recordable; +} diff --git a/src/components/Table/src/types/componentType.ts b/src/components/Table/src/types/componentType.ts new file mode 100644 index 0000000..6e66af6 --- /dev/null +++ b/src/components/Table/src/types/componentType.ts @@ -0,0 +1 @@ +export type ComponentType = 'Input' | 'InputNumber' | 'Select' | 'ApiSelect' | 'ApiTreeSelect' | 'Checkbox' | 'Switch' | 'DatePicker' | 'TimePicker'; diff --git a/src/components/Table/src/types/pagination.ts b/src/components/Table/src/types/pagination.ts new file mode 100644 index 0000000..6bc5599 --- /dev/null +++ b/src/components/Table/src/types/pagination.ts @@ -0,0 +1,108 @@ +import Pagination from 'ant-design-vue/lib/pagination'; +import { VNodeChild } from 'vue'; + +interface PaginationRenderProps { + page: number; + type: 'page' | 'prev' | 'next'; + originalElement: any; +} + +type Position = 'topLeft' | 'topCenter' | 'topRight' | 'bottomLeft' | 'bottomCenter' | 'bottomRight'; + +export declare class PaginationConfig extends Pagination { + position?: 'top' | 'bottom' | 'both'; +} +export interface PaginationProps { + /** + * total number of data items + * @default 0 + * @type number + */ + total?: number; + + /** + * default initial page number + * @default 1 + * @type number + */ + defaultCurrent?: number; + + /** + * current page number + * @type number + */ + current?: number; + + /** + * default number of data items per page + * @default 10 + * @type number + */ + defaultPageSize?: number; + + /** + * number of data items per page + * @type number + */ + pageSize?: number; + + /** + * Whether to hide pager on single page + * @default false + * @type boolean + */ + hideOnSinglePage?: boolean; + + /** + * determine whether pageSize can be changed + * @default false + * @type boolean + */ + showSizeChanger?: boolean; + + /** + * specify the sizeChanger options + * @default ['10', '20', '30', '40'] + * @type string[] + */ + pageSizeOptions?: string[]; + + /** + * determine whether you can jump to pages directly + * @default false + * @type boolean + */ + showQuickJumper?: boolean | object; + + /** + * to display the total number and range + * @type Function + */ + showTotal?: (total: number, range: [number, number]) => any; + + /** + * specify the size of Pagination, can be set to small + * @default '' + * @type string + */ + size?: string; + + /** + * whether to setting simple mode + * @type boolean + */ + simple?: boolean; + + /** + * to customize item innerHTML + * @type Function + */ + itemRender?: (props: PaginationRenderProps) => VNodeChild | JSX.Element; + // update-begin--author:liaozhiyang---date:20250423---for:【pull/8013】修复 BasicTable position 属性类型配置 + /** + * specify the position of Pagination + * @type Position[] + */ + position?: Position[]; + // update-end--author:liaozhiyang---date:20250423---for:【pull/8013】修复 BasicTable position 属性类型配置 +} diff --git a/src/components/Table/src/types/table.ts b/src/components/Table/src/types/table.ts new file mode 100644 index 0000000..023f7a1 --- /dev/null +++ b/src/components/Table/src/types/table.ts @@ -0,0 +1,489 @@ +import type { VNodeChild } from 'vue'; +import type { PaginationProps } from './pagination'; +import type { FormProps } from '/@/components/Form'; +import type { TableRowSelection as ITableRowSelection } from 'ant-design-vue/lib/table/interface'; +import type { ColumnProps } from 'ant-design-vue/lib/table'; + +import { ComponentType } from './componentType'; +import { VueNode } from '/@/utils/propTypes'; +import { RoleEnum } from '/@/enums/roleEnum'; + +export declare type SortOrder = 'ascend' | 'descend'; + +export interface TableCurrentDataSource { + currentDataSource: T[]; +} + +export interface TableRowSelection extends ITableRowSelection { + /** + * Callback executed when selected rows change + * @type Function + */ + onChange?: (selectedRowKeys: string[] | number[], selectedRows: T[]) => any; + + /** + * Callback executed when select/deselect one row + * @type Function + */ + onSelect?: (record: T, selected: boolean, selectedRows: Object[], nativeEvent: Event) => any; + + /** + * Callback executed when select/deselect all rows + * @type Function + */ + onSelectAll?: (selected: boolean, selectedRows: T[], changeRows: T[]) => any; + + /** + * Callback executed when row selection is inverted + * @type Function + */ + onSelectInvert?: (selectedRows: string[] | number[]) => any; + //【issues/8163】关联记录新增丢失 + selectedRows?: any[]; +} + +export interface TableCustomRecord { + record?: T; + index?: number; +} + +export interface ExpandedRowRenderRecord extends TableCustomRecord { + indent?: number; + expanded?: boolean; +} + +export interface ColumnFilterItem { + text?: string; + value?: string; + children?: any; +} + +export interface TableCustomRecord { + record?: T; + index?: number; +} + +export interface SorterResult { + column: ColumnProps; + order: SortOrder; + field: string; + columnKey: string; +} + +export interface FetchParams { + searchInfo?: Recordable; + page?: number; + sortInfo?: Recordable; + filterInfo?: Recordable; +} + +export interface GetColumnsParams { + ignoreIndex?: boolean; + ignoreAction?: boolean; + sort?: boolean; +} + +export type SizeType = 'middle' | 'small' | 'large'; + +export interface TableActionType { + reload: (opt?: FetchParams) => Promise; + getSelectRows: () => T[]; + clearSelectedRowKeys: () => void; + expandAll: () => void; + collapseAll: () => void; + getSelectRowKeys: () => string[]; + deleteSelectRowByKey: (key: string) => void; + setPagination: (info: Partial) => void; + setTableData: (values: T[]) => void; + updateTableDataRecord: (rowKey: string | number, record: Recordable) => Recordable | void; + deleteTableDataRecord: (rowKey: string | number | string[] | number[]) => void; + insertTableDataRecord: (record: Recordable, index?: number) => Recordable | void; + findTableDataRecord: (rowKey: string | number) => Recordable | void; + getColumns: (opt?: GetColumnsParams) => BasicColumn[]; + setColumns: (columns: BasicColumn[] | string[]) => void; + getDataSource: () => T[]; + getRawDataSource: () => T; + setLoading: (loading: boolean) => void; + setProps: (props: Partial) => void; + redoHeight: () => void; + setSelectedRowKeys: (rowKeys: string[] | number[]) => void; + getPaginationRef: () => PaginationProps | boolean; + getSize: () => SizeType; + getRowSelection: () => TableRowSelection; + getCacheColumns: () => BasicColumn[]; + emit?: EmitType; + updateTableData: (index: number, key: string, value: any) => Recordable; + setShowPagination: (show: boolean) => Promise; + getShowPagination: () => boolean; + setCacheColumnsByField?: (dataIndex: string | undefined, value: BasicColumn) => void; +} + +export interface FetchSetting { + // 请求接口当前页数 + pageField: string; + // 每页显示多少条 + sizeField: string; + // 请求结果列表字段 支持 a.b.c + listField: string; + // 请求结果总数字段 支持 a.b.c + totalField: string; +} + +export interface TableSetting { + // 是否显示刷新按钮 + redo?: boolean; + // 是否显示尺寸调整按钮 + size?: boolean; + // 是否显示字段调整按钮 + setting?: boolean; + // 缓存“字段调整”配置的key,用于页面上有多个表格需要区分的情况 + cacheKey?: string; + // 是否显示全屏按钮 + fullScreen?: boolean; +} + +export interface BasicTableProps { + // 点击行选中 + clickToRowSelect?: boolean; + isTreeTable?: boolean; + // 自定义排序方法 + sortFn?: (sortInfo: SorterResult) => any; + // 排序方法 + filterFn?: (data: Partial>) => any; + // 取消表格的默认padding + inset?: boolean; + // 显示表格设置 + showTableSetting?: boolean; + // 表格上方操作按钮设置 + tableSetting?: TableSetting; + // 斑马纹 + striped?: boolean; + // 是否自动生成key + autoCreateKey?: boolean; + // 计算合计行的方法 + summaryFunc?: (...arg: any) => Recordable[]; + // 自定义合计表格内容 + summaryData?: Recordable[]; + // 是否显示合计行 + showSummary?: boolean; + // 是否可拖拽列 + canColDrag?: boolean; + // 接口请求对象 + api?: (...arg: any) => Promise; + // 请求之前处理参数 + beforeFetch?: Fn; + // 自定义处理接口返回参数 + afterFetch?: Fn; + // 查询条件请求之前处理 + handleSearchInfoFn?: Fn; + // 请求接口配置 + fetchSetting?: Partial; + // 立即请求接口 + immediate?: boolean; + // 在开起搜索表单的时候,如果没有数据是否显示表格 + emptyDataIsShowTable?: boolean; + // 额外的请求参数 + searchInfo?: Recordable; + // 默认的排序参数 + defSort?: Recordable; + // 使用搜索表单 + useSearchForm?: boolean; + // 表单配置 + formConfig?: Partial; + // 列配置 + columns: BasicColumn[]; + // 统一设置列最大宽度 + maxColumnWidth?: number; + // 是否显示序号列 + showIndexColumn?: boolean; + // 序号列配置 + indexColumnProps?: BasicColumn; + // 是否显示操作列 + showActionColumn?: boolean; + // 操作列配置 + actionColumn?: Partial; + // 文本超过宽度是否显示。。。 + ellipsis?: boolean; + // 是否可以自适应高度 + canResize?: boolean; + // 自适应高度偏移, 计算结果-偏移量 + resizeHeightOffset?: number; + // 在分页改变的时候清空选项 + clearSelectOnPageChange?: boolean; + // + rowKey?: string | ((record: Recordable) => string); + // 数据 + dataSource?: Recordable[]; + // 标题右侧提示 + titleHelpMessage?: string | string[]; + // 表格最小高度 + minHeight?: number; + // 表格滚动最大高度 + maxHeight?: number; + // 是否显示边框 + bordered?: boolean; + // update-begin--author:liaozhiyang---date:202401009---for:【TV360X-116】内嵌风格字段较多时表格错位 + // 展开列宽度 + expandColumnWidth: number; + // update-end--author:liaozhiyang---date:202401009---for:【TV360X-116】内嵌风格字段较多时表格错位 + // 分页配置 + pagination?: PaginationProps | boolean; + // loading加载 + loading?: boolean; + + /** + * The column contains children to display + * @default 'children' + * @type string | string[] + */ + childrenColumnName?: string; + + /** + * Override default table elements + * @type object + */ + components?: object; + + /** + * Expand all rows initially + * @default false + * @type boolean + */ + defaultExpandAllRows?: boolean; + + /** + * Initial expanded row keys + * @type string[] + */ + defaultExpandedRowKeys?: string[]; + + /** + * Current expanded row keys + * @type string[] + */ + expandedRowKeys?: string[]; + + /** + * Expanded container render for each row + * @type Function + */ + expandedRowRender?: (record?: ExpandedRowRenderRecord) => VNodeChild | JSX.Element; + + /** + * Customize row expand Icon. + * @type Function | VNodeChild + */ + expandIcon?: Function | VNodeChild | JSX.Element; + + /** + * Whether to expand row by clicking anywhere in the whole row + * @default false + * @type boolean + */ + expandRowByClick?: boolean; + + /** + * The index of `expandIcon` which column will be inserted when `expandIconAsCell` is false. default 0 + */ + expandIconColumnIndex?: number; + + /** + * Table footer renderer + * @type Function | VNodeChild + */ + footer?: Function | VNodeChild | JSX.Element; + + /** + * Indent size in pixels of tree data + * @default 15 + * @type number + */ + indentSize?: number; + + /** + * i18n text including filter, sort, empty text, etc + * @default { filterConfirm: 'Ok', filterReset: 'Reset', emptyText: 'No Data' } + * @type object + */ + locale?: object; + + /** + * Row's className + * @type Function + */ + rowClassName?: (record: TableCustomRecord, index: number) => string; + + /** + * Row selection config + * @type object + */ + rowSelection?: TableRowSelection; + + /** + * Set horizontal or vertical scrolling, can also be used to specify the width and height of the scroll area. + * It is recommended to set a number for x, if you want to set it to true, + * you need to add style .ant-table td { white-space: nowrap; }. + * @type object + */ + // update-begin--author:liaozhiyang---date:20240424---for:【issues/1188】BasicTable加上scrollToFirstRowOnChange类型定义 + scroll?: { x?: number | true | 'max-content'; y?: number; scrollToFirstRowOnChange?: boolean }; + // update-end--author:liaozhiyang---date:20240424---for:【issues/1188】BasicTable加上scrollToFirstRowOnChange类型定义 + + /** + * Whether to show table header + * @default true + * @type boolean + */ + showHeader?: boolean; + + /** + * Size of table + * @default 'default' + * @type string + */ + size?: SizeType; + + /** + * Table title renderer + * @type Function | ScopedSlot + */ + title?: VNodeChild | JSX.Element | string | ((data: Recordable) => string); + + /** + * Set props on per header row + * @type Function + */ + customHeaderRow?: (column: ColumnProps, index: number) => object; + + /** + * Set props on per row + * @type Function + */ + customRow?: (record: T, index: number) => object; + + /** + * `table-layout` attribute of table element + * `fixed` when header/columns are fixed, or using `column.ellipsis` + * + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/table-layout + * @version 1.5.0 + */ + tableLayout?: 'auto' | 'fixed' | string; + + /** + * the render container of dropdowns in table + * @param triggerNode + * @version 1.5.0 + */ + getPopupContainer?: (triggerNode?: HTMLElement) => HTMLElement; + + /** + * Data can be changed again before rendering. + * The default configuration of general user empty data. + * You can configured globally through [ConfigProvider](https://antdv.com/components/config-provider-cn/) + * + * @version 1.5.4 + */ + transformCellText?: Function; + + /** + * Callback executed before editable cell submit value, not for row-editor + * + * The cell will not submit data while callback return false + */ + beforeEditSubmit?: (data: { record: Recordable; index: number; key: string | number; value: any }) => Promise; + + /** + * Callback executed when pagination, filters or sorter is changed + * @param pagination + * @param filters + * @param sorter + * @param currentDataSource + */ + onChange?: (pagination: any, filters: any, sorter: any, extra: any) => void; + + /** + * Callback executed when the row expand icon is clicked + * + * @param expanded + * @param record + */ + onExpand?: (expande: boolean, record: T) => void; + + /** + * Callback executed when the expanded rows change + * @param expandedRows + */ + onExpandedRowsChange?: (expandedRows: string[] | number[]) => void; + + onColumnsChange?: (data: ColumnChangeParam[]) => void; +} + +export type CellFormat = string | ((text: string, record: Recordable, index: number) => string | number) | Map; + +// @ts-ignore +export interface BasicColumn extends ColumnProps { + children?: BasicColumn[]; + filters?: { + text: string; + value: string; + children?: unknown[] | (((props: Record) => unknown[]) & (() => unknown[]) & (() => unknown[])); + }[]; + + // + flag?: 'INDEX' | 'DEFAULT' | 'CHECKBOX' | 'RADIO' | 'ACTION'; + // update-begin--author:liaozhiyang---date:20240724---for:【issues/6908】多语言无刷新切换时,BasicColumn和FormSchema里面的值不能正常切换 + title: string | Fn; + // update-end--author:liaozhiyang---date:20240724---for:【issues/6908】多语言无刷新切换时,BasicColumn和FormSchema里面的值不能正常切换 + customTitle?: VueNode; + + slots?: Recordable; + // slots的备份,兼容老的写法,转成新写法避免控制台警告 + slotsBak?: Recordable; + + // Whether to hide the column by default, it can be displayed in the column configuration + defaultHidden?: boolean; + + // Help text for table column header + helpMessage?: string | string[]; + + format?: CellFormat; + + // Editable + edit?: boolean; + editRow?: boolean; + editable?: boolean; + editComponent?: ComponentType; + editComponentProps?: Recordable; + editRule?: boolean | ((text: string, record: Recordable) => Promise); + editValueMap?: (value: any) => string; + onEditRow?: () => void; + // 权限编码控制是否显示 + auth?: RoleEnum | RoleEnum[] | string | string[]; + // 业务控制是否显示 + ifShow?: boolean | ((column: BasicColumn) => boolean); + //compType-用于记录类型 + compType?: string; + // update-begin--author:liaozhiyang---date:20240425---for:【pull/1201】添加antd的TableSummary功能兼容老的summary(表尾合计) + customSummaryRender?: (opt: { + value: any; + text: any; + record: Recordable; + index: number; + renderIndex?: number; + column: BasicColumn; + }) => any | VNodeChild | JSX.Element; + // update-end--author:liaozhiyang---date:20240425---for:【pull/1201】添加antd的TableSummary功能兼容老的summary(表尾合计) + // 额外的属性 + extraProps?: Recordable; +} + +export type ColumnChangeParam = { + dataIndex: string; + fixed: boolean | 'left' | 'right' | undefined; + visible: boolean; +}; + +export interface InnerHandlers { + onColumnsChange: (data: ColumnChangeParam[]) => void; +} diff --git a/src/components/Table/src/types/tableAction.ts b/src/components/Table/src/types/tableAction.ts new file mode 100644 index 0000000..3d2164f --- /dev/null +++ b/src/components/Table/src/types/tableAction.ts @@ -0,0 +1,33 @@ +import { ButtonProps } from 'ant-design-vue/es/button/buttonTypes'; +import { TooltipProps } from 'ant-design-vue/es/tooltip/Tooltip'; +import { RoleEnum } from '/@/enums/roleEnum'; +export interface ActionItem extends ButtonProps { + onClick?: Fn; + label?: string; + color?: 'success' | 'error' | 'warning'; + icon?: string; + popConfirm?: PopConfirm; + disabled?: boolean; + divider?: boolean; + // 权限编码控制是否显示 + auth?: RoleEnum | RoleEnum[] | string | string[]; + // 业务控制是否显示 + ifShow?: boolean | ((action: ActionItem) => boolean); + tooltip?: string | TooltipProps; + // 自定义类名 + class?: string | Record | any[]; + // 自定义图标颜色 + iconColor?: string; +} + +export interface PopConfirm { + title: string; + okText?: string; + cancelText?: string; + confirm: Fn; + cancel?: Fn; + icon?: string; + placement?: string; + overlayClassName?: string; + getPopupContainer?: Fn; +} diff --git a/src/components/Time/index.ts b/src/components/Time/index.ts new file mode 100644 index 0000000..7e2f4c0 --- /dev/null +++ b/src/components/Time/index.ts @@ -0,0 +1,4 @@ +import { withInstall } from '/@/utils/index'; +import time from './src/Time.vue'; + +export const Time = withInstall(time); diff --git a/src/components/Time/src/Time.vue b/src/components/Time/src/Time.vue new file mode 100644 index 0000000..be49ba3 --- /dev/null +++ b/src/components/Time/src/Time.vue @@ -0,0 +1,107 @@ + + diff --git a/src/components/Tinymce/index.ts b/src/components/Tinymce/index.ts new file mode 100644 index 0000000..ce07f95 --- /dev/null +++ b/src/components/Tinymce/index.ts @@ -0,0 +1,4 @@ +import { withInstall } from '/@/utils/index'; +import tinymce from './src/Editor.vue'; + +export const Tinymce = withInstall(tinymce); diff --git a/src/components/Tinymce/src/Editor.vue b/src/components/Tinymce/src/Editor.vue new file mode 100644 index 0000000..40f7740 --- /dev/null +++ b/src/components/Tinymce/src/Editor.vue @@ -0,0 +1,462 @@ + + + + + + + diff --git a/src/components/Tinymce/src/ImgUpload.vue b/src/components/Tinymce/src/ImgUpload.vue new file mode 100644 index 0000000..92eb110 --- /dev/null +++ b/src/components/Tinymce/src/ImgUpload.vue @@ -0,0 +1,137 @@ + + + diff --git a/src/components/Tinymce/src/ProcessMask.vue b/src/components/Tinymce/src/ProcessMask.vue new file mode 100644 index 0000000..b70ae33 --- /dev/null +++ b/src/components/Tinymce/src/ProcessMask.vue @@ -0,0 +1,110 @@ + + + + diff --git a/src/components/Tinymce/src/helper.ts b/src/components/Tinymce/src/helper.ts new file mode 100644 index 0000000..2526ae7 --- /dev/null +++ b/src/components/Tinymce/src/helper.ts @@ -0,0 +1,81 @@ +const validEvents = [ + 'onActivate', + 'onAddUndo', + 'onBeforeAddUndo', + 'onBeforeExecCommand', + 'onBeforeGetContent', + 'onBeforeRenderUI', + 'onBeforeSetContent', + 'onBeforePaste', + 'onBlur', + 'onChange', + 'onClearUndos', + 'onClick', + 'onContextMenu', + 'onCopy', + 'onCut', + 'onDblclick', + 'onDeactivate', + 'onDirty', + 'onDrag', + 'onDragDrop', + 'onDragEnd', + 'onDragGesture', + 'onDragOver', + 'onDrop', + 'onExecCommand', + 'onFocus', + 'onFocusIn', + 'onFocusOut', + 'onGetContent', + 'onHide', + 'onInit', + 'onKeyDown', + 'onKeyPress', + 'onKeyUp', + 'onLoadContent', + 'onMouseDown', + 'onMouseEnter', + 'onMouseLeave', + 'onMouseMove', + 'onMouseOut', + 'onMouseOver', + 'onMouseUp', + 'onNodeChange', + 'onObjectResizeStart', + 'onObjectResized', + 'onObjectSelected', + 'onPaste', + 'onPostProcess', + 'onPostRender', + 'onPreProcess', + 'onProgressState', + 'onRedo', + 'onRemove', + 'onReset', + 'onSaveContent', + 'onSelectionChange', + 'onSetAttrib', + 'onSetContent', + 'onShow', + 'onSubmit', + 'onUndo', + 'onVisualAid', +]; + +const isValidKey = (key: string) => validEvents.indexOf(key) !== -1; + +export const bindHandlers = (initEvent: Event, listeners: any, editor: any): void => { + Object.keys(listeners) + .filter(isValidKey) + .forEach((key: string) => { + const handler = listeners[key]; + if (typeof handler === 'function') { + if (key === 'onInit') { + handler(initEvent, editor); + } else { + editor.on(key.substring(2), (e: any) => handler(e, editor)); + } + } + }); +}; diff --git a/src/components/Tinymce/src/tinymce.ts b/src/components/Tinymce/src/tinymce.ts new file mode 100644 index 0000000..d5efde3 --- /dev/null +++ b/src/components/Tinymce/src/tinymce.ts @@ -0,0 +1,19 @@ +// Any plugins you want to setting has to be imported +// Detail plugins list see https://www.tinymce.com/docs/plugins/ +// Custom builds see https://www.tinymce.com/download/custom-builds/ +// colorpicker/contextmenu/textcolor plugin is now built in to the core editor, please remove it from your editor configuration + +export const plugins = [ + 'advlist anchor autolink autosave code codesample directionality fullscreen hr insertdatetime link lists media nonbreaking noneditable pagebreak paste preview print save searchreplace tabfocus template textpattern visualblocks visualchars wordcount image', +]; + +export const toolbar = + 'fullscreen code preview | undo redo | bold italic underline strikethrough | fontselect fontsizeselect formatselect | alignleft aligncenter alignright alignjustify | outdent indent lineheight|subscript superscript blockquote| numlist bullist checklist | forecolor backcolor casechange permanentpen formatpainter removeformat | pagebreak | charmap emoticons | insertfile image media pageembed link anchor codesample insertdatetime hr| a11ycheck ltr rtl'; + +export const simplePlugins = 'lists image link fullscreen'; + +export const simpleToolbar = [ + 'undo redo styles bold italic alignleft aligncenter alignright alignjustify bullist numlist outdent indent lists image link fullscreen', +]; + +export const menubar = 'file edit insert view format table'; diff --git a/src/components/Transition/index.ts b/src/components/Transition/index.ts new file mode 100644 index 0000000..55cbe54 --- /dev/null +++ b/src/components/Transition/index.ts @@ -0,0 +1,21 @@ +import { createSimpleTransition, createJavascriptTransition } from './src/CreateTransition'; + +import ExpandTransitionGenerator from './src/ExpandTransition'; + +export { default as CollapseTransition } from './src/CollapseTransition.vue'; + +export const FadeTransition = createSimpleTransition('fade-transition'); +export const ScaleTransition = createSimpleTransition('scale-transition'); +export const SlideYTransition = createSimpleTransition('slide-y-transition'); +export const ScrollYTransition = createSimpleTransition('scroll-y-transition'); +export const SlideYReverseTransition = createSimpleTransition('slide-y-reverse-transition'); +export const ScrollYReverseTransition = createSimpleTransition('scroll-y-reverse-transition'); +export const SlideXTransition = createSimpleTransition('slide-x-transition'); +export const ScrollXTransition = createSimpleTransition('scroll-x-transition'); +export const SlideXReverseTransition = createSimpleTransition('slide-x-reverse-transition'); +export const ScrollXReverseTransition = createSimpleTransition('scroll-x-reverse-transition'); +export const ScaleRotateTransition = createSimpleTransition('scale-rotate-transition'); + +export const ExpandXTransition = createJavascriptTransition('expand-x-transition', ExpandTransitionGenerator('', true)); + +export const ExpandTransition = createJavascriptTransition('expand-transition', ExpandTransitionGenerator('')); diff --git a/src/components/Transition/src/CollapseTransition.vue b/src/components/Transition/src/CollapseTransition.vue new file mode 100644 index 0000000..6b50fa1 --- /dev/null +++ b/src/components/Transition/src/CollapseTransition.vue @@ -0,0 +1,78 @@ + + diff --git a/src/components/Transition/src/CreateTransition.tsx b/src/components/Transition/src/CreateTransition.tsx new file mode 100644 index 0000000..bad23b5 --- /dev/null +++ b/src/components/Transition/src/CreateTransition.tsx @@ -0,0 +1,69 @@ +import type { PropType } from 'vue'; + +import { defineComponent, Transition, TransitionGroup } from 'vue'; +import { getSlot } from '/@/utils/helper/tsxHelper'; + +type Mode = 'in-out' | 'out-in' | 'default' | undefined; + +export function createSimpleTransition(name: string, origin = 'top center 0', mode?: Mode) { + return defineComponent({ + name, + props: { + group: { + type: Boolean as PropType, + default: false, + }, + mode: { + type: String as PropType, + default: mode, + }, + origin: { + type: String as PropType, + default: origin, + }, + }, + setup(props, { slots, attrs }) { + const onBeforeEnter = (el: HTMLElement) => { + el.style.transformOrigin = props.origin; + }; + + return () => { + const Tag = !props.group ? Transition : TransitionGroup; + return ( + + {() => getSlot(slots)} + + ); + }; + }, + }); +} +export function createJavascriptTransition(name: string, functions: Recordable, mode: Mode = 'in-out') { + return defineComponent({ + name, + props: { + mode: { + type: String as PropType, + default: mode, + }, + }, + setup(props, { attrs, slots }) { + return () => { + return ( + + {() => getSlot(slots)} + + ); + }; + }, + }); +} diff --git a/src/components/Transition/src/ExpandTransition.ts b/src/components/Transition/src/ExpandTransition.ts new file mode 100644 index 0000000..2aaef9a --- /dev/null +++ b/src/components/Transition/src/ExpandTransition.ts @@ -0,0 +1,89 @@ +/** + * Makes the first character of a string uppercase + */ +export function upperFirst(str: string): string { + return str.charAt(0).toUpperCase() + str.slice(1); +} + +interface HTMLExpandElement extends HTMLElement { + _parent?: (Node & ParentNode & HTMLElement) | null; + _initialStyle: { + transition: string; + overflow: string | null; + height?: string | null; + width?: string | null; + }; +} + +export default function (expandedParentClass = '', x = false) { + const sizeProperty = x ? 'width' : ('height' as 'width' | 'height'); + const offsetProperty = `offset${upperFirst(sizeProperty)}` as 'offsetHeight' | 'offsetWidth'; + + return { + beforeEnter(el: HTMLExpandElement) { + el._parent = el.parentNode as (Node & ParentNode & HTMLElement) | null; + el._initialStyle = { + transition: el.style.transition, + overflow: el.style.overflow, + [sizeProperty]: el.style[sizeProperty], + }; + }, + + enter(el: HTMLExpandElement) { + const initialStyle = el._initialStyle; + + el.style.setProperty('transition', 'none', 'important'); + el.style.overflow = 'hidden'; + // const offset = `${el[offsetProperty]}px`; + + // el.style[sizeProperty] = '0'; + + void el.offsetHeight; // force reflow + + el.style.transition = initialStyle.transition; + + if (expandedParentClass && el._parent) { + el._parent.classList.add(expandedParentClass); + } + + requestAnimationFrame(() => { + // el.style[sizeProperty] = offset; + }); + }, + + afterEnter: resetStyles, + enterCancelled: resetStyles, + + leave(el: HTMLExpandElement) { + el._initialStyle = { + transition: '', + overflow: el.style.overflow, + [sizeProperty]: el.style[sizeProperty], + }; + + el.style.overflow = 'hidden'; + el.style[sizeProperty] = `${el[offsetProperty]}px`; + /* eslint-disable-next-line */ + void el.offsetHeight; // force reflow + + requestAnimationFrame(() => (el.style[sizeProperty] = '0')); + }, + + afterLeave, + leaveCancelled: afterLeave, + }; + + function afterLeave(el: HTMLExpandElement) { + if (expandedParentClass && el._parent) { + el._parent.classList.remove(expandedParentClass); + } + resetStyles(el); + } + + function resetStyles(el: HTMLExpandElement) { + const size = el._initialStyle[sizeProperty]; + el.style.overflow = el._initialStyle.overflow!; + if (size != null) el.style[sizeProperty] = size; + Reflect.deleteProperty(el, '_initialStyle'); + } +} diff --git a/src/components/Tree/index.ts b/src/components/Tree/index.ts new file mode 100644 index 0000000..169035a --- /dev/null +++ b/src/components/Tree/index.ts @@ -0,0 +1,6 @@ +import BasicTree from './src/BasicTree.vue'; +import './style'; + +export { BasicTree }; +export type { ContextMenuItem } from '/@/hooks/web/useContextMenu'; +export * from './src/types/tree'; diff --git a/src/components/Tree/src/BasicTree.vue b/src/components/Tree/src/BasicTree.vue new file mode 100644 index 0000000..192df9e --- /dev/null +++ b/src/components/Tree/src/BasicTree.vue @@ -0,0 +1,477 @@ + diff --git a/src/components/Tree/src/TreeIcon.ts b/src/components/Tree/src/TreeIcon.ts new file mode 100644 index 0000000..900d6bf --- /dev/null +++ b/src/components/Tree/src/TreeIcon.ts @@ -0,0 +1,13 @@ +import type { VNode, FunctionalComponent } from 'vue'; + +import { h } from 'vue'; +import { isString } from '@vue/shared'; +import { Icon } from '/@/components/Icon'; + +export const TreeIcon: FunctionalComponent = ({ icon }: { icon: VNode | string }) => { + if (!icon) return null; + if (isString(icon)) { + return h(Icon, { icon, class: 'mr-1' }); + } + return Icon; +}; diff --git a/src/components/Tree/src/components/TreeHeader.vue b/src/components/Tree/src/components/TreeHeader.vue new file mode 100644 index 0000000..a1792d2 --- /dev/null +++ b/src/components/Tree/src/components/TreeHeader.vue @@ -0,0 +1,171 @@ + + diff --git a/src/components/Tree/src/hooks/useTree.ts b/src/components/Tree/src/hooks/useTree.ts new file mode 100644 index 0000000..17345a2 --- /dev/null +++ b/src/components/Tree/src/hooks/useTree.ts @@ -0,0 +1,207 @@ +import type { InsertNodeParams, KeyType, FieldNames, TreeItem } from '../types/tree'; +import type { Ref, ComputedRef } from 'vue'; +import type { TreeDataItem } from 'ant-design-vue/es/tree/Tree'; + +import { cloneDeep } from 'lodash-es'; +import { unref } from 'vue'; +import { forEach } from '/@/utils/helper/treeHelper'; + +export function useTree(treeDataRef: Ref, getFieldNames: ComputedRef) { + function getAllKeys(list?: TreeDataItem[]) { + const keys: string[] = []; + const treeData = list || unref(treeDataRef); + const { key: keyField, children: childrenField } = unref(getFieldNames); + if (!childrenField || !keyField) return keys; + + for (let index = 0; index < treeData.length; index++) { + const node = treeData[index]; + keys.push(node[keyField]!); + const children = node[childrenField]; + if (children && children.length) { + keys.push(...(getAllKeys(children) as string[])); + } + } + return keys as KeyType[]; + } + + // get keys that can be checked and selected + function getEnabledKeys(list?: TreeDataItem[]) { + const keys: string[] = []; + const treeData = list || unref(treeDataRef); + const { key: keyField, children: childrenField } = unref(getFieldNames); + if (!childrenField || !keyField) return keys; + + for (let index = 0; index < treeData.length; index++) { + const node = treeData[index]; + node.disabled !== true && node.selectable !== false && keys.push(node[keyField]!); + const children = node[childrenField]; + if (children && children.length) { + keys.push(...(getEnabledKeys(children) as string[])); + } + } + return keys as KeyType[]; + } + + function getChildrenKeys(nodeKey: string | number, list?: TreeDataItem[]) { + const keys: KeyType[] = []; + const treeData = list || unref(treeDataRef); + const { key: keyField, children: childrenField } = unref(getFieldNames); + if (!childrenField || !keyField) return keys; + for (let index = 0; index < treeData.length; index++) { + const node = treeData[index]; + const children = node[childrenField]; + if (nodeKey === node[keyField]) { + keys.push(node[keyField]!); + if (children && children.length) { + keys.push(...(getAllKeys(children) as string[])); + } + } else { + if (children && children.length) { + keys.push(...getChildrenKeys(nodeKey, children)); + } + } + } + return keys as KeyType[]; + } + + // Update node + function updateNodeByKey(key: string, node: TreeDataItem, list?: TreeDataItem[]) { + if (!key) return; + const treeData = list || unref(treeDataRef); + const { key: keyField, children: childrenField } = unref(getFieldNames); + + if (!childrenField || !keyField) return; + + for (let index = 0; index < treeData.length; index++) { + const element: any = treeData[index]; + const children = element[childrenField]; + + if (element[keyField] === key) { + treeData[index] = { ...treeData[index], ...node }; + break; + } else if (children && children.length) { + updateNodeByKey(key, node, element[childrenField]); + } + } + } + + // Expand the specified level + function filterByLevel(level = 1, list?: TreeDataItem[], currentLevel = 1) { + if (!level) { + return []; + } + const res: (string | number)[] = []; + const data = list || unref(treeDataRef) || []; + for (let index = 0; index < data.length; index++) { + const item = data[index]; + + const { key: keyField, children: childrenField } = unref(getFieldNames); + const key = keyField ? item[keyField] : ''; + const children = childrenField ? item[childrenField] : []; + res.push(key); + if (children && children.length && currentLevel < level) { + currentLevel += 1; + res.push(...filterByLevel(level, children, currentLevel)); + } + } + return res as string[] | number[]; + } + + /** + * 添加节点 + */ + function insertNodeByKey({ parentKey = null, node, push = 'push' }: InsertNodeParams) { + const treeData: any = cloneDeep(unref(treeDataRef)); + if (!parentKey) { + treeData[push](node); + treeDataRef.value = treeData; + return; + } + const { key: keyField, children: childrenField } = unref(getFieldNames); + if (!childrenField || !keyField) return; + + forEach(treeData, (treeItem) => { + if (treeItem[keyField] === parentKey) { + treeItem[childrenField] = treeItem[childrenField] || []; + treeItem[childrenField][push](node); + return true; + } + }); + treeDataRef.value = treeData; + } + /** + * 批量添加节点 + */ + function insertNodesByKey({ parentKey = null, list, push = 'push' }: InsertNodeParams) { + const treeData: any = cloneDeep(unref(treeDataRef)); + if (!list || list.length < 1) { + return; + } + if (!parentKey) { + for (let i = 0; i < list.length; i++) { + treeData[push](list[i]); + } + } else { + const { key: keyField, children: childrenField } = unref(getFieldNames); + if (!childrenField || !keyField) return; + + forEach(treeData, (treeItem) => { + if (treeItem[keyField] === parentKey) { + treeItem[childrenField] = treeItem[childrenField] || []; + for (let i = 0; i < list.length; i++) { + treeItem[childrenField][push](list[i]); + } + treeDataRef.value = treeData; + return true; + } + }); + } + } + // Delete node + function deleteNodeByKey(key: string, list?: TreeDataItem[]) { + if (!key) return; + const treeData = list || unref(treeDataRef); + const { key: keyField, children: childrenField } = unref(getFieldNames); + if (!childrenField || !keyField) return; + + for (let index = 0; index < treeData.length; index++) { + const element: any = treeData[index]; + const children = element[childrenField]; + + if (element[keyField] === key) { + treeData.splice(index, 1); + break; + } else if (children && children.length) { + deleteNodeByKey(key, element[childrenField]); + } + } + } + + // Get selected node + function getSelectedNode(key: KeyType, list?: TreeItem[], selectedNode?: TreeItem | null) { + if (!key && key !== 0) return null; + const treeData = list || unref(treeDataRef); + treeData.forEach((item) => { + if (selectedNode?.key || selectedNode?.key === 0) return selectedNode; + if (item.key === key) { + selectedNode = item; + return; + } + if (item.children && item.children.length) { + selectedNode = getSelectedNode(key, item.children, selectedNode); + } + }); + return selectedNode || null; + } + return { + deleteNodeByKey, + insertNodeByKey, + insertNodesByKey, + filterByLevel, + updateNodeByKey, + getAllKeys, + getChildrenKeys, + getEnabledKeys, + getSelectedNode, + }; +} diff --git a/src/components/Tree/src/types/tree.ts b/src/components/Tree/src/types/tree.ts new file mode 100644 index 0000000..691daae --- /dev/null +++ b/src/components/Tree/src/types/tree.ts @@ -0,0 +1,195 @@ +import type { ExtractPropTypes } from 'vue'; +import type { TreeDataItem } from 'ant-design-vue/es/tree/Tree'; + +import { buildProps } from '/@/utils/props'; + +export enum ToolbarEnum { + SELECT_ALL, + UN_SELECT_ALL, + EXPAND_ALL, + UN_EXPAND_ALL, + CHECK_STRICTLY, + CHECK_UN_STRICTLY, +} + +export const treeEmits = [ + 'update:expandedKeys', + 'update:selectedKeys', + 'update:value', + 'change', + 'check', + 'search', + 'update:searchValue', +]; + +export interface TreeState { + expandedKeys: KeyType[]; + selectedKeys: KeyType[]; + checkedKeys: CheckKeys; + checkStrictly: boolean; +} + +export interface FieldNames { + children?: string; + title?: string; + key?: string; +} + +export type KeyType = string | number; + +export type CheckKeys = + | KeyType[] + | { checked: string[] | number[]; halfChecked: string[] | number[] }; + +export const treeProps = buildProps({ + value: { + type: [Object, Array] as PropType, + }, + + renderIcon: { + type: Function as PropType<(params: Recordable) => string>, + }, + + helpMessage: { + type: [String, Array] as PropType, + default: '', + }, + + title: { + type: String, + default: '', + }, + toolbar: Boolean, + search: Boolean, + searchValue: { + type: String, + default: '', + }, + checkStrictly: Boolean, + clickRowToExpand: { + type: Boolean, + default: false, + }, + checkable: Boolean, + defaultExpandLevel: { + type: [String, Number] as PropType, + default: '', + }, + defaultExpandAll: Boolean, + + fieldNames: { + type: Object as PropType, + }, + + treeData: { + type: Array as PropType, + }, + + actionList: { + type: Array as PropType, + default: () => [], + }, + + expandedKeys: { + type: Array as PropType, + default: () => [], + }, + + selectedKeys: { + type: Array as PropType, + default: () => [], + }, + + checkedKeys: { + type: Array as PropType, + default: () => [], + }, + + beforeRightClick: { + type: Function as PropType<(...arg: any) => ContextMenuItem[] | ContextMenuOptions>, + default: undefined, + }, + + rightMenuList: { + type: Array as PropType, + }, + // 自定义数据过滤判断方法(注: 不是整个过滤方法,而是内置过滤的判断方法,用于增强原本仅能通过title进行过滤的方式) + filterFn: { + type: Function as PropType< + (searchValue: any, node: TreeItem, fieldNames: FieldNames) => boolean + >, + default: undefined, + }, + // 高亮搜索值,仅高亮具体匹配值(通过title)值为true时使用默认色值,值为#xxx时使用此值替代且高亮开启 + highlight: { + type: [Boolean, String] as PropType, + default: false, + }, + // 搜索完成时自动展开结果 + expandOnSearch: Boolean, + // 搜索完成自动选中所有结果,当且仅当 checkable===true 时生效 + checkOnSearch: Boolean, + // 搜索完成自动select所有结果 + selectedOnSearch: Boolean, + loading: { + type: Boolean, + default: false, + }, +}); + +export type TreeProps = ExtractPropTypes; + +export interface ContextMenuItem { + label: string; + icon?: string; + hidden?: boolean; + disabled?: boolean; + handler?: Fn; + divider?: boolean; + children?: ContextMenuItem[]; +} + +export interface ContextMenuOptions { + icon?: string; + styles?: any; + items?: ContextMenuItem[]; +} + +export interface TreeItem extends TreeDataItem { + icon?: any; +} + +export interface TreeActionItem { + render: (record: Recordable) => any; + show?: boolean | ((record: Recordable) => boolean); +} + +export interface InsertNodeParams { + parentKey: string | null; + node: TreeDataItem; + list?: TreeDataItem[]; + push?: 'push' | 'unshift'; +} + +export interface TreeActionType { + checkAll: (checkAll: boolean) => void; + expandAll: (expandAll: boolean) => void; + setExpandedKeys: (keys: KeyType[]) => void; + getExpandedKeys: () => KeyType[]; + setSelectedKeys: (keys: KeyType[]) => void; + getSelectedKeys: () => KeyType[]; + setCheckedKeys: (keys: CheckKeys) => void; + getCheckedKeys: () => CheckKeys; + filterByLevel: (level: number) => void; + insertNodeByKey: (opt: InsertNodeParams) => void; + insertNodesByKey: (opt: InsertNodeParams) => void; + deleteNodeByKey: (key: string) => void; + updateNodeByKey: (key: string, node: Omit) => void; + setSearchValue: (value: string) => void; + getSearchValue: () => string; + getSelectedNode: ( + key: KeyType, + treeList?: TreeItem[], + selectNode?: TreeItem | null, + ) => TreeItem | null; +} diff --git a/src/components/Tree/style/index.less b/src/components/Tree/style/index.less new file mode 100644 index 0000000..472d4ca --- /dev/null +++ b/src/components/Tree/style/index.less @@ -0,0 +1,52 @@ +@tree-prefix-cls: ~'@{namespace}-tree'; + +.@{tree-prefix-cls} { + background-color: @component-background; + + .ant-tree-node-content-wrapper { + position: relative; + + .ant-tree-title { + position: absolute; + left: 0; + width: 100%; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + } + + &__title { + position: relative; + display: flex; + align-items: center; + width: 100%; + padding-right: 10px; + + &:hover { + .@{tree-prefix-cls}__action { + visibility: visible; + } + } + } + + &__content { + overflow: hidden; + } + + &__actions { + position: absolute; + //top: 2px; + right: 3px; + display: flex; + } + + &__action { + margin-left: 4px; + visibility: hidden; + } + + &-header { + border-bottom: 1px solid @border-color-base; + } +} diff --git a/src/components/Tree/style/index.ts b/src/components/Tree/style/index.ts new file mode 100644 index 0000000..d74e52e --- /dev/null +++ b/src/components/Tree/style/index.ts @@ -0,0 +1 @@ +import './index.less'; diff --git a/src/components/Tree_backup/index.ts b/src/components/Tree_backup/index.ts new file mode 100644 index 0000000..f47820d --- /dev/null +++ b/src/components/Tree_backup/index.ts @@ -0,0 +1,5 @@ +import BasicTree from './src/Tree.vue'; + +export { BasicTree }; +export type { ContextMenuItem } from '/@/hooks/web/useContextMenu'; +export * from './src/typing'; diff --git a/src/components/Tree_backup/src/Tree.vue b/src/components/Tree_backup/src/Tree.vue new file mode 100644 index 0000000..e1eb8f3 --- /dev/null +++ b/src/components/Tree_backup/src/Tree.vue @@ -0,0 +1,449 @@ + + diff --git a/src/components/Tree_backup/src/TreeHeader.vue b/src/components/Tree_backup/src/TreeHeader.vue new file mode 100644 index 0000000..fbe36cf --- /dev/null +++ b/src/components/Tree_backup/src/TreeHeader.vue @@ -0,0 +1,181 @@ + + + diff --git a/src/components/Tree_backup/src/TreeIcon.ts b/src/components/Tree_backup/src/TreeIcon.ts new file mode 100644 index 0000000..69e7cd0 --- /dev/null +++ b/src/components/Tree_backup/src/TreeIcon.ts @@ -0,0 +1,17 @@ +import type { VNode, FunctionalComponent } from 'vue'; + +import { h } from 'vue'; +import { isString } from '/@/utils/is'; +import { Icon } from '/@/components/Icon'; + +export interface ComponentProps { + icon: VNode | string; +} + +export const TreeIcon: FunctionalComponent = ({ icon }: ComponentProps) => { + if (!icon) return null; + if (isString(icon)) { + return h(Icon, { icon, class: 'mr-1' }); + } + return Icon; +}; diff --git a/src/components/Tree_backup/src/props.ts b/src/components/Tree_backup/src/props.ts new file mode 100644 index 0000000..e6f6d73 --- /dev/null +++ b/src/components/Tree_backup/src/props.ts @@ -0,0 +1,99 @@ +import type { PropType } from 'vue'; +import type { ReplaceFields, ActionItem, Keys, CheckKeys, ContextMenuOptions, TreeItem } from './typing'; +import type { ContextMenuItem } from '/@/hooks/web/useContextMenu'; +import type { TreeDataItem } from 'ant-design-vue/es/tree/Tree'; +import { propTypes } from '/@/utils/propTypes'; + +export const basicProps = { + value: { + type: [Object, Array] as PropType, + }, + renderIcon: { + type: Function as PropType<(params: Recordable) => string>, + }, + + helpMessage: { + type: [String, Array] as PropType, + default: '', + }, + + title: propTypes.string, + toolbar: propTypes.bool, + search: propTypes.bool, + searchValue: propTypes.string, + checkStrictly: propTypes.bool, + clickRowToExpand: propTypes.bool.def(true), + checkable: propTypes.bool.def(false), + defaultExpandLevel: { + type: [String, Number] as PropType, + default: '', + }, + // 高亮搜索值,仅高亮具体匹配值(通过title)值为true时使用默认色值,值为#xxx时使用此值替代且高亮开启 + highlight: { + type: [Boolean, String] as PropType, + default: false, + }, + defaultExpandAll: propTypes.bool.def(false), + + replaceFields: { + type: Object as PropType, + }, + + treeData: { + type: Array as PropType, + }, + + actionList: { + type: Array as PropType, + default: () => [], + }, + + expandedKeys: { + type: Array as PropType, + default: () => [], + }, + + selectedKeys: { + type: Array as PropType, + default: () => [], + }, + + checkedKeys: { + type: Array as PropType, + default: () => [], + }, + + beforeRightClick: { + type: Function as PropType<(...arg: any) => ContextMenuItem[] | ContextMenuOptions>, + default: null, + }, + + rightMenuList: { + type: Array as PropType, + }, + // 自定义数据过滤判断方法(注: 不是整个过滤方法,而是内置过滤的判断方法,用于增强原本仅能通过title进行过滤的方式) + filterFn: { + type: Function as PropType<(searchValue: any, node: TreeItem, replaceFields: ReplaceFields) => boolean>, + default: null, + }, + // 搜索完成时自动展开结果 + expandOnSearch: propTypes.bool.def(false), + // 搜索完成自动选中所有结果,当且仅当 checkable===true 时生效 + checkOnSearch: propTypes.bool.def(false), + // 搜索完成自动select所有结果 + selectedOnSearch: propTypes.bool.def(false), +}; + +export const treeNodeProps = { + actionList: { + type: Array as PropType, + default: () => [], + }, + replaceFields: { + type: Object as PropType, + }, + treeData: { + type: Array as PropType, + default: () => [], + }, +}; diff --git a/src/components/Tree_backup/src/typing.ts b/src/components/Tree_backup/src/typing.ts new file mode 100644 index 0000000..c606d4d --- /dev/null +++ b/src/components/Tree_backup/src/typing.ts @@ -0,0 +1,53 @@ +import type { TreeDataItem, CheckEvent as CheckEventOrigin } from 'ant-design-vue/es/tree/Tree'; +import { ContextMenuItem } from '/@/hooks/web/useContextMenu'; + +export interface ActionItem { + render: (record: Recordable) => any; + show?: boolean | ((record: Recordable) => boolean); +} + +export interface TreeItem extends TreeDataItem { + icon?: any; +} + +export interface ReplaceFields { + children?: string; + title?: string; + key?: string; +} + +export type Keys = (string | number)[]; +export type CheckKeys = (string | number)[] | { checked: (string | number)[]; halfChecked: (string | number)[] }; + +export interface TreeActionType { + checkAll: (checkAll: boolean) => void; + expandAll: (expandAll: boolean) => void; + setExpandedKeys: (keys: Keys) => void; + getExpandedKeys: () => Keys; + setSelectedKeys: (keys: Keys) => void; + getSelectedKeys: () => Keys; + setCheckedKeys: (keys: CheckKeys) => void; + getCheckedKeys: () => CheckKeys; + filterByLevel: (level: number) => void; + insertNodeByKey: (opt: InsertNodeParams) => void; + insertNodesByKey: (opt: InsertNodeParams) => void; + deleteNodeByKey: (key: string) => void; + updateNodeByKey: (key: string, node: Omit) => void; + setSearchValue: (value: string) => void; + getSearchValue: () => string; +} + +export interface InsertNodeParams { + parentKey: string | null; + node: TreeDataItem; + list?: TreeDataItem[]; + push?: 'push' | 'unshift'; +} + +export interface ContextMenuOptions { + icon?: string; + styles?: any; + items?: ContextMenuItem[]; +} + +export type CheckEvent = CheckEventOrigin; diff --git a/src/components/Tree_backup/src/useTree.ts b/src/components/Tree_backup/src/useTree.ts new file mode 100644 index 0000000..1ba6f69 --- /dev/null +++ b/src/components/Tree_backup/src/useTree.ts @@ -0,0 +1,192 @@ +import type { InsertNodeParams, Keys, ReplaceFields } from './typing'; +import type { Ref, ComputedRef } from 'vue'; +import type { TreeDataItem } from 'ant-design-vue/es/tree/Tree'; + +import { cloneDeep } from 'lodash-es'; +import { unref } from 'vue'; +import { forEach } from '/@/utils/helper/treeHelper'; + +export function useTree(treeDataRef: Ref, getReplaceFields: ComputedRef) { + function getAllKeys(list?: TreeDataItem[]) { + const keys: string[] = []; + const treeData = list || unref(treeDataRef); + const { key: keyField, children: childrenField } = unref(getReplaceFields); + if (!childrenField || !keyField) return keys; + + for (let index = 0; index < treeData.length; index++) { + const node = treeData[index]; + keys.push(node[keyField]!); + const children = node[childrenField]; + if (children && children.length) { + keys.push(...(getAllKeys(children) as string[])); + } + } + return keys as Keys; + } + + // get keys that can be checked and selected + function getEnabledKeys(list?: TreeDataItem[]) { + const keys: string[] = []; + const treeData = list || unref(treeDataRef); + const { key: keyField, children: childrenField } = unref(getReplaceFields); + if (!childrenField || !keyField) return keys; + + for (let index = 0; index < treeData.length; index++) { + const node = treeData[index]; + node.disabled !== true && node.selectable !== false && keys.push(node[keyField]!); + const children = node[childrenField]; + if (children && children.length) { + keys.push(...(getEnabledKeys(children) as string[])); + } + } + return keys as Keys; + } + + function getChildrenKeys(nodeKey: string | number, list?: TreeDataItem[]): Keys { + const keys: Keys = []; + const treeData = list || unref(treeDataRef); + const { key: keyField, children: childrenField } = unref(getReplaceFields); + if (!childrenField || !keyField) return keys; + for (let index = 0; index < treeData.length; index++) { + const node = treeData[index]; + const children = node[childrenField]; + if (nodeKey === node[keyField]) { + keys.push(node[keyField]!); + if (children && children.length) { + keys.push(...(getAllKeys(children) as string[])); + } + } else { + if (children && children.length) { + keys.push(...getChildrenKeys(nodeKey, children)); + } + } + } + return keys as Keys; + } + + // Update node + function updateNodeByKey(key: string, node: TreeDataItem, list?: TreeDataItem[]) { + if (!key) return; + const treeData = list || unref(treeDataRef); + const { key: keyField, children: childrenField } = unref(getReplaceFields); + + if (!childrenField || !keyField) return; + + for (let index = 0; index < treeData.length; index++) { + const element: any = treeData[index]; + const children = element[childrenField]; + + if (element[keyField] === key) { + treeData[index] = { ...treeData[index], ...node }; + break; + } else if (children && children.length) { + updateNodeByKey(key, node, element[childrenField]); + } + } + } + + // Expand the specified level + function filterByLevel(level = 1, list?: TreeDataItem[], currentLevel = 1) { + if (!level) { + return []; + } + const res: (string | number)[] = []; + const data = list || unref(treeDataRef) || []; + for (let index = 0; index < data.length; index++) { + const item = data[index]; + + const { key: keyField, children: childrenField } = unref(getReplaceFields); + const key = keyField ? item[keyField] : ''; + const children = childrenField ? item[childrenField] : []; + res.push(key); + if (children && children.length && currentLevel < level) { + currentLevel += 1; + res.push(...filterByLevel(level, children, currentLevel)); + } + } + return res as string[] | number[]; + } + + /** + * 添加节点 + */ + function insertNodeByKey({ parentKey = null, node, push = 'push' }: InsertNodeParams) { + const treeData: any = cloneDeep(unref(treeDataRef)); + if (!parentKey) { + treeData[push](node); + treeDataRef.value = treeData; + return; + } + const { key: keyField, children: childrenField } = unref(getReplaceFields); + if (!childrenField || !keyField) return; + + forEach(treeData, (treeItem) => { + if (treeItem[keyField] === parentKey) { + treeItem[childrenField] = treeItem[childrenField] || []; + treeItem[childrenField][push](node); + return true; + } + }); + treeDataRef.value = treeData; + } + + /** + * 批量添加节点 + */ + function insertNodesByKey({ parentKey = null, list, push = 'push' }: InsertNodeParams) { + const treeData: any = cloneDeep(unref(treeDataRef)); + if (!list || list.length < 1) { + return; + } + if (!parentKey) { + for (let i = 0; i < list.length; i++) { + treeData[push](list[i]); + } + } else { + const { key: keyField, children: childrenField } = unref(getReplaceFields); + if (!childrenField || !keyField) return; + + forEach(treeData, (treeItem) => { + if (treeItem[keyField] === parentKey) { + treeItem[childrenField] = treeItem[childrenField] || []; + for (let i = 0; i < list.length; i++) { + treeItem[childrenField][push](list[i]); + } + treeDataRef.value = treeData; + return true; + } + }); + } + } + + // Delete node + function deleteNodeByKey(key: string, list?: TreeDataItem[]) { + if (!key) return; + const treeData = list || unref(treeDataRef); + const { key: keyField, children: childrenField } = unref(getReplaceFields); + if (!childrenField || !keyField) return; + + for (let index = 0; index < treeData.length; index++) { + const element: any = treeData[index]; + const children = element[childrenField]; + + if (element[keyField] === key) { + treeData.splice(index, 1); + break; + } else if (children && children.length) { + deleteNodeByKey(key, element[childrenField]); + } + } + } + + return { + deleteNodeByKey, + insertNodeByKey, + insertNodesByKey, + filterByLevel, + updateNodeByKey, + getAllKeys, + getChildrenKeys, + getEnabledKeys, + }; +} diff --git a/src/components/Upload/index.ts b/src/components/Upload/index.ts new file mode 100644 index 0000000..568a7d9 --- /dev/null +++ b/src/components/Upload/index.ts @@ -0,0 +1,4 @@ +import { withInstall } from '/@/utils'; +import basicUpload from './src/BasicUpload.vue'; + +export const BasicUpload = withInstall(basicUpload); diff --git a/src/components/Upload/src/BasicUpload.vue b/src/components/Upload/src/BasicUpload.vue new file mode 100644 index 0000000..7e2f4c5 --- /dev/null +++ b/src/components/Upload/src/BasicUpload.vue @@ -0,0 +1,113 @@ + + diff --git a/src/components/Upload/src/FileList.vue b/src/components/Upload/src/FileList.vue new file mode 100644 index 0000000..19ffb57 --- /dev/null +++ b/src/components/Upload/src/FileList.vue @@ -0,0 +1,102 @@ + + diff --git a/src/components/Upload/src/ThumbUrl.vue b/src/components/Upload/src/ThumbUrl.vue new file mode 100644 index 0000000..80fb203 --- /dev/null +++ b/src/components/Upload/src/ThumbUrl.vue @@ -0,0 +1,29 @@ + + + diff --git a/src/components/Upload/src/UploadModal.vue b/src/components/Upload/src/UploadModal.vue new file mode 100644 index 0000000..19eeeca --- /dev/null +++ b/src/components/Upload/src/UploadModal.vue @@ -0,0 +1,309 @@ + + + diff --git a/src/components/Upload/src/UploadPreviewModal.vue b/src/components/Upload/src/UploadPreviewModal.vue new file mode 100644 index 0000000..0e51cb9 --- /dev/null +++ b/src/components/Upload/src/UploadPreviewModal.vue @@ -0,0 +1,99 @@ + + + diff --git a/src/components/Upload/src/data.tsx b/src/components/Upload/src/data.tsx new file mode 100644 index 0000000..5480788 --- /dev/null +++ b/src/components/Upload/src/data.tsx @@ -0,0 +1,147 @@ +import type { BasicColumn, ActionItem } from '/@/components/Table'; +import { FileItem, PreviewFileItem, UploadResultStatus } from './typing'; +import { + // checkImgType, + isImgTypeByName, +} from './helper'; +import { Progress, Tag } from 'ant-design-vue'; +import TableAction from '/@/components/Table/src/components/TableAction.vue'; +import ThumbUrl from './ThumbUrl.vue'; +import { useI18n } from '/@/hooks/web/useI18n'; + +const { t } = useI18n(); + +// 文件上传列表 +export function createTableColumns(): BasicColumn[] { + return [ + { + dataIndex: 'thumbUrl', + title: t('component.upload.legend'), + width: 100, + customRender: ({ record }) => { + const { thumbUrl } = (record as FileItem) || {}; + return thumbUrl && ; + }, + }, + { + dataIndex: 'name', + title: t('component.upload.fileName'), + align: 'left', + customRender: ({ text, record }) => { + const { percent, status: uploadStatus } = (record as FileItem) || {}; + let status: 'normal' | 'exception' | 'active' | 'success' = 'normal'; + if (uploadStatus === UploadResultStatus.ERROR) { + status = 'exception'; + } else if (uploadStatus === UploadResultStatus.UPLOADING) { + status = 'active'; + } else if (uploadStatus === UploadResultStatus.SUCCESS) { + status = 'success'; + } + return ( + +

+ {text} +

+ +
+ ); + }, + }, + { + dataIndex: 'size', + title: t('component.upload.fileSize'), + width: 100, + customRender: ({ text = 0 }) => { + return text && (text / 1024).toFixed(2) + 'KB'; + }, + }, + // { + // dataIndex: 'type', + // title: '文件类型', + // width: 100, + // }, + { + dataIndex: 'status', + title: t('component.upload.fileStatue'), + width: 100, + customRender: ({ text }) => { + if (text === UploadResultStatus.SUCCESS) { + return {() => t('component.upload.uploadSuccess')}; + } else if (text === UploadResultStatus.ERROR) { + return {() => t('component.upload.uploadError')}; + } else if (text === UploadResultStatus.UPLOADING) { + return {() => t('component.upload.uploading')}; + } + + return text; + }, + }, + ]; +} +export function createActionColumn(handleRemove: Function): BasicColumn { + return { + width: 120, + title: t('component.upload.operating'), + dataIndex: 'action', + fixed: false, + customRender: ({ record }) => { + const actions: ActionItem[] = [ + { + label: t('component.upload.del'), + color: 'error', + onClick: handleRemove.bind(null, record), + }, + ]; + // if (checkImgType(record)) { + // actions.unshift({ + // label: t('component.upload.preview'), + // onClick: handlePreview.bind(null, record), + // }); + // } + return ; + }, + }; +} +// 文件预览列表 +export function createPreviewColumns(): BasicColumn[] { + return [ + { + dataIndex: 'url', + title: t('component.upload.legend'), + width: 100, + customRender: ({ record }) => { + const { url } = (record as PreviewFileItem) || {}; + return isImgTypeByName(url) && ; + }, + }, + { + dataIndex: 'name', + title: t('component.upload.fileName'), + align: 'left', + }, + ]; +} + +export function createPreviewActionColumn({ handleRemove, handleDownload }: { handleRemove: Fn; handleDownload: Fn }): BasicColumn { + return { + width: 160, + title: t('component.upload.operating'), + dataIndex: 'action', + fixed: false, + customRender: ({ record }) => { + const actions: ActionItem[] = [ + { + label: t('component.upload.del'), + color: 'error', + onClick: handleRemove.bind(null, record), + }, + { + label: t('component.upload.download'), + onClick: handleDownload.bind(null, record), + }, + ]; + + return ; + }, + }; +} diff --git a/src/components/Upload/src/helper.ts b/src/components/Upload/src/helper.ts new file mode 100644 index 0000000..f366494 --- /dev/null +++ b/src/components/Upload/src/helper.ts @@ -0,0 +1,61 @@ +export function checkFileType(file: File, accepts: string[]) { + // update-begin--author:liaozhiyang---date:20250318---for:【issues/7954】BasicUpload组件上传文件,限制上传格式校验出错 + const mimePatterns: string[] = []; + const suffixList: string[] = []; + // 分类处理 accepts + for (const item of accepts) { + if (item.includes('/')) { + mimePatterns.push(item); + } else { + // 支持.png 或 png(带点后缀或者不带点后缀) + const suffix = item.startsWith('.') ? item.slice(1) : item; + suffixList.push(suffix); + } + } + // 后缀匹配逻辑 + let suffixMatch = false; + if (suffixList.length > 0) { + const suffixRegex = new RegExp(`\\.(${suffixList.join('|')})$`, 'i'); + suffixMatch = suffixRegex.test(file.name); + } + // MIME类型匹配逻辑 + let mimeMatch = false; + if (mimePatterns.length > 0 && file.type) { + mimeMatch = mimePatterns.some((pattern) => { + // 先转义特殊字符,再处理通配符 + const regexPattern = pattern + .replace(/[.+?^${}()|[\]\\]/g, '\\$&') // 先转义特殊字符 + .replace(/\*/g, '.*'); // 再替换通配符 + const regex = new RegExp(`^${regexPattern}$`, 'i'); + return regex.test(file.type); + }); + } + if (mimePatterns.length && suffixList.length) { + return suffixMatch || mimeMatch; + } else if (mimePatterns.length) { + return mimeMatch; + } else if (suffixList.length) { + return suffixMatch; + } + // update-end--author:liaozhiyang---date:20250318---for:【issues/7954】BasicUpload组件上传文件,限制上传格式校验出错 +} + +export function checkImgType(file: File) { + return isImgTypeByName(file.name); +} + +export function isImgTypeByName(name: string) { + return /\.(jpg|jpeg|png|gif)$/i.test(name); +} + +export function getBase64WithFile(file: File) { + return new Promise<{ + result: string; + file: File; + }>((resolve, reject) => { + const reader = new FileReader(); + reader.readAsDataURL(file); + reader.onload = () => resolve({ result: reader.result as string, file }); + reader.onerror = (error) => reject(error); + }); +} diff --git a/src/components/Upload/src/props.ts b/src/components/Upload/src/props.ts new file mode 100644 index 0000000..413b95d --- /dev/null +++ b/src/components/Upload/src/props.ts @@ -0,0 +1,83 @@ +import type { PropType } from 'vue'; +import { FileBasicColumn } from './typing'; + +export const basicProps = { + helpText: { + type: String as PropType, + default: '', + }, + // 文件最大多少MB + maxSize: { + type: Number as PropType, + default: 2, + }, + // 最大数量的文件,Infinity不限制 + maxNumber: { + type: Number as PropType, + default: Infinity, + }, + // 根据后缀,或者其他 + accept: { + type: Array as PropType, + default: () => [], + }, + multiple: { + type: Boolean as PropType, + default: true, + }, + uploadParams: { + type: Object as PropType, + default: {}, + }, + api: { + type: Function as PropType, + default: null, + required: true, + }, + name: { + type: String as PropType, + default: 'file', + }, + filename: { + type: String as PropType, + default: null, + }, +}; + +export const uploadContainerProps = { + value: { + type: Array as PropType, + default: () => [], + }, + ...basicProps, + showPreviewNumber: { + type: Boolean as PropType, + default: true, + }, + emptyHidePreview: { + type: Boolean as PropType, + default: false, + }, +}; + +export const previewProps = { + value: { + type: Array as PropType, + default: () => [], + }, +}; + +export const fileListProps = { + columns: { + type: [Array] as PropType, + default: null, + }, + actionColumn: { + type: Object as PropType, + default: null, + }, + dataSource: { + type: Array as PropType, + default: null, + }, +}; diff --git a/src/components/Upload/src/typing.ts b/src/components/Upload/src/typing.ts new file mode 100644 index 0000000..c630110 --- /dev/null +++ b/src/components/Upload/src/typing.ts @@ -0,0 +1,55 @@ +import { UploadApiResult } from '/@/api/sys/model/uploadModel'; + +export enum UploadResultStatus { + SUCCESS = 'success', + ERROR = 'error', + UPLOADING = 'uploading', +} + +export interface FileItem { + thumbUrl?: string; + name: string; + size: string | number; + type?: string; + percent: number; + file: File; + status?: UploadResultStatus; + responseData?: UploadApiResult; + uuid: string; +} + +export interface PreviewFileItem { + url: string; + name: string; + type: string; +} + +export interface FileBasicColumn { + /** + * Renderer of the table cell. The return value should be a VNode, or an object for colSpan/rowSpan config + * @type Function | ScopedSlot + */ + customRender?: Function; + /** + * Title of this column + * @type any (string | slot) + */ + title: string; + + /** + * Width of this column + * @type string | number + */ + width?: number; + /** + * Display field of the data record, could be set like a.b.c + * @type string + */ + dataIndex: string; + /** + * specify how content is aligned + * @default 'left' + * @type string + */ + align?: 'left' | 'right' | 'center'; +} diff --git a/src/components/Upload/src/useUpload.ts b/src/components/Upload/src/useUpload.ts new file mode 100644 index 0000000..694cc27 --- /dev/null +++ b/src/components/Upload/src/useUpload.ts @@ -0,0 +1,60 @@ +import { Ref, unref, computed } from 'vue'; +import { useI18n } from '/@/hooks/web/useI18n'; +const { t } = useI18n(); +export function useUploadType({ + acceptRef, + helpTextRef, + maxNumberRef, + maxSizeRef, +}: { + acceptRef: Ref; + helpTextRef: Ref; + maxNumberRef: Ref; + maxSizeRef: Ref; +}) { + // 文件类型限制 + const getAccept = computed(() => { + const accept = unref(acceptRef); + if (accept && accept.length > 0) { + return accept; + } + return []; + }); + const getStringAccept = computed(() => { + return unref(getAccept) + .map((item) => { + if (item.indexOf('/') > 0 || item.startsWith('.')) { + return item; + } else { + return `.${item}`; + } + }) + .join(','); + }); + + // 支持jpg、jpeg、png格式,不超过2M,最多可选择10张图片,。 + const getHelpText = computed(() => { + const helpText = unref(helpTextRef); + if (helpText) { + return helpText; + } + const helpTexts: string[] = []; + + const accept = unref(acceptRef); + if (accept.length > 0) { + helpTexts.push(t('component.upload.accept', [accept.join(',')])); + } + + const maxSize = unref(maxSizeRef); + if (maxSize) { + helpTexts.push(t('component.upload.maxSize', [maxSize])); + } + + const maxNumber = unref(maxNumberRef); + if (maxNumber && maxNumber !== Infinity) { + helpTexts.push(t('component.upload.maxNumber', [maxNumber])); + } + return helpTexts.join(','); + }); + return { getAccept, getStringAccept, getHelpText }; +} diff --git a/src/components/Verify/index.ts b/src/components/Verify/index.ts new file mode 100644 index 0000000..7c67101 --- /dev/null +++ b/src/components/Verify/index.ts @@ -0,0 +1,7 @@ +import { withInstall } from '/@/utils/index'; +import basicDragVerify from './src/DragVerify.vue'; +import rotateDragVerify from './src/ImgRotate.vue'; + +export const BasicDragVerify = withInstall(basicDragVerify); +export const RotateDragVerify = withInstall(rotateDragVerify); +export * from './src/typing'; diff --git a/src/components/Verify/src/DragVerify.vue b/src/components/Verify/src/DragVerify.vue new file mode 100644 index 0000000..26ce84a --- /dev/null +++ b/src/components/Verify/src/DragVerify.vue @@ -0,0 +1,361 @@ + + diff --git a/src/components/Verify/src/ImgRotate.vue b/src/components/Verify/src/ImgRotate.vue new file mode 100644 index 0000000..e900188 --- /dev/null +++ b/src/components/Verify/src/ImgRotate.vue @@ -0,0 +1,216 @@ + + diff --git a/src/components/Verify/src/props.ts b/src/components/Verify/src/props.ts new file mode 100644 index 0000000..1e14970 --- /dev/null +++ b/src/components/Verify/src/props.ts @@ -0,0 +1,87 @@ +import type { PropType } from 'vue'; +import { useI18n } from '/@/hooks/web/useI18n'; + +const { t } = useI18n(); +export const basicProps = { + value: { + type: Boolean as PropType, + default: false, + }, + + isSlot: { + type: Boolean as PropType, + default: false, + }, + + text: { + type: [String] as PropType, + default: t('component.verify.dragText'), + }, + successText: { + type: [String] as PropType, + default: t('component.verify.successText'), + }, + height: { + type: [Number, String] as PropType, + default: 40, + }, + + width: { + type: [Number, String] as PropType, + default: 220, + }, + + circle: { + type: Boolean as PropType, + default: false, + }, + + wrapStyle: { + type: Object as PropType, + default: {}, + }, + contentStyle: { + type: Object as PropType, + default: {}, + }, + barStyle: { + type: Object as PropType, + default: {}, + }, + actionStyle: { + type: Object as PropType, + default: {}, + }, +}; + +export const rotateProps = { + ...basicProps, + src: { + type: String as PropType, + }, + + imgWidth: { + type: Number as PropType, + default: 260, + }, + + imgWrapStyle: { + type: Object as PropType, + default: {}, + }, + + minDegree: { + type: Number as PropType, + default: 90, + }, + + maxDegree: { + type: Number as PropType, + default: 270, + }, + + diffDegree: { + type: Number as PropType, + default: 20, + }, +}; diff --git a/src/components/Verify/src/typing.ts b/src/components/Verify/src/typing.ts new file mode 100644 index 0000000..48f7d4c --- /dev/null +++ b/src/components/Verify/src/typing.ts @@ -0,0 +1,14 @@ +export interface DragVerifyActionType { + resume: () => void; +} + +export interface PassingData { + isPassing: boolean; + time: number; +} + +export interface MoveData { + event: MouseEvent | TouchEvent; + moveDistance: number; + moveX: number; +} diff --git a/src/components/VirtualScroll/index.ts b/src/components/VirtualScroll/index.ts new file mode 100644 index 0000000..a4c6089 --- /dev/null +++ b/src/components/VirtualScroll/index.ts @@ -0,0 +1,4 @@ +import { withInstall } from '/@/utils/index'; +import vScroll from './src/VirtualScroll.vue'; + +export const VScroll = withInstall(vScroll); diff --git a/src/components/VirtualScroll/src/VirtualScroll.vue b/src/components/VirtualScroll/src/VirtualScroll.vue new file mode 100644 index 0000000..e010423 --- /dev/null +++ b/src/components/VirtualScroll/src/VirtualScroll.vue @@ -0,0 +1,180 @@ + + diff --git a/src/components/chart/Bar.vue b/src/components/chart/Bar.vue new file mode 100644 index 0000000..43e4d70 --- /dev/null +++ b/src/components/chart/Bar.vue @@ -0,0 +1,89 @@ + + diff --git a/src/components/chart/BarAndLine.vue b/src/components/chart/BarAndLine.vue new file mode 100644 index 0000000..7943e26 --- /dev/null +++ b/src/components/chart/BarAndLine.vue @@ -0,0 +1,93 @@ + + diff --git a/src/components/chart/BarMulti.vue b/src/components/chart/BarMulti.vue new file mode 100644 index 0000000..24b1cb2 --- /dev/null +++ b/src/components/chart/BarMulti.vue @@ -0,0 +1,122 @@ + + diff --git a/src/components/chart/ChartCard.vue b/src/components/chart/ChartCard.vue new file mode 100644 index 0000000..da7d58b --- /dev/null +++ b/src/components/chart/ChartCard.vue @@ -0,0 +1,109 @@ + + + + + diff --git a/src/components/chart/Gauge.vue b/src/components/chart/Gauge.vue new file mode 100644 index 0000000..86dc473 --- /dev/null +++ b/src/components/chart/Gauge.vue @@ -0,0 +1,110 @@ + + diff --git a/src/components/chart/HeadInfo.vue b/src/components/chart/HeadInfo.vue new file mode 100644 index 0000000..0ae5270 --- /dev/null +++ b/src/components/chart/HeadInfo.vue @@ -0,0 +1,79 @@ + + + + + diff --git a/src/components/chart/LineMulti.vue b/src/components/chart/LineMulti.vue new file mode 100644 index 0000000..324d271 --- /dev/null +++ b/src/components/chart/LineMulti.vue @@ -0,0 +1,116 @@ + + diff --git a/src/components/chart/Pie.vue b/src/components/chart/Pie.vue new file mode 100644 index 0000000..b01370c --- /dev/null +++ b/src/components/chart/Pie.vue @@ -0,0 +1,89 @@ + + diff --git a/src/components/chart/README.md b/src/components/chart/README.md new file mode 100644 index 0000000..ee301ef --- /dev/null +++ b/src/components/chart/README.md @@ -0,0 +1,282 @@ +# 报表组件文档 + +## 柱状图 + +##### 引用方式 + +```js +import Bar from '/@/components/chart/Bar.vue'; +``` + +##### 参数列表 + +| 参数名 | 类型 | 必填 | 说明 | +| --------- | ------ | ---- | ---------- | +| chartData | array | ✔️ | 报表数据源 | +| width | number | | 报表宽度 | +| height | number | | 报表高度 | + +##### chartData 示例 + +```json +[ + { + "name": "1月", + "value": 320 + }, + { + "name": "2月", + "value": 457 + }, + { + "name": "3月", + "value": 182 + } +] +``` + +##### 代码示例 + +```html + + + + + +``` + +## 多列柱状图 + +##### 引用方式 + +```js +import BarMulti from '/@/components/chart/BarMulti.vue'; +``` + +##### 参数列表 + +| 参数名 | 类型 | 必填 | 说明 | +| --------- | ------ | ---- | ---------- | +| chartData | array | ✔️ | 报表数据源 | +| width | number | | 报表宽度 | +| height | number | | 报表高度 | + +##### chartData 示例 + +```json +[ + { + "name": "1月", + "value": 320, + "type": "2021" + }, + { + "name": "2月", + "value": 457, + "type": "2021" + }, + { + "name": "3月", + "value": 182, + "type": "2021" + }, + { + "name": "1月", + "value": 240, + "type": "2022" + }, + { + "name": "2月", + "value": 357, + "type": "2022" + }, + { + "name": "3月", + "value": 456, + "type": "2022" + } +] +``` + +## 迷你柱状图 + +同柱形图,修改配置即可 + +## 面积图 + +##### 引用方式 + +```js +import Line from '/@/components/chart/Line.vue'; +``` + +##### 参数列表 + +| 参数名 | 类型 | 必填 | 说明 | +| --------- | ------ | ---- | ---------- | +| chartData | array | ✔️ | 报表数据源 | +| width | number | | 报表宽度 | +| height | number | | 报表高度 | +| option | object | | 配置项 | + +##### chartData 示例 + +```json +[ + { + "name": "1月", + "value": 320 + }, + { + "name": "2月", + "value": 457 + }, + { + "name": "3月", + "value": 182 + } +] +``` + +## 多行折线图 + +##### 引用方式 + +```js +import LineMulti from '/@/components/chart/LineMulti.vue'; +``` + +##### 参数列表 + +| 参数名 | 类型 | 必填 | 说明 | +| --------- | ------ | ---- | ---------- | +| chartData | array | ✔️ | 报表数据源 | +| width | number | | 报表宽度 | +| height | number | | 报表高度 | +| option | object | | 配置项 | + +##### chartData 示例 + +同柱形图 + +## 饼状图 + +##### 引用方式 + +```js +import Pie from '/@/components/chart/Pie'; +``` + +##### 参数列表 + +| 参数名 | 类型 | 必填 | 说明 | +| --------- | ------ | ---- | ---------- | +| chartData | array | ✔️ | 报表数据源 | +| width | number | | 报表宽度 | +| height | number | | 报表高度 | +| option | object | | 配置项 | + +##### chartData 示例 + +```json +[ + { "name": "一月", "value": 40 }, + { "name": "二月", "value": 21 }, + { "name": "三月", "value": 17 }, + { "name": "四月", "value": 13 }, + { "name": "五月", "value": 9 } +] +``` + +## 雷达图 + +##### 引用方式 + +```js +import Radar from '/@/components/chart/Radar'; +``` + +##### 参数列表 + +| 参数名 | 类型 | 必填 | 说明 | +| --------- | ------ | ---- | ---------- | +| chartData | array | ✔️ | 报表数据源 | +| width | number | | 报表宽度 | +| height | number | | 报表高度 | +| option | object | | 配置项 | + +##### chartData 示例 + +```json +[ + { "item": "一月", "score": 40 }, + { "item": "二月", "score": 20 }, + { "item": "三月", "score": 67 }, + { "item": "四月", "score": 43 }, + { "item": "五月", "score": 90 } +] +``` + +## 仪表盘 + +##### 引用方式 + +```js +import Gauge from '/@/components/chart/Gauge'; +``` + +##### 参数列表 + +| 参数名 | 类型 | 必填 | 说明 | +| --------- | ------ | ---- | ---------- | +| chartData | array | ✔️ | 报表数据源 | +| width | number | | 报表宽度 | +| height | number | | 报表高度 | +| option | object | | 配置项 | + +## 排名列表 + +##### 引用方式 + +```js +import RankList from '@/components/chart/RankList'; +``` + +##### 参数列表 + +| 参数名 | 类型 | 必填 | 说明 | +| ------ | ------ | ---- | ------------------------ | +| title | string | | 报表标题 | +| list | array | | 排名列表数据 | +| height | number | | 报表高度,默认自适应高度 | + +##### list 示例 + +```json +[ + { "name": "北京朝阳 1 号店", "total": 1981 }, + { "name": "北京朝阳 2 号店", "total": 1359 }, + { "name": "北京朝阳 3 号店", "total": 1354 }, + { "name": "北京朝阳 4 号店", "total": 263 }, + { "name": "北京朝阳 5 号店", "total": 446 }, + { "name": "北京朝阳 6 号店", "total": 796 } +] +``` diff --git a/src/components/chart/Radar.vue b/src/components/chart/Radar.vue new file mode 100644 index 0000000..c12197b --- /dev/null +++ b/src/components/chart/Radar.vue @@ -0,0 +1,89 @@ + + diff --git a/src/components/chart/RankList.vue b/src/components/chart/RankList.vue new file mode 100644 index 0000000..25bb2cf --- /dev/null +++ b/src/components/chart/RankList.vue @@ -0,0 +1,79 @@ + + + + + diff --git a/src/components/chart/SingleLine.vue b/src/components/chart/SingleLine.vue new file mode 100644 index 0000000..de33898 --- /dev/null +++ b/src/components/chart/SingleLine.vue @@ -0,0 +1,91 @@ + + diff --git a/src/components/chart/StackBar.vue b/src/components/chart/StackBar.vue new file mode 100644 index 0000000..d570d4a --- /dev/null +++ b/src/components/chart/StackBar.vue @@ -0,0 +1,107 @@ + + diff --git a/src/components/chart/Trend.vue b/src/components/chart/Trend.vue new file mode 100644 index 0000000..9294219 --- /dev/null +++ b/src/components/chart/Trend.vue @@ -0,0 +1,90 @@ + + + + + diff --git a/src/components/jeecg/AIcon.vue b/src/components/jeecg/AIcon.vue new file mode 100644 index 0000000..699f5ce --- /dev/null +++ b/src/components/jeecg/AIcon.vue @@ -0,0 +1,38 @@ + + + + + diff --git a/src/components/jeecg/ExcelButton.vue b/src/components/jeecg/ExcelButton.vue new file mode 100644 index 0000000..98d5fec --- /dev/null +++ b/src/components/jeecg/ExcelButton.vue @@ -0,0 +1,84 @@ + + + + + diff --git a/src/components/jeecg/JPrompt/JPrompt.vue b/src/components/jeecg/JPrompt/JPrompt.vue new file mode 100644 index 0000000..5ef4513 --- /dev/null +++ b/src/components/jeecg/JPrompt/JPrompt.vue @@ -0,0 +1,160 @@ + + + diff --git a/src/components/jeecg/JPrompt/hooks/useJPrompt.ts b/src/components/jeecg/JPrompt/hooks/useJPrompt.ts new file mode 100644 index 0000000..44b1bcd --- /dev/null +++ b/src/components/jeecg/JPrompt/hooks/useJPrompt.ts @@ -0,0 +1,59 @@ +import type { JPromptProps } from '../typing'; +import { render, createVNode, nextTick } from 'vue'; +import { error } from '/@/utils/log'; +import { getAppContext } from "@/store"; +import JPrompt from '../JPrompt.vue'; + +export function useJPrompt() { + + function createJPrompt(options: JPromptProps) { + let instance = null; + const box = document.createElement('div'); + const vm = createVNode(JPrompt, { + // 注册 + async onRegister(ins) { + instance = ins; + await nextTick(); + ins.openModal(options); + }, + // 销毁 + afterClose() { + render(null, box); + document.body.removeChild(box); + }, + }); + vm.appContext = getAppContext()!; + // 挂载到 body + render(vm, box); + document.body.appendChild(box); + + function getInstance(): any { + if (instance == null) { + error('useJPrompt instance is undefined!'); + } + return instance; + } + + function updateModal(options: JPromptProps) { + getInstance()?.updateModal(options); + } + + function closeModal() { + getInstance()?.closeModal(); + } + + function setLoading(loading) { + getInstance()?.setLoading(loading); + } + + return { + closeModal, + updateModal, + setLoading, + }; + } + + return { + createJPrompt, + }; +} diff --git a/src/components/jeecg/JPrompt/index.ts b/src/components/jeecg/JPrompt/index.ts new file mode 100644 index 0000000..850fc09 --- /dev/null +++ b/src/components/jeecg/JPrompt/index.ts @@ -0,0 +1,2 @@ +export { useJPrompt } from './hooks/useJPrompt'; +export { default as JPrompt } from './JPrompt.vue'; diff --git a/src/components/jeecg/JPrompt/typing.ts b/src/components/jeecg/JPrompt/typing.ts new file mode 100644 index 0000000..785efe0 --- /dev/null +++ b/src/components/jeecg/JPrompt/typing.ts @@ -0,0 +1,15 @@ +import { ModalOptionsPartial } from '/@/hooks/web/useMessage'; +import { RenderCallbackParams, Rule } from '/@/components/Form'; + +export interface JPromptProps extends ModalOptionsPartial { + // 输入框是否必填 + required?: boolean; + // 校验 + rules?: Rule[]; + // 动态校验 + dynamicRules?: (renderCallbackParams: RenderCallbackParams) => Rule[]; + // 占位字符 + placeholder?: string; + // 输入框默认值 + defaultValue?: string; +} diff --git a/src/components/jeecg/JVxeTable/hooks.ts b/src/components/jeecg/JVxeTable/hooks.ts new file mode 100644 index 0000000..54c46fa --- /dev/null +++ b/src/components/jeecg/JVxeTable/hooks.ts @@ -0,0 +1,2 @@ +export { useJVxeCompProps, useJVxeComponent } from './src/hooks/useJVxeComponent'; +export { useResolveComponent } from './src/hooks/useData'; diff --git a/src/components/jeecg/JVxeTable/index.ts b/src/components/jeecg/JVxeTable/index.ts new file mode 100644 index 0000000..6ce9d1f --- /dev/null +++ b/src/components/jeecg/JVxeTable/index.ts @@ -0,0 +1,4 @@ +export { default as JVxeTable } from './src/JVxeTable'; +export { registerJVxeTable } from './src/install'; +export { deleteComponent } from './src/componentMap'; +export { registerComponent, registerAsyncComponent, registerASyncComponentReal } from './src/utils/registerUtils'; diff --git a/src/components/jeecg/JVxeTable/src/JVxeTable.ts b/src/components/jeecg/JVxeTable/src/JVxeTable.ts new file mode 100644 index 0000000..c77713c --- /dev/null +++ b/src/components/jeecg/JVxeTable/src/JVxeTable.ts @@ -0,0 +1,82 @@ +import { defineComponent, h, nextTick, ref, useSlots } from 'vue'; +import { vxeEmits, vxeProps } from './vxe.data'; +import { useData, useRefs, useResolveComponent as rc } from './hooks/useData'; +import { useColumns } from './hooks/useColumns'; +import { useColumnsCache } from './hooks/useColumnsCache'; +import { useMethods } from './hooks/useMethods'; +import { useDataSource } from './hooks/useDataSource'; +import { useDragSort } from './hooks/useDragSort'; +import { useRenderComponents } from './hooks/useRenderComponents'; +import { useFinallyProps } from './hooks/useFinallyProps'; +import { JVxeTableProps } from './types'; +import './style/index.less'; + +export default defineComponent({ + name: 'JVxeTable', + inheritAttrs: false, + props: vxeProps(), + emits: [...vxeEmits], + setup(props: JVxeTableProps, context) { + const instanceRef = ref(); + const refs = useRefs(); + const slots = useSlots(); + const data = useData(props); + const { methods, publicMethods, created } = useMethods(props, context, data, refs, instanceRef); + created(); + useColumns(props, data, methods, slots); + useDataSource(props, data, methods, refs); + useDragSort(props, methods); + // update-begin--author:liaozhiyang---date:20240321---for:【QQYUN-8566】JVXETable无法记住列设置 + const { initSetting } = useColumnsCache({ cacheColumnsKey: props.cacheColumnsKey }); + initSetting(props); + // update-end--author:liaozhiyang---date:20240321---for:【QQYUN-8566】JVXETable无法记住列设置 + // 最终传入到 template 里的 props + const finallyProps = useFinallyProps(props, data, methods); + // 渲染子组件 + const renderComponents = useRenderComponents(props, data, methods, slots); + return { + instanceRef, + ...refs, + ...publicMethods, + ...finallyProps, + ...renderComponents, + vxeDataSource: data.vxeDataSource, + }; + }, + render() { + return h( + 'div', + { + class: this.$attrs.class, + style: this.$attrs.style, + }, + h( + rc('a-spin'), + { + spinning: this.loading, + wrapperClassName: this.prefixCls, + }, + { + default: () => [ + this.renderSubPopover(), + this.renderToolbar(), + this.renderToolbarAfterSlot(), + h( + rc('vxe-grid'), + { + ...this.vxeProps, + data: this.vxeDataSource, + }, + this.$slots + ), + this.renderPagination(), + this.renderDetailsModal(), + ], + } + ) + ); + }, + created() { + this.instanceRef = this; + }, +}); diff --git a/src/components/jeecg/JVxeTable/src/componentMap.ts b/src/components/jeecg/JVxeTable/src/componentMap.ts new file mode 100644 index 0000000..87d992f --- /dev/null +++ b/src/components/jeecg/JVxeTable/src/componentMap.ts @@ -0,0 +1,108 @@ +import type { JVxeVueComponent } from './types'; +import { JVxeTypes } from './types/JVxeTypes'; + +import JVxeSlotCell from './components/cells/JVxeSlotCell'; +import JVxeNormalCell from './components/cells/JVxeNormalCell.vue'; +import JVxeDragSortCell from './components/cells/JVxeDragSortCell.vue'; + +import JVxeInputCell from './components/cells/JVxeInputCell.vue'; +import JVxeDateCell from './components/cells/JVxeDateCell.vue'; +import JVxeTimeCell from './components/cells/JVxeTimeCell.vue'; +import JVxeSelectCell from './components/cells/JVxeSelectCell.vue'; +import JVxeRadioCell from './components/cells/JVxeRadioCell.vue'; +import JVxeCheckboxCell from './components/cells/JVxeCheckboxCell.vue'; +import JVxeUploadCell from './components/cells/JVxeUploadCell.vue'; +// import { TagsInputCell, TagsSpanCell } from './components/cells/JVxeTagsCell.vue' +import JVxeProgressCell from './components/cells/JVxeProgressCell.vue'; +import JVxeTextareaCell from './components/cells/JVxeTextareaCell.vue'; +// import JVxeDepartSelectCell from './components/cells/JVxeDepartSelectCell.vue' +// import JVxeUserSelectCell from './components/cells/JVxeUserSelectCell.vue' + +let componentMap = new Map(); +// update-begin--author:liaozhiyang---date:20231208---for:【issues/860】生成的一对多代码,热更新之后点击新增卡死[暂时先解决] +const JVxeComponents = 'JVxeComponents__'; +if (import.meta.env.DEV && componentMap.size === 0 && window[JVxeComponents] && window[JVxeComponents].size > 0) { + componentMap = window[JVxeComponents]; +} +// update-end--author:liaozhiyang---date:20231027---for:【issues/860】生成的一对多代码,热更新之后点击新增卡死[暂时先解决] +/** span 组件结尾 */ +export const spanEnds: string = ':span'; + +/** 定义不能用于注册的关键字 */ +export const excludeKeywords: Array = [ + JVxeTypes.hidden, + JVxeTypes.rowNumber, + JVxeTypes.rowCheckbox, + JVxeTypes.rowRadio, + JVxeTypes.rowExpand, +]; + +/** + * 注册组件 + * + * @param type 组件 type + * @param component Vue组件 + * @param spanComponent 显示组件,可空,默认为 JVxeNormalCell 组件 + */ +export function addComponent(type: JVxeTypes, component: JVxeVueComponent, spanComponent?: JVxeVueComponent) { + if (excludeKeywords.includes(type)) { + throw new Error(`【addComponent】不能使用"${type}"作为组件的name,因为这是关键字。`); + } + if (componentMap.has(type)) { + throw new Error(`【addComponent】组件"${type}"已存在`); + } + componentMap.set(type, component); + if (spanComponent) { + componentMap.set(type + spanEnds, spanComponent); + } + // update-begin--author:liaozhiyang---date:20231208---for:【issues/860】生成的一对多代码,热更新之后点击新增卡死[暂时先解决] + import.meta.env.DEV && (window[JVxeComponents] = componentMap); + // update-end--author:liaozhiyang---date:20231208---for:【issues/860】生成的一对多代码,热更新之后点击新增卡死[暂时先解决] +} + +export function deleteComponent(type: JVxeTypes) { + componentMap.delete(type); + componentMap.delete(type + spanEnds); + // update-begin--author:liaozhiyang---date:20231208---for:【issues/860】生成的一对多代码,热更新之后点击新增卡死[暂时先解决] + import.meta.env.DEV && (window[JVxeComponents] = componentMap); + // update-end--author:liaozhiyang---date:20231208---for:【issues/860】生成的一对多代码,热更新之后点击新增卡死[暂时先解决] +} + +/** 定义内置自定义组件 */ +export function definedComponent() { + addComponent(JVxeTypes.slot, JVxeSlotCell); + addComponent(JVxeTypes.normal, JVxeNormalCell); + addComponent(JVxeTypes.rowDragSort, JVxeDragSortCell); + + addComponent(JVxeTypes.input, JVxeInputCell); + addComponent(JVxeTypes.inputNumber, JVxeInputCell); + addComponent(JVxeTypes.radio, JVxeRadioCell); + addComponent(JVxeTypes.checkbox, JVxeCheckboxCell); + addComponent(JVxeTypes.select, JVxeSelectCell); + addComponent(JVxeTypes.selectSearch, JVxeSelectCell); // 下拉搜索 + addComponent(JVxeTypes.selectMultiple, JVxeSelectCell); // 下拉多选 + addComponent(JVxeTypes.date, JVxeDateCell); + addComponent(JVxeTypes.datetime, JVxeDateCell); + addComponent(JVxeTypes.time, JVxeTimeCell); + addComponent(JVxeTypes.upload, JVxeUploadCell); + addComponent(JVxeTypes.textarea, JVxeTextareaCell); + + // addComponent(JVxeTypes.tags, TagsInputCell, TagsSpanCell) + addComponent(JVxeTypes.progress, JVxeProgressCell); + + // addComponent(JVxeTypes.departSelect, JVxeDepartSelectCell) + // addComponent(JVxeTypes.userSelect, JVxeUserSelectCell) +} + +/** + * 清空注册的组件 + */ +export function clearComponent() { + componentMap.clear(); + + // update-begin--author:liaozhiyang---date:20231208---for:【issues/860】生成的一对多代码,热更新之后点击新增卡死[暂时先解决] + import.meta.env.DEV && (window[JVxeComponents] = componentMap); + // update-end--author:liaozhiyang---date:20231208---for:【issues/860】生成的一对多代码,热更新之后点击新增卡死[暂时先解决] +} + +export { componentMap }; diff --git a/src/components/jeecg/JVxeTable/src/components/JVxeDetailsModal.vue b/src/components/jeecg/JVxeTable/src/components/JVxeDetailsModal.vue new file mode 100644 index 0000000..48d63d0 --- /dev/null +++ b/src/components/jeecg/JVxeTable/src/components/JVxeDetailsModal.vue @@ -0,0 +1,78 @@ + + + diff --git a/src/components/jeecg/JVxeTable/src/components/JVxeReloadEffect.ts b/src/components/jeecg/JVxeTable/src/components/JVxeReloadEffect.ts new file mode 100644 index 0000000..6c74134 --- /dev/null +++ b/src/components/jeecg/JVxeTable/src/components/JVxeReloadEffect.ts @@ -0,0 +1,93 @@ +import { defineComponent, h, ref, watch } from 'vue'; +import { randomString } from '/@/utils/common/compUtils'; +import '../style/reload-effect.less'; + +// 修改数据特效 +export default defineComponent({ + props: { + vNode: null, + // 是否启用特效 + effect: Boolean, + }, + emits: ['effectBegin', 'effectEnd'], + setup(props, { emit }) { + // vNode: null, + const innerEffect = ref(props.effect); + // 应付同时多个特效 + const effectIdx = ref(0); + const effectList = ref([]); + + watch( + () => props.effect, + () => (innerEffect.value = props.effect) + ); + watch( + () => props.vNode, + (_vNode, old) => { + if (props.effect && old != null) { + let topLayer = renderSpan(old, 'top'); + effectList.value.push(topLayer); + } + }, + { deep: true, immediate: true } + ); + + // 条件渲染内容 span + function renderVNode() { + if (props.vNode == null) { + return null; + } + let bottom = renderSpan(props.vNode, 'bottom'); + // 启用了特效,并且有旧数据,就渲染特效顶层 + if (innerEffect.value && effectList.value.length > 0) { + emit('effectBegin'); + // 1.4s 以后关闭特效 + window.setTimeout(() => { + let item = effectList.value[effectIdx.value]; + if (item && item.elm) { + // 特效结束后,展示先把 display 设为 none,而不是直接删掉该元素, + // 目的是为了防止页面重新渲染,导致动画重置 + item.elm.style.display = 'none'; + } + // 当所有的层级动画都结束时,再删掉所有元素 + if (++effectIdx.value === effectList.value.length) { + innerEffect.value = false; + effectIdx.value = 0; + effectList.value = []; + emit('effectEnd'); + } + }, 1400); + return [effectList.value, bottom]; + } else { + return bottom; + } + } + + // 渲染内容 span + function renderSpan(vNode, layer) { + let options = { + key: layer + effectIdx.value + randomString(6), + class: ['j-vxe-reload-effect-span', `layer-${layer}`], + style: {}, + // update-begin--author:liaozhiyang---date:20240424---for:【issues/1175】解决vxetable鼠标hover之后title显示不对的问题 + title: vNode, + // update-end--author:liaozhiyang---date:20240424---for:【issues/1175】解决vxetable鼠标hover之后title显示不对的问题 + + }; + if (layer === 'top') { + // 最新渲染的在下面 + options.style['z-index'] = 9999 - effectIdx.value; + } + return h('span', options, [vNode]); + } + + return () => + h( + 'div', + { + class: ['j-vxe-reload-effect-box'], + }, + [renderVNode()] + ); + }, +}); diff --git a/src/components/jeecg/JVxeTable/src/components/JVxeSubPopover.vue b/src/components/jeecg/JVxeTable/src/components/JVxeSubPopover.vue new file mode 100644 index 0000000..497dca2 --- /dev/null +++ b/src/components/jeecg/JVxeTable/src/components/JVxeSubPopover.vue @@ -0,0 +1,207 @@ + + + + diff --git a/src/components/jeecg/JVxeTable/src/components/JVxeToolbar.vue b/src/components/jeecg/JVxeTable/src/components/JVxeToolbar.vue new file mode 100644 index 0000000..043d3bf --- /dev/null +++ b/src/components/jeecg/JVxeTable/src/components/JVxeToolbar.vue @@ -0,0 +1,145 @@ + + + diff --git a/src/components/jeecg/JVxeTable/src/components/cells/JVxeCheckboxCell.vue b/src/components/jeecg/JVxeTable/src/components/cells/JVxeCheckboxCell.vue new file mode 100644 index 0000000..2d1327d --- /dev/null +++ b/src/components/jeecg/JVxeTable/src/components/cells/JVxeCheckboxCell.vue @@ -0,0 +1,116 @@ + + + + + diff --git a/src/components/jeecg/JVxeTable/src/components/cells/JVxeDateCell.vue b/src/components/jeecg/JVxeTable/src/components/cells/JVxeDateCell.vue new file mode 100644 index 0000000..59adf15 --- /dev/null +++ b/src/components/jeecg/JVxeTable/src/components/cells/JVxeDateCell.vue @@ -0,0 +1,94 @@ + + + diff --git a/src/components/jeecg/JVxeTable/src/components/cells/JVxeDragSortCell.vue b/src/components/jeecg/JVxeTable/src/components/cells/JVxeDragSortCell.vue new file mode 100644 index 0000000..3a91185 --- /dev/null +++ b/src/components/jeecg/JVxeTable/src/components/cells/JVxeDragSortCell.vue @@ -0,0 +1,123 @@ + + + + + + diff --git a/src/components/jeecg/JVxeTable/src/components/cells/JVxeInputCell.vue b/src/components/jeecg/JVxeTable/src/components/cells/JVxeInputCell.vue new file mode 100644 index 0000000..ca474f8 --- /dev/null +++ b/src/components/jeecg/JVxeTable/src/components/cells/JVxeInputCell.vue @@ -0,0 +1,92 @@ + + + diff --git a/src/components/jeecg/JVxeTable/src/components/cells/JVxeNormalCell.vue b/src/components/jeecg/JVxeTable/src/components/cells/JVxeNormalCell.vue new file mode 100644 index 0000000..2ed7073 --- /dev/null +++ b/src/components/jeecg/JVxeTable/src/components/cells/JVxeNormalCell.vue @@ -0,0 +1,53 @@ + + + + + diff --git a/src/components/jeecg/JVxeTable/src/components/cells/JVxeProgressCell.vue b/src/components/jeecg/JVxeTable/src/components/cells/JVxeProgressCell.vue new file mode 100644 index 0000000..39a3a56 --- /dev/null +++ b/src/components/jeecg/JVxeTable/src/components/cells/JVxeProgressCell.vue @@ -0,0 +1,52 @@ + + + + + diff --git a/src/components/jeecg/JVxeTable/src/components/cells/JVxeRadioCell.vue b/src/components/jeecg/JVxeTable/src/components/cells/JVxeRadioCell.vue new file mode 100644 index 0000000..503adf5 --- /dev/null +++ b/src/components/jeecg/JVxeTable/src/components/cells/JVxeRadioCell.vue @@ -0,0 +1,60 @@ + + + + + diff --git a/src/components/jeecg/JVxeTable/src/components/cells/JVxeSelectCell.vue b/src/components/jeecg/JVxeTable/src/components/cells/JVxeSelectCell.vue new file mode 100644 index 0000000..ab8614e --- /dev/null +++ b/src/components/jeecg/JVxeTable/src/components/cells/JVxeSelectCell.vue @@ -0,0 +1,240 @@ + + + diff --git a/src/components/jeecg/JVxeTable/src/components/cells/JVxeSlotCell.ts b/src/components/jeecg/JVxeTable/src/components/cells/JVxeSlotCell.ts new file mode 100644 index 0000000..35fcb9f --- /dev/null +++ b/src/components/jeecg/JVxeTable/src/components/cells/JVxeSlotCell.ts @@ -0,0 +1,41 @@ +import { computed, defineComponent, h } from 'vue'; +import { useJVxeComponent, useJVxeCompProps } from '/@/components/jeecg/JVxeTable/src/hooks/useJVxeComponent'; +import { JVxeComponent } from '/@/components/jeecg/JVxeTable/src/types/JVxeComponent'; + +export default defineComponent({ + name: 'JVxeSlotCell', + props: useJVxeCompProps(), + setup(props: JVxeComponent.Props) { + const data = useJVxeComponent(props); + const slotProps = computed(() => { + return { + value: data.innerValue.value, + row: data.row.value, + column: data.originColumn.value, + params: props.params, + $table: props.params.$table, + rowId: props.params.rowid, + index: props.params.rowIndex, + rowIndex: props.params.rowIndex, + columnIndex: props.params.columnIndex, + scrolling: props.renderOptions.scrolling, + reloadEffect: props.renderOptions.reloadEffect.enabled, + triggerChange: (v) => data.handleChangeCommon(v), + }; + }); + return () => { + let { slot } = props.renderOptions; + if (slot) { + return h('div', {}, slot(slotProps.value)); + } else { + return h('div'); + } + }; + }, + // 【组件增强】注释详见:JVxeComponent.Enhanced + enhanced: { + switches: { + editRender: false, + }, + } as JVxeComponent.EnhancedPartial, +}); diff --git a/src/components/jeecg/JVxeTable/src/components/cells/JVxeTextareaCell.vue b/src/components/jeecg/JVxeTable/src/components/cells/JVxeTextareaCell.vue new file mode 100644 index 0000000..fa892ef --- /dev/null +++ b/src/components/jeecg/JVxeTable/src/components/cells/JVxeTextareaCell.vue @@ -0,0 +1,57 @@ + + + diff --git a/src/components/jeecg/JVxeTable/src/components/cells/JVxeTimeCell.vue b/src/components/jeecg/JVxeTable/src/components/cells/JVxeTimeCell.vue new file mode 100644 index 0000000..feb0cbb --- /dev/null +++ b/src/components/jeecg/JVxeTable/src/components/cells/JVxeTimeCell.vue @@ -0,0 +1,64 @@ + + + diff --git a/src/components/jeecg/JVxeTable/src/components/cells/JVxeUploadCell.vue b/src/components/jeecg/JVxeTable/src/components/cells/JVxeUploadCell.vue new file mode 100644 index 0000000..f9d73ec --- /dev/null +++ b/src/components/jeecg/JVxeTable/src/components/cells/JVxeUploadCell.vue @@ -0,0 +1,77 @@ + + + diff --git a/src/components/jeecg/JVxeTable/src/hooks/cells/useJVxeUploadCell.ts b/src/components/jeecg/JVxeTable/src/hooks/cells/useJVxeUploadCell.ts new file mode 100644 index 0000000..c3a7979 --- /dev/null +++ b/src/components/jeecg/JVxeTable/src/hooks/cells/useJVxeUploadCell.ts @@ -0,0 +1,139 @@ +import { ref, computed, watch } from 'vue'; + +import {getTenantId, getToken} from '/@/utils/auth'; +import { getFileAccessHttpUrl } from '/@/utils/common/compUtils'; +import { JVxeComponent } from '../../types/JVxeComponent'; +import { useJVxeComponent } from '../useJVxeComponent'; + +/** + * use 公共上传组件 + * @param props + * @param options 组件选项,token:默认是否传递token,action:默认上传路径,multiple:是否允许多文件 + */ +export function useJVxeUploadCell(props: JVxeComponent.Props, options?) { + const setup = useJVxeComponent(props); + const { innerValue, originColumn, handleChangeCommon } = setup; + + const innerFile = ref(null); + + /** upload headers */ + const uploadHeaders = computed(() => { + let headers = {}; + if ((originColumn.value.token ?? options?.token ?? false) === true) { + headers['X-Access-Token'] = getToken(); + } + let tenantId = getTenantId(); + headers['X-Tenant-Id'] = tenantId ? tenantId : '0'; + return headers; + }); + + /** 上传请求地址 */ + const uploadAction = computed(() => { + if (!originColumn.value.action) { + return options?.action ?? ''; + } else { + return originColumn.value.action; + } + }); + const hasFile = computed(() => innerFile.value != null); + const responseName = computed(() => originColumn.value.responseName ?? 'message'); + + watch( + innerValue, + (val) => { + if (val) { + innerFile.value = val; + } else { + innerFile.value = null; + } + }, + { immediate: true } + ); + + function handleChangeUpload(info) { + let { file } = info; + let value = { + name: file.name, + type: file.type, + size: file.size, + status: file.status, + percent: file.percent, + path: innerFile.value?.path ?? '', + }; + if (file.response) { + value['responseName'] = file.response[responseName.value]; + } + let paths: string[] = []; + if (options?.multiple && innerFile.value && innerFile.value.path) { + paths = innerFile.value.path.split(','); + } + if (file.status === 'done') { + if (typeof file.response.success === 'boolean') { + if (file.response.success) { + paths.push(file.response[responseName.value]); + value['path'] = paths.join(','); + handleChangeCommon(value); + } else { + value['status'] = 'error'; + value['message'] = file.response.message || '未知错误'; + } + } else { + // 考虑到如果设置action上传路径为非jeecg-boot后台,可能不会返回 success 属性的情况,就默认为成功 + paths.push(file.response[responseName.value]); + value['path'] = paths.join(','); + handleChangeCommon(value); + } + } else if (file.status === 'error') { + value['message'] = file.response.message || '未知错误'; + } + innerFile.value = value; + } + + function handleClickDownloadFile() { + let { url, path } = innerFile.value || {}; + if (!url || url.length === 0) { + if (path && path.length > 0) { + url = getFileAccessHttpUrl(path.split(',')[0]); + } + } + if (url) { + window.open(url); + } + } + + function handleClickDeleteFile() { + handleChangeCommon(null); + } + + return { + ...setup, + innerFile, + uploadAction, + uploadHeaders, + hasFile, + responseName, + handleChangeUpload, + handleClickDownloadFile, + handleClickDeleteFile, + }; +} + +export function fileGetValue(value) { + if (value && value.path) { + return value.path; + } + return value; +} + +export function fileSetValue(value) { + if (value) { + let first = value.split(',')[0]; + let name = first.substring(first.lastIndexOf('/') + 1); + return { + name: name, + path: value, + status: 'done', + }; + } + return value; +} diff --git a/src/components/jeecg/JVxeTable/src/hooks/useColumns.ts b/src/components/jeecg/JVxeTable/src/hooks/useColumns.ts new file mode 100644 index 0000000..75af95a --- /dev/null +++ b/src/components/jeecg/JVxeTable/src/hooks/useColumns.ts @@ -0,0 +1,444 @@ +import type { JVxeColumn, JVxeDataProps, JVxeTableProps } from '../types'; +import { computed, nextTick, toRaw } from 'vue'; +import { isArray, isEmpty, isPromise } from '/@/utils/is'; +import { cloneDeep } from 'lodash-es'; +import { JVxeTypePrefix, JVxeTypes } from '../types/JVxeTypes'; +import { initDictOptions } from '/@/utils/dict'; +import { pushIfNotExist } from '/@/utils/common/compUtils'; +import { getEnhanced } from '../utils/enhancedUtils'; +import { isRegistered } from '../utils/registerUtils'; +import { JVxeComponent } from '../types/JVxeComponent'; +import { useValidateRules } from './useValidateRules'; +import { JVxeTableMethods } from '../types'; + +// handle 方法参数 +export interface HandleArgs { + props: JVxeTableProps; + slots: any; + data: JVxeDataProps; + methods: JVxeTableMethods; + col?: JVxeColumn; + columns: JVxeColumn[]; + renderOptions?: any; + enhanced?: JVxeComponent.Enhanced; +} + +export function useColumns(props: JVxeTableProps, data: JVxeDataProps, methods: JVxeTableMethods, slots) { + data.vxeColumns = computed(() => { + // update-begin--author:liaozhiyang---date:20250403---for:【issues/7812】linkageConfig改变了,vxetable没更新 + // linkageConfig变化时也需要执行 + const linkageConfig = toRaw(props.linkageConfig); + if (linkageConfig) { + // console.log(linkageConfig); + } + // update-end--author:liaozhiyang---date:20250403---for:【issues/7812】linkageConfig改变了,vxetable没更新 + let columns: JVxeColumn[] = []; + if (isArray(props.columns)) { + // handle 方法参数 + const args: HandleArgs = { props, slots, data, methods, columns }; + let seqColumn, selectionColumn, expandColumn, dragSortColumn; + + const handleColumn = (column: JVxeColumn, container: JVxeColumn[]) => { + // 排除未授权的列 1 = 显示/隐藏; 2 = 禁用 + let auth = methods.getColAuth(column.key); + if (auth?.type == '1' && !auth.isAuth) { + return; + } else if (auth?.type == '2' && !auth.isAuth) { + column.disabled = true; + } + // type 不填,默认为 normal + if (column.type == null || isEmpty(column.type)) { + column.type = JVxeTypes.normal; + } + let col: JVxeColumn = cloneDeep(column); + // 处理隐藏列 + if (col.type === JVxeTypes.hidden) { + return handleInnerColumn(args, col, handleHiddenColumn); + } + // 处理子级列 + // 判断是否是分组列,如果当前是父级,则无需处理 render + if (Array.isArray(col.children) && col.children.length > 0) { + const children: JVxeColumn[] = []; + col.children.forEach((child: JVxeColumn) => handleColumn(child, children)); + col.children = children; + container.push(col); + return; + } + // 组件未注册,自动设置为 normal + if (!isRegistered(col.type)) { + col.type = JVxeTypes.normal; + } + args.enhanced = getEnhanced(col.type); + args.col = col; + args.renderOptions = { + bordered: props.bordered, + disabled: props.disabled, + scrolling: data.scrolling, + isDisabledRow: methods.isDisabledRow, + listeners: { + trigger: (name, event) => methods.trigger(name, event), + valueChange: (event) => methods.trigger('valueChange', event), + /** 重新排序行 */ + rowResort: (event) => { + methods.doSort(event.oldIndex, event.newIndex); + methods.trigger('dragged', event); + }, + /** 在当前行下面插入一行 */ + rowInsertDown: (rowIndex) => methods.insertRows({}, rowIndex + 1), + }, + }; + if (col.type === JVxeTypes.rowNumber) { + seqColumn = col; + container.push(col); + } else if (col.type === JVxeTypes.rowRadio || col.type === JVxeTypes.rowCheckbox) { + selectionColumn = col; + container.push(col); + } else if (col.type === JVxeTypes.rowExpand) { + expandColumn = col; + container.push(col); + } else if (col.type === JVxeTypes.rowDragSort) { + dragSortColumn = col; + container.push(col); + } else { + col.params = column; + args.columns = container; + handlerCol(args); + } + } + + props.columns.forEach((column: JVxeColumn) => handleColumn(column, columns)); + + handleInnerColumn(args, seqColumn, handleSeqColumn); + handleInnerColumn(args, selectionColumn, handleSelectionColumn); + handleInnerColumn(args, expandColumn, handleExpandColumn); + handleInnerColumn(args, dragSortColumn, handleDragSortColumn, true); + // update-begin--author:liaozhiyang---date:2024-05-30---for【TV360X-371】不可编辑组件必填缺少*号 + customComponentAddStar(columns); + // update-end--author:liaozhiyang---date:2024-05-30---for:【TV360X-371】不可编辑组件必填缺少*号 + } + return columns; + }); +} + +/** + * 2024-05-30 + * liaozhiyang + * 不可编辑组件必填通过title人为加*号 + */ +function customComponentAddStar(columns) { + columns.forEach((column) => { + const { params } = column; + if (params) { + const { validateRules, type } = params; + if ( + validateRules?.length && + [ + JVxeTypes.checkbox, + JVxeTypes.radio, + JVxeTypes.upload, + JVxeTypes.progress, + JVxeTypes.departSelect, + JVxeTypes.userSelect, + JVxeTypes.image, + JVxeTypes.file, + ].includes(type) + ) { + if (validateRules.find((item) => item.required)) { + column.title = ` * ${column.title}`; + } + } + } + }); +} + +/** 处理内置列 */ +function handleInnerColumn(args: HandleArgs, col: JVxeColumn, handler: (args: HandleArgs) => void, assign?: boolean) { + let renderOptions = col?.editRender || col?.cellRender; + return handler({ + ...args, + col: col, + renderOptions: assign ? Object.assign({}, args.renderOptions, renderOptions) : renderOptions, + }); +} + +/** + * 处理隐藏列 + */ +function handleHiddenColumn({ col, columns }: HandleArgs) { + col!.params = cloneDeep(col); + delete col!.type; + col!.field = col!.key; + col!.visible = false; + columns.push(col!); +} + +/** + * 处理行号列 + */ +function handleSeqColumn({ props, col, columns }: HandleArgs) { + // 判断是否开启了行号列 + if (props.rowNumber) { + let column = { + type: 'seq', + title: '#', + width: 60, + // 【QQYUN-8405】 + fixed: props.rowNumberFixed, + align: 'center', + }; + // update-begin--author:liaozhiyang---date:20240306---for:【QQYUN-8405】vxetable支持序号是否固定(移动端需要) + if (props.rowNumberFixed === 'none') { + delete column.fixed; + } + // update-end--author:liaozhiyang---date:20240306---for:QQYUN-8405】vxetable支持序号是否固定(移动端需要) + if (col) { + Object.assign(col, column); + } else { + columns.unshift(column as any); + } + } +} + +/** + * 处理可选择列 + */ +function handleSelectionColumn({ props, data, col, columns }: HandleArgs) { + // 判断是否开启了可选择行 + // -update-begin--author:liaozhiyang---date:20240617---for:【TV360X-1002】详情页面行编辑不显示checkbox + if (props.rowSelection && props.disabled == false) { + // -update-end--author:liaozhiyang---date:20240617---for:【TV360X-1002】详情页面行编辑不显示checkbox + let width = 45; + if (data.statistics.has && !props.rowExpand && !props.dragSort) { + width = 60; + } + let column: any = { + type: props.rowSelectionType, + width: width, + fixed: 'left', + align: 'center', + }; + // update-begin--author:liaozhiyang---date:20240509---for:【issues/1162】JVxeTable列过长(出现横向滚动条)时无法拖拽排序 + if (props.rowSelectionFixed === 'none') { + delete column.fixed; + } + // update-end--author:liaozhiyang---date:20240509---for:【issues/1162】JVxeTable列过长(出现横向滚动条)时无法拖拽排序 + if (col) { + Object.assign(col, column); + } else { + columns.unshift(column as any); + } + } +} + +/** + * 处理可展开行 + */ +function handleExpandColumn({ props, data, col, columns }: HandleArgs) { + // 是否可展开行 + if (props.rowExpand) { + let width = 40; + if (data.statistics.has && !props.dragSort) { + width = 60; + } + let column = { + type: 'expand', + title: '', + width: width, + fixed: 'left', + align: 'center', + slots: { content: 'expandContent' }, + }; + if (col) { + Object.assign(col, column); + } else { + columns.unshift(column as any); + } + } +} + +/** 处理可排序列 */ +function handleDragSortColumn({ props, data, col, columns, renderOptions }: HandleArgs) { + // 是否可拖动排序 + if (props.dragSort) { + let width = 40; + if (data.statistics.has) { + width = 60; + } + let column: any = { + title: '', + width: width, + fixed: 'left', + align: 'center', + // update-begin--author:liaozhiyang---date:20240417---for:【QQYUN-8785】online表单列位置的id未做限制,拖动其他列到id列上面,同步数据库时报错 + params: { + insertRow: props.insertRow, + notAllowDrag: props.notAllowDrag, + ...col?.params, + }, + // update-end--author:liaozhiyang---date:20240417---for:【QQYUN-8785】online表单列位置的id未做限制,拖动其他列到id列上面,同步数据库时报错 + }; + // update-begin--author:liaozhiyang---date:20240506---for:【issues/1162】JVxeTable列过长(出现横向滚动条)时无法拖拽排序 + if (props.dragSortFixed === 'none') { + delete column.fixed; + } + // update-end--author:liaozhiyang---date:20240506---for:【issues/1162】JVxeTable列过长(出现横向滚动条)时无法拖拽排序 + let cellRender = { + name: JVxeTypePrefix + JVxeTypes.rowDragSort, + sortKey: props.sortKey, + }; + if (renderOptions) { + column.cellRender = Object.assign(renderOptions, cellRender); + } else { + column.cellRender = cellRender; + } + if (col) { + Object.assign(col, column); + } else { + columns.unshift(column); + } + } +} + +/** 处理自定义组件列 */ +function handlerCol(args: HandleArgs) { + const { props, col, columns, enhanced } = args; + if (!col) return; + let { type } = col; + col.field = col.key; + delete col.type; + let renderName = 'cellRender'; + // 渲染选项 + let $renderOptions: any = { name: JVxeTypePrefix + type }; + if (enhanced?.switches.editRender) { + if (!(enhanced.switches.visible || props.alwaysEdit)) { + renderName = 'editRender'; + } + // $renderOptions.type = (enhanced.switches.visible || props.alwaysEdit) ? 'visible' : 'default' + } + col[renderName] = $renderOptions; + // update-begin--author:liaozhiyang---date:20240321---for:【QQYUN-5806】js增强改变下拉搜索options(添加customOptions为true不读字典,走自己的options) + !col.params.customOptions && handleDict(args); + // update-end--author:liaozhiyang---date:20240321---for:【QQYUN-5806】js增强改变下拉搜索options(添加customOptions为true不读字典,走自己的options) + handleRules(args); + handleStatistics(args); + handleSlots(args); + handleLinkage(args); + handleReloadEffect(args); + + if (col.editRender) { + Object.assign(col.editRender, args.renderOptions); + } + if (col.cellRender) { + Object.assign(col.cellRender, args.renderOptions); + } + + columns.push(col); +} + +/** + * 处理字典 + */ +async function handleDict({ col, methods }: HandleArgs) { + if (col && col.params.dictCode) { + /** 加载数据字典并合并到 options */ + try { + // 查询字典 + if (!isPromise(col.params.optionsPromise)) { + col.params.optionsPromise = new Promise(async (resolve) => { + //update-begin-author:taoyan date:2022-6-1 for: VUEN-1180 【代码生成】子表不支持带条件? + let dictCodeString = col.params.dictCode; + if (dictCodeString) { + dictCodeString = encodeURI(dictCodeString); + } + const dictOptions: any = await initDictOptions(dictCodeString); + //update-end-author:taoyan date:2022-6-1 for: VUEN-1180 【代码生成】子表不支持带条件? + let options = col.params.options ?? []; + dictOptions.forEach((dict) => { + // 过滤重复数据 + if (options.findIndex((o) => o.value === dict.value) === -1) { + options.push(dict); + } + }); + resolve(options); + }); + } + col.params.options = await col.params.optionsPromise; + await nextTick(); + await methods.getXTable().updateData(); + } catch (e) { + console.group(`[JVxeTable] 查询字典 "${col.params.dictCode}" 时发生异常!`); + console.warn(e); + console.groupEnd(); + } + } +} + +/** + * 处理校验 + */ +function handleRules(args: HandleArgs) { + if (isArray(args.col?.validateRules)) { + useValidateRules(args); + } +} + +/** + * 处理统计列 + */ +function handleStatistics({ col, data }: HandleArgs) { + // sum = 求和、average = 平均值 + if (col && isArray(col.statistics)) { + data.statistics.has = true; + col.statistics.forEach((item) => { + if (!isEmpty(item)) { + let arr = data.statistics[(item as string).toLowerCase()]; + if (isArray(arr)) { + pushIfNotExist(arr, col.key); + } + } + }); + } +} + +/** + * 处理插槽 + */ +function handleSlots({ slots, col, renderOptions }: HandleArgs) { + // slot 组件特殊处理 + if (col && col.params.type === JVxeTypes.slot) { + if (!isEmpty(col.slotName) && slots.hasOwnProperty(col.slotName)) { + renderOptions.slot = slots[col.slotName]; + } + } +} + +/** 处理联动列 */ +function handleLinkage({ data, col, renderOptions, methods }: HandleArgs) { + // 处理联动列,联动列只能作用于 select 组件 + if (col && col.params.type === JVxeTypes.select && data.innerLinkageConfig != null) { + // 判断当前列是否是联动列 + if (data.innerLinkageConfig.has(col.key)) { + renderOptions.linkage = { + config: data.innerLinkageConfig.get(col.key), + getLinkageOptionsAsync: methods.getLinkageOptionsAsync, + getLinkageOptionsSibling: methods.getLinkageOptionsSibling, + handleLinkageSelectChange: methods.handleLinkageSelectChange, + }; + } + } +} + +function handleReloadEffect({ props, data, renderOptions }: HandleArgs) { + renderOptions.reloadEffect = { + enabled: props.reloadEffect, + getMap() { + return data.reloadEffectRowKeysMap; + }, + isEffect(rowId) { + return data.reloadEffectRowKeysMap[rowId] === true; + }, + removeEffect(rowId) { + return (data.reloadEffectRowKeysMap[rowId] = false); + }, + }; +} diff --git a/src/components/jeecg/JVxeTable/src/hooks/useColumnsCache.ts b/src/components/jeecg/JVxeTable/src/hooks/useColumnsCache.ts new file mode 100644 index 0000000..1f5a761 --- /dev/null +++ b/src/components/jeecg/JVxeTable/src/hooks/useColumnsCache.ts @@ -0,0 +1,105 @@ +import { computed } from 'vue'; +import { router } from '/@/router'; +import { createLocalStorage } from '/@/utils/cache'; +import { useMessage } from '/@/hooks/web/useMessage'; + +export function useColumnsCache({ cacheColumnsKey, refs }: any) { + const $ls = createLocalStorage(); + const { createMessage: $message } = useMessage(); + const cacheKey = computed(() => { + const path = router.currentRoute.value.fullPath; + let key = path.replace(/[\/\\]/g, '_'); + if (cacheColumnsKey) { + key += ':' + cacheColumnsKey; + } + return 'vxe-columnCache:' + key; + }); + const initSetting = (props) => { + const columnCache = $ls.get(cacheKey.value); + if (columnCache) { + columnCache.forEach((key) => { + const column = props.columns.find((item) => item.key === key); + if (column) { + column.visible = false; + } + }); + } + }; + // const initSetting = (refs) => { + // let columnCache = $ls.get(cacheKey.value); + // if (columnCache) { + // const $grid = refs.gridRef.value!.getRefMaps().refTable.value; + // console.log('refs.gridRef', $grid); + // const { fullColumn } = $grid.getTableColumn(); + // const hideColumns = getHideColumn(fullColumn, columnCache); + // if (hideColumns?.length) { + // hideColumns.forEach((column) => { + // $grid.hideColumn(column); + // }); + // } + // } + // console.log(columnCache); + // }; + function saveSetting($grid: any) { + console.log($grid); + const { fullColumn, visibleColumn } = $grid.getTableColumn(); + const hideColumnKey = getHideColumnKey(fullColumn, visibleColumn); + if (hideColumnKey.length) { + $ls.set(cacheKey.value, hideColumnKey); + $message.success('保存成功'); + } + } + const resetSetting = ($grid) => { + const columnCache = $ls.get(cacheKey.value); + if (columnCache) { + const { fullColumn } = $grid.getTableColumn(); + const hideColumns = getHideColumn(fullColumn, columnCache); + if (hideColumns?.length) { + hideColumns.forEach((column) => { + if (columnCache.includes(column?.params?.key)) { + $grid.showColumn(column); + } + }); + } + } + $ls.remove(cacheKey.value); + $message.success('重置成功'); + }; + const getHideColumn = (fullColumn, columnCache) => { + const result: any = []; + if (columnCache?.length) { + console.log('--fullColumn:',fullColumn); + columnCache.forEach((key) => { + const column = fullColumn.find((item) => item?.params?.key === key); + if (column) { + result.push(column); + } + }); + } + return result; + }; + const getHideColumnKey = (fullColumn, visibleColumn) => { + const reuslt: any = []; + if (fullColumn.length === visibleColumn.length) { + return reuslt; + } else { + fullColumn.forEach((item) => { + const fKey = item?.params?.key; + if (fKey) { + const vItem = visibleColumn.find((item) => { + return item?.params?.key === fKey; + }); + if (!vItem) { + reuslt.push(fKey); + } + } + }); + return reuslt; + } + }; + return { + initSetting, + resetSetting, + saveSetting, + }; +} diff --git a/src/components/jeecg/JVxeTable/src/hooks/useData.ts b/src/components/jeecg/JVxeTable/src/hooks/useData.ts new file mode 100644 index 0000000..38f3f29 --- /dev/null +++ b/src/components/jeecg/JVxeTable/src/hooks/useData.ts @@ -0,0 +1,103 @@ +import { ref, reactive, provide, resolveComponent } from 'vue'; +import { useDesign } from '/@/hooks/web/useDesign'; +import { JVxeDataProps, JVxeRefs, JVxeTableProps } from '../types'; +import { VxeGridInstance } from 'vxe-table'; +import { randomString } from '/@/utils/common/compUtils'; + +export function useData(props: JVxeTableProps): JVxeDataProps { + const { prefixCls } = useDesign('j-vxe-table'); + provide('prefixCls', prefixCls); + return { + prefixCls: prefixCls, + caseId: `j-vxe-${randomString(8)}`, + vxeDataSource: ref([]), + scroll: reactive({ top: 0, left: 0 }), + scrolling: ref(false), + defaultVxeProps: reactive({ + // update-begin--author:liaozhiyang---date:20240607---for:【TV360X-327】vxetable警告 + // rowId: props.rowKey, + rowConfig: { + keyField: props.rowKey, + // 高亮hover的行 + isHover: true, + }, + // update-end--author:liaozhiyang---date:20240607---for:【TV360X-327】vxetable警告 + + // --- 【issues/209】自带的tooltip会错位,所以替换成原生的title --- + // 溢出隐藏并显示tooltip + showOverflow: "title", + // 表头溢出隐藏并显示tooltip + showHeaderOverflow: "title", + // --- 【issues/209】自带的tooltip会错位,所以替换成原生的title --- + + showFooterOverflow: true, + // 可编辑配置 + editConfig: { + trigger: 'click', + mode: 'cell', + // update-begin--author:liaozhiyang---date:20231013---for:【QQYUN-5133】JVxeTable 行编辑升级 + //activeMethod: () => !props.disabled, + beforeEditMethod: () => !props.disabled, + // update-end--author:liaozhiyang---date:20231013---for:【QQYUN-5133】JVxeTable 行编辑升级 + }, + expandConfig: { + iconClose: 'vxe-icon-arrow-right', + iconOpen: 'vxe-icon-arrow-down', + ...props.expandConfig, + }, + // 虚拟滚动配置,y轴大于xx条数据时启用虚拟滚动 + scrollY: { + gt: 30, + }, + scrollX: { + gt: 20, + // 暂时关闭左右虚拟滚动 + enabled: false, + }, + radioConfig: { highlight: true }, + checkboxConfig: { highlight: true }, + mouseConfig: { selected: false }, + keyboardConfig: { + // 删除键功能 + isDel: false, + // Esc键关闭编辑功能 + isEsc: true, + // Tab 键功能 + isTab: true, + // 任意键进入编辑(功能键除外) + isEdit: true, + // 方向键功能 + isArrow: true, + // 回车键功能 + isEnter: true, + // 如果功能被支持,用于 column.type=checkbox|radio,开启空格键切换复选框或单选框状态功能 + isChecked: true, + }, + }), + selectedRows: ref([]), + selectedRowIds: ref([]), + disabledRowIds: [], + statistics: reactive({ + has: false, + sum: [], + average: [], + }), + authsMap: ref(null), + innerEditRules: {}, + innerLinkageConfig: new Map(), + reloadEffectRowKeysMap: reactive({}), + }; +} + +export function useRefs(): JVxeRefs { + return { + gridRef: ref(), + subPopoverRef: ref(), + detailsModalRef: ref(), + }; +} + +export function useResolveComponent(...t: any[]): any { + // @ts-ignore + return resolveComponent(...t); +} diff --git a/src/components/jeecg/JVxeTable/src/hooks/useDataSource.ts b/src/components/jeecg/JVxeTable/src/hooks/useDataSource.ts new file mode 100644 index 0000000..3810e53 --- /dev/null +++ b/src/components/jeecg/JVxeTable/src/hooks/useDataSource.ts @@ -0,0 +1,36 @@ +import { nextTick, watch } from 'vue'; +import { JVxeDataProps, JVxeRefs, JVxeTableMethods } from '../types'; +import { cloneDeep } from 'lodash-es'; + +export function useDataSource(props, data: JVxeDataProps, methods: JVxeTableMethods, refs: JVxeRefs) { + watch( + () => props.dataSource, + async () => { + data.disabledRowIds = []; + data.vxeDataSource.value = cloneDeep(props.dataSource); + data.vxeDataSource.value.forEach((row, rowIndex) => { + // 判断是否是禁用行 + if (methods.isDisabledRow(row, rowIndex)) { + data.disabledRowIds.push(row.id); + } + // 处理联动回显数据 + methods.handleLinkageBackData(row); + }); + await waitRef(refs.gridRef); + methods.recalcSortNumber(); + }, + { immediate: true } + ); +} + +function waitRef($ref) { + return new Promise((resolve) => { + (function next() { + if ($ref.value) { + resolve($ref); + } else { + nextTick(() => next()); + } + })(); + }); +} diff --git a/src/components/jeecg/JVxeTable/src/hooks/useDragSort.ts b/src/components/jeecg/JVxeTable/src/hooks/useDragSort.ts new file mode 100644 index 0000000..59af3a2 --- /dev/null +++ b/src/components/jeecg/JVxeTable/src/hooks/useDragSort.ts @@ -0,0 +1,118 @@ +import { onMounted, onUnmounted, nextTick } from 'vue'; +import { JVxeTableMethods, JVxeTableProps } from '/@/components/jeecg/JVxeTable/src/types'; +import Sortable from 'sortablejs'; +import { isEnabledVirtualYScroll } from '/@/components/jeecg/JVxeTable/utils'; + +export function useDragSort(props: JVxeTableProps, methods: JVxeTableMethods) { + if (props.dragSort) { + let sortable2: Sortable; + let initTime: any; + + onMounted(() => { + // 加载完成之后再绑定拖动事件 + initTime = setTimeout(createSortable, 300); + }); + + onUnmounted(() => { + clearTimeout(initTime); + if (sortable2) { + sortable2.destroy(); + } + }); + + function createSortable() { + let xTable = methods.getXTable(); + // let dom = xTable.$el.querySelector('.vxe-table--fixed-wrapper .vxe-table--body tbody') + // let dom = xTable.$el.querySelector('.body--wrapper>.vxe-table--body tbody'); + let dom = xTable.$el.querySelector('.vxe-table--body-inner-wrapper > .vxe-table--body tbody'); + if (!dom) { + console.warn('[JVxeTable] 拖拽排序初始化失败,可能是vxe-table升级导致的版本不兼容。'); + return; + } + let startChildren = []; + sortable2 = Sortable.create(dom as HTMLElement, { + handle: '.drag-btn', + // update-begin--author:liaozhiyang---date:20240417---for:【QQYUN-8785】online表单列位置的id未做限制,拖动其他列到id列上面,同步数据库时报错 + filter: '.not-allow-drag', + draggable: ".allow-drag", + // update-end--author:liaozhiyang---date:20240417---for:【QQYUN-8785】online表单列位置的id未做限制,拖动其他列到id列上面,同步数据库时报错 + direction: 'vertical', + animation: 300, + onStart(e) { + let from = e.from; + // @ts-ignore + startChildren = [...from.children]; + }, + onEnd(e: any) { + // -update-begin--author:liaozhiyang---date:20240619---for:【TV360X-585】拖动字段虚拟滚动不好使 + const isRealEnabledVirtual = isEnabledVirtualYScroll(props, xTable); + let newIndex; + let oldIndex; + // 滚动排序需要区分当前行编辑是否启动了虚拟滚动(底层loadData方法对是否真实开启了虚拟滚动处理不一样导致需要区分) + if (isRealEnabledVirtual) { + // e.clone的元素才是真实拖动的元素(虚拟滚动也不会变) + const dragNode = e.clone; + const dragRowInfo = xTable.getRowNode(dragNode); + // e.item的元素只有没虚拟滚动时才是拖动的元素(如果虚拟滚动了则会变) + const itemNode = e.item; + const itemRowInfo = xTable.getRowNode(itemNode); + // e.newIndex是当前可视区内元素的索引(不是数据实际的索引)、e.oldIndex 是拖动时可视区内元素的索引(不是数据实际的索引) + if (dragRowInfo!.rowid === itemRowInfo!.rowid) { + // e.clone和e.item相同说明拖拽的元素在DOM中,没被虚拟滚动给remove掉。 + if (e.newIndex === e.oldIndex) { + // 此时新旧index一样就可认为没拖动 + return; + } + } else { + } + // 此时真实DOM元素顺序已排(通过拖拽元素的前后元素确定拖拽元素在真实数据中是往前还是往后拖) + oldIndex = dragRowInfo!.index; + const len = e.from.childNodes.length; + let referenceIndex; + let referenceNode; + if (e.newIndex + 1 < len) { + // 拖拽DOM交换之后,后面还有元素(参考物是后面的元素) + referenceNode = e.from.childNodes[e.newIndex + 1]; + referenceIndex = xTable.getRowNode(referenceNode)!.index; + if (oldIndex > referenceIndex) { + newIndex = referenceIndex; + } else { + newIndex = referenceIndex - 1; + } + } else { + // 拖拽DOM交换之后,后面没有元素了(参考物是前面的元素) + referenceNode = e.from.childNodes[e.newIndex - 1]; + referenceIndex = xTable.getRowNode(referenceNode)!.index; + newIndex = referenceIndex; + } + } else { + oldIndex = e.oldIndex; + newIndex = e.newIndex; + if (oldIndex === newIndex) { + return; + } + const from = e.from; + const element = startChildren[oldIndex]; + let target = null; + if (oldIndex > newIndex) { + // 向上移动 + if (oldIndex + 1 < startChildren.length) { + target = startChildren[oldIndex + 1]; + } + } else { + // 向下移动 + target = startChildren[oldIndex + 1]; + } + from.removeChild(element); + from.insertBefore(element, target); + } + // -update-end--author:liaozhiyang---date:20240620---for:【TV360X-585】拖动字段虚拟滚动不好使 + nextTick(() => { + methods.doSort(oldIndex, newIndex); + methods.trigger('dragged', { oldIndex: oldIndex, newIndex: newIndex }); + }); + }, + }); + } + } +} diff --git a/src/components/jeecg/JVxeTable/src/hooks/useFinallyProps.ts b/src/components/jeecg/JVxeTable/src/hooks/useFinallyProps.ts new file mode 100644 index 0000000..3896929 --- /dev/null +++ b/src/components/jeecg/JVxeTable/src/hooks/useFinallyProps.ts @@ -0,0 +1,121 @@ +import { unref, computed } from 'vue'; +import { merge } from 'lodash-es'; +import { isArray } from '/@/utils/is'; +import { useAttrs } from '/@/hooks/core/useAttrs'; +import { useKeyboardEdit } from '../hooks/useKeyboardEdit'; +import { JVxeDataProps, JVxeTableMethods, JVxeTableProps } from '../types'; + +export function useFinallyProps(props: JVxeTableProps, data: JVxeDataProps, methods: JVxeTableMethods) { + const attrs = useAttrs(); + // vxe 键盘操作配置 + const { keyboardEditConfig } = useKeyboardEdit(props); + // vxe 最终 editRules + const vxeEditRules = computed(() => merge({}, props.editRules, data.innerEditRules)); + // vxe 最终 events + const vxeEvents = computed(() => { + let listeners = { ...unref(attrs) }; + let events = { + onScroll: methods.handleVxeScroll, + onCellClick: methods.handleCellClick, + onEditClosed: methods.handleEditClosed, + onEditActived: methods.handleEditActived, + onRadioChange: methods.handleVxeRadioChange, + onCheckboxAll: methods.handleVxeCheckboxAll, + onCheckboxChange: methods.handleVxeCheckboxChange, + // update-begin--author:liaozhiyang---date:20240321---for:【QQYUN-8566】JVXETable无法记住列设置 + onCustom: methods.handleCustom, + // update-begin--author:liaozhiyang---date:20240321---for:【QQYUN-8566】JVXETable无法记住列设置 + }; + // 用户传递的事件,进行合并操作 + Object.keys(listeners).forEach((key) => { + let listen = listeners[key]; + if (events.hasOwnProperty(key)) { + if (isArray(listen)) { + listen.push(events[key]); + } else { + listen = [events[key], listen]; + } + } + events[key] = listen; + }); + return events; + }); + // vxe 最终 props + const vxeProps = computed(() => { + // update-begin--author:liaozhiyang---date:20240417---for:【QQYUN-8785】online表单列位置的id未做限制,拖动其他列到id列上面,同步数据库时报错 + let rowClass = {}; + if (props.dragSort) { + rowClass = { + rowClassName: (params) => { + let { row } = params; + const find = props.notAllowDrag?.find((item:any) => { + const {key, value} = item; + return row[key] == value; + }); + // 业务传进的来的rowClassName + const popsRowClassName = props.rowClassName ?? ''; + let outClass = ''; + if(typeof popsRowClassName==='string'){ + popsRowClassName && (outClass = popsRowClassName); + }else if(typeof popsRowClassName==='function'){ + outClass = popsRowClassName(params) + } + return find ? `not-allow-drag ${outClass}` : `allow-drag ${outClass}`; + }, + }; + } + // update-end--author:liaozhiyang---date:20240417---for:【QQYUN-8785】online表单列位置的id未做限制,拖动其他列到id列上面,同步数据库时报错 + return merge( + {}, + data.defaultVxeProps, + { + showFooter: data.statistics.has, + }, + unref(attrs), + { + ref: 'gridRef', + size: props.size, + loading: false, + disabled: props.disabled, + columns: unref(data.vxeColumns), + editRules: unref(vxeEditRules), + height: props.height === 'auto' ? null : props.height, + maxHeight: props.maxHeight, + // update-begin--author:liaozhiyang---date:20231013---for:【QQYUN-5133】JVxeTable 行编辑升级 + scrollY: props.scrollY, + scrollX: props.scrollX, + // update-end--author:liaozhiyang---date:20231013---for:【QQYUN-5133】JVxeTable 行编辑升级 + border: props.bordered, + footerMethod: methods.handleFooterMethod, + // 展开行配置 + expandConfig: { + toggleMethod: methods.handleExpandToggleMethod, + }, + // 可编辑配置 + editConfig: { + // update-begin--author:liaozhiyang---date:20231013---for:【QQYUN-5133】JVxeTable 行编辑升级 + //activeMethod: methods.handleActiveMethod, + beforeEditMethod: methods.handleActiveMethod, + // update-end--author:liaozhiyang---date:20231013---for:【QQYUN-5133】JVxeTable 行编辑升级 + }, + radioConfig: { + checkMethod: methods.handleCheckMethod, + }, + checkboxConfig: { + checkMethod: methods.handleCheckMethod, + }, + ...rowClass + // rowClassName:(params)=>{ + // const { row } = params; + // return row.dbFieldName=='id'?"not-allow-drag":"allow-drag" + // } + }, + unref(vxeEvents), + unref(keyboardEditConfig) + ); + }); + return { + vxeProps, + prefixCls: data.prefixCls, + }; +} diff --git a/src/components/jeecg/JVxeTable/src/hooks/useJVxeComponent.ts b/src/components/jeecg/JVxeTable/src/hooks/useJVxeComponent.ts new file mode 100644 index 0000000..dbeacab --- /dev/null +++ b/src/components/jeecg/JVxeTable/src/hooks/useJVxeComponent.ts @@ -0,0 +1,323 @@ +import { computed, nextTick, ref, unref, watch } from 'vue'; +import { propTypes } from '/@/utils/propTypes'; +import { useDesign } from '/@/hooks/web/useDesign'; +import { getEnhanced, replaceProps } from '../utils/enhancedUtils'; +import { vModel } from '/@/components/jeecg/JVxeTable/utils'; +import { JVxeRenderType } from '../types/JVxeTypes'; +import { isBoolean, isFunction, isObject, isPromise } from '/@/utils/is'; +import { JVxeComponent } from '../types/JVxeComponent'; +import { filterDictText } from '/@/utils/dict/JDictSelectUtil'; +import { getAreaTextByCode } from "@/components/Form/src/utils/Area"; + +export function useJVxeCompProps() { + return { + // 组件类型 + type: propTypes.string, + // 渲染类型 + renderType: propTypes.string.def('default'), + // 渲染参数 + params: propTypes.object, + // 渲染自定义选项 + renderOptions: propTypes.object, + }; +} + +export function useJVxeComponent(props: JVxeComponent.Props) { + const value = computed(() => { + // update-begin--author:liaozhiyang---date:20240430---for:【QQYUN-9125】oracle数据库日期类型字段会默认带上时分秒 + const val = props.params.row[props.params.column.property]; + if (props.type === 'date' && typeof val === 'string') { + return val.split(' ').shift(); + } else { + return val; + } + // update-end--author:liaozhiyang---date:20240430---for:【QQYUN-9125】oracle数据库日期类型字段会默认带上时分秒 + }); + const innerValue = ref(value.value); + const row = computed(() => props.params.row); + const rows = computed(() => props.params.data); + const column = computed(() => props.params.column); + // 用户配置的原始 column + const originColumn = computed(() => column.value.params); + const rowIndex = computed(() => props.params._rowIndex); + const columnIndex = computed(() => props.params._columnIndex); + // 表格数据长度 + const fullDataLength = computed(() => props.params.$table.internalData.tableFullData.length); + // 是否正在滚动中 + const scrolling = computed(() => !!props.renderOptions.scrolling); + // 当有formatter时,优先使用formatter + const innerLabel = computed(() => { + if(typeof column.value?.formatter === 'function'){ + return column.value.formatter({ + cellValue: innerValue.value, + row: row.value, + column: column.value, + }); + } + return innerValue.value + }); + const cellProps = computed(() => { + let renderOptions = props.renderOptions; + let col = originColumn.value; + + let cellProps = {}; + + // 输入占位符 + cellProps['placeholder'] = replaceProps(col, col.placeholder); + + // 解析props + if (isObject(col.props)) { + Object.keys(col.props).forEach((key) => { + cellProps[key] = replaceProps(col, col.props[key]); + }); + } + + // 判断是否是禁用的列 + cellProps['disabled'] = isBoolean(col['disabled']) ? col['disabled'] : cellProps['disabled']; + // 判断是否禁用行 + if (renderOptions.isDisabledRow(row.value, rowIndex.value)) { + cellProps['disabled'] = true; + } + // update-begin--author:liaozhiyang---date:20240528---for:【TV360X-291】没勾选同步数据库禁用排序功能 + if (col.props && col.props.isDisabledCell) { + if (col.props.isDisabledCell({ row: row.value, rowIndex: rowIndex.value, column: col, columnIndex: columnIndex.value })) { + cellProps['disabled'] = true; + } + } + // update-end--author:liaozhiyang---date:20240528---for:【TV360X-291】没勾选同步数据库禁用排序功能 + // 判断是否禁用所有组件 + if (renderOptions.disabled === true) { + cellProps['disabled'] = true; + // update-begin--author:liaozhiyang---date:20240607---for:【TV360X-1068】行编辑整体禁用时上传按钮不显示 + cellProps['disabledTable'] = true; + // update-end--author:liaozhiyang---date:20240607---for:【TV360X-1068】行编辑整体禁用时上传按钮不显示 + } + //update-begin-author:taoyan date:2022-5-25 for: VUEN-1111 一对多子表 部门选择 不应该级联 + if (col.checkStrictly === true) { + cellProps['checkStrictly'] = true; + } + //update-end-author:taoyan date:2022-5-25 for: VUEN-1111 一对多子表 部门选择 不应该级联 + + //update-begin-author:taoyan date:2022-5-27 for: 用户组件 控制单选多选新的参数配置 + if (col.isRadioSelection === true) { + cellProps['isRadioSelection'] = true; + } else if (col.isRadioSelection === false) { + cellProps['isRadioSelection'] = false; + } + //update-end-author:taoyan date:2022-5-27 for: 用户组件 控制单选多选新的参数配置 + + return cellProps; + }); + + const listeners = computed(() => { + let listeners = Object.assign({}, props.renderOptions.listeners || {}); + // 默认change事件 + if (!listeners.change) { + listeners.change = async (event) => { + vModel(event.value, row, column); + await nextTick(); + // 处理 change 事件相关逻辑(例如校验) + props.params.$table.updateStatus(props.params); + }; + } + return listeners; + }); + const context = { + innerLabel, + innerValue, + row, + rows, + rowIndex, + column, + columnIndex, + originColumn, + fullDataLength, + cellProps, + scrolling, + handleChangeCommon, + handleBlurCommon, + }; + const ctx = { props, context }; + + // 获取组件增强 + let enhanced = getEnhanced(props.type); + + watch( + value, + (newValue) => { + // -update-begin--author:liaozhiyang---date:20241210---for:【issues/7497】隐藏某一列后,字典没翻译,恢复后正常 + // TODO 先这样修复解决问题,根因后期再看看 + enhanced = getEnhanced(props.type); + // -update-end--author:liaozhiyang---date:20241210---for:【issues/7497】隐藏某一列后,字典没翻译,恢复后 + // 验证值格式 + let getValue = enhanced.getValue(newValue, ctx); + if (newValue !== getValue) { + // 值格式不正确,重新赋值 + newValue = getValue; + vModel(newValue, row, column); + } + innerValue.value = enhanced.setValue(newValue, ctx); + // update-begin--author:liaozhiyang---date:20240509---for:【QQYUN-9205】一对多(jVxetable组件date)支持年,年月,年度度,年周 + if (props.type === 'date' && props.renderType === JVxeRenderType.spaner && enhanced.translate.enabled === true) { + if (isFunction(enhanced.translate.handler)) { + innerValue.value = enhanced.translate.handler(newValue, ctx); + } + return; + } + // update-end--author:liaozhiyang---date:20240509---for:【QQYUN-9205】一对多(jVxetable组件date)支持年,年月,年度度,年周 + + //update-begin---author:wangshuai---date:2024-09-18---for:【issues/7203】自动生成一对多表单代码中,省市区回显问题--- + if (props.type === 'pca' && props.renderType === JVxeRenderType.spaner) { + innerValue.value = getAreaTextByCode(newValue); + return; + } + //update-end---author:wangshuai---date:2024-09-18---for:【issues/7203】自动生成一对多表单代码中,省市区回显问题--- + + // 判断是否启用翻译 + if (props.renderType === JVxeRenderType.spaner && enhanced.translate.enabled === true) { + if (isFunction(enhanced.translate.handler)) { + let res = enhanced.translate.handler(newValue, ctx); + // 异步翻译,可解决字典查询慢的问题 + if (isPromise(res)) { + res.then((v) => (innerValue.value = v)); + } else { + innerValue.value = res; + } + } + } + }, + { immediate: true } + ); + + /** 通用处理 change 事件 */ + function handleChangeCommon($value, force = false) { + const newValue = enhanced.getValue($value, ctx); + const oldValue = value.value; + // update-begin--author:liaozhiyang---date:20230718---for:【issues-5025】JVueTable的事件 @valueChange重复触发问题 + const execute = force ? true : newValue !== oldValue; + if (execute) { + trigger('change', { value: newValue }); + // 触发valueChange事件 + parentTrigger('valueChange', { + type: props.type, + value: newValue, + oldValue: oldValue, + col: originColumn.value, + rowIndex: rowIndex.value, + columnIndex: columnIndex.value, + }); + } + // update-end--author:liaozhiyang---date:20230718---for:【issues-5025】JVueTable的事件 @valueChange重复触发问题 + } + + /** 通用处理 blur 事件 */ + function handleBlurCommon($value) { + // update-begin--author:liaozhiyang---date:20230817---for:【issues/636】JVxeTable加上blur事件 + const newValue = enhanced.getValue($value, ctx); + const oldValue = value.value; + //trigger('blur', { value }); + // 触发blur事件 + parentTrigger('blur', { + type: props.type, + value: newValue, + oldValue: oldValue, + col: originColumn.value, + rowIndex: rowIndex.value, + columnIndex: columnIndex.value, + }); + // update-end--author:liaozhiyang---date:20230817---for:【issues/636】JVxeTable加上blur事件 + } + + /** + * 如果事件存在的话,就触发 + * @param name 事件名 + * @param event 事件参数 + * @param args 其他附带参数 + */ + function trigger(name, event?, args: any[] = []) { + let listener = listeners.value[name]; + if (isFunction(listener)) { + if (isObject(event)) { + event = packageEvent(name, event); + } + listener(event, ...args); + } + } + + function parentTrigger(name, event, args: any[] = []) { + args.unshift(packageEvent(name, event)); + trigger('trigger', name, args); + } + + function packageEvent(name, event: any = {}) { + event.row = row.value; + event.column = column.value; + // online增强参数兼容 + event.column['key'] = column.value['property']; + // event.cellTarget = this + if (!event.type) { + event.type = name; + } + if (!event.cellType) { + event.cellType = props.type; + } + // 是否校验表单,默认为true + if (isBoolean(event.validate)) { + event.validate = true; + } + return event; + } + + /** + * 防样式冲突类名生成器 + * @param scope + */ + function useCellDesign(scope: string) { + return useDesign(`vxe-cell-${scope}`); + } + + return { + ...context, + enhanced, + trigger, + useCellDesign, + }; +} + +/** + * 获取组件默认增强 + */ +export function useDefaultEnhanced(): JVxeComponent.EnhancedPartial { + return { + installOptions: { + autofocus: '', + }, + interceptor: { + 'event.clearActived': () => true, + 'event.clearActived.className': () => true, + }, + switches: { + editRender: true, + visible: false, + }, + aopEvents: { + editActived() {}, + editClosed() {}, + activeMethod: () => true, + }, + translate: { + enabled: false, + handler(value, ctx) { + // 默认翻译方法 + if (ctx) { + return filterDictText(unref(ctx.context.column).params.options, value); + } else { + return value; + } + }, + }, + getValue: (value) => value, + setValue: (value) => value, + createValue: (defaultValue) => defaultValue, + } as JVxeComponent.Enhanced; +} diff --git a/src/components/jeecg/JVxeTable/src/hooks/useKeyboardEdit.ts b/src/components/jeecg/JVxeTable/src/hooks/useKeyboardEdit.ts new file mode 100644 index 0000000..a6bb9b9 --- /dev/null +++ b/src/components/jeecg/JVxeTable/src/hooks/useKeyboardEdit.ts @@ -0,0 +1,37 @@ +/* + * JVxeTable 键盘操作 + */ +import type { VxeTablePropTypes } from 'vxe-table'; +import type { JVxeTableProps } from '../types'; +import { computed } from 'vue'; + +/** + * JVxeTable 键盘操作 + * + * @param props + */ +export function useKeyboardEdit(props: JVxeTableProps) { + // 是否开启了键盘操作 + const enabledKeyboard = computed(() => props.keyboardEdit ?? false); + // 重写 keyboardConfig + const keyboardConfig: VxeTablePropTypes.KeyboardConfig = { + editMethod({ row, column, $table }) { + // 重写默认的覆盖式,改为追加式 + $table.setActiveCell(row, column); + return true; + }, + }; + // 键盘操作配置 + const keyboardEditConfig = computed(() => { + return { + mouseConfig: { + selected: enabledKeyboard.value, + }, + keyboardConfig, + }; + }); + + return { + keyboardEditConfig, + }; +} diff --git a/src/components/jeecg/JVxeTable/src/hooks/useLinkage.ts b/src/components/jeecg/JVxeTable/src/hooks/useLinkage.ts new file mode 100644 index 0000000..f5916d1 --- /dev/null +++ b/src/components/jeecg/JVxeTable/src/hooks/useLinkage.ts @@ -0,0 +1,145 @@ +import { watch } from 'vue'; +import { isFunction, isPromise, isArray } from '/@/utils/is'; +import { JVxeColumn, JVxeDataProps, JVxeTableProps, JVxeLinkageConfig } from '../types'; + +/** + * 多级联动 + */ +export function useLinkage(props: JVxeTableProps, data: JVxeDataProps, methods) { + // 整理多级联动配置 + watch( + () => props.linkageConfig, + (linkageConfig: JVxeLinkageConfig[]) => { + data.innerLinkageConfig.clear(); + if (isArray(linkageConfig) && linkageConfig.length > 0) { + linkageConfig.forEach((config) => { + let keys = getLinkageKeys(config.key, []); + // 多个key共享一个,引用地址 + let configItem = { + ...config, + keys, + optionsMap: new Map(), + }; + keys.forEach((k) => data.innerLinkageConfig.set(k, configItem)); + }); + } + }, + { immediate: true } + ); + + // 获取联动的key顺序 + function getLinkageKeys(key: string, keys: string[]): string[] { + let col = props.columns?.find((col: JVxeColumn) => col.key === key) as JVxeColumn; + if (col) { + keys.push(col.key); + // 寻找下级 + if (col.linkageKey) { + return getLinkageKeys(col.linkageKey, keys); + } + } + return keys; + } + + // 处理联动回显数据 + function handleLinkageBackData(row) { + if (data.innerLinkageConfig.size > 0) { + for (let configItem of data.innerLinkageConfig.values()) { + autoSetLinkageOptionsByData(row, '', configItem, 0); + } + } + } + + /** 【多级联动】获取同级联动下拉选项 */ + function getLinkageOptionsSibling(row, col, config, request) { + // 如果当前列不是顶级列 + let key = ''; + if (col.key !== config.key) { + // 就找出联动上级列 + let idx = config.keys.findIndex((k) => col.key === k); + let parentKey = config.keys[idx - 1]; + key = row[parentKey]; + // 如果联动上级列没有选择数据,就直接返回空数组 + if (key === '' || key == null) { + return []; + } + } else { + key = 'root'; + } + let options = config.optionsMap.get(key); + if (!Array.isArray(options)) { + if (request) { + let parent = key === 'root' ? '' : key; + return getLinkageOptionsAsync(config, parent); + } else { + options = []; + } + } + return options; + } + + /** 【多级联动】获取联动下拉选项(异步) */ + function getLinkageOptionsAsync(config, parent) { + return new Promise((resolve) => { + let key = parent ? parent : 'root'; + let options; + if (config.optionsMap.has(key)) { + options = config.optionsMap.get(key); + if (isPromise(options)) { + options.then((opt) => { + config.optionsMap.set(key, opt); + resolve(opt); + }); + } else { + resolve(options); + } + } else if (isFunction(config.requestData)) { + // 调用requestData方法,通过传入parent来获取子级 + // noinspection JSVoidFunctionReturnValueUsed,TypeScriptValidateJSTypes + let promise = config.requestData(parent); + config.optionsMap.set(key, promise); + promise.then((opt) => { + config.optionsMap.set(key, opt); + resolve(opt); + }); + } else { + resolve([]); + } + }); + } + + // 【多级联动】 用于回显数据,自动填充 optionsMap + function autoSetLinkageOptionsByData(data, parent, config, level) { + if (level === 0) { + getLinkageOptionsAsync(config, ''); + } else { + getLinkageOptionsAsync(config, parent); + } + if (config.keys.length - 1 > level) { + let value = data[config.keys[level]]; + if (value) { + autoSetLinkageOptionsByData(data, value, config, level + 1); + } + } + } + + // 【多级联动】联动组件change时,清空下级组件 + function handleLinkageSelectChange(row, col, config, value) { + if (col.linkageKey) { + getLinkageOptionsAsync(config, value); + let idx = config.keys.findIndex((k) => k === col.key); + let values = {}; + for (let i = idx; i < config.keys.length; i++) { + values[config.keys[i]] = ''; + } + // 清空后几列的数据 + methods.setValues([{ rowKey: row.id, values }]); + } + } + + return { + getLinkageOptionsAsync, + getLinkageOptionsSibling, + handleLinkageSelectChange, + handleLinkageBackData, + }; +} diff --git a/src/components/jeecg/JVxeTable/src/hooks/useMethods.ts b/src/components/jeecg/JVxeTable/src/hooks/useMethods.ts new file mode 100644 index 0000000..e046f6e --- /dev/null +++ b/src/components/jeecg/JVxeTable/src/hooks/useMethods.ts @@ -0,0 +1,918 @@ +import { Ref, watch } from 'vue'; +import XEUtils from 'xe-utils'; +import { simpleDebounce } from '/@/utils/common/compUtils'; +import { JVxeDataProps, JVxeRefs, JVxeTableProps, JVxeTypes } from '../types'; +import { getEnhanced } from '../utils/enhancedUtils'; +import { VxeTableInstance, VxeTablePrivateMethods } from 'vxe-table'; +import { cloneDeep } from 'lodash-es'; +import { isArray, isEmpty, isNull, isString } from '/@/utils/is'; +import { useLinkage } from './useLinkage'; +import { useWebSocket } from './useWebSocket'; +import { getPrefix, getJVxeAuths } from '../utils/authUtils'; +import { excludeKeywords } from '../componentMap'; +import { useColumnsCache } from './useColumnsCache'; +import { isEnabledVirtualYScroll } from '/@/components/jeecg/JVxeTable/utils'; + +export function useMethods(props: JVxeTableProps, { emit }, data: JVxeDataProps, refs: JVxeRefs, instanceRef: Ref) { + let xTableTemp: VxeTableInstance & VxeTablePrivateMethods; + + function getXTable() { + if (!xTableTemp) { + // !. 为 typescript 的非空断言 + xTableTemp = refs.gridRef.value!.getRefMaps().refTable.value; + } + return xTableTemp; + } + + // noinspection JSUnusedGlobalSymbols + const hookMethods = { + getXTable, + addRows, + pushRows, + insertRows, + addOrInsert, + setValues, + getValues, + getTableData, + getNewData, + getNewDataWithId, + getIfRowById, + getNewRowById, + getDeleteData, + getSelectionData, + getSelectedData, + removeRows, + removeRowsById, + removeSelection, + resetScrollTop, + validateTable, + fullValidateTable, + clearSelection, + filterNewRows, + isDisabledRow, + recalcDisableRows, + rowResort, + }; + + // 多级联动 + const linkageMethods = useLinkage(props, data, hookMethods); + // WebSocket 无痕刷新 + const socketMethods = useWebSocket(props, data, hookMethods); + + // 可显式供外部调用的方法 + const publicMethods = { + ...hookMethods, + ...linkageMethods, + ...socketMethods, + }; + + /** 监听vxe滚动条位置 */ + function handleVxeScroll(event) { + let { scroll } = data; + + // 记录滚动条的位置 + scroll.top = event.scrollTop; + scroll.left = event.scrollLeft; + + refs.subPopoverRef.value?.close(); + data.scrolling.value = true; + closeScrolling(); + } + + // 当手动勾选单选时触发的事件 + function handleVxeRadioChange(event) { + let row = event.$table.getRadioRecord(); + data.selectedRows.value = row ? [row] : []; + handleSelectChange('radio', data.selectedRows.value, event); + } + + // 当手动勾选全选时触发的事件 + function handleVxeCheckboxAll(event) { + data.selectedRows.value = event.$table.getCheckboxRecords(); + handleSelectChange('checkbox-all', data.selectedRows.value, event); + } + + // 当手动勾选并且值发生改变时触发的事件 + function handleVxeCheckboxChange(event) { + data.selectedRows.value = event.$table.getCheckboxRecords(); + handleSelectChange('checkbox', data.selectedRows.value, event); + } + + // 行选择change事件 + function handleSelectChange(type, selectedRows, $event) { + let action; + if (type === 'radio') { + action = 'selected'; + } else if (type === 'checkbox') { + action = selectedRows.includes($event.row) ? 'selected' : 'unselected'; + } else { + action = 'selected-all'; + } + + data.selectedRowIds.value = selectedRows.map((row) => row.id); + trigger('selectRowChange', { + type: type, + action: action, + $event: $event, + row: $event.row, + selectedRows: data.selectedRows.value, + selectedRowIds: data.selectedRowIds.value, + }); + } + + // 点击单元格时触发的事件 + function handleCellClick(event) { + let { row, column, $event, $table } = event; + + // 点击了可编辑的 + if (column.editRender) { + refs.subPopoverRef.value?.close(); + return; + } + + // 显示详细信息 + if (column.params?.showDetails) { + refs.detailsModalRef.value?.open(event); + } else if (refs.subPopoverRef.value) { + refs.subPopoverRef.value.toggle(event); + } else if (props.clickSelectRow) { + let className = $event.target.className || ''; + className = isString(className) ? className : className.toString(); + // 点击的是expand,不做处理 + if (className.includes('vxe-table--expand-btn')) { + return; + } + // 点击的是checkbox,不做处理 + if (className.includes('vxe-checkbox--icon') || className.includes('vxe-cell--checkbox')) { + return; + } + // 点击的是radio,不做处理 + if (className.includes('vxe-radio--icon') || className.includes('vxe-cell--radio')) { + return; + } + if (props.rowSelectionType === 'radio') { + $table.setRadioRow(row); + handleVxeRadioChange(event); + } else { + $table.toggleCheckboxRow(row); + handleVxeCheckboxChange(event); + } + } + } + + // 单元格被激活编辑时会触发该事件 + function handleEditActived({ column }) { + // 执行增强 + getEnhanced(column.params.type).aopEvents.editActived!.apply(instanceRef.value, arguments as any); + } + + // 单元格编辑状态下被关闭时会触发该事件 + function handleEditClosed({ column }) { + // 执行增强 + getEnhanced(column.params.type).aopEvents.editClosed!.apply(instanceRef.value, arguments as any); + } + + // 返回值决定行是否可选中 + function handleCheckMethod({ row }) { + if (props.disabled) { + return false; + } + return !data.disabledRowIds.includes(row.id); + } + + // 返回值决定单元格是否可以编辑 + function handleActiveMethod({ row, column }) { + let flag = (() => { + if (props.disabled) { + return false; + } + if (data.disabledRowIds.includes(row.id)) { + return false; + } + if (column.params?.disabled) { + return false; + } + // 执行增强 + return getEnhanced(column.params.type).aopEvents.activeMethod!.apply(instanceRef.value, arguments as any) ?? true; + })(); + if (!flag) { + // -update-begin--author:liaozhiyang---date:20240619---for:【TV360X-1404】vxetable警告 + getXTable().clearEdit(); + // -update-end--author:liaozhiyang---date:20240619---for:【TV360X-1404】vxetable警告 + } + return flag; + } + + /** + * 判断是否是禁用行 + * @param row 行数据 + * @param rowIndex 行号 + * @param force 是否强制判断 + */ + function isDisabledRow(row, rowIndex: number | boolean = -1, force = true) { + if(typeof rowIndex === 'boolean'){ + force = rowIndex; + rowIndex = -1; + } + if (!force) { + return !data.disabledRowIds.includes(row.id); + } + if (props.disabledRows == null || isEmpty(props.disabledRows)) { + return false; + } + let disabled: boolean = false; + let keys: string[] = Object.keys(props.disabledRows); + for (const key of keys) { + // 判断是否有该属性 + if (row.hasOwnProperty(key)) { + let value = row[key]; + let temp: any = props.disabledRows![key]; + // 禁用规则可以是一个函数 + if (typeof temp === 'function') { + disabled = temp(value, row, rowIndex); + } else if (isArray(temp)) { + // 禁用规则可以是一个数组 + disabled = temp.includes(value); + } else { + // 禁用规则可以是一个具体值 + disabled = temp === value; + } + if (disabled) { + break; + } + } + } + return disabled; + } + + // 重新计算禁用行 + function recalcDisableRows() { + let xTable = getXTable(); + data.disabledRowIds = []; + const { tableFullData } = xTable.internalData; + tableFullData.forEach((row, rowIndex) => { + // 判断是否是禁用行 + if (isDisabledRow(row, rowIndex)) { + data.disabledRowIds.push(row.id); + } + }); + xTable.updateData(); + } + + // 监听 disabledRows,更改时重新计算禁用行 + watch( + () => props.disabledRows, + () => recalcDisableRows() + ); + + // 返回值决定是否允许展开、收起行 + function handleExpandToggleMethod({ expanded }) { + return !(expanded && props.disabled); + } + + // 设置 data.scrolling 防抖模式 + const closeScrolling = simpleDebounce(function () { + data.scrolling.value = false; + }, 100); + + /** 表尾数据处理方法,用于显示统计信息 */ + function handleFooterMethod({ columns, data: $data }) { + const { statistics } = data; + let footers: any[] = []; + if (statistics.has) { + if (statistics.sum.length > 0) { + footers.push( + getFooterStatisticsMap({ + columns: columns, + title: '合计', + checks: statistics.sum, + method: (column) => XEUtils.sum($data, column.property), + }) + ); + } + if (statistics.average.length > 0) { + footers.push( + getFooterStatisticsMap({ + columns: columns, + title: '平均', + checks: statistics.average, + method: (column) => XEUtils.mean($data, column.property), + }) + ); + } + } + return footers; + } + + /** 获取底部统计Map */ + function getFooterStatisticsMap({ columns, title, checks, method }) { + return columns.map((column, columnIndex) => { + if (columnIndex === 0) { + return title; + } + if (checks.includes(column.property)) { + return method(column, columnIndex); + } + return null; + }); + } + + // 创建新行,自动添加默认值 + function createRow(record: Recordable = {}) { + let xTable = getXTable(); + // 添加默认值 + xTable.internalData.tableFullColumn.forEach((column) => { + let col = column.params; + // 不能被注册的列不获取增强 + if (col && !excludeKeywords.includes(col.type)) { + if (col.key && (record[col.key] == null || record[col.key] === '')) { + // 设置默认值 + let createValue = getEnhanced(col.type).createValue; + let defaultValue = col.defaultValue ?? ''; + let ctx = { context: { row: record, column, $table: xTable } }; + record[col.key] = createValue(defaultValue, ctx); + } + // 处理联动列 + if (col.type === JVxeTypes.select && data.innerLinkageConfig.size > 0) { + // 判断当前列是否是联动列 + if (data.innerLinkageConfig.has(col.key)) { + let configItem = data.innerLinkageConfig.get(col.key); + linkageMethods.getLinkageOptionsAsync(configItem, ''); + } + } + } else if (col?.type === JVxeTypes.hidden) { + record[col.key] = col.defaultValue ?? ''; + } + }); + return record; + } + + async function addOrInsert(rows: Recordable | Recordable[] = {}, index, triggerName, options?: IAddRowsOptions) { + let xTable = getXTable(); + let records; + if (isArray(rows)) { + records = rows; + } else { + records = [rows]; + } + // 遍历添加默认值 + records.forEach((record) => createRow(record)); + let setActive = options?.setActive ?? props.addSetActive ?? true; + let result = await pushRows(records, { index: index, setActive }); + // 遍历插入的行 + // online js增强时以传过来值为准,不再赋默认值 + if (!(options?.isOnlineJS ?? false)) { + if (triggerName != null) { + for (let i = 0; i < result.rows.length; i++) { + let row = result.rows[i]; + trigger(triggerName, { + row: row, + rows: result.rows, + insertIndex: index, + $table: xTable, + target: instanceRef.value, + isModalData: options?.isModalData + }); + } + } + } + return result; + } + + // 新增、插入一行时的可选参数 + interface IAddRowsOptions { + // 是否是 onlineJS增强 触发的 + isOnlineJS?: boolean; + // 是否激活编辑状态 + setActive?: boolean; + //是否需要触发change事件 + emitChange?:boolean + // 是否是modal弹窗添加的数据 + isModalData?:boolean + } + + /** + * 添加一行或多行 + * + * @param rows + * @param options 参数 + * @return + */ + async function addRows(rows: Recordable | Recordable[] = {}, options?: IAddRowsOptions) { + //update-begin-author:taoyan date:2022-8-12 for: VUEN-1892【online子表弹框】有主从关联js时,子表弹框修改了数据,主表字段未修改 + let result = await addOrInsert(rows, -1, 'added', options); + if(options && options!.emitChange==true){ + trigger('valueChange', {column: 'all', row: result.row}) + } + // update-begin--author:liaozhiyang---date:20240607---for:【TV360X-279】行编辑添加新字段滚动对应位置 + let xTable = getXTable(); + setTimeout(() => { + xTable.scrollToRow(result.row); + }, 0); + // update-end--author:liaozhiyang---date:20240607---for:【TV360X-279】行编辑添加新字段滚动对应位置 + return result; + //update-end-author:taoyan date:2022-8-12 for: VUEN-1892【online子表弹框】有主从关联js时,子表弹框修改了数据,主表字段未修改 + } + + /** + * 添加一行或多行临时数据,不会填充默认值,传什么就添加进去什么 + * @param rows + * @param options 选项 + * @param options.setActive 是否激活最后一行的编辑模式 + */ + async function pushRows(rows: Recordable | Recordable[] = {}, options = { setActive: false, index: -1 }) { + let xTable = getXTable(); + let { setActive, index } = options; + index = index === -1 ? index : xTable.internalData.tableFullData[index]; + index = index == null ? -1 : index; + // 插入行 + let result = await xTable.insertAt(rows, index); + if (setActive) { + // -update-begin--author:liaozhiyang---date:20240619---for:【TV360X-1404】vxetable警告 + // 激活最后一行的编辑模式 + xTable.setEditRow(result.rows[result.rows.length - 1], true); + // -update-end--author:liaozhiyang---date:20240619---for:【TV360X-1404】vxetable警告 + } + await recalcSortNumber(); + return result; + } + + /** + * 插入一行或多行临时数据 + * + * @param rows + * @param index 添加下标,数字,必填 + * @param options 参数 + * @return + */ + function insertRows(rows: Recordable | Recordable[] = {}, index: number, options?: IAddRowsOptions) { + if (index < 0) { + console.warn(`【JVxeTable】insertRows:index必须传递数字,且大于-1`); + return; + } + return addOrInsert(rows, index, 'inserted', options); + } + + /** 获取表格表单里的值 */ + function getValues(callback, rowIds) { + let tableData = getTableData({ rowIds: rowIds }); + // update-begin--author:liaozhiyang---date:20241227---for:【issues/7631】JVxeTable组件的getValues回调函数参数修正 + callback(tableData, tableData); + // update-end--author:liaozhiyang---date:20241227---for:【issues/7631】JVxeTable组件的getValues回调函数参数修正 + } + + type getTableDataOptions = { + rowIds?: string[]; + // 是否保留新行的id + keepNewId?: boolean; + } + + /** 获取表格数据 */ + function getTableData(options: getTableDataOptions = {}) { + let { rowIds } = options; + let tableData; + // 仅查询指定id的行 + if (isArray(rowIds) && rowIds.length > 0) { + tableData = []; + rowIds.forEach((rowId) => { + let { row } = getIfRowById(rowId); + if (row) { + tableData.push(row); + } + }); + } else { + // 查询所有行 + tableData = getXTable().getTableData().fullData; + } + return filterNewRows(tableData, { + keepNewId: options.keepNewId ?? false, + removeNewLine: false, + }); + } + + /** 仅获取新增的数据 */ + function getNewData() { + let newData = getNewDataWithId(); + newData.forEach((row) => delete row.id); + return newData; + } + + /** 仅获取新增的数据,带有id */ + function getNewDataWithId() { + let xTable = getXTable(); + return cloneDeep(xTable.getInsertRecords()); + } + + /** 根据ID获取行,新增的行也能查出来 */ + function getIfRowById(id) { + let xTable = getXTable(); + let row = xTable.getRowById(id), + isNew = false; + if (!row) { + row = getNewRowById(id); + if (!row) { + console.warn(`JVxeTable.getIfRowById:没有找到id为"${id}"的行`); + return { row: null }; + } + isNew = true; + } + return { row, isNew }; + } + + /** 通过临时ID获取新增的行 */ + function getNewRowById(id) { + let records = getXTable().getInsertRecords(); + for (let record of records) { + if (record.id === id) { + return record; + } + } + return null; + } + + type filterNewRowsOptions = { + keepNewId?: boolean; + removeNewLine?: boolean; + } | boolean + + /** + * 过滤添加的行 + * @param rows 要筛选的行数据 + * @param optOrRm 如果传 boolean 则是 removeNewLine 参数(true = 删除新增,false=只删除id),如果传对象则是配置参数 + * @param handler function + */ + function filterNewRows(rows, optOrRm:filterNewRowsOptions = true, handler?: Fn) { + let insertRecords = getXTable().getInsertRecords(); + let records: Recordable[] = []; + optOrRm = typeof optOrRm === 'boolean' ? { removeNewLine: optOrRm } : optOrRm; + // true = 删除新增,false=只删除id + let removeNewLine = optOrRm?.removeNewLine ?? true; + for (let row of rows) { + let item = cloneDeep(row); + if (insertRecords.includes(row)) { + handler ? handler({ item, row, insertRecords }) : null; + if (removeNewLine) { + continue; + } + if (!optOrRm?.keepNewId) { + delete item.id; + } + } + records.push(item); + } + return records; + } + + /** + * 重置滚动条Top位置 + * @param top 新top位置,留空则滚动到上次记录的位置,用于解决切换tab选项卡时导致白屏以及自动将滚动条滚动到顶部的问题 + */ + function resetScrollTop(top?) { + let xTable = getXTable(); + xTable.scrollTo(null, top == null || top === '' ? data.scroll.top : top); + } + + /** 校验table,失败返回errMap,成功返回null */ + async function validateTable(rows?) { + let xTable = getXTable(); + const errMap = await xTable.validate(rows ?? true).catch((errMap) => errMap); + return errMap ? errMap : null; + } + + /** 完整校验 */ + async function fullValidateTable(rows?) { + let xTable = getXTable(); + const errMap = await xTable.fullValidate(rows ?? true).catch((errMap) => errMap); + return errMap ? errMap : null; + } + + type setValuesParam = { rowKey: string; values: Recordable }; + + /** + * 设置某行某列的值 + * + * @param values + * @return 返回受影响的单元格数量 + */ + function setValues(values: setValuesParam[]): number { + if (!isArray(values)) { + console.warn(`[JVxeTable] setValues 必须传递数组`); + return 0; + } + let xTable = getXTable(); + let count = 0; + values.forEach((item) => { + let { rowKey, values: record } = item; + let { row } = getIfRowById(rowKey); + if (!row) { + return; + } + Object.keys(record).forEach((colKey) => { + let column = xTable.getColumnByField(colKey); + if (column) { + let oldValue = row[colKey]; + let newValue = record[colKey]; + if (newValue !== oldValue) { + row[colKey] = newValue; + // 触发 valueChange 事件 + trigger('valueChange', { + type: column.params.type, + value: newValue, + oldValue: oldValue, + col: column.params, + column: column, + isSetValues: true, + row: {...row} + }); + count++; + } + } else { + console.warn(`[JVxeTable] setValues 没有找到key为"${colKey}"的列`); + } + }); + }); + if (count > 0) { + xTable.updateData(); + } + return count; + } + + /** 清空选择行 */ + async function clearSelection() { + const xTable = getXTable(); + let event = { $table: xTable, target: instanceRef.value }; + if (['radio', JVxeTypes.rowRadio].includes(props.rowSelectionType ?? '')) { + await xTable.clearRadioRow(); + handleVxeRadioChange(event); + } else { + await xTable.clearCheckboxRow(); + handleVxeCheckboxChange(event); + } + } + + /** + * 获取选中数据 + * @param isFull 如果 isFull=true 则获取全表已选中的数据 + */ + function getSelectionData(isFull?: boolean) { + const xTable = getXTable(); + if (['radio', JVxeTypes.rowRadio].includes(props.rowSelectionType ?? '')) { + let row = xTable.getRadioRecord(isFull); + if (isNull(row)) { + return []; + } + return filterNewRows([row], false); + } else { + return filterNewRows(xTable.getCheckboxRecords(isFull), false); + } + } + + /** 仅获取被删除的数据(新增又被删除的数据不会被获取到) */ + function getDeleteData() { + return filterNewRows(getXTable().getRemoveRecords(), false); + } + + /** 删除一行或多行数据 */ + async function removeRows(rows, asyncRemove = false) { + // update-begin--author:liaozhiyang---date:20231123---for:vxe-table removeRows方法加上异步删除 + const xTable = getXTable(); + const removeEvent: any = { deleteRows: rows, $table: xTable }; + if (asyncRemove) { + const selectedRows = Array.isArray(rows) ? rows : [rows]; + const deleteOldRows = filterNewRows(selectedRows); + if (deleteOldRows.length) { + return new Promise((resolve) => { + // 确认删除,只有调用这个方法才会真删除 + removeEvent.confirmRemove = async () => { + const insertRecords = xTable.getInsertRecords(); + selectedRows.forEach((item) => { + // 删除新添加的数据id + if (insertRecords.includes(item)) { + delete item.id; + } + }); + const res = await xTable.remove(rows); + await recalcSortNumber(); + resolve(res); + }; + trigger('removed', removeEvent); + }); + } else { + // 全新的行立马删除,不等待。 + const res = await xTable.remove(rows); + removeEvent.confirmRemove = () => {}; + trigger('removed', removeEvent); + await recalcSortNumber(); + return res; + } + } else { + const res = await xTable.remove(rows); + trigger('removed', removeEvent); + await recalcSortNumber(); + return res; + } + // update-end--author:liaozhiyang---date:20231123---for:vxe-table removeRows方法加上异步删除 + } + + /** 根据id删除一行或多行 */ + function removeRowsById(rowId) { + let rowIds; + if (isArray(rowId)) { + rowIds = rowId; + } else { + rowIds = [rowId]; + } + let rows = rowIds + .map((id) => { + let { row } = getIfRowById(id); + if (!row) { + return; + } + if (row) { + return row; + } else { + console.warn(`【JVxeTable】removeRowsById:${id}不存在`); + return null; + } + }) + .filter((row) => row != null); + return removeRows(rows); + } + + // 删除选中的数据 + async function removeSelection() { + let xTable = getXTable(); + let res; + if (['radio', JVxeTypes.rowRadio].includes(props.rowSelectionType ?? '')) { + res = await xTable.removeRadioRow(); + } else { + res = await xTable.removeCheckboxRow(); + } + await clearSelection(); + await recalcSortNumber(); + return res; + } + + /** 重新计算排序字段的数值 */ + async function recalcSortNumber(force = false) { + if (props.dragSort || force) { + let xTable = getXTable(); + let sortKey = props.sortKey ?? 'orderNum'; + let sortBegin = props.sortBegin ?? 0; + xTable.internalData.tableFullData.forEach((data) => (data[sortKey] = sortBegin++)); + // update-begin--author:liaozhiyang---date:20231011---for:【QQYUN-5133】JVxeTable 行编辑升级 + // 4.1.0 + //await xTable.updateCache(); + // 4.1.1 + await xTable.cacheRowMap(true) + // update-end--author:liaozhiyang---date:20231011---for:【QQYUN-5133】JVxeTable 行编辑升级 + return await xTable.updateData(); + } + } + + /** + * 排序表格 + * @param oldIndex + * @param newIndex + * @param force 强制排序 + */ + async function doSort(oldIndex: number, newIndex: number, force = false) { + if (props.dragSort || force) { + let xTable = getXTable(); + let sort = (array) => { + // 存储old数据,并删除该项 + let row = array.splice(oldIndex, 1)[0]; + // 向newIndex处添加old数据 + array.splice(newIndex, 0, row); + }; + sort(xTable.internalData.tableFullData); + if (xTable.keepSource) { + sort(xTable.internalData.tableSourceData); + } + // -update-begin--author:liaozhiyang---date:20240620---for:【TV360X-585】拖动字段虚拟滚动不好使 + if (isEnabledVirtualYScroll(props, xTable)) { + await xTable.loadData(xTable.internalData.tableFullData); + } + // -update-end--author:liaozhiyang---date:20240620---for:【TV360X-585】拖动字段虚拟滚动不好使 + return await recalcSortNumber(force); + } + } + + /** 行重新排序 */ + function rowResort(oldIndex: number, newIndex: number) { + return doSort(oldIndex, newIndex, true); + } + + // ---------------- begin 权限控制 ---------------- + // 加载权限 + function loadAuthsMap() { + if (!props.authPre || props.authPre.length == 0) { + data.authsMap.value = null; + } else { + data.authsMap.value = getJVxeAuths(props.authPre); + } + } + + /** + * 根据 权限code 获取权限 + * @param authCode + */ + function getAuth(authCode) { + if (data.authsMap.value != null && props.authPre) { + let prefix = getPrefix(props.authPre); + return data.authsMap.value.get(prefix + authCode); + } + return null; + } + + // 获取列权限 + function getColAuth(key: string) { + return getAuth(key); + } + + // 判断按钮权限 + function hasBtnAuth(key: string) { + return getAuth('btn:' + key)?.isAuth ?? true; + } + + // ---------------- end 权限控制 ---------------- + + /* --- 辅助方法 ---*/ + + function created() { + loadAuthsMap(); + } + + // 触发事件 + function trigger(name, event: any = {}) { + event.$target = instanceRef.value; + event.$table = getXTable(); + //online增强参数兼容 + event.target = instanceRef.value; + emit(name, event); + } + + /** + * 获取选中的行-和 getSelectionData 区别在于对于新增的行也会返回ID + * 用于onlinePopForm + * @param isFull + */ + function getSelectedData(isFull?: boolean) { + const xTable = getXTable(); + let rows:any[] = [] + if (['radio', JVxeTypes.rowRadio].includes(props.rowSelectionType ?? '')) { + let row = xTable.getRadioRecord(isFull); + if (isNull(row)) { + return []; + } + rows = [row] + } else { + rows = xTable.getCheckboxRecords(isFull) + } + let records: Recordable[] = []; + for (let row of rows) { + let item = cloneDeep(row); + records.push(item); + } + return records; + } + /** + * 2024-03-21 + * liaozhiyang + * VXETable列设置保存缓存字段名 + * */ + function handleCustom({ type, $grid }) { + const { saveSetting, resetSetting } = useColumnsCache({ cacheColumnsKey: props.cacheColumnsKey }); + if (type === 'confirm') { + saveSetting($grid); + } else if (type == 'reset') { + resetSetting($grid); + } + } + + return { + methods: { + trigger, + ...publicMethods, + closeScrolling, + doSort, + recalcSortNumber, + handleVxeScroll, + handleVxeRadioChange, + handleVxeCheckboxAll, + handleVxeCheckboxChange, + handleFooterMethod, + handleCellClick, + handleEditActived, + handleEditClosed, + handleCheckMethod, + handleActiveMethod, + handleExpandToggleMethod, + getColAuth, + hasBtnAuth, + handleCustom, + }, + publicMethods, + created, + }; +} diff --git a/src/components/jeecg/JVxeTable/src/hooks/usePagination.ts b/src/components/jeecg/JVxeTable/src/hooks/usePagination.ts new file mode 100644 index 0000000..2b22fde --- /dev/null +++ b/src/components/jeecg/JVxeTable/src/hooks/usePagination.ts @@ -0,0 +1,68 @@ +import { computed, reactive, h } from 'vue'; +import { JVxeTableMethods, JVxeTableProps } from '/@/components/jeecg/JVxeTable/src/types'; +import { isEmpty } from '/@/utils/is'; +import { Pagination } from 'ant-design-vue'; + +export function usePagination(props: JVxeTableProps, methods: JVxeTableMethods) { + const innerPagination = reactive({ + current: 1, + pageSize: 10, + pageSizeOptions: ['10', '20', '30'], + showTotal: (total, range) => { + return range[0] + '-' + range[1] + ' 共 ' + total + ' 条'; + }, + showQuickJumper: true, + showSizeChanger: true, + total: 100, + }); + + const bindProps = computed(() => { + return { + ...innerPagination, + ...props.pagination, + size: props.size === 'tiny' ? 'small' : '', + }; + }); + + const boxClass = computed(() => { + return { + 'j-vxe-pagination': true, + 'show-quick-jumper': !!bindProps.value.showQuickJumper, + }; + }); + + function handleChange(current, pageSize) { + innerPagination.current = current; + methods.trigger('pageChange', { current, pageSize }); + } + + function handleShowSizeChange(current, pageSize) { + innerPagination.pageSize = pageSize; + methods.trigger('pageChange', { current, pageSize }); + } + + /** 渲染分页器 */ + function renderPagination() { + if (props.pagination && !isEmpty(props.pagination)) { + return h( + 'div', + { + class: boxClass.value, + }, + [ + h(Pagination, { + ...bindProps.value, + // update-begin--author:liaozhiyang---date:20250423---for:【issues/8137】vxetable表格禁用后分页隐藏了 + disabled: false, + // update-end--author:liaozhiyang---date:20250423---for:【issues/8137】vxetable表格禁用后分页隐藏了 + onChange: handleChange, + onShowSizeChange: handleShowSizeChange, + }), + ] + ); + } + return null; + } + + return { renderPagination }; +} diff --git a/src/components/jeecg/JVxeTable/src/hooks/useRenderComponents.ts b/src/components/jeecg/JVxeTable/src/hooks/useRenderComponents.ts new file mode 100644 index 0000000..e8ad036 --- /dev/null +++ b/src/components/jeecg/JVxeTable/src/hooks/useRenderComponents.ts @@ -0,0 +1,61 @@ +import { h } from 'vue'; +import { JVxeDataProps, JVxeTableMethods, JVxeTableProps } from '../types'; +import JVxeSubPopover from '../components/JVxeSubPopover.vue'; +import JVxeDetailsModal from '../components/JVxeDetailsModal.vue'; +import { useToolbar } from '/@/components/jeecg/JVxeTable/src/hooks/useToolbar'; +import { usePagination } from '/@/components/jeecg/JVxeTable/src/hooks/usePagination'; + +export function useRenderComponents(props: JVxeTableProps, data: JVxeDataProps, methods: JVxeTableMethods, slots) { + // 渲染 toolbar + const { renderToolbar } = useToolbar(props, data, methods, slots); + // 渲染分页器 + const { renderPagination } = usePagination(props, methods); + + // 渲染 toolbarAfter 插槽 + function renderToolbarAfterSlot() { + if (slots['toolbarAfter']) { + return slots['toolbarAfter'](); + } + return null; + } + + // 渲染点击时弹出的子表 + function renderSubPopover() { + if (props.clickRowShowSubForm && slots.subForm) { + return h( + JVxeSubPopover, + { + ref: 'subPopoverRef', + }, + { + subForm: slots.subForm, + } + ); + } + return null; + } + + // 渲染点击时弹出的详细信息 + function renderDetailsModal() { + if (props.clickRowShowMainForm && slots.mainForm) { + return h( + JVxeDetailsModal, + { + ref: 'detailsModalRef', + trigger: methods.trigger, + }, + { + mainForm: slots.mainForm, + } + ); + } + } + + return { + renderToolbar, + renderPagination, + renderSubPopover, + renderDetailsModal, + renderToolbarAfterSlot, + }; +} diff --git a/src/components/jeecg/JVxeTable/src/hooks/useToolbar.ts b/src/components/jeecg/JVxeTable/src/hooks/useToolbar.ts new file mode 100644 index 0000000..9053004 --- /dev/null +++ b/src/components/jeecg/JVxeTable/src/hooks/useToolbar.ts @@ -0,0 +1,75 @@ +import { h } from 'vue'; +import JVxeToolbar from '../components/JVxeToolbar.vue'; +import { JVxeDataProps, JVxeTableMethods, JVxeTableProps } from '../types'; + +export function useToolbar(props: JVxeTableProps, data: JVxeDataProps, methods: JVxeTableMethods, $slots) { + /** 渲染工具栏 */ + function renderToolbar() { + if (props.toolbar) { + return h( + JVxeToolbar, + { + size: props.size, + disabled: props.disabled, + toolbarConfig: props.toolbarConfig, + disabledRows: props.disabledRows, + hasBtnAuth: methods.hasBtnAuth, + selectedRowIds: data.selectedRowIds.value, + custom: props.custom, + addBtnCfg: props.addBtnCfg, + removeBtnCfg: props.removeBtnCfg, + // 新增事件 + onAdd: () => { + // update-begin--author:liaozhiyang---date:20240521---for:【TV360X-212】online新增字段就出校验提示 + setTimeout(() => { + methods.addRows(); + }, 0); + // update-end--author:liaozhiyang---date:20240521---for:【TV360X-212】online新增字段就出校验提示 + }, + // 保存事件 + onSave: () => methods.trigger('save'), + onRemove() { + const $table = methods.getXTable(); + // update-begin--author:liaozhiyang---date:20231018---for:【QQYUN-6805】修复asyncRemove字段不生效 + // 触发删除事件 + if (data.selectedRows.value.length > 0) { + const deleteOldRows = methods.filterNewRows(data.selectedRows.value); + const removeEvent: any = { deleteRows: data.selectedRows.value, $table }; + const insertRecords = $table.getInsertRecords(); + if (props.asyncRemove && deleteOldRows.length) { + data.selectedRows.value.forEach((item) => { + // 删除新添加的数据id + if (insertRecords.includes(item)) { + delete item.id; + } + }); + // 确认删除,只有调用这个方法才会真删除 + removeEvent.confirmRemove = () => methods.removeSelection(); + } else { + if (props.asyncRemove) { + // asyncRemove删除的只有新增的数据时,防止调用confirmRemove报错 + removeEvent.confirmRemove = () => {}; + } + methods.removeSelection(); + } + methods.trigger('removed', removeEvent); + } else { + methods.removeSelection(); + } + // update-end--author:liaozhiyang---date:20231018---for:【QQYUN-6805】修复asyncRemove字段不生效 + }, + // 清除选择事件 + onClearSelection: () => methods.clearSelection(), + onRegister: ({ xToolbarRef }) => methods.getXTable().connect(xToolbarRef.value), + }, + { + toolbarPrefix: $slots.toolbarPrefix, + toolbarSuffix: $slots.toolbarSuffix, + } + ); + } + return null; + } + + return { renderToolbar }; +} diff --git a/src/components/jeecg/JVxeTable/src/hooks/useValidateRules.ts b/src/components/jeecg/JVxeTable/src/hooks/useValidateRules.ts new file mode 100644 index 0000000..88f9c83 --- /dev/null +++ b/src/components/jeecg/JVxeTable/src/hooks/useValidateRules.ts @@ -0,0 +1,108 @@ +import { VxeTablePropTypes } from 'vxe-table'; +import { isArray } from '/@/utils/is'; +import { HandleArgs } from './useColumns'; +import { replaceProps } from '../utils/enhancedUtils'; + +export function useValidateRules(args: HandleArgs) { + const { data } = args; + const col = args.col!; + let rules: VxeTablePropTypes.EditRules[] = []; + if (isArray(col.validateRules)) { + for (let rule of col.validateRules) { + let replace = { + message: replaceProps(col, rule.message), + }; + if (rule.unique || rule.pattern === 'only') { + // 唯一校验器 + rule.validator = uniqueValidator(args); + } else if (rule.pattern) { + // 非空 + if (rule.pattern === fooPatterns[0].value) { + rule.required = true; + delete rule.pattern; + } else { + // 兼容Online表单的特殊规则 + for (let foo of fooPatterns) { + if (foo.value === rule.pattern) { + rule.pattern = foo.pattern; + break; + } + } + } + } else if (typeof rule.handler === 'function') { + // 自定义函数校验 + rule.validator = handlerConvertToValidator; + } + rules.push(Object.assign({}, rule, replace)); + } + } + data.innerEditRules[col.key] = rules; +} + +/** 唯一校验器 */ +function uniqueValidator({ methods }: HandleArgs) { + return function (event) { + const { cellValue, column, rule } = event; + // update-begin--author:liaozhiyang---date:20240522---for:【TV360X-299】JVxetable组件中唯一校验过滤掉空字符串 + if (cellValue == '') return Promise.resolve(); + // update-end--author:liaozhiyang---date:20240522---for:【TV360X-299】JVxetable组件中唯一校验过滤掉空字符串 + let tableData = methods.getTableData(); + let findCount = 0; + for (let rowData of tableData) { + if (rowData[column.params.key] === cellValue) { + if (++findCount >= 2) { + return Promise.reject(new Error(rule.message)); + } + } + } + return Promise.resolve(); + }; +} + +/** 旧版handler转为新版Validator */ +function handlerConvertToValidator(event) { + const { column, rule } = event; + return new Promise((resolve, reject) => { + rule.handler(event, (flag, msg) => { + let message = rule.message; + if (typeof msg === 'string') { + message = replaceProps(column.params, msg); + } + if (flag == null) { + resolve(message); + } else if (!!flag) { + resolve(message); + } else { + reject(new Error(message)); + } + }); + }); +} + +// 兼容 online 的规则 +const fooPatterns = [ + { title: '非空', value: '*', pattern: /^.+$/ }, + { title: '6到16位数字', value: 'n6-16', pattern: /^\d{6,16}$/ }, + { title: '6到16位任意字符', value: '*6-16', pattern: /^.{6,16}$/ }, + { title: '6到18位字母', value: 's6-18', pattern: /^[a-z|A-Z]{6,18}$/ }, + //update-begin-author:taoyan date:2022-6-1 for: VUEN-1160 对多子表,网址校验不正确 + { + title: '网址', + value: 'url', + pattern: /^((ht|f)tps?):\/\/[\w\-]+(\.[\w\-]+)+([\w\-.,@?^=%&:\/~+#]*[\w\-@?^=%&\/~+#])?$/, + }, + //update-end-author:taoyan date:2022-6-1 for: VUEN-1160 对多子表,网址校验不正确 + // update-begin--author:liaozhiyang---date:20240527---for:【TV360X-466】邮箱跟一对第一校验规则一致 + { title: '电子邮件', value: 'e', pattern: /^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/ }, + // update-end--author:liaozhiyang---date:20240527---for:【TV360X-466】邮箱跟一对第一校验规则一致 + { title: '手机号码', value: 'm', pattern: /^1[3456789]\d{9}$/ }, + { title: '邮政编码', value: 'p', pattern: /^\d{6}$/ }, + { title: '字母', value: 's', pattern: /^[A-Z|a-z]+$/ }, + { title: '数字', value: 'n', pattern: /^-?\d+(\.?\d+|\d?)$/ }, + { title: '整数', value: 'z', pattern: /^-?\d+$/ }, + { + title: '金额', + value: 'money', + pattern: /^(([1-9][0-9]*)|([0]\.\d{0,2}|[1-9][0-9]*\.\d{0,5}))$/, + }, +]; diff --git a/src/components/jeecg/JVxeTable/src/hooks/useWebSocket.ts b/src/components/jeecg/JVxeTable/src/hooks/useWebSocket.ts new file mode 100644 index 0000000..ba0d355 --- /dev/null +++ b/src/components/jeecg/JVxeTable/src/hooks/useWebSocket.ts @@ -0,0 +1,236 @@ +import { watch, onUnmounted } from 'vue'; +import { buildUUID } from '/@/utils/uuid'; +import { useGlobSetting } from '/@/hooks/setting'; +import { useUserStore } from '/@/store/modules/user'; +import { JVxeDataProps, JVxeTableMethods, JVxeTableProps } from '../types'; +import { isArray } from '/@/utils/is'; +import { getToken } from '/@/utils/auth'; + +// vxe socket +const vs = { + // 页面唯一 id,用于标识同一用户,不同页面的websocket + pageId: buildUUID(), + // webSocket 对象 + ws: null, + // 一些常量 + constants: { + // 消息类型 + TYPE: 'type', + // 消息数据 + DATA: 'data', + // 消息类型:心跳检测 + TYPE_HB: 'heart_beat', + // 消息类型:更新vxe table数据 + TYPE_UVT: 'update_vxe_table', + }, + // 心跳检测 + heartCheck: { + // 间隔时间,间隔多久发送一次心跳消息 + interval: 10000, + // 心跳消息超时时间,心跳消息多久没有回复后重连 + timeout: 6000, + timeoutTimer: -1, + clear() { + clearTimeout(this.timeoutTimer); + return this; + }, + start() { + vs.sendMessage(vs.constants.TYPE_HB, ''); + // 如果超过一定时间还没重置,说明后端主动断开了 + this.timeoutTimer = window.setTimeout(() => { + vs.reconnect(); + }, this.timeout); + return this; + }, + // 心跳消息返回 + back() { + this.clear(); + window.setTimeout(() => this.start(), this.interval); + }, + }, + + /** 初始化 WebSocket */ + initialWebSocket() { + if (this.ws === null) { + const userId = useUserStore().getUserInfo?.id; + const domainURL = useGlobSetting().uploadUrl!; + const domain = domainURL.replace('https://', 'wss://').replace('http://', 'ws://'); + const url = `${domain}/vxeSocket/${userId}/${this.pageId}`; + //update-begin-author:taoyan date:2022-4-24 for: v2.4.6 的 websocket 服务端,存在性能和安全问题。 #3278 + let token = (getToken() || '') as string; + this.ws = new WebSocket(url, [token]); + //update-end-author:taoyan date:2022-4-24 for: v2.4.6 的 websocket 服务端,存在性能和安全问题。 #3278 + this.ws.onopen = this.on.open.bind(this); + this.ws.onerror = this.on.error.bind(this); + this.ws.onmessage = this.on.message.bind(this); + this.ws.onclose = this.on.close.bind(this); + } + }, + + // 发送消息 + sendMessage(type, message) { + try { + let ws = this.ws; + if (ws != null && ws.readyState === ws.OPEN) { + ws.send( + JSON.stringify({ + type: type, + data: message, + }) + ); + } + } catch (err: any) { + console.warn('【JVxeWebSocket】发送消息失败:(' + err.code + ')'); + } + }, + + /** 绑定全局VXE表格 */ + tableMap: new Map(), + /** 添加绑定 */ + addBind(map, key, value: VmArgs) { + let binds = map.get(key); + if (isArray(binds)) { + binds.push(value); + } else { + map.set(key, [value]); + } + }, + /** 移除绑定 */ + removeBind(map, key, value: VmArgs) { + let binds = map.get(key); + if (isArray(binds)) { + for (let i = 0; i < binds.length; i++) { + let bind = binds[i]; + if (bind === value) { + binds.splice(i, 1); + break; + } + } + if (binds.length === 0) { + map.delete(key); + } + } else { + map.delete(key); + } + }, + // 呼叫绑定的表单 + callBind(map, key, callback) { + let binds = map.get(key); + if (isArray(binds)) { + binds.forEach(callback); + } + }, + + lockReconnect: false, + /** 尝试重连 */ + reconnect() { + if (this.lockReconnect) return; + this.lockReconnect = true; + setTimeout(() => { + if (this.ws && this.ws.close) { + this.ws.close(); + } + this.ws = null; + console.info('【JVxeWebSocket】尝试重连...'); + this.initialWebSocket(); + this.lockReconnect = false; + }, 5000); + }, + + on: { + open() { + console.info('【JVxeWebSocket】连接成功'); + this.heartCheck.start(); + }, + error(e) { + console.warn('【JVxeWebSocket】连接发生错误:', e); + this.reconnect(); + }, + message(e) { + // 解析消息 + let json; + try { + json = JSON.parse(e.data); + } catch (e: any) { + console.warn('【JVxeWebSocket】收到无法解析的消息:', e.data); + return; + } + let type = json[this.constants.TYPE]; + let data = json[this.constants.DATA]; + switch (type) { + // 心跳检测 + case this.constants.TYPE_HB: + this.heartCheck.back(); + break; + // 更新form数据 + case this.constants.TYPE_UVT: + this.callBind(this.tableMap, data.socketKey, (args) => this.onVM.onUpdateTable(args, ...data.args)); + break; + default: + console.warn('【JVxeWebSocket】收到不识别的消息类型:' + type); + break; + } + }, + close(e) { + console.info('【JVxeWebSocket】连接被关闭:', e); + this.reconnect(); + }, + }, + + onVM: { + /** 收到更新表格的消息 */ + onUpdateTable({ props, data, methods }: VmArgs, row, caseId) { + if (data.caseId !== caseId) { + const tableRow = methods.getIfRowById(row.id).row; + // 局部保更新数据 + if (tableRow) { + if (props.reloadEffect) { + data.reloadEffectRowKeysMap[row.id] = true; + } + Object.assign(tableRow, row, { id: tableRow.id }); + methods.getXTable().reloadRow(tableRow); + } + } + }, + }, +} as { + ws: Nullable; +} & Recordable; + +type VmArgs = { + props: JVxeTableProps; + data: JVxeDataProps; + methods: JVxeTableMethods; +}; + +export function useWebSocket(props: JVxeTableProps, data: JVxeDataProps, methods) { + const args: VmArgs = { props, data, methods }; + watch( + () => props.socketReload, + (socketReload: boolean) => { + if (socketReload) { + vs.initialWebSocket(); + vs.addBind(vs.tableMap, props.socketKey, args); + } else { + vs.removeBind(vs.tableMap, props.socketKey, args); + } + }, + { immediate: true } + ); + + /** 发送socket消息更新行 */ + function socketSendUpdateRow(row) { + vs.sendMessage(vs.constants.TYPE_UVT, { + socketKey: props.socketKey, + args: [row, data.caseId], + }); + } + + onUnmounted(() => { + vs.removeBind(vs.tableMap, props.socketKey, args); + }); + + return { + socketSendUpdateRow, + }; +} diff --git a/src/components/jeecg/JVxeTable/src/install.ts b/src/components/jeecg/JVxeTable/src/install.ts new file mode 100644 index 0000000..38e3e8e --- /dev/null +++ b/src/components/jeecg/JVxeTable/src/install.ts @@ -0,0 +1,84 @@ +import type { App } from 'vue'; +// 引入 vxe-table +import 'xe-utils'; +import VxeUIAll from 'vxe-pc-ui'; +import VXETable /*Grid*/ from 'vxe-table'; +import VXETablePluginAntd from 'vxe-table-plugin-antd'; +import 'vxe-pc-ui/lib/style.css'; +import 'vxe-table/lib/style.css'; + +import JVxeTable from './JVxeTable'; +import { getEventPath } from '/@/utils/common/compUtils'; +import { registerAllComponent } from './utils/registerUtils'; +import { getEnhanced } from './utils/enhancedUtils'; + +export function registerJVxeTable(app: App) { + // VXETable 全局配置 + const VXETableSettings = { + // z-index 起始值 + zIndex: 1000, + table: {}, + }; + + // 添加事件拦截器 event.clearActived + // 比如点击了某个组件的弹出层面板之后,此时被激活单元格不应该被自动关闭,通过返回 false 可以阻止默认的行为。 + VXETable.interceptor.add('event.clearActived', preventClosingPopUp); + VXETable.interceptor.add('event.clearEdit', preventClosingPopUp); + // 注册插件 + VXETable.use(VXETablePluginAntd); + // 注册自定义组件 + registerAllComponent(); + // 执行注册方法 + app.use(VxeUIAll); + app.use(VXETable, VXETableSettings); + app.component('JVxeTable', JVxeTable); +} + + +/** + * 阻止行编辑中关闭弹窗 + * @param params + */ +function preventClosingPopUp(this: any, params) { + // 获取组件增强 + let col = params.column.params; + // update-begin--author:liaozhiyang---date:20250429---for:【issues/8178】使用原生vxe-table组件编辑模式下失去焦点报错 + if (col === undefined) { + // 说明使用的是纯原生的vxe-table + return; + } + // update-end--author:liaozhiyang---date:20250429---for:【issues/8178】使用原生vxe-table组件编辑模式下失去焦点报错 + let { $event } = params; + const interceptor = getEnhanced(col.type).interceptor; + // 执行增强 + let flag = interceptor['event.clearActived']?.call(this, ...arguments); + if (flag === false) { + return false; + } + + let path = getEventPath($event); + for (let p of path) { + let className: any = p.className || ''; + className = typeof className === 'string' ? className : className.toString(); + + /* --- 特殊处理以下组件,点击以下标签时不清空编辑状态 --- */ + + // 点击的标签是JInputPop + if (className.includes('j-input-pop')) { + return false; + } + // 点击的标签是JPopup的弹出层、部门选择、用户选择 + if (className.includes('j-popup-modal') || className.includes('j-depart-select-modal') || className.includes('j-user-select-modal')) { + return false; + } + // 点击的是日期选择器 + if (className.includes('j-vxe-date-picker')) { + return false; + } + // 执行增强 + let flag = interceptor['event.clearActived.className']?.call(this, className, ...arguments); + if (flag === false) { + return false; + } + } +} diff --git a/src/components/jeecg/JVxeTable/src/style/index.less b/src/components/jeecg/JVxeTable/src/style/index.less new file mode 100644 index 0000000..9f1bd00 --- /dev/null +++ b/src/components/jeecg/JVxeTable/src/style/index.less @@ -0,0 +1,102 @@ +@import 'vxe.const'; +@import 'vxe.dark'; + +.@{prefix-cls} { + // 编辑按钮样式 + .vxe-cell--edit-icon { + border-color: #606266; + } + + .sort--active { + border-color: @primary-color; + } + + // toolbar 样式 + &-toolbar { + &-collapsed { + [data-collapse] { + display: none; + } + } + + &-button.div .ant-btn { + margin-right: 8px; + } + } + + // 分页器 + .j-vxe-pagination { + margin-top: 8px; + text-align: right; + + .ant-pagination-options-size-changer.ant-select { + margin-right: 0; + } + + &.show-quick-jumper { + .ant-pagination-options-size-changer.ant-select { + margin-right: 8px; + } + } + } + + // 更改 header 底色 + .vxe-table.border--default .vxe-table--header-wrapper, + .vxe-table.border--full .vxe-table--header-wrapper, + .vxe-table.border--outer .vxe-table--header-wrapper { + //background-color: #FFFFFF; + } + + // 更改 tooltip 校验失败的颜色 + .vxe-table--tooltip-wrapper.vxe-table--valid-error { + background-color: #f5222d !important; + } + + // 更改 输入框 校验失败的颜色 + .col--valid-error > .vxe-cell > .ant-input, + .col--valid-error > .vxe-cell > .ant-select .ant-input, + .col--valid-error > .vxe-cell > .ant-select .ant-select-selection, + .col--valid-error > .vxe-cell > .ant-input-number, + .col--valid-error > .vxe-cell > .ant-cascader-picker .ant-cascader-input, + .col--valid-error > .vxe-cell > .ant-calendar-picker .ant-calendar-picker-input, + .col--valid-error > .vxe-tree-cell > .ant-input, + .col--valid-error > .vxe-tree-cell > .ant-select .ant-input, + .col--valid-error > .vxe-tree-cell > .ant-select .ant-select-selection, + .col--valid-error > .vxe-tree-cell > .ant-input-number, + .col--valid-error > .vxe-tree-cell > .ant-cascader-picker .ant-cascader-input, + .col--valid-error > .vxe-tree-cell > .ant-calendar-picker .ant-calendar-picker-input { + border-color: #f5222d !important; + } + + .vxe-body--row.sortable-ghost, + .vxe-body--row.sortable-chosen { + background-color: #dfecfb; + } + + // ----------- 【VUEN-1691】默认隐藏滚动条,鼠标放上去才显示 ------------------------------------------- + .vxe-table { + //.vxe-table--footer-wrapper.body--wrapper, + .vxe-table--body-wrapper.body--wrapper { + // overflow-x: hidden; + } + + &:hover { + //.vxe-table--footer-wrapper.body--wrapper, + .vxe-table--body-wrapper.body--wrapper { + // overflow-x: auto; + } + } + } + // ----------- 【VUEN-1691】默认隐藏滚动条,鼠标放上去才显示 ------------------------------------------- + + // 调整展开/收起图标样式 + .vxe-table--render-default .vxe-table--expanded .vxe-table--expand-btn { + width: 17px; + height: 17px; + } + /*【美化表单】行编辑table的title字体改小一号*/ + .vxe-header--column.col--ellipsis>.vxe-cell .vxe-cell--title{ + font-size: 13px; + } + +} diff --git a/src/components/jeecg/JVxeTable/src/style/reload-effect.less b/src/components/jeecg/JVxeTable/src/style/reload-effect.less new file mode 100644 index 0000000..0333c81 --- /dev/null +++ b/src/components/jeecg/JVxeTable/src/style/reload-effect.less @@ -0,0 +1,44 @@ +.j-vxe-reload-effect-box { + &, + .j-vxe-reload-effect-span { + display: inline; + height: 100%; + position: relative; + } + + .j-vxe-reload-effect-span { + &.layer-top { + display: inline-block; + width: 100%; + + position: absolute; + z-index: 2; + background-color: white; + + transform-origin: 0 0; + animation: reload-effect 1.5s forwards; + } + + &.layer-bottom { + z-index: 1; + } + } + + // 定义动画 + @keyframes reload-effect { + 0% { + opacity: 1; + transform: rotateX(0); + } + 10% { + opacity: 1; + } + 90% { + opacity: 0; + } + 100% { + opacity: 0; + transform: rotateX(180deg); + } + } +} diff --git a/src/components/jeecg/JVxeTable/src/style/vxe.const.less b/src/components/jeecg/JVxeTable/src/style/vxe.const.less new file mode 100644 index 0000000..49db4e3 --- /dev/null +++ b/src/components/jeecg/JVxeTable/src/style/vxe.const.less @@ -0,0 +1,2 @@ +//noinspection LessUnresolvedVariable +@prefix-cls: ~'@{namespace}-j-vxe-table'; diff --git a/src/components/jeecg/JVxeTable/src/style/vxe.dark.less b/src/components/jeecg/JVxeTable/src/style/vxe.dark.less new file mode 100644 index 0000000..b050917 --- /dev/null +++ b/src/components/jeecg/JVxeTable/src/style/vxe.dark.less @@ -0,0 +1,124 @@ +@import 'vxe.const'; +// update-begin--author:liaozhiyang---date:20240313---for:【QQYUN-8493】修正暗黑模式online表单Erp和编辑页面显示不正确 +html[data-theme='dark'] { + --vxe-table-body-background-color: #151515; + --vxe-table-footer-background-color: #151515; + --vxe-table-border-color: #606060; + --vxe-table-popup-border-color:#606060; + --vxe-table-row-hover-background-color:#1e1e1e; + --vxe-input-border-color: #606266; +} +// update-end--author:liaozhiyang---date:20240313---for:【QQYUN-8493】修正暗黑模式online表单Erp和编辑页面显示不正确 +[data-theme='dark'] .@{prefix-cls} { + @fontColor: #c9d1d9; + @bgColor: #151515; + @borderColor: #606060; + + .vxe-cell--item, + .vxe-cell--title, + .vxe-cell, + .vxe-body--expanded-cell { + color: @fontColor; + } + + .vxe-toolbar { + // update-begin--author:liaozhiyang---date:20240313---for:【QQYUN-8493】修正暗黑模式online表单Erp和编辑页面显示不正确 + background-color: #1f1f1f; + // update-end--author:liaozhiyang---date:20240313---for:【QQYUN-8493】修正暗黑模式online表单Erp和编辑页面显示不正确 + } + + .vxe-table--render-default .vxe-table--body-wrapper, + .vxe-table--render-default .vxe-table--footer-wrapper { + background-color: @bgColor; + } + + // 外边框 + .vxe-table--render-default .vxe-table--border-line { + border-color: @borderColor; + } + + // header 下边框 + .vxe-table .vxe-table--header-wrapper .vxe-table--header-border-line { + border-bottom-color: @borderColor; + } + + // footer 上边框 + .vxe-table--render-default .vxe-table--footer-wrapper { + border-top-color: @borderColor; + } + + // 展开行 边框 + .vxe-table--render-default .vxe-body--expanded-column { + border-bottom-color: @borderColor; + } + + // 行斑马纹 + .vxe-table--render-default .vxe-body--row.row--stripe { + background-color: #1e1e1e; + } + + // 行hover + .vxe-table--render-default .vxe-body--row.row--hover { + background-color: #262626; + } + + // 选中行 + .vxe-table--render-default .vxe-body--row.row--checked { + background-color: #44403a; + + &.row--hover { + background-color: #59524b; + } + } + + .vxe-table--render-default.border--default .vxe-table--header-wrapper, + .vxe-table--render-default.border--full .vxe-table--header-wrapper, + .vxe-table--render-default.border--outer .vxe-table--header-wrapper { + background-color: #1d1d1d; + } + + .vxe-table--render-default.border--default .vxe-body--column, + .vxe-table--render-default.border--default .vxe-footer--column, + .vxe-table--render-default.border--default .vxe-header--column, + .vxe-table--render-default.border--inner .vxe-body--column, + .vxe-table--render-default.border--inner .vxe-footer--column, + .vxe-table--render-default.border--inner .vxe-header--column { + background-image: linear-gradient(#1d1d1d, #1d1d1d); + } + + // 列宽拖动 + .vxe-header--column .vxe-resizable.is--line:before { + background-color: #505050; + } + + // checkbox + .vxe-custom--option .vxe-checkbox--icon:before, + .vxe-export--panel-column-option .vxe-checkbox--icon:before, + .vxe-table--filter-option .vxe-checkbox--icon:before, + .vxe-table--render-default .vxe-cell--checkbox .vxe-checkbox--icon:before { + background-color: @bgColor; + border-color: @borderColor; + } + + .vxe-toolbar .vxe-custom--option-wrapper { + background-color: @bgColor; + } + + .vxe-button { + background-color: @bgColor; + border-color: @borderColor; + } + + .vxe-button.type--button:not(.is--disabled):active { + background-color: @bgColor; + } + + .vxe-toolbar .vxe-custom--wrapper.is--active > .vxe-button { + background-color: @bgColor; + } + + .vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--footer button { + color: @fontColor; + } +} + diff --git a/src/components/jeecg/JVxeTable/src/types/JVxeComponent.ts b/src/components/jeecg/JVxeTable/src/types/JVxeComponent.ts new file mode 100644 index 0000000..1e7009a --- /dev/null +++ b/src/components/jeecg/JVxeTable/src/types/JVxeComponent.ts @@ -0,0 +1,87 @@ +import { ComponentInternalInstance, ExtractPropTypes } from 'vue'; +import { useJVxeCompProps } from '/@/components/jeecg/JVxeTable/hooks'; + +export namespace JVxeComponent { + export type Props = ExtractPropTypes>; + + interface EnhancedCtx { + props?: JVxeComponent.Props; + context?: any; + } + + /** 组件增强类型 */ + export interface Enhanced { + // 注册参数(详见:https://xuliangzhan_admin.gitee.io/vxe-table/v4/table/renderer/edit) + installOptions: { + // 自动聚焦的 class 类名 + autofocus?: string; + } & Recordable; + // 事件拦截器(用于兼容) + interceptor: { + // 已实现:event.clearActived + // 说明:比如点击了某个组件的弹出层面板之后,此时被激活单元格不应该被自动关闭,通过返回 false 可以阻止默认的行为。 + 'event.clearActived'?: (params, event, target, ctx?: EnhancedCtx) => boolean; + // 自定义:event.clearActived.className + // 说明:比原生的多了一个参数:className,用于判断点击的元素的样式名(递归到顶层) + 'event.clearActived.className'?: (params, event, target, ctx?: EnhancedCtx) => boolean; + }; + // 【功能开关】 + switches: { + // 是否使用 editRender 模式(仅当前组件,并非全局) + // 如果设为true,则表头上方会出现一个可编辑的图标 + editRender?: boolean; + // false = 组件触发后可视);true = 组件一直可视 + visible?: boolean; + }; + // 【切面增强】切面事件处理,一般在某些方法执行后同步执行 + aopEvents: { + // 单元格被激活编辑时会触发该事件 + editActived?: (this: ComponentInternalInstance, ...args) => any; + // 单元格编辑状态下被关闭时会触发该事件 + editClosed?: (this: ComponentInternalInstance, ...args) => any; + // 返回值决定单元格是否可以编辑 + activeMethod?: (this: ComponentInternalInstance, ...args) => boolean; + }; + // 【翻译增强】可以实现例如select组件保存的value,但是span模式下需要显示成text + translate: { + // 是否启用翻译 + enabled?: boolean; + /** + * 【翻译处理方法】如果handler留空,则使用默认的翻译方法 + * + * @param value 需要翻译的值 + * @returns{*} 返回翻译后的数据 + */ + handler?: (value, ctx?: EnhancedCtx) => any; + }; + /** + * 【获取值增强】组件抛出的值 + * + * @param value 保存到数据库里的值 + * @returns{*} 返回处理后的值 + */ + getValue: (value, ctx?: EnhancedCtx) => any; + /** + * 【设置值增强】设置给组件的值 + * + * @param value 组件触发的值 + * @returns{*} 返回处理后的值 + */ + setValue: (value, ctx?: EnhancedCtx) => any; + /** + * 【新增行增强】在用户点击新增时触发的事件,返回新行的默认值 + * + * @param defaultValue 默认值 + * @param row 行数据 + * @param column 列配置,.params 是用户配置的参数 + * @param $table vxe 实例 + * @param renderOptions 渲染选项 + * @param params 可以在这里获取 $table + * + * @returns 返回新值 + */ + createValue: (defaultValue: any, ctx?: EnhancedCtx) => any; + } + + export type EnhancedPartial = Partial; +} diff --git a/src/components/jeecg/JVxeTable/src/types/JVxeTypes.ts b/src/components/jeecg/JVxeTable/src/types/JVxeTypes.ts new file mode 100644 index 0000000..c6e7d7b --- /dev/null +++ b/src/components/jeecg/JVxeTable/src/types/JVxeTypes.ts @@ -0,0 +1,60 @@ +/** 组件类型 */ +export enum JVxeTypes { + // 行号列 + rowNumber = 'row-number', + // 选择列 + rowCheckbox = 'row-checkbox', + // 单选列 + rowRadio = 'row-radio', + // 展开列 + rowExpand = 'row-expand', + // 上下排序 + rowDragSort = 'row-drag-sort', + + input = 'input', + inputNumber = 'input-number', + textarea = 'textarea', + select = 'select', + date = 'date', + datetime = 'datetime', + time = 'time', + checkbox = 'checkbox', + upload = 'upload', + // 下拉搜索 + selectSearch = 'select-search', + // 下拉多选 + selectMultiple = 'select-multiple', + // 进度条 + progress = 'progress', + //部门选择 + departSelect = 'depart-select', + //用户选择 + userSelect = 'user-select', + + // 拖轮Tags(暂无用) + tags = 'tags', // TODO 待实现 + + slot = 'slot', + normal = 'normal', + hidden = 'hidden', + + // 以下为自定义组件 + popup = 'popup', + selectDictSearch = 'selectDictSearch', + radio = 'radio', + image = 'image', + file = 'file', + // 省市区 + pca = 'pca', +} + +// 为了防止和 vxe 内置的类型冲突,所以加上一个前缀 +// 前缀是自动加的,代码中直接用就行(JVxeTypes.input) +export const JVxeTypePrefix = 'j-'; + +/** VxeTable 渲染类型 */ +export enum JVxeRenderType { + editer = 'editer', + spaner = 'spaner', + default = 'default', +} diff --git a/src/components/jeecg/JVxeTable/src/types/index.ts b/src/components/jeecg/JVxeTable/src/types/index.ts new file mode 100644 index 0000000..a7dca8e --- /dev/null +++ b/src/components/jeecg/JVxeTable/src/types/index.ts @@ -0,0 +1,120 @@ +import type { Component, Ref, ComputedRef, ExtractPropTypes } from 'vue'; +import type { VxeColumnProps } from 'vxe-table/types/column'; +import type { JVxeComponent } from './JVxeComponent'; +import type { VxeGridInstance, VxeTablePropTypes } from 'vxe-table'; +import { JVxeTypes } from './JVxeTypes'; +import { vxeProps } from '../vxe.data'; +import { useMethods } from '../hooks/useMethods'; +import { getJVxeAuths } from '../utils/authUtils'; + +export type JVxeTableProps = Partial>>; +export type JVxeTableMethods = ReturnType['methods']; + +export type JVxeVueComponent = { + enhanced?: JVxeComponent.EnhancedPartial; +} & Component; + +type statisticsTypes = 'sum' | 'average'; + +export type JVxeColumn = IJVxeColumn & Recordable; + +/** + * JVxe 列配置项 + */ +export interface IJVxeColumn extends VxeColumnProps { + type?: any; + // 行唯一标识 + key: string; + // 表单预期值的提示信息,可以使用${...}变量替换文本 + placeholder?: string; + // 默认值 + defaultValue?: any; + // 是否禁用当前列,默认false + disabled?: boolean; + // 校验规则 TODO 类型待定义 + validateRules?: any; + // 联动下一级的字段key + linkageKey?: string; + // 自定义传入组件的其他属性 + props?: Recordable; + allowClear?: boolean; // 允许清除 + // 【inputNumber】是否是统计列,只有 inputNumber 才能设置统计列。统计列:sum 求和;average 平均值 + statistics?: boolean | [statisticsTypes, statisticsTypes?]; + // 【select】 + dictCode?: string; // 字典 code + options?: { title?: string; label?: string; text?: string; value: any; disabled?: boolean }[]; // 下拉选项列表 + allowInput?: boolean; // 允许输入 + allowSearch?: boolean; // 允许搜索 + // 【slot】 + slotName?: string; // 插槽名 + // 【checkbox】 + customValue?: [any, any]; // 自定义值 + defaultChecked?: boolean; // 默认选中 + // 【upload】 upload + btnText?: string; // 上传按钮文字 + token?: boolean; // 是否传递 token + responseName?: string; // 返回取值名称 + action?: string; // 上传地址 + allowRemove?: boolean; // 是否允许删除 + allowDownload?: boolean; // 是否允许下载 + // 【下拉字典搜索】 + dict?: string; // 字典表配置信息:数据库表名,显示字段名,存储字段名 + async?: boolean; // 是否同步模式 + tipsContent?: string; + // 【popup】 + popupCode?: string; + field?: string; + orgFields?: string; + destFields?: string; +} + +export interface JVxeRefs { + gridRef: Ref; + subPopoverRef: Ref; + detailsModalRef: Ref; +} + +export interface JVxeDataProps { + prefixCls: string; + // vxe 实例ID + caseId: string; + // vxe 最终 columns + vxeColumns?: ComputedRef; + // vxe 最终 dataSource + vxeDataSource: Ref; + // 记录滚动条位置 + scroll: { top: number; left: number }; + // 当前是否正在滚动 + scrolling: Ref; + // vxe 默认配置 + defaultVxeProps: object; + // 绑定左侧选择框 + selectedRows: Ref; + // 绑定左侧选择框已选择的id + selectedRowIds: Ref; + disabledRowIds: string[]; + // 统计列配置 + statistics: { + has: boolean; + sum: string[]; + average: string[]; + }; + // 所有和当前表格相关的授权信息 + authsMap: Ref>>; + // 内置 EditRules + innerEditRules: Recordable; + // 联动下拉选项(用于隔离不同的下拉选项) + // 内部联动配置,map + innerLinkageConfig: Map; + // 开启了数据刷新效果的行 + reloadEffectRowKeysMap: Recordable; +} + +export interface JVxeLinkageConfig { + // 联动第一级的 key + key: string; + // 获取数据的方法 + requestData: (parent: string) => Promise; +} + +export { JVxeTypes }; diff --git a/src/components/jeecg/JVxeTable/src/utils/authUtils.ts b/src/components/jeecg/JVxeTable/src/utils/authUtils.ts new file mode 100644 index 0000000..c57b810 --- /dev/null +++ b/src/components/jeecg/JVxeTable/src/utils/authUtils.ts @@ -0,0 +1,49 @@ +/* JVxeTable 行编辑 权限 */ +import { usePermissionStoreWithOut } from '/@/store/modules/permission'; + +/** + * JVxe 专用,获取权限 + * @param prefix + */ +export function getJVxeAuths(prefix) { + const permissionStore = usePermissionStoreWithOut(); + prefix = getPrefix(prefix); + let { authList, allAuthList } = permissionStore; + let authsMap = new Map(); + if (!prefix || prefix.length == 0) { + return authsMap; + } + // 将所有vxe用到的权限取出来 + for (let auth of allAuthList) { + if (auth.status == '1' && (auth.action || '').startsWith(prefix)) { + authsMap.set(auth.action, { ...auth, isAuth: false }); + } + } + // 设置是否已授权 + for (let auth of authList) { + let getAuth = authsMap.get(auth.action); + if (getAuth != null) { + getAuth.isAuth = true; + } + } + //update-begin-author:taoyan date:2022-6-1 for: VUEN-1162 子表按钮没控制 + let onlineButtonAuths = permissionStore.getOnlineSubTableAuth(prefix); + if (onlineButtonAuths && onlineButtonAuths.length > 0) { + for (let auth of onlineButtonAuths) { + authsMap.set(prefix + 'btn:' + auth, { action: auth, type: 1, status: 1, isAuth: false }); + } + } + //update-end-author:taoyan date:2022-6-1 for: VUEN-1162 子表按钮没控制 + return authsMap; +} + +/** + * 获取前缀 + * @param prefix + */ +export function getPrefix(prefix: string) { + if (prefix && !prefix.endsWith(':')) { + return prefix + ':'; + } + return prefix; +} diff --git a/src/components/jeecg/JVxeTable/src/utils/enhancedUtils.ts b/src/components/jeecg/JVxeTable/src/utils/enhancedUtils.ts new file mode 100644 index 0000000..32c3466 --- /dev/null +++ b/src/components/jeecg/JVxeTable/src/utils/enhancedUtils.ts @@ -0,0 +1,55 @@ +import { useDefaultEnhanced } from '../hooks/useJVxeComponent'; +import { isFunction, isObject, isString } from '/@/utils/is'; +import { JVxeTypes } from '../types'; +import { JVxeComponent } from '../types/JVxeComponent'; +import { componentMap } from '../componentMap'; + +// 已注册的组件增强 +const enhancedMap = new Map(); + +/** + * 获取某个组件的增强 + * @param type JVxeTypes + */ +export function getEnhanced(type: JVxeTypes | string): JVxeComponent.Enhanced { + let $type: JVxeTypes = type; + if (!enhancedMap.has($type)) { + let defaultEnhanced = useDefaultEnhanced(); + if (componentMap.has($type)) { + let enhanced = componentMap.get($type)?.enhanced ?? {}; + if (isObject(enhanced)) { + Object.keys(defaultEnhanced).forEach((key) => { + let def = defaultEnhanced[key]; + if (enhanced.hasOwnProperty(key)) { + // 方法如果存在就不覆盖 + if (!isFunction(def) && !isString(def)) { + enhanced[key] = Object.assign({}, def, enhanced[key]); + } + } else { + enhanced[key] = def; + } + }); + enhancedMap.set($type, enhanced); + return enhanced; + } + } else { + throw new Error(`[JVxeTable] ${$type} 组件尚未注册,获取增强失败`); + } + enhancedMap.set($type, defaultEnhanced); + } + return enhancedMap.get($type); +} + +/** 辅助方法:替换${...}变量 */ +export function replaceProps(col, value) { + if (value && typeof value === 'string') { + let text = value; + text = text.replace(/\${title}/g, col.title); + text = text.replace(/\${key}/g, col.key); + text = text.replace(/\${defaultValue}/g, col.defaultValue); + return text; + } + return value; +} + + diff --git a/src/components/jeecg/JVxeTable/src/utils/registerUtils.ts b/src/components/jeecg/JVxeTable/src/utils/registerUtils.ts new file mode 100644 index 0000000..fdff0e0 --- /dev/null +++ b/src/components/jeecg/JVxeTable/src/utils/registerUtils.ts @@ -0,0 +1,143 @@ +import type { Component } from 'vue'; +import { h } from 'vue'; +import VXETable from 'vxe-table'; +import { definedComponent, addComponent, componentMap, spanEnds, excludeKeywords } from '../componentMap'; +import { JVxeRenderType, JVxeTypePrefix, JVxeTypes } from '../types/JVxeTypes'; +import { getEnhanced } from './enhancedUtils'; +import { isFunction } from '/@/utils/is'; + +/** + * 判断某个组件是否已注册 + * @param type + */ +export function isRegistered(type: JVxeTypes | string) { + if (excludeKeywords.includes(type)) { + return true; + } + return componentMap.has(type); +} + +/** + * 注册vxe自定义组件 + * + * @param type + * @param component 编辑状态显示的组件 + * @param spanComponent 非编辑状态显示的组件,可以为空 + */ +export function registerComponent(type: JVxeTypes, component: Component, spanComponent?: Component) { + addComponent(type, component, spanComponent); + registerOneComponent(type); +} + +/** + * 异步注册vxe自定义组件 + * + * @param type + * @param promise + */ +export async function registerAsyncComponent(type: JVxeTypes, promise: Promise) { + const result = await promise; + if (isFunction(result.installJVxe)) { + result.install((component: Component, spanComponent?: Component) => { + addComponent(type, component, spanComponent); + registerOneComponent(type); + }); + } else { + addComponent(type, result.default); + registerOneComponent(type); + } +} + +/** + * 2024-03-08 + * liaozhiyang + * 异步注册vxe自定义组件 + * 【QQYUN-8241】 + * @param type + * @param promise + */ +export function registerASyncComponentReal(type: JVxeTypes, component) { + addComponent(type, component); + registerOneComponent(type); +} + +/** + * 安装所有vxe组件 + */ +export function registerAllComponent() { + definedComponent(); + // 遍历所有组件批量注册 + const components = [...componentMap.keys()]; + components.forEach((type) => { + if (!type.endsWith(spanEnds)) { + registerOneComponent(type); + } + }); +} + +/** + * 注册单个vxe组件 + * + * @param type 组件 type + */ +export function registerOneComponent(type: JVxeTypes) { + const component = componentMap.get(type); + if (component) { + const switches = getEnhanced(type).switches; + if (switches.editRender && !switches.visible) { + createEditRender(type, component); + } else { + createCellRender(type, component); + } + } else { + throw new Error(`【registerOneComponent】"${type}"不存在于componentMap中`); + } +} + +/** 注册可编辑组件 */ +function createEditRender(type: JVxeTypes, component: Component, spanComponent?: Component) { + // 获取当前组件的增强 + const enhanced = getEnhanced(type); + if (!spanComponent) { + if (componentMap.has(type + spanEnds)) { + spanComponent = componentMap.get(type + spanEnds); + } else { + // 默认的 span 组件为 normal + spanComponent = componentMap.get(JVxeTypes.normal); + } + } + // 添加渲染 + VXETable.renderer.add(JVxeTypePrefix + type, { + // 可编辑模板 + renderEdit: createRender(type, component, JVxeRenderType.editer), + // 显示模板 + renderCell: createRender(type, spanComponent, JVxeRenderType.spaner), + // 增强注册 + ...enhanced.installOptions, + }); +} + +/** 注册普通组件 */ +function createCellRender(type: JVxeTypes, component: Component = componentMap.get(JVxeTypes.normal)) { + // 获取当前组件的增强 + const enhanced = getEnhanced(type); + VXETable.renderer.add(JVxeTypePrefix + type, { + // 默认显示模板 + renderDefault: createRender(type, component, JVxeRenderType.default), + // 增强注册 + ...enhanced.installOptions, + }); +} + +function createRender(type, component, renderType) { + return function (renderOptions, params) { + return [ + h(component, { + type: type, + params: params, + renderOptions: renderOptions, + renderType: renderType, + }), + ]; + }; +} diff --git a/src/components/jeecg/JVxeTable/src/utils/vxeUtils.ts b/src/components/jeecg/JVxeTable/src/utils/vxeUtils.ts new file mode 100644 index 0000000..108fd67 --- /dev/null +++ b/src/components/jeecg/JVxeTable/src/utils/vxeUtils.ts @@ -0,0 +1,21 @@ +/** + * + * 根据 tagName 获取父级节点 + * + * @param dom 一级dom节点 + * @param tagName 标签名,不区分大小写 + */ +export function getParentNodeByTagName(dom: HTMLElement, tagName: string = 'body'): HTMLElement | null { + if (tagName === 'body') { + return document.body; + } + if (dom.parentElement) { + if (dom.parentElement.tagName.toLowerCase() === tagName.trim().toLowerCase()) { + return dom.parentElement; + } else { + return getParentNodeByTagName(dom.parentElement, tagName); + } + } else { + return null; + } +} diff --git a/src/components/jeecg/JVxeTable/src/vxe.data.ts b/src/components/jeecg/JVxeTable/src/vxe.data.ts new file mode 100644 index 0000000..e558ed8 --- /dev/null +++ b/src/components/jeecg/JVxeTable/src/vxe.data.ts @@ -0,0 +1,125 @@ +import { propTypes } from '/@/utils/propTypes'; + +export const vxeProps = () => ({ + rowKey: propTypes.string.def('id'), + // 列信息 + columns: { + type: Array, + required: true, + }, + // 数据源 + dataSource: { + type: Array, + required: true, + }, + authPre: { + type: String, + required: false, + default: '', + }, + // 是否显示工具栏 + toolbar: propTypes.bool.def(false), + // 工具栏配置 + toolbarConfig: propTypes.object.def(() => ({ + // prefix 前缀;suffix 后缀; + slots: ['prefix', 'suffix'], + // add 新增按钮;remove 删除按钮;clearSelection 清空选择按钮;collapse 展开收起 + btns: ['add', 'remove', 'clearSelection'], + })), + // 是否显示行号 + rowNumber: propTypes.bool.def(false), + // 固定行号位置或者不固定 【QQYUN-8405】 + rowNumberFixed: propTypes.oneOf(['left', 'none']).def('left'), + // update-begin--author:liaozhiyang---date:20240509---for:【issues/1162】JVxeTable列过长(出现横向滚动条)时无法拖拽排序 + dragSortFixed: propTypes.oneOf(['left', 'none']).def('left'), + rowSelectionFixed: propTypes.oneOf(['left', 'none']).def('left'), + // update-end--author:liaozhiyang---date:20240509---for:【issues/1162】JVxeTable列过长(出现横向滚动条)时无法拖拽排序 + // 是否可选择行 + rowSelection: propTypes.bool.def(false), + // 选择行类型 + rowSelectionType: propTypes.oneOf(['checkbox', 'radio']).def('checkbox'), + // 是否可展开行 + rowExpand: propTypes.bool.def(false), + // 展开行配置 + expandConfig: propTypes.object.def(() => ({})), + // 是否可插入行 + insertRow: propTypes.bool.def(true), + // 页面是否在加载中 + loading: propTypes.bool.def(false), + // 表格高度 + height: propTypes.oneOfType([propTypes.number, propTypes.string]).def('auto'), + // 最大高度 + maxHeight: { + type: Number, + default: () => null, + }, + // 要禁用的行 + disabledRows: propTypes.object.def(() => ({})), + // 是否禁用全部组件 + disabled: propTypes.bool.def(false), + // 是否可拖拽排序(有固定列的情况下无法拖拽排序,仅可上下排序) + dragSort: propTypes.bool.def(false), + // 排序字段保存的Key + sortKey: propTypes.string.def('orderNum'), + // 排序序号开始值,默认为 0 + sortBegin: propTypes.number.def(0), + // 大小,可选值有:medium(中)、small(小)、mini(微) + size: propTypes.oneOf(['medium', 'small', 'mini']).def('medium'), + // 是否显示边框线 + bordered: propTypes.bool.def(false), + // 自定义列配置 默认继承 setup.toolbar.custom + custom: propTypes.bool.def(false), + // 分页器参数,设置了即可显示分页器 + pagination: propTypes.object.def(() => ({})), + // 点击行时是否显示子表单 + clickRowShowSubForm: propTypes.bool.def(false), + // 点击行时是否显示主表单 + clickRowShowMainForm: propTypes.bool.def(false), + // 是否点击选中行,优先级最低 + clickSelectRow: propTypes.bool.def(false), + // 是否开启 reload 数据效果 + reloadEffect: propTypes.bool.def(false), + // 校验规则 + editRules: propTypes.object.def(() => ({})), + // 是否异步删除行,如果你要实现异步删除,那么需要把这个选项开启, + // 在remove事件里调用confirmRemove方法才会真正删除(除非删除的全是新增的行) + asyncRemove: propTypes.bool.def(false), + // 是否一直显示组件,如果为false则只有点击的时候才出现组件 + // 注:该参数不能动态修改;如果行、列字段多的情况下,会根据机器性能造成不同程度的卡顿。 + // TODO 新版vxe-table取消了 visible 参数,导致无法实现该功能 + alwaysEdit: propTypes.bool.def(false), + // 联动配置,数组,详情配置见文档 + linkageConfig: propTypes.array.def(() => []), + // 是否开启使用 webSocket 无痕刷新 + socketReload: propTypes.bool.def(false), + // 相同的socketKey更改时会互相刷新 + socketKey: propTypes.string.def('vxe-default'), + // 新增行时切换行的激活状态 + addSetActive: propTypes.bool.def(true), + // 是否开启键盘编辑 + keyboardEdit: propTypes.bool.def(false), + // update-begin--author:liaozhiyang---date:20231013---for:【QQYUN-5133】JVxeTable 行编辑升级 + // 横向虚拟滚动配置(不支持展开行) + // 【QQYUN-7676】x滚动条滚动时字典变成了id + scrollX: propTypes.object.def(() => ({ enabled: false })), + // 纵向虚拟滚动配置(不支持展开行) + scrollY: propTypes.object.def(() => ({ enabled: true })), + // update-end--author:liaozhiyang---date:20231013---for:【QQYUN-5133】JVxeTable 行编辑升级 + //【QQYUN-8566】缓存列设置的key(路由页面内唯一) + cacheColumnsKey: propTypes.string.def(''), + // update-begin--author:liaozhiyang---date:20240417---for:【QQYUN-8785】online表单列位置的id未做限制,拖动其他列到id列上面,同步数据库时报错 + rowClassName: { + type: [String, Function], + default: null, + }, + // 不允许拖拽的行 [{'key':field,'value':value}] + notAllowDrag: propTypes.array.def(() => []), + // update-end--author:liaozhiyang---date:20240417---for:【QQYUN-8785】online表单列位置的id未做限制,拖动其他列到id列上面,同步数据库时报错 + + // 新增按钮配置 + addBtnCfg: propTypes.object, + // 删除按钮配置 + removeBtnCfg: propTypes.object, +}); + +export const vxeEmits = ['save', 'added', 'removed', 'inserted', 'dragged', 'selectRowChange', 'pageChange', 'valueChange', 'blur']; diff --git a/src/components/jeecg/JVxeTable/types.ts b/src/components/jeecg/JVxeTable/types.ts new file mode 100644 index 0000000..7e668f7 --- /dev/null +++ b/src/components/jeecg/JVxeTable/types.ts @@ -0,0 +1,6 @@ +import JVxeTable from './src/JVxeTable'; + +export type { JVxeComponent } from './src/types/JVxeComponent'; +export type { JVxeColumn, JVxeLinkageConfig } from './src/types'; +export { JVxeTypes } from './src/types/JVxeTypes'; +export type JVxeTableInstance = InstanceType; diff --git a/src/components/jeecg/JVxeTable/utils.ts b/src/components/jeecg/JVxeTable/utils.ts new file mode 100644 index 0000000..287c45f --- /dev/null +++ b/src/components/jeecg/JVxeTable/utils.ts @@ -0,0 +1,132 @@ +import type { Ref, ComponentInternalInstance } from 'vue'; +import { unref, isRef } from 'vue'; +import { isFunction } from '/@/utils/is'; + +type dispatchEventOptions = { + // JVxeTable 的 props + props; + // 触发的 event 事件对象 + $event; + // 行、列 + row?; + column?; + // JVxeTable的vue3实例 + instance?: ComponentInternalInstance | any; + // 要寻找的className + className: string; + // 重写找到dom后的处理方法 + handler?: Fn; + // 是否直接执行click方法而不是模拟click事件 + isClick?: boolean; +}; + +/** 模拟触发事件 */ +export function dispatchEvent(options: dispatchEventOptions) { + const { props, $event, row, column, instance, className, handler, isClick } = options; + if ((!$event || !$event.path) && !instance) { + return; + } + // alwaysEdit 下不模拟触发事件,否者会导致触发两次 + if (props && props.alwaysEdit) { + return; + } + let getCell = () => { + let paths: HTMLElement[] = [...($event?.path ?? [])]; + // 通过 instance 获取 cell dom对象 + if (row && column) { + let selector = `table.vxe-table--body tbody tr[rowid='${row.id}'] td[colid='${column.id}']`; + let cellDom = instance!.vnode?.el?.querySelector(selector); + // -update-begin--author:liaozhiyang---date:20230830---for:【QQYUN-6390】解决online新增字段警告(兼容下) + if (!cellDom) { + cellDom = instance!.$el?.querySelector(selector); + } + // -update-begin--author:liaozhiyang---date:20230830---for:【QQYUN-6390】解决online新增字段警告(兼容下) + if (cellDom) { + paths.unshift(cellDom); + } + } + for (const el of paths) { + if (el.classList?.contains('vxe-body--column')) { + return el; + } + } + return null; + }; + let cell = getCell(); + if (cell) { + window.setTimeout(() => { + let getElement = () => { + let classList = className.split(' '); + if (classList.length > 0) { + const getClassName = (cls: string) => { + if (cls.startsWith('.')) { + return cls.substring(1, cls.length); + } + return cls; + }; + let get = (target, className, idx = 0) => { + let elements = target.getElementsByClassName(getClassName(className)); + if (elements && elements.length > 0) { + return elements[idx]; + } + return null; + }; + let element: HTMLElement = get(cell, classList[0]); + for (let i = 1; i < classList.length; i++) { + if (!element) { + break; + } + element = get(element, classList[i]); + } + return element; + } + return null; + }; + let element = getElement(); + if (element) { + if (isFunction(handler)) { + handler(element); + } else { + // 模拟触发点击事件 + if (isClick) { + element.click(); + } else { + element.dispatchEvent($event); + } + } + } + }, 10); + } else { + console.warn('【JVxeTable】dispatchEvent 获取 cell 失败'); + } +} + +/** 绑定 VxeTable 数据 */ +export function vModel(value, row, column: Ref | string) { + // @ts-ignore + let property = isRef(column) ? column.value.property : column; + unref(row)[property] = value; +} + +/** + * liaozhiyang + * 2024-06-20 + * 判断当前行编辑是否使用了虚拟滚动(并不是开启了就是,还得满足数据数量大于gt值) + */ +export function isEnabledVirtualYScroll(props, xTable): boolean { + let isRealEnabledVirtual = false; + const isEnabledVScroll = props?.scrollY?.enabled; + // 100是底层的默认值 + const gtYNum = props?.scrollY?.gt || 100; + if (isEnabledVScroll) { + const tableFullData = xTable.internalData.tableFullData; + if (gtYNum === 0) { + isRealEnabledVirtual = true; + } else { + if (tableFullData.length > gtYNum) { + isRealEnabledVirtual = true; + } + } + } + return isRealEnabledVirtual; +} diff --git a/src/components/jeecg/OnLine/JPopupOnlReport.vue b/src/components/jeecg/OnLine/JPopupOnlReport.vue new file mode 100644 index 0000000..5c02b16 --- /dev/null +++ b/src/components/jeecg/OnLine/JPopupOnlReport.vue @@ -0,0 +1,306 @@ + + + + + diff --git a/src/components/jeecg/OnLine/SearchFormItem.vue b/src/components/jeecg/OnLine/SearchFormItem.vue new file mode 100644 index 0000000..cb766d0 --- /dev/null +++ b/src/components/jeecg/OnLine/SearchFormItem.vue @@ -0,0 +1,327 @@ + + + + + diff --git a/src/components/jeecg/OnLine/hooks/usePopBiz.ts b/src/components/jeecg/OnLine/hooks/usePopBiz.ts new file mode 100644 index 0000000..f172d23 --- /dev/null +++ b/src/components/jeecg/OnLine/hooks/usePopBiz.ts @@ -0,0 +1,993 @@ +import { reactive, ref, unref, defineAsyncComponent, toRaw, markRaw, isRef, watch, onUnmounted } from 'vue'; +import { httpGroupRequest } from '/@/components/Form/src/utils/GroupRequest'; +import { defHttp } from '/@/utils/http/axios'; +import { filterMultiDictText } from '/@/utils/dict/JDictSelectUtil.js'; +import { useMessage } from '/@/hooks/web/useMessage'; +import { OnlineColumn } from '/@/components/jeecg/OnLine/types/onlineConfig'; +import { h } from 'vue'; +import { useRouter, useRoute } from 'vue-router'; +import { useMethods } from '/@/hooks/system/useMethods'; +import { importViewsFile, _eval } from '/@/utils'; +import {getToken} from "@/utils/auth"; +import {replaceUserInfoByExpression} from "@/utils/common/compUtils"; +import { isString } from '/@/utils/is'; + +export function usePopBiz(ob, tableRef?) { + // update-begin--author:liaozhiyang---date:20230811---for:【issues/675】子表字段Popup弹框数据不更新 + let props: any; + if (isRef(ob)) { + props = ob.value; + const stopWatch = watch(ob, (newVal) => { + props = newVal; + }); + onUnmounted(() => stopWatch()); + } else { + props = ob; + } + // update-end--author:liaozhiyang---date:20230811---for:【issues/675】子表字段Popup弹框数据不更新 + const { createMessage } = useMessage(); + //弹窗可视状态 + const visible = ref(false); + //表格加载 + const loading = ref(false); + //cgRpConfigId + const cgRpConfigId = ref(''); + //标题 + const title = ref('列表'); + // 排序字段,默认无排序 + const iSorter = ref(''); + // 查询对象 + const queryInfo = ref([]); + // 查询参数 + const queryParam = ref({}); + // 动态参数 + const dynamicParam = ref({}); + //字典配置项 + const dictOptions = ref({}); + //数据集 + const dataSource = ref>([]); + //定义表格信息 + const columns = ref>([]); + // 当前路由 + const route = useRoute(); + //定义请求url信息 + const configUrl = reactive({ + //列表页加载column和data + getColumnsAndData: '/online/cgreport/api/getColumnsAndData/', + getColumns: '/online/cgreport/api/getRpColumns/', + getData: '/online/cgreport/api/getData/', + getQueryInfo: '/online/cgreport/api/getQueryInfo/', + export: '/online/cgreport/api/exportManySheetXls/', + }); + //已选择的值 + const checkedKeys = ref>([]); + //选择的行记录 + const selectRows = ref>([]); + // 点击单元格选中行 popup需要 但是报表预览不需要 + let clickThenCheckFlag = true; + if (props.clickToRowSelect === false) { + clickThenCheckFlag = false; + } + + /** + * 选择列配置 + */ + const rowSelection = { + fixed: true, + type: props.multi ? 'checkbox' : 'radio', + selectedRowKeys: checkedKeys, + selectionRows: selectRows, + onChange: onSelectChange, + }; + + /** + * 序号列配置 + */ + const indexColumnProps = { + dataIndex: 'index', + width: '15px', + }; + /** + * 分页配置 + */ + const pagination = reactive({ + current: 1, + pageSize: 10, + pageSizeOptions: ['10', '20', '30'], + // showTotal: (total, range) => { + // return range[0] + '-' + range[1] + ' 共' + total + '条' + // }, + showQuickJumper: true, + showSizeChanger: true, + total: 0, + // 合计逻辑 [待优化 3.0] + showTotal: (total) => onShowTotal(total), + realPageSize: 10, + realTotal: 0, + // 是否有合计列,默认为"",在第一次获取到数据之后会设计为ture或者false + isTotal: '', + onShowSizeChange: (current, pageSize) => onSizeChange(current, pageSize), + }); + + /** + * 表格选择事件 + * @param selectedRowKeys + * @param selectRow + */ + function onSelectChange(selectedRowKeys: (string | number)[]) { + // update-begin--author:liaozhiyang---date:20240105---for:【QQYUN-7514】popup单选显示radio + if (!props.multi) { + selectRows.value = []; + checkedKeys.value = []; + // update-begin--author:liaozhiyang---date:20240717---for:【issues/6883】单选模式第二次打开已勾选 + // selectedRowKeys = [selectedRowKeys[selectedRowKeys.length - 1]]; + // update-end--author:liaozhiyang---date:20240717---for:【issues/6883】单选模式第二次打开已勾选 + } + // update-end--author:liaozhiyang---date:20240105---for:【QQYUN-7514】popup单选显示radio + // update-begin--author:liaozhiyang---date:20230919---for:【QQYUN-4263】跨页选择导出问题 + if (!selectedRowKeys || selectedRowKeys.length == 0) { + selectRows.value = []; + checkedKeys.value = []; + } else { + if (selectRows.value.length > selectedRowKeys.length) { + // 取消 + selectRows.value.forEach((item, index) => { + const rowKey = combineRowKey(item); + if (!selectedRowKeys.find((key) => key === rowKey)) { + selectRows.value.splice(index, 1); + } + }); + } else { + // 新增 + const append: any = []; + const beforeRowKeys = selectRows.value.map((item) => combineRowKey(item)); + selectedRowKeys.forEach((key) => { + if (!beforeRowKeys.find((item) => item === key)) { + // 那就是新增选中的行 + const row = getRowByKey(key); + row && append.push(row); + } + }); + selectRows.value = [...selectRows.value, ...append]; + } + checkedKeys.value = [...selectedRowKeys]; + } + // update-end--author:liaozhiyang---date:20230919---for:【QQYUN-4263】跨页选择导出问题 + } + /** + * 过滤没用选项 + * @param selectedRowKeys + */ + function filterUnuseSelect() { + selectRows.value = unref(selectRows).filter((item) => { + let combineKey = combineRowKey(item); + return unref(checkedKeys).indexOf(combineKey) >= 0; + }); + } + + /** + * 根据key获取row信息 + * @param key + */ + function getRowByKey(key) { + let row = unref(dataSource).filter((record) => combineRowKey(record) === key); + return row && row.length > 0 ? row[0] : ''; + } + + /** + * 加载rowKey + */ + function combineRowKey(record) { + let res = record?.id || ''; + if (props?.rowkey) { + // update-begin--author:liaozhiyang---date:20250415--for:【issues/3656】popupdict回显 + res = record[props.rowkey]; + // update-end--author:liaozhiyang---date:20250415--for:【issues/3656】popupdict回显 + } else { + Object.keys(record).forEach((key) => { + res = key == 'rowIndex' ? record[key] + res : res + record[key]; + }); + res = res.length > 50 ? res.substring(0, 50) : res; + } + return res; + } + + /** + * 加载列信息 + */ + function loadColumnsInfo() { + const {code} = handleCodeParams(true) + let url = `${configUrl.getColumns}${code}`; + //缓存key + let groupIdKey = props.groupId ? `${props.groupId}${url}` : ''; + httpGroupRequest(() => defHttp.get({ url }, { isTransformResponse: false, successMessageMode: 'none' }), groupIdKey).then((res) => { + if (res.success) { + initDictOptionData(res.result.dictOptions); + cgRpConfigId.value = res.result.cgRpConfigId; + title.value = res.result.cgRpConfigName; + let currColumns = res.result.columns; + for (let a = 0; a < currColumns.length; a++) { + if (currColumns[a].customRender) { + let dictCode = currColumns[a].customRender; + currColumns[a].customRender = ({ text }) => { + return filterMultiDictText(unref(dictOptions)[dictCode], text + ''); + }; + } + // 排序字段受控 + if (unref(iSorter) && currColumns[a].dataIndex === unref(iSorter).column) { + currColumns[a].sortOrder = unref(iSorter).order === 'asc' ? 'ascend' : 'descend'; + } + } + // update-begin--author:liaozhiyang---date:20250114---for:【issues/946】popup列宽和在线报表列宽读取配置 + currColumns.forEach((item) => { + if (item.fieldWidth != null) { + if (isString(item.fieldWidth) && item.fieldWidth.trim().length == 0) return; + item.width = item.fieldWidth; + delete item.fieldWidth; + } + }); + // update-end--author:liaozhiyang---date:20250114---for:【issues/946】popup列宽和在线报表列宽读取配置 + if (currColumns[0].key !== 'rowIndex') { + currColumns.unshift({ + title: '序号', + dataIndex: 'rowIndex', + key: 'rowIndex', + width: 60, + align: 'center', + customRender: function ({ text }) { + // update-begin--author:liaozhiyang---date:20231226---for:【QQYUN-7584】popup有合计时序号列会出现NaN + if (text == undefined) { + return ''; + } else { + return parseInt(text) + 1; + } + // update-end--author:liaozhiyang---date:20231226---for:【QQYUN-7584】popup有合计时序号列会出现NaN + }, + }); + } + columns.value = [...currColumns]; + initQueryInfo(null); + } + }); + } + + /** + * 加载列和数据[列表专用] + */ + function loadColumnsAndData() { + // 第一次加载 置空isTotal 在这里调用确保 该方法只是进入页面后 加载一次 其余查询不走该方法 + pagination.isTotal = ''; + let url = `${configUrl.getColumnsAndData}${props.id}`; + + const {query} = handleCodeParams() + if (query) { + url = url + query + } + //缓存key + let groupIdKey = props.groupId ? `${props.groupId}${url}` : ''; + httpGroupRequest(() => defHttp.get({ url }, { isTransformResponse: false, successMessageMode: 'none' }), groupIdKey).then((res) => { + if (res.success) { + initDictOptionData(res.result.dictOptions); + cgRpConfigId.value = props.id; + let { columns: metaColumnList, cgreportHeadName, fieldHrefSlots, isGroupTitle } = res.result; + title.value = cgreportHeadName; + // href 跳转 + const fieldHrefSlotKeysMap = {}; + fieldHrefSlots.forEach((item) => (fieldHrefSlotKeysMap[item.slotName] = item)); + let currColumns: any = handleColumnHrefAndDict(metaColumnList, fieldHrefSlotKeysMap); + // update-begin--author:liaozhiyang---date:20250114---for:【issues/946】popup列宽和在线报表列宽读取配置 + currColumns.forEach((item) => { + if (isString(item.fieldWidth) && item.fieldWidth.trim().length == 0) return; + if (item.fieldWidth != null) { + item.width = item.fieldWidth; + delete item.fieldWidth; + } + }); + // update-end--author:liaozhiyang---date:20250114---for:【issues/946】popup列宽和在线报表列宽读取配置 + + // popup需要序号, 普通列表不需要 + if (clickThenCheckFlag === true) { + currColumns.unshift({ + title: '序号', + dataIndex: 'rowIndex', + key: 'rowIndex', + width: 60, + align: 'center', + customRender: function ({ text }) { + return parseInt(text) + 1; + }, + }); + } + + // 合并表头 + if (isGroupTitle === true) { + currColumns = handleGroupTitle(currColumns); + } + columns.value = [...currColumns]; + initQueryInfo(res.result.data); + } else { + //update-begin-author:taoyan date:20220401 for: VUEN-583【vue3】JeecgBootException: sql黑名单校验不通过,请联系管理员!,前台无提示 + createMessage.warning(res.message); + //update-end-author:taoyan date:20220401 for: VUEN-583【vue3】JeecgBootException: sql黑名单校验不通过,请联系管理员!,前台无提示 + } + }); + } + + // 处理动态参数和系统变量 + function handleCodeParams(onlyCode: boolean = false) { + if (!props.code) { + return {code: '', query: ''} + } + const firstIndex = props.code.indexOf('?') + if (firstIndex === -1) { + return {code: props.code, query: ''} + } + const code = props.code.substring(0, firstIndex) + if (onlyCode) { + return {code: code, query: ''} + } + const queryOrigin = props.code.substring(firstIndex, props.code.length); + let query: string + // 替换系统变量 + query = replaceUserInfoByExpression(queryOrigin) + // 获取表单值 + if (typeof props.getFormValues === 'function') { + const values = props.getFormValues() + // 替换动态参数,如果有 ${xxx} 则替换为实际值 + query = query.replace(/\${([^}]+)}/g, (_$0, $1) => { + if (values[$1] == null) { + return '' + } + return values[$1] + }); + + } + + return {code, query, queryOrigin} + } + + /** + * 处理求和的列 合计逻辑 [待优化 3.0] + */ + function handleSumColumn(metaColumnList: OnlineColumn[], dataTotal: number): void { + // 获取需要合计列的dataIndex + let sumColumnList = getNeedSumColumns(metaColumnList); + // 判断是否为第一次获取数据,如果是的话,则需要重新设置pageSize + if (pagination.isTotal == '') { + if (sumColumnList.length > 0) { + pagination.isTotal = true; + // 有合计字段时,每次最多查询原pageSize-1条记录,另外需要第一次时将查询的10条中删除最后一条 + // 删除最后一条数据 如果第一次得到的数据长度等于pageSize的话,则删除最后一条 + if (dataSource.value.length == pagination.pageSize) { + let remove_data = dataSource.value.pop(); + } + pagination.realPageSize = pagination.pageSize - 1; + } else { + pagination.isTotal = false; + } + } + // 需要添加合计字段 + if (pagination.isTotal) { + let totalRow = {}; + sumColumnList.forEach((dataIndex) => { + let count = 0; + dataSource.value.forEach((row) => { + // 统计去除null及空数据 + if (row[dataIndex] != null && row[dataIndex] != '') { + count += parseFloat(row[dataIndex]); + } + }); + totalRow[dataIndex] = isNaN(count) ? '包含非数字内容' : count.toFixed(2); + + // 长整形时合计不显示.00后缀 + let v = metaColumnList.find((v) => v.dataIndex == dataIndex); + if (v && v.fieldType == 'Long') { + totalRow[dataIndex] = parseInt(totalRow[dataIndex]); + } + }); + dataSource.value.push(totalRow); + pagination.realTotal = dataTotal; + pagination.total = Number(dataTotal) + Number(Math.floor(dataTotal / pagination.realPageSize)); + } + } + + /** + * 获取需要求和的列 dataIndex + * @param columns + */ + function getNeedSumColumns(columns: OnlineColumn[]): string[] { + let arr: string[] = []; + for (let column of columns) { + if (column.isTotal === '1') { + arr.push(column.dataIndex!); + } + // 【VUEN-1569】【online报表】合计无效 + if (column.children && column.children.length > 0) { + let subArray = getNeedSumColumns(column.children); + if (subArray.length > 0) { + arr.push(...subArray); + } + } + } + return arr; + } + + /** + * 处理列的href和字典翻译 + */ + function handleColumnHrefAndDict(columns: OnlineColumn[], fieldHrefSlotKeysMap: {}): OnlineColumn[] { + for (let column of columns) { + let { customRender, hrefSlotName, fieldType } = column; + // online 报表中类型配置为日期(yyyy-MM-dd ),但是实际展示为日期时间格式(yyyy-MM-dd HH:mm:ss) issues/3042 + if (fieldType == 'Date') { + column.customRender = ({ text }) => { + if (!text) { + return ''; + } + if (text.length > 10) { + return text.substring(0, 10); + } + return text; + }; + } else { + if (!hrefSlotName && column.scopedSlots && column.scopedSlots.customRender) { + //【Online报表】字典和href互斥 这里通过fieldHrefSlotKeysMap 先找到是href的列 + if (fieldHrefSlotKeysMap.hasOwnProperty(column.scopedSlots.customRender)) { + hrefSlotName = column.scopedSlots.customRender; + } + } + // 如果 customRender 有值则代表使用了字典 + // 如果 hrefSlotName 有值则代表使用了href跳转 + // 两者可以兼容。兼容的具体思路为:先获取到字典替换的值,再添加href链接跳转 + if (customRender || hrefSlotName) { + let dictCode = customRender as string; + let replaceFlag = '_replace_text_'; + column.customRender = ({ text, record }) => { + let value = text; + // 如果 dictCode 有值,就进行字典转换 + if (dictCode) { + if (dictCode.startsWith(replaceFlag)) { + let textFieldName = dictCode.replace(replaceFlag, ''); + value = record[textFieldName]; + } else { + value = filterMultiDictText(unref(dictOptions)[dictCode], text + ''); + } + } + // 扩展参数设置列的内容长度 + if (column.showLength) { + if (value && value.length > column.showLength) { + value = value.substr(0, column.showLength) + '...'; + } + } + // 如果 hrefSlotName 有值,就生成一个 a 标签,包裹住字典替换后(或原生)的值 + if (hrefSlotName) { + let field = fieldHrefSlotKeysMap[hrefSlotName]; + if (field) { + return h( + 'a', + { + onClick: () => handleClickFieldHref(field, record), + }, + value + ); + } + } + return value; + }; + } + } + } + return columns; + } + + /** + * 处理合并表头 + * @param columns + */ + function handleGroupTitle(columns: OnlineColumn[]): OnlineColumn[] { + let newColumns: OnlineColumn[] = []; + for (let column of columns) { + //排序字段受控 ---- 此逻辑为新增逻辑 待 + if (unref(iSorter) && column.dataIndex === unref(iSorter).column) { + column.sortOrder = unref(iSorter).order === 'asc' ? 'ascend' : 'descend'; + } + //判断字段是否需要合并表头 + if (column.groupTitle) { + let clIndex = newColumns.findIndex((im) => im.title === column.groupTitle); + if (clIndex !== -1) { + //表头已存在直接push children + newColumns[clIndex].children!.push(column); + } else { + //表头不存在组装表头信息 + let clGroup: OnlineColumn = {}, + child: OnlineColumn[] = []; + child.push(column); + clGroup.title = column.groupTitle; + clGroup.align = 'center'; + clGroup.children = child; + newColumns.push(clGroup); + } + } else { + newColumns.push(column); + } + } + return newColumns; + } + + // 获取路由器对象 href跳转用到 + let router = useRouter(); + /** + * href 点击事件 + * @param field + * @param record + */ + function handleClickFieldHref(field, record) { + let href = field.href; + let urlPattern = /(ht|f)tp(s?)\:\/\/[0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*(:(0-9)*)*(\/?)([a-zA-Z0-9\-\.\?\,\'\/\\\+&%\$#_]*)?/; + let compPattern = /\.vue(\?.*)?$/; + let jsPattern = /{{([^}]+)}}/g; // {{ xxx }} + if (typeof href === 'string') { + href = href.trim().replace(/\${([^}]+)?}/g, (s1, s2) => record[s2]); + // 执行 {{...}} JS增强语句 + if (jsPattern.test(href)) { + href = href.replace(jsPattern, function (text, s0) { + try { + // 支持 {{ ACCESS_TOKEN }} 占位符 + if (s0.trim() === 'ACCESS_TOKEN') { + return getToken() + } + + // update-begin--author:liaozhiyang---date:20230904---for:【QQYUN-6390】eval替换成new Function,解决build警告 + return _eval(s0); + // update-end--author:liaozhiyang---date:20230904---for:【QQYUN-6390】eval替换成new Function,解决build警告 + } catch (e) { + console.error(e); + return text; + } + }); + } + if (urlPattern.test(href)) { + window.open(href, '_blank'); + } else if (compPattern.test(href)) { + // 处理弹框 + openHrefCompModal(href); + } else { + router.push(href); + } + } + } + + /** + * 导出 + */ + function handleExport() { + const { handleExportXls } = useMethods(); + let url = `${configUrl.export}${cgRpConfigId.value}`; + let params = getQueryParams(); //查询条件 + // 【VUEN-1568】如果选中了某些行,就只导出选中的行 + let keys = unref(checkedKeys); + if (keys.length > 0) { + keys = keys + .map((i) => selectRows.value.find((item) => combineRowKey(item) === i)?.id) + .filter((i) => i != null && i !== ''); + // 判断是否有ID字段 + if (keys.length === 0) { + createMessage.warning('由于数据中缺少ID字段,故无法使用选中导出功能'); + return; + } + params['force_id'] = keys.join(','); + } + handleExportXls(title.value, url, params); + } + + /** + * 合计逻辑 [待优化 3.0] + * 分页 大小改变事件 + * @param _current + * @param size + */ + function onSizeChange(_current, size) { + pagination.isTotal = ''; + pagination.pageSize = size; + if (pagination.isTotal) { + pagination.realPageSize = size - 1; + } else { + pagination.realPageSize = size; + } + pagination.current = 1; + } + + /** + * 合计逻辑 [待优化 3.0] + * 显示总条数 + * @param total + */ + function onShowTotal(total) { + // 重新根据是否有合计计算每页显示的数据 + let start = (pagination.current - 1) * pagination.realPageSize + 1; + let end = start + (pagination.isTotal ? dataSource.value.length - 1 : dataSource.value.length) - 1; + let realTotal = pagination.isTotal ? pagination.realTotal : total; + return start + '-' + end + ' 共' + realTotal + '条'; + } + + /** + * 弹出框显示隐藏触发事件 + */ + async function visibleChange($event) { + visible.value = $event; + $event && loadColumnsInfo(); + } + + /** + * 初始化查询条件 + * @param data 数据结果集 + */ + function initQueryInfo(data) { + let url = `${configUrl.getQueryInfo}${unref(cgRpConfigId)}`; + //缓存key + let groupIdKey = props.groupId ? `${props.groupId}${url}` : ''; + httpGroupRequest(() => defHttp.get({ url }, { isTransformResponse: false, successMessageMode: 'none' }), groupIdKey).then((res) => { + // console.log("获取查询条件", res); + if (res.success) { + dynamicParamHandler(res.result); + queryInfo.value = res.result; + console.log('queryInfo==>', queryInfo.value); + //查询条件加载后再请求数据 + if (data) { + setDataSource(data); + //传递路由参数和动态参数,不生效, + loadData(1); + } else { + //没有传递data时查询数据 + loadData(1); + } + } else { + createMessage.warning(res.message); + } + }); + } + + /** + * 加载表格数据 + * @param arg + */ + function loadData(arg?) { + if (arg == 1) { + pagination.current = 1; + } + let params = getQueryParams(); //查询条件 + params['onlRepUrlParamStr'] = getUrlParamString(); + console.log('params', params); + loading.value = true; + // update-begin--author:liaozhiyang---date:20240603---for:【TV360X-578】online报表SQL翻译,第二页不翻页数据 + let url = `${configUrl.getColumnsAndData}${unref(cgRpConfigId)}`; + // update-end--author:liaozhiyang---date:20240603---for:【TV360X-578】online报表SQL翻译,第二页不翻页数据 + const {query} = handleCodeParams() + if (query) { + url = url + query + } + //缓存key + let groupIdKey = props.groupId ? `${props.groupId}${url}${JSON.stringify(params)}` : ''; + httpGroupRequest(() => defHttp.get({ url, params }, { isTransformResponse: false, successMessageMode: 'none' }), groupIdKey).then((res) => { + // update-begin--author:liaozhiyang---date:20240603---for:【TV360X-578】online报表SQL翻译,第二页不翻页数据 + res.result.dictOptions && initDictOptionData(res.result.dictOptions); + // update-end--author:liaozhiyang---date:20240603---for:【TV360X-578】online报表SQL翻译,第二页不翻页数据 + loading.value = false; + // update-begin--author:liaozhiyang---date:20240603---for:【TV360X-578】online报表SQL翻译,第二页不翻页数据 + let data = res.result.data; + // update-end--author:liaozhiyang---date:20240603---for:【TV360X-578】online报表SQL翻译,第二页不翻页数据 + console.log('表格信息:', data); + setDataSource(data); + }); + } + + /** + * 获取地址栏的参数 + */ + function getUrlParamString() { + let query = route.query; + let arr:any[] = [] + if(query && Object.keys(query).length>0){ + Object.keys(query).map(k=>{ + arr.push(`${k}=${query[k]}`) + }) + } + return arr.join('&') + } + + /** + * 设置dataSource + */ + function setDataSource(data) { + if (data) { + pagination.total = Number(data.total); + let currentPage = pagination?.current ?? 1; + for (let a = 0; a < data.records.length; a++) { + if (!data.records[a].rowIndex) { + data.records[a].rowIndex = a + (currentPage - 1) * 10; + } + } + dataSource.value = data.records; + //update-begin-author:taoyan date:2023-2-11 for:issues/356 在线报表分页有问题 + //update-begin-author:liusq date:2023-4-04 for:issues/426 修复356时候引入的回归错误 JPopupOnlReportModal.vue 中未修改 + tableRef?.value && tableRef?.value?.setPagination({ + total: Number(data.total) + }) + //update-end-author:liusq date:2023-4-04 for:issues/426 修复356时候引入的回归错误 JPopupOnlReportModal.vue 中未修改 + //update-end-author:taoyan date:2023-2-11 for:issues/356 在线报表分页有问题 + } else { + pagination.total = 0; + dataSource.value = []; + } + // 合计逻辑 [待优化 3.0] + handleSumColumn(columns.value, pagination.total); + } + + /** + * 获取查询参数 + */ + function getQueryParams() { + let paramTarget = {}; + if (unref(dynamicParam)) { + //处理自定义参数 + Object.keys(unref(dynamicParam)).map((key) => { + paramTarget['self_' + key] = unref(dynamicParam)[key]; + }); + } + let param = Object.assign(paramTarget, unref(queryParam), unref(iSorter)); + param.pageNo = pagination.current; + // 合计逻辑 [待优化 3.0] + // 实际查询时不使用table组件的pageSize,而使用自定义的realPageSize,realPageSize会在第一次获取到数据后变化 + param.pageSize = pagination.realPageSize; + return filterObj(param); + } + + /** + * 处理动态参数 + */ + function dynamicParamHandler(arr?) { + if (arr && arr.length > 0) { + //第一次加载查询条件前 初始化queryParam为空对象 + let queryTemp = {}; + for (let item of arr) { + if (item.mode === 'single') { + queryTemp[item.field] = ''; + } + } + queryParam.value = { ...queryTemp }; + } + // 合并路由参数 + if (props.routeQuery) { + queryParam.value = Object.assign(queryParam.value, props.routeQuery); + } + + let dynamicTemp = {}; + if (props.param) { + Object.keys(props.param).map((key) => { + let str = props.param[key]; + if (key in queryParam) { + if (str && str.startsWith("'") && str.endsWith("'")) { + str = str.substring(1, str.length - 1); + } + //如果查询条件包含参数 设置值 + unref(queryParam)[key] = str; + } + dynamicTemp[key] = props.param[key]; + }); + } + dynamicParam.value = { ...dynamicTemp }; + } + + /** + * 分页 + * @param page + * @param filters + * @param sorter + */ + function handleChangeInTable(page, filters, sorter) { + console.log(page, filters, sorter); + //分页、排序、筛选变化时触发 + if (Object.keys(sorter).length > 0) { + iSorter.value = { + column: sorter.field, + order: 'ascend' === sorter.order ? 'asc' : 'desc', + }; + // 排序字段受控 + unref(columns).forEach((col) => { + if (col['dataIndex'] === sorter.field) { + col['sortOrder'] = sorter.order; + } + }); + } + pagination.current = page.current; + pagination.pageSize = page.pageSize; + loadData(); + } + + /** + * 行点击事件 + * @param record + */ + function clickThenCheck(record) { + if (clickThenCheckFlag === true) { + // update-begin--author:liaozhiyang---date:20240104---for:【QQYUN-7514】popup单选显示radio + if (!props.multi) { + selectRows.value = []; + checkedKeys.value = []; + } + // update-end--author:liaozhiyang---date:20240104---for:【QQYUN-7514】popup单选显示radio + let rowKey = combineRowKey(record); + if (!unref(checkedKeys) || unref(checkedKeys).length == 0) { + let arr1: any[] = [], + arr2: any[] = []; + arr1.push(record); + arr2.push(rowKey); + checkedKeys.value = arr2; + //selectRows.value = arr1; + } else { + if (unref(checkedKeys).indexOf(rowKey) < 0) { + //不存在就选中 + checkedKeys.value.push(rowKey); + //selectRows.value.push(record); + } else { + //已选中就取消 + let rowKey_index = unref(checkedKeys).indexOf(rowKey); + checkedKeys.value.splice(rowKey_index, 1); + //selectRows.value.splice(rowKey_index, 1); + } + } + // update-begin--author:liaozhiyang---date:20230914---for:【issues/5357】点击行选中 + tableRef.value.setSelectedRowKeys([...checkedKeys.value]); + // update-end--author:liaozhiyang---date:20230914---for:【issues/5357】点击行选中 + } + } + + //防止字典中有垃圾数据 + function initDictOptionData(arr) { + let obj = {}; + Object.keys(arr).map((k) => { + obj[k] = arr[k].filter((item) => { + return item != null; + }); + }); + dictOptions.value = obj; + } + + /** + * 过滤对象中为空的属性 + * @param obj + * @returns {*} + */ + function filterObj(obj) { + if (!(typeof obj == 'object')) { + return; + } + + for (let key in obj) { + if (obj.hasOwnProperty(key) && (obj[key] == null || obj[key] == undefined || obj[key] === '')) { + delete obj[key]; + } + } + return obj; + } + + // 样式 + const dialogStyle = { + top: 0, + left: 0, + height: '100%', + margin: 0, + padding: 0, + }; + + // 弹窗属性配置 + const hrefComponent = ref({ + model: { + title: '', + okText: '关闭', + width: '100%', + open: false, + destroyOnClose: true, + style: dialogStyle, + // dialogStyle: dialogStyle, + bodyStyle: { + padding: '8px', + height: 'calc(100vh - 108px)', + overflow: 'auto', + overflowX: 'hidden', + }, + // 隐藏掉取消按钮 + cancelButtonProps: { style: { display: 'none' } }, + }, + on: { + ok: () => (hrefComponent.value.model.open = false), + cancel: () => (hrefComponent.value.model.open = false), + }, + is: null, + params: {}, + }); + + // 超链点击事件--> 打开一个modal窗口 + function openHrefCompModal(href) { + // 解析 href 参数 + let index = href.indexOf('?'); + let path = href; + if (index !== -1) { + path = href.substring(0, index); + let paramString = href.substring(index + 1, href.length); + let paramArray = paramString.split('&'); + let params = {}; + paramArray.forEach((paramObject) => { + let paramItem = paramObject.split('='); + params[paramItem[0]] = paramItem[1]; + }); + hrefComponent.value.params = params; + } else { + hrefComponent.value.params = {}; + } + hrefComponent.value.model.open = true; + hrefComponent.value.model.title = '操作'; + hrefComponent.value.is = markRaw(defineAsyncComponent(() => importViewsFile(path))); + } + + //update-begin-author:taoyan date:2022-5-31 for: VUEN-1155 popup 选择数据时,会选择多条重复数据 + /** + * emit事件 获取选中的行数据 + */ + function getOkSelectRows(): any[] { + let arr = unref(selectRows); + let selectedRowKeys = checkedKeys.value; + console.log('arr', arr); + if (!selectedRowKeys || selectedRowKeys.length <= 0) { + return []; + } + if (!arr || arr.length <= 0) { + return []; + } + let rows: any = []; + for (let key of selectedRowKeys) { + for (let i = 0; i < arr.length; i++) { + let combineKey = combineRowKey(arr[i]); + if (key === combineKey) { + rows.push(toRaw(arr[i])); + break; + } + } + } + return rows; + } + //update-end-author:taoyan date:2022-5-31 for: VUEN-1155 popup 选择数据时,会选择多条重复数据 + + return [ + { + visibleChange, + loadColumnsInfo, + loadColumnsAndData, + dynamicParamHandler, + loadData, + handleChangeInTable, + combineRowKey, + clickThenCheck, + filterUnuseSelect, + handleExport, + getOkSelectRows, + }, + { + hrefComponent, + visible, + rowSelection, + checkedKeys, + selectRows, + pagination, + dataSource, + columns, + indexColumnProps, + loading, + title, + iSorter, + queryInfo, + queryParam, + dictOptions, + }, + ]; +} diff --git a/src/components/jeecg/OnLine/types/onlineConfig.ts b/src/components/jeecg/OnLine/types/onlineConfig.ts new file mode 100644 index 0000000..84e4662 --- /dev/null +++ b/src/components/jeecg/OnLine/types/onlineConfig.ts @@ -0,0 +1,44 @@ +interface ScopedSlots { + customRender: string; +} + +interface HrefSlots { + // 链接地址 + href: string; + // fieldHref_字段名 + slotName: string; +} + +interface OnlineColumn { + dataIndex?: string; + title?: string; + key?: string; + fieldType?: string; + width?: number | string; + align?: string; + sorter?: string | boolean; + isTotal?: string | number | boolean; + groupTitle?: string; + // 超链的时候 和HrefSlots中的slotName匹配 + scopedSlots?: ScopedSlots; + // 一般用于字典 字典传过来的是字典编码字符串 后转函数 + customRender?: string | Function; + // 这个类型不知道有什么用 + hrefSlotName?: string; + showLength?: number | string; + children?: OnlineColumn[]; + sortOrder?: string; + // 插槽对应控件类型(列表) + slots?: ScopedSlots; + //超过宽度将自动省略,暂不支持和排序筛选一起使用。 + ellipsis?: boolean; + // 是否固定列 + fixed?: boolean | 'left' | 'right'; + //字段类型 int/string + dbType?:string; + //他表字段用 + linkField?:string; + fieldExtendJson?:string +} + +export { OnlineColumn, HrefSlots }; diff --git a/src/components/jeecg/UserAvatar.vue b/src/components/jeecg/UserAvatar.vue new file mode 100644 index 0000000..e459fe8 --- /dev/null +++ b/src/components/jeecg/UserAvatar.vue @@ -0,0 +1,142 @@ + + + + + diff --git a/src/components/jeecg/captcha/CaptchaModal.vue b/src/components/jeecg/captcha/CaptchaModal.vue new file mode 100644 index 0000000..c20c8c6 --- /dev/null +++ b/src/components/jeecg/captcha/CaptchaModal.vue @@ -0,0 +1,135 @@ + + + + + diff --git a/src/components/jeecg/comment/CommentFiles.vue b/src/components/jeecg/comment/CommentFiles.vue new file mode 100644 index 0000000..393001e --- /dev/null +++ b/src/components/jeecg/comment/CommentFiles.vue @@ -0,0 +1,185 @@ + + + + + diff --git a/src/components/jeecg/comment/CommentList.vue b/src/components/jeecg/comment/CommentList.vue new file mode 100644 index 0000000..499869a --- /dev/null +++ b/src/components/jeecg/comment/CommentList.vue @@ -0,0 +1,371 @@ + + + + + diff --git a/src/components/jeecg/comment/CommentPanel.vue b/src/components/jeecg/comment/CommentPanel.vue new file mode 100644 index 0000000..ce85a03 --- /dev/null +++ b/src/components/jeecg/comment/CommentPanel.vue @@ -0,0 +1,111 @@ + + + + + diff --git a/src/components/jeecg/comment/DataLogList.vue b/src/components/jeecg/comment/DataLogList.vue new file mode 100644 index 0000000..5a443b4 --- /dev/null +++ b/src/components/jeecg/comment/DataLogList.vue @@ -0,0 +1,177 @@ + + + + + diff --git a/src/components/jeecg/comment/HistoryFileList.vue b/src/components/jeecg/comment/HistoryFileList.vue new file mode 100644 index 0000000..ba039ee --- /dev/null +++ b/src/components/jeecg/comment/HistoryFileList.vue @@ -0,0 +1,88 @@ + + + + + diff --git a/src/components/jeecg/comment/MyComment.vue b/src/components/jeecg/comment/MyComment.vue new file mode 100644 index 0000000..a104672 --- /dev/null +++ b/src/components/jeecg/comment/MyComment.vue @@ -0,0 +1,455 @@ + + + + + diff --git a/src/components/jeecg/comment/UploadChunk.vue b/src/components/jeecg/comment/UploadChunk.vue new file mode 100644 index 0000000..1de433a --- /dev/null +++ b/src/components/jeecg/comment/UploadChunk.vue @@ -0,0 +1,137 @@ + + + + + diff --git a/src/components/jeecg/comment/comment.less b/src/components/jeecg/comment/comment.less new file mode 100644 index 0000000..5b9b64a --- /dev/null +++ b/src/components/jeecg/comment/comment.less @@ -0,0 +1,252 @@ +/*文件上传列表-begin*/ +.selected-file-warp, +.comment-file-his-list { + margin: 10px 20px; + &.in-comment{ + margin: 10px 6px; + } +} +.selected-file-list { + display: flex; + flex-wrap: wrap; + justify-content: space-between; + margin-right: -6px; + .item { + box-sizing: border-box; + display: inline-block; + flex: 1 1 0%; + height: 118px; + margin: 0 6px 6px 0; + min-width: 140px; + max-width: 200px; + width: 150px; + &.empty { + height: 0; + margin-bottom: 0; + margin-top: 0; + } + .complex { + border: 1px solid #e0e0e0; + box-sizing: border-box; + height: 100%; + position: relative; + .content { + display: flex; + flex-direction: column; + height: 100%; + box-sizing: border-box; + .content-top { + align-items: center; + background-color: #f5f5f5; + display: flex; + flex: 1 1 0%; + justify-content: center; + .content-icon { + background-position: 50%; + background-size: contain !important; + height: 55px; + width: 40px; + display: inline-block; + overflow: hidden; + text-align: left; + text-indent: -9999px; + } + .content-image{ + background-position: 50%; + background-repeat: no-repeat; + background-size: cover; + height: 100%; + width: 100%; + } + } + .content-bottom { + align-items: center; + background-color: #fff; + display: flex; + flex-basis: 30px; + font-size: 13px; + justify-content: flex-start; + padding: 0 10px; + span { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + } + } + .layer { + opacity: 0; + background-color: #f5f5f5; + cursor: pointer; + display: flex; + flex-direction: column; + height: 100%; + left: 0; + position: absolute; + top: 0; + transition: opacity 0.2s; + width: 100%; + &:hover { + opacity: 1; + } + .next { + height: 75px; + padding: 5px; + .text { + color: rgba(51, 51, 51, 0.6) !important; + align-items: center; + display: flex; + flex-basis: 30px; + font-size: 12px; + justify-content: flex-start; + padding: 3px 7px 4px; + word-break: break-all; + display: -webkit-box; + line-height: 14px; + overflow: hidden; + text-overflow: ellipsis; + } + } + .buttons { + flex-basis: 32px; + text-align: right; + display: flex; + align-items: flex-end; + padding-right: 5px; + justify-content: flex-end; + .opt-icon { + background-color: #fff; + border-radius: 2px; + cursor: pointer; + height: 24px; + width: 32px; + margin: 5px; + text-align: center; + .anticon-delete:hover { + color: red; + } + .anticon-download:hover{ + color: #1e88e5 !important + } + } + } + } + .layer-image{ + background: #000; + &:hover { + opacity: 0.6; + } + .next{ + .text{ + color: #fff !important; + } + } + .opt-icon{ + color: #000 !important; + .anticon-delete:hover { + color: red; + } + } + } + + } + } +} + +.jeecg-comment-files { + margin: 0 20px; + padding-top: 3px; + padding-bottom: 3px; + &.ant-alert-info{ + background-color: #f5f5f5; + border: 1px solid #f5f5f5; + } + .j-icon { + cursor: pointer; + display: inline-block; + border: 1px solid #e6f7ff; + padding: 2px 7px; + margin: 0 10px; + &:hover, + &:focus, + &:active { + border-color: #fff; + color: #096dd9; + } + .inner-button { + display: inline-block; + color:#9e9e9e; + &:hover, + &:focus, + &:active { + /*border-color: #fff;*/ + /* color: #096dd9;*/ + color: #000; + } + span{ + margin-right: 3px; + } + } + } +} + +.comment-file-list { + .detail-item { + display: flex; + flex-direction: row; + align-items: stretch; + line-height: 24px; + border-bottom: 1px solid #f0f0f0; + height: 100%; + + .item-title { + display: flex; + align-items: center; + justify-content: flex-end; + flex-shrink: 0; + flex-grow: 0; + min-width: 100px; + width: 20%; + max-width: 220px; + background-color: #fafafa; + border-right: 1px solid #f0f0f0; + /* border-left: 1px solid #f0f0f0;*/ + padding: 10px 0; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + } + + .item-content { + border-right: 1px solid #f0f0f0; + flex-grow: 1; + padding-left: 10px; + display: flex; + align-items: center; + justify-content: flex-start; + .anticon { + &:hover { + color: #40a9ff; + } + } + } + } +} + +// update-begin--author:liaozhiyang---date:20240327---for:【QQYUN-8639】暗黑主题适配 +html[data-theme='dark'] { + .jeecg-comment-files { + &.ant-alert-info { + background-color: #141414; + border: 1px solid #3a3a3a; + } + .j-icon, + .j-icon:hover { + border-color: #3a3a3a; + .inner-button:hover { + color: #bebebe; + } + } + } +} +// update-end--author:liaozhiyang---date:20240327---for:【QQYUN-8639】暗黑主题适配 diff --git a/src/components/jeecg/comment/image/emoji.png b/src/components/jeecg/comment/image/emoji.png new file mode 100644 index 0000000..eaef1f3 Binary files /dev/null and b/src/components/jeecg/comment/image/emoji.png differ diff --git a/src/components/jeecg/comment/image/emoji_native.png b/src/components/jeecg/comment/image/emoji_native.png new file mode 100644 index 0000000..9efea64 Binary files /dev/null and b/src/components/jeecg/comment/image/emoji_native.png differ diff --git a/src/components/jeecg/comment/useComment.ts b/src/components/jeecg/comment/useComment.ts new file mode 100644 index 0000000..4520a5b --- /dev/null +++ b/src/components/jeecg/comment/useComment.ts @@ -0,0 +1,460 @@ +import { useMessage } from '/@/hooks/web/useMessage'; +import { defHttp } from '/@/utils/http/axios'; +import { useGlobSetting } from '/@/hooks/setting'; +const globSetting = useGlobSetting(); +const baseUploadUrl = globSetting.uploadUrl; +import { ref, toRaw, unref, reactive } from 'vue'; +import { uploadMyFile } from '/@/api/common/api'; + +import excel from '/@/assets/svg/fileType/excel.svg'; +import other from '/@/assets/svg/fileType/other.svg'; +import pdf from '/@/assets/svg/fileType/pdf.svg'; +import txt from '/@/assets/svg/fileType/txt.svg'; +import word from '/@/assets/svg/fileType/word.svg'; +import image from '/@/assets/svg/fileType/image.png'; +import { getFileAccessHttpUrl } from '/@/utils/common/compUtils'; +import { createImgPreview } from '/@/components/Preview'; +import data from "emoji-mart-vue-fast/data/apple.json"; +import { EmojiIndex } from "emoji-mart-vue-fast/src"; +import { encryptByBase64 } from '/@/utils/cipher'; + +enum Api { + list = '/sys/comment/listByForm', + addText = '/sys/comment/addText', + deleteOne = '/sys/comment/deleteOne', + fileList = '/sys/comment/fileList', + logList = '/sys/dataLog/queryDataVerList', + queryById = '/sys/comment/queryById', + getFileViewDomain = '/sys/comment/getFileViewDomain', +} + +// 文件预览地址的domain 在后台配置的 +let onlinePreviewDomain = ''; + +/** + * 获取文件预览的domain + */ +const getViewFileDomain = () => defHttp.get({ url: Api.getFileViewDomain }); + +/** + * 列表接口 + * @param params + */ +export const list = (params) => defHttp.get({ url: Api.list, params }); + +export function getGloablEmojiIndex(){ + if(window['myEmojiIndex']){ + console.log("----走window['myEmojiIndex']缓存,不new新对象!") + return window['myEmojiIndex']; + } + + window['myEmojiIndex'] = new EmojiIndex(data, { + function() { + return true; + }, + exclude:['recent','people','nature','foods','activity','places','objects','symbols','flags'] + }); + return window['myEmojiIndex']; +} + +/** + * 查询单条记录 + * @param params + */ +export const queryById = (id) => { + let params = { id: id }; + return defHttp.get({ url: Api.queryById, params },{ isTransformResponse: false }); +}; + +/** + * 文件列表接口 + * @param params + */ +export const fileList = (params) => defHttp.get({ url: Api.fileList, params }); + +/** + * 删除单个 + */ +export const deleteOne = (params) => { + return defHttp.delete({ url: Api.deleteOne, params }, { joinParamsToUrl: true }); +}; + +/** + * 保存 + * @param params + */ +export const saveOne = (params) => { + let url = Api.addText; + return defHttp.post({ url: url, params }, { isTransformResponse: false }); +}; + +/** + * 数据日志列表接口 + * @param params + */ +export const getLogList = (params) => defHttp.get({ url: Api.logList, params }, {isTransformResponse: false}); + + +/** + * 文件上传接口 + */ +export const uploadFileUrl = `${baseUploadUrl}/sys/comment/addFile`; + +export function useCommentWithFile(props) { + let uploadData = { + biz: 'comment', + commentId: '', + }; + const { createMessage } = useMessage(); + const buttonLoading = ref(false); + + //确定按钮触发 + async function saveCommentAndFiles(obj, fileList) { + buttonLoading.value = true; + setTimeout(() => { + buttonLoading.value = false; + }, 500); + await saveComment(obj); + await uploadFiles(fileList); + } + + /** + * 保存评论 + */ + async function saveComment(obj) { + const {fromUserId, toUserId, commentId, commentContent} = obj; + let commentData = { + tableId: props.tableId, + tableName: props.tableName, + tableDataId: props.dataId, + fromUserId, + commentContent, + toUserId: '', + commentId: '' + }; + if(toUserId){ + commentData.toUserId = toUserId; + } + if(commentId){ + commentData.commentId = commentId; + } + uploadData.commentId = ''; + const res = await saveOne(commentData); + if (res.success) { + uploadData.commentId = res.result; + } else { + createMessage.warning(res.message); + return Promise.reject('保存评论失败'); + } + } + + async function uploadOne(file) { + let url = uploadFileUrl; + const formData = new FormData(); + formData.append('file', file); + formData.append('tableName', props.tableName); + formData.append('tableDataId', props.dataId); + Object.keys(uploadData).map((k) => { + formData.append(k, uploadData[k]); + }); + return new Promise((resolve, reject) => { + uploadMyFile(url, formData).then((res: any) => { + console.log('uploadMyFile', res); + if (res && res.data) { + if (res.data.result == 'success') { + resolve(1); + } else { + createMessage.warning(res.data.message); + reject(); + } + } else { + reject(); + } + }); + }); + } + + /** + * QQYUN-4310【文件】从文件库选择文件功能未做 + * @param file + */ + async function saveSysFormFile(file){ + let url = '/sys/comment/addFile'; + let params = { + fileId: file.id, + commentId: uploadData.commentId + } + await defHttp.post({url, params}, { joinParamsToUrl: true, isTransformResponse: false }); + } + + async function uploadFiles(fileList) { + if (fileList && fileList.length > 0) { + for (let i = 0; i < fileList.length; i++) { + let file = toRaw(fileList[i]); + if(file.exist === true){ + await saveSysFormFile(file); + }else{ + await uploadOne(file.originFileObj); + } + } + } + } + + return { + saveCommentAndFiles, + buttonLoading, + }; +} + +export function uploadMu(fileList) { + const formData = new FormData(); + // let arr = [] + for(let file of fileList){ + formData.append('files[]', file.originFileObj); + } + console.log(formData) + let url = `${baseUploadUrl}/sys/comment/addFile2`; + uploadMyFile(url, formData).then((res: any) => { + console.log('uploadMyFile', res); + }); +} + +/** + * 显示文件列表 + */ +export function useFileList() { + const imageSrcMap = reactive({}); + const typeMap = { + xls: excel, + xlsx: excel, + pdf: pdf, + txt: txt, + docx: word, + doc: word, + image + }; + function getBackground(item) { + console.log('获取文件背景图', item); + if (isImage(item)) { + return 'none' + } else { + const name = item.name; + if(!name){ + return 'none'; + } + const suffix = name.substring(name.lastIndexOf('.') + 1); + console.log('suffix', suffix) + let bg = typeMap[suffix]; + if (!bg) { + bg = other; + } + return bg; + } + } + + function getImageTypeIcon() { + return typeMap['image']; + } + + function getBase64(file, id){ + return new Promise((resolve, reject) => { + //声明js的文件流 + let reader = new FileReader(); + if(file){ + //通过文件流将文件转换成Base64字符串 + reader.readAsDataURL(file); + //转换成功后 + reader.onload = function () { + let base = reader.result; + console.log('base', base) + imageSrcMap[id] = base; + console.log('imageSrcMap', imageSrcMap) + resolve(base) + } + }else{ + reject(); + } + }) + } + function handleImageSrc(file){ + if(isImage(file)){ + let id = file.uid; + getBase64(file, id); + } + } + + function downLoad(file) { + let url = getFileAccessHttpUrl(file.url); + if (url) { + window.open(url); + } + } + + function getFileSize(item) { + let size = item.fileSize; + if (!size) { + return '0B'; + } + let temp = Math.round(size / 1024); + return temp + ' KB'; + } + + const selectFileList = ref([]); + function beforeUpload(file) { + handleImageSrc(file); + selectFileList.value = [...selectFileList.value, file]; + console.log('selectFileList', unref(selectFileList)); + return false + } + + function handleRemove(file) { + const index = selectFileList.value.indexOf(file); + const newFileList = selectFileList.value.slice(); + newFileList.splice(index, 1); + selectFileList.value = newFileList; + } + + function isImage(item){ + const type = item.type||''; + if (type.indexOf('image') >= 0) { + return true; + } + return false; + } + + function getImageSrc(file){ + if(file.exist){ + return getFileAccessHttpUrl(file.url); + } + if(isImage(file)){ + let id = file.uid; + if(id){ + if(imageSrcMap[id]){ + return imageSrcMap[id]; + } + }else if(file.url){ + //数据库中地址 + let url = getFileAccessHttpUrl(file.url); + return url; + } + } + return '' + } + + /** + * 显示图片 + * @param item + */ + function getImageAsBackground(item){ + let url; + if(item.exist){ + url = getFileAccessHttpUrl(item.url); + }else{ + url = getImageSrc(item); + } + if(url){ + return { + "backgroundImage": "url('"+url+"')" + } + } + return {} + } + + /** + * 预览列表 cell 图片 + * @param text + */ + async function viewImage(file) { + if(isImage(file)){ + let text = getImageSrc(file) + if (text) { + let imgList = [text]; + createImgPreview({ imageList: imgList }); + } + }else{ + if(file.url){ + //数据库中地址 + let url = getFileAccessHttpUrl(file.url); + await initViewDomain(); + //本地测试需要将文件地址的localhost/127.0.0.1替换成IP, 或是直接修改全局domain + //url = url.replace('localhost', '192.168.1.100') + //update-begin---author:scott ---date:2024-06-03 for:【TV360X-952】升级到kkfileview4.1.0--- + let previewUrl = encodeURIComponent(encryptByBase64(url)); + window.open(onlinePreviewDomain+'?url='+previewUrl); + //update-end---author:scott ---date::2024-06-03 for:【TV360X-952】升级到kkfileview4.1.0---- + } + } + } + + /** + * 初始化domain + */ + async function initViewDomain(){ + if(!onlinePreviewDomain){ + onlinePreviewDomain = await getViewFileDomain(); + } + if(!onlinePreviewDomain.startsWith('http')){ + onlinePreviewDomain = 'http://'+ onlinePreviewDomain; + } + } + + return { + selectFileList, + getBackground, + getFileSize, + downLoad, + beforeUpload, + handleRemove, + isImage, + getImageSrc, + getImageAsBackground, + viewImage, + getImageTypeIcon + }; +} + +/** + * 用于emoji渲染 + */ +export function useEmojiHtml(globalEmojiIndex){ + const COLONS_REGEX = new RegExp('([^:]+)?(:[a-zA-Z0-9-_+]+:(:skin-tone-[2-6]:)?)','g'); + + function getHtml(text) { + if(!text){ + return '' + } + return text.replace(COLONS_REGEX, function (match, p1, p2) { + const before = p1 || '' + if (endsWith(before, 'alt="') || endsWith(before, 'data-text="')) { + return match + } + let emoji = globalEmojiIndex.findEmoji(p2) + if (!emoji) { + return match + } + return before + emoji2Html(emoji) + }) + return text; + } + + function endsWith(str, temp){ + return str.endsWith(temp) + } + + function emoji2Html(emoji) { + let style = `position: absolute;top: -3px;left: 3px;width: 18px; height: 18px;background-position: ${emoji.getPosition()}` + return ` ` + } + + return { + globalEmojiIndex, + getHtml + } +} + +/** + * 获取modal窗体高度 + */ +export function getModalHeight(){ + return window.innerHeight; +} diff --git a/src/components/jeecg/thirdApp/JThirdAppButton.vue b/src/components/jeecg/thirdApp/JThirdAppButton.vue new file mode 100644 index 0000000..c6b7f79 --- /dev/null +++ b/src/components/jeecg/thirdApp/JThirdAppButton.vue @@ -0,0 +1,180 @@ + + + + + diff --git a/src/components/jeecg/thirdApp/JThirdAppDropdown.vue b/src/components/jeecg/thirdApp/JThirdAppDropdown.vue new file mode 100644 index 0000000..bb4230c --- /dev/null +++ b/src/components/jeecg/thirdApp/JThirdAppDropdown.vue @@ -0,0 +1,43 @@ + + + + + diff --git a/src/components/jeecg/thirdApp/jThirdApp.api.ts b/src/components/jeecg/thirdApp/jThirdApp.api.ts new file mode 100644 index 0000000..a3dfc04 --- /dev/null +++ b/src/components/jeecg/thirdApp/jThirdApp.api.ts @@ -0,0 +1,37 @@ +import { defHttp } from '/@/utils/http/axios'; +import { cloneObject } from '/@/utils/index'; + +export const backEndUrl = { + // 获取启用的第三方App + getEnabledType: '/sys/thirdApp/getEnabledType', + // 企业微信 + wechatEnterprise: { + user: '/sys/thirdApp/sync/wechatEnterprise/user', + depart: '/sys/thirdApp/sync/wechatEnterprise/depart', + }, + // 钉钉 + dingtalk: { + user: '/sys/thirdApp/sync/dingtalk/user', + depart: '/sys/thirdApp/sync/dingtalk/depart', + }, +}; +// 启用了哪些第三方App(在此缓存) +let enabledTypes = null; + +// 获取启用的第三方App +export const getEnabledTypes = async () => { + // 获取缓存 + if (enabledTypes != null) { + return cloneObject(enabledTypes); + } else { + let { success, result } = await defHttp.get({ url: backEndUrl.getEnabledType }, { isTransformResponse: false }); + if (success) { + // 在此缓存 + enabledTypes = cloneObject(result); + return result; + } else { + console.warn('getEnabledType查询失败:'); + } + } + return {}; +}; diff --git a/src/components/registerGlobComp.ts b/src/components/registerGlobComp.ts new file mode 100644 index 0000000..471f1f7 --- /dev/null +++ b/src/components/registerGlobComp.ts @@ -0,0 +1,130 @@ +import type { App } from 'vue'; +import { Icon } from './Icon'; +import AIcon from '/@/components/jeecg/AIcon.vue'; +//Tinymce富文本 + import Editor from '/@/components/Tinymce/src/Editor.vue' + +import { Button, JUploadButton } from './Button'; + +// 按需注册antd的组件 +import { + // Need + Button as AntButton, + Select, + Alert, + Checkbox, + DatePicker, + TimePicker, + Calendar, + Radio, + Switch, + Card, + List, + Tabs, + Descriptions, + Tree, + Table, + Divider, + Modal, + Drawer, + TreeSelect, + Dropdown, + Tag, + Tooltip, + Badge, + Popover, + Upload, + Transfer, + Steps, + PageHeader, + Result, + Empty, + Avatar, + Menu, + Breadcrumb, + Form, + Input, + Row, + Col, + Spin, + Space, + Layout, + Collapse, + Slider, + InputNumber, + Carousel, + Popconfirm, + Skeleton, + Cascader, + Rate, + Progress +} from 'ant-design-vue'; +const compList = [AntButton.Group, Icon, AIcon, JUploadButton]; + + +export function registerGlobComp(app: App) { + compList.forEach((comp) => { + app.component(comp.name || comp.displayName, comp); + }); + + //仪表盘依赖Tinymce,需要提前加载(没办法按需加载了) + app.component(Editor.name, Editor); + // update-begin--author:liaozhiyang---date:20240308---for:【QQYUN-8241】Tinymce异步加载 + // app.component( + // 'Tinymce', + // createAsyncComponent(() => import('./Tinymce/src/Editor.vue'), { + // loading: true, + // }) + // ); + // update-end--author:liaozhiyang---date:20240308---for:【QQYUN-8241】Tinymce异步加载 + app.use(Select) + .use(Alert) + .use(Button) + .use(Breadcrumb) + .use(Checkbox) + .use(DatePicker) + .use(TimePicker) + .use(Calendar) + .use(Radio) + .use(Switch) + .use(Card) + .use(List) + .use(Descriptions) + .use(Tree) + .use(TreeSelect) + .use(Table) + .use(Divider) + .use(Modal) + .use(Drawer) + .use(Dropdown) + .use(Tag) + .use(Tooltip) + .use(Badge) + .use(Popover) + .use(Upload) + .use(Transfer) + .use(Steps) + .use(PageHeader) + .use(Result) + .use(Empty) + .use(Avatar) + .use(Menu) + .use(Tabs) + .use(Form) + .use(Input) + .use(Row) + .use(Col) + .use(Spin) + .use(Space) + .use(Layout) + .use(Collapse) + .use(Slider) + .use(InputNumber) + .use(Carousel) + .use(Popconfirm) + .use(Skeleton) + .use(Cascader) + .use(Rate) + .use(Progress); + console.log("---初始化---, 全局注册Antd、仪表盘、流程设计器、online、流程等组件--------------") +} diff --git a/src/design/ant/btn.less b/src/design/ant/btn.less new file mode 100644 index 0000000..eb4c1af --- /dev/null +++ b/src/design/ant/btn.less @@ -0,0 +1,323 @@ +// button reset +.ant-btn { + // display: inline-flex; + // justify-content: center; + // align-items: center; + // &.ant-btn-success:not(.ant-btn-link), + // &.ant-btn-error:not(.ant-btn-link), + // &.ant-btn-warning:not(.ant-btn-link), + // &.ant-btn-primary:not(.ant-btn-link) { + // box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.12), 0 2px 4px 0 rgba(0, 0, 0, 0.08) !important; + // } + // &-group { + // .ant-btn:not(:first-child) { + // bottom: 1px; + // } + // } + &-link:hover, + &-link:focus, + &-link:active { + border-color: transparent !important; + } + + &-primary { + // update-begin--author:liaozhiyang---date:20240223---for:【QQYUN-8327】btn样式显示不正确 + // color: @white; + // background-color: @button-primary-color; + // update-end--author:liaozhiyang---date:20240223---for:【QQYUN-8327】btn样式显示不正确 + + &:hover, + &:focus { + // update-begin--author:liaozhiyang---date:20240223---for:【QQYUN-8327】btn样式显示不正确 + // color: @white; + // background-color: @button-primary-hover-color; + // update-end--author:liaozhiyang---date:20240223---for:【QQYUN-8327】btn样式显示不正确 + } + // + //&[disabled], + //&[disabled]:hover { + // color: fade(@button-cancel-color, 40%) !important; + // background-color: fade(@button-cancel-bg-color, 40%) !important; + // border-color: fade(@button-cancel-border-color, 40%) !important; + //} + } + + &-primary:not(&-background-ghost):not([disabled]) { + color: @white; + } + + //&-primary:not(&-background-ghost) { + // border-width: 0; + //} + + &-default { + // update-begin--author:liaozhiyang---date:20240223---for:【QQYUN-8327】btn样式显示不正确 + // color: @button-cancel-color; + // background-color: @button-cancel-bg-color; + // border-color: @button-cancel-border-color; + + // &:hover, + // &:focus { + // color: @button-cancel-hover-color; + // background-color: @button-cancel-hover-bg-color; + // border-color: @button-cancel-hover-border-color; + // } + // update-end--author:liaozhiyang---date:20240223---for:【QQYUN-8327】btn样式显示不正确 + // + //&[disabled], + //&[disabled]:hover { + // color: fade(@button-cancel-color, 40%) !important; + // background: fade(@button-cancel-bg-color, 40%) !important; + // border-color: fade(@button-cancel-border-color, 40%) !important; + //} + } + + [data-theme='light'] &.ant-btn-link.is-disabled { + color: rgba(0, 0, 0, 0.25); + text-shadow: none; + cursor: not-allowed !important; + background-color: transparent !important; + border-color: transparent !important; + box-shadow: none; + } + + [data-theme='dark'] &.ant-btn-link.is-disabled { + color: rgba(255, 255, 255, 0.25) !important; + text-shadow: none; + cursor: not-allowed !important; + background-color: transparent !important; + border-color: transparent !important; + box-shadow: none; + } + + // color: @white; + + &-success.ant-btn-link:not([disabled='disabled']) { + color: @button-success-color; + + &:hover, + &:focus { + color: @button-success-hover-color; + border-color: transparent; + } + + &:active { + color: @button-success-active-color; + } + } + + &-success.ant-btn-link.ant-btn-loading, + &-warning.ant-btn-link.ant-btn-loading, + &-error.ant-btn-link.ant-btn-loading, + &-background-ghost.ant-btn-link.ant-btn-loading, + &.ant-btn-link.ant-btn-loading { + &::before { + background: transparent; + } + } + + &-success:not(.ant-btn-link, .is-disabled) { + color: @white; + background-color: @button-success-color; + border-color: @button-success-color; + //border-width: 0; + + &:hover, + &:focus { + color: @white; + background-color: @button-success-hover-color; + border-color: @button-success-hover-color; + } + + &:active { + background-color: @button-success-active-color; + border-color: @button-success-active-color; + } + + //&[disabled], + //&[disabled]:hover { + // color: @white; + // background-color: fade(@button-success-color, 40%); + // border-color: fade(@button-success-color, 40%); + //} + } + + &-warning.ant-btn-link:not([disabled='disabled']) { + color: @button-warn-color; + + &:hover, + &:focus { + color: @button-warn-hover-color; + border-color: transparent; + } + + &:active { + color: @button-warn-active-color; + } + } + + &-warning:not(.ant-btn-link, .is-disabled) { + color: @white; + background-color: @button-warn-color; + border-color: @button-warn-color; + //border-width: 0; + + &:hover, + &:focus { + color: @white; + background-color: @button-warn-hover-color; + border-color: @button-warn-hover-color; + } + + &:active { + background-color: @button-warn-active-color; + border-color: @button-warn-active-color; + } + + //&[disabled], + //&[disabled]:hover { + // color: @white; + // background-color: fade(@button-warn-color, 40%); + // border-color: fade(@button-warn-color, 40%); + //} + } + + &-error.ant-btn-link:not([disabled='disabled']) { + color: @button-error-color; + + &:hover, + &:focus { + color: @button-error-hover-color; + border-color: transparent; + } + + &:active { + color: @button-error-active-color; + } + } + + &-error:not(.ant-btn-link, .is-disabled) { + color: @white; + background-color: @button-error-color; + border-color: @button-error-color; + //border-width: 0; + + &:hover, + &:focus { + color: @white; + background-color: @button-error-hover-color; + border-color: @button-error-hover-color; + } + + &:active { + background-color: @button-error-active-color; + border-color: @button-error-active-color; + } + + //&[disabled], + //&[disabled]:hover { + // color: @white; + // background-color: fade(@button-error-color, 40%); + // border-color: fade(@button-error-color, 40%); + //} + } + + &-background-ghost { + border-width: 1px; + background-color: transparent !important; + + &[disabled], + &[disabled]:hover { + color: fade(@white, 40%) !important; + background-color: transparent !important; + border-color: fade(@white, 40%) !important; + } + } + + &-dashed&-background-ghost, + &-default&-background-ghost { + color: @button-ghost-color; + border-color: @button-ghost-color; + + &:hover, + &:focus { + color: @button-ghost-hover-color; + border-color: @button-ghost-hover-color; + } + + &:active { + color: @button-ghost-active-color; + border-color: @button-ghost-active-color; + } + + &[disabled], + &[disabled]:hover { + color: fade(@white, 40%) !important; + border-color: fade(@white, 40%) !important; + } + } + + &-background-ghost&-success:not(.ant-btn-link) { + color: @button-success-color; + background-color: transparent; + border-color: @button-success-color; + border-width: 1px; + + &:hover, + &:focus { + color: @button-success-hover-color !important; + border-color: @button-success-hover-color; + } + + &:active { + color: @button-success-active-color; + border-color: @button-success-active-color; + } + } + + &-background-ghost&-warning:not(.ant-btn-link) { + color: @button-warn-color; + background-color: transparent; + border-color: @button-warn-color; + border-width: 1px; + + &:hover, + &:focus { + color: @button-warn-hover-color !important; + border-color: @button-warn-hover-color; + } + + &:active { + color: @button-warn-active-color; + border-color: @button-warn-active-color; + } + } + + &-background-ghost&-error:not(.ant-btn-link) { + color: @button-error-color; + background-color: transparent; + border-color: @button-error-color; + border-width: 1px; + + &:hover, + &:focus { + color: @button-error-hover-color !important; + border-color: @button-error-hover-color; + } + + &:active { + color: @button-error-active-color; + border-color: @button-error-active-color; + } + } + + &-ghost.ant-btn-link:not([disabled='disabled']) { + color: @button-ghost-color; + + &:hover, + &:focus { + color: @button-ghost-hover-color; + border-color: transparent; + } + } +} diff --git a/src/design/ant/index.less b/src/design/ant/index.less new file mode 100644 index 0000000..e0dcf44 --- /dev/null +++ b/src/design/ant/index.less @@ -0,0 +1,212 @@ +@import './pagination.less'; +@import './input.less'; +// update-begin--author:liaozhiyang---date:20240130---for:【issues/5857】Button color类型颜色失效 +@import './btn.less'; +// update-end--author:liaozhiyang---date:20240130---for:【issues/5857】Button color类型颜色失效 +// @import './table.less'; + +// TODO beta.11 fix +.ant-col { + width: 100%; +} + +.ant-image-preview-root { + img { + display: unset; + } +} +//update-begin---author:scott ---date:2023-08-28 for����QQYUN-6374��UnoCSS���windicss����Ӧ����ʽ����-- +/*span.anticon:not(.app-iconify) { + vertical-align: 0.125em !important; +}*/ +//update-end---author:scott ---date::2023-08-28 for����QQYUN-6374��UnoCSS���windicss����Ӧ����ʽ����-- + +.ant-back-top { + right: 20px; + bottom: 20px; +} + +.collapse-container__body { + > .ant-descriptions { + margin-left: 6px; + } +} + +.ant-image-preview-operations { + background-color: rgba(0, 0, 0, 0.3); +} + +.ant-popover { + &-content { + box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); + } +} + +// ================================= +// ==============modal message====== +// ================================= +.modal-icon-warning { + color: @warning-color !important; +} + +.modal-icon-success { + color: @success-color !important; +} + +.modal-icon-error { + color: @error-color !important; +} + +.modal-icon-info { + color: @primary-color !important; +} + +.ant-checkbox-checked .ant-checkbox-inner::after, +.ant-tree-checkbox-checked .ant-tree-checkbox-inner::after { + border-top: 0 !important; + border-left: 0 !important; +} + +// update-begin--author:liaozhiyang---date:20231218---for:【QQYUN-6366】升级到antd4.x +.ant-modal { + .ant-modal-close { + // update-begin--author:liaozhiyang---date:20241010---for:【issues/7260】原生a-modal关闭按钮位置偏移 + // position: absolute; + // top: 0; + // right: 0; + top: 13px; + // update-end--author:liaozhiyang---date:20241010---for:【issues/7260】原生a-modal关闭按钮位置偏移 + width: auto; + height: auto; + } + .ant-modal-content { + padding: 0; + } +} + +.ant-input-affix-wrapper > input.ant-input { + font-size: 14px; +} + +.ant-pagination-options-size-changer.ant-select { + display: inline-block; + width: auto; +} + +.ant-tree-select-dropdown .ant-select-tree .ant-select-tree-list-holder-inner { + align-items: stretch; +} + +.ant-list .ant-list-item {padding-left: 0;padding-right: 0;} + + +.ant-list-item { + display: flex; + align-items: center; + justify-content: space-between; + padding: 12px 0; + color: #000000d9; +} +/** anticon-down跟3.x保持一致*/ +.ant-dropdown-trigger>.anticon.anticon-down, .ant-dropdown-link>.anticon.anticon-down, .ant-dropdown-button>.anticon.anticon-down { + font-size: 10px; + vertical-align: baseline; +} +/** 表格排序箭头尺寸保持跟3.x一致 */ +.ant-table-wrapper .ant-table-column-sorter-up, .ant-table-wrapper .ant-table-column-sorter-down { + font-size: 11px; +} + /** 表格头部文字颜色跟3.x版本保持一致 */ +.ant-table-wrapper .ant-table-thead >tr>th, .ant-table-wrapper .ant-table-thead >tr>td { + color: #000000d9; + font-weight: 500; +} +html[data-theme='dark'] .ant-table-wrapper .ant-table-thead >tr>th, .ant-table-wrapper .ant-table-thead >tr>td { + color:rgba(255,255,255,.65); +} + /** 下拉菜单文字和图标折叠了 */ +.ant-dropdown .ant-dropdown-menu .ant-dropdown-menu-title-content, .ant-dropdown-menu-submenu .ant-dropdown-menu .ant-dropdown-menu-title-content{ + flex: auto; + white-space:nowrap; +} +// update-end--author:liaozhiyang---date:20231218---for:【QQYUN-6366】升级到antd4.x + +// update-end--author:liaozhiyang---date:20230105---for:【QQYUN-7493】多行文本内容过多时内容会覆盖掉清空按钮 +.ant-input-affix-wrapper-textarea-with-clear-btn { + .ant-input-clear-icon { + background-color: #fff; + } +} +html[data-theme='dark'] .ant-input-affix-wrapper-textarea-with-clear-btn { + .ant-input-clear-icon { + background-color: #141414; + } +} +// update-end--author:liaozhiyang---date:20230105---for:【QQYUN-7493】多行文本内容过多时内容会覆盖掉清空按钮 + +// update-begin--author:liaozhiyang---date:20230108---for:【QQYUN-7855】table页码同步3.x页面效果 +.ant-table-pagination.ant-pagination { + .ant-pagination-item-active, + .ant-pagination-item-active:hover { + background-color: @primary-color; + border-color: transparent; + a { + color: #fff; + } + } + .ant-pagination-item:not(.ant-pagination-item-active) { + background-color: transparent !important; + border-color: transparent; + } + .ant-pagination-prev, + .ant-pagination-next, + .ant-pagination-item { + margin: 0 4px; + } +} +// update-end--author:liaozhiyang---date:20230108---for:【QQYUN-7855】table页码同步3.x页面效果 + +//update-begin--author:wangshuai---date:20240429---for:修改tinymce段落下拉框的字体和样式 +.tox .tox-tbtn__select-label{ + font-size: 14px; +} + +.tox .tox-tbtn--select{ + width: 80px !important; +} + +.tox .tox-collection__item-label { + font-size: 14px !important; +} +//update-end--author:wangshuai---date:20240429---for:修改tinymce段落下拉框的字体和样式 + +// update-begin--author:liaozhiyang---date:20240605---for:【TV360X-189】统一只读样式 +html[data-theme='light'] { + .ant-form:not(.jeecg-form-detail-effect) { + .ant-select.ant-select-disabled { + .ant-select-selection-item { + color: rgba(51, 51, 51, 0.25) !important; + // color: rgba(51, 51, 51, 0.25); + .ant-select-selection-item-content { + color: rgba(51, 51, 51, 0.25); + } + } + } + .ant-input-number.ant-input-number-disabled { + .ant-input-number-input { + color: rgba(51, 51, 51, 0.25); + } + } + } +} + +html[data-theme='dark'] { + .ant-form:not(.jeecg-form-detail-effect) { + .ant-input-number.ant-input-number-disabled { + .ant-input-number-input { + color:rgba(255, 255, 255, 0.25); + } + } + } +} +// update-end--author:liaozhiyang---date:20240605---for:【TV360X-189】统一只读样式 diff --git a/src/design/ant/input.less b/src/design/ant/input.less new file mode 100644 index 0000000..57f85e5 --- /dev/null +++ b/src/design/ant/input.less @@ -0,0 +1,24 @@ +@import (reference) '../color.less'; + +// input +.ant-input { + &-number { + min-width: 110px; + } +} + +.ant-input-affix-wrapper .ant-input-suffix { + right: 9px; +} + +.ant-input-clear-icon { + margin-right: 5px; +} + +.ant-input-affix-wrapper-textarea-with-clear-btn { + padding: 0 !important; + + textarea.ant-input { + padding: 4px; + } +} diff --git a/src/design/ant/pagination.less b/src/design/ant/pagination.less new file mode 100644 index 0000000..388edcc --- /dev/null +++ b/src/design/ant/pagination.less @@ -0,0 +1,98 @@ +html[data-theme='dark'] { + .ant-pagination { + &.mini { + .ant-pagination-prev, + .ant-pagination-next, + .ant-pagination-item { + background-color: rgb(255 255 255 / 4%) !important; + + a { + color: #8b949e !important; + } + } + + .ant-select-arrow { + color: @text-color-secondary !important; + } + + .ant-pagination-item-active { + background-color: @primary-color !important; + border: none; + border-radius: none !important; + + a { + color: @white !important; + } + } + } + } +} + +.ant-pagination { + &.mini { + .ant-pagination-prev, + .ant-pagination-next { + font-size: 12px; + color: @text-color-base; + border: 1px solid; + } + + .ant-pagination-prev:hover, + .ant-pagination-next:hover, + .ant-pagination-item:focus, + .ant-pagination-item:hover { + a { + color: @primary-color; + } + } + + .ant-pagination-prev, + .ant-pagination-next, + .ant-pagination-item { + margin: 0 4px !important; + //update-begin---author:scott ---date:2022-09-30 for:【美化】Table分页页面默认背景色丑,去掉----------- + //background-color: #f4f4f5 !important; + //update-end---author:scott ---date::2022-09-30 for:【美化】Table分页页面默认背景色丑,去掉------------ + border: none; + border-radius: none !important; + + a { + margin-top: 1px; + color: #606266; + } + + &:last-child { + margin-right: 0 !important; + } + } + + .ant-pagination-item-active { + background-color: @primary-color !important; + border: none; + border-radius: none !important; + + a { + color: @white !important; + } + } + + .ant-pagination-options { + margin-left: 12px; + } + + .ant-pagination-options-quick-jumper input { + height: 22px; + margin: 0 6px; + line-height: 22px; + text-align: center; + } + + .ant-select-arrow { + color: @border-color-shallow-dark; + } + } + + &-disabled { + display: none !important; + } +} diff --git a/src/design/ant/table.less b/src/design/ant/table.less new file mode 100644 index 0000000..fabe60e --- /dev/null +++ b/src/design/ant/table.less @@ -0,0 +1,76 @@ +@prefix-cls: ~'@{namespace}-basic-table'; + +// fix table unnecessary scrollbar +.@{prefix-cls} { + .hide-scrollbar-y { + .ant-spin-nested-loading { + .ant-spin-container { + .ant-table { + .ant-table-content { + .ant-table-scroll { + .ant-table-hide-scrollbar { + overflow-y: auto !important; + } + + .ant-table-content { + overflow-y: auto !important; + } + } + + .ant-table-fixed-right { + .ant-table-body-outer { + .ant-table-body-inner { + overflow-y: auto !important; + } + } + } + + .ant-table-fixed-left { + .ant-table-body-outer { + .ant-table-body-inner { + overflow-y: auto !important; + } + } + } + } + } + } + } + } + + .hide-scrollbar-x { + .ant-spin-nested-loading { + .ant-spin-container { + .ant-table { + .ant-table-content { + .ant-table-scroll { + .ant-table-hide-scrollbar { + //overflow-x: auto !important; + } + + .ant-table-content { + overflow: auto !important; + } + } + + .ant-table-fixed-right { + .ant-table-body-outer { + .ant-table-body-inner { + overflow-x: auto !important; + } + } + } + + .ant-table-fixed-left { + .ant-table-body-outer { + .ant-table-body-inner { + overflow-x: auto !important; + } + } + } + } + } + } + } + } +} diff --git a/src/design/color.less b/src/design/color.less new file mode 100644 index 0000000..b7ad7e2 --- /dev/null +++ b/src/design/color.less @@ -0,0 +1,140 @@ +html { + // header + --header-bg-color: #394664; + --header-bg-hover-color: #273352; + --header-active-menu-bg-color: #273352; + + // sider + --sider-dark-bg-color: #273352; + --sider-dark-darken-bg-color: #273352; + --sider-dark-lighten-bg-color: #273352; + --sider-logo-bg-color:linear-gradient(180deg, #000000, #021d37); +} + +@white: #fff; + +@content-bg: #f4f7f9; + +// :export { +// name: "less"; +// mainColor: @mainColor; +// fontSize: @fontSize; +// } +@iconify-bg-color: #5551; + +// ================================= +// ==============border-color======= +// ================================= + +// Dark-dark +@border-color-dark: #b6b7b9; + +// Dark-light +@border-color-shallow-dark: #cececd; + +// Light-dark +@border-color-light: @border-color-base; + +// ================================= +// ==============message============== +// ================================= + +// success-bg-color +@success-background-color: #f1f9ec; +// info-bg-color +@info-background-color: #e8eff8; +// warn-bg-color +@warning-background-color: #fdf6ed; +// danger-bg-color +@danger-background-color: #fef0f0; + +// ================================= +// ==============Header============= +// ================================= + +@header-dark-bg-color: var(--header-bg-color); +@header-dark-bg-hover-color: var(--header-bg-hover-color); +@header-light-bg-hover-color: #f6f6f6; +@header-light-desc-color: #7c8087; +@header-light-bottom-border-color: #eee; +// top-menu +@top-menu-active-bg-color: var(--header-active-menu-bg-color); + +// ================================= +// ==============Menu============ +// ================================= + +// let -menu +@sider-logo-bg-color: var(--sider-logo-bg-color); +@sider-dark-bg-color: var(--sider-dark-bg-color); +@sider-dark-darken-bg-color: var(--sider-dark-darken-bg-color); +@sider-dark-lighten-bg-color: var(--sider-dark-lighten-bg-color); + +// trigger +@trigger-dark-hover-bg-color: rgba(255, 255, 255, 0.2); +@trigger-dark-bg-color: rgba(255, 255, 255, 0.1); + +// ================================= +// ==============tree============ +// ================================= +// tree item hover background +@tree-hover-background-color: #f5f7fa; +// tree item hover font color +@tree-hover-font-color: #f5f7fa; + +// ================================= +// ==============link============ +// ================================= +@link-hover-color: @primary-color; +@link-active-color: darken(@primary-color, 10%); + +// ================================= +// ==============Text color-============= +// ================================= + +// Main text color +@text-color-base: @text-color; + +// Label color +@text-color-call-out: #606266; + +// Auxiliary information color-dark +@text-color-help-dark: #909399; + +// ================================= +// ==============breadcrumb========= +// ================================= +@breadcrumb-item-normal-color: #999; +// ================================= +// ==============button============= +// ================================= + +@button-primary-color: @primary-color; +@button-primary-hover-color: lighten(@primary-color, 5%); +@button-primary-active-color: darken(@primary-color, 5%); + +@button-ghost-color: @white; +@button-ghost-hover-color: lighten(@white, 10%); +@button-ghost-hover-bg-color: #e1ebf6; +@button-ghost-active-color: darken(@white, 10%); + +@button-success-color: @success-color; +@button-success-hover-color: lighten(@success-color, 10%); +@button-success-active-color: darken(@success-color, 10%); + +@button-warn-color: @warning-color; +@button-warn-hover-color: lighten(@warning-color, 10%); +@button-warn-active-color: darken(@warning-color, 10%); + +@button-error-color: @error-color; +@button-error-hover-color: lighten(@error-color, 10%); +@button-error-active-color: darken(@error-color, 10%); + +@button-cancel-color: @text-color-call-out; +@button-cancel-bg-color: @white; +@button-cancel-border-color: @border-color-shallow-dark; + +// Mouse over +@button-cancel-hover-color: @primary-color; +@button-cancel-hover-bg-color: @white; +@button-cancel-hover-border-color: @primary-color; diff --git a/src/design/config.less b/src/design/config.less new file mode 100644 index 0000000..64c33f6 --- /dev/null +++ b/src/design/config.less @@ -0,0 +1,2 @@ +@import (reference) 'color.less'; +@import (reference) 'var/index.less'; diff --git a/src/design/entry.css b/src/design/entry.css new file mode 100644 index 0000000..abc8bdb --- /dev/null +++ b/src/design/entry.css @@ -0,0 +1,181 @@ +* > .enter-x:nth-child(1) { + transform: translateX(50px); +} +* > .-enter-x:nth-child(1) { + transform: translateX(-50px); +} + +* > .enter-x:nth-child(1), +* > .-enter-x:nth-child(1) { + z-index: 9; + opacity: 0; + animation: enter-x-animation 0.4s ease-in-out 0.3s; + animation-fill-mode: forwards; + animation-delay: 0.1s; +} +* > .enter-x:nth-child(2) { + transform: translateX(50px); +} +* > .-enter-x:nth-child(2) { + transform: translateX(-50px); +} + +* > .enter-x:nth-child(2), +* > .-enter-x:nth-child(2) { + z-index: 8; + opacity: 0; + animation: enter-x-animation 0.4s ease-in-out 0.3s; + animation-fill-mode: forwards; + animation-delay: 0.2s; +} +* > .enter-x:nth-child(3) { + transform: translateX(50px); +} +* > .-enter-x:nth-child(3) { + transform: translateX(-50px); +} + +* > .enter-x:nth-child(3), +* > .-enter-x:nth-child(3) { + z-index: 7; + opacity: 0; + animation: enter-x-animation 0.4s ease-in-out 0.3s; + animation-fill-mode: forwards; + animation-delay: 0.3s; +} + +* > .enter-x:nth-child(4) { + transform: translateX(50px); +} +* > .-enter-x:nth-child(4) { + transform: translateX(-50px); +} + +* > .enter-x:nth-child(4), +* > .-enter-x:nth-child(4) { + z-index: 6; + opacity: 0; + animation: enter-x-animation 0.4s ease-in-out 0.3s; + animation-fill-mode: forwards; + animation-delay: 0.4s; +} + +* > .enter-x:nth-child(5) { + transform: translateX(50px); +} +* > .-enter-x:nth-child(5) { + transform: translateX(-50px); +} + +* > .enter-x:nth-child(5), +* > .-enter-x:nth-child(5) { + z-index: 5; + opacity: 0; + animation: enter-x-animation 0.4s ease-in-out 0.3s; + animation-fill-mode: forwards; + animation-delay: 0.5s; +} + +* > .enter-y:nth-child(1) { + transform: translateX(50px); +} +* > .-enter-y:nth-child(1) { + transform: translateX(-50px); +} + +* > .enter-y:nth-child(1), +* > .-enter-y:nth-child(1) { + z-index: 9; + opacity: 0; + animation: enter-y-animation 0.4s ease-in-out 0.3s; + animation-fill-mode: forwards; + animation-delay: 0.1s; +} +* > .enter-y:nth-child(2) { + transform: translateX(50px); +} +* > .-enter-y:nth-child(2) { + transform: translateX(-50px); +} + +* > .enter-y:nth-child(2), +* > .-enter-y:nth-child(2) { + z-index: 8; + opacity: 0; + animation: enter-y-animation 0.4s ease-in-out 0.3s; + animation-fill-mode: forwards; + animation-delay: 0.2s; +} +* > .enter-y:nth-child(3) { + transform: translateX(50px); +} +* > .-enter-y:nth-child(3) { + transform: translateX(-50px); +} + +* > .enter-y:nth-child(3), +* > .-enter-y:nth-child(3) { + z-index: 7; + opacity: 0; + animation: enter-y-animation 0.4s ease-in-out 0.3s; + animation-fill-mode: forwards; + animation-delay: 0.3s; +} + +* > .enter-y:nth-child(4) { + transform: translateX(50px); +} +* > .-enter-y:nth-child(4) { + transform: translateX(-50px); +} + +* > .enter-y:nth-child(4), +* > .-enter-y:nth-child(4) { + z-index: 6; + opacity: 0; + animation: enter-y-animation 0.4s ease-in-out 0.3s; + animation-fill-mode: forwards; + animation-delay: 0.4s; +} + +* > .enter-y:nth-child(5) { + transform: translateX(50px); +} +* > .-enter-y:nth-child(5) { + transform: translateX(-50px); +} + +* > .enter-y:nth-child(5), +* > .-enter-y:nth-child(5) { + z-index: 5; + opacity: 0; + animation: enter-y-animation 0.4s ease-in-out 0.3s; + animation-fill-mode: forwards; + animation-delay: 0.5s; +} + +@keyframes enter-x-animation { + to { + opacity: 1; + transform: translateX(0); + } +} +@keyframes enter-y-animation { + to { + opacity: 1; + transform: translateY(0); + } +} + +/*update-begin---author:wangshuai ---date:20230829 for:UnoCSS替代windicss 导致全局默认边框样丢失------------*/ +*, :before, :after { + box-sizing: border-box; + border-width: 0; + border-style: solid; + border-color: #e5e7eb; +} +.border-primary,.hover\:border-primary:hover { + --tw-border-opacity: 1; + border-color: rgba(24,144,255,var(--tw-border-opacity)) +} +/*update-end---author:wangshuai ---date:20230829 for:UnoCSS替代windicss 导致全局默认边框样丢失------------*/ \ No newline at end of file diff --git a/src/design/index.less b/src/design/index.less new file mode 100644 index 0000000..4ec713a --- /dev/null +++ b/src/design/index.less @@ -0,0 +1,319 @@ +@import 'transition/index.less'; +@import 'var/index.less'; +@import 'public.less'; +@import 'ant/index.less'; +@import './theme.less'; +@import './entry.css'; + +input:-webkit-autofill { + -webkit-box-shadow: 0 0 0 1000px white inset !important; +} + +:-webkit-autofill { + transition: background-color 5000s ease-in-out 0s !important; +} + +html { + overflow: hidden; + -webkit-text-size-adjust: 100%; +} + +html, +body { + width: 100%; + height: 100%; + // body添加行高保持跟3.x一致 + line-height: 1.5715; + + &.color-weak { + filter: invert(80%); + } + + &.gray-mode { + filter: grayscale(100%); + filter: progid:dximagetransform.microsoft.basicimage(grayscale=1); + } +} + +/* 【LOWCOD-2300】【vue3】online--online表单开发,下拉框位置靠下时,点开下拉框,整屏跳 */ +body { + overflow: visible; + overflow-x: hidden; +} + +a:focus, +a:active, +button, +div, +svg, +span { + outline: none !important; +} + +// 保持 和 windi 一样的全局样式,减少升级带来的影响 +ul { + list-style: none; + margin: 0; + padding: 0; +} +img, video { + max-width: 100%; + height: auto; +} +// 保持 和 windi 一样的全局样式,减少升级带来的影响 + +// update-begin--author:liaozhiyang---date:20230925---for:【issues/5407】字段信息校验是多行提示会被遮挡 +.vxe-cell--valid-error-msg { + white-space: nowrap; +} +// update-end--author:liaozhiyang---date:20230925---for:【issues/5407】字段信息校验是多行提示会被遮挡 + +// update-begin--author:liaozhiyang---date:20231013---for:【QQYUN-5133】升级之后提示样式跟之前一致 +.vxe-table .vxe-body--row:last-child .vxe-cell--valid-error-hint { + margin-top: auto; +} +.vxe-cell--valid-error-hint { + margin-top: 6px; +} +.vxe-cell--valid-error-msg { + display: inline-block; + border-radius: 4px !important; + padding: 8px 12px !important; + color: #fff !important; + background-color: #f56c6c !important; + +} +// update-end--author:liaozhiyang---date:20231013---for:【QQYUN-5133】升级之后提示样式跟之前一致 +// update-begin--author:liaozhiyang---date:20231116---for:【QQYUN-7011】online表单多了一个蓝色的边框 +// .vxe-table.vxe-table--render-default .vxe-body--column.col--selected { +// box-shadow: none; +// } +// update-end--author:liaozhiyang---date:20231116---for:【QQYUN-7011】online表单多了一个蓝色的边框 + +// update-begin--author:liaozhiyang---date:20240424---for:【issues/1175】解决vxetable鼠标hover之后title显示不对的问题 +.vxe-cell { + pointer-events: none; + > * { + pointer-events: auto; + } +} +// update-end--author:liaozhiyang---date:20240424---for:【issues/1175】解决vxetable鼠标hover之后title显示不对的问题 + +// update-begin--author:liaozhiyang---date:20240429---for:【QQYUN-9023】引导样式调整 +.introjs-tooltipReferenceLayer { + .introjs-tooltip-title { + font-size: 15px; + } + .introjs-skipbutton { + font-size: 20px; + line-height: 35px; + height: 35px; + width: 35px; + font-weight: 500; + } + .introjs-tooltiptext { + padding: 16px; + font-size: 14px; + } + .introjs-bullets { + padding-top: 0; + padding-bottom: 8px; + } + .introjs-bullets ul li a { + width: 4px; + height: 4px; + } + .introjs-button { + padding: .2rem 0.5rem; + font-size: 13px; + } +} +// update-end--author:liaozhiyang---date:20240429---for:【QQYUN-9023】引导样式调整 + +// update-begin--author:liaozhiyang---date:20240605---for:【TV360X-857】online代码生成详情样式调整 + +html[data-theme='light'] { + .jeecg-form-detail-effect { + *:not(.ant-select-selection-placeholder){ + color: #606266!important; + } + .ant-row label { + color: #797c81 !important; + } + .ant-select-selector, + .ant-btn, + .ant-input, + .ant-input-affix-wrapper, + .ant-picker, + .ant-input-number { + // border: none !important; + // color: rgba(51, 51, 51, 0.25) !important; + color: #606266!important; + background-color: #f9f9fa !important; + } + + a, + .anticon { + pointer-events: none; + cursor: text; + color: #606266!important; + &:hover { + background: transparent; + } + } + + .ant-select.ant-select-disabled .ant-select-selection-item .ant-select-selection-item-content { + color: #606266!important; + } + .ant-select-selection-item { + color: #606266!important; + } + + :where(.css-dev-only-do-not-override-dvamda).ant-picker .ant-picker-input >input-disabled, :where(.css-dev-only-do-not-override-dvamda).ant-picker .ant-picker-input >input[disabled] { + color: #606266!important; + } + .ant-select-selection-item { + border-color: #eee !important; + background-color: transparent !important; + } + } +} +html[data-theme='dark'] { + .jeecg-form-detail-effect { + * { + color: #606266; + } + .ant-upload-text-icon, a { + color:rgba(255, 255, 255, 0.25) ; + } + .ant-select-selector, + .ant-btn, + .ant-input, + .ant-input-affix-wrapper, + .ant-picker, + .ant-input-number { + background-color: transparent !important; + } + + .ant-select-selection-item { + background-color: transparent !important; + } + // 暗黑模式下输入框等icon隐藏 + .ant-picker-suffix,.ant-select-arrow { + content:" "; + display: none; + } + } +} +.jeecg-form-detail-effect { + .ant-select-selector, + .ant-btn, + .ant-input, + .ant-input-affix-wrapper, + .ant-picker, + .ant-input-number { + border: none !important; + } + a, + .anticon { + pointer-events: none; + cursor: text; + &:hover { + background: transparent; + } + } + .ant-picker { + width: 100%; + } + textarea { + resize: none !important; + } + input { + border: none !important; + } + input, textarea { + user-select: auto; + cursor: text !important; + } + .JSelectDept, + .JselectUser, + .JSelectPosition { + > div { + > .ant-row { + .left { + width: 100%; + } + .right { + display: none; + } + } + } + } + .ant-select-selection-item-remove { + display: none; + } + .jeecg-j-upload-container { + .ant-upload { + display: none; + } + .ant-upload-list-item-done { + a { + pointer-events: auto !important; + cursor: pointer !important; + } + .ant-upload-list-item-actions { + display: none; + } + } + } + .ant-upload-picture-card-wrapper { + .ant-upload { + pointer-events: none; + cursor: not-allowed; + .ant-upload-text,.anticon { + display: none; + } + } + .ant-upload-list-item-done { + a { + pointer-events: auto !important; + cursor: pointer !important; + } + .ant-btn { + display: none; + } + } + } +} +// update-end--author:liaozhiyang---date:20240605---for:【TV360X-857】online代码生成详情样式调整 + +// update-begin--author:wangshuai---date:20240611---for:【TV360X-1070】一对多内嵌,为什么多这一块,不从头对齐 +.ant-table-wrapper .ant-table.ant-table-middle .ant-table-tbody .ant-table-wrapper:only-child .ant-table{ + margin-block: 0; + margin-inline: 0; +} +// update-end--author:wangshuai---date:20240611---for:【TV360X-1070】一对多内嵌,为什么多这一块,不从头对齐 + +// 单行文本溢出省略号 +.ellipsis { + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; +} +// 两行省略 +.ellipsis-2 { + display: -webkit-box; + overflow: hidden; + text-overflow: ellipsis; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + word-break: break-all; +} +// 三行省略 +.ellipsis-3 { + display: -webkit-box; + overflow: hidden; + text-overflow: ellipsis; + -webkit-line-clamp: 3; + -webkit-box-orient: vertical; +} \ No newline at end of file diff --git a/src/design/public.less b/src/design/public.less new file mode 100644 index 0000000..eda1bbf --- /dev/null +++ b/src/design/public.less @@ -0,0 +1,113 @@ +#app { + width: 100%; + height: 100%; +} + +// ================================= +// ==============scrollbar========== +// ================================= + +::-webkit-scrollbar { + width: 7px; + height: 8px; +} + +// ::-webkit-scrollbar-track { +// background: transparent; +// } + +::-webkit-scrollbar-track { + background-color: rgba(0, 0, 0, 0.05); +} + +::-webkit-scrollbar-thumb { + // background: rgba(0, 0, 0, 0.6); + background-color: rgba(144, 147, 153, 0.3); + // background-color: rgba(144, 147, 153, 0.3); + border-radius: 2px; + box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.2); +} + +::-webkit-scrollbar-thumb:hover { + background-color: @border-color-dark; +} + +[data-theme='dark'] { + ::-webkit-scrollbar-thumb:hover { + background-color: #5e6063; + } +} + +// ================================= +// ==============nprogress========== +// ================================= +#nprogress { + pointer-events: none; + + .bar { + position: fixed; + top: 0; + left: 0; + z-index: 99999; + width: 100%; + height: 2px; + background-color: @primary-color; + opacity: 0.75; + } +} + +// ======================================= +// ============ [sjl] 按钮组样式 ========== +// ======================================= +.j-table-operator { + // Button按钮间距 + .ant-btn { + margin: 0 8px 8px 0; + transition: margin 0s; + } + + & > .ant-btn:last-of-type { + margin: 0 0 8px 0; + } + + .ant-btn-group, + &.ant-btn-group { + .ant-btn { + margin: 0; + transition: margin 0s; + } + + & > .ant-btn:last-of-type { + margin: 0 8px 8px 0; + } + } +} + +// ======================================== +// ============ [sjl] 底部按钮样式 ========== +// ======================================== +.j-box-bottom-button { + height: 28px; + + &-float { + position: absolute; + left: 0; + right: 0; + bottom: 0; + border-top: 1px solid #e8e8e8; + padding: 10px 16px; + text-align: right; + background: #fff; + border-radius: 0 0 2px 2px; + + & .ant-btn { + margin-left: 8px; + } + } + + &.offset-20 &-float { + left: -20px; + right: -20px; + bottom: -20px; + } +} diff --git a/src/design/theme.less b/src/design/theme.less new file mode 100644 index 0000000..489e113 --- /dev/null +++ b/src/design/theme.less @@ -0,0 +1,84 @@ +.bg-white { + background-color: @component-background !important; +} + +html[data-theme='light'] { + // update-begin--author:liaozhiyang---date:20240407---for:【QQYUN-8774】给body加上打底的字体颜色 + body{ + color: rgba(0, 0, 0, 0.65); + } + // update-end--author:liaozhiyang---date:20240407---for:【QQYUN-8774】给body加上打底的字体颜色 + .text-secondary { + color: rgba(0, 0, 0, 0.45); + } + /*【美化】自定义table字体颜色*/ + .ant-table { + color: rgba(0, 0, 0, 0.65); + } + /*【美化】自定义table字体颜色*/ + /*【美化】自定义form字体颜色*/ + .ant-select-multiple .ant-select-selection-item-content { + color: rgba(0, 0, 0, 0.65); + } + .ant-input-affix-wrapper > input.ant-input { + // update-begin--author:liaozhiyang---date:20240605---for:【TV360X-189】统一只读样式 + &:not([disabled]) { + color: rgba(0, 0, 0, 0.65); + } + // update-end--author:liaozhiyang---date:20240605---for:【TV360X-189】统一只读样式 + } + .ant-select-single.ant-select-show-arrow .ant-select-selection-item, .ant-select-single.ant-select-show-arrow { + color: rgba(0, 0, 0, 0.65); + } + /*【美化】自定义form字体颜色*/ + + .ant-alert-success { + background-color: #f6ffed; + border: 1px solid #b7eb8f; + } + + .ant-alert-error { + background-color: #fff2f0; + border: 1px solid #ffccc7; + } + + .ant-alert-warning { + background-color: #fffbe6; + border: 1px solid #ffe58f; + } + :not(:root):fullscreen::backdrop { + background-color: @layout-body-background !important; + } +} + +[data-theme='dark'] { + // update-begin--author:liaozhiyang---date:20240407---for:【QQYUN-8774】给body加上打底的字体颜色 + body{ + color: rgba(255, 255, 255, 0.85); + } + // update-end--author:liaozhiyang---date:20240407---for:【QQYUN-8774】给body加上打底的字体颜色 + // update-begin--author:liaozhiyang---date:20240407---for:【QQYUN-8641】黑色主题-流程办理 + .ant-list .ant-list-item { + color: rgba(255, 255, 255, 0.85); + } + // update-end--author:liaozhiyang---date:20240407---for:【QQYUN-8641】黑色主题-流程办理 + .text-secondary { + color: #8b949e; + } + + .ant-card-grid-hoverable:hover { + box-shadow: 0 3px 6px -4px rgb(0 0 0 / 48%), 0 6px 16px 0 rgb(0 0 0 / 32%), 0 9px 28px 8px rgb(0 0 0 / 20%); + } + + .ant-card-grid { + box-shadow: 1px 0 0 0 #434343, 0 1px 0 0 #434343, 1px 1px 0 0 #434343, 1px 0 0 0 #434343 inset, 0 1px 0 0 #434343 inset; + } + + .ant-calendar-selected-day .ant-calendar-date { + color: rgba(0, 0, 0, 0.8); + } + + .ant-select-tree li .ant-select-tree-node-content-wrapper.ant-select-tree-node-selected { + color: rgba(0, 0, 0, 0.9); + } +} diff --git a/src/design/transition/base.less b/src/design/transition/base.less new file mode 100644 index 0000000..7944c8b --- /dev/null +++ b/src/design/transition/base.less @@ -0,0 +1,18 @@ +.transition-default() { + &-enter-active, + &-leave-active { + transition: 0.3s cubic-bezier(0.25, 0.8, 0.5, 1) !important; + } + + &-move { + transition: transform 0.4s; + } +} + +.expand-transition { + .transition-default(); +} + +.expand-x-transition { + .transition-default(); +} diff --git a/src/design/transition/fade.less b/src/design/transition/fade.less new file mode 100644 index 0000000..1f8e63e --- /dev/null +++ b/src/design/transition/fade.less @@ -0,0 +1,81 @@ +.fade-enter-active, +.fade-leave-active { + transition: opacity 0.2s ease-in-out; +} + +.fade-enter-from, +.fade-leave-to { + opacity: 0; +} + +/* fade-slide */ +.fade-slide-leave-active, +.fade-slide-enter-active { + transition: all 0.3s; +} + +.fade-slide-enter-from { + opacity: 0; + transform: translateX(-30px); +} + +.fade-slide-leave-to { + opacity: 0; + transform: translateX(30px); +} + +// /////////////////////////////////////////////// +// Fade Bottom +// /////////////////////////////////////////////// + +// Speed: 1x +.fade-bottom-enter-active, +.fade-bottom-leave-active { + transition: opacity 0.25s, transform 0.3s; +} + +.fade-bottom-enter-from { + opacity: 0; + transform: translateY(-10%); +} + +.fade-bottom-leave-to { + opacity: 0; + transform: translateY(10%); +} + +// fade-scale +.fade-scale-leave-active, +.fade-scale-enter-active { + transition: all 0.28s; +} + +.fade-scale-enter-from { + opacity: 0; + transform: scale(1.2); +} + +.fade-scale-leave-to { + opacity: 0; + transform: scale(0.8); +} + +// /////////////////////////////////////////////// +// Fade Top +// /////////////////////////////////////////////// + +// Speed: 1x +.fade-top-enter-active, +.fade-top-leave-active { + transition: opacity 0.2s, transform 0.25s; +} + +.fade-top-enter-from { + opacity: 0; + transform: translateY(8%); +} + +.fade-top-leave-to { + opacity: 0; + transform: translateY(-8%); +} diff --git a/src/design/transition/index.less b/src/design/transition/index.less new file mode 100644 index 0000000..e372b25 --- /dev/null +++ b/src/design/transition/index.less @@ -0,0 +1,10 @@ +@import './base.less'; +@import './fade.less'; +@import './scale.less'; +@import './slide.less'; +@import './scroll.less'; +@import './zoom.less'; + +.collapse-transition { + transition: 0.2s height ease-in-out, 0.2s padding-top ease-in-out, 0.2s padding-bottom ease-in-out; +} diff --git a/src/design/transition/scale.less b/src/design/transition/scale.less new file mode 100644 index 0000000..c965493 --- /dev/null +++ b/src/design/transition/scale.less @@ -0,0 +1,21 @@ +.scale-transition { + .transition-default(); + + &-enter-from, + &-leave, + &-leave-to { + opacity: 0; + transform: scale(0); + } +} + +.scale-rotate-transition { + .transition-default(); + + &-enter-from, + &-leave, + &-leave-to { + opacity: 0; + transform: scale(0) rotate(-45deg); + } +} diff --git a/src/design/transition/scroll.less b/src/design/transition/scroll.less new file mode 100644 index 0000000..a5f45e4 --- /dev/null +++ b/src/design/transition/scroll.less @@ -0,0 +1,67 @@ +.scroll-y-transition { + .transition-default(); + + &-enter-from, + &-leave-to { + opacity: 0; + } + + &-enter-from { + transform: translateY(-15px); + } + + &-leave-to { + transform: translateY(15px); + } +} + +.scroll-y-reverse-transition { + .transition-default(); + + &-enter-from, + &-leave-to { + opacity: 0; + } + + &-enter-from { + transform: translateY(15px); + } + + &-leave-to { + transform: translateY(-15px); + } +} + +.scroll-x-transition { + .transition-default(); + + &-enter-from, + &-leave-to { + opacity: 0; + } + + &-enter-from { + transform: translateX(-15px); + } + + &-leave-to { + transform: translateX(15px); + } +} + +.scroll-x-reverse-transition { + .transition-default(); + + &-enter-from, + &-leave-to { + opacity: 0; + } + + &-enter-from { + transform: translateX(15px); + } + + &-leave-to { + transform: translateX(-15px); + } +} diff --git a/src/design/transition/slide.less b/src/design/transition/slide.less new file mode 100644 index 0000000..79b00df --- /dev/null +++ b/src/design/transition/slide.less @@ -0,0 +1,39 @@ +.slide-y-transition { + .transition-default(); + + &-enter-from, + &-leave-to { + opacity: 0; + transform: translateY(-15px); + } +} + +.slide-y-reverse-transition { + .transition-default(); + + &-enter-from, + &-leave-to { + opacity: 0; + transform: translateY(15px); + } +} + +.slide-x-transition { + .transition-default(); + + &-enter-from, + &-leave-to { + opacity: 0; + transform: translateX(-15px); + } +} + +.slide-x-reverse-transition { + .transition-default(); + + &-enter-from, + &-leave-to { + opacity: 0; + transform: translateX(15px); + } +} diff --git a/src/design/transition/zoom.less b/src/design/transition/zoom.less new file mode 100644 index 0000000..2ea378c --- /dev/null +++ b/src/design/transition/zoom.less @@ -0,0 +1,27 @@ +// zoom-out +.zoom-out-enter-active, +.zoom-out-leave-active { + transition: opacity 0.1 ease-in-out, transform 0.15s ease-out; +} + +.zoom-out-enter-from, +.zoom-out-leave-to { + opacity: 0; + transform: scale(0); +} + +// zoom-fade +.zoom-fade-enter-active, +.zoom-fade-leave-active { + transition: transform 0.2s, opacity 0.3s ease-out; +} + +.zoom-fade-enter-from { + opacity: 0; + transform: scale(0.92); +} + +.zoom-fade-leave-to { + opacity: 0; + transform: scale(1.06); +} diff --git a/src/design/var/breakpoint.less b/src/design/var/breakpoint.less new file mode 100644 index 0000000..793e826 --- /dev/null +++ b/src/design/var/breakpoint.less @@ -0,0 +1,33 @@ +// ================================= +// ==============屏幕断点============ +// ================================= + +// Extra small screen / phone +@screen-xs: 480px; +@screen-xs-min: @screen-xs; + +// Small screen / tablet +@screen-sm: 576px; +@screen-sm-min: @screen-sm; + +// Medium screen / desktop +@screen-md: 768px; +@screen-md-min: @screen-md; + +// Large screen / wide desktop +@screen-lg: 992px; +@screen-lg-min: @screen-lg; + +// Extra large screen / full hd +@screen-xl: 1200px; +@screen-xl-min: @screen-xl; + +// Extra extra large screen / large desktop +@screen-2xl: 1600px; +@screen-2xl-min: @screen-2xl; + +@screen-xs-max: (@screen-sm-min - 1px); +@screen-sm-max: (@screen-md-min - 1px); +@screen-md-max: (@screen-lg-min - 1px); +@screen-lg-max: (@screen-xl-min - 1px); +@screen-xl-max: (@screen-2xl-min - 1px); diff --git a/src/design/var/easing.less b/src/design/var/easing.less new file mode 100644 index 0000000..e19735f --- /dev/null +++ b/src/design/var/easing.less @@ -0,0 +1,18 @@ +// ================================= +// ==============动画函数-=========== +// ================================= + +@ease-base-out: cubic-bezier(0.7, 0.3, 0.1, 1); +@ease-base-in: cubic-bezier(0.9, 0, 0.3, 0.7); +@ease-out: cubic-bezier(0.215, 0.61, 0.355, 1); +@ease-in: cubic-bezier(0.55, 0.055, 0.675, 0.19); +@ease-in-out: cubic-bezier(0.645, 0.045, 0.355, 1); +@ease-out-back: cubic-bezier(0.12, 0.4, 0.29, 1.46); +@ease-in-back: cubic-bezier(0.71, -0.46, 0.88, 0.6); +@ease-in-out-back: cubic-bezier(0.71, -0.46, 0.29, 1.46); +@ease-out-circ: cubic-bezier(0.08, 0.82, 0.17, 1); +@ease-in-circ: cubic-bezier(0.6, 0.04, 0.98, 0.34); +@ease-in-out-circ: cubic-bezier(0.78, 0.14, 0.15, 0.86); +@ease-out-quint: cubic-bezier(0.23, 1, 0.32, 1); +@ease-in-quint: cubic-bezier(0.755, 0.05, 0.855, 0.06); +@ease-in-out-quint: cubic-bezier(0.86, 0, 0.07, 1); diff --git a/src/design/var/index.less b/src/design/var/index.less new file mode 100644 index 0000000..f9af55f --- /dev/null +++ b/src/design/var/index.less @@ -0,0 +1,46 @@ +@import (reference) '../color.less'; +@import 'easing'; +@import 'breakpoint'; + +@namespace: jeecg; + +// tabs +// updateBy:sunjianlei---updateDate:2021-09-03---修改tab切换栏样式:更改高度 +@multiple-height: 30px; +@multiple-card-height: 50px; +// update-begin--author:liaozhiyang---date:20240407---for:【QQYUN-8762】标签页圆滑高度 +@multiple-smooth-height: 48px; +// update-end--author:liaozhiyang---date:20240407---for:【QQYUN-8762】标签页圆滑高度 + +// headers +// update-begin--author:liaozhiyang---date:20240407---for:【QQYUN-8762】顶栏高度 +@header-height: 60px; +// update-end--author:liaozhiyang---date:20240407---for:【QQYUN-8762】顶栏高度 + +// logo width +@logo-width: 32px; + +// +@side-drag-z-index: 200; + +@page-loading-z-index: 10000; + +@lock-page-z-index: 3000; + +@layout-header-fixed-z-index: 500; + +@multiple-tab-fixed-z-index: 505; + +@layout-sider-fixed-z-index: 510; + +@layout-mix-sider-fixed-z-index: 550; + +@preview-comp-z-index: 1000; + +@page-footer-z-index: 99; + +.bem(@n; @content) { + @{namespace}-@{n} { + @content(); + } +} diff --git a/src/directives/clickOutside.ts b/src/directives/clickOutside.ts new file mode 100644 index 0000000..fa580c9 --- /dev/null +++ b/src/directives/clickOutside.ts @@ -0,0 +1,78 @@ +import { on } from '/@/utils/domUtils'; +import { isServer } from '/@/utils/is'; +import type { ComponentPublicInstance, DirectiveBinding, ObjectDirective } from 'vue'; + +type DocumentHandler = (mouseup: T, mousedown: T) => void; + +type FlushList = Map< + HTMLElement, + { + documentHandler: DocumentHandler; + bindingFn: (...args: unknown[]) => unknown; + } +>; + +const nodeList: FlushList = new Map(); + +let startClick: MouseEvent; + +if (!isServer) { + on(document, 'mousedown', (e: MouseEvent) => (startClick = e)); + on(document, 'mouseup', (e: MouseEvent) => { + for (const { documentHandler } of nodeList.values()) { + documentHandler(e, startClick); + } + }); +} + +function createDocumentHandler(el: HTMLElement, binding: DirectiveBinding): DocumentHandler { + let excludes: HTMLElement[] = []; + if (Array.isArray(binding.arg)) { + excludes = binding.arg; + } else { + // due to current implementation on binding type is wrong the type casting is necessary here + excludes.push(binding.arg as unknown as HTMLElement); + } + return function (mouseup, mousedown) { + const popperRef = ( + binding.instance as ComponentPublicInstance<{ + popperRef: Nullable; + }> + ).popperRef; + const mouseUpTarget = mouseup.target as Node; + const mouseDownTarget = mousedown.target as Node; + const isBound = !binding || !binding.instance; + const isTargetExists = !mouseUpTarget || !mouseDownTarget; + const isContainedByEl = el.contains(mouseUpTarget) || el.contains(mouseDownTarget); + const isSelf = el === mouseUpTarget; + + const isTargetExcluded = + (excludes.length && excludes.some((item) => item?.contains(mouseUpTarget))) || + (excludes.length && excludes.includes(mouseDownTarget as HTMLElement)); + const isContainedByPopper = popperRef && (popperRef.contains(mouseUpTarget) || popperRef.contains(mouseDownTarget)); + if (isBound || isTargetExists || isContainedByEl || isSelf || isTargetExcluded || isContainedByPopper) { + return; + } + binding.value(); + }; +} + +const ClickOutside: ObjectDirective = { + beforeMount(el, binding) { + nodeList.set(el, { + documentHandler: createDocumentHandler(el, binding), + bindingFn: binding.value, + }); + }, + updated(el, binding) { + nodeList.set(el, { + documentHandler: createDocumentHandler(el, binding), + bindingFn: binding.value, + }); + }, + unmounted(el) { + nodeList.delete(el); + }, +}; + +export default ClickOutside; diff --git a/src/directives/index.ts b/src/directives/index.ts new file mode 100644 index 0000000..0329eb6 --- /dev/null +++ b/src/directives/index.ts @@ -0,0 +1,11 @@ +/** + * Configure and register global directives + */ +import type { App } from 'vue'; +import { setupPermissionDirective } from './permission'; +import { setupLoadingDirective } from './loading'; + +export function setupGlobDirectives(app: App) { + setupPermissionDirective(app); + setupLoadingDirective(app); +} diff --git a/src/directives/loading.ts b/src/directives/loading.ts new file mode 100644 index 0000000..c2f25c6 --- /dev/null +++ b/src/directives/loading.ts @@ -0,0 +1,41 @@ +import { createLoading } from '/@/components/Loading'; +import type { Directive, App } from 'vue'; + +const loadingDirective: Directive = { + mounted(el, binding) { + const tip = el.getAttribute('loading-tip'); + const background = el.getAttribute('loading-background'); + const size = el.getAttribute('loading-size'); + const fullscreen = !!binding.modifiers.fullscreen; + const instance = createLoading( + { + tip, + background, + size: size || 'large', + loading: !!binding.value, + absolute: !fullscreen, + }, + fullscreen ? document.body : el + ); + el.instance = instance; + }, + updated(el, binding) { + const instance = el.instance; + if (!instance) return; + instance.setTip(el.getAttribute('loading-tip')); + if (binding.oldValue !== binding.value) { + if (binding.oldValue !== binding.value) { + instance.setLoading?.(binding.value && !instance.loading); + } + } + }, + unmounted(el) { + el?.instance?.close(); + }, +}; + +export function setupLoadingDirective(app: App) { + app.directive('loading', loadingDirective); +} + +export default loadingDirective; diff --git a/src/directives/permission.ts b/src/directives/permission.ts new file mode 100644 index 0000000..e5f60ac --- /dev/null +++ b/src/directives/permission.ts @@ -0,0 +1,33 @@ +/** + * Global authority directive + * Used for fine-grained control of component permissions + * @Example v-auth="RoleEnum.TEST" + */ +import type { App, Directive, DirectiveBinding } from 'vue'; + +import { usePermission } from '/@/hooks/web/usePermission'; + +function isAuth(el: Element, binding: any) { + // update-begin--author:liaozhiyang---date:20240529---for【TV360X-460】basicForm支持v-auth指令(权限控制显隐) + const value = binding.value; + if (!value) return; + // update-end--author:liaozhiyang---date:20240529---for【TV360X-460】basicForm支持v-auth指令(权限控制显隐) + const { hasPermission } = usePermission(); + if (!hasPermission(value)) { + el.parentNode?.removeChild(el); + } +} + +const mounted = (el: Element, binding: DirectiveBinding) => { + isAuth(el, binding); +}; + +const authDirective: Directive = { + mounted, +}; + +export function setupPermissionDirective(app: App) { + app.directive('auth', authDirective); +} + +export default authDirective; diff --git a/src/directives/repeatClick.ts b/src/directives/repeatClick.ts new file mode 100644 index 0000000..d4ef150 --- /dev/null +++ b/src/directives/repeatClick.ts @@ -0,0 +1,31 @@ +/** + * Prevent repeated clicks + * @Example v-repeat-click="()=>{}" + */ +import { on, once } from '/@/utils/domUtils'; +import type { Directive, DirectiveBinding } from 'vue'; + +const repeatDirective: Directive = { + beforeMount(el: Element, binding: DirectiveBinding) { + let interval: Nullable = null; + let startTime = 0; + const handler = (): void => binding?.value(); + const clear = (): void => { + if (Date.now() - startTime < 100) { + handler(); + } + interval && clearInterval(interval); + interval = null; + }; + + on(el, 'mousedown', (e: MouseEvent): void => { + if ((e as any).button !== 0) return; + startTime = Date.now(); + once(document as any, 'mouseup', clear); + interval && clearInterval(interval); + interval = setInterval(handler, 100); + }); + }, +}; + +export default repeatDirective; diff --git a/src/directives/ripple/index.less b/src/directives/ripple/index.less new file mode 100644 index 0000000..9c0718e --- /dev/null +++ b/src/directives/ripple/index.less @@ -0,0 +1,21 @@ +.ripple-container { + position: absolute; + top: 0; + left: 0; + width: 0; + height: 0; + overflow: hidden; + pointer-events: none; +} + +.ripple-effect { + position: relative; + z-index: 9999; + width: 1px; + height: 1px; + margin-top: 0; + margin-left: 0; + pointer-events: none; + border-radius: 50%; + transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1); +} diff --git a/src/directives/ripple/index.ts b/src/directives/ripple/index.ts new file mode 100644 index 0000000..6932264 --- /dev/null +++ b/src/directives/ripple/index.ts @@ -0,0 +1,180 @@ +import type { Directive } from 'vue'; +import './index.less'; +export interface RippleOptions { + event: string; + transition: number; +} + +export interface RippleProto { + background?: string; + zIndex?: string; +} + +export type EventType = Event & MouseEvent & TouchEvent; + +const options: RippleOptions = { + event: 'mousedown', + transition: 400, +}; + +const RippleDirective: Directive & RippleProto = { + beforeMount: (el: HTMLElement, binding) => { + if (binding.value === false) return; + + const bg = el.getAttribute('ripple-background'); + setProps(Object.keys(binding.modifiers), options); + + const background = bg || RippleDirective.background; + const zIndex = RippleDirective.zIndex; + + el.addEventListener(options.event, (event: EventType) => { + rippler({ + event, + el, + background, + zIndex, + }); + }); + }, + updated(el, binding) { + if (!binding.value) { + el?.clearRipple?.(); + return; + } + const bg = el.getAttribute('ripple-background'); + el?.setBackground?.(bg); + }, +}; + +function rippler({ event, el, zIndex, background }: { event: EventType; el: HTMLElement } & RippleProto) { + const targetBorder = parseInt(getComputedStyle(el).borderWidth.replace('px', '')); + const clientX = event.clientX || event.touches[0].clientX; + const clientY = event.clientY || event.touches[0].clientY; + + const rect = el.getBoundingClientRect(); + const { left, top } = rect; + const { offsetWidth: width, offsetHeight: height } = el; + const { transition } = options; + const dx = clientX - left; + const dy = clientY - top; + const maxX = Math.max(dx, width - dx); + const maxY = Math.max(dy, height - dy); + const style = window.getComputedStyle(el); + const radius = Math.sqrt(maxX * maxX + maxY * maxY); + const border = targetBorder > 0 ? targetBorder : 0; + + const ripple = document.createElement('div'); + const rippleContainer = document.createElement('div'); + + // Styles for ripple + ripple.className = 'ripple'; + + Object.assign(ripple.style ?? {}, { + marginTop: '0px', + marginLeft: '0px', + width: '1px', + height: '1px', + transition: `all ${transition}ms cubic-bezier(0.4, 0, 0.2, 1)`, + borderRadius: '50%', + pointerEvents: 'none', + position: 'relative', + zIndex: zIndex ?? '9999', + backgroundColor: background ?? 'rgba(0, 0, 0, 0.12)', + }); + + // Styles for rippleContainer + rippleContainer.className = 'ripple-container'; + Object.assign(rippleContainer.style ?? {}, { + position: 'absolute', + left: `${0 - border}px`, + top: `${0 - border}px`, + height: '0', + width: '0', + pointerEvents: 'none', + overflow: 'hidden', + }); + + const storedTargetPosition = el.style.position.length > 0 ? el.style.position : getComputedStyle(el).position; + + if (storedTargetPosition !== 'relative') { + el.style.position = 'relative'; + } + + rippleContainer.appendChild(ripple); + el.appendChild(rippleContainer); + + Object.assign(ripple.style, { + marginTop: `${dy}px`, + marginLeft: `${dx}px`, + }); + + const { borderTopLeftRadius, borderTopRightRadius, borderBottomLeftRadius, borderBottomRightRadius } = style; + Object.assign(rippleContainer.style, { + width: `${width}px`, + height: `${height}px`, + direction: 'ltr', + borderTopLeftRadius, + borderTopRightRadius, + borderBottomLeftRadius, + borderBottomRightRadius, + }); + + setTimeout(() => { + const wh = `${radius * 2}px`; + Object.assign(ripple.style ?? {}, { + width: wh, + height: wh, + marginLeft: `${dx - radius}px`, + marginTop: `${dy - radius}px`, + }); + }, 0); + + function clearRipple() { + setTimeout(() => { + ripple.style.backgroundColor = 'rgba(0, 0, 0, 0)'; + }, 250); + + setTimeout(() => { + rippleContainer?.parentNode?.removeChild(rippleContainer); + }, 850); + el.removeEventListener('mouseup', clearRipple, false); + el.removeEventListener('mouseleave', clearRipple, false); + el.removeEventListener('dragstart', clearRipple, false); + setTimeout(() => { + let clearPosition = true; + for (let i = 0; i < el.childNodes.length; i++) { + if ((el.childNodes[i] as Recordable).className === 'ripple-container') { + clearPosition = false; + } + } + + if (clearPosition) { + el.style.position = storedTargetPosition !== 'static' ? storedTargetPosition : ''; + } + }, options.transition + 260); + } + + if (event.type === 'mousedown') { + el.addEventListener('mouseup', clearRipple, false); + el.addEventListener('mouseleave', clearRipple, false); + el.addEventListener('dragstart', clearRipple, false); + } else { + clearRipple(); + } + + (el as Recordable).setBackground = (bgColor: string) => { + if (!bgColor) { + return; + } + ripple.style.backgroundColor = bgColor; + }; +} + +function setProps(modifiers: Recordable, props: Recordable) { + modifiers.forEach((item: Recordable) => { + if (isNaN(Number(item))) props.event = item; + else props.transition = item; + }); +} + +export default RippleDirective; diff --git a/src/electron/index.ts b/src/electron/index.ts new file mode 100644 index 0000000..84cb136 --- /dev/null +++ b/src/electron/index.ts @@ -0,0 +1,65 @@ +import type {App} from "vue"; +import {router} from "@/router"; +import {useGlobSetting} from "@/hooks/setting"; + +const glob = useGlobSetting(); + +const _PRELOAD_UTILS = '_ELECTRON_PRELOAD_UTILS_'; + +export const $electron = { + // 当前是否为Electron平台 + isElectron: () => glob.isElectronPlatform, + + // 通过浏览器打开链接 + openInBrowser: bindUtils('openInBrowser') as (url: string) => void, + + resolveRoutePath, +} + +function bindUtils(n: string) { + const fn = window[_PRELOAD_UTILS]?.[n]; + if (typeof fn?.bind === 'function') { + return fn.bind(null); + } + return () => console.warn(`Electron preload util ${n} is not a function`); +} + +// 解析路由路径 +function resolveRoutePath(path: string) { + return window.location.origin + window.location.pathname + router.resolve(path).href; +} + +/** + * 配置Electron + */ +export function setupElectron(_: App) { + // 非Electron平台不执行 + if (!$electron.isElectron()) { + return; + } + hookWindowOpen(); +} + +function hookWindowOpen() { + // 保存原生方法引用 + const originFunc = window.open; + // 重写window.open方法 + window['open'] = function (url, windowName, windowFeatures) { + url = typeof url === 'string' ? url.trim() : ''; + if (!url) { + throw new Error('window.open: url is required'); + } + // 判断是否以http或https开头 + if (/^https?:\/\//.test(url)) { + // 判断是否为本地地址 + if (url.startsWith(window.location.origin) || url.startsWith(window['_CONFIG']['domianURL'])) { + // 直接打开 + return originFunc(url, windowName, windowFeatures); + } + // 调用Electron进行外部浏览器打开 + return $electron.openInBrowser(url) as any; + } + // 自定义逻辑 + return originFunc(url, windowName, windowFeatures) + } +} \ No newline at end of file diff --git a/src/enums/CompTypeEnum.ts b/src/enums/CompTypeEnum.ts new file mode 100644 index 0000000..2ac5a19 --- /dev/null +++ b/src/enums/CompTypeEnum.ts @@ -0,0 +1,32 @@ +/** + * 组件类型 + */ +export enum CompTypeEnum { + //单选 + Radio = 'radio', + //按钮样式单选 + RadioButton = 'radioButton', + //下拉框 + Select = 'select', + //列表 + List = 'list', + //开关 + Switch = 'switch', + //下拉树 + SelTree = 'sel_tree', + //分类字典树 + CatTree = 'cat_tree', + //下拉搜索 + SelSearch = 'search', + //用户现在框 + SelUser = 'sel_user', + //复选框 + Checkbox = 'checkbox', + //多选列表 + ListMulti = 'list_multi', + //区域选择 + Pca = 'pca', + Popup = 'popup', + //部门选择 + SelDepart = 'sel_depart', +} diff --git a/src/enums/DateTypeEnum.ts b/src/enums/DateTypeEnum.ts new file mode 100644 index 0000000..9ccf88c --- /dev/null +++ b/src/enums/DateTypeEnum.ts @@ -0,0 +1,8 @@ +/** + * 日期类型 + */ +export enum DateTypeEnum { + Date = 'date', + Datetime = 'datetime', + Time = 'time', +} diff --git a/src/enums/appEnum.ts b/src/enums/appEnum.ts new file mode 100644 index 0000000..5d4b1b1 --- /dev/null +++ b/src/enums/appEnum.ts @@ -0,0 +1,58 @@ +export const SIDE_BAR_MINI_WIDTH = 48; +export const SIDE_BAR_SHOW_TIT_MINI_WIDTH = 80; + +// 标签页样式 +export enum TabsThemeEnum { + // 圆滑 + SMOOTH = 'smooth', + // 卡片 + CARD = 'card', + // 极简 + SIMPLE = 'simple', +} + +export enum ContentEnum { + // auto width + FULL = 'full', + // fixed width + FIXED = 'fixed', +} + +// menu theme enum +export enum ThemeEnum { + DARK = 'dark', + LIGHT = 'light', +} + +export enum SettingButtonPositionEnum { + AUTO = 'auto', + HEADER = 'header', + FIXED = 'fixed', +} + +export enum SessionTimeoutProcessingEnum { + ROUTE_JUMP, + PAGE_COVERAGE, +} + +/** + * 权限模式 + */ +export enum PermissionModeEnum { + // role + ROLE = 'ROLE', + // 后台 + BACK = 'BACK', + // route mapping + ROUTE_MAPPING = 'ROUTE_MAPPING', +} + +// Route switching animation +export enum RouterTransitionEnum { + ZOOM_FADE = 'zoom-fade', + ZOOM_OUT = 'zoom-out', + FADE_SIDE = 'fade-slide', + FADE = 'fade', + FADE_BOTTOM = 'fade-bottom', + FADE_SCALE = 'fade-scale', +} diff --git a/src/enums/breakpointEnum.ts b/src/enums/breakpointEnum.ts new file mode 100644 index 0000000..93acc1a --- /dev/null +++ b/src/enums/breakpointEnum.ts @@ -0,0 +1,28 @@ +export enum sizeEnum { + XS = 'XS', + SM = 'SM', + MD = 'MD', + LG = 'LG', + XL = 'XL', + XXL = 'XXL', +} + +export enum screenEnum { + XS = 480, + SM = 576, + MD = 768, + LG = 992, + XL = 1200, + XXL = 1600, +} + +const screenMap = new Map(); + +screenMap.set(sizeEnum.XS, screenEnum.XS); +screenMap.set(sizeEnum.SM, screenEnum.SM); +screenMap.set(sizeEnum.MD, screenEnum.MD); +screenMap.set(sizeEnum.LG, screenEnum.LG); +screenMap.set(sizeEnum.XL, screenEnum.XL); +screenMap.set(sizeEnum.XXL, screenEnum.XXL); + +export { screenMap }; diff --git a/src/enums/cacheEnum.ts b/src/enums/cacheEnum.ts new file mode 100644 index 0000000..0c88c0d --- /dev/null +++ b/src/enums/cacheEnum.ts @@ -0,0 +1,60 @@ +// token key +export const TOKEN_KEY = 'TOKEN__'; + +export const LOCALE_KEY = 'LOCALE__'; + +// user info key +export const USER_INFO_KEY = 'USER__INFO__'; + +// role info key +export const ROLES_KEY = 'ROLES__KEY__'; + +// dict info key +export const DB_DICT_DATA_KEY = 'UI_CACHE_DB_DICT_DATA'; + +// project config key +export const PROJ_CFG_KEY = 'PROJ__CFG__KEY__'; + +// lock info +export const LOCK_INFO_KEY = 'LOCK__INFO__KEY__'; + +export const MULTIPLE_TABS_KEY = 'MULTIPLE_TABS__KEY__'; + +export const APP_DARK_MODE_KEY_ = '__APP__DARK__MODE__'; + +// base global local key +export const APP_LOCAL_CACHE_KEY = 'COMMON__LOCAL__KEY__'; + +// base global session key +export const APP_SESSION_CACHE_KEY = 'COMMON__SESSION__KEY__'; +// 租户 key +export const TENANT_ID = 'TENANT_ID'; +// login info key +export const LOGIN_INFO_KEY = 'LOGIN__INFO__'; + +// 聊天UID key +export const JEECG_CHAT_UID = 'JEECG_CHAT_UID'; + +// 免登录租户id,与系统分开,避免重复 +export const OAUTH2_THIRD_LOGIN_TENANT_ID = 'THIRD_LOGIN_TENANT_ID'; + +// ai助手标识(退出需要记录一下) +export const AIDE_FLAG = 'AIDE_FLAG'; + +// ai助手标识(退出需要记录一下) +export const JEECG_CHAT_KEY = 'JEECG-CHAT-KEY'; + +// 【QQYUN-8925】系统主题颜色(供页面加载使用) +export const APP__THEME__COLOR = '__APP__THEME__COLOR__'; + +// +export const ROLE_AUTH_CONFIG_KEY = 'ROLE__AUTH__CONFIG__KEY__'; +// 部门角色权限 +export const DEPART_ROLE_AUTH_CONFIG_KEY = 'DEPART__ROLE__AUTH__CONFIG__KEY__'; +// 部门管理权限 +export const DEPART_MANGE_AUTH_CONFIG_KEY = 'DEPART__MANGE__AUTH__CONFIG__KEY__'; + +export enum CacheTypeEnum { + SESSION, + LOCAL, +} diff --git a/src/enums/exceptionEnum.ts b/src/enums/exceptionEnum.ts new file mode 100644 index 0000000..b02ac21 --- /dev/null +++ b/src/enums/exceptionEnum.ts @@ -0,0 +1,29 @@ +/** + * @description: Exception related enumeration + */ +export enum ExceptionEnum { + // page not access + PAGE_NOT_ACCESS = 403, + + // page not found + PAGE_NOT_FOUND = 404, + + // error + ERROR = 500, + + // net work error + NET_WORK_ERROR = 10000, + + // No data on the page. In fact, it is not an exception page + PAGE_NOT_DATA = 10100, + //短信验证码次数太多失败code,用于判断是否打开弹窗 + PHONE_SMS_FAIL_CODE = 40002, +} + +export enum ErrorTypeEnum { + VUE = 'vue', + SCRIPT = 'script', + RESOURCE = 'resource', + AJAX = 'ajax', + PROMISE = 'promise', +} diff --git a/src/enums/httpEnum.ts b/src/enums/httpEnum.ts new file mode 100644 index 0000000..7ce5819 --- /dev/null +++ b/src/enums/httpEnum.ts @@ -0,0 +1,50 @@ +/** + * @description: Request result set + */ +export enum ResultEnum { + SUCCESS = 0, + ERROR = 1, + TIMEOUT = 401, + TYPE = 'success', +} + +/** + * @description: request method + */ +export enum RequestEnum { + GET = 'GET', + POST = 'POST', + PUT = 'PUT', + DELETE = 'DELETE', +} + +/** + * @description: contentTyp + */ +export enum ContentTypeEnum { + // json + JSON = 'application/json;charset=UTF-8', + // form-data qs + FORM_URLENCODED = 'application/x-www-form-urlencoded;charset=UTF-8', + // form-data upload + FORM_DATA = 'multipart/form-data;charset=UTF-8', +} + +/** + * 请求header + * @description: contentTyp + */ +export enum ConfigEnum { + // TOKEN + TOKEN = 'X-Access-Token', + // TIMESTAMP + TIMESTAMP = 'X-TIMESTAMP', + // Sign + Sign = 'X-Sign', + // 租户id + TENANT_ID = 'X-Tenant-Id', + // 版本 + VERSION = 'X-Version', + // 低代码应用ID + X_LOW_APP_ID = 'X-Low-App-ID', +} diff --git a/src/enums/jeecgEnum.ts b/src/enums/jeecgEnum.ts new file mode 100644 index 0000000..4239ea6 --- /dev/null +++ b/src/enums/jeecgEnum.ts @@ -0,0 +1,23 @@ +/** + * JInput组件类型 + */ +export enum JInputTypeEnum { + //模糊 + JINPUT_QUERY_LIKE = 'like', + //非 + JINPUT_QUERY_NE = 'ne', + //大于等于 + JINPUT_QUERY_GE = 'ge', + //小于等于 + JINPUT_QUERY_LE = 'le', +} + +/** + * 面板设计器需要的常量定义 + */ +export enum JDragConfigEnum { + //baseURL + DRAG_BASE_URL = 'drag-base-url', + //拖拽缓存前缀 + DRAG_CACHE_PREFIX = 'drag-cache:', +} diff --git a/src/enums/menuEnum.ts b/src/enums/menuEnum.ts new file mode 100644 index 0000000..89cfa9f --- /dev/null +++ b/src/enums/menuEnum.ts @@ -0,0 +1,50 @@ +/** + * @description: menu type + */ +export enum MenuTypeEnum { + // left menu + SIDEBAR = 'sidebar', + + MIX_SIDEBAR = 'mix-sidebar', + // mixin menu + MIX = 'mix', + // top menu + TOP_MENU = 'top-menu', +} + +// 折叠触发器位置 +export enum TriggerEnum { + // 不显示 + NONE = 'NONE', + // 菜单底部 + FOOTER = 'FOOTER', + // 头部 + HEADER = 'HEADER', +} + +export type Mode = 'vertical' | 'vertical-right' | 'horizontal' | 'inline'; + +// menu mode +export enum MenuModeEnum { + VERTICAL = 'vertical', + HORIZONTAL = 'horizontal', + VERTICAL_RIGHT = 'vertical-right', + INLINE = 'inline', +} + +export enum MenuSplitTyeEnum { + NONE, + TOP, + LEFT, +} + +export enum TopMenuAlignEnum { + CENTER = 'center', + START = 'start', + END = 'end', +} + +export enum MixSidebarTriggerEnum { + HOVER = 'hover', + CLICK = 'click', +} diff --git a/src/enums/pageEnum.ts b/src/enums/pageEnum.ts new file mode 100644 index 0000000..58651ac --- /dev/null +++ b/src/enums/pageEnum.ts @@ -0,0 +1,16 @@ +export enum PageEnum { + // basic login path + BASE_LOGIN = '/login', + // basic home path + BASE_HOME = '/dashboard/analysis', + // error page path + ERROR_PAGE = '/exception', + // error log page path + ERROR_LOG_PAGE = '/error-log/list', + // auth2登录路由路径 + OAUTH2_LOGIN_PAGE_PATH = '/oauth2-app/login', + //文件路由 + SYS_FILES_PATH = '/file/share', + // 邮件中的跳转地址 + TOKEN_LOGIN = '/tokenLogin' +} diff --git a/src/enums/roleEnum.ts b/src/enums/roleEnum.ts new file mode 100644 index 0000000..857868d --- /dev/null +++ b/src/enums/roleEnum.ts @@ -0,0 +1,7 @@ +export enum RoleEnum { + // super admin + SUPER = 'super', + + // tester + TEST = 'test', +} diff --git a/src/enums/sizeEnum.ts b/src/enums/sizeEnum.ts new file mode 100644 index 0000000..4348c2c --- /dev/null +++ b/src/enums/sizeEnum.ts @@ -0,0 +1,27 @@ +export enum SizeEnum { + DEFAULT = 'default', + SMALL = 'small', + LARGE = 'large', +} + +export enum SizeNumberEnum { + DEFAULT = 48, + SMALL = 16, + LARGE = 64, +} + +export enum ScreenSizeEnum { + XS = 480, + SM = 576, + MD = 768, + LG = 992, + XL = 1200, +} + +export const sizeMap: Map = (() => { + const map = new Map(); + map.set(SizeEnum.DEFAULT, SizeNumberEnum.DEFAULT); + map.set(SizeEnum.SMALL, SizeNumberEnum.SMALL); + map.set(SizeEnum.LARGE, SizeNumberEnum.LARGE); + return map; +})(); diff --git a/src/hooks/component/useFormItem.ts b/src/hooks/component/useFormItem.ts new file mode 100644 index 0000000..8f9eeb9 --- /dev/null +++ b/src/hooks/component/useFormItem.ts @@ -0,0 +1,51 @@ +import type { UnwrapRef, Ref, WritableComputedRef, DeepReadonly } from 'vue'; +import { reactive, readonly, computed, getCurrentInstance, watchEffect, unref, nextTick, toRaw } from 'vue'; +import { Form } from 'ant-design-vue'; +import { FormItemContext } from 'ant-design-vue/es/form/FormItemContext'; + +import { isEqual } from 'lodash-es'; +export function useRuleFormItem>( + props: T, + key?: K, + changeEvent?, + emitData?: Ref +): [WritableComputedRef, (val: V) => void, DeepReadonly, FormItemContext]; +export function useRuleFormItem(props: T, key: keyof T = 'value', changeEvent = 'change', emitData?: Ref) { + const instance = getCurrentInstance(); + const emit = instance?.emit; + const formItemContext = Form.useInjectFormItemContext(); + + const innerState = reactive({ + value: props[key], + }); + + const defaultState = readonly(innerState); + + const setState = (val: UnwrapRef): void => { + innerState.value = val as T[keyof T]; + }; + + watchEffect(() => { + innerState.value = props[key]; + }); + + const state: any = computed({ + get() { + //修复多选时空值显示问题(兼容值为0的情况) + return innerState.value == null || innerState.value === '' ? [] : innerState.value; + }, + set(value) { + if (isEqual(value, defaultState.value)) return; + + innerState.value = value as T[keyof T]; + nextTick(() => { + emit?.(changeEvent, value, ...(toRaw(unref(emitData)) || [])); + // https://antdv.com/docs/vue/migration-v3-cn + // antDv3升级后需要调用这个方法更新校验的值 + nextTick(() => formItemContext.onFieldChange()); + }); + }, + }); + + return [state, setState, defaultState, formItemContext]; +} diff --git a/src/hooks/component/useFormItemSingle.ts b/src/hooks/component/useFormItemSingle.ts new file mode 100644 index 0000000..a8b08fe --- /dev/null +++ b/src/hooks/component/useFormItemSingle.ts @@ -0,0 +1,50 @@ +import type { UnwrapRef, Ref, WritableComputedRef, DeepReadonly } from 'vue'; +import { reactive, readonly, computed, getCurrentInstance, watchEffect, unref, nextTick, toRaw } from 'vue'; +import { Form } from 'ant-design-vue'; +import { FormItemContext } from 'ant-design-vue/es/form/FormItemContext'; + +import { isEqual } from 'lodash-es'; +export function useRuleFormItem>( + props: T, + key?: K, + changeEvent?, + emitData?: Ref +): [WritableComputedRef, (val: V) => void, DeepReadonly, FormItemContext]; +export function useRuleFormItem(props: T, key: keyof T = 'value', changeEvent = 'change', emitData?: Ref) { + const instance = getCurrentInstance(); + const emit = instance?.emit; + const formItemContext = Form.useInjectFormItemContext(); + + const innerState = reactive({ + value: props[key], + }); + + const defaultState = readonly(innerState); + + const setState = (val: UnwrapRef): void => { + innerState.value = val as T[keyof T]; + }; + + watchEffect(() => { + innerState.value = props[key]; + }); + + const state: any = computed({ + get() { + return innerState.value == null ? "" : innerState.value; + }, + set(value) { + if (isEqual(value, defaultState.value)) return; + + innerState.value = value as T[keyof T]; + nextTick(() => { + emit?.(changeEvent, value, ...(toRaw(unref(emitData)) || [])); + // https://antdv.com/docs/vue/migration-v3-cn + // antDv3升级后需要调用这个方法更新校验的值 + nextTick(() => formItemContext.onFieldChange()); + }); + }, + }); + + return [state, setState, defaultState, formItemContext]; +} diff --git a/src/hooks/component/usePageContext.ts b/src/hooks/component/usePageContext.ts new file mode 100644 index 0000000..12cc160 --- /dev/null +++ b/src/hooks/component/usePageContext.ts @@ -0,0 +1,18 @@ +import type { InjectionKey, ComputedRef, Ref } from 'vue'; +import { createContext, useContext } from '/@/hooks/core/useContext'; + +export interface PageContextProps { + contentHeight: ComputedRef; + pageHeight: Ref; + setPageHeight: (height: number) => Promise; +} + +const key: InjectionKey = Symbol(); + +export function createPageContext(context: PageContextProps) { + return createContext(context, key, { native: true }); +} + +export function usePageContext() { + return useContext(key); +} diff --git a/src/hooks/core/onMountedOrActivated.ts b/src/hooks/core/onMountedOrActivated.ts new file mode 100644 index 0000000..859083d --- /dev/null +++ b/src/hooks/core/onMountedOrActivated.ts @@ -0,0 +1,22 @@ +import { nextTick, onMounted, onActivated } from 'vue'; + +type HookArgs = { + type: 'mounted' | 'activated'; +} + +export function onMountedOrActivated(hook: Fn) { + let mounted: boolean; + + onMounted(() => { + hook({type: 'mounted'}); + nextTick(() => { + mounted = true; + }); + }); + + onActivated(() => { + if (mounted) { + hook({type: 'activated'}); + } + }); +} diff --git a/src/hooks/core/useAttrs.ts b/src/hooks/core/useAttrs.ts new file mode 100644 index 0000000..ea96575 --- /dev/null +++ b/src/hooks/core/useAttrs.ts @@ -0,0 +1,41 @@ +import { getCurrentInstance, reactive, shallowRef, watchEffect } from 'vue'; +import type { Ref } from 'vue'; + +interface Params { + excludeListeners?: boolean; + excludeKeys?: string[]; + excludeDefaultKeys?: boolean; +} + +const DEFAULT_EXCLUDE_KEYS = ['class', 'style']; +const LISTENER_PREFIX = /^on[A-Z]/; + +export function entries(obj: Recordable): [string, T][] { + return Object.keys(obj).map((key: string) => [key, obj[key]]); +} + +export function useAttrs(params: Params = {}): Ref | {} { + const instance = getCurrentInstance(); + if (!instance) return {}; + + const { excludeListeners = false, excludeKeys = [], excludeDefaultKeys = true } = params; + const attrs = shallowRef({}); + const allExcludeKeys = excludeKeys.concat(excludeDefaultKeys ? DEFAULT_EXCLUDE_KEYS : []); + + // Since attrs are not reactive, make it reactive instead of doing in `onUpdated` hook for better performance + instance.attrs = reactive(instance.attrs); + + watchEffect(() => { + const res = entries(instance.attrs).reduce((acm, [key, val]) => { + if (!allExcludeKeys.includes(key) && !(excludeListeners && LISTENER_PREFIX.test(key))) { + acm[key] = val; + } + + return acm; + }, {} as Recordable); + + attrs.value = res; + }); + + return attrs; +} diff --git a/src/hooks/core/useContext.ts b/src/hooks/core/useContext.ts new file mode 100644 index 0000000..0f039eb --- /dev/null +++ b/src/hooks/core/useContext.ts @@ -0,0 +1,38 @@ +import { + InjectionKey, + provide, + inject, + reactive, + readonly as defineReadonly, + // defineComponent, + UnwrapRef, +} from 'vue'; + +export interface CreateContextOptions { + readonly?: boolean; + createProvider?: boolean; + native?: boolean; +} + +type ShallowUnwrap = { + [P in keyof T]: UnwrapRef; +}; + +export function createContext(context: any, key: InjectionKey = Symbol(), options: CreateContextOptions = {}) { + const { readonly = true, createProvider = false, native = false } = options; + + const state = reactive(context); + const provideData = readonly ? defineReadonly(state) : state; + !createProvider && provide(key, native ? context : provideData); + + return { + state, + }; +} + +export function useContext(key: InjectionKey, native?: boolean): T; +export function useContext(key: InjectionKey, defaultValue?: any, native?: boolean): T; + +export function useContext(key: InjectionKey = Symbol(), defaultValue?: any): ShallowUnwrap { + return inject(key, defaultValue || {}); +} diff --git a/src/hooks/core/useLockFn.ts b/src/hooks/core/useLockFn.ts new file mode 100644 index 0000000..141073b --- /dev/null +++ b/src/hooks/core/useLockFn.ts @@ -0,0 +1,17 @@ +import { ref, unref } from 'vue'; + +export function useLockFn

(fn: (...args: P) => Promise) { + const lockRef = ref(false); + return async function (...args: P) { + if (unref(lockRef)) return; + lockRef.value = true; + try { + const ret = await fn(...args); + lockRef.value = false; + return ret; + } catch (e) { + lockRef.value = false; + throw e; + } + }; +} diff --git a/src/hooks/core/useRefs.ts b/src/hooks/core/useRefs.ts new file mode 100644 index 0000000..180bb14 --- /dev/null +++ b/src/hooks/core/useRefs.ts @@ -0,0 +1,16 @@ +import type { Ref } from 'vue'; +import { ref, onBeforeUpdate } from 'vue'; + +export function useRefs(): [Ref, (index: number) => (el: HTMLElement) => void] { + const refs = ref([]) as Ref; + + onBeforeUpdate(() => { + refs.value = []; + }); + + const setRefs = (index: number) => (el: HTMLElement) => { + refs.value[index] = el; + }; + + return [refs, setRefs]; +} diff --git a/src/hooks/core/useTimeout.ts b/src/hooks/core/useTimeout.ts new file mode 100644 index 0000000..a549ac2 --- /dev/null +++ b/src/hooks/core/useTimeout.ts @@ -0,0 +1,45 @@ +import { ref, watch } from 'vue'; +import { tryOnUnmounted } from '@vueuse/core'; +import { isFunction } from '/@/utils/is'; + +export function useTimeoutFn(handle: Fn, wait: number, native = false) { + if (!isFunction(handle)) { + throw new Error('handle is not Function!'); + } + + const { readyRef, stop, start } = useTimeoutRef(wait); + if (native) { + handle(); + } else { + watch( + readyRef, + (maturity) => { + maturity && handle(); + }, + { immediate: false } + ); + } + return { readyRef, stop, start }; +} + +export function useTimeoutRef(wait: number) { + const readyRef = ref(false); + + let timer: TimeoutHandle; + function stop(): void { + readyRef.value = false; + timer && window.clearTimeout(timer); + } + function start(): void { + stop(); + timer = setTimeout(() => { + readyRef.value = true; + }, wait); + } + + start(); + + tryOnUnmounted(stop); + + return { readyRef, stop, start }; +} diff --git a/src/hooks/event/useBreakpoint.ts b/src/hooks/event/useBreakpoint.ts new file mode 100644 index 0000000..01bbbec --- /dev/null +++ b/src/hooks/event/useBreakpoint.ts @@ -0,0 +1,89 @@ +import { ref, computed, ComputedRef, unref } from 'vue'; +import { useEventListener } from '/@/hooks/event/useEventListener'; +import { screenMap, sizeEnum, screenEnum } from '/@/enums/breakpointEnum'; + +let globalScreenRef: ComputedRef; +let globalWidthRef: ComputedRef; +let globalRealWidthRef: ComputedRef; + +export interface CreateCallbackParams { + screen: ComputedRef; + width: ComputedRef; + realWidth: ComputedRef; + screenEnum: typeof screenEnum; + screenMap: Map; + sizeEnum: typeof sizeEnum; +} + +export function useBreakpoint() { + return { + screenRef: computed(() => unref(globalScreenRef)), + widthRef: globalWidthRef, + screenEnum, + realWidthRef: globalRealWidthRef, + }; +} + +// Just call it once +export function createBreakpointListen(fn?: (opt: CreateCallbackParams) => void) { + const screenRef = ref(sizeEnum.XL); + const realWidthRef = ref(window.innerWidth); + + function getWindowWidth() { + const width = document.body.clientWidth; + const xs = screenMap.get(sizeEnum.XS)!; + const sm = screenMap.get(sizeEnum.SM)!; + const md = screenMap.get(sizeEnum.MD)!; + const lg = screenMap.get(sizeEnum.LG)!; + const xl = screenMap.get(sizeEnum.XL)!; + if (width < xs) { + screenRef.value = sizeEnum.XS; + } else if (width < sm) { + screenRef.value = sizeEnum.SM; + } else if (width < md) { + screenRef.value = sizeEnum.MD; + } else if (width < lg) { + screenRef.value = sizeEnum.LG; + } else if (width < xl) { + screenRef.value = sizeEnum.XL; + } else { + screenRef.value = sizeEnum.XXL; + } + realWidthRef.value = width; + } + + useEventListener({ + el: window, + name: 'resize', + + listener: () => { + getWindowWidth(); + resizeFn(); + }, + // wait: 100, + }); + + getWindowWidth(); + globalScreenRef = computed(() => unref(screenRef)); + globalWidthRef = computed((): number => screenMap.get(unref(screenRef)!)!); + globalRealWidthRef = computed((): number => unref(realWidthRef)); + + function resizeFn() { + fn?.({ + screen: globalScreenRef, + width: globalWidthRef, + realWidth: globalRealWidthRef, + screenEnum, + screenMap, + sizeEnum, + }); + } + + resizeFn(); + return { + screenRef: globalScreenRef, + screenEnum, + widthRef: globalWidthRef, + realWidthRef: globalRealWidthRef, + }; +} diff --git a/src/hooks/event/useEventListener.ts b/src/hooks/event/useEventListener.ts new file mode 100644 index 0000000..35e58be --- /dev/null +++ b/src/hooks/event/useEventListener.ts @@ -0,0 +1,52 @@ +import type { Ref } from 'vue'; +import { ref, watch, unref } from 'vue'; +import { useThrottleFn, useDebounceFn } from '@vueuse/core'; + +export type RemoveEventFn = () => void; +export interface UseEventParams { + el?: Element | Ref | Window | any; + name: string; + listener: EventListener; + options?: boolean | AddEventListenerOptions; + autoRemove?: boolean; + isDebounce?: boolean; + wait?: number; +} +export function useEventListener({ el = window, name, listener, options, autoRemove = true, isDebounce = true, wait = 80 }: UseEventParams): { + removeEvent: RemoveEventFn; +} { + /* eslint-disable-next-line */ + let remove: RemoveEventFn = () => {}; + const isAddRef = ref(false); + + if (el) { + const element = ref(el as Element) as Ref; + + const handler = isDebounce ? useDebounceFn(listener, wait) : useThrottleFn(listener, wait); + const realHandler = wait ? handler : listener; + const removeEventListener = (e: Element) => { + isAddRef.value = true; + e.removeEventListener(name, realHandler, options); + }; + const addEventListener = (e: Element) => e.addEventListener(name, realHandler, options); + + const removeWatch = watch( + element, + (v, _ov, cleanUp) => { + if (v) { + !unref(isAddRef) && addEventListener(v); + cleanUp(() => { + autoRemove && removeEventListener(v); + }); + } + }, + { immediate: true } + ); + + remove = () => { + removeEventListener(element.value); + removeWatch(); + }; + } + return { removeEvent: remove }; +} diff --git a/src/hooks/event/useIntersectionObserver.ts b/src/hooks/event/useIntersectionObserver.ts new file mode 100644 index 0000000..44ed699 --- /dev/null +++ b/src/hooks/event/useIntersectionObserver.ts @@ -0,0 +1,42 @@ +import { Ref, watchEffect, ref } from 'vue'; + +interface IntersectionObserverProps { + target: Ref; + root?: Ref; + onIntersect: IntersectionObserverCallback; + rootMargin?: string; + threshold?: number; +} + +export function useIntersectionObserver({ target, root, onIntersect, rootMargin = '0px', threshold = 0.1 }: IntersectionObserverProps) { + let cleanup = () => {}; + const observer: Ref> = ref(null); + const stopEffect = watchEffect(() => { + cleanup(); + + observer.value = new IntersectionObserver(onIntersect, { + root: root ? root.value : null, + rootMargin, + threshold, + }); + + const current = target.value; + + current && observer.value.observe(current); + + cleanup = () => { + if (observer.value) { + observer.value.disconnect(); + target.value && observer.value.unobserve(target.value); + } + }; + }); + + return { + observer, + stop: () => { + cleanup(); + stopEffect(); + }, + }; +} diff --git a/src/hooks/event/useScroll.ts b/src/hooks/event/useScroll.ts new file mode 100644 index 0000000..2a4b7bc --- /dev/null +++ b/src/hooks/event/useScroll.ts @@ -0,0 +1,65 @@ +import type { Ref } from 'vue'; + +import { ref, onMounted, watch, onUnmounted } from 'vue'; +import { isWindow, isObject } from '/@/utils/is'; +import { useThrottleFn } from '@vueuse/core'; + +export function useScroll( + refEl: Ref, + options?: { + wait?: number; + leading?: boolean; + trailing?: boolean; + } +) { + const refX = ref(0); + const refY = ref(0); + let handler = () => { + if (isWindow(refEl.value)) { + refX.value = refEl.value.scrollX; + refY.value = refEl.value.scrollY; + } else if (refEl.value) { + refX.value = (refEl.value as Element).scrollLeft; + refY.value = (refEl.value as Element).scrollTop; + } + }; + + if (isObject(options)) { + let wait = 0; + if (options.wait && options.wait > 0) { + wait = options.wait; + Reflect.deleteProperty(options, 'wait'); + } + + handler = useThrottleFn(handler, wait); + } + + let stopWatch: () => void; + onMounted(() => { + stopWatch = watch( + refEl, + (el, prevEl, onCleanup) => { + if (el) { + el.addEventListener('scroll', handler); + } else if (prevEl) { + prevEl.removeEventListener('scroll', handler); + } + onCleanup(() => { + refX.value = refY.value = 0; + el && el.removeEventListener('scroll', handler); + }); + }, + { immediate: true } + ); + }); + + onUnmounted(() => { + refEl.value && refEl.value.removeEventListener('scroll', handler); + }); + + function stop() { + stopWatch && stopWatch(); + } + + return { refX, refY, stop }; +} diff --git a/src/hooks/event/useScrollTo.ts b/src/hooks/event/useScrollTo.ts new file mode 100644 index 0000000..f6d5dc6 --- /dev/null +++ b/src/hooks/event/useScrollTo.ts @@ -0,0 +1,59 @@ +import { isFunction, isUnDef } from '/@/utils/is'; +import { ref, unref } from 'vue'; + +export interface ScrollToParams { + el: any; + to: number; + duration?: number; + callback?: () => any; +} + +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, amount: number) => { + el.scrollTop = amount; +}; + +const position = (el: HTMLElement) => { + return el.scrollTop; +}; +export function useScrollTo({ el, to, duration = 500, callback }: ScrollToParams) { + const isActiveRef = ref(false); + const start = position(el); + const change = to - start; + const increment = 20; + let currentTime = 0; + duration = isUnDef(duration) ? 500 : duration; + + const animateScroll = function () { + if (!unref(isActiveRef)) { + return; + } + currentTime += increment; + const val = easeInOutQuad(currentTime, start, change, duration); + move(el, val); + if (currentTime < duration && unref(isActiveRef)) { + requestAnimationFrame(animateScroll); + } else { + if (callback && isFunction(callback)) { + callback(); + } + } + }; + const run = () => { + isActiveRef.value = true; + animateScroll(); + }; + + const stop = () => { + isActiveRef.value = false; + }; + + return { start: run, stop }; +} diff --git a/src/hooks/event/useWindowSizeFn.ts b/src/hooks/event/useWindowSizeFn.ts new file mode 100644 index 0000000..7b18ca0 --- /dev/null +++ b/src/hooks/event/useWindowSizeFn.ts @@ -0,0 +1,36 @@ +import { tryOnMounted, tryOnUnmounted } from '@vueuse/core'; +import { useDebounceFn } from '@vueuse/core'; + +interface WindowSizeOptions { + once?: boolean; + immediate?: boolean; + listenerOptions?: AddEventListenerOptions | boolean; +} + +export function useWindowSizeFn(fn: Fn, wait = 150, options?: WindowSizeOptions) { + let handler = () => { + fn(); + }; + const handleSize = useDebounceFn(handler, wait); + handler = handleSize; + + const start = () => { + if (options && options.immediate) { + handler(); + } + window.addEventListener('resize', handler); + }; + + const stop = () => { + window.removeEventListener('resize', handler); + }; + + tryOnMounted(() => { + start(); + }); + + tryOnUnmounted(() => { + stop(); + }); + return [start, stop]; +} diff --git a/src/hooks/jeecg/useAdaptiveWidth.ts b/src/hooks/jeecg/useAdaptiveWidth.ts new file mode 100644 index 0000000..2eb88ec --- /dev/null +++ b/src/hooks/jeecg/useAdaptiveWidth.ts @@ -0,0 +1,88 @@ +/** + * 自适应宽度构造器 + * + * @time 2022-4-8 + * @author sunjianlei + */ +import { ref } from 'vue'; +import { useDebounceFn, tryOnUnmounted } from '@vueuse/core'; +import { useEventListener } from '/@/hooks/event/useEventListener'; + +// key = js运算符+数字 +const defWidthConfig: configType = { + '<=565': '100%', + '<=1366': '800px', + '<=1600': '600px', + '<=1920': '600px', + '>1920': '500px', +}; + +type configType = Record; + +/** + * 自适应宽度 + * + * @param widthConfig 宽度配置,可参考 defWidthConfig 配置 + * @param assign 是否合并默认配置 + * @param debounce 去抖毫秒数 + */ +export function useAdaptiveWidth(widthConfig = defWidthConfig, assign = true, debounce = 50) { + const widthConfigAssign = assign ? Object.assign({}, defWidthConfig, widthConfig) : widthConfig; + const configKeys = Object.keys(widthConfigAssign); + + const adaptiveWidth = ref(); + + /** + * 进行计算宽度 + * @param innerWidth + */ + function calcWidth(innerWidth) { + let width; + for (const key of configKeys) { + try { + // 通过js运算 + let flag = new Function(`return ${innerWidth} ${key}`)(); + if (flag) { + width = widthConfigAssign[key]; + break; + } + } catch (e) { + console.error(e); + } + } + if (width) { + adaptiveWidth.value = width; + } else { + console.warn('没有找到匹配的自适应宽度'); + } + } + + // 初始计算 + calcWidth(window.innerWidth); + + // 监听 resize 事件 + const { removeEvent } = useEventListener({ + el: window, + name: 'resize', + listener: useDebounceFn(() => calcWidth(window.innerWidth), debounce), + }); + // 卸载组件时取消监听事件 + tryOnUnmounted(() => removeEvent()); + + return { adaptiveWidth }; +} + +/** + * 抽屉自适应宽度 + */ +export function useDrawerAdaptiveWidth() { + return useAdaptiveWidth( + { + '<=620': '100%', + '<=1600': 600, + '<=1920': 650, + '>1920': 700, + }, + false + ); +} diff --git a/src/hooks/setting/index.ts b/src/hooks/setting/index.ts new file mode 100644 index 0000000..ea3b5a5 --- /dev/null +++ b/src/hooks/setting/index.ts @@ -0,0 +1,74 @@ +import type { GlobConfig } from '/#/config'; + +import { getAppEnvConfig } from '/@/utils/env'; + +export const useGlobSetting = (): Readonly => { + const { + VITE_GLOB_APP_TITLE, + VITE_GLOB_API_URL, + VITE_GLOB_APP_SHORT_NAME, + VITE_GLOB_API_URL_PREFIX, + VITE_GLOB_APP_CAS_BASE_URL, + VITE_GLOB_APP_OPEN_SSO, + VITE_GLOB_APP_OPEN_QIANKUN, + VITE_GLOB_DOMAIN_URL, + VITE_GLOB_ONLINE_VIEW_URL, + VITE_GLOB_RUN_PLATFORM, + + // 【JEECG作为乾坤子应用】 + VITE_GLOB_QIANKUN_MICRO_APP_NAME, + VITE_GLOB_QIANKUN_MICRO_APP_ENTRY, + } = getAppEnvConfig(); + + // if (!/[a-zA-Z\_]*/.test(VITE_GLOB_APP_SHORT_NAME)) { + // warn( + // `VITE_GLOB_APP_SHORT_NAME Variables can only be characters/underscores, please modify in the environment variables and re-running.` + // ); + // } + + // 短标题:替换shortName的下划线为空格 + const shortTitle = VITE_GLOB_APP_SHORT_NAME.replace(/_/g, " "); + // Take global configuration + const glob: Readonly = { + title: VITE_GLOB_APP_TITLE, + domainUrl: VITE_GLOB_DOMAIN_URL, + apiUrl: VITE_GLOB_API_URL, + shortName: VITE_GLOB_APP_SHORT_NAME, + shortTitle: shortTitle, + openSso: VITE_GLOB_APP_OPEN_SSO, + openQianKun: VITE_GLOB_APP_OPEN_QIANKUN, + casBaseUrl: VITE_GLOB_APP_CAS_BASE_URL, + urlPrefix: VITE_GLOB_API_URL_PREFIX, + uploadUrl: VITE_GLOB_DOMAIN_URL, + viewUrl: VITE_GLOB_ONLINE_VIEW_URL, + // 当前是否运行在 electron 平台 + isElectronPlatform: VITE_GLOB_RUN_PLATFORM === 'electron', + + // 【JEECG作为乾坤子应用】是否以乾坤子应用模式启动 + isQiankunMicro: VITE_GLOB_QIANKUN_MICRO_APP_NAME != null && VITE_GLOB_QIANKUN_MICRO_APP_NAME !== '', + // 【JEECG作为乾坤子应用】乾坤子应用入口 + qiankunMicroAppEntry: VITE_GLOB_QIANKUN_MICRO_APP_ENTRY, + }; + + // 【JEECG作为乾坤子应用】乾坤子应用下,需要定义一下 + if (!window['_CONFIG']) { + window['_CONFIG'] = {} + } + + // update-begin--author:sunjianlei---date:220250115---for:【QQYUN-10956】配置了自定义前缀,外部连接打不开,需要兼容处理 + let domainURL = VITE_GLOB_DOMAIN_URL; + + // 如果不是以http(s)开头的,也不是以域名开头的,那么就是拼接当前域名 + if (!/^http(s)?/.test(domainURL) && !/^(\/\/)?(.*\.)?.+\..+/.test(domainURL)) { + if (!domainURL.startsWith('/')) { + domainURL = '/' + domainURL; + } + domainURL = window.location.origin + domainURL; + } + // update-end--author:sunjianlei---date:220250115---for:【QQYUN-10956】配置了自定义前缀,外部连接打不开,需要兼容处理 + + // @ts-ignore + window._CONFIG['domianURL'] = domainURL; + + return glob as Readonly; +}; diff --git a/src/hooks/setting/useHeaderSetting.ts b/src/hooks/setting/useHeaderSetting.ts new file mode 100644 index 0000000..098ed39 --- /dev/null +++ b/src/hooks/setting/useHeaderSetting.ts @@ -0,0 +1,90 @@ +import type { HeaderSetting } from '/#/config'; + +import { computed, unref } from 'vue'; + +import { useAppStore } from '/@/store/modules/app'; + +import { useMenuSetting } from '/@/hooks/setting/useMenuSetting'; +import { useRootSetting } from '/@/hooks/setting/useRootSetting'; +import { useFullContent } from '/@/hooks/web/useFullContent'; +import { MenuModeEnum } from '/@/enums/menuEnum'; + +export function useHeaderSetting() { + const { getFullContent } = useFullContent(); + const appStore = useAppStore(); + + const getShowFullHeaderRef = computed(() => { + return !unref(getFullContent) && unref(getShowMixHeaderRef) && unref(getShowHeader) && !unref(getIsTopMenu) && !unref(getIsMixSidebar); + }); + + const getUnFixedAndFull = computed(() => !unref(getFixed) && !unref(getShowFullHeaderRef)); + + const getShowInsetHeaderRef = computed(() => { + const need = !unref(getFullContent) && unref(getShowHeader); + return (need && !unref(getShowMixHeaderRef)) || (need && unref(getIsTopMenu)) || (need && unref(getIsMixSidebar)); + }); + + const { getMenuMode, getSplit, getShowHeaderTrigger, getIsSidebarType, getIsMixSidebar, getIsTopMenu } = useMenuSetting(); + const { getShowBreadCrumb, getShowLogo } = useRootSetting(); + + const getShowMixHeaderRef = computed(() => !unref(getIsSidebarType) && unref(getShowHeader)); + + const getShowDoc = computed(() => appStore.getHeaderSetting.showDoc); + + const getHeaderTheme = computed(() => appStore.getHeaderSetting.theme); + + const getShowHeader = computed(() => appStore.getHeaderSetting.show); + + const getFixed = computed(() => appStore.getHeaderSetting.fixed); + + const getHeaderBgColor = computed(() => appStore.getHeaderSetting.bgColor); + + const getShowSearch = computed(() => appStore.getHeaderSetting.showSearch); + + const getUseLockPage = computed(() => appStore.getHeaderSetting.useLockPage); + + const getShowFullScreen = computed(() => appStore.getHeaderSetting.showFullScreen); + + const getShowNotice = computed(() => appStore.getHeaderSetting.showNotice); + + const getShowBread = computed(() => { + return unref(getMenuMode) !== MenuModeEnum.HORIZONTAL && unref(getShowBreadCrumb) && !unref(getSplit); + }); + const getShowBreadTitle = computed(() => { + return unref(getMenuMode) !== MenuModeEnum.HORIZONTAL && !unref(getShowBreadCrumb) && !unref(getSplit); + }); + + const getShowHeaderLogo = computed(() => { + return unref(getShowLogo) && !unref(getIsSidebarType) && !unref(getIsMixSidebar); + }); + + const getShowContent = computed(() => { + return unref(getShowBread) || unref(getShowHeaderTrigger); + }); + + // Set header configuration + function setHeaderSetting(headerSetting: Partial) { + appStore.setProjectConfig({ headerSetting }); + } + return { + setHeaderSetting, + + getShowDoc, + getShowSearch, + getHeaderTheme, + getUseLockPage, + getShowFullScreen, + getShowNotice, + getShowBread, + getShowContent, + getShowHeaderLogo, + getShowHeader, + getFixed, + getShowMixHeaderRef, + getShowFullHeaderRef, + getShowInsetHeaderRef, + getUnFixedAndFull, + getHeaderBgColor, + getShowBreadTitle + }; +} diff --git a/src/hooks/setting/useMenuSetting.ts b/src/hooks/setting/useMenuSetting.ts new file mode 100644 index 0000000..47e93cf --- /dev/null +++ b/src/hooks/setting/useMenuSetting.ts @@ -0,0 +1,157 @@ +import type { MenuSetting } from '/#/config'; + +import { computed, unref, ref } from 'vue'; + +import { useAppStore } from '/@/store/modules/app'; + +import { SIDE_BAR_MINI_WIDTH, SIDE_BAR_SHOW_TIT_MINI_WIDTH } from '/@/enums/appEnum'; +import { MenuModeEnum, MenuTypeEnum, TriggerEnum } from '/@/enums/menuEnum'; +import { useFullContent } from '/@/hooks/web/useFullContent'; + +const mixSideHasChildren = ref(false); + +export function useMenuSetting() { + const { getFullContent: fullContent } = useFullContent(); + const appStore = useAppStore(); + + const getShowSidebar = computed(() => { + return unref(getSplit) || (unref(getShowMenu) && unref(getMenuMode) !== MenuModeEnum.HORIZONTAL && !unref(fullContent)); + }); + + const getCollapsed = computed(() => appStore.getMenuSetting.collapsed); + + const getMenuType = computed(() => appStore.getMenuSetting.type); + + const getMenuMode = computed(() => appStore.getMenuSetting.mode); + + const getMenuFixed = computed(() => appStore.getMenuSetting.fixed); + + const getShowMenu = computed(() => appStore.getMenuSetting.show); + + const getMenuHidden = computed(() => appStore.getMenuSetting.hidden); + + const getMenuWidth = computed(() => appStore.getMenuSetting.menuWidth); + + const getTrigger = computed(() => appStore.getMenuSetting.trigger); + + const getMenuTheme = computed(() => appStore.getMenuSetting.theme); + + const getSplit = computed(() => appStore.getMenuSetting.split); + + const getMenuBgColor = computed(() => appStore.getMenuSetting.bgColor); + + const getMixSideTrigger = computed(() => appStore.getMenuSetting.mixSideTrigger); + + const getCanDrag = computed(() => appStore.getMenuSetting.canDrag); + + const getAccordion = computed(() => appStore.getMenuSetting.accordion); + + const getMixSideFixed = computed(() => appStore.getMenuSetting.mixSideFixed); + + const getTopMenuAlign = computed(() => appStore.getMenuSetting.topMenuAlign); + + const getCloseMixSidebarOnChange = computed(() => appStore.getMenuSetting.closeMixSidebarOnChange); + + const getIsSidebarType = computed(() => unref(getMenuType) === MenuTypeEnum.SIDEBAR); + + const getIsTopMenu = computed(() => unref(getMenuType) === MenuTypeEnum.TOP_MENU); + + const getCollapsedShowTitle = computed(() => appStore.getMenuSetting.collapsedShowTitle); + + const getShowTopMenu = computed(() => { + return unref(getMenuMode) === MenuModeEnum.HORIZONTAL || unref(getSplit); + }); + + const getShowHeaderTrigger = computed(() => { + if (unref(getMenuType) === MenuTypeEnum.TOP_MENU || !unref(getShowMenu) || unref(getMenuHidden)) { + return false; + } + + return unref(getTrigger) === TriggerEnum.HEADER; + }); + + const getIsHorizontal = computed(() => { + return unref(getMenuMode) === MenuModeEnum.HORIZONTAL; + }); + + const getIsMixSidebar = computed(() => { + return unref(getMenuType) === MenuTypeEnum.MIX_SIDEBAR; + }); + + const getIsMixMode = computed(() => { + return unref(getMenuMode) === MenuModeEnum.INLINE && unref(getMenuType) === MenuTypeEnum.MIX; + }); + + const getRealWidth = computed(() => { + if (unref(getIsMixSidebar)) { + // update-begin--author:liaozhiyang---date:20240407---for:【QQYUN-8774】侧边混合导航菜单宽度调整 + return unref(getCollapsed) && !unref(getMixSideFixed) ? unref(getMiniWidthNumber) : unref(getMenuWidth) - 60; + // update-end--author:liaozhiyang---date:20240407---for:【QQYUN-8774】侧边混合导航菜单宽度调整 + } + return unref(getCollapsed) ? unref(getMiniWidthNumber) : unref(getMenuWidth); + }); + + const getMiniWidthNumber = computed(() => { + const { collapsedShowTitle } = appStore.getMenuSetting; + return collapsedShowTitle ? SIDE_BAR_SHOW_TIT_MINI_WIDTH : SIDE_BAR_MINI_WIDTH; + }); + + const getCalcContentWidth = computed(() => { + const width = + unref(getIsTopMenu) || !unref(getShowMenu) || (unref(getSplit) && unref(getMenuHidden)) + ? 0 + : unref(getIsMixSidebar) + ? (unref(getCollapsed) ? SIDE_BAR_MINI_WIDTH : SIDE_BAR_SHOW_TIT_MINI_WIDTH) + + (unref(getMixSideFixed) && unref(mixSideHasChildren) ? unref(getRealWidth) : 0) + : unref(getRealWidth); + + return `calc(100% - ${unref(width)}px)`; + }); + + // Set menu configuration + function setMenuSetting(menuSetting: Partial): void { + appStore.setProjectConfig({ menuSetting }); + } + + function toggleCollapsed() { + setMenuSetting({ + collapsed: !unref(getCollapsed), + }); + } + return { + setMenuSetting, + + toggleCollapsed, + + getMenuFixed, + getRealWidth, + getMenuType, + getMenuMode, + getShowMenu, + getCollapsed, + getMiniWidthNumber, + getCalcContentWidth, + getMenuWidth, + getTrigger, + getSplit, + getMenuTheme, + getCanDrag, + getCollapsedShowTitle, + getIsHorizontal, + getIsSidebarType, + getAccordion, + getShowTopMenu, + getShowHeaderTrigger, + getTopMenuAlign, + getMenuHidden, + getIsTopMenu, + getMenuBgColor, + getShowSidebar, + getIsMixMode, + getIsMixSidebar, + getCloseMixSidebarOnChange, + getMixSideTrigger, + getMixSideFixed, + mixSideHasChildren, + }; +} diff --git a/src/hooks/setting/useMultipleTabSetting.ts b/src/hooks/setting/useMultipleTabSetting.ts new file mode 100644 index 0000000..7c7ab01 --- /dev/null +++ b/src/hooks/setting/useMultipleTabSetting.ts @@ -0,0 +1,32 @@ +import type { MultiTabsSetting } from '/#/config'; + +import { computed } from 'vue'; + +import { useAppStore } from '/@/store/modules/app'; + +export function useMultipleTabSetting() { + const appStore = useAppStore(); + + const getShowMultipleTab = computed(() => appStore.getMultiTabsSetting.show); + + const getShowQuick = computed(() => appStore.getMultiTabsSetting.showQuick); + + const getShowRedo = computed(() => appStore.getMultiTabsSetting.showRedo); + + const getShowFold = computed(() => appStore.getMultiTabsSetting.showFold); + + // 获取标签页样式 + const getTabsTheme = computed(() => appStore.getMultiTabsSetting.theme); + + function setMultipleTabSetting(multiTabsSetting: Partial) { + appStore.setProjectConfig({ multiTabsSetting }); + } + return { + setMultipleTabSetting, + getShowMultipleTab, + getShowQuick, + getShowRedo, + getShowFold, + getTabsTheme, + }; +} diff --git a/src/hooks/setting/useRootSetting.ts b/src/hooks/setting/useRootSetting.ts new file mode 100644 index 0000000..0c3821d --- /dev/null +++ b/src/hooks/setting/useRootSetting.ts @@ -0,0 +1,91 @@ +import type { ProjectConfig } from '/#/config'; + +import { computed } from 'vue'; + +import { useAppStore } from '/@/store/modules/app'; +import { ContentEnum, ThemeEnum } from '/@/enums/appEnum'; + +type RootSetting = Omit; + +export function useRootSetting() { + const appStore = useAppStore(); + + const getPageLoading = computed(() => appStore.getPageLoading); + + const getOpenKeepAlive = computed(() => appStore.getProjectConfig.openKeepAlive); + + const getSettingButtonPosition = computed(() => appStore.getProjectConfig.settingButtonPosition); + + const getCanEmbedIFramePage = computed(() => appStore.getProjectConfig.canEmbedIFramePage); + + const getPermissionMode = computed(() => appStore.getProjectConfig.permissionMode); + + const getShowLogo = computed(() => appStore.getProjectConfig.showLogo); + + const getContentMode = computed(() => appStore.getProjectConfig.contentMode); + + const getUseOpenBackTop = computed(() => appStore.getProjectConfig.useOpenBackTop); + + const getShowSettingButton = computed(() => appStore.getProjectConfig.showSettingButton); + + const getUseErrorHandle = computed(() => appStore.getProjectConfig.useErrorHandle); + + const getShowFooter = computed(() => appStore.getProjectConfig.showFooter); + + const getShowBreadCrumb = computed(() => appStore.getProjectConfig.showBreadCrumb); + + const getThemeColor = computed(() => appStore.getProjectConfig.themeColor); + + const getShowBreadCrumbIcon = computed(() => appStore.getProjectConfig.showBreadCrumbIcon); + + const getFullContent = computed(() => appStore.getProjectConfig.fullContent); + + const getColorWeak = computed(() => appStore.getProjectConfig.colorWeak); + + const getGrayMode = computed(() => appStore.getProjectConfig.grayMode); + // update-begin--author:liaozhiyang---date:20250407---for:【QQYUN-10952】AI助手支持通过设置来配置是否显示 + const getAiIconShow = computed(() => appStore.getProjectConfig.aiIconShow); + // update-end--author:liaozhiyang---date:20250407---for:【QQYUN-10952】AI助手支持通过设置来配置是否显示 + const getLockTime = computed(() => appStore.getProjectConfig.lockTime); + + const getShowDarkModeToggle = computed(() => appStore.getProjectConfig.showDarkModeToggle); + + const getDarkMode = computed(() => appStore.getDarkMode); + + const getLayoutContentMode = computed(() => (appStore.getProjectConfig.contentMode === ContentEnum.FULL ? ContentEnum.FULL : ContentEnum.FIXED)); + + function setRootSetting(setting: Partial) { + appStore.setProjectConfig(setting); + } + + function setDarkMode(mode: ThemeEnum) { + appStore.setDarkMode(mode); + } + return { + setRootSetting, + + getSettingButtonPosition, + getFullContent, + getColorWeak, + getGrayMode, + getLayoutContentMode, + getPageLoading, + getOpenKeepAlive, + getCanEmbedIFramePage, + getPermissionMode, + getShowLogo, + getUseErrorHandle, + getShowBreadCrumb, + getShowBreadCrumbIcon, + getUseOpenBackTop, + getShowSettingButton, + getShowFooter, + getContentMode, + getLockTime, + getThemeColor, + getDarkMode, + setDarkMode, + getShowDarkModeToggle, + getAiIconShow, + }; +} diff --git a/src/hooks/setting/useTransitionSetting.ts b/src/hooks/setting/useTransitionSetting.ts new file mode 100644 index 0000000..b6d421a --- /dev/null +++ b/src/hooks/setting/useTransitionSetting.ts @@ -0,0 +1,31 @@ +import type { TransitionSetting } from '/#/config'; + +import { computed } from 'vue'; + +import { useAppStore } from '/@/store/modules/app'; + +export function useTransitionSetting() { + const appStore = useAppStore(); + + const getEnableTransition = computed(() => appStore.getTransitionSetting?.enable); + + const getOpenNProgress = computed(() => appStore.getTransitionSetting?.openNProgress); + + const getOpenPageLoading = computed((): boolean => { + return !!appStore.getTransitionSetting?.openPageLoading; + }); + + const getBasicTransition = computed(() => appStore.getTransitionSetting?.basicTransition); + + function setTransitionSetting(transitionSetting: Partial) { + appStore.setProjectConfig({ transitionSetting }); + } + return { + setTransitionSetting, + + getEnableTransition, + getOpenNProgress, + getOpenPageLoading, + getBasicTransition, + }; +} diff --git a/src/hooks/system/useAutoAdapt.ts b/src/hooks/system/useAutoAdapt.ts new file mode 100644 index 0000000..7f5c71b --- /dev/null +++ b/src/hooks/system/useAutoAdapt.ts @@ -0,0 +1,51 @@ +import { ref } from 'vue'; +import { ScreenSizeEnum } from '/@/enums/sizeEnum'; +import { useWindowSizeFn } from '/@/hooks/event/useWindowSizeFn'; +// 定义 useAdapt 方法参数 +interface AdaptOptions { + // xl>1200 + xl?: string | number; + // xl>992 + lg?: string | number; + // xl>768 + md?: string | number; + // xl>576 + sm?: string | number; + // xl>480 + xs?: string | number; + //xl<480默认值 + mindef?: string | number; + //默认值 + def?: string | number; +} +export function useAdapt(props?: AdaptOptions) { + //默认宽度 + const width = ref(props?.def || '600px'); + //获取宽度 + useWindowSizeFn(calcWidth, 100, { immediate: true }); + //计算宽度 + function calcWidth() { + let windowWidth = document.documentElement.clientWidth; + switch (true) { + case windowWidth > ScreenSizeEnum.XL: + width.value = props?.xl || '600px'; + break; + case windowWidth > ScreenSizeEnum.LG: + width.value = props?.lg || '600px'; + break; + case windowWidth > ScreenSizeEnum.MD: + width.value = props?.md || '600px'; + break; + case windowWidth > ScreenSizeEnum.SM: + width.value = props?.sm || '500px'; + break; + case windowWidth > ScreenSizeEnum.XS: + width.value = props?.xs || '400px'; + break; + default: + width.value = props?.mindef || '300px'; + break; + } + } + return { width, calcWidth }; +} diff --git a/src/hooks/system/useJvxeMethods.ts b/src/hooks/system/useJvxeMethods.ts new file mode 100644 index 0000000..9e857e6 --- /dev/null +++ b/src/hooks/system/useJvxeMethods.ts @@ -0,0 +1,197 @@ +import { defHttp } from '/@/utils/http/axios'; +import { ref, unref } from 'vue'; +import { VALIDATE_FAILED, validateFormModelAndTables } from '/@/utils/common/vxeUtils'; + +export function useJvxeMethod(requestAddOrEdit, classifyIntoFormData, tableRefs, activeKey, refKeys, validateSubForm?) { + const formRef = ref(); + /** 查询某个tab的数据 */ + function requestSubTableData(url, params, tab, success) { + tab.loading = true; + defHttp + .get({ url, params }, { isTransformResponse: false }) + .then((res) => { + let { result } = res; + if (res.success && result) { + if (Array.isArray(result)) { + tab.dataSource = result; + } else if (Array.isArray(result.records)) { + tab.dataSource = result.records; + } + } + typeof success === 'function' ? success(res) : ''; + }) + .finally(() => { + tab.loading = false; + }); + } + + /* --- handle 事件 --- */ + + /** ATab 选项卡切换事件 */ + function handleChangeTabs(key) { + // 自动重置scrollTop状态,防止出现白屏 + tableRefs[key]?.value?.resetScrollTop(0); + } + + /** 获取所有的editableTable实例*/ + function getAllTable() { + let values = Object.values(tableRefs); + return Promise.all(values); + } + /** 确定按钮点击事件 */ + function handleSubmit() { + /** 触发表单验证 */ + getAllTable() + .then((tables) => { + let values = formRef.value.getFieldsValue(); + return validateFormModelAndTables(formRef.value.validate, values, tables, formRef.value.getProps, false); + }) + .then((allValues) => { + /** 一次性验证一对一的所有子表 */ + return validateSubForm && typeof validateSubForm === 'function' ? validateSubForm(allValues) : validateAllSubOne(allValues); + }) + .then((allValues) => { + if (typeof classifyIntoFormData !== 'function') { + throw throwNotFunction('classifyIntoFormData'); + } + let formData = classifyIntoFormData(allValues); + // 发起请求 + return requestAddOrEdit(formData); + }) + .catch((e) => { + if (e.error === VALIDATE_FAILED) { + // 如果有未通过表单验证的子表,就自动跳转到它所在的tab + //update-begin-author:taoyan date:2022-11-22 for: VUEN-2866【代码生成】Tab风格 一对多子表校验不通过时,点击提交表单空白了,流程附加页面也有此问题 + if(e.paneKey){ + activeKey.value = e.paneKey + }else{ + //update-begin-author:liusq date:2024-06-12 for: TV360X-478 一对多tab,校验未通过时,tab没有跳转 + activeKey.value = e.subIndex == null ? (e.index == null ? unref(activeKey) : refKeys.value[e.index]) : Object.keys(tableRefs)[e.subIndex]; + //update-end-author:liusq date:2024-06-12 for: TV360X-478 一对多tab,校验未通过时,tab没有跳转 + } + //update-end-author:taoyan date:2022-11-22 for: VUEN-2866【代码生成】Tab风格 一对多子表校验不通过时,点击提交表单空白了,流程附加页面也有此问题 + //update-begin---author:wangshuai---date:2024-06-17---for:【TV360X-1064】非原生提交表单滚动校验没通过的项--- + if (e?.errorFields) { + const firstField = e.errorFields[0]; + if (firstField) { + formRef.value.scrollToField(firstField.name, { behavior: 'smooth', block: 'end' }); + } + } + return Promise.reject(e?.errorFields); + //update-end---author:wangshuai---date:2024-06-17---for:【TV360X-1064】非原生提交表单滚动校验没通过的项--- + } else { + console.error(e); + } + }); + } + //校验所有子表表单 + function validateAllSubOne(allValues) { + return new Promise((resolve) => { + resolve(allValues); + }); + } + /* --- throw --- */ + + /** not a function */ + function throwNotFunction(name) { + return `${name} 未定义或不是一个函数`; + } + + /** not a array */ + function throwNotArray(name) { + return `${name} 未定义或不是一个数组`; + } + return [handleChangeTabs, handleSubmit, requestSubTableData, formRef]; +} + +//update-begin-author:taoyan date:2022-6-16 for: 代码生成-原生表单用 +/** + * 校验多个表单和子表table,用于原生的antd-vue的表单 + * @param activeKey 子表表单/vxe-table 所在tabs的 activeKey + * @param refMap 子表表单/vxe-table对应的ref对象 map结构 + * 示例: + * useValidateAntFormAndTable(activeKey, { + * 'tableA': tableARef, + * 'formB': formBRef + * }) + */ +export function useValidateAntFormAndTable(activeKey, refMap) { + /** + * 获取所有子表数据 + */ + async function getSubFormAndTableData() { + let formData = {}; + let all = Object.keys(refMap); + let key = ''; + for (let i = 0; i < all.length; i++) { + key = all[i]; + let instance = refMap[key].value; + if (instance.isForm) { + let subFormData = await validateFormAndGetData(instance, key); + if (subFormData) { + formData[key + 'List'] = [subFormData]; + } + } else { + let arr = await validateTableAndGetData(instance, key); + if (arr && arr.length > 0) { + formData[key + 'List'] = arr; + } + } + } + return formData; + } + + /** + * 转换数据用 如果有数组转成逗号分割的格式 + * @param data + */ + function transformData(data) { + if (data) { + Object.keys(data).map((k) => { + if (data[k] instanceof Array) { + data[k] = data[k].join(','); + } + }); + } + return data; + } + + /** + * 子表table + * @param instance + * @param key + */ + async function validateTableAndGetData(instance, key) { + const errors = await instance.validateTable(); + if (!errors) { + return instance.getTableData(); + } else { + activeKey.value = key; + // 自动重置scrollTop状态,防止出现白屏 + instance.resetScrollTop(0); + return Promise.reject(1); + } + } + + /** + * 子表表单 + * @param instance + * @param key + */ + async function validateFormAndGetData(instance, key) { + try { + let data = await instance.getFormData(); + transformData(data); + return data; + } catch (e) { + activeKey.value = key; + return Promise.reject(e); + } + } + + return { + getSubFormAndTableData, + transformData, + }; +} +//update-end-author:taoyan date:2022-6-16 for: 代码生成-原生表单用 diff --git a/src/hooks/system/useListPage.ts b/src/hooks/system/useListPage.ts new file mode 100644 index 0000000..b2d8036 --- /dev/null +++ b/src/hooks/system/useListPage.ts @@ -0,0 +1,365 @@ +import { reactive, ref, Ref, unref } from 'vue'; +import { merge } from 'lodash-es'; +import { DynamicProps } from '/#/utils'; +import { BasicTableProps, TableActionType, useTable } from '/@/components/Table'; +import { ColEx } from '/@/components/Form/src/types'; +import { FormActionType } from '/@/components/Form'; +import { useMessage } from '/@/hooks/web/useMessage'; +import { useMethods } from '/@/hooks/system/useMethods'; +import { useDesign } from '/@/hooks/web/useDesign'; +import { filterObj } from '/@/utils/common/compUtils'; +import { isFunction } from '@/utils/is'; +const { handleExportXls, handleImportXls } = useMethods(); + +// 定义 useListPage 方法所需参数 +interface ListPageOptions { + // 样式作用域范围 + designScope?: string; + // 【必填】表格参数配置 + tableProps: TableProps; + // 是否分页 + pagination?: boolean; + // 导出配置 + exportConfig?: { + url: string | (() => string); + // 导出文件名 + name?: string | (() => string); + //导出参数 + params?: object | (() => object); + }; + // 导入配置 + importConfig?: { + //update-begin-author:taoyan date:20220507 for: erp代码生成 子表 导入地址是动态的 + url: string | (() => string); + //update-end-author:taoyan date:20220507 for: erp代码生成 子表 导入地址是动态的 + // 导出成功后的回调 + success?: (fileInfo?: any) => void; + }; +} + +interface IDoRequestOptions { + // 是否显示确认对话框,默认 true + confirm?: boolean; + // 是否自动刷新表格,默认 true + reload?: boolean; + // 是否自动清空选择,默认 true + clearSelection?: boolean; +} + +/** + * listPage页面公共方法 + * + * @param options + */ +export function useListPage(options: ListPageOptions) { + const $message = useMessage(); + let $design = {} as ReturnType; + if (options.designScope) { + $design = useDesign(options.designScope); + } + + const tableContext = useListTable(options.tableProps); + + const [, { getForm, reload, setLoading }, { selectedRowKeys }] = tableContext; + + // 导出 excel + async function onExportXls() { + //update-begin---author:wangshuai ---date:20220411 for:导出新增自定义参数------------ + let { url, name, params } = options?.exportConfig ?? {}; + let realUrl = typeof url === 'function' ? url() : url; + if (realUrl) { + let title = typeof name === 'function' ? name() : name; + //update-begin-author:taoyan date:20220507 for: erp代码生成 子表 导出报错,原因未知- + let paramsForm:any = {}; + try { + //update-begin-author:liusq---date:2025-03-20--for: [QQYUN-11627]代码生成原生表单,数据导出,前端报错,并且范围参数没有转换 #7962 + //当useSearchFor不等于false的时候,才去触发validate + if (options?.tableProps?.useSearchForm !== false) { + paramsForm = await getForm().validate(); + console.log('paramsForm', paramsForm); + } + //update-end-author:liusq---date:2025-03-20--for:[QQYUN-11627]代码生成原生表单,数据导出,前端报错,并且范围参数没有转换 #7962 + } catch (e) { + console.warn(e); + } + //update-end-author:taoyan date:20220507 for: erp代码生成 子表 导出报错,原因未知- + + //update-begin-author:liusq date:20230410 for:[/issues/409]导出功能没有按排序结果导出,设置导出默认排序,创建时间倒序 + if(!paramsForm?.column){ + Object.assign(paramsForm,{column:'createTime',order:'desc'}); + } + //update-begin-author:liusq date:20230410 for: [/issues/409]导出功能没有按排序结果导出,设置导出默认排序,创建时间倒序 + + //如果参数不为空,则整合到一起 + //update-begin-author:taoyan date:20220507 for: erp代码生成 子表 导出动态设置mainId + if (params) { + //update-begin-author:liusq---date:2025-03-20--for: [QQYUN-11627]代码生成原生表单,数据导出,前端报错,并且范围参数没有转换 #7962 + const realParams = isFunction(params) ? await params() : { ...(params || {}) }; + //update-end-author:liusq---date:2025-03-20--for:[QQYUN-11627]代码生成原生表单,数据导出,前端报错,并且范围参数没有转换 #7962 + Object.keys(realParams).map((k) => { + let temp = (realParams as object)[k]; + if (temp) { + paramsForm[k] = unref(temp); + } + }); + } + //update-end-author:taoyan date:20220507 for: erp代码生成 子表 导出动态设置mainId + if (selectedRowKeys.value && selectedRowKeys.value.length > 0) { + paramsForm['selections'] = selectedRowKeys.value.join(','); + } + console.log() + return handleExportXls(title as string, realUrl, filterObj(paramsForm)); + //update-end---author:wangshuai ---date:20220411 for:导出新增自定义参数-------------- + } else { + $message.createMessage.warn('没有传递 exportConfig.url 参数'); + return Promise.reject(); + } + } + + // 导入 excel + function onImportXls(file) { + let { url, success } = options?.importConfig ?? {}; + //update-begin-author:taoyan date:20220507 for: erp代码生成 子表 导入地址是动态的 + let realUrl = typeof url === 'function' ? url() : url; + if (realUrl) { + return handleImportXls(file, realUrl, success || reload); + //update-end-author:taoyan date:20220507 for: erp代码生成 子表 导入地址是动态的 + } else { + $message.createMessage.warn('没有传递 importConfig.url 参数'); + return Promise.reject(); + } + } + + /** + * 通用请求处理方法,可自动刷新表格,自动清空选择 + * @param api 请求api + * @param options 是否显示确认框 + */ + function doRequest(api: () => Promise, options?: IDoRequestOptions) { + return new Promise((resolve, reject) => { + const execute = async () => { + try { + setLoading(true); + const res = await api(); + if (options?.reload ?? true) { + reload(); + } + if (options?.clearSelection ?? true) { + selectedRowKeys.value = []; + } + resolve(res); + } catch (e) { + reject(e); + } finally { + setLoading(false); + } + }; + if (options?.confirm ?? true) { + $message.createConfirm({ + iconType: 'warning', + title: '删除', + content: '确定要删除吗?', + onOk: () => execute(), + onCancel: () => reject(), + }); + } else { + execute(); + } + }); + } + + /** 执行单个删除操作 */ + function doDeleteRecord(api: () => Promise) { + return doRequest(api, { confirm: false, clearSelection: false }); + } + + return { + ...$design, + ...$message, + onExportXls, + onImportXls, + doRequest, + doDeleteRecord, + tableContext, + }; +} + +// 定义表格所需参数 +type TableProps = Partial>; +type UseTableMethod = TableActionType & { + getForm: () => FormActionType; +}; + +/** + * useListTable 列表页面标准表格参数 + * + * @param tableProps 表格参数 + */ +export function useListTable(tableProps: TableProps): [ + (instance: TableActionType, formInstance: UseTableMethod) => void, + TableActionType & { + getForm: () => FormActionType; + }, + { + rowSelection: any; + selectedRows: Ref; + selectedRowKeys: Ref; + } +] { + // 自适应列配置 + const adaptiveColProps: Partial = { + xs: 24, // <576px + sm: 12, // ≥576px + md: 12, // ≥768px + lg: 8, // ≥992px + xl: 8, // ≥1200px + xxl: 6, // ≥1600px + }; + const defaultTableProps: TableProps = { + rowKey: 'id', + // 使用查询条件区域 + useSearchForm: true, + // 查询条件区域配置 + formConfig: { + // 紧凑模式 + compact: true, + // label默认宽度 + // labelWidth: 120, + // 按下回车后自动提交 + autoSubmitOnEnter: true, + // 默认 row 配置 + rowProps: { gutter: 8 }, + // 默认 col 配置 + baseColProps: { + ...adaptiveColProps, + }, + labelCol: { + xs: 24, + sm: 8, + md: 6, + lg: 8, + xl: 6, + xxl: 6, + }, + wrapperCol: {}, + // 是否显示 展开/收起 按钮 + showAdvancedButton: true, + // 超过指定列数默认折叠 + autoAdvancedCol: 3, + // 操作按钮配置 + actionColOptions: { + ...adaptiveColProps, + style: { textAlign: 'left' }, + }, + }, + // 斑马纹 + striped: false, + // 是否可以自适应高度 + canResize: true, + // 表格最小高度 + // update-begin--author:liaozhiyang---date:20240603---for【TV360X-861】列表查询区域不可往上滚动 + minHeight: 300, + // update-end--author:liaozhiyang---date:20240603---for【TV360X-861】列表查询区域不可往上滚动 + // 点击行选中 + clickToRowSelect: false, + // 是否显示边框 + bordered: true, + // 是否显示序号列 + showIndexColumn: false, + // 显示表格设置 + showTableSetting: true, + // 表格全屏设置 + tableSetting: { + fullScreen: false, + }, + // 是否显示操作列 + showActionColumn: true, + // 操作列 + actionColumn: { + width: 120, + title: '操作', + //是否锁定操作列取值 right ,left,false + fixed: false, + dataIndex: 'action', + slots: { customRender: 'action' }, + }, + }; + // 合并用户个性化配置 + if (tableProps) { + //update-begin---author:wangshuai---date:2024-04-28---for:【issues/6180】前端代码配置表变查询条件显示列不生效--- + if(tableProps.formConfig){ + setTableProps(tableProps.formConfig); + } + //update-end---author:wangshuai---date:2024-04-28---for:【issues/6180】前端代码配置表变查询条件显示列不生效--- + // merge 方法可深度合并对象 + merge(defaultTableProps, tableProps); + } + + // 发送请求之前调用的方法 + function beforeFetch(params) { + // 默认以 createTime 降序排序 + return Object.assign({ column: 'createTime', order: 'desc' }, params); + } + + // 合并方法 + Object.assign(defaultTableProps, { beforeFetch }); + if (typeof tableProps.beforeFetch === 'function') { + defaultTableProps.beforeFetch = function (params) { + params = beforeFetch(params); + // @ts-ignore + tableProps.beforeFetch(params); + return params; + }; + } + + // 当前选择的行 + const selectedRowKeys = ref([]); + // 选择的行记录 + const selectedRows = ref([]); + + // 表格选择列配置 + const rowSelection: any = tableProps?.rowSelection ?? {}; + const defaultRowSelection = reactive({ + ...rowSelection, + type: rowSelection.type ?? 'checkbox', + // 选择列宽度,默认 50 + columnWidth: rowSelection.columnWidth ?? 50, + selectedRows: selectedRows, + selectedRowKeys: selectedRowKeys, + onChange(...args) { + selectedRowKeys.value = args[0]; + selectedRows.value = args[1]; + if (typeof rowSelection.onChange === 'function') { + rowSelection.onChange(...args); + } + }, + }); + delete defaultTableProps.rowSelection; + + /** + * 设置表格参数 + * + * @param formConfig + */ + function setTableProps(formConfig: any) { + const replaceAttributeArray: string[] = ['baseColProps','labelCol']; + for (let item of replaceAttributeArray) { + if(formConfig && formConfig[item]){ + if(defaultTableProps.formConfig){ + let defaultFormConfig:any = defaultTableProps.formConfig; + defaultFormConfig[item] = formConfig[item]; + } + formConfig[item] = {}; + } + } + } + + return [ + ...useTable(defaultTableProps), + { + selectedRows, + selectedRowKeys, + rowSelection: defaultRowSelection, + }, + ]; +} diff --git a/src/hooks/system/useMethods.ts b/src/hooks/system/useMethods.ts new file mode 100644 index 0000000..d10879a --- /dev/null +++ b/src/hooks/system/useMethods.ts @@ -0,0 +1,132 @@ +import { defHttp } from '/@/utils/http/axios'; +import { useMessage } from '/@/hooks/web/useMessage'; +import { useGlobSetting } from '/@/hooks/setting'; + +const { createMessage, createWarningModal } = useMessage(); +const glob = useGlobSetting(); + +/** + * 导出文件xlsx的mime-type + */ +export const XLSX_MIME_TYPE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'; +/** + * 导出文件xlsx的文件后缀 + */ +export const XLSX_FILE_SUFFIX = '.xlsx'; + +export function useMethods() { + /** + * 导出xls + * @param name + * @param url + */ + async function exportXls(name, url, params, isXlsx = false) { + //update-begin---author:wangshuai---date:2024-01-25---for:【QQYUN-8118】导出超时时间设置长点--- + const data = await defHttp.get({ url: url, params: params, responseType: 'blob', timeout: 60000 }, { isTransformResponse: false }); + //update-end---author:wangshuai---date:2024-01-25---for:【QQYUN-8118】导出超时时间设置长点--- + if (!data) { + createMessage.warning('文件下载失败'); + return; + } + //update-begin---author:wangshuai---date:2024-04-18---for: 导出excel失败提示,不进行导出--- + let reader = new FileReader() + reader.readAsText(data, 'utf-8') + reader.onload = async () => { + if(reader.result){ + if(reader.result.toString().indexOf("success") !=-1){ + // update-begin---author:liaozhiyang---date:2025-02-11---for:【issues/7738】文件中带"success"导出报错 --- + try { + const { success, message } = JSON.parse(reader.result.toString()); + if (!success) { + createMessage.warning('导出失败,失败原因:' + message); + } else { + exportExcel(name, isXlsx, data); + } + return; + } catch (error) { + exportExcel(name, isXlsx, data); + } + // update-end---author:liaozhiyang---date:2025-02-11---for:【issues/7738】文件中带"success"导出报错 --- + } + } + exportExcel(name, isXlsx, data); + //update-end---author:wangshuai---date:2024-04-18---for: 导出excel失败提示,不进行导出--- + } + } + + /** + * 导入xls + * @param data 导入的数据 + * @param url + * @param success 成功后的回调 + */ + async function importXls(data, url, success) { + const isReturn = (fileInfo) => { + try { + if (fileInfo.code === 201) { + let { + message, + result: { msg, fileUrl, fileName }, + } = fileInfo; + let href = glob.uploadUrl + fileUrl; + createWarningModal({ + title: message, + centered: false, + content: `

+ ${msg}
+ 具体详情请 点击下载 +
`, + }); + //update-begin---author:wangshuai ---date:20221121 for:[VUEN-2827]导入无权限,提示图标错误------------ + } else if (fileInfo.code === 500 || fileInfo.code === 510) { + createMessage.error(fileInfo.message || `${data.file.name} 导入失败`); + //update-end---author:wangshuai ---date:20221121 for:[VUEN-2827]导入无权限,提示图标错误------------ + } else { + createMessage.success(fileInfo.message || `${data.file.name} 文件上传成功`); + } + } catch (error) { + console.log('导入的数据异常', error); + } finally { + typeof success === 'function' ? success(fileInfo) : ''; + } + }; + await defHttp.uploadFile({ url }, { file: data.file }, { success: isReturn }); + } + + return { + handleExportXls: (name: string, url: string, params?: object) => exportXls(name, url, params), + handleImportXls: (data, url, success) => importXls(data, url, success), + handleExportXlsx: (name: string, url: string, params?: object) => exportXls(name, url, params, true), + }; + + /** + * 导出excel + * @param name + * @param isXlsx + * @param data + */ + function exportExcel(name, isXlsx, data) { + if (!name || typeof name != 'string') { + name = '导出文件'; + } + let blobOptions = { type: 'application/vnd.ms-excel' }; + let fileSuffix = '.xls'; + if (isXlsx) { + blobOptions['type'] = XLSX_MIME_TYPE; + fileSuffix = XLSX_FILE_SUFFIX; + } + if (typeof window.navigator.msSaveBlob !== 'undefined') { + window.navigator.msSaveBlob(new Blob([data], blobOptions), name + fileSuffix); + } else { + let url = window.URL.createObjectURL(new Blob([data], blobOptions)); + let link = document.createElement('a'); + link.style.display = 'none'; + link.href = url; + link.setAttribute('download', name + fileSuffix); + document.body.appendChild(link); + link.click(); + document.body.removeChild(link); //下载完成移除元素 + window.URL.revokeObjectURL(url); //释放掉blob对象 + } + } +} diff --git a/src/hooks/system/useThirdLogin.ts b/src/hooks/system/useThirdLogin.ts new file mode 100644 index 0000000..5c2ba1b --- /dev/null +++ b/src/hooks/system/useThirdLogin.ts @@ -0,0 +1,206 @@ +import { ref, unref } from 'vue'; +import { defHttp } from '/@/utils/http/axios'; +import { useGlobSetting } from '/@/hooks/setting'; +import { useMessage } from '/@/hooks/web/useMessage'; +import { useUserStore } from '/@/store/modules/user'; +import { setThirdCaptcha, getCaptcha } from '/@/api/sys/user'; +import { useI18n } from '/@/hooks/web/useI18n'; + +export function useThirdLogin() { + const { createMessage, notification } = useMessage(); + const { t } = useI18n(); + const glob = useGlobSetting(); + const userStore = useUserStore(); + //第三方类型 + const thirdType = ref(''); + //第三方登录相关信息 + const thirdLoginInfo = ref({}); + //状态 + const thirdLoginState = ref(false); + //绑定手机号弹窗 + const bindingPhoneModal = ref(false); + //第三方用户UUID + const thirdUserUuid = ref(''); + //提示窗 + const thirdConfirmShow = ref(false); + //绑定密码弹窗 + const thirdPasswordShow = ref(false); + //绑定密码 + const thirdLoginPassword = ref(''); + //绑定用户 + const thirdLoginUser = ref(''); + //加载中 + const thirdCreateUserLoding = ref(false); + //绑定手机号 + const thirdPhone = ref(''); + //验证码 + const thirdCaptcha = ref(''); + //第三方登录 + function onThirdLogin(source) { + let url = `${glob.uploadUrl}/sys/thirdLogin/render/${source}`; + const openWin = window.open( + url, + `login ${source}`, + 'height=500, width=500, top=0, left=0, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=n o, status=no' + ); + thirdType.value = source; + thirdLoginInfo.value = {}; + thirdLoginState.value = false; + let receiveMessage = function (event) { + let token = event.data; + if (typeof token === 'string') { + //如果是字符串类型 说明是token信息 + if (token === '登录失败') { + createMessage.warning(token); + } else if (token.includes('绑定手机号')) { + bindingPhoneModal.value = true; + let strings = token.split(','); + thirdUserUuid.value = strings[1]; + } else { + doThirdLogin(token); + } + } else if (typeof token === 'object') { + //对象类型 说明需要提示是否绑定现有账号 + if (token['isObj'] === true) { + thirdConfirmShow.value = true; + thirdLoginInfo.value = { ...token }; + } + } else { + createMessage.warning('不识别的信息传递'); + } + // update-begin--author:liaozhiyang---date:20240717---for:【TV360X-1827】mac系统谷歌浏览器企业微信第三方登录成功后没有弹出绑定手机弹窗 + if (openWin?.closed) { + window.removeEventListener('message', receiveMessage, false); + } + // update-end--author:liaozhiyang---date:20240717---for:【TV360X-1827】mac系统谷歌浏览器企业微信第三方登录成功后没有弹出绑定手机弹窗 + }; + // update-begin--author:liaozhiyang---date:20240717---for:【TV360X-1827】mac系统谷歌浏览器企业微信第三方登录成功后没有弹出绑定手机弹窗 + window.removeEventListener('message', receiveMessage, false); + // update-end--author:liaozhiyang---date:20240717---for:【TV360X-1827】mac系统谷歌浏览器企业微信第三方登录成功后没有弹出绑定手机弹窗 + window.addEventListener('message', receiveMessage, false); + } + // 根据token执行登录 + function doThirdLogin(token) { + if (unref(thirdLoginState) === false) { + thirdLoginState.value = true; + userStore.ThirdLogin({ token, thirdType: unref(thirdType) }).then((res) => { + console.log('res====>doThirdLogin', res); + if (res && res.userInfo) { + notification.success({ + message: t('sys.login.loginSuccessTitle'), + description: `${t('sys.login.loginSuccessDesc')}: ${res.userInfo.realname}`, + duration: 3, + }); + } else { + requestFailed(res); + } + }); + } + } + + function requestFailed(err) { + notification.error({ + message: '登录失败', + description: ((err.response || {}).data || {}).message || err.message || '请求出现错误,请稍后再试', + duration: 4, + }); + } + // 绑定已有账号 需要输入密码 + function thirdLoginUserBind() { + thirdLoginPassword.value = ''; + thirdLoginUser.value = thirdLoginInfo.value.uuid; + thirdConfirmShow.value = false; + thirdPasswordShow.value = true; + } + //创建新账号 + function thirdLoginUserCreate() { + thirdCreateUserLoding.value = true; + // 账号名后面添加两位随机数 + thirdLoginInfo.value.suffix = parseInt(Math.random() * 98 + 1); + defHttp + .post({ url: '/sys/third/user/create', params: { thirdLoginInfo: unref(thirdLoginInfo) } }, { isTransformResponse: false }) + .then((res) => { + if (res.success) { + let token = res.result; + doThirdLogin(token); + thirdConfirmShow.value = false; + } else { + createMessage.warning(res.message); + } + }) + .finally(() => { + thirdCreateUserLoding.value = false; + }); + } + // 核实密码 + function thirdLoginCheckPassword() { + let params = Object.assign({}, unref(thirdLoginInfo), { password: unref(thirdLoginPassword) }); + defHttp.post({ url: '/sys/third/user/checkPassword', params }, { isTransformResponse: false }).then((res) => { + if (res.success) { + thirdLoginNoPassword(); + doThirdLogin(res.result); + } else { + createMessage.warning(res.message); + } + }); + } + // 没有密码 取消操作 + function thirdLoginNoPassword() { + thirdPasswordShow.value = false; + thirdLoginPassword.value = ''; + thirdLoginUser.value = ''; + } + + //倒计时执行前的函数 + function sendCodeApi() { + //return setThirdCaptcha({mobile:unref(thirdPhone)}); + return getCaptcha({ mobile: unref(thirdPhone), smsmode: '0' }); + } + //绑定手机号点击确定按钮 + function thirdHandleOk() { + if (!unref(thirdPhone)) { + cmsFailed('请输入手机号'); + } + if (!unref(thirdCaptcha)) { + cmsFailed('请输入验证码'); + } + let params = { + mobile: unref(thirdPhone), + captcha: unref(thirdCaptcha), + thirdUserUuid: unref(thirdUserUuid), + }; + defHttp.post({ url: '/sys/thirdLogin/bindingThirdPhone', params }, { isTransformResponse: false }).then((res) => { + if (res.success) { + bindingPhoneModal.value = false; + doThirdLogin(res.result); + } else { + createMessage.warning(res.message); + } + }); + } + function cmsFailed(err) { + notification.error({ + message: '登录失败', + description: err, + duration: 4, + }); + return; + } + //返回数据和方法 + return { + thirdPasswordShow, + thirdLoginCheckPassword, + thirdLoginNoPassword, + thirdLoginPassword, + thirdConfirmShow, + thirdCreateUserLoding, + thirdLoginUserCreate, + thirdLoginUserBind, + bindingPhoneModal, + thirdHandleOk, + thirdPhone, + thirdCaptcha, + onThirdLogin, + sendCodeApi, + }; +} diff --git a/src/hooks/web/useAppInject.ts b/src/hooks/web/useAppInject.ts new file mode 100644 index 0000000..7d6efb2 --- /dev/null +++ b/src/hooks/web/useAppInject.ts @@ -0,0 +1,10 @@ +import { useAppProviderContext } from '/@/components/Application'; +import { computed, unref } from 'vue'; + +export function useAppInject() { + const values = useAppProviderContext(); + + return { + getIsMobile: computed(() => unref(values.isMobile)), + }; +} diff --git a/src/hooks/web/useContentHeight.ts b/src/hooks/web/useContentHeight.ts new file mode 100644 index 0000000..b41f300 --- /dev/null +++ b/src/hooks/web/useContentHeight.ts @@ -0,0 +1,183 @@ +import { ComputedRef, isRef, nextTick, Ref, ref, unref, watch } from 'vue'; +import { onMountedOrActivated } from '/@/hooks/core/onMountedOrActivated'; +import { useWindowSizeFn } from '/@/hooks/event/useWindowSizeFn'; +import { useLayoutHeight } from '/@/layouts/default/content/useContentViewHeight'; +import { getViewportOffset } from '/@/utils/domUtils'; +import { isNumber, isString } from '/@/utils/is'; + +export interface CompensationHeight { + // 使用 layout Footer 高度作为判断补偿高度的条件 + useLayoutFooter: boolean; + // refs HTMLElement + elements?: Ref[]; +} + +type Upward = number | string | null | undefined; + +/** + * 动态计算内容高度,根据锚点dom最下坐标到屏幕最下坐标,根据传入dom的高度、padding、margin等值进行动态计算 + * 最终获取合适的内容高度 + * + * @param flag 用于开启计算的响应式标识 + * @param anchorRef 锚点组件 Ref + * @param subtractHeightRefs 待减去高度的组件列表 Ref + * @param substractSpaceRefs 待减去空闲空间(margins/paddings)的组件列表 Ref + * @param offsetHeightRef 计算偏移的响应式高度,计算高度时将直接减去此值 + * @param upwardSpace 向上递归减去空闲空间的 层级 或 直到指定class为止 数值为2代表向上递归两次|数值为ant-layout表示向上递归直到碰见.ant-layout为止 + * @returns 响应式高度 + */ +export function useContentHeight( + flag: ComputedRef, + anchorRef: Ref, + subtractHeightRefs: Ref[], + substractSpaceRefs: Ref[], + upwardSpace: Ref | ComputedRef | Upward = 0, + offsetHeightRef: Ref = ref(0) +) { + const contentHeight: Ref> = ref(null); + const { footerHeightRef: layoutFooterHeightRef } = useLayoutHeight(); + let compensationHeight: CompensationHeight = { + useLayoutFooter: true, + }; + + const setCompensation = (params: CompensationHeight) => { + compensationHeight = params; + }; + + function redoHeight() { + nextTick(() => { + calcContentHeight(); + }); + } + + function calcSubtractSpace(element: Element | null | undefined, direction: 'all' | 'top' | 'bottom' = 'all'): number { + function numberPx(px: string) { + return Number(px.replace(/[^\d]/g, '')); + } + let subtractHeight = 0; + const ZERO_PX = '0px'; + if (element) { + const cssStyle = getComputedStyle(element); + const marginTop = numberPx(cssStyle?.marginTop ?? ZERO_PX); + const marginBottom = numberPx(cssStyle?.marginBottom ?? ZERO_PX); + const paddingTop = numberPx(cssStyle?.paddingTop ?? ZERO_PX); + const paddingBottom = numberPx(cssStyle?.paddingBottom ?? ZERO_PX); + if (direction === 'all') { + subtractHeight += marginTop; + subtractHeight += marginBottom; + subtractHeight += paddingTop; + subtractHeight += paddingBottom; + } else if (direction === 'top') { + subtractHeight += marginTop; + subtractHeight += paddingTop; + } else { + subtractHeight += marginBottom; + subtractHeight += paddingBottom; + } + } + return subtractHeight; + } + + function getEl(element: any): Nullable { + if (element == null) { + return null; + } + return (element instanceof HTMLDivElement ? element : element.$el) as HTMLDivElement; + } + + async function calcContentHeight() { + if (!flag.value) { + return; + } + // Add a delay to get the correct height + await nextTick(); + + const anchorEl = getEl(unref(anchorRef)); + if (!anchorEl) { + return; + } + const { bottomIncludeBody } = getViewportOffset(anchorEl); + + // substract elements height + let substractHeight = 0; + subtractHeightRefs.forEach((item) => { + substractHeight += getEl(unref(item))?.offsetHeight ?? 0; + }); + + // subtract margins / paddings + let substractSpaceHeight = calcSubtractSpace(anchorEl) ?? 0; + substractSpaceRefs.forEach((item) => { + substractSpaceHeight += calcSubtractSpace(getEl(unref(item))); + }); + + // upwardSpace + let upwardSpaceHeight = 0; + function upward(element: Element | null, upwardLvlOrClass: number | string | null | undefined) { + if (element && upwardLvlOrClass) { + const parent = element.parentElement; + if (parent) { + if (isString(upwardLvlOrClass)) { + if (!parent.classList.contains(upwardLvlOrClass)) { + upwardSpaceHeight += calcSubtractSpace(parent, 'bottom'); + upward(parent, upwardLvlOrClass); + } else { + upwardSpaceHeight += calcSubtractSpace(parent, 'bottom'); + } + } else if (isNumber(upwardLvlOrClass)) { + if (upwardLvlOrClass > 0) { + upwardSpaceHeight += calcSubtractSpace(parent, 'bottom'); + upward(parent, --upwardLvlOrClass); + } + } + } + } + } + if (isRef(upwardSpace)) { + upward(anchorEl, unref(upwardSpace)); + } else { + upward(anchorEl, upwardSpace); + } + + let height = + bottomIncludeBody - unref(layoutFooterHeightRef) - unref(offsetHeightRef) - substractHeight - substractSpaceHeight - upwardSpaceHeight; + + // compensation height + const calcCompensationHeight = () => { + compensationHeight.elements?.forEach((item) => { + height += getEl(unref(item))?.offsetHeight ?? 0; + }); + }; + if (compensationHeight.useLayoutFooter && unref(layoutFooterHeightRef) > 0) { + calcCompensationHeight(); + } else { + calcCompensationHeight(); + } + + contentHeight.value = height; + } + + onMountedOrActivated(() => { + nextTick(() => { + calcContentHeight(); + }); + }); + useWindowSizeFn( + () => { + calcContentHeight(); + }, + 50, + { immediate: true } + ); + watch( + () => [layoutFooterHeightRef.value], + () => { + calcContentHeight(); + }, + { + flush: 'post', + immediate: true, + } + ); + + return { redoHeight, setCompensation, contentHeight }; +} diff --git a/src/hooks/web/useContextMenu.ts b/src/hooks/web/useContextMenu.ts new file mode 100644 index 0000000..d3c53ce --- /dev/null +++ b/src/hooks/web/useContextMenu.ts @@ -0,0 +1,12 @@ +import { onUnmounted, getCurrentInstance } from 'vue'; +import { createContextMenu, destroyContextMenu } from '/@/components/ContextMenu'; +import type { ContextMenuItem } from '/@/components/ContextMenu'; +export type { ContextMenuItem }; +export function useContextMenu(authRemove = true) { + if (getCurrentInstance() && authRemove) { + onUnmounted(() => { + destroyContextMenu(); + }); + } + return [createContextMenu, destroyContextMenu]; +} diff --git a/src/hooks/web/useCopyModal.ts b/src/hooks/web/useCopyModal.ts new file mode 100644 index 0000000..694630b --- /dev/null +++ b/src/hooks/web/useCopyModal.ts @@ -0,0 +1,64 @@ +import { isRef, unref, watch, Ref, ComputedRef } from 'vue'; +import Clipboard from 'clipboard'; +import { ModalOptionsEx, useMessage } from '/@/hooks/web/useMessage'; + +/** 带复制按钮的弹窗 */ +interface IOptions extends ModalOptionsEx { + // 要复制的文本,可以是一个 ref 对象,动态更新 + copyText: string | Ref | ComputedRef; +} + +const COPY_CLASS = 'copy-this-text'; +const CLIPBOARD_TEXT = 'data-clipboard-text'; + +export function useCopyModal() { + return { createCopyModal }; +} + +const { createMessage, createConfirm } = useMessage(); + +/** 创建复制弹窗 */ +function createCopyModal(options: Partial) { + let modal = createConfirm({ + ...options, + iconType: options.iconType ?? 'info', + width: options.width ?? 500, + title: options.title ?? '复制', + maskClosable: options.maskClosable ?? true, + okText: options.okText ?? '复制', + okButtonProps: { + ...options.okButtonProps, + class: COPY_CLASS, + [CLIPBOARD_TEXT]: unref(options.copyText), + } as any, + onOk() { + return new Promise((resolve: any) => { + const clipboard = new Clipboard('.' + COPY_CLASS); + clipboard.on('success', () => { + clipboard.destroy(); + createMessage.success('复制成功'); + resolve(); + }); + clipboard.on('error', () => { + createMessage.error('该浏览器不支持自动复制'); + clipboard.destroy(); + resolve(); + }); + }); + }, + }); + + // 动态更新 copyText + if (isRef(options.copyText)) { + watch(options.copyText, (copyText) => { + modal.update({ + okButtonProps: { + ...options.okButtonProps, + class: COPY_CLASS, + [CLIPBOARD_TEXT]: copyText, + } as any, + }); + }); + } + return modal; +} diff --git a/src/hooks/web/useCopyToClipboard.ts b/src/hooks/web/useCopyToClipboard.ts new file mode 100644 index 0000000..7a7fea8 --- /dev/null +++ b/src/hooks/web/useCopyToClipboard.ts @@ -0,0 +1,69 @@ +import { ref, watch } from 'vue'; + +import { isDef } from '/@/utils/is'; +interface Options { + target?: HTMLElement; +} +export function useCopyToClipboard(initial?: string) { + const clipboardRef = ref(initial || ''); + const isSuccessRef = ref(false); + const copiedRef = ref(false); + + watch( + clipboardRef, + (str?: string) => { + if (isDef(str)) { + copiedRef.value = true; + isSuccessRef.value = copyTextToClipboard(str); + } + }, + { immediate: !!initial, flush: 'sync' } + ); + + return { clipboardRef, isSuccessRef, copiedRef }; +} + +export function copyTextToClipboard(input: string, { target = document.body }: Options = {}) { + const element = document.createElement('textarea'); + const previouslyFocusedElement = document.activeElement; + + element.value = input; + + element.setAttribute('readonly', ''); + + (element.style as any).contain = 'strict'; + element.style.position = 'absolute'; + element.style.left = '-9999px'; + element.style.fontSize = '12pt'; + + const selection = document.getSelection(); + let originalRange; + if (selection && selection.rangeCount > 0) { + originalRange = selection.getRangeAt(0); + } + + target.append(element); + element.select(); + + element.selectionStart = 0; + element.selectionEnd = input.length; + + let isSuccess = false; + try { + isSuccess = document.execCommand('copy'); + } catch (e) { + throw new Error(e); + } + + element.remove(); + + if (originalRange && selection) { + selection.removeAllRanges(); + selection.addRange(originalRange); + } + + if (previouslyFocusedElement) { + (previouslyFocusedElement as HTMLElement).focus(); + } + return isSuccess; +} diff --git a/src/hooks/web/useDesign.ts b/src/hooks/web/useDesign.ts new file mode 100644 index 0000000..046674b --- /dev/null +++ b/src/hooks/web/useDesign.ts @@ -0,0 +1,22 @@ +import { useAppProviderContext } from '/@/components/Application'; +// import { computed } from 'vue'; +// import { lowerFirst } from 'lodash-es'; +export function useDesign(scope: string) { + const values = useAppProviderContext(); + // const $style = cssModule ? useCssModule() : {}; + + // const style: Record = {}; + // if (cssModule) { + // Object.keys($style).forEach((key) => { + // // const moduleCls = $style[key]; + // const k = key.replace(new RegExp(`^${values.prefixCls}-?`, 'ig'), ''); + // style[lowerFirst(k)] = $style[key]; + // }); + // } + return { + // prefixCls: computed(() => `${values.prefixCls}-${scope}`), + prefixCls: `${values.prefixCls}-${scope}`, + prefixVar: values.prefixCls, + // style, + }; +} diff --git a/src/hooks/web/useDragNotice.ts b/src/hooks/web/useDragNotice.ts new file mode 100644 index 0000000..7432738 --- /dev/null +++ b/src/hooks/web/useDragNotice.ts @@ -0,0 +1,165 @@ +import { ref, nextTick, getCurrentInstance, watch } from 'vue'; +import { getToken } from '/@/utils/auth'; +import md5 from 'crypto-js/md5'; +import { connectWebSocket, onWebSocket } from '/@/hooks/web/useWebSocket'; +import { useGlobSetting } from '/@/hooks/setting'; +import { useModal } from '/@/components/Modal'; +import { useUserStore } from '/@/store/modules/user'; +import { isUrl } from '@/utils/is'; +import { getQueryVariable, getUrlParams } from '@/utils'; +import { useRouter } from 'vue-router'; +import { useMessage } from '@/hooks/web/useMessage'; +const { createMessage } = useMessage(); +export function useDragNotice() { + //*********************************websocket配置begin****************************************** + const glob = useGlobSetting(); + const { push, currentRoute } = useRouter(); + const userStore = useUserStore(); + const instance: any = getCurrentInstance(); + // 初始化 WebSocket + function initWebSocket() { + const token = getToken(); + //将登录token生成一个短的标识 + const wsClientId = md5(token); + // WebSocket与普通的请求所用协议有所不同,ws等同于http,wss等同于https + const url = glob.domainUrl?.replace('https://', 'wss://').replace('http://', 'ws://') + '/dragChannelSocket/' + wsClientId; + connectWebSocket(url); + onWebSocket(onWebSocketMessage); + } + + async function onWebSocketMessage(data) { + console.log('仪表盘监听按钮点击事件websocket', data); + if (data?.CMD === 'drag') { + //触发动作: url:路径 modal:弹窗 + const action = data.result.action; + //弹窗类型: 点击按钮打开什么弹窗,根据type打开不同的弹窗 + const type = data.result.type; + //url地址,可以是路由,也可以是外部链接 + let url = data.result.url; + //弹窗参数或者url参数 + const record = data.result.records || {}; + console.log('仪表盘监听点击事件类型type', type); + console.log('仪表盘监听点击事件动作action', action); + console.log('仪表盘监听点击事件路径url', url); + console.log('仪表盘监听点击事件参数', record); + //1.路径的话,判断外部链接还是内部路由跳转 + if (action == 'url') { + //常用下載特殊处理 + if (url == 'fileUrl') { + url = record[url]; + } + const urlParamsObj = getUrlParams(url); + if (url.startsWith('http')) { + window.open(url, '_blank'); + } else { + push({ path: urlParamsObj.url, query: { ...urlParamsObj.params, ...record } }); + } + } else { + //2.弹窗方式打开项目组件 + switch (type) { + case 'email': + //邮箱查看弹窗 + handleOpenType('email', { record }); + break; + default: + break; + } + } + } + } + //*********************************websocket配置end****************************************** + + //*********************************打开弹窗修改,动态设置弹窗begin******************************* + //当前表单弹窗 + const currentModal = ref(null); + //当前表单参数 + const modalParams = ref({}); + //表单注册缓存 + const modalRegCache = ref({}); + //组件绑定参数 + const bindParams = ref({}); + /** + * 根据类型打开不同弹窗 + * @param type + * @param params + */ + async function handleOpenType(type, params) { + currentModal.value = null; + modalParams.value = { ...params }; + switch (type) { + case 'email': + //邮件查看 + currentModal.value = 'EoaMailBoxInModal'; + break; + default: + currentModal.value = null; + break; + } + //注册表单弹窗 + initModalRegister(); + await nextTick(() => { + if (modalRegCache.value[currentModal.value!]?.isRegister) { + console.log('已注冊,走缓存'); + modalRegCache.value[currentModal.value!].modalMethods.openModal(true, modalParams.value); + } + }); + } + /** + * 初始化弹窗注册 + */ + function initModalRegister() { + //如果当前选择表单为null,就不处理 + if (!currentModal.value) { + return; + } + //判断缓存中是否存在,不存在就走缓存逻辑 + if (!modalRegCache.value[currentModal.value]) { + const [registerModal, modalMethods] = useModal(); + modalRegCache.value[currentModal.value] = { + isRegister: false, + register: bindRegisterModal(registerModal, modalMethods), + modalMethods, + }; + } + } + + /** + * 绑定注册弹窗 + * @param regFn + * @param modalMethod + */ + function bindRegisterModal(regFn, modalMethod) { + return async (...args) => { + console.log('开始注册:', currentModal.value); + await regFn(...args); + console.log('注册完成:', currentModal.value); + //打开弹窗 + modalMethod.openModal(true, modalParams.value); + //设置缓存标识 + modalRegCache.value[currentModal.value!].isRegister = true; + }; + } + //*********************************打开弹窗修改,动态设置弹窗end****************************************** + //刷新页面 + function reloadPage() { + const iframes: any = document.getElementsByClassName('jeecg-iframe-page__main'); + // 将 HTMLCollection 转换为数组 + const iframeArray = Array.from(iframes); + if (currentRoute.value?.meta?.frameSrc && currentRoute.value?.meta?.frameSrc.indexOf('/drag/view?pageId=') >= 0) { + const targetIframe: any = iframeArray.find((iframe: any) => iframe.src == currentRoute.value?.meta?.frameSrc); + console.log('targetIframe', targetIframe); + if (targetIframe) { + targetIframe.contentWindow.postMessage({ reload: true }, '*'); + } + } + } + return { + initDragWebSocket: initWebSocket, + handleOpenType, + currentModal, + modalParams, + modalRegCache, + bindParams, + reloadPage, + }; +} diff --git a/src/hooks/web/useECharts.ts b/src/hooks/web/useECharts.ts new file mode 100644 index 0000000..66e0fa1 --- /dev/null +++ b/src/hooks/web/useECharts.ts @@ -0,0 +1,115 @@ +import type { EChartsOption } from 'echarts'; +import type { Ref } from 'vue'; +import { useTimeoutFn } from '/@/hooks/core/useTimeout'; +import { tryOnUnmounted } from '@vueuse/core'; +import { unref, nextTick, watch, computed, ref } from 'vue'; +import { useDebounceFn } from '@vueuse/core'; +import { useEventListener } from '/@/hooks/event/useEventListener'; +import { useBreakpoint } from '/@/hooks/event/useBreakpoint'; +import echarts from '/@/utils/lib/echarts'; +import { useRootSetting } from '/@/hooks/setting/useRootSetting'; + +export function useECharts(elRef: Ref, theme: 'light' | 'dark' | 'default' = 'default') { + console.log("---useECharts---初始化加载---") + + const { getDarkMode: getSysDarkMode } = useRootSetting(); + + const getDarkMode = computed(() => { + return theme === 'default' ? getSysDarkMode.value : theme; + }); + let chartInstance: echarts.ECharts | null = null; + let resizeFn: Fn = resize; + const cacheOptions = ref({}) as Ref; + let removeResizeFn: Fn = () => {}; + + resizeFn = useDebounceFn(resize, 200); + + const getOptions = computed(() => { + if (getDarkMode.value !== 'dark') { + return cacheOptions.value as EChartsOption; + } + return { + backgroundColor: 'transparent', + ...cacheOptions.value, + } as EChartsOption; + }); + + function initCharts(t = theme) { + const el = unref(elRef); + if (!el || !unref(el)) { + return; + } + + chartInstance = echarts.init(el, t); + const { removeEvent } = useEventListener({ + el: window, + name: 'resize', + listener: resizeFn, + }); + removeResizeFn = removeEvent; + const { widthRef, screenEnum } = useBreakpoint(); + if (unref(widthRef) <= screenEnum.MD || el.offsetHeight === 0) { + useTimeoutFn(() => { + resizeFn(); + }, 30); + } + } + + function setOptions(options: EChartsOption, clear = true) { + cacheOptions.value = options; + if (unref(elRef)?.offsetHeight === 0) { + useTimeoutFn(() => { + setOptions(unref(getOptions)); + }, 30); + return; + } + nextTick(() => { + useTimeoutFn(() => { + if (!chartInstance) { + initCharts(getDarkMode.value as 'default'); + + if (!chartInstance) return; + } + clear && chartInstance?.clear(); + + chartInstance?.setOption(unref(getOptions)); + }, 30); + }); + } + + function resize() { + chartInstance?.resize(); + } + + watch( + () => getDarkMode.value, + (theme) => { + if (chartInstance) { + chartInstance.dispose(); + initCharts(theme as 'default'); + setOptions(cacheOptions.value); + } + } + ); + + tryOnUnmounted(() => { + if (!chartInstance) return; + removeResizeFn(); + chartInstance.dispose(); + chartInstance = null; + }); + + function getInstance(): echarts.ECharts | null { + if (!chartInstance) { + initCharts(getDarkMode.value as 'default'); + } + return chartInstance; + } + + return { + setOptions, + resize, + echarts, + getInstance, + }; +} diff --git a/src/hooks/web/useFullContent.ts b/src/hooks/web/useFullContent.ts new file mode 100644 index 0000000..7dea077 --- /dev/null +++ b/src/hooks/web/useFullContent.ts @@ -0,0 +1,28 @@ +import { computed, unref } from 'vue'; + +import { useAppStore } from '/@/store/modules/app'; + +import { useRouter } from 'vue-router'; + +/** + * @description: Full screen display content + */ +export const useFullContent = () => { + const appStore = useAppStore(); + const router = useRouter(); + const { currentRoute } = router; + + // Whether to display the content in full screen without displaying the menu + const getFullContent = computed(() => { + // Query parameters, the full screen is displayed when the address bar has a full parameter + const route = unref(currentRoute); + const query = route.query; + if (query && Reflect.has(query, '__full__')) { + return true; + } + // Return to the configuration in the configuration file + return appStore.getProjectConfig.fullContent; + }); + + return { getFullContent }; +}; diff --git a/src/hooks/web/useI18n.ts b/src/hooks/web/useI18n.ts new file mode 100644 index 0000000..2a777b7 --- /dev/null +++ b/src/hooks/web/useI18n.ts @@ -0,0 +1,55 @@ +import { i18n } from '/@/locales/setupI18n'; + +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; +}; + +type I18nTranslationRestParameters = [string, any]; + +function getKey(namespace: string | undefined, key: string) { + if (!namespace) { + return key; + } + if (key.startsWith(namespace)) { + return key; + } + return `${namespace}.${key}`; +} + +export function useI18n(namespace?: string): { + t: I18nGlobalTranslation; +} { + const normalFn = { + t: (key: string) => { + return getKey(namespace, key); + }, + }; + + if (!i18n) { + return normalFn; + } + + const { t, ...methods } = i18n.global; + + const tFn: I18nGlobalTranslation = (key: string, ...arg: any[]) => { + if (!key) return ''; + if (!key.includes('.') && !namespace) return key; + return t(getKey(namespace, key), ...(arg as I18nTranslationRestParameters)); + }; + return { + ...methods, + t: tFn, + }; +} + +// Why write this function? +// Mainly to configure the vscode i18nn ally plugin. This function is only used for routing and menus. Please use useI18n for other places + +// 为什么要编写此函数? +// 主要用于配合vscode i18nn ally插件。此功能仅用于路由和菜单。请在其他地方使用useI18n +export const t = (key: string) => key; diff --git a/src/hooks/web/useLockPage.ts b/src/hooks/web/useLockPage.ts new file mode 100644 index 0000000..c543be9 --- /dev/null +++ b/src/hooks/web/useLockPage.ts @@ -0,0 +1,72 @@ +import { computed, onUnmounted, unref, watchEffect } from 'vue'; +import { useThrottleFn } from '@vueuse/core'; + +import { useAppStore } from '/@/store/modules/app'; +import { useLockStore } from '/@/store/modules/lock'; + +import { useUserStore } from '/@/store/modules/user'; +import { useRootSetting } from '../setting/useRootSetting'; + +export function useLockPage() { + const { getLockTime } = useRootSetting(); + const lockStore = useLockStore(); + const userStore = useUserStore(); + const appStore = useAppStore(); + + let timeId: TimeoutHandle; + + function clear(): void { + window.clearTimeout(timeId); + } + + function resetCalcLockTimeout(): void { + // not login + if (!userStore.getToken) { + clear(); + return; + } + const lockTime = appStore.getProjectConfig.lockTime; + if (!lockTime || lockTime < 1) { + clear(); + return; + } + clear(); + + timeId = setTimeout(() => { + lockPage(); + }, lockTime * 60 * 1000); + } + + function lockPage(): void { + lockStore.setLockInfo({ + isLock: true, + pwd: undefined, + }); + } + + watchEffect((onClean) => { + if (userStore.getToken) { + resetCalcLockTimeout(); + } else { + clear(); + } + onClean(() => { + clear(); + }); + }); + + onUnmounted(() => { + clear(); + }); + + const keyupFn = useThrottleFn(resetCalcLockTimeout, 2000); + + return computed(() => { + if (unref(getLockTime)) { + return { onKeyup: keyupFn, onMousemove: keyupFn }; + } else { + clear(); + return {}; + } + }); +} diff --git a/src/hooks/web/useMessage.ts b/src/hooks/web/useMessage.ts new file mode 100644 index 0000000..3567e61 --- /dev/null +++ b/src/hooks/web/useMessage.ts @@ -0,0 +1,158 @@ +import type { ModalFunc, ModalFuncProps } from 'ant-design-vue/lib/modal/Modal'; + +import { Modal, message as Message, notification } from 'ant-design-vue'; +import { InfoCircleFilled, CheckCircleFilled, CloseCircleFilled } from '@ant-design/icons-vue'; + +import { NotificationArgsProps, ConfigProps } from 'ant-design-vue/lib/notification'; +import { useI18n } from './useI18n'; +import { isString } from '/@/utils/is'; +import { h } from 'vue'; + +export interface NotifyApi { + info(config: NotificationArgsProps): void; + success(config: NotificationArgsProps): void; + error(config: NotificationArgsProps): void; + warn(config: NotificationArgsProps): void; + warning(config: NotificationArgsProps): void; + open(args: NotificationArgsProps): void; + close(key: String): void; + config(options: ConfigProps): void; + destroy(): void; +} + +export declare type NotificationPlacement = 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight'; +export declare type IconType = 'success' | 'info' | 'error' | 'warning'; +export interface ModalOptionsEx extends Omit { + iconType: 'warning' | 'success' | 'error' | 'info'; +} +export type ModalOptionsPartial = Partial & Pick; + +interface ConfirmOptions { + info: ModalFunc; + success: ModalFunc; + error: ModalFunc; + warn: ModalFunc; + warning: ModalFunc; +} + +function getIcon(iconType: string) { + try { + if (iconType === 'warning') { + return h(InfoCircleFilled,{"class":"modal-icon-warning"}) + } else if (iconType === 'success') { + return h(CheckCircleFilled,{"class": "modal-icon-success"}); + } else if (iconType === 'info') { + return h(InfoCircleFilled,{"class": "modal-icon-info"}); + } else { + return h(CloseCircleFilled,{"class":"modal-icon-error"}); + } + } catch (e) { + console.log(e); + } +} + +function renderContent({ content }: Pick) { + try { + if (isString(content)) { + return h('div', h('div', {'innerHTML':content as string})); + } else { + return content; + } + } catch (e) { + console.log(e); + return content; + } +} + +/** + * @description: Create confirmation box + */ +function createConfirm(options: ModalOptionsEx): ReturnType { + const iconType = options.iconType || 'warning'; + Reflect.deleteProperty(options, 'iconType'); + const opt: ModalFuncProps = { + centered: true, + icon: getIcon(iconType), + ...options, + content: renderContent(options), + }; + return Modal.confirm(opt); +} + +const getBaseOptions = () => { + const { t } = useI18n(); + return { + okText: t('common.okText'), + centered: true, + }; +}; + +function createModalOptions(options: ModalOptionsPartial, icon: string): ModalOptionsPartial { + //update-begin-author:taoyan date:2023-1-10 for: 可以自定义图标 + let titleIcon:any = '' + if(options.icon){ + titleIcon = options.icon; + }else{ + titleIcon = getIcon(icon) + } + //update-end-author:taoyan date:2023-1-10 for: 可以自定义图标 + return { + ...getBaseOptions(), + ...options, + content: renderContent(options), + icon: titleIcon + }; +} + +function createSuccessModal(options: ModalOptionsPartial) { + return Modal.success(createModalOptions(options, 'success')); +} + +function createErrorModal(options: ModalOptionsPartial) { + return Modal.error(createModalOptions(options, 'close')); +} + +function createInfoModal(options: ModalOptionsPartial) { + return Modal.info(createModalOptions(options, 'info')); +} + +function createWarningModal(options: ModalOptionsPartial) { + return Modal.warning(createModalOptions(options, 'warning')); +} + +interface MOE extends Omit { + iconType?: ModalOptionsEx['iconType']; +} + +// 提示框,无需传入iconType,默认为warning +function createConfirmSync(options: MOE) { + return new Promise((resolve) => { + createConfirm({ + iconType: 'warning', + ...options, + onOk: () => resolve(true), + onCancel: () => resolve(false), + }); + }); +} + +notification.config({ + placement: 'topRight', + duration: 3, +}); + +/** + * @description: message + */ +export function useMessage() { + return { + createMessage: Message, + notification: notification as NotifyApi, + createConfirm: createConfirm, + createConfirmSync, + createSuccessModal, + createErrorModal, + createInfoModal, + createWarningModal, + }; +} diff --git a/src/hooks/web/useMessage.tsx_backup b/src/hooks/web/useMessage.tsx_backup new file mode 100644 index 0000000..ad64eda --- /dev/null +++ b/src/hooks/web/useMessage.tsx_backup @@ -0,0 +1,132 @@ +import type { ModalFunc, ModalFuncProps } from 'ant-design-vue/lib/modal/Modal'; + +import { Modal, message as Message, notification } from 'ant-design-vue'; +import { InfoCircleFilled, CheckCircleFilled, CloseCircleFilled } from '@ant-design/icons-vue'; + +import { NotificationArgsProps, ConfigProps } from 'ant-design-vue/lib/notification'; +import { useI18n } from './useI18n'; +import { isString } from '/@/utils/is'; + +export interface NotifyApi { + info(config: NotificationArgsProps): void; + success(config: NotificationArgsProps): void; + error(config: NotificationArgsProps): void; + warn(config: NotificationArgsProps): void; + warning(config: NotificationArgsProps): void; + open(args: NotificationArgsProps): void; + close(key: String): void; + config(options: ConfigProps): void; + destroy(): void; +} + +export declare type NotificationPlacement = 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight'; +export declare type IconType = 'success' | 'info' | 'error' | 'warning'; +export interface ModalOptionsEx extends Omit { + iconType: 'warning' | 'success' | 'error' | 'info'; +} +export type ModalOptionsPartial = Partial & Pick; + +interface ConfirmOptions { + info: ModalFunc; + success: ModalFunc; + error: ModalFunc; + warn: ModalFunc; + warning: ModalFunc; +} + +function getIcon(iconType: string) { + try { + if (iconType === 'warning') { + return ; + } else if (iconType === 'success') { + return ; + } else if (iconType === 'info') { + return ; + } else { + return ; + } + } catch (e) { + console.log(e); + } +} + +function renderContent({ content }: Pick) { + try { + if (isString(content)) { + return
${content as string}
`}>; + } else { + return content; + } + } catch (e) { + console.log(e); + return content; + } +} + +/** + * @description: Create confirmation box + */ +function createConfirm(options: ModalOptionsEx): ReturnType { + const iconType = options.iconType || 'warning'; + Reflect.deleteProperty(options, 'iconType'); + const opt: ModalFuncProps = { + centered: true, + icon: getIcon(iconType), + ...options, + content: renderContent(options), + }; + return Modal.confirm(opt); +} + +const getBaseOptions = () => { + const { t } = useI18n(); + return { + okText: t('common.okText'), + centered: true, + }; +}; + +function createModalOptions(options: ModalOptionsPartial, icon: string): ModalOptionsPartial { + return { + ...getBaseOptions(), + ...options, + content: renderContent(options), + icon: getIcon(icon), + }; +} + +function createSuccessModal(options: ModalOptionsPartial) { + return Modal.success(createModalOptions(options, 'success')); +} + +function createErrorModal(options: ModalOptionsPartial) { + return Modal.error(createModalOptions(options, 'close')); +} + +function createInfoModal(options: ModalOptionsPartial) { + return Modal.info(createModalOptions(options, 'info')); +} + +function createWarningModal(options: ModalOptionsPartial) { + return Modal.warning(createModalOptions(options, 'warning')); +} + +notification.config({ + placement: 'topRight', + duration: 3, +}); + +/** + * @description: message + */ +export function useMessage() { + return { + createMessage: Message, + notification: notification as NotifyApi, + createConfirm: createConfirm, + createSuccessModal, + createErrorModal, + createInfoModal, + createWarningModal, + }; +} diff --git a/src/hooks/web/usePage.ts b/src/hooks/web/usePage.ts new file mode 100644 index 0000000..aacd479 --- /dev/null +++ b/src/hooks/web/usePage.ts @@ -0,0 +1,83 @@ +import type { RouteLocationRaw, Router } from 'vue-router'; + +import { PageEnum } from '/@/enums/pageEnum'; +import { isString } from '/@/utils/is'; +import { unref } from 'vue'; + +import { useRouter } from 'vue-router'; +import { REDIRECT_NAME } from '/@/router/constant'; +import { useUserStore } from '/@/store/modules/user'; +import { useMultipleTabStore } from '/@/store/modules/multipleTab'; + +export type RouteLocationRawEx = Omit & { path: PageEnum }; + +function handleError(e: Error) { + console.error(e); +} + +// page switch +export function useGo(_router?: Router) { + // update-begin--author:liaozhiyang---date:20230908---for:【issues/694】404返回首页问题 + const userStore = useUserStore(); + const homePath = userStore.getUserInfo.homePath || PageEnum.BASE_HOME; + // update-end--author:liaozhiyang---date:20230908---for:【issues/694】404返回首页问题 + let router; + if (!_router) { + router = useRouter(); + } + const { push, replace } = _router || router; + function go(opt: PageEnum | RouteLocationRawEx | string = homePath, isReplace = false) { + if (!opt) { + return; + } + if (isString(opt)) { + isReplace ? replace(opt).catch(handleError) : push(opt).catch(handleError); + } else { + const o = opt as RouteLocationRaw; + isReplace ? replace(o).catch(handleError) : push(o).catch(handleError); + } + } + return go; +} + +/** + * @description: redo current page + */ +export const useRedo = (_router?: Router, otherQuery?: Recordable) => { + const { push, currentRoute } = _router || useRouter(); + const { query, params = {}, name, fullPath } = unref(currentRoute.value); + function redo(): Promise { + return new Promise((resolve) => { + if (name === REDIRECT_NAME) { + resolve(false); + return; + } + // update-begin--author:liaozhiyang---date:20231123---for:【QQYUN-7099】动态路由匹配右键重新加载404 + const tabStore = useMultipleTabStore(); + if (otherQuery && Object.keys(otherQuery).length > 0) { + Object.keys(otherQuery).forEach((key) => { + params[key] = otherQuery[key]; + }); + } + if (name && Object.keys(params).length > 0) { + tabStore.setRedirectPageParam({ + redirect_type: 'name', + name: String(name), + params, + query, + }); + params['path'] = String(name); + } else { + tabStore.setRedirectPageParam({ + redirect_type: 'path', + path: fullPath, + query, + }); + params['path'] = fullPath; + } + // update-end--author:liaozhiyang---date:20231123---for:【QQYUN-7099】动态路由匹配右键重新加载404 + push({ name: REDIRECT_NAME, params, query }).then(() => resolve(true)); + }); + } + return redo; +}; diff --git a/src/hooks/web/usePagination.ts b/src/hooks/web/usePagination.ts new file mode 100644 index 0000000..ea234ef --- /dev/null +++ b/src/hooks/web/usePagination.ts @@ -0,0 +1,31 @@ +import type { Ref } from 'vue'; +import { ref, unref, computed } from 'vue'; + +function pagination(list: T[], pageNo: number, pageSize: number): T[] { + const offset = (pageNo - 1) * Number(pageSize); + const ret = offset + Number(pageSize) >= list.length ? list.slice(offset, list.length) : list.slice(offset, offset + Number(pageSize)); + return ret; +} + +export function usePagination(list: Ref, pageSize: number) { + const currentPage = ref(1); + const pageSizeRef = ref(pageSize); + + const getPaginationList = computed(() => { + return pagination(unref(list), unref(currentPage), unref(pageSizeRef)); + }); + + const getTotal = computed(() => { + return unref(list).length; + }); + + function setCurrentPage(page: number) { + currentPage.value = page; + } + + function setPageSize(pageSize: number) { + pageSizeRef.value = pageSize; + } + + return { setCurrentPage, getTotal, setPageSize, getPaginationList }; +} diff --git a/src/hooks/web/usePermission.ts b/src/hooks/web/usePermission.ts new file mode 100644 index 0000000..5a275ee --- /dev/null +++ b/src/hooks/web/usePermission.ts @@ -0,0 +1,176 @@ +import type { RouteRecordRaw } from 'vue-router'; + +import { useAppStore } from '/@/store/modules/app'; +import { usePermissionStore } from '/@/store/modules/permission'; +import { useUserStore } from '/@/store/modules/user'; + +import { useTabs } from './useTabs'; + +import { router, resetRouter } from '/@/router'; +// import { RootRoute } from '/@/router/routes'; + +import projectSetting from '/@/settings/projectSetting'; +import { PermissionModeEnum } from '/@/enums/appEnum'; +import { RoleEnum } from '/@/enums/roleEnum'; + +import { intersection } from 'lodash-es'; +import { isArray } from '/@/utils/is'; +import { useMultipleTabStore } from '/@/store/modules/multipleTab'; + +// User permissions related operations +export function usePermission() { + const userStore = useUserStore(); + const appStore = useAppStore(); + const permissionStore = usePermissionStore(); + //动态加载流程节点表单权限 + let formData: any = {}; + function initBpmFormData(_bpmFormData) { + formData = _bpmFormData; + } + const { closeAll } = useTabs(router); + + //==================================工作流权限判断-begin========================================= + function hasBpmPermission(code, type) { + // 禁用-type=2 + // 显示-type=1 + let codeList: string[] = []; + let permissionList = formData.permissionList; + if (permissionList && permissionList.length > 0) { + for (let item of permissionList) { + if (item.type == type) { + codeList.push(item.action); + } + } + } + return codeList.indexOf(code) >= 0; + } + //==================================工作流权限判断-end========================================= + + /** + * Change permission mode + */ + async function togglePermissionMode() { + appStore.setProjectConfig({ + permissionMode: projectSetting.permissionMode === PermissionModeEnum.BACK ? PermissionModeEnum.ROUTE_MAPPING : PermissionModeEnum.BACK, + }); + location.reload(); + } + + /** + * Reset and regain authority resource information + * @param id + */ + async function resume() { + const tabStore = useMultipleTabStore(); + tabStore.clearCacheTabs(); + resetRouter(); + const routes = await permissionStore.buildRoutesAction(); + routes.forEach((route) => { + router.addRoute(route as unknown as RouteRecordRaw); + }); + permissionStore.setLastBuildMenuTime(); + closeAll(); + } + + /** + * 确定是否存在权限 + */ + function hasPermission(value?: RoleEnum | RoleEnum[] | string | string[], def = true): boolean { + // Visible by default + if (!value) { + return def; + } + + const permMode = projectSetting.permissionMode; + + if ([PermissionModeEnum.ROUTE_MAPPING, PermissionModeEnum.ROLE].includes(permMode)) { + if (!isArray(value)) { + return userStore.getRoleList?.includes(value as RoleEnum); + } + return (intersection(value, userStore.getRoleList) as RoleEnum[]).length > 0; + } + + if (PermissionModeEnum.BACK === permMode) { + const allCodeList = permissionStore.getPermCodeList as string[]; + if (!isArray(value) && allCodeList && allCodeList.length > 0) { + //=============================工作流权限判断-显示-begin============================================== + if (formData) { + let code = value as string; + if (hasBpmPermission(code, '1') === true) { + return true; + } + } + //=============================工作流权限判断-显示-end============================================== + return allCodeList.includes(value); + } + return (intersection(value, allCodeList) as string[]).length > 0; + } + return true; + } + /** + * 是否禁用组件 + */ + function isDisabledAuth(value?: RoleEnum | RoleEnum[] | string | string[], def = true): boolean { + //=============================工作流权限判断-禁用-begin============================================== + if (formData) { + let code = value as string; + if (hasBpmPermission(code, '2') === true) { + return true; + } + //update-begin-author:taoyan date:2022-6-17 for: VUEN-1342【流程】编码方式 节点权限配置好后,未生效 + if (isCodingButNoConfig(code) == true) { + return false; + } + //update-end-author:taoyan date:2022-6-17 for: VUEN-1342【流程】编码方式 节点权限配置好后,未生效 + } + //=============================工作流权限判断-禁用-end============================================== + return !hasPermission(value); + } + + /** + * Change roles + * @param roles + */ + async function changeRole(roles: RoleEnum | RoleEnum[]): Promise { + if (projectSetting.permissionMode !== PermissionModeEnum.ROUTE_MAPPING) { + throw new Error('Please switch PermissionModeEnum to ROUTE_MAPPING mode in the configuration to operate!'); + } + + if (!isArray(roles)) { + roles = [roles]; + } + userStore.setRoleList(roles); + await resume(); + } + + /** + * refresh menu data + */ + async function refreshMenu() { + resume(); + } + + //update-begin-author:taoyan date:2022-6-17 for: VUEN-1342【流程】编码方式 节点权限配置好后,未生效 + /** + * 判断是不是 代码里写了逻辑但是没有配置权限这种情况 + */ + function isCodingButNoConfig(code) { + let all = permissionStore.allAuthList; + if (all && all instanceof Array) { + let temp = all.filter((item) => item.action == code); + if (temp && temp.length > 0) { + if (temp[0].status == '0') { + return true; + } + } else { + // update-begin--author:liaozhiyang---date:20240705---for:【TV360X-1604】按钮禁用权限在接口中查不到也禁用 + return false; + // update-end--author:liaozhiyang---date:20240705---for:【TV360X-1604】按钮禁用权限在接口中查不到也禁用 + } + } + return false; + } + //update-end-author:taoyan date:2022-6-17 for: VUEN-1342【流程】编码方式 节点权限配置好后,未生效 + + return { changeRole, hasPermission, togglePermissionMode, refreshMenu, isDisabledAuth, initBpmFormData }; +} diff --git a/src/hooks/web/usePrintJS.ts b/src/hooks/web/usePrintJS.ts new file mode 100644 index 0000000..9cfe0a6 --- /dev/null +++ b/src/hooks/web/usePrintJS.ts @@ -0,0 +1,42 @@ +import { nextTick } from 'vue'; +import $printJS, { Configuration } from 'print-js'; +import Print from 'vue-print-nb-jeecg/src/printarea'; + +/** + * 调用 printJS,如果type = html,就走 printNB 的方法 + */ +export function printJS(configuration: Configuration) { + if (configuration?.type === 'html') { + printNb(configuration.printable); + } else { + return $printJS(configuration); + } +} + +/** 调用 printNB 打印 */ +export function printNb(domId) { + if (domId) { + localPrint(domId); + } else { + window.print(); + } +} + +let closeBtn = true; + +function localPrint(domId) { + if (typeof domId === 'string' && !domId.startsWith('#')) { + domId = '#' + domId; + } + nextTick(() => { + if (closeBtn) { + closeBtn = false; + new Print({ + el: domId, + endCallback() { + closeBtn = true; + }, + }); + } + }); +} diff --git a/src/hooks/web/useScript.ts b/src/hooks/web/useScript.ts new file mode 100644 index 0000000..585c267 --- /dev/null +++ b/src/hooks/web/useScript.ts @@ -0,0 +1,48 @@ +import { onMounted, onUnmounted, ref } from 'vue'; + +interface ScriptOptions { + src: string; +} + +export function useScript(opts: ScriptOptions) { + // date-begin--author:liaozhiyang---date:20250716---for:【issues/8552】useScript的isLoading默认值应该是true + const isLoading = ref(true); + // date-end--author:liaozhiyang---date:20250716---for:【issues/8552】useScript的isLoading默认值应该是true + const error = ref(false); + const success = ref(false); + let script: HTMLScriptElement; + + const promise = new Promise((resolve, reject) => { + onMounted(() => { + script = document.createElement('script'); + script.type = 'text/javascript'; + script.onload = function () { + isLoading.value = false; + success.value = true; + error.value = false; + resolve(''); + }; + + script.onerror = function (err) { + isLoading.value = false; + success.value = false; + error.value = true; + reject(err); + }; + + script.src = opts.src; + document.head.appendChild(script); + }); + }); + + onUnmounted(() => { + script && script.remove(); + }); + + return { + isLoading, + error, + success, + toPromise: () => promise, + }; +} diff --git a/src/hooks/web/useSortable.ts b/src/hooks/web/useSortable.ts new file mode 100644 index 0000000..4c66b6a --- /dev/null +++ b/src/hooks/web/useSortable.ts @@ -0,0 +1,21 @@ +import { nextTick, unref } from 'vue'; +import type { Ref } from 'vue'; +import type { Options } from 'sortablejs'; + +export function useSortable(el: HTMLElement | Ref, options?: Options) { + function initSortable() { + nextTick(async () => { + if (!el) return; + + const Sortable = (await import('sortablejs')).default; + Sortable.create(unref(el), { + animation: 500, + delay: 400, + delayOnTouchOnly: true, + ...options, + }); + }); + } + + return { initSortable }; +} diff --git a/src/hooks/web/useSso.ts b/src/hooks/web/useSso.ts new file mode 100644 index 0000000..8b69829 --- /dev/null +++ b/src/hooks/web/useSso.ts @@ -0,0 +1,45 @@ +// 单点登录核心类 +import { getToken } from '/@/utils/auth'; +import { getUrlParam } from '/@/utils'; +import { useGlobSetting } from '/@/hooks/setting'; +import { validateCasLogin } from '/@/api/sys/user'; +import { useUserStore } from '/@/store/modules/user'; +const globSetting = useGlobSetting(); +const openSso = globSetting.openSso; +export function useSso() { + //update-begin---author:wangshuai---date:2024-01-03---for:【QQYUN-7805】SSO登录强制用http #957--- + let locationUrl = document.location.protocol +"//" + window.location.host + '/'; + //update-end---author:wangshuai---date:2024-01-03---for:【QQYUN-7805】SSO登录强制用http #957--- + + /** + * 单点登录 + */ + async function ssoLogin() { + if (openSso == 'true') { + let token = getToken(); + let ticket = getUrlParam('ticket'); + if (!token) { + if (ticket) { + await validateCasLogin({ + ticket: ticket, + service: locationUrl, + }).then((res) => { + const userStore = useUserStore(); + userStore.setToken(res.token); + return userStore.afterLoginAction(true, {}); + }); + } else { + window.location.href = globSetting.casBaseUrl + '/login?service=' + encodeURIComponent(locationUrl); + } + } + } + } + + /** + * 退出登录 + */ + async function ssoLoginOut() { + window.location.href = globSetting.casBaseUrl + '/logout?service=' + encodeURIComponent(locationUrl); + } + return { ssoLogin, ssoLoginOut }; +} diff --git a/src/hooks/web/useTabs.ts b/src/hooks/web/useTabs.ts new file mode 100644 index 0000000..6cde92b --- /dev/null +++ b/src/hooks/web/useTabs.ts @@ -0,0 +1,132 @@ +import type { RouteLocationNormalized, Router } from 'vue-router'; + +import { useRouter } from 'vue-router'; +import { unref } from 'vue'; + +import { useMultipleTabStore } from '/@/store/modules/multipleTab'; +import { useAppStore } from '/@/store/modules/app'; + +enum TableActionEnum { + REFRESH, + CLOSE_ALL, + CLOSE_LEFT, + CLOSE_RIGHT, + CLOSE_OTHER, + CLOSE_CURRENT, + HOME_DESIGN, + CLOSE, +} + +export function useTabs(_router?: Router) { + const appStore = useAppStore(); + + function canIUseTabs(): boolean { + const { show } = appStore.getMultiTabsSetting; + if (!show) { + throw new Error('The multi-tab page is currently not open, please open it in the settings!'); + } + return !!show; + } + + const tabStore = useMultipleTabStore(); + const router = _router || useRouter(); + + const { currentRoute } = router; + + function getCurrentTab() { + const route = unref(currentRoute); + return tabStore.getTabList.find((item) => item.path === route.path)!; + } + + async function updateTabTitle(title: string, tab?: RouteLocationNormalized) { + const canIUse = canIUseTabs; + if (!canIUse) { + return; + } + const targetTab = tab || getCurrentTab(); + await tabStore.setTabTitle(title, targetTab); + } + + async function updateTabPath(path: string, tab?: RouteLocationNormalized) { + const canIUse = canIUseTabs; + if (!canIUse) { + return; + } + const targetTab = tab || getCurrentTab(); + await tabStore.updateTabPath(path, targetTab); + } + + async function handleTabAction(action: TableActionEnum, tab?: RouteLocationNormalized) { + const canIUse = canIUseTabs; + if (!canIUse) { + return; + } + const currentTab = getCurrentTab(); + switch (action) { + case TableActionEnum.REFRESH: + await tabStore.refreshPage(router); + break; + + case TableActionEnum.HOME_DESIGN: + await tabStore.changeDesign(router); + break; + + case TableActionEnum.CLOSE_ALL: + await tabStore.closeAllTab(router); + break; + + case TableActionEnum.CLOSE_LEFT: + // update-begin--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用 + await tabStore.closeLeftTabs(tab || currentTab, router); + // update-end--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用 + break; + + case TableActionEnum.CLOSE_RIGHT: + // update-begin--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用 + await tabStore.closeRightTabs(tab || currentTab, router); + // update-end--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用 + break; + + case TableActionEnum.CLOSE_OTHER: + // update-begin--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用 + await tabStore.closeOtherTabs(tab || currentTab, router); + // update-end--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用 + break; + + case TableActionEnum.CLOSE_CURRENT: + case TableActionEnum.CLOSE: + await tabStore.closeTab(tab || currentTab, router); + break; + } + } + + /** + * 关闭相同的路由 + * @param path + */ + function closeSameRoute(path) { + if(path.indexOf('?')>0){ + path = path.split('?')[0]; + } + let tab = tabStore.getTabList.find((item) => item.path.indexOf(path)>=0)!; + if(tab){ + tabStore.closeTab(tab, router); + } + } + + return { + refreshPage: () => handleTabAction(TableActionEnum.REFRESH), + changeDesign: () => handleTabAction(TableActionEnum.HOME_DESIGN), + // update-begin--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用 + closeAll: (tab) => handleTabAction(TableActionEnum.CLOSE_ALL, tab), + closeLeft: (tab) => handleTabAction(TableActionEnum.CLOSE_LEFT, tab), + closeRight: (tab) => handleTabAction(TableActionEnum.CLOSE_RIGHT, tab), + closeOther: (tab) => handleTabAction(TableActionEnum.CLOSE_OTHER, tab), + // update-end--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用 + closeCurrent: () => handleTabAction(TableActionEnum.CLOSE_CURRENT), + close: (tab?: RouteLocationNormalized) => handleTabAction(TableActionEnum.CLOSE, tab), + setTitle: (title: string, tab?: RouteLocationNormalized) => updateTabTitle(title, tab), + updatePath: (fullPath: string, tab?: RouteLocationNormalized) => updateTabPath(fullPath, tab), + closeSameRoute + }; +} diff --git a/src/hooks/web/useTitle.ts b/src/hooks/web/useTitle.ts new file mode 100644 index 0000000..0320765 --- /dev/null +++ b/src/hooks/web/useTitle.ts @@ -0,0 +1,72 @@ +import type {Menu} from "@/router/types"; +import { ref, watch, unref } from 'vue'; +import { useI18n } from '/@/hooks/web/useI18n'; +import { useTitle as usePageTitle } from '@vueuse/core'; +import { useGlobSetting } from '/@/hooks/setting'; +import { useRouter } from 'vue-router'; +import { useLocaleStore } from '/@/store/modules/locale'; +import { REDIRECT_NAME } from '/@/router/constant'; +import { getMenus } from '/@/router/menus'; + +/** + * Listening to page changes and dynamically changing site titles + */ +export function useTitle() { + const { title } = useGlobSetting(); + const { t } = useI18n(); + const { currentRoute } = useRouter(); + const localeStore = useLocaleStore(); + + const pageTitle = usePageTitle(); + + const menus = ref(null) + + watch( + [() => currentRoute.value.path, () => localeStore.getLocale], + async () => { + const route = unref(currentRoute); + + if (route.name === REDIRECT_NAME) { + return; + } + // update-begin--author:liaozhiyang---date:20231110---for:【QQYUN-6938】online菜单名字和页面title不一致 + if (route.params && Object.keys(route.params).length) { + if (!menus.value) { + menus.value = await getMenus(); + } + const getTitle = getMatchingRouterName(menus.value, route.fullPath); + let tTitle = ''; + if (getTitle) { + tTitle = t(getTitle); + } else { + tTitle = t(route?.meta?.title as string); + } + pageTitle.value = tTitle ? ` ${tTitle} - ${title} ` : `${title}`; + } else { + const tTitle = t(route?.meta?.title as string); + pageTitle.value = tTitle ? ` ${tTitle} - ${title} ` : `${title}`; + } + // update-end--author:liaozhiyang---date:20231110---for:【QQYUN-6938】online菜单名字和页面title不一致 + }, + { immediate: true } + ); +} +/** + 2023-11-09 + liaozhiyang + 获取路由匹配模式的真实页面名字 +*/ +function getMatchingRouterName(menus, path) { + for (let i = 0, len = menus.length; i < len; i++) { + const item = menus[i]; + if (item.path === path && !item.redirect && !item.paramPath) { + return item.meta?.title; + } else if (item.children?.length) { + const result = getMatchingRouterName(item.children, path); + if (result) { + return result; + } + } + } + return ''; +} diff --git a/src/hooks/web/useWatermark.ts b/src/hooks/web/useWatermark.ts new file mode 100644 index 0000000..bde1549 --- /dev/null +++ b/src/hooks/web/useWatermark.ts @@ -0,0 +1,98 @@ +import { getCurrentInstance, onBeforeUnmount, ref, Ref, shallowRef, unref } from 'vue'; +import { useRafThrottle } from '/@/utils/domUtils'; +import { addResizeListener, removeResizeListener } from '/@/utils/event'; +import { isDef } from '/@/utils/is'; + +const domSymbol = Symbol('watermark-dom'); + +export function useWatermark(appendEl: Ref = ref(document.body) as Ref) { + const func = useRafThrottle(function () { + const el = unref(appendEl); + if (!el) return; + const { clientHeight: height, clientWidth: width } = el; + updateWatermark({ height, width }); + }); + const id = domSymbol.toString(); + const watermarkEl = shallowRef(); + + const clear = () => { + const domId = unref(watermarkEl); + watermarkEl.value = undefined; + const el = unref(appendEl); + if (!el) return; + domId && el.removeChild(domId); + removeResizeListener(el, func); + }; + + function createBase64(str: string) { + const can = document.createElement('canvas'); + const width = 300; + const height = 240; + Object.assign(can, { width, height }); + + const cans = can.getContext('2d'); + if (cans) { + cans.rotate((-20 * Math.PI) / 120); + cans.font = '15px Vedana'; + cans.fillStyle = 'rgba(0, 0, 0, 0.15)'; + cans.textAlign = 'left'; + cans.textBaseline = 'middle'; + cans.fillText(str, width / 20, height); + } + return can.toDataURL('image/png'); + } + + function updateWatermark( + options: { + width?: number; + height?: number; + str?: string; + } = {} + ) { + const el = unref(watermarkEl); + if (!el) return; + if (isDef(options.width)) { + el.style.width = `${options.width}px`; + } + if (isDef(options.height)) { + el.style.height = `${options.height}px`; + } + if (isDef(options.str)) { + el.style.background = `url(${createBase64(options.str)}) left top repeat`; + } + } + + const createWatermark = (str: string) => { + if (unref(watermarkEl)) { + updateWatermark({ str }); + return id; + } + const div = document.createElement('div'); + watermarkEl.value = div; + div.id = id; + div.style.pointerEvents = 'none'; + div.style.top = '0px'; + div.style.left = '0px'; + div.style.position = 'absolute'; + div.style.zIndex = '100000'; + const el = unref(appendEl); + if (!el) return id; + const { clientHeight: height, clientWidth: width } = el; + updateWatermark({ str, width, height }); + el.appendChild(div); + return id; + }; + + function setWatermark(str: string) { + createWatermark(str); + addResizeListener(document.documentElement, func); + const instance = getCurrentInstance(); + if (instance) { + onBeforeUnmount(() => { + clear(); + }); + } + } + + return { setWatermark, clear }; +} diff --git a/src/hooks/web/useWebSocket.ts b/src/hooks/web/useWebSocket.ts new file mode 100644 index 0000000..31ee8a2 --- /dev/null +++ b/src/hooks/web/useWebSocket.ts @@ -0,0 +1,139 @@ +// noinspection JSUnusedGlobalSymbols + +import { unref } from 'vue'; +import { useWebSocket, WebSocketResult } from '@vueuse/core'; +import { getToken } from '/@/utils/auth'; + +let result: WebSocketResult; +const listeners = new Map(); + +/** + * 开启 WebSocket 链接,全局只需执行一次 + * @param url + */ +export function connectWebSocket(url: string) { + //update-begin-author:taoyan date:2022-4-24 for: v2.4.6 的 websocket 服务端,存在性能和安全问题。 #3278 + const token = (getToken() || '') as string; + result = useWebSocket(url, { + // 自动重连 (遇到错误最多重复连接10次) + autoReconnect: { + retries : 10, + delay : 5000 + }, + // 心跳检测 + heartbeat: { + message: "ping", + interval: 55000 + }, + protocols: [token], + // update-begin--author:liaozhiyang---date:20240726---for:[issues/6662] 演示系统socket总断,换一个写法 + onConnected: function (ws) { + console.log('[WebSocket] 连接成功', ws); + }, + onDisconnected: function (ws, event) { + console.log('[WebSocket] 连接断开:', ws, event); + }, + onError: function (ws, event) { + console.log('[WebSocket] 连接发生错误: ', ws, event); + }, + onMessage: function (_ws, e) { + console.debug('[WebSocket] -----接收消息-------', e.data); + try { + //update-begin---author:wangshuai---date:2024-05-07---for:【issues/1161】前端websocket因心跳导致监听不起作用--- + if (e.data === 'ping') { + return; + } + //update-end---author:wangshuai---date:2024-05-07---for:【issues/1161】前端websocket因心跳导致监听不起作用--- + const data = JSON.parse(e.data); + for (const callback of listeners.keys()) { + try { + callback(data); + } catch (err) { + console.error(err); + } + } + } catch (err) { + console.error('[WebSocket] data解析失败:', err); + } + }, + // update-end--author:liaozhiyang---date:20240726---for:[issues/6662] 演示系统socket总断,换一个写法 + }); + // update-begin--author:liaozhiyang---date:20240726---for:[issues/6662] 演示系统socket总断,换一个写法 + //update-end-author:taoyan date:2022-4-24 for: v2.4.6 的 websocket 服务端,存在性能和安全问题。 #3278 + // if (result) { + // result.open = onOpen; + // result.close = onClose; + + // const ws = unref(result.ws); + // if(ws!=null){ + // ws.onerror = onError; + // ws.onmessage = onMessage; + // //update-begin---author:wangshuai---date:2024-04-30---for:【issues/1217】发送测试消息后,铃铛数字没有变化--- + // ws.onopen = onOpen; + // ws.onclose = onClose; + // //update-end---author:wangshuai---date:2024-04-30---for:【issues/1217】发送测试消息后,铃铛数字没有变化--- + // } + // } + // update-end--author:liaozhiyang---date:20240726---for:[issues/6662] 演示系统socket总断,换一个写法 +} + +function onOpen() { + console.log('[WebSocket] 连接成功'); +} + +function onClose(e) { + console.log('[WebSocket] 连接断开:', e); +} + +function onError(e) { + console.log('[WebSocket] 连接发生错误: ', e); +} + +function onMessage(e) { + console.debug('[WebSocket] -----接收消息-------', e.data); + try { + //update-begin---author:wangshuai---date:2024-05-07---for:【issues/1161】前端websocket因心跳导致监听不起作用--- + if(e==='ping'){ + return; + } + //update-end---author:wangshuai---date:2024-05-07---for:【issues/1161】前端websocket因心跳导致监听不起作用--- + const data = JSON.parse(e.data); + for (const callback of listeners.keys()) { + try { + callback(data); + } catch (err) { + console.error(err); + } + } + } catch (err) { + console.error('[WebSocket] data解析失败:', err); + } +} + + +/** + * 添加 WebSocket 消息监听 + * @param callback + */ +export function onWebSocket(callback: (data: object) => any) { + if (!listeners.has(callback)) { + if (typeof callback === 'function') { + listeners.set(callback, null); + } else { + console.debug('[WebSocket] 添加 WebSocket 消息监听失败:传入的参数不是一个方法'); + } + } +} + +/** + * 解除 WebSocket 消息监听 + * + * @param callback + */ +export function offWebSocket(callback: (data: object) => any) { + listeners.delete(callback); +} + +export function useMyWebSocket() { + return result; +} diff --git a/src/layouts/default/content/index.vue b/src/layouts/default/content/index.vue new file mode 100644 index 0000000..a5ca774 --- /dev/null +++ b/src/layouts/default/content/index.vue @@ -0,0 +1,66 @@ + + + diff --git a/src/layouts/default/content/useContentContext.ts b/src/layouts/default/content/useContentContext.ts new file mode 100644 index 0000000..f12e77b --- /dev/null +++ b/src/layouts/default/content/useContentContext.ts @@ -0,0 +1,17 @@ +import type { InjectionKey, ComputedRef } from 'vue'; +import { createContext, useContext } from '/@/hooks/core/useContext'; + +export interface ContentContextProps { + contentHeight: ComputedRef; + setPageHeight: (height: number) => Promise; +} + +const key: InjectionKey = Symbol(); + +export function createContentContext(context: ContentContextProps) { + return createContext(context, key, { native: true }); +} + +export function useContentContext() { + return useContext(key); +} diff --git a/src/layouts/default/content/useContentViewHeight.ts b/src/layouts/default/content/useContentViewHeight.ts new file mode 100644 index 0000000..b55b7e8 --- /dev/null +++ b/src/layouts/default/content/useContentViewHeight.ts @@ -0,0 +1,42 @@ +import { ref, computed, unref } from 'vue'; +import { createPageContext } from '/@/hooks/component/usePageContext'; +import { useWindowSizeFn } from '/@/hooks/event/useWindowSizeFn'; + +const headerHeightRef = ref(0); +const footerHeightRef = ref(0); + +export function useLayoutHeight() { + function setHeaderHeight(val) { + headerHeightRef.value = val; + } + function setFooterHeight(val) { + footerHeightRef.value = val; + } + return { headerHeightRef, footerHeightRef, setHeaderHeight, setFooterHeight }; +} + +export function useContentViewHeight() { + const contentHeight = ref(window.innerHeight); + const pageHeight = ref(window.innerHeight); + const getViewHeight = computed(() => { + return unref(contentHeight) - unref(headerHeightRef) - unref(footerHeightRef) || 0; + }); + + useWindowSizeFn( + () => { + contentHeight.value = window.innerHeight; + }, + 100, + { immediate: true } + ); + + async function setPageHeight(height: number) { + pageHeight.value = height; + } + + createPageContext({ + contentHeight: getViewHeight, + setPageHeight, + pageHeight, + }); +} diff --git a/src/layouts/default/feature/index.vue b/src/layouts/default/feature/index.vue new file mode 100644 index 0000000..99c83cb --- /dev/null +++ b/src/layouts/default/feature/index.vue @@ -0,0 +1,82 @@ + + + + + diff --git a/src/layouts/default/footer/index.vue b/src/layouts/default/footer/index.vue new file mode 100644 index 0000000..a7e0d93 --- /dev/null +++ b/src/layouts/default/footer/index.vue @@ -0,0 +1,103 @@ + + + + diff --git a/src/layouts/default/header/MultipleHeader.vue b/src/layouts/default/header/MultipleHeader.vue new file mode 100644 index 0000000..50e1906 --- /dev/null +++ b/src/layouts/default/header/MultipleHeader.vue @@ -0,0 +1,162 @@ + + + diff --git a/src/layouts/default/header/components/Breadcrumb.vue b/src/layouts/default/header/components/Breadcrumb.vue new file mode 100644 index 0000000..b5f08f8 --- /dev/null +++ b/src/layouts/default/header/components/Breadcrumb.vue @@ -0,0 +1,223 @@ + + + diff --git a/src/layouts/default/header/components/ErrorAction.vue b/src/layouts/default/header/components/ErrorAction.vue new file mode 100644 index 0000000..ff173ae --- /dev/null +++ b/src/layouts/default/header/components/ErrorAction.vue @@ -0,0 +1,43 @@ + + diff --git a/src/layouts/default/header/components/FullScreen.vue b/src/layouts/default/header/components/FullScreen.vue new file mode 100644 index 0000000..9efbfab --- /dev/null +++ b/src/layouts/default/header/components/FullScreen.vue @@ -0,0 +1,35 @@ + + diff --git a/src/layouts/default/header/components/LockScreen.vue b/src/layouts/default/header/components/LockScreen.vue new file mode 100644 index 0000000..773aed4 --- /dev/null +++ b/src/layouts/default/header/components/LockScreen.vue @@ -0,0 +1,47 @@ + + diff --git a/src/layouts/default/header/components/index.ts b/src/layouts/default/header/components/index.ts new file mode 100644 index 0000000..1256a19 --- /dev/null +++ b/src/layouts/default/header/components/index.ts @@ -0,0 +1,16 @@ +import { createAsyncComponent } from '/@/utils/factory/createAsyncComponent'; +import FullScreen from './FullScreen.vue'; + +export const UserDropDown = createAsyncComponent(() => import('./user-dropdown/index.vue'), { + loading: true, +}); + +export const LayoutBreadcrumb = createAsyncComponent(() => import('./Breadcrumb.vue')); + +export const Notify = createAsyncComponent(() => import('./notify/index.vue')); + +export const ErrorAction = createAsyncComponent(() => import('./ErrorAction.vue')); + +export const LockScreen = createAsyncComponent(() => import('./LockScreen.vue')); + +export { FullScreen }; diff --git a/src/layouts/default/header/components/lock/LockModal.vue b/src/layouts/default/header/components/lock/LockModal.vue new file mode 100644 index 0000000..efc597e --- /dev/null +++ b/src/layouts/default/header/components/lock/LockModal.vue @@ -0,0 +1,125 @@ + + + diff --git a/src/layouts/default/header/components/notify/NoticeList.vue b/src/layouts/default/header/components/notify/NoticeList.vue new file mode 100644 index 0000000..de42306 --- /dev/null +++ b/src/layouts/default/header/components/notify/NoticeList.vue @@ -0,0 +1,232 @@ + + + diff --git a/src/layouts/default/header/components/notify/data.ts b/src/layouts/default/header/components/notify/data.ts new file mode 100644 index 0000000..0570923 --- /dev/null +++ b/src/layouts/default/header/components/notify/data.ts @@ -0,0 +1,206 @@ +export interface ListItem { + id: string; + avatar: string; + // 通知的标题内容 + title: string; + // 是否在标题上显示删除线 + titleDelete?: boolean; + datetime: string; + type: string; + read?: boolean; + description: string; + clickClose?: boolean; + extra?: string; + color?: string; + // 优先级 + priority?: string; +} + +export enum PriorityTypes { + // 低优先级,一般消息 + L = 'L', + // 中优先级,重要消息 + M = 'M', + // 高优先级,紧急消息 + H = 'H', +} + +export interface TabItem { + key: string; + name: string; + list: ListItem[]; + unreadlist?: ListItem[]; + count: number; +} + +export const tabListData: TabItem[] = [ + { + key: '1', + name: '通知', + list: [ + { + id: '000000001', + avatar: 'https://gw.alipayobjects.com/zos/rmsportal/ThXAXghbEsBCCSDihZxY.png', + title: '你收到了 14 份新周报', + description: '', + datetime: '2017-08-09', + type: '1', + }, + { + id: '000000002', + avatar: 'https://gw.alipayobjects.com/zos/rmsportal/OKJXDXrmkNshAMvwtvhu.png', + title: '你推荐的 曲妮妮 已通过第三轮面试', + description: '', + datetime: '2017-08-08', + type: '1', + }, + { + id: '000000003', + avatar: 'https://gw.alipayobjects.com/zos/rmsportal/kISTdvpyTAhtGxpovNWd.png', + title: '这种模板可以区分多种通知类型', + description: '', + datetime: '2017-08-07', + // read: true, + type: '1', + }, + { + id: '000000004', + avatar: 'https://gw.alipayobjects.com/zos/rmsportal/GvqBnKhFgObvnSGkDsje.png', + title: '左侧图标用于区分不同的类型', + description: '', + datetime: '2017-08-07', + type: '1', + }, + { + id: '000000005', + avatar: 'https://gw.alipayobjects.com/zos/rmsportal/GvqBnKhFgObvnSGkDsje.png', + title: '标题可以设置自动显示省略号,本例中标题行数已设为1行,如果内容超过1行将自动截断并支持tooltip显示完整标题。', + description: '', + datetime: '2017-08-07', + type: '1', + }, + { + id: '000000006', + avatar: 'https://gw.alipayobjects.com/zos/rmsportal/GvqBnKhFgObvnSGkDsje.png', + title: '左侧图标用于区分不同的类型', + description: '', + datetime: '2017-08-07', + type: '1', + }, + { + id: '000000007', + avatar: 'https://gw.alipayobjects.com/zos/rmsportal/GvqBnKhFgObvnSGkDsje.png', + title: '左侧图标用于区分不同的类型', + description: '', + datetime: '2017-08-07', + type: '1', + }, + { + id: '000000008', + avatar: 'https://gw.alipayobjects.com/zos/rmsportal/GvqBnKhFgObvnSGkDsje.png', + title: '左侧图标用于区分不同的类型', + description: '', + datetime: '2017-08-07', + type: '1', + }, + { + id: '000000009', + avatar: 'https://gw.alipayobjects.com/zos/rmsportal/GvqBnKhFgObvnSGkDsje.png', + title: '左侧图标用于区分不同的类型', + description: '', + datetime: '2017-08-07', + type: '1', + }, + { + id: '000000010', + avatar: 'https://gw.alipayobjects.com/zos/rmsportal/GvqBnKhFgObvnSGkDsje.png', + title: '左侧图标用于区分不同的类型', + description: '', + datetime: '2017-08-07', + type: '1', + }, + ], + count: 0, + }, + { + key: '2', + name: '系统消息', + list: [ + { + id: '000000006', + avatar: 'https://gw.alipayobjects.com/zos/rmsportal/fcHMVNCjPOsbUGdEduuv.jpeg', + title: '曲丽丽 评论了你', + description: '描述信息描述信息描述信息', + datetime: '2017-08-07', + type: '2', + clickClose: true, + }, + { + id: '000000007', + avatar: 'https://gw.alipayobjects.com/zos/rmsportal/fcHMVNCjPOsbUGdEduuv.jpeg', + title: '朱偏右 回复了你', + description: '这种模板用于提醒谁与你发生了互动', + datetime: '2017-08-07', + type: '2', + clickClose: true, + }, + { + id: '000000008', + avatar: 'https://gw.alipayobjects.com/zos/rmsportal/fcHMVNCjPOsbUGdEduuv.jpeg', + title: '标题', + description: + '请将鼠标移动到此处,以便测试超长的消息在此处将如何处理。本例中设置的描述最大行数为2,超过2行的描述内容将被省略并且可以通过tooltip查看完整内容', + datetime: '2017-08-07', + type: '2', + clickClose: true, + }, + ], + count: 0, + }, + // { + // key: '3', + // name: '待办', + // list: [ + // { + // id: '000000009', + // avatar: '', + // title: '任务名称', + // description: '任务需要在 2017-01-12 20:00 前启动', + // datetime: '', + // extra: '未开始', + // color: '', + // type: '3', + // }, + // { + // id: '000000010', + // avatar: '', + // title: '第三方紧急代码变更', + // description: '冠霖 需在 2017-01-07 前完成代码变更任务', + // datetime: '', + // extra: '马上到期', + // color: 'red', + // type: '3', + // }, + // { + // id: '000000011', + // avatar: '', + // title: '信息安全考试', + // description: '指派竹尔于 2017-01-09 前完成更新并发布', + // datetime: '', + // extra: '已耗时 8 天', + // color: 'gold', + // type: '3', + // }, + // { + // id: '000000012', + // avatar: '', + // title: 'ABCD 版本发布', + // description: '指派竹尔于 2017-01-09 前完成更新并发布', + // datetime: '', + // extra: '进行中', + // color: 'blue', + // type: '3', + // }, + // ], + // }, +]; diff --git a/src/layouts/default/header/components/notify/index.vue b/src/layouts/default/header/components/notify/index.vue new file mode 100644 index 0000000..e07f609 --- /dev/null +++ b/src/layouts/default/header/components/notify/index.vue @@ -0,0 +1,268 @@ + + + diff --git a/src/layouts/default/header/components/notify/index_old.vue b/src/layouts/default/header/components/notify/index_old.vue new file mode 100644 index 0000000..d68a495 --- /dev/null +++ b/src/layouts/default/header/components/notify/index_old.vue @@ -0,0 +1,272 @@ + + + diff --git a/src/layouts/default/header/components/notify/notify.api.ts b/src/layouts/default/header/components/notify/notify.api.ts new file mode 100644 index 0000000..7a196ad --- /dev/null +++ b/src/layouts/default/header/components/notify/notify.api.ts @@ -0,0 +1,27 @@ +import { defHttp } from '/@/utils/http/axios'; + +enum Api { + listCementByUser = '/sys/annountCement/listByUser', + getUnreadMessageCount = '/sys/annountCement/getUnreadMessageCount', + editCementSend = '/sys/sysAnnouncementSend/editByAnntIdAndUserId', + clearAllUnReadMessage = '/sys/annountCement/clearAllUnReadMessage', +} + +/** + * 获取系统通知消息列表 + * @param params + */ +export const listCementByUser = (params?) => defHttp.get({ url: Api.listCementByUser, params }); + +/** + * 获取用户近两个月未读消息数量 + * @param params + */ +export const getUnreadMessageCount = (params?) => defHttp.get({ url: Api.getUnreadMessageCount, params }); + +export const editCementSend = (anntId, params?) => defHttp.put({ url: Api.editCementSend, params: { anntId, ...params } }); + +/** + * 清空全部未读消息 + */ +export const clearAllUnReadMessage = () => defHttp.post({ url: Api.clearAllUnReadMessage },{ isTransformResponse: false }); diff --git a/src/layouts/default/header/components/user-dropdown/DepartSelect.vue b/src/layouts/default/header/components/user-dropdown/DepartSelect.vue new file mode 100644 index 0000000..d26e0d4 --- /dev/null +++ b/src/layouts/default/header/components/user-dropdown/DepartSelect.vue @@ -0,0 +1,271 @@ + + + diff --git a/src/layouts/default/header/components/user-dropdown/DropMenuItem.vue b/src/layouts/default/header/components/user-dropdown/DropMenuItem.vue new file mode 100644 index 0000000..7bc9d76 --- /dev/null +++ b/src/layouts/default/header/components/user-dropdown/DropMenuItem.vue @@ -0,0 +1,34 @@ + + diff --git a/src/layouts/default/header/components/user-dropdown/UpdatePassword.vue b/src/layouts/default/header/components/user-dropdown/UpdatePassword.vue new file mode 100644 index 0000000..b0962a6 --- /dev/null +++ b/src/layouts/default/header/components/user-dropdown/UpdatePassword.vue @@ -0,0 +1,100 @@ + + diff --git a/src/layouts/default/header/components/user-dropdown/index.vue b/src/layouts/default/header/components/user-dropdown/index.vue new file mode 100644 index 0000000..a62abf4 --- /dev/null +++ b/src/layouts/default/header/components/user-dropdown/index.vue @@ -0,0 +1,258 @@ + + + diff --git a/src/layouts/default/header/index.less b/src/layouts/default/header/index.less new file mode 100644 index 0000000..0860487 --- /dev/null +++ b/src/layouts/default/header/index.less @@ -0,0 +1,200 @@ +@header-trigger-prefix-cls: ~'@{namespace}-layout-header-trigger'; +@header-prefix-cls: ~'@{namespace}-layout-header'; +@breadcrumb-prefix-cls: ~'@{namespace}-layout-breadcrumb'; +@logo-prefix-cls: ~'@{namespace}-app-logo'; + +.@{header-prefix-cls} { + display: flex; + height: @header-height; + padding: 0; + margin-left: -1px; + line-height: @header-height; + color: @white; + background-color: @white; + align-items: center; + justify-content: space-between; + + &--mobile { + .@{breadcrumb-prefix-cls}, + .error-action, + .notify-item, + .lock-item, + .fullscreen-item { + display: none; + } + + .@{logo-prefix-cls} { + min-width: unset; + padding-right: 0; + + &__title { + display: none; + } + } + + .@{header-trigger-prefix-cls} { + padding: 0 4px 0 8px !important; + } + + .@{header-prefix-cls}-action { + padding-right: 4px; + } + } + + &--fixed { + position: fixed; + top: 0; + left: 0; + z-index: @layout-header-fixed-z-index; + width: 100%; + } + + &-logo { + height: @header-height; + min-width: 192px; + padding: 0 10px; + font-size: 14px; + + img { + width: @logo-width; + height: @logo-width; + margin-right: 2px; + } + } + + &-left { + display: flex; + height: 100%; + align-items: center; + + .@{header-trigger-prefix-cls} { + display: flex; + height: 100%; + padding: 1px 10px 0 10px; + cursor: pointer; + align-items: center; + + .anticon { + font-size: 22px; + } + + &.light { + &:hover { + background-color: @header-light-bg-hover-color; + } + + svg { + fill: #000; + } + } + + &.dark { + &:hover { + background-color: @header-dark-bg-hover-color; + } + } + } + } + + &-menu { + height: 100%; + min-width: 0; + flex: 1; + align-items: center; + } + + &-action { + display: flex; + min-width: 180px; + // padding-right: 12px; + align-items: center; + + &__item { + display: flex !important; + height: @header-height; + padding: 0 2px; + font-size: 1.2em; + cursor: pointer; + align-items: center; + + .ant-badge { + height: @header-height; + line-height: @header-height; + } + + .ant-badge-dot { + top: 10px; + right: 2px; + } + } + + span[role='img'] { + padding: 0 8px; + } + } + + &--light { + background-color: @white !important; + border-bottom: 1px solid @header-light-bottom-border-color; + border-left: 1px solid @header-light-bottom-border-color; + + .@{header-prefix-cls}-logo { + color: @text-color-base; + + &:hover { + background-color: @header-light-bg-hover-color; + } + } + + .@{header-prefix-cls}-action { + &__item { + color: @text-color-base; + + .app-iconify { + padding: 0 10px; + font-size: 16px !important; + } + + &:hover { + background-color: @header-light-bg-hover-color; + } + } + + &-icon, + span[role='img'] { + color: @text-color-base; + } + } + } + + &--dark { + background-color: @header-dark-bg-color !important; + // border-bottom: 1px solid @border-color-base; + border-left: 1px solid @border-color-base; + + .@{header-prefix-cls}-logo { + &:hover { + background-color: @header-dark-bg-hover-color; + } + } + + .@{header-prefix-cls}-action { + &__item { + .app-iconify { + padding: 0 10px; + font-size: 16px !important; + } + + .ant-badge { + span { + color: @white; + } + } + + &:hover { + background-color: @header-dark-bg-hover-color; + } + } + } + } +} diff --git a/src/layouts/default/header/index.vue b/src/layouts/default/header/index.vue new file mode 100644 index 0000000..15fe17d --- /dev/null +++ b/src/layouts/default/header/index.vue @@ -0,0 +1,261 @@ + + + diff --git a/src/layouts/default/index.vue b/src/layouts/default/index.vue new file mode 100644 index 0000000..c8fe28c --- /dev/null +++ b/src/layouts/default/index.vue @@ -0,0 +1,92 @@ + + + + diff --git a/src/layouts/default/menu/index.vue b/src/layouts/default/menu/index.vue new file mode 100644 index 0000000..9d7391f --- /dev/null +++ b/src/layouts/default/menu/index.vue @@ -0,0 +1,206 @@ + + + diff --git a/src/layouts/default/menu/useLayoutMenu.ts b/src/layouts/default/menu/useLayoutMenu.ts new file mode 100644 index 0000000..8375d3b --- /dev/null +++ b/src/layouts/default/menu/useLayoutMenu.ts @@ -0,0 +1,107 @@ +import type { Menu } from '/@/router/types'; +import type { Ref } from 'vue'; +import { watch, unref, ref, computed } from 'vue'; +import { useRouter } from 'vue-router'; +import { MenuSplitTyeEnum } from '/@/enums/menuEnum'; +import { useThrottleFn } from '@vueuse/core'; +import { useMenuSetting } from '/@/hooks/setting/useMenuSetting'; +import { getChildrenMenus, getCurrentParentPath, getMenus, getShallowMenus } from '/@/router/menus'; +import { usePermissionStore } from '/@/store/modules/permission'; +import { useAppInject } from '/@/hooks/web/useAppInject'; + +export function useSplitMenu(splitType: Ref) { + // Menu array + const menusRef = ref([]); + const { currentRoute } = useRouter(); + const { getIsMobile } = useAppInject(); + const permissionStore = usePermissionStore(); + const { setMenuSetting, getIsHorizontal, getSplit } = useMenuSetting(); + + const throttleHandleSplitLeftMenu = useThrottleFn(handleSplitLeftMenu, 50); + + const splitNotLeft = computed(() => unref(splitType) !== MenuSplitTyeEnum.LEFT && !unref(getIsHorizontal)); + + const getSplitLeft = computed(() => !unref(getSplit) || unref(splitType) !== MenuSplitTyeEnum.LEFT); + + const getSpiltTop = computed(() => unref(splitType) === MenuSplitTyeEnum.TOP); + + const normalType = computed(() => { + return unref(splitType) === MenuSplitTyeEnum.NONE || !unref(getSplit); + }); + + watch( + [() => unref(currentRoute).path, () => unref(splitType)], + async ([path]: [string, MenuSplitTyeEnum]) => { + if (unref(splitNotLeft) || unref(getIsMobile)) return; + + const { meta } = unref(currentRoute); + const currentActiveMenu = meta.currentActiveMenu as string; + let parentPath = await getCurrentParentPath(path); + if (!parentPath) { + parentPath = await getCurrentParentPath(currentActiveMenu); + } + parentPath && throttleHandleSplitLeftMenu(parentPath); + }, + { + immediate: true, + } + ); + + // Menu changes + watch( + [() => permissionStore.getLastBuildMenuTime, () => permissionStore.getBackMenuList], + () => { + genMenus(); + }, + { + immediate: true, + } + ); + + // split Menu changes + watch( + () => getSplit.value, + () => { + // update-begin--author:liaozhiyang---date:20240919---for:【issues/7209】顶部左侧组合菜单关闭之后左侧导航没还原 + // if (unref(splitNotLeft)) return; + // update-end--author:liaozhiyang---date:20240919---for:【issues/7209】顶部左侧组合菜单关闭之后左侧导航没还原 + genMenus(); + } + ); + + // Handle left menu split + async function handleSplitLeftMenu(parentPath: string) { + if (unref(getSplitLeft) || unref(getIsMobile)) return; + + // spilt mode left + const children = await getChildrenMenus(parentPath); + + if (!children || !children.length) { + setMenuSetting({ hidden: true }); + menusRef.value = []; + return; + } + + setMenuSetting({ hidden: false }); + menusRef.value = children; + } + + // get menus + async function genMenus() { + // normal mode + if (unref(normalType) || unref(getIsMobile)) { + menusRef.value = await getMenus(); + return; + } + + // split-top + if (unref(getSpiltTop)) { + const shallowMenus = await getShallowMenus(); + + menusRef.value = shallowMenus; + return; + } + } + + return { menusRef }; +} diff --git a/src/layouts/default/setting/SettingDrawer.tsx b/src/layouts/default/setting/SettingDrawer.tsx new file mode 100644 index 0000000..ff43bca --- /dev/null +++ b/src/layouts/default/setting/SettingDrawer.tsx @@ -0,0 +1,367 @@ +import { defineComponent, computed, unref } from 'vue'; +import { BasicDrawer } from '/@/components/Drawer/index'; +import { Divider } from 'ant-design-vue'; +import { TypePicker, ThemeColorPicker, SettingFooter, SwitchItem, SelectItem, InputNumberItem } from './components'; + +import { AppDarkModeToggle } from '/@/components/Application'; + +import { MenuTypeEnum, TriggerEnum } from '/@/enums/menuEnum'; + +import { useRootSetting } from '/@/hooks/setting/useRootSetting'; +import { useMenuSetting } from '/@/hooks/setting/useMenuSetting'; +import { useHeaderSetting } from '/@/hooks/setting/useHeaderSetting'; +import { useMultipleTabSetting } from '/@/hooks/setting/useMultipleTabSetting'; +import { useTransitionSetting } from '/@/hooks/setting/useTransitionSetting'; +import { useI18n } from '/@/hooks/web/useI18n'; + +import { layoutHandler } from './handler'; + +import { + HandlerEnum, + contentModeOptions, + topMenuAlignOptions, + getMenuTriggerOptions, + routerTransitionOptions, + menuTypeList, + mixSidebarTriggerOptions, + tabsThemeOptions, +} from './enum'; + +import { HEADER_PRESET_BG_COLOR_LIST, SIDE_BAR_BG_COLOR_LIST, APP_PRESET_COLOR_LIST } from '/@/settings/designSetting'; + +const { t } = useI18n(); + +export default defineComponent({ + name: 'SettingDrawer', + setup(_, { attrs }) { + const { + getContentMode, + getShowFooter, + getShowBreadCrumb, + getShowBreadCrumbIcon, + getShowLogo, + getFullContent, + getColorWeak, + getGrayMode, + getLockTime, + getShowDarkModeToggle, + getThemeColor, + getAiIconShow, + } = useRootSetting(); + + const { getOpenPageLoading, getBasicTransition, getEnableTransition, getOpenNProgress } = useTransitionSetting(); + + const { + getIsHorizontal, + getShowMenu, + getMenuType, + getTrigger, + getCollapsedShowTitle, + getMenuFixed, + getCollapsed, + getCanDrag, + getTopMenuAlign, + getAccordion, + getMenuWidth, + getMenuBgColor, + getIsTopMenu, + getSplit, + getIsMixSidebar, + getCloseMixSidebarOnChange, + getMixSideTrigger, + getMixSideFixed, + } = useMenuSetting(); + + const { getShowHeader, getFixed: getHeaderFixed, getHeaderBgColor, getShowSearch } = useHeaderSetting(); + + const { getShowMultipleTab, getShowQuick, getShowRedo, getShowFold, getTabsTheme } = useMultipleTabSetting(); + + const getShowMenuRef = computed(() => { + return unref(getShowMenu) && !unref(getIsHorizontal); + }); + + const isDev= import.meta.env.DEV + + function renderSidebar() { + return ( + <> + { + layoutHandler(HandlerEnum.CHANGE_LAYOUT, { + mode: item.mode, + type: item.type, + split: unref(getIsHorizontal) ? false : undefined, + }); + }} + def={unref(getMenuType)} + /> + + ); + } + + function renderHeaderTheme() { + return ; + } + + function renderSiderTheme() { + return ; + } + + function renderMainTheme() { + return ; + } + + /** + * @description: + */ + function renderFeatures() { + let triggerDef = unref(getTrigger); + + const triggerOptions = getMenuTriggerOptions(unref(getSplit)); + const some = triggerOptions.some((item) => item.value === triggerDef); + if (!some) { + triggerDef = TriggerEnum.FOOTER; + } + + return ( + <> + + {/**/} + + {/**/} + {/**/} + + {/**/} + {/**/} + + {/**/} + {/**/} + {/**/} + + + + { + isDev && + } + { + isDev && { + return parseInt(value) === 0 ? `0(${t('layout.setting.notAutoScreenLock')})` : `${value}${t('layout.setting.minute')}`; + }} + /> + } + { + isDev && `${parseInt(value)}px`} + /> + } + + ); + } + + function renderContent() { + return ( + <> + { + isDev && + } + { + isDev && + } + + + + {/**/} + + {/**/} + + {/**/} + {/**/} + + {/**/} + + {/**/} + {/**/} + + {/**/} + + + + + + + + ); + } + + function renderTransition() { + return ( + <> + + + + + + + + ); + } + + return () => ( + + {unref(getShowDarkModeToggle) && {() => t('layout.setting.darkMode')}} + {unref(getShowDarkModeToggle) && } + {() => t('layout.setting.navMode')} + {renderSidebar()} + {() => t('layout.setting.sysTheme')} + {renderMainTheme()} + {() => t('layout.setting.headerTheme')} + {renderHeaderTheme()} + {() => t('layout.setting.sidebarTheme')} + {renderSiderTheme()} + {() => t('layout.setting.interfaceFunction')} + {renderFeatures()} + {/*{() => t('layout.setting.interfaceDisplay')}*/} + {renderContent()} + {/*{() => t('layout.setting.animation')}*/} + {/*{renderTransition()}*/} + + + + ); + }, +}); diff --git a/src/layouts/default/setting/components/InputNumberItem.vue b/src/layouts/default/setting/components/InputNumberItem.vue new file mode 100644 index 0000000..237f7d6 --- /dev/null +++ b/src/layouts/default/setting/components/InputNumberItem.vue @@ -0,0 +1,56 @@ + + + diff --git a/src/layouts/default/setting/components/SelectItem.vue b/src/layouts/default/setting/components/SelectItem.vue new file mode 100644 index 0000000..393c78a --- /dev/null +++ b/src/layouts/default/setting/components/SelectItem.vue @@ -0,0 +1,73 @@ + + + diff --git a/src/layouts/default/setting/components/SettingFooter.vue b/src/layouts/default/setting/components/SettingFooter.vue new file mode 100644 index 0000000..54471a9 --- /dev/null +++ b/src/layouts/default/setting/components/SettingFooter.vue @@ -0,0 +1,99 @@ + + + diff --git a/src/layouts/default/setting/components/SwitchItem.vue b/src/layouts/default/setting/components/SwitchItem.vue new file mode 100644 index 0000000..09962f4 --- /dev/null +++ b/src/layouts/default/setting/components/SwitchItem.vue @@ -0,0 +1,71 @@ + + + diff --git a/src/layouts/default/setting/components/ThemeColorPicker.vue b/src/layouts/default/setting/components/ThemeColorPicker.vue new file mode 100644 index 0000000..3a3f631 --- /dev/null +++ b/src/layouts/default/setting/components/ThemeColorPicker.vue @@ -0,0 +1,112 @@ + + + diff --git a/src/layouts/default/setting/components/TypePicker.vue b/src/layouts/default/setting/components/TypePicker.vue new file mode 100644 index 0000000..ab46aa8 --- /dev/null +++ b/src/layouts/default/setting/components/TypePicker.vue @@ -0,0 +1,178 @@ + + + diff --git a/src/layouts/default/setting/components/index.ts b/src/layouts/default/setting/components/index.ts new file mode 100644 index 0000000..bd24888 --- /dev/null +++ b/src/layouts/default/setting/components/index.ts @@ -0,0 +1,8 @@ +import { createAsyncComponent } from '/@/utils/factory/createAsyncComponent'; + +export const TypePicker = createAsyncComponent(() => import('./TypePicker.vue')); +export const ThemeColorPicker = createAsyncComponent(() => import('./ThemeColorPicker.vue')); +export const SettingFooter = createAsyncComponent(() => import('./SettingFooter.vue')); +export const SwitchItem = createAsyncComponent(() => import('./SwitchItem.vue')); +export const SelectItem = createAsyncComponent(() => import('./SelectItem.vue')); +export const InputNumberItem = createAsyncComponent(() => import('./InputNumberItem.vue')); diff --git a/src/layouts/default/setting/enum.ts b/src/layouts/default/setting/enum.ts new file mode 100644 index 0000000..8111d8e --- /dev/null +++ b/src/layouts/default/setting/enum.ts @@ -0,0 +1,168 @@ +import { TabsThemeEnum, ContentEnum, RouterTransitionEnum } from '/@/enums/appEnum'; +import { MenuModeEnum, MenuTypeEnum, TopMenuAlignEnum, TriggerEnum, MixSidebarTriggerEnum } from '/@/enums/menuEnum'; + +import { useI18n } from '/@/hooks/web/useI18n'; + +const { t } = useI18n(); + +export enum HandlerEnum { + CHANGE_LAYOUT, + CHANGE_THEME_COLOR, + CHANGE_THEME, + // menu + MENU_HAS_DRAG, + MENU_ACCORDION, + MENU_TRIGGER, + MENU_TOP_ALIGN, + MENU_COLLAPSED, + MENU_COLLAPSED_SHOW_TITLE, + MENU_WIDTH, + MENU_SHOW_SIDEBAR, + MENU_THEME, + MENU_SPLIT, + MENU_FIXED, + MENU_CLOSE_MIX_SIDEBAR_ON_CHANGE, + MENU_TRIGGER_MIX_SIDEBAR, + MENU_FIXED_MIX_SIDEBAR, + + // header + HEADER_SHOW, + HEADER_THEME, + HEADER_FIXED, + + HEADER_SEARCH, + + TABS_SHOW_QUICK, + TABS_SHOW_REDO, + TABS_SHOW, + TABS_SHOW_FOLD, + TABS_THEME, + + LOCK_TIME, + FULL_CONTENT, + CONTENT_MODE, + SHOW_BREADCRUMB, + SHOW_BREADCRUMB_ICON, + GRAY_MODE, + COLOR_WEAK, + SHOW_LOGO, + SHOW_FOOTER, + + ROUTER_TRANSITION, + OPEN_PROGRESS, + OPEN_PAGE_LOADING, + OPEN_ROUTE_TRANSITION, + AI_ICON_SHOW, +} + +// 标签页样式 +export const tabsThemeOptions = [ + { + value: TabsThemeEnum.SMOOTH, + label: t('layout.setting.tabsThemeSmooth'), + }, + { + value: TabsThemeEnum.CARD, + label: t('layout.setting.tabsThemeCard'), + }, + { + value: TabsThemeEnum.SIMPLE, + label: t('layout.setting.tabsThemeSimple'), + }, +]; + +export const contentModeOptions = [ + { + value: ContentEnum.FULL, + label: t('layout.setting.contentModeFull'), + }, + { + value: ContentEnum.FIXED, + label: t('layout.setting.contentModeFixed'), + }, +]; + +export const topMenuAlignOptions = [ + { + value: TopMenuAlignEnum.CENTER, + label: t('layout.setting.topMenuAlignRight'), + }, + { + value: TopMenuAlignEnum.START, + label: t('layout.setting.topMenuAlignLeft'), + }, + { + value: TopMenuAlignEnum.END, + label: t('layout.setting.topMenuAlignCenter'), + }, +]; + +export const getMenuTriggerOptions = (hideTop: boolean) => { + return [ + { + value: TriggerEnum.NONE, + label: t('layout.setting.menuTriggerNone'), + }, + { + value: TriggerEnum.FOOTER, + label: t('layout.setting.menuTriggerBottom'), + }, + ...(hideTop + ? [] + : [ + { + value: TriggerEnum.HEADER, + label: t('layout.setting.menuTriggerTop'), + }, + ]), + ]; +}; + +export const routerTransitionOptions = [ + RouterTransitionEnum.ZOOM_FADE, + RouterTransitionEnum.FADE, + RouterTransitionEnum.ZOOM_OUT, + RouterTransitionEnum.FADE_SIDE, + RouterTransitionEnum.FADE_BOTTOM, + RouterTransitionEnum.FADE_SCALE, +].map((item) => { + return { + label: item, + value: item, + }; +}); + +export const menuTypeList = [ + { + title: t('layout.setting.menuTypeSidebar'), + mode: MenuModeEnum.INLINE, + type: MenuTypeEnum.SIDEBAR, + }, + { + title: t('layout.setting.menuTypeMix'), + mode: MenuModeEnum.INLINE, + type: MenuTypeEnum.MIX, + }, + + { + title: t('layout.setting.menuTypeTopMenu'), + mode: MenuModeEnum.HORIZONTAL, + type: MenuTypeEnum.TOP_MENU, + }, + { + title: t('layout.setting.menuTypeMixSidebar'), + mode: MenuModeEnum.INLINE, + type: MenuTypeEnum.MIX_SIDEBAR, + }, +]; + +export const mixSidebarTriggerOptions = [ + { + value: MixSidebarTriggerEnum.HOVER, + label: t('layout.setting.triggerHover'), + }, + { + value: MixSidebarTriggerEnum.CLICK, + label: t('layout.setting.triggerClick'), + }, +]; diff --git a/src/layouts/default/setting/handler.ts b/src/layouts/default/setting/handler.ts new file mode 100644 index 0000000..05c909d --- /dev/null +++ b/src/layouts/default/setting/handler.ts @@ -0,0 +1,241 @@ +import { HandlerEnum, tabsThemeOptions} from './enum'; +import { updateHeaderBgColor, updateSidebarBgColor } from '/@/logics/theme/updateBackground'; +import { updateColorWeak } from '/@/logics/theme/updateColorWeak'; +import { updateGrayMode } from '/@/logics/theme/updateGrayMode'; + +import { useAppStore } from '/@/store/modules/app'; +import { ProjectConfig } from '/#/config'; +import { changeTheme } from '/@/logics/theme'; +import { updateDarkTheme } from '/@/logics/theme/dark'; +import { useRootSetting } from '/@/hooks/setting/useRootSetting'; +import { MenuModeEnum, MenuTypeEnum } from '/@/enums/menuEnum'; +import { HEADER_PRESET_BG_COLOR_LIST, APP_PRESET_COLOR_LIST, SIDE_BAR_BG_COLOR_LIST } from '/@/settings/designSetting'; +import { isObject } from '/@/utils/is'; +import { ThemeEnum } from '/@/enums/appEnum'; +import { APP__THEME__COLOR } from '/@/enums/cacheEnum'; + +/** + * 2024-04-07 + * liaozhiyang + * 切换导航栏模式都走这个方法,每个模式都会有固定的顶部和菜单颜色搭配。暗黑模式则不走固定搭配 + * */ +export function layoutHandler(event: HandlerEnum, value: any) { + const isHTopMenu = isObject(value) && value.type == MenuTypeEnum.TOP_MENU && value.mode == MenuModeEnum.HORIZONTAL; + const isMixMenu = isObject(value) && value.type == MenuTypeEnum.MIX && value.mode == MenuModeEnum.INLINE; + const isMixSidebarMenu = isObject(value) && value.type == MenuTypeEnum.MIX_SIDEBAR && value.mode == MenuModeEnum.INLINE; + const appStore = useAppStore(); + const darkMode = appStore.getDarkMode === ThemeEnum.DARK; + if (isHTopMenu) { + baseHandler(event, value); + baseHandler(HandlerEnum.HEADER_THEME, HEADER_PRESET_BG_COLOR_LIST[2]); + baseHandler(HandlerEnum.CHANGE_THEME_COLOR, APP_PRESET_COLOR_LIST[2]); + if (darkMode) { + updateHeaderBgColor(); + updateSidebarBgColor(); + } + baseHandler(HandlerEnum.TABS_THEME, tabsThemeOptions[1].value); + } else if (isMixMenu) { + baseHandler(event, value); + baseHandler(HandlerEnum.HEADER_THEME, HEADER_PRESET_BG_COLOR_LIST[4]); + baseHandler(HandlerEnum.MENU_THEME, SIDE_BAR_BG_COLOR_LIST[3]); + if (darkMode) { + updateHeaderBgColor(); + updateSidebarBgColor(); + } + baseHandler(HandlerEnum.CHANGE_THEME_COLOR, APP_PRESET_COLOR_LIST[1]); + baseHandler(HandlerEnum.TABS_THEME, tabsThemeOptions[1].value); + } else if (isMixSidebarMenu) { + baseHandler(event, value); + baseHandler(HandlerEnum.CHANGE_THEME_COLOR, APP_PRESET_COLOR_LIST[1]); + baseHandler(HandlerEnum.HEADER_THEME, HEADER_PRESET_BG_COLOR_LIST[0]); + baseHandler(HandlerEnum.MENU_THEME, SIDE_BAR_BG_COLOR_LIST[0]); + if (darkMode) { + updateHeaderBgColor(); + updateSidebarBgColor(); + } + baseHandler(HandlerEnum.TABS_THEME, tabsThemeOptions[1].value); + } else { + baseHandler(event, value); + baseHandler(HandlerEnum.HEADER_THEME, HEADER_PRESET_BG_COLOR_LIST[4]); + baseHandler(HandlerEnum.MENU_THEME, SIDE_BAR_BG_COLOR_LIST[7]); + if (darkMode) { + updateHeaderBgColor(); + updateSidebarBgColor(); + } + baseHandler(HandlerEnum.CHANGE_THEME_COLOR, APP_PRESET_COLOR_LIST[1]); + baseHandler(HandlerEnum.TABS_THEME, tabsThemeOptions[1].value); + } +} + +export function baseHandler(event: HandlerEnum, value: any) { + const appStore = useAppStore(); + const config = handler(event, value); + appStore.setProjectConfig(config); + if (event === HandlerEnum.CHANGE_THEME) { + updateHeaderBgColor(); + updateSidebarBgColor(); + } +} + +export function handler(event: HandlerEnum, value: any): DeepPartial { + const appStore = useAppStore(); + + const { getThemeColor, getDarkMode } = useRootSetting(); + switch (event) { + case HandlerEnum.CHANGE_LAYOUT: + const { mode, type, split } = value; + const splitOpt = split === undefined ? { split } : {}; + + return { + menuSetting: { + mode, + type, + collapsed: false, + show: true, + hidden: false, + ...splitOpt, + }, + }; + + case HandlerEnum.CHANGE_THEME_COLOR: + if (getThemeColor.value === value) { + return {}; + } + // update-begin--author:liaozhiyang---date:20240417---for:【QQYUN-8925】系统主题颜色(供页面加载使用) + localStorage.setItem(APP__THEME__COLOR, value); + // update-end--author:liaozhiyang---date:20240417---for:【QQYUN-8925】系统主题颜色(供页面加载使用) + changeTheme(value); + + return { themeColor: value }; + + case HandlerEnum.CHANGE_THEME: + if (getDarkMode.value === value) { + return {}; + } + updateDarkTheme(value); + + return {}; + + case HandlerEnum.MENU_HAS_DRAG: + return { menuSetting: { canDrag: value } }; + + case HandlerEnum.MENU_ACCORDION: + return { menuSetting: { accordion: value } }; + + case HandlerEnum.MENU_TRIGGER: + return { menuSetting: { trigger: value } }; + + case HandlerEnum.MENU_TOP_ALIGN: + return { menuSetting: { topMenuAlign: value } }; + + case HandlerEnum.MENU_COLLAPSED: + return { menuSetting: { collapsed: value } }; + + case HandlerEnum.MENU_WIDTH: + return { menuSetting: { menuWidth: value } }; + + case HandlerEnum.MENU_SHOW_SIDEBAR: + return { menuSetting: { show: value } }; + + case HandlerEnum.MENU_COLLAPSED_SHOW_TITLE: + return { menuSetting: { collapsedShowTitle: value } }; + + case HandlerEnum.MENU_THEME: + updateSidebarBgColor(value); + return { menuSetting: { bgColor: value } }; + + case HandlerEnum.MENU_SPLIT: + return { menuSetting: { split: value } }; + + case HandlerEnum.MENU_CLOSE_MIX_SIDEBAR_ON_CHANGE: + return { menuSetting: { closeMixSidebarOnChange: value } }; + + case HandlerEnum.MENU_FIXED: + return { menuSetting: { fixed: value } }; + + case HandlerEnum.MENU_TRIGGER_MIX_SIDEBAR: + return { menuSetting: { mixSideTrigger: value } }; + + case HandlerEnum.MENU_FIXED_MIX_SIDEBAR: + return { menuSetting: { mixSideFixed: value } }; + + // ============transition================== + case HandlerEnum.OPEN_PAGE_LOADING: + appStore.setPageLoading(false); + return { transitionSetting: { openPageLoading: value } }; + + case HandlerEnum.ROUTER_TRANSITION: + return { transitionSetting: { basicTransition: value } }; + + case HandlerEnum.OPEN_ROUTE_TRANSITION: + return { transitionSetting: { enable: value } }; + + case HandlerEnum.OPEN_PROGRESS: + return { transitionSetting: { openNProgress: value } }; + // ============root================== + + case HandlerEnum.LOCK_TIME: + return { lockTime: value }; + + case HandlerEnum.FULL_CONTENT: + return { fullContent: value }; + + case HandlerEnum.CONTENT_MODE: + return { contentMode: value }; + + case HandlerEnum.SHOW_BREADCRUMB: + return { showBreadCrumb: value }; + + case HandlerEnum.SHOW_BREADCRUMB_ICON: + return { showBreadCrumbIcon: value }; + + case HandlerEnum.GRAY_MODE: + updateGrayMode(value); + return { grayMode: value }; + + case HandlerEnum.SHOW_FOOTER: + return { showFooter: value }; + + case HandlerEnum.COLOR_WEAK: + updateColorWeak(value); + return { colorWeak: value }; + // update-begin--author:liaozhiyang---date:20250407---for:【QQYUN-10952】AI助手支持通过设置来配置是否显示 + case HandlerEnum.AI_ICON_SHOW: + return { aiIconShow: value }; + // update-end--author:liaozhiyang---date:20250407---for:【QQYUN-10952】AI助手支持通过设置来配置是否显示 + case HandlerEnum.SHOW_LOGO: + return { showLogo: value }; + + // ============tabs================== + case HandlerEnum.TABS_SHOW_QUICK: + return { multiTabsSetting: { showQuick: value } }; + + case HandlerEnum.TABS_SHOW: + return { multiTabsSetting: { show: value } }; + + case HandlerEnum.TABS_SHOW_REDO: + return { multiTabsSetting: { showRedo: value } }; + + case HandlerEnum.TABS_SHOW_FOLD: + return { multiTabsSetting: { showFold: value } }; + + case HandlerEnum.TABS_THEME: + return { multiTabsSetting: { theme: value } }; + + // ============header================== + case HandlerEnum.HEADER_THEME: + updateHeaderBgColor(value); + return { headerSetting: { bgColor: value } }; + + case HandlerEnum.HEADER_SEARCH: + return { headerSetting: { showSearch: value } }; + + case HandlerEnum.HEADER_FIXED: + return { headerSetting: { fixed: value } }; + + case HandlerEnum.HEADER_SHOW: + return { headerSetting: { show: value } }; + default: + return {}; + } +} diff --git a/src/layouts/default/setting/index.vue b/src/layouts/default/setting/index.vue new file mode 100644 index 0000000..9c5bb87 --- /dev/null +++ b/src/layouts/default/setting/index.vue @@ -0,0 +1,26 @@ + + diff --git a/src/layouts/default/sider/DragBar.vue b/src/layouts/default/sider/DragBar.vue new file mode 100644 index 0000000..3bc6fb9 --- /dev/null +++ b/src/layouts/default/sider/DragBar.vue @@ -0,0 +1,66 @@ + + + diff --git a/src/layouts/default/sider/LayoutSider.vue b/src/layouts/default/sider/LayoutSider.vue new file mode 100644 index 0000000..d785280 --- /dev/null +++ b/src/layouts/default/sider/LayoutSider.vue @@ -0,0 +1,189 @@ + + + diff --git a/src/layouts/default/sider/MixSider.vue b/src/layouts/default/sider/MixSider.vue new file mode 100644 index 0000000..4e333e1 --- /dev/null +++ b/src/layouts/default/sider/MixSider.vue @@ -0,0 +1,594 @@ + + + diff --git a/src/layouts/default/sider/index.vue b/src/layouts/default/sider/index.vue new file mode 100644 index 0000000..546a4cd --- /dev/null +++ b/src/layouts/default/sider/index.vue @@ -0,0 +1,57 @@ + + + diff --git a/src/layouts/default/sider/useLayoutSider.ts b/src/layouts/default/sider/useLayoutSider.ts new file mode 100644 index 0000000..48f2814 --- /dev/null +++ b/src/layouts/default/sider/useLayoutSider.ts @@ -0,0 +1,133 @@ +import type { Ref } from 'vue'; + +import { computed, unref, onMounted, nextTick, ref } from 'vue'; + +import { TriggerEnum } from '/@/enums/menuEnum'; + +import { useMenuSetting } from '/@/hooks/setting/useMenuSetting'; +import { useDebounceFn } from '@vueuse/core'; + +/** + * Handle related operations of menu events + */ +export function useSiderEvent() { + const brokenRef = ref(false); + + const { getMiniWidthNumber } = useMenuSetting(); + + const getCollapsedWidth = computed(() => { + return unref(brokenRef) ? 0 : unref(getMiniWidthNumber); + }); + + function onBreakpointChange(broken: boolean) { + brokenRef.value = broken; + } + + return { getCollapsedWidth, onBreakpointChange }; +} + +/** + * Handle related operations of menu folding + */ +export function useTrigger(getIsMobile: Ref) { + const { getTrigger, getSplit } = useMenuSetting(); + + const getShowTrigger = computed(() => { + const trigger = unref(getTrigger); + + return trigger !== TriggerEnum.NONE && !unref(getIsMobile) && (trigger === TriggerEnum.FOOTER || unref(getSplit)); + }); + + const getTriggerAttr = computed(() => { + if (unref(getShowTrigger)) { + return {}; + } + return { + trigger: null, + }; + }); + + return { getTriggerAttr, getShowTrigger }; +} + +/** + * Handle menu drag and drop related operations + * @param siderRef + * @param dragBarRef + */ +export function useDragLine(siderRef: Ref, dragBarRef: Ref, mix = false) { + const { getMiniWidthNumber, getCollapsed, setMenuSetting } = useMenuSetting(); + + onMounted(() => { + nextTick(() => { + const exec = useDebounceFn(changeWrapWidth, 80); + exec(); + }); + }); + + function getEl(elRef: Ref): any { + const el = unref(elRef); + if (!el) return null; + if (Reflect.has(el, '$el')) { + return (unref(elRef) as ComponentRef)?.$el; + } + return unref(elRef); + } + + function handleMouseMove(ele: HTMLElement, wrap: HTMLElement, clientX: number) { + document.onmousemove = function (innerE) { + let iT = (ele as any).left + (innerE.clientX - clientX); + innerE = innerE || window.event; + const maxT = 800; + const minT = unref(getMiniWidthNumber); + iT < 0 && (iT = 0); + iT > maxT && (iT = maxT); + iT < minT && (iT = minT); + ele.style.left = wrap.style.width = iT + 'px'; + return false; + }; + } + + // Drag and drop in the menu area-release the mouse + function removeMouseup(ele: any) { + const wrap = getEl(siderRef); + document.onmouseup = function () { + document.onmousemove = null; + document.onmouseup = null; + wrap.style.transition = 'width 0.2s'; + const width = parseInt(wrap.style.width); + + if (!mix) { + const miniWidth = unref(getMiniWidthNumber); + if (!unref(getCollapsed)) { + width > miniWidth + 20 ? setMenuSetting({ menuWidth: width }) : setMenuSetting({ collapsed: true }); + } else { + width > miniWidth && setMenuSetting({ collapsed: false, menuWidth: width }); + } + } else { + setMenuSetting({ menuWidth: width }); + } + + ele.releaseCapture?.(); + }; + } + + function changeWrapWidth() { + const ele = getEl(dragBarRef); + if (!ele) return; + const wrap = getEl(siderRef); + if (!wrap) return; + + ele.onmousedown = (e: any) => { + wrap.style.transition = 'unset'; + const clientX = e?.clientX; + ele.left = ele.offsetLeft; + handleMouseMove(ele, wrap, clientX); + removeMouseup(ele); + ele.setCapture?.(); + return false; + }; + } + + return {}; +} diff --git a/src/layouts/default/tabs/components/FoldButton.vue b/src/layouts/default/tabs/components/FoldButton.vue new file mode 100644 index 0000000..6ed5b36 --- /dev/null +++ b/src/layouts/default/tabs/components/FoldButton.vue @@ -0,0 +1,40 @@ + + diff --git a/src/layouts/default/tabs/components/TabContent.vue b/src/layouts/default/tabs/components/TabContent.vue new file mode 100644 index 0000000..4299fc7 --- /dev/null +++ b/src/layouts/default/tabs/components/TabContent.vue @@ -0,0 +1,112 @@ + + + diff --git a/src/layouts/default/tabs/components/TabRedo.vue b/src/layouts/default/tabs/components/TabRedo.vue new file mode 100644 index 0000000..9a122dd --- /dev/null +++ b/src/layouts/default/tabs/components/TabRedo.vue @@ -0,0 +1,32 @@ + + diff --git a/src/layouts/default/tabs/index.less b/src/layouts/default/tabs/index.less new file mode 100644 index 0000000..c9bdec2 --- /dev/null +++ b/src/layouts/default/tabs/index.less @@ -0,0 +1,228 @@ +@prefix-cls: ~'@{namespace}-multiple-tabs'; + +html[data-theme='dark'] { + .@{prefix-cls} { + .ant-tabs-tab { + border-bottom: 1px solid @border-color-base; + } + } +} + +html[data-theme='light'] { + .@{prefix-cls} { + .ant-tabs-tab:not(.ant-tabs-tab-active) { + border: 1px solid #e6e6e6; + } + } +} + +.@{prefix-cls} { + z-index: 10; + height: @multiple-height + 2; + line-height: @multiple-height + 2; + background-color: @component-background; + border-bottom: 1px solid @border-color-base; + box-shadow: 0 4px 4px rgb(0 21 41 / 8%); + + .ant-tabs-small { + height: calc(@multiple-height + 4px); + } + + .ant-tabs.ant-tabs-card { + padding-left: 0px; + + .ant-tabs-nav { + height: calc(@multiple-height); + margin: 0; + background-color: @component-background; + border: 0; + box-shadow: none; + + .ant-tabs-nav-wrap { + height: @multiple-height; + margin-top: 2px; + } + + .ant-tabs-tab { + height: calc(@multiple-height - 4px); + padding-right: 12px; + line-height: calc(@multiple-height - 4px); + color: @text-color-base; + background-color: @component-background; + transition: none; + + .ant-tabs-tab-btn { + color: @text-color-base; + transition: none; + } + + &:hover { + .ant-tabs-tab-remove .anticon-close { + opacity: 1; + } + } + + .ant-tabs-tab-remove { + margin: 0; + padding: 0; + position: relative; + top: 0; + left: 4px; + + .anticon-close { + width: 8px; + height: 12px; + font-size: 12px; + color: inherit; + opacity: 0; + transition: none; + + &:hover { + svg { + width: 0.8em; + } + } + } + } + + > div { + display: flex; + justify-content: center; + align-items: center; + } + + svg { + fill: @text-color-base; + } + } + + .ant-tabs-tab:not(.ant-tabs-tab-active) { + &:hover { + color: @primary-color; + } + } + + .ant-tabs-tab-active { + position: relative; + padding-left: 18px; + color: @white !important; + background: @primary-color; + border: 1px solid transparent; + transition: none; + + .ant-tabs-tab-btn { + color: @white; + } + + .ant-tabs-tab-remove .anticon-close { + opacity: 1; + } + + svg { + width: 0.7em; + fill: @white; + } + } + } + + .ant-tabs-nav > div:nth-child(1) { + padding: 0 6px; + + .ant-tabs-tab { + margin-right: 6px !important; + } + } + } + + .ant-tabs-tab:not(.ant-tabs-tab-active) { + .ant-tabs-tab-remove .anticon-close { + font-size: 12px; + + svg { + width: 0.6em; + } + } + } + + .ant-tabs-extra-content { + // update-begin--author:liaozhiyang---date:20241016---for:【issues/7345】标签样式切换到极简模式样式错乱 + // margin-top: 2px; + // update-end--author:liaozhiyang---date:20241016---for:【issues/7345】标签样式切换到极简模式样式错乱 + line-height: @multiple-height !important; + } + + .ant-dropdown-trigger { + display: inline-flex; + } + + &--hide-close { + .ant-tabs-tab-remove .anticon-close { + opacity: 0 !important; + } + } + + &-content { + &__extra-quick, + &__extra-redo, + &__extra-fold { + display: inline-block; + width: 36px; + height: @multiple-height; + line-height: @multiple-height; + color: @text-color-secondary; + text-align: center; + cursor: pointer; + border-left: 1px solid @border-color-base; + + &:hover { + color: @text-color-base; + } + + span[role='img'] { + transform: rotate(90deg); + } + } + + &__extra-redo { + span[role='img'] { + transform: rotate(0deg); + } + } + + &__info { + display: inline-block; + width: 100%; + height: @multiple-height - 2; + padding-left: 0; + margin-left: -10px; + font-size: 12px; + cursor: pointer; + user-select: none; + } + } +} + +.ant-tabs-dropdown-menu { + &-title-content { + display: flex; + align-items: center; + + .@{prefix-cls} { + &-content__info { + width: auto; + margin-left: 0; + line-height: 28px; + } + } + } + + &-item-remove { + margin-left: auto; + } +} + +.multiple-tabs__dropdown { + .ant-dropdown-content { + width: 172px; + } +} diff --git a/src/layouts/default/tabs/index.vue b/src/layouts/default/tabs/index.vue new file mode 100644 index 0000000..98b4f12 --- /dev/null +++ b/src/layouts/default/tabs/index.vue @@ -0,0 +1,188 @@ + + + + diff --git a/src/layouts/default/tabs/tabs.theme.card.less b/src/layouts/default/tabs/tabs.theme.card.less new file mode 100644 index 0000000..6b87e52 --- /dev/null +++ b/src/layouts/default/tabs/tabs.theme.card.less @@ -0,0 +1,236 @@ +// tabs卡片样式 +@prefix-cls-theme-card: ~'@{prefix-cls}.@{prefix-cls}--theme-card'; + +html[data-theme='dark'] { + .@{prefix-cls-theme-card} { + .ant-tabs-tab { + border-top: none !important; + border-left: none !important; + border-right: none !important; + } + } +} + +html[data-theme='light'] { + .@{prefix-cls-theme-card} { + .ant-tabs-tab:not(.ant-tabs-tab-active) { + border-top: none !important; + border-left: none !important; + border-right: none !important; + } + } +} + +.@{prefix-cls-theme-card} { + @tabHeight: calc(@multiple-card-height - 10px); + + z-index: 10; + height: @multiple-card-height; + line-height: @multiple-card-height; + background-color: @component-background; + box-shadow: 0 1px 4px rgb(0 21 41 / 8%); + + .ant-tabs-small { + height: @multiple-card-height; + } + + .ant-tabs.ant-tabs-card { + .ant-tabs-nav { + height: @multiple-card-height; + margin: 0; + background-color: @component-background; + border: 0; + box-shadow: none; + padding-left: 10px; + + .ant-tabs-nav-wrap { + height: @tabHeight; + margin-top: 4px; + padding-top: 0; + } + + .ant-tabs-tab { + height: @tabHeight; + line-height: @tabHeight; + color: @text-color-base; + background-color: @component-background; + padding: 0 20px 0 30px; + margin: 0 10px 0 0 !important; + + .ant-tabs-tab-btn { + color: @text-color-call-out; + } + + &:hover { + //padding: 0 36px 0 30px; + + .ant-tabs-tab-remove .anticon-close { + opacity: 1; + + &:hover { + color: #fff; + background-color: #c0c4cc; + } + } + } + + .ant-tabs-tab-remove { + //update-begin---author:scott ---date:2023-08-28 for:【QQYUN-6374】UnoCSS替代windicss导致应用样式问题-- + /* top: 5px;*/ + //update-end---author:scott ---date::2023-08-28 for:【QQYUN-6374】UnoCSS替代windicss导致应用样式问题-- + left: 4px; + + .anticon-close { + position: relative; + width: 14px; + height: 14px; + font-size: 13px; + color: inherit; + opacity: 0; + transition: opacity 0.15s; + top: 0; + left: 6px; + vertical-align: middle; + line-height: 10px; + overflow: hidden; + transform-origin: 100% 50%; + border-radius: 100%; + + &:hover { + svg { + fill: #fff; + } + } + } + } + + > div { + display: flex; + justify-content: center; + align-items: center; + } + + svg { + fill: @text-color-base; + } + + &:first-child { + } + } + + .ant-tabs-tab:not(.ant-tabs-tab-active) { + border: none !important; + + &:hover { + color: @primary-color !important; + background-color: inherit; + } + } + + .ant-tabs-tab-active { + position: relative; + color: @primary-color !important; + border: 1px solid transparent; + border-bottom: 1px solid @primary-color !important; + font-weight: inherit; + + .ant-tabs-tab-btn { + color: @primary-color; + } + + .ant-tabs-tab-remove .anticon-close { + opacity: 0; + + svg { + width: 0.6em; + } + } + + svg { + width: inherit; + fill: @primary-color; + } + } + } + + .ant-tabs-nav > div:nth-child(1) { + padding: 0 6px; + + .ant-tabs-tab { + margin-right: 10px !important; + } + } + } + + .ant-tabs-tab:not(.ant-tabs-tab-active) { + .ant-tabs-tab-remove .anticon-close { + font-size: 12px; + + svg { + width: 0.6em; + } + } + } + + .ant-tabs-extra-content { + position: relative; + top: 0; + line-height: @multiple-card-height !important; + } + + .ant-dropdown-trigger { + display: inline-flex; + } + + .@{prefix-cls}--hide-close { + .ant-tabs-tab-remove .anticon-close { + opacity: 0 !important; + } + } + + .@{prefix-cls}-content { + &__extra-quick, + &__extra-redo, + &__extra-fold { + display: inline-block; + width: 36px; + height: @multiple-card-height; + line-height: @multiple-card-height; + color: @text-color-secondary; + text-align: center; + cursor: pointer; + border-left: 1px solid @border-color-base; + + &:hover { + color: @text-color-base; + } + + span[role='img'] { + transform: rotate(90deg); + } + } + + &__extra-redo { + span[role='img'] { + transform: rotate(0deg); + } + } + + &__info { + display: inline-block; + width: 100%; + height: @tabHeight; + padding-left: 0; + font-size: 14px; + cursor: pointer; + user-select: none; + } + + // tab 前缀图标样式 + &__prefix-icon { + & .app-iconify.anticon { + margin-right: 4px; + } + } + } +} diff --git a/src/layouts/default/tabs/tabs.theme.smooth.less b/src/layouts/default/tabs/tabs.theme.smooth.less new file mode 100644 index 0000000..05a3960 --- /dev/null +++ b/src/layouts/default/tabs/tabs.theme.smooth.less @@ -0,0 +1,233 @@ +// tabs圆滑样式 +@prefix-cls-theme-smooth: ~'@{prefix-cls}.@{prefix-cls}--theme-smooth'; + +html[data-theme='dark'] { + .@{prefix-cls-theme-smooth} { + .ant-tabs-tab { + border: none !important; + } + } +} + +html[data-theme='light'] { + .@{prefix-cls-theme-smooth} { + .ant-tabs-tab:not(.ant-tabs-tab-active) { + border: none !important; + } + } +} + +.@{prefix-cls-theme-smooth} { + @tabHeight: calc(@multiple-smooth-height - 12px); + z-index: 10; + height: @multiple-smooth-height; + line-height: @multiple-smooth-height; + background-color: @component-background; + box-shadow: 0 1px 4px rgb(0 21 41 / 8%); + + .ant-tabs-small { + height: @multiple-smooth-height; + } + + .ant-tabs.ant-tabs-card { + .ant-tabs-nav { + height: @multiple-smooth-height; + margin: 0; + background-color: @component-background; + border: 0; + box-shadow: none; + padding-left: 10px; + + .ant-tabs-nav-wrap { + height: @tabHeight; + margin-top: 12px; + } + + .ant-tabs-tab { + height: @tabHeight; + line-height: @tabHeight; + color: @text-color-base; + background-color: @component-background; + transition: padding 0.3s; + padding: 0 20px 0 26px; + margin: 0 -14px 0 0 !important; + mask: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANoAAAAkBAMAAAAdqzmBAAAAMFBMVEVHcEwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlTPQ5AAAAD3RSTlMAr3DvEM8wgCBA379gj5//tJBPAAAAnUlEQVRIx2NgAAM27fj/tAO/xBsYkIHyf9qCT8iWMf6nNQhAsk2f5rYheY7Dnua2/U+A28ZEe8v+F9Ax2v7/F4DbxkUH2wzgtvHTwbYPo7aN2jZq26hto7aN2jZq25Cy7Qvctnw62PYNbls9HWz7S8/G6//PsI6H4396gAUQy1je08W2jxDbpv6nD4gB2uWp+J9eYPsEhv/0BPS1DQBvoBLVZ3BppgAAAABJRU5ErkJggg==); + mask-size: 100% 100%; + position: relative; + z-index: 1; + + .ant-tabs-tab-btn { + color: @text-color-base; + } + + &:hover { + z-index: 2; + padding: 0 20px 0 26px; + + .ant-tabs-tab-remove .anticon-close { + opacity: 1; + + &:hover { + color: #fff; + background-color: #c0c4cc; + } + } + } + + .ant-tabs-tab-remove { + top: -1px; + left: 8px; + + .anticon-close { + position: relative; + width: 14px; + height: 14px; + font-size: 13px; + color: inherit; + opacity: 0; + transition: opacity 0.15s; + vertical-align: middle; + line-height: 10px; + overflow: hidden; + transform-origin: 100% 50%; + border-radius: 100%; + + &:hover { + svg { + fill: #fff; + } + } + } + } + > div { + display: flex; + justify-content: center; + align-items: center; + } + + svg { + fill: @text-color-base; + } + + &:first-child { + padding: 0 30px 0 30px !important; + } + span{font-weight: 200;} + } + + .ant-tabs-tab:not(.ant-tabs-tab-active) { + &:hover { + color: inherit; + background-color: #f5f5f5; + } + } + + .ant-tabs-tab.ant-tabs-tab-active { + position: relative; + padding: 0 20px 0 26px; + color: @primary-color !important; + background: #f5f5f5; + border: 0; + z-index: 3; + + .ant-tabs-tab-btn { + color: @primary-color; + } + + .ant-tabs-tab-remove .anticon-close { + opacity: 1; + + svg { + width: 0.6em; + } + } + + svg { + width: inherit; + fill: @primary-color; + } + } + } + + .ant-tabs-nav > div:nth-child(1) { + padding: 0 6px; + + .ant-tabs-tab { + margin-right: -15px !important; + } + } + } + + .ant-tabs-tab:not(.ant-tabs-tab-active) { + .anticon-close { + font-size: 12px; + + svg { + width: 0.6em; + } + } + } + + .ant-tabs-extra-content { + position: relative; + top: 0; + line-height: @multiple-smooth-height !important; + } + + .ant-dropdown-trigger { + display: inline-flex; + } + + .@{prefix-cls}--hide-close { + .ant-tabs-tab-remove .anticon-close { + opacity: 0 !important; + } + } + + .@{prefix-cls}-content { + &__extra-quick, + &__extra-redo, + &__extra-fold { + display: inline-block; + width: 36px; + height: @multiple-smooth-height; + line-height: @multiple-smooth-height; + color: @text-color-secondary; + text-align: center; + cursor: pointer; + border-left: 1px solid @border-color-base; + + &:hover { + color: @text-color-base; + } + + span[role='img'] { + transform: rotate(90deg); + } + } + + &__extra-redo { + span[role='img'] { + transform: rotate(0deg); + } + } + + &__info { + display: inline-block; + width: 100%; + height: @tabHeight; + line-height: 32px; + padding-left: 0; + font-size: 14px; + cursor: pointer; + user-select: none; + } + + // tab 前缀图标样式 + &__prefix-icon { + & .app-iconify.anticon { + margin-right: 4px; + } + } + } +} diff --git a/src/layouts/default/tabs/types.ts b/src/layouts/default/tabs/types.ts new file mode 100644 index 0000000..72c13f5 --- /dev/null +++ b/src/layouts/default/tabs/types.ts @@ -0,0 +1,26 @@ +import type { DropMenu } from '/@/components/Dropdown/index'; +import type { RouteLocationNormalized } from 'vue-router'; + +export enum TabContentEnum { + TAB_TYPE, + EXTRA_TYPE, +} + +export type { DropMenu }; + +export interface TabContentProps { + tabItem: RouteLocationNormalized; + type?: TabContentEnum; + trigger?: ('click' | 'hover' | 'contextmenu')[]; +} + +export enum MenuEventEnum { + REFRESH_PAGE, + CLOSE_CURRENT, + CLOSE_LEFT, + CLOSE_RIGHT, + CLOSE_OTHER, + CLOSE_ALL, + SCALE, + HOME_DESIGN, +} diff --git a/src/layouts/default/tabs/useMultipleTabs.ts b/src/layouts/default/tabs/useMultipleTabs.ts new file mode 100644 index 0000000..35b553b --- /dev/null +++ b/src/layouts/default/tabs/useMultipleTabs.ts @@ -0,0 +1,78 @@ +import { toRaw, ref, nextTick } from 'vue'; +import type { RouteLocationNormalized } from 'vue-router'; +import { useDesign } from '/@/hooks/web/useDesign'; +import { useSortable } from '/@/hooks/web/useSortable'; +import { useMultipleTabStore } from '/@/store/modules/multipleTab'; +import { isNullAndUnDef } from '/@/utils/is'; +import projectSetting from '/@/settings/projectSetting'; +import { useRouter } from 'vue-router'; + +export function initAffixTabs(): string[] { + const affixList = ref([]); + + const tabStore = useMultipleTabStore(); + const router = useRouter(); + /** + * @description: Filter all fixed routes + */ + function filterAffixTabs(routes: RouteLocationNormalized[]) { + const tabs: RouteLocationNormalized[] = []; + routes && + routes.forEach((route) => { + if (route.meta && route.meta.affix) { + tabs.push(toRaw(route)); + } + }); + return tabs; + } + + /** + * @description: Set fixed tabs + */ + function addAffixTabs(): void { + const affixTabs = filterAffixTabs(router.getRoutes() as unknown as RouteLocationNormalized[]); + affixList.value = affixTabs; + for (const tab of affixTabs) { + tabStore.addTab({ + meta: tab.meta, + name: tab.name, + path: tab.path, + } as unknown as RouteLocationNormalized); + } + } + + let isAddAffix = false; + + if (!isAddAffix) { + addAffixTabs(); + isAddAffix = true; + } + return affixList.value.map((item) => item.meta?.title).filter(Boolean) as string[]; +} + +export function useTabsDrag(affixTextList: string[]) { + const tabStore = useMultipleTabStore(); + const { multiTabsSetting } = projectSetting; + const { prefixCls } = useDesign('multiple-tabs'); + nextTick(() => { + if (!multiTabsSetting.canDrag) return; + const el = document.querySelectorAll(`.${prefixCls} .ant-tabs-nav > div`)?.[0] as HTMLElement; + const { initSortable } = useSortable(el, { + filter: (e: ChangeEvent) => { + const text = e?.target?.innerText; + if (!text) return false; + return affixTextList.includes(text); + }, + onEnd: (evt) => { + const { oldIndex, newIndex } = evt; + + if (isNullAndUnDef(oldIndex) || isNullAndUnDef(newIndex) || oldIndex === newIndex) { + return; + } + + tabStore.sortTabs(oldIndex, newIndex); + }, + }); + initSortable(); + }); +} diff --git a/src/layouts/default/tabs/useTabDropdown.ts b/src/layouts/default/tabs/useTabDropdown.ts new file mode 100644 index 0000000..ca8356d --- /dev/null +++ b/src/layouts/default/tabs/useTabDropdown.ts @@ -0,0 +1,181 @@ +import type { TabContentProps } from './types'; +import type { DropMenu } from '/@/components/Dropdown'; +import type { ComputedRef } from 'vue'; + +import { computed, unref, reactive } from 'vue'; +import { MenuEventEnum } from './types'; +import { useMultipleTabStore } from '/@/store/modules/multipleTab'; +import { RouteLocationNormalized, useRouter } from 'vue-router'; +import { useTabs } from '/@/hooks/web/useTabs'; +import { useI18n } from '/@/hooks/web/useI18n'; + +export function useTabDropdown(tabContentProps: TabContentProps, getIsTabs: ComputedRef) { + const state = reactive({ + current: null as Nullable, + currentIndex: 0, + }); + + const { t } = useI18n(); + const tabStore = useMultipleTabStore(); + const { currentRoute } = useRouter(); + const { refreshPage, closeAll, close, closeLeft, closeOther, closeRight, changeDesign } = useTabs(); + + const getTargetTab = computed((): RouteLocationNormalized => { + return unref(getIsTabs) ? tabContentProps.tabItem : unref(currentRoute); + }); + + /** + * @description: drop-down list + */ + const getDropMenuList = computed(() => { + if (!unref(getTargetTab)) { + return; + } + const { meta } = unref(getTargetTab); + const { path } = unref(currentRoute); + + // Refresh button + const curItem = state.current; + + const isCurItem = curItem ? curItem.path === path : false; + const index = state.currentIndex; + const refreshDisabled = !isCurItem; + // update-begin--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用 + // Close left + const closeLeftDisabled = () => { + if (index === 0) { + return true; + } else { + // 【TV360X-1039】当只有首页和另一个tab页时关闭左侧禁用 + const validTabList = tabStore.getTabList.filter((item) => !item?.meta?.affix); + return validTabList[0].path === state.current?.path; + } + }; + // Close other + const closeOtherDisabled = () => { + if (tabStore.getTabList.length === 1) { + return true; + } else { + // 【TV360X-1039】当只有首页和另一个tab页时关闭其它禁用 + const validTabList = tabStore.getTabList.filter((item) => !item?.meta?.affix); + return validTabList.length == 1; + } + }; + + // Close right + const closeRightDisabled = index === tabStore.getTabList.length - 1 && tabStore.getLastDragEndIndex >= 0; + // update-end--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用 + const dropMenuList: DropMenu[] = [ + { + icon: 'jam:refresh-reverse', + event: MenuEventEnum.REFRESH_PAGE, + text: t('layout.multipleTab.reload'), + disabled: refreshDisabled, + }, + { + icon: 'ant-design:setting-outlined', + event: MenuEventEnum.HOME_DESIGN, + text: t('layout.multipleTab.homeDesign'), + disabled: path !== '/PortalView', + divider: true, + }, + // { + // icon: 'ic:twotone-close', + // event: MenuEventEnum.CLOSE_CURRENT, + // text: t('layout.multipleTab.close'), + // disabled: !!meta?.affix || disabled, + // divider: true, + // }, + { + icon: 'mdi:arrow-left', + event: MenuEventEnum.CLOSE_LEFT, + text: t('layout.multipleTab.closeLeft'), + // update-begin--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用 + disabled: closeLeftDisabled(), + // update-end--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用 + divider: false, + }, + { + icon: 'mdi:arrow-right', + event: MenuEventEnum.CLOSE_RIGHT, + text: t('layout.multipleTab.closeRight'), + disabled: closeRightDisabled, + divider: true, + }, + { + icon: 'material-symbols:arrows-outward', + event: MenuEventEnum.CLOSE_OTHER, + text: t('layout.multipleTab.closeOther'), + // update-begin--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用 + disabled: closeOtherDisabled(), + // update-end--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用 + }, + // { + // icon: 'clarity:minus-line', + // event: MenuEventEnum.CLOSE_ALL, + // text: t('layout.multipleTab.closeAll'), + // disabled: disabled, + // }, + ]; + + return dropMenuList; + }); + + function handleContextMenu(tabItem: RouteLocationNormalized) { + return (e: Event) => { + if (!tabItem) { + return; + } + e?.preventDefault(); + const index = tabStore.getTabList.findIndex((tab) => tab.path === tabItem.path); + state.current = tabItem; + state.currentIndex = index; + }; + } + + // Handle right click event + function handleMenuEvent(menu: DropMenu): void { + const { event } = menu; + switch (event) { + case MenuEventEnum.REFRESH_PAGE: + // refresh page + refreshPage(); + break; + // Close current + case MenuEventEnum.CLOSE_CURRENT: + close(tabContentProps.tabItem); + break; + // Close left + case MenuEventEnum.CLOSE_LEFT: + // update-begin--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用 + closeLeft(state.current); + // update-end--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用 + break; + // Close right + case MenuEventEnum.CLOSE_RIGHT: + // update-begin--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用 + closeRight(state.current); + // update-end--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用 + break; + // Close other + case MenuEventEnum.CLOSE_OTHER: + // update-begin--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用 + closeOther(state.current); + // update-end--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用 + break; + // Close all + case MenuEventEnum.CLOSE_ALL: + // update-begin--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用 + closeAll(state.current); + // update-end--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用 + break; + // Close all + case MenuEventEnum.HOME_DESIGN: + // update-begin--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用 + changeDesign(); + // update-end--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用 + break; + } + } + return { getDropMenuList, handleMenuEvent, handleContextMenu }; +} diff --git a/src/layouts/default/trigger/HeaderTrigger.vue b/src/layouts/default/trigger/HeaderTrigger.vue new file mode 100644 index 0000000..33077ba --- /dev/null +++ b/src/layouts/default/trigger/HeaderTrigger.vue @@ -0,0 +1,23 @@ + + diff --git a/src/layouts/default/trigger/SiderTrigger.vue b/src/layouts/default/trigger/SiderTrigger.vue new file mode 100644 index 0000000..0eb38b5 --- /dev/null +++ b/src/layouts/default/trigger/SiderTrigger.vue @@ -0,0 +1,21 @@ + + diff --git a/src/layouts/default/trigger/index.vue b/src/layouts/default/trigger/index.vue new file mode 100644 index 0000000..61f43b3 --- /dev/null +++ b/src/layouts/default/trigger/index.vue @@ -0,0 +1,22 @@ + + diff --git a/src/layouts/iframe/index.vue b/src/layouts/iframe/index.vue new file mode 100644 index 0000000..09900cc --- /dev/null +++ b/src/layouts/iframe/index.vue @@ -0,0 +1,25 @@ + + diff --git a/src/layouts/iframe/useFrameKeepAlive.ts b/src/layouts/iframe/useFrameKeepAlive.ts new file mode 100644 index 0000000..e84c49f --- /dev/null +++ b/src/layouts/iframe/useFrameKeepAlive.ts @@ -0,0 +1,59 @@ +import type { AppRouteRecordRaw } from '/@/router/types'; + +import { computed, toRaw, unref } from 'vue'; + +import { useMultipleTabStore } from '/@/store/modules/multipleTab'; + +import { uniqBy } from 'lodash-es'; + +import { useMultipleTabSetting } from '/@/hooks/setting/useMultipleTabSetting'; + +import { useRouter } from 'vue-router'; + +export function useFrameKeepAlive() { + const router = useRouter(); + const { currentRoute } = router; + const { getShowMultipleTab } = useMultipleTabSetting(); + const tabStore = useMultipleTabStore(); + const getFramePages = computed(() => { + const ret = getAllFramePages(toRaw(router.getRoutes()) as unknown as AppRouteRecordRaw[]) || []; + return ret; + }); + + const getOpenTabList = computed((): string[] => { + return tabStore.getTabList.reduce((prev: string[], next) => { + if (next.meta && Reflect.has(next.meta, 'frameSrc')) { + prev.push(next.name as string); + } + return prev; + }, []); + }); + + function getAllFramePages(routes: AppRouteRecordRaw[]): AppRouteRecordRaw[] { + let res: AppRouteRecordRaw[] = []; + for (const route of routes) { + const { meta: { frameSrc } = {}, children } = route; + if (frameSrc) { + res.push(route); + } + if (children && children.length) { + res.push(...getAllFramePages(children)); + } + } + res = uniqBy(res, 'name'); + return res; + } + + function showIframe(item: AppRouteRecordRaw) { + return item.name === unref(currentRoute).name; + } + + function hasRenderFrame(name: string) { + if (!unref(getShowMultipleTab)) { + return router.currentRoute.value.name === name; + } + return unref(getOpenTabList).includes(name); + } + + return { hasRenderFrame, getFramePages, showIframe, getAllFramePages }; +} diff --git a/src/layouts/page/index.vue b/src/layouts/page/index.vue new file mode 100644 index 0000000..dc1d4fc --- /dev/null +++ b/src/layouts/page/index.vue @@ -0,0 +1,70 @@ + + + diff --git a/src/layouts/page/transition.ts b/src/layouts/page/transition.ts new file mode 100644 index 0000000..9e93009 --- /dev/null +++ b/src/layouts/page/transition.ts @@ -0,0 +1,33 @@ +import type { FunctionalComponent } from 'vue'; +import type { RouteLocation } from 'vue-router'; + +export interface DefaultContext { + Component: FunctionalComponent & { type: Recordable }; + route: RouteLocation; +} + +export function getTransitionName({ + route, + openCache, + cacheTabs, + enableTransition, + def, +}: Pick & { + enableTransition: boolean; + openCache: boolean; + def: string; + cacheTabs: string[]; +}): string | undefined { + if (!enableTransition) { + return undefined; + } + + const isInCache = cacheTabs.includes(route.name as string); + const transitionName = 'fade-slide'; + let name: string | undefined = transitionName; + + if (openCache) { + name = isInCache && route.meta.loaded ? transitionName : undefined; + } + return name || (route.meta.transitionName as string) || def; +} diff --git a/src/locales/helper.ts b/src/locales/helper.ts new file mode 100644 index 0000000..4f78439 --- /dev/null +++ b/src/locales/helper.ts @@ -0,0 +1,37 @@ +import type { LocaleType } from '/#/config'; + +import { set } from 'lodash-es'; + +export const loadLocalePool: LocaleType[] = []; + +export function setHtmlPageLang(locale: LocaleType) { + document.querySelector('html')?.setAttribute('lang', locale); +} + +export function setLoadLocalePool(cb: (loadLocalePool: LocaleType[]) => void) { + cb(loadLocalePool); +} + +export function genMessage(langs: Record>, prefix = 'lang') { + const obj: Recordable = {}; + + Object.keys(langs).forEach((key) => { + const langFileModule = langs[key].default; + let fileName = key.replace(`./${prefix}/`, '').replace(/^\.\//, ''); + const lastIndex = fileName.lastIndexOf('.'); + fileName = fileName.substring(0, lastIndex); + const keyList = fileName.split('/'); + const moduleName = keyList.shift(); + const objKey = keyList.join('.'); + + if (moduleName) { + if (objKey) { + set(obj, moduleName, obj[moduleName] || {}); + set(obj[moduleName], objKey, langFileModule); + } else { + set(obj, moduleName, langFileModule || {}); + } + } + }); + return obj; +} diff --git a/src/locales/lang/en.ts b/src/locales/lang/en.ts new file mode 100644 index 0000000..57d8aad --- /dev/null +++ b/src/locales/lang/en.ts @@ -0,0 +1,13 @@ +import { genMessage } from '../helper'; +import antdLocale from 'ant-design-vue/es/locale/en_US'; +//import momentLocale from 'moment/dist/locale/eu'; + +const modules = import.meta.glob('./en/**/*.ts', { eager: true }); +export default { + message: { + ...genMessage(modules as Recordable, 'en'), + antdLocale, + }, + dateLocale: null, + dateLocaleName: 'en', +}; diff --git a/src/locales/lang/en/common.ts b/src/locales/lang/en/common.ts new file mode 100644 index 0000000..f7cdce0 --- /dev/null +++ b/src/locales/lang/en/common.ts @@ -0,0 +1,20 @@ +export default { + okText: 'OK', + closeText: 'Close', + cancelText: 'Cancel', + loadingText: 'Loading...', + saveText: 'Save', + delText: 'Delete', + resetText: 'Reset', + searchText: 'Search', + queryText: 'Search', + + inputText: 'Please enter', + chooseText: 'Please choose', + + redo: 'Refresh', + back: 'Back', + + light: 'Light', + dark: 'Dark', +}; diff --git a/src/locales/lang/en/component.ts b/src/locales/lang/en/component.ts new file mode 100644 index 0000000..b93dbd5 --- /dev/null +++ b/src/locales/lang/en/component.ts @@ -0,0 +1,129 @@ +export default { + app: { + searchNotData: 'No search results yet', + toSearch: 'to search', + toNavigate: 'to navigate', + }, + countdown: { + normalText: 'Get SMS code', + sendText: 'Reacquire in {0}s', + }, + 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', + }, + drawer: { + loadingText: 'Loading...', + cancelText: 'Close', + okText: 'Confirm', + }, + excel: { + exportModalTitle: 'Export data', + fileType: 'File type', + fileName: 'File name', + }, + form: { + putAway: 'Put away', + unfold: 'Unfold', + maxTip: 'The number of characters should be less than {0}', + apiSelectNotFound: 'Wait for data loading to complete...', + }, + icon: { + placeholder: 'Click the select icon', + search: 'Search icon', + copy: 'Copy icon successfully!', + }, + menu: { + search: 'Menu search', + }, + modal: { + cancelText: 'Close', + okText: 'Confirm', + close: 'Close', + maximize: 'Maximize', + restore: 'Restore', + }, + table: { + settingDens: 'Density', + settingDensDefault: 'Default', + settingDensMiddle: 'Middle', + settingDensSmall: 'Compact', + settingColumn: 'Column settings', + settingColumnShow: 'Column display', + settingIndexColumnShow: 'Index Column', + settingSelectColumnShow: 'Selection Column', + settingFixedLeft: 'Fixed Left', + settingFixedRight: 'Fixed Right', + settingFullScreen: 'Full Screen', + index: 'Index', + total: 'total of {total}', + }, + time: { + before: ' ago', + after: ' after', + just: 'just now', + seconds: ' seconds', + minutes: ' minutes', + hours: ' hours', + days: ' days', + }, + tree: { + selectAll: 'Select All', + unSelectAll: 'Cancel Select', + expandAll: 'Expand All', + unExpandAll: 'Collapse all', + + checkStrictly: 'Hierarchical association', + checkUnStrictly: 'Hierarchical independence', + }, + upload: { + save: 'Save', + upload: 'Upload', + imgUpload: 'ImageUpload', + uploaded: 'Uploaded', + + operating: 'Operating', + del: 'Delete', + download: 'download', + saveWarn: 'Please wait for the file to upload and save!', + saveError: 'There is no file successfully uploaded and cannot be saved!', + + preview: 'Preview', + choose: 'Select the file', + + accept: 'Support {0} format', + acceptUpload: 'Only upload files in {0} format', + maxSize: 'A single file does not exceed {0}MB ', + maxSizeMultiple: 'Only upload files up to {0}MB!', + maxNumber: 'Only upload up to {0} files', + + legend: 'Legend', + fileName: 'File name', + fileSize: 'File size', + fileStatue: 'File status', + + startUpload: 'Start upload', + uploadSuccess: 'Upload successfully', + uploadError: 'Upload failed', + uploading: 'Uploading', + uploadWait: 'Please wait for the file upload to finish', + reUploadFailed: 'Re-upload failed files', + }, + verify: { + error: 'verification failed!', + time: 'The verification is successful and it takes {time} seconds!', + redoTip: 'Click the picture to refresh', + dragText: 'Hold down the slider and drag', + successText: 'Verified', + }, +}; diff --git a/src/locales/lang/en/layout.ts b/src/locales/lang/en/layout.ts new file mode 100644 index 0000000..fade989 --- /dev/null +++ b/src/locales/lang/en/layout.ts @@ -0,0 +1,133 @@ +export default { + footer: { onlinePreview: 'Preview', onlineDocument: 'Document' }, + header: { + // user dropdown + dropdownItemDoc: 'Document', + dropdownItemLoginOut: 'Login Out', + dropdownItemSwitchPassword: 'Password Change', + dropdownItemSwitchDepart: 'Switch Department', + dropdownItemRefreshCache: 'Clean cache', + dropdownItemSwitchAccount: 'Account Setting', + + tooltipErrorLog: 'Error log', + tooltipLock: 'Lock screen', + tooltipNotify: 'Notification', + + tooltipEntryFull: 'Full Screen', + tooltipExitFull: 'Exit Full Screen', + + // lock + lockScreenPassword: 'Password', + lockScreen: 'Lock screen', + lockScreenBtn: 'Locking', + + home: 'Home', + welcomeIn: 'Welcome in', + refreshCacheComplete: 'Refresh cache complete', + refreshCacheFailure: 'Refresh cache failure', + }, + multipleTab: { + reload: 'Refresh current', + close: 'Close current', + closeLeft: 'Close Left', + closeRight: 'Close Right', + closeOther: 'Close Other', + closeAll: 'Close All', + homeDesign: 'Home Design', + }, + setting: { + // content mode + contentModeFull: 'Full', + contentModeFixed: 'Fixed width', + // topMenu align + topMenuAlignLeft: 'Left', + topMenuAlignRight: 'Center', + topMenuAlignCenter: 'Right', + // menu trigger + menuTriggerNone: 'Not Show', + menuTriggerBottom: 'Bottom', + menuTriggerTop: 'Top', + // menu type + menuTypeSidebar: 'Left menu mode', + menuTypeMixSidebar: 'Left menu mixed mode', + menuTypeMix: 'Top Menu Mix mode', + menuTypeTopMenu: 'Top menu mode', + + on: 'On', + off: 'Off', + minute: 'Minute', + + operatingTitle: 'Successful!', + operatingContent: 'The copy is successful, please go to src/settings/projectSetting.ts to modify the configuration!', + resetSuccess: 'Successfully reset!', + + copyBtn: 'Copy', + clearBtn: 'Clear cache and to the login page', + + drawerTitle: 'Configuration', + + darkMode: 'Dark mode', + navMode: 'Navigation mode', + interfaceFunction: 'Interface function', + interfaceDisplay: 'Interface display', + animation: 'Animation', + splitMenu: 'Split menu', + closeMixSidebarOnChange: 'Switch page to close menu', + + sysTheme: 'System theme', + headerTheme: 'Header theme', + sidebarTheme: 'Menu theme', + + menuDrag: 'Drag Sidebar', + menuSearch: 'Menu search', + menuAccordion: 'Sidebar accordion', + menuCollapse: 'Collapse menu', + collapseMenuDisplayName: 'Collapse menu display name', + topMenuLayout: 'Top menu layout', + menuCollapseButton: 'Menu collapse button', + contentMode: 'Content area width', + expandedMenuWidth: 'Expanded menu width', + + breadcrumb: 'Breadcrumbs', + breadcrumbIcon: 'Breadcrumbs Icon', + tabs: 'Tabs', + tabDetail: 'Tab Detail', + tabsQuickBtn: 'Tabs quick button', + tabsRedoBtn: 'Tabs redo button', + tabsFoldBtn: 'Tabs flod button', + tabsTheme: 'tabs theme', + tabsThemeSmooth: 'Smooth', + tabsThemeCard: 'Card', + tabsThemeSimple: 'Simple', + sidebar: 'Sidebar', + header: 'Header', + footer: 'Footer', + fullContent: 'Full content', + grayMode: 'Gray mode', + colorWeak: 'Color Weak Mode', + + progress: 'Progress', + switchLoading: 'Switch Loading', + switchAnimation: 'Switch animation', + animationType: 'Animation type', + + autoScreenLock: 'Auto screen lock', + notAutoScreenLock: 'Not auto lock', + + fixedHeader: 'Fixed header', + fixedSideBar: 'Fixed Sidebar', + + mixSidebarTrigger: 'Mixed menu Trigger', + triggerHover: 'Hover', + triggerClick: 'Click', + + mixSidebarFixed: 'Fixed expanded menu', + }, + changePassword: { + changePassword: 'Change password', + oldPassword: 'Old password', + newPassword: 'New password', + confirmNewPassword: 'Confirm new password', + pleaseEnterNewPassword: 'Please enter new password', + }, +}; diff --git a/src/locales/lang/en/routes/basic.ts b/src/locales/lang/en/routes/basic.ts new file mode 100644 index 0000000..15d9141 --- /dev/null +++ b/src/locales/lang/en/routes/basic.ts @@ -0,0 +1,5 @@ +export default { + login: 'Login', + errorLogList: 'Error Log', + defaultHomePage: 'Default Home Page', +}; diff --git a/src/locales/lang/en/routes/dashboard.ts b/src/locales/lang/en/routes/dashboard.ts new file mode 100644 index 0000000..6d047b5 --- /dev/null +++ b/src/locales/lang/en/routes/dashboard.ts @@ -0,0 +1,6 @@ +export default { + dashboard: 'Dashboard', + about: 'About', + workbench: 'Workbench', + analysis: 'Analysis', +}; diff --git a/src/locales/lang/en/routes/demo.ts b/src/locales/lang/en/routes/demo.ts new file mode 100644 index 0000000..b299192 --- /dev/null +++ b/src/locales/lang/en/routes/demo.ts @@ -0,0 +1,199 @@ +export default { + charts: { + baiduMap: 'Baidu map', + aMap: 'A map', + googleMap: 'Google map', + charts: 'Chart', + map: 'Map', + line: 'Line', + pie: 'Pie', + }, + comp: { + comp: 'Component', + basic: 'Basic', + transition: 'Animation', + countTo: 'Count To', + + scroll: 'Scroll', + scrollBasic: 'Basic', + scrollAction: 'Scroll Function', + virtualScroll: 'Virtual Scroll', + + tree: 'Tree', + + treeBasic: 'Basic', + editTree: 'Searchable/toolbar', + actionTree: 'Function operation', + + modal: 'Modal', + drawer: 'Drawer', + desc: 'Desc', + + lazy: 'Lazy', + lazyBasic: 'Basic', + lazyTransition: 'Animation', + + verify: 'Verify', + verifyDrag: 'Drag ', + verifyRotate: 'Picture Restore', + + qrcode: 'QR code', + strength: 'Password strength', + upload: 'Upload', + + loading: 'Loading', + + time: 'Relative Time', + cropperImage: 'Cropper Image', + cardList: 'Card List', + }, + editor: { + editor: 'Editor', + jsonEditor: 'Json editor', + markdown: 'Markdown editor', + + tinymce: 'Rich text', + tinymceBasic: 'Basic', + tinymceForm: 'embedded form', + }, + excel: { + excel: 'Excel', + customExport: 'Select export format', + jsonExport: 'JSON data export', + arrayExport: 'Array data export', + importExcel: 'Import', + }, + feat: { + feat: 'Page Function', + icon: 'Icon', + tabs: 'Tabs', + tabDetail: 'Tab Detail', + sessionTimeout: 'Session Timeout', + print: 'Print', + contextMenu: 'Context Menu', + download: 'Download', + clickOutSide: 'ClickOutSide', + imgPreview: 'Picture Preview', + copy: 'Clipboard', + msg: 'Message prompt', + watermark: 'Watermark', + ripple: 'Ripple', + fullScreen: 'Full Screen', + errorLog: 'Error Log', + tab: 'Tab with parameters', + tab1: 'Tab with parameter 1', + tab2: 'Tab with parameter 2', + menu: 'Menu with parameters', + menu1: 'Menu with parameters 1', + menu2: 'Menu with parameters 2', + + ws: 'Websocket test', + + breadcrumb: 'Breadcrumbs', + breadcrumbFlat: 'Flat Mode', + breadcrumbFlatDetail: 'Flat mode details', + + breadcrumbChildren: 'Level mode', + breadcrumbChildrenDetail: 'Level mode detail', + }, + flow: { + name: 'Graphics editor', + flowChart: 'FlowChart', + }, + form: { + form: 'Form', + basic: 'Basic', + useForm: 'useForm', + refForm: 'RefForm', + advancedForm: 'Shrinkable', + ruleForm: 'Form validation', + dynamicForm: 'Dynamic', + customerForm: 'Custom', + appendForm: 'Append', + }, + iframe: { + frame: 'External', + antv: 'antVue doc (embedded)', + doc: 'Project doc (embedded)', + docExternal: 'Project doc (external)', + }, + level: { level: 'MultiMenu' }, + page: { + page: 'Page', + + form: 'Form', + formBasic: 'Basic Form', + formStep: 'Step Form', + formHigh: 'Advanced Form', + + desc: 'Details', + descBasic: 'Basic Details', + descHigh: 'Advanced Details', + + result: 'Result', + resultSuccess: 'Success', + resultFail: 'Failed', + + account: 'Personal', + accountCenter: 'Personal Center', + accountSetting: 'Personal Settings', + + exception: 'Exception', + netWorkError: 'Network Error', + notData: 'No data', + + list: 'List page', + listCard: 'Card list', + basic: 'Basic list', + listBasic: 'Basic list', + listSearch: 'Search list', + }, + permission: { + permission: 'Permission', + + front: 'front-end', + frontPage: 'Page', + frontBtn: 'Button', + frontTestA: 'Test page A', + frontTestB: 'Test page B', + + back: 'background', + backPage: 'Page', + backBtn: 'Button', + }, + setup: { + page: 'Intro page', + }, + system: { + moduleName: 'System management', + + account: 'Account management', + account_detail: 'Account detail', + password: 'Change password', + + dept: 'Department management', + + menu: 'Menu management', + role: 'Role management', + }, + table: { + table: 'Table', + + basic: 'Basic', + treeTable: 'Tree', + fetchTable: 'Remote loading', + fixedColumn: 'Fixed column', + customerCell: 'Custom column', + formTable: 'Open search', + useTable: 'UseTable', + refTable: 'RefTable', + multipleHeader: 'MultiLevel header', + mergeHeader: 'Merge cells', + expandTable: 'Expandable table', + fixedHeight: 'Fixed height', + footerTable: 'Footer', + editCellTable: 'Editable cell', + editRowTable: 'Editable row', + authColumn: 'Auth column', + }, +}; diff --git a/src/locales/lang/en/sys.ts b/src/locales/lang/en/sys.ts new file mode 100644 index 0000000..952d84b --- /dev/null +++ b/src/locales/lang/en/sys.ts @@ -0,0 +1,111 @@ +export default { + 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!', + }, + app: { + logoutTip: 'Reminder', + logoutMessage: 'Confirm to exit the system?', + menuLoading: 'Menu loading...', + }, + errorLog: { + tableTitle: 'Error log list', + tableColumnType: 'Type', + tableColumnDate: 'Time', + tableColumnFile: 'File', + tableColumnMsg: 'Error message', + tableColumnStackMsg: 'Stack info', + + tableActionDesc: 'Details', + + modalTitle: 'Error details', + + fireVueError: 'Fire vue error', + fireResourceError: 'Fire resource error', + fireAjaxError: 'Fire ajax error', + + enableMessage: 'Only effective when useErrorHandle=true in `/src/settings/projectSetting.ts`.', + }, + 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: 'lock screen 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', + mobileCorrectPlaceholder: 'Please input correct mobile', + policyPlaceholder: 'Register after checking', + diffPwd: 'The two passwords are inconsistent', + + userName: 'Username', + password: 'Password', + inputCode: 'Verification code', + confirmPassword: 'Confirm Password', + email: 'Email', + smsCode: 'SMS code', + mobile: 'Mobile', + + //重置密码页面英文 + authentication:'authentication', + resetLoginPassword:'reset login password', + resetSuccess:'reset succeeded', + nextStep:'next step', + goToLogin:'go to login' + }, +}; diff --git a/src/locales/lang/zh-CN/common.ts b/src/locales/lang/zh-CN/common.ts new file mode 100644 index 0000000..478c625 --- /dev/null +++ b/src/locales/lang/zh-CN/common.ts @@ -0,0 +1,20 @@ +export default { + okText: '确认', + closeText: '关闭', + cancelText: '取消', + loadingText: '加载中...', + saveText: '保存', + delText: '删除', + resetText: '重置', + searchText: '搜索', + queryText: '查询', + + inputText: '请输入', + chooseText: '请选择', + + redo: '刷新', + back: '返回', + + light: '亮色主题', + dark: '黑暗主题', +}; diff --git a/src/locales/lang/zh-CN/component.ts b/src/locales/lang/zh-CN/component.ts new file mode 100644 index 0000000..e2ae6ac --- /dev/null +++ b/src/locales/lang/zh-CN/component.ts @@ -0,0 +1,135 @@ +export default { + app: { + searchNotData: '暂无搜索结果', + toSearch: '确认', + toNavigate: '切换', + }, + countdown: { + normalText: '获取验证码', + sendText: '{0}秒后重新获取', + }, + 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: '预览', + }, + drawer: { + loadingText: '加载中...', + cancelText: '关闭', + okText: '确认', + }, + excel: { + exportModalTitle: '导出数据', + fileType: '文件类型', + fileName: '文件名', + }, + form: { + putAway: '收起', + unfold: '展开', + + maxTip: '字符数应小于{0}位', + + apiSelectNotFound: '请等待数据加载完成...', + }, + icon: { + placeholder: '点击选择图标', + search: '搜索图标', + copy: '复制图标成功!', + }, + menu: { + search: '菜单搜索', + }, + modal: { + cancelText: '关闭', + okText: '确认', + close: '关闭', + maximize: '最大化', + restore: '还原', + }, + table: { + settingDens: '密度', + // settingDensDefault: '默认', + settingDensLarge: '宽松', + settingDensMiddle: '默认', + settingDensSmall: '紧凑', + settingColumn: '列设置', + settingColumnShow: '列展示', + settingIndexColumnShow: '序号列', + settingSelectColumnShow: '勾选列', + settingFixedLeft: '固定到左侧', + settingFixedRight: '固定到右侧', + settingFullScreen: '全屏', + + index: '序号', + + total: '共 {total} 条数据', + }, + time: { + before: '前', + after: '后', + just: '刚刚', + seconds: '秒', + minutes: '分钟', + hours: '小时', + days: '天', + }, + tree: { + selectAll: '选择全部', + unSelectAll: '取消选择', + expandAll: '展开全部', + unExpandAll: '折叠全部', + checkStrictly: '层级关联', + checkUnStrictly: '层级独立', + }, + upload: { + save: '保存', + upload: '上传', + imgUpload: '图片上传', + uploaded: '已上传', + + operating: '操作', + del: '删除', + download: '下载', + saveWarn: '请等待文件上传后,保存!', + saveError: '没有上传成功的文件,无法保存!', + + preview: '预览', + choose: '选择文件', + + accept: '支持{0}格式', + acceptUpload: '只能上传{0}格式文件', + maxSize: '单个文件不超过{0}MB', + maxSizeMultiple: '只能上传不超过{0}MB的文件!', + maxNumber: '最多只能上传{0}个文件', + + legend: '略缩图', + fileName: '文件名', + fileSize: '文件大小', + fileStatue: '状态', + + startUpload: '开始上传', + uploadSuccess: '上传成功', + uploadError: '上传失败', + uploading: '上传中', + uploadWait: '请等待文件上传结束后操作', + reUploadFailed: '重新上传失败文件', + }, + verify: { + error: '验证失败!', + time: '验证校验成功,耗时{time}秒!', + + redoTip: '点击图片可刷新', + + dragText: '请按住滑块拖动', + successText: '验证通过', + }, +}; diff --git a/src/locales/lang/zh-CN/layout.ts b/src/locales/lang/zh-CN/layout.ts new file mode 100644 index 0000000..3dace25 --- /dev/null +++ b/src/locales/lang/zh-CN/layout.ts @@ -0,0 +1,135 @@ +export default { + footer: { onlinePreview: 'JEECG首页', onlineDocument: '在线文档' }, + header: { + // user dropdown + dropdownItemDoc: '官网', + dropdownItemLoginOut: '退出系统', + dropdownItemSwitchPassword: '密码修改', + dropdownItemSwitchDepart: '切换部门', + dropdownItemRefreshCache: '刷新缓存', + dropdownItemSwitchAccount: '账户设置', + + // tooltip + tooltipErrorLog: '错误日志', + tooltipLock: '锁定屏幕', + tooltipNotify: '消息通知', + + tooltipEntryFull: '全屏', + tooltipExitFull: '退出全屏', + + // lock + lockScreenPassword: '锁屏密码', + lockScreen: '锁定屏幕', + lockScreenBtn: '锁定', + + home: '首页', + welcomeIn:"欢迎进入", + refreshCacheComplete: "刷新缓存完成!", + refreshCacheFailure: "刷新缓存失败!", + }, + multipleTab: { + reload: '刷 新', + close: '关闭当前', + closeLeft: '关闭左侧', + closeRight: '关闭右侧', + closeOther: '关闭其它', + closeAll: '关闭全部', + homeDesign: '设计模式', + }, + setting: { + // content mode + contentModeFull: '流式', + contentModeFixed: '定宽', + // topMenu align + topMenuAlignLeft: '居左', + topMenuAlignRight: '居中', + topMenuAlignCenter: '居右', + // menu trigger + menuTriggerNone: '不显示', + menuTriggerBottom: '底部', + menuTriggerTop: '顶部', + // menu type + menuTypeSidebar: '侧边栏导航', + menuTypeMixSidebar: '侧边折叠导航', + menuTypeMix: '顶部混合导航', + menuTypeTopMenu: '顶部栏导航', + + on: '开', + off: '关', + minute: '分钟', + + operatingTitle: '操作成功', + operatingContent: '复制成功,请到 src/settings/projectSetting.ts 中修改配置!', + resetSuccess: '重置成功!', + + copyBtn: '拷贝', + clearBtn: '清空并返回登录', + + drawerTitle: '项目配置', + + darkMode: '主题', + navMode: '导航栏模式', + interfaceFunction: '界面设置', + interfaceDisplay: '界面显示', + animation: '动画', + splitMenu: '顶部左侧组合菜单', + closeMixSidebarOnChange: '切换页面关闭菜单', + + sysTheme: '系统主题', + headerTheme: '顶栏主题', + sidebarTheme: '菜单主题', + + menuDrag: '侧边菜单拖拽', + menuSearch: '菜单搜索', + menuAccordion: '侧边菜单手风琴模式', + menuCollapse: '折叠菜单', + collapseMenuDisplayName: '折叠菜单显示名称', + topMenuLayout: '顶部菜单布局', + menuCollapseButton: '菜单折叠按钮', + contentMode: '内容区域宽度', + expandedMenuWidth: '菜单展开宽度', + + breadcrumb: '面包屑', + breadcrumbIcon: '面包屑图标', + tabs: '标签页', + tabDetail: '标签详情页', + tabsQuickBtn: '标签页快捷按钮', + tabsRedoBtn: '标签页刷新按钮', + tabsFoldBtn: '标签页折叠按钮', + tabsTheme: '标签页样式', + tabsThemeSmooth: '圆滑', + tabsThemeCard: '卡片', + tabsThemeSimple: '极简', + sidebar: '左侧菜单', + header: '顶栏', + footer: '页脚', + fullContent: '全屏内容', + grayMode: '灰色模式', + colorWeak: '色弱模式', + aiIconSHow: 'Ai图标显示', + + progress: '顶部进度条', + switchLoading: '切换loading', + switchAnimation: '切换动画', + animationType: '动画类型', + + autoScreenLock: '自动锁屏', + notAutoScreenLock: '不自动锁屏', + + fixedHeader: '固定header', + fixedSideBar: '固定Sidebar', + + mixSidebarTrigger: '混合菜单触发方式', + triggerHover: '悬停', + triggerClick: '点击', + + mixSidebarFixed: '固定展开菜单', + }, + changePassword: { + changePassword: '修改密码', + oldPassword: '旧密码', + newPassword: '新密码', + confirmNewPassword: '确认新密码', + pleaseEnterNewPassword: '请输入新密码', + }, +}; diff --git a/src/locales/lang/zh-CN/routes/basic.ts b/src/locales/lang/zh-CN/routes/basic.ts new file mode 100644 index 0000000..d154a4e --- /dev/null +++ b/src/locales/lang/zh-CN/routes/basic.ts @@ -0,0 +1,5 @@ +export default { + login: '登录', + errorLogList: '错误日志列表', + defaultHomePage: '默认首页', +}; diff --git a/src/locales/lang/zh-CN/routes/dashboard.ts b/src/locales/lang/zh-CN/routes/dashboard.ts new file mode 100644 index 0000000..04b1b19 --- /dev/null +++ b/src/locales/lang/zh-CN/routes/dashboard.ts @@ -0,0 +1,6 @@ +export default { + dashboard: 'Dashboard', + about: '关于', + workbench: '工作台', + analysis: '分析页', +}; diff --git a/src/locales/lang/zh-CN/routes/demo.ts b/src/locales/lang/zh-CN/routes/demo.ts new file mode 100644 index 0000000..b7c2822 --- /dev/null +++ b/src/locales/lang/zh-CN/routes/demo.ts @@ -0,0 +1,207 @@ +export default { + charts: { + baiduMap: '百度地图', + aMap: '高德地图', + googleMap: '谷歌地图', + charts: '图表', + map: '地图', + line: '折线图', + pie: '饼图', + }, + comp: { + comp: '组件', + basic: '基础组件', + jeecg: 'Jeecg组件', + transition: '动画组件', + countTo: '数字动画', + third: '第三方组件', + + scroll: '滚动组件', + scrollBasic: '基础滚动', + scrollAction: '滚动函数', + virtualScroll: '虚拟滚动', + + tree: 'Tree', + treeBasic: '基础树', + editTree: '可搜索/工具栏', + actionTree: '函数操作示例', + + modal: '弹窗抽屉', + desc: '详情组件', + + lazy: '懒加载组件', + lazyBasic: '基础示例', + lazyTransition: '动画效果', + + verify: '验证组件', + verifyDrag: '拖拽校验', + verifyRotate: '图片还原', + + qrcode: '二维码组件', + strength: '密码强度组件', + upload: '上传组件', + + loading: 'Loading', + + time: '相对时间', + cropperImage: '图片裁剪', + cardList: '卡片列表', + oneToMore: '一对多示例', + vexTable: '一对多示例', + }, + basic: { + button: '按钮组件', + }, + editor: { + editor: '编辑器', + jsonEditor: 'Json编辑器', + markdown: 'markdown编辑器', + + tinymce: '富文本', + tinymceBasic: '基础使用', + tinymceForm: '嵌入form', + }, + excel: { + excel: 'Excel', + customExport: '选择导出格式', + jsonExport: 'JSON数据导出', + arrayExport: 'Array数据导出', + importExcel: '导入', + }, + feat: { + feat: '功能', + icon: '图标', + sessionTimeout: '登录过期', + tabs: '标签页操作', + tabDetail: '标签详情页', + print: '打印', + contextMenu: '右键菜单', + download: '文件下载', + clickOutSide: 'ClickOutSide组件', + imgPreview: '图片预览', + copy: '剪切板', + msg: '消息提示', + watermark: '水印', + ripple: '水波纹', + fullScreen: '全屏', + errorLog: '错误日志', + tab: 'Tab带参', + tab1: 'Tab带参1', + tab2: 'Tab带参2', + menu: 'Menu带参', + menu1: 'Menu带参1', + menu2: 'Menu带参2', + ws: 'websocket测试', + breadcrumb: '面包屑导航', + breadcrumbFlat: '平级模式', + breadcrumbFlatDetail: '平级详情', + breadcrumbChildren: '层级模式', + breadcrumbChildrenDetail: '层级详情', + fullCalendar: '日历(New)', + codemirror: '代码高亮(New)', + }, + flow: { + name: '图形编辑器', + flowChart: '流程图', + }, + form: { + form: 'Form', + basic: '基础表单', + useForm: 'useForm', + refForm: 'RefForm', + advancedForm: '可收缩表单', + ruleForm: '表单验证', + dynamicForm: '动态表单', + customerForm: '自定义组件', + appendForm: '表单增删示例', + }, + modal: { + basic: '弹窗扩展', + drawer: '抽屉扩展', + }, + iframe: { + frame: '外部页面', + antv: 'antVue文档(内嵌)', + doc: '项目文档(内嵌)', + docExternal: '项目文档(外链)', + }, + level: { level: '多级菜单' }, + page: { + page: '页面', + + form: '表单页', + formBasic: '基础表单', + formStep: '分步表单', + formHigh: '高级表单', + + desc: '详情页', + descBasic: '基础详情页', + descHigh: '高级详情页', + + result: '结果页', + resultSuccess: '成功页', + resultFail: '失败页', + + account: '个人页', + accountCenter: '个人中心', + accountSetting: '个人设置', + + exception: '异常页', + netWorkError: '网络错误', + notData: '无数据', + + list: '列表页', + listCard: '卡片列表', + listBasic: '标准列表', + listSearch: '搜索列表', + }, + permission: { + permission: '权限管理', + + front: '基于前端权限', + frontPage: '页面权限', + frontBtn: '按钮权限', + frontTestA: '权限测试页A', + frontTestB: '权限测试页B', + + back: '基于后台权限', + backPage: '页面权限', + backBtn: '按钮权限', + }, + setup: { + page: '引导页', + }, + system: { + moduleName: '系统管理', + account: '账号管理', + account_detail: '账号详情', + password: '修改密码', + dept: '部门管理', + menu: '菜单管理', + test: '测试功能', + role: '角色管理', + }, + table: { + table: 'Table', + basic: '基础表格', + treeTable: '树形表格', + fetchTable: '远程加载示例', + fixedColumn: '固定列', + customerCell: '自定义列', + formTable: '开启搜索区域', + useTable: 'UseTable', + refTable: 'RefTable', + multipleHeader: '多级表头', + mergeHeader: '合并单元格', + nestedTable: '嵌套子表格', + expandTable: '可展开表格', + fixedHeight: '定高/头部自定义', + footerTable: '表尾行合计', + editCellTable: '可编辑单元格', + editRowTable: '可编辑行', + authColumn: '权限列', + }, + jeecg: { + JAreaLinkage: '区域选择', + }, +}; diff --git a/src/locales/lang/zh-CN/sys.ts b/src/locales/lang/zh-CN/sys.ts new file mode 100644 index 0000000..b0c1dc6 --- /dev/null +++ b/src/locales/lang/zh-CN/sys.ts @@ -0,0 +1,113 @@ +export default { + api: { + operationFailed: '操作失败', + errorTip: '错误提示', + errorMessage: '操作失败,系统异常!', + timeoutMessage: '登录超时,请重新登录!', + apiTimeoutMessage: '接口请求超时,请刷新页面重试!', + apiRequestFailed: '请求出错,请稍候重试', + networkException: '网络异常', + networkExceptionMsg: '网络异常,请检查您的网络连接是否正常!', + + errMsg401: '用户没有权限(令牌、用户名、密码错误)!', + errMsg403: '用户得到授权,但是访问是被禁止的。!', + errMsg404: '网络请求错误,未找到该资源!', + errMsg405: '网络请求错误,请求方法未允许!', + errMsg408: '网络请求超时!', + errMsg500: '服务器错误,请联系管理员!', + errMsg501: '网络未实现!', + errMsg502: '网络错误!', + errMsg503: '服务不可用,服务器暂时过载或维护!', + errMsg504: '网络超时!', + errMsg505: 'http版本不支持该请求!', + + registerMsg: '注册成功', + }, + app: { logoutTip: '温馨提醒', logoutMessage: '是否确认退出系统?', menuLoading: '菜单加载中...' }, + errorLog: { + tableTitle: '错误日志列表', + tableColumnType: '类型', + tableColumnDate: '时间', + tableColumnFile: '文件', + tableColumnMsg: '错误信息', + tableColumnStackMsg: 'stack信息', + + tableActionDesc: '详情', + + modalTitle: '错误详情', + + fireVueError: '点击触发vue错误', + fireResourceError: '点击触发资源加载错误', + fireAjaxError: '点击触发ajax错误', + + enableMessage: '只在`/src/settings/projectSetting.ts` 内的useErrorHandle=true时生效.', + }, + exception: { + backLogin: '返回登录', + backHome: '返回首页', + subTitle403: '抱歉,您无权访问此页面。', + subTitle404: '抱歉,您访问的页面不存在。', + subTitle500: '抱歉,服务器报告错误。', + noDataTitle: '当前页无数据', + networkErrorTitle: '网络错误', + networkErrorSubTitle: '抱歉,您的网络连接已断开,请检查您的网络!', + }, + lock: { + unlock: '点击解锁', + alert: '锁屏密码错误', + backToLogin: '返回登录', + entry: '进入系统', + placeholder: '锁屏密码', + }, + login: { + backSignIn: '返回', + signInFormTitle: '登录', + mobileSignInFormTitle: '手机登录', + qrSignInFormTitle: '二维码登录', + signUpFormTitle: '注册', + forgetFormTitle: '重置密码', + + signInTitle: 'Jeecg Boot', + signInDesc: '是中国最具影响力的 企业级低代码平台!在线开发,可视化拖拽设计,零代码实现80%的基础功能~', + policy: '我同意敲敲云隐私政策', + scanSign: `扫码后,即可完成登录`, + scanSuccess: `扫码成功,登录中`, + + loginButton: '登录', + registerButton: '注册', + rememberMe: '记住我', + forgetPassword: '忘记密码?', + otherSignIn: '其他登录方式', + + // notify + loginSuccessTitle: '登录成功', + loginSuccessDesc: '欢迎回来', + + // placeholder + accountPlaceholder: '请输入账号', + passwordPlaceholder: '请输入密码', + inputCodePlaceholder: '请输入验证码', + smsPlaceholder: '请输入验证码', + mobilePlaceholder: '请输入手机号码', + mobileCorrectPlaceholder: '请输入正确的手机号码', + policyPlaceholder: '勾选后才能注册', + diffPwd: '两次输入密码不一致', + + userName: '账号', + password: '密码', + inputCode: '验证码', + confirmPassword: '确认密码', + email: '邮箱', + smsCode: '短信验证码', + mobile: '手机号码', + + subTitleText: '{0}秒后返回登录页面', + + //重置密码页面中文 + authentication:'验证身份', + resetLoginPassword:'重置登录密码', + resetSuccess:'重置成功', + nextStep:'下一步', + goToLogin:'去登录' + }, +}; diff --git a/src/locales/lang/zh_CN.ts b/src/locales/lang/zh_CN.ts new file mode 100644 index 0000000..8fc3305 --- /dev/null +++ b/src/locales/lang/zh_CN.ts @@ -0,0 +1,10 @@ +import { genMessage } from '../helper'; +import antdLocale from 'ant-design-vue/es/locale/zh_CN'; + +const modules = import.meta.glob('./zh-CN/**/*.ts', { eager: true }); +export default { + message: { + ...genMessage(modules as Recordable, 'zh-CN'), + antdLocale, + }, +}; diff --git a/src/locales/setupI18n.ts b/src/locales/setupI18n.ts new file mode 100644 index 0000000..405fb0c --- /dev/null +++ b/src/locales/setupI18n.ts @@ -0,0 +1,44 @@ +import type { App } from 'vue'; +import type { I18n, I18nOptions } from 'vue-i18n'; + +import { createI18n } from 'vue-i18n'; +import { setHtmlPageLang, setLoadLocalePool } from './helper'; +import { localeSetting } from '/@/settings/localeSetting'; +import { useLocaleStoreWithOut } from '/@/store/modules/locale'; + +const { fallback, availableLocales } = localeSetting; + +export let i18n: ReturnType; + +async function createI18nOptions(): Promise { + const localeStore = useLocaleStoreWithOut(); + const locale = localeStore.getLocale; + const defaultLocal = await import(`./lang/${locale}.ts`); + const message = defaultLocal.default?.message ?? {}; + + setHtmlPageLang(locale); + setLoadLocalePool((loadLocalePool) => { + loadLocalePool.push(locale); + }); + + return { + legacy: false, + locale, + fallbackLocale: fallback, + messages: { + [locale]: message, + }, + availableLocales: availableLocales, + sync: true, //If you don’t want to inherit locale from global scope, you need to set sync of i18n component option to false. + silentTranslationWarn: true, // true - warning off + missingWarn: false, + silentFallbackWarn: true, + }; +} + +// setup i18n instance with glob +export async function setupI18n(app: App) { + const options = await createI18nOptions(); + i18n = createI18n(options) as I18n; + app.use(i18n); +} diff --git a/src/locales/useLocale.ts b/src/locales/useLocale.ts new file mode 100644 index 0000000..64bd4a1 --- /dev/null +++ b/src/locales/useLocale.ts @@ -0,0 +1,69 @@ +/** + * Multi-language related operations + */ +import type { LocaleType } from '/#/config'; + +import { i18n } from './setupI18n'; +import { useLocaleStoreWithOut } from '/@/store/modules/locale'; +import { unref, computed } from 'vue'; +import { loadLocalePool, setHtmlPageLang } from './helper'; + +interface LangModule { + message: Recordable; + dateLocale: Recordable; + dateLocaleName: string; +} + +function setI18nLanguage(locale: LocaleType) { + const localeStore = useLocaleStoreWithOut(); + + if (i18n.mode === 'legacy') { + i18n.global.locale = locale; + } else { + (i18n.global.locale as any).value = locale; + } + localeStore.setLocaleInfo({ locale }); + setHtmlPageLang(locale); +} + +export function useLocale() { + const localeStore = useLocaleStoreWithOut(); + const getLocale = computed(() => localeStore.getLocale); + const getShowLocalePicker = computed(() => localeStore.getShowPicker); + + const getAntdLocale = computed((): any => { + return i18n.global.getLocaleMessage(unref(getLocale))?.antdLocale ?? {}; + }); + + // Switching the language will change the locale of useI18n + // And submit to configuration modification + async function changeLocale(locale: LocaleType) { + const globalI18n = i18n.global; + const currentLocale = unref(globalI18n.locale); + if (currentLocale === locale) { + return locale; + } + + if (loadLocalePool.includes(locale)) { + setI18nLanguage(locale); + return locale; + } + const langModule = ((await import(`./lang/${locale}.ts`)) as any).default as LangModule; + if (!langModule) return; + + const { message } = langModule; + + globalI18n.setLocaleMessage(locale, message); + loadLocalePool.push(locale); + + setI18nLanguage(locale); + return locale; + } + + return { + getLocale, + getShowLocalePicker, + changeLocale, + getAntdLocale, + }; +} diff --git a/src/logics/error-handle/index.ts b/src/logics/error-handle/index.ts new file mode 100644 index 0000000..d4d0c82 --- /dev/null +++ b/src/logics/error-handle/index.ts @@ -0,0 +1,178 @@ +/** + * Used to configure the global error handling function, which can monitor vue errors, script errors, static resource errors and Promise errors + */ + +import type { ErrorLogInfo } from '/#/store'; + +import { useErrorLogStoreWithOut } from '/@/store/modules/errorLog'; + +import { ErrorTypeEnum } from '/@/enums/exceptionEnum'; +import { App } from 'vue'; +import projectSetting from '/@/settings/projectSetting'; + +/** + * Handling error stack information + * @param error + */ +function processStackMsg(error: Error) { + if (!error.stack) { + return ''; + } + let stack = error.stack + .replace(/\n/gi, '') // Remove line breaks to save the size of the transmitted content + .replace(/\bat\b/gi, '@') // At in chrome, @ in ff + .split('@') // Split information with @ + .slice(0, 9) // The maximum stack length (Error.stackTraceLimit = 10), so only take the first 10 + .map((v) => v.replace(/^\s*|\s*$/g, '')) // Remove extra spaces + .join('~') // Manually add separators for later display + .replace(/\?[^:]+/gi, ''); // Remove redundant parameters of js file links (?x=1 and the like) + const msg = error.toString(); + if (stack.indexOf(msg) < 0) { + stack = msg + '@' + stack; + } + return stack; +} + +/** + * get comp name + * @param vm + */ +function formatComponentName(vm: any) { + if (vm.$root === vm) { + return { + name: 'root', + path: 'root', + }; + } + + const options = vm.$options as any; + if (!options) { + return { + name: 'anonymous', + path: 'anonymous', + }; + } + const name = options.name || options._componentTag; + return { + name: name, + path: options.__file, + }; +} + +/** + * Configure Vue error handling function + */ + +function vueErrorHandler(err: Error, vm: any, info: string) { + const errorLogStore = useErrorLogStoreWithOut(); + const { name, path } = formatComponentName(vm); + errorLogStore.addErrorLogInfo({ + type: ErrorTypeEnum.VUE, + name, + file: path, + message: err.message, + stack: processStackMsg(err), + detail: info, + url: window.location.href, + }); +} + +/** + * Configure script error handling function + */ +export function scriptErrorHandler(event: Event | string, source?: string, lineno?: number, colno?: number, error?: Error) { + if (event === 'Script error.' && !source) { + return false; + } + const errorInfo: Partial = {}; + colno = colno || (window.event && (window.event as any).errorCharacter) || 0; + errorInfo.message = event as string; + if (error?.stack) { + errorInfo.stack = error.stack; + } else { + errorInfo.stack = ''; + } + const name = source ? source.substr(source.lastIndexOf('/') + 1) : 'script'; + const errorLogStore = useErrorLogStoreWithOut(); + errorLogStore.addErrorLogInfo({ + type: ErrorTypeEnum.SCRIPT, + name: name, + file: source as string, + detail: 'lineno' + lineno, + url: window.location.href, + ...(errorInfo as Pick), + }); + return true; +} + +/** + * Configure Promise error handling function + */ +function registerPromiseErrorHandler() { + window.addEventListener( + 'unhandledrejection', + function (event) { + const errorLogStore = useErrorLogStoreWithOut(); + errorLogStore.addErrorLogInfo({ + type: ErrorTypeEnum.PROMISE, + name: 'Promise Error!', + file: 'none', + detail: 'promise error!', + url: window.location.href, + stack: 'promise error!', + message: event.reason, + }); + }, + true + ); +} + +/** + * Configure monitoring resource loading error handling function + */ +function registerResourceErrorHandler() { + // Monitoring resource loading error(img,script,css,and jsonp) + window.addEventListener( + 'error', + function (e: Event) { + const target = e.target ? e.target : (e.srcElement as any); + const errorLogStore = useErrorLogStoreWithOut(); + errorLogStore.addErrorLogInfo({ + type: ErrorTypeEnum.RESOURCE, + name: 'Resource Error!', + file: (e.target || ({} as any)).currentSrc, + detail: JSON.stringify({ + tagName: target.localName, + html: target.outerHTML, + type: e.type, + }), + url: window.location.href, + stack: 'resource is not found', + message: (e.target || ({} as any)).localName + ' is load error', + }); + }, + true + ); +} + +/** + * Configure global error handling + * @param app + */ +export function setupErrorHandle(app: App) { + const { useErrorHandle } = projectSetting; + if (!useErrorHandle) { + return; + } + // Vue exception monitoring; + app.config.errorHandler = vueErrorHandler; + + // script error + window.onerror = scriptErrorHandler; + + // promise exception + registerPromiseErrorHandler(); + + // Static resource exception + registerResourceErrorHandler(); +} diff --git a/src/logics/initAppConfig.ts b/src/logics/initAppConfig.ts new file mode 100644 index 0000000..a186450 --- /dev/null +++ b/src/logics/initAppConfig.ts @@ -0,0 +1,84 @@ +/** + * Application configuration + */ +import type { ProjectConfig } from '/#/config'; + +import { PROJ_CFG_KEY } from '/@/enums/cacheEnum'; +import projectSetting from '/@/settings/projectSetting'; + +import { updateHeaderBgColor, updateSidebarBgColor } from '/@/logics/theme/updateBackground'; +import { updateColorWeak } from '/@/logics/theme/updateColorWeak'; +import { updateGrayMode } from '/@/logics/theme/updateGrayMode'; +import { updateDarkTheme } from '/@/logics/theme/dark'; +import { changeTheme } from '/@/logics/theme'; + +import { useAppStore } from '/@/store/modules/app'; +import { useLocaleStore } from '/@/store/modules/locale'; + +import { getCommonStoragePrefix, getStorageShortName } from '/@/utils/env'; + +import { primaryColor } from '../../build/config/themeConfig'; +import { Persistent } from '/@/utils/cache/persistent'; +import { deepMerge } from '/@/utils'; +import { ThemeEnum } from '/@/enums/appEnum'; + +// Initial project configuration +export function initAppConfigStore() { + const localeStore = useLocaleStore(); + const appStore = useAppStore(); + let projCfg: ProjectConfig = Persistent.getLocal(PROJ_CFG_KEY) as ProjectConfig; + projCfg = deepMerge(projectSetting, projCfg || {}); + const darkMode = appStore.getDarkMode; + const { + colorWeak, + grayMode, + themeColor, + + headerSetting: { bgColor: headerBgColor } = {}, + menuSetting: { bgColor } = {}, + } = projCfg; + try { + if (themeColor && themeColor !== primaryColor) { + changeTheme(themeColor); + } + + grayMode && updateGrayMode(grayMode); + colorWeak && updateColorWeak(colorWeak); + } catch (error) { + console.log(error); + } + appStore.setProjectConfig(projCfg); + + // init dark mode + updateDarkTheme(darkMode); + if (darkMode === ThemeEnum.DARK) { + updateHeaderBgColor(); + updateSidebarBgColor(); + } else { + headerBgColor && updateHeaderBgColor(headerBgColor); + bgColor && updateSidebarBgColor(bgColor); + } + // init store + localeStore.initLocale(); + + setTimeout(() => { + clearObsoleteStorage(); + }, 16); +} + +/** + * As the version continues to iterate, there will be more and more cache keys stored in localStorage. + * This method is used to delete useless keys + */ +export function clearObsoleteStorage() { + const commonPrefix = getCommonStoragePrefix(); + const shortPrefix = getStorageShortName(); + + [localStorage, sessionStorage].forEach((item: Storage) => { + Object.keys(item).forEach((key) => { + if (key && key.startsWith(commonPrefix) && !key.startsWith(shortPrefix)) { + item.removeItem(key); + } + }); + }); +} diff --git a/src/logics/mitt/routeChange.ts b/src/logics/mitt/routeChange.ts new file mode 100644 index 0000000..1f842eb --- /dev/null +++ b/src/logics/mitt/routeChange.ts @@ -0,0 +1,28 @@ +/** + * Used to monitor routing changes to change the status of menus and tabs. There is no need to monitor the route, because the route status change is affected by the page rendering time, which will be slow + */ + +import mitt from '/@/utils/mitt'; +import type { RouteLocationNormalized } from 'vue-router'; +import { getRawRoute } from '/@/utils'; + +const emitter = mitt(); + +const key = Symbol(); + +let lastChangeTab: RouteLocationNormalized; + +export function setRouteChange(lastChangeRoute: RouteLocationNormalized) { + const r = getRawRoute(lastChangeRoute); + emitter.emit(key, r); + lastChangeTab = r; +} + +export function listenerRouteChange(callback: (route: RouteLocationNormalized) => void, immediate = true) { + emitter.on(key, callback); + immediate && lastChangeTab && callback(lastChangeTab); +} + +export function removeTabChangeListener() { + emitter.clear(); +} diff --git a/src/logics/theme/dark.ts b/src/logics/theme/dark.ts new file mode 100644 index 0000000..2991e09 --- /dev/null +++ b/src/logics/theme/dark.ts @@ -0,0 +1,24 @@ +import { darkCssIsReady, loadDarkThemeCss } from '@rys-fe/vite-plugin-theme/es/client'; +import { addClass, hasClass, removeClass } from '/@/utils/domUtils'; + +export async function updateDarkTheme(mode: string | null = 'light') { + const htmlRoot = document.getElementById('htmlRoot'); + if (!htmlRoot) { + return; + } + const hasDarkClass = hasClass(htmlRoot, 'dark'); + if (mode === 'dark') { + if (import.meta.env.PROD && !darkCssIsReady) { + await loadDarkThemeCss(); + } + htmlRoot.setAttribute('data-theme', 'dark'); + if (!hasDarkClass) { + addClass(htmlRoot, 'dark'); + } + } else { + htmlRoot.setAttribute('data-theme', 'light'); + if (hasDarkClass) { + removeClass(htmlRoot, 'dark'); + } + } +} diff --git a/src/logics/theme/index.ts b/src/logics/theme/index.ts new file mode 100644 index 0000000..d105ce8 --- /dev/null +++ b/src/logics/theme/index.ts @@ -0,0 +1,57 @@ +import { getThemeColors, generateColors } from '../../../build/config/themeConfig'; +import { + replaceStyleVariables, + loadDarkThemeCss, + replaceCssColors, + darkCssIsReady, + linkID, + styleTagId, + appendCssToDom, + getStyleDom, +} from '@rys-fe/vite-plugin-theme/es/client'; +import { mixLighten, mixDarken, tinycolor } from '@rys-fe/vite-plugin-theme/es/colorUtils'; +import { useAppStore } from '/@/store/modules/app'; +import { defHttp } from '/@/utils/http/axios'; + +let cssText = ''; +export async function changeTheme(color: string) { + // update-begin--author:liaozhiyang---date:20231218---for:【QQYUN-6366】升级到antd4.x + const appStore = useAppStore(); + appStore.setProjectConfig({ themeColor: color }); + // update-end--author:liaozhiyang---date:20231218---for:【QQYUN-6366】升级到antd4.x + const colors = generateColors({ + mixDarken, + mixLighten, + tinycolor, + color, + }); + // update-begin--author:liaozhiyang---date:20240322---for:【QQYUN-8570】生产环境暗黑模式下主题色不生效 + if (import.meta.env.PROD && appStore.getDarkMode === 'dark') { + if (!darkCssIsReady && !cssText) { + await loadDarkThemeCss(); + } + const el: HTMLLinkElement = document.getElementById(linkID) as HTMLLinkElement; + if (el?.href) { + // cssText = await fetchCss(el.href) as string; + !cssText && (cssText = await defHttp.get({ url: el.href }, { isTransformResponse: false })); + const colorVariables = [...getThemeColors(color), ...colors]; + const processCss = await replaceCssColors(cssText, colorVariables); + appendCssToDom(getStyleDom(styleTagId) as HTMLStyleElement, processCss); + } + } else { + await replaceStyleVariables({ + colorVariables: [...getThemeColors(color), ...colors], + }); + fixDark(); + } + // update-end--author:liaozhiyang---date:20240322---for:【QQYUN-8570】生产环境暗黑模式下主题色不生效 +} +// 【LOWCOD-2262】修复黑暗模式下切换皮肤无效的问题 +async function fixDark() { + // update-begin--author:liaozhiyang---date:20240322---for:【QQYUN-8570】生产环境暗黑模式下主题色不生效 + const el = document.getElementById(styleTagId); + // update-end--author:liaozhiyang---date:20240322---for:【QQYUN-8570】生产环境暗黑模式下主题色不生效 + if (el) { + el.innerHTML = el.innerHTML.replace(/\\["']dark\\["']/g, `'dark'`); + } +} diff --git a/src/logics/theme/updateBackground.ts b/src/logics/theme/updateBackground.ts new file mode 100644 index 0000000..ffe1b31 --- /dev/null +++ b/src/logics/theme/updateBackground.ts @@ -0,0 +1,92 @@ +import { colorIsDark, lighten, darken } from '/@/utils/color'; +import { useAppStore } from '/@/store/modules/app'; +import { ThemeEnum } from '/@/enums/appEnum'; +import { setCssVar } from './util'; +import { SIDE_BAR_BG_COLOR_LIST, SIDER_LOGO_BG_COLOR_LIST } from '/@/settings/designSetting'; + +const HEADER_BG_COLOR_VAR = '--header-bg-color'; +const HEADER_BG_HOVER_COLOR_VAR = '--header-bg-hover-color'; +const HEADER_MENU_ACTIVE_BG_COLOR_VAR = '--header-active-menu-bg-color'; + +const SIDER_LOGO_BG_COLOR = '--sider-logo-bg-color'; +const SIDER_DARK_BG_COLOR = '--sider-dark-bg-color'; +const SIDER_DARK_DARKEN_BG_COLOR = '--sider-dark-darken-bg-color'; +const SIDER_LIGHTEN_BG_COLOR = '--sider-dark-lighten-bg-color'; + +/** + * Change the background color of the top header + * @param color + */ +export function updateHeaderBgColor(color?: string) { + const appStore = useAppStore(); + const darkMode = appStore.getDarkMode === ThemeEnum.DARK; + if (!color) { + if (darkMode) { + color = '#151515'; + } else { + color = appStore.getHeaderSetting.bgColor; + } + } + // bg color + setCssVar(HEADER_BG_COLOR_VAR, color); + + // hover color + const hoverColor = lighten(color!, 6); + setCssVar(HEADER_BG_HOVER_COLOR_VAR, hoverColor); + setCssVar(HEADER_MENU_ACTIVE_BG_COLOR_VAR, hoverColor); + + // Determine the depth of the color value and automatically switch the theme + const isDark = colorIsDark(color!); + + appStore.setProjectConfig({ + headerSetting: { + theme: isDark || darkMode ? ThemeEnum.DARK : ThemeEnum.LIGHT, + }, + }); +} + +/** + * Change the background color of the left menu + * @param color bg color + */ +export function updateSidebarBgColor(color?: string) { + const appStore = useAppStore(); + + // if (!isHexColor(color)) return; + const darkMode = appStore.getDarkMode === ThemeEnum.DARK; + if (!color) { + if (darkMode) { + color = '#212121'; + } else { + color = appStore.getMenuSetting.bgColor; + } + } + // update-begin--author:liaozhiyang---date:20230811---for:【QQYUN-5922】logo背景色渐变 + let findIndex = SIDE_BAR_BG_COLOR_LIST.findIndex((item) => item === color); + setCssVar(SIDER_LOGO_BG_COLOR, findIndex == -1 ? 'linear-gradient(180deg, #000000, #282828)' : SIDER_LOGO_BG_COLOR_LIST[findIndex]); + // update-end--author:liaozhiyang---date:20230811---for:【QQYUN-5922】llogo背景色渐变 + setCssVar(SIDER_DARK_BG_COLOR, color); + setCssVar(SIDER_DARK_DARKEN_BG_COLOR, darken(color!, 6)); + setCssVar(SIDER_LIGHTEN_BG_COLOR, lighten(color!, 5)); + + // only #ffffff is light + // Only when the background color is #fff, the theme of the menu will be changed to light + // update-begin--author:liaozhiyang---date:20240408---for:【QQYUN-8922】左侧导航栏文字颜色调整区分彩色和暗黑 + let theme; + let isThemeBright = false; + if (['#fff', '#ffffff'].includes(color!.toLowerCase()) && !darkMode) { + theme = ThemeEnum.LIGHT; + } else if (['#009688', '#e74c3c','#037bd5'].includes(color!.toLowerCase()) && !darkMode) { + theme = ThemeEnum.DARK; + isThemeBright = true; + } else { + theme = ThemeEnum.DARK; + } + appStore.setProjectConfig({ + menuSetting: { + theme, + isThemeBright, + }, + }); + // update-end--author:liaozhiyang---date:20240408---for:【QQYUN-8922】左侧导航栏文字颜色调整区分彩色和暗黑 +} diff --git a/src/logics/theme/updateColorWeak.ts b/src/logics/theme/updateColorWeak.ts new file mode 100644 index 0000000..8a0e64a --- /dev/null +++ b/src/logics/theme/updateColorWeak.ts @@ -0,0 +1,9 @@ +import { toggleClass } from './util'; + +/** + * Change the status of the project's color weakness mode + * @param colorWeak + */ +export function updateColorWeak(colorWeak: boolean) { + toggleClass(colorWeak, 'color-weak', document.documentElement); +} diff --git a/src/logics/theme/updateGrayMode.ts b/src/logics/theme/updateGrayMode.ts new file mode 100644 index 0000000..0fd16fe --- /dev/null +++ b/src/logics/theme/updateGrayMode.ts @@ -0,0 +1,9 @@ +import { toggleClass } from './util'; + +/** + * Change project gray mode status + * @param gray + */ +export function updateGrayMode(gray: boolean) { + toggleClass(gray, 'gray-mode', document.documentElement); +} diff --git a/src/logics/theme/util.ts b/src/logics/theme/util.ts new file mode 100644 index 0000000..30aef37 --- /dev/null +++ b/src/logics/theme/util.ts @@ -0,0 +1,11 @@ +const docEle = document.documentElement; +export function toggleClass(flag: boolean, clsName: string, target?: HTMLElement) { + const targetEl = target || document.body; + let { className } = targetEl; + className = className.replace(clsName, ''); + targetEl.className = flag ? `${className} ${clsName} ` : className; +} + +export function setCssVar(prop: string, val: any, dom = docEle) { + dom.style.setProperty(prop, val); +} diff --git a/src/main.ts b/src/main.ts new file mode 100644 index 0000000..537c88d --- /dev/null +++ b/src/main.ts @@ -0,0 +1,141 @@ +import type { MainAppProps } from "#/main"; +import 'uno.css'; +import '/@/design/index.less'; +import 'ant-design-vue/dist/reset.css'; +// 注册图标 +import 'virtual:svg-icons-register'; + +import App from './App.vue'; +import { createApp } from 'vue'; +import { initAppConfigStore } from '/@/logics/initAppConfig'; +import { setupErrorHandle } from '/@/logics/error-handle'; +import { router, createRouter, setupRouter } from '/@/router'; +import { setupRouterGuard } from '/@/router/guard'; +import { setupStore } from '/@/store'; +import { setupGlobDirectives } from '/@/directives'; +import { setupI18n } from '/@/locales/setupI18n'; +import { setupElectron } from "@/electron"; +import { registerGlobComp } from '/@/components/registerGlobComp'; +import { registerThirdComp } from '/@/settings/registerThirdComp'; +import { registerSuper } from '/@/views/super/registerSuper'; +import { useSso } from '/@/hooks/web/useSso'; +import { checkIsQiankunMicro } from "/@/qiankun/micro"; +import { autoUseQiankunMicro } from "/@/qiankun/micro/qiankunMicro"; +import { useAppStoreWithOut } from "@/store/modules/app"; + +// 注册online模块lib +import { registerPackages } from '/@/utils/monorepo/registerPackages'; + +// 程序入口 +async function main() { + if (checkIsQiankunMicro()) { + // 【JEECG作为乾坤子应用】以乾坤子应用模式启动 + // await autoUseQiankunMicro(bootstrap) + await autoUseQiankunMicro(bootstrap) + } else { + // 获取参数 + const props = getMainAppProps(); + // 普通启动 + await bootstrap(props) + } +} + +main(); + +async function bootstrap(props?: MainAppProps) { + // 创建应用实例 + const app = createApp(App); + // 【QQYUN-6329】 + window['JAppRootInstance'] = app; + + // 创建路由 + createRouter(); + + // 配置存储 + setupStore(app); + + // 配置参数 + setupProps(props); + + // 多语言配置,异步情况:语言文件可以从服务器端获得 + await setupI18n(app); + + // 初始化内部系统配置 + initAppConfigStore(); + + // 注册外部模块路由(注册online模块lib) + registerPackages(app); + + // 注册全局组件 + registerGlobComp(app); + + //CAS单点登录 + await useSso().ssoLogin(); + + // 注册super应用路由 + await registerSuper(app); + + // 配置路由 + setupRouter(app); + + // 路由保护 + setupRouterGuard(router); + + // 注册全局指令 + setupGlobDirectives(app); + + // 配置全局错误处理 + setupErrorHandle(app); + + // 注册第三方组件 + await registerThirdComp(app); + + // 配置electron + setupElectron(app) + + // 当路由准备好时再执行挂载( https://next.router.vuejs.org/api/#isready) + await router.isReady(); + + // 挂载应用 + app.mount(getMountContainer(props), true); + + console.log(" vue3 app 加载完成!") + + return app +} + +// 获取应用挂载容器 +function getMountContainer(props?: MainAppProps) { + const id = '#app'; + if (!props?.container?.querySelector) { + return id; + } + return props.container.querySelector(id) ?? id; +} + +// 获取主应用参数 +function getMainAppProps(): MainAppProps { + // 从 queryString 中获取 + const searchParams = new URLSearchParams(window.location.search); + // 隐藏侧边栏(菜单) + let hideSider = searchParams.get('hideSider') === 'true'; + // 隐藏顶部 + let hideHeader = searchParams.get('hideHeader') === 'true'; + // 隐藏 多Tab 切换 + let hideMultiTabs = searchParams.get('hideMultiTabs') === 'true'; + + return { + hideSider, + hideHeader, + hideMultiTabs + } +} + +// 配置主应用参数 +function setupProps(props?: MainAppProps) { + if (!props) { + return + } + const appStore = useAppStoreWithOut(); + appStore.setMainAppProps(props); +} diff --git a/src/qiankun/apps.ts b/src/qiankun/apps.ts new file mode 100644 index 0000000..a6f0358 --- /dev/null +++ b/src/qiankun/apps.ts @@ -0,0 +1,22 @@ +// /** +// *微应用apps +// * @name: 微应用名称 - 具有唯一性 +// * @entry: 微应用入口.必选 - 通过该地址加载微应用, +// * @container: 微应用挂载节点 - 微应用加载完成后将挂载在该节点上 +// * @activeRule: 微应用触发的路由规则 - 触发路由规则后将加载该微应用 +// */ +// //子应用列表 +// const _apps: object[] = []; +// for (const key in import.meta.env) { +// if (key.includes('VITE_APP_SUB_')) { +// const name = key.split('VITE_APP_SUB_')[1]; +// const obj = { +// name, +// entry: import.meta.env[key], +// container: '#content', +// activeRule: name, +// }; +// _apps.push(obj); +// } +// } +// export const apps = _apps; diff --git a/src/qiankun/index.ts b/src/qiankun/index.ts new file mode 100644 index 0000000..23b1a4f --- /dev/null +++ b/src/qiankun/index.ts @@ -0,0 +1,73 @@ +// /** +// * qiankun配置 +// */ +// import { registerMicroApps, setDefaultMountApp, start, runAfterFirstMounted, addGlobalUncaughtErrorHandler } from 'qiankun'; +// import { apps } from './apps'; +// import { getProps, initGlState } from './state'; +// +// /** +// * 重构apps +// */ +// function filterApps() { +// apps.forEach((item) => { +// //主应用需要传递给微应用的数据。 +// item.props = getProps(); +// //微应用触发的路由规则 +// // @ts-ignore +// item.activeRule = genActiveRule('/' + item.activeRule); +// }); +// return apps; +// } +// +// /** +// * 路由监听 +// * @param {*} routerPrefix 前缀 +// */ +// function genActiveRule(routerPrefix) { +// return (location) => location.pathname.startsWith(routerPrefix); +// } +// +// /** +// * 微应用注册 +// */ +// function registerApps() { +// const _apps = filterApps(); +// registerMicroApps(_apps, { +// beforeLoad: [ +// // @ts-ignore +// (loadApp) => { +// console.log('before load', loadApp); +// }, +// ], +// beforeMount: [ +// // @ts-ignore +// (mountApp) => { +// console.log('before mount', mountApp); +// }, +// ], +// afterMount: [ +// // @ts-ignore +// (mountApp) => { +// console.log('before mount', mountApp); +// }, +// ], +// afterUnmount: [ +// // @ts-ignore +// (unloadApp) => { +// console.log('after unload', unloadApp); +// }, +// ], +// }); +// // 设置默认子应用,与 genActiveRule中的参数保持一致 +// // setDefaultMountApp(); +// // 第一个微应用 mount 后需要调用的方法,比如开启一些监控或者埋点脚本。 +// runAfterFirstMounted(() => console.log('开启监控')); +// // 添加全局的未捕获异常处理器。 +// addGlobalUncaughtErrorHandler((event) => console.log(event)); +// // 定义全局状态 +// initGlState(); +// //启动qiankun +// start({}); +// } +// +// export default registerApps; diff --git a/src/qiankun/micro/index.ts b/src/qiankun/micro/index.ts new file mode 100644 index 0000000..859d287 --- /dev/null +++ b/src/qiankun/micro/index.ts @@ -0,0 +1,12 @@ +import {qiankunWindow} from 'vite-plugin-qiankun/dist/helper' + +/** + * 【JEECG作为乾坤子应用】【判断当前是否是以乾坤子应用的模式运行】 + */ +export function checkIsQiankunMicro(): boolean { + return !!qiankunWindow.__POWERED_BY_QIANKUN__; +} + +export function getGlobal() { + return (checkIsQiankunMicro() ? qiankunWindow : window) as Window +} diff --git a/src/qiankun/micro/qiankunMicro.ts b/src/qiankun/micro/qiankunMicro.ts new file mode 100644 index 0000000..9e82f55 --- /dev/null +++ b/src/qiankun/micro/qiankunMicro.ts @@ -0,0 +1,57 @@ +/* +* 【JEECG作为乾坤子应用】 +*/ +import type {App} from 'vue'; +import type {MainAppProps} from "#/main"; + +import {destroyStore} from "@/store"; +import {destroyRouter} from "@/router"; +import {clearComponent} from "@/components/jeecg/JVxeTable/src/componentMap"; + +import {renderWithQiankun} from 'vite-plugin-qiankun/dist/helper'; + +/** + * 以乾坤子应用模式运行 + * @param render + */ +export async function useQiankunMicroApp(render: (props?: MainAppProps) => Promise) { + let instance: Nullable = null; + + // 注册乾坤子应用生命周期函数 + renderWithQiankun({ + async mount(props) { + console.debug('[qiankun-micro] mount - props :', props) + instance = await render({ + container: props.container!, + hideSider: props.hideSider, + hideHeader: props.hideHeader, + hideMultiTabs: props.hideMultiTabs, + }); + }, + bootstrap() { + console.debug('[qiankun-micro] bootstrap'); + }, + update(props) { + console.debug('[qiankun-micro] update: ', props); + }, + unmount(props) { + console.debug('[qiankun-micro] unmount: ', props); + + destroyStore(); + destroyRouter(); + + if (instance) { + clearComponent(); + instance.unmount(); + instance._container.innerHTML = ''; + instance = null; + } + }, + }); + + return instance! +} + +export async function autoUseQiankunMicro(fn: Fn) { + return useQiankunMicroApp(fn) +} diff --git a/src/qiankun/state.ts b/src/qiankun/state.ts new file mode 100644 index 0000000..92aaf03 --- /dev/null +++ b/src/qiankun/state.ts @@ -0,0 +1,38 @@ +// /** +// *公共数据 +// */ +// import { initGlobalState } from 'qiankun'; +// import { store } from '/@/store'; +// import { router } from '/@/router'; +// import { getToken } from '/@/utils/auth'; +// //定义传入子应用的数据 +// export function getProps() { +// return { +// data: { +// publicPath: '/', +// token: getToken(), +// store, +// router, +// }, +// }; +// } +// +// /** +// * 定义全局状态,并返回通信方法,在主应用使用,微应用通过 props 获取通信方法。 +// * @param state 主应用穿的公共数据 +// */ +// export function initGlState(info = { userName: 'admin' }) { +// // 初始化state +// const actions = initGlobalState(info); +// // 设置新的值 +// actions.setGlobalState(info); +// // 注册 观察者 函数 - 响应 globalState 变化,在 globalState 发生改变时触发该 观察者 函数。 +// actions.onGlobalStateChange((newState, prev) => { +// // state: 变更后的状态; prev 变更前的状态 +// console.info('newState', newState); +// console.info('prev', prev); +// for (const key in newState) { +// console.info('onGlobalStateChange', key); +// } +// }); +// } diff --git a/src/router/constant.ts b/src/router/constant.ts new file mode 100644 index 0000000..6879859 --- /dev/null +++ b/src/router/constant.ts @@ -0,0 +1,27 @@ +export const REDIRECT_NAME = 'Redirect'; + +export const PARENT_LAYOUT_NAME = 'ParentLayout'; + +export const PAGE_NOT_FOUND_NAME = 'PageNotFound'; +// update-begin--author:liaozhiyang---date:202401127---for:【issues/7500】vue-router4.5.0版本路由name:PageNotFound同名导致登录进不去 +export const PAGE_NOT_FOUND_NAME_404 = 'PageNotFound404'; +// update-end--author:liaozhiyang---date:202401127---for:【issues/7500】vue-router4.5.0版本路由name:PageNotFound同名导致登录进不去 + +export const EXCEPTION_COMPONENT = () => import('/@/views/sys/exception/Exception.vue'); + +/** + * @description: default layout + */ +export const LAYOUT = () => import('/@/layouts/default/index.vue'); + +/** + * @description: parent-layout + */ +export const getParentLayout = (_name?: string) => { + return () => + new Promise((resolve) => { + resolve({ + name: _name || PARENT_LAYOUT_NAME, + }); + }); +}; diff --git a/src/router/guard/index.ts b/src/router/guard/index.ts new file mode 100644 index 0000000..c567749 --- /dev/null +++ b/src/router/guard/index.ts @@ -0,0 +1,147 @@ +import type { Router, RouteLocationNormalized } from 'vue-router'; +import { useAppStoreWithOut } from '/@/store/modules/app'; +import { useUserStoreWithOut } from '/@/store/modules/user'; +import { useTransitionSetting } from '/@/hooks/setting/useTransitionSetting'; +import { AxiosCanceler } from '/@/utils/http/axios/axiosCancel'; +import { Modal, notification } from 'ant-design-vue'; +import { warn } from '/@/utils/log'; +import { unref } from 'vue'; +import { setRouteChange } from '/@/logics/mitt/routeChange'; +import { createPermissionGuard } from './permissionGuard'; +import { createStateGuard } from './stateGuard'; +import nProgress from 'nprogress'; +import projectSetting from '/@/settings/projectSetting'; +import { createParamMenuGuard } from './paramMenuGuard'; + +// Don't change the order of creation +export function setupRouterGuard(router: Router) { + createPageGuard(router); + createPageLoadingGuard(router); + createHttpGuard(router); + createScrollGuard(router); + createMessageGuard(router); + createProgressGuard(router); + createPermissionGuard(router); + createParamMenuGuard(router); // must after createPermissionGuard (menu has been built.) + createStateGuard(router); +} + +/** + * Hooks for handling page state + */ +function createPageGuard(router: Router) { + const loadedPageMap = new Map(); + + router.beforeEach(async (to) => { + // The page has already been loaded, it will be faster to open it again, you don’t need to do loading and other processing + to.meta.loaded = !!loadedPageMap.get(to.path); + // Notify routing changes + setRouteChange(to); + + return true; + }); + + router.afterEach((to) => { + loadedPageMap.set(to.path, true); + }); +} + +// Used to handle page loading status +function createPageLoadingGuard(router: Router) { + const userStore = useUserStoreWithOut(); + const appStore = useAppStoreWithOut(); + const { getOpenPageLoading } = useTransitionSetting(); + router.beforeEach(async (to) => { + if (!userStore.getToken) { + return true; + } + if (to.meta.loaded) { + return true; + } + + if (unref(getOpenPageLoading)) { + appStore.setPageLoadingAction(true); + return true; + } + + return true; + }); + router.afterEach(async () => { + if (unref(getOpenPageLoading)) { + // TODO Looking for a better way + // The timer simulates the loading time to prevent flashing too fast, + setTimeout(() => { + appStore.setPageLoading(false); + }, 220); + } + return true; + }); +} + +/** + * The interface used to close the current page to complete the request when the route is switched + * @param router + */ +function createHttpGuard(router: Router) { + const { removeAllHttpPending } = projectSetting; + let axiosCanceler: Nullable; + if (removeAllHttpPending) { + axiosCanceler = new AxiosCanceler(); + } + router.beforeEach(async () => { + // Switching the route will delete the previous request + axiosCanceler?.removeAllPending(); + return true; + }); +} + +// Routing switch back to the top +function createScrollGuard(router: Router) { + const isHash = (href: string) => { + return /^#/.test(href); + }; + + const body = document.body; + + router.afterEach(async (to) => { + // scroll top + isHash((to as RouteLocationNormalized & { href: string })?.href) && body.scrollTo(0, 0); + return true; + }); +} + +/** + * Used to close the message instance when the route is switched + * @param router + */ +export function createMessageGuard(router: Router) { + const { closeMessageOnSwitch } = projectSetting; + + router.beforeEach(async () => { + try { + if (closeMessageOnSwitch) { + Modal.destroyAll(); + notification.destroy(); + } + } catch (error) { + warn('message guard error:' + error); + } + return true; + }); +} + +export function createProgressGuard(router: Router) { + const { getOpenNProgress } = useTransitionSetting(); + router.beforeEach(async (to) => { + if (to.meta.loaded) { + return true; + } + unref(getOpenNProgress) && nProgress.start(); + return true; + }); + + router.afterEach(async () => { + unref(getOpenNProgress) && nProgress.done(); + return true; + }); +} diff --git a/src/router/guard/paramMenuGuard.ts b/src/router/guard/paramMenuGuard.ts new file mode 100644 index 0000000..1c75157 --- /dev/null +++ b/src/router/guard/paramMenuGuard.ts @@ -0,0 +1,47 @@ +import type { Router } from 'vue-router'; +import { configureDynamicParamsMenu } from '../helper/menuHelper'; +import { Menu } from '../types'; +import { PermissionModeEnum } from '/@/enums/appEnum'; +import { useAppStoreWithOut } from '/@/store/modules/app'; + +import { usePermissionStoreWithOut } from '/@/store/modules/permission'; + +export function createParamMenuGuard(router: Router) { + const permissionStore = usePermissionStoreWithOut(); + router.beforeEach(async (to, _, next) => { + // filter no name route + if (!to.name) { + next(); + return; + } + + // menu has been built. + if (!permissionStore.getIsDynamicAddedRoute) { + next(); + return; + } + + let menus: Menu[] = []; + if (isBackMode()) { + menus = permissionStore.getBackMenuList; + } else if (isRouteMappingMode()) { + menus = permissionStore.getFrontMenuList; + } + menus.forEach((item) => configureDynamicParamsMenu(item, to.params)); + + next(); + }); +} + +const getPermissionMode = () => { + const appStore = useAppStoreWithOut(); + return appStore.getProjectConfig.permissionMode; +}; + +const isBackMode = () => { + return getPermissionMode() === PermissionModeEnum.BACK; +}; + +const isRouteMappingMode = () => { + return getPermissionMode() === PermissionModeEnum.ROUTE_MAPPING; +}; diff --git a/src/router/guard/permissionGuard.ts b/src/router/guard/permissionGuard.ts new file mode 100644 index 0000000..89a297f --- /dev/null +++ b/src/router/guard/permissionGuard.ts @@ -0,0 +1,222 @@ +import type { Router, RouteRecordRaw } from 'vue-router'; + +import { usePermissionStoreWithOut } from '/@/store/modules/permission'; + +import { PageEnum } from '/@/enums/pageEnum'; +import { useUserStoreWithOut } from '/@/store/modules/user'; + +import { PAGE_NOT_FOUND_ROUTE } from '/@/router/routes/basic'; + +import { RootRoute } from '/@/router/routes'; + +import {isOAuth2AppEnv, isOAuth2DingAppEnv} from '/@/views/sys/login/useLogin'; +import { OAUTH2_THIRD_LOGIN_TENANT_ID } from "/@/enums/cacheEnum"; +import { setAuthCache } from "/@/utils/auth"; +import { PAGE_NOT_FOUND_NAME_404 } from '/@/router/constant'; + +const LOGIN_PATH = PageEnum.BASE_LOGIN; +//auth2登录路由 +const OAUTH2_LOGIN_PAGE_PATH = PageEnum.OAUTH2_LOGIN_PAGE_PATH; + +//分享免登录路由 +const SYS_FILES_PATH = PageEnum.SYS_FILES_PATH; + +// 邮件中的跳转地址,对应此路由,携带token免登录直接去办理页面 +const TOKEN_LOGIN = PageEnum.TOKEN_LOGIN; + +const ROOT_PATH = RootRoute.path; + +//update-begin---author:wangshuai ---date:20220629 for:[issues/I5BG1I]vue3不支持auth2登录------------ +//update-begin---author:wangshuai ---date:20221111 for: [VUEN-2472]分享免登录------------ +const whitePathList: PageEnum[] = [LOGIN_PATH, OAUTH2_LOGIN_PAGE_PATH,SYS_FILES_PATH, TOKEN_LOGIN ]; +//update-end---author:wangshuai ---date:20221111 for: [VUEN-2472]分享免登录------------ +//update-end---author:wangshuai ---date:20220629 for:[issues/I5BG1I]vue3不支持auth2登录------------ + +export function createPermissionGuard(router: Router) { + const userStore = useUserStoreWithOut(); + const permissionStore = usePermissionStoreWithOut(); + + // 自定义首页跳转次数 + let homePathJumpCount = 0; + + router.beforeEach(async (to, from, next) => { + if ( + // 【#6861】跳转到自定义首页的逻辑,只跳转一次即可 + homePathJumpCount < 1 && + from.path === ROOT_PATH && + to.path === PageEnum.BASE_HOME && + userStore.getUserInfo.homePath && + userStore.getUserInfo.homePath !== PageEnum.BASE_HOME + ) { + homePathJumpCount++; + next(userStore.getUserInfo.homePath); + return; + } + + const token = userStore.getToken; + + // Whitelist can be directly entered + if (whitePathList.includes(to.path as PageEnum)) { + if (to.path === LOGIN_PATH && token) { + const isSessionTimeout = userStore.getSessionTimeout; + + //update-begin---author:scott ---date:2023-04-24 for:【QQYUN-4713】登录代码调整逻辑有问题,改造待观察-- + //TODO vben默认写法,暂时不知目的,有问题暂时先注释掉 + //await userStore.afterLoginAction(); + //update-end---author:scott ---date::2023-04-24 for:【QQYUN-4713】登录代码调整逻辑有问题,改造待观察-- + + try { + if (!isSessionTimeout) { + next((to.query?.redirect as string) || '/'); + return; + } + } catch {} + //update-begin---author:wangshuai ---date:20220629 for:[issues/I5BG1I]vue3不支持auth2登录------------ + } else if (to.path === LOGIN_PATH && isOAuth2AppEnv() && !token) { + //退出登录进入此逻辑 + //如果进入的页面是login页面并且当前是OAuth2app环境,并且token为空,就进入OAuth2登录页面 + //update-begin---author:wangshuai ---date:20230224 for:[QQYUN-3440]新建企业微信和钉钉配置表,通过租户模式隔离------------ + if(to.query.tenantId){ + setAuthCache(OAUTH2_THIRD_LOGIN_TENANT_ID,to.query.tenantId) + } + next({ path: OAUTH2_LOGIN_PAGE_PATH }); + //update-end---author:wangshuai ---date:20230224 for:[QQYUN-3440]新建企业微信和钉钉配置表,通过租户模式隔离------------ + return; + //update-end---author:wangshuai ---date:20220629 for:[issues/I5BG1I]vue3不支持auth2登录------------ + } + next(); + return; + } + + // token does not exist + if (!token) { + // You can access without permission. You need to set the routing meta.ignoreAuth to true + if (to.meta.ignoreAuth) { + next(); + return; + } + + //update-begin---author:wangshuai ---date:20220629 for:[issues/I5BG1I]vue3 Auth2未实现------------ + let path = LOGIN_PATH; + if (whitePathList.includes(to.path as PageEnum)) { + // 在免登录白名单,如果进入的页面是login页面并且当前是OAuth2app环境,就进入OAuth2登录页面 + if (to.path === LOGIN_PATH && isOAuth2AppEnv()) { + next({ path: OAUTH2_LOGIN_PAGE_PATH }); + } else { + //在免登录白名单,直接进入 + next(); + } + } else { + //update-begin---author:wangshuai ---date:20230302 for:只有首次登陆并且是企业微信或者钉钉的情况下才会调用------------ + //----------【首次登陆并且是企业微信或者钉钉的情况下才会调用】----------------------------------------------- + //只有首次登陆并且是企业微信或者钉钉的情况下才会调用 + let href = window.location.href; + //判断当前是auth2页面,并且是钉钉/企业微信,并且包含tenantId参数 + if(isOAuth2AppEnv() && href.indexOf("/tenantId/")!= -1){ + let params = to.params; + if(params && params.path && params.path.length>0){ + //直接获取参数最后一位 + setAuthCache(OAUTH2_THIRD_LOGIN_TENANT_ID,params.path[params.path.length-1]) + } + } + //---------【首次登陆并且是企业微信或者钉钉的情况下才会调用】------------------------------------------------ + //update-end---author:wangshuai ---date:20230302 for:只有首次登陆并且是企业微信或者钉钉的情况下才会调用------------ + // 如果当前是在OAuth2APP环境,就跳转到OAuth2登录页面,否则跳转到登录页面 + path = isOAuth2AppEnv() ? OAUTH2_LOGIN_PAGE_PATH : LOGIN_PATH; + } + //update-end---author:wangshuai ---date:20220629 for:[issues/I5BG1I]vue3 Auth2未实现------------ + // redirect login page + const redirectData: { path: string; replace: boolean; query?: Recordable } = { + //update-begin---author:wangshuai ---date:20220629 for:[issues/I5BG1I]vue3 Auth2未实现------------ + path: path, + //update-end---author:wangshuai ---date:20220629 for:[issues/I5BG1I]vue3 Auth2未实现------------ + replace: true, + }; + + //update-begin---author:scott ---date:2023-04-24 for:【QQYUN-4713】登录代码调整逻辑有问题,改造待观察-- + if (to.fullPath) { + console.log("to.fullPath 1",to.fullPath) + console.log("to.path 2",to.path) + + let getFullPath = to.fullPath; + if(getFullPath=='/' || getFullPath=='/500' || getFullPath=='/400' || getFullPath=='/login?redirect=/' || getFullPath=='/login?redirect=/login?redirect=/'){ + return; + } + //update-end---author:scott ---date:2023-04-24 for:【QQYUN-4713】登录代码调整逻辑有问题,改造待观察-- + + redirectData.query = { + ...redirectData.query, + // update-begin-author:sunjianlei date:20230306 for: 修复登录成功后,没有正确重定向的问题 + redirect: to.fullPath, + // update-end-author:sunjianlei date:20230306 for: 修复登录成功后,没有正确重定向的问题 + + }; + } + next(redirectData); + return; + } + + //==============================【首次登录并且是企业微信或者钉钉的情况下才会调用】================== + //判断是免登录页面,如果页面包含/tenantId/,那么就直接前往主页 + if(isOAuth2AppEnv() && to.path.indexOf("/tenantId/") != -1){ + //update-begin---author:wangshuai---date:2024-11-08---for:【TV360X-2958】钉钉登录后打开了敲敲云,换其他账号登录后,再打开敲敲云显示的是原来账号的应用--- + if (isOAuth2DingAppEnv()) { + next(OAUTH2_LOGIN_PAGE_PATH); + } else { + next(userStore.getUserInfo.homePath || PageEnum.BASE_HOME); + } + //update-end---author:wangshuai---date:2024-11-08---for:【TV360X-2958】钉钉登录后打开了敲敲云,换其他账号登录后,再打开敲敲云显示的是原来账号的应用--- + return; + } + //==============================【首次登录并且是企业微信或者钉钉的情况下才会调用】================== + // update-begin--author:liaozhiyang---date:202401127---for:【issues/7500】vue-router4.5.0版本路由name:PageNotFound同名导致登录进不去 + // Jump to the 404 page after processing the login + if (from.path === LOGIN_PATH && to.name === PAGE_NOT_FOUND_NAME_404 && to.fullPath !== (userStore.getUserInfo.homePath || PageEnum.BASE_HOME)) { + next(userStore.getUserInfo.homePath || PageEnum.BASE_HOME); + return; + } + // update-end--author:liaozhiyang---date:202401127---for:【issues/7500】vue-router4.5.0版本路由name:PageNotFound同名导致登录进不去 + + //update-begin---author:scott ---date:2024-02-21 for:【QQYUN-8326】刷新首页,不需要重新获取用户信息--- + // // get userinfo while last fetch time is empty + // if (userStore.getLastUpdateTime === 0) { + // try { + // console.log("--LastUpdateTime---getUserInfoAction-----") + // await userStore.getUserInfoAction(); + // } catch (err) { + // console.info(err); + // next(); + // } + // } + //update-end---author:scott ---date::2024-02-21 for:【QQYUN-8326】刷新首页,不需要重新获获取用户信息--- + // update-begin--author:liaozhiyang---date:20240321---for:【QQYUN-8572】表格行选择卡顿问题(customRender中字典引起的) + if (userStore.getLastUpdateTime === 0) { + userStore.setAllDictItemsByLocal(); + } + // update-end--author:liaozhiyang---date:20240321---for:【QQYUN-8572】表格行选择卡顿问题(customRender中字典引起的) + if (permissionStore.getIsDynamicAddedRoute) { + next(); + return; + } + + // 构建后台菜单路由 + const routes = await permissionStore.buildRoutesAction(); + routes.forEach((route) => { + router.addRoute(route as unknown as RouteRecordRaw); + }); + + router.addRoute(PAGE_NOT_FOUND_ROUTE as unknown as RouteRecordRaw); + permissionStore.setDynamicAddedRoute(true); + // update-begin--author:liaozhiyang---date:202401127---for:【issues/7500】vue-router4.5.0版本路由name:PageNotFound同名导致登录进不去 + if (to.name === PAGE_NOT_FOUND_NAME_404) { + // 动态添加路由后,此处应当重定向到fullPath,否则会加载404页面内容 + next({ path: to.fullPath, replace: true, query: to.query }); + } else { + const redirectPath = (from.query.redirect || to.path) as string; + const redirect = decodeURIComponent(redirectPath); + const nextData = to.path === redirect ? { ...to, replace: true } : { path: redirect }; + next(nextData); + } + // update-end--author:liaozhiyang---date:202401127---for:【issues/7500】vue-router4.5.0版本路由name:PageNotFound同名导致登录进不去 + }); +} diff --git a/src/router/guard/stateGuard.ts b/src/router/guard/stateGuard.ts new file mode 100644 index 0000000..c34513c --- /dev/null +++ b/src/router/guard/stateGuard.ts @@ -0,0 +1,24 @@ +import type { Router } from 'vue-router'; +import { useAppStore } from '/@/store/modules/app'; +import { useMultipleTabStore } from '/@/store/modules/multipleTab'; +import { useUserStore } from '/@/store/modules/user'; +import { usePermissionStore } from '/@/store/modules/permission'; +import { PageEnum } from '/@/enums/pageEnum'; +import { removeTabChangeListener } from '/@/logics/mitt/routeChange'; + +export function createStateGuard(router: Router) { + router.afterEach((to) => { + // Just enter the login page and clear the authentication information + if (to.path === PageEnum.BASE_LOGIN) { + const tabStore = useMultipleTabStore(); + const userStore = useUserStore(); + const appStore = useAppStore(); + const permissionStore = usePermissionStore(); + appStore.resetAllState(); + permissionStore.resetState(); + tabStore.resetState(); + userStore.resetState(); + removeTabChangeListener(); + } + }); +} diff --git a/src/router/helper/menuHelper.ts b/src/router/helper/menuHelper.ts new file mode 100644 index 0000000..0cab746 --- /dev/null +++ b/src/router/helper/menuHelper.ts @@ -0,0 +1,133 @@ +import { AppRouteModule } from '/@/router/types'; +import type { MenuModule, Menu, AppRouteRecordRaw } from '/@/router/types'; +import { findPath, treeMap } from '/@/utils/helper/treeHelper'; +import { cloneDeep } from 'lodash-es'; +import { isUrl } from '/@/utils/is'; +import { RouteParams } from 'vue-router'; +import { toRaw } from 'vue'; + +export function getAllParentPath(treeData: T[], path: string) { + // update-begin--author:sunjianlei---date:220230426---for:【issues/478】修复菜单展开合并BUG + // 原代码 + // const menuList = findPath(treeData, (n) => n.path === path) as Menu[]; + // 先匹配不包含隐藏菜单的路径 + let menuList = findMenuPath(treeData, path, false); + // 如果没有匹配到,再匹配包含隐藏菜单的路径 + if(!(menuList?.length)) { + menuList = findMenuPath(treeData, path, true) + } + // update-end--author:sunjianlei---date:220230426---for:【issues/478】修复菜单展开合并BUG + return (menuList || []).map((item) => item.path); +} + +/** + * 查找菜单路径 + * + * @param treeData + * @param path + * @param matchHide 是否匹配隐藏菜单 + */ +function findMenuPath(treeData: T[], path: string, matchHide: boolean) { + return findPath(treeData, (n) => { + // 隐藏菜单不参与匹配 + if(!matchHide && n.hideMenu) { + return false; + } + return n.path === path + }) as Menu[]; +} + +// 路径处理 +function joinParentPath(menus: Menu[], parentPath = '') { + for (let index = 0; index < menus.length; index++) { + const menu = menus[index]; + // https://next.router.vuejs.org/guide/essentials/nested-routes.html + // Note that nested paths that start with / will be treated as a root path. + // 请注意,以 / 开头的嵌套路径将被视为根路径。 + // This allows you to leverage the component nesting without having to use a nested URL. + // 这允许你利用组件嵌套,而无需使用嵌套 URL。 + if (!(menu.path.startsWith('/') || isUrl(menu.path))) { + // path doesn't start with /, nor is it a url, join parent path + // 路径不以 / 开头,也不是 url,加入父路径 + menu.path = `${parentPath}/${menu.path}`; + } + if (menu?.children?.length) { + joinParentPath(menu.children, menu.meta?.hidePathForChildren ? parentPath : menu.path); + } + } +} + +// Parsing the menu module +export function transformMenuModule(menuModule: MenuModule): Menu { + const { menu } = menuModule; + + const menuList = [menu]; + + joinParentPath(menuList); + return menuList[0]; +} + +// 将路由转换成菜单 +export function transformRouteToMenu(routeModList: AppRouteModule[], routerMapping = false) { + // 借助 lodash 深拷贝 + const cloneRouteModList = cloneDeep(routeModList); + const routeList: AppRouteRecordRaw[] = []; + + // 对路由项进行修改 + cloneRouteModList.forEach((item) => { + if (routerMapping && item.meta.hideChildrenInMenu && typeof item.redirect === 'string') { + item.path = item.redirect; + } + + if (item.meta?.single) { + const realItem = item?.children?.[0]; + realItem && routeList.push(realItem); + } else { + routeList.push(item); + } + }); + // 提取树指定结构 + const list = treeMap(routeList, { + conversion: (node: AppRouteRecordRaw) => { + const { meta: { title, hideMenu = false } = {} } = node; + + return { + ...(node.meta || {}), + meta: node.meta, + name: title, + hideMenu, + alwaysShow:node.alwaysShow||false, + path: node.path, + ...(node.redirect ? { redirect: node.redirect } : {}), + }; + }, + }); + // 路径处理 + joinParentPath(list); + return cloneDeep(list); +} + +/** + * config menu with given params + */ +const menuParamRegex = /(?::)([\s\S]+?)((?=\/)|$)/g; + +export function configureDynamicParamsMenu(menu: Menu, params: RouteParams) { + const { path, paramPath } = toRaw(menu); + let realPath = paramPath ? paramPath : path; + const matchArr = realPath.match(menuParamRegex); + + matchArr?.forEach((it) => { + const realIt = it.substr(1); + if (params[realIt]) { + realPath = realPath.replace(`:${realIt}`, params[realIt] as string); + } + }); + // save original param path. + if (!paramPath && matchArr && matchArr.length > 0) { + menu.paramPath = path; + } + menu.path = realPath; + // children + menu.children?.forEach((item) => configureDynamicParamsMenu(item, params)); +} diff --git a/src/router/helper/routeHelper.ts b/src/router/helper/routeHelper.ts new file mode 100644 index 0000000..a7834c1 --- /dev/null +++ b/src/router/helper/routeHelper.ts @@ -0,0 +1,240 @@ +import type { AppRouteModule, AppRouteRecordRaw } from '/@/router/types'; +import type { Router, RouteRecordNormalized } from 'vue-router'; + +import { getParentLayout, LAYOUT, EXCEPTION_COMPONENT } from '/@/router/constant'; +import { cloneDeep, omit } from 'lodash-es'; +import { warn } from '/@/utils/log'; +import { createRouter, createWebHashHistory } from 'vue-router'; +import { getTenantId, getToken } from "/@/utils/auth"; +import { URL_HASH_TAB, _eval } from '/@/utils'; +//引入online lib路由 +import { packageViews } from '/@/utils/monorepo/dynamicRouter'; +import {useI18n} from "/@/hooks/web/useI18n"; + +export type LayoutMapKey = 'LAYOUT'; +const IFRAME = () => import('/@/views/sys/iframe/FrameBlank.vue'); +const LayoutContent = () => import('/@/layouts/default/content/index.vue'); + +const LayoutMap = new Map Promise>(); + +LayoutMap.set('LAYOUT', LAYOUT); +LayoutMap.set('IFRAME', IFRAME); +//微前端qiankun +LayoutMap.set('LayoutsContent', LayoutContent); + +let dynamicViewsModules: Record Promise>; + +// Dynamic introduction +function asyncImportRoute(routes: AppRouteRecordRaw[] | undefined) { + if (!dynamicViewsModules) { + dynamicViewsModules = import.meta.glob('../../views/**/*.{vue,tsx}'); + //合并online lib路由 + dynamicViewsModules = Object.assign({}, dynamicViewsModules, packageViews); + } + if (!routes) return; + routes.forEach((item) => { + + //【jeecg-boot/issues/I5N2PN】左侧动态菜单怎么做国际化处理 2022-10-09 + //菜单支持国际化翻译 + if (item?.meta?.title) { + const { t } = useI18n(); + if(item.meta.title.includes('t(\'') && t){ + // update-begin--author:liaozhiyang---date:20230906---for:【QQYUN-6390】eval替换成new Function,解决build警告 + item.meta.title = new Function('t', `return ${item.meta.title}`)(t); + // update-end--author:liaozhiyang---date:20230906---for:【QQYUN-6390】eval替换成new Function,解决build警告 + } + } + // update-begin--author:sunjianlei---date:20210918---for:适配旧版路由选项 -------- + // @ts-ignore 适配隐藏路由 + if (item?.hidden) { + item.meta.hideMenu = true; + //是否隐藏面包屑 + item.meta.hideBreadcrumb = true; + } + // @ts-ignore 添加忽略路由配置 + if (item?.route == 0) { + item.meta.ignoreRoute = true; + } + // @ts-ignore 添加是否缓存路由配置 + item.meta.ignoreKeepAlive = !item?.meta.keepAlive; + let token = getToken(); + let tenantId = getTenantId(); + // URL支持{{ window.xxx }}占位符变量 + //update-begin---author:wangshuai ---date:20220711 for:[VUEN-1638]菜单tenantId需要动态生成------------ + item.component = (item.component || '').replace(/{{([^}}]+)?}}/g, (s1, s2) => _eval(s2)).replace('${token}', token).replace('${tenantId}', tenantId); + //update-end---author:wangshuai ---date:20220711 for:[VUEN-1638]菜单tenantId需要动态生成------------ + // 适配 iframe + if (/^\/?http(s)?/.test(item.component as string)) { + item.component = item.component.substring(1, item.component.length); + } + if (/^http(s)?/.test(item.component as string)) { + if (item.meta?.internalOrExternal) { + // @ts-ignore 外部打开 + item.path = item.component; + // update-begin--author:sunjianlei---date:20220408---for: 【VUEN-656】配置外部网址打不开,原因是带了#号,需要替换一下 + item.path = item.path.replace('#', URL_HASH_TAB); + // update-end--author:sunjianlei---date:20220408---for: 【VUEN-656】配置外部网址打不开,原因是带了#号,需要替换一下 + } else { + // @ts-ignore 内部打开 + item.meta.frameSrc = item.component; + } + delete item.component; + } + // update-end--author:sunjianlei---date:20210918---for:适配旧版路由选项 -------- + if (!item.component && item.meta?.frameSrc) { + item.component = 'IFRAME'; + } + let { component, name } = item; + const { children } = item; + if (component) { + const layoutFound = LayoutMap.get(component.toUpperCase()); + if (layoutFound) { + item.component = layoutFound; + } else { + // update-end--author:zyf---date:20220307--for:VUEN-219兼容后台返回动态首页,目的适配跟v2版本配置一致 -------- + if (component.indexOf('dashboard/') > -1) { + //当数据标sys_permission中component没有拼接index时前端需要拼接 + if (component.indexOf('/index') < 0) { + component = component + '/index'; + } + } + // update-end--author:zyf---date:20220307---for:VUEN-219兼容后台返回动态首页,目的适配跟v2版本配置一致 -------- + item.component = dynamicImport(dynamicViewsModules, component as string); + } + } else if (name) { + item.component = getParentLayout(); + } + children && asyncImportRoute(children); + }); +} + +function dynamicImport(dynamicViewsModules: Record Promise>, component: string) { + const keys = Object.keys(dynamicViewsModules); + const matchKeys = keys.filter((key) => { + const k = key.replace('../../views', ''); + const startFlag = component.startsWith('/'); + const endFlag = component.endsWith('.vue') || component.endsWith('.tsx'); + const startIndex = startFlag ? 0 : 1; + const lastIndex = endFlag ? k.length : k.lastIndexOf('.'); + return k.substring(startIndex, lastIndex) === component; + }); + if (matchKeys?.length === 1) { + const matchKey = matchKeys[0]; + return dynamicViewsModules[matchKey]; + } else if (matchKeys?.length > 1) { + warn( + 'Please do not create `.vue` and `.TSX` files with the same file name in the same hierarchical directory under the views folder. This will cause dynamic introduction failure' + ); + return; + } +} + +// Turn background objects into routing objects +export function transformObjToRoute(routeList: AppRouteModule[]): T[] { + routeList.forEach((route) => { + const component = route.component as string; + if (component) { + if (component.toUpperCase() === 'LAYOUT') { + route.component = LayoutMap.get(component.toUpperCase()); + } else { + route.children = [cloneDeep(route)]; + route.component = LAYOUT; + route.name = `${route.name}Parent`; + route.path = ''; + const meta = route.meta || {}; + meta.single = true; + meta.affix = false; + route.meta = meta; + } + } else { + warn('请正确配置路由:' + route?.name + '的component属性'); + } + route.children && asyncImportRoute(route.children); + }); + return routeList as unknown as T[]; +} + +/** + * 将多级路由转换为二级 + */ +export function flatMultiLevelRoutes(routeModules: AppRouteModule[]) { + const modules: AppRouteModule[] = cloneDeep(routeModules); + for (let index = 0; index < modules.length; index++) { + const routeModule = modules[index]; + if (!isMultipleRoute(routeModule)) { + continue; + } + promoteRouteLevel(routeModule); + } + return modules; +} + +//提升路由级别 +function promoteRouteLevel(routeModule: AppRouteModule) { + // Use vue-router to splice menus + let router: Router | null = createRouter({ + routes: [routeModule as unknown as RouteRecordNormalized], + history: createWebHashHistory(), + }); + + const routes = router.getRoutes(); + addToChildren(routes, routeModule.children || [], routeModule); + router = null; + + routeModule.children = routeModule.children?.map((item) => omit(item, 'children')); +} + +// Add all sub-routes to the secondary route +function addToChildren(routes: RouteRecordNormalized[], children: AppRouteRecordRaw[], routeModule: AppRouteModule) { + 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 AppRouteModule); + } + if (child.children?.length) { + addToChildren(routes, child.children, routeModule); + } + } +} + +// Determine whether the level exceeds 2 levels +function isMultipleRoute(routeModule: AppRouteModule) { + if (!routeModule || !Reflect.has(routeModule, 'children') || !routeModule.children?.length) { + return false; + } + + const children = routeModule.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; +} +/** + * 组件地址前加斜杠处理 + * @updateBy:lsq + * @updateDate:2021-09-08 + */ +export function addSlashToRouteComponent(routeList: AppRouteRecordRaw[]) { + routeList.forEach((route) => { + let component = route.component as string; + if (component) { + const layoutFound = LayoutMap.get(component); + if (!layoutFound) { + route.component = component.startsWith('/') ? component : `/${component}`; + } + } + route.children && addSlashToRouteComponent(route.children); + }); + return routeList as unknown as T[]; +} diff --git a/src/router/index.ts b/src/router/index.ts new file mode 100644 index 0000000..474bcc2 --- /dev/null +++ b/src/router/index.ts @@ -0,0 +1,59 @@ +import type { RouteRecordRaw } from 'vue-router'; +import type { App } from 'vue'; + +import { $electron } from "@/electron"; +import { basicRoutes } from './routes'; +import {createRouter as createVueRouter, destroyRouter, router} from './router' + +// 白名单应该包含基本静态路由 +const WHITE_NAME_LIST: string[] = []; +const getRouteNames = (array: any[]) => + array.forEach((item) => { + WHITE_NAME_LIST.push(item.name); + getRouteNames(item.children || []); + }); +getRouteNames(basicRoutes); + +/** + * 创建路由实例 + */ +export function createRouter() { + let router = createVueRouter({ + routes: basicRoutes as unknown as RouteRecordRaw[], + strict: true, + scrollBehavior: () => ({left: 0, top: 0}), + }, + // 如果是 Electron 环境,则使用 hash 路由 + $electron.isElectron(), + ) + + // TODO 【QQYUN-4517】【表单设计器】记录分享路由守卫测试 + // @ts-ignore + router.beforeEach(async (to, from, next) => { + //console.group('【QQYUN-4517】beforeEach'); + //console.warn('from', from); + //console.warn('to', to); + //console.groupEnd(); + next(); + }); +} + +// reset router +export function resetRouter() { + router.getRoutes().forEach((route) => { + const { name } = route; + if (name && !WHITE_NAME_LIST.includes(name as string)) { + router.hasRoute(name) && router.removeRoute(name); + } + }); +} + +// config router +export function setupRouter(app: App) { + app.use(router); +} + +export { + router, + destroyRouter, +} diff --git a/src/router/menus/index.ts b/src/router/menus/index.ts new file mode 100644 index 0000000..97b7199 --- /dev/null +++ b/src/router/menus/index.ts @@ -0,0 +1,126 @@ +import type { Menu, MenuModule } from '/@/router/types'; +import type { RouteRecordNormalized } from 'vue-router'; + +import { useAppStoreWithOut } from '/@/store/modules/app'; +import { usePermissionStore } from '/@/store/modules/permission'; +import { transformMenuModule, getAllParentPath } from '/@/router/helper/menuHelper'; +import { filter } from '/@/utils/helper/treeHelper'; +import { isUrl } from '/@/utils/is'; +import { router } from '/@/router'; +import { PermissionModeEnum } from '/@/enums/appEnum'; +import { pathToRegexp } from 'path-to-regexp'; + +const modules = import.meta.glob('./modules/**/*.ts', { eager: true }); + +const menuModules: MenuModule[] = []; + +Object.keys(modules).forEach((key) => { + const mod = (modules as Recordable)[key].default || {}; + const modList = Array.isArray(mod) ? [...mod] : [mod]; + menuModules.push(...modList); +}); + +// =========================== +// ==========Helper=========== +// =========================== + +const getPermissionMode = () => { + const appStore = useAppStoreWithOut(); + return appStore.getProjectConfig.permissionMode; +}; +const isBackMode = () => { + return getPermissionMode() === PermissionModeEnum.BACK; +}; + +const isRouteMappingMode = () => { + return getPermissionMode() === PermissionModeEnum.ROUTE_MAPPING; +}; + +const isRoleMode = () => { + return getPermissionMode() === PermissionModeEnum.ROLE; +}; + +const staticMenus: Menu[] = []; +(() => { + menuModules.sort((a, b) => { + return (a.orderNo || 0) - (b.orderNo || 0); + }); + + for (const menu of menuModules) { + staticMenus.push(transformMenuModule(menu)); + } +})(); + +async function getAsyncMenus() { + const permissionStore = usePermissionStore(); + if (isBackMode()) { + return permissionStore.getBackMenuList.filter((item) => !item.meta?.hideMenu && !item.hideMenu); + } + if (isRouteMappingMode()) { + return permissionStore.getFrontMenuList.filter((item) => !item.hideMenu); + } + return staticMenus; +} + +export const getMenus = async (): Promise => { + const menus = await getAsyncMenus(); + if (isRoleMode()) { + const routes = router.getRoutes(); + return filter(menus, basicFilter(routes)); + } + return menus; +}; + +export async function getCurrentParentPath(currentPath: string) { + const menus = await getAsyncMenus(); + const allParentPath = await getAllParentPath(menus, currentPath); + return allParentPath?.[0]; +} + +// Get the level 1 menu, delete children +export async function getShallowMenus(): Promise { + const menus = await getAsyncMenus(); + const shallowMenuList = menus.map((item) => ({ ...item, children: undefined })); + if (isRoleMode()) { + const routes = router.getRoutes(); + return shallowMenuList.filter(basicFilter(routes)); + } + return shallowMenuList; +} + +// Get the children of the menu +export async function getChildrenMenus(parentPath: string) { + const menus = await getMenus(); + const parent = menus.find((item) => item.path === parentPath); + if (!parent || !parent.children || !!parent?.meta?.hideChildrenInMenu) { + return [] as Menu[]; + } + if (isRoleMode()) { + const routes = router.getRoutes(); + return filter(parent.children, basicFilter(routes)); + } + return parent.children; +} + +function basicFilter(routes: RouteRecordNormalized[]) { + return (menu: Menu) => { + const matchRoute = routes.find((route) => { + if (isUrl(menu.path)) return true; + + if (route.meta?.carryParam) { + return pathToRegexp(route.path).test(menu.path); + } + const isSame = route.path === menu.path; + if (!isSame) return false; + + if (route.meta?.ignoreAuth) return true; + + return isSame || pathToRegexp(route.path).test(menu.path); + }); + + if (!matchRoute) return false; + menu.icon = (menu.icon || matchRoute.meta.icon) as string; + menu.meta = matchRoute.meta; + return true; + }; +} diff --git a/src/router/router.ts b/src/router/router.ts new file mode 100644 index 0000000..7a847b1 --- /dev/null +++ b/src/router/router.ts @@ -0,0 +1,42 @@ +/* + * 路由实例存储文件,请勿轻易添加其他代码,防止出现 HMR 或其他问题 + */ +import type {Router, RouterHistory} from 'vue-router'; +import {createRouter as createVueRouter, createWebHistory, createWebHashHistory, RouterOptions} from 'vue-router'; + +export let router: Router = null as unknown as Router; + +export function setRouter(r: Router) { + router = r +} + +let webHistory: Nullable = null; + +/** + * 创建路由 + * @param options 参数 + * @param useHashHistory 是否使用 hash 路由,true使用,false不使用hash路由 + */ +export function createRouter(options: Partial, useHashHistory = false) { + const createFn = useHashHistory ? createWebHashHistory : createWebHistory; + webHistory = createFn(import.meta.env.VITE_PUBLIC_PATH); + // app router + let router = createVueRouter({ + history: webHistory, + routes: [], + ...options, + }); + + setRouter(router) + + return router +} + +// 销毁路由 +export function destroyRouter() { + setRouter(null as unknown as Router); + if (webHistory) { + webHistory.destroy(); + } + webHistory = null +} diff --git a/src/router/routes/basic.ts b/src/router/routes/basic.ts new file mode 100644 index 0000000..cdf2d3c --- /dev/null +++ b/src/router/routes/basic.ts @@ -0,0 +1,76 @@ +import type { AppRouteRecordRaw } from '/@/router/types'; +import { t } from '/@/hooks/web/useI18n'; +import { REDIRECT_NAME, LAYOUT, EXCEPTION_COMPONENT, PAGE_NOT_FOUND_NAME, PAGE_NOT_FOUND_NAME_404 } from '/@/router/constant'; + +// 404 on a page +export const PAGE_NOT_FOUND_ROUTE: AppRouteRecordRaw = { + path: '/:path(.*)*', + + name: PAGE_NOT_FOUND_NAME, + component: LAYOUT, + meta: { + title: 'ErrorPage', + hideBreadcrumb: true, + hideMenu: true, + }, + children: [ + { + path: '/:path(.*)*', + // update-begin--author:liaozhiyang---date:202401127---for:【issues/7500】vue-router4.5.0版本路由name:PageNotFound同名导致登录进不去 + name: PAGE_NOT_FOUND_NAME_404, + // update-end--author:liaozhiyang---date:202401127---for:【issues/7500】vue-router4.5.0版本路由name:PageNotFound同名导致登录进不去 + component: EXCEPTION_COMPONENT, + meta: { + title: 'ErrorPage', + hideBreadcrumb: true, + hideMenu: true, + }, + }, + ], +}; + +export const REDIRECT_ROUTE: AppRouteRecordRaw = { + path: '/redirect', + component: LAYOUT, + name: 'RedirectTo', + meta: { + title: REDIRECT_NAME, + hideBreadcrumb: true, + hideMenu: true, + }, + children: [ + { + path: '/redirect/:path(.*)', + name: REDIRECT_NAME, + component: () => import('/@/views/sys/redirect/index.vue'), + meta: { + title: REDIRECT_NAME, + hideBreadcrumb: true, + }, + }, + ], +}; + +export const ERROR_LOG_ROUTE: AppRouteRecordRaw = { + path: '/error-log', + name: 'ErrorLog', + component: LAYOUT, + redirect: '/error-log/list', + meta: { + title: 'ErrorLog', + hideBreadcrumb: true, + hideChildrenInMenu: true, + }, + children: [ + { + path: 'list', + name: 'ErrorLogList', + component: () => import('/@/views/sys/error-log/index.vue'), + meta: { + title: t('routes.basic.errorLogList'), + hideBreadcrumb: true, + currentActiveMenu: '/error-log', + }, + }, + ], +}; diff --git a/src/router/routes/index.ts b/src/router/routes/index.ts new file mode 100644 index 0000000..3b70793 --- /dev/null +++ b/src/router/routes/index.ts @@ -0,0 +1,68 @@ +import type { AppRouteRecordRaw, AppRouteModule } from '/@/router/types'; + +import { PAGE_NOT_FOUND_ROUTE, REDIRECT_ROUTE } from '/@/router/routes/basic'; + +import { mainOutRoutes } from './mainOut'; +import { PageEnum } from '/@/enums/pageEnum'; +import { t } from '/@/hooks/web/useI18n'; + +const modules = import.meta.glob('./modules/**/*.ts', { eager: true }); + +const routeModuleList: AppRouteModule[] = []; + +// 加入到路由集合中 +Object.keys(modules).forEach((key) => { + const mod = (modules as Recordable)[key].default || {}; + const modList = Array.isArray(mod) ? [...mod] : [mod]; + routeModuleList.push(...modList); +}); + +export const asyncRoutes = [PAGE_NOT_FOUND_ROUTE, ...routeModuleList]; + +export const RootRoute: AppRouteRecordRaw = { + path: '/', + name: 'Root', + redirect: PageEnum.BASE_HOME, + meta: { + title: 'Root', + }, +}; + +export const LoginRoute: AppRouteRecordRaw = { + path: '/login', + name: 'Login', + //新版后台登录,如果想要使用旧版登录放开即可 + // component: () => import('/@/views/sys/login/Login.vue'), + component: () => import('/@/views/system/loginmini/MiniLogin.vue'), + meta: { + title: t('routes.basic.login'), + }, +}; + +//update-begin---author:wangshuai ---date:20220629 for:auth2登录页面路由------------ +export const Oauth2LoginRoute: AppRouteRecordRaw = { + path: '/oauth2-app/login', + name: 'oauth2-app-login', + //新版钉钉免登录,如果想要使用旧版放开即可 + // component: () => import('/@/views/sys/login/OAuth2Login.vue'), + component: () => import('/@/views/system/loginmini/OAuth2Login.vue'), + meta: { + title: t('routes.oauth2.login'), + }, +}; +//update-end---author:wangshuai ---date:20220629 for:auth2登录页面路由------------ + +/** + * 【通过token直接静默登录】流程办理登录页面 中转跳转 + */ +export const TokenLoginRoute: AppRouteRecordRaw = { + path: '/tokenLogin', + name: 'TokenLoginRoute', + component: () => import('/@/views/sys/login/TokenLoginPage.vue'), + meta: { + title: '带token登录页面', + ignoreAuth: true, + }, +}; +// Basic routing without permission +export const basicRoutes = [LoginRoute, RootRoute, ...mainOutRoutes, REDIRECT_ROUTE, PAGE_NOT_FOUND_ROUTE, TokenLoginRoute, Oauth2LoginRoute]; diff --git a/src/router/routes/mainOut.ts b/src/router/routes/mainOut.ts new file mode 100644 index 0000000..6ecbaed --- /dev/null +++ b/src/router/routes/mainOut.ts @@ -0,0 +1,22 @@ +/** +The routing of this file will not show the layout. +It is an independent new page. +the contents of the file still need to log in to access + */ +import type { AppRouteModule } from '/@/router/types'; + +// test +// http:ip:port/main-out +export const mainOutRoutes: AppRouteModule[] = [ + { + path: '/main-out', + name: 'MainOut', + component: () => import('/@/views/demo/main-out/index.vue'), + meta: { + title: 'MainOut', + ignoreAuth: true, + }, + }, +]; + +export const mainOutRouteNames = mainOutRoutes.map((item) => item.name); diff --git a/src/router/routes/modules/about.ts b/src/router/routes/modules/about.ts new file mode 100644 index 0000000..d32c4f5 --- /dev/null +++ b/src/router/routes/modules/about.ts @@ -0,0 +1,31 @@ +import type { AppRouteModule } from '/@/router/types'; + +import { LAYOUT } from '/@/router/constant'; +import { t } from '/@/hooks/web/useI18n'; + +const dashboard: AppRouteModule = { + path: '/about', + name: 'About', + component: LAYOUT, + redirect: '/about/index', + meta: { + hideChildrenInMenu: true, + icon: 'simple-icons:about-dot-me', + title: t('routes.dashboard.about'), + orderNo: 100000, + }, + children: [ + { + path: 'index', + name: 'AboutPage', + component: () => import('/@/views/sys/about/index.vue'), + meta: { + title: t('routes.dashboard.about'), + icon: 'simple-icons:about-dot-me', + hideMenu: true, + }, + }, + ], +}; + +export default dashboard; diff --git a/src/router/routes/modules/dashboard.ts b/src/router/routes/modules/dashboard.ts new file mode 100644 index 0000000..d09e816 --- /dev/null +++ b/src/router/routes/modules/dashboard.ts @@ -0,0 +1,37 @@ +import type { AppRouteModule } from '/@/router/types'; + +import { LAYOUT } from '/@/router/constant'; +import { t } from '/@/hooks/web/useI18n'; + +const dashboard: AppRouteModule = { + path: '/dashboard', + name: 'Dashboard', + component: LAYOUT, + redirect: '/dashboard/analysis', + meta: { + orderNo: 10, + icon: 'ion:grid-outline', + title: t('routes.dashboard.dashboard'), + }, + children: [ + { + path: 'analysis', + name: 'Analysis', + component: () => import('/@/views/dashboard/Analysis/index.vue'), + meta: { + // affix: true, + title: t('routes.dashboard.analysis'), + }, + }, + { + path: 'workbench', + name: 'Workbench', + component: () => import('/@/views/dashboard/workbench/index.vue'), + meta: { + title: t('routes.dashboard.workbench'), + }, + }, + ], +}; + +export default dashboard; diff --git a/src/router/routes/modules/demo/charts.ts b/src/router/routes/modules/demo/charts.ts new file mode 100644 index 0000000..1c51067 --- /dev/null +++ b/src/router/routes/modules/demo/charts.ts @@ -0,0 +1,79 @@ +import type { AppRouteModule } from '/@/router/types'; + +import { getParentLayout, LAYOUT } from '/@/router/constant'; +import { t } from '/@/hooks/web/useI18n'; + +const charts: AppRouteModule = { + path: '/charts', + name: 'Charts', + component: LAYOUT, + redirect: '/charts/echarts/map', + meta: { + orderNo: 500, + icon: 'ion:bar-chart-outline', + title: t('routes.demo.charts.charts'), + }, + children: [ + { + path: 'baiduMap', + name: 'BaiduMap', + meta: { + title: t('routes.demo.charts.baiduMap'), + }, + component: () => import('/@/views/demo/charts/map/Baidu.vue'), + }, + { + path: 'aMap', + name: 'AMap', + meta: { + title: t('routes.demo.charts.aMap'), + }, + component: () => import('/@/views/demo/charts/map/Gaode.vue'), + }, + { + path: 'googleMap', + name: 'GoogleMap', + meta: { + title: t('routes.demo.charts.googleMap'), + }, + component: () => import('/@/views/demo/charts/map/Google.vue'), + }, + { + path: 'echarts', + name: 'Echarts', + component: getParentLayout('Echarts'), + meta: { + title: 'Echarts', + }, + redirect: '/charts/echarts/map', + children: [ + { + path: 'map', + name: 'Map', + component: () => import('/@/views/demo/charts/Map.vue'), + meta: { + title: t('routes.demo.charts.map'), + }, + }, + { + path: 'line', + name: 'Line', + component: () => import('/@/views/demo/charts/Line.vue'), + meta: { + title: t('routes.demo.charts.line'), + }, + }, + { + path: 'pie', + name: 'Pie', + component: () => import('/@/views/demo/charts/Pie.vue'), + meta: { + title: t('routes.demo.charts.pie'), + }, + }, + ], + }, + ], +}; + +export default charts; diff --git a/src/router/routes/modules/demo/comp.ts b/src/router/routes/modules/demo/comp.ts new file mode 100644 index 0000000..cc0cc44 --- /dev/null +++ b/src/router/routes/modules/demo/comp.ts @@ -0,0 +1,692 @@ +import type { AppRouteModule } from '/@/router/types'; + +import { getParentLayout, LAYOUT } from '/@/router/constant'; +import { t } from '/@/hooks/web/useI18n'; + +const comp: AppRouteModule = { + path: '/comp', + name: 'Comp', + component: LAYOUT, + redirect: '/comp/basic', + meta: { + orderNo: 30, + icon: 'ion:layers-outline', + title: t('routes.demo.comp.comp'), + }, + + children: [ + { + path: 'jeecg', + name: 'JeecgDemo', + redirect: '/comp/jeecg/basic', + component: getParentLayout('JeecgDemo'), + meta: { + title: t('routes.demo.comp.jeecg'), + }, + children: [ + { + path: 'basic', + name: 'JAreaLinkage', + component: () => import('/@/views/demo/jeecg/JeecgComponents.vue'), + meta: { + title: t('routes.demo.jeecg.JAreaLinkage'), + }, + }, + { + path: 'oneToMore', + name: 'oneToMoreDemo', + component: () => import('/@/views/demo/vextable/index.vue'), + meta: { + title: t('routes.demo.comp.oneToMore'), + }, + }, + ], + }, + { + path: 'basic', + name: 'BasicDemo', + component: getParentLayout('BasicDemo'), + meta: { + title: t('routes.demo.comp.basic'), + }, + children: [ + { + path: 'button', + name: 'ButtonDemo', + component: () => import('/@/views/demo/comp/button/index.vue'), + meta: { + title: t('routes.demo.basic.button'), + }, + }, + { + path: 'icon', + name: 'IconDemo', + component: () => import('/@/views/demo/feat/icon/index.vue'), + meta: { + title: t('routes.demo.feat.icon'), + }, + }, + { + path: 'msg', + name: 'MsgDemo', + component: () => import('/@/views/demo/feat/msg/index.vue'), + meta: { + title: t('routes.demo.feat.msg'), + }, + }, + { + path: 'tabs', + name: 'TabsDemo', + component: () => import('/@/views/demo/feat/tabs/index.vue'), + meta: { + title: t('routes.demo.feat.tabs'), + hideChildrenInMenu: true, + }, + children: [ + { + path: 'detail/:id', + name: 'TabDetail', + component: () => import('/@/views/demo/feat/tabs/TabDetail.vue'), + meta: { + currentActiveMenu: '/comp/basic/tabs', + title: t('routes.demo.feat.tabDetail'), + hideMenu: true, + dynamicLevel: 3, + realPath: '/comp/basic/tabs/detail', + }, + }, + ], + }, + ], + }, + + { + path: 'form', + name: 'FormDemo', + redirect: '/comp/form/basic', + component: getParentLayout('FormDemo'), + meta: { + // icon: 'mdi:form-select', + title: t('routes.demo.form.form'), + }, + children: [ + { + path: 'basic', + name: 'FormBasicDemo', + component: () => import('/@/views/demo/form/index.vue'), + meta: { + title: t('routes.demo.form.basic'), + }, + }, + { + path: 'useForm', + name: 'UseFormDemo', + component: () => import('/@/views/demo/form/UseForm.vue'), + meta: { + title: t('routes.demo.form.useForm'), + }, + }, + { + path: 'refForm', + name: 'RefFormDemo', + component: () => import('/@/views/demo/form/RefForm.vue'), + meta: { + title: t('routes.demo.form.refForm'), + }, + }, + { + path: 'advancedForm', + name: 'AdvancedFormDemo', + component: () => import('/@/views/demo/form/AdvancedForm.vue'), + meta: { + title: t('routes.demo.form.advancedForm'), + }, + }, + { + path: 'ruleForm', + name: 'RuleFormDemo', + component: () => import('/@/views/demo/form/RuleForm.vue'), + meta: { + title: t('routes.demo.form.ruleForm'), + }, + }, + { + path: 'dynamicForm', + name: 'DynamicFormDemo', + component: () => import('/@/views/demo/form/DynamicForm.vue'), + meta: { + title: t('routes.demo.form.dynamicForm'), + }, + }, + { + path: 'customerForm', + name: 'CustomerFormDemo', + component: () => import('/@/views/demo/form/CustomerForm.vue'), + meta: { + title: t('routes.demo.form.customerForm'), + }, + }, + { + path: 'appendForm', + name: 'appendFormDemo', + component: () => import('/@/views/demo/form/AppendForm.vue'), + meta: { + title: t('routes.demo.form.appendForm'), + }, + }, + ], + }, + { + path: 'table', + name: 'TableDemo', + redirect: '/comp/table/basic', + component: getParentLayout('TableDemo'), + meta: { + // icon: 'carbon:table-split', + title: t('routes.demo.table.table'), + }, + + children: [ + { + path: 'basic', + name: 'TableBasicDemo', + component: () => import('/@/views/demo/table/Basic.vue'), + meta: { + title: t('routes.demo.table.basic'), + }, + }, + { + path: 'treeTable', + name: 'TreeTableDemo', + component: () => import('/@/views/demo/table/TreeTable.vue'), + meta: { + title: t('routes.demo.table.treeTable'), + }, + }, + { + path: 'fetchTable', + name: 'FetchTableDemo', + component: () => import('/@/views/demo/table/FetchTable.vue'), + meta: { + title: t('routes.demo.table.fetchTable'), + }, + }, + { + path: 'fixedColumn', + name: 'FixedColumnDemo', + component: () => import('/@/views/demo/table/FixedColumn.vue'), + meta: { + title: t('routes.demo.table.fixedColumn'), + }, + }, + { + path: 'customerCell', + name: 'CustomerCellDemo', + component: () => import('/@/views/demo/table/CustomerCell.vue'), + meta: { + title: t('routes.demo.table.customerCell'), + }, + }, + { + path: 'formTable', + name: 'FormTableDemo', + component: () => import('/@/views/demo/table/FormTable.vue'), + meta: { + title: t('routes.demo.table.formTable'), + }, + }, + { + path: 'useTable', + name: 'UseTableDemo', + component: () => import('/@/views/demo/table/UseTable.vue'), + meta: { + title: t('routes.demo.table.useTable'), + }, + }, + { + path: 'refTable', + name: 'RefTableDemo', + component: () => import('/@/views/demo/table/RefTable.vue'), + meta: { + title: t('routes.demo.table.refTable'), + }, + }, + { + path: 'multipleHeader', + name: 'MultipleHeaderDemo', + component: () => import('/@/views/demo/table/MultipleHeader.vue'), + meta: { + title: t('routes.demo.table.multipleHeader'), + }, + }, + { + path: 'mergeHeader', + name: 'MergeHeaderDemo', + component: () => import('/@/views/demo/table/MergeHeader.vue'), + meta: { + title: t('routes.demo.table.mergeHeader'), + }, + }, + { + path: 'nestedTable', + name: 'nestedTableDemo', + component: () => import('/@/views/demo/table/NestedTable.vue'), + meta: { + title: t('routes.demo.table.nestedTable'), + }, + }, + { + path: 'expandTable', + name: 'ExpandTableDemo', + component: () => import('/@/views/demo/table/ExpandTable.vue'), + meta: { + title: t('routes.demo.table.expandTable'), + }, + }, + { + path: 'fixedHeight', + name: 'FixedHeightDemo', + component: () => import('/@/views/demo/table/FixedHeight.vue'), + meta: { + title: t('routes.demo.table.fixedHeight'), + }, + }, + { + path: 'footerTable', + name: 'FooterTableDemo', + component: () => import('/@/views/demo/table/FooterTable.vue'), + meta: { + title: t('routes.demo.table.footerTable'), + }, + }, + { + path: 'editCellTable', + name: 'EditCellTableDemo', + component: () => import('/@/views/demo/table/EditCellTable.vue'), + meta: { + title: t('routes.demo.table.editCellTable'), + }, + }, + { + path: 'editRowTable', + name: 'EditRowTableDemo', + component: () => import('/@/views/demo/table/EditRowTable.vue'), + meta: { + title: t('routes.demo.table.editRowTable'), + }, + }, + { + path: 'authColumn', + name: 'AuthColumnDemo', + component: () => import('/@/views/demo/table/AuthColumn.vue'), + meta: { + title: t('routes.demo.table.authColumn'), + }, + }, + ], + }, + { + path: 'modal', + name: 'ModalDemo', + redirect: '/comp/modal/basic', + component: getParentLayout('ModalDemo'), + meta: { + title: t('routes.demo.comp.modal'), + }, + children: [ + { + path: 'basic', + name: 'ModalBasicDemo', + component: () => import('/@/views/demo/comp/modal/index.vue'), + meta: { + title: t('routes.demo.comp.modal.basic'), + }, + }, + { + path: 'drawer', + name: 'DrawerDemo', + component: () => import('/@/views/demo/comp/drawer/index.vue'), + meta: { + title: t('routes.demo.comp.modal.drawer'), + }, + }, + ], + }, + + { + path: 'third', + name: 'ThirdDemo', + redirect: '/comp/third/basic', + component: getParentLayout('ModalDemo'), + meta: { + title: t('routes.demo.comp.third'), + }, + children: [ + { + path: 'basic', + name: 'CropperDemo', + component: () => import('/@/views/demo/comp/cropper/index.vue'), + meta: { + title: t('routes.demo.comp.cropperImage'), + }, + }, + { + path: 'qrcode', + name: 'QrCodeDemo', + component: () => import('/@/views/demo/comp/qrcode/index.vue'), + meta: { + title: t('routes.demo.comp.qrcode'), + }, + }, + { + path: 'strength-meter', + name: 'StrengthMeterDemo', + component: () => import('/@/views/demo/comp/strength-meter/index.vue'), + meta: { + title: t('routes.demo.comp.strength'), + }, + }, + { + path: 'upload', + name: 'UploadDemo', + component: () => import('/@/views/demo/comp/upload/index.vue'), + meta: { + title: t('routes.demo.comp.upload'), + }, + }, + { + path: 'loading', + name: 'LoadingDemo', + component: () => import('/@/views/demo/comp/loading/index.vue'), + meta: { + title: t('routes.demo.comp.loading'), + }, + }, + { + path: 'timestamp', + name: 'TimeDemo', + component: () => import('/@/views/demo/comp/time/index.vue'), + meta: { + title: t('routes.demo.comp.time'), + }, + }, + { + path: 'countTo', + name: 'CountTo', + component: () => import('/@/views/demo/comp/count-to/index.vue'), + meta: { + title: t('routes.demo.comp.countTo'), + }, + }, + { + path: 'transition', + name: 'transitionDemo', + component: () => import('/@/views/demo/comp/transition/index.vue'), + meta: { + title: t('routes.demo.comp.transition'), + }, + }, + { + path: 'print', + name: 'Print', + component: () => import('/@/views/demo/feat/print/index.vue'), + meta: { + title: t('routes.demo.feat.print'), + }, + }, + { + path: 'img-preview', + name: 'ImgPreview', + component: () => import('/@/views/demo/feat/img-preview/index.vue'), + meta: { + title: t('routes.demo.feat.imgPreview'), + }, + }, + { + path: 'download', + name: 'DownLoadDemo', + component: () => import('/@/views/demo/feat/download/index.vue'), + meta: { + title: t('routes.demo.feat.download'), + }, + }, + { + path: 'click-out-side', + name: 'ClickOutSideDemo', + component: () => import('/@/views/demo/feat/click-out-side/index.vue'), + meta: { + title: t('routes.demo.feat.clickOutSide'), + }, + }, + { + path: 'copy', + name: 'CopyDemo', + component: () => import('/@/views/demo/feat/copy/index.vue'), + meta: { + title: t('routes.demo.feat.copy'), + }, + }, + { + path: 'ripple', + name: 'RippleDemo', + component: () => import('/@/views/demo/feat/ripple/index.vue'), + meta: { + title: t('routes.demo.feat.ripple'), + }, + }, + ], + }, + { + path: 'tree', + name: 'TreeDemo', + redirect: '/comp/tree/basic', + component: getParentLayout('TreeDemo'), + meta: { + // icon: 'clarity:tree-view-line', + title: t('routes.demo.comp.tree'), + }, + children: [ + { + path: 'basic', + name: 'BasicTreeDemo', + component: () => import('/@/views/demo/tree/index.vue'), + meta: { + title: t('routes.demo.comp.treeBasic'), + }, + }, + { + path: 'editTree', + name: 'EditTreeDemo', + component: () => import('/@/views/demo/tree/EditTree.vue'), + meta: { + title: t('routes.demo.comp.editTree'), + }, + }, + { + path: 'actionTree', + name: 'ActionTreeDemo', + component: () => import('/@/views/demo/tree/ActionTree.vue'), + meta: { + title: t('routes.demo.comp.actionTree'), + }, + }, + ], + }, + { + path: 'editor', + name: 'EditorDemo', + redirect: '/comp/editor/markdown', + component: getParentLayout('EditorDemo'), + meta: { + // icon: 'carbon:table-split', + title: t('routes.demo.editor.editor'), + }, + children: [ + { + path: 'json', + component: () => import('/@/views/demo/editor/json/index.vue'), + name: 'JsonEditorDemo', + meta: { + title: t('routes.demo.editor.jsonEditor'), + }, + }, + { + path: 'markdown', + component: getParentLayout('MarkdownDemo'), + name: 'MarkdownDemo', + meta: { + title: t('routes.demo.editor.markdown'), + }, + redirect: '/comp/editor/markdown/index', + children: [ + { + path: 'index', + name: 'MarkDownBasicDemo', + component: () => import('/@/views/demo/editor/markdown/index.vue'), + meta: { + title: t('routes.demo.editor.tinymceBasic'), + }, + }, + { + path: 'editor', + name: 'MarkDownFormDemo', + component: () => import('/@/views/demo/editor/markdown/Editor.vue'), + meta: { + title: t('routes.demo.editor.tinymceForm'), + }, + }, + ], + }, + + { + path: 'tinymce', + component: getParentLayout('TinymceDemo'), + name: 'TinymceDemo', + meta: { + title: t('routes.demo.editor.tinymce'), + }, + redirect: '/comp/editor/tinymce/index', + children: [ + { + path: 'index', + name: 'TinymceBasicDemo', + component: () => import('/@/views/demo/editor/tinymce/index.vue'), + meta: { + title: t('routes.demo.editor.tinymceBasic'), + }, + }, + { + path: 'editor', + name: 'TinymceFormDemo', + component: () => import('/@/views/demo/editor/tinymce/Editor.vue'), + meta: { + title: t('routes.demo.editor.tinymceForm'), + }, + }, + ], + }, + ], + }, + { + path: 'scroll', + name: 'ScrollDemo', + redirect: '/comp/scroll/basic', + component: getParentLayout('ScrollDemo'), + meta: { + title: t('routes.demo.comp.scroll'), + }, + children: [ + { + path: 'basic', + name: 'BasicScrollDemo', + component: () => import('/@/views/demo/comp/scroll/index.vue'), + meta: { + title: t('routes.demo.comp.scrollBasic'), + }, + }, + { + path: 'action', + name: 'ActionScrollDemo', + component: () => import('/@/views/demo/comp/scroll/Action.vue'), + meta: { + title: t('routes.demo.comp.scrollAction'), + }, + }, + { + path: 'virtualScroll', + name: 'VirtualScrollDemo', + component: () => import('/@/views/demo/comp/scroll/VirtualScroll.vue'), + meta: { + title: t('routes.demo.comp.virtualScroll'), + }, + }, + ], + }, + + { + path: 'desc', + name: 'DescDemo', + component: () => import('/@/views/demo/comp/desc/index.vue'), + meta: { + title: t('routes.demo.comp.desc'), + }, + }, + + { + path: 'lazy', + name: 'LazyDemo', + component: getParentLayout('LazyDemo'), + redirect: '/comp/lazy/basic', + meta: { + title: t('routes.demo.comp.lazy'), + }, + children: [ + { + path: 'basic', + name: 'BasicLazyDemo', + component: () => import('/@/views/demo/comp/lazy/index.vue'), + meta: { + title: t('routes.demo.comp.lazyBasic'), + }, + }, + { + path: 'transition', + name: 'BasicTransitionDemo', + component: () => import('/@/views/demo/comp/lazy/Transition.vue'), + meta: { + title: t('routes.demo.comp.lazyTransition'), + }, + }, + ], + }, + { + path: 'verify', + name: 'VerifyDemo', + component: getParentLayout('VerifyDemo'), + redirect: '/comp/verify/drag', + meta: { + title: t('routes.demo.comp.verify'), + }, + children: [ + { + path: 'drag', + name: 'VerifyDragDemo', + component: () => import('/@/views/demo/comp/verify/index.vue'), + meta: { + title: t('routes.demo.comp.verifyDrag'), + }, + }, + { + path: 'rotate', + name: 'VerifyRotateDemo', + component: () => import('/@/views/demo/comp/verify/Rotate.vue'), + meta: { + title: t('routes.demo.comp.verifyRotate'), + }, + }, + ], + }, + ], +}; + +export default comp; diff --git a/src/router/routes/modules/demo/feat.ts b/src/router/routes/modules/demo/feat.ts new file mode 100644 index 0000000..722eca8 --- /dev/null +++ b/src/router/routes/modules/demo/feat.ts @@ -0,0 +1,196 @@ +import type { AppRouteModule } from '/@/router/types'; + +import { getParentLayout, LAYOUT } from '/@/router/constant'; +import { t } from '/@/hooks/web/useI18n'; + +const feat: AppRouteModule = { + path: '/feat', + name: 'FeatDemo', + component: LAYOUT, + redirect: '/feat/icon', + meta: { + orderNo: 19, + icon: 'ion:git-compare-outline', + title: t('routes.demo.feat.feat'), + }, + + children: [ + { + path: 'ws', + name: 'WebSocket', + component: () => import('/@/views/demo/feat/ws/index.vue'), + meta: { + title: t('routes.demo.feat.ws'), + }, + }, + { + path: 'session-timeout', + name: 'SessionTimeout', + component: () => import('/@/views/demo/feat/session-timeout/index.vue'), + meta: { + title: t('routes.demo.feat.sessionTimeout'), + }, + }, + + { + path: 'breadcrumb', + name: 'BreadcrumbDemo', + redirect: '/feat/breadcrumb/flat', + component: getParentLayout('BreadcrumbDemo'), + meta: { + title: t('routes.demo.feat.breadcrumb'), + }, + + children: [ + { + path: 'flat', + name: 'BreadcrumbFlatDemo', + component: () => import('/@/views/demo/feat/breadcrumb/FlatList.vue'), + meta: { + title: t('routes.demo.feat.breadcrumbFlat'), + }, + }, + { + path: 'flatDetail', + name: 'BreadcrumbFlatDetailDemo', + component: () => import('/@/views/demo/feat/breadcrumb/FlatListDetail.vue'), + meta: { + title: t('routes.demo.feat.breadcrumbFlatDetail'), + hideMenu: true, + hideTab: true, + currentActiveMenu: '/feat/breadcrumb/flat', + }, + }, + { + path: 'children', + name: 'BreadcrumbChildrenDemo', + component: () => import('/@/views/demo/feat/breadcrumb/ChildrenList.vue'), + meta: { + title: t('routes.demo.feat.breadcrumbChildren'), + }, + children: [ + { + path: 'childrenDetail', + name: 'BreadcrumbChildrenDetailDemo', + component: () => import('/@/views/demo/feat/breadcrumb/ChildrenListDetail.vue'), + meta: { + currentActiveMenu: '/feat/breadcrumb/children', + title: t('routes.demo.feat.breadcrumbChildrenDetail'), + //hideTab: true, + // hideMenu: true, + }, + }, + ], + }, + ], + }, + + { + path: 'context-menu', + name: 'ContextMenuDemo', + component: () => import('/@/views/demo/feat/context-menu/index.vue'), + meta: { + title: t('routes.demo.feat.contextMenu'), + }, + }, + + { + path: 'copy', + name: 'CopyDemo', + component: () => import('/@/views/demo/feat/copy/index.vue'), + meta: { + title: t('routes.demo.feat.copy'), + }, + }, + + { + path: 'watermark', + name: 'WatermarkDemo', + component: () => import('/@/views/demo/feat/watermark/index.vue'), + meta: { + title: t('routes.demo.feat.watermark'), + }, + }, + + { + path: 'full-screen', + name: 'FullScreenDemo', + component: () => import('/@/views/demo/feat/full-screen/index.vue'), + meta: { + title: t('routes.demo.feat.fullScreen'), + }, + }, + + { + path: '/error-log', + name: 'ErrorLog', + component: () => import('/@/views/sys/error-log/index.vue'), + meta: { + title: t('routes.demo.feat.errorLog'), + }, + }, + { + path: 'testTab/:id', + name: 'TestTab', + component: () => import('/@/views/demo/feat/tab-params/index.vue'), + meta: { + title: t('routes.demo.feat.tab'), + carryParam: true, + hidePathForChildren: true, + }, + children: [ + { + path: 'testTab/id1', + name: 'TestTab1', + component: () => import('/@/views/demo/feat/tab-params/index.vue'), + meta: { + title: t('routes.demo.feat.tab1'), + carryParam: true, + ignoreRoute: true, + }, + }, + { + path: 'testTab/id2', + name: 'TestTab2', + component: () => import('/@/views/demo/feat/tab-params/index.vue'), + meta: { + title: t('routes.demo.feat.tab2'), + carryParam: true, + ignoreRoute: true, + }, + }, + ], + }, + { + path: 'testParam/:id', + name: 'TestParam', + component: getParentLayout('TestParam'), + meta: { + title: t('routes.demo.feat.menu'), + ignoreKeepAlive: true, + }, + children: [ + { + path: 'sub1', + name: 'TestParam_1', + component: () => import('/@/views/demo/feat/menu-params/index.vue'), + meta: { + title: t('routes.demo.feat.menu1'), + ignoreKeepAlive: true, + }, + }, + { + path: 'sub2', + name: 'TestParam_2', + component: () => import('/@/views/demo/feat/menu-params/index.vue'), + meta: { + title: t('routes.demo.feat.menu2'), + ignoreKeepAlive: true, + }, + }, + ], + }, + ], +}; + +export default feat; diff --git a/src/router/routes/modules/demo/iframe.ts b/src/router/routes/modules/demo/iframe.ts new file mode 100644 index 0000000..95b21d6 --- /dev/null +++ b/src/router/routes/modules/demo/iframe.ts @@ -0,0 +1,48 @@ +import type { AppRouteModule } from '/@/router/types'; + +import { LAYOUT } from '/@/router/constant'; +const IFrame = () => import('/@/views/sys/iframe/FrameBlank.vue'); +import { t } from '/@/hooks/web/useI18n'; + +const iframe: AppRouteModule = { + path: '/frame', + name: 'Frame', + component: LAYOUT, + redirect: '/frame/doc', + meta: { + orderNo: 1000, + icon: 'ion:tv-outline', + title: t('routes.demo.iframe.frame'), + }, + + children: [ + { + path: 'doc', + name: 'Doc', + component: IFrame, + meta: { + frameSrc: 'https://vvbin.cn/doc-next/', + title: t('routes.demo.iframe.doc'), + }, + }, + { + path: 'antv', + name: 'Antv', + component: IFrame, + meta: { + frameSrc: 'https://2x.antdv.com/docs/vue/introduce-cn/', + title: t('routes.demo.iframe.antv'), + }, + }, + { + path: 'https://vvbin.cn/doc-next/', + name: 'DocExternal', + component: IFrame, + meta: { + title: t('routes.demo.iframe.docExternal'), + }, + }, + ], +}; + +export default iframe; diff --git a/src/router/routes/modules/demo/level.ts b/src/router/routes/modules/demo/level.ts new file mode 100644 index 0000000..3cee375 --- /dev/null +++ b/src/router/routes/modules/demo/level.ts @@ -0,0 +1,68 @@ +import type { AppRouteModule } from '/@/router/types'; + +import { getParentLayout, LAYOUT } from '/@/router/constant'; +import { t } from '/@/hooks/web/useI18n'; + +const permission: AppRouteModule = { + path: '/level', + name: 'Level', + component: LAYOUT, + redirect: '/level/menu1/menu1-1/menu1-1-1', + meta: { + orderNo: 2000, + icon: 'ion:menu-outline', + title: t('routes.demo.level.level'), + }, + + children: [ + { + path: 'menu1', + name: 'Menu1Demo', + component: getParentLayout('Menu1Demo'), + meta: { + title: 'Menu1', + }, + redirect: '/level/menu1/menu1-1/menu1-1-1', + children: [ + { + path: 'menu1-1', + name: 'Menu11Demo', + component: getParentLayout('Menu11Demo'), + meta: { + title: 'Menu1-1', + }, + redirect: '/level/menu1/menu1-1/menu1-1-1', + children: [ + { + path: 'menu1-1-1', + name: 'Menu111Demo', + component: () => import('/@/views/demo/level/Menu111.vue'), + meta: { + title: 'Menu111', + }, + }, + ], + }, + { + path: 'menu1-2', + name: 'Menu12Demo', + component: () => import('/@/views/demo/level/Menu12.vue'), + meta: { + title: 'Menu1-2', + }, + }, + ], + }, + { + path: 'menu2', + name: 'Menu2Demo', + component: () => import('/@/views/demo/level/Menu2.vue'), + meta: { + title: 'Menu2', + // ignoreKeepAlive: true, + }, + }, + ], +}; + +export default permission; diff --git a/src/router/routes/modules/demo/page.ts b/src/router/routes/modules/demo/page.ts new file mode 100644 index 0000000..17ab276 --- /dev/null +++ b/src/router/routes/modules/demo/page.ts @@ -0,0 +1,255 @@ +import type { AppRouteModule } from '/@/router/types'; + +import { getParentLayout, LAYOUT } from '/@/router/constant'; +import { ExceptionEnum } from '/@/enums/exceptionEnum'; +import { t } from '/@/hooks/web/useI18n'; + +const ExceptionPage = () => import('/@/views/sys/exception/Exception.vue'); + +const page: AppRouteModule = { + path: '/page-demo', + name: 'PageDemo', + component: LAYOUT, + redirect: '/page-demo/form/basic', + meta: { + orderNo: 20, + icon: 'ion:aperture-outline', + title: t('routes.demo.page.page'), + }, + children: [ + // =============================form start============================= + { + path: 'form', + name: 'FormPage', + redirect: '/page-demo/form/basic', + component: getParentLayout('FormPage'), + meta: { + title: t('routes.demo.page.form'), + }, + children: [ + { + path: 'basic', + name: 'FormBasicPage', + component: () => import('/@/views/demo/page/form/basic/index.vue'), + meta: { + title: t('routes.demo.page.formBasic'), + }, + }, + { + path: 'step', + name: 'FormStepPage', + component: () => import('/@/views/demo/page/form/step/index.vue'), + meta: { + title: t('routes.demo.page.formStep'), + }, + }, + { + path: 'high', + name: 'FormHightPage', + component: () => import('/@/views/demo/page/form/high/index.vue'), + meta: { + title: t('routes.demo.page.formHigh'), + }, + }, + ], + }, + // =============================form end============================= + // =============================desc start============================= + { + path: 'desc', + name: 'DescPage', + component: getParentLayout('DescPage'), + redirect: '/page-demo/desc/basic', + meta: { + title: t('routes.demo.page.desc'), + }, + children: [ + { + path: 'basic', + name: 'DescBasicPage', + component: () => import('/@/views/demo/page/desc/basic/index.vue'), + meta: { + title: t('routes.demo.page.descBasic'), + }, + }, + { + path: 'high', + name: 'DescHighPage', + component: () => import('/@/views/demo/page/desc/high/index.vue'), + meta: { + title: t('routes.demo.page.descHigh'), + }, + }, + ], + }, + // =============================desc end============================= + + // =============================result start============================= + { + path: 'result', + name: 'ResultPage', + redirect: '/page-demo/result/success', + component: getParentLayout('ResultPage'), + + meta: { + title: t('routes.demo.page.result'), + }, + children: [ + { + path: 'success', + name: 'ResultSuccessPage', + component: () => import('/@/views/demo/page/result/success/index.vue'), + meta: { + title: t('routes.demo.page.resultSuccess'), + }, + }, + { + path: 'fail', + name: 'ResultFailPage', + component: () => import('/@/views/demo/page/result/fail/index.vue'), + meta: { + title: t('routes.demo.page.resultFail'), + }, + }, + ], + }, + // =============================result end============================= + + // =============================account start============================= + { + path: 'account', + name: 'AccountPage', + component: getParentLayout('AccountPage'), + redirect: '/page-demo/account/setting', + meta: { + title: t('routes.demo.page.account'), + }, + children: [ + { + path: 'center', + name: 'AccountCenterPage', + component: () => import('/@/views/demo/page/account/center/index.vue'), + meta: { + title: t('routes.demo.page.accountCenter'), + }, + }, + { + path: 'setting', + name: 'AccountSettingPage', + component: () => import('/@/views/demo/page/account/setting/index.vue'), + meta: { + title: t('routes.demo.page.accountSetting'), + }, + }, + ], + }, + // =============================account end============================= + // =============================exception start============================= + { + path: 'exception', + name: 'ExceptionPage', + component: getParentLayout('ExceptionPage'), + redirect: '/page-demo/exception/404', + meta: { + title: t('routes.demo.page.exception'), + }, + children: [ + { + path: '403', + name: 'PageNotAccess', + component: ExceptionPage, + props: { + status: ExceptionEnum.PAGE_NOT_ACCESS, + }, + meta: { + title: '403', + }, + }, + { + path: '404', + name: 'PageNotFound', + component: ExceptionPage, + props: { + status: ExceptionEnum.PAGE_NOT_FOUND, + }, + meta: { + title: '404', + }, + }, + { + path: '500', + name: 'ServiceError', + component: ExceptionPage, + props: { + status: ExceptionEnum.ERROR, + }, + meta: { + title: '500', + }, + }, + { + path: 'net-work-error', + name: 'NetWorkError', + component: ExceptionPage, + props: { + status: ExceptionEnum.NET_WORK_ERROR, + }, + meta: { + title: t('routes.demo.page.netWorkError'), + }, + }, + { + path: 'not-data', + name: 'NotData', + component: ExceptionPage, + props: { + status: ExceptionEnum.PAGE_NOT_DATA, + }, + meta: { + title: t('routes.demo.page.notData'), + }, + }, + ], + }, + // =============================exception end============================= + // =============================list start============================= + { + path: 'list', + name: 'ListPage', + component: getParentLayout('ListPage'), + redirect: '/page-demo/list/card', + meta: { + title: t('routes.demo.page.list'), + }, + children: [ + { + path: 'basic', + name: 'ListBasicPage', + component: () => import('/@/views/demo/page/list/basic/index.vue'), + meta: { + title: t('routes.demo.page.listBasic'), + }, + }, + { + path: 'card', + name: 'ListCardPage', + component: () => import('/@/views/demo/page/list/card/index.vue'), + meta: { + title: t('routes.demo.page.listCard'), + }, + }, + { + path: 'search', + name: 'ListSearchPage', + component: () => import('/@/views/demo/page/list/search/index.vue'), + meta: { + title: t('routes.demo.page.listSearch'), + }, + }, + ], + }, + // =============================list end============================= + ], +}; + +export default page; diff --git a/src/router/routes/modules/demo/permission.ts b/src/router/routes/modules/demo/permission.ts new file mode 100644 index 0000000..e876362 --- /dev/null +++ b/src/router/routes/modules/demo/permission.ts @@ -0,0 +1,92 @@ +import type { AppRouteModule } from '/@/router/types'; + +import { getParentLayout, LAYOUT } from '/@/router/constant'; +import { RoleEnum } from '/@/enums/roleEnum'; +import { t } from '/@/hooks/web/useI18n'; + +const permission: AppRouteModule = { + path: '/permission', + name: 'Permission', + component: LAYOUT, + redirect: '/permission/front/page', + meta: { + orderNo: 15, + icon: 'ion:key-outline', + title: t('routes.demo.permission.permission'), + }, + + children: [ + { + path: 'front', + name: 'PermissionFrontDemo', + component: getParentLayout('PermissionFrontDemo'), + meta: { + title: t('routes.demo.permission.front'), + }, + children: [ + { + path: 'page', + name: 'FrontPageAuth', + component: () => import('/@/views/demo/permission/front/index.vue'), + meta: { + title: t('routes.demo.permission.frontPage'), + }, + }, + { + path: 'btn', + name: 'FrontBtnAuth', + component: () => import('/@/views/demo/permission/front/Btn.vue'), + meta: { + title: t('routes.demo.permission.frontBtn'), + }, + }, + { + path: 'auth-pageA', + name: 'FrontAuthPageA', + component: () => import('/@/views/demo/permission/front/AuthPageA.vue'), + meta: { + title: t('routes.demo.permission.frontTestA'), + roles: [RoleEnum.SUPER], + }, + }, + { + path: 'auth-pageB', + name: 'FrontAuthPageB', + component: () => import('/@/views/demo/permission/front/AuthPageB.vue'), + meta: { + title: t('routes.demo.permission.frontTestB'), + roles: [RoleEnum.TEST], + }, + }, + ], + }, + { + path: 'back', + name: 'PermissionBackDemo', + component: getParentLayout('PermissionBackDemo'), + meta: { + title: t('routes.demo.permission.back'), + }, + children: [ + { + path: 'page', + name: 'BackAuthPage', + component: () => import('/@/views/demo/permission/back/index.vue'), + meta: { + title: t('routes.demo.permission.backPage'), + }, + }, + { + path: 'btn', + name: 'BackAuthBtn', + component: () => import('/@/views/demo/permission/back/Btn.vue'), + meta: { + title: t('routes.demo.permission.backBtn'), + }, + }, + ], + }, + ], +}; + +export default permission; diff --git a/src/router/routes/modules/demo/setup.ts b/src/router/routes/modules/demo/setup.ts new file mode 100644 index 0000000..cec2e29 --- /dev/null +++ b/src/router/routes/modules/demo/setup.ts @@ -0,0 +1,31 @@ +import type { AppRouteModule } from '/@/router/types'; + +import { LAYOUT } from '/@/router/constant'; +import { t } from '/@/hooks/web/useI18n'; + +const setup: AppRouteModule = { + path: '/setup', + name: 'SetupDemo', + component: LAYOUT, + redirect: '/setup/index', + meta: { + orderNo: 90000, + hideChildrenInMenu: true, + icon: 'whh:paintroll', + title: t('routes.demo.setup.page'), + }, + children: [ + { + path: 'index', + name: 'SetupDemoPage', + component: () => import('/@/views/demo/setup/index.vue'), + meta: { + title: t('routes.demo.setup.page'), + icon: 'whh:paintroll', + hideMenu: true, + }, + }, + ], +}; + +export default setup; diff --git a/src/router/routes/modules/demo/system.ts b/src/router/routes/modules/demo/system.ts new file mode 100644 index 0000000..1443416 --- /dev/null +++ b/src/router/routes/modules/demo/system.ts @@ -0,0 +1,86 @@ +import type { AppRouteModule } from '/@/router/types'; + +import { LAYOUT } from '/@/router/constant'; +import { t } from '/@/hooks/web/useI18n'; + +const system: AppRouteModule = { + path: '/system', + name: 'System', + component: LAYOUT, + redirect: '/system/account', + meta: { + orderNo: 2000, + icon: 'ion:settings-outline', + title: t('routes.demo.system.moduleName'), + }, + children: [ + { + path: 'test', + name: 'TestManagement', + meta: { + title: t('routes.demo.system.test'), + ignoreKeepAlive: true, + }, + component: () => import('/@/views/demo/system/test/index.vue'), + }, + { + path: 'account', + name: 'AccountManagement', + meta: { + title: t('routes.demo.system.account'), + ignoreKeepAlive: false, + }, + component: () => import('/@/views/demo/system/account/index.vue'), + }, + { + path: 'account_detail/:id', + name: 'AccountDetail', + meta: { + hideMenu: true, + title: t('routes.demo.system.account_detail'), + ignoreKeepAlive: true, + showMenu: false, + currentActiveMenu: '/system/account', + }, + component: () => import('/@/views/demo/system/account/AccountDetail.vue'), + }, + { + path: 'role', + name: 'RoleManagement', + meta: { + title: t('routes.demo.system.role'), + ignoreKeepAlive: true, + }, + component: () => import('/@/views/demo/system/role/index.vue'), + }, + { + path: 'menu', + name: 'MenuManagement', + meta: { + title: t('routes.demo.system.menu'), + ignoreKeepAlive: true, + }, + component: () => import('/@/views/demo/system/menu/index.vue'), + }, + { + path: 'dept', + name: 'DeptManagement', + meta: { + title: t('routes.demo.system.dept'), + ignoreKeepAlive: true, + }, + component: () => import('/@/views/demo/system/dept/index.vue'), + }, + { + path: 'changePassword', + name: 'ChangePassword', + meta: { + title: t('routes.demo.system.password'), + ignoreKeepAlive: true, + }, + component: () => import('/@/views/demo/system/password/index.vue'), + }, + ], +}; + +export default system; diff --git a/src/router/routes/staticRouter.ts b/src/router/routes/staticRouter.ts new file mode 100644 index 0000000..e7e95e1 --- /dev/null +++ b/src/router/routes/staticRouter.ts @@ -0,0 +1,23 @@ +import type { AppRouteRecordRaw } from '/@/router/types'; +import { LAYOUT } from '/@/router/constant'; + +export const AI_ROUTE: AppRouteRecordRaw = { + path: '', + name: 'ai-parent', + component: LAYOUT, + meta: { + title: 'ai', + }, + children: [ + { + path: '/ai', + name: 'ai', + component: () => import('/@/views/dashboard/ai/index.vue'), + meta: { + title: 'AI助手', + }, + }, + ], +}; + +export const staticRoutesList = [AI_ROUTE]; diff --git a/src/router/types.ts b/src/router/types.ts new file mode 100644 index 0000000..5be6ce6 --- /dev/null +++ b/src/router/types.ts @@ -0,0 +1,59 @@ +import type { RouteRecordRaw, RouteMeta } from 'vue-router'; +import { RoleEnum } from '/@/enums/roleEnum'; +import { defineComponent } from 'vue'; + +export type Component = ReturnType | (() => Promise) | (() => Promise); + +// @ts-ignore +export interface AppRouteRecordRaw extends Omit { + name: string; + meta: RouteMeta; + component?: Component | string; + components?: Component; + children?: AppRouteRecordRaw[]; + props?: Recordable; + fullPath?: string; + alwaysShow?: boolean; +} + +export interface MenuTag { + type?: 'primary' | 'error' | 'warn' | 'success'; + content?: string; + dot?: boolean; +} + +export interface Menu { + name: string; + + icon?: string; + + path: string; + + // path contains param, auto assignment. + paramPath?: string; + + disabled?: boolean; + + children?: Menu[]; + + orderNo?: number; + + roles?: RoleEnum[]; + + meta?: Partial; + + tag?: MenuTag; + + hideMenu?: boolean; + + alwaysShow?: boolean; + +} + +export interface MenuModule { + orderNo?: number; + menu: Menu; +} + +// export type AppRouteModule = RouteModule | AppRouteRecordRaw; +export type AppRouteModule = AppRouteRecordRaw; diff --git a/src/settings/componentSetting.ts b/src/settings/componentSetting.ts new file mode 100644 index 0000000..e33f342 --- /dev/null +++ b/src/settings/componentSetting.ts @@ -0,0 +1,93 @@ +// 用于配置某些组件的常规配置,而无需修改组件 + +import type { SorterResult } from '../components/Table'; + +export default { + // 表格配置 + table: { + // 表格接口请求通用配置,可在组件prop覆盖 + // 支持 xxx.xxx.xxx格式 + fetchSetting: { + // 传给后台的当前页字段 + pageField: 'pageNo', + // 传给后台的每页显示多少条的字段 + sizeField: 'pageSize', + // 接口返回表格数据的字段 + listField: 'records', + // 接口返回表格总数的字段 + totalField: 'total', + }, + // 可选的分页选项 + pageSizeOptions: ['10', '50', '80', '100'], + // 表格默认尺寸 + defaultSize: 'middle', + //默认每页显示多少条 + defaultPageSize: 10, + // 默认排序方法 + defaultSortFn: (sortInfo: SorterResult) => { + //update-begin-author:taoyan date:2022-10-21 for: VUEN-2199【表单设计器】多字段排序 + if(sortInfo instanceof Array){ + let sortInfoArray:any[] = [] + for(let item of sortInfo){ + let info = getSort(item); + if(info){ + sortInfoArray.push(info) + } + } + return { + sortInfoString: JSON.stringify(sortInfoArray) + } + }else{ + let info = getSort(sortInfo) + return info || {} + } + //update-end-author:taoyan date:2022-10-21 for: VUEN-2199【表单设计器】多字段排序 + }, + // 自定义过滤方法 + defaultFilterFn: (data: Partial>) => { + return data; + }, + // update-begin--author:liaozhiyang---date:20240424---for:【issues/1188】BasicTable加上scrollToFirstRowOnChange类型定义 + scrollToFirstRowOnChange: false, + // update-end--author:liaozhiyang---date:20240424---for:【issues/1188】BasicTable加上scrollToFirstRowOnChange类型定义 + }, + // 滚动组件配置 + scrollbar: { + // 是否使用原生滚动样式 + // 开启后,菜单,弹窗,抽屉会使用原生滚动条组件 + native: false, + }, + //表单配置 + form: { + labelCol: { + xs: { span: 24 }, + sm: { span: 4 }, + xl: { span: 6 }, + xxl: { span: 4 }, + }, + wrapperCol: { + xs: { span: 24 }, + sm: { span: 18 }, + }, + //表单默认冒号 + colon: true, + }, +}; + +/** + * 获取排序信息 + * @param item + */ +function getSort(item){ + const { field, order } = item; + if (field && order) { + let sortType = 'ascend' == order ? 'asc' : 'desc'; + return { + // 排序字段 + column: field, + // 排序方式 asc/desc + order: sortType, + }; + } + return '' +} diff --git a/src/settings/designSetting.ts b/src/settings/designSetting.ts new file mode 100644 index 0000000..fddd4ff --- /dev/null +++ b/src/settings/designSetting.ts @@ -0,0 +1,71 @@ +import { ThemeEnum } from '../enums/appEnum'; + +export const prefixCls = 'jeecg'; + +export const darkMode = ThemeEnum.LIGHT; + +// app theme preset color +export const APP_PRESET_COLOR_LIST: string[] = [ + '#0960bd', + '#1890ff', + '#009688', + '#536dfe', + '#ff5c93', + '#13c2c2', + '#52c41a', + '#ee4f12', + '#0096c7', + '#9c27b0', + '#ff9800', +]; + +// header preset color +export const HEADER_PRESET_BG_COLOR_LIST: string[] = [ + '#ffffff', + '#151515', + '#009688', + '#5172DC', + '#018ffb', + '#13c2c2', + '#e74c3c', + '#52c41a', + '#394664', + '#faad14', + '#383f45', +]; + +// sider preset color +export const SIDE_BAR_BG_COLOR_LIST: string[] = [ + '#001529', + // '#212121', + '#009688', + '#273352', + '#ffffff', + '#191b24', + // '#191a23', + '#037bd5', + '#304156', + '#001628', + '#28333E', + // '#344058', + '#e74c3c', + '#383f45', +]; + +// sider logo line preset color [logo����ɫ] +export const SIDER_LOGO_BG_COLOR_LIST: string[] = [ + 'linear-gradient(180deg, #000000, #021d37)', + // 'linear-gradient(180deg, #000000, #282828)', + 'linear-gradient(180deg, #078d80, #029184)', + 'linear-gradient(180deg, #1c253e, #2b385c)', + 'linear-gradient(180deg, #ffffff, #ffffff)', + 'linear-gradient(180deg, #000000, #242735)', + // 'linear-gradient(180deg, #000000, #1d1f2a)', + 'linear-gradient(180deg, #1d77bb, #188efa)', + 'linear-gradient(180deg, #304156, #32455d)', + 'linear-gradient(180deg, #000000, #001f39)', + 'linear-gradient(180deg, #000000, #2b3743)', + // 'linear-gradient(180deg, #344058, #374560)', + 'linear-gradient(180deg, #e83723, #e52611)', + 'linear-gradient(180deg, #383f45, #3b434b)', +]; diff --git a/src/settings/encryptionSetting.ts b/src/settings/encryptionSetting.ts new file mode 100644 index 0000000..e9266f7 --- /dev/null +++ b/src/settings/encryptionSetting.ts @@ -0,0 +1,13 @@ +import { isDevMode } from '/@/utils/env'; + +// 缓存默认过期时间 +export const DEFAULT_CACHE_TIME = 60 * 60 * 24 * 7; + +// 开启缓存加密后,加密密钥。采用aes加密 +export const cacheCipher = { + key: '_11111000001111@', + iv: '@11111000001111_', +}; + +// 是否加密缓存,默认生产环境加密 +export const enableStorageEncryption = false; diff --git a/src/settings/localeSetting.ts b/src/settings/localeSetting.ts new file mode 100644 index 0000000..304f807 --- /dev/null +++ b/src/settings/localeSetting.ts @@ -0,0 +1,30 @@ +import type { DropMenu } from '../components/Dropdown'; +import type { LocaleSetting, LocaleType } from '/#/config'; + +export const LOCALE: { [key: string]: LocaleType } = { + ZH_CN: 'zh_CN', + EN_US: 'en', +}; + +export const localeSetting: LocaleSetting = { + // 是否显示语言选择器 + showPicker: true, + // 当前语言 + locale: LOCALE.ZH_CN, + // 默认语言 + fallback: LOCALE.ZH_CN, + // 允许的语言 + availableLocales: [LOCALE.ZH_CN, LOCALE.EN_US], +}; + +// 语言列表 +export const localeList: DropMenu[] = [ + { + text: '简体中文', + event: LOCALE.ZH_CN, + }, + { + text: 'English', + event: LOCALE.EN_US, + }, +]; diff --git a/src/settings/projectSetting.ts b/src/settings/projectSetting.ts new file mode 100644 index 0000000..60e2ddd --- /dev/null +++ b/src/settings/projectSetting.ts @@ -0,0 +1,204 @@ +import type { ProjectConfig } from '/#/config'; +import { MenuTypeEnum, MenuModeEnum, TriggerEnum, MixSidebarTriggerEnum } from '/@/enums/menuEnum'; +import { CacheTypeEnum } from '/@/enums/cacheEnum'; +import { + ContentEnum, + PermissionModeEnum, + ThemeEnum, + RouterTransitionEnum, + SettingButtonPositionEnum, + SessionTimeoutProcessingEnum, + TabsThemeEnum, +} from '/@/enums/appEnum'; +import { SIDE_BAR_BG_COLOR_LIST, HEADER_PRESET_BG_COLOR_LIST } from './designSetting'; +import { primaryColor } from '../../build/config/themeConfig'; +import { darkMode } from '/@/settings/designSetting'; + +// ! 改动后需要清空浏览器缓存 +const setting: ProjectConfig = { + // 是否显示SettingButton + showSettingButton: true, + + // 是否显示主题切换按钮 + showDarkModeToggle: true, + + // 设置按钮位置 可选项 + // SettingButtonPositionEnum.AUTO: 自动选择 + // SettingButtonPositionEnum.HEADER: 位于头部 + // SettingButtonPositionEnum.FIXED: 固定在右侧 + settingButtonPosition: SettingButtonPositionEnum.AUTO, + + // 权限模式,默认前端角色权限模式 + // ROUTE_MAPPING: 前端模式(菜单由路由生成,默认) + // ROLE:前端模式(菜单路由分开) + // BACK:后台模式 + permissionMode: PermissionModeEnum.BACK, + + // 权限缓存存放位置。默认存放于localStorage + permissionCacheType: CacheTypeEnum.LOCAL, + + // 会话超时处理方案 + // SessionTimeoutProcessingEnum.ROUTE_JUMP: 路由跳转到登录页 + // SessionTimeoutProcessingEnum.PAGE_COVERAGE: 生成登录弹窗,覆盖当前页面 + sessionTimeoutProcessing: SessionTimeoutProcessingEnum.ROUTE_JUMP, + + // 项目主题色 + themeColor: primaryColor, + // update-begin--author:liaozhiyang---date:20250414--for:【QQYUN-11956】修复projectSetting中配置主题模式不生效 + // 项目主题模式 + themeMode: darkMode, + // update-end--author:liaozhiyang---date:20250414--for:【QQYUN-11956】修复projectSetting中配置主题模式不生效 + + // 网站灰色模式,用于可能悼念的日期开启 + grayMode: false, + + // 色弱模式 + colorWeak: false, + + // 是否取消菜单,顶部,多标签页显示, 用于可能内嵌在别的系统内 + fullContent: false, + + // 主题内容宽度 + contentMode: ContentEnum.FULL, + + // 是否显示logo + showLogo: true, + + // 是否显示底部信息 copyright + showFooter: false, + + // ai图标显示 + aiIconShow: false, + + // 头部配置 + headerSetting: { + // 背景色 + bgColor: HEADER_PRESET_BG_COLOR_LIST[4], + // 固定头部 + fixed: true, + // 是否显示顶部 + show: true, + // 主题 + theme: ThemeEnum.LIGHT, + // 开启锁屏功能 + useLockPage: false, + // 显示全屏按钮 + showFullScreen: false, + // 显示官网按钮 + showDoc: false, + // 显示消息中心按钮 + showNotice: true, + // 显示菜单搜索按钮 + showSearch: true, + }, + + // 菜单配置 + menuSetting: { + // 背景色 + bgColor: SIDE_BAR_BG_COLOR_LIST[0], + // 是否固定住左侧菜单 + fixed: true, + // 菜单折叠 + collapsed: false, + // 折叠菜单时候是否显示菜单名 + collapsedShowTitle: false, + // 是否可拖拽 + // Only limited to the opening of the left menu, the mouse has a drag bar on the right side of the menu + canDrag: false, + // Whether to show no dom + show: true, + // Whether to show dom + hidden: false, + // 菜单宽度 + menuWidth: 210, + // 菜单模式 + mode: MenuModeEnum.INLINE, + // 菜单类型 + type: MenuTypeEnum.SIDEBAR, + // 菜单主题 + theme: ThemeEnum.DARK, + // update-begin--author:liaozhiyang---date:20241203---for:【issues/7522】解决menuSetting ts警告 + // 左侧导航栏文字颜色调整区分彩色和暗黑 (不对应配置) + isThemeBright: false, + // update-end--author:liaozhiyang---date:20241203---for:【issues/7522】解决menuSetting ts警告 + // 分割菜单 + split: false, + // 顶部菜单布局 + topMenuAlign: 'center', + // 折叠触发器的位置 + trigger: TriggerEnum.HEADER, + // 手风琴模式,只展示一个菜单 + accordion: true, + // 在路由切换的时候关闭左侧混合菜单展开菜单 + closeMixSidebarOnChange: false, + // 左侧混合菜单模块切换触发方式 ‘click’ |'hover' + mixSideTrigger: MixSidebarTriggerEnum.CLICK, + // 是否固定左侧混合菜单 + mixSideFixed: false, + }, + + // 多标签 + multiTabsSetting: { + // 刷新后是否保留已经打开的标签页 + cache: false, + // 开启 + show: true, + // 是否可以拖拽 + canDrag: true, + // 开启快速操作 + showQuick: true, + // 是否显示刷新按钮 + showRedo: true, + // 是否显示折叠按钮 + showFold: true, + // 标签页样式 + theme: TabsThemeEnum.CARD, + }, + + // 动画配置 + transitionSetting: { + // 是否开启切换动画 + // The disabled state will also disable pageLoading + enable: true, + + // 动画名 Route basic switching animation + basicTransition: RouterTransitionEnum.FADE_SIDE, + + // 是否打开页面切换loading + // Only open when enable=true + openPageLoading: true, + + //是否打开页面切换顶部进度条 + openNProgress: true, + }, + + // 是否开启KeepAlive缓存 开发时候最好关闭,不然每次都需要清除缓存 + openKeepAlive: true, + + // 自动锁屏时间,为0不锁屏。 单位分钟 默认1个小时 + lockTime: 0, + + // 显示面包屑 + showBreadCrumb: false, + + // 显示面包屑图标 + showBreadCrumbIcon: true, + + // 是否使用全局错误捕获 + useErrorHandle: false, + + // 是否开启回到顶部 + useOpenBackTop: true, + + // 是否可以嵌入iframe页面 + canEmbedIFramePage: true, + + // 切换界面的时候是否删除未关闭的message及notify + closeMessageOnSwitch: true, + + // 切换界面的时候是否取消已经发送但是未响应的http请求。 + // 如果开启,想对单独接口覆盖。可以在单独接口设置 + removeAllHttpPending: false, +}; + +export default setting; diff --git a/src/settings/registerThirdComp.ts b/src/settings/registerThirdComp.ts new file mode 100644 index 0000000..6c47552 --- /dev/null +++ b/src/settings/registerThirdComp.ts @@ -0,0 +1,44 @@ +import type { App } from 'vue'; +import { registerJVxeTable } from '/@/components/jeecg/JVxeTable'; +import { registerJVxeCustom } from '/@/components/JVxeCustom'; + +// 注册全局dayjs +import dayjs from 'dayjs'; +import relativeTime from 'dayjs/plugin/relativeTime'; +import customParseFormat from 'dayjs/plugin/customParseFormat'; +import { createAsyncComponent } from '/@/utils/factory/createAsyncComponent'; + +export async function registerThirdComp(app: App) { + //--------------------------------------------------------------------- + // 注册 JVxeTable 组件 + registerJVxeTable(app); + // 注册 JVxeTable 自定义组件 + await registerJVxeCustom(); + //--------------------------------------------------------------------- + // 注册全局聊天表情包 + // update-begin--author:liaozhiyang---date:20240308---for:【QQYUN-8241】emoji-mart-vue-fast库异步加载 + app.component( + 'Picker', + createAsyncComponent(() => { + return new Promise((resolve, rejected) => { + import('emoji-mart-vue-fast/src') + .then((res) => { + const { Picker } = res; + resolve(Picker); + }) + .catch((err) => { + rejected(err); + }); + }); + }) + ); + // update-end--author:liaozhiyang---date:20240308---for:【QQYUN-8241】emoji-mart-vue-fast库异步加载 + //--------------------------------------------------------------------- + // 注册全局dayjs + dayjs.locale('zh-cn'); + dayjs.extend(relativeTime); + dayjs.extend(customParseFormat); + app.config.globalProperties.$dayjs = dayjs + app.provide('$dayjs', dayjs) + //--------------------------------------------------------------------- +} diff --git a/src/settings/siteSetting.ts b/src/settings/siteSetting.ts new file mode 100644 index 0000000..331a4c0 --- /dev/null +++ b/src/settings/siteSetting.ts @@ -0,0 +1,8 @@ +// github repo url +export const GITHUB_URL = 'https://github.com/jeecgboot/JeecgBoot'; + +// vue-Jeecg-admin-next-doc +export const DOC_URL = 'https://help.jeecg.com'; + +// site url +export const SITE_URL = 'http://www.jeecg.com'; diff --git a/src/store/index.ts b/src/store/index.ts new file mode 100644 index 0000000..9aee017 --- /dev/null +++ b/src/store/index.ts @@ -0,0 +1,24 @@ +import type { App } from 'vue'; +import type { Pinia } from 'pinia'; +import { createPinia } from 'pinia'; + +let app: Nullable> = null; +let store: Nullable = null; + +export function setupStore($app: App) { + if (store == null) { + store = createPinia(); + } + app = $app; + app.use(store); +} + +// 销毁store +export function destroyStore() { + store = null; +} + +// 获取app实例 +export const getAppContext = () => app?._context; + +export {app, store}; diff --git a/src/store/modules/app.ts b/src/store/modules/app.ts new file mode 100644 index 0000000..26a0867 --- /dev/null +++ b/src/store/modules/app.ts @@ -0,0 +1,166 @@ +import type { MainAppProps } from "#/main"; +import type { ProjectConfig, HeaderSetting, MenuSetting, TransitionSetting, MultiTabsSetting } from '/#/config'; +import type { BeforeMiniState } from '/#/store'; + +import { defineStore } from 'pinia'; +import { store } from '/@/store'; + +import { ThemeEnum } from '/@/enums/appEnum'; +import { APP_DARK_MODE_KEY_, PROJ_CFG_KEY } from '/@/enums/cacheEnum'; +import { Persistent } from '/@/utils/cache/persistent'; +import { darkMode } from '/@/settings/designSetting'; +import { resetRouter } from '/@/router'; +import { deepMerge } from '/@/utils'; +import { getHideLayoutTypes } from '/@/utils/env'; +import setting from '/@/settings/projectSetting'; + +interface AppState { + darkMode?: ThemeEnum; + // Page loading status + pageLoading: boolean; + // project config + projectConfig: ProjectConfig | null; + // When the window shrinks, remember some states, and restore these states when the window is restored + beforeMiniInfo: BeforeMiniState; + // 页面跳转临时参数存储 + messageHrefParams: any, + // 应用参数 + mainAppProps: MainAppProps, +} +let timeId: TimeoutHandle; +export const useAppStore = defineStore({ + id: 'app', + state: (): AppState => ({ + darkMode: undefined, + pageLoading: false, + projectConfig: Persistent.getLocal(PROJ_CFG_KEY), + beforeMiniInfo: {}, + messageHrefParams: {}, + mainAppProps: {}, + }), + getters: { + getPageLoading(): boolean { + return this.pageLoading; + }, + getDarkMode(): 'light' | 'dark' | string { + // liaozhiyang---date:20250411---for:【QQYUN-11956】修复projectSetting中配置主题模式不生效 + const getSettingTheme = () => { + const theme = setting.themeMode; + if (theme) { + if (theme == ThemeEnum.DARK) { + // 为了index.html页面loading时是暗黑 + localStorage.setItem(APP_DARK_MODE_KEY_, theme); + } + return theme; + } + return ''; + }; + // liaozhiyang---date:20250411---for:【QQYUN-11956】修复projectSetting中配置主题模式不生效 + return this.darkMode || localStorage.getItem(APP_DARK_MODE_KEY_) || getSettingTheme() || darkMode; + }, + + getBeforeMiniInfo(): BeforeMiniState { + return this.beforeMiniInfo; + }, + + getProjectConfig(): ProjectConfig { + return this.projectConfig || ({} as ProjectConfig); + }, + + getHeaderSetting(): HeaderSetting { + return this.getProjectConfig.headerSetting; + }, + getMenuSetting(): MenuSetting { + return this.getProjectConfig.menuSetting; + }, + getTransitionSetting(): TransitionSetting { + return this.getProjectConfig.transitionSetting; + }, + getMultiTabsSetting(): MultiTabsSetting { + return this.getProjectConfig.multiTabsSetting; + }, + getMessageHrefParams():any{ + return this.messageHrefParams; + }, + getMainAppProps(): MainAppProps { + return this.mainAppProps; + }, + + getLayoutHideSider(): boolean { + const hideLayoutTypes = getHideLayoutTypes(); + if (hideLayoutTypes.includes('sider')) { + return true; + } + return !!this.mainAppProps.hideSider; + }, + getLayoutHideHeader(): boolean { + const hideLayoutTypes = getHideLayoutTypes(); + if (hideLayoutTypes.includes('header')) { + return true; + } + return !!this.mainAppProps.hideHeader; + }, + getLayoutHideMultiTabs(): boolean { + const hideLayoutTypes = getHideLayoutTypes(); + if (hideLayoutTypes.includes('multi-tabs')) { + return true; + } + return !!this.mainAppProps.hideMultiTabs; + }, + }, + actions: { + setPageLoading(loading: boolean): void { + this.pageLoading = loading; + }, + + setDarkMode(mode: ThemeEnum): void { + this.darkMode = mode; + localStorage.setItem(APP_DARK_MODE_KEY_, mode); + this.setProjectConfig({ themeMode: mode }); + }, + + setBeforeMiniInfo(state: BeforeMiniState): void { + this.beforeMiniInfo = state; + }, + + setProjectConfig(config: DeepPartial): void { + this.projectConfig = deepMerge(this.projectConfig || {}, config); + // update-begin--author:liaozhiyang---date:20240408---for:【QQYUN-8922】设置导航栏模式没存本地,刷新就还原了 + Persistent.setLocal(PROJ_CFG_KEY, this.projectConfig, true); + // update-end--author:liaozhiyang---date:20240408---for:【QQYUN-8922】设置导航栏模式没存本地,刷新就还原了 + }, + + async resetAllState() { + resetRouter(); + Persistent.clearAll(); + }, + async setPageLoadingAction(loading: boolean): Promise { + if (loading) { + clearTimeout(timeId); + // Prevent flicker + timeId = setTimeout(() => { + this.setPageLoading(loading); + }, 50); + } else { + this.setPageLoading(loading); + clearTimeout(timeId); + } + }, + setMessageHrefParams(params: any): void { + this.messageHrefParams = params; + }, + + // 设置主应用参数 + setMainAppProps(args: MainAppProps) { + this.mainAppProps.hideHeader = args.hideHeader ?? false; + this.mainAppProps.hideSider = args.hideSider ?? false; + this.mainAppProps.hideMultiTabs = args.hideMultiTabs ?? false; + }, + + }, +}); + +// Need to be used outside the setup +export function useAppStoreWithOut() { + return useAppStore(store); +} diff --git a/src/store/modules/defIndex.ts b/src/store/modules/defIndex.ts new file mode 100644 index 0000000..e2b0706 --- /dev/null +++ b/src/store/modules/defIndex.ts @@ -0,0 +1,75 @@ +import {store} from '/@/store'; +import {defineStore} from 'pinia'; +import {defHttp} from "@/utils/http/axios"; + +interface DefIndexState { + // 首页url + url: string, + // 首页组件 + component: string +} + +export const useDefIndexStore = defineStore({ + id: 'defIndex', + state: (): DefIndexState => ({ + url: '', + component: '', + }), + getters: {}, + actions: { + /** + * 查询默认主页配置 + */ + async query() { + const config = await defIndexApi.query(); + this.url = config.url; + this.component = config.component; + }, + /** + * 更新默认主页配置 + * @param url 首页url + * @param component 首页组件 + * @param isRoute 是否是路由 + */ + async update(url: string, component: string, isRoute: boolean) { + await defIndexApi.update(url, component, isRoute); + await this.query() + }, + + check(url: string) { + return url === this.url; + } + } +}); + +// Need to be used outside the setup +export function useDefIndexStoreWithOut() { + return useDefIndexStore(store); +} + +/** + * 默认首页配置API + */ +export const defIndexApi = { + /** + * 查询默认首页配置 + */ + async query() { + const url = '/sys/sysRoleIndex/queryDefIndex' + return await defHttp.get({url}); + }, + /** + * 更新默认首页配置 + * @param url 首页url + * @param component 首页组件 + * @param isRoute 是否是路由 + */ + async update(url: string, component: string, isRoute: boolean) { + let apiUrl = '/sys/sysRoleIndex/updateDefIndex' + apiUrl += '?url=' + url + apiUrl += '&component=' + component + apiUrl += '&isRoute=' + isRoute + return await defHttp.put({url: apiUrl}); + }, + +} diff --git a/src/store/modules/errorLog.ts b/src/store/modules/errorLog.ts new file mode 100644 index 0000000..c95edba --- /dev/null +++ b/src/store/modules/errorLog.ts @@ -0,0 +1,74 @@ +import type { ErrorLogInfo } from '/#/store'; + +import { defineStore } from 'pinia'; +import { store } from '/@/store'; + +import { formatToDateTime } from '/@/utils/dateUtil'; +import projectSetting from '/@/settings/projectSetting'; + +import { ErrorTypeEnum } from '/@/enums/exceptionEnum'; + +export interface ErrorLogState { + errorLogInfoList: Nullable; + errorLogListCount: number; +} + +export const useErrorLogStore = defineStore({ + id: 'app-error-log', + state: (): ErrorLogState => ({ + errorLogInfoList: null, + errorLogListCount: 0, + }), + getters: { + getErrorLogInfoList(): ErrorLogInfo[] { + return this.errorLogInfoList || []; + }, + getErrorLogListCount(): number { + return this.errorLogListCount; + }, + }, + actions: { + addErrorLogInfo(info: ErrorLogInfo) { + const item = { + ...info, + time: formatToDateTime(new Date()), + }; + this.errorLogInfoList = [item, ...(this.errorLogInfoList || [])]; + this.errorLogListCount += 1; + }, + + setErrorLogListCount(count: number): void { + this.errorLogListCount = count; + }, + + /** + * Triggered after ajax request error + * @param error + * @returns + */ + addAjaxErrorInfo(error) { + const { useErrorHandle } = projectSetting; + if (!useErrorHandle) { + return; + } + const errInfo: Partial = { + message: error.message, + type: ErrorTypeEnum.AJAX, + }; + if (error.response) { + const { config: { url = '', data: params = '', method = 'get', headers = {} } = {}, data = {} } = error.response; + errInfo.url = url; + errInfo.name = 'Ajax Error!'; + errInfo.file = '-'; + errInfo.stack = JSON.stringify(data); + errInfo.detail = JSON.stringify({ params, method, headers }); + } + this.addErrorLogInfo(errInfo as ErrorLogInfo); + }, + }, +}); + +// Need to be used outside the setup +export function useErrorLogStoreWithOut() { + return useErrorLogStore(store); +} diff --git a/src/store/modules/locale.ts b/src/store/modules/locale.ts new file mode 100644 index 0000000..eb326b8 --- /dev/null +++ b/src/store/modules/locale.ts @@ -0,0 +1,85 @@ +import type { LocaleSetting, LocaleType } from '/#/config'; + +import { defineStore } from 'pinia'; +import { store } from '/@/store'; + +import { LOCALE_KEY } from '/@/enums/cacheEnum'; +import { createLocalStorage } from '/@/utils/cache'; +import { localeSetting } from '/@/settings/localeSetting'; + +const ls = createLocalStorage(); + +const lsLocaleSetting = (ls.get(LOCALE_KEY) || localeSetting) as LocaleSetting; + +interface LocaleState { + localInfo: LocaleSetting; + pathTitleMap: object; + // myapps主题色(低代码应用列表首页) + appIndexTheme: string + // myapps - 跳转前路由地址 + appMainPth: string +} + +export const useLocaleStore = defineStore({ + id: 'app-locale', + state: (): LocaleState => ({ + localInfo: lsLocaleSetting, + pathTitleMap: {}, + appIndexTheme: '', + appMainPth: '' + }), + getters: { + getShowPicker(): boolean { + return !!this.localInfo?.showPicker; + }, + getLocale(): LocaleType { + return this.localInfo?.locale ?? 'zh_CN'; + }, + //update-begin-author:taoyan date:2022-6-1 for: VUEN-1144 online 配置成菜单后,打开菜单,显示名称未展示为菜单名称 + getPathTitle: (state) => { + return (path) => state.pathTitleMap[path]; + }, + //update-end-author:taoyan date:2022-6-1 for: VUEN-1144 online 配置成菜单后,打开菜单,显示名称未展示为菜单名称 + getAppIndexTheme(): string { + return this.appIndexTheme; + }, + getAppMainPth(): string { + return this.appMainPth; + }, + }, + actions: { + /** + * Set up multilingual information and cache + * @param info multilingual info + */ + setLocaleInfo(info: Partial) { + this.localInfo = { ...this.localInfo, ...info }; + ls.set(LOCALE_KEY, this.localInfo); + }, + /** + * Initialize multilingual information and load the existing configuration from the local cache + */ + initLocale() { + this.setLocaleInfo({ + ...localeSetting, + ...this.localInfo, + }); + }, + //update-begin-author:taoyan date:2022-6-1 for: VUEN-1144 online 配置成菜单后,打开菜单,显示名称未展示为菜单名称 + setPathTitle(path, title) { + this.pathTitleMap[path] = title; + }, + //update-end-author:taoyan date:2022-6-1 for: VUEN-1144 online 配置成菜单后,打开菜单,显示名称未展示为菜单名称 + setAppIndexTheme(theme) { + this.appIndexTheme = theme; + }, + setAppMainPth(path) { + this.appMainPth = path; + }, + }, +}); + +// Need to be used outside the setup +export function useLocaleStoreWithOut() { + return useLocaleStore(store); +} diff --git a/src/store/modules/lock.ts b/src/store/modules/lock.ts new file mode 100644 index 0000000..90f8b48 --- /dev/null +++ b/src/store/modules/lock.ts @@ -0,0 +1,40 @@ +import type { LockInfo } from '/#/store'; + +import { defineStore } from 'pinia'; + +import { LOCK_INFO_KEY } from '/@/enums/cacheEnum'; +import { Persistent } from '/@/utils/cache/persistent'; +import { useUserStore } from './user'; + +interface LockState { + lockInfo: Nullable; +} + +export const useLockStore = defineStore({ + id: 'app-lock', + state: (): LockState => ({ + lockInfo: Persistent.getLocal(LOCK_INFO_KEY), + }), + getters: { + getLockInfo(): Nullable { + return this.lockInfo; + }, + }, + actions: { + setLockInfo(info: LockInfo) { + this.lockInfo = Object.assign({}, this.lockInfo, info); + Persistent.setLocal(LOCK_INFO_KEY, this.lockInfo, true); + }, + resetLockInfo() { + Persistent.removeLocal(LOCK_INFO_KEY, true); + this.lockInfo = null; + }, + // Unlock + async unLock(password?: string) { + if (this.lockInfo?.pwd === password) { + this.resetLockInfo(); + return true; + } + }, + }, +}); diff --git a/src/store/modules/multipleTab.ts b/src/store/modules/multipleTab.ts new file mode 100644 index 0000000..ae21e6e --- /dev/null +++ b/src/store/modules/multipleTab.ts @@ -0,0 +1,474 @@ +import type { RouteLocationNormalized, RouteLocationRaw, Router } from 'vue-router'; + +import { toRaw, unref } from 'vue'; +import { defineStore } from 'pinia'; +import { store } from '/@/store'; +import { PAGE_NOT_FOUND_NAME_404 } from '/@/router/constant'; + +import { useGo, useRedo } from '/@/hooks/web/usePage'; +import { Persistent } from '/@/utils/cache/persistent'; + +import { PageEnum } from '/@/enums/pageEnum'; +import { PAGE_NOT_FOUND_ROUTE, REDIRECT_ROUTE } from '/@/router/routes/basic'; +import { getRawRoute } from '/@/utils'; +import { MULTIPLE_TABS_KEY } from '/@/enums/cacheEnum'; + +import projectSetting from '/@/settings/projectSetting'; +import { useUserStore } from '/@/store/modules/user'; +import type { LocationQueryRaw, RouteParamsRaw } from 'vue-router'; +import { getMenus } from '/@/router/menus'; + +export interface MultipleTabState { + cacheTabList: Set; + tabList: RouteLocationNormalized[]; + lastDragEndIndex: number; + redirectPageParam: null | redirectPageParamType; +} + +interface redirectPageParamType { + redirect_type: string; + name?: string; + path?: string; + query: LocationQueryRaw; + params?: RouteParamsRaw; +} + +function handleGotoPage(router: Router, path?) { + const go = useGo(router); + // update-begin--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用 + go(path || unref(router.currentRoute).path, true); + // update-end--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用 +} +const getToTarget = (tabItem: RouteLocationNormalized) => { + const { params, path, query } = tabItem; + return { + params: params || {}, + path, + query: query || {}, + }; +}; + +/** + * 2024-06-05 + * liaozhiyang + * 关闭的tab中是否包含当前页面 + */ +const closeTabContainCurrentRoute = (router, pathList) => { + const { currentRoute } = router; + const getCurrentTab = () => { + const route = unref(currentRoute); + const tabStore = useMultipleTabStore(); + return tabStore.getTabList.find((item) => item.path === route.path)!; + }; + const currentTab = getCurrentTab(); + if (currentTab) { + return pathList.includes(currentTab.path); + } + return false; +}; +/** + * 2025-05-08 + * liaozhiyang + * 【issues/8216】online生成的菜单sql 自动带上组件名称 + * */ +function getMatchingRoute(menus, path) { + for (let i = 0, len = menus.length; i < len; i++) { + const item = menus[i]; + if (item.path === path && !item.redirect && !item.paramPath) { + return item; + } else if (item.children?.length) { + const result = getMatchingRoute(item.children, path); + if (result) { + return result; + } + } + } + return null; +} + +const cacheTab = projectSetting.multiTabsSetting.cache; + +export const useMultipleTabStore = defineStore({ + id: 'app-multiple-tab', + state: (): MultipleTabState => ({ + // Tabs that need to be cached + cacheTabList: new Set(), + // multiple tab list + tabList: cacheTab ? Persistent.getLocal(MULTIPLE_TABS_KEY) || [] : [], + // Index of the last moved tab + lastDragEndIndex: 0, + // 重定向时存储的路由参数 + redirectPageParam: null, + }), + getters: { + getTabList(): RouteLocationNormalized[] { + return this.tabList; + }, + getCachedTabList(): string[] { + return Array.from(this.cacheTabList); + }, + getLastDragEndIndex(): number { + return this.lastDragEndIndex; + }, + }, + actions: { + /** + * Update the cache according to the currently opened tabs + */ + async updateCacheTab() { + const cacheMap: Set = new Set(); + const allMenus = await getMenus(); + for (const tab of this.tabList) { + const item = getRawRoute(tab); + // Ignore the cache + const needCache = !item.meta?.ignoreKeepAlive; + if (!needCache) { + continue; + } + // update-begin--author:liaozhiyang---date:20240308---for:【QQYUN-12348】online生成的菜单sql 自动带上组件名称 + if ( + ['OnlineAutoList', 'DefaultOnlineList', 'CgformErpList', 'OnlCgformInnerTableList', 'OnlCgformTabList', 'OnlCgReportList', 'GraphreportAutoChart', 'AutoDesformDataList'].includes(item.name as string) && + allMenus?.length + ) { + const route = getMatchingRoute(allMenus, item.path); + if (route?.meta?.keepAlive) { + // 如果keepAlive为true,则添加到缓存中 + } else { + continue; + } + } + // update-end--author:liaozhiyang---date:20240308---for:【QQYUN-12348】online生成的菜单sql 自动带上组件名称 + const name = item.name as string; + cacheMap.add(name); + } + this.cacheTabList = cacheMap; + }, + + /** + * Refresh tabs + */ + async refreshPage(router: Router) { + const { currentRoute } = router; + const route = unref(currentRoute); + const name = route.name; + + const findTab = this.getCachedTabList.find((item) => item === name); + if (findTab) { + this.cacheTabList.delete(findTab); + } + const redo = useRedo(router); + await redo(); + }, + /** + * 修改设计模式 + * changeDesign + */ + async changeDesign(router: Router) { + const { currentRoute } = router; + const route = unref(currentRoute); + const name = route.name; + + const findTab = this.getCachedTabList.find((item) => item === name); + if (findTab) { + this.cacheTabList.delete(findTab); + } + const redo = useRedo(router, { isDesign: true }); + await redo(); + }, + clearCacheTabs(): void { + this.cacheTabList = new Set(); + }, + resetState(): void { + this.tabList = []; + this.clearCacheTabs(); + }, + goToPage(router: Router) { + const go = useGo(router); + const len = this.tabList.length; + const { path } = unref(router.currentRoute); + + let toPath: PageEnum | string = PageEnum.BASE_HOME; + + if (len > 0) { + const page = this.tabList[len - 1]; + const p = page.fullPath || page.path; + if (p) { + toPath = p; + } + } + // Jump to the current page and report an error + path !== toPath && go(toPath as PageEnum, true); + }, + + async addTab(route: RouteLocationNormalized) { + const { path, name, fullPath, params, query, meta } = getRawRoute(route); + // update-begin--author:liaozhiyang---date:202401127---for:【issues/7500】vue-router4.5.0版本路由name:PageNotFound同名导致登录进不去 + // 404 The page does not need to add a tab + if ( + path === PageEnum.ERROR_PAGE || + path === PageEnum.BASE_LOGIN || + !name || + [REDIRECT_ROUTE.name, PAGE_NOT_FOUND_NAME_404].includes(name as string) + ) { + return; + } + // update-end--author:liaozhiyang---date:202401127---for:【issues/7500】vue-router4.5.0版本路由name:PageNotFound同名导致登录进不去 + + let updateIndex = -1; + // Existing pages, do not add tabs repeatedly + const tabHasExits = this.tabList.some((tab, index) => { + updateIndex = index; + return (tab.fullPath || tab.path) === (fullPath || path); + }); + + // If the tab already exists, perform the update operation + if (tabHasExits) { + const curTab = toRaw(this.tabList)[updateIndex]; + if (!curTab) { + return; + } + curTab.params = params || curTab.params; + curTab.query = query || curTab.query; + curTab.fullPath = fullPath || curTab.fullPath; + this.tabList.splice(updateIndex, 1, curTab); + } else { + // Add tab + // 获取动态路由打开数,超过 0 即代表需要控制打开数 + const dynamicLevel = meta?.dynamicLevel ?? -1; + if (dynamicLevel > 0) { + // 如果动态路由层级大于 0 了,那么就要限制该路由的打开数限制了 + // 首先获取到真实的路由,使用配置方式减少计算开销. + // const realName: string = path.match(/(\S*)\//)![1]; + const realPath = meta?.realPath ?? ''; + // 获取到已经打开的动态路由数, 判断是否大于某一个值 + if (this.tabList.filter((e) => e.meta?.realPath ?? '' === realPath).length >= dynamicLevel) { + // 关闭第一个 + const index = this.tabList.findIndex((item) => item.meta.realPath === realPath); + index !== -1 && this.tabList.splice(index, 1); + } + } + this.tabList.push(route); + } + this.updateCacheTab(); + cacheTab && Persistent.setLocal(MULTIPLE_TABS_KEY, this.tabList); + }, + + async closeTab(tab: RouteLocationNormalized, router: Router) { + const close = (route: RouteLocationNormalized) => { + const { fullPath, meta: { affix } = {} } = route; + if (affix) { + return; + } + const index = this.tabList.findIndex((item) => item.fullPath === fullPath); + index !== -1 && this.tabList.splice(index, 1); + }; + + const { currentRoute, replace } = router; + + const { path } = unref(currentRoute); + if (path !== tab.path) { + // Closed is not the activation tab + close(tab); + this.updateCacheTab(); + return; + } + + // Closed is activated atb + let toTarget: RouteLocationRaw = {}; + + const index = this.tabList.findIndex((item) => item.path === path); + + // If the current is the leftmost tab + if (index === 0) { + // There is only one tab, then jump to the homepage, otherwise jump to the right tab + if (this.tabList.length === 1) { + const userStore = useUserStore(); + toTarget = userStore.getUserInfo.homePath || PageEnum.BASE_HOME; + } else { + // Jump to the right tab + const page = this.tabList[index + 1]; + toTarget = getToTarget(page); + } + } else { + // Close the current tab + const page = this.tabList[index - 1]; + toTarget = getToTarget(page); + } + close(currentRoute.value); + await replace(toTarget); + }, + + // Close according to key + async closeTabByKey(key: string, router: Router) { + const index = this.tabList.findIndex((item) => (item.fullPath || item.path) === key); + if (index !== -1) { + await this.closeTab(this.tabList[index], router); + const { currentRoute, replace } = router; + // 检查当前路由是否存在于tabList中 + const isActivated = this.tabList.findIndex((item) => { + return item.fullPath === currentRoute.value.fullPath; + }); + // 如果当前路由不存在于TabList中,尝试切换到其它路由 + if (isActivated === -1) { + let pageIndex; + if (index > 0) { + pageIndex = index - 1; + } else if (index < this.tabList.length - 1) { + pageIndex = index + 1; + } else { + pageIndex = -1; + } + if (pageIndex >= 0) { + const page = this.tabList[index - 1]; + const toTarget = getToTarget(page); + await replace(toTarget); + } + } + } + }, + + // Sort the tabs + async sortTabs(oldIndex: number, newIndex: number) { + const currentTab = this.tabList[oldIndex]; + this.tabList.splice(oldIndex, 1); + this.tabList.splice(newIndex, 0, currentTab); + this.lastDragEndIndex = this.lastDragEndIndex + 1; + }, + + // Close the tab on the right and jump + async closeLeftTabs(route: RouteLocationNormalized, router: Router) { + const index = this.tabList.findIndex((item) => item.path === route.path); + let isCloseCurrentTab = false; + if (index > 0) { + const leftTabs = this.tabList.slice(0, index); + const pathList: string[] = []; + for (const item of leftTabs) { + const affix = item?.meta?.affix ?? false; + if (!affix) { + pathList.push(item.fullPath); + } + } + // update-begin--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用 + isCloseCurrentTab = closeTabContainCurrentRoute(router, pathList); + // update-end--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用 + this.bulkCloseTabs(pathList); + } + this.updateCacheTab(); + // update-begin--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用 + if (isCloseCurrentTab) { + handleGotoPage(router, route.path); + } else { + handleGotoPage(router); + } + // update-end--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用 + }, + + // Close the tab on the left and jump + async closeRightTabs(route: RouteLocationNormalized, router: Router) { + const index = this.tabList.findIndex((item) => item.fullPath === route.fullPath); + let isCloseCurrentTab = false; + if (index >= 0 && index < this.tabList.length - 1) { + const rightTabs = this.tabList.slice(index + 1, this.tabList.length); + + const pathList: string[] = []; + for (const item of rightTabs) { + const affix = item?.meta?.affix ?? false; + if (!affix) { + pathList.push(item.fullPath); + } + } + // update-begin--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用 + isCloseCurrentTab = closeTabContainCurrentRoute(router, pathList); + // update-end--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用 + this.bulkCloseTabs(pathList); + } + this.updateCacheTab(); + // update-begin--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用 + if (isCloseCurrentTab) { + handleGotoPage(router, route.path); + } else { + handleGotoPage(router); + } + // update-end--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用 + }, + + async closeAllTab(router: Router) { + this.tabList = this.tabList.filter((item) => item?.meta?.affix ?? false); + this.clearCacheTabs(); + this.goToPage(router); + }, + + + /** + * Close other tabs + */ + async closeOtherTabs(route: RouteLocationNormalized, router: Router) { + const closePathList = this.tabList.map((item) => item.fullPath); + let isCloseCurrentTab = false; + const pathList: string[] = []; + + for (const path of closePathList) { + if (path !== route.fullPath) { + const closeItem = this.tabList.find((item) => item.path === path); + if (!closeItem) { + continue; + } + const affix = closeItem?.meta?.affix ?? false; + if (!affix) { + pathList.push(closeItem.fullPath); + } + } + } + isCloseCurrentTab = closeTabContainCurrentRoute(router, pathList); + this.bulkCloseTabs(pathList); + this.updateCacheTab(); + // update-begin--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用 + if (isCloseCurrentTab) { + handleGotoPage(router, route.path); + } else { + handleGotoPage(router); + } + // update-end--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用 + }, + + /** + * Close tabs in bulk + */ + async bulkCloseTabs(pathList: string[]) { + this.tabList = this.tabList.filter((item) => !pathList.includes(item.fullPath)); + }, + + /** + * Set tab's title + */ + async setTabTitle(title: string, route: RouteLocationNormalized) { + const findTab = this.getTabList.find((item) => item === route); + if (findTab) { + findTab.meta.title = title; + await this.updateCacheTab(); + } + }, + /** + * replace tab's path + * **/ + async updateTabPath(fullPath: string, route: RouteLocationNormalized) { + const findTab = this.getTabList.find((item) => item === route); + if (findTab) { + findTab.fullPath = fullPath; + findTab.path = fullPath; + await this.updateCacheTab(); + } + }, + setRedirectPageParam(data) { + this.redirectPageParam = data; + }, + getRedirectPageParam() { + return this.redirectPageParam; + }, + }, +}); + +// Need to be used outside the setup +export function useMultipleTabWithOutStore() { + return useMultipleTabStore(store); +} diff --git a/src/store/modules/permission.ts b/src/store/modules/permission.ts new file mode 100644 index 0000000..f26f195 --- /dev/null +++ b/src/store/modules/permission.ts @@ -0,0 +1,314 @@ +import type { AppRouteRecordRaw, Menu } from '/@/router/types'; + +import { defineStore } from 'pinia'; +import { store } from '/@/store'; +import { useI18n } from '/@/hooks/web/useI18n'; +import { useUserStore } from './user'; +import { useAppStoreWithOut } from './app'; +import { toRaw } from 'vue'; +import { transformObjToRoute, flatMultiLevelRoutes, addSlashToRouteComponent } from '/@/router/helper/routeHelper'; +import { transformRouteToMenu } from '/@/router/helper/menuHelper'; + +import projectSetting from '/@/settings/projectSetting'; + +import { PermissionModeEnum } from '/@/enums/appEnum'; + +import { asyncRoutes } from '/@/router/routes'; +import { ERROR_LOG_ROUTE, PAGE_NOT_FOUND_ROUTE } from '/@/router/routes/basic'; +import { staticRoutesList } from '../../router/routes/staticRouter'; + +import { filter } from '/@/utils/helper/treeHelper'; + +import { getBackMenuAndPerms } from '/@/api/sys/menu'; + +import { useMessage } from '/@/hooks/web/useMessage'; +import { PageEnum } from '/@/enums/pageEnum'; + +// 系统权限 +interface AuthItem { + // 菜单权限编码,例如:“sys:schedule:list,sys:schedule:info”,多个逗号隔开 + action: string; + // 权限策略1显示2禁用 + type: string | number; + // 权限状态(0无效1有效) + status: string | number; + // 权限名称 + describe?: string; + isAuth?: boolean; +} + +interface PermissionState { + // Permission code list + permCodeList: string[] | number[]; + // Whether the route has been dynamically added + isDynamicAddedRoute: boolean; + // To trigger a menu update + lastBuildMenuTime: number; + // Backstage menu list + backMenuList: Menu[]; + frontMenuList: Menu[]; + // 用户所拥有的权限 + authList: AuthItem[]; + // 全部权限配置 + allAuthList: AuthItem[]; + // 系统安全模式 + sysSafeMode: boolean; + // online子表按钮权限 + onlineSubTableAuthMap: object; +} +export const usePermissionStore = defineStore({ + id: 'app-permission', + state: (): PermissionState => ({ + permCodeList: [], + // Whether the route has been dynamically added + isDynamicAddedRoute: false, + // To trigger a menu update + lastBuildMenuTime: 0, + // Backstage menu list + backMenuList: [], + // menu List + frontMenuList: [], + authList: [], + allAuthList: [], + sysSafeMode: false, + onlineSubTableAuthMap: {}, + }), + getters: { + getPermCodeList(): string[] | number[] { + return this.permCodeList; + }, + getBackMenuList(): Menu[] { + return this.backMenuList; + }, + getFrontMenuList(): Menu[] { + return this.frontMenuList; + }, + getLastBuildMenuTime(): number { + return this.lastBuildMenuTime; + }, + getIsDynamicAddedRoute(): boolean { + return this.isDynamicAddedRoute; + }, + + //update-begin-author:taoyan date:2022-6-1 for: VUEN-1162 子表按钮没控制 + getOnlineSubTableAuth: (state) => { + return (code) => state.onlineSubTableAuthMap[code]; + }, + //update-end-author:taoyan date:2022-6-1 for: VUEN-1162 子表按钮没控制 + }, + actions: { + setPermCodeList(codeList: string[]) { + this.permCodeList = codeList; + }, + + setBackMenuList(list: Menu[]) { + this.backMenuList = list; + list?.length > 0 && this.setLastBuildMenuTime(); + }, + + setFrontMenuList(list: Menu[]) { + this.frontMenuList = list; + }, + + setLastBuildMenuTime() { + this.lastBuildMenuTime = new Date().getTime(); + }, + + setDynamicAddedRoute(added: boolean) { + this.isDynamicAddedRoute = added; + }, + resetState(): void { + this.isDynamicAddedRoute = false; + this.permCodeList = []; + this.backMenuList = []; + this.lastBuildMenuTime = 0; + }, + async changePermissionCode() { + const systemPermission = await getBackMenuAndPerms(); + const codeList = systemPermission.codeList; + this.setPermCodeList(codeList); + this.setAuthData(systemPermission); + + //菜单路由 + const routeList = systemPermission.menu; + return routeList; + }, + async buildRoutesAction(): Promise { + const { t } = useI18n(); + const userStore = useUserStore(); + const appStore = useAppStoreWithOut(); + + let routes: AppRouteRecordRaw[] = []; + const roleList = toRaw(userStore.getRoleList) || []; + const { permissionMode = projectSetting.permissionMode } = appStore.getProjectConfig; + + const routeFilter = (route: AppRouteRecordRaw) => { + const { meta } = route; + const { roles } = meta || {}; + if (!roles) return true; + return roleList.some((role) => roles.includes(role)); + }; + + const routeRemoveIgnoreFilter = (route: AppRouteRecordRaw) => { + const { meta } = route; + const { ignoreRoute } = meta || {}; + return !ignoreRoute; + }; + + /** + * @description 根据设置的首页path,修正routes中的affix标记(固定首页) + * */ + const patchHomeAffix = (routes: AppRouteRecordRaw[]) => { + if (!routes || routes.length === 0) return; + let homePath: string = userStore.getUserInfo.homePath || PageEnum.BASE_HOME; + function patcher(routes: AppRouteRecordRaw[], parentPath = '') { + if (parentPath) parentPath = parentPath + '/'; + routes.forEach((route: AppRouteRecordRaw) => { + const { path, children, redirect } = route; + const currentPath = path.startsWith('/') ? path : parentPath + path; + if (currentPath === homePath) { + if (redirect) { + homePath = route.redirect! as string; + } else { + route.meta = Object.assign({}, route.meta, { affix: true }); + throw new Error('end'); + } + } + children && children.length > 0 && patcher(children, currentPath); + }); + } + try { + patcher(routes); + } catch (e) { + // 已处理完毕跳出循环 + } + return; + }; + + switch (permissionMode) { + case PermissionModeEnum.ROLE: + routes = filter(asyncRoutes, routeFilter); + routes = routes.filter(routeFilter); + // 将多级路由转换为二级 + routes = flatMultiLevelRoutes(routes); + break; + + case PermissionModeEnum.ROUTE_MAPPING: + routes = filter(asyncRoutes, routeFilter); + routes = routes.filter(routeFilter); + const menuList = transformRouteToMenu(routes, true); + routes = filter(routes, routeRemoveIgnoreFilter); + routes = routes.filter(routeRemoveIgnoreFilter); + menuList.sort((a, b) => { + return (a.meta?.orderNo || 0) - (b.meta?.orderNo || 0); + }); + + this.setFrontMenuList(menuList); + // 将多级路由转换为二级 + routes = flatMultiLevelRoutes(routes); + break; + + // 后台菜单构建 + case PermissionModeEnum.BACK: + const { createMessage, createWarningModal } = useMessage(); + console.log(" --- 构建后台路由菜单 --- ") + // 菜单加载提示 + // createMessage.loading({ + // content: t('sys.app.menuLoading'), + // duration: 1, + // }); + + // 从后台获取权限码, + // 这个函数可能只需要执行一次,并且实际的项目可以在正确的时间被放置 + let routeList: AppRouteRecordRaw[] = []; + try { + routeList = await this.changePermissionCode(); + //routeList = (await getMenuList()) as AppRouteRecordRaw[]; + // update-begin--author:liaozhiyang---date:20240313---for:【QQYUN-8487】注释掉判断菜单是否vue2版本逻辑代码 + // update-begin----author:sunjianlei---date:20220315------for: 判断是否是 vue3 版本的菜单 --- + // let hasIndex: boolean = false; + // let hasIcon: boolean = false; + // for (let menuItem of routeList) { + // // 条件1:判断组件是否是 layouts/default/index + // if (!hasIndex) { + // hasIndex = menuItem.component === 'layouts/default/index'; + // } + // // 条件2:判断图标是否带有 冒号 + // if (!hasIcon) { + // hasIcon = !!menuItem.meta?.icon?.includes(':'); + // } + // // 满足任何一个条件都直接跳出循环 + // if (hasIcon || hasIndex) { + // break; + // } + // } + // // 两个条件都不满足,就弹出提示框 + // if (!hasIcon && !hasIndex) { + // // 延迟1.5秒之后再出现提示,否则提示框出不来 + // setTimeout( + // () => + // createWarningModal({ + // title: '检测提示', + // content: + // '当前菜单表是 Vue2版本,导致菜单加载异常!
点击确认,切换到Vue3版菜单!', + // onOk:function () { + // switchVue3Menu(); + // location.reload(); + // } + // }), + // 100 + // ); + // } + // update-end----author:sunjianlei---date:20220315------for: 判断是否是 vue3 版本的菜单 --- + // update-end--author:liaozhiyang---date:20240313---for:【QQYUN-8487】注释掉判断菜单是否vue2版本逻辑代码 + } catch (error) { + console.error(error); + } + // 组件地址前加斜杠处理 author: lsq date:2021-09-08 + routeList = addSlashToRouteComponent(routeList); + // 动态引入组件 + routeList = transformObjToRoute(routeList); + + // 构建后台路由菜单 + const backMenuList = transformRouteToMenu(routeList); + this.setBackMenuList(backMenuList); + + // 删除meta.ignoreRoute项 + routeList = filter(routeList, routeRemoveIgnoreFilter); + routeList = routeList.filter(routeRemoveIgnoreFilter); + + routeList = flatMultiLevelRoutes(routeList); + // update-begin--author:liaozhiyang---date:20240529---for:【TV360X-522】ai助手路由写死在前端 + routes = [PAGE_NOT_FOUND_ROUTE, ...routeList, ...staticRoutesList]; + // update-end--author:liaozhiyang---date:20240529---for:【TV360X-522】ai助手路由写死在前端 + break; + } + + routes.push(ERROR_LOG_ROUTE); + patchHomeAffix(routes); + return routes; + }, + setAuthData(systemPermission) { + this.authList = systemPermission.auth; + this.allAuthList = systemPermission.allAuth; + this.sysSafeMode = systemPermission.sysSafeMode; + }, + setAuthList(authList: AuthItem[]) { + this.authList = authList; + }, + setAllAuthList(authList: AuthItem[]) { + this.allAuthList = authList; + }, + + //update-begin-author:taoyan date:2022-6-1 for: VUEN-1162 子表按钮没控制 + setOnlineSubTableAuth(code, hideBtnList) { + this.onlineSubTableAuthMap[code] = hideBtnList; + }, + //update-end-author:taoyan date:2022-6-1 for: VUEN-1162 子表按钮没控制 + }, +}); + +// 需要在设置之外使用 +export function usePermissionStoreWithOut() { + return usePermissionStore(store); +} diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts new file mode 100644 index 0000000..099710d --- /dev/null +++ b/src/store/modules/user.ts @@ -0,0 +1,388 @@ +import type { UserInfo, LoginInfo } from '/#/store'; +import type { ErrorMessageMode } from '/#/axios'; +import { defineStore } from 'pinia'; +import { store } from '/@/store'; +import { RoleEnum } from '/@/enums/roleEnum'; +import { PageEnum } from '/@/enums/pageEnum'; +import { ROLES_KEY, TOKEN_KEY, USER_INFO_KEY, LOGIN_INFO_KEY, DB_DICT_DATA_KEY, TENANT_ID, OAUTH2_THIRD_LOGIN_TENANT_ID } from '/@/enums/cacheEnum'; +import { getAuthCache, setAuthCache, removeAuthCache } from '/@/utils/auth'; +import { GetUserInfoModel, LoginParams, ThirdLoginParams } from '/@/api/sys/model/userModel'; +import { doLogout, getUserInfo, loginApi, phoneLoginApi, thirdLogin } from '/@/api/sys/user'; +import { useI18n } from '/@/hooks/web/useI18n'; +import { useMessage } from '/@/hooks/web/useMessage'; +import { router } from '/@/router'; +import { usePermissionStore } from '/@/store/modules/permission'; +import { RouteRecordRaw } from 'vue-router'; +import { PAGE_NOT_FOUND_ROUTE } from '/@/router/routes/basic'; +import { isArray } from '/@/utils/is'; +import { useGlobSetting } from '/@/hooks/setting'; +import { JDragConfigEnum } from '/@/enums/jeecgEnum'; +import { useSso } from '/@/hooks/web/useSso'; +import { isOAuth2AppEnv } from "/@/views/sys/login/useLogin"; +import { getUrlParam } from "@/utils"; +interface dictType { + [key: string]: any; +} +interface UserState { + userInfo: Nullable; + token?: string; + roleList: RoleEnum[]; + dictItems?: dictType | null; + sessionTimeout?: boolean; + lastUpdateTime: number; + tenantid?: string | number; + shareTenantId?: Nullable; + loginInfo?: Nullable; +} + +export const useUserStore = defineStore({ + id: 'app-user', + state: (): UserState => ({ + // 用户信息 + userInfo: null, + // token + token: undefined, + // 角色列表 + roleList: [], + // 字典 + dictItems: null, + // session过期时间 + sessionTimeout: false, + // Last fetch time + lastUpdateTime: 0, + //租户id + tenantid: '', + // 分享租户ID + // 用于分享页面所属租户与当前用户登录租户不一致的情况 + shareTenantId: null, + //登录返回信息 + loginInfo: null, + }), + getters: { + getUserInfo(): UserInfo { + if(this.userInfo == null){ + this.userInfo = getAuthCache(USER_INFO_KEY)!=null ? getAuthCache(USER_INFO_KEY) : null; + } + return this.userInfo || getAuthCache(USER_INFO_KEY) || {}; + }, + getLoginInfo(): LoginInfo { + return this.loginInfo || getAuthCache(LOGIN_INFO_KEY) || {}; + }, + getToken(): string { + return this.token || getAuthCache(TOKEN_KEY); + }, + getAllDictItems(): [] { + return this.dictItems || getAuthCache(DB_DICT_DATA_KEY); + }, + getRoleList(): RoleEnum[] { + return this.roleList.length > 0 ? this.roleList : getAuthCache(ROLES_KEY); + }, + getSessionTimeout(): boolean { + return !!this.sessionTimeout; + }, + getLastUpdateTime(): number { + return this.lastUpdateTime; + }, + getTenant(): string | number { + return this.tenantid || getAuthCache(TENANT_ID); + }, + // 是否有分享租户id + hasShareTenantId(): boolean { + return this.shareTenantId != null && this.shareTenantId !== ''; + }, + }, + actions: { + setToken(info: string | undefined) { + this.token = info ? info : ''; // for null or undefined value + setAuthCache(TOKEN_KEY, info); + }, + setRoleList(roleList: RoleEnum[]) { + this.roleList = roleList; + setAuthCache(ROLES_KEY, roleList); + }, + setUserInfo(info: UserInfo | null) { + this.userInfo = info; + this.lastUpdateTime = new Date().getTime(); + setAuthCache(USER_INFO_KEY, info); + }, + setLoginInfo(info: LoginInfo | null) { + this.loginInfo = info; + setAuthCache(LOGIN_INFO_KEY, info); + }, + setAllDictItems(dictItems) { + this.dictItems = dictItems; + setAuthCache(DB_DICT_DATA_KEY, dictItems); + }, + setAllDictItemsByLocal() { + // update-begin--author:liaozhiyang---date:20240321---for:【QQYUN-8572】表格行选择卡顿问题(customRender中字典引起的) + if (!this.dictItems) { + const allDictItems = getAuthCache(DB_DICT_DATA_KEY); + if (allDictItems) { + this.dictItems = allDictItems; + } + } + // update-end--author:liaozhiyang---date:20240321---for:【QQYUN-8572】表格行选择卡顿问题(customRender中字典引起的) + }, + setTenant(id) { + this.tenantid = id; + setAuthCache(TENANT_ID, id); + }, + setShareTenantId(id: NonNullable) { + this.shareTenantId = id; + }, + setSessionTimeout(flag: boolean) { + this.sessionTimeout = flag; + }, + resetState() { + this.userInfo = null; + this.dictItems = null; + this.token = ''; + this.roleList = []; + this.sessionTimeout = false; + }, + /** + * 登录事件 + */ + async login( + params: LoginParams & { + goHome?: boolean; + mode?: ErrorMessageMode; + } + ): Promise { + try { + const { goHome = true, mode, ...loginParams } = params; + const data = await loginApi(loginParams, mode); + const { token, userInfo } = data; + // save token + this.setToken(token); + this.setTenant(userInfo.loginTenantId); + return this.afterLoginAction(goHome, data); + } catch (error) { + return Promise.reject(error); + } + }, + /** + * 扫码登录事件 + */ + async qrCodeLogin(token): Promise { + try { + // save token + this.setToken(token); + return this.afterLoginAction(true, {}); + } catch (error) { + return Promise.reject(error); + } + }, + /** + * 登录完成处理 + * @param goHome + */ + async afterLoginAction(goHome?: boolean, data?: any): Promise { + if (!this.getToken) return null; + //获取用户信息 + const userInfo = await this.getUserInfoAction(); + const sessionTimeout = this.sessionTimeout; + if (sessionTimeout) { + this.setSessionTimeout(false); + } else { + //update-begin---author:scott ---date::2024-02-21 for:【QQYUN-8326】登录不需要构建路由,进入首页有构建--- + // // 构建后台菜单路由 + // const permissionStore = usePermissionStore(); + // if (!permissionStore.isDynamicAddedRoute) { + // const routes = await permissionStore.buildRoutesAction(); + // routes.forEach((route) => { + // router.addRoute(route as unknown as RouteRecordRaw); + // }); + // router.addRoute(PAGE_NOT_FOUND_ROUTE as unknown as RouteRecordRaw); + // permissionStore.setDynamicAddedRoute(true); + // } + //update-end---author:scott ---date::2024-02-21 for:【QQYUN-8326】登录不需要构建路由,进入首页有构建--- + + await this.setLoginInfo({ ...data, isLogin: true }); + //update-begin-author:liusq date:2022-5-5 for:登录成功后缓存拖拽模块的接口前缀 + localStorage.setItem(JDragConfigEnum.DRAG_BASE_URL, useGlobSetting().domainUrl); + //update-end-author:liusq date:2022-5-5 for: 登录成功后缓存拖拽模块的接口前缀 + + // update-begin-author:sunjianlei date:20230306 for: 修复登录成功后,没有正确重定向的问题 + let redirect = router.currentRoute.value?.query?.redirect as string; + // 判断是否有 redirect 重定向地址 + //update-begin---author:wangshuai ---date:20230424 for:【QQYUN-5195】登录之后直接刷新页面导致没有进入创建组织页面------------ + if (redirect && goHome) { + //update-end---author:wangshuai ---date:20230424 for:【QQYUN-5195】登录之后直接刷新页面导致没有进入创建组织页面------------ + // update-begin--author:liaozhiyang---date:20250407---for:【issues/8034】hash模式下退出重登录默认跳转地址异常 + // router.options.history.base可替代之前的publicPath + // 当前页面打开 + window.open(`${router.options.history.base}${redirect}`, '_self'); + // update-end--author:liaozhiyang---date:20250407---for:【issues/8034】hash模式下退出重登录默认跳转地址异常 + return data; + } + // update-end-author:sunjianlei date:20230306 for: 修复登录成功后,没有正确重定向的问题 + + //update-begin---author:wangshuai---date:2024-04-03---for:【issues/1102】设置单点登录后页面,进入首页提示404,也没有绘制侧边栏 #1102--- + let ticket = getUrlParam('ticket'); + if(ticket){ + goHome && (window.location.replace((userInfo && userInfo.homePath) || PageEnum.BASE_HOME)); + }else{ + goHome && (await router.replace((userInfo && userInfo.homePath) || PageEnum.BASE_HOME)); + } + //update-end---author:wangshuai---date:2024-04-03---for:【issues/1102】设置单点登录后页面,进入首页提示404,也没有绘制侧边栏 #1102--- + } + return data; + }, + /** + * 手机号登录 + * @param params + */ + async phoneLogin( + params: LoginParams & { + goHome?: boolean; + mode?: ErrorMessageMode; + } + ): Promise { + try { + const { goHome = true, mode, ...loginParams } = params; + const data = await phoneLoginApi(loginParams, mode); + //update-begin---author:wangshuai---date:2024-11-25---for:【issues/7488】手机号码登录,在请求头中无法获取租户id--- + const { token , userInfo } = data; + this.setTenant(userInfo!.loginTenantId); + //update-end---author:wangshuai---date:2024-11-25---for:【issues/7488】手机号码登录,在请求头中无法获取租户id--- + // save token + this.setToken(token); + return this.afterLoginAction(goHome, data); + } catch (error) { + return Promise.reject(error); + } + }, + /** + * 获取用户信息 + */ + async getUserInfoAction(): Promise { + if (!this.getToken) { + return null; + } + const { userInfo, sysAllDictItems } = await getUserInfo(); + if (userInfo) { + const { roles = [] } = userInfo; + if (isArray(roles)) { + const roleList = roles.map((item) => item.value) as RoleEnum[]; + this.setRoleList(roleList); + } else { + userInfo.roles = []; + this.setRoleList([]); + } + this.setUserInfo(userInfo); + } + /** + * 添加字典信息到缓存 + * @updateBy:lsq + * @updateDate:2021-09-08 + */ + if (sysAllDictItems) { + this.setAllDictItems(sysAllDictItems); + } + return userInfo; + }, + /** + * 退出登录 + */ + async logout(goLogin = false) { + if (this.getToken) { + try { + await doLogout(); + } catch { + console.log('注销Token失败'); + } + } + + // //update-begin-author:taoyan date:2022-5-5 for: src/layouts/default/header/index.vue showLoginSelect方法 获取tenantId 退出登录后再次登录依然能获取到值,没有清空 + // let username:any = this.userInfo && this.userInfo.username; + // if(username){ + // removeAuthCache(username) + // } + // //update-end-author:taoyan date:2022-5-5 for: src/layouts/default/header/index.vue showLoginSelect方法 获取tenantId 退出登录后再次登录依然能获取到值,没有清空 + + this.setToken(''); + setAuthCache(TOKEN_KEY, null); + this.setSessionTimeout(false); + this.setUserInfo(null); + this.setLoginInfo(null); + this.setTenant(null); + // update-begin--author:liaozhiyang---date:20240517---for:【TV360X-23】退出登录后会提示「Token时效,请重新登录」 + setTimeout(() => { + this.setAllDictItems(null); + }, 1e3); + // update-end--author:liaozhiyang---date:20240517---for:【TV360X-23】退出登录后会提示「Token时效,请重新登录」 + //update-begin-author:liusq date:2022-5-5 for:退出登录后清除拖拽模块的接口前缀 + localStorage.removeItem(JDragConfigEnum.DRAG_BASE_URL); + //update-end-author:liusq date:2022-5-5 for: 退出登录后清除拖拽模块的接口前缀 + + //如果开启单点登录,则跳转到单点统一登录中心 + const openSso = useGlobSetting().openSso; + if (openSso == 'true') { + await useSso().ssoLoginOut(); + } + //update-begin---author:wangshuai ---date:20230224 for:[QQYUN-3440]新建企业微信和钉钉配置表,通过租户模式隔离------------ + //退出登录的时候需要用的应用id + if(isOAuth2AppEnv()){ + let tenantId = getAuthCache(OAUTH2_THIRD_LOGIN_TENANT_ID); + removeAuthCache(OAUTH2_THIRD_LOGIN_TENANT_ID); + goLogin && await router.push({ name:"Login",query:{ tenantId:tenantId }}) + }else{ + // update-begin-author:sunjianlei date:20230306 for: 修复登录成功后,没有正确重定向的问题 + goLogin && (await router.push({ + path: PageEnum.BASE_LOGIN, + query: { + // 传入当前的路由,登录成功后跳转到当前路由 + redirect: router.currentRoute.value.fullPath, + } + })); + // update-end-author:sunjianlei date:20230306 for: 修复登录成功后,没有正确重定向的问题 + + } + //update-end---author:wangshuai ---date:20230224 for:[QQYUN-3440]新建企业微信和钉钉配置表,通过租户模式隔离------------ + }, + /** + * 登录事件 + */ + async ThirdLogin( + params: ThirdLoginParams & { + goHome?: boolean; + mode?: ErrorMessageMode; + } + ): Promise { + try { + const { goHome = true, mode, ...ThirdLoginParams } = params; + const data = await thirdLogin(ThirdLoginParams, mode); + //update-begin---author:wangshuai---date:2024-07-01---for:【issues/6652】开启租户数据隔离,接入钉钉后登录默认租户为0了--- + const { token, userInfo } = data; + this.setTenant(userInfo?.loginTenantId); + //update-end---author:wangshuai---date:2024-07-01---for:【issues/6652】开启租户数据隔离,接入钉钉后登录默认租户为0了--- + // save token + this.setToken(token); + return this.afterLoginAction(goHome, data); + } catch (error) { + return Promise.reject(error); + } + }, + /** + * 退出询问 + */ + confirmLoginOut() { + const { createConfirm } = useMessage(); + const { t } = useI18n(); + createConfirm({ + iconType: 'warning', + title: t('sys.app.logoutTip'), + content: t('sys.app.logoutMessage'), + onOk: async () => { + await this.logout(true); + }, + }); + }, + }, +}); + +// Need to be used outside the setup +export function useUserStoreWithOut() { + return useUserStore(store); +} diff --git a/src/utils/areaData/pcaUtils.ts b/src/utils/areaData/pcaUtils.ts new file mode 100644 index 0000000..a95f818 --- /dev/null +++ b/src/utils/areaData/pcaUtils.ts @@ -0,0 +1,38 @@ +import {areaList} from '@vant/area-data' +import {freezeDeep} from "@/utils/common/compUtils"; + +// 扁平化的省市区数据 +export const pcaa = freezeDeep(usePlatPcaaData()) + +/** + * 获取扁平化的省市区数据 + */ +function usePlatPcaaData() { + const {city_list: city, county_list: county, province_list: province} = areaList; + const dataMap = new Map() + const flatData: Recordable = {'86': province} + // 省 + Object.keys(province).forEach((code) => { + flatData[code] = {} + dataMap.set(code.slice(0, 2), flatData[code]) + }) + // 市区 + Object.keys(city).forEach((code) => { + flatData[code] = {} + dataMap.set(code.slice(0, 4), flatData[code]) + // 填充上一级 + const getProvince = dataMap.get(code.slice(0, 2)) + if (getProvince) { + getProvince[code] = city[code] + } + }); + // 县 + Object.keys(county).forEach((code) => { + // 填充上一级 + const getCity = dataMap.get(code.slice(0, 4)) + if (getCity) { + getCity[code] = county[code] + } + }); + return flatData +} \ No newline at end of file diff --git a/src/utils/auth/index.ts b/src/utils/auth/index.ts new file mode 100644 index 0000000..95d79b7 --- /dev/null +++ b/src/utils/auth/index.ts @@ -0,0 +1,80 @@ +import { Persistent, BasicKeys } from '/@/utils/cache/persistent'; +import { CacheTypeEnum } from '/@/enums/cacheEnum'; +import projectSetting from '/@/settings/projectSetting'; +import { TOKEN_KEY, LOGIN_INFO_KEY, TENANT_ID } from '/@/enums/cacheEnum'; + +const { permissionCacheType } = projectSetting; +const isLocal = permissionCacheType === CacheTypeEnum.LOCAL; + +/** + * 获取token + */ +export function getToken() { + return getAuthCache(TOKEN_KEY); +} +/** + * 获取登录信息 + */ +export function getLoginBackInfo() { + return getAuthCache(LOGIN_INFO_KEY); +} +/** + * 获取租户id + */ +export function getTenantId() { + return getAuthCache(TENANT_ID); +} + +export function getAuthCache(key: BasicKeys) { + const fn = isLocal ? Persistent.getLocal : Persistent.getSession; + return fn(key) as T; +} + +export function setAuthCache(key: BasicKeys, value) { + const fn = isLocal ? Persistent.setLocal : Persistent.setSession; + return fn(key, value, true); +} + +/** + * 设置动态key + * @param key + * @param value + */ +export function setCacheByDynKey(key, value) { + const fn = isLocal ? Persistent.setLocal : Persistent.setSession; + return fn(key, value, true); +} + +/** + * 获取动态key + * @param key + */ +export function getCacheByDynKey(key) { + const fn = isLocal ? Persistent.getLocal : Persistent.getSession; + return fn(key) as T; +} + +/** + * 移除动态key + * @param key + */ +export function removeCacheByDynKey(key) { + const fn = isLocal ? Persistent.removeLocal : Persistent.removeSession; + return fn(key) as T; +} +/** + * 移除缓存中的某个属性 + * @param key + * @update:移除缓存中的某个属性 + * @updateBy:lsq + * @updateDate:2021-09-07 + */ +export function removeAuthCache(key: BasicKeys) { + const fn = isLocal ? Persistent.removeLocal : Persistent.removeSession; + return fn(key) as T; +} + +export function clearAuthCache(immediate = true) { + const fn = isLocal ? Persistent.clearLocal : Persistent.clearSession; + return fn(immediate); +} diff --git a/src/utils/bem.ts b/src/utils/bem.ts new file mode 100644 index 0000000..7dcadbc --- /dev/null +++ b/src/utils/bem.ts @@ -0,0 +1,52 @@ +import { prefixCls } from '/@/settings/designSetting'; + +type Mod = string | { [key: string]: any }; +type Mods = Mod | Mod[]; + +export type BEM = ReturnType; + +function genBem(name: string, mods?: Mods): string { + if (!mods) { + return ''; + } + + if (typeof mods === 'string') { + return ` ${name}--${mods}`; + } + + if (Array.isArray(mods)) { + return mods.reduce((ret, item) => ret + genBem(name, item), ''); + } + + return Object.keys(mods).reduce((ret, key) => ret + (mods[key] ? genBem(name, key) : ''), ''); +} + +/** + * bem helper + * b() // 'button' + * b('text') // 'button__text' + * b({ disabled }) // 'button button--disabled' + * b('text', { disabled }) // 'button__text button__text--disabled' + * b(['disabled', 'primary']) // 'button button--disabled button--primary' + */ +export function buildBEM(name: string) { + return (el?: Mods, mods?: Mods): Mods => { + if (el && typeof el !== 'string') { + mods = el; + el = ''; + } + + el = el ? `${name}__${el}` : name; + + return `${el}${genBem(el, mods)}`; + }; +} + +export function createBEM(name: string) { + return [buildBEM(`${prefixCls}-${name}`)]; +} + +export function createNamespace(name: string) { + const prefixedName = `${prefixCls}-${name}`; + return [prefixedName, buildBEM(prefixedName)] as const; +} diff --git a/src/utils/browser.js b/src/utils/browser.js new file mode 100644 index 0000000..9765f94 --- /dev/null +++ b/src/utils/browser.js @@ -0,0 +1,37 @@ +//判断是否IE<11浏览器 +export function isIE() { + return navigator.userAgent.indexOf('compatible') > -1 && navigator.userAgent.indexOf('MSIE') > -1; +} + +export function isIE11() { + return navigator.userAgent.indexOf('Trident') > -1 && navigator.userAgent.indexOf('rv:11.0') > -1; +} + +//判断是否IE的Edge浏览器 +export function isEdge() { + return navigator.userAgent.indexOf('Edge') > -1 && !isIE(); +} + +export function getIEVersion() { + let userAgent = navigator.userAgent; //取得浏览器的userAgent字符串 + let isIE = isIE(); + let isIE11 = isIE11(); + let isEdge = isEdge(); + + if (isIE) { + let reIE = new RegExp('MSIE (\\d+\\.\\d+);'); + reIE.test(userAgent); + let fIEVersion = parseFloat(RegExp['$1']); + if (fIEVersion === 7 || fIEVersion === 8 || fIEVersion === 9 || fIEVersion === 10) { + return fIEVersion; + } else { + return 6; //IE版本<7 + } + } else if (isEdge) { + return 'edge'; + } else if (isIE11) { + return 11; + } else { + return -1; + } +} diff --git a/src/utils/cache/index.ts b/src/utils/cache/index.ts new file mode 100644 index 0000000..2004c66 --- /dev/null +++ b/src/utils/cache/index.ts @@ -0,0 +1,32 @@ +import { getStorageShortName } from '/@/utils/env'; +import { createStorage as create, CreateStorageParams } from './storageCache'; +import { enableStorageEncryption } from '/@/settings/encryptionSetting'; +import { DEFAULT_CACHE_TIME } from '/@/settings/encryptionSetting'; + +export type Options = Partial; + +const createOptions = (storage: Storage, options: Options = {}): Options => { + return { + // No encryption in debug mode + hasEncrypt: enableStorageEncryption, + storage, + prefixKey: getStorageShortName(), + ...options, + }; +}; + +export const WebStorage = create(createOptions(sessionStorage)); + +export const createStorage = (storage: Storage = sessionStorage, options: Options = {}) => { + return create(createOptions(storage, options)); +}; + +export const createSessionStorage = (options: Options = {}) => { + return createStorage(sessionStorage, { ...options, timeout: DEFAULT_CACHE_TIME }); +}; + +export const createLocalStorage = (options: Options = {}) => { + return createStorage(localStorage, { ...options, timeout: DEFAULT_CACHE_TIME }); +}; + +export default WebStorage; diff --git a/src/utils/cache/memory.ts b/src/utils/cache/memory.ts new file mode 100644 index 0000000..20622d5 --- /dev/null +++ b/src/utils/cache/memory.ts @@ -0,0 +1,110 @@ +import { TOKEN_KEY, ROLES_KEY, USER_INFO_KEY, DB_DICT_DATA_KEY, TENANT_ID, LOGIN_INFO_KEY, PROJ_CFG_KEY } from '/@/enums/cacheEnum'; +import { omit } from 'lodash-es'; + +export interface Cache { + value?: V; + timeoutId?: ReturnType; + time?: number; + alive?: number; +} + +const NOT_ALIVE = 0; + +export class Memory { + private cache: { [key in keyof T]?: Cache } = {}; + private alive: number; + + constructor(alive = NOT_ALIVE) { + // Unit second + this.alive = alive * 1000; + } + + get getCache() { + return this.cache; + } + + setCache(cache) { + this.cache = cache; + } + + // get(key: K) { + // const item = this.getItem(key); + // const time = item?.time; + // if (!isNullOrUnDef(time) && time < new Date().getTime()) { + // this.remove(key); + // } + // return item?.value ?? undefined; + // } + + get(key: K) { + return this.cache[key]; + } + + set(key: K, value: V, expires?: number) { + let item = this.get(key); + + if (!expires || (expires as number) <= 0) { + expires = this.alive; + } + if (item) { + if (item.timeoutId) { + clearTimeout(item.timeoutId); + item.timeoutId = undefined; + } + item.value = value; + } else { + item = { value, alive: expires }; + this.cache[key] = item; + } + + if (!expires) { + return value; + } + const now = new Date().getTime(); + item.time = now + this.alive; + item.timeoutId = setTimeout( + () => { + this.remove(key); + }, + expires > now ? expires - now : expires + ); + + return value; + } + + remove(key: K) { + const item = this.get(key); + Reflect.deleteProperty(this.cache, key); + if (item) { + clearTimeout(item.timeoutId!); + return item.value; + } + } + + resetCache(cache: { [K in keyof T]: Cache }) { + Object.keys(cache).forEach((key) => { + const k = key as any as keyof T; + const item = cache[k]; + if (item && item.time) { + const now = new Date().getTime(); + const expire = item.time; + if (expire > now) { + this.set(k, item.value, expire); + } + } + }); + } + + clear() { + console.log('------clear------进入clear方法'); + Object.keys(this.cache).forEach((key) => { + const item = this.cache[key]; + item.timeoutId && clearTimeout(item.timeoutId); + }); + //update-begin---author:liusq Date:20220108 for:不删除登录用户的租户id,其他缓存信息都清除---- + this.cache = { + ...omit(this.cache, [TOKEN_KEY, USER_INFO_KEY, ROLES_KEY, DB_DICT_DATA_KEY, TENANT_ID, LOGIN_INFO_KEY, PROJ_CFG_KEY]), + }; + //update-end---author:liusq Date:20220108 for:不删除登录用户的租户id,其他缓存信息都清除---- + } +} diff --git a/src/utils/cache/persistent.ts b/src/utils/cache/persistent.ts new file mode 100644 index 0000000..7ebb0d9 --- /dev/null +++ b/src/utils/cache/persistent.ts @@ -0,0 +1,150 @@ +import type { LockInfo, UserInfo, LoginInfo } from '/#/store'; +import type { ProjectConfig } from '/#/config'; +import type { RouteLocationNormalized } from 'vue-router'; + +import { createLocalStorage, createSessionStorage } from '/@/utils/cache'; +import { Memory } from './memory'; +import { + TOKEN_KEY, + USER_INFO_KEY, + ROLES_KEY, + LOCK_INFO_KEY, + PROJ_CFG_KEY, + APP_LOCAL_CACHE_KEY, + APP_SESSION_CACHE_KEY, + MULTIPLE_TABS_KEY, + DB_DICT_DATA_KEY, + TENANT_ID, + LOGIN_INFO_KEY, + OAUTH2_THIRD_LOGIN_TENANT_ID, +} from '/@/enums/cacheEnum'; +import { DEFAULT_CACHE_TIME } from '/@/settings/encryptionSetting'; +import { toRaw } from 'vue'; +import { pick, omit } from 'lodash-es'; +import { PageEnum } from '/@/enums/pageEnum'; +import { router } from '/@/router'; + +interface BasicStore { + [TOKEN_KEY]: string | number | null | undefined; + [USER_INFO_KEY]: UserInfo; + [ROLES_KEY]: string[]; + [LOCK_INFO_KEY]: LockInfo; + [PROJ_CFG_KEY]: ProjectConfig; + [MULTIPLE_TABS_KEY]: RouteLocationNormalized[]; + [DB_DICT_DATA_KEY]: string; + [TENANT_ID]: string; + [LOGIN_INFO_KEY]: LoginInfo; + [OAUTH2_THIRD_LOGIN_TENANT_ID]: string +} + +type LocalStore = BasicStore; + +type SessionStore = BasicStore; + +export type BasicKeys = keyof BasicStore; +type LocalKeys = keyof LocalStore; +type SessionKeys = keyof SessionStore; + +const ls = createLocalStorage(); +const ss = createSessionStorage(); + +const localMemory = new Memory(DEFAULT_CACHE_TIME); +const sessionMemory = new Memory(DEFAULT_CACHE_TIME); + +function initPersistentMemory() { + const localCache = ls.get(APP_LOCAL_CACHE_KEY); + const sessionCache = ss.get(APP_SESSION_CACHE_KEY); + localCache && localMemory.resetCache(localCache); + sessionCache && sessionMemory.resetCache(sessionCache); +} + +export class Persistent { + static getLocal(key: LocalKeys) { + //update-begin---author:scott ---date:2022-10-27 for:token过期退出重新登录,online菜单还是提示token过期---------- + const globalCache = ls.get(APP_LOCAL_CACHE_KEY); + // update-begin--author:liaozhiyang---date:20240920---for:【issues/7250】自动锁屏无法解锁 + if (globalCache && router?.currentRoute?.value.path !== PageEnum.BASE_LOGIN) { + localMemory.setCache(globalCache); + } + // update-end--author:liaozhiyang---date:20240920---for:【issues/7250】自动锁屏无法解锁 + //update-end---author:scott ---date::2022-10-27 for:token过期退出重新登录,online菜单还是提示token过期---------- + return localMemory.get(key)?.value as Nullable; + } + + static setLocal(key: LocalKeys, value: LocalStore[LocalKeys], immediate = false): void { + localMemory.set(key, toRaw(value)); + immediate && ls.set(APP_LOCAL_CACHE_KEY, localMemory.getCache); + } + + static removeLocal(key: LocalKeys, immediate = false): void { + localMemory.remove(key); + immediate && ls.set(APP_LOCAL_CACHE_KEY, localMemory.getCache); + } + + static clearLocal(immediate = false): void { + localMemory.clear(); + immediate && ls.clear(); + } + + static getSession(key: SessionKeys) { + return sessionMemory.get(key)?.value as Nullable; + } + + static setSession(key: SessionKeys, value: SessionStore[SessionKeys], immediate = false): void { + sessionMemory.set(key, toRaw(value)); + immediate && ss.set(APP_SESSION_CACHE_KEY, sessionMemory.getCache); + } + + static removeSession(key: SessionKeys, immediate = false): void { + sessionMemory.remove(key); + immediate && ss.set(APP_SESSION_CACHE_KEY, sessionMemory.getCache); + } + static clearSession(immediate = false): void { + sessionMemory.clear(); + immediate && ss.clear(); + } + + static clearAll(immediate = false) { + sessionMemory.clear(); + localMemory.clear(); + if (immediate) { + ls.clear(); + ss.clear(); + } + } +} + +window.addEventListener('beforeunload', function () { + // TOKEN_KEY 在登录或注销时已经写入到storage了,此处为了解决同时打开多个窗口时token不同步的问题 + // LOCK_INFO_KEY 在锁屏和解锁时写入,此处也不应修改 + ls.set(APP_LOCAL_CACHE_KEY, { + ...omit(localMemory.getCache, LOCK_INFO_KEY), + ...pick(ls.get(APP_LOCAL_CACHE_KEY), [TOKEN_KEY, USER_INFO_KEY, LOCK_INFO_KEY]), + }); + ss.set(APP_SESSION_CACHE_KEY, { + ...omit(sessionMemory.getCache, LOCK_INFO_KEY), + ...pick(ss.get(APP_SESSION_CACHE_KEY), [TOKEN_KEY, USER_INFO_KEY, LOCK_INFO_KEY]), + }); +}); + +function storageChange(e: any) { + const { key, newValue, oldValue } = e; + + if (!key) { + Persistent.clearAll(); + return; + } + + if (!!newValue && !!oldValue) { + if (APP_LOCAL_CACHE_KEY === key) { + Persistent.clearLocal(); + } + if (APP_SESSION_CACHE_KEY === key) { + Persistent.clearSession(); + } + } +} + +window.addEventListener('storage', storageChange); + +initPersistentMemory(); diff --git a/src/utils/cache/storageCache.ts b/src/utils/cache/storageCache.ts new file mode 100644 index 0000000..faa7acd --- /dev/null +++ b/src/utils/cache/storageCache.ts @@ -0,0 +1,112 @@ +import { cacheCipher } from '/@/settings/encryptionSetting'; + +import type { EncryptionParams } from '/@/utils/cipher'; + +import { AesEncryption } from '/@/utils/cipher'; + +import { isNullOrUnDef } from '/@/utils/is'; + +export interface CreateStorageParams extends EncryptionParams { + prefixKey: string; + storage: Storage; + hasEncrypt: boolean; + timeout?: Nullable; +} +export const createStorage = ({ + prefixKey = '', + storage = sessionStorage, + key = cacheCipher.key, + iv = cacheCipher.iv, + timeout = null, + hasEncrypt = true, +}: Partial = {}) => { + if (hasEncrypt && [key.length, iv.length].some((item) => item !== 16)) { + throw new Error('When hasEncrypt is true, the key or iv must be 16 bits!'); + } + + const encryption = new AesEncryption({ key, iv }); + + /** + *Cache class + *Construction parameters can be passed into sessionStorage, localStorage, + * @class Cache + * @example + */ + const WebStorage = class WebStorage { + private storage: Storage; + private prefixKey?: string; + private encryption: AesEncryption; + private hasEncrypt: boolean; + /** + * + * @param {*} storage + */ + constructor() { + this.storage = storage; + this.prefixKey = prefixKey; + this.encryption = encryption; + this.hasEncrypt = hasEncrypt; + } + + private getKey(key: string) { + return `${this.prefixKey}${key}`.toUpperCase(); + } + + /** + * + * Set cache + * @param {string} key + * @param {*} value + * @expire Expiration time in seconds + * @memberof Cache + */ + set(key: string, value: any, expire: number | null = timeout) { + const stringData = JSON.stringify({ + value, + time: Date.now(), + expire: !isNullOrUnDef(expire) ? new Date().getTime() + expire * 1000 : null, + }); + const stringifyValue = this.hasEncrypt ? this.encryption.encryptByAES(stringData) : stringData; + this.storage.setItem(this.getKey(key), stringifyValue); + } + + /** + *Read cache + * @param {string} key + * @memberof Cache + */ + get(key: string, def: any = null): any { + const val = this.storage.getItem(this.getKey(key)); + if (!val) return def; + + try { + const decVal = this.hasEncrypt ? this.encryption.decryptByAES(val) : val; + const data = JSON.parse(decVal); + const { value, expire } = data; + if (isNullOrUnDef(expire) || expire >= new Date().getTime()) { + return value; + } + this.remove(key); + } catch (e) { + return def; + } + } + + /** + * Delete cache based on key + * @param {string} key + * @memberof Cache + */ + remove(key: string) { + this.storage.removeItem(this.getKey(key)); + } + + /** + * Delete all caches of this instance + */ + clear(): void { + this.storage.clear(); + } + }; + return new WebStorage(); +}; diff --git a/src/utils/cipher.ts b/src/utils/cipher.ts new file mode 100644 index 0000000..9a8a89a --- /dev/null +++ b/src/utils/cipher.ts @@ -0,0 +1,55 @@ +import { encrypt, decrypt } from 'crypto-js/aes'; +import { parse } from 'crypto-js/enc-utf8'; +import pkcs7 from 'crypto-js/pad-pkcs7'; +import ECB from 'crypto-js/mode-ecb'; +import md5 from 'crypto-js/md5'; +import UTF8 from 'crypto-js/enc-utf8'; +import Base64 from 'crypto-js/enc-base64'; + +export interface EncryptionParams { + key: string; + iv: string; +} + +export class AesEncryption { + private key; + private iv; + + constructor(opt: Partial = {}) { + const { key, iv } = opt; + if (key) { + this.key = parse(key); + } + if (iv) { + this.iv = parse(iv); + } + } + + get getOptions() { + return { + mode: ECB, + padding: pkcs7, + iv: this.iv, + }; + } + + encryptByAES(cipherText: string) { + return encrypt(cipherText, this.key, this.getOptions).toString(); + } + + decryptByAES(cipherText: string) { + return decrypt(cipherText, this.key, this.getOptions).toString(UTF8); + } +} + +export function encryptByBase64(cipherText: string) { + return UTF8.parse(cipherText).toString(Base64); +} + +export function decodeByBase64(cipherText: string) { + return Base64.parse(cipherText).toString(UTF8); +} + +export function encryptByMd5(password: string) { + return md5(password).toString(); +} diff --git a/src/utils/color.ts b/src/utils/color.ts new file mode 100644 index 0000000..5a07dfb --- /dev/null +++ b/src/utils/color.ts @@ -0,0 +1,145 @@ +/** + * 判断是否 十六进制颜色值. + * 输入形式可为 #fff000 #f00 + * + * @param String color 十六进制颜色值 + * @return Boolean + */ +export function isHexColor(color: string) { + const reg = /^#([0-9a-fA-F]{3}|[0-9a-fA-f]{6})$/; + return reg.test(color); +} + +/** + * RGB 颜色值转换为 十六进制颜色值. + * r, g, 和 b 需要在 [0, 255] 范围内 + * + * @return String 类似#ff00ff + * @param r + * @param g + * @param b + */ +export function rgbToHex(r: number, g: number, b: number) { + // tslint:disable-next-line:no-bitwise + const hex = ((r << 16) | (g << 8) | b).toString(16); + return '#' + new Array(Math.abs(hex.length - 7)).join('0') + hex; +} + +/** + * Transform a HEX color to its RGB representation + * @param {string} hex The color to transform + * @returns The RGB representation of the passed color + */ +export function hexToRGB(hex: string) { + 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 'RGB(' + sColorChange.join(',') + ')'; + } + return sHex; +} + +export function 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; +} + +/** + * Darkens a HEX color given the passed percentage + * @param {string} color The color to process + * @param {number} amount The amount to change the color by + * @returns {string} The HEX representation of the processed color + */ +export function darken(color: string, amount: number) { + color = color.indexOf('#') >= 0 ? color.substring(1, color.length) : color; + amount = Math.trunc((255 * amount) / 100); + return `#${subtractLight(color.substring(0, 2), amount)}${subtractLight(color.substring(2, 4), amount)}${subtractLight( + color.substring(4, 6), + amount + )}`; +} + +/** + * 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 function 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 + */ +function 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)}`; +} + +/** + * Calculates luminance of an rgb color + * @param {number} r red + * @param {number} g green + * @param {number} b blue + */ +function luminanace(r: number, g: number, b: number) { + const a = [r, g, b].map((v) => { + v /= 255; + return v <= 0.03928 ? v / 12.92 : Math.pow((v + 0.055) / 1.055, 2.4); + }); + return a[0] * 0.2126 + a[1] * 0.7152 + a[2] * 0.0722; +} + +/** + * Calculates contrast between two rgb colors + * @param {string} rgb1 rgb color 1 + * @param {string} rgb2 rgb color 2 + */ +function contrast(rgb1: string[], rgb2: number[]) { + return (luminanace(~~rgb1[0], ~~rgb1[1], ~~rgb1[2]) + 0.05) / (luminanace(rgb2[0], rgb2[1], rgb2[2]) + 0.05); +} + +/** + * Determines what the best text color is (black or white) based con the contrast with the background + * @param hexColor - Last selected color by the user + */ +export function calculateBestTextColor(hexColor: string) { + const rgbColor = hexToRGB(hexColor.substring(1)); + const contrastWithBlack = contrast(rgbColor.split(','), [0, 0, 0]); + + return contrastWithBlack >= 12 ? '#000000' : '#FFFFFF'; +} + +/** + * Subtracts the indicated 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 + */ +function subtractLight(color: string, amount: number) { + const cc = parseInt(color, 16) - amount; + const c = cc < 0 ? 0 : cc; + return c.toString(16).length > 1 ? c.toString(16) : `0${c.toString(16)}`; +} diff --git a/src/utils/common/compUtils.ts b/src/utils/common/compUtils.ts new file mode 100644 index 0000000..f03b807 --- /dev/null +++ b/src/utils/common/compUtils.ts @@ -0,0 +1,611 @@ +import { useGlobSetting } from '/@/hooks/setting'; +import { merge, random } from 'lodash-es'; +import { isArray } from '/@/utils/is'; +import { FormSchema } from '/@/components/Form'; +import { reactive } from "vue"; +import { getTenantId, getToken } from "/@/utils/auth"; +import { useUserStoreWithOut } from "/@/store/modules/user"; +import dayjs from 'dayjs'; +import Big from 'big.js'; + +import { Modal } from "ant-design-vue"; +import { defHttp } from "@/utils/http/axios"; +import { useI18n } from "@/hooks/web/useI18n"; + +const globSetting = useGlobSetting(); +const baseApiUrl = globSetting.domainUrl; +/** + * 获取文件服务访问路径 + * @param fileUrl 文件路径 + * @param prefix(默认http) 文件路径前缀 http/https + */ +export const getFileAccessHttpUrl = (fileUrl, prefix = 'http') => { + let result = fileUrl; + try { + if (fileUrl && fileUrl.length > 0 && !fileUrl.startsWith(prefix)) { + //判断是否是数组格式 + let isArray = fileUrl.indexOf('[') != -1; + if (!isArray) { + let prefix = `${baseApiUrl}/sys/common/static/`; + // 判断是否已包含前缀 + if (!fileUrl.startsWith(prefix)) { + result = `${prefix}${fileUrl}`; + } + } + } + } catch (err) {} + return result; +}; + +/** + * 触发 window.resize + */ +export function triggerWindowResizeEvent() { + let event: any = document.createEvent('HTMLEvents'); + event.initEvent('resize', true, true); + event.eventType = 'message'; + window.dispatchEvent(event); +} + +/** + * 获取随机数 + * @param length 数字位数 + */ +export const getRandom = (length: number = 1) => { + return '-' + parseInt(String(Math.random() * 10000 + 1), length); +}; + +/** + * 随机生成字符串 + * @param length 字符串的长度 + * @param chats 可选字符串区间(只会生成传入的字符串中的字符) + * @return string 生成的字符串 + */ +export function randomString(length: number, chats?: string) { + if (!length) length = 1; + if (!chats) { + // noinspection SpellCheckingInspection + chats = '0123456789qwertyuioplkjhgfdsazxcvbnm'; + } + let str = ''; + for (let i = 0; i < length; i++) { + let num = random(0, chats.length - 1); + str += chats[num]; + } + return str; +} + +/** + * 将普通列表数据转化为tree结构 + * @param array tree数据 + * @param opt 配置参数 + * @param startPid 父节点 + */ +export const listToTree = (array, opt, startPid) => { + const obj = { + primaryKey: opt.primaryKey || 'key', + parentKey: opt.parentKey || 'parentId', + titleKey: opt.titleKey || 'title', + startPid: opt.startPid || '', + currentDept: opt.currentDept || 0, + maxDept: opt.maxDept || 100, + childKey: opt.childKey || 'children', + }; + if (startPid) { + obj.startPid = startPid; + } + return toTree(array, obj.startPid, obj.currentDept, obj); +}; +/** + * 递归构建tree + * @param list + * @param startPid + * @param currentDept + * @param opt + * @returns {Array} + */ +export const toTree = (array, startPid, currentDept, opt) => { + if (opt.maxDept < currentDept) { + return []; + } + let child = []; + if (array && array.length > 0) { + child = array + .map((item) => { + // 筛查符合条件的数据(主键 = startPid) + if (typeof item[opt.parentKey] !== 'undefined' && item[opt.parentKey] === startPid) { + // 满足条件则递归 + const nextChild = toTree(array, item[opt.primaryKey], currentDept + 1, opt); + // 节点信息保存 + if (nextChild.length > 0) { + item['isLeaf'] = false; + item[opt.childKey] = nextChild; + } else { + item['isLeaf'] = true; + } + item['title'] = item[opt.titleKey]; + item['label'] = item[opt.titleKey]; + item['key'] = item[opt.primaryKey]; + item['value'] = item[opt.primaryKey]; + return item; + } + }) + .filter((item) => { + return item !== undefined; + }); + } + return child; +}; + +/** + * 表格底部合计工具方法 + * @param tableData 表格数据 + * @param fieldKeys 要计算合计的列字段 + */ +export function mapTableTotalSummary(tableData: Recordable[], fieldKeys: string[]) { + let totals: any = { _row: '合计', _index: '合计' }; + fieldKeys.forEach((key) => { + totals[key] = tableData.reduce((prev, next) => { + // update-begin--author:liaozhiyang---date:20240118---for:【QQYUN-7891】PR 合计工具方法,转换为Nuber类型再计算 + const value = Number(next[key]); + if (!Number.isNaN(value)) { + // update-begin--author:liaozhiyang---date:20250224---for:【issues/7830】合计小数计算精度 + prev = Big(prev).plus(value).toString(); + // update-end--author:liaozhiyang---date:20250224---for:【issues/7830】合计小数计算精度 + } + // update-end--author:liaozhiyang---date:20240118---for:【issues/7830】PR 合计工具方法,转换为Nuber类型再计算 + return prev; + }, 0); + // update-begin--author:liaozhiyang---date:20250224---for:【issues/7830】合计小数计算精度 + totals[key] = +totals[key]; + // update-end--author:liaozhiyang---date:20250224---for:【issues/7830】合计小数计算精度 + }); + return totals; +} + +/** + * 简单实现防抖方法 + * + * 防抖(debounce)函数在第一次触发给定的函数时,不立即执行函数,而是给出一个期限值(delay),比如100ms。 + * 如果100ms内再次执行函数,就重新开始计时,直到计时结束后再真正执行函数。 + * 这样做的好处是如果短时间内大量触发同一事件,只会执行一次函数。 + * + * @param fn 要防抖的函数 + * @param delay 防抖的毫秒数 + * @returns {Function} + */ +export function simpleDebounce(fn, delay = 100) { + let timer: any | null = null; + return function () { + let args = arguments; + if (timer) { + clearTimeout(timer); + } + timer = setTimeout(() => { + // @ts-ignore + fn.apply(this, args); + }, delay); + }; +} + +/** + * 日期格式化 + * @param date 日期 + * @param block 格式化字符串 + */ +export function dateFormat(date, block) { + if (!date) { + return ''; + } + let format = block || 'yyyy-MM-dd'; + date = new Date(date); + const map = { + 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(), // 毫秒 + }; + format = format.replace(/([yMdhmsqS])+/g, (all, t) => { + let v = map[t]; + if (v !== undefined) { + if (all.length > 1) { + v = `0${v}`; + v = v.substr(v.length - 2); + } + return v; + } else if (t === 'y') { + return date + .getFullYear() + .toString() + .substr(4 - all.length); + } + return all; + }); + return format; +} + +/** + * 获取事件冒泡路径,兼容 IE11,Edge,Chrome,Firefox,Safari + * 目前使用的地方:JVxeTable Span模式 + */ +export function getEventPath(event) { + let target = event.target; + let path = (event.composedPath && event.composedPath()) || event.path; + + if (path != null) { + return path.indexOf(window) < 0 ? path.concat(window) : path; + } + + if (target === window) { + return [window]; + } + + let getParents = (node, memo) => { + const parentNode = node.parentNode; + + if (!parentNode) { + return memo; + } else { + return getParents(parentNode, memo.concat(parentNode)); + } + }; + return [target].concat(getParents(target, []), window); +} + +/** + * 如果值不存在就 push 进数组,反之不处理 + * @param array 要操作的数据 + * @param value 要添加的值 + * @param key 可空,如果比较的是对象,可能存在地址不一样但值实际上是一样的情况,可以传此字段判断对象中唯一的字段,例如 id。不传则直接比较实际值 + * @returns {boolean} 成功 push 返回 true,不处理返回 false + */ +export function pushIfNotExist(array, value, key?) { + for (let item of array) { + if (key && item[key] === value[key]) { + return false; + } else if (item === value) { + return false; + } + } + array.push(value); + return true; +} +/** + * 过滤对象中为空的属性 + * @param obj + * @returns {*} + */ +export function filterObj(obj) { + if (!(typeof obj == 'object')) { + return; + } + + for (let key in obj) { + if (obj.hasOwnProperty(key) && (obj[key] == null || obj[key] == undefined || obj[key] === '')) { + delete obj[key]; + } + } + return obj; +} + +/** + * 下划线转驼峰 + * @param string + */ +export function underLine2CamelCase(string: string) { + return string.replace(/_([a-z])/g, (_, letter) => letter.toUpperCase()); +} + +/** + * 查找树结构 + * @param treeList + * @param fn 查找方法 + * @param childrenKey + */ +export function findTree(treeList: any[], fn: Fn, childrenKey = 'children') { + for (let i = 0; i < treeList.length; i++) { + let item = treeList[i]; + if (fn(item, i, treeList)) { + return item; + } + let children = item[childrenKey]; + if (isArray(children)) { + let findResult = findTree(children, fn, childrenKey); + if (findResult) { + return findResult; + } + } + } + return null; +} + +/** 获取 mapFormSchema 方法 */ +export function bindMapFormSchema(spanMap, spanTypeDef: T) { + return function (s: FormSchema, spanType: T = spanTypeDef) { + return merge( + { + disabledLabelWidth: true, + } as FormSchema, + spanMap[spanType], + s + ); + }; +} + +/** + * 字符串是否为null或null字符串 + * @param str + * @return {boolean} + */ +export function stringIsNull(str) { + // 两个 == 可以同时判断 null 和 undefined + return str == null || str === 'null' || str === 'undefined'; +} + +/** + * 【组件多了可能存在性能问题】获取弹窗div,将下拉框、日期等组件挂载到modal上,解决弹窗遮盖问题 + * @param node + */ +export function getAutoScrollContainer(node: HTMLElement) { + let element: Nullable = node + while (element != null) { + if (element.classList.contains('scrollbar__view')) { + // 判断是否有滚动条 + if (element.clientHeight < element.scrollHeight) { + // 有滚动条时,挂载到父级,解决滚动问题 + return node.parentElement + } else { + // 无滚动条时,挂载到body上,解决下拉框遮盖问题 + return document.body + } + } else { + element = element.parentElement + } + } + // 不在弹窗内,走默认逻辑 + return node.parentElement +} + +/** + * 判断子菜单是否全部隐藏 + * @param menuTreeItem + */ +export function checkChildrenHidden(menuTreeItem){ + //是否是聚合路由 + let alwaysShow=menuTreeItem.alwaysShow; + if(alwaysShow){ + return false; + } + if(!menuTreeItem.children){ + return false + } + return menuTreeItem.children?.find((item) => item.hideMenu == false) != null; +} + +/** + * 计算文件大小 + * @param fileSize + * @param unit + * @return 返回大小及后缀 + */ +export function calculateFileSize(fileSize, unit?) { + let unitArr = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']; + if (unit && unit.length > 0) { + unitArr = unit; + } + let size = fileSize; + let unitIndex = 0; + while (size >= 1024 && unitIndex < unitArr.length - 1) { + size /= 1024; + unitIndex++; + } + //保留两位小数,四舍五入 + size = Math.round(size * 100) / 100; + return size + unitArr[unitIndex]; +} + +/** + * 获取上传header + */ +export function getHeaders() { + let tenantId = getTenantId(); + return reactive({ + 'X-Access-Token': getToken(), + 'X-Tenant-Id': tenantId ? tenantId : '0', + }); +} + +/** 根据表达式获取相应的用户信息 */ +export function getUserInfoByExpression(expression) { + if (!expression) { + return expression; + } + // 当前日期 + if (expression === 'sys_date' || expression === 'sysDate') { + return dayjs().format('YYYY-MM-DD'); + } + // 当前时间 + if (expression === 'sys_time' || expression === 'sysTime') { + return dayjs().format('HH:mm:ss'); + } + const userStore = useUserStoreWithOut(); + let userInfo = userStore.getUserInfo; + if (userInfo) { + switch (expression) { + case 'sysUserId': + return userInfo.id; + // 当前登录用户登录账号 + case 'sysUserCode': + case 'sys_user_code': + return userInfo.username; + // 当前登录用户真实名称 + case 'sysUserName': + return userInfo.realname; + // 当前登录用户部门编号 + case 'sysOrgCode': + case 'sys_org_code': + return userInfo.orgCode; + } + } + return expression; +} + +/** + * 替换表达式(#{xxx})为用户信息 + * @param expression + */ +export function replaceUserInfoByExpression(expression: string | any[]) { + if (!expression) { + return expression; + } + const isString = typeof expression === 'string'; + const isArray = Array.isArray(expression) + if (!isString && !isArray) { + return expression; + } + const reg = /#{(.*?)}/g; + const replace = (str) => { + if (typeof str !== 'string') { + return str; + } + let result = str.match(reg); + if (result && result.length > 0) { + result.forEach((item) => { + let userInfo = getUserInfoByExpression(item.substring(2, item.length - 1)); + str = str.replace(item, userInfo); + }); + } + return str; + }; + // @ts-ignore + return isString ? replace(expression) : expression.map(replace); +} + +/** + * 设置租户缓存,当租户退出的时候 + * + * @param tenantId + */ +export async function userExitChangeLoginTenantId(tenantId){ + const userStore = useUserStoreWithOut(); + //step 1 获取用户租户 + const url = '/sys/tenant/getCurrentUserTenant' + let currentTenantId = null; + const data = await defHttp.get({ url }); + if(data && data.list){ + let arr = data.list; + if(arr.length>0){ + //step 2.判断当前id是否存在用户租户中 + let filterTenantId = arr.filter((item) => item.id == tenantId); + //存在说明不是退出的不是当前租户,还用用来的租户即可 + if(filterTenantId && filterTenantId.length>0){ + currentTenantId = tenantId; + }else{ + //不存在默认第一个 + currentTenantId = arr[0].id + } + } + } + let loginTenantId = getTenantId(); + userStore.setTenant(currentTenantId); + + //update-begin---author:wangshuai---date:2023-11-07---for:【QQYUN-7005】退租户,判断退出的租户ID与当前租户ID一致,再刷新--- + //租户为空,说明没有租户了,需要刷新页面。或者当前租户和退出的租户一致则需要刷新浏览器 + if(!currentTenantId || tenantId == loginTenantId){ + window.location.reload(); + } + //update-end---author:wangshuai---date:2023-11-07---for:【QQYUN-7005】退租户,判断退出的租户ID与当前租户ID一致,再刷新--- +} + +/** + * 我的租户模块需要开启多租户提示 + * + * @param title 标题 + */ +export function tenantSaasMessage(title){ + let tenantId = getTenantId(); + if(!tenantId){ + Modal.confirm({ + title:title, + content: '此菜单需要在多租户模式下使用,否则数据会出现混乱', + okText: '确认', + okType: 'danger', + // @ts-ignore + cancelButtonProps: { style: { display: 'none' } }, + }) + } +} + +/** + * 判断日期和当前时间是否为同一天 + * @param dateStr + */ +export function sameDay(dateStr) { + if (!dateStr) { + return false; + } + // 获取当前日期 + let currentDate = new Date(); + let currentDay = currentDate.getDate(); + let currentMonth = currentDate.getMonth(); + let currentYear = currentDate.getFullYear(); + + //创建另一个日期进行比较 + let otherDate = new Date(dateStr); + let otherDay = otherDate.getDate(); + let otherMonth = otherDate.getMonth(); + let otherYear = otherDate.getFullYear(); + + //比较日期 + if (currentDay === otherDay && currentMonth === otherMonth && currentYear === otherYear) { + return true; + } else { + return false; + } +} + + +/** + * 翻译菜单名称 + * 2024-02-28 + * liaozhiyang + * @param data + */ +export function translateTitle(data) { + if (data?.length) { + const { t } = useI18n(); + data.forEach((item) => { + if (item.slotTitle) { + if (item.slotTitle.includes("t('") && t) { + item.slotTitle = new Function('t', `return ${item.slotTitle}`)(t); + } + } + if (item.children?.length) { + translateTitle(item.children); + } + }); + } + return data; +} + +/** + * + * 深度冻结对象 + * @param obj Object or Array + */ +export function freezeDeep(obj: Recordable | Recordable[]) { + if (obj != null) { + if (Array.isArray(obj)) { + obj.forEach(item => freezeDeep(item)) + } else if (typeof obj === 'object') { + Object.values(obj).forEach(value => { + freezeDeep(value) + }) + } + Object.freeze(obj) + } + return obj +} diff --git a/src/utils/common/renderUtils.ts b/src/utils/common/renderUtils.ts new file mode 100644 index 0000000..87889a8 --- /dev/null +++ b/src/utils/common/renderUtils.ts @@ -0,0 +1,178 @@ +import { h } from 'vue'; +import { Avatar, Tag, Tooltip, Image } from 'ant-design-vue'; +import { getFileAccessHttpUrl } from '/@/utils/common/compUtils'; +import { Tinymce } from '/@/components/Tinymce'; +import Icon from '/@/components/Icon'; +import { getDictItemsByCode } from '/@/utils/dict/index'; +import { filterMultiDictText } from '/@/utils/dict/JDictSelectUtil.js'; +import { isEmpty } from '/@/utils/is'; +import { useMessage } from '/@/hooks/web/useMessage'; +const { createMessage } = useMessage(); + +const render = { + /** + * 渲染列表头像 + */ + renderAvatar: ({ record }) => { + if (record.avatar) { + let avatarList = record.avatar.split(','); + return h( + 'span', + avatarList.map((item) => { + return h(Avatar, { + src: getFileAccessHttpUrl(item), + shape: 'square', + size: 'default', + style: { marginRight: '5px' }, + }); + }) + ); + } else { + return h( + Avatar, + { shape: 'square', size: 'default' }, + { + icon: () => h(Icon, { icon: 'ant-design:file-image-outlined', size: 30 }), + } + ); + } + }, + /** + * 根据字典编码 渲染 + * @param v 值 + * @param code 字典编码 + * @param renderTag 是否使用tag渲染 + */ + renderDict: (v, code, renderTag = false) => { + let text = ''; + let array = getDictItemsByCode(code) || []; + let obj = array.filter((item) => { + return item.value == v; + }); + if (obj.length > 0) { + text = obj[0].text; + } + //【jeecgboot-vue3/issues/903】render.renderDict使用tag渲染报警告问题 #903 + return isEmpty(text) || !renderTag ? h('span', text) : h(Tag, () => text); + }, + /** + * 渲染图片 + * @param text + */ + renderImage: ({ text }) => { + if (!text) { + return h(Image, { + width: 30, + height: 30, + src: '', + fallback: + 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMIAAADDCAYAAADQvc6UAAABRWlDQ1BJQ0MgUHJvZmlsZQAAKJFjYGASSSwoyGFhYGDIzSspCnJ3UoiIjFJgf8LAwSDCIMogwMCcmFxc4BgQ4ANUwgCjUcG3awyMIPqyLsis7PPOq3QdDFcvjV3jOD1boQVTPQrgSkktTgbSf4A4LbmgqISBgTEFyFYuLykAsTuAbJEioKOA7DkgdjqEvQHEToKwj4DVhAQ5A9k3gGyB5IxEoBmML4BsnSQk8XQkNtReEOBxcfXxUQg1Mjc0dyHgXNJBSWpFCYh2zi+oLMpMzyhRcASGUqqCZ16yno6CkYGRAQMDKMwhqj/fAIcloxgHQqxAjIHBEugw5sUIsSQpBobtQPdLciLEVJYzMPBHMDBsayhILEqEO4DxG0txmrERhM29nYGBddr//5/DGRjYNRkY/l7////39v///y4Dmn+LgeHANwDrkl1AuO+pmgAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAwqADAAQAAAABAAAAwwAAAAD9b/HnAAAHlklEQVR4Ae3dP3PTWBSGcbGzM6GCKqlIBRV0dHRJFarQ0eUT8LH4BnRU0NHR0UEFVdIlFRV7TzRksomPY8uykTk/zewQfKw/9znv4yvJynLv4uLiV2dBoDiBf4qP3/ARuCRABEFAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghgg0Aj8i0JO4OzsrPv69Wv+hi2qPHr0qNvf39+iI97soRIh4f3z58/u7du3SXX7Xt7Z2enevHmzfQe+oSN2apSAPj09TSrb+XKI/f379+08+A0cNRE2ANkupk+ACNPvkSPcAAEibACyXUyfABGm3yNHuAECRNgAZLuYPgEirKlHu7u7XdyytGwHAd8jjNyng4OD7vnz51dbPT8/7z58+NB9+/bt6jU/TI+AGWHEnrx48eJ/EsSmHzx40L18+fLyzxF3ZVMjEyDCiEDjMYZZS5wiPXnyZFbJaxMhQIQRGzHvWR7XCyOCXsOmiDAi1HmPMMQjDpbpEiDCiL358eNHurW/5SnWdIBbXiDCiA38/Pnzrce2YyZ4//59F3ePLNMl4PbpiL2J0L979+7yDtHDhw8vtzzvdGnEXdvUigSIsCLAWavHp/+qM0BcXMd/q25n1vF57TYBp0a3mUzilePj4+7k5KSLb6gt6ydAhPUzXnoPR0dHl79WGTNCfBnn1uvSCJdegQhLI1vvCk+fPu2ePXt2tZOYEV6/fn31dz+shwAR1sP1cqvLntbEN9MxA9xcYjsxS1jWR4AIa2Ibzx0tc44fYX/16lV6NDFLXH+YL32jwiACRBiEbf5KcXoTIsQSpzXx4N28Ja4BQoK7rgXiydbHjx/P25TaQAJEGAguWy0+2Q8PD6/Ki4R8EVl+bzBOnZY95fq9rj9zAkTI2SxdidBHqG9+skdw43borCXO/ZcJdraPWdv22uIEiLA4q7nvvCug8WTqzQveOH26fodo7g6uFe/a17W3+nFBAkRYENRdb1vkkz1CH9cPsVy/jrhr27PqMYvENYNlHAIesRiBYwRy0V+8iXP8+/fvX11Mr7L7ECueb/r48eMqm7FuI2BGWDEG8cm+7G3NEOfmdcTQw4h9/55lhm7DekRYKQPZF2ArbXTAyu4kDYB2YxUzwg0gi/41ztHnfQG26HbGel/crVrm7tNY+/1btkOEAZ2M05r4FB7r9GbAIdxaZYrHdOsgJ/wCEQY0J74TmOKnbxxT9n3FgGGWWsVdowHtjt9Nnvf7yQM2aZU/TIAIAxrw6dOnAWtZZcoEnBpNuTuObWMEiLAx1HY0ZQJEmHJ3HNvGCBBhY6jtaMoEiJB0Z29vL6ls58vxPcO8/zfrdo5qvKO+d3Fx8Wu8zf1dW4p/cPzLly/dtv9Ts/EbcvGAHhHyfBIhZ6NSiIBTo0LNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiEC/wGgKKC4YMA4TAAAAABJRU5ErkJggg==', + }); + } + let avatarList = text.split(','); + return h( + 'span', + avatarList.map((item) => { + return h(Image, { + src: getFileAccessHttpUrl(item), + width: 30, + height: 30, + style: { marginRight: '5px' }, + previewMask: () => { + return h(Icon, { icon: 'ant-design:eye-outlined', size: 20 }); + }, + }); + }) + ); + //update-end-author:taoyan date:2022-5-24 for: VUEN-1084 【vue3】online表单测试发现的新问题 41、生成的代码,树默认图大小未改 + }, + /** + * 渲染 Tooltip + * @param text + * @param len + */ + renderTip: (text, len = 20) => { + if (text) { + let showText = text + ''; + if (showText.length > len) { + showText = showText.substr(0, len) + '...'; + } + return h(Tooltip, { title: text }, () => showText); + } + return text; + }, + /** + * 渲染a标签 + * @param text + */ + renderHref: ({ text }) => { + if (!text) { + return ''; + } + const len = 20; + if (text.length > len) { + text = text.substr(0, len); + } + return h('a', { href: text, target: '_blank' }, text); + }, + /** + * 根据字典渲染 + * @param v + * @param array + */ + renderDictNative: (v, array, renderTag = false) => { + let text = ''; + let color = ''; + let obj = array.filter((item) => { + return item.value == v; + }); + if (obj.length > 0) { + text = obj[0].label; + color = obj[0].color; + } + return isEmpty(text) || !renderTag ? h('span', text) : h(Tag, { color }, () => text); + }, + /** + * 渲染富文本 + */ + renderTinymce: ({ model, field }) => { + return h(Tinymce, { + showImageUpload: false, + height: 300, + value: model[field], + onChange: (value: string) => { + model[field] = value; + }, + }); + }, + + renderSwitch: (text, arr) => { + return text ? filterMultiDictText(arr, text) : ''; + }, + renderCategoryTree: (text, code) => { + let array = getDictItemsByCode(code); + return filterMultiDictText(array, text); + }, + renderTag(text, color) { + return isEmpty(text) ? h('span', text) : h(Tag, { color }, () => text); + }, +}; + +/** + * 文件下载 + */ +function downloadFile(url) { + if (!url) { + createMessage.warning('未知的文件'); + return; + } + if (url.indexOf(',') > 0) { + url = url.substring(0, url.indexOf(',')); + } + url = getFileAccessHttpUrl(url.split(',')[0]); + if (url) { + window.open(url); + } +} + +export { render, downloadFile }; diff --git a/src/utils/common/vxeUtils.ts b/src/utils/common/vxeUtils.ts new file mode 100644 index 0000000..247f9a8 --- /dev/null +++ b/src/utils/common/vxeUtils.ts @@ -0,0 +1,106 @@ +import { getValueType } from '/@/utils'; + +export const VALIDATE_FAILED = Symbol(); +/** + * 一次性验证主表单和所有的次表单(新版本) + * @param form 主表单 form 对象 + * @param cases 接收一个数组,每项都是一个JEditableTable实例 + * @returns {Promise} + */ +export async function validateFormModelAndTables(validate, formData, cases, props, autoJumpTab?) { + if (!(validate && typeof validate === 'function')) { + throw `validate 参数需要的是一个方法,而传入的却是${typeof validate}`; + } + let dataMap = {}; + let values = await new Promise((resolve, reject) => { + // 验证主表表单 + validate() + .then(() => { + //update-begin---author:wangshuai ---date:20220507 for:[VUEN-912]一对多用户组件(所有风格,单表和树没问题)保存报错------------ + for (let data in formData) { + //如果该数据是数组 + if (formData[data] instanceof Array) { + let valueType = getValueType(props, data); + //如果是字符串类型的需要变成以逗号分割的字符串 + if (valueType === 'string') { + formData[data] = formData[data].join(','); + } + } + } + //update-end---author:wangshuai ---date:20220507 for:[VUEN-912]一对多用户组件(所有风格,单表和树没问题)保存报错-------------- + resolve(formData); + }) + //update-begin---author:wangshuai---date:2024-06-17---for:【TV360X-1064】非原生提交表单滚动校验没通过的项--- + .catch(({ errorFields }) => { + reject({ error: VALIDATE_FAILED, index: 0, errorFields: errorFields }); + //update-end---author:wangshuai---date:2024-06-17---for:【TV360X-1064】非原生提交表单滚动校验没通过的项--- + }); + }); + Object.assign(dataMap, { formValue: values }); + // 验证所有子表的表单 + let subData = await validateTables(cases, autoJumpTab); + // 合并最终数据 + dataMap = Object.assign(dataMap, { tablesValue: subData }); + return dataMap; +} +/** + * 验证并获取一个或多个表格的所有值 + * @param cases 接收一个数组,每项都是一个JEditableTable实例 + * @param autoJumpTab 是否自动跳转到报错的tab + */ +export function validateTables(cases, autoJumpTab = true) { + if (!(cases instanceof Array)) { + throw `'validateTables'函数的'cases'参数需要的是一个数组,而传入的却是${typeof cases}`; + } + return new Promise((resolve, reject) => { + let tablesData: any = []; + let index = 0; + if (!cases || cases.length === 0) { + resolve(tablesData); + } + (function next() { + let vm = cases[index]; + vm.value.validateTable().then((errMap) => { + // 校验通过 + if (!errMap) { + tablesData[index] = { tableData: vm.value.getTableData() }; + // 判断校验是否全部完成,完成返回成功,否则继续进行下一步校验 + if (++index === cases.length) { + resolve(tablesData); + } else next(); + } else { + // 尝试获取tabKey,如果在ATab组件内即可获取 + let paneKey; + let tabPane = getVmParentByName(vm.value, 'ATabPane'); + if (tabPane) { + paneKey = tabPane.$.vnode.key; + // 自动跳转到该表格 + if (autoJumpTab) { + let tabs = getVmParentByName(tabPane, 'Tabs'); + tabs && tabs.setActiveKey && tabs.setActiveKey(paneKey); + } + } + // 出现未验证通过的表单,不再进行下一步校验,直接返回失败 + //update-begin-author:liusq date:2024-06-12 for: TV360X-478 一对多tab,校验未通过时,tab没有跳转 + reject({ error: VALIDATE_FAILED, index, paneKey, errMap, subIndex: index }); + //update-end-author:liusq date:2024-06-12 for: TV360X-478 一对多tab,校验未通过时,tab没有跳转 + } + }); + })(); + }); +} + +export function getVmParentByName(vm, name) { + let parent = vm.$parent; + if (parent && parent.$options) { + if (parent.$options.name === name) { + return parent; + } else { + let res = getVmParentByName(parent, name); + if (res) { + return res; + } + } + } + return null; +} diff --git a/src/utils/dateUtil.ts b/src/utils/dateUtil.ts new file mode 100644 index 0000000..687eb25 --- /dev/null +++ b/src/utils/dateUtil.ts @@ -0,0 +1,17 @@ +/** + * Independent time operation tool to facilitate subsequent switch to dayjs + */ +import dayjs from 'dayjs'; + +const DATE_TIME_FORMAT = 'YYYY-MM-DD HH:mm:ss'; +const DATE_FORMAT = 'YYYY-MM-DD'; + +export function formatToDateTime(date: dayjs.Dayjs | undefined = undefined, format = DATE_TIME_FORMAT): string { + return dayjs(date).format(format); +} + +export function formatToDate(date: dayjs.Dayjs | undefined = undefined, format = DATE_FORMAT): string { + return dayjs(date).format(format); +} + +export const dateUtil = dayjs; diff --git a/src/utils/desform/customExpression.ts b/src/utils/desform/customExpression.ts new file mode 100644 index 0000000..5359ba6 --- /dev/null +++ b/src/utils/desform/customExpression.ts @@ -0,0 +1,30 @@ +/* + * + * 这里填写用户自定义的表达式 + * 可用在Online表单的默认值表达式中使用 + * 需要外部使用的变量或方法一定要 export,否则无法识别 + * 示例: + * export const name = '张三'; // const 是常量 + * export let age = 17; // 看情况 export const 还是 let ,两者都可正常使用 + * export function content(arg) { // export 方法,可传参数,使用时要加括号,值一定要return回去,可以返回Promise + * return 'content' + arg; + * } + * export const address = (arg) => content(arg) + ' | 北京市'; // export 箭头函数也可以 + * + */ + +/** 字段默认值官方示例:获取地址 */ +export function demoFieldDefVal_getAddress(arg) { + if (!arg) { + arg = '朝阳区'; + } + return `北京市 ${arg}`; +} + +/** 自定义JS函数示例 */ +export function sayHi(name) { + if (!name) { + name = '张三'; + } + return `您好,我叫: ${name}`; +} diff --git a/src/utils/dict/DictColors.js b/src/utils/dict/DictColors.js new file mode 100644 index 0000000..ae91da4 --- /dev/null +++ b/src/utils/dict/DictColors.js @@ -0,0 +1,65 @@ +const whiteColor = '#ffffff' +const blackColor = '#666666' + +export const Colors = [ + // 背景颜色,文字颜色 + ['#2196F3', whiteColor], + ['#08C9C9', whiteColor], + ['#00C345', whiteColor], + ['#FAD714', whiteColor], + ['#FF9300', whiteColor], + ['#F52222', whiteColor], + ['#EB2F96', whiteColor], + ['#7500EA', whiteColor], + ['#2D46C4', whiteColor], + ['#484848', whiteColor], + // -------------------- + ['#C9E6FC', blackColor], + ['#C3F2F2', blackColor], + ['#C2F1D2', blackColor], + ['#FEF6C6', blackColor], + ['#FFE5C2', blackColor], + ['#FDCACA', blackColor], + ['#FACDE6', blackColor], + ['#DEC2FA', blackColor], + ['#CCD2F1', blackColor], + ['#D3D3D3', blackColor], +] + +export const NONE_COLOR = ['#e9e9e9', blackColor] + +/** + * 返回一个颜色迭代器,每次调用返回一个颜色,当颜色用完后,再从头开始 + * @param {number} initIndex 初始颜色索引 + * @returns {{getIndex: function, next: function}} + */ +export function getColorIterator(initIndex = 0) { + let index = initIndex; + if (index < 0 || index >= Colors.length) { + index = 0; + } + return { + getIndex: () => index, + next() { + const color = Colors[index]; + index = (index + 1) % Colors.length; + return color; + }, + } +} + +/** + * 根据颜色获取当前坐标和颜色 + */ +export function getItemColor(color) { + if(!color){ + return NONE_COLOR[1]; + } + let colorIndex = Colors.findIndex((value)=>{ + return value[0] === color; + }) + if(colorIndex === -1){ + return NONE_COLOR[1]; + } + return Colors[colorIndex][1]; +} diff --git a/src/utils/dict/JDictSelectUtil.js b/src/utils/dict/JDictSelectUtil.js new file mode 100644 index 0000000..475c4d8 --- /dev/null +++ b/src/utils/dict/JDictSelectUtil.js @@ -0,0 +1,162 @@ +/** + * 字典 util + * author: scott + * date: 20190109 + */ + +import { ajaxGetDictItems, getDictItemsByCode } from './index'; + +/** + * 获取字典数组 + * 【目前仅表单设计器页面使用该方法】 + * @param dictCode 字典Code + * @param isTransformResponse 是否转换返回结果 + * @return List + */ +export async function initDictOptions(dictCode, isTransformResponse = true) { + if (!dictCode) { + return '字典Code不能为空!'; + } + //优先从缓存中读取字典配置 + if (getDictItemsByCode(dictCode)) { + let res = {}; + res.result = getDictItemsByCode(dictCode); + res.success = true; + if (isTransformResponse) { + return res.result; + } else { + return res; + } + } + //获取字典数组 + return await ajaxGetDictItems(dictCode, {}, { isTransformResponse }); +} + +/** + * 字典值替换文本通用方法 + * @param dictOptions 字典数组 + * @param text 字典值 + * @return String + */ +export function filterDictText(dictOptions, text) { + // --update-begin----author:sunjianlei---date:20200323------for: 字典翻译 text 允许逗号分隔 --- + if (text != null && Array.isArray(dictOptions)) { + let result = []; + // 允许多个逗号分隔,允许传数组对象 + let splitText; + if (Array.isArray(text)) { + splitText = text; + } else { + splitText = text.toString().trim().split(','); + } + for (let txt of splitText) { + let dictText = txt; + for (let dictItem of dictOptions) { + // update-begin--author:liaozhiyang---date:20240524---for:【TV360X-469】兼容数据null值防止报错 + if (dictItem == null) continue; + if (dictItem.value == null) continue; + // update-end--author:liaozhiyang---date:20240524---for:【TV360X-469】兼容数据null值防止报错 + if (txt.toString() === dictItem.value.toString()) { + dictText = dictItem.text || dictItem.title || dictItem.label; + break; + } + } + result.push(dictText); + } + return result.join(','); + } + return text; + // --update-end----author:sunjianlei---date:20200323------for: 字典翻译 text 允许逗号分隔 --- +} + +/** + * 字典值替换文本通用方法(多选) + * @param dictOptions 字典数组 + * @param text 字典值 + * @return String + */ +export function filterMultiDictText(dictOptions, text) { + //js “!text” 认为0为空,所以做提前处理 + if (text === 0 || text === '0') { + if (dictOptions) { + for (let dictItem of dictOptions) { + if (text == dictItem.value) { + return dictItem.text; + } + } + } + } + + if (!text || text == 'undefined' || text == 'null' || !dictOptions || dictOptions.length == 0) { + return ''; + } + let re = ''; + text = text.toString(); + let arr = text.split(','); + dictOptions.forEach(function (option) { + if (option) { + for (let i = 0; i < arr.length; i++) { + if (arr[i] === option.value) { + re += option.text + ','; + break; + } + } + } + }); + if (re == '') { + return text; + } + return re.substring(0, re.length - 1); +} + +/** + * 翻译字段值对应的文本 + * @param children + * @returns string + */ +export function filterDictTextByCache(dictCode, key) { + if (key == null || key.length == 0) { + return; + } + if (!dictCode) { + return '字典Code不能为空!'; + } + //优先从缓存中读取字典配置 + if (getDictItemsByCode(dictCode)) { + let item = getDictItemsByCode(dictCode).filter((t) => t['value'] == key); + if (item && item.length > 0) { + return item[0]['text']; + } + } +} + +/** 通过code获取字典数组 */ +export async function getDictItems(dictCode, params) { + // update-begin--author:liaozhiyang---date:20230809---for:【issues/668】JDictSelectUtil数据字典工具类中的getDictItems方法出错 + //优先从缓存中读取字典配置 + if (getDictItemsByCode(dictCode)) { + let desformDictItems = getDictItemsByCode(dictCode).map((item) => ({ + ...item, + label: item.text, + })); + return Promise.resolve(desformDictItems); + } + + //缓存中没有,就请求后台 + return await ajaxGetDictItems(dictCode, params) + .then((result) => { + if (result.length) { + let res = result.map((item) => ({ ...item, label: item.text })); + console.log('------- 从DB中获取到了字典-------dictCode : ', dictCode, res); + return Promise.resolve(res); + } else { + console.error('getDictItems error: : ', res); + return Promise.resolve([]); + } + }) + .catch((res) => { + console.error('getDictItems error: ', res); + return Promise.resolve([]); + }); + // update-end--author:liaozhiyang---date:20230809---for:【issues/668】JDictSelectUtil数据字典工具类中的getDictItems方法出错 +} diff --git a/src/utils/dict/index.ts b/src/utils/dict/index.ts new file mode 100644 index 0000000..a48d0de --- /dev/null +++ b/src/utils/dict/index.ts @@ -0,0 +1,70 @@ +import { defHttp } from '/@/utils/http/axios'; +import { useUserStore } from '/@/store/modules/user'; +import { getAuthCache } from '/@/utils/auth'; +import { DB_DICT_DATA_KEY } from '/@/enums/cacheEnum'; + +/** + * 从缓存中获取字典配置 + * @param code + */ +export const getDictItemsByCode = (code) => { + // update-begin--author:liaozhiyang---date:20230908---for:【QQYUN-6417】生产环境字典慢的问题 + const userStore = useUserStore(); + const dictItems = userStore.getAllDictItems; + if (null != dictItems && typeof dictItems === 'object' && dictItems[code]) { + return dictItems[code]; + } + //update-begin-author:liusq---date:2023-10-13--for: 【issues/777】列表 分类字典不显示 + //兼容以前的旧写法 + if (getAuthCache(DB_DICT_DATA_KEY) && getAuthCache(DB_DICT_DATA_KEY)[code]) { + return getAuthCache(DB_DICT_DATA_KEY)[code]; + } + //update-end-author:liusq---date:2023-10-13--for:【issues/777】列表 分类字典不显示 + + // update-end--author:liaozhiyang---date:20230908---for:【QQYUN-6417】生产环境字典慢的问题 + +}; +/** + * 从缓存中获取Pop字典配置 + * @param text + * @param code + */ +export const getPopDictByCode = (text, codeStr) => { + const [code, dictCode, dictText] = codeStr.split(','); + if (!code || !dictCode || !dictText) { + return []; + } + return defHttp.get( + { url: `/online/api/cgreportGetDataPackage`, params: { code, dictText, dictCode, dataList: text } }, + { isTransformResponse: false } + ); +}; +/** + * 获取字典数组 + * @param dictCode 字典Code + * @return List + */ +export const initDictOptions = (code) => { + //1.优先从缓存中读取字典配置 + if (getDictItemsByCode(code)) { + return new Promise((resolve, reject) => { + resolve(getDictItemsByCode(code)); + }); + } + //2.获取字典数组 + //update-begin-author:taoyan date:2022-6-21 for: 字典数据请求前将参数编码处理,但是不能直接编码,因为可能之前已经编码过了 + if (code.indexOf(',') > 0 && code.indexOf(' ') > 0) { + // 编码后类似sys_user%20where%20username%20like%20xxx' 是不包含空格的,这里判断如果有空格和逗号说明需要编码处理 + code = encodeURI(code); + } + //update-end-author:taoyan date:2022-6-21 for: 字典数据请求前将参数编码处理,但是不能直接编码,因为可能之前已经编码过了 + return defHttp.get({ url: `/sys/dict/getDictItems/${code}` }); +}; +/** + * 获取字典数组 + * @param code 字典Code + * @param params 查询参数 + * @param options 查询配置 + * @return List + */ +export const ajaxGetDictItems = (code, params, options?) => defHttp.get({ url: `/sys/dict/getDictItems/${code}`, params }, options); diff --git a/src/utils/domUtils.ts b/src/utils/domUtils.ts new file mode 100644 index 0000000..42a33cb --- /dev/null +++ b/src/utils/domUtils.ts @@ -0,0 +1,192 @@ +import type { FunctionArgs } from '@vueuse/core'; +import { upperFirst } from 'lodash-es'; + +export interface ViewportOffsetResult { + left: number; + top: number; + right: number; + bottom: number; + rightIncludeBody: number; + bottomIncludeBody: number; +} + +export function getBoundingClientRect(element: Element): DOMRect | number { + if (!element || !element.getBoundingClientRect) { + return 0; + } + return element.getBoundingClientRect(); +} + +function trim(string: string) { + return (string || '').replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g, ''); +} + +/* istanbul ignore next */ +export function hasClass(el: Element, cls: string) { + if (!el || !cls) return false; + if (cls.indexOf(' ') !== -1) throw new Error('className should not contain space.'); + if (el.classList) { + return el.classList.contains(cls); + } else { + return (' ' + el.className + ' ').indexOf(' ' + cls + ' ') > -1; + } +} + +/* istanbul ignore next */ +export function addClass(el: Element, cls: string) { + if (!el) return; + let curClass = el.className; + const classes = (cls || '').split(' '); + + for (let i = 0, j = classes.length; i < j; i++) { + const clsName = classes[i]; + if (!clsName) continue; + + if (el.classList) { + el.classList.add(clsName); + } else if (!hasClass(el, clsName)) { + curClass += ' ' + clsName; + } + } + if (!el.classList) { + el.className = curClass; + } +} + +/* istanbul ignore next */ +export function removeClass(el: Element, cls: string) { + if (!el || !cls) return; + const classes = cls.split(' '); + let curClass = ' ' + el.className + ' '; + + for (let i = 0, j = classes.length; i < j; i++) { + const clsName = classes[i]; + if (!clsName) continue; + + if (el.classList) { + el.classList.remove(clsName); + } else if (hasClass(el, clsName)) { + curClass = curClass.replace(' ' + clsName + ' ', ' '); + } + } + if (!el.classList) { + el.className = trim(curClass); + } +} +/** + * Get the left and top offset of the current element + * left: the distance between the leftmost element and the left side of the document + * top: the distance from the top of the element to the top of the document + * right: the distance from the far right of the element to the right of the document + * bottom: the distance from the bottom of the element to the bottom of the document + * rightIncludeBody: the distance between the leftmost element and the right side of the document + * bottomIncludeBody: the distance from the bottom of the element to the bottom of the document + * + * @description: + */ +export function getViewportOffset(element: Element): ViewportOffsetResult { + const doc = document.documentElement; + + const docScrollLeft = doc.scrollLeft; + const docScrollTop = doc.scrollTop; + const docClientLeft = doc.clientLeft; + const docClientTop = doc.clientTop; + + const pageXOffset = window.pageXOffset; + const pageYOffset = window.pageYOffset; + + const box = getBoundingClientRect(element); + + const { left: retLeft, top: rectTop, width: rectWidth, height: rectHeight } = box as DOMRect; + + const scrollLeft = (pageXOffset || docScrollLeft) - (docClientLeft || 0); + const scrollTop = (pageYOffset || docScrollTop) - (docClientTop || 0); + const offsetLeft = retLeft + pageXOffset; + const offsetTop = rectTop + pageYOffset; + + const left = offsetLeft - scrollLeft; + const top = offsetTop - scrollTop; + + const clientWidth = window.document.documentElement.clientWidth; + const clientHeight = window.document.documentElement.clientHeight; + return { + left: left, + top: top, + right: clientWidth - rectWidth - left, + bottom: clientHeight - rectHeight - top, + rightIncludeBody: clientWidth - left, + bottomIncludeBody: clientHeight - top, + }; +} + +export function hackCss(attr: string, value: string) { + const prefix: string[] = ['webkit', 'Moz', 'ms', 'OT']; + + const styleObj: any = {}; + prefix.forEach((item) => { + styleObj[`${item}${upperFirst(attr)}`] = value; + }); + return { + ...styleObj, + [attr]: value, + }; +} + +/* istanbul ignore next */ +export function on(element: Element | HTMLElement | Document | Window, event: string, handler: EventListenerOrEventListenerObject): void { + if (element && event && handler) { + element.addEventListener(event, handler, false); + } +} + +/* istanbul ignore next */ +export function off(element: Element | HTMLElement | Document | Window, event: string, handler: Fn): void { + if (element && event && handler) { + element.removeEventListener(event, handler, false); + } +} + +/* istanbul ignore next */ +export function once(el: HTMLElement, event: string, fn: EventListener): void { + const listener = function (this: any, ...args: unknown[]) { + if (fn) { + fn.apply(this, args); + } + off(el, event, listener); + }; + on(el, event, listener); +} + +export function useRafThrottle(fn: T): T { + let locked = false; + // @ts-ignore + return function (...args: any[]) { + if (locked) return; + locked = true; + window.requestAnimationFrame(() => { + // @ts-ignore + fn.apply(this, args); + locked = false; + }); + }; +} + +/** + * 查找父级元素,直到找到符合条件的元素 + * @param element 当前元素 + * @param checkFn 判断条件 + */ +export function queryParentElement(element: HTMLElement, checkFn: (node: HTMLElement) => boolean): HTMLElement | null { + let ele: HTMLElement | null = element; + while (ele) { + try { + if (checkFn(ele)) { + return ele; + } + ele = ele.parentElement; + } catch (e) { + return null; + } + } + return null; +} diff --git a/src/utils/encryption/signMd5Utils.js b/src/utils/encryption/signMd5Utils.js new file mode 100644 index 0000000..9bd4fc8 --- /dev/null +++ b/src/utils/encryption/signMd5Utils.js @@ -0,0 +1,149 @@ +import md5 from 'md5'; +//签名密钥串(前后端要一致,正式发布请自行修改) +const signatureSecret = 'dd05f1c54d63749eda95f9fa6d49v442a'; + +export default class signMd5Utils { + /** + * json参数升序 + * @param jsonObj 发送参数 + */ + + static sortAsc(jsonObj) { + let arr = new Array(); + let num = 0; + for (let i in jsonObj) { + arr[num] = i; + num++; + } + let sortArr = arr.sort(); + let sortObj = {}; + for (let i in sortArr) { + sortObj[sortArr[i]] = jsonObj[sortArr[i]]; + } + return sortObj; + } + + /** + * @param url 请求的url,应该包含请求参数(url的?后面的参数) + * @param requestParams 请求参数(@RequestParam(get)的JSON参数) + * @param requestBodyParams 请求参数(@RequestBody(post)参数) + * @returns {string} 获取签名 + */ + static getSign(url, requestParams, requestBodyParams) { + let urlParams = this.parseQueryString(url); + let jsonObj = this.mergeObject(urlParams, requestParams); + //update-begin---author:wangshuai---date:2024-04-16---for:【QQYUN-9005】发送短信加签--- + if(requestBodyParams){ + jsonObj = this.mergeObject(jsonObj, requestBodyParams) + } + //update-end---author:wangshuai---date:2024-04-16---for:【QQYUN-9005】发送短信加签--- + let requestBody = this.sortAsc(jsonObj); + delete requestBody._t; + console.log('sign requestBody:', requestBody); + return md5(JSON.stringify(requestBody) + signatureSecret).toUpperCase(); + } + + /** + * @param url 请求的url + * @returns {{}} 将url中请求参数组装成json对象(url的?后面的参数) + */ + static parseQueryString(url) { + let urlReg = /^[^\?]+\?([\w\W]+)$/, + paramReg = /([^&=]+)=([\w\W]*?)(&|$|#)/g, + urlArray = urlReg.exec(url), + result = {}; + + // 获取URL上最后带逗号的参数变量 sys/dict/getDictItems/sys_user,realname,username + //【这边条件没有encode】带条件参数例子:/sys/dict/getDictItems/sys_user,realname,id,username!='admin'%20order%20by%20create_time + let lastpathVariable = url.substring(url.lastIndexOf('/') + 1); + if (lastpathVariable.includes(',')) { + if (lastpathVariable.includes('?')) { + lastpathVariable = lastpathVariable.substring(0, lastpathVariable.indexOf('?')); + } + //update-begin---author:wangshuai ---date:20221103 for:[issues/183]下拉搜索,使用动态字典,在线页面不报错,生成的代码报错 ------------ + //解决Sign 签名校验失败 #2728 + //decodeURI对特殊字符没有没有编码和解码的能力,需要使用decodeURIComponent + result['x-path-variable'] = decodeURIComponent(lastpathVariable); + //update-end---author:wangshuai ---date:20221103 for:[issues/183]下拉搜索,使用动态字典,在线页面不报错,生成的代码报错 ------------ + } + if (urlArray && urlArray[1]) { + let paramString = urlArray[1], + paramResult; + while ((paramResult = paramReg.exec(paramString)) != null) { + //数字值转为string类型,前后端加密规则保持一致 + if (this.myIsNaN(paramResult[2])) { + paramResult[2] = paramResult[2].toString(); + } + result[paramResult[1]] = paramResult[2]; + } + } + return result; + } + + /** + * @returns {*} 将两个对象合并成一个 + */ + static mergeObject(objectOne, objectTwo) { + if (objectTwo && Object.keys(objectTwo).length > 0) { + for (let key in objectTwo) { + if (objectTwo.hasOwnProperty(key) === true) { + //数字值转为string类型,前后端加密规则保持一致 + if (this.myIsNaN(objectTwo[key])) { + objectTwo[key] = objectTwo[key].toString(); + } + //布尔类型转成string类型,前后端加密规则保持一致 + if (typeof objectTwo[key] === 'boolean') { + objectTwo[key] = objectTwo[key].toString(); + } + objectOne[key] = objectTwo[key]; + } + } + } + return objectOne; + } + + static urlEncode(param, key, encode) { + if (param == null) return ''; + let paramStr = ''; + let t = typeof param; + if (t == 'string' || t == 'number' || t == 'boolean') { + paramStr += '&' + key + '=' + (encode == null || encode ? encodeURIComponent(param) : param); + } else { + for (let i in param) { + let k = key == null ? i : key + (param instanceof Array ? '[' + i + ']' : '.' + i); + paramStr += this.urlEncode(param[i], k, encode); + } + } + return paramStr; + } + + /** + * 接口签名用 生成header中的时间戳 + * @returns {number} + */ + static getTimestamp() { + return new Date().getTime(); + } + + // static getDateTimeToString() { + // const date_ = new Date() + // const year = date_.getFullYear() + // let month = date_.getMonth() + 1 + // let day = date_.getDate() + // if (month < 10) month = '0' + month + // if (day < 10) day = '0' + day + // let hours = date_.getHours() + // let mins = date_.getMinutes() + // let secs = date_.getSeconds() + // const msecs = date_.getMilliseconds() + // if (hours < 10) hours = '0' + hours + // if (mins < 10) mins = '0' + mins + // if (secs < 10) secs = '0' + secs + // if (msecs < 10) secs = '0' + msecs + // return year + '' + month + '' + day + '' + hours + '' + mins + '' + secs + // } + // true:数值型的,false:非数值型 + static myIsNaN(value) { + return typeof value === 'number' && !isNaN(value); + } +} diff --git a/src/utils/env.ts b/src/utils/env.ts new file mode 100644 index 0000000..272c634 --- /dev/null +++ b/src/utils/env.ts @@ -0,0 +1,135 @@ +import type { GlobEnvConfig } from '/#/config'; + +import { warn } from '/@/utils/log'; +import pkg from '../../package.json'; +import { getConfigFileName } from '../../build/getConfigFileName'; +import { getGlobal } from "@/qiankun/micro"; + +export function getCommonStoragePrefix() { + const { VITE_GLOB_APP_SHORT_NAME } = getAppEnvConfig(); + return `${VITE_GLOB_APP_SHORT_NAME}__${getEnv()}`.toUpperCase(); +} + +// Generate cache key according to version +export function getStorageShortName() { + return `${getCommonStoragePrefix()}${`__${pkg.version}`}__`.toUpperCase(); +} + +export function getAppEnvConfig() { + const ENV_NAME = getConfigFileName(import.meta.env); + + const global = getGlobal(); + + const ENV = (import.meta.env.DEV + ? // Get the global configuration (the configuration will be extracted independently when packaging) + (import.meta.env as unknown as GlobEnvConfig) + : global[ENV_NAME as any]) as unknown as GlobEnvConfig; + + const { + VITE_GLOB_APP_TITLE, + VITE_GLOB_API_URL, + VITE_USE_MOCK, + VITE_GLOB_APP_SHORT_NAME, + VITE_GLOB_API_URL_PREFIX, + VITE_GLOB_APP_OPEN_SSO, + VITE_GLOB_APP_OPEN_QIANKUN, + VITE_GLOB_APP_CAS_BASE_URL, + VITE_GLOB_DOMAIN_URL, + VITE_GLOB_ONLINE_VIEW_URL, + // 全局隐藏哪些布局,多个用逗号隔开 + VITE_GLOB_HIDE_LAYOUT_TYPES, + // 当前运行在什么平台 + VITE_GLOB_RUN_PLATFORM, + + // 【JEECG作为乾坤子应用】 + VITE_GLOB_QIANKUN_MICRO_APP_NAME, + VITE_GLOB_QIANKUN_MICRO_APP_ENTRY, + + //在线文档编辑版本。可选属性:wps, onlyoffice + VITE_GLOB_ONLINE_DOCUMENT_VERSION, + } = ENV; + + // if (!/^[a-zA-Z\_]*$/.test(VITE_GLOB_APP_SHORT_NAME)) { + // warn( + // `VITE_GLOB_APP_SHORT_NAME 变量只能是字符/下划线,请在环境变量中修改并重新运行.` + // ); + // } + + return { + VITE_GLOB_APP_TITLE, + VITE_GLOB_API_URL, + VITE_USE_MOCK, + VITE_GLOB_APP_SHORT_NAME, + VITE_GLOB_API_URL_PREFIX, + VITE_GLOB_APP_OPEN_SSO, + VITE_GLOB_APP_OPEN_QIANKUN, + VITE_GLOB_APP_CAS_BASE_URL, + VITE_GLOB_DOMAIN_URL, + VITE_GLOB_ONLINE_VIEW_URL, + VITE_GLOB_HIDE_LAYOUT_TYPES, + VITE_GLOB_RUN_PLATFORM, + + // 【JEECG作为乾坤子应用】 + VITE_GLOB_QIANKUN_MICRO_APP_NAME, + VITE_GLOB_QIANKUN_MICRO_APP_ENTRY, + + //在线文档编辑版本。可选属性:wps, onlyoffice + VITE_GLOB_ONLINE_DOCUMENT_VERSION + }; +} + +/** + * @description: Development mode + */ +export const devMode = 'development'; + +/** + * @description: Production mode + */ +export const prodMode = 'production'; + +/** + * @description: Get environment variables + * @returns: + * @example: + */ +export function getEnv(): string { + return import.meta.env.MODE; +} + +/** + * @description: Is it a development mode + * @returns: + * @example: + */ +export function isDevMode(): boolean { + return import.meta.env.DEV; +} + +/** + * @description: Is it a production mode + * @returns: + * @example: + */ +export function isProdMode(): boolean { + return import.meta.env.PROD; +} + +export function getHideLayoutTypes(): string[] { + const {VITE_GLOB_HIDE_LAYOUT_TYPES} = getAppEnvConfig(); + if (typeof VITE_GLOB_HIDE_LAYOUT_TYPES !== 'string') { + return []; + } + return VITE_GLOB_HIDE_LAYOUT_TYPES.split(','); +} + +/** + * 获取在线文档版本号 + */ +export function getOnlineDocumentVersion(): string { + const { VITE_GLOB_ONLINE_DOCUMENT_VERSION } = getAppEnvConfig(); + if (typeof VITE_GLOB_ONLINE_DOCUMENT_VERSION !== 'string') { + return 'wps'; + } + return VITE_GLOB_ONLINE_DOCUMENT_VERSION; +} diff --git a/src/utils/event/index.ts b/src/utils/event/index.ts new file mode 100644 index 0000000..3a60d7c --- /dev/null +++ b/src/utils/event/index.ts @@ -0,0 +1,42 @@ +import ResizeObserver from 'resize-observer-polyfill'; + +const isServer = typeof window === 'undefined'; + +/* istanbul ignore next */ +function resizeHandler(entries: any[]) { + for (const entry of entries) { + const listeners = entry.target.__resizeListeners__ || []; + if (listeners.length) { + listeners.forEach((fn: () => any) => { + fn(); + }); + } + } +} + +/* istanbul ignore next */ +export function addResizeListener(element: any, fn: () => any) { + if (isServer) return; + if (!element.__resizeListeners__) { + element.__resizeListeners__ = []; + element.__ro__ = new ResizeObserver(resizeHandler); + element.__ro__.observe(element); + } + element.__resizeListeners__.push(fn); +} + +/* istanbul ignore next */ +export function removeResizeListener(element: any, fn: () => any) { + if (!element || !element.__resizeListeners__) return; + element.__resizeListeners__.splice(element.__resizeListeners__.indexOf(fn), 1); + if (!element.__resizeListeners__.length) { + element.__ro__.disconnect(); + } +} + +export function triggerWindowResize() { + const event = document.createEvent('HTMLEvents'); + event.initEvent('resize', true, true); + (event as any).eventType = 'message'; + window.dispatchEvent(event); +} diff --git a/src/utils/factory/createAsyncComponent.tsx b/src/utils/factory/createAsyncComponent.tsx new file mode 100644 index 0000000..4f668ad --- /dev/null +++ b/src/utils/factory/createAsyncComponent.tsx @@ -0,0 +1,63 @@ +import { + defineAsyncComponent, + // FunctionalComponent, CSSProperties +} from 'vue'; +import { Spin } from 'ant-design-vue'; +import { noop } from '/@/utils/index'; + +// const Loading: FunctionalComponent<{ size: 'small' | 'default' | 'large' }> = (props) => { +// const style: CSSProperties = { +// position: 'absolute', +// display: 'flex', +// justifyContent: 'center', +// alignItems: 'center', +// }; +// return ( +//
+// +//
+// ); +// }; + +interface Options { + size?: 'default' | 'small' | 'large'; + delay?: number; + timeout?: number; + loading?: boolean; + retry?: boolean; +} + +export function createAsyncComponent(loader: Fn, options: Options = {}) { + const { size = 'small', delay = 100, timeout = 30000, loading = false, retry = true } = options; + return defineAsyncComponent({ + loader, + loadingComponent: loading ? : undefined, + // The error component will be displayed if a timeout is + // provided and exceeded. Default: Infinity. + // TODO + timeout, + // errorComponent + // Defining if component is suspensible. Default: true. + // suspensible: false, + delay, + /** + * + * @param {*} error Error message object + * @param {*} retry A function that indicating whether the async component should retry when the loader promise rejects + * @param {*} fail End of failure + * @param {*} attempts Maximum allowed retries number + */ + onError: !retry + ? noop + : (error, retry, fail, attempts) => { + if (error.message.match(/fetch/) && attempts <= 3) { + // retry on fetch errors, 3 max attempts + retry(); + } else { + // Note that retry/fail are like resolve/reject of a promise: + // one of them must be called for the error handling to continue. + fail(); + } + }, + }); +} diff --git a/src/utils/file/base64Conver.ts b/src/utils/file/base64Conver.ts new file mode 100644 index 0000000..d77618a --- /dev/null +++ b/src/utils/file/base64Conver.ts @@ -0,0 +1,41 @@ +/** + * @description: base64 to blob + */ +export function dataURLtoBlob(base64Buf: string): Blob { + const arr = base64Buf.split(','); + const typeItem = arr[0]; + const mime = typeItem.match(/:(.*?);/)![1]; + const bstr = 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 }); +} + +/** + * img url to base64 + * @param url + */ +export function urlToBase64(url: string, mineType?: string): Promise { + return new Promise((resolve, reject) => { + let canvas = document.createElement('CANVAS') as Nullable; + const ctx = canvas!.getContext('2d'); + + const img = new Image(); + img.crossOrigin = ''; + img.onload = function () { + if (!canvas || !ctx) { + return reject(); + } + canvas.height = img.height; + canvas.width = img.width; + ctx.drawImage(img, 0, 0); + const dataURL = canvas.toDataURL(mineType || 'image/png'); + canvas = null; + resolve(dataURL); + }; + img.src = url; + }); +} diff --git a/src/utils/file/download.ts b/src/utils/file/download.ts new file mode 100644 index 0000000..168e235 --- /dev/null +++ b/src/utils/file/download.ts @@ -0,0 +1,91 @@ +import { openWindow } from '..'; +import { dataURLtoBlob, urlToBase64 } from './base64Conver'; + +/** + * Download online pictures + * @param url + * @param filename + * @param mime + * @param bom + */ +export function downloadByOnlineUrl(url: string, filename: string, mime?: string, bom?: BlobPart) { + urlToBase64(url).then((base64) => { + downloadByBase64(base64, filename, mime, bom); + }); +} + +/** + * Download pictures based on base64 + * @param buf + * @param filename + * @param mime + * @param bom + */ +export function downloadByBase64(buf: string, filename: string, mime?: string, bom?: BlobPart) { + const base64Buf = dataURLtoBlob(buf); + downloadByData(base64Buf, filename, mime, bom); +} + +/** + * Download according to the background interface file stream + * @param {*} data + * @param {*} filename + * @param {*} mime + * @param {*} bom + */ +export function downloadByData(data: BlobPart, filename: string, mime?: string, bom?: BlobPart) { + const blobData = typeof bom !== 'undefined' ? [bom, data] : [data]; + const blob = new Blob(blobData, { type: mime || 'application/octet-stream' }); + if (typeof window.navigator.msSaveBlob !== 'undefined') { + window.navigator.msSaveBlob(blob, filename); + } else { + const blobURL = window.URL.createObjectURL(blob); + const tempLink = document.createElement('a'); + tempLink.style.display = 'none'; + tempLink.href = blobURL; + tempLink.setAttribute('download', filename); + if (typeof tempLink.download === 'undefined') { + tempLink.setAttribute('target', '_blank'); + } + document.body.appendChild(tempLink); + tempLink.click(); + document.body.removeChild(tempLink); + window.URL.revokeObjectURL(blobURL); + } +} + +/** + * Download file according to file address + * @param {*} sUrl + */ +export function downloadByUrl({ url, target = '_blank', fileName }: { url: string; target?: TargetContext; fileName?: string }): boolean { + const isChrome = window.navigator.userAgent.toLowerCase().indexOf('chrome') > -1; + const isSafari = window.navigator.userAgent.toLowerCase().indexOf('safari') > -1; + + if (/(iP)/g.test(window.navigator.userAgent)) { + console.error('Your browser does not support download!'); + return false; + } + if (isChrome || isSafari) { + const link = document.createElement('a'); + link.href = url; + link.target = target; + + if (link.download !== undefined) { + link.download = fileName || url.substring(url.lastIndexOf('/') + 1, url.length); + } + + if (document.createEvent) { + const e = document.createEvent('MouseEvents'); + e.initEvent('click', true, true); + link.dispatchEvent(e); + return true; + } + } + if (url.indexOf('?') === -1) { + url += '?download'; + } + + openWindow(url, { target }); + return true; +} diff --git a/src/utils/helper/treeHelper.ts b/src/utils/helper/treeHelper.ts new file mode 100644 index 0000000..8d01984 --- /dev/null +++ b/src/utils/helper/treeHelper.ts @@ -0,0 +1,197 @@ +interface TreeHelperConfig { + id: string; + children: string; + pid: string; +} + +// 默认配置 +const DEFAULT_CONFIG: TreeHelperConfig = { + id: 'id', + children: 'children', + pid: 'pid', +}; + +// 获取配置。 Object.assign 从一个或多个源对象复制到目标对象 +const getConfig = (config: Partial) => Object.assign({}, DEFAULT_CONFIG, config); + +// tree from list +// 列表中的树 +export function listToTree(list: any[], config: Partial = {}): T[] { + const conf = getConfig(config) as TreeHelperConfig; + const nodeMap = new Map(); + const result: T[] = []; + const { id, children, pid } = conf; + + for (const node of list) { + node[children] = node[children] || []; + nodeMap.set(node[id], node); + } + for (const node of list) { + const parent = nodeMap.get(node[pid]); + (parent ? parent[children] : result).push(node); + } + return result; +} + +export function treeToList(tree: any, config: Partial = {}): T { + config = getConfig(config); + const { children } = config; + const result: any = [...tree]; + for (let i = 0; i < result.length; i++) { + if (!result[i][children!]) continue; + result.splice(i + 1, 0, ...result[i][children!]); + } + return result; +} + +export function findNode(tree: any, func: Fn, config: Partial = {}): T | null { + config = getConfig(config); + const { children } = config; + const list = [...tree]; + for (const node of list) { + if (func(node)) return node; + node[children!] && list.push(...node[children!]); + } + return null; +} + +export function findNodeAll(tree: any, func: Fn, config: Partial = {}): T[] { + config = getConfig(config); + const { children } = config; + const list = [...tree]; + const result: T[] = []; + for (const node of list) { + func(node) && result.push(node); + node[children!] && list.push(...node[children!]); + } + return result; +} + +export function findPath(tree: any, func: Fn, config: Partial = {}): T | 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); + node[children!] && list.unshift(...node[children!]); + path.push(node); + if (func(node)) { + return path; + } + } + } + return null; +} + +export function findPathAll(tree: any, func: Fn, config: Partial = {}) { + config = getConfig(config); + const path: any[] = []; + const list = [...tree]; + const result: any[] = []; + const visitedSet = new Set(), + { children } = config; + while (list.length) { + const node = list[0]; + if (visitedSet.has(node)) { + path.pop(); + list.shift(); + } else { + visitedSet.add(node); + node[children!] && list.unshift(...node[children!]); + path.push(node); + func(node) && result.push([...path]); + } + } + return result; +} + +export function filter( + tree: T[], + func: (n: T) => boolean, + // Partial 将 T 中的所有属性设为可选 + config: Partial = {} +): T[] { + // 获取配置 + config = getConfig(config); + const children = config.children as string; + + function listFilter(list: T[]) { + return list + .map((node: any) => ({ ...node })) + .filter((node) => { + // 递归调用 对含有children项 进行再次调用自身函数 listFilter + node[children] = node[children] && listFilter(node[children]); + // 执行传入的回调 func 进行过滤 + return func(node) || (node[children] && node[children].length); + }); + } + + return listFilter(tree); +} + +export function forEach(tree: T[], func: (n: T) => any, config: Partial = {}): void { + config = getConfig(config); + const list: any[] = [...tree]; + const { children } = config; + for (let i = 0; i < list.length; i++) { + //func 返回true就终止遍历,避免大量节点场景下无意义循环,引起浏览器卡顿 + if (func(list[i])) { + return; + } + children && list[i][children] && list.splice(i + 1, 0, ...list[i][children]); + } +} + +/** + * @description: Extract tree specified structure + * @description: 提取树指定结构 + */ +export function treeMap(treeData: T[], opt: { children?: string; conversion: Fn }): T[] { + return treeData.map((item) => treeMapEach(item, opt)); +} + +/** + * @description: Extract tree specified structure + * @description: 提取树指定结构 + */ +export function treeMapEach(data: any, { children = 'children', conversion }: { children?: string; conversion: Fn }) { + const haveChildren = Array.isArray(data[children]) && data[children].length > 0; + const conversionData = conversion(data) || {}; + if (haveChildren) { + return { + ...conversionData, + [children]: data[children].map((i: number) => + treeMapEach(i, { + children, + conversion, + }) + ), + }; + } else { + return { + ...conversionData, + }; + } +} + +/** + * 递归遍历树结构 + * @param treeDatas 树 + * @param callBack 回调 + * @param parentNode 父节点 + */ +export function eachTree(treeDatas: any[], callBack: Fn, parentNode = {}) { + treeDatas.forEach((element) => { + const newNode = callBack(element, parentNode) || element; + if (element.children) { + eachTree(element.children, callBack, newNode); + } + }); +} diff --git a/src/utils/helper/tsxHelper.tsx b/src/utils/helper/tsxHelper.tsx new file mode 100644 index 0000000..46e0001 --- /dev/null +++ b/src/utils/helper/tsxHelper.tsx @@ -0,0 +1,35 @@ +import { Slots } from 'vue'; +import { isFunction } from '/@/utils/is'; + +/** + * @description: Get slot to prevent empty error + */ +export function getSlot(slots: Slots, slot = 'default', data?: any) { + 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); +} + +/** + * extends slots + * @param slots + * @param excludeKeys + */ +export function extendSlots(slots: Slots, excludeKeys: string[] = []) { + const slotKeys = Object.keys(slots); + const ret: any = {}; + slotKeys.map((key) => { + if (excludeKeys.includes(key)) { + return null; + } + ret[key] = () => getSlot(slots, key); + }); + return ret; +} diff --git a/src/utils/helper/validator.ts b/src/utils/helper/validator.ts new file mode 100644 index 0000000..02ed2ec --- /dev/null +++ b/src/utils/helper/validator.ts @@ -0,0 +1,155 @@ +import { dateUtil } from '/@/utils/dateUtil'; +import { duplicateCheck } from '/@/views/system/user/user.api'; + +export const rules = { + rule(type, required) { + if (type === 'email') { + return this.email(required); + } + if (type === 'phone') { + return this.phone(required); + } + }, + email(required) { + return [ + { + required: required ? required : false, + validator: async (_rule, value) => { + if (required == true && !value) { + return Promise.reject('请输入邮箱!'); + } + if ( + value && + !new RegExp( + /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/ + ).test(value) + ) { + return Promise.reject('请输入正确邮箱格式!'); + } + return Promise.resolve(); + }, + trigger: 'change', + }, + ] as ArrayRule; + }, + phone(required) { + return [ + { + required: required, + validator: async (_, value) => { + if (required && !value) { + return Promise.reject('请输入手机号码!'); + } + if (!/^1[3456789]\d{9}$/.test(value)) { + return Promise.reject('手机号码格式有误'); + } + return Promise.resolve(); + }, + trigger: 'change', + }, + ]; + }, + startTime(endTime, required) { + return [ + { + required: required ? required : false, + validator: (_, value) => { + if (required && !value) { + return Promise.reject('请选择开始时间'); + } + if (endTime && value && dateUtil(endTime).isBefore(value)) { + return Promise.reject('开始时间需小于结束时间'); + } + return Promise.resolve(); + }, + trigger: 'change', + }, + ]; + }, + endTime(startTime, required) { + return [ + { + required: required ? required : false, + validator: (_, value) => { + if (required && !value) { + return Promise.reject('请选择结束时间'); + } + if (startTime && value && dateUtil(value).isBefore(startTime)) { + return Promise.reject('结束时间需大于开始时间'); + } + return Promise.resolve(); + }, + trigger: 'change', + }, + ]; + }, + confirmPassword(values, required) { + return [ + { + required: required ? required : false, + validator: (_, value) => { + if (!value) { + return Promise.reject('密码不能为空'); + } + if (value !== values.password) { + return Promise.reject('两次输入的密码不一致!'); + } + return Promise.resolve(); + }, + }, + ]; + }, + duplicateCheckRule(tableName, fieldName, model, schema, required?) { + return [ + { + validator: (_, value) => { + if (!value && required) { + return Promise.reject(`请输入${schema.label}`); + } + return new Promise((resolve, reject) => { + duplicateCheck({ + tableName, + fieldName, + fieldVal: value, + dataId: model.id, + }) + .then((res) => { + res.success ? resolve() : reject(res.message || '校验失败'); + }) + .catch((err) => { + reject(err.message || '验证失败'); + }); + }); + }, + }, + ] as ArrayRule; + }, +}; + +//update-begin-author:taoyan date:2022-6-16 for: 代码生成-原生表单用 +/** + * 唯一校验函数,给原生使用,vben的表单校验建议使用上述rules + * @param tableName 表名 + * @param fieldName 字段名 + * @param fieldVal 字段值 + * @param dataId 数据ID + */ +export async function duplicateValidate(tableName, fieldName, fieldVal, dataId) { + try { + let params = { + tableName, + fieldName, + fieldVal, + dataId: dataId, + }; + const res = await duplicateCheck(params); + if (res.success) { + return Promise.resolve(); + } else { + return Promise.reject(res.message || '校验失败'); + } + } catch (e) { + return Promise.reject('校验失败,可能是断网等问题导致的校验失败'); + } +} +//update-end-author:taoyan date:2022-6-16 for: 代码生成-原生表单用 diff --git a/src/utils/http/axios/Axios.ts b/src/utils/http/axios/Axios.ts new file mode 100644 index 0000000..4d7c296 --- /dev/null +++ b/src/utils/http/axios/Axios.ts @@ -0,0 +1,270 @@ +import type { AxiosRequestConfig, AxiosInstance, AxiosResponse, AxiosError } from 'axios'; +import type { RequestOptions, Result, UploadFileParams, UploadFileCallBack } from '/#/axios'; +import type { CreateAxiosOptions } from './axiosTransform'; +import axios from 'axios'; +import qs from 'qs'; +import { AxiosCanceler } from './axiosCancel'; +import { isFunction } from '/@/utils/is'; +import { cloneDeep } from 'lodash-es'; +import { ContentTypeEnum } from '/@/enums/httpEnum'; +import { RequestEnum } from '/@/enums/httpEnum'; +import { useGlobSetting } from '/@/hooks/setting'; +import { useMessage } from '/@/hooks/web/useMessage'; + +const { createMessage } = useMessage(); +export * from './axiosTransform'; + +/** + * @description: axios module + */ +export class VAxios { + private axiosInstance: AxiosInstance; + private readonly options: CreateAxiosOptions; + + constructor(options: CreateAxiosOptions) { + this.options = options; + this.axiosInstance = axios.create(options); + this.setupInterceptors(); + } + + /** + * @description: Create axios instance + */ + private createAxios(config: CreateAxiosOptions): void { + this.axiosInstance = axios.create(config); + } + + private getTransform() { + const { transform } = this.options; + return transform; + } + + getAxios(): AxiosInstance { + return this.axiosInstance; + } + + /** + * @description: Reconfigure axios + */ + configAxios(config: CreateAxiosOptions) { + if (!this.axiosInstance) { + return; + } + this.createAxios(config); + } + + /** + * @description: Set general header + */ + setHeader(headers: any): void { + if (!this.axiosInstance) { + return; + } + Object.assign(this.axiosInstance.defaults.headers, headers); + } + + /** + * @description: Interceptor configuration + */ + private setupInterceptors() { + const transform = this.getTransform(); + if (!transform) { + return; + } + const { requestInterceptors, requestInterceptorsCatch, responseInterceptors, responseInterceptorsCatch } = transform; + + const axiosCanceler = new AxiosCanceler(); + + // 请求侦听器配置处理 + this.axiosInstance.interceptors.request.use((config: AxiosRequestConfig) => { + // If cancel repeat request is turned on, then cancel repeat request is prohibited + // @ts-ignore + const { ignoreCancelToken } = config.requestOptions; + + const ignoreCancel = ignoreCancelToken !== undefined ? ignoreCancelToken : this.options.requestOptions?.ignoreCancelToken; + + !ignoreCancel && axiosCanceler.addPending(config); + if (requestInterceptors && isFunction(requestInterceptors)) { + config = requestInterceptors(config, this.options); + } + return config; + }, undefined); + + // 请求拦截器错误捕获 + requestInterceptorsCatch && + isFunction(requestInterceptorsCatch) && + this.axiosInstance.interceptors.request.use(undefined, requestInterceptorsCatch); + + // 响应结果拦截器处理 + this.axiosInstance.interceptors.response.use((res: AxiosResponse) => { + res && axiosCanceler.removePending(res.config); + if (responseInterceptors && isFunction(responseInterceptors)) { + res = responseInterceptors(res); + } + return res; + }, undefined); + + // 响应结果拦截器错误捕获 + responseInterceptorsCatch && + isFunction(responseInterceptorsCatch) && + this.axiosInstance.interceptors.response.use(undefined, responseInterceptorsCatch); + } + + /** + * 文件上传 + */ + //--@updateBy-begin----author:liusq---date:20211117------for:增加上传回调参数callback------ + uploadFile(config: AxiosRequestConfig, params: UploadFileParams, callback?: UploadFileCallBack) { + //--@updateBy-end----author:liusq---date:20211117------for:增加上传回调参数callback------ + const formData = new window.FormData(); + const customFilename = params.name || 'file'; + + if (params.filename) { + formData.append(customFilename, params.file, params.filename); + } else { + formData.append(customFilename, params.file); + } + const glob = useGlobSetting(); + config.baseURL = glob.uploadUrl; + if (params.data) { + Object.keys(params.data).forEach((key) => { + const value = params.data![key]; + if (Array.isArray(value)) { + value.forEach((item) => { + formData.append(`${key}[]`, item); + }); + return; + } + + formData.append(key, params.data[key]); + }); + } + + return this.axiosInstance + .request({ + ...config, + method: 'POST', + data: formData, + headers: { + 'Content-type': ContentTypeEnum.FORM_DATA, + ignoreCancelToken: true, + }, + }) + .then((res: any) => { + //--@updateBy-begin----author:liusq---date:20210914------for:上传判断是否包含回调方法------ + if (callback?.success && isFunction(callback?.success)) { + callback?.success(res?.data); + //--@updateBy-end----author:liusq---date:20210914------for:上传判断是否包含回调方法------ + } else if (callback?.isReturnResponse) { + //--@updateBy-begin----author:liusq---date:20211117------for:上传判断是否返回res信息------ + return Promise.resolve(res?.data); + //--@updateBy-end----author:liusq---date:20211117------for:上传判断是否返回res信息------ + } else { + if (res.data.success == true && res.data.code == 200) { + createMessage.success(res.data.message); + } else { + createMessage.error(res.data.message); + } + } + }); + } + + // 支持表单数据 + supportFormData(config: AxiosRequestConfig) { + const headers = config.headers || this.options.headers; + const contentType = headers?.['Content-Type'] || headers?.['content-type']; + + if (contentType !== ContentTypeEnum.FORM_URLENCODED || !Reflect.has(config, 'data') || config.method?.toUpperCase() === RequestEnum.GET) { + return config; + } + + return { + ...config, + data: qs.stringify(config.data, { arrayFormat: 'brackets' }), + }; + } + + get(config: AxiosRequestConfig, options?: RequestOptions): Promise { + return this.request({ ...config, method: 'GET' }, options); + } + + post(config: AxiosRequestConfig, options?: RequestOptions): Promise { + return this.request({ ...config, method: 'POST' }, options); + } + + put(config: AxiosRequestConfig, options?: RequestOptions): Promise { + return this.request({ ...config, method: 'PUT' }, options); + } + + delete(config: AxiosRequestConfig, options?: RequestOptions): Promise { + return this.request({ ...config, method: 'DELETE' }, options); + } + + request(config: AxiosRequestConfig, options?: RequestOptions): Promise { + let conf: CreateAxiosOptions = cloneDeep(config); + const transform = this.getTransform(); + + const { requestOptions } = this.options; + + const opt: RequestOptions = Object.assign({}, requestOptions, options); + + const { beforeRequestHook, requestCatchHook, transformRequestHook } = transform || {}; + if (beforeRequestHook && isFunction(beforeRequestHook)) { + conf = beforeRequestHook(conf, opt); + } + conf.requestOptions = opt; + + conf = this.supportFormData(conf); + + return new Promise((resolve, reject) => { + this.axiosInstance + .request>(conf) + .then((res: AxiosResponse) => { + if (transformRequestHook && isFunction(transformRequestHook)) { + try { + const ret = transformRequestHook(res, opt); + //zhangyafei---添加回调方法 + config.success && config.success(res.data); + //zhangyafei---添加回调方法 + resolve(ret); + } catch (err) { + reject(err || new Error('request error!')); + } + return; + } + resolve(res as unknown as Promise); + }) + .catch((e: Error | AxiosError) => { + if (requestCatchHook && isFunction(requestCatchHook)) { + reject(requestCatchHook(e, opt)); + return; + } + if (axios.isAxiosError(e)) { + // 在此处重写来自axios的错误消息 + } + reject(e); + }); + }); + } + + + /** + * 【用于评论功能】自定义文件上传-请求 + * @param url + * @param formData + */ + uploadMyFile(url, formData) { + const glob = useGlobSetting(); + return this.axiosInstance + .request({ + url: url, + baseURL: glob.uploadUrl, + method: 'POST', + data: formData, + headers: { + 'Content-type': ContentTypeEnum.FORM_DATA, + ignoreCancelToken: true, + }, + }); + } +} diff --git a/src/utils/http/axios/axiosCancel.ts b/src/utils/http/axios/axiosCancel.ts new file mode 100644 index 0000000..081233e --- /dev/null +++ b/src/utils/http/axios/axiosCancel.ts @@ -0,0 +1,60 @@ +import type { AxiosRequestConfig, Canceler } from 'axios'; +import axios from 'axios'; +import { isFunction } from '/@/utils/is'; + +// Used to store the identification and cancellation function of each request +let pendingMap = new Map(); + +export const getPendingUrl = (config: AxiosRequestConfig) => [config.method, config.url].join('&'); + +export class AxiosCanceler { + /** + * Add request + * @param {Object} config + */ + addPending(config: AxiosRequestConfig) { + this.removePending(config); + const url = getPendingUrl(config); + config.cancelToken = + config.cancelToken || + new axios.CancelToken((cancel) => { + if (!pendingMap.has(url)) { + // If there is no current request in pending, add it + pendingMap.set(url, cancel); + } + }); + } + + /** + * @description: Clear all pending + */ + removeAllPending() { + pendingMap.forEach((cancel) => { + cancel && isFunction(cancel) && cancel(); + }); + pendingMap.clear(); + } + + /** + * Removal request + * @param {Object} config + */ + removePending(config: AxiosRequestConfig) { + const url = getPendingUrl(config); + + if (pendingMap.has(url)) { + // If there is a current request identifier in pending, + // the current request needs to be cancelled and removed + const cancel = pendingMap.get(url); + cancel && cancel(url); + pendingMap.delete(url); + } + } + + /** + * @description: reset + */ + reset(): void { + pendingMap = new Map(); + } +} diff --git a/src/utils/http/axios/axiosTransform.ts b/src/utils/http/axios/axiosTransform.ts new file mode 100644 index 0000000..141ac5a --- /dev/null +++ b/src/utils/http/axios/axiosTransform.ts @@ -0,0 +1,49 @@ +/** + * Data processing class, can be configured according to the project + */ +import type { AxiosRequestConfig, AxiosResponse } from 'axios'; +import type { RequestOptions, Result } from '/#/axios'; + +export interface CreateAxiosOptions extends AxiosRequestConfig { + authenticationScheme?: string; + transform?: AxiosTransform; + requestOptions?: RequestOptions; +} + +export abstract class AxiosTransform { + /** + * @description: Process configuration before request + * @description: Process configuration before request + */ + beforeRequestHook?: (config: AxiosRequestConfig, options: RequestOptions) => AxiosRequestConfig; + + /** + * @description: Request successfully processed + */ + transformRequestHook?: (res: AxiosResponse, options: RequestOptions) => any; + + /** + * @description: 请求失败处理 + */ + requestCatchHook?: (e: Error, options: RequestOptions) => Promise; + + /** + * @description: 请求之前的拦截器 + */ + requestInterceptors?: (config: AxiosRequestConfig, options: CreateAxiosOptions) => AxiosRequestConfig; + + /** + * @description: 请求之后的拦截器 + */ + responseInterceptors?: (res: AxiosResponse) => AxiosResponse; + + /** + * @description: 请求之前的拦截器错误处理 + */ + requestInterceptorsCatch?: (error: Error) => void; + + /** + * @description: 请求之后的拦截器错误处理 + */ + responseInterceptorsCatch?: (error: Error) => void; +} diff --git a/src/utils/http/axios/checkStatus.ts b/src/utils/http/axios/checkStatus.ts new file mode 100644 index 0000000..fc292e3 --- /dev/null +++ b/src/utils/http/axios/checkStatus.ts @@ -0,0 +1,76 @@ +import type { ErrorMessageMode } from '/#/axios'; +import { useMessage } from '/@/hooks/web/useMessage'; +import { useI18n } from '/@/hooks/web/useI18n'; +// import router from '/@/router'; +// import { PageEnum } from '/@/enums/pageEnum'; +import { useUserStoreWithOut } from '/@/store/modules/user'; +import projectSetting from '/@/settings/projectSetting'; +import { SessionTimeoutProcessingEnum } from '/@/enums/appEnum'; + +const { createMessage, createErrorModal } = useMessage(); +const error = createMessage.error!; +const stp = projectSetting.sessionTimeoutProcessing; + +export function checkStatus(status: number, msg: string, errorMessageMode: ErrorMessageMode = 'message'): void { + const { t } = useI18n(); + const userStore = useUserStoreWithOut(); + let errMessage = ''; + + switch (status) { + case 400: + errMessage = `${msg}`; + break; + // 401: Not logged in + // Jump to the login page if not logged in, and carry the path of the current page + // Return to the current page after successful login. This step needs to be operated on the login page. + case 401: + userStore.setToken(undefined); + errMessage = msg || t('sys.api.errMsg401'); + if (stp === SessionTimeoutProcessingEnum.PAGE_COVERAGE) { + userStore.setSessionTimeout(true); + } else { + userStore.logout(true); + } + break; + case 403: + errMessage = t('sys.api.errMsg403'); + break; + // 404请求不存在 + case 404: + errMessage = t('sys.api.errMsg404'); + break; + case 405: + errMessage = t('sys.api.errMsg405'); + break; + case 408: + errMessage = t('sys.api.errMsg408'); + break; + case 500: + errMessage = t('sys.api.errMsg500'); + break; + case 501: + errMessage = t('sys.api.errMsg501'); + break; + case 502: + errMessage = t('sys.api.errMsg502'); + break; + case 503: + errMessage = t('sys.api.errMsg503'); + break; + case 504: + errMessage = t('sys.api.errMsg504'); + break; + case 505: + errMessage = t('sys.api.errMsg505'); + break; + default: + } + + if (errMessage) { + if (errorMessageMode === 'modal') { + createErrorModal({ title: t('sys.api.errorTip'), content: errMessage }); + } else if (errorMessageMode === 'message') { + error({ content: errMessage, key: `global_error_message_status_${status}` }); + } + } +} diff --git a/src/utils/http/axios/helper.ts b/src/utils/http/axios/helper.ts new file mode 100644 index 0000000..a6069c0 --- /dev/null +++ b/src/utils/http/axios/helper.ts @@ -0,0 +1,47 @@ +import { isObject, isString } from '/@/utils/is'; +import dayjs from "dayjs"; +// update-begin--author:liaozhiyang---date:20240426---for:【QQYUN-9138】系统用户保存的时间没有秒 +const DATE_TIME_FORMAT = 'YYYY-MM-DD HH:mm:ss'; +// update-end--author:liaozhiyang---date:20240426---for:【QQYUN-9138】系统用户保存的时间没有秒 + +export function joinTimestamp(join: boolean, restful: T): T extends true ? string : object; + +export function joinTimestamp(join: boolean, restful = false): string | object { + if (!join) { + return restful ? '' : {}; + } + const now = new Date().getTime(); + if (restful) { + return `?_t=${now}`; + } + return { _t: now }; +} + +/** + * @description: Format request parameter time + */ +export function formatRequestDate(params: Recordable) { + if (Object.prototype.toString.call(params) !== '[object Object]') { + return; + } + + for (const key in params) { + // 判断是否是dayjs实例 + if (dayjs.isDayjs(params[key])) { + params[key] = params[key].format(DATE_TIME_FORMAT); + } + if (isString(key)) { + const value = params[key]; + if (value) { + try { + params[key] = isString(value) ? value.trim() : value; + } catch (error) { + throw new Error(error); + } + } + } + if (isObject(params[key])) { + formatRequestDate(params[key]); + } + } +} diff --git a/src/utils/http/axios/index.ts b/src/utils/http/axios/index.ts new file mode 100644 index 0000000..2052948 --- /dev/null +++ b/src/utils/http/axios/index.ts @@ -0,0 +1,326 @@ +// axios配置 可自行根据项目进行更改,只需更改该文件即可,其他文件可以不动 +// The axios configuration can be changed according to the project, just change the file, other files can be left unchanged + +import type { AxiosResponse } from 'axios'; +import type { RequestOptions, Result } from '/#/axios'; +import type { AxiosTransform, CreateAxiosOptions } from './axiosTransform'; +import { VAxios } from './Axios'; +import { checkStatus } from './checkStatus'; +import { router } from '/@/router'; +import { useGlobSetting } from '/@/hooks/setting'; +import { useMessage } from '/@/hooks/web/useMessage'; +import { RequestEnum, ResultEnum, ContentTypeEnum, ConfigEnum } from '/@/enums/httpEnum'; +import { isString } from '/@/utils/is'; +import { getToken, getTenantId } from '/@/utils/auth'; +import { setObjToUrlParams, deepMerge } from '/@/utils'; +import signMd5Utils from '/@/utils/encryption/signMd5Utils'; +import { useErrorLogStoreWithOut } from '/@/store/modules/errorLog'; +import { useI18n } from '/@/hooks/web/useI18n'; +import { joinTimestamp, formatRequestDate } from './helper'; +import { useUserStoreWithOut } from '/@/store/modules/user'; +import { cloneDeep } from "lodash-es"; +const globSetting = useGlobSetting(); +const urlPrefix = globSetting.urlPrefix; +const { createMessage, createErrorModal } = useMessage(); + +/** + * @description: 数据处理,方便区分多种处理方式 + */ +const transform: AxiosTransform = { + /** + * @description: 处理请求数据。如果数据不是预期格式,可直接抛出错误 + */ + transformRequestHook: (res: AxiosResponse, options: RequestOptions) => { + const { t } = useI18n(); + const { isTransformResponse, isReturnNativeResponse } = options; + // 是否返回原生响应头 比如:需要获取响应头时使用该属性 + if (isReturnNativeResponse) { + return res; + } + // 不进行任何处理,直接返回 + // 用于页面代码可能需要直接获取code,data,message这些信息时开启 + if (!isTransformResponse) { + return res.data; + } + // 错误的时候返回 + + const { data } = res; + if (!data) { + // return '[HTTP] Request has no return value'; + throw new Error(t('sys.api.apiRequestFailed')); + } + // 这里 code,result,message为 后台统一的字段,需要在 types.ts内修改为项目自己的接口返回格式 + const { code, result, message, success } = data; + // 这里逻辑可以根据项目进行修改 + const hasSuccess = data && Reflect.has(data, 'code') && (code === ResultEnum.SUCCESS || code === 200); + if (hasSuccess) { + if (success && message && options.successMessageMode === 'success') { + //信息成功提示 + createMessage.success(message); + } + return result; + } + + // 在此处根据自己项目的实际情况对不同的code执行不同的操作 + // 如果不希望中断当前请求,请return数据,否则直接抛出异常即可 + let timeoutMsg = ''; + switch (code) { + case ResultEnum.TIMEOUT: + timeoutMsg = t('sys.api.timeoutMessage'); + const userStore = useUserStoreWithOut(); + userStore.setToken(undefined); + userStore.logout(true); + break; + default: + if (message) { + timeoutMsg = message; + } + } + + // errorMessageMode=‘modal’的时候会显示modal错误弹窗,而不是消息提示,用于一些比较重要的错误 + // errorMessageMode='none' 一般是调用时明确表示不希望自动弹出错误提示 + if (options.errorMessageMode === 'modal') { + createErrorModal({ title: t('sys.api.errorTip'), content: timeoutMsg }); + } else if (options.errorMessageMode === 'message') { + createMessage.error(timeoutMsg); + } + + throw new Error(timeoutMsg || t('sys.api.apiRequestFailed')); + }, + + // 请求之前处理config + beforeRequestHook: (config, options) => { + const { apiUrl, joinPrefix, joinParamsToUrl, formatDate, joinTime = true, urlPrefix } = options; + + //update-begin---author:scott ---date:2024-02-20 for:以http开头的请求url,不拼加前缀-- + // http开头的请求url,不加前缀 + let isStartWithHttp = false; + const requestUrl = config.url; + if(requestUrl!=null && (requestUrl.startsWith("http:") || requestUrl.startsWith("https:"))){ + isStartWithHttp = true; + } + // update-begin--author:sunjianlei---date:20250411---for:【QQYUN-9685】构建 electron 桌面应用 + if (!isStartWithHttp && requestUrl != null) { + // 由于electron的url是file://开头的,所以需要判断一下 + isStartWithHttp = requestUrl.startsWith('file://'); + } + // update-end----author:sunjianlei---date:20250411---for:【QQYUN-9685】构建 electron 桌面应用 + if (!isStartWithHttp && joinPrefix) { + config.url = `${urlPrefix}${config.url}`; + } + + if (!isStartWithHttp && apiUrl && isString(apiUrl)) { + config.url = `${apiUrl}${config.url}`; + } + //update-end---author:scott ---date::2024-02-20 for:以http开头的请求url,不拼加前缀-- + + const params = config.params || {}; + const data = config.data || false; + formatDate && data && !isString(data) && formatRequestDate(data); + if (config.method?.toUpperCase() === RequestEnum.GET) { + if (!isString(params)) { + // 给 get 请求加上时间戳参数,避免从缓存中拿数据。 + config.params = Object.assign(params || {}, joinTimestamp(joinTime, false)); + } else { + // 兼容restful风格 + config.url = config.url + params + `${joinTimestamp(joinTime, true)}`; + config.params = undefined; + } + } else { + if (!isString(params)) { + formatDate && formatRequestDate(params); + if (Reflect.has(config, 'data') && config.data && Object.keys(config.data).length > 0) { + config.data = data; + config.params = params; + } else { + // 非GET请求如果没有提供data,则将params视为data + config.data = params; + config.params = undefined; + } + if (joinParamsToUrl) { + config.url = setObjToUrlParams(config.url as string, Object.assign({}, config.params, config.data)); + } + } else { + // 兼容restful风格 + config.url = config.url + params; + config.params = undefined; + } + } + + // update-begin--author:sunjianlei---date:220241019---for:【JEECG作为乾坤子应用】作为乾坤子应用启动时,拼接请求路径 + if (globSetting.isQiankunMicro) { + if (config.url && config.url.startsWith('/')) { + config.url = globSetting.qiankunMicroAppEntry + config.url + } + } + // update-end--author:sunjianlei---date:220241019---for:【JEECG作为乾坤子应用】作为乾坤子应用启动时,拼接请求路径 + + return config; + }, + + /** + * @description: 请求拦截器处理 + */ + requestInterceptors: (config: Recordable, options) => { + // 请求之前处理config + const token = getToken(); + let tenantId: string | number = getTenantId(); + + //update-begin---author:wangshuai---date:2024-04-16---for:【QQYUN-9005】发送短信加签。解决没有token无法加签--- + // 将签名和时间戳,添加在请求接口 Header + config.headers[ConfigEnum.TIMESTAMP] = signMd5Utils.getTimestamp(); + //update-begin---author:wangshuai---date:2024-04-25---for: 生成签名的时候复制一份,避免影响原来的参数--- + config.headers[ConfigEnum.Sign] = signMd5Utils.getSign(config.url, cloneDeep(config.params), cloneDeep(config.data)); + //update-end---author:wangshuai---date:2024-04-25---for: 生成签名的时候复制一份,避免影响原来的参数--- + //update-end---author:wangshuai---date:2024-04-16---for:【QQYUN-9005】发送短信加签。解决没有token无法加签--- + // update-begin--author:liaozhiyang---date:20240509---for:【issues/1220】登录时,vue3版本不加载字典数据设置无效 + //--update-begin--author:liusq---date:20220325---for: 增加vue3标记 + config.headers[ConfigEnum.VERSION] = 'v3'; + //--update-end--author:liusq---date:20220325---for:增加vue3标记 + // update-end--author:liaozhiyang---date:20240509---for:【issues/1220】登录时,vue3版本不加载字典数据设置无效 + if (token && (config as Recordable)?.requestOptions?.withToken !== false) { + // jwt token + config.headers.Authorization = options.authenticationScheme ? `${options.authenticationScheme} ${token}` : token; + config.headers[ConfigEnum.TOKEN] = token; + + // 将签名和时间戳,添加在请求接口 Header + //config.headers[ConfigEnum.TIMESTAMP] = signMd5Utils.getTimestamp(); + //config.headers[ConfigEnum.Sign] = signMd5Utils.getSign(config.url, config.params); + if (!tenantId) { + tenantId = 0; + } + + // update-begin--author:sunjianlei---date:220230428---for:【QQYUN-5279】修复分享的应用租户和当前登录租户不一致时,提示404的问题 + const userStore = useUserStoreWithOut(); + // 判断是否有临时租户id + if (userStore.hasShareTenantId && userStore.shareTenantId !== 0) { + // 临时租户id存在,使用临时租户id + tenantId = userStore.shareTenantId!; + } + // update-end--author:sunjianlei---date:220230428---for:【QQYUN-5279】修复分享的应用租户和当前登录租户不一致时,提示404的问题 + + config.headers[ConfigEnum.TENANT_ID] = tenantId; + //--update-end--author:liusq---date:20211105---for:将多租户id,添加在请求接口 Header + + // ======================================================================================== + // update-begin--author:sunjianlei---date:20220624--for: 添加低代码应用ID + let routeParams = router.currentRoute.value.params; + if (routeParams.appId) { + config.headers[ConfigEnum.X_LOW_APP_ID] = routeParams.appId; + // lowApp自定义筛选条件 + if (routeParams.lowAppFilter) { + config.params = { ...config.params, ...JSON.parse(routeParams.lowAppFilter as string) }; + delete routeParams.lowAppFilter; + } + } + // update-end--author:sunjianlei---date:20220624--for: 添加低代码应用ID + // ======================================================================================== + + } + return config; + }, + + /** + * @description: 响应拦截器处理 + */ + responseInterceptors: (res: AxiosResponse) => { + return res; + }, + + /** + * @description: 响应错误处理 + */ + responseInterceptorsCatch: (error: any) => { + const { t } = useI18n(); + const errorLogStore = useErrorLogStoreWithOut(); + errorLogStore.addAjaxErrorInfo(error); + const { response, code, message, config } = error || {}; + const errorMessageMode = config?.requestOptions?.errorMessageMode || 'none'; + //scott 20211022 token失效提示信息 + //const msg: string = response?.data?.error?.message ?? ''; + const msg: string = response?.data?.message ?? ''; + const err: string = error?.toString?.() ?? ''; + let errMessage = ''; + + try { + if (code === 'ECONNABORTED' && message.indexOf('timeout') !== -1) { + errMessage = t('sys.api.apiTimeoutMessage'); + } + if (err?.includes('Network Error')) { + errMessage = t('sys.api.networkExceptionMsg'); + } + + if (errMessage) { + if (errorMessageMode === 'modal') { + createErrorModal({ title: t('sys.api.errorTip'), content: errMessage }); + } else if (errorMessageMode === 'message') { + createMessage.error(errMessage); + } + return Promise.reject(error); + } + } catch (error) { + throw new Error(error); + } + + checkStatus(error?.response?.status, msg, errorMessageMode); + return Promise.reject(error); + }, +}; + +function createAxios(opt?: Partial) { + return new VAxios( + deepMerge( + { + // See https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication#authentication_schemes + // authentication schemes,e.g: Bearer + // authenticationScheme: 'Bearer', + authenticationScheme: '', + //接口超时设置 + timeout: 10 * 1000, + // 基础接口地址 + // baseURL: globSetting.apiUrl, + headers: { 'Content-Type': ContentTypeEnum.JSON }, + // 如果是form-data格式 + // headers: { 'Content-Type': ContentTypeEnum.FORM_URLENCODED }, + // 数据处理方式 + transform, + // 配置项,下面的选项都可以在独立的接口请求中覆盖 + requestOptions: { + // 默认将prefix 添加到url + joinPrefix: true, + // 是否返回原生响应头 比如:需要获取响应头时使用该属性 + isReturnNativeResponse: false, + // 需要对返回数据进行处理 + isTransformResponse: true, + // post请求的时候添加参数到url + joinParamsToUrl: false, + // 格式化提交参数时间 + formatDate: true, + // 异常消息提示类型 + errorMessageMode: 'message', + // 成功消息提示类型 + successMessageMode: 'success', + // 接口地址 + apiUrl: globSetting.apiUrl, + // 接口拼接地址 + urlPrefix: urlPrefix, + // 是否加入时间戳 + joinTime: true, + // 忽略重复请求 + ignoreCancelToken: true, + // 是否携带token + withToken: true, + }, + }, + opt || {} + ) + ); +} +export const defHttp = createAxios(); + +// other api url +// export const otherHttp = createAxios({ +// requestOptions: { +// apiUrl: 'xxx', +// }, +// }); diff --git a/src/utils/index.ts b/src/utils/index.ts new file mode 100644 index 0000000..1cf5550 --- /dev/null +++ b/src/utils/index.ts @@ -0,0 +1,659 @@ +import type { RouteLocationNormalized, RouteRecordNormalized } from 'vue-router'; +import type { App, Plugin } from 'vue'; +import type { FormSchema } from "@/components/Form"; + +import { unref } from 'vue'; +import { isObject, isFunction, isString } from '/@/utils/is'; +import Big from 'big.js'; +import dayjs from "dayjs"; +// update-begin--author:sunjianlei---date:20220408---for: 【VUEN-656】配置外部网址打不开,原因是带了#号,需要替换一下 +export const URL_HASH_TAB = `__AGWE4H__HASH__TAG__PWHRG__`; +// update-end--author:sunjianlei---date:20220408---for: 【VUEN-656】配置外部网址打不开,原因是带了#号,需要替换一下 + +export const noop = () => {}; + +/** + * @description: Set ui mount node + */ +export function getPopupContainer(node?: HTMLElement): HTMLElement { + return (node?.parentNode as HTMLElement) ?? document.body; +} + +/** + * Add the object as a parameter to the URL + * @param baseUrl url + * @param obj + * @returns {string} + * eg: + * let obj = {a: '3', b: '4'} + * setObjToUrlParams('www.baidu.com', obj) + * ==>www.baidu.com?a=3&b=4 + */ +export function setObjToUrlParams(baseUrl: string, obj: any): string { + let parameters = ''; + for (const key in obj) { + parameters += key + '=' + encodeURIComponent(obj[key]) + '&'; + } + parameters = parameters.replace(/&$/, ''); + return /\?$/.test(baseUrl) ? baseUrl + parameters : baseUrl.replace(/\/?$/, '?') + parameters; +} + +export function deepMerge(src: any = {}, target: any = {}): T { + let key: string; + for (key in target) { + // update-begin--author:liaozhiyang---date:20240329---for:【QQYUN-7872】online表单label较长优化 + if (isObject(src[key]) && isObject(target[key])) { + src[key] = deepMerge(src[key], target[key]); + } else { + // update-begin--author:liaozhiyang---date:20250318---for:【issues/7940】componentProps写成函数形式时,updateSchema写成对象时,参数没合并 + try { + if (isFunction(src[key]) && isObject(src[key]()) && isObject(target[key])) { + // src[key]是函数且返回对象,且target[key]是对象 + src[key] = deepMerge(src[key](), target[key]); + } else if (isObject(src[key]) && isFunction(target[key]) && isObject(target[key]())) { + // target[key]是函数且返回对象,且src[key]是对象 + src[key] = deepMerge(src[key], target[key]()); + } else if (isFunction(src[key]) && isFunction(target[key]) && isObject(src[key]()) && isObject(target[key]())) { + // src[key]是函数且返回对象,target[key]是函数且返回对象 + src[key] = deepMerge(src[key](), target[key]()); + } else { + src[key] = target[key]; + } + } catch (error) { + src[key] = target[key]; + } + // update-end--author:liaozhiyang---date:20250318---for:【issues/7940】componentProps写成函数形式时,updateSchema写成对象时,参数没合并 + } + // update-end--author:liaozhiyang---date:20240329---for:【QQYUN-7872】online表单label较长优化 + } + return src; +} + +export function openWindow(url: string, opt?: { target?: TargetContext | string; noopener?: boolean; noreferrer?: boolean }) { + const { target = '__blank', noopener = true, noreferrer = true } = opt || {}; + const feature: string[] = []; + + noopener && feature.push('noopener=yes'); + noreferrer && feature.push('noreferrer=yes'); + + window.open(url, target, feature.join(',')); +} + +// dynamic use hook props +export function getDynamicProps(props: T): Partial { + const ret: Recordable = {}; + + // @ts-ignore + Object.keys(props).map((key) => { + ret[key] = unref((props as Recordable)[key]); + }); + + return ret as Partial; +} + +/** + * 获取表单字段值数据类型 + * @param props + * @param field + * @updateBy:zyf + */ +export function getValueType(props, field) { + let formSchema = unref(unref(props)?.schemas); + let valueType = 'string'; + if (formSchema) { + let schema = formSchema.filter((item) => item.field === field)[0]; + valueType = schema && schema.componentProps && schema.componentProps.valueType ? schema.componentProps.valueType : valueType; + } + return valueType; +} + +/** + * 获取表单字段值数据类型 + * @param schema + */ +export function getValueTypeBySchema(schema: FormSchema) { + let valueType = 'string'; + if (schema) { + const componentProps = schema.componentProps as Recordable; + valueType = componentProps?.valueType ? componentProps?.valueType : valueType; + } + return valueType; +} + +/** + * 通过picker属性获取日期数据 + * @param data + * @param picker + */ +export function getDateByPicker(data, picker) { + if (!data || !picker) { + return data; + } + /** + * 需要把年、年月、设置成这段时间内的第一天([年季度]不需要处理antd回传的就是该季度的第一天,[年周]也不处理) + * 例如日期格式是年,传给数据库的时间必须是20240101 + * 例如日期格式是年月(选择了202502),传给数据库的时间必须是20250201 + */ + if (picker === 'year') { + return dayjs(data).set('month', 0).set('date', 1).format('YYYY-MM-DD'); + } else if (picker === 'month') { + return dayjs(data).set('date', 1).format('YYYY-MM-DD'); + } else if (picker === 'week') { + return dayjs(data).startOf('week').format('YYYY-MM-DD'); + } + return data; +} + +export function 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[], + }; +} +/** + * 深度克隆对象、数组 + * @param obj 被克隆的对象 + * @return 克隆后的对象 + */ +export function cloneObject(obj) { + return JSON.parse(JSON.stringify(obj)); +} + +export const withInstall = (component: T, alias?: string) => { + //console.log("---初始化---", component) + + const comp = component as any; + comp.install = (app: App) => { + // @ts-ignore + app.component(comp.name || comp.displayName, component); + if (alias) { + app.config.globalProperties[alias] = component; + } + }; + return component as T & Plugin; +}; + +/** + * 获取url地址参数 + * @param paraName + */ +export function getUrlParam(paraName) { + let url = document.location.toString(); + let arrObj = url.split('?'); + + if (arrObj.length > 1) { + let arrPara = arrObj[1].split('&'); + let arr; + + for (let i = 0; i < arrPara.length; i++) { + arr = arrPara[i].split('='); + + if (arr != null && arr[0] == paraName) { + return arr[1]; + } + } + return ''; + } else { + return ''; + } +} + +/** + * 休眠(setTimeout的promise版) + * @param ms 要休眠的时间,单位:毫秒 + * @param fn callback,可空 + * @return Promise + */ +export function sleep(ms: number, fn?: Fn) { + return new Promise((resolve) => + setTimeout(() => { + fn && fn(); + resolve(); + }, ms) + ); +} + +/** + * 不用正则的方式替换所有值 + * @param text 被替换的字符串 + * @param checker 替换前的内容 + * @param replacer 替换后的内容 + * @returns {String} 替换后的字符串 + */ +export function replaceAll(text, checker, replacer) { + let lastText = text; + text = text.replace(checker, replacer); + if (lastText !== text) { + return replaceAll(text, checker, replacer); + } + return text; +} + +/** + * 获取URL上参数 + * @param url + */ +export function getQueryVariable(url) { + if (!url) return; + + var t, + n, + r, + i = url.split('?')[1], + s = {}; + (t = i.split('&')), (r = null), (n = null); + for (var o in t) { + var u = t[o].indexOf('='); + u !== -1 && ((r = t[o].substr(0, u)), (n = t[o].substr(u + 1)), (s[r] = n)); + } + return s; +} +/** + * 判断是否显示办理按钮 + * @param bpmStatus + * @returns {*} + */ +export function showDealBtn(bpmStatus) { + if (bpmStatus != '1' && bpmStatus != '3' && bpmStatus != '4') { + return true; + } + return false; +} +/** + * 数字转大写 + * @param value + * @returns {*} + */ +export function numToUpper(value) { + if (value != '') { + let unit = new Array('仟', '佰', '拾', '', '仟', '佰', '拾', '', '角', '分'); + const toDx = (n) => { + switch (n) { + case '0': + return '零'; + case '1': + return '壹'; + case '2': + return '贰'; + case '3': + return '叁'; + case '4': + return '肆'; + case '5': + return '伍'; + case '6': + return '陆'; + case '7': + return '柒'; + case '8': + return '捌'; + case '9': + return '玖'; + } + }; + let lth = value.toString().length; + // update-begin--author:liaozhiyang---date:20241202---for:【issues/7493】numToUpper方法返回解决错误 + value = new Big(value).times(100); + // update-end--author:liaozhiyang---date:20241202---for:【issues/7493】numToUpper方法返回解决错误 + value += ''; + let length = value.length; + if (lth <= 8) { + let result = ''; + for (let i = 0; i < length; i++) { + if (i == 2) { + result = '元' + result; + } else if (i == 6) { + result = '万' + result; + } + if (value.charAt(length - i - 1) == 0) { + if (i != 0 && i != 1) { + if (result.charAt(0) != '零' && result.charAt(0) != '元' && result.charAt(0) != '万') { + result = '零' + result; + } + } + continue; + } + result = toDx(value.charAt(length - i - 1)) + unit[unit.length - i - 1] + result; + } + result += result.charAt(result.length - 1) == '元' ? '整' : ''; + return result; + } else { + return null; + } + } + return null; +} + +//update-begin-author:taoyan date:2022-6-8 for:解决老的vue2动态导入文件语法 vite不支持的问题 +const allModules = import.meta.glob('../views/**/*.vue'); +export function importViewsFile(path): Promise { + if (path.startsWith('/')) { + path = path.substring(1); + } + let page = ''; + if (path.endsWith('.vue')) { + page = `../views/${path}`; + } else { + page = `../views/${path}.vue`; + } + return new Promise((resolve, reject) => { + let flag = true; + for (const path in allModules) { + if (path == page) { + flag = false; + allModules[path]().then((mod) => { + console.log(path, mod); + resolve(mod); + }); + } + } + if (flag) { + reject('该文件不存在:' + page); + } + }); +} +//update-end-author:taoyan date:2022-6-8 for:解决老的vue2动态导入文件语法 vite不支持的问题 + + +/** + * 跳转至积木报表的 预览页面 + * @param url + * @param id + * @param token + */ +export function goJmReportViewPage(url, id, token) { + // update-begin--author:liaozhiyang---date:20230904---for:【QQYUN-6390】eval替换成new Function,解决build警告 + // URL支持{{ window.xxx }}占位符变量 + url = url.replace(/{{([^}]+)?}}/g, (_s1, s2) => _eval(s2)) + // update-end--author:liaozhiyang---date:20230904---for:【QQYUN-6390】eval替换成new Function,解决build警告 + if (url.includes('?')) { + url += '&' + } else { + url += '?' + } + url += `id=${id}` + url += `&token=${token}` + window.open(url) +} + +/** + * 获取随机颜色 + */ +export function getRandomColor(index?) { + + const colors = [ + 'rgb(100, 181, 246)', + 'rgb(77, 182, 172)', + 'rgb(255, 183, 77)', + 'rgb(229, 115, 115)', + 'rgb(149, 117, 205)', + 'rgb(161, 136, 127)', + 'rgb(144, 164, 174)', + 'rgb(77, 208, 225)', + 'rgb(129, 199, 132)', + 'rgb(255, 138, 101)', + 'rgb(133, 202, 205)', + 'rgb(167, 214, 118)', + 'rgb(254, 225, 89)', + 'rgb(251, 199, 142)', + 'rgb(239, 145, 139)', + 'rgb(169, 181, 255)', + 'rgb(231, 218, 202)', + 'rgb(252, 128, 58)', + 'rgb(254, 161, 172)', + 'rgb(194, 163, 205)', + ]; + return index && index < 19 ? colors[index] : colors[Math.floor((Math.random()*(colors.length-1)))]; +} + +export function getRefPromise(componentRef) { + return new Promise((resolve) => { + (function next() { + const ref = componentRef.value; + if (ref) { + resolve(ref); + } else { + setTimeout(() => { + next(); + }, 100); + } + })(); + }); +} + +/** + * 2023-09-04 + * liaozhiyang + * 用new Function替换eval + */ +export function _eval(str: string) { + return new Function(`return ${str}`)(); +} + +/** + * 2024-04-30 + * liaozhiyang + * 通过时间或者时间戳获取对应antd的年、月、周、季度。 + */ +export function getWeekMonthQuarterYear(date) { + // 获取 ISO 周数的函数 + const getISOWeek = (date) => { + const jan4 = new Date(date.getFullYear(), 0, 4); + const oneDay = 86400000; // 一天的毫秒数 + return Math.ceil(((date - jan4.getTime()) / oneDay + jan4.getDay() + 1) / 7); + }; + // 将时间戳转换为日期对象 + const dateObj = new Date(date); + // 计算周 + const week = getISOWeek(dateObj); + // 计算月 + const month = dateObj.getMonth() + 1; // 月份是从0开始的,所以要加1 + // 计算季度 + const quarter = Math.floor(dateObj.getMonth() / 3) + 1; + // 计算年 + const year = dateObj.getFullYear(); + return { + year: `${year}`, + month: `${year}-${month.toString().padStart(2, '0')}`, + week: `${year}-${week}周`, + quarter: `${year}-Q${quarter}`, + }; +} + +/** + * 2024-05-17 + * liaozhiyang + * 设置挂载的modal元素有可能会有多个,需要找到对应的。 + */ +export const setPopContainer = (node, selector) => { + if (typeof selector === 'string') { + const targetEles = Array.from(document.querySelectorAll(selector)); + if (targetEles.length > 1) { + const retrospect = (node, elems) => { + let ele = node.parentNode; + while (ele) { + const findParentNode = elems.find(item => item === ele); + if (findParentNode) { + ele = null; + return findParentNode; + } else { + ele = ele.parentNode; + } + } + return null; + }; + const elem = retrospect(node, targetEles); + if (elem) { + return elem; + } else { + return document.querySelector(selector); + } + } else { + return document.querySelector(selector); + } + } else { + return selector; + } +}; + +/** + * 2024-06-14 + * liaozhiyang + * 根据控件显示条件 + * label、value通用,title、val给权限管理用的 + */ +export function useConditionFilter() { + + // 通用条件 + const commonConditionOptions = [ + {label: '为空', value: 'empty', val: 'EMPTY'}, + {label: '不为空', value: 'not_empty', val: 'NOT_EMPTY'}, + ] + + // 数值、日期 + const numberConditionOptions = [ + { label: '等于', value: 'eq', val: '=' }, + { label: '在...中', value: 'in', val: 'IN', title: '包含' }, + { label: '不等于', value: 'ne', val: '!=' }, + { label: '大于', value: 'gt', val: '>' }, + { label: '大于等于', value: 'ge', val: '>=' }, + { label: '小于', value: 'lt', val: '<' }, + { label: '小于等于', value: 'le', val: '<=' }, + ...commonConditionOptions, + ]; + + // 文本、密码、多行文本、富文本、markdown + const inputConditionOptions = [ + { label: '等于', value: 'eq', val: '=' }, + { label: '模糊', value: 'like', val: 'LIKE' }, + { label: '以..开始', value: 'right_like', title: '右模糊', val: 'RIGHT_LIKE' }, + { label: '以..结尾', value: 'left_like', title: '左模糊', val: 'LEFT_LIKE' }, + { label: '在...中', value: 'in', val: 'IN', title: '包含' }, + { label: '不等于', value: 'ne', val: '!=' }, + ...commonConditionOptions, + ]; + + // 下拉、单选、多选、开关、用户、部门、关联记录、省市区、popup、popupDict、下拉多选、下拉搜索、分类字典、自定义树 + const selectConditionOptions = [ + { label: '等于', value: 'eq', val: '=' }, + { label: '在...中', value: 'in', val: 'IN', title: '包含' }, + { label: '不等于', value: 'ne', val: '!=' }, + ...commonConditionOptions, + ]; + + const def = [ + { label: '等于', value: 'eq', val: '=' }, + { label: '模糊', value: 'like', val: 'LIKE' }, + { label: '以..开始', value: 'right_like', title: '右模糊', val: 'RIGHT_LIKE' }, + { label: '以..结尾', value: 'left_like', title: '左模糊', val: 'LEFT_LIKE' }, + { label: '在...中', value: 'in', val: 'IN', title: '包含' }, + { label: '不等于', value: 'ne', val: '!=' }, + { label: '大于', value: 'gt', val: '>' }, + { label: '大于等于', value: 'ge', val: '>=' }, + { label: '小于', value: 'lt', val: '<' }, + { label: '小于等于', value: 'le', val: '<=' }, + ...commonConditionOptions, + ]; + + const filterCondition = (data) => { + if (data.view == 'text' && data.fieldType == 'number') { + data.view = 'number'; + } + switch (data.view) { + case 'file': + case 'image': + case 'password': + return commonConditionOptions; + case 'text': + case 'textarea': + case 'umeditor': + case 'markdown': + case 'pca': + case 'popup': + return inputConditionOptions; + case 'list': + case 'radio': + case 'checkbox': + case 'switch': + case 'sel_user': + case 'sel_depart': + case 'link_table': + case 'popup_dict': + case 'list_multi': + case 'sel_search': + case 'cat_tree': + case 'sel_tree': + return selectConditionOptions; + case 'date': + // number是虚拟的 + case 'number': + return numberConditionOptions; + default: + return def; + } + }; + return { filterCondition }; +} +// 获取url中的参数 +export const getUrlParams = (url) => { + const result = { + url: '', + params: {}, + }; + const list = url.split('?'); + result.url = list[0]; + const params = list[1]; + if (params) { + const list = params.split('&'); + list.forEach((ele) => { + const dic = ele.split('='); + const label = dic[0]; + result.params[label] = dic[1]; + }); + } + return result; +}; + +/* 20250325 + * liaozhiyang + * 分割url字符成数组 + * 【issues/7990】图片参数中包含逗号会错误的识别成多张图 + * */ +export const split = (str) => { + if (isString(str)) { + const text = str.trim(); + if (text.startsWith('http')) { + const parts = str.split(','); + const urls: any = []; + let currentUrl = ''; + for (const part of parts) { + if (part.startsWith('http://') || part.startsWith('https://')) { + // 如果遇到新的URL开头,保存当前URL并开始新的URL + if (currentUrl) { + urls.push(currentUrl); + } + currentUrl = part; + } else { + // 否则,是当前URL的一部分(如参数) + currentUrl += ',' + part; + } + } + // 添加最后一个URL + if (currentUrl) { + urls.push(currentUrl); + } + return urls; + } else { + return str.split(','); + } + } + return str; +}; diff --git a/src/utils/is.ts b/src/utils/is.ts new file mode 100644 index 0000000..ec008fb --- /dev/null +++ b/src/utils/is.ts @@ -0,0 +1,108 @@ +const toString = Object.prototype.toString; + +export function is(val: unknown, type: string) { + return toString.call(val) === `[object ${type}]`; +} + +export function isDef(val?: T): val is T { + return typeof val !== 'undefined'; +} + +export function isUnDef(val?: T): val is T { + return !isDef(val); +} + +export function isObject(val: any): val is Record { + return val !== null && is(val, 'Object'); +} + +export function isEmpty(val: T): val is T { + 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 function isDate(val: unknown): val is Date { + return is(val, 'Date'); +} + +export function isNull(val: unknown): val is null { + return val === null; +} + +export function isNullAndUnDef(val: unknown): val is null | undefined { + return isUnDef(val) && isNull(val); +} + +export function isNullOrUnDef(val: unknown): val is null | undefined { + return isUnDef(val) || isNull(val); +} + +export function isNumber(val: unknown): val is number { + return is(val, 'Number'); +} + +export function isPromise(val: any): val is Promise { + // update-begin--author:sunjianlei---date:20211022---for: 不能既是 Promise 又是 Object -------- + return is(val, 'Promise') && isFunction(val.then) && isFunction(val.catch); + // update-end--author:sunjianlei---date:20211022---for: 不能既是 Promise 又是 Object -------- +} + +export function isString(val: unknown): val is string { + return is(val, 'String'); +} + +export function isJsonObjectString(val: string): val is string { + if (!val) { + return false; + } + return val.startsWith('{') && val.endsWith('}'); +} + +export function isFunction(val: unknown): val is Function { + return typeof val === 'function'; +} + +export function isBoolean(val: unknown): val is boolean { + return is(val, 'Boolean'); +} + +export function isRegExp(val: unknown): val is RegExp { + return is(val, 'RegExp'); +} + +export function isArray(val: any): val is Array { + return val && Array.isArray(val); +} + +export function isWindow(val: any): val is Window { + return typeof window !== 'undefined' && is(val, 'Window'); +} + +export function isElement(val: unknown): val is Element { + return isObject(val) && !!val.tagName; +} + +export function isMap(val: unknown): val is Map { + return is(val, 'Map'); +} + +export const isServer = typeof window === 'undefined'; + +export const isClient = !isServer; + +export function isUrl(path: string): boolean { + const reg = + /(((^https?:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+(?::\d+)?|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[\w]*))?)$/; + return reg.test(path); +} diff --git a/src/utils/lib/echarts.ts b/src/utils/lib/echarts.ts new file mode 100644 index 0000000..9b40020 --- /dev/null +++ b/src/utils/lib/echarts.ts @@ -0,0 +1,51 @@ +import * as echarts from 'echarts/core'; + +import { BarChart, LineChart, PieChart, MapChart, PictorialBarChart, RadarChart } from 'echarts/charts'; + +import { + TitleComponent, + TooltipComponent, + GridComponent, + PolarComponent, + AriaComponent, + ParallelComponent, + LegendComponent, + RadarComponent, + ToolboxComponent, + DataZoomComponent, + VisualMapComponent, + TimelineComponent, + CalendarComponent, + GraphicComponent, +} from 'echarts/components'; + +// TODO 如果想换成SVG渲染,就导出SVGRenderer, +// 并且放到 echarts.use 里,注释掉 CanvasRenderer +import { /*SVGRenderer*/ CanvasRenderer } from 'echarts/renderers'; + +echarts.use([ + LegendComponent, + TitleComponent, + TooltipComponent, + GridComponent, + PolarComponent, + AriaComponent, + ParallelComponent, + BarChart, + LineChart, + PieChart, + MapChart, + RadarChart, + // TODO 因为要兼容Online图表自适应打印,所以改成 CanvasRenderer,可能会模糊 + CanvasRenderer, + PictorialBarChart, + RadarComponent, + ToolboxComponent, + DataZoomComponent, + VisualMapComponent, + TimelineComponent, + CalendarComponent, + GraphicComponent, +]); + +export default echarts; diff --git a/src/utils/log.ts b/src/utils/log.ts new file mode 100644 index 0000000..8f79800 --- /dev/null +++ b/src/utils/log.ts @@ -0,0 +1,9 @@ +const projectName = import.meta.env.VITE_GLOB_APP_TITLE; + +export function warn(message: string) { + console.warn(`[${projectName} warn]:${message}`); +} + +export function error(message: string) { + throw new Error(`[${projectName} error]:${message}`); +} diff --git a/src/utils/mitt.ts b/src/utils/mitt.ts new file mode 100644 index 0000000..4b15bba --- /dev/null +++ b/src/utils/mitt.ts @@ -0,0 +1,101 @@ +/** + * copy to https://github.com/developit/mitt + * Expand clear method + */ + +export type EventType = string | symbol; + +// An event handler can take an optional event argument +// and should not return a value +export type Handler = (event?: T) => void; +export type WildcardHandler = (type: EventType, event?: any) => void; + +// An array of all currently registered event handlers for a type +export type EventHandlerList = Array; +export type WildCardEventHandlerList = Array; + +// A map of event types and their corresponding event handlers. +export type EventHandlerMap = Map; + +export interface Emitter { + all: EventHandlerMap; + + on(type: EventType, handler: Handler): void; + on(type: '*', handler: WildcardHandler): void; + + off(type: EventType, handler: Handler): void; + off(type: '*', handler: WildcardHandler): void; + + emit(type: EventType, event?: T): void; + emit(type: '*', event?: any): void; + clear(): void; +} + +/** + * Mitt: Tiny (~200b) functional event emitter / pubsub. + * @name mitt + * @returns {Mitt} + */ +export default function mitt(all?: EventHandlerMap): Emitter { + all = all || new Map(); + + return { + /** + * A Map of event names to registered handler functions. + */ + all, + + /** + * Register an event handler for the given type. + * @param {string|symbol} type Type of event to listen for, or `"*"` for all events + * @param {Function} handler Function to call in response to given event + * @memberOf mitt + */ + on(type: EventType, handler: Handler) { + const handlers = all?.get(type); + const added = handlers && handlers.push(handler); + if (!added) { + all?.set(type, [handler]); + } + }, + + /** + * Remove an event handler for the given type. + * @param {string|symbol} type Type of event to unregister `handler` from, or `"*"` + * @param {Function} handler Handler function to remove + * @memberOf mitt + */ + off(type: EventType, handler: Handler) { + const handlers = all?.get(type); + if (handlers) { + handlers.splice(handlers.indexOf(handler) >>> 0, 1); + } + }, + + /** + * Invoke all handlers for the given type. + * If present, `"*"` handlers are invoked after type-matched handlers. + * + * Note: Manually firing "*" handlers is not supported. + * + * @param {string|symbol} type The event type to invoke + * @param {Any} [evt] Any value (object is recommended and powerful), passed to each handler + * @memberOf mitt + */ + emit(type: EventType, evt: T) { + ((all?.get(type) || []) as EventHandlerList).slice().map((handler) => { + handler(evt); + }); + ((all?.get('*') || []) as WildCardEventHandlerList).slice().map((handler) => { + handler(type, evt); + }); + }, + + /** + * Clear all + */ + clear() { + this.all.clear(); + }, + }; +} diff --git a/src/utils/monorepo/dynamicRouter.ts b/src/utils/monorepo/dynamicRouter.ts new file mode 100644 index 0000000..11f9ab8 --- /dev/null +++ b/src/utils/monorepo/dynamicRouter.ts @@ -0,0 +1,19 @@ +export type DynamicViewsRecord = Record Promise>; + +/** 已注册模块的动态页面 */ +export const packageViews: DynamicViewsRecord = {}; + +/** + * 注册动态路由页面 + * @param getViews 获取该模块下所有页面的方法 + */ +export function registerDynamicRouter(getViews: () => DynamicViewsRecord) { + if (typeof getViews === 'function') { + let dynamicViews = getViews(); + Object.keys(dynamicViews).forEach((key) => { + // 处理动态页面的key,使其可以让路由识别 + let newKey = key.replace('./src/views', '../../views'); + packageViews[newKey] = dynamicViews[key]; + }); + } +} diff --git a/src/utils/monorepo/registerPackages.ts b/src/utils/monorepo/registerPackages.ts new file mode 100644 index 0000000..435bbcf --- /dev/null +++ b/src/utils/monorepo/registerPackages.ts @@ -0,0 +1,49 @@ +import type { App } from 'vue'; +import { warn } from '/@/utils/log'; +import { registerDynamicRouter } from '/@/utils/monorepo/dynamicRouter'; +// 引入模块 +import PACKAGE_JEECG_ONLINE from '@jeecg/online'; +import PACKAGE_JEECG_AIFLOW from '@jeecg/aiflow'; + +export function registerPackages(app: App) { + use(app, PACKAGE_JEECG_ONLINE); + use(app, PACKAGE_JEECG_AIFLOW); +} + +// noinspection JSUnusedGlobalSymbols +const installOptions = { + baseImport, +}; + +/** 注册模块 */ +function use(app: App, pkg) { + app.use(pkg, installOptions); + registerDynamicRouter(pkg.getViews); +} + +// 模块里可使用的import +const importGlobs = [import.meta.glob('../../utils/**/*.{ts,js,tsx}'), import.meta.glob('../../hooks/**/*.{ts,js,tsx}')]; + +/** + * 基础项目导包 + * 目前支持导入如下 + * /@/utils/** + * /@/hooks/** + * + * @param path 文件路径,ts无需输入后缀名。如:/@/utils/common/compUtils + */ +async function baseImport(path: string) { + if (path) { + // 将 /@/ 替换成 ../../ + path = path.replace(/^\/@\//, '../../'); + for (const glob of importGlobs) { + for (const key of Object.keys(glob)) { + if (path === key || `${path}.ts` === key || `${path}.tsx` === key) { + return glob[key](); + } + } + } + warn(`引入失败:${path} 不存在`); + } + return null; +} diff --git a/src/utils/propTypes.ts b/src/utils/propTypes.ts new file mode 100644 index 0000000..16cf9cd --- /dev/null +++ b/src/utils/propTypes.ts @@ -0,0 +1,35 @@ +import { CSSProperties, VNodeChild } from 'vue'; +import { createTypes, VueTypeValidableDef, VueTypesInterface, toValidableType } from 'vue-types'; + +export type VueNode = VNodeChild | JSX.Element; + +type PropTypes = VueTypesInterface & { + readonly style: VueTypeValidableDef; + readonly VNodeChild: VueTypeValidableDef; + // readonly trueBool: VueTypeValidableDef; +}; +const newPropTypes = createTypes({ + func: undefined, + bool: undefined, + string: undefined, + number: undefined, + object: undefined, + integer: undefined, +}) as PropTypes; + +// 从 vue-types v5.0 开始,extend()方法已经废弃,当前已改为官方推荐的ES6+方法 https://dwightjack.github.io/vue-types/advanced/extending-vue-types.html#the-extend-method +class propTypes extends newPropTypes { + // a native-like validator that supports the `.validable` method + static get style() { + return toValidableType('style', { + type: [String, Object], + }); + } + + static get VNodeChild() { + return toValidableType('VNodeChild', { + type: undefined, + }); + } +} +export { propTypes }; diff --git a/src/utils/props.ts b/src/utils/props.ts new file mode 100644 index 0000000..7393d58 --- /dev/null +++ b/src/utils/props.ts @@ -0,0 +1,185 @@ +// copy from element-plus + +import { warn } from 'vue'; +import { isObject } from '@vue/shared'; +import { fromPairs } from 'lodash-es'; +import type { ExtractPropTypes, PropType } from 'vue'; +import type { Mutable } from './types'; + +const wrapperKey = Symbol(); +export type PropWrapper = { [wrapperKey]: T }; + +export const propKey = Symbol(); + +type ResolveProp = ExtractPropTypes<{ + key: { type: T; required: true }; +}>['key']; +type ResolvePropType = ResolveProp extends { type: infer V } ? V : ResolveProp; +type ResolvePropTypeWithReadonly = Readonly extends Readonly> + ? ResolvePropType + : ResolvePropType; + +type IfUnknown = [unknown] extends [T] ? V : T; + +export type BuildPropOption, R, V, C> = { + type?: T; + values?: readonly V[]; + required?: R; + default?: R extends true + ? never + : D extends Record | Array + ? () => D + : (() => D) | D; + validator?: ((val: any) => val is C) | ((val: any) => boolean); +}; + +type _BuildPropType = + | (T extends PropWrapper + ? T[typeof wrapperKey] + : [V] extends [never] + ? ResolvePropTypeWithReadonly + : never) + | V + | C; +export type BuildPropType = _BuildPropType< + IfUnknown, + IfUnknown, + IfUnknown +>; + +type _BuildPropDefault = [T] extends [ + // eslint-disable-next-line @typescript-eslint/ban-types + Record | Array | Function, +] + ? D + : D extends () => T + ? ReturnType + : D; + +export type BuildPropDefault = R extends true + ? { readonly default?: undefined } + : { + readonly default: Exclude extends never + ? undefined + : Exclude<_BuildPropDefault, undefined>; + }; +export type BuildPropReturn = { + readonly type: PropType>; + readonly required: IfUnknown; + readonly validator: ((val: unknown) => boolean) | undefined; + [propKey]: true; +} & BuildPropDefault, IfUnknown, IfUnknown>; + +/** + * @description Build prop. It can better optimize prop types + * @description 生成 prop,能更好地优化类型 + * @example + // limited options + // the type will be PropType<'light' | 'dark'> + buildProp({ + type: String, + values: ['light', 'dark'], + } as const) + * @example + // limited options and other types + // the type will be PropType<'small' | 'medium' | number> + buildProp({ + type: [String, Number], + values: ['small', 'medium'], + validator: (val: unknown): val is number => typeof val === 'number', + } as const) + @link see more: https://github.com/element-plus/element-plus/pull/3341 + */ +export function buildProp< + T = never, + D extends BuildPropType = never, + R extends boolean = false, + V = never, + C = never, +>(option: BuildPropOption, key?: string): BuildPropReturn { + // filter native prop type and nested prop, e.g `null`, `undefined` (from `buildProps`) + if (!isObject(option) || !!option[propKey]) return option as any; + + const { values, required, default: defaultValue, type, validator } = option; + + const _validator = + values || validator + ? (val: unknown) => { + let valid = false; + let allowedValues: unknown[] = []; + + if (values) { + allowedValues = [...values, defaultValue]; + valid ||= allowedValues.includes(val); + } + if (validator) valid ||= validator(val); + + if (!valid && allowedValues.length > 0) { + const allowValuesText = [...new Set(allowedValues)] + .map((value) => JSON.stringify(value)) + .join(', '); + warn( + `Invalid prop: validation failed${ + key ? ` for prop "${key}"` : '' + }. Expected one of [${allowValuesText}], got value ${JSON.stringify(val)}.`, + ); + } + return valid; + } + : undefined; + + return { + type: + typeof type === 'object' && Object.getOwnPropertySymbols(type).includes(wrapperKey) + ? type[wrapperKey] + : type, + required: !!required, + default: defaultValue, + validator: _validator, + [propKey]: true, + } as unknown as BuildPropReturn; +} + +type NativePropType = [((...args: any) => any) | { new (...args: any): any } | undefined | null]; + +export const buildProps = < + O extends { + [K in keyof O]: O[K] extends BuildPropReturn + ? O[K] + : [O[K]] extends NativePropType + ? O[K] + : O[K] extends BuildPropOption + ? D extends BuildPropType + ? BuildPropOption + : never + : never; + }, +>( + props: O, +) => + fromPairs( + Object.entries(props).map(([key, option]) => [key, buildProp(option as any, key)]), + ) as unknown as { + [K in keyof O]: O[K] extends { [propKey]: boolean } + ? O[K] + : [O[K]] extends NativePropType + ? O[K] + : O[K] extends BuildPropOption< + infer T, + // eslint-disable-next-line @typescript-eslint/no-unused-vars + infer _D, + infer R, + infer V, + infer C + > + ? BuildPropReturn + : never; + }; + +export const definePropType = (val: any) => ({ [wrapperKey]: val } as PropWrapper); + +export const keyOf = (arr: T) => Object.keys(arr) as Array; +export const mutable = >(val: T) => + val as Mutable; + +export const componentSize = ['large', 'medium', 'small', 'mini'] as const; diff --git a/src/utils/types.ts b/src/utils/types.ts new file mode 100644 index 0000000..4453ec4 --- /dev/null +++ b/src/utils/types.ts @@ -0,0 +1,42 @@ +// copy from element-plus + +import type { CSSProperties, Plugin } from 'vue'; + +type OptionalKeys> = { + [K in keyof T]: T extends Record ? never : K; +}[keyof T]; + +type RequiredKeys> = Exclude>; + +type MonoArgEmitter = (evt: K, arg?: T[K]) => void; + +type BiArgEmitter = (evt: K, arg: T[K]) => void; + +export type EventEmitter> = MonoArgEmitter> & + BiArgEmitter>; + +export type AnyFunction = (...args: any[]) => T; + +export type PartialReturnType unknown> = Partial>; + +export type SFCWithInstall = T & Plugin; + +export type Nullable = T | null; + +export type RefElement = Nullable; + +export type CustomizedHTMLElement = HTMLElement & T; + +export type Indexable = { + [key: string]: T; +}; + +export type Hash = Indexable; + +export type TimeoutHandle = ReturnType; + +export type ComponentSize = 'large' | 'medium' | 'small' | 'mini'; + +export type StyleValue = string | CSSProperties | Array; + +export type Mutable = { -readonly [P in keyof T]: T[P] }; diff --git a/src/utils/uuid.ts b/src/utils/uuid.ts new file mode 100644 index 0000000..548bcf3 --- /dev/null +++ b/src/utils/uuid.ts @@ -0,0 +1,28 @@ +const hexList: string[] = []; +for (let i = 0; i <= 15; i++) { + hexList[i] = i.toString(16); +} + +export function buildUUID(): string { + let uuid = ''; + for (let i = 1; i <= 36; i++) { + if (i === 9 || i === 14 || i === 19 || i === 24) { + uuid += '-'; + } else if (i === 15) { + uuid += 4; + } else if (i === 20) { + uuid += hexList[(Math.random() * 4) | 8]; + } else { + uuid += hexList[(Math.random() * 16) | 0]; + } + } + return uuid.replace(/-/g, ''); +} + +let unique = 0; +export function buildShortUUID(prefix = ''): string { + const time = Date.now(); + const random = Math.floor(Math.random() * 1000000000); + unique++; + return prefix + '_' + random + unique + String(time); +} diff --git a/src/views/dashboard/Analysis/api.ts b/src/views/dashboard/Analysis/api.ts new file mode 100644 index 0000000..0f40443 --- /dev/null +++ b/src/views/dashboard/Analysis/api.ts @@ -0,0 +1,16 @@ +import { defHttp } from '/@/utils/http/axios'; + +enum Api { + loginfo = '/sys/loginfo', + visitInfo = '/sys/visitInfo', +} +/** + * 日志统计信息 + * @param params + */ +export const getLoginfo = (params) => defHttp.get({ url: Api.loginfo, params }, { isTransformResponse: false }); +/** + * 访问量信息 + * @param params + */ +export const getVisitInfo = (params) => defHttp.get({ url: Api.visitInfo, params }, { isTransformResponse: false }); diff --git a/src/views/dashboard/Analysis/components/BdcTabCard.vue b/src/views/dashboard/Analysis/components/BdcTabCard.vue new file mode 100644 index 0000000..b310af4 --- /dev/null +++ b/src/views/dashboard/Analysis/components/BdcTabCard.vue @@ -0,0 +1,128 @@ + + + + diff --git a/src/views/dashboard/Analysis/components/ChartGroupCard.vue b/src/views/dashboard/Analysis/components/ChartGroupCard.vue new file mode 100644 index 0000000..cf51a1e --- /dev/null +++ b/src/views/dashboard/Analysis/components/ChartGroupCard.vue @@ -0,0 +1,109 @@ + + diff --git a/src/views/dashboard/Analysis/components/GrowCard.vue b/src/views/dashboard/Analysis/components/GrowCard.vue new file mode 100644 index 0000000..af3eb60 --- /dev/null +++ b/src/views/dashboard/Analysis/components/GrowCard.vue @@ -0,0 +1,40 @@ + + diff --git a/src/views/dashboard/Analysis/components/QuickNav.vue b/src/views/dashboard/Analysis/components/QuickNav.vue new file mode 100644 index 0000000..149f426 --- /dev/null +++ b/src/views/dashboard/Analysis/components/QuickNav.vue @@ -0,0 +1,56 @@ + + diff --git a/src/views/dashboard/Analysis/components/SaleTabCard.vue b/src/views/dashboard/Analysis/components/SaleTabCard.vue new file mode 100644 index 0000000..ff69bc7 --- /dev/null +++ b/src/views/dashboard/Analysis/components/SaleTabCard.vue @@ -0,0 +1,87 @@ + + + + diff --git a/src/views/dashboard/Analysis/components/SalesProductPie.vue b/src/views/dashboard/Analysis/components/SalesProductPie.vue new file mode 100644 index 0000000..6dc41fb --- /dev/null +++ b/src/views/dashboard/Analysis/components/SalesProductPie.vue @@ -0,0 +1,63 @@ + + diff --git a/src/views/dashboard/Analysis/components/SiteAnalysis.vue b/src/views/dashboard/Analysis/components/SiteAnalysis.vue new file mode 100644 index 0000000..570861a --- /dev/null +++ b/src/views/dashboard/Analysis/components/SiteAnalysis.vue @@ -0,0 +1,33 @@ + + diff --git a/src/views/dashboard/Analysis/components/VisitAnalysis.vue b/src/views/dashboard/Analysis/components/VisitAnalysis.vue new file mode 100644 index 0000000..a694c95 --- /dev/null +++ b/src/views/dashboard/Analysis/components/VisitAnalysis.vue @@ -0,0 +1,104 @@ + + diff --git a/src/views/dashboard/Analysis/components/VisitAnalysisBar.vue b/src/views/dashboard/Analysis/components/VisitAnalysisBar.vue new file mode 100644 index 0000000..4139be3 --- /dev/null +++ b/src/views/dashboard/Analysis/components/VisitAnalysisBar.vue @@ -0,0 +1,51 @@ + + diff --git a/src/views/dashboard/Analysis/components/VisitRadar.vue b/src/views/dashboard/Analysis/components/VisitRadar.vue new file mode 100644 index 0000000..bc3eb5f --- /dev/null +++ b/src/views/dashboard/Analysis/components/VisitRadar.vue @@ -0,0 +1,94 @@ + + diff --git a/src/views/dashboard/Analysis/components/VisitSource.vue b/src/views/dashboard/Analysis/components/VisitSource.vue new file mode 100644 index 0000000..7b8e32a --- /dev/null +++ b/src/views/dashboard/Analysis/components/VisitSource.vue @@ -0,0 +1,80 @@ + + diff --git a/src/views/dashboard/Analysis/components/props.ts b/src/views/dashboard/Analysis/components/props.ts new file mode 100644 index 0000000..8643650 --- /dev/null +++ b/src/views/dashboard/Analysis/components/props.ts @@ -0,0 +1,16 @@ +import { PropType } from 'vue'; + +export interface BasicProps { + width: string; + height: string; +} +export const basicProps = { + width: { + type: String as PropType, + default: '100%', + }, + height: { + type: String as PropType, + default: '280px', + }, +}; diff --git a/src/views/dashboard/Analysis/data.ts b/src/views/dashboard/Analysis/data.ts new file mode 100644 index 0000000..ff5c277 --- /dev/null +++ b/src/views/dashboard/Analysis/data.ts @@ -0,0 +1,219 @@ +export interface GrowCardItem { + icon: string; + title: string; + value?: number; + total: number; + color?: string; + action?: string; + footer?: string; +} + +export const growCardList: GrowCardItem[] = [ + { + title: '访问数', + icon: 'visit-count|svg', + value: 2000, + total: 120000, + color: 'green', + action: '月', + }, + { + title: '成交额', + icon: 'total-sales|svg', + value: 20000, + total: 500000, + color: 'blue', + action: '月', + }, + { + title: '下载数', + icon: 'download-count|svg', + value: 8000, + total: 120000, + color: 'orange', + action: '周', + }, + { + title: '成交数', + icon: 'transaction|svg', + value: 5000, + total: 50000, + color: 'purple', + action: '年', + }, +]; + +export const chartCardList: GrowCardItem[] = [ + { + title: '总销售额', + icon: 'visit-count|svg', + total: 126560, + value: 234.56, + footer: '日均销售额', + }, + { + title: '订单量', + icon: 'total-sales|svg', + value: 1234, + total: 8846, + color: 'blue', + footer: '日订单量', + }, + { + title: '支付笔数', + icon: 'download-count|svg', + value: 60, + total: 6560, + color: 'orange', + footer: '转化率', + }, + { + title: '运营活动效果', + icon: 'transaction|svg', + total: 78, + }, +]; +export const bdcCardList: GrowCardItem[] = [ + { + title: '受理量', + icon: 'ant-design:info-circle-outlined', + total: 100, + value: 60, + footer: '今日受理量', + }, + { + title: '办结量', + icon: 'ant-design:info-circle-outlined', + value: 54, + total: 87, + color: 'blue', + footer: '今日办结量', + }, + { + title: '用户受理量', + icon: 'ant-design:info-circle-outlined', + value: 13, + total: 15, + color: 'orange', + footer: '用户今日受理量', + }, + { + title: '用户办结量', + icon: 'ant-design:info-circle-outlined', + total: 9, + value: 7, + footer: '用户今日办结量', + }, +]; + +export const table = { + dataSource: [ + { reBizCode: '1', type: '转移登记', acceptBy: '张三', acceptDate: '2019-01-22', curNode: '任务分派', flowRate: 60 }, + { reBizCode: '2', type: '抵押登记', acceptBy: '李四', acceptDate: '2019-01-23', curNode: '领导审核', flowRate: 30 }, + { reBizCode: '3', type: '转移登记', acceptBy: '王武', acceptDate: '2019-01-25', curNode: '任务处理', flowRate: 20 }, + { reBizCode: '4', type: '转移登记', acceptBy: '赵楼', acceptDate: '2019-11-22', curNode: '部门审核', flowRate: 80 }, + { reBizCode: '5', type: '转移登记', acceptBy: '钱就', acceptDate: '2019-12-12', curNode: '任务分派', flowRate: 90 }, + { reBizCode: '6', type: '转移登记', acceptBy: '孙吧', acceptDate: '2019-03-06', curNode: '任务处理', flowRate: 10 }, + { reBizCode: '7', type: '抵押登记', acceptBy: '周大', acceptDate: '2019-04-13', curNode: '任务分派', flowRate: 100 }, + { reBizCode: '8', type: '抵押登记', acceptBy: '吴二', acceptDate: '2019-05-09', curNode: '任务上报', flowRate: 50 }, + { reBizCode: '9', type: '抵押登记', acceptBy: '郑爽', acceptDate: '2019-07-12', curNode: '任务处理', flowRate: 63 }, + { reBizCode: '20', type: '抵押登记', acceptBy: '林有', acceptDate: '2019-12-12', curNode: '任务打回', flowRate: 59 }, + { reBizCode: '11', type: '转移登记', acceptBy: '码云', acceptDate: '2019-09-10', curNode: '任务签收', flowRate: 87 }, + ], + columns: [ + { + title: '业务号', + align: 'center', + dataIndex: 'reBizCode', + }, + { + title: '业务类型', + align: 'center', + dataIndex: 'type', + }, + { + title: '受理人', + align: 'center', + dataIndex: 'acceptBy', + }, + { + title: '受理时间', + align: 'center', + dataIndex: 'acceptDate', + }, + { + title: '当前节点', + align: 'center', + dataIndex: 'curNode', + }, + { + title: '办理时长', + align: 'center', + dataIndex: 'flowRate', + }, + ], + ipagination: { + current: 1, + pageSize: 5, + pageSizeOptions: ['10', '20', '30'], + showTotal: (total, range) => { + return range[0] + '-' + range[1] + ' 共' + total + '条'; + }, + showQuickJumper: true, + showSizeChanger: true, + total: 0, + }, +}; +export const table1 = { + dataSource: [ + { reBizCode: 'A001', type: '转移登记', acceptBy: '张四', acceptDate: '2019-01-22', curNode: '任务分派', flowRate: 12 }, + { reBizCode: 'A002', type: '抵押登记', acceptBy: '李吧', acceptDate: '2019-01-23', curNode: '任务签收', flowRate: 3 }, + { reBizCode: 'A003', type: '转移登记', acceptBy: '王三', acceptDate: '2019-01-25', curNode: '任务处理', flowRate: 24 }, + { reBizCode: 'A004', type: '转移登记', acceptBy: '赵二', acceptDate: '2019-11-22', curNode: '部门审核', flowRate: 10 }, + { reBizCode: 'A005', type: '转移登记', acceptBy: '钱大', acceptDate: '2019-12-12', curNode: '任务签收', flowRate: 8 }, + { reBizCode: 'A006', type: '转移登记', acceptBy: '孙就', acceptDate: '2019-03-06', curNode: '任务处理', flowRate: 10 }, + { reBizCode: 'A007', type: '抵押登记', acceptBy: '周晕', acceptDate: '2019-04-13', curNode: '部门审核', flowRate: 24 }, + { reBizCode: 'A008', type: '抵押登记', acceptBy: '吴有', acceptDate: '2019-05-09', curNode: '部门审核', flowRate: 30 }, + { reBizCode: 'A009', type: '抵押登记', acceptBy: '郑武', acceptDate: '2019-07-12', curNode: '任务分派', flowRate: 1 }, + { reBizCode: 'A0010', type: '抵押登记', acceptBy: '林爽', acceptDate: '2019-12-12', curNode: '部门审核', flowRate: 16 }, + { reBizCode: 'A0011', type: '转移登记', acceptBy: '码楼', acceptDate: '2019-09-10', curNode: '部门审核', flowRate: 7 }, + ], + columns: [ + { + title: '业务号', + align: 'center', + dataIndex: 'reBizCode', + }, + { + title: '受理人', + align: 'center', + dataIndex: 'acceptBy', + }, + { + title: '发起时间', + align: 'center', + dataIndex: 'acceptDate', + }, + { + title: '当前节点', + align: 'center', + dataIndex: 'curNode', + }, + { + title: '超时时间', + align: 'center', + dataIndex: 'flowRate', + }, + ], + ipagination: { + current: 1, + pageSize: 5, + pageSizeOptions: ['10', '20', '30'], + showTotal: (total, range) => { + return range[0] + '-' + range[1] + ' 共' + total + '条'; + }, + showQuickJumper: true, + showSizeChanger: true, + total: 0, + }, +}; diff --git a/src/views/dashboard/Analysis/homePage/IndexBdc.vue b/src/views/dashboard/Analysis/homePage/IndexBdc.vue new file mode 100644 index 0000000..0bb8034 --- /dev/null +++ b/src/views/dashboard/Analysis/homePage/IndexBdc.vue @@ -0,0 +1,244 @@ + + + + diff --git a/src/views/dashboard/Analysis/homePage/IndexChart.vue b/src/views/dashboard/Analysis/homePage/IndexChart.vue new file mode 100644 index 0000000..4f4fe77 --- /dev/null +++ b/src/views/dashboard/Analysis/homePage/IndexChart.vue @@ -0,0 +1,149 @@ + + + + diff --git a/src/views/dashboard/Analysis/homePage/IndexDef.vue b/src/views/dashboard/Analysis/homePage/IndexDef.vue new file mode 100644 index 0000000..48dec86 --- /dev/null +++ b/src/views/dashboard/Analysis/homePage/IndexDef.vue @@ -0,0 +1,25 @@ + + diff --git a/src/views/dashboard/Analysis/homePage/IndexTask.vue b/src/views/dashboard/Analysis/homePage/IndexTask.vue new file mode 100644 index 0000000..42bc8b7 --- /dev/null +++ b/src/views/dashboard/Analysis/homePage/IndexTask.vue @@ -0,0 +1,422 @@ + + + + + diff --git a/src/views/dashboard/Analysis/index.vue b/src/views/dashboard/Analysis/index.vue new file mode 100644 index 0000000..85bd3dd --- /dev/null +++ b/src/views/dashboard/Analysis/index.vue @@ -0,0 +1,24 @@ + + diff --git a/src/views/dashboard/ai/components/aide/images/ai.png b/src/views/dashboard/ai/components/aide/images/ai.png new file mode 100644 index 0000000..59448da Binary files /dev/null and b/src/views/dashboard/ai/components/aide/images/ai.png differ diff --git a/src/views/dashboard/ai/components/aide/index.vue b/src/views/dashboard/ai/components/aide/index.vue new file mode 100644 index 0000000..25ebb29 --- /dev/null +++ b/src/views/dashboard/ai/components/aide/index.vue @@ -0,0 +1,77 @@ + + + + + diff --git a/src/views/dashboard/ai/index.vue b/src/views/dashboard/ai/index.vue new file mode 100644 index 0000000..9562efb --- /dev/null +++ b/src/views/dashboard/ai/index.vue @@ -0,0 +1,24 @@ + + + + + diff --git a/src/views/dashboard/workbench/components/DynamicInfo.vue b/src/views/dashboard/workbench/components/DynamicInfo.vue new file mode 100644 index 0000000..4be8f1f --- /dev/null +++ b/src/views/dashboard/workbench/components/DynamicInfo.vue @@ -0,0 +1,31 @@ + + diff --git a/src/views/dashboard/workbench/components/ProjectCard.vue b/src/views/dashboard/workbench/components/ProjectCard.vue new file mode 100644 index 0000000..0957031 --- /dev/null +++ b/src/views/dashboard/workbench/components/ProjectCard.vue @@ -0,0 +1,34 @@ + + diff --git a/src/views/dashboard/workbench/components/QuickNav.vue b/src/views/dashboard/workbench/components/QuickNav.vue new file mode 100644 index 0000000..4e004d1 --- /dev/null +++ b/src/views/dashboard/workbench/components/QuickNav.vue @@ -0,0 +1,19 @@ + + diff --git a/src/views/dashboard/workbench/components/SaleRadar.vue b/src/views/dashboard/workbench/components/SaleRadar.vue new file mode 100644 index 0000000..d623ea3 --- /dev/null +++ b/src/views/dashboard/workbench/components/SaleRadar.vue @@ -0,0 +1,94 @@ + + diff --git a/src/views/dashboard/workbench/components/WorkbenchHeader.vue b/src/views/dashboard/workbench/components/WorkbenchHeader.vue new file mode 100644 index 0000000..9a75adc --- /dev/null +++ b/src/views/dashboard/workbench/components/WorkbenchHeader.vue @@ -0,0 +1,33 @@ + + diff --git a/src/views/dashboard/workbench/components/data.ts b/src/views/dashboard/workbench/components/data.ts new file mode 100644 index 0000000..50a5756 --- /dev/null +++ b/src/views/dashboard/workbench/components/data.ts @@ -0,0 +1,156 @@ +interface GroupItem { + title: string; + icon: string; + color: string; + desc: string; + date: string; + group: string; +} + +interface NavItem { + title: string; + icon: string; + color: string; +} + +interface DynamicInfoItem { + avatar: string; + name: string; + date: string; + desc: string; +} + +export const navItems: NavItem[] = [ + { + title: '首页', + icon: 'ion:home-outline', + color: '#1fdaca', + }, + { + title: '仪表盘', + icon: 'ion:grid-outline', + color: '#bf0c2c', + }, + { + title: '组件', + icon: 'ion:layers-outline', + color: '#e18525', + }, + { + title: '系统管理', + icon: 'ion:settings-outline', + color: '#3fb27f', + }, + { + title: '权限管理', + icon: 'ion:key-outline', + color: '#4daf1bc9', + }, + { + title: '图表', + icon: 'ion:bar-chart-outline', + color: '#00d8ff', + }, +]; + +export const dynamicInfoItems: DynamicInfoItem[] = [ + { + avatar: 'dynamic-avatar-1|svg', + name: '威廉', + date: '刚刚', + desc: `在 开源组 创建了项目 Vue`, + }, + { + avatar: 'dynamic-avatar-2|svg', + name: '艾文', + date: '1个小时前', + desc: `关注了 威廉 `, + }, + { + avatar: 'dynamic-avatar-3|svg', + name: '克里斯', + date: '1天前', + desc: `发布了 个人动态 `, + }, + { + avatar: 'dynamic-avatar-4|svg', + name: 'Jeecg', + date: '2天前', + desc: `发表文章 如何编写一个Vite插件 `, + }, + { + avatar: 'dynamic-avatar-5|svg', + name: '皮特', + date: '3天前', + desc: `回复了 杰克 的问题 如何进行项目优化?`, + }, + { + avatar: 'dynamic-avatar-6|svg', + name: '杰克', + date: '1周前', + desc: `关闭了问题 如何运行项目 `, + }, + { + avatar: 'dynamic-avatar-1|svg', + name: '威廉', + date: '1周前', + desc: `发布了 个人动态 `, + }, + { + avatar: 'dynamic-avatar-1|svg', + name: '威廉', + date: '2021-04-01 20:00', + desc: `推送了代码到 Github`, + }, +]; + +export const groupItems: GroupItem[] = [ + { + title: 'Github', + icon: 'carbon:logo-github', + color: '', + desc: '不要等待机会,而要创造机会。', + group: '开源组', + date: '2021-04-01', + }, + { + title: 'Vue', + icon: 'ion:logo-vue', + color: '#3fb27f', + desc: '现在的你决定将来的你。', + group: '算法组', + date: '2021-04-01', + }, + { + title: 'Html5', + icon: 'ion:logo-html5', + color: '#e18525', + desc: '没有什么才能比努力更重要。', + group: '上班摸鱼', + date: '2021-04-01', + }, + { + title: 'Angular', + icon: 'ion:logo-angular', + color: '#bf0c2c', + desc: '热情和欲望可以突破一切难关。', + group: 'UI', + date: '2021-04-01', + }, + { + title: 'React', + icon: 'bx:bxl-react', + color: '#00d8ff', + desc: '健康的身体是实目标的基石。', + group: '技术牛', + date: '2021-04-01', + }, + { + title: 'Js', + icon: 'ion:logo-javascript', + color: '#4daf1bc9', + desc: '路是走出来的,而不是空想出来的。', + group: '架构组', + date: '2021-04-01', + }, +]; diff --git a/src/views/dashboard/workbench/index.vue b/src/views/dashboard/workbench/index.vue new file mode 100644 index 0000000..cc17cae --- /dev/null +++ b/src/views/dashboard/workbench/index.vue @@ -0,0 +1,36 @@ + + diff --git a/src/views/demo/charts/Line.vue b/src/views/demo/charts/Line.vue new file mode 100644 index 0000000..c078942 --- /dev/null +++ b/src/views/demo/charts/Line.vue @@ -0,0 +1,117 @@ + + diff --git a/src/views/demo/charts/Map.vue b/src/views/demo/charts/Map.vue new file mode 100644 index 0000000..e07344c --- /dev/null +++ b/src/views/demo/charts/Map.vue @@ -0,0 +1,75 @@ + + diff --git a/src/views/demo/charts/Pie.vue b/src/views/demo/charts/Pie.vue new file mode 100644 index 0000000..4f6110d --- /dev/null +++ b/src/views/demo/charts/Pie.vue @@ -0,0 +1,135 @@ + + diff --git a/src/views/demo/charts/SaleRadar.vue b/src/views/demo/charts/SaleRadar.vue new file mode 100644 index 0000000..0a4d6d7 --- /dev/null +++ b/src/views/demo/charts/SaleRadar.vue @@ -0,0 +1,100 @@ + + diff --git a/src/views/demo/charts/china.json b/src/views/demo/charts/china.json new file mode 100644 index 0000000..96d37e5 --- /dev/null +++ b/src/views/demo/charts/china.json @@ -0,0 +1,839 @@ +{ + "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/views/demo/charts/data.ts b/src/views/demo/charts/data.ts new file mode 100644 index 0000000..547c089 --- /dev/null +++ b/src/views/demo/charts/data.ts @@ -0,0 +1,189 @@ +export const mapData: any = [ + { + name: '北京', + value: Math.round(Math.random() * 1000), + tipData: [Math.round(Math.random() * 1000), Math.round(Math.random() * 1000)], + }, + { + name: '天津', + value: Math.round(Math.random() * 1000), + tipData: [Math.round(Math.random() * 1000), Math.round(Math.random() * 1000)], + }, + { + name: '上海', + value: Math.round(Math.random() * 1000), + tipData: [Math.round(Math.random() * 1000), Math.round(Math.random() * 1000)], + }, + { + name: '重庆', + value: Math.round(Math.random() * 1000), + tipData: [Math.round(Math.random() * 1000), Math.round(Math.random() * 1000)], + }, + { + name: '河北', + value: Math.round(Math.random() * 1000), + tipData: [Math.round(Math.random() * 1000), Math.round(Math.random() * 1000)], + }, + { + name: '河南', + value: Math.round(Math.random() * 1000), + tipData: [Math.round(Math.random() * 1000), Math.round(Math.random() * 1000)], + }, + { + name: '云南', + value: Math.round(Math.random() * 1000), + tipData: [Math.round(Math.random() * 1000), Math.round(Math.random() * 1000)], + }, + { + name: '辽宁', + value: Math.round(Math.random() * 1000), + tipData: [Math.round(Math.random() * 1000), Math.round(Math.random() * 1000)], + }, + { + name: '黑龙江', + value: Math.round(Math.random() * 1000), + tipData: [Math.round(Math.random() * 1000), Math.round(Math.random() * 1000)], + }, + { + name: '湖南', + value: Math.round(Math.random() * 1000), + tipData: [Math.round(Math.random() * 1000), Math.round(Math.random() * 1000)], + }, + { + name: '安徽', + value: Math.round(Math.random() * 1000), + tipData: [Math.round(Math.random() * 1000), Math.round(Math.random() * 1000)], + }, + { + name: '山东', + value: Math.round(Math.random() * 1000), + tipData: [Math.round(Math.random() * 1000), Math.round(Math.random() * 1000)], + }, + { + name: '新疆', + value: Math.round(Math.random() * 1000), + tipData: [Math.round(Math.random() * 1000), Math.round(Math.random() * 1000)], + }, + { + name: '江苏', + value: Math.round(Math.random() * 1000), + tipData: [Math.round(Math.random() * 1000), Math.round(Math.random() * 1000)], + }, + { + name: '浙江', + value: Math.round(Math.random() * 1000), + tipData: [Math.round(Math.random() * 1000), Math.round(Math.random() * 1000)], + }, + { + name: '江西', + value: Math.round(Math.random() * 1000), + tipData: [Math.round(Math.random() * 1000), Math.round(Math.random() * 1000)], + }, + { + name: '湖北', + value: Math.round(Math.random() * 1000), + tipData: [Math.round(Math.random() * 1000), Math.round(Math.random() * 1000)], + }, + { + name: '广西', + value: Math.round(Math.random() * 1000), + tipData: [Math.round(Math.random() * 1000), Math.round(Math.random() * 1000)], + }, + { + name: '甘肃', + value: Math.round(Math.random() * 1000), + tipData: [Math.round(Math.random() * 1000), Math.round(Math.random() * 1000)], + }, + { + name: '山西', + value: Math.round(Math.random() * 1000), + tipData: [Math.round(Math.random() * 1000), Math.round(Math.random() * 1000)], + }, + { + name: '内蒙古', + value: Math.round(Math.random() * 1000), + tipData: [Math.round(Math.random() * 1000), Math.round(Math.random() * 1000)], + }, + { + name: '陕西', + value: Math.round(Math.random() * 1000), + tipData: [Math.round(Math.random() * 1000), Math.round(Math.random() * 1000)], + }, + { + name: '吉林', + value: Math.round(Math.random() * 1000), + tipData: [Math.round(Math.random() * 1000), Math.round(Math.random() * 1000)], + }, + { + name: '福建', + value: Math.round(Math.random() * 1000), + tipData: [Math.round(Math.random() * 1000), Math.round(Math.random() * 1000)], + }, + { + name: '贵州', + value: Math.round(Math.random() * 1000), + tipData: [Math.round(Math.random() * 1000), Math.round(Math.random() * 1000)], + }, + { + name: '广东', + value: Math.round(Math.random() * 1000), + tipData: [Math.round(Math.random() * 1000), Math.round(Math.random() * 1000)], + }, + { + name: '青海', + value: Math.round(Math.random() * 1000), + tipData: [Math.round(Math.random() * 1000), Math.round(Math.random() * 1000)], + }, + { + name: '西藏', + value: Math.round(Math.random() * 1000), + tipData: [Math.round(Math.random() * 1000), Math.round(Math.random() * 1000)], + }, + { + name: '四川', + value: Math.round(Math.random() * 1000), + tipData: [Math.round(Math.random() * 1000), Math.round(Math.random() * 1000)], + }, + { + name: '宁夏', + value: Math.round(Math.random() * 1000), + tipData: [Math.round(Math.random() * 1000), Math.round(Math.random() * 1000)], + }, + { + name: '海南', + value: Math.round(Math.random() * 1000), + tipData: [Math.round(Math.random() * 1000), Math.round(Math.random() * 1000)], + }, + { + name: '台湾', + value: Math.round(Math.random() * 1000), + tipData: [Math.round(Math.random() * 1000), Math.round(Math.random() * 1000)], + }, + { + name: '香港', + value: Math.round(Math.random() * 1000), + tipData: [Math.round(Math.random() * 1000), Math.round(Math.random() * 1000)], + }, + { + name: '澳门', + value: Math.round(Math.random() * 1000), + tipData: [Math.round(Math.random() * 1000), Math.round(Math.random() * 1000)], + }, +]; + +export const getLineData = (() => { + const category: any[] = []; + let dottedBase = +new Date(); + const lineData: any[] = []; + const barData: any[] = []; + + for (let i = 0; i < 20; i++) { + const date = new Date((dottedBase += 1000 * 3600 * 24)); + category.push([date.getFullYear(), date.getMonth() + 1, date.getDate()].join('-')); + const b = Math.random() * 200; + const d = Math.random() * 200; + barData.push(b); + lineData.push(d + b); + } + return { barData, category, lineData }; +})(); diff --git a/src/views/demo/charts/map/Baidu.vue b/src/views/demo/charts/map/Baidu.vue new file mode 100644 index 0000000..b126ae6 --- /dev/null +++ b/src/views/demo/charts/map/Baidu.vue @@ -0,0 +1,45 @@ + + diff --git a/src/views/demo/charts/map/Gaode.vue b/src/views/demo/charts/map/Gaode.vue new file mode 100644 index 0000000..52728b8 --- /dev/null +++ b/src/views/demo/charts/map/Gaode.vue @@ -0,0 +1,47 @@ + + diff --git a/src/views/demo/charts/map/Google.vue b/src/views/demo/charts/map/Google.vue new file mode 100644 index 0000000..bc86d15 --- /dev/null +++ b/src/views/demo/charts/map/Google.vue @@ -0,0 +1,52 @@ + + diff --git a/src/views/demo/codemirror/index.vue b/src/views/demo/codemirror/index.vue new file mode 100644 index 0000000..fe17d91 --- /dev/null +++ b/src/views/demo/codemirror/index.vue @@ -0,0 +1,67 @@ + + + + + diff --git a/src/views/demo/comp/button/index.vue b/src/views/demo/comp/button/index.vue new file mode 100644 index 0000000..dda3462 --- /dev/null +++ b/src/views/demo/comp/button/index.vue @@ -0,0 +1,110 @@ + + diff --git a/src/views/demo/comp/card-list/index.vue b/src/views/demo/comp/card-list/index.vue new file mode 100644 index 0000000..f13af04 --- /dev/null +++ b/src/views/demo/comp/card-list/index.vue @@ -0,0 +1,32 @@ + + diff --git a/src/views/demo/comp/count-to/index.vue b/src/views/demo/comp/count-to/index.vue new file mode 100644 index 0000000..12b3ff3 --- /dev/null +++ b/src/views/demo/comp/count-to/index.vue @@ -0,0 +1,42 @@ + + + diff --git a/src/views/demo/comp/cropper/index.vue b/src/views/demo/comp/cropper/index.vue new file mode 100644 index 0000000..cac50fa --- /dev/null +++ b/src/views/demo/comp/cropper/index.vue @@ -0,0 +1,94 @@ + + + + diff --git a/src/views/demo/comp/desc/index.vue b/src/views/demo/comp/desc/index.vue new file mode 100644 index 0000000..f00c3c2 --- /dev/null +++ b/src/views/demo/comp/desc/index.vue @@ -0,0 +1,79 @@ + + diff --git a/src/views/demo/comp/drawer/Drawer1.vue b/src/views/demo/comp/drawer/Drawer1.vue new file mode 100644 index 0000000..7f29613 --- /dev/null +++ b/src/views/demo/comp/drawer/Drawer1.vue @@ -0,0 +1,13 @@ + + diff --git a/src/views/demo/comp/drawer/Drawer2.vue b/src/views/demo/comp/drawer/Drawer2.vue new file mode 100644 index 0000000..020b298 --- /dev/null +++ b/src/views/demo/comp/drawer/Drawer2.vue @@ -0,0 +1,17 @@ + + diff --git a/src/views/demo/comp/drawer/Drawer3.vue b/src/views/demo/comp/drawer/Drawer3.vue new file mode 100644 index 0000000..b8944f4 --- /dev/null +++ b/src/views/demo/comp/drawer/Drawer3.vue @@ -0,0 +1,35 @@ + + diff --git a/src/views/demo/comp/drawer/Drawer4.vue b/src/views/demo/comp/drawer/Drawer4.vue new file mode 100644 index 0000000..454156e --- /dev/null +++ b/src/views/demo/comp/drawer/Drawer4.vue @@ -0,0 +1,53 @@ + + diff --git a/src/views/demo/comp/drawer/Drawer5.vue b/src/views/demo/comp/drawer/Drawer5.vue new file mode 100644 index 0000000..5f0f6fe --- /dev/null +++ b/src/views/demo/comp/drawer/Drawer5.vue @@ -0,0 +1,13 @@ + + diff --git a/src/views/demo/comp/drawer/index.vue b/src/views/demo/comp/drawer/index.vue new file mode 100644 index 0000000..44f1e26 --- /dev/null +++ b/src/views/demo/comp/drawer/index.vue @@ -0,0 +1,69 @@ + + diff --git a/src/views/demo/comp/lazy/TargetContent.vue b/src/views/demo/comp/lazy/TargetContent.vue new file mode 100644 index 0000000..e098254 --- /dev/null +++ b/src/views/demo/comp/lazy/TargetContent.vue @@ -0,0 +1,19 @@ + + diff --git a/src/views/demo/comp/lazy/Transition.vue b/src/views/demo/comp/lazy/Transition.vue new file mode 100644 index 0000000..420dd98 --- /dev/null +++ b/src/views/demo/comp/lazy/Transition.vue @@ -0,0 +1,77 @@ + + + diff --git a/src/views/demo/comp/lazy/index.vue b/src/views/demo/comp/lazy/index.vue new file mode 100644 index 0000000..426cc3a --- /dev/null +++ b/src/views/demo/comp/lazy/index.vue @@ -0,0 +1,52 @@ + + + diff --git a/src/views/demo/comp/loading/index.vue b/src/views/demo/comp/loading/index.vue new file mode 100644 index 0000000..f7ac1e8 --- /dev/null +++ b/src/views/demo/comp/loading/index.vue @@ -0,0 +1,101 @@ + + diff --git a/src/views/demo/comp/modal/Modal1.vue b/src/views/demo/comp/modal/Modal1.vue new file mode 100644 index 0000000..f9dfdca --- /dev/null +++ b/src/views/demo/comp/modal/Modal1.vue @@ -0,0 +1,58 @@ + + + diff --git a/src/views/demo/comp/modal/Modal2.vue b/src/views/demo/comp/modal/Modal2.vue new file mode 100644 index 0000000..da9581d --- /dev/null +++ b/src/views/demo/comp/modal/Modal2.vue @@ -0,0 +1,23 @@ + + diff --git a/src/views/demo/comp/modal/Modal3.vue b/src/views/demo/comp/modal/Modal3.vue new file mode 100644 index 0000000..2ddd583 --- /dev/null +++ b/src/views/demo/comp/modal/Modal3.vue @@ -0,0 +1,15 @@ + + diff --git a/src/views/demo/comp/modal/Modal4.vue b/src/views/demo/comp/modal/Modal4.vue new file mode 100644 index 0000000..90894ea --- /dev/null +++ b/src/views/demo/comp/modal/Modal4.vue @@ -0,0 +1,81 @@ + + diff --git a/src/views/demo/comp/modal/index.vue b/src/views/demo/comp/modal/index.vue new file mode 100644 index 0000000..21137d9 --- /dev/null +++ b/src/views/demo/comp/modal/index.vue @@ -0,0 +1,112 @@ + + diff --git a/src/views/demo/comp/qrcode/index.vue b/src/views/demo/comp/qrcode/index.vue new file mode 100644 index 0000000..1ab6d9f --- /dev/null +++ b/src/views/demo/comp/qrcode/index.vue @@ -0,0 +1,117 @@ + + + diff --git a/src/views/demo/comp/scroll/Action.vue b/src/views/demo/comp/scroll/Action.vue new file mode 100644 index 0000000..78148a1 --- /dev/null +++ b/src/views/demo/comp/scroll/Action.vue @@ -0,0 +1,59 @@ + + + diff --git a/src/views/demo/comp/scroll/VirtualScroll.vue b/src/views/demo/comp/scroll/VirtualScroll.vue new file mode 100644 index 0000000..f7ebc3b --- /dev/null +++ b/src/views/demo/comp/scroll/VirtualScroll.vue @@ -0,0 +1,64 @@ + + + diff --git a/src/views/demo/comp/scroll/index.vue b/src/views/demo/comp/scroll/index.vue new file mode 100644 index 0000000..b9bb651 --- /dev/null +++ b/src/views/demo/comp/scroll/index.vue @@ -0,0 +1,31 @@ + + + diff --git a/src/views/demo/comp/strength-meter/index.vue b/src/views/demo/comp/strength-meter/index.vue new file mode 100644 index 0000000..a5c6293 --- /dev/null +++ b/src/views/demo/comp/strength-meter/index.vue @@ -0,0 +1,32 @@ + + + + diff --git a/src/views/demo/comp/time/index.vue b/src/views/demo/comp/time/index.vue new file mode 100644 index 0000000..49f6c57 --- /dev/null +++ b/src/views/demo/comp/time/index.vue @@ -0,0 +1,44 @@ + + diff --git a/src/views/demo/comp/transition/index.vue b/src/views/demo/comp/transition/index.vue new file mode 100644 index 0000000..177a4bc --- /dev/null +++ b/src/views/demo/comp/transition/index.vue @@ -0,0 +1,91 @@ + + + diff --git a/src/views/demo/comp/upload/index.vue b/src/views/demo/comp/upload/index.vue new file mode 100644 index 0000000..c9091e6 --- /dev/null +++ b/src/views/demo/comp/upload/index.vue @@ -0,0 +1,54 @@ + + diff --git a/src/views/demo/comp/verify/Rotate.vue b/src/views/demo/comp/verify/Rotate.vue new file mode 100644 index 0000000..1ef552d --- /dev/null +++ b/src/views/demo/comp/verify/Rotate.vue @@ -0,0 +1,33 @@ + + + diff --git a/src/views/demo/comp/verify/index.vue b/src/views/demo/comp/verify/index.vue new file mode 100644 index 0000000..aa93473 --- /dev/null +++ b/src/views/demo/comp/verify/index.vue @@ -0,0 +1,97 @@ + + + diff --git a/src/views/demo/document/form/BasicFiledsLayotForm.vue b/src/views/demo/document/form/BasicFiledsLayotForm.vue new file mode 100644 index 0000000..088a692 --- /dev/null +++ b/src/views/demo/document/form/BasicFiledsLayotForm.vue @@ -0,0 +1,81 @@ + + + + + + diff --git a/src/views/demo/document/form/BasicFixedWidthForm.vue b/src/views/demo/document/form/BasicFixedWidthForm.vue new file mode 100644 index 0000000..59011a4 --- /dev/null +++ b/src/views/demo/document/form/BasicFixedWidthForm.vue @@ -0,0 +1,70 @@ + + + + + + diff --git a/src/views/demo/document/form/BasicFormAdd.vue b/src/views/demo/document/form/BasicFormAdd.vue new file mode 100644 index 0000000..fc85df2 --- /dev/null +++ b/src/views/demo/document/form/BasicFormAdd.vue @@ -0,0 +1,143 @@ + + + + + + diff --git a/src/views/demo/document/form/BasicFormBtn.vue b/src/views/demo/document/form/BasicFormBtn.vue new file mode 100644 index 0000000..21d1036 --- /dev/null +++ b/src/views/demo/document/form/BasicFormBtn.vue @@ -0,0 +1,66 @@ + + + + + + diff --git a/src/views/demo/document/form/BasicFormCleanRule.vue b/src/views/demo/document/form/BasicFormCleanRule.vue new file mode 100644 index 0000000..c1b7613 --- /dev/null +++ b/src/views/demo/document/form/BasicFormCleanRule.vue @@ -0,0 +1,95 @@ + + + + + + diff --git a/src/views/demo/document/form/BasicFormCompact.vue b/src/views/demo/document/form/BasicFormCompact.vue new file mode 100644 index 0000000..9420be3 --- /dev/null +++ b/src/views/demo/document/form/BasicFormCompact.vue @@ -0,0 +1,58 @@ + + + + + + diff --git a/src/views/demo/document/form/BasicFormComponent.vue b/src/views/demo/document/form/BasicFormComponent.vue new file mode 100644 index 0000000..2e6c16b --- /dev/null +++ b/src/views/demo/document/form/BasicFormComponent.vue @@ -0,0 +1,34 @@ + + + + + + diff --git a/src/views/demo/document/form/BasicFormConAttribute.vue b/src/views/demo/document/form/BasicFormConAttribute.vue new file mode 100644 index 0000000..d07df64 --- /dev/null +++ b/src/views/demo/document/form/BasicFormConAttribute.vue @@ -0,0 +1,63 @@ + + + + + + diff --git a/src/views/demo/document/form/BasicFormCustom.vue b/src/views/demo/document/form/BasicFormCustom.vue new file mode 100644 index 0000000..5216a8c --- /dev/null +++ b/src/views/demo/document/form/BasicFormCustom.vue @@ -0,0 +1,32 @@ + + + + + + diff --git a/src/views/demo/document/form/BasicFormCustomComponent.vue b/src/views/demo/document/form/BasicFormCustomComponent.vue new file mode 100644 index 0000000..a4c4624 --- /dev/null +++ b/src/views/demo/document/form/BasicFormCustomComponent.vue @@ -0,0 +1,32 @@ + + + + + + diff --git a/src/views/demo/document/form/BasicFormCustomSlots.vue b/src/views/demo/document/form/BasicFormCustomSlots.vue new file mode 100644 index 0000000..5604d83 --- /dev/null +++ b/src/views/demo/document/form/BasicFormCustomSlots.vue @@ -0,0 +1,64 @@ + + + + + + diff --git a/src/views/demo/document/form/BasicFormDynamicsRules.vue b/src/views/demo/document/form/BasicFormDynamicsRules.vue new file mode 100644 index 0000000..5c5288c --- /dev/null +++ b/src/views/demo/document/form/BasicFormDynamicsRules.vue @@ -0,0 +1,80 @@ + + + + + + diff --git a/src/views/demo/document/form/BasicFormFieldShow.vue b/src/views/demo/document/form/BasicFormFieldShow.vue new file mode 100644 index 0000000..b9da20b --- /dev/null +++ b/src/views/demo/document/form/BasicFormFieldShow.vue @@ -0,0 +1,70 @@ + + + + + + diff --git a/src/views/demo/document/form/BasicFormFieldTip.vue b/src/views/demo/document/form/BasicFormFieldTip.vue new file mode 100644 index 0000000..619457f --- /dev/null +++ b/src/views/demo/document/form/BasicFormFieldTip.vue @@ -0,0 +1,55 @@ + + + + + + diff --git a/src/views/demo/document/form/BasicFormFooter.vue b/src/views/demo/document/form/BasicFormFooter.vue new file mode 100644 index 0000000..efc99b3 --- /dev/null +++ b/src/views/demo/document/form/BasicFormFooter.vue @@ -0,0 +1,105 @@ + + + + + + diff --git a/src/views/demo/document/form/BasicFormLayout.vue b/src/views/demo/document/form/BasicFormLayout.vue new file mode 100644 index 0000000..c539e5d --- /dev/null +++ b/src/views/demo/document/form/BasicFormLayout.vue @@ -0,0 +1,63 @@ + + + + + + diff --git a/src/views/demo/document/form/BasicFormModal.vue b/src/views/demo/document/form/BasicFormModal.vue new file mode 100644 index 0000000..6765b14 --- /dev/null +++ b/src/views/demo/document/form/BasicFormModal.vue @@ -0,0 +1,84 @@ + + + + + + diff --git a/src/views/demo/document/form/BasicFormRander.vue b/src/views/demo/document/form/BasicFormRander.vue new file mode 100644 index 0000000..59cf65a --- /dev/null +++ b/src/views/demo/document/form/BasicFormRander.vue @@ -0,0 +1,90 @@ + + + + + + diff --git a/src/views/demo/document/form/BasicFormRules.vue b/src/views/demo/document/form/BasicFormRules.vue new file mode 100644 index 0000000..0575ab8 --- /dev/null +++ b/src/views/demo/document/form/BasicFormRules.vue @@ -0,0 +1,58 @@ + + + + + + diff --git a/src/views/demo/document/form/BasicFormSchemas.vue b/src/views/demo/document/form/BasicFormSchemas.vue new file mode 100644 index 0000000..496f52b --- /dev/null +++ b/src/views/demo/document/form/BasicFormSchemas.vue @@ -0,0 +1,99 @@ + + + + + + diff --git a/src/views/demo/document/form/BasicFormSearch.vue b/src/views/demo/document/form/BasicFormSearch.vue new file mode 100644 index 0000000..c661baa --- /dev/null +++ b/src/views/demo/document/form/BasicFormSearch.vue @@ -0,0 +1,116 @@ + + + + + + diff --git a/src/views/demo/document/form/BasicFormSlots.vue b/src/views/demo/document/form/BasicFormSlots.vue new file mode 100644 index 0000000..b124408 --- /dev/null +++ b/src/views/demo/document/form/BasicFormSlots.vue @@ -0,0 +1,63 @@ + + + + + + diff --git a/src/views/demo/document/form/BasicFormValue.vue b/src/views/demo/document/form/BasicFormValue.vue new file mode 100644 index 0000000..91c2dae --- /dev/null +++ b/src/views/demo/document/form/BasicFormValue.vue @@ -0,0 +1,94 @@ + + + + + + diff --git a/src/views/demo/document/form/BasicFunctionForm.vue b/src/views/demo/document/form/BasicFunctionForm.vue new file mode 100644 index 0000000..f5556df --- /dev/null +++ b/src/views/demo/document/form/BasicFunctionForm.vue @@ -0,0 +1,63 @@ + + + + + + diff --git a/src/views/demo/document/form/example.data.ts b/src/views/demo/document/form/example.data.ts new file mode 100644 index 0000000..110385c --- /dev/null +++ b/src/views/demo/document/form/example.data.ts @@ -0,0 +1,393 @@ +import { FormSchema } from '/@/components/Form'; + +import dayjs from 'dayjs'; + +export const schemas: FormSchema[] = [ + { + label: '文本框', + field: 'name', + component: 'Input', + componentProps: { + prefix: '中文', + showCount: true, + }, + defaultValue: '张三', + }, + { + label: '密码', + field: 'password', + component: 'InputPassword', + componentProps: { + //是否显示切换按钮或者控制密码显隐 + visibilityToggle: true, + prefix: '密码', + }, + }, + { + label: '搜索框', + field: 'searchBox', + component: 'InputSearch', + componentProps: { + onSearch: (value) => { + console.log(value); + }, + }, + }, + { + label: '文本域', + field: 'textArea', + component: 'InputTextArea', + componentProps: { + //可以点击清除图标删除内容 + allowClear: true, + //是否展示字数 + showCount: true, + //自适应内容高度,可设置为 true | false 或对象:{ minRows: 2, maxRows: 6 } + autoSize: { + //最小显示行数 + minRows: 2, + //最大显示行数 + maxRows: 3, + }, + }, + }, + { + label: '数值输入框', + field: 'number', + component: 'InputNumber', + componentProps: { + //带标签的 input,设置后置标签 + addonAfter: '保留两位小数', + //最大值 + max: 100, + //数值经度 + precision: 2, + //步数 + step: 0.1, + }, + }, + + { + label: '下拉框', + field: 'jinputtype', + component: 'Select', + componentProps: { + options: [ + { value: 'like', label: '模糊(like)' }, + { value: 'ne', label: '不等于(ne)' }, + { value: 'ge', label: '大于等于(ge)' }, + { value: 'le', label: '小于等于(le)' }, + ], + //下拉多选 + mode: 'multiple', + //配置是否可搜索 + showSearch: true, + }, + }, + { + field: 'TreeSelect', + label: '下拉树', + component: 'TreeSelect', + componentProps: { + //是否显示下拉框,默认false + treeCheckable: true, + //标题 + title: '下拉树', + //下拉树 + treeData: [ + { + label: '洗衣机', + value: '0', + children: [ + { + label: '滚筒洗衣机', + value: '0-1', + }, + ], + }, + { + label: '电视机', + value: '1', + children: [ + { + label: '平板电视', + value: '1-1', + disabled: true, + }, + { + label: 'CRT电视机', + value: '1-2', + }, + { + label: '投影电视', + value: '1-3', + }, + ], + }, + ], + }, + }, + { + label: 'RadioButtonGroup组件', + field: 'status', + component: 'RadioButtonGroup', + componentProps: { + options: [ + { label: '有效', value: 1 }, + { label: '无效', value: 0 }, + ], + }, + }, + { + label: '单选框', + field: 'radioSex', + component: 'RadioGroup', + componentProps: { + //options里面由一个一个的radio组成,支持disabled禁用 + options: [ + { label: '男', value: 1, disabled: false }, + { label: '女', value: 0 }, + ], + }, + }, + { + label: '多选框', + field: 'checkbox', + component: 'Checkbox', + componentProps: { + //是否禁用,默认false + disabled: false, + }, + }, + { + label: '多选框组', + field: 'checkSex', + component: 'CheckboxGroup', + componentProps: { + //RadioGroup 下所有 input[type="radio"] 的 name 属性 + name: '爱好', + //options支持disabled禁用 + options: [ + { label: '运动', value: 0, disabled: true }, + { label: '听音乐', value: 1 }, + { label: '看书', value: 2 }, + ], + }, + defaultValue: [2], + }, + { + label: '自动完成组件', + field: 'AutoComplete', + component: 'AutoComplete', + componentProps: { + options: [{ value: 'Burns Bay Road' }, { value: 'Downing Street' }, { value: 'Wall Street' }], + }, + }, + { + label: '级联选择', + field: 'cascade', + component: 'Cascader', + componentProps: { + //最多显示多少个tag + maxTagCount: 2, + //浮层预设位置 + placement: 'bottomRight', + //在选择框中显示搜索框,默认false + showSearch: true, + options: [ + { + label: '北京', + value: 'BeiJin', + children: [ + { + label: '海淀区', + value: 'HaiDian', + }, + ], + }, + { + label: '江苏省', + value: 'JiangSu', + children: [ + { + label: '南京', + value: 'Nanjing', + children: [ + { + label: '中华门', + value: 'ZhongHuaMen', + }, + ], + }, + ], + }, + ], + }, + }, + { + label: '日期选择', + field: 'dateSelect', + component: 'DatePicker', + componentProps: { + //日期格式化,页面上显示的值 + format: 'YYYY-MM-DD', + //返回值格式化(绑定值的格式) + valueFormat: 'YYYY-MM-DD', + //是否显示今天按钮 + showToday: true, + //不可选择日期 + disabledDate: (currentDate) => { + let date = dayjs(currentDate).format('YYYY-MM-DD'); + let nowDate = dayjs(new Date()).format('YYYY-MM-DD'); + //当天不可选择 + if (date == nowDate) { + return true; + } + return false; + }, + }, + }, + { + label: '月份选择', + field: 'monthSelect', + component: 'MonthPicker', + componentProps: { + //不可选择日期 + disabledDate: (currentDate) => { + let date = dayjs(currentDate).format('YYYY-MM'); + let nowDate = dayjs(new Date()).format('YYYY-MM'); + //当天不可选择 + if (date == nowDate) { + return true; + } + return false; + }, + }, + }, + { + label: '周选择', + field: 'weekSelect', + component: 'WeekPicker', + componentProps: { + size: 'small', + }, + }, + { + label: '时间选择', + field: 'timeSelect', + component: 'TimePicker', + componentProps: { + size: 'default', + //日期时间或者时间模式下是否显示此刻,不支持日期时间范围和时间范围 + showNow: true, + }, + }, + { + label: '日期时间范围', + field: 'dateTimeRangeSelect', + component: 'RangePicker', + componentProps: { + //是否显示时间 + showTime: true, + //日期格式化 + format: 'YYYY/MM/DD HH:mm:ss', + //范围文本描述用集合 + placeholder: ['请选择开始日期时间', '请选择结束日期时间'], + }, + }, + { + label: '日期范围', + field: 'dateRangeSelect', + component: 'RangeDate', + componentProps: { + //日期格式化 + format: 'YYYY/MM/DD', + //范围文本描述用集合 + placeholder: ['请选择开始日期', '请选择结束日期'], + }, + }, + { + label: '时间范围', + field: 'timeRangeSelect', + component: 'RangeTime', + componentProps: { + //日期格式化 + format: 'HH/mm/ss', + //范围文本描述用集合 + placeholder: ['请选择开始时间', '请选择结束时间'], + }, + }, + { + label: '开关', + field: 'switch', + component: 'Switch', + componentProps: { + //开关大小,可选值:default small + size: 'default', + //非选中时的内容 + unCheckedChildren: '开启', + //非选中时的值 + unCheckedValue: '0', + //选中时的内容 + checkedChildren: '关闭', + //选中时的值 + checkedValue: '1', + //是否禁用 + disabled: false, + }, + }, + { + label: '滑动输入条', + field: 'slider', + component: 'Slider', + componentProps: { + //最小值 + min: -20, + //最大值 + max: 100, + //是否为双滑块模式 + range: true, + //刻度标记 + marks: { + '-20': '-20°C', + 0: '0°C', + 26: '26°C', + 37: '37°C', + 100: { + style: { + color: '#f50', + }, + label: '100°C', + }, + }, + }, + }, + { + label: '评分', + field: 'rate', + component: 'Rate', + componentProps: { + //是否允许半选 + allowHalf: true, + //star 总数 + count: 5, + //tooltip提示,有几颗星写几个 + tooltips: ['非常差', '较差', '正常', '很好', '非很好'], + }, + }, + { + label: '分割线', + field: 'divisionLine', + component: 'Divider', + componentProps: { + //是否虚线 + dashed: false, + //分割线标题的位置(left | right | center) + orientation: 'center', + //文字是否显示为普通正文样式 + plain: true, + //水平还是垂直类型(horizontal | vertical) + type: 'horizontal', + }, + }, +]; diff --git a/src/views/demo/document/form/exampleCustom.data.ts b/src/views/demo/document/form/exampleCustom.data.ts new file mode 100644 index 0000000..54fef0f --- /dev/null +++ b/src/views/demo/document/form/exampleCustom.data.ts @@ -0,0 +1,452 @@ +import { FormSchema } from '/@/components/Form'; +import { defHttp } from '/@/utils/http/axios'; + +export const schemas: FormSchema[] = [ + { + label: '验证码', + field: 'code', + component: 'InputCountDown', + componentProps: { + //'default': 默认, 'large': 最大, 'small': 最小 + size:'default', + //倒计时 + count: 120, + }, + }, + { + label: 'Api下拉选择', + field: 'apiSelect', + component: 'ApiSelect', + componentProps: { + //multiple: 多选;不填写为单选 + mode: 'multiple', + //请求api,返回结果{ result: { records:[{'id':'1',name:'scott'},{'id':'2',name:'小张'}] }} + api: () => defHttp.get({ url: '/test/jeecgDemo/list' }), + //数值转成String + numberToString: false, + //标题字段 + labelField: 'name', + //值字段 + valueField: 'id', + //请求参数 + params: {}, + //返回结果字段 + resultField: 'records', + }, + }, + { + label: 'Api树选择', + field: 'apiSelect', + component: 'ApiTreeSelect', + componentProps: { + /* 请求api,返回结果 + { result: { list: [{ title:'选项0',value:'0',key:'0', + children: [ {"title": "选项0-0","value": "0-0","key": "0-0"},...] + }, ...] + }} */ + api: () => defHttp.get({ url: '/mock/tree/getDemoOptions' }), + //请求参数 + params: {}, + //返回结果字段 + resultField: 'list', + }, + }, + { + label: '校验密码强度', + field: 'pwd', + component: 'StrengthMeter', + componentProps: { + //是否显示密码文本框 + showInput: true, + //是否禁用 + disabled: false, + }, + }, + { + label: '省市县联动', + field: 'province', + component: 'JAreaLinkage', + componentProps: { + //是否显示区县,默认true,否则只显示省 + showArea: true, + //是否是全部文本,默认false + showAll: true, + }, + }, + { + label: '岗位选择', + field: 'post', + component: 'JSelectPosition', + componentProps: { + //是否右侧显示选中列表 + showSelected: true, + //最大选择数量 + maxSelectCount: 1, + //岗位标题 + modalTitle: '岗位', + }, + }, + { + label: '角色选择', + field: 'role', + component: 'JSelectRole', + componentProps: { + //请求参数 如params:{"code":"001"} + params: {}, + //是否单选,默认false + isRadioSelection: true, + //角色标题 + modalTitle: '角色', + }, + }, + { + label: '用户选择', + field: 'user', + component: 'JSelectUser', + componentProps: { + //取值字段配置,一般为主键字段 + rowKey: 'username', + //显示字段配置 + labelKey: 'realname', + //是否显示选择按钮 + showButton: false, + //用户标题 + modalTitle: '用户', + }, + }, + { + label: '图片上传', + field: 'uploadImage', + component: 'JImageUpload', + componentProps: { + //按钮显示文字 + text:'图片上传', + //支持两种基本样式picture和picture-card + listType:'picture-card', + //用于控制文件上传的业务路径,默认temp + bizPath:'temp', + //是否禁用 + disabled:false, + //最大上传数量 + fileMax:1, + }, + }, + { + label: '字典标签', + field: 'dictTags', + component: 'JDictSelectTag', + componentProps: { + //字典code配置,比如通过性别字典编码:sex,也可以使用demo,name,id 表名,名称,值的方式 + dictCode:'sex', + //支持radio(单选按钮)、radioButton(单选按钮 btn风格)、select(下拉框) + type:'radioButton' + }, + }, + { + label: '部门选择', + field: 'dept', + component: 'JSelectDept', + componentProps: { + //是否开启异步加载 + sync: false, + //是否显示复选框 + checkable: true, + //是否显示选择按钮 + showButton: false, + //父子节点选中状态不再关联 + checkStrictly: true, + //选择框标题 + modalTitle: '部门选择', + }, + }, + { + label: '省市县级联动', + field: 'provinceArea', + component: 'JAreaSelect', + componentProps: { + //级别 1 只显示省 2 省市 3 省市区 + level:3 + }, + }, + { + label: '富文本', + field: 'editor', + component: 'JEditor', + componentProps: { + //是否禁用 + disabled: false + }, + }, + { + label: 'markdown', + field: 'markdown', + component: 'JMarkdownEditor', + componentProps: { + //是否禁用 + disabled: false + }, + }, + { + label: '可输入下拉框', + field: 'inputSelect', + component: 'JSelectInput', + componentProps: { + options: [ + { label: 'Default', value: 'default' }, + { label: 'IFrame', value: 'iframe' }, + ], + //是否为搜索模式 + showSearch: true, + //是否禁用 + disabled: false + }, + }, + { + label: '代码编辑器组件', + field: 'jCode', + component: 'JCodeEditor', + componentProps: { + //高度,默认auto + height:'150px', + //是否禁用 + disabled:false, + //是否全屏 + fullScreen:false, + //全屏之后的坐标 + zIndex: 999, + //代码主题,目前只支持idea,可在组件自行扩展 + theme:'idea', + //代码提示 + keywords:['console'], + //语言如(javascript,vue,markdown)可在组件自行扩展 + language:'javascript' + }, + }, + { + label: '分类字典树', + field: 'dictTree', + component: 'JCategorySelect', + componentProps: { + //占位内容 + placeholder:'请选择分类字典树', + //查询条件,如“{'name':'笔记本'}” + condition:"", + //是否多选 + multiple: false, + //起始选择code,见配置的分类字典的类型编码 + pcode: 'A04', + //父级id + pid:'', + //返回key + back:'id', + }, + }, + { + label: '下拉多选', + field: 'selectMultiple', + component: 'JSelectMultiple', + componentProps: { + //字典code配置,比如通过性别字典编码:sex,也可以使用demo,name,id 表名,名称,值的方式 + dictCode:'company_rank', + //是否只读 + readOnly:false, + }, + }, + { + label: 'popup', + field: 'popup', + component: 'JPopup', + componentProps: ({ formActionType }) => { + const {setFieldsValue} = formActionType; + return{ + setFieldsValue:setFieldsValue, + //online报表编码 + code:"demo", + //是否为多选 + multi:false, + //字段配置 + fieldConfig: [ + { source: 'name', target: 'popup' }, + ], + } + }, + }, + { + label: '开关自定义', + field: 'switch', + component: 'JSwitch', + componentProps:{ + //取值 options + options:['Y','N'], + //文本option + labelOptions:['是', '否'], + //是否启用下拉 + query: false, + //是否禁用 + disabled: false, + }, + }, + { + label: '定时表达式选择', + field: 'timing', + component: 'JEasyCron', + componentProps:{ + //是否隐藏参数秒和年设置,如果隐藏,那么参数秒和年将会全部忽略掉。 + hideSecond: false, + //是否隐藏参数年设置,如果隐藏,那么参数年将会全部忽略掉 + hideYear: false, + //是否禁用 + disabled: false, + //获取预览执行时间列表的函数,格式为:remote (cron值, time时间戳, cb回调函数) + remote:(cron,time,cb)=>{} + }, + }, + { + label: '分类字典树', + field: 'treeDict', + component: 'JTreeDict', + componentProps:{ + //指定当前组件需要存储的字段 可选: id(主键)和code(编码) + field:'id', + //是否为异步 + async: true, + //是否禁用 + disabled: false, + //指定一个节点的编码,加载该节点下的所有字典数据,若不指定,默认加载所有数据 + parentCode:'A04' + }, + }, + { + label: '多行输入窗口', + field: 'inputPop', + component: 'JInputPop', + componentProps:{ + //标题 + title:'多行输入窗口', + //弹窗显示位置 + position:'bottom', + }, + }, + { + label: '多选', + field: 'multipleChoice', + component: 'JCheckbox', + componentProps:{ + //字典code配置,比如通过职位字典编码:company_rank,也可以使用demo,name,id 表名,名称,值的方式 + dictCode:'company_rank', + //是否禁用 + disabled: false, + //没有字典code可以使用option来定义 + // options:[ + // {label:'CE0',value:'1'} + // ] + }, + }, + { + label: '下拉树选择', + field: 'treeCusSelect', + component: 'JTreeSelect', + componentProps: { + //字典code配置,比如通过性别字典编码:sex,也可以使用sys_permission,name,id 表名,名称,值的方式 + dict: 'sys_permission,name,id', + //父级id字段 + pidField: 'parent_id', + }, + }, + { + label: '根据部门选择用户组件', + field: 'userByDept', + component: 'JSelectUserByDept', + componentProps: { + //是否显示选择按钮 + showButton: true, + //选择框标题 + modalTitle: '部门用户选择' + }, + }, + { + label: '文件上传', + field: 'uploadFile', + component: 'JUpload', + componentProps: { + //是否显示选择按钮 + text: '文件上传', + //最大上传数 + maxCount: 2, + //是否显示下载按钮 + download: true, + }, + }, + { + label: '字典表搜索', + field: 'dictSearchSelect', + component: 'JSearchSelect', + componentProps: { + //字典code配置,通过 demo,name,id 表名,名称,值的方式 + dict: 'demo,name,id', + //是否异步加载 + async: true, + //当async设置为true时有效,表示异步查询时,每次获取数据的数量,默认10 + pageSize:3 + }, + }, + { + label: '动态创建input框', + field: 'jAddInput', + component: 'JAddInput', + componentProps: { + //自定义超过多少行才会显示删除按钮,默认为1 + min:1 + }, + }, + { + label: '用户选择组件', + field: 'userCusSelect', + component: 'UserSelect', + componentProps: { + //是否多选 + multi: true, + //从用户表中选择一列,其值作为该控件的存储值,默认id列 + store: 'id', + //是否排除我自己(当前登录用户) + izExcludeMy: false, + //是否禁用 + disabled: false, + }, + }, + { + label: '选择角色组件', + field: 'roleSelect', + component: 'RoleSelect', + componentProps: { + //最大选择数量 + maxSelectCount: 4, + //是否单选 + multi: true + }, + }, + { + label: '数值范围输入框', + field: 'rangeNumber', + component: 'JRangeNumber', + }, + { + label: '远程Api单选框组', + field: 'apiRadioGroup', + component: 'ApiRadioGroup', + componentProps:{ + //请求接口返回结果{ result:{ list: [ name: '选项0',id: '1' ] }} + api:()=> defHttp.get({ url: '/mock/select/getDemoOptions' }), + //请求参数 + params:{}, + //是否为按钮风格类型,默认false + isBtn: false, + //返回集合名称 + resultField: 'list', + //标题字段名称 + labelField: 'name', + //值字段名称 + valueField: 'id', + } + }, +]; diff --git a/src/views/demo/document/form/index.ts b/src/views/demo/document/form/index.ts new file mode 100644 index 0000000..1aa7cef --- /dev/null +++ b/src/views/demo/document/form/index.ts @@ -0,0 +1,24 @@ +export { default as BasicFiledsLayotForm } from './BasicFiledsLayotForm.vue'; +export { default as BasicFixedWidthForm } from './BasicFixedWidthForm.vue'; +export { default as BasicFormAdd } from './BasicFormAdd.vue'; +export { default as BasicFormBtn } from './BasicFormBtn.vue'; +export { default as BasicFormCleanRule } from './BasicFormCleanRule.vue'; +export { default as BasicFormCompact } from './BasicFormCompact.vue'; +export { default as BasicFormComponent } from './BasicFormComponent.vue'; +export { default as BasicFormConAttribute } from './BasicFormConAttribute.vue'; +export { default as BasicFormCustom } from './BasicFormCustom.vue'; +export { default as BasicFormCustomComponent } from './BasicFormCustomComponent.vue'; +export { default as BasicFormCustomSlots } from './BasicFormCustomSlots.vue'; +export { default as BasicFormDynamicsRules } from './BasicFormDynamicsRules.vue'; +export { default as BasicFormFieldShow } from './BasicFormFieldShow.vue'; +export { default as BasicFormFieldTip } from './BasicFormFieldTip.vue'; +export { default as BasicFormFooter } from './BasicFormFooter.vue'; +export { default as BasicFormLayout } from './BasicFormLayout.vue'; +export { default as BasicFormModal } from './BasicFormModal.vue'; +export { default as BasicFormRander } from './BasicFormRander.vue'; +export { default as BasicFormRules } from './BasicFormRules.vue'; +export { default as BasicFormSchemas } from './BasicFormSchemas.vue'; +export { default as BasicFormSearch } from './BasicFormSearch.vue'; +export { default as BasicFormSlots } from './BasicFormSlots.vue'; +export { default as BasicFormValue } from './BasicFormValue.vue'; +export { default as BasicFunctionForm } from './BasicFunctionForm.vue'; \ No newline at end of file diff --git a/src/views/demo/document/form/tabIndex.vue b/src/views/demo/document/form/tabIndex.vue new file mode 100644 index 0000000..bb1c918 --- /dev/null +++ b/src/views/demo/document/form/tabIndex.vue @@ -0,0 +1,114 @@ + + diff --git a/src/views/demo/document/table/AuthColumnDemo.vue b/src/views/demo/document/table/AuthColumnDemo.vue new file mode 100644 index 0000000..b53ca87 --- /dev/null +++ b/src/views/demo/document/table/AuthColumnDemo.vue @@ -0,0 +1,135 @@ + + diff --git a/src/views/demo/document/table/BasicTableBorder.vue b/src/views/demo/document/table/BasicTableBorder.vue new file mode 100644 index 0000000..73566d4 --- /dev/null +++ b/src/views/demo/document/table/BasicTableBorder.vue @@ -0,0 +1,94 @@ + + + + + diff --git a/src/views/demo/document/table/BasicTableDemo.vue b/src/views/demo/document/table/BasicTableDemo.vue new file mode 100644 index 0000000..2b58dde --- /dev/null +++ b/src/views/demo/document/table/BasicTableDemo.vue @@ -0,0 +1,81 @@ + + + + + diff --git a/src/views/demo/document/table/BasicTableDemoAjax.vue b/src/views/demo/document/table/BasicTableDemoAjax.vue new file mode 100644 index 0000000..dd53ef4 --- /dev/null +++ b/src/views/demo/document/table/BasicTableDemoAjax.vue @@ -0,0 +1,157 @@ + + + + + diff --git a/src/views/demo/document/table/CustomerCellDemo.vue b/src/views/demo/document/table/CustomerCellDemo.vue new file mode 100644 index 0000000..d625ce6 --- /dev/null +++ b/src/views/demo/document/table/CustomerCellDemo.vue @@ -0,0 +1,106 @@ + + diff --git a/src/views/demo/document/table/EditCellTableDemo.vue b/src/views/demo/document/table/EditCellTableDemo.vue new file mode 100644 index 0000000..795a06c --- /dev/null +++ b/src/views/demo/document/table/EditCellTableDemo.vue @@ -0,0 +1,217 @@ + + diff --git a/src/views/demo/document/table/EditRowTableDemo.vue b/src/views/demo/document/table/EditRowTableDemo.vue new file mode 100644 index 0000000..5ce07bf --- /dev/null +++ b/src/views/demo/document/table/EditRowTableDemo.vue @@ -0,0 +1,261 @@ + + diff --git a/src/views/demo/document/table/ExpandTableDemo.vue b/src/views/demo/document/table/ExpandTableDemo.vue new file mode 100644 index 0000000..89c0ef9 --- /dev/null +++ b/src/views/demo/document/table/ExpandTableDemo.vue @@ -0,0 +1,119 @@ + + diff --git a/src/views/demo/document/table/ExportTableDemo.vue b/src/views/demo/document/table/ExportTableDemo.vue new file mode 100644 index 0000000..50c723c --- /dev/null +++ b/src/views/demo/document/table/ExportTableDemo.vue @@ -0,0 +1,131 @@ + + + + + diff --git a/src/views/demo/document/table/FixedHeaderColumn.vue b/src/views/demo/document/table/FixedHeaderColumn.vue new file mode 100644 index 0000000..00f3f40 --- /dev/null +++ b/src/views/demo/document/table/FixedHeaderColumn.vue @@ -0,0 +1,98 @@ + + diff --git a/src/views/demo/document/table/InnerTableDemo.vue b/src/views/demo/document/table/InnerTableDemo.vue new file mode 100644 index 0000000..9173d66 --- /dev/null +++ b/src/views/demo/document/table/InnerTableDemo.vue @@ -0,0 +1,131 @@ + + diff --git a/src/views/demo/document/table/MergeHeaderDemo.vue b/src/views/demo/document/table/MergeHeaderDemo.vue new file mode 100644 index 0000000..68235d2 --- /dev/null +++ b/src/views/demo/document/table/MergeHeaderDemo.vue @@ -0,0 +1,70 @@ + + diff --git a/src/views/demo/document/table/MergeTableDemo.vue b/src/views/demo/document/table/MergeTableDemo.vue new file mode 100644 index 0000000..14574b4 --- /dev/null +++ b/src/views/demo/document/table/MergeTableDemo.vue @@ -0,0 +1,144 @@ + + + + + diff --git a/src/views/demo/document/table/SelectTableDemo.vue b/src/views/demo/document/table/SelectTableDemo.vue new file mode 100644 index 0000000..7dc5211 --- /dev/null +++ b/src/views/demo/document/table/SelectTableDemo.vue @@ -0,0 +1,80 @@ + + + + + diff --git a/src/views/demo/document/table/TreeTableDemo.vue b/src/views/demo/document/table/TreeTableDemo.vue new file mode 100644 index 0000000..802c043 --- /dev/null +++ b/src/views/demo/document/table/TreeTableDemo.vue @@ -0,0 +1,124 @@ + + diff --git a/src/views/demo/document/table/index.ts b/src/views/demo/document/table/index.ts new file mode 100644 index 0000000..9069393 --- /dev/null +++ b/src/views/demo/document/table/index.ts @@ -0,0 +1,15 @@ +export { default as AuthColumnDemo } from './AuthColumnDemo.vue'; +export { default as BasicTableBorder } from './BasicTableBorder.vue'; +export { default as BasicTableDemo } from './BasicTableDemo.vue'; +export { default as BasicTableDemoAjax } from './BasicTableDemoAjax.vue'; +export { default as CustomerCellDemo } from './CustomerCellDemo.vue'; +export { default as EditCellTableDemo } from './EditCellTableDemo.vue'; +export { default as EditRowTableDemo } from './EditRowTableDemo.vue'; +export { default as ExpandTableDemo } from './ExpandTableDemo.vue'; +export { default as ExportTableDemo } from './ExportTableDemo.vue'; +export { default as FixedHeaderColumn } from './FixedHeaderColumn.vue'; +export { default as InnerTableDemo } from './InnerTableDemo.vue'; +export { default as MergeHeaderDemo } from './MergeHeaderDemo.vue'; +export { default as MergeTableDemo } from './MergeTableDemo.vue'; +export { default as SelectTableDemo } from './SelectTableDemo.vue'; +export { default as TreeTableDemo } from './TreeTableDemo.vue'; \ No newline at end of file diff --git a/src/views/demo/document/table/tabIndex.vue b/src/views/demo/document/table/tabIndex.vue new file mode 100644 index 0000000..261c9c3 --- /dev/null +++ b/src/views/demo/document/table/tabIndex.vue @@ -0,0 +1,87 @@ + + diff --git a/src/views/demo/editor/json/index.vue b/src/views/demo/editor/json/index.vue new file mode 100644 index 0000000..622da81 --- /dev/null +++ b/src/views/demo/editor/json/index.vue @@ -0,0 +1,91 @@ + + diff --git a/src/views/demo/editor/markdown/Editor.vue b/src/views/demo/editor/markdown/Editor.vue new file mode 100644 index 0000000..6c731bd --- /dev/null +++ b/src/views/demo/editor/markdown/Editor.vue @@ -0,0 +1,53 @@ + + diff --git a/src/views/demo/editor/markdown/index.vue b/src/views/demo/editor/markdown/index.vue new file mode 100644 index 0000000..7d94947 --- /dev/null +++ b/src/views/demo/editor/markdown/index.vue @@ -0,0 +1,55 @@ + + diff --git a/src/views/demo/editor/tinymce/Editor.vue b/src/views/demo/editor/tinymce/Editor.vue new file mode 100644 index 0000000..b109c02 --- /dev/null +++ b/src/views/demo/editor/tinymce/Editor.vue @@ -0,0 +1,53 @@ + + diff --git a/src/views/demo/editor/tinymce/index.vue b/src/views/demo/editor/tinymce/index.vue new file mode 100644 index 0000000..9bba89b --- /dev/null +++ b/src/views/demo/editor/tinymce/index.vue @@ -0,0 +1,21 @@ + + diff --git a/src/views/demo/feat/breadcrumb/ChildrenList.vue b/src/views/demo/feat/breadcrumb/ChildrenList.vue new file mode 100644 index 0000000..cc2b26d --- /dev/null +++ b/src/views/demo/feat/breadcrumb/ChildrenList.vue @@ -0,0 +1,13 @@ + + diff --git a/src/views/demo/feat/breadcrumb/ChildrenListDetail.vue b/src/views/demo/feat/breadcrumb/ChildrenListDetail.vue new file mode 100644 index 0000000..4994c44 --- /dev/null +++ b/src/views/demo/feat/breadcrumb/ChildrenListDetail.vue @@ -0,0 +1,10 @@ + + diff --git a/src/views/demo/feat/breadcrumb/FlatList.vue b/src/views/demo/feat/breadcrumb/FlatList.vue new file mode 100644 index 0000000..d480bab --- /dev/null +++ b/src/views/demo/feat/breadcrumb/FlatList.vue @@ -0,0 +1,13 @@ + + diff --git a/src/views/demo/feat/breadcrumb/FlatListDetail.vue b/src/views/demo/feat/breadcrumb/FlatListDetail.vue new file mode 100644 index 0000000..1dfc75a --- /dev/null +++ b/src/views/demo/feat/breadcrumb/FlatListDetail.vue @@ -0,0 +1,8 @@ + + diff --git a/src/views/demo/feat/click-out-side/index.vue b/src/views/demo/feat/click-out-side/index.vue new file mode 100644 index 0000000..32652d9 --- /dev/null +++ b/src/views/demo/feat/click-out-side/index.vue @@ -0,0 +1,43 @@ + + + + diff --git a/src/views/demo/feat/context-menu/index.vue b/src/views/demo/feat/context-menu/index.vue new file mode 100644 index 0000000..0bde0cf --- /dev/null +++ b/src/views/demo/feat/context-menu/index.vue @@ -0,0 +1,85 @@ + + diff --git a/src/views/demo/feat/copy/index.vue b/src/views/demo/feat/copy/index.vue new file mode 100644 index 0000000..b442056 --- /dev/null +++ b/src/views/demo/feat/copy/index.vue @@ -0,0 +1,40 @@ + + diff --git a/src/views/demo/feat/download/imgBase64.ts b/src/views/demo/feat/download/imgBase64.ts new file mode 100644 index 0000000..306bdd1 --- /dev/null +++ b/src/views/demo/feat/download/imgBase64.ts @@ -0,0 +1 @@ +export default `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMAAAADACAYAAABS3GwHAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wAAAAAzJ3zzAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAB3RJTUUH5AodAjIGrlVB/QAAABBjYU52AAAAygAAAMAAAAAFAAAAAASpeQ4AAC6ASURBVHja7b133G1Vdaj9jDnXWruXt7+ncDhIEVCKaCiidATsgIjRm1gTu1FjTbl++ZmYqMmNRPOZm5tc400+Y65iwUQFEUSRIkixgNI5cA6nvX33veYc3x97v2IBpZzzzvdw1sNvc/5gH/ZYY80xy5ijQEZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkbG7kZCC7CaeevLu3QSyPXBKBL3RSIHKOE050EtULdqakaXvr/E+EiR9kbLRz6Wvc5HSxRagNVMIw+bnhyz/m6HbTtNvGjsAQENMNZk+FGB1EOjBfu9okLvbvj6N0Nra88kmzIegte+yDEapbRKMPp/EuZe3rcqOm37sjFKqQOKMDSFFUXxRFicVO1mqZi7/QMLS70DahS2QO9guOB92St9NGQrwEPgUBZFKHZVtr28p3ko5PucWko5MZfKmD5oACuKAM5jU6WP5S7N8+W0XLm6NYomHuZMaM3teWQG8BAkKoypknThoAM3c9ed6548lcrrJvpyTFElBUQDyCUKqUK3iMYJaTevhdufZG470LEzl0dSpyHE2qPJ1stf4vfO6eOdYTTpykc+V9BXn+02rvP+NQf25C1jTkaWvxfEADy4BJJJGB+D+aLcdGXefPCGIpf859tpvPUjsF8v5Ue5iP/9nuzVPhKyFeCXaKSGMsIb0qa+71yopsnhY44Xl5SKCpqysk6gn/+ttsHZEm6yhh2PiaI+B6y1+tI7nNz8nI/RqKXIxVWrLlsHHjHZrnHI61/S4/Uv7ZFDeJZxfK1TN7f7/NSY46RJJ4fESuQGXxV50CGz2z8CMjxxCHl8voKvxBgDWvFa3q+vJ2zo6bPmYgovWPSMpDDi4R1/mVnBIyEzgCG5rrJUEwq5vlxUUX5U0uJG6b90BP+CopcIFdUAW0ZhsAqkIloti5muSZxYJPVIrDCd6uRBHf3dExf1hOtKhn+/aompLqzph9bonkFmAMAdP/XMN6HaFSYMVNqKWibXpJw27uQAA6oS5rwkCl7QbpFOroIbSTSyg+MATtCSYg/qc+z+PZ711QrF9adWGffIXAR/8iHlbR/LVoJfR2YAQLEIb7kgIul6+br36lLqlT7PH03NYWUnKGEOvTC48PIWLdehUhq+sKEwDsQAk47ilOPkw1uc8pp5H310Ek0FZhPo5kJrd3WTGQCQ7oC/f5Njcga+9zlHtctR421eVVT2UyHI1gcGP9q3eM3jp8ok4wkJyi9cQHjAojrZ12MP6uorjTf7vmIzTPSQdV1lrB1au6ubvd4AvvLvjn4VvvWdlD/+RsynPpVbW0NOnOyZA4pecKEEU8CD5PDxiPQLOSVGf+X+wQ8/U07tfqkeVVROcnVG3nMe2lKRpoW3fzTbBj0ce70BnPYyKBeRe7SAyL9ptSPPGlF5YcmRN0DIg29LcKaAn6pi8xGSPvzds+SAMafTa1N96VifA//gIjhiUbHAfDmUdlc/e60BvOF8x++90DNzr3DZxxwX/YGamdYr1ud2csaY40hjNHYSaO8ztLo0jy+U0fFY45xg/MN/nZ6gBU9h354+c21fT7m3Rm1tpHLMnZ5SCu/6s2wVeCj22ouwnKRcMJ6w9m+cbF4b6fQDfuTWd7tzp3bIs+siSIR6DTP+vYJa0XodGauptYLob4g8ciAxMOG1tK7NuYd57v2vgrnw+3V6hy8if310sHP8qmavNYA2lnXXwuw+0L3Hs7kvk/v25XkGDogi1AWa/I1Cx+B6eXrrStjRhFiV33gWWQ6TThQ29DiyqZx6TY5vrumxfawPR18PZ/6ZosAHP5CFSSyzV26B3vrbbSIVzjsk5e++bjUp6/iagp6xIWcOq0UiyzkvIXADt44UalAuKMnQ1fmI/u7wz3HVaK3j2HWOM+uqxU9UVU/30JS99IX/GvZKfex3f0JsUk7ZIfLBs1uMOPesMe9fVVKdMhrG7SkMLr16gto8ur6quXpC7PxgS/RI8QOD0RGvh+6X6msnvDzlBT1ho1MZ8craYG6t1cleZQB/9D7HO/5bj1LJUBDkhb+1qD+tMz7iOGayL4cmTsSF2h0Mb9t8gZ6tS7eUg/gxhF0rkAIjXuVJTp9ad3pyLmXqdTs62jHCJgt/+sHsOLDMXmUAqXpmY88t9Y7cU3T6h/cW4jUNe1alL88pOyLDYAZdabmEwfalLfhCCZmsYhID/jGm3OjwQDzqtTLtOXfa8YwPTeb54LVLxEB7xVN5Vi97jQH80XsdiRdG+obygvDZf/oP+mI2TLTlnHpfjgLESxi3z3Ca17SAq5Qx0wm5+Ne4PR8JPUGtEq93+oy1Ts/YHsn0l44smcOcp+DhT/9S+dM/z1aCvcYA2nenfOPGNgbkK2+J9V3v+92xInLmSCqHVYf7nlDDwQ/jGcoj4ksVQUQfd8aZBzGKjnk1E16fs1b1JTcUTeXzIwZyyP0VKHYDPfAqYq8xABk1PP/wMhNtOO0rjmKffcdTObfsZR8TsNDJstuzk9P+aFFlJFHj9NEdfB/yeQEVxCo67fSgjY6zxDC5TwtGVZlogJ4Z4olXF3uFAbz9vC65kkH3gbKK6IiZKC7oaeN9jsoriZNAs7+CejAJ5Gui1Ty2AGZXWeJynFDdI2t7evhYX5+vjrGvedFKpFI8Hj6wZe/eBu0VBjCRxnQ3p3Lx3U3uKXqJ73Sn5nb680upVKxIuHgfgZ6IzxdF14xIVEwwzu9aY/SDrDKtqq5f1+Y1ky2OO/tvPS+51NP8O/jRxEo/+eriCW0Af/CylLe/LKWRE/JdWLNTmO27ymiLZ4515PDIY0IUuAKWR7l2inSlQq+WqI1BdoebPgVKCvumesC4cuJt/2w2HPy1lOQLcPB2+MB3995V4AltAHnnmE0MHdfjmprq+n5UGk/NC6qYE6sqkQx2IEFwHvpAuYKMVjAJu08YD2KBuiee9PrcdX1OfSs5ueZyiArI/DMDKWEV8IQ1gHed5zjurp2M9ZWSE9m/bTBi9htL7e+UHYcLoIGC3YyCM2iaJx0rEU/nyBkZpDnuDoTBKiComXZ66IYl/7zKPPs/8zo1T/lXpdKC9/+x8icf2vtWgiesASjwzSdPoqry8f1RiUytqHL8VN8cXHWCH+T5BsErSILPjZAWSuqjXeD2fCS/iYG6USbu02Mn/1V/e8f1Mv3pUdHkfyNLFZiIw+gjJE/YaFAnUOjDvj3Pq+5T8s4fOdKTV5Q8kxboBywK1ha8yalfVxFbSTDpLj74PhQ/c4sKOrbEuo0NnteM+cZxli0HtT3NimG2GEoj4XjCGcA7X+oxCqjy5Jl76FYOkK7vjU/1/emjqT0mUpJUwvj9ZRjvo3l8riI6kiMqgFmpCibLcUIVA+usHrQt5nl35GTLeTXu3bTFs5B7wm4IHpYn3BP3XYcj5n+Egnxr7QFsikkqXk4vOfOcqpPYarh4Hw/0EV8qi47XRWKLPNZ4n8fK0OWrZdX6Oqe/8yT09Fcfa+Rd/8MwbldaK+F5whmAtxGfnSqS81Dpe3qG8njfnF53cmSkA997qHgfD76V125SVDeWDDK9QkQnpwKxh7WODdOeJ31rEcOVUA7kFAjJE8oA3nxel09cGnNwdyMfeqGqVa3lvD9rxMlxFSfx8s1oCJwHNUi5hqmXMXnBmEBOF8NgImgLSx1YrMVAZeCW3dt4whjAxW9OOeqS7fzes3tUUy9v/KrDqj+4lvpXl7w/wGqYCg8wrO8jqMvhJmsSjRUkVh5/vM9jxSjSNvTvzfGdTTn53ifm8Hrkq1mM9r684SeMAYwlcMqrxpksiXxgCp2LbbHiePpUj8OKTqyXQC93GO+jOVIzIp1CXjU3LDQaQiAD2gNmI3lgZ1k+/aM1fLdxi+dtf/spFgpBNBSUJ4wB9EX5xBbh6S/YobV9YyZa7sRaKudXnNRCzf7L9X3aoFEe1taIStGuj/d5pBggAlkUadwfyXfnErl+dInuTwuG28vQyg7Bex63vc9z27s8zS7cP6dyzsvW8qYf9iZrPZ470ud4A7ELNPvL0OpcDpevwESiuYJgAqblageYtdy21crnupbtf/dGaAj6uxen1HvhBAvFHn8P8JrrPd+50NL9oOGz38grf05hBE4SJ0ePOLFGBiVOQmz+vYKz+GKNtFoTMaKDW+AAslgGq84OI90dVq7sK9/acS+NT/4p0i6jL/98DJ8PIFhg9vgVoBgr3Aqttsq17/GkjolJJ+eVHUfYYaJLiAFnBhUefCvRXrWETOQ1EkFCHHwVsApOJJ2xcvkDVr783G5//t6N0IjRhT1+FDx29uhHf+fLPO8/0PCfn0r55Lcts11GL93sTs935Zi6Ss5JOLenejAR5OtCpYQtgl0+E6w0BrQrsN3QmjdyyQMR1x7RhDNngc6gmNbeyh577PmD8/psfa5l583Q3NaVzlp0c1OOaSz4t1S7cmgJsT5AU4vl3kZdwZuS+MkJMaNFjPFhOkvCoLzKkpH+3bFcsT2Wz6jRu7ZHIg2ErTF88I/3uvuvn7FHrgBvO29wZXP/n30N1/O8++tet47GSaEnT6/1zDMSL0lQt6dCL0ffV7RbTVQKDCo8BOksyaCx35Llztmc/NNckRv+n39rs6lg1NZgbC8vkbJHmv47XtJjcylmfdvJA7Hoho7mvPFn7NMz71rX5dmRH0SDrjTC4OCbKmpHceNT4qbymiSChOjcaIYybRe6dyfmwvsK8t6W5f6RPrLZoh95PwTq/LRq2ONWgA+/wfHDO3qs73gS5ymkjqbxIyM9zq729TgT6IIJBm5PBe0WSEtlmM6Ti02Ywb9MH2jGcnMjz5dqkc41q5CL0dfNe/7mL8LJtVrY4wwA4APvKIF6/urd29R6SYoqx46l9ohaKhGgPmCii7doUqNfrJDaZYsIIIsFnMKckXa/IF9fv1a++vr/2W4eN6dy0hh8qW541168919mjzOAnnhmroNS28kb/3qMqnMH1nv66qLXg4cn+mDxPh3QXqxuskQ8kScGgvn9I4W+0N1i5aodkXz70zfRPFJzRCVRm4f3vj8b/LCHGcCH3+iInfAPNzZ45mhCdSSulVROGE85vuC14AYN7YJgBvV9fFLD1wrYooTzsMnQ7TlnZWnW8qUlw02f2ejkhBdbWg5u2hlKstXHHmUA57/CEMeGr3/3B5z16Vs03+PpZS8vqjkp5zRcfR8UOuCjAn58REw+gdQRxBqFwfX+kpH+1kiubxr51pYWM/8yZ3lz3OO4Frz07dnsv8weEwrx7vM77FsC11R55f95ph6zlUJ6kzup1OfZsZKE2vcP9/jazkmvWkbHE03ygkkDbX0E1KtI08iPdsbyqbboHX85plwwY/TWiYReGkhPq5Q9YgV49/kdDgL+7IKUH06lut83++UdP07PyLX19JqTohCunakfdHKXchUzVsPmLUbCDX4UZKdRv81yc8Py7WYsnX/cIRJbuOy2QEpaxewRK0CnkvJDZyg3kNp9qs1Uxkd65vykJ0fGDKodhAov7gnay9GfKiMTeSIhnNvTMEh3nInl+q2Jfq0iMjsXQdPBnIGPf1z4eBjRVi2rfgV4x3ldnoKQaxv+4tKcakRcUI6c6JunVZ3J+zBbbWAQ7+MjvKnRKxTV50RlOfl9pTGgTmFWZHEuks9vrpv/fP3tvr9P22OKovW9Md/xEbDqDaBr4c6FiKmuyBvP7FJsm6NKqXlNWdkYq6KPoY3QrkCAjqLEsKZKMpIn8j6g2xOkZejfb7l5ZyTfm5jT1hfHlW5sWMzOvA/LqjWAt5/teNfZPQookRNeviWmK1Kq9OXZo105MXHkQsX7yNDqfB5na6SjeeKiwQa88NW2B5/I1skx+ewBY9z6zv8uFNcZPaqqFDvw9j/NrOChWLVngA5QBCQV/nJjn/GOkdE+R1e9nDyamlIEOAlT3NADKWhcwo2MiI+tqneB6owyMMYdIp68XH/CPvJfVy3o9p/8PXLG0aI8A04IkhGxZ7BqV4BTeoZRJxScl9+/Dx7I92vjfc6uOk62qNn91TQfGjPw+mgz0X6hiKzJaRIbTKiD77DekMxbbn4gki9TYNszXyBM1EWxIFNh5NpTWJUG8LazlWuTPnPW88Fvpxq7QiXy5qR6KidUnRQ0dKILQqkmVKtIQbChAvDMMO5p1oifM3LVXMSlpL73hj9Wdrbh3h/Cpr8JpKg9hFVpALMemlFMUY38/kklYmVt1cv5ZSf7J4ORHyzepye4Xo7+WFVktIBd7ucVKM9XUiHdHssNC5F842LH5nNefI9/xgbB5mDjK4UNv5Ntf34dq84A3nOuUgFihX17cE0spuw5ciI1x5eUsg8Y74OHNMH7Gr1KXikN9RdIHnUKLTGzjUj+v5kyV+wowZkffpJctsOT7OWJLo+UVXcI/knU5cmaY7YOjW7EaT3/7Ir6V1Q805EX0kBpjqrQU8jlseMjxJUEE6q9jDCwvCWBbYbbO3DVPovMv21J5WtHbtdrTt7Ki3oxR1z5490vi4Iay32ThtkDxoE68dLd9Kv7h1HOo2RVGcBLL2hw5DU5miDtFnpzmfz+bU4ec5ycUwlW23YY1k8vT69aQSfymhQMkg7jL1ZaIBnYo6TYu2Zj/cyPpxt3/OA9ZUb/eQs/nJ6TSs/iVuCUZHTQZaSXeNpFUVgCGugelGm+agzg5rtT/uKiDjt3wpsnvP53cWa8HT1tIpVjxlJTtqh6CVPiZLmbQKGCq9ZEE1HEhdk/Dp1fsiSmO5PTb85X0/9YKvVmL1n4Fw6/+niFBF0hLYkqNhVKM4LrCOsnLKU4TztKMbqVS2Q6gIYeHavGAHqp8rT9DZft05QjOqlOOzN5kk9e1hF77KwFL4pnZWfb5S4aTsW7mP5oVSQtk2yBQY+lAPIYBa/idsb+zhunG3dc/NSttXbO5Q+/6pgCpD5aqZvx4aroBWmVTTo7aeZ+WosXpLWdSlpkKdkz2tCvGgN4xgER/3xll298qQuxY+msZOONvnfcjsjURQdLfogBJ6r4yPT9SPxAeVQqhTxjzj/YYmalDsCD31KMmo6J3c7u2Lx/YP3MGc2kc5R4ceLFDgtSrJSKVME4QTpFu3WpwmWjre636ozMO9cUuEcv1xYny+ruu7QqDOCYP0yBLt++QeUzX6xqPmHynf/SOvm2NF2/uSDByogDoNqVUjTv18R9VzSDRNtQojiLxL6bjC9tqazZOZ0UWk+13iAefABflHHgLbSqZq5bZd99Ef2pn76ECu2/YZyTKLCP3sN9sjGYzn7jM4QWAODog4SrfmK55eN36stP/H+5d7s72qDniDJlFKyqWFVW7MPwTw82tvNSiuZMZCatMmIZlBm0rNBHf+5PxSX5brs8sTOOi+0ENYhf7jy2oiz/XifNm83NehRRNKcr7rcvN+2Nr2UH/8iCABzL6q65HnQFOOiNHVDBo/zeJxfgzKfK77/wkH0uur57snP6lFIsEg0CPlf27KsPfrQQ4WtJhJE8Ts0vfGel8ACC5PpbctXGjkKuM21UR7w3g/8QAOOhVzTdual4sV21OYHKdtxxf8LsCRNED/yUDfPPZgvrsBT0LtrypBBi/kaCGsD6OMdOB1++2ks1HtOD1pFceFXnNCQ9vRBLPo4CNbMebPCd5sxOLUddzZkxwIbai6kKqPik1G4nY/Me4+vem1wQYZb1o8z38jK/NGrr/ZiSBRbxU1fROhfMbXkal3fpYshzGDluDibsryfYFmif189ze39+cGqLOsz0UyT264s5PSsXc5gIEi7TRUGkTyWa0aJNUa2iGmyyEFFnk3R7UmuYuNRcL9bHBOryvRwK3s/LbLNmG/0cNUUKgBrIWeT4BE7LY0dOo0ANkZuZ4UzdynXaCaXChyXcGcArxkIjXZI4cVrIt8d7rvU8I+5pkSzXWgiFpMTSphTVJGfGGBwLgqDOgNFuMrqwKa4vdhAdU5UwPd0H6W4KtBpjcX5hKprwVnLDtAwZFgYuAqc2cc+5FC3MoVqnJoeRo78KW5AFMYDD3t8gzg3udNPU0e+kONyTU9JzvOoGXXkX+4N4IDENrSVbtGBzKloLXD6zZyK3GNeXSlGxMxj8gWZ/FNTQ65bM5kbdpN2cjKsMyr7//Lc8engKL4qRtaDM0+UWety2CvtQBjGANRtytFse8YYFr6qxmRQvp4jKEUCY2W2AgvY1b9u+FhuNJCJUWWcGe3+TuMW43twaFdsTiK4JNvgBk+I0ktbiuE3bFRPJw5bXlwL4Y2vIadeyT0U5SGdIZQnPvnpPMPkf8plC/Gja7GJFiIp9pkfVaE9PUMcLVLU6/EqYgy+giZ3Vgu0SyQZEaiH0MxBEFC8uKrdahemdXZvvGnWBvdZCo1cw843RaLqTM1PLvRB++VuDLZFuEPT862g/Tfgm13Ab51PmeFbXxdiKavTkD3c49eM97t8M/Y6XO/5uJ6LJOlU9BdXDV1qeX2C5b2klams97mPIDdwvIWQRAG8Stzkqt5dsobMv1lcf7//2sSI6dHuWTH9xMu50iybh1zRXGeyUxDbxT/tnFk85l6eugZ6ewBYET1HvCvUov8KKDrjL3/ttJqZjDjg0L2/56Ki+8otPLoroc1Q5USFHyIOvSE9js11LkZA3dQyhWmwsGwBJrbGUjCx4xI/jJQmmm8HRd7ZTNs3FUVvzlug3eAXEIHTQyo10nnchSyfCgXYTnn+nKeXVcf8KrKABHPK6BX734tPpO+W+29r8+5832XZv+iSf6ouBg4dTbaCDr4KVPpVkh+ZthNdxNFxxW0WdSdxcPLIYR+XmCCjqwwyaYWSd7xXNzmbddvsJEx7JP6K/C9YiR8XIWWVY36JDGWE7Hc5YJW7RFdNqzwg/urjJj77blJFiXuOEybtv6ZzWbesR1krI+RbAayyp1qIyOVNCw0mjXjCxW4xHlu6MSi0jolME7OUmHvVGegsTcWFxNBrxhuiRKkcGa5kBju3iXwDR6CJe15GXkymQrgK36IoZQN5DY6djy1KXOzctsjSbHtZYTM9NnU4PAx3CHHwVSOwM1Xir5k0FQ2XF5fh5vDgTu35udD5v852qOhOvWID/Q4ljafaK9r5m3dhuwgg8qhc1TKbT/VI42yAHQpPNzDCD41jyXK6tUI8GrJABPOkNi6gqncRRz+Wo2miCmJNNJE8XISbk3l9xWrBtrSUpljw+VD6TDNyeuXQ2rjVmo2JrrURuNJheAJvi3MDt2e8WJZFB6MxjMcZY0SNzcOZfsXHqt9moH2VOAF7LjpCPuDIGUCzm6EYixVyBHJK0RU9LRU8HzQXd+4MnlnmKNtKc2YBIIdzWB0VxcbU5l5ucXZA4zauTcLFag6vIhW7ZdBbHzD69REaXm+49SkRAwY8Kes52eid8hlGjPEm/RJNnBY4W3a0K3v/NKT5t0uum9L2Suj7WyLT3cqZXjpCQtzqDg6/TWjyj1SgGnUbDuScEUon8zrjcJiq2N4hoIdzBd5B93a6Y5uJE1OrnzRSPY7JUBrWUUvSQr9E67R623fwF5u8oEvvzKVPSu/AQJGJ0t2vY2Bz9vpPEODXeV7zT01COFTRcNOOAHrGZpxxFmrclQkTVD1FvwKom9caOqNowIn6NasBIXZVUYGezZtOlkajmDfI4B4qYQQ+H+Fa6J3+BpedCXHAIn6YhFuFwwgyH3WYA+78lBf0JzvVJ05ROx+FVD/bOvwT1+y0rJshTeyAybS3HM5qzdZRJJOQlHKlJ0qVkfM7ElUZOFQ0Z7amGtFsyO1o1a/sJU7Br7iBkcEF2YIQ8rwAHdZmhgtDAESFB3KK77aW7Xg/kENCejKzdpkmpPA56AvijlIAHXx38SwvWaT02GpsIH6658MDtmc7F5cYmW2jXET8VNA7Woy6WdG46LjTrtgSYXekTHp4jDkvhHGF0QwN0X2K5kjVB3KK7zQBsUgCUl757VH/wrxegytGq8mKFZc9GoCkOT2K3aSma05wZxfCILnV2CyrgBVvopcnEPDbpl9WbZMUz4H6mGlDLfLdgtjRrptiLqMqunRqW3aITDn2hok9L2Y+7uUbfy1wQt+guN4B9Xtdg3WuXQDyu15V/+It75IDn//2UOn8aym8x2NuGmeOGM72WbINK1MdQRTVgiIGqSdzOqNpsxZXmtESuEHDro8bhennbWhyPer2c5GWwUu8OgQzoQQY965XsPBA28BFuF4CT+faKPvcuN4Buv89E1eJ7HfL5go4kU8V+t3ma9/1nK+SQFa9u8jNE8BLLEsWooAU7CRKF3Pogksb1xgO50YUFMa6uKiEdA4phvl0zLI5H+6SxKe+m7cGwmozmQc9skz5XObagHK2fZlGUM1b0oXe5p2H7nKdcUJx30mg31RpZo/gXq+phBE10UTQybarx/VqKqkCdkG5YlVSMW0qqzUJUbo4BOQL1eh1OSdoqm7mlUUsaMz3IcNx9Pzl80n2vo3Pqi9h69Tb6N1xLO/0v2pT1bgAast/j+IlHxi59yJvvTuEOIYm8bPpMXrs9al79SQi/BYH8XA/SJzZtrcaR5kwBr4YQCfcMZn+JXDepL22OKo2cGL+GUKHgAuLpKcwujVjTrJqyyO4XRhAVhHvoP+MiGudcS38sIeZCmiLAaSv0+LvsOTt9z+EbLaeeG5N6B0c36afuiNS5l6C6XCQyULyPQmwalOyS5swaDOMrLscvyCTO5nuN/ORsLyq2rXoJFnwnHtTQ7ZbMzlYtKvdjmdKVCb4TBm7RNRHy3AI87VAKxtNDgCtWSCG7zABy0WBs33i3k0++oaSvPy83gvBs9XIMoWP9FbRo2zqatIkkWHmT5fhIE/mdcbk7awud9Rg3PtiJhdn+GK/0C8bPrY2TdsUkK119e+gW3ejh7FvpPKVAXtqktFZIjF260n36sh6z/1bX0w6LYq/6LEHPUtX68D+H2m+nxGa7FqKez9lxNRIHM0U/yPONK61ufny2J3FaHbg9A6HgRXZ0i7KjWbf11EpphU1x2S1acugZDn12Hxk3lHErJMAuOwRf+N0+Lzsh4d7/aNuLv58eum3Ov9Aanm4G2gxz+PUKRlTL8TzlKAEdxz/eW/3HjgpOrFuMq0tpVF0cRdSETHQRj+tUpLk0FvX6ESXCFCRYtrkNoKcL/n6le9EwTmy3T1W7zAA+/KWuXPDVvnZ7Pv7K99KnzDf9ofmYvAgapLrbACW2XapRnqItoBqswZJ6gzG+n9SWNkXVZk7R9UK4+j7i1amRhaXRKLcwFo14S2LC7VKHvU/0ADCHgrtopXbMu8wAbt2WaqcnFCKcWt1ajmQxEUFDKdUrxHaBSrRFC3ZEhXqw1pIAHjWJ7yUjS/mo3KyikoTKuRcP3kjarthtrbotphHTITrv/LxIDCzgTsHfqitYeH6Xrb9rppTIwYYy6dS0/2Ec6ZXesyXI+B8U1PXkTE+rsWpkCnjdXbeaj0CeYZpjrbklrjSrErkxAjoFjKOrkSwsTti4VbLFcEfwgXaGn83ApcDV8aCA1oroZ9dtQFPL+vWGbV8tKt7M5ZLo63FkLkMkXS65sxIP9DNis6DFqKd5sw5DJWSFB/WitthdSiZmliTXi9UFjPdR8JZWp2zmm7VovB/LRMDZXxkoomkwlxjMlYLOpOQxe5oX6IP3VnnKVIX15yt3/uud6bFPLf+gXIovE8PWFXU7Dpr2ei3bWa1Fi2oooIHSHIcVFYzVWVvqpFGpvUGsq4UubNup2HRuOpZeQeKwtQh+Nv1vjpAvV8n/qI/3EUJhhdIhdpkBvHPdTpo9pZizTJ25UW66pdXPJfZqQS5RkSVWqqOQSF+smacYWc3bMSRgYdvBQJe4tjSXG5tvi01H8YEOvgOcwgPtklls1OyoN5KErjXn0RkHl3q4sUUvjYjxeGorFKS7y56/ms+zo9kl7Xqq5bz+8IIi5UJ8J8oXBe5ckafxihhxWopmtBDlEKYI2gNBUoncfDyy6OPaYl5EJeTBF8V3KnaxWbfeWWoasA7rsJ8ZJeKb11D6wjTF7U2uY5qSGgw7WZmw6F02OH7y18NqIn+UckhHWf/aBfGqfWvkJhH5jsC+io6wO+8EFNVYer4eowVjf1buMATeINa140rz/qjYroGuUSTMVmwQ75O6RBqLk1GlMWZLGGxIt+cw5W12lPwVz2f6ujx0v8Vz5ARq+rEVPB7t8hXwOGB8tEQUGT2gUgXDNhHzBRW5YTjud9fgh1hmfSnapgVTx1ALub1VDzZONTcxZ6JSu4CXYPV9xIOPpdWu2M3NqpHUUFvBbpK/ohoGv50ClyWYr/89LP0P1rIPZf3bFRZmlxvA1R+K2DHbJooM97aaYiVKxZjrgMuBneyOOXk54K1gu9SSFCtlfMCkewWTuLm41toRVVojEqflgI5GNY5umkhrYSpKugWTD+z2XGYz6FfLRDcD7MP1fJnncTormxe8W85AP/lEiW4vRQwqvRbdfrNpjHzLGK4Q6O36X1RPxKIWI6FoJwgY7zPo52U0KrfnkvH5OROlZZwJVvxGFPGWxU7Vtho1u64fyUhgn78AS4K5TDHX3sSObsSdch+38Sy+wKWysqrabU4AI5a4INh8HvGRJAXzfRvJV0TY+XPKePwM4n1SrcSbtRI1VKiiGuxwJ4oXo4241I7iSmOtGF8MdvBVRRRt12xvfiJK0+SR1/XcrXIhd1rs5xNyt++HIyZWqFMIkBKx235x0/+qECXgOoYksfi+64jwPYUrURrsulXYYU2bSpyjaKug4WZ/bxCjaVJb2hzXF3pi3IQSrrkeKj01bGnVbK9ZNWMq2NCFyRVmgCsM5vuC9rdQlD6GA5jkGys8+8NuTvzpNpTI9okKsR58fhWTjzdF+fhzEpnbHtTH40ABa9qUop3ko5qKTIbK8hrK44jSZjI2l0aVZqyKDZbm6EGN+FY1WmjWrHURoxCw1OJQrAjzvYT4yxaZq1AmJtIyOTbRDSLQbjWAuz9ZhYKlNF3kpxd1JRkpNAuTpSttbK9Vpf24B6uqat50dCRuaSLgQuX4DsqbSOSbUaUzY4vdSbF+3cDrE+zWN01jac9NRbVm1dT5WeuiIKhH8egMRJeNMnZ1k9/pLdJkP9bRoU0vUCPt3b4i3vGJKrkqJMVY1x8DlWl2iuGrgn4PHkd8pqJYmaEQLfmcmVIj5ZVU3C/KoqgKUbHTz0/NtG2xk6iXx1pJ+XEjCi6W+U7Fbm5XTC41VHZxfZ/HIlLbwzdT5Iot3NuBvxKIeQFCV/YNJtiKbAkbW1Jc23PLZ2dIKjhBrxK4BFgYfuXRvZyB2QiluKWVqI+VUcIm3XuJ/FxUbi3GlUZNojQJWd/HOrq9vHQWJm2S5iRvHkw6CYGmKKOYzc+n/OU3Ufux41ucw/76JhL+gW2BxBqwIgZw64di4iTCRjF3fmVG+jt7s8B3EK5HSHm0L0fwRNLUSiSUo8qggXOoRJdBnm9Ubu2I64stET+Jl5CtENVFzLZrxjdqZkNqKYd3e2pzgug7f87oNYdA67mcLRcywRgRszL9uH/k8bBiTgGHY/auHUSVCCmCWLlJjHxeRLb8nLJ+M6pgpaOl6F4tWK/COAFbCKGiYrWX1Bu5pLpUQzQOleZovKLgGyO2tTge91wUNPBuiADmBynmc0eQ2/QmapxCUQG+szuuhB4lK/ambv1QxNHP2x9A1VhRkSURvo3KdSAdHuEqIJ5BXf9qbDVviniNQ9b3MZFrx7Xmpri6ZCRyEyup018VSDpYtjZGItuqmFFWoL7PI2AW5Irt+GtHuD9NuEvexfu5gg4Xy0Ro2VZWP7f9eB4Z/mPEgMr9IBcJ8tPhV379KqBAJEsUo3nydhwjI4H0NsCLSpJ2cuOz7ajYjtSbXOB4n16rFs23K6bojIwScmXkZ76xqy1y8SJufp4ODhSewUkBfP4PxYoawKZ/GkFV8baqznmZ6dsGxl6iwnfhN5wFBpGdqsVoQUfiOY0lRgNdMimggkTaiIrtVlRurZM4HQ9ZaVGUtJuXdHZNVG2XTUGCXogwaHGAzgjyX3ny1/4W9/lRYhyGs3huOMl+iRVfIe/9xzqWFCTS6kiJpXpxm8BlwA0wSAZ9aMRhWNC8xRfsNDZcPy+GxSWiSmsxPzk3Z5J+IWSiy9Dtub1TNltbZVN1QilwsJsADYUrBK529No3sFYc8EymgtYm+GWCzKDqu1TiiF67QTrbo1wqXdV36Vd6Lj3QqY7IL+cMDOJ9oBzPaSUyGJkIOsEJTsQ34nKzF9caFTHeBqvv41Gj9Fp121uYiCMXST7w1l8VlYjonjyF/xsR3THD0dS5Wg2W77M9qN//lwmiKK/CLZt3MFkq0+sL9811HohILuv0uKWfqv+VXbTisNL2tdhpObLDm6cwGvMGBB9X2jviStOIuPWDUt9hEMG5WGYaIyZp1uwGbyQfOs1R0VZMfM0k01dVqDWmuEmexhQm8KXXQxFEV/f9rxLVeomeh4lynqPW1cjH9qe5yHzRGu7Vny8MMzj4NrUYbdGcKSFMEDK4XkEi55LRBaLqUqwQBZz98Vb6jVE736zbvjfkw0d7KgLfE+SLFdjxcmKKlDQFdq5QZuyjIdhkcVC9inrHu8+JVJNFWTdiZv/w7NzXDloT3djto84P+suKV4iNaj32JFLAay7Y9mcw+JfiSmtLVG0UTJLWh9X1g2A8TWeYWRy1xXbR1AyhAq+XtQMgcyCXAVd/FPof5jaZYY57aLOBw8NJ9zAEiw68/oKIf7nU86oXtbjyuhLHH4JCcteNd6eX3HSve6qIHhQZgcgsUYoaWopGiSQfrLKzDsKd42KnnRubW7K5Xh1nisHKmiukiXRadbvYrth1zkgtWPmLoUhAH+Rqgcs7tOZO5UYS6lqlyn1Bm988PEG3i1ffqjDuOf4Qo3LKgohs6ni4BJFLRekO6gZH230tmcdQDrnXBlQs7ajU0bjSmDZxvxwu0QWMV9ctGz+3Ni71ChIHTHCH4ewvyAOCXCjIDSkpeUakx+2E35Y9PEEN4H++1XL1xRVSL5x1SqRwE59+a/Eer3KFwE/ESEuLtqRFO46QC+Q/Ux3G9MfVxvbc+Py8SdK66q7pnfuYBALvrDzQrpiFdsmMeSQfPt6HJnAV6NUgrYhEQDTPoSwwE06630Dwm/LjDrb8eJPja5/pc/jbT5XohUsaW3OdzUWf10p8OyU7imGKUCVFBkVFkMj3kvqijapLNRUSQhSbk2EoiBHXGIv80qgteqFM2PcoAAa5xWI/Z7CbInJYrAI4eizKuoDi/XpCZwgBcOR+ESd9oMNd21VlC9TXR/e5WC/zFbuP5mwBqCH44etfiQpzy78hgBFDx0R+0SQpYtOSYlIUGXa83N08KIsgopp6kVarajutapRTQc2DprFSZZWXFxwF4kGDSXNtQnKtQLNHX8qUdZFF+rL/Cojz2FkVBgBw8x1dqsUcx312kRveN5JOTLvvgbkJiPFIuGh2BUQHQc8IXgLKAsMAN1UZiMIw+Cho/ykApJfiO5OsZ5ZtupPtIE8JJtUjZdUYQKlkKJcs37kQ6rUGUa6S9mKTYuTBdI4Qb3n5Vk4UMQpmOcQ9kKKGxe58BB4h8OGX5RcjQJEKs2zF4yhSXqHiho+PVWMAkYlodlL2u7yO32BJ+w76RvAKNnBkiw7q/SwfhoOPOcD2Fat+0FcltDAMMlR7NNUQ4ehjwh8vMzIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjJWHf8/ftAmPsVSYvIAAAAldEVYdGRhdGU6Y3JlYXRlADIwMjAtMTAtMjlUMDI6NTA6MDYrMDA6MDASZ++eAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIwLTEwLTI5VDAyOjUwOjA2KzAwOjAwYzpXIgAAAABJRU5ErkJggg==`; diff --git a/src/views/demo/feat/download/index.vue b/src/views/demo/feat/download/index.vue new file mode 100644 index 0000000..47c8655 --- /dev/null +++ b/src/views/demo/feat/download/index.vue @@ -0,0 +1,59 @@ + + diff --git a/src/views/demo/feat/full-screen/index.vue b/src/views/demo/feat/full-screen/index.vue new file mode 100644 index 0000000..aefa3fe --- /dev/null +++ b/src/views/demo/feat/full-screen/index.vue @@ -0,0 +1,45 @@ + + diff --git a/src/views/demo/feat/icon/index.vue b/src/views/demo/feat/icon/index.vue new file mode 100644 index 0000000..7e3d50f --- /dev/null +++ b/src/views/demo/feat/icon/index.vue @@ -0,0 +1,96 @@ + + diff --git a/src/views/demo/feat/img-preview/index.vue b/src/views/demo/feat/img-preview/index.vue new file mode 100644 index 0000000..721dc2a --- /dev/null +++ b/src/views/demo/feat/img-preview/index.vue @@ -0,0 +1,38 @@ + + diff --git a/src/views/demo/feat/menu-params/index.vue b/src/views/demo/feat/menu-params/index.vue new file mode 100644 index 0000000..1a566b2 --- /dev/null +++ b/src/views/demo/feat/menu-params/index.vue @@ -0,0 +1,42 @@ + + diff --git a/src/views/demo/feat/msg/index.vue b/src/views/demo/feat/msg/index.vue new file mode 100644 index 0000000..f0eb5a3 --- /dev/null +++ b/src/views/demo/feat/msg/index.vue @@ -0,0 +1,85 @@ + + diff --git a/src/views/demo/feat/print/index.vue b/src/views/demo/feat/print/index.vue new file mode 100644 index 0000000..723e201 --- /dev/null +++ b/src/views/demo/feat/print/index.vue @@ -0,0 +1,46 @@ + + diff --git a/src/views/demo/feat/ripple/index.vue b/src/views/demo/feat/ripple/index.vue new file mode 100644 index 0000000..afd4b0a --- /dev/null +++ b/src/views/demo/feat/ripple/index.vue @@ -0,0 +1,31 @@ + + + + diff --git a/src/views/demo/feat/session-timeout/index.vue b/src/views/demo/feat/session-timeout/index.vue new file mode 100644 index 0000000..5ad7a92 --- /dev/null +++ b/src/views/demo/feat/session-timeout/index.vue @@ -0,0 +1,51 @@ + + diff --git a/src/views/demo/feat/tab-params/index.vue b/src/views/demo/feat/tab-params/index.vue new file mode 100644 index 0000000..c2e06fe --- /dev/null +++ b/src/views/demo/feat/tab-params/index.vue @@ -0,0 +1,27 @@ + + diff --git a/src/views/demo/feat/tabs/TabDetail.vue b/src/views/demo/feat/tabs/TabDetail.vue new file mode 100644 index 0000000..d768cca --- /dev/null +++ b/src/views/demo/feat/tabs/TabDetail.vue @@ -0,0 +1,28 @@ + + + diff --git a/src/views/demo/feat/tabs/index.vue b/src/views/demo/feat/tabs/index.vue new file mode 100644 index 0000000..b6e7155 --- /dev/null +++ b/src/views/demo/feat/tabs/index.vue @@ -0,0 +1,66 @@ + + diff --git a/src/views/demo/feat/watermark/index.vue b/src/views/demo/feat/watermark/index.vue new file mode 100644 index 0000000..b1acd7e --- /dev/null +++ b/src/views/demo/feat/watermark/index.vue @@ -0,0 +1,28 @@ + + diff --git a/src/views/demo/feat/ws/index.vue b/src/views/demo/feat/ws/index.vue new file mode 100644 index 0000000..348fe33 --- /dev/null +++ b/src/views/demo/feat/ws/index.vue @@ -0,0 +1,120 @@ + + diff --git a/src/views/demo/form/AdvancedForm.vue b/src/views/demo/form/AdvancedForm.vue new file mode 100644 index 0000000..e861d37 --- /dev/null +++ b/src/views/demo/form/AdvancedForm.vue @@ -0,0 +1,191 @@ + + diff --git a/src/views/demo/form/AppendForm.vue b/src/views/demo/form/AppendForm.vue new file mode 100644 index 0000000..91ee937 --- /dev/null +++ b/src/views/demo/form/AppendForm.vue @@ -0,0 +1,118 @@ + + diff --git a/src/views/demo/form/CustomerForm.vue b/src/views/demo/form/CustomerForm.vue new file mode 100644 index 0000000..abb384d --- /dev/null +++ b/src/views/demo/form/CustomerForm.vue @@ -0,0 +1,85 @@ + + diff --git a/src/views/demo/form/DynamicForm.vue b/src/views/demo/form/DynamicForm.vue new file mode 100644 index 0000000..077904c --- /dev/null +++ b/src/views/demo/form/DynamicForm.vue @@ -0,0 +1,258 @@ + + diff --git a/src/views/demo/form/RefForm.vue b/src/views/demo/form/RefForm.vue new file mode 100644 index 0000000..29b2136 --- /dev/null +++ b/src/views/demo/form/RefForm.vue @@ -0,0 +1,174 @@ + + diff --git a/src/views/demo/form/RuleForm.vue b/src/views/demo/form/RuleForm.vue new file mode 100644 index 0000000..2ad6267 --- /dev/null +++ b/src/views/demo/form/RuleForm.vue @@ -0,0 +1,260 @@ + + diff --git a/src/views/demo/form/UseForm.vue b/src/views/demo/form/UseForm.vue new file mode 100644 index 0000000..c11b88d --- /dev/null +++ b/src/views/demo/form/UseForm.vue @@ -0,0 +1,190 @@ + + diff --git a/src/views/demo/form/index.vue b/src/views/demo/form/index.vue new file mode 100644 index 0000000..1432f2c --- /dev/null +++ b/src/views/demo/form/index.vue @@ -0,0 +1,622 @@ + + diff --git a/src/views/demo/jeecg/AsyncTreeTable.vue b/src/views/demo/jeecg/AsyncTreeTable.vue new file mode 100644 index 0000000..f3e24fa --- /dev/null +++ b/src/views/demo/jeecg/AsyncTreeTable.vue @@ -0,0 +1,57 @@ + + + diff --git a/src/views/demo/jeecg/ImgDragSort.vue b/src/views/demo/jeecg/ImgDragSort.vue new file mode 100644 index 0000000..cb289e5 --- /dev/null +++ b/src/views/demo/jeecg/ImgDragSort.vue @@ -0,0 +1,80 @@ + + + + + diff --git a/src/views/demo/jeecg/ImgTurnPage.vue b/src/views/demo/jeecg/ImgTurnPage.vue new file mode 100644 index 0000000..9859c2e --- /dev/null +++ b/src/views/demo/jeecg/ImgTurnPage.vue @@ -0,0 +1,170 @@ + + + diff --git a/src/views/demo/jeecg/InnerExpandTable.vue b/src/views/demo/jeecg/InnerExpandTable.vue new file mode 100644 index 0000000..2b011ed --- /dev/null +++ b/src/views/demo/jeecg/InnerExpandTable.vue @@ -0,0 +1,243 @@ + + + + diff --git a/src/views/demo/jeecg/JCodeEditDemo.vue b/src/views/demo/jeecg/JCodeEditDemo.vue new file mode 100644 index 0000000..80c4233 --- /dev/null +++ b/src/views/demo/jeecg/JCodeEditDemo.vue @@ -0,0 +1,67 @@ + + diff --git a/src/views/demo/jeecg/JEditorDemo.vue b/src/views/demo/jeecg/JEditorDemo.vue new file mode 100644 index 0000000..10657eb --- /dev/null +++ b/src/views/demo/jeecg/JEditorDemo.vue @@ -0,0 +1,99 @@ + + + + + + + diff --git a/src/views/demo/jeecg/JUploadDemo.vue b/src/views/demo/jeecg/JUploadDemo.vue new file mode 100644 index 0000000..c7f2cd8 --- /dev/null +++ b/src/views/demo/jeecg/JUploadDemo.vue @@ -0,0 +1,84 @@ + + + diff --git a/src/views/demo/jeecg/JVxeTableDemo/JVxeDemo1.vue b/src/views/demo/jeecg/JVxeTableDemo/JVxeDemo1.vue new file mode 100644 index 0000000..8f382bb --- /dev/null +++ b/src/views/demo/jeecg/JVxeTableDemo/JVxeDemo1.vue @@ -0,0 +1,403 @@ + + + diff --git a/src/views/demo/jeecg/JVxeTableDemo/JVxeDemo2.vue b/src/views/demo/jeecg/JVxeTableDemo/JVxeDemo2.vue new file mode 100644 index 0000000..e87fe5b --- /dev/null +++ b/src/views/demo/jeecg/JVxeTableDemo/JVxeDemo2.vue @@ -0,0 +1,179 @@ + + + diff --git a/src/views/demo/jeecg/JVxeTableDemo/JVxeDemo3.vue b/src/views/demo/jeecg/JVxeTableDemo/JVxeDemo3.vue new file mode 100644 index 0000000..d4a1029 --- /dev/null +++ b/src/views/demo/jeecg/JVxeTableDemo/JVxeDemo3.vue @@ -0,0 +1,129 @@ + + + diff --git a/src/views/demo/jeecg/JVxeTableDemo/JVxeDemo4.vue b/src/views/demo/jeecg/JVxeTableDemo/JVxeDemo4.vue new file mode 100644 index 0000000..d11f699 --- /dev/null +++ b/src/views/demo/jeecg/JVxeTableDemo/JVxeDemo4.vue @@ -0,0 +1,153 @@ + + + diff --git a/src/views/demo/jeecg/JVxeTableDemo/JVxeDemo5.vue b/src/views/demo/jeecg/JVxeTableDemo/JVxeDemo5.vue new file mode 100644 index 0000000..c756fc2 --- /dev/null +++ b/src/views/demo/jeecg/JVxeTableDemo/JVxeDemo5.vue @@ -0,0 +1,129 @@ + + diff --git a/src/views/demo/jeecg/JVxeTableDemo/func-demo/JSBCDemo.vue b/src/views/demo/jeecg/JVxeTableDemo/func-demo/JSBCDemo.vue new file mode 100644 index 0000000..b44d4ef --- /dev/null +++ b/src/views/demo/jeecg/JVxeTableDemo/func-demo/JSBCDemo.vue @@ -0,0 +1,224 @@ + + + + + diff --git a/src/views/demo/jeecg/JVxeTableDemo/func-demo/PopupSubTable.vue b/src/views/demo/jeecg/JVxeTableDemo/func-demo/PopupSubTable.vue new file mode 100644 index 0000000..6febff6 --- /dev/null +++ b/src/views/demo/jeecg/JVxeTableDemo/func-demo/PopupSubTable.vue @@ -0,0 +1,244 @@ + + + + + diff --git a/src/views/demo/jeecg/JVxeTableDemo/func-demo/SocketReload.vue b/src/views/demo/jeecg/JVxeTableDemo/func-demo/SocketReload.vue new file mode 100644 index 0000000..1ee4c9d --- /dev/null +++ b/src/views/demo/jeecg/JVxeTableDemo/func-demo/SocketReload.vue @@ -0,0 +1,126 @@ + + + + + diff --git a/src/views/demo/jeecg/JVxeTableDemo/index.vue b/src/views/demo/jeecg/JVxeTableDemo/index.vue new file mode 100644 index 0000000..8c5f19d --- /dev/null +++ b/src/views/demo/jeecg/JVxeTableDemo/index.vue @@ -0,0 +1,40 @@ + + + diff --git a/src/views/demo/jeecg/JVxeTableDemo/layout-demo/ErpTemplate.vue b/src/views/demo/jeecg/JVxeTableDemo/layout-demo/ErpTemplate.vue new file mode 100644 index 0000000..c468134 --- /dev/null +++ b/src/views/demo/jeecg/JVxeTableDemo/layout-demo/ErpTemplate.vue @@ -0,0 +1,319 @@ + + + + + diff --git a/src/views/demo/jeecg/JVxeTableDemo/layout-demo/Template1.vue b/src/views/demo/jeecg/JVxeTableDemo/layout-demo/Template1.vue new file mode 100644 index 0000000..37ab585 --- /dev/null +++ b/src/views/demo/jeecg/JVxeTableDemo/layout-demo/Template1.vue @@ -0,0 +1,332 @@ + + + + + diff --git a/src/views/demo/jeecg/JVxeTableDemo/layout-demo/Template2.vue b/src/views/demo/jeecg/JVxeTableDemo/layout-demo/Template2.vue new file mode 100644 index 0000000..cb4e22c --- /dev/null +++ b/src/views/demo/jeecg/JVxeTableDemo/layout-demo/Template2.vue @@ -0,0 +1,249 @@ + + + + + diff --git a/src/views/demo/jeecg/JVxeTableDemo/layout-demo/Template3.vue b/src/views/demo/jeecg/JVxeTableDemo/layout-demo/Template3.vue new file mode 100644 index 0000000..8ff7272 --- /dev/null +++ b/src/views/demo/jeecg/JVxeTableDemo/layout-demo/Template3.vue @@ -0,0 +1,237 @@ + + + + + diff --git a/src/views/demo/jeecg/JVxeTableDemo/layout-demo/Template4.vue b/src/views/demo/jeecg/JVxeTableDemo/layout-demo/Template4.vue new file mode 100644 index 0000000..67f2411 --- /dev/null +++ b/src/views/demo/jeecg/JVxeTableDemo/layout-demo/Template4.vue @@ -0,0 +1,340 @@ + + + + + diff --git a/src/views/demo/jeecg/JVxeTableDemo/layout-demo/Template5.vue b/src/views/demo/jeecg/JVxeTableDemo/layout-demo/Template5.vue new file mode 100644 index 0000000..a28076d --- /dev/null +++ b/src/views/demo/jeecg/JVxeTableDemo/layout-demo/Template5.vue @@ -0,0 +1,221 @@ + + + + + diff --git a/src/views/demo/jeecg/JVxeTableDemo/layout-demo/index.vue b/src/views/demo/jeecg/JVxeTableDemo/layout-demo/index.vue new file mode 100644 index 0000000..15a8832 --- /dev/null +++ b/src/views/demo/jeecg/JVxeTableDemo/layout-demo/index.vue @@ -0,0 +1,35 @@ + + + + + diff --git a/src/views/demo/jeecg/JeecgComponents.vue b/src/views/demo/jeecg/JeecgComponents.vue new file mode 100644 index 0000000..5cd80c5 --- /dev/null +++ b/src/views/demo/jeecg/JeecgComponents.vue @@ -0,0 +1,157 @@ + + + diff --git a/src/views/demo/jeecg/JeecgPdfView.vue b/src/views/demo/jeecg/JeecgPdfView.vue new file mode 100644 index 0000000..0a009e9 --- /dev/null +++ b/src/views/demo/jeecg/JeecgPdfView.vue @@ -0,0 +1,93 @@ + + + diff --git a/src/views/demo/jeecg/Native/less/TableExpand.less b/src/views/demo/jeecg/Native/less/TableExpand.less new file mode 100644 index 0000000..407ff14 --- /dev/null +++ b/src/views/demo/jeecg/Native/less/TableExpand.less @@ -0,0 +1,102 @@ +/** [表格主题样式一] 表格强制列不换行 */ +.j-table-force-nowrap { + td, + th { + white-space: nowrap; + } + + .ant-table-selection-column { + padding: 12px 22px !important; + } + + /** 列自适应,弊端会导致列宽失效 */ + + &.ant-table-wrapper .ant-table-content { + overflow-x: auto; + } +} + +/** 查询区域通用样式*/ +.table-page-search-wrapper { + .ant-form-inline { + .ant-form-item { + display: flex; + margin-bottom: 24px; + margin-right: 0; + + .ant-form-item-control-wrapper { + flex: 1 1; + display: inline-block; + vertical-align: middle; + } + + > .ant-form-item-label { + line-height: 32px; + padding-right: 8px; + width: auto; + } + + .ant-form-item-control { + height: 32px; + line-height: 32px; + } + } + } + + .table-page-search-submitButtons { + display: block; + margin-bottom: 24px; + white-space: nowrap; + } +} + +/*列表上方操作按钮区域*/ +.ant-card-body .table-operator { + margin-bottom: 8px; +} + +/** Button按钮间距 */ +.table-operator .ant-btn { + margin: 0 8px 8px 0; +} + +.table-operator .ant-btn-group .ant-btn { + margin: 0; +} + +.table-operator .ant-btn-group .ant-btn:last-child { + margin: 0 8px 8px 0; +} + +/*列表td的padding设置 可以控制列表大小*/ +.ant-table-tbody .ant-table-row td { + padding-top: 15px; + padding-bottom: 15px; +} + +/*列表页面弹出modal*/ +.ant-modal-cust-warp { + height: 100%; +} + +/*弹出modal Y轴滚动条*/ +.ant-modal-cust-warp .ant-modal-body { + height: calc(100% - 110px) !important; + overflow-y: auto; +} + +/*弹出modal 先有content后有body 故滚动条控制在body上*/ +.ant-modal-cust-warp .ant-modal-content { + height: 90% !important; + overflow-y: hidden; +} + +/*列表中有图片的加这个样式 参考用户管理*/ +.anty-img-wrap { + height: 25px; + position: relative; +} + +.antd-more a { + color: #000000; +} diff --git a/src/views/demo/jeecg/Native/one/OneNativeList.vue b/src/views/demo/jeecg/Native/one/OneNativeList.vue new file mode 100644 index 0000000..7eec227 --- /dev/null +++ b/src/views/demo/jeecg/Native/one/OneNativeList.vue @@ -0,0 +1,419 @@ + + + diff --git a/src/views/demo/jeecg/Native/one/components/OneNativeForm.vue b/src/views/demo/jeecg/Native/one/components/OneNativeForm.vue new file mode 100644 index 0000000..d505db3 --- /dev/null +++ b/src/views/demo/jeecg/Native/one/components/OneNativeForm.vue @@ -0,0 +1,455 @@ + + + + + diff --git a/src/views/demo/jeecg/Native/one/components/OneNativeModal.vue b/src/views/demo/jeecg/Native/one/components/OneNativeModal.vue new file mode 100644 index 0000000..014b15d --- /dev/null +++ b/src/views/demo/jeecg/Native/one/components/OneNativeModal.vue @@ -0,0 +1,65 @@ + + + + + diff --git a/src/views/demo/jeecg/PrintDemo.vue b/src/views/demo/jeecg/PrintDemo.vue new file mode 100644 index 0000000..ca04357 --- /dev/null +++ b/src/views/demo/jeecg/PrintDemo.vue @@ -0,0 +1,202 @@ + + + diff --git a/src/views/demo/jeecg/TableTotal.vue b/src/views/demo/jeecg/TableTotal.vue new file mode 100644 index 0000000..d3f1dc5 --- /dev/null +++ b/src/views/demo/jeecg/TableTotal.vue @@ -0,0 +1,62 @@ + + + diff --git a/src/views/demo/jeecg/erplist/JeecgOrderCustomerList.vue b/src/views/demo/jeecg/erplist/JeecgOrderCustomerList.vue new file mode 100644 index 0000000..a8bde6b --- /dev/null +++ b/src/views/demo/jeecg/erplist/JeecgOrderCustomerList.vue @@ -0,0 +1,165 @@ + + + + + diff --git a/src/views/demo/jeecg/erplist/JeecgOrderTicketList.vue b/src/views/demo/jeecg/erplist/JeecgOrderTicketList.vue new file mode 100644 index 0000000..ebb3246 --- /dev/null +++ b/src/views/demo/jeecg/erplist/JeecgOrderTicketList.vue @@ -0,0 +1,164 @@ + + + + + diff --git a/src/views/demo/jeecg/erplist/components/JeecgOrderCustomerModal.vue b/src/views/demo/jeecg/erplist/components/JeecgOrderCustomerModal.vue new file mode 100644 index 0000000..3590ea6 --- /dev/null +++ b/src/views/demo/jeecg/erplist/components/JeecgOrderCustomerModal.vue @@ -0,0 +1,57 @@ + + diff --git a/src/views/demo/jeecg/erplist/components/JeecgOrderModal.vue b/src/views/demo/jeecg/erplist/components/JeecgOrderModal.vue new file mode 100644 index 0000000..f5511cf --- /dev/null +++ b/src/views/demo/jeecg/erplist/components/JeecgOrderModal.vue @@ -0,0 +1,52 @@ + + diff --git a/src/views/demo/jeecg/erplist/components/JeecgOrderTicketModal.vue b/src/views/demo/jeecg/erplist/components/JeecgOrderTicketModal.vue new file mode 100644 index 0000000..3890222 --- /dev/null +++ b/src/views/demo/jeecg/erplist/components/JeecgOrderTicketModal.vue @@ -0,0 +1,57 @@ + + diff --git a/src/views/demo/jeecg/erplist/erplist.api.ts b/src/views/demo/jeecg/erplist/erplist.api.ts new file mode 100644 index 0000000..ca9509d --- /dev/null +++ b/src/views/demo/jeecg/erplist/erplist.api.ts @@ -0,0 +1,139 @@ +import { defHttp } from '/@/utils/http/axios'; +import { Modal } from 'ant-design-vue'; + +enum Api { + list = '/test/order/orderList', + save = '/test/order/add', + edit = '/test/order/edit', + deleteOne = '/test/order/delete', + deleteBatch = '/test/order/deleteBatch', + customList = '/test/order/listOrderCustomerByMainId', + saveCustomer = '/test/order/addCustomer', + editCustomer = '/test/order/editCustomer', + deleteCustomer = '/test/order/deleteCustomer', + deleteBatchCustomer = '/test/order/deleteBatchCustomer', + ticketList = '/test/order/listOrderTicketByMainId', + saveTicket = '/test/order/addTicket', + editTicket = '/test/order/editTicket', + deleteTicket = '/test/order/deleteTicket', + deleteBatchTicket = '/test/order/deleteBatchTicket', +} + +/** + * 列表接口 + * @param params + */ +export const list = (params) => defHttp.get({ url: Api.list, params }); + +/** + * 删除 + */ +export const deleteOne = (params, handleSuccess) => { + return defHttp.delete({ url: Api.deleteOne, params }, { joinParamsToUrl: true }).then(() => { + handleSuccess(); + }); +}; +/** + * 批量删除 + * @param params + */ +export const batchDelete = (params, handleSuccess) => { + Modal.confirm({ + title: '确认删除', + content: '是否删除选中数据', + okText: '确认', + cancelText: '取消', + onOk: () => { + return defHttp.delete({ url: Api.deleteBatch, data: params }, { joinParamsToUrl: true }).then(() => { + handleSuccess(); + }); + }, + }); +}; +/** + * 保存或者更新 + * @param params + */ +export const saveOrUpdate = (params, isUpdate) => { + let url = isUpdate ? Api.edit : Api.save; + return defHttp.post({ url: url, params }); +}; + +/** + * 列表接口 + * @param params + */ +export const customList = (params) => defHttp.get({ url: Api.customList, params }); + +/** + * 删除 + */ +export const deleteCustomer = (params, handleSuccess) => { + return defHttp.delete({ url: Api.deleteCustomer, params }, { joinParamsToUrl: true }).then(() => { + handleSuccess(); + }); +}; +/** + * 批量删除 + * @param params + */ +export const deleteBatchCustomer = (params, handleSuccess) => { + Modal.confirm({ + title: '确认删除', + content: '是否删除选中数据', + okText: '确认', + cancelText: '取消', + onOk: () => { + return defHttp.delete({ url: Api.deleteBatchCustomer, data: params }, { joinParamsToUrl: true }).then(() => { + handleSuccess(); + }); + }, + }); +}; +/** + * 保存或者更新 + * @param params + */ +export const saveOrUpdateCustomer = (params, isUpdate) => { + let url = isUpdate ? Api.editCustomer : Api.saveCustomer; + return defHttp.post({ url: url, params }); +}; +/** + * 列表接口 + * @param params + */ +export const ticketList = (params) => defHttp.get({ url: Api.ticketList, params }); + +/** + * 删除 + */ +export const deleteTicket = (params, handleSuccess) => { + return defHttp.delete({ url: Api.deleteTicket, params }, { joinParamsToUrl: true }).then(() => { + handleSuccess(); + }); +}; +/** + * 批量删除 + * @param params + */ +export const deleteBatchTicket = (params, handleSuccess) => { + Modal.confirm({ + title: '确认删除', + content: '是否删除选中数据', + okText: '确认', + cancelText: '取消', + onOk: () => { + return defHttp.delete({ url: Api.deleteBatchTicket, data: params }, { joinParamsToUrl: true }).then(() => { + handleSuccess(); + }); + }, + }); +}; +/** + * 保存或者更新 + * @param params + */ +export const saveOrUpdateTicket = (params, isUpdate) => { + let url = isUpdate ? Api.editTicket : Api.saveTicket; + return defHttp.post({ url: url, params }); +}; diff --git a/src/views/demo/jeecg/erplist/erplist.data.ts b/src/views/demo/jeecg/erplist/erplist.data.ts new file mode 100644 index 0000000..eb7a756 --- /dev/null +++ b/src/views/demo/jeecg/erplist/erplist.data.ts @@ -0,0 +1,238 @@ +import { BasicColumn } from '/@/components/Table'; +import { FormSchema } from '/@/components/Table'; +import { render } from '/@/utils/common/renderUtils'; + +export const columns: BasicColumn[] = [ + { + title: '订单号', + dataIndex: 'orderCode', + width: 260, + }, + { + title: '订单类型', + dataIndex: 'ctype', + width: 160, + customRender: ({ text }) => { + return text == '1' ? '国内订单' : text == '2' ? '国际订单' : ''; + }, + }, + { + title: '订单日期', + dataIndex: 'orderDate', + width: 300, + }, + { + title: '订单金额', + width: 200, + dataIndex: 'orderMoney', + }, + { + title: '订单备注', + width: 200, + dataIndex: 'content', + }, +]; + +export const searchFormSchema: FormSchema[] = [ + { + label: '订单号', + field: 'orderCode', + component: 'Input', + colProps: { span: 6 }, + }, + { + label: '订单类型', + field: 'ctype', + component: 'Select', + componentProps: { + options: [ + { + label: '国内订单', + value: '1', + key: '1', + }, + { + label: '国际订单', + value: '2', + key: '2', + }, + ], + }, + colProps: { span: 6 }, + }, +]; + +export const formSchema: FormSchema[] = [ + { + label: '', + field: 'id', + component: 'Input', + show: false, + }, + { + label: '订单号', + field: 'orderCode', + component: 'Input', + required: true, + }, + { + label: '订单类型', + field: 'ctype', + component: 'Select', + componentProps: { + options: [ + { + label: '国内订单', + value: '1', + key: '1', + }, + { + label: '国际订单', + value: '2', + key: '2', + }, + ], + }, + }, + { + label: '订单日期', + field: 'orderDate', + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD hh:mm:ss', + }, + }, + { + label: '订单金额', + field: 'orderMoney', + component: 'InputNumber', + }, + { + label: '订单备注', + field: 'content', + component: 'Input', + }, +]; + +export const customColumns: BasicColumn[] = [ + { + title: '客户名', + dataIndex: 'name', + width: 260, + }, + { + title: '性别', + dataIndex: 'sex', + width: 100, + customRender: ({ text }) => { + return render.renderDict(text, 'sex'); + }, + }, + { + title: '身份证号', + dataIndex: 'idcard', + width: 300, + }, + { + title: '电话', + width: 200, + dataIndex: 'telphone', + }, +]; + +export const customerFormSchema: FormSchema[] = [ + { + label: '', + field: 'id', + component: 'Input', + show: false, + }, + { + label: '客户姓名', + field: 'name', + component: 'Input', + required: true, + }, + { + label: '性别', + field: 'sex', + component: 'JDictSelectTag', + componentProps: { + dictCode: 'sex', + placeholder: '请选择性别', + }, + }, + { + label: '身份证号码', + field: 'idcard', + component: 'Input', + }, + { + label: '身份证扫描件', + field: 'idcardPic', + component: 'JImageUpload', + componentProps: { + fileMax: 2, + }, + }, + { + label: '联系方式', + field: 'telphone', + component: 'Input', + rules: [{ required: false, pattern: /^1[3456789]\d{9}$/, message: '手机号码格式有误' }], + }, + { + label: 'orderId', + field: 'orderId', + component: 'Input', + show: false, + }, +]; + +export const ticketColumns: BasicColumn[] = [ + { + title: '航班号', + dataIndex: 'ticketCode', + }, + { + title: '航班时间', + dataIndex: 'tickectDate', + }, + { + title: '创建人', + dataIndex: 'createBy', + }, + { + title: '创建时间', + dataIndex: 'createTime', + }, +]; + +export const ticketFormSchema: FormSchema[] = [ + { + label: '', + field: 'id', + component: 'Input', + show: false, + }, + { + label: '航班号', + field: 'ticketCode', + component: 'Input', + required: true, + }, + { + label: '航班时间', + field: 'tickectDate', + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD', + }, + }, + { + label: 'orderId', + field: 'orderId', + component: 'Input', + show: false, + }, +]; diff --git a/src/views/demo/jeecg/erplist/index.vue b/src/views/demo/jeecg/erplist/index.vue new file mode 100644 index 0000000..29db61d --- /dev/null +++ b/src/views/demo/jeecg/erplist/index.vue @@ -0,0 +1,163 @@ + + + + + diff --git a/src/views/demo/jeecg/index.vue b/src/views/demo/jeecg/index.vue new file mode 100644 index 0000000..4f10c7f --- /dev/null +++ b/src/views/demo/jeecg/index.vue @@ -0,0 +1,54 @@ + + diff --git a/src/views/demo/jeecg/jeecgComponents.data.ts b/src/views/demo/jeecg/jeecgComponents.data.ts new file mode 100644 index 0000000..a848dfd --- /dev/null +++ b/src/views/demo/jeecg/jeecgComponents.data.ts @@ -0,0 +1,885 @@ +import { FormSchema, JCronValidator } from '/@/components/Form'; +import { usePermission } from '/@/hooks/web/usePermission'; + +const { isDisabledAuth } = usePermission(); +export const schemas: FormSchema[] = [ + { + field: 'jdst', + component: 'JDictSelectTag', + label: '性别下拉', + helpMessage: ['component模式'], + componentProps: { + dictCode: 'sex', + }, + colProps: { + span: 12, + }, + }, + { + field: 'jdst', + component: 'JEllipsis', + label: '选中值', + colProps: { span: 12 }, + }, + { + field: 'jdst1', + component: 'JDictSelectTag', + label: '性别选择', + helpMessage: ['component模式'], + componentProps: { + dictCode: 'sex', + type: 'radioButton', + }, + colProps: { + span: 12, + }, + }, + { + field: 'jdst1', + component: 'JEllipsis', + label: '选中值', + colProps: { span: 12 }, + }, + { + field: 'jdst2', + component: 'JDictSelectTag', + label: '字典表下拉', + helpMessage: ['component模式'], + componentProps: { + dictCode: 'sys_user,realname,id', + }, + colProps: { + span: 12, + }, + }, + { + field: 'jdst2', + component: 'JEllipsis', + label: '选中值', + colProps: { span: 12 }, + }, + { + field: 'jdst3', + component: 'JDictSelectTag', + label: '字典表下拉(带条件)', + helpMessage: ['component模式'], + componentProps: { + dictCode: "sys_user,realname,id,username!='admin' order by create_time", + }, + colProps: { + span: 12, + }, + }, + { + field: 'jdst3', + component: 'JEllipsis', + label: '选中值', + colProps: { span: 12 }, + }, + { + field: 'jsst', + component: 'JSearchSelect', + label: '字典搜索(同步)', + colProps: { span: 12 }, + componentProps: { + //dict: "sys_depart,depart_name,id", + dictOptions: [ + { + text: '选项一', + value: '1', + }, + { + text: '选项二', + value: '2', + }, + { + text: '选项三', + value: '3', + }, + ], + }, + }, + { + field: 'jsst', + component: 'JEllipsis', + label: '选择值', + colProps: { span: 12 }, + }, + { + field: 'jsst2', + component: 'JSearchSelect', + label: '字典搜索(异步)', + colProps: { span: 12 }, + componentProps: { + dict: 'sys_depart,depart_name,id', + pageSize: 6, + async: true, + }, + }, + { + field: 'jsst2', + component: 'JEllipsis', + label: '选择值', + colProps: { span: 12 }, + }, + { + field: 'xldx', + component: 'JDictSelectTag', + label: '字典下拉多选', + colProps: { span: 12 }, + componentProps: { + dictCode: 'sex', + mode: 'multiple', + }, + }, + { + field: 'xldx', + component: 'JEllipsis', + label: '选择值', + colProps: { span: 12 }, + }, + { + field: 'xldx2', + component: 'JSelectMultiple', + label: '字典下拉多选2', + colProps: { span: 12 }, + componentProps: { + dictCode: 'sex', + }, + }, + { + field: 'xldx2', + component: 'JEllipsis', + label: '选择值', + colProps: { span: 12 }, + }, + { + field: 'dxxlk', + component: 'JDictSelectTag', + label: '字典下拉单选', + colProps: { span: 12 }, + componentProps: { + dictCode: 'sex', + }, + }, + { + field: 'dxxlk', + component: 'JEllipsis', + label: '选择值', + colProps: { span: 12 }, + }, + { + label: '可输入下拉', + field: 'selectInput', + component: 'JSelectInput', + componentProps: { + options: [ + { label: '选项一', value: '1' }, + { label: '选项二', value: '2' }, + { label: '选项三', value: '3' }, + ], + }, + colProps: { span: 12 }, + }, + { + field: 'selectInput', + component: 'JEllipsis', + label: '选择值', + colProps: { span: 12 }, + }, + { + field: 'depart3', + component: 'JSelectDept', + label: '选择部门—自定义值', + helpMessage: ['component模式'], + componentProps: { showButton: false, rowKey: 'orgCode', primaryKey: 'orgCode' }, + colProps: { + span: 12, + }, + }, + { + field: 'depart3', + component: 'JEllipsis', + label: '选中部门', + colProps: { span: 12 }, + }, + { + field: 'depart2', + component: 'JSelectDept', + label: '选择部门', + helpMessage: ['component模式'], + componentProps: { showButton: false }, + colProps: { + span: 12, + }, + }, + { + field: 'depart2', + component: 'JEllipsis', + label: '选中部门', + colProps: { span: 12 }, + }, + { + field: 'user2', + component: 'JSelectUser', + label: '用户选择组件', + helpMessage: ['component模式'], + componentProps: { + labelKey: 'realname', + rowKey: 'id', + showSelected: true, + }, + colProps: { + span: 12, + }, + }, + { + field: 'user2', + component: 'JEllipsis', + label: '选中用户', + colProps: { span: 12 }, + }, + { + field: 'user3', + component: 'JSelectUserByDept', + label: '部门选择用户', + helpMessage: ['component模式'], + componentProps: { + labelKey: 'realname', + rowKey: 'username', + }, + colProps: { + span: 12, + }, + }, + { + field: 'user3', + component: 'JEllipsis', + label: '选中用户', + colProps: { span: 12 }, + }, + { + field: 'user4', + component: 'JSelectUserByDepartment', + label: '部门选择用户', + helpMessage: ['component模式'], + defaultValue: '', + componentProps: { + labelKey: 'realname', + rowKey: 'username', + }, + colProps: { + span: 12, + }, + }, + { + field: 'user4', + component: 'JEllipsis', + label: '选中用户', + colProps: { span: 12 }, + }, + { + field: 'role2', + component: 'JSelectRole', + label: '角色选择组件', + helpMessage: ['component模式'], + colProps: { + span: 12, + }, + }, + { + field: 'role2', + component: 'JEllipsis', + label: '选中角色', + colProps: { span: 12 }, + }, + { + field: 'position2', + component: 'JSelectPosition', + label: '职务选择组件', + helpMessage: ['component模式'], + colProps: { span: 12 }, + componentProps: { async: true, showSelectTable: true }, + }, + { + field: 'position2', + component: 'JEllipsis', + label: '选中职务', + colProps: { span: 12 }, + }, + { + field: 'checkbox1', + component: 'JCheckbox', + label: 'JCheckbox组件1', + helpMessage: ['component模式'], + defaultValue: '1,2', + componentProps: { + options: [ + { label: '男', value: '1' }, + { label: '女', value: '2' }, + ], + }, + colProps: { + span: 12, + }, + }, + { + field: 'checkbox1', + component: 'JEllipsis', + label: '选中值', + colProps: { span: 12 }, + }, + { + field: 'checkbox2', + component: 'Input', + label: 'JCheckbox组件2', + defaultValue: '1', + helpMessage: ['插槽模式'], + slot: 'JCheckbox', + colProps: { + span: 12, + }, + }, + { + field: 'checkbox2', + component: 'JEllipsis', + label: '选中值', + colProps: { span: 12 }, + }, + { + field: 'data1', + label: '日期选择', + component: 'DatePicker', + componentProps: { + showTime: true, + valueFormat: 'YYYY-MM-DD HH:mm:ss', + }, + colProps: { + span: 12, + }, + }, + { + field: 'data1', + component: 'JEllipsis', + label: '选中值', + colProps: { + span: 12, + }, + }, + { + field: 'data2', + label: '年份范围选择', + component: 'RangePicker', + componentProps: { + picker: 'year', + valueFormat: 'YYYY', + }, + colProps: { + span: 12, + }, + }, + { + field: 'data2', + component: 'JEllipsis', + label: '选中值', + colProps: { + span: 12, + }, + }, + { + field: 'hk', + component: 'Input', + label: '滑块验证码', + helpMessage: ['插槽模式'], + slot: 'dargVerify', + colProps: { + span: 12, + }, + }, + { + field: 'hk', + component: 'JEllipsis', + label: '选中值', + colProps: { + span: 12, + }, + }, + { + field: 'JTreeDict', + component: 'JTreeDict', + label: '树字典', + helpMessage: ['component模式'], + colProps: { span: 12 }, + }, + { + field: 'JTreeDict', + component: 'JEllipsis', + label: '选中值', + colProps: { + span: 12, + }, + }, + { + field: 'ts', + component: 'JTreeSelect', + label: '下拉树选择', + helpMessage: ['component模式'], + componentProps: { + dict: 'sys_permission,name,id', + pidField: 'parent_id', + hasChildField: 'is_leaf', + converIsLeafVal: 0, + }, + colProps: { + span: 12, + }, + }, + { + field: 'ts', + component: 'JEllipsis', + label: '选中值', + colProps: { span: 12 }, + }, + { + field: 'ts1', + component: 'JTreeSelect', + label: '下拉树多选', + helpMessage: ['component模式'], + componentProps: { + dict: 'sys_permission,name,id', + pidField: 'parent_id', + hasChildField: 'is_leaf', + converIsLeafVal: 0, + multiple: true, + }, + colProps: { + span: 12, + }, + }, + { + field: 'ts1', + component: 'JEllipsis', + label: '选中值', + colProps: { span: 12 }, + }, + { + field: 'category', + component: 'JCategorySelect', + label: '分类字典树', + helpMessage: ['component模式'], + defaultValue: '', + componentProps: { + pcode: 'B01', + multiple: true, + }, + colProps: { + span: 12, + }, + }, + { + field: 'category', + component: 'JEllipsis', + label: '选中值', + colProps: { span: 12 }, + }, + { + field: 'JEasyCron', + component: 'JEasyCron', + label: 'JEasyCron', + helpMessage: ['component模式'], + colProps: { span: 12 }, + defaultValue: '* * * * * ? *', + rules: [{ validator: JCronValidator }], + }, + { + field: 'JEasyCron', + component: 'JEllipsis', + label: '选择值', + colProps: { span: 12 }, + }, + { + field: 'JInput', + component: 'JInput', + label: '特殊查询组件', + helpMessage: ['插槽模式'], + slot: 'JInput', + colProps: { + span: 12, + }, + }, + { + field: 'jinputtype', + component: 'Select', + label: '查询类型', + componentProps: { + options: [ + { value: 'like', label: '模糊(like)' }, + { value: 'ne', label: '不等于(ne)' }, + { value: 'ge', label: '大于等于(ge)' }, + { value: 'le', label: '小于等于(le)' }, + ], + }, + colProps: { + span: 6, + }, + }, + { + field: 'JInput', + component: 'JEllipsis', + label: '输入值', + colProps: { span: 6 }, + }, + { + field: 'field1', + component: 'Select', + label: '省市区选择', + helpMessage: ['插槽模式'], + slot: 'jAreaLinkage', + colProps: { + span: 12, + }, + defaultValue: ['130000', '130200'], + }, + { + field: 'field1', + component: 'JEllipsis', + label: '选中值', + colProps: { + span: 12, + }, + }, + { + field: 'field0', + component: 'Select', + label: '禁用组件(方式一)', + helpMessage: ['插槽模式'], + slot: 'jAreaLinkage1', + colProps: { + span: 12, + }, + defaultValue: ['130000', '130200'], + }, + + { + field: 'field0', + component: 'JEllipsis', + label: '选中值', + colProps: { + span: 12, + }, + }, + { + field: 'field2', + component: 'JAreaLinkage', + label: '禁用组件(方式二)', + helpMessage: ['component模式'], + colProps: { + span: 12, + }, + dynamicDisabled: ({ values }) => { + console.log(values); + return isDisabledAuth(['demo.dbarray']); + }, + defaultValue: ['140000', '140300', '140302'], + }, + { + field: 'field2', + component: 'JEllipsis', + label: '选中值', + colProps: { + span: 12, + }, + }, + { + field: 'pca1', + component: 'JAreaSelect', + label: '省市区级联', + helpMessage: ['component模式'], + defaultValue: '140302', + colProps: { + span: 12, + }, + }, + { + field: 'pca1', + component: 'JEllipsis', + label: '选中值', + colProps: { + span: 12, + }, + }, + { + field: 'pop1', + component: 'Input', + label: 'JPopup示例', + helpMessage: ['插槽模式'], + slot: 'JPopup', + colProps: { + span: 12, + }, + }, + { + field: 'pop1', + component: 'JEllipsis', + label: '选中值', + colProps: { + span: 12, + }, + }, + { + field: 'JInputPop', + component: 'JInputPop', + label: 'JInputPop', + helpMessage: ['component模式'], + colProps: { span: 12 }, + }, + { + field: 'JInputPop', + component: 'JEllipsis', + label: '输入值', + colProps: { span: 12 }, + }, + { + field: 'JTreeDictAsync', + component: 'JTreeDict', + label: '异步JTreeDict', + helpMessage: ['component模式'], + colProps: { span: 12 }, + componentProps: { async: true }, + }, + { + field: 'JTreeDictAsync', + component: 'JEllipsis', + label: '选中值', + colProps: { span: 12 }, + }, + { + field: 'JSwitch', + component: 'JSwitch', + label: 'JSwitch', + helpMessage: ['component模式'], + colProps: { span: 12 }, + }, + { + field: 'JSwitch', + component: 'JEllipsis', + label: '选中值', + colProps: { span: 12 }, + }, + { + field: 'JSwitchSelect', + component: 'JSwitch', + label: 'JSwitchSelect', + helpMessage: ['component模式'], + colProps: { span: 12 }, + componentProps: { query: true }, + }, + { + field: 'JSwitchSelect', + component: 'JEllipsis', + label: '选中值', + colProps: { span: 12 }, + }, + + { + field: 'userSelect2', + component: 'UserSelect', + label: '高级用户选择', + helpMessage: ['component模式'], + colProps: { span: 12 }, + }, + { + field: 'userSelect2', + component: 'JEllipsis', + label: '选中值', + colProps: { span: 12 }, + }, + + { + field: 'superQuery', + component: 'Input', + label: '高级查询', + helpMessage: ['插槽模式'], + slot: 'superQuery', + colProps: { span: 12 }, + }, + { + field: 'superQuery', + component: 'JEllipsis', + label: '选中值', + colProps: { span: 12 }, + }, + { + field: 'superQuery1', + component: 'Input', + label: '高级查询', + helpMessage: ['插槽模式-自己保存查询条件'], + slot: 'superQuery1', + colProps: { span: 12 }, + }, + { + field: 'superQuery1', + component: 'JEllipsis', + label: '选中值', + colProps: { span: 12 }, + }, + { + field: 'pop2', + component: 'JPopupDict', + label: 'JPopupDict示例', + colProps: { + span: 12, + }, + componentProps:{ + placeholder: '请选择', + dictCode: 'report_user,username,id', + multi: true, + }, + }, + { + field: 'pop2', + component: 'JEllipsis', + label: '选中值', + colProps: { + span: 12, + }, + }, + { + field: 'sex', + component: 'JDictSelectTag', + label: '性别(控制下方课程options)', + helpMessage: ['component模式','性别不同,下方课程展示选项不同'], + componentProps: { + dictCode: 'sex', + type: 'radioButton', + onChange: (value) => { + console.log(value); + }, + }, + colProps: { + span: 12, + }, + }, + { + field: 'sex', + component: 'JEllipsis', + label: '选中值', + colProps: { span: 12 }, + }, + { + field: 'course', + component: 'Select', + label: '课程', + dynamicPropskey: 'options', + dynamicPropsVal: ({ model }) => { + let options; + if (model.sex == 1) { + return [ + { value: '0', label: 'java - 男' }, + { value: '1', label: 'vue - 男' }, + ]; + } else if (model.sex == 2) { + return [ + { value: '2', label: '瑜伽 - 女' }, + { value: '3', label: '美甲 - 女' }, + ]; + } else { + return []; + } + }, + componentProps: { + disabled: false, + }, + colProps: { + span: 12, + }, + }, + { + field: 'course', + component: 'JEllipsis', + label: '选中值', + colProps: { span: 12 }, + }, + { + field: 'field100', + component: 'JInputSelect', + label: 'JInputSelect', + helpMessage: ['component模式'], + componentProps: { + selectPlaceholder: '可选择系统变量', + inputPlaceholder: '请输入', + selectWidth:'200px', + options: [ + { + label: '登录用户账号', + value: '#{sys_user_code}', + }, + { + label: '登录用户名称', + value: '#{sys_user_name}', + }, + { + label: '当前日期', + value: '#{sys_date}', + }, + { + label: '当前时间', + value: '#{sys_time}', + }, + { + label: '登录用户部门', + value: '#{sys_org_code}', + }, + { + label: '用户拥有部门', + value: '#{sys_multi_org_code}', + }, + { + label: '登录用户租户', + value: '#{tenant_id}', + }, + ], + }, + colProps: { + span: 12, + }, + }, + { + field: 'field100', + component: 'JEllipsis', + label: '选中值', + colProps: { span: 12 }, + }, + { + field: 'JAreaLinkage', + component: 'JAreaLinkage', + label: '省市区选择', + colProps: { + span: 12, + }, + }, + { + field: 'JAreaLinkage', + component: 'JEllipsis', + label: '选中值', + colProps: { span: 12 }, + }, + + { + field: 'orderAuth', + component: 'Input', + label: '指令权限', + helpMessage: ['有权限右侧的"选中值"可见,否则不可见'], + colProps: { + span: 12, + }, + }, + { + field: 'orderAuth', + auth: 'demo:order:auth', + component: 'JEllipsis', + label: '选中值', + colProps: { span: 12 }, + }, + +]; diff --git a/src/views/demo/jeecg/model/JeecgOrderModal.vue b/src/views/demo/jeecg/model/JeecgOrderModal.vue new file mode 100644 index 0000000..760242b --- /dev/null +++ b/src/views/demo/jeecg/model/JeecgOrderModal.vue @@ -0,0 +1,94 @@ + + diff --git a/src/views/demo/level/Menu111.vue b/src/views/demo/level/Menu111.vue new file mode 100644 index 0000000..23305d3 --- /dev/null +++ b/src/views/demo/level/Menu111.vue @@ -0,0 +1,12 @@ + + diff --git a/src/views/demo/level/Menu12.vue b/src/views/demo/level/Menu12.vue new file mode 100644 index 0000000..2f69682 --- /dev/null +++ b/src/views/demo/level/Menu12.vue @@ -0,0 +1,12 @@ + + diff --git a/src/views/demo/level/Menu2.vue b/src/views/demo/level/Menu2.vue new file mode 100644 index 0000000..527ff2f --- /dev/null +++ b/src/views/demo/level/Menu2.vue @@ -0,0 +1,15 @@ + + diff --git a/src/views/demo/main-out/index.vue b/src/views/demo/main-out/index.vue new file mode 100644 index 0000000..7125067 --- /dev/null +++ b/src/views/demo/main-out/index.vue @@ -0,0 +1,6 @@ + diff --git a/src/views/demo/page/account/center/Application.vue b/src/views/demo/page/account/center/Application.vue new file mode 100644 index 0000000..ae0e281 --- /dev/null +++ b/src/views/demo/page/account/center/Application.vue @@ -0,0 +1,88 @@ + + + diff --git a/src/views/demo/page/account/center/Article.vue b/src/views/demo/page/account/center/Article.vue new file mode 100644 index 0000000..7addc32 --- /dev/null +++ b/src/views/demo/page/account/center/Article.vue @@ -0,0 +1,92 @@ + + + diff --git a/src/views/demo/page/account/center/Project.vue b/src/views/demo/page/account/center/Project.vue new file mode 100644 index 0000000..520ba13 --- /dev/null +++ b/src/views/demo/page/account/center/Project.vue @@ -0,0 +1,71 @@ + + + diff --git a/src/views/demo/page/account/center/data.tsx b/src/views/demo/page/account/center/data.tsx new file mode 100644 index 0000000..e8251b3 --- /dev/null +++ b/src/views/demo/page/account/center/data.tsx @@ -0,0 +1,124 @@ +export interface ListItem { + title: string; + icon: string; + color?: string; +} + +export interface TabItem { + key: string; + name: string; + component: string; +} + +export const tags: string[] = ['很有想法的', '专注设计', '川妹子', '大长腿', '海纳百川', '前端开发', 'vue3']; +; +export const teams: ListItem[] = [ + { + icon: 'ri:alipay-fill', + title: '科学搬砖组', + color: '#ff4000', + }, + { + icon: 'emojione-monotone:letter-a', + title: '中二少年团', + color: '#7c51b8', + }, + { + icon: 'ri:alipay-fill', + title: '高逼格设计', + color: '#00adf7', + }, + { + icon: 'jam:codepen-circle', + title: '程序员日常', + color: '#00adf7', + }, + { + icon: 'fa:behance-square', + title: '科学搬砖组', + color: '#7c51b8', + }, + { + icon: 'jam:codepen-circle', + title: '程序员日常', + color: '#ff4000', + }, +]; + +export const details: ListItem[] = [ + { + icon: 'ic:outline-contacts', + title: '交互专家', + }, + { + icon: 'grommet-icons:cluster', + title: '某某某事业群', + }, + { + icon: 'bx:bx-home-circle', + title: '福建省厦门市', + }, +]; + +export const achieveList: TabItem[] = [ + { + key: '1', + name: '文章', + component: 'Article', + }, + { + key: '2', + name: '应用', + component: 'Application', + }, + { + key: '3', + name: '项目', + component: 'Project', + }, +]; + +export const actions: any[] = [ + { icon: 'clarity:star-line', text: '156', color: '#018ffb' }, + { icon: 'bx:bxs-like', text: '156', color: '#459ae8' }, + { icon: 'bx:bxs-message-dots', text: '2', color: '#42d27d' }, +]; + +export const articleList = (() => { + const result: any[] = []; + for (let i = 0; i < 4; i++) { + result.push({ + title: 'Jeecg Admin', + description: ['Jeecg', '设计语言', 'Typescript'], + content: '基于Vue Next, TypeScript, Ant Design实现的一套完整的企业级后台管理系统。', + time: '2020-11-14 11:20', + }); + } + return result; +})(); + +export const applicationList = (() => { + const result: any[] = []; + for (let i = 0; i < 8; i++) { + result.push({ + title: 'Jeecg Admin', + icon: 'emojione-monotone:letter-a', + color: '#1890ff', + active: '100', + new: '1,799', + download: 'bx:bx-download', + }); + } + return result; +})(); + +export const projectList = (() => { + const result: any[] = []; + for (let i = 0; i < 8; i++) { + result.push({ + title: 'Jeecg Admin', + content: '基于Vue Next, TypeScript, Ant Design实现的一套完整的企业级后台管理系统。', + }); + } + return result; +})(); diff --git a/src/views/demo/page/account/center/index.vue b/src/views/demo/page/account/center/index.vue new file mode 100644 index 0000000..1cce493 --- /dev/null +++ b/src/views/demo/page/account/center/index.vue @@ -0,0 +1,155 @@ + + + + diff --git a/src/views/demo/page/account/setting/AccountBind.vue b/src/views/demo/page/account/setting/AccountBind.vue new file mode 100644 index 0000000..b61beb6 --- /dev/null +++ b/src/views/demo/page/account/setting/AccountBind.vue @@ -0,0 +1,59 @@ + + + diff --git a/src/views/demo/page/account/setting/BaseSetting.vue b/src/views/demo/page/account/setting/BaseSetting.vue new file mode 100644 index 0000000..768bab9 --- /dev/null +++ b/src/views/demo/page/account/setting/BaseSetting.vue @@ -0,0 +1,119 @@ + + + + diff --git a/src/views/demo/page/account/setting/MsgNotify.vue b/src/views/demo/page/account/setting/MsgNotify.vue new file mode 100644 index 0000000..c816a6e --- /dev/null +++ b/src/views/demo/page/account/setting/MsgNotify.vue @@ -0,0 +1,48 @@ + + + diff --git a/src/views/demo/page/account/setting/SecureSetting.vue b/src/views/demo/page/account/setting/SecureSetting.vue new file mode 100644 index 0000000..0c95a31 --- /dev/null +++ b/src/views/demo/page/account/setting/SecureSetting.vue @@ -0,0 +1,68 @@ + + + diff --git a/src/views/demo/page/account/setting/data.ts b/src/views/demo/page/account/setting/data.ts new file mode 100644 index 0000000..2a21342 --- /dev/null +++ b/src/views/demo/page/account/setting/data.ts @@ -0,0 +1,167 @@ +import { FormSchema } from '/@/components/Form/index'; +import { rules } from '/@/utils/helper/validator'; + +export interface ListItem { + key: string; + title: string; + description: string; + extra?: string; + avatar?: string; + color?: string; +} + +// tab的list +export const settingList = [ + { + key: '1', + name: '基本设置', + component: 'BaseSetting', + }, + { + key: '2', + name: '安全设置', + component: 'SecureSetting', + }, + /* { + key: '3', + name: '账号绑定', + component: 'AccountBind', + }, + { + key: '4', + name: '新消息通知', + component: 'MsgNotify', + },*/ +]; + +// 基础设置 form +export const baseSetschemas: FormSchema[] = [ + { + label: '', + field: 'id', + component: 'Input', + show: false, + }, + { + field: 'realname', + component: 'Input', + label: '昵称', + colProps: { span: 18 }, + }, + { + field: 'sex', + label: '性别', + component: 'JDictSelectTag', + componentProps: { + dictCode: 'sex', + placeholder: '请选择性别', + stringToNumber: true, + }, + colProps: { span: 18 }, + }, + { + label: '生日', + field: 'birthday', + component: 'DatePicker', + colProps: { span: 18 }, + }, + { + field: 'email', + component: 'Input', + label: '邮箱', + colProps: { span: 18 }, + }, + { + field: 'phone', + component: 'Input', + label: '联系电话', + dynamicRules: ({ model, schema }) => { + return [ + { ...rules.duplicateCheckRule('sys_user', 'phone', model, schema, false)[0] }, + { pattern: /^1[3456789]\d{9}$/, message: '手机号码格式有误' }, + ]; + }, + colProps: { span: 18 }, + }, +]; + +// 安全设置 list +export const secureSettingList: ListItem[] = [ + { + key: '1', + title: '账户密码', + description: '当前密码强度::强', + extra: '修改', + }, + { + key: '2', + title: '密保手机', + description: '已绑定手机::138****8293', + extra: '修改', + }, + { + key: '3', + title: '密保问题', + description: '未设置密保问题,密保问题可有效保护账户安全', + extra: '修改', + }, + { + key: '4', + title: '备用邮箱', + description: '已绑定邮箱::ant***sign.com', + extra: '修改', + }, + { + key: '5', + title: 'MFA 设备', + description: '未绑定 MFA 设备,绑定后,可以进行二次确认', + extra: '修改', + }, +]; + +// 账号绑定 list +export const accountBindList: ListItem[] = [ + { + key: '1', + title: '绑定淘宝', + description: '当前未绑定淘宝账号', + extra: '绑定', + avatar: 'ri:taobao-fill', + color: '#ff4000', + }, + { + key: '2', + title: '绑定支付宝', + description: '当前未绑定支付宝账号', + extra: '绑定', + avatar: 'fa-brands:alipay', + color: '#2eabff', + }, + { + key: '3', + title: '绑定钉钉', + description: '当前未绑定钉钉账号', + extra: '绑定', + avatar: 'ri:dingding-fill', + color: '#2eabff', + }, +]; + +// 新消息通知 list +export const msgNotifyList: ListItem[] = [ + { + key: '1', + title: '账户密码', + description: '其他用户的消息将以站内信的形式通知', + }, + { + key: '2', + title: '系统消息', + description: '系统消息将以站内信的形式通知', + }, + { + key: '3', + title: '待办任务', + description: '待办任务将以站内信的形式通知', + }, +]; diff --git a/src/views/demo/page/account/setting/index.vue b/src/views/demo/page/account/setting/index.vue new file mode 100644 index 0000000..74920b8 --- /dev/null +++ b/src/views/demo/page/account/setting/index.vue @@ -0,0 +1,62 @@ + + + + diff --git a/src/views/demo/page/desc/basic/data.tsx b/src/views/demo/page/desc/basic/data.tsx new file mode 100644 index 0000000..d640b62 --- /dev/null +++ b/src/views/demo/page/desc/basic/data.tsx @@ -0,0 +1,196 @@ +import { DescItem } from '/@/components/Description/index'; +import { BasicColumn } from '/@/components/Table/src/types/table'; +import { Button } from '/@/components/Button'; + +import { Badge } from 'ant-design-vue'; + +export const refundData = { + a1: '1000000000', + a2: '已取货', + a3: '1234123421', + a4: '3214321432', +}; + +export const personData = { + b1: '付小小', + b2: '18100000000', + b3: '菜鸟仓储', + b4: '浙江省杭州市西湖区万塘路18号', + b5: '无', +}; +export const refundSchema: DescItem[] = [ + { + field: 'a1', + label: '取货单号', + }, + { + field: 'a2', + label: '状态', + }, + { + field: 'a3', + label: '销售单号', + }, + { + field: 'a4', + label: '子订单', + }, +]; +export const personSchema: DescItem[] = [ + { + field: 'b1', + label: '用户姓名', + }, + { + field: 'b2', + label: '联系电话', + }, + { + field: 'b3', + label: '常用快递', + }, + { + field: 'b4', + label: '取货地址', + }, + { + field: 'b5', + label: '备注', + }, +]; + +export const refundTableSchema: BasicColumn[] = [ + { + title: '商品编号', + width: 150, + dataIndex: 't1', + customRender: ({ record }) => { + return ( + + ); + }, + }, + { + title: '商品名称', + width: 150, + dataIndex: 't2', + }, + { + title: '商品条码', + width: 150, + dataIndex: 't3', + }, + { + title: '单价 ', + width: 150, + dataIndex: 't4', + }, + { + title: '数量(件) ', + width: 150, + dataIndex: 't5', + }, + { + title: '金额', + width: 150, + dataIndex: 't6', + }, +]; +export const refundTimeTableSchema: BasicColumn[] = [ + { + title: '时间', + width: 150, + dataIndex: 't1', + }, + { + title: '当前进度', + width: 150, + dataIndex: 't2', + }, + { + title: '状态', + width: 150, + dataIndex: 't3', + customRender: ({ record }) => { + return ; + }, + }, + { + title: '操作员ID ', + width: 150, + dataIndex: 't4', + }, + { + title: '耗时', + width: 150, + dataIndex: 't5', + }, +]; + +export const refundTableData: any[] = [ + { + t1: 1234561, + t2: '矿泉水 550ml', + t3: '12421432143214321', + t4: '2.00', + t5: 1, + t6: 2.0, + }, + { + t1: 1234562, + t2: '矿泉水 550ml', + t3: '12421432143214321', + t4: '2.00', + t5: 2, + t6: 2.0, + }, + { + t1: 1234562, + t2: '矿泉水 550ml', + t3: '12421432143214321', + t4: '2.00', + t5: 2, + t6: 2.0, + }, + { + t1: 1234562, + t2: '矿泉水 550ml', + t3: '12421432143214321', + t4: '2.00', + t5: 2, + t6: 2.0, + }, +]; + +export const refundTimeTableData: any[] = [ + { + t1: '2017-10-01 14:10', + t2: '联系客户', + t3: '进行中', + t4: '取货员 ID1234', + t5: '5mins', + }, + { + t1: '2017-10-01 14:10', + t2: '取货员出发', + t3: '成功', + t4: '取货员 ID1234', + t5: '5mins', + }, + { + t1: '2017-10-01 14:10', + t2: '取货员接单', + t3: '成功', + t4: '系统', + t5: '5mins', + }, + { + t1: '2017-10-01 14:10', + t2: '申请审批通过', + t3: '成功', + t4: '用户', + t5: '1h', + }, +]; diff --git a/src/views/demo/page/desc/basic/index.vue b/src/views/demo/page/desc/basic/index.vue new file mode 100644 index 0000000..7ff62fd --- /dev/null +++ b/src/views/demo/page/desc/basic/index.vue @@ -0,0 +1,84 @@ + + + diff --git a/src/views/demo/page/desc/high/data.tsx b/src/views/demo/page/desc/high/data.tsx new file mode 100644 index 0000000..ec7a7c3 --- /dev/null +++ b/src/views/demo/page/desc/high/data.tsx @@ -0,0 +1,65 @@ +import { BasicColumn } from '/@/components/Table/src/types/table'; + +import { Badge } from 'ant-design-vue'; + +export const refundTimeTableSchema: BasicColumn[] = [ + { + title: '时间', + width: 150, + dataIndex: 't1', + }, + { + title: '当前进度', + width: 150, + dataIndex: 't2', + }, + { + title: '状态', + width: 150, + dataIndex: 't3', + customRender: ({ record }) => { + return ; + }, + }, + { + title: '操作员ID ', + width: 150, + dataIndex: 't4', + }, + { + title: '耗时', + width: 150, + dataIndex: 't5', + }, +]; + +export const refundTimeTableData: any[] = [ + { + t1: '2017-10-01 14:10', + t2: '联系客户', + t3: '进行中', + t4: '取货员 ID1234', + t5: '5mins', + }, + { + t1: '2017-10-01 14:10', + t2: '取货员出发', + t3: '成功', + t4: '取货员 ID1234', + t5: '5mins', + }, + { + t1: '2017-10-01 14:10', + t2: '取货员接单', + t3: '成功', + t4: '系统', + t5: '5mins', + }, + { + t1: '2017-10-01 14:10', + t2: '申请审批通过', + t3: '成功', + t4: '用户', + t5: '1h', + }, +]; diff --git a/src/views/demo/page/desc/high/index.vue b/src/views/demo/page/desc/high/index.vue new file mode 100644 index 0000000..0263474 --- /dev/null +++ b/src/views/demo/page/desc/high/index.vue @@ -0,0 +1,123 @@ + + diff --git a/src/views/demo/page/form/basic/data.ts b/src/views/demo/page/form/basic/data.ts new file mode 100644 index 0000000..76d2965 --- /dev/null +++ b/src/views/demo/page/form/basic/data.ts @@ -0,0 +1,119 @@ +import { FormSchema } from '/@/components/Form'; + +export const schemas: FormSchema[] = [ + { + field: 'title', + component: 'Input', + label: '标题', + componentProps: { + placeholder: '给目标起个名字', + }, + required: true, + }, + { + field: 'time', + component: 'RangePicker', + label: '起止日期', + required: true, + }, + { + field: 'target', + component: 'InputTextArea', + label: '目标描述', + componentProps: { + placeholder: '请输入你的阶段性工作目标', + rows: 4, + }, + required: true, + }, + { + field: 'metrics', + component: 'InputTextArea', + label: '衡量标准', + componentProps: { + placeholder: '请输入衡量标准', + rows: 4, + }, + required: true, + }, + { + field: 'client', + component: 'Input', + label: '客户', + helpMessage: '目标的服务对象', + subLabel: '( 选填 )', + componentProps: { + placeholder: '请描述你服务的客户,内部客户直接 @姓名/工号', + }, + }, + { + field: 'inviteer', + component: 'Input', + label: '邀评人', + subLabel: '( 选填 )', + componentProps: { + placeholder: '请直接 @姓名/工号,最多可邀请 5 人', + }, + }, + { + field: 'weights', + component: 'InputNumber', + label: '权重', + subLabel: '( 选填 )', + componentProps: { + formatter: (value: string) => (value ? `${value}%` : ''), + parser: (value: string) => value.replace('%', ''), + placeholder: '请输入', + }, + }, + { + field: 'disclosure', + component: 'RadioGroup', + label: '目标公开', + itemProps: { + extra: '客户、邀评人默认被分享', + }, + componentProps: { + options: [ + { + label: '公开', + value: '1', + }, + { + label: '部分公开', + value: '2', + }, + { + label: '不公开', + value: '3', + }, + ], + }, + }, + { + field: 'disclosurer', + component: 'Select', + label: ' ', + show: ({ model }) => { + return model.disclosure === '2'; + }, + componentProps: { + placeholder: '公开给', + mode: 'multiple', + options: [ + { + label: '同事1', + value: '1', + }, + { + label: '同事2', + value: '2', + }, + { + label: '同事3', + value: '3', + }, + ], + }, + }, +]; diff --git a/src/views/demo/page/form/basic/index.vue b/src/views/demo/page/form/basic/index.vue new file mode 100644 index 0000000..407c176 --- /dev/null +++ b/src/views/demo/page/form/basic/index.vue @@ -0,0 +1,64 @@ + + + diff --git a/src/views/demo/page/form/high/PersonTable.vue b/src/views/demo/page/form/high/PersonTable.vue new file mode 100644 index 0000000..47d250d --- /dev/null +++ b/src/views/demo/page/form/high/PersonTable.vue @@ -0,0 +1,137 @@ + + diff --git a/src/views/demo/page/form/high/data.ts b/src/views/demo/page/form/high/data.ts new file mode 100644 index 0000000..73d17d8 --- /dev/null +++ b/src/views/demo/page/form/high/data.ts @@ -0,0 +1,149 @@ +import { FormSchema } from '/@/components/Form'; + +const basicOptions: LabelValueOptions = [ + { + label: '付晓晓', + value: '1', + }, + { + label: '周毛毛', + value: '2', + }, +]; + +const storeTypeOptions: LabelValueOptions = [ + { + label: '私密', + value: '1', + }, + { + label: '公开', + value: '2', + }, +]; + +export const schemas: FormSchema[] = [ + { + field: 'f1', + component: 'Input', + label: '仓库名', + required: true, + }, + { + field: 'f2', + component: 'Input', + label: '仓库域名', + required: true, + componentProps: { + addonBefore: 'http://', + addonAfter: 'com', + }, + colProps: { + offset: 2, + }, + }, + { + field: 'f3', + component: 'Select', + label: '仓库管理员', + componentProps: { + options: basicOptions, + }, + required: true, + colProps: { + offset: 2, + }, + }, + { + field: 'f4', + component: 'Select', + label: '审批人', + componentProps: { + options: basicOptions, + }, + required: true, + }, + { + field: 'f5', + component: 'RangePicker', + label: '生效日期', + required: true, + colProps: { + offset: 2, + }, + }, + { + field: 'f6', + component: 'Select', + label: '仓库类型', + componentProps: { + options: storeTypeOptions, + }, + required: true, + colProps: { + offset: 2, + }, + }, +]; +export const taskSchemas: FormSchema[] = [ + { + field: 't1', + component: 'Input', + label: '任务名', + required: true, + }, + { + field: 't2', + component: 'Input', + label: '任务描述', + required: true, + colProps: { + offset: 2, + }, + }, + { + field: 't3', + component: 'Select', + label: '执行人', + componentProps: { + options: basicOptions, + }, + required: true, + colProps: { + offset: 2, + }, + }, + { + field: 't4', + component: 'Select', + label: '责任人', + componentProps: { + options: basicOptions, + }, + required: true, + }, + { + field: 't5', + component: 'TimePicker', + label: '生效日期', + required: true, + componentProps: { + style: { width: '100%' }, + }, + colProps: { + offset: 2, + }, + }, + { + field: 't6', + component: 'Select', + label: '任务类型', + componentProps: { + options: storeTypeOptions, + }, + required: true, + colProps: { + offset: 2, + }, + }, +]; diff --git a/src/views/demo/page/form/high/index.vue b/src/views/demo/page/form/high/index.vue new file mode 100644 index 0000000..64b1624 --- /dev/null +++ b/src/views/demo/page/form/high/index.vue @@ -0,0 +1,77 @@ + + + diff --git a/src/views/demo/page/form/step/Step1.vue b/src/views/demo/page/form/step/Step1.vue new file mode 100644 index 0000000..74bae97 --- /dev/null +++ b/src/views/demo/page/form/step/Step1.vue @@ -0,0 +1,103 @@ + + + diff --git a/src/views/demo/page/form/step/Step2.vue b/src/views/demo/page/form/step/Step2.vue new file mode 100644 index 0000000..94782b5 --- /dev/null +++ b/src/views/demo/page/form/step/Step2.vue @@ -0,0 +1,78 @@ + + + diff --git a/src/views/demo/page/form/step/Step3.vue b/src/views/demo/page/form/step/Step3.vue new file mode 100644 index 0000000..6d17d12 --- /dev/null +++ b/src/views/demo/page/form/step/Step3.vue @@ -0,0 +1,49 @@ + + + diff --git a/src/views/demo/page/form/step/data.tsx b/src/views/demo/page/form/step/data.tsx new file mode 100644 index 0000000..de4c98e --- /dev/null +++ b/src/views/demo/page/form/step/data.tsx @@ -0,0 +1,63 @@ +import { FormSchema } from '/@/components/Form'; + +export const step1Schemas: FormSchema[] = [ + { + field: 'account', + component: 'Select', + label: '付款账户', + required: true, + defaultValue: '1', + componentProps: { + options: [ + { + label: 'anncwb@126.com', + value: '1', + }, + ], + }, + }, + { + field: 'fac', + component: 'InputGroup', + label: '收款账户', + required: true, + defaultValue: 'test@example.com', + slot: 'fac', + }, + { + field: 'pay', + component: 'Input', + label: '', + defaultValue: 'zfb', + show: false, + }, + { + field: 'payeeName', + component: 'Input', + label: '收款人姓名', + defaultValue: 'Jeecg', + required: true, + }, + { + field: 'money', + component: 'Input', + label: '转账金额', + defaultValue: '500', + required: true, + renderComponentContent: () => { + return { + prefix: () => '¥', + }; + }, + }, +]; + +export const step2Schemas: FormSchema[] = [ + { + field: 'pwd', + component: 'InputPassword', + label: '支付密码', + required: true, + defaultValue: '123456', + }, +]; diff --git a/src/views/demo/page/form/step/index.vue b/src/views/demo/page/form/step/index.vue new file mode 100644 index 0000000..f762c6c --- /dev/null +++ b/src/views/demo/page/form/step/index.vue @@ -0,0 +1,86 @@ + + + diff --git a/src/views/demo/page/list/basic/data.tsx b/src/views/demo/page/list/basic/data.tsx new file mode 100644 index 0000000..193328d --- /dev/null +++ b/src/views/demo/page/list/basic/data.tsx @@ -0,0 +1,17 @@ +export const cardList = (() => { + const result: any[] = []; + for (let i = 0; i < 6; i++) { + result.push({ + id: i, + title: 'Jeecg Admin', + description: '基于Vue Next, TypeScript, Ant Design Vue实现的一套完整的企业级后台管理系统', + datetime: '2020-11-26 17:39', + extra: '编辑', + icon: 'logos:vue', + color: '#1890ff', + author: 'Jeecg', + percent: 20 * (i + 1), + }); + } + return result; +})(); diff --git a/src/views/demo/page/list/basic/index.vue b/src/views/demo/page/list/basic/index.vue new file mode 100644 index 0000000..7232195 --- /dev/null +++ b/src/views/demo/page/list/basic/index.vue @@ -0,0 +1,161 @@ + + + diff --git a/src/views/demo/page/list/card/data.tsx b/src/views/demo/page/list/card/data.tsx new file mode 100644 index 0000000..96d9c29 --- /dev/null +++ b/src/views/demo/page/list/card/data.tsx @@ -0,0 +1,14 @@ +export const cardList = (() => { + const result: any[] = []; + for (let i = 0; i < 12; i++) { + result.push({ + title: 'Jeecg Admin', + icon: 'logos:vue', + color: '#1890ff', + active: '100', + new: '1,799', + download: 'bx:bx-download', + }); + } + return result; +})(); diff --git a/src/views/demo/page/list/card/index.vue b/src/views/demo/page/list/card/index.vue new file mode 100644 index 0000000..f868653 --- /dev/null +++ b/src/views/demo/page/list/card/index.vue @@ -0,0 +1,102 @@ + + + diff --git a/src/views/demo/page/list/search/data.tsx b/src/views/demo/page/list/search/data.tsx new file mode 100644 index 0000000..948bf5b --- /dev/null +++ b/src/views/demo/page/list/search/data.tsx @@ -0,0 +1,37 @@ +import { FormSchema } from '/@/components/Form/index'; + +export const searchList = (() => { + const result: any[] = []; + for (let i = 0; i < 6; i++) { + result.push({ + id: i, + title: 'Jeecg Admin', + description: ['Jeecg', '设计语言', 'Typescript'], + content: '基于Vue Next, TypeScript, Ant Design实现的一套完整的企业级后台管理系统。', + time: '2020-11-14 11:20', + }); + } + return result; +})(); + +export const actions: any[] = [ + { icon: 'clarity:star-line', text: '156', color: '#018ffb' }, + { icon: 'bx:bxs-like', text: '156', color: '#459ae8' }, + { icon: 'bx:bxs-message-dots', text: '2', color: '#42d27d' }, +]; + +export const schemas: FormSchema[] = [ + { + field: 'field1', + component: 'InputSearch', + label: '项目名', + colProps: { + span: 8, + }, + componentProps: { + onChange: (e: any) => { + console.log(e); + }, + }, + }, +]; diff --git a/src/views/demo/page/list/search/index.vue b/src/views/demo/page/list/search/index.vue new file mode 100644 index 0000000..e498f9a --- /dev/null +++ b/src/views/demo/page/list/search/index.vue @@ -0,0 +1,125 @@ + + + diff --git a/src/views/demo/page/result/fail/index.vue b/src/views/demo/page/result/fail/index.vue new file mode 100644 index 0000000..73b65a9 --- /dev/null +++ b/src/views/demo/page/result/fail/index.vue @@ -0,0 +1,54 @@ + + + diff --git a/src/views/demo/page/result/success/index.vue b/src/views/demo/page/result/success/index.vue new file mode 100644 index 0000000..8389207 --- /dev/null +++ b/src/views/demo/page/result/success/index.vue @@ -0,0 +1,58 @@ + + + diff --git a/src/views/demo/permission/CurrentPermissionMode.vue b/src/views/demo/permission/CurrentPermissionMode.vue new file mode 100644 index 0000000..43b9eb3 --- /dev/null +++ b/src/views/demo/permission/CurrentPermissionMode.vue @@ -0,0 +1,32 @@ + + diff --git a/src/views/demo/permission/back/Btn.vue b/src/views/demo/permission/back/Btn.vue new file mode 100644 index 0000000..87dde12 --- /dev/null +++ b/src/views/demo/permission/back/Btn.vue @@ -0,0 +1,88 @@ + + + diff --git a/src/views/demo/permission/back/index.vue b/src/views/demo/permission/back/index.vue new file mode 100644 index 0000000..84c44f3 --- /dev/null +++ b/src/views/demo/permission/back/index.vue @@ -0,0 +1,63 @@ + + + diff --git a/src/views/demo/permission/front/AuthPageA.vue b/src/views/demo/permission/front/AuthPageA.vue new file mode 100644 index 0000000..e5efa64 --- /dev/null +++ b/src/views/demo/permission/front/AuthPageA.vue @@ -0,0 +1,19 @@ + + + diff --git a/src/views/demo/permission/front/AuthPageB.vue b/src/views/demo/permission/front/AuthPageB.vue new file mode 100644 index 0000000..ca58426 --- /dev/null +++ b/src/views/demo/permission/front/AuthPageB.vue @@ -0,0 +1,19 @@ + + + diff --git a/src/views/demo/permission/front/Btn.vue b/src/views/demo/permission/front/Btn.vue new file mode 100644 index 0000000..d7d3f97 --- /dev/null +++ b/src/views/demo/permission/front/Btn.vue @@ -0,0 +1,85 @@ + + + diff --git a/src/views/demo/permission/front/index.vue b/src/views/demo/permission/front/index.vue new file mode 100644 index 0000000..8a405aa --- /dev/null +++ b/src/views/demo/permission/front/index.vue @@ -0,0 +1,57 @@ + + + diff --git a/src/views/demo/setup/index.vue b/src/views/demo/setup/index.vue new file mode 100644 index 0000000..17d254f --- /dev/null +++ b/src/views/demo/setup/index.vue @@ -0,0 +1,43 @@ + + diff --git a/src/views/demo/system/account/AccountDetail.vue b/src/views/demo/system/account/AccountDetail.vue new file mode 100644 index 0000000..150cc8b --- /dev/null +++ b/src/views/demo/system/account/AccountDetail.vue @@ -0,0 +1,62 @@ + + + + + diff --git a/src/views/demo/system/account/AccountModal.vue b/src/views/demo/system/account/AccountModal.vue new file mode 100644 index 0000000..167bb72 --- /dev/null +++ b/src/views/demo/system/account/AccountModal.vue @@ -0,0 +1,74 @@ + + diff --git a/src/views/demo/system/account/DeptTree.vue b/src/views/demo/system/account/DeptTree.vue new file mode 100644 index 0000000..b67b4f0 --- /dev/null +++ b/src/views/demo/system/account/DeptTree.vue @@ -0,0 +1,42 @@ + + diff --git a/src/views/demo/system/account/account.data.ts b/src/views/demo/system/account/account.data.ts new file mode 100644 index 0000000..ade68c1 --- /dev/null +++ b/src/views/demo/system/account/account.data.ts @@ -0,0 +1,127 @@ +import { getAllRoleList, isAccountExist } from '/@/api/demo/system'; +import { BasicColumn } from '/@/components/Table'; +import { FormSchema } from '/@/components/Table'; + +export const columns: BasicColumn[] = [ + { + title: '用户名', + dataIndex: 'account', + width: 120, + }, + { + title: '昵称', + dataIndex: 'nickname', + width: 120, + }, + { + title: '邮箱', + dataIndex: 'email', + width: 120, + }, + { + title: '创建时间', + dataIndex: 'createTime', + width: 180, + }, + { + title: '角色', + dataIndex: 'role', + width: 200, + }, + { + title: '备注', + dataIndex: 'remark', + }, +]; + +export const searchFormSchema: FormSchema[] = [ + { + field: 'account', + label: '用户名', + component: 'Input', + colProps: { span: 8 }, + }, + { + field: 'nickname', + label: '昵称', + component: 'Input', + colProps: { span: 8 }, + }, +]; + +export const accountFormSchema: FormSchema[] = [ + { + field: 'account', + label: '用户名', + component: 'Input', + helpMessage: ['本字段演示异步验证', '不能输入带有admin的用户名'], + rules: [ + { + required: true, + message: '请输入用户名', + }, + { + validator(_, value) { + return new Promise((resolve, reject) => { + isAccountExist(value) + .then(() => resolve()) + .catch((err) => { + reject(err.message || '验证失败'); + }); + }); + }, + }, + ], + }, + { + field: 'pwd', + label: '密码', + component: 'InputPassword', + required: true, + ifShow: false, + }, + { + label: '角色', + field: 'role', + component: 'ApiSelect', + componentProps: { + api: getAllRoleList, + labelField: 'roleName', + valueField: 'roleValue', + }, + required: true, + }, + { + field: 'dept', + label: '所属部门', + component: 'TreeSelect', + componentProps: { + fieldNames: { + label: 'deptName', + key: 'id', + value: 'id', + }, + getPopupContainer: () => document.body, + }, + required: true, + }, + { + field: 'nickname', + label: '昵称', + component: 'Input', + required: true, + }, + + { + label: '邮箱', + field: 'email', + component: 'Input', + required: true, + }, + + { + label: '备注', + field: 'remark', + component: 'InputTextArea', + }, +]; diff --git a/src/views/demo/system/account/index.vue b/src/views/demo/system/account/index.vue new file mode 100644 index 0000000..2a73cdc --- /dev/null +++ b/src/views/demo/system/account/index.vue @@ -0,0 +1,137 @@ + + diff --git a/src/views/demo/system/dept/DeptModal.vue b/src/views/demo/system/dept/DeptModal.vue new file mode 100644 index 0000000..005148d --- /dev/null +++ b/src/views/demo/system/dept/DeptModal.vue @@ -0,0 +1,61 @@ + + diff --git a/src/views/demo/system/dept/dept.data.ts b/src/views/demo/system/dept/dept.data.ts new file mode 100644 index 0000000..6bdd1ca --- /dev/null +++ b/src/views/demo/system/dept/dept.data.ts @@ -0,0 +1,108 @@ +import { BasicColumn } from '/@/components/Table'; +import { FormSchema } from '/@/components/Table'; +import { h } from 'vue'; +import { Tag } from 'ant-design-vue'; + +export const columns: BasicColumn[] = [ + { + title: '部门名称', + dataIndex: 'deptName', + width: 160, + align: 'left', + }, + { + title: '排序', + dataIndex: 'orderNo', + width: 50, + }, + { + title: '状态', + dataIndex: 'status', + width: 80, + customRender: ({ record }) => { + const status = record.status; + const enable = ~~status === 0; + const color = enable ? 'green' : 'red'; + const text = enable ? '启用' : '停用'; + return h(Tag, { color: color }, () => text); + }, + }, + { + title: '创建时间', + dataIndex: 'createTime', + width: 180, + }, + { + title: '备注', + dataIndex: 'remark', + }, +]; + +export const searchFormSchema: FormSchema[] = [ + { + field: 'deptName', + label: '部门名称', + component: 'Input', + colProps: { span: 8 }, + }, + { + field: 'status', + label: '状态', + component: 'Select', + componentProps: { + options: [ + { label: '启用', value: '0' }, + { label: '停用', value: '1' }, + ], + }, + colProps: { span: 8 }, + }, +]; + +export const formSchema: FormSchema[] = [ + { + field: 'deptName', + label: '部门名称', + component: 'Input', + required: true, + }, + { + field: 'parentDept', + label: '上级部门', + component: 'TreeSelect', + + componentProps: { + replaceFields: { + title: 'deptName', + key: 'id', + value: 'id', + }, + getPopupContainer: () => document.body, + }, + required: true, + }, + { + field: 'orderNo', + label: '排序', + component: 'InputNumber', + required: true, + }, + { + field: 'status', + label: '状态', + component: 'RadioButtonGroup', + defaultValue: '0', + componentProps: { + options: [ + { label: '启用', value: '0' }, + { label: '停用', value: '1' }, + ], + }, + required: true, + }, + { + label: '备注', + field: 'remark', + component: 'InputTextArea', + }, +]; diff --git a/src/views/demo/system/dept/index.vue b/src/views/demo/system/dept/index.vue new file mode 100644 index 0000000..b803ef0 --- /dev/null +++ b/src/views/demo/system/dept/index.vue @@ -0,0 +1,100 @@ + + diff --git a/src/views/demo/system/menu/MenuDrawer.vue b/src/views/demo/system/menu/MenuDrawer.vue new file mode 100644 index 0000000..606c3c7 --- /dev/null +++ b/src/views/demo/system/menu/MenuDrawer.vue @@ -0,0 +1,63 @@ + + diff --git a/src/views/demo/system/menu/index.vue b/src/views/demo/system/menu/index.vue new file mode 100644 index 0000000..8aa3185 --- /dev/null +++ b/src/views/demo/system/menu/index.vue @@ -0,0 +1,107 @@ + + diff --git a/src/views/demo/system/menu/menu.data.ts b/src/views/demo/system/menu/menu.data.ts new file mode 100644 index 0000000..834bd21 --- /dev/null +++ b/src/views/demo/system/menu/menu.data.ts @@ -0,0 +1,202 @@ +import { BasicColumn } from '/@/components/Table'; +import { FormSchema } from '/@/components/Table'; +import { h } from 'vue'; +import { Tag } from 'ant-design-vue'; +import { Icon } from '/@/components/Icon'; + +export const columns: BasicColumn[] = [ + { + title: '菜单名称', + dataIndex: 'menuName', + width: 200, + align: 'left', + }, + { + title: '图标', + dataIndex: 'icon', + width: 50, + customRender: ({ record }) => { + return h(Icon, { icon: record.icon }); + }, + }, + { + title: '权限标识', + dataIndex: 'permission', + width: 180, + }, + { + title: '组件', + dataIndex: 'component', + }, + { + title: '排序', + dataIndex: 'orderNo', + width: 50, + }, + { + title: '状态', + dataIndex: 'status', + width: 80, + customRender: ({ record }) => { + const status = record.status; + const enable = ~~status === 0; + const color = enable ? 'green' : 'red'; + const text = enable ? '启用' : '停用'; + return h(Tag, { color: color }, () => text); + }, + }, + { + title: '创建时间', + dataIndex: 'createTime', + width: 180, + }, +]; + +const isDir = (type: string) => type === '0'; +const isMenu = (type: string) => type === '1'; +const isButton = (type: string) => type === '2'; + +export const searchFormSchema: FormSchema[] = [ + { + field: 'menuName', + label: '菜单名称', + component: 'Input', + colProps: { span: 8 }, + }, + { + field: 'status', + label: '状态', + component: 'Select', + componentProps: { + options: [ + { label: '启用', value: '0' }, + { label: '停用', value: '1' }, + ], + }, + colProps: { span: 8 }, + }, +]; + +export const formSchema: FormSchema[] = [ + { + field: 'type', + label: '菜单类型', + component: 'RadioButtonGroup', + defaultValue: '0', + componentProps: { + options: [ + { label: '目录', value: '0' }, + { label: '菜单', value: '1' }, + { label: '按钮', value: '2' }, + ], + }, + colProps: { lg: 24, md: 24 }, + }, + { + field: 'menuName', + label: '菜单名称', + component: 'Input', + required: true, + }, + + { + field: 'parentMenu', + label: '上级菜单', + component: 'TreeSelect', + componentProps: { + replaceFields: { + title: 'menuName', + key: 'id', + value: 'id', + }, + getPopupContainer: () => document.body, + }, + }, + + { + field: 'orderNo', + label: '排序', + component: 'InputNumber', + required: true, + }, + { + field: 'icon', + label: '图标', + component: 'IconPicker', + required: true, + ifShow: ({ values }) => !isButton(values.type), + }, + + { + field: 'routePath', + label: '路由地址', + component: 'Input', + required: true, + ifShow: ({ values }) => !isButton(values.type), + }, + { + field: 'component', + label: '组件路径', + component: 'Input', + ifShow: ({ values }) => isMenu(values.type), + }, + { + field: 'permission', + label: '权限标识', + component: 'Input', + ifShow: ({ values }) => !isDir(values.type), + }, + { + field: 'status', + label: '状态', + component: 'RadioButtonGroup', + defaultValue: '0', + componentProps: { + options: [ + { label: '启用', value: '0' }, + { label: '禁用', value: '1' }, + ], + }, + }, + { + field: 'isExt', + label: '是否外链', + component: 'RadioButtonGroup', + defaultValue: '0', + componentProps: { + options: [ + { label: '否', value: '0' }, + { label: '是', value: '1' }, + ], + }, + ifShow: ({ values }) => !isButton(values.type), + }, + + { + field: 'keepalive', + label: '是否缓存', + component: 'RadioButtonGroup', + defaultValue: '0', + componentProps: { + options: [ + { label: '否', value: '0' }, + { label: '是', value: '1' }, + ], + }, + ifShow: ({ values }) => isMenu(values.type), + }, + + { + field: 'show', + label: '是否显示', + component: 'RadioButtonGroup', + defaultValue: '0', + componentProps: { + options: [ + { label: '是', value: '0' }, + { label: '否', value: '1' }, + ], + }, + ifShow: ({ values }) => !isButton(values.type), + }, +]; diff --git a/src/views/demo/system/password/index.vue b/src/views/demo/system/password/index.vue new file mode 100644 index 0000000..f5685ae --- /dev/null +++ b/src/views/demo/system/password/index.vue @@ -0,0 +1,44 @@ + + diff --git a/src/views/demo/system/password/pwd.data.ts b/src/views/demo/system/password/pwd.data.ts new file mode 100644 index 0000000..be5f9b1 --- /dev/null +++ b/src/views/demo/system/password/pwd.data.ts @@ -0,0 +1,46 @@ +import { FormSchema } from '/@/components/Form'; + +export const formSchema: FormSchema[] = [ + { + field: 'passwordOld', + label: '当前密码', + component: 'InputPassword', + required: true, + }, + { + field: 'passwordNew', + label: '新密码', + component: 'StrengthMeter', + componentProps: { + placeholder: '新密码', + }, + rules: [ + { + required: true, + message: '请输入新密码', + }, + ], + }, + { + field: 'confirmPassword', + label: '确认密码', + component: 'InputPassword', + + dynamicRules: ({ values }) => { + return [ + { + required: true, + validator: (_, value) => { + if (!value) { + return Promise.reject('不能为空'); + } + if (value !== values.passwordNew) { + return Promise.reject('两次输入的密码不一致!'); + } + return Promise.resolve(); + }, + }, + ]; + }, + }, +]; diff --git a/src/views/demo/system/role/RoleDrawer.vue b/src/views/demo/system/role/RoleDrawer.vue new file mode 100644 index 0000000..b1a5758 --- /dev/null +++ b/src/views/demo/system/role/RoleDrawer.vue @@ -0,0 +1,80 @@ + + diff --git a/src/views/demo/system/role/index.vue b/src/views/demo/system/role/index.vue new file mode 100644 index 0000000..488e5cf --- /dev/null +++ b/src/views/demo/system/role/index.vue @@ -0,0 +1,97 @@ + + diff --git a/src/views/demo/system/role/role.data.ts b/src/views/demo/system/role/role.data.ts new file mode 100644 index 0000000..f785427 --- /dev/null +++ b/src/views/demo/system/role/role.data.ts @@ -0,0 +1,124 @@ +import { BasicColumn } from '/@/components/Table'; +import { FormSchema } from '/@/components/Table'; +import { h } from 'vue'; +import { Switch } from 'ant-design-vue'; +import { setRoleStatus } from '/@/api/demo/system'; +import { useMessage } from '/@/hooks/web/useMessage'; + +export const columns: BasicColumn[] = [ + { + title: '角色名称', + dataIndex: 'roleName', + width: 200, + }, + { + title: '角色值', + dataIndex: 'roleValue', + width: 180, + }, + { + title: '排序', + dataIndex: 'orderNo', + width: 50, + }, + { + title: '状态', + dataIndex: 'status', + width: 120, + customRender: ({ record }) => { + if (!Reflect.has(record, 'pendingStatus')) { + record.pendingStatus = false; + } + return h(Switch, { + checked: record.status === '1', + checkedChildren: '已启用', + unCheckedChildren: '已禁用', + loading: record.pendingStatus, + onChange(checked: boolean) { + record.pendingStatus = true; + const newStatus = checked ? '1' : '0'; + const { createMessage } = useMessage(); + setRoleStatus(record.id, newStatus) + .then(() => { + record.status = newStatus; + createMessage.success(`已成功修改角色状态`); + }) + .catch(() => { + createMessage.error('修改角色状态失败'); + }) + .finally(() => { + record.pendingStatus = false; + }); + }, + }); + }, + }, + { + title: '创建时间', + dataIndex: 'createTime', + width: 180, + }, + { + title: '备注', + dataIndex: 'remark', + }, +]; + +export const searchFormSchema: FormSchema[] = [ + { + field: 'roleNme', + label: '角色名称', + component: 'Input', + colProps: { span: 8 }, + }, + { + field: 'status', + label: '状态', + component: 'Select', + componentProps: { + options: [ + { label: '启用', value: '0' }, + { label: '停用', value: '1' }, + ], + }, + colProps: { span: 8 }, + }, +]; + +export const formSchema: FormSchema[] = [ + { + field: 'roleName', + label: '角色名称', + required: true, + component: 'Input', + }, + { + field: 'roleValue', + label: '角色值', + required: true, + component: 'Input', + }, + { + field: 'status', + label: '状态', + component: 'RadioButtonGroup', + defaultValue: '0', + componentProps: { + options: [ + { label: '启用', value: '0' }, + { label: '停用', value: '1' }, + ], + }, + }, + { + label: '备注', + field: 'remark', + component: 'InputTextArea', + }, + { + label: ' ', + field: 'menu', + slot: 'menu', + component: 'Input', + }, +]; diff --git a/src/views/demo/system/test/TestDrawer.vue b/src/views/demo/system/test/TestDrawer.vue new file mode 100644 index 0000000..264692f --- /dev/null +++ b/src/views/demo/system/test/TestDrawer.vue @@ -0,0 +1,59 @@ + + diff --git a/src/views/demo/system/test/index.vue b/src/views/demo/system/test/index.vue new file mode 100644 index 0000000..57850e6 --- /dev/null +++ b/src/views/demo/system/test/index.vue @@ -0,0 +1,97 @@ + + diff --git a/src/views/demo/system/test/test.data.ts b/src/views/demo/system/test/test.data.ts new file mode 100644 index 0000000..b8f9023 --- /dev/null +++ b/src/views/demo/system/test/test.data.ts @@ -0,0 +1,51 @@ +import { BasicColumn } from '/@/components/Table'; +import { FormSchema } from '/@/components/Table'; + +export const columns: BasicColumn[] = [ + { + title: '名称', + dataIndex: 'testName', + width: 200, + }, + { + title: '值', + dataIndex: 'testValue', + width: 180, + }, + { + title: '创建时间', + dataIndex: 'createTime', + width: 180, + }, +]; + +export const searchFormSchema: FormSchema[] = [ + { + field: 'testName', + label: '名称', + component: 'Input', + colProps: { span: 8 }, + }, +]; + +export const formSchema: FormSchema[] = [ + { + field: 'testName', + label: '名称', + required: true, + component: 'Input', + }, + { + field: 'testValue', + label: '值', + required: true, + component: 'Input', + }, + + { + label: ' ', + field: 'menu', + slot: 'menu', + component: 'Input', + }, +]; diff --git a/src/views/demo/table/AntdTableSummary.vue b/src/views/demo/table/AntdTableSummary.vue new file mode 100644 index 0000000..b980dec --- /dev/null +++ b/src/views/demo/table/AntdTableSummary.vue @@ -0,0 +1,122 @@ + + diff --git a/src/views/demo/table/AuthColumn.vue b/src/views/demo/table/AuthColumn.vue new file mode 100644 index 0000000..a611324 --- /dev/null +++ b/src/views/demo/table/AuthColumn.vue @@ -0,0 +1,127 @@ + + diff --git a/src/views/demo/table/Basic.vue b/src/views/demo/table/Basic.vue new file mode 100644 index 0000000..4d8e88c --- /dev/null +++ b/src/views/demo/table/Basic.vue @@ -0,0 +1,81 @@ + + diff --git a/src/views/demo/table/CustomerCell.vue b/src/views/demo/table/CustomerCell.vue new file mode 100644 index 0000000..f2a83b3 --- /dev/null +++ b/src/views/demo/table/CustomerCell.vue @@ -0,0 +1,104 @@ + + diff --git a/src/views/demo/table/EditCellTable.vue b/src/views/demo/table/EditCellTable.vue new file mode 100644 index 0000000..1008561 --- /dev/null +++ b/src/views/demo/table/EditCellTable.vue @@ -0,0 +1,219 @@ + + diff --git a/src/views/demo/table/EditRowTable.vue b/src/views/demo/table/EditRowTable.vue new file mode 100644 index 0000000..cb0dd26 --- /dev/null +++ b/src/views/demo/table/EditRowTable.vue @@ -0,0 +1,253 @@ + + diff --git a/src/views/demo/table/ExpandTable.vue b/src/views/demo/table/ExpandTable.vue new file mode 100644 index 0000000..65fcd62 --- /dev/null +++ b/src/views/demo/table/ExpandTable.vue @@ -0,0 +1,74 @@ + + diff --git a/src/views/demo/table/FetchTable.vue b/src/views/demo/table/FetchTable.vue new file mode 100644 index 0000000..8d9efa3 --- /dev/null +++ b/src/views/demo/table/FetchTable.vue @@ -0,0 +1,43 @@ + + diff --git a/src/views/demo/table/FixedColumn.vue b/src/views/demo/table/FixedColumn.vue new file mode 100644 index 0000000..c02f5b8 --- /dev/null +++ b/src/views/demo/table/FixedColumn.vue @@ -0,0 +1,93 @@ + + diff --git a/src/views/demo/table/FixedHeight.vue b/src/views/demo/table/FixedHeight.vue new file mode 100644 index 0000000..389da36 --- /dev/null +++ b/src/views/demo/table/FixedHeight.vue @@ -0,0 +1,41 @@ + + diff --git a/src/views/demo/table/FooterTable.vue b/src/views/demo/table/FooterTable.vue new file mode 100644 index 0000000..585ebdd --- /dev/null +++ b/src/views/demo/table/FooterTable.vue @@ -0,0 +1,110 @@ + + diff --git a/src/views/demo/table/FormTable.vue b/src/views/demo/table/FormTable.vue new file mode 100644 index 0000000..f73c59b --- /dev/null +++ b/src/views/demo/table/FormTable.vue @@ -0,0 +1,63 @@ + + diff --git a/src/views/demo/table/MergeHeader.vue b/src/views/demo/table/MergeHeader.vue new file mode 100644 index 0000000..2c3b612 --- /dev/null +++ b/src/views/demo/table/MergeHeader.vue @@ -0,0 +1,27 @@ + + diff --git a/src/views/demo/table/MultipleHeader.vue b/src/views/demo/table/MultipleHeader.vue new file mode 100644 index 0000000..fa0bf43 --- /dev/null +++ b/src/views/demo/table/MultipleHeader.vue @@ -0,0 +1,26 @@ + + diff --git a/src/views/demo/table/NestedTable.vue b/src/views/demo/table/NestedTable.vue new file mode 100644 index 0000000..e242244 --- /dev/null +++ b/src/views/demo/table/NestedTable.vue @@ -0,0 +1,113 @@ + + diff --git a/src/views/demo/table/RefTable.vue b/src/views/demo/table/RefTable.vue new file mode 100644 index 0000000..f2a0c6d --- /dev/null +++ b/src/views/demo/table/RefTable.vue @@ -0,0 +1,125 @@ + + diff --git a/src/views/demo/table/TreeTable.vue b/src/views/demo/table/TreeTable.vue new file mode 100644 index 0000000..88afe63 --- /dev/null +++ b/src/views/demo/table/TreeTable.vue @@ -0,0 +1,41 @@ + + diff --git a/src/views/demo/table/UseTable.vue b/src/views/demo/table/UseTable.vue new file mode 100644 index 0000000..3c54997 --- /dev/null +++ b/src/views/demo/table/UseTable.vue @@ -0,0 +1,147 @@ + + diff --git a/src/views/demo/table/tableData.tsx b/src/views/demo/table/tableData.tsx new file mode 100644 index 0000000..5356c92 --- /dev/null +++ b/src/views/demo/table/tableData.tsx @@ -0,0 +1,318 @@ +import { FormProps, FormSchema } from '/@/components/Table'; +import { BasicColumn } from '/@/components/Table/src/types/table'; + +export function getBasicColumns(): BasicColumn[] { + return [ + { + title: 'ID', + dataIndex: 'id', + fixed: 'left', + width: 200, + }, + { + title: '姓名', + dataIndex: 'name', + width: 150, + filters: [ + { text: 'Male', value: 'male' }, + { text: 'Female', value: 'female' }, + ], + }, + { + title: '地址', + dataIndex: 'address', + width: 300, + }, + { + title: '编号', + dataIndex: 'no', + width: 150, + sorter: true, + defaultHidden: true, + }, + { + title: '开始时间', + width: 150, + sorter: true, + dataIndex: 'beginTime', + }, + { + title: '结束时间', + width: 150, + sorter: true, + dataIndex: 'endTime', + }, + ]; +} + +export function getBasicShortColumns(): BasicColumn[] { + return [ + { + title: 'ID', + width: 150, + dataIndex: 'id', + sorter: true, + sortOrder: 'ascend', + }, + { + title: '姓名', + dataIndex: 'name', + width: 120, + }, + { + title: '地址', + dataIndex: 'address', + }, + { + title: '编号', + dataIndex: 'no', + width: 80, + }, + ]; +} + +export function getMultipleHeaderColumns(): BasicColumn[] { + return [ + { + title: 'ID', + dataIndex: 'id', + width: 200, + }, + { + title: '姓名', + dataIndex: 'name', + width: 120, + }, + { + title: '地址', + dataIndex: 'address', + sorter: true, + children: [ + { + title: '编号', + dataIndex: 'no', + width: 120, + filters: [ + { text: 'Male', value: 'male', children: [] }, + { text: 'Female', value: 'female', children: [] }, + ], + }, + + { + title: '开始时间', + dataIndex: 'beginTime', + width: 120, + }, + { + title: '结束时间', + dataIndex: 'endTime', + width: 120, + }, + ], + }, + ]; +} + +export function getCustomHeaderColumns(): BasicColumn[] { + return [ + { + title: 'ID', + dataIndex: 'id', + width: 200, + }, + { + // title: '姓名', + dataIndex: 'name', + width: 120, + slots: { title: 'customTitle' }, + }, + { + // title: '地址', + dataIndex: 'address', + width: 120, + slots: { title: 'customAddress' }, + sorter: true, + }, + + { + title: '编号', + dataIndex: 'no', + width: 120, + filters: [ + { text: 'Male', value: 'male', children: [] }, + { text: 'Female', value: 'female', children: [] }, + ], + }, + { + title: '开始时间', + dataIndex: 'beginTime', + width: 120, + }, + { + title: '结束时间', + dataIndex: 'endTime', + width: 120, + }, + ]; +} +const renderContent = (filed) => { + return (record, rowIndex) => { + const obj: any = { + children: record[filed], + attrs: {}, + }; + if (rowIndex === 9) { + obj.attrs.colSpan = 0; + } + return obj; + }; +}; +export function getMergeHeaderColumns(): BasicColumn[] { + return [ + { + title: 'ID', + dataIndex: 'id', + width: 300, + customCell: renderContent('id'), + }, + { + title: '姓名', + dataIndex: 'name', + width: 300, + customCell: renderContent('name'), + }, + { + title: '地址', + dataIndex: 'address', + colSpan: 2, + width: 120, + sorter: true, + customCell: (record: any, rowIndex) => { + const obj: any = { + children: record['address'], + attrs: {}, + }; + if (rowIndex === 2) { + obj.attrs.rowSpan = 2; + } + if (rowIndex === 3) { + obj.attrs.colSpan = 0; + } + return obj; + }, + }, + { + title: '编号', + dataIndex: 'no', + colSpan: 0, + filters: [ + { text: 'Male', value: 'male', children: [] }, + { text: 'Female', value: 'female', children: [] }, + ], + customCell: renderContent('no'), + }, + { + title: '开始时间', + dataIndex: 'beginTime', + width: 200, + customCell: renderContent('beginTime'), + }, + { + title: '结束时间', + dataIndex: 'endTime', + width: 200, + customCell: renderContent('endTime'), + }, + ]; +} +export const getAdvanceSchema = (itemNumber = 6): FormSchema[] => { + const arr: any = []; + for (let index = 0; index < itemNumber; index++) { + arr.push({ + field: `field${index}`, + label: `字段${index}`, + component: 'Input', + colProps: { + xl: 12, + xxl: 8, + }, + }); + } + return arr; +}; +export function getFormConfig(): Partial { + return { + labelWidth: 100, + schemas: [ + ...getAdvanceSchema(5), + { + field: `field11`, + label: `Slot示例`, + component: 'Select', + slot: 'custom', + colProps: { + xl: 12, + xxl: 8, + }, + }, + ], + }; +} +export function getBasicData() { + const data: any = (() => { + const arr: any = []; + for (let index = 0; index < 40; index++) { + arr.push({ + id: `${index}`, + name: 'John Brown', + age: `1${index}`, + no: `${index + 10}`, + address: 'New York No. 1 Lake ParkNew York No. 1 Lake Park', + beginTime: new Date().toLocaleString(), + endTime: new Date().toLocaleString(), + }); + } + return arr; + })(); + return data; +} + +export function getTreeTableData() { + const data: any = (() => { + const arr: any = []; + for (let index = 0; index < 40; index++) { + arr.push({ + id: `${index}`, + name: 'John Brown', + age: `1${index}`, + no: `${index + 10}`, + address: 'New York No. 1 Lake ParkNew York No. 1 Lake Park', + beginTime: new Date().toLocaleString(), + endTime: new Date().toLocaleString(), + children: [ + { + id: `l2-${index}`, + name: 'John Brown', + age: `1${index}`, + no: `${index + 10}`, + address: 'New York No. 1 Lake ParkNew York No. 1 Lake Park', + beginTime: new Date().toLocaleString(), + endTime: new Date().toLocaleString(), + }, + { + id: `l3-${index}`, + name: 'John Mary', + age: `1${index}`, + no: `${index + 10}`, + address: 'New York No. 1 Lake ParkNew York No. 1 Lake Park', + beginTime: new Date().toLocaleString(), + endTime: new Date().toLocaleString(), + }, + ], + }); + } + return arr; + })(); + + return data; +} diff --git a/src/views/demo/tree/ActionTree.vue b/src/views/demo/tree/ActionTree.vue new file mode 100644 index 0000000..74538df --- /dev/null +++ b/src/views/demo/tree/ActionTree.vue @@ -0,0 +1,131 @@ + + diff --git a/src/views/demo/tree/EditTree.vue b/src/views/demo/tree/EditTree.vue new file mode 100644 index 0000000..4af04a2 --- /dev/null +++ b/src/views/demo/tree/EditTree.vue @@ -0,0 +1,83 @@ + + diff --git a/src/views/demo/tree/data.ts b/src/views/demo/tree/data.ts new file mode 100644 index 0000000..8fb40bf --- /dev/null +++ b/src/views/demo/tree/data.ts @@ -0,0 +1,35 @@ +import { TreeItem } from '/@/components/Tree/index'; + +export const treeData: TreeItem[] = [ + { + title: 'parent ', + key: '0-0', + children: [ + { title: 'leaf', key: '0-0-0' }, + { + title: 'leaf', + key: '0-0-1', + children: [ + { title: 'leaf', key: '0-0-0-0', children: [{ title: 'leaf', key: '0-0-0-0-1' }] }, + { title: 'leaf', key: '0-0-0-1' }, + ], + }, + ], + }, + { + title: 'parent 2', + key: '1-1', + children: [ + { title: 'leaf', key: '1-1-0' }, + { title: 'leaf', key: '1-1-1' }, + ], + }, + { + title: 'parent 3', + key: '2-2', + children: [ + { title: 'leaf', key: '2-2-0' }, + { title: 'leaf', key: '2-2-1' }, + ], + }, +]; diff --git a/src/views/demo/tree/index.vue b/src/views/demo/tree/index.vue new file mode 100644 index 0000000..539e1f1 --- /dev/null +++ b/src/views/demo/tree/index.vue @@ -0,0 +1,128 @@ + + diff --git a/src/views/demo/vextable/OneToOneModal.vue b/src/views/demo/vextable/OneToOneModal.vue new file mode 100644 index 0000000..2f5cd1e --- /dev/null +++ b/src/views/demo/vextable/OneToOneModal.vue @@ -0,0 +1,187 @@ + + + diff --git a/src/views/demo/vextable/VexTableModal.vue b/src/views/demo/vextable/VexTableModal.vue new file mode 100644 index 0000000..f15586b --- /dev/null +++ b/src/views/demo/vextable/VexTableModal.vue @@ -0,0 +1,190 @@ + + + diff --git a/src/views/demo/vextable/api.ts b/src/views/demo/vextable/api.ts new file mode 100644 index 0000000..c8021ab --- /dev/null +++ b/src/views/demo/vextable/api.ts @@ -0,0 +1,32 @@ +import { defHttp } from '/@/utils/http/axios'; + +enum Api { + list = '/test/jeecgOrderMain/list', + delete = '/test/jeecgOrderMain/delete', + orderCustomerList = '/test/jeecgOrderMain/queryOrderCustomerListByMainId', + orderTicketList = '/test/jeecgOrderMain/queryOrderTicketListByMainId', +} + +/** + * 列表接口 + * @param params + */ +export const list = (params) => defHttp.get({ url: Api.list, params }); +/** + * 子表单信息 + * @param params + */ +export const orderTicketList = (params) => defHttp.get({ url: Api.orderTicketList, params }); +/** + * 子表单信息 + * @param params + */ +export const orderCustomerList = (params) => defHttp.get({ url: Api.orderCustomerList, params }); +/** + * 删除用户 + */ +export const deleteOne = (params, handleSuccess) => { + return defHttp.delete({ url: Api.delete, params }, { joinParamsToUrl: true }).then(() => { + handleSuccess(); + }); +}; diff --git a/src/views/demo/vextable/data.ts b/src/views/demo/vextable/data.ts new file mode 100644 index 0000000..cc9c39c --- /dev/null +++ b/src/views/demo/vextable/data.ts @@ -0,0 +1,154 @@ +import { BasicColumn, FormSchema } from '/@/components/Table'; +import { usePermission } from '/@/hooks/web/usePermission'; +import { JVxeColumn, JVxeTypes } from '/@/components/jeecg/JVxeTable/types'; +const { isDisabledAuth, hasPermission, initBpmFormData} = usePermission(); + +export const columns: BasicColumn[] = [ + { + title: '订单号', + dataIndex: 'orderCode', + width: 260, + }, + { + title: '订单类型', + dataIndex: 'ctype', + slots: { customRender: 'ctype' }, + }, + { + title: '订单日期', + dataIndex: 'orderDate', + width: 300, + }, + { + title: '订单金额', + width: 200, + dataIndex: 'orderMoney', + }, + { + title: '订单备注', + width: 200, + dataIndex: 'content', + }, + { + title: '流程状态', + width: 200, + dataIndex: 'bpmStatus', + customRender: ({ text }) => { + if (!text || text == '1') { + return '待提交'; + } else if (text == '2') { + return '处理中'; + } else if (text == '2') { + return '已完成'; + } else { + return text; + } + }, + }, +]; + +export function getBpmFormSchema(formData) { + //注入流程节点表单权限 + initBpmFormData(formData); + + const formSchema2: FormSchema[] = [ + { + label: '订单号', + field: 'orderCode', + component: 'Input', + show: ({ values }) => { + return hasPermission('order:orderCode'); + }, + }, + { + label: '订单类型', + field: 'ctype', + component: 'Select', + componentProps: { + options: [ + { label: '国内订单', value: '1', key: '1' }, + { label: '国际订单', value: '2', key: '2' }, + ], + }, + }, + { + label: '订单日期', + field: 'orderDate', + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + style: { + width: '100%', + }, + }, + }, + { + label: '订单金额', + field: 'orderMoney', + component: 'Input', + }, + { + label: '订单备注', + field: 'content', + component: 'Input', + }, + ]; + return formSchema2; +} + +export function getOrderCustomerFormSchema(formData) { + //注入流程节点表单权限 + initBpmFormData(formData); + + const formSchema2: FormSchema[] = [ + { + label: '客户名', + field: 'name', + component: 'Input', + dynamicDisabled: ({ values }) => { + return isDisabledAuth('order:name'); + }, + }, + { + label: '性别', + field: 'sex', + component: 'Select', + componentProps: { + options: [ + { label: '男', value: '1', key: '1' }, + { label: '女', value: '2', key: '2' }, + ], + }, + }, + { + label: '身份证号', + field: 'idcard', + component: 'Input', + }, + { + label: '手机号', + field: 'telphone', + component: 'Input', + }, + ]; + return formSchema2; +} + +export const jeecgOrderTicketColumns: JVxeColumn[] = [ + { + title: '航班号', + key: 'ticketCode', + width: 180, + type: JVxeTypes.input, + placeholder: '请输入${title}', + defaultValue: '', + }, + { + title: '航班时间', + key: 'tickectDate', + width: 180, + type: JVxeTypes.date, + placeholder: '请选择${title}', + defaultValue: '', + }, +]; diff --git a/src/views/demo/vextable/drawer.vue b/src/views/demo/vextable/drawer.vue new file mode 100644 index 0000000..7f94b04 --- /dev/null +++ b/src/views/demo/vextable/drawer.vue @@ -0,0 +1,38 @@ + + diff --git a/src/views/demo/vextable/form/JeecgOrderCustomerForm.vue b/src/views/demo/vextable/form/JeecgOrderCustomerForm.vue new file mode 100644 index 0000000..3e456e5 --- /dev/null +++ b/src/views/demo/vextable/form/JeecgOrderCustomerForm.vue @@ -0,0 +1,67 @@ + + + + + diff --git a/src/views/demo/vextable/form/JeecgOrderMainForm.vue b/src/views/demo/vextable/form/JeecgOrderMainForm.vue new file mode 100644 index 0000000..4a8fcc1 --- /dev/null +++ b/src/views/demo/vextable/form/JeecgOrderMainForm.vue @@ -0,0 +1,155 @@ + + + + + diff --git a/src/views/demo/vextable/index.vue b/src/views/demo/vextable/index.vue new file mode 100644 index 0000000..efe0f7d --- /dev/null +++ b/src/views/demo/vextable/index.vue @@ -0,0 +1,144 @@ + + diff --git a/src/views/demo/vextable/index2.vue b/src/views/demo/vextable/index2.vue new file mode 100644 index 0000000..01a00ad --- /dev/null +++ b/src/views/demo/vextable/index2.vue @@ -0,0 +1,39 @@ + + + + diff --git a/src/views/demo/vextable/jvxetable/JVxeTableModal.vue b/src/views/demo/vextable/jvxetable/JVxeTableModal.vue new file mode 100644 index 0000000..598074f --- /dev/null +++ b/src/views/demo/vextable/jvxetable/JVxeTableModal.vue @@ -0,0 +1,205 @@ + + + diff --git a/src/views/demo/vextable/jvxetable/jvxetable.api.ts b/src/views/demo/vextable/jvxetable/jvxetable.api.ts new file mode 100644 index 0000000..b00fb60 --- /dev/null +++ b/src/views/demo/vextable/jvxetable/jvxetable.api.ts @@ -0,0 +1,17 @@ +import { defHttp } from '/@/utils/http/axios'; +enum Api { + save = '/test/jeecgOrderMain/add', + edit = '/test/jeecgOrderMain/edit', + orderCustomerList = '/test/jeecgOrderMain/queryOrderCustomerListByMainId', + orderTicketList = '/test/jeecgOrderMain/queryOrderTicketListByMainId', +} +export const orderCustomerList = Api.orderCustomerList; +export const orderTicketList = Api.orderTicketList; +/** + * 保存或者更新 + * @param params + */ +export const saveOrUpdate = (params, isUpdate) => { + let url = isUpdate ? Api.edit : Api.save; + return defHttp.post({ url: url, params }); +}; diff --git a/src/views/demo/vextable/jvxetable/jvxetable.data.ts b/src/views/demo/vextable/jvxetable/jvxetable.data.ts new file mode 100644 index 0000000..193fa31 --- /dev/null +++ b/src/views/demo/vextable/jvxetable/jvxetable.data.ts @@ -0,0 +1,73 @@ +import { JVxeTypes, JVxeColumn } from '/@/components/jeecg/JVxeTable/types'; + +export const columns: JVxeColumn[] = [ + { + title: '客户名', + key: 'name', + width: 180, + type: JVxeTypes.input, + defaultValue: '', + placeholder: '请输入${title}', + validateRules: [{ required: true, message: '${title}不能为空' }], + }, + { + title: '性别', + key: 'sex', + width: 180, + type: JVxeTypes.select, + options: [ + // 下拉选项 + { title: '男', value: '1' }, + { title: '女', value: '2' }, + ], + defaultValue: '', + placeholder: '请选择${title}', + }, + { + title: '身份证号', + key: 'idcard', + width: 180, + type: JVxeTypes.input, + defaultValue: '', + placeholder: '请输入${title}', + validateRules: [ + { + pattern: '^\\d{6}(18|19|20)?\\d{2}(0[1-9]|1[012])(0[1-9]|[12]\\d|3[01])\\d{3}(\\d|[xX])$', + message: '${title}格式不正确', + }, + ], + }, + { + title: '手机号', + key: 'telphone', + width: 180, + type: JVxeTypes.input, + defaultValue: '', + placeholder: '请输入${title}', + validateRules: [ + { + pattern: '^1[3456789]\\d{9}$', + message: '${title}格式不正确', + }, + ], + }, +]; +export const columns1: JVxeColumn[] = [ + { + title: '航班号', + key: 'ticketCode', + width: 180, + type: JVxeTypes.input, + defaultValue: '', + placeholder: '请输入${title}', + validateRules: [{ required: true, message: '${title}不能为空' }], + }, + { + title: '航班时间', + key: 'tickectDate', + width: 180, + type: JVxeTypes.date, + placeholder: '请选择${title}', + defaultValue: '', + }, +]; diff --git a/src/views/demo/vextable/modal.vue b/src/views/demo/vextable/modal.vue new file mode 100644 index 0000000..efd4ac7 --- /dev/null +++ b/src/views/demo/vextable/modal.vue @@ -0,0 +1,268 @@ + + + diff --git a/src/views/monitor/datalog/DataLogCompareModal.vue b/src/views/monitor/datalog/DataLogCompareModal.vue new file mode 100644 index 0000000..2911c92 --- /dev/null +++ b/src/views/monitor/datalog/DataLogCompareModal.vue @@ -0,0 +1,220 @@ + + + + diff --git a/src/views/monitor/datalog/DataLogModal.vue b/src/views/monitor/datalog/DataLogModal.vue new file mode 100644 index 0000000..743e8e6 --- /dev/null +++ b/src/views/monitor/datalog/DataLogModal.vue @@ -0,0 +1,111 @@ + + + + diff --git a/src/views/monitor/datalog/datalog.api.ts b/src/views/monitor/datalog/datalog.api.ts new file mode 100644 index 0000000..a50f12b --- /dev/null +++ b/src/views/monitor/datalog/datalog.api.ts @@ -0,0 +1,31 @@ +import { defHttp } from '/@/utils/http/axios'; + +enum Api { + list = '/sys/dataLog/list', + queryDataVerList = '/sys/dataLog/queryDataVerList', + queryCompareList = '/sys/dataLog/queryCompareList', +} + +/** + * 查询数据日志列表 + * @param params + */ +export const getDataLogList = (params) => { + return defHttp.get({ url: Api.list, params }); +}; + +/** + * 查询数据日志列表 + * @param params + */ +export const queryDataVerList = (params) => { + return defHttp.get({ url: Api.queryDataVerList, params }); +}; + +/** + * 查询对比数据 + * @param params + */ +export const queryCompareList = (params) => { + return defHttp.get({ url: Api.queryCompareList, params }); +}; diff --git a/src/views/monitor/datalog/datalog.data.ts b/src/views/monitor/datalog/datalog.data.ts new file mode 100644 index 0000000..07de096 --- /dev/null +++ b/src/views/monitor/datalog/datalog.data.ts @@ -0,0 +1,45 @@ +import { BasicColumn, FormSchema } from '/@/components/Table'; + +export const columns: BasicColumn[] = [ + { + title: '表名', + dataIndex: 'dataTable', + width: 150, + align: 'left', + }, + { + title: '数据ID', + dataIndex: 'dataId', + width: 350, + }, + { + title: '版本号', + dataIndex: 'dataVersion', + width: 100, + }, + { + title: '数据内容', + dataIndex: 'dataContent', + }, + { + title: '创建人', + dataIndex: 'createBy', + sorter: true, + width: 200, + }, +]; + +export const searchFormSchema: FormSchema[] = [ + { + field: 'dataTable', + label: '表名', + component: 'Input', + colProps: { span: 8 }, + }, + { + field: 'dataId', + label: '数据ID', + component: 'Input', + colProps: { span: 8 }, + }, +]; diff --git a/src/views/monitor/datalog/index.vue b/src/views/monitor/datalog/index.vue new file mode 100644 index 0000000..77bd99f --- /dev/null +++ b/src/views/monitor/datalog/index.vue @@ -0,0 +1,57 @@ + + diff --git a/src/views/monitor/datasource/DataSourceModal.vue b/src/views/monitor/datasource/DataSourceModal.vue new file mode 100644 index 0000000..e45d9d1 --- /dev/null +++ b/src/views/monitor/datasource/DataSourceModal.vue @@ -0,0 +1,87 @@ + + diff --git a/src/views/monitor/datasource/datasource.api.ts b/src/views/monitor/datasource/datasource.api.ts new file mode 100644 index 0000000..3aa0580 --- /dev/null +++ b/src/views/monitor/datasource/datasource.api.ts @@ -0,0 +1,83 @@ +import { defHttp } from '/@/utils/http/axios'; +import { Modal } from 'ant-design-vue'; + +enum Api { + list = '/sys/dataSource/list', + save = '/sys/dataSource/add', + edit = '/sys/dataSource/edit', + get = '/sys/dataSource/queryById', + delete = '/sys/dataSource/delete', + testConnection = '/online/cgreport/api/testConnection', + deleteBatch = '/sys/dataSource/deleteBatch', + exportXlsUrl = 'sys/dataSource/exportXls', + importExcelUrl = 'sys/dataSource/importExcel', +} +/** + * 导出api + */ +export const getExportUrl = Api.exportXlsUrl; +/** + * 导入api + */ +export const getImportUrl = Api.importExcelUrl; + +/** + * 查询数据源列表 + * @param params + */ +export const getDataSourceList = (params) => { + return defHttp.get({ url: Api.list, params }); +}; + +/** + * 保存或者更新数据源 + * @param params + */ +export const saveOrUpdateDataSource = (params, isUpdate) => { + let url = isUpdate ? Api.edit : Api.save; + return defHttp.post({ url: url, params }); +}; + +/** + * 查询数据源详情 + * @param params + */ +export const getDataSourceById = (params) => { + return defHttp.get({ url: Api.get, params }); +}; + +/** + * 删除数据源 + * @param params + */ +export const deleteDataSource = (params, handleSuccess) => { + return defHttp.delete({ url: Api.delete, data: params }, { joinParamsToUrl: true }).then(() => { + handleSuccess(); + }); +}; + +/** + * 测试连接 + * @param params + */ +export const testConnection = (params) => { + return defHttp.post({ url: Api.testConnection, params }); +}; + +/** + * 批量删除数据源 + * @param params + */ +export const batchDeleteDataSource = (params, handleSuccess) => { + Modal.confirm({ + title: '确认删除', + content: '是否删除选中数据', + okText: '确认', + cancelText: '取消', + onOk: () => { + return defHttp.delete({ url: Api.deleteBatch, data: params }, { joinParamsToUrl: true }).then(() => { + handleSuccess(); + }); + }, + }); +}; diff --git a/src/views/monitor/datasource/datasource.data.ts b/src/views/monitor/datasource/datasource.data.ts new file mode 100644 index 0000000..de403f8 --- /dev/null +++ b/src/views/monitor/datasource/datasource.data.ts @@ -0,0 +1,185 @@ +import { BasicColumn, FormSchema } from '/@/components/Table'; + +const dbDriverMap = { + // MySQL 数据库 + '1': { dbDriver: 'com.mysql.jdbc.Driver' }, + //MySQL5.7+ 数据库 + '4': { dbDriver: 'com.mysql.cj.jdbc.Driver' }, + // Oracle + '2': { dbDriver: 'oracle.jdbc.OracleDriver' }, + // SQLServer 数据库 + '3': { dbDriver: 'com.microsoft.sqlserver.jdbc.SQLServerDriver' }, + // marialDB 数据库 + '5': { dbDriver: 'org.mariadb.jdbc.Driver' }, + // postgresql 数据库 + '6': { dbDriver: 'org.postgresql.Driver' }, + // 达梦 数据库 + '7': { dbDriver: 'dm.jdbc.driver.DmDriver' }, + // 人大金仓 数据库 + '8': { dbDriver: 'com.kingbase8.Driver' }, + // 神通 数据库 + '9': { dbDriver: 'com.oscar.Driver' }, + // SQLite 数据库 + '10': { dbDriver: 'org.sqlite.JDBC' }, + // DB2 数据库 + '11': { dbDriver: 'com.ibm.db2.jcc.DB2Driver' }, + // Hsqldb 数据库 + '12': { dbDriver: 'org.hsqldb.jdbc.JDBCDriver' }, + // Derby 数据库 + '13': { dbDriver: 'org.apache.derby.jdbc.ClientDriver' }, + // H2 数据库 + '14': { dbDriver: 'org.h2.Driver' }, + // 其他数据库 + '15': { dbDriver: '' }, +}; +const dbUrlMap = { + // MySQL 数据库 + '1': { dbUrl: 'jdbc:mysql://127.0.0.1:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false' }, + //MySQL5.7+ 数据库 + '4': { + dbUrl: + 'jdbc:mysql://127.0.0.1:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai', + }, + // Oracle + '2': { dbUrl: 'jdbc:oracle:thin:@127.0.0.1:1521:ORCL' }, + // SQLServer 数据库 + '3': { dbUrl: 'jdbc:sqlserver://127.0.0.1:1433;SelectMethod=cursor;DatabaseName=jeecgboot' }, + // Mariadb 数据库 + '5': { dbUrl: 'jdbc:mariadb://127.0.0.1:3306/jeecg-boot?characterEncoding=UTF-8&useSSL=false' }, + // Postgresql 数据库 + '6': { dbUrl: 'jdbc:postgresql://127.0.0.1:5432/jeecg-boot' }, + // 达梦 数据库 + '7': { dbUrl: 'jdbc:dm://127.0.0.1:5236/?jeecg-boot&zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8' }, + // 人大金仓 数据库 + '8': { dbUrl: 'jdbc:kingbase8://127.0.0.1:54321/jeecg-boot' }, + // 神通 数据库 + '9': { dbUrl: 'jdbc:oscar://192.168.1.125:2003/jeecg-boot' }, + // SQLite 数据库 + '10': { dbUrl: 'jdbc:sqlite://opt/test.db' }, + // DB2 数据库 + '11': { dbUrl: 'jdbc:db2://127.0.0.1:50000/jeecg-boot' }, + // Hsqldb 数据库 + '12': { dbUrl: 'jdbc:hsqldb:hsql://127.0.0.1/jeecg-boot' }, + // Derby 数据库 + '13': { dbUrl: 'jdbc:derby://127.0.0.1:1527/jeecg-boot' }, + // H2 数据库 + '14': { dbUrl: 'jdbc:h2:tcp://127.0.0.1:8082/jeecg-boot' }, + // 其他数据库 + '15': { dbUrl: '' }, +}; + +export const columns: BasicColumn[] = [ + { + title: '数据源名称', + dataIndex: 'name', + width: 200, + align: 'left', + }, + { + title: '数据库类型', + dataIndex: 'dbType_dictText', + width: 200, + }, + { + title: '驱动类', + dataIndex: 'dbDriver', + width: 200, + }, + { + title: '数据源地址', + dataIndex: 'dbUrl', + }, + { + title: '用户名', + dataIndex: 'dbUsername', + width: 200, + }, +]; + +export const searchFormSchema: FormSchema[] = [ + { + field: 'name', + label: '数据源名称', + component: 'Input', + colProps: { span: 8 }, + }, + { + field: 'dbType', + label: '数据库类型', + component: 'JDictSelectTag', + colProps: { span: 8 }, + componentProps: () => { + return { + dictCode: 'database_type', + }; + }, + }, +]; + +export const formSchema: FormSchema[] = [ + { + field: 'id', + label: 'id', + component: 'Input', + show: false, + }, + { + field: 'code', + label: '数据源编码', + component: 'Input', + required: true, + dynamicDisabled: ({ values }) => { + return !!values.id; + }, + }, + { + field: 'name', + label: '数据源名称', + component: 'Input', + required: true, + }, + { + field: 'dbType', + label: '数据库类型', + component: 'JDictSelectTag', + required: true, + componentProps: ({ formModel }) => { + return { + dictCode: 'database_type', + onChange: (e: any) => { + formModel = Object.assign(formModel, dbDriverMap[e], dbUrlMap[e]); + }, + }; + }, + }, + { + field: 'dbDriver', + label: '驱动类', + required: true, + component: 'Input', + }, + { + field: 'dbUrl', + label: '数据源地址', + required: true, + component: 'Input', + }, + { + field: 'dbUsername', + label: '用户名', + required: true, + component: 'Input', + }, + { + field: 'dbPassword', + label: '密码', + required: true, + component: 'InputPassword', + slot: 'pwd', + }, + { + field: 'remark', + label: '备注', + component: 'InputTextArea', + }, +]; diff --git a/src/views/monitor/datasource/index.vue b/src/views/monitor/datasource/index.vue new file mode 100644 index 0000000..f12f5af --- /dev/null +++ b/src/views/monitor/datasource/index.vue @@ -0,0 +1,118 @@ + + diff --git a/src/views/monitor/disk/DiskInfo.vue b/src/views/monitor/disk/DiskInfo.vue new file mode 100644 index 0000000..7154678 --- /dev/null +++ b/src/views/monitor/disk/DiskInfo.vue @@ -0,0 +1,37 @@ + + diff --git a/src/views/monitor/disk/disk.api.ts b/src/views/monitor/disk/disk.api.ts new file mode 100644 index 0000000..ce01231 --- /dev/null +++ b/src/views/monitor/disk/disk.api.ts @@ -0,0 +1,12 @@ +import { defHttp } from '/@/utils/http/axios'; + +enum Api { + queryDiskInfo = '/sys/actuator/redis/queryDiskInfo', +} + +/** + * 详细信息 + */ +export const queryDiskInfo = () => { + return defHttp.get({ url: Api.queryDiskInfo }, { successMessageMode: 'none' }); +}; diff --git a/src/views/monitor/disk/gauge.vue b/src/views/monitor/disk/gauge.vue new file mode 100644 index 0000000..7711fa7 --- /dev/null +++ b/src/views/monitor/disk/gauge.vue @@ -0,0 +1,82 @@ + + diff --git a/src/views/monitor/log/index.vue b/src/views/monitor/log/index.vue new file mode 100644 index 0000000..371eb99 --- /dev/null +++ b/src/views/monitor/log/index.vue @@ -0,0 +1,98 @@ + + + diff --git a/src/views/monitor/log/log.api.ts b/src/views/monitor/log/log.api.ts new file mode 100644 index 0000000..9676b58 --- /dev/null +++ b/src/views/monitor/log/log.api.ts @@ -0,0 +1,13 @@ +import { defHttp } from '/@/utils/http/axios'; + +enum Api { + list = '/sys/log/list', +} + +/** + * 查询日志列表 + * @param params + */ +export const getLogList = (params) => { + return defHttp.get({ url: Api.list, params }); +}; diff --git a/src/views/monitor/log/log.data.ts b/src/views/monitor/log/log.data.ts new file mode 100644 index 0000000..f6233eb --- /dev/null +++ b/src/views/monitor/log/log.data.ts @@ -0,0 +1,134 @@ +import { BasicColumn, FormSchema } from '/@/components/Table'; + +export const columns: BasicColumn[] = [ + { + title: '日志内容', + dataIndex: 'logContent', + width: 100, + align: 'left', + }, + { + title: '操作人ID', + dataIndex: 'userid', + width: 80, + }, + { + title: '操作人', + dataIndex: 'username', + width: 80, + }, + { + title: 'IP', + dataIndex: 'ip', + width: 80, + }, + { + title: '耗时(毫秒)', + dataIndex: 'costTime', + width: 80, + }, + { + title: '创建时间', + dataIndex: 'createTime', + sorter: true, + width: 80, + }, + { + title: '客户端类型', + dataIndex: 'clientType_dictText', + width: 60, + }, +]; + +/** + * 操作日志需要操作类型 + */ +export const operationLogColumn: BasicColumn[] = [ + ...columns, + { + title: '操作类型', + dataIndex: 'operateType_dictText', + width: 40, + }, +]; + +export const exceptionColumns: BasicColumn[] = [ + { + title: '异常标题', + dataIndex: 'logContent', + width: 100, + align: 'left', + }, + { + title: '请求地址', + dataIndex: 'requestUrl', + width: 100, + }, + { + title: '请求参数', + dataIndex: 'method', + width: 60, + }, + { + title: '操作人', + dataIndex: 'username', + width: 60, + customRender: ({ record }) => { + let pname = record.username; + let pid = record.userid; + if(!pname && !pid){ + return ""; + } + return pname + " (账号: "+ pid + " )"; + }, + }, + { + title: 'IP', + dataIndex: 'ip', + width: 60, + }, + { + title: '创建时间', + dataIndex: 'createTime', + sorter: true, + width: 60, + }, + { + title: '客户端类型', + dataIndex: 'clientType_dictText', + width: 60, + }, +]; + +export const searchFormSchema: FormSchema[] = [ + { + field: 'keyWord', + label: '搜索日志', + component: 'Input', + colProps: { span: 8 }, + }, + { + field: 'fieldTime', + component: 'RangePicker', + label: '创建时间', + componentProps: { + valueType: 'Date', + }, + colProps: { + span: 6, + }, + }, +]; + +export const operationSearchFormSchema: FormSchema[] = [ + ...searchFormSchema, + { + field: 'operateType', + label: '操作类型', + component: 'JDictSelectTag', + colProps: { span: 4 }, + componentProps: { + dictCode: 'operate_type', + }, + }, +]; diff --git a/src/views/monitor/mynews/DetailModal.vue b/src/views/monitor/mynews/DetailModal.vue new file mode 100644 index 0000000..31b6b6b --- /dev/null +++ b/src/views/monitor/mynews/DetailModal.vue @@ -0,0 +1,92 @@ + + + + diff --git a/src/views/monitor/mynews/DynamicNotice.vue b/src/views/monitor/mynews/DynamicNotice.vue new file mode 100644 index 0000000..83a0c10 --- /dev/null +++ b/src/views/monitor/mynews/DynamicNotice.vue @@ -0,0 +1,35 @@ + + diff --git a/src/views/monitor/mynews/XssWhiteList.ts b/src/views/monitor/mynews/XssWhiteList.ts new file mode 100644 index 0000000..d8477c3 --- /dev/null +++ b/src/views/monitor/mynews/XssWhiteList.ts @@ -0,0 +1,41 @@ +//xss攻击白名单列表 +export const options = { + whiteList: { + h1: ['style'], + h2: ['style'], + h3: ['style'], + h4: ['style'], + h5: ['style'], + h6: ['style'], + hr: ['style'], + span: ['style'], + strong: ['style'], + b: ['style'], + i: ['style'], + br: [], + p: ['style'], + pre: ['style'], + code: ['style'], + a: ['style', 'target', 'href', 'title', 'rel'], + img: ['style', 'src', 'title','width','height'], + div: ['style'], + table: ['style', 'width', 'border', 'height'], + tr: ['style'], + td: ['style', 'width', 'colspan'], + th: ['style', 'width', 'colspan'], + tbody: ['style'], + ul: ['style'], + li: ['style'], + ol: ['style'], + dl: ['style'], + dt: ['style'], + em: ['style'], + cite: ['style'], + section: ['style'], + header: ['style'], + footer: ['style'], + blockquote: ['style'], + audio: ['autoplay', 'controls', 'loop', 'preload', 'src'], + video: ['autoplay', 'controls', 'loop', 'preload', 'src', 'height', 'width'], + }, +}; diff --git a/src/views/monitor/mynews/index.vue b/src/views/monitor/mynews/index.vue new file mode 100644 index 0000000..45c0cb3 --- /dev/null +++ b/src/views/monitor/mynews/index.vue @@ -0,0 +1,133 @@ + + diff --git a/src/views/monitor/mynews/mynews.api.ts b/src/views/monitor/mynews/mynews.api.ts new file mode 100644 index 0000000..c9c7724 --- /dev/null +++ b/src/views/monitor/mynews/mynews.api.ts @@ -0,0 +1,61 @@ +import { defHttp } from '/@/utils/http/axios'; +import { Modal } from 'ant-design-vue'; + +enum Api { + list = '/sys/sysAnnouncementSend/getMyAnnouncementSend', + editCementSend = '/sys/sysAnnouncementSend/editByAnntIdAndUserId', + readAllMsg = '/sys/sysAnnouncementSend/readAll', + syncNotic = '/sys/annountCement/syncNotic', + getOne = '/sys/sysAnnouncementSend/getOne', +} + +/** + * 查询消息列表 + * @param params + */ +export const getMyNewsList = (params) => { + return defHttp.get({ url: Api.list, params }); +}; + +/** + * 更新用户系统消息阅读状态 + * @param params + */ +export const editCementSend = (params) => { + return defHttp.put({ url: Api.editCementSend, params }); +}; + +/** + * 一键已读 + * @param params + */ +export const readAllMsg = (params, handleSuccess) => { + Modal.confirm({ + title: '确认操作', + content: '是否全部标注已读?', + okText: '确认', + cancelText: '取消', + onOk: () => { + return defHttp.put({ url: Api.readAllMsg, data: params }, { joinParamsToUrl: true }).then(() => { + handleSuccess(); + }); + }, + }); +}; + +/** + * 同步消息 + * @param params + */ +export const syncNotic = (params) => { + return defHttp.get({ url: Api.syncNotic, params }); +}; + +/** + * 根据消息发送记录ID获取消息内容 + * @param sendId + */ +export const getOne = (sendId) => { + return defHttp.get({ url: Api.getOne, params:{sendId} }); +}; + diff --git a/src/views/monitor/mynews/mynews.data.ts b/src/views/monitor/mynews/mynews.data.ts new file mode 100644 index 0000000..578903f --- /dev/null +++ b/src/views/monitor/mynews/mynews.data.ts @@ -0,0 +1,84 @@ +import { BasicColumn, FormSchema } from '/@/components/Table'; +import { render } from '/@/utils/common/renderUtils'; + +export const columns: BasicColumn[] = [ + { + title: '标题', + dataIndex: 'titile', + width: 100, + align: 'left', + }, + { + title: '消息类型', + dataIndex: 'msgCategory', + width: 80, + customRender: ({ text }) => { + return render.renderDictNative( + text, + [ + { label: '通知公告', value: '1', color: 'blue' }, + { label: '系统消息', value: '2' }, + ], + true + ); + }, + }, + { + title: '发布人', + dataIndex: 'sender', + width: 80, + }, + { + title: '发布时间', + dataIndex: 'sendTime', + width: 80, + }, + { + title: '优先级', + dataIndex: 'priority', + width: 80, + customRender: ({ text }) => { + const color = text == 'L' ? 'blue' : text == 'M' ? 'yellow' : 'red'; + return render.renderTag(render.renderDict(text, 'priority'), color); + }, + }, + { + title: '阅读状态', + dataIndex: 'readFlag', + width: 80, + customRender: ({ text }) => { + return render.renderDictNative( + text, + [ + { label: '未读', value: '0', color: 'red' }, + { label: '已读', value: '1' }, + ], + true + ); + }, + }, +]; + +export const searchFormSchema: FormSchema[] = [ + { + field: 'titile', + label: '标题', + component: 'Input', + colProps: { span: 6 }, + }, + { + field: 'sender', + label: '发布人', + component: 'Input', + colProps: { span: 6 }, + }, + { + field: 'sendTime', + label: '发布时间', + component: 'RangeDate', + componentProps: { + valueType: 'Date', + }, + colProps: { span: 6 }, + }, +]; diff --git a/src/views/monitor/quartz/QuartzModal.vue b/src/views/monitor/quartz/QuartzModal.vue new file mode 100644 index 0000000..bbf18cd --- /dev/null +++ b/src/views/monitor/quartz/QuartzModal.vue @@ -0,0 +1,62 @@ + + diff --git a/src/views/monitor/quartz/index.vue b/src/views/monitor/quartz/index.vue new file mode 100644 index 0000000..512dae4 --- /dev/null +++ b/src/views/monitor/quartz/index.vue @@ -0,0 +1,183 @@ + + diff --git a/src/views/monitor/quartz/quartz.api.ts b/src/views/monitor/quartz/quartz.api.ts new file mode 100644 index 0000000..1b89b27 --- /dev/null +++ b/src/views/monitor/quartz/quartz.api.ts @@ -0,0 +1,107 @@ +import { defHttp } from '/@/utils/http/axios'; +import { Modal } from 'ant-design-vue'; + +enum Api { + list = '/sys/quartzJob/list', + save = '/sys/quartzJob/add', + edit = '/sys/quartzJob/edit', + get = '/sys/quartzJob/queryById', + pause = '/sys/quartzJob/pause', + resume = '/sys/quartzJob/resume', + delete = '/sys/quartzJob/delete', + exportXlsUrl = '/sys/quartzJob/exportXls', + importExcelUrl = '/sys/quartzJob/importExcel', + execute = '/sys/quartzJob/execute', + deleteBatch = '/sys/quartzJob/deleteBatch', +} + +/** + * 导出api + */ +export const getExportUrl = Api.exportXlsUrl; +/** + * 导入api + */ +export const getImportUrl = Api.importExcelUrl; +/** + * 查询任务列表 + * @param params + */ +export const getQuartzList = (params) => { + return defHttp.get({ url: Api.list, params }); +}; + +/** + * 保存或者更新任务 + * @param params + */ +export const saveOrUpdateQuartz = (params, isUpdate) => { + let url = isUpdate ? Api.edit : Api.save; + return defHttp.post({ url: url, params }); +}; + +/** + * 查询任务详情 + * @param params + */ +export const getQuartzById = (params) => { + return defHttp.get({ url: Api.get, params }); +}; + +/** + * 删除任务 + * @param params + */ +export const deleteQuartz = (params, handleSuccess) => { + return defHttp.delete({ url: Api.delete, data: params }, { joinParamsToUrl: true }).then(() => { + handleSuccess(); + }); +}; + +/** + * 启动 + * @param params + */ +export const resumeJob = (params, handleSuccess) => { + return defHttp.get({ url: Api.resume, params }).then(() => { + handleSuccess(); + }); +}; + +/** + * 暂停 + * @param params + */ +export const pauseJob = (params, handleSuccess) => { + return defHttp.get({ url: Api.pause, params }).then(() => { + handleSuccess(); + }); +}; + +/** + * 立即执行 + * @param params + */ +export const executeImmediately = (params, handleSuccess) => { + return defHttp.get({ url: Api.execute, params }).then(() => { + handleSuccess(); + }); +}; + +/** + * 批量删除任务 + * @param params + */ +export const batchDeleteQuartz = (params, handleSuccess) => { + Modal.confirm({ + title: '确认删除', + content: '是否删除选中数据', + okText: '确认', + cancelText: '取消', + onOk: () => { + return defHttp.delete({ url: Api.deleteBatch, data: params }, { joinParamsToUrl: true }).then(() => { + handleSuccess(); + }); + }, + }); +}; diff --git a/src/views/monitor/quartz/quartz.data.ts b/src/views/monitor/quartz/quartz.data.ts new file mode 100644 index 0000000..10d94f7 --- /dev/null +++ b/src/views/monitor/quartz/quartz.data.ts @@ -0,0 +1,124 @@ +import { BasicColumn, FormSchema } from '/@/components/Table'; +import { render } from '/@/utils/common/renderUtils'; +import { JCronValidator } from '/@/components/Form'; + +export const columns: BasicColumn[] = [ + { + title: '任务类名', + dataIndex: 'jobClassName', + width: 200, + align: 'left', + }, + { + title: 'Cron表达式', + dataIndex: 'cronExpression', + width: 200, + }, + { + title: '参数', + dataIndex: 'parameter', + width: 200, + }, + { + title: '描述', + dataIndex: 'description', + width: 200, + }, + { + title: '状态', + dataIndex: 'status', + width: 100, + customRender: ({ text }) => { + const color = text == '0' ? 'green' : text == '-1' ? 'red' : 'gray'; + return render.renderTag(render.renderDict(text, 'quartz_status'), color); + }, + }, +]; + +export const searchFormSchema: FormSchema[] = [ + { + field: 'jobClassName', + label: '任务类名', + component: 'Input', + colProps: { span: 8 }, + }, + { + field: 'status', + label: '任务状态', + component: 'JDictSelectTag', + componentProps: { + dictCode: 'quartz_status', + stringToNumber: true, + }, + colProps: { span: 8 }, + }, +]; + +export const formSchema: FormSchema[] = [ + { + field: 'id', + label: 'id', + component: 'Input', + show: false, + }, + { + field: 'jobClassName', + label: '任务类名', + component: 'Input', + required: true, + }, + { + field: 'cronExpression', + label: 'Cron表达式', + component: 'JEasyCron', + defaultValue: '* * * * * ? *', + rules: [{ required: true, message: '请输入Cron表达式' }, { validator: JCronValidator }], + }, + { + field: 'paramterType', + label: '参数类型', + component: 'Select', + defaultValue: 'string', + componentProps: { + options: [ + { label: '字符串', value: 'string' }, + { label: 'JSON对象', value: 'json' }, + ], + }, + }, + { + field: 'parameter', + label: '参数', + component: 'InputTextArea', + ifShow: ({ values }) => { + return values.paramterType == 'string'; + }, + }, + { + field: 'parameter', + label: '参数', + component: 'JAddInput', + helpMessage: '键值对形式填写', + ifShow: ({ values }) => { + return values.paramterType == 'json'; + }, + }, + { + field: 'status', + label: '状态', + component: 'JDictSelectTag', + componentProps: { + dictCode: 'quartz_status', + type: 'radioButton', + stringToNumber: true, + dropdownStyle: { + maxHeight: '6vh', + }, + }, + }, + { + field: 'description', + label: '描述', + component: 'InputTextArea', + }, +]; diff --git a/src/views/monitor/redis/index.vue b/src/views/monitor/redis/index.vue new file mode 100644 index 0000000..89e1f59 --- /dev/null +++ b/src/views/monitor/redis/index.vue @@ -0,0 +1,211 @@ + + diff --git a/src/views/monitor/redis/redis.api.ts b/src/views/monitor/redis/redis.api.ts new file mode 100644 index 0000000..5b959cb --- /dev/null +++ b/src/views/monitor/redis/redis.api.ts @@ -0,0 +1,40 @@ +import { defHttp } from '/@/utils/http/axios'; + +enum Api { + keysSize = '/sys/actuator/redis/keysSize', + memoryInfo = '/sys/actuator/redis/memoryInfo', + info = '/sys/actuator/redis/info', + metricsHistory = '/sys/actuator/redis/metrics/history', +} + +/** + * key个数 + */ +export const getKeysSize = () => { + return defHttp.get({ url: Api.keysSize }, { isTransformResponse: false }); +}; + +/** + * 内存信息 + */ +export const getMemoryInfo = () => { + return defHttp.get({ url: Api.memoryInfo }, { isTransformResponse: false }); +}; + +/** + * 详细信息 + */ +export const getInfo = () => { + return defHttp.get({ url: Api.info }); +}; + +/** + * 历史监控记录 + */ +export const getMetricsHistory = () => { + return defHttp.get({ url: Api.metricsHistory }); +}; + +export const getRedisInfo = () => { + return Promise.all([getKeysSize(), getMemoryInfo()]); +}; diff --git a/src/views/monitor/redis/redis.data.ts b/src/views/monitor/redis/redis.data.ts new file mode 100644 index 0000000..d370f94 --- /dev/null +++ b/src/views/monitor/redis/redis.data.ts @@ -0,0 +1,19 @@ +import { BasicColumn } from '/@/components/Table'; + +export const columns: BasicColumn[] = [ + { + title: 'Key', + dataIndex: 'key', + width: 100, + }, + { + title: 'Description', + dataIndex: 'description', + width: 80, + }, + { + title: 'Value', + dataIndex: 'value', + width: 80, + }, +]; diff --git a/src/views/monitor/route/RouteModal.vue b/src/views/monitor/route/RouteModal.vue new file mode 100644 index 0000000..3fd0764 --- /dev/null +++ b/src/views/monitor/route/RouteModal.vue @@ -0,0 +1,424 @@ + + diff --git a/src/views/monitor/route/components/RouteRecycleBinModal.vue b/src/views/monitor/route/components/RouteRecycleBinModal.vue new file mode 100644 index 0000000..3d14218 --- /dev/null +++ b/src/views/monitor/route/components/RouteRecycleBinModal.vue @@ -0,0 +1,84 @@ + + diff --git a/src/views/monitor/route/index.vue b/src/views/monitor/route/index.vue new file mode 100644 index 0000000..2945cbc --- /dev/null +++ b/src/views/monitor/route/index.vue @@ -0,0 +1,124 @@ + + diff --git a/src/views/monitor/route/route.api.ts b/src/views/monitor/route/route.api.ts new file mode 100644 index 0000000..3224cb3 --- /dev/null +++ b/src/views/monitor/route/route.api.ts @@ -0,0 +1,73 @@ +import { defHttp } from '/@/utils/http/axios'; + +enum Api { + list = '/sys/gatewayRoute/list', + deleteList = '/sys/gatewayRoute/deleteList', + save = '/sys/gatewayRoute/add', + edit = '/sys/gatewayRoute/updateAll', + delete = '/sys/gatewayRoute/delete', + + copyRoute = '/sys/gatewayRoute/copyRoute', + batchPutRecycleBin = '/sys/gatewayRoute/putRecycleBin', + batchDeleteRecycleBin = '/sys/gatewayRoute/deleteRecycleBin', +} + +/** + * 查询路由列表 + * @param params + */ +export const getRouteList = (params) => { + return defHttp.get({ url: Api.list, params }); +}; +/** + * 查询逻辑删除的路由列表 + * @param params + */ +export const deleteRouteList = (params) => { + return defHttp.get({ url: Api.deleteList, params }); +}; + +/** + * 保存或者更新路由 + * @param params + */ +export const saveOrUpdateRoute = (params) => { + return defHttp.post({ url: Api.edit, params }); +}; + +/** + * 删除路由 + * @param params + */ +export const deleteRoute = (params, handleSuccess) => { + return defHttp.delete({ url: Api.delete, data: params }, { joinParamsToUrl: true }).then(() => { + handleSuccess(); + }); +}; + +/** + * 回收站还原 + * @param params + */ +export const putRecycleBin = (params, handleSuccess) => { + return defHttp.put({ url: Api.batchPutRecycleBin, params }).then(() => { + handleSuccess(); + }); +}; +/** + * 回收站删除 + * @param params + */ +export const deleteRecycleBin = (params, handleSuccess) => { + return defHttp.delete({ url: `${Api.batchDeleteRecycleBin}?ids=${params.ids}` }).then(() => { + handleSuccess(); + }); +}; +/** + * 复制 + */ +export const copyRoute = (params, handleSuccess) => { + return defHttp.get({ url: Api.copyRoute, params }).then(() => { + handleSuccess(); + }); +}; diff --git a/src/views/monitor/route/route.data.ts b/src/views/monitor/route/route.data.ts new file mode 100644 index 0000000..26ce7fe --- /dev/null +++ b/src/views/monitor/route/route.data.ts @@ -0,0 +1,52 @@ +import { BasicColumn, FormSchema } from '/@/components/Table'; + +export const columns: BasicColumn[] = [ + { + title: '路由ID', + dataIndex: 'routerId', + width: 200, + align: 'left', + }, + { + title: '路由名称', + dataIndex: 'name', + width: 200, + }, + { + title: '路由URI', + dataIndex: 'uri', + width: 200, + }, + { + title: '状态', + dataIndex: 'status', + slots: { customRender: 'status' }, + width: 150, + }, +]; + +export const formSchema: FormSchema[] = [ + { + field: 'name', + label: '路由ID', + component: 'Input', + required: true, + }, + { + field: 'name', + label: '路由名称', + component: 'InputNumber', + required: true, + }, + { + field: 'uri', + label: '路由URI', + component: 'Input', + }, + { + field: 'predicates', + label: '路由条件', + slot: 'predicates', + component: 'Input', + }, +]; diff --git a/src/views/monitor/server/index.vue b/src/views/monitor/server/index.vue new file mode 100644 index 0000000..db01538 --- /dev/null +++ b/src/views/monitor/server/index.vue @@ -0,0 +1,119 @@ + + diff --git a/src/views/monitor/server/server.api.ts b/src/views/monitor/server/server.api.ts new file mode 100644 index 0000000..8184191 --- /dev/null +++ b/src/views/monitor/server/server.api.ts @@ -0,0 +1,392 @@ +import { defHttp } from '/@/utils/http/axios'; + +enum Api { + cpuCount = '/actuator/metrics/system.cpu.count', + cpuUsage = '/actuator/metrics/system.cpu.usage', + processStartTime = '/actuator/metrics/process.start.time', + processUptime = '/actuator/metrics/process.uptime', + processCpuUsage = '/actuator/metrics/process.cpu.usage', + + jvmMemoryMax = '/actuator/metrics/jvm.memory.max', + jvmMemoryCommitted = '/actuator/metrics/jvm.memory.committed', + jvmMemoryUsed = '/actuator/metrics/jvm.memory.used', + jvmBufferMemoryUsed = '/actuator/metrics/jvm.buffer.memory.used', + jvmBufferCount = '/actuator/metrics/jvm.buffer.count', + jvmThreadsDaemon = '/actuator/metrics/jvm.threads.daemon', + jvmThreadsLive = '/actuator/metrics/jvm.threads.live', + jvmThreadsPeak = '/actuator/metrics/jvm.threads.peak', + jvmClassesLoaded = '/actuator/metrics/jvm.classes.loaded', + jvmClassesUnloaded = '/actuator/metrics/jvm.classes.unloaded', + jvmGcMemoryAllocated = '/actuator/metrics/jvm.gc.memory.allocated', + jvmGcMemoryPromoted = '/actuator/metrics/jvm.gc.memory.promoted', + jvmGcMaxDataSize = '/actuator/metrics/jvm.gc.max.data.size', + jvmGcLiveDataSize = '/actuator/metrics/jvm.gc.live.data.size', + jvmGcPause = '/actuator/metrics/jvm.gc.pause', + + tomcatSessionsCreated = '/actuator/metrics/tomcat.sessions.created', + tomcatSessionsExpired = '/actuator/metrics/tomcat.sessions.expired', + tomcatSessionsActiveCurrent = '/actuator/metrics/tomcat.sessions.active.current', + tomcatSessionsActiveMax = '/actuator/metrics/tomcat.sessions.active.max', + tomcatSessionsRejected = '/actuator/metrics/tomcat.sessions.rejected', + + memoryInfo = '/sys/actuator/memory/info', + // undertow 监控 + undertowSessionsCreated = '/actuator/metrics/undertow.sessions.created', + undertowSessionsExpired = '/actuator/metrics/undertow.sessions.expired', + undertowSessionsActiveCurrent = '/actuator/metrics/undertow.sessions.active.current', + undertowSessionsActiveMax = '/actuator/metrics/undertow.sessions.active.max', +} + +/** + * 查询cpu数量 + */ +export const getCpuCount = () => { + return defHttp.get({ url: Api.cpuCount }, { isTransformResponse: false }); +}; + +/** + * 查询系统 CPU 使用率 + */ +export const getCpuUsage = () => { + return defHttp.get({ url: Api.cpuUsage }, { isTransformResponse: false }); +}; + +/** + * 查询应用启动时间点 + */ +export const getProcessStartTime = () => { + return defHttp.get({ url: Api.processStartTime }, { isTransformResponse: false }); +}; + +/** + * 查询应用已运行时间 + */ +export const getProcessUptime = () => { + return defHttp.get({ url: Api.processUptime }, { isTransformResponse: false }); +}; + +/** + * 查询当前应用 CPU 使用率 + */ +export const getProcessCpuUsage = () => { + return defHttp.get({ url: Api.processCpuUsage }, { isTransformResponse: false }); +}; + +/** + * 查询JVM 最大内存 + */ +export const getJvmMemoryMax = () => { + return defHttp.get({ url: Api.jvmMemoryMax }, { isTransformResponse: false }); +}; + +/** + * JVM 可用内存 + */ +export const getJvmMemoryCommitted = () => { + return defHttp.get({ url: Api.jvmMemoryCommitted }, { isTransformResponse: false }); +}; + +/** + * JVM 已用内存 + */ +export const getJvmMemoryUsed = () => { + return defHttp.get({ url: Api.jvmMemoryUsed }, { isTransformResponse: false }); +}; + +/** + * JVM 缓冲区已用内存 + */ +export const getJvmBufferMemoryUsed = () => { + return defHttp.get({ url: Api.jvmBufferMemoryUsed }, { isTransformResponse: false }); +}; + +/** + *JVM 当前缓冲区数量 + */ +export const getJvmBufferCount = () => { + return defHttp.get({ url: Api.jvmBufferCount }, { isTransformResponse: false }); +}; + +/** + **JVM 守护线程数量 + */ +export const getJvmThreadsDaemon = () => { + return defHttp.get({ url: Api.jvmThreadsDaemon }, { isTransformResponse: false }); +}; + +/** + *JVM 当前活跃线程数量 + */ +export const getJvmThreadsLive = () => { + return defHttp.get({ url: Api.jvmThreadsLive }, { isTransformResponse: false }); +}; + +/** + *JVM 峰值线程数量 + */ +export const getJvmThreadsPeak = () => { + return defHttp.get({ url: Api.jvmThreadsPeak }, { isTransformResponse: false }); +}; + +/** + *JVM 已加载 Class 数量 + */ +export const getJvmClassesLoaded = () => { + return defHttp.get({ url: Api.jvmClassesLoaded }, { isTransformResponse: false }); +}; + +/** + *JVM 未加载 Class 数量 + */ +export const getJvmClassesUnloaded = () => { + return defHttp.get({ url: Api.jvmClassesUnloaded }, { isTransformResponse: false }); +}; + +/** + **GC 时, 年轻代分配的内存空间 + */ +export const getJvmGcMemoryAllocated = () => { + return defHttp.get({ url: Api.jvmGcMemoryAllocated }, { isTransformResponse: false }); +}; + +/** + *GC 时, 老年代分配的内存空间 + */ +export const getJvmGcMemoryPromoted = () => { + return defHttp.get({ url: Api.jvmGcMemoryPromoted }, { isTransformResponse: false }); +}; + +/** + *GC 时, 老年代的最大内存空间 + */ +export const getJvmGcMaxDataSize = () => { + return defHttp.get({ url: Api.jvmGcMaxDataSize }, { isTransformResponse: false }); +}; + +/** + *FullGC 时, 老年代的内存空间 + */ +export const getJvmGcLiveDataSize = () => { + return defHttp.get({ url: Api.jvmGcLiveDataSize }, { isTransformResponse: false }); +}; + +/** + *系统启动以来GC 次数 + */ +export const getJvmGcPause = () => { + return defHttp.get({ url: Api.jvmGcPause }, { isTransformResponse: false }); +}; + +/** + *tomcat 已创建 session 数 + */ +export const getTomcatSessionsCreated = () => { + return defHttp.get({ url: Api.tomcatSessionsCreated }, { isTransformResponse: false }); +}; + +/** + *tomcat 已过期 session 数 + */ +export const getTomcatSessionsExpired = () => { + return defHttp.get({ url: Api.tomcatSessionsExpired }, { isTransformResponse: false }); +}; + +/** + *tomcat 当前活跃 session 数 + */ +export const getTomcatSessionsActiveCurrent = () => { + return defHttp.get({ url: Api.tomcatSessionsActiveCurrent }, { isTransformResponse: false }); +}; + +/** + *tomcat 活跃 session 数峰值 + */ +export const getTomcatSessionsActiveMax = () => { + return defHttp.get({ url: Api.tomcatSessionsActiveMax }, { isTransformResponse: false }); +}; + +/** + *超过session 最大配置后,拒绝的 session 个数 + */ +export const getTomcatSessionsRejected = () => { + return defHttp.get({ url: Api.tomcatSessionsRejected }, { isTransformResponse: false }); +}; + +/** + *undertow 已创建 session 数 + */ +export const getUndertowSessionsCreated = () => { + return defHttp.get({ url: Api.undertowSessionsCreated }, { isTransformResponse: false }); +}; + +/** + *undertow 已过期 session 数 + */ +export const getUndertowSessionsExpired = () => { + return defHttp.get({ url: Api.undertowSessionsExpired }, { isTransformResponse: false }); +}; + +/** + *undertow 当前活跃 session 数 + */ +export const getUndertowSessionsActiveCurrent = () => { + return defHttp.get({ url: Api.undertowSessionsActiveCurrent }, { isTransformResponse: false }); +}; + +/** + *undertow 活跃 session 数峰值 + */ +export const getUndertowSessionsActiveMax = () => { + return defHttp.get({ url: Api.undertowSessionsActiveMax }, { isTransformResponse: false }); +}; + +/** + * 内存信息 + */ +export const getMemoryInfo = () => { + return defHttp.get({ url: Api.memoryInfo }, { isTransformResponse: false }); +}; + +export const getMoreInfo = (infoType) => { + if (infoType == '1') { + return {}; + } + if (infoType == '2') { + return { 'jvm.gc.pause': ['.count', '.totalTime'] }; + } + if (infoType == '3') { + return { + 'tomcat.global.request': ['.count', '.totalTime'], + 'tomcat.servlet.request': ['.count', '.totalTime'], + }; + } + if (infoType == '5') { + return {}; + } + if (infoType == '6') { + return {}; + } +}; + +export const getTextInfo = (infoType) => { + if (infoType == '1') { + return { + 'system.cpu.count': { color: 'green', text: 'CPU 数量', unit: '核' }, + 'system.cpu.usage': { color: 'green', text: '系统 CPU 使用率', unit: '%', valueType: 'Number' }, + 'process.start.time': { color: 'purple', text: '应用启动时间点', unit: '', valueType: 'Date' }, + 'process.uptime': { color: 'purple', text: '应用已运行时间', unit: '秒' }, + 'process.cpu.usage': { color: 'purple', text: '当前应用 CPU 使用率', unit: '%', valueType: 'Number' }, + }; + } + if (infoType == '2') { + return { + 'jvm.memory.max': { color: 'purple', text: 'JVM 最大内存', unit: 'MB', valueType: 'RAM' }, + 'jvm.memory.committed': { color: 'purple', text: 'JVM 可用内存', unit: 'MB', valueType: 'RAM' }, + 'jvm.memory.used': { color: 'purple', text: 'JVM 已用内存', unit: 'MB', valueType: 'RAM' }, + 'jvm.buffer.memory.used': { color: 'cyan', text: 'JVM 缓冲区已用内存', unit: 'MB', valueType: 'RAM' }, + 'jvm.buffer.count': { color: 'cyan', text: '当前缓冲区数量', unit: '个' }, + 'jvm.threads.daemon': { color: 'green', text: 'JVM 守护线程数量', unit: '个' }, + 'jvm.threads.live': { color: 'green', text: 'JVM 当前活跃线程数量', unit: '个' }, + 'jvm.threads.peak': { color: 'green', text: 'JVM 峰值线程数量', unit: '个' }, + 'jvm.classes.loaded': { color: 'orange', text: 'JVM 已加载 Class 数量', unit: '个' }, + 'jvm.classes.unloaded': { color: 'orange', text: 'JVM 未加载 Class 数量', unit: '个' }, + 'jvm.gc.memory.allocated': { color: 'pink', text: 'GC 时, 年轻代分配的内存空间', unit: 'MB', valueType: 'RAM' }, + 'jvm.gc.memory.promoted': { color: 'pink', text: 'GC 时, 老年代分配的内存空间', unit: 'MB', valueType: 'RAM' }, + 'jvm.gc.max.data.size': { color: 'pink', text: 'GC 时, 老年代的最大内存空间', unit: 'MB', valueType: 'RAM' }, + 'jvm.gc.live.data.size': { color: 'pink', text: 'FullGC 时, 老年代的内存空间', unit: 'MB', valueType: 'RAM' }, + 'jvm.gc.pause.count': { color: 'blue', text: '系统启动以来GC 次数', unit: '次' }, + 'jvm.gc.pause.totalTime': { color: 'blue', text: '系统启动以来GC 总耗时', unit: '秒' }, + }; + } + if (infoType == '3') { + return { + 'tomcat.sessions.created': { color: 'green', text: 'tomcat 已创建 session 数', unit: '个' }, + 'tomcat.sessions.expired': { color: 'green', text: 'tomcat 已过期 session 数', unit: '个' }, + 'tomcat.sessions.active.current': { color: 'green', text: 'tomcat 当前活跃 session 数', unit: '个' }, + 'tomcat.sessions.active.max': { color: 'green', text: 'tomcat 活跃 session 数峰值', unit: '个' }, + 'tomcat.sessions.rejected': { color: 'green', text: '超过session 最大配置后,拒绝的 session 个数', unit: '个' }, + 'tomcat.global.sent': { color: 'purple', text: '发送的字节数', unit: 'bytes' }, + 'tomcat.global.request.max': { color: 'purple', text: 'request 请求最长耗时', unit: '秒' }, + 'tomcat.global.request.count': { color: 'purple', text: '全局 request 请求次数', unit: '次' }, + 'tomcat.global.request.totalTime': { color: 'purple', text: '全局 request 请求总耗时', unit: '秒' }, + 'tomcat.servlet.request.max': { color: 'cyan', text: 'servlet 请求最长耗时', unit: '秒' }, + 'tomcat.servlet.request.count': { color: 'cyan', text: 'servlet 总请求次数', unit: '次' }, + 'tomcat.servlet.request.totalTime': { color: 'cyan', text: 'servlet 请求总耗时', unit: '秒' }, + 'tomcat.threads.current': { color: 'pink', text: 'tomcat 当前线程数(包括守护线程)', unit: '个' }, + 'tomcat.threads.config.max': { color: 'pink', text: 'tomcat 配置的线程最大数', unit: '个' }, + }; + } + if (infoType == '5') { + return { + 'memory.physical.total': { color: 'green', text: '总物理内存', unit: 'MB', valueType: 'RAM' }, + 'memory.physical.used': { color: 'green', text: '已使用物理内存', unit: 'MB', valueType: 'RAM' }, + 'memory.physical.free': { color: 'green', text: '可用物理内存', unit: 'MB', valueType: 'RAM' }, + 'memory.physical.usage': { color: 'green', text: '物理内存使用率', unit: '%', valueType: 'Number' }, + 'memory.runtime.total': { color: 'purple', text: 'JVM总内存', unit: 'MB', valueType: 'RAM' }, + 'memory.runtime.used': { color: 'purple', text: 'JVM已使用内存', unit: 'MB', valueType: 'RAM' }, + 'memory.runtime.max': { color: 'purple', text: 'JVM最大内存', unit: 'MB', valueType: 'RAM' }, + 'memory.runtime.free': { color: 'purple', text: 'JVM可用内存', unit: 'MB', valueType: 'RAM' }, + 'memory.runtime.usage': { color: 'purple', text: 'JVM内存使用率', unit: '%', valueType: 'Number' }, + }; + } + if (infoType == '6') { + // undertow 监控 + return { + 'undertow.sessions.created': { color: 'green', text: 'undertow 已创建 session 数', unit: '个' }, + 'undertow.sessions.expired': { color: 'green', text: 'undertow 已过期 session 数', unit: '个' }, + 'undertow.sessions.active.current': { color: 'green', text: 'undertow 当前活跃 session 数', unit: '个' }, + 'undertow.sessions.active.max': { color: 'green', text: 'undertow 活跃 session 数峰值', unit: '个' }, + 'undertow.sessions.rejected': { color: 'green', text: '超过session 最大配置后,拒绝的 session 个数', unit: '个' }, + }; + } +}; + +/** + * 查询cpu数量 + * @param params + */ +export const getServerInfo = (infoType) => { + if (infoType == '1') { + return Promise.all([getCpuCount(), getCpuUsage(), getProcessStartTime(), getProcessUptime(), getProcessCpuUsage()]); + } + if (infoType == '2') { + return Promise.all([ + getJvmMemoryMax(), + getJvmMemoryCommitted(), + getJvmMemoryUsed(), + getJvmBufferCount(), + getJvmBufferMemoryUsed(), + getJvmThreadsDaemon(), + getJvmThreadsLive(), + getJvmThreadsPeak(), + getJvmClassesLoaded(), + getJvmClassesUnloaded(), + getJvmGcLiveDataSize(), + getJvmGcMaxDataSize(), + getJvmGcMemoryAllocated(), + getJvmGcMemoryPromoted(), + getJvmGcPause(), + ]); + } + if (infoType == '3') { + return Promise.all([ + getTomcatSessionsActiveCurrent(), + getTomcatSessionsActiveMax(), + getTomcatSessionsCreated(), + getTomcatSessionsExpired(), + getTomcatSessionsRejected(), + ]); + } + if (infoType == '5') { + return Promise.all([getMemoryInfo()]); + } + // undertow监控 + if (infoType == '6') { + return Promise.all([ + getUndertowSessionsActiveCurrent(), + getUndertowSessionsActiveMax(), + getUndertowSessionsCreated(), + getUndertowSessionsExpired(), + ]); + } +}; diff --git a/src/views/monitor/server/server.data.ts b/src/views/monitor/server/server.data.ts new file mode 100644 index 0000000..8b9fa54 --- /dev/null +++ b/src/views/monitor/server/server.data.ts @@ -0,0 +1,23 @@ +import { BasicColumn } from '/@/components/Table'; + +export const columns: BasicColumn[] = [ + { + title: '参数', + dataIndex: 'param', + width: 80, + align: 'left', + slots: { customRender: 'param' }, + }, + { + title: '描述', + dataIndex: 'text', + slots: { customRender: 'text' }, + width: 80, + }, + { + title: '当前值', + dataIndex: 'value', + slots: { customRender: 'value' }, + width: 80, + }, +]; diff --git a/src/views/monitor/trace/index.vue b/src/views/monitor/trace/index.vue new file mode 100644 index 0000000..ce1e601 --- /dev/null +++ b/src/views/monitor/trace/index.vue @@ -0,0 +1,72 @@ + + + diff --git a/src/views/monitor/trace/trace.api.ts b/src/views/monitor/trace/trace.api.ts new file mode 100644 index 0000000..cb69b52 --- /dev/null +++ b/src/views/monitor/trace/trace.api.ts @@ -0,0 +1,12 @@ +import { defHttp } from '/@/utils/http/axios'; + +enum Api { + actuatorList = '/actuator/jeecghttptrace/', +} + +/** + * 追踪信息 + */ +export const getActuatorList = (query: String, order: String) => { + return defHttp.get({ url: Api.actuatorList + query + '/' + order }, { isTransformResponse: false }); +}; diff --git a/src/views/monitor/trace/trace.data.ts b/src/views/monitor/trace/trace.data.ts new file mode 100644 index 0000000..ef195be --- /dev/null +++ b/src/views/monitor/trace/trace.data.ts @@ -0,0 +1,85 @@ +import { BasicColumn } from '/@/components/Table'; +import dayjs from 'dayjs'; +import _get from 'lodash.get'; +import { h } from 'vue'; +import { Tag } from 'ant-design-vue'; + +export const columns: BasicColumn[] = [ + { + title: '请求时间', + dataIndex: 'timestamp', + width: 50, + customRender({ text }) { + return dayjs(text).format('YYYY-MM-DD HH:mm:ss'); + }, + }, + { + title: '请求方法', + dataIndex: 'request.method', + width: 20, + customRender({ record, column }) { + let value = _get(record, column.dataIndex!); + let color = ''; + if (value === 'GET') { + color = '#87d068'; + } + if (value === 'POST') { + color = '#2db7f5'; + } + if (value === 'PUT') { + color = '#ffba5a'; + } + if (value === 'DELETE') { + color = '#ff5500'; + } + return h(Tag, { color }, () => value); + }, + }, + { + title: '请求URL', + dataIndex: 'request.uri', + width: 200, + customRender({ record, column }) { + return _get(record, column.dataIndex!); + }, + }, + { + title: '响应状态', + dataIndex: 'response.status', + width: 50, + customRender({ record, column }) { + let value = _get(record, column.dataIndex!); + let color = ''; + if (value < 200) { + color = 'pink'; + } else if (value < 201) { + color = 'green'; + } else if (value < 399) { + color = 'cyan'; + } else if (value < 403) { + color = 'orange'; + } else if (value < 501) { + color = 'red'; + } + return h(Tag, { color }, () => value); + }, + }, + { + title: '请求耗时', + dataIndex: 'timeTaken', + width: 50, + customRender({ record, column }) { + let value = _get(record, column.dataIndex!); + let color = 'red'; + if (value < 500) { + color = 'green'; + } else if (value < 1000) { + color = 'cyan'; + } else if (value < 1500) { + color = 'orange'; + } + return h(Tag, { color }, () => `${value} ms`); + }, + sorter: true, + }, +]; diff --git a/src/views/openapi/OpenApi.api.ts b/src/views/openapi/OpenApi.api.ts new file mode 100644 index 0000000..32c5f36 --- /dev/null +++ b/src/views/openapi/OpenApi.api.ts @@ -0,0 +1,118 @@ +import {defHttp} from '/@/utils/http/axios'; +import { useMessage } from "/@/hooks/web/useMessage"; + +const { createConfirm } = useMessage(); + +enum Api { + list = '/openapi/list', + save='/openapi/add', + edit='/openapi/edit', + deleteOne = '/openapi/delete', + deleteBatch = '/openapi/deleteBatch', + genPath = '/openapi/genPath', + importExcel = '/openapi/importExcel', + exportXls = '/openapi/exportXls', + openApiHeaderList = '/openapi/list', + openApiParamList = '/openapi/list', + openApiJson = '/openapi/json', +} + +/** + * 子表单查询接口 + * @param params + */ +export const genPath = Api.genPath +/** + * swagger文档json + * @param params + */ +export const openApiJson = Api.openApiJson +/** + * 导出api + * @param params + */ +export const getExportUrl = Api.exportXls; + +/** + * 导入api + */ +export const getImportUrl = Api.importExcel; +/** + * 子表单查询接口 + * @param params + */ +export const queryOpenApiHeader = Api.openApiHeaderList +/** + * 子表单查询接口 + * @param params + */ +export const queryOpenApiParam = Api.openApiParamList + +/** + * 列表接口 + * @param params + */ +export const list = (params) => + defHttp.get({url: Api.list, params}); + +/** + * 删除单个 + */ +export const deleteOne = (params,handleSuccess) => { + return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); +} +/** + * 批量删除 + * @param params + */ +export const batchDelete = (params, handleSuccess) => { + createConfirm({ + iconType: 'warning', + title: '确认删除', + content: '是否删除选中数据', + okText: '确认', + cancelText: '取消', + onOk: () => { + return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); + } + }); +} +/** + * 保存或者更新 + * @param params + */ +export const saveOrUpdate = (params, isUpdate) => { + if (isUpdate) { + return defHttp.put({url: Api.edit, params}); + } else { + return defHttp.post({url: Api.save, params}); + } +} +/** + * 获取接口地址 + * @param params + */ +export const getGenPath = (params) => + defHttp.get({url: Api.genPath, params},{isTransformResponse:false}); +/** + * 子表列表接口 + * @param params + */ +export const openApiHeaderList = (params) => + defHttp.get({url: Api.openApiHeaderList, params},{isTransformResponse:false}); +/** + * 子表列表接口 + * @param params + */ +export const openApiParamList = (params) => + defHttp.get({url: Api.openApiParamList, params},{isTransformResponse:false}); +/** + * swagger文档json + * @param params + */ +export const getOpenApiJson = (params) => + defHttp.get({url: Api.openApiJson, params},{isTransformResponse:false}); diff --git a/src/views/openapi/OpenApi.data.ts b/src/views/openapi/OpenApi.data.ts new file mode 100644 index 0000000..a94b4da --- /dev/null +++ b/src/views/openapi/OpenApi.data.ts @@ -0,0 +1,345 @@ +import {BasicColumn} from '/@/components/Table'; +import {FormSchema} from '/@/components/Table'; +import { rules} from '/@/utils/helper/validator'; +import { render } from '/@/utils/common/renderUtils'; +import {JVxeTypes,JVxeColumn} from '/@/components/jeecg/JVxeTable/types' +import { getWeekMonthQuarterYear } from '/@/utils'; +//列表数据 +export const columns: BasicColumn[] = [ + { + title: '接口名称', + align:"center", + dataIndex: 'name' + }, + { + title: '请求方法', + align:"center", + dataIndex: 'requestMethod' + }, + { + title: '接口地址', + align:"center", + dataIndex: 'requestUrl' + }, + { + title: 'IP 黑名单', + align:"center", + dataIndex: 'blackList' + }, + // { + // title: '状态', + // align:"center", + // dataIndex: 'status' + // }, + { + title: '创建人', + align:"center", + dataIndex: 'createBy' + }, + { + title: '创建时间', + align:"center", + dataIndex: 'createTime' + }, +]; +//查询数据 +export const searchFormSchema: FormSchema[] = [ + { + label: "接口名称", + field: "name", + component: 'JInput', + }, + { + label: "创建人", + field: "createBy", + component: 'JInput', + }, +]; +//表单数据 +export const formSchema: FormSchema[] = [ + { + label: '接口名称', + field: 'name', + component: 'Input', + dynamicRules: ({model,schema}) => { + return [ + { required: true, message: '请输入接口名称!'}, + ]; + }, + }, + { + label: '原始地址', + field: 'originUrl', + component: 'Input', + }, + { + label: '请求方法', + field: 'requestMethod', + component: 'JSearchSelect', + componentProps:{ + dictOptions: [ + { + text: 'POST', + value: 'POST', + }, + { + text: 'GET', + value: 'GET', + }, + { + text: 'HEAD', + value: 'HEAD', + }, + { + text: 'PUT', + value: 'PUT', + }, + { + text: 'PATCH', + value: 'PATCH', + }, + { + text: 'DELETE', + value: 'DELETE', + },{ + text: 'OPTIONS', + value: 'OPTIONS', + },{ + text: 'TRACE', + value: 'TRACE', + }, + ] + }, + dynamicRules: ({model,schema}) => { + return [ + { required: true, message: '请输入请求方法!'}, + ]; + }, + }, + { + label: '接口地址', + field: 'requestUrl', + component: 'Input', + dynamicDisabled:true + }, + { + label: 'IP 黑名单', + field: 'blackList', + component: 'Input', + }, + { + label: '请求体内容', + component:"Input", + field: 'body' + }, + { + label: '删除标识', + field: 'delFlag', + component: 'Input', + defaultValue:0, + show:false + }, + { + label: '状态', + field: 'status', + component: 'Input', + defaultValue:"1", + show:false + }, + // TODO 主键隐藏字段,目前写死为ID + { + label: '', + field: 'id', + component: 'Input', + show: false + }, +]; +//子表单数据 +//子表列表数据 +export const openApiHeaderColumns: BasicColumn[] = [ + // { + // title: 'apiId', + // align:"center", + // dataIndex: 'apiId' + // }, + { + title: '请求头Key', + align:"center", + dataIndex: 'headerKey' + }, + { + title: '是否必填', + align:"center", + dataIndex: 'required_dictText' + }, + { + title: '默认值', + align:"center", + dataIndex: 'defaultValue' + }, + { + title: '备注', + align:"center", + dataIndex: 'note' + }, +]; +//子表列表数据 +export const openApiParamColumns: BasicColumn[] = [ + // { + // title: 'apiId', + // align:"center", + // dataIndex: 'apiId' + // }, + { + title: '参数Key', + align:"center", + dataIndex: 'paramKey' + }, + { + title: '是否必填', + align:"center", + dataIndex: 'required_dictText' + }, + { + title: '默认值', + align:"center", + dataIndex: 'defaultValue' + }, + { + title: '备注', + align:"center", + dataIndex: 'note' + }, +]; +//子表表格配置 +export const openApiHeaderJVxeColumns: JVxeColumn[] = [ + // { + // title: 'apiId', + // key: 'apiId', + // type: JVxeTypes.input, + // width:"200px", + // placeholder: '请输入${title}', + // defaultValue:'', + // }, + { + title: '请求头Key', + key: 'headerKey', + type: JVxeTypes.input, + width:"200px", + placeholder: '请输入${title}', + defaultValue:'', + }, + { + title: '是否必填', + key: 'required', + type: JVxeTypes.checkbox, + options:[], + // dictCode:"yn", + width:"100px", + placeholder: '请输入${title}', + defaultValue:'', + customValue: ['1','0'] + }, + { + title: '默认值', + key: 'defaultValue', + type: JVxeTypes.input, + width:"200px", + placeholder: '请输入${title}', + defaultValue:'', + }, + { + title: '备注', + key: 'note', + type: JVxeTypes.input, + placeholder: '请输入${title}', + defaultValue:'', + }, + ] +export const openApiParamJVxeColumns: JVxeColumn[] = [ + // { + // title: 'apiId', + // key: 'apiId', + // type: JVxeTypes.input, + // width:"200px", + // placeholder: '请输入${title}', + // defaultValue:'', + // }, + { + title: '参数Key', + key: 'paramKey', + type: JVxeTypes.input, + width:"200px", + placeholder: '请输入${title}', + defaultValue:'', + }, + { + title: '是否必填', + key: 'required', + type: JVxeTypes.checkbox, + options:[], + // dictCode:"yn", + width:"100px", + placeholder: '请输入${title}', + defaultValue:'', + customValue: ['1','0'] + }, + { + title: '默认值', + key: 'defaultValue', + type: JVxeTypes.input, + width:"200px", + placeholder: '请输入${title}', + defaultValue:'', + }, + { + title: '备注', + key: 'note', + type: JVxeTypes.input, + placeholder: '请输入${title}', + defaultValue:'', + }, + ] + +// 高级查询数据 +export const superQuerySchema = { + name: {title: '接口名称',order: 0,view: 'text', type: 'string',}, + requestMethod: {title: '请求方法',order: 1,view: 'list', type: 'string',dictCode: '',}, + requestUrl: {title: '接口地址',order: 2,view: 'text', type: 'string',}, + blackList: {title: 'IP 黑名单',order: 3,view: 'text', type: 'string',}, + status: {title: '状态',order: 5,view: 'number', type: 'number',}, + createBy: {title: '创建人',order: 6,view: 'text', type: 'string',}, + createTime: {title: '创建时间',order: 7,view: 'datetime', type: 'string',}, + //子表高级查询 + openApiHeader: { + title: '请求头表', + view: 'table', + fields: { + // apiId: {title: 'apiId',order: 0,view: 'text', type: 'string',}, + headerKey: {title: '请求头Key',order: 1,view: 'text', type: 'string',}, + required: {title: '是否必填',order: 2,view: 'number', type: 'number',dictCode: 'yn',}, + defaultValue: {title: '默认值',order: 3,view: 'text', type: 'string',}, + note: {title: '备注',order: 4,view: 'text', type: 'string',}, + } + }, + openApiParam: { + title: '请求参数部分', + view: 'table', + fields: { + // apiId: {title: 'apiId',order: 0,view: 'text', type: 'string',}, + paramKey: {title: '参数Key',order: 1,view: 'text', type: 'string',}, + required: {title: '是否必填',order: 2,view: 'number', type: 'number',dictCode: 'yn',}, + defaultValue: {title: '默认值',order: 3,view: 'text', type: 'string',}, + note: {title: '备注',order: 4,view: 'text', type: 'string',}, + } + }, +}; + +/** +* 流程表单调用这个方法获取formSchema +* @param param +*/ +export function getBpmFormSchema(_formData): FormSchema[]{ + // 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema + return formSchema; +} diff --git a/src/views/openapi/OpenApiAuth.api.ts b/src/views/openapi/OpenApiAuth.api.ts new file mode 100644 index 0000000..c2792c9 --- /dev/null +++ b/src/views/openapi/OpenApiAuth.api.ts @@ -0,0 +1,122 @@ +import { defHttp } from '/@/utils/http/axios'; +import { useMessage } from "/@/hooks/web/useMessage"; + +const { createConfirm } = useMessage(); + +enum Api { + list = '/openapi/auth/list', + save='/openapi/auth/add', + edit='/openapi/auth/edit', + apiList= '/openapi/list', + genAKSK = '/openapi/auth/genAKSK', + permissionList='/openapi/permission/getOpenApi', + permissionAdd='/openapi/permission/add', + deleteOne = '/openapi/auth/delete', + deleteBatch = '/openapi/auth/deleteBatch', + importExcel = '/openapi/auth/importExcel', + exportXls = '/openapi/auth/exportXls', +} + +/** + * 获取API + * @param params + */ +export const apiList = Api.apiList; +/** + * 权限添加 + * @param params + */ +export const permissionAdd = Api.permissionAdd; +/** + * 生成AKSK + * @param params + */ +export const genAKSK = Api.genAKSK; + +/** + * 导出api + * @param params + */ +export const getExportUrl = Api.exportXls; + +/** + * 导入api + */ +export const getImportUrl = Api.importExcel; + +/** + * 列表接口 + * @param params + */ +export const list = (params) => defHttp.get({ url: Api.list, params }); + +/** + * 删除单个 + * @param params + * @param handleSuccess + */ +export const deleteOne = (params,handleSuccess) => { + return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); +} + +/** + * 批量删除 + * @param params + * @param handleSuccess + */ +export const batchDelete = (params, handleSuccess) => { + createConfirm({ + iconType: 'warning', + title: '确认删除', + content: '是否删除选中数据', + okText: '确认', + cancelText: '取消', + onOk: () => { + return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); + } + }); +} + +/** + * 保存或者更新 + * @param params + * @param isUpdate + */ +export const saveOrUpdate = (params, isUpdate) => { + if (isUpdate) { + return defHttp.put({ url: Api.edit, params }, { isTransformResponse: false }); + } + return defHttp.post({ url: Api.save, params }, { isTransformResponse: false }); +} + +/** + * 全部权限列表接口 + * @param params + */ +export const getApiList = (params) => defHttp.get({ url: Api.apiList, params }, { isTransformResponse: false }); + +/** + * 获取已授权项目的接口 + * @param params + */ +export const getPermissionList = (params) => defHttp.get({ url: Api.permissionList, params }); +/** + * 授权保存方法 + * @param params + * @param isUpdate + */ +export const permissionAddFunction = (params) => { + return defHttp.post({ url: Api.permissionAdd, params }, { isTransformResponse: false }); +} +/** + * 授权保存方法 + * @param params + * @param isUpdate + */ +export const getGenAKSK = (params) => { + return defHttp.get({ url: Api.genAKSK, params }); +} diff --git a/src/views/openapi/OpenApiAuth.data.ts b/src/views/openapi/OpenApiAuth.data.ts new file mode 100644 index 0000000..10c4095 --- /dev/null +++ b/src/views/openapi/OpenApiAuth.data.ts @@ -0,0 +1,48 @@ +import {BasicColumn} from '/@/components/Table'; +import {FormSchema} from '/@/components/Table'; +import { rules} from '/@/utils/helper/validator'; +import { render } from '/@/utils/common/renderUtils'; +import { getWeekMonthQuarterYear } from '/@/utils'; +//列表数据 +export const columns: BasicColumn[] = [ + { + title: '授权名称', + align: "center", + dataIndex: 'name' + }, + { + title: 'AK', + align: "center", + dataIndex: 'ak' + }, + { + title: 'SK', + align: "center", + dataIndex: 'sk' + }, + { + title: '创建人', + align: "center", + dataIndex: 'createBy' + }, + { + title: '创建时间', + align: "center", + dataIndex: 'createTime' + }, + // { + // title: '关联系统用户名', + // align: "center", + // dataIndex: 'createBy', + // }, +]; + +// 高级查询数据 +export const superQuerySchema = { + name: {title: '授权名称',order: 0,view: 'text', type: 'string',}, + ak: {title: 'AK',order: 1,view: 'text', type: 'string',}, + sk: {title: 'SK',order: 2,view: 'text', type: 'string',}, + createBy: {title: '关联系统用户名',order: 3,view: 'text', type: 'string',}, + createTime: {title: '创建时间',order: 4,view: 'datetime', type: 'string',}, + // systemUserId: {title: '关联系统用户名',order: 5,view: 'text', type: 'string',}, +}; diff --git a/src/views/openapi/OpenApiAuthList.vue b/src/views/openapi/OpenApiAuthList.vue new file mode 100644 index 0000000..fa9034b --- /dev/null +++ b/src/views/openapi/OpenApiAuthList.vue @@ -0,0 +1,303 @@ + + + + + diff --git a/src/views/openapi/OpenApiList.vue b/src/views/openapi/OpenApiList.vue new file mode 100644 index 0000000..a5bb097 --- /dev/null +++ b/src/views/openapi/OpenApiList.vue @@ -0,0 +1,217 @@ + + + + + diff --git a/src/views/openapi/SwaggerUI.vue b/src/views/openapi/SwaggerUI.vue new file mode 100644 index 0000000..d99e2de --- /dev/null +++ b/src/views/openapi/SwaggerUI.vue @@ -0,0 +1,36 @@ + + + + + diff --git a/src/views/openapi/components/AuthForm.vue b/src/views/openapi/components/AuthForm.vue new file mode 100644 index 0000000..fdbaeb1 --- /dev/null +++ b/src/views/openapi/components/AuthForm.vue @@ -0,0 +1,271 @@ + + + + + diff --git a/src/views/openapi/components/AuthModal.vue b/src/views/openapi/components/AuthModal.vue new file mode 100644 index 0000000..fefc81f --- /dev/null +++ b/src/views/openapi/components/AuthModal.vue @@ -0,0 +1,100 @@ + + + + + + diff --git a/src/views/openapi/components/OpenApiAuthForm.vue b/src/views/openapi/components/OpenApiAuthForm.vue new file mode 100644 index 0000000..e71b2f2 --- /dev/null +++ b/src/views/openapi/components/OpenApiAuthForm.vue @@ -0,0 +1,175 @@ + + + + + diff --git a/src/views/openapi/components/OpenApiAuthModal.vue b/src/views/openapi/components/OpenApiAuthModal.vue new file mode 100644 index 0000000..f81c1d9 --- /dev/null +++ b/src/views/openapi/components/OpenApiAuthModal.vue @@ -0,0 +1,77 @@ + + + + + + diff --git a/src/views/openapi/components/OpenApiModal.vue b/src/views/openapi/components/OpenApiModal.vue new file mode 100644 index 0000000..e59fcab --- /dev/null +++ b/src/views/openapi/components/OpenApiModal.vue @@ -0,0 +1,178 @@ + + + + + diff --git a/src/views/openapi/subTables/OpenApiHeaderSubTable.vue b/src/views/openapi/subTables/OpenApiHeaderSubTable.vue new file mode 100644 index 0000000..5856754 --- /dev/null +++ b/src/views/openapi/subTables/OpenApiHeaderSubTable.vue @@ -0,0 +1,44 @@ + + + diff --git a/src/views/openapi/subTables/OpenApiParamSubTable.vue b/src/views/openapi/subTables/OpenApiParamSubTable.vue new file mode 100644 index 0000000..b7e4ad6 --- /dev/null +++ b/src/views/openapi/subTables/OpenApiParamSubTable.vue @@ -0,0 +1,44 @@ + + + diff --git a/src/views/report/chartdemo/chartdemo.data.ts b/src/views/report/chartdemo/chartdemo.data.ts new file mode 100644 index 0000000..23d3db5 --- /dev/null +++ b/src/views/report/chartdemo/chartdemo.data.ts @@ -0,0 +1,52 @@ +const colors = ['#4db6ac', '#ffb74d', '#64b5f6', '#e57373', '#9575cd', '#a1887f', '#90a4ae', '#4dd0e1', '#81c784', '#ff8a65']; +export const getData = (() => { + let dottedBase = +new Date(); + const barDataSource: any[] = []; + const barMultiData: any[] = []; + const barLineData: any[] = []; + const barLineColors: any[] = []; + + for (let i = 0; i < 20; i++) { + let obj = { name: '', value: 0 }; + const date = new Date((dottedBase += 1000 * 3600 * 24)); + obj.name = [date.getFullYear(), date.getMonth() + 1, date.getDate()].join('-'); + obj.value = Math.random() * 200; + barDataSource.push(obj); + } + + for (let j = 0; j < 2; j++) { + for (let i = 0; i < 20; i++) { + let obj = { name: '', value: 0, type: 2010 + j + '' }; + const date = new Date(dottedBase + 1000 * 3600 * 24 * i); + obj.name = [date.getFullYear(), date.getMonth() + 1, date.getDate()].join('-'); + obj.value = Math.random() * 200; + barMultiData.push(obj); + } + } + const pieData = [ + { value: 335, name: '客服电话' }, + { value: 310, name: '奥迪官网' }, + { value: 234, name: '媒体曝光' }, + { value: 135, name: '质检总局' }, + { value: 105, name: '其他' }, + ]; + const radarData = [ + { value: 75, name: '政治', type: '文综', max: 100 }, + { value: 65, name: '历史', type: '文综', max: 100 }, + { value: 55, name: '地理', type: '文综', max: 100 }, + { value: 74, name: '化学', type: '文综', max: 100 }, + { value: 38, name: '物理', type: '文综', max: 100 }, + { value: 88, name: '生物', type: '文综', max: 100 }, + ]; + for (let j = 0; j < 2; j++) { + for (let i = 0; i < 15; i++) { + let obj = { name: '', value: 0, type: 2010 + j + '', seriesType: j >= 1 ? 'line' : 'bar' }; + const date = new Date(dottedBase + 1000 * 3600 * 24 * i); + obj.name = [date.getFullYear(), date.getMonth() + 1, date.getDate()].join('-'); + obj.value = Math.random() * 200; + barLineData.push(obj); + } + barLineColors.push(colors[j]); + } + return { barDataSource, barMultiData, pieData, barLineData, barLineColors,radarData }; +})(); diff --git a/src/views/report/chartdemo/index.vue b/src/views/report/chartdemo/index.vue new file mode 100644 index 0000000..df304ef --- /dev/null +++ b/src/views/report/chartdemo/index.vue @@ -0,0 +1,93 @@ + + + diff --git a/src/views/report/statisticst/index.vue b/src/views/report/statisticst/index.vue new file mode 100644 index 0000000..673a5d6 --- /dev/null +++ b/src/views/report/statisticst/index.vue @@ -0,0 +1,135 @@ + + + diff --git a/src/views/super/airag/aiapp/AiApp.api.ts b/src/views/super/airag/aiapp/AiApp.api.ts new file mode 100644 index 0000000..43a1917 --- /dev/null +++ b/src/views/super/airag/aiapp/AiApp.api.ts @@ -0,0 +1,103 @@ +import { defHttp } from '/@/utils/http/axios'; +import { Modal } from 'ant-design-vue'; + +export enum Api { + //知识库管理 + list = '/airag/app/list', + save = '/airag/app/edit', + release = '/airag/app/release', + delete = '/airag/app/delete', + queryById = '/airag/app/queryById', + queryBathById = '/airag/knowledge/query/batch/byId', + queryFlowById = '/airag/flow/queryById', + promptGenerate = '/airag/app/prompt/generate', +} + +/** + * 查询应用 + * @param params + */ +export const appList = (params) => { + return defHttp.get({ url: Api.list, params }, { isTransformResponse: false }); +}; + +/** + * 查询知识库 + * @param params + */ +export const queryKnowledgeBathById = (params) => { + return defHttp.get({ url: Api.queryBathById, params }, { isTransformResponse: false }); +}; + +/** + * 根据应用id查询应用 + * @param params + */ +export const queryById = (params) => { + return defHttp.get({ url: Api.queryById, params }, { isTransformResponse: false }); +}; + +/** + * 新增应用 + * @param params + */ +export const saveApp = (params) => { + return defHttp.put({ url: Api.save, params }); +}; + +// 发布应用 +export function releaseApp(appId: string, release = false) { + return defHttp.post({ + url: Api.release, + params: { + id: appId, + release: release, + } + }, {joinParamsToUrl: true}); +} + +/** + * 删除应用 + * @param params + * @param handleSuccess + */ +export const deleteApp = (params, handleSuccess) => { + Modal.confirm({ + title: '确认删除', + content: '是否删除名称为'+params.name+'的应用吗?', + okText: '确认', + cancelText: '取消', + onOk: () => { + return defHttp.delete({ url: Api.delete, params }, { joinParamsToUrl: true }).then(() => { + handleSuccess(); + }); + }, + }); +}; + + +/** + * 根据应用id查询流程 + * @param params + */ +export const queryFlowById = (params) => { + return defHttp.get({ url: Api.queryFlowById, params }, { isTransformResponse: false }); +}; + +/** + * 应用编排 + * @param params + */ +export const promptGenerate = (params) => { + return defHttp.post( + { + url: Api.promptGenerate+'?prompt='+ params.prompt, + adapter: 'fetch', + responseType: 'stream', + timeout: 5 * 60 * 1000, + }, + { + isTransformResponse: false, + } + ); +}; diff --git a/src/views/super/airag/aiapp/AiApp.data.ts b/src/views/super/airag/aiapp/AiApp.data.ts new file mode 100644 index 0000000..c4843f4 --- /dev/null +++ b/src/views/super/airag/aiapp/AiApp.data.ts @@ -0,0 +1,88 @@ +import { FormSchema } from '@/components/Form'; + +/** + * 表单 + */ +export const formSchema: FormSchema[] = [ + { + label: 'id', + field: 'id', + component: 'Input', + show: false, + }, + { + label: '应用名称', + field: 'name', + required: true, + componentProps: { + //是否展示字数 + showCount: true, + maxlength: 64, + }, + component: 'Input', + }, + { + label: '应用描述', + field: 'descr', + component: 'InputTextArea', + componentProps: { + placeholder: '描述该应用的应用场景及用途', + rows: 4, + //是否展示字数 + showCount: true, + maxlength: 256, + }, + }, + { + label: '应用图标', + field: 'icon', + component: 'JImageUpload', + }, + { + label: '选择应用类型', + field: 'type', + component: 'Input', + show:({ values })=>{ + return !values.id; + }, + slot: 'typeSlot', + }, +]; + +/** + * 快捷指令表单 + */ +export const quickCommandFormSchema: FormSchema[] = [ + { + label: 'key', + field: 'key', + component: 'Input', + show: false, + }, + { + label: '按钮名称', + field: 'name', + required: true, + component: 'Input', + componentProps: { + showCount: true, + maxLength: 10, + }, + }, + { + label: '按钮图标', + field: 'icon', + component: 'IconPicker', + }, + { + label: '指令内容', + field: 'descr', + required: true, + component: 'InputTextArea', + componentProps: { + autosize: { minRows: 4, maxRows: 4 }, + showCount: true, + maxLength: 100, + } + }, +]; diff --git a/src/views/super/airag/aiapp/AiAppList.vue b/src/views/super/airag/aiapp/AiAppList.vue new file mode 100644 index 0000000..041479c --- /dev/null +++ b/src/views/super/airag/aiapp/AiAppList.vue @@ -0,0 +1,597 @@ + + + + + + + diff --git a/src/views/super/airag/aiapp/chat/AiChat.vue b/src/views/super/airag/aiapp/chat/AiChat.vue new file mode 100644 index 0000000..37b70fa --- /dev/null +++ b/src/views/super/airag/aiapp/chat/AiChat.vue @@ -0,0 +1,407 @@ + + + + + diff --git a/src/views/super/airag/aiapp/chat/AiChatIcon.vue b/src/views/super/airag/aiapp/chat/AiChatIcon.vue new file mode 100644 index 0000000..d71047e --- /dev/null +++ b/src/views/super/airag/aiapp/chat/AiChatIcon.vue @@ -0,0 +1,87 @@ + + + + + diff --git a/src/views/super/airag/aiapp/chat/chat.vue b/src/views/super/airag/aiapp/chat/chat.vue new file mode 100644 index 0000000..a92f6ef --- /dev/null +++ b/src/views/super/airag/aiapp/chat/chat.vue @@ -0,0 +1,1110 @@ + + + + + + diff --git a/src/views/super/airag/aiapp/chat/chatMessage.vue b/src/views/super/airag/aiapp/chat/chatMessage.vue new file mode 100644 index 0000000..afb39f9 --- /dev/null +++ b/src/views/super/airag/aiapp/chat/chatMessage.vue @@ -0,0 +1,286 @@ + + + + + diff --git a/src/views/super/airag/aiapp/chat/chatText.vue b/src/views/super/airag/aiapp/chat/chatText.vue new file mode 100644 index 0000000..db75d03 --- /dev/null +++ b/src/views/super/airag/aiapp/chat/chatText.vue @@ -0,0 +1,269 @@ + + + + diff --git a/src/views/super/airag/aiapp/chat/components/ImageViewer.vue b/src/views/super/airag/aiapp/chat/components/ImageViewer.vue new file mode 100644 index 0000000..b089f34 --- /dev/null +++ b/src/views/super/airag/aiapp/chat/components/ImageViewer.vue @@ -0,0 +1,71 @@ + + + + + + diff --git a/src/views/super/airag/aiapp/chat/hooks/useChat.ts b/src/views/super/airag/aiapp/chat/hooks/useChat.ts new file mode 100644 index 0000000..d6a2369 --- /dev/null +++ b/src/views/super/airag/aiapp/chat/hooks/useChat.ts @@ -0,0 +1,28 @@ +import { useChatStore } from '@/store'; + +export function useChat() { + const chatStore = useChatStore(); + + const getChatByUuidAndIndex = (uuid: number, index: number) => { + return chatStore.getChatByUuidAndIndex(uuid, index); + }; + + const addChat = (uuid: number, chat: Chat.Chat) => { + chatStore.addChatByUuid(uuid, chat); + }; + + const updateChat = (uuid: number, index: number, chat: Chat.Chat) => { + chatStore.updateChatByUuid(uuid, index, chat); + }; + + const updateChatSome = (uuid: number, index: number, chat: Partial) => { + chatStore.updateChatSomeByUuid(uuid, index, chat); + }; + + return { + addChat, + updateChat, + updateChatSome, + getChatByUuidAndIndex, + }; +} diff --git a/src/views/super/airag/aiapp/chat/hooks/useScroll.ts b/src/views/super/airag/aiapp/chat/hooks/useScroll.ts new file mode 100644 index 0000000..c71b6bb --- /dev/null +++ b/src/views/super/airag/aiapp/chat/hooks/useScroll.ts @@ -0,0 +1,41 @@ +import type { Ref } from 'vue'; +import { nextTick, ref } from 'vue'; + +type ScrollElement = HTMLDivElement | null; + +interface ScrollReturn { + scrollRef: Ref; + scrollToBottom: () => Promise; + scrollToTop: () => Promise; + scrollToBottomIfAtBottom: () => Promise; +} + +export function useScroll(): ScrollReturn { + const scrollRef = ref(null); + + const scrollToBottom = async () => { + await nextTick(); + if (scrollRef.value) scrollRef.value.scrollTop = scrollRef.value.scrollHeight; + }; + + const scrollToTop = async () => { + await nextTick(); + if (scrollRef.value) scrollRef.value.scrollTop = 0; + }; + + const scrollToBottomIfAtBottom = async () => { + await nextTick(); + if (scrollRef.value) { + const threshold = 100; // Threshold, indicating the distance threshold to the bottom of the scroll bar. + const distanceToBottom = scrollRef.value.scrollHeight - scrollRef.value.scrollTop - scrollRef.value.clientHeight; + if (distanceToBottom <= threshold) scrollRef.value.scrollTop = scrollRef.value.scrollHeight; + } + }; + + return { + scrollRef, + scrollToBottom, + scrollToTop, + scrollToBottomIfAtBottom, + }; +} diff --git a/src/views/super/airag/aiapp/chat/js/chat.js b/src/views/super/airag/aiapp/chat/js/chat.js new file mode 100644 index 0000000..d9fa1de --- /dev/null +++ b/src/views/super/airag/aiapp/chat/js/chat.js @@ -0,0 +1,188 @@ +// iframe-widget.js +(function () { + let widgetInstance = null; + const defaultConfig = { + // 支持'top-left'左上, 'top-right'右上, 'bottom-left'左下, 'bottom-right'右下 + iconPosition: 'bottom-right', + //图标的大小 + iconSize: '45px', + //图标的颜色 + iconColor: '#155eef', + //必填不允许修改 + appId: '', + //聊天弹窗的宽度 + chatWidth: '800px', + //聊天弹窗的高度 + chatHeight: '700px', + }; + + /** + * 创建ai图标 + * @param config + */ + function createAiChat(config) { + // 单例模式,确保只存在一个实例 + if (widgetInstance) { + return; + } + + // 合并配置 + const finalConfig = { ...defaultConfig, ...config }; + + if (!finalConfig.appId) { + console.error('appId为空!'); + return; + } + let body = document.body; + body.style.margin = "0"; + // 创建容器 + const container = document.createElement('div'); + container.style.cssText = ` + position: fixed; + z-index: 998; + ${getPositionStyles(finalConfig.iconPosition)} + cursor: pointer; + `; + // 创建图标 + const icon = document.createElement('div'); + icon.style.cssText = ` + width: ${finalConfig.iconSize}; + height: ${finalConfig.iconSize}; + background-color: ${finalConfig.iconColor}; + border-radius: 50%; + box-shadow: #cccccc 0 4px 8px 0; + padding: 10px; + display: flex; + align-items: center; + justify-content: center; + color: white; + box-sizing: border-box; + `; + icon.innerHTML = + ''; + + // 创建iframe容器 + const iframeContainer = document.createElement('div'); + let right = finalConfig.chatWidth === '100%' ? '0' : '10px'; + let bottom = finalConfig.chatHeight === '100%' ? '0' : '10px'; + let chatWidth = finalConfig.chatWidth; + let chatHeight = finalConfig.chatHeight; + if(isMobileDevice()){ + chatWidth = "100%"; + chatHeight = "100%"; + right = '0'; + bottom = '0'; + } + iframeContainer.style.cssText = ` + position: fixed; + right: ${right}; + bottom: ${bottom}; + width: ${chatWidth} !important; + height: ${chatHeight} !important; + background: white; + border-radius: 8px; + box-shadow: 0 0 20px #cccccc; + display: none; + z-index: 10000; + `; + + // 创建iframe + const iframe = document.createElement('iframe'); + iframe.style.cssText = ` + width: 100%; + height: 100%; + border: none; + border-radius: 8px; + `; + + iframe.id = 'ai-app-chat-document'; + //update-begin---author:wangshuai---date:2025-04-25---for:【QQYUN-12159】【AI 广告位】让需要自建AI知识库的用户知道如何通过敲敲云搭建自己的AI知识库--- + iframe.src = getIframeSrc(finalConfig) + '/ai/app/chat/' + finalConfig.appId + "?source=chatJs"; + //update-end---author:wangshuai---date:2025-04-25---for:【QQYUN-12159】【AI 广告位】让需要自建AI知识库的用户知道如何通过敲敲云搭建自己的AI知识库--- + let iconRight = finalConfig.chatWidth === '100%'?'0':'-6px'; + let iconTop = finalConfig.chatWidth === '100%'?'0':'-9px'; + if(isMobileDevice()){ + iconRight = '2px'; + iconTop = '2px'; + } + // 创建关闭按钮 + const closeBtn = document.createElement('div'); + closeBtn.innerHTML = + ''; + closeBtn.style.cssText = ` + position: absolute; + margin-top: ${iconTop}; + right: ${iconRight}; + cursor: pointer; + background: white; + width: 25px; + height: 25px; + border-radius: 50%; + display: flex; + align-items: center; + justify-content: center; + box-shadow: 0 2px 5px #cccccc; + `; + + // 组装元素 + iframeContainer.appendChild(closeBtn); + iframeContainer.appendChild(iframe); + document.body.appendChild(iframeContainer); + container.appendChild(icon); + document.body.appendChild(container); + + // 事件监听 + icon.addEventListener('click', () => { + iframeContainer.style.display = 'block'; + }); + + closeBtn.addEventListener('click', () => { + iframeContainer.style.display = 'none'; + }); + + // 保存实例引用 + widgetInstance = { + remove: () => { + container.remove(); + iframeContainer.remove(); + }, + }; + } + + /** + * 获取位置信息 + * + * @param position + * @returns {*|string} + */ + function getPositionStyles(position) { + const positions = { + 'top-left': 'top: 20px; left: 20px;', + 'top-right': 'top: 20px; right: 20px;', + 'bottom-left': 'bottom: 20px; left: 20px;', + 'bottom-right': 'bottom: 20px; right: 20px;', + }; + return positions[position] || positions['bottom-right']; + } + + /** + * 获取src地址 + */ + function getIframeSrc(finalConfig) { + const specificScript = document.getElementById("e7e007dd52f67fe36365eff636bbffbd"); + if (specificScript) { + return specificScript.src.substring(0, specificScript.src.indexOf('/', specificScript.src.indexOf('://') + 3)); + } + } + + /** + * 判断是否为手机 + * @returns {boolean} + */ + function isMobileDevice() { + return /Mobi|Android|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent); + } + + // 暴露全局方法 + window.createAiChat = createAiChat; +})(); diff --git a/src/views/super/airag/aiapp/chat/js/useScroll.ts b/src/views/super/airag/aiapp/chat/js/useScroll.ts new file mode 100644 index 0000000..c71b6bb --- /dev/null +++ b/src/views/super/airag/aiapp/chat/js/useScroll.ts @@ -0,0 +1,41 @@ +import type { Ref } from 'vue'; +import { nextTick, ref } from 'vue'; + +type ScrollElement = HTMLDivElement | null; + +interface ScrollReturn { + scrollRef: Ref; + scrollToBottom: () => Promise; + scrollToTop: () => Promise; + scrollToBottomIfAtBottom: () => Promise; +} + +export function useScroll(): ScrollReturn { + const scrollRef = ref(null); + + const scrollToBottom = async () => { + await nextTick(); + if (scrollRef.value) scrollRef.value.scrollTop = scrollRef.value.scrollHeight; + }; + + const scrollToTop = async () => { + await nextTick(); + if (scrollRef.value) scrollRef.value.scrollTop = 0; + }; + + const scrollToBottomIfAtBottom = async () => { + await nextTick(); + if (scrollRef.value) { + const threshold = 100; // Threshold, indicating the distance threshold to the bottom of the scroll bar. + const distanceToBottom = scrollRef.value.scrollHeight - scrollRef.value.scrollTop - scrollRef.value.clientHeight; + if (distanceToBottom <= threshold) scrollRef.value.scrollTop = scrollRef.value.scrollHeight; + } + }; + + return { + scrollRef, + scrollToBottom, + scrollToTop, + scrollToBottomIfAtBottom, + }; +} diff --git a/src/views/super/airag/aiapp/chat/presetQuestion.vue b/src/views/super/airag/aiapp/chat/presetQuestion.vue new file mode 100644 index 0000000..d6aedda --- /dev/null +++ b/src/views/super/airag/aiapp/chat/presetQuestion.vue @@ -0,0 +1,180 @@ + + + + + diff --git a/src/views/super/airag/aiapp/chat/route/register.ts b/src/views/super/airag/aiapp/chat/route/register.ts new file mode 100644 index 0000000..fc020a1 --- /dev/null +++ b/src/views/super/airag/aiapp/chat/route/register.ts @@ -0,0 +1,65 @@ +import type { App } from 'vue'; +import { router } from "/@/router"; +import type { RouteRecordRaw } from "vue-router"; +import { LAYOUT } from "@/router/constant"; + +const ChatRoutes: RouteRecordRaw[] = [ + { + path: "/ai/app/chat/:appId", + name: "ai-chat-@appId-@modeType", + component: () => import("/@/views/super/airag/aiapp/chat/AiChat.vue"), + meta: { + title: 'AI聊天', + ignoreAuth: true, + }, + }, + { + path: "/ai/app/chatIcon/:appId", + name: "ai-chatIcon-@appId", + component: () => import("/@/views/super/airag/aiapp/chat/AiChatIcon.vue"), + meta: { + title: 'AI聊天', + ignoreAuth: true, + }, + }, + { + path: '/ai/chat', + name: 'aiChat', + component: LAYOUT, + meta: { + title: 'ai聊天', + }, + children: [ + { + path: "/ai/chat/:appId", + name: "ai-chat-@appId", + component: () => import("/@/views/super/airag/aiapp/chat/AiChat.vue"), + meta: { + title:'AI助手', + ignoreAuth: false, + }, + }, + { + path: "/ai/chat", + name: "ai-chat", + component: () => import("/@/views/super/airag/aiapp/chat/AiChat.vue"), + meta: { + title:'AI助手', + ignoreAuth: false, + }, + } + ], + }, +] + +/** 注册路由 */ +export async function register(app: App) { + await registerMyAppRouter(app); + console.log('[聊天路由] 注册完成!'); +} + +async function registerMyAppRouter(_: App) { + for(let appRoute of ChatRoutes){ + await router.addRoute(appRoute); + } +} diff --git a/src/views/super/airag/aiapp/chat/slide.vue b/src/views/super/airag/aiapp/chat/slide.vue new file mode 100644 index 0000000..ff233f7 --- /dev/null +++ b/src/views/super/airag/aiapp/chat/slide.vue @@ -0,0 +1,338 @@ + + + + + diff --git a/src/views/super/airag/aiapp/chat/style/github-markdown.less b/src/views/super/airag/aiapp/chat/style/github-markdown.less new file mode 100644 index 0000000..c6091ab --- /dev/null +++ b/src/views/super/airag/aiapp/chat/style/github-markdown.less @@ -0,0 +1,1123 @@ +html.dark { + .markdown-body { + color-scheme: dark; + --color-prettylights-syntax-comment: #8b949e; + --color-prettylights-syntax-constant: #79c0ff; + --color-prettylights-syntax-entity: #d2a8ff; + --color-prettylights-syntax-storage-modifier-import: #c9d1d9; + --color-prettylights-syntax-entity-tag: #7ee787; + --color-prettylights-syntax-keyword: #ff7b72; + --color-prettylights-syntax-string: #a5d6ff; + --color-prettylights-syntax-variable: #ffa657; + --color-prettylights-syntax-brackethighlighter-unmatched: #f85149; + --color-prettylights-syntax-invalid-illegal-text: #f0f6fc; + --color-prettylights-syntax-invalid-illegal-bg: #8e1519; + --color-prettylights-syntax-carriage-return-text: #f0f6fc; + --color-prettylights-syntax-carriage-return-bg: #b62324; + --color-prettylights-syntax-string-regexp: #7ee787; + --color-prettylights-syntax-markup-list: #f2cc60; + --color-prettylights-syntax-markup-heading: #1f6feb; + --color-prettylights-syntax-markup-italic: #c9d1d9; + --color-prettylights-syntax-markup-bold: #c9d1d9; + --color-prettylights-syntax-markup-deleted-text: #ffdcd7; + --color-prettylights-syntax-markup-deleted-bg: #67060c; + --color-prettylights-syntax-markup-inserted-text: #aff5b4; + --color-prettylights-syntax-markup-inserted-bg: #033a16; + --color-prettylights-syntax-markup-changed-text: #ffdfb6; + --color-prettylights-syntax-markup-changed-bg: #5a1e02; + --color-prettylights-syntax-markup-ignored-text: #c9d1d9; + --color-prettylights-syntax-markup-ignored-bg: #1158c7; + --color-prettylights-syntax-meta-diff-range: #d2a8ff; + --color-prettylights-syntax-brackethighlighter-angle: #8b949e; + --color-prettylights-syntax-sublimelinter-gutter-mark: #484f58; + --color-prettylights-syntax-constant-other-reference-link: #a5d6ff; + --color-fg-default: #c9d1d9; + --color-fg-muted: #8b949e; + --color-fg-subtle: #6e7681; + --color-canvas-default: #0d1117; + --color-canvas-subtle: #161b22; + --color-border-default: #30363d; + --color-border-muted: #21262d; + --color-neutral-muted: #bfc4cc; + --color-accent-fg: #58a6ff; + --color-accent-emphasis: #1f6feb; + --color-attention-subtle: #ece6d9; + --color-danger-fg: #f85149; + } +} + +html { + .markdown-body { + color-scheme: light; + --color-prettylights-syntax-comment: #6e7781; + --color-prettylights-syntax-constant: #0550ae; + --color-prettylights-syntax-entity: #8250df; + --color-prettylights-syntax-storage-modifier-import: #24292f; + --color-prettylights-syntax-entity-tag: #116329; + --color-prettylights-syntax-keyword: #cf222e; + --color-prettylights-syntax-string: #0a3069; + --color-prettylights-syntax-variable: #953800; + --color-prettylights-syntax-brackethighlighter-unmatched: #82071e; + --color-prettylights-syntax-invalid-illegal-text: #f6f8fa; + --color-prettylights-syntax-invalid-illegal-bg: #82071e; + --color-prettylights-syntax-carriage-return-text: #f6f8fa; + --color-prettylights-syntax-carriage-return-bg: #cf222e; + --color-prettylights-syntax-string-regexp: #116329; + --color-prettylights-syntax-markup-list: #3b2300; + --color-prettylights-syntax-markup-heading: #0550ae; + --color-prettylights-syntax-markup-italic: #24292f; + --color-prettylights-syntax-markup-bold: #24292f; + --color-prettylights-syntax-markup-deleted-text: #82071e; + --color-prettylights-syntax-markup-deleted-bg: #ffebe9; + --color-prettylights-syntax-markup-inserted-text: #116329; + --color-prettylights-syntax-markup-inserted-bg: #dafbe1; + --color-prettylights-syntax-markup-changed-text: #953800; + --color-prettylights-syntax-markup-changed-bg: #ffd8b5; + --color-prettylights-syntax-markup-ignored-text: #eaeef2; + --color-prettylights-syntax-markup-ignored-bg: #0550ae; + --color-prettylights-syntax-meta-diff-range: #8250df; + --color-prettylights-syntax-brackethighlighter-angle: #57606a; + --color-prettylights-syntax-sublimelinter-gutter-mark: #8c959f; + --color-prettylights-syntax-constant-other-reference-link: #0a3069; + --color-fg-default: #24292f; + --color-fg-muted: #57606a; + --color-fg-subtle: #6e7781; + --color-canvas-default: #ffffff; + --color-canvas-subtle: #f6f8fa; + --color-border-default: #d0d7de; + --color-border-muted: hsla(210, 18%, 87%, 1); + --color-neutral-muted: #e7ebf2; + --color-accent-fg: #0969da; + --color-accent-emphasis: #0969da; + --color-attention-subtle: #fff8c5; + --color-danger-fg: #cf222e; + } +} + +.markdown-body { + -ms-text-size-adjust: 100%; + -webkit-text-size-adjust: 100%; + margin: 0; + color: var(--color-fg-default); + background-color: var(--color-canvas-default); + font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; + font-size: 16px; + line-height: 1.5; + word-wrap: break-word; +} + +.markdown-body .octicon { + display: inline-block; + fill: currentColor; + vertical-align: text-bottom; +} + +.markdown-body h1:hover .anchor .octicon-link:before, +.markdown-body h2:hover .anchor .octicon-link:before, +.markdown-body h3:hover .anchor .octicon-link:before, +.markdown-body h4:hover .anchor .octicon-link:before, +.markdown-body h5:hover .anchor .octicon-link:before, +.markdown-body h6:hover .anchor .octicon-link:before { + width: 16px; + height: 16px; + content: ' '; + display: inline-block; + background-color: currentColor; + -webkit-mask-image: url("data:image/svg+xml,"); + mask-image: url("data:image/svg+xml,"); +} + +.markdown-body details, +.markdown-body figcaption, +.markdown-body figure { + display: block; +} + +.markdown-body summary { + display: list-item; +} + +.markdown-body [hidden] { + display: none !important; +} + +.markdown-body a { + background-color: transparent; + color: var(--color-accent-fg); + text-decoration: none; +} + +.markdown-body abbr[title] { + border-bottom: none; + text-decoration: underline dotted; +} + +.markdown-body b, +.markdown-body strong { + font-weight: var(--base-text-weight-semibold, 600); +} + +.markdown-body dfn { + font-style: italic; +} + +.markdown-body h1 { + margin: 0.67em 0; + font-weight: var(--base-text-weight-semibold, 600); + padding-bottom: 0.3em; + font-size: 2em; + border-bottom: 1px solid var(--color-border-muted); +} + +.markdown-body mark { + background-color: var(--color-attention-subtle); + color: var(--color-fg-default); +} + +.markdown-body small { + font-size: 90%; +} + +.markdown-body sub, +.markdown-body sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +.markdown-body sub { + bottom: -0.25em; +} + +.markdown-body sup { + top: -0.5em; +} + +.markdown-body img { + border-style: none; + max-width: 100%; + box-sizing: content-box; + background-color: var(--color-canvas-default); +} + +.markdown-body code, +.markdown-body kbd, +.markdown-body pre, +.markdown-body samp { + font-family: monospace; + font-size: 1em; +} + +.markdown-body figure { + margin: 1em 40px; +} + +.markdown-body hr { + box-sizing: content-box; + overflow: hidden; + background: transparent; + border-bottom: 1px solid var(--color-border-muted); + height: 0.25em; + padding: 0; + margin: 24px 0; + background-color: var(--color-border-default); + border: 0; +} + +.markdown-body input { + font: inherit; + margin: 0; + overflow: visible; + font-family: inherit; + font-size: inherit; + line-height: inherit; +} + +.markdown-body [type='button'], +.markdown-body [type='reset'], +.markdown-body [type='submit'] { + -webkit-appearance: button; +} + +.markdown-body [type='checkbox'], +.markdown-body [type='radio'] { + box-sizing: border-box; + padding: 0; +} + +.markdown-body [type='number']::-webkit-inner-spin-button, +.markdown-body [type='number']::-webkit-outer-spin-button { + height: auto; +} + +.markdown-body [type='search']::-webkit-search-cancel-button, +.markdown-body [type='search']::-webkit-search-decoration { + -webkit-appearance: none; +} + +.markdown-body ::-webkit-input-placeholder { + color: inherit; + opacity: 0.54; +} + +.markdown-body ::-webkit-file-upload-button { + -webkit-appearance: button; + font: inherit; +} + +.markdown-body a:hover { + text-decoration: underline; +} + +.markdown-body ::placeholder { + color: var(--color-fg-subtle); + opacity: 1; +} + +.markdown-body hr::before { + display: table; + content: ''; +} + +.markdown-body hr::after { + display: table; + clear: both; + content: ''; +} + +.markdown-body table { + border-spacing: 0; + border-collapse: collapse; + display: block; + width: max-content; + max-width: 100%; + overflow: auto; +} + +.markdown-body td, +.markdown-body th { + padding: 0; +} + +.markdown-body details summary { + cursor: pointer; +} + +.markdown-body details:not([open]) > *:not(summary) { + display: none !important; +} + +.markdown-body a:focus, +.markdown-body [role='button']:focus, +.markdown-body input[type='radio']:focus, +.markdown-body input[type='checkbox']:focus { + outline: 2px solid var(--color-accent-fg); + outline-offset: -2px; + box-shadow: none; +} + +.markdown-body a:focus:not(:focus-visible), +.markdown-body [role='button']:focus:not(:focus-visible), +.markdown-body input[type='radio']:focus:not(:focus-visible), +.markdown-body input[type='checkbox']:focus:not(:focus-visible) { + outline: solid 1px transparent; +} + +.markdown-body a:focus-visible, +.markdown-body [role='button']:focus-visible, +.markdown-body input[type='radio']:focus-visible, +.markdown-body input[type='checkbox']:focus-visible { + outline: 2px solid var(--color-accent-fg); + outline-offset: -2px; + box-shadow: none; +} + +.markdown-body a:not([class]):focus, +.markdown-body a:not([class]):focus-visible, +.markdown-body input[type='radio']:focus, +.markdown-body input[type='radio']:focus-visible, +.markdown-body input[type='checkbox']:focus, +.markdown-body input[type='checkbox']:focus-visible { + outline-offset: 0; +} + +.markdown-body kbd { + display: inline-block; + padding: 3px 5px; + font: + 11px ui-monospace, + SFMono-Regular, + SF Mono, + Menlo, + Consolas, + Liberation Mono, + monospace; + line-height: 10px; + color: var(--color-fg-default); + vertical-align: middle; + background-color: var(--color-canvas-subtle); + border: solid 1px var(--color-neutral-muted); + border-bottom-color: var(--color-neutral-muted); + border-radius: 6px; + box-shadow: inset 0 -1px 0 var(--color-neutral-muted); +} + +.markdown-body h1, +.markdown-body h2, +.markdown-body h3, +.markdown-body h4, +.markdown-body h5, +.markdown-body h6 { + margin-top: 24px; + margin-bottom: 16px; + font-weight: var(--base-text-weight-semibold, 600); + line-height: 1.25; +} + +.markdown-body h2 { + font-weight: var(--base-text-weight-semibold, 600); + padding-bottom: 0.3em; + font-size: 1.5em; + border-bottom: 1px solid var(--color-border-muted); +} + +.markdown-body h3 { + font-weight: var(--base-text-weight-semibold, 600); + font-size: 1.25em; +} + +.markdown-body h4 { + font-weight: var(--base-text-weight-semibold, 600); + font-size: 1em; +} + +.markdown-body h5 { + font-weight: var(--base-text-weight-semibold, 600); + font-size: 0.875em; +} + +.markdown-body h6 { + font-weight: var(--base-text-weight-semibold, 600); + font-size: 0.85em; + color: var(--color-fg-muted); +} + +.markdown-body p { + margin-top: 0; + margin-bottom: 10px; +} + +.markdown-body blockquote { + margin: 0; + padding: 0 1em; + color: var(--color-fg-muted); + border-left: 0.25em solid var(--color-border-default); +} + +.markdown-body ul, +.markdown-body ol { + margin-top: 0; + margin-bottom: 0; + padding-left: 2em; +} + +.markdown-body ol ol, +.markdown-body ul ol { + list-style-type: lower-roman; +} + +.markdown-body ul ul ol, +.markdown-body ul ol ol, +.markdown-body ol ul ol, +.markdown-body ol ol ol { + list-style-type: lower-alpha; +} + +.markdown-body dd { + margin-left: 0; +} + +.markdown-body tt, +.markdown-body code, +.markdown-body samp { + font-family: + ui-monospace, + SFMono-Regular, + SF Mono, + Menlo, + Consolas, + Liberation Mono, + monospace; + font-size: 12px; +} + +.markdown-body pre { + margin-top: 0; + margin-bottom: 0; + font-family: + ui-monospace, + SFMono-Regular, + SF Mono, + Menlo, + Consolas, + Liberation Mono, + monospace; + font-size: 12px; + word-wrap: normal; +} + +.markdown-body .octicon { + display: inline-block; + overflow: visible !important; + vertical-align: text-bottom; + fill: currentColor; +} + +.markdown-body input::-webkit-outer-spin-button, +.markdown-body input::-webkit-inner-spin-button { + margin: 0; + -webkit-appearance: none; + appearance: none; +} + +.markdown-body::before { + display: table; + content: ''; +} + +.markdown-body::after { + display: table; + clear: both; + content: ''; +} + +.markdown-body > *:first-child { + margin-top: 0 !important; +} + +.markdown-body > *:last-child { + margin-bottom: 0 !important; +} + +.markdown-body a:not([href]) { + color: inherit; + text-decoration: none; +} + +.markdown-body .absent { + color: var(--color-danger-fg); +} + +.markdown-body .anchor { + float: left; + padding-right: 4px; + margin-left: -20px; + line-height: 1; +} + +.markdown-body .anchor:focus { + outline: none; +} + +.markdown-body p, +.markdown-body blockquote, +.markdown-body ul, +.markdown-body ol, +.markdown-body dl, +.markdown-body table, +.markdown-body pre, +.markdown-body details { + margin-top: 0; + margin-bottom: 16px; +} + +.markdown-body blockquote > :first-child { + margin-top: 0; +} + +.markdown-body blockquote > :last-child { + margin-bottom: 0; +} + +.markdown-body h1 .octicon-link, +.markdown-body h2 .octicon-link, +.markdown-body h3 .octicon-link, +.markdown-body h4 .octicon-link, +.markdown-body h5 .octicon-link, +.markdown-body h6 .octicon-link { + color: var(--color-fg-default); + vertical-align: middle; + visibility: hidden; +} + +.markdown-body h1:hover .anchor, +.markdown-body h2:hover .anchor, +.markdown-body h3:hover .anchor, +.markdown-body h4:hover .anchor, +.markdown-body h5:hover .anchor, +.markdown-body h6:hover .anchor { + text-decoration: none; +} + +.markdown-body h1:hover .anchor .octicon-link, +.markdown-body h2:hover .anchor .octicon-link, +.markdown-body h3:hover .anchor .octicon-link, +.markdown-body h4:hover .anchor .octicon-link, +.markdown-body h5:hover .anchor .octicon-link, +.markdown-body h6:hover .anchor .octicon-link { + visibility: visible; +} + +.markdown-body h1 tt, +.markdown-body h1 code, +.markdown-body h2 tt, +.markdown-body h2 code, +.markdown-body h3 tt, +.markdown-body h3 code, +.markdown-body h4 tt, +.markdown-body h4 code, +.markdown-body h5 tt, +.markdown-body h5 code, +.markdown-body h6 tt, +.markdown-body h6 code { + padding: 0 0.2em; + font-size: inherit; +} + +.markdown-body summary h1, +.markdown-body summary h2, +.markdown-body summary h3, +.markdown-body summary h4, +.markdown-body summary h5, +.markdown-body summary h6 { + display: inline-block; +} + +.markdown-body summary h1 .anchor, +.markdown-body summary h2 .anchor, +.markdown-body summary h3 .anchor, +.markdown-body summary h4 .anchor, +.markdown-body summary h5 .anchor, +.markdown-body summary h6 .anchor { + margin-left: -40px; +} + +.markdown-body summary h1, +.markdown-body summary h2 { + padding-bottom: 0; + border-bottom: 0; +} + +.markdown-body ul.no-list, +.markdown-body ol.no-list { + padding: 0; + list-style-type: none; +} + +.markdown-body ol[type='a'] { + list-style-type: lower-alpha; +} + +.markdown-body ol[type='A'] { + list-style-type: upper-alpha; +} + +.markdown-body ol[type='i'] { + list-style-type: lower-roman; +} + +.markdown-body ol[type='I'] { + list-style-type: upper-roman; +} + +.markdown-body ol[type='1'] { + list-style-type: decimal; +} + +.markdown-body div > ol:not([type]) { + list-style-type: decimal; +} + +.markdown-body ul ul, +.markdown-body ul ol, +.markdown-body ol ol, +.markdown-body ol ul { + margin-top: 0; + margin-bottom: 0; +} + +.markdown-body li > p { + margin-top: 16px; +} + +.markdown-body li + li { + margin-top: 0.25em; +} + +.markdown-body dl { + padding: 0; +} + +.markdown-body dl dt { + padding: 0; + margin-top: 16px; + font-size: 1em; + font-style: italic; + font-weight: var(--base-text-weight-semibold, 600); +} + +.markdown-body dl dd { + padding: 0 16px; + margin-bottom: 16px; +} + +.markdown-body table th { + font-weight: var(--base-text-weight-semibold, 600); +} + +.markdown-body table th, +.markdown-body table td { + padding: 6px 13px; + border: 1px solid var(--color-border-default); +} + +.markdown-body table tr { + background-color: var(--color-canvas-default); + border-top: 1px solid var(--color-border-muted); +} + +.markdown-body table tr:nth-child(2n) { + background-color: var(--color-canvas-subtle); +} + +.markdown-body table img { + background-color: transparent; +} + +.markdown-body img[align='right'] { + padding-left: 20px; +} + +.markdown-body img[align='left'] { + padding-right: 20px; +} + +.markdown-body .emoji { + max-width: none; + vertical-align: text-top; + background-color: transparent; +} + +.markdown-body span.frame { + display: block; + overflow: hidden; +} + +.markdown-body span.frame > span { + display: block; + float: left; + width: auto; + padding: 7px; + margin: 13px 0 0; + overflow: hidden; + border: 1px solid var(--color-border-default); +} + +.markdown-body span.frame span img { + display: block; + float: left; +} + +.markdown-body span.frame span span { + display: block; + padding: 5px 0 0; + clear: both; + color: var(--color-fg-default); +} + +.markdown-body span.align-center { + display: block; + overflow: hidden; + clear: both; +} + +.markdown-body span.align-center > span { + display: block; + margin: 13px auto 0; + overflow: hidden; + text-align: center; +} + +.markdown-body span.align-center span img { + margin: 0 auto; + text-align: center; +} + +.markdown-body span.align-right { + display: block; + overflow: hidden; + clear: both; +} + +.markdown-body span.align-right > span { + display: block; + margin: 13px 0 0; + overflow: hidden; + text-align: right; +} + +.markdown-body span.align-right span img { + margin: 0; + text-align: right; +} + +.markdown-body span.float-left { + display: block; + float: left; + margin-right: 13px; + overflow: hidden; +} + +.markdown-body span.float-left span { + margin: 13px 0 0; +} + +.markdown-body span.float-right { + display: block; + float: right; + margin-left: 13px; + overflow: hidden; +} + +.markdown-body span.float-right > span { + display: block; + margin: 13px auto 0; + overflow: hidden; + text-align: right; +} + +.markdown-body code, +.markdown-body tt { + padding: 0.2em 0.4em; + margin: 0; + font-size: 85%; + white-space: break-spaces; + background-color: var(--color-neutral-muted); + border-radius: 6px; +} + +.markdown-body code br, +.markdown-body tt br { + display: none; +} + +.markdown-body del code { + text-decoration: inherit; +} + +.markdown-body samp { + font-size: 85%; +} + +.markdown-body pre code { + font-size: 100%; +} + +.markdown-body pre > code { + padding: 0; + margin: 0; + word-break: normal; + white-space: pre; + background: transparent; + border: 0; +} + +.markdown-body .highlight { + margin-bottom: 16px; +} + +.markdown-body .highlight pre { + margin-bottom: 0; + word-break: normal; +} + +.markdown-body .highlight pre, +.markdown-body pre { + padding: 16px; + overflow: auto; + font-size: 85%; + line-height: 1.45; + background-color: var(--color-canvas-subtle); + border-radius: 6px; +} + +.markdown-body pre code, +.markdown-body pre tt { + display: inline; + max-width: auto; + padding: 0; + margin: 0; + overflow: visible; + line-height: inherit; + word-wrap: normal; + background-color: transparent; + border: 0; +} + +.markdown-body .csv-data td, +.markdown-body .csv-data th { + padding: 5px; + overflow: hidden; + font-size: 12px; + line-height: 1; + text-align: left; + white-space: nowrap; +} + +.markdown-body .csv-data .blob-num { + padding: 10px 8px 9px; + text-align: right; + background: var(--color-canvas-default); + border: 0; +} + +.markdown-body .csv-data tr { + border-top: 0; +} + +.markdown-body .csv-data th { + font-weight: var(--base-text-weight-semibold, 600); + background: var(--color-canvas-subtle); + border-top: 0; +} + +.markdown-body [data-footnote-ref]::before { + content: '['; +} + +.markdown-body [data-footnote-ref]::after { + content: ']'; +} + +.markdown-body .footnotes { + font-size: 12px; + color: var(--color-fg-muted); + border-top: 1px solid var(--color-border-default); +} + +.markdown-body .footnotes ol { + padding-left: 16px; +} + +.markdown-body .footnotes ol ul { + display: inline-block; + padding-left: 16px; + margin-top: 16px; +} + +.markdown-body .footnotes li { + position: relative; +} + +.markdown-body .footnotes li:target::before { + position: absolute; + top: -8px; + right: -8px; + bottom: -8px; + left: -24px; + pointer-events: none; + content: ''; + border: 2px solid var(--color-accent-emphasis); + border-radius: 6px; +} + +.markdown-body .footnotes li:target { + color: var(--color-fg-default); +} + +.markdown-body .footnotes .data-footnote-backref g-emoji { + font-family: monospace; +} + +.markdown-body .pl-c { + color: var(--color-prettylights-syntax-comment); +} + +.markdown-body .pl-c1, +.markdown-body .pl-s .pl-v { + color: var(--color-prettylights-syntax-constant); +} + +.markdown-body .pl-e, +.markdown-body .pl-en { + color: var(--color-prettylights-syntax-entity); +} + +.markdown-body .pl-smi, +.markdown-body .pl-s .pl-s1 { + color: var(--color-prettylights-syntax-storage-modifier-import); +} + +.markdown-body .pl-ent { + color: var(--color-prettylights-syntax-entity-tag); +} + +.markdown-body .pl-k { + color: var(--color-prettylights-syntax-keyword); +} + +.markdown-body .pl-s, +.markdown-body .pl-pds, +.markdown-body .pl-s .pl-pse .pl-s1, +.markdown-body .pl-sr, +.markdown-body .pl-sr .pl-cce, +.markdown-body .pl-sr .pl-sre, +.markdown-body .pl-sr .pl-sra { + color: var(--color-prettylights-syntax-string); +} + +.markdown-body .pl-v, +.markdown-body .pl-smw { + color: var(--color-prettylights-syntax-variable); +} + +.markdown-body .pl-bu { + color: var(--color-prettylights-syntax-brackethighlighter-unmatched); +} + +.markdown-body .pl-ii { + color: var(--color-prettylights-syntax-invalid-illegal-text); + background-color: var(--color-prettylights-syntax-invalid-illegal-bg); +} + +.markdown-body .pl-c2 { + color: var(--color-prettylights-syntax-carriage-return-text); + background-color: var(--color-prettylights-syntax-carriage-return-bg); +} + +.markdown-body .pl-sr .pl-cce { + font-weight: bold; + color: var(--color-prettylights-syntax-string-regexp); +} + +.markdown-body .pl-ml { + color: var(--color-prettylights-syntax-markup-list); +} + +.markdown-body .pl-mh, +.markdown-body .pl-mh .pl-en, +.markdown-body .pl-ms { + font-weight: bold; + color: var(--color-prettylights-syntax-markup-heading); +} + +.markdown-body .pl-mi { + font-style: italic; + color: var(--color-prettylights-syntax-markup-italic); +} + +.markdown-body .pl-mb { + font-weight: bold; + color: var(--color-prettylights-syntax-markup-bold); +} + +.markdown-body .pl-md { + color: var(--color-prettylights-syntax-markup-deleted-text); + background-color: var(--color-prettylights-syntax-markup-deleted-bg); +} + +.markdown-body .pl-mi1 { + color: var(--color-prettylights-syntax-markup-inserted-text); + background-color: var(--color-prettylights-syntax-markup-inserted-bg); +} + +.markdown-body .pl-mc { + color: var(--color-prettylights-syntax-markup-changed-text); + background-color: var(--color-prettylights-syntax-markup-changed-bg); +} + +.markdown-body .pl-mi2 { + color: var(--color-prettylights-syntax-markup-ignored-text); + background-color: var(--color-prettylights-syntax-markup-ignored-bg); +} + +.markdown-body .pl-mdr { + font-weight: bold; + color: var(--color-prettylights-syntax-meta-diff-range); +} + +.markdown-body .pl-ba { + color: var(--color-prettylights-syntax-brackethighlighter-angle); +} + +.markdown-body .pl-sg { + color: var(--color-prettylights-syntax-sublimelinter-gutter-mark); +} + +.markdown-body .pl-corl { + text-decoration: underline; + color: var(--color-prettylights-syntax-constant-other-reference-link); +} + +.markdown-body g-emoji { + display: inline-block; + min-width: 1ch; + font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; + font-size: 1em; + font-style: normal !important; + font-weight: var(--base-text-weight-normal, 400); + line-height: 1; + vertical-align: -0.075em; +} + +.markdown-body g-emoji img { + width: 1em; + height: 1em; +} + +.markdown-body .task-list-item { + list-style-type: none; +} + +.markdown-body .task-list-item label { + font-weight: var(--base-text-weight-normal, 400); +} + +.markdown-body .task-list-item.enabled label { + cursor: pointer; +} + +.markdown-body .task-list-item + .task-list-item { + margin-top: 4px; +} + +.markdown-body .task-list-item .handle { + display: none; +} + +.markdown-body .task-list-item-checkbox { + margin: 0 0.2em 0.25em -1.4em; + vertical-align: middle; +} + +.markdown-body .contains-task-list:dir(rtl) .task-list-item-checkbox { + margin: 0 -1.6em 0.25em 0.2em; +} + +.markdown-body .contains-task-list { + position: relative; +} + +.markdown-body .contains-task-list:hover .task-list-item-convert-container, +.markdown-body .contains-task-list:focus-within .task-list-item-convert-container { + display: block; + width: auto; + height: 24px; + overflow: visible; + clip: auto; +} + +.markdown-body ::-webkit-calendar-picker-indicator { + filter: invert(50%); +} diff --git a/src/views/super/airag/aiapp/chat/style/highlight.less b/src/views/super/airag/aiapp/chat/style/highlight.less new file mode 100644 index 0000000..2dd51cc --- /dev/null +++ b/src/views/super/airag/aiapp/chat/style/highlight.less @@ -0,0 +1,206 @@ +html.dark { + pre code.hljs { + display: block; + overflow-x: auto; + padding: 1em; + } + + code.hljs { + padding: 3px 5px; + } + + .hljs { + color: #abb2bf; + background: #282c34; + } + + .hljs-keyword, + .hljs-operator, + .hljs-pattern-match { + color: #f92672; + } + + .hljs-function, + .hljs-pattern-match .hljs-constructor { + color: #61aeee; + } + + .hljs-function .hljs-params { + color: #a6e22e; + } + + .hljs-function .hljs-params .hljs-typing { + color: #fd971f; + } + + .hljs-module-access .hljs-module { + color: #7e57c2; + } + + .hljs-constructor { + color: #e2b93d; + } + + .hljs-constructor .hljs-string { + color: #9ccc65; + } + + .hljs-comment, + .hljs-quote { + color: #b18eb1; + font-style: italic; + } + + .hljs-doctag, + .hljs-formula { + color: #c678dd; + } + + .hljs-deletion, + .hljs-name, + .hljs-section, + .hljs-selector-tag, + .hljs-subst { + color: #e06c75; + } + + .hljs-literal { + color: #56b6c2; + } + + .hljs-addition, + .hljs-attribute, + .hljs-meta .hljs-string, + .hljs-regexp, + .hljs-string { + color: #98c379; + } + + .hljs-built_in, + .hljs-class .hljs-title, + .hljs-title.class_ { + color: #e6c07b; + } + + .hljs-attr, + .hljs-number, + .hljs-selector-attr, + .hljs-selector-class, + .hljs-selector-pseudo, + .hljs-template-variable, + .hljs-type, + .hljs-variable { + color: #d19a66; + } + + .hljs-bullet, + .hljs-link, + .hljs-meta, + .hljs-selector-id, + .hljs-symbol, + .hljs-title { + color: #61aeee; + } + + .hljs-emphasis { + font-style: italic; + } + + .hljs-strong { + font-weight: 700; + } + + .hljs-link { + text-decoration: underline; + } +} + +html { + pre code.hljs { + display: block; + overflow-x: auto; + padding: 1em; + } + + code.hljs { + padding: 3px 5px; + &::-webkit-scrollbar { + height: 4px; + } + } + + .hljs { + color: #383a42; + background: #fafafa; + } + + .hljs-comment, + .hljs-quote { + color: #a0a1a7; + font-style: italic; + } + + .hljs-doctag, + .hljs-formula, + .hljs-keyword { + color: #a626a4; + } + + .hljs-deletion, + .hljs-name, + .hljs-section, + .hljs-selector-tag, + .hljs-subst { + color: #e45649; + } + + .hljs-literal { + color: #0184bb; + } + + .hljs-addition, + .hljs-attribute, + .hljs-meta .hljs-string, + .hljs-regexp, + .hljs-string { + color: #50a14f; + } + + .hljs-attr, + .hljs-number, + .hljs-selector-attr, + .hljs-selector-class, + .hljs-selector-pseudo, + .hljs-template-variable, + .hljs-type, + .hljs-variable { + color: #986801; + } + + .hljs-bullet, + .hljs-link, + .hljs-meta, + .hljs-selector-id, + .hljs-symbol, + .hljs-title { + color: #4078f2; + } + + .hljs-built_in, + .hljs-class .hljs-title, + .hljs-title.class_ { + color: #c18401; + } + + .hljs-emphasis { + font-style: italic; + } + + .hljs-strong { + font-weight: 700; + } + + .hljs-link { + text-decoration: underline; + } +} diff --git a/src/views/super/airag/aiapp/chat/style/style.less b/src/views/super/airag/aiapp/chat/style/style.less new file mode 100644 index 0000000..758453f --- /dev/null +++ b/src/views/super/airag/aiapp/chat/style/style.less @@ -0,0 +1,132 @@ +.markdown-body { + background-color: transparent; + font-size: 14px; + + p { + white-space: pre-wrap; + } + + ol { + list-style-type: decimal; + } + + ul { + list-style-type: disc; + } + + pre code, + pre tt { + line-height: 1.65; + } + + .highlight pre, + pre { + background-color: #fff; + } + + code.hljs { + padding: 0; + } + + .code-block { + &-wrapper { + position: relative; + padding-top: 24px; + } + + &-header { + position: absolute; + top: 5px; + right: 0; + width: 100%; + padding: 0 1rem; + display: flex; + justify-content: flex-end; + align-items: center; + color: #b3b3b3; + + &__copy { + cursor: pointer; + margin-left: 0.5rem; + user-select: none; + + &:hover { + color: #65a665; + } + } + } + } + + &.markdown-body-generate > dd:last-child:after, + &.markdown-body-generate > dl:last-child:after, + &.markdown-body-generate > dt:last-child:after, + &.markdown-body-generate > h1:last-child:after, + &.markdown-body-generate > h2:last-child:after, + &.markdown-body-generate > h3:last-child:after, + &.markdown-body-generate > h4:last-child:after, + &.markdown-body-generate > h5:last-child:after, + &.markdown-body-generate > h6:last-child:after, + &.markdown-body-generate > li:last-child:after, + &.markdown-body-generate > ol:last-child li:last-child:after, + &.markdown-body-generate > p:last-child:after, + &.markdown-body-generate > pre:last-child code:after, + &.markdown-body-generate > td:last-child:after, + &.markdown-body-generate > ul:last-child li:last-child:after { + animation: blink 1s steps(5, start) infinite; + color: #000; + content: '_'; + font-weight: 700; + margin-left: 3px; + vertical-align: baseline; + } + + @keyframes blink { + to { + visibility: hidden; + } + } +} + +html.dark { + .markdown-body { + &.markdown-body-generate > dd:last-child:after, + &.markdown-body-generate > dl:last-child:after, + &.markdown-body-generate > dt:last-child:after, + &.markdown-body-generate > h1:last-child:after, + &.markdown-body-generate > h2:last-child:after, + &.markdown-body-generate > h3:last-child:after, + &.markdown-body-generate > h4:last-child:after, + &.markdown-body-generate > h5:last-child:after, + &.markdown-body-generate > h6:last-child:after, + &.markdown-body-generate > li:last-child:after, + &.markdown-body-generate > ol:last-child li:last-child:after, + &.markdown-body-generate > p:last-child:after, + &.markdown-body-generate > pre:last-child code:after, + &.markdown-body-generate > td:last-child:after, + &.markdown-body-generate > ul:last-child li:last-child:after { + color: #65a665; + } + } + + .message-reply { + .whitespace-pre-wrap { + white-space: pre-wrap; + color: var(--n-text-color); + } + } + + .highlight pre, + pre { + background-color: #282c34; + } +} + +@media screen and (max-width: 533px) { + .markdown-body .code-block-wrapper { + padding: unset; + + code { + padding: 24px 16px 16px 16px; + } + } +} diff --git a/src/views/super/airag/aiapp/components/AiApp.json b/src/views/super/airag/aiapp/components/AiApp.json new file mode 100644 index 0000000..e5b3793 --- /dev/null +++ b/src/views/super/airag/aiapp/components/AiApp.json @@ -0,0 +1,5 @@ +{ + "prompt": "# 角色\n你是一个犀利的电影解说员,可以使用尖锐幽默的语言,向用户讲解电影剧情、介绍最新上映的电影,还可以用普通人都可以理解的语言讲解电影相关知识。\n\n## 技能\n### 技能 1: 推荐最新上映的电影\n1. 当用户请你推荐最新电影时,需要先了解用户喜欢哪种类型片。如果你已经知道了,请跳过这一步,在询问时可以用“请问您喜欢什么类型的电影呢亲”。\n2. 如果你并不知道用户所说的电影,可以使用 工具搜索电影,了解电影类型。\n3. 根据用户的电影偏好,推荐几部正在上映和即将上映的电影,在推荐开头可以说“好的亲,以下是为您推荐的电影”。\n===回复示例===\n - \uD83C\uDFAC 电影名: <电影名>\n - \uD83D\uDD50 上映时间: <电影在中国大陆的上映的日期>\n - \uD83D\uDCA1 电影简介: <100字总结这部电影的剧情摘要>\n===示例结束===\n\n### 技能 2: 介绍电影\n1. 当用户说介绍某一部电影,请使用工具 搜索电影介绍的链接,在收到需求时可以回应“好嘞亲,马上为您查找相关电影介绍”。\n2. 如果此时获取的信息不够全面,可以继续使用 工具 打开搜索结果中的相关链接,以了解电影详情。\n3. 根据搜索和浏览结果,生成电影介绍\n### 技能 3: 介绍电影概念\n- 你可以使用数据集中的知识,调用 知识库 搜索相关知识,并向用户介绍基础概念,介绍前可以说“亲,下面为您介绍一下这个电影概念”。\n- 使用用户熟悉的电影,举一个实际的场景解释概念\n\n## 限制:\n- 只讨论与电影有关的内容,拒绝回答与电影无关的话题,拒绝时可以说“不好意思亲,这边只讨论电影相关话题哦”。\n- 所输出的内容必须按照给定的格式进行组织,不能偏离框架要求,在表述中合理运用常用语。\n- 总结部分不能超过 100 字。\n- 只会输出知识库中已有内容, 不在知识库中的书籍, 通过 工具去了解。\n- 请使用 Markdown 的 ^^ 形式说明引用来源。”", + "prologue": "嘿,亲!我对电影那可是门儿清,能给你带来超棒的电影体验。", + "presetQuestion": [{"key": 1,"descr": "有啥好看的动作片推荐不?"},{"key": 2,"descr":"介绍下《流浪地球 3》呗。"},{"key": 3,"descr":"啥是电影蒙太奇呀?"}] +} \ No newline at end of file diff --git a/src/views/super/airag/aiapp/components/AiAppAddFlowModal.vue b/src/views/super/airag/aiapp/components/AiAppAddFlowModal.vue new file mode 100644 index 0000000..81fc699 --- /dev/null +++ b/src/views/super/airag/aiapp/components/AiAppAddFlowModal.vue @@ -0,0 +1,336 @@ + + + + + diff --git a/src/views/super/airag/aiapp/components/AiAppAddKnowledgeModal.vue b/src/views/super/airag/aiapp/components/AiAppAddKnowledgeModal.vue new file mode 100644 index 0000000..0dba3a1 --- /dev/null +++ b/src/views/super/airag/aiapp/components/AiAppAddKnowledgeModal.vue @@ -0,0 +1,266 @@ + + + + + diff --git a/src/views/super/airag/aiapp/components/AiAppGeneratedPromptModal.vue b/src/views/super/airag/aiapp/components/AiAppGeneratedPromptModal.vue new file mode 100644 index 0000000..848051e --- /dev/null +++ b/src/views/super/airag/aiapp/components/AiAppGeneratedPromptModal.vue @@ -0,0 +1,312 @@ + + + + + + diff --git a/src/views/super/airag/aiapp/components/AiAppModal.vue b/src/views/super/airag/aiapp/components/AiAppModal.vue new file mode 100644 index 0000000..d4bc2a9 --- /dev/null +++ b/src/views/super/airag/aiapp/components/AiAppModal.vue @@ -0,0 +1,165 @@ + + + + + diff --git a/src/views/super/airag/aiapp/components/AiAppParamsSettingModal.vue b/src/views/super/airag/aiapp/components/AiAppParamsSettingModal.vue new file mode 100644 index 0000000..130db57 --- /dev/null +++ b/src/views/super/airag/aiapp/components/AiAppParamsSettingModal.vue @@ -0,0 +1,95 @@ + + + + + + diff --git a/src/views/super/airag/aiapp/components/AiAppQuickCommandModal.vue b/src/views/super/airag/aiapp/components/AiAppQuickCommandModal.vue new file mode 100644 index 0000000..e48338f --- /dev/null +++ b/src/views/super/airag/aiapp/components/AiAppQuickCommandModal.vue @@ -0,0 +1,100 @@ + + + + + diff --git a/src/views/super/airag/aiapp/components/AiAppSendModal.vue b/src/views/super/airag/aiapp/components/AiAppSendModal.vue new file mode 100644 index 0000000..a16a248 --- /dev/null +++ b/src/views/super/airag/aiapp/components/AiAppSendModal.vue @@ -0,0 +1,274 @@ + + + + + diff --git a/src/views/super/airag/aiapp/components/AiAppSettingModal.vue b/src/views/super/airag/aiapp/components/AiAppSettingModal.vue new file mode 100644 index 0000000..c190b30 --- /dev/null +++ b/src/views/super/airag/aiapp/components/AiAppSettingModal.vue @@ -0,0 +1,1249 @@ + + + + + + diff --git a/src/views/super/airag/aiapp/img/ailogo.png b/src/views/super/airag/aiapp/img/ailogo.png new file mode 100644 index 0000000..605a6e4 Binary files /dev/null and b/src/views/super/airag/aiapp/img/ailogo.png differ diff --git a/src/views/super/airag/aiapp/img/iconWebEmbedded.png b/src/views/super/airag/aiapp/img/iconWebEmbedded.png new file mode 100644 index 0000000..187c602 Binary files /dev/null and b/src/views/super/airag/aiapp/img/iconWebEmbedded.png differ diff --git a/src/views/super/airag/aiapp/img/webEmbedded.png b/src/views/super/airag/aiapp/img/webEmbedded.png new file mode 100644 index 0000000..53038f0 Binary files /dev/null and b/src/views/super/airag/aiapp/img/webEmbedded.png differ diff --git a/src/views/super/airag/aiknowledge/AiKnowledgeBase.api.ts b/src/views/super/airag/aiknowledge/AiKnowledgeBase.api.ts new file mode 100644 index 0000000..3a7e7a0 --- /dev/null +++ b/src/views/super/airag/aiknowledge/AiKnowledgeBase.api.ts @@ -0,0 +1,137 @@ +import { defHttp } from '/@/utils/http/axios'; +import { Modal } from 'ant-design-vue'; + +enum Api { + //知识库管理 + list = '/airag/knowledge/list', + save = '/airag/knowledge/add', + delete = '/airag/knowledge/delete', + queryById = '/airag/knowledge/queryById', + edit = '/airag/knowledge/edit', + rebuild = '/airag/knowledge/rebuild', + //知识库文档 + knowledgeDocList = '/airag/knowledge/doc/list', + knowledgeEditDoc = '/airag/knowledge/doc/edit', + knowledgeDeleteBatchDoc = '/airag/knowledge/doc/deleteBatch', + knowledgeDeleteAllDoc = '/airag/knowledge/doc/deleteAll', + knowledgeRebuildDoc = '/airag/knowledge/doc/rebuild', + knowledgeEmbeddingHitTest = '/airag/knowledge/embedding/hitTest', +} + +/** + * 查询知识库 + * @param params + */ +export const list = (params) => { + return defHttp.get({ url: Api.list, params }, { isTransformResponse: false }); +}; + +/** + * 根据id查询知识库 + * @param params + */ +export const queryById = (params) => { + return defHttp.get({ url: Api.queryById, params }, { isTransformResponse: false }); +}; + +/** + * 新增知识库 + * @param params + */ +export const saveKnowledge = (params) => { + return defHttp.post({ url: Api.save, params }); +}; + +/** + * 编辑知识库 + * + * @param params + */ +export const editKnowledge = (params) => { + return defHttp.put({ url: Api.edit, params }); +}; + +/** + * 删除知识库 + */ +export const deleteModel = (params, handleSuccess) => { + Modal.confirm({ + title: '确认删除', + content: '是否删除名称为'+params.name+'的知识库吗?', + okText: '确认', + cancelText: '取消', + onOk: () => { + return defHttp.delete({ url: Api.delete, params }, { joinParamsToUrl: true }).then(() => { + handleSuccess(); + }); + }, + }); +}; + +/** + * 查询知识库详情 + * @param params + */ +export const knowledgeDocList = (params) => { + return defHttp.get({ url: Api.knowledgeDocList, params }, { isTransformResponse: false }); +}; + +/** + * 知识库向量化 + * + * @param params + */ +export const rebuild = (params) => { + return defHttp.put({ url: Api.rebuild, params,timeout: 2 * 60 * 1000 }, { joinParamsToUrl: true, isTransformResponse: false }); +}; + +/** + * 新增知识库 + * @param params + */ +export const knowledgeSaveDoc = (params) => { + return defHttp.post({ url: Api.knowledgeEditDoc, params }); +}; + +/** + * 文档向量化 + * @param params + */ +export const knowledgeRebuildDoc = (params, handleSuccess) => { + return defHttp.put({ url: Api.knowledgeRebuildDoc, params }, { joinParamsToUrl: true }).then(() => { + handleSuccess(); + }); +}; + +/** + * 批量删除文档 + * + * @param params + * @param handleSuccess + */ +export const knowledgeDeleteBatchDoc = (params, handleSuccess) => { + return defHttp.delete({ url: Api.knowledgeDeleteBatchDoc, params }, { joinParamsToUrl: true }).then(() => { + handleSuccess(); + }); +}; + +/** + * 批量删除文档 + * + * @param params + * @param handleSuccess + */ +export const knowledgeDeleteAllDoc = (knowId: string, handleSuccess) => { + return defHttp.delete({ url: Api.knowledgeDeleteAllDoc, params: {knowId} }, { joinParamsToUrl: true }).then(() => { + handleSuccess(); + }); +}; + +/** + * 命中测试 + * @param params + */ +export const knowledgeEmbeddingHitTest = (params) => { + let url = Api.knowledgeEmbeddingHitTest + '/' + params.knowId; + return defHttp.get({ url: url, params }, { isTransformResponse: false }); +}; diff --git a/src/views/super/airag/aiknowledge/AiKnowledgeBase.api.util.tsx b/src/views/super/airag/aiknowledge/AiKnowledgeBase.api.util.tsx new file mode 100644 index 0000000..29aabb7 --- /dev/null +++ b/src/views/super/airag/aiknowledge/AiKnowledgeBase.api.util.tsx @@ -0,0 +1,24 @@ +import {knowledgeDeleteAllDoc} from "./AiKnowledgeBase.api"; +import {useMessage} from "@/hooks/web/useMessage"; + +const {createConfirmSync} = useMessage(); + +// 清空文档 +export async function doDeleteAllDoc(knowledgeId: string, reload: () => void) { + const flag = await createConfirmSync({ + title: '清空文档', + content: () => ( +

+ 确定要清空所有文档吗? +
+ + 此操作会删除所有已录入的文档,并且不能恢复,请谨慎操作 + +

+ ), + }); + if (!flag) { + return; + } + knowledgeDeleteAllDoc(knowledgeId, reload) +} diff --git a/src/views/super/airag/aiknowledge/AiKnowledgeBase.data.ts b/src/views/super/airag/aiknowledge/AiKnowledgeBase.data.ts new file mode 100644 index 0000000..331eff5 --- /dev/null +++ b/src/views/super/airag/aiknowledge/AiKnowledgeBase.data.ts @@ -0,0 +1,125 @@ +import { FormSchema } from '@/components/Form'; +import { BasicColumn } from '@/components/Table'; + +/** + * 表单 + */ +export const formSchema: FormSchema[] = [ + { + label: 'id', + field: 'id', + component: 'Input', + show: false, + }, + { + label: '知识库名称', + field: 'name', + required: true, + componentProps: { + placeholder: '请输入知识库名称', + //是否展示字数 + showCount: true, + maxlength: 64, + }, + component: 'Input', + }, + { + label: '知识库描述', + field: 'descr', + component: 'InputTextArea', + componentProps: { + placeholder: '描述知识库的内容,详尽的描述将帮助AI能深入理解该知识库的内容,能更准确的检索到内容,提高该知识库的命中率。', + //是否展示字数 + showCount: true, + maxlength: 256, + }, + }, + { + label: '向量模型', + field: 'embedId', + required: true, + component: 'JDictSelectTag', + componentProps: { + dictCode: "airag_model where model_type = 'EMBED',name,id", + }, + }, + { + label: '状态', + field: 'status', + required: true, + component: 'JDictSelectTag', + componentProps: { + options: [ + { label: '启用', value: 'enable' }, + { label: '禁用', value: 'disable' }, + ], + type: 'radioButton', + }, + defaultValue: 'enable', + }, +]; + +//文档文本表单 +export const docTextSchema: FormSchema[] = [ + { + label: 'id', + field: 'id', + component: 'Input', + show: false, + }, + { + label: '知识库id', + field: 'knowledgeId', + show: false, + component: 'Input', + }, + { + label: '标题', + field: 'title', + required: true, + component: 'Input', + }, + { + label: '类型', + field: 'type', + required: true, + component: 'Input', + show: false + }, + { + label: '内容', + field: 'content', + rules: [{ required: true, message: '请输入内容' }], + component: 'JMarkdownEditor', + componentProps: { + placeholder: "请输入内容", + preview:{ mode: 'view', action: [] } + }, + ifShow:({ values})=>{ + if(values.type === 'text'){ + return true; + } + return false; + } + }, + { + label: '文件', + field: 'filePath', + rules: [{ required: true, message: '请上传文件' }], + component: 'JUpload', + helpMessage:'支持txt、markdown、pdf、docx、xlsx、pptx', + componentProps:{ + fileType: 'file', + maxCount: 1, + multiple: false, + text: '上传文档' + }, + ifShow:({ values })=>{ + if(values.type === 'file'){ + return true; + } + return false; + } + }, +]; + diff --git a/src/views/super/airag/aiknowledge/AiKnowledgeBaseList.vue b/src/views/super/airag/aiknowledge/AiKnowledgeBaseList.vue new file mode 100644 index 0000000..2e2db43 --- /dev/null +++ b/src/views/super/airag/aiknowledge/AiKnowledgeBaseList.vue @@ -0,0 +1,500 @@ + + + + + + diff --git a/src/views/super/airag/aiknowledge/components/AiKnowledgeBaseModal.vue b/src/views/super/airag/aiknowledge/components/AiKnowledgeBaseModal.vue new file mode 100644 index 0000000..3345502 --- /dev/null +++ b/src/views/super/airag/aiknowledge/components/AiKnowledgeBaseModal.vue @@ -0,0 +1,111 @@ + + + + + diff --git a/src/views/super/airag/aiknowledge/components/AiTextDescModal.vue b/src/views/super/airag/aiknowledge/components/AiTextDescModal.vue new file mode 100644 index 0000000..dc3ca5f --- /dev/null +++ b/src/views/super/airag/aiknowledge/components/AiTextDescModal.vue @@ -0,0 +1,93 @@ + + + + + + diff --git a/src/views/super/airag/aiknowledge/components/AiragKnowledgeDocListModal.vue b/src/views/super/airag/aiknowledge/components/AiragKnowledgeDocListModal.vue new file mode 100644 index 0000000..57872b1 --- /dev/null +++ b/src/views/super/airag/aiknowledge/components/AiragKnowledgeDocListModal.vue @@ -0,0 +1,1068 @@ + + + + + + + diff --git a/src/views/super/airag/aiknowledge/components/AiragKnowledgeDocTextModal.vue b/src/views/super/airag/aiknowledge/components/AiragKnowledgeDocTextModal.vue new file mode 100644 index 0000000..c64785f --- /dev/null +++ b/src/views/super/airag/aiknowledge/components/AiragKnowledgeDocTextModal.vue @@ -0,0 +1,111 @@ + + + + + + diff --git a/src/views/super/airag/aiknowledge/icon/draft.png b/src/views/super/airag/aiknowledge/icon/draft.png new file mode 100644 index 0000000..028e583 Binary files /dev/null and b/src/views/super/airag/aiknowledge/icon/draft.png differ diff --git a/src/views/super/airag/aiknowledge/icon/knowledge.png b/src/views/super/airag/aiknowledge/icon/knowledge.png new file mode 100644 index 0000000..b622775 Binary files /dev/null and b/src/views/super/airag/aiknowledge/icon/knowledge.png differ diff --git a/src/views/super/airag/aimodel/AiModelList.vue b/src/views/super/airag/aimodel/AiModelList.vue new file mode 100644 index 0000000..373c839 --- /dev/null +++ b/src/views/super/airag/aimodel/AiModelList.vue @@ -0,0 +1,438 @@ + + + + + diff --git a/src/views/super/airag/aimodel/components/AiModelModal.vue b/src/views/super/airag/aimodel/components/AiModelModal.vue new file mode 100644 index 0000000..75e3158 --- /dev/null +++ b/src/views/super/airag/aimodel/components/AiModelModal.vue @@ -0,0 +1,497 @@ + + + + + + diff --git a/src/views/super/airag/aimodel/components/AiModelSeniorForm.vue b/src/views/super/airag/aimodel/components/AiModelSeniorForm.vue new file mode 100644 index 0000000..ebf1b57 --- /dev/null +++ b/src/views/super/airag/aimodel/components/AiModelSeniorForm.vue @@ -0,0 +1,360 @@ + + + + + diff --git a/src/views/super/airag/aimodel/components/model.json b/src/views/super/airag/aimodel/components/model.json new file mode 100644 index 0000000..6f5df0e --- /dev/null +++ b/src/views/super/airag/aimodel/components/model.json @@ -0,0 +1,148 @@ +{ + "data": [ + { + "title": "DeepSeek", + "value": "DEEPSEEK", + "LLM": [ + {"label": "deepseek-reasoner", "value": "deepseek-reasoner","descr": "【官方模型】深度求索 新推出的推理模型R1满血版\n火便全球。\n支持64k上下文,其中支持8k最大回复。","type": "text"}, + {"label":"deepseek-chat", "value": "deepseek-chat","descr": "最强开源 MoE 模型 DeepSeek-V3,全球首个在代码、数学能力上与GPT-4-Turbo争锋的模型,在代码、数学的多个榜单上位居全球第二;","type": "text"} + ], + "type": ["LLM"], + "baseUrl": "https://api.deepseek.com/v1", + "LLMDefaultValue": "deepseek-chat" + }, + { + "title": "Ollama", + "value": "OLLAMA", + "LLM": [ + {"label": "llama2", "value": "llama2"}, + {"label": "llama2:13b", "value": "llama2:13b"}, + {"label": "llama2:70b", "value": "llama2:70b"}, + {"label": "llama2-chinese:13b", "value": "llama2-chinese:13b"}, + {"label": "llama3:8b", "value": "llama3:8b"}, + {"label": "llama3:70b", "value": "llama3:70b"}, + {"label": "qwen:0.5b", "value": "qwen:0.5b"}, + {"label": "qwen:1.8b", "value": "qwen:1.8b"}, + {"label": "qwen:4b", "value": "qwen:4b"}, + {"label": "qwen:7b", "value": "qwen:7b"}, + {"label": "qwen:14b", "value": "qwen:14b"}, + {"label": "qwen:32b", "value": "qwen:32b"}, + {"label": "qwen:72b", "value": "qwen:72b"}, + {"label": "qwen:110b", "value": "qwen:110b"}, + {"label": "qwen2:72b-instruct", "value": "qwen2:72b-instruct"}, + {"label": "qwen2:57b-a14b-instruct", "value": "qwen2:57b-a14b-instruct"}, + {"label": "qwen2:7b-instruct", "value": "qwen2:7b-instruct"}, + {"label": "qwen2.5:72b-instruct", "value": "qwen2.5:72b-instruct"}, + {"label": "qwen2.5:32b-instruct", "value": "qwen2.5:32b-instruct"}, + {"label": "qwen2.5:14b-instruct", "value": "qwen2.5:14b-instruct"}, + {"label": "qwen2.5:7b-instruct", "value": "qwen2.5:7b-instruct"}, + {"label": "qwen2.5:1.5b-instruct", "value": "qwen2.5:1.5b-instruct"}, + {"label": "qwen2.5:0.5b-instruct", "value": "qwen2.5:0.5b-instruct"}, + {"label": "qwen2.5:3b-instruct", "value": "qwen2.5:3b-instruct"}, + {"label": "phi3", "value": "phi3"} + ], + "EMBED": [ + {"label": "nomic-embed-text", "value": "nomic-embed-text"} + ], + "type": ["LLM", "EMBED"], + "baseUrl": "http://localhost:11434", + "LLMDefaultValue": "llama2", + "EMBEDDefaultValue": "nomic-embed-text" + }, + { + "title": "OpenAI", + "value": "OPENAI", + "LLM": [ + {"label": "gpt-3.5-turbo", "value": "gpt-3.5-turbo","descr": "纯官方高速GPT3.5系列,目前指向gpt-35-turbo-0125模型,最大回复小于4k。\n综合能力强,过去使用最广泛的文本模型。", "type": "text" + }, + {"label": "gpt-4", "value": "gpt-4","descr": "纯官方GPT4系列。知识库截止于2021年,价格适中,具有中等参数,比gpt-4turbo系列略强。","type": "text"}, + {"label": "gpt-4o", "value": "gpt-4o","descr": "GPT-4o,是openai的新旗舰型号,支持文本和图片分析。\n\n是迈向更自然的人机交互的一步——它接受文本和图像的任意组合作为输入,并生成文本和图像输出的任意组合。","type": "text,image"}, + {"label": "gpt-4o-mini", "value": "gpt-4o-mini","descr": "GPT-4o mini是目前性价比最高的小参数模型,性能介于GPT3.5~GPT4o之间。\n\n成本相比GPT-3.5 Turbo便宜60%以上,支持50种不同语言,用于替代GPT-3.5版本的模型。\n\n4o-mini的图像分析价格和4o差不多,如果有图像分析需求还是4o更好一些。\n\n当前指向 gpt-4o-mini-2024-07-18","type": "text,image"}, + {"label": "gpt-4-turbo", "value": "gpt-4-turbo","descr": "纯官方GPT4系列,支持文本和图片分析,最大回复4k,openai于2024-4-9新增的模型,知识库更新于2023年12月。提高了写作、数学、逻辑推理和编码能力。当前指向gpt-4-turbo-2024-04-09","type": "text,image"}, + {"label": "gpt-4-turbo-preview", "value": "gpt-4-turbo-preview","descr": "纯官方GPT4系列,最大回复4k,知识库更新于2023年4月。当前指向gpt-4-0125-preview","type": "text"}, + {"label": "gpt-3.5-turbo-0125", "value": "gpt-3.5-turbo-0125","descr": "openai于2024年1月25号更新的gpt-3.5模型,最大回复4k。\n\n综合能力强,过去使用最广泛的文本模型。","type": "text"}, + {"label": "gpt-3.5-turbo-1106", "value": "gpt-3.5-turbo-1106","descr": "openai于2023年11月6号更新的gpt-3.5模型,最大回复4k。属于即将被淘汰的模型。\n\n建议使用gpt-3.5-turbo或gpt-4o-mini","type": "text"}, + {"label": "gpt-3.5-turbo-0613", "value": "gpt-3.5-turbo-0613","descr": "通过微调后可以更准确地按照用户的指示进行操作,生成更简洁和针对性的输出。它不仅可以用于文本生成,还可以通过函数调用功能与其他系统和API进行集成,实现更复杂的任务自动化","type": "text"}, + {"label": "gpt-4o-2024-05-13", "value": "gpt-4o-2024-05-13","descr": "GPT-4o,是openai的新旗舰型号,支持文本和图片分析。\n\n是迈向更自然的人机交互的一步——它接受文本和图像的任意组合作为输入,并生成文本和图像输出的任意组合。\n\n该模型为初代的4o模型","type": "text,image"}, + {"label": "gpt-4-turbo-2024-04-09", "value": "gpt-4-turbo-2024-04-09","descr": "纯官方GPT4系列,支持文本和图片分析,最大回复4k,openai于2024-4-9新增的模型,提高了写作、数学、逻辑推理和编码能力。知识库更新于2023年12月。","type": "text,image"}, + {"label": "gpt-4-0125-preview", "value": "gpt-4-0125-preview","descr": "纯官方GPT4系列,最大回复4k,知识库更新于2023年4月。当前与gpt-4-turbo-preview属于同一模型","type": "text"}, + {"label": "gpt-4-1106-preview", "value": "gpt-4-1106-preview","descr": "纯官方GPT4系列,最大回复4k,知识库更新于2023年4月。正在逐渐被新的模型gpt-4-turbo和gpt-4-turbo-preview取代。","type": "text"} + ], + "EMBED": [ + {"label": "text-embedding-ada-002", "value": "text-embedding-ada-002","descr": "用于生成文本嵌入的模型。文本嵌入是将文本转换为数值形式(通常是向量),以便可以用于机器学习模型。","type": "vector,embeddings"}, + {"label": "text-embedding-3-small", "value": "text-embedding-3-small","descr": "用于生成文本的嵌入表示,网络结构较小,计算资源需求较低。虽然可能不如\"large\"版本那样精准,但它更适合于资源受限的环境或需要更快速处理的任务。","type": "vector,embeddings"}, + {"label": "text-embedding-3-large", "value": "text-embedding-3-large","descr": "用于生成文本的嵌入表示,即将文本转换为高维空间中的点,这些点的距离可以表示文本之间的相似度。有较大的网络结构,能够捕捉更丰富的语言特征,适用于需要高质量文本相似度或分类任务的场景。","type": "vector,embeddings"} + ], + "type": ["LLM", "EMBED"], + "baseUrl": "https://api.openai.com/v1/", + "LLMDefaultValue": "gpt-4o-mini", + "EMBEDDefaultValue": "text-embedding-ada-002" + }, + { + "title": "通义千问", + "value": "QWEN", + "LLM": [ + {"label": "qwen-turbo", "value": "qwen-turbo","descr": "通义千问超大规模语言模型,支持中文、英文等不同语言输入。适合文本创作、文本处理、编程辅助、翻译服务、对话模拟。","type": "text"}, + {"label": "qwen-plus", "value": "qwen-plus","descr": "通义千问超大规模语言模型,支持中文、英文等不同语言输入。适合文本创作、文本处理、编程辅助、翻译服务、对话模拟。","type": "text"}, + {"label": "qwen-max", "value": "qwen-max","descr": "暂无描述内容!","type": "text"} + ], + "EMBED": [ + {"label": "text-embedding-v2", "value": "text-embedding-v2","descr": "是一种将文本数据转换为向量的技术,通过深度学习模型将文本的语义信息嵌入到高维向量空间中。这些向量不仅能表达文本内容,还能捕捉文本之间的相似性和关系,从而让计算机高效地进行文本检索、分类、聚类等任务。","type": "vector"} + ], + "type": ["LLM", "EMBED"], + "baseUrl": "https://dashscope.aliyuncs.com/api/v1/services/", + "LLMDefaultValue": "qwen-plus", + "EMBEDDefaultValue": "text-embedding-v2" + }, + { + "title": "千帆大模型", + "value": "QIANFAN", + "LLM": [ + {"label": "ERNIE-Bot", "value": "ERNIE-Bot","descr": "是百度推出的一款知识增强大语言模型,主要用于与人对话互动、回答问题、协助创作,帮助人们高效便捷地获取信息、知识和灵感","type": "text"}, + {"label": "ERNIE-Bot 4.0", "value": "ERNIE-Bot 4.0","descr": "百度自行研发的文心产业级知识增强大语言模型4.0版本\n\n实现了基础模型的全面升级,在理解、生成、逻辑和记忆能力上相对ERNIE 3.5都有着显著提升,支持5K输入+2K输出。","type": "text"}, + {"label": "ERNIE-Bot-8K", "value": "ERNIE-Bot-8K","descr": "主要用于数据分析场景,特别是在企业数据分析中表现出色。ERNIE-Bot-8K是百度文心大模型的一个版本,具有模型效果优、生成能力强、应用门槛低等独特优势。","type": "text"}, + {"label": "ERNIE-Bot-turbo", "value": "ERNIE-Bot-turbo","descr": "是一个大语言模型,主要用于对话问答、内容创作生成等任务。它是百度自行研发的大语言模型,覆盖了海量中文数据,具有更强的对话问答和内容创作生成能力","type": "text"}, + {"label": "ERNIE-Speed-128K", "value": "ERNIE-Speed-128K","descr": "是一款基于Transformer结构的轻量级语言模型,旨在满足实时数据处理的需求。它具有高效、低延迟和高准确性的特点,广泛应用于自然语言处理、信息检索和文本分类等领域","type": "text"}, + {"label": "EB-turbo-AppBuilder", "value": "EB-turbo-AppBuilder","descr": "主要用于企业级应用场景,如智能客服、内容创作和知识问答等任务。它是基于文心高性能大语言模型ERNIE-Bot-turbo构建的,针对企业特定需求进行了深度的场景效果优化和输出格式定制,因此在满足企业特定需求方面具有更高的灵活性和实用性","type": "text"}, + {"label": "Yi-34B-Chat", "value": "Yi-34B-Chat","descr": "Yi-34B-Chat是一款基于Transformer架构的生成式预训练语言模型,它拥有340亿个参数,使其在处理自然语言任务时表现出了强大的能力。","type": "text"}, + {"label": "BLOOMZ-7B", "value": "BLOOMZ-7B","descr": "是一个用于生成文本序列的自回归模型,它可以进行多语言处理,支持46种语言和13种编程语言。BLOOMZ-7B是BLOOM模型的一个调优版本,具有更出色的泛化和零样本学习能力,适用于多种任务和场景","type": "text"}, + {"label": "Qianfan-BLOOMZ-7B-compressed", "value": "Qianfan-BLOOMZ-7B-compressed","descr": "是千帆团队在BLOOMZ-7B基础上的压缩版本,融合量化、稀疏化等技术,显存占用降低30%以上。","type": "text"}, + {"label": "Mixtral-8x7B-Instruct", "value": "Mixtral-8x7B-Instruct","descr": "由Mistral AI发布的首个高质量稀疏专家混合模型 (MOE),模型由8个70亿参数专家模型组成,在多个基准测试中表现优于Llama-2-70B及GPT3.5,能够处理32K上下文,在代码生成任务中表现尤为优异。","type": "text"}, + {"label": "Llama-2-7b-chat", "value": "Llama-2-7b-chat","descr": "由Meta AI研发并开源,在编码、推理及知识应用等场景表现优秀,Llama-2-7b-chat是高性能原生开源版本,适用于对话场景。","type": "text"}, + {"label": "Llama-2-13b-chat", "value": "Llama-2-13b-chat","descr": "由Meta AI研发并开源,在编码、推理及知识应用等场景表现优秀,Llama-2-13b-chat是性能与效果均衡的原生开源版本,适用于对话场景。","type": "text"}, + {"label": "Llama-2-70b-chat", "value": "Llama-2-70b-chat","descr": "由Meta AI研发并开源,在编码、推理及知识应用等场景表现优秀,Llama-2-70b-chat是高精度效果的原生开源版本。","type": "text"}, + {"label": "Qianfan-Chinese-Llama-2-7B", "value": "Qianfan-Chinese-Llama-2-7B","descr": "是千帆团队在Llama-2-7b基础上的中文增强版本,在CMMLU、C-EVAL等中文数据集上表现优异。","type": "text"}, + {"label": "ChatGLM2-6B-32K", "value": "ChatGLM2-6B-32K","descr": "是在ChatGLM2-6B的基础上进一步强化了对于长文本的理解能力,能够更好的处理最多32K长度的上下文。","type": "text"}, + {"label": "AquilaChat-7B", "value": "AquilaChat-7B","descr": "是由智源研究院研发,基于Aquila-7B训练的对话模型,支持流畅的文本对话及多种语言类生成任务,通过定义可扩展的特殊指令规范,实现 AquilaChat对其它模型和工具的调用,且易于扩展。","type": "text"} + ], + "EMBED": [ + {"label": "Embedding-V1", "value": "Embedding-V1","descr": "主要用于将离散对象(如文本、图像等)映射为连续的数值向量,以便于计算机处理和机器学习模型的训练和使用","type": "vector,embeddings"}, + {"label": "tao-8k", "value": "tao-8k","descr": "是由Huggingface开发者amu研发并开源的长文本向量表示模型,支持8k上下文长度,模型效果在C-MTEB上居前列,是当前最优的中文长文本embeddings模型之一","type": "vector"}, + {"label": "bge-large-zh", "value": "bge-large-zh","descr": "是由智源研究院研发的中文版文本表示模型,可将任意文本映射为低维稠密向量,以用于检索、分类、聚类或语义匹配等任务,并可支持为大模型调用外部知识。","type": "vector"}, + {"label": "bge-large-en", "value": "bge-large-en","descr": "是由智源研究院研发的英文版文本表示模型,可将任意文本映射为低维稠密向量,以用于检索、分类、聚类或语义匹配等任务,并可支持为大模型调用外部知识。","type": "vector"} + ], + "type": ["LLM", "EMBED"], + "baseUrl": "https://aip.baidubce.com", + "LLMDefaultValue": "Yi-34B-Chat", + "EMBEDDefaultValue": "Embedding-V1" + }, + { + "title": "智谱AI", + "value": "ZHIPU", + "LLM": [ + {"label": "glm-4", "value": "glm-4","descr": "是一个多模态大语言模型,主要用于处理复杂的指令和任务,支持长文本处理、多模态理解和文生图等功能","type": "text,image"}, + {"label": "glm-4v", "value": "glm-4v","descr": "智谱:多模态模型\n\n更懂中文的视觉理解、文生图等多模态模型能力。准确理解各任务场景语言描述及指令,更精确的完成多模态理解类任务,或生成高质量的图片、视频等多模态内容。","type": "text,image"}, + {"label": "glm-4-flash", "value": "glm-4-flash","descr": "该模型官方免费,主要用于处理多种自然语言处理任务,包括智能对话助手、辅助论文翻译、ppt及会议内容生产、网页智能搜索、数据生成和抽取、网页解析、智能规划和决策、辅助科研等场景","type": "text"}, + {"label": "glm-3-turbo", "value": "glm-3-turbo","descr": "是一种基于transformer结构的语言模型,由智谱AI推出。其主要特点包括使用三层transformer结构、采用Turbo机制以实时生成文本、处理长文本输入并具有强大的语言理解能力","type": "text"} + ], + "EMBED": [ + {"label": "Embedding-3", "value": "Embedding-3","descr": "主要用于文本搜索、聚类、推荐等任务。它通过将文本映射到低维向量空间,使得文本之间的语义关系可以通过向量之间的距离或相似度来衡量,从而支持各种基于向量的应用。","type": "vector"}, + {"label": "Embedding-2", "value": "Embedding-2","descr": "用于将高维离散数据映射到低维连续数值向量中,以便机器学习模型能够更好地处理和理解这些数据","type": "vector"} + ], + "type": ["LLM", "EMBED"], + "baseUrl": "https://open.bigmodel.cn", + "LLMDefaultValue": "glm-4-flash", + "EMBEDDefaultValue": "Embedding-2" + } + ] +} diff --git a/src/views/super/airag/aimodel/icon/OpenAi.png b/src/views/super/airag/aimodel/icon/OpenAi.png new file mode 100644 index 0000000..83a7e5f Binary files /dev/null and b/src/views/super/airag/aimodel/icon/OpenAi.png differ diff --git a/src/views/super/airag/aimodel/icon/deepspeek.png b/src/views/super/airag/aimodel/icon/deepspeek.png new file mode 100644 index 0000000..6dd9e8e Binary files /dev/null and b/src/views/super/airag/aimodel/icon/deepspeek.png differ diff --git a/src/views/super/airag/aimodel/icon/ollama.png b/src/views/super/airag/aimodel/icon/ollama.png new file mode 100644 index 0000000..8cd2cf1 Binary files /dev/null and b/src/views/super/airag/aimodel/icon/ollama.png differ diff --git a/src/views/super/airag/aimodel/icon/qianfan.png b/src/views/super/airag/aimodel/icon/qianfan.png new file mode 100644 index 0000000..ace23e8 Binary files /dev/null and b/src/views/super/airag/aimodel/icon/qianfan.png differ diff --git a/src/views/super/airag/aimodel/icon/qianwen.png b/src/views/super/airag/aimodel/icon/qianwen.png new file mode 100644 index 0000000..477b1b6 Binary files /dev/null and b/src/views/super/airag/aimodel/icon/qianwen.png differ diff --git a/src/views/super/airag/aimodel/icon/zhipuai.png b/src/views/super/airag/aimodel/icon/zhipuai.png new file mode 100644 index 0000000..4e1000c Binary files /dev/null and b/src/views/super/airag/aimodel/icon/zhipuai.png differ diff --git a/src/views/super/airag/aimodel/model.api.ts b/src/views/super/airag/aimodel/model.api.ts new file mode 100644 index 0000000..da2c3ed --- /dev/null +++ b/src/views/super/airag/aimodel/model.api.ts @@ -0,0 +1,71 @@ +import { defHttp } from '/@/utils/http/axios'; +import { Modal } from 'ant-design-vue'; + +enum Api { + list = '/airag/airagModel/list', + save = '/airag/airagModel/add', + testConn = '/airag/airagModel/test', + delete = '/airag/airagModel/delete', + queryById = '/airag/airagModel/queryById', + edit = '/airag/airagModel/edit', +} + +/** + * 查询AI模型 + * @param params + */ +export const list = (params) => { + return defHttp.get({ url: Api.list, params }, { isTransformResponse: false }); +}; + +/** + * 根据id查询AI模型 + * @param params + */ +export const queryById = (params) => { + return defHttp.get({ url: Api.queryById, params }, { isTransformResponse: false }); +}; + +/** + * 新增AI模型 + * + * @param params + */ +export const saveModel = (params) => { + return defHttp.post({ url: Api.save, params }); +}; + +/** + * 编辑AI模型 + * + * @param params + */ +export const editModel = (params) => { + return defHttp.put({ url: Api.edit, params }); +}; + +/** + * 测试链接 + * + * @param params + */ +export const testConn = (params) => { + return defHttp.post({ url: Api.testConn, params }); +}; + +/** + * 删除数据权限 + */ +export const deleteModel = (params, handleSuccess) => { + Modal.confirm({ + title: '确认删除', + content: '是否删除名称为' + params.name + '的模型吗?', + okText: '确认', + cancelText: '取消', + onOk: () => { + return defHttp.delete({ url: Api.delete, params }, { joinParamsToUrl: true }).then(() => { + handleSuccess(); + }); + }, + }); +}; diff --git a/src/views/super/airag/aimodel/model.data.ts b/src/views/super/airag/aimodel/model.data.ts new file mode 100644 index 0000000..81ae060 --- /dev/null +++ b/src/views/super/airag/aimodel/model.data.ts @@ -0,0 +1,92 @@ +import { FormSchema } from '@/components/Form'; + +import deepspeek from '/@/views/super/airag/aimodel/icon/deepspeek.png'; +import ollama from '/@/views/super/airag/aimodel/icon/ollama.png'; +import OpenAi from '/@/views/super/airag/aimodel/icon/OpenAi.png'; +import qianfan from '/@/views/super/airag/aimodel/icon/qianfan.png'; +import qianwen from '/@/views/super/airag/aimodel/icon/qianwen.png'; +import zhipuai from '/@/views/super/airag/aimodel/icon/zhipuai.png'; +import { ref } from 'vue'; + +/** + * 表单 + */ +export const formSchema: FormSchema[] = [ + { + label: 'id', + field: 'id', + component: 'Input', + show: false, + }, + { + label: '模型名称', + field: 'name', + required: true, + component: 'Input', + }, + { + label: '模型类型', + field: 'modelType', + slot: 'modelType', + required: true, + component: 'Select', + }, + { + label: '基础模型', + field: 'modelName', + required: true, + slot: 'modelName', + component: 'Select', + }, + { + label: 'API域名', + field: 'baseUrl', + required: true, + component: 'Input' + }, + { + label: 'API Key', + field: 'apiKey', + required: true, + component: 'InputPassword', + ifShow: ({ values }) => { + if(values.provider==="OLLAMA"){ + return false; + } + return true; + }, + }, + { + label: 'Secret Key', + field: 'secretKey', + required: true, + component: 'InputPassword', + ifShow: ({ values }) => { + if(values.provider==='DEEPSEEK' || values.provider==="OLLAMA" || values.provider==="OPENAI" + || values.provider==="ZHIPU" || values.provider==="QWEN"){ + return false; + } + return true; + }, + }, + { + label: '供应者', + field: 'provider', + component: 'Input', + show: false, + }, +]; + +/** + * 图片路径映射 + * + * @param name + */ +export const imageList = ref({ + DEEPSEEK: deepspeek, + OLLAMA: ollama, + OPENAI: OpenAi, + QIANFAN: qianfan, + QWEN: qianwen, + ZHIPU: zhipuai, +}); diff --git a/src/views/super/airag/ocr/AiOcr.api.ts b/src/views/super/airag/ocr/AiOcr.api.ts new file mode 100644 index 0000000..4f4d2ec --- /dev/null +++ b/src/views/super/airag/ocr/AiOcr.api.ts @@ -0,0 +1,46 @@ +import { defHttp } from '/@/utils/http/axios'; +import { Modal } from 'ant-design-vue'; + +export enum Api { + list = '/airag/ocr/list', + add = '/airag/ocr/add', + edit = '/airag/ocr/edit', + deleteById = '/airag/ocr/deleteById', + flowRun = '/airag/flow/run', +} + +/** + * 查询ocr列表 + * + * @param params + */ +export const list = (params) => { + return defHttp.get({ url: Api.list, params }); +}; + +/** + * 添加Orc + * @param params + * @param handleSuccess + */ +export const addOcr = (params) => { + return defHttp.post({ url: Api.add, params }); +}; + +/** + * 编辑Orc + * @param params + * @param handleSuccess + */ +export const editOcr = (params) => { + return defHttp.put({ url: Api.edit, params }); +}; + +/** + * 根据id删除 Orc + * @param params + * @param handleSuccess + */ +export const deleteOcrById = (params) => { + return defHttp.delete({ url: Api.deleteById, params }); +}; diff --git a/src/views/super/airag/ocr/AiOcr.data.ts b/src/views/super/airag/ocr/AiOcr.data.ts new file mode 100644 index 0000000..5545458 --- /dev/null +++ b/src/views/super/airag/ocr/AiOcr.data.ts @@ -0,0 +1,81 @@ +import { BasicColumn, FormSchema } from '@/components/Table'; + +//ocr表格 +export const columns: BasicColumn[] = [ + { + title: '编号', + dataIndex: 'id', + ifShow: false, + }, + { + title: '标题', + dataIndex: 'title', + ellipsis: true, + width: 300, + }, + { + title: '提示词', + dataIndex: 'prompt', + ellipsis: true, + width: 300, + }, +]; + +//ocr表单 +export const schemas: FormSchema[] = [ + { + label: '', + field: 'id', + component: 'Input', + show: false, + }, + { + label: '标题', + field: 'title', + component: 'Input', + required: true, + }, + { + label: '提示词', + field: 'prompt', + component: 'InputTextArea', + componentProps: { + row: 4, + autosize: { minRows: 4, maxRows: 6 }, + }, + required: true, + }, +]; + +//ocr解析表单 +export const analysisSchemas: FormSchema[] = [ + { + label: '', + field: 'id', + component: 'Input', + show: false, + }, + { + label: '图片', + field: 'url', + component: 'JImageUpload', + required: true, + }, + { + label: '提示词', + field: 'prompt', + component: 'InputTextArea', + show:false, + }, + { + label: '解析结果', + field: 'analysisResult', + component: 'InputTextArea', + componentProps: { + row: 10, + autosize: { minRows: 10, maxRows: 10 }, + readonly: true, + placeholder:"解析结果将在这里显示" + }, + }, +]; diff --git a/src/views/super/airag/ocr/AiOcrList.vue b/src/views/super/airag/ocr/AiOcrList.vue new file mode 100644 index 0000000..a0b89f8 --- /dev/null +++ b/src/views/super/airag/ocr/AiOcrList.vue @@ -0,0 +1,104 @@ + + diff --git a/src/views/super/airag/ocr/components/AiOcrAnalysisModal.vue b/src/views/super/airag/ocr/components/AiOcrAnalysisModal.vue new file mode 100644 index 0000000..8753f97 --- /dev/null +++ b/src/views/super/airag/ocr/components/AiOcrAnalysisModal.vue @@ -0,0 +1,116 @@ + + + + diff --git a/src/views/super/airag/ocr/components/AiOcrModal.vue b/src/views/super/airag/ocr/components/AiOcrModal.vue new file mode 100644 index 0000000..cbb70da --- /dev/null +++ b/src/views/super/airag/ocr/components/AiOcrModal.vue @@ -0,0 +1,62 @@ + + + + diff --git a/src/views/super/registerSuper.ts b/src/views/super/registerSuper.ts new file mode 100644 index 0000000..d00198e --- /dev/null +++ b/src/views/super/registerSuper.ts @@ -0,0 +1,16 @@ +import type { App } from 'vue'; + +/** + * 动态引入 super 下的组件 + */ +export async function registerSuper(app: App) { + const modules = import.meta.glob('./**/register.ts'); + for (let [url, module] of Object.entries(modules)) { + let { register } = await module(); + if (typeof register === 'function') { + await register(app); + } else { + console.error(`${url} 没有导出 register 函数,无法完成注册!`); + } + } +} \ No newline at end of file diff --git a/src/views/sys/about/index.vue b/src/views/sys/about/index.vue new file mode 100644 index 0000000..3d6dd07 --- /dev/null +++ b/src/views/sys/about/index.vue @@ -0,0 +1,97 @@ + + diff --git a/src/views/sys/error-log/DetailModal.vue b/src/views/sys/error-log/DetailModal.vue new file mode 100644 index 0000000..2047707 --- /dev/null +++ b/src/views/sys/error-log/DetailModal.vue @@ -0,0 +1,27 @@ + + diff --git a/src/views/sys/error-log/data.tsx b/src/views/sys/error-log/data.tsx new file mode 100644 index 0000000..3ffc2f4 --- /dev/null +++ b/src/views/sys/error-log/data.tsx @@ -0,0 +1,67 @@ +import { Tag } from 'ant-design-vue'; +import { BasicColumn } from '/@/components/Table/index'; +import { ErrorTypeEnum } from '/@/enums/exceptionEnum'; +import { useI18n } from '/@/hooks/web/useI18n'; + +const { t } = useI18n(); + +export function getColumns(): BasicColumn[] { + return [ + { + dataIndex: 'type', + title: t('sys.errorLog.tableColumnType'), + width: 80, + customRender: ({ text }) => { + const color = + text === ErrorTypeEnum.VUE + ? 'green' + : text === ErrorTypeEnum.RESOURCE + ? 'cyan' + : text === ErrorTypeEnum.PROMISE + ? 'blue' + : ErrorTypeEnum.AJAX + ? 'red' + : 'purple'; + return {() => text}; + }, + }, + { + dataIndex: 'url', + title: 'URL', + width: 200, + }, + { + dataIndex: 'time', + title: t('sys.errorLog.tableColumnDate'), + width: 160, + }, + { + dataIndex: 'file', + title: t('sys.errorLog.tableColumnFile'), + width: 200, + }, + { + dataIndex: 'name', + title: 'Name', + width: 200, + }, + { + dataIndex: 'message', + title: t('sys.errorLog.tableColumnMsg'), + width: 300, + }, + { + dataIndex: 'stack', + title: t('sys.errorLog.tableColumnStackMsg'), + }, + ]; +} + +export function getDescSchema(): any { + return getColumns().map((column) => { + return { + field: column.dataIndex!, + label: column.title, + }; + }); +} diff --git a/src/views/sys/error-log/index.vue b/src/views/sys/error-log/index.vue new file mode 100644 index 0000000..1895524 --- /dev/null +++ b/src/views/sys/error-log/index.vue @@ -0,0 +1,88 @@ + + + diff --git a/src/views/sys/exception/Exception.vue b/src/views/sys/exception/Exception.vue new file mode 100644 index 0000000..c3db956 --- /dev/null +++ b/src/views/sys/exception/Exception.vue @@ -0,0 +1,143 @@ + + diff --git a/src/views/sys/exception/NetworkErrorException.vue b/src/views/sys/exception/NetworkErrorException.vue new file mode 100644 index 0000000..e4ce2b9 --- /dev/null +++ b/src/views/sys/exception/NetworkErrorException.vue @@ -0,0 +1,11 @@ + + + diff --git a/src/views/sys/exception/NotAccessException.vue b/src/views/sys/exception/NotAccessException.vue new file mode 100644 index 0000000..a5b2a5f --- /dev/null +++ b/src/views/sys/exception/NotAccessException.vue @@ -0,0 +1,11 @@ + + + diff --git a/src/views/sys/exception/NotDataErrorException.vue b/src/views/sys/exception/NotDataErrorException.vue new file mode 100644 index 0000000..9a09dd0 --- /dev/null +++ b/src/views/sys/exception/NotDataErrorException.vue @@ -0,0 +1,11 @@ + + + diff --git a/src/views/sys/exception/ServerErrorException.vue b/src/views/sys/exception/ServerErrorException.vue new file mode 100644 index 0000000..9742f55 --- /dev/null +++ b/src/views/sys/exception/ServerErrorException.vue @@ -0,0 +1,11 @@ + + + diff --git a/src/views/sys/exception/index.ts b/src/views/sys/exception/index.ts new file mode 100644 index 0000000..fb57528 --- /dev/null +++ b/src/views/sys/exception/index.ts @@ -0,0 +1,5 @@ +export { default as Exception } from './Exception.vue'; +export { default as NotAccessException } from './NotAccessException.vue'; +export { default as NetworkErrorException } from './NetworkErrorException.vue'; +export { default as NotDataErrorException } from './NotDataErrorException.vue'; +export { default as ServerErrorException } from './ServerErrorException.vue'; diff --git a/src/views/sys/forget-password/step1.vue b/src/views/sys/forget-password/step1.vue new file mode 100644 index 0000000..7a7892f --- /dev/null +++ b/src/views/sys/forget-password/step1.vue @@ -0,0 +1,96 @@ + + diff --git a/src/views/sys/forget-password/step2.vue b/src/views/sys/forget-password/step2.vue new file mode 100644 index 0000000..b81d49e --- /dev/null +++ b/src/views/sys/forget-password/step2.vue @@ -0,0 +1,103 @@ + + diff --git a/src/views/sys/forget-password/step3.vue b/src/views/sys/forget-password/step3.vue new file mode 100644 index 0000000..77ab02b --- /dev/null +++ b/src/views/sys/forget-password/step3.vue @@ -0,0 +1,71 @@ + + diff --git a/src/views/sys/iframe/FrameBlank.vue b/src/views/sys/iframe/FrameBlank.vue new file mode 100644 index 0000000..a8a61f5 --- /dev/null +++ b/src/views/sys/iframe/FrameBlank.vue @@ -0,0 +1,9 @@ + + diff --git a/src/views/sys/iframe/index.vue b/src/views/sys/iframe/index.vue new file mode 100644 index 0000000..e73bef3 --- /dev/null +++ b/src/views/sys/iframe/index.vue @@ -0,0 +1,85 @@ + + + diff --git a/src/views/sys/lock/LockPage.vue b/src/views/sys/lock/LockPage.vue new file mode 100644 index 0000000..b43df99 --- /dev/null +++ b/src/views/sys/lock/LockPage.vue @@ -0,0 +1,241 @@ + + + diff --git a/src/views/sys/lock/index.vue b/src/views/sys/lock/index.vue new file mode 100644 index 0000000..e8c4d55 --- /dev/null +++ b/src/views/sys/lock/index.vue @@ -0,0 +1,13 @@ + + diff --git a/src/views/sys/lock/useNow.ts b/src/views/sys/lock/useNow.ts new file mode 100644 index 0000000..ee461fc --- /dev/null +++ b/src/views/sys/lock/useNow.ts @@ -0,0 +1,60 @@ +import { dateUtil } from '/@/utils/dateUtil'; +import { reactive, toRefs } from 'vue'; +import { tryOnMounted, tryOnUnmounted } from '@vueuse/core'; + +export function 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/views/sys/login/ForgetPasswordForm.vue b/src/views/sys/login/ForgetPasswordForm.vue new file mode 100644 index 0000000..4f2d152 --- /dev/null +++ b/src/views/sys/login/ForgetPasswordForm.vue @@ -0,0 +1,68 @@ + + diff --git a/src/views/sys/login/Login.vue b/src/views/sys/login/Login.vue new file mode 100644 index 0000000..59304c4 --- /dev/null +++ b/src/views/sys/login/Login.vue @@ -0,0 +1,208 @@ + + + diff --git a/src/views/sys/login/LoginForm.vue b/src/views/sys/login/LoginForm.vue new file mode 100644 index 0000000..ae4096b --- /dev/null +++ b/src/views/sys/login/LoginForm.vue @@ -0,0 +1,198 @@ + + diff --git a/src/views/sys/login/LoginFormTitle.vue b/src/views/sys/login/LoginFormTitle.vue new file mode 100644 index 0000000..a673636 --- /dev/null +++ b/src/views/sys/login/LoginFormTitle.vue @@ -0,0 +1,25 @@ + + diff --git a/src/views/sys/login/LoginSelect.vue b/src/views/sys/login/LoginSelect.vue new file mode 100644 index 0000000..975b050 --- /dev/null +++ b/src/views/sys/login/LoginSelect.vue @@ -0,0 +1,332 @@ + + + + + diff --git a/src/views/sys/login/MobileForm.vue b/src/views/sys/login/MobileForm.vue new file mode 100644 index 0000000..affdb2c --- /dev/null +++ b/src/views/sys/login/MobileForm.vue @@ -0,0 +1,89 @@ + + diff --git a/src/views/sys/login/OAuth2Login.vue b/src/views/sys/login/OAuth2Login.vue new file mode 100644 index 0000000..d6c62c2 --- /dev/null +++ b/src/views/sys/login/OAuth2Login.vue @@ -0,0 +1,130 @@ + + + diff --git a/src/views/sys/login/QrCodeForm.vue b/src/views/sys/login/QrCodeForm.vue new file mode 100644 index 0000000..3b36731 --- /dev/null +++ b/src/views/sys/login/QrCodeForm.vue @@ -0,0 +1,83 @@ + + diff --git a/src/views/sys/login/RegisterForm.vue b/src/views/sys/login/RegisterForm.vue new file mode 100644 index 0000000..528ddea --- /dev/null +++ b/src/views/sys/login/RegisterForm.vue @@ -0,0 +1,114 @@ + + diff --git a/src/views/sys/login/SessionTimeoutLogin.vue b/src/views/sys/login/SessionTimeoutLogin.vue new file mode 100644 index 0000000..d1a2f34 --- /dev/null +++ b/src/views/sys/login/SessionTimeoutLogin.vue @@ -0,0 +1,53 @@ + + + diff --git a/src/views/sys/login/ThirdModal.vue b/src/views/sys/login/ThirdModal.vue new file mode 100644 index 0000000..607bdfa --- /dev/null +++ b/src/views/sys/login/ThirdModal.vue @@ -0,0 +1,64 @@ + + diff --git a/src/views/sys/login/TokenLoginPage.vue b/src/views/sys/login/TokenLoginPage.vue new file mode 100644 index 0000000..c11e204 --- /dev/null +++ b/src/views/sys/login/TokenLoginPage.vue @@ -0,0 +1,218 @@ + + + + + + \ No newline at end of file diff --git a/src/views/sys/login/useLogin.ts b/src/views/sys/login/useLogin.ts new file mode 100644 index 0000000..3b8b76e --- /dev/null +++ b/src/views/sys/login/useLogin.ts @@ -0,0 +1,216 @@ +import type { ValidationRule } from 'ant-design-vue/lib/form/Form'; +import type { RuleObject } from 'ant-design-vue/lib/form/interface'; +import { ref, computed, unref, Ref } from 'vue'; +import { useI18n } from '/@/hooks/web/useI18n'; +import { checkOnlyUser } from '/@/api/sys/user'; +import { defHttp } from '/@/utils/http/axios'; +import { OAUTH2_THIRD_LOGIN_TENANT_ID } from "/@/enums/cacheEnum"; +import { getAuthCache } from "/@/utils/auth"; + +export enum LoginStateEnum { + LOGIN, + REGISTER, + RESET_PASSWORD, + MOBILE, + QR_CODE, +} + +export enum SmsEnum { + LOGIN = '0', + REGISTER = '1', + FORGET_PASSWORD = '2', +} +const currentState = ref(LoginStateEnum.LOGIN); + +export function useLoginState() { + function setLoginState(state: LoginStateEnum) { + currentState.value = state; + } + + const getLoginState = computed(() => currentState.value); + + function handleBackLogin() { + setLoginState(LoginStateEnum.LOGIN); + } + + return { setLoginState, getLoginState, handleBackLogin }; +} + +export function useFormValid(formRef: Ref) { + async function validForm() { + const form = unref(formRef); + if (!form) return; + const data = await form.validate(); + return data as T; + } + + return { validForm }; +} + +export function useFormRules(formData?: Recordable) { + const { t } = useI18n(); + + const getAccountFormRule = computed(() => createRule(t('sys.login.accountPlaceholder'))); + const getPasswordFormRule = computed(() => createRule(t('sys.login.passwordPlaceholder'))); + const getSmsFormRule = computed(() => createRule(t('sys.login.smsPlaceholder'))); + const getMobileFormRule = computed(() => createRule(t('sys.login.mobilePlaceholder'))); + + const getRegisterAccountRule = computed(() => createRegisterAccountRule('account')); + const getRegisterMobileRule = computed(() => createRegisterAccountRule('mobile')); + + const validatePolicy = async (_: RuleObject, value: boolean) => { + return !value ? Promise.reject(t('sys.login.policyPlaceholder')) : Promise.resolve(); + }; + + const validateConfirmPassword = (password: string) => { + return async (_: RuleObject, value: string) => { + if (!value) { + return Promise.reject(t('sys.login.passwordPlaceholder')); + } + if (value !== password) { + return Promise.reject(t('sys.login.diffPwd')); + } + return Promise.resolve(); + }; + }; + + const getFormRules = computed((): { [k: string]: ValidationRule | ValidationRule[] } => { + const accountFormRule = unref(getAccountFormRule); + const passwordFormRule = unref(getPasswordFormRule); + const smsFormRule = unref(getSmsFormRule); + const mobileFormRule = unref(getMobileFormRule); + + const registerAccountRule = unref(getRegisterAccountRule); + const registerMobileRule = unref(getRegisterMobileRule); + + const mobileRule = { + sms: smsFormRule, + mobile: mobileFormRule, + }; + switch (unref(currentState)) { + // register form rules + case LoginStateEnum.REGISTER: + return { + account: registerAccountRule, + password: passwordFormRule, + mobile: registerMobileRule, + sms: smsFormRule, + confirmPassword: [{ validator: validateConfirmPassword(formData?.password), trigger: 'change' }], + policy: [{ validator: validatePolicy, trigger: 'change' }], + }; + + // reset password form rules + case LoginStateEnum.RESET_PASSWORD: + return { + username: accountFormRule, + confirmPassword: [{ validator: validateConfirmPassword(formData?.password), trigger: 'change' }], + ...mobileRule, + }; + + // mobile form rules + case LoginStateEnum.MOBILE: + return mobileRule; + + // login form rules + default: + return { + account: accountFormRule, + password: passwordFormRule, + }; + } + }); + return { getFormRules }; +} + +function createRule(message: string) { + return [ + { + required: true, + message, + trigger: 'change', + }, + ]; +} +function createRegisterAccountRule(type) { + return [ + { + validator: type == 'account' ? checkUsername : checkPhone, + trigger: 'change', + }, + ]; +} + +function checkUsername(rule, value, callback) { + const { t } = useI18n(); + if (!value) { + return Promise.reject(t('sys.login.accountPlaceholder')); + } else { + return new Promise((resolve, reject) => { + checkOnlyUser({ username: value }).then((res) => { + res.success ? resolve() : reject('用户名已存在!'); + }); + }); + } +} +async function checkPhone(rule, value, callback) { + const { t } = useI18n(); + var reg = /^1[3456789]\d{9}$/; + if (!reg.test(value)) { + return Promise.reject(new Error('请输入正确手机号')); + } else { + return new Promise((resolve, reject) => { + checkOnlyUser({ phone: value }).then((res) => { + res.success ? resolve() : reject('手机号已存在!'); + }); + }); + } +} + +//update-begin---author:wangshuai ---date:20220629 for:[issues/I5BG1I]vue3不支持auth2登录------------ +/** + * 判断是否是OAuth2APP环境 + */ +export function isOAuth2AppEnv() { + return /wxwork|dingtalk/i.test(navigator.userAgent); +} + +/** + * 判断是否是钉钉环境 + */ +export function isOAuth2DingAppEnv() { + return /dingtalk/i.test(navigator.userAgent); +} + +/** + * 后台构造oauth2登录地址 + * @param source + * @param tenantId + */ +export function sysOAuth2Login(source) { + let url = `${window._CONFIG['domianURL']}/sys/thirdLogin/oauth2/${source}/login`; + url += `?state=${encodeURIComponent(window.location.origin)}`; + //update-begin---author:wangshuai ---date:20230224 for:[QQYUN-3440]新建企业微信和钉钉配置表,通过租户模式隔离------------ + let tenantId = getAuthCache(OAUTH2_THIRD_LOGIN_TENANT_ID); + if(tenantId){ + url += `&tenantId=${tenantId}`; + } + //update-end---author:wangshuai ---date:20230224 for:[QQYUN-3440]新建企业微信和钉钉配置表,通过租户模式隔离------------ + window.location.href = url; +} +//update-end---author:wangshuai ---date:20220629 for:[issues/I5BG1I]vue3不支持auth2登录------------ + +//update-begin---author:wangshuai ---date:20241108 for:[QQYUN-9421]vue3新版auth登录,用户不用点击登录------------ +/** + * 后台callBack + * @param code + */ +export function sysOAuth2Callback(code:string) { + let url = `${window._CONFIG['domianURL']}/sys/thirdLogin/oauth2/dingding/login`; + url += `?state=${encodeURIComponent(window.location.origin)}&authCode=${code}`; + let tenantId = getAuthCache(OAUTH2_THIRD_LOGIN_TENANT_ID); + if(tenantId){ + url += `&tenantId=${tenantId}`; + } + window.location.href = url; +} +//update-end---author:wangshuai ---date:20241108 for:[QQYUN-9421]vue3新版auth登录,用户不用点击登录------------ diff --git a/src/views/sys/redirect/index.vue b/src/views/sys/redirect/index.vue new file mode 100644 index 0000000..9adb0e3 --- /dev/null +++ b/src/views/sys/redirect/index.vue @@ -0,0 +1,30 @@ + + diff --git a/src/views/system/address/address.api.ts b/src/views/system/address/address.api.ts new file mode 100644 index 0000000..4890d34 --- /dev/null +++ b/src/views/system/address/address.api.ts @@ -0,0 +1,19 @@ +import { defHttp } from '/@/utils/http/axios'; + +export enum Api { + list = '/sys/user/queryByOrgCodeForAddressList', + positionList = '/sys/position/list', + queryDepartTreeSync = '/sys/sysDepart/queryDepartTreeSync', +} +/** + * 获取部门树列表 + */ +export const queryDepartTreeSync = (params?) => defHttp.get({ url: Api.queryDepartTreeSync, params }); +/** + * 部门用户信息 + */ +export const list = (params?) => defHttp.get({ url: Api.list, params }); +/** + * 职务list + */ +export const positionList = (params?) => defHttp.get({ url: Api.positionList, params }); diff --git a/src/views/system/address/address.data.ts b/src/views/system/address/address.data.ts new file mode 100644 index 0000000..ddec3a8 --- /dev/null +++ b/src/views/system/address/address.data.ts @@ -0,0 +1,51 @@ +import { FormSchema } from '/@/components/Form'; +import { BasicColumn } from '/@/components/Table'; + +export const columns: BasicColumn[] = [ + { + title: '姓名', + dataIndex: 'realname', + width: 150, + }, + { + title: '工号', + dataIndex: 'workNo', + width: 100, + }, + { + title: '部门', + dataIndex: 'departName', + width: 200, + }, + { + title: '职务', + dataIndex: 'post', + width: 150, + slots: { customRender: 'post' }, + }, + { + title: '手机', + width: 150, + dataIndex: 'phone', + }, + { + title: '邮箱', + width: 150, + dataIndex: 'email', + }, +]; + +export const searchFormSchema: FormSchema[] = [ + { + label: '姓名', + field: 'realname', + component: 'Input', + colProps: { span: 6 }, + }, + { + label: '工号', + field: 'workNo', + component: 'Input', + colProps: { span: 6 }, + }, +]; diff --git a/src/views/system/address/components/DepartLeftTree.vue b/src/views/system/address/components/DepartLeftTree.vue new file mode 100644 index 0000000..11ede62 --- /dev/null +++ b/src/views/system/address/components/DepartLeftTree.vue @@ -0,0 +1,172 @@ + + + diff --git a/src/views/system/address/index.less b/src/views/system/address/index.less new file mode 100644 index 0000000..61b73d4 --- /dev/null +++ b/src/views/system/address/index.less @@ -0,0 +1,13 @@ +//noinspection LessUnresolvedVariable +@prefix-cls: ~'@{namespace}-address-list'; + +.@{prefix-cls} { + // update-begin-author:liusq date:20230625 for: [issues/563]暗色主题部分失效 + background-color: @component-background; + // update-end-author:liusq date:20230625 for: [issues/563]暗色主题部分失效 + &--box { + .ant-tabs-nav { + padding: 0 20px; + } + } +} diff --git a/src/views/system/address/index.vue b/src/views/system/address/index.vue new file mode 100644 index 0000000..6e41a63 --- /dev/null +++ b/src/views/system/address/index.vue @@ -0,0 +1,89 @@ + + + + + diff --git a/src/views/system/appconfig/ThirdApp.api.ts b/src/views/system/appconfig/ThirdApp.api.ts new file mode 100644 index 0000000..db16c31 --- /dev/null +++ b/src/views/system/appconfig/ThirdApp.api.ts @@ -0,0 +1,69 @@ +import { defHttp } from '/@/utils/http/axios'; + +enum Api { + //第三方登录配置 + addThirdAppConfig = '/sys/thirdApp/addThirdAppConfig', + editThirdAppConfig = '/sys/thirdApp/editThirdAppConfig', + getThirdConfigByTenantId = '/sys/thirdApp/getThirdConfigByTenantId', + syncDingTalkDepartUserToLocal = '/sys/thirdApp/sync/dingtalk/departAndUser/toLocal', + getThirdUserByWechat = '/sys/thirdApp/getThirdUserByWechat', + wechatEnterpriseToLocal = '/sys/thirdApp/sync/wechatEnterprise/departAndUser/toLocal', + getThirdUserBindByWechat = '/sys/thirdApp/getThirdUserBindByWechat', + deleteThirdAccount = '/sys/thirdApp/deleteThirdAccount', +} + +/** + * 第三方配置保存或者更新 + */ +export const saveOrUpdateThirdConfig = (params, isUpdate) => { + let url = isUpdate ? Api.editThirdAppConfig : Api.addThirdAppConfig; + return defHttp.post({ url: url, params }, { joinParamsToUrl: true }); +}; + +/** + * 获取第三方配置 + * @param params + */ +export const getThirdConfigByTenantId = (params) => { + return defHttp.get({ url: Api.getThirdConfigByTenantId, params }); +}; + +/** + * 同步钉钉部门用户到本地 + * @param params + */ +export const syncDingTalkDepartUserToLocal = () => { + return defHttp.get({ url: Api.syncDingTalkDepartUserToLocal, timeout: 60000 }, { isTransformResponse: false }); +}; + +/** + * 获取企业微信绑定的用户信息 + * @param params + */ +export const getThirdUserByWechat = () => { + return defHttp.get({ url: Api.getThirdUserByWechat }, { isTransformResponse: false }); +}; + +/** + * 同步企业微信用户部门到本地 + * @param params + */ +export const wechatEnterpriseToLocal = (params) => { + return defHttp.get({ url: Api.wechatEnterpriseToLocal, params }, { isTransformResponse: false }); +}; + +/** + * 获取绑定企业微信的用户 + * @param params + */ +export const getThirdUserBindByWechat = () => { + return defHttp.get({ url: Api.getThirdUserBindByWechat }, { isTransformResponse: false }); +}; + +/** + * 根据第三方账号表的id解绑账号 + * @param params + */ +export const deleteThirdAccount = (params) => { + return defHttp.delete({ url: Api.deleteThirdAccount, params }, { isTransformResponse:false, joinParamsToUrl: true }); +}; \ No newline at end of file diff --git a/src/views/system/appconfig/ThirdApp.data.ts b/src/views/system/appconfig/ThirdApp.data.ts new file mode 100644 index 0000000..f2b207c --- /dev/null +++ b/src/views/system/appconfig/ThirdApp.data.ts @@ -0,0 +1,61 @@ +//第三方app配置表单 +import { FormSchema } from '/@/components/Form'; + +//第三方app表单 +export const thirdAppFormSchema: FormSchema[] = [ + { + label: 'id', + field: 'id', + component: 'Input', + show: false, + }, + { + label: 'thirdType', + field: 'thirdType', + component: 'Input', + show: false, + }, + { + label: 'CorpId', + field: 'corpId', + component: 'Input', + ifShow: ({ values }) => { + return values.thirdType === 'dingtalk'; + }, + required: true, + }, + { + label: 'Agentld', + field: 'agentId', + component: 'Input', + required: true, + }, + { + label: 'AppKey', + field: 'clientId', + component: 'Input', + required: true, + }, + { + label: 'AppSecret', + field: 'clientSecret', + component: 'Input', + required: true, + },{ + label: '启用', + field: 'status', + component: 'Switch', + componentProps:{ + checkedChildren:'关闭', + checkedValue:1, + unCheckedChildren:'开启', + unCheckedValue: 0 + }, + defaultValue: 1 + },{ + label: '租户id', + field: 'tenantId', + component: 'Input', + show: false, + }, +]; diff --git a/src/views/system/appconfig/ThirdAppBindWeEnterpriseModal.vue b/src/views/system/appconfig/ThirdAppBindWeEnterpriseModal.vue new file mode 100644 index 0000000..9293ae7 --- /dev/null +++ b/src/views/system/appconfig/ThirdAppBindWeEnterpriseModal.vue @@ -0,0 +1,316 @@ + + + + + + diff --git a/src/views/system/appconfig/ThirdAppConfigList.vue b/src/views/system/appconfig/ThirdAppConfigList.vue new file mode 100644 index 0000000..6d55f97 --- /dev/null +++ b/src/views/system/appconfig/ThirdAppConfigList.vue @@ -0,0 +1,140 @@ + + + + + + + diff --git a/src/views/system/appconfig/ThirdAppConfigModal.vue b/src/views/system/appconfig/ThirdAppConfigModal.vue new file mode 100644 index 0000000..12a6b48 --- /dev/null +++ b/src/views/system/appconfig/ThirdAppConfigModal.vue @@ -0,0 +1,69 @@ + + + + + diff --git a/src/views/system/appconfig/ThirdAppDingTalkConfigForm.vue b/src/views/system/appconfig/ThirdAppDingTalkConfigForm.vue new file mode 100644 index 0000000..8ddada5 --- /dev/null +++ b/src/views/system/appconfig/ThirdAppDingTalkConfigForm.vue @@ -0,0 +1,303 @@ + + + + + diff --git a/src/views/system/appconfig/ThirdAppWeEnterpriseConfigForm.vue b/src/views/system/appconfig/ThirdAppWeEnterpriseConfigForm.vue new file mode 100644 index 0000000..97cada2 --- /dev/null +++ b/src/views/system/appconfig/ThirdAppWeEnterpriseConfigForm.vue @@ -0,0 +1,249 @@ + + + + + diff --git a/src/views/system/category/category.api.ts b/src/views/system/category/category.api.ts new file mode 100644 index 0000000..9295745 --- /dev/null +++ b/src/views/system/category/category.api.ts @@ -0,0 +1,78 @@ +import { defHttp } from '/@/utils/http/axios'; +import { Modal } from 'ant-design-vue'; + +enum Api { + list = '/sys/category/rootList', + save = '/sys/category/add', + edit = '/sys/category/edit', + deleteCategory = '/sys/category/delete', + deleteBatch = '/sys/category/deleteBatch', + importExcel = '/sys/category/importExcel', + exportXls = '/sys/category/exportXls', + loadTreeData = '/sys/category/loadTreeRoot', + getChildList = '/sys/category/childList', + getChildListBatch = '/sys/category/getChildListBatch', +} +/** + * 导出api + * @param params + */ +export const getExportUrl = Api.exportXls; +/** + * 导入api + * @param params + */ +export const getImportUrl = Api.importExcel; +/** + * 列表接口 + * @param params + */ +export const list = (params) => defHttp.get({ url: Api.list, params }); +/** + * 删除 + */ +export const deleteCategory = (params, handleSuccess) => { + return defHttp.delete({ url: Api.deleteCategory, params }, { joinParamsToUrl: true }).then(() => { + handleSuccess(); + }); +}; +/** + * 批量删除 + * @param params + */ +export const batchDeleteCategory = (params, handleSuccess) => { + Modal.confirm({ + title: '确认删除', + content: '是否删除选中数据', + okText: '确认', + cancelText: '取消', + onOk: () => { + return defHttp.delete({ url: Api.deleteBatch, data: params }, { joinParamsToUrl: true }).then(() => { + handleSuccess(); + }); + }, + }); +}; +/** + * 保存或者更新 + * @param params + */ +export const saveOrUpdateDict = (params, isUpdate) => { + let url = isUpdate ? Api.edit : Api.save; + return defHttp.post({ url: url, params }); +}; +/** + * 查询全部树形节点数据 + * @param params + */ +export const loadTreeData = (params) => defHttp.get({ url: Api.loadTreeData, params }); +/** + * 查询子节点数据 + * @param params + */ +export const getChildList = (params) => defHttp.get({ url: Api.getChildList, params }); +/** + * 批量查询子节点数据 + * @param params + */ +export const getChildListBatch = (params) => defHttp.get({ url: Api.getChildListBatch, params }, { isTransformResponse: false }); diff --git a/src/views/system/category/category.data.ts b/src/views/system/category/category.data.ts new file mode 100644 index 0000000..ae7b1e3 --- /dev/null +++ b/src/views/system/category/category.data.ts @@ -0,0 +1,67 @@ +import { BasicColumn } from '/@/components/Table'; +import { FormSchema } from '/@/components/Table'; + +export const columns: BasicColumn[] = [ + { + title: '分类名称', + dataIndex: 'name', + width: 350, + align: 'left', + }, + { + title: '分类编码', + dataIndex: 'code', + }, +]; + +export const searchFormSchema: FormSchema[] = [ + { + label: '名称', + field: 'name', + component: 'JInput', + colProps: { span: 6 }, + }, + { + label: '编码', + field: 'code', + component: 'JInput', + colProps: { span: 6 }, + }, +]; + +export const formSchema: FormSchema[] = [ + { + label: '', + field: 'id', + component: 'Input', + show: false, + }, + { + label: '父级节点', + field: 'pid', + component: 'TreeSelect', + componentProps: { + //update-begin---author:wangshuai ---date:20230829 for:replaceFields已过期,使用fieldNames代替------------ + fieldNames: { + //update-end---author:wangshuai ---date:20230829 for:replaceFields已过期,使用fieldNames代替------------ + value: 'key', + }, + dropdownStyle: { + maxHeight: '50vh', + }, + getPopupContainer: () => document.body, + }, + show: ({ values }) => { + return values.pid !== '0'; + }, + dynamicDisabled: ({ values }) => { + return !!values.id; + }, + }, + { + label: '分类名称', + field: 'name', + required: true, + component: 'Input', + }, +]; diff --git a/src/views/system/category/components/CategoryModal.vue b/src/views/system/category/components/CategoryModal.vue new file mode 100644 index 0000000..e0f5835 --- /dev/null +++ b/src/views/system/category/components/CategoryModal.vue @@ -0,0 +1,107 @@ + + diff --git a/src/views/system/category/index.vue b/src/views/system/category/index.vue new file mode 100644 index 0000000..7373beb --- /dev/null +++ b/src/views/system/category/index.vue @@ -0,0 +1,298 @@ + + + + + diff --git a/src/views/system/checkRule/CheckRuleModal.vue b/src/views/system/checkRule/CheckRuleModal.vue new file mode 100644 index 0000000..466c3ba --- /dev/null +++ b/src/views/system/checkRule/CheckRuleModal.vue @@ -0,0 +1,247 @@ + + + diff --git a/src/views/system/checkRule/CheckRuleTestModal.vue b/src/views/system/checkRule/CheckRuleTestModal.vue new file mode 100644 index 0000000..06dd10c --- /dev/null +++ b/src/views/system/checkRule/CheckRuleTestModal.vue @@ -0,0 +1,55 @@ + + + + + diff --git a/src/views/system/checkRule/check.rule.api.ts b/src/views/system/checkRule/check.rule.api.ts new file mode 100644 index 0000000..c4b5391 --- /dev/null +++ b/src/views/system/checkRule/check.rule.api.ts @@ -0,0 +1,86 @@ +import { defHttp } from '/@/utils/http/axios'; +import { Modal } from 'ant-design-vue'; + +enum Api { + list = '/sys/checkRule/list', + delete = '/sys/checkRule/delete', + deleteBatch = '/sys/checkRule/deleteBatch', + exportXls = 'sys/checkRule/exportXls', + importXls = 'sys/checkRule/importExcel', + checkByCode = '/sys/checkRule/checkByCode', + save = '/sys/checkRule/add', + edit = '/sys/checkRule/edit', +} + +/** + * 导出地址 + */ +export const exportUrl = Api.exportXls; +/** + * 导入地址 + */ +export const importUrl = Api.importXls; + +/** + * 列表查询 + * @param params + */ +export const getCheckRuleList = (params) => { + return defHttp.get({ url: Api.list, params }); +}; + +/** + * 删除 + * @param params + * @param handleSuccess + */ +export const deleteCheckRule = (params, handleSuccess) => { + return defHttp.delete({ url: Api.delete, data: params }, { joinParamsToUrl: true }).then(() => { + handleSuccess(); + }); +}; + +/** + * 批量删除 + * @param params + */ +export const batchDeleteCheckRule = (params, handleSuccess) => { + Modal.confirm({ + title: '确认删除', + content: '是否删除选中数据', + okText: '确认', + cancelText: '取消', + onOk: () => { + return defHttp.delete({ url: Api.deleteBatch, data: params }, { joinParamsToUrl: true }).then(() => { + handleSuccess(); + }); + }, + }); +}; + +/** + * 根据编码校验规则code,校验传入的值是否合法 + * @param ruleCode + * @param value + */ +export const validateCheckRule = (ruleCode, value) => { + value = encodeURIComponent(value); + let params = { ruleCode, value }; + return defHttp.get({ url: Api.checkByCode, params }, { isTransformResponse: false }); +}; + +/** + * 保存 + * @param params + */ +export const saveCheckRule = (params) => { + return defHttp.post({ url: Api.save, params }); +}; + +/** + * 更新 + * @param params + */ +export const updateCheckRule = (params) => { + return defHttp.put({ url: Api.edit, params }); +}; diff --git a/src/views/system/checkRule/check.rule.data.ts b/src/views/system/checkRule/check.rule.data.ts new file mode 100644 index 0000000..b7da750 --- /dev/null +++ b/src/views/system/checkRule/check.rule.data.ts @@ -0,0 +1,152 @@ +import { BasicColumn, FormSchema } from '/@/components/Table'; +import { render } from '/@/utils/common/renderUtils'; +import { duplicateCheckDelay } from '/@/views/system/user/user.api'; +import { validateCheckRule } from '/@/views/system/checkRule/check.rule.api'; +import { array } from 'vue-types'; + +export const columns: BasicColumn[] = [ + { + title: '规则名称', + dataIndex: 'ruleName', + width: 200, + align: 'center', + }, + { + title: '规则编码', + dataIndex: 'ruleCode', + width: 200, + align: 'center', + }, + { + title: '规则描述', + dataIndex: 'ruleDescription', + width: 300, + align: 'center', + customRender: function ({ text }) { + return render.renderTip(text, 30); + }, + }, +]; + +export const searchFormSchema: FormSchema[] = [ + { + field: 'ruleName', + label: '规则名称', + component: 'Input', + colProps: { span: 6 }, + }, + { + field: 'ruleCode', + label: '规则编码', + component: 'Input', + colProps: { span: 6 }, + }, +]; + +export const formSchema: FormSchema[] = [ + { + label: '', + field: 'id', + component: 'Input', + show: false, + }, + { + field: 'ruleName', + label: '规则名称', + component: 'Input', + required: true, + colProps: { span: 24 }, + }, + { + field: 'ruleCode', + label: '规则编码', + component: 'Input', + colProps: { span: 24 }, + dynamicDisabled: ({ values }) => { + return !!values.id; + }, + dynamicRules: ({ model }) => { + return [ + { + required: true, + validator: (_, value) => { + return new Promise((resolve, reject) => { + if (!value) { + return reject('请输入规则编码!'); + } + let params = { + tableName: 'sys_check_rule', + fieldName: 'rule_code', + fieldVal: value, + dataId: model.id, + }; + duplicateCheckDelay(params) + .then((res) => { + res.success ? resolve() : reject('规则编码已存在!'); + }) + .catch((err) => { + reject(err.message || '校验失败'); + }); + }); + }, + }, + ]; + }, + }, + { + field: 'ruleDescription', + label: '规则描述', + colProps: { span: 24 }, + component: 'InputTextArea', + componentProps: { + placeholder: '请输入规则描述', + rows: 2, + }, + }, +]; + +export const checkRuleInput: FormSchema[] = [ + { + label: '123', + field: 'ruleCode', + component: 'Input', + show: false, + }, + { + field: 'testValue', + label: '需要测试的值:', + component: 'Input', + componentProps: ({ formModel }) => { + return { + onChange: (e) => { + formModel.testValue = e.target.value; + }, + }; + }, + dynamicRules: ({ model }) => { + const { ruleCode } = model; + return [ + { + required: false, + validator: (_, value) => { + return new Promise((resolve, reject) => { + if (ruleCode && value) { + /*console.log({ruleCode,value})*/ + validateCheckRule(ruleCode, value) + .then((res) => { + //console.log(1233, res) + res['success'] ? resolve() : reject(res['message']); + }) + .catch((err) => { + reject(err.message || err); + }); + } else { + resolve(); + } + }); + }, + }, + ]; + }, + }, +]; diff --git a/src/views/system/checkRule/index.vue b/src/views/system/checkRule/index.vue new file mode 100644 index 0000000..9dbf249 --- /dev/null +++ b/src/views/system/checkRule/index.vue @@ -0,0 +1,150 @@ + + + diff --git a/src/views/system/depart/components/DepartDataRuleDrawer.vue b/src/views/system/depart/components/DepartDataRuleDrawer.vue new file mode 100644 index 0000000..3427872 --- /dev/null +++ b/src/views/system/depart/components/DepartDataRuleDrawer.vue @@ -0,0 +1,78 @@ + + + diff --git a/src/views/system/depart/components/DepartFormModal.vue b/src/views/system/depart/components/DepartFormModal.vue new file mode 100644 index 0000000..7376154 --- /dev/null +++ b/src/views/system/depart/components/DepartFormModal.vue @@ -0,0 +1,92 @@ + + + diff --git a/src/views/system/depart/components/DepartFormTab.vue b/src/views/system/depart/components/DepartFormTab.vue new file mode 100644 index 0000000..23cc921 --- /dev/null +++ b/src/views/system/depart/components/DepartFormTab.vue @@ -0,0 +1,128 @@ + + + + diff --git a/src/views/system/depart/components/DepartLeftTree.vue b/src/views/system/depart/components/DepartLeftTree.vue new file mode 100644 index 0000000..7d3785f --- /dev/null +++ b/src/views/system/depart/components/DepartLeftTree.vue @@ -0,0 +1,338 @@ + + + diff --git a/src/views/system/depart/components/DepartRuleTab.vue b/src/views/system/depart/components/DepartRuleTab.vue new file mode 100644 index 0000000..05878e3 --- /dev/null +++ b/src/views/system/depart/components/DepartRuleTab.vue @@ -0,0 +1,273 @@ + + + + + diff --git a/src/views/system/depart/depart.api.ts b/src/views/system/depart/depart.api.ts new file mode 100644 index 0000000..f224f49 --- /dev/null +++ b/src/views/system/depart/depart.api.ts @@ -0,0 +1,122 @@ +import { unref } from 'vue'; +import { defHttp } from '/@/utils/http/axios'; +import { useMessage } from '/@/hooks/web/useMessage'; + +const { createConfirm } = useMessage(); + +export enum Api { + queryDepartTreeSync = '/sys/sysDepart/queryDepartTreeSync', + save = '/sys/sysDepart/add', + edit = '/sys/sysDepart/edit', + delete = '/sys/sysDepart/delete', + deleteBatch = '/sys/sysDepart/deleteBatch', + exportXlsUrl = '/sys/sysDepart/exportXls', + importExcelUrl = '/sys/sysDepart/importExcel', + + roleQueryTreeList = '/sys/role/queryTreeList', + queryDepartPermission = '/sys/permission/queryDepartPermission', + saveDepartPermission = '/sys/permission/saveDepartPermission', + + dataRule = '/sys/sysDepartPermission/datarule', + + getCurrentUserDeparts = '/sys/user/getCurrentUserDeparts', + selectDepart = '/sys/selectDepart', + getUpdateDepartInfo = '/sys/user/getUpdateDepartInfo', + doUpdateDepartInfo = '/sys/user/doUpdateDepartInfo', + changeDepartChargePerson = '/sys/user/changeDepartChargePerson', +} + +/** + * 获取部门树列表 + */ +export const queryDepartTreeSync = (params?) => defHttp.get({ url: Api.queryDepartTreeSync, params }); + +/** + * 保存或者更新部门角色 + */ +export const saveOrUpdateDepart = (params, isUpdate) => { + if (isUpdate) { + return defHttp.put({ url: Api.edit, params }); + } else { + return defHttp.post({ url: Api.save, params }); + } +}; + +/** + * 批量删除部门角色 + */ +export const deleteBatchDepart = (params, confirm = false) => { + return new Promise((resolve, reject) => { + const doDelete = () => { + resolve(defHttp.delete({ url: Api.deleteBatch, params }, { joinParamsToUrl: true })); + }; + if (confirm) { + createConfirm({ + iconType: 'warning', + title: '删除', + content: '确定要删除吗?', + onOk: () => doDelete(), + onCancel: () => reject(), + }); + } else { + doDelete(); + } + }); +}; + +/** + * 获取权限树列表 + */ +export const queryRoleTreeList = (params?) => defHttp.get({ url: Api.roleQueryTreeList, params }); +/** + * 查询部门权限 + */ +export const queryDepartPermission = (params?) => defHttp.get({ url: Api.queryDepartPermission, params }); +/** + * 保存部门权限 + */ +export const saveDepartPermission = (params) => defHttp.post({ url: Api.saveDepartPermission, params }); + +/** + * 查询部门数据权限列表 + */ +export const queryDepartDataRule = (functionId, departId, params?) => { + let url = `${Api.dataRule}/${unref(functionId)}/${unref(departId)}`; + return defHttp.get({ url, params }); +}; +/** + * 保存部门数据权限 + */ +export const saveDepartDataRule = (params) => defHttp.post({ url: Api.dataRule, params }); +/** + * 获取登录用户部门信息 + */ +export const getUserDeparts = (params?) => defHttp.get({ url: Api.getCurrentUserDeparts, params }); +/** + * 切换选择部门 + */ +export const selectDepart = (params?) => defHttp.put({ url: Api.selectDepart, params }); + +/** + * 编辑部门前获取部门相关信息 + * @param id + */ +export const getUpdateDepartInfo = (id) => defHttp.get({ url: Api.getUpdateDepartInfo, params: {id} }); + +/** + * 编辑部门 + * @param params + */ +export const doUpdateDepartInfo = (params) => defHttp.put({ url: Api.doUpdateDepartInfo, params }); + +/** + * 删除部门 + * @param id + */ +export const deleteDepart = (id) => defHttp.delete({ url: Api.delete, params:{ id } }, { joinParamsToUrl: true }); + +/** + * 设置负责人 取消负责人 + * @param params + */ +export const changeDepartChargePerson = (params) => defHttp.put({ url: Api.changeDepartChargePerson, params }); diff --git a/src/views/system/depart/depart.data.ts b/src/views/system/depart/depart.data.ts new file mode 100644 index 0000000..4fda8b5 --- /dev/null +++ b/src/views/system/depart/depart.data.ts @@ -0,0 +1,96 @@ +import { FormSchema } from '/@/components/Form'; + +// 部门基础表单 +export function useBasicFormSchema() { + const basicFormSchema: FormSchema[] = [ + { + field: 'departName', + label: '机构名称', + component: 'Input', + componentProps: { + placeholder: '请输入机构/部门名称', + }, + rules: [{ required: true, message: '机构名称不能为空' }], + }, + { + field: 'parentId', + label: '上级部门', + component: 'TreeSelect', + componentProps: { + treeData: [], + placeholder: '无', + dropdownStyle: { maxHeight: '200px', overflow: 'auto' }, + }, + }, + { + field: 'orgCode', + label: '机构编码', + component: 'Input', + componentProps: { + placeholder: '请输入机构编码', + }, + }, + { + field: 'orgCategory', + label: '机构类型', + component: 'RadioButtonGroup', + componentProps: { options: [] }, + }, + { + field: 'departOrder', + label: '排序', + component: 'InputNumber', + componentProps: {}, + }, + { + field: 'mobile', + label: '电话', + component: 'Input', + componentProps: { + placeholder: '请输入电话', + }, + }, + { + field: 'fax', + label: '传真', + component: 'Input', + componentProps: { + placeholder: '请输入传真', + }, + }, + { + field: 'address', + label: '地址', + component: 'Input', + componentProps: { + placeholder: '请输入地址', + }, + }, + { + field: 'memo', + label: '备注', + component: 'InputTextArea', + componentProps: { + placeholder: '请输入备注', + }, + }, + { + field: 'id', + label: 'ID', + component: 'Input', + show: false, + }, + ]; + return { basicFormSchema }; +} + +// 机构类型选项 +export const orgCategoryOptions = { + // 一级部门 + root: [{ value: '1', label: '公司' }], + // 子级部门 + child: [ + { value: '2', label: '部门' }, + { value: '3', label: '岗位' }, + ], +}; diff --git a/src/views/system/depart/index.less b/src/views/system/depart/index.less new file mode 100644 index 0000000..67e0e08 --- /dev/null +++ b/src/views/system/depart/index.less @@ -0,0 +1,14 @@ +//noinspection LessUnresolvedVariable +@prefix-cls: ~'@{namespace}-depart-manage'; + +.@{prefix-cls} { + // update-begin-author:liusq date:20230625 for: [issues/563]暗色主题部分失效 + background: @component-background; + // update-end-author:liusq date:20230625 for: [issues/563]暗色主题部分失效 + + &--box { + .ant-tabs-nav { + padding: 0 20px; + } + } +} diff --git a/src/views/system/depart/index.vue b/src/views/system/depart/index.vue new file mode 100644 index 0000000..406347f --- /dev/null +++ b/src/views/system/depart/index.vue @@ -0,0 +1,63 @@ + + + + + diff --git a/src/views/system/departUser/components/DepartBaseInfoTab.vue b/src/views/system/departUser/components/DepartBaseInfoTab.vue new file mode 100644 index 0000000..911319f --- /dev/null +++ b/src/views/system/departUser/components/DepartBaseInfoTab.vue @@ -0,0 +1,40 @@ + + + diff --git a/src/views/system/departUser/components/DepartRoleAuthDrawer.vue b/src/views/system/departUser/components/DepartRoleAuthDrawer.vue new file mode 100644 index 0000000..7a8e30a --- /dev/null +++ b/src/views/system/departUser/components/DepartRoleAuthDrawer.vue @@ -0,0 +1,297 @@ + + + + diff --git a/src/views/system/departUser/components/DepartRoleDataRuleDrawer.vue b/src/views/system/departUser/components/DepartRoleDataRuleDrawer.vue new file mode 100644 index 0000000..04f2e45 --- /dev/null +++ b/src/views/system/departUser/components/DepartRoleDataRuleDrawer.vue @@ -0,0 +1,82 @@ + + + diff --git a/src/views/system/departUser/components/DepartRoleInfoTab.vue b/src/views/system/departUser/components/DepartRoleInfoTab.vue new file mode 100644 index 0000000..b224139 --- /dev/null +++ b/src/views/system/departUser/components/DepartRoleInfoTab.vue @@ -0,0 +1,205 @@ + + + diff --git a/src/views/system/departUser/components/DepartRoleModal.vue b/src/views/system/departUser/components/DepartRoleModal.vue new file mode 100644 index 0000000..4eec504 --- /dev/null +++ b/src/views/system/departUser/components/DepartRoleModal.vue @@ -0,0 +1,63 @@ + + + diff --git a/src/views/system/departUser/components/DepartRoleUserAuthDrawer.vue b/src/views/system/departUser/components/DepartRoleUserAuthDrawer.vue new file mode 100644 index 0000000..78dbc1b --- /dev/null +++ b/src/views/system/departUser/components/DepartRoleUserAuthDrawer.vue @@ -0,0 +1,91 @@ + + + diff --git a/src/views/system/departUser/components/DepartTree.vue b/src/views/system/departUser/components/DepartTree.vue new file mode 100644 index 0000000..5a150a8 --- /dev/null +++ b/src/views/system/departUser/components/DepartTree.vue @@ -0,0 +1,259 @@ + + + + diff --git a/src/views/system/departUser/components/DepartUserInfoTab.vue b/src/views/system/departUser/components/DepartUserInfoTab.vue new file mode 100644 index 0000000..2a36712 --- /dev/null +++ b/src/views/system/departUser/components/DepartUserInfoTab.vue @@ -0,0 +1,240 @@ + + + diff --git a/src/views/system/departUser/depart.user.api.ts b/src/views/system/departUser/depart.user.api.ts new file mode 100644 index 0000000..d5a37ed --- /dev/null +++ b/src/views/system/departUser/depart.user.api.ts @@ -0,0 +1,159 @@ +import { unref } from 'vue'; +import { defHttp } from '/@/utils/http/axios'; +import { useMessage } from '/@/hooks/web/useMessage'; + +const { createConfirm } = useMessage(); + +enum Api { + treeList = '/sys/sysDepart/queryMyDeptTreeList', + queryIdTree = '/sys/sysDepart/queryIdTree', + searchBy = '/sys/sysDepart/searchBy', +} + +// 部门用户API +enum DepartUserApi { + list = '/sys/user/departUserList', + link = '/sys/user/editSysDepartWithUser', + unlink = '/sys/user/deleteUserInDepartBatch', +} + +// 部门角色API +enum DepartRoleApi { + list = '/sys/sysDepartRole/list', + deleteBatch = '/sys/sysDepartRole/deleteBatch', + save = '/sys/sysDepartRole/add', + edit = '/sys/sysDepartRole/edit', + queryTreeListForDeptRole = '/sys/sysDepartPermission/queryTreeListForDeptRole', + queryDeptRolePermission = '/sys/sysDepartPermission/queryDeptRolePermission', + saveDeptRolePermission = '/sys/sysDepartPermission/saveDeptRolePermission', + dataRule = '/sys/sysDepartRole/datarule', + getDeptRoleList = '/sys/sysDepartRole/getDeptRoleList', + getDeptRoleByUserId = '/sys/sysDepartRole/getDeptRoleByUserId', + saveDeptRoleUser = '/sys/sysDepartRole/deptRoleUserAdd', +} + +/** + * 获取部门树列表 + */ +export const queryMyDepartTreeList = (params?) => defHttp.get({ url: Api.treeList, params }, { isTransformResponse: false }); + +/** + * 查询数据,以树结构形式加载所有部门的名称 + */ +export const queryIdTree = (params?) => defHttp.get({ url: Api.queryIdTree, params }); + +/** + * 根据关键字搜索部门 + */ +export const searchByKeywords = (params) => defHttp.get({ url: Api.searchBy, params }); + +/** + * 查询部门下的用户信息 + */ +export const departUserList = (params) => defHttp.get({ url: DepartUserApi.list, params }); + +/** + * 批量添加部门和用户的关联关系 + * + * @param departId 部门ID + * @param userIdList 用户ID列表 + */ +export const linkDepartUserBatch = (departId: string, userIdList: string[]) => + defHttp.post({ url: DepartUserApi.link, params: { depId: departId, userIdList } }); + +/** + * 批量取消部门和用户的关联关系 + */ +export const unlinkDepartUserBatch = (params, confirm = false) => { + return new Promise((resolve, reject) => { + const doDelete = () => { + resolve(defHttp.delete({ url: DepartUserApi.unlink, params }, { joinParamsToUrl: true })); + }; + if (confirm) { + createConfirm({ + iconType: 'warning', + title: '取消关联', + content: '确定要取消关联吗?', + onOk: () => doDelete(), + onCancel: () => reject(), + }); + } else { + doDelete(); + } + }); +}; + +/** + * 查询部门角色信息 + */ +export const departRoleList = (params) => defHttp.get({ url: DepartRoleApi.list, params }); + +/** + * 保存或者更新部门角色 + */ +export const saveOrUpdateDepartRole = (params, isUpdate) => { + if (isUpdate) { + return defHttp.put({ url: DepartRoleApi.edit, params }); + } else { + return defHttp.post({ url: DepartRoleApi.save, params }); + } +}; + +/** + * 批量删除部门角色 + */ +export const deleteBatchDepartRole = (params, confirm = false) => { + return new Promise((resolve, reject) => { + const doDelete = () => { + resolve(defHttp.delete({ url: DepartRoleApi.deleteBatch, params }, { joinParamsToUrl: true })); + }; + if (confirm) { + createConfirm({ + iconType: 'warning', + title: '删除', + content: '确定要删除吗?', + onOk: () => doDelete(), + onCancel: () => reject(), + }); + } else { + doDelete(); + } + }); +}; + +/** + * 用户角色授权功能,查询菜单权限树 + */ +export const queryTreeListForDeptRole = (params) => defHttp.get({ url: DepartRoleApi.queryTreeListForDeptRole, params }); +/** + * 查询角色授权 + */ +export const queryDeptRolePermission = (params) => defHttp.get({ url: DepartRoleApi.queryDeptRolePermission, params }); +/** + * 保存角色授权 + */ +export const saveDeptRolePermission = (params) => defHttp.post({ url: DepartRoleApi.saveDeptRolePermission, params }); + +/** + * 查询部门角色数据权限列表 + */ +export const queryDepartRoleDataRule = (functionId, departId, roleId, params?) => { + let url = `${DepartRoleApi.dataRule}/${unref(functionId)}/${unref(departId)}/${unref(roleId)}`; + return defHttp.get({ url, params }); +}; +/** + * 保存部门角色数据权限 + */ +export const saveDepartRoleDataRule = (params) => defHttp.post({ url: DepartRoleApi.dataRule, params }); +/** + * 查询部门角色用户授权 + */ +export const queryDepartRoleUserList = (params) => defHttp.get({ url: DepartRoleApi.getDeptRoleList, params }); +/** + * 根据 userId 查询部门角色用户授权 + */ +export const queryDepartRoleByUserId = (params) => defHttp.get({ url: DepartRoleApi.getDeptRoleByUserId, params }); +/** + * 保存部门角色用户授权 + */ +export const saveDepartRoleUser = (params) => defHttp.post({ url: DepartRoleApi.saveDeptRoleUser, params }); diff --git a/src/views/system/departUser/depart.user.data.ts b/src/views/system/departUser/depart.user.data.ts new file mode 100644 index 0000000..880fc18 --- /dev/null +++ b/src/views/system/departUser/depart.user.data.ts @@ -0,0 +1,195 @@ +import { Ref } from 'vue'; +import { duplicateCheckDelay } from '/@/views/system/user/user.api'; +import { BasicColumn, FormSchema } from '/@/components/Table'; +import { DescItem } from '/@/components/Description'; +import { findTree } from '/@/utils/common/compUtils'; + +// 用户信息 columns +export const userInfoColumns: BasicColumn[] = [ + { + title: '用户账号', + dataIndex: 'username', + width: 150, + }, + { + title: '用户名称', + dataIndex: 'realname', + width: 180, + }, + { + title: '部门', + dataIndex: 'orgCode', + width: 200, + }, + { + title: '性别', + dataIndex: 'sex_dictText', + width: 80, + }, + { + title: '电话', + dataIndex: 'phone', + width: 120, + }, +]; + +// 用户信息查询条件表单 +export const userInfoSearchFormSchema: FormSchema[] = [ + { + field: 'username', + label: '用户账号', + component: 'Input', + }, +]; + +// 部门角色 columns +export const departRoleColumns: BasicColumn[] = [ + { + title: '部门角色名称', + dataIndex: 'roleName', + width: 100, + }, + { + title: '部门角色编码', + dataIndex: 'roleCode', + width: 100, + }, + { + title: '部门', + dataIndex: 'departId_dictText', + width: 100, + }, + { + title: '备注', + dataIndex: 'description', + width: 100, + }, +]; + +// 部门角色查询条件表单 +export const departRoleSearchFormSchema: FormSchema[] = [ + { + field: 'roleName', + label: '部门角色名称', + component: 'Input', + }, +]; + +// 部门角色弹窗form表单 +export const departRoleModalFormSchema: FormSchema[] = [ + { + label: 'id', + field: 'id', + component: 'Input', + show: false, + }, + { + field: 'roleName', + label: '部门角色名称', + component: 'Input', + rules: [ + { required: true, message: '部门角色名称不能为空!' }, + { min: 2, max: 30, message: '长度在 2 到 30 个字符', trigger: 'blur' }, + ], + }, + { + field: 'roleCode', + label: '部门角色编码', + component: 'Input', + dynamicDisabled: ({ values }) => { + return !!values.id; + }, + dynamicRules: ({ model }) => { + return [ + { required: true, message: '部门角色编码不能为空!' }, + { min: 0, max: 64, message: '长度不能超过 64 个字符', trigger: 'blur' }, + { + validator: (_, value) => { + if (/[\u4E00-\u9FA5]/g.test(value)) { + return Promise.reject('部门角色编码不可输入汉字!'); + } + return new Promise((resolve, reject) => { + let params = { + tableName: 'sys_depart_role', + fieldName: 'role_code', + fieldVal: value, + dataId: model.id, + }; + duplicateCheckDelay(params) + .then((res) => { + res.success ? resolve() : reject(res.message || '校验失败'); + }) + .catch((err) => { + reject(err.message || '验证失败'); + }); + }); + }, + }, + ]; + }, + }, + { + field: 'description', + label: '描述', + component: 'Input', + rules: [{ min: 0, max: 126, message: '长度不能超过 126 个字符', trigger: 'blur' }], + }, +]; + +// 基本信息form +export function useBaseInfoForm(treeData: Ref) { + const descItems: DescItem[] = [ + { + field: 'departName', + label: '机构名称', + }, + { + field: 'parentId', + label: '上级部门', + render(val) { + if (val) { + let data = findTree(treeData.value, (item) => item.key == val); + return data?.title ?? val; + } + return val; + }, + }, + { + field: 'orgCode', + label: '机构编码', + }, + { + field: 'orgCategory', + label: '机构类型', + render(val) { + if (val === '1') { + return '公司'; + } else if (val === '2') { + return '部门'; + } else if (val === '3') { + return '岗位'; + } + return val; + }, + }, + { + field: 'departOrder', + label: '排序', + }, + + { + field: 'mobile', + label: '手机号', + }, + { + field: 'address', + label: '地址', + }, + { + field: 'memo', + label: '备注', + }, + ]; + + return { descItems }; +} diff --git a/src/views/system/departUser/index.less b/src/views/system/departUser/index.less new file mode 100644 index 0000000..df2d981 --- /dev/null +++ b/src/views/system/departUser/index.less @@ -0,0 +1,48 @@ +@prefix-cls: ~'@{namespace}-depart-user'; + +.@{prefix-cls} { + &--tree-search { + width: 100%; + margin: 10px 0 20px; + } + + &--base-info-form { + @media (min-width: 576px) { + .no-border { + border: 0; + box-shadow: none; + } + + .ant-select.ant-select-disabled { + .ant-select-selector { + border: 0; + color: black; + background-color: transparent; + } + + .ant-select-selector, + .ant-select-selection-item { + cursor: text !important; + user-select: initial !important; + } + + .ant-select-selection-search, + .ant-select-arrow { + display: none; + } + } + } + } +} + +// 夜间模式样式兼容 +[data-theme='dark'] .@{prefix-cls} { + &--base-info-form { + .ant-select.ant-select-disabled { + .ant-select-selector { + color: #c9d1d9; + background-color: transparent; + } + } + } +} diff --git a/src/views/system/departUser/index.vue b/src/views/system/departUser/index.vue new file mode 100644 index 0000000..c88df58 --- /dev/null +++ b/src/views/system/departUser/index.vue @@ -0,0 +1,57 @@ + + + + + diff --git a/src/views/system/dict/components/DictItemList.vue b/src/views/system/dict/components/DictItemList.vue new file mode 100644 index 0000000..1ea5e43 --- /dev/null +++ b/src/views/system/dict/components/DictItemList.vue @@ -0,0 +1,140 @@ + + + diff --git a/src/views/system/dict/components/DictItemModal.vue b/src/views/system/dict/components/DictItemModal.vue new file mode 100644 index 0000000..b80ec77 --- /dev/null +++ b/src/views/system/dict/components/DictItemModal.vue @@ -0,0 +1,126 @@ + + + diff --git a/src/views/system/dict/components/DictModal.vue b/src/views/system/dict/components/DictModal.vue new file mode 100644 index 0000000..e8f0808 --- /dev/null +++ b/src/views/system/dict/components/DictModal.vue @@ -0,0 +1,52 @@ + + diff --git a/src/views/system/dict/components/DictRecycleBinModal.vue b/src/views/system/dict/components/DictRecycleBinModal.vue new file mode 100644 index 0000000..e9f8c76 --- /dev/null +++ b/src/views/system/dict/components/DictRecycleBinModal.vue @@ -0,0 +1,141 @@ + + diff --git a/src/views/system/dict/dict.api.ts b/src/views/system/dict/dict.api.ts new file mode 100644 index 0000000..36fe729 --- /dev/null +++ b/src/views/system/dict/dict.api.ts @@ -0,0 +1,156 @@ +import { defHttp } from '/@/utils/http/axios'; +import { Modal } from 'ant-design-vue'; +enum Api { + list = '/sys/dict/list', + save = '/sys/dict/add', + edit = '/sys/dict/edit', + duplicateCheck = '/sys/duplicate/check', + deleteDict = '/sys/dict/delete', + deleteBatch = '/sys/dict/deleteBatch', + importExcel = '/sys/dict/importExcel', + exportXls = '/sys/dict/exportXls', + recycleBinList = '/sys/dict/deleteList', + putRecycleBin = '/sys/dict/back', + batchPutRecycleBin = '/sys/dict/putRecycleBin', + batchDeleteRecycleBin = '/sys/dict/deleteRecycleBin', + deleteRecycleBin = '/sys/dict/deletePhysic', + itemList = '/sys/dictItem/list', + deleteItem = '/sys/dictItem/delete', + itemSave = '/sys/dictItem/add', + itemEdit = '/sys/dictItem/edit', + dictItemCheck = '/sys/dictItem/dictItemCheck', + refreshCache = '/sys/dict/refleshCache', + queryAllDictItems = '/sys/dict/queryAllDictItems', +} +/** + * 导出api + * @param params + */ +export const getExportUrl = Api.exportXls; +/** + * 导入api + * @param params + */ +export const getImportUrl = Api.importExcel; +/** + * 字典列表接口 + * @param params + */ +export const list = (params) => defHttp.get({ url: Api.list, params }); +/** + * 删除字典 + */ +export const deleteDict = (params, handleSuccess) => { + return defHttp.delete({ url: Api.deleteDict, params }, { joinParamsToUrl: true }).then(() => { + handleSuccess(); + }); +}; +/** + * 批量删除字典 + * @param params + */ +export const batchDeleteDict = (params, handleSuccess) => { + Modal.confirm({ + title: '确认删除', + content: '是否删除选中数据', + okText: '确认', + cancelText: '取消', + onOk: () => { + return defHttp.delete({ url: Api.deleteBatch, data: params }, { joinParamsToUrl: true }).then(() => { + handleSuccess(); + }); + }, + }); +}; +/** + * 保存或者更新字典 + * @param params + */ +export const saveOrUpdateDict = (params, isUpdate) => { + let url = isUpdate ? Api.edit : Api.save; + return defHttp.post({ url: url, params }); +}; +/** + * 唯一校验 + * @param params + */ +export const duplicateCheck = (params) => defHttp.get({ url: Api.duplicateCheck, params }, { isTransformResponse: false }); +/** + * 字典回收站列表 + * @param params + */ +export const getRecycleBinList = (params) => defHttp.get({ url: Api.recycleBinList, params }); + +/** + * 回收站批量还原 + * @param params + */ +export const batchPutRecycleBin = (params, handleSuccess) => { + return defHttp.put({ url: Api.batchPutRecycleBin, params}).then(() => { + handleSuccess(); + }); +}; +/** + * 回收站还原 + * @param params + */ +export const putRecycleBin = (id, handleSuccess) => { + return defHttp.put({ url: Api.putRecycleBin + `/${id}` }).then(() => { + handleSuccess(); + }); +}; +/** + * 回收站批量删除 + * @param params + */ +export const batchDeleteRecycleBin = (params, handleSuccess) => { + return defHttp.delete({ url: `${Api.batchDeleteRecycleBin}?ids=${params.ids}`}).then(() => { + handleSuccess(); + }); +}; +/** + * 回收站删除 + * @param params + */ +export const deleteRecycleBin = (id, handleSuccess) => { + return defHttp.delete({ url: Api.deleteRecycleBin + `/${id}` }).then(() => { + handleSuccess(); + }); +}; +/** + * 字典配置列表 + * @param params + */ +export const itemList = (params) => defHttp.get({ url: Api.itemList, params }); +/** + * 字典配置删除 + * @param params + */ +export const deleteItem = (params, handleSuccess) => { + return defHttp.delete({ url: Api.deleteItem, params }, { joinParamsToUrl: true }).then(() => { + handleSuccess(); + }); +}; +/** + * 保存或者更新字典配置 + * @param params + */ +export const saveOrUpdateDictItem = (params, isUpdate) => { + let url = isUpdate ? Api.itemEdit : Api.itemSave; + return defHttp.post({ url: url, params }); +}; +/** + * 校验字典数据值 + * @param params + */ +export const dictItemCheck = (params) => defHttp.get({ url: Api.dictItemCheck, params }, { isTransformResponse: false }); +/** + * 刷新字典 + * @param params + */ +export const refreshCache = () => defHttp.get({ url: Api.refreshCache }, { isTransformResponse: false }); +/** + * 获取所有字典项 + * @param params + */ +export const queryAllDictItems = () => defHttp.get({ url: Api.queryAllDictItems }, { isTransformResponse: false }); diff --git a/src/views/system/dict/dict.data.ts b/src/views/system/dict/dict.data.ts new file mode 100644 index 0000000..8e7ea97 --- /dev/null +++ b/src/views/system/dict/dict.data.ts @@ -0,0 +1,203 @@ +import { BasicColumn } from '/@/components/Table'; +import { FormSchema } from '/@/components/Table'; +import { dictItemCheck } from './dict.api'; +import { rules } from '/@/utils/helper/validator'; +import { h } from "vue"; + +export const columns: BasicColumn[] = [ + { + title: '字典名称', + dataIndex: 'dictName', + width: 240, + }, + { + title: '字典编码', + dataIndex: 'dictCode', + width: 240, + }, + { + title: '描述', + dataIndex: 'description', + // width: 120 + }, +]; + +export const recycleBincolumns: BasicColumn[] = [ + { + title: '字典名称', + dataIndex: 'dictName', + width: 120, + }, + { + title: '字典编码', + dataIndex: 'dictCode', + width: 120, + }, + { + title: '描述', + dataIndex: 'description', + width: 120, + }, +]; + +export const searchFormSchema: FormSchema[] = [ + { + label: '字典名称', + field: 'dictName', + component: 'JInput', + colProps: { span: 6 }, + }, + { + label: '字典编码', + field: 'dictCode', + component: 'JInput', + colProps: { span: 6 }, + }, +]; + +export const formSchema: FormSchema[] = [ + { + label: '', + field: 'id', + component: 'Input', + show: false, + }, + { + label: '字典名称', + field: 'dictName', + required: true, + component: 'Input', + }, + { + label: '字典编码', + field: 'dictCode', + component: 'Input', + dynamicDisabled: ({ values }) => { + return !!values.id; + }, + dynamicRules: ({ model, schema }) => rules.duplicateCheckRule('sys_dict', 'dict_code', model, schema, true), + }, + { + label: '描述', + field: 'description', + component: 'Input', + }, +]; + +export const dictItemColumns: BasicColumn[] = [ + { + title: '名称', + dataIndex: 'itemText', + width: 80, + }, + { + title: '数据值', + dataIndex: 'itemValue', + width: 80, + }, + { + title: '字典颜色', + dataIndex: 'itemColor', + width: 80, + align:'center', + customRender:({ text }) => { + return h('div', { + style: {"background": text, "width":"18px","height":"18px","border-radius":"50%","margin":"0 auto"} + }) + } + }, +]; + +export const dictItemSearchFormSchema: FormSchema[] = [ + { + label: '名称', + field: 'itemText', + component: 'Input', + }, + { + label: '状态', + field: 'status', + component: 'JDictSelectTag', + componentProps: { + dictCode: 'dict_item_status', + stringToNumber: true, + }, + }, +]; + +export const itemFormSchema: FormSchema[] = [ + { + label: '', + field: 'id', + component: 'Input', + show: false, + }, + { + label: '名称', + field: 'itemText', + required: true, + component: 'Input', + }, + { + label: '数据值', + field: 'itemValue', + component: 'Input', + dynamicRules: ({ values, model }) => { + return [ + { + required: true, + validator: (_, value) => { + if (!value) { + return Promise.reject('请输入数据值'); + } + if (new RegExp("[`~!@#$^&*()=|{}'.<>《》/?!¥()—【】‘;:”“。,、?]").test(value)) { + return Promise.reject('数据值不能包含特殊字符!'); + } + return new Promise((resolve, reject) => { + let params = { + dictId: values.dictId, + id: model.id, + itemValue: value, + }; + dictItemCheck(params) + .then((res) => { + res.success ? resolve() : reject(res.message || '校验失败'); + }) + .catch((err) => { + reject(err.message || '验证失败'); + }); + }); + }, + }, + ]; + }, + }, + { + label: '颜色值', + field: 'itemColor', + component: 'Input', + slot:'itemColor' + }, + { + label: '描述', + field: 'description', + component: 'Input', + }, + { + field: 'sortOrder', + label: '排序', + component: 'InputNumber', + defaultValue: 1, + }, + { + field: 'status', + label: '是否启用', + defaultValue: 1, + component: 'JDictSelectTag', + componentProps: { + type: 'radioButton', + dictCode: 'dict_item_status', + stringToNumber: true, + }, + }, +]; diff --git a/src/views/system/dict/index.vue b/src/views/system/dict/index.vue new file mode 100644 index 0000000..5695c45 --- /dev/null +++ b/src/views/system/dict/index.vue @@ -0,0 +1,197 @@ + + + + + diff --git a/src/views/system/examples/demo/DemoModal.vue b/src/views/system/examples/demo/DemoModal.vue new file mode 100644 index 0000000..53121c6 --- /dev/null +++ b/src/views/system/examples/demo/DemoModal.vue @@ -0,0 +1,69 @@ + + diff --git a/src/views/system/examples/demo/demo.api.ts b/src/views/system/examples/demo/demo.api.ts new file mode 100644 index 0000000..1cde92b --- /dev/null +++ b/src/views/system/examples/demo/demo.api.ts @@ -0,0 +1,73 @@ +import { defHttp } from '/@/utils/http/axios'; +import { Modal } from 'ant-design-vue'; + +enum Api { + list = '/test/jeecgDemo/list', + save = '/test/jeecgDemo/add', + edit = '/test/jeecgDemo/edit', + get = '/test/jeecgDemo/queryById', + delete = '/test/jeecgDemo/delete', + deleteBatch = '/test/jeecgDemo/deleteBatch', + exportXls = '/test/jeecgDemo/exportXls', + importExcel = '/test/jeecgDemo/importExcel', +} +/** + * 导出api + */ +export const getExportUrl = Api.exportXls; +/** + * 导入api + */ +export const getImportUrl = Api.importExcel; +/** + * 查询示例列表 + * @param params + */ +export const getDemoList = (params) => { + return defHttp.get({ url: Api.list, params }); +}; + +/** + * 保存或者更新示例 + * @param params + */ +export const saveOrUpdateDemo = (params, isUpdate) => { + let url = isUpdate ? Api.edit : Api.save; + return defHttp.post({ url: url, params }); +}; + +/** + * 查询示例详情 + * @param params + */ +export const getDemoById = (params) => { + return defHttp.get({ url: Api.get, params }); +}; + +/** + * 删除示例 + * @param params + */ +export const deleteDemo = (params, handleSuccess) => { + return defHttp.delete({ url: Api.delete, data: params }, { joinParamsToUrl: true }).then(() => { + handleSuccess(); + }); +}; + +/** + * 批量删除示例 + * @param params + */ +export const batchDeleteDemo = (params, handleSuccess) => { + Modal.confirm({ + title: '确认删除', + content: '是否删除选中数据', + okText: '确认', + cancelText: '取消', + onOk: () => { + return defHttp.delete({ url: Api.deleteBatch, data: params }, { joinParamsToUrl: true }).then(() => { + handleSuccess(); + }); + }, + }); +}; diff --git a/src/views/system/examples/demo/demo.data.ts b/src/views/system/examples/demo/demo.data.ts new file mode 100644 index 0000000..d63f96d --- /dev/null +++ b/src/views/system/examples/demo/demo.data.ts @@ -0,0 +1,223 @@ +import { BasicColumn } from '/@/components/Table'; +import { FormSchema } from '/@/components/Table'; +import { render } from '/@/utils/common/renderUtils'; + +export const columns: BasicColumn[] = [ + { + title: '姓名', + dataIndex: 'name', + width: 170, + align: 'left', + resizable: true, + sorter: { + multiple:1 + } + }, + { + title: '关键词', + dataIndex: 'keyWord', + width: 130, + resizable: true, + }, + { + title: '打卡时间', + dataIndex: 'punchTime', + width: 140, + resizable: true, + }, + { + title: '工资', + dataIndex: 'salaryMoney', + width: 140, + resizable: true, + sorter: { + multiple: 2 + } + }, + { + title: '奖金', + dataIndex: 'bonusMoney', + width: 140, + resizable: true, + }, + { + title: '性别', + dataIndex: 'sex', + sorter: { + multiple: 3 + }, + customRender: ({ record }) => { + return render.renderDict(record.sex, 'sex'); + // let v = record.sex ? (record.sex == '1' ? '男' : '女') : ''; + // return h('span', v); + }, + width: 120, + resizable: true, + }, + { + title: '生日', + dataIndex: 'birthday', + width: 120, + resizable: true, + }, + { + title: '邮箱', + dataIndex: 'email', + width: 120, + resizable: true, + }, + { + title: '个人简介', + dataIndex: 'content', + width: 120, + resizable: true, + }, +]; + +export const searchFormSchema: FormSchema[] = [ + { + field: 'name', + label: '姓名', + component: 'Input', + componentProps: { + trim: true, + }, + colProps: { span: 8 }, + }, + { + field: 'birthday', + label: '生日', + component: 'RangePicker', + componentProps: { + valueType: 'Date' + }, + colProps: { span: 8 }, + }, + { + field: 'age', + label: '年龄', + component: 'Input', + slot: 'age', + colProps: { span: 8 }, + }, + { + field: 'sex', + label: '性别', + colProps: { span: 8 }, + component: 'JDictSelectTag', + componentProps: { + dictCode: 'sex', + placeholder: '请选择性别', + }, + }, +]; + +export const formSchema: FormSchema[] = [ + { + field: 'id', + label: 'id', + component: 'Input', + show: false, + }, + { + field: 'createBy', + label: 'createBy', + component: 'Input', + show: false, + }, + { + field: 'createTime', + label: 'createTime', + component: 'Input', + show: false, + }, + { + field: 'name', + label: '名字', + component: 'Input', + required: true, + componentProps: { + placeholder: '请输入名字', + }, + }, + { + field: 'keyWord', + label: '关键词', + component: 'Input', + componentProps: { + placeholder: '请输入关键词', + }, + }, + { + field: 'punchTime', + label: '打卡时间', + component: 'DatePicker', + componentProps: { + showTime: true, + valueFormat: 'YYYY-MM-DD HH:mm:ss', + placeholder: '请选择打卡时间', + }, + }, + { + field: 'salaryMoney', + label: '工资', + component: 'Input', + componentProps: { + placeholder: '请输入工资', + }, + }, + { + field: 'sex', + label: '性别', + component: 'JDictSelectTag', + defaultValue: '1', + componentProps: { + type: 'radio', + dictCode: 'sex', + placeholder: '请选择性别', + }, + }, + { + field: 'age', + label: '年龄', + component: 'InputNumber', + defaultValue: 1, + componentProps: { + placeholder: '请输入年龄', + }, + }, + { + field: 'birthday', + label: '生日', + component: 'DatePicker', + defaultValue: '', + componentProps: { + valueFormat: 'YYYY-MM-DD', + placeholder: '请选择生日', + }, + }, + { + field: 'email', + label: '邮箱', + component: 'Input', + rules: [{ required: false, type: 'email', message: '邮箱格式不正确', trigger: 'blur' }], + componentProps: { + placeholder: '请输入邮箱', + }, + }, + { + field: 'content', + label: '个人简介 - To introduce myself', + component: 'InputTextArea', + labelLength: 4, + componentProps: { + placeholder: '请输入个人简介', + }, + }, + { + field: 'updateCount', + label: '乐观锁', + show: false, + component: 'Input', + }, +]; diff --git a/src/views/system/examples/demo/index.vue b/src/views/system/examples/demo/index.vue new file mode 100644 index 0000000..bedc7a1 --- /dev/null +++ b/src/views/system/examples/demo/index.vue @@ -0,0 +1,311 @@ + + + diff --git a/src/views/system/fillRule/FillRuleModal.vue b/src/views/system/fillRule/FillRuleModal.vue new file mode 100644 index 0000000..81f824d --- /dev/null +++ b/src/views/system/fillRule/FillRuleModal.vue @@ -0,0 +1,82 @@ + + + diff --git a/src/views/system/fillRule/fill.rule.api.ts b/src/views/system/fillRule/fill.rule.api.ts new file mode 100644 index 0000000..1348a12 --- /dev/null +++ b/src/views/system/fillRule/fill.rule.api.ts @@ -0,0 +1,83 @@ +import { defHttp } from '/@/utils/http/axios'; +import { Modal } from 'ant-design-vue'; + +enum Api { + list = '/sys/fillRule/list', + test = '/sys/fillRule/testFillRule', + save = '/sys/fillRule/add', + edit = '/sys/fillRule/edit', + delete = '/sys/fillRule/delete', + deleteBatch = '/sys/fillRule/deleteBatch', + exportXls = '/sys/fillRule/exportXls', + importExcel = '/sys/fillRule/importExcel', +} + +/** + * 导出地址 + */ +export const exportUrl = Api.exportXls; +/** + * 导入地址 + */ +export const importUrl = Api.importExcel; + +/** + * 列表查询 + * @param params + */ +export const getFillRuleList = (params) => { + return defHttp.get({ url: Api.list, params }); +}; + +/** + * 删除 + * @param params + * @param handleSuccess + */ +export const deleteFillRule = (params, handleSuccess) => { + return defHttp.delete({ url: Api.delete, data: params }, { joinParamsToUrl: true }).then(() => { + handleSuccess(); + }); +}; + +/** + * 批量删除 + * @param params + */ +export const batchDeleteFillRule = (params, handleSuccess) => { + Modal.confirm({ + title: '确认删除', + content: '是否删除选中数据', + okText: '确认', + cancelText: '取消', + onOk: () => { + return defHttp.delete({ url: Api.deleteBatch, data: params }, { joinParamsToUrl: true }).then(() => { + handleSuccess(); + }); + }, + }); +}; + +/** + * 规则功能测试 + * @param params + */ +export const handleTest = (params) => { + return defHttp.get({ url: Api.test, params }, { isTransformResponse: false }); +}; + +/** + * 保存 + * @param params + */ +export const saveFillRule = (params) => { + return defHttp.post({ url: Api.save, params }); +}; + +/** + * 更新 + * @param params + */ +export const updateFillRule = (params) => { + return defHttp.put({ url: Api.edit, params }); +}; diff --git a/src/views/system/fillRule/fill.rule.data.ts b/src/views/system/fillRule/fill.rule.data.ts new file mode 100644 index 0000000..f249163 --- /dev/null +++ b/src/views/system/fillRule/fill.rule.data.ts @@ -0,0 +1,112 @@ +import { BasicColumn, FormSchema } from '/@/components/Table'; +import { duplicateCheckDelay } from '/@/views/system/user/user.api'; + +export const columns: BasicColumn[] = [ + { + title: '规则名称', + dataIndex: 'ruleName', + width: 200, + align: 'center', + }, + { + title: '规则编码', + dataIndex: 'ruleCode', + width: 200, + align: 'center', + }, + { + title: '规则实现类', + dataIndex: 'ruleClass', + width: 300, + align: 'center', + }, + { + title: '规则参数', + dataIndex: 'ruleParams', + width: 200, + align: 'center', + }, +]; + +export const searchFormSchema: FormSchema[] = [ + { + field: 'ruleName', + label: '规则名称', + component: 'Input', + colProps: { span: 6 }, + }, + { + field: 'ruleCode', + label: '规则编码', + component: 'Input', + colProps: { span: 6 }, + }, +]; + +export const formSchema: FormSchema[] = [ + { + label: '', + field: 'id', + component: 'Input', + show: false, + }, + { + field: 'ruleName', + label: '规则名称', + component: 'Input', + required: true, + colProps: { span: 24 }, + }, + { + field: 'ruleCode', + label: '规则编码', + component: 'Input', + colProps: { span: 24 }, + dynamicDisabled: ({ values }) => { + return !!values.id; + }, + dynamicRules: ({ model }) => { + return [ + { + required: true, + validator: (_, value) => { + return new Promise((resolve, reject) => { + if (!value) { + return reject('请输入规则编码!'); + } + let params = { + tableName: 'sys_fill_rule', + fieldName: 'rule_code', + fieldVal: value, + dataId: model.id, + }; + duplicateCheckDelay(params) + .then((res) => { + res.success ? resolve() : reject('规则编码已存在!'); + }) + .catch((err) => { + reject(err.message || '校验失败'); + }); + }); + }, + }, + ]; + }, + }, + { + field: 'ruleClass', + label: '规则实现类', + component: 'Input', + required: true, + colProps: { span: 24 }, + }, + { + field: 'ruleParams', + label: '规则参数', + colProps: { span: 24 }, + component: 'JAddInput', + componentProps: { + min: 0, + }, + }, +]; diff --git a/src/views/system/fillRule/index.vue b/src/views/system/fillRule/index.vue new file mode 100644 index 0000000..93d5e1c --- /dev/null +++ b/src/views/system/fillRule/index.vue @@ -0,0 +1,146 @@ + + + diff --git a/src/views/system/loginmini/MiniCodelogin.vue b/src/views/system/loginmini/MiniCodelogin.vue new file mode 100644 index 0000000..85e6c4d --- /dev/null +++ b/src/views/system/loginmini/MiniCodelogin.vue @@ -0,0 +1,165 @@ + + + + diff --git a/src/views/system/loginmini/MiniForgotpad.vue b/src/views/system/loginmini/MiniForgotpad.vue new file mode 100644 index 0000000..dda6ded --- /dev/null +++ b/src/views/system/loginmini/MiniForgotpad.vue @@ -0,0 +1,294 @@ + + + diff --git a/src/views/system/loginmini/MiniLogin.vue b/src/views/system/loginmini/MiniLogin.vue new file mode 100644 index 0000000..7501945 --- /dev/null +++ b/src/views/system/loginmini/MiniLogin.vue @@ -0,0 +1,574 @@ + + + + + + diff --git a/src/views/system/loginmini/MiniRegister.vue b/src/views/system/loginmini/MiniRegister.vue new file mode 100644 index 0000000..61a888f --- /dev/null +++ b/src/views/system/loginmini/MiniRegister.vue @@ -0,0 +1,278 @@ + + + + diff --git a/src/views/system/loginmini/OAuth2Login.vue b/src/views/system/loginmini/OAuth2Login.vue new file mode 100644 index 0000000..3ccb100 --- /dev/null +++ b/src/views/system/loginmini/OAuth2Login.vue @@ -0,0 +1,130 @@ + + + diff --git a/src/views/system/menu/DataRuleList.vue b/src/views/system/menu/DataRuleList.vue new file mode 100644 index 0000000..97ed574 --- /dev/null +++ b/src/views/system/menu/DataRuleList.vue @@ -0,0 +1,144 @@ + + + diff --git a/src/views/system/menu/DataRuleModal.vue b/src/views/system/menu/DataRuleModal.vue new file mode 100644 index 0000000..3c94a6b --- /dev/null +++ b/src/views/system/menu/DataRuleModal.vue @@ -0,0 +1,54 @@ + + diff --git a/src/views/system/menu/MenuDrawer.vue b/src/views/system/menu/MenuDrawer.vue new file mode 100644 index 0000000..6abce6d --- /dev/null +++ b/src/views/system/menu/MenuDrawer.vue @@ -0,0 +1,141 @@ + + diff --git a/src/views/system/menu/index.vue b/src/views/system/menu/index.vue new file mode 100644 index 0000000..ac3e908 --- /dev/null +++ b/src/views/system/menu/index.vue @@ -0,0 +1,275 @@ + + diff --git a/src/views/system/menu/menu.api.ts b/src/views/system/menu/menu.api.ts new file mode 100644 index 0000000..ce51569 --- /dev/null +++ b/src/views/system/menu/menu.api.ts @@ -0,0 +1,122 @@ +import { defHttp } from '/@/utils/http/axios'; +import { Modal } from 'ant-design-vue'; + +enum Api { + list = '/sys/permission/list', + save = '/sys/permission/add', + edit = '/sys/permission/edit', + delete = '/sys/permission/delete', + deleteBatch = '/sys/permission/deleteBatch', + ruleList = '/sys/permission/queryPermissionRule', + ruleSave = '/sys/permission/addPermissionRule', + ruleEdit = '/sys/permission/editPermissionRule', + ruleDelete = '/sys/permission/deletePermissionRule', + checkPermDuplication = '/sys/permission/checkPermDuplication', +} + +/** + * 列表接口 + * @param params + */ +export const list = (params) => { + return defHttp.get({ url: Api.list, params }); +} + +/** + * 删除菜单 + */ +export const deleteMenu = (params, handleSuccess) => { + return defHttp.delete({ url: Api.delete, params }, { joinParamsToUrl: true }).then(() => { + handleSuccess(); + }); +}; +/** + * 批量删除菜单 + * @param params + */ +export const batchDeleteMenu = (params, handleSuccess) => { + Modal.confirm({ + title: '确认删除', + content: '是否删除选中数据', + okText: '确认', + cancelText: '取消', + onOk: () => { + return defHttp.delete({ url: Api.deleteBatch, data: params }, { joinParamsToUrl: true }).then(() => { + handleSuccess(); + }); + }, + }); +}; +/** + * 保存或者更新菜单 + * @param params + */ +export const saveOrUpdateMenu = (params, isUpdate) => { + let url = isUpdate ? Api.edit : Api.save; + return defHttp.post({ url: url, params }); +}; +/** + * 菜单数据权限列表接口 + * @param params + */ +export const dataRuleList = (params) => defHttp.get({ url: Api.ruleList, params }); +/** + * 保存或者更新数据规则 + * @param params + */ +export const saveOrUpdateRule = (params, isUpdate) => { + let url = isUpdate ? Api.ruleEdit : Api.ruleSave; + return defHttp.post({ url: url, params }); +}; + +/** + * 删除数据权限 + */ +export const deleteRule = (params, handleSuccess) => { + return defHttp.delete({ url: Api.ruleDelete, params }, { joinParamsToUrl: true }).then(() => { + handleSuccess(); + }); +}; +/** + * 根据code获取字典数值 + * @param params + */ +export const ajaxGetDictItems = (params) => defHttp.get({ url: `/sys/dict/getDictItems/${params.code}` }); + +/** + * 唯一校验 + * @param params + */ +export const getCheckPermDuplication = (params) => defHttp.get({ url: Api.checkPermDuplication, params }, { isTransformResponse: false }); + +/** + * 校验菜单是否存在 + * @param model + * @param schema + * @param required + */ +export const checkPermDuplication=(model, schema, required?)=>{ + return [ + { + validator: (_, value) => { + if (!required) { + return Promise.resolve(); + } + if (!value && required) { + return Promise.reject(`请输入${schema.label}`); + } + return new Promise((resolve, reject) => { + getCheckPermDuplication({ + id: model.id, + url:model.url, + alwaysShow:model.alwaysShow + }).then((res) => { + res.success ? resolve() : reject(res.message || '校验失败'); + }).catch((err) => { + reject(err.message || '验证失败'); + }); + }); + }, + }, + ]; +} diff --git a/src/views/system/menu/menu.data.ts b/src/views/system/menu/menu.data.ts new file mode 100644 index 0000000..406ee3d --- /dev/null +++ b/src/views/system/menu/menu.data.ts @@ -0,0 +1,461 @@ +import { BasicColumn } from '/@/components/Table'; +import { FormSchema } from '/@/components/Table'; +import { h } from 'vue'; +import { Icon } from '/@/components/Icon'; +import { duplicateCheck } from '../user/user.api'; +import { ajaxGetDictItems ,checkPermDuplication } from './menu.api'; +import { render } from '/@/utils/common/renderUtils'; + +const isDir = (type) => type === 0; +const isMenu = (type) => type === 1; +const isButton = (type) => type === 2; + +// 定义可选择的组件类型 +export enum ComponentTypes { + Default = 'layouts/default/index', + IFrame = 'sys/iframe/FrameBlank', +} + +export const columns: BasicColumn[] = [ + { + title: '菜单名称', + dataIndex: 'name', + width: 200, + align: 'left', + }, + { + title: '菜单类型', + dataIndex: 'menuType', + width: 150, + customRender: ({ text }) => { + return render.renderDict(text, 'menu_type'); + }, + }, + { + title: '图标', + dataIndex: 'icon', + width: 50, + customRender: ({ record }) => { + return h(Icon, { icon: record.icon }); + }, + }, + { + title: '组件', + dataIndex: 'component', + align: 'left', + width: 150, + }, + { + title: '路径', + dataIndex: 'url', + align: 'left', + width: 150, + }, + { + title: '排序', + dataIndex: 'sortNo', + width: 50, + }, +]; + +export const searchFormSchema: FormSchema[] = [ + { + field: 'name', + label: '菜单名称', + component: 'Input', + colProps: { span: 8 }, + }, +]; + +export const formSchema: FormSchema[] = [ + { + label: 'id', + field: 'id', + component: 'Input', + show: false, + }, + { + field: 'menuType', + label: '菜单类型', + component: 'RadioButtonGroup', + defaultValue: 0, + componentProps: ({ formActionType, formModel }) => { + return { + options: [ + { label: '一级菜单', value: 0 }, + { label: '子菜单', value: 1 }, + { label: '按钮/权限', value: 2 }, + ], + onChange: (e) => { + const { updateSchema, clearValidate } = formActionType; + const label = isButton(e) ? '按钮/权限' : '菜单名称'; + //清除校验 + clearValidate(); + updateSchema([ + { + field: 'name', + label: label, + }, + { + field: 'url', + required: !isButton(e), + }, + ]); + //update-begin---author:wangshuai ---date:20220729 for:[VUEN-1834]只有一级菜单,才默认值,子菜单的时候,清空------------ + if (isMenu(e) && !formModel.id && (formModel.component=='layouts/default/index' || formModel.component=='layouts/RouteView')) { + formModel.component = ''; + } + //update-end---author:wangshuai ---date:20220729 for:[VUEN-1834]只有一级菜单,才默认值,子菜单的时候,清空------------ + }, + }; + }, + }, + { + field: 'name', + label: '菜单名称', + component: 'Input', + required: true, + }, + { + field: 'parentId', + label: '上级菜单', + component: 'TreeSelect', + required: true, + componentProps: { + //update-begin---author:wangshuai ---date:20230829 for:replaceFields已过期,使用fieldNames代替------------ + fieldNames: { + label: 'name', + key: 'id', + value: 'id', + }, + //update-end---author:wangshuai ---date:20230829 for:replaceFields已过期,使用fieldNames代替------------ + dropdownStyle: { + maxHeight: '50vh', + }, + getPopupContainer: (node) => node?.parentNode, + }, + ifShow: ({ values }) => !isDir(values.menuType), + }, + { + field: 'url', + label: '访问路径', + component: 'Input', + required: true, + //update-begin-author:liusq date:2023-06-06 for: [issues/5008]子表数据权限设置不生效 + ifShow: ({ values }) => !(values.component === ComponentTypes.IFrame && values.internalOrExternal), + //update-begin-author:zyf date:2022-11-02 for: 聚合路由允许路径重复 + dynamicRules: ({ model, schema,values }) => { + return checkPermDuplication(model, schema, values.menuType !== 2?true:false); + }, + //update-end-author:zyf date:2022-11-02 for: 聚合路由允许路径重复 + //update-end-author:liusq date:2022-06-06 for: [issues/5008]子表数据权限设置不生效 + }, + { + field: 'component', + label: '前端组件', + component: 'Input', + componentProps: { + placeholder: '请输入前端组件', + }, + defaultValue:'layouts/default/index', + required: true, + ifShow: ({ values }) => !isButton(values.menuType), + }, + { + field: 'componentName', + label: '组件名称', + component: 'Input', + componentProps: { + placeholder: '请输入组件名称', + }, + helpMessage: [ + '此处名称应和vue组件的name属性保持一致。', + '组件名称不能重复,主要用于路由缓存功能。', + '如果组件名称和vue组件的name属性不一致,则会导致路由缓存失效。', + '非必填,留空则会根据访问路径自动生成。', + ], + defaultValue: '', + ifShow: ({ values }) => !isButton(values.menuType), + }, + { + field: 'frameSrc', + label: 'Iframe地址', + component: 'Input', + rules: [ + { required: true, message: '请输入Iframe地址' }, + { type: 'url', message: '请输入正确的url地址' }, + ], + ifShow: ({ values }) => !isButton(values.menuType) && values.component === ComponentTypes.IFrame, + }, + { + field: 'redirect', + label: '默认跳转地址', + component: 'Input', + ifShow: ({ values }) => isDir(values.menuType), + }, + { + field: 'perms', + label: '授权标识', + component: 'Input', + ifShow: ({ values }) => isButton(values.menuType), + // dynamicRules: ({ model }) => { + // return [ + // { + // required: false, + // validator: (_, value) => { + // return new Promise((resolve, reject) => { + // let params = { + // tableName: 'sys_permission', + // fieldName: 'perms', + // fieldVal: value, + // dataId: model.id, + // }; + // duplicateCheck(params) + // .then((res) => { + // res.success ? resolve() : reject(res.message || '校验失败'); + // }) + // .catch((err) => { + // reject(err.message || '校验失败'); + // }); + // }); + // }, + // }, + // ]; + // }, + }, + { + field: 'permsType', + label: '授权策略', + component: 'RadioGroup', + defaultValue: '1', + helpMessage: ['可见/可访问(授权后可见/可访问)', '可编辑(未授权时禁用)'], + componentProps: { + options: [ + { label: '可见/可访问', value: '1' }, + { label: '可编辑', value: '2' }, + ], + }, + ifShow: ({ values }) => isButton(values.menuType), + }, + { + field: 'status', + label: '状态', + component: 'RadioGroup', + defaultValue: '1', + componentProps: { + options: [ + { label: '有效', value: '1' }, + { label: '无效', value: '0' }, + ], + }, + ifShow: ({ values }) => isButton(values.menuType), + }, + { + field: 'icon', + label: '菜单图标', + component: 'IconPicker', + ifShow: ({ values }) => !isButton(values.menuType), + componentProps: { + allowClear: true + }, + }, + { + field: 'sortNo', + label: '排序', + component: 'InputNumber', + defaultValue: 1, + ifShow: ({ values }) => !isButton(values.menuType), + }, + { + field: 'route', + label: '是否路由菜单', + component: 'Switch', + defaultValue: true, + componentProps: { + checkedChildren: '是', + unCheckedChildren: '否', + }, + ifShow: ({ values }) => !isButton(values.menuType), + }, + { + field: 'hidden', + label: '隐藏路由', + component: 'Switch', + defaultValue: 0, + componentProps: { + checkedChildren: '是', + unCheckedChildren: '否', + }, + ifShow: ({ values }) => !isButton(values.menuType), + }, + { + field: 'hideTab', + label: '隐藏Tab', + component: 'Switch', + defaultValue: 0, + componentProps: { + checkedChildren: '是', + unCheckedChildren: '否', + }, + ifShow: ({ values }) => !isButton(values.menuType), + }, + { + field: 'keepAlive', + label: '是否缓存路由', + component: 'Switch', + defaultValue: false, + componentProps: { + checkedChildren: '是', + unCheckedChildren: '否', + }, + ifShow: ({ values }) => !isButton(values.menuType), + }, + { + field: 'alwaysShow', + label: '聚合路由', + component: 'Switch', + defaultValue: false, + componentProps: { + checkedChildren: '是', + unCheckedChildren: '否', + }, + ifShow: ({ values }) => !isButton(values.menuType), + }, + { + field: 'internalOrExternal', + label: '打开方式', + component: 'Switch', + defaultValue: false, + componentProps: { + checkedChildren: '外部', + unCheckedChildren: '内部', + }, + ifShow: ({ values }) => !isButton(values.menuType), + }, +]; + +export const dataRuleColumns: BasicColumn[] = [ + { + title: '规则名称', + dataIndex: 'ruleName', + width: 150, + }, + { + title: '规则字段', + dataIndex: 'ruleColumn', + width: 100, + }, + { + title: '规则值', + dataIndex: 'ruleValue', + width: 100, + }, +]; + +export const dataRuleSearchFormSchema: FormSchema[] = [ + { + field: 'ruleName', + label: '规则名称', + component: 'Input', + // colProps: { span: 6 }, + }, + { + field: 'ruleValue', + label: '规则值', + component: 'Input', + // colProps: { span: 6 }, + }, +]; + +export const dataRuleFormSchema: FormSchema[] = [ + { + label: 'id', + field: 'id', + component: 'Input', + show: false, + }, + { + field: 'ruleName', + label: '规则名称', + component: 'Input', + required: true, + }, + { + field: 'ruleColumn', + label: '规则字段', + component: 'Input', + ifShow: ({ values }) => { + const ruleConditions = Array.isArray(values.ruleConditions) ? values.ruleConditions[0] : values.ruleConditions; + return ruleConditions !== 'USE_SQL_RULES'; + }, + }, + { + field: 'ruleConditions', + label: '条件规则', + required: true, + component: 'ApiSelect', + componentProps: { + api: ajaxGetDictItems, + params: { code: 'rule_conditions' }, + labelField: 'text', + valueField: 'value', + getPopupContainer: (node) => document.body, + }, + }, + // update-begin--author:liaozhiyang---date:20240724---for:【TV360X-1864】添加系统变量 + { + field: 'ruleValue', + component: 'JInputSelect', + label: '规则值', + required: true, + componentProps: { + selectPlaceholder: '可选择系统变量', + inputPlaceholder: '请输入', + getPopupContainer: () => document.body, + selectWidth: '200px', + options: [ + { + label: '登录用户账号', + value: '#{sys_user_code}', + }, + { + label: '登录用户名称', + value: '#{sys_user_name}', + }, + { + label: '当前日期', + value: '#{sys_date}', + }, + { + label: '当前时间', + value: '#{sys_time}', + }, + { + label: '登录用户部门', + value: '#{sys_org_code}', + }, + { + label: '用户拥有部门', + value: '#{sys_multi_org_code}', + }, + { + label: '登录用户租户', + value: '#{tenant_id}', + }, + ], + }, + }, + // update-end--author:liaozhiyang---date:20240724---for:【TV360X-1864】添加系统变量 + { + field: 'status', + label: '状态', + component: 'RadioButtonGroup', + defaultValue: '1', + componentProps: { + options: [ + { label: '无效', value: '0' }, + { label: '有效', value: '1' }, + ], + }, + }, +]; diff --git a/src/views/system/message/components/SysMessageList.vue b/src/views/system/message/components/SysMessageList.vue new file mode 100644 index 0000000..5a7e6e2 --- /dev/null +++ b/src/views/system/message/components/SysMessageList.vue @@ -0,0 +1,172 @@ + + + + + diff --git a/src/views/system/message/components/SysMessageModal.vue b/src/views/system/message/components/SysMessageModal.vue new file mode 100644 index 0000000..6170065 --- /dev/null +++ b/src/views/system/message/components/SysMessageModal.vue @@ -0,0 +1,523 @@ + + + + + diff --git a/src/views/system/message/components/useSysMessage.ts b/src/views/system/message/components/useSysMessage.ts new file mode 100644 index 0000000..6a32de6 --- /dev/null +++ b/src/views/system/message/components/useSysMessage.ts @@ -0,0 +1,239 @@ +import { ref, reactive } from 'vue'; +import { defHttp } from '/@/utils/http/axios'; +import { getDictItemsByCode } from '/@/utils/dict/index'; +import { useRouter, useRoute } from 'vue-router' +import { useAppStore } from '/@/store/modules/app'; +import { useTabs } from '/@/hooks/web/useTabs'; +import { useModal } from '/@/components/Modal'; +import {useMessage} from "/@/hooks/web/useMessage"; + +/** + * 列表接口 + * @param params + */ +const queryMessageList = (params) => { + const url = '/sys/annountCement/vue3List'; + return defHttp.get({ url, params }); +}; + +/** + * 获取消息列表数据 + */ +export function useSysMessage() { + const { createMessage } = useMessage(); + const rangeDateArray = getDictItemsByCode('rangeDate'); + console.log('+++++++++++++++++++++'); + console.log('rangeDateArray', rangeDateArray); + console.log('+++++++++++++++++++++'); + + const messageList = ref([]); + const pageNo = ref(1) + let pageSize = 10; + + const searchParams = reactive({ + fromUser: '', + rangeDateKey: '', + rangeDate: [], + starFlag: '' + }); + + + function getQueryParams() { + let { fromUser, rangeDateKey, rangeDate, starFlag } = searchParams; + let params = { + fromUser, + starFlag, + rangeDateKey, + beginDate: '', + endDate: '', + pageNo: pageNo.value, + pageSize + }; + if (rangeDateKey == 'zdy') { + params.beginDate = rangeDate[0]+' 00:00:00'; + params.endDate = rangeDate[1]+' 23:59:59'; + } + return params; + } + + // 数据是否加载完了 + const loadEndStatus = ref(false); + + //请求数据 + async function loadData() { + if(loadEndStatus.value === true){ + return; + } + let params = getQueryParams(); + const data = await queryMessageList(params); + console.log('获取结果', data); + if(!data || data.length<=0){ + loadEndStatus.value = true; + return; + } + if(data.lengthitem.value === busType); + if(!temp || temp.length==0){ + console.error('当前业务类型不识别', busType); + return; + } + let path = temp[0].text; + path = path.replace('{DETAIL_ID}', busId) + //固定参数 detailId 用于查询表单数据 + let query:any = { + detailId: busId + }; + // 额外参数处理 + if(msgAbstract){ + try { + let json = JSON.parse(msgAbstract); + Object.keys(json).map(k=>{ + query[k] = json[k] + }); + }catch (e) { + console.error('msgAbstract参数不是JSON格式', msgAbstract) + } + } + // 跳转路由 + appStore.setMessageHrefParams(query); + if(rt.path.indexOf(path)>=0){ + await closeTab(); + await router.replace({ path: path, query:{ time: new Date().getTime() } }); + }else{ + closeSameRoute(path) + await router.push({ path: path }); + } + } + + /** + * 从首页的消息通知跳转消息列表打开modal + * @param record + */ + async function goPageFromOuter(record){ + //没有定义业务类型 直接跳转我的消息页面 + emit('detail', record) + } + + return { + goPage + } +} diff --git a/src/views/system/message/manage/ManageDrawer.vue b/src/views/system/message/manage/ManageDrawer.vue new file mode 100644 index 0000000..407888c --- /dev/null +++ b/src/views/system/message/manage/ManageDrawer.vue @@ -0,0 +1,24 @@ + + + diff --git a/src/views/system/message/manage/index.less b/src/views/system/message/manage/index.less new file mode 100644 index 0000000..63b7bd0 --- /dev/null +++ b/src/views/system/message/manage/index.less @@ -0,0 +1,5 @@ +//noinspection LessUnresolvedVariable +@prefix-cls: ~'@{namespace}-message-manage'; + +.@{prefix-cls} { +} diff --git a/src/views/system/message/manage/index.vue b/src/views/system/message/manage/index.vue new file mode 100644 index 0000000..2602be1 --- /dev/null +++ b/src/views/system/message/manage/index.vue @@ -0,0 +1,129 @@ + + + + + diff --git a/src/views/system/message/manage/manage.api.ts b/src/views/system/message/manage/manage.api.ts new file mode 100644 index 0000000..b83d6c2 --- /dev/null +++ b/src/views/system/message/manage/manage.api.ts @@ -0,0 +1,52 @@ +import { unref } from 'vue'; +import { defHttp } from '/@/utils/http/axios'; +import { useMessage } from '/@/hooks/web/useMessage'; + +const { createConfirm } = useMessage(); + +export enum Api { + list = '/sys/message/sysMessage/list', + delete = '/sys/message/sysMessage/delete', + deleteBatch = '/sys/message/sysMessage/deleteBatch', + exportXls = 'sys/message/sysMessage/exportXls', + importXls = 'sys/message/sysMessage/importExcel', + save = '/sys/message/sysMessage/add', + edit = '/sys/message/sysMessage/edit', +} + +export const list = (params) => defHttp.get({ url: Api.list, params }); + +/** + * 批量删除 + * @param params + * @param confirm + */ +export const deleteBatch = (params, confirm = false) => { + return new Promise((resolve, reject) => { + const doDelete = () => { + resolve(defHttp.delete({ url: Api.deleteBatch, params }, { joinParamsToUrl: true })); + }; + if (confirm) { + createConfirm({ + iconType: 'warning', + title: '删除', + content: '确定要删除吗?', + onOk: () => doDelete(), + onCancel: () => reject(), + }); + } else { + doDelete(); + } + }); +}; + +/** + * 保存或者更改消息模板 + */ +export const saveOrUpdate = (params, isUpdate) => { + if (unref(isUpdate)) { + return defHttp.put({ url: Api.edit, params }); + } else { + return defHttp.post({ url: Api.save, params }); + } +}; diff --git a/src/views/system/message/manage/manage.data.ts b/src/views/system/message/manage/manage.data.ts new file mode 100644 index 0000000..3806fda --- /dev/null +++ b/src/views/system/message/manage/manage.data.ts @@ -0,0 +1,134 @@ +import { BasicColumn, FormSchema } from '/@/components/Table'; + +export const columns: BasicColumn[] = [ + { + title: '消息标题', + dataIndex: 'esTitle', + width: 140, + }, + { + title: '发送内容', + dataIndex: 'esContent', + width: 200, + // slots: { customRender: 'esContent' }, + }, + { + title: '接收人', + dataIndex: 'esReceiver', + width: 140, + }, + { + title: '发送次数', + dataIndex: 'esSendNum', + width: 120, + }, + { + title: '发送状态', + dataIndex: 'esSendStatus_dictText', + width: 120, + }, + { + title: '发送时间', + dataIndex: 'esSendTime', + width: 140, + }, + { + title: '发送方式', + dataIndex: 'esType_dictText', + width: 120, + }, +]; + +export const searchFormSchema: FormSchema[] = [ + { + label: '消息标题', + field: 'esTitle', + component: 'Input', + }, + { + label: '发送状态', + field: 'esSendStatus', + component: 'JDictSelectTag', + componentProps: { + dictCode: 'msgSendStatus', + }, + }, + { + label: '发送方式', + field: 'esType', + component: 'JDictSelectTag', + componentProps: { + dictCode: 'messageType', + }, + }, +]; + +export const formSchemas: FormSchema[] = [ + { + label: 'ID', + field: 'id', + component: 'Input', + show: false, + }, + { + label: '消息标题', + field: 'esTitle', + component: 'Input', + componentProps: { readOnly: true }, + }, + { + label: '发送内容', + field: 'esContent', + component: 'InputTextArea', + componentProps: { readOnly: true }, + }, + { + label: '发送参数', + field: 'esParam', + component: 'Input', + componentProps: { readOnly: true }, + }, + + { + label: '接收人', + field: 'esReceiver', + component: 'Input', + componentProps: { readOnly: true }, + }, + { + label: '发送方式', + field: 'esType', + component: 'JDictSelectTag', + componentProps: { disabled: true, dictCode: 'messageType' }, + }, + { + label: '发送时间', + field: 'esSendTime', + component: 'Input', + componentProps: { readOnly: true }, + }, + { + label: '发送状态', + field: 'esSendStatus', + component: 'JDictSelectTag', + componentProps: { disabled: true, dictCode: 'msgSendStatus' }, + }, + { + label: '发送次数', + field: 'esSendNum', + component: 'Input', + componentProps: { readOnly: true }, + }, + { + label: '发送失败原因', + field: 'esResult', + component: 'Input', + componentProps: { readOnly: true }, + }, + { + label: '备注', + field: 'remark', + component: 'InputTextArea', + componentProps: { readOnly: true }, + }, +]; diff --git a/src/views/system/message/template/TemplateModal.vue b/src/views/system/message/template/TemplateModal.vue new file mode 100644 index 0000000..bc2885a --- /dev/null +++ b/src/views/system/message/template/TemplateModal.vue @@ -0,0 +1,51 @@ + + + diff --git a/src/views/system/message/template/TemplateTestModal.vue b/src/views/system/message/template/TemplateTestModal.vue new file mode 100644 index 0000000..eeea2f5 --- /dev/null +++ b/src/views/system/message/template/TemplateTestModal.vue @@ -0,0 +1,40 @@ + + + diff --git a/src/views/system/message/template/index.less b/src/views/system/message/template/index.less new file mode 100644 index 0000000..15e8d49 --- /dev/null +++ b/src/views/system/message/template/index.less @@ -0,0 +1,5 @@ +//noinspection LessUnresolvedVariable +@prefix-cls: ~'@{namespace}-message-template'; + +.@{prefix-cls} { +} diff --git a/src/views/system/message/template/index.vue b/src/views/system/message/template/index.vue new file mode 100644 index 0000000..6dcab25 --- /dev/null +++ b/src/views/system/message/template/index.vue @@ -0,0 +1,209 @@ + + + + + diff --git a/src/views/system/message/template/template.api.ts b/src/views/system/message/template/template.api.ts new file mode 100644 index 0000000..fe4f03c --- /dev/null +++ b/src/views/system/message/template/template.api.ts @@ -0,0 +1,60 @@ +import { unref } from 'vue'; +import { defHttp } from '/@/utils/http/axios'; +import { useMessage } from '/@/hooks/web/useMessage'; + +const { createConfirm } = useMessage(); + +export enum Api { + list = '/sys/message/sysMessageTemplate/list', + delete = '/sys/message/sysMessageTemplate/delete', + deleteBatch = '/sys/message/sysMessageTemplate/deleteBatch', + exportXls = 'sys/message/sysMessageTemplate/exportXls', + importXls = 'sys/message/sysMessageTemplate/importExcel', + save = '/sys/message/sysMessageTemplate/add', + edit = '/sys/message/sysMessageTemplate/edit', + // 发送测试 + send = '/sys/message/sysMessageTemplate/sendMsg', +} + +export const list = (params) => defHttp.get({ url: Api.list, params }); + +/** + * 批量删除 + * @param params + * @param confirm + */ +export const deleteBatch = (params, confirm = false) => { + return new Promise((resolve, reject) => { + const doDelete = () => { + resolve(defHttp.delete({ url: Api.deleteBatch, params }, { joinParamsToUrl: true })); + }; + if (confirm) { + createConfirm({ + iconType: 'warning', + title: '删除', + content: '确定要删除吗?', + onOk: () => doDelete(), + onCancel: () => reject(), + }); + } else { + doDelete(); + } + }); +}; + +/** + * 保存或者更改消息模板 + */ +export const saveOrUpdate = (params, isUpdate) => { + if (unref(isUpdate)) { + return defHttp.put({ url: Api.edit, params }); + } else { + return defHttp.post({ url: Api.save, params }); + } +}; + +/** + * 发送消息测试 + * @param params + */ +export const sendMessageTest = (params) => defHttp.post({ url: Api.send, params }); diff --git a/src/views/system/message/template/template.data.ts b/src/views/system/message/template/template.data.ts new file mode 100644 index 0000000..005a2db --- /dev/null +++ b/src/views/system/message/template/template.data.ts @@ -0,0 +1,185 @@ +import { BasicColumn, FormSchema } from '/@/components/Table'; +import { rules } from '/@/utils/helper/validator'; +import { filterDictTextByCache } from '/@/utils/dict/JDictSelectUtil'; + +export const columns: BasicColumn[] = [ + { + title: '模板标题', + dataIndex: 'templateName', + width: 80, + }, + { + title: '模板编码', + dataIndex: 'templateCode', + width: 100, + }, + { + title: '通知模板', + dataIndex: 'templateContent', + width: 150, + }, + { + title: '模板类型', + dataIndex: 'templateType', + width: 100, + customRender: ({ text }) => filterDictTextByCache('msgType', text), + }, + { + title: '是否应用', + dataIndex: 'useStatus', + width: 90, + customRender: function ({ text }) { + if (text == '1') { + return '是'; + } else { + return '否'; + } + }, + }, +]; + +export const searchFormSchema: FormSchema[] = [ + { + label: '模板标题', + field: 'templateName', + component: 'Input', + }, + { + label: '模板编码', + field: 'templateCode', + component: 'Input', + }, + { + label: '模板类型', + field: 'templateType', + component: 'JDictSelectTag', + componentProps: { + dictCode: 'msgType', + }, + }, +]; + +export const formSchemas: FormSchema[] = [ + { + label: 'ID', + field: 'id', + component: 'Input', + show: false, + }, + { + label: '模板标题', + field: 'templateName', + component: 'Input', + required: true, + }, + { + label: '模板编码', + field: 'templateCode', + component: 'Input', + dynamicRules: ({ model, schema }) => { + return [ ...rules.duplicateCheckRule('sys_sms_template', 'template_code', model, schema, true)]; + }, + // 编辑模式下不可修改编码 + dynamicDisabled: (params) => !!params.values.id, + }, + { + label: '模板类型', + field: 'templateType', + component: 'JDictSelectTag', + componentProps: { + dictCode: 'msgType', + placeholder: '请选择模板类型', + }, + required: true, + }, + { + label: '是否应用', + field: 'useStatus', + component: 'JSwitch', + componentProps: { + options: ['1', '0'], + }, + }, + { + label: '模板内容', + field: 'templateContent', + component: 'InputTextArea', + componentProps: { + autoSize: { + minRows: 8, + maxRows: 8, + }, + }, + ifShow: ({ values }) => { + return !['2', '4', '5'].includes(values.templateType); + }, + }, + + { + label: '模板内容', + field: 'templateContent', + component: 'JEditor', + ifShow: ({ values }) => { + return ['2', '4'].includes(values.templateType); + }, + }, + { + label: '模板内容', + field: 'templateContent', + component: 'JMarkdownEditor', + ifShow: ({ values }) => { + return ['5'].includes(values.templateType); + }, + }, +]; + +export const sendTestFormSchemas: FormSchema[] = [ + { + label: '模板编码', + field: 'templateCode', + component: 'Input', + show: false, + }, + { + label: '模板标题', + field: 'templateName', + component: 'Input', + componentProps: { disabled: true }, + }, + { + label: '模板内容', + field: 'templateContent', + component: 'InputTextArea', + componentProps: { disabled: true, rows: 5 }, + }, + { + label: '测试数据', + field: 'testData', + component: 'InputTextArea', + required: true, + helpMessage: 'JSON数据', + defaultValue: '{}', + componentProps: { + placeholder: '请输入JSON格式测试数据', + rows: 5, + }, + }, + { + label: '消息类型', + field: 'msgType', + component: 'JDictSelectTag', + required: true, + defaultValue:'system', + componentProps: { dictCode: 'messageType',type:'radio' }, + }, + { + label: '消息接收方', + field: 'receiver', + required: true, + component: 'JSelectUser', + componentProps: { + labelKey: 'username', + rowKey: 'username', + }, + }, +]; diff --git a/src/views/system/notice/DetailModal.vue b/src/views/system/notice/DetailModal.vue new file mode 100644 index 0000000..6fa930f --- /dev/null +++ b/src/views/system/notice/DetailModal.vue @@ -0,0 +1,27 @@ +