cnhis-design-vue 3.1.46-beta.3 → 3.1.46-beta.30
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/es/components/button-print/index.d.ts +1 -1
- package/es/components/button-print/src/ButtonPrint.vue.d.ts +1 -1
- package/es/components/button-print/src/ButtonPrint.vue2.js +1 -1
- package/es/components/button-print/src/utils/print.js +1 -1
- package/es/components/classification/index.d.ts +1 -1
- package/es/components/classification/src/index.vue.d.ts +1 -1
- package/es/components/classification/src/index.vue2.js +1 -1
- package/es/components/date-picker/src/DatePicker.vue2.js +1 -1
- package/es/components/fabric-chart/src/FabricChart.vue2.js +1 -1
- package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +1 -1
- package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcessChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useTop.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/useCumputedPoint.js +1 -1
- package/es/components/fabric-chart/src/utils/index.d.ts +1 -0
- package/es/components/fabric-chart/src/utils/index.js +1 -1
- package/es/components/form-config/index.d.ts +23 -1
- package/es/components/form-config/src/FormConfig.vue.d.ts +23 -1
- package/es/components/form-config/src/FormConfig.vue2.js +1 -1
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +11 -0
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +11 -0
- package/es/components/form-config/src/hooks/useDataNormalize.d.ts +1 -1
- package/es/components/form-config/src/hooks/useDataNormalize.js +1 -1
- package/es/components/form-config/src/types/index.d.ts +1 -1
- package/es/components/form-render/index.d.ts +11 -0
- package/es/components/form-render/src/FormRender.vue.d.ts +12 -1
- package/es/components/form-render/src/FormRender.vue2.js +1 -1
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +11 -0
- package/es/components/form-render/src/components/renderer/levelSearchCascader.js +1 -1
- package/es/components/form-render/src/hooks/useOperationalForm.d.ts +7 -0
- package/es/components/form-render/src/hooks/useOperationalForm.js +1 -0
- package/es/components/form-render/src/types/index.d.ts +2 -1
- package/es/components/iho-table/index.d.ts +14 -0
- package/es/components/iho-table/src/IhoTable.vue.d.ts +14 -0
- package/es/components/iho-table/src/hooks/tapHooks/useConfigHooks.d.ts +1 -0
- package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.d.ts +2 -0
- package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.js +1 -1
- package/es/components/iho-table/src/hooks/tapHooks/useSetupHooks.d.ts +1 -1
- package/es/components/iho-table/src/hooks/tapHooks/useSetupHooks.js +1 -1
- package/es/components/iho-table/src/plugins/defaultConfigPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/filter.vue.d.ts +2 -2
- package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue.d.ts +1 -1
- package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue2.js +1 -1
- package/es/components/iho-table/src/plugins/index.js +1 -1
- package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/operationalFormPlugin/index.d.ts +1 -0
- package/es/components/iho-table/src/plugins/operationalFormPlugin/index.js +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/checkRendererPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/varialbleHeightPlugin/index.js +1 -1
- package/es/components/iho-table/src/types/index.d.ts +3 -1
- package/es/components/iho-table/src/types/pluginType.d.ts +2 -0
- package/es/components/iho-table/style/index.css +1 -1
- package/es/components/index.css +1 -1
- package/es/components/index.d.ts +2 -1
- package/es/components/index.js +1 -1
- package/es/components/info-header/index.d.ts +26 -0
- package/es/components/info-header/src/InfoHeader.vue.d.ts +26 -0
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +11 -0
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +11 -0
- package/es/components/quick-search/src/index.vue2.js +1 -1
- package/es/components/scale-view/index.d.ts +8 -8
- package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
- package/es/components/scale-view/src/components/formitem/r-checkbox.d.ts +4 -4
- package/es/components/scale-view/src/components/formitem/r-checkbox.js +1 -1
- package/es/components/scale-view/src/components/formitem/r-radio.d.ts +4 -4
- package/es/components/scale-view/src/components/formitem/r-radio.js +1 -1
- package/es/components/scale-view/src/hooks/use-component.d.ts +16 -16
- package/es/components/scale-view/style/index.css +1 -1
- package/es/components/search-cascader/src/SearchCascader.vue2.js +1 -1
- package/es/components/select-person/index.d.ts +123 -0
- package/es/components/select-person/src/SearchOrgAndStaff.vue.d.ts +88 -0
- package/es/components/select-person/src/SearchOrgAndStaff.vue.js +1 -0
- package/es/components/select-person/src/SearchOrgAndStaff.vue2.js +1 -0
- package/es/components/select-person/src/SelectPerson.vue.d.ts +123 -0
- package/es/components/select-person/src/SelectPerson.vue2.js +1 -1
- package/es/components/select-person/src/types/enums.d.ts +4 -0
- package/es/components/select-person/src/types/enums.js +1 -0
- 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/select-person/style/index.css +1 -1
- package/es/components/shortcut-setter/index.d.ts +11 -0
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +11 -0
- package/es/components/table-export-field/index.d.ts +1057 -0
- package/es/components/table-export-field/index.js +1 -0
- package/es/components/table-export-field/src/components/ExportModal.vue.d.ts +270 -0
- package/es/components/table-export-field/src/components/ExportModal.vue.js +1 -0
- package/es/components/table-export-field/src/components/ExportModal.vue2.js +1 -0
- package/es/components/table-export-field/src/components/SaveProjectModal.vue.d.ts +700 -0
- package/es/components/table-export-field/src/components/SaveProjectModal.vue.js +1 -0
- package/es/components/table-export-field/src/components/SaveProjectModal.vue2.js +1 -0
- package/es/components/table-export-field/src/constants/index.d.ts +3 -0
- package/es/components/table-export-field/src/constants/index.js +1 -0
- package/es/components/table-export-field/src/hooks/useAsyncData.d.ts +6 -0
- package/es/components/table-export-field/src/hooks/useAsyncData.js +1 -0
- package/es/components/table-export-field/src/index.vue.d.ts +1058 -0
- package/es/components/table-export-field/src/index.vue.js +1 -0
- package/es/components/table-export-field/src/index.vue2.js +1 -0
- package/es/components/table-export-field/src/tool.d.ts +1 -0
- package/es/components/table-export-field/src/tool.js +1 -0
- package/es/components/table-export-field/src/types/index.d.ts +6 -0
- package/es/components/table-export-field/src/types/index.js +1 -0
- package/es/components/table-export-field/style/index.css +1 -0
- package/es/components/table-filter/src/components/classify-filter/components/SelectDynamic.vue2.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/DateQuickBtn/index.vue2.js +1 -1
- package/es/components/table-filter/src/hooks/useAdvanced.d.ts +1 -1
- package/es/components/table-filter/src/hooks/useAdvanced.js +1 -1
- package/es/shared/hooks/useDateTime.d.ts +1 -1
- package/es/shared/hooks/useDateTime.js +1 -1
- package/es/shared/package.json.js +1 -1
- package/es/shared/types/business.d.ts +6 -0
- package/es/shared/types/index.d.ts +1 -0
- package/es/shared/utils/business.d.ts +6 -1
- package/es/shared/utils/business.js +1 -1
- package/es/shared/utils/fabricjs/index.js +1 -1
- package/es/shared/utils/index.js +1 -1
- package/es/shared/utils/tapableLess.d.ts +28 -0
- package/es/shared/utils/tapableLess.js +1 -0
- package/package.json +2 -2
- package/es/components/form-render/src/components/renderer/dist/levelSearchCascader.d.ts +0 -77
- package/es/components/form-render/src/components/renderer/dist/searchCascade.d.ts +0 -93
- package/es/components/iho-table/src/plugins/dist/highLightSetPlugin.d.ts +0 -3
- package/es/components/iho-table/src/plugins/filterRenderPlugin/dist/index.d.ts +0 -3
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/dist/index.d.ts +0 -3
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/dist/defaultRendererPlugin.d.ts +0 -3
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/dist/seqRendererPlugin.d.ts +0 -3
- package/es/components/iho-table/src/plugins/varialbleHeightPlugin/dist/index.d.ts +0 -3
- package/es/components/iho-table/src/utils/dist/index.d.ts +0 -44
- package/es/components/scale-view/src/components/formitem/dist/r-address.d.ts +0 -36
- package/es/components/scale-view/src/components/formitem/dist/r-sign.d.ts +0 -36
- package/es/components/scale-view/src/components/formitem/dist/standard-modal.d.ts +0 -82
- package/es/components/search-cascader/src/components/dist/SearchMenu.d.ts +0 -57
- package/es/components/search-cascader/src/components/dist/SearchMenu1.d.ts +0 -57
|
@@ -3484,7 +3484,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
3484
3484
|
validate: import("../../../es/shared/types").Func<any[], any>;
|
|
3485
3485
|
} | undefined>;
|
|
3486
3486
|
transform: (fieldList: import("./src/types").FormConfigItem[]) => import("./src/types").FormConfigItem[];
|
|
3487
|
-
inverseTransform: (fieldList: import("./src/types").FormConfigItem[]) => import("./src/types").FormConfigItem[];
|
|
3487
|
+
inverseTransform: (fieldList: import("./src/types").FormConfigItem[], withOriginalSetting: boolean) => import("./src/types").FormConfigItem[];
|
|
3488
3488
|
extraValueRef: import("vue").WritableComputedRef<any>;
|
|
3489
3489
|
_extraOptions: import("vue").Ref<{
|
|
3490
3490
|
key: string;
|
|
@@ -7131,6 +7131,9 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
7131
7131
|
lowCodeReactions: {
|
|
7132
7132
|
type: import("vue").PropType<import("..").FormLowCodeReactions.Config[]>;
|
|
7133
7133
|
};
|
|
7134
|
+
operationalForm: {
|
|
7135
|
+
type: import("vue").PropType<import("../../../es/shared/types").FormOperationalConfig[]>;
|
|
7136
|
+
};
|
|
7134
7137
|
linebarAutoHidden: {
|
|
7135
7138
|
type: BooleanConstructor;
|
|
7136
7139
|
};
|
|
@@ -7268,6 +7271,9 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
7268
7271
|
lowCodeReactions: {
|
|
7269
7272
|
type: import("vue").PropType<import("..").FormLowCodeReactions.Config[]>;
|
|
7270
7273
|
};
|
|
7274
|
+
operationalForm: {
|
|
7275
|
+
type: import("vue").PropType<import("../../../es/shared/types").FormOperationalConfig[]>;
|
|
7276
|
+
};
|
|
7271
7277
|
linebarAutoHidden: {
|
|
7272
7278
|
type: BooleanConstructor;
|
|
7273
7279
|
};
|
|
@@ -7325,6 +7331,8 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
7325
7331
|
}>;
|
|
7326
7332
|
lowCodeReactionsHandler: (field: string, value: unknown) => void;
|
|
7327
7333
|
triggerAllReactionsHandler: () => void;
|
|
7334
|
+
operationalFormHandler: (field: string) => void;
|
|
7335
|
+
triggerAllOperationalFormHandler: () => void;
|
|
7328
7336
|
schemaAdaptor: (fieldList: import("..").FieldItem[]) => Record<string, import("@formily/json-schema").Stringify<{
|
|
7329
7337
|
[key: symbol]: any;
|
|
7330
7338
|
[key: `x-${string}`]: any;
|
|
@@ -7731,6 +7739,9 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
7731
7739
|
lowCodeReactions: {
|
|
7732
7740
|
type: import("vue").PropType<import("..").FormLowCodeReactions.Config[]>;
|
|
7733
7741
|
};
|
|
7742
|
+
operationalForm: {
|
|
7743
|
+
type: import("vue").PropType<import("../../../es/shared/types").FormOperationalConfig[]>;
|
|
7744
|
+
};
|
|
7734
7745
|
linebarAutoHidden: {
|
|
7735
7746
|
type: BooleanConstructor;
|
|
7736
7747
|
};
|
|
@@ -13147,6 +13158,9 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
13147
13158
|
lowCodeReactions: {
|
|
13148
13159
|
type: import("vue").PropType<import("..").FormLowCodeReactions.Config[]>;
|
|
13149
13160
|
};
|
|
13161
|
+
operationalForm: {
|
|
13162
|
+
type: import("vue").PropType<import("../../../es/shared/types").FormOperationalConfig[]>;
|
|
13163
|
+
};
|
|
13150
13164
|
linebarAutoHidden: {
|
|
13151
13165
|
type: BooleanConstructor;
|
|
13152
13166
|
};
|
|
@@ -13284,6 +13298,9 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
13284
13298
|
lowCodeReactions: {
|
|
13285
13299
|
type: import("vue").PropType<import("..").FormLowCodeReactions.Config[]>;
|
|
13286
13300
|
};
|
|
13301
|
+
operationalForm: {
|
|
13302
|
+
type: import("vue").PropType<import("../../../es/shared/types").FormOperationalConfig[]>;
|
|
13303
|
+
};
|
|
13287
13304
|
linebarAutoHidden: {
|
|
13288
13305
|
type: BooleanConstructor;
|
|
13289
13306
|
};
|
|
@@ -13341,6 +13358,8 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
13341
13358
|
}>;
|
|
13342
13359
|
lowCodeReactionsHandler: (field: string, value: unknown) => void;
|
|
13343
13360
|
triggerAllReactionsHandler: () => void;
|
|
13361
|
+
operationalFormHandler: (field: string) => void;
|
|
13362
|
+
triggerAllOperationalFormHandler: () => void;
|
|
13344
13363
|
schemaAdaptor: (fieldList: import("..").FieldItem[]) => Record<string, import("@formily/json-schema").Stringify<{
|
|
13345
13364
|
[key: symbol]: any;
|
|
13346
13365
|
[key: `x-${string}`]: any;
|
|
@@ -13747,6 +13766,9 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
13747
13766
|
lowCodeReactions: {
|
|
13748
13767
|
type: import("vue").PropType<import("..").FormLowCodeReactions.Config[]>;
|
|
13749
13768
|
};
|
|
13769
|
+
operationalForm: {
|
|
13770
|
+
type: import("vue").PropType<import("../../../es/shared/types").FormOperationalConfig[]>;
|
|
13771
|
+
};
|
|
13750
13772
|
linebarAutoHidden: {
|
|
13751
13773
|
type: BooleanConstructor;
|
|
13752
13774
|
};
|
|
@@ -3486,7 +3486,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3486
3486
|
validate: Func;
|
|
3487
3487
|
} | undefined>;
|
|
3488
3488
|
transform: (fieldList: FormConfigItem[]) => FormConfigItem[];
|
|
3489
|
-
inverseTransform: (fieldList: FormConfigItem[]) => FormConfigItem[];
|
|
3489
|
+
inverseTransform: (fieldList: FormConfigItem[], withOriginalSetting: boolean) => FormConfigItem[];
|
|
3490
3490
|
extraValueRef: import("vue").WritableComputedRef<any>;
|
|
3491
3491
|
_extraOptions: import("vue").Ref<{
|
|
3492
3492
|
key: string;
|
|
@@ -7133,6 +7133,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
7133
7133
|
lowCodeReactions: {
|
|
7134
7134
|
type: PropType<import("../../../../es/components/form-render").FormLowCodeReactions.Config[]>;
|
|
7135
7135
|
};
|
|
7136
|
+
operationalForm: {
|
|
7137
|
+
type: PropType<import("../../../../es/shared/types").FormOperationalConfig[]>;
|
|
7138
|
+
};
|
|
7136
7139
|
linebarAutoHidden: {
|
|
7137
7140
|
type: BooleanConstructor;
|
|
7138
7141
|
};
|
|
@@ -7270,6 +7273,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
7270
7273
|
lowCodeReactions: {
|
|
7271
7274
|
type: PropType<import("../../../../es/components/form-render").FormLowCodeReactions.Config[]>;
|
|
7272
7275
|
};
|
|
7276
|
+
operationalForm: {
|
|
7277
|
+
type: PropType<import("../../../../es/shared/types").FormOperationalConfig[]>;
|
|
7278
|
+
};
|
|
7273
7279
|
linebarAutoHidden: {
|
|
7274
7280
|
type: BooleanConstructor;
|
|
7275
7281
|
};
|
|
@@ -7327,6 +7333,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
7327
7333
|
}>;
|
|
7328
7334
|
lowCodeReactionsHandler: (field: string, value: unknown) => void;
|
|
7329
7335
|
triggerAllReactionsHandler: () => void;
|
|
7336
|
+
operationalFormHandler: (field: string) => void;
|
|
7337
|
+
triggerAllOperationalFormHandler: () => void;
|
|
7330
7338
|
schemaAdaptor: (fieldList: import("../../../../es/components/form-render").FieldItem[]) => Record<string, import("@formily/json-schema").Stringify<{
|
|
7331
7339
|
[key: symbol]: any;
|
|
7332
7340
|
[key: `x-${string}`]: any;
|
|
@@ -7733,6 +7741,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
7733
7741
|
lowCodeReactions: {
|
|
7734
7742
|
type: PropType<import("../../../../es/components/form-render").FormLowCodeReactions.Config[]>;
|
|
7735
7743
|
};
|
|
7744
|
+
operationalForm: {
|
|
7745
|
+
type: PropType<import("../../../../es/shared/types").FormOperationalConfig[]>;
|
|
7746
|
+
};
|
|
7736
7747
|
linebarAutoHidden: {
|
|
7737
7748
|
type: BooleanConstructor;
|
|
7738
7749
|
};
|
|
@@ -13149,6 +13160,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
13149
13160
|
lowCodeReactions: {
|
|
13150
13161
|
type: PropType<import("../../../../es/components/form-render").FormLowCodeReactions.Config[]>;
|
|
13151
13162
|
};
|
|
13163
|
+
operationalForm: {
|
|
13164
|
+
type: PropType<import("../../../../es/shared/types").FormOperationalConfig[]>;
|
|
13165
|
+
};
|
|
13152
13166
|
linebarAutoHidden: {
|
|
13153
13167
|
type: BooleanConstructor;
|
|
13154
13168
|
};
|
|
@@ -13286,6 +13300,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
13286
13300
|
lowCodeReactions: {
|
|
13287
13301
|
type: PropType<import("../../../../es/components/form-render").FormLowCodeReactions.Config[]>;
|
|
13288
13302
|
};
|
|
13303
|
+
operationalForm: {
|
|
13304
|
+
type: PropType<import("../../../../es/shared/types").FormOperationalConfig[]>;
|
|
13305
|
+
};
|
|
13289
13306
|
linebarAutoHidden: {
|
|
13290
13307
|
type: BooleanConstructor;
|
|
13291
13308
|
};
|
|
@@ -13343,6 +13360,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
13343
13360
|
}>;
|
|
13344
13361
|
lowCodeReactionsHandler: (field: string, value: unknown) => void;
|
|
13345
13362
|
triggerAllReactionsHandler: () => void;
|
|
13363
|
+
operationalFormHandler: (field: string) => void;
|
|
13364
|
+
triggerAllOperationalFormHandler: () => void;
|
|
13346
13365
|
schemaAdaptor: (fieldList: import("../../../../es/components/form-render").FieldItem[]) => Record<string, import("@formily/json-schema").Stringify<{
|
|
13347
13366
|
[key: symbol]: any;
|
|
13348
13367
|
[key: `x-${string}`]: any;
|
|
@@ -13749,6 +13768,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
13749
13768
|
lowCodeReactions: {
|
|
13750
13769
|
type: PropType<import("../../../../es/components/form-render").FormLowCodeReactions.Config[]>;
|
|
13751
13770
|
};
|
|
13771
|
+
operationalForm: {
|
|
13772
|
+
type: PropType<import("../../../../es/shared/types").FormOperationalConfig[]>;
|
|
13773
|
+
};
|
|
13752
13774
|
linebarAutoHidden: {
|
|
13753
13775
|
type: BooleanConstructor;
|
|
13754
13776
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,provide as o,ref as t,computed as a,toRaw as r,openBlock as i,createElementBlock as l,normalizeStyle as n,unref as s,createElementVNode as m,createVNode as f,mergeProps as u,withCtx as c,createBlock as d,isRef as p,createCommentVNode as v,createTextVNode as g}from"vue";import{useTheme as h}from"../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import{isArray as _,cloneDeep as y,isFunction as x}from"lodash-es";import{uuidGenerator as C}from"../../../shared/utils/index.js";import j from"../../../shared/components/VueDraggable/src/vuedraggable.js";import k from"./components/FormConfigCreator.vue.js";import L from"./components/FormConfigDragDisplay.vue.js";import F from"./components/FormConfigEdit.vue.js";import b from"./components/FormConfigMaterialItem.js";import{useDataNormalize as M}from"./hooks/useDataNormalize.js";import{InjectionFormConfigEmit as V,InjectionFieldList as E,InjectionMaterialList as I,InjectionActiveFieldItem as D,FORM_CONFIG_GROUP as R}from"./constants/index.js";import"@vicons/ionicons5";import{NSelect as H}from"naive-ui";import"./utils/index.js";import{useSortableConfig as N}from"./hooks/useSortalbeConfig.js";import"./hooks/useConfigurationField.js";const O=["id"],A={class:"form-config__material"},S=m("header",{class:"form-config__materialHeader"},"物料区",-1),T={class:"form-config__displayWrapper"},U={class:"form-config__displayHeader"},w={class:"form-config__config"},B=m("header",{class:"form-config__configHeader"},"配置区",-1),z={class:"form-config__configContent"};var W=e({__name:"FormConfig",props:{maxHeight:{type:String},fieldVisitor:{type:Object},textFormatter:{type:Function},formRenderRef:{type:Object},extraMaterialList:{type:[Array,Function]}},emits:["addItem","removeItem"],setup(e,{expose:W,emit:q}){const G=e;o(V,q);const J=C(),K=h(),{getCommonConfig:P}=N(),Q=t([]);o(E,Q);const X=t([]);function Y(e){Q.value.some((o=>o.key===e.key))||Q.value.push(e)}o(I,X);const Z=(e,o)=>x(G.textFormatter)?G.textFormatter(e,o):o,$=t();o(D,$);const ee=t(),{transform:oe,inverseTransform:te}=M(G),ae=a({get:()=>null,set(e){if(!e)return;const o=ie.value.find((o=>o.key===e));o&&(o.__extra=!0,X.value.push(o),q("addItem",o))}}),re=t([]),ie=a((()=>_(re.value)?re.value.filter((e=>!X.value.find((o=>o.key===e.key))&&!Q.value.find((o=>o.key===e.key)))):[]));async function le(){G.extraMaterialList&&!re.value.length&&(re.value=x(G.extraMaterialList)?await G.extraMaterialList():G.extraMaterialList)}return W({loadData({fieldList:e}){let o=[],t=[];e.forEach((e=>function(e){"LINE_BAR"===e.type&&(e.children=[]);!1===e.show?t.push(e):o.push(e),"COMBINATION"===e.type&&_(e.children)&&e.children.length&&e.children.forEach((e=>{e.__isCombinationChild=!0}))}(y(r(e))))),Q.value=oe(o),X.value=t,$.value=void 0},validate(){var e;return null==(e=ee.value)?void 0:e.validate()},getData:()=>({fieldList:te(y(r(Q.value))),materialList:te(y(r(X.value)))}),clearExtraList(){re.value=[]}}),(o,t)=>(i(),l("section",{class:"form-config",style:n({"--max-height":e.maxHeight,...s(K)}),id:s(J)},[m("section",A,[S,f(s(j),u(s(P)(),{class:"form-config__materialContent",modelValue:X.value,"onUpdate:modelValue":t[0]||(t[0]=e=>X.value=e)}),{item:c((({element:e})=>[f(s(b),{"form-config-item":e,"text-formatter":Z,"material-List":X.value},null,8,["form-config-item","material-List"])])),_:1},16,["modelValue"]),e.extraMaterialList?(i(),d(s(H),{key:0,class:"form-config__materialExtraList",filterable:"",value:s(ae),"onUpdate:value":t[1]||(t[1]=e=>p(ae)?ae.value=e:null),placeholder:"请选择额外物料",options:s(ie),"label-field":"name","value-field":"key",onFocus:le},null,8,["value","options"])):v("v-if",!0)]),m("section",T,[m("header",U,[g(" 布局区 "),f(k,{onSubmit:Y})]),f(L,{class:"form-config__displayContent",group:s(R),"text-formatter":Z,modelValue:Q.value,"onUpdate:modelValue":t[2]||(t[2]=e=>Q.value=e)},null,8,["group","modelValue"])]),m("section",w,[B,m("section",z,[f(F,{ref_key:"formConfigEditRef",ref:ee,uuid:s(J),"form-render-ref":e.formRenderRef},null,8,["uuid","form-render-ref"])])])],12,O))}});export{W as default};
|
|
1
|
+
import{defineComponent as e,provide as o,ref as t,computed as a,toRaw as r,openBlock as i,createElementBlock as l,normalizeStyle as n,unref as s,createElementVNode as m,createVNode as f,mergeProps as u,withCtx as c,createBlock as d,isRef as p,createCommentVNode as v,createTextVNode as g}from"vue";import{useTheme as h}from"../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import{isArray as _,cloneDeep as y,isFunction as x}from"lodash-es";import{uuidGenerator as C}from"../../../shared/utils/index.js";import j from"../../../shared/components/VueDraggable/src/vuedraggable.js";import k from"./components/FormConfigCreator.vue.js";import L from"./components/FormConfigDragDisplay.vue.js";import F from"./components/FormConfigEdit.vue.js";import b from"./components/FormConfigMaterialItem.js";import{useDataNormalize as M}from"./hooks/useDataNormalize.js";import{InjectionFormConfigEmit as V,InjectionFieldList as E,InjectionMaterialList as I,InjectionActiveFieldItem as D,FORM_CONFIG_GROUP as R}from"./constants/index.js";import"@vicons/ionicons5";import{NSelect as H}from"naive-ui";import"./utils/index.js";import{useSortableConfig as N}from"./hooks/useSortalbeConfig.js";import"./hooks/useConfigurationField.js";const O=["id"],A={class:"form-config__material"},S=m("header",{class:"form-config__materialHeader"},"物料区",-1),T={class:"form-config__displayWrapper"},U={class:"form-config__displayHeader"},w={class:"form-config__config"},B=m("header",{class:"form-config__configHeader"},"配置区",-1),z={class:"form-config__configContent"};var W=e({__name:"FormConfig",props:{maxHeight:{type:String},fieldVisitor:{type:Object},textFormatter:{type:Function},formRenderRef:{type:Object},extraMaterialList:{type:[Array,Function]}},emits:["addItem","removeItem"],setup(e,{expose:W,emit:q}){const G=e;o(V,q);const J=C(),K=h(),{getCommonConfig:P}=N(),Q=t([]);o(E,Q);const X=t([]);function Y(e){Q.value.some((o=>o.key===e.key))||Q.value.push(e)}o(I,X);const Z=(e,o)=>x(G.textFormatter)?G.textFormatter(e,o):o,$=t();o(D,$);const ee=t(),{transform:oe,inverseTransform:te}=M(G),ae=a({get:()=>null,set(e){if(!e)return;const o=ie.value.find((o=>o.key===e));o&&(o.__extra=!0,X.value.push(o),q("addItem",o))}}),re=t([]),ie=a((()=>_(re.value)?re.value.filter((e=>!X.value.find((o=>o.key===e.key))&&!Q.value.find((o=>o.key===e.key)))):[]));async function le(){G.extraMaterialList&&!re.value.length&&(re.value=x(G.extraMaterialList)?await G.extraMaterialList():G.extraMaterialList)}return W({loadData({fieldList:e}){let o=[],t=[];e.forEach((e=>function(e){"LINE_BAR"===e.type&&(e.children=[]);!1===e.show?t.push(e):o.push(e),"COMBINATION"===e.type&&_(e.children)&&e.children.length&&e.children.forEach((e=>{e.__isCombinationChild=!0}))}(y(r(e))))),Q.value=oe(o),X.value=t,$.value=void 0},validate(){var e;return null==(e=ee.value)?void 0:e.validate()},getData:(e=!1)=>({fieldList:te(y(r(Q.value)),e),materialList:te(y(r(X.value)),e)}),clearExtraList(){re.value=[]}}),(o,t)=>(i(),l("section",{class:"form-config",style:n({"--max-height":e.maxHeight,...s(K)}),id:s(J)},[m("section",A,[S,f(s(j),u(s(P)(),{class:"form-config__materialContent",modelValue:X.value,"onUpdate:modelValue":t[0]||(t[0]=e=>X.value=e)}),{item:c((({element:e})=>[f(s(b),{"form-config-item":e,"text-formatter":Z,"material-List":X.value},null,8,["form-config-item","material-List"])])),_:1},16,["modelValue"]),e.extraMaterialList?(i(),d(s(H),{key:0,class:"form-config__materialExtraList",filterable:"",value:s(ae),"onUpdate:value":t[1]||(t[1]=e=>p(ae)?ae.value=e:null),placeholder:"请选择额外物料",options:s(ie),"label-field":"name","value-field":"key",onFocus:le},null,8,["value","options"])):v("v-if",!0)]),m("section",T,[m("header",U,[g(" 布局区 "),f(k,{onSubmit:Y})]),f(L,{class:"form-config__displayContent",group:s(R),"text-formatter":Z,modelValue:Q.value,"onUpdate:modelValue":t[2]||(t[2]=e=>Q.value=e)},null,8,["group","modelValue"])]),m("section",w,[B,m("section",z,[f(F,{ref_key:"formConfigEditRef",ref:ee,uuid:s(J),"form-render-ref":e.formRenderRef},null,8,["uuid","form-render-ref"])])])],12,O))}});export{W as default};
|
|
@@ -146,6 +146,9 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
146
146
|
lowCodeReactions: {
|
|
147
147
|
type: import("vue").PropType<import("../../../../../es/components/form-render").FormLowCodeReactions.Config[]>;
|
|
148
148
|
};
|
|
149
|
+
operationalForm: {
|
|
150
|
+
type: import("vue").PropType<import("../../..").FormOperationalConfig[]>;
|
|
151
|
+
};
|
|
149
152
|
linebarAutoHidden: {
|
|
150
153
|
type: BooleanConstructor;
|
|
151
154
|
};
|
|
@@ -283,6 +286,9 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
283
286
|
lowCodeReactions: {
|
|
284
287
|
type: import("vue").PropType<import("../../../../../es/components/form-render").FormLowCodeReactions.Config[]>;
|
|
285
288
|
};
|
|
289
|
+
operationalForm: {
|
|
290
|
+
type: import("vue").PropType<import("../../..").FormOperationalConfig[]>;
|
|
291
|
+
};
|
|
286
292
|
linebarAutoHidden: {
|
|
287
293
|
type: BooleanConstructor;
|
|
288
294
|
};
|
|
@@ -340,6 +346,8 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
340
346
|
}>;
|
|
341
347
|
lowCodeReactionsHandler: (field: string, value: unknown) => void;
|
|
342
348
|
triggerAllReactionsHandler: () => void;
|
|
349
|
+
operationalFormHandler: (field: string) => void;
|
|
350
|
+
triggerAllOperationalFormHandler: () => void;
|
|
343
351
|
schemaAdaptor: (fieldList: FieldItem[]) => Record<string, import("@formily/json-schema").Stringify<{
|
|
344
352
|
[key: symbol]: any;
|
|
345
353
|
[key: `x-${string}`]: any;
|
|
@@ -746,6 +754,9 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
746
754
|
lowCodeReactions: {
|
|
747
755
|
type: import("vue").PropType<import("../../../../../es/components/form-render").FormLowCodeReactions.Config[]>;
|
|
748
756
|
};
|
|
757
|
+
operationalForm: {
|
|
758
|
+
type: import("vue").PropType<import("../../..").FormOperationalConfig[]>;
|
|
759
|
+
};
|
|
749
760
|
linebarAutoHidden: {
|
|
750
761
|
type: BooleanConstructor;
|
|
751
762
|
};
|
|
@@ -5277,6 +5277,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
5277
5277
|
lowCodeReactions: {
|
|
5278
5278
|
type: PropType<import("../../../../../es/components/form-render").FormLowCodeReactions.Config[]>;
|
|
5279
5279
|
};
|
|
5280
|
+
operationalForm: {
|
|
5281
|
+
type: PropType<import("../../../../../es/shared/types").FormOperationalConfig[]>;
|
|
5282
|
+
};
|
|
5280
5283
|
linebarAutoHidden: {
|
|
5281
5284
|
type: BooleanConstructor;
|
|
5282
5285
|
};
|
|
@@ -5414,6 +5417,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
5414
5417
|
lowCodeReactions: {
|
|
5415
5418
|
type: PropType<import("../../../../../es/components/form-render").FormLowCodeReactions.Config[]>;
|
|
5416
5419
|
};
|
|
5420
|
+
operationalForm: {
|
|
5421
|
+
type: PropType<import("../../../../../es/shared/types").FormOperationalConfig[]>;
|
|
5422
|
+
};
|
|
5417
5423
|
linebarAutoHidden: {
|
|
5418
5424
|
type: BooleanConstructor;
|
|
5419
5425
|
};
|
|
@@ -5471,6 +5477,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
5471
5477
|
}>;
|
|
5472
5478
|
lowCodeReactionsHandler: (field: string, value: unknown) => void;
|
|
5473
5479
|
triggerAllReactionsHandler: () => void;
|
|
5480
|
+
operationalFormHandler: (field: string) => void;
|
|
5481
|
+
triggerAllOperationalFormHandler: () => void;
|
|
5474
5482
|
schemaAdaptor: (fieldList: FieldItem[]) => Record<string, import("@formily/json-schema").Stringify<{
|
|
5475
5483
|
[key: symbol]: any;
|
|
5476
5484
|
[key: `x-${string}`]: any;
|
|
@@ -5877,6 +5885,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
5877
5885
|
lowCodeReactions: {
|
|
5878
5886
|
type: PropType<import("../../../../../es/components/form-render").FormLowCodeReactions.Config[]>;
|
|
5879
5887
|
};
|
|
5888
|
+
operationalForm: {
|
|
5889
|
+
type: PropType<import("../../../../../es/shared/types").FormOperationalConfig[]>;
|
|
5890
|
+
};
|
|
5880
5891
|
linebarAutoHidden: {
|
|
5881
5892
|
type: BooleanConstructor;
|
|
5882
5893
|
};
|
|
@@ -3,5 +3,5 @@ export declare function useDataNormalize(props: {
|
|
|
3
3
|
fieldVisitor?: FormConfigVisitor;
|
|
4
4
|
}): {
|
|
5
5
|
transform: (fieldList: FormConfigItem[]) => FormConfigItem[];
|
|
6
|
-
inverseTransform: (fieldList: FormConfigItem[]) => FormConfigItem[];
|
|
6
|
+
inverseTransform: (fieldList: FormConfigItem[], withOriginalSetting: boolean) => FormConfigItem[];
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isObject as e,omit as n}from"lodash-es";function r(r){return{transform:function(n){let i=null;const t=r.fieldVisitor;return n.reduce(((n,r)=>(r.originalSetting&&e(t)&&t[r.key]&&t[r.key]({field:r.originalSetting,replace(e){r.originalSetting=e}}),"LINE_BAR"===r.type?(r.children=[],i=r.children,n.push(r),n):i?(i.push(r),n):(n.push(r),n))),[])},inverseTransform:function(e){return e.reduce(((e,r)=>("LINE_BAR"===r.type?(e.push(n(r,["children"])),e.push(...r.children||[])):e.push(r),e)),[]).map((e=>n(e,["originalSetting"])))}}}export{r as useDataNormalize};
|
|
1
|
+
import{isObject as e,omit as n}from"lodash-es";function r(r){return{transform:function(n){let i=null;const t=r.fieldVisitor;return n.reduce(((n,r)=>(r.originalSetting&&e(t)&&t[r.key]&&t[r.key]({field:r.originalSetting,replace(e){r.originalSetting=e}}),"LINE_BAR"===r.type?(r.children=[],i=r.children,n.push(r),n):i?(i.push(r),n):(n.push(r),n))),[])},inverseTransform:function(e,r){return e.reduce(((e,r)=>("LINE_BAR"===r.type?(e.push(n(r,["children"])),e.push(...r.children||[])):e.push(r),e)),[]).map((e=>r?e:n(e,["originalSetting"])))}}}export{r as useDataNormalize};
|
|
@@ -38,7 +38,7 @@ export interface FormConfigTextFormatter {
|
|
|
38
38
|
export interface FormConfigExpose {
|
|
39
39
|
loadData(payload: Record<'fieldList', FormConfigItem[]>): void;
|
|
40
40
|
validate(): Promise<unknown>;
|
|
41
|
-
getData(): Record<'fieldList' | 'materialList', FormConfigItem[]>;
|
|
41
|
+
getData(withOriginalSetting?: boolean): Record<'fieldList' | 'materialList', FormConfigItem[]>;
|
|
42
42
|
clearExtraList(): void;
|
|
43
43
|
}
|
|
44
44
|
interface FieldVisitorContext {
|
|
@@ -133,6 +133,9 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{}, {
|
|
|
133
133
|
lowCodeReactions: {
|
|
134
134
|
type: import("vue").PropType<import("./src/types").FormLowCodeReactions.Config[]>;
|
|
135
135
|
};
|
|
136
|
+
operationalForm: {
|
|
137
|
+
type: import("vue").PropType<import("../../../es/shared/types").FormOperationalConfig[]>;
|
|
138
|
+
};
|
|
136
139
|
linebarAutoHidden: {
|
|
137
140
|
type: BooleanConstructor;
|
|
138
141
|
};
|
|
@@ -270,6 +273,9 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{}, {
|
|
|
270
273
|
lowCodeReactions: {
|
|
271
274
|
type: import("vue").PropType<import("./src/types").FormLowCodeReactions.Config[]>;
|
|
272
275
|
};
|
|
276
|
+
operationalForm: {
|
|
277
|
+
type: import("vue").PropType<import("../../../es/shared/types").FormOperationalConfig[]>;
|
|
278
|
+
};
|
|
273
279
|
linebarAutoHidden: {
|
|
274
280
|
type: BooleanConstructor;
|
|
275
281
|
};
|
|
@@ -327,6 +333,8 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{}, {
|
|
|
327
333
|
}>;
|
|
328
334
|
lowCodeReactionsHandler: (field: string, value: unknown) => void;
|
|
329
335
|
triggerAllReactionsHandler: () => void;
|
|
336
|
+
operationalFormHandler: (field: string) => void;
|
|
337
|
+
triggerAllOperationalFormHandler: () => void;
|
|
330
338
|
schemaAdaptor: (fieldList: import("./src/types").FieldItem[]) => Record<string, import("@formily/json-schema").Stringify<{
|
|
331
339
|
[key: symbol]: any;
|
|
332
340
|
[key: `x-${string}`]: any;
|
|
@@ -733,6 +741,9 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{}, {
|
|
|
733
741
|
lowCodeReactions: {
|
|
734
742
|
type: import("vue").PropType<import("./src/types").FormLowCodeReactions.Config[]>;
|
|
735
743
|
};
|
|
744
|
+
operationalForm: {
|
|
745
|
+
type: import("vue").PropType<import("../../../es/shared/types").FormOperationalConfig[]>;
|
|
746
|
+
};
|
|
736
747
|
linebarAutoHidden: {
|
|
737
748
|
type: BooleanConstructor;
|
|
738
749
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnyObject } from '../../../../es/shared/types';
|
|
1
|
+
import { AnyObject, FormOperationalConfig } from '../../../../es/shared/types';
|
|
2
2
|
import { Component, FunctionalComponent, PropType } from 'vue';
|
|
3
3
|
import { RequestInstance } from './hooks';
|
|
4
4
|
import { FieldItem, FieldVisitor, FormBusinessFormatter, FormLowCodeReactions } from './types';
|
|
@@ -127,6 +127,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
127
127
|
lowCodeReactions: {
|
|
128
128
|
type: PropType<FormLowCodeReactions.Config[]>;
|
|
129
129
|
};
|
|
130
|
+
operationalForm: {
|
|
131
|
+
type: PropType<FormOperationalConfig[]>;
|
|
132
|
+
};
|
|
130
133
|
linebarAutoHidden: {
|
|
131
134
|
type: BooleanConstructor;
|
|
132
135
|
};
|
|
@@ -264,6 +267,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
264
267
|
lowCodeReactions: {
|
|
265
268
|
type: PropType<FormLowCodeReactions.Config[]>;
|
|
266
269
|
};
|
|
270
|
+
operationalForm: {
|
|
271
|
+
type: PropType<FormOperationalConfig[]>;
|
|
272
|
+
};
|
|
267
273
|
linebarAutoHidden: {
|
|
268
274
|
type: BooleanConstructor;
|
|
269
275
|
};
|
|
@@ -321,6 +327,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
321
327
|
}>;
|
|
322
328
|
lowCodeReactionsHandler: (field: string, value: unknown) => void;
|
|
323
329
|
triggerAllReactionsHandler: () => void;
|
|
330
|
+
operationalFormHandler: (field: string) => void;
|
|
331
|
+
triggerAllOperationalFormHandler: () => void;
|
|
324
332
|
schemaAdaptor: (fieldList: FieldItem[]) => Record<string, import("@formily/vue").Stringify<{
|
|
325
333
|
[key: symbol]: any;
|
|
326
334
|
[key: `x-${string}`]: any;
|
|
@@ -727,6 +735,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
727
735
|
lowCodeReactions: {
|
|
728
736
|
type: PropType<FormLowCodeReactions.Config[]>;
|
|
729
737
|
};
|
|
738
|
+
operationalForm: {
|
|
739
|
+
type: PropType<FormOperationalConfig[]>;
|
|
740
|
+
};
|
|
730
741
|
linebarAutoHidden: {
|
|
731
742
|
type: BooleanConstructor;
|
|
732
743
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as o,computed as t,provide as r,onMounted as s,onUnmounted as a,nextTick as i,openBlock as l,createBlock as n,unref as m,normalizeClass as d,normalizeStyle as p,withCtx as u,createElementBlock as c,createVNode as f,isRef as h,Fragment as y,renderList as j,createCommentVNode as g,createElementVNode as b,withKeys as k,withModifiers as v,toDisplayString as F,renderSlot as C}from"vue";import{useTheme as
|
|
1
|
+
import{defineComponent as e,ref as o,computed as t,provide as r,onMounted as s,onUnmounted as a,nextTick as i,openBlock as l,createBlock as n,unref as m,normalizeClass as d,normalizeStyle as p,withCtx as u,createElementBlock as c,createVNode as f,isRef as h,Fragment as y,renderList as j,createCommentVNode as g,createElementVNode as b,withKeys as k,withModifiers as v,toDisplayString as F,renderSlot as C}from"vue";import{useTheme as H}from"../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import{isNumber as S,cloneDeep as x}from"lodash-es";import{createForm as A,onFieldValueChange as L,onFieldMount as O,onFieldUnmount as R,onFieldReact as w,onFormMount as B}from"@formily/core";import{FormProvider as _,FormConsumer as V}from"@formily/vue";import{NForm as D,NTabs as I,NTabPane as N,NConfigProvider as q}from"naive-ui";import{InjectionFormLifeCycleCaller as T,InjectionFormGraph as U}from"./constants/index.js";import{useAutoHidden as W}from"./hooks/useAutoHidden.js";import{useComplexOptionsSpan as E}from"./hooks/useComplexOptions.js";import{useFormDomEvent as G,useFormExposeEvent as K}from"./hooks/useFormEvent.js";import{useFormGraph as M}from"./hooks/useFormGraph.js";import{useFormRenderLifeCycle as P}from"./hooks/useFormRenderLifeCycle.js";import{useLowCodeEvent as J}from"./hooks/useLowCodeEvent.js";import{useLowCodeReactions as $}from"./hooks/useLowCodeReactions.js";import{useNuiThemeOverrides as z}from"./hooks/useNuiThemeOverrides.js";import{useOperationalForm as Q}from"./hooks/useOperationalForm.js";import"./utils/index.js";import{useFieldListAdaptor as X}from"./hooks/useFieldListAdaptor.js";import"../../../shared/utils/index.js";import"../index.js";import{useFieldVisitor as Y}from"./hooks/useFieldVisitor.js";import"../../../shared/utils/tapable/SyncHook.js";import"../../../shared/utils/tapable/SyncBailHook.js";import"../../../shared/utils/tapable/SyncWaterfallHook.js";import"../../../shared/utils/tapable/SyncLoopHook.js";import"../../../shared/utils/tapable/AsyncParallelHook.js";import"../../../shared/utils/tapable/AsyncParallelBailHook.js";import"../../../shared/utils/tapable/AsyncSeriesHook.js";import"../../../shared/utils/tapable/AsyncSeriesBailHook.js";import"../../../shared/utils/tapable/AsyncSeriesLoopHook.js";import"../../../shared/utils/tapable/AsyncSeriesWaterfallHook.js";import{validateMessageLocale as Z}from"./hooks/useFormValidator.js";import{useAnchor as ee}from"./hooks/useAnchor.js";import{useFormContext as oe}from"./hooks/useFormContext.js";import"./hooks/useFormRenderOptions.js";import{createObjSchema as te}from"./utils/schema.js";const re={key:0,style:{height:"54px"}},se={style:{"white-space":"pre"}};var ae=e({__name:"FormRender",props:{fieldList:{type:Array},initialData:{type:Object,default:()=>({})},fieldVisitor:{type:Object},column:{type:Number,default:24},maxHeight:{type:[Number,String],default:""},anchor:{type:Boolean,default:!1},parallelism:{type:Number,default:3},businessFormatter:{type:Function},schema:{type:Object},components:{type:Object,default:()=>({})},scope:{type:Object,default:()=>({})},annotation:{type:Object},consumer:{type:Boolean,default:!1},uuid:{type:String},lifeCycle:{type:Object},requestInstance:{type:Object},enterToNextWidget:{type:[Boolean,Function],default:!0},lowCodeReactions:{type:Array},operationalForm:{type:Object},linebarAutoHidden:{type:Boolean},bordered:{type:[Boolean,String],default:!0},uniqueCacheData:{type:Boolean,default:!1}},emits:["formChange","annotationChange","scroll"],setup(e,{expose:ae,emit:ie}){const le=e,ne=H(),{nuiThemeOverrides:me}=z();Z();const de=o(),pe=t((()=>S(le.maxHeight)?le.maxHeight+"px":le.maxHeight)),{SchemaField:ue,businessCollector:ce,formItemDepsCollector:fe,changeContextCollector:he,formUUID:ye}=oe(le,ie),{anchorBarRef:je,currentAnchor:ge,updateAnchorList:be,anchorIdList:ke,onScroll:ve}=ee(le,ie,de,fe),{callLifeCycle:Fe}=P(le);r(T,Fe),Fe("onSetup");const{trigger:Ce}=W(),{observeFormGraph:He,setGraph:Se,removeGraph:xe}=M();r(U,He);const{lowCodeEventTrigger:Ae}=J(),Le=A({initialValues:le.initialData,effects(e){L("*",(o=>{const t=o.props.name.toString();ce.trigger(e,t),fe.trigger(t),ie("formChange",{fieldInstance:o,fieldKey:t,fieldName:o.title,value:o.value,context:he.getContext(t,o.value)}),Ae(o),Oe(t,o.value),we(t)})),O("*",Se),R("*",xe),le.linebarAutoHidden&&(w("*",Ce),B((e=>e.query("*").forEach(Ce)))),le.anchor&&w("*",be)}}),{lowCodeReactionsHandler:Oe,triggerAllReactionsHandler:Re}=$(t((()=>le.lowCodeReactions)),Le),{operationalFormHandler:we,triggerAllOperationalFormHandler:Be}=Q(t((()=>le.operationalForm)),Le);s(Re),s(Be);const{schemaAdaptor:_e}=X(ce);let Ve=le.fieldList||[];const De=t((()=>le.schema?le.schema:le.fieldList?(Ve=Y().traverse(x(le.fieldList),le.fieldVisitor),te(_e(Ve))):te({}))),{onKeydown:Ie}=G({formModel:Le,formRenderRef:de,props:le}),{clearSpan:Ne}=E();a((()=>Ne(ye)));const qe=K({formModel:Le,formRenderRef:de,formItemDepsCollector:fe,getFieldList:()=>Ve,formUUID:ye});return ae({formModel:Le,validate:(e="*")=>qe.validate(e),getFormValues:(e=!0)=>qe.getFormValues(e),async setFormValues(e,o=!0,t=!1,r=!0){t&&(ce.triggerLock=!0),qe.setFormValues(e,o,r),await i(),ce.triggerLock=!1},setFieldState(e,o){qe.setFieldState(e,o)},resetFields(e="*"){qe.resetFields(e)},queryWidget:async e=>qe.queryWidget(e),getFieldList:()=>Ve,async reload(){console.error("reload function is abstract,it should be overwrite!")}}),(o,t)=>(l(),n(m(D),{class:d(["form-render",{"form-render--no-border":!e.bordered,"form-render--underline":"underline"===e.bordered}]),"require-mark-placement":"left",style:p(m(ne))},{default:u((()=>[e.anchor?(l(),c("section",re,[f(m(I),{value:m(ge),"onUpdate:value":t[0]||(t[0]=e=>h(ge)?ge.value=e:null),type:"line",ref_key:"anchorBarRef",ref:je},{default:u((()=>[(l(!0),c(y,null,j(m(ke),(e=>(l(),n(m(N),{name:e.name,tab:e.title,key:e.name},null,8,["name","tab"])))),128))])),_:1},8,["value"])])):g("v-if",!0),f(m(q),{"theme-overrides":m(me)},{default:u((()=>[b("section",{class:"form-render__wrapper",style:p({"--column":e.column,"--form-height":m(pe)}),ref_key:"formRenderRef",ref:de,onScroll:t[1]||(t[1]=(...e)=>m(ve)&&m(ve)(...e)),onKeydownCapture:t[2]||(t[2]=k(v(((...e)=>m(Ie)&&m(Ie)(...e)),["prevent"]),["enter"]))},[f(m(_),{form:m(Le)},{default:u((()=>[f(m(ue),{schema:m(De)},null,8,["schema"]),e.consumer?(l(),n(m(V),{key:0},{default:u((({form:e})=>[b("div",se,F(JSON.stringify(e.values,null,2)),1)])),_:1})):g("v-if",!0),C(o.$slots,"default")])),_:3},8,["form"])],36)])),_:3},8,["theme-overrides"])])),_:3},8,["class","style"]))}});export{ae as default};
|
|
@@ -131,6 +131,9 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
131
131
|
lowCodeReactions: {
|
|
132
132
|
type: import("vue").PropType<import("../../../../es/components/form-render").FormLowCodeReactions.Config[]>;
|
|
133
133
|
};
|
|
134
|
+
operationalForm: {
|
|
135
|
+
type: import("vue").PropType<import("../../../../es/shared/types").FormOperationalConfig[]>;
|
|
136
|
+
};
|
|
134
137
|
linebarAutoHidden: {
|
|
135
138
|
type: BooleanConstructor;
|
|
136
139
|
};
|
|
@@ -268,6 +271,9 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
268
271
|
lowCodeReactions: {
|
|
269
272
|
type: import("vue").PropType<import("../../../../es/components/form-render").FormLowCodeReactions.Config[]>;
|
|
270
273
|
};
|
|
274
|
+
operationalForm: {
|
|
275
|
+
type: import("vue").PropType<import("../../../../es/shared/types").FormOperationalConfig[]>;
|
|
276
|
+
};
|
|
271
277
|
linebarAutoHidden: {
|
|
272
278
|
type: BooleanConstructor;
|
|
273
279
|
};
|
|
@@ -325,6 +331,8 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
325
331
|
}>;
|
|
326
332
|
lowCodeReactionsHandler: (field: string, value: unknown) => void;
|
|
327
333
|
triggerAllReactionsHandler: () => void;
|
|
334
|
+
operationalFormHandler: (field: string) => void;
|
|
335
|
+
triggerAllOperationalFormHandler: () => void;
|
|
328
336
|
schemaAdaptor: (fieldList: import("../../../../es/components/form-render").FieldItem[]) => Record<string, import("@formily/json-schema").Stringify<{
|
|
329
337
|
[key: symbol]: any;
|
|
330
338
|
[key: `x-${string}`]: any;
|
|
@@ -731,6 +739,9 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
731
739
|
lowCodeReactions: {
|
|
732
740
|
type: import("vue").PropType<import("../../../../es/components/form-render").FormLowCodeReactions.Config[]>;
|
|
733
741
|
};
|
|
742
|
+
operationalForm: {
|
|
743
|
+
type: import("vue").PropType<import("../../../../es/shared/types").FormOperationalConfig[]>;
|
|
744
|
+
};
|
|
734
745
|
linebarAutoHidden: {
|
|
735
746
|
type: BooleanConstructor;
|
|
736
747
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as r,computed as t,inject as o,watch as a,createVNode as n}from"vue";import{useVModel as u}from"@vueuse/core";import{isEqual as l,isArray as i,isString as s,isNumber as c,isEmpty as d,isFunction as v,omit as p,cloneDeep as f}from"lodash-es";import"../../../index.js";import{InjectionAsyncQueue as m}from"../../constants/index.js";import{useCommonInjection as y}from"../../hooks/useCommonInjection.js";import{formRenderLog as h}from"../../utils/index.js";import{connect as k,mapProps as j}from"@formily/vue";import g from"../../../../search-cascader/index.js";import w from"../../../../../shared/components/no-data/NoData.vue.js";import{assignUpdateValue as _
|
|
1
|
+
import{defineComponent as e,ref as r,computed as t,inject as o,watch as a,createVNode as n}from"vue";import{useVModel as u}from"@vueuse/core";import{isEqual as l,isArray as i,isString as s,isNumber as c,isEmpty as d,isFunction as v,omit as p,cloneDeep as f}from"lodash-es";import"../../../index.js";import{InjectionAsyncQueue as m}from"../../constants/index.js";import{useCommonInjection as y}from"../../hooks/useCommonInjection.js";import{formRenderLog as h}from"../../utils/index.js";import{connect as k,mapProps as j}from"@formily/vue";import g from"../../../../search-cascader/index.js";import w from"../../../../../shared/components/no-data/NoData.vue.js";import{assignUpdateValue as _}from"../../utils/schema.js";import{useFormField as b}from"../../hooks/useFormField.js";import{useFormRequest as F}from"../../hooks/useFormRequest.js";const K=k(e({name:"FormSearchCascade",props:{options:{type:Array,default:()=>[]},labelField:{type:String,default:"text"},valueField:{type:String,default:"value"},autograph:{type:String,required:!0},lazyRequest:{type:Boolean,default:!0},requestCache:{type:Boolean,default:!0},wordbook:{type:Object,required:!0},onChange:{},value:{type:[String,Array]}},emits:["update:value"],setup(e,{emit:k}){const j=u(e,"value",k),_=r(!1),K=r([]),{field:O,fieldKey:q}=b(),S=t((()=>{var r,t,o;return null!=(o=null==(t=null==(r=e.wordbook)?void 0:r.show_key)?void 0:t[0])?o:e.labelField})),x=t((()=>{var r,t;return null!=(t=null==(r=e.wordbook)?void 0:r.value_key)?t:e.valueField})),C=t((()=>{var r,t;return null==(t=null==(r=e.wordbook)?void 0:r.render_key)?void 0:t[0]})),L=t((()=>{var r;return(null==(r=e.wordbook)?void 0:r.level_num)||1/0})),V=o(m),{getSearchRequestInfo:A}=F(),I=r(150),P=r();async function R(r,t){var o;if(i(e.value)&&e.value.length&&!r&&!t){const[r,t]=function(e){if(!e.length)return[];const r=[(e=f(e))[0]];let t=e[0];for(let r=1;r<e.length;r++){const o=e[r];o&&(t.children=[o],o.parent=t,t=o)}return[e,r]}(e.value);K.value=t;const o=r[Math.max(0,r.length-2)];return await R(o),o}try{if(r&&!r.__keyword&&r.isLeaf)return a(r);if(null==r?void 0:r.__keyword){if(!s(r.id_link))return Promise.reject();const t=r.id_link.split("_").filter((e=>e));c(L.value)&&L.value!==1/0&&t.splice(L.value);const o=await async function(r){if(!A().primaryKeyUrl)return[];try{return await V.addAsync(t(e.wordbook,e.autograph,r,q.value))}catch(e){s(e)&&h(e)}function t(r,t,o,a){const n=A();return{key:a,params:{autograph:t,tableId:r.id,primaryKeyValue:o.join(","),page:1},...n,url:n.primaryKeyUrl,cache:e.requestCache}}}(t);if(!o)return Promise.reject();const{lastOption:a,options:n}=function(e,r){let t=e[0];return{options:r.reduce(((r,a,n)=>{const u=o(e,a);return 0===n?(t=u,[u]):(Object.assign(u,{parent:t,isLeaf:n+1>=L.value}),t.children=[u],t=u,r)}),[]),lastOption:t};function o(e,r){return e.find((e=>e[x.value]===r))}}(o,t);return n.length<L.value&&(await R(a),d(a.children))?(j.value=function(e,r){return r.map((r=>e.find((e=>e[x.value]===r))))}(o,t),_.value=!1,Promise.reject()):(K.value=n,a)}{const u=await V.addAsync(function(r,o,a,n,u){const l={autograph:()=>o,wordbookId:"id",wordbookType:"type",fieldKeys:()=>r.search_key?JSON.stringify(r.search_key):void 0,conObj:()=>JSON.stringify(function(e,r,t){return r?e.conObj||[]:t?[{con:"EQ",is_compare_field:!1,field_key:e.level_key,value:t[x.value]}]:e.conObjFirstLevel||[]}(r,t,n)),primaryKey:"primary_key",levelKey:"level_key",keyword:()=>t,page:()=>1},i=Object.entries(l).reduce(((e,[t,o])=>(e[t]=s(o)?r[o]:v(o)?o():void 0,e)),{});return{...A(),params:i,key:u,cache:e.requestCache}}(e.wordbook,e.autograph,O.value,r,q.value));if(r){if(!u.length)return a(r);r.children=u.map((e=>function(e,r,t){return{...e,parent:r,isLeaf:n(r)+1>=t}}(e,r,L.value)))}else K.value=u.map((e=>function(e,r){e.__keyword=!!r,e.isLeaf=!!r,r&&(e[S.value]=e[C.value||S.value]||e[S.value]);return e}(e,t))),I.value=t&&(null==(o=P.value)?void 0:o.getWidth())||150}}catch(e){s(e)&&h(e)}function a(e){return j.value=function(e){const r=[];let t=e;for(;t;)r.unshift(p(t,["parent","isLeaf","__keyword","children"])),t=t.parent;return r}(e),_.value=!1,Promise.reject()}function n(e){let r=1,t=e.parent;for(;t;)r++,t=t.parent;return r}}function U(){I.value=150}a((()=>e.wordbook),((r,t)=>{l(r,t)||(K.value=[],r&&(j.value||!e.lazyRequest)&&R())}),{immediate:!0});const{injectValueValidate:B,injectValueWatchFromEmpty:N,injectValueBindKey:W}=y();N(j,R),B(j);const z=W(j);return()=>n(g,{ref:P,value:j.value,"onUpdate:value":e=>j.value=e,show:_.value,"onUpdate:show":e=>_.value=e,options:K.value,key:z.value,labelKey:S.value,valueKey:x.value,search:R,onFocus:U,menuWidth:I.value},{empty:()=>n(w,null,null)})}}),j({dataSource:"options"},_));export{K as LEVEL_SEARCH_CASCADER};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FormOperationalConfig } from '../../../../../es/shared/types';
|
|
2
|
+
import { Form } from '@formily/core';
|
|
3
|
+
import { ComputedRef } from 'vue';
|
|
4
|
+
export declare function useOperationalForm(operationalForm: ComputedRef<FormOperationalConfig[] | undefined>, formModel: Form): {
|
|
5
|
+
operationalFormHandler: (field: string) => void;
|
|
6
|
+
triggerAllOperationalFormHandler: () => void;
|
|
7
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../../../../shared/utils/index.js";import{getOperationalFormHandler as s}from"../../../../shared/utils/business.js";function e(e,t){return s(e,(s=>t.getValuesIn(s)),((s,e)=>t.setValuesIn(s,e)))}export{e as useOperationalForm};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AsyncQueue } from '../../../../../es/shared/hooks';
|
|
2
|
-
import { AnyObject, LOW_CODE_VALUE_RELATION, UndefinedAble } from '../../../../../es/shared/types';
|
|
2
|
+
import { AnyObject, FormOperationalConfig, LOW_CODE_VALUE_RELATION, UndefinedAble } from '../../../../../es/shared/types';
|
|
3
3
|
import { DataField, Field, Form } from '@formily/core';
|
|
4
4
|
import { ISchema } from '@formily/json-schema/esm/types';
|
|
5
5
|
import { Component, FunctionalComponent } from 'vue';
|
|
@@ -84,6 +84,7 @@ export declare type FormRenderProps = Partial<{
|
|
|
84
84
|
linebarAutoHidden: boolean;
|
|
85
85
|
bordered: boolean | string;
|
|
86
86
|
uniqueCacheData: boolean;
|
|
87
|
+
operationalForm: FormOperationalConfig[];
|
|
87
88
|
}>;
|
|
88
89
|
export declare type FormBusinessFormatter = (payload: {
|
|
89
90
|
fieldKey: string;
|
|
@@ -901,6 +901,7 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
901
901
|
} | undefined;
|
|
902
902
|
maxCheckSize?: number | undefined;
|
|
903
903
|
disableHeader?: boolean | undefined;
|
|
904
|
+
useNCheckbox?: boolean | undefined;
|
|
904
905
|
} | undefined;
|
|
905
906
|
tooltipConfig?: {
|
|
906
907
|
showAll?: boolean | undefined;
|
|
@@ -2170,6 +2171,12 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
2170
2171
|
enable?: boolean | undefined;
|
|
2171
2172
|
usePreset?: boolean | undefined;
|
|
2172
2173
|
} | undefined;
|
|
2174
|
+
operationForm?: {
|
|
2175
|
+
operationFormParam: string[];
|
|
2176
|
+
operationalRule: string;
|
|
2177
|
+
operationalPrecision: string;
|
|
2178
|
+
operationalResult: string;
|
|
2179
|
+
}[] | undefined;
|
|
2173
2180
|
}>;
|
|
2174
2181
|
updateConfigRefDebounced: () => void;
|
|
2175
2182
|
updateConfigRef: () => void;
|
|
@@ -3379,6 +3386,7 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
3379
3386
|
} | undefined;
|
|
3380
3387
|
maxCheckSize?: number | undefined;
|
|
3381
3388
|
disableHeader?: boolean | undefined;
|
|
3389
|
+
useNCheckbox?: boolean | undefined;
|
|
3382
3390
|
} | undefined;
|
|
3383
3391
|
tooltipConfig?: {
|
|
3384
3392
|
showAll?: boolean | undefined;
|
|
@@ -4589,6 +4597,12 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
4589
4597
|
enable?: boolean | undefined;
|
|
4590
4598
|
usePreset?: boolean | undefined;
|
|
4591
4599
|
} | undefined;
|
|
4600
|
+
operationForm?: {
|
|
4601
|
+
operationFormParam: string[];
|
|
4602
|
+
operationalRule: string;
|
|
4603
|
+
operationalPrecision: string;
|
|
4604
|
+
operationalResult: string;
|
|
4605
|
+
}[] | undefined;
|
|
4592
4606
|
}>;
|
|
4593
4607
|
configChanged: boolean;
|
|
4594
4608
|
fieldChanged: boolean;
|
|
@@ -900,6 +900,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
900
900
|
} | undefined;
|
|
901
901
|
maxCheckSize?: number | undefined;
|
|
902
902
|
disableHeader?: boolean | undefined;
|
|
903
|
+
useNCheckbox?: boolean | undefined;
|
|
903
904
|
} | undefined;
|
|
904
905
|
tooltipConfig?: {
|
|
905
906
|
showAll?: boolean | undefined;
|
|
@@ -2169,6 +2170,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2169
2170
|
enable?: boolean | undefined;
|
|
2170
2171
|
usePreset?: boolean | undefined;
|
|
2171
2172
|
} | undefined;
|
|
2173
|
+
operationForm?: {
|
|
2174
|
+
operationFormParam: string[];
|
|
2175
|
+
operationalRule: string;
|
|
2176
|
+
operationalPrecision: string;
|
|
2177
|
+
operationalResult: string;
|
|
2178
|
+
}[] | undefined;
|
|
2172
2179
|
}>;
|
|
2173
2180
|
updateConfigRefDebounced: () => void;
|
|
2174
2181
|
updateConfigRef: () => void;
|
|
@@ -3378,6 +3385,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3378
3385
|
} | undefined;
|
|
3379
3386
|
maxCheckSize?: number | undefined;
|
|
3380
3387
|
disableHeader?: boolean | undefined;
|
|
3388
|
+
useNCheckbox?: boolean | undefined;
|
|
3381
3389
|
} | undefined;
|
|
3382
3390
|
tooltipConfig?: {
|
|
3383
3391
|
showAll?: boolean | undefined;
|
|
@@ -4588,6 +4596,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4588
4596
|
enable?: boolean | undefined;
|
|
4589
4597
|
usePreset?: boolean | undefined;
|
|
4590
4598
|
} | undefined;
|
|
4599
|
+
operationForm?: {
|
|
4600
|
+
operationFormParam: string[];
|
|
4601
|
+
operationalRule: string;
|
|
4602
|
+
operationalPrecision: string;
|
|
4603
|
+
operationalResult: string;
|
|
4604
|
+
}[] | undefined;
|
|
4591
4605
|
}>;
|
|
4592
4606
|
configChanged: boolean;
|
|
4593
4607
|
fieldChanged: boolean;
|
|
@@ -19,6 +19,7 @@ declare class ConfigHooks extends AbstractConfigHooks {
|
|
|
19
19
|
slots: import("vxe-table").VxeColumnPropTypes.Slots;
|
|
20
20
|
maxCheckSize: number;
|
|
21
21
|
disableHeader: boolean;
|
|
22
|
+
useNCheckbox: boolean;
|
|
22
23
|
}>) | undefined, IhoTableConfig, IhoTableHandlerContext<true>], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
23
24
|
readonly expandConfig: SyncWaterfallHook<[import("vxe-table").VxeTablePropTypes.ExpandConfig | undefined, IhoTableConfig, IhoTableHandlerContext<true>], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
24
25
|
readonly treeConfig: SyncWaterfallHook<[import("vxe-table").VxeTablePropTypes.TreeConfig | undefined, IhoTableConfig, IhoTableHandlerContext<true>], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|