Commit 52257f061d95cf4a3b5a11e4a52c48774a6042be
1 parent
50cf2d0b
refactor(tree): Refactor tree to support antv3.0
Showing
21 changed files
with
1139 additions
and
835 deletions
.eslintrc.js
... | ... | @@ -62,6 +62,7 @@ module.exports = defineConfig({ |
62 | 62 | 'vue/singleline-html-element-content-newline': 'off', |
63 | 63 | 'vue/attribute-hyphenation': 'off', |
64 | 64 | 'vue/require-default-prop': 'off', |
65 | + 'vue/require-explicit-emits': 'off', | |
65 | 66 | 'vue/html-self-closing': [ |
66 | 67 | 'error', |
67 | 68 | { |
... | ... | @@ -74,6 +75,6 @@ module.exports = defineConfig({ |
74 | 75 | math: 'always', |
75 | 76 | }, |
76 | 77 | ], |
77 | - 'vue/multi-word-component-names': 'off' | |
78 | + 'vue/multi-word-component-names': 'off', | |
78 | 79 | }, |
79 | 80 | }); | ... | ... |
.vscode/settings.json
build/vite/plugin/hmr.ts
... | ... | @@ -9,17 +9,17 @@ import type { Plugin } from 'vite'; |
9 | 9 | export function configHmrPlugin(): Plugin { |
10 | 10 | return { |
11 | 11 | name: 'singleHMR', |
12 | - handleHotUpdate({ modules, file }) { | |
13 | - if (file.match(/xml$/)) return []; | |
12 | + // handleHotUpdate({ modules, file }) { | |
13 | + // if (file.match(/xml$/)) return []; | |
14 | 14 | |
15 | - modules.forEach((m) => { | |
16 | - if (!m.url.match(/\.(css|less)/)) { | |
17 | - m.importedModules = new Set(); | |
18 | - m.importers = new Set(); | |
19 | - } | |
20 | - }); | |
15 | + // modules.forEach((m) => { | |
16 | + // if (!m.url.match(/\.(css|less)/)) { | |
17 | + // m.importedModules = new Set(); | |
18 | + // m.importers = new Set(); | |
19 | + // } | |
20 | + // }); | |
21 | 21 | |
22 | - return modules; | |
23 | - }, | |
22 | + // return modules; | |
23 | + // }, | |
24 | 24 | }; |
25 | 25 | } | ... | ... |
build/vite/plugin/styleImport.ts
... | ... | @@ -4,10 +4,10 @@ |
4 | 4 | */ |
5 | 5 | import styleImport from 'vite-plugin-style-import'; |
6 | 6 | |
7 | -export function configStyleImportPlugin(isBuild: boolean) { | |
8 | - if (!isBuild) { | |
9 | - return []; | |
10 | - } | |
7 | +export function configStyleImportPlugin(_isBuild: boolean) { | |
8 | + // if (!isBuild) { | |
9 | + // return []; | |
10 | + // } | |
11 | 11 | const styleImportPlugin = styleImport({ |
12 | 12 | libs: [ |
13 | 13 | { |
... | ... | @@ -19,6 +19,7 @@ export function configStyleImportPlugin(isBuild: boolean) { |
19 | 19 | 'anchor-link', |
20 | 20 | 'sub-menu', |
21 | 21 | 'menu-item', |
22 | + 'menu-divider', | |
22 | 23 | 'menu-item-group', |
23 | 24 | 'breadcrumb-item', |
24 | 25 | 'breadcrumb-separator', | ... | ... |
package.json
... | ... | @@ -72,7 +72,7 @@ |
72 | 72 | "devDependencies": { |
73 | 73 | "@commitlint/cli": "^15.0.0", |
74 | 74 | "@commitlint/config-conventional": "^15.0.0", |
75 | - "@iconify/json": "^2.0.2", | |
75 | + "@iconify/json": "^2.0.3", | |
76 | 76 | "@purge-icons/generated": "^0.7.0", |
77 | 77 | "@types/codemirror": "^5.60.5", |
78 | 78 | "@types/crypto-js": "^4.0.2", |
... | ... | @@ -110,7 +110,7 @@ |
110 | 110 | "fs-extra": "^10.0.0", |
111 | 111 | "husky": "^7.0.4", |
112 | 112 | "inquirer": "^8.2.0", |
113 | - "jest": "^27.3.1", | |
113 | + "jest": "^27.4.0", | |
114 | 114 | "less": "^4.1.2", |
115 | 115 | "lint-staged": "12.1.2", |
116 | 116 | "npm-run-all": "^4.1.5", |
... | ... | @@ -135,14 +135,14 @@ |
135 | 135 | "vite-plugin-imagemin": "^0.4.6", |
136 | 136 | "vite-plugin-mock": "^2.9.6", |
137 | 137 | "vite-plugin-purge-icons": "^0.7.0", |
138 | - "vite-plugin-pwa": "^0.11.7", | |
138 | + "vite-plugin-pwa": "^0.11.8", | |
139 | 139 | "vite-plugin-style-import": "^1.4.0", |
140 | 140 | "vite-plugin-svg-icons": "^1.0.5", |
141 | 141 | "vite-plugin-theme": "^0.8.1", |
142 | 142 | "vite-plugin-vue-setup-extend": "^0.1.0", |
143 | 143 | "vite-plugin-windicss": "^1.5.3", |
144 | 144 | "vue-eslint-parser": "^8.0.1", |
145 | - "vue-tsc": "^0.29.6" | |
145 | + "vue-tsc": "^0.29.7" | |
146 | 146 | }, |
147 | 147 | "resolutions": { |
148 | 148 | "//": "Used to install imagemin dependencies, because imagemin may not be installed in China. If it is abroad, you can delete it", | ... | ... |
pnpm-lock.yaml
... | ... | @@ -12,7 +12,7 @@ specifiers: |
12 | 12 | '@commitlint/cli': ^15.0.0 |
13 | 13 | '@commitlint/config-conventional': ^15.0.0 |
14 | 14 | '@iconify/iconify': ^2.1.0 |
15 | - '@iconify/json': ^2.0.2 | |
15 | + '@iconify/json': ^2.0.3 | |
16 | 16 | '@logicflow/core': ^0.7.10 |
17 | 17 | '@logicflow/extension': ^0.7.10 |
18 | 18 | '@purge-icons/generated': ^0.7.0 |
... | ... | @@ -63,7 +63,7 @@ specifiers: |
63 | 63 | husky: ^7.0.4 |
64 | 64 | inquirer: ^8.2.0 |
65 | 65 | intro.js: ^4.3.0 |
66 | - jest: ^27.3.1 | |
66 | + jest: ^27.4.0 | |
67 | 67 | less: ^4.1.2 |
68 | 68 | lint-staged: 12.1.2 |
69 | 69 | lodash-es: ^4.17.21 |
... | ... | @@ -101,7 +101,7 @@ specifiers: |
101 | 101 | vite-plugin-imagemin: ^0.4.6 |
102 | 102 | vite-plugin-mock: ^2.9.6 |
103 | 103 | vite-plugin-purge-icons: ^0.7.0 |
104 | - vite-plugin-pwa: ^0.11.7 | |
104 | + vite-plugin-pwa: ^0.11.8 | |
105 | 105 | vite-plugin-style-import: ^1.4.0 |
106 | 106 | vite-plugin-svg-icons: ^1.0.5 |
107 | 107 | vite-plugin-theme: ^0.8.1 |
... | ... | @@ -112,7 +112,7 @@ specifiers: |
112 | 112 | vue-i18n: ^9.1.9 |
113 | 113 | vue-json-pretty: ^2.0.6 |
114 | 114 | vue-router: ^4.0.12 |
115 | - vue-tsc: ^0.29.6 | |
115 | + vue-tsc: ^0.29.7 | |
116 | 116 | vue-types: ^4.1.1 |
117 | 117 | xlsx: ^0.17.4 |
118 | 118 | |
... | ... | @@ -156,7 +156,7 @@ dependencies: |
156 | 156 | devDependencies: |
157 | 157 | '@commitlint/cli': 15.0.0 |
158 | 158 | '@commitlint/config-conventional': 15.0.0 |
159 | - '@iconify/json': 2.0.2 | |
159 | + '@iconify/json': 2.0.3 | |
160 | 160 | '@purge-icons/generated': 0.7.0 |
161 | 161 | '@types/codemirror': 5.60.5 |
162 | 162 | '@types/crypto-js': 4.0.2 |
... | ... | @@ -187,14 +187,14 @@ devDependencies: |
187 | 187 | eslint: 8.3.0 |
188 | 188 | eslint-config-prettier: 8.3.0_eslint@8.3.0 |
189 | 189 | eslint-define-config: 1.2.0 |
190 | - eslint-plugin-jest: 25.3.0_4e52e098c69dc02e5d836ed593524821 | |
190 | + eslint-plugin-jest: 25.3.0_4a9aadc9705c463d5cb0fc674dd30934 | |
191 | 191 | eslint-plugin-prettier: 4.0.0_d8c6a2a4ba8850181fffb74d8e835cec |
192 | 192 | eslint-plugin-vue: 8.1.1_eslint@8.3.0 |
193 | 193 | esno: 0.12.1_typescript@4.5.2 |
194 | 194 | fs-extra: 10.0.0 |
195 | 195 | husky: 7.0.4 |
196 | 196 | inquirer: 8.2.0 |
197 | - jest: 27.3.1_ts-node@10.4.0 | |
197 | + jest: 27.4.0_ts-node@10.4.0 | |
198 | 198 | less: 4.1.2 |
199 | 199 | lint-staged: 12.1.2 |
200 | 200 | npm-run-all: 4.1.5 |
... | ... | @@ -210,7 +210,7 @@ devDependencies: |
210 | 210 | stylelint-config-recommended: 6.0.0_stylelint@14.1.0 |
211 | 211 | stylelint-config-standard: 24.0.0_stylelint@14.1.0 |
212 | 212 | stylelint-order: 5.0.0_stylelint@14.1.0 |
213 | - ts-jest: 27.0.7_7e2a439bb7b53c38ff0c1a3c5e04c2c5 | |
213 | + ts-jest: 27.0.7_bfad92f4d8caf69d57ace222bbbf1afc | |
214 | 214 | ts-node: 10.4.0_36929cccfdb926da0bb85cc291f27124 |
215 | 215 | typescript: 4.5.2 |
216 | 216 | vite: 2.7.0-beta.9_less@4.1.2 |
... | ... | @@ -219,14 +219,14 @@ devDependencies: |
219 | 219 | vite-plugin-imagemin: 0.4.6_vite@2.7.0-beta.9 |
220 | 220 | vite-plugin-mock: 2.9.6_mockjs@1.1.0+vite@2.7.0-beta.9 |
221 | 221 | vite-plugin-purge-icons: 0.7.0_vite@2.7.0-beta.9 |
222 | - vite-plugin-pwa: 0.11.7_vite@2.7.0-beta.9 | |
222 | + vite-plugin-pwa: 0.11.8_vite@2.7.0-beta.9 | |
223 | 223 | vite-plugin-style-import: 1.4.0_vite@2.7.0-beta.9 |
224 | 224 | vite-plugin-svg-icons: 1.0.5_vite@2.7.0-beta.9 |
225 | 225 | vite-plugin-theme: 0.8.1_vite@2.7.0-beta.9 |
226 | 226 | vite-plugin-vue-setup-extend: 0.1.0_vite@2.7.0-beta.9 |
227 | 227 | vite-plugin-windicss: 1.5.3_vite@2.7.0-beta.9 |
228 | 228 | vue-eslint-parser: 8.0.1_eslint@8.3.0 |
229 | - vue-tsc: 0.29.6_typescript@4.5.2 | |
229 | + vue-tsc: 0.29.7_typescript@4.5.2 | |
230 | 230 | |
231 | 231 | packages: |
232 | 232 | |
... | ... | @@ -386,7 +386,7 @@ packages: |
386 | 386 | '@babel/helper-module-imports': 7.16.0 |
387 | 387 | '@babel/helper-plugin-utils': 7.14.5 |
388 | 388 | '@babel/traverse': 7.16.3 |
389 | - debug: 4.3.2 | |
389 | + debug: 4.3.3 | |
390 | 390 | lodash.debounce: 4.0.8 |
391 | 391 | resolve: 1.20.0 |
392 | 392 | semver: 6.3.0 |
... | ... | @@ -1685,8 +1685,8 @@ packages: |
1685 | 1685 | dependencies: |
1686 | 1686 | cross-fetch: 3.1.4 |
1687 | 1687 | |
1688 | - /@iconify/json/2.0.2: | |
1689 | - resolution: {integrity: sha512-LcGJCnYcnTBrbLEjC8ynJ9T2Pj5C3nt6dKksZAb+kCYD1kQReDen/Pjvo5ggFE1JkwMrBrzbjojR87YQGnh12g==} | |
1688 | + /@iconify/json/2.0.3: | |
1689 | + resolution: {integrity: sha512-aAbuycbHyjaepxsj+Vp2u6AO9VIfbFiHQ1NO8lYdsH2IYCauXWeVSe+rBkkIntxGcc0dgYL/+jAX0s+R3oCNvQ==} | |
1690 | 1690 | dependencies: |
1691 | 1691 | '@iconify/types': 1.0.12 |
1692 | 1692 | pathe: 0.0.2 |
... | ... | @@ -1768,20 +1768,20 @@ packages: |
1768 | 1768 | engines: {node: '>=8'} |
1769 | 1769 | dev: true |
1770 | 1770 | |
1771 | - /@jest/console/27.3.1: | |
1772 | - resolution: {integrity: sha512-RkFNWmv0iui+qsOr/29q9dyfKTTT5DCuP31kUwg7rmOKPT/ozLeGLKJKVIiOfbiKyleUZKIrHwhmiZWVe8IMdw==} | |
1771 | + /@jest/console/27.4.0: | |
1772 | + resolution: {integrity: sha512-2m7Xwcd1zTWtai5DCl+b0TAfoH8p5uqUoKmfzJCAfCrIwoJAf3xB+4nx3eKEGoyNfg5oavrh3gjbZ1n5z5eh4Q==} | |
1773 | 1773 | engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} |
1774 | 1774 | dependencies: |
1775 | - '@jest/types': 27.2.5 | |
1775 | + '@jest/types': 27.4.0 | |
1776 | 1776 | '@types/node': 16.11.10 |
1777 | 1777 | chalk: 4.1.2 |
1778 | - jest-message-util: 27.3.1 | |
1779 | - jest-util: 27.3.1 | |
1778 | + jest-message-util: 27.4.0 | |
1779 | + jest-util: 27.4.0 | |
1780 | 1780 | slash: 3.0.0 |
1781 | 1781 | dev: true |
1782 | 1782 | |
1783 | - /@jest/core/27.3.1_ts-node@10.4.0: | |
1784 | - resolution: {integrity: sha512-DMNE90RR5QKx0EA+wqe3/TNEwiRpOkhshKNxtLxd4rt3IZpCt+RSL+FoJsGeblRZmqdK4upHA/mKKGPPRAifhg==} | |
1783 | + /@jest/core/27.4.0_ts-node@10.4.0: | |
1784 | + resolution: {integrity: sha512-P6eoNIbE0OeenvCxrwdj0jRgeZg8r4eXNCS2zMgAS8EADzdp03mKe7TNwCsEPr460QIYCBwJo4W8wqai3UPXOA==} | |
1785 | 1785 | engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} |
1786 | 1786 | peerDependencies: |
1787 | 1787 | node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 |
... | ... | @@ -1789,30 +1789,30 @@ packages: |
1789 | 1789 | node-notifier: |
1790 | 1790 | optional: true |
1791 | 1791 | dependencies: |
1792 | - '@jest/console': 27.3.1 | |
1793 | - '@jest/reporters': 27.3.1 | |
1794 | - '@jest/test-result': 27.3.1 | |
1795 | - '@jest/transform': 27.3.1 | |
1796 | - '@jest/types': 27.2.5 | |
1792 | + '@jest/console': 27.4.0 | |
1793 | + '@jest/reporters': 27.4.0 | |
1794 | + '@jest/test-result': 27.4.0 | |
1795 | + '@jest/transform': 27.4.0 | |
1796 | + '@jest/types': 27.4.0 | |
1797 | 1797 | '@types/node': 16.11.10 |
1798 | 1798 | ansi-escapes: 4.3.2 |
1799 | 1799 | chalk: 4.1.2 |
1800 | 1800 | emittery: 0.8.1 |
1801 | 1801 | exit: 0.1.2 |
1802 | 1802 | graceful-fs: 4.2.8 |
1803 | - jest-changed-files: 27.3.0 | |
1804 | - jest-config: 27.3.1_ts-node@10.4.0 | |
1805 | - jest-haste-map: 27.3.1 | |
1806 | - jest-message-util: 27.3.1 | |
1807 | - jest-regex-util: 27.0.6 | |
1808 | - jest-resolve: 27.3.1 | |
1809 | - jest-resolve-dependencies: 27.3.1 | |
1810 | - jest-runner: 27.3.1 | |
1811 | - jest-runtime: 27.3.1 | |
1812 | - jest-snapshot: 27.3.1 | |
1813 | - jest-util: 27.3.1 | |
1814 | - jest-validate: 27.3.1 | |
1815 | - jest-watcher: 27.3.1 | |
1803 | + jest-changed-files: 27.4.0 | |
1804 | + jest-config: 27.4.0_ts-node@10.4.0 | |
1805 | + jest-haste-map: 27.4.0 | |
1806 | + jest-message-util: 27.4.0 | |
1807 | + jest-regex-util: 27.4.0 | |
1808 | + jest-resolve: 27.4.0 | |
1809 | + jest-resolve-dependencies: 27.4.0 | |
1810 | + jest-runner: 27.4.0 | |
1811 | + jest-runtime: 27.4.0 | |
1812 | + jest-snapshot: 27.4.0 | |
1813 | + jest-util: 27.4.0 | |
1814 | + jest-validate: 27.4.0 | |
1815 | + jest-watcher: 27.4.0 | |
1816 | 1816 | micromatch: 4.0.4 |
1817 | 1817 | rimraf: 3.0.2 |
1818 | 1818 | slash: 3.0.0 |
... | ... | @@ -1825,39 +1825,39 @@ packages: |
1825 | 1825 | - utf-8-validate |
1826 | 1826 | dev: true |
1827 | 1827 | |
1828 | - /@jest/environment/27.3.1: | |
1829 | - resolution: {integrity: sha512-BCKCj4mOVLme6Tanoyc9k0ultp3pnmuyHw73UHRPeeZxirsU/7E3HC4le/VDb/SMzE1JcPnto+XBKFOcoiJzVw==} | |
1828 | + /@jest/environment/27.4.0: | |
1829 | + resolution: {integrity: sha512-7HJ1c6lVNuxrj9PT5AD4yVDDqFt9B0lLsshxZJXShL/LOkLnBO4MoZMH3w1lXQJY3zxk3/l1yg2j7uRKpxF4yw==} | |
1830 | 1830 | engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} |
1831 | 1831 | dependencies: |
1832 | - '@jest/fake-timers': 27.3.1 | |
1833 | - '@jest/types': 27.2.5 | |
1832 | + '@jest/fake-timers': 27.4.0 | |
1833 | + '@jest/types': 27.4.0 | |
1834 | 1834 | '@types/node': 16.11.10 |
1835 | - jest-mock: 27.3.0 | |
1835 | + jest-mock: 27.4.0 | |
1836 | 1836 | dev: true |
1837 | 1837 | |
1838 | - /@jest/fake-timers/27.3.1: | |
1839 | - resolution: {integrity: sha512-M3ZFgwwlqJtWZ+QkBG5NmC23A9w+A6ZxNsO5nJxJsKYt4yguBd3i8TpjQz5NfCX91nEve1KqD9RA2Q+Q1uWqoA==} | |
1838 | + /@jest/fake-timers/27.4.0: | |
1839 | + resolution: {integrity: sha512-oyMxDKlj/ThRms9eS0xFkxmUvjJ8lHsNS4gNErDRFSruTER1/OQi2L5N0sJav+/AcBoY/Pa313CpB6RgdDacGA==} | |
1840 | 1840 | engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} |
1841 | 1841 | dependencies: |
1842 | - '@jest/types': 27.2.5 | |
1842 | + '@jest/types': 27.4.0 | |
1843 | 1843 | '@sinonjs/fake-timers': 8.1.0 |
1844 | 1844 | '@types/node': 16.11.10 |
1845 | - jest-message-util: 27.3.1 | |
1846 | - jest-mock: 27.3.0 | |
1847 | - jest-util: 27.3.1 | |
1845 | + jest-message-util: 27.4.0 | |
1846 | + jest-mock: 27.4.0 | |
1847 | + jest-util: 27.4.0 | |
1848 | 1848 | dev: true |
1849 | 1849 | |
1850 | - /@jest/globals/27.3.1: | |
1851 | - resolution: {integrity: sha512-Q651FWiWQAIFiN+zS51xqhdZ8g9b88nGCobC87argAxA7nMfNQq0Q0i9zTfQYgLa6qFXk2cGANEqfK051CZ8Pg==} | |
1850 | + /@jest/globals/27.4.0: | |
1851 | + resolution: {integrity: sha512-jIkd2RSV18wvOqFx5climVkwONuxqNKD8jHMvIumj8+E0qqWqymBcWymidjbxmJ3L3Zr60l0lAJGKw0BstREeQ==} | |
1852 | 1852 | engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} |
1853 | 1853 | dependencies: |
1854 | - '@jest/environment': 27.3.1 | |
1855 | - '@jest/types': 27.2.5 | |
1856 | - expect: 27.3.1 | |
1854 | + '@jest/environment': 27.4.0 | |
1855 | + '@jest/types': 27.4.0 | |
1856 | + expect: 27.4.0 | |
1857 | 1857 | dev: true |
1858 | 1858 | |
1859 | - /@jest/reporters/27.3.1: | |
1860 | - resolution: {integrity: sha512-m2YxPmL9Qn1emFVgZGEiMwDntDxRRQ2D58tiDQlwYTg5GvbFOKseYCcHtn0WsI8CG4vzPglo3nqbOiT8ySBT/w==} | |
1859 | + /@jest/reporters/27.4.0: | |
1860 | + resolution: {integrity: sha512-QqIdI9WBH5tBwSHZ81FEZkt3h8fvw+zdV0YQrUtdEbJEBGV/AHgRsIP23sdD/ybLfRFpjZJEyWT+7dM4mxnPYQ==} | |
1861 | 1861 | engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} |
1862 | 1862 | peerDependencies: |
1863 | 1863 | node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 |
... | ... | @@ -1866,10 +1866,10 @@ packages: |
1866 | 1866 | optional: true |
1867 | 1867 | dependencies: |
1868 | 1868 | '@bcoe/v8-coverage': 0.2.3 |
1869 | - '@jest/console': 27.3.1 | |
1870 | - '@jest/test-result': 27.3.1 | |
1871 | - '@jest/transform': 27.3.1 | |
1872 | - '@jest/types': 27.2.5 | |
1869 | + '@jest/console': 27.4.0 | |
1870 | + '@jest/test-result': 27.4.0 | |
1871 | + '@jest/transform': 27.4.0 | |
1872 | + '@jest/types': 27.4.0 | |
1873 | 1873 | '@types/node': 16.11.10 |
1874 | 1874 | chalk: 4.1.2 |
1875 | 1875 | collect-v8-coverage: 1.0.1 |
... | ... | @@ -1881,10 +1881,10 @@ packages: |
1881 | 1881 | istanbul-lib-report: 3.0.0 |
1882 | 1882 | istanbul-lib-source-maps: 4.0.1 |
1883 | 1883 | istanbul-reports: 3.0.5 |
1884 | - jest-haste-map: 27.3.1 | |
1885 | - jest-resolve: 27.3.1 | |
1886 | - jest-util: 27.3.1 | |
1887 | - jest-worker: 27.3.1 | |
1884 | + jest-haste-map: 27.4.0 | |
1885 | + jest-resolve: 27.4.0 | |
1886 | + jest-util: 27.4.0 | |
1887 | + jest-worker: 27.4.0 | |
1888 | 1888 | slash: 3.0.0 |
1889 | 1889 | source-map: 0.6.1 |
1890 | 1890 | string-length: 4.0.2 |
... | ... | @@ -1894,8 +1894,8 @@ packages: |
1894 | 1894 | - supports-color |
1895 | 1895 | dev: true |
1896 | 1896 | |
1897 | - /@jest/source-map/27.0.6: | |
1898 | - resolution: {integrity: sha512-Fek4mi5KQrqmlY07T23JRi0e7Z9bXTOOD86V/uS0EIW4PClvPDqZOyFlLpNJheS6QI0FNX1CgmPjtJ4EA/2M+g==} | |
1897 | + /@jest/source-map/27.4.0: | |
1898 | + resolution: {integrity: sha512-Ntjx9jzP26Bvhbm93z/AKcPRj/9wrkI88/gK60glXDx1q+IeI0rf7Lw2c89Ch6ofonB0On/iRDreQuQ6te9pgQ==} | |
1899 | 1899 | engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} |
1900 | 1900 | dependencies: |
1901 | 1901 | callsites: 3.1.0 |
... | ... | @@ -1903,42 +1903,42 @@ packages: |
1903 | 1903 | source-map: 0.6.1 |
1904 | 1904 | dev: true |
1905 | 1905 | |
1906 | - /@jest/test-result/27.3.1: | |
1907 | - resolution: {integrity: sha512-mLn6Thm+w2yl0opM8J/QnPTqrfS4FoXsXF2WIWJb2O/GBSyResL71BRuMYbYRsGt7ELwS5JGcEcGb52BNrumgg==} | |
1906 | + /@jest/test-result/27.4.0: | |
1907 | + resolution: {integrity: sha512-/RiwMUC9pKK1E85CEflPvb4uE4Zo9JK2Iq3RbkbBoj4FkEASb/Zsqta8WGot2J1GxOk3rqdW513tfSDYQQJVpA==} | |
1908 | 1908 | engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} |
1909 | 1909 | dependencies: |
1910 | - '@jest/console': 27.3.1 | |
1911 | - '@jest/types': 27.2.5 | |
1910 | + '@jest/console': 27.4.0 | |
1911 | + '@jest/types': 27.4.0 | |
1912 | 1912 | '@types/istanbul-lib-coverage': 2.0.3 |
1913 | 1913 | collect-v8-coverage: 1.0.1 |
1914 | 1914 | dev: true |
1915 | 1915 | |
1916 | - /@jest/test-sequencer/27.3.1: | |
1917 | - resolution: {integrity: sha512-siySLo07IMEdSjA4fqEnxfIX8lB/lWYsBPwNFtkOvsFQvmBrL3yj3k3uFNZv/JDyApTakRpxbKLJ3CT8UGVCrA==} | |
1916 | + /@jest/test-sequencer/27.4.0: | |
1917 | + resolution: {integrity: sha512-yKu+sjFgelc5zUf0kcbbsO86qV0NIMPyYFFRaWTaEsq+j7aueX/Zev+NcX+bm7BCwCMWeK7V5AUE6HUOblylHA==} | |
1918 | 1918 | engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} |
1919 | 1919 | dependencies: |
1920 | - '@jest/test-result': 27.3.1 | |
1920 | + '@jest/test-result': 27.4.0 | |
1921 | 1921 | graceful-fs: 4.2.8 |
1922 | - jest-haste-map: 27.3.1 | |
1923 | - jest-runtime: 27.3.1 | |
1922 | + jest-haste-map: 27.4.0 | |
1923 | + jest-runtime: 27.4.0 | |
1924 | 1924 | transitivePeerDependencies: |
1925 | 1925 | - supports-color |
1926 | 1926 | dev: true |
1927 | 1927 | |
1928 | - /@jest/transform/27.3.1: | |
1929 | - resolution: {integrity: sha512-3fSvQ02kuvjOI1C1ssqMVBKJpZf6nwoCiSu00zAKh5nrp3SptNtZy/8s5deayHnqxhjD9CWDJ+yqQwuQ0ZafXQ==} | |
1928 | + /@jest/transform/27.4.0: | |
1929 | + resolution: {integrity: sha512-/8Cb8kEoCtXN/Co5lvv+jG0zv4Uj3ruIvffYUzxNGRGmM7qqaHtOBZ3WbH0T1Nvjya5utTA4YtwbInZVS6Zt9A==} | |
1930 | 1930 | engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} |
1931 | 1931 | dependencies: |
1932 | 1932 | '@babel/core': 7.16.0 |
1933 | - '@jest/types': 27.2.5 | |
1933 | + '@jest/types': 27.4.0 | |
1934 | 1934 | babel-plugin-istanbul: 6.1.1 |
1935 | 1935 | chalk: 4.1.2 |
1936 | 1936 | convert-source-map: 1.8.0 |
1937 | 1937 | fast-json-stable-stringify: 2.1.0 |
1938 | 1938 | graceful-fs: 4.2.8 |
1939 | - jest-haste-map: 27.3.1 | |
1940 | - jest-regex-util: 27.0.6 | |
1941 | - jest-util: 27.3.1 | |
1939 | + jest-haste-map: 27.4.0 | |
1940 | + jest-regex-util: 27.4.0 | |
1941 | + jest-util: 27.4.0 | |
1942 | 1942 | micromatch: 4.0.4 |
1943 | 1943 | pirates: 4.0.1 |
1944 | 1944 | slash: 3.0.0 |
... | ... | @@ -1959,6 +1959,17 @@ packages: |
1959 | 1959 | chalk: 4.1.2 |
1960 | 1960 | dev: true |
1961 | 1961 | |
1962 | + /@jest/types/27.4.0: | |
1963 | + resolution: {integrity: sha512-jIsLdASXMf8GS7P7oGFGwobNse/6Ewq3GBPHoo0i6XRmja+NrUoDqJm4a1ffF2bHGleKJizxokcp1sCqSktP3g==} | |
1964 | + engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} | |
1965 | + dependencies: | |
1966 | + '@types/istanbul-lib-coverage': 2.0.3 | |
1967 | + '@types/istanbul-reports': 3.0.1 | |
1968 | + '@types/node': 16.11.10 | |
1969 | + '@types/yargs': 16.0.4 | |
1970 | + chalk: 4.1.2 | |
1971 | + dev: true | |
1972 | + | |
1962 | 1973 | /@logicflow/core/0.7.10: |
1963 | 1974 | resolution: {integrity: sha512-aZi/dH6aAsfvTrMgwcfPMWNRdDrpasOTr1E49DRlaMwKzUlczF2up4tnJooX/5O6oAQ/jiJ/pIzAmmWy3nwg4w==} |
1964 | 1975 | dependencies: |
... | ... | @@ -2303,6 +2314,14 @@ packages: |
2303 | 2314 | pretty-format: 27.3.1 |
2304 | 2315 | dev: true |
2305 | 2316 | |
2317 | + /@types/jsdom/16.2.13: | |
2318 | + resolution: {integrity: sha512-8JQCjdeAidptSsOcRWk2iTm9wCcwn9l+kRG6k5bzUacrnm1ezV4forq0kWjUih/tumAeoG+OspOvQEbbRucBTw==} | |
2319 | + dependencies: | |
2320 | + '@types/node': 16.11.10 | |
2321 | + '@types/parse5': 6.0.2 | |
2322 | + '@types/tough-cookie': 4.0.1 | |
2323 | + dev: true | |
2324 | + | |
2306 | 2325 | /@types/json-schema/7.0.9: |
2307 | 2326 | resolution: {integrity: sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==} |
2308 | 2327 | dev: true |
... | ... | @@ -2352,6 +2371,10 @@ packages: |
2352 | 2371 | resolution: {integrity: sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==} |
2353 | 2372 | dev: true |
2354 | 2373 | |
2374 | + /@types/parse5/6.0.2: | |
2375 | + resolution: {integrity: sha512-+hQX+WyJAOne7Fh3zF5CxPemILIbuhNcqHHodzK9caYOLnC8pD5efmPleRnw0z++LfKUC/sVNMwk0Gap+B0baA==} | |
2376 | + dev: true | |
2377 | + | |
2355 | 2378 | /@types/prettier/2.4.2: |
2356 | 2379 | resolution: {integrity: sha512-ekoj4qOQYp7CvjX8ZDBgN86w3MqQhLE1hczEJbEIjgFEumDy+na/4AJAbLXfgEWFNB2pKadM5rPFtuSGMWK7xA==} |
2357 | 2380 | dev: true |
... | ... | @@ -2414,6 +2437,10 @@ packages: |
2414 | 2437 | resolution: {integrity: sha512-Kf1w9NE5HEgGxCRyIcRXR/ZYtDv0V8FVPtYHwLxl0O+maGX0erE77pQlD0gpP+/KByMZ87mOA79SjifhSB3PjQ==} |
2415 | 2438 | dev: true |
2416 | 2439 | |
2440 | + /@types/tough-cookie/4.0.1: | |
2441 | + resolution: {integrity: sha512-Y0K95ThC3esLEYD6ZuqNek29lNX2EM1qxV8y2FTLUB0ff5wWrk7az+mLrnNFUnaXcgKye22+sFBRXOgpPILZNg==} | |
2442 | + dev: true | |
2443 | + | |
2417 | 2444 | /@types/trusted-types/2.0.2: |
2418 | 2445 | resolution: {integrity: sha512-F5DIZ36YVLE+PN+Zwws4kJogq47hNgX3Nx6WyDJ3kcplxyke3XIzB8uK5n/Lpm1HBsbGzd6nmGehL8cPekP+Tg==} |
2419 | 2446 | dev: true |
... | ... | @@ -2571,15 +2598,15 @@ packages: |
2571 | 2598 | vite: 2.7.0-beta.9_less@4.1.2 |
2572 | 2599 | dev: true |
2573 | 2600 | |
2574 | - /@volar/code-gen/0.29.6: | |
2575 | - resolution: {integrity: sha512-qF2YHUj1Wk8X9uozdKfVnOImXpoduqWp8qkmrXBKO1nxZLoou/7Y2VWJhDVm4uDkKpsMW1s7ttz+a2/hDRKf4A==} | |
2601 | + /@volar/code-gen/0.29.7: | |
2602 | + resolution: {integrity: sha512-PLcTp/37NMKA/urAkKCy+/oOCwNOsw0ywsz3Wc31c94bX6BAcMBHha5F3NPPY8U4CWuxoyxe2Enj0Ojdtkm2Kw==} | |
2576 | 2603 | dependencies: |
2577 | - '@volar/shared': 0.29.6 | |
2578 | - '@volar/source-map': 0.29.6 | |
2604 | + '@volar/shared': 0.29.7 | |
2605 | + '@volar/source-map': 0.29.7 | |
2579 | 2606 | dev: true |
2580 | 2607 | |
2581 | - /@volar/html2pug/0.29.6: | |
2582 | - resolution: {integrity: sha512-GhDe7lkpa6F/UV0q5Bztsrxgd05QEtcbWECHk6LwHXIJSb3t6SKQswQJmgbEgk38c3rIp647D7s0E1BRW/rZHg==} | |
2608 | + /@volar/html2pug/0.29.7: | |
2609 | + resolution: {integrity: sha512-YEu1yl11pvyaElYDFzuo3kMr6Sr9c8n+BC93pF3e7ykDrejEq7GsUVlhzl1w41s6MjeheGD/Iq1vwVQE4o3E0A==} | |
2583 | 2610 | dependencies: |
2584 | 2611 | domelementtype: 2.2.0 |
2585 | 2612 | domhandler: 4.2.2 |
... | ... | @@ -2587,33 +2614,33 @@ packages: |
2587 | 2614 | pug: 3.0.2 |
2588 | 2615 | dev: true |
2589 | 2616 | |
2590 | - /@volar/shared/0.29.6: | |
2591 | - resolution: {integrity: sha512-s397k+x70rHoccDwx6YVtpFOfAK+/b/bptRueLyQRM9d/21fk54csvC1bcc4Uk/fHw/j6p3FUfumohWtDRJ32w==} | |
2617 | + /@volar/shared/0.29.7: | |
2618 | + resolution: {integrity: sha512-n9TXdin0q4fyGodL5zKh2YMlelYeAxdeuGw8epmf0kolQc26bHici7AIhfj6mmpDox7zRZoqShHgmB4/zJolfw==} | |
2592 | 2619 | dependencies: |
2593 | 2620 | upath: 2.0.1 |
2594 | 2621 | vscode-jsonrpc: 8.0.0-next.4 |
2595 | 2622 | vscode-uri: 3.0.2 |
2596 | 2623 | dev: true |
2597 | 2624 | |
2598 | - /@volar/source-map/0.29.6: | |
2599 | - resolution: {integrity: sha512-C8SFAu3nYsXeDR5mKQsr2fqf81SZI3rcbwCMLTjvps81lzFXboxWfmQIIDvdeKH91H2z/S8juHm3W3Prj3iLLg==} | |
2625 | + /@volar/source-map/0.29.7: | |
2626 | + resolution: {integrity: sha512-O2EI4kcqNQHzWa7V6HOdNFC2VLRJwH+fneTtDH4JAltDLJEhoIUb4jrBNcFGjY38W/KMUXqxKm00cUM+ktATjA==} | |
2600 | 2627 | dependencies: |
2601 | - '@volar/shared': 0.29.6 | |
2628 | + '@volar/shared': 0.29.7 | |
2602 | 2629 | dev: true |
2603 | 2630 | |
2604 | - /@volar/transforms/0.29.6: | |
2605 | - resolution: {integrity: sha512-bST+MnQDueGGBtnhYgA3uWmfp8gUKaKKD5dy3HCGWaPIgcBmzzTwsg//beBaoyJpihKSCq9AaJQd+rNmVZredg==} | |
2631 | + /@volar/transforms/0.29.7: | |
2632 | + resolution: {integrity: sha512-5Yzm4NVQu4binahCA0tuTQyNhxC+VVddt0AsdhCPkUzO+hLR17Ye2QqIsFL72aMvC2tYA2vdNQ+0KxbeyIqG2Q==} | |
2606 | 2633 | dependencies: |
2607 | - '@volar/shared': 0.29.6 | |
2634 | + '@volar/shared': 0.29.7 | |
2608 | 2635 | vscode-languageserver: 8.0.0-next.5 |
2609 | 2636 | dev: true |
2610 | 2637 | |
2611 | - /@volar/vue-code-gen/0.29.6: | |
2612 | - resolution: {integrity: sha512-N3TlKuvPHqVaRhoyh6zogG0UAAJX0gTWsWHiR9Cpu59RNlpgCTymigsnvzXBKAMsefhxpupy05dXn04Su1+ORA==} | |
2638 | + /@volar/vue-code-gen/0.29.7: | |
2639 | + resolution: {integrity: sha512-xrG2rtw5cKf+Os6qIa9EUPCTG1z4CeFmSKrzD5bAww/n+9QNMy6slkTSvnKjdCqvW4TzL8STlBWC96aEL1qoDA==} | |
2613 | 2640 | dependencies: |
2614 | - '@volar/code-gen': 0.29.6 | |
2615 | - '@volar/shared': 0.29.6 | |
2616 | - '@volar/source-map': 0.29.6 | |
2641 | + '@volar/code-gen': 0.29.7 | |
2642 | + '@volar/shared': 0.29.7 | |
2643 | + '@volar/source-map': 0.29.7 | |
2617 | 2644 | '@vue/compiler-core': 3.2.23 |
2618 | 2645 | '@vue/compiler-dom': 3.2.23 |
2619 | 2646 | '@vue/shared': 3.2.23 |
... | ... | @@ -2690,17 +2717,10 @@ packages: |
2690 | 2717 | resolution: {integrity: sha512-R2rfiRY+kZugzWh9ZyITaovx+jpU4vgivAEAiz80kvh3yviiTU3CBuGuyWpSwGz9/C7TkSWVM/FtQRGlZ16n8Q==} |
2691 | 2718 | dev: false |
2692 | 2719 | |
2693 | - /@vue/reactivity/3.2.22: | |
2694 | - resolution: {integrity: sha512-xNkLAItjI0xB+lFeDgKCrSItmrHTaAzSnt8LmdSCPQnDyarmzbi/u4ESQnckWvlL7lSRKiEaOvblaNyqAa7OnQ==} | |
2695 | - dependencies: | |
2696 | - '@vue/shared': 3.2.22 | |
2697 | - dev: true | |
2698 | - | |
2699 | 2720 | /@vue/reactivity/3.2.23: |
2700 | 2721 | resolution: {integrity: sha512-8RGVr/5Kpgb/EkCjgHXqttgA5IMc6n0lIXFY4TVbMkzdXrvaIhzBd7Te44oIDsTSYVKZLpfHd6/wEnuDqE8vFw==} |
2701 | 2722 | dependencies: |
2702 | 2723 | '@vue/shared': 3.2.23 |
2703 | - dev: false | |
2704 | 2724 | |
2705 | 2725 | /@vue/ref-transform/3.2.23: |
2706 | 2726 | resolution: {integrity: sha512-gW0GD2PSAs/th7mC7tPB/UwpIQxclbApVtsDtscDmOJXb2+cdu60ny+SuHNgfrlUT/JqWKQHq7jFKO4woxLNaA==} |
... | ... | @@ -2736,10 +2756,6 @@ packages: |
2736 | 2756 | vue: 3.2.23 |
2737 | 2757 | dev: false |
2738 | 2758 | |
2739 | - /@vue/shared/3.2.22: | |
2740 | - resolution: {integrity: sha512-qWVav014mpjEtbWbEgl0q9pEyrrIySKum8UVYjwhC6njrKzknLZPvfuYdQyVbApsqr94tf/3dP4pCuZmmjdCWQ==} | |
2741 | - dev: true | |
2742 | - | |
2743 | 2759 | /@vue/shared/3.2.23: |
2744 | 2760 | resolution: {integrity: sha512-U+/Jefa0QfXUF2qVy9Dqlrb6HKJSr9/wJcM66wXmWcTOoqg7hOWzF4qruDle51pyF4x3wMn6TSH54UdjKjCKMA==} |
2745 | 2761 | |
... | ... | @@ -2883,7 +2899,7 @@ packages: |
2883 | 2899 | resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} |
2884 | 2900 | engines: {node: '>= 6.0.0'} |
2885 | 2901 | dependencies: |
2886 | - debug: 4.3.2 | |
2902 | + debug: 4.3.3 | |
2887 | 2903 | transitivePeerDependencies: |
2888 | 2904 | - supports-color |
2889 | 2905 | dev: true |
... | ... | @@ -3156,18 +3172,18 @@ packages: |
3156 | 3172 | - debug |
3157 | 3173 | dev: false |
3158 | 3174 | |
3159 | - /babel-jest/27.3.1_@babel+core@7.16.0: | |
3160 | - resolution: {integrity: sha512-SjIF8hh/ir0peae2D6S6ZKRhUy7q/DnpH7k/V6fT4Bgs/LXXUztOpX4G2tCgq8mLo5HA9mN6NmlFMeYtKmIsTQ==} | |
3175 | + /babel-jest/27.4.0_@babel+core@7.16.0: | |
3176 | + resolution: {integrity: sha512-4855S+YT4Hx0OiXFDBOWhrMj1Y9zYE7StlchuZtr1vbo1LEDBIkt8U6+7cse8jkpJSV98w3nBVDrPgol5Ab/cQ==} | |
3161 | 3177 | engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} |
3162 | 3178 | peerDependencies: |
3163 | 3179 | '@babel/core': ^7.8.0 |
3164 | 3180 | dependencies: |
3165 | 3181 | '@babel/core': 7.16.0 |
3166 | - '@jest/transform': 27.3.1 | |
3167 | - '@jest/types': 27.2.5 | |
3182 | + '@jest/transform': 27.4.0 | |
3183 | + '@jest/types': 27.4.0 | |
3168 | 3184 | '@types/babel__core': 7.1.16 |
3169 | 3185 | babel-plugin-istanbul: 6.1.1 |
3170 | - babel-preset-jest: 27.2.0_@babel+core@7.16.0 | |
3186 | + babel-preset-jest: 27.4.0_@babel+core@7.16.0 | |
3171 | 3187 | chalk: 4.1.2 |
3172 | 3188 | graceful-fs: 4.2.8 |
3173 | 3189 | slash: 3.0.0 |
... | ... | @@ -3194,8 +3210,8 @@ packages: |
3194 | 3210 | - supports-color |
3195 | 3211 | dev: true |
3196 | 3212 | |
3197 | - /babel-plugin-jest-hoist/27.2.0: | |
3198 | - resolution: {integrity: sha512-TOux9khNKdi64mW+0OIhcmbAn75tTlzKhxmiNXevQaPbrBYK7YKjP1jl6NHTJ6XR5UgUrJbCnWlKVnJn29dfjw==} | |
3213 | + /babel-plugin-jest-hoist/27.4.0: | |
3214 | + resolution: {integrity: sha512-Jcu7qS4OX5kTWBc45Hz7BMmgXuJqRnhatqpUhnzGC3OBYpOmf2tv6jFNwZpwM7wU7MUuv2r9IPS/ZlYOuburVw==} | |
3199 | 3215 | engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} |
3200 | 3216 | dependencies: |
3201 | 3217 | '@babel/template': 7.16.0 |
... | ... | @@ -3260,14 +3276,14 @@ packages: |
3260 | 3276 | '@babel/plugin-syntax-top-level-await': 7.14.5_@babel+core@7.16.0 |
3261 | 3277 | dev: true |
3262 | 3278 | |
3263 | - /babel-preset-jest/27.2.0_@babel+core@7.16.0: | |
3264 | - resolution: {integrity: sha512-z7MgQ3peBwN5L5aCqBKnF6iqdlvZvFUQynEhu0J+X9nHLU72jO3iY331lcYrg+AssJ8q7xsv5/3AICzVmJ/wvg==} | |
3279 | + /babel-preset-jest/27.4.0_@babel+core@7.16.0: | |
3280 | + resolution: {integrity: sha512-NK4jGYpnBvNxcGo7/ZpZJr51jCGT+3bwwpVIDY2oNfTxJJldRtB4VAcYdgp1loDE50ODuTu+yBjpMAswv5tlpg==} | |
3265 | 3281 | engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} |
3266 | 3282 | peerDependencies: |
3267 | 3283 | '@babel/core': ^7.0.0 |
3268 | 3284 | dependencies: |
3269 | 3285 | '@babel/core': 7.16.0 |
3270 | - babel-plugin-jest-hoist: 27.2.0 | |
3286 | + babel-plugin-jest-hoist: 27.4.0 | |
3271 | 3287 | babel-preset-current-node-syntax: 1.0.1_@babel+core@7.16.0 |
3272 | 3288 | dev: true |
3273 | 3289 | |
... | ... | @@ -4561,6 +4577,11 @@ packages: |
4561 | 4577 | engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} |
4562 | 4578 | dev: true |
4563 | 4579 | |
4580 | + /diff-sequences/27.4.0: | |
4581 | + resolution: {integrity: sha512-YqiQzkrsmHMH5uuh8OdQFU9/ZpADnwzml8z0O5HvRNda+5UZsaX/xN+AAxfR2hWq1Y7HZnAzO9J5lJXOuDz2Ww==} | |
4582 | + engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} | |
4583 | + dev: true | |
4584 | + | |
4564 | 4585 | /diff/4.0.2: |
4565 | 4586 | resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==} |
4566 | 4587 | engines: {node: '>=0.3.1'} |
... | ... | @@ -5101,7 +5122,7 @@ packages: |
5101 | 5122 | engines: {node: '>= 16.9.0', npm: '>= 7.0.0', pnpm: '>= 6.17.0'} |
5102 | 5123 | dev: true |
5103 | 5124 | |
5104 | - /eslint-plugin-jest/25.3.0_4e52e098c69dc02e5d836ed593524821: | |
5125 | + /eslint-plugin-jest/25.3.0_4a9aadc9705c463d5cb0fc674dd30934: | |
5105 | 5126 | resolution: {integrity: sha512-79WQtuBsTN1S8Y9+7euBYwxIOia/k7ykkl9OCBHL3xuww5ecursHy/D8GCIlvzHVWv85gOkS5Kv6Sh7RxOgK1Q==} |
5106 | 5127 | engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} |
5107 | 5128 | peerDependencies: |
... | ... | @@ -5117,7 +5138,7 @@ packages: |
5117 | 5138 | '@typescript-eslint/eslint-plugin': 5.4.0_5c8ff4cecd5a55e744866c0654edac32 |
5118 | 5139 | '@typescript-eslint/experimental-utils': 5.4.0_eslint@8.3.0+typescript@4.5.2 |
5119 | 5140 | eslint: 8.3.0 |
5120 | - jest: 27.3.1_ts-node@10.4.0 | |
5141 | + jest: 27.4.0_ts-node@10.4.0 | |
5121 | 5142 | transitivePeerDependencies: |
5122 | 5143 | - supports-color |
5123 | 5144 | - typescript |
... | ... | @@ -5426,16 +5447,16 @@ packages: |
5426 | 5447 | homedir-polyfill: 1.0.3 |
5427 | 5448 | dev: true |
5428 | 5449 | |
5429 | - /expect/27.3.1: | |
5430 | - resolution: {integrity: sha512-MrNXV2sL9iDRebWPGOGFdPQRl2eDQNu/uhxIMShjjx74T6kC6jFIkmQ6OqXDtevjGUkyB2IT56RzDBqXf/QPCg==} | |
5450 | + /expect/27.4.0: | |
5451 | + resolution: {integrity: sha512-3V4Nq5E5dS7bzFfinUThG0OnOnNIDdEPC0KG1pBgB1Z7ZTDVuuyvSBTOQewi0z0vaGKWPaJ880tGI+pPm+5aCg==} | |
5431 | 5452 | engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} |
5432 | 5453 | dependencies: |
5433 | - '@jest/types': 27.2.5 | |
5454 | + '@jest/types': 27.4.0 | |
5434 | 5455 | ansi-styles: 5.2.0 |
5435 | - jest-get-type: 27.3.1 | |
5436 | - jest-matcher-utils: 27.3.1 | |
5437 | - jest-message-util: 27.3.1 | |
5438 | - jest-regex-util: 27.0.6 | |
5456 | + jest-get-type: 27.4.0 | |
5457 | + jest-matcher-utils: 27.4.0 | |
5458 | + jest-message-util: 27.4.0 | |
5459 | + jest-regex-util: 27.4.0 | |
5439 | 5460 | dev: true |
5440 | 5461 | |
5441 | 5462 | /ext-list/2.2.2: |
... | ... | @@ -6344,7 +6365,7 @@ packages: |
6344 | 6365 | dependencies: |
6345 | 6366 | '@tootallnate/once': 1.1.2 |
6346 | 6367 | agent-base: 6.0.2 |
6347 | - debug: 4.3.2 | |
6368 | + debug: 4.3.3 | |
6348 | 6369 | transitivePeerDependencies: |
6349 | 6370 | - supports-color |
6350 | 6371 | dev: true |
... | ... | @@ -6354,7 +6375,7 @@ packages: |
6354 | 6375 | engines: {node: '>= 6'} |
6355 | 6376 | dependencies: |
6356 | 6377 | agent-base: 6.0.2 |
6357 | - debug: 4.3.2 | |
6378 | + debug: 4.3.3 | |
6358 | 6379 | transitivePeerDependencies: |
6359 | 6380 | - supports-color |
6360 | 6381 | dev: true |
... | ... | @@ -7026,7 +7047,7 @@ packages: |
7026 | 7047 | resolution: {integrity: sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==} |
7027 | 7048 | engines: {node: '>=10'} |
7028 | 7049 | dependencies: |
7029 | - debug: 4.3.2 | |
7050 | + debug: 4.3.3 | |
7030 | 7051 | istanbul-lib-coverage: 3.2.0 |
7031 | 7052 | source-map: 0.6.1 |
7032 | 7053 | transitivePeerDependencies: |
... | ... | @@ -7059,35 +7080,35 @@ packages: |
7059 | 7080 | minimatch: 3.0.4 |
7060 | 7081 | dev: true |
7061 | 7082 | |
7062 | - /jest-changed-files/27.3.0: | |
7063 | - resolution: {integrity: sha512-9DJs9garMHv4RhylUMZgbdCJ3+jHSkpL9aaVKp13xtXAD80qLTLrqcDZL1PHA9dYA0bCI86Nv2BhkLpLhrBcPg==} | |
7083 | + /jest-changed-files/27.4.0: | |
7084 | + resolution: {integrity: sha512-TacYni8ZumaB10L/fGRH92MbLYkn+MF2KtgHeAOcwnOzfmt+S6CDmJeslZuLOpnRUQKkV/Vr4qPAlrBTE5r67A==} | |
7064 | 7085 | engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} |
7065 | 7086 | dependencies: |
7066 | - '@jest/types': 27.2.5 | |
7087 | + '@jest/types': 27.4.0 | |
7067 | 7088 | execa: 5.1.1 |
7068 | 7089 | throat: 6.0.1 |
7069 | 7090 | dev: true |
7070 | 7091 | |
7071 | - /jest-circus/27.3.1: | |
7072 | - resolution: {integrity: sha512-v1dsM9II6gvXokgqq6Yh2jHCpfg7ZqV4jWY66u7npz24JnhP3NHxI0sKT7+ZMQ7IrOWHYAaeEllOySbDbWsiXw==} | |
7092 | + /jest-circus/27.4.0: | |
7093 | + resolution: {integrity: sha512-WYmHSsuH82HZqOHPU1vD2AKyzUp5t/0R7jT1XJ8ga+hIGR5Ddv6PUQeMJvjnftyLC0izSm3tZaIYB+H6FfYqZA==} | |
7073 | 7094 | engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} |
7074 | 7095 | dependencies: |
7075 | - '@jest/environment': 27.3.1 | |
7076 | - '@jest/test-result': 27.3.1 | |
7077 | - '@jest/types': 27.2.5 | |
7096 | + '@jest/environment': 27.4.0 | |
7097 | + '@jest/test-result': 27.4.0 | |
7098 | + '@jest/types': 27.4.0 | |
7078 | 7099 | '@types/node': 16.11.10 |
7079 | 7100 | chalk: 4.1.2 |
7080 | 7101 | co: 4.6.0 |
7081 | 7102 | dedent: 0.7.0 |
7082 | - expect: 27.3.1 | |
7103 | + expect: 27.4.0 | |
7083 | 7104 | is-generator-fn: 2.1.0 |
7084 | - jest-each: 27.3.1 | |
7085 | - jest-matcher-utils: 27.3.1 | |
7086 | - jest-message-util: 27.3.1 | |
7087 | - jest-runtime: 27.3.1 | |
7088 | - jest-snapshot: 27.3.1 | |
7089 | - jest-util: 27.3.1 | |
7090 | - pretty-format: 27.3.1 | |
7105 | + jest-each: 27.4.0 | |
7106 | + jest-matcher-utils: 27.4.0 | |
7107 | + jest-message-util: 27.4.0 | |
7108 | + jest-runtime: 27.4.0 | |
7109 | + jest-snapshot: 27.4.0 | |
7110 | + jest-util: 27.4.0 | |
7111 | + pretty-format: 27.4.0 | |
7091 | 7112 | slash: 3.0.0 |
7092 | 7113 | stack-utils: 2.0.5 |
7093 | 7114 | throat: 6.0.1 |
... | ... | @@ -7095,8 +7116,8 @@ packages: |
7095 | 7116 | - supports-color |
7096 | 7117 | dev: true |
7097 | 7118 | |
7098 | - /jest-cli/27.3.1_ts-node@10.4.0: | |
7099 | - resolution: {integrity: sha512-WHnCqpfK+6EvT62me6WVs8NhtbjAS4/6vZJnk7/2+oOr50cwAzG4Wxt6RXX0hu6m1169ZGMlhYYUNeKBXCph/Q==} | |
7119 | + /jest-cli/27.4.0_ts-node@10.4.0: | |
7120 | + resolution: {integrity: sha512-cTL2ORt/ha+x6KJfVp0oTAyPmHVw7IJ+lA3kmT/kNcWoCiKa+t/JlF5x+nJ0UfL3/IQLV+ysYgu8MjGM8WXH+w==} | |
7100 | 7121 | engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} |
7101 | 7122 | hasBin: true |
7102 | 7123 | peerDependencies: |
... | ... | @@ -7105,16 +7126,16 @@ packages: |
7105 | 7126 | node-notifier: |
7106 | 7127 | optional: true |
7107 | 7128 | dependencies: |
7108 | - '@jest/core': 27.3.1_ts-node@10.4.0 | |
7109 | - '@jest/test-result': 27.3.1 | |
7110 | - '@jest/types': 27.2.5 | |
7129 | + '@jest/core': 27.4.0_ts-node@10.4.0 | |
7130 | + '@jest/test-result': 27.4.0 | |
7131 | + '@jest/types': 27.4.0 | |
7111 | 7132 | chalk: 4.1.2 |
7112 | 7133 | exit: 0.1.2 |
7113 | 7134 | graceful-fs: 4.2.8 |
7114 | 7135 | import-local: 3.0.3 |
7115 | - jest-config: 27.3.1_ts-node@10.4.0 | |
7116 | - jest-util: 27.3.1 | |
7117 | - jest-validate: 27.3.1 | |
7136 | + jest-config: 27.4.0_ts-node@10.4.0 | |
7137 | + jest-util: 27.4.0 | |
7138 | + jest-validate: 27.4.0 | |
7118 | 7139 | prompts: 2.4.2 |
7119 | 7140 | yargs: 16.2.0 |
7120 | 7141 | transitivePeerDependencies: |
... | ... | @@ -7125,8 +7146,8 @@ packages: |
7125 | 7146 | - utf-8-validate |
7126 | 7147 | dev: true |
7127 | 7148 | |
7128 | - /jest-config/27.3.1_ts-node@10.4.0: | |
7129 | - resolution: {integrity: sha512-KY8xOIbIACZ/vdYCKSopL44I0xboxC751IX+DXL2+Wx6DKNycyEfV3rryC3BPm5Uq/BBqDoMrKuqLEUNJmMKKg==} | |
7149 | + /jest-config/27.4.0_ts-node@10.4.0: | |
7150 | + resolution: {integrity: sha512-4ZDJd0HLX4snqDNOQYswMjQj7d7I2Bm8+TYIytDcRSAy7mkneQCKHBJu2NtIuzXxAoS2Sy+sjZ1UX/9L06zZCQ==} | |
7130 | 7151 | engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} |
7131 | 7152 | peerDependencies: |
7132 | 7153 | ts-node: '>=9.0.0' |
... | ... | @@ -7135,26 +7156,27 @@ packages: |
7135 | 7156 | optional: true |
7136 | 7157 | dependencies: |
7137 | 7158 | '@babel/core': 7.16.0 |
7138 | - '@jest/test-sequencer': 27.3.1 | |
7139 | - '@jest/types': 27.2.5 | |
7140 | - babel-jest: 27.3.1_@babel+core@7.16.0 | |
7159 | + '@jest/test-sequencer': 27.4.0 | |
7160 | + '@jest/types': 27.4.0 | |
7161 | + babel-jest: 27.4.0_@babel+core@7.16.0 | |
7141 | 7162 | chalk: 4.1.2 |
7142 | 7163 | ci-info: 3.3.0 |
7143 | 7164 | deepmerge: 4.2.2 |
7144 | 7165 | glob: 7.2.0 |
7145 | 7166 | graceful-fs: 4.2.8 |
7146 | - jest-circus: 27.3.1 | |
7147 | - jest-environment-jsdom: 27.3.1 | |
7148 | - jest-environment-node: 27.3.1 | |
7149 | - jest-get-type: 27.3.1 | |
7150 | - jest-jasmine2: 27.3.1 | |
7151 | - jest-regex-util: 27.0.6 | |
7152 | - jest-resolve: 27.3.1 | |
7153 | - jest-runner: 27.3.1 | |
7154 | - jest-util: 27.3.1 | |
7155 | - jest-validate: 27.3.1 | |
7167 | + jest-circus: 27.4.0 | |
7168 | + jest-environment-jsdom: 27.4.0 | |
7169 | + jest-environment-node: 27.4.0 | |
7170 | + jest-get-type: 27.4.0 | |
7171 | + jest-jasmine2: 27.4.0 | |
7172 | + jest-regex-util: 27.4.0 | |
7173 | + jest-resolve: 27.4.0 | |
7174 | + jest-runner: 27.4.0 | |
7175 | + jest-util: 27.4.0 | |
7176 | + jest-validate: 27.4.0 | |
7156 | 7177 | micromatch: 4.0.4 |
7157 | - pretty-format: 27.3.1 | |
7178 | + pretty-format: 27.4.0 | |
7179 | + slash: 3.0.0 | |
7158 | 7180 | ts-node: 10.4.0_36929cccfdb926da0bb85cc291f27124 |
7159 | 7181 | transitivePeerDependencies: |
7160 | 7182 | - bufferutil |
... | ... | @@ -7173,34 +7195,45 @@ packages: |
7173 | 7195 | pretty-format: 27.3.1 |
7174 | 7196 | dev: true |
7175 | 7197 | |
7176 | - /jest-docblock/27.0.6: | |
7177 | - resolution: {integrity: sha512-Fid6dPcjwepTFraz0YxIMCi7dejjJ/KL9FBjPYhBp4Sv1Y9PdhImlKZqYU555BlN4TQKaTc+F2Av1z+anVyGkA==} | |
7198 | + /jest-diff/27.4.0: | |
7199 | + resolution: {integrity: sha512-fdXgpnyQH4LNSnYgRfHN/g413bqbPspWIAZPlXrdNISehDih1VNDtuRvlzGQJ4Go+fur1HKB2IyI25t6cWi5EA==} | |
7200 | + engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} | |
7201 | + dependencies: | |
7202 | + chalk: 4.1.2 | |
7203 | + diff-sequences: 27.4.0 | |
7204 | + jest-get-type: 27.4.0 | |
7205 | + pretty-format: 27.4.0 | |
7206 | + dev: true | |
7207 | + | |
7208 | + /jest-docblock/27.4.0: | |
7209 | + resolution: {integrity: sha512-7TBazUdCKGV7svZ+gh7C8esAnweJoG+SvcF6Cjqj4l17zA2q1cMwx2JObSioubk317H+cjcHgP+7fTs60paulg==} | |
7178 | 7210 | engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} |
7179 | 7211 | dependencies: |
7180 | 7212 | detect-newline: 3.1.0 |
7181 | 7213 | dev: true |
7182 | 7214 | |
7183 | - /jest-each/27.3.1: | |
7184 | - resolution: {integrity: sha512-E4SwfzKJWYcvOYCjOxhZcxwL+AY0uFMvdCOwvzgutJiaiodFjkxQQDxHm8FQBeTqDnSmKsQWn7ldMRzTn2zJaQ==} | |
7215 | + /jest-each/27.4.0: | |
7216 | + resolution: {integrity: sha512-dq6r/Uf6Q7sI/gND7WyCmQ7Z13p1CSusMkHEC//+schTrhTRe+ubPO2GtejHlWV+BldH6aMAAmtlEZgBroNrNg==} | |
7185 | 7217 | engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} |
7186 | 7218 | dependencies: |
7187 | - '@jest/types': 27.2.5 | |
7219 | + '@jest/types': 27.4.0 | |
7188 | 7220 | chalk: 4.1.2 |
7189 | - jest-get-type: 27.3.1 | |
7190 | - jest-util: 27.3.1 | |
7191 | - pretty-format: 27.3.1 | |
7221 | + jest-get-type: 27.4.0 | |
7222 | + jest-util: 27.4.0 | |
7223 | + pretty-format: 27.4.0 | |
7192 | 7224 | dev: true |
7193 | 7225 | |
7194 | - /jest-environment-jsdom/27.3.1: | |
7195 | - resolution: {integrity: sha512-3MOy8qMzIkQlfb3W1TfrD7uZHj+xx8Olix5vMENkj5djPmRqndMaXtpnaZkxmxM+Qc3lo+yVzJjzuXbCcZjAlg==} | |
7226 | + /jest-environment-jsdom/27.4.0: | |
7227 | + resolution: {integrity: sha512-fgM6g4WftTTpRA8dB5FnmS3n+PthwjTdMwl/Lcq2QlCo0I5smyD+t82bzO9tX5w6ygxbCbnP4VkSWWYdqO4j+w==} | |
7196 | 7228 | engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} |
7197 | 7229 | dependencies: |
7198 | - '@jest/environment': 27.3.1 | |
7199 | - '@jest/fake-timers': 27.3.1 | |
7200 | - '@jest/types': 27.2.5 | |
7230 | + '@jest/environment': 27.4.0 | |
7231 | + '@jest/fake-timers': 27.4.0 | |
7232 | + '@jest/types': 27.4.0 | |
7233 | + '@types/jsdom': 16.2.13 | |
7201 | 7234 | '@types/node': 16.11.10 |
7202 | - jest-mock: 27.3.0 | |
7203 | - jest-util: 27.3.1 | |
7235 | + jest-mock: 27.4.0 | |
7236 | + jest-util: 27.4.0 | |
7204 | 7237 | jsdom: 16.7.0 |
7205 | 7238 | transitivePeerDependencies: |
7206 | 7239 | - bufferutil |
... | ... | @@ -7209,16 +7242,16 @@ packages: |
7209 | 7242 | - utf-8-validate |
7210 | 7243 | dev: true |
7211 | 7244 | |
7212 | - /jest-environment-node/27.3.1: | |
7213 | - resolution: {integrity: sha512-T89F/FgkE8waqrTSA7/ydMkcc52uYPgZZ6q8OaZgyiZkJb5QNNCF6oPZjH9IfPFfcc9uBWh1574N0kY0pSvTXw==} | |
7245 | + /jest-environment-node/27.4.0: | |
7246 | + resolution: {integrity: sha512-VG3jLukpPhpffd7dUiC7+usyTG8Omytg4NOjGQtv88208O2AAMwcqpOAl1/uVOhUvbiegtVztyd3ZzAQtBxifA==} | |
7214 | 7247 | engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} |
7215 | 7248 | dependencies: |
7216 | - '@jest/environment': 27.3.1 | |
7217 | - '@jest/fake-timers': 27.3.1 | |
7218 | - '@jest/types': 27.2.5 | |
7249 | + '@jest/environment': 27.4.0 | |
7250 | + '@jest/fake-timers': 27.4.0 | |
7251 | + '@jest/types': 27.4.0 | |
7219 | 7252 | '@types/node': 16.11.10 |
7220 | - jest-mock: 27.3.0 | |
7221 | - jest-util: 27.3.1 | |
7253 | + jest-mock: 27.4.0 | |
7254 | + jest-util: 27.4.0 | |
7222 | 7255 | dev: true |
7223 | 7256 | |
7224 | 7257 | /jest-get-type/27.3.1: |
... | ... | @@ -7226,94 +7259,99 @@ packages: |
7226 | 7259 | engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} |
7227 | 7260 | dev: true |
7228 | 7261 | |
7229 | - /jest-haste-map/27.3.1: | |
7230 | - resolution: {integrity: sha512-lYfNZIzwPccDJZIyk9Iz5iQMM/MH56NIIcGj7AFU1YyA4ewWFBl8z+YPJuSCRML/ee2cCt2y3W4K3VXPT6Nhzg==} | |
7262 | + /jest-get-type/27.4.0: | |
7263 | + resolution: {integrity: sha512-tk9o+ld5TWq41DkK14L4wox4s2D9MtTpKaAVzXfr5CUKm5ZK2ExcaFE0qls2W71zE/6R2TxxrK9w2r6svAFDBQ==} | |
7264 | + engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} | |
7265 | + dev: true | |
7266 | + | |
7267 | + /jest-haste-map/27.4.0: | |
7268 | + resolution: {integrity: sha512-xTXw1/JBJvdvTEsnTlRj9u9AAg2t23r5GHbtc5eC6AuEIRPfGWV02Y67U0p4K1KpEWLsk9Pb3b6Kfde/5a3C5A==} | |
7231 | 7269 | engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} |
7232 | 7270 | dependencies: |
7233 | - '@jest/types': 27.2.5 | |
7271 | + '@jest/types': 27.4.0 | |
7234 | 7272 | '@types/graceful-fs': 4.1.5 |
7235 | 7273 | '@types/node': 16.11.10 |
7236 | 7274 | anymatch: 3.1.2 |
7237 | 7275 | fb-watchman: 2.0.1 |
7238 | 7276 | graceful-fs: 4.2.8 |
7239 | - jest-regex-util: 27.0.6 | |
7240 | - jest-serializer: 27.0.6 | |
7241 | - jest-util: 27.3.1 | |
7242 | - jest-worker: 27.3.1 | |
7277 | + jest-regex-util: 27.4.0 | |
7278 | + jest-serializer: 27.4.0 | |
7279 | + jest-util: 27.4.0 | |
7280 | + jest-worker: 27.4.0 | |
7243 | 7281 | micromatch: 4.0.4 |
7244 | 7282 | walker: 1.0.8 |
7245 | 7283 | optionalDependencies: |
7246 | 7284 | fsevents: 2.3.2 |
7247 | 7285 | dev: true |
7248 | 7286 | |
7249 | - /jest-jasmine2/27.3.1: | |
7250 | - resolution: {integrity: sha512-WK11ZUetDQaC09w4/j7o4FZDUIp+4iYWH/Lik34Pv7ukL+DuXFGdnmmi7dT58J2ZYKFB5r13GyE0z3NPeyJmsg==} | |
7287 | + /jest-jasmine2/27.4.0: | |
7288 | + resolution: {integrity: sha512-yvfWhQM/ZoxXfBZJdiKXCQxt18pOrciQUDqkT+EXtzhpKPIsbPdWCVv53NOqeWnRQR4HVhNgKK/fYD6BUXCxzA==} | |
7251 | 7289 | engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} |
7252 | 7290 | dependencies: |
7253 | 7291 | '@babel/traverse': 7.16.3 |
7254 | - '@jest/environment': 27.3.1 | |
7255 | - '@jest/source-map': 27.0.6 | |
7256 | - '@jest/test-result': 27.3.1 | |
7257 | - '@jest/types': 27.2.5 | |
7292 | + '@jest/environment': 27.4.0 | |
7293 | + '@jest/source-map': 27.4.0 | |
7294 | + '@jest/test-result': 27.4.0 | |
7295 | + '@jest/types': 27.4.0 | |
7258 | 7296 | '@types/node': 16.11.10 |
7259 | 7297 | chalk: 4.1.2 |
7260 | 7298 | co: 4.6.0 |
7261 | - expect: 27.3.1 | |
7299 | + expect: 27.4.0 | |
7262 | 7300 | is-generator-fn: 2.1.0 |
7263 | - jest-each: 27.3.1 | |
7264 | - jest-matcher-utils: 27.3.1 | |
7265 | - jest-message-util: 27.3.1 | |
7266 | - jest-runtime: 27.3.1 | |
7267 | - jest-snapshot: 27.3.1 | |
7268 | - jest-util: 27.3.1 | |
7269 | - pretty-format: 27.3.1 | |
7301 | + jest-each: 27.4.0 | |
7302 | + jest-matcher-utils: 27.4.0 | |
7303 | + jest-message-util: 27.4.0 | |
7304 | + jest-runtime: 27.4.0 | |
7305 | + jest-snapshot: 27.4.0 | |
7306 | + jest-util: 27.4.0 | |
7307 | + pretty-format: 27.4.0 | |
7270 | 7308 | throat: 6.0.1 |
7271 | 7309 | transitivePeerDependencies: |
7272 | 7310 | - supports-color |
7273 | 7311 | dev: true |
7274 | 7312 | |
7275 | - /jest-leak-detector/27.3.1: | |
7276 | - resolution: {integrity: sha512-78QstU9tXbaHzwlRlKmTpjP9k4Pvre5l0r8Spo4SbFFVy/4Abg9I6ZjHwjg2QyKEAMg020XcjP+UgLZIY50yEg==} | |
7313 | + /jest-leak-detector/27.4.0: | |
7314 | + resolution: {integrity: sha512-d7QeqzIOVQeMI6VROLPNeYagcxPCvqYD6A34Ol9D+vPzs72omGXsGbuuJrChD51zuA4ESXcLYZ81L9JHr1VYGw==} | |
7277 | 7315 | engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} |
7278 | 7316 | dependencies: |
7279 | - jest-get-type: 27.3.1 | |
7280 | - pretty-format: 27.3.1 | |
7317 | + jest-get-type: 27.4.0 | |
7318 | + pretty-format: 27.4.0 | |
7281 | 7319 | dev: true |
7282 | 7320 | |
7283 | - /jest-matcher-utils/27.3.1: | |
7284 | - resolution: {integrity: sha512-hX8N7zXS4k+8bC1Aj0OWpGb7D3gIXxYvPNK1inP5xvE4ztbz3rc4AkI6jGVaerepBnfWB17FL5lWFJT3s7qo8w==} | |
7321 | + /jest-matcher-utils/27.4.0: | |
7322 | + resolution: {integrity: sha512-vBy1tEyuKiItYgV9x9ubccyadOy5xAAmDBgXk8dMppXBXG4glggrGcZvE+8l1r+te477bRcFLB/hRyGm5Tdxzw==} | |
7285 | 7323 | engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} |
7286 | 7324 | dependencies: |
7287 | 7325 | chalk: 4.1.2 |
7288 | - jest-diff: 27.3.1 | |
7289 | - jest-get-type: 27.3.1 | |
7290 | - pretty-format: 27.3.1 | |
7326 | + jest-diff: 27.4.0 | |
7327 | + jest-get-type: 27.4.0 | |
7328 | + pretty-format: 27.4.0 | |
7291 | 7329 | dev: true |
7292 | 7330 | |
7293 | - /jest-message-util/27.3.1: | |
7294 | - resolution: {integrity: sha512-bh3JEmxsTZ/9rTm0jQrPElbY2+y48Rw2t47uMfByNyUVR+OfPh4anuyKsGqsNkXk/TI4JbLRZx+7p7Hdt6q1yg==} | |
7331 | + /jest-message-util/27.4.0: | |
7332 | + resolution: {integrity: sha512-2KmfpnxFwt+5CF0YST6U1IwFomX9gx2dmcAV/ZjzF9/4tlmieExl7Ch7D36l94mIxWTXhDuPji4XOvxRBdswrQ==} | |
7295 | 7333 | engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} |
7296 | 7334 | dependencies: |
7297 | 7335 | '@babel/code-frame': 7.16.0 |
7298 | - '@jest/types': 27.2.5 | |
7336 | + '@jest/types': 27.4.0 | |
7299 | 7337 | '@types/stack-utils': 2.0.1 |
7300 | 7338 | chalk: 4.1.2 |
7301 | 7339 | graceful-fs: 4.2.8 |
7302 | 7340 | micromatch: 4.0.4 |
7303 | - pretty-format: 27.3.1 | |
7341 | + pretty-format: 27.4.0 | |
7304 | 7342 | slash: 3.0.0 |
7305 | 7343 | stack-utils: 2.0.5 |
7306 | 7344 | dev: true |
7307 | 7345 | |
7308 | - /jest-mock/27.3.0: | |
7309 | - resolution: {integrity: sha512-ziZiLk0elZOQjD08bLkegBzv5hCABu/c8Ytx45nJKkysQwGaonvmTxwjLqEA4qGdasq9o2I8/HtdGMNnVsMTGw==} | |
7346 | + /jest-mock/27.4.0: | |
7347 | + resolution: {integrity: sha512-hQMpGIFEjhb6rtOz4JZcZaMdQytXjm54tBif9rpXfdzbEgYZ9+JGOUNqdtu3n09KG95/zEVwRI07HAuoSV1Dxw==} | |
7310 | 7348 | engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} |
7311 | 7349 | dependencies: |
7312 | - '@jest/types': 27.2.5 | |
7350 | + '@jest/types': 27.4.0 | |
7313 | 7351 | '@types/node': 16.11.10 |
7314 | 7352 | dev: true |
7315 | 7353 | |
7316 | - /jest-pnp-resolver/1.2.2_jest-resolve@27.3.1: | |
7354 | + /jest-pnp-resolver/1.2.2_jest-resolve@27.4.0: | |
7317 | 7355 | resolution: {integrity: sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==} |
7318 | 7356 | engines: {node: '>=6'} |
7319 | 7357 | peerDependencies: |
... | ... | @@ -7322,65 +7360,65 @@ packages: |
7322 | 7360 | jest-resolve: |
7323 | 7361 | optional: true |
7324 | 7362 | dependencies: |
7325 | - jest-resolve: 27.3.1 | |
7363 | + jest-resolve: 27.4.0 | |
7326 | 7364 | dev: true |
7327 | 7365 | |
7328 | - /jest-regex-util/27.0.6: | |
7329 | - resolution: {integrity: sha512-SUhPzBsGa1IKm8hx2F4NfTGGp+r7BXJ4CulsZ1k2kI+mGLG+lxGrs76veN2LF/aUdGosJBzKgXmNCw+BzFqBDQ==} | |
7366 | + /jest-regex-util/27.4.0: | |
7367 | + resolution: {integrity: sha512-WeCpMpNnqJYMQoOjm1nTtsgbR4XHAk1u00qDoNBQoykM280+/TmgA5Qh5giC1ecy6a5d4hbSsHzpBtu5yvlbEg==} | |
7330 | 7368 | engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} |
7331 | 7369 | dev: true |
7332 | 7370 | |
7333 | - /jest-resolve-dependencies/27.3.1: | |
7334 | - resolution: {integrity: sha512-X7iLzY8pCiYOnvYo2YrK3P9oSE8/3N2f4pUZMJ8IUcZnT81vlSonya1KTO9ZfKGuC+svE6FHK/XOb8SsoRUV1A==} | |
7371 | + /jest-resolve-dependencies/27.4.0: | |
7372 | + resolution: {integrity: sha512-D+Ean4nLgbRqhWCSKJIWpC36O7itmZbVQjnHWLF4brAP0r2sGATXjjhERIaiBCt/V2IhCDcH0EvS+PA7gSrf5g==} | |
7335 | 7373 | engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} |
7336 | 7374 | dependencies: |
7337 | - '@jest/types': 27.2.5 | |
7338 | - jest-regex-util: 27.0.6 | |
7339 | - jest-snapshot: 27.3.1 | |
7375 | + '@jest/types': 27.4.0 | |
7376 | + jest-regex-util: 27.4.0 | |
7377 | + jest-snapshot: 27.4.0 | |
7340 | 7378 | transitivePeerDependencies: |
7341 | 7379 | - supports-color |
7342 | 7380 | dev: true |
7343 | 7381 | |
7344 | - /jest-resolve/27.3.1: | |
7345 | - resolution: {integrity: sha512-Dfzt25CFSPo3Y3GCbxynRBZzxq9AdyNN+x/v2IqYx6KVT5Z6me2Z/PsSGFSv3cOSUZqJ9pHxilao/I/m9FouLw==} | |
7382 | + /jest-resolve/27.4.0: | |
7383 | + resolution: {integrity: sha512-XF54RYG9a9fHTlovCwC5U49TVAfCkHLoJnMhgaT2AYif4E5BechlKUAlhYE4fkbr1J5LzP7O9qfgRA5JSR8HzQ==} | |
7346 | 7384 | engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} |
7347 | 7385 | dependencies: |
7348 | - '@jest/types': 27.2.5 | |
7386 | + '@jest/types': 27.4.0 | |
7349 | 7387 | chalk: 4.1.2 |
7350 | 7388 | graceful-fs: 4.2.8 |
7351 | - jest-haste-map: 27.3.1 | |
7352 | - jest-pnp-resolver: 1.2.2_jest-resolve@27.3.1 | |
7353 | - jest-util: 27.3.1 | |
7354 | - jest-validate: 27.3.1 | |
7389 | + jest-haste-map: 27.4.0 | |
7390 | + jest-pnp-resolver: 1.2.2_jest-resolve@27.4.0 | |
7391 | + jest-util: 27.4.0 | |
7392 | + jest-validate: 27.4.0 | |
7355 | 7393 | resolve: 1.20.0 |
7356 | 7394 | resolve.exports: 1.1.0 |
7357 | 7395 | slash: 3.0.0 |
7358 | 7396 | dev: true |
7359 | 7397 | |
7360 | - /jest-runner/27.3.1: | |
7361 | - resolution: {integrity: sha512-r4W6kBn6sPr3TBwQNmqE94mPlYVn7fLBseeJfo4E2uCTmAyDFm2O5DYAQAFP7Q3YfiA/bMwg8TVsciP7k0xOww==} | |
7398 | + /jest-runner/27.4.0: | |
7399 | + resolution: {integrity: sha512-ncnnOVQlqDorBAMNTuA2Htg3XJlnwAySpUBDmlJy4+WEwb5zB2cDLA3roPSMe0lVn8mGGXccl1/a8xwvE6txiQ==} | |
7362 | 7400 | engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} |
7363 | 7401 | dependencies: |
7364 | - '@jest/console': 27.3.1 | |
7365 | - '@jest/environment': 27.3.1 | |
7366 | - '@jest/test-result': 27.3.1 | |
7367 | - '@jest/transform': 27.3.1 | |
7368 | - '@jest/types': 27.2.5 | |
7402 | + '@jest/console': 27.4.0 | |
7403 | + '@jest/environment': 27.4.0 | |
7404 | + '@jest/test-result': 27.4.0 | |
7405 | + '@jest/transform': 27.4.0 | |
7406 | + '@jest/types': 27.4.0 | |
7369 | 7407 | '@types/node': 16.11.10 |
7370 | 7408 | chalk: 4.1.2 |
7371 | 7409 | emittery: 0.8.1 |
7372 | 7410 | exit: 0.1.2 |
7373 | 7411 | graceful-fs: 4.2.8 |
7374 | - jest-docblock: 27.0.6 | |
7375 | - jest-environment-jsdom: 27.3.1 | |
7376 | - jest-environment-node: 27.3.1 | |
7377 | - jest-haste-map: 27.3.1 | |
7378 | - jest-leak-detector: 27.3.1 | |
7379 | - jest-message-util: 27.3.1 | |
7380 | - jest-resolve: 27.3.1 | |
7381 | - jest-runtime: 27.3.1 | |
7382 | - jest-util: 27.3.1 | |
7383 | - jest-worker: 27.3.1 | |
7412 | + jest-docblock: 27.4.0 | |
7413 | + jest-environment-jsdom: 27.4.0 | |
7414 | + jest-environment-node: 27.4.0 | |
7415 | + jest-haste-map: 27.4.0 | |
7416 | + jest-leak-detector: 27.4.0 | |
7417 | + jest-message-util: 27.4.0 | |
7418 | + jest-resolve: 27.4.0 | |
7419 | + jest-runtime: 27.4.0 | |
7420 | + jest-util: 27.4.0 | |
7421 | + jest-worker: 27.4.0 | |
7384 | 7422 | source-map-support: 0.5.21 |
7385 | 7423 | throat: 6.0.1 |
7386 | 7424 | transitivePeerDependencies: |
... | ... | @@ -7390,17 +7428,17 @@ packages: |
7390 | 7428 | - utf-8-validate |
7391 | 7429 | dev: true |
7392 | 7430 | |
7393 | - /jest-runtime/27.3.1: | |
7394 | - resolution: {integrity: sha512-qtO6VxPbS8umqhEDpjA4pqTkKQ1Hy4ZSi9mDVeE9Za7LKBo2LdW2jmT+Iod3XFaJqINikZQsn2wEi0j9wPRbLg==} | |
7431 | + /jest-runtime/27.4.0: | |
7432 | + resolution: {integrity: sha512-8IcQQFhVWWNq45wuDYooIDNdmhOVebOsIDOfXN/Xbw4h/6G1qy9+i5OND7Qmb4g+cSawK5C2tAdHcdR8Q9eSew==} | |
7395 | 7433 | engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} |
7396 | 7434 | dependencies: |
7397 | - '@jest/console': 27.3.1 | |
7398 | - '@jest/environment': 27.3.1 | |
7399 | - '@jest/globals': 27.3.1 | |
7400 | - '@jest/source-map': 27.0.6 | |
7401 | - '@jest/test-result': 27.3.1 | |
7402 | - '@jest/transform': 27.3.1 | |
7403 | - '@jest/types': 27.2.5 | |
7435 | + '@jest/console': 27.4.0 | |
7436 | + '@jest/environment': 27.4.0 | |
7437 | + '@jest/globals': 27.4.0 | |
7438 | + '@jest/source-map': 27.4.0 | |
7439 | + '@jest/test-result': 27.4.0 | |
7440 | + '@jest/transform': 27.4.0 | |
7441 | + '@jest/types': 27.4.0 | |
7404 | 7442 | '@types/yargs': 16.0.4 |
7405 | 7443 | chalk: 4.1.2 |
7406 | 7444 | cjs-module-lexer: 1.2.2 |
... | ... | @@ -7409,14 +7447,14 @@ packages: |
7409 | 7447 | exit: 0.1.2 |
7410 | 7448 | glob: 7.2.0 |
7411 | 7449 | graceful-fs: 4.2.8 |
7412 | - jest-haste-map: 27.3.1 | |
7413 | - jest-message-util: 27.3.1 | |
7414 | - jest-mock: 27.3.0 | |
7415 | - jest-regex-util: 27.0.6 | |
7416 | - jest-resolve: 27.3.1 | |
7417 | - jest-snapshot: 27.3.1 | |
7418 | - jest-util: 27.3.1 | |
7419 | - jest-validate: 27.3.1 | |
7450 | + jest-haste-map: 27.4.0 | |
7451 | + jest-message-util: 27.4.0 | |
7452 | + jest-mock: 27.4.0 | |
7453 | + jest-regex-util: 27.4.0 | |
7454 | + jest-resolve: 27.4.0 | |
7455 | + jest-snapshot: 27.4.0 | |
7456 | + jest-util: 27.4.0 | |
7457 | + jest-validate: 27.4.0 | |
7420 | 7458 | slash: 3.0.0 |
7421 | 7459 | strip-bom: 4.0.0 |
7422 | 7460 | yargs: 16.2.0 |
... | ... | @@ -7424,16 +7462,16 @@ packages: |
7424 | 7462 | - supports-color |
7425 | 7463 | dev: true |
7426 | 7464 | |
7427 | - /jest-serializer/27.0.6: | |
7428 | - resolution: {integrity: sha512-PtGdVK9EGC7dsaziskfqaAPib6wTViY3G8E5wz9tLVPhHyiDNTZn/xjZ4khAw+09QkoOVpn7vF5nPSN6dtBexA==} | |
7465 | + /jest-serializer/27.4.0: | |
7466 | + resolution: {integrity: sha512-RDhpcn5f1JYTX2pvJAGDcnsNTnsV9bjYPU8xcV+xPwOXnUPOQwf4ZEuiU6G9H1UztH+OapMgu/ckEVwO87PwnQ==} | |
7429 | 7467 | engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} |
7430 | 7468 | dependencies: |
7431 | 7469 | '@types/node': 16.11.10 |
7432 | 7470 | graceful-fs: 4.2.8 |
7433 | 7471 | dev: true |
7434 | 7472 | |
7435 | - /jest-snapshot/27.3.1: | |
7436 | - resolution: {integrity: sha512-APZyBvSgQgOT0XumwfFu7X3G5elj6TGhCBLbBdn3R1IzYustPGPE38F51dBWMQ8hRXa9je0vAdeVDtqHLvB6lg==} | |
7473 | + /jest-snapshot/27.4.0: | |
7474 | + resolution: {integrity: sha512-iOisfzB00tQE/rk+LzLzjbjElT4Lq26ZrYHX/1OfhVb7IZbu/2i4bkS7YK3fimfw3zleWRTleUMCmWGi+GCjpQ==} | |
7437 | 7475 | engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} |
7438 | 7476 | dependencies: |
7439 | 7477 | '@babel/core': 7.16.0 |
... | ... | @@ -7442,23 +7480,23 @@ packages: |
7442 | 7480 | '@babel/plugin-syntax-typescript': 7.16.0_@babel+core@7.16.0 |
7443 | 7481 | '@babel/traverse': 7.16.3 |
7444 | 7482 | '@babel/types': 7.16.0 |
7445 | - '@jest/transform': 27.3.1 | |
7446 | - '@jest/types': 27.2.5 | |
7483 | + '@jest/transform': 27.4.0 | |
7484 | + '@jest/types': 27.4.0 | |
7447 | 7485 | '@types/babel__traverse': 7.14.2 |
7448 | 7486 | '@types/prettier': 2.4.2 |
7449 | 7487 | babel-preset-current-node-syntax: 1.0.1_@babel+core@7.16.0 |
7450 | 7488 | chalk: 4.1.2 |
7451 | - expect: 27.3.1 | |
7489 | + expect: 27.4.0 | |
7452 | 7490 | graceful-fs: 4.2.8 |
7453 | - jest-diff: 27.3.1 | |
7454 | - jest-get-type: 27.3.1 | |
7455 | - jest-haste-map: 27.3.1 | |
7456 | - jest-matcher-utils: 27.3.1 | |
7457 | - jest-message-util: 27.3.1 | |
7458 | - jest-resolve: 27.3.1 | |
7459 | - jest-util: 27.3.1 | |
7491 | + jest-diff: 27.4.0 | |
7492 | + jest-get-type: 27.4.0 | |
7493 | + jest-haste-map: 27.4.0 | |
7494 | + jest-matcher-utils: 27.4.0 | |
7495 | + jest-message-util: 27.4.0 | |
7496 | + jest-resolve: 27.4.0 | |
7497 | + jest-util: 27.4.0 | |
7460 | 7498 | natural-compare: 1.4.0 |
7461 | - pretty-format: 27.3.1 | |
7499 | + pretty-format: 27.4.0 | |
7462 | 7500 | semver: 7.3.5 |
7463 | 7501 | transitivePeerDependencies: |
7464 | 7502 | - supports-color |
... | ... | @@ -7476,28 +7514,40 @@ packages: |
7476 | 7514 | picomatch: 2.3.0 |
7477 | 7515 | dev: true |
7478 | 7516 | |
7479 | - /jest-validate/27.3.1: | |
7480 | - resolution: {integrity: sha512-3H0XCHDFLA9uDII67Bwi1Vy7AqwA5HqEEjyy934lgVhtJ3eisw6ShOF1MDmRPspyikef5MyExvIm0/TuLzZ86Q==} | |
7517 | + /jest-util/27.4.0: | |
7518 | + resolution: {integrity: sha512-9HL5h/IWeg2u2dt0UIiseVRCnadh7CMPD4B9AeoEO23/NofaEfcPzIfl8dw45CpGHjP+xenw1viQYMd25DWquA==} | |
7481 | 7519 | engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} |
7482 | 7520 | dependencies: |
7483 | - '@jest/types': 27.2.5 | |
7521 | + '@jest/types': 27.4.0 | |
7522 | + '@types/node': 16.11.10 | |
7523 | + chalk: 4.1.2 | |
7524 | + ci-info: 3.3.0 | |
7525 | + graceful-fs: 4.2.8 | |
7526 | + picomatch: 2.3.0 | |
7527 | + dev: true | |
7528 | + | |
7529 | + /jest-validate/27.4.0: | |
7530 | + resolution: {integrity: sha512-Gsfh/KtS7fXDNzz3oKmB1F8dFVqWwqOwhUqEHhKM8Y0R0bJK8R2HLiuqKfnqfbuybdiGiVdzqaK5c0poZaQAew==} | |
7531 | + engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} | |
7532 | + dependencies: | |
7533 | + '@jest/types': 27.4.0 | |
7484 | 7534 | camelcase: 6.2.1 |
7485 | 7535 | chalk: 4.1.2 |
7486 | - jest-get-type: 27.3.1 | |
7536 | + jest-get-type: 27.4.0 | |
7487 | 7537 | leven: 3.1.0 |
7488 | - pretty-format: 27.3.1 | |
7538 | + pretty-format: 27.4.0 | |
7489 | 7539 | dev: true |
7490 | 7540 | |
7491 | - /jest-watcher/27.3.1: | |
7492 | - resolution: {integrity: sha512-9/xbV6chABsGHWh9yPaAGYVVKurWoP3ZMCv6h+O1v9/+pkOroigs6WzZ0e9gLP/njokUwM7yQhr01LKJVMkaZA==} | |
7541 | + /jest-watcher/27.4.0: | |
7542 | + resolution: {integrity: sha512-0ZXzsp/NArW6IXxo4g7DP/nCJqS/OLCZyl08qzd8ANGSEoTsliivBumjUK5/0gvx/K4Oc60APNyTMfJJ6WENcg==} | |
7493 | 7543 | engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} |
7494 | 7544 | dependencies: |
7495 | - '@jest/test-result': 27.3.1 | |
7496 | - '@jest/types': 27.2.5 | |
7545 | + '@jest/test-result': 27.4.0 | |
7546 | + '@jest/types': 27.4.0 | |
7497 | 7547 | '@types/node': 16.11.10 |
7498 | 7548 | ansi-escapes: 4.3.2 |
7499 | 7549 | chalk: 4.1.2 |
7500 | - jest-util: 27.3.1 | |
7550 | + jest-util: 27.4.0 | |
7501 | 7551 | string-length: 4.0.2 |
7502 | 7552 | dev: true |
7503 | 7553 | |
... | ... | @@ -7510,8 +7560,8 @@ packages: |
7510 | 7560 | supports-color: 7.2.0 |
7511 | 7561 | dev: true |
7512 | 7562 | |
7513 | - /jest-worker/27.3.1: | |
7514 | - resolution: {integrity: sha512-ks3WCzsiZaOPJl/oMsDjaf0TRiSv7ctNgs0FqRr2nARsovz6AWWy4oLElwcquGSz692DzgZQrCLScPNs5YlC4g==} | |
7563 | + /jest-worker/27.4.0: | |
7564 | + resolution: {integrity: sha512-4WuKcUxtzxBoKOUFbt1MtTY9fJwPVD4aN/4Cgxee7OLetPZn5as2bjfZz98XSf2Zq1JFfhqPZpS+43BmWXKgCA==} | |
7515 | 7565 | engines: {node: '>= 10.13.0'} |
7516 | 7566 | dependencies: |
7517 | 7567 | '@types/node': 16.11.10 |
... | ... | @@ -7519,8 +7569,8 @@ packages: |
7519 | 7569 | supports-color: 8.1.1 |
7520 | 7570 | dev: true |
7521 | 7571 | |
7522 | - /jest/27.3.1_ts-node@10.4.0: | |
7523 | - resolution: {integrity: sha512-U2AX0AgQGd5EzMsiZpYt8HyZ+nSVIh5ujQ9CPp9EQZJMjXIiSZpJNweZl0swatKRoqHWgGKM3zaSwm4Zaz87ng==} | |
7572 | + /jest/27.4.0_ts-node@10.4.0: | |
7573 | + resolution: {integrity: sha512-54SYE6EmGRoHS+9/OCspbb7tAD2WYAvBBXmny2Zp39/QgnNIWZD4KujhAZyRXHWASTBa9/WfXM2oekNBIOFV2A==} | |
7524 | 7574 | engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} |
7525 | 7575 | hasBin: true |
7526 | 7576 | peerDependencies: |
... | ... | @@ -7529,9 +7579,9 @@ packages: |
7529 | 7579 | node-notifier: |
7530 | 7580 | optional: true |
7531 | 7581 | dependencies: |
7532 | - '@jest/core': 27.3.1_ts-node@10.4.0 | |
7582 | + '@jest/core': 27.4.0_ts-node@10.4.0 | |
7533 | 7583 | import-local: 3.0.3 |
7534 | - jest-cli: 27.3.1_ts-node@10.4.0 | |
7584 | + jest-cli: 27.4.0_ts-node@10.4.0 | |
7535 | 7585 | transitivePeerDependencies: |
7536 | 7586 | - bufferutil |
7537 | 7587 | - canvas |
... | ... | @@ -9178,6 +9228,16 @@ packages: |
9178 | 9228 | react-is: 17.0.2 |
9179 | 9229 | dev: true |
9180 | 9230 | |
9231 | + /pretty-format/27.4.0: | |
9232 | + resolution: {integrity: sha512-n0QR6hMREfp6nLzfVksXMAfIxk1ffOOfbb/FzKHFmRtn9iJKaZXB8WMzLr8a72IASShEAhqK06nlwp1gVWgqKg==} | |
9233 | + engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} | |
9234 | + dependencies: | |
9235 | + '@jest/types': 27.4.0 | |
9236 | + ansi-regex: 5.0.1 | |
9237 | + ansi-styles: 5.2.0 | |
9238 | + react-is: 17.0.2 | |
9239 | + dev: true | |
9240 | + | |
9181 | 9241 | /print-js/1.6.0: |
9182 | 9242 | resolution: {integrity: sha512-BfnOIzSKbqGRtO4o0rnj/K3681BSd2QUrsIZy/+WdCIugjIswjmx3lDEZpXB2ruGf9d4b3YNINri81+J0FsBWg==} |
9183 | 9243 | dev: false |
... | ... | @@ -10820,7 +10880,7 @@ packages: |
10820 | 10880 | escape-string-regexp: 1.0.5 |
10821 | 10881 | dev: true |
10822 | 10882 | |
10823 | - /ts-jest/27.0.7_7e2a439bb7b53c38ff0c1a3c5e04c2c5: | |
10883 | + /ts-jest/27.0.7_bfad92f4d8caf69d57ace222bbbf1afc: | |
10824 | 10884 | resolution: {integrity: sha512-O41shibMqzdafpuP+CkrOL7ykbmLh+FqQrXEmV9CydQ5JBk0Sj0uAEF5TNNe94fZWKm3yYvWa/IbyV4Yg1zK2Q==} |
10825 | 10885 | engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} |
10826 | 10886 | hasBin: true |
... | ... | @@ -10841,7 +10901,7 @@ packages: |
10841 | 10901 | '@types/jest': 27.0.3 |
10842 | 10902 | bs-logger: 0.2.6 |
10843 | 10903 | fast-json-stable-stringify: 2.1.0 |
10844 | - jest: 27.3.1_ts-node@10.4.0 | |
10904 | + jest: 27.4.0_ts-node@10.4.0 | |
10845 | 10905 | jest-util: 27.3.1 |
10846 | 10906 | json5: 2.2.0 |
10847 | 10907 | lodash.memoize: 4.1.2 |
... | ... | @@ -11279,13 +11339,13 @@ packages: |
11279 | 11339 | - supports-color |
11280 | 11340 | dev: true |
11281 | 11341 | |
11282 | - /vite-plugin-pwa/0.11.7_vite@2.7.0-beta.9: | |
11283 | - resolution: {integrity: sha512-sU+VrUNVP87E79GCCBTusdoiqja3Qapsrp48+xFDf28zaeNZ2nuuCoCIPshmyusGuY0I51wRFxiBjcbdheEBSw==} | |
11342 | + /vite-plugin-pwa/0.11.8_vite@2.7.0-beta.9: | |
11343 | + resolution: {integrity: sha512-IbiVEwvvXWlm2LeNPcTjnQfYTwPN/BDicbY6Nn9LNx2ECKjjCDDraLpqFe8v7OKATAiuXnx35q4DDI7UvJoqPw==} | |
11284 | 11344 | peerDependencies: |
11285 | 11345 | vite: ^2.0.0 |
11286 | 11346 | dependencies: |
11287 | 11347 | chalk: 4.1.2 |
11288 | - debug: 4.3.2 | |
11348 | + debug: 4.3.3 | |
11289 | 11349 | fast-glob: 3.2.7 |
11290 | 11350 | pretty-bytes: 5.6.0 |
11291 | 11351 | rollup: 2.60.1 |
... | ... | @@ -11466,22 +11526,22 @@ packages: |
11466 | 11526 | resolution: {integrity: sha512-u0Lw+IYlgbEJFF6/qAqG2d1jQmJl0eyAGJHoAJqr2HT4M2BNuQYSEiSE75f52pXHSJm8AlTjnLLbBFPrdz2hpA==} |
11467 | 11527 | dev: true |
11468 | 11528 | |
11469 | - /vscode-pug-languageservice/0.29.6: | |
11470 | - resolution: {integrity: sha512-gkoM82pkCzYW+dfkLVRh22Bt3rjMT9QYl2X9lx1vV8yjeJjdYKM0vIhhio7+ZtmOO94JkdKI2YwA0K619/YEIA==} | |
11529 | + /vscode-pug-languageservice/0.29.7: | |
11530 | + resolution: {integrity: sha512-OJ5N6Q1CU0uFvF8kSzRIqxsKYNGnexDss54DPSxla0f1E465ddHxxRsdI+bZQ8Va3rnyLBLGmEcM0gRn75DCWA==} | |
11471 | 11531 | dependencies: |
11472 | - '@volar/code-gen': 0.29.6 | |
11473 | - '@volar/shared': 0.29.6 | |
11474 | - '@volar/source-map': 0.29.6 | |
11475 | - '@volar/transforms': 0.29.6 | |
11532 | + '@volar/code-gen': 0.29.7 | |
11533 | + '@volar/shared': 0.29.7 | |
11534 | + '@volar/source-map': 0.29.7 | |
11535 | + '@volar/transforms': 0.29.7 | |
11476 | 11536 | pug-lexer: 5.0.1 |
11477 | 11537 | pug-parser: 6.0.0 |
11478 | 11538 | vscode-languageserver: 8.0.0-next.5 |
11479 | 11539 | dev: true |
11480 | 11540 | |
11481 | - /vscode-typescript-languageservice/0.29.6: | |
11482 | - resolution: {integrity: sha512-bPfQWUw6EIDS6mlvie896IZ0RgvhtehZIAWB/fmqPFH5FU/tEcGj4E3y9pZEwCtG9xUtBbW6UcVI71HmrOXB+Q==} | |
11541 | + /vscode-typescript-languageservice/0.29.7: | |
11542 | + resolution: {integrity: sha512-paqAiBPB3alZ/tnPHYf4y35+ob167r3YNZHWS1w7gKHqhnz/pOtdZG6MSya0FmSBRk9XdV//5xo3qZ5zZRCxjg==} | |
11483 | 11543 | dependencies: |
11484 | - '@volar/shared': 0.29.6 | |
11544 | + '@volar/shared': 0.29.7 | |
11485 | 11545 | semver: 7.3.5 |
11486 | 11546 | upath: 2.0.1 |
11487 | 11547 | vscode-languageserver: 8.0.0-next.5 |
... | ... | @@ -11496,18 +11556,18 @@ packages: |
11496 | 11556 | resolution: {integrity: sha512-jkjy6pjU1fxUvI51P+gCsxg1u2n8LSt0W6KrCNQceaziKzff74GoWmjVG46KieVzybO1sttPQmYfrwSHey7GUA==} |
11497 | 11557 | dev: true |
11498 | 11558 | |
11499 | - /vscode-vue-languageservice/0.29.6: | |
11500 | - resolution: {integrity: sha512-5qZY6wMxDdMC82uye5EiUcWEHci06an4liYFMDHO9h0VpulLifLN0L3jAUNGfgAMSnevKqzgvY6FsxEDxDR/8g==} | |
11559 | + /vscode-vue-languageservice/0.29.7: | |
11560 | + resolution: {integrity: sha512-YKIVJMLNmB81/D+z9hNMaSsn/4809bClYk5jk3X78zskGE7nIV9KfjhqY0LiO/SneF1ypvIxz/xJeEBILhDGBg==} | |
11501 | 11561 | dependencies: |
11502 | - '@volar/code-gen': 0.29.6 | |
11503 | - '@volar/html2pug': 0.29.6 | |
11504 | - '@volar/shared': 0.29.6 | |
11505 | - '@volar/source-map': 0.29.6 | |
11506 | - '@volar/transforms': 0.29.6 | |
11507 | - '@volar/vue-code-gen': 0.29.6 | |
11562 | + '@volar/code-gen': 0.29.7 | |
11563 | + '@volar/html2pug': 0.29.7 | |
11564 | + '@volar/shared': 0.29.7 | |
11565 | + '@volar/source-map': 0.29.7 | |
11566 | + '@volar/transforms': 0.29.7 | |
11567 | + '@volar/vue-code-gen': 0.29.7 | |
11508 | 11568 | '@vscode/emmet-helper': 2.8.2 |
11509 | - '@vue/reactivity': 3.2.22 | |
11510 | - '@vue/shared': 3.2.22 | |
11569 | + '@vue/reactivity': 3.2.23 | |
11570 | + '@vue/shared': 3.2.23 | |
11511 | 11571 | request-light: 0.5.5 |
11512 | 11572 | upath: 2.0.1 |
11513 | 11573 | vscode-css-languageservice: 5.1.8 |
... | ... | @@ -11515,8 +11575,8 @@ packages: |
11515 | 11575 | vscode-json-languageservice: 4.1.10 |
11516 | 11576 | vscode-languageserver: 8.0.0-next.5 |
11517 | 11577 | vscode-languageserver-textdocument: 1.0.3 |
11518 | - vscode-pug-languageservice: 0.29.6 | |
11519 | - vscode-typescript-languageservice: 0.29.6 | |
11578 | + vscode-pug-languageservice: 0.29.7 | |
11579 | + vscode-typescript-languageservice: 0.29.7 | |
11520 | 11580 | dev: true |
11521 | 11581 | |
11522 | 11582 | /vue-demi/0.12.1_vue@3.2.23: |
... | ... | @@ -11583,15 +11643,15 @@ packages: |
11583 | 11643 | vue: 3.2.23 |
11584 | 11644 | dev: false |
11585 | 11645 | |
11586 | - /vue-tsc/0.29.6_typescript@4.5.2: | |
11587 | - resolution: {integrity: sha512-P0vBtyS19vacn97qJtx+ZaJzPq/vNA42D8oe+FT9dhCeiey3+nvuyzHVzYGK1/AQYaMGq6FAP+scK1hQtSQk7g==} | |
11646 | + /vue-tsc/0.29.7_typescript@4.5.2: | |
11647 | + resolution: {integrity: sha512-8jCGovixOZgV6Qu9nOyoTon3HUNUG9YD8cnMHUCGqdu/H21P5D+4k/d8rHzpGvbUlwq5dP2pFCx6rmRwfTfDmA==} | |
11588 | 11648 | hasBin: true |
11589 | 11649 | peerDependencies: |
11590 | 11650 | typescript: '*' |
11591 | 11651 | dependencies: |
11592 | - '@volar/shared': 0.29.6 | |
11652 | + '@volar/shared': 0.29.7 | |
11593 | 11653 | typescript: 4.5.2 |
11594 | - vscode-vue-languageservice: 0.29.6 | |
11654 | + vscode-vue-languageservice: 0.29.7 | |
11595 | 11655 | dev: true |
11596 | 11656 | |
11597 | 11657 | /vue-types/3.0.2_vue@3.2.23: | ... | ... |
src/components/Tree/index.ts
src/components/Tree/src/Tree.vue
1 | 1 | <script lang="tsx"> |
2 | - import type { ReplaceFields, Keys, CheckKeys, TreeActionType, TreeItem } from './typing'; | |
3 | - import type { CheckEvent } from './typing'; | |
2 | + import type { CSSProperties } from 'vue'; | |
3 | + import type { FieldNames, TreeState, TreeItem, KeyType, CheckKeys, TreeActionType } from './tree'; | |
4 | 4 | |
5 | 5 | import { |
6 | 6 | defineComponent, |
... | ... | @@ -11,43 +11,31 @@ |
11 | 11 | watchEffect, |
12 | 12 | toRaw, |
13 | 13 | watch, |
14 | - CSSProperties, | |
15 | 14 | onMounted, |
16 | 15 | } from 'vue'; |
17 | 16 | import { Tree, Empty } from 'ant-design-vue'; |
18 | 17 | import { TreeIcon } from './TreeIcon'; |
19 | 18 | import { ScrollContainer } from '/@/components/Container'; |
20 | - import { omit, get, difference } from 'lodash-es'; | |
19 | + import { omit, get, difference, cloneDeep } from 'lodash-es'; | |
21 | 20 | import { isArray, isBoolean, isEmpty, isFunction } from '/@/utils/is'; |
22 | 21 | import { extendSlots, getSlot } from '/@/utils/helper/tsxHelper'; |
23 | 22 | import { filter, treeToList } from '/@/utils/helper/treeHelper'; |
24 | 23 | import { useTree } from './useTree'; |
25 | 24 | import { useContextMenu } from '/@/hooks/web/useContextMenu'; |
26 | - import { useDesign } from '/@/hooks/web/useDesign'; | |
27 | - import { basicProps } from './props'; | |
28 | 25 | import { CreateContextOptions } from '/@/components/ContextMenu'; |
29 | 26 | import TreeHeader from './TreeHeader.vue'; |
27 | + import { treeEmits, treeProps } from './tree'; | |
28 | + import { createBEM } from '/@/utils/bem'; | |
30 | 29 | |
31 | - interface State { | |
32 | - expandedKeys: Keys; | |
33 | - selectedKeys: Keys; | |
34 | - checkedKeys: CheckKeys; | |
35 | - checkStrictly: boolean; | |
36 | - } | |
37 | 30 | export default defineComponent({ |
38 | 31 | name: 'BasicTree', |
39 | 32 | inheritAttrs: false, |
40 | - props: basicProps, | |
41 | - emits: [ | |
42 | - 'update:expandedKeys', | |
43 | - 'update:selectedKeys', | |
44 | - 'update:value', | |
45 | - 'change', | |
46 | - 'check', | |
47 | - 'update:searchValue', | |
48 | - ], | |
33 | + props: treeProps, | |
34 | + emits: treeEmits, | |
49 | 35 | setup(props, { attrs, slots, emit, expose }) { |
50 | - const state = reactive<State>({ | |
36 | + const [bem] = createBEM('tree'); | |
37 | + | |
38 | + const state = reactive<TreeState>({ | |
51 | 39 | checkStrictly: props.checkStrictly, |
52 | 40 | expandedKeys: props.expandedKeys || [], |
53 | 41 | selectedKeys: props.selectedKeys || [], |
... | ... | @@ -63,15 +51,14 @@ |
63 | 51 | const treeDataRef = ref<TreeItem[]>([]); |
64 | 52 | |
65 | 53 | const [createContextMenu] = useContextMenu(); |
66 | - const { prefixCls } = useDesign('basic-tree'); | |
67 | 54 | |
68 | - const getReplaceFields = computed((): Required<ReplaceFields> => { | |
69 | - const { replaceFields } = props; | |
55 | + const getFieldNames = computed((): Required<FieldNames> => { | |
56 | + const { fieldNames } = props; | |
70 | 57 | return { |
71 | 58 | children: 'children', |
72 | 59 | title: 'title', |
73 | 60 | key: 'key', |
74 | - ...replaceFields, | |
61 | + ...fieldNames, | |
75 | 62 | }; |
76 | 63 | }); |
77 | 64 | |
... | ... | @@ -84,19 +71,19 @@ |
84 | 71 | selectedKeys: state.selectedKeys, |
85 | 72 | checkedKeys: state.checkedKeys, |
86 | 73 | checkStrictly: state.checkStrictly, |
87 | - replaceFields: unref(getReplaceFields), | |
88 | - 'onUpdate:expandedKeys': (v: Keys) => { | |
74 | + filedNames: unref(getFieldNames), | |
75 | + 'onUpdate:expandedKeys': (v: KeyType[]) => { | |
89 | 76 | state.expandedKeys = v; |
90 | 77 | emit('update:expandedKeys', v); |
91 | 78 | }, |
92 | - 'onUpdate:selectedKeys': (v: Keys) => { | |
79 | + 'onUpdate:selectedKeys': (v: KeyType[]) => { | |
93 | 80 | state.selectedKeys = v; |
94 | 81 | emit('update:selectedKeys', v); |
95 | 82 | }, |
96 | - onCheck: (v: CheckKeys, e: CheckEvent) => { | |
97 | - let currentValue = toRaw(state.checkedKeys) as Keys; | |
83 | + onCheck: (v: CheckKeys, e) => { | |
84 | + let currentValue = toRaw(state.checkedKeys) as KeyType[]; | |
98 | 85 | if (isArray(currentValue) && searchState.startSearch) { |
99 | - const { key } = unref(getReplaceFields); | |
86 | + const { key } = unref(getFieldNames); | |
100 | 87 | currentValue = difference(currentValue, getChildrenKeys(e.node.$attrs.node[key])); |
101 | 88 | if (e.checked) { |
102 | 89 | currentValue.push(e.node.$attrs.node[key]); |
... | ... | @@ -132,7 +119,7 @@ |
132 | 119 | getAllKeys, |
133 | 120 | getChildrenKeys, |
134 | 121 | getEnabledKeys, |
135 | - } = useTree(treeDataRef, getReplaceFields); | |
122 | + } = useTree(treeDataRef, getFieldNames); | |
136 | 123 | |
137 | 124 | function getIcon(params: Recordable, icon?: string) { |
138 | 125 | if (!icon) { |
... | ... | @@ -161,14 +148,14 @@ |
161 | 148 | createContextMenu(contextMenuOptions); |
162 | 149 | } |
163 | 150 | |
164 | - function setExpandedKeys(keys: Keys) { | |
151 | + function setExpandedKeys(keys: KeyType[]) { | |
165 | 152 | state.expandedKeys = keys; |
166 | 153 | } |
167 | 154 | |
168 | 155 | function getExpandedKeys() { |
169 | 156 | return state.expandedKeys; |
170 | 157 | } |
171 | - function setSelectedKeys(keys: Keys) { | |
158 | + function setSelectedKeys(keys: KeyType[]) { | |
172 | 159 | state.selectedKeys = keys; |
173 | 160 | } |
174 | 161 | |
... | ... | @@ -185,11 +172,11 @@ |
185 | 172 | } |
186 | 173 | |
187 | 174 | function checkAll(checkAll: boolean) { |
188 | - state.checkedKeys = checkAll ? getEnabledKeys() : ([] as Keys); | |
175 | + state.checkedKeys = checkAll ? getEnabledKeys() : ([] as KeyType[]); | |
189 | 176 | } |
190 | 177 | |
191 | 178 | function expandAll(expandAll: boolean) { |
192 | - state.expandedKeys = expandAll ? getAllKeys() : ([] as Keys); | |
179 | + state.expandedKeys = expandAll ? getAllKeys() : ([] as KeyType[]); | |
193 | 180 | } |
194 | 181 | |
195 | 182 | function onStrictlyChange(strictly: boolean) { |
... | ... | @@ -227,21 +214,21 @@ |
227 | 214 | const { filterFn, checkable, expandOnSearch, checkOnSearch, selectedOnSearch } = |
228 | 215 | unref(props); |
229 | 216 | searchState.startSearch = true; |
230 | - const { title: titleField, key: keyField } = unref(getReplaceFields); | |
217 | + const { title: titleField, key: keyField } = unref(getFieldNames); | |
231 | 218 | |
232 | 219 | const matchedKeys: string[] = []; |
233 | 220 | searchState.searchData = filter( |
234 | 221 | unref(treeDataRef), |
235 | 222 | (node) => { |
236 | 223 | const result = filterFn |
237 | - ? filterFn(searchValue, node, unref(getReplaceFields)) | |
224 | + ? filterFn(searchValue, node, unref(getFieldNames)) | |
238 | 225 | : node[titleField]?.includes(searchValue) ?? false; |
239 | 226 | if (result) { |
240 | 227 | matchedKeys.push(node[keyField]); |
241 | 228 | } |
242 | 229 | return result; |
243 | 230 | }, |
244 | - unref(getReplaceFields), | |
231 | + unref(getFieldNames), | |
245 | 232 | ); |
246 | 233 | |
247 | 234 | if (expandOnSearch) { |
... | ... | @@ -317,15 +304,6 @@ |
317 | 304 | }, |
318 | 305 | ); |
319 | 306 | |
320 | - // watchEffect(() => { | |
321 | - // console.log('======================'); | |
322 | - // console.log(props.value); | |
323 | - // console.log('======================'); | |
324 | - // if (props.value) { | |
325 | - // state.checkedKeys = props.value; | |
326 | - // } | |
327 | - // }); | |
328 | - | |
329 | 307 | watchEffect(() => { |
330 | 308 | state.checkStrictly = props.checkStrictly; |
331 | 309 | }); |
... | ... | @@ -354,8 +332,6 @@ |
354 | 332 | }, |
355 | 333 | }; |
356 | 334 | |
357 | - expose(instance); | |
358 | - | |
359 | 335 | function renderAction(node: TreeItem) { |
360 | 336 | const { actionList } = props; |
361 | 337 | if (!actionList || actionList.length === 0) return; |
... | ... | @@ -370,29 +346,25 @@ |
370 | 346 | if (!nodeShow) return null; |
371 | 347 | |
372 | 348 | return ( |
373 | - <span key={index} class={`${prefixCls}__action`}> | |
349 | + <span key={index} class={bem('action')}> | |
374 | 350 | {item.render(node)} |
375 | 351 | </span> |
376 | 352 | ); |
377 | 353 | }); |
378 | 354 | } |
379 | 355 | |
380 | - function renderTreeNode({ data, level }: { data: TreeItem[] | undefined; level: number }) { | |
381 | - if (!data) { | |
382 | - return null; | |
383 | - } | |
384 | - const searchText = searchState.searchText; | |
385 | - const { highlight } = unref(props); | |
386 | - return data.map((item) => { | |
356 | + const treeData = computed(() => { | |
357 | + const data = cloneDeep(getTreeData.value); | |
358 | + data.forEach((item) => { | |
359 | + const searchText = searchState.searchText; | |
360 | + const { highlight } = unref(props); | |
387 | 361 | const { |
388 | 362 | title: titleField, |
389 | 363 | key: keyField, |
390 | 364 | children: childrenField, |
391 | - } = unref(getReplaceFields); | |
365 | + } = unref(getFieldNames); | |
392 | 366 | |
393 | - const propsData = omit(item, 'title'); | |
394 | - const icon = getIcon({ ...item, level }, item.icon); | |
395 | - const children = get(item, childrenField) || []; | |
367 | + const icon = getIcon(item, item.icon); | |
396 | 368 | const title = get(item, titleField); |
397 | 369 | |
398 | 370 | const searchIdx = searchText ? title.indexOf(searchText) : -1; |
... | ... | @@ -401,7 +373,7 @@ |
401 | 373 | const highlightStyle = `color: ${isBoolean(highlight) ? '#f50' : highlight}`; |
402 | 374 | |
403 | 375 | const titleDom = isHighlight ? ( |
404 | - <span class={unref(getBindValues)?.blockNode ? `${prefixCls}__content` : ''}> | |
376 | + <span class={unref(getBindValues)?.blockNode ? `${bem('content')}` : ''}> | |
405 | 377 | <span>{title.substr(0, searchIdx)}</span> |
406 | 378 | <span style={highlightStyle}>{searchText}</span> |
407 | 379 | <span>{title.substr(searchIdx + (searchText as string).length)}</span> |
... | ... | @@ -409,41 +381,34 @@ |
409 | 381 | ) : ( |
410 | 382 | title |
411 | 383 | ); |
412 | - | |
413 | - return ( | |
414 | - <Tree.TreeNode {...propsData} node={toRaw(item)} key={get(item, keyField)}> | |
415 | - {{ | |
416 | - title: () => ( | |
417 | - <span | |
418 | - class={`${prefixCls}-title pl-2`} | |
419 | - onClick={handleClickNode.bind(null, item[keyField], item[childrenField])} | |
420 | - > | |
421 | - {item.slots?.title ? ( | |
422 | - getSlot(slots, item.slots?.title, item) | |
423 | - ) : ( | |
424 | - <> | |
425 | - {icon && <TreeIcon icon={icon} />} | |
426 | - {titleDom} | |
427 | - {/*{get(item, titleField)}*/} | |
428 | - <span class={`${prefixCls}__actions`}> | |
429 | - {renderAction({ ...item, level })} | |
430 | - </span> | |
431 | - </> | |
432 | - )} | |
433 | - </span> | |
434 | - ), | |
435 | - default: () => renderTreeNode({ data: children, level: level + 1 }), | |
436 | - }} | |
437 | - </Tree.TreeNode> | |
384 | + item.title = ( | |
385 | + <span | |
386 | + class={`${bem('title')} pl-2`} | |
387 | + onClick={handleClickNode.bind(null, item[keyField], item[childrenField])} | |
388 | + > | |
389 | + {item.slots?.title ? ( | |
390 | + getSlot(slots, item.slots?.title, item) | |
391 | + ) : ( | |
392 | + <> | |
393 | + {icon && <TreeIcon icon={icon} />} | |
394 | + {titleDom} | |
395 | + <span class={bem('actions')}>{renderAction(item)}</span> | |
396 | + </> | |
397 | + )} | |
398 | + </span> | |
438 | 399 | ); |
439 | 400 | }); |
440 | - } | |
401 | + return data; | |
402 | + }); | |
403 | + | |
404 | + expose(instance); | |
405 | + | |
441 | 406 | return () => { |
442 | 407 | const { title, helpMessage, toolbar, search, checkable } = props; |
443 | 408 | const showTitle = title || toolbar || search || slots.headerTitle; |
444 | 409 | const scrollStyle: CSSProperties = { height: 'calc(100% - 38px)' }; |
445 | 410 | return ( |
446 | - <div class={[prefixCls, 'h-full', attrs.class]}> | |
411 | + <div class={[bem(), 'h-full', attrs.class]}> | |
447 | 412 | {showTitle && ( |
448 | 413 | <TreeHeader |
449 | 414 | checkable={checkable} |
... | ... | @@ -461,15 +426,10 @@ |
461 | 426 | </TreeHeader> |
462 | 427 | )} |
463 | 428 | <ScrollContainer style={scrollStyle} v-show={!unref(getNotFound)}> |
464 | - <Tree {...unref(getBindValues)} showIcon={false}> | |
465 | - {{ | |
466 | - // switcherIcon: () => <DownOutlined />, | |
467 | - default: () => renderTreeNode({ data: unref(getTreeData), level: 1 }), | |
468 | - ...extendSlots(slots), | |
469 | - }} | |
429 | + <Tree {...unref(getBindValues)} showIcon={false} treeData={treeData.value}> | |
430 | + {extendSlots(slots)} | |
470 | 431 | </Tree> |
471 | 432 | </ScrollContainer> |
472 | - | |
473 | 433 | <Empty v-show={unref(getNotFound)} image={Empty.PRESENTED_IMAGE_SIMPLE} class="!mt-4" /> |
474 | 434 | </div> |
475 | 435 | ); |
... | ... | @@ -477,50 +437,3 @@ |
477 | 437 | }, |
478 | 438 | }); |
479 | 439 | </script> |
480 | -<style lang="less"> | |
481 | - @prefix-cls: ~'@{namespace}-basic-tree'; | |
482 | - | |
483 | - .@{prefix-cls} { | |
484 | - background-color: @component-background; | |
485 | - | |
486 | - .ant-tree-node-content-wrapper { | |
487 | - position: relative; | |
488 | - | |
489 | - .ant-tree-title { | |
490 | - position: absolute; | |
491 | - left: 0; | |
492 | - width: 100%; | |
493 | - } | |
494 | - } | |
495 | - | |
496 | - &-title { | |
497 | - position: relative; | |
498 | - display: flex; | |
499 | - align-items: center; | |
500 | - width: 100%; | |
501 | - padding-right: 10px; | |
502 | - | |
503 | - &:hover { | |
504 | - .@{prefix-cls}__action { | |
505 | - visibility: visible; | |
506 | - } | |
507 | - } | |
508 | - } | |
509 | - | |
510 | - &__content { | |
511 | - overflow: hidden; | |
512 | - } | |
513 | - | |
514 | - &__actions { | |
515 | - position: absolute; | |
516 | - top: 2px; | |
517 | - right: 3px; | |
518 | - display: flex; | |
519 | - } | |
520 | - | |
521 | - &__action { | |
522 | - margin-left: 4px; | |
523 | - visibility: hidden; | |
524 | - } | |
525 | - } | |
526 | -</style> | ... | ... |
src/components/Tree/src/TreeHeader.vue
1 | 1 | <template> |
2 | - <div class="flex px-2 py-1.5 items-center basic-tree-header"> | |
3 | - <slot name="headerTitle" v-if="$slots.headerTitle"></slot> | |
4 | - <BasicTitle :helpMessage="helpMessage" v-if="!$slots.headerTitle && title"> | |
2 | + <div :class="bem()" class="flex px-2 py-1.5 items-center"> | |
3 | + <slot name="headerTitle" v-if="slots.headerTitle"></slot> | |
4 | + <BasicTitle :helpMessage="helpMessage" v-if="!slots.headerTitle && title"> | |
5 | 5 | {{ title }} |
6 | 6 | </BasicTitle> |
7 | - | |
8 | 7 | <div |
9 | 8 | class="flex flex-1 justify-self-stretch items-center cursor-pointer" |
10 | 9 | v-if="search || toolbar" |
... | ... | @@ -33,148 +32,140 @@ |
33 | 32 | </div> |
34 | 33 | </div> |
35 | 34 | </template> |
36 | -<script lang="ts"> | |
37 | - import { PropType } from 'vue'; | |
38 | - import { defineComponent, computed, ref, watch } from 'vue'; | |
39 | - | |
40 | - import { Dropdown, Menu, Input } from 'ant-design-vue'; | |
35 | +<script lang="ts" setup> | |
36 | + import { computed, ref, watch, useSlots } from 'vue'; | |
37 | + import { Dropdown, Menu, MenuItem, MenuDivider, InputSearch } from 'ant-design-vue'; | |
41 | 38 | import { Icon } from '/@/components/Icon'; |
42 | 39 | import { BasicTitle } from '/@/components/Basic'; |
43 | - | |
44 | - import { propTypes } from '/@/utils/propTypes'; | |
45 | - | |
46 | 40 | import { useI18n } from '/@/hooks/web/useI18n'; |
47 | 41 | import { useDebounceFn } from '@vueuse/core'; |
42 | + import { createBEM } from '/@/utils/bem'; | |
43 | + import { ToolbarEnum } from './tree'; | |
48 | 44 | |
49 | - enum ToolbarEnum { | |
50 | - SELECT_ALL, | |
51 | - UN_SELECT_ALL, | |
52 | - EXPAND_ALL, | |
53 | - UN_EXPAND_ALL, | |
54 | - CHECK_STRICTLY, | |
55 | - CHECK_UN_STRICTLY, | |
56 | - } | |
45 | + const searchValue = ref(''); | |
57 | 46 | |
58 | - interface MenuInfo { | |
59 | - key: ToolbarEnum; | |
60 | - } | |
61 | - export default defineComponent({ | |
62 | - name: 'BasicTreeHeader', | |
63 | - components: { | |
64 | - BasicTitle, | |
65 | - Icon, | |
66 | - Dropdown, | |
67 | - Menu, | |
68 | - MenuItem: Menu.Item, | |
69 | - MenuDivider: Menu.Divider, | |
70 | - InputSearch: Input.Search, | |
47 | + const [bem] = createBEM('tree-header'); | |
48 | + | |
49 | + // eslint-disable vue/valid-define-emits | |
50 | + const props = defineProps({ | |
51 | + helpMessage: { | |
52 | + type: [String, Array] as PropType<string | string[]>, | |
53 | + default: '', | |
71 | 54 | }, |
72 | - props: { | |
73 | - helpMessage: { | |
74 | - type: [String, Array] as PropType<string | string[]>, | |
75 | - default: '', | |
76 | - }, | |
77 | - title: propTypes.string, | |
78 | - toolbar: propTypes.bool, | |
79 | - checkable: propTypes.bool, | |
80 | - search: propTypes.bool, | |
81 | - checkAll: propTypes.func, | |
82 | - expandAll: propTypes.func, | |
83 | - searchText: propTypes.string, | |
55 | + title: { | |
56 | + type: String, | |
57 | + default: '', | |
84 | 58 | }, |
85 | - emits: ['strictly-change', 'search'], | |
86 | - setup(props, { emit, slots }) { | |
87 | - const { t } = useI18n(); | |
88 | - const searchValue = ref(''); | |
59 | + toolbar: { | |
60 | + type: Boolean, | |
61 | + default: false, | |
62 | + }, | |
63 | + checkable: { | |
64 | + type: Boolean, | |
65 | + default: false, | |
66 | + }, | |
67 | + search: { | |
68 | + type: Boolean, | |
69 | + default: false, | |
70 | + }, | |
71 | + searchText: { | |
72 | + type: String, | |
73 | + default: '', | |
74 | + }, | |
75 | + checkAll: { | |
76 | + type: Function, | |
77 | + default: undefined, | |
78 | + }, | |
79 | + expandAll: { | |
80 | + type: Function, | |
81 | + default: undefined, | |
82 | + }, | |
83 | + } as const); | |
84 | + const emit = defineEmits(['strictly-change', 'search']); | |
89 | 85 | |
90 | - const getInputSearchCls = computed(() => { | |
91 | - const titleExists = slots.headerTitle || props.title; | |
92 | - return [ | |
93 | - 'mr-1', | |
94 | - 'w-full', | |
95 | - // titleExists ? 'w-2/3' : 'w-full', | |
96 | - { | |
97 | - ['ml-5']: titleExists, | |
98 | - }, | |
99 | - ]; | |
100 | - }); | |
86 | + const slots = useSlots(); | |
87 | + const { t } = useI18n(); | |
88 | + | |
89 | + const getInputSearchCls = computed(() => { | |
90 | + const titleExists = slots.headerTitle || props.title; | |
91 | + return [ | |
92 | + 'mr-1', | |
93 | + 'w-full', | |
94 | + { | |
95 | + ['ml-5']: titleExists, | |
96 | + }, | |
97 | + ]; | |
98 | + }); | |
101 | 99 | |
102 | - const toolbarList = computed(() => { | |
103 | - const { checkable } = props; | |
104 | - const defaultToolbarList = [ | |
105 | - { label: t('component.tree.expandAll'), value: ToolbarEnum.EXPAND_ALL }, | |
100 | + const toolbarList = computed(() => { | |
101 | + const { checkable } = props; | |
102 | + const defaultToolbarList = [ | |
103 | + { label: t('component.tree.expandAll'), value: ToolbarEnum.EXPAND_ALL }, | |
104 | + { | |
105 | + label: t('component.tree.unExpandAll'), | |
106 | + value: ToolbarEnum.UN_EXPAND_ALL, | |
107 | + divider: checkable, | |
108 | + }, | |
109 | + ]; | |
110 | + | |
111 | + return checkable | |
112 | + ? [ | |
113 | + { label: t('component.tree.selectAll'), value: ToolbarEnum.SELECT_ALL }, | |
106 | 114 | { |
107 | - label: t('component.tree.unExpandAll'), | |
108 | - value: ToolbarEnum.UN_EXPAND_ALL, | |
115 | + label: t('component.tree.unSelectAll'), | |
116 | + value: ToolbarEnum.UN_SELECT_ALL, | |
109 | 117 | divider: checkable, |
110 | 118 | }, |
111 | - ]; | |
119 | + ...defaultToolbarList, | |
120 | + { label: t('component.tree.checkStrictly'), value: ToolbarEnum.CHECK_STRICTLY }, | |
121 | + { label: t('component.tree.checkUnStrictly'), value: ToolbarEnum.CHECK_UN_STRICTLY }, | |
122 | + ] | |
123 | + : defaultToolbarList; | |
124 | + }); | |
112 | 125 | |
113 | - return checkable | |
114 | - ? [ | |
115 | - { label: t('component.tree.selectAll'), value: ToolbarEnum.SELECT_ALL }, | |
116 | - { | |
117 | - label: t('component.tree.unSelectAll'), | |
118 | - value: ToolbarEnum.UN_SELECT_ALL, | |
119 | - divider: checkable, | |
120 | - }, | |
121 | - ...defaultToolbarList, | |
122 | - { label: t('component.tree.checkStrictly'), value: ToolbarEnum.CHECK_STRICTLY }, | |
123 | - { label: t('component.tree.checkUnStrictly'), value: ToolbarEnum.CHECK_UN_STRICTLY }, | |
124 | - ] | |
125 | - : defaultToolbarList; | |
126 | - }); | |
126 | + function handleMenuClick(e: { key: ToolbarEnum }) { | |
127 | + const { key } = e; | |
128 | + switch (key) { | |
129 | + case ToolbarEnum.SELECT_ALL: | |
130 | + props.checkAll?.(true); | |
131 | + break; | |
132 | + case ToolbarEnum.UN_SELECT_ALL: | |
133 | + props.checkAll?.(false); | |
134 | + break; | |
135 | + case ToolbarEnum.EXPAND_ALL: | |
136 | + props.expandAll?.(true); | |
137 | + break; | |
138 | + case ToolbarEnum.UN_EXPAND_ALL: | |
139 | + props.expandAll?.(false); | |
140 | + break; | |
141 | + case ToolbarEnum.CHECK_STRICTLY: | |
142 | + emit('strictly-change', false); | |
143 | + break; | |
144 | + case ToolbarEnum.CHECK_UN_STRICTLY: | |
145 | + emit('strictly-change', true); | |
146 | + break; | |
147 | + } | |
148 | + } | |
127 | 149 | |
128 | - function handleMenuClick(e: MenuInfo) { | |
129 | - const { key } = e; | |
130 | - switch (key) { | |
131 | - case ToolbarEnum.SELECT_ALL: | |
132 | - props.checkAll?.(true); | |
133 | - break; | |
134 | - case ToolbarEnum.UN_SELECT_ALL: | |
135 | - props.checkAll?.(false); | |
136 | - break; | |
137 | - case ToolbarEnum.EXPAND_ALL: | |
138 | - props.expandAll?.(true); | |
139 | - break; | |
140 | - case ToolbarEnum.UN_EXPAND_ALL: | |
141 | - props.expandAll?.(false); | |
142 | - break; | |
143 | - case ToolbarEnum.CHECK_STRICTLY: | |
144 | - emit('strictly-change', false); | |
145 | - break; | |
146 | - case ToolbarEnum.CHECK_UN_STRICTLY: | |
147 | - emit('strictly-change', true); | |
148 | - break; | |
149 | - } | |
150 | - } | |
150 | + function emitChange(value?: string): void { | |
151 | + emit('search', value); | |
152 | + } | |
151 | 153 | |
152 | - function emitChange(value?: string): void { | |
153 | - emit('search', value); | |
154 | - } | |
155 | - const debounceEmitChange = useDebounceFn(emitChange, 200); | |
154 | + const debounceEmitChange = useDebounceFn(emitChange, 200); | |
156 | 155 | |
157 | - watch( | |
158 | - () => searchValue.value, | |
159 | - (v) => { | |
160 | - debounceEmitChange(v); | |
161 | - }, | |
162 | - ); | |
163 | - watch( | |
164 | - () => props.searchText, | |
165 | - (v) => { | |
166 | - if (v !== searchValue.value) { | |
167 | - searchValue.value = v; | |
168 | - } | |
169 | - }, | |
170 | - ); | |
156 | + watch( | |
157 | + () => searchValue.value, | |
158 | + (v) => { | |
159 | + debounceEmitChange(v); | |
160 | + }, | |
161 | + ); | |
171 | 162 | |
172 | - return { t, toolbarList, handleMenuClick, searchValue, getInputSearchCls }; | |
163 | + watch( | |
164 | + () => props.searchText, | |
165 | + (v) => { | |
166 | + if (v !== searchValue.value) { | |
167 | + searchValue.value = v; | |
168 | + } | |
173 | 169 | }, |
174 | - }); | |
170 | + ); | |
175 | 171 | </script> |
176 | -<style lang="less" scoped> | |
177 | - .basic-tree-header { | |
178 | - border-bottom: 1px solid @border-color-base; | |
179 | - } | |
180 | -</style> | ... | ... |
src/components/Tree/src/TreeIcon.ts
1 | 1 | import type { VNode, FunctionalComponent } from 'vue'; |
2 | 2 | |
3 | 3 | import { h } from 'vue'; |
4 | -import { isString } from '/@/utils/is'; | |
4 | +import { isString } from '@vue/shared'; | |
5 | 5 | import { Icon } from '/@/components/Icon'; |
6 | 6 | |
7 | -export interface ComponentProps { | |
8 | - icon: VNode | string; | |
9 | -} | |
10 | - | |
11 | -export const TreeIcon: FunctionalComponent = ({ icon }: ComponentProps) => { | |
7 | +export const TreeIcon: FunctionalComponent = ({ icon }: { icon: VNode | string }) => { | |
12 | 8 | if (!icon) return null; |
13 | 9 | if (isString(icon)) { |
14 | 10 | return h(Icon, { icon, class: 'mr-1' }); | ... | ... |
src/components/Tree/src/props.ts deleted
100644 → 0
1 | -import type { PropType } from 'vue'; | |
2 | -import type { | |
3 | - ReplaceFields, | |
4 | - ActionItem, | |
5 | - Keys, | |
6 | - CheckKeys, | |
7 | - ContextMenuOptions, | |
8 | - TreeItem, | |
9 | -} from './typing'; | |
10 | -import type { ContextMenuItem } from '/@/hooks/web/useContextMenu'; | |
11 | -import type { TreeDataItem } from 'ant-design-vue/es/tree'; | |
12 | -import { propTypes } from '/@/utils/propTypes'; | |
13 | - | |
14 | -export const basicProps = { | |
15 | - value: { | |
16 | - type: [Object, Array] as PropType<Keys | CheckKeys>, | |
17 | - }, | |
18 | - renderIcon: { | |
19 | - type: Function as PropType<(params: Recordable) => string>, | |
20 | - }, | |
21 | - | |
22 | - helpMessage: { | |
23 | - type: [String, Array] as PropType<string | string[]>, | |
24 | - default: '', | |
25 | - }, | |
26 | - | |
27 | - title: propTypes.string, | |
28 | - toolbar: propTypes.bool, | |
29 | - search: propTypes.bool, | |
30 | - searchValue: propTypes.string, | |
31 | - checkStrictly: propTypes.bool, | |
32 | - clickRowToExpand: propTypes.bool.def(true), | |
33 | - checkable: propTypes.bool.def(false), | |
34 | - defaultExpandLevel: { | |
35 | - type: [String, Number] as PropType<string | number>, | |
36 | - default: '', | |
37 | - }, | |
38 | - defaultExpandAll: propTypes.bool.def(false), | |
39 | - | |
40 | - replaceFields: { | |
41 | - type: Object as PropType<ReplaceFields>, | |
42 | - }, | |
43 | - | |
44 | - treeData: { | |
45 | - type: Array as PropType<TreeDataItem[]>, | |
46 | - }, | |
47 | - | |
48 | - actionList: { | |
49 | - type: Array as PropType<ActionItem[]>, | |
50 | - default: () => [], | |
51 | - }, | |
52 | - | |
53 | - expandedKeys: { | |
54 | - type: Array as PropType<Keys>, | |
55 | - default: () => [], | |
56 | - }, | |
57 | - | |
58 | - selectedKeys: { | |
59 | - type: Array as PropType<Keys>, | |
60 | - default: () => [], | |
61 | - }, | |
62 | - | |
63 | - checkedKeys: { | |
64 | - type: Array as PropType<CheckKeys>, | |
65 | - default: () => [], | |
66 | - }, | |
67 | - | |
68 | - beforeRightClick: { | |
69 | - type: Function as PropType<(...arg: any) => ContextMenuItem[] | ContextMenuOptions>, | |
70 | - default: null, | |
71 | - }, | |
72 | - | |
73 | - rightMenuList: { | |
74 | - type: Array as PropType<ContextMenuItem[]>, | |
75 | - }, | |
76 | - // 自定义数据过滤判断方法(注: 不是整个过滤方法,而是内置过滤的判断方法,用于增强原本仅能通过title进行过滤的方式) | |
77 | - filterFn: { | |
78 | - type: Function as PropType< | |
79 | - (searchValue: any, node: TreeItem, replaceFields: ReplaceFields) => boolean | |
80 | - >, | |
81 | - default: null, | |
82 | - }, | |
83 | - // 高亮搜索值,仅高亮具体匹配值(通过title)值为true时使用默认色值,值为#xxx时使用此值替代且高亮开启 | |
84 | - highlight: { | |
85 | - type: [Boolean, String] as PropType<Boolean | String>, | |
86 | - default: false, | |
87 | - }, | |
88 | - // 搜索完成时自动展开结果 | |
89 | - expandOnSearch: propTypes.bool.def(false), | |
90 | - // 搜索完成自动选中所有结果,当且仅当 checkable===true 时生效 | |
91 | - checkOnSearch: propTypes.bool.def(false), | |
92 | - // 搜索完成自动select所有结果 | |
93 | - selectedOnSearch: propTypes.bool.def(false), | |
94 | -}; | |
95 | - | |
96 | -export const treeNodeProps = { | |
97 | - actionList: { | |
98 | - type: Array as PropType<ActionItem[]>, | |
99 | - default: () => [], | |
100 | - }, | |
101 | - replaceFields: { | |
102 | - type: Object as PropType<ReplaceFields>, | |
103 | - }, | |
104 | - treeData: { | |
105 | - type: Array as PropType<TreeDataItem[]>, | |
106 | - default: () => [], | |
107 | - }, | |
108 | -}; |
src/components/Tree/src/tree.ts
1 | +import type { ExtractPropTypes } from 'vue'; | |
2 | +import type { TreeDataItem } from 'ant-design-vue/es/tree/Tree'; | |
3 | + | |
4 | +import { buildProps } from '/@/utils/props'; | |
5 | + | |
6 | +export enum ToolbarEnum { | |
7 | + SELECT_ALL, | |
8 | + UN_SELECT_ALL, | |
9 | + EXPAND_ALL, | |
10 | + UN_EXPAND_ALL, | |
11 | + CHECK_STRICTLY, | |
12 | + CHECK_UN_STRICTLY, | |
13 | +} | |
14 | + | |
15 | +export const treeEmits = [ | |
16 | + 'update:expandedKeys', | |
17 | + 'update:selectedKeys', | |
18 | + 'update:value', | |
19 | + 'change', | |
20 | + 'check', | |
21 | + 'update:searchValue', | |
22 | +]; | |
23 | + | |
24 | +export interface TreeState { | |
25 | + expandedKeys: KeyType[]; | |
26 | + selectedKeys: KeyType[]; | |
27 | + checkedKeys: CheckKeys; | |
28 | + checkStrictly: boolean; | |
29 | +} | |
30 | + | |
31 | +export interface FieldNames { | |
32 | + children?: string; | |
33 | + title?: string; | |
34 | + key?: string; | |
35 | +} | |
36 | + | |
37 | +export type KeyType = string | number; | |
38 | + | |
39 | +export type CheckKeys = | |
40 | + | KeyType[] | |
41 | + | { checked: string[] | number[]; halfChecked: string[] | number[] }; | |
42 | + | |
43 | +export const treeProps = buildProps({ | |
44 | + value: { | |
45 | + type: [Object, Array] as PropType<KeyType[] | CheckKeys>, | |
46 | + }, | |
47 | + | |
48 | + renderIcon: { | |
49 | + type: Function as PropType<(params: Recordable) => string>, | |
50 | + }, | |
51 | + | |
52 | + helpMessage: { | |
53 | + type: [String, Array] as PropType<string | string[]>, | |
54 | + default: '', | |
55 | + }, | |
56 | + | |
57 | + title: { | |
58 | + type: String, | |
59 | + default: '', | |
60 | + }, | |
61 | + toolbar: Boolean, | |
62 | + search: Boolean, | |
63 | + searchValue: { | |
64 | + type: String, | |
65 | + default: '', | |
66 | + }, | |
67 | + checkStrictly: Boolean, | |
68 | + clickRowToExpand: { | |
69 | + type: Boolean, | |
70 | + default: false, | |
71 | + }, | |
72 | + checkable: Boolean, | |
73 | + defaultExpandLevel: { | |
74 | + type: [String, Number] as PropType<string | number>, | |
75 | + default: '', | |
76 | + }, | |
77 | + defaultExpandAll: Boolean, | |
78 | + | |
79 | + fieldNames: { | |
80 | + type: Object as PropType<FieldNames>, | |
81 | + }, | |
82 | + | |
83 | + treeData: { | |
84 | + type: Array as PropType<TreeDataItem[]>, | |
85 | + }, | |
86 | + | |
87 | + actionList: { | |
88 | + type: Array as PropType<TreeActionItem[]>, | |
89 | + default: () => [], | |
90 | + }, | |
91 | + | |
92 | + expandedKeys: { | |
93 | + type: Array as PropType<KeyType[]>, | |
94 | + default: () => [], | |
95 | + }, | |
96 | + | |
97 | + selectedKeys: { | |
98 | + type: Array as PropType<KeyType[]>, | |
99 | + default: () => [], | |
100 | + }, | |
101 | + | |
102 | + checkedKeys: { | |
103 | + type: Array as PropType<CheckKeys>, | |
104 | + default: () => [], | |
105 | + }, | |
106 | + | |
107 | + beforeRightClick: { | |
108 | + type: Function as PropType<(...arg: any) => ContextMenuItem[] | ContextMenuOptions>, | |
109 | + default: undefined, | |
110 | + }, | |
111 | + | |
112 | + rightMenuList: { | |
113 | + type: Array as PropType<ContextMenuItem[]>, | |
114 | + }, | |
115 | + // 自定义数据过滤判断方法(注: 不是整个过滤方法,而是内置过滤的判断方法,用于增强原本仅能通过title进行过滤的方式) | |
116 | + filterFn: { | |
117 | + type: Function as PropType< | |
118 | + (searchValue: any, node: TreeItem, replaceFields: FieldNames) => boolean | |
119 | + >, | |
120 | + default: undefined, | |
121 | + }, | |
122 | + // 高亮搜索值,仅高亮具体匹配值(通过title)值为true时使用默认色值,值为#xxx时使用此值替代且高亮开启 | |
123 | + highlight: { | |
124 | + type: [Boolean, String] as PropType<Boolean | String>, | |
125 | + default: false, | |
126 | + }, | |
127 | + // 搜索完成时自动展开结果 | |
128 | + expandOnSearch: Boolean, | |
129 | + // 搜索完成自动选中所有结果,当且仅当 checkable===true 时生效 | |
130 | + checkOnSearch: Boolean, | |
131 | + // 搜索完成自动select所有结果 | |
132 | + selectedOnSearch: Boolean, | |
133 | +}); | |
134 | + | |
135 | +export type TreeProps = ExtractPropTypes<typeof treeProps>; | |
136 | + | |
137 | +export interface ContextMenuItem { | |
138 | + label: string; | |
139 | + icon?: string; | |
140 | + disabled?: boolean; | |
141 | + handler?: Fn; | |
142 | + divider?: boolean; | |
143 | + children?: ContextMenuItem[]; | |
144 | +} | |
145 | + | |
146 | +export interface ContextMenuOptions { | |
147 | + icon?: string; | |
148 | + styles?: any; | |
149 | + items?: ContextMenuItem[]; | |
150 | +} | |
151 | + | |
152 | +export interface TreeItem extends TreeDataItem { | |
153 | + icon?: any; | |
154 | +} | |
155 | + | |
156 | +export interface TreeActionItem { | |
157 | + render: (record: Recordable) => any; | |
158 | + show?: boolean | ((record: Recordable) => boolean); | |
159 | +} | |
160 | + | |
161 | +export interface InsertNodeParams { | |
162 | + parentKey: string | null; | |
163 | + node: TreeDataItem; | |
164 | + list?: TreeDataItem[]; | |
165 | + push?: 'push' | 'unshift'; | |
166 | +} | |
167 | + | |
168 | +export interface TreeActionType { | |
169 | + checkAll: (checkAll: boolean) => void; | |
170 | + expandAll: (expandAll: boolean) => void; | |
171 | + setExpandedKeys: (keys: KeyType[]) => void; | |
172 | + getExpandedKeys: () => KeyType[]; | |
173 | + setSelectedKeys: (keys: KeyType[]) => void; | |
174 | + getSelectedKeys: () => KeyType[]; | |
175 | + setCheckedKeys: (keys: CheckKeys) => void; | |
176 | + getCheckedKeys: () => CheckKeys; | |
177 | + filterByLevel: (level: number) => void; | |
178 | + insertNodeByKey: (opt: InsertNodeParams) => void; | |
179 | + insertNodesByKey: (opt: InsertNodeParams) => void; | |
180 | + deleteNodeByKey: (key: string) => void; | |
181 | + updateNodeByKey: (key: string, node: Omit<TreeDataItem, 'key'>) => void; | |
182 | + setSearchValue: (value: string) => void; | |
183 | + getSearchValue: () => string; | |
184 | +} | ... | ... |
src/components/Tree/src/typing.ts deleted
100644 → 0
1 | -import type { TreeDataItem, CheckEvent as CheckEventOrigin } from 'ant-design-vue/es/tree/Tree'; | |
2 | - | |
3 | -import { ContextMenuItem } from '/@/hooks/web/useContextMenu'; | |
4 | - | |
5 | -export interface ActionItem { | |
6 | - render: (record: Recordable) => any; | |
7 | - show?: boolean | ((record: Recordable) => boolean); | |
8 | -} | |
9 | - | |
10 | -export interface TreeItem extends TreeDataItem { | |
11 | - icon?: any; | |
12 | -} | |
13 | - | |
14 | -export interface ReplaceFields { | |
15 | - children?: string; | |
16 | - title?: string; | |
17 | - key?: string; | |
18 | -} | |
19 | - | |
20 | -export type Keys = (string | number)[]; | |
21 | -export type CheckKeys = | |
22 | - | (string | number)[] | |
23 | - | { checked: (string | number)[]; halfChecked: (string | number)[] }; | |
24 | - | |
25 | -export interface TreeActionType { | |
26 | - checkAll: (checkAll: boolean) => void; | |
27 | - expandAll: (expandAll: boolean) => void; | |
28 | - setExpandedKeys: (keys: Keys) => void; | |
29 | - getExpandedKeys: () => Keys; | |
30 | - setSelectedKeys: (keys: Keys) => void; | |
31 | - getSelectedKeys: () => Keys; | |
32 | - setCheckedKeys: (keys: CheckKeys) => void; | |
33 | - getCheckedKeys: () => CheckKeys; | |
34 | - filterByLevel: (level: number) => void; | |
35 | - insertNodeByKey: (opt: InsertNodeParams) => void; | |
36 | - insertNodesByKey: (opt: InsertNodeParams) => void; | |
37 | - deleteNodeByKey: (key: string) => void; | |
38 | - updateNodeByKey: (key: string, node: Omit<TreeDataItem, 'key'>) => void; | |
39 | - setSearchValue: (value: string) => void; | |
40 | - getSearchValue: () => string; | |
41 | -} | |
42 | - | |
43 | -export interface InsertNodeParams { | |
44 | - parentKey: string | null; | |
45 | - node: TreeDataItem; | |
46 | - list?: TreeDataItem[]; | |
47 | - push?: 'push' | 'unshift'; | |
48 | -} | |
49 | - | |
50 | -export interface ContextMenuOptions { | |
51 | - icon?: string; | |
52 | - styles?: any; | |
53 | - items?: ContextMenuItem[]; | |
54 | -} | |
55 | - | |
56 | -export type CheckEvent = CheckEventOrigin; |
src/components/Tree/src/useTree.ts
1 | -import type { InsertNodeParams, Keys, ReplaceFields } from './typing'; | |
1 | +import type { InsertNodeParams, KeyType, FieldNames } from './tree'; | |
2 | 2 | import type { Ref, ComputedRef } from 'vue'; |
3 | 3 | import type { TreeDataItem } from 'ant-design-vue/es/tree/Tree'; |
4 | 4 | |
... | ... | @@ -6,14 +6,11 @@ import { cloneDeep } from 'lodash-es'; |
6 | 6 | import { unref } from 'vue'; |
7 | 7 | import { forEach } from '/@/utils/helper/treeHelper'; |
8 | 8 | |
9 | -export function useTree( | |
10 | - treeDataRef: Ref<TreeDataItem[]>, | |
11 | - getReplaceFields: ComputedRef<ReplaceFields>, | |
12 | -) { | |
9 | +export function useTree(treeDataRef: Ref<TreeDataItem[]>, getFieldNames: ComputedRef<FieldNames>) { | |
13 | 10 | function getAllKeys(list?: TreeDataItem[]) { |
14 | 11 | const keys: string[] = []; |
15 | 12 | const treeData = list || unref(treeDataRef); |
16 | - const { key: keyField, children: childrenField } = unref(getReplaceFields); | |
13 | + const { key: keyField, children: childrenField } = unref(getFieldNames); | |
17 | 14 | if (!childrenField || !keyField) return keys; |
18 | 15 | |
19 | 16 | for (let index = 0; index < treeData.length; index++) { |
... | ... | @@ -24,14 +21,14 @@ export function useTree( |
24 | 21 | keys.push(...(getAllKeys(children) as string[])); |
25 | 22 | } |
26 | 23 | } |
27 | - return keys as Keys; | |
24 | + return keys as KeyType[]; | |
28 | 25 | } |
29 | 26 | |
30 | 27 | // get keys that can be checked and selected |
31 | 28 | function getEnabledKeys(list?: TreeDataItem[]) { |
32 | 29 | const keys: string[] = []; |
33 | 30 | const treeData = list || unref(treeDataRef); |
34 | - const { key: keyField, children: childrenField } = unref(getReplaceFields); | |
31 | + const { key: keyField, children: childrenField } = unref(getFieldNames); | |
35 | 32 | if (!childrenField || !keyField) return keys; |
36 | 33 | |
37 | 34 | for (let index = 0; index < treeData.length; index++) { |
... | ... | @@ -42,13 +39,13 @@ export function useTree( |
42 | 39 | keys.push(...(getEnabledKeys(children) as string[])); |
43 | 40 | } |
44 | 41 | } |
45 | - return keys as Keys; | |
42 | + return keys as KeyType[]; | |
46 | 43 | } |
47 | 44 | |
48 | - function getChildrenKeys(nodeKey: string | number, list?: TreeDataItem[]): Keys { | |
49 | - const keys: Keys = []; | |
45 | + function getChildrenKeys(nodeKey: string | number, list?: TreeDataItem[]) { | |
46 | + const keys: KeyType[] = []; | |
50 | 47 | const treeData = list || unref(treeDataRef); |
51 | - const { key: keyField, children: childrenField } = unref(getReplaceFields); | |
48 | + const { key: keyField, children: childrenField } = unref(getFieldNames); | |
52 | 49 | if (!childrenField || !keyField) return keys; |
53 | 50 | for (let index = 0; index < treeData.length; index++) { |
54 | 51 | const node = treeData[index]; |
... | ... | @@ -64,14 +61,14 @@ export function useTree( |
64 | 61 | } |
65 | 62 | } |
66 | 63 | } |
67 | - return keys as Keys; | |
64 | + return keys as KeyType[]; | |
68 | 65 | } |
69 | 66 | |
70 | 67 | // Update node |
71 | 68 | function updateNodeByKey(key: string, node: TreeDataItem, list?: TreeDataItem[]) { |
72 | 69 | if (!key) return; |
73 | 70 | const treeData = list || unref(treeDataRef); |
74 | - const { key: keyField, children: childrenField } = unref(getReplaceFields); | |
71 | + const { key: keyField, children: childrenField } = unref(getFieldNames); | |
75 | 72 | |
76 | 73 | if (!childrenField || !keyField) return; |
77 | 74 | |
... | ... | @@ -98,7 +95,7 @@ export function useTree( |
98 | 95 | for (let index = 0; index < data.length; index++) { |
99 | 96 | const item = data[index]; |
100 | 97 | |
101 | - const { key: keyField, children: childrenField } = unref(getReplaceFields); | |
98 | + const { key: keyField, children: childrenField } = unref(getFieldNames); | |
102 | 99 | const key = keyField ? item[keyField] : ''; |
103 | 100 | const children = childrenField ? item[childrenField] : []; |
104 | 101 | res.push(key); |
... | ... | @@ -120,7 +117,7 @@ export function useTree( |
120 | 117 | treeDataRef.value = treeData; |
121 | 118 | return; |
122 | 119 | } |
123 | - const { key: keyField, children: childrenField } = unref(getReplaceFields); | |
120 | + const { key: keyField, children: childrenField } = unref(getFieldNames); | |
124 | 121 | if (!childrenField || !keyField) return; |
125 | 122 | |
126 | 123 | forEach(treeData, (treeItem) => { |
... | ... | @@ -145,7 +142,7 @@ export function useTree( |
145 | 142 | treeData[push](list[i]); |
146 | 143 | } |
147 | 144 | } else { |
148 | - const { key: keyField, children: childrenField } = unref(getReplaceFields); | |
145 | + const { key: keyField, children: childrenField } = unref(getFieldNames); | |
149 | 146 | if (!childrenField || !keyField) return; |
150 | 147 | |
151 | 148 | forEach(treeData, (treeItem) => { |
... | ... | @@ -164,7 +161,7 @@ export function useTree( |
164 | 161 | function deleteNodeByKey(key: string, list?: TreeDataItem[]) { |
165 | 162 | if (!key) return; |
166 | 163 | const treeData = list || unref(treeDataRef); |
167 | - const { key: keyField, children: childrenField } = unref(getReplaceFields); | |
164 | + const { key: keyField, children: childrenField } = unref(getFieldNames); | |
168 | 165 | if (!childrenField || !keyField) return; |
169 | 166 | |
170 | 167 | for (let index = 0; index < treeData.length; index++) { | ... | ... |
src/components/Tree/style/index.less
0 → 100644
1 | +@tree-prefix-cls: ~'@{namespace}-tree'; | |
2 | + | |
3 | +.@{tree-prefix-cls} { | |
4 | + background-color: @component-background; | |
5 | + | |
6 | + .ant-tree-node-content-wrapper { | |
7 | + position: relative; | |
8 | + | |
9 | + .ant-tree-title { | |
10 | + position: absolute; | |
11 | + left: 0; | |
12 | + width: 100%; | |
13 | + } | |
14 | + } | |
15 | + | |
16 | + &__title { | |
17 | + position: relative; | |
18 | + display: flex; | |
19 | + align-items: center; | |
20 | + width: 100%; | |
21 | + padding-right: 10px; | |
22 | + | |
23 | + &:hover { | |
24 | + .@{tree-prefix-cls}__action { | |
25 | + visibility: visible; | |
26 | + } | |
27 | + } | |
28 | + } | |
29 | + | |
30 | + &__content { | |
31 | + overflow: hidden; | |
32 | + } | |
33 | + | |
34 | + &__actions { | |
35 | + position: absolute; | |
36 | + top: 2px; | |
37 | + right: 3px; | |
38 | + display: flex; | |
39 | + } | |
40 | + | |
41 | + &__action { | |
42 | + margin-left: 4px; | |
43 | + visibility: hidden; | |
44 | + } | |
45 | + | |
46 | + &-header { | |
47 | + border-bottom: 1px solid @border-color-base; | |
48 | + } | |
49 | +} | ... | ... |
src/components/Tree/style/index.ts
0 → 100644
1 | +import './index.less'; | ... | ... |
src/main.ts
... | ... | @@ -15,13 +15,6 @@ import { setupGlobDirectives } from '/@/directives'; |
15 | 15 | import { setupI18n } from '/@/locales/setupI18n'; |
16 | 16 | import { registerGlobComp } from '/@/components/registerGlobComp'; |
17 | 17 | |
18 | -// Importing on demand in local development will increase the number of browser requests by around 20%. | |
19 | -// This may slow down the browser refresh speed. | |
20 | -// Therefore, only enable on-demand importing in production environments . | |
21 | -if (import.meta.env.DEV) { | |
22 | - import('ant-design-vue/dist/antd.less'); | |
23 | -} | |
24 | - | |
25 | 18 | async function bootstrap() { |
26 | 19 | const app = createApp(App); |
27 | 20 | ... | ... |
src/utils/bem.ts
0 → 100644
1 | +import { prefixCls } from '/@/settings/designSetting'; | |
2 | + | |
3 | +type Mod = string | { [key: string]: any }; | |
4 | +type Mods = Mod | Mod[]; | |
5 | + | |
6 | +export type BEM = ReturnType<typeof createBEM>; | |
7 | + | |
8 | +function genBem(name: string, mods?: Mods): string { | |
9 | + if (!mods) { | |
10 | + return ''; | |
11 | + } | |
12 | + | |
13 | + if (typeof mods === 'string') { | |
14 | + return ` ${name}--${mods}`; | |
15 | + } | |
16 | + | |
17 | + if (Array.isArray(mods)) { | |
18 | + return mods.reduce<string>((ret, item) => ret + genBem(name, item), ''); | |
19 | + } | |
20 | + | |
21 | + return Object.keys(mods).reduce((ret, key) => ret + (mods[key] ? genBem(name, key) : ''), ''); | |
22 | +} | |
23 | + | |
24 | +/** | |
25 | + * bem helper | |
26 | + * b() // 'button' | |
27 | + * b('text') // 'button__text' | |
28 | + * b({ disabled }) // 'button button--disabled' | |
29 | + * b('text', { disabled }) // 'button__text button__text--disabled' | |
30 | + * b(['disabled', 'primary']) // 'button button--disabled button--primary' | |
31 | + */ | |
32 | +export function buildBEM(name: string) { | |
33 | + return (el?: Mods, mods?: Mods): Mods => { | |
34 | + if (el && typeof el !== 'string') { | |
35 | + mods = el; | |
36 | + el = ''; | |
37 | + } | |
38 | + | |
39 | + el = el ? `${name}__${el}` : name; | |
40 | + | |
41 | + return `${el}${genBem(el, mods)}`; | |
42 | + }; | |
43 | +} | |
44 | + | |
45 | +export function createBEM(name: string) { | |
46 | + return [buildBEM(`${prefixCls}-${name}`)]; | |
47 | +} | |
48 | + | |
49 | +export function createNamespace(name: string) { | |
50 | + const prefixedName = `${prefixCls}-${name}`; | |
51 | + return [prefixedName, buildBEM(prefixedName)] as const; | |
52 | +} | ... | ... |
src/utils/props.ts
0 → 100644
1 | +// copy from element-plus | |
2 | + | |
3 | +import { warn } from 'vue'; | |
4 | +import { isObject } from '@vue/shared'; | |
5 | +import { fromPairs } from 'lodash-es'; | |
6 | +import type { ExtractPropTypes, PropType } from '@vue/runtime-core'; | |
7 | +import type { Mutable } from './types'; | |
8 | + | |
9 | +const wrapperKey = Symbol(); | |
10 | +export type PropWrapper<T> = { [wrapperKey]: T }; | |
11 | + | |
12 | +export const propKey = Symbol(); | |
13 | + | |
14 | +type ResolveProp<T> = ExtractPropTypes<{ | |
15 | + key: { type: T; required: true }; | |
16 | +}>['key']; | |
17 | +type ResolvePropType<T> = ResolveProp<T> extends { type: infer V } ? V : ResolveProp<T>; | |
18 | +type ResolvePropTypeWithReadonly<T> = Readonly<T> extends Readonly<Array<infer A>> | |
19 | + ? ResolvePropType<A[]> | |
20 | + : ResolvePropType<T>; | |
21 | + | |
22 | +type IfUnknown<T, V> = [unknown] extends [T] ? V : T; | |
23 | + | |
24 | +export type BuildPropOption<T, D extends BuildPropType<T, V, C>, R, V, C> = { | |
25 | + type?: T; | |
26 | + values?: readonly V[]; | |
27 | + required?: R; | |
28 | + default?: R extends true | |
29 | + ? never | |
30 | + : D extends Record<string, unknown> | Array<any> | |
31 | + ? () => D | |
32 | + : (() => D) | D; | |
33 | + validator?: ((val: any) => val is C) | ((val: any) => boolean); | |
34 | +}; | |
35 | + | |
36 | +type _BuildPropType<T, V, C> = | |
37 | + | (T extends PropWrapper<unknown> | |
38 | + ? T[typeof wrapperKey] | |
39 | + : [V] extends [never] | |
40 | + ? ResolvePropTypeWithReadonly<T> | |
41 | + : never) | |
42 | + | V | |
43 | + | C; | |
44 | +export type BuildPropType<T, V, C> = _BuildPropType< | |
45 | + IfUnknown<T, never>, | |
46 | + IfUnknown<V, never>, | |
47 | + IfUnknown<C, never> | |
48 | +>; | |
49 | + | |
50 | +type _BuildPropDefault<T, D> = [T] extends [ | |
51 | + // eslint-disable-next-line @typescript-eslint/ban-types | |
52 | + Record<string, unknown> | Array<any> | Function, | |
53 | +] | |
54 | + ? D | |
55 | + : D extends () => T | |
56 | + ? ReturnType<D> | |
57 | + : D; | |
58 | + | |
59 | +export type BuildPropDefault<T, D, R> = R extends true | |
60 | + ? { readonly default?: undefined } | |
61 | + : { | |
62 | + readonly default: Exclude<D, undefined> extends never | |
63 | + ? undefined | |
64 | + : Exclude<_BuildPropDefault<T, D>, undefined>; | |
65 | + }; | |
66 | +export type BuildPropReturn<T, D, R, V, C> = { | |
67 | + readonly type: PropType<BuildPropType<T, V, C>>; | |
68 | + readonly required: IfUnknown<R, false>; | |
69 | + readonly validator: ((val: unknown) => boolean) | undefined; | |
70 | + [propKey]: true; | |
71 | +} & BuildPropDefault<BuildPropType<T, V, C>, IfUnknown<D, never>, IfUnknown<R, false>>; | |
72 | + | |
73 | +/** | |
74 | + * @description Build prop. It can better optimize prop types | |
75 | + * @description 生成 prop,能更好地优化类型 | |
76 | + * @example | |
77 | + // limited options | |
78 | + // the type will be PropType<'light' | 'dark'> | |
79 | + buildProp({ | |
80 | + type: String, | |
81 | + values: ['light', 'dark'], | |
82 | + } as const) | |
83 | + * @example | |
84 | + // limited options and other types | |
85 | + // the type will be PropType<'small' | 'medium' | number> | |
86 | + buildProp({ | |
87 | + type: [String, Number], | |
88 | + values: ['small', 'medium'], | |
89 | + validator: (val: unknown): val is number => typeof val === 'number', | |
90 | + } as const) | |
91 | + @link see more: https://github.com/element-plus/element-plus/pull/3341 | |
92 | + */ | |
93 | +export function buildProp< | |
94 | + T = never, | |
95 | + D extends BuildPropType<T, V, C> = never, | |
96 | + R extends boolean = false, | |
97 | + V = never, | |
98 | + C = never, | |
99 | +>(option: BuildPropOption<T, D, R, V, C>, key?: string): BuildPropReturn<T, D, R, V, C> { | |
100 | + // filter native prop type and nested prop, e.g `null`, `undefined` (from `buildProps`) | |
101 | + if (!isObject(option) || !!option[propKey]) return option as any; | |
102 | + | |
103 | + const { values, required, default: defaultValue, type, validator } = option; | |
104 | + | |
105 | + const _validator = | |
106 | + values || validator | |
107 | + ? (val: unknown) => { | |
108 | + let valid = false; | |
109 | + let allowedValues: unknown[] = []; | |
110 | + | |
111 | + if (values) { | |
112 | + allowedValues = [...values, defaultValue]; | |
113 | + valid ||= allowedValues.includes(val); | |
114 | + } | |
115 | + if (validator) valid ||= validator(val); | |
116 | + | |
117 | + if (!valid && allowedValues.length > 0) { | |
118 | + const allowValuesText = [...new Set(allowedValues)] | |
119 | + .map((value) => JSON.stringify(value)) | |
120 | + .join(', '); | |
121 | + warn( | |
122 | + `Invalid prop: validation failed${ | |
123 | + key ? ` for prop "${key}"` : '' | |
124 | + }. Expected one of [${allowValuesText}], got value ${JSON.stringify(val)}.`, | |
125 | + ); | |
126 | + } | |
127 | + return valid; | |
128 | + } | |
129 | + : undefined; | |
130 | + | |
131 | + return { | |
132 | + type: | |
133 | + typeof type === 'object' && Object.getOwnPropertySymbols(type).includes(wrapperKey) | |
134 | + ? type[wrapperKey] | |
135 | + : type, | |
136 | + required: !!required, | |
137 | + default: defaultValue, | |
138 | + validator: _validator, | |
139 | + [propKey]: true, | |
140 | + } as unknown as BuildPropReturn<T, D, R, V, C>; | |
141 | +} | |
142 | + | |
143 | +type NativePropType = [((...args: any) => any) | { new (...args: any): any } | undefined | null]; | |
144 | + | |
145 | +export const buildProps = < | |
146 | + O extends { | |
147 | + [K in keyof O]: O[K] extends BuildPropReturn<any, any, any, any, any> | |
148 | + ? O[K] | |
149 | + : [O[K]] extends NativePropType | |
150 | + ? O[K] | |
151 | + : O[K] extends BuildPropOption<infer T, infer D, infer R, infer V, infer C> | |
152 | + ? D extends BuildPropType<T, V, C> | |
153 | + ? BuildPropOption<T, D, R, V, C> | |
154 | + : never | |
155 | + : never; | |
156 | + }, | |
157 | +>( | |
158 | + props: O, | |
159 | +) => | |
160 | + fromPairs( | |
161 | + Object.entries(props).map(([key, option]) => [key, buildProp(option as any, key)]), | |
162 | + ) as unknown as { | |
163 | + [K in keyof O]: O[K] extends { [propKey]: boolean } | |
164 | + ? O[K] | |
165 | + : [O[K]] extends NativePropType | |
166 | + ? O[K] | |
167 | + : O[K] extends BuildPropOption< | |
168 | + infer T, | |
169 | + // eslint-disable-next-line @typescript-eslint/no-unused-vars | |
170 | + infer _D, | |
171 | + infer R, | |
172 | + infer V, | |
173 | + infer C | |
174 | + > | |
175 | + ? BuildPropReturn<T, O[K]['default'], R, V, C> | |
176 | + : never; | |
177 | + }; | |
178 | + | |
179 | +export const definePropType = <T>(val: any) => ({ [wrapperKey]: val } as PropWrapper<T>); | |
180 | + | |
181 | +export const keyOf = <T>(arr: T) => Object.keys(arr) as Array<keyof T>; | |
182 | +export const mutable = <T extends readonly any[] | Record<string, unknown>>(val: T) => | |
183 | + val as Mutable<typeof val>; | |
184 | + | |
185 | +export const componentSize = ['large', 'medium', 'small', 'mini'] as const; | ... | ... |
src/utils/types.ts
0 → 100644
1 | +// copy from element-plus | |
2 | + | |
3 | +import type { CSSProperties, Plugin } from 'vue'; | |
4 | + | |
5 | +type OptionalKeys<T extends Record<string, unknown>> = { | |
6 | + [K in keyof T]: T extends Record<K, T[K]> ? never : K; | |
7 | +}[keyof T]; | |
8 | + | |
9 | +type RequiredKeys<T extends Record<string, unknown>> = Exclude<keyof T, OptionalKeys<T>>; | |
10 | + | |
11 | +type MonoArgEmitter<T, Keys extends keyof T> = <K extends Keys>(evt: K, arg?: T[K]) => void; | |
12 | + | |
13 | +type BiArgEmitter<T, Keys extends keyof T> = <K extends Keys>(evt: K, arg: T[K]) => void; | |
14 | + | |
15 | +export type EventEmitter<T extends Record<string, unknown>> = MonoArgEmitter<T, OptionalKeys<T>> & | |
16 | + BiArgEmitter<T, RequiredKeys<T>>; | |
17 | + | |
18 | +export type AnyFunction<T> = (...args: any[]) => T; | |
19 | + | |
20 | +export type PartialReturnType<T extends (...args: unknown[]) => unknown> = Partial<ReturnType<T>>; | |
21 | + | |
22 | +export type SFCWithInstall<T> = T & Plugin; | |
23 | + | |
24 | +export type Nullable<T> = T | null; | |
25 | + | |
26 | +export type RefElement = Nullable<HTMLElement>; | |
27 | + | |
28 | +export type CustomizedHTMLElement<T> = HTMLElement & T; | |
29 | + | |
30 | +export type Indexable<T> = { | |
31 | + [key: string]: T; | |
32 | +}; | |
33 | + | |
34 | +export type Hash<T> = Indexable<T>; | |
35 | + | |
36 | +export type TimeoutHandle = ReturnType<typeof global.setTimeout>; | |
37 | + | |
38 | +export type ComponentSize = 'large' | 'medium' | 'small' | 'mini'; | |
39 | + | |
40 | +export type StyleValue = string | CSSProperties | Array<StyleValue>; | |
41 | + | |
42 | +export type Mutable<T> = { -readonly [P in keyof T]: T[P] }; | ... | ... |
vite.config.ts
... | ... | @@ -95,6 +95,7 @@ export default ({ command, mode }: ConfigEnv): UserConfig => { |
95 | 95 | optimizeDeps: { |
96 | 96 | // @iconify/iconify: The dependency is dynamically and virtually loaded by @purge-icons/generated, so it needs to be specified explicitly |
97 | 97 | include: [ |
98 | + '@vue/shared', | |
98 | 99 | '@iconify/iconify', |
99 | 100 | 'ant-design-vue/es/locale/zh_CN', |
100 | 101 | 'ant-design-vue/es/locale/en_US', | ... | ... |