cnhis-design-vue 3.1.55-beta.0 → 3.1.55-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 (106) hide show
  1. package/es/components/audio-sdk/index.d.ts +2 -0
  2. package/es/components/audio-sdk/index.js +1 -0
  3. package/es/components/{chat-sdk/src/chatSDK.d.ts → audio-sdk/src/audioSDK.d.ts} +8 -4
  4. package/es/components/audio-sdk/src/audioSDK.js +1 -0
  5. package/es/components/{chat-sdk → audio-sdk}/src/components/recordingDialog.vue.d.ts +1 -0
  6. package/es/components/audio-sdk/src/components/recordingDialog.vue2.js +1 -0
  7. package/es/components/audio-sdk/style/index.css +1 -0
  8. package/es/components/base-search/src/index.vue2.js +1 -1
  9. package/es/components/{multi-chat → biunique-chat}/index.d.ts +2 -2
  10. package/es/components/biunique-chat/index.js +1 -0
  11. package/es/components/biunique-chat/src/BiuniqueChat.vue.js +1 -0
  12. package/es/components/biunique-chat/src/BiuniqueChat.vue2.js +1 -0
  13. package/es/components/body-select/src/hooks/renderCanvas.js +1 -1
  14. package/es/components/button-print/src/ButtonPrint.vue2.js +1 -1
  15. package/es/components/callback/src/components/render/popupMaps.d.ts +13 -0
  16. package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogram.js +1 -1
  17. package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogramChart.js +1 -1
  18. package/es/components/form-config/index.d.ts +33 -0
  19. package/es/components/form-config/src/FormConfig.vue.d.ts +33 -0
  20. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +13 -0
  21. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +16 -0
  22. package/es/components/form-render/index.d.ts +13 -0
  23. package/es/components/form-render/index.js +1 -1
  24. package/es/components/form-render/src/FormRender.vue.d.ts +13 -0
  25. package/es/components/form-render/src/FormRender.vue2.js +1 -1
  26. package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +13 -0
  27. package/es/components/form-render/src/components/renderer/complex.js +1 -1
  28. package/es/components/form-render/src/components/renderer/date.js +1 -1
  29. package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue.d.ts +1 -1
  30. package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue2.js +1 -1
  31. package/es/components/form-render/src/components/renderer/lineBar/index.d.ts +1 -1
  32. package/es/components/form-render/src/components/renderer/remoteSearch.js +1 -1
  33. package/es/components/form-render/src/components/renderer/searchCascade.js +1 -1
  34. package/es/components/form-render/src/components/renderer/select.js +1 -1
  35. package/es/components/form-render/src/components/renderer/switch.js +1 -1
  36. package/es/components/form-render/src/components/renderer/textarea.js +1 -1
  37. package/es/components/form-render/src/constants/index.d.ts +0 -1
  38. package/es/components/form-render/src/constants/index.js +1 -1
  39. package/es/components/form-render/src/hooks/useAnchor.js +1 -1
  40. package/es/components/form-render/src/hooks/useBusinessBinding.js +1 -1
  41. package/es/components/form-render/src/hooks/useFormEvent.js +1 -1
  42. package/es/components/form-render/src/hooks/useFormItemDeps.d.ts +3 -3
  43. package/es/components/form-render/src/hooks/useFormItemDeps.js +1 -1
  44. package/es/components/form-render/src/hooks/useFormRenderOptions.d.ts +13 -8
  45. package/es/components/form-render/src/hooks/useFormRenderOptions.js +1 -1
  46. package/es/components/form-render/src/hooks/useFormValidator.js +1 -1
  47. package/es/components/form-render/src/hooks/usePresetScope.js +1 -1
  48. package/es/components/form-render/src/types/fieldItem.d.ts +1 -0
  49. package/es/components/form-render/src/utils/index.d.ts +3 -16
  50. package/es/components/form-render/src/utils/index.js +1 -1
  51. package/es/components/iho-table/src/plugins/colorAndIconPlugin.d.ts +1 -0
  52. package/es/components/iho-table/src/plugins/colorAndIconPlugin.js +1 -0
  53. package/es/components/iho-table/src/plugins/index.js +1 -1
  54. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/index.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/separateRendererPlugin/index.js +1 -1
  57. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/defaultRendererPlugin.js +1 -1
  58. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/htmlRendererPlugin.js +1 -1
  59. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/labelRendererPlugin.js +1 -1
  60. package/es/components/iho-table/src/types/index.d.ts +2 -0
  61. package/es/components/iho-table/src/utils/index.d.ts +1 -1
  62. package/es/components/iho-table/src/utils/index.js +1 -1
  63. package/es/components/iho-table/style/index.css +1 -1
  64. package/es/components/index.css +1 -1
  65. package/es/components/index.d.ts +3 -3
  66. package/es/components/index.js +1 -1
  67. package/es/components/info-header/index.d.ts +26 -0
  68. package/es/components/info-header/src/InfoHeader.vue.d.ts +26 -0
  69. package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +13 -0
  70. package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +13 -0
  71. package/es/components/shortcut-setter/index.d.ts +14 -0
  72. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +14 -0
  73. package/es/shared/package.json.js +1 -1
  74. package/es/shared/utils/business.d.ts +1 -0
  75. package/es/shared/utils/business.js +1 -1
  76. package/es/shared/utils/index.js +1 -1
  77. package/package.json +2 -2
  78. package/es/components/chat-sdk/index.d.ts +0 -2
  79. package/es/components/chat-sdk/index.js +0 -1
  80. package/es/components/chat-sdk/src/chatSDK.js +0 -1
  81. package/es/components/chat-sdk/src/components/recordingDialog.vue2.js +0 -1
  82. package/es/components/chat-sdk/style/index.css +0 -1
  83. package/es/components/multi-chat/index.js +0 -1
  84. package/es/components/multi-chat/src/MultiChat.vue.js +0 -1
  85. package/es/components/multi-chat/src/MultiChat.vue2.js +0 -1
  86. /package/es/components/{chat-sdk → audio-sdk}/src/components/recordingDialog.vue.js +0 -0
  87. /package/es/components/{chat-sdk → audio-sdk}/src/utils/recordingDialog.d.ts +0 -0
  88. /package/es/components/{chat-sdk → audio-sdk}/src/utils/recordingDialog.js +0 -0
  89. /package/es/components/{multi-chat/src/MultiChat.vue.d.ts → biunique-chat/src/BiuniqueChat.vue.d.ts} +0 -0
  90. /package/es/components/{multi-chat → biunique-chat}/src/api/index.d.ts +0 -0
  91. /package/es/components/{multi-chat → biunique-chat}/src/api/index.js +0 -0
  92. /package/es/components/{multi-chat → biunique-chat}/src/components/ChatFooter.vue.d.ts +0 -0
  93. /package/es/components/{multi-chat → biunique-chat}/src/components/ChatFooter.vue.js +0 -0
  94. /package/es/components/{multi-chat → biunique-chat}/src/components/ChatFooter.vue2.js +0 -0
  95. /package/es/components/{multi-chat → biunique-chat}/src/components/ChatHeader.vue.d.ts +0 -0
  96. /package/es/components/{multi-chat → biunique-chat}/src/components/ChatHeader.vue.js +0 -0
  97. /package/es/components/{multi-chat → biunique-chat}/src/components/ChatHeader.vue2.js +0 -0
  98. /package/es/components/{multi-chat → biunique-chat}/src/components/ChatMain.vue.d.ts +0 -0
  99. /package/es/components/{multi-chat → biunique-chat}/src/components/ChatMain.vue.js +0 -0
  100. /package/es/components/{multi-chat → biunique-chat}/src/components/ChatMain.vue2.js +0 -0
  101. /package/es/components/{multi-chat → biunique-chat}/src/components/SiderList.vue.d.ts +0 -0
  102. /package/es/components/{multi-chat → biunique-chat}/src/components/SiderList.vue.js +0 -0
  103. /package/es/components/{multi-chat → biunique-chat}/src/components/SiderList.vue2.js +0 -0
  104. /package/es/components/{multi-chat → biunique-chat}/src/utils/chatSock.d.ts +0 -0
  105. /package/es/components/{multi-chat → biunique-chat}/src/utils/chatSock.js +0 -0
  106. /package/es/components/{multi-chat → biunique-chat}/style/index.css +0 -0
