cnhis-design-vue 3.1.42-beta.1 → 3.1.42-beta.10

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 (142) hide show
  1. package/README.md +87 -87
  2. package/es/components/annotation-edit/src/AnnotationEdit.js +1 -1
  3. package/es/components/base-search/index.d.ts +0 -22
  4. package/es/components/base-search/src/index.vue.d.ts +0 -22
  5. package/es/components/base-search/src/index.vue.js +1 -1
  6. package/es/components/base-search/style/index.css +1 -1
  7. package/es/components/big-table/index.d.ts +3 -4
  8. package/es/components/big-table/src/BigTable.vue.d.ts +3 -4
  9. package/es/components/big-table/src/BigTable.vue2.js +1 -1
  10. package/es/components/big-table/style/index.css +1 -1
  11. package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
  12. package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +1 -0
  13. package/es/components/bpmn-workflow/types/ModelingModule.d.ts +1 -0
  14. package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +1 -0
  15. package/es/components/button-print/index.d.ts +4 -4
  16. package/es/components/button-print/src/ButtonPrint.vue.d.ts +4 -4
  17. package/es/components/button-print/src/components/EditFormat.vue.d.ts +4 -4
  18. package/es/components/button-print/src/components/IdentityVerification.vue.d.ts +4 -4
  19. package/es/components/classification/src/index.vue.js +1 -1
  20. package/es/components/date-picker/index.d.ts +5 -13
  21. package/es/components/date-picker/src/DatePicker.vue.d.ts +5 -13
  22. package/es/components/date-picker/src/DatePicker.vue.js +1 -1
  23. package/es/components/fabric-chart/index.d.ts +2 -2
  24. package/es/components/fabric-chart/src/FabricChart.vue.d.ts +2 -2
  25. package/es/components/fabric-chart/src/utils/index.d.ts +6823 -0
  26. package/es/components/field-set/index.d.ts +84 -15
  27. package/es/components/field-set/src/FieldSet.vue.d.ts +80 -29
  28. package/es/components/field-set/src/types/index.d.ts +18 -0
  29. package/es/components/field-set/src/types/index.js +1 -0
  30. package/es/components/form-config/index.d.ts +24 -24
  31. package/es/components/form-config/src/FormConfig.vue.d.ts +24 -24
  32. package/es/components/form-config/src/FormConfig.vue.js +1 -1
  33. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +12 -12
  34. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +12 -12
  35. package/es/components/form-render/index.d.ts +12 -12
  36. package/es/components/form-render/index.js +1 -1
  37. package/es/components/form-render/src/FormRender.vue.d.ts +12 -12
  38. package/es/components/form-render/src/FormRender.vue.js +1 -1
  39. package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +12 -12
  40. package/es/components/form-render/src/components/renderer/complex.d.ts +1 -1
  41. package/es/components/form-render/src/components/renderer/date.js +1 -1
  42. package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue.d.ts +1 -1
  43. package/es/components/form-render/src/components/renderer/lineBar/index.d.ts +1 -1
  44. package/es/components/form-render/src/components/renderer/radio&checkbox.d.ts +2 -2
  45. package/es/components/form-render/src/components/renderer/searchCascade.js +1 -1
  46. package/es/components/form-render/src/components/renderer/select.js +1 -1
  47. package/es/components/form-render/src/hooks/index.d.ts +1 -1
  48. package/es/components/form-render/src/hooks/index.js +1 -1
  49. package/es/components/form-render/src/hooks/useFormAsyncQueue.d.ts +16 -0
  50. package/es/components/form-render/src/hooks/useFormAsyncQueue.js +1 -0
  51. package/es/components/form-render/src/hooks/useFormContext.js +1 -1
  52. package/es/components/form-render/src/types/index.d.ts +2 -1
  53. package/es/components/iho-table/index.d.ts +1523 -0
  54. package/es/components/iho-table/src/IhoTable.vue.d.ts +1523 -0
  55. package/es/components/iho-table/src/IhoTable.vue.js +1 -1
  56. package/es/components/iho-table/src/constants/index.d.ts +2 -1
  57. package/es/components/iho-table/src/constants/index.js +1 -1
  58. package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +1 -1
  59. package/es/components/iho-table/src/hooks/tapHooks/index.js +1 -1
  60. package/es/components/iho-table/src/hooks/tapHooks/useDataHooks.d.ts +3 -1
  61. package/es/components/iho-table/src/hooks/tapHooks/useDataHooks.js +1 -1
  62. package/es/components/iho-table/src/plugins/defaultConfigPlugin/index.js +1 -1
  63. package/es/components/iho-table/src/plugins/filterRenderPlugin/index.js +1 -1
  64. package/es/components/iho-table/src/plugins/index.js +1 -1
  65. package/es/components/iho-table/src/plugins/keyboardEventPlugin/index.js +1 -1
  66. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +5 -13
  67. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -1
  68. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +1 -1
  69. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.d.ts +1 -1
  70. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.js +1 -1
  71. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.d.ts +4 -10
  72. package/es/components/iho-table/src/plugins/varialbleHeightPlugin/index.d.ts +1 -0
  73. package/es/components/iho-table/src/plugins/varialbleHeightPlugin/index.js +1 -0
  74. package/es/components/iho-table/src/types/index.d.ts +1 -0
  75. package/es/components/iho-table/src/types/pluginType.d.ts +3 -1
  76. package/es/components/iho-table/src/utils/index.d.ts +1 -0
  77. package/es/components/iho-table/src/utils/index.js +1 -1
  78. package/es/components/iho-table/style/index.css +1 -1
  79. package/es/components/index.css +1 -1
  80. package/es/components/index.d.ts +1 -0
  81. package/es/components/index.js +1 -1
  82. package/es/components/info-header/index.d.ts +28 -28
  83. package/es/components/info-header/src/InfoHeader.vue.d.ts +28 -28
  84. package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +3 -3
  85. package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +3 -3
  86. package/es/components/info-header/src/components/infoDescription/HiddenContent.vue.d.ts +2 -2
  87. package/es/components/info-header/src/components/infoDescription/InfoEllipsis.vue.d.ts +1 -1
  88. package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +15 -15
  89. package/es/components/info-header/src/components/infoDescription/index.vue.js +1 -1
  90. package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +12 -12
  91. package/es/components/info-header/style/index.css +1 -1
  92. package/es/components/keyboard/index.d.ts +1 -1
  93. package/es/components/keyboard/src/Keyboard.vue.d.ts +1 -1
  94. package/es/components/keyboard/src/Keyboard.vue.js +1 -1
  95. package/es/components/scale-view/src/ScaleView.vue.js +1 -1
  96. package/es/components/scale-view/src/components/formitem/standard-modal.d.ts +1 -1
  97. package/es/components/select-label/src/LabelFormContent.vue.js +1 -1
  98. package/es/components/select-person/index.d.ts +1 -1
  99. package/es/components/select-person/src/SelectPerson.vue.d.ts +1 -1
  100. package/es/components/shortcut-setter/index.d.ts +12 -12
  101. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +12 -12
  102. package/es/components/steps-wheel/src/StepsWheel.vue.js +1 -1
  103. package/es/components/table-filter/index.d.ts +0 -1
  104. package/es/components/table-filter/index.js +1 -1
  105. package/es/components/table-filter/src/components/classify-filter/index.vue.js +1 -1
  106. package/es/components/table-filter/src/components/render-widget/components/CheckboxGroup.vue.d.ts +1 -1
  107. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +1 -1
  108. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.js +1 -1
  109. package/es/components/table-filter/src/hooks/useMixins.js +1 -1
  110. package/es/components/table-filter/src/tool/baseOptions.d.ts +0 -10
  111. package/es/components/table-filter/src/tool/baseOptions.js +1 -1
  112. package/es/components/table-filter/src/tool/generateDefOptions.d.ts +0 -7
  113. package/es/components/table-filter/src/tool/generateDefOptions.js +1 -1
  114. package/es/components/table-filter/src/types/index.d.ts +0 -74
  115. package/es/components/time-picker/index.d.ts +4 -10
  116. package/es/components/time-picker/src/TimePicker.vue.d.ts +4 -10
  117. package/es/components/time-picker/src/TimePicker.vue.js +1 -1
  118. package/es/env.d.ts +24 -24
  119. package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +86 -0
  120. package/es/shared/hooks/index.d.ts +3 -0
  121. package/es/shared/hooks/index.js +1 -0
  122. package/es/{components/form-render/src → shared}/hooks/useAsyncQueue.d.ts +0 -14
  123. package/es/shared/hooks/useAsyncQueue.js +1 -0
  124. package/es/shared/hooks/useDateTime.d.ts +6 -0
  125. package/es/shared/hooks/useDateTime.js +1 -0
  126. package/es/shared/utils/tapable/index.d.ts +139 -0
  127. package/package.json +2 -2
  128. package/es/components/base-search/src/directive/resize.d.ts +0 -4
  129. package/es/components/base-search/src/directive/resize.js +0 -1
  130. package/es/components/base-search/src/tool/resizeSensor.d.ts +0 -16
  131. package/es/components/base-search/src/tool/resizeSensor.js +0 -1
  132. package/es/components/form-render/src/hooks/useAsyncQueue.js +0 -1
  133. package/es/components/table-filter/src/hooks/export.d.ts +0 -1
  134. package/es/components/table-filter/src/hooks/export.js +0 -1
  135. package/es/components/table-filter/src/tool/getWidgetType.d.ts +0 -1
  136. package/es/components/table-filter/src/tool/getWidgetType.js +0 -1
  137. package/es/shared/mixins/index.d.ts +0 -1
  138. package/es/shared/mixins/index.js +0 -1
  139. package/es/shared/utils/colorLog.d.ts +0 -31
  140. package/es/shared/utils/colorLog.js +0 -1
  141. /package/es/shared/{mixins → hooks}/useTheme.d.ts +0 -0
  142. /package/es/shared/{mixins → hooks}/useTheme.js +0 -0
