cnhis-design-vue 3.1.54-beta.1 → 3.1.54-beta.11
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/body-select/src/hooks/renderCanvas.js +1 -1
- package/es/components/body-select/src/index.vue2.js +1 -1
- 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/ButtonPrint.vue.d.ts +1 -3
- package/es/components/callback/src/components/render/popupMaps.d.ts +47 -10
- package/es/components/expand-field/src/components/form.vue2.js +1 -1
- package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +1 -1
- package/es/components/fabric-chart/src/hooks/electrocardiogram/hooks/useDetailEvent.d.ts +21 -4
- package/es/components/fabric-chart/src/hooks/electrocardiogram/hooks/useDetailEvent.js +1 -1
- package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogram.js +1 -1
- package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogramChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/electrocardiogram/useMeasureInstrument.js +1 -1
- package/es/components/fabric-chart/src/hooks/index.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useOther.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useTop.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useCenter.d.ts +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useLeft.d.ts +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useLeft.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useOther.d.ts +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/useCumputedPoint.d.ts +8 -2
- package/es/components/fabric-chart/src/hooks/useCumputedPoint.js +1 -1
- package/es/components/form-config/index.d.ts +76 -58
- package/es/components/form-config/src/FormConfig.vue.d.ts +77 -59
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +19 -10
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +31 -22
- package/es/components/form-config/src/components/FormConfigEventSetting.vue.d.ts +12 -12
- package/es/components/form-config/src/constants/index.d.ts +4 -4
- package/es/components/form-config/src/types/index.d.ts +3 -3
- package/es/components/form-render/index.d.ts +19 -10
- package/es/components/form-render/src/FormRender.vue.d.ts +20 -11
- package/es/components/form-render/src/FormRender.vue2.js +1 -1
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +19 -10
- package/es/components/form-render/src/components/renderer/date.js +1 -1
- package/es/components/form-render/src/hooks/useBusinessBinding.d.ts +1 -1
- package/es/components/form-render/src/hooks/useBusinessBinding.js +1 -1
- package/es/components/form-render/src/hooks/useFieldNormalize.d.ts +4 -4
- package/es/components/form-render/src/hooks/useFormItemDeps.d.ts +1 -1
- package/es/components/form-render/src/hooks/useFormItemDeps.js +1 -1
- package/es/components/form-render/src/hooks/useFormRenderOptions.d.ts +2 -2
- package/es/components/form-render/src/hooks/useLowCodeReactions.d.ts +2 -2
- package/es/components/form-render/src/hooks/useOperationalForm.d.ts +7 -5
- package/es/components/form-render/src/hooks/useOperationalForm.js +1 -1
- package/es/components/form-render/src/hooks/useWordbookSetting.d.ts +1 -1
- package/es/components/form-render/src/hooks/useWordbookSetting.js +1 -1
- package/es/components/form-render/src/types/fieldItem.d.ts +3 -3
- package/es/components/form-render/src/types/index.d.ts +6 -6
- package/es/components/iho-table/index.d.ts +28 -0
- package/es/components/iho-table/src/IhoTable.vue.d.ts +28 -0
- package/es/components/iho-table/src/plugins/operationalFormPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue2.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.d.ts +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue2.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/defaultRendererPlugin.js +1 -1
- package/es/components/iho-table/src/types/index.d.ts +7 -5
- package/es/components/info-header/index.d.ts +48 -30
- package/es/components/info-header/src/InfoHeader.vue.d.ts +48 -30
- package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +2 -2
- package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +2 -2
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +21 -12
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +19 -10
- package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
- package/es/components/select-label/src/LabelFormContent.vue2.js +1 -1
- package/es/components/select-person/src/SearchMultiple.vue.d.ts +0 -6
- package/es/components/shortcut-setter/index.d.ts +21 -12
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +21 -12
- package/es/components/table-export-field/src/components/ExportModal.vue.d.ts +3 -0
- package/es/components/table-filter/src/components/classify-filter/hooks/useFilterConditions.js +1 -1
- package/es/components/table-filter/src/hooks/useAdvanced.js +1 -1
- package/es/env.d.ts +25 -25
- package/es/shared/assets/img/failure.png.js +1 -1
- package/es/shared/assets/img/no-permission.png.js +1 -1
- package/es/shared/assets/img/nodata.png.js +1 -1
- package/es/shared/assets/img/notfound.png.js +1 -1
- package/es/shared/assets/img/qr.png.js +1 -1
- package/es/shared/assets/img/success.png.js +1 -1
- package/es/shared/assets/img/video.png.js +1 -1
- package/es/shared/assets/img/video_default_cover.png.js +1 -1
- package/es/shared/assets/img/xb_big.png.js +1 -1
- package/es/shared/assets/img/xb_small.png.js +1 -1
- package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +86 -0
- package/es/shared/hooks/useLevelSearchCascader.d.ts +2 -2
- package/es/shared/package.json.js +1 -1
- package/es/shared/types/business.d.ts +61 -53
- package/es/shared/utils/business.d.ts +11 -7
- package/es/shared/utils/business.js +1 -1
- package/es/shared/utils/fabricjs/index.d.ts +6823 -0
- package/es/shared/utils/index.js +1 -1
- package/es/shared/utils/tapable/index.d.ts +139 -0
- package/package.json +2 -2
- package/es/components/fabric-chart/src/hooks/electrocardiogram/constants/index.d.ts +0 -2
- package/es/components/fabric-chart/src/hooks/electrocardiogram/constants/index.js +0 -1
|
@@ -93,11 +93,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
93
93
|
businessFormatter: import("../../../../../es/components/form-render").FormBusinessFormatter;
|
|
94
94
|
requestInstance: import("../../../../../es/components/index").FormRequestDefine.RequestInstance;
|
|
95
95
|
enterToNextWidget: boolean | ((fieldItem: FieldItem) => boolean | void);
|
|
96
|
-
lowCodeReactions: import("../../../../../es/shared/types").
|
|
96
|
+
lowCodeReactions: import("../../../../../es/shared/types").LowCodeTypes.reactionsConfig[];
|
|
97
97
|
linebarAutoHidden: boolean;
|
|
98
98
|
bordered: string | boolean;
|
|
99
99
|
uniqueCacheData: boolean;
|
|
100
|
-
operationalForm: import("../../../../../es/shared/types").
|
|
100
|
+
operationalForm: import("../../../../../es/shared/types").LowCodeTypes.operationalConfig[];
|
|
101
101
|
outBordered: boolean;
|
|
102
102
|
forceClearable: boolean;
|
|
103
103
|
}>>>;
|
|
@@ -195,11 +195,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
195
195
|
businessFormatter: import("../../../../../es/components/form-render").FormBusinessFormatter;
|
|
196
196
|
requestInstance: import("../../../../../es/components/index").FormRequestDefine.RequestInstance;
|
|
197
197
|
enterToNextWidget: boolean | ((fieldItem: FieldItem) => boolean | void);
|
|
198
|
-
lowCodeReactions: import("../../../../../es/shared/types").
|
|
198
|
+
lowCodeReactions: import("../../../../../es/shared/types").LowCodeTypes.reactionsConfig[];
|
|
199
199
|
linebarAutoHidden: boolean;
|
|
200
200
|
bordered: string | boolean;
|
|
201
201
|
uniqueCacheData: boolean;
|
|
202
|
-
operationalForm: import("../../../../../es/shared/types").
|
|
202
|
+
operationalForm: import("../../../../../es/shared/types").LowCodeTypes.operationalConfig[];
|
|
203
203
|
outBordered: boolean;
|
|
204
204
|
forceClearable: boolean;
|
|
205
205
|
}>>>;
|
|
@@ -328,12 +328,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
328
328
|
initialize_high?: number | undefined;
|
|
329
329
|
bindEventSetting?: {
|
|
330
330
|
[x: string]: unknown;
|
|
331
|
-
event_type: import("../../../../../es/shared/types").
|
|
331
|
+
event_type: import("../../../../../es/shared/types").LowCodeTypes.EVENT_TYPE;
|
|
332
332
|
event_field?: string | undefined;
|
|
333
333
|
params?: {
|
|
334
334
|
p_value?: string | undefined;
|
|
335
335
|
p_name: string;
|
|
336
|
-
p_select: import("../../../../../es/shared/types").
|
|
336
|
+
p_select: import("../../../../../es/shared/types").LowCodeTypes.VALUE_RELATION;
|
|
337
337
|
}[] | undefined;
|
|
338
338
|
results?: {
|
|
339
339
|
p_value: string;
|
|
@@ -2087,12 +2087,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2087
2087
|
initialize_high?: number | undefined;
|
|
2088
2088
|
bindEventSetting?: {
|
|
2089
2089
|
[x: string]: unknown;
|
|
2090
|
-
event_type: import("../../../../../es/shared/types").
|
|
2090
|
+
event_type: import("../../../../../es/shared/types").LowCodeTypes.EVENT_TYPE;
|
|
2091
2091
|
event_field?: string | undefined;
|
|
2092
2092
|
params?: {
|
|
2093
2093
|
p_value?: string | undefined;
|
|
2094
2094
|
p_name: string;
|
|
2095
|
-
p_select: import("../../../../../es/shared/types").
|
|
2095
|
+
p_select: import("../../../../../es/shared/types").LowCodeTypes.VALUE_RELATION;
|
|
2096
2096
|
}[] | undefined;
|
|
2097
2097
|
results?: {
|
|
2098
2098
|
p_value: string;
|
|
@@ -3819,12 +3819,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3819
3819
|
initialize_high?: number | undefined;
|
|
3820
3820
|
bindEventSetting?: {
|
|
3821
3821
|
[x: string]: unknown;
|
|
3822
|
-
event_type: import("../../../../../es/shared/types").
|
|
3822
|
+
event_type: import("../../../../../es/shared/types").LowCodeTypes.EVENT_TYPE;
|
|
3823
3823
|
event_field?: string | undefined;
|
|
3824
3824
|
params?: {
|
|
3825
3825
|
p_value?: string | undefined;
|
|
3826
3826
|
p_name: string;
|
|
3827
|
-
p_select: import("../../../../../es/shared/types").
|
|
3827
|
+
p_select: import("../../../../../es/shared/types").LowCodeTypes.VALUE_RELATION;
|
|
3828
3828
|
}[] | undefined;
|
|
3829
3829
|
results?: {
|
|
3830
3830
|
p_value: string;
|
|
@@ -5570,10 +5570,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
5570
5570
|
default: boolean;
|
|
5571
5571
|
};
|
|
5572
5572
|
lowCodeReactions: {
|
|
5573
|
-
type: PropType<import("../../../../../es/shared/types").
|
|
5573
|
+
type: PropType<import("../../../../../es/shared/types").LowCodeTypes.reactionsConfig[]>;
|
|
5574
5574
|
};
|
|
5575
5575
|
operationalForm: {
|
|
5576
|
-
type: PropType<import("../../../../../es/shared/types").
|
|
5576
|
+
type: PropType<import("../../../../../es/shared/types").LowCodeTypes.operationalConfig[]>;
|
|
5577
|
+
};
|
|
5578
|
+
dateOperationalForm: {
|
|
5579
|
+
type: PropType<import("../../../../../es/shared/types").LowCodeTypes.dateOperationalConfig[]>;
|
|
5577
5580
|
};
|
|
5578
5581
|
linebarAutoHidden: {
|
|
5579
5582
|
type: BooleanConstructor;
|
|
@@ -5719,10 +5722,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
5719
5722
|
default: boolean;
|
|
5720
5723
|
};
|
|
5721
5724
|
lowCodeReactions: {
|
|
5722
|
-
type: PropType<import("../../../../../es/shared/types").
|
|
5725
|
+
type: PropType<import("../../../../../es/shared/types").LowCodeTypes.reactionsConfig[]>;
|
|
5723
5726
|
};
|
|
5724
5727
|
operationalForm: {
|
|
5725
|
-
type: PropType<import("../../../../../es/shared/types").
|
|
5728
|
+
type: PropType<import("../../../../../es/shared/types").LowCodeTypes.operationalConfig[]>;
|
|
5729
|
+
};
|
|
5730
|
+
dateOperationalForm: {
|
|
5731
|
+
type: PropType<import("../../../../../es/shared/types").LowCodeTypes.dateOperationalConfig[]>;
|
|
5726
5732
|
};
|
|
5727
5733
|
linebarAutoHidden: {
|
|
5728
5734
|
type: BooleanConstructor;
|
|
@@ -5804,11 +5810,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
5804
5810
|
}>;
|
|
5805
5811
|
lowCodeReactionsHandler: (field: string) => void;
|
|
5806
5812
|
triggerAllReactionsHandler: () => void;
|
|
5807
|
-
operationalFormHandler: (
|
|
5813
|
+
operationalFormHandler: (fieldKey: string) => void;
|
|
5808
5814
|
triggerAllOperationalFormHandler: () => void;
|
|
5809
5815
|
wordbookSettingHandler: {
|
|
5810
5816
|
trigger: (fieldKey: string, value: unknown) => void;
|
|
5811
|
-
setDisabled: (value: boolean) => void;
|
|
5817
|
+
setDisabled: (value: string | boolean) => void;
|
|
5812
5818
|
};
|
|
5813
5819
|
schemaAdaptor: (fieldList: FieldItem[], options?: Partial<{
|
|
5814
5820
|
fieldList: FieldItem[];
|
|
@@ -5893,11 +5899,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
5893
5899
|
businessFormatter: import("../../../../../es/components/form-render").FormBusinessFormatter;
|
|
5894
5900
|
requestInstance: import("../../../../../es/components/index").FormRequestDefine.RequestInstance;
|
|
5895
5901
|
enterToNextWidget: boolean | ((fieldItem: FieldItem) => boolean | void);
|
|
5896
|
-
lowCodeReactions: import("../../../../../es/shared/types").
|
|
5902
|
+
lowCodeReactions: import("../../../../../es/shared/types").LowCodeTypes.reactionsConfig[];
|
|
5897
5903
|
linebarAutoHidden: boolean;
|
|
5898
5904
|
bordered: string | boolean;
|
|
5899
5905
|
uniqueCacheData: boolean;
|
|
5900
|
-
operationalForm: import("../../../../../es/shared/types").
|
|
5906
|
+
operationalForm: import("../../../../../es/shared/types").LowCodeTypes.operationalConfig[];
|
|
5901
5907
|
outBordered: boolean;
|
|
5902
5908
|
forceClearable: boolean;
|
|
5903
5909
|
}>) => Record<string, import("@formily/json-schema").Stringify<{
|
|
@@ -6311,10 +6317,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
6311
6317
|
default: boolean;
|
|
6312
6318
|
};
|
|
6313
6319
|
lowCodeReactions: {
|
|
6314
|
-
type: PropType<import("../../../../../es/shared/types").
|
|
6320
|
+
type: PropType<import("../../../../../es/shared/types").LowCodeTypes.reactionsConfig[]>;
|
|
6315
6321
|
};
|
|
6316
6322
|
operationalForm: {
|
|
6317
|
-
type: PropType<import("../../../../../es/shared/types").
|
|
6323
|
+
type: PropType<import("../../../../../es/shared/types").LowCodeTypes.operationalConfig[]>;
|
|
6324
|
+
};
|
|
6325
|
+
dateOperationalForm: {
|
|
6326
|
+
type: PropType<import("../../../../../es/shared/types").LowCodeTypes.dateOperationalConfig[]>;
|
|
6318
6327
|
};
|
|
6319
6328
|
linebarAutoHidden: {
|
|
6320
6329
|
type: BooleanConstructor;
|
|
@@ -6445,11 +6454,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
6445
6454
|
businessFormatter: import("../../../../../es/components/form-render").FormBusinessFormatter;
|
|
6446
6455
|
requestInstance: import("../../../../../es/components/index").FormRequestDefine.RequestInstance;
|
|
6447
6456
|
enterToNextWidget: boolean | ((fieldItem: FieldItem) => boolean | void);
|
|
6448
|
-
lowCodeReactions: import("../../../../../es/shared/types").
|
|
6457
|
+
lowCodeReactions: import("../../../../../es/shared/types").LowCodeTypes.reactionsConfig[];
|
|
6449
6458
|
linebarAutoHidden: boolean;
|
|
6450
6459
|
bordered: string | boolean;
|
|
6451
6460
|
uniqueCacheData: boolean;
|
|
6452
|
-
operationalForm: import("../../../../../es/shared/types").
|
|
6461
|
+
operationalForm: import("../../../../../es/shared/types").LowCodeTypes.operationalConfig[];
|
|
6453
6462
|
outBordered: boolean;
|
|
6454
6463
|
forceClearable: boolean;
|
|
6455
6464
|
}>>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { LowCodeTypes } from '../../../../../es/shared/types';
|
|
2
2
|
import { FormConfigItem } from '../../../../../es/components/form-config';
|
|
3
3
|
declare const _default: import("vue").DefineComponent<{
|
|
4
4
|
modelValue: {
|
|
@@ -8,13 +8,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
8
8
|
};
|
|
9
9
|
}, {
|
|
10
10
|
props: {
|
|
11
|
-
modelValue:
|
|
11
|
+
modelValue: LowCodeTypes.reactionsConfig[];
|
|
12
12
|
};
|
|
13
13
|
emit: (event: "update:modelValue" | "validateFailure", ...args: any[]) => void;
|
|
14
14
|
cssVars: import("vue").ComputedRef<import("vue").CSSProperties>;
|
|
15
15
|
valueRef: import("vue").Ref<{
|
|
16
16
|
conObj: {
|
|
17
|
-
con:
|
|
17
|
+
con: LowCodeTypes.VALUE_RELATION;
|
|
18
18
|
field_key: string;
|
|
19
19
|
value: unknown;
|
|
20
20
|
}[];
|
|
@@ -43,17 +43,17 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
43
43
|
expandedName: import("vue").Ref<string>;
|
|
44
44
|
addConnection: () => void;
|
|
45
45
|
removeConnection: (index: number) => void;
|
|
46
|
-
getOppositeBtnText: (item:
|
|
47
|
-
unBindOpposite: (item:
|
|
48
|
-
addOppositeCondition: (item:
|
|
46
|
+
getOppositeBtnText: (item: LowCodeTypes.reactionsConfig) => string | undefined;
|
|
47
|
+
unBindOpposite: (item: LowCodeTypes.reactionsConfig) => void;
|
|
48
|
+
addOppositeCondition: (item: LowCodeTypes.reactionsConfig) => void;
|
|
49
49
|
getOppositeSqlExpression: (expression?: string) => string | undefined;
|
|
50
|
-
createOppositeCondition: (config:
|
|
51
|
-
isOppositeConfig: (c1:
|
|
50
|
+
createOppositeCondition: (config: LowCodeTypes.reactionsConfig) => LowCodeTypes.reactionsConfig;
|
|
51
|
+
isOppositeConfig: (c1: LowCodeTypes.reactionsConfig, c2: LowCodeTypes.reactionsConfig) => boolean;
|
|
52
52
|
onUpdateExpandedNames: (value: string[]) => void;
|
|
53
53
|
getBinderFieldDesc: (index: number) => string;
|
|
54
|
-
addCondition: (config:
|
|
55
|
-
removeCondition: (config:
|
|
56
|
-
onUpdateConditionType: (condition:
|
|
54
|
+
addCondition: (config: LowCodeTypes.reactionsConfig) => void;
|
|
55
|
+
removeCondition: (config: LowCodeTypes.reactionsConfig, index: number) => void;
|
|
56
|
+
onUpdateConditionType: (condition: LowCodeTypes.reactionsConObj, type: LowCodeTypes.VALUE_RELATION) => void;
|
|
57
57
|
showRef: import("vue").Ref<boolean>;
|
|
58
58
|
fieldListRef: import("vue").Ref<FormConfigItem[]>;
|
|
59
59
|
fieldOptions: import("vue").ComputedRef<FormConfigItem[]>;
|
|
@@ -111,7 +111,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
111
111
|
NTooltip: any;
|
|
112
112
|
NIcon: any;
|
|
113
113
|
conditionTypeOptions: {
|
|
114
|
-
value:
|
|
114
|
+
value: LowCodeTypes.VALUE_RELATION;
|
|
115
115
|
label: string;
|
|
116
116
|
}[];
|
|
117
117
|
connectionTypeOptions: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { LowCodeTypes, UndefinedAble } from '../../../../../es/shared/types';
|
|
2
2
|
import { InjectionKey, Ref } from 'vue';
|
|
3
3
|
import { FormConfigItem } from '../../../../../es/components/form-config';
|
|
4
4
|
export declare const WidgetTextMap: Map<string, string>;
|
|
@@ -77,9 +77,9 @@ export declare function isVisibleOptionConfig(): {
|
|
|
77
77
|
value: boolean;
|
|
78
78
|
};
|
|
79
79
|
};
|
|
80
|
-
export declare const conditionOppositeMap: Record<
|
|
80
|
+
export declare const conditionOppositeMap: Record<LowCodeTypes.VALUE_RELATION, LowCodeTypes.VALUE_RELATION>;
|
|
81
81
|
export declare const conditionTypeOptions: {
|
|
82
|
-
value:
|
|
82
|
+
value: LowCodeTypes.VALUE_RELATION;
|
|
83
83
|
label: string;
|
|
84
84
|
}[];
|
|
85
85
|
export declare const connectionTypeOppositeMap: {
|
|
@@ -97,6 +97,6 @@ export declare const connectionTypeOptions: {
|
|
|
97
97
|
export declare const FORM_CONFIG_GROUP = "__display";
|
|
98
98
|
export declare const InjectionFieldList: InjectionKey<Ref<FormConfigItem[]>>;
|
|
99
99
|
export declare const InjectionMaterialList: InjectionKey<Ref<FormConfigItem[]>>;
|
|
100
|
-
export declare const InjectionLowCodeReactions: InjectionKey<Ref<
|
|
100
|
+
export declare const InjectionLowCodeReactions: InjectionKey<Ref<LowCodeTypes.reactionsConfig[]>>;
|
|
101
101
|
export declare const InjectionActiveFieldItem: InjectionKey<Ref<UndefinedAble<FormConfigItem>>>;
|
|
102
102
|
export declare const InjectionFormConfigEmit: InjectionKey<(event: 'addItem' | 'removeItem', ...args: unknown[]) => void>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Component, FunctionalComponent } from 'vue';
|
|
2
|
-
import { ArrayAble,
|
|
2
|
+
import { ArrayAble, LowCodeTypes } from '../../../../../es/shared/types';
|
|
3
3
|
import { FieldItem } from '../../../../../es/components/form-render';
|
|
4
4
|
interface Matcher {
|
|
5
5
|
(type: string): boolean;
|
|
@@ -37,11 +37,11 @@ export interface FormConfigTextFormatter {
|
|
|
37
37
|
}
|
|
38
38
|
export interface FormConfigExpose {
|
|
39
39
|
loadData(payload: Record<'fieldList', FormConfigItem[]> & {
|
|
40
|
-
lowCodeReactions?:
|
|
40
|
+
lowCodeReactions?: LowCodeTypes.reactionsConfig[];
|
|
41
41
|
}): void;
|
|
42
42
|
validate(): Promise<unknown>;
|
|
43
43
|
getData(withOriginalSetting?: boolean): Record<'fieldList' | 'materialList', FormConfigItem[]> & {
|
|
44
|
-
lowCodeReactions:
|
|
44
|
+
lowCodeReactions: LowCodeTypes.reactionsConfig[];
|
|
45
45
|
};
|
|
46
46
|
clearExtraList(): void;
|
|
47
47
|
}
|
|
@@ -135,10 +135,13 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{}, {
|
|
|
135
135
|
default: boolean;
|
|
136
136
|
};
|
|
137
137
|
lowCodeReactions: {
|
|
138
|
-
type: import("vue").PropType<import("../../../es/shared/types").
|
|
138
|
+
type: import("vue").PropType<import("../../../es/shared/types").LowCodeTypes.reactionsConfig[]>;
|
|
139
139
|
};
|
|
140
140
|
operationalForm: {
|
|
141
|
-
type: import("vue").PropType<import("../../../es/shared/types").
|
|
141
|
+
type: import("vue").PropType<import("../../../es/shared/types").LowCodeTypes.operationalConfig[]>;
|
|
142
|
+
};
|
|
143
|
+
dateOperationalForm: {
|
|
144
|
+
type: import("vue").PropType<import("../../../es/shared/types").LowCodeTypes.dateOperationalConfig[]>;
|
|
142
145
|
};
|
|
143
146
|
linebarAutoHidden: {
|
|
144
147
|
type: BooleanConstructor;
|
|
@@ -284,10 +287,13 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{}, {
|
|
|
284
287
|
default: boolean;
|
|
285
288
|
};
|
|
286
289
|
lowCodeReactions: {
|
|
287
|
-
type: import("vue").PropType<import("../../../es/shared/types").
|
|
290
|
+
type: import("vue").PropType<import("../../../es/shared/types").LowCodeTypes.reactionsConfig[]>;
|
|
288
291
|
};
|
|
289
292
|
operationalForm: {
|
|
290
|
-
type: import("vue").PropType<import("../../../es/shared/types").
|
|
293
|
+
type: import("vue").PropType<import("../../../es/shared/types").LowCodeTypes.operationalConfig[]>;
|
|
294
|
+
};
|
|
295
|
+
dateOperationalForm: {
|
|
296
|
+
type: import("vue").PropType<import("../../../es/shared/types").LowCodeTypes.dateOperationalConfig[]>;
|
|
291
297
|
};
|
|
292
298
|
linebarAutoHidden: {
|
|
293
299
|
type: BooleanConstructor;
|
|
@@ -369,11 +375,11 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{}, {
|
|
|
369
375
|
}>;
|
|
370
376
|
lowCodeReactionsHandler: (field: string) => void;
|
|
371
377
|
triggerAllReactionsHandler: () => void;
|
|
372
|
-
operationalFormHandler: (
|
|
378
|
+
operationalFormHandler: (fieldKey: string) => void;
|
|
373
379
|
triggerAllOperationalFormHandler: () => void;
|
|
374
380
|
wordbookSettingHandler: {
|
|
375
381
|
trigger: (fieldKey: string, value: unknown) => void;
|
|
376
|
-
setDisabled: (value: boolean) => void;
|
|
382
|
+
setDisabled: (value: string | boolean) => void;
|
|
377
383
|
};
|
|
378
384
|
schemaAdaptor: (fieldList: import("./src/types").FieldItem[], options?: Partial<{
|
|
379
385
|
fieldList: import("./src/types").FieldItem[];
|
|
@@ -458,11 +464,11 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{}, {
|
|
|
458
464
|
businessFormatter: import("./src/types").FormBusinessFormatter;
|
|
459
465
|
requestInstance: import("..").FormRequestDefine.RequestInstance;
|
|
460
466
|
enterToNextWidget: boolean | ((fieldItem: import("./src/types").FieldItem) => boolean | void);
|
|
461
|
-
lowCodeReactions: import("../../../es/shared/types").
|
|
467
|
+
lowCodeReactions: import("../../../es/shared/types").LowCodeTypes.reactionsConfig[];
|
|
462
468
|
linebarAutoHidden: boolean;
|
|
463
469
|
bordered: string | boolean;
|
|
464
470
|
uniqueCacheData: boolean;
|
|
465
|
-
operationalForm: import("../../../es/shared/types").
|
|
471
|
+
operationalForm: import("../../../es/shared/types").LowCodeTypes.operationalConfig[];
|
|
466
472
|
outBordered: boolean;
|
|
467
473
|
forceClearable: boolean;
|
|
468
474
|
}>) => Record<string, import("@formily/json-schema").Stringify<{
|
|
@@ -876,10 +882,13 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{}, {
|
|
|
876
882
|
default: boolean;
|
|
877
883
|
};
|
|
878
884
|
lowCodeReactions: {
|
|
879
|
-
type: import("vue").PropType<import("../../../es/shared/types").
|
|
885
|
+
type: import("vue").PropType<import("../../../es/shared/types").LowCodeTypes.reactionsConfig[]>;
|
|
880
886
|
};
|
|
881
887
|
operationalForm: {
|
|
882
|
-
type: import("vue").PropType<import("../../../es/shared/types").
|
|
888
|
+
type: import("vue").PropType<import("../../../es/shared/types").LowCodeTypes.operationalConfig[]>;
|
|
889
|
+
};
|
|
890
|
+
dateOperationalForm: {
|
|
891
|
+
type: import("vue").PropType<import("../../../es/shared/types").LowCodeTypes.dateOperationalConfig[]>;
|
|
883
892
|
};
|
|
884
893
|
linebarAutoHidden: {
|
|
885
894
|
type: BooleanConstructor;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FormRequestDefine, useVersion } from '../../../../es/shared/hooks';
|
|
2
|
-
import { AnyObject,
|
|
2
|
+
import { AnyObject, LowCodeTypes } from '../../../../es/shared/types';
|
|
3
3
|
import { Field } from '@formily/core';
|
|
4
4
|
import { Component, FunctionalComponent, PropType } from 'vue';
|
|
5
5
|
import { FieldItem, FieldVisitor, FormBusinessFormatter } from './types';
|
|
@@ -130,10 +130,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
130
130
|
default: boolean;
|
|
131
131
|
};
|
|
132
132
|
lowCodeReactions: {
|
|
133
|
-
type: PropType<
|
|
133
|
+
type: PropType<LowCodeTypes.reactionsConfig[]>;
|
|
134
134
|
};
|
|
135
135
|
operationalForm: {
|
|
136
|
-
type: PropType<
|
|
136
|
+
type: PropType<LowCodeTypes.operationalConfig[]>;
|
|
137
|
+
};
|
|
138
|
+
dateOperationalForm: {
|
|
139
|
+
type: PropType<LowCodeTypes.dateOperationalConfig[]>;
|
|
137
140
|
};
|
|
138
141
|
linebarAutoHidden: {
|
|
139
142
|
type: BooleanConstructor;
|
|
@@ -279,10 +282,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
279
282
|
default: boolean;
|
|
280
283
|
};
|
|
281
284
|
lowCodeReactions: {
|
|
282
|
-
type: PropType<
|
|
285
|
+
type: PropType<LowCodeTypes.reactionsConfig[]>;
|
|
283
286
|
};
|
|
284
287
|
operationalForm: {
|
|
285
|
-
type: PropType<
|
|
288
|
+
type: PropType<LowCodeTypes.operationalConfig[]>;
|
|
289
|
+
};
|
|
290
|
+
dateOperationalForm: {
|
|
291
|
+
type: PropType<LowCodeTypes.dateOperationalConfig[]>;
|
|
286
292
|
};
|
|
287
293
|
linebarAutoHidden: {
|
|
288
294
|
type: BooleanConstructor;
|
|
@@ -364,11 +370,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
364
370
|
}>;
|
|
365
371
|
lowCodeReactionsHandler: (field: string) => void;
|
|
366
372
|
triggerAllReactionsHandler: () => void;
|
|
367
|
-
operationalFormHandler: (
|
|
373
|
+
operationalFormHandler: (fieldKey: string) => void;
|
|
368
374
|
triggerAllOperationalFormHandler: () => void;
|
|
369
375
|
wordbookSettingHandler: {
|
|
370
376
|
trigger: (fieldKey: string, value: unknown) => void;
|
|
371
|
-
setDisabled: (value: boolean) => void;
|
|
377
|
+
setDisabled: (value: string | boolean) => void;
|
|
372
378
|
};
|
|
373
379
|
schemaAdaptor: (fieldList: FieldItem[], options?: Partial<{
|
|
374
380
|
fieldList: FieldItem[];
|
|
@@ -453,11 +459,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
453
459
|
businessFormatter: FormBusinessFormatter;
|
|
454
460
|
requestInstance: FormRequestDefine.RequestInstance;
|
|
455
461
|
enterToNextWidget: boolean | ((fieldItem: FieldItem) => boolean | void);
|
|
456
|
-
lowCodeReactions:
|
|
462
|
+
lowCodeReactions: LowCodeTypes.reactionsConfig[];
|
|
457
463
|
linebarAutoHidden: boolean;
|
|
458
464
|
bordered: string | boolean;
|
|
459
465
|
uniqueCacheData: boolean;
|
|
460
|
-
operationalForm:
|
|
466
|
+
operationalForm: LowCodeTypes.operationalConfig[];
|
|
461
467
|
outBordered: boolean;
|
|
462
468
|
forceClearable: boolean;
|
|
463
469
|
}>) => Record<string, import("@formily/vue").Stringify<{
|
|
@@ -871,10 +877,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
871
877
|
default: boolean;
|
|
872
878
|
};
|
|
873
879
|
lowCodeReactions: {
|
|
874
|
-
type: PropType<
|
|
880
|
+
type: PropType<LowCodeTypes.reactionsConfig[]>;
|
|
875
881
|
};
|
|
876
882
|
operationalForm: {
|
|
877
|
-
type: PropType<
|
|
883
|
+
type: PropType<LowCodeTypes.operationalConfig[]>;
|
|
884
|
+
};
|
|
885
|
+
dateOperationalForm: {
|
|
886
|
+
type: PropType<LowCodeTypes.dateOperationalConfig[]>;
|
|
878
887
|
};
|
|
879
888
|
linebarAutoHidden: {
|
|
880
889
|
type: BooleanConstructor;
|
|
@@ -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,mergeProps as d,withCtx as p,createElementBlock as u,createVNode as c,isRef as f,Fragment as h,renderList as y,createCommentVNode as g,createElementVNode 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,mergeProps as d,withCtx as p,createElementBlock as u,createVNode as c,isRef as f,Fragment as h,renderList as y,createCommentVNode as g,createElementVNode as b,normalizeStyle as j,withKeys as v,toDisplayString as k,renderSlot as C}from"vue";import{useTheme as F}from"../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import{isNumber as S,cloneDeep as H,isObject as A,isBoolean as x}from"lodash-es";import"@vue/shared";import"../../../shared/utils/index.js";import"@vueuse/shared";import"../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import{NForm as O,NTabs as B,NTabPane as L,NConfigProvider as R}from"naive-ui";import{useVersion as D}from"../../../shared/hooks/useVersion.js";import{createForm as w,onFormMount as V,onFieldValueChange as _,onFieldMount as I,onFieldUnmount as N,onFieldReact as W}from"@formily/core";import{Path as q}from"@formily/path";import{FormProvider as E,FormConsumer as K}from"@formily/vue";import{InjectionFormLifeCycleCaller as T,InjectionFormGraph as U}from"./constants/index.js";import{useAutoHidden as G}from"./hooks/useAutoHidden.js";import{useComplexOptionsSpan as M}from"./hooks/useComplexOptions.js";import{useFormDomEvent as P,useFormExposeEvent as J}from"./hooks/useFormEvent.js";import{useFormGraph as $}from"./hooks/useFormGraph.js";import{useFormRenderLifeCycle as z}from"./hooks/useFormRenderLifeCycle.js";import{useLowCodeEvent as Q}from"./hooks/useLowCodeEvent.js";import{useLowCodeReactions as X}from"./hooks/useLowCodeReactions.js";import{useNuiThemeOverrides as Y}from"./hooks/useNuiThemeOverrides.js";import{useOperationalForm as Z}from"./hooks/useOperationalForm.js";import{useWordbookSetting as ee}from"./hooks/useWordbookSetting.js";import"../index.js";import{createObjSchema as oe}from"./utils/schema.js";import{useFieldListAdaptor as te}from"./hooks/useFieldListAdaptor.js";import{useFieldVisitor as re}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 se}from"./hooks/useFormValidator.js";import{useAnchor as ae}from"./hooks/useAnchor.js";import{useFormContext as ie}from"./hooks/useFormContext.js";const le={key:0,style:{height:"54px"}},ne={style:{"white-space":"pre"}};var me=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:Array},dateOperationalForm:{type:Object},linebarAutoHidden:{type:Boolean},bordered:{type:[Boolean,String],default:!0},outBordered:{type:Boolean,default:!1},uniqueCacheData:{type:Boolean,default:!1},forceClearable:Boolean},emits:["formChange","annotationChange","scroll"],setup(e,{expose:me,emit:de}){const pe=e,ue=F(),{nuiThemeOverrides:ce}=Y();se();const fe=o(),he=t((()=>S(pe.maxHeight)?pe.maxHeight+"px":pe.maxHeight)),{SchemaField:ye,businessCollector:ge,formItemDepsCollector:be,changeContextCollector:je,formUUID:ve}=ie(pe,de),{anchorBarRef:ke,currentAnchor:Ce,updateAnchorList:Fe,anchorIdList:Se,onScroll:He}=ae(pe,de,fe,be),{callLifeCycle:Ae}=z(pe);r(T,Ae),Ae("onSetup");const{trigger:xe}=G(),{observeFormGraph:Oe,setGraph:Be,removeGraph:Le}=$();r(U,Oe);const{lowCodeEventTrigger:Re}=Q(),De=w({initialValues:pe.initialData,effects(e){const o={};V((()=>{Object.assign(o,H(e.values))})),_("*",(t=>{const r=q.getIn(o,t.path);q.setIn(o,t.path,t.value);const s=t.props.name.toString();ge.trigger(e,s),be.trigger(s),de("formChange",{fieldInstance:t,fieldKey:s,oldValue:r,fieldName:t.title,value:t.value,context:je.getContext(s,t.value)}),Re(t),we(s),_e(s),Ne.trigger(s,t.value)})),I("*",Be),N("*",Le),pe.linebarAutoHidden&&(W("*",xe),V((e=>e.query("*").forEach(xe)))),pe.anchor&&W("*",Fe)}}),{lowCodeReactionsHandler:we,triggerAllReactionsHandler:Ve}=X(t((()=>pe.lowCodeReactions)),De),{operationalFormHandler:_e,triggerAllOperationalFormHandler:Ie}=Z(pe,De),Ne=ee(De,je);s(Ve),s(Ie);const{schemaAdaptor:We}=te(ge,pe.lifeCycle);let qe=pe.fieldList||[];const Ee=t((()=>pe.schema?pe.schema:pe.fieldList?(qe=re().traverse(H(pe.fieldList),pe.fieldVisitor),oe(We(qe,pe))):oe({}))),{onKeydown:Ke}=P({formModel:De,formRenderRef:fe,props:pe}),{clearSpan:Te}=M();a((()=>Te(ve)));const Ue=J({formModel:De,formRenderRef:fe,formItemDepsCollector:be,getFieldList:()=>qe,formUUID:ve});return me({formModel:De,validate:(e="*",o={})=>Ue.validate(e,o),getFormValues:(e=!0)=>Ue.getFormValues(e),async setFormValues(e,o={},t=!1,r=!0){var s,a,l,n,m;let d=!0,p=!0,u=!0;A(o)?(p=null==(s=o.needSplitExtendKey)||s,d=null==(a=o.avoidDependKeyConnection)||a,t=null!=(l=o.avoidBusinessConnection)&&l,u=null==(n=o.avoidWordbookSettingConnection)||n,r=null==(m=o.overwrite)||m):x(o)&&(p=o),t&&(ge.triggerDisabled=t),d&&(be.triggerDisabled=d),u&&Ne.setDisabled(u),Ue.setFormValues(e,p,r),await i(),ge.triggerDisabled=!1,be.triggerDisabled=!1,Ne.setDisabled(!1)},setFieldState(e,o){Ue.setFieldState(e,o)},resetFields(e="*"){Ue.resetFields(e)},queryWidget:async e=>Ue.queryWidget(e),getFieldList:()=>qe,async reload(){console.error("reload function is abstract,it should be overwrite!")}}),(o,t)=>(l(),n(m(O),d({class:["form-render",{"form-render--out-border":e.outBordered}],"require-mark-placement":"left",style:m(ue)},m(D)()),{default:p((()=>[e.anchor?(l(),u("section",le,[c(m(B),{value:m(Ce),"onUpdate:value":t[0]||(t[0]=e=>f(Ce)?Ce.value=e:null),type:"line",ref_key:"anchorBarRef",ref:ke},{default:p((()=>[(l(!0),u(h,null,y(m(Se),(e=>(l(),n(m(L),{name:e.name,tab:e.title,key:e.name},null,8,["name","tab"])))),128))])),_:1},8,["value"])])):g("v-if",!0),c(m(R),{"theme-overrides":m(ce)},{default:p((()=>[b("section",{class:"form-render__wrapper",style:j({"--column":e.column,"--form-height":m(he)}),ref_key:"formRenderRef",ref:fe,onScroll:t[1]||(t[1]=(...e)=>m(He)&&m(He)(...e)),onKeydownCapture:t[2]||(t[2]=v(((...e)=>m(Ke)&&m(Ke)(...e)),["enter"]))},[c(m(E),{form:m(De)},{default:p((()=>[c(m(ye),{schema:m(Ee)},null,8,["schema"]),e.consumer?(l(),n(m(K),{key:0},{default:p((({form:e})=>[b("div",ne,k(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},16,["class","style"]))}});export{me as default};
|
|
@@ -133,10 +133,13 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
133
133
|
default: boolean;
|
|
134
134
|
};
|
|
135
135
|
lowCodeReactions: {
|
|
136
|
-
type: import("vue").PropType<import("../../../../es/shared/types").
|
|
136
|
+
type: import("vue").PropType<import("../../../../es/shared/types").LowCodeTypes.reactionsConfig[]>;
|
|
137
137
|
};
|
|
138
138
|
operationalForm: {
|
|
139
|
-
type: import("vue").PropType<import("../../../../es/shared/types").
|
|
139
|
+
type: import("vue").PropType<import("../../../../es/shared/types").LowCodeTypes.operationalConfig[]>;
|
|
140
|
+
};
|
|
141
|
+
dateOperationalForm: {
|
|
142
|
+
type: import("vue").PropType<import("../../../../es/shared/types").LowCodeTypes.dateOperationalConfig[]>;
|
|
140
143
|
};
|
|
141
144
|
linebarAutoHidden: {
|
|
142
145
|
type: BooleanConstructor;
|
|
@@ -282,10 +285,13 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
282
285
|
default: boolean;
|
|
283
286
|
};
|
|
284
287
|
lowCodeReactions: {
|
|
285
|
-
type: import("vue").PropType<import("../../../../es/shared/types").
|
|
288
|
+
type: import("vue").PropType<import("../../../../es/shared/types").LowCodeTypes.reactionsConfig[]>;
|
|
286
289
|
};
|
|
287
290
|
operationalForm: {
|
|
288
|
-
type: import("vue").PropType<import("../../../../es/shared/types").
|
|
291
|
+
type: import("vue").PropType<import("../../../../es/shared/types").LowCodeTypes.operationalConfig[]>;
|
|
292
|
+
};
|
|
293
|
+
dateOperationalForm: {
|
|
294
|
+
type: import("vue").PropType<import("../../../../es/shared/types").LowCodeTypes.dateOperationalConfig[]>;
|
|
289
295
|
};
|
|
290
296
|
linebarAutoHidden: {
|
|
291
297
|
type: BooleanConstructor;
|
|
@@ -367,11 +373,11 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
367
373
|
}>;
|
|
368
374
|
lowCodeReactionsHandler: (field: string) => void;
|
|
369
375
|
triggerAllReactionsHandler: () => void;
|
|
370
|
-
operationalFormHandler: (
|
|
376
|
+
operationalFormHandler: (fieldKey: string) => void;
|
|
371
377
|
triggerAllOperationalFormHandler: () => void;
|
|
372
378
|
wordbookSettingHandler: {
|
|
373
379
|
trigger: (fieldKey: string, value: unknown) => void;
|
|
374
|
-
setDisabled: (value: boolean) => void;
|
|
380
|
+
setDisabled: (value: string | boolean) => void;
|
|
375
381
|
};
|
|
376
382
|
schemaAdaptor: (fieldList: import("../../../../es/components/form-render").FieldItem[], options?: Partial<{
|
|
377
383
|
fieldList: import("../../../../es/components/form-render").FieldItem[];
|
|
@@ -456,11 +462,11 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
456
462
|
businessFormatter: import("../../../../es/components/form-render").FormBusinessFormatter;
|
|
457
463
|
requestInstance: import("../..").FormRequestDefine.RequestInstance;
|
|
458
464
|
enterToNextWidget: boolean | ((fieldItem: import("../../../../es/components/form-render").FieldItem) => boolean | void);
|
|
459
|
-
lowCodeReactions: import("../../../../es/shared/types").
|
|
465
|
+
lowCodeReactions: import("../../../../es/shared/types").LowCodeTypes.reactionsConfig[];
|
|
460
466
|
linebarAutoHidden: boolean;
|
|
461
467
|
bordered: string | boolean;
|
|
462
468
|
uniqueCacheData: boolean;
|
|
463
|
-
operationalForm: import("../../../../es/shared/types").
|
|
469
|
+
operationalForm: import("../../../../es/shared/types").LowCodeTypes.operationalConfig[];
|
|
464
470
|
outBordered: boolean;
|
|
465
471
|
forceClearable: boolean;
|
|
466
472
|
}>) => Record<string, import("@formily/json-schema").Stringify<{
|
|
@@ -874,10 +880,13 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
874
880
|
default: boolean;
|
|
875
881
|
};
|
|
876
882
|
lowCodeReactions: {
|
|
877
|
-
type: import("vue").PropType<import("../../../../es/shared/types").
|
|
883
|
+
type: import("vue").PropType<import("../../../../es/shared/types").LowCodeTypes.reactionsConfig[]>;
|
|
878
884
|
};
|
|
879
885
|
operationalForm: {
|
|
880
|
-
type: import("vue").PropType<import("../../../../es/shared/types").
|
|
886
|
+
type: import("vue").PropType<import("../../../../es/shared/types").LowCodeTypes.operationalConfig[]>;
|
|
887
|
+
};
|
|
888
|
+
dateOperationalForm: {
|
|
889
|
+
type: import("vue").PropType<import("../../../../es/shared/types").LowCodeTypes.dateOperationalConfig[]>;
|
|
881
890
|
};
|
|
882
891
|
linebarAutoHidden: {
|
|
883
892
|
type: BooleanConstructor;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,computed as t,watch as a,ref as o,onMounted as
|
|
1
|
+
import{defineComponent as e,computed as t,watch as a,ref as o,onMounted as n,createVNode as i,mergeProps as r}from"vue";import{generateTimeFormat as u}from"../../../../../shared/utils/index.js";import{connect as l,mapProps as s}from"@formily/vue";import{isObject as d,useEventListener as m}from"@vueuse/core";import{format as v}from"date-fns";import c from"../../../../date-picker/index.js";import{useCommonInjection as p}from"../../hooks/useCommonInjection.js";import"@formily/core";import"@formily/path";import"@vicons/ionicons5";import"@vue/shared";import"lodash-es";import"naive-ui";import"../../../index.js";import{assignUpdateValue as f,assignClearBindVisited as y}from"../../utils/schema.js";const w=l(e({props:{onChange:{},disabled:{type:Boolean},value:{type:String},validate:{type:Object},valueFormat:{type:String,default:"yyyy-MM-dd"},allowedInvalidValue:{type:String,default:"-"},dbclickToCurrent:{type:Boolean,default:!0}},emits:["update:value"],setup(e,{emit:l}){const{injectValueValidate:s,injectValueBindKey:f}=p();function y(){var t;return"currTime"===(null==(t=e.validate)?void 0:t.min_date)}function w(){var t;return"currTime"===(null==(t=e.validate)?void 0:t.max_date)}function D(e){return y()&&e<Date.now()-864e5||w()&&e>Date.now()}function b(e){const t=new Date(e),a=new Date,o=new Date(t);o.setHours(0),o.setMinutes(0),o.setSeconds(0);const n=new Date(t);n.setHours(23),n.setMinutes(59),n.setSeconds(59);const i=o>a,r=n<a,u=t.getHours(),l=a.getHours(),s=a.getMinutes();return{isHourDisabled:function(e){return y()&&!i&&e<l||w()&&!r&&e>l},isMinuteDisabled:function(e){if(u===l)return y()&&!i&&e<s||w()&&!r&&e>s;return y()&&!i&&u<l||w()&&!r&&u>l}}}s((()=>e.value));const j=t((()=>{const t={};if(d(e.validate)){const{min_date:a,max_date:o}=e.validate;(a||o)&&(t.isDateDisabled=D,t.isTimeDisabled=b)}return t})),g=t((()=>({valueFormat:e.valueFormat,format:e.valueFormat,timePickerProps:{format:u(e.valueFormat)}})));function h(t){return t?t===e.allowedInvalidValue?t:v(new Date(t),e.valueFormat):null}a((()=>e.value),(e=>{e&&h(e)!==e&&l("update:value",h(e))}));const k=t({get:()=>h(e.value),set:e=>{l("update:value",e)}}),F=f(k),V=o();return n((()=>{var t;if(!e.dbclickToCurrent)return;const a=null==(t=V.value)?void 0:t.$el;if(!a)return;const o=a.querySelector("input");o&&m(a,"dblclick",(()=>function(t){e.disabled||(t.value=v(Date.now(),e.valueFormat),t.dispatchEvent(new Event("input")))}(o)))})),()=>i(c,r({ref:V,key:F.value,disabled:e.disabled,allowedInvalidValue:e.allowedInvalidValue},j.value,g.value,{"formatted-value":k.value,"onUpdate:formatted-value":e=>k.value=e}),null)}}),s(f,y));export{w as DATE};
|
|
@@ -3,7 +3,7 @@ import { FieldItem, FormBusinessFormatter } from '../../../../../es/components/f
|
|
|
3
3
|
import { FIELD_BUSINESS_TYPE } from '../constants';
|
|
4
4
|
export declare class BusinessCollector {
|
|
5
5
|
private businessFormatter?;
|
|
6
|
-
|
|
6
|
+
triggerDisabled: boolean | string;
|
|
7
7
|
private readonly typeLockMap;
|
|
8
8
|
private readonly typeCollector;
|
|
9
9
|
private readonly fieldNameCollector;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isField as e}from"@formily/core";import{
|
|
1
|
+
import{isField as e}from"@formily/core";import{Path as t}from"@formily/path";import{isString as s}from"@vueuse/core";import{format as i}from"date-fns";import{isFunction as r,isNumber as a}from"lodash-es";import{FIELD_BUSINESS_TYPE as n}from"../constants/index.js";import"vue";import"../../../../shared/utils/index.js";import"@vicons/ionicons5";import"@vue/shared";import"naive-ui";import"../../index.js";import{isIdCard as l,parseIdCard as o,parseAgeFromContext as u,parseBirthday as h,parseAge2Birthday as y}from"../utils/business.js";class p{constructor(e){this.businessFormatter=e,this.triggerDisabled=!1,this.typeLockMap=new Map,this.typeCollector=new Map,this.fieldNameCollector=new Map,this.changeHandlerMap=new Map([])}formatter(...e){return r(this.businessFormatter)?this.businessFormatter(...e):e[0].value}collect(e,t){this.typeCollector.set(e,t),this.fieldNameCollector.set(t.val_key,e)}getField(e){return this.typeCollector.get(e)}getFieldInstanceByType(e,t){const s=this.getField(t);return s?e.query(s.val_key).take():null}getType(e){return this.fieldNameCollector.get(e)}getValueByField(t,s){const i=t.query(s).take();return e(i)?i.value:null}getValueByType(e,t){const s=this.getField(t);return s?this.getValueByField(e,s.val_key):null}setValueByType(e,i,r,a){const n=this.getField(i);n&&e.setFieldState(n.val_key,(e=>{e.value!==r&&(!this.typeLockMap.get(i)&&this.typeLockMap.set(i,1),this.triggerDisabled&&s(this.triggerDisabled)&&t.parse(this.triggerDisabled).match(n.val_key)||(e.value=this.formatter({value:r,type:i,fieldKey:n.val_key,from:a})))}))}registerChangeBusiness(e,t){return this.changeHandlerMap.set(e,t),this}trigger(e,t,s="change"){var i;if(!0===this.triggerDisabled)return;const r=this.getType(t);if(!r)return;if("change"===s&&this.typeLockMap.get(r))return this.typeLockMap.set(r,0);const a="change"===s?this.changeHandlerMap:null;a&&(null==(i=a.get(r))||i.call(this,e))}}function c(){function e(){var e;const t=this.getField(n.BIRTHDAY);return null!=(e=null==t?void 0:t.date_format)?e:"yyyy-MM-dd HH:mm"}function t(t){const r=this.getValueByType(t,n.ID_CARD);if(!r||!s(r)||!l(r))return;const a=o(r),{age:h,ageUnit:y}=u(a);this.setValueByType(t,n.AGE_UNIT,y,n.ID_CARD),this.setValueByType(t,n.AGE,h,n.ID_CARD),this.setValueByType(t,n.SEX,a.sex,n.ID_CARD),this.setValueByType(t,n.BIRTHDAY,i(new Date(a.birthday),e.call(this)),n.ID_CARD)}function r(e){const t=this.getValueByType(e,n.BIRTHDAY);if(!s(t))return;const{age:i,ageUnit:r}=u(h(t));this.setValueByType(e,n.AGE_UNIT,r,n.BIRTHDAY),this.setValueByType(e,n.AGE,i,n.BIRTHDAY)}function c(t){return function(i){const r=this.getValueByType(i,n.AGE),l=this.getValueByType(i,n.AGE_UNIT);(s(r)||a(r))&&""!==r&&s(l)&&""!==l&&this.setValueByType(i,n.BIRTHDAY,y(+r,l,e.call(this)),t)}}return{create:function(e){return new p(e).registerChangeBusiness(n.ID_CARD,t).registerChangeBusiness(n.AGE_UNIT,c(n.AGE_UNIT)).registerChangeBusiness(n.AGE,c(n.AGE)).registerChangeBusiness(n.BIRTHDAY,r)}}}export{p as BusinessCollector,c as useBusinessBinding};
|