Commit 4ff1c408dc1acfc49e0adc61dc2e539c0c198158

Authored by vben
1 parent 3c3e640d

wip(form): perf form

Showing 45 changed files with 918 additions and 879 deletions
package.json
... ... @@ -48,11 +48,11 @@
48 48 "devDependencies": {
49 49 "@commitlint/cli": "^11.0.0",
50 50 "@commitlint/config-conventional": "^11.0.0",
51   - "@iconify/json": "^1.1.275",
  51 + "@iconify/json": "^1.1.276",
52 52 "@ls-lint/ls-lint": "^1.9.2",
53 53 "@purge-icons/generated": "^0.4.1",
54 54 "@types/echarts": "^4.9.3",
55   - "@types/fs-extra": "^9.0.5",
  55 + "@types/fs-extra": "^9.0.6",
56 56 "@types/globrex": "^0.1.0",
57 57 "@types/koa-static": "^4.0.1",
58 58 "@types/lodash-es": "^4.17.4",
... ... @@ -102,7 +102,7 @@
102 102 "vite-plugin-html": "^1.0.0-beta.2",
103 103 "vite-plugin-mock": "^1.0.9",
104 104 "vite-plugin-purge-icons": "^0.4.5",
105   - "vite-plugin-pwa": "^0.1.7",
  105 + "vite-plugin-pwa": "^0.2.0",
106 106 "vue-eslint-parser": "^7.3.0",
107 107 "yargs": "^16.2.0"
108 108 },
... ...
src/components/Basic/index.ts
1 1 import { createAsyncComponent } from '/@/utils/factory/createAsyncComponent';
  2 +import BasicArrow from './src/BasicArrow.vue';
2 3  
3   -export const BasicArrow = createAsyncComponent(() => import('./src/BasicArrow.vue'));
  4 +export { BasicArrow };
  5 +
  6 +// export const BasicArrow = createAsyncComponent(() => import('./src/BasicArrow.vue'));
4 7 export const BasicHelp = createAsyncComponent(() => import('./src/BasicHelp.vue'));
5 8 export const BasicTitle = createAsyncComponent(() => import('./src/BasicTitle.vue'));
... ...
src/components/Container/src/collapse/CollapseContainer.vue
... ... @@ -101,7 +101,10 @@
101 101  
102 102 &__action {
103 103 display: flex;
  104 + text-align: right;
  105 + flex: 1;
104 106 align-items: center;
  107 + justify-content: flex-end;
105 108 }
106 109 }
107 110 </style>
... ...
src/components/Form/src/BasicForm.vue
1 1 <template>
2 2 <Form v-bind="{ ...$attrs, ...$props }" ref="formElRef" :model="formModel">
3   - <Row :class="getProps.compact ? 'compact-form-row' : ''" :style="getRowWrapStyleRef">
  3 + <Row :class="getProps.compact ? 'compact-form-row' : ''" :style="getRowWrapStyle">
4 4 <slot name="formHeader" />
5 5 <template v-for="schema in getSchema" :key="schema.field">
6 6 <FormItem
... ... @@ -10,6 +10,7 @@
10 10 :formProps="getProps"
11 11 :allDefaultValues="defaultValueRef"
12 12 :formModel="formModel"
  13 + :setFormModel="setFormModel"
13 14 >
14 15 <template #[item]="data" v-for="item in Object.keys($slots)">
15 16 <slot :name="item" v-bind="data" />
... ... @@ -17,8 +18,9 @@
17 18 </FormItem>
18 19 </template>
19 20  
  21 + <!-- -->
20 22 <FormAction
21   - v-bind="{ ...getActionPropsRef, ...advanceState }"
  23 + v-bind="{ ...getProps, ...advanceState }"
22 24 @toggle-advanced="handleToggleAdvanced"
23 25 />
24 26 <slot name="formFooter" />
... ... @@ -28,14 +30,12 @@
28 30 <script lang="ts">
29 31 import type { FormActionType, FormProps, FormSchema } from './types/form';
30 32 import type { AdvanceState } from './types/hooks';
31   - import type { Ref, WatchStopHandle } from 'vue';
32   - import type { ValidateFields } from 'ant-design-vue/lib/form/interface';
  33 + import type { CSSProperties, Ref, WatchStopHandle } from 'vue';
33 34  
34 35 import { defineComponent, reactive, ref, computed, unref, onMounted, watch, toRefs } from 'vue';
35 36 import { Form, Row } from 'ant-design-vue';
36   - import FormItem from './FormItem';
37   - import { basicProps } from './props';
38   - import FormAction from './FormAction';
  37 + import FormItem from './components/FormItem';
  38 + import FormAction from './components/FormAction.vue';
39 39  
40 40 import { dateItemType } from './helper';
41 41 import moment from 'moment';
... ... @@ -44,7 +44,11 @@
44 44  
45 45 import { useFormValues } from './hooks/useFormValues';
46 46 import useAdvanced from './hooks/useAdvanced';
47   - import { useFormAction } from './hooks/useFormAction';
  47 + import { useFormEvents } from './hooks/useFormEvents';
  48 + import { createFormContext } from './hooks/useFormContext';
  49 +
  50 + import { basicProps } from './props';
  51 +