@@ -309,6 +309,7 @@ declare const _default: import("vue").DefineComponent<{
309
309
  nameKey?: string | undefined;
310
310
  valueKey?: string | undefined;
311
311
  showKey?: string | undefined;
312
+ searchKey?: string[] | undefined;
312
313
  params?: import("../../../../../es/shared/types").AnyObject | undefined;
313
314
  dependKey?: string | Record<string, string> | (string | {
314
315
  paramName: string;
@@ -2068,6 +2069,7 @@ declare const _default: import("vue").DefineComponent<{
2068
2069
  nameKey?: string | undefined;
2069
2070
  valueKey?: string | undefined;
2070
2071
  showKey?: string | undefined;
2072
+ searchKey?: string[] | undefined;
2071
2073
  params?: import("../../../../../es/shared/types").AnyObject | undefined;
2072
2074
  dependKey?: string | Record<string, string> | (string | {
2073
2075
  paramName: string;
@@ -3800,6 +3802,7 @@ declare const _default: import("vue").DefineComponent<{
3800
3802
  nameKey?: string | undefined;
3801
3803
  valueKey?: string | undefined;
3802
3804
  showKey?: string | undefined;
3805
+ searchKey?: string[] | undefined;
3803
3806
  params?: import("../../../../../es/shared/types").AnyObject | undefined;
3804
3807
  dependKey?: string | Record<string, string> | (string | {
3805
3808
  paramName: string;
@@ -5578,6 +5581,10 @@ declare const _default: import("vue").DefineComponent<{
5578
5581
  dateOperationalForm: {
5579
5582
  type: PropType<import("../../../../../es/shared/types").LowCodeTypes.dateOperationalConfig[]>;
5580
5583
  };
5584
+ operationalFormInit: {
5585
+ type: BooleanConstructor;
5586
+ default: boolean;
5587
+ };
5581
5588
  linebarAutoHidden: {
5582
5589
  type: BooleanConstructor;
5583
5590
  };
@@ -5730,6 +5737,10 @@ declare const _default: import("vue").DefineComponent<{
5730
5737
  dateOperationalForm: {
5731
5738
  type: PropType<import("../../../../../es/shared/types").LowCodeTypes.dateOperationalConfig[]>;
5732
5739
  };
5740
+ operationalFormInit: {
5741
+ type: BooleanConstructor;
5742
+ default: boolean;
5743
+ };
5733
5744
  linebarAutoHidden: {
5734
5745
  type: BooleanConstructor;
5735
5746
  };
@@ -6332,6 +6343,10 @@ declare const _default: import("vue").DefineComponent<{
6332
6343
  dateOperationalForm: {
6333
6344
  type: PropType<import("../../../../../es/shared/types").LowCodeTypes.dateOperationalConfig[]>;
6334
6345
  };
6346
+ operationalFormInit: {
6347
+ type: BooleanConstructor;
6348
+ default: boolean;
6349
+ };
6335
6350
  linebarAutoHidden: {
6336
6351
  type: BooleanConstructor;
6337
6352
  };
@@ -6367,6 +6382,7 @@ declare const _default: import("vue").DefineComponent<{
6367
6382
  bordered: string | boolean;
6368
6383
  uniqueCacheData: boolean;
6369
6384
  outBordered: boolean;
6385
+ operationalFormInit: boolean;
6370
6386
  }>;
6371
6387
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>>;
6372
6388
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
@@ -143,6 +143,10 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{}, {
143
143
  dateOperationalForm: {
144
144
  type: import("vue").PropType<import("../../../es/shared/types").LowCodeTypes.dateOperationalConfig[]>;
145
145
  };
146
+ operationalFormInit: {
147
+ type: BooleanConstructor;
148
+ default: boolean;
149
+ };
146
150
  linebarAutoHidden: {
147
151
  type: BooleanConstructor;
148
152
  };
@@ -295,6 +299,10 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{}, {
295
299
  dateOperationalForm: {
296
300
  type: import("vue").PropType<import("../../../es/shared/types").LowCodeTypes.dateOperationalConfig[]>;
297
301
  };
302
+ operationalFormInit: {
303
+ type: BooleanConstructor;
304
+ default: boolean;
305
+ };
298
306
  linebarAutoHidden: {
299
307
  type: BooleanConstructor;
300
308
  };
@@ -897,6 +905,10 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{}, {
897
905
  dateOperationalForm: {
898
906
  type: import("vue").PropType<import("../../../es/shared/types").LowCodeTypes.dateOperationalConfig[]>;
899
907
  };
908
+ operationalFormInit: {
909
+ type: BooleanConstructor;
910
+ default: boolean;
911
+ };
900
912
  linebarAutoHidden: {
901
913
  type: BooleanConstructor;
902
914
  };
@@ -932,6 +944,7 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{}, {
932
944
  bordered: string | boolean;
933
945
  uniqueCacheData: boolean;
934
946
  outBordered: boolean;
947
+ operationalFormInit: boolean;
935
948
  }>;
936
949
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>>;
937
950
  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{useAutoHidden}from"./src/hooks/useAutoHidden.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{combineExtendKey,createInputSlot,createSlot,createUrlConfigParams,formRenderLog,injectOrProvide,isNestedFieldType,isNestedType,mergeDeepProperties,parseNumberFromMaybeString,renderDescOption,splitExtendKey,validateMessageParser}from"./src/utils/index.js";export{businessDateParser,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,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{useAutoHidden}from"./src/hooks/useAutoHidden.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{combineExtendKey,createInputSlot,createSlot,formRenderLog,getAbsoluteKey,injectOrProvide,isNestedFieldType,isNestedType,mergeDeepProperties,parseNumberFromMaybeString,renderDescOption,splitExtendKey,validateMessageParser}from"./src/utils/index.js";export{businessDateParser,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,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};
@@ -138,6 +138,10 @@ declare const _default: import("vue").DefineComponent<{
138
138
  dateOperationalForm: {
139
139
  type: PropType<LowCodeTypes.dateOperationalConfig[]>;
140
140
  };
141
+ operationalFormInit: {
142
+ type: BooleanConstructor;
143
+ default: boolean;
144
+ };
141
145
  linebarAutoHidden: {
142
146
  type: BooleanConstructor;
143
147
  };
@@ -290,6 +294,10 @@ declare const _default: import("vue").DefineComponent<{
290
294
  dateOperationalForm: {
291
295
  type: PropType<LowCodeTypes.dateOperationalConfig[]>;
292
296
  };
297
+ operationalFormInit: {
298
+ type: BooleanConstructor;
299
+ default: boolean;
300
+ };
293
301
  linebarAutoHidden: {
294
302
  type: BooleanConstructor;
295
303
  };
@@ -892,6 +900,10 @@ declare const _default: import("vue").DefineComponent<{
892
900
  dateOperationalForm: {
893
901
  type: PropType<LowCodeTypes.dateOperationalConfig[]>;
894
902
  };
903
+ operationalFormInit: {
904
+ type: BooleanConstructor;
905
+ default: boolean;
906
+ };
895
907
  linebarAutoHidden: {
896
908
  type: BooleanConstructor;
897
909
  };
@@ -927,5 +939,6 @@ declare const _default: import("vue").DefineComponent<{
927
939
  bordered: string | boolean;
928
940
  uniqueCacheData: boolean;
929
941
  outBordered: boolean;
942
+ operationalFormInit: boolean;
930
943
  }>;
931
944
  export default _default;
@@ -1 +1 @@
1
- import{defineComponent as e,ref as o,computed as t,provide as r,onMounted as s,onUnmounted as a,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 j,withKeys as b,toDisplayString as k,renderSlot as v}from"vue";import{useTheme as F}from"../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import{isNumber as C,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 H,NTabs as A,NTabPane as x,NConfigProvider as O}from"naive-ui";import{useVersion as B}from"../../../shared/hooks/useVersion.js";import{createForm as L,onFormMount as R,onFieldValueChange as w,onFieldMount as V,onFieldUnmount as _,onFieldReact as I}from"@formily/core";import{Path as D}from"@formily/path";import{FormProvider as N,FormConsumer as q}from"@formily/vue";import{InjectionFormLifeCycleCaller as W,InjectionFormGraph as T}from"./constants/index.js";import"../index.js";import{createObjSchema as U}from"./utils/schema.js";import{useAnchor as E}from"./hooks/useAnchor.js";import{useAutoHidden as G}from"./hooks/useAutoHidden.js";import{useComplexOptionsSpan as K}from"./hooks/useComplexOptions.js";import{useFieldListAdaptor as M}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 P}from"./hooks/useFieldVisitor.js";import{useFormContext as J}from"./hooks/useFormContext.js";import{useFormDomEvent as $,useFormExposeEvent as z}from"./hooks/useFormEvent.js";import{useFormGraph as Q}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";const se={key:0,style:{height:"54px"}},ae={style:{"white-space":"pre"}};var ie=e({__name:"FormRender",props:{fieldList:{type:Array},initialData:{type:Object,default:()=>({})},fieldVisitor:{type:Object},column:{type:Number,default:24},maxHeight:{type:[Number,String],default:""},anchor:{type:Boolean,default:!1},parallelism:{type:Number,default:3},businessFormatter:{type:Function},schema:{type:Object},components:{type:Object,default:()=>({})},scope:{type:Object,default:()=>({})},annotation:{type:Object},consumer:{type:Boolean,default:!1},uuid:{type:String},lifeCycle:{type:Object},requestInstance:{type:Object},enterToNextWidget:{type:[Boolean,Function],default:!0},lowCodeReactions:{type:Array},operationalForm:{type:Array},dateOperationalForm:{type:Object},linebarAutoHidden:{type:Boolean},bordered:{type:[Boolean,String],default:!0},outBordered:{type:Boolean,default:!1},uniqueCacheData:{type:Boolean,default:!1},forceClearable:Boolean},emits:["formChange","annotationChange","scroll"],setup(e,{expose:ie,emit:le}){const ne=e,me=F(),{nuiThemeOverrides:pe}=oe();Y();const de=o(),ue=t((()=>C(ne.maxHeight)?ne.maxHeight+"px":ne.maxHeight)),{SchemaField:ce,businessCollector:fe,formItemDepsCollector:he,changeContextCollector:ye,formUUID:ge}=J(ne,le),{anchorBarRef:je,currentAnchor:be,updateAnchorList:ke,anchorIdList:ve,onScroll:Fe}=E(ne,le,de,he),{callLifeCycle:Ce}=X(ne);r(W,Ce),Ce("onSetup");const{trigger:Se}=G(),{observeFormGraph:He,setGraph:Ae,removeGraph:xe}=Q();r(T,He);const{lowCodeEventTrigger:Oe}=Z(),Be=L({initialValues:ne.initialData,effects(e){const o={};R((()=>{Object.assign(o,S(e.values))})),w("*",(t=>{const r=D.getIn(o,t.path);D.setIn(o,t.path,t.value);const s=t.props.name.toString();fe.trigger(e,s),he.trigger(s),le("formChange",{fieldInstance:t,fieldKey:s,oldValue:r,fieldName:t.title,value:t.value,context:ye.getContext(s,t.value)}),Oe(t),Le(s),we.trigger(s),Ve.trigger(s,t.value)})),V("*",Ae),_("*",xe),ne.linebarAutoHidden&&(I("*",Se),R((e=>e.query("*").forEach(Se)))),ne.anchor&&I("*",ke)}}),{lowCodeReactionsHandler:Le,triggerAllReactionsHandler:Re}=ee(t((()=>ne.lowCodeReactions)),Be),we=te(ne,Be),Ve=re().create(Be,ye);s(Re),s(we.triggerAll);const{schemaAdaptor:_e}=M(fe,ne.lifeCycle);let Ie=ne.fieldList||[];const De=t((()=>ne.schema?ne.schema:ne.fieldList?(Ie=P().traverse(S(ne.fieldList),ne.fieldVisitor),U(_e(Ie,ne))):U({}))),{onKeydown:Ne}=$({formModel:Be,formRenderRef:de,props:ne}),{clearSpan:qe}=K();a((()=>qe(ge)));const We=z({formModel:Be,formRenderRef:de,formItemDepsCollector:he,businessCollector:fe,wordbookSettingHandler:Ve,operationalFormHandler:we,getFieldList:()=>Ie,formUUID:ge});return ie({formModel:Be,validate:(e="*",o={})=>We.validate(e,o),getFormValues:(e=!0)=>We.getFormValues(e),setFormValues:async(e,o={},t=!1,r=!0)=>We.setFormValues(e,o,t,r),setFieldState(e,o){We.setFieldState(e,o)},resetFields(e="*"){We.resetFields(e)},queryWidget:async e=>We.queryWidget(e),getFieldList:()=>Ie,async reload(){console.error("reload function is abstract,it should be overwrite!")}}),(o,t)=>(i(),l(n(H),m({class:["form-render",{"form-render--out-border":e.outBordered}],"require-mark-placement":"left",style:n(me)},n(B)()),{default:p((()=>[e.anchor?(i(),d("section",se,[u(n(A),{value:n(be),"onUpdate:value":t[0]||(t[0]=e=>c(be)?be.value=e:null),type:"line",ref_key:"anchorBarRef",ref:je},{default:p((()=>[(i(!0),d(f,null,h(n(ve),(e=>(i(),l(n(x),{name:e.name,tab:e.title,key:e.name},null,8,["name","tab"])))),128))])),_:1},8,["value"])])):y("v-if",!0),u(n(O),{"theme-overrides":n(pe)},{default:p((()=>[g("section",{class:"form-render__wrapper",style:j({"--column":e.column,"--form-height":n(ue)}),ref_key:"formRenderRef",ref:de,onScroll:t[1]||(t[1]=(...e)=>n(Fe)&&n(Fe)(...e)),onKeydownCapture:t[2]||(t[2]=b(((...e)=>n(Ne)&&n(Ne)(...e)),["enter"]))},[u(n(N),{form:n(Be)},{default:p((()=>[u(n(ce),{schema:n(De)},null,8,["schema"]),e.consumer?(i(),l(n(q),{key:0},{default:p((({form:e})=>[g("div",ae,k(JSON.stringify(e.values,null,2)),1)])),_:1})):y("v-if",!0),v(o.$slots,"default")])),_:3},8,["form"])],36)])),_:3},8,["theme-overrides"])])),_:3},16,["class","style"]))}});export{ie as default};
1
+ import{defineComponent as e,ref as o,computed as t,provide as r,onMounted as s,onUnmounted as a,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 j,withKeys as b,toDisplayString as k,renderSlot as v}from"vue";import{useTheme as F}from"../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import{isNumber as C,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 H,NTabs as A,NTabPane as x,NConfigProvider as B}from"naive-ui";import{useVersion as O}from"../../../shared/hooks/useVersion.js";import{createForm as L,onFormMount as R,onFieldValueChange as w,onFieldMount as I,onFieldUnmount as V,onFieldReact as _}from"@formily/core";import{Path as D}from"@formily/path";import{FormProvider as N,FormConsumer as q}from"@formily/vue";import{InjectionFormLifeCycleCaller as W,InjectionFormGraph as T}from"./constants/index.js";import{createObjSchema as U}from"./utils/schema.js";import{useAnchor as E}from"./hooks/useAnchor.js";import{useAutoHidden as G}from"./hooks/useAutoHidden.js";import"../index.js";import{useComplexOptionsSpan as K}from"./hooks/useComplexOptions.js";import{useFieldListAdaptor as M}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 P}from"./hooks/useFieldVisitor.js";import{useFormContext as J}from"./hooks/useFormContext.js";import{useFormDomEvent as $,useFormExposeEvent as z}from"./hooks/useFormEvent.js";import{useFormGraph as Q}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";const se={key:0,style:{height:"54px"}},ae={style:{"white-space":"pre"}};var ie=e({__name:"FormRender",props:{fieldList:{type:Array},initialData:{type:Object,default:()=>({})},fieldVisitor:{type:Object},column:{type:Number,default:24},maxHeight:{type:[Number,String],default:""},anchor:{type:Boolean,default:!1},parallelism:{type:Number,default:3},businessFormatter:{type:Function},schema:{type:Object},components:{type:Object,default:()=>({})},scope:{type:Object,default:()=>({})},annotation:{type:Object},consumer:{type:Boolean,default:!1},uuid:{type:String},lifeCycle:{type:Object},requestInstance:{type:Object},enterToNextWidget:{type:[Boolean,Function],default:!0},lowCodeReactions:{type:Array},operationalForm:{type:Array},dateOperationalForm:{type:Object},operationalFormInit:{type:Boolean,default:!0},linebarAutoHidden:{type:Boolean},bordered:{type:[Boolean,String],default:!0},outBordered:{type:Boolean,default:!1},uniqueCacheData:{type:Boolean,default:!1},forceClearable:Boolean},emits:["formChange","annotationChange","scroll"],setup(e,{expose:ie,emit:le}){const ne=e,me=F(),{nuiThemeOverrides:pe}=oe();Y();const de=o(),ue=t((()=>C(ne.maxHeight)?ne.maxHeight+"px":ne.maxHeight)),{SchemaField:ce,businessCollector:fe,formItemDepsCollector:he,changeContextCollector:ye,formUUID:ge}=J(ne,le),{anchorBarRef:je,currentAnchor:be,updateAnchorList:ke,anchorIdList:ve,onScroll:Fe}=E(ne,le,de,he),{callLifeCycle:Ce}=X(ne);r(W,Ce),Ce("onSetup");const{trigger:Se}=G(),{observeFormGraph:He,setGraph:Ae,removeGraph:xe}=Q();r(T,He);const{lowCodeEventTrigger:Be}=Z(),Oe=L({initialValues:ne.initialData,effects(e){const o={};R((()=>{Object.assign(o,S(e.values))})),w("*",(t=>{const r=D.getIn(o,t.path);D.setIn(o,t.path,t.value);const s=t.props.name.toString();fe.trigger(e,s),he.trigger(t.path),le("formChange",{fieldInstance:t,fieldKey:s,oldValue:r,fieldName:t.title,value:t.value,context:ye.getContext(s,t.value)}),Be(t),Le(s),we.trigger(s),Ie.trigger(s,t.value)})),I("*",Ae),V("*",xe),ne.linebarAutoHidden&&(_("*",Se),R((e=>e.query("*").forEach(Se)))),ne.anchor&&_("*",ke)}}),{lowCodeReactionsHandler:Le,triggerAllReactionsHandler:Re}=ee(t((()=>ne.lowCodeReactions)),Oe),we=te(ne,Oe),Ie=re().create(Oe,ye);s(Re),s((()=>ne.operationalFormInit&&we.triggerAll()));const{schemaAdaptor:Ve}=M(fe,ne.lifeCycle);let _e=ne.fieldList||[];const De=t((()=>ne.schema?ne.schema:ne.fieldList?(_e=P().traverse(S(ne.fieldList),ne.fieldVisitor),U(Ve(_e,ne))):U({}))),{onKeydown:Ne}=$({formModel:Oe,formRenderRef:de,props:ne}),{clearSpan:qe}=K();a((()=>qe(ge)));const We=z({formModel:Oe,formRenderRef:de,formItemDepsCollector:he,businessCollector:fe,wordbookSettingHandler:Ie,operationalFormHandler:we,getFieldList:()=>_e,formUUID:ge});return ie({formModel:Oe,validate:(e="*",o={})=>We.validate(e,o),getFormValues:(e=!0)=>We.getFormValues(e),setFormValues:async(e,o={},t=!1,r=!0)=>We.setFormValues(e,o,t,r),setFieldState(e,o){We.setFieldState(e,o)},resetFields(e="*"){We.resetFields(e)},queryWidget:async e=>We.queryWidget(e),getFieldList:()=>_e,async reload(){console.error("reload function is abstract,it should be overwrite!")}}),(o,t)=>(i(),l(n(H),m({class:["form-render",{"form-render--out-border":e.outBordered}],"require-mark-placement":"left",style:n(me)},n(O)()),{default:p((()=>[e.anchor?(i(),d("section",se,[u(n(A),{value:n(be),"onUpdate:value":t[0]||(t[0]=e=>c(be)?be.value=e:null),type:"line",ref_key:"anchorBarRef",ref:je},{default:p((()=>[(i(!0),d(f,null,h(n(ve),(e=>(i(),l(n(x),{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(pe)},{default:p((()=>[g("section",{class:"form-render__wrapper",style:j({"--column":e.column,"--form-height":n(ue)}),ref_key:"formRenderRef",ref:de,onScroll:t[1]||(t[1]=(...e)=>n(Fe)&&n(Fe)(...e)),onKeydownCapture:t[2]||(t[2]=b(((...e)=>n(Ne)&&n(Ne)(...e)),["enter"]))},[u(n(N),{form:n(Oe)},{default:p((()=>[u(n(ce),{schema:n(De)},null,8,["schema"]),e.consumer?(i(),l(n(q),{key:0},{default:p((({form:e})=>[g("div",ae,k(JSON.stringify(e.values,null,2)),1)])),_:1})):y("v-if",!0),v(o.$slots,"default")])),_:3},8,["form"])],36)])),_:3},8,["theme-overrides"])])),_:3},16,["class","style"]))}});export{ie as default};
@@ -141,6 +141,10 @@ declare const _default: import("vue").DefineComponent<{}, {
141
141
  dateOperationalForm: {
142
142
  type: import("vue").PropType<import("../../../../es/shared/types").LowCodeTypes.dateOperationalConfig[]>;
143
143
  };
144
+ operationalFormInit: {
145
+ type: BooleanConstructor;
146
+ default: boolean;
147
+ };
144
148
  linebarAutoHidden: {
145
149
  type: BooleanConstructor;
146
150
  };
@@ -293,6 +297,10 @@ declare const _default: import("vue").DefineComponent<{}, {
293
297
  dateOperationalForm: {
294
298
  type: import("vue").PropType<import("../../../../es/shared/types").LowCodeTypes.dateOperationalConfig[]>;
295
299
  };
300
+ operationalFormInit: {
301
+ type: BooleanConstructor;
302
+ default: boolean;
303
+ };
296
304
  linebarAutoHidden: {
297
305
  type: BooleanConstructor;
298
306
  };
@@ -895,6 +903,10 @@ declare const _default: import("vue").DefineComponent<{}, {
895
903
  dateOperationalForm: {
896
904
  type: import("vue").PropType<import("../../../../es/shared/types").LowCodeTypes.dateOperationalConfig[]>;
897
905
  };
906
+ operationalFormInit: {
907
+ type: BooleanConstructor;
908
+ default: boolean;
909
+ };
898
910
  linebarAutoHidden: {
899
911
  type: BooleanConstructor;
900
912
  };
@@ -930,6 +942,7 @@ declare const _default: import("vue").DefineComponent<{}, {
930
942
  bordered: string | boolean;
931
943
  uniqueCacheData: boolean;
932
944
  outBordered: boolean;
945
+ operationalFormInit: boolean;
933
946
  }>;
934
947
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
935
948
  export default _default;
@@ -1 +1 @@
1
- import{defineComponent as e,createVNode as r}from"vue";import{connect as t,mapProps as o}from"@formily/vue";import"../../../../../shared/utils/index.js";import"@formily/core";import"@formily/path";import"@vicons/ionicons5";import"@vue/shared";import"@vueuse/core";import"lodash-es";import"naive-ui";import"../../../index.js";import"date-fns";import{assignUpdateValue as i}from"../../utils/schema.js";const p=t(e({props:{onChange:{},span:{type:Number,default:6},display:{type:String,default:"grid"},wrapperStyle:{type:Object,default:()=>({})}},setup:(e,{slots:t})=>()=>r("section",{class:"form-render__complex"},[r("section",{class:`form-render__complexContent--${e.display}`,style:e.wrapperStyle},[t.default&&t.default()])])}),o(i));export{p as COMPLEX};
1
+ import{defineComponent as e,createVNode as r}from"vue";import{connect as t,mapProps as o}from"@formily/vue";import"../../../../../shared/utils/index.js";import"@formily/core";import"@formily/path";import"@vicons/ionicons5";import"@vue/shared";import"@vueuse/core";import"lodash-es";import"naive-ui";import"date-fns";import{assignUpdateValue as i}from"../../utils/schema.js";const p=t(e({props:{onChange:{},span:{type:Number,default:6},display:{type:String,default:"grid"},wrapperStyle:{type:Object,default:()=>({})}},setup:(e,{slots:t})=>()=>r("section",{class:"form-render__complex"},[r("section",{class:`form-render__complexContent--${e.display}`,style:e.wrapperStyle},[t.default&&t.default()])])}),o(i));export{p as COMPLEX};
@@ -1 +1 @@
1
- import{defineComponent as e,computed as t,watch as a,ref as o,onMounted as n,createVNode as i,mergeProps as r}from"vue";import{generateTimeFormat as u}from"../../../../../shared/utils/index.js";import{connect as l,mapProps as s}from"@formily/vue";import{isObject as d,useEventListener as m}from"@vueuse/core";import{format as v}from"date-fns";import c from"../../../../date-picker/index.js";import{useCommonInjection as p}from"../../hooks/useCommonInjection.js";import"@formily/core";import"@formily/path";import"@vicons/ionicons5";import"@vue/shared";import"lodash-es";import"naive-ui";import"../../../index.js";import{assignUpdateValue as f,assignClearBindVisited as y}from"../../utils/schema.js";const w=l(e({props:{onChange:{},disabled:{type:Boolean},value:{type:String},validate:{type:Object},valueFormat:{type:String,default:"yyyy-MM-dd"},allowedInvalidValue:{type:String,default:"-"},dbclickToCurrent:{type:Boolean,default:!0}},emits:["update:value"],setup(e,{emit:l}){const{injectValueValidate:s,injectValueBindKey:f}=p();function y(){var t;return"currTime"===(null==(t=e.validate)?void 0:t.min_date)}function w(){var t;return"currTime"===(null==(t=e.validate)?void 0:t.max_date)}function D(e){return y()&&e<Date.now()-864e5||w()&&e>Date.now()}function b(e){const t=new Date(e),a=new Date,o=new Date(t);o.setHours(0),o.setMinutes(0),o.setSeconds(0);const n=new Date(t);n.setHours(23),n.setMinutes(59),n.setSeconds(59);const i=o>a,r=n<a,u=t.getHours(),l=a.getHours(),s=a.getMinutes();return{isHourDisabled:function(e){return y()&&!i&&e<l||w()&&!r&&e>l},isMinuteDisabled:function(e){if(u===l)return y()&&!i&&e<s||w()&&!r&&e>s;return y()&&!i&&u<l||w()&&!r&&u>l}}}s((()=>e.value));const j=t((()=>{const t={};if(d(e.validate)){const{min_date:a,max_date:o}=e.validate;(a||o)&&(t.isDateDisabled=D,t.isTimeDisabled=b)}return t})),g=t((()=>({valueFormat:e.valueFormat,format:e.valueFormat,timePickerProps:{format:u(e.valueFormat)}})));function h(t){return t?t===e.allowedInvalidValue?t:v(new Date(t),e.valueFormat):null}a((()=>e.value),(e=>{e&&h(e)!==e&&l("update:value",h(e))}));const k=t({get:()=>h(e.value),set:e=>{l("update:value",e)}}),F=f(k),V=o();return n((()=>{var t;if(!e.dbclickToCurrent)return;const a=null==(t=V.value)?void 0:t.$el;if(!a)return;const o=a.querySelector("input");o&&m(a,"dblclick",(()=>function(t){e.disabled||(t.value=v(Date.now(),e.valueFormat),t.dispatchEvent(new Event("input")))}(o)))})),()=>i(c,r({ref:V,key:F.value,disabled:e.disabled,allowedInvalidValue:e.allowedInvalidValue},j.value,g.value,{"formatted-value":k.value,"onUpdate:formatted-value":e=>k.value=e}),null)}}),s(f,y));export{w as DATE};
1
+ import{defineComponent as e,computed as t,watch as a,ref as o,onMounted as n,createVNode as r,mergeProps as i}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{assignUpdateValue as f,assignClearBindVisited as y}from"../../utils/schema.js";const w=l(e({props:{onChange:{},disabled:{type:Boolean},value:{type:String},validate:{type:Object},valueFormat:{type:String,default:"yyyy-MM-dd"},allowedInvalidValue:{type:String,default:"-"},dbclickToCurrent:{type:Boolean,default:!0}},emits:["update:value"],setup(e,{emit:l}){const{injectValueValidate:s,injectValueBindKey:f}=p();function y(){var t;return"currTime"===(null==(t=e.validate)?void 0:t.min_date)}function w(){var t;return"currTime"===(null==(t=e.validate)?void 0:t.max_date)}function D(e){return y()&&e<Date.now()-864e5||w()&&e>Date.now()}function b(e){const t=new Date(e),a=new Date,o=new Date(t);o.setHours(0),o.setMinutes(0),o.setSeconds(0);const n=new Date(t);n.setHours(23),n.setMinutes(59),n.setSeconds(59);const r=o>a,i=n<a,u=t.getHours(),l=a.getHours(),s=a.getMinutes();return{isHourDisabled:function(e){return y()&&!r&&e<l||w()&&!i&&e>l},isMinuteDisabled:function(e){if(u===l)return y()&&!r&&e<s||w()&&!i&&e>s;return y()&&!r&&u<l||w()&&!i&&u>l}}}s((()=>e.value));const g=t((()=>{const t={};if(d(e.validate)){const{min_date:a,max_date:o}=e.validate;(a||o)&&(t.isDateDisabled=D,t.isTimeDisabled=b)}return t})),h=t((()=>({valueFormat:e.valueFormat,format:e.valueFormat,timePickerProps:{format:u(e.valueFormat)}})));function j(t){return t?t===e.allowedInvalidValue?t:v(new Date(t),e.valueFormat):null}a((()=>e.value),(e=>{e&&j(e)!==e&&l("update:value",j(e))}));const k=t({get:()=>j(e.value),set:e=>{l("update:value",e)}}),F=f(k),V=o();return n((()=>{var t;if(!e.dbclickToCurrent)return;const a=null==(t=V.value)?void 0:t.$el;if(!a)return;const o=a.querySelector("input");o&&m(a,"dblclick",(()=>function(t){e.disabled||(t.value=v(Date.now(),e.valueFormat),t.dispatchEvent(new Event("input")))}(o)))})),()=>r(c,i({ref:V,key:F.value,disabled:e.disabled,allowedInvalidValue:e.allowedInvalidValue},g.value,h.value,{"formatted-value":k.value,"onUpdate:formatted-value":e=>k.value=e}),null)}}),s(f,y));export{w as DATE};
@@ -33,7 +33,7 @@ declare const _default: import("vue").DefineComponent<{
33
33
  headerClass: import("vue").ComputedRef<(string | {
34
34
  'form-render__linebarHeader--disabled': boolean;
35
35
  })[]>;
36
- fieldKey: import("vue").ComputedRef<string>;
36
+ field: import("vue").Ref<import("@formily/core").GeneralField>;
37
37
  formItemDepsCollector: import("../../../../../../../es/components/form-render").FormItemDepsCollector;
38
38
  TooltipMessage: import("vue").DefineComponent<{
39
39
  message: StringConstructor;
@@ -1 +1 @@
1
- import{defineComponent as e,ref as r,computed as a,inject as o,openBlock as s,createElementBlock as l,createElementVNode as t,normalizeClass as i,unref as n,createTextVNode as d,toDisplayString as m,createBlock as f,createCommentVNode as u,Fragment as p,createVNode as v,withCtx as c,renderSlot as _}from"vue";import"../../../../index.js";import b from"../../tooltipMessage.vue.js";import{InjectionFormItemDepsCollector as k,FormItemLineBarDepKeyPrepend as y}from"../../../constants/index.js";import{ChevronDown as h,ChevronUp as g}from"@vicons/ionicons5";import{NCollapseTransition as j}from"naive-ui";import{useFormField as w}from"../../../hooks/useFormField.js";const x={class:"form-render__linebar","anchor-target":""},F={class:"form-render__linebarHeaderTitle"};var H=e({__name:"FormCollapse",props:{show:{type:Boolean,default:!0},title:{type:String,default:""},remark:String,disabled:{type:Boolean,default:!1}},setup(e){const H=e,B=r(H.show);function C(){H.disabled||(B.value=!B.value)}const S=a((()=>["form-render__linebarHeader",{"form-render__linebarHeader--disabled":!!H.disabled}])),{fieldKey:D}=w();return o(k).setDeps(D.value,y+D.value,((e=!0)=>{B.value=e})),(r,a)=>(s(),l("section",x,[t("header",{class:i(n(S)),onClick:C},[t("div",F,[d(m(e.title)+" ",1),e.remark?(s(),f(b,{key:0,message:e.remark},null,8,["message"])):u("v-if",!0)]),e.disabled?u("v-if",!0):(s(),l(p,{key:0},[B.value?(s(),f(n(h),{key:0})):(s(),f(n(g),{key:1}))],64))],2),v(n(j),{class:"form-render__linebarItem",show:B.value},{default:c((()=>[_(r.$slots,"default")])),_:3},8,["show"])]))}});export{H as default};
1
+ import{defineComponent as e,ref as r,computed as a,inject as o,openBlock as s,createElementBlock as t,createElementVNode as l,normalizeClass as i,unref as n,createTextVNode as d,toDisplayString as m,createBlock as f,createCommentVNode as u,Fragment as p,createVNode as v,withCtx as c,renderSlot as _}from"vue";import"../../../../index.js";import b from"../../tooltipMessage.vue.js";import{InjectionFormItemDepsCollector as h}from"../../../constants/index.js";import{ChevronDown as k,ChevronUp as g}from"@vicons/ionicons5";import{NCollapseTransition as y}from"naive-ui";import{useFormField as j}from"../../../hooks/useFormField.js";const w={class:"form-render__linebar","anchor-target":""},x={class:"form-render__linebarHeaderTitle"};var F=e({__name:"FormCollapse",props:{show:{type:Boolean,default:!0},title:{type:String,default:""},remark:String,disabled:{type:Boolean,default:!1}},setup(e){const F=e,H=r(F.show);function S(){F.disabled||(H.value=!H.value)}const B=a((()=>["form-render__linebarHeader",{"form-render__linebarHeader--disabled":!!F.disabled}])),{field:C}=j();return o(h).setDeps(C.value.path,C.value.path.toString(),((e=!0)=>{H.value=e})),(r,a)=>(s(),t("section",w,[l("header",{class:i(n(B)),onClick:S},[l("div",x,[d(m(e.title)+" ",1),e.remark?(s(),f(b,{key:0,message:e.remark},null,8,["message"])):u("v-if",!0)]),e.disabled?u("v-if",!0):(s(),t(p,{key:0},[H.value?(s(),f(n(k),{key:0})):(s(),f(n(g),{key:1}))],64))],2),v(n(y),{class:"form-render__linebarItem",show:H.value},{default:c((()=>[_(r.$slots,"default")])),_:3},8,["show"])]))}});export{F as default};
@@ -33,7 +33,7 @@ export declare const LINEBAR: import("vue").DefineComponent<{
33
33
  headerClass: import("vue").ComputedRef<(string | {
34
34
  'form-render__linebarHeader--disabled': boolean;
35
35
  })[]>;
36
- fieldKey: import("vue").ComputedRef<string>;
36
+ field: import("vue").Ref<import("@formily/core").GeneralField>;
37
37
  formItemDepsCollector: import("../../../hooks").FormItemDepsCollector;
38
38
  TooltipMessage: import("vue").DefineComponent<{
39
39
  message: StringConstructor;
@@ -1 +1 @@
1
- import{defineComponent as e,watch as l,inject as o,computed as a,ref as t,createVNode as n}from"vue";import{connect as u,mapProps as r}from"@formily/vue";import{HelpCircleSharp as i}from"@vicons/ionicons5";import{useVModel as s,useDebounceFn as p}from"@vueuse/core";import{cloneDeep as v,isString as d}from"lodash-es";import{NSelect as m,NSpin as c,NEmpty as f,NTooltip as y,NIcon as g,NTag as h}from"naive-ui";import"../../../index.js";import{InjectionChangeContextCollector as C}from"../../constants/index.js";import{useCommonInjection as b,useSelectOptionProps as j}from"../../hooks/useCommonInjection.js";import{assignUpdateValue as F,assignClearBindVisited as w,createVisitedSetter as x}from"../../utils/schema.js";import{useFormField as B}from"../../hooks/useFormField.js";import{useUrlConfigOptions as K,useAutographOptions as S}from"../../hooks/useFormRenderOptions.js";const k=u(e({name:"FormRemoteSearch",props:{value:{type:String},requestCache:{type:Boolean,default:!0},options:{type:Array,default:()=>[]},allowCreate:Boolean,labelField:{type:String,default:"text"},valueField:{type:String,default:"value"},showField:{type:String},urlConfig:{type:Object},autograph:{type:String},wordbook:{type:Object},onChange:{},useLoading:{type:Boolean,default:!0},lazyRequest:{type:Boolean,default:!0},multiple:Boolean,deletable:Boolean},emits:["update:value"],setup(e,{slots:u,emit:r}){const F=s(e,"value",r),{field:w,fieldKey:k}=B(),{injectValueValidate:O,injectValueBindKey:D}=b();O(F);const R=D(F),q={onRequestConfigChange:({fetchData:e,valueKey:l})=>e(F.value,{[l]:F.value}),onDepsChange:({fetchData:e,valueKey:l})=>e(F.value,{[l]:F.value})},{labelKey:L,valueKey:P,showKey:V,fetchData:I,searchContent:U,fullOptions:z,loading:A}=e.urlConfig?K(e,F,q):S(e,F,q),T=p(((e,l="label")=>I(e,{["value"===l?P.value:"keyword"]:e})),300);l(F,(e=>{if(e&&!z.value.find((l=>l[P.value]===e)))return T(e,"value")}));o(C).setContext(k.value,(e=>{return{currentOption:v((l=e,z.value.find((e=>e[P.value]===l))))};var l}));const{menuProps:$,nodeProps:E}=j(),G=a((()=>z.value.length||!e.allowCreate?z.value:U.value?[{[L.value]:U.value,[P.value]:U.value},...z.value]:z.value));async function H(e){A.value=e,e&&T()}function J(e){const l=e.alias||e[L.value];if(!l||!d(l))return"";const o=l;return e.desc?n("section",{style:{display:"flex",alignItems:"center",gap:"4px"}},[o,e.desc?n(y,null,{trigger:()=>n(g,{component:i},null),default:()=>e.desc}):null]):o}function M({option:l,handleClose:o}){var a;const t=null!=(a=V.value&&l[V.value])?a:l[L.value];if(!e.multiple)return N.value=t,t;return N.value="",e.deletable?n(h,{closable:!0,onClose:function(e){e.stopPropagation(),o()}},{default:()=>t}):`${t};`}const N=t("");return()=>n(m,{title:N.value,remote:!0,filterable:!0,key:R.value,value:F.value,"onUpdate:value":e=>F.value=e,labelField:L.value,valueField:P.value,"menu-props":$,"node-props":E,onSearch:T,"onUpdate:show":H,options:G.value,onFocus:x(w),renderLabel:J,renderTag:M},{empty:()=>e.useLoading&&A.value?n(c,null,null):n(f,{description:"无数据"},null),...u})}}),r(F,w));export{k as REMOTE_SEARCH};
1
+ import{defineComponent as e,watch as l,inject as o,computed as a,ref as t,createVNode as n}from"vue";import{connect as u,mapProps as r}from"@formily/vue";import{HelpCircleSharp as i}from"@vicons/ionicons5";import{useVModel as s,useDebounceFn as v}from"@vueuse/core";import{cloneDeep as p,isString as d}from"lodash-es";import{NSelect as m,NSpin as c,NEmpty as f,NTooltip as y,NIcon as g,NTag as h}from"naive-ui";import"../../../index.js";import{InjectionChangeContextCollector as C}from"../../constants/index.js";import{useCommonInjection as b,useSelectOptionProps as j}from"../../hooks/useCommonInjection.js";import{assignUpdateValue as F,assignClearBindVisited as S,createVisitedSetter as w}from"../../utils/schema.js";import{useFormField as x}from"../../hooks/useFormField.js";import{useUrlConfigOptions as B,useAutographOptions as K}from"../../hooks/useFormRenderOptions.js";const k=u(e({name:"FormRemoteSearch",props:{value:{type:String},requestCache:{type:Boolean,default:!0},options:{type:Array,default:()=>[]},allowCreate:Boolean,labelField:{type:String,default:"text"},valueField:{type:String,default:"value"},showField:{type:String},urlConfig:{type:Object},autograph:{type:String},wordbook:{type:Object},onChange:{},useLoading:{type:Boolean,default:!0},lazyRequest:{type:Boolean,default:!0},multiple:Boolean,deletable:Boolean},emits:["update:value"],setup(e,{slots:u,emit:r}){const F=s(e,"value",r),{field:S,fieldKey:k}=x(),{injectValueValidate:O,injectValueBindKey:D}=b();O(F);const R=D(F),q={onRequestConfigChange:({fetchData:e,valueKey:l})=>e(F.value,{[l]:F.value}),onDepsChange:({fetchData:e,valueKey:l})=>e(F.value,{[l]:F.value})},{labelKey:L,valueKey:P,showKey:V,fetchData:I,searchContent:U,fullOptions:z,loading:A}=e.urlConfig?B(e,F,q):K(e,F,q),T=v(((e,l="label")=>I(e,{["value"===l?P.value:"keyword"]:e},{avoidSearchContent:!1})),300);l(F,(e=>{if(e&&!z.value.find((l=>l[P.value]===e)))return T(e,"value")}));o(C).setContext(k.value,(e=>{return{currentOption:p((l=e,z.value.find((e=>e[P.value]===l))))};var l}));const{menuProps:$,nodeProps:E}=j(),G=a((()=>z.value.length||!e.allowCreate?z.value:U.value?[{[L.value]:U.value,[P.value]:U.value},...z.value]:z.value));async function H(e){A.value=e,e&&T()}function J(e){const l=e.alias||e[L.value];if(!l||!d(l))return"";const o=l;return e.desc?n("section",{style:{display:"flex",alignItems:"center",gap:"4px"}},[o,e.desc?n(y,null,{trigger:()=>n(g,{component:i},null),default:()=>e.desc}):null]):o}function M({option:l,handleClose:o}){var a;const t=null!=(a=V.value&&l[V.value])?a:l[L.value];if(!e.multiple)return N.value=t,t;return N.value="",e.deletable?n(h,{closable:!0,onClose:function(e){e.stopPropagation(),o()}},{default:()=>t}):`${t};`}const N=t("");return()=>n(m,{title:N.value,remote:!0,filterable:!0,key:R.value,value:F.value,"onUpdate:value":e=>F.value=e,labelField:L.value,valueField:P.value,"menu-props":$,"node-props":E,onSearch:T,"onUpdate:show":H,options:G.value,onFocus:w(S),renderLabel:J,renderTag:M},{empty:()=>e.useLoading&&A.value?n(c,null,null):n(f,{description:"无数据"},null),...u})}}),r(F,S));export{k as REMOTE_SEARCH};
@@ -1 +1 @@
1
- import{defineComponent as e,ref as t,computed as a,inject as l,watch as o,createVNode as r,nextTick as n}from"vue";import{connect as u,mapProps as i}from"@formily/vue";import{isEqual as s,isArray as c,isString as p}from"lodash-es";import{NCascader as d}from"naive-ui";import"../../../index.js";import{useCommonInjection as m}from"../../hooks/useCommonInjection.js";import{InjectionAsyncQueue as v,InjectionFormUUID as f}from"../../constants/index.js";import"@vueuse/core";import"../../../../../shared/utils/index.js";import"@formily/core";import"@formily/path";import"@vicons/ionicons5";import"@vue/shared";import"date-fns";import{assignUpdateValue as y,createVisitedSetter as h,traverseDependKey as k}from"../../utils/schema.js";import"@formily/reactive";import"../../hooks/useComplexOptions.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"@vueuse/shared";import"../../../../../shared/hooks/selectHooks/useSearchContent.js";import"./index.js";import{useFormField as j}from"../../hooks/useFormField.js";import"../../hooks/useFormValidator.js";const g=u(e({name:"FormCascader",props:{options:{type:Array,default:()=>[]},depth:{type:[Number,String]},urlConfig:{type:Object},lazyRequest:{type:Boolean,default:!0},requestCache:{type:Boolean,default:!0},onFocus:{type:Function},filterable:{type:Boolean,default:!1},checkStrategy:{type:String,default:"child"},labelField:{type:String,default:"text"},valueField:{type:String,default:"value"},onChange:{},value:{}},emits:["update:value"],setup(e,{slots:u,emit:i}){const y=t(),{field:g,title:b}=j(),C=t(1),S=t(!0);const w=a((()=>{var t,a,l;return null!=(l=null!=(a=null==(t=e.urlConfig)?void 0:t.nameKey)?a:e.labelField)?l:"text"})),F=a((()=>{var t,a,l;return null!=(l=null!=(a=null==(t=e.urlConfig)?void 0:t.valueKey)?a:e.valueField)?l:"value"})),A=a((()=>{try{const t=Array.isArray(e.value)?e.value:JSON.parse(e.value||"");if(!Array.isArray(t)||!t.length)return null;const a=t.map((e=>e[F.value])).slice(-1).join(""),l=t.map((e=>e[w.value])).join(" / ");return a||l}catch(e){return null}}));function H(e,t,a){i("update:value",c(a)?a.map((function(e){return{...e,label:e[w.value],children:void 0,parent:void 0,mergeItemValue:void 0}})):null)}const x=l(v);async function q(t){e.filterable?await async function(){if(!e.urlConfig||y.value&&e.requestCache)return;const t=await x.addAsync({...e.urlConfig,params:{lvlnr:"1"},key:b.value,cache:e.requestCache,payload:{field:g.value,labelKey:w.value,valueKey:F.value}});function a(e,t,o){const r=[...o,...l(e)],n={[w.value]:e[w.value],[F.value]:e[F.value],depth:t+1,isLeaf:!0,keyword:e.keyword,mergeItemValue:r};return c(e.children)&&(n.children=e.children.map((e=>a(e,t+1,r))),n.isLeaf=!e.children.length),C.value=Math.max(C.value,t+1),n}function l(e){let t=[];if(p(e[w.value])&&(t=[...t,e[w.value]]),p(e.keyword)&&e.keyword.length>0){const a=e.keyword.split(",");t=[...t,...a]}return t}y.value=t.map((e=>a(e,0,[])))}():await async function(t){if(o(e,t))return;const a=await x.addAsync(r(s(t),i(e),b.value,t));if(!a.length&&t)return t.isLeaf=!0,H(0,0,n(t)),void(O.value=!1);const l=a.map((e=>u(e,s(t))));function o(e,t){return!i(e)||!t&&y.value&&e.requestCache||s(t)>=s(e)-1}function r(t,a,l,o){const r={lvlnr:t+1+""};return o&&a.dependKey&&k(a.dependKey,((e,t)=>{r[t]=o[e]})),{params:r,...a,key:l,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 u(a,l){return{[w.value]:a[w.value],[F.value]:a[F.value],depth:l+1,parent:t,isLeaf:l+2>=s(e)}}function i(e){return e.urlConfig}function s(e){var t;return null!=(t=null==e?void 0:e.depth)?t:-1}t?t.children=l:y.value=l}(t),await B()}const V=`form-render__cascade--menu-${l(f)}`;async function B(){await n();const e=document.querySelector(`.${V} .v-vl`);e&&e.dispatchEvent(new CustomEvent("scroll"))}function K(t,a){if(!t||!a)return!1;const{mergeItemValue:l}=a;return!(e.checkStrategy.includes("child")&&a.depth<C.value)&&(l.length>0&&l.some((e=>e.includes(t.trim()))))}const{injectValueValidate:L,injectValueWatchFromEmpty:I,injectValueBindKey:E}=m();I((()=>e.value),q),L((()=>e.value)),o((()=>e.urlConfig),(async(t,a)=>{s(t,a)||(y.value=null,S.value?e.lazyRequest||(q(),S.value=!S.value):await q())}),{immediate:!0});const O=t(!1);function W(e){O.value=!!e,e&&q()}const z=a((()=>y.value||e.options||[])),N=a((()=>!e.filterable)),P=E(A);return()=>r(d,{key:P.value,remote:N.value,filterable:e.filterable,"menu-props":{class:V,onClick:B},"check-strategy":e.checkStrategy,show:!!O.value,"onUpdate:show":W,value:A.value,filter:K,"onUpdate:value":H,labelField:w.value,valueField:F.value,options:z.value,onLoad:q,onFocus:h(g)},u)}}),i({dataSource:"options"},y));export{g as SEARCH_CASCADER};
1
+ import{defineComponent as e,ref as t,computed as a,inject as l,watch as o,createVNode as r,nextTick as n}from"vue";import{connect as u,mapProps as i}from"@formily/vue";import{isEqual as s,isArray as c,isString as p}from"lodash-es";import{NCascader as d}from"naive-ui";import"../../../index.js";import{useCommonInjection as m}from"../../hooks/useCommonInjection.js";import{InjectionAsyncQueue as v,InjectionFormUUID as f}from"../../constants/index.js";import"@formily/path";import"@vueuse/core";import"../../../../../shared/utils/index.js";import"@formily/core";import"@vicons/ionicons5";import"@vue/shared";import"date-fns";import{assignUpdateValue as y,createVisitedSetter as h,traverseDependKey as k}from"../../utils/schema.js";import"@formily/reactive";import"../../hooks/useComplexOptions.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"@vueuse/shared";import"../../../../../shared/hooks/selectHooks/useSearchContent.js";import"./index.js";import{useFormField as j}from"../../hooks/useFormField.js";import"../../hooks/useFormValidator.js";const g=u(e({name:"FormCascader",props:{options:{type:Array,default:()=>[]},depth:{type:[Number,String]},urlConfig:{type:Object},lazyRequest:{type:Boolean,default:!0},requestCache:{type:Boolean,default:!0},onFocus:{type:Function},filterable:{type:Boolean,default:!1},checkStrategy:{type:String,default:"child"},labelField:{type:String,default:"text"},valueField:{type:String,default:"value"},onChange:{},value:{}},emits:["update:value"],setup(e,{slots:u,emit:i}){const y=t(),{field:g,title:b}=j(),C=t(1),S=t(!0);const w=a((()=>{var t,a,l;return null!=(l=null!=(a=null==(t=e.urlConfig)?void 0:t.nameKey)?a:e.labelField)?l:"text"})),F=a((()=>{var t,a,l;return null!=(l=null!=(a=null==(t=e.urlConfig)?void 0:t.valueKey)?a:e.valueField)?l:"value"})),A=a((()=>{try{const t=Array.isArray(e.value)?e.value:JSON.parse(e.value||"");if(!Array.isArray(t)||!t.length)return null;const a=t.map((e=>e[F.value])).slice(-1).join(""),l=t.map((e=>e[w.value])).join(" / ");return a||l}catch(e){return null}}));function H(e,t,a){i("update:value",c(a)?a.map((function(e){return{...e,label:e[w.value],children:void 0,parent:void 0,mergeItemValue:void 0}})):null)}const x=l(v);async function q(t){e.filterable?await async function(){if(!e.urlConfig||y.value&&e.requestCache)return;const t=await x.addAsync({...e.urlConfig,params:{lvlnr:"1"},key:b.value,cache:e.requestCache,payload:{field:g.value,labelKey:w.value,valueKey:F.value}});function a(e,t,o){const r=[...o,...l(e)],n={[w.value]:e[w.value],[F.value]:e[F.value],depth:t+1,isLeaf:!0,keyword:e.keyword,mergeItemValue:r};return c(e.children)&&(n.children=e.children.map((e=>a(e,t+1,r))),n.isLeaf=!e.children.length),C.value=Math.max(C.value,t+1),n}function l(e){let t=[];if(p(e[w.value])&&(t=[...t,e[w.value]]),p(e.keyword)&&e.keyword.length>0){const a=e.keyword.split(",");t=[...t,...a]}return t}y.value=t.map((e=>a(e,0,[])))}():await async function(t){if(o(e,t))return;const a=await x.addAsync(r(s(t),i(e),b.value,t));if(!a.length&&t)return t.isLeaf=!0,H(0,0,n(t)),void(O.value=!1);const l=a.map((e=>u(e,s(t))));function o(e,t){return!i(e)||!t&&y.value&&e.requestCache||s(t)>=s(e)-1}function r(t,a,l,o){const r={lvlnr:t+1+""};return o&&a.dependKey&&k(a.dependKey,((e,t)=>{r[t]=o[e]})),{params:r,...a,key:l,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 u(a,l){return{[w.value]:a[w.value],[F.value]:a[F.value],depth:l+1,parent:t,isLeaf:l+2>=s(e)}}function i(e){return e.urlConfig}function s(e){var t;return null!=(t=null==e?void 0:e.depth)?t:-1}t?t.children=l:y.value=l}(t),await B()}const V=`form-render__cascade--menu-${l(f)}`;async function B(){await n();const e=document.querySelector(`.${V} .v-vl`);e&&e.dispatchEvent(new CustomEvent("scroll"))}function K(t,a){if(!t||!a)return!1;const{mergeItemValue:l}=a;return!(e.checkStrategy.includes("child")&&a.depth<C.value)&&(l.length>0&&l.some((e=>e.includes(t.trim()))))}const{injectValueValidate:L,injectValueWatchFromEmpty:I,injectValueBindKey:E}=m();I((()=>e.value),q),L((()=>e.value)),o((()=>e.urlConfig),(async(t,a)=>{s(t,a)||(y.value=null,S.value?e.lazyRequest||(q(),S.value=!S.value):await q())}),{immediate:!0});const O=t(!1);function W(e){O.value=!!e,e&&q()}const z=a((()=>y.value||e.options||[])),N=a((()=>!e.filterable)),P=E(A);return()=>r(d,{key:P.value,remote:N.value,filterable:e.filterable,"menu-props":{class:V,onClick:B},"check-strategy":e.checkStrategy,show:!!O.value,"onUpdate:show":W,value:A.value,filter:K,"onUpdate:value":H,labelField:w.value,valueField:F.value,options:z.value,onLoad:q,onFocus:h(g)},u)}}),i({dataSource:"options"},y));export{g as SEARCH_CASCADER};
@@ -1 +1 @@
1
- import{defineComponent as e,computed as o,inject as t,useAttrs as l,ref as a,createVNode as r,mergeProps as s,toRaw as n}from"vue";import{arrayed as u}from"../../../../../shared/utils/index.js";import{cloneDeep as i,isArray as p,isObject as m,omit as d,xor as c}from"lodash-es";import{NSelect as f}from"naive-ui";import"@vueuse/core";import"date-fns";import"@vue/shared";import{useSelectAllowModify as y}from"../../../../../shared/hooks/selectHooks/useSelectAllowModify.js";import"../../../../../shared/hooks/selectHooks/useSearchContent.js";import{useSelectRenders as v}from"../../../../../shared/hooks/selectHooks/useSelectRenders.js";import{connect as h,mapProps as b}from"@formily/vue";import{useCommonInjection as j,useSelectOptionProps as S}from"../../hooks/useCommonInjection.js";import{useComplexOptions as k,useComplexOptionsSpan as g}from"../../hooks/useComplexOptions.js";import{InjectionChangeContextCollector as C,InjectionFormUUID as B}from"../../constants/index.js";import"@formily/core";import"@formily/path";import"@vicons/ionicons5";import"../../../index.js";import{assignUpdateValue as F,assignClearBindVisited as A,createVisitedSetter as w}from"../../utils/schema.js";import"@formily/reactive";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 H}from"../../hooks/useFormField.js";import{useUrlConfigOptions as O,useAutographOptions as K,useRecommendOptions as R}from"../../hooks/useFormRenderOptions.js";import"../../hooks/useFormValidator.js";const x=h(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}},emits:["update:value","postRecommend"],setup(e,{slots:h,emit:b}){const F=o({get:()=>e.value,async set(e){b("update:value",e),D(e)}}),{labelKey:A,valueKey:x,showKey:V,fetchData:L,searchContent:P,fullOptions:_,filterOptions:N,remoteOptions:I,loading:W}=e.urlConfig?O(e,F):K(e,F),{modifyEvent:E,modifyAbleRef:q,getOptionsWithCreated:M}=y(e,{searchContent:P,labelKey:A,valueKey:x,valueRef:F,fullOptions:_}),{renderComplexOption:T,hasComplexOption:U}=k(e,F),{getRecommend:z,postRecommend:D,sortedOptions:G}=R(e,N,b,A,x),{field:J,fieldKey:Q}=H();t(C).setContext(Q.value,(e=>({currentOption:i(function(e){const o=M(_.value);return p(e)?function(e){const t=o.reduce(((e,o)=>(e[o[x.value]]=o,e)),{});return e.map((e=>t[e]))}(e):(t=e,o.find((e=>e[x.value]===t)));var t}(e))})));const X=async e=>(P.value=e,Promise.allSettled([L(e),z(e)])),{injectValueValidate:Y,injectValueWatchFromEmpty:Z,injectValueBindKey:$}=j();Z(F,X),Y(F);const ee=$(F),{menuProps:oe,nodeProps:te}=S(),{renderTag:le,renderLabel:ae,renderSelectAll:re,titleRef:se}=v(e,{labelKey:A,valueKey:x,valueRef:F,showKey:V,searchContent:P}),ne=o((()=>M(q.value?_.value:G.value))),ue=l(),ie=o((()=>{if(e.allowCreate||e.showCustomValue)return F.value;const o=e.multiple&&p(F.value);return _.value.find((e=>o?F.value.includes(e[x.value]):e[x.value]===F.value))?F.value:null})),pe=a(!1);async function me(e){e&&await X(),pe.value=e}async function de(e,o){await E.updateValue(e,o),I.value&&o&&u(o).forEach((e=>{if(!m(e))return;const o=e;o.created&&o.shouldSave&&I.value.push(d(n(o),["created","shouldSave"]))}))}const ce=t(B),{getSpan:fe}=g(),ye=w(J,E.focus);function ve(o){if(!e.multiple)return;const t=o?ne.value.map((e=>e[x.value])):[];c(t,e.value).length&&(F.value=t)}function he(o){let t=h;return e.multiple&&e.selectAll&&(t={action:()=>re(ve),...h}),r(f,s({title:se.value,key:ee.value,multiple:e.multiple,remote:!0,filterable:!0,loading:W.value,value:ie.value,onUpdateValue:de,"menu-props":oe,"node-props":te,labelField:A.value,valueField:x.value,options:ne.value,onSearch:X,show:pe.value,"onUpdate:show":me,onFocus:ye,onBlur:E.blur,renderLabel:ae,renderTag:le},o,ue),t)}return()=>{var e,o;if(!U.value)return he();const t=null!=(o=null==(e=J.value.decoratorProps)?void 0:e.span)?o:6,l=fe(ce,J.value.address);return r("section",{class:"form-render__selectChildField",style:{"--column":l+t}},[he({class:"form-render__selectChildFieldItem",style:{"--form-item-column":t}}),_.value.map((e=>T({option:e,value:F.value,valueKey:x.value,labelKey:A.value,childFieldStrategy:"checked",renderLabel:!1,attrs:{class:"form-render__selectChildFieldItem",style:{"--form-item-column":l}}})))])}}}),b({dataSource:"options"},F,A));export{x as SELECT};
1
+ import{defineComponent as e,computed as o,inject as t,useAttrs as l,ref as a,createVNode as r,mergeProps as s,toRaw as n}from"vue";import{arrayed as u}from"../../../../../shared/utils/index.js";import{cloneDeep as i,isArray as p,isObject as m,omit as d,xor as c}from"lodash-es";import{NSelect as y}from"naive-ui";import"@vueuse/core";import"date-fns";import"@vue/shared";import{useSelectAllowModify as f}from"../../../../../shared/hooks/selectHooks/useSelectAllowModify.js";import"../../../../../shared/hooks/selectHooks/useSearchContent.js";import{useSelectRenders as v}from"../../../../../shared/hooks/selectHooks/useSelectRenders.js";import{connect as h,mapProps as b}from"@formily/vue";import{useCommonInjection as j,useSelectOptionProps as S}from"../../hooks/useCommonInjection.js";import{useComplexOptions as k,useComplexOptionsSpan as g}from"../../hooks/useComplexOptions.js";import{InjectionChangeContextCollector as C,InjectionFormUUID as B}from"../../constants/index.js";import"@formily/path";import"@formily/core";import"@vicons/ionicons5";import{assignUpdateValue as F,assignClearBindVisited as A,createVisitedSetter as w}from"../../utils/schema.js";import"@formily/reactive";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 H}from"../../hooks/useFormField.js";import{useUrlConfigOptions as O,useAutographOptions as K,useRecommendOptions as R}from"../../hooks/useFormRenderOptions.js";import"../../hooks/useFormValidator.js";const x=h(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}},emits:["update:value","postRecommend"],setup(e,{slots:h,emit:b}){const F=o({get:()=>e.value,async set(e){b("update:value",e),D(e)}}),{labelKey:A,valueKey:x,showKey:V,fetchData:L,searchContent:P,fullOptions:_,filterOptions:N,remoteOptions:I,loading:W}=e.urlConfig?O(e,F):K(e,F),{modifyEvent:q,modifyAbleRef:E,getOptionsWithCreated:z}=f(e,{searchContent:P,labelKey:A,valueKey:x,valueRef:F,fullOptions:_}),{renderComplexOption:M,hasComplexOption:T}=k(e,F),{getRecommend:U,postRecommend:D,sortedOptions:G}=R(e,N,b,A,x),{field:J,fieldKey:Q}=H();t(C).setContext(Q.value,(e=>({currentOption:i(function(e){const o=z(_.value);return p(e)?function(e){const t=o.reduce(((e,o)=>(e[o[x.value]]=o,e)),{});return e.map((e=>t[e]))}(e):(t=e,o.find((e=>e[x.value]===t)));var t}(e))})));const X=async e=>(P.value=e,Promise.allSettled([L(e),U(e)])),{injectValueValidate:Y,injectValueWatchFromEmpty:Z,injectValueBindKey:$}=j();Z(F,(()=>e.lazyRequest&&X())),Y(F);const ee=$(F),{menuProps:oe,nodeProps:te}=S(),{renderTag:le,renderLabel:ae,renderSelectAll:re,titleRef:se}=v(e,{labelKey:A,valueKey:x,valueRef:F,showKey:V,searchContent:P}),ne=o((()=>z(E.value?_.value:G.value))),ue=l(),ie=o((()=>{if(e.allowCreate||e.showCustomValue)return F.value;const o=e.multiple&&p(F.value);return _.value.find((e=>o?F.value.includes(e[x.value]):e[x.value]===F.value))?F.value:null})),pe=a(!1);async function me(e){e&&await X(),pe.value=e}async function de(e,o){await q.updateValue(e,o),I.value&&o&&u(o).forEach((e=>{if(!m(e))return;const o=e;o.created&&o.shouldSave&&I.value.push(d(n(o),["created","shouldSave"]))}))}const ce=t(B),{getSpan:ye}=g(),fe=w(J,q.focus);function ve(o){if(!e.multiple)return;const t=o?ne.value.map((e=>e[x.value])):[];c(t,e.value).length&&(F.value=t)}function he(o){let t=h;return e.multiple&&e.selectAll&&(t={action:()=>re(ve),...h}),r(y,s({title:se.value,key:ee.value,multiple:e.multiple,remote:!0,filterable:!0,loading:W.value,value:ie.value,onUpdateValue:de,"menu-props":oe,"node-props":te,labelField:A.value,valueField:x.value,options:ne.value,onSearch:X,show:pe.value,"onUpdate:show":me,onFocus:fe,onBlur:q.blur,renderLabel:ae,renderTag:le},o,ue),t)}return()=>{var e,o;if(!T.value)return he();const t=null!=(o=null==(e=J.value.decoratorProps)?void 0:e.span)?o:6,l=ye(ce,J.value.address);return r("section",{class:"form-render__selectChildField",style:{"--column":l+t}},[he({class:"form-render__selectChildFieldItem",style:{"--form-item-column":t}}),_.value.map((e=>M({option:e,value:F.value,valueKey:x.value,labelKey:A.value,childFieldStrategy:"checked",renderLabel:!1,attrs:{class:"form-render__selectChildFieldItem",style:{"--form-item-column":l}}})))])}}}),b({dataSource:"options"},F,A));export{x as SELECT};
@@ -1 +1 @@
1
- import{defineComponent as e,computed as r,createVNode as o,createTextVNode as i}from"vue";import{NSwitch as t}from"naive-ui";import"../../../../../shared/utils/index.js";import"@formily/core";import"@formily/path";import"@vicons/ionicons5";import"@vue/shared";import"@vueuse/core";import"lodash-es";import"../../../index.js";import"date-fns";import{assignUpdateValue as n,assignValueBindKey as l}from"../../utils/schema.js";import{connect as u,mapProps as c}from"@formily/vue";const p=u(e({name:"FormSwitch",props:{openDescription:{type:Object},closeDescription:{type:Object},onChange:{}},setup:e=>()=>{const n=r((()=>{var r,o;return null==(o=null==(r=e.openDescription)?void 0:r.value)||o})),l=r((()=>{var r,o;return null!=(o=null==(r=e.closeDescription)?void 0:r.value)&&o}));return o(t,{checkedValue:n.value,uncheckedValue:l.value},{checked:()=>{var r,o;return i(null!=(o=null==(r=e.openDescription)?void 0:r.describe)?o:"")},unchecked:()=>{var r,o;return i(null!=(o=null==(r=e.closeDescription)?void 0:r.describe)?o:"")}})}}),c(n,l));export{p as SWITCH};
1
+ import{defineComponent as e,computed as r,createVNode as o,createTextVNode as i}from"vue";import{NSwitch as t}from"naive-ui";import"../../../../../shared/utils/index.js";import"@formily/core";import"@formily/path";import"@vicons/ionicons5";import"@vue/shared";import"@vueuse/core";import"lodash-es";import"date-fns";import{assignUpdateValue as n,assignValueBindKey as l}from"../../utils/schema.js";import{connect as u,mapProps as c}from"@formily/vue";const p=u(e({name:"FormSwitch",props:{openDescription:{type:Object},closeDescription:{type:Object},onChange:{}},setup:e=>()=>{const n=r((()=>{var r,o;return null==(o=null==(r=e.openDescription)?void 0:r.value)||o})),l=r((()=>{var r,o;return null!=(o=null==(r=e.closeDescription)?void 0:r.value)&&o}));return o(t,{checkedValue:n.value,uncheckedValue:l.value},{checked:()=>{var r,o;return i(null!=(o=null==(r=e.openDescription)?void 0:r.describe)?o:"")},unchecked:()=>{var r,o;return i(null!=(o=null==(r=e.closeDescription)?void 0:r.describe)?o:"")}})}}),c(n,l));export{p as SWITCH};
@@ -1 +1 @@
1
- import{defineComponent as e,computed as o,createVNode as t}from"vue";import{useCommonInjection as r}from"../../hooks/useCommonInjection.js";import"../../../../../shared/utils/index.js";import"@formily/core";import"@formily/path";import"@vicons/ionicons5";import"@vue/shared";import"@vueuse/core";import"lodash-es";import{NInput as i}from"naive-ui";import"../../../index.js";import"date-fns";import{assignUpdateValue as m,assignClearBindVisited as a}from"../../utils/schema.js";import{connect as p,mapProps as u}from"@formily/vue";const s=p(e({name:"FormTextarea",props:{value:{type:String}},emits:["update:value"],setup(e,{emit:m}){const a=o({get:()=>e.value,set:e=>m("update:value",e)}),p=r().injectValueBindKey(a);return()=>t(i,{type:"textarea",key:p.value,value:a.value,"onUpdate:value":e=>a.value=e},null)}}),u(m,a));export{s as TEXTAREA};
1
+ import{defineComponent as e,computed as o,createVNode as t}from"vue";import{useCommonInjection as r}from"../../hooks/useCommonInjection.js";import"../../../../../shared/utils/index.js";import"@formily/core";import"@formily/path";import"@vicons/ionicons5";import"@vue/shared";import"@vueuse/core";import"lodash-es";import{NInput as i}from"naive-ui";import"date-fns";import{assignUpdateValue as m,assignClearBindVisited as a}from"../../utils/schema.js";import{connect as u,mapProps as p}from"@formily/vue";const s=u(e({name:"FormTextarea",props:{value:{type:String}},emits:["update:value"],setup(e,{emit:m}){const a=o({get:()=>e.value,set:e=>m("update:value",e)}),u=r().injectValueBindKey(a);return()=>t(i,{type:"textarea",key:u.value,value:a.value,"onUpdate:value":e=>a.value=e},null)}}),p(m,a));export{s as TEXTAREA};
@@ -17,7 +17,6 @@ export declare const InjectionFormUUID: InjectionKey<string>;
17
17
  export declare const InjectionFormGraph: InjectionKey<Record<string, GeneralField>>;
18
18
  export declare const InjectionAnnotation: InjectionKey<WritableComputedRef<Nullable<Record<string, AnnotationItem>>>>;
19
19
  export declare const InjectionFormGlobalProps: InjectionKey<Readonly<FormRenderProps>>;
20
- export declare const FormItemLineBarDepKeyPrepend = "__dep_LINEBAR_";
21
20
  export declare enum FIELD_BUSINESS_TYPE {
22
21
  PASSWORD = "password",
23
22
  ID_CARD = "id_card",
@@ -1 +1 @@
1
- const o=Symbol("InjectionAsyncQueue"),e=Symbol("InjectionSchemaField"),n=Symbol("InjectionBusinessCollector"),t=Symbol("InjectionChangeContextCollector"),l=Symbol("InjectionFormItemDepsCollector"),E=Symbol("InjectionFormLifeCycleCaller"),I=Symbol("InjectionFormUUID"),i=Symbol("InjectionFormGraph"),A=Symbol("InjectionAnnotation"),a=Symbol("InjectionFormGlobalProps"),c="__dep_LINEBAR_";var m=(o=>(o.PASSWORD="password",o.ID_CARD="id_card",o.AGE="age",o.AGE_UNIT="age_unit",o.MOBILE="mobile",o.TELEPHONE="telephone",o.EMAIL="email",o.SEX="sex",o.BIRTHDAY="birthday",o.BANK_CARD="bank_card",o.WEBSITE="website",o.GESTATIONAL_WEEKS="gestational_weeks",o.GESTATIONAL_STAGE="gestational_stage",o.CUSTOMER_NAME="customer_name",o))(m||{}),S=(o=>(o.MALE="1",o.FEMALE="2",o))(S||{}),r=(o=>(o.DAY="D",o.MONTH="M",o.YEAR="Y",o.HOUR="H",o.WEEK="W",o.MINUTE="N",o))(r||{});const s=["COMPLEX","COMBINATION"];export{r as FIELD_AGE_UNIT,m as FIELD_BUSINESS_TYPE,S as FIELD_SEX_VALUE,c as FormItemLineBarDepKeyPrepend,A as InjectionAnnotation,o as InjectionAsyncQueue,n as InjectionBusinessCollector,t as InjectionChangeContextCollector,a as InjectionFormGlobalProps,i as InjectionFormGraph,l as InjectionFormItemDepsCollector,E as InjectionFormLifeCycleCaller,I as InjectionFormUUID,e as InjectionSchemaField,s as NESTED_FORM_ITEM_TYPE};
1
+ const o=Symbol("InjectionAsyncQueue"),e=Symbol("InjectionSchemaField"),n=Symbol("InjectionBusinessCollector"),t=Symbol("InjectionChangeContextCollector"),l=Symbol("InjectionFormItemDepsCollector"),E=Symbol("InjectionFormLifeCycleCaller"),I=Symbol("InjectionFormUUID"),i=Symbol("InjectionFormGraph"),a=Symbol("InjectionAnnotation"),c=Symbol("InjectionFormGlobalProps");var m=(o=>(o.PASSWORD="password",o.ID_CARD="id_card",o.AGE="age",o.AGE_UNIT="age_unit",o.MOBILE="mobile",o.TELEPHONE="telephone",o.EMAIL="email",o.SEX="sex",o.BIRTHDAY="birthday",o.BANK_CARD="bank_card",o.WEBSITE="website",o.GESTATIONAL_WEEKS="gestational_weeks",o.GESTATIONAL_STAGE="gestational_stage",o.CUSTOMER_NAME="customer_name",o))(m||{}),A=(o=>(o.MALE="1",o.FEMALE="2",o))(A||{}),S=(o=>(o.DAY="D",o.MONTH="M",o.YEAR="Y",o.HOUR="H",o.WEEK="W",o.MINUTE="N",o))(S||{});const r=["COMPLEX","COMBINATION"];export{S as FIELD_AGE_UNIT,m as FIELD_BUSINESS_TYPE,A as FIELD_SEX_VALUE,a as InjectionAnnotation,o as InjectionAsyncQueue,n as InjectionBusinessCollector,t as InjectionChangeContextCollector,c as InjectionFormGlobalProps,i as InjectionFormGraph,l as InjectionFormItemDepsCollector,E as InjectionFormLifeCycleCaller,I as InjectionFormUUID,e as InjectionSchemaField,r as NESTED_FORM_ITEM_TYPE};
@@ -1 +1 @@
1
- import{doAnimation as e}from"../../../../shared/utils/anime.js";import{useDebounceFn as o,watchOnce as t}from"@vueuse/core";import{ref as r,computed as n,nextTick as i}from"vue";import{FormItemLineBarDepKeyPrepend as l}from"../constants/index.js";import"../../../../shared/utils/index.js";import"@formily/core";import"@formily/path";import"@vicons/ionicons5";import"@vue/shared";import"lodash-es";import"naive-ui";import"../../index.js";import"date-fns";import{createLinebarId as a}from"../utils/schema.js";function s(s,u,c,m){const v=r(),p=r(""),f=r([]),d=async function(e){var o;f.value=Object.values(e.fields).reduce(((e,o)=>{var t,r;return"LINEBAR"===o.componentType&&"visible"===o.selfDisplay&&e.push({title:null!=(r=null==(t=o.componentProps)?void 0:t.title)?r:o.title,name:o.address.toString()}),e}),[]),await i(),null==(o=v.value)||o.syncBarPosition()};let h=!1;async function y(o){h=!0;try{if(!c.value)return;m.trigger(l+o,!0),await i();const t=c.value.querySelector(`#${a(o)}`);if(!t)return;await new Promise((o=>{e(c.value.scrollTop,t.offsetTop,300,(e=>{var o;null==(o=c.value)||o.scrollTo({top:e})}),"easeInSine",(()=>setTimeout(o,300)))}))}finally{h=!1}}const T=o((function(e){var o;if(h||!c.value)return;const{scrollTop:t,clientHeight:r}=c.value,n=f.value.find(((e,o,n)=>{const i=n[o+1];if(!i)return!0;const l=c.value.querySelector(`#${a(i.name)}`);return l?l.offsetTop>t+r/2:void 0}))||f.value[f.value.length-1];p.value=null!=(o=null==n?void 0:n.name)?o:"",u("scroll",e)}),300);t(f,(e=>{var o,t;p.value=null!=(t=null==(o=e[0])?void 0:o.name)?t:""}));return{currentAnchor:n({get:()=>p.value,async set(e){p.value=e,await new Promise((e=>setTimeout(e,100))),await y(e)}}),onScroll:T,anchorIdList:f,generateAnchorList:d,updateAnchorList:function(e){"LINEBAR"===e.componentType&&e.selfDisplay&&d(e.form)},scrollTo:y,anchorBarRef:v}}export{s as useAnchor};
1
+ import{doAnimation as e}from"../../../../shared/utils/anime.js";import{Path as o}from"@formily/path";import{useDebounceFn as t,watchOnce as r}from"@vueuse/core";import{ref as n,computed as l,nextTick as i}from"vue";import"../../../../shared/utils/index.js";import"@formily/core";import"@vicons/ionicons5";import"@vue/shared";import"lodash-es";import"naive-ui";import"date-fns";import{createLinebarId as a}from"../utils/schema.js";function s(s,u,c,m){const v=n(),p=n(""),f=n([]),d=async function(e){var o;f.value=Object.values(e.fields).reduce(((e,o)=>{var t,r;return"LINEBAR"===o.componentType&&"visible"===o.selfDisplay&&e.push({title:null!=(r=null==(t=o.componentProps)?void 0:t.title)?r:o.title,name:o.address.toString()}),e}),[]),await i(),null==(o=v.value)||o.syncBarPosition()};let h=!1;async function y(t){h=!0;try{if(!c.value)return;m.trigger(o.parse(t),!0),await i();const r=c.value.querySelector(`#${a(t)}`);if(!r)return;await new Promise((o=>{e(c.value.scrollTop,r.offsetTop,300,(e=>{var o;null==(o=c.value)||o.scrollTo({top:e})}),"easeInSine",(()=>setTimeout(o,300)))}))}finally{h=!1}}const T=t((function(e){var o;if(h||!c.value)return;const{scrollTop:t,clientHeight:r}=c.value,n=f.value.find(((e,o,n)=>{const l=n[o+1];if(!l)return!0;const i=c.value.querySelector(`#${a(l.name)}`);return i?i.offsetTop>t+r/2:void 0}))||f.value[f.value.length-1];p.value=null!=(o=null==n?void 0:n.name)?o:"",u("scroll",e)}),300);r(f,(e=>{var o,t;p.value=null!=(t=null==(o=e[0])?void 0:o.name)?t:""}));return{currentAnchor:l({get:()=>p.value,async set(e){p.value=e,await new Promise((e=>setTimeout(e,100))),await y(e)}}),onScroll:T,anchorIdList:f,generateAnchorList:d,updateAnchorList:function(e){"LINEBAR"===e.componentType&&e.selfDisplay&&d(e.form)},scrollTo:y,anchorBarRef:v}}export{s as useAnchor};
@@ -1 +1 @@
1
- import{isField as e}from"@formily/core";import{Path as t}from"@formily/path";import{isString as s}from"@vueuse/core";import{format as i}from"date-fns";import{isFunction as r,isNumber as a}from"lodash-es";import{FIELD_BUSINESS_TYPE as n}from"../constants/index.js";import"vue";import"../../../../shared/utils/index.js";import"@vicons/ionicons5";import"@vue/shared";import"naive-ui";import"../../index.js";import{isIdCard as l,parseIdCard as o,parseAgeFromContext as u,parseBirthday as h,parseAge2Birthday as y}from"../utils/business.js";class p{constructor(e){this.businessFormatter=e,this.triggerDisabled=!1,this.typeLockMap=new Map,this.typeCollector=new Map,this.fieldNameCollector=new Map,this.changeHandlerMap=new Map([])}formatter(...e){return r(this.businessFormatter)?this.businessFormatter(...e):e[0].value}collect(e,t){this.typeCollector.set(e,t),this.fieldNameCollector.set(t.val_key,e)}getField(e){return this.typeCollector.get(e)}getFieldInstanceByType(e,t){const s=this.getField(t);return s?e.query(s.val_key).take():null}getType(e){return this.fieldNameCollector.get(e)}getValueByField(t,s){const i=t.query(s).take();return e(i)?i.value:null}getValueByType(e,t){const s=this.getField(t);return s?this.getValueByField(e,s.val_key):null}setValueByType(e,i,r,a){const n=this.getField(i);n&&e.setFieldState(n.val_key,(e=>{e.value!==r&&(!this.typeLockMap.get(i)&&this.typeLockMap.set(i,1),this.triggerDisabled&&s(this.triggerDisabled)&&t.parse(this.triggerDisabled).match(n.val_key)||(e.value=this.formatter({value:r,type:i,fieldKey:n.val_key,from:a})))}))}registerChangeBusiness(e,t){return this.changeHandlerMap.set(e,t),this}trigger(e,t,s="change"){var i;if(!0===this.triggerDisabled)return;const r=this.getType(t);if(!r)return;if("change"===s&&this.typeLockMap.get(r))return this.typeLockMap.set(r,0);const a="change"===s?this.changeHandlerMap:null;a&&(null==(i=a.get(r))||i.call(this,e))}}function c(){function e(){var e;const t=this.getField(n.BIRTHDAY);return null!=(e=null==t?void 0:t.date_format)?e:"yyyy-MM-dd HH:mm"}function t(t){const r=this.getValueByType(t,n.ID_CARD);if(!r||!s(r)||!l(r))return;const a=o(r),{age:h,ageUnit:y}=u(a);this.setValueByType(t,n.AGE_UNIT,y,n.ID_CARD),this.setValueByType(t,n.AGE,h,n.ID_CARD),this.setValueByType(t,n.SEX,a.sex,n.ID_CARD),this.setValueByType(t,n.BIRTHDAY,i(new Date(a.birthday),e.call(this)),n.ID_CARD)}function r(e){const t=this.getValueByType(e,n.BIRTHDAY);if(!s(t))return;const{age:i,ageUnit:r}=u(h(t));this.setValueByType(e,n.AGE_UNIT,r,n.BIRTHDAY),this.setValueByType(e,n.AGE,i,n.BIRTHDAY)}function c(t){return function(i){const r=this.getValueByType(i,n.AGE),l=this.getValueByType(i,n.AGE_UNIT);(s(r)||a(r))&&""!==r&&s(l)&&""!==l&&this.setValueByType(i,n.BIRTHDAY,y(+r,l,e.call(this)),t)}}return{create:function(e){return new p(e).registerChangeBusiness(n.ID_CARD,t).registerChangeBusiness(n.AGE_UNIT,c(n.AGE_UNIT)).registerChangeBusiness(n.AGE,c(n.AGE)).registerChangeBusiness(n.BIRTHDAY,r)}}}export{p as BusinessCollector,c as useBusinessBinding};
1
+ import{isField as e}from"@formily/core";import{Path as t}from"@formily/path";import{isString as s}from"@vueuse/core";import{format as i}from"date-fns";import{isFunction as r,isNumber as a}from"lodash-es";import{FIELD_BUSINESS_TYPE as n}from"../constants/index.js";import"vue";import"../../../../shared/utils/index.js";import"@vicons/ionicons5";import"@vue/shared";import"naive-ui";import{isIdCard as l,parseIdCard as o,parseAgeFromContext as u,parseBirthday as h,parseAge2Birthday as y}from"../utils/business.js";class c{constructor(e){this.businessFormatter=e,this.triggerDisabled=!1,this.typeLockMap=new Map,this.typeCollector=new Map,this.fieldNameCollector=new Map,this.changeHandlerMap=new Map([])}formatter(...e){return r(this.businessFormatter)?this.businessFormatter(...e):e[0].value}collect(e,t){this.typeCollector.set(e,t),this.fieldNameCollector.set(t.val_key,e)}getField(e){return this.typeCollector.get(e)}getFieldInstanceByType(e,t){const s=this.getField(t);return s?e.query(s.val_key).take():null}getType(e){return this.fieldNameCollector.get(e)}getValueByField(t,s){const i=t.query(s).take();return e(i)?i.value:null}getValueByType(e,t){const s=this.getField(t);return s?this.getValueByField(e,s.val_key):null}setValueByType(e,i,r,a){const n=this.getField(i);n&&e.setFieldState(n.val_key,(e=>{e.value!==r&&(!this.typeLockMap.get(i)&&this.typeLockMap.set(i,1),this.triggerDisabled&&s(this.triggerDisabled)&&t.parse(this.triggerDisabled).match(n.val_key)||(e.value=this.formatter({value:r,type:i,fieldKey:n.val_key,from:a})))}))}registerChangeBusiness(e,t){return this.changeHandlerMap.set(e,t),this}trigger(e,t,s="change"){var i;if(!0===this.triggerDisabled)return;const r=this.getType(t);if(!r)return;if("change"===s&&this.typeLockMap.get(r))return this.typeLockMap.set(r,0);const a="change"===s?this.changeHandlerMap:null;a&&(null==(i=a.get(r))||i.call(this,e))}}function g(){function e(){var e;const t=this.getField(n.BIRTHDAY);return null!=(e=null==t?void 0:t.date_format)?e:"yyyy-MM-dd HH:mm"}function t(t){const r=this.getValueByType(t,n.ID_CARD);if(!r||!s(r)||!l(r))return;const a=o(r),{age:h,ageUnit:y}=u(a);this.setValueByType(t,n.AGE_UNIT,y,n.ID_CARD),this.setValueByType(t,n.AGE,h,n.ID_CARD),this.setValueByType(t,n.SEX,a.sex,n.ID_CARD),this.setValueByType(t,n.BIRTHDAY,i(new Date(a.birthday),e.call(this)),n.ID_CARD)}function r(e){const t=this.getValueByType(e,n.BIRTHDAY);if(!s(t))return;const{age:i,ageUnit:r}=u(h(t));this.setValueByType(e,n.AGE_UNIT,r,n.BIRTHDAY),this.setValueByType(e,n.AGE,i,n.BIRTHDAY)}function g(t){return function(i){const r=this.getValueByType(i,n.AGE),l=this.getValueByType(i,n.AGE_UNIT);(s(r)||a(r))&&""!==r&&s(l)&&""!==l&&this.setValueByType(i,n.BIRTHDAY,y(+r,l,e.call(this)),t)}}return{create:function(e){return new c(e).registerChangeBusiness(n.ID_CARD,t).registerChangeBusiness(n.AGE_UNIT,g(n.AGE_UNIT)).registerChangeBusiness(n.AGE,g(n.AGE)).registerChangeBusiness(n.BIRTHDAY,r)}}}export{c as BusinessCollector,g as useBusinessBinding};
@@ -1 +1 @@
1
- import{arrayed as e,findAncestor as t}from"../../../../shared/utils/index.js";import{isField as r}from"@formily/core";import{Path as o}from"@formily/path";import{isObject as i}from"@vue/shared";import{promiseTimeout as n}from"@vueuse/shared";import{isFunction as a,isArray as s,isString as l,isBoolean as d}from"lodash-es";import{nextTick as u}from"vue";import"../../index.js";import{FormItemLineBarDepKeyPrepend as m,NESTED_FORM_ITEM_TYPE as f}from"../constants/index.js";import{queryDecoratorByAddress as c,queryInput as g,queryDecoratorByFieldKey as p,findNextWidget as v}from"../utils/dom.js";import{validateMessageParser as y,combineExtendKey as h,splitExtendKey as b}from"../utils/index.js";import{getParentLinebar as x}from"../utils/schema.js";function D({formModel:t,formRenderRef:n,formUUID:f,getFieldList:v,formItemDepsCollector:D,businessCollector:F,wordbookSettingHandler:I,operationalFormHandler:j}){return{validate(o="*",{force:d}={}){if(a(o)){const e=Object.entries(t.fields).reduce(((e,[t,r])=>(o(r)&&e.push(t),e)),[]);if(!e.length)return Promise.resolve();o=e.length?`*(${e.join(",")})`:"*"}const u=[];d&&t.setFieldState(o,(e=>{"visible"===e.display&&"editable"!==e.pattern&&r(e)&&(u.push({pattern:e.pattern,state:e}),e.pattern="editable")}));const m=t.validate(o).catch((e=>Promise.reject(Array.isArray(e)?e.reduce(p,[]):e)));return d&&u.forEach((({pattern:e,state:t})=>t.pattern=e)),m;function p(t,r){if(!i(r))return t;let o=!1;return s(r.messages)&&r.messages.forEach((r=>{i(r)&&(t.push(...e(r).map(v)),o=!0)})),!o&&t.push(v(r)),t}function v(e){if(e.decoratorElement)return e;const r=t.query(e.path),o=r.get("title"),a=e.messages.map((e=>function(e,t){if(!t||!i(t.fieldItem))return e;const r=t.fieldItem.defined_error_msg;return y(r&&l(r)?r:e,t.fieldItem)}(e,r.get("decoratorProps")))),s=c(e.address,n.value,f);return{...e,messages:a,title:o,decoratorElement:s,...g(s)}}},getFormValues(e=!0){let r=t.getFormState().values;return e&&(r=h(v(),r)),r},async setFormValues(e,n={},a=!1,s=!0){var l,m,f,c,g,p;let y=!0,h=!0,x=!0,w=!0;i(n)?(h=null==(l=n.needSplitExtendKey)||l,y=null==(m=n.avoidDependKeyConnection)||m,a=null!=(f=n.avoidBusinessConnection)&&f,x=null==(c=n.avoidWordbookSettingConnection)||c,w=null==(g=n.avoidOperationalFormConnection)||g,s=null==(p=n.overwrite)||p):d(n)&&(h=n),F.triggerDisabled=a,D.triggerDisabled=y,I.triggerDisabled=x,j.triggerDisabled=w,h&&(e=b(v(),e)),t.setFieldState("*",(t=>{r(t)&&(s||o.existIn(e,t.path))&&(t.value=o.getIn(e,t.path))})),await u(),F.triggerDisabled=!1,D.triggerDisabled=!1,I.triggerDisabled=!1,j.triggerDisabled=!1},setFieldState(e,r){t.setFieldState(e,r)},resetFields:(e="*")=>t.reset(e),queryWidget:async e=>n.value?await async function(e,t,r){if(!n.value)return a();const o=p(e,t,f);if(o)return a(o);const i=x(e,r);return i?(D.trigger(m+i,!0),await u(),a(p(e,t,f))):a();function a(e){return{decoratorElement:e,...g(e)}}}(e,n.value,v()):null}}function F({props:e,formRenderRef:r,formModel:o}){return{onKeydown:async function i(s){var l;if(e.enterToNextWidget&&s.target){if("TEXTAREA"===s.target.tagName&&!s.ctrlKey)return;s.preventDefault()}if(await n(0),Reflect.get(s,"stopCapture")||!e.enterToNextWidget||!r.value)return;const d=t(s.target,(e=>e.classList.contains("form-render__formItem")));if(!d)return;const u=`.form-render__formItem${f.map((e=>`:not([widget-type=${e}])`)).join("")}`,m=Array.from(r.value.querySelectorAll(u)),c=m.findIndex((e=>e.id===d.id));if(!~c)return;const{widget:g,field:p}=v(m,c,s.target);if(g)if(a(e.enterToNextWidget)){const t=p&&o.query(p).take();!t||e.enterToNextWidget(null==(l=t.decoratorProps)?void 0:l.fieldItem)?y():i({target:g})}else y();async function y(){await n(0),g.focus()}}}}export{F as useFormDomEvent,D as useFormExposeEvent};
1
+ import{arrayed as e,findAncestor as t}from"../../../../shared/utils/index.js";import{isField as r}from"@formily/core";import{Path as o}from"@formily/path";import{isObject as i}from"@vue/shared";import{promiseTimeout as n}from"@vueuse/shared";import{isFunction as a,isArray as s,isString as l,isBoolean as d}from"lodash-es";import{nextTick as u}from"vue";import"../../index.js";import{NESTED_FORM_ITEM_TYPE as m}from"../constants/index.js";import{queryDecoratorByAddress as f,queryInput as c,queryDecoratorByFieldKey as g,findNextWidget as p}from"../utils/dom.js";import{validateMessageParser as v,combineExtendKey as y,splitExtendKey as h}from"../utils/index.js";import{getParentLinebar as b}from"../utils/schema.js";function x({formModel:t,formRenderRef:n,formUUID:m,getFieldList:p,formItemDepsCollector:x,businessCollector:D,wordbookSettingHandler:F,operationalFormHandler:I}){return{validate(o="*",{force:d}={}){if(a(o)){const e=Object.entries(t.fields).reduce(((e,[t,r])=>(o(r)&&e.push(t),e)),[]);if(!e.length)return Promise.resolve();o=e.length?`*(${e.join(",")})`:"*"}const u=[];d&&t.setFieldState(o,(e=>{"visible"===e.display&&"editable"!==e.pattern&&r(e)&&(u.push({pattern:e.pattern,state:e}),e.pattern="editable")}));const g=t.validate(o).catch((e=>Promise.reject(Array.isArray(e)?e.reduce(p,[]):e)));return d&&u.forEach((({pattern:e,state:t})=>t.pattern=e)),g;function p(t,r){if(!i(r))return t;let o=!1;return s(r.messages)&&r.messages.forEach((r=>{i(r)&&(t.push(...e(r).map(y)),o=!0)})),!o&&t.push(y(r)),t}function y(e){if(e.decoratorElement)return e;const r=t.query(e.path),o=r.get("title"),a=e.messages.map((e=>function(e,t){if(!t||!i(t.fieldItem))return e;const r=t.fieldItem.defined_error_msg;return v(r&&l(r)?r:e,t.fieldItem)}(e,r.get("decoratorProps")))),s=f(e.address,n.value,m);return{...e,messages:a,title:o,decoratorElement:s,...c(s)}}},getFormValues(e=!0){let r=t.getFormState().values;return e&&(r=y(p(),r)),r},async setFormValues(e,n={},a=!1,s=!0){var l,m,f,c,g,v;let y=!0,b=!0,j=!0,w=!0;i(n)?(b=null==(l=n.needSplitExtendKey)||l,y=null==(m=n.avoidDependKeyConnection)||m,a=null!=(f=n.avoidBusinessConnection)&&f,j=null==(c=n.avoidWordbookSettingConnection)||c,w=null==(g=n.avoidOperationalFormConnection)||g,s=null==(v=n.overwrite)||v):d(n)&&(b=n),D.triggerDisabled=a,x.triggerDisabled=y,F.triggerDisabled=j,I.triggerDisabled=w,b&&(e=h(p(),e)),t.setFieldState("*",(t=>{r(t)&&(s||o.existIn(e,t.path))&&(t.value=o.getIn(e,t.path))})),await u(),D.triggerDisabled=!1,x.triggerDisabled=!1,F.triggerDisabled=!1,I.triggerDisabled=!1},setFieldState(e,r){t.setFieldState(e,r)},resetFields:(e="*")=>t.reset(e),queryWidget:async e=>n.value?await async function(e,t,r){if(!n.value)return s();const i=g(e,t,m);if(i)return s(i);const a=b(e,r);return a?(x.trigger(o.parse(a),!0),await u(),s(g(e,t,m))):s();function s(e){return{decoratorElement:e,...c(e)}}}(e,n.value,p()):null}}function D({props:e,formRenderRef:r,formModel:o}){return{onKeydown:async function i(s){var l;if(e.enterToNextWidget&&s.target){if("TEXTAREA"===s.target.tagName&&!s.ctrlKey)return;s.preventDefault()}if(await n(0),Reflect.get(s,"stopCapture")||!e.enterToNextWidget||!r.value)return;const d=t(s.target,(e=>e.classList.contains("form-render__formItem")));if(!d)return;const u=`.form-render__formItem${m.map((e=>`:not([widget-type=${e}])`)).join("")}`,f=Array.from(r.value.querySelectorAll(u)),c=f.findIndex((e=>e.id===d.id));if(!~c)return;const{widget:g,field:v}=p(f,c,s.target);if(g)if(a(e.enterToNextWidget)){const t=v&&o.query(v).take();!t||e.enterToNextWidget(null==(l=t.decoratorProps)?void 0:l.fieldItem)?y():i({target:g})}else y();async function y(){await n(0),g.focus()}}}}export{D as useFormDomEvent,x as useFormExposeEvent};
@@ -1,11 +1,11 @@
1
1
  import { AnyFn } from '../../../../../es/shared/types';
2
+ import { Path } from '@formily/path';
2
3
  import { DependKeyType } from '../../../../../es/components/form-render';
3
4
  export declare class FormItemDepsCollector {
4
5
  triggerDisabled: string | boolean;
5
6
  private readonly collector;
6
- setDeps(key: string, dependKeys: DependKeyType, callback: AnyFn): void;
7
- getDeps(dependKey: string): Map<string, AnyFn<any[], any>> | undefined;
8
- trigger(dependKey: string, payload?: unknown): void;
7
+ setDeps(fieldPath: Path, dependKeys: DependKeyType, callback: AnyFn): void;
8
+ trigger(dependPath: Path, payload?: unknown): void;
9
9
  }
10
10
  export declare function useFormItemDeps(): {
11
11
  create: () => FormItemDepsCollector;
@@ -1 +1 @@
1
- import{Path as t}from"@formily/path";import{isFunction as e,isString as r}from"lodash-es";import"vue";import"../../../../shared/utils/index.js";import"@formily/core";import"@vicons/ionicons5";import"@vue/shared";import"@vueuse/core";import"naive-ui";import"../../index.js";import"date-fns";import{traverseDependKey as i}from"../utils/schema.js";class s{constructor(){this.triggerDisabled=!1,this.collector=new Map}setDeps(t,e,r){i(e,(e=>{const i=this.collector.get(e)||new Map;i.set(t,r),this.collector.set(e,i)}))}getDeps(t){return this.collector.get(t)}trigger(i,s){if(!0===this.triggerDisabled)return;const o=this.getDeps(i);o&&[...o.entries()].forEach((([i,o])=>{!e(o)||this.triggerDisabled&&r(this.triggerDisabled)&&t.parse(this.triggerDisabled).match(i)||o(s)}))}}function o(){return{create:function(){return new s}}}export{s as FormItemDepsCollector,o as useFormItemDeps};
1
+ import{Path as t}from"@formily/path";import{isFunction as r,isString as e}from"lodash-es";import"../../index.js";import{getAbsoluteKey as i}from"../utils/index.js";import{traverseDependKey as s}from"../utils/schema.js";class o{constructor(){this.triggerDisabled=!1,this.collector=new Map}setDeps(t,r,e){s(r,(r=>{const s=i(r,t),o=this.collector.get(s)||new Map;o.set(t,e),this.collector.set(s,o)}))}trigger(i,s){if(!0===this.triggerDisabled)return;const o=this.collector.get(i.toString());o&&[...o.entries()].forEach((([i,o])=>{!r(o)||this.triggerDisabled&&e(this.triggerDisabled)&&t.parse(this.triggerDisabled).match(i)||o(s)}))}}function c(){return{create:function(){return new o}}}export{o as FormItemDepsCollector,c as useFormItemDeps};
@@ -25,20 +25,23 @@ export declare function useUrlConfigOptions(props: Partial<{
25
25
  labelField: string;
26
26
  valueField: string;
27
27
  showField: string;
28
+ searchField: string[];
28
29
  urlConfig: UrlConfig;
29
30
  options: AnyObject[];
30
31
  requestCache: boolean;
31
32
  lazyRequest: boolean;
32
33
  searchByValue: boolean;
33
34
  }>, valueRef: Ref, hooks?: UseOptionHooks): {
34
- labelKey: import("vue").ComputedRef<string>;
35
+ labelKey: Ref<string>;
35
36
  loading: Ref<boolean>;
36
- showKey: import("vue").ComputedRef<string | undefined>;
37
- valueKey: import("vue").ComputedRef<string>;
37
+ showKey: Ref<string | undefined>;
38
+ valueKey: Ref<string>;
38
39
  remoteOptions: Ref<AnyObject[] | null>;
39
40
  filterOptions: import("vue").ComputedRef<AnyObject[]>;
40
41
  fullOptions: import("vue").ComputedRef<AnyObject[]>;
41
- fetchData: (content?: string, otherParams?: AnyObject) => Promise<null | undefined>;
42
+ fetchData: (content?: string | undefined, otherParams?: AnyObject | undefined, options?: {
43
+ avoidSearchContent?: boolean | undefined;
44
+ }) => Promise<null | undefined>;
42
45
  searchContent: Ref<string | undefined>;
43
46
  };
44
47
  export declare function useAutographOptions(props: Partial<{
@@ -51,14 +54,16 @@ export declare function useAutographOptions(props: Partial<{
51
54
  lazyRequest: boolean;
52
55
  options: AnyObject[];
53
56
  }>, valueRef: Ref, hooks?: UseOptionHooks): {
54
- labelKey: import("vue").ComputedRef<string>;
55
- showKey: import("vue").ComputedRef<string | undefined>;
57
+ labelKey: Ref<string>;
56
58
  loading: Ref<boolean>;
59
+ showKey: Ref<string | undefined>;
60
+ valueKey: Ref<string>;
57
61
  remoteOptions: Ref<AnyObject[] | null>;
58
- valueKey: import("vue").ComputedRef<string>;
59
62
  filterOptions: import("vue").ComputedRef<AnyObject[]>;
60
63
  fullOptions: import("vue").ComputedRef<AnyObject[]>;
61
- fetchData: (content?: string, otherParams?: AnyObject) => Promise<null | undefined>;
64
+ fetchData: (content?: string | undefined, otherParams?: AnyObject | undefined, options?: {
65
+ avoidSearchContent?: boolean | undefined;
66
+ }) => Promise<null | undefined>;
62
67
  searchContent: Ref<string | undefined>;
63
68
  };
64
69
  export {};