cnhis-design-vue 3.1.48-beta.3 → 3.1.48-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/README.md +87 -87
- package/es/components/base-search/index.d.ts +13 -0
- package/es/components/base-search/src/index.vue.d.ts +13 -0
- package/es/components/base-search/src/index.vue2.js +1 -1
- package/es/components/base-search/style/index.css +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/card-reader-sdk/src/cardReaderSDK.d.ts +37 -8
- package/es/components/card-reader-sdk/src/cardReaderSDK.js +1 -1
- package/es/components/card-reader-sdk/src/components/readCardDialog.vue.d.ts +19 -0
- package/es/components/card-reader-sdk/src/components/readCardDialog.vue2.js +1 -1
- package/es/components/card-reader-sdk/src/constants/index.d.ts +60 -168
- package/es/components/card-reader-sdk/src/constants/index.js +1 -1
- package/es/components/card-reader-sdk/src/insuranceSDK.d.ts +1 -6
- package/es/components/card-reader-sdk/src/insuranceSDK.js +1 -1
- package/es/components/card-reader-sdk/src/types/index.d.ts +27 -21
- package/es/components/card-reader-sdk/src/utils/index.d.ts +1 -1
- package/es/components/card-reader-sdk/src/utils/index.js +1 -1
- package/es/components/card-reader-sdk/src/utils/readHealthCard.d.ts +6 -1
- package/es/components/card-reader-sdk/src/utils/readHealthCard.js +1 -1
- package/es/components/classification/index.d.ts +3 -0
- package/es/components/classification/src/components/search-filter/index.vue.d.ts +3 -0
- package/es/components/classification/src/components/set-classification/index.vue.d.ts +3 -0
- package/es/components/classification/src/index.vue.d.ts +3 -0
- package/es/components/fabric-chart/src/constants/index.d.ts +4 -0
- package/es/components/fabric-chart/src/constants/index.js +1 -1
- package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.d.ts +7 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useOther.d.ts +7 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useOther.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useCenter.d.ts +2 -1
- package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useLeft.d.ts +2 -2
- package/es/components/fabric-chart/src/hooks/temperature/useLeft.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/useCommon.d.ts +1 -1
- package/es/components/fabric-chart/src/hooks/useCommon.js +1 -1
- package/es/components/fabric-chart/src/hooks/useDraw.js +1 -1
- package/es/components/fabric-chart/src/utils/index.d.ts +6 -0
- package/es/components/fabric-chart/src/utils/index.js +1 -1
- package/es/components/field-set/index.d.ts +21 -1
- package/es/components/field-set/src/FieldSet.vue.d.ts +22 -2
- package/es/components/field-set/src/FieldSet.vue2.js +1 -1
- package/es/components/field-set/src/components/Row.vue2.js +1 -1
- package/es/components/field-set/src/types/index.d.ts +8 -0
- package/es/components/field-set/src/utils/index.js +1 -1
- package/es/components/form-config/index.d.ts +28 -0
- package/es/components/form-config/src/FormConfig.vue.d.ts +28 -0
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +12 -0
- package/es/components/form-render/src/components/renderer/radio&checkbox.d.ts +13 -0
- package/es/components/form-render/src/components/renderer/radio_checkbox.js +1 -1
- package/es/components/form-render/src/components/renderer/select.d.ts +3 -0
- package/es/components/form-render/src/components/renderer/select.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/useComplexOptions.d.ts +9 -6
- package/es/components/form-render/src/hooks/useComplexOptions.js +1 -1
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
- package/es/components/form-render/src/hooks/useFieldNormalize.js +1 -1
- package/es/components/form-render/src/hooks/useFormRenderOptions.d.ts +4 -0
- package/es/components/form-render/src/hooks/useFormRenderOptions.js +1 -1
- package/es/components/form-render/src/hooks/useFormValidator.js +1 -1
- package/es/components/form-render/src/types/fieldItem.d.ts +5 -0
- package/es/components/form-render/src/types/index.d.ts +1 -0
- package/es/components/form-render/src/utils/index.js +1 -1
- package/es/components/form-render/style/index.css +1 -1
- package/es/components/iho-table/index.d.ts +8 -3
- package/es/components/iho-table/src/IhoTable.vue.d.ts +8 -3
- package/es/components/iho-table/src/constants/index.d.ts +6 -6
- package/es/components/iho-table/src/constants/index.js +1 -1
- package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +1 -0
- package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.d.ts +2 -1
- package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.js +1 -1
- package/es/components/iho-table/src/hooks/useColumnConfigAdaptor.js +1 -1
- package/es/components/iho-table/src/plugins/bindEventSettingPlugin/index.d.ts +1 -0
- package/es/components/iho-table/src/plugins/bindEventSettingPlugin/index.js +1 -0
- package/es/components/iho-table/src/plugins/highLightSetPlugin.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/rendererPlugins/editableWidgets/radioRendererPlugin.d.ts +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/radioRendererPlugin.js +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.d.ts +18 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/editSeparate.vue.d.ts +2 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/editSeparate.vue2.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/separateUtils.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/defaultRendererPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/labelRendererPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/rowGroupSettingPlugin/rowGroupUtils.js +1 -1
- package/es/components/iho-table/src/plugins/virtualTreePlugin/index.js +1 -1
- package/es/components/iho-table/src/types/index.d.ts +4 -1
- package/es/components/iho-table/src/types/pluginType.d.ts +5 -3
- package/es/components/iho-table/src/utils/index.d.ts +2 -2
- package/es/components/iho-table/src/utils/index.js +1 -1
- package/es/components/iho-table/style/index.css +1 -1
- package/es/components/index.css +1 -1
- package/es/components/info-header/index.d.ts +13 -0
- package/es/components/info-header/src/InfoHeader.vue.d.ts +13 -0
- package/es/components/info-header/src/InfoHeader.vue2.js +1 -1
- package/es/components/info-header/src/components/patientInfo/index.vue2.js +1 -1
- package/es/components/info-header/style/index.css +1 -1
- package/es/components/quick-search/style/index.css +1 -1
- package/es/components/scale-view/index.d.ts +26 -1
- package/es/components/scale-view/src/ScaleView.vue.d.ts +26 -1
- package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
- package/es/components/scale-view/src/components/DescribeContent.vue.d.ts +21 -0
- package/es/components/scale-view/src/components/DescribeContent.vue.js +1 -0
- package/es/components/scale-view/src/components/DescribeContent.vue2.js +1 -0
- package/es/components/scale-view/src/components/EvaluateCountdown.vue.d.ts +2 -0
- package/es/components/scale-view/src/components/EvaluateCountdown.vue2.js +1 -1
- package/es/components/scale-view/src/components/formitem/r-datetime.js +1 -1
- package/es/components/scale-view/src/hooks/scaleview-computed.d.ts +6 -2
- package/es/components/scale-view/src/hooks/scaleview-computed.js +1 -1
- package/es/components/scale-view/src/hooks/scaleview-init.js +1 -1
- package/es/components/scale-view/src/hooks/scaleview-submit.js +1 -1
- package/es/components/scale-view/src/utils/judge-types.d.ts +9 -1
- package/es/components/scale-view/src/utils/judge-types.js +1 -1
- package/es/components/scale-view/style/index.css +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 +4 -0
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +4 -0
- package/es/components/table-export-field/src/components/ExportModal.vue.d.ts +3 -0
- package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +3 -0
- package/es/components/table-filter/src/components/classify-filter/index.vue2.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/package.json.js +1 -1
- package/es/shared/types/index.d.ts +1 -0
- package/es/shared/utils/business.js +1 -1
- package/es/shared/utils/fabricjs/index.d.ts +6823 -0
- package/es/shared/utils/tapable/index.d.ts +139 -0
- 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/iho-table/src/plugins/fieldConnectionPlugin/index.d.ts +0 -1
- package/es/components/iho-table/src/plugins/fieldConnectionPlugin/index.js +0 -1
|
@@ -182,6 +182,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
182
182
|
is_not_fold?: string | undefined;
|
|
183
183
|
remark?: string | undefined;
|
|
184
184
|
free_entry?: import("../../../../es/components/form-render").FormCommonState | undefined;
|
|
185
|
+
save_free_entry?: import("../../../../es/components/form-render").FormCommonState | undefined;
|
|
185
186
|
initialize_high?: number | undefined;
|
|
186
187
|
bindEventSetting?: {
|
|
187
188
|
[x: string]: unknown;
|
|
@@ -197,6 +198,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
197
198
|
p_name: string;
|
|
198
199
|
}[] | undefined;
|
|
199
200
|
}[] | undefined;
|
|
201
|
+
show_mode?: ("DROPDOWN" | "H_TILE" | "V_TILE" | "TILE") | undefined;
|
|
202
|
+
is_allow_check_mid?: import("../../../../es/components/form-render").FormCommonState | undefined;
|
|
203
|
+
allow_check_mid_level?: "1" | "2" | "3" | "4" | undefined;
|
|
200
204
|
fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
|
|
201
205
|
content?: string | import("../../../../es/components/form-render").FormRenderer | Record<string, import("../../../../es/components/form-render").FormRenderer> | undefined;
|
|
202
206
|
lazyRequest?: boolean | undefined;
|
|
@@ -1902,6 +1906,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1902
1906
|
is_not_fold?: string | undefined;
|
|
1903
1907
|
remark?: string | undefined;
|
|
1904
1908
|
free_entry?: import("../../../../es/components/form-render").FormCommonState | undefined;
|
|
1909
|
+
save_free_entry?: import("../../../../es/components/form-render").FormCommonState | undefined;
|
|
1905
1910
|
initialize_high?: number | undefined;
|
|
1906
1911
|
bindEventSetting?: {
|
|
1907
1912
|
[x: string]: unknown;
|
|
@@ -1917,6 +1922,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1917
1922
|
p_name: string;
|
|
1918
1923
|
}[] | undefined;
|
|
1919
1924
|
}[] | undefined;
|
|
1925
|
+
show_mode?: ("DROPDOWN" | "H_TILE" | "V_TILE" | "TILE") | undefined;
|
|
1926
|
+
is_allow_check_mid?: import("../../../../es/components/form-render").FormCommonState | undefined;
|
|
1927
|
+
allow_check_mid_level?: "1" | "2" | "3" | "4" | undefined;
|
|
1920
1928
|
fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
|
|
1921
1929
|
content?: string | import("../../../../es/components/form-render").FormRenderer | Record<string, import("../../../../es/components/form-render").FormRenderer> | undefined;
|
|
1922
1930
|
lazyRequest?: boolean | undefined;
|
|
@@ -3631,6 +3639,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3631
3639
|
is_not_fold?: string | undefined;
|
|
3632
3640
|
remark?: string | undefined;
|
|
3633
3641
|
free_entry?: import("../../../../es/components/form-render").FormCommonState | undefined;
|
|
3642
|
+
save_free_entry?: import("../../../../es/components/form-render").FormCommonState | undefined;
|
|
3634
3643
|
initialize_high?: number | undefined;
|
|
3635
3644
|
bindEventSetting?: {
|
|
3636
3645
|
[x: string]: unknown;
|
|
@@ -3646,6 +3655,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3646
3655
|
p_name: string;
|
|
3647
3656
|
}[] | undefined;
|
|
3648
3657
|
}[] | undefined;
|
|
3658
|
+
show_mode?: ("DROPDOWN" | "H_TILE" | "V_TILE" | "TILE") | undefined;
|
|
3659
|
+
is_allow_check_mid?: import("../../../../es/components/form-render").FormCommonState | undefined;
|
|
3660
|
+
allow_check_mid_level?: "1" | "2" | "3" | "4" | undefined;
|
|
3649
3661
|
fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
|
|
3650
3662
|
content?: string | import("../../../../es/components/form-render").FormRenderer | Record<string, import("../../../../es/components/form-render").FormRenderer> | undefined;
|
|
3651
3663
|
lazyRequest?: boolean | undefined;
|
|
@@ -5351,6 +5363,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
5351
5363
|
is_not_fold?: string | undefined;
|
|
5352
5364
|
remark?: string | undefined;
|
|
5353
5365
|
free_entry?: import("../../../../es/components/form-render").FormCommonState | undefined;
|
|
5366
|
+
save_free_entry?: import("../../../../es/components/form-render").FormCommonState | undefined;
|
|
5354
5367
|
initialize_high?: number | undefined;
|
|
5355
5368
|
bindEventSetting?: {
|
|
5356
5369
|
[x: string]: unknown;
|
|
@@ -5366,6 +5379,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
5366
5379
|
p_name: string;
|
|
5367
5380
|
}[] | undefined;
|
|
5368
5381
|
}[] | undefined;
|
|
5382
|
+
show_mode?: ("DROPDOWN" | "H_TILE" | "V_TILE" | "TILE") | undefined;
|
|
5383
|
+
is_allow_check_mid?: import("../../../../es/components/form-render").FormCommonState | undefined;
|
|
5384
|
+
allow_check_mid_level?: "1" | "2" | "3" | "4" | undefined;
|
|
5369
5385
|
fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
|
|
5370
5386
|
content?: string | import("../../../../es/components/form-render").FormRenderer | Record<string, import("../../../../es/components/form-render").FormRenderer> | undefined;
|
|
5371
5387
|
lazyRequest?: boolean | undefined;
|
|
@@ -8047,6 +8063,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
8047
8063
|
is_not_fold?: string | undefined;
|
|
8048
8064
|
remark?: string | undefined;
|
|
8049
8065
|
free_entry?: import("../../../../es/components/form-render").FormCommonState | undefined;
|
|
8066
|
+
save_free_entry?: import("../../../../es/components/form-render").FormCommonState | undefined;
|
|
8050
8067
|
initialize_high?: number | undefined;
|
|
8051
8068
|
bindEventSetting?: {
|
|
8052
8069
|
[x: string]: unknown;
|
|
@@ -8062,6 +8079,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
8062
8079
|
p_name: string;
|
|
8063
8080
|
}[] | undefined;
|
|
8064
8081
|
}[] | undefined;
|
|
8082
|
+
show_mode?: ("DROPDOWN" | "H_TILE" | "V_TILE" | "TILE") | undefined;
|
|
8083
|
+
is_allow_check_mid?: import("../../../../es/components/form-render").FormCommonState | undefined;
|
|
8084
|
+
allow_check_mid_level?: "1" | "2" | "3" | "4" | undefined;
|
|
8065
8085
|
fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
|
|
8066
8086
|
content?: string | import("../../../../es/components/form-render").FormRenderer | Record<string, import("../../../../es/components/form-render").FormRenderer> | undefined;
|
|
8067
8087
|
lazyRequest?: boolean | undefined;
|
|
@@ -9778,6 +9798,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
9778
9798
|
is_not_fold?: string | undefined;
|
|
9779
9799
|
remark?: string | undefined;
|
|
9780
9800
|
free_entry?: import("../../../../es/components/form-render").FormCommonState | undefined;
|
|
9801
|
+
save_free_entry?: import("../../../../es/components/form-render").FormCommonState | undefined;
|
|
9781
9802
|
initialize_high?: number | undefined;
|
|
9782
9803
|
bindEventSetting?: {
|
|
9783
9804
|
[x: string]: unknown;
|
|
@@ -9793,6 +9814,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
9793
9814
|
p_name: string;
|
|
9794
9815
|
}[] | undefined;
|
|
9795
9816
|
}[] | undefined;
|
|
9817
|
+
show_mode?: ("DROPDOWN" | "H_TILE" | "V_TILE" | "TILE") | undefined;
|
|
9818
|
+
is_allow_check_mid?: import("../../../../es/components/form-render").FormCommonState | undefined;
|
|
9819
|
+
allow_check_mid_level?: "1" | "2" | "3" | "4" | undefined;
|
|
9796
9820
|
fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
|
|
9797
9821
|
content?: string | import("../../../../es/components/form-render").FormRenderer | Record<string, import("../../../../es/components/form-render").FormRenderer> | undefined;
|
|
9798
9822
|
lazyRequest?: boolean | undefined;
|
|
@@ -11482,6 +11506,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
11482
11506
|
is_not_fold?: string | undefined;
|
|
11483
11507
|
remark?: string | undefined;
|
|
11484
11508
|
free_entry?: import("../../../../es/components/form-render").FormCommonState | undefined;
|
|
11509
|
+
save_free_entry?: import("../../../../es/components/form-render").FormCommonState | undefined;
|
|
11485
11510
|
initialize_high?: number | undefined;
|
|
11486
11511
|
bindEventSetting?: {
|
|
11487
11512
|
[x: string]: unknown;
|
|
@@ -11497,6 +11522,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
11497
11522
|
p_name: string;
|
|
11498
11523
|
}[] | undefined;
|
|
11499
11524
|
}[] | undefined;
|
|
11525
|
+
show_mode?: ("DROPDOWN" | "H_TILE" | "V_TILE" | "TILE") | undefined;
|
|
11526
|
+
is_allow_check_mid?: import("../../../../es/components/form-render").FormCommonState | undefined;
|
|
11527
|
+
allow_check_mid_level?: "1" | "2" | "3" | "4" | undefined;
|
|
11500
11528
|
fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
|
|
11501
11529
|
content?: string | import("../../../../es/components/form-render").FormRenderer | Record<string, import("../../../../es/components/form-render").FormRenderer> | undefined;
|
|
11502
11530
|
lazyRequest?: boolean | undefined;
|
|
@@ -135,6 +135,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
135
135
|
is_not_fold?: string | undefined;
|
|
136
136
|
remark?: string | undefined;
|
|
137
137
|
free_entry?: import("../../../../../es/components/form-render").FormCommonState | undefined;
|
|
138
|
+
save_free_entry?: import("../../../../../es/components/form-render").FormCommonState | undefined;
|
|
138
139
|
initialize_high?: number | undefined;
|
|
139
140
|
bindEventSetting?: {
|
|
140
141
|
[x: string]: unknown;
|
|
@@ -150,6 +151,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
150
151
|
p_name: string;
|
|
151
152
|
}[] | undefined;
|
|
152
153
|
}[] | undefined;
|
|
154
|
+
show_mode?: ("DROPDOWN" | "H_TILE" | "V_TILE" | "TILE") | undefined;
|
|
155
|
+
is_allow_check_mid?: import("../../../../../es/components/form-render").FormCommonState | undefined;
|
|
156
|
+
allow_check_mid_level?: "1" | "2" | "3" | "4" | undefined;
|
|
153
157
|
fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
|
|
154
158
|
content?: string | import("../../../../../es/components/form-render").FormRenderer | Record<string, import("../../../../../es/components/form-render").FormRenderer> | undefined;
|
|
155
159
|
lazyRequest?: boolean | undefined;
|
|
@@ -1866,6 +1870,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1866
1870
|
is_not_fold?: string | undefined;
|
|
1867
1871
|
remark?: string | undefined;
|
|
1868
1872
|
free_entry?: import("../../../../../es/components/form-render").FormCommonState | undefined;
|
|
1873
|
+
save_free_entry?: import("../../../../../es/components/form-render").FormCommonState | undefined;
|
|
1869
1874
|
initialize_high?: number | undefined;
|
|
1870
1875
|
bindEventSetting?: {
|
|
1871
1876
|
[x: string]: unknown;
|
|
@@ -1881,6 +1886,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1881
1886
|
p_name: string;
|
|
1882
1887
|
}[] | undefined;
|
|
1883
1888
|
}[] | undefined;
|
|
1889
|
+
show_mode?: ("DROPDOWN" | "H_TILE" | "V_TILE" | "TILE") | undefined;
|
|
1890
|
+
is_allow_check_mid?: import("../../../../../es/components/form-render").FormCommonState | undefined;
|
|
1891
|
+
allow_check_mid_level?: "1" | "2" | "3" | "4" | undefined;
|
|
1884
1892
|
fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
|
|
1885
1893
|
content?: string | import("../../../../../es/components/form-render").FormRenderer | Record<string, import("../../../../../es/components/form-render").FormRenderer> | undefined;
|
|
1886
1894
|
lazyRequest?: boolean | undefined;
|
|
@@ -3570,6 +3578,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3570
3578
|
is_not_fold?: string | undefined;
|
|
3571
3579
|
remark?: string | undefined;
|
|
3572
3580
|
free_entry?: import("../../../../../es/components/form-render").FormCommonState | undefined;
|
|
3581
|
+
save_free_entry?: import("../../../../../es/components/form-render").FormCommonState | undefined;
|
|
3573
3582
|
initialize_high?: number | undefined;
|
|
3574
3583
|
bindEventSetting?: {
|
|
3575
3584
|
[x: string]: unknown;
|
|
@@ -3585,6 +3594,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3585
3594
|
p_name: string;
|
|
3586
3595
|
}[] | undefined;
|
|
3587
3596
|
}[] | undefined;
|
|
3597
|
+
show_mode?: ("DROPDOWN" | "H_TILE" | "V_TILE" | "TILE") | undefined;
|
|
3598
|
+
is_allow_check_mid?: import("../../../../../es/components/form-render").FormCommonState | undefined;
|
|
3599
|
+
allow_check_mid_level?: "1" | "2" | "3" | "4" | undefined;
|
|
3588
3600
|
fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
|
|
3589
3601
|
content?: string | import("../../../../../es/components/form-render").FormRenderer | Record<string, import("../../../../../es/components/form-render").FormRenderer> | undefined;
|
|
3590
3602
|
lazyRequest?: boolean | undefined;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AnyObject } from '../../../../../../es/shared/types';
|
|
2
2
|
import { PropType } from 'vue';
|
|
3
|
+
import { UrlConfig } from '../../../../../../es/components/form-render';
|
|
3
4
|
export declare const RADIO: import("vue").DefineComponent<{
|
|
4
5
|
value: {
|
|
5
6
|
type: (ArrayConstructor | NumberConstructor | ObjectConstructor | StringConstructor)[];
|
|
@@ -8,6 +9,9 @@ export declare const RADIO: import("vue").DefineComponent<{
|
|
|
8
9
|
type: PropType<AnyObject[]>;
|
|
9
10
|
default: () => never[];
|
|
10
11
|
};
|
|
12
|
+
urlConfig: {
|
|
13
|
+
type: PropType<UrlConfig>;
|
|
14
|
+
};
|
|
11
15
|
autograph: {
|
|
12
16
|
type: StringConstructor;
|
|
13
17
|
};
|
|
@@ -70,6 +74,9 @@ export declare const RADIO: import("vue").DefineComponent<{
|
|
|
70
74
|
type: PropType<AnyObject[]>;
|
|
71
75
|
default: () => never[];
|
|
72
76
|
};
|
|
77
|
+
urlConfig: {
|
|
78
|
+
type: PropType<UrlConfig>;
|
|
79
|
+
};
|
|
73
80
|
autograph: {
|
|
74
81
|
type: StringConstructor;
|
|
75
82
|
};
|
|
@@ -144,6 +151,9 @@ export declare const CHECKBOX: import("vue").DefineComponent<{
|
|
|
144
151
|
type: PropType<AnyObject[]>;
|
|
145
152
|
default: () => never[];
|
|
146
153
|
};
|
|
154
|
+
urlConfig: {
|
|
155
|
+
type: PropType<UrlConfig>;
|
|
156
|
+
};
|
|
147
157
|
autograph: {
|
|
148
158
|
type: StringConstructor;
|
|
149
159
|
};
|
|
@@ -206,6 +216,9 @@ export declare const CHECKBOX: import("vue").DefineComponent<{
|
|
|
206
216
|
type: PropType<AnyObject[]>;
|
|
207
217
|
default: () => never[];
|
|
208
218
|
};
|
|
219
|
+
urlConfig: {
|
|
220
|
+
type: PropType<UrlConfig>;
|
|
221
|
+
};
|
|
209
222
|
autograph: {
|
|
210
223
|
type: StringConstructor;
|
|
211
224
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,
|
|
1
|
+
import{defineComponent as e,computed as t,useAttrs as o,createVNode as a,isVNode as l}from"vue";import{connect as r,mapProps as i}from"@formily/vue";import{promiseTimeout as u}from"@vueuse/shared";import{isNumber as n}from"lodash-es";import{NSpace as p,NRadio as s,NRadioGroup as d,NCheckbox as m,NCheckboxGroup as c}from"naive-ui";import"../../../index.js";import{useComplexOptions as v}from"../../hooks/useComplexOptions.js";import"../../../../../shared/utils/index.js";import"@formily/core";import"@formily/path";import"@vue/shared";import"@vueuse/core";import"date-fns";import{assignUpdateValue as f,createVisitedSetter as y}from"../../utils/schema.js";import{useUrlConfigOptions as h,useAutographOptions as b}from"../../hooks/useFormRenderOptions.js";import{useCommonInjection as j}from"../../hooks/useCommonInjection.js";import{useFormField as g}from"../../hooks/useFormField.js";function k(r,i,s){return e({name:r,props:{value:{type:[String,Number,Object,Array]},options:{type:Array,default:()=>[]},urlConfig:{type:Object},autograph:{type:String},lazyRequest:{type:Boolean,default:!1},requestCache:{type:Boolean,default:!0},labelField:{type:String,default:"text"},valueField:{type:String,default:"value"},wordbook:{type:Object},vertical:{type:Boolean,default:!1},childFieldStrategy:{type:String,default:"checked"},clearable:Boolean,onChange:{}},emits:["update:value"],setup(e,{emit:r}){const{field:m}=g();const c=t({get(){return t=e.value,n(t)?t+"":t;var t},set(e){r("update:value",e)}}),{renderComplexOption:f}=v(e,c),{labelKey:k,valueKey:S,fullOptions:C}=e.urlConfig?h(e,c):b(e,c),{injectValueBindKey:F,injectValueValidate:O}=j();O(c);const x=F(c),B=o();return()=>a(i,{key:x.value,value:c.value,"onUpdate:value":e=>c.value=e,onClick:y(m)},{default:()=>[a(p,{vertical:e.vertical,"vertical-space":e.vertical},{default:()=>{var t;return[null==(t=C.value)?void 0:t.map((t=>{let o;return a(s,{key:t[S.value],value:t[S.value],disabled:t.disabled,onClick:()=>async function(t){if(null==B?void 0:B.disabled)return;if(i!==d||!e.clearable)return;const o=c.value;await u(0),o===t[S.value]&&(c.value=null)}(t)},"function"==typeof(r=o=f({value:c.value,option:t,valueKey:S.value,labelKey:k.value,childFieldStrategy:e.childFieldStrategy}))||"[object Object]"===Object.prototype.toString.call(r)&&!l(r)?o:{default:()=>[o]});var r}))]}})]})}})}const S=r(k("FormRadio",d,s),i({dataSource:"options"},f)),C=r(k("FormCheckbox",c,m),i({dataSource:"options"},f));export{C as CHECKBOX,S as RADIO};
|
|
@@ -29,6 +29,7 @@ export declare const SELECT: import("vue").DefineComponent<{
|
|
|
29
29
|
default: string;
|
|
30
30
|
};
|
|
31
31
|
allowCreate: BooleanConstructor;
|
|
32
|
+
shouldSave: BooleanConstructor;
|
|
32
33
|
urlConfig: {
|
|
33
34
|
type: PropType<UrlConfig>;
|
|
34
35
|
};
|
|
@@ -111,6 +112,7 @@ export declare const SELECT: import("vue").DefineComponent<{
|
|
|
111
112
|
default: string;
|
|
112
113
|
};
|
|
113
114
|
allowCreate: BooleanConstructor;
|
|
115
|
+
shouldSave: BooleanConstructor;
|
|
114
116
|
urlConfig: {
|
|
115
117
|
type: PropType<UrlConfig>;
|
|
116
118
|
};
|
|
@@ -181,4 +183,5 @@ export declare const SELECT: import("vue").DefineComponent<{
|
|
|
181
183
|
commonNum: number;
|
|
182
184
|
recentNum: number;
|
|
183
185
|
allowCreate: boolean;
|
|
186
|
+
shouldSave: boolean;
|
|
184
187
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,computed as
|
|
1
|
+
import{defineComponent as e,computed as o,inject as t,useAttrs as l,createVNode as a,mergeProps as r,toRaw as s}from"vue";import{arrayed as n}from"../../../../../shared/utils/index.js";import{useDebounceFn as u}from"@vueuse/core";import{cloneDeep as i,isArray as p,isString as m,isObject as c,omit as d}from"lodash-es";import{useCommonInjection as v,useSelectOptionProps as f}from"../../hooks/useCommonInjection.js";import{useComplexOptions as y,useComplexOptionsSpan as h}from"../../hooks/useComplexOptions.js";import{InjectionChangeContextCollector as j,InjectionFormUUID as b}from"../../constants/index.js";import"../../../index.js";import"@formily/core";import"@formily/path";import"@vue/shared";import"date-fns";import{assignUpdateValue as S,assignClearBindVisited as k,createVisitedSetter as C}from"../../utils/schema.js";import{useFormField as F}from"../../hooks/useFormField.js";import{NSelect as g}from"naive-ui";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"../../hooks/useFormValidator.js";import{connect as x,mapProps as O}from"@formily/vue";import"./index.js";import{useUrlConfigOptions as A,useAutographOptions as B,useRecommendOptions as H,searchContentMatcher as K}from"../../hooks/useFormRenderOptions.js";const L=x(e({name:"FormSelect",props:{value:{type:[String,Array,Number]},lazyRequest:{type:Boolean,default:!0},requestCache:{type:Boolean,default:!0},options:{type:Array,default:()=>[]},onChange:{},labelField:{type:String,default:"text"},valueField:{type:String,default:"value"},allowCreate:Boolean,shouldSave:Boolean,urlConfig:{type:Object},autograph:{type:String},wordbook:{type:Object},recommend:{type:Boolean,default:!1},commonList:{type:Array},recentList:{type:Array},getRecommendInfo:{type:Function},commonNum:{type:Number,default:10},recentNum:{type:Number,default:10},recommendCache:{type:Boolean,default:!1}},emits:["update:value","postRecommend"],setup(e,{slots:S,emit:k}){const x=o({get:()=>e.value,async set(e){k("update:value",e),q(e)}}),{labelKey:O,valueKey:L,fetchData:R,searchContent:V,fullOptions:_,filterOptions:w,remoteOptions:N}=e.urlConfig?A(e,x):B(e,x),{renderComplexOption:P,hasComplexOption:I}=y(e,x),{getRecommend:W,postRecommend:q,sortedOptions:E}=H(e,w,k,O,L),{field:U,fieldKey:z}=F();t(j).setContext(z.value,(e=>({currentOption:i(function(e){const o=Z(_.value);return p(e)?function(e){const t=o.reduce(((e,o)=>(e[o[L.value]]=o,e)),{});return e.map((e=>t[e]))}(e):(t=e,o.find((e=>e[L.value]===t)));var t}(e))})));const D=u((async(e="")=>{V.value=e,R(e),W(e)}),300),{injectValueValidate:G,injectValueWatchFromEmpty:J,injectValueBindKey:M}=v();J(x,D),G(x);const Q=M(x),{menuProps:T,nodeProps:X}=f();function Y(e){const o=e[O.value];if(!o||!m(o))return"";const t=V.value?K(V.value,o):null;return t?a("section",null,[t.map(((e,o)=>0!==o&&e?a("span",{style:{color:o%2==0?"var(--n-option-text-color-active)":""}},[e]):null))]):o}function Z(o){return e.allowCreate&&V.value&&!o.some((e=>e[O.value]===V.value))?[...o,{[O.value]:V.value,[L.value]:V.value,created:!0,shouldSave:e.shouldSave}]:o}const $=o((()=>Z(E.value))),ee=l(),oe=o((()=>{if(e.allowCreate)return x.value;const o=ee.multiple&&p(x.value);return _.value.find((e=>o?x.value.includes(e[L.value]):e[L.value]===x.value))?x.value:null}));function te(e){e&&D()}function le(e,o){x.value=e,N.value&&o&&n(o).forEach((e=>{if(!c(e))return;const o=e;o.created&&o.shouldSave&&N.value.push(d(s(o),["created","shouldSave"]))}))}const ae=t(b),{getSpan:re}=h();function se(e){return a(g,r({key:Q.value,remote:!0,filterable:!0,value:oe.value,onUpdateValue:le,"menu-props":T,"node-props":X,labelField:O.value,valueField:L.value,options:$.value,onSearch:D,"onUpdate:show":te,onFocus:C(U),renderLabel:Y},e,ee),S)}return()=>{var e,o;if(!I.value)return se();const t=null!=(o=null==(e=U.value.decoratorProps)?void 0:e.span)?o:6,l=re(ae,U.value.address);return a("section",{class:"form-render__selectChildField",style:{"--column":l+t}},[se({class:"form-render__selectChildFieldItem",style:{"--form-item-column":t}}),_.value.map((e=>P({option:e,value:x.value,valueKey:L.value,labelKey:O.value,childFieldStrategy:"checked",renderLabel:!1,attrs:{class:"form-render__selectChildFieldItem",style:{"--form-item-column":l}}})))])}}}),O({dataSource:"options"},S,k));export{L as SELECT};
|
|
@@ -15,7 +15,7 @@ export declare class BusinessCollector {
|
|
|
15
15
|
private getType;
|
|
16
16
|
private getValueByField;
|
|
17
17
|
getValueByType(formModel: Form, type: FIELD_BUSINESS_TYPE): unknown;
|
|
18
|
-
setValueByType(formModel: Form, type: FIELD_BUSINESS_TYPE, value: unknown): void;
|
|
18
|
+
setValueByType(formModel: Form, type: FIELD_BUSINESS_TYPE, value: unknown, from: FIELD_BUSINESS_TYPE): void;
|
|
19
19
|
registerChangeBusiness(type: FIELD_BUSINESS_TYPE, handler: (formModel: Form) => void): this;
|
|
20
20
|
private changeHandlerMap;
|
|
21
21
|
trigger(formModel: Form, fieldName: string, triggerType?: 'change' | 'blur'): Map<FIELD_BUSINESS_TYPE, number> | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isField as e}from"@formily/core";import{isString as t}from"@vueuse/core";import{format as s}from"date-fns";import{isFunction as i,isNumber as r}from"lodash-es";import{FIELD_BUSINESS_TYPE as n}from"../constants/index.js";import"vue";import"../../../../shared/utils/index.js";import"@formily/path";import"@vue/shared";import"../../index.js";import{isIdCard as a,parseIdCard as l,parseAgeFromContext as o,parseBirthday as u,parseAge2Birthday as h}from"../utils/business.js";class y{constructor(e){this.businessFormatter=e,this.triggerLock=!1,this.typeLockMap=new Map,this.typeCollector=new Map,this.fieldNameCollector=new Map,this.changeHandlerMap=new Map([])}formatter(...e){return i(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,t,s){const
|
|
1
|
+
import{isField as e}from"@formily/core";import{isString as t}from"@vueuse/core";import{format as s}from"date-fns";import{isFunction as i,isNumber as r}from"lodash-es";import{FIELD_BUSINESS_TYPE as n}from"../constants/index.js";import"vue";import"../../../../shared/utils/index.js";import"@formily/path";import"@vue/shared";import"../../index.js";import{isIdCard as a,parseIdCard as l,parseAgeFromContext as o,parseBirthday as u,parseAge2Birthday as h}from"../utils/business.js";class y{constructor(e){this.businessFormatter=e,this.triggerLock=!1,this.typeLockMap=new Map,this.typeCollector=new Map,this.fieldNameCollector=new Map,this.changeHandlerMap=new Map([])}formatter(...e){return i(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,t,s,i){const n=this.getField(t);n&&e.setFieldState(n.val_key,(e=>{if(e.value===s)return;const a=this.typeLockMap.get(t);this.typeLockMap.set(t,r(a)?a+1:1),e.value=this.formatter({value:s,type:t,fieldKey:n.val_key,from:i})}))}registerChangeBusiness(e,t){return this.changeHandlerMap.set(e,t),this}trigger(e,t,s="change"){var i;if(this.triggerLock)return;const r=this.getType(t);if(!r)return;if("change"===s&&this.typeLockMap.get(r)>0)return this.typeLockMap.set(r,this.typeLockMap.get(r)-1);const n="change"===s?this.changeHandlerMap:null;n&&(null==(i=n.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 i(i){const r=this.getValueByType(i,n.ID_CARD);if(!r||!t(r)||!a(r))return;const u=l(r),{age:h,ageUnit:y}=o(u);this.setValueByType(i,n.AGE_UNIT,y,n.ID_CARD),this.setValueByType(i,n.AGE,h,n.ID_CARD),this.setValueByType(i,n.SEX,u.sex,n.ID_CARD),this.setValueByType(i,n.BIRTHDAY,s(new Date(u.birthday),e.call(this)),n.ID_CARD)}function c(e){const s=this.getValueByType(e,n.BIRTHDAY);if(!t(s))return;const{age:i,ageUnit:r}=o(u(s));this.setValueByType(e,n.AGE_UNIT,r,n.BIRTHDAY),this.setValueByType(e,n.AGE,i,n.BIRTHDAY)}function p(s){return function(i){const a=this.getValueByType(i,n.AGE),l=this.getValueByType(i,n.AGE_UNIT);(t(a)||r(a))&&""!==a&&t(l)&&""!==l&&this.setValueByType(i,n.BIRTHDAY,h(+a,l,e.call(this)),s)}}return{create:function(e){return new y(e).registerChangeBusiness(n.ID_CARD,i).registerChangeBusiness(n.AGE_UNIT,p(n.AGE_UNIT)).registerChangeBusiness(n.AGE,p(n.AGE)).registerChangeBusiness(n.BIRTHDAY,c)}}}export{y as BusinessCollector,c as useBusinessBinding};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { AnyObject
|
|
1
|
+
import { AnyObject } from '../../../../../es/shared/types';
|
|
2
2
|
import { Path } from '@formily/path';
|
|
3
|
+
import { Ref } from 'vue';
|
|
3
4
|
import { FormOptionItem } from '../../../../../es/components/form-render';
|
|
4
5
|
declare function setSpan(uuid: string, address: Path | string, span?: number): void;
|
|
5
6
|
declare function getSpan(uuid: string, address: Path | string, withSelf?: boolean): number;
|
|
@@ -8,15 +9,17 @@ declare function clearSpan(uuid: string): void;
|
|
|
8
9
|
export declare function useComplexOptions(props: {
|
|
9
10
|
options: AnyObject[];
|
|
10
11
|
value: unknown;
|
|
11
|
-
},
|
|
12
|
-
renderComplexOption: ({ value, option, valueKey, labelKey, childFieldStrategy }: {
|
|
12
|
+
}, valueRef: Ref): {
|
|
13
|
+
renderComplexOption: ({ value, option, valueKey, labelKey, childFieldStrategy, renderLabel, attrs }: {
|
|
13
14
|
value: unknown;
|
|
14
15
|
option: FormOptionItem;
|
|
15
|
-
valueKey
|
|
16
|
-
labelKey
|
|
16
|
+
valueKey?: string | undefined;
|
|
17
|
+
labelKey?: string | undefined;
|
|
17
18
|
childFieldStrategy: 'checked' | 'all';
|
|
19
|
+
renderLabel?: boolean | undefined;
|
|
20
|
+
attrs?: AnyObject | undefined;
|
|
18
21
|
}) => any[];
|
|
19
|
-
valueRef:
|
|
22
|
+
valueRef: Ref<any>;
|
|
20
23
|
hasComplexOption: import("vue").ComputedRef<boolean>;
|
|
21
24
|
};
|
|
22
25
|
export declare function useComplexOptionsSpan(): {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{reactive as e,computed as t,createVNode as r,
|
|
1
|
+
import{reactive as e,computed as t,createVNode as r,mergeProps as n,defineComponent as l,inject as o,provide as a,watch as i,onUnmounted as s,onMounted as c,withModifiers as u}from"vue";import{checkInSetupEnv as d}from"../../../../shared/utils/index.js";import{useField as p,useForm as m,RecursionField as f}from"@formily/vue";import{isArray as v,noop as h}from"lodash-es";import"../../index.js";import{InjectionFormUUID as y,InjectionBusinessCollector as g}from"../constants/index.js";import{useFieldListAdaptor as b}from"./useFieldListAdaptor.js";import{createObjSchema as F}from"../utils/schema.js";const x=e(new Map);function S(e,t,r=0){x.set(e,x.get(e)||{});x.get(e)[t+""]=r}function j(e,t,r=!0){const n=x.get(e);return n?Object.entries(n).reduce(((e,[n,l])=>r&&n===`${t}`||n.startsWith(`${t}.`)?e+l:e),0):0}function O(e,t){const r=x.get(e);r&&Reflect.deleteProperty(r,t+"")}function $(e){x.delete(e)}const k=l({props:{fieldItems:{type:Array,default:()=>[]},childFieldStrategy:{type:String,default:"checked"},name:{type:String,required:!0}},setup(e){const l=o(y),d=o(g),v=p(),x=o(l+"_virtualParent",""),$=`${x?x+".":""}${v.value.address}`;function k(e){return`${$}.${e}`}a(l+"_virtualParent",$);const{schemaAdaptor:E}=b(d);function K(t){var r,n;return Object.assign(t,{"x-decorator-props":{...t["x-decorator-props"],labelPlacement:"left",showFeedback:!1,showLabel:!!t.title},"x-component-props":{...t["x-component-props"],childFieldStrategy:null!=(n=null==(r=t["x-component-props"])?void 0:r.childFieldStrategy)?n:e.childFieldStrategy,size:"small"}})}const P=t((()=>{const t=E(e.fieldItems);return Object.values(t).forEach(K),F(t)}));i(P,(()=>{return e=P.value,void Object.values(e.properties||{}).forEach((e=>{var t;S(l,k(e.name),null==(t=null==e?void 0:e["x-decorator-props"])?void 0:t.span)}));var e}),{immediate:!0});const _=m();function w(){return e.fieldItems.map((e=>_.value.query(e.val_key).take()))}s((()=>{var e;w().forEach((e=>{e&&e.setDisplay("none")})),e=P.value,Object.values(e.properties||{}).forEach((e=>{O(l,k(e.name))}))})),c((()=>{w().forEach((e=>{e&&e.setDisplay("visible")}))}));const I=u(h,["stop"]),A=["onClick","onKeydown","onKeyup","onKeypress"].reduce(((e,t)=>(e[t]=I,e)),{});return()=>{return r("section",n({class:"form-render__labelField",style:{"--column":(e=P.value,Object.values(e.properties||{}).reduce(((e,t)=>e+j(l,k(t.name))),0))}},A),[r(f,{basePath:".",schema:P.value},null)]);var e}}});function E(e,l){d();const o=t((()=>e.options.some((e=>v(e.childrenFields)&&e.childrenFields.length))));function a(e,t,r="value"){if(v(e)?e.includes(t[r]):e===t[r])return v(t.childrenFields)&&t.childrenFields.length}return{renderComplexOption:function({value:e,option:t,valueKey:l="value",labelKey:i="label",childFieldStrategy:s,renderLabel:c=!0,attrs:u}){return[c?t[i]:null,o.value&&("all"===s||a(e,t,l))?r(k,n({fieldItems:t.childrenFields,name:t[l],childFieldStrategy:s},u),null):null]},valueRef:l,hasComplexOption:o}}function K(){return{getSpan:j,setSpan:S,deleteSpan:O,clearSpan:$}}export{E as useComplexOptions,K as useComplexOptionsSpan};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{arrayed as e,deepOmit as o}from"../../../../shared/utils/index.js";import{cloneDeep as t,pick as n}from"lodash-es";import"../../index.js";import{parseNumberFromMaybeString as r,formRenderLog as i}from"../utils/index.js";import{useFieldNormalize as s}from"./useFieldNormalize.js";import{fieldKeyEscape as a,createLinebarId as p}from"../utils/schema.js";import{useFormValidator as l}from"./useFormValidator.js";import{transformDateFormat as c}from"../utils/business.js";function m(e,o){Object.assign(e["x-component-props"],{...n(o,["wordbook","autograph"])})}function d(
|
|
1
|
+
import{arrayed as e,deepOmit as o}from"../../../../shared/utils/index.js";import{cloneDeep as t,pick as n}from"lodash-es";import"../../index.js";import{parseNumberFromMaybeString as r,formRenderLog as i}from"../utils/index.js";import{useFieldNormalize as s}from"./useFieldNormalize.js";import{fieldKeyEscape as a,createLinebarId as p}from"../utils/schema.js";import{useFormValidator as l}from"./useFormValidator.js";import{transformDateFormat as c}from"../utils/business.js";function m(e,o){Object.assign(e["x-component-props"],{...n(o,["wordbook","autograph"])})}function d(e,o){Object.assign(e["x-component-props"],{...n(o,["urlConfig","wordbook"])})}function u(u){const{createValidatorSchema:x}=l(),_=e=>{var o;const t={name:e.val_key,type:null!=(o=e.fieldType)?o:"string",title:e.alias||e.name,"x-component":e.html_type,default:e.default_val,"x-component-props":{placeholder:e.placeholder,clearable:"0"===e.is_empty,...e.componentProps||{}},"x-content":e.slots,"x-display":"0"===e.is_show?"hidden":"visible","x-pattern":"0"===e.is_edit?"disabled":"editable","x-compile-omitted":["title","x-component-props","x-decorator-props"]};e.reactions&&(t["x-reactions"]=e.reactions),e.noDecorator||Object.assign(t,{"x-decorator":"FORM_ITEM","x-decorator-props":{fieldItem:e,span:2*(e.elem_width||3),showLabel:"1"!==e.hide_title,remark:e.remark,propertyKey:e.val_key,annotation:e.annotation,...e.decoratorProps||{}}});const n=x(e);return n&&(t["x-validator"]=n),"0"===e.is_null&&(t.required=!0),t},f=e=>{var o;const t=_(e);e.urlConfig?d(t,e):e.autograph&&m(t,e);const i=!!e.__multiple;return Object.assign(t["x-component-props"],{multiple:i,options:e.option||(null==(o=e.componentProps)?void 0:o.options),allowCreate:"1"===e.free_entry||!!t["x-component-props"].allowCreate,shouldSave:"1"===e.save_free_entry,maxTagCount:r(e.multi_select_value),...n(e,["lazyRequest","requestCache"])}),i&&(t.type="array"),t},h=e=>{const o=_(e);return Object.assign(o["x-component-props"],{options:e.option,childFieldStrategy:e.childFieldStrategy,vertical:e.__vertical}),e.urlConfig?d(o,e):e.autograph&&m(o,e),o},g=e=>{const t=_(e);return Object.assign(t["x-component-props"],{fieldItem:o(e,["reactions"])}),t},b=e=>({name:e.val_key,type:"void",title:e.alias||e.name,"x-component":"LINEBAR","x-display":"visible","x-component-props":{disabled:"1"===e.is_not_fold,id:p(e.val_key),show:"0"!==e.is_show,remark:e.remark}}),y=new Map([["LINEBAR",b],["LINE_BREAKS",e=>({name:e.val_key,type:"void",title:e.alias||e.name,"x-component":"LINE_BREAKS","x-display":"0"===e.is_show?"hidden":"visible"})],["INPUT",e=>{const o=_(e);return Object.assign(o["x-component-props"],{...n(e,["prefix","suffix"])}),o}],["TEXTAREA",e=>{const o=_(e);return Object.assign(o["x-component-props"],{rows:e.initialize_high||3}),o}],["INPUT_NUMBER",e=>{const o=_(e),{decimal_length:t,validate:n}=e;return Object.assign(o["x-component-props"],{precision:null!=t?t:null==n?void 0:n.decimal_length,prefix:e.prefix,suffix:e.suffix}),o}],["SELECT",f],["REMOTE_SEARCH",f],["DATE",e=>{const o=_(e);return Object.assign(o["x-component-props"],{valueFormat:e.date_format,type:c(e.date_format),validate:e.validate}),o}],["LEVEL_SEARCH_CASCADER",e=>{const o=_(e);return Object.assign(o["x-component-props"],{...n(e,["wordbook","lazyRequest","autograph"])}),"1"===e.is_allow_check_mid&&e.allow_check_mid_level&&(o["x-component-props"].checkAbleLevel=+e.allow_check_mid_level),o}],["SEARCH_CASCADER",e=>{var o;const t=_(e);return Object.assign(t["x-component-props"],{urlConfig:e.urlConfig,depth:null==(o=e.wordbook)?void 0:o.level_num,options:e.option}),t}],["COMBINATION",e=>{const o=_(e);return o.type="array",!1!==e.jsonCombination&&(o["x-component"]="JSON_COMBINATION"),Object.assign(o["x-decorator-props"],{showLabel:!1,showFeedback:!1}),Object.assign(o["x-component-props"],{title:e.alias||e.name,maxGroupNum:e.maxGroupNum,properties:e.children||[],combinationItemDeletable:e.combinationItemDeletable}),o}],["RADIO",h],["CHECKBOX",h],["SWITCH",e=>{const o=_(e);return Object.assign(o["x-component-props"],{openDescription:e.open,closeDescription:e.close}),o}],["SLIDER",e=>{const o=_(e);return Object.assign(o["x-component-props"],{step:r(e.step_length),max:r(e.max_length),min:r(e.min_length),option:e.option}),o}],["COMPLEX",e=>{const o=_(e);Array.isArray(e.properties)&&i("COMPLEX控件的properties属性已经废弃, 请使用children作为替代, 在之后的版本中properties属性将不再支持");const t=Array.isArray(e.properties||e.children)?j(e.properties||e.children):{};return o.type=e.fieldType||"void",o.properties=t,Object.assign(o["x-decorator-props"],{showFeedback:!1}),Object.assign(o["x-component-props"],n(e,["wrapperStyle","display"])),o}]]),v=e=>{if(e.suffixConfig)return C(e);return(y.get(e.html_type)||g)(e)},C=o=>{if(!o.suffixConfig)return v(o);const t=e(o.suffixConfig),n=[{...o,is_show:"1",hide_title:"1",suffixConfig:void 0}].concat(t.map((e=>({...e,hide_title:"1",is_show:"1"})))),r=_(o);return Object.assign(r,{type:"void",name:a(n),title:o.alias||o.name,"x-component":"INPUT_GROUP","x-component-props":{span:2*(o.elem_width||3)},"x-decorator-props":{...r["x-decorator-props"],showFeedback:!1,suffixFields:n.map((e=>e.val_key))},properties:j(n)}),r},{FieldNormalizeWaterfallHook:O}=s();function j(o){let n=null;return o.reduce(((e,o,s)=>{var a;const p=null==(a=(o=O.call(t(o))).validate)?void 0:a.obj_type;return p&&u&&u.collect(p,t(o)),"LINEBAR"===o.html_type?(e[i(o)]=r(b(o),s),n=e[i(o)].properties={}):n?n[i(o)]=r(v(o),s):(n=null,e[i(o)]=r(v(o),s)),e}),{});function r(e,o){return e["x-index"]=o,e}function i(o){return o.suffixConfig?a([o,...e(o.suffixConfig)]):o.val_key}}return{schemaAdaptor:j}}export{u as useFieldListAdaptor};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{arrayed as t}from"../../../../shared/utils/index.js";import"../../../../shared/utils/tapable/SyncHook.js";import"../../../../shared/utils/tapable/SyncBailHook.js";import e from"../../../../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{FIELD_BUSINESS_TYPE as l}from"../constants/index.js";function a(){const a=new e(["fieldItem"]);a.tap("__block",(t=>(["CHECKBOX_BLOCK","RADIO_BLOCK"].includes(t.html_type)&&(t.__vertical=!0),t))),a.tap("__age",(e=>("AGE"===e.html_type&&(e.html_type="INPUT_NUMBER",e.reactions=e.reactions?t(e.reactions):[],e.reactions.push({target:e.val_key_unit,fulfill:{state:{disabled:"{{$self.disabled}}"}}}),e.suffixConfig=[{validate:{obj_type:l.AGE_UNIT},val_key:e.val_key_unit,html_type:"SELECT",option:e.option,urlConfig:e.urlConfig}]),e))),a.tap("__multiple_select",(t=>{const{html_type:e,multi_select:l,__multiple:a}=t;return t.__multiple="SEARCH"!==e&&("SEARCH_MORE"===e||("SELECT"===e?"0"===l:a)),t}));const s=[[["SEARCH","PHONE_TYPE","IDCARD_TYPE","SEARCH_MORE"],"SELECT"],["DIGITAL","INPUT_NUMBER"],["CHECKBOX_BLOCK","CHECKBOX"],["RADIO_BLOCK","RADIO"],[["DATE-INPUT","DATETIME-INPUT"],"DATE"],["SWITCH_COMPONENT","SWITCH"],["SLIDER_COMPONENT","SLIDER"],["LEVEL_SEARCH_CASCADE","LEVEL_SEARCH_CASCADER"],["SEARCH_CASCADE","SEARCH_CASCADER"]];
|
|
1
|
+
import{arrayed as t}from"../../../../shared/utils/index.js";import"../../../../shared/utils/tapable/SyncHook.js";import"../../../../shared/utils/tapable/SyncBailHook.js";import e from"../../../../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{FIELD_BUSINESS_TYPE as l}from"../constants/index.js";function a(){const a=new e(["fieldItem"]);a.tap("__block",(t=>(["CHECKBOX_BLOCK","RADIO_BLOCK"].includes(t.html_type)&&(t.__vertical=!0),t))),a.tap("__age",(e=>("AGE"===e.html_type&&(e.html_type="INPUT_NUMBER",e.reactions=e.reactions?t(e.reactions):[],e.reactions.push({target:e.val_key_unit,fulfill:{state:{disabled:"{{$self.disabled}}"}}}),e.suffixConfig=[{validate:{obj_type:l.AGE_UNIT},val_key:e.val_key_unit,html_type:"SELECT",option:e.option,urlConfig:e.urlConfig}]),e))),a.tap("__multiple_select",(t=>{const{html_type:e,multi_select:l,__multiple:a}=t;return t.__multiple="SEARCH"!==e&&("SEARCH_MORE"===e||("SELECT"===e?"0"===l:a)),t}));const s=[[["SEARCH","PHONE_TYPE","IDCARD_TYPE","SEARCH_MORE"],"SELECT"],["DIGITAL","INPUT_NUMBER"],["CHECKBOX_BLOCK","CHECKBOX"],["RADIO_BLOCK","RADIO"],[["DATE-INPUT","DATETIME-INPUT"],"DATE"],["SWITCH_COMPONENT","SWITCH"],["SLIDER_COMPONENT","SLIDER"],["LEVEL_SEARCH_CASCADE","LEVEL_SEARCH_CASCADER"],["SEARCH_CASCADE","SEARCH_CASCADER"]];a.tap("__normalize",(t=>(s.some((([e,l])=>(Array.isArray(e)?e.includes(t.html_type):e===t.html_type)&&(t.html_type=l))),t)));const o=new Map([[["SELECT","SEARCH","SEARCH_MORE"],new Map([["H_TILE",t=>t.html_type=t.__multiple?"CHECKBOX":"RADIO"],["V_TILE",t=>{t.html_type=t.__multiple?"CHECKBOX":"RADIO",t.__vertical=!0}]])],["RADIO",new Map([["DROPDOWN",t=>t.html_type="SELECT"]])],["CHECKBOX",new Map([["DROPDOWN",t=>{t.__multiple=!0,t.html_type="SELECT"}]])]]);return a.tap({stage:9999,name:"__show_mode"},(e=>e.show_mode?([...o].some((([l,a])=>{if(!t(l).includes(e.html_type))return;const s=a.get(e.show_mode);return s&&s(e),!0})),e):e)),{FieldNormalizeWaterfallHook:a}}export{a as useFieldNormalize};
|
|
@@ -26,9 +26,11 @@ export declare function useUrlConfigOptions(props: {
|
|
|
26
26
|
}, valueRef: Ref): {
|
|
27
27
|
labelKey: import("vue").ComputedRef<string>;
|
|
28
28
|
valueKey: import("vue").ComputedRef<string>;
|
|
29
|
+
remoteOptions: Ref<AnyObject[] | null>;
|
|
29
30
|
filterOptions: import("vue").ComputedRef<AnyObject[]>;
|
|
30
31
|
fullOptions: import("vue").ComputedRef<AnyObject[]>;
|
|
31
32
|
fetchData: (content?: string) => Promise<null | undefined>;
|
|
33
|
+
searchContent: Ref<string | undefined>;
|
|
32
34
|
};
|
|
33
35
|
export declare function useAutographOptions(props: Partial<{
|
|
34
36
|
labelField: string;
|
|
@@ -40,8 +42,10 @@ export declare function useAutographOptions(props: Partial<{
|
|
|
40
42
|
options: AnyObject[];
|
|
41
43
|
}>, valueRef: Ref): {
|
|
42
44
|
labelKey: import("vue").ComputedRef<string>;
|
|
45
|
+
remoteOptions: Ref<AnyObject[] | null>;
|
|
43
46
|
valueKey: import("vue").ComputedRef<string>;
|
|
44
47
|
filterOptions: import("vue").ComputedRef<AnyObject[]>;
|
|
45
48
|
fullOptions: import("vue").ComputedRef<AnyObject[]>;
|
|
46
49
|
fetchData: (content?: string) => Promise<null | undefined>;
|
|
50
|
+
searchContent: Ref<string | undefined>;
|
|
47
51
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{checkInSetupEnv as e,jsonParse as n,keywordMatcher as t}from"../../../../shared/utils/index.js";import{useForm as l}from"@formily/vue";import{useMemoize as
|
|
1
|
+
import{checkInSetupEnv as e,jsonParse as n,keywordMatcher as t}from"../../../../shared/utils/index.js";import{useForm as l}from"@formily/vue";import{useMemoize as o,useDebounceFn as u}from"@vueuse/core";import{identity as r,uniqBy as a,isString as i,isEqual as c,isArray as s,omit as v,isFunction as m}from"lodash-es";import{computed as f,inject as d,ref as y,toRaw as p,watch as h}from"vue";import"../../index.js";import{InjectionAsyncQueue as g,InjectionFormLifeCycleCaller as w,InjectionFormItemDepsCollector as k}from"../constants/index.js";import{useFormField as b}from"./useFormField.js";import{createUrlConfigParams as C,formRenderLog as R}from"../utils/index.js";import{useFormRequest as O}from"./useFormRequest.js";function F(e,n){const t=y();return f({get:()=>t.value?t.value:e[n],set(e){t.value=e}})}const K=(()=>{const e=o((e=>new RegExp(`(.*)${e.split("").map((e=>`(${function(e){return e.match(/[()\[\]{}$^\/]/)?"\\"+e:e}(e)})`)).join("(.*)")}(.*)`)),{getKey:r});return(n,t)=>t.match(e(n))})();function q(){const e=y();return{searchContent:e,optionSearchFilter:function(n,l,o){if(!e.value)return n;const u=s(o)?o.filter((e=>e&&i(e))):[];return n.filter((n=>function(n,l,o){if(!e.value)return!0;const u=n?n[l]:"";return!!i(u)&&(!!K(e.value,u)||!!t(e.value,n.keyword)||!!o.length&&o.some((t=>i(n[t])&&n[t].includes(e.value))))}(n,l,u)))}}}function j(e,t,l,o,u){const r=F(e,"commonList"),i=F(e,"recentList"),{searchContent:c,optionSearchFilter:s}=q();function y(e){return n(e.itemObj)}const p=f((()=>{var e,n;return null!=(n=null==(e=r.value)?void 0:e.map(y))?n:[]})),h=f((()=>{var e,n;return null!=(n=null==(e=i.value)?void 0:e.map(y))?n:[]})),w=f((()=>{if(!e.recommend||!p.value.length&&!h.value.length)return t.value;const n=a(p.value.concat(h.value),(e=>e[u.value])),l=t.value.filter((e=>n.every((function(n){return n[u.value]!==e[u.value]}))));return[...s(n,o.value),...l]})),{getRecommendRequestInfo:k,getHttpInstance:C}=O();function R(n){const{url:t,getRecommendIds:l}=k(),o=m(l)?l():{},u=m(e.getRecommendInfo)?e.getRecommendInfo():{};return{url:t[n],info:Object.assign({},o,u)}}const{fieldKey:K}=b(),j=d(g);return{postRecommend:async function(n){if(!e.recommend)return;const t=C();if(!t)return;const{url:o,info:r}=R("post"),a=w.value.find((e=>e[u.value]===n));a&&l("postRecommend",await t.post(o,{...r,keyword:"",itemId:u.value,itemObj:JSON.stringify(a)}))},getRecommend:async function(n){if(!e.recommend)return;if(c.value=n,r.value&&i.value&&e.recommendCache)return;const t=await j.addAsync(function(n,t){const{url:l,info:o}=R("get");return{url:l,method:"get",key:n,cache:t,params:{...o,recNum:Math.max(e.commonNum,e.recentNum),keyword:""}}}(K.value,e.recommendCache)),{commonly:l,recently:o}=t.reduce(((e,n)=>("commonly"===n.type?e.commonly.push(v(n,["type"])):"recently"===n.type&&e.recently.push(v(n,["type"])),e)),{commonly:[],recently:[]});r.value=l.slice(0,e.commonNum),i.value=o.slice(0,e.recentNum)},sortedOptions:w}}function I(n,t){e();const l=d(g),o=d(w),r=f((()=>{var e,t,l;return null!=(l=null!=(t=null==(e=n.urlConfig)?void 0:e.nameKey)?t:n.labelField)?l:"text"})),a=f((()=>{var e,t,l;return null!=(l=null!=(t=null==(e=n.urlConfig)?void 0:e.valueKey)?t:n.valueField)?l:"value"})),{searchContent:s,optionSearchFilter:v}=q(),m=y(null),{field:O,fieldKey:F}=b(),K=u((async function(e){if(s.value=e||"",!n.urlConfig)return m.value=null;try{const e=await l.addAsync(await C({config:n.urlConfig,cache:n.requestCache,field:O.value}));p(m.value)!==e&&(m.value=e,o("afterOptionInit",[F.value,m.value]))}catch(e){i(e)&&R(e)}}),300),j=f((()=>m.value?v(m.value,r.value):Array.isArray(n.options)?v(n.options,r.value):[])),I=f((()=>m.value||n.options||[])),x=d(k);return h((()=>n.urlConfig),((e,l)=>{if(!c(e,l)){if(m.value=null,!e)return m.value=null;x.setDeps(F.value,e.dependKey||[],(async()=>{m.value=null,t.value=null,!n.lazyRequest&&await K()})),(t.value||!n.lazyRequest)&&K()}}),{immediate:!0}),{labelKey:r,valueKey:a,remoteOptions:m,filterOptions:j,fullOptions:I,fetchData:K,searchContent:s}}function x(n,t){e();const o=d(g),r=d(w),a=l(),v=f((()=>{var e,t,l,o;const u=null==(t=null==(e=n.wordbook)?void 0:e.render_key)?void 0:t[0];if(i(u))return u;let r=null==(l=n.wordbook)?void 0:l.show_key;return s(r)&&(r=r[0]),i(r)?r:null!=(o=n.labelField)?o:"text"})),m=f((()=>{var e,t,l;return null!=(l=null!=(t=null==(e=n.wordbook)?void 0:e.value_key)?t:n.valueField)?l:"value"})),C=f((()=>{var e;return(null==(e=n.wordbook)?void 0:e.search_key)||[]})),{searchContent:F,optionSearchFilter:K}=q(),j=y(null),{fieldKey:I}=b(),{getSearchRequestInfo:x}=O(),A=u((async function(e){if(F.value=e||"",!n.autograph||!n.wordbook)return j.value=null;try{const e=await o.addAsync(function(e,t,l){var o,u,r;const i={autograph:t,wordbookId:e.id,wordbookType:e.type,fieldKeys:e.search_key,keyword:"",page:1};if(null==(o=e.queryParams)?void 0:o.length){const n=null!=(r=null==(u=a.value)?void 0:u.getFormState().values)?r:{};e.queryParams.forEach((e=>{i[e]=n[e]}))}return console.log(i),{...x(),params:i,key:l,cache:n.requestCache}}(n.wordbook,n.autograph,I.value));p(j.value)!==e&&(j.value=e,r("afterOptionInit",[I.value,j.value]))}catch(e){i(e)&&R(e)}}),300),S=f((()=>j.value?K(j.value,v.value,C.value):Array.isArray(n.options)?K(n.options,v.value):[])),N=f((()=>j.value||n.options||[])),_=d(k);return h((()=>n.wordbook),((e,l)=>{if(!c(e,l)){if(j.value=null,!e)return j.value=null;_.setDeps(I.value,e.queryParams||[],(async()=>{j.value=null,A()})),(t.value||!n.lazyRequest)&&A()}}),{immediate:!0}),{labelKey:v,remoteOptions:j,valueKey:m,filterOptions:S,fullOptions:N,fetchData:A,searchContent:F}}export{K as searchContentMatcher,x as useAutographOptions,j as useRecommendOptions,I as useUrlConfigOptions};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{arrayed as e}from"../../../../shared/utils/index.js";import{once as r,isString as a}from"lodash-es";import"vue";import{registerValidateLocale as s}from"@formily/core";import"@formily/path";import"@vue/shared";import{isFunction as i}from"@vueuse/core";import"../../index.js";import{isIdCard as l}from"../utils/business.js";function t(){const r=new Map([["mobile",({validate:e})=>({format:"phone",message:null==e?void 0:e.message})],["integer",({validate:e})=>({format:"integer",message:null==e?void 0:e.message})],["number",({validate:e})=>({format:"number",message:null==e?void 0:e.message})],["id_card",({validate:e})=>({validator(r){var s;if(null!=r&&""!==r)return a(r)&&l(r)?void 0:null!=(s=null==e?void 0:e.message)?s:"该字段不是合法的身份证格式"}})],["regular",({validate:e,regular_expression:r,regular_error_tip:a})=>({pattern:r||(null==e?void 0:e.regular_expression)||"",message:a||(null==e?void 0:e.regular_error_tip)||(null==e?void 0:e.message)||"格式错误"})]]),s={triggerType:"onBlur"};return{createValidatorSchema:function(a){const l=[],{validate:{vali_obj:t,max_length:o,min_length:m,message:n,max_value:u,min_value:g,decimal_length:d}={},validator:v}=a;if(v&&e(v).forEach((e=>{i(e)&&l.push({validator:r=>e(r,a)})})),o&&l.push({max:o,message:n}),m&&l.push({min:m,message:n}),u&&l.push({maximum:u,message:n}),g&&l.push({minimum:g,message:n}),null!=d&&l.push(((e,r)=>{const a=null!=r?r:`小数位数最多${e}位`;return{validator(r){var s;return(null==(s=String(r).split(".")[1])?void 0:s.length)>e?a:""}}})(+d,n)),t){const e=r.get(t)||(({validate:e})=>({format:t,message:null==e?void 0:e.message}));l.push(Object.assign({},s,e(a)))}return l}}}const o=r((()=>{s({"zh-CN":{required:"${alias}为必填"}})}));export{t as useFormValidator,o as validateMessageLocale};
|
|
1
|
+
import{arrayed as e}from"../../../../shared/utils/index.js";import{once as r,isString as a}from"lodash-es";import"vue";import{registerValidateLocale as s}from"@formily/core";import"@formily/path";import"@vue/shared";import{isFunction as i}from"@vueuse/core";import"../../index.js";import{isIdCard as l}from"../utils/business.js";function t(){const r=new Map([["mobile",({validate:e})=>({format:"phone",message:null==e?void 0:e.message})],["integer",({validate:e})=>({format:"integer",message:null==e?void 0:e.message})],["number",({validate:e})=>({format:"number",message:null==e?void 0:e.message})],["id_card",({validate:e})=>({validator(r){var s;if(null!=r&&""!==r)return a(r)&&l(r)?void 0:null!=(s=null==e?void 0:e.message)?s:"该字段不是合法的身份证格式"}})],["regular",({validate:e,regular_expression:r,regular_error_tip:a})=>({pattern:r||(null==e?void 0:e.regular_expression)||"",message:a||(null==e?void 0:e.regular_error_tip)||(null==e?void 0:e.message)||"格式错误"})]]),s={triggerType:"onBlur"};return{createValidatorSchema:function(a){const l=[],{validate:{vali_obj:t,max_length:o,min_length:m,message:n,max_value:u,min_value:g,decimal_length:d}={},validator:v}=a;if(v&&e(v).forEach((e=>{i(e)&&l.push({validator:r=>e(r,a)})})),o&&l.push({max:o,message:n}),m&&l.push({min:m,message:n}),u&&l.push({maximum:u,message:n}),g&&l.push({minimum:g,message:n}),null!=d&&l.push(((e,r)=>{const a=null!=r?r:`小数位数最多${e}位`;return{validator(r){var s;return(null==(s=String(r).split(".")[1])?void 0:s.length)>e?a:""}}})(+d,n)),t){const e=r.get(t)||(({validate:e})=>({format:t,message:null==e?void 0:e.message}));l.push(Object.assign({},s,e(a)))}return l}}}const o=r((()=>{s({"zh-CN":{required:"${alias||name}为必填"}})}));export{t as useFormValidator,o as validateMessageLocale};
|
|
@@ -6,6 +6,7 @@ export * from '@formily/core';
|
|
|
6
6
|
declare type FieldBusinessType = 'password' | 'id_card' | 'age' | 'age_unit' | 'mobile' | 'telephone' | 'email' | 'sex' | 'birthday' | 'bank_card' | 'website' | 'gestational_weeks' | 'gestational_stage' | 'customer_name';
|
|
7
7
|
declare type HtmlType = 'INPUT' | 'TEXTAREA' | 'SELECT' | 'LINEBAR' | 'LINE_BREAKS' | 'INPUT_NUMBER' | 'REMOTE_SEARCH' | 'DATE' | 'LEVEL_SEARCH_CASCADER' | 'SEARCH_CASCADER' | 'COMBINATION' | 'RADIO' | 'CHECKBOX' | 'SWITCH' | 'SLIDER' | 'COMPLEX' | 'SEARCH' | 'PHONE_TYPE' | 'IDCARD_TYPE' | 'SEARCH_MORE' | 'DIGITAL' | 'CHECKBOX_BLOCK' | 'RADIO_BLOCK' | 'DATE-INPUT' | 'DATETIME-INPUT' | 'SWITCH_COMPONENT' | 'SLIDER_COMPONENT' | 'LEVEL_SEARCH_CASCADE' | 'SEARCH_CASCADE' | ({} & string);
|
|
8
8
|
declare type ValidateType = 'mobile' | 'integer' | 'number' | 'id_card' | 'regular' | string;
|
|
9
|
+
declare type ShowModeType = 'DROPDOWN' | 'H_TILE' | 'V_TILE' | 'TILE';
|
|
9
10
|
export declare type ValidateItem = Partial<{
|
|
10
11
|
/**
|
|
11
12
|
* 业务类型
|
|
@@ -137,8 +138,12 @@ export declare type FieldItem = {
|
|
|
137
138
|
is_not_fold: string;
|
|
138
139
|
remark: string;
|
|
139
140
|
free_entry: FormCommonState;
|
|
141
|
+
save_free_entry: FormCommonState;
|
|
140
142
|
initialize_high: number;
|
|
141
143
|
bindEventSetting: BindEventSettingItem[];
|
|
144
|
+
show_mode: ShowModeType;
|
|
145
|
+
is_allow_check_mid: FormCommonState;
|
|
146
|
+
allow_check_mid_level: '1' | '2' | '3' | '4';
|
|
142
147
|
fieldType: SchemaTypes;
|
|
143
148
|
content: string | FormRenderer | Record<string, FormRenderer>;
|
|
144
149
|
lazyRequest: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{inject as e,provide as t,computed as r,createVNode as n,Fragment as o}from"vue";import{arrayed as c}from"../../../../shared/utils/index.js";import{isGeneralField as u,isField as i}from"@formily/core";import{Path as s}from"@formily/path";import{isObject as f}from"@vue/shared";import{useMemoize as a}from"@vueuse/core";import{isString as l,isFunction as p,omit as h}from"lodash-es";import"../../index.js";import{NESTED_FORM_ITEM_TYPE as m}from"../constants/index.js";import"date-fns";import{traverseDependKey as d}from"./schema.js";export{assignClearBindVisited,assignUpdateValue,assignValueBindKey,createLinebarId,createObjSchema,createVisitedSetter,dotEscape,fieldKeyEscape,getParentLinebar,traverseDependKey,traverseSchema}from"./schema.js";function y(e){console.warn(`[FormRender]: ${e}`)}function x(e,t,r=["children","properties","suffixConfig"],n="val_key",o="default_val"){return function e(t,n){n.forEach((n=>{f(n)&&(null!=i(n)&&null==t[u(n)]&&s.setIn(t,u(n),i(n)),r.forEach((r=>{n[r]&&(t[u(n)]||(t[u(n)]={}),e(t[u(n)],c(n[r])))})))}))}(e,t),e;function u(e){return e[n]}function i(e){return e[o]}}function
|
|
1
|
+
import{inject as e,provide as t,computed as r,createVNode as n,Fragment as o}from"vue";import{arrayed as c}from"../../../../shared/utils/index.js";import{isGeneralField as u,isField as i}from"@formily/core";import{Path as s}from"@formily/path";import{isObject as f}from"@vue/shared";import{useMemoize as a}from"@vueuse/core";import{isString as l,isFunction as p,omit as h}from"lodash-es";import"../../index.js";import{NESTED_FORM_ITEM_TYPE as m}from"../constants/index.js";import"date-fns";import{traverseDependKey as d}from"./schema.js";export{assignClearBindVisited,assignUpdateValue,assignValueBindKey,createLinebarId,createObjSchema,createVisitedSetter,dotEscape,fieldKeyEscape,getParentLinebar,traverseDependKey,traverseSchema}from"./schema.js";function y(e){console.warn(`[FormRender]: ${e}`)}function x(e,t,r=["children","properties","suffixConfig"],n="val_key",o="default_val"){return function e(t,n){n.forEach((n=>{f(n)&&(null!=i(n)&&null==t[u(n)]&&s.setIn(t,u(n),i(n)),r.forEach((r=>{n[r]&&(t[u(n)]||(t[u(n)]={}),e(t[u(n)],c(n[r])))})))}))}(e,t),e;function u(e){return e[n]}function i(e){return e[o]}}function g(r,n){let o=e(r,null);return o||(o=n(),t(r,o)),o}function j(e){return l(e)?+e:e}function v(e,t,r){if(f(e)&&!p(e)){const r={};return Object.entries(e).forEach((([e,n])=>{p(n)&&(r[e]=()=>n(t))})),r}return{default:()=>p(e)?e(t):r?r(e):[e]}}function S(e,t){return r((()=>{const r={};return e.prefix&&(r.prefix=()=>n(o,null,[v(e.prefix,e,t).default()])),e.suffix&&(r.suffix=()=>n(o,null,[v(e.suffix,e,t).default()])),r}))}function E(e){if(!f(e))throw e;return t=e,Reflect.has(t,"map")&&Reflect.has(t,"result")?function(e){const{result:t,map:r}=e;if("SUCCESS"!==t)throw e;return r.rows}(e):function(e){return Reflect.has(e,"result")&&Reflect.has(e,"obj")}(e)?function(e){const{obj:t,result:r}=e;if("SUCCESS"!==r||!f(t))throw e;return Object.entries(t).reduce(((e,[t,r])=>(r.forEach((r=>e.push({...r,type:t}))),e)),[])}(e):function(e){return Reflect.has(e,"data")&&Reflect.has(e,"success")}(e)?function(e){const{data:t,success:r}=e;if(!r)throw e;return t}(e):[];var t}function b(e,t){return l(e)&&e?e.replace(/\$\{([^}]*)}/g,(function(e,r){const n=r.split("||");for(const e of n){const r=t[e.trim()];if(r)return r}return""})):""}function K(e){return e.reduce(((e,t)=>(l(t.extendKey)&&t.extendKey&&e.push(t),k(t)&&e.push(...K(t.children||[])),e)),[])}function w(e,t){const r=K(e);if(!r.length)return t;const n={},o=new Map;return Object.entries(t).forEach((([e,c])=>{const u=r.find((t=>t.val_key===e));if(!u)return n[e]=c;const{val_key:i,extendKey:s}=u,f=o.get(s)||{};o.set(s,f),f[i]=t[i]})),[...o.entries()].forEach((([e,t])=>{n[e]=JSON.stringify(t)})),n}function R(e,t){const r=K(e);if(!r.length)return t;const n=a((e=>{try{return f(t[e])?t[e]:JSON.parse(t[e])||{}}catch(e){return{}}})),o=h(t,r.map((e=>e.extendKey)));return r.forEach((({val_key:e,extendKey:t})=>{Reflect.has(o,e)||(o[e]=n(t)[e])})),o}function O(e){return e&&m.includes(e)}function k(e){return O(u(e)?e.componentType:e.html_type)}async function C({config:e,field:t,cache:r}){const n={},o=t.props.name.toString();try{d(e.dependKey||[],((e,r,o)=>{const c=t.query(e).take();if(!i(c)||o&&null==c.value)throw`缺少必须的参数=>${e}`;n[r]=c.value}))}catch(e){return Promise.reject(e)}return{...e,params:Object.assign({},e.params,n),key:o,cache:r}}export{w as combineExtendKey,S as createInputSlot,v as createSlot,C as createUrlConfigParams,y as formRenderLog,g as injectOrProvide,k as isNestedFieldType,O as isNestedType,x as mergeDeepProperties,j as parseNumberFromMaybeString,E as presetRequestHandler,R as splitExtendKey,b as validateMessageParser};
|