cnhis-design-vue 3.1.57-release.1 → 3.1.57-release.3

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.
Files changed (174) hide show
  1. package/es/components/button-print/index.d.ts +8 -8
  2. package/es/components/button-print/src/ButtonPrint.vue.d.ts +8 -8
  3. package/es/components/button-print/src/ButtonPrint.vue2.js +1 -1
  4. package/es/components/button-print/src/components/EditFormat.vue.d.ts +3 -3
  5. package/es/components/button-print/src/components/IdentityVerification.vue.d.ts +7 -7
  6. package/es/components/button-print/style/index.css +1 -1
  7. package/es/components/calendar/index.d.ts +276 -0
  8. package/es/components/calendar/index.js +1 -0
  9. package/es/components/calendar/src/Calendar.vue.d.ts +265 -0
  10. package/es/components/calendar/src/Calendar.vue.js +1 -0
  11. package/es/components/calendar/src/Calendar.vue2.js +1 -0
  12. package/es/components/calendar/src/types/index.d.ts +6 -0
  13. package/es/components/calendar/src/types/index.js +1 -0
  14. package/es/components/calendar/style/index.css +1 -0
  15. package/es/components/callback/src/components/render/popupMaps.d.ts +233 -224
  16. package/es/components/classification/index.d.ts +3 -3
  17. package/es/components/classification/src/components/search-filter/index.vue.d.ts +3 -3
  18. package/es/components/classification/src/components/set-classification/index.vue.d.ts +3 -3
  19. package/es/components/classification/src/index.vue.d.ts +3 -3
  20. package/es/components/date-picker/index.d.ts +1 -1
  21. package/es/components/date-picker/src/DatePicker.vue.d.ts +1 -1
  22. package/es/components/date-picker/src/DatePicker.vue2.js +1 -1
  23. package/es/components/expand-field/index.d.ts +98 -26
  24. package/es/components/expand-field/src/components/FormItemPerson.vue.d.ts +95 -23
  25. package/es/components/expand-field/src/components/PersonModal.vue.d.ts +95 -23
  26. package/es/components/expand-field/src/components/form.vue.d.ts +98 -26
  27. package/es/components/expand-field/src/index.vue.d.ts +98 -26
  28. package/es/components/fabric-chart/index.d.ts +4 -2
  29. package/es/components/fabric-chart/src/FabricChart.vue.d.ts +4 -2
  30. package/es/components/fabric-chart/src/FabricChart.vue2.js +1 -1
  31. package/es/components/fabric-chart/src/components/PopupMenu.js +1 -1
  32. package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogram.js +1 -1
  33. package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogramChart.js +1 -1
  34. package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
  35. package/es/components/fabric-chart/src/hooks/temperature/useOther.d.ts +1 -1
  36. package/es/components/fabric-chart/src/hooks/temperature/useOther.js +1 -1
  37. package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +1 -1
  38. package/es/components/fabric-chart/src/interface.d.ts +4 -3
  39. package/es/components/field-set/index.d.ts +107 -616
  40. package/es/components/field-set/index.js +1 -1
  41. package/es/components/field-set/src/FieldColor.vue.d.ts +1680 -0
  42. package/es/components/field-set/src/FieldColor.vue.js +1 -0
  43. package/es/components/field-set/src/FieldColor.vue2.js +1 -0
  44. package/es/components/field-set/src/FieldSet.vue.d.ts +58 -16
  45. package/es/components/field-set/src/FieldSet.vue2.js +1 -1
  46. package/es/components/field-set/src/Index.vue.d.ts +141 -0
  47. package/es/components/field-set/src/Index.vue.js +1 -0
  48. package/es/components/field-set/src/Index.vue2.js +1 -0
  49. package/es/components/field-set/src/components/Row.vue.d.ts +50 -9
  50. package/es/components/field-set/src/components/Row.vue2.js +1 -1
  51. package/es/components/field-set/src/components/condition.vue.d.ts +172 -0
  52. package/es/components/field-set/src/components/condition.vue.js +1 -0
  53. package/es/components/field-set/src/components/condition.vue2.js +1 -0
  54. package/es/components/field-set/src/components/edit-dialog.vue.d.ts +1194 -0
  55. package/es/components/field-set/src/components/edit-dialog.vue.js +1 -0
  56. package/es/components/field-set/src/components/edit-dialog.vue2.js +1 -0
  57. package/es/components/field-set/src/components/edit-filter.vue.d.ts +286 -0
  58. package/es/components/field-set/src/components/edit-filter.vue.js +1 -0
  59. package/es/components/field-set/src/components/edit-filter.vue2.js +1 -0
  60. package/es/components/field-set/src/constants/index.d.ts +55 -0
  61. package/es/components/field-set/src/constants/index.js +1 -0
  62. package/es/components/field-set/src/types/index.d.ts +31 -1
  63. package/es/components/field-set/src/utils/index.d.ts +2 -1
  64. package/es/components/field-set/src/utils/index.js +1 -1
  65. package/es/components/field-set/style/index.css +1 -1
  66. package/es/components/form-config/index.d.ts +79 -42
  67. package/es/components/form-config/src/FormConfig.vue.d.ts +79 -42
  68. package/es/components/form-config/src/FormConfig.vue2.js +1 -1
  69. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +17 -8
  70. package/es/components/form-config/src/components/FormConfigDragDisplay.vue.d.ts +5 -2
  71. package/es/components/form-config/src/components/FormConfigDragDisplay.vue2.js +1 -1
  72. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +23 -11
  73. package/es/components/form-config/src/components/FormConfigEventSetting.vue.d.ts +8 -8
  74. package/es/components/form-config/src/components/renderer/ComplexNode.vue.d.ts +5 -2
  75. package/es/components/form-config/src/components/renderer/ComplexNode.vue2.js +1 -1
  76. package/es/components/form-config/src/components/renderer/DefaultNode.vue2.js +1 -1
  77. package/es/components/form-config/src/constants/index.d.ts +3 -2
  78. package/es/components/form-config/src/constants/index.js +1 -1
  79. package/es/components/form-config/src/hooks/useSortalbeConfig.d.ts +16 -12
  80. package/es/components/form-config/src/hooks/useSortalbeConfig.js +1 -1
  81. package/es/components/form-config/src/types/index.d.ts +14 -2
  82. package/es/components/form-render/index.d.ts +17 -8
  83. package/es/components/form-render/index.js +1 -1
  84. package/es/components/form-render/src/FormRender.vue.d.ts +17 -8
  85. package/es/components/form-render/src/FormRender.vue2.js +1 -1
  86. package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +17 -8
  87. package/es/components/form-render/src/components/renderer/combination/combination.d.ts +12 -0
  88. package/es/components/form-render/src/components/renderer/combination/combination.js +1 -1
  89. package/es/components/form-render/src/components/renderer/combination/hooks/useCombination.d.ts +1 -1
  90. package/es/components/form-render/src/components/renderer/combination/hooks/useCombination.js +1 -1
  91. package/es/components/form-render/src/components/renderer/combination/jsonCombination.d.ts +12 -0
  92. package/es/components/form-render/src/components/renderer/combination/jsonCombination.js +1 -1
  93. package/es/components/form-render/src/components/renderer/switch.js +1 -1
  94. package/es/components/form-render/src/hooks/index.d.ts +1 -0
  95. package/es/components/form-render/src/hooks/index.js +1 -1
  96. package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
  97. package/es/components/form-render/src/hooks/useFieldNormalize.d.ts +2 -2
  98. package/es/components/form-render/src/hooks/useLowCodeReactions.d.ts +1 -1
  99. package/es/components/form-render/src/hooks/useNewLowCodeReactions.d.ts +6 -0
  100. package/es/components/form-render/src/hooks/useNewLowCodeReactions.js +1 -0
  101. package/es/components/form-render/src/types/fieldItem.d.ts +1 -0
  102. package/es/components/form-render/src/types/index.d.ts +1 -1
  103. package/es/components/guide/src/renderer.d.ts +2 -2
  104. package/es/components/iho-table/index.d.ts +216 -216
  105. package/es/components/iho-table/src/IhoTable.vue.d.ts +216 -216
  106. package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/filter.vue.d.ts +1 -1
  107. package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue.d.ts +3 -1
  108. package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue2.js +1 -1
  109. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +1 -1
  110. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useAutoFocus.js +1 -1
  111. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.d.ts +1 -1
  112. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue2.js +1 -1
  113. package/es/components/iho-table/src/types/index.d.ts +1 -0
  114. package/es/components/index.css +1 -1
  115. package/es/components/index.d.ts +2 -1
  116. package/es/components/index.js +1 -1
  117. package/es/components/info-header/index.d.ts +41 -23
  118. package/es/components/info-header/src/InfoHeader.vue.d.ts +41 -23
  119. package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +1 -1
  120. package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +1 -1
  121. package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +18 -9
  122. package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +17 -8
  123. package/es/components/keyboard/index.d.ts +1 -1
  124. package/es/components/keyboard/src/Keyboard.vue.d.ts +1 -1
  125. package/es/components/quick-search/index.d.ts +3 -3
  126. package/es/components/quick-search/src/index.vue.d.ts +3 -3
  127. package/es/components/recommend-search/index.d.ts +6 -6
  128. package/es/components/recommend-search/src/RecommendSearch.vue.d.ts +6 -6
  129. package/es/components/recommend-search/src/components/BaseSearch.d.ts +1 -1
  130. package/es/components/recommend-search/src/components/RecommendInput.vue.d.ts +1 -1
  131. package/es/components/recommend-search/src/components/RecommendSelect.vue.d.ts +1 -1
  132. package/es/components/scale-view/index.d.ts +3 -3
  133. package/es/components/scale-view/src/ScaleView.vue.d.ts +3 -3
  134. package/es/components/scale-view/src/components/formitem/standard-modal.d.ts +1 -1
  135. package/es/components/scale-view/src/hooks/use-component.d.ts +1 -1
  136. package/es/components/select-label/index.d.ts +2 -2
  137. package/es/components/select-label/src/LabelFormContent.vue.d.ts +1 -1
  138. package/es/components/select-label/src/SelectLabel.vue.d.ts +1 -1
  139. package/es/components/select-label/src/index.vue.d.ts +1 -1
  140. package/es/components/select-person/index.d.ts +95 -23
  141. package/es/components/select-person/src/SelectPerson.vue.d.ts +84 -17
  142. package/es/components/select-person/src/SelectPerson.vue2.js +1 -1
  143. package/es/components/select-person/src/types/enums.d.ts +9 -0
  144. package/es/components/select-person/src/types/enums.js +1 -1
  145. package/es/components/select-person/style/index.css +1 -1
  146. package/es/components/shortcut-provider/src/hooks/useShortcuts.js +1 -1
  147. package/es/components/shortcut-setter/index.d.ts +18 -8
  148. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +18 -8
  149. package/es/components/table-export-field/index.d.ts +3 -3
  150. package/es/components/table-export-field/src/components/SaveProjectModal.vue.d.ts +3 -3
  151. package/es/components/table-export-field/src/index.vue.d.ts +3 -3
  152. package/es/components/table-filter/src/components/bi-filter/ValueCfg.vue.d.ts +1 -1
  153. package/es/components/table-filter/src/components/bi-filter/components/Date.vue.d.ts +1 -1
  154. package/es/components/table-filter/src/components/bi-filter/components/index.d.ts +1 -1
  155. package/es/components/table-filter/src/components/bi-filter/index.vue.d.ts +1 -1
  156. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +2 -2
  157. package/es/components/table-filter/src/components/classify-filter/components/Date.vue.d.ts +1 -1
  158. package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue.d.ts +1 -1
  159. package/es/components/table-filter/src/components/classify-filter/components/index.d.ts +2 -2
  160. package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +2 -2
  161. package/es/components/table-filter/src/components/render-widget/components/DateInner.vue.d.ts +1 -1
  162. package/es/components/table-filter/src/components/render-widget/components/DateOut.vue.d.ts +1 -1
  163. package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue.d.ts +1 -1
  164. package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue.d.ts +1 -1
  165. package/es/components/table-filter/src/components/render-widget/components/index.d.ts +4 -4
  166. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +4 -4
  167. package/es/components/time-line/index.d.ts +7 -7
  168. package/es/components/time-line/src/TimeLine.vue.d.ts +3 -3
  169. package/es/shared/package.json.js +1 -1
  170. package/es/shared/types/business.d.ts +23 -3
  171. package/es/shared/utils/business.d.ts +2 -1
  172. package/es/shared/utils/business.js +1 -1
  173. package/es/shared/utils/index.js +1 -1
  174. package/package.json +8 -2
@@ -139,7 +139,10 @@ declare const _default: import("vue").DefineComponent<{}, {
139
139
  default: boolean;
140
140
  };
141
141
  lowCodeReactions: {
142
- type: import("vue").PropType<import("../../../shared/types").LowCodeTypes.reactionsConfig[]>;
142
+ type: import("vue").PropType<import("../../../shared/types").LowCodeTypes.reactionConfig[]>;
143
+ };
144
+ newLowCodeReactions: {
145
+ type: import("vue").PropType<import("../../../shared/types").LowCodeTypes.newReactionConfig[]>;
143
146
  };
144
147
  operationalForm: {
145
148
  type: import("vue").PropType<import("../../../shared/types").LowCodeTypes.operationalConfig[]>;
@@ -301,7 +304,10 @@ declare const _default: import("vue").DefineComponent<{}, {
301
304
  default: boolean;
302
305
  };
303
306
  lowCodeReactions: {
304
- type: import("vue").PropType<import("../../../shared/types").LowCodeTypes.reactionsConfig[]>;
307
+ type: import("vue").PropType<import("../../../shared/types").LowCodeTypes.reactionConfig[]>;
308
+ };
309
+ newLowCodeReactions: {
310
+ type: import("vue").PropType<import("../../../shared/types").LowCodeTypes.newReactionConfig[]>;
305
311
  };
306
312
  operationalForm: {
307
313
  type: import("vue").PropType<import("../../../shared/types").LowCodeTypes.operationalConfig[]>;
@@ -334,7 +340,7 @@ declare const _default: import("vue").DefineComponent<{}, {
334
340
  onScroll?: ((...args: any[]) => any) | undefined;
335
341
  onAnnotationChange?: ((...args: any[]) => any) | undefined;
336
342
  }>>;
337
- emit: (event: "formChange" | "scroll" | "annotationChange", ...args: any[]) => void;
343
+ emit: (event: "scroll" | "formChange" | "annotationChange", ...args: any[]) => void;
338
344
  cssVars: import("vue").ComputedRef<import("vue").CSSProperties>;
339
345
  nuiThemeOverrides: import("naive-ui").GlobalThemeOverrides;
340
346
  formRenderRef: import("vue").Ref<HTMLElement | undefined>;
@@ -392,7 +398,7 @@ declare const _default: import("vue").DefineComponent<{}, {
392
398
  [x: string]: any;
393
399
  }>;
394
400
  lowCodeReactionsHandler: (field: string) => void;
395
- triggerAllReactionsHandler: () => void;
401
+ newLowCodeReactionsHandler: (field: string) => void;
396
402
  operationalFormHandler: {
397
403
  trigger(fieldKey: string): void;
398
404
  triggerAll(): void;
@@ -486,7 +492,7 @@ declare const _default: import("vue").DefineComponent<{}, {
486
492
  businessFormatter: import("../../../components/form-render").FormBusinessFormatter;
487
493
  requestInstance: import("../..").FormRequestDefine.RequestInstance;
488
494
  enterToNextWidget: boolean | ((fieldItem: import("../../../components/form-render").FieldItem) => boolean | void);
489
- lowCodeReactions: import("../../../shared/types").LowCodeTypes.reactionsConfig[];
495
+ lowCodeReactions: import("../../../shared/types").LowCodeTypes.reactionConfig[];
490
496
  linebarAutoHidden: boolean;
491
497
  bordered: string | boolean;
492
498
  uniqueCacheData: boolean;
@@ -670,7 +676,7 @@ declare const _default: import("vue").DefineComponent<{}, {
670
676
  readonly displayDirective: "if" | "show" | "show:lazy";
671
677
  }>;
672
678
  NTabs: any;
673
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("formChange" | "scroll" | "annotationChange")[], "scroll" | "formChange" | "annotationChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
679
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("scroll" | "formChange" | "annotationChange")[], "scroll" | "formChange" | "annotationChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
674
680
  fieldList: {
675
681
  type: import("vue").PropType<import("../../../components/form-render").FieldItem[]>;
676
682
  };
@@ -803,7 +809,10 @@ declare const _default: import("vue").DefineComponent<{}, {
803
809
  default: boolean;
804
810
  };
805
811
  lowCodeReactions: {
806
- type: import("vue").PropType<import("../../../shared/types").LowCodeTypes.reactionsConfig[]>;
812
+ type: import("vue").PropType<import("../../../shared/types").LowCodeTypes.reactionConfig[]>;
813
+ };
814
+ newLowCodeReactions: {
815
+ type: import("vue").PropType<import("../../../shared/types").LowCodeTypes.newReactionConfig[]>;
807
816
  };
808
817
  operationalForm: {
809
818
  type: import("vue").PropType<import("../../../shared/types").LowCodeTypes.operationalConfig[]>;
@@ -839,7 +848,6 @@ declare const _default: import("vue").DefineComponent<{}, {
839
848
  anchor: boolean;
840
849
  maxHeight: string | number;
841
850
  column: number;
842
- forceClearable: boolean;
843
851
  components: Record<string, import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | import("vue").FunctionalComponent<{}, {}>>;
844
852
  initialData: import("../../../shared/types").AnyObject;
845
853
  parallelism: number;
@@ -850,6 +858,7 @@ declare const _default: import("vue").DefineComponent<{}, {
850
858
  bordered: string | boolean;
851
859
  uniqueCacheData: boolean;
852
860
  outBordered: boolean;
861
+ forceClearable: boolean;
853
862
  operationalFormInit: boolean;
854
863
  }>;
855
864
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
@@ -11,6 +11,10 @@ export declare const COMBINATION: import("vue").DefineComponent<{
11
11
  maxGroupNum: {
12
12
  type: NumberConstructor;
13
13
  };
14
+ minGroupNum: {
15
+ type: NumberConstructor;
16
+ default: number;
17
+ };
14
18
  disabled: {
15
19
  type: BooleanConstructor;
16
20
  };
@@ -22,6 +26,7 @@ export declare const COMBINATION: import("vue").DefineComponent<{
22
26
  type: PropType<boolean | CombinationItemDeletableFn>;
23
27
  default: boolean;
24
28
  };
29
+ showLabel: BooleanConstructor;
25
30
  onInput: {};
26
31
  onBlur: {};
27
32
  onChange: {};
@@ -36,6 +41,10 @@ export declare const COMBINATION: import("vue").DefineComponent<{
36
41
  maxGroupNum: {
37
42
  type: NumberConstructor;
38
43
  };
44
+ minGroupNum: {
45
+ type: NumberConstructor;
46
+ default: number;
47
+ };
39
48
  disabled: {
40
49
  type: BooleanConstructor;
41
50
  };
@@ -47,6 +56,7 @@ export declare const COMBINATION: import("vue").DefineComponent<{
47
56
  type: PropType<boolean | CombinationItemDeletableFn>;
48
57
  default: boolean;
49
58
  };
59
+ showLabel: BooleanConstructor;
50
60
  onInput: {};
51
61
  onBlur: {};
52
62
  onChange: {};
@@ -54,7 +64,9 @@ export declare const COMBINATION: import("vue").DefineComponent<{
54
64
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
55
65
  }, {
56
66
  disabled: boolean;
67
+ showLabel: boolean;
57
68
  title: string;
69
+ minGroupNum: number;
58
70
  combinationItemDeletable: boolean | CombinationItemDeletableFn;
59
71
  properties: FieldItem[];
60
72
  }>;
@@ -1 +1 @@
1
- import{defineComponent as e,inject as o,createVNode as r}from"vue";import{isObjectField as t}from"@formily/core";import{connect as i,RecursionField as n}from"@formily/vue";import{range as m}from"lodash-es";import"../../../../index.js";import{InjectionBusinessCollector as a,InjectionFormGlobalProps as s}from"../../../constants/index.js";import"../../../../../../shared/utils/index.js";import"@formily/path";import"@vicons/ionicons5";import"@vue/shared";import"@vueuse/core";import"naive-ui";import"date-fns";import{createObjSchema as l}from"../../../utils/schema.js";import{useCombination as u}from"./hooks/useCombination.js";import{useFormField as p}from"../../../hooks/useFormField.js";import{useFieldListAdaptor as c}from"../../../hooks/useFieldListAdaptor.js";const f=i(e({name:"FormCombination",props:{title:{type:String,default:""},value:{type:Array},maxGroupNum:{type:Number},disabled:{type:Boolean},properties:{type:Array,default:()=>[]},combinationItemDeletable:{type:[Boolean,Function],default:!0},onInput:{},onBlur:{},onChange:{}},emits:["update:value"],setup(e){const{field:i,fieldKey:f}=p(),{currentGroupNum:d,renderRemoveBtn:v,renderHeader:y}=u(e);function h(){d.value++}const b=o(a),C=o(s),{schemaAdaptor:j}=c(b,C.lifeCycle);return()=>r("section",{class:"form-render__combination"},[y({onClick:h}),m(d.value).map(((o,m)=>r("section",{class:"form-render__combinationContent"},[r(n,{schema:l(j(e.properties)),name:m},null),v({onClick:()=>async function(e){if(d.value>1)d.value--,await i.value.remove(e);else{const o=i.value.query(`${f.value}.${e}`).take();if(!o||!t(o))return;await o.reset()}}(m),class:"form-render__combinationClose"},m)])))])}}));export{f as COMBINATION};
1
+ import{defineComponent as e,inject as o,createVNode as r}from"vue";import{isObjectField as t}from"@formily/core";import{connect as i,RecursionField as n}from"@formily/vue";import{range as m}from"lodash-es";import"../../../../index.js";import{InjectionBusinessCollector as a,InjectionFormGlobalProps as s}from"../../../constants/index.js";import"../../../../../../shared/utils/index.js";import"@formily/path";import"@vicons/ionicons5";import"@vue/shared";import"@vueuse/core";import"naive-ui";import"date-fns";import{createObjSchema as u}from"../../../utils/schema.js";import{useCombination as l}from"./hooks/useCombination.js";import{useFormField as p}from"../../../hooks/useFormField.js";import{useFieldListAdaptor as c}from"../../../hooks/useFieldListAdaptor.js";const f=i(e({name:"FormCombination",props:{title:{type:String,default:""},value:{type:Array},maxGroupNum:{type:Number},minGroupNum:{type:Number,default:1},disabled:{type:Boolean},properties:{type:Array,default:()=>[]},combinationItemDeletable:{type:[Boolean,Function],default:!0},showLabel:Boolean,onInput:{},onBlur:{},onChange:{}},emits:["update:value"],setup(e){const{field:i,fieldKey:f}=p(),{currentGroupNum:d,renderRemoveBtn:v,renderHeader:y}=l(e);function h(){d.value++}const b=o(a),C=o(s),{schemaAdaptor:j}=c(b,C.lifeCycle);return()=>r("section",{class:"form-render__combination"},[y({onClick:h}),m(d.value).map(((o,m)=>r("section",{class:"form-render__combinationContent"},[r(n,{schema:u(j(e.properties)),name:m},null),v({onClick:()=>async function(o){if(d.value>e.minGroupNum)d.value--,await i.value.remove(o);else{const e=i.value.query(`${f.value}.${o}`).take();if(!e||!t(e))return;await e.reset()}}(m),class:"form-render__combinationClose"},m)])))])}}));export{f as COMBINATION};
@@ -1,7 +1,7 @@
1
1
  import { AnyObject } from '../../../../../../../shared/types';
2
2
  export declare function useCombination(props: AnyObject): {
3
3
  deletableList: import("vue").Ref<boolean[]>;
4
- currentGroupNum: import("vue").Ref<number>;
4
+ currentGroupNum: any;
5
5
  maxGroupNum: import("vue").ComputedRef<number>;
6
6
  renderHeader: (attrs: AnyObject) => JSX.Element;
7
7
  renderRemoveBtn: (attrs: AnyObject, idx: number) => JSX.Element;
@@ -1 +1 @@
1
- import{ref as e,computed as o,watch as r,onBeforeUnmount as t,createVNode as a,mergeProps as m}from"vue";import{autorun as i}from"@formily/reactive";import{AddCircleOutline as n,RemoveCircle as l}from"@vicons/ionicons5";import{isNumber as u,isArray as c,isFunction as d}from"lodash-es";import{NButton as s,NIcon as p}from"naive-ui";import"../../../../../index.js";import{useFormField as v}from"../../../../hooks/useFormField.js";function f(f){const{field:b}=v(),x=e(1),h=o((()=>u(f.maxGroupNum)?f.maxGroupNum<1?0:~~f.maxGroupNum:1/0));r((()=>f.value),(e=>{c(e)&&(x.value=Math.min(Math.max(e.length,1),h.value))}),{immediate:!0});const G=e([]);return t(i((()=>{c(b.value.value)&&(G.value=b.value.value.map(((e,o)=>d(f.combinationItemDeletable)?f.combinationItemDeletable(e||{},o):f.combinationItemDeletable)))}))),{deletableList:G,currentGroupNum:x,maxGroupNum:h,renderHeader:function(e){return a("header",{class:"form-render__combinationHeader"},[a("div",{class:"form-render__combinationHeaderText"},[f.title]),a(s,m(e,{text:!0,style:{"--n-text-color":"var(--c-primary-color)"},disabled:x.value>=h.value||f.disabled}),{icon:()=>a(p,{component:n},null),default:()=>"新增"})])},renderRemoveBtn:function(e,o){return a(s,m(e,{text:!0,disabled:!G.value[o],type:"error",size:"small"}),{icon:()=>a(p,{component:l},null)})}}}export{f as useCombination};
1
+ import{ref as e,computed as o,watch as r,onBeforeUnmount as t,createVNode as m,mergeProps as a}from"vue";import{autorun as n}from"@formily/reactive";import{AddCircleOutline as i,RemoveCircle as l}from"@vicons/ionicons5";import{isNumber as u,isArray as c,isFunction as d}from"lodash-es";import{NButton as s,NIcon as p}from"naive-ui";import"../../../../../index.js";import{useFormField as v}from"../../../../hooks/useFormField.js";function f(f){var b;const{field:x}=v(),h=e(null!=(b=f.minGroupNum)?b:1),G=o((()=>u(f.maxGroupNum)?f.maxGroupNum<1?0:~~f.maxGroupNum:1/0));r((()=>f.value),(e=>{c(e)&&(h.value=Math.min(Math.max(e.length,f.minGroupNum),G.value))}),{immediate:!0});const N=e([]);return t(n((()=>{c(x.value.value)&&(N.value=x.value.value.map(((e,o)=>d(f.combinationItemDeletable)?f.combinationItemDeletable(e||{},o):f.combinationItemDeletable)))}))),{deletableList:N,currentGroupNum:h,maxGroupNum:G,renderHeader:function(e){return m("header",{class:"form-render__combinationHeader"},[f.showLabel?m("div",{class:"form-render__combinationHeaderText"},[f.title]):null,m(s,a(e,{text:!0,style:{"--n-text-color":"var(--c-primary-color)"},disabled:h.value>=G.value||f.disabled}),{icon:()=>m(p,{component:i},null),default:()=>"新增"})])},renderRemoveBtn:function(e,o){return m(s,a(e,{text:!0,disabled:!N.value[o],type:"error",size:"small"}),{icon:()=>m(p,{component:l},null)})}}}export{f as useCombination};
@@ -11,10 +11,15 @@ export declare const JSON_COMBINATION: import("vue").DefineComponent<{
11
11
  maxGroupNum: {
12
12
  type: NumberConstructor;
13
13
  };
14
+ minGroupNum: {
15
+ type: NumberConstructor;
16
+ default: number;
17
+ };
14
18
  properties: {
15
19
  type: PropType<FieldItem[]>;
16
20
  default: () => never[];
17
21
  };
22
+ showLabel: BooleanConstructor;
18
23
  onInput: {};
19
24
  onBlur: {};
20
25
  onChange: {};
@@ -29,16 +34,23 @@ export declare const JSON_COMBINATION: import("vue").DefineComponent<{
29
34
  maxGroupNum: {
30
35
  type: NumberConstructor;
31
36
  };
37
+ minGroupNum: {
38
+ type: NumberConstructor;
39
+ default: number;
40
+ };
32
41
  properties: {
33
42
  type: PropType<FieldItem[]>;
34
43
  default: () => never[];
35
44
  };
45
+ showLabel: BooleanConstructor;
36
46
  onInput: {};
37
47
  onBlur: {};
38
48
  onChange: {};
39
49
  }>> & {
40
50
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
41
51
  }, {
52
+ showLabel: boolean;
42
53
  title: string;
54
+ minGroupNum: number;
43
55
  properties: FieldItem[];
44
56
  }>;
@@ -1 +1 @@
1
- import{defineComponent as e,ref as o,computed as r,watch as t,onMounted as n,createVNode as i}from"vue";import{isField as l}from"@formily/core";import{Path as a}from"@formily/path";import{AddCircleOutline as u,RemoveCircle as s}from"@vicons/ionicons5";import{isNumber as m,range as p,isArray as c,isEqual as f}from"lodash-es";import"../../../../index.js";import{useDeepValidate as v}from"./hooks/useDeepValidate.js";import{connect as d,mapProps as y}from"@formily/vue";import{useDebounceFn as h,isObject as g}from"@vueuse/core";import{NButton as x,NIcon as b}from"naive-ui";import N from"../../../FormRender.vue.js";import{formRenderLog as _,mergeDeepProperties as C}from"../../../utils/index.js";import{assignUpdateValue as j}from"../../../utils/schema.js";const I=d(e({name:"FormJsonCombination",props:{title:{type:String,default:""},value:{type:[String,Array]},maxGroupNum:{type:Number},properties:{type:Array,default:()=>[]},onInput:{},onBlur:{},onChange:{}},emits:["update:value"],setup(e,{emit:d}){_("当前COMBINATION控件为json模式,推荐使用非json模式,FieldItem.jsonCombination=false");const y=h((function(){d("update:value",JSON.stringify(j.value))}),300),j=o([]),I=r((()=>j.value.length));function S(o,r=!1){c(o)&&(o.length||o.push({}),o=JSON.stringify(o));const t=function(e){try{if(!e)return null;const o=JSON.parse(e);return Array.isArray(o)?o:null}catch(e){return null}}(o);var n;(n=t)&&!f(n,j.value)&&(t.splice(O.value),t.forEach((function(o,t){if(!g(o))return;j.value[t]=o,r&&C(o,e.properties)})),j.value.splice(t.length),j.value.forEach(F))}t((()=>e.value),(e=>S(e))),n((()=>{S(e.value||"[{}]",!0),y()}));const A=o([]);function F(e,o){var r;null==(r=A.value[o])||r.setFieldState("*",(o=>{l(o)&&(o.value=a.getIn(e,o.path))}))}function J(){j.value.push(C({},e.properties)),y()}v().bindDeepValidate(A);const O=r((()=>m(e.maxGroupNum)?e.maxGroupNum<1?0:~~e.maxGroupNum:1/0));t(O,(e=>{I.value<=e||(j.value.splice(e),y(),A.value.splice(e))}),{immediate:!0});const G=N;return()=>i("section",{class:"form-render__combination"},[i("header",{class:"form-render__combinationHeader"},[i("div",{class:"form-render__combinationHeaderText"},[e.title]),i(x,{onClick:J,style:{"--n-text-color":"var(--c-primary-color)"},text:!0,disabled:I.value>=O.value},{icon:()=>i(b,{component:u},null),default:()=>"新增"})]),p(I.value).map(((o,r)=>i("section",{class:"form-render__combinationContentJson"},[i(G,{ref:e=>function(e,o){A.value[e]=o,F(j.value[e]||{},e)}(r,e),fieldList:e.properties,onFormChange:e=>function(e,{fieldKey:o,value:r}){!j.value[e]&&(j.value[e]={}),a.setIn(j.value[e],o,r),y()}(r,e)},null),i(x,{text:!0,class:"form-render__combinationClose",type:"error",onClick:()=>function(e){j.value.length>1?(j.value.splice(e,1),A.value.splice(e,1)):j.value.splice(e,1,{}),y()}(r)},{icon:()=>i(b,{component:s},null)})])))])}}),y(j));export{I as JSON_COMBINATION};
1
+ import{defineComponent as e,ref as o,computed as r,watch as n,onMounted as t,createVNode as i}from"vue";import{isField as l}from"@formily/core";import{Path as u}from"@formily/path";import{AddCircleOutline as a,RemoveCircle as m}from"@vicons/ionicons5";import{range as s,isNumber as p,isArray as c,isEqual as f}from"lodash-es";import"../../../../index.js";import{useDeepValidate as v}from"./hooks/useDeepValidate.js";import{connect as d,mapProps as y}from"@formily/vue";import{useDebounceFn as h,isObject as N}from"@vueuse/core";import{NButton as b,NIcon as g}from"naive-ui";import x from"../../../FormRender.vue.js";import{formRenderLog as _,mergeDeepProperties as j}from"../../../utils/index.js";import{assignUpdateValue as C}from"../../../utils/schema.js";const G=d(e({name:"FormJsonCombination",props:{title:{type:String,default:""},value:{type:[String,Array]},maxGroupNum:{type:Number},minGroupNum:{type:Number,default:1},properties:{type:Array,default:()=>[]},showLabel:Boolean,onInput:{},onBlur:{},onChange:{}},emits:["update:value"],setup(e,{emit:d}){_("当前COMBINATION控件为json模式,推荐使用非json模式,FieldItem.jsonCombination=false");const y=h((function(){d("update:value",JSON.stringify(C.value))}),300),C=o([]),G=r((()=>C.value.length));function I(o,r=!1){c(o)&&(o.length||o.push(...s(e.minGroupNum).map((()=>({})))),o=JSON.stringify(o));const n=function(e){try{if(!e)return null;const o=JSON.parse(e);return Array.isArray(o)?o:null}catch(e){return null}}(o);var t;(t=n)&&!f(t,C.value)&&(n.splice(J.value),n.forEach((function(o,n){if(!N(o))return;C.value[n]=o,r&&j(o,e.properties)})),C.value.splice(n.length),C.value.forEach(A))}n((()=>e.value),(e=>I(e))),t((()=>{const o=`[${s(e.minGroupNum).map((()=>"{}")).join(",")}]`;I(e.value||o,!0),y()}));const S=o([]);function A(e,o){var r;null==(r=S.value[o])||r.setFieldState("*",(o=>{l(o)&&(o.value=u.getIn(e,o.path))}))}function F(){C.value.push(j({},e.properties)),y()}v().bindDeepValidate(S);const J=r((()=>p(e.maxGroupNum)?e.maxGroupNum<1?0:~~e.maxGroupNum:1/0));n(J,(e=>{G.value<=e||(C.value.splice(e),y(),S.value.splice(e))}),{immediate:!0});const O=x;return()=>i("section",{class:"form-render__combination"},[i("header",{class:"form-render__combinationHeader"},[i("div",{class:"form-render__combinationHeaderText"},[e.title]),i(b,{onClick:F,style:{"--n-text-color":"var(--c-primary-color)"},text:!0,disabled:G.value>=J.value},{icon:()=>i(g,{component:a},null),default:()=>"新增"})]),s(G.value).map(((o,r)=>i("section",{class:"form-render__combinationContentJson"},[i(O,{ref:e=>function(e,o){S.value[e]=o,A(C.value[e]||{},e)}(r,e),fieldList:e.properties,onFormChange:e=>function(e,{fieldKey:o,value:r}){!C.value[e]&&(C.value[e]={}),u.setIn(C.value[e],o,r),y()}(r,e)},null),i(b,{text:!0,class:"form-render__combinationClose",type:"error",onClick:()=>function(o){C.value.length>e.minGroupNum?(C.value.splice(o,1),S.value.splice(o,1)):C.value.splice(o,1,{}),y()}(r)},{icon:()=>i(g,{component:m},null)})])))])}}),y(C));export{G as JSON_COMBINATION};
@@ -1 +1 @@
1
- import{defineComponent as e,computed as o,createVNode as r,createTextVNode as t}from"vue";import{NSwitch as i,NCheckbox as l}from"naive-ui";import"../../../../../shared/utils/index.js";import"@formily/core";import"@formily/path";import"@vicons/ionicons5";import"@vue/shared";import"@vueuse/core";import"lodash-es";import"date-fns";import{assignUpdateValue as u,assignValueBindKey as n}from"../../utils/schema.js";import{connect as a,mapProps as p}from"@formily/vue";const s=a(e({name:"FormSwitch",props:{value:{},openDescription:{type:Object},closeDescription:{type:Object},showMode:{type:String,default:"switch"},onChange:{}},emits:["update:value"],setup(e,{emit:u}){const n=o((()=>{var o,r;return null==(r=null==(o=e.openDescription)?void 0:o.value)||r})),a=o((()=>{var o,r;return null!=(r=null==(o=e.closeDescription)?void 0:o.value)&&r})),p=()=>{var o,r;return t(null!=(r=null==(o=e.openDescription)?void 0:o.describe)?r:"")},s=()=>{var o,r;return t(null!=(r=null==(o=e.closeDescription)?void 0:o.describe)?r:"")},c=o({get:()=>e.value===n.value,set:e=>u("update:value",e?n.value:a.value)});return()=>"SWITCH"===e.showMode?r(i,{value:c.value,"onUpdate:value":e=>c.value=e},{checked:p,unchecked:s}):r(l,{checked:c.value,"onUpdate:checked":e=>c.value=e},{default:p})}}),p(u,n));export{s as SWITCH};
1
+ import{defineComponent as e,computed as o,createVNode as r,createTextVNode as t}from"vue";import{NSwitch as i,NCheckbox as l}from"naive-ui";import"../../../../../shared/utils/index.js";import"@formily/core";import"@formily/path";import"@vicons/ionicons5";import"@vue/shared";import"@vueuse/core";import"lodash-es";import"date-fns";import{assignUpdateValue as u,assignValueBindKey as n}from"../../utils/schema.js";import{connect as a,mapProps as p}from"@formily/vue";const s=a(e({name:"FormSwitch",props:{value:{},openDescription:{type:Object},closeDescription:{type:Object},showMode:{type:String,default:"SWITCH"},onChange:{}},emits:["update:value"],setup(e,{emit:u}){const n=o((()=>{var o,r;return null==(r=null==(o=e.openDescription)?void 0:o.value)||r})),a=o((()=>{var o,r;return null!=(r=null==(o=e.closeDescription)?void 0:o.value)&&r})),p=()=>{var o,r;return t(null!=(r=null==(o=e.openDescription)?void 0:o.describe)?r:"")},s=()=>{var o,r;return t(null!=(r=null==(o=e.closeDescription)?void 0:o.describe)?r:"")},c=o({get:()=>e.value===n.value,set:e=>u("update:value",e?n.value:a.value)});return()=>"SWITCH"===e.showMode?r(i,{value:c.value,"onUpdate:value":e=>c.value=e},{checked:p,unchecked:s}):r(l,{checked:c.value,"onUpdate:checked":e=>c.value=e},{default:p})}}),p(u,n));export{s as SWITCH};
@@ -22,3 +22,4 @@ export * from './useNuiThemeOverrides';
22
22
  export * from './useOperationalForm';
23
23
  export * from './usePresetScope';
24
24
  export * from './useWordbookSetting';
25
+ export * from './useNewLowCodeReactions';
@@ -1 +1 @@
1
- export{useAnchor}from"./useAnchor.js";export{useAutoHidden}from"./useAutoHidden.js";export{BusinessCollector,useBusinessBinding}from"./useBusinessBinding.js";export{ContextCollector,useChangeContext}from"./useChangeContext.js";export{useCommonInjection,useSelectOptionProps}from"./useCommonInjection.js";export{useCommonLog}from"./useCommonLog.js";export{useComplexOptions,useComplexOptionsSpan}from"./useComplexOptions.js";export{useFieldListAdaptor}from"./useFieldListAdaptor.js";export{useFieldNormalize}from"./useFieldNormalize.js";export{useFieldVisitor}from"./useFieldVisitor.js";export{useFormContext}from"./useFormContext.js";export{useFormDomEvent,useFormExposeEvent}from"./useFormEvent.js";export{useFormField}from"./useFormField.js";export{useFormGraph}from"./useFormGraph.js";export{FormItemDepsCollector,useFormItemDeps}from"./useFormItemDeps.js";export{useFormRenderLifeCycle}from"./useFormRenderLifeCycle.js";export{useAutographOptions,useRecommendOptions,useUrlConfigOptions}from"./useFormRenderOptions.js";export{useFormValidator,validateMessageLocale}from"./useFormValidator.js";export{useLowCodeEvent}from"./useLowCodeEvent.js";export{useLowCodeReactions}from"./useLowCodeReactions.js";export{useNuiThemeOverrides}from"./useNuiThemeOverrides.js";export{useOperationalForm}from"./useOperationalForm.js";export{usePresetScope}from"./usePresetScope.js";export{useWordbookSetting,wordbookSettingHandler}from"./useWordbookSetting.js";
1
+ export{useAnchor}from"./useAnchor.js";export{useAutoHidden}from"./useAutoHidden.js";export{BusinessCollector,useBusinessBinding}from"./useBusinessBinding.js";export{ContextCollector,useChangeContext}from"./useChangeContext.js";export{useCommonInjection,useSelectOptionProps}from"./useCommonInjection.js";export{useCommonLog}from"./useCommonLog.js";export{useComplexOptions,useComplexOptionsSpan}from"./useComplexOptions.js";export{useFieldListAdaptor}from"./useFieldListAdaptor.js";export{useFieldNormalize}from"./useFieldNormalize.js";export{useFieldVisitor}from"./useFieldVisitor.js";export{useFormContext}from"./useFormContext.js";export{useFormDomEvent,useFormExposeEvent}from"./useFormEvent.js";export{useFormField}from"./useFormField.js";export{useFormGraph}from"./useFormGraph.js";export{FormItemDepsCollector,useFormItemDeps}from"./useFormItemDeps.js";export{useFormRenderLifeCycle}from"./useFormRenderLifeCycle.js";export{useAutographOptions,useRecommendOptions,useUrlConfigOptions}from"./useFormRenderOptions.js";export{useFormValidator,validateMessageLocale}from"./useFormValidator.js";export{useLowCodeEvent}from"./useLowCodeEvent.js";export{useLowCodeReactions}from"./useLowCodeReactions.js";export{useNuiThemeOverrides}from"./useNuiThemeOverrides.js";export{useOperationalForm}from"./useOperationalForm.js";export{usePresetScope}from"./usePresetScope.js";export{useWordbookSetting,wordbookSettingHandler}from"./useWordbookSetting.js";export{useNewLowCodeReactions}from"./useNewLowCodeReactions.js";
@@ -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 i,formRenderLog as r}from"../utils/index.js";import{format as l}from"date-fns";import{useFieldNormalize as s}from"./useFieldNormalize.js";import{fieldKeyEscape as a,createLinebarId as p}from"../utils/schema.js";import{useFormValidator as c}from"./useFormValidator.js";import{transformDateFormat as d}from"../utils/business.js";function m(e,o){Object.assign(e["x-component-props"],{...n(o,["wordbook","autograph"])})}function u(e,o){Object.assign(e["x-component-props"],{...n(o,["urlConfig","wordbook"])})}function f(e){return"1"===e||!0===e}function _(_,x){const{createValidatorSchema:h}=c(),g=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,beforeSetValue:null==x?void 0:x.beforeSetValue,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=h(e);return n&&(t["x-validator"]=n),"0"===e.is_null&&(t.required=!0),t},y=e=>{var o,t,r,l,s,a,p,c,d,_,x,h,y,v;const b=g(e);e.urlConfig?u(b,e):e.autograph&&m(b,e);const w=!!e.__multiple,C=f(null!=(t=null==(o=e.componentProps)?void 0:o.allowModify)?t:e.allowModify),A=f(null!=(l=null==(r=e.componentProps)?void 0:r.selectAll)?l:e.selectAll),O=f(null!=(a=null==(s=e.componentProps)?void 0:s.shouldSave)?a:e.save_free_entry),E=f(null!=(c=null==(p=e.componentProps)?void 0:p.allowCreate)?c:e.free_entry),j=null!=(_=null==(d=e.componentProps)?void 0:d.showField)?_:e.show_key,k=null!=(h=null==(x=e.componentProps)?void 0:x.options)?h:e.option,I=null!=(v=i(e.multi_select_value))?v:null==(y=e.componentProps)?void 0:y.maxTagCount;return Object.assign(b["x-component-props"],{multiple:w,options:k,allowModify:C,allowCreate:E||C,shouldSave:O,showField:j,maxTagCount:I,selectAll:A,...n(e,["lazyRequest","requestCache"])}),w&&(b.type="array"),b},v=e=>{var o,t;const n=g(e),i=null!=(t=null==(o=e.componentProps)?void 0:o.selectAll)?t:e.selectAll;return Object.assign(n["x-component-props"],{options:e.option,childFieldStrategy:e.childFieldStrategy,childWidthMode:e.childWidthMode,vertical:e.__vertical,selectAll:"1"===i||!0===i}),e.urlConfig?u(n,e):e.autograph&&m(n,e),n},b=e=>{const t=g(e);return Object.assign(t["x-component-props"],{fieldItem:o(e,["reactions"])}),t},w=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}}),C=new Map([["LINEBAR",w],["LINE_BREAKS",e=>({name:e.val_key,type:"void",title:e.alias||e.name,"x-component":"LINE_BREAKS","x-component-props":{border:e.lineBreaksBorder},"x-display":"0"===e.is_show?"hidden":"visible"})],["INPUT",e=>{const o=g(e);return Object.assign(o["x-component-props"],{...n(e,["prefix","suffix"])}),o}],["TEXTAREA",e=>{const o=g(e);return Object.assign(o["x-component-props"],{rows:e.initialize_high||3}),o}],["INPUT_NUMBER",e=>{const o=g(e),{decimal_length:t,validate:n,allowSlash:i}=e;return!0!==i&&"1"!==i||(o["x-component"]="INPUT_NUMBER_SLASH",o.type="string"),Object.assign(o["x-component-props"],{precision:null!=t?t:null==n?void 0:n.decimal_length,whiteList:e.whiteList,prefix:e.prefix,suffix:e.suffix}),o}],["SELECT",y],["REMOTE_SEARCH",y],["DATE",e=>{const o=g(e);return Object.assign(o["x-component-props"],{valueFormat:e.date_format,type:d(e.date_format),validate:e.validate}),"current"===o.default&&(o.default=l(new Date,e.date_format||"yyyy-MM-dd")),o}],["LEVEL_SEARCH_CASCADER",e=>{const o=g(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=g(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=g(e);return o.type="array","table"===e.displayMode?o["x-component"]="TABLE_COMBINATION":!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",v],["CHECKBOX",v],["SWITCH",e=>{const o=g(e);return Object.assign(o["x-component-props"],{openDescription:e.open,closeDescription:e.close,showMode:e.show_mode}),o}],["SLIDER",e=>{const o=g(e);return Object.assign(o["x-component-props"],{step:i(e.step_length),max:i(e.max_length),min:i(e.min_length),option:e.option}),o}],["COMPLEX",e=>{const o=g(e);Array.isArray(e.properties)&&r("COMPLEX控件的properties属性已经废弃, 请使用children作为替代, 在之后的版本中properties属性将不再支持");const t=Array.isArray(e.properties||e.children)?k(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}]]),A=e=>{if(e.suffixConfig)return O(e);return(C.get(e.html_type)||b)(e)},O=o=>{if(!o.suffixConfig&&!o.prefixConfig)return A(o);const t=o.suffixConfig?e(o.suffixConfig):[],n=[...(o.prefixConfig?e(o.prefixConfig):[]).map((e=>({elem_width:o.elem_width,...e,hide_title:"1",is_show:"1"}))),{...o,is_show:"1",hide_title:"1",suffixConfig:void 0,prefixConfig:void 0},...t.map((e=>({elem_width:o.elem_width,...e,hide_title:"1",is_show:"1"})))],i=g(o),r=n.reduce(((e,o)=>e+2*(o.elem_width||3)),0);return Object.assign(i,{type:"void",name:a(n),title:o.alias||o.name,"x-component":"INPUT_GROUP","x-component-props":{span:r},"x-decorator-props":{...i["x-decorator-props"],showFeedback:!1,suffixFields:n.map((e=>e.val_key))},properties:k(n)}),i},{FieldNormalizeWaterfallHook:E,FieldListNormalizeWaterfallHook:j}=s();function k(o,n={column:9999}){let i=null;return j.call(t(o),n).reduce(((e,o,s)=>{var a;const p=null==(a=(o=E.call(o,n)).validate)?void 0:a.obj_type;return p&&_&&_.collect(p,t(o)),"LINEBAR"===o.html_type?(e[l(o)]=r(w(o),s),i=e[l(o)].properties={}):i?i[l(o)]=r(A(o),s):(i=null,e[l(o)]=r(A(o),s)),e}),{});function r(e,o){return e["x-index"]=o,e}function l(o){return o.suffixConfig?a([o,...e(o.suffixConfig)]):o.val_key}}return{schemaAdaptor:k}}export{_ as useFieldListAdaptor};
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 i,formRenderLog as r}from"../utils/index.js";import{format as l}from"date-fns";import{useFieldNormalize as s}from"./useFieldNormalize.js";import{fieldKeyEscape as a,createLinebarId as p}from"../utils/schema.js";import{useFormValidator as c}from"./useFormValidator.js";import{transformDateFormat as d}from"../utils/business.js";function m(e,o){Object.assign(e["x-component-props"],{...n(o,["wordbook","autograph"])})}function u(e,o){Object.assign(e["x-component-props"],{...n(o,["urlConfig","wordbook"])})}function f(e){return"1"===e||!0===e}function _(_,h){const{createValidatorSchema:x}=c(),g=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,beforeSetValue:null==h?void 0:h.beforeSetValue,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},y=e=>{var o,t,r,l,s,a,p,c,d,_,h,x,y,v;const b=g(e);e.urlConfig?u(b,e):e.autograph&&m(b,e);const w=!!e.__multiple,C=f(null!=(t=null==(o=e.componentProps)?void 0:o.allowModify)?t:e.allowModify),A=f(null!=(l=null==(r=e.componentProps)?void 0:r.selectAll)?l:e.selectAll),O=f(null!=(a=null==(s=e.componentProps)?void 0:s.shouldSave)?a:e.save_free_entry),E=f(null!=(c=null==(p=e.componentProps)?void 0:p.allowCreate)?c:e.free_entry),j=null!=(_=null==(d=e.componentProps)?void 0:d.showField)?_:e.show_key,k=null!=(x=null==(h=e.componentProps)?void 0:h.options)?x:e.option,N=null!=(v=i(e.multi_select_value))?v:null==(y=e.componentProps)?void 0:y.maxTagCount;return Object.assign(b["x-component-props"],{multiple:w,options:k,allowModify:C,allowCreate:E||C,shouldSave:O,showField:j,maxTagCount:N,selectAll:A,...n(e,["lazyRequest","requestCache"])}),w&&(b.type="array"),b},v=e=>{var o,t;const n=g(e),i=null!=(t=null==(o=e.componentProps)?void 0:o.selectAll)?t:e.selectAll;return Object.assign(n["x-component-props"],{options:e.option,childFieldStrategy:e.childFieldStrategy,childWidthMode:e.childWidthMode,vertical:e.__vertical,selectAll:"1"===i||!0===i}),e.urlConfig?u(n,e):e.autograph&&m(n,e),n},b=e=>{const t=g(e);return Object.assign(t["x-component-props"],{fieldItem:o(e,["reactions"])}),t},w=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}}),C=new Map([["LINEBAR",w],["LINE_BREAKS",e=>({name:e.val_key,type:"void",title:e.alias||e.name,"x-component":"LINE_BREAKS","x-component-props":{border:e.lineBreaksBorder},"x-display":"0"===e.is_show?"hidden":"visible"})],["INPUT",e=>{const o=g(e);return Object.assign(o["x-component-props"],{...n(e,["prefix","suffix"])}),o}],["TEXTAREA",e=>{const o=g(e);return Object.assign(o["x-component-props"],{rows:e.initialize_high||3}),o}],["INPUT_NUMBER",e=>{const o=g(e),{decimal_length:t,validate:n,allowSlash:r}=e;return!0!==r&&"1"!==r||(o["x-component"]="INPUT_NUMBER_SLASH",o.type="string"),Object.assign(o["x-component-props"],{precision:i(null!=t?t:null==n?void 0:n.decimal_length),whiteList:e.whiteList,prefix:e.prefix,suffix:e.suffix}),o}],["SELECT",y],["REMOTE_SEARCH",y],["DATE",e=>{const o=g(e);return Object.assign(o["x-component-props"],{valueFormat:e.date_format,type:d(e.date_format),validate:e.validate}),"current"===o.default&&(o.default=l(new Date,e.date_format||"yyyy-MM-dd")),o}],["LEVEL_SEARCH_CASCADER",e=>{const o=g(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=g(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=g(e);return o.type="array","table"===e.displayMode?o["x-component"]="TABLE_COMBINATION":!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,minGroupNum:e.minGroupNum,showLabel:"1"!==e.hide_title,properties:e.children||[],combinationItemDeletable:e.combinationItemDeletable}),o}],["RADIO",v],["CHECKBOX",v],["SWITCH",e=>{const o=g(e);return Object.assign(o["x-component-props"],{openDescription:e.open,closeDescription:e.close,showMode:e.show_mode}),o}],["SLIDER",e=>{const o=g(e);return Object.assign(o["x-component-props"],{step:i(e.step_length),max:i(e.max_length),min:i(e.min_length),option:e.option}),o}],["COMPLEX",e=>{const o=g(e);Array.isArray(e.properties)&&r("COMPLEX控件的properties属性已经废弃, 请使用children作为替代, 在之后的版本中properties属性将不再支持");const t=Array.isArray(e.properties||e.children)?k(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}]]),A=e=>{if(e.suffixConfig)return O(e);return(C.get(e.html_type)||b)(e)},O=o=>{if(!o.suffixConfig&&!o.prefixConfig)return A(o);const t=o.suffixConfig?e(o.suffixConfig):[],n=[...(o.prefixConfig?e(o.prefixConfig):[]).map((e=>({elem_width:o.elem_width,...e,hide_title:"1",is_show:"1"}))),{...o,is_show:"1",hide_title:"1",suffixConfig:void 0,prefixConfig:void 0},...t.map((e=>({elem_width:o.elem_width,...e,hide_title:"1",is_show:"1"})))],i=g(o),r=n.reduce(((e,o)=>e+2*(o.elem_width||3)),0);return Object.assign(i,{type:"void",name:a(n),title:o.alias||o.name,"x-component":"INPUT_GROUP","x-component-props":{span:r},"x-decorator-props":{...i["x-decorator-props"],showFeedback:!1,suffixFields:n.map((e=>e.val_key))},properties:k(n)}),i},{FieldNormalizeWaterfallHook:E,FieldListNormalizeWaterfallHook:j}=s();function k(o,n={column:9999}){let i=null;return j.call(t(o),n).reduce(((e,o,s)=>{var a;const p=null==(a=(o=E.call(o,n)).validate)?void 0:a.obj_type;return p&&_&&_.collect(p,t(o)),"LINEBAR"===o.html_type?(e[l(o)]=r(w(o),s),i=e[l(o)].properties={}):i?i[l(o)]=r(A(o),s):(i=null,e[l(o)]=r(A(o),s)),e}),{});function r(e,o){return e["x-index"]=o,e}function l(o){return o.suffixConfig?a([o,...e(o.suffixConfig)]):o.val_key}}return{schemaAdaptor:k}}export{_ as useFieldListAdaptor};
@@ -88,7 +88,7 @@ export declare function useFieldNormalize(): {
88
88
  businessFormatter: import("../types").FormBusinessFormatter;
89
89
  requestInstance: import("../../..").FormRequestDefine.RequestInstance;
90
90
  enterToNextWidget: boolean | ((fieldItem: FieldItem) => boolean | void);
91
- lowCodeReactions: import("../../../../shared/types").LowCodeTypes.reactionsConfig[];
91
+ lowCodeReactions: import("../../../../shared/types").LowCodeTypes.reactionConfig[];
92
92
  linebarAutoHidden: boolean;
93
93
  bordered: string | boolean;
94
94
  uniqueCacheData: boolean;
@@ -183,7 +183,7 @@ export declare function useFieldNormalize(): {
183
183
  businessFormatter: import("../types").FormBusinessFormatter;
184
184
  requestInstance: import("../../..").FormRequestDefine.RequestInstance;
185
185
  enterToNextWidget: boolean | ((fieldItem: FieldItem) => boolean | void);
186
- lowCodeReactions: import("../../../../shared/types").LowCodeTypes.reactionsConfig[];
186
+ lowCodeReactions: import("../../../../shared/types").LowCodeTypes.reactionConfig[];
187
187
  linebarAutoHidden: boolean;
188
188
  bordered: string | boolean;
189
189
  uniqueCacheData: boolean;
@@ -1,7 +1,7 @@
1
1
  import { LowCodeTypes } from '../../../../shared/types';
2
2
  import { Form } from '@formily/core';
3
3
  import { MaybeRef } from '@vueuse/core';
4
- export declare function useLowCodeReactions(configListRef: MaybeRef<LowCodeTypes.reactionsConfig[] | undefined>, formModel: Form): {
4
+ export declare function useLowCodeReactions(configListRef: MaybeRef<LowCodeTypes.reactionConfig[] | undefined>, formModel: Form): {
5
5
  lowCodeReactionsHandler: (field: string) => void;
6
6
  triggerAllReactionsHandler: () => void;
7
7
  };
@@ -0,0 +1,6 @@
1
+ import { LowCodeTypes } from '../../../../shared/types';
2
+ import { Form } from '@formily/core';
3
+ import { MaybeRef } from '@vueuse/core';
4
+ export declare function useNewLowCodeReactions(configListRef: MaybeRef<LowCodeTypes.newReactionConfig[] | undefined>, formModel: Form): {
5
+ newLowCodeReactionsHandler: (field: string) => void;
6
+ };
@@ -0,0 +1 @@
1
+ import"../../../../shared/utils/index.js";import{isField as e}from"@formily/core";import{isEmpty as o,isString as i,isArray as n}from"lodash-es";import{computed as r,unref as t}from"vue";import{isMatchNewLowCodeConditionsWithSqlExpression as s}from"../../../../shared/utils/business.js";function a(a,l){function u(o){return(i,n)=>{i.fields.forEach((r=>{const t=l.query(r).take();t&&e(t)&&o(t,n,i)}))}}const d=new Map([[["show","hide"],u(((e,o,{actionConfig:{restoreDefault:i}={}})=>{var n;return o?e.display="visible":i?(e.setValue(null!=(n=e.initialValue)?n:null),void(e.display="hidden")):void(e.display="none")}))],[["required","notRequired"],u(((e,o)=>{e.required=o}))],[["disabled","enabled"],u(((e,o)=>{e.disabled=o}))]]),f=r((()=>{const e=new Map,n=t(a);return n?(n.forEach((n=>{o(n.conditions)||n.conditions.forEach((o=>{const r=[];i(o.field)&&o.field&&r.push(o.field),"field"===o.valueType&&i(o.value)&&o.value&&r.push(o.value),r.forEach((o=>{var i;e.has(o)||e.set(o,[]),null==(i=e.get(o))||i.push(n)}))}))})),e):e}));return{newLowCodeReactionsHandler:function(e){const o=f.value.get(e);o&&o.forEach((e=>{!function(e,o){if(!n(e.actions))return;e.actions.forEach((e=>{for(const[i,n]of[...d]){const r=i.indexOf(e.action);if(~r){n(e,r?!o:o);break}}}))}(e,s(l.values,e))}))}}}export{a as useNewLowCodeReactions};
@@ -133,6 +133,7 @@ export declare type FieldItem = {
133
133
  lazyRequest: boolean;
134
134
  requestCache: boolean;
135
135
  maxGroupNum: number;
136
+ minGroupNum: number;
136
137
  jsonCombination: boolean;
137
138
  combinationItemDeletable: boolean | CombinationItemDeletableFn;
138
139
  children: FieldItem[];
@@ -143,7 +143,7 @@ export declare type FormRenderProps = Partial<{
143
143
  businessFormatter: FormBusinessFormatter;
144
144
  requestInstance: FormRequestDefine.RequestInstance;
145
145
  enterToNextWidget: boolean | ((fieldItem: FieldItem) => boolean | void);
146
- lowCodeReactions: LowCodeTypes.reactionsConfig[];
146
+ lowCodeReactions: LowCodeTypes.reactionConfig[];
147
147
  linebarAutoHidden: boolean;
148
148
  bordered: boolean | string;
149
149
  uniqueCacheData: boolean;
@@ -14,7 +14,7 @@ export declare function createGuideStep(instance?: ComponentInternalInstance | n
14
14
  type: NumberConstructor;
15
15
  required: true;
16
16
  };
17
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("cancel" | "next" | "toNext")[], "cancel" | "next" | "toNext", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
17
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("next" | "cancel" | "toNext")[], "next" | "cancel" | "toNext", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
18
18
  config: {
19
19
  type: PropType<GuideDefine.Config>;
20
20
  required: true;
@@ -29,8 +29,8 @@ export declare function createGuideStep(instance?: ComponentInternalInstance | n
29
29
  required: true;
30
30
  };
31
31
  }>> & {
32
- onCancel?: ((...args: any[]) => any) | undefined;
33
32
  onNext?: ((...args: any[]) => any) | undefined;
33
+ onCancel?: ((...args: any[]) => any) | undefined;
34
34
  onToNext?: ((...args: any[]) => any) | undefined;
35
35
  }, {
36
36
  config: GuideDefine.Config;