@@ -266,7 +266,7 @@ declare const _default: import("vue").DefineComponent<{}, {
266
266
  onScroll?: ((...args: any[]) => any) | undefined;
267
267
  onAnnotationChange?: ((...args: any[]) => any) | undefined;
268
268
  }>>;
269
- emit: (event: "scroll" | "formChange" | "annotationChange", ...args: any[]) => void;
269
+ emit: (event: "formChange" | "scroll" | "annotationChange", ...args: any[]) => void;
270
270
  nuiThemeOverrides: import("naive-ui").GlobalThemeOverrides;
271
271
  formRenderRef: import("vue").Ref<HTMLElement | undefined>;
272
272
  formHeight: import("vue").ComputedRef<string>;
@@ -422,32 +422,32 @@ declare const _default: import("vue").DefineComponent<{}, {
422
422
  data: any;
423
423
  loading: boolean;
424
424
  required: boolean;
425
- hidden: boolean;
426
- visible: boolean;
427
- content: any;
428
- reset: (options?: import("../../../../es/components/form-render").IFieldResetOptions | undefined) => Promise<void>;
429
- active: boolean;
430
- disabled: boolean;
431
- display: import("../../../../es/components/form-render").FieldDisplayTypes;
432
425
  value: string;
433
426
  readonly index: string | number;
427
+ disabled: boolean;
434
428
  onFocus: (...args: any[]) => Promise<void>;
435
429
  onBlur: (...args: any[]) => Promise<void>;
436
430
  onInput: (...args: any[]) => Promise<void>;
431
+ reset: (options?: import("../../../../es/components/form-render").IFieldResetOptions | undefined) => Promise<void>;
432
+ visible: boolean;
437
433
  submit: <T>(onSubmit?: ((values: any) => void | Promise<T>) | undefined) => Promise<T>;
438
434
  validator: import("../../../../es/components/form-render").FieldValidator;
439
435
  pattern: import("../../../../es/components/form-render").FieldPatternTypes;
440
436
  title: string;
441
437
  form: import("../../../../es/components/form-render").Form<any>;
438
+ content: any;
442
439
  componentProps: Record<string, any>;
443
440
  decoratorProps: Record<string, any>;
441
+ display: import("../../../../es/components/form-render").FieldDisplayTypes;
444
442
  description: string;
445
443
  readOnly: boolean;
446
444
  editable: boolean;
445
+ hidden: boolean;
447
446
  component: import("../../../../es/components/form-render").FieldComponent<any, any>;
448
447
  decorator: import("../../../../es/components/form-render").FieldDecorator<any, any>;
449
448
  validating: boolean;
450
449
  submitting: boolean;
450
+ active: boolean;
451
451
  visited: boolean;
452
452
  selfModified: boolean;
453
453
  modified: boolean;
@@ -534,7 +534,7 @@ declare const _default: import("vue").DefineComponent<{}, {
534
534
  };
535
535
  readonly disabled: BooleanConstructor;
536
536
  readonly displayDirective: {
537
- readonly type: import("vue").PropType<"show" | "if" | "show:lazy">;
537
+ readonly type: import("vue").PropType<"if" | "show" | "show:lazy">;
538
538
  readonly default: "if";
539
539
  };
540
540
  readonly closable: {
@@ -559,7 +559,7 @@ declare const _default: import("vue").DefineComponent<{}, {
559
559
  };
560
560
  readonly disabled: BooleanConstructor;
561
561
  readonly displayDirective: {
562
- readonly type: import("vue").PropType<"show" | "if" | "show:lazy">;
562
+ readonly type: import("vue").PropType<"if" | "show" | "show:lazy">;
563
563
  readonly default: "if";
564
564
  };
565
565
  readonly closable: {
@@ -573,10 +573,10 @@ declare const _default: import("vue").DefineComponent<{}, {
573
573
  }>>, {
574
574
  readonly disabled: boolean;
575
575
  readonly closable: boolean | undefined;
576
- readonly displayDirective: "show" | "if" | "show:lazy";
576
+ readonly displayDirective: "if" | "show" | "show:lazy";
577
577
  }>;
578
578
  NTabs: any;
579
- }, 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<{
579
+ }, 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<{
580
580
  fieldList: {
581
581
  type: import("vue").PropType<import("../../../../es/components/form-render").FieldItem[]>;
582
582
  };
@@ -28,7 +28,7 @@ export declare const COMPLEX: import("vue").DefineComponent<{
28
28
  default: () => {};
29
29
  };
30
30
  }>>, {
31
- display: "flex" | "grid";
32
31
  span: number;
32
+ display: "flex" | "grid";
33
33
  wrapperStyle: CSSProperties;
34
34
  }>;
@@ -1 +1 @@
1
- import{defineComponent as e,computed as t,watch as r,createVNode as n,mergeProps as u}from"vue";import{generateTimeFormat as i}from"../../../../../shared/utils/index.js";import{connect as a,mapProps as o}from"@formily/vue";import{isObject as s}from"@vueuse/core";import{format as l}from"date-fns";import{NDatePicker as m}from"naive-ui";import{useCommonInjection as v}from"../../hooks/useCommonInjection.js";import"../../utils/index.js";import{assignUpdateValue as d,assignClearBindVisited as f}from"../../utils/schema.js";import{businessDateParser as c}from"../../utils/business.js";const p=a(e({props:{onChange:{},value:{type:String},validate:{type:Object},valueFormat:{type:String,default:"yyyy-MM-dd"}},emits:["update:value"],setup(e,{emit:a}){const{injectValueValidate:o,injectValueBindKey:d}=v();function f(){var t;return"currTime"===(null==(t=e.validate)?void 0:t.min_date)}function p(){var t;return"currTime"===(null==(t=e.validate)?void 0:t.max_date)}function D(e){return f()&&e<Date.now()-864e5||p()&&e>Date.now()}function y(e){const t=new Date(e),r=new Date,n=new Date(t);return n.setHours(0),n.setMinutes(0),n.setSeconds(0),{isHourDisabled:function(e){return!o()&&(f()&&e<i()||p()&&e>i())},isMinuteDisabled:function(e){if(o())return!1;if(u()===i())return f()&&e<a()||p()&&e>a();return f()&&u()<i()||p()&&u()>i()}};function u(){return t.getHours()}function i(){return r.getHours()}function a(){return r.getMinutes()}function o(){return n>r}}o((()=>e.value));const g=t((()=>{const t={};if(s(e.validate)){const{min_date:r,max_date:n}=e.validate;(r||n)&&(t.isDateDisabled=D,t.isTimeDisabled=y)}return t})),b=t((()=>({valueFormat:e.valueFormat,format:e.valueFormat,timePickerProps:{format:i(e.valueFormat)}})));function j(t){return t?l(new Date(t),e.valueFormat):t}let w="";function F(t){if("Enter"!==t.key)return void(w=t.target.value+t.key);const r=c(w);if(!r)return;const{isTimeDisabled:n,isDateDisabled:u}=g.value;(function(e){if(!u||u(e.getTime()))return;const{isHourDisabled:t,isMinuteDisabled:r}=n?n(e.getTime()):{};if(!t||t(e.getHours()))return;if(!r||r(e.getMinutes()))return;return!0})(r)&&(M.value=l(r,e.valueFormat))}r((()=>e.value),(e=>{e&&j(e)!==e&&a("update:value",j(e))}));const M=t({get:()=>j(e.value),set:e=>{a("update:value",e),w=""}}),H=d(M);return()=>n(m,u({key:H.value},g.value,b.value,{"formatted-value":M.value,"onUpdate:formatted-value":e=>M.value=e,onKeydown:F}),null)}}),o(d,f));export{p as DATE};
1
+ import{defineComponent as e,computed as t,watch as r,createVNode as n,mergeProps as a}from"vue";import{generateTimeFormat as u}from"../../../../../shared/utils/index.js";import{connect as o,mapProps as i}from"@formily/vue";import{isObject as l}from"@vueuse/core";import{format as s}from"date-fns";import{useCommonInjection as m}from"../../hooks/useCommonInjection.js";import"../../utils/index.js";import d from"../../../../date-picker/index.js";import{assignUpdateValue as v,assignClearBindVisited as c}from"../../utils/schema.js";const f=o(e({props:{onChange:{},value:{type:String},validate:{type:Object},valueFormat:{type:String,default:"yyyy-MM-dd"}},emits:["update:value"],setup(e,{emit:o}){const{injectValueValidate:i,injectValueBindKey:v}=m();function c(){var t;return"currTime"===(null==(t=e.validate)?void 0:t.min_date)}function f(){var t;return"currTime"===(null==(t=e.validate)?void 0:t.max_date)}function p(e){return c()&&e<Date.now()-864e5||f()&&e>Date.now()}function D(e){const t=new Date(e),r=new Date,n=new Date(t);return n.setHours(0),n.setMinutes(0),n.setSeconds(0),{isHourDisabled:function(e){return!i()&&(c()&&e<u()||f()&&e>u())},isMinuteDisabled:function(e){if(i())return!1;if(a()===u())return c()&&e<o()||f()&&e>o();return c()&&a()<u()||f()&&a()>u()}};function a(){return t.getHours()}function u(){return r.getHours()}function o(){return r.getMinutes()}function i(){return n>r}}i((()=>e.value));const y=t((()=>{const t={};if(l(e.validate)){const{min_date:r,max_date:n}=e.validate;(r||n)&&(t.isDateDisabled=p,t.isTimeDisabled=D)}return t})),j=t((()=>({valueFormat:e.valueFormat,format:e.valueFormat,timePickerProps:{format:u(e.valueFormat)}})));function g(t){return t?s(new Date(t),e.valueFormat):t}r((()=>e.value),(e=>{e&&g(e)!==e&&o("update:value",g(e))}));const w=t({get:()=>g(e.value),set:e=>{o("update:value",e)}}),x=v(w);return()=>n(d,a({key:x.value},y.value,j.value,{"formatted-value":w.value,"onUpdate:formatted-value":e=>w.value=e}),null)}}),i(v,c));export{f as DATE};
@@ -65,8 +65,8 @@ declare const _default: import("vue").DefineComponent<{
65
65
  default: boolean;
66
66
  };
67
67
  }>>, {
68
- show: boolean;
69
68
  disabled: boolean;
69
+ show: boolean;
70
70
  title: string;
71
71
  }>;
72
72
  export default _default;
@@ -65,7 +65,7 @@ export declare const LINEBAR: import("vue").DefineComponent<{
65
65
  default: boolean;
66
66
  };
67
67
  }>>, {
68
- show: boolean;
69
68
  disabled: boolean;
69
+ show: boolean;
70
70
  title: string;
71
71
  }>;
@@ -87,10 +87,10 @@ export declare const RADIO: import("vue").DefineComponent<{
87
87
  }>> & {
88
88
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
89
89
  }, {
90
- vertical: boolean;
91
90
  options: AnyObject[];
92
91
  lazyRequest: boolean;
93
92
  requestCache: boolean;
93
+ vertical: boolean;
94
94
  }>;
95
95
  export declare const CHECKBOX: import("vue").DefineComponent<{
96
96
  value: {
@@ -179,8 +179,8 @@ export declare const CHECKBOX: import("vue").DefineComponent<{
179
179
  }>> & {
180
180
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
181
181
  }, {
182
- vertical: boolean;
183
182
  options: AnyObject[];
184
183
  lazyRequest: boolean;
185
184
  requestCache: boolean;
185
+ vertical: boolean;
186
186
  }>;
@@ -1 +1 @@
1
- import{defineComponent as e,ref as t,computed as a,inject as o,watch as r,createVNode as l,nextTick as n}from"vue";import{isEqual as i,isArray as u}from"lodash-es";import"../../../index.js";import{useCommonInjection as s}from"../../hooks/useCommonInjection.js";import{InjectionAsyncQueue as c,InjectionFormUUID as p}from"../../constants/index.js";import"../../../../../shared/utils/index.js";import"../../utils/index.js";import{useFormField as m}from"../../hooks/useFormField.js";import"@vueuse/core";import"../../../../../shared/utils/tapable/SyncHook.js";import"../../../../../shared/utils/tapable/SyncBailHook.js";import"../../../../../shared/utils/tapable/SyncWaterfallHook.js";import"../../../../../shared/utils/tapable/SyncLoopHook.js";import"../../../../../shared/utils/tapable/AsyncParallelHook.js";import"../../../../../shared/utils/tapable/AsyncParallelBailHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesBailHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesLoopHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesWaterfallHook.js";import"../../hooks/useFormValidator.js";import"@formily/core";import"date-fns";import"@formily/reactive";import{connect as d,mapProps as v}from"@formily/vue";import"@vue/shared";import"./index.js";import"../../hooks/useFormRenderOptions.js";import{NCascader as f}from"naive-ui";import{createVisitedSetter as h,assignUpdateValue as y,traverseDependKey as j}from"../../utils/schema.js";const b=d(e({name:"FormCascader",props:{options:{type:Array,default:()=>[]},depth:{type:[Number,String]},urlConfig:{type:Object},requestCache:{type:Boolean,default:!0},onFocus:{type:Function},filterable:{type:Boolean,default:!1},onChange:{},value:{}},emits:["update:value"],setup(e,{slots:d,emit:v}){const y=t(),{field:b,title:k}=m(),C=a((()=>{var t,a;return null!=(a=null==(t=e.urlConfig)?void 0:t.nameKey)?a:"text"})),g=a((()=>{var t,a;return null!=(a=null==(t=e.urlConfig)?void 0:t.valueKey)?a:"value"})),A=a((()=>{try{const t=Array.isArray(e.value)?e.value:JSON.parse(e.value||"");return Array.isArray(t)&&t.length?t.map((e=>e[C.value])).join(" / "):null}catch(e){return null}}));function S(e,t,a){v("update:value",a.map((function(e){return{...e,label:e[C.value],children:void 0,parent:void 0}})))}const F=o(c);async function w(t){e.filterable?await async function(){if(!e.urlConfig||y.value&&e.requestCache)return;const t=await F.addAsync({...e.urlConfig,params:{lvlnr:"1"},key:k.value,cache:e.requestCache});function a(e,t){const o={[C.value]:e[C.value],[g.value]:e[g.value],depth:t+1,isLeaf:!0};return u(e.children)&&(o.children=e.children.map((e=>a(e,t+1))),o.isLeaf=!e.children.length),o}y.value=t.map((e=>a(e,0)))}():await async function(t){if(r(e,t))return;const a=await F.addAsync(l(s(t),u(e),k.value,t));if(!a.length&&t)return t.isLeaf=!0,S(0,0,n(t)),void(K.value=!1);const o=a.map((e=>i(e,s(t))));function r(e,t){return!u(e)||!t&&y.value&&e.requestCache||s(t)>=s(e)-1}function l(t,a,o,r){const l={lvlnr:t+1+""};return r&&a.dependKey&&j(a.dependKey,((e,t)=>{l[t]=r[e]})),{params:l,...a,key:o,cache:e.requestCache}}function n(e){let t=e;const a=[e];for(;t.parent;)a.unshift(t.parent),t=t.parent;return a}function i(a,o){return{[C.value]:a[C.value],[g.value]:a[g.value],depth:o+1,parent:t,isLeaf:o+2>=s(e)}}function u(e){return e.urlConfig}function s(e){var t;return null!=(t=null==e?void 0:e.depth)?t:-1}t?t.children=o:y.value=o}(t),await x()}const H=`form-render__cascade--menu-${o(p)}`;async function x(){await n();const e=document.querySelector(`.${H} .v-vl`);e&&e.dispatchEvent(new CustomEvent("scroll"))}const{injectValueValidate:L,injectValueWatchFromEmpty:q,injectValueBindKey:B}=s();q((()=>e.value),w),L((()=>e.value)),r((()=>e.urlConfig),(async(e,t)=>{i(e,t)||(y.value=null,await w())}));const K=t(!1);function V(e){K.value=!!e,e&&w()}const E=a((()=>y.value||e.options||[])),O=a((()=>!e.filterable)),W=B(A);return()=>l(f,{key:W.value,remote:O.value,filterable:e.filterable,"menu-props":{class:H,onClick:x},checkStrategy:"child",show:!!K.value,"onUpdate:show":V,value:A.value,"onUpdate:value":S,labelField:C.value,valueField:g.value,options:E.value,onLoad:w,onFocus:h(b)},d)}}),v({dataSource:"options"},y));export{b as SEARCH_CASCADER};
1
+ import{defineComponent as e,ref as t,computed as a,inject as o,watch as r,createVNode as l,nextTick as n}from"vue";import{isEqual as i,isArray as u}from"lodash-es";import"../../../index.js";import{useCommonInjection as s}from"../../hooks/useCommonInjection.js";import{InjectionAsyncQueue as c,InjectionFormUUID as p}from"../../constants/index.js";import"../../../../../shared/utils/index.js";import"../../utils/index.js";import{useFormField as m}from"../../hooks/useFormField.js";import{NCascader as d}from"naive-ui";import"@vueuse/core";import"../../../../../shared/utils/tapable/SyncHook.js";import"../../../../../shared/utils/tapable/SyncBailHook.js";import"../../../../../shared/utils/tapable/SyncWaterfallHook.js";import"../../../../../shared/utils/tapable/SyncLoopHook.js";import"../../../../../shared/utils/tapable/AsyncParallelHook.js";import"../../../../../shared/utils/tapable/AsyncParallelBailHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesBailHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesLoopHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesWaterfallHook.js";import"../../hooks/useFormValidator.js";import"@formily/core";import"date-fns";import"@formily/reactive";import{connect as v,mapProps as f}from"@formily/vue";import"@vue/shared";import"./index.js";import"../../hooks/useFormRenderOptions.js";import{createVisitedSetter as h,assignUpdateValue as y,traverseDependKey as j}from"../../utils/schema.js";const b=v(e({name:"FormCascader",props:{options:{type:Array,default:()=>[]},depth:{type:[Number,String]},urlConfig:{type:Object},requestCache:{type:Boolean,default:!0},onFocus:{type:Function},filterable:{type:Boolean,default:!1},onChange:{},value:{}},emits:["update:value"],setup(e,{slots:v,emit:f}){const y=t(),{field:b,title:k}=m(),C=a((()=>{var t,a;return null!=(a=null==(t=e.urlConfig)?void 0:t.nameKey)?a:"text"})),g=a((()=>{var t,a;return null!=(a=null==(t=e.urlConfig)?void 0:t.valueKey)?a:"value"})),A=a((()=>{try{const t=Array.isArray(e.value)?e.value:JSON.parse(e.value||"");return Array.isArray(t)&&t.length?t.map((e=>e[C.value])).join(" / "):null}catch(e){return null}}));function S(e,t,a){f("update:value",a.map((function(e){return{...e,label:e[C.value],children:void 0,parent:void 0}})))}const F=o(c);async function w(t){e.filterable?await async function(){if(!e.urlConfig||y.value&&e.requestCache)return;const t=await F.addAsync({...e.urlConfig,params:{lvlnr:"1"},key:k.value,cache:e.requestCache});function a(e,t){const o={[C.value]:e[C.value],[g.value]:e[g.value],depth:t+1,isLeaf:!0};return u(e.children)&&(o.children=e.children.map((e=>a(e,t+1))),o.isLeaf=!e.children.length),o}y.value=t.map((e=>a(e,0)))}():await async function(t){if(r(e,t))return;const a=await F.addAsync(l(s(t),u(e),k.value,t));if(!a.length&&t)return t.isLeaf=!0,S(0,0,n(t)),void(K.value=!1);const o=a.map((e=>i(e,s(t))));function r(e,t){return!u(e)||!t&&y.value&&e.requestCache||s(t)>=s(e)-1}function l(t,a,o,r){const l={lvlnr:t+1+""};return r&&a.dependKey&&j(a.dependKey,((e,t)=>{l[t]=r[e]})),{params:l,...a,key:o,cache:e.requestCache}}function n(e){let t=e;const a=[e];for(;t.parent;)a.unshift(t.parent),t=t.parent;return a}function i(a,o){return{[C.value]:a[C.value],[g.value]:a[g.value],depth:o+1,parent:t,isLeaf:o+2>=s(e)}}function u(e){return e.urlConfig}function s(e){var t;return null!=(t=null==e?void 0:e.depth)?t:-1}t?t.children=o:y.value=o}(t),await x()}const H=`form-render__cascade--menu-${o(p)}`;async function x(){await n();const e=document.querySelector(`.${H} .v-vl`);e&&e.dispatchEvent(new CustomEvent("scroll"))}const{injectValueValidate:L,injectValueWatchFromEmpty:q,injectValueBindKey:B}=s();q((()=>e.value),w),L((()=>e.value)),r((()=>e.urlConfig),(async(e,t)=>{i(e,t)||(y.value=null,await w())}));const K=t(!1);function V(e){K.value=!!e,e&&w()}const E=a((()=>y.value||e.options||[])),O=a((()=>!e.filterable)),W=B(A);return()=>l(d,{key:W.value,remote:O.value,filterable:e.filterable,"menu-props":{class:H,onClick:x},checkStrategy:"child",show:!!K.value,"onUpdate:show":V,value:A.value,"onUpdate:value":S,labelField:C.value,valueField:g.value,options:E.value,onLoad:w,onFocus:h(b)},v)}}),f({dataSource:"options"},y));export{b as SEARCH_CASCADER};
@@ -1 +1 @@
1
- import{defineComponent as e,computed as o,inject as t,ref as a,createVNode as r}from"vue";import{useDebounceFn as l}from"@vueuse/core";import{cloneDeep as s,isString as i}from"lodash-es";import{useCommonInjection as n,useSelectOptionProps as u}from"../../hooks/useCommonInjection.js";import{InjectionChangeContextCollector as p}from"../../constants/index.js";import"../../../../../shared/utils/index.js";import"../../../index.js";import"../../utils/index.js";import{useFormField as m}from"../../hooks/useFormField.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"../../hooks/useFormValidator.js";import"@formily/core";import"date-fns";import"@formily/reactive";import{connect as c,mapProps as d}from"@formily/vue";import"@vue/shared";import"./index.js";import{useUrlConfigOptions as y,useAutographOptions as v,useRecommendOptions as f,searchContentMatcher as h}from"../../hooks/useFormRenderOptions.js";import{NSelect as j}from"naive-ui";import{createVisitedSetter as b,assignUpdateValue as k,assignClearBindVisited as S}from"../../utils/schema.js";const g=c(e({name:"FormSelect",props:{value:{type:[String,Array]},lazyRequest:{type:Boolean,default:!0},requestCache:{type:Boolean,default:!0},options:{type:Array,default:()=>[]},onChange:{},allowCreate:Boolean,urlConfig:{type:Object},autograph:{type:String},wordbook:{type:Object},recommend:{type:Boolean,default:!1},commonList:{type:Array},recentList:{type:Array},getRecommendInfo:{type:Function},recommendNum:{type:Number,default:10},recommendCache:{type:Boolean,default:!1}},emits:["update:value","postRecommend"],setup(e,{slots:c,emit:d}){const k=o({get:()=>e.value,async set(e){d("update:value",e),C(e)}}),{labelKey:S,valueKey:g,fetchData:A,fullOptions:F,filterOptions:H}=e.urlConfig?y(e,k):v(e,k),{getRecommend:B,postRecommend:C,sortedOptions:x}=f(e,H,d,S,g),{field:O,fieldKey:R}=m();t(p).setContext(R.value,(e=>{return{currentOption:s((o=e,F.value.find((e=>e[g.value]===o))))};var o}));const L=a(""),V=l((async(e="")=>{L.value=e,A(e),B(e)}),300),{injectValueValidate:w,injectValueWatchFromEmpty:K,injectValueBindKey:P}=n();K(k,V),w(k);const W=P(k),{menuProps:q,nodeProps:I}=u();function N(e){const o=e[S.value];if(!o||!i(o))return"";const t=h(L.value,o);return t?r("section",null,[t.map(((e,o)=>0!==o&&e?r("span",{style:{color:o%2==0?"var(--n-option-text-color-active)":""}},[e]):null))]):o}const U=o((()=>x.value.length||!e.allowCreate?x.value:L.value?[{[S.value]:L.value,[g.value]:L.value},...x.value]:x.value));return()=>r(j,{key:W.value,remote:!0,filterable:!0,value:k.value,"onUpdate:value":e=>k.value=e,"menu-props":q,"node-props":I,labelField:S.value,valueField:g.value,options:U.value,onSearch:V,"onUpdate:show":e=>e&&V(),onFocus:b(O),renderLabel:N},c)}}),d({dataSource:"options"},k,S));export{g as SELECT};
1
+ import{defineComponent as e,computed as o,inject as t,ref as a,createVNode as r}from"vue";import{useDebounceFn as l}from"@vueuse/core";import{cloneDeep as s,isString as i}from"lodash-es";import{useCommonInjection as n,useSelectOptionProps as u}from"../../hooks/useCommonInjection.js";import{InjectionChangeContextCollector as p}from"../../constants/index.js";import"../../../../../shared/utils/index.js";import"../../../index.js";import"../../utils/index.js";import{useFormField as m}from"../../hooks/useFormField.js";import{NSelect as c}from"naive-ui";import"../../../../../shared/utils/tapable/SyncHook.js";import"../../../../../shared/utils/tapable/SyncBailHook.js";import"../../../../../shared/utils/tapable/SyncWaterfallHook.js";import"../../../../../shared/utils/tapable/SyncLoopHook.js";import"../../../../../shared/utils/tapable/AsyncParallelHook.js";import"../../../../../shared/utils/tapable/AsyncParallelBailHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesBailHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesLoopHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesWaterfallHook.js";import"../../hooks/useFormValidator.js";import"@formily/core";import"date-fns";import"@formily/reactive";import{connect as d,mapProps as y}from"@formily/vue";import"@vue/shared";import"./index.js";import{useUrlConfigOptions as v,useAutographOptions as f,useRecommendOptions as h,searchContentMatcher as j}from"../../hooks/useFormRenderOptions.js";import{createVisitedSetter as b,assignUpdateValue as k,assignClearBindVisited as S}from"../../utils/schema.js";const g=d(e({name:"FormSelect",props:{value:{type:[String,Array]},lazyRequest:{type:Boolean,default:!0},requestCache:{type:Boolean,default:!0},options:{type:Array,default:()=>[]},onChange:{},allowCreate:Boolean,urlConfig:{type:Object},autograph:{type:String},wordbook:{type:Object},recommend:{type:Boolean,default:!1},commonList:{type:Array},recentList:{type:Array},getRecommendInfo:{type:Function},recommendNum:{type:Number,default:10},recommendCache:{type:Boolean,default:!1}},emits:["update:value","postRecommend"],setup(e,{slots:d,emit:y}){const k=o({get:()=>e.value,async set(e){y("update:value",e),C(e)}}),{labelKey:S,valueKey:g,fetchData:A,fullOptions:F,filterOptions:H}=e.urlConfig?v(e,k):f(e,k),{getRecommend:B,postRecommend:C,sortedOptions:x}=h(e,H,y,S,g),{field:O,fieldKey:R}=m();t(p).setContext(R.value,(e=>{return{currentOption:s((o=e,F.value.find((e=>e[g.value]===o))))};var o}));const L=a(""),V=l((async(e="")=>{L.value=e,A(e),B(e)}),300),{injectValueValidate:w,injectValueWatchFromEmpty:K,injectValueBindKey:P}=n();K(k,V),w(k);const W=P(k),{menuProps:q,nodeProps:I}=u();function N(e){const o=e[S.value];if(!o||!i(o))return"";const t=j(L.value,o);return t?r("section",null,[t.map(((e,o)=>0!==o&&e?r("span",{style:{color:o%2==0?"var(--n-option-text-color-active)":""}},[e]):null))]):o}const U=o((()=>x.value.length||!e.allowCreate?x.value:L.value?[{[S.value]:L.value,[g.value]:L.value},...x.value]:x.value));return()=>r(c,{key:W.value,remote:!0,filterable:!0,value:k.value,"onUpdate:value":e=>k.value=e,"menu-props":q,"node-props":I,labelField:S.value,valueField:g.value,options:U.value,onSearch:V,"onUpdate:show":e=>e&&V(),onFocus:b(O),renderLabel:N},d)}}),y({dataSource:"options"},k,S));export{g as SELECT};
@@ -2,7 +2,7 @@ export * from './useFieldListAdaptor';
2
2
  export * from './useFormRequest';
3
3
  export * from './useCommonLog';
4
4
  export * from './useFormField';
5
- export * from './useAsyncQueue';
5
+ export * from './useFormAsyncQueue';
6
6
  export * from './useFieldVisitor';
7
7
  export * from './useFieldNormalize';
8
8
  export * from './useFormValidator';
@@ -1 +1 @@
1
- export{useFieldListAdaptor}from"./useFieldListAdaptor.js";export{useFormRequest}from"./useFormRequest.js";export{useCommonLog}from"./useCommonLog.js";export{useFormField}from"./useFormField.js";export{AsyncQueue,useAsyncQueue}from"./useAsyncQueue.js";export{useFieldVisitor}from"./useFieldVisitor.js";export{useFieldNormalize}from"./useFieldNormalize.js";export{useFormValidator,validateMessageLocale}from"./useFormValidator.js";export{BusinessCollector,useBusinessBinding}from"./useBusinessBinding.js";export{ContextCollector,useChangeContext}from"./useChangeContext.js";export{FormItemDepsCollector,useFormItemDeps}from"./useFormItemDeps.js";export{useAnchor}from"./useAnchor.js";export{useFormContext}from"./useFormContext.js";export{useCommonInjection,useSelectOptionProps}from"./useCommonInjection.js";export{searchContentMatcher,useAutographOptions,useRecommendOptions,useUrlConfigOptions}from"./useFormRenderOptions.js";
1
+ export{useFieldListAdaptor}from"./useFieldListAdaptor.js";export{useFormRequest}from"./useFormRequest.js";export{useCommonLog}from"./useCommonLog.js";export{useFormField}from"./useFormField.js";export{useFormAsyncQueue}from"./useFormAsyncQueue.js";export{useFieldVisitor}from"./useFieldVisitor.js";export{useFieldNormalize}from"./useFieldNormalize.js";export{useFormValidator,validateMessageLocale}from"./useFormValidator.js";export{BusinessCollector,useBusinessBinding}from"./useBusinessBinding.js";export{ContextCollector,useChangeContext}from"./useChangeContext.js";export{FormItemDepsCollector,useFormItemDeps}from"./useFormItemDeps.js";export{useAnchor}from"./useAnchor.js";export{useFormContext}from"./useFormContext.js";export{useCommonInjection,useSelectOptionProps}from"./useCommonInjection.js";export{searchContentMatcher,useAutographOptions,useRecommendOptions,useUrlConfigOptions}from"./useFormRenderOptions.js";
@@ -0,0 +1,16 @@
1
+ import { AsyncQueue } from '../../../../../es/shared/hooks';
2
+ import { AnyObject, UndefinedAble } from '../../../../../es/shared/types';
3
+ import { ComputedRef } from 'vue';
4
+ import { FormAsyncQueueItem } from '../types';
5
+ import { RequestInstance } from '../../../../../es/components/form-render';
6
+ declare type ProcessorOption = Partial<{
7
+ afterRequest(key: string, payload?: unknown): AnyObject[];
8
+ beforeRequest(key: string, params?: unknown): UndefinedAble<AnyObject> | void;
9
+ }>;
10
+ export declare function useFormAsyncQueue(requestInstance: ComputedRef<UndefinedAble<RequestInstance>>): {
11
+ create: (parallelism?: number, option?: ProcessorOption) => AsyncQueue<FormAsyncQueueItem, any, {
12
+ label: string;
13
+ value: unknown;
14
+ }[]>;
15
+ };
16
+ export {};
@@ -0,0 +1 @@
1
+ import{uuidGenerator as e}from"../../../../shared/utils/index.js";import{isFunction as r}from"lodash-es";import"naive-ui";import{unref as t}from"vue";import"@vueuse/core";import{AsyncQueue as o}from"../../../../shared/hooks/useAsyncQueue.js";import"../../index.js";import{useCommonLog as s}from"./useCommonLog.js";import{useFormRequest as n}from"./useFormRequest.js";function u(u){const{getHttpInstance:a}=n();return{create:function(n=3,i){return new o({name:"FormRenderAsyncQueue",parallelism:n,async processor({key:e,method:o="post",cache:n,params:m,url:c},p,f){var l,d;const h=null!=(l=t(u))?l:a();if(!h)return s().invalidHttpInstanceLog(),p(),void f();try{i&&r(i.beforeRequest)&&(m=null!=(d=i.beforeRequest(e,m))?d:{});let t=await h[o](c,m);i&&r(i.afterRequest)&&(t=i.afterRequest(e,t)),p(void 0,Array.isArray(t)?t:[]),!n&&f()}catch(e){p(new Error(`Request error => ${e}`)),f()}},getKey:({url:r,method:t="post",cache:o,params:s})=>o?r+t+JSON.stringify(s||{}):e()})}}}export{u as useFormAsyncQueue};
@@ -1 +1 @@
1
- import{uuidGenerator as e}from"../../../../shared/utils/index.js";import{createSchemaField as o}from"@formily/vue";import{isObject as t}from"@vue/shared";import{cloneDeep as r}from"lodash-es";import{computed as s,provide as n,readonly as i}from"vue";import"../../index.js";import m from"../components/renderer/index.js";import{InjectionAsyncQueue as a,InjectionSchemaField as u,InjectionBusinessCollector as p,InjectionChangeContextCollector as c,InjectionFormItemDepsCollector as l,InjectionFormUUID as f,InjectionAnnotation as d}from"../constants/index.js";import{useFormRenderLifeCycle as j}from"./useFormRenderLifeCycle.js";import{usePresetScope as y}from"./usePresetScope.js";import{injectOrProvide as C,presetRequestHandler as h}from"../utils/index.js";import{useAsyncQueue as x}from"./useAsyncQueue.js";import{useBusinessBinding as g}from"./useBusinessBinding.js";import{useChangeContext as v}from"./useChangeContext.js";import{useFormItemDeps as b}from"./useFormItemDeps.js";function q(q,F){const{callLifeCycle:R}=j(q),I=C(a,(()=>x(s((()=>q.requestInstance))).create(q.parallelism,{beforeRequest:(...e)=>R("beforeRequest",r(e))||e[1],afterRequest:(...e)=>R("afterRequest",r(e))||h(e[1])}))),D=C(u,(()=>o({components:{...m,...q.components},scope:Object.assign({},y(),q.scope)}).SchemaField)),S=g().create(q.businessFormatter);n(p,S);const B=v().create();n(c,B);const L=b().create();n(l,L);const Q=q.uuid||e();return n(f,Q),n(d,s({get:()=>q.annotation?i(q.annotation):null,set(e){if(!t(q.annotation)||!t(e))return;const o=q.annotation[e.property];q.annotation[e.property]=e.value,F("annotationChange",{fieldKey:e.property,value:e.value,oldValue:o})}})),{asyncQueue:I,SchemaField:D,businessCollector:S,changeContextCollector:B,formItemDepsCollector:L,formUUID:Q}}export{q as useFormContext};
1
+ import{uuidGenerator as e}from"../../../../shared/utils/index.js";import{createSchemaField as o}from"@formily/vue";import{isObject as t}from"@vue/shared";import{cloneDeep as r}from"lodash-es";import{computed as s,provide as n,readonly as i}from"vue";import"../../index.js";import m from"../components/renderer/index.js";import{InjectionAsyncQueue as a,InjectionSchemaField as u,InjectionBusinessCollector as p,InjectionChangeContextCollector as c,InjectionFormItemDepsCollector as l,InjectionFormUUID as f,InjectionAnnotation as d}from"../constants/index.js";import{useFormRenderLifeCycle as j}from"./useFormRenderLifeCycle.js";import{usePresetScope as y}from"./usePresetScope.js";import{injectOrProvide as C,presetRequestHandler as h}from"../utils/index.js";import{useFormAsyncQueue as x}from"./useFormAsyncQueue.js";import{useBusinessBinding as g}from"./useBusinessBinding.js";import{useChangeContext as v}from"./useChangeContext.js";import{useFormItemDeps as F}from"./useFormItemDeps.js";function b(b,q){const{callLifeCycle:R}=j(b),I=C(a,(()=>x(s((()=>b.requestInstance))).create(b.parallelism,{beforeRequest:(...e)=>R("beforeRequest",r(e))||e[1],afterRequest:(...e)=>R("afterRequest",r(e))||h(e[1])}))),D=C(u,(()=>o({components:{...m,...b.components},scope:Object.assign({},y(),b.scope)}).SchemaField)),S=g().create(b.businessFormatter);n(p,S);const B=v().create();n(c,B);const L=F().create();n(l,L);const Q=b.uuid||e();return n(f,Q),n(d,s({get:()=>b.annotation?i(b.annotation):null,set(e){if(!t(b.annotation)||!t(e))return;const o=b.annotation[e.property];b.annotation[e.property]=e.value,q("annotationChange",{fieldKey:e.property,value:e.value,oldValue:o})}})),{asyncQueue:I,SchemaField:D,businessCollector:S,changeContextCollector:B,formItemDepsCollector:L,formUUID:Q}}export{b as useFormContext};
@@ -1,3 +1,4 @@
1
+ import { AsyncQueue } from '../../../../../es/shared/hooks';
1
2
  import { AnyObject, UndefinedAble } from '../../../../../es/shared/types';
2
3
  import { LOW_CODE_VALUE_RELATION } from '../../../../../es/shared/utils';
3
4
  import { DataField, Field, Form } from '@formily/core';
@@ -5,7 +6,7 @@ import { ISchema } from '@formily/json-schema/esm/types';
5
6
  import { Component, FunctionalComponent } from 'vue';
6
7
  import { FIELD_BUSINESS_TYPE } from '../../../../../es/components/form-render/src/constants';
7
8
  import { FieldItem } from '../types';
8
- import { AsyncQueue, RequestInstance } from '../hooks';
9
+ import { RequestInstance } from '../hooks';
9
10
  export * from './fieldItem';
10
11
  export declare type FormCommonState = '0' | '1';
11
12
  export interface FieldVisitorContext {