48 52 export default defineComponent({
49 53 name: 'BasicForm',
50 54 components: { FormItem, Form, Row, FormAction },
... ... @@ -52,12 +56,7 @@
52 56 props: basicProps,
53 57 emits: ['advanced-change', 'reset', 'submit', 'register'],
54 58 setup(props, { emit }) {
55   - const formModel = reactive({});
56   -
57   - const actionState = reactive({
58   - resetAction: {},
59   - submitAction: {},
60   - });
  59 + const formModel = reactive<Recordable>({});
61 60  
62 61 const advanceState = reactive<AdvanceState>({
63 62 isAdvanced: true,
... ... @@ -66,37 +65,24 @@
66 65 actionSpan: 6,
67 66 });
68 67  
69   - const defaultValueRef = ref<any>({});
  68 + const defaultValueRef = ref<Recordable>({});
70 69 const isInitedDefaultRef = ref(false);
71 70 const propsRef = ref<Partial<FormProps>>({});
72 71 const schemaRef = ref<Nullable<FormSchema[]>>(null);
73 72 const formElRef = ref<Nullable<FormActionType>>(null);
74 73  
75   - const getMergePropsRef = computed(
  74 + // Get the basic configuration of the form
  75 + const getProps = computed(
76 76 (): FormProps => {
77 77 return deepMerge(cloneDeep(props), unref(propsRef));
78 78 }
79 79 );
80 80  
81   - const getRowWrapStyleRef = computed((): any => {
82   - const { baseRowStyle } = unref(getMergePropsRef);
83   - return baseRowStyle || {};
84   - });
85   -
86   - // ่Žทๅ–่กจๅ•ๅŸบๆœฌ้…็ฝฎ
87   - const getProps = computed(
88   - (): FormProps => {
89   - return {
90   - ...unref(getMergePropsRef),
91   - resetButtonOptions: deepMerge(
92   - actionState.resetAction,
93   - unref(getMergePropsRef).resetButtonOptions || {}
94   - ),
95   - submitButtonOptions: deepMerge(
96   - actionState.submitAction,
97   - unref(getMergePropsRef).submitButtonOptions || {}
98   - ),
99   - };
  81 + // Get uniform row style
  82 + const getRowWrapStyle = computed(
  83 + (): CSSProperties => {
  84 + const { baseRowStyle = {} } = unref(getProps);
  85 + return baseRowStyle;
100 86 }
101 87 );
102 88  
... ... @@ -120,18 +106,19 @@
120 106 return schemas as FormSchema[];
121 107 });
122 108  
123   - const { getActionPropsRef, handleToggleAdvanced } = useAdvanced({
  109 + const { handleToggleAdvanced } = useAdvanced({
124 110 advanceState,
125 111 emit,
126   - getMergePropsRef,
127 112 getProps,
128 113 getSchema,
129 114 formModel,
130 115 defaultValueRef,
131 116 });
  117 +
132 118 const { transformDateFunc, fieldMapToTime } = toRefs(props);
  119 +
133 120 const { handleFormValues, initDefault } = useFormValues({
134   - transformDateFuncRef: transformDateFunc as Ref<Fn<any>>,
  121 + transformDateFuncRef: transformDateFunc,
135 122 fieldMapToTimeRef: fieldMapToTime,
136 123 defaultValueRef,
137 124 getSchema,
... ... @@ -139,7 +126,7 @@
139 126 });
140 127  
141 128 const {
142   - // handleSubmit,
  129 + handleSubmit,
143 130 setFieldsValue,
144 131 clearValidate,
145 132 validate,
... ... @@ -149,7 +136,8 @@
149 136 appendSchemaByField,
150 137 removeSchemaByFiled,
151 138 resetFields,
152   - } = useFormAction({
  139 + scrollToField,
  140 + } = useFormEvents({
153 141 emit,
154 142 getProps,
155 143 formModel,
... ... @@ -158,14 +146,19 @@
158 146 formElRef: formElRef as Ref<FormActionType>,
159 147 schemaRef: schemaRef as Ref<FormSchema[]>,
160 148 handleFormValues,
161   - actionState,
  149 + });
  150 +
  151 + createFormContext({
  152 + resetAction: resetFields,
  153 + submitAction: handleSubmit,
162 154 });
163 155  
164 156 watch(
165   - () => unref(getMergePropsRef).model,
  157 + () => unref(getProps).model,
166 158 () => {
167   - if (!unref(getMergePropsRef).model) return;
168   - setFieldsValue(unref(getMergePropsRef).model);
  159 + const { model } = unref(getProps);
  160 + if (!model) return;
  161 + setFieldsValue(model);
169 162 },
170 163 {
171 164 immediate: true,
... ... @@ -178,16 +171,19 @@
178 171 if (unref(isInitedDefaultRef)) {
179 172 return stopWatch();
180 173 }
181   - if (schema && schema.length) {
  174 + if (schema?.length) {
182 175 initDefault();
183 176 isInitedDefaultRef.value = true;
184 177 }
185 178 }
186 179 );
187 180  
188   - function setProps(formProps: Partial<FormProps>): void {
189   - const mergeProps = deepMerge(unref(propsRef) || {}, formProps);
190   - propsRef.value = mergeProps;
  181 + async function setProps(formProps: Partial<FormProps>): Promise<void> {
  182 + propsRef.value = deepMerge(unref(propsRef) || {}, formProps);
  183 + }
  184 +
  185 + function setFormModel(key: string, value: any) {
  186 + formModel[key] = value;
191 187 }
192 188  
193 189 const formActionType: Partial<FormActionType> = {
... ... @@ -199,8 +195,10 @@
199 195 removeSchemaByFiled,
200 196 appendSchemaByField,
201 197 clearValidate,
202   - validateFields: validateFields as ValidateFields,
203   - validate: validate as ValidateFields,
  198 + validateFields,
  199 + validate,
  200 + submit: handleSubmit,
  201 + scrollToField: scrollToField,
204 202 };
205 203  
206 204 onMounted(() => {
... ... @@ -211,14 +209,14 @@
211 209 return {
212 210 handleToggleAdvanced,
213 211 formModel,
214   - getActionPropsRef,
215 212 defaultValueRef,
216 213 advanceState,
217   - getRowWrapStyleRef,
  214 + getRowWrapStyle,
218 215 getProps,
219 216 formElRef,
220 217 getSchema,
221 218 formActionType,
  219 + setFormModel,
222 220 ...formActionType,
223 221 };
224 222 },
... ...
src/components/Form/src/FormAction.tsx deleted 100644 โ†’ 0
1   -import type { ColEx } from './types/index';
2   -
3   -import { defineComponent, unref, computed, PropType } from 'vue';
4   -import { Form, Col } from 'ant-design-vue';
5   -import { Button } from '/@/components/Button';
6   -import { BasicArrow } from '/@/components/Basic/index';
7   -
8   -import { getSlot } from '/@/utils/helper/tsxHelper';
9   -import { useI18n } from '/@/hooks/web/useI18n';
10   -import { propTypes } from '/@/utils/propTypes';
11   -
12   -const { t } = useI18n();
13   -
14   -export default defineComponent({
15   - name: 'BasicFormAction',
16   - props: {
17   - show: propTypes.bool.def(true),
18   - showResetButton: propTypes.bool.def(true),
19   - showSubmitButton: propTypes.bool.def(true),
20   - showAdvancedButton: propTypes.bool.def(true),
21   - resetButtonOptions: {
22   - type: Object as PropType<any>,
23   - default: {},
24   - },
25   - submitButtonOptions: {
26   - type: Object as PropType<any>,
27   - default: {},
28   - },
29   - actionColOptions: {
30   - type: Object as PropType<any>,
31   - default: {},
32   - },
33   - actionSpan: propTypes.number.def(6),
34   - isAdvanced: propTypes.bool,
35   - hideAdvanceBtn: propTypes.bool,
36   - },
37   - emits: ['toggle-advanced'],
38   - setup(props, { slots, emit }) {
39   - const getResetBtnOptionsRef = computed(() => {
40   - return {
41   - text: t('component.form.resetButton'),
42   - ...props.resetButtonOptions,
43   - };
44   - });
45   -
46   - const getSubmitBtnOptionsRef = computed(() => {
47   - return {
48   - text: t('component.form.submitButton'),
49   - // htmlType: 'submit',
50   - ...props.submitButtonOptions,
51   - };
52   - });
53   -
54   - const actionColOpt = computed(() => {
55   - const { showAdvancedButton, actionSpan: span, actionColOptions } = props;
56   - const actionSpan = 24 - span;
57   - const advancedSpanObj = showAdvancedButton ? { span: actionSpan < 6 ? 24 : actionSpan } : {};
58   - const actionColOpt: Partial<ColEx> = {
59   - span: showAdvancedButton ? 6 : 4,
60   - ...advancedSpanObj,
61   - ...actionColOptions,
62   - };
63   - return actionColOpt;
64   - });
65   -
66   - function toggleAdvanced() {
67   - emit('toggle-advanced');
68   - }
69   -
70   - function renderAdvanceButton() {
71   - const { showAdvancedButton, hideAdvanceBtn, isAdvanced } = props;
72   -
73   - if (!showAdvancedButton || !!hideAdvanceBtn) {
74   - return null;
75   - }
76   - return (
77   - <Button type="default" class="mr-2" onClick={toggleAdvanced}>
78   - {() => (
79   - <>
80   - {isAdvanced ? t('component.form.putAway') : t('component.form.unfold')}
81   - <BasicArrow expand={!isAdvanced} top />
82   - </>
83   - )}
84   - </Button>
85   - );
86   - }
87   -
88   - function renderResetButton() {
89   - const { showResetButton } = props;
90   - if (!showResetButton) {
91   - return null;
92   - }
93   - return (
94   - <Button type="default" class="mr-2" {...unref(getResetBtnOptionsRef)}>
95   - {() => unref(getResetBtnOptionsRef).text}
96   - </Button>
97   - );
98   - }
99   -
100   - function renderSubmitButton() {
101   - const { showSubmitButton } = props;
102   - if (!showSubmitButton) {
103   - return null;
104   - }
105   - return (
106   - <Button type="primary" {...unref(getSubmitBtnOptionsRef)}>
107   - {() => unref(getSubmitBtnOptionsRef).text}
108   - </Button>
109   - );
110   - }
111   -
112   - return () => {
113   - if (!props.show) {
114   - return null;
115   - }
116   -
117   - return (
118   - <Col {...unref(actionColOpt)} style={{ textAlign: 'right' }}>
119   - {() => (
120   - <Form.Item>
121   - {() => (
122   - <>
123   - {getSlot(slots, 'advanceBefore')}
124   - {renderAdvanceButton()}
125   -
126   - {getSlot(slots, 'resetBefore')}
127   - {renderResetButton()}
128   -
129   - {getSlot(slots, 'submitBefore')}
130   - {renderSubmitButton()}
131   -
132   - {getSlot(slots, 'submitAfter')}
133   - </>
134   - )}
135   - </Form.Item>
136   - )}
137   - </Col>
138   - );
139   - };
140   - },
141   -});
src/components/Form/src/componentMap.ts
1   -import { Component } from 'vue';
  1 +import type { Component } from 'vue';
2 2 import type { ComponentType } from './types/index';
3 3  
4 4 /**
... ... @@ -17,10 +17,11 @@ import {
17 17 TimePicker,
18 18 TreeSelect,
19 19 } from 'ant-design-vue';
  20 +
20 21 import RadioButtonGroup from './components/RadioButtonGroup.vue';
21 22 import { BasicUpload } from '/@/components/Upload';
22 23  
23   -const componentMap = new Map<ComponentType, any>();
  24 +const componentMap = new Map<ComponentType, Component>();
24 25  
25 26 componentMap.set('Input', Input);
26 27 componentMap.set('InputGroup', Input.Group);
... ...
src/components/Form/src/components/FormAction.vue 0 โ†’ 100644
  1 +<template>
  2 + <a-col
  3 + v-bind="actionColOpt"
  4 + class="mb-2"
  5 + :style="{ textAlign: 'right' }"
  6 + v-if="showActionButtonGroup"
  7 + >
  8 + <FormItem>
  9 + <slot name="resetBefore" />
  10 + <Button
  11 + type="default"
  12 + class="mr-2"
  13 + v-bind="getResetBtnOptions"
  14 + @click="resetAction"
  15 + v-if="showResetButton"
  16 + >
  17 + {{ getResetBtnOptions.text }}
  18 + </Button>
  19 + <slot name="submitBefore" />
  20 +
  21 + <Button
  22 + type="primary"
  23 + class="mr-2"
  24 + v-bind="getSubmitBtnOptions"
  25 + @click="submitAction"
  26 + v-if="showSubmitButton"
  27 + >
  28 + {{ getSubmitBtnOptions.text }}
  29 + </Button>
  30 +
  31 + <slot name="advanceBefore" />
  32 + <Button
  33 + type="link"
  34 + size="small"
  35 + @click="toggleAdvanced"
  36 + v-if="showAdvancedButton && !hideAdvanceBtn"
  37 + >
  38 + {{ isAdvanced ? t('component.form.putAway') : t('component.form.unfold') }}
  39 + <BasicArrow class="ml-1" :expand="!isAdvanced" top />
  40 + </Button>
  41 + <slot name="advanceAfter" />
  42 + </FormItem>
  43 + </a-col>
  44 +</template>
  45 +<script lang="ts">
  46 + import type { ColEx } from '../types/index';
  47 + import type { ButtonProps } from 'ant-design-vue/es/button/buttonTypes';
  48 +
  49 + import { defineComponent, computed, PropType } from 'vue';
  50 + import { Form } from 'ant-design-vue';
  51 + import { Button } from '/@/components/Button';
  52 + import { BasicArrow } from '/@/components/Basic/index';
  53 + import { useFormContext } from '../hooks/useFormContext';
  54 +
  55 + import { useI18n } from '/@/hooks/web/useI18n';
  56 + import { propTypes } from '/@/utils/propTypes';
  57 +
  58 + type ButtonOptions = Partial<ButtonProps> & { text: string };
  59 +
  60 + export default defineComponent({
  61 + name: 'BasicFormAction',
  62 + components: {
  63 + FormItem: Form,
  64 + Button,
  65 + BasicArrow,
  66 + },
  67 + props: {
  68 + showActionButtonGroup: propTypes.bool.def(true),
  69 + showResetButton: propTypes.bool.def(true),
  70 + showSubmitButton: propTypes.bool.def(true),
  71 + showAdvancedButton: propTypes.bool.def(true),
  72 + resetButtonOptions: {
  73 + type: Object as PropType<ButtonOptions>,
  74 + default: {},
  75 + },
  76 + submitButtonOptions: {
  77 + type: Object as PropType<ButtonOptions>,
  78 + default: {},
  79 + },
  80 + actionColOptions: {
  81 + type: Object as PropType<Partial<ColEx>>,
  82 + default: {},
  83 + },
  84 + actionSpan: propTypes.number.def(6),
  85 + isAdvanced: propTypes.bool,
  86 + hideAdvanceBtn: propTypes.bool,
  87 + },
  88 + setup(props, { emit }) {
  89 + const { t } = useI18n();
  90 +
  91 + const actionColOpt = computed(() => {
  92 + const { showAdvancedButton, actionSpan: span, actionColOptions } = props;
  93 + const actionSpan = 24 - span;
  94 + const advancedSpanObj = showAdvancedButton
  95 + ? { span: actionSpan < 6 ? 24 : actionSpan }
  96 + : {};
  97 + const actionColOpt: Partial<ColEx> = {
  98 + span: showAdvancedButton ? 6 : 4,
  99 + ...advancedSpanObj,
  100 + ...actionColOptions,
  101 + };
  102 + return actionColOpt;
  103 + });
  104 +
  105 + const getResetBtnOptions = computed(
  106 + (): ButtonOptions => {
  107 + return Object.assign(
  108 + {
  109 + text: t('component.form.resetButton'),
  110 + },
  111 + props.resetButtonOptions
  112 + );
  113 + }
  114 + );
  115 +
  116 + const getSubmitBtnOptions = computed(() => {
  117 + return Object.assign(
  118 + {
  119 + text: t('component.form.submitButton'),
  120 + },
  121 + props.submitButtonOptions
  122 + );
  123 + });
  124 +
  125 + function toggleAdvanced() {
  126 + emit('toggle-advanced');
  127 + }
  128 +
  129 + return {
  130 + t,
  131 + actionColOpt,
  132 + getResetBtnOptions,
  133 + getSubmitBtnOptions,
  134 + toggleAdvanced,
  135 + ...useFormContext(),
  136 + };
  137 + },
  138 + });
  139 +</script>
... ...
src/components/Form/src/FormItem.tsx renamed to src/components/Form/src/components/FormItem.tsx
1   -import type { PropType } from 'vue';
2   -import type { FormActionType, FormProps } from './types/form';
3   -import type { FormSchema } from './types/form';
  1 +import type { PropType, Ref } from 'vue';
  2 +import type { FormActionType, FormProps } from '../types/form';
  3 +import type { FormSchema } from '../types/form';
4 4 import type { ValidationRule } from 'ant-design-vue/lib/form/Form';
5 5 import type { TableActionType } from '/@/components/Table';
  6 +import type { ComponentType } from '../types';
6 7  
7   -import { defineComponent, computed, unref, toRef } from 'vue';
  8 +import { defineComponent, computed, unref, toRefs } from 'vue';
8 9 import { Form, Col } from 'ant-design-vue';
9   -import { componentMap } from './componentMap';
  10 +import { componentMap } from '../componentMap';
10 11 import { BasicHelp } from '/@/components/Basic';
11 12  
12 13 import { isBoolean, isFunction } from '/@/utils/is';
13 14 import { getSlot } from '/@/utils/helper/tsxHelper';
14   -import { createPlaceholderMessage } from './helper';
  15 +import { createPlaceholderMessage, setComponentRuleType } from '../helper';
15 16 import { upperFirst, cloneDeep } from 'lodash-es';
16 17  
17   -import { useItemLabelWidth } from './hooks/useLabelWidth';
18   -import { ComponentType } from './types';
  18 +import { useItemLabelWidth } from '../hooks/useLabelWidth';
19 19 import { isNumber } from '/@/utils/is';
20 20 import { useI18n } from '/@/hooks/web/useI18n';
21 21  
... ... @@ -32,13 +32,17 @@ export default defineComponent({
32 32 default: {},
33 33 },
34 34 allDefaultValues: {
35   - type: Object as PropType<any>,
  35 + type: Object as PropType<Recordable>,
36 36 default: {},
37 37 },
38 38 formModel: {
39   - type: Object as PropType<any>,
  39 + type: Object as PropType<Recordable>,
40 40 default: {},
41 41 },
  42 + setFormModel: {
  43 + type: Function as PropType<(key: string, value: any) => void>,
  44 + default: null,
  45 + },
42 46 tableAction: {
43 47 type: Object as PropType<TableActionType>,
44 48 },
... ... @@ -48,10 +52,15 @@ export default defineComponent({
48 52 },
49 53 setup(props, { slots }) {
50 54 const { t } = useI18n();
51   - // @ts-ignore
52   - const itemLabelWidthRef = useItemLabelWidth(toRef(props, 'schema'), toRef(props, 'formProps'));
53 55  
54   - const getValuesRef = computed(() => {
  56 + const { schema, formProps } = toRefs(props) as {
  57 + schema: Ref<FormSchema>;
  58 + formProps: Ref<FormProps>;
  59 + };
  60 +
  61 + const itemLabelWidthProp = useItemLabelWidth(schema, formProps);
  62 +
  63 + const getValues = computed(() => {
55 64 const { allDefaultValues, formModel, schema } = props;
56 65 const { mergeDynamicData } = props.formProps;
57 66 return {
... ... @@ -61,12 +70,12 @@ export default defineComponent({
61 70 ...mergeDynamicData,
62 71 ...allDefaultValues,
63 72 ...formModel,
64   - },
  73 + } as Recordable,
65 74 schema: schema,
66 75 };
67 76 });
68 77  
69   - const getComponentsPropsRef = computed(() => {
  78 + const getComponentsProps = computed(() => {
70 79 const { schema, tableAction, formModel, formActionType } = props;
71 80 const { componentProps = {} } = schema;
72 81 if (!isFunction(componentProps)) {
... ... @@ -75,19 +84,18 @@ export default defineComponent({
75 84 return componentProps({ schema, tableAction, formModel, formActionType }) || {};
76 85 });
77 86  
78   - const getDisableRef = computed(() => {
  87 + const getDisable = computed(() => {
79 88 const { disabled: globDisabled } = props.formProps;
80 89 const { dynamicDisabled } = props.schema;
81   - const { disabled: itemDisabled = false } = unref(getComponentsPropsRef);
  90 + const { disabled: itemDisabled = false } = unref(getComponentsProps);
82 91 let disabled = !!globDisabled || itemDisabled;
83 92 if (isBoolean(dynamicDisabled)) {
84 93 disabled = dynamicDisabled;
85 94 }
86 95  
87 96 if (isFunction(dynamicDisabled)) {
88   - disabled = dynamicDisabled(unref(getValuesRef));
  97 + disabled = dynamicDisabled(unref(getValues));
89 98 }
90   -
91 99 return disabled;
92 100 });
93 101  
... ... @@ -109,10 +117,10 @@ export default defineComponent({
109 117 isIfShow = ifShow;
110 118 }
111 119 if (isFunction(show)) {
112   - isShow = show(unref(getValuesRef));
  120 + isShow = show(unref(getValues));
113 121 }
114 122 if (isFunction(ifShow)) {
115   - isIfShow = ifShow(unref(getValuesRef));
  123 + isIfShow = ifShow(unref(getValues));
116 124 }
117 125 isShow = isShow && itemIsAdvanced;
118 126 return { isShow, isIfShow };
... ... @@ -129,7 +137,7 @@ export default defineComponent({
129 137 } = props.schema;
130 138  
131 139 if (isFunction(dynamicRules)) {
132   - return dynamicRules(unref(getValuesRef)) as ValidationRule[];
  140 + return dynamicRules(unref(getValues)) as ValidationRule[];
133 141 }
134 142  
135 143 let rules: ValidationRule[] = cloneDeep(defRules) as ValidationRule[];
... ... @@ -151,23 +159,15 @@ export default defineComponent({
151 159 const joinLabel = Reflect.has(props.schema, 'rulesMessageJoinLabel')
152 160 ? rulesMessageJoinLabel
153 161 : globalRulesMessageJoinLabel;
  162 +
154 163 rule.message =
155 164 rule.message || createPlaceholderMessage(component) + `${joinLabel ? label : ''}`;
  165 +
156 166 if (component.includes('Input') || component.includes('Textarea')) {
157 167 rule.whitespace = true;
158 168 }
159   - if (
160   - component.includes('DatePicker') ||
161   - component.includes('MonthPicker') ||
162   - component.includes('WeekPicker') ||
163   - component.includes('TimePicker')
164   - ) {
165   - rule.type = 'object';
166   - } else if (component.includes('RangePicker') || component.includes('Upload')) {
167   - rule.type = 'array';
168   - } else if (component.includes('InputNumber')) {
169   - rule.type = 'number';
170   - }
  169 +
  170 + setComponentRuleType(rule, component);
171 171 }
172 172 }
173 173  
... ... @@ -181,10 +181,12 @@ export default defineComponent({
181 181 }
182 182  
183 183 function handleValue(component: ComponentType, field: string) {
184   - const val = (props.formModel as any)[field];
  184 + const val = props.formModel[field];
185 185 if (['Input', 'InputPassword', 'InputSearch', 'InputTextArea'].includes(component)) {
186 186 if (val && isNumber(val)) {
187   - (props.formModel as any)[field] = `${val}`;
  187 + props.setFormModel(field, `${val}`);
  188 +
  189 + // props.formModel[field] = `${val}`;
188 190 return `${val}`;
189 191 }
190 192 return val;
... ... @@ -206,56 +208,59 @@ export default defineComponent({
206 208 const eventKey = `on${upperFirst(changeEvent)}`;
207 209  
208 210 const on = {
209   - [eventKey]: (e: any) => {
  211 + [eventKey]: (e: Nullable<Recordable>) => {
210 212 if (propsData[eventKey]) {
211 213 propsData[eventKey](e);
212 214 }
213 215  
214 216 const target = e ? e.target : null;
  217 +
215 218 const value = target ? (isCheck ? target.checked : target.value) : e;
216   - (props.formModel as any)[field] = value;
  219 + props.setFormModel(field, value);
  220 + // props.formModel[field] = value;
217 221 },
218 222 };
219   - const Comp = componentMap.get(component);
  223 + const Comp = componentMap.get(component) as typeof defineComponent;
220 224  
221 225 const { autoSetPlaceHolder, size } = props.formProps;
222   - const propsData: any = {
  226 + const propsData: Recordable = {
223 227 allowClear: true,
224 228 getPopupContainer: (trigger: Element) => trigger.parentNode,
225 229 size,
226   - ...unref(getComponentsPropsRef),
227   - disabled: unref(getDisableRef),
  230 + ...unref(getComponentsProps),
  231 + disabled: unref(getDisable),
228 232 };
229 233  
230 234 const isCreatePlaceholder = !propsData.disabled && autoSetPlaceHolder;
231 235 let placeholder;
232 236 // RangePicker placeไธบๆ•ฐ็ป„
233 237 if (isCreatePlaceholder && component !== 'RangePicker' && component) {
234   - placeholder =
235   - (unref(getComponentsPropsRef) && unref(getComponentsPropsRef).placeholder) ||
236   - createPlaceholderMessage(component);
  238 + placeholder = unref(getComponentsProps)?.placeholder || createPlaceholderMessage(component);
237 239 }
238 240 propsData.placeholder = placeholder;
239 241 propsData.codeField = field;
240   - propsData.formValues = unref(getValuesRef);
241   - const bindValue = {
  242 + propsData.formValues = unref(getValues);
  243 +
  244 + const bindValue: Recordable = {
242 245 [valueField || (isCheck ? 'checked' : 'value')]: handleValue(component, field),
243 246 };
244 247  
  248 + const compAttr: Recordable = {
  249 + ...propsData,
  250 + ...on,
  251 + ...bindValue,
  252 + };
  253 +
245 254 if (!renderComponentContent) {
246   - return <Comp {...propsData} {...on} {...bindValue} />;
  255 + return <Comp {...compAttr} />;
247 256 }
248 257 const compSlot = isFunction(renderComponentContent)
249   - ? { ...renderComponentContent(unref(getValuesRef)) }
  258 + ? { ...renderComponentContent(unref(getValues)) }
250 259 : {
251 260 default: () => renderComponentContent,
252 261 };
253 262  
254   - return (
255   - <Comp {...propsData} {...on} {...bindValue}>
256   - {compSlot}
257   - </Comp>
258   - );
  263 + return <Comp {...compAttr}>{compSlot}</Comp>;
259 264 }
260 265  
261 266 function renderLabelHelpMessage() {
... ... @@ -280,20 +285,22 @@ export default defineComponent({
280 285  
281 286 function renderItem() {
282 287 const { itemProps, slot, render, field } = props.schema;
283   - const { labelCol, wrapperCol } = unref(itemLabelWidthRef);
  288 + const { labelCol, wrapperCol } = unref(itemLabelWidthProp);
284 289 const { colon } = props.formProps;
  290 +
285 291 const getContent = () => {
286 292 return slot
287   - ? getSlot(slots, slot, unref(getValuesRef))
  293 + ? getSlot(slots, slot, unref(getValues))
288 294 : render
289   - ? render(unref(getValuesRef))
  295 + ? render(unref(getValues))
290 296 : renderComponent();
291 297 };
  298 +
292 299 return (
293 300 <Form.Item
294 301 name={field}
295 302 colon={colon}
296   - {...(itemProps as any)}
  303 + {...(itemProps as Recordable)}
297 304 label={renderLabelHelpMessage()}
298 305 rules={handleRules()}
299 306 labelCol={labelCol}
... ... @@ -306,20 +313,23 @@ export default defineComponent({
306 313 return () => {
307 314 const { colProps = {}, colSlot, renderColContent, component } = props.schema;
308 315 if (!componentMap.has(component)) return null;
  316 +
309 317 const { baseColProps = {} } = props.formProps;
310 318  
311 319 const realColProps = { ...baseColProps, ...colProps };
312 320 const { isIfShow, isShow } = getShow();
  321 +
313 322 const getContent = () => {
314 323 return colSlot
315   - ? getSlot(slots, colSlot, unref(getValuesRef))
  324 + ? getSlot(slots, colSlot, unref(getValues))
316 325 : renderColContent
317   - ? renderColContent(unref(getValuesRef))
  326 + ? renderColContent(unref(getValues))
318 327 : renderItem();
319 328 };
  329 +
320 330 return (
321 331 isIfShow && (
322   - <Col {...realColProps} class={!isShow ? 'hidden' : ''}>
  332 + <Col {...realColProps} class={{ hidden: !isShow }}>
323 333 {() => getContent()}
324 334 </Col>
325 335 )
... ...
src/components/Form/src/components/RadioButtonGroup.vue
  1 +<!--
  2 + * @Description:It is troublesome to implement radio button group in the form. So it is extracted independently as a separate component
  3 +-->
  4 +
1 5 <template>
2   - <RadioGroup v-bind="$attrs" v-model:value="valueRef" button-style="solid">
  6 + <RadioGroup v-bind="attrs" v-model:value="state" button-style="solid">
3 7 <template v-for="item in getOptions" :key="`${item.value}`">
4 8 <RadioButton :value="item.value"> {{ item.label }} </RadioButton>
5 9 </template>
6 10 </RadioGroup>
7 11 </template>
8 12 <script lang="ts">
9   - import { defineComponent, ref, PropType, watch, unref, computed } from 'vue';
  13 + import { defineComponent, PropType, computed } from 'vue';
10 14 import { Radio } from 'ant-design-vue';
11   - import {} from 'ant-design-vue/es/radio/Group';
12 15 import { isString } from '/@/utils/is';
13   -
  16 + import { useRuleFormItem } from '/@/hooks/component/useFormItem';
  17 + import { useAttrs } from '/@/hooks/core/useAttrs';
14 18 type OptionsItem = { label: string; value: string; disabled?: boolean };
15 19 type RadioItem = string | OptionsItem;
  20 +
16 21 export default defineComponent({
17 22 name: 'RadioButtonGroup',
18 23 components: {
... ... @@ -28,34 +33,22 @@
28 33 default: () => [],
29 34 },
30 35 },
31   - setup(props, { emit }) {
32   - const valueRef = ref('');
33   -
34   - watch(
35   - () => props.value,
36   - (v = '') => {
37   - valueRef.value = v;
38   - },
39   - { immediate: true }
40   - );
41   -
42   - watch(
43   - () => unref(valueRef),
44   - () => {
45   - emit('change', valueRef.value);
46   - },
47   - { immediate: true }
48   - );
49   -
  36 + setup(props) {
  37 + const attrs = useAttrs();
  38 + // Embedded in the form, just use the hook binding to perform form verification
  39 + const [state] = useRuleFormItem(props);
  40 + // Processing options value
50 41 const getOptions = computed((): OptionsItem[] => {
51 42 const { options } = props;
52   - if (!options || options.length === 0) return [];
  43 + if (!options || options?.length === 0) return [];
  44 +
53 45 const isStringArr = options.some((item) => isString(item));
54 46 if (!isStringArr) return options as OptionsItem[];
  47 +
55 48 return options.map((item) => ({ label: item, value: item })) as OptionsItem[];
56 49 });
57 50  
58   - return { valueRef, getOptions };
  51 + return { state, getOptions, attrs };
59 52 },
60 53 });
61 54 </script>
... ...
src/components/Form/src/helper.ts
  1 +import type { ValidationRule } from 'ant-design-vue/lib/form/Form';
1 2 import type { ComponentType } from './types/index';
2 3 import { useI18n } from '/@/hooks/web/useI18n';
3 4  
... ... @@ -30,6 +31,16 @@ function genType() {
30 31 return ['DatePicker', 'MonthPicker', 'RangePicker', 'WeekPicker', 'TimePicker'];
31 32 }
32 33  
  34 +export function setComponentRuleType(rule: ValidationRule, component: ComponentType) {
  35 + if (['DatePicker', 'MonthPicker', 'WeekPicker', 'TimePicker'].includes(component)) {
  36 + rule.type = 'object';
  37 + } else if (['RangePicker', 'Upload', 'CheckboxGroup', 'TimePicker'].includes(component)) {
  38 + rule.type = 'array';
  39 + } else if (['InputNumber'].includes(component)) {
  40 + rule.type = 'number';
  41 + }
  42 +}
  43 +
33 44 /**
34 45 * ๆ—ถ้—ดๅญ—ๆฎต
35 46 */
... ...
src/components/Form/src/hooks/useAdvanced.ts
... ... @@ -13,28 +13,28 @@ const BASIC_COL_LEN = 24;
13 13 interface UseAdvancedContext {
14 14 advanceState: AdvanceState;
15 15 emit: EmitType;
16   - getMergePropsRef: ComputedRef<FormProps>;
17 16 getProps: ComputedRef<FormProps>;
18 17 getSchema: ComputedRef<FormSchema[]>;
19   - formModel: any;
20   - defaultValueRef: Ref<any>;
  18 + formModel: Recordable;
  19 + defaultValueRef: Ref<Recordable>;
21 20 }
22 21  
23 22 export default function ({
24 23 advanceState,
25 24 emit,
26   - getMergePropsRef,
27 25 getProps,
28 26 getSchema,
29 27 formModel,
30 28 defaultValueRef,
31 29 }: UseAdvancedContext) {
32 30 const { realWidthRef, screenEnum, screenRef } = useBreakpoint();
33   - const getEmptySpanRef = computed((): number => {
  31 +
  32 + const getEmptySpan = computed((): number => {
34 33 if (!advanceState.isAdvanced) {
35 34 return 0;
36 35 }
37   - const emptySpan = unref(getMergePropsRef).emptySpan || 0;
  36 + // For some special cases, you need to manually specify additional blank lines
  37 + const emptySpan = unref(getProps).emptySpan || 0;
38 38  
39 39 if (isNumber(emptySpan)) {
40 40 return emptySpan;
... ... @@ -49,27 +49,6 @@ export default function ({
49 49 return 0;
50 50 });
51 51  
52   - const getActionPropsRef = computed(() => {
53   - const {
54   - resetButtonOptions,
55   - submitButtonOptions,
56   - showActionButtonGroup,
57   - showResetButton,
58   - showSubmitButton,
59   - showAdvancedButton,
60   - actionColOptions,
61   - } = unref(getProps);
62   - return {
63   - resetButtonOptions,
64   - submitButtonOptions,
65   - show: showActionButtonGroup,
66   - showResetButton,
67   - showSubmitButton,
68   - showAdvancedButton,
69   - actionColOptions,
70   - };
71   - });
72   -
73 52 watch(
74 53 [() => unref(getSchema), () => advanceState.isAdvanced, () => unref(realWidthRef)],
75 54 () => {
... ... @@ -90,6 +69,7 @@ export default function ({
90 69 parseInt(itemCol.sm as string) ||
91 70 (itemCol.span as number) ||
92 71 BASIC_COL_LEN;
  72 +
93 73 const lgWidth = parseInt(itemCol.lg as string) || mdWidth;
94 74 const xlWidth = parseInt(itemCol.xl as string) || lgWidth;
95 75 const xxlWidth = parseInt(itemCol.xxl as string) || xlWidth;
... ... @@ -102,15 +82,16 @@ export default function ({
102 82 } else {
103 83 itemColSum += xxlWidth;
104 84 }
  85 +
105 86 if (isLastAction) {
106 87 advanceState.hideAdvanceBtn = false;
107 88 if (itemColSum <= BASIC_COL_LEN * 2) {
108   - // ๅฐไบŽ็ญ‰ไบŽ2่กŒๆ—ถ๏ผŒไธๆ˜พ็คบๆ”ถ่ตทๅฑ•ๅผ€ๆŒ‰้’ฎ
  89 + // When less than or equal to 2 lines, the collapse and expand buttons are not displayed
109 90 advanceState.hideAdvanceBtn = true;
110 91 advanceState.isAdvanced = true;
111 92 } else if (
112 93 itemColSum > BASIC_COL_LEN * 2 &&
113   - itemColSum <= BASIC_COL_LEN * (unref(getMergePropsRef).autoAdvancedLine || 3)
  94 + itemColSum <= BASIC_COL_LEN * (unref(getProps).autoAdvancedLine || 3)
114 95 ) {
115 96 advanceState.hideAdvanceBtn = false;
116 97  
... ... @@ -168,13 +149,9 @@ export default function ({
168 149 }
169 150 }
170 151  
171   - advanceState.actionSpan = (realItemColSum % BASIC_COL_LEN) + unref(getEmptySpanRef);
  152 + advanceState.actionSpan = (realItemColSum % BASIC_COL_LEN) + unref(getEmptySpan);
172 153  
173   - getAdvanced(
174   - unref(getActionPropsRef).actionColOptions || { span: BASIC_COL_LEN },
175   - itemColSum,
176   - true
177   - );
  154 + getAdvanced(unref(getProps).actionColOptions || { span: BASIC_COL_LEN }, itemColSum, true);
178 155  
179 156 emit('advanced-change');
180 157 }
... ... @@ -182,5 +159,6 @@ export default function ({
182 159 function handleToggleAdvanced() {
183 160 advanceState.isAdvanced = !advanceState.isAdvanced;
184 161 }
185   - return { getActionPropsRef, handleToggleAdvanced };
  162 +
  163 + return { handleToggleAdvanced };
186 164 }
... ...
src/components/Form/src/hooks/useComponentRegister.ts
1 1 import type { ComponentType } from '../types/index';
2 2 import { tryOnUnmounted } from '/@/utils/helper/vueHelper';
3 3 import { add, del } from '../componentMap';
4   -export function useComponentRegister(compName: ComponentType, comp: any) {
  4 +import type { Component } from 'vue';
  5 +
  6 +export function useComponentRegister(compName: ComponentType, comp: Component) {
5 7 add(compName, comp);
6 8 tryOnUnmounted(() => {
7 9 del(compName);
... ...
src/components/Form/src/hooks/useForm.ts
1   -import { ref, onUnmounted, unref } from 'vue';
  1 +import { ref, onUnmounted, unref, nextTick } from 'vue';
2 2  
3 3 import { isInSetup } from '/@/utils/helper/vueHelper';
4 4 import { isProdMode } from '/@/utils/env';
  5 +import { error } from '/@/utils/log';
5 6  
6 7 import type { FormProps, FormActionType, UseFormReturnType, FormSchema } from '../types/form';
7 8 import type { NamePath } from 'ant-design-vue/lib/form/interface';
8 9  
9   -export declare type ValidateFields = (nameList?: NamePath[]) => Promise<any>;
  10 +export declare type ValidateFields = (nameList?: NamePath[]) => Promise<Recordable>;
10 11  
11 12 export function useForm(props?: Partial<FormProps>): UseFormReturnType {
12 13 isInSetup();
13   - const formRef = ref<FormActionType | null>(null);
14   - const loadedRef = ref<boolean | null>(false);
15 14  
16   - function getForm() {
  15 + const formRef = ref<Nullable<FormActionType>>(null);
  16 + const loadedRef = ref<Nullable<boolean>>(false);
  17 +
  18 + async function getForm() {
17 19 const form = unref(formRef);
18 20 if (!form) {
19   - throw new Error('formRef is Null');
  21 + error(
  22 + 'The form instance has not been obtained, please make sure that the form has been rendered when performing the form operation!'
  23 + );
20 24 }
  25 + await nextTick();
21 26 return form as FormActionType;
22 27 }
23 28 function register(instance: FormActionType) {
... ... @@ -27,45 +32,73 @@ export function useForm(props?: Partial&lt;FormProps&gt;): UseFormReturnType {
27 32 loadedRef.value = null;
28 33 });
29 34 if (unref(loadedRef) && isProdMode() && instance === unref(formRef)) return;
  35 +
30 36 formRef.value = instance;
31 37 props && instance.setProps(props);
32 38 loadedRef.value = true;
33 39 }
34 40  
35 41 const methods: FormActionType = {
36   - setProps: (formProps: Partial<FormProps>) => {
37   - getForm().setProps(formProps);
  42 + scrollToField: async (name: NamePath, options?: ScrollOptions | undefined) => {
  43 + const form = await getForm();
  44 + form.scrollToField(name, options);
38 45 },
39   - updateSchema: (data: Partial<FormSchema> | Partial<FormSchema>[]) => {
40   - getForm().updateSchema(data);
  46 + setProps: async (formProps: Partial<FormProps>) => {
  47 + const form = await getForm();
  48 + form.setProps(formProps);
41 49 },
42   - clearValidate: (name?: string | string[]) => {
43   - getForm().clearValidate(name);
  50 +
  51 + updateSchema: async (data: Partial<FormSchema> | Partial<FormSchema>[]) => {
  52 + const form = await getForm();
  53 + form.updateSchema(data);
  54 + },
  55 +
  56 + clearValidate: async (name?: string | string[]) => {
  57 + const form = await getForm();
  58 + form.clearValidate(name);
44 59 },
  60 +
45 61 resetFields: async () => {
46   - await getForm().resetFields();
  62 + getForm().then(async (form) => {
  63 + await form.resetFields();
  64 + });
47 65 },
48   - removeSchemaByFiled: (field: string | string[]) => {
49   - getForm().removeSchemaByFiled(field);
  66 +
  67 + removeSchemaByFiled: async (field: string | string[]) => {
  68 + const form = await getForm();
  69 + form.removeSchemaByFiled(field);
50 70 },
51   - getFieldsValue: () => {
52   - return getForm().getFieldsValue();
  71 +
  72 + // TODO promisify
  73 + getFieldsValue: <T>() => {
  74 + return unref(formRef)?.getFieldsValue() as T;
53 75 },
54   - setFieldsValue: <T>(values: T) => {
55   - getForm().setFieldsValue<T>(values);
  76 +
  77 + setFieldsValue: async <T>(values: T) => {
  78 + const form = await getForm();
  79 + form.setFieldsValue<T>(values);
56 80 },
57   - appendSchemaByField: (schema: FormSchema, prefixField?: string | undefined) => {
58   - getForm().appendSchemaByField(schema, prefixField);
  81 +
  82 + appendSchemaByField: async (schema: FormSchema, prefixField?: string | undefined) => {
  83 + const form = await getForm();
  84 + form.appendSchemaByField(schema, prefixField);
59 85 },
  86 +
60 87 submit: async (): Promise<any> => {
61   - return getForm().submit();
  88 + const form = await getForm();
  89 + return form.submit();
  90 + },
  91 +
  92 + validate: async (nameList?: NamePath[]): Promise<Recordable> => {
  93 + const form = await getForm();
  94 + return form.validate(nameList);
  95 + },
  96 +
  97 + validateFields: async (nameList?: NamePath[]): Promise<Recordable> => {
  98 + const form = await getForm();
  99 + return form.validateFields(nameList);
62 100 },
63   - validate: ((async (nameList?: NamePath[]): Promise<any> => {
64   - return getForm().validate(nameList);
65   - }) as any) as ValidateFields,
66   - validateFields: ((async (nameList?: NamePath[]): Promise<any> => {
67   - return getForm().validate(nameList);
68   - }) as any) as ValidateFields,
69   - } as FormActionType;
  101 + };
  102 +
70 103 return [register, methods];
71 104 }
... ...
src/components/Form/src/hooks/useFormContext.ts 0 โ†’ 100644
  1 +import { InjectionKey } from 'vue';
  2 +import { createContext, useContext } from '/@/hooks/core/useContext';
  3 +
  4 +export interface FormContextProps {
  5 + resetAction: () => Promise<void>;
  6 + submitAction: () => Promise<void>;
  7 +}
  8 +
  9 +const key: InjectionKey<FormContextProps> = Symbol();
  10 +
  11 +export function createFormContext(context: FormContextProps) {
  12 + return createContext<FormContextProps>(context, key);
  13 +}
  14 +
  15 +export function useFormContext() {
  16 + return useContext<FormContextProps>(key);
  17 +}
... ...
src/components/Form/src/hooks/useFormAction.ts renamed to src/components/Form/src/hooks/useFormEvents.ts
... ... @@ -9,22 +9,19 @@ import { deepMerge, unique } from &#39;/@/utils&#39;;
9 9 import { dateItemType } from '../helper';
10 10 import moment from 'moment';
11 11 import { cloneDeep } from 'lodash-es';
  12 +import { error } from '/@/utils/log';
12 13  
13 14 interface UseFormActionContext {
14 15 emit: EmitType;
15 16 getProps: ComputedRef<FormProps>;
16 17 getSchema: ComputedRef<FormSchema[]>;
17   - formModel: any;
18   - defaultValueRef: Ref<any>;
  18 + formModel: Recordable;
  19 + defaultValueRef: Ref<Recordable>;
19 20 formElRef: Ref<FormActionType>;
20 21 schemaRef: Ref<FormSchema[]>;
21 22 handleFormValues: Fn;
22   - actionState: {
23   - resetAction: any;
24   - submitAction: any;
25   - };
26 23 }
27   -export function useFormAction({
  24 +export function useFormEvents({
28 25 emit,
29 26 getProps,
30 27 formModel,
... ... @@ -33,34 +30,34 @@ export function useFormAction({
33 30 formElRef,
34 31 schemaRef,
35 32 handleFormValues,
36   - actionState,
37 33 }: UseFormActionContext) {
38   - async function resetFields(): Promise<any> {
  34 + async function resetFields(): Promise<void> {
39 35 const { resetFunc, submitOnReset } = unref(getProps);
40 36 resetFunc && isFunction(resetFunc) && (await resetFunc());
  37 +
41 38 const formEl = unref(formElRef);
42 39 if (!formEl) return;
  40 +
43 41 Object.keys(formModel).forEach((key) => {
44   - (formModel as any)[key] = defaultValueRef.value[key];
  42 + formModel[key] = defaultValueRef.value[key];
45 43 });
46 44 clearValidate();
47 45 emit('reset', toRaw(formModel));
48   - // return values;
49 46 submitOnReset && handleSubmit();
50 47 }
51 48  
52 49 /**
53   - * @description: ่ฎพ็ฝฎ่กจๅ•ๅ€ผ
  50 + * @description: Set form value
54 51 */
55 52 async function setFieldsValue(values: any): Promise<void> {
56 53 const fields = unref(getSchema)
57 54 .map((item) => item.field)
58 55 .filter(Boolean);
59   - // const formEl = unref(formElRef);
60 56  
61 57 const validKeys: string[] = [];
62 58 Object.keys(values).forEach((key) => {
63 59 const element = values[key];
  60 + // 0| '' is allow
64 61 if (element !== undefined && element !== null && fields.includes(key)) {
65 62 // time type
66 63 if (itemIsDateType(key)) {
... ... @@ -69,12 +66,12 @@ export function useFormAction({
69 66 for (const ele of element) {
70 67 arr.push(moment(ele));
71 68 }
72   - (formModel as any)[key] = arr;
  69 + formModel[key] = arr;
73 70 } else {
74   - (formModel as any)[key] = moment(element);
  71 + formModel[key] = moment(element);
75 72 }
76 73 } else {
77   - (formModel as any)[key] = element;
  74 + formModel[key] = element;
78 75 }
79 76 validKeys.push(key);
80 77 }
... ... @@ -84,19 +81,18 @@ export function useFormAction({
84 81 /**
85 82 * @description: Delete based on field name
86 83 */
87   - function removeSchemaByFiled(fields: string | string[]): void {
  84 + async function removeSchemaByFiled(fields: string | string[]): Promise<void> {
88 85 const schemaList: FormSchema[] = cloneDeep(unref(getSchema));
89   - if (!fields) {
90   - return;
91   - }
92   - let fieldList: string[] = fields as string[];
  86 + if (!fields) return;
  87 +
  88 + let fieldList: string[] = isString(fields) ? [fields] : fields;
93 89 if (isString(fields)) {
94 90 fieldList = [fields];
95 91 }
96 92 for (const field of fieldList) {
97 93 _removeSchemaByFiled(field, schemaList);
98 94 }
99   - schemaRef.value = schemaList as any;
  95 + schemaRef.value = schemaList;
100 96 }
101 97  
102 98 /**
... ... @@ -114,27 +110,26 @@ export function useFormAction({
114 110 /**
115 111 * @description: Insert after a certain field, if not insert the last
116 112 */
117   - function appendSchemaByField(schema: FormSchema, prefixField?: string) {
  113 + async function appendSchemaByField(schema: FormSchema, prefixField?: string, first = false) {
118 114 const schemaList: FormSchema[] = cloneDeep(unref(getSchema));
119 115  
120 116 const index = schemaList.findIndex((schema) => schema.field === prefixField);
121   - const hasInList = schemaList.find((item) => item.field === schema.field);
  117 + const hasInList = schemaList.some((item) => item.field === schema.field);
122 118  
123   - if (hasInList) {
124   - return;
125   - }
126   - if (!prefixField || index === -1) {
127   - schemaList.push(schema);
128   - schemaRef.value = schemaList as any;
  119 + if (!hasInList) return;
  120 +
  121 + if (!prefixField || index === -1 || first) {
  122 + first ? schemaList.unshift(schema) : schemaList.push(schema);
  123 + schemaRef.value = schemaList;
129 124 return;
130 125 }
131 126 if (index !== -1) {
132 127 schemaList.splice(index + 1, 0, schema);
133 128 }
134   - schemaRef.value = schemaList as any;
  129 + schemaRef.value = schemaList;
135 130 }
136 131  
137   - function updateSchema(data: Partial<FormSchema> | Partial<FormSchema>[]) {
  132 + async function updateSchema(data: Partial<FormSchema> | Partial<FormSchema>[]) {
138 133 let updateData: Partial<FormSchema>[] = [];
139 134 if (isObject(data)) {
140 135 updateData.push(data as FormSchema);
... ... @@ -142,9 +137,13 @@ export function useFormAction({
142 137 if (isArray(data)) {
143 138 updateData = [...data];
144 139 }
  140 +
145 141 const hasField = updateData.every((item) => Reflect.has(item, 'field') && item.field);
  142 +
146 143 if (!hasField) {
147   - throw new Error('Must pass in the `field` field!');
  144 + error(
  145 + 'All children of the form Schema array that need to be updated must contain the `field` field'
  146 + );
148 147 }
149 148 const schema: FormSchema[] = [];
150 149 updateData.forEach((item) => {
... ... @@ -157,12 +156,12 @@ export function useFormAction({
157 156 }
158 157 });
159 158 });
160   - schemaRef.value = unique(schema, 'field') as any;
  159 + schemaRef.value = unique(schema, 'field');
161 160 }
162 161  
163   - function getFieldsValue(): any {
  162 + function getFieldsValue(): Recordable {
164 163 const formEl = unref(formElRef);
165   - if (!formEl) return;
  164 + if (!formEl) return {};
166 165 return handleFormValues(toRaw(unref(formModel)));
167 166 }
168 167  
... ... @@ -171,23 +170,24 @@ export function useFormAction({
171 170 */
172 171 function itemIsDateType(key: string) {
173 172 return unref(getSchema).some((item) => {
174   - return item.field === key ? dateItemType.includes(item.component!) : false;
  173 + return item.field === key ? dateItemType.includes(item.component) : false;
175 174 });
176 175 }
177 176  
178   - function validateFields(nameList?: NamePath[] | undefined) {
179   - if (!formElRef.value) return;
180   - return formElRef.value.validateFields(nameList);
  177 + async function validateFields(nameList?: NamePath[] | undefined) {
  178 + return await unref(formElRef)?.validateFields(nameList);
  179 + }
  180 +
  181 + async function validate(nameList?: NamePath[] | undefined) {
  182 + return await unref(formElRef)?.validate(nameList);
181 183 }
182 184  
183   - function validate(nameList?: NamePath[] | undefined) {
184   - if (!formElRef.value) return;
185   - return formElRef.value.validate(nameList);
  185 + async function clearValidate(name?: string | string[]) {
  186 + await unref(formElRef)?.clearValidate(name);
186 187 }
187 188  
188   - function clearValidate(name?: string | string[]) {
189   - if (!formElRef.value) return;
190   - formElRef.value.clearValidate(name);
  189 + async function scrollToField(name: NamePath, options?: ScrollOptions | undefined) {
  190 + await unref(formElRef)?.scrollToField(name, options);
191 191 }
192 192  
193 193 /**
... ... @@ -208,13 +208,6 @@ export function useFormAction({
208 208 emit('submit', res);
209 209 } catch (error) {}
210 210 }
211   - actionState.resetAction = {
212   - onClick: resetFields,
213   - };
214   -
215   - actionState.submitAction = {
216   - onClick: handleSubmit,
217   - };
218 211  
219 212 return {
220 213 handleSubmit,
... ... @@ -227,5 +220,6 @@ export function useFormAction({
227 220 removeSchemaByFiled,
228 221 resetFields,
229 222 setFieldsValue,
  223 + scrollToField,
230 224 };
231 225 }
... ...
src/components/Form/src/hooks/useFormValues.ts
... ... @@ -9,7 +9,7 @@ interface UseFormValuesContext {
9 9 fieldMapToTimeRef: Ref<FieldMapToTime>;
10 10 defaultValueRef: Ref<any>;
11 11 getSchema: ComputedRef<FormSchema[]>;
12   - formModel: any;
  12 + formModel: Recordable;
13 13 }
14 14 export function useFormValues({
15 15 transformDateFuncRef,
... ... @@ -19,11 +19,11 @@ export function useFormValues({
19 19 formModel,
20 20 }: UseFormValuesContext) {
21 21 // Processing form values
22   - function handleFormValues(values: Record<string, any>) {
  22 + function handleFormValues(values: Recordable) {
23 23 if (!isObject(values)) {
24 24 return {};
25 25 }
26   - const resMap: Record<string, any> = {};
  26 + const res: Recordable = {};
27 27 for (const item of Object.entries(values)) {
28 28 let [, value] = item;
29 29 const [key] = item;
... ... @@ -41,15 +41,15 @@ export function useFormValues({
41 41 if (isString(value)) {
42 42 value = value.trim();
43 43 }
44   - resMap[key] = value;
  44 + res[key] = value;
45 45 }
46   - return handleRangeTimeValue(resMap);
  46 + return handleRangeTimeValue(res);
47 47 }
48 48  
49 49 /**
50 50 * @description: Processing time interval parameters
51 51 */
52   - function handleRangeTimeValue(values: Record<string, any>) {
  52 + function handleRangeTimeValue(values: Recordable) {
53 53 const fieldMapToTime = unref(fieldMapToTimeRef);
54 54  
55 55 if (!fieldMapToTime || !Array.isArray(fieldMapToTime)) {
... ... @@ -65,6 +65,7 @@ export function useFormValues({
65 65  
66 66 values[startTimeKey] = moment(startTime).format(format);
67 67 values[endTimeKey] = moment(endTime).format(format);
  68 + Reflect.deleteProperty(values, field);
68 69 }
69 70  
70 71 return values;
... ... @@ -72,11 +73,11 @@ export function useFormValues({
72 73  
73 74 function initDefault() {
74 75 const schemas = unref(getSchema);
75   - const obj: Record<string, any> = {};
  76 + const obj: Recordable = {};
76 77 schemas.forEach((item) => {
77 78 if (item.defaultValue) {
78 79 obj[item.field] = item.defaultValue;
79   - (formModel as any)[item.field] = item.defaultValue;
  80 + formModel[item.field] = item.defaultValue;
80 81 }
81 82 });
82 83 defaultValueRef.value = obj;
... ...
src/components/Form/src/hooks/useLabelWidth.ts
... ... @@ -4,23 +4,8 @@ import type { FormProps, FormSchema } from &#39;../types/form&#39;;
4 4 import { computed, unref } from 'vue';
5 5 import { isNumber } from '/@/utils/is';
6 6  
7   -// export function useGlobalLabelWidth(propsRef: ComputedRef<FormProps>) {
8   -// return computed(() => {
9   -// const { labelWidth, labelCol, wrapperCol } = unref(propsRef);
10   -// if (!labelWidth) {
11   -// return { labelCol, wrapperCol };
12   -// }
13   -
14   -// const width = isNumber(labelWidth) ? `${labelWidth}px` : labelWidth;
15   -// return {
16   -// labelCol: { style: { width }, span: 1, ...labelCol },
17   -// wrapperCol: { style: { width: `calc(100% - ${width})` }, span: 23, ...wrapperCol },
18   -// };
19   -// });
20   -// }
21   -
22 7 export function useItemLabelWidth(schemaItemRef: Ref<FormSchema>, propsRef: Ref<FormProps>) {
23   - return computed((): any => {
  8 + return computed(() => {
24 9 const schemaItem = unref(schemaItemRef);
25 10 const { labelCol = {}, wrapperCol = {} } = schemaItem.itemProps || {};
26 11 const { labelWidth, disabledLabelWidth } = schemaItem;
... ... @@ -29,7 +14,7 @@ export function useItemLabelWidth(schemaItemRef: Ref&lt;FormSchema&gt;, propsRef: Ref&lt;
29 14 labelWidth: globalLabelWidth,
30 15 labelCol: globalLabelCol,
31 16 wrapperCol: globWrapperCol,
32   - } = unref(propsRef) as any;
  17 + } = unref(propsRef);
33 18  
34 19 // If labelWidth is set globally, all items setting
35 20 if ((!globalLabelWidth && !labelWidth && !globalLabelCol) || disabledLabelWidth) {
... ...
src/components/Form/src/props.ts
1 1 import type { FieldMapToTime, FormSchema } from './types/form';
2   -import type { PropType } from 'vue';
  2 +import type { CSSProperties, PropType } from 'vue';
3 3 import type { ColEx } from './types';
4   -import { TableActionType } from '/@/components/Table';
  4 +import type { TableActionType } from '/@/components/Table';
  5 +import type { ButtonProps } from 'ant-design-vue/es/button/buttonTypes';
  6 +
  7 +import { propTypes } from '/@/utils/propTypes';
5 8  
6 9 export const basicProps = {
7 10 model: {
8   - type: Object as PropType<Record<string, any>>,
  11 + type: Object as PropType<Recordable>,
9 12 default: {},
10 13 },
11 14 // ๆ ‡็ญพๅฎฝๅบฆ ๅ›บๅฎšๅฎฝๅบฆ
... ... @@ -17,7 +20,7 @@ export const basicProps = {
17 20 type: Array as PropType<FieldMapToTime>,
18 21 default: () => [],
19 22 },
20   - compact: Boolean as PropType<boolean>,
  23 + compact: propTypes.bool,
21 24 // ่กจๅ•้…็ฝฎ่ง„ๅˆ™
22 25 schemas: {
23 26 type: [Array] as PropType<FormSchema[]>,
... ... @@ -25,98 +28,68 @@ export const basicProps = {
25 28 required: true,
26 29 },
27 30 mergeDynamicData: {
28   - type: Object as PropType<any>,
  31 + type: Object as PropType<Recordable>,
29 32 default: null,
30 33 },
31 34 baseRowStyle: {
32   - type: Object as PropType<any>,
  35 + type: Object as PropType<CSSProperties>,
33 36 },
34 37 baseColProps: {
35   - type: Object as PropType<any>,
36   - },
37   - autoSetPlaceHolder: {
38   - type: Boolean,
39   - default: true,
40   - },
41   - submitOnReset: {
42   - type: Boolean,
43   - default: false,
44   - },
45   - size: {
46   - type: String as PropType<'default' | 'small' | 'large'>,
47   - default: 'default',
  38 + type: Object as PropType<Partial<ColEx>>,
48 39 },
  40 + autoSetPlaceHolder: propTypes.bool.def(true),
  41 + submitOnReset: propTypes.bool,
  42 + size: propTypes.oneOf(['default', 'small', 'large']).def('default'),
49 43 // ็ฆ็”จ่กจๅ•
50   - disabled: Boolean as PropType<boolean>,
  44 + disabled: propTypes.bool,
51 45 emptySpan: {
52 46 type: [Number, Object] as PropType<number>,
53 47 default: 0,
54 48 },
55 49 // ๆ˜ฏๅฆๆ˜พ็คบๆ”ถ่ตทๅฑ•ๅผ€ๆŒ‰้’ฎ
56   - showAdvancedButton: { type: Boolean as PropType<boolean>, default: false },
  50 + showAdvancedButton: propTypes.bool,
57 51 // ่ฝฌๅŒ–ๆ—ถ้—ด
58 52 transformDateFunc: {
59 53 type: Function as PropType<Fn>,
60 54 default: (date: any) => {
61   - return date._isAMomentObject ? date.format('YYYY-MM-DD HH:mm:ss') : date;
  55 + return date._isAMomentObject ? date?.format('YYYY-MM-DD HH:mm:ss') : date;
62 56 },
63 57 },
64   - rulesMessageJoinLabel: {
65   - type: Boolean,
66   - default: true,
67   - },
  58 + rulesMessageJoinLabel: propTypes.bool.def(true),
68 59 // ่ถ…่ฟ‡3่กŒ่‡ชๅŠจๆŠ˜ๅ 
69   - autoAdvancedLine: {
70   - type: Number as PropType<number>,
71   - default: 3,
72   - },
  60 + autoAdvancedLine: propTypes.number.def(3),
73 61  
74 62 // ๆ˜ฏๅฆๆ˜พ็คบๆ“ไฝœๆŒ‰้’ฎ
75   - showActionButtonGroup: {
76   - type: Boolean as PropType<boolean>,
77   - default: true,
78   - },
  63 + showActionButtonGroup: propTypes.bool.def(true),
79 64 // ๆ“ไฝœๅˆ—Col้…็ฝฎ
80   - actionColOptions: Object as PropType<ColEx>,
  65 + actionColOptions: Object as PropType<Partial<ColEx>>,
81 66 // ๆ˜พ็คบ้‡็ฝฎๆŒ‰้’ฎ
82   - showResetButton: {
83   - type: Boolean as PropType<boolean>,
84   - default: true,
85   - },
  67 + showResetButton: propTypes.bool.def(true),
86 68 // ้‡็ฝฎๆŒ‰้’ฎ้…็ฝฎ
87   - resetButtonOptions: Object as PropType<any>,
  69 + resetButtonOptions: Object as PropType<Partial<ButtonProps>>,
88 70  
89 71 // ๆ˜พ็คบ็กฎ่ฎคๆŒ‰้’ฎ
90   - showSubmitButton: {
91   - type: Boolean as PropType<boolean>,
92   - default: true,
93   - },
  72 + showSubmitButton: propTypes.bool.def(true),
94 73 // ็กฎ่ฎคๆŒ‰้’ฎ้…็ฝฎ
95   - submitButtonOptions: Object as PropType<any>,
  74 + submitButtonOptions: Object as PropType<Partial<ButtonProps>>,
96 75  
97 76 // ่‡ชๅฎšไน‰้‡็ฝฎๅ‡ฝๆ•ฐ
98   - resetFunc: Function as PropType<Fn>,
99   - submitFunc: Function as PropType<Fn>,
  77 + resetFunc: Function as PropType<() => Promise<void>>,
  78 + submitFunc: Function as PropType<() => Promise<void>>,
100 79  
101 80 // ไปฅไธ‹ไธบ้ป˜่ฎคprops
102   - hideRequiredMark: Boolean as PropType<boolean>,
  81 + hideRequiredMark: propTypes.bool,
103 82  
104   - labelCol: Object as PropType<ColEx>,
  83 + labelCol: Object as PropType<Partial<ColEx>>,
105 84  
106   - layout: {
107   - type: String as PropType<'horizontal' | 'vertical' | 'inline'>,
108   - default: 'horizontal',
109   - },
  85 + layout: propTypes.oneOf(['horizontal', 'vertical', 'inline']).def('horizontal'),
110 86 tableAction: {
111 87 type: Object as PropType<TableActionType>,
112 88 },
113 89  
114   - wrapperCol: Object as PropType<any>,
  90 + wrapperCol: Object as PropType<Partial<ColEx>>,
115 91  
116   - colon: {
117   - type: Boolean as PropType<boolean>,
118   - default: false,
119   - },
  92 + colon: propTypes.bool,
120 93  
121   - labelAlign: String as PropType<string>,
  94 + labelAlign: propTypes.string,
122 95 };
... ...
src/components/Form/src/types/form.ts
... ... @@ -5,6 +5,7 @@ import type { ButtonProps as AntdButtonProps } from &#39;ant-design-vue/es/button/bu
5 5 import type { FormItem } from './formItem';
6 6 import type { ColEx, ComponentType } from './index';
7 7 import type { TableActionType } from '/@/components/Table/src/types/table';
  8 +import type { CSSProperties } from 'vue';
8 9  
9 10 export type FieldMapToTime = [string, [string, string], string?][];
10 11  
... ... @@ -14,8 +15,8 @@ export type Rule = RuleObject &amp; {
14 15  
15 16 export interface RenderCallbackParams {
16 17 schema: FormSchema;
17   - values: any;
18   - model: any;
  18 + values: Recordable;
  19 + model: Recordable;
19 20 field: string;
20 21 }
21 22  
... ... @@ -25,18 +26,19 @@ export interface ButtonProps extends AntdButtonProps {
25 26  
26 27 export interface FormActionType {
27 28 submit: () => Promise<void>;
28   - setFieldsValue: <T>(values: T) => void;
29   - resetFields: () => Promise<any>;
30   - getFieldsValue: () => any;
31   - clearValidate: (name?: string | string[]) => void;
32   - updateSchema: (data: Partial<FormSchema> | Partial<FormSchema>[]) => void;
33   - setProps: (formProps: Partial<FormProps>) => void;
34   - removeSchemaByFiled: (field: string | string[]) => void;
35   - appendSchemaByField: (schema: FormSchema, prefixField?: string) => void;
  29 + setFieldsValue: <T>(values: T) => Promise<void>;
  30 + resetFields: () => Promise<void>;
  31 + getFieldsValue: () => Recordable;
  32 + clearValidate: (name?: string | string[]) => Promise<void>;
  33 + updateSchema: (data: Partial<FormSchema> | Partial<FormSchema>[]) => Promise<void>;
  34 + setProps: (formProps: Partial<FormProps>) => Promise<void>;
  35 + removeSchemaByFiled: (field: string | string[]) => Promise<void>;
  36 + appendSchemaByField: (schema: FormSchema, prefixField?: string) => Promise<void>;
36 37 validateFields: (nameList?: NamePath[]) => Promise<any>;
37 38 validate: (nameList?: NamePath[]) => Promise<any>;
38   - scrollToField: (name: NamePath, options?: ScrollOptions) => void;
  39 + scrollToField: (name: NamePath, options?: ScrollOptions) => Promise<void>;
39 40 }
  41 +
40 42 export type RegisterFn = (formInstance: FormActionType) => void;
41 43  
42 44 export type UseFormReturnType = [RegisterFn, FormActionType];
... ... @@ -44,7 +46,7 @@ export type UseFormReturnType = [RegisterFn, FormActionType];
44 46 export interface FormProps {
45 47 // layout?: 'vertical' | 'inline' | 'horizontal';
46 48 // Form value
47   - model?: any;
  49 + model?: Recordable;
48 50 // The width of all items in the entire form
49 51 labelWidth?: number | string;
50 52 // Submit form on reset
... ... @@ -55,7 +57,7 @@ export interface FormProps {
55 57 wrapperCol?: Partial<ColEx>;
56 58  
57 59 // General row style
58   - baseRowStyle?: object;
  60 + baseRowStyle?: CSSProperties;
59 61  
60 62 // General col configuration
61 63 baseColProps?: Partial<ColEx>;
... ... @@ -63,7 +65,7 @@ export interface FormProps {
63 65 // Form configuration rules
64 66 schemas?: FormSchema[];
65 67 // Function values used to merge into dynamic control form items
66   - mergeDynamicData?: any;
  68 + mergeDynamicData?: Recordable;
67 69 // Compact mode for search forms
68 70 compact?: boolean;
69 71 // Blank line span
... ... @@ -131,8 +133,8 @@ export interface FormSchema {
131 133 schema: FormSchema;
132 134 tableAction: TableActionType;
133 135 formActionType: FormActionType;
134   - formModel: any;
135   - }) => any)
  136 + formModel: Recordable;
  137 + }) => Recordable)
136 138 | object;
137 139 // Required
138 140 required?: boolean;
... ...
src/components/Modal/src/useModalContext.ts
... ... @@ -5,12 +5,12 @@ export interface ModalContextProps {
5 5 redoModalHeight: () => void;
6 6 }
7 7  
8   -const modalContextInjectKey: InjectionKey<ModalContextProps> = Symbol();
  8 +const key: InjectionKey<ModalContextProps> = Symbol();
9 9  
10 10 export function createModalContext(context: ModalContextProps) {
11   - return createContext<ModalContextProps>(context, modalContextInjectKey);
  11 + return createContext<ModalContextProps>(context, key);
12 12 }
13 13  
14 14 export function useModalContext() {
15   - return useContext<ModalContextProps>(modalContextInjectKey);
  15 + return useContext<ModalContextProps>(key);
16 16 }
... ...
src/components/Scrollbar/src/util.ts
... ... @@ -39,7 +39,7 @@ function extend&lt;T, K&gt;(to: T, _from: K): T &amp; K {
39 39 return Object.assign(to, _from);
40 40 }
41 41  
42   -export function toObject<T>(arr: Array<T>): Record<string, T> {
  42 +export function toObject<T>(arr: Array<T>): Recordable<T> {
43 43 const res = {};
44 44 for (let i = 0; i < arr.length; i++) {
45 45 if (arr[i]) {
... ...
src/components/Table/src/BasicTable.vue
... ... @@ -221,7 +221,7 @@
221 221 function handleTableChange(
222 222 pagination: PaginationProps,
223 223 // @ts-ignore
224   - filters: Partial<Record<string, string[]>>,
  224 + filters: Partial<Recordable<string[]>>,
225 225 sorter: SorterResult
226 226 ) {
227 227 const { clearSelectOnPageChange, sortFn } = unref(getMergeProps);
... ...
src/components/Table/src/components/renderEditable.tsx
... ... @@ -232,7 +232,7 @@ export function renderEditableRow({
232 232 };
233 233 }
234 234  
235   -export type EditRecordRow<T = { [key: string]: any }> = {
  235 +export type EditRecordRow<T = Hash<any>> = {
236 236 editable: boolean;
237 237 onCancel: Fn;
238 238 onSubmit: Fn;
... ...
src/components/Table/src/types/column.ts
... ... @@ -194,5 +194,5 @@ export interface ColumnProps&lt;T&gt; {
194 194 * such as slots: { filterIcon: 'XXX'}
195 195 * @type object
196 196 */
197   - slots?: Record<string, string>;
  197 + slots?: Recordable<string>;
198 198 }
... ...
src/components/Transition/src/CreateTransition.tsx
... ... @@ -40,7 +40,7 @@ export function createSimpleTransition(name: string, origin = &#39;top center 0&#39;, mo
40 40 }
41 41 export function createJavascriptTransition(
42 42 name: string,
43   - functions: Record<string, any>,
  43 + functions: Recordable,
44 44 mode: Mode = 'in-out'
45 45 ) {
46 46 return defineComponent({
... ...
src/components/VirtualScroll/src/index.tsx
... ... @@ -54,7 +54,7 @@ export default defineComponent({
54 54  
55 55 const getWrapStyleRef = computed(
56 56 (): CSSProperties => {
57   - const styles: Record<string, string> = {};
  57 + const styles: Recordable<string> = {};
58 58 const height = convertToUnit(props.height);
59 59 const minHeight = convertToUnit(props.minHeight);
60 60 const minWidth = convertToUnit(props.minWidth);
... ...
src/components/util.tsx
... ... @@ -40,7 +40,7 @@ const pattern = {
40 40 } as const;
41 41  
42 42 function parseStyle(style: string) {
43   - const styleMap: Dictionary<any> = {};
  43 + const styleMap: Recordable = {};
44 44  
45 45 for (const s of style.split(pattern.styleList)) {
46 46 let [key, val] = s.split(pattern.styleProp);
... ... @@ -161,8 +161,8 @@ export function mergeClasses(target: any, source: any) {
161 161 }
162 162  
163 163 export function mergeListeners(
164   - target: { [key: string]: Function | Function[] } | undefined,
165   - source: { [key: string]: Function | Function[] } | undefined
  164 + target: Indexable<Function | Function[]> | undefined,
  165 + source: Indexable<Function | Function[]> | undefined
166 166 ) {
167 167 if (!target) return source;
168 168 if (!source) return target;
... ...
src/directives/ripple/index.ts
... ... @@ -154,7 +154,7 @@ function rippler({
154 154 setTimeout(() => {
155 155 let clearPosition = true;
156 156 for (let i = 0; i < el.childNodes.length; i++) {
157   - if ((el.childNodes[i] as any).className === 'ripple-container') {
  157 + if ((el.childNodes[i] as Recordable).className === 'ripple-container') {
158 158 clearPosition = false;
159 159 }
160 160 }
... ... @@ -173,7 +173,7 @@ function rippler({
173 173 clearRipple();
174 174 }
175 175  
176   - (el as any).setBackground = (bgColor: string) => {
  176 + (el as Recordable).setBackground = (bgColor: string) => {
177 177 if (!bgColor) {
178 178 return;
179 179 }
... ... @@ -181,8 +181,8 @@ function rippler({
181 181 };
182 182 }
183 183  
184   -function setProps(modifiers: { [key: string]: any }, props: Record<string, any>) {
185   - modifiers.forEach((item: any) => {
  184 +function setProps(modifiers: Hash<any>, props: Recordable) {
  185 + modifiers.forEach((item: Recordable) => {
186 186 if (isNaN(Number(item))) props.event = item;
187 187 else props.transition = item;
188 188 });
... ...
src/hooks/component/useFormItem.ts 0 โ†’ 100644
  1 +import type { UnwrapRef } from 'vue';
  2 +import { reactive, readonly, computed, getCurrentInstance } from 'vue';
  3 +
  4 +import { isEqual } from 'lodash-es';
  5 +
  6 +export function useRuleFormItem<T extends Indexable>(
  7 + props: T,
  8 + key: keyof T = 'value',
  9 + changeEvent = 'change'
  10 +) {
  11 + const instance = getCurrentInstance();
  12 + const emit = instance?.emit;
  13 +
  14 + const innerState = reactive({
  15 + value: props[key],
  16 + });
  17 +
  18 + const defaultState = readonly(innerState);
  19 +
  20 + const setState = (val: UnwrapRef<T[keyof T]>) => {
  21 + innerState.value = val as T[keyof T];
  22 + };
  23 + const state = computed({
  24 + get() {
  25 + return innerState.value;
  26 + },
  27 + set(value) {
  28 + if (isEqual(value, defaultState.value)) return;
  29 + innerState.value = value as T[keyof T];
  30 + emit?.(changeEvent, value);
  31 + },
  32 + });
  33 +
  34 + return [state, setState, defaultState];
  35 +}
... ...
src/hooks/core/useAttrs.ts 0 โ†’ 100644
  1 +import { getCurrentInstance, reactive, shallowRef, watchEffect } from 'vue';
  2 +
  3 +interface Params {
  4 + excludeListeners?: boolean;
  5 + excludeKeys?: string[];
  6 +}
  7 +
  8 +const DEFAULT_EXCLUDE_KEYS = ['class', 'style'];
  9 +const LISTENER_PREFIX = /^on[A-Z]/;
  10 +
  11 +export function entries<T>(obj: Hash<T>): [string, T][] {
  12 + return Object.keys(obj).map((key: string) => [key, obj[key]]);
  13 +}
  14 +
  15 +export function useAttrs(params: Params = {}) {
  16 + const instance = getCurrentInstance();
  17 + if (!instance) return {};
  18 +
  19 + const { excludeListeners = false, excludeKeys = [] } = params;
  20 + const attrs = shallowRef({});
  21 + const allExcludeKeys = excludeKeys.concat(DEFAULT_EXCLUDE_KEYS);
  22 +
  23 + // Since attrs are not reactive, make it reactive instead of doing in `onUpdated` hook for better performance
  24 + instance.attrs = reactive(instance.attrs);
  25 +
  26 + watchEffect(() => {
  27 + const res = entries(instance.attrs).reduce((acm, [key, val]) => {
  28 + if (!allExcludeKeys.includes(key) && !(excludeListeners && LISTENER_PREFIX.test(key))) {
  29 + acm[key] = val;
  30 + }
  31 +
  32 + return acm;
  33 + }, {} as Hash<any>);
  34 +
  35 + attrs.value = res;
  36 + });
  37 +
  38 + return attrs;
  39 +}
... ...
src/hooks/event/useKeyPress.ts
... ... @@ -23,7 +23,7 @@ export type EventOption = {
23 23 const defaultEvents: keyEvent[] = ['keydown'];
24 24  
25 25 // ้”ฎ็›˜ไบ‹ไปถ keyCode ๅˆซๅ
26   -const aliasKeyCodeMap: Record<string, number | number[]> = {
  26 +const aliasKeyCodeMap: Recordable<number | number[]> = {
27 27 esc: 27,
28 28 tab: 9,
29 29 enter: 13,
... ... @@ -36,7 +36,7 @@ const aliasKeyCodeMap: Record&lt;string, number | number[]&gt; = {
36 36 };
37 37  
38 38 // ้”ฎ็›˜ไบ‹ไปถ key ๅˆซๅ
39   -const aliasKeyMap: Record<string, string | string[]> = {
  39 +const aliasKeyMap: Recordable<string | string[]> = {
40 40 esc: 'Escape',
41 41 tab: 'Tab',
42 42 enter: 'Enter',
... ... @@ -50,7 +50,7 @@ const aliasKeyMap: Record&lt;string, string | string[]&gt; = {
50 50 };
51 51  
52 52 // ไฟฎ้ฅฐ้”ฎ
53   -const modifierKey: Record<string, (event: KeyboardEvent) => boolean> = {
  53 +const modifierKey: Recordable<(event: KeyboardEvent) => boolean> = {
54 54 ctrl: (event: KeyboardEvent) => event.ctrlKey,
55 55 shift: (event: KeyboardEvent) => event.shiftKey,
56 56 alt: (event: KeyboardEvent) => event.altKey,
... ...
src/hooks/web/useI18n.ts
... ... @@ -24,7 +24,7 @@ export function useI18n(namespace?: string) {
24 24  
25 25 return {
26 26 ...methods,
27   - t: (key: string, ...arg: any) => {
  27 + t: (key: string, ...arg: any): string => {
28 28 if (!key) return '';
29 29 return t(getKey(key), ...(arg as Parameters<typeof t>));
30 30 },
... ...
src/layouts/page/index.tsx
... ... @@ -13,7 +13,7 @@ import { useMultipleTabSetting } from &#39;/@/hooks/setting/useMultipleTabSetting&#39;;
13 13 // import { createAsyncComponent } from '/@/utils/factory/createAsyncComponent';
14 14  
15 15 interface DefaultContext {
16   - Component: FunctionalComponent & { type: { [key: string]: any } };
  16 + Component: FunctionalComponent & { type: Indexable };
17 17 route: RouteLocation;
18 18 }
19 19  
... ...
src/router/guard/permissionGuard.ts
... ... @@ -40,7 +40,7 @@ export function createPermissionGuard(router: Router) {
40 40 return;
41 41 }
42 42 // redirect login page
43   - const redirectData: { path: string; replace: boolean; query?: { [key: string]: string } } = {
  43 + const redirectData: { path: string; replace: boolean; query?: Indexable<string> } = {
44 44 path: LOGIN_PATH,
45 45 replace: true,
46 46 };
... ...
src/router/types.ts
... ... @@ -48,7 +48,7 @@ export interface AppRouteRecordRaw extends Omit&lt;RouteRecordRaw, &#39;meta&#39;&gt; {
48 48 component?: Component | string;
49 49 components?: Component;
50 50 children?: AppRouteRecordRaw[];
51   - props?: Record<string, any>;
  51 + props?: Recordable;
52 52 fullPath?: string;
53 53 }
54 54 export interface MenuTag {
... ...
src/settings/colorSetting.ts
... ... @@ -2,7 +2,7 @@
2 2 export const HEADER_PRESET_BG_COLOR_LIST: string[] = [
3 3 '#ffffff',
4 4 '#009688',
5   - '#18bc9c',
  5 + '#5172DC',
6 6 '#1E9FFF',
7 7 '#018ffb',
8 8 '#409eff',
... ...
src/types/global.d.ts
... ... @@ -15,18 +15,20 @@ declare function parseInt(s: string | number, radix?: number): number;
15 15  
16 16 declare function parseFloat(string: string | number): number;
17 17  
18   -declare type Dictionary<T> = Record<string, T>;
19   -
20 18 declare type Nullable<T> = T | null;
21 19  
  20 +declare type NonNullable<T> = T extends null | undefined ? never : T;
  21 +
22 22 declare type RefType<T> = T | null;
23 23  
24 24 declare type CustomizedHTMLElement<T> = HTMLElement & T;
25 25  
26   -declare type Indexable<T = any> = {
  26 +declare type Indexable<T extends any = any> = {
27 27 [key: string]: T;
28 28 };
29 29  
  30 +declare type Recordable<T extends any = any> = Record<string, T>;
  31 +
30 32 declare type Hash<T> = Indexable<T>;
31 33  
32 34 declare type DeepPartial<T> = {
... ... @@ -59,3 +61,5 @@ declare interface ComponentElRef&lt;T extends HTMLElement = HTMLDivElement&gt; {
59 61 declare type ComponentRef<T extends HTMLElement = HTMLDivElement> = ComponentElRef<T> | null;
60 62  
61 63 declare type ElRef<T extends HTMLElement = HTMLDivElement> = Nullable<T>;
  64 +
  65 +type IsSame<A, B> = A | B extends A & B ? true : false;
... ...
src/utils/helper/persistent.ts
... ... @@ -7,8 +7,8 @@ const ls = createStorage(localStorage);
7 7 const ss = createStorage();
8 8  
9 9 interface CacheStore {
10   - local: Record<string, any>;
11   - session: Record<string, any>;
  10 + local: Recordable;
  11 + session: Recordable;
12 12 }
13 13  
14 14 /**
... ...
src/utils/helper/tsxHelper.tsx
... ... @@ -35,7 +35,7 @@ export function extendSlots(slots: Slots, excludeKeys: string[] = []) {
35 35 }
36 36  
37 37 // Get events on attrs
38   -export function getListeners(attrs: Record<string, unknown>) {
  38 +export function getListeners(attrs: Recordable<unknown>) {
39 39 const listeners: any = {};
40 40 Object.keys(attrs).forEach((key) => {
41 41 if (/^on/.test(key)) {
... ...
src/utils/helper/vueHelper.ts
... ... @@ -9,6 +9,7 @@ import {
9 9 reactive,
10 10 ComponentInternalInstance,
11 11 } from 'vue';
  12 +import { error } from '../log';
12 13  
13 14 export function explicitComputed<T, S>(source: WatchSource<S>, fn: () => T) {
14 15 const v = reactive<any>({ value: fn() });
... ... @@ -39,6 +40,6 @@ export function tryTsxEmit&lt;T extends any = ComponentInternalInstance&gt;(
39 40  
40 41 export function isInSetup() {
41 42 if (!getCurrentInstance()) {
42   - throw new Error('Please put useForm function in the setup function!');
  43 + error('Please put useForm function in the setup function!');
43 44 }
44 45 }
... ...
src/utils/http/axios/types.ts
... ... @@ -35,7 +35,7 @@ export interface Result&lt;T = any&gt; {
35 35 // multipart/form-data๏ผšไธŠไผ ๆ–‡ไปถ
36 36 export interface UploadFileParams {
37 37 // ๅ…ถไป–ๅ‚ๆ•ฐ
38   - data?: { [key: string]: any };
  38 + data?: Indexable;
39 39 // ๆ–‡ไปถๅ‚ๆ•ฐ็š„ๆŽฅๅฃๅญ—ๆฎตๅ
40 40 name?: string;
41 41 // ๆ–‡ไปถ
... ...
src/utils/index.ts
... ... @@ -38,7 +38,7 @@ export function setObjToUrlParams(baseUrl: string, obj: any): string {
38 38 return url;
39 39 }
40 40  
41   -export function deepMerge<T = any>(src: any, target: any): T {
  41 +export function deepMerge<T = any>(src: any = {}, target: any = {}): T {
42 42 let key: string;
43 43 for (key in target) {
44 44 src[key] = isObject(src[key]) ? deepMerge(src[key], target[key]) : (src[key] = target[key]);
... ...
src/utils/log.ts
... ... @@ -3,3 +3,7 @@ const projectName = import.meta.env.VITE_GLOB_APP_TITLE;
3 3 export function warn(message: string) {
4 4 console.warn(`[${projectName} warn]:${message}`);
5 5 }
  6 +
  7 +export function error(message: string) {
  8 + throw new Error(`[${projectName} error]:${message}`);
  9 +}
... ...
src/views/demo/form/RuleForm.vue
... ... @@ -84,12 +84,15 @@
84 84 required: true,
85 85 // @ts-ignore
86 86 validator: async (rule, value) => {
  87 + if (!value) {
  88 + return Promise.reject('ๅ€ผไธ่ƒฝไธบ็ฉบ');
  89 + }
87 90 if (value === '1') {
88 91 return Promise.reject('ๅ€ผไธ่ƒฝไธบ1');
89 92 }
90 93 return Promise.resolve();
91 94 },
92   - trigger: 'blur',
  95 + trigger: 'change',
93 96 },
94 97 ],
95 98 },
... ...
yarn.lock
... ... @@ -35,7 +35,7 @@
35 35 "@types/lodash" "^4.14.165"
36 36 lodash "^4.17.15"
37 37  
38   -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4", "@babel/code-frame@^7.5.5", "@babel/code-frame@^7.8.3":
  38 +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4":
39 39 version "7.10.4"
40 40 resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz#168da1a36e90da68ae8d49c0f1b48c7c6249213a"
41 41 integrity sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==
... ... @@ -47,7 +47,7 @@
47 47 resolved "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.12.7.tgz#9329b4782a7d6bbd7eef57e11addf91ee3ef1e41"
48 48 integrity sha512-YaxPMGs/XIWtYqrdEOZOCPsVWfEoriXopnsz3/i7apYPXQ3698UFhS6dVT1KN5qOsWmVgw/FOrmQgpRaZayGsw==
49 49  
50   -"@babel/core@>=7.9.0", "@babel/core@^7.8.4":
  50 +"@babel/core@>=7.9.0", "@babel/core@^7.11.1":
51 51 version "7.12.10"
52 52 resolved "https://registry.npmjs.org/@babel/core/-/core-7.12.10.tgz#b79a2e1b9f70ed3d84bbfb6d8c4ef825f606bccd"
53 53 integrity sha512-eTAlQKq65zHfkHZV0sIVODCPGVgoo1HdBlbSLi9CqOzuZanMv2ihzY+4paiKr1mH+XmYESMAmJ/dpZ68eN6d8w==
... ... @@ -167,7 +167,7 @@
167 167 dependencies:
168 168 "@babel/types" "^7.12.7"
169 169  
170   -"@babel/helper-module-imports@^7.0.0", "@babel/helper-module-imports@^7.12.1", "@babel/helper-module-imports@^7.12.5":
  170 +"@babel/helper-module-imports@^7.10.4", "@babel/helper-module-imports@^7.12.1", "@babel/helper-module-imports@^7.12.5":
171 171 version "7.12.5"
172 172 resolved "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.12.5.tgz#1bfc0229f794988f76ed0a4d4e90860850b54dfb"
173 173 integrity sha512-SR713Ogqg6++uexFRORf/+nPXMmWIn80TALu0uaFb+iQIUoR7bOC7zBWyzBs5b3tBBJXuyD0cRu1F15GyzjOWA==
... ... @@ -246,11 +246,21 @@
246 246 resolved "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz#a78c7a7251e01f616512d31b10adcf52ada5e0d2"
247 247 integrity sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw==
248 248  
  249 +"@babel/helper-validator-identifier@^7.12.11":
  250 + version "7.12.11"
  251 + resolved "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz#c9a1f021917dcb5ccf0d4e453e399022981fc9ed"
  252 + integrity sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==
  253 +
249 254 "@babel/helper-validator-option@^7.12.1":
250 255 version "7.12.1"
251 256 resolved "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.12.1.tgz#175567380c3e77d60ff98a54bb015fe78f2178d9"
252 257 integrity sha512-YpJabsXlJVWP0USHjnC/AQDTLlZERbON577YUVO/wLpqyj6HAtVYnWaQaN0iUN+1/tWn3c+uKKXjRut5115Y2A==
253 258  
  259 +"@babel/helper-validator-option@^7.12.11":
  260 + version "7.12.11"
  261 + resolved "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.12.11.tgz#d66cb8b7a3e7fe4c6962b32020a131ecf0847f4f"
  262 + integrity sha512-TBFCyj939mFSdeX7U7DDj32WtzYY7fDcalgq8v3fBZMNOJQNn7nOYzMaUCiPxPYfCup69mtIpqlKgMZLvQ8Xhw==
  263 +
254 264 "@babel/helper-wrap-function@^7.10.4":
255 265 version "7.12.3"
256 266 resolved "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.12.3.tgz#3332339fc4d1fbbf1c27d7958c27d34708e990d9"
... ... @@ -498,10 +508,10 @@
498 508 dependencies:
499 509 "@babel/helper-plugin-utils" "^7.10.4"
500 510  
501   -"@babel/plugin-transform-block-scoping@^7.12.1":
502   - version "7.12.1"
503   - resolved "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.12.1.tgz#f0ee727874b42a208a48a586b84c3d222c2bbef1"
504   - integrity sha512-zJyAC9sZdE60r1nVQHblcfCj29Dh2Y0DOvlMkcqSo0ckqjiCwNiUezUKw+RjOCwGfpLRwnAeQ2XlLpsnGkvv9w==
  511 +"@babel/plugin-transform-block-scoping@^7.12.11":
  512 + version "7.12.12"
  513 + resolved "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.12.12.tgz#d93a567a152c22aea3b1929bb118d1d0a175cdca"
  514 + integrity sha512-VOEPQ/ExOVqbukuP7BYJtI5ZxxsmegTwzZ04j1aF0dkSypGo9XpDHuOrABsJu+ie+penpSJheDJ11x1BEZNiyQ==
505 515 dependencies:
506 516 "@babel/helper-plugin-utils" "^7.10.4"
507 517  
... ... @@ -724,16 +734,16 @@
724 734 "@babel/helper-create-regexp-features-plugin" "^7.12.1"
725 735 "@babel/helper-plugin-utils" "^7.10.4"
726 736  
727   -"@babel/preset-env@^7.8.4":
728   - version "7.12.10"
729   - resolved "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.12.10.tgz#ca981b95f641f2610531bd71948656306905e6ab"
730   - integrity sha512-Gz9hnBT/tGeTE2DBNDkD7BiWRELZt+8lSysHuDwmYXUIvtwZl0zI+D6mZgXZX0u8YBlLS4tmai9ONNY9tjRgRA==
  737 +"@babel/preset-env@^7.11.0":
  738 + version "7.12.11"
  739 + resolved "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.12.11.tgz#55d5f7981487365c93dbbc84507b1c7215e857f9"
  740 + integrity sha512-j8Tb+KKIXKYlDBQyIOy4BLxzv1NUOwlHfZ74rvW+Z0Gp4/cI2IMDPBWAgWceGcE7aep9oL/0K9mlzlMGxA8yNw==
731 741 dependencies:
732 742 "@babel/compat-data" "^7.12.7"
733 743 "@babel/helper-compilation-targets" "^7.12.5"
734 744 "@babel/helper-module-imports" "^7.12.5"
735 745 "@babel/helper-plugin-utils" "^7.10.4"
736   - "@babel/helper-validator-option" "^7.12.1"
  746 + "@babel/helper-validator-option" "^7.12.11"
737 747 "@babel/plugin-proposal-async-generator-functions" "^7.12.1"
738 748 "@babel/plugin-proposal-class-properties" "^7.12.1"
739 749 "@babel/plugin-proposal-dynamic-import" "^7.12.1"
... ... @@ -762,7 +772,7 @@
762 772 "@babel/plugin-transform-arrow-functions" "^7.12.1"
763 773 "@babel/plugin-transform-async-to-generator" "^7.12.1"
764 774 "@babel/plugin-transform-block-scoped-functions" "^7.12.1"
765   - "@babel/plugin-transform-block-scoping" "^7.12.1"
  775 + "@babel/plugin-transform-block-scoping" "^7.12.11"
766 776 "@babel/plugin-transform-classes" "^7.12.1"
767 777 "@babel/plugin-transform-computed-properties" "^7.12.1"
768 778 "@babel/plugin-transform-destructuring" "^7.12.1"
... ... @@ -792,7 +802,7 @@
792 802 "@babel/plugin-transform-unicode-escapes" "^7.12.1"
793 803 "@babel/plugin-transform-unicode-regex" "^7.12.1"
794 804 "@babel/preset-modules" "^0.1.3"
795   - "@babel/types" "^7.12.10"
  805 + "@babel/types" "^7.12.11"
796 806 core-js-compat "^3.8.0"
797 807 semver "^5.5.0"
798 808  
... ... @@ -847,6 +857,15 @@
847 857 lodash "^4.17.19"
848 858 to-fast-properties "^2.0.0"
849 859  
  860 +"@babel/types@^7.12.11":
  861 + version "7.12.12"
  862 + resolved "https://registry.npmjs.org/@babel/types/-/types-7.12.12.tgz#4608a6ec313abbd87afa55004d373ad04a96c299"
  863 + integrity sha512-lnIX7piTxOH22xE7fDXDbSHg9MM1/6ORnafpJmov5rs0kX5g4BZxeXNJLXsMRiO0U5Rb8/FvMS6xlTnTHvxonQ==
  864 + dependencies:
  865 + "@babel/helper-validator-identifier" "^7.12.11"
  866 + lodash "^4.17.19"
  867 + to-fast-properties "^2.0.0"
  868 +
850 869 "@commitlint/cli@^11.0.0":
851 870 version "11.0.0"
852 871 resolved "https://registry.npmjs.org/@commitlint/cli/-/cli-11.0.0.tgz#698199bc52afed50aa28169237758fa14a67b5d3"
... ... @@ -1004,32 +1023,38 @@
1004 1023 minimatch "^3.0.4"
1005 1024 strip-json-comments "^3.1.1"
1006 1025  
1007   -"@hapi/address@2.x.x":
  1026 +"@hapi/address@^2.1.2":
1008 1027 version "2.1.4"
1009 1028 resolved "https://registry.npmjs.org/@hapi/address/-/address-2.1.4.tgz#5d67ed43f3fd41a69d4b9ff7b56e7c0d1d0a81e5"
1010 1029 integrity sha512-QD1PhQk+s31P1ixsX0H0Suoupp3VMXzIVMSwobR3F3MSUO2YCV0B7xqLcUw/Bh8yuvd3LhpyqLQWTNcRmp6IdQ==
1011 1030  
1012   -"@hapi/bourne@1.x.x":
1013   - version "1.3.2"
1014   - resolved "https://registry.npmjs.org/@hapi/bourne/-/bourne-1.3.2.tgz#0a7095adea067243ce3283e1b56b8a8f453b242a"
1015   - integrity sha512-1dVNHT76Uu5N3eJNTYcvxee+jzX4Z9lfciqRRHCU27ihbUcYi+iSc2iml5Ke1LXe1SyJCLA0+14Jh4tXJgOppA==
  1031 +"@hapi/formula@^1.2.0":
  1032 + version "1.2.0"
  1033 + resolved "https://registry.npmjs.org/@hapi/formula/-/formula-1.2.0.tgz#994649c7fea1a90b91a0a1e6d983523f680e10cd"
  1034 + integrity sha512-UFbtbGPjstz0eWHb+ga/GM3Z9EzqKXFWIbSOFURU0A/Gku0Bky4bCk9/h//K2Xr3IrCfjFNhMm4jyZ5dbCewGA==
1016 1035  
1017   -"@hapi/hoek@8.x.x", "@hapi/hoek@^8.3.0":
  1036 +"@hapi/hoek@^8.2.4", "@hapi/hoek@^8.3.0":
1018 1037 version "8.5.1"
1019 1038 resolved "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.5.1.tgz#fde96064ca446dec8c55a8c2f130957b070c6e06"
1020 1039 integrity sha512-yN7kbciD87WzLGc5539Tn0sApjyiGHAJgKvG9W8C7O+6c7qmoQMfVs0W4bX17eqz6C78QJqqFrtgdK5EWf6Qow==
1021 1040  
1022   -"@hapi/joi@^15.1.0":
1023   - version "15.1.1"
1024   - resolved "https://registry.npmjs.org/@hapi/joi/-/joi-15.1.1.tgz#c675b8a71296f02833f8d6d243b34c57b8ce19d7"
1025   - integrity sha512-entf8ZMOK8sc+8YfeOlM8pCfg3b5+WZIKBfUaaJT8UsjAAPjartzxIYm3TIbjvA4u+u++KbcXD38k682nVHDAQ==
  1041 +"@hapi/joi@^16.1.8":
  1042 + version "16.1.8"
  1043 + resolved "https://registry.npmjs.org/@hapi/joi/-/joi-16.1.8.tgz#84c1f126269489871ad4e2decc786e0adef06839"
  1044 + integrity sha512-wAsVvTPe+FwSrsAurNt5vkg3zo+TblvC5Bb1zMVK6SJzZqw9UrJnexxR+76cpePmtUZKHAPxcQ2Bf7oVHyahhg==
1026 1045 dependencies:
1027   - "@hapi/address" "2.x.x"
1028   - "@hapi/bourne" "1.x.x"
1029   - "@hapi/hoek" "8.x.x"
1030   - "@hapi/topo" "3.x.x"
  1046 + "@hapi/address" "^2.1.2"
  1047 + "@hapi/formula" "^1.2.0"
  1048 + "@hapi/hoek" "^8.2.4"
  1049 + "@hapi/pinpoint" "^1.0.2"
  1050 + "@hapi/topo" "^3.1.3"
  1051 +
  1052 +"@hapi/pinpoint@^1.0.2":
  1053 + version "1.0.2"
  1054 + resolved "https://registry.npmjs.org/@hapi/pinpoint/-/pinpoint-1.0.2.tgz#025b7a36dbbf4d35bf1acd071c26b20ef41e0d13"
  1055 + integrity sha512-dtXC/WkZBfC5vxscazuiJ6iq4j9oNx1SHknmIr8hofarpKUZKmlUVYVIhNVzIEgK5Wrc4GMHL5lZtt1uS2flmQ==
1031 1056  
1032   -"@hapi/topo@3.x.x":
  1057 +"@hapi/topo@^3.1.3":
1033 1058 version "3.1.6"
1034 1059 resolved "https://registry.npmjs.org/@hapi/topo/-/topo-3.1.6.tgz#68d935fa3eae7fdd5ab0d7f953f3205d8b2bfc29"
1035 1060 integrity sha512-tAag0jEcjwH+P2quUfipd7liWCNX2F8NvYjQp2wtInsZxnMlypdw0FtAOLxtvvkO+GSRRbmNi8m/5y42PQJYCQ==
... ... @@ -1051,10 +1076,10 @@
1051 1076 resolved "https://registry.npmjs.org/@iconify/iconify/-/iconify-2.0.0-rc.4.tgz#46098fb544a4eb3af724219e4955c9022801835e"
1052 1077 integrity sha512-YCSECbeXKFJEIVkKgKMjUzJ439ysufmL/a31B1j7dCvnHaBWsX9J4XehhJgg/aTy3yvhHaVhI6xt1kSMZP799A==
1053 1078  
1054   -"@iconify/json@^1.1.275":
1055   - version "1.1.275"
1056   - resolved "https://registry.npmjs.org/@iconify/json/-/json-1.1.275.tgz#ac9a706cdc7c9e64ab8e8bb09ae770f551f7496f"
1057   - integrity sha512-Nt6tXJpZFd/gFRV24BvmlIdxnbMxgshIKFPQwOWgeVjKiOKEwiBKjXUzBE74As7/Olps/ac1gEB40N9/DGOJ3Q==
  1079 +"@iconify/json@^1.1.276":
  1080 + version "1.1.276"
  1081 + resolved "https://registry.npmjs.org/@iconify/json/-/json-1.1.276.tgz#c8d51751abc84cc73a466f55bc2f352686451786"
  1082 + integrity sha512-Ra/mGT+n38vhi/i1cjsPYOmSR2d6rNIXZ+OsrIWp9J35zAPQ93sSTQMpTyxZdLu3QxU0vYwtcaC7h/Y1/3H3wg==
1058 1083  
1059 1084 "@intlify/core-base@9.0.0-beta.14":
1060 1085 version "9.0.0-beta.14"
... ... @@ -1170,6 +1195,14 @@
1170 1195 dependencies:
1171 1196 "@iconify/iconify" ">=2.0.0-rc.1"
1172 1197  
  1198 +"@rollup/plugin-babel@^5.2.0":
  1199 + version "5.2.2"
  1200 + resolved "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-5.2.2.tgz#e5623a01dd8e37e004ba87f2de218c611727d9b2"
  1201 + integrity sha512-MjmH7GvFT4TW8xFdIeFS3wqIX646y5tACdxkTO+khbHvS3ZcVJL6vkAHLw2wqPmkhwCfWHoNsp15VYNwW6JEJA==
  1202 + dependencies:
  1203 + "@babel/helper-module-imports" "^7.10.4"
  1204 + "@rollup/pluginutils" "^3.1.0"
  1205 +
1173 1206 "@rollup/plugin-commonjs@^16.0.0":
1174 1207 version "16.0.0"
1175 1208 resolved "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-16.0.0.tgz#169004d56cd0f0a1d0f35915d31a036b0efe281f"
... ... @@ -1214,31 +1247,31 @@
1214 1247 is-module "^1.0.0"
1215 1248 resolve "^1.19.0"
1216 1249  
1217   -"@rollup/plugin-node-resolve@^7.1.1":
1218   - version "7.1.3"
1219   - resolved "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-7.1.3.tgz#80de384edfbd7bfc9101164910f86078151a3eca"
1220   - integrity sha512-RxtSL3XmdTAE2byxekYLnx+98kEUOrPHF/KRVjLH+DEIHy6kjIw7YINQzn+NXiH/NTrQLAwYs0GWB+csWygA9Q==
  1250 +"@rollup/plugin-node-resolve@^11.0.1":
  1251 + version "11.0.1"
  1252 + resolved "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-11.0.1.tgz#d3765eec4bccf960801439a999382aed2dca959b"
  1253 + integrity sha512-ltlsj/4Bhwwhb+Nb5xCz/6vieuEj2/BAkkqVIKmZwC7pIdl8srmgmglE4S0jFlZa32K4qvdQ6NHdmpRKD/LwoQ==
1221 1254 dependencies:
1222   - "@rollup/pluginutils" "^3.0.8"
1223   - "@types/resolve" "0.0.8"
  1255 + "@rollup/pluginutils" "^3.1.0"
  1256 + "@types/resolve" "1.17.1"
1224 1257 builtin-modules "^3.1.0"
  1258 + deepmerge "^4.2.2"
1225 1259 is-module "^1.0.0"
1226   - resolve "^1.14.2"
  1260 + resolve "^1.19.0"
1227 1261  
1228   -"@rollup/plugin-node-resolve@^8.4.0":
1229   - version "8.4.0"
1230   - resolved "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-8.4.0.tgz#261d79a680e9dc3d86761c14462f24126ba83575"
1231   - integrity sha512-LFqKdRLn0ShtQyf6SBYO69bGE1upV6wUhBX0vFOUnLAyzx5cwp8svA0eHUnu8+YU57XOkrMtfG63QOpQx25pHQ==
  1262 +"@rollup/plugin-node-resolve@^9.0.0":
  1263 + version "9.0.0"
  1264 + resolved "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-9.0.0.tgz#39bd0034ce9126b39c1699695f440b4b7d2b62e6"
  1265 + integrity sha512-gPz+utFHLRrd41WMP13Jq5mqqzHL3OXrfj3/MkSyB6UBIcuNt9j60GCbarzMzdf1VHFpOxfQh/ez7wyadLMqkg==
1232 1266 dependencies:
1233 1267 "@rollup/pluginutils" "^3.1.0"
1234 1268 "@types/resolve" "1.17.1"
1235 1269 builtin-modules "^3.1.0"
1236   - deep-freeze "^0.0.1"
1237 1270 deepmerge "^4.2.2"
1238 1271 is-module "^1.0.0"
1239 1272 resolve "^1.17.0"
1240 1273  
1241   -"@rollup/plugin-replace@^2.3.1", "@rollup/plugin-replace@^2.3.3":
  1274 +"@rollup/plugin-replace@^2.3.3", "@rollup/plugin-replace@^2.3.4":
1242 1275 version "2.3.4"
1243 1276 resolved "https://registry.npmjs.org/@rollup/plugin-replace/-/plugin-replace-2.3.4.tgz#7dd84c17755d62b509577f2db37eb524d7ca88ca"
1244 1277 integrity sha512-waBhMzyAtjCL1GwZes2jaE9MjuQ/DQF2BatH3fRivUF3z0JBFrU0U6iBNC/4WR+2rLKhaAhPWDNPYp4mI6RqdQ==
... ... @@ -1286,7 +1319,7 @@
1286 1319 remark "^13.0.0"
1287 1320 unist-util-find-all-after "^3.0.2"
1288 1321  
1289   -"@surma/rollup-plugin-off-main-thread@^1.1.1":
  1322 +"@surma/rollup-plugin-off-main-thread@^1.4.1":
1290 1323 version "1.4.2"
1291 1324 resolved "https://registry.npmjs.org/@surma/rollup-plugin-off-main-thread/-/rollup-plugin-off-main-thread-1.4.2.tgz#e6786b6af5799f82f7ab3a82e53f6182d2b91a58"
1292 1325 integrity sha512-yBMPqmd1yEJo/280PAMkychuaALyQ9Lkb5q1ck3mjJrFuEobIfhnQ4J3mbvBoISmR3SWMWV+cGB/I0lCQee79A==
... ... @@ -1367,10 +1400,10 @@
1367 1400 "@types/qs" "*"
1368 1401 "@types/serve-static" "*"
1369 1402  
1370   -"@types/fs-extra@^9.0.5":
1371   - version "9.0.5"
1372   - resolved "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-9.0.5.tgz#2afb76a43a4bef80a363b94b314d0ca1694fc4f8"
1373   - integrity sha512-wr3t7wIW1c0A2BIJtdVp4EflriVaVVAsCAIHVzzh8B+GiFv9X1xeJjCs4upRXtzp7kQ6lP5xvskjoD4awJ1ZeA==
  1403 +"@types/fs-extra@^9.0.6":
  1404 + version "9.0.6"
  1405 + resolved "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-9.0.6.tgz#488e56b77299899a608b8269719c1d133027a6ab"
  1406 + integrity sha512-ecNRHw4clCkowNOBJH1e77nvbPxHYnWIXMv1IAoG/9+MYGkgoyr3Ppxr7XYFNL41V422EDhyV4/4SSK8L2mlig==
1374 1407 dependencies:
1375 1408 "@types/node" "*"
1376 1409  
... ... @@ -1518,13 +1551,6 @@
1518 1551 resolved "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.3.tgz#7ee330ba7caafb98090bece86a5ee44115904c2c"
1519 1552 integrity sha512-ewFXqrQHlFsgc09MK5jP5iR7vumV/BYayNC6PgJO2LPe8vrnNFyjQjSppfEngITi0qvfKtzFvgKymGheFM9UOA==
1520 1553  
1521   -"@types/resolve@0.0.8":
1522   - version "0.0.8"
1523   - resolved "https://registry.npmjs.org/@types/resolve/-/resolve-0.0.8.tgz#f26074d238e02659e323ce1a13d041eee280e194"
1524   - integrity sha512-auApPaJf3NPfe18hSoJkp8EbZzer2ISk7o8mCC3M9he/a04+gbMF97NkpD2S8riMGvm4BMRI59/SZQSaLTKpsQ==
1525   - dependencies:
1526   - "@types/node" "*"
1527   -
1528 1554 "@types/resolve@1.17.1":
1529 1555 version "1.17.1"
1530 1556 resolved "https://registry.npmjs.org/@types/resolve/-/resolve-1.17.1.tgz#3afd6ad8967c77e4376c598a82ddd58f46ec45d6"
... ... @@ -1841,7 +1867,7 @@ acorn-jsx@^5.2.0, acorn-jsx@^5.3.1:
1841 1867 resolved "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.1.tgz#fc8661e11b7ac1539c47dbfea2e72b3af34d267b"
1842 1868 integrity sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==
1843 1869  
1844   -acorn@^7.1.0, acorn@^7.1.1, acorn@^7.4.0:
  1870 +acorn@^7.1.1, acorn@^7.4.0:
1845 1871 version "7.4.1"
1846 1872 resolved "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa"
1847 1873 integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==
... ... @@ -2105,13 +2131,6 @@ axios@^0.21.1:
2105 2131 dependencies:
2106 2132 follow-redirects "^1.10.0"
2107 2133  
2108   -babel-extract-comments@^1.0.0:
2109   - version "1.0.0"
2110   - resolved "https://registry.npmjs.org/babel-extract-comments/-/babel-extract-comments-1.0.0.tgz#0a2aedf81417ed391b85e18b4614e693a0351a21"
2111   - integrity sha512-qWWzi4TlddohA91bFwgt6zO/J0X+io7Qp184Fw0m2JYRSTZnJbFR8+07KmzudHCZgOiKRCrjhylwv9Xd8gfhVQ==
2112   - dependencies:
2113   - babylon "^6.18.0"
2114   -
2115 2134 babel-helper-vue-jsx-merge-props@^2.0.3:
2116 2135 version "2.0.3"
2117 2136 resolved "https://registry.npmjs.org/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-2.0.3.tgz#22aebd3b33902328e513293a8e4992b384f9f1b6"
... ... @@ -2124,32 +2143,6 @@ babel-plugin-dynamic-import-node@^2.3.3:
2124 2143 dependencies:
2125 2144 object.assign "^4.1.0"
2126 2145  
2127   -babel-plugin-syntax-object-rest-spread@^6.8.0:
2128   - version "6.13.0"
2129   - resolved "https://registry.npmjs.org/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5"
2130   - integrity sha1-/WU28rzhODb/o6VFjEkDpZe7O/U=
2131   -
2132   -babel-plugin-transform-object-rest-spread@^6.26.0:
2133   - version "6.26.0"
2134   - resolved "https://registry.npmjs.org/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.26.0.tgz#0f36692d50fef6b7e2d4b3ac1478137a963b7b06"
2135   - integrity sha1-DzZpLVD+9rfi1LOsFHgTepY7ewY=
2136   - dependencies:
2137   - babel-plugin-syntax-object-rest-spread "^6.8.0"
2138   - babel-runtime "^6.26.0"
2139   -
2140   -babel-runtime@^6.26.0:
2141   - version "6.26.0"
2142   - resolved "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe"
2143   - integrity sha1-llxwWGaOgrVde/4E/yM3vItWR/4=
2144   - dependencies:
2145   - core-js "^2.4.0"
2146   - regenerator-runtime "^0.11.0"
2147   -
2148   -babylon@^6.18.0:
2149   - version "6.18.0"
2150   - resolved "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3"
2151   - integrity sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==
2152   -
2153 2146 bail@^1.0.0:
2154 2147 version "1.0.5"
2155 2148 resolved "https://registry.npmjs.org/bail/-/bail-1.0.5.tgz#b6fa133404a392cbc1f8c4bf63f5953351e7a776"
... ... @@ -2950,11 +2943,6 @@ core-js-compat@^3.8.0:
2950 2943 browserslist "^4.15.0"
2951 2944 semver "7.0.0"
2952 2945  
2953   -core-js@^2.4.0:
2954   - version "2.6.12"
2955   - resolved "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz#d9333dfa7b065e347cc5682219d6f690859cc2ec"
2956   - integrity sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==
2957   -
2958 2946 core-js@^3.6.1, core-js@^3.6.5:
2959 2947 version "3.8.1"
2960 2948 resolved "https://registry.npmjs.org/core-js/-/core-js-3.8.1.tgz#f51523668ac8a294d1285c3b9db44025fda66d47"
... ... @@ -3010,10 +2998,10 @@ crypto-es@^1.2.6:
3010 2998 resolved "https://registry.npmjs.org/crypto-es/-/crypto-es-1.2.6.tgz#468f3573a5d7b82e3b63b0004f55f905a6d3b12c"
3011 2999 integrity sha512-PQnrovdr5ibmOxqAh/Vy+A30RokHom7kb9Z61EPwfASfbcJCrCG4+vNNegmebNVHiXvS7WjYpHDePxnE/biEbA==
3012 3000  
3013   -crypto-random-string@^1.0.0:
3014   - version "1.0.0"
3015   - resolved "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-1.0.0.tgz#a230f64f568310e1498009940790ec99545bca7e"
3016   - integrity sha1-ojD2T1aDEOFJgAmUB5DsmVRbyn4=
  3001 +crypto-random-string@^2.0.0:
  3002 + version "2.0.0"
  3003 + resolved "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz#ef2a7a966ec11083388369baa02ebead229b30d5"
  3004 + integrity sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==
3017 3005  
3018 3006 cssesc@^3.0.0:
3019 3007 version "3.0.0"
... ... @@ -3094,6 +3082,13 @@ debug@^4.0.0, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.2.0, debug@^4.3
3094 3082 dependencies:
3095 3083 ms "2.1.2"
3096 3084  
  3085 +debug@^4.3.2:
  3086 + version "4.3.2"
  3087 + resolved "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz#f0a49c18ac8779e31d4a0c6029dfb76873c7428b"
  3088 + integrity sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==
  3089 + dependencies:
  3090 + ms "2.1.2"
  3091 +
3097 3092 debug@~3.1.0:
3098 3093 version "3.1.0"
3099 3094 resolved "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261"
... ... @@ -3129,11 +3124,6 @@ deep-equal@~1.0.1:
3129 3124 resolved "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz#f5d260292b660e084eff4cdbc9f08ad3247448b5"
3130 3125 integrity sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=
3131 3126  
3132   -deep-freeze@^0.0.1:
3133   - version "0.0.1"
3134   - resolved "https://registry.npmjs.org/deep-freeze/-/deep-freeze-0.0.1.tgz#3a0b0005de18672819dfd38cd31f91179c893e84"
3135   - integrity sha1-OgsABd4YZygZ39OM0x+RF5yJPoQ=
3136   -
3137 3127 deep-is@^0.1.3:
3138 3128 version "0.1.3"
3139 3129 resolved "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34"
... ... @@ -3912,7 +3902,7 @@ fresh@~0.5.2:
3912 3902 resolved "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7"
3913 3903 integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=
3914 3904  
3915   -fs-extra@8.1.0, fs-extra@^8.1.0:
  3905 +fs-extra@8.1.0:
3916 3906 version "8.1.0"
3917 3907 resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0"
3918 3908 integrity sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==
... ... @@ -4863,15 +4853,7 @@ isobject@^3.0.0, isobject@^3.0.1:
4863 4853 resolved "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df"
4864 4854 integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8=
4865 4855  
4866   -jest-worker@^24.9.0:
4867   - version "24.9.0"
4868   - resolved "https://registry.npmjs.org/jest-worker/-/jest-worker-24.9.0.tgz#5dbfdb5b2d322e98567898238a9697bcce67b3e5"
4869   - integrity sha512-51PE4haMSXcHohnSMdM42anbvZANYTqMrr52tVKPqqsPJMzoP6FYYDVqahX/HrAoKEKz3uUPzSvKs9A3qR4iVw==
4870   - dependencies:
4871   - merge-stream "^2.0.0"
4872   - supports-color "^6.1.0"
4873   -
4874   -jest-worker@^26.0.0, jest-worker@^26.2.1:
  4856 +jest-worker@^26.2.1:
4875 4857 version "26.6.2"
4876 4858 resolved "https://registry.npmjs.org/jest-worker/-/jest-worker-26.6.2.tgz#7f72cbc4d643c365e27b9fd775f9d0eaa9c7a8ed"
4877 4859 integrity sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==
... ... @@ -5265,7 +5247,7 @@ lodash.map@^4.5.1:
5265 5247 resolved "https://registry.npmjs.org/lodash.map/-/lodash.map-4.6.0.tgz#771ec7839e3473d9c4cde28b19394c3562f4f6d3"
5266 5248 integrity sha1-dx7Hg540c9nEzeKLGTlMNWL09tM=
5267 5249  
5268   -lodash.template@^4.0.2, lodash.template@^4.5.0:
  5250 +lodash.template@^4.0.2:
5269 5251 version "4.5.0"
5270 5252 resolved "https://registry.npmjs.org/lodash.template/-/lodash.template-4.5.0.tgz#f976195cf3f347d0d5f52483569fe8031ccce8ab"
5271 5253 integrity sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A==
... ... @@ -6440,6 +6422,11 @@ pretty-bytes@^5.3.0:
6440 6422 resolved "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.4.1.tgz#cd89f79bbcef21e3d21eb0da68ffe93f803e884b"
6441 6423 integrity sha512-s1Iam6Gwz3JI5Hweaz4GoCD1WUNUIyzePFy5+Js2hjwGVt2Z79wNN+ZKOZ2vB6C+Xs6njyB84Z1IthQg8d9LxA==
6442 6424  
  6425 +pretty-bytes@^5.4.1:
  6426 + version "5.5.0"
  6427 + resolved "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.5.0.tgz#0cecda50a74a941589498011cf23275aa82b339e"
  6428 + integrity sha512-p+T744ZyjjiaFlMUZZv6YPC5JrkNj8maRmPaQCWFJFplUAzpIUTRaTcS+7wmZtUoFXHtESJb23ISliaWyz3SHA==
  6429 +
6443 6430 printj@~1.1.0, printj@~1.1.2:
6444 6431 version "1.1.2"
6445 6432 resolved "https://registry.npmjs.org/printj/-/printj-1.1.2.tgz#d90deb2975a8b9f600fb3a1c94e3f4c53c78a222"
... ... @@ -6667,11 +6654,6 @@ regenerate@^1.4.0:
6667 6654 resolved "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz#b9346d8827e8f5a32f7ba29637d398b69014848a"
6668 6655 integrity sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==
6669 6656  
6670   -regenerator-runtime@^0.11.0:
6671   - version "0.11.1"
6672   - resolved "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9"
6673   - integrity sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==
6674   -
6675 6657 regenerator-runtime@^0.13.4:
6676 6658 version "0.13.7"
6677 6659 resolved "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz#cac2dacc8a1ea675feaabaeb8ae833898ae46f55"
... ... @@ -6824,7 +6806,7 @@ resolve-url@^0.2.1:
6824 6806 resolved "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a"
6825 6807 integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=
6826 6808  
6827   -resolve@^1.1.6, resolve@^1.1.7, resolve@^1.10.0, resolve@^1.14.2, resolve@^1.17.0, resolve@^1.19.0:
  6809 +resolve@^1.1.6, resolve@^1.1.7, resolve@^1.10.0, resolve@^1.17.0, resolve@^1.19.0:
6828 6810 version "1.19.0"
6829 6811 resolved "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz#1af5bf630409734a067cae29318aac7fa29a267c"
6830 6812 integrity sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==
... ... @@ -6865,14 +6847,6 @@ rimraf@^3.0.2:
6865 6847 dependencies:
6866 6848 glob "^7.1.3"
6867 6849  
6868   -rollup-plugin-babel@^4.3.3:
6869   - version "4.4.0"
6870   - resolved "https://registry.npmjs.org/rollup-plugin-babel/-/rollup-plugin-babel-4.4.0.tgz#d15bd259466a9d1accbdb2fe2fff17c52d030acb"
6871   - integrity sha512-Lek/TYp1+7g7I+uMfJnnSJ7YWoD58ajo6Oarhlex7lvUce+RCKRuGRSgztDO3/MF/PuGKmUL5iTHKf208UNszw==
6872   - dependencies:
6873   - "@babel/helper-module-imports" "^7.0.0"
6874   - rollup-pluginutils "^2.8.1"
6875   -
6876 6850 rollup-plugin-dynamic-import-variables@^1.1.0:
6877 6851 version "1.1.0"
6878 6852 resolved "https://registry.npmjs.org/rollup-plugin-dynamic-import-variables/-/rollup-plugin-dynamic-import-variables-1.1.0.tgz#4981d38907a471b35234398a09047bef47a2006a"
... ... @@ -6900,28 +6874,7 @@ rollup-plugin-purge-icons@^0.4.5:
6900 6874 "@purge-icons/core" "^0.4.5"
6901 6875 "@purge-icons/generated" "^0.4.1"
6902 6876  
6903   -rollup-plugin-terser@^5.3.1:
6904   - version "5.3.1"
6905   - resolved "https://registry.npmjs.org/rollup-plugin-terser/-/rollup-plugin-terser-5.3.1.tgz#8c650062c22a8426c64268548957463bf981b413"
6906   - integrity sha512-1pkwkervMJQGFYvM9nscrUoncPwiKR/K+bHdjv6PFgRo3cgPHoRT83y2Aa3GvINj4539S15t/tpFPb775TDs6w==
6907   - dependencies:
6908   - "@babel/code-frame" "^7.5.5"
6909   - jest-worker "^24.9.0"
6910   - rollup-pluginutils "^2.8.2"
6911   - serialize-javascript "^4.0.0"
6912   - terser "^4.6.2"
6913   -
6914   -rollup-plugin-terser@^6.1.0:
6915   - version "6.1.0"
6916   - resolved "https://registry.npmjs.org/rollup-plugin-terser/-/rollup-plugin-terser-6.1.0.tgz#071866585aea104bfbb9dd1019ac523e63c81e45"
6917   - integrity sha512-4fB3M9nuoWxrwm39habpd4hvrbrde2W2GG4zEGPQg1YITNkM3Tqur5jSuXlWNzbv/2aMLJ+dZJaySc3GCD8oDw==
6918   - dependencies:
6919   - "@babel/code-frame" "^7.8.3"
6920   - jest-worker "^26.0.0"
6921   - serialize-javascript "^3.0.0"
6922   - terser "^4.7.0"
6923   -
6924   -rollup-plugin-terser@^7.0.2:
  6877 +rollup-plugin-terser@^7.0.0, rollup-plugin-terser@^7.0.2:
6925 6878 version "7.0.2"
6926 6879 resolved "https://registry.npmjs.org/rollup-plugin-terser/-/rollup-plugin-terser-7.0.2.tgz#e8fbba4869981b2dc35ae7e8a502d5c6c04d324d"
6927 6880 integrity sha512-w3iIaU4OxcF52UUXiZNsNeuXIMDvFrr+ZXK6bFZ0Q60qyVfq4uLptoS4bbq3paG3x216eQllFZX7zt6TIImguQ==
... ... @@ -6955,18 +6908,18 @@ rollup-plugin-web-worker-loader@^1.3.1:
6955 6908 resolved "https://registry.npmjs.org/rollup-plugin-web-worker-loader/-/rollup-plugin-web-worker-loader-1.5.0.tgz#df21973426c6f95b238a84698ae27f8d8aab6b83"
6956 6909 integrity sha512-Zx5l370yGDje35rFkM/wbT4dMIq2+kSBdLWQpqLkBuxmrQJcx0umA05kSbNRzccFsudQH4FKYCK8GtSBQRQBBg==
6957 6910  
6958   -rollup-plugin-workbox@^5.2.1:
6959   - version "5.2.1"
6960   - resolved "https://registry.npmjs.org/rollup-plugin-workbox/-/rollup-plugin-workbox-5.2.1.tgz#371b0753667df03886742ec072281525803c2c75"
6961   - integrity sha512-C+yIoYkZ3VUcJTZpOH2zbaarHCwy8eQod987eS8hXE6qwfMLDqV3RkLYNplnO0PcMi+3JgZPiE6d1zuXgwkO7Q==
  6911 +rollup-plugin-workbox@^6.1.0:
  6912 + version "6.1.0"
  6913 + resolved "https://registry.npmjs.org/rollup-plugin-workbox/-/rollup-plugin-workbox-6.1.0.tgz#120cde36547769fc8cc45eae97a338c4017ed936"
  6914 + integrity sha512-BqeEBj53fiqNLjiiyVvuBlic3Apg2Us1mpTkn3zgqaipJoAOC3soi+W9vrOQcm190lHLo9WNvi1wQg/M7olJHg==
6962 6915 dependencies:
6963   - "@rollup/plugin-node-resolve" "^8.4.0"
6964   - "@rollup/plugin-replace" "^2.3.3"
6965   - pretty-bytes "^5.3.0"
6966   - rollup-plugin-terser "^6.1.0"
6967   - workbox-build "^5.0.0"
  6916 + "@rollup/plugin-node-resolve" "^11.0.1"
  6917 + "@rollup/plugin-replace" "^2.3.4"
  6918 + pretty-bytes "^5.4.1"
  6919 + rollup-plugin-terser "^7.0.2"
  6920 + workbox-build "^6.0.2"
6968 6921  
6969   -rollup-pluginutils@^2.8.1, rollup-pluginutils@^2.8.2:
  6922 +rollup-pluginutils@^2.8.2:
6970 6923 version "2.8.2"
6971 6924 resolved "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz#72f2af0748b592364dbd3389e600e5a9444a351e"
6972 6925 integrity sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==
... ... @@ -6981,14 +6934,12 @@ rollup@^0.63.4:
6981 6934 "@types/estree" "0.0.39"
6982 6935 "@types/node" "*"
6983 6936  
6984   -rollup@^1.31.1:
6985   - version "1.32.1"
6986   - resolved "https://registry.npmjs.org/rollup/-/rollup-1.32.1.tgz#4480e52d9d9e2ae4b46ba0d9ddeaf3163940f9c4"
6987   - integrity sha512-/2HA0Ec70TvQnXdzynFffkjA6XN+1e2pEv/uKS5Ulca40g2L7KuOE3riasHoNVHOsFD5KKZgDsMk1CP3Tw9s+A==
6988   - dependencies:
6989   - "@types/estree" "*"
6990   - "@types/node" "*"
6991   - acorn "^7.1.0"
  6937 +rollup@^2.25.0:
  6938 + version "2.35.1"
  6939 + resolved "https://registry.npmjs.org/rollup/-/rollup-2.35.1.tgz#e6bc8d10893556a638066f89e8c97f422d03968c"
  6940 + integrity sha512-q5KxEyWpprAIcainhVy6HfRttD9kutQpHbeqDTWnqAFNJotiojetK6uqmcydNMymBEtC4I8bCYR+J3mTMqeaUA==
  6941 + optionalDependencies:
  6942 + fsevents "~2.1.2"
6992 6943  
6993 6944 rollup@^2.32.1, rollup@^2.34.1:
6994 6945 version "2.34.2"
... ... @@ -7087,13 +7038,6 @@ semver@^7.2.1, semver@^7.3.2:
7087 7038 dependencies:
7088 7039 lru-cache "^6.0.0"
7089 7040  
7090   -serialize-javascript@^3.0.0:
7091   - version "3.1.0"
7092   - resolved "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-3.1.0.tgz#8bf3a9170712664ef2561b44b691eafe399214ea"
7093   - integrity sha512-JIJT1DGiWmIKhzRsG91aS6Ze4sFUrYbltlkg2onR5OrnNM02Kl/hnY/T4FN2omvyeBbQmMJv+K4cPOpGzOTFBg==
7094   - dependencies:
7095   - randombytes "^2.1.0"
7096   -
7097 7041 serialize-javascript@^4.0.0:
7098 7042 version "4.0.0"
7099 7043 resolved "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz#b525e1238489a5ecfc42afacc3fe99e666f4b1aa"
... ... @@ -7448,13 +7392,10 @@ strip-bom@^3.0.0:
7448 7392 resolved "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3"
7449 7393 integrity sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=
7450 7394  
7451   -strip-comments@^1.0.2:
7452   - version "1.0.2"
7453   - resolved "https://registry.npmjs.org/strip-comments/-/strip-comments-1.0.2.tgz#82b9c45e7f05873bee53f37168af930aa368679d"
7454   - integrity sha512-kL97alc47hoyIQSV165tTt9rG5dn4w1dNnBhOQ3bOU1Nc1hel09jnXANaHJ7vzHLd4Ju8kseDGzlev96pghLFw==
7455   - dependencies:
7456   - babel-extract-comments "^1.0.0"
7457   - babel-plugin-transform-object-rest-spread "^6.26.0"
  7395 +strip-comments@^2.0.1:
  7396 + version "2.0.1"
  7397 + resolved "https://registry.npmjs.org/strip-comments/-/strip-comments-2.0.1.tgz#4ad11c3fbcac177a67a40ac224ca339ca1c1ba9b"
  7398 + integrity sha512-ZprKx+bBLXv067WTCALv8SSz5l2+XhpYCsVtSqlMnkAXMWDq+/ekVbl1ghqP9rUHTzv6sm/DwCOiYutU/yp1fw==
7458 7399  
7459 7400 strip-final-newline@^2.0.0:
7460 7401 version "2.0.0"
... ... @@ -7689,11 +7630,6 @@ tasksfile@^5.1.1:
7689 7630 "@pawelgalazka/shell" "2.0.0"
7690 7631 chalk "2.3.0"
7691 7632  
7692   -temp-dir@^1.0.0:
7693   - version "1.0.0"
7694   - resolved "https://registry.npmjs.org/temp-dir/-/temp-dir-1.0.0.tgz#0a7c0ea26d3a39afa7e0ebea9c1fc0bc4daa011d"
7695   - integrity sha1-CnwOom06Oa+n4OvqnB/AvE2qAR0=
7696   -
7697 7633 temp-dir@^2.0.0:
7698 7634 version "2.0.0"
7699 7635 resolved "https://registry.npmjs.org/temp-dir/-/temp-dir-2.0.0.tgz#bde92b05bdfeb1516e804c9c00ad45177f31321e"
... ... @@ -7707,16 +7643,17 @@ tempfile@^3.0.0:
7707 7643 temp-dir "^2.0.0"
7708 7644 uuid "^3.3.2"
7709 7645  
7710   -tempy@^0.3.0:
7711   - version "0.3.0"
7712   - resolved "https://registry.npmjs.org/tempy/-/tempy-0.3.0.tgz#6f6c5b295695a16130996ad5ab01a8bd726e8bf8"
7713   - integrity sha512-WrH/pui8YCwmeiAoxV+lpRH9HpRtgBhSR2ViBPgpGb/wnYDzp21R4MN45fsCGvLROvY67o3byhJRYRONJyImVQ==
  7646 +tempy@^0.6.0:
  7647 + version "0.6.0"
  7648 + resolved "https://registry.npmjs.org/tempy/-/tempy-0.6.0.tgz#65e2c35abc06f1124a97f387b08303442bde59f3"
  7649 + integrity sha512-G13vtMYPT/J8A4X2SjdtBTphZlrp1gKv6hZiOjw14RCWg6GbHuQBGtjlx75xLbYV/wEc0D7G5K4rxKP/cXk8Bw==
7714 7650 dependencies:
7715   - temp-dir "^1.0.0"
7716   - type-fest "^0.3.1"
7717   - unique-string "^1.0.0"
  7651 + is-stream "^2.0.0"
  7652 + temp-dir "^2.0.0"
  7653 + type-fest "^0.16.0"
  7654 + unique-string "^2.0.0"
7718 7655  
7719   -terser@^4.6.2, terser@^4.6.3, terser@^4.7.0:
  7656 +terser@^4.6.3:
7720 7657 version "4.8.0"
7721 7658 resolved "https://registry.npmjs.org/terser/-/terser-4.8.0.tgz#63056343d7c70bb29f3af665865a46fe03a0df17"
7722 7659 integrity sha512-EAPipTNeWsb/3wLPeup1tVPaXfIaU68xMnVdPafIL1TV05OhASArYyIfFvnvJCNrR2NIOvDVNNTFRa+Re2MWyw==
... ... @@ -7898,16 +7835,16 @@ type-fest@^0.11.0:
7898 7835 resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.11.0.tgz#97abf0872310fed88a5c466b25681576145e33f1"
7899 7836 integrity sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ==
7900 7837  
  7838 +type-fest@^0.16.0:
  7839 + version "0.16.0"
  7840 + resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.16.0.tgz#3240b891a78b0deae910dbeb86553e552a148860"
  7841 + integrity sha512-eaBzG6MxNzEn9kiwvtre90cXaNLkmadMWa1zQMs3XORCXNbsH/OewwbxC5ia9dCxIxnTAsSxXJaa/p5y8DlvJg==
  7842 +
7901 7843 type-fest@^0.18.0:
7902 7844 version "0.18.1"
7903 7845 resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.18.1.tgz#db4bc151a4a2cf4eebf9add5db75508db6cc841f"
7904 7846 integrity sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw==
7905 7847  
7906   -type-fest@^0.3.1:
7907   - version "0.3.1"
7908   - resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.3.1.tgz#63d00d204e059474fe5e1b7c011112bbd1dc29e1"
7909   - integrity sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ==
7910   -
7911 7848 type-fest@^0.6.0:
7912 7849 version "0.6.0"
7913 7850 resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz#8d2a2370d3df886eb5c90ada1c5bf6188acf838b"
... ... @@ -7998,12 +7935,12 @@ uniq@^1.0.1:
7998 7935 resolved "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff"
7999 7936 integrity sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=
8000 7937  
8001   -unique-string@^1.0.0:
8002   - version "1.0.0"
8003   - resolved "https://registry.npmjs.org/unique-string/-/unique-string-1.0.0.tgz#9e1057cca851abb93398f8b33ae187b99caec11a"
8004   - integrity sha1-nhBXzKhRq7kzmPizOuGHuZyuwRo=
  7938 +unique-string@^2.0.0:
  7939 + version "2.0.0"
  7940 + resolved "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz#39c6451f81afb2749de2b233e3f7c5e8843bd89d"
  7941 + integrity sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==
8005 7942 dependencies:
8006   - crypto-random-string "^1.0.0"
  7943 + crypto-random-string "^2.0.0"
8007 7944  
8008 7945 unist-util-find-all-after@^3.0.2:
8009 7946 version "3.0.2"
... ... @@ -8159,14 +8096,14 @@ vite-plugin-purge-icons@^0.4.5:
8159 8096 "@purge-icons/generated" "^0.4.1"
8160 8097 rollup-plugin-purge-icons "^0.4.5"
8161 8098  
8162   -vite-plugin-pwa@^0.1.7:
8163   - version "0.1.7"
8164   - resolved "https://registry.npmjs.org/vite-plugin-pwa/-/vite-plugin-pwa-0.1.7.tgz#3e13faf2d61b1f5a1b341f6b08f32216ffae1f55"
8165   - integrity sha512-S5Hc1x/rcfb6cgKjlW7yxSTv1er6fquzGZt/+xC1wavSBa7Qf6wdf6QzYiYdwmUom5yUSDEawc2gEYgq5SsZFg==
  8099 +vite-plugin-pwa@^0.2.0:
  8100 + version "0.2.0"
  8101 + resolved "https://registry.npmjs.org/vite-plugin-pwa/-/vite-plugin-pwa-0.2.0.tgz#e9368530c97537bdad7279f05de061ab9b024cce"
  8102 + integrity sha512-OBNhlSqvqH9af9i8HsetmaRTrUjit3UP0rx33Sr0iBapM0gtuAmTjS4JPdSM54cGC1aVaIC3Rn3sY9wL0uxBrw==
8166 8103 dependencies:
8167   - debug "^4.3.0"
  8104 + debug "^4.3.2"
8168 8105 fast-glob "^3.2.4"
8169   - rollup-plugin-workbox "^5.2.1"
  8106 + rollup-plugin-workbox "^6.1.0"
8170 8107  
8171 8108 vite@^1.0.0-rc.13:
8172 8109 version "1.0.0-rc.13"
... ... @@ -8354,146 +8291,160 @@ wordwrap@^1.0.0:
8354 8291 resolved "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb"
8355 8292 integrity sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=
8356 8293  
8357   -workbox-background-sync@^5.1.4:
8358   - version "5.1.4"
8359   - resolved "https://registry.npmjs.org/workbox-background-sync/-/workbox-background-sync-5.1.4.tgz#5ae0bbd455f4e9c319e8d827c055bb86c894fd12"
8360   - integrity sha512-AH6x5pYq4vwQvfRDWH+vfOePfPIYQ00nCEB7dJRU1e0n9+9HMRyvI63FlDvtFT2AvXVRsXvUt7DNMEToyJLpSA==
  8294 +workbox-background-sync@^6.0.2:
  8295 + version "6.0.2"
  8296 + resolved "https://registry.npmjs.org/workbox-background-sync/-/workbox-background-sync-6.0.2.tgz#9205f5ef7fbf68203b925bdc85bdaa31a34fbbe6"
  8297 + integrity sha512-KQU2ntvbvFoBvCRm+EDpWAaykt4u/oaF5j3C6io0dZVWhFc/ZwgYDii8fb34LTenug3VPWQELdw9dNBCoP4b0w==
8361 8298 dependencies:
8362   - workbox-core "^5.1.4"
  8299 + workbox-core "^6.0.2"
8363 8300  
8364   -workbox-broadcast-update@^5.1.4:
8365   - version "5.1.4"
8366   - resolved "https://registry.npmjs.org/workbox-broadcast-update/-/workbox-broadcast-update-5.1.4.tgz#0eeb89170ddca7f6914fa3523fb14462891f2cfc"
8367   - integrity sha512-HTyTWkqXvHRuqY73XrwvXPud/FN6x3ROzkfFPsRjtw/kGZuZkPzfeH531qdUGfhtwjmtO/ZzXcWErqVzJNdXaA==
  8301 +workbox-broadcast-update@^6.0.2:
  8302 + version "6.0.2"
  8303 + resolved "https://registry.npmjs.org/workbox-broadcast-update/-/workbox-broadcast-update-6.0.2.tgz#fc034277e631e4193dcee9f6b0a77e415b4ddefb"
  8304 + integrity sha512-yCXYEln7nU8FkMDysYQPirpgFXtsdBtxruHbvZzRsxMHvAELf3j/o6Ufae1zjl8XanLF696sqSNxehpCGSD6tw==
8368 8305 dependencies:
8369   - workbox-core "^5.1.4"
  8306 + workbox-core "^6.0.2"
8370 8307  
8371   -workbox-build@^5.0.0:
8372   - version "5.1.4"
8373   - resolved "https://registry.npmjs.org/workbox-build/-/workbox-build-5.1.4.tgz#23d17ed5c32060c363030c8823b39d0eabf4c8c7"
8374   - integrity sha512-xUcZn6SYU8usjOlfLb9Y2/f86Gdo+fy1fXgH8tJHjxgpo53VVsqRX0lUDw8/JuyzNmXuo8vXX14pXX2oIm9Bow==
  8308 +workbox-build@^6.0.2:
  8309 + version "6.0.2"
  8310 + resolved "https://registry.npmjs.org/workbox-build/-/workbox-build-6.0.2.tgz#a23eebd6556cf473fedda77c08421b2d093efc32"
  8311 + integrity sha512-Dukbt+p62Yzb12SXAmycTYvHngJ8aRtXy3hymsC8B6gxTCZmCZ0u5JuKhu7lNLbDwDkYE78lhFvT9SF+MXFz5A==
8375 8312 dependencies:
8376   - "@babel/core" "^7.8.4"
8377   - "@babel/preset-env" "^7.8.4"
8378   - "@babel/runtime" "^7.8.4"
8379   - "@hapi/joi" "^15.1.0"
8380   - "@rollup/plugin-node-resolve" "^7.1.1"
8381   - "@rollup/plugin-replace" "^2.3.1"
8382   - "@surma/rollup-plugin-off-main-thread" "^1.1.1"
  8313 + "@babel/core" "^7.11.1"
  8314 + "@babel/preset-env" "^7.11.0"
  8315 + "@babel/runtime" "^7.11.2"
  8316 + "@hapi/joi" "^16.1.8"
  8317 + "@rollup/plugin-babel" "^5.2.0"
  8318 + "@rollup/plugin-node-resolve" "^9.0.0"
  8319 + "@rollup/plugin-replace" "^2.3.3"
  8320 + "@surma/rollup-plugin-off-main-thread" "^1.4.1"
8383 8321 common-tags "^1.8.0"
8384 8322 fast-json-stable-stringify "^2.1.0"
8385   - fs-extra "^8.1.0"
  8323 + fs-extra "^9.0.1"
8386 8324 glob "^7.1.6"
8387   - lodash.template "^4.5.0"
  8325 + lodash "^4.17.20"
8388 8326 pretty-bytes "^5.3.0"
8389   - rollup "^1.31.1"
8390   - rollup-plugin-babel "^4.3.3"
8391   - rollup-plugin-terser "^5.3.1"
  8327 + rollup "^2.25.0"
  8328 + rollup-plugin-terser "^7.0.0"
8392 8329 source-map "^0.7.3"
8393 8330 source-map-url "^0.4.0"
8394 8331 stringify-object "^3.3.0"
8395   - strip-comments "^1.0.2"
8396   - tempy "^0.3.0"
  8332 + strip-comments "^2.0.1"
  8333 + tempy "^0.6.0"
8397 8334 upath "^1.2.0"
8398   - workbox-background-sync "^5.1.4"
8399   - workbox-broadcast-update "^5.1.4"
8400   - workbox-cacheable-response "^5.1.4"
8401   - workbox-core "^5.1.4"
8402   - workbox-expiration "^5.1.4"
8403   - workbox-google-analytics "^5.1.4"
8404   - workbox-navigation-preload "^5.1.4"
8405   - workbox-precaching "^5.1.4"
8406   - workbox-range-requests "^5.1.4"
8407   - workbox-routing "^5.1.4"
8408   - workbox-strategies "^5.1.4"
8409   - workbox-streams "^5.1.4"
8410   - workbox-sw "^5.1.4"
8411   - workbox-window "^5.1.4"
8412   -
8413   -workbox-cacheable-response@^5.1.4:
8414   - version "5.1.4"
8415   - resolved "https://registry.npmjs.org/workbox-cacheable-response/-/workbox-cacheable-response-5.1.4.tgz#9ff26e1366214bdd05cf5a43da9305b274078a54"
8416   - integrity sha512-0bfvMZs0Of1S5cdswfQK0BXt6ulU5kVD4lwer2CeI+03czHprXR3V4Y8lPTooamn7eHP8Iywi5QjyAMjw0qauA==
8417   - dependencies:
8418   - workbox-core "^5.1.4"
8419   -
8420   -workbox-core@^5.1.4:
8421   - version "5.1.4"
8422   - resolved "https://registry.npmjs.org/workbox-core/-/workbox-core-5.1.4.tgz#8bbfb2362ecdff30e25d123c82c79ac65d9264f4"
8423   - integrity sha512-+4iRQan/1D8I81nR2L5vcbaaFskZC2CL17TLbvWVzQ4qiF/ytOGF6XeV54pVxAvKUtkLANhk8TyIUMtiMw2oDg==
8424   -
8425   -workbox-expiration@^5.1.4:
8426   - version "5.1.4"
8427   - resolved "https://registry.npmjs.org/workbox-expiration/-/workbox-expiration-5.1.4.tgz#92b5df461e8126114943a3b15c55e4ecb920b163"
8428   - integrity sha512-oDO/5iC65h2Eq7jctAv858W2+CeRW5e0jZBMNRXpzp0ZPvuT6GblUiHnAsC5W5lANs1QS9atVOm4ifrBiYY7AQ==
8429   - dependencies:
8430   - workbox-core "^5.1.4"
8431   -
8432   -workbox-google-analytics@^5.1.4:
8433   - version "5.1.4"
8434   - resolved "https://registry.npmjs.org/workbox-google-analytics/-/workbox-google-analytics-5.1.4.tgz#b3376806b1ac7d7df8418304d379707195fa8517"
8435   - integrity sha512-0IFhKoEVrreHpKgcOoddV+oIaVXBFKXUzJVBI+nb0bxmcwYuZMdteBTp8AEDJacENtc9xbR0wa9RDCnYsCDLjA==
8436   - dependencies:
8437   - workbox-background-sync "^5.1.4"
8438   - workbox-core "^5.1.4"
8439   - workbox-routing "^5.1.4"
8440   - workbox-strategies "^5.1.4"
8441   -
8442   -workbox-navigation-preload@^5.1.4:
8443   - version "5.1.4"
8444   - resolved "https://registry.npmjs.org/workbox-navigation-preload/-/workbox-navigation-preload-5.1.4.tgz#30d1b720d26a05efc5fa11503e5cc1ed5a78902a"
8445   - integrity sha512-Wf03osvK0wTflAfKXba//QmWC5BIaIZARU03JIhAEO2wSB2BDROWI8Q/zmianf54kdV7e1eLaIEZhth4K4MyfQ==
8446   - dependencies:
8447   - workbox-core "^5.1.4"
8448   -
8449   -workbox-precaching@^5.1.4:
8450   - version "5.1.4"
8451   - resolved "https://registry.npmjs.org/workbox-precaching/-/workbox-precaching-5.1.4.tgz#874f7ebdd750dd3e04249efae9a1b3f48285fe6b"
8452   - integrity sha512-gCIFrBXmVQLFwvAzuGLCmkUYGVhBb7D1k/IL7pUJUO5xacjLcFUaLnnsoVepBGAiKw34HU1y/YuqvTKim9qAZA==
8453   - dependencies:
8454   - workbox-core "^5.1.4"
8455   -
8456   -workbox-range-requests@^5.1.4:
8457   - version "5.1.4"
8458   - resolved "https://registry.npmjs.org/workbox-range-requests/-/workbox-range-requests-5.1.4.tgz#7066a12c121df65bf76fdf2b0868016aa2bab859"
8459   - integrity sha512-1HSujLjgTeoxHrMR2muDW2dKdxqCGMc1KbeyGcmjZZAizJTFwu7CWLDmLv6O1ceWYrhfuLFJO+umYMddk2XMhw==
8460   - dependencies:
8461   - workbox-core "^5.1.4"
8462   -
8463   -workbox-routing@^5.1.4:
8464   - version "5.1.4"
8465   - resolved "https://registry.npmjs.org/workbox-routing/-/workbox-routing-5.1.4.tgz#3e8cd86bd3b6573488d1a2ce7385e547b547e970"
8466   - integrity sha512-8ljknRfqE1vEQtnMtzfksL+UXO822jJlHTIR7+BtJuxQ17+WPZfsHqvk1ynR/v0EHik4x2+826Hkwpgh4GKDCw==
8467   - dependencies:
8468   - workbox-core "^5.1.4"
8469   -
8470   -workbox-strategies@^5.1.4:
8471   - version "5.1.4"
8472   - resolved "https://registry.npmjs.org/workbox-strategies/-/workbox-strategies-5.1.4.tgz#96b1418ccdfde5354612914964074d466c52d08c"
8473   - integrity sha512-VVS57LpaJTdjW3RgZvPwX0NlhNmscR7OQ9bP+N/34cYMDzXLyA6kqWffP6QKXSkca1OFo/v6v7hW7zrrguo6EA==
8474   - dependencies:
8475   - workbox-core "^5.1.4"
8476   - workbox-routing "^5.1.4"
8477   -
8478   -workbox-streams@^5.1.4:
8479   - version "5.1.4"
8480   - resolved "https://registry.npmjs.org/workbox-streams/-/workbox-streams-5.1.4.tgz#05754e5e3667bdc078df2c9315b3f41210d8cac0"
8481   - integrity sha512-xU8yuF1hI/XcVhJUAfbQLa1guQUhdLMPQJkdT0kn6HP5CwiPOGiXnSFq80rAG4b1kJUChQQIGPrq439FQUNVrw==
8482   - dependencies:
8483   - workbox-core "^5.1.4"
8484   - workbox-routing "^5.1.4"
8485   -
8486   -workbox-sw@^5.1.4:
8487   - version "5.1.4"
8488   - resolved "https://registry.npmjs.org/workbox-sw/-/workbox-sw-5.1.4.tgz#2bb34c9f7381f90d84cef644816d45150011d3db"
8489   - integrity sha512-9xKnKw95aXwSNc8kk8gki4HU0g0W6KXu+xks7wFuC7h0sembFnTrKtckqZxbSod41TDaGh+gWUA5IRXrL0ECRA==
8490   -
8491   -workbox-window@^5.1.4:
8492   - version "5.1.4"
8493   - resolved "https://registry.npmjs.org/workbox-window/-/workbox-window-5.1.4.tgz#2740f7dea7f93b99326179a62f1cc0ca2c93c863"
8494   - integrity sha512-vXQtgTeMCUq/4pBWMfQX8Ee7N2wVC4Q7XYFqLnfbXJ2hqew/cU1uMTD2KqGEgEpE4/30luxIxgE+LkIa8glBYw==
8495   - dependencies:
8496   - workbox-core "^5.1.4"
  8335 + workbox-background-sync "^6.0.2"
  8336 + workbox-broadcast-update "^6.0.2"
  8337 + workbox-cacheable-response "^6.0.2"
  8338 + workbox-core "^6.0.2"
  8339 + workbox-expiration "^6.0.2"
  8340 + workbox-google-analytics "^6.0.2"
  8341 + workbox-navigation-preload "^6.0.2"
  8342 + workbox-precaching "^6.0.2"
  8343 + workbox-range-requests "^6.0.2"
  8344 + workbox-recipes "^6.0.2"
  8345 + workbox-routing "^6.0.2"
  8346 + workbox-strategies "^6.0.2"
  8347 + workbox-streams "^6.0.2"
  8348 + workbox-sw "^6.0.2"
  8349 + workbox-window "^6.0.2"
  8350 +
  8351 +workbox-cacheable-response@^6.0.2:
  8352 + version "6.0.2"
  8353 + resolved "https://registry.npmjs.org/workbox-cacheable-response/-/workbox-cacheable-response-6.0.2.tgz#00b1133c4c846a2874f32ae14206c0636bacfd87"
  8354 + integrity sha512-OrgFiYWkmFXDIbNRYSu+fchcfoZqyJ4yZbdc8WKUjr9v/MghKHfR9u7UI077xBkjno5J3YNpbwx73/no3HkrzA==
  8355 + dependencies:
  8356 + workbox-core "^6.0.2"
  8357 +
  8358 +workbox-core@^6.0.2:
  8359 + version "6.0.2"
  8360 + resolved "https://registry.npmjs.org/workbox-core/-/workbox-core-6.0.2.tgz#2f865cfe633890b4210fd6d6fdb049a6daed0914"
  8361 + integrity sha512-Ksl6qeikGb+BOCILoCUJGxwlEQOeeqdpOnpOr9UDt3NtacPYbfYBmpYpKArw5DFWK+5geBsFqgUUlXThlCYfKQ==
  8362 +
  8363 +workbox-expiration@^6.0.2:
  8364 + version "6.0.2"
  8365 + resolved "https://registry.npmjs.org/workbox-expiration/-/workbox-expiration-6.0.2.tgz#ac01e8d17f48daa31dc0872c09ee6f4d2cf28ccb"
  8366 + integrity sha512-6+nbR18cklAdI3BPT675ytftXPwnVbXGR8mPWNWTJtl5y2urRYv56ZOJLD7FBFVkZ8EjWiRhNP/A0fkxgdKtWQ==
  8367 + dependencies:
  8368 + workbox-core "^6.0.2"
  8369 +
  8370 +workbox-google-analytics@^6.0.2:
  8371 + version "6.0.2"
  8372 + resolved "https://registry.npmjs.org/workbox-google-analytics/-/workbox-google-analytics-6.0.2.tgz#7e3641adb30a3acb25006b244035631cf6f65019"
  8373 + integrity sha512-xmYJurR1M6Pzc2SBM/E7AgwmBszhu/YYDzBnU+HJPZFLbTG97ASIJyTXV1vcczA/dNaS0miIf0cFqneozVlDRw==
  8374 + dependencies:
  8375 + workbox-background-sync "^6.0.2"
  8376 + workbox-core "^6.0.2"
  8377 + workbox-routing "^6.0.2"
  8378 + workbox-strategies "^6.0.2"
  8379 +
  8380 +workbox-navigation-preload@^6.0.2:
  8381 + version "6.0.2"
  8382 + resolved "https://registry.npmjs.org/workbox-navigation-preload/-/workbox-navigation-preload-6.0.2.tgz#bfd9c61096be921b830153a3004b7212220748dc"
  8383 + integrity sha512-7+ojLrjXmTFZBfGmUQIcBWB+xrFgXLMJGNQAtxT7Ta9A23rEWo8jqAgeuwAylebcORUlM+ztgYTV7eGp+AD+Yg==
  8384 + dependencies:
  8385 + workbox-core "^6.0.2"
  8386 +
  8387 +workbox-precaching@^6.0.2:
  8388 + version "6.0.2"
  8389 + resolved "https://registry.npmjs.org/workbox-precaching/-/workbox-precaching-6.0.2.tgz#cb45f290b0604bef1d9fc96bf42df82385d54e54"
  8390 + integrity sha512-sqKWL2emzmGnfJpna+9RjUkUiqQO++AKfwljCbgkHg8wBbVLy/rnui3eelKgAI7D8R31LJFfiZkY/kXmwkjtlQ==
  8391 + dependencies:
  8392 + workbox-core "^6.0.2"
  8393 + workbox-routing "^6.0.2"
  8394 + workbox-strategies "^6.0.2"
  8395 +
  8396 +workbox-range-requests@^6.0.2:
  8397 + version "6.0.2"
  8398 + resolved "https://registry.npmjs.org/workbox-range-requests/-/workbox-range-requests-6.0.2.tgz#3b50cbe8ddaaed7e3bfaa2dfdcd6a22e02fe7770"
  8399 + integrity sha512-qCrDbH9AzDbCErde71Nys2iNZO9I9M9Jgl/9/Q67dGQVwFsEq73SuIzS2DGIBKqtIdC5QUigC3d7XJONajclUQ==
  8400 + dependencies:
  8401 + workbox-core "^6.0.2"
  8402 +
  8403 +workbox-recipes@^6.0.2:
  8404 + version "6.0.2"
  8405 + resolved "https://registry.npmjs.org/workbox-recipes/-/workbox-recipes-6.0.2.tgz#ad4b3f26a71a7396004c4f617af318f3fd072208"
  8406 + integrity sha512-ewZIHO4jYE6bnEeUIYS6joQy3l+MydpOsVr2F6EpE8ps++z1ScbSdLtJU+yu6WuO3lH44HFZLeFxYQqYm50QAA==
  8407 + dependencies:
  8408 + workbox-cacheable-response "^6.0.2"
  8409 + workbox-core "^6.0.2"
  8410 + workbox-expiration "^6.0.2"
  8411 + workbox-precaching "^6.0.2"
  8412 + workbox-routing "^6.0.2"
  8413 + workbox-strategies "^6.0.2"
  8414 +
  8415 +workbox-routing@^6.0.2:
  8416 + version "6.0.2"
  8417 + resolved "https://registry.npmjs.org/workbox-routing/-/workbox-routing-6.0.2.tgz#8380bc322a2b1c44978df8ff6ae4e4d723f4e3f8"
  8418 + integrity sha512-iQ9ch3fL1YpztDLfHNURaHQ0ispgPCdzWmZZhtSHUyy/+YkTlIiDVTbOQCIpHIrWlKQiim6X3K2ItIy1FW9+wA==
  8419 + dependencies:
  8420 + workbox-core "^6.0.2"
  8421 +
  8422 +workbox-strategies@^6.0.2:
  8423 + version "6.0.2"
  8424 + resolved "https://registry.npmjs.org/workbox-strategies/-/workbox-strategies-6.0.2.tgz#f4383e2e5d46c1546e6e08048c9f5c9a7beb5137"
  8425 + integrity sha512-HjLnYCVS60U7OKhl5NIq8NAQXrotJQRDakmIONnRlQIlP2If/kAiQSUP3QCHMq4EeXGiF+/CdlR1/bhYBHZzZg==
  8426 + dependencies:
  8427 + workbox-core "^6.0.2"
  8428 +
  8429 +workbox-streams@^6.0.2:
  8430 + version "6.0.2"
  8431 + resolved "https://registry.npmjs.org/workbox-streams/-/workbox-streams-6.0.2.tgz#07c19025af309ad3475e737018a05ed538bffacd"
  8432 + integrity sha512-bckftu/iMlg5LFXPZ6NX/FUc/w4illgxSuwtsZkQAO6Uen1EeegjfLyenO01/dwoyc3D/AlZepMdhv87XhE7HQ==
  8433 + dependencies:
  8434 + workbox-core "^6.0.2"
  8435 + workbox-routing "^6.0.2"
  8436 +
  8437 +workbox-sw@^6.0.2:
  8438 + version "6.0.2"
  8439 + resolved "https://registry.npmjs.org/workbox-sw/-/workbox-sw-6.0.2.tgz#cd1b8b02ceaaf1abe5804936158a87ec605d271e"
  8440 + integrity sha512-EoOjbyy5bpoBoSqt2PIeDOZ/JJ41f+WJjb979PkfIUWw4F+F/w2uKJJrMA5fk+nWnVge83Fwy8nF3dWNsqOrdg==
  8441 +
  8442 +workbox-window@^6.0.2:
  8443 + version "6.0.2"
  8444 + resolved "https://registry.npmjs.org/workbox-window/-/workbox-window-6.0.2.tgz#9b47fdb7c088aa4e8b7d0c6cfda17c8bfca6bf7f"
  8445 + integrity sha512-I/X+qUh1AwN9x/MxFbXsPn7DA27BMtzkXo55w1tBD8V54fv8nUCeC5E4RpXt/mlgdSwBztnURCQTWsdhTrSUjg==
  8446 + dependencies:
  8447 + workbox-core "^6.0.2"
8497 8448  
8498 8449 wrap-ansi@^5.1.0:
8499 8450 version "5.1.0"
... ...