cnhis-design-vue 3.3.1-beta.3 → 3.3.1-beta.5

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 (98) hide show
  1. package/es/components/ai-chat/index.d.ts +17 -147
  2. package/es/components/ai-chat/src/Index.vue.d.ts +17 -147
  3. package/es/components/ai-chat/src/Index.vue2.js +1 -1
  4. package/es/components/ai-chat/src/components/ChatCard.js +1 -1
  5. package/es/components/ai-chat/src/components/ChatFooter.vue.d.ts +2 -55
  6. package/es/components/ai-chat/src/components/ChatFooter.vue2.js +1 -1
  7. package/es/components/ai-chat/src/components/ChatMain.d.ts +7 -1
  8. package/es/components/ai-chat/src/components/ChatMain.js +1 -1
  9. package/es/components/ai-chat/src/utils/index.d.ts +0 -1
  10. package/es/components/ai-chat/src/utils/index.js +1 -1
  11. package/es/components/ai-chat/style/index.css +1 -1
  12. package/es/components/audio-sdk/src/audioSDK.d.ts +6 -5
  13. package/es/components/audio-sdk/src/audioSDK.js +1 -1
  14. package/es/components/audio-sdk/src/components/form.vue.d.ts +49 -0
  15. package/es/components/audio-sdk/src/components/form.vue.js +1 -0
  16. package/es/components/audio-sdk/src/components/form.vue2.js +1 -0
  17. package/es/components/audio-sdk/src/components/recording.vue.d.ts +18 -2
  18. package/es/components/audio-sdk/src/components/recording.vue2.js +1 -1
  19. package/es/components/audio-sdk/src/utils/recordingModal.d.ts +9 -4
  20. package/es/components/audio-sdk/src/utils/recordingModal.js +1 -1
  21. package/es/components/audio-sdk/style/index.css +1 -1
  22. package/es/components/callback/src/components/render/popupMaps.d.ts +7 -1
  23. package/es/components/date-picker/src/DatePicker.vue2.js +1 -1
  24. package/es/components/editor/src/Editor.js +1 -1
  25. package/es/components/editor/style/index.css +0 -1
  26. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useOther.js +1 -1
  27. package/es/components/field-editor/index.d.ts +7 -1
  28. package/es/components/field-editor/src/FieldEditor.vue.d.ts +7 -1
  29. package/es/components/form-config/index.d.ts +33 -3
  30. package/es/components/form-config/src/FormConfig.vue.d.ts +33 -3
  31. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +7 -1
  32. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +13 -1
  33. package/es/components/form-config/src/components/FormConfigEventSetting.vue.d.ts +7 -1
  34. package/es/components/form-render/index.d.ts +7 -1
  35. package/es/components/form-render/index.js +1 -1
  36. package/es/components/form-render/src/FormRender.vue.d.ts +7 -1
  37. package/es/components/form-render/src/FormRender.vue2.js +1 -1
  38. package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +7 -1
  39. package/es/components/form-render/src/components/renderer/date.d.ts +2 -0
  40. package/es/components/form-render/src/components/renderer/date.js +1 -1
  41. package/es/components/form-render/src/components/renderer/input.d.ts +5 -0
  42. package/es/components/form-render/src/components/renderer/input.js +1 -1
  43. package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue.d.ts +2 -0
  44. package/es/components/form-render/src/components/renderer/lineBar/index.d.ts +2 -0
  45. package/es/components/form-render/src/components/renderer/select.d.ts +5 -0
  46. package/es/components/form-render/src/components/renderer/select.js +1 -1
  47. package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
  48. package/es/components/form-render/src/hooks/useFieldNormalize.d.ts +4 -0
  49. package/es/components/form-render/src/types/index.d.ts +2 -0
  50. package/es/components/form-render/src/utils/index.d.ts +1 -0
  51. package/es/components/form-render/src/utils/index.js +1 -1
  52. package/es/components/form-render/style/index.css +1 -1
  53. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useSelectOption.d.ts +7 -0
  54. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useSelectOption.js +1 -1
  55. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +1 -1
  56. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.d.ts +1 -2
  57. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.js +1 -1
  58. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/checkRendererPlugin.js +1 -1
  59. package/es/components/iho-table/src/types/index.d.ts +1 -0
  60. package/es/components/index.css +1 -1
  61. package/es/components/index.js +1 -1
  62. package/es/components/info-header/index.d.ts +24 -2
  63. package/es/components/info-header/src/InfoHeader.vue.d.ts +24 -2
  64. package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +2 -0
  65. package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +2 -0
  66. package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +9 -1
  67. package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +7 -1
  68. package/es/components/shortcut-setter/index.d.ts +7 -1
  69. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +7 -1
  70. package/es/shared/components/ArrowIcon/ArrowIcon.vue.js +1 -0
  71. package/es/shared/components/ArrowIcon/index.d.ts +2 -0
  72. package/es/shared/components/ArrowIcon/index.js +1 -0
  73. package/es/shared/components/DateIcon/DateIcon.vue.js +1 -0
  74. package/es/shared/components/DateIcon/index.d.ts +2 -0
  75. package/es/shared/components/DateIcon/index.js +1 -0
  76. package/es/shared/package.json.js +1 -1
  77. package/package.json +2 -2
  78. package/es/components/ai-chat/src/api/index.d.ts +0 -6
  79. package/es/components/ai-chat/src/api/index.js +0 -1
  80. package/es/components/ai-chat/src/components/ChatAudio.vue.d.ts +0 -44
  81. package/es/components/ai-chat/src/components/ChatAudio.vue.js +0 -1
  82. package/es/components/ai-chat/src/components/ChatAudio.vue2.js +0 -1
  83. package/es/components/ai-chat/src/components/ChatMainInner.d.ts +0 -2
  84. package/es/components/ai-chat/src/components/ChatMainInner.js +0 -1
  85. package/es/components/ai-chat/src/components/ChatRight.vue.d.ts +0 -56
  86. package/es/components/ai-chat/src/components/ChatRight.vue.js +0 -1
  87. package/es/components/ai-chat/src/components/ChatRight.vue2.js +0 -1
  88. package/es/components/ai-chat/src/components/card/JsonCard.d.ts +0 -25
  89. package/es/components/ai-chat/src/components/card/JsonCard.js +0 -1
  90. package/es/components/ai-chat/src/components/card/SelectIcon.d.ts +0 -14
  91. package/es/components/ai-chat/src/components/card/SelectIcon.js +0 -1
  92. package/es/components/ai-chat/src/hooks/useProgram.d.ts +0 -6
  93. package/es/components/ai-chat/src/hooks/useProgram.js +0 -1
  94. package/es/components/ai-chat/src/hooks/useWebsocket.d.ts +0 -2
  95. package/es/components/ai-chat/src/hooks/useWebsocket.js +0 -1
  96. package/es/shared/assets/img/file-emr.png.js +0 -1
  97. package/es/shared/assets/img/file.png.js +0 -1
  98. package/es/shared/assets/img/use.png.js +0 -1
@@ -223,6 +223,7 @@ declare const _default: import("vue").DefineComponent<{}, {
223
223
  fixMemoLeak: {
224
224
  type: BooleanConstructor;
225
225
  };
226
+ lazyRender: BooleanConstructor;
226
227
  }, {
227
228
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
228
229
  fieldList: {
@@ -425,6 +426,7 @@ declare const _default: import("vue").DefineComponent<{}, {
425
426
  fixMemoLeak: {
426
427
  type: BooleanConstructor;
427
428
  };
429
+ lazyRender: BooleanConstructor;
428
430
  }>> & {
429
431
  onFormChange?: ((...args: any[]) => any) | undefined;
430
432
  onScroll?: ((...args: any[]) => any) | undefined;
@@ -599,6 +601,8 @@ declare const _default: import("vue").DefineComponent<{}, {
599
601
  linebarTextDirection: "horizontal" | "vertical";
600
602
  autoWidth: number | boolean;
601
603
  feedbackType: "default" | "tooltip";
604
+ fixMemoLeak: boolean;
605
+ lazyRender: boolean;
602
606
  }>) => Record<string, import("@formily/json-schema").Stringify<{
603
607
  [key: symbol]: any;
604
608
  [key: `x-${string}`]: any;
@@ -985,6 +989,7 @@ declare const _default: import("vue").DefineComponent<{}, {
985
989
  fixMemoLeak: {
986
990
  type: BooleanConstructor;
987
991
  };
992
+ lazyRender: BooleanConstructor;
988
993
  }>> & {
989
994
  onFormChange?: ((...args: any[]) => any) | undefined;
990
995
  onScroll?: ((...args: any[]) => any) | undefined;
@@ -1016,9 +1021,10 @@ declare const _default: import("vue").DefineComponent<{}, {
1016
1021
  linebarTextDirection: "horizontal" | "vertical";
1017
1022
  autoWidth: number | boolean;
1018
1023
  feedbackType: "default" | "tooltip";
1024
+ fixMemoLeak: boolean;
1025
+ lazyRender: boolean;
1019
1026
  operationalFormInit: boolean;
1020
1027
  incrementalRender: boolean;
1021
- fixMemoLeak: boolean;
1022
1028
  }>;
1023
1029
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>>;
1024
1030
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
@@ -116,6 +116,8 @@ declare const _default: import("vue").DefineComponent<{
116
116
  linebarTextDirection: "horizontal" | "vertical";
117
117
  autoWidth: number | boolean;
118
118
  feedbackType: "default" | "tooltip";
119
+ fixMemoLeak: boolean;
120
+ lazyRender: boolean;
119
121
  }>>>;
120
122
  };
121
123
  }, {
@@ -232,6 +234,8 @@ declare const _default: import("vue").DefineComponent<{
232
234
  linebarTextDirection: "horizontal" | "vertical";
233
235
  autoWidth: number | boolean;
234
236
  feedbackType: "default" | "tooltip";
237
+ fixMemoLeak: boolean;
238
+ lazyRender: boolean;
235
239
  }>>>;
236
240
  };
237
241
  }>> & {}>>;
@@ -1378,6 +1382,7 @@ declare const _default: import("vue").DefineComponent<{
1378
1382
  fixMemoLeak: {
1379
1383
  type: BooleanConstructor;
1380
1384
  };
1385
+ lazyRender: BooleanConstructor;
1381
1386
  }, {
1382
1387
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
1383
1388
  fieldList: {
@@ -1580,6 +1585,7 @@ declare const _default: import("vue").DefineComponent<{
1580
1585
  fixMemoLeak: {
1581
1586
  type: BooleanConstructor;
1582
1587
  };
1588
+ lazyRender: BooleanConstructor;
1583
1589
  }>> & {
1584
1590
  onFormChange?: ((...args: any[]) => any) | undefined;
1585
1591
  onScroll?: ((...args: any[]) => any) | undefined;
@@ -1754,6 +1760,8 @@ declare const _default: import("vue").DefineComponent<{
1754
1760
  linebarTextDirection: "horizontal" | "vertical";
1755
1761
  autoWidth: number | boolean;
1756
1762
  feedbackType: "default" | "tooltip";
1763
+ fixMemoLeak: boolean;
1764
+ lazyRender: boolean;
1757
1765
  }>) => Record<string, import("@formily/json-schema").Stringify<{
1758
1766
  [key: symbol]: any;
1759
1767
  [key: `x-${string}`]: any;
@@ -2140,6 +2148,7 @@ declare const _default: import("vue").DefineComponent<{
2140
2148
  fixMemoLeak: {
2141
2149
  type: BooleanConstructor;
2142
2150
  };
2151
+ lazyRender: BooleanConstructor;
2143
2152
  }>> & {
2144
2153
  onFormChange?: ((...args: any[]) => any) | undefined;
2145
2154
  onScroll?: ((...args: any[]) => any) | undefined;
@@ -2171,9 +2180,10 @@ declare const _default: import("vue").DefineComponent<{
2171
2180
  linebarTextDirection: "horizontal" | "vertical";
2172
2181
  autoWidth: number | boolean;
2173
2182
  feedbackType: "default" | "tooltip";
2183
+ fixMemoLeak: boolean;
2184
+ lazyRender: boolean;
2174
2185
  operationalFormInit: boolean;
2175
2186
  incrementalRender: boolean;
2176
- fixMemoLeak: boolean;
2177
2187
  }>;
2178
2188
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>>;
2179
2189
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
@@ -2289,6 +2299,8 @@ declare const _default: import("vue").DefineComponent<{
2289
2299
  linebarTextDirection: "horizontal" | "vertical";
2290
2300
  autoWidth: number | boolean;
2291
2301
  feedbackType: "default" | "tooltip";
2302
+ fixMemoLeak: boolean;
2303
+ lazyRender: boolean;
2292
2304
  }>>>;
2293
2305
  };
2294
2306
  }>>, {}>;
@@ -428,6 +428,7 @@ declare const _default: import("vue").DefineComponent<{
428
428
  fixMemoLeak: {
429
429
  type: BooleanConstructor;
430
430
  };
431
+ lazyRender: BooleanConstructor;
431
432
  }, {
432
433
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
433
434
  fieldList: {
@@ -630,6 +631,7 @@ declare const _default: import("vue").DefineComponent<{
630
631
  fixMemoLeak: {
631
632
  type: BooleanConstructor;
632
633
  };
634
+ lazyRender: BooleanConstructor;
633
635
  }>> & {
634
636
  onFormChange?: ((...args: any[]) => any) | undefined;
635
637
  onScroll?: ((...args: any[]) => any) | undefined;
@@ -804,6 +806,8 @@ declare const _default: import("vue").DefineComponent<{
804
806
  linebarTextDirection: "horizontal" | "vertical";
805
807
  autoWidth: number | boolean;
806
808
  feedbackType: "default" | "tooltip";
809
+ fixMemoLeak: boolean;
810
+ lazyRender: boolean;
807
811
  }>) => Record<string, import("@formily/json-schema").Stringify<{
808
812
  [key: symbol]: any;
809
813
  [key: `x-${string}`]: any;
@@ -1190,6 +1194,7 @@ declare const _default: import("vue").DefineComponent<{
1190
1194
  fixMemoLeak: {
1191
1195
  type: BooleanConstructor;
1192
1196
  };
1197
+ lazyRender: BooleanConstructor;
1193
1198
  }>> & {
1194
1199
  onFormChange?: ((...args: any[]) => any) | undefined;
1195
1200
  onScroll?: ((...args: any[]) => any) | undefined;
@@ -1221,9 +1226,10 @@ declare const _default: import("vue").DefineComponent<{
1221
1226
  linebarTextDirection: "horizontal" | "vertical";
1222
1227
  autoWidth: number | boolean;
1223
1228
  feedbackType: "default" | "tooltip";
1229
+ fixMemoLeak: boolean;
1230
+ lazyRender: boolean;
1224
1231
  operationalFormInit: boolean;
1225
1232
  incrementalRender: boolean;
1226
- fixMemoLeak: boolean;
1227
1233
  }>;
1228
1234
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>>;
1229
1235
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "validateFailure")[], "update:modelValue" | "validateFailure", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
@@ -209,6 +209,7 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{}, {
209
209
  fixMemoLeak: {
210
210
  type: BooleanConstructor;
211
211
  };
212
+ lazyRender: BooleanConstructor;
212
213
  }, {
213
214
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
214
215
  fieldList: {
@@ -411,6 +412,7 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{}, {
411
412
  fixMemoLeak: {
412
413
  type: BooleanConstructor;
413
414
  };
415
+ lazyRender: BooleanConstructor;
414
416
  }>> & {
415
417
  onFormChange?: ((...args: any[]) => any) | undefined;
416
418
  onScroll?: ((...args: any[]) => any) | undefined;
@@ -585,6 +587,8 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{}, {
585
587
  linebarTextDirection: "horizontal" | "vertical";
586
588
  autoWidth: number | boolean;
587
589
  feedbackType: "default" | "tooltip";
590
+ fixMemoLeak: boolean;
591
+ lazyRender: boolean;
588
592
  }>) => Record<string, import("@formily/json-schema").Stringify<{
589
593
  [key: symbol]: any;
590
594
  [key: `x-${string}`]: any;
@@ -971,6 +975,7 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{}, {
971
975
  fixMemoLeak: {
972
976
  type: BooleanConstructor;
973
977
  };
978
+ lazyRender: BooleanConstructor;
974
979
  }>> & {
975
980
  onFormChange?: ((...args: any[]) => any) | undefined;
976
981
  onScroll?: ((...args: any[]) => any) | undefined;
@@ -1002,9 +1007,10 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{}, {
1002
1007
  linebarTextDirection: "horizontal" | "vertical";
1003
1008
  autoWidth: number | boolean;
1004
1009
  feedbackType: "default" | "tooltip";
1010
+ fixMemoLeak: boolean;
1011
+ lazyRender: boolean;
1005
1012
  operationalFormInit: boolean;
1006
1013
  incrementalRender: boolean;
1007
- fixMemoLeak: boolean;
1008
1014
  }>;
1009
1015
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>>;
1010
1016
  export default FormRender;
@@ -1 +1 @@
1
- import{COMPONENT_NAMESPACE as e}from"../../shared/global/variable.js";import{safeComponentRegister as o}from"../../shared/utils/index.js";import s from"./src/FormRenderWrapper.vue.js";export{useAnchor}from"./src/hooks/useAnchor.js";export{BusinessCollector,useBusinessBinding}from"./src/hooks/useBusinessBinding.js";export{ContextCollector,useChangeContext}from"./src/hooks/useChangeContext.js";export{useCommonInjection,useSelectOptionProps}from"./src/hooks/useCommonInjection.js";export{useCommonLog}from"./src/hooks/useCommonLog.js";export{useComplexOptions,useComplexOptionsSpan}from"./src/hooks/useComplexOptions.js";export{useFieldListAdaptor}from"./src/hooks/useFieldListAdaptor.js";export{useFieldNormalize}from"./src/hooks/useFieldNormalize.js";export{useFieldVisitor}from"./src/hooks/useFieldVisitor.js";export{useFormContext}from"./src/hooks/useFormContext.js";export{useFormDomEvent,useFormExposeEvent}from"./src/hooks/useFormEvent.js";export{useFormField}from"./src/hooks/useFormField.js";export{useFormGraph}from"./src/hooks/useFormGraph.js";export{FormItemDepsCollector,useFormItemDeps}from"./src/hooks/useFormItemDeps.js";export{useFormRenderLifeCycle}from"./src/hooks/useFormRenderLifeCycle.js";export{useAutographOptions,useRecommendOptions,useUrlConfigOptions}from"./src/hooks/useFormRenderOptions.js";export{useFormValidator,validateMessageLocale}from"./src/hooks/useFormValidator.js";export{useLowCodeEvent}from"./src/hooks/useLowCodeEvent.js";export{useLowCodeReactions}from"./src/hooks/useLowCodeReactions.js";export{useNuiThemeOverrides}from"./src/hooks/useNuiThemeOverrides.js";export{useOperationalForm}from"./src/hooks/useOperationalForm.js";export{usePresetScope}from"./src/hooks/usePresetScope.js";export{useWordbookSetting,wordbookSettingHandler}from"./src/hooks/useWordbookSetting.js";export{useNewLowCodeReactions}from"./src/hooks/useNewLowCodeReactions.js";export{useSelectedSetting}from"./src/hooks/useSelectedSetting.js";export{FieldListFilter,combineExtendKey,createInputSlot,createSlot,editorUnescape,findItemByValCondition,formRenderLog,getAbsoluteKey,injectOrProvide,isEnter,isNegative,isNestedFieldType,isNestedType,isPositive,mergeDeepProperties,parseEnhanceText,parseNumberFromMaybeString,renderDescOption,renderOptionLabel,replace2Any,splitExtendKey,validateMessageParser}from"./src/utils/index.js";export{businessDateParser,isForeignerID,isIdCard,isMobile,parseAge2Birthday,parseAgeFromContext,parseBirthday,parseIdCard,transformDateFormat}from"./src/utils/business.js";export{findNextWidget,queryDecoratorByAddress,queryDecoratorByFieldKey,queryInput}from"./src/utils/dom.js";export{assignClearBindVisited,assignUpdateValue,assignValueBindKey,createFieldAddressId,createLinebarId,createObjSchema,createVisitedSetter,dotEscape,fieldKeyEscape,getParentLinebar,traverseDependKey,traverseSchema}from"./src/utils/schema.js";const r=s;r.install=function(s){o(s,r,e+"FormRender")};export{r as default};
1
+ import{COMPONENT_NAMESPACE as e}from"../../shared/global/variable.js";import{safeComponentRegister as o}from"../../shared/utils/index.js";import s from"./src/FormRenderWrapper.vue.js";export{useAnchor}from"./src/hooks/useAnchor.js";export{BusinessCollector,useBusinessBinding}from"./src/hooks/useBusinessBinding.js";export{ContextCollector,useChangeContext}from"./src/hooks/useChangeContext.js";export{useCommonInjection,useSelectOptionProps}from"./src/hooks/useCommonInjection.js";export{useCommonLog}from"./src/hooks/useCommonLog.js";export{useComplexOptions,useComplexOptionsSpan}from"./src/hooks/useComplexOptions.js";export{useFieldListAdaptor}from"./src/hooks/useFieldListAdaptor.js";export{useFieldNormalize}from"./src/hooks/useFieldNormalize.js";export{useFieldVisitor}from"./src/hooks/useFieldVisitor.js";export{useFormContext}from"./src/hooks/useFormContext.js";export{useFormDomEvent,useFormExposeEvent}from"./src/hooks/useFormEvent.js";export{useFormField}from"./src/hooks/useFormField.js";export{useFormGraph}from"./src/hooks/useFormGraph.js";export{FormItemDepsCollector,useFormItemDeps}from"./src/hooks/useFormItemDeps.js";export{useFormRenderLifeCycle}from"./src/hooks/useFormRenderLifeCycle.js";export{useAutographOptions,useRecommendOptions,useUrlConfigOptions}from"./src/hooks/useFormRenderOptions.js";export{useFormValidator,validateMessageLocale}from"./src/hooks/useFormValidator.js";export{useLowCodeEvent}from"./src/hooks/useLowCodeEvent.js";export{useLowCodeReactions}from"./src/hooks/useLowCodeReactions.js";export{useNuiThemeOverrides}from"./src/hooks/useNuiThemeOverrides.js";export{useOperationalForm}from"./src/hooks/useOperationalForm.js";export{usePresetScope}from"./src/hooks/usePresetScope.js";export{useWordbookSetting,wordbookSettingHandler}from"./src/hooks/useWordbookSetting.js";export{useNewLowCodeReactions}from"./src/hooks/useNewLowCodeReactions.js";export{useSelectedSetting}from"./src/hooks/useSelectedSetting.js";export{FieldListFilter,combineExtendKey,createInputSlot,createSlot,editorUnescape,findItemByValCondition,formRenderLog,getAbsoluteKey,injectOrProvide,isEnter,isNegative,isNestedFieldType,isNestedType,isPositive,isValidWidgetCombination,mergeDeepProperties,parseEnhanceText,parseNumberFromMaybeString,renderDescOption,renderOptionLabel,replace2Any,splitExtendKey,validateMessageParser}from"./src/utils/index.js";export{businessDateParser,isForeignerID,isIdCard,isMobile,parseAge2Birthday,parseAgeFromContext,parseBirthday,parseIdCard,transformDateFormat}from"./src/utils/business.js";export{findNextWidget,queryDecoratorByAddress,queryDecoratorByFieldKey,queryInput}from"./src/utils/dom.js";export{assignClearBindVisited,assignUpdateValue,assignValueBindKey,createFieldAddressId,createLinebarId,createObjSchema,createVisitedSetter,dotEscape,fieldKeyEscape,getParentLinebar,traverseDependKey,traverseSchema}from"./src/utils/schema.js";const r=s;r.install=function(s){o(s,r,e+"FormRender")};export{r as default};
@@ -204,6 +204,7 @@ declare const _default: import("vue").DefineComponent<{
204
204
  fixMemoLeak: {
205
205
  type: BooleanConstructor;
206
206
  };
207
+ lazyRender: BooleanConstructor;
207
208
  }, {
208
209
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
209
210
  fieldList: {
@@ -406,6 +407,7 @@ declare const _default: import("vue").DefineComponent<{
406
407
  fixMemoLeak: {
407
408
  type: BooleanConstructor;
408
409
  };
410
+ lazyRender: BooleanConstructor;
409
411
  }>> & {
410
412
  onFormChange?: ((...args: any[]) => any) | undefined;
411
413
  onScroll?: ((...args: any[]) => any) | undefined;
@@ -580,6 +582,8 @@ declare const _default: import("vue").DefineComponent<{
580
582
  linebarTextDirection: "horizontal" | "vertical";
581
583
  autoWidth: number | boolean;
582
584
  feedbackType: "default" | "tooltip";
585
+ fixMemoLeak: boolean;
586
+ lazyRender: boolean;
583
587
  }>) => Record<string, import("@formily/vue").Stringify<{
584
588
  [key: symbol]: any;
585
589
  [key: `x-${string}`]: any;
@@ -966,6 +970,7 @@ declare const _default: import("vue").DefineComponent<{
966
970
  fixMemoLeak: {
967
971
  type: BooleanConstructor;
968
972
  };
973
+ lazyRender: BooleanConstructor;
969
974
  }>> & {
970
975
  onFormChange?: ((...args: any[]) => any) | undefined;
971
976
  onScroll?: ((...args: any[]) => any) | undefined;
@@ -997,8 +1002,9 @@ declare const _default: import("vue").DefineComponent<{
997
1002
  linebarTextDirection: "horizontal" | "vertical";
998
1003
  autoWidth: number | boolean;
999
1004
  feedbackType: "default" | "tooltip";
1005
+ fixMemoLeak: boolean;
1006
+ lazyRender: boolean;
1000
1007
  operationalFormInit: boolean;
1001
1008
  incrementalRender: boolean;
1002
- fixMemoLeak: boolean;
1003
1009
  }>;
1004
1010
  export default _default;
@@ -1 +1 @@
1
- import{defineComponent as e,ref as o,provide as t,computed as r,nextTick as a,onBeforeUnmount as s,openBlock as i,createBlock as l,unref as n,mergeProps as m,withCtx as p,createElementBlock as d,createVNode as u,isRef as c,Fragment as f,renderList as h,createCommentVNode as y,createElementVNode as g,normalizeStyle as v,toDisplayString as b,renderSlot as j}from"vue";import{useTheme as k}from"../../../shared/hooks/useTheme.js";import{useElementSize as C}from"@vueuse/core";import"date-fns";import{isNumber as F,cloneDeep as S}from"lodash-es";import"@vue/shared";import"../../../shared/utils/index.js";import"@vueuse/shared";import"../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import{NForm as x,NTabs as w,NTabPane as L,NConfigProvider as B}from"naive-ui";import{useVersion as A}from"../../../shared/hooks/useVersion.js";import"../../../shared/hooks/useScrollLoading.js";import{createForm as R,onFormMount as H,onFieldValueChange as O,onFieldMount as T,onFieldUnmount as I,onFieldReact as V}from"@formily/core";import{Path as N}from"@formily/path";import{FormProvider as _,FormConsumer as D}from"@formily/vue";import{InjectionFormColumnWidth as W,InjectionFormLifeCycleCaller as U,InjectionFormGraph as E}from"./constants/index.js";import"./components/renderer/text.js";import"./utils/business.js";import{createObjSchema as M}from"./utils/schema.js";import{useAnchor as q}from"./hooks/useAnchor.js";import"../index.js";import{useComplexOptionsSpan as P}from"./hooks/useComplexOptions.js";import{useFieldListAdaptor as G}from"./hooks/useFieldListAdaptor.js";import"../../../shared/utils/tapable/SyncHook.js";import"../../../shared/utils/tapable/SyncBailHook.js";import"../../../shared/utils/tapable/SyncWaterfallHook.js";import"../../../shared/utils/tapable/SyncLoopHook.js";import"../../../shared/utils/tapable/AsyncParallelHook.js";import"../../../shared/utils/tapable/AsyncParallelBailHook.js";import"../../../shared/utils/tapable/AsyncSeriesHook.js";import"../../../shared/utils/tapable/AsyncSeriesBailHook.js";import"../../../shared/utils/tapable/AsyncSeriesLoopHook.js";import"../../../shared/utils/tapable/AsyncSeriesWaterfallHook.js";import{useFieldVisitor as K}from"./hooks/useFieldVisitor.js";import{useFormContext as z}from"./hooks/useFormContext.js";import{useFormDomEvent as J,useFormExposeEvent as Q}from"./hooks/useFormEvent.js";import{useFormGraph as $}from"./hooks/useFormGraph.js";import{useFormRenderLifeCycle as X}from"./hooks/useFormRenderLifeCycle.js";import{validateMessageLocale as Y}from"./hooks/useFormValidator.js";import{useLowCodeEvent as Z}from"./hooks/useLowCodeEvent.js";import{useLowCodeReactions as ee}from"./hooks/useLowCodeReactions.js";import{useNuiThemeOverrides as oe}from"./hooks/useNuiThemeOverrides.js";import{useOperationalForm as te}from"./hooks/useOperationalForm.js";import{useWordbookSetting as re}from"./hooks/useWordbookSetting.js";import{useNewLowCodeReactions as ae}from"./hooks/useNewLowCodeReactions.js";import{GlobalState as se}from"@formily/core/esm/shared/constants";const ie={key:0,style:{height:"54px"}},le={style:{"white-space":"pre"}};var ne=e({__name:"FormRender",props:{fieldList:{type:Array},initialData:{type:Object,default:()=>({})},fieldVisitor:{type:Object},column:{type:Number,default:24},maxHeight:{type:[Number,String],default:""},anchor:{type:Boolean,default:!1},parallelism:{type:Number,default:5},businessFormatter:{type:Function},schema:{type:Object},components:{type:Object,default:()=>({})},scope:{type:Object,default:()=>({})},annotation:{type:Object},annotationShortcuts:{type:Array},consumer:{type:Boolean,default:!1},uuid:{type:String},lifeCycle:{type:Object},requestInstance:{type:Object},enterToNextWidget:{type:[Boolean,Function],default:!0},autoExpand:Boolean,lowCodeReactions:{type:Array},newLowCodeReactions:{type:Array},operationalForm:{type:Array},dateOperationalForm:{type:Object},operationalFormInit:{type:Boolean,default:!0},linebarAutoHidden:{type:Boolean},bordered:{type:[Boolean,String],default:!0},labelPlacementOverwrite:Boolean,outBordered:{type:Boolean,default:!1},uniqueCacheData:{type:Boolean,default:!1},forceClearable:Boolean,wordSplitFilter:{type:Boolean,default:!0},selectMode:Boolean,selectedFields:{type:Array},linebarDirection:{type:String,default:"vertical"},linebarTextDirection:{type:String,default:"horizontal"},linebarWidth:{type:[Number,String],default:120},autoWidth:{type:[Boolean,Number],default:!1},incrementalRender:{type:Boolean,default:!1},feedbackType:{type:String,default:"default"},fixMemoLeak:{type:Boolean}},emits:["formChange","annotationChange","scroll","update:selectedFields","linebarChange","ready"],setup(e,{expose:ne,emit:me}){const pe=e,de=k(),{nuiThemeOverrides:ue}=oe();Y();const ce=o(),{width:fe}=C(ce);t(W,r((()=>fe.value?(fe.value-16*(pe.column-1))/24:0)));const he=r((()=>F(pe.maxHeight)?pe.maxHeight+"px":pe.maxHeight)),{SchemaField:ye,businessCollector:ge,formItemDepsCollector:ve,changeContextCollector:be,asyncQueue:je,formUUID:ke}=z(pe,me),{anchorBarRef:Ce,currentAnchor:Fe,updateAnchorList:Se,anchorIdList:xe,onScroll:we,generateAnchorList:Le}=q(pe,me,ce,ve),{callLifeCycle:Be}=X(pe);t(U,Be),Be("onSetup");const{observeFormGraph:Ae,setGraph:Re,removeGraph:He}=$();t(E,Ae);const{lowCodeEventTrigger:Oe}=Z(),Te=o(!0),Ie=R({initialValues:pe.initialData,effects(e){const o={};H((()=>{Object.assign(o,S(e.values))})),O("*",(t=>{const r=N.getIn(o,t.path);N.setIn(o,t.path,t.value);const a=t.props.name.toString();ge.trigger(e,a),ve.trigger(t.path),Te.value&&me("formChange",{fieldInstance:t,fieldKey:a,oldValue:r,fieldName:t.title,value:t.value,context:be.getContext(a,t.value)}),Oe(t),Ve(a),Ne(a),_e.trigger(a),De.trigger(a,t.value)})),T("*",Re),T("*",(e=>{const o=e.props.name.toString();Ve(o),Ne(o),pe.operationalFormInit&&_e.trigger(o)})),I("*",He),pe.anchor&&V("*",Se)}}),{lowCodeReactionsHandler:Ve}=ee(r((()=>pe.lowCodeReactions)),Ie),{newLowCodeReactionsHandler:Ne}=ae(r((()=>pe.newLowCodeReactions)),Ie),_e=te(pe,Ie),De=re().create(Ie,be),{schemaAdaptor:We}=G(ge,pe.lifeCycle);let Ue=pe.fieldList||[],Ee=[];const Me=r((()=>{var e;let o=!1;const t=pe.schema?pe.schema:pe.fieldList?(Ue!==pe.fieldList&&0!==Ue.length||(o=!0),Ue=K().traverse(S(pe.fieldList),pe.fieldVisitor),M(We(Ue,pe))):M({});return pe.incrementalRender&&(null==(e=pe.fieldList)?void 0:e.length)&&o&&(Ee=[],Object.values(t.properties).forEach((e=>{var o;"visible"===e["x-display"]&&"LINEBAR"===e["x-component"]&&!1!==(null==(o=e["x-component-props"])?void 0:o.show)&&(Ee.push(e),e["x-component-props"].show=!1)})),qe()),t}));function qe(){Ee.length?setTimeout((()=>{const e=Ee.shift();e&&(ve.trigger(N.parse(e.name),!0),Ie.setFieldState(e.name,(e=>{e.componentProps.show=!0})),Ee.length?qe():a().then((()=>{me("ready")})))}),300):me("ready")}const{onKeydown:Pe}=J({formModel:Ie,formRenderRef:ce,props:pe,formUUID:ke}),{clearSpan:Ge}=P();s((()=>{Ge(ke),pe.fixMemoLeak&&(se.lifecycles.length=0)}));const Ke=Q({formModel:Ie,formRenderRef:ce,formItemDepsCollector:ve,businessCollector:ge,wordbookSettingHandler:De,operationalFormHandler:_e,getFieldList:()=>Ue,formUUID:ke,changeContextCollector:be,emitFormChange:Te});return ne({formModel:Ie,validate:(e="*",o={})=>Ke.validate(e,o),getFormValues:(e=!0)=>Ke.getFormValues(e),setFormValues:async(e,o={})=>Ke.setFormValues(e,o),setFieldState(e,o){Ke.setFieldState(e,o)},resetFields(e="*"){Ke.resetFields(e)},queryWidget:async e=>Ke.queryWidget(e),getFieldList:()=>Ue,applySelectedSetting:e=>Ke.applySelectedSetting(e),async reload(){console.error("reload function is abstract,it should be overwrite!")},async optionInited(e={}){if(await a(),je.activeTasks)return new Promise((o=>{var t;const r=()=>{o(),je.onActiveTaskChange=null};je.onActiveTaskChange=()=>{je.activeTasks||r()},setTimeout(r,null!=(t=e.timeout)?t:5e3)}))},updateAnchor(){Le(Ie)},getTextFormValues:()=>Ke.getTextFormValues()}),(o,t)=>(i(),l(n(x),m({class:["form-render",{"form-render--out-border":e.outBordered}],"require-mark-placement":"left",style:n(de)},n(A)(),{uuid:n(ke)}),{default:p((()=>[e.anchor&&n(xe).length?(i(),d("section",ie,[u(n(w),{value:n(Fe),"onUpdate:value":t[0]||(t[0]=e=>c(Fe)?Fe.value=e:null),type:"line",ref_key:"anchorBarRef",ref:Ce},{default:p((()=>[(i(!0),d(f,null,h(n(xe),(e=>(i(),l(n(L),{name:e.name,tab:e.title,key:e.name},null,8,["name","tab"])))),128))])),_:1},8,["value"])])):y("v-if",!0),u(n(B),{"theme-overrides":n(ue)},{default:p((()=>[g("section",{class:"form-render__wrapper",style:v({"--column":e.column,"--form-height":n(he)}),ref_key:"formRenderRef",ref:ce,onScroll:t[1]||(t[1]=(...e)=>n(we)&&n(we)(...e)),onKeydownCapture:t[2]||(t[2]=(...e)=>n(Pe)&&n(Pe)(...e))},[u(n(_),{form:n(Ie)},{default:p((()=>[u(n(ye),{schema:n(Me)},null,8,["schema"]),e.consumer?(i(),l(n(D),{key:0},{default:p((({form:e})=>[g("div",le,b(JSON.stringify(e.values,null,2)),1)])),_:1})):y("v-if",!0),j(o.$slots,"default")])),_:3},8,["form"])],36)])),_:3},8,["theme-overrides"])])),_:3},16,["class","style","uuid"]))}});export{ne as default};
1
+ import{defineComponent as e,ref as o,provide as t,computed as r,nextTick as a,onBeforeUnmount as s,openBlock as i,createBlock as l,unref as n,mergeProps as m,withCtx as p,createElementBlock as d,createVNode as u,isRef as c,Fragment as f,renderList as h,createCommentVNode as y,createElementVNode as g,normalizeStyle as v,toDisplayString as b,renderSlot as j}from"vue";import{useTheme as k}from"../../../shared/hooks/useTheme.js";import{useElementSize as C}from"@vueuse/core";import"date-fns";import{isNumber as F,cloneDeep as S}from"lodash-es";import"@vue/shared";import"../../../shared/utils/index.js";import"@vueuse/shared";import"../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import{NForm as x,NTabs as w,NTabPane as L,NConfigProvider as B}from"naive-ui";import{useVersion as A}from"../../../shared/hooks/useVersion.js";import"../../../shared/hooks/useScrollLoading.js";import{createForm as R,onFormMount as H,onFieldValueChange as O,onFieldMount as T,onFieldUnmount as I,onFieldReact as V}from"@formily/core";import{Path as N}from"@formily/path";import{FormProvider as _,FormConsumer as D}from"@formily/vue";import{InjectionFormColumnWidth as W,InjectionFormLifeCycleCaller as U,InjectionFormGraph as E}from"./constants/index.js";import"./components/renderer/text.js";import"./utils/business.js";import{createObjSchema as M}from"./utils/schema.js";import{useAnchor as q}from"./hooks/useAnchor.js";import"../index.js";import{useComplexOptionsSpan as P}from"./hooks/useComplexOptions.js";import{useFieldListAdaptor as G}from"./hooks/useFieldListAdaptor.js";import"../../../shared/utils/tapable/SyncHook.js";import"../../../shared/utils/tapable/SyncBailHook.js";import"../../../shared/utils/tapable/SyncWaterfallHook.js";import"../../../shared/utils/tapable/SyncLoopHook.js";import"../../../shared/utils/tapable/AsyncParallelHook.js";import"../../../shared/utils/tapable/AsyncParallelBailHook.js";import"../../../shared/utils/tapable/AsyncSeriesHook.js";import"../../../shared/utils/tapable/AsyncSeriesBailHook.js";import"../../../shared/utils/tapable/AsyncSeriesLoopHook.js";import"../../../shared/utils/tapable/AsyncSeriesWaterfallHook.js";import{useFieldVisitor as K}from"./hooks/useFieldVisitor.js";import{useFormContext as z}from"./hooks/useFormContext.js";import{useFormDomEvent as J,useFormExposeEvent as Q}from"./hooks/useFormEvent.js";import{useFormGraph as $}from"./hooks/useFormGraph.js";import{useFormRenderLifeCycle as X}from"./hooks/useFormRenderLifeCycle.js";import{validateMessageLocale as Y}from"./hooks/useFormValidator.js";import{useLowCodeEvent as Z}from"./hooks/useLowCodeEvent.js";import{useLowCodeReactions as ee}from"./hooks/useLowCodeReactions.js";import{useNuiThemeOverrides as oe}from"./hooks/useNuiThemeOverrides.js";import{useOperationalForm as te}from"./hooks/useOperationalForm.js";import{useWordbookSetting as re}from"./hooks/useWordbookSetting.js";import{useNewLowCodeReactions as ae}from"./hooks/useNewLowCodeReactions.js";import{GlobalState as se}from"@formily/core/esm/shared/constants";const ie={key:0,style:{height:"54px"}},le={style:{"white-space":"pre"}};var ne=e({__name:"FormRender",props:{fieldList:{type:Array},initialData:{type:Object,default:()=>({})},fieldVisitor:{type:Object},column:{type:Number,default:24},maxHeight:{type:[Number,String],default:""},anchor:{type:Boolean,default:!1},parallelism:{type:Number,default:5},businessFormatter:{type:Function},schema:{type:Object},components:{type:Object,default:()=>({})},scope:{type:Object,default:()=>({})},annotation:{type:Object},annotationShortcuts:{type:Array},consumer:{type:Boolean,default:!1},uuid:{type:String},lifeCycle:{type:Object},requestInstance:{type:Object},enterToNextWidget:{type:[Boolean,Function],default:!0},autoExpand:Boolean,lowCodeReactions:{type:Array},newLowCodeReactions:{type:Array},operationalForm:{type:Array},dateOperationalForm:{type:Object},operationalFormInit:{type:Boolean,default:!0},linebarAutoHidden:{type:Boolean},bordered:{type:[Boolean,String],default:!0},labelPlacementOverwrite:Boolean,outBordered:{type:Boolean,default:!1},uniqueCacheData:{type:Boolean,default:!1},forceClearable:Boolean,wordSplitFilter:{type:Boolean,default:!0},selectMode:Boolean,selectedFields:{type:Array},linebarDirection:{type:String,default:"vertical"},linebarTextDirection:{type:String,default:"horizontal"},linebarWidth:{type:[Number,String],default:120},autoWidth:{type:[Boolean,Number],default:!1},incrementalRender:{type:Boolean,default:!1},feedbackType:{type:String,default:"default"},fixMemoLeak:{type:Boolean},lazyRender:Boolean},emits:["formChange","annotationChange","scroll","update:selectedFields","linebarChange","ready"],setup(e,{expose:ne,emit:me}){const pe=e,de=k(),{nuiThemeOverrides:ue}=oe();Y();const ce=o(),{width:fe}=C(ce);t(W,r((()=>fe.value?(fe.value-16*(pe.column-1))/24:0)));const he=r((()=>F(pe.maxHeight)?pe.maxHeight+"px":pe.maxHeight)),{SchemaField:ye,businessCollector:ge,formItemDepsCollector:ve,changeContextCollector:be,asyncQueue:je,formUUID:ke}=z(pe,me),{anchorBarRef:Ce,currentAnchor:Fe,updateAnchorList:Se,anchorIdList:xe,onScroll:we,generateAnchorList:Le}=q(pe,me,ce,ve),{callLifeCycle:Be}=X(pe);t(U,Be),Be("onSetup");const{observeFormGraph:Ae,setGraph:Re,removeGraph:He}=$();t(E,Ae);const{lowCodeEventTrigger:Oe}=Z(),Te=o(!0),Ie=R({initialValues:pe.initialData,effects(e){const o={};H((()=>{Object.assign(o,S(e.values))})),O("*",(t=>{const r=N.getIn(o,t.path);N.setIn(o,t.path,t.value);const a=t.props.name.toString();ge.trigger(e,a),ve.trigger(t.path),Te.value&&me("formChange",{fieldInstance:t,fieldKey:a,oldValue:r,fieldName:t.title,value:t.value,context:be.getContext(a,t.value)}),Oe(t),Ve(a),Ne(a),_e.trigger(a),De.trigger(a,t.value)})),T("*",Re),T("*",(e=>{const o=e.props.name.toString();Ve(o),Ne(o),pe.operationalFormInit&&_e.trigger(o)})),I("*",He),pe.anchor&&V("*",Se)}}),{lowCodeReactionsHandler:Ve}=ee(r((()=>pe.lowCodeReactions)),Ie),{newLowCodeReactionsHandler:Ne}=ae(r((()=>pe.newLowCodeReactions)),Ie),_e=te(pe,Ie),De=re().create(Ie,be),{schemaAdaptor:We}=G(ge,pe.lifeCycle);let Ue=pe.fieldList||[],Ee=[];const Me=r((()=>{var e;let o=!1;const t=pe.schema?pe.schema:pe.fieldList?(Ue!==pe.fieldList&&0!==Ue.length||(o=!0),Ue=K().traverse(S(pe.fieldList),pe.fieldVisitor),M(We(Ue,pe))):M({});return pe.incrementalRender&&(null==(e=pe.fieldList)?void 0:e.length)&&o&&(Ee=[],Object.values(t.properties).forEach((e=>{var o;"visible"===e["x-display"]&&"LINEBAR"===e["x-component"]&&!1!==(null==(o=e["x-component-props"])?void 0:o.show)&&(Ee.push(e),e["x-component-props"].show=!1)})),qe()),t}));function qe(){Ee.length?setTimeout((()=>{const e=Ee.shift();e&&(ve.trigger(N.parse(e.name),!0),Ie.setFieldState(e.name,(e=>{e.componentProps.show=!0})),Ee.length?qe():a().then((()=>{me("ready")})))}),300):me("ready")}const{onKeydown:Pe}=J({formModel:Ie,formRenderRef:ce,props:pe,formUUID:ke}),{clearSpan:Ge}=P();s((()=>{Ge(ke),pe.fixMemoLeak&&(se.lifecycles.length=0)}));const Ke=Q({formModel:Ie,formRenderRef:ce,formItemDepsCollector:ve,businessCollector:ge,wordbookSettingHandler:De,operationalFormHandler:_e,getFieldList:()=>Ue,formUUID:ke,changeContextCollector:be,emitFormChange:Te});return ne({formModel:Ie,validate:(e="*",o={})=>Ke.validate(e,o),getFormValues:(e=!0)=>Ke.getFormValues(e),setFormValues:async(e,o={})=>Ke.setFormValues(e,o),setFieldState(e,o){Ke.setFieldState(e,o)},resetFields(e="*"){Ke.resetFields(e)},queryWidget:async e=>Ke.queryWidget(e),getFieldList:()=>Ue,applySelectedSetting:e=>Ke.applySelectedSetting(e),async reload(){console.error("reload function is abstract,it should be overwrite!")},async optionInited(e={}){if(await a(),je.activeTasks)return new Promise((o=>{var t;const r=()=>{o(),je.onActiveTaskChange=null};je.onActiveTaskChange=()=>{je.activeTasks||r()},setTimeout(r,null!=(t=e.timeout)?t:5e3)}))},updateAnchor(){Le(Ie)},getTextFormValues:()=>Ke.getTextFormValues()}),(o,t)=>(i(),l(n(x),m({class:["form-render",{"form-render--out-border":e.outBordered}],"require-mark-placement":"left",style:n(de)},n(A)(),{uuid:n(ke)}),{default:p((()=>[e.anchor&&n(xe).length?(i(),d("section",ie,[u(n(w),{value:n(Fe),"onUpdate:value":t[0]||(t[0]=e=>c(Fe)?Fe.value=e:null),type:"line",ref_key:"anchorBarRef",ref:Ce},{default:p((()=>[(i(!0),d(f,null,h(n(xe),(e=>(i(),l(n(L),{name:e.name,tab:e.title,key:e.name},null,8,["name","tab"])))),128))])),_:1},8,["value"])])):y("v-if",!0),u(n(B),{"theme-overrides":n(ue)},{default:p((()=>[g("section",{class:"form-render__wrapper",style:v({"--column":e.column,"--form-height":n(he)}),ref_key:"formRenderRef",ref:ce,onScroll:t[1]||(t[1]=(...e)=>n(we)&&n(we)(...e)),onKeydownCapture:t[2]||(t[2]=(...e)=>n(Pe)&&n(Pe)(...e))},[u(n(_),{form:n(Ie)},{default:p((()=>[u(n(ye),{schema:n(Me)},null,8,["schema"]),e.consumer?(i(),l(n(D),{key:0},{default:p((({form:e})=>[g("div",le,b(JSON.stringify(e.values,null,2)),1)])),_:1})):y("v-if",!0),j(o.$slots,"default")])),_:3},8,["form"])],36)])),_:3},8,["theme-overrides"])])),_:3},16,["class","style","uuid"]))}});export{ne as default};
@@ -207,6 +207,7 @@ declare const _default: import("vue").DefineComponent<{}, {
207
207
  fixMemoLeak: {
208
208
  type: BooleanConstructor;
209
209
  };
210
+ lazyRender: BooleanConstructor;
210
211
  }, {
211
212
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
212
213
  fieldList: {
@@ -409,6 +410,7 @@ declare const _default: import("vue").DefineComponent<{}, {
409
410
  fixMemoLeak: {
410
411
  type: BooleanConstructor;
411
412
  };
413
+ lazyRender: BooleanConstructor;
412
414
  }>> & {
413
415
  onFormChange?: ((...args: any[]) => any) | undefined;
414
416
  onScroll?: ((...args: any[]) => any) | undefined;
@@ -583,6 +585,8 @@ declare const _default: import("vue").DefineComponent<{}, {
583
585
  linebarTextDirection: "horizontal" | "vertical";
584
586
  autoWidth: number | boolean;
585
587
  feedbackType: "default" | "tooltip";
588
+ fixMemoLeak: boolean;
589
+ lazyRender: boolean;
586
590
  }>) => Record<string, import("@formily/json-schema").Stringify<{
587
591
  [key: symbol]: any;
588
592
  [key: `x-${string}`]: any;
@@ -969,6 +973,7 @@ declare const _default: import("vue").DefineComponent<{}, {
969
973
  fixMemoLeak: {
970
974
  type: BooleanConstructor;
971
975
  };
976
+ lazyRender: BooleanConstructor;
972
977
  }>> & {
973
978
  onFormChange?: ((...args: any[]) => any) | undefined;
974
979
  onScroll?: ((...args: any[]) => any) | undefined;
@@ -1000,9 +1005,10 @@ declare const _default: import("vue").DefineComponent<{}, {
1000
1005
  linebarTextDirection: "horizontal" | "vertical";
1001
1006
  autoWidth: number | boolean;
1002
1007
  feedbackType: "default" | "tooltip";
1008
+ fixMemoLeak: boolean;
1009
+ lazyRender: boolean;
1003
1010
  operationalFormInit: boolean;
1004
1011
  incrementalRender: boolean;
1005
- fixMemoLeak: boolean;
1006
1012
  }>;
1007
1013
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
1008
1014
  export default _default;
@@ -32,6 +32,7 @@ export declare const DATE: import("vue").DefineComponent<{
32
32
  type: StringConstructor;
33
33
  default: string;
34
34
  };
35
+ placeholder: StringConstructor;
35
36
  dbclickToCurrent: {
36
37
  type: BooleanConstructor;
37
38
  default: boolean;
@@ -69,6 +70,7 @@ export declare const DATE: import("vue").DefineComponent<{
69
70
  type: StringConstructor;
70
71
  default: string;
71
72
  };
73
+ placeholder: StringConstructor;
72
74
  dbclickToCurrent: {
73
75
  type: BooleanConstructor;
74
76
  default: boolean;
@@ -1 +1 @@
1
- import{defineComponent as e,computed as t,watch as a,ref as o,onMounted as i,createVNode as n,mergeProps as r}from"vue";import{generateTimeFormat as u}from"../../../../../shared/utils/index.js";import{connect as l,mapProps as s}from"@formily/vue";import{isObject as d,useEventListener as m}from"@vueuse/core";import{format as v}from"date-fns";import c from"../../../../date-picker/index.js";import{useCommonInjection as p}from"../../hooks/useCommonInjection.js";import"@formily/core";import"@formily/path";import"@vicons/ionicons5";import"@vue/shared";import"lodash-es";import"naive-ui";import"./text.js";import"../../utils/business.js";import{assignUpdateValue as f,assignClearBindVisited as y}from"../../utils/schema.js";const b=l(e({props:{onChange:{},disabled:{type:Boolean},value:{type:String},validate:{type:Object},valueFormat:{type:String,default:"yyyy-MM-dd"},allowedInvalidValue:{type:String,default:"-"},dbclickToCurrent:{type:Boolean,default:!0}},emits:["update:value"],setup(e,{emit:l}){const{injectValueValidate:s,injectValueBindKey:f}=p();function y(){var t;return"currTime"===(null==(t=e.validate)?void 0:t.min_date)}function b(){var t;return"currTime"===(null==(t=e.validate)?void 0:t.max_date)}function w(e){return y()&&e<Date.now()-864e5||b()&&e>Date.now()}function D(e){const t=new Date(e),a=new Date,o=new Date(t);o.setHours(0),o.setMinutes(0),o.setSeconds(0);const i=new Date(t);i.setHours(23),i.setMinutes(59),i.setSeconds(59);const n=o>a,r=i<a,u=t.getHours(),l=a.getHours(),s=a.getMinutes();return{isHourDisabled:function(e){return y()&&!n&&e<l||b()&&!r&&e>l},isMinuteDisabled:function(e){if(u===l)return y()&&!n&&e<s||b()&&!r&&e>s;return y()&&!n&&u<l||b()&&!r&&u>l}}}s((()=>e.value));const j=t((()=>{const t={};if(d(e.validate)){const{min_date:a,max_date:o}=e.validate;(a||o)&&(t.isDateDisabled=w,t.isTimeDisabled=D)}return t})),g=t((()=>({valueFormat:e.valueFormat,format:e.valueFormat,timePickerProps:{format:u(e.valueFormat)}})));function h(t){return t?t===e.allowedInvalidValue?t:v(new Date(t),e.valueFormat):null}a((()=>e.value),(e=>{e&&h(e)!==e&&l("update:value",h(e))}));const k=t({get:()=>h(e.value),set:e=>{l("update:value",e)}}),F=f(k),V=o();return i((()=>{var t;if(!e.dbclickToCurrent)return;const a=null==(t=V.value)?void 0:t.$el;if(!a)return;const o=a.querySelector("input");o&&m(a,"dblclick",(()=>function(t){e.disabled||(t.value=v(Date.now(),e.valueFormat),t.dispatchEvent(new Event("input")))}(o)))})),()=>n(c,r({ref:V,key:F.value,disabled:e.disabled,allowedInvalidValue:e.allowedInvalidValue},j.value,g.value,{"formatted-value":k.value,"onUpdate:formatted-value":e=>k.value=e}),null)}}),s(f,y));export{b as DATE};
1
+ import{defineComponent as e,computed as t,watch as a,ref as n,onMounted as o,inject as r,createVNode as i,mergeProps as l}from"vue";import{generateTimeFormat as u}from"../../../../../shared/utils/index.js";import{connect as s,mapProps as d}from"@formily/vue";import{isObject as c,useEventListener as m}from"@vueuse/core";import{promiseTimeout as v}from"@vueuse/shared";import{format as p}from"date-fns";import f from"naive-ui/es/_mixins/use-locale";import y from"../../../../date-picker/index.js";import{InjectionFormGlobalProps as b}from"../../constants/index.js";import{useCommonInjection as D}from"../../hooks/useCommonInjection.js";import"@formily/core";import"@formily/path";import"@vicons/ionicons5";import"@vue/shared";import"lodash-es";import"naive-ui";import"./text.js";import"../../utils/business.js";import{assignUpdateValue as h,assignClearBindVisited as w}from"../../utils/schema.js";import x from"../../../../../shared/components/DateIcon/DateIcon.vue.js";const _=s(e({props:{onChange:{},disabled:{type:Boolean},value:{type:String},validate:{type:Object},valueFormat:{type:String,default:"yyyy-MM-dd"},allowedInvalidValue:{type:String,default:"-"},placeholder:String,dbclickToCurrent:{type:Boolean,default:!0}},emits:["update:value"],setup(e,{emit:s,attrs:d}){const{injectValueValidate:h,injectValueBindKey:w}=D();function _(){var t;return"currTime"===(null==(t=e.validate)?void 0:t.min_date)}function j(){var t;return"currTime"===(null==(t=e.validate)?void 0:t.max_date)}function k(e){return _()&&e<Date.now()-864e5||j()&&e>Date.now()}function M(e){const t=new Date(e),a=new Date,n=new Date(t);n.setHours(0),n.setMinutes(0),n.setSeconds(0);const o=new Date(t);o.setHours(23),o.setMinutes(59),o.setSeconds(59);const r=n>a,i=o<a,l=t.getHours(),u=a.getHours(),s=a.getMinutes();return{isHourDisabled:function(e){return _()&&!r&&e<u||j()&&!i&&e>u},isMinuteDisabled:function(e){if(l===u)return _()&&!r&&e<s||j()&&!i&&e>s;return _()&&!r&&l<u||j()&&!i&&l>u}}}h((()=>e.value));const g=t((()=>{const t={};if(c(e.validate)){const{min_date:a,max_date:n}=e.validate;(a||n)&&(t.isDateDisabled=k,t.isTimeDisabled=M)}return t})),F=t((()=>({valueFormat:e.valueFormat,format:e.valueFormat,timePickerProps:{format:u(e.valueFormat)}})));function I(t){return t?t===e.allowedInvalidValue?t:p(new Date(t),e.valueFormat):null}a((()=>e.value),(e=>{e&&I(e)!==e&&s("update:value",I(e))}));const S=t({get:()=>I(e.value),set:e=>{s("update:value",e)}}),V=w(S),H=n();let P=!1;function T(){var t;if(!e.dbclickToCurrent||P)return;const a=null==(t=H.value)?void 0:t.$el;if(!a)return;const n=a.querySelector("input");n&&(m(a,"dblclick",(()=>function(t){e.disabled||(t.value=p(Date.now(),e.valueFormat),t.dispatchEvent(new Event("input")))}(n))),P=!0)}o(T);const C=r(b),B=n(!0);async function q(){var e;B.value=!1,await v(0);const t=null==(e=H.value)?void 0:e.$el;if(!t)return;const a=t.querySelector("input");a&&(a.click(),T())}const{localeRef:E}=f("DatePicker");return()=>{var t;return(null==C?void 0:C.lazyRender)&&B.value?i("div",{class:["form-render__textMode--input n-input",{"form-render__textMode--inputDisabled":e.disabled}],tabindex:0,onFocus:q},[[S.value?i("span",null,[S.value]):i("span",{class:"form-render__textMode--inputPlaceholder"},[e.placeholder||(null==(t=E.value)?void 0:t.datetimePlaceholder)]),i(x,{class:"form-render__textMode--dateIcon n-base-icon n-date-picker-icon"},null)]]):i(y,l({ref:H,key:V.value,disabled:e.disabled,allowedInvalidValue:e.allowedInvalidValue},g.value,F.value,{"formatted-value":S.value,"onUpdate:formatted-value":e=>S.value=e}),null)}}}),d(h,w));export{_ as DATE};
@@ -8,6 +8,8 @@ export declare const INPUT: import("vue").DefineComponent<{
8
8
  suffix: {
9
9
  type: (ObjectConstructor | StringConstructor | FunctionConstructor)[];
10
10
  };
11
+ placeholder: StringConstructor;
12
+ disabled: BooleanConstructor;
11
13
  password: {
12
14
  type: BooleanConstructor;
13
15
  };
@@ -21,6 +23,8 @@ export declare const INPUT: import("vue").DefineComponent<{
21
23
  suffix: {
22
24
  type: (ObjectConstructor | StringConstructor | FunctionConstructor)[];
23
25
  };
26
+ placeholder: StringConstructor;
27
+ disabled: BooleanConstructor;
24
28
  password: {
25
29
  type: BooleanConstructor;
26
30
  };
@@ -28,4 +32,5 @@ export declare const INPUT: import("vue").DefineComponent<{
28
32
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
29
33
  }, {
30
34
  password: boolean;
35
+ disabled: boolean;
31
36
  }>;
@@ -1 +1 @@
1
- import{defineComponent as e,createVNode as t}from"vue";import{useVModel as o}from"@vueuse/core";import{useCommonInjection as r}from"../../hooks/useCommonInjection.js";import{createInputSlot as i}from"../../utils/index.js";import{connect as u,mapProps as s}from"@formily/vue";import{NInput as n}from"naive-ui";import{assignUpdateValue as p,assignClearBindVisited as a}from"../../utils/schema.js";const m=u(e({name:"FormInput",props:{value:{type:String},prefix:{type:[String,Function,Object]},suffix:{type:[String,Function,Object]},password:{type:Boolean}},emits:["update:value"],setup(e,{emit:u}){const s=o(e,"value",u),p=r().injectValueBindKey(s),a=i(e,(e=>[t("i",{style:{color:"rgba(33,33,33,.4)"}},[e])]));return()=>t(n,{type:e.password?"password":"text",key:p.value,value:s.value,"onUpdate:value":e=>s.value=e},a.value)}}),s(((e,t)=>{const o=p(e,t);return o.allowInput=e=>!e.startsWith(" ")&&!e.endsWith(" "),o}),a));export{m as INPUT};
1
+ import{defineComponent as e,inject as o,createVNode as t,ref as r,createTextVNode as n,nextTick as l}from"vue";import{useVModel as a}from"@vueuse/core";import{InjectionFormGlobalProps as i}from"../../constants/index.js";import{useCommonInjection as u}from"../../hooks/useCommonInjection.js";import{createInputSlot as s}from"../../utils/index.js";import{connect as p,mapProps as d}from"@formily/vue";import{NInput as c}from"naive-ui";import m from"naive-ui/es/_mixins/use-locale";import{assignUpdateValue as v,assignClearBindVisited as f}from"../../utils/schema.js";const x=p(e({name:"FormInput",props:{value:{type:String},prefix:{type:[String,Function,Object]},suffix:{type:[String,Function,Object]},placeholder:String,disabled:Boolean,password:{type:Boolean}},emits:["update:value"],setup(e,{emit:p}){const d=o(i),v=a(e,"value",p),f=u().injectValueBindKey(v),x=s(e,(e=>[t("i",{style:{color:"rgba(33,33,33,.4)"}},[e])]));function y(o){var r;return(null==(r=x.value)?void 0:r[o])?t("div",{class:`n-input__${o}`},[n(" "),x.value[o](e)]):""}const h=r(!0),b=r();async function _(){h.value=!1,await l(),b.value.focus()}const{localeRef:j}=m("Input");return()=>{var o;return(null==d?void 0:d.lazyRender)&&h.value?t("div",{class:["form-render__textMode--input n-input",{"form-render__textMode--inputDisabled":e.disabled}],tabindex:0,onFocus:_},[[y("prefix"),v.value?t("span",null,[v.value]):t("span",{class:"form-render__textMode--inputPlaceholder"},[e.placeholder||(null==(o=j.value)?void 0:o.placeholder)]),y("suffix")]]):t(c,{ref:b,type:e.password?"password":"text",key:f.value,disabled:e.disabled,placeholder:e.placeholder,value:v.value,"onUpdate:value":e=>v.value=e},x.value)}}}),d(((e,o)=>{const t=v(e,o);return t.allowInput=e=>!e.startsWith(" ")&&!e.endsWith(" "),t}),f));export{x as INPUT};
@@ -157,6 +157,8 @@ declare const _default: import("vue").DefineComponent<{
157
157
  linebarTextDirection: "horizontal" | "vertical";
158
158
  autoWidth: number | boolean;
159
159
  feedbackType: "default" | "tooltip";
160
+ fixMemoLeak: boolean;
161
+ lazyRender: boolean;
160
162
  }>>;
161
163
  isVerticalLinebar: import("vue").ComputedRef<boolean>;
162
164
  wrapperClass: import("vue").ComputedRef<string[] | "">;
@@ -156,6 +156,8 @@ export declare const LINEBAR: import("@vue/runtime-core").DefineComponent<{
156
156
  linebarTextDirection: "horizontal" | "vertical";
157
157
  autoWidth: number | boolean;
158
158
  feedbackType: "default" | "tooltip";
159
+ fixMemoLeak: boolean;
160
+ lazyRender: boolean;
159
161
  }>>;
160
162
  isVerticalLinebar: import("vue").ComputedRef<boolean>;
161
163
  wrapperClass: import("vue").ComputedRef<string[] | "">;
@@ -113,6 +113,8 @@ export declare const SELECT: import("vue").DefineComponent<{
113
113
  type: BooleanConstructor;
114
114
  };
115
115
  wordSplitFilter: {};
116
+ disabled: BooleanConstructor;
117
+ placeholder: StringConstructor;
116
118
  unMatchedOption: {
117
119
  type: FunctionConstructor;
118
120
  };
@@ -226,6 +228,8 @@ export declare const SELECT: import("vue").DefineComponent<{
226
228
  type: BooleanConstructor;
227
229
  };
228
230
  wordSplitFilter: {};
231
+ disabled: BooleanConstructor;
232
+ placeholder: StringConstructor;
229
233
  unMatchedOption: {
230
234
  type: FunctionConstructor;
231
235
  };
@@ -236,6 +240,7 @@ export declare const SELECT: import("vue").DefineComponent<{
236
240
  }, {
237
241
  options: AnyObject[];
238
242
  multiple: boolean;
243
+ disabled: boolean;
239
244
  labelField: string;
240
245
  valueField: string;
241
246
  allowModify: boolean;
@@ -1 +1 @@
1
- import{defineComponent as e,computed as t,watch as o,inject as l,useAttrs as a,ref as r,createVNode as s,mergeProps as n,toRaw as u}from"vue";import{arrayed as i}from"../../../../../shared/utils/index.js";import{NSelect as p}from"naive-ui";import"@vueuse/core";import"date-fns";import{cloneDeep as m,isArray as d,isFunction as c,isObject as v,omit as y,xor as f}from"lodash-es";import"@vue/shared";import{useSelectAllowModify as h}from"../../../../../shared/hooks/selectHooks/useSelectAllowModify.js";import"../../../../../shared/hooks/selectHooks/useSearchContent.js";import{useSelectRenders as j}from"../../../../../shared/hooks/selectHooks/useSelectRenders.js";import"../../../../../shared/hooks/useScrollLoading.js";import{connect as b,mapProps as S}from"@formily/vue";import{useCommonInjection as g,useSelectOptionProps as k}from"../../hooks/useCommonInjection.js";import{useComplexOptions as C,useComplexOptionsSpan as F}from"../../hooks/useComplexOptions.js";import{InjectionChangeContextCollector as B,InjectionFormUUID as O}from"../../constants/index.js";import"@formily/path";import"@formily/core";import"@vicons/ionicons5";import"./text.js";import"../../utils/business.js";import{assignUpdateValue as w,assignClearBindVisited as A,createVisitedSetter as H}from"../../utils/schema.js";import"../../../index.js";import"../../../../../shared/utils/tapable/SyncHook.js";import"../../../../../shared/utils/tapable/SyncBailHook.js";import"../../../../../shared/utils/tapable/SyncWaterfallHook.js";import"../../../../../shared/utils/tapable/SyncLoopHook.js";import"../../../../../shared/utils/tapable/AsyncParallelHook.js";import"../../../../../shared/utils/tapable/AsyncParallelBailHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesBailHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesLoopHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesWaterfallHook.js";import"./index.js";import"@vueuse/shared";import{useFormField as K}from"../../hooks/useFormField.js";import"@formily/reactive";import{useUrlConfigOptions as R,useAutographOptions as x,useRecommendOptions as V}from"../../hooks/useFormRenderOptions.js";import"../../hooks/useFormValidator.js";const L=b(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"},showField:{type:String},allowCreate:Boolean,shouldSave:Boolean,allowModify:Boolean,showCustomValue:Boolean,cursorPlacement:{type:String,default:"end"},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},useLoading:{type:Boolean,default:!0},multiple:{type:Boolean},deletable:{type:Boolean,default:!0},selectAll:{type:Boolean},searchByValue:{type:Boolean},wordSplitFilter:{},unMatchedOption:{type:Function}},emits:["update:value","postRecommend","patternChange"],setup(e,{slots:b,emit:S}){const w=t({get:()=>e.value,async set(e){S("update:value",e),J(e)}}),{labelKey:A,valueKey:L,showKey:P,fetchData:_,searchContent:M,fullOptions:N,filterOptions:I,remoteOptions:W,loading:q}=e.urlConfig?R(e,w):x(e,w);o(M,(e=>{S("patternChange",{pattern:e,options:ie.value})}));const{modifyEvent:E,modifyAbleRef:z,getOptionsWithCreated:T}=h(e,{searchContent:M,labelKey:A,valueKey:L,valueRef:w,fullOptions:N}),{renderComplexOption:U,hasComplexOption:D}=C(e,w),{getRecommend:G,postRecommend:J,sortedOptions:Q}=V(e,I,S,A,L),{field:X,fieldKey:Y}=K();l(B).setContext(Y.value,(e=>({currentOption:m(function(e){const t=T(N.value);return d(e)?function(e){const o=t.reduce(((e,t)=>(e[t[L.value]]=t,e)),{});return e.map((e=>o[e]))}(e):(o=e,t.find((e=>e[L.value]===o)));var o}(e)),labelField:A.value,valueField:L.value})));const Z=async e=>(M.value=e,Promise.allSettled([_(e),G(e)])),{injectValueValidate:$,injectValueWatchFromEmpty:ee,injectValueBindKey:te}=g();ee(w,(()=>e.lazyRequest&&Z())),$(w);const oe=te(w),{menuProps:le,nodeProps:ae}=k(),{renderTag:re,renderLabel:se,renderSelectAll:ne,titleRef:ue}=j(e,{labelKey:A,valueKey:L,valueRef:w,showKey:P,searchContent:M}),ie=t((()=>T(z.value?N.value:Q.value))),pe=a(),me=t((()=>{var t;return c(e.unMatchedOption)?o()?w.value:null==(t=e.unMatchedOption(w.value))?void 0:t[A.value]:e.allowCreate||e.showCustomValue||o()?w.value:null;function o(){const t=e.multiple&&d(w.value);return!!N.value.find((e=>t?w.value.includes(e[L.value]):e[L.value]===w.value))}})),de=r(!1);async function ce(e){e&&await Z(),de.value=e}async function ve(e,t){await E.updateValue(e,t),W.value&&t&&i(t).forEach((e=>{if(!v(e))return;const t=e;t.created&&t.shouldSave&&W.value.push(y(u(t),["created","shouldSave"]))}))}const ye=l(O),{getSpan:fe}=F(),he=H(X,E.focus);function je(t){if(!e.multiple)return;const o=t?ie.value.map((e=>e[L.value])):[];f(o,e.value).length&&(w.value=o)}function be(t){let o=b;return e.multiple&&e.selectAll&&(o={action:()=>ne(je),...b}),s(p,n({title:ue.value,key:oe.value,multiple:e.multiple,remote:!0,filterable:!0,loading:q.value,value:me.value,onUpdateValue:ve,"menu-props":le,"node-props":ae,labelField:A.value,valueField:L.value,options:ie.value,onSearch:Z,show:de.value,"onUpdate:show":ce,onFocus:he,onBlur:E.blur,renderLabel:se,renderTag:re},t,pe),o)}return()=>{var e,t;if(!D.value)return be();const o=null!=(t=null==(e=X.value.decoratorProps)?void 0:e.span)?t:6,l=fe(ye,X.value.address);return s("section",{class:"form-render__selectChildField",style:{"--column":l+o}},[be({class:"form-render__selectChildFieldItem",style:{"--form-item-column":o}}),N.value.map((e=>U({option:e,value:w.value,valueKey:L.value,labelKey:A.value,childFieldStrategy:"checked",renderLabel:!1,attrs:{class:"form-render__selectChildFieldItem",style:{"--form-item-column":l}}})))])}}}),S({dataSource:"options"},w,A));export{L as SELECT};
1
+ import{defineComponent as e,computed as o,watch as t,inject as l,useAttrs as a,ref as r,createVNode as n,mergeProps as s,toRaw as i,nextTick as u}from"vue";import p from"../../../../../shared/components/ArrowIcon/ArrowIcon.vue.js";import{arrayed as d}from"../../../../../shared/utils/index.js";import{NSelect as c}from"naive-ui";import"@vueuse/core";import"date-fns";import{cloneDeep as m,isArray as v,isFunction as f,isObject as y,omit as h,xor as b}from"lodash-es";import"@vue/shared";import{useSelectAllowModify as j}from"../../../../../shared/hooks/selectHooks/useSelectAllowModify.js";import"../../../../../shared/hooks/selectHooks/useSearchContent.js";import{useSelectRenders as S}from"../../../../../shared/hooks/selectHooks/useSelectRenders.js";import"../../../../../shared/hooks/useScrollLoading.js";import{connect as k,mapProps as g}from"@formily/vue";import C from"naive-ui/es/_mixins/use-locale";import{useCommonInjection as F,useSelectOptionProps as B}from"../../hooks/useCommonInjection.js";import{useComplexOptions as w,useComplexOptionsSpan as x}from"../../hooks/useComplexOptions.js";import{InjectionChangeContextCollector as A,InjectionFormUUID as O,InjectionFormGlobalProps as _}from"../../constants/index.js";import"@formily/path";import"@formily/core";import"@vicons/ionicons5";import"./text.js";import"../../utils/business.js";import{assignUpdateValue as R,assignClearBindVisited as H,createVisitedSetter as K}from"../../utils/schema.js";import"../../../index.js";import"../../../../../shared/utils/tapable/SyncHook.js";import"../../../../../shared/utils/tapable/SyncBailHook.js";import"../../../../../shared/utils/tapable/SyncWaterfallHook.js";import"../../../../../shared/utils/tapable/SyncLoopHook.js";import"../../../../../shared/utils/tapable/AsyncParallelHook.js";import"../../../../../shared/utils/tapable/AsyncParallelBailHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesBailHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesLoopHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesWaterfallHook.js";import"./index.js";import"@vueuse/shared";import{useFormField as V}from"../../hooks/useFormField.js";import"@formily/reactive";import{useUrlConfigOptions as L,useAutographOptions as M,useRecommendOptions as P}from"../../hooks/useFormRenderOptions.js";import"../../hooks/useFormValidator.js";const I=k(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"},showField:{type:String},allowCreate:Boolean,shouldSave:Boolean,allowModify:Boolean,showCustomValue:Boolean,cursorPlacement:{type:String,default:"end"},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},useLoading:{type:Boolean,default:!0},multiple:{type:Boolean},deletable:{type:Boolean,default:!0},selectAll:{type:Boolean},searchByValue:{type:Boolean},wordSplitFilter:{},disabled:Boolean,placeholder:String,unMatchedOption:{type:Function}},emits:["update:value","postRecommend","patternChange"],setup(e,{slots:k,emit:g}){const R=o({get:()=>e.value,async set(e){g("update:value",e),Y(e)}}),{labelKey:H,valueKey:I,showKey:N,fetchData:q,searchContent:W,fullOptions:z,filterOptions:E,remoteOptions:D,loading:T}=e.urlConfig?L(e,R):M(e,R);t(W,(e=>{g("patternChange",{pattern:e,options:me.value})}));const{modifyEvent:U,modifyAbleRef:$,getOptionsWithCreated:G}=j(e,{searchContent:W,labelKey:H,valueKey:I,valueRef:R,fullOptions:z}),{renderComplexOption:J,hasComplexOption:Q}=w(e,R),{getRecommend:X,postRecommend:Y,sortedOptions:Z}=P(e,E,g,H,I),{field:ee,fieldKey:oe}=V();l(A).setContext(oe.value,(e=>({currentOption:m(function(e){const o=G(z.value);return v(e)?function(e){const t=o.reduce(((e,o)=>(e[o[I.value]]=o,e)),{});return e.map((e=>t[e]))}(e):(t=e,o.find((e=>e[I.value]===t)));var t}(e)),labelField:H.value,valueField:I.value})));const te=async e=>(W.value=e,Promise.allSettled([q(e),X(e)])),{injectValueValidate:le,injectValueWatchFromEmpty:ae,injectValueBindKey:re}=F();ae(R,(()=>e.lazyRequest&&te())),le(R);const ne=re(R),{menuProps:se,nodeProps:ie}=B(),{renderTag:ue,renderLabel:pe,renderSelectAll:de,titleRef:ce}=S(e,{labelKey:H,valueKey:I,valueRef:R,showKey:N,searchContent:W}),me=o((()=>G($.value?z.value:Z.value))),ve=a(),fe=o((()=>{var o;return f(e.unMatchedOption)?t()?R.value:null==(o=e.unMatchedOption(R.value))?void 0:o[H.value]:e.allowCreate||e.showCustomValue||t()?R.value:null;function t(){const o=e.multiple&&v(R.value);return!!z.value.find((e=>o?R.value.includes(e[I.value]):e[I.value]===R.value))}})),ye=r(!1);async function he(e){e&&await te(),ye.value=e}async function be(e,o){await U.updateValue(e,o),D.value&&o&&d(o).forEach((e=>{if(!y(e))return;const o=e;o.created&&o.shouldSave&&D.value.push(h(i(o),["created","shouldSave"]))}))}const je=l(O),{getSpan:Se}=x(),ke=K(ee,U.focus);function ge(o){if(!e.multiple)return;const t=o?me.value.map((e=>e[I.value])):[];b(t,e.value).length&&(R.value=t)}const Ce=l(_),{localeRef:Fe}=C("Select"),Be=r(!0),we=r();async function xe(){var e;Be.value=!1,await u();const o=null==(e=we.value)?void 0:e.$el;if(!o)return;const t=o.querySelector("input");t&&t.click()}function Ae(o){var t;let l=k;return e.multiple&&e.selectAll&&(l={action:()=>de(ge),...k}),(null==Ce?void 0:Ce.lazyRender)&&Be.value?n("div",{class:["form-render__textMode--input n-input",{"form-render__textMode--inputDisabled":e.disabled}],tabindex:0,onFocus:xe},[[R.value?n("span",null,[R.value]):n("span",{class:"form-render__textMode--inputPlaceholder"},[e.placeholder||(null==(t=Fe.value)?void 0:t.placeholder)]),n(p,{class:"form-render__textMode--dateIcon n-base-icon n-date-picker-icon"},null)]]):n(c,s({ref:we,title:ce.value,key:ne.value,multiple:e.multiple,remote:!0,filterable:!0,loading:T.value,placeholder:e.placeholder,disabled:e.disabled,value:fe.value,onUpdateValue:be,"menu-props":se,"node-props":ie,labelField:H.value,valueField:I.value,options:me.value,onSearch:te,show:ye.value,"onUpdate:show":he,onFocus:ke,onBlur:U.blur,renderLabel:pe,renderTag:ue},o,ve),l)}return()=>{var e,o;if(!Q.value)return Ae();const t=null!=(o=null==(e=ee.value.decoratorProps)?void 0:e.span)?o:6,l=Se(je,ee.value.address);return n("section",{class:"form-render__selectChildField",style:{"--column":l+t}},[Ae({class:"form-render__selectChildFieldItem",style:{"--form-item-column":t}}),z.value.map((e=>J({option:e,value:R.value,valueKey:I.value,labelKey:H.value,childFieldStrategy:"checked",renderLabel:!1,attrs:{class:"form-render__selectChildFieldItem",style:{"--form-item-column":l}}})))])}}}),g({dataSource:"options"},R,H));export{I as SELECT};
@@ -1 +1 @@
1
- import{arrayed as e,deepOmit as o}from"../../../../shared/utils/index.js";import{cloneDeep as t,castArray as n,pick as i}from"lodash-es";import"../../index.js";import{isPositive as r,isNegative as s,parseNumberFromMaybeString as l,formRenderLog as a}from"../utils/index.js";import{useFieldNormalize as p}from"./useFieldNormalize.js";import{traverseSchema as c,fieldKeyEscape as d,createLinebarId as m}from"../utils/schema.js";import{useFormValidator as u}from"./useFormValidator.js";import{transformDateFormat as f}from"../utils/business.js";function x(e,o){Object.assign(e["x-component-props"],{...i(o,["wordbook","autograph"])})}function _(e,o){Object.assign(e["x-component-props"],{...i(o,["urlConfig","wordbook"])})}function h(n,h){const{createValidatorSchema:g}=u(),v=o=>{var t;const n={name:o.val_key,type:null!=(t=o.fieldType)?t:"string",title:o.alias||o.name,"x-component":o.html_type,default:o.default_val,"x-component-props":{placeholder:o.placeholder,clearable:s(o.is_empty),...o.componentProps||{}},"x-content":o.slots,"x-display":s(o.is_show)?"hidden":"visible","x-pattern":s(o.is_edit)?"disabled":"editable","x-compile-omitted":["title","x-component-props","x-decorator-props"]};o.reactions&&(n["x-reactions"]=e(o.reactions).map((e=>{var o;return e.target?{...e,effects:null!=(o=e.effects)?o:["onFieldInit","onFieldValueChange"]}:e}))),o.noDecorator||Object.assign(n,{"x-decorator":"FORM_ITEM","x-decorator-props":{fieldItem:o,beforeSetValue:null==h?void 0:h.beforeSetValue,span:2*(o.elem_width||3),showLabel:!r(o.hide_title),remark:o.remark,propertyKey:o.val_key,annotation:o.annotation,...o.decoratorProps||{}}});const i=g(o);return i&&(n["x-validator"]=i),s(o.is_null)&&(n.required=!0),n},y=e=>{var o,t,n,s,a,p,c,d,m,u,f,h,b,g;const y=v(e);e.urlConfig?_(y,e):e.autograph&&x(y,e);const w=!!e.__multiple,C=r(null!=(t=null==(o=e.componentProps)?void 0:o.allowModify)?t:e.allowModify),O=r(null!=(s=null==(n=e.componentProps)?void 0:n.selectAll)?s:e.selectAll),A=r(null!=(p=null==(a=e.componentProps)?void 0:a.shouldSave)?p:e.save_free_entry),j=r(null!=(d=null==(c=e.componentProps)?void 0:c.allowCreate)?d:e.free_entry),E=null!=(u=null==(m=e.componentProps)?void 0:m.showField)?u:e.show_key,k=null!=(h=null==(f=e.componentProps)?void 0:f.options)?h:e.option,I=null!=(g=l(e.multi_select_value))?g:null==(b=e.componentProps)?void 0:b.maxTagCount;return Object.assign(y["x-component-props"],{multiple:w,options:k,allowModify:C,allowCreate:j||C,shouldSave:A,showField:E,maxTagCount:I,selectAll:O,...i(e,["lazyRequest","requestCache"])}),w&&(y.type="array"),y},w=e=>{var o,t;const n=v(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:r(i)}),e.urlConfig?_(n,e):e.autograph&&x(n,e),n},C=e=>{const t=v(e);return Object.assign(t["x-component-props"],{fieldItem:o(e,["reactions"])}),t},O=e=>({name:e.val_key,type:"void",title:e.alias||e.name,"x-component":"LINEBAR","x-display":"visible","x-component-props":{linebarTextDirection:e.linebarTextDirection,linebarDirection:e.linebarDirection,linebarWidth:e.linebarWidth,disabled:r(e.is_not_fold),id:m(e.val_key),show:!s(e.is_show),remark:e.remark},"x-content":e.slots}),A=new Map([["LINEBAR",O],["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":s(e.is_show)?"hidden":"visible"})],["INPUT",e=>{var o;const t=v(e);return Object.assign(t["x-component-props"],{...i(e,["prefix","suffix"]),password:"password"===(null==(o=e.validate)?void 0:o.obj_type)}),t}],["TEXTAREA",e=>{const o=v(e);return Object.assign(o["x-component-props"],{rows:e.initialize_high||3}),o}],["INPUT_NUMBER",e=>{const o=v(e),{decimal_length:t,validate:n,allowSlash:i}=e;return r(i)&&(o["x-component"]="INPUT_NUMBER_SLASH",o.type="string"),Object.assign(o["x-component-props"],{precision:l(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=v(e);return Object.assign(o["x-component-props"],{valueFormat:e.date_format,type:f(e.date_format),validate:e.validate}),o}],["TIME",e=>{const o=v(e);return Object.assign(o["x-component-props"],{format:e.date_format,type:f(e.date_format),validate:e.validate}),o}],["LEVEL_SEARCH_CASCADER",e=>{const o=v(e);return Object.assign(o["x-component-props"],{...i(e,["wordbook","lazyRequest","autograph"])}),r(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=v(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=v(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:!r(e.hide_title),properties:e.children||[],combinationItemDeletable:e.combinationItemDeletable}),o}],["RADIO",w],["CHECKBOX",w],["SWITCH",e=>{const o=v(e);return Object.assign(o["x-component-props"],{openDescription:e.open,closeDescription:e.close,showMode:e.show_mode}),o}],["SLIDER",e=>{const o=v(e);return Object.assign(o["x-component-props"],{step:l(e.step_length),max:l(e.max_length),min:l(e.min_length),option:e.option}),o}],["COMPLEX",e=>{const o=v(e);Array.isArray(e.properties)&&a("COMPLEX控件的properties属性已经废弃, 请使用children作为替代, 在之后的版本中properties属性将不再支持");const t=Array.isArray(e.properties||e.children)?N(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"],i(e,["wrapperStyle","display"])),o}]]),j=e=>{if(e.suffixConfig||e.prefixConfig)return E(e);return(A.get(e.html_type)||C)(e)},E=o=>{if(!o.suffixConfig&&!o.prefixConfig)return j(o);const t=v(o),n=o.suffixConfig?e(o.suffixConfig):[],i=[...(o.prefixConfig?e(o.prefixConfig):[]).map((e=>({elem_width:o.elem_width,...e,hide_title:"1",is_show:s(e.is_show)?"0":o.is_show}))),{...o,hide_title:"1",suffixConfig:void 0,prefixConfig:void 0},...n.map((e=>({elem_width:o.elem_width,...e,hide_title:"1",is_show:s(e.is_show)?"0":o.is_show})))],r=i.reduce(((e,o)=>e+2*(o.elem_width||3)),0);return Object.assign(t,{type:"void",name:d(i),title:o.alias||o.name,"x-component":"INPUT_GROUP","x-component-props":{span:r},"x-decorator-props":{...t["x-decorator-props"],showFeedback:!1,suffixFields:i.map((e=>e.val_key))},properties:N(i)}),t},{FieldNormalizeWaterfallHook:k,FieldListNormalizeWaterfallHook:I}=p();function N(o,i={column:9999}){let r=null;const s=I.call(t(o),i).reduce(((e,o,s)=>{var p;const c=null==(p=(o=k.call(o,i)).validate)?void 0:p.obj_type;return c&&n&&n.collect(c,t(o)),"LINEBAR"===o.html_type?(e[a(o)]=l(O(o),s),r=e[a(o)].properties={}):r?r[a(o)]=l(j(o),s):(r=null,e[a(o)]=l(j(o),s)),e}),{});return i.linebarAutoHidden&&Object.values(s).forEach((e=>{"LINEBAR"===e["x-component"]&&b(e)})),c({properties:s,"x-root":!0},((e,o)=>{"INPUT_GROUP"===e["x-component"]&&b(e,!!o&&!o["x-root"])})),s;function l(e,o){return e["x-index"]=o,e["x-decorator-props"]={_index:o,...e["x-decorator-props"]},e}function a(o){if(o.suffixConfig||o.prefixConfig){const t=[...e(o.prefixConfig),o,...e(o.suffixConfig)].filter(Boolean);return d(t)}return o.val_key}}return{schemaAdaptor:N}}function b(e,o=!1){e["x-reactions"]?e["x-reactions"]=n(e["x-reactions"]):e["x-reactions"]=[];const t=Object.keys(e.properties||{}).map((t=>`${o?"*.":"."}${e.name}.${t}#selfDisplay`)).concat(Object.keys(e.properties||{}).map((t=>`${o?"*.":"."}${e.name}.${t}#component`)));e["x-reactions"].push({dependencies:t,fulfill:{state:{visible:"{{hasVisible($deps)}}"}}})}export{h as useFieldListAdaptor};
1
+ import{arrayed as e,deepOmit as o}from"../../../../shared/utils/index.js";import{cloneDeep as t,castArray as n,pick as i}from"lodash-es";import"../../index.js";import{isPositive as r,isNegative as l,isValidWidgetCombination as s,parseNumberFromMaybeString as a,formRenderLog as p}from"../utils/index.js";import{useFieldNormalize as c}from"./useFieldNormalize.js";import{traverseSchema as d,fieldKeyEscape as m,createLinebarId as u}from"../utils/schema.js";import{useFormValidator as f}from"./useFormValidator.js";import{transformDateFormat as x}from"../utils/business.js";function _(e,o){Object.assign(e["x-component-props"],{...i(o,["wordbook","autograph"])})}function h(e,o){Object.assign(e["x-component-props"],{...i(o,["urlConfig","wordbook"])})}function b(n,b){const{createValidatorSchema:g}=f(),y=o=>{var t;const n={name:o.val_key,type:null!=(t=o.fieldType)?t:"string",title:o.alias||o.name,"x-component":o.html_type,default:o.default_val,"x-component-props":{placeholder:o.placeholder,clearable:l(o.is_empty),...o.componentProps||{}},"x-content":o.slots,"x-display":l(o.is_show)?"hidden":"visible","x-pattern":l(o.is_edit)?"disabled":"editable","x-compile-omitted":["title","x-component-props","x-decorator-props"]};o.reactions&&(n["x-reactions"]=e(o.reactions).map((e=>{var o;return e.target?{...e,effects:null!=(o=e.effects)?o:["onFieldInit","onFieldValueChange"]}:e}))),o.noDecorator||Object.assign(n,{"x-decorator":"FORM_ITEM","x-decorator-props":{fieldItem:o,beforeSetValue:null==b?void 0:b.beforeSetValue,span:2*(o.elem_width||3),showLabel:!r(o.hide_title),remark:o.remark,propertyKey:o.val_key,annotation:o.annotation,...o.decoratorProps||{}}});const i=g(o);return i&&(n["x-validator"]=i),l(o.is_null)&&(n.required=!0),n},w=e=>{var o,t,n,l,s,p,c,d,m,u,f,x,b,v;const g=y(e);e.urlConfig?h(g,e):e.autograph&&_(g,e);const w=!!e.__multiple,C=r(null!=(t=null==(o=e.componentProps)?void 0:o.allowModify)?t:e.allowModify),O=r(null!=(l=null==(n=e.componentProps)?void 0:n.selectAll)?l:e.selectAll),A=r(null!=(p=null==(s=e.componentProps)?void 0:s.shouldSave)?p:e.save_free_entry),j=r(null!=(d=null==(c=e.componentProps)?void 0:c.allowCreate)?d:e.free_entry),E=null!=(u=null==(m=e.componentProps)?void 0:m.showField)?u:e.show_key,k=null!=(x=null==(f=e.componentProps)?void 0:f.options)?x:e.option,I=null!=(v=a(e.multi_select_value))?v:null==(b=e.componentProps)?void 0:b.maxTagCount;return Object.assign(g["x-component-props"],{multiple:w,options:k,allowModify:C,allowCreate:j||C,shouldSave:A,showField:E,maxTagCount:I,selectAll:O,...i(e,["lazyRequest","requestCache"])}),w&&(g.type="array"),g},C=e=>{var o,t;const n=y(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:r(i)}),e.urlConfig?h(n,e):e.autograph&&_(n,e),n},O=e=>{const t=y(e);return Object.assign(t["x-component-props"],{fieldItem:o(e,["reactions"])}),t},A=e=>({name:e.val_key,type:"void",title:e.alias||e.name,"x-component":"LINEBAR","x-display":"visible","x-component-props":{linebarTextDirection:e.linebarTextDirection,linebarDirection:e.linebarDirection,linebarWidth:e.linebarWidth,disabled:r(e.is_not_fold),id:u(e.val_key),show:!l(e.is_show),remark:e.remark},"x-content":e.slots}),j=new Map([["LINEBAR",A],["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":l(e.is_show)?"hidden":"visible"})],["INPUT",e=>{var o;const t=y(e);return Object.assign(t["x-component-props"],{...i(e,["prefix","suffix"]),password:"password"===(null==(o=e.validate)?void 0:o.obj_type)}),t}],["TEXTAREA",e=>{const o=y(e);return Object.assign(o["x-component-props"],{rows:e.initialize_high||3}),o}],["INPUT_NUMBER",e=>{const o=y(e),{decimal_length:t,validate:n,allowSlash:i}=e;return r(i)&&(o["x-component"]="INPUT_NUMBER_SLASH",o.type="string"),Object.assign(o["x-component-props"],{precision:a(null!=t?t:null==n?void 0:n.decimal_length),whiteList:e.whiteList,prefix:e.prefix,suffix:e.suffix}),o}],["SELECT",w],["REMOTE_SEARCH",w],["DATE",e=>{const o=y(e);return Object.assign(o["x-component-props"],{valueFormat:e.date_format,type:x(e.date_format),validate:e.validate}),o}],["TIME",e=>{const o=y(e);return Object.assign(o["x-component-props"],{format:e.date_format,type:x(e.date_format),validate:e.validate}),o}],["LEVEL_SEARCH_CASCADER",e=>{const o=y(e);return Object.assign(o["x-component-props"],{...i(e,["wordbook","lazyRequest","autograph"])}),r(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=y(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=y(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:!r(e.hide_title),properties:e.children||[],combinationItemDeletable:e.combinationItemDeletable}),o}],["RADIO",C],["CHECKBOX",C],["SWITCH",e=>{const o=y(e);return Object.assign(o["x-component-props"],{openDescription:e.open,closeDescription:e.close,showMode:e.show_mode}),o}],["SLIDER",e=>{const o=y(e);return Object.assign(o["x-component-props"],{step:a(e.step_length),max:a(e.max_length),min:a(e.min_length),option:e.option}),o}],["COMPLEX",e=>{const o=y(e);Array.isArray(e.properties)&&p("COMPLEX控件的properties属性已经废弃, 请使用children作为替代, 在之后的版本中properties属性将不再支持");const t=Array.isArray(e.properties||e.children)?T(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"],i(e,["wrapperStyle","display"])),o}]]),E=e=>{if(s(e.suffixConfig)||s(e.prefixConfig))return k(e);return(j.get(e.html_type)||O)(e)},k=o=>{const t=y(o),n=o.suffixConfig?e(o.suffixConfig):[],i=[...(o.prefixConfig?e(o.prefixConfig):[]).map((e=>({elem_width:o.elem_width,...e,hide_title:"1",is_show:l(e.is_show)?"0":o.is_show}))),{...o,hide_title:"1",suffixConfig:void 0,prefixConfig:void 0},...n.map((e=>({elem_width:o.elem_width,...e,hide_title:"1",is_show:l(e.is_show)?"0":o.is_show})))],r=i.reduce(((e,o)=>e+2*(o.elem_width||3)),0);return Object.assign(t,{type:"void",name:m(i),title:o.alias||o.name,"x-component":"INPUT_GROUP","x-component-props":{span:r},"x-decorator-props":{...t["x-decorator-props"],showFeedback:!1,suffixFields:i.map((e=>e.val_key))},properties:T(i)}),t},{FieldNormalizeWaterfallHook:I,FieldListNormalizeWaterfallHook:N}=c();function T(o,i={column:9999}){let r=null;const l=N.call(t(o),i).reduce(((e,o,l)=>{var p;const c=null==(p=(o=I.call(o,i)).validate)?void 0:p.obj_type;return c&&n&&n.collect(c,t(o)),"LINEBAR"===o.html_type?(e[a(o)]=s(A(o),l),r=e[a(o)].properties={}):r?r[a(o)]=s(E(o),l):(r=null,e[a(o)]=s(E(o),l)),e}),{});return i.linebarAutoHidden&&Object.values(l).forEach((e=>{"LINEBAR"===e["x-component"]&&v(e)})),d({properties:l,"x-root":!0},((e,o)=>{"INPUT_GROUP"===e["x-component"]&&v(e,!!o&&!o["x-root"])})),l;function s(e,o){return e["x-index"]=o,e["x-decorator-props"]={_index:o,...e["x-decorator-props"]},e}function a(o){if(o.suffixConfig||o.prefixConfig){const t=[...e(o.prefixConfig),o,...e(o.suffixConfig)].filter(Boolean);return m(t)}return o.val_key}}return{schemaAdaptor:T}}function v(e,o=!1){e["x-reactions"]?e["x-reactions"]=n(e["x-reactions"]):e["x-reactions"]=[];const t=Object.keys(e.properties||{}).map((t=>`${o?"*.":"."}${e.name}.${t}#selfDisplay`)).concat(Object.keys(e.properties||{}).map((t=>`${o?"*.":"."}${e.name}.${t}#component`)));e["x-reactions"].push({dependencies:t,fulfill:{state:{visible:"{{hasVisible($deps)}}"}}})}export{b as useFieldListAdaptor};
@@ -105,6 +105,8 @@ export declare function useFieldNormalize(): {
105
105
  linebarTextDirection: "horizontal" | "vertical";
106
106
  autoWidth: number | boolean;
107
107
  feedbackType: "default" | "tooltip";
108
+ fixMemoLeak: boolean;
109
+ lazyRender: boolean;
108
110
  }>], import("../../../../shared/utils/tapable").UnsetAdditionalOptions>;
109
111
  FieldListNormalizeWaterfallHook: SyncWaterfallHook<[FieldItem[], Partial<{
110
112
  fieldList: FieldItem[];
@@ -210,5 +212,7 @@ export declare function useFieldNormalize(): {
210
212
  linebarTextDirection: "horizontal" | "vertical";
211
213
  autoWidth: number | boolean;
212
214
  feedbackType: "default" | "tooltip";
215
+ fixMemoLeak: boolean;
216
+ lazyRender: boolean;
213
217
  }>], import("../../../../shared/utils/tapable").UnsetAdditionalOptions>;
214
218
  };
@@ -173,6 +173,8 @@ export type FormRenderProps = Partial<{
173
173
  linebarTextDirection: 'vertical' | 'horizontal';
174
174
  autoWidth: boolean | number;
175
175
  feedbackType: 'tooltip' | 'default';
176
+ fixMemoLeak: boolean;
177
+ lazyRender: boolean;
176
178
  }>;
177
179
  export type FormBusinessFormatter = (payload: {
178
180
  fieldKey: string;