cnhis-design-vue 3.1.14-beta.8 → 3.1.15-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -23
- package/es/_virtual/plugin-vue_export-helper.js +9 -0
- package/es/node_modules/@formily/path/esm/contexts.js +22 -0
- package/es/node_modules/@formily/path/esm/destructor.js +124 -0
- package/es/node_modules/@formily/path/esm/index.js +579 -0
- package/es/node_modules/@formily/path/esm/matcher.js +199 -0
- package/es/node_modules/@formily/path/esm/parser.js +402 -0
- package/es/node_modules/@formily/path/esm/shared.js +73 -0
- package/es/node_modules/@formily/path/esm/tokenizer.js +287 -0
- package/es/node_modules/@formily/path/esm/tokens.js +240 -0
- package/es/node_modules/@formily/path/esm/types.js +17 -0
- package/es/packages/big-table/index.d.ts +14 -0
- package/es/packages/big-table/index.js +1 -2
- package/es/packages/big-table/src/BigTable.js +5 -3
- package/es/packages/big-table/src/BigTable.vue.d.ts +36 -13
- package/es/packages/big-table/src/BigTable.vue_vue_type_script_setup_true_lang.js +44 -31
- package/es/packages/big-table/src/bigTableProps.d.ts +4 -0
- package/es/packages/big-table/src/bigTableProps.js +1 -0
- package/es/packages/big-table/src/components/NoData.js +73 -3
- package/es/packages/big-table/src/components/edit-form/edit-date.js +11 -3
- package/es/packages/big-table/src/components/edit-form/edit-input.js +15 -4
- package/es/packages/big-table/src/components/edit-form/edit-separate.js +89 -3
- package/es/packages/big-table/src/components/edit-form/edit-separate.vue.d.ts +9 -14
- package/es/packages/big-table/src/components/edit-form/edit-time.d.ts +43 -0
- package/es/packages/big-table/src/components/edit-form/edit-time.js +52 -0
- package/es/packages/big-table/src/components/input-button.js +34 -3
- package/es/packages/big-table/src/components/separate.js +29 -3
- package/es/packages/big-table/src/components/separate.vue.d.ts +3 -4
- package/es/packages/big-table/src/hooks/useColumnConfigAdaptor.js +51 -12
- package/es/packages/big-table/src/hooks/useEdit.d.ts +51 -13
- package/es/packages/big-table/src/hooks/useEdit.js +4 -3
- package/es/packages/big-table/src/hooks/useFormat.js +8 -1
- package/es/packages/big-table/src/hooks/useSeparateRow.js +4 -4
- package/es/packages/big-table/src/utils.js +2 -1
- package/es/packages/big-table/style/index.css +156 -2
- package/es/packages/bpmn-workflow/index.js +1 -2
- package/es/packages/bpmn-workflow/src/BpmnWorkflow.js +253 -3
- package/es/packages/button-print/index.js +1 -2
- package/es/packages/button-print/src/ButtonPrint.js +5 -3
- package/es/packages/button-print/src/ButtonPrint.vue_vue_type_script_setup_true_lang.js +6 -7
- package/es/packages/button-print/src/components/IdentityVerification.js +129 -3
- package/es/packages/button-print/src/utils/print.d.ts +1 -1
- package/es/packages/button-print/src/utils/print.js +4 -4
- package/es/packages/chunk-upload/index.js +1 -1
- package/es/packages/chunk-upload/src/chunk-upload-new.js +474 -3
- package/es/packages/chunk-upload/src/vod-chunk-upload/index.js +2 -3
- package/es/packages/chunk-upload/src/vod-chunk-upload/vod-chunk-upload.js +328 -3
- package/es/packages/chunk-upload/src/vod-upload-modal.js +3 -4
- package/es/packages/drag-layout/index.js +1 -2
- package/es/packages/drag-layout/src/DragFormLeftItem.js +123 -3
- package/es/packages/drag-layout/src/DragFormRightItem.js +268 -3
- package/es/packages/drag-layout/src/DragLayout.js +658 -3
- package/es/packages/fabric-chart/index.d.ts +2 -0
- package/es/packages/fabric-chart/index.js +1 -2
- package/es/packages/fabric-chart/src/FabricChart.js +315 -3
- package/es/packages/fabric-chart/src/FabricChart.vue.d.ts +2 -0
- package/es/packages/fabric-chart/src/components/PopupTip.js +33 -3
- package/es/packages/fabric-chart/src/hooks/useCenter.js +41 -25
- package/es/packages/fabric-chart/src/hooks/useDraw.js +1 -0
- package/es/packages/fabric-chart/src/hooks/useEvent.js +9 -7
- package/es/packages/fabric-chart/src/hooks/useLeft.js +28 -17
- package/es/packages/fabric-chart/src/hooks/useRight.js +2 -13
- package/es/packages/fabric-chart/src/hooks/useTop.js +9 -10
- package/es/packages/fabric-chart/src/interface.d.ts +4 -0
- package/es/packages/field-set/index.d.ts +2509 -5166
- package/es/packages/field-set/index.js +1 -2
- package/es/packages/field-set/src/FieldSet.js +346 -3
- package/es/packages/field-set/src/FieldSet.vue.d.ts +2492 -5169
- package/es/packages/form-render/index.d.ts +0 -2
- package/es/packages/form-render/index.js +2 -3
- package/es/packages/form-render/src/FormRender.js +203 -3
- package/es/packages/form-render/src/FormRender.vue.d.ts +0 -2
- package/es/packages/form-render/src/components/renderer/cascader.d.ts +6 -6
- package/es/packages/form-render/src/components/renderer/cascader.js +73 -85
- package/es/packages/form-render/src/components/renderer/combination.d.ts +6 -0
- package/es/packages/form-render/src/components/renderer/combination.js +76 -20
- package/es/packages/form-render/src/components/renderer/formItem.js +1 -1
- package/es/packages/form-render/src/components/renderer/input.js +5 -16
- package/es/packages/form-render/src/components/renderer/inputNumber.d.ts +12 -0
- package/es/packages/form-render/src/components/renderer/inputNumber.js +11 -4
- package/es/packages/form-render/src/components/renderer/radio.d.ts +12 -4
- package/es/packages/form-render/src/components/renderer/radio.js +23 -5
- package/es/packages/form-render/src/components/renderer/select.js +56 -56
- package/es/packages/form-render/src/components/renderer/simpleComponent.d.ts +17 -2
- package/es/packages/form-render/src/components/renderer/simpleComponent.js +16 -14
- package/es/packages/form-render/src/hooks/useAsyncQueue.d.ts +1 -1
- package/es/packages/form-render/src/hooks/useAsyncQueue.js +1 -1
- package/es/packages/form-render/src/hooks/useChangeContext.d.ts +1 -1
- package/es/packages/form-render/src/hooks/useChangeContext.js +1 -1
- package/es/packages/form-render/src/hooks/useFieldListAdaptor.js +16 -10
- package/es/packages/form-render/src/hooks/useFormItemDeps.d.ts +3 -2
- package/es/packages/form-render/src/hooks/useFormItemDeps.js +5 -6
- package/es/packages/form-render/src/hooks/useFormRequest.d.ts +2 -2
- package/es/packages/form-render/src/types/fieldItem.d.ts +123 -35
- package/es/packages/form-render/src/types/index.d.ts +4 -2
- package/es/packages/form-render/src/utils/index.d.ts +8 -4
- package/es/packages/form-render/src/utils/index.js +45 -16
- package/es/packages/form-table/index.js +1 -2
- package/es/packages/form-table/src/FormTable.js +475 -3
- package/es/packages/form-table/src/components/index.js +28 -42
- package/es/packages/form-table/src/components/table-age.js +232 -3
- package/es/packages/form-table/src/components/table-date-picker.js +176 -3
- package/es/packages/form-table/src/components/table-digital.js +138 -3
- package/es/packages/form-table/src/components/table-input-password.js +138 -3
- package/es/packages/form-table/src/components/table-input.js +124 -3
- package/es/packages/form-table/src/components/table-month-picker.js +100 -3
- package/es/packages/form-table/src/components/table-search-more.js +5 -3
- package/es/packages/form-table/src/components/table-search-more.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/packages/form-table/src/components/table-search.js +5 -3
- package/es/packages/form-table/src/components/table-search.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/packages/form-table/src/components/table-select-multiple.js +161 -3
- package/es/packages/form-table/src/components/table-select.js +156 -3
- package/es/packages/form-table/src/components/table-textarea.js +154 -3
- package/es/packages/form-table/src/components/table-time-picker.js +146 -3
- package/es/packages/form-table/src/components/table-tree-select.js +282 -3
- package/es/packages/form-table/src/components/text-over-tooltip.js +63 -3
- package/es/packages/index.css +159 -2
- package/es/packages/info-header/index.d.ts +1376 -361
- package/es/packages/info-header/index.js +1 -2
- package/es/packages/info-header/src/HiddenContent.js +65 -3
- package/es/packages/info-header/src/HiddenContent.vue.d.ts +689 -178
- package/es/packages/info-header/src/InfoEllipsis.js +43 -0
- package/es/packages/info-header/src/InfoEllipsis.vue.d.ts +833 -0
- package/es/packages/info-header/src/InfoHeader.js +229 -3
- package/es/packages/info-header/src/InfoHeader.vue.d.ts +1376 -361
- package/es/packages/info-header/style/index.css +3 -0
- package/es/packages/map/index.js +1 -2
- package/es/packages/map/src/Map.js +337 -3
- package/es/packages/scale-view/index.js +1 -2
- package/es/packages/scale-view/src/ScaleView.js +418 -3
- package/es/packages/scale-view/src/components/AnswerParse.js +79 -3
- package/es/packages/scale-view/src/components/EvaluateCountdown.js +108 -3
- package/es/packages/scale-view/src/components/EvaluatePage.js +140 -3
- package/es/packages/scale-view/src/components/LoadingCom.js +17 -5
- package/es/packages/scale-view/src/components/NoData.js +73 -3
- package/es/packages/scale-view/src/components/formitem/r-cascader.js +3 -3
- package/es/packages/scale-view/src/components/formitem/r-select.js +3 -3
- package/es/packages/scale-view/src/components/formitem/text-over-tooltip/TextOverTooltip.js +78 -3
- package/es/packages/select-label/index.js +3 -5
- package/es/packages/select-label/src/LabelFormContent.js +441 -3
- package/es/packages/select-label/src/SelectLabel.js +5 -3
- package/es/packages/select-label/src/SelectLabel.vue_vue_type_script_setup_true_lang.js +5 -21
- package/es/packages/select-label/src/components/label-classify.js +128 -3
- package/es/packages/select-person/index.js +1 -2
- package/es/packages/select-person/src/SearchTree.js +5 -3
- package/es/packages/select-person/src/SearchTree.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/packages/select-person/src/SelectPerson.js +5 -3
- package/es/packages/select-person/src/SelectPerson.vue_vue_type_script_setup_true_lang.js +4 -5
- package/es/packages/shortcut-provider/index.js +1 -2
- package/es/packages/shortcut-provider/src/ShortcutProvider.js +33 -3
- package/es/packages/shortcut-provider/src/types/index.d.ts +11 -9
- package/es/packages/shortcut-provider/src/utils/index.js +5 -5
- package/es/packages/shortcut-setter/index.d.ts +3247 -1486
- package/es/packages/shortcut-setter/index.js +1 -2
- package/es/packages/shortcut-setter/src/ShortcutSetter.js +42 -3
- package/es/packages/shortcut-setter/src/ShortcutSetter.vue.d.ts +3247 -1486
- package/es/packages/shortcut-setter/src/ShortcutSetterItem.js +139 -3
- package/es/packages/shortcut-setter/src/ShortcutSetterItem.vue.d.ts +1700 -1661
- package/es/packages/steps-wheel/index.js +1 -2
- package/es/packages/steps-wheel/src/StepsWheel.js +264 -3
- package/es/packages/time-line/index.js +1 -2
- package/es/packages/time-line/src/TimeLine.js +69 -3
- package/es/src/components/SelectPage/SelectPage.js +62 -3
- package/es/src/components/SelectPage/index.js +2 -3
- package/es/src/components/SlotRender/SlotRender.d.ts +4 -8
- package/es/src/components/SlotRender/SlotRender.js +4 -5
- package/es/src/components/SvgIcon/SvgIcon.js +35 -3
- package/es/src/components/SvgIcon/index.js +2 -3
- package/es/src/components/TextOverTooltip/TextOverTooltip.js +75 -3
- package/es/src/components/TextOverTooltip/index.js +2 -3
- package/es/src/components/player-vod/index.js +13 -3
- package/es/src/utils/anime.d.ts +1 -1
- package/global.d.ts +8 -8
- package/package.json +2 -2
- package/es/packages/big-table/src/components/NoData.vue_vue_type_script_setup_true_lang.js +0 -72
- package/es/packages/big-table/src/components/edit-form/edit-separate.vue_vue_type_script_setup_true_lang.js +0 -90
- package/es/packages/big-table/src/components/input-button.vue_vue_type_script_setup_true_lang.js +0 -33
- package/es/packages/big-table/src/components/separate.vue_vue_type_script_setup_true_lang.js +0 -24
- package/es/packages/bpmn-workflow/src/BpmnWorkflow.vue_vue_type_script_setup_true_lang.js +0 -252
- package/es/packages/button-print/src/components/IdentityVerification.vue_vue_type_script_setup_true_lang.js +0 -128
- package/es/packages/chunk-upload/src/chunk-upload-new.vue_vue_type_script_setup_true_lang.js +0 -473
- package/es/packages/chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue_vue_type_script_setup_true_lang.js +0 -327
- package/es/packages/drag-layout/src/DragFormLeftItem.vue_vue_type_script_setup_true_lang.js +0 -122
- package/es/packages/drag-layout/src/DragFormRightItem.vue_vue_type_script_setup_true_lang.js +0 -267
- package/es/packages/drag-layout/src/DragLayout.vue_vue_type_script_setup_true_lang.js +0 -659
- package/es/packages/fabric-chart/src/FabricChart.vue_vue_type_script_setup_true_lang.js +0 -305
- package/es/packages/fabric-chart/src/components/PopupTip.vue_vue_type_script_setup_true_lang.js +0 -32
- package/es/packages/field-set/src/FieldSet.vue_vue_type_script_setup_true_lang.js +0 -22
- package/es/packages/field-set/src/NewFieldSet.js +0 -4
- package/es/packages/field-set/src/NewFieldSet.vue.d.ts +0 -2607
- package/es/packages/field-set/src/NewFieldSet.vue_vue_type_script_setup_true_lang.js +0 -299
- package/es/packages/field-set/src/OldFieldSet.js +0 -4
- package/es/packages/field-set/src/OldFieldSet.vue.d.ts +0 -2610
- package/es/packages/field-set/src/OldFieldSet.vue_vue_type_script_setup_true_lang.js +0 -330
- package/es/packages/form-render/src/FormRender.vue_vue_type_script_setup_true_lang.js +0 -187
- package/es/packages/form-table/src/FormTable.vue_vue_type_script_setup_true_lang.js +0 -474
- package/es/packages/form-table/src/components/table-age.vue_vue_type_script_setup_true_lang.js +0 -232
- package/es/packages/form-table/src/components/table-date-picker.vue_vue_type_script_setup_true_lang.js +0 -175
- package/es/packages/form-table/src/components/table-digital.vue_vue_type_script_setup_true_lang.js +0 -138
- package/es/packages/form-table/src/components/table-input-password.vue_vue_type_script_setup_true_lang.js +0 -138
- package/es/packages/form-table/src/components/table-input.vue_vue_type_script_setup_true_lang.js +0 -124
- package/es/packages/form-table/src/components/table-month-picker.vue_vue_type_script_setup_true_lang.js +0 -99
- package/es/packages/form-table/src/components/table-select-multiple.vue_vue_type_script_setup_true_lang.js +0 -160
- package/es/packages/form-table/src/components/table-select.vue_vue_type_script_setup_true_lang.js +0 -155
- package/es/packages/form-table/src/components/table-textarea.vue_vue_type_script_setup_true_lang.js +0 -153
- package/es/packages/form-table/src/components/table-time-picker.vue_vue_type_script_setup_true_lang.js +0 -145
- package/es/packages/form-table/src/components/table-tree-select.vue_vue_type_script_setup_true_lang.js +0 -281
- package/es/packages/form-table/src/components/text-over-tooltip.vue_vue_type_script_setup_true_lang.js +0 -62
- package/es/packages/info-header/src/HiddenContent.vue_vue_type_script_setup_true_lang.js +0 -66
- package/es/packages/info-header/src/InfoHeader.vue_vue_type_script_setup_true_lang.js +0 -233
- package/es/packages/map/src/Map.vue_vue_type_script_setup_true_lang.js +0 -336
- package/es/packages/scale-view/src/ScaleView.vue_vue_type_script_setup_true_lang.js +0 -422
- package/es/packages/scale-view/src/components/AnswerParse.vue_vue_type_script_setup_true_lang.js +0 -78
- package/es/packages/scale-view/src/components/EvaluateCountdown.vue_vue_type_script_setup_true_lang.js +0 -107
- package/es/packages/scale-view/src/components/EvaluatePage.vue_vue_type_script_setup_true_lang.js +0 -139
- package/es/packages/scale-view/src/components/LoadingCom.vue_vue_type_template_id_413329b0_lang.js +0 -16
- package/es/packages/scale-view/src/components/NoData.vue_vue_type_script_setup_true_lang.js +0 -72
- package/es/packages/scale-view/src/components/formitem/text-over-tooltip/TextOverTooltip.vue_vue_type_script_setup_true_lang.js +0 -77
- package/es/packages/select-label/src/LabelFormContent.vue_vue_type_script_setup_true_lang.js +0 -441
- package/es/packages/select-label/src/components/label-classify.vue_vue_type_script_setup_true_lang.js +0 -127
- package/es/packages/shortcut-provider/src/ShortcutProvider.vue_vue_type_script_setup_true_lang.js +0 -32
- package/es/packages/shortcut-setter/src/ShortcutSetter.vue_vue_type_script_setup_true_lang.js +0 -38
- package/es/packages/shortcut-setter/src/ShortcutSetterItem.vue_vue_type_script_setup_true_lang.js +0 -125
- package/es/packages/steps-wheel/src/StepsWheel.vue_vue_type_script_setup_true_lang.js +0 -263
- package/es/packages/time-line/src/TimeLine.vue_vue_type_script_setup_true_lang.js +0 -68
- package/es/src/components/SelectPage/SelectPage.vue_vue_type_script_setup_true_lang.js +0 -61
- package/es/src/components/SvgIcon/SvgIcon.vue_vue_type_script_setup_true_lang.js +0 -34
- package/es/src/components/TextOverTooltip/TextOverTooltip.vue_vue_type_script_setup_true_lang.js +0 -74
- package/es/src/components/player-vod/index.vue_vue_type_script_setup_true_lang.js +0 -12
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import { defineComponent, ref, createVNode, createTextVNode
|
|
2
|
-
import {
|
|
1
|
+
import { defineComponent, onMounted, ref, computed, watch, createVNode, createTextVNode } from 'vue';
|
|
2
|
+
import { isField } from '@formily/core';
|
|
3
|
+
import { Path } from '../../../../../node_modules/@formily/path/esm/index.js';
|
|
4
|
+
import { flatten, isNumber } from 'lodash-es';
|
|
5
|
+
import { useFormField } from '../../../../../packages/form-render';
|
|
6
|
+
import { arrayed, assignUpdateValue, formRenderLog } from '../../utils/index.js';
|
|
3
7
|
import { connect, mapProps } from '@formily/vue';
|
|
4
8
|
import { useDebounceFn, isObject } from '@vueuse/core';
|
|
5
9
|
import { NButton } from 'naive-ui';
|
|
6
|
-
import '../../FormRender.js';
|
|
7
|
-
import script$1 from '../../FormRender.vue_vue_type_script_setup_true_lang.js';
|
|
10
|
+
import FormRender from '../../FormRender.js';
|
|
8
11
|
|
|
9
12
|
const script = defineComponent({
|
|
10
13
|
name: "FormCombination",
|
|
@@ -16,6 +19,9 @@ const script = defineComponent({
|
|
|
16
19
|
value: {
|
|
17
20
|
type: String
|
|
18
21
|
},
|
|
22
|
+
maxGroupNum: {
|
|
23
|
+
type: Number
|
|
24
|
+
},
|
|
19
25
|
getProperties: {
|
|
20
26
|
type: Function,
|
|
21
27
|
default: () => []
|
|
@@ -27,18 +33,54 @@ const script = defineComponent({
|
|
|
27
33
|
}) {
|
|
28
34
|
const emitChange = useDebounceFn(function emitChange2() {
|
|
29
35
|
emit("update:value", JSON.stringify(_values.value));
|
|
36
|
+
formRenderRefs.value.splice(groupNum.value);
|
|
30
37
|
}, 300);
|
|
31
|
-
const
|
|
38
|
+
const {
|
|
39
|
+
field
|
|
40
|
+
} = useFormField();
|
|
41
|
+
onMounted(() => {
|
|
42
|
+
if (!isField(field.value))
|
|
43
|
+
return;
|
|
44
|
+
const tempValidator = field.value.validator;
|
|
45
|
+
field.value.validator = [{
|
|
46
|
+
async validator() {
|
|
47
|
+
return Promise.allSettled(formRenderRefs.value.map((formRenderRef) => formRenderRef.validate())).then((resultList) => {
|
|
48
|
+
const rejected = resultList.filter((res) => res.status === "rejected");
|
|
49
|
+
if (!rejected.length)
|
|
50
|
+
return "";
|
|
51
|
+
return flatten(rejected.map((res) => res.reason));
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
}, ...tempValidator ? arrayed(tempValidator) : []];
|
|
55
|
+
});
|
|
56
|
+
const formRenderRefs = ref([]);
|
|
57
|
+
const groupNum = ref(1);
|
|
58
|
+
const maxGroupNum = computed(() => {
|
|
59
|
+
if (!isNumber(props.maxGroupNum))
|
|
60
|
+
return Infinity;
|
|
61
|
+
if (props.maxGroupNum < 1)
|
|
62
|
+
return 0;
|
|
63
|
+
return ~~props.maxGroupNum;
|
|
64
|
+
});
|
|
32
65
|
function add() {
|
|
33
|
-
|
|
66
|
+
groupNum.value++;
|
|
34
67
|
_values.value.push({});
|
|
35
68
|
emitChange();
|
|
36
69
|
}
|
|
37
70
|
function remove(idx) {
|
|
38
|
-
|
|
71
|
+
groupNum.value--;
|
|
39
72
|
_values.value.splice(idx, 1);
|
|
40
73
|
emitChange();
|
|
41
74
|
}
|
|
75
|
+
watch(maxGroupNum, (value) => {
|
|
76
|
+
if (groupNum.value <= value)
|
|
77
|
+
return;
|
|
78
|
+
groupNum.value = value;
|
|
79
|
+
_values.value.splice(value);
|
|
80
|
+
emitChange();
|
|
81
|
+
}, {
|
|
82
|
+
immediate: true
|
|
83
|
+
});
|
|
42
84
|
const _values = ref([{}]);
|
|
43
85
|
function initValues(data) {
|
|
44
86
|
if (!data)
|
|
@@ -48,19 +90,32 @@ const script = defineComponent({
|
|
|
48
90
|
if (!Array.isArray(parsed))
|
|
49
91
|
throw new Error();
|
|
50
92
|
parsed.forEach((v, idx) => {
|
|
51
|
-
if (
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
_values.value[idx] =
|
|
55
|
-
|
|
56
|
-
}
|
|
93
|
+
if (idx > maxGroupNum.value - 1)
|
|
94
|
+
return;
|
|
95
|
+
if (isObject(v))
|
|
96
|
+
return _values.value[idx] = v;
|
|
97
|
+
_values.value[idx] = {};
|
|
98
|
+
formRenderLog(`invalid Object value ${v} in COMBINATION => ${props.title}[${idx}]`, "warn");
|
|
57
99
|
});
|
|
58
|
-
|
|
100
|
+
groupNum.value = Math.min(_values.value.length, maxGroupNum.value);
|
|
59
101
|
} catch (e) {
|
|
60
102
|
formRenderLog(`invalid JSON value ${data} in COMBINATION => ${props.title}`, "warn");
|
|
103
|
+
} finally {
|
|
104
|
+
setFormValueByInitValue();
|
|
105
|
+
}
|
|
106
|
+
function setFormValueByInitValue() {
|
|
107
|
+
_values.value.forEach((item, idx) => {
|
|
108
|
+
var _a;
|
|
109
|
+
(_a = formRenderRefs.value[idx]) == null ? void 0 : _a.setFieldState("*", (state) => {
|
|
110
|
+
if (!isField(state))
|
|
111
|
+
return;
|
|
112
|
+
state.value = Path.getIn(item, state.path);
|
|
113
|
+
});
|
|
114
|
+
});
|
|
61
115
|
}
|
|
62
116
|
}
|
|
63
|
-
|
|
117
|
+
watch(() => props.value, (value) => initValues(value));
|
|
118
|
+
onMounted(() => initValues(props.value));
|
|
64
119
|
function stop(event) {
|
|
65
120
|
event.stopPropagation();
|
|
66
121
|
}
|
|
@@ -69,10 +124,10 @@ const script = defineComponent({
|
|
|
69
124
|
value
|
|
70
125
|
}) {
|
|
71
126
|
!_values.value[idx] && (_values.value[idx] = {});
|
|
72
|
-
_values.value[idx]
|
|
127
|
+
Path.setIn(_values.value[idx], fieldKey, value);
|
|
73
128
|
emitChange();
|
|
74
129
|
}
|
|
75
|
-
const FormRenderComponent =
|
|
130
|
+
const FormRenderComponent = FormRender;
|
|
76
131
|
return () => {
|
|
77
132
|
return createVNode("section", {
|
|
78
133
|
"class": "form-render__combination"
|
|
@@ -83,16 +138,17 @@ const script = defineComponent({
|
|
|
83
138
|
}, [props.title]), createVNode(NButton, {
|
|
84
139
|
"onClick": add,
|
|
85
140
|
"type": "info",
|
|
86
|
-
"text": true
|
|
141
|
+
"text": true,
|
|
142
|
+
"disabled": groupNum.value >= maxGroupNum.value
|
|
87
143
|
}, {
|
|
88
144
|
default: () => [createTextVNode("\u65B0\u589E")]
|
|
89
145
|
})]), Array.from({
|
|
90
|
-
length:
|
|
146
|
+
length: groupNum.value
|
|
91
147
|
}).map((_, idx) => {
|
|
92
148
|
return createVNode("section", {
|
|
93
149
|
"class": "form-render__combinationContent"
|
|
94
150
|
}, [createVNode(FormRenderComponent, {
|
|
95
|
-
"
|
|
151
|
+
"ref": (_ref) => formRenderRefs.value[idx] = _ref,
|
|
96
152
|
"fieldList": props.getProperties(),
|
|
97
153
|
"onUpdateValue": () => false,
|
|
98
154
|
"onInput": stop,
|
|
@@ -60,7 +60,7 @@ const FORM_ITEM = connect(script, mapProps({
|
|
|
60
60
|
const feedback = !isVoidField(field) ? field.selfErrors.length ? field.selfErrors.join(",") : void 0 : void 0;
|
|
61
61
|
return {
|
|
62
62
|
...props,
|
|
63
|
-
required: field.required,
|
|
63
|
+
required: isVoidField(field) ? void 0 : field.required,
|
|
64
64
|
class: "form-render__formItem",
|
|
65
65
|
style: {
|
|
66
66
|
"--form-item-column": (_a = props.span) != null ? _a : 3
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent,
|
|
2
|
-
import {
|
|
1
|
+
import { defineComponent, createVNode } from 'vue';
|
|
2
|
+
import { createInputSlot, assignUpdateValue } from '../../utils/index.js';
|
|
3
3
|
import { connect, mapProps } from '@formily/vue';
|
|
4
4
|
import { NInput } from 'naive-ui';
|
|
5
5
|
|
|
@@ -13,21 +13,10 @@ const script = defineComponent({
|
|
|
13
13
|
type: String
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
|
-
setup(props
|
|
17
|
-
|
|
18
|
-
}) {
|
|
19
|
-
const _slots = computed(() => {
|
|
20
|
-
const res = {};
|
|
21
|
-
if (props.prefix) {
|
|
22
|
-
res.prefix = () => createVNode(Fragment, null, [createSlot(props.prefix, props).default()]);
|
|
23
|
-
}
|
|
24
|
-
if (props.suffix) {
|
|
25
|
-
res.suffix = () => createVNode(Fragment, null, [createSlot(props.suffix, props).default()]);
|
|
26
|
-
}
|
|
27
|
-
return res;
|
|
28
|
-
});
|
|
16
|
+
setup(props) {
|
|
17
|
+
const _slots = createInputSlot(props);
|
|
29
18
|
return () => {
|
|
30
|
-
return createVNode(NInput,
|
|
19
|
+
return createVNode(NInput, null, _slots.value);
|
|
31
20
|
};
|
|
32
21
|
}
|
|
33
22
|
});
|
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
export declare const INPUT_NUMBER: import("vue").DefineComponent<{
|
|
2
2
|
onChange: {};
|
|
3
|
+
prefix: {
|
|
4
|
+
type: StringConstructor;
|
|
5
|
+
};
|
|
6
|
+
suffix: {
|
|
7
|
+
type: StringConstructor;
|
|
8
|
+
};
|
|
3
9
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
4
10
|
onChange: {};
|
|
11
|
+
prefix: {
|
|
12
|
+
type: StringConstructor;
|
|
13
|
+
};
|
|
14
|
+
suffix: {
|
|
15
|
+
type: StringConstructor;
|
|
16
|
+
};
|
|
5
17
|
}>>, {}>;
|
|
@@ -1,15 +1,22 @@
|
|
|
1
1
|
import { defineComponent, createVNode } from 'vue';
|
|
2
|
-
import { assignUpdateValue } from '../../utils/index.js';
|
|
2
|
+
import { createInputSlot, assignUpdateValue } from '../../utils/index.js';
|
|
3
3
|
import { connect, mapProps } from '@formily/vue';
|
|
4
4
|
import { NInputNumber } from 'naive-ui';
|
|
5
5
|
|
|
6
6
|
const script = defineComponent({
|
|
7
7
|
props: {
|
|
8
|
-
onChange: {}
|
|
8
|
+
onChange: {},
|
|
9
|
+
prefix: {
|
|
10
|
+
type: String
|
|
11
|
+
},
|
|
12
|
+
suffix: {
|
|
13
|
+
type: String
|
|
14
|
+
}
|
|
9
15
|
},
|
|
10
|
-
setup(
|
|
16
|
+
setup(props) {
|
|
17
|
+
const _slots = createInputSlot(props);
|
|
11
18
|
return () => {
|
|
12
|
-
return createVNode(NInputNumber, null,
|
|
19
|
+
return createVNode(NInputNumber, null, _slots.value);
|
|
13
20
|
};
|
|
14
21
|
}
|
|
15
22
|
});
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { AnyObject } from '../../../../../../es/src/types';
|
|
2
2
|
import { PropType } from 'vue';
|
|
3
3
|
export declare const RADIO: import("vue").DefineComponent<{
|
|
4
|
-
value: {
|
|
4
|
+
value: {
|
|
5
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
6
|
+
};
|
|
5
7
|
options: {
|
|
6
8
|
type: PropType<AnyObject[]>;
|
|
7
9
|
default: () => never[];
|
|
@@ -10,8 +12,11 @@ export declare const RADIO: import("vue").DefineComponent<{
|
|
|
10
12
|
type: BooleanConstructor;
|
|
11
13
|
default: boolean;
|
|
12
14
|
};
|
|
13
|
-
|
|
14
|
-
|
|
15
|
+
onChange: {};
|
|
16
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
17
|
+
value: {
|
|
18
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
19
|
+
};
|
|
15
20
|
options: {
|
|
16
21
|
type: PropType<AnyObject[]>;
|
|
17
22
|
default: () => never[];
|
|
@@ -20,7 +25,10 @@ export declare const RADIO: import("vue").DefineComponent<{
|
|
|
20
25
|
type: BooleanConstructor;
|
|
21
26
|
default: boolean;
|
|
22
27
|
};
|
|
23
|
-
|
|
28
|
+
onChange: {};
|
|
29
|
+
}>> & {
|
|
30
|
+
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
31
|
+
}, {
|
|
24
32
|
options: AnyObject[];
|
|
25
33
|
vertical: boolean;
|
|
26
34
|
}>;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { defineComponent, createVNode } from 'vue';
|
|
1
|
+
import { defineComponent, computed, createVNode } from 'vue';
|
|
2
2
|
import { connect, mapProps } from '@formily/vue';
|
|
3
3
|
import { NRadioGroup, NSpace, NRadio } from 'naive-ui';
|
|
4
4
|
import { assignUpdateValue } from '../../utils/index.js';
|
|
5
5
|
|
|
6
6
|
const script = defineComponent({
|
|
7
7
|
props: {
|
|
8
|
-
value: {
|
|
8
|
+
value: {
|
|
9
|
+
type: [String, Number]
|
|
10
|
+
},
|
|
9
11
|
options: {
|
|
10
12
|
type: Array,
|
|
11
13
|
default: () => []
|
|
@@ -13,12 +15,28 @@ const script = defineComponent({
|
|
|
13
15
|
vertical: {
|
|
14
16
|
type: Boolean,
|
|
15
17
|
default: false
|
|
16
|
-
}
|
|
18
|
+
},
|
|
19
|
+
onChange: {}
|
|
17
20
|
},
|
|
18
|
-
|
|
21
|
+
emits: ["update:value"],
|
|
22
|
+
setup(props, {
|
|
23
|
+
emit
|
|
24
|
+
}) {
|
|
25
|
+
function dangerousTypeTransform(value) {
|
|
26
|
+
return value + "";
|
|
27
|
+
}
|
|
28
|
+
const valueRef = computed({
|
|
29
|
+
get() {
|
|
30
|
+
return dangerousTypeTransform(props.value);
|
|
31
|
+
},
|
|
32
|
+
set(v) {
|
|
33
|
+
emit("update:value", v);
|
|
34
|
+
}
|
|
35
|
+
});
|
|
19
36
|
return () => {
|
|
20
37
|
return createVNode(NRadioGroup, {
|
|
21
|
-
"value":
|
|
38
|
+
"value": valueRef.value,
|
|
39
|
+
"onUpdate:value": ($event) => valueRef.value = $event
|
|
22
40
|
}, {
|
|
23
41
|
default: () => [createVNode(NSpace, {
|
|
24
42
|
"vertical": props.vertical
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { defineComponent, ref,
|
|
1
|
+
import { defineComponent, ref, computed, inject, watch, createVNode } from 'vue';
|
|
2
2
|
import { isField } from '@formily/core';
|
|
3
|
-
import { cloneDeep } from 'lodash-es';
|
|
4
|
-
import { InjectAsyncQueue, InjectionFormItemDepsCollector
|
|
5
|
-
import { assignUpdateValue,
|
|
6
|
-
import { isObject } from '@vueuse/core';
|
|
3
|
+
import { isEqual, cloneDeep } from 'lodash-es';
|
|
4
|
+
import { InjectionChangeContextCollector, InjectAsyncQueue, InjectionFormItemDepsCollector } from '../../constants/index.js';
|
|
5
|
+
import { assignUpdateValue, traverseDependKey } from '../../utils/index.js';
|
|
7
6
|
import { connect, mapProps } from '@formily/vue';
|
|
8
7
|
import { NSelect } from 'naive-ui';
|
|
9
8
|
import { useFormField } from '../../hooks/useFormField.js';
|
|
@@ -33,43 +32,52 @@ const script = defineComponent({
|
|
|
33
32
|
}) {
|
|
34
33
|
const remoteOptions = ref(null);
|
|
35
34
|
const lastSearch = ref("");
|
|
36
|
-
const
|
|
35
|
+
const labelKey = computed(() => {
|
|
36
|
+
var _a, _b;
|
|
37
|
+
return (_b = (_a = props.urlConfig) == null ? void 0 : _a.nameKey) != null ? _b : "text";
|
|
38
|
+
});
|
|
39
|
+
const valueKey = computed(() => {
|
|
40
|
+
var _a, _b;
|
|
41
|
+
return (_b = (_a = props.urlConfig) == null ? void 0 : _a.valueKey) != null ? _b : "value";
|
|
42
|
+
});
|
|
43
|
+
const changeContextCollector = inject(InjectionChangeContextCollector);
|
|
44
|
+
function update(v, option) {
|
|
45
|
+
changeContextCollector == null ? void 0 : changeContextCollector.setContext(fieldKey.value, "currentOption", cloneDeep(option));
|
|
46
|
+
emit("update:value", v);
|
|
47
|
+
}
|
|
37
48
|
const {
|
|
38
49
|
title,
|
|
39
50
|
field,
|
|
40
51
|
fieldKey
|
|
41
52
|
} = useFormField();
|
|
42
|
-
|
|
43
|
-
return options.filter((option) => {
|
|
44
|
-
return !searchContent || String(option[labelKey.value]).includes(searchContent);
|
|
45
|
-
});
|
|
46
|
-
}
|
|
53
|
+
const asyncQueue = inject(InjectAsyncQueue);
|
|
47
54
|
async function fetchData(content) {
|
|
48
55
|
lastSearch.value = content || "";
|
|
49
|
-
if (
|
|
50
|
-
return;
|
|
51
|
-
const config = props.urlConfig;
|
|
52
|
-
if (!config) {
|
|
56
|
+
if (!configFor(props)) {
|
|
53
57
|
return remoteOptions.value = null;
|
|
54
58
|
}
|
|
55
|
-
if (
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
59
|
+
if (remoteOptions.value)
|
|
60
|
+
return;
|
|
61
|
+
remoteOptions.value = await asyncQueue.addAsync({
|
|
62
|
+
...createParams(configFor(props), field.value, title.value)
|
|
63
|
+
});
|
|
64
|
+
function createParams(config, field2, key) {
|
|
65
|
+
const _params = {};
|
|
66
|
+
traverseDependKey(config.dependKey, (dependKey, valueKey2) => {
|
|
67
|
+
const _field = field2.query(dependKey).take();
|
|
68
|
+
if (isField(_field)) {
|
|
69
|
+
_params[valueKey2] = _field.value;
|
|
70
|
+
}
|
|
63
71
|
});
|
|
64
|
-
} catch (e) {
|
|
65
|
-
remoteOptions.value = null;
|
|
66
|
-
}
|
|
67
|
-
function createParams(config2, field2) {
|
|
68
72
|
return {
|
|
69
|
-
...
|
|
70
|
-
params: Object.assign({},
|
|
73
|
+
...config,
|
|
74
|
+
params: Object.assign({}, config.params, _params),
|
|
75
|
+
key
|
|
71
76
|
};
|
|
72
77
|
}
|
|
78
|
+
function configFor(target) {
|
|
79
|
+
return target.urlConfig;
|
|
80
|
+
}
|
|
73
81
|
}
|
|
74
82
|
const parsedOptions = computed(() => {
|
|
75
83
|
if (remoteOptions.value)
|
|
@@ -77,42 +85,34 @@ const script = defineComponent({
|
|
|
77
85
|
if (!Array.isArray(props.options))
|
|
78
86
|
return [];
|
|
79
87
|
return filterOption(props.options, lastSearch.value);
|
|
88
|
+
function filterOption(options, searchContent) {
|
|
89
|
+
return options.filter((option) => {
|
|
90
|
+
return !searchContent || String(option[labelKey.value]).includes(searchContent);
|
|
91
|
+
});
|
|
92
|
+
}
|
|
80
93
|
});
|
|
81
94
|
const formItemDepsCollector = inject(InjectionFormItemDepsCollector);
|
|
82
|
-
watch(() => props.urlConfig, (config) => {
|
|
95
|
+
watch(() => props.urlConfig, (config, oldConfig) => {
|
|
96
|
+
if (isEqual(config, oldConfig))
|
|
97
|
+
return;
|
|
83
98
|
remoteOptions.value = null;
|
|
84
|
-
|
|
99
|
+
if (!config)
|
|
100
|
+
return;
|
|
101
|
+
formItemDepsCollector.setDeps(fieldKey.value, config.dependKey || [], async () => {
|
|
85
102
|
remoteOptions.value = null;
|
|
86
|
-
|
|
87
|
-
props.value != null && await fetchData();
|
|
103
|
+
emit("update:value", null);
|
|
88
104
|
});
|
|
105
|
+
props.value && fetchData();
|
|
89
106
|
}, {
|
|
90
107
|
immediate: true
|
|
91
108
|
});
|
|
92
109
|
watch(() => props.value, (n, o) => {
|
|
93
110
|
var _a, _b;
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
}
|
|
97
|
-
if (isField(field.value) && field.value.visited) {
|
|
98
|
-
(_b = (_a = field.value).validate) == null ? void 0 : _b.call(_a);
|
|
99
|
-
}
|
|
111
|
+
o == null && n != null && fetchData();
|
|
112
|
+
isField(field.value) && field.value.visited && ((_b = (_a = field.value).validate) == null ? void 0 : _b.call(_a));
|
|
100
113
|
}, {
|
|
101
114
|
immediate: true
|
|
102
115
|
});
|
|
103
|
-
const changeContextCollector = inject(InjectionChangeContextCollector);
|
|
104
|
-
function update(v, option) {
|
|
105
|
-
changeContextCollector == null ? void 0 : changeContextCollector.setContext(fieldKey.value, "currentOption", cloneDeep(option));
|
|
106
|
-
emit("update:value", v);
|
|
107
|
-
}
|
|
108
|
-
const labelKey = computed(() => {
|
|
109
|
-
var _a, _b;
|
|
110
|
-
return (_b = (_a = props.urlConfig) == null ? void 0 : _a.nameKey) != null ? _b : "text";
|
|
111
|
-
});
|
|
112
|
-
const valueKey = computed(() => {
|
|
113
|
-
var _a, _b;
|
|
114
|
-
return (_b = (_a = props.urlConfig) == null ? void 0 : _a.valueKey) != null ? _b : "value";
|
|
115
|
-
});
|
|
116
116
|
function focusDecorator(onFocus) {
|
|
117
117
|
return (...args) => {
|
|
118
118
|
if (isField(field.value)) {
|
|
@@ -122,16 +122,16 @@ const script = defineComponent({
|
|
|
122
122
|
};
|
|
123
123
|
}
|
|
124
124
|
return () => createVNode(NSelect, {
|
|
125
|
-
"value": props.value,
|
|
126
|
-
"onUpdate:value": update,
|
|
127
125
|
"remote": true,
|
|
128
126
|
"filterable": true,
|
|
127
|
+
"value": props.value,
|
|
128
|
+
"onUpdate:value": update,
|
|
129
129
|
"labelField": labelKey.value,
|
|
130
130
|
"valueField": valueKey.value,
|
|
131
|
+
"options": parsedOptions.value,
|
|
131
132
|
"onSearch": fetchData,
|
|
132
133
|
"onUpdate:show": (show) => show && fetchData(),
|
|
133
|
-
"onFocus": focusDecorator(props.onFocus)
|
|
134
|
-
"options": parsedOptions.value
|
|
134
|
+
"onFocus": focusDecorator(props.onFocus)
|
|
135
135
|
}, slots);
|
|
136
136
|
}
|
|
137
137
|
});
|
|
@@ -1,2 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const
|
|
1
|
+
import { AnyObject } from '../../../../../../es/src/types';
|
|
2
|
+
export declare const TEXT: {
|
|
3
|
+
(props: AnyObject): JSX.Element;
|
|
4
|
+
props: {
|
|
5
|
+
content: {};
|
|
6
|
+
fieldItem: {};
|
|
7
|
+
value: {};
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export declare const BUTTON: {
|
|
11
|
+
(props: AnyObject): JSX.Element;
|
|
12
|
+
props: {
|
|
13
|
+
onClick: {};
|
|
14
|
+
fieldItem: {};
|
|
15
|
+
content: {};
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
import { createVNode
|
|
1
|
+
import { createVNode } from 'vue';
|
|
2
2
|
import { connect, mapProps } from '@formily/vue';
|
|
3
3
|
import { isFunction } from 'lodash-es';
|
|
4
4
|
import { NButton } from 'naive-ui';
|
|
5
5
|
import { createSlot } from '../../../../../packages/form-render/src/utils';
|
|
6
6
|
|
|
7
|
-
function _isSlot(s) {
|
|
8
|
-
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
9
|
-
}
|
|
10
7
|
function createPropFor(props) {
|
|
11
8
|
return (property) => {
|
|
12
9
|
var _a;
|
|
@@ -15,8 +12,12 @@ function createPropFor(props) {
|
|
|
15
12
|
}
|
|
16
13
|
const textScript = (props) => {
|
|
17
14
|
var _a, _b, _c;
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
return createVNode("div", null, [(_c = (_b = createSlot((_a = props.content) != null ? _a : props.value, props)).default) == null ? void 0 : _c.call(_b)]);
|
|
16
|
+
};
|
|
17
|
+
textScript.props = {
|
|
18
|
+
content: {},
|
|
19
|
+
fieldItem: {},
|
|
20
|
+
value: {}
|
|
20
21
|
};
|
|
21
22
|
const TEXT = connect(textScript, mapProps((props) => {
|
|
22
23
|
var _a;
|
|
@@ -26,19 +27,20 @@ const TEXT = connect(textScript, mapProps((props) => {
|
|
|
26
27
|
};
|
|
27
28
|
}));
|
|
28
29
|
const buttonScript = (props) => {
|
|
29
|
-
var _a;
|
|
30
|
-
let _slot;
|
|
31
30
|
const propFor = createPropFor(props);
|
|
32
31
|
function onClick() {
|
|
33
|
-
var
|
|
34
|
-
const cb = propFor("onClick") || ((
|
|
32
|
+
var _a;
|
|
33
|
+
const cb = propFor("onClick") || ((_a = propFor("componentProps")) == null ? void 0 : _a.onClick);
|
|
35
34
|
return () => isFunction(cb) && cb(props.fieldItem);
|
|
36
35
|
}
|
|
37
|
-
return createVNode(NButton,
|
|
36
|
+
return createVNode(NButton, {
|
|
38
37
|
"onClick": onClick()
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
}, createSlot(props.content, props));
|
|
39
|
+
};
|
|
40
|
+
buttonScript.props = {
|
|
41
|
+
onClick: {},
|
|
42
|
+
fieldItem: {},
|
|
43
|
+
content: {}
|
|
42
44
|
};
|
|
43
45
|
const BUTTON = connect(buttonScript, mapProps((props) => {
|
|
44
46
|
var _a;
|
|
@@ -34,7 +34,7 @@ export declare class AsyncQueue<T = any, K = any, R = any> {
|
|
|
34
34
|
export declare function useAsyncQueue(): {
|
|
35
35
|
create: (parallelism?: number) => AsyncQueue<FormAsyncQueueItem, any, {
|
|
36
36
|
label: string;
|
|
37
|
-
value:
|
|
37
|
+
value: unknown;
|
|
38
38
|
}[]>;
|
|
39
39
|
};
|
|
40
40
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FormChangeContext } from '../types';
|
|
2
2
|
export declare class ContextCollector {
|
|
3
3
|
private readonly contextMap;
|
|
4
|
-
setContext(key: string, prop:
|
|
4
|
+
setContext<T extends keyof FormChangeContext>(key: string, prop: T, value: FormChangeContext[T]): void;
|
|
5
5
|
getContext(key: string): Partial<{
|
|
6
6
|
currentOption: import("../../../../src/types").AnyObject;
|
|
7
7
|
}>;
|