cnhis-design-vue 3.1.42-release.9 → 3.1.43-beta.1
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 +87 -87
- package/es/components/big-table/src/hooks/useEdit.d.ts +26 -26
- package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
- package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +1 -0
- package/es/components/bpmn-workflow/types/ModelingModule.d.ts +1 -0
- package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +1 -0
- package/es/components/button-print/src/components/IdentityVerification.vue.d.ts +1 -1
- package/es/components/date-picker/index.d.ts +27 -2
- package/es/components/date-picker/src/DatePicker.vue.d.ts +27 -2
- package/es/components/date-picker/src/DatePicker.vue.js +1 -1
- package/es/components/fabric-chart/src/utils/index.d.ts +6823 -0
- package/es/components/form-config/index.d.ts +5 -0
- package/es/components/form-config/src/FormConfig.vue.d.ts +5 -0
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +20 -20
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +3 -0
- package/es/components/form-config/src/components/renderer/ComplexNode.vue.d.ts +1 -1
- package/es/components/form-config/src/components/renderer/DefaultNode.vue.d.ts +1 -1
- package/es/components/form-render/src/components/renderer/dist/levelSearchCascader.d.ts +77 -0
- package/es/components/form-render/src/components/renderer/dist/searchCascade.d.ts +93 -0
- package/es/components/form-render/src/components/renderer/radio&checkbox.d.ts +18 -0
- package/es/components/form-render/src/components/renderer/radio_checkbox.js +1 -1
- package/es/components/form-render/src/hooks/useChangeContext.d.ts +1 -1
- package/es/components/form-render/src/hooks/useComplexOptions.d.ts +2 -1
- package/es/components/form-render/src/hooks/useComplexOptions.js +1 -1
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
- package/es/components/form-render/src/hooks/useFormRenderOptions.js +1 -1
- package/es/components/form-render/src/hooks/useLowCodeReactions.js +1 -1
- package/es/components/form-render/src/types/fieldItem.d.ts +4 -0
- package/es/components/iho-table/src/hooks/useTableContext.d.ts +1 -1
- package/es/components/iho-table/src/plugins/dist/highLightSetPlugin.d.ts +3 -0
- package/es/components/iho-table/src/plugins/fieldConnectionPlugin/index.d.ts +1 -0
- package/es/components/iho-table/src/plugins/fieldConnectionPlugin/index.js +1 -0
- package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/filter.vue.d.ts +28 -3
- package/es/components/iho-table/src/plugins/filterRenderPlugin/dist/index.d.ts +3 -0
- package/es/components/iho-table/src/plugins/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/dist/index.d.ts +3 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +27 -2
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.d.ts +4 -3
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/defaultRendererPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/dist/defaultRendererPlugin.d.ts +3 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/dist/seqRendererPlugin.d.ts +3 -0
- package/es/components/iho-table/src/types/index.d.ts +7 -7
- package/es/components/iho-table/src/types/pluginType.d.ts +21 -18
- package/es/components/iho-table/src/utils/dist/index.d.ts +44 -0
- package/es/components/index.d.ts +1 -0
- package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +4 -4
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +20 -20
- package/es/components/keyboard/index.d.ts +3 -1
- package/es/components/keyboard/src/Keyboard.vue.d.ts +3 -1
- package/es/components/keyboard/src/components/NumberPanel.vue.d.ts +3 -1
- package/es/components/keyboard/src/components/NumberPanel.vue.js +1 -1
- package/es/components/scale-view/src/ScaleView.vue.js +1 -1
- package/es/components/scale-view/src/components/formitem/dist/r-address.d.ts +36 -0
- package/es/components/scale-view/src/components/formitem/dist/r-sign.d.ts +36 -0
- package/es/components/scale-view/src/components/formitem/dist/standard-modal.d.ts +82 -0
- package/es/components/scale-view/src/hooks/use-component.d.ts +1 -1
- package/es/components/search-cascader/src/components/dist/SearchMenu.d.ts +57 -0
- package/es/components/search-cascader/src/components/dist/SearchMenu1.d.ts +57 -0
- package/es/components/select-label/src/LabelFormContent.vue.js +1 -1
- package/es/components/select-person/index.d.ts +13 -0
- package/es/components/select-person/src/SearchMultiple.vue.d.ts +0 -6
- package/es/components/select-person/src/SelectPerson.vue.d.ts +13 -0
- package/es/components/select-person/src/SelectPerson.vue2.js +1 -1
- package/es/components/select-person/src/utils/index.d.ts +1 -1
- package/es/components/select-person/src/utils/index.js +1 -1
- package/es/components/shortcut-setter/index.d.ts +1 -0
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +1 -0
- package/es/env.d.ts +25 -25
- package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +86 -0
- package/es/shared/hooks/useDateTime.js +1 -1
- package/es/shared/package.json.js +1 -1
- package/es/shared/types/business.d.ts +15 -0
- package/es/shared/types/business.js +1 -0
- package/es/shared/types/index.d.ts +1 -1
- package/es/shared/utils/business.d.ts +11 -0
- package/es/shared/utils/business.js +1 -0
- package/es/shared/utils/index.d.ts +1 -5
- package/es/shared/utils/index.js +1 -1
- package/es/shared/utils/tapable/index.d.ts +139 -0
- package/package.json +2 -2
|
@@ -1703,6 +1703,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
1703
1703
|
"text-anchor"?: import("csstype").TextAnchorProperty | undefined;
|
|
1704
1704
|
"vector-effect"?: import("csstype").VectorEffectProperty | undefined;
|
|
1705
1705
|
} | undefined;
|
|
1706
|
+
childFieldStrategy?: "checked" | "all" | undefined;
|
|
1706
1707
|
validator?: ((value: unknown, fieldItem: import("..").FieldItem) => string | void) | undefined;
|
|
1707
1708
|
reactions?: {
|
|
1708
1709
|
[x: string]: any;
|
|
@@ -3399,6 +3400,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
3399
3400
|
"text-anchor"?: import("csstype").TextAnchorProperty | undefined;
|
|
3400
3401
|
"vector-effect"?: import("csstype").VectorEffectProperty | undefined;
|
|
3401
3402
|
} | undefined;
|
|
3403
|
+
childFieldStrategy?: "checked" | "all" | undefined;
|
|
3402
3404
|
validator?: ((value: unknown, fieldItem: import("..").FieldItem) => string | void) | undefined;
|
|
3403
3405
|
reactions?: {
|
|
3404
3406
|
[x: string]: any;
|
|
@@ -6039,6 +6041,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
6039
6041
|
"text-anchor"?: import("csstype").TextAnchorProperty | undefined;
|
|
6040
6042
|
"vector-effect"?: import("csstype").VectorEffectProperty | undefined;
|
|
6041
6043
|
} | undefined;
|
|
6044
|
+
childFieldStrategy?: "checked" | "all" | undefined;
|
|
6042
6045
|
validator?: ((value: unknown, fieldItem: import("..").FieldItem) => string | void) | undefined;
|
|
6043
6046
|
reactions?: {
|
|
6044
6047
|
[x: string]: any;
|
|
@@ -7747,6 +7750,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
7747
7750
|
"text-anchor"?: import("csstype").TextAnchorProperty | undefined;
|
|
7748
7751
|
"vector-effect"?: import("csstype").VectorEffectProperty | undefined;
|
|
7749
7752
|
} | undefined;
|
|
7753
|
+
childFieldStrategy?: "checked" | "all" | undefined;
|
|
7750
7754
|
validator?: ((value: unknown, fieldItem: import("..").FieldItem) => string | void) | undefined;
|
|
7751
7755
|
reactions?: {
|
|
7752
7756
|
[x: string]: any;
|
|
@@ -9427,6 +9431,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
9427
9431
|
"text-anchor"?: import("csstype").TextAnchorProperty | undefined;
|
|
9428
9432
|
"vector-effect"?: import("csstype").VectorEffectProperty | undefined;
|
|
9429
9433
|
} | undefined;
|
|
9434
|
+
childFieldStrategy?: "checked" | "all" | undefined;
|
|
9430
9435
|
validator?: ((value: unknown, fieldItem: import("..").FieldItem) => string | void) | undefined;
|
|
9431
9436
|
reactions?: {
|
|
9432
9437
|
[x: string]: any;
|
|
@@ -1705,6 +1705,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1705
1705
|
"text-anchor"?: import("csstype").TextAnchorProperty | undefined;
|
|
1706
1706
|
"vector-effect"?: import("csstype").VectorEffectProperty | undefined;
|
|
1707
1707
|
} | undefined;
|
|
1708
|
+
childFieldStrategy?: "checked" | "all" | undefined;
|
|
1708
1709
|
validator?: ((value: unknown, fieldItem: import("../../../../es/components/form-render").FieldItem) => string | void) | undefined;
|
|
1709
1710
|
reactions?: {
|
|
1710
1711
|
[x: string]: any;
|
|
@@ -3401,6 +3402,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3401
3402
|
"text-anchor"?: import("csstype").TextAnchorProperty | undefined;
|
|
3402
3403
|
"vector-effect"?: import("csstype").VectorEffectProperty | undefined;
|
|
3403
3404
|
} | undefined;
|
|
3405
|
+
childFieldStrategy?: "checked" | "all" | undefined;
|
|
3404
3406
|
validator?: ((value: unknown, fieldItem: import("../../../../es/components/form-render").FieldItem) => string | void) | undefined;
|
|
3405
3407
|
reactions?: {
|
|
3406
3408
|
[x: string]: any;
|
|
@@ -6041,6 +6043,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
6041
6043
|
"text-anchor"?: import("csstype").TextAnchorProperty | undefined;
|
|
6042
6044
|
"vector-effect"?: import("csstype").VectorEffectProperty | undefined;
|
|
6043
6045
|
} | undefined;
|
|
6046
|
+
childFieldStrategy?: "checked" | "all" | undefined;
|
|
6044
6047
|
validator?: ((value: unknown, fieldItem: import("../../../../es/components/form-render").FieldItem) => string | void) | undefined;
|
|
6045
6048
|
reactions?: {
|
|
6046
6049
|
[x: string]: any;
|
|
@@ -7749,6 +7752,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
7749
7752
|
"text-anchor"?: import("csstype").TextAnchorProperty | undefined;
|
|
7750
7753
|
"vector-effect"?: import("csstype").VectorEffectProperty | undefined;
|
|
7751
7754
|
} | undefined;
|
|
7755
|
+
childFieldStrategy?: "checked" | "all" | undefined;
|
|
7752
7756
|
validator?: ((value: unknown, fieldItem: import("../../../../es/components/form-render").FieldItem) => string | void) | undefined;
|
|
7753
7757
|
reactions?: {
|
|
7754
7758
|
[x: string]: any;
|
|
@@ -9429,6 +9433,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
9429
9433
|
"text-anchor"?: import("csstype").TextAnchorProperty | undefined;
|
|
9430
9434
|
"vector-effect"?: import("csstype").VectorEffectProperty | undefined;
|
|
9431
9435
|
} | undefined;
|
|
9436
|
+
childFieldStrategy?: "checked" | "all" | undefined;
|
|
9432
9437
|
validator?: ((value: unknown, fieldItem: import("../../../../es/components/form-render").FieldItem) => string | void) | undefined;
|
|
9433
9438
|
reactions?: {
|
|
9434
9439
|
[x: string]: any;
|
|
@@ -15,7 +15,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
15
15
|
NButton: any;
|
|
16
16
|
NButtonGroup: any;
|
|
17
17
|
NPopconfirm: any;
|
|
18
|
-
CFormRender: import("
|
|
18
|
+
CFormRender: import("../../..").SFCWithInstall<import("vue").DefineComponent<{}, {
|
|
19
19
|
formRenderRef: import("vue").Ref<FormRenderExpose | undefined>;
|
|
20
20
|
key: import("vue").Ref<number>;
|
|
21
21
|
reload: () => Promise<void>;
|
|
@@ -26,7 +26,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
26
26
|
type: import("vue").PropType<FieldItem[]>;
|
|
27
27
|
};
|
|
28
28
|
initialData: {
|
|
29
|
-
type: import("vue").PropType<import("
|
|
29
|
+
type: import("vue").PropType<import("../../..").AnyObject>;
|
|
30
30
|
default: () => {};
|
|
31
31
|
};
|
|
32
32
|
fieldVisitor: {
|
|
@@ -115,11 +115,11 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
115
115
|
default: () => {};
|
|
116
116
|
};
|
|
117
117
|
scope: {
|
|
118
|
-
type: import("vue").PropType<import("
|
|
118
|
+
type: import("vue").PropType<import("../../..").AnyObject>;
|
|
119
119
|
default: () => {};
|
|
120
120
|
};
|
|
121
121
|
annotation: {
|
|
122
|
-
type: import("vue").PropType<import("
|
|
122
|
+
type: import("vue").PropType<import("../../..").AnyObject>;
|
|
123
123
|
};
|
|
124
124
|
consumer: {
|
|
125
125
|
type: BooleanConstructor;
|
|
@@ -131,8 +131,8 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
131
131
|
lifeCycle: {
|
|
132
132
|
type: import("vue").PropType<Partial<{
|
|
133
133
|
onSetup(): void;
|
|
134
|
-
beforeRequest(fieldKey: string, params?: import("
|
|
135
|
-
afterRequest(fieldKey: string, payload?: any): import("
|
|
134
|
+
beforeRequest(fieldKey: string, params?: import("../../..").AnyObject | undefined): void | import("../../..").UndefinedAble<import("../../..").AnyObject>;
|
|
135
|
+
afterRequest(fieldKey: string, payload?: any): import("../../..").AnyObject[];
|
|
136
136
|
}>>;
|
|
137
137
|
};
|
|
138
138
|
requestInstance: {
|
|
@@ -158,7 +158,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
158
158
|
type: import("vue").PropType<FieldItem[]>;
|
|
159
159
|
};
|
|
160
160
|
initialData: {
|
|
161
|
-
type: import("vue").PropType<import("
|
|
161
|
+
type: import("vue").PropType<import("../../..").AnyObject>;
|
|
162
162
|
default: () => {};
|
|
163
163
|
};
|
|
164
164
|
fieldVisitor: {
|
|
@@ -247,11 +247,11 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
247
247
|
default: () => {};
|
|
248
248
|
};
|
|
249
249
|
scope: {
|
|
250
|
-
type: import("vue").PropType<import("
|
|
250
|
+
type: import("vue").PropType<import("../../..").AnyObject>;
|
|
251
251
|
default: () => {};
|
|
252
252
|
};
|
|
253
253
|
annotation: {
|
|
254
|
-
type: import("vue").PropType<import("
|
|
254
|
+
type: import("vue").PropType<import("../../..").AnyObject>;
|
|
255
255
|
};
|
|
256
256
|
consumer: {
|
|
257
257
|
type: BooleanConstructor;
|
|
@@ -263,8 +263,8 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
263
263
|
lifeCycle: {
|
|
264
264
|
type: import("vue").PropType<Partial<{
|
|
265
265
|
onSetup(): void;
|
|
266
|
-
beforeRequest(fieldKey: string, params?: import("
|
|
267
|
-
afterRequest(fieldKey: string, payload?: any): import("
|
|
266
|
+
beforeRequest(fieldKey: string, params?: import("../../..").AnyObject | undefined): void | import("../../..").UndefinedAble<import("../../..").AnyObject>;
|
|
267
|
+
afterRequest(fieldKey: string, payload?: any): import("../../..").AnyObject[];
|
|
268
268
|
}>>;
|
|
269
269
|
};
|
|
270
270
|
requestInstance: {
|
|
@@ -300,7 +300,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
300
300
|
changeContextCollector: import("../../../../../es/components/form-render").ContextCollector;
|
|
301
301
|
formUUID: string;
|
|
302
302
|
anchorBarRef: import("vue").Ref<{
|
|
303
|
-
syncBarPosition: import("
|
|
303
|
+
syncBarPosition: import("../../..").Func<any[], any>;
|
|
304
304
|
} | undefined>;
|
|
305
305
|
currentAnchor: import("vue").WritableComputedRef<string>;
|
|
306
306
|
generateAnchorList: (formModel: import("../../../../../es/components/form-render").Form<any>) => Promise<void>;
|
|
@@ -439,7 +439,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
439
439
|
exposeEvent: {
|
|
440
440
|
validate(path?: string): Promise<void>;
|
|
441
441
|
getFormValues(needCombineExtendKey?: boolean): any;
|
|
442
|
-
setFormValues(values: import("
|
|
442
|
+
setFormValues(values: import("../../..").AnyObject, needSplitExtendKey?: boolean, overwrite?: boolean): void;
|
|
443
443
|
setFieldState(path: string, handler: (field: Partial<Pick<import("../../../../../es/components/form-render").Field<any, any, any, any>, import("../../../../../es/components/form-render").NonFunctionPropertyNames<{
|
|
444
444
|
match: (pattern: import("@formily/path").Pattern) => boolean;
|
|
445
445
|
validate: (triggerType?: import("@formily/validator").ValidatorTriggerType | undefined) => any;
|
|
@@ -605,7 +605,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
605
605
|
type: import("vue").PropType<FieldItem[]>;
|
|
606
606
|
};
|
|
607
607
|
initialData: {
|
|
608
|
-
type: import("vue").PropType<import("
|
|
608
|
+
type: import("vue").PropType<import("../../..").AnyObject>;
|
|
609
609
|
default: () => {};
|
|
610
610
|
};
|
|
611
611
|
fieldVisitor: {
|
|
@@ -694,11 +694,11 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
694
694
|
default: () => {};
|
|
695
695
|
};
|
|
696
696
|
scope: {
|
|
697
|
-
type: import("vue").PropType<import("
|
|
697
|
+
type: import("vue").PropType<import("../../..").AnyObject>;
|
|
698
698
|
default: () => {};
|
|
699
699
|
};
|
|
700
700
|
annotation: {
|
|
701
|
-
type: import("vue").PropType<import("
|
|
701
|
+
type: import("vue").PropType<import("../../..").AnyObject>;
|
|
702
702
|
};
|
|
703
703
|
consumer: {
|
|
704
704
|
type: BooleanConstructor;
|
|
@@ -710,8 +710,8 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
710
710
|
lifeCycle: {
|
|
711
711
|
type: import("vue").PropType<Partial<{
|
|
712
712
|
onSetup(): void;
|
|
713
|
-
beforeRequest(fieldKey: string, params?: import("
|
|
714
|
-
afterRequest(fieldKey: string, payload?: any): import("
|
|
713
|
+
beforeRequest(fieldKey: string, params?: import("../../..").AnyObject | undefined): void | import("../../..").UndefinedAble<import("../../..").AnyObject>;
|
|
714
|
+
afterRequest(fieldKey: string, payload?: any): import("../../..").AnyObject[];
|
|
715
715
|
}>>;
|
|
716
716
|
};
|
|
717
717
|
requestInstance: {
|
|
@@ -740,9 +740,9 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
740
740
|
maxHeight: string | number;
|
|
741
741
|
column: number;
|
|
742
742
|
components: Record<string, import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | import("vue").FunctionalComponent<{}, {}>>;
|
|
743
|
-
initialData: import("
|
|
743
|
+
initialData: import("../../..").AnyObject;
|
|
744
744
|
parallelism: number;
|
|
745
|
-
scope: import("
|
|
745
|
+
scope: import("../../..").AnyObject;
|
|
746
746
|
consumer: boolean;
|
|
747
747
|
enterToNextWidget: boolean | ((fieldItem: FieldItem) => boolean | void);
|
|
748
748
|
linebarAutoHidden: boolean;
|
|
@@ -1668,6 +1668,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1668
1668
|
"text-anchor"?: import("csstype").TextAnchorProperty | undefined;
|
|
1669
1669
|
"vector-effect"?: import("csstype").VectorEffectProperty | undefined;
|
|
1670
1670
|
} | undefined;
|
|
1671
|
+
childFieldStrategy?: "checked" | "all" | undefined;
|
|
1671
1672
|
validator?: ((value: unknown, fieldItem: FieldItem) => string | void) | undefined;
|
|
1672
1673
|
reactions?: {
|
|
1673
1674
|
[x: string]: any;
|
|
@@ -3376,6 +3377,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3376
3377
|
"text-anchor"?: import("csstype").TextAnchorProperty | undefined;
|
|
3377
3378
|
"vector-effect"?: import("csstype").VectorEffectProperty | undefined;
|
|
3378
3379
|
} | undefined;
|
|
3380
|
+
childFieldStrategy?: "checked" | "all" | undefined;
|
|
3379
3381
|
validator?: ((value: unknown, fieldItem: FieldItem) => string | void) | undefined;
|
|
3380
3382
|
reactions?: {
|
|
3381
3383
|
[x: string]: any;
|
|
@@ -5056,6 +5058,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
5056
5058
|
"text-anchor"?: import("csstype").TextAnchorProperty | undefined;
|
|
5057
5059
|
"vector-effect"?: import("csstype").VectorEffectProperty | undefined;
|
|
5058
5060
|
} | undefined;
|
|
5061
|
+
childFieldStrategy?: "checked" | "all" | undefined;
|
|
5059
5062
|
validator?: ((value: unknown, fieldItem: FieldItem) => string | void) | undefined;
|
|
5060
5063
|
reactions?: {
|
|
5061
5064
|
[x: string]: any;
|
|
@@ -21,7 +21,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
21
21
|
required: true;
|
|
22
22
|
};
|
|
23
23
|
}>> & {}>>;
|
|
24
|
-
currentActiveEditField: import("vue").Ref<import("
|
|
24
|
+
currentActiveEditField: import("vue").Ref<import("../../../..").UndefinedAble<FormConfigItem>>;
|
|
25
25
|
active: () => void;
|
|
26
26
|
headerClassList: import("vue").ComputedRef<(string | {
|
|
27
27
|
'is-active': boolean;
|
|
@@ -37,7 +37,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
37
37
|
default: boolean;
|
|
38
38
|
};
|
|
39
39
|
}>> & {}>>;
|
|
40
|
-
currentActiveEditField: import("vue").Ref<import("
|
|
40
|
+
currentActiveEditField: import("vue").Ref<import("../../../..").UndefinedAble<FormConfigItem>>;
|
|
41
41
|
setActiveField: () => void;
|
|
42
42
|
ellipsisClassList: import("vue").ComputedRef<(string | {
|
|
43
43
|
'is-required': boolean | undefined;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
export const __esModule: true;
|
|
2
|
+
export const LEVEL_SEARCH_CASCADER: vue_2.DefineComponent<{
|
|
3
|
+
options: {
|
|
4
|
+
type: ArrayConstructor;
|
|
5
|
+
default: () => never[];
|
|
6
|
+
};
|
|
7
|
+
labelField: {
|
|
8
|
+
type: StringConstructor;
|
|
9
|
+
default: string;
|
|
10
|
+
};
|
|
11
|
+
valueField: {
|
|
12
|
+
type: StringConstructor;
|
|
13
|
+
default: string;
|
|
14
|
+
};
|
|
15
|
+
autograph: {
|
|
16
|
+
type: StringConstructor;
|
|
17
|
+
required: true;
|
|
18
|
+
};
|
|
19
|
+
lazyRequest: {
|
|
20
|
+
type: BooleanConstructor;
|
|
21
|
+
default: boolean;
|
|
22
|
+
};
|
|
23
|
+
requestCache: {
|
|
24
|
+
type: BooleanConstructor;
|
|
25
|
+
default: boolean;
|
|
26
|
+
};
|
|
27
|
+
wordbook: {
|
|
28
|
+
type: ObjectConstructor;
|
|
29
|
+
required: true;
|
|
30
|
+
};
|
|
31
|
+
onChange: {};
|
|
32
|
+
value: {
|
|
33
|
+
type: (ArrayConstructor | StringConstructor)[];
|
|
34
|
+
};
|
|
35
|
+
}, () => any, any, {}, {}, vue_2.ComponentOptionsMixin, vue_2.ComponentOptionsMixin, "update:value"[], "update:value", vue_2.VNodeProps & vue_2.AllowedComponentProps & vue_2.ComponentCustomProps, Readonly<vue_2.ExtractPropTypes<{
|
|
36
|
+
options: {
|
|
37
|
+
type: ArrayConstructor;
|
|
38
|
+
default: () => never[];
|
|
39
|
+
};
|
|
40
|
+
labelField: {
|
|
41
|
+
type: StringConstructor;
|
|
42
|
+
default: string;
|
|
43
|
+
};
|
|
44
|
+
valueField: {
|
|
45
|
+
type: StringConstructor;
|
|
46
|
+
default: string;
|
|
47
|
+
};
|
|
48
|
+
autograph: {
|
|
49
|
+
type: StringConstructor;
|
|
50
|
+
required: true;
|
|
51
|
+
};
|
|
52
|
+
lazyRequest: {
|
|
53
|
+
type: BooleanConstructor;
|
|
54
|
+
default: boolean;
|
|
55
|
+
};
|
|
56
|
+
requestCache: {
|
|
57
|
+
type: BooleanConstructor;
|
|
58
|
+
default: boolean;
|
|
59
|
+
};
|
|
60
|
+
wordbook: {
|
|
61
|
+
type: ObjectConstructor;
|
|
62
|
+
required: true;
|
|
63
|
+
};
|
|
64
|
+
onChange: {};
|
|
65
|
+
value: {
|
|
66
|
+
type: (ArrayConstructor | StringConstructor)[];
|
|
67
|
+
};
|
|
68
|
+
}>> & {
|
|
69
|
+
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
70
|
+
}, {
|
|
71
|
+
options: unknown[];
|
|
72
|
+
labelField: string;
|
|
73
|
+
valueField: string;
|
|
74
|
+
lazyRequest: boolean;
|
|
75
|
+
requestCache: boolean;
|
|
76
|
+
}>;
|
|
77
|
+
import vue_2 = require("vue");
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
export const __esModule: true;
|
|
2
|
+
export const SEARCH_CASCADER: vue_2.DefineComponent<{
|
|
3
|
+
options: {
|
|
4
|
+
type: ArrayConstructor;
|
|
5
|
+
default: () => never[];
|
|
6
|
+
};
|
|
7
|
+
depth: {
|
|
8
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
9
|
+
};
|
|
10
|
+
urlConfig: {
|
|
11
|
+
type: ObjectConstructor;
|
|
12
|
+
};
|
|
13
|
+
lazyRequest: {
|
|
14
|
+
type: BooleanConstructor;
|
|
15
|
+
default: boolean;
|
|
16
|
+
};
|
|
17
|
+
requestCache: {
|
|
18
|
+
type: BooleanConstructor;
|
|
19
|
+
default: boolean;
|
|
20
|
+
};
|
|
21
|
+
onFocus: {
|
|
22
|
+
type: FunctionConstructor;
|
|
23
|
+
};
|
|
24
|
+
filterable: {
|
|
25
|
+
type: BooleanConstructor;
|
|
26
|
+
default: boolean;
|
|
27
|
+
};
|
|
28
|
+
checkStrategy: {
|
|
29
|
+
type: StringConstructor;
|
|
30
|
+
default: string;
|
|
31
|
+
};
|
|
32
|
+
labelField: {
|
|
33
|
+
type: StringConstructor;
|
|
34
|
+
default: string;
|
|
35
|
+
};
|
|
36
|
+
valueField: {
|
|
37
|
+
type: StringConstructor;
|
|
38
|
+
default: string;
|
|
39
|
+
};
|
|
40
|
+
onChange: {};
|
|
41
|
+
value: {};
|
|
42
|
+
}, () => any, any, {}, {}, vue_2.ComponentOptionsMixin, vue_2.ComponentOptionsMixin, "update:value"[], "update:value", vue_2.VNodeProps & vue_2.AllowedComponentProps & vue_2.ComponentCustomProps, Readonly<vue_2.ExtractPropTypes<{
|
|
43
|
+
options: {
|
|
44
|
+
type: ArrayConstructor;
|
|
45
|
+
default: () => never[];
|
|
46
|
+
};
|
|
47
|
+
depth: {
|
|
48
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
49
|
+
};
|
|
50
|
+
urlConfig: {
|
|
51
|
+
type: ObjectConstructor;
|
|
52
|
+
};
|
|
53
|
+
lazyRequest: {
|
|
54
|
+
type: BooleanConstructor;
|
|
55
|
+
default: boolean;
|
|
56
|
+
};
|
|
57
|
+
requestCache: {
|
|
58
|
+
type: BooleanConstructor;
|
|
59
|
+
default: boolean;
|
|
60
|
+
};
|
|
61
|
+
onFocus: {
|
|
62
|
+
type: FunctionConstructor;
|
|
63
|
+
};
|
|
64
|
+
filterable: {
|
|
65
|
+
type: BooleanConstructor;
|
|
66
|
+
default: boolean;
|
|
67
|
+
};
|
|
68
|
+
checkStrategy: {
|
|
69
|
+
type: StringConstructor;
|
|
70
|
+
default: string;
|
|
71
|
+
};
|
|
72
|
+
labelField: {
|
|
73
|
+
type: StringConstructor;
|
|
74
|
+
default: string;
|
|
75
|
+
};
|
|
76
|
+
valueField: {
|
|
77
|
+
type: StringConstructor;
|
|
78
|
+
default: string;
|
|
79
|
+
};
|
|
80
|
+
onChange: {};
|
|
81
|
+
value: {};
|
|
82
|
+
}>> & {
|
|
83
|
+
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
84
|
+
}, {
|
|
85
|
+
options: unknown[];
|
|
86
|
+
checkStrategy: string;
|
|
87
|
+
labelField: string;
|
|
88
|
+
valueField: string;
|
|
89
|
+
lazyRequest: boolean;
|
|
90
|
+
requestCache: boolean;
|
|
91
|
+
filterable: boolean;
|
|
92
|
+
}>;
|
|
93
|
+
import vue_2 = require("vue");
|
|
@@ -49,6 +49,10 @@ export declare const RADIO: import("vue").DefineComponent<{
|
|
|
49
49
|
type: BooleanConstructor;
|
|
50
50
|
default: boolean;
|
|
51
51
|
};
|
|
52
|
+
childFieldStrategy: {
|
|
53
|
+
type: PropType<"checked" | "all">;
|
|
54
|
+
default: string;
|
|
55
|
+
};
|
|
52
56
|
onChange: {};
|
|
53
57
|
}, () => 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<{
|
|
54
58
|
value: {
|
|
@@ -99,6 +103,10 @@ export declare const RADIO: import("vue").DefineComponent<{
|
|
|
99
103
|
type: BooleanConstructor;
|
|
100
104
|
default: boolean;
|
|
101
105
|
};
|
|
106
|
+
childFieldStrategy: {
|
|
107
|
+
type: PropType<"checked" | "all">;
|
|
108
|
+
default: string;
|
|
109
|
+
};
|
|
102
110
|
onChange: {};
|
|
103
111
|
}>> & {
|
|
104
112
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
@@ -109,6 +117,7 @@ export declare const RADIO: import("vue").DefineComponent<{
|
|
|
109
117
|
valueField: string;
|
|
110
118
|
lazyRequest: boolean;
|
|
111
119
|
requestCache: boolean;
|
|
120
|
+
childFieldStrategy: "checked" | "all";
|
|
112
121
|
}>;
|
|
113
122
|
export declare const CHECKBOX: import("vue").DefineComponent<{
|
|
114
123
|
value: {
|
|
@@ -159,6 +168,10 @@ export declare const CHECKBOX: import("vue").DefineComponent<{
|
|
|
159
168
|
type: BooleanConstructor;
|
|
160
169
|
default: boolean;
|
|
161
170
|
};
|
|
171
|
+
childFieldStrategy: {
|
|
172
|
+
type: PropType<"checked" | "all">;
|
|
173
|
+
default: string;
|
|
174
|
+
};
|
|
162
175
|
onChange: {};
|
|
163
176
|
}, () => 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<{
|
|
164
177
|
value: {
|
|
@@ -209,6 +222,10 @@ export declare const CHECKBOX: import("vue").DefineComponent<{
|
|
|
209
222
|
type: BooleanConstructor;
|
|
210
223
|
default: boolean;
|
|
211
224
|
};
|
|
225
|
+
childFieldStrategy: {
|
|
226
|
+
type: PropType<"checked" | "all">;
|
|
227
|
+
default: string;
|
|
228
|
+
};
|
|
212
229
|
onChange: {};
|
|
213
230
|
}>> & {
|
|
214
231
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
@@ -219,4 +236,5 @@ export declare const CHECKBOX: import("vue").DefineComponent<{
|
|
|
219
236
|
valueField: string;
|
|
220
237
|
lazyRequest: boolean;
|
|
221
238
|
requestCache: boolean;
|
|
239
|
+
childFieldStrategy: "checked" | "all";
|
|
222
240
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,createVNode as t,isVNode as o}from"vue";import{connect as
|
|
1
|
+
import{defineComponent as e,createVNode as t,isVNode as o}from"vue";import{connect as l,mapProps as a}from"@formily/vue";import{NSpace as r,NRadio as i,NRadioGroup as u,NCheckbox as n,NCheckboxGroup as p}from"naive-ui";import"../../../index.js";import{useComplexOptions as d}from"../../hooks/useComplexOptions.js";import"../../utils/index.js";import{useAutographOptions as s}from"../../hooks/useFormRenderOptions.js";import{useCommonInjection as m}from"../../hooks/useCommonInjection.js";import{assignUpdateValue as c,createVisitedSetter as v}from"../../utils/schema.js";import{useFormField as y}from"../../hooks/useFormField.js";function f(l,a,i){return e({name:l,props:{value:{type:[String,Number,Object,Array]},options:{type:Array,default:()=>[]},autograph:{type:String},lazyRequest:{type:Boolean,default:!1},requestCache:{type:Boolean,default:!0},labelField:{type:String,default:"text"},valueField:{type:String,default:"value"},wordbook:{type:Object},vertical:{type:Boolean,default:!1},childFieldStrategy:{type:String,default:"checked"},onChange:{}},emits:["update:value"],setup(e,{emit:l}){const{field:u}=y(),{renderComplexOption:n,valueRef:p}=d(e,l),{labelKey:c,valueKey:f,fullOptions:j}=s(e,p),{injectValueBindKey:b,injectValueValidate:h}=m();h(p);const g=b(p);return()=>t(a,{key:g.value,value:p.value,"onUpdate:value":e=>p.value=e,onClick:v(u)},{default:()=>[t(r,{vertical:e.vertical,"vertical-space":e.vertical},{default:()=>{var l;return[null==(l=j.value)?void 0:l.map((l=>{let a;return t(i,{key:l[f.value],value:l[f.value],disabled:l.disabled},"function"==typeof(r=a=n({value:p.value,option:l,valueKey:f.value,labelKey:c.value,childFieldStrategy:e.childFieldStrategy}))||"[object Object]"===Object.prototype.toString.call(r)&&!o(r)?a:{default:()=>[a]});var r}))]}})]})}})}const j=l(f("FormRadio",u,i),a({dataSource:"options"},c)),b=l(f("FormCheckbox",p,n),a({dataSource:"options"},c));export{b as CHECKBOX,j as RADIO};
|
|
@@ -3,7 +3,7 @@ export declare class ContextCollector {
|
|
|
3
3
|
private readonly contextMap;
|
|
4
4
|
setContext(key: string, value: (value: unknown) => FormChangeContext): void;
|
|
5
5
|
getContext(key: string, value: unknown): Partial<{
|
|
6
|
-
currentOption: import("
|
|
6
|
+
currentOption: import("../../..").AnyObject;
|
|
7
7
|
}> | undefined;
|
|
8
8
|
}
|
|
9
9
|
export declare function useChangeContext(): {
|
|
@@ -9,11 +9,12 @@ export declare function useComplexOptions(props: {
|
|
|
9
9
|
options: AnyObject[];
|
|
10
10
|
value: unknown;
|
|
11
11
|
}, emit: Func): {
|
|
12
|
-
renderComplexOption: ({ value, option, valueKey, labelKey }: {
|
|
12
|
+
renderComplexOption: ({ value, option, valueKey, labelKey, childFieldStrategy }: {
|
|
13
13
|
value: unknown;
|
|
14
14
|
option: FormOptionItem;
|
|
15
15
|
valueKey: string;
|
|
16
16
|
labelKey: string;
|
|
17
|
+
childFieldStrategy: 'checked' | 'all';
|
|
17
18
|
}) => any[];
|
|
18
19
|
valueRef: import("vue").WritableComputedRef<unknown>;
|
|
19
20
|
hasComplexOption: import("vue").ComputedRef<boolean>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{reactive as e,defineComponent as t,inject as r,provide as n,computed as
|
|
1
|
+
import{reactive as e,defineComponent as t,inject as r,provide as n,computed as l,watch as o,onUnmounted as a,onMounted as i,withModifiers as s,createVNode as c,mergeProps as u}from"vue";import{checkInSetupEnv as d}from"../../../../shared/utils/index.js";import{useField as p,useForm as m,RecursionField as f}from"@formily/vue";import{noop as v,isArray as h,isNumber as y}from"lodash-es";import"../../index.js";import{InjectionFormUUID as g,InjectionBusinessCollector as b}from"../constants/index.js";import{useFieldListAdaptor as F}from"./useFieldListAdaptor.js";import{createObjSchema as x}from"../utils/schema.js";const S=e(new Map);function j(e,t,r=0){S.set(e,S.get(e)||{});S.get(e)[t+""]=r}function O(e,t,r=!0){const n=S.get(e);return n?Object.entries(n).reduce(((e,[n,l])=>r&&n===`${t}`||n.startsWith(`${t}.`)?e+l:e),0):0}function $(e,t){const r=S.get(e);r&&Reflect.deleteProperty(r,t+"")}function k(e){S.delete(e)}const E=t({props:{fieldItems:{type:Array,default:()=>[]},childFieldStrategy:{type:String,default:"checked"},name:{type:String,required:!0}},setup(e){const t=r(g),d=r(b),h=p(),y=r(t+"_virtualParent",""),S=`${y?y+".":""}${h.value.address}`;function k(e){return`${S}.${e}`}n(t+"_virtualParent",S);const{schemaAdaptor:E}=F(d);function K(t){var r,n;return Object.assign(t,{"x-decorator-props":{...t["x-decorator-props"],labelPlacement:"left",showFeedback:!1,showLabel:!!t.title},"x-component-props":{...t["x-component-props"],childFieldStrategy:null!=(n=null==(r=t["x-component-props"])?void 0:r.childFieldStrategy)?n:e.childFieldStrategy,size:"small"}})}const P=l((()=>{const t=E(e.fieldItems);return Object.values(t).forEach(K),x(t)}));o(P,(()=>{return e=P.value,void Object.values(e.properties||{}).forEach((e=>{var r;j(t,k(e.name),null==(r=null==e?void 0:e["x-decorator-props"])?void 0:r.span)}));var e}),{immediate:!0});const _=m();function w(){return e.fieldItems.map((e=>_.value.query(e.val_key).take()))}a((()=>{var e;w().forEach((e=>{e&&(e.display="none")})),e=P.value,Object.values(e.properties||{}).forEach((e=>{$(t,k(e.name))}))})),i((()=>{w().forEach((e=>{e&&(e.display="visible")}))}));const I=s(v,["stop"]),A=["onClick","onKeydown","onKeyup","onKeypress"].reduce(((e,t)=>(e[t]=I,e)),{});return()=>{return c("section",u({class:"form-render__labelField",style:{"--column":(e=P.value,Object.values(e.properties||{}).reduce(((e,r)=>e+O(t,k(r.name))),0))}},A),[c(f,{basePath:".",schema:P.value},null)]);var e}}});function K(e,t){d();const r=l((()=>e.options.some((e=>h(e.childrenFields)&&e.childrenFields.length))));function n(e,t,r="value"){if(h(e)?e.includes(t[r]):e===t[r])return h(t.childrenFields)&&t.childrenFields.length}return{renderComplexOption:function({value:e,option:t,valueKey:l="value",labelKey:o="label",childFieldStrategy:a}){return[t[o],r.value&&("all"===a||n(e,t,l))?c(E,{fieldItems:t.childrenFields,name:t[l],childFieldStrategy:a},null):null]},valueRef:l({get(){return t=e.value,y(t)?t+"":t;var t},set(e){t("update:value",e)}}),hasComplexOption:r}}function P(){return{getSpan:O,setSpan:j,deleteSpan:$,clearSpan:k}}export{K as useComplexOptions,P as useComplexOptionsSpan};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{arrayed as e,deepOmit as o}from"../../../../shared/utils/index.js";import{cloneDeep as t,pick as n}from"lodash-es";import"../../index.js";import{parseNumberFromMaybeString as r,formRenderLog as i}from"../utils/index.js";import{useFieldNormalize as s}from"./useFieldNormalize.js";import{fieldKeyEscape as a,createLinebarId as p}from"../utils/schema.js";import{useFormValidator as l}from"./useFormValidator.js";import{transformDateFormat as c}from"../utils/business.js";function m(e,o){Object.assign(e["x-component-props"],{...n(o,["wordbook","autograph"])})}function
|
|
1
|
+
import{arrayed as e,deepOmit as o}from"../../../../shared/utils/index.js";import{cloneDeep as t,pick as n}from"lodash-es";import"../../index.js";import{parseNumberFromMaybeString as r,formRenderLog as i}from"../utils/index.js";import{useFieldNormalize as s}from"./useFieldNormalize.js";import{fieldKeyEscape as a,createLinebarId as p}from"../utils/schema.js";import{useFormValidator as l}from"./useFormValidator.js";import{transformDateFormat as c}from"../utils/business.js";function m(e,o){Object.assign(e["x-component-props"],{...n(o,["wordbook","autograph"])})}function d(d){const{createValidatorSchema:u}=l(),x=e=>{var t;const n={name:e.val_key,type:null!=(t=e.fieldType)?t:"string",title:e.alias||e.name,"x-component":e.html_type,default:e.default_val,"x-component-props":{placeholder:e.placeholder,clearable:"0"===e.is_empty,...e.componentProps||{}},"x-content":e.slots,"x-display":"0"===e.is_show?"hidden":"visible","x-pattern":"0"===e.is_edit?"disabled":"editable"};e.reactions&&(n["x-reactions"]=e.reactions),e.noDecorator||Object.assign(n,{"x-decorator":"FORM_ITEM","x-decorator-props":{fieldItem:o(e,["reactions"]),span:2*(e.elem_width||3),showLabel:"1"!==e.hide_title,remark:e.remark,propertyKey:e.val_key,annotation:e.annotation,...e.decoratorProps||{}}});const r=u(e);return r&&(n["x-validator"]=r),"0"===e.is_null&&(n.required=!0),n},f=e=>{var o;const t=x(e);e.urlConfig?function(e,o){Object.assign(e["x-component-props"],{...n(o,["urlConfig"])})}(t,e):e.autograph&&m(t,e);const i=!!e.__multiple;return Object.assign(t["x-component-props"],{multiple:i,options:e.option||(null==(o=e.componentProps)?void 0:o.options),allowCreate:"1"===e.free_entry||!!t["x-component-props"].allowCreate,maxTagCount:r(e.multi_select_value),...n(e,["lazyRequest","requestCache"])}),i&&(t.type="array"),t},_=e=>{const o=x(e);return Object.assign(o["x-component-props"],{options:e.option,childFieldStrategy:e.childFieldStrategy,vertical:e.__vertical}),m(o,e),o},h=e=>{const t=x(e);return Object.assign(t["x-component-props"],{fieldItem:o(e,["reactions"])}),t},g=e=>({name:e.val_key,type:"void",title:e.alias||e.name,"x-component":"LINEBAR","x-display":"visible","x-component-props":{disabled:"1"===e.is_not_fold,id:p(e.val_key),show:"0"!==e.is_show,remark:e.remark}}),y=new Map([["LINEBAR",g],["LINE_BREAKS",e=>({name:e.val_key,type:"void",title:e.alias||e.name,"x-component":"LINE_BREAKS","x-display":"0"===e.is_show?"hidden":"visible"})],["INPUT",e=>{const o=x(e);return Object.assign(o["x-component-props"],{...n(e,["prefix","suffix"])}),o}],["TEXTAREA",e=>{const o=x(e);return Object.assign(o["x-component-props"],{rows:e.initialize_high||3}),o}],["INPUT_NUMBER",e=>{const o=x(e),{decimal_length:t,validate:n}=e;return Object.assign(o["x-component-props"],{precision:null!=t?t:null==n?void 0:n.decimal_length,prefix:e.prefix,suffix:e.suffix}),o}],["SELECT",f],["REMOTE_SEARCH",f],["DATE",e=>{const o=x(e);return Object.assign(o["x-component-props"],{valueFormat:e.date_format,type:c(e.date_format),validate:e.validate}),o}],["LEVEL_SEARCH_CASCADER",e=>{const o=x(e);return Object.assign(o["x-component-props"],{...n(e,["wordbook","lazyRequest","autograph"])}),o}],["SEARCH_CASCADER",e=>{var o;const t=x(e);return Object.assign(t["x-component-props"],{urlConfig:e.urlConfig,depth:null==(o=e.wordbook)?void 0:o.level_num,options:e.option}),t}],["COMBINATION",e=>{const o=x(e);return o.type="array",!1!==e.jsonCombination&&(o["x-component"]="JSON_COMBINATION"),Object.assign(o["x-decorator-props"],{showLabel:!1,showFeedback:!1}),Object.assign(o["x-component-props"],{title:e.alias||e.name,maxGroupNum:e.maxGroupNum,getProperties:()=>e.children||[]}),o}],["RADIO",_],["CHECKBOX",_],["SWITCH",e=>{const o=x(e);return Object.assign(o["x-component-props"],{openDescription:e.open,closeDescription:e.close}),o}],["SLIDER",e=>{const o=x(e);return Object.assign(o["x-component-props"],{step:r(e.step_length),max:r(e.max_length),min:r(e.min_length),option:e.option}),o}],["COMPLEX",e=>{const o=x(e);Array.isArray(e.properties)&&i("COMPLEX控件的properties属性已经废弃, 请使用children作为替代, 在之后的版本中properties属性将不再支持");const t=Array.isArray(e.properties||e.children)?C(e.properties||e.children):{};return o.type=e.fieldType||"void",o.properties=t,Object.assign(o["x-decorator-props"],{showFeedback:!1}),Object.assign(o["x-component-props"],n(e,["wrapperStyle","display"])),o}]]),b=e=>{if(e.suffixConfig)return v(e);return(y.get(e.html_type)||h)(e)},v=o=>{if(!o.suffixConfig)return b(o);const t=e(o.suffixConfig),n=[{...o,is_show:"1",hide_title:"1",suffixConfig:void 0}].concat(t.map((e=>({...e,hide_title:"1",is_show:"1"})))),r=x(o);return Object.assign(r,{type:"void",name:a(n),title:o.alias||o.name,"x-component":"INPUT_GROUP","x-component-props":{span:2*(o.elem_width||3)},"x-decorator-props":{...r["x-decorator-props"],showFeedback:!1,suffixFields:n.map((e=>e.val_key))},properties:C(n)}),r},{FieldNormalizeWaterfallHook:O}=s();function C(o){let n=null;return o.reduce(((e,o,s)=>{var a;const p=null==(a=(o=O.call(t(o))).validate)?void 0:a.obj_type;return p&&d&&d.collect(p,t(o)),"LINEBAR"===o.html_type?(e[i(o)]=r(g(o),s),n=e[i(o)].properties={}):n?n[i(o)]=r(b(o),s):(n=null,e[i(o)]=r(b(o),s)),e}),{});function r(e,o){return e["x-index"]=o,e}function i(o){return o.suffixConfig?a([o,...e(o.suffixConfig)]):o.val_key}}return{schemaAdaptor:C}}export{d as useFieldListAdaptor};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{checkInSetupEnv as e,jsonParse as n}from"../../../../shared/utils/index.js";import{useMemoize as t,useDebounceFn as l}from"@vueuse/core";import{identity as u,uniqBy as o,isString as r,isEqual as a,omit as i,isFunction as
|
|
1
|
+
import{checkInSetupEnv as e,jsonParse as n}from"../../../../shared/utils/index.js";import{useMemoize as t,useDebounceFn as l}from"@vueuse/core";import{identity as u,uniqBy as o,isString as r,isEqual as a,omit as i,isArray as c,isFunction as s}from"lodash-es";import{computed as v,inject as m,ref as d,watch as f}from"vue";import"../../index.js";import{InjectionAsyncQueue as y,InjectionFormItemDepsCollector as p}from"../constants/index.js";import{createUrlConfigParams as h,formRenderLog as g,keywordMatcher as w}from"../utils/index.js";import{useFormField as k}from"./useFormField.js";import{useFormRequest as b}from"./useFormRequest.js";function R(e,n){const t=d();return v({get:()=>t.value?t.value:e[n],set(e){t.value=e}})}const C=(()=>{const e=new Map,n=t((e=>new RegExp(`(.*)${e.split("").map((e=>`(${function(e){return e.match(/[()\[\]{}$^\/]/)?"\\"+e:e}(e)})`)).join("(.*)")}(.*)`)),{getKey:u});return(t,l)=>{const u=e.get(t)||{};return e.set(t,u),Reflect.has(u,l)?u[l]:u[l]=l.match(n(t))}})();function K(){const e=d();return{searchContent:e,optionSearchFilter:function(n,t,l){if(!e.value)return n;const u=c(l)?l.filter((e=>e&&r(e))):[];return n.filter((n=>function(n,t,l){if(!e.value)return!0;const u=n?n[t]:"";return!!r(u)&&(!!C(e.value,u)||!!w(e.value,n.keyword)||!!l.length&&l.some((t=>r(n[t])&&n[t].includes(e.value))))}(n,t,u)))}}}function F(e,t,l,u,r){const a=R(e,"commonList"),c=R(e,"recentList"),{searchContent:d,optionSearchFilter:f}=K();function p(e){return n(e.itemObj)}const h=v((()=>{var e,n;return null!=(n=null==(e=a.value)?void 0:e.map(p))?n:[]})),g=v((()=>{var e,n;return null!=(n=null==(e=c.value)?void 0:e.map(p))?n:[]})),w=v((()=>{if(!e.recommend||!h.value.length&&!g.value.length)return t.value;const n=o(h.value.concat(g.value),(e=>e[r.value])),l=t.value.filter((e=>n.every((function(n){return n[r.value]!==e[r.value]}))));return[...f(n,u.value),...l]})),{getRecommendRequestInfo:C,getHttpInstance:F}=b();function j(n){const{url:t,getRecommendIds:l}=C(),u=s(l)?l():{},o=s(e.getRecommendInfo)?e.getRecommendInfo():{};return{url:t[n],info:Object.assign({},u,o)}}const{fieldKey:x}=k(),O=m(y);return{postRecommend:async function(n){if(!e.recommend)return;const t=F();if(!t)return;const{url:u,info:o}=j("post"),a=w.value.find((e=>e[r.value]===n));a&&l("postRecommend",await t.post(u,{...o,keyword:"",itemId:r.value,itemObj:JSON.stringify(a)}))},getRecommend:async function(n){if(!e.recommend)return;if(d.value=n,a.value&&c.value&&e.recommendCache)return;const t=await O.addAsync(function(n,t){const{url:l,info:u}=j("get");return{url:l,method:"get",key:n,cache:t,params:{...u,recNum:Math.max(e.commonNum,e.recentNum),keyword:""}}}(x.value,e.recommendCache)),{commonly:l,recently:u}=t.reduce(((e,n)=>("commonly"===n.type?e.commonly.push(i(n,["type"])):"recently"===n.type&&e.recently.push(i(n,["type"])),e)),{commonly:[],recently:[]});a.value=l.slice(0,e.commonNum),c.value=u.slice(0,e.recentNum)},sortedOptions:w}}function j(n,t){e();const u=m(y),o=v((()=>{var e,t,l;return null!=(l=null!=(t=null==(e=n.urlConfig)?void 0:e.nameKey)?t:n.labelField)?l:"text"})),i=v((()=>{var e,t,l;return null!=(l=null!=(t=null==(e=n.urlConfig)?void 0:e.valueKey)?t:n.valueField)?l:"value"})),{searchContent:c,optionSearchFilter:s}=K(),w=d(null),{field:b,fieldKey:R}=k(),C=l((async function(e){if(c.value=e||"",!n.urlConfig)return w.value=null;try{w.value=await u.addAsync(await h({config:n.urlConfig,cache:n.requestCache,field:b.value}))}catch(e){r(e)&&g(e)}}),300),F=v((()=>w.value?s(w.value,o.value):Array.isArray(n.options)?s(n.options,o.value):[])),j=v((()=>w.value||n.options||[])),x=m(p);return f((()=>n.urlConfig),((e,l)=>{a(e,l)||(w.value=null,e&&(x.setDeps(R.value,e.dependKey||[],(async()=>{w.value=null,t.value=null,!n.lazyRequest&&await C()})),(t.value||!n.lazyRequest)&&C()))}),{immediate:!0}),{labelKey:o,valueKey:i,filterOptions:F,fullOptions:j,fetchData:C}}function x(n,t){e();const u=m(y),o=v((()=>{var e,t,l,u;return null!=(u=null!=(l=null==(t=null==(e=n.wordbook)?void 0:e.render_key)?void 0:t[0])?l:n.labelField)?u:"text"})),i=v((()=>{var e,t,l;return null!=(l=null!=(t=null==(e=n.wordbook)?void 0:e.value_key)?t:n.valueField)?l:"value"})),c=v((()=>{var e;return(null==(e=n.wordbook)?void 0:e.search_key)||[]})),{searchContent:s,optionSearchFilter:p}=K(),h=d(null),{fieldKey:w}=k(),{getSearchRequestInfo:R}=b(),C=l((async function(e){if(s.value=e||"",!n.autograph||!n.wordbook)return h.value=null;try{h.value=await u.addAsync(function(e,t,l){const u={autograph:t,wordbookId:e.id,wordbookType:e.type,fieldKeys:e.search_key,keyword:"",page:1};return{...R(),params:u,key:l,cache:n.requestCache}}(n.wordbook,n.autograph,w.value))}catch(e){r(e)&&g(e)}}),300),F=v((()=>h.value?p(h.value,o.value,c.value):Array.isArray(n.options)?p(n.options,o.value):[])),j=v((()=>h.value||n.options||[]));return f((()=>n.wordbook),((e,l)=>{a(e,l)||(h.value=null,e&&(t.value||!n.lazyRequest)&&C())}),{immediate:!0}),{labelKey:o,valueKey:i,filterOptions:F,fullOptions:j,fetchData:C}}export{C as searchContentMatcher,x as useAutographOptions,F as useRecommendOptions,j as useUrlConfigOptions};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import"../../../../shared/utils/index.js";import{isField as e}from"@formily/core";import{Path as r}from"@formily/path";import{isArray as i}from"lodash-es";import{computed as o,unref as t}from"vue";import{isMatchLowCodeCondition as n}from"../../../../shared/utils/business.js";function l(l,d){const s={hideField:c((e=>e.setDisplay("none"))),showField:c((e=>e.setDisplay("visible"))),requiredField:c((e=>e.required=!0)),notRequiredField:c((e=>{e.required=!1,e.validate()})),enabledField:c((e=>e.editable=!0)),disabledField:c((e=>e.editable=!1))};function c(r){return i=>{i.forEach((i=>{const o=d.query(i).take();o&&e(o)&&r(o)}))}}const u=o((()=>t(l)?t(l).reduce(((e,r)=>(i(r.conObj)&&r.conObj.forEach((r=>e.push(r.field_key))),e)),[]):[]));function a(e,r,i){if(i.field_key===e)return n(r,i)}function f(e){Object.entries(e).forEach((([e,r])=>s[e]&&s[e](r)))}return{lowCodeReactionsHandler:function(e,r){const i=t(l);i&&u.value.includes(e)&&i.forEach((i=>{var o,t;o=e,t=r,i.conObj.every((e=>a(o,t,e)))&&f(i)}))},triggerAllReactionsHandler:function(){const e=t(l);if(!e)return;const o=d.getFormState().values;e.forEach((e=>{(function(e,o){if(!i(o.conObj))return;return o.conObj.every((i=>a(i.field_key,r.getIn(e,i.field_key),i)))})(o,e)&&f(e)}))}}}export{l as useLowCodeReactions};
|