cnhis-design-vue 3.1.57-beta.22 → 3.1.57-beta.27

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 (113) hide show
  1. package/README.md +87 -87
  2. package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
  3. package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +1 -0
  4. package/es/components/bpmn-workflow/types/ModelingModule.d.ts +1 -0
  5. package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +1 -0
  6. package/es/components/callback/src/components/render/popupMaps.d.ts +25 -0
  7. package/es/components/classification/src/components/table-modal/index.vue.d.ts +0 -3
  8. package/es/components/classification/src/index.vue.d.ts +3 -3
  9. package/es/components/expand-field/src/components/form.vue2.js +1 -1
  10. package/es/components/fabric-chart/src/constants/index.d.ts +2 -1
  11. package/es/components/fabric-chart/src/constants/index.js +1 -1
  12. package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +1 -1
  13. package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogram.js +1 -1
  14. package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogramChart.js +1 -1
  15. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.js +1 -1
  16. package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
  17. package/es/components/form-config/index.d.ts +34 -0
  18. package/es/components/form-config/src/FormConfig.vue.d.ts +34 -0
  19. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +14 -0
  20. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +17 -0
  21. package/es/components/form-render/index.d.ts +14 -0
  22. package/es/components/form-render/src/FormRender.vue.d.ts +14 -0
  23. package/es/components/form-render/src/FormRender.vue2.js +1 -1
  24. package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +14 -0
  25. package/es/components/form-render/src/components/renderer/select.d.ts +2 -0
  26. package/es/components/form-render/src/components/renderer/select.js +1 -1
  27. package/es/components/form-render/src/hooks/useFieldNormalize.d.ts +2 -0
  28. package/es/components/form-render/src/hooks/useFormRenderOptions.js +1 -1
  29. package/es/components/form-render/src/types/index.d.ts +1 -0
  30. package/es/components/iho-table/index.d.ts +11 -0
  31. package/es/components/iho-table/src/IhoTable.vue.d.ts +11 -0
  32. package/es/components/iho-table/src/IhoTable.vue2.js +1 -1
  33. package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +1 -5
  34. package/es/components/iho-table/src/hooks/tapHooks/index.js +1 -1
  35. package/es/components/iho-table/src/hooks/tapHooks/useDataHooks.d.ts +2 -1
  36. package/es/components/iho-table/src/hooks/tapHooks/useDataHooks.js +1 -1
  37. package/es/components/iho-table/src/plugins/{bindEventSettingPlugin/index.d.ts → bindEventSettingPlugin.d.ts} +1 -1
  38. package/es/components/iho-table/src/plugins/bindEventSettingPlugin.js +1 -0
  39. package/es/components/iho-table/src/plugins/{defaultConfigPlugin/index.d.ts → defaultConfigPlugin.d.ts} +1 -1
  40. package/es/components/iho-table/src/plugins/defaultConfigPlugin.js +1 -0
  41. package/es/components/iho-table/src/plugins/dragScrollPlugin.d.ts +1 -0
  42. package/es/components/iho-table/src/plugins/dragScrollPlugin.js +1 -0
  43. package/es/components/iho-table/src/plugins/headerPlugin.js +1 -1
  44. package/es/components/iho-table/src/plugins/index.js +1 -1
  45. package/es/components/iho-table/src/plugins/{keyboardEventPlugin/index.d.ts → keyboardEventPlugin.d.ts} +1 -1
  46. package/es/components/iho-table/src/plugins/keyboardEventPlugin.js +1 -0
  47. package/es/components/iho-table/src/plugins/{lowCodeFieldAdaptorPlugin/index.d.ts → lowCodeFieldAdaptorPlugin.d.ts} +1 -1
  48. package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin.js +1 -0
  49. package/es/components/iho-table/src/plugins/{operationalFormPlugin/index.d.ts → operationalFormPlugin.d.ts} +1 -1
  50. package/es/components/iho-table/src/plugins/operationalFormPlugin.js +1 -0
  51. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +31 -1
  52. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue2.js +1 -1
  53. package/es/components/iho-table/src/plugins/rowClickPlugin.d.ts +1 -0
  54. package/es/components/iho-table/src/plugins/rowClickPlugin.js +1 -0
  55. package/es/components/iho-table/src/plugins/rowDragPlugin.d.ts +1 -0
  56. package/es/components/iho-table/src/plugins/rowDragPlugin.js +1 -0
  57. package/es/components/iho-table/src/plugins/{varialbleHeightPlugin/index.d.ts → varialbleHeightPlugin.d.ts} +1 -1
  58. package/es/components/iho-table/src/plugins/varialbleHeightPlugin.js +1 -0
  59. package/es/components/iho-table/src/plugins/verticalTablePlugin/index.d.ts +1 -0
  60. package/es/components/iho-table/src/plugins/verticalTablePlugin/index.js +1 -0
  61. package/es/components/iho-table/src/plugins/verticalTablePlugin/renderer.d.ts +3 -0
  62. package/es/components/iho-table/src/plugins/verticalTablePlugin/renderer.js +1 -0
  63. package/es/components/iho-table/src/plugins/verticalTablePlugin/types.d.ts +8 -0
  64. package/es/components/iho-table/src/plugins/verticalTablePlugin/types.js +1 -0
  65. package/es/components/iho-table/src/plugins/verticalTablePlugin/utils.d.ts +15 -0
  66. package/es/components/iho-table/src/plugins/verticalTablePlugin/utils.js +1 -0
  67. package/es/components/iho-table/src/plugins/{virtualTreePlugin/index.d.ts → virtualTreePlugin.d.ts} +1 -1
  68. package/es/components/iho-table/src/plugins/virtualTreePlugin.js +1 -0
  69. package/es/components/iho-table/src/types/index.d.ts +7 -0
  70. package/es/components/iho-table/src/types/pluginType.d.ts +3 -1
  71. package/es/components/info-header/index.d.ts +33 -0
  72. package/es/components/info-header/src/InfoHeader.vue.d.ts +33 -0
  73. package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +1 -0
  74. package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +1 -0
  75. package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +15 -0
  76. package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +14 -0
  77. package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
  78. package/es/components/select-label/src/LabelFormContent.vue2.js +1 -1
  79. package/es/components/select-person/src/SearchMultiple.vue.d.ts +0 -6
  80. package/es/components/shortcut-setter/index.d.ts +14 -0
  81. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +14 -0
  82. package/es/components/table-export-field/src/components/ExportModal.vue.d.ts +3 -0
  83. package/es/env.d.ts +25 -25
  84. package/es/shared/assets/img/failure.png.js +1 -1
  85. package/es/shared/assets/img/no-permission.png.js +1 -1
  86. package/es/shared/assets/img/nodata.png.js +1 -1
  87. package/es/shared/assets/img/notfound.png.js +1 -1
  88. package/es/shared/assets/img/qr.png.js +1 -1
  89. package/es/shared/assets/img/success.png.js +1 -1
  90. package/es/shared/assets/img/video.png.js +1 -1
  91. package/es/shared/assets/img/video_default_cover.png.js +1 -1
  92. package/es/shared/assets/img/xb_big.png.js +1 -1
  93. package/es/shared/assets/img/xb_small.png.js +1 -1
  94. package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +86 -0
  95. package/es/shared/hooks/selectHooks/useOptionFiltered.d.ts +3 -1
  96. package/es/shared/hooks/selectHooks/useOptionFiltered.js +1 -1
  97. package/es/shared/hooks/selectHooks/useSearchContent.d.ts +1 -1
  98. package/es/shared/hooks/selectHooks/useSearchContent.js +1 -1
  99. package/es/shared/package.json.js +1 -1
  100. package/es/shared/utils/fabricjs/index.d.ts +6823 -0
  101. package/es/shared/utils/tapable/index.d.ts +139 -0
  102. package/package.json +2 -2
  103. package/es/components/iho-table/src/plugins/bindEventSettingPlugin/index.js +0 -1
  104. package/es/components/iho-table/src/plugins/defaultConfigPlugin/index.js +0 -1
  105. package/es/components/iho-table/src/plugins/keyboardEventPlugin/index.js +0 -1
  106. package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index.js +0 -1
  107. package/es/components/iho-table/src/plugins/operationalFormPlugin/index.js +0 -1
  108. package/es/components/iho-table/src/plugins/rowClickPlugin/index.d.ts +0 -1
  109. package/es/components/iho-table/src/plugins/rowClickPlugin/index.js +0 -1
  110. package/es/components/iho-table/src/plugins/rowDragPlugin/index.d.ts +0 -1
  111. package/es/components/iho-table/src/plugins/rowDragPlugin/index.js +0 -1
  112. package/es/components/iho-table/src/plugins/varialbleHeightPlugin/index.js +0 -1
  113. package/es/components/iho-table/src/plugins/virtualTreePlugin/index.js +0 -1
@@ -170,6 +170,10 @@ declare const _default: import("vue").DefineComponent<{}, {
170
170
  default: boolean;
171
171
  };
172
172
  forceClearable: BooleanConstructor;
173
+ wordSplitFilter: {
174
+ type: BooleanConstructor;
175
+ default: boolean;
176
+ };
173
177
  }, {
174
178
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
175
179
  fieldList: {
@@ -335,6 +339,10 @@ declare const _default: import("vue").DefineComponent<{}, {
335
339
  default: boolean;
336
340
  };
337
341
  forceClearable: BooleanConstructor;
342
+ wordSplitFilter: {
343
+ type: BooleanConstructor;
344
+ default: boolean;
345
+ };
338
346
  }>> & {
339
347
  onFormChange?: ((...args: any[]) => any) | undefined;
340
348
  onScroll?: ((...args: any[]) => any) | undefined;
@@ -499,6 +507,7 @@ declare const _default: import("vue").DefineComponent<{}, {
499
507
  operationalForm: import("../../../shared/types").LowCodeTypes.operationalConfig[];
500
508
  outBordered: boolean;
501
509
  forceClearable: boolean;
510
+ wordSplitFilter: boolean;
502
511
  }>) => Record<string, import("@formily/json-schema").Stringify<{
503
512
  [key: symbol]: any;
504
513
  [key: `x-${string}`]: any;
@@ -840,6 +849,10 @@ declare const _default: import("vue").DefineComponent<{}, {
840
849
  default: boolean;
841
850
  };
842
851
  forceClearable: BooleanConstructor;
852
+ wordSplitFilter: {
853
+ type: BooleanConstructor;
854
+ default: boolean;
855
+ };
843
856
  }>> & {
844
857
  onFormChange?: ((...args: any[]) => any) | undefined;
845
858
  onScroll?: ((...args: any[]) => any) | undefined;
@@ -859,6 +872,7 @@ declare const _default: import("vue").DefineComponent<{}, {
859
872
  uniqueCacheData: boolean;
860
873
  outBordered: boolean;
861
874
  forceClearable: boolean;
875
+ wordSplitFilter: boolean;
862
876
  operationalFormInit: boolean;
863
877
  }>;
864
878
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
@@ -112,6 +112,7 @@ export declare const SELECT: import("vue").DefineComponent<{
112
112
  searchByValue: {
113
113
  type: BooleanConstructor;
114
114
  };
115
+ wordSplitFilter: {};
115
116
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:value" | "postRecommend")[], "update:value" | "postRecommend", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
116
117
  value: {
117
118
  type: PropType<ArrayAble<string | number> | null>;
@@ -221,6 +222,7 @@ export declare const SELECT: import("vue").DefineComponent<{
221
222
  searchByValue: {
222
223
  type: BooleanConstructor;
223
224
  };
225
+ wordSplitFilter: {};
224
226
  }>> & {
225
227
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
226
228
  onPostRecommend?: ((...args: any[]) => any) | undefined;
@@ -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 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
+ 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 w,createVisitedSetter as A}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},wordSplitFilter:{}},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:w,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:w,valueKey:x,valueRef:F,fullOptions:_}),{renderComplexOption:M,hasComplexOption:T}=k(e,F),{getRecommend:U,postRecommend:D,sortedOptions:G}=R(e,N,b,w,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:w,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=A(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:w.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:w.value,childFieldStrategy:"checked",renderLabel:!1,attrs:{class:"form-render__selectChildFieldItem",style:{"--form-item-column":l}}})))])}}}),b({dataSource:"options"},F,w));export{x as SELECT};
@@ -95,6 +95,7 @@ export declare function useFieldNormalize(): {
95
95
  operationalForm: import("../../../../shared/types").LowCodeTypes.operationalConfig[];
96
96
  outBordered: boolean;
97
97
  forceClearable: boolean;
98
+ wordSplitFilter: boolean;
98
99
  }>], import("../../../../shared/utils/tapable").UnsetAdditionalOptions>;
99
100
  FieldListNormalizeWaterfallHook: SyncWaterfallHook<[FieldItem[], Partial<{
100
101
  fieldList: FieldItem[];
@@ -190,5 +191,6 @@ export declare function useFieldNormalize(): {
190
191
  operationalForm: import("../../../../shared/types").LowCodeTypes.operationalConfig[];
191
192
  outBordered: boolean;
192
193
  forceClearable: boolean;
194
+ wordSplitFilter: boolean;
193
195
  }>], import("../../../../shared/utils/tapable").UnsetAdditionalOptions>;
194
196
  };
@@ -1 +1 @@
1
- import{arrayed as e,checkInSetupEnv as l,jsonParse as n}from"../../../../shared/utils/index.js";import{uniqBy as o,isString as r,isEqual as t,omit as u,isFunction as a}from"lodash-es";import"naive-ui";import{computed as s,inject as i,ref as c,watch as v,toRaw as d}from"vue";import"@vueuse/core";import"date-fns";import{useFormRequest as m}from"../../../../shared/hooks/useFormRequest/index.js";import"@vueuse/shared";import{useOptionFiltered as f}from"../../../../shared/hooks/selectHooks/useOptionFiltered.js";import{useSearchContent as y}from"../../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import"../../index.js";import{InjectionAsyncQueue as p,InjectionFormLifeCycleCaller as h,InjectionFormItemDepsCollector as g}from"../constants/index.js";import{useFormField as K}from"./useFormField.js";import{traverseDependKey as k}from"../utils/schema.js";import{getAbsoluteKey as w,formRenderLog as C}from"../utils/index.js";function b(e,l){const n=c();return s({get:()=>n.value?n.value:e[l],set(e){n.value=e}})}function R(e,l,r,t,c){const v=b(e,"commonList"),d=b(e,"recentList"),{searchContent:f,optionSearchFilter:h}=y();function g(e){return n(e.itemObj)}const k=s((()=>{var e,l;return null!=(l=null==(e=v.value)?void 0:e.map(g))?l:[]})),w=s((()=>{var e,l;return null!=(l=null==(e=d.value)?void 0:e.map(g))?l:[]})),C=s((()=>{if(!e.recommend||!k.value.length&&!w.value.length)return l.value;const n=o(k.value.concat(w.value),(e=>e[c.value])),r=l.value.filter((e=>n.every((function(l){return l[c.value]!==e[c.value]}))));return[...h(n,t.value),...r]})),{getRecommendRequestInfo:R,getHttpInstance:O}=m();function j(l){const{url:n,getRecommendIds:o}=R(),r=a(o)?o():{},t=a(e.getRecommendInfo)?e.getRecommendInfo():{};return{url:n[l],info:Object.assign({},r,t)}}const{fieldKey:F,field:q}=K(),I=i(p);return{postRecommend:async function(l){if(!e.recommend)return;const n=O();if(!n)return;const{url:o,info:t}=j("post"),u=C.value.find((e=>e[c.value]===l));u&&r("postRecommend",await n.post(o,{...t,keyword:"",itemId:c.value,itemObj:JSON.stringify(u)}))},getRecommend:async function(l){if(!e.recommend)return;if(f.value=l,v.value&&d.value&&e.recommendCache)return;const n=await I.addAsync(function(l,n){const{url:o,info:r}=j("get");return{url:o,method:"get",key:l,cache:n,params:{...r,recNum:Math.max(e.commonNum,e.recentNum),keyword:""},payload:{field:q.value,labelKey:t.value,valueKey:c.value}}}(F.value,e.recommendCache)),{commonly:o,recently:r}=n.reduce(((e,l)=>("commonly"===l.type?e.commonly.push(u(l,["type"])):"recently"===l.type&&e.recently.push(u(l,["type"])),e)),{commonly:[],recently:[]});v.value=o.slice(0,e.commonNum),d.value=r.slice(0,e.recentNum)},sortedOptions:C}}function O(e,l,n){const o=s((()=>{var l,n,o;return null!=(o=null!=(n=null==(l=e.urlConfig)?void 0:l.nameKey)?n:e.labelField)?o:"text"})),r=s((()=>{var l,n,o;return null!=(o=null!=(n=null==(l=e.urlConfig)?void 0:l.valueKey)?n:e.valueField)?o:"value"})),t=s((()=>{var l,n;return null!=(n=null==(l=e.urlConfig)?void 0:l.showKey)?n:e.showField})),u=s((()=>{var l,n;return null!=(n=null==(l=e.urlConfig)?void 0:l.searchKey)?n:e.searchField})),{field:a}=K();return q({props:e,labelKey:o,valueKey:r,searchKey:u,showKey:t,hooks:n,valueRef:l,getConfig:()=>e.urlConfig,getParams:()=>{var l,n;const o=F(a.value,null==(l=e.urlConfig)?void 0:l.params,null==(n=e.urlConfig)?void 0:n.dependKey);return{...e.urlConfig,params:o}},getDependKeys:()=>{var l;return null==(l=e.urlConfig)?void 0:l.dependKey}})}function j(l,n,o){const t=s((()=>{var n;const o=e(null==(n=l.wordbook)?void 0:n.show_key)[0];return r(o)?o:null})),u=s((()=>{var e,n,o,u;const a=null==(n=null==(e=l.wordbook)?void 0:e.render_key)?void 0:n[0];return r(a)?a:null!=(u=null!=(o=t.value)?o:l.labelField)?u:"text"})),a=s((()=>{var e,n,o;return null!=(o=null!=(n=null==(e=l.wordbook)?void 0:e.value_key)?n:l.valueField)?o:"value"})),i=s((()=>{var e;return(null==(e=l.wordbook)?void 0:e.search_key)||[]})),c=s((()=>{var e;return null!=(e=t.value)?e:l.showField})),{field:v}=K(),{getSearchRequestInfo:d}=m();return q({props:l,labelKey:u,valueKey:a,searchKey:i,showKey:c,hooks:o,valueRef:n,getConfig:()=>l.wordbook,getParams:()=>{const{wordbook:e,autograph:n}=l,o=F(v.value,{autograph:n,wordbookId:e.id,wordbookType:e.type,fieldKeys:e.search_key,keyword:"",page:1},e.queryParams);return{...d(),params:o}},getDependKeys:()=>{var e;return null==(e=l.wordbook)?void 0:e.queryParams}})}function F(e,l,n){const o={...l};return n&&k(n,((l,n,r)=>{const t=w(l,e.path),u=e.form.getValuesIn(t);if((null==r?void 0:r.required)&&null==u)throw`缺少必须的参数=>${t}`;o[n]=u})),o}function q({labelKey:e,valueKey:n,searchKey:o,showKey:u,props:a,getConfig:s,getParams:m,getDependKeys:y,hooks:k,valueRef:w}){l();const b=i(p),R=i(h),{remoteOptions:O,filterOptions:j,fullOptions:F,searchContent:q}=f(a,{labelKey:e,valueKey:n,searchKey:o}),{field:I,fieldKey:x}=K(),D=c(!1),N=async function(l,o,t={avoidSearchContent:!0}){if(q.value=l,!s())return O.value=null;if(!t.avoidSearchContent||null==q.value)try{D.value=!0;const l={field:I.value,labelKey:e.value,valueKey:n.value},r={params:{...m().params,...o},key:x.value,cache:a.requestCache,payload:l},t=await b.addAsync(Object.assign({},m(),r));d(O.value)!==t&&(O.value=t,R("afterOptionInit",[x.value,O.value,l]))}catch(e){r(e)&&C(e)}finally{D.value=!1}},S=i(g);return v(s,((l,o)=>{if(t(l,o))return;if(O.value=null,!l)return O.value=null;const r={fetchData:N,labelKey:e.value,valueKey:n.value},{onRequestConfigChange:u,onDepsChange:s}=k||{};S.setDeps(I.value.path,y()||[],(async e=>{O.value=null,(null==e?void 0:e.keepValue)||(w.value=null),a.lazyRequest||(s?s(r):N())})),!w.value&&a.lazyRequest||(u?u(r):N())}),{immediate:!0}),{labelKey:e,loading:D,showKey:u,valueKey:n,remoteOptions:O,filterOptions:j,fullOptions:F,fetchData:N,searchContent:q}}export{j as useAutographOptions,R as useRecommendOptions,O as useUrlConfigOptions};
1
+ import{arrayed as e,checkInSetupEnv as l,jsonParse as n}from"../../../../shared/utils/index.js";import{uniqBy as o,isString as r,isEqual as t,omit as u,isFunction as a}from"lodash-es";import"naive-ui";import{computed as i,inject as s,ref as c,watch as v,toRaw as d}from"vue";import"@vueuse/core";import"date-fns";import{useFormRequest as m}from"../../../../shared/hooks/useFormRequest/index.js";import"@vueuse/shared";import{useOptionFiltered as f}from"../../../../shared/hooks/selectHooks/useOptionFiltered.js";import{useSearchContent as y}from"../../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import"../../index.js";import{InjectionAsyncQueue as p,InjectionFormLifeCycleCaller as h,InjectionFormGlobalProps as g,InjectionFormItemDepsCollector as K}from"../constants/index.js";import{useFormField as k}from"./useFormField.js";import{traverseDependKey as w}from"../utils/schema.js";import{getAbsoluteKey as C,formRenderLog as b}from"../utils/index.js";function R(e,l){const n=c();return i({get:()=>n.value?n.value:e[l],set(e){n.value=e}})}function F(e,l,r,t,c){const v=R(e,"commonList"),d=R(e,"recentList"),{searchContent:f,optionSearchFilter:h}=y();function g(e){return n(e.itemObj)}const K=i((()=>{var e,l;return null!=(l=null==(e=v.value)?void 0:e.map(g))?l:[]})),w=i((()=>{var e,l;return null!=(l=null==(e=d.value)?void 0:e.map(g))?l:[]})),C=i((()=>{if(!e.recommend||!K.value.length&&!w.value.length)return l.value;const n=o(K.value.concat(w.value),(e=>e[c.value])),r=l.value.filter((e=>n.every((function(l){return l[c.value]!==e[c.value]}))));return[...h(n,t.value),...r]})),{getRecommendRequestInfo:b,getHttpInstance:F}=m();function O(l){const{url:n,getRecommendIds:o}=b(),r=a(o)?o():{},t=a(e.getRecommendInfo)?e.getRecommendInfo():{};return{url:n[l],info:Object.assign({},r,t)}}const{fieldKey:j,field:q}=k(),I=s(p);return{postRecommend:async function(l){if(!e.recommend)return;const n=F();if(!n)return;const{url:o,info:t}=O("post"),u=C.value.find((e=>e[c.value]===l));u&&r("postRecommend",await n.post(o,{...t,keyword:"",itemId:c.value,itemObj:JSON.stringify(u)}))},getRecommend:async function(l){if(!e.recommend)return;if(f.value=l,v.value&&d.value&&e.recommendCache)return;const n=await I.addAsync(function(l,n){const{url:o,info:r}=O("get");return{url:o,method:"get",key:l,cache:n,params:{...r,recNum:Math.max(e.commonNum,e.recentNum),keyword:""},payload:{field:q.value,labelKey:t.value,valueKey:c.value}}}(j.value,e.recommendCache)),{commonly:o,recently:r}=n.reduce(((e,l)=>("commonly"===l.type?e.commonly.push(u(l,["type"])):"recently"===l.type&&e.recently.push(u(l,["type"])),e)),{commonly:[],recently:[]});v.value=o.slice(0,e.commonNum),d.value=r.slice(0,e.recentNum)},sortedOptions:C}}function O(e,l,n){const o=i((()=>{var l,n,o;return null!=(o=null!=(n=null==(l=e.urlConfig)?void 0:l.nameKey)?n:e.labelField)?o:"text"})),r=i((()=>{var l,n,o;return null!=(o=null!=(n=null==(l=e.urlConfig)?void 0:l.valueKey)?n:e.valueField)?o:"value"})),t=i((()=>{var l,n;return null!=(n=null==(l=e.urlConfig)?void 0:l.showKey)?n:e.showField})),u=i((()=>{var l,n;return null!=(n=null==(l=e.urlConfig)?void 0:l.searchKey)?n:e.searchField})),{field:a}=k();return I({props:e,labelKey:o,valueKey:r,searchKey:u,showKey:t,hooks:n,valueRef:l,getConfig:()=>e.urlConfig,getParams:()=>{var l,n;const o=q(a.value,null==(l=e.urlConfig)?void 0:l.params,null==(n=e.urlConfig)?void 0:n.dependKey);return{...e.urlConfig,params:o}},getDependKeys:()=>{var l;return null==(l=e.urlConfig)?void 0:l.dependKey}})}function j(l,n,o){const t=i((()=>{var n;const o=e(null==(n=l.wordbook)?void 0:n.show_key)[0];return r(o)?o:null})),u=i((()=>{var e,n,o,u;const a=null==(n=null==(e=l.wordbook)?void 0:e.render_key)?void 0:n[0];return r(a)?a:null!=(u=null!=(o=t.value)?o:l.labelField)?u:"text"})),a=i((()=>{var e,n,o;return null!=(o=null!=(n=null==(e=l.wordbook)?void 0:e.value_key)?n:l.valueField)?o:"value"})),s=i((()=>{var e;return(null==(e=l.wordbook)?void 0:e.search_key)||[]})),c=i((()=>{var e;return null!=(e=t.value)?e:l.showField})),{field:v}=k(),{getSearchRequestInfo:d}=m();return I({props:l,labelKey:u,valueKey:a,searchKey:s,showKey:c,hooks:o,valueRef:n,getConfig:()=>l.wordbook,getParams:()=>{const{wordbook:e,autograph:n}=l,o=q(v.value,{autograph:n,wordbookId:e.id,wordbookType:e.type,fieldKeys:e.search_key,keyword:"",page:1},e.queryParams);return{...d(),params:o}},getDependKeys:()=>{var e;return null==(e=l.wordbook)?void 0:e.queryParams}})}function q(e,l,n){const o={...l};return n&&w(n,((l,n,r)=>{const t=C(l,e.path),u=e.form.getValuesIn(t);if((null==r?void 0:r.required)&&null==u)throw`缺少必须的参数=>${t}`;o[n]=u})),o}function I({labelKey:e,valueKey:n,searchKey:o,showKey:u,props:a,getConfig:m,getParams:y,getDependKeys:w,hooks:C,valueRef:R}){l();const F=s(p),O=s(h),j=s(g),{remoteOptions:q,filterOptions:I,fullOptions:x,searchContent:S}=f(a,{labelKey:e,valueKey:n,searchKey:o,wordSplitFilter:i((()=>{var e;return null!=(e=a.wordSplitFilter)?e:j.wordSplitFilter}))}),{field:D,fieldKey:N}=k(),P=c(!1),_=async function(l,o,t={avoidSearchContent:!0}){if(S.value=l,!m())return q.value=null;if(!t.avoidSearchContent||null==S.value)try{P.value=!0;const l={field:D.value,labelKey:e.value,valueKey:n.value},r={params:{...y().params,...o},key:N.value,cache:a.requestCache,payload:l},t=await F.addAsync(Object.assign({},y(),r));d(q.value)!==t&&(q.value=t,O("afterOptionInit",[N.value,q.value,l]))}catch(e){r(e)&&b(e)}finally{P.value=!1}},H=s(K);return v(m,((l,o)=>{if(t(l,o))return;if(q.value=null,!l)return q.value=null;const r={fetchData:_,labelKey:e.value,valueKey:n.value},{onRequestConfigChange:u,onDepsChange:i}=C||{};H.setDeps(D.value.path,w()||[],(async e=>{q.value=null,(null==e?void 0:e.keepValue)||(R.value=null),a.lazyRequest||(i?i(r):_())})),!R.value&&a.lazyRequest||(u?u(r):_())}),{immediate:!0}),{labelKey:e,loading:P,showKey:u,valueKey:n,remoteOptions:q,filterOptions:I,fullOptions:x,fetchData:_,searchContent:S}}export{j as useAutographOptions,F as useRecommendOptions,O as useUrlConfigOptions};
@@ -150,6 +150,7 @@ export declare type FormRenderProps = Partial<{
150
150
  operationalForm: LowCodeTypes.operationalConfig[];
151
151
  outBordered: boolean;
152
152
  forceClearable: boolean;
153
+ wordSplitFilter: boolean;
153
154
  }>;
154
155
  export declare type FormBusinessFormatter = (payload: {
155
156
  fieldKey: string;
@@ -2148,6 +2148,7 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
2148
2148
  isTree?: import("../../shared/types").MaybeString<0 | 2 | 1 | 3> | undefined;
2149
2149
  isBatchSelect?: import("../../shared/types").MaybeString<0 | 1> | undefined;
2150
2150
  isSingleSelect?: import("../../shared/types").MaybeString<0 | 1> | undefined;
2151
+ dragScroll?: boolean | undefined;
2151
2152
  selectType?: "checkbox" | "radio" | null | undefined;
2152
2153
  rowDraggable?: boolean | undefined;
2153
2154
  showSeq?: boolean | undefined;
@@ -2234,10 +2235,14 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
2234
2235
  startDateField: string;
2235
2236
  endDateField: string;
2236
2237
  }[] | undefined;
2238
+ verticalConfig?: {
2239
+ enable?: boolean | undefined;
2240
+ } | undefined;
2237
2241
  }>;
2238
2242
  updateConfigRefDebounced: () => void;
2239
2243
  updateConfigRef: () => void;
2240
2244
  fieldListRef: import("vue").Ref<{
2245
+ [x: string]: any;
2241
2246
  property?: string | undefined;
2242
2247
  type?: import("vxe-table").VxeColumnPropTypes.Type | undefined;
2243
2248
  field?: string | undefined;
@@ -2535,6 +2540,8 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
2535
2540
  getTitle?: (() => string) | undefined;
2536
2541
  getKey?: (() => string) | undefined;
2537
2542
  annotation?: boolean | undefined;
2543
+ depth?: number | undefined;
2544
+ parent?: any | undefined;
2538
2545
  }[]>;
2539
2546
  updateFieldListRefDebounced: () => void;
2540
2547
  updateFieldListRef: () => void;
@@ -4605,6 +4612,7 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
4605
4612
  isTree?: import("../../shared/types").MaybeString<0 | 2 | 1 | 3> | undefined;
4606
4613
  isBatchSelect?: import("../../shared/types").MaybeString<0 | 1> | undefined;
4607
4614
  isSingleSelect?: import("../../shared/types").MaybeString<0 | 1> | undefined;
4615
+ dragScroll?: boolean | undefined;
4608
4616
  selectType?: "checkbox" | "radio" | null | undefined;
4609
4617
  rowDraggable?: boolean | undefined;
4610
4618
  showSeq?: boolean | undefined;
@@ -4691,6 +4699,9 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
4691
4699
  startDateField: string;
4692
4700
  endDateField: string;
4693
4701
  }[] | undefined;
4702
+ verticalConfig?: {
4703
+ enable?: boolean | undefined;
4704
+ } | undefined;
4694
4705
  }>;
4695
4706
  configChanged: boolean;
4696
4707
  fieldChanged: boolean;
@@ -2149,6 +2149,7 @@ declare const _default: import("vue").DefineComponent<{
2149
2149
  isTree?: import("../../../shared/types").MaybeString<0 | 2 | 1 | 3> | undefined;
2150
2150
  isBatchSelect?: import("../../../shared/types").MaybeString<0 | 1> | undefined;
2151
2151
  isSingleSelect?: import("../../../shared/types").MaybeString<0 | 1> | undefined;
2152
+ dragScroll?: boolean | undefined;
2152
2153
  selectType?: "checkbox" | "radio" | null | undefined;
2153
2154
  rowDraggable?: boolean | undefined;
2154
2155
  showSeq?: boolean | undefined;
@@ -2235,10 +2236,14 @@ declare const _default: import("vue").DefineComponent<{
2235
2236
  startDateField: string;
2236
2237
  endDateField: string;
2237
2238
  }[] | undefined;
2239
+ verticalConfig?: {
2240
+ enable?: boolean | undefined;
2241
+ } | undefined;
2238
2242
  }>;
2239
2243
  updateConfigRefDebounced: () => void;
2240
2244
  updateConfigRef: () => void;
2241
2245
  fieldListRef: import("vue").Ref<{
2246
+ [x: string]: any;
2242
2247
  property?: string | undefined;
2243
2248
  type?: import("vxe-table").VxeColumnPropTypes.Type | undefined;
2244
2249
  field?: string | undefined;
@@ -2536,6 +2541,8 @@ declare const _default: import("vue").DefineComponent<{
2536
2541
  getTitle?: (() => string) | undefined;
2537
2542
  getKey?: (() => string) | undefined;
2538
2543
  annotation?: boolean | undefined;
2544
+ depth?: number | undefined;
2545
+ parent?: any | undefined;
2539
2546
  }[]>;
2540
2547
  updateFieldListRefDebounced: () => void;
2541
2548
  updateFieldListRef: () => void;
@@ -4606,6 +4613,7 @@ declare const _default: import("vue").DefineComponent<{
4606
4613
  isTree?: import("../../../shared/types").MaybeString<0 | 2 | 1 | 3> | undefined;
4607
4614
  isBatchSelect?: import("../../../shared/types").MaybeString<0 | 1> | undefined;
4608
4615
  isSingleSelect?: import("../../../shared/types").MaybeString<0 | 1> | undefined;
4616
+ dragScroll?: boolean | undefined;
4609
4617
  selectType?: "checkbox" | "radio" | null | undefined;
4610
4618
  rowDraggable?: boolean | undefined;
4611
4619
  showSeq?: boolean | undefined;
@@ -4692,6 +4700,9 @@ declare const _default: import("vue").DefineComponent<{
4692
4700
  startDateField: string;
4693
4701
  endDateField: string;
4694
4702
  }[] | undefined;
4703
+ verticalConfig?: {
4704
+ enable?: boolean | undefined;
4705
+ } | undefined;
4695
4706
  }>;
4696
4707
  configChanged: boolean;
4697
4708
  fieldChanged: boolean;
@@ -1 +1 @@
1
- import{defineComponent as e,computed as t,provide as o,ref as a,toRaw as l,watch as n,resolveComponent as s,openBlock as r,createElementBlock as i,mergeProps as u,unref as c,createBlock as d,resolveDynamicComponent as f,createElementVNode as m,normalizeStyle as v,createVNode as p,createSlots as h,renderList as b,withCtx as g,createCommentVNode as x,renderSlot as k,normalizeProps as y,guardReactiveProps as D}from"vue";import{useTheme as C}from"../../../shared/hooks/useTheme.js";import{useDebounceFn as j}from"@vueuse/core";import"date-fns";import{isString as $,isEqualWith as I,isFunction as w,pick as q}from"lodash-es";import{useFormAsyncQueue as R,presetRequestHandler as H}from"../../../shared/hooks/useFormRequest/index.js";import{promiseTimeout as T}from"@vueuse/shared";import{widthAppend as _,uuidGenerator as A}from"../../../shared/utils/index.js";import"../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import"naive-ui";import{useVersion as L}from"../../../shared/hooks/useVersion.js";import{VxeTableEventNameList as S,InjectionIhoTableEmits as F,InjectionTableAsyncQueue as O,InjectionIhoTableAnnotation as B,InjectionIhoTableUUID as E,InjectionIhoTableInstance as N,InjectionIhoTableConfig as V,InjectionIhoTableFieldList as W,InjectionIhoTableHandler as z}from"./constants/index.js";import{createTableHooks as G,applyTableConfigHooks as J,applyTableFieldHooks as K,createTableEventHandlers as M,createDomInsertComponent as P,createDataTransfer as Q}from"./hooks/tapHooks/index.js";import{provideIhoTableEventListener as U}from"./hooks/tapHooks/useEventHooks.js";import{eventName2EventListener as X}from"./utils/index.js";const Y=["id"];var Z=e({__name:"IhoTable",props:{tableConfig:{type:Object,default:()=>({})},fieldList:{type:Array,default:()=>[]},tableData:{type:Array,default:()=>[]},annotation:{type:Object},requestInstance:{type:Object},uniqueCacheData:{type:Boolean,default:!1},parallelism:{type:Number,default:3}},emits:["formChange","settingClick","formClick","keyboard","rowDrag",...S],setup(e,{expose:S,emit:Z}){var ee,te;const oe=e,ae=C({"--c-border-color":"#d0d0d0","--c-head-bg-color":"#f2f2f2","--c-hover-color":"#e6e6e6","--c-stripe-color":"#f6f6f6"}),le=t((()=>{var e,t;const o=null!=(t=null==(e=oe.tableConfig)?void 0:e.height)?t:"100%";return{height:"auto"===o?"100%":$(o)&&(o.includes("calc")||o.endsWith("%"))?o:_(o)}})),ne=U(),se=function(e,...t){Z(e,...t);const o=c(de)[X(e)];w(o)&&o(...t),ne.trigger(e,...t)};o(F,se);const re=R(t((()=>oe.requestInstance)),t((()=>!!oe.uniqueCacheData))).create(oe.parallelism,{beforeRequest:(e,t)=>t,afterRequest:(e,t)=>H(t)});o(O,re);const ie=G();o(B,t((()=>oe.annotation)));const ue=A();o(E,ue);const ce=a();o(N,ce);const de=a({uuid:null!=(te=null==(ee=oe.tableConfig)?void 0:ee.uuid)?te:ue});o(V,de);const fe=j(me,10);function me(){de.value=J(ie,oe.tableConfig,{$table:ce,emits:se}),de.value.uuid=ue}const ve=a([]);o(W,ve);const pe=j(he,10);function he(){const e=K(ie,oe.fieldList,de.value,{$table:ce,emits:se});I(e,l(ve.value),((e,t)=>{if(w(e)&&w(t))return e.toString()===t.toString()}))||(ve.value=e)}const be=Q(ie,de,ce),ge=a([]);async function xe(){var e,t;const o=await be(oe.tableData),a=null==(e=ce.value)?void 0:e.getTableData().fullData;if(a){let e=0;if(!(a.some((t=>{var a;if(!(null==(a=ce.value)?void 0:a.isInsertByRow(t))){if(t!==o[e])return!0;e++}}))||e!==o.length))return}ge.value=o,null==(t=ce.value)||t.recalculate(!0)}const ke={updateTableDataRef:j(xe,10),updateConfigRef:fe,updateFieldListRef:pe};o(z,ke);const ye=M({hooks:ie,config:de,$table:ce,context:ke,emits:se}),De=t((()=>({...de.value,...ye})));let Ce=!1,je=!1,$e=!1;const Ie=j((()=>{Ce&&me(),je&&he(),$e&&xe(),Ce=!1,je=!1,$e=!1}),10);n((()=>oe.tableConfig),(()=>{Ce=!0,je=!0,$e=!0,Ie()}),{deep:!0}),n((()=>oe.fieldList),(()=>{je=!0,$e=!0,Ie()}),{deep:!0}),n([()=>[...oe.tableData],()=>{var e;return null==(e=oe.tableData)?void 0:e.length}],(()=>{$e=!0,Ie()})),n([()=>oe.tableData,()=>{var e;return null==(e=oe.tableData)?void 0:e.length}],(async()=>{var e,t;(null==(e=de.value.treeConfig)?void 0:e.expandAll)&&(await T(11),null==(t=ce.value)||t.setAllTreeExpand(!0))})),me(),he(),xe();const{header:we,footer:qe}=P(ie);function Re(e){return q(e,["row","rowIndex","$rowIndex","column","columnIndex","$columnIndex","_columnIndex","checked","disabled","indeterminate"])}return S({$table:ce,async loadData(e){var t;null==(t=ce.value)||t.loadData(await be(e))},setSort:(e,t)=>({field:e,value:t}),setFilter:(e,t)=>({field:e,value:t}),reload(){var e,t;null==(e=ce.value)||e.loadColumn([]),null==(t=ce.value)||t.loadData([]),me(),he(),xe()},...ie.exposeHooks.expose.call({},de,{$table:ce,emits:se})}),ie.setupHooks.setup.call(de,ve,{$table:ce,emits:se}),(e,t)=>{const o=s("vxe-grid");return r(),i("section",u({class:"iho-table",id:c(ue),style:c(ae)},c(L)()),[(r(),d(f(c(we)))),m("section",{style:v(c(le))},[p(o,u({ref_key:"$table",ref:ce},c(De),{columns:ve.value,data:ge.value}),h({_:2},[b(e.$slots,((t,o)=>({name:o,fn:g((t=>[x(" 实际上所有的vxe-grid插槽都支持 "),k(e.$slots,o,y(D(Re(t))))]))})))]),1040,["columns","data"])],4),(r(),d(f(c(qe))))],16,Y)}}});export{Z as default};
1
+ import{defineComponent as e,computed as t,provide as o,ref as a,toRaw as l,watch as n,resolveComponent as s,openBlock as r,createElementBlock as i,mergeProps as u,unref as d,createBlock as c,resolveDynamicComponent as f,createElementVNode as m,normalizeStyle as p,createVNode as v,createSlots as b,renderList as h,withCtx as g,createCommentVNode as x,renderSlot as k,normalizeProps as y,guardReactiveProps as C}from"vue";import{useTheme as D}from"../../../shared/hooks/useTheme.js";import{useDebounceFn as j}from"@vueuse/core";import"date-fns";import{isString as $,isEqualWith as I,isFunction as w,pick as q}from"lodash-es";import{useFormAsyncQueue as R,presetRequestHandler as H}from"../../../shared/hooks/useFormRequest/index.js";import{promiseTimeout as T}from"@vueuse/shared";import{widthAppend as _,uuidGenerator as A}from"../../../shared/utils/index.js";import"../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import"naive-ui";import{useVersion as L}from"../../../shared/hooks/useVersion.js";import{VxeTableEventNameList as S,InjectionIhoTableEmits as F,InjectionTableAsyncQueue as O,InjectionIhoTableAnnotation as B,InjectionIhoTableUUID as E,InjectionIhoTableInstance as P,InjectionIhoTableConfig as N,InjectionIhoTableFieldList as V,InjectionIhoTableHandler as W}from"./constants/index.js";import{createTableHooks as z,applyTableConfigHooks as G,applyTableFieldHooks as J,createTableEventHandlers as K,createDomInsertComponent as M,createDataTransfer as Q}from"./hooks/tapHooks/index.js";import{provideIhoTableEventListener as U}from"./hooks/tapHooks/useEventHooks.js";import{eventName2EventListener as X}from"./utils/index.js";const Y=["id"];var Z=e({__name:"IhoTable",props:{tableConfig:{type:Object,default:()=>({})},fieldList:{type:Array,default:()=>[]},tableData:{type:Array,default:()=>[]},annotation:{type:Object},requestInstance:{type:Object},uniqueCacheData:{type:Boolean,default:!1},parallelism:{type:Number,default:3}},emits:["formChange","settingClick","formClick","keyboard","rowDrag",...S],setup(e,{expose:S,emit:Z}){var ee,te;const oe=e,ae=D({"--c-border-color":"#d0d0d0","--c-head-bg-color":"#f2f2f2","--c-hover-color":"#e6e6e6","--c-stripe-color":"#f6f6f6"}),le=t((()=>{var e,t;const o=null!=(t=null==(e=oe.tableConfig)?void 0:e.height)?t:"100%";return{height:"auto"===o?"100%":$(o)&&(o.includes("calc")||o.endsWith("%"))?o:_(o)}})),ne=U(),se=function(e,...t){Z(e,...t);const o=d(ce)[X(e)];w(o)&&o(...t),ne.trigger(e,...t)};o(F,se);const re=R(t((()=>oe.requestInstance)),t((()=>!!oe.uniqueCacheData))).create(oe.parallelism,{beforeRequest:(e,t)=>t,afterRequest:(e,t)=>H(t)});o(O,re);const ie=z();o(B,t((()=>oe.annotation)));const ue=A();o(E,ue);const de=a();o(P,de);const ce=a({uuid:null!=(te=null==(ee=oe.tableConfig)?void 0:ee.uuid)?te:ue});o(N,ce);const fe=j(me,10);function me(){var e,t;ce.value=G(ie,{...oe.tableConfig,uuid:null!=(t=null==(e=oe.tableConfig)?void 0:e.uuid)?t:ue},{$table:de,emits:se,globProps:oe})}const pe=a([]);o(V,pe);const ve=j(be,10);function be(){const e=J(ie,oe.fieldList,ce.value,{$table:de,emits:se,globProps:oe});I(e,l(pe.value),((e,t)=>{if(w(e)&&w(t))return e.toString()===t.toString()}))||(pe.value=e)}const he=Q(ie,ce,de),ge=a([]);async function xe(){var e,t;const o=await he(oe.tableData),a=null==(e=de.value)?void 0:e.getTableData().fullData;if(a){let e=0;if(!(a.some((t=>{var a;if(!(null==(a=de.value)?void 0:a.isInsertByRow(t))){if(t!==o[e])return!0;e++}}))||e!==o.length))return}ge.value=o,null==(t=de.value)||t.recalculate(!0)}const ke={updateTableDataRef:j(xe,10),updateConfigRef:fe,updateFieldListRef:ve};o(W,ke);const ye=K({hooks:ie,config:ce,$table:de,context:ke,emits:se}),Ce=t((()=>({...ce.value,...ye})));let De=!1,je=!1,$e=!1;const Ie=j((()=>{De&&me(),je&&be(),$e&&xe(),De=!1,je=!1,$e=!1}),10);n((()=>oe.tableConfig),(()=>{De=!0,je=!0,$e=!0,Ie()}),{deep:!0}),n((()=>oe.fieldList),(()=>{je=!0,$e=!0,Ie()}),{deep:!0}),n([()=>[...oe.tableData],()=>{var e;return null==(e=oe.tableData)?void 0:e.length}],(()=>{$e=!0,Ie()})),n([()=>oe.tableData,()=>{var e;return null==(e=oe.tableData)?void 0:e.length}],(async()=>{var e,t;(null==(e=ce.value.treeConfig)?void 0:e.expandAll)&&(await T(11),null==(t=de.value)||t.setAllTreeExpand(!0))})),me(),be(),xe();const{header:we,footer:qe}=M(ie);function Re(e){return q(e,["row","rowIndex","$rowIndex","column","columnIndex","$columnIndex","_columnIndex","checked","disabled","indeterminate"])}return S({$table:de,async loadData(e){var t;null==(t=de.value)||t.loadData(await he(e))},setSort:(e,t)=>({field:e,value:t}),setFilter:(e,t)=>({field:e,value:t}),reload(){var e,t;null==(e=de.value)||e.loadColumn([]),null==(t=de.value)||t.loadData([]),me(),be(),xe()},...ie.exposeHooks.expose.call({},ce,{$table:de,emits:se})}),ie.setupHooks.setup.call(ce,pe,{$table:de,emits:se}),(e,t)=>{const o=s("vxe-grid");return r(),i("section",u({class:"iho-table",id:d(ue),style:d(ae)},d(L)()),[(r(),c(f(d(we)))),m("section",{style:p(d(le))},[v(o,u({ref_key:"$table",ref:de},d(Ce),{columns:pe.value,data:ge.value}),b({_:2},[h(e.$slots,((t,o)=>({name:o,fn:g((t=>[x(" 实际上所有的vxe-grid插槽都支持 "),k(e.$slots,o,y(C(Re(t))))]))})))]),1040,["columns","data"])],4),(r(),c(f(d(qe))))],16,Y)}}});export{Z as default};
@@ -1,6 +1,5 @@
1
1
  import { AnyObject, Nullable } from '../../../../../shared/types';
2
2
  import { MaybeRef } from '@vueuse/core';
3
- import { Ref } from 'vue';
4
3
  import { VxeTableInstance } from 'vxe-table';
5
4
  import { IhoTableHandlerContext, IhoTableConfig, IhoTableEmits, IhoTableFieldItem, IhoTableHandler, TableHooks } from '../../../../../components/iho-table/src/types';
6
5
  export declare const createTableHooks: () => Readonly<{
@@ -13,10 +12,7 @@ export declare const createTableHooks: () => Readonly<{
13
12
  exposeHooks: import("../../../../../components/iho-table/src/types").AbstractExposeHooks;
14
13
  }>;
15
14
  export declare function applyTableConfigHooks(hooks: TableHooks, config: IhoTableConfig, context: IhoTableHandlerContext): IhoTableConfig;
16
- export declare function applyTableFieldHooks(hooks: TableHooks, fieldList: IhoTableFieldItem[], config: IhoTableConfig, context: {
17
- $table: Ref<Nullable<VxeTableInstance>>;
18
- emits: IhoTableEmits;
19
- }): IhoTableFieldItem[];
15
+ export declare function applyTableFieldHooks(hooks: TableHooks, fieldList: IhoTableFieldItem[], config: IhoTableConfig, context: IhoTableHandlerContext): IhoTableFieldItem[];
20
16
  export declare function createTableEventHandlers({ hooks, config, $table, emits, context }: {
21
17
  hooks: TableHooks;
22
18
  config: MaybeRef<IhoTableConfig>;
@@ -1 +1 @@
1
- import{arrayed as o}from"../../../../../shared/utils/index.js";import{cloneDeep as e,isArray as r}from"lodash-es";import{unref as s,defineComponent as t}from"vue";import{VxeEventListenerNameList as n}from"../../constants/index.js";import{eventListener2EventName as i}from"../../utils/index.js";import{useConfigHooks as a}from"./useConfigHooks.js";import{useDataHooks as f}from"./useDataHooks.js";import{useDomInsertHooks as l}from"./useDomInsertHooks.js";import{useEventHooks as c}from"./useEventHooks.js";import{useExposeHooks as u}from"./useExposeHooks.js";import{useFieldHooks as d}from"./useFieldHooks.js";import{useSetupHooks as m}from"./useSetupHooks.js";const p=(()=>{let o=null;return()=>o||(o=Object.freeze({configHooks:a().create(),fieldHooks:d().create(),eventHooks:c().create(),dataHooks:f().create(),setupHooks:m().create(),domInsertHooks:l().create(),exposeHooks:u().create()}))})();function k(o,r,s){const t=o.configHooks.config.call(e(r),s);return["rowConfig","editConfig","columnConfig","resizableConfig","seqConfig","sortConfig","filterConfig","radioConfig","checkboxConfig","expandConfig","treeConfig","mouseConfig","menuConfig","keyboardConfig","scrollY","scrollX","editRules"].forEach((e=>{t[e]=o.configHooks[e].call(t[e],t,s)})),t}function H(s,t,n,i){s.fieldHooks.fieldStart.promise(n,i);let a=function e(t){return t.reduce(((t,a,f)=>{const l=[],c=[];let u=!1;return a=s.fieldHooks.field.call(a,{index:f,remove(){u=!0},insertAfter(e){c.push(...o(e))},insertBefore(e){l.push(...o(e))}},n,i),t.push(...l),u||(t.push(a),r(a.children)&&(a.children=e(a.children))),t.push(...c),t}),[])}(e(t));return a=s.fieldHooks.fieldList.call(a,n,i),s.fieldHooks.fieldEnd.promise(n,i),a}function h({hooks:o,config:e,$table:r,emits:t,context:a}){return n.reduce(((n,f)=>(n[f]=n=>function(n,f){var l;const c=i(n);t(c,f),null==(l=o.eventHooks[n])||l.promise(f,s(e),{$table:s(r),emits:t,...a})}(f,n),n)),{})}function g(e,r,t){return async n=>{e.dataHooks.dataStart.promise(s(r));const i=await n.reduce((async(n,i,a)=>{const f=[],l=[];let c=!1;await e.dataHooks.data.promise(i,s(r),{index:a,$table:t,insertBefore(e){f.push(...o(e))},insertAfter(e){l.push(...o(e))},remove(){c=!0}});const u=await n;return u.push(...f),!c&&u.push(i),u.push(...l),u}),Promise.resolve([]));return e.dataHooks.dataEnd.promise(s(r)),i}}function C(o){return{header:t({name:"IhoTableHeader",render:()=>o.domInsertHooks.header.call([])}),footer:t({name:"IhoTableFooter",render:()=>o.domInsertHooks.footer.call([])})}}export{k as applyTableConfigHooks,H as applyTableFieldHooks,g as createDataTransfer,C as createDomInsertComponent,h as createTableEventHandlers,p as createTableHooks};
1
+ import{arrayed as o}from"../../../../../shared/utils/index.js";import{cloneDeep as e,isArray as r}from"lodash-es";import{unref as t,defineComponent as s}from"vue";import{VxeEventListenerNameList as n}from"../../constants/index.js";import{eventListener2EventName as i}from"../../utils/index.js";import{useConfigHooks as a}from"./useConfigHooks.js";import{useDataHooks as f}from"./useDataHooks.js";import{useDomInsertHooks as l}from"./useDomInsertHooks.js";import{useEventHooks as c}from"./useEventHooks.js";import{useExposeHooks as u}from"./useExposeHooks.js";import{useFieldHooks as d}from"./useFieldHooks.js";import{useSetupHooks as m}from"./useSetupHooks.js";const p=(()=>{let o=null;return()=>o||(o=Object.freeze({configHooks:a().create(),fieldHooks:d().create(),eventHooks:c().create(),dataHooks:f().create(),setupHooks:m().create(),domInsertHooks:l().create(),exposeHooks:u().create()}))})();function k(o,r,t){const s=o.configHooks.config.call(e(r),t);return["rowConfig","editConfig","columnConfig","resizableConfig","seqConfig","sortConfig","filterConfig","radioConfig","checkboxConfig","expandConfig","treeConfig","mouseConfig","menuConfig","keyboardConfig","scrollY","scrollX","editRules"].forEach((e=>{s[e]=o.configHooks[e].call(s[e],s,t)})),s}function H(t,s,n,i){t.fieldHooks.fieldStart.promise(n,i);let a=function e(s){return s.reduce(((s,a,f)=>{const l=[],c=[];let u=!1;return a=t.fieldHooks.field.call(a,{index:f,remove(){u=!0},insertAfter(e){c.push(...o(e))},insertBefore(e){l.push(...o(e))}},n,i),s.push(...l),u||(s.push(a),r(a.children)&&(a.children=e(a.children))),s.push(...c),s}),[])}(e(s));return a=t.fieldHooks.fieldList.call(a,n,i),t.fieldHooks.fieldEnd.promise(n,i),a}function h({hooks:o,config:e,$table:r,emits:s,context:a}){return n.reduce(((n,f)=>(n[f]=n=>function(n,f){var l;const c=i(n);s(c,f),null==(l=o.eventHooks[n])||l.promise(f,t(e),{$table:t(r),emits:s,...a})}(f,n),n)),{})}function g(e,r,s){return async n=>{e.dataHooks.dataStart.promise(t(r));let i=await n.reduce((async(n,i,a)=>{const f=[],l=[];let c=!1;await e.dataHooks.data.promise(i,t(r),{index:a,$table:s,insertBefore(e){f.push(...o(e))},insertAfter(e){l.push(...o(e))},remove(){c=!0}});const u=await n;return u.push(...f),!c&&u.push(i),u.push(...l),u}),Promise.resolve([]));return i=e.dataHooks.dataList.call(i,t(r)),e.dataHooks.dataEnd.promise(t(r)),i}}function C(o){return{header:s({name:"IhoTableHeader",render:()=>o.domInsertHooks.header.call([])}),footer:s({name:"IhoTableFooter",render:()=>o.domInsertHooks.footer.call([])})}}export{k as applyTableConfigHooks,H as applyTableFieldHooks,g as createDataTransfer,C as createDomInsertComponent,h as createTableEventHandlers,p as createTableHooks};
@@ -1,5 +1,5 @@
1
1
  import { AnyObject } from '../../../../../shared/types';
2
- import { AsyncParallelHook, AsyncSeriesHook } from '../../../../../shared/utils/tapable';
2
+ import { AsyncParallelHook, AsyncSeriesHook, SyncWaterfallHook } from '../../../../../shared/utils/tapable';
3
3
  import { AbstractDataHooks } from '../../../../../components/iho-table/src/types';
4
4
  declare class TableDataHooks extends AbstractDataHooks {
5
5
  readonly dataStart: AsyncParallelHook<[import("../../../../../components/iho-table/src/types").IhoTableConfig], import("../../../../../shared/utils/tapable").UnsetAdditionalOptions>;
@@ -11,6 +11,7 @@ declare class TableDataHooks extends AbstractDataHooks {
11
11
  insertAfter(data: import("../../../../../shared/types").ArrayAble<AnyObject>): void;
12
12
  }], import("../../../../../shared/utils/tapable").UnsetAdditionalOptions>;
13
13
  readonly dataEnd: AsyncParallelHook<[import("../../../../../components/iho-table/src/types").IhoTableConfig], import("../../../../../shared/utils/tapable").UnsetAdditionalOptions>;
14
+ readonly dataList: SyncWaterfallHook<[AnyObject[], import("../../../../../components/iho-table/src/types").IhoTableConfig], import("../../../../../shared/utils/tapable").UnsetAdditionalOptions>;
14
15
  }
15
16
  export declare function useDataHooks(): {
16
17
  create: () => TableDataHooks;
@@ -1 +1 @@
1
- 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 t from"../../../../../shared/utils/tapable/AsyncParallelHook.js";import"../../../../../shared/utils/tapable/AsyncParallelBailHook.js";import a from"../../../../../shared/utils/tapable/AsyncSeriesHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesBailHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesLoopHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesWaterfallHook.js";import{AbstractDataHooks as s}from"../../types/pluginType.js";class o extends s{constructor(){super(...arguments),this.dataStart=new t(["config"]),this.data=new a(["rowData","context","config"]),this.dataEnd=new t(["config"])}}function e(){return{create:function(){return new o}}}export{e as useDataHooks};
1
+ import"../../../../../shared/utils/tapable/SyncHook.js";import"../../../../../shared/utils/tapable/SyncBailHook.js";import t from"../../../../../shared/utils/tapable/SyncWaterfallHook.js";import"../../../../../shared/utils/tapable/SyncLoopHook.js";import a from"../../../../../shared/utils/tapable/AsyncParallelHook.js";import"../../../../../shared/utils/tapable/AsyncParallelBailHook.js";import s from"../../../../../shared/utils/tapable/AsyncSeriesHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesBailHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesLoopHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesWaterfallHook.js";import{AbstractDataHooks as o}from"../../types/pluginType.js";class e extends o{constructor(){super(...arguments),this.dataStart=new a(["config"]),this.data=new s(["rowData","context","config"]),this.dataEnd=new a(["config"]),this.dataList=new t(["dataList","config"])}}function r(){return{create:function(){return new e}}}export{r as useDataHooks};
@@ -1 +1 @@
1
- export declare function bindEventSettingPlugin(): import("../../../../../components/iho-table").TablePlugin;
1
+ export declare function bindEventSettingPlugin(): import("../../../../components/iho-table").TablePlugin;
@@ -0,0 +1 @@
1
+ import"../../../../shared/utils/index.js";import"../../index.js";import{isFunction as n}from"lodash-es";import{getBindEventSettingTrigger as t}from"../../../../shared/utils/business.js";import{defineTablePlugin as o}from"../hooks/useTablePlugin.js";function e(){const e="bindEventSettingPlugin";return o({name:e,apply(o){o.configHooks.config.tap(e,(o=>{const e=o.onFormChange;return o.onFormChange=function(o){var i;const{column:r,row:s}=o,u=null==(i=r.editRender)?void 0:i.props;if(u&&(null==u?void 0:u.bindEventSetting)){u.bindEventSetting.forEach((n=>{t(n.event_type)(n,{getter:n=>s[n],setter:(n,t)=>s[n]=t})}))}n(e)&&e(o)},o}))}})}export{e as bindEventSettingPlugin};
@@ -1 +1 @@
1
- export declare function defaultConfigPlugin(): import("../../../../../components/iho-table").TablePlugin;
1
+ export declare function defaultConfigPlugin(): import("../../../../components/iho-table").TablePlugin;
@@ -0,0 +1 @@
1
+ import{mergeWith as e,isObject as o}from"lodash-es";import{HIGHEST_PRIORITY as i}from"../constants/index.js";import{defineTablePlugin as t}from"../hooks/useTablePlugin.js";import{IhoTableStatusHelper as s}from"../utils/index.js";function n(){const n="defaultTablePlugin";return t({name:n,vxe(e){e.setup({zIndex:3e3})},apply(t){t.configHooks.config.tap({name:n,stage:i},(o=>{const i=e({border:!0,showSeq:!0,columnConfig:{resizable:!0},rowConfig:{height:36,useKey:!0,isHover:!0,isCurrent:!0,keyField:"theUniqueKey"},showOverflow:"title",showHeaderOverflow:"title",editConfig:{trigger:"click",mode:"cell"}},o,{height:o.height?"auto":void 0});return i.selectType=o.selectType||(s.isPositive(o.isBatchSelect)?"checkbox":s.isPositive(o.isSingleSelect)?"radio":void 0),i})),t.configHooks.mouseConfig.tap({name:n,stage:i},((e,i)=>o(i.keyboardConfig)?Object.assign({selected:!!i.keyboardConfig.isEdit},e):e))}})}export{n as defaultConfigPlugin};
@@ -0,0 +1 @@
1
+ export declare function dragScrollPlugin(): import("../../../../components/iho-table").TablePlugin;
@@ -0,0 +1 @@
1
+ import{findAncestor as e}from"../../../../shared/utils/index.js";import{useThrottleFn as t}from"@vueuse/core";import{flow as o}from"lodash-es";import{onBeforeUnmount as s,unref as r}from"vue";import"../../index.js";import{defineTablePlugin as n}from"../hooks/useTablePlugin.js";function u(){const e="dragScrollPlugin";return n({name:e,apply(r){const n={events:new Map,regist(e,t,o){document.body.addEventListener(t,o);const s=this.events.get(e)||[];s.push((()=>document.body.removeEventListener(t,o))),this.events.set(e,s)},stopper(e){var t;o(null!=(t=this.events.get(e))?t:[])(),this.events.delete(e)}};r.configHooks.config.tap(e,((e,{$table:o})=>{if(!1===e.dragScroll||!e.uuid)return e;n.stopper(e.uuid);let s=0,r=0,u=0,l=0,a=!1;const c={queue:[],lock:!1,add(e){this.queue.push(e),this.execute()},async execute(){if(!this.lock){this.lock=!0;try{for(;this.queue.length;)await this.queue.shift()()}finally{this.lock=!1}}},clear(){this.queue=[]}};return n.regist(e.uuid,"mousemove",t((e=>{var t;if(!a){const{bodyEle:t,inEmptyArea:s}=i(e,o);return void(t&&(t.style.cursor=s?"grab":"default"))}const{pageX:n,pageY:p}=e,d=n-s,m=p-r;c.add((()=>o.value.scrollTo(Math.max(0,u-d),Math.max(0,l-m)))),window.getSelection&&(null==(t=window.getSelection())||t.removeAllRanges())}),50)),n.regist(e.uuid,"mousedown",(e=>{const{bodyEle:t,inEmptyArea:n}=i(e,o);if(!t||!n)return;s=e.pageX,r=e.pageY;const{scrollTop:c,scrollLeft:p}=o.value.getScroll();u=p,l=c,a=!0})),n.regist(e.uuid,"mouseup",(()=>{a=!1,c.clear()})),e})),r.setupHooks.setup.tap(e,(e=>{s((()=>e.value.uuid&&n.stopper(e.value.uuid)))}))}})}function i(e,t){const o=e.target,s="TD"===o.tagName||o.classList.contains("vxe-cell"),n=r(t);return n?{target:o,bodyEle:l(o,n),inEmptyArea:s}:{target:o,inEmptyArea:s,bodyEle:null}}function l(t,o){const s=r(o.getRefMaps().refElem);let n=!1,u=!1,i=null;return e(t,(e=>(n||(n=e===s),u||(u=e.classList.contains("vxe-table--body-wrapper"),i=e),n&&u)))?i:null}export{u as dragScrollPlugin};
@@ -1 +1 @@
1
- import{useAttrs as t,onBeforeUnmount as e,inject as l,createVNode as o}from"vue";import{arrayed as n,widthAppend as a}from"../../../../shared/utils/index.js";import{isObject as r,isString as i,isFunction as s}from"lodash-es";import u from"../../../annotation-edit/index.js";import"../../index.js";import{InjectionIhoTableAnnotation as d,InjectionIhoTableConfig as m}from"../constants/index.js";import{getLowCodeFieldFromField as c,IhoTableRenderHelper as p}from"../utils/index.js";import{defineTablePlugin as h}from"../hooks/useTablePlugin.js";function f(){const f="headerPlugin";return h({name:f,apply(h){let v=null;h.setupHooks.setup.tap(f,(()=>{v=t(),e((()=>{v=null}))})),h.fieldHooks.field.tap(f,(t=>{var e;const h=null==(e=t.slots)?void 0:e.header;return t.slots={...t.slots,header:e=>function(t,e,c){var h;const f=l(d),x=l(m),b=l("$xetable"),j=t.column||{},g=r(null==f?void 0:f.value)&&!1!==e.annotation,w=p.isEditableColumn(x.value,j),W=p.hasFilter(e)||p.hasDateFiler(e),k=null==(h=e.titlePrefix)?void 0:h.content,y=i(c)?c:s(c)?c(t):null;let D=!1;if(x.value){const t=x.value.editRules&&x.value.editRules[j.field];t&&(D=n(t).some((t=>t.required)))}const M=x.value.border?Math.max(2,Math.ceil(b.reactData.scrollbarWidth/b.reactData.tableColumn.length)):1,P=a(Math.max(0,j.renderWidth-20-M-(D?14:0)-(g?18:0)-(W?23:0)-(w?22:0)-(k?20:0)-(j.sortable?23:0)));return o("section",{class:"iho-table__headerWrapper"},[o("section",{style:{width:P}},[null!=y?y:o("div",{style:{maxWidth:"100%",textOverflow:"ellipsis",whiteSpace:"nowrap"}},[function(){const t=j.title,e=/\\n|\n|\r/g;if(!e.test(t))return t;const l=t.replace(e,"<br>").split("<br>");return l.map(((t,e)=>[t,e===l.length-1?null:o("br",null,null)]))}()])]),g?o(u,{modelValue:f.value[j.field],"onUpdate:modelValue":t=>f.value[j.field]=t,shortcuts:v&&(v["annotation-shortcuts"]||v.annotationShortcuts)||[]},null):null])}(e,c(t),h)},t}))}})}export{f as default};
1
+ import{useAttrs as e,onBeforeUnmount as t,inject as l,createVNode as o}from"vue";import{arrayed as n,widthAppend as a}from"../../../../shared/utils/index.js";import{isObject as r,isString as i,isFunction as s}from"lodash-es";import u from"../../../annotation-edit/index.js";import"../../index.js";import{InjectionIhoTableAnnotation as d,InjectionIhoTableConfig as m}from"../constants/index.js";import{getLowCodeFieldFromField as c,IhoTableRenderHelper as h}from"../utils/index.js";import{defineTablePlugin as p}from"../hooks/useTablePlugin.js";function f(){const f="headerPlugin";return p({name:f,apply(p){let v=null;p.setupHooks.setup.tap(f,(()=>{v=e(),t((()=>{v=null}))})),p.fieldHooks.field.tap(f,(e=>{var t;const p=null==(t=e.slots)?void 0:t.header;return e.slots={...e.slots,header:t=>function(e,t,c){var p;const f=l(d),x=l(m),b=l("$xetable"),j=e.column||{},g=r(null==f?void 0:f.value)&&!1!==t.annotation,w=h.isEditableColumn(x.value,j),W=h.hasFilter(t)||h.hasDateFiler(t),k=null==(p=t.titlePrefix)?void 0:p.content,y=i(c)?c:s(c)?c(e):null;let D=!1;if(x.value){const e=x.value.editRules&&x.value.editRules[j.field];e&&(D=n(e).some((e=>e.required)))}const M=x.value.border?Math.max(2,Math.ceil(b.reactData.scrollbarWidth/b.reactData.tableColumn.length)):1,P=a(Math.max(0,j.renderWidth-20-M-(D?14:0)-(g?18:0)-(W?23:0)-(w?22:0)-(k?20:0)-(j.sortable?23:0)));return o("section",{class:"iho-table__headerWrapper"},[o("section",{style:{width:P}},[null!=y?y:o("div",{style:{maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},[function(){const e=j.title,t=/\\n|\n|\r/g;if(!t.test(e))return e;const l=e.replace(t,"<br>").split("<br>");return l.map(((e,t)=>[e,t===l.length-1?null:o("br",null,null)]))}()])]),g?o(u,{modelValue:f.value[j.field],"onUpdate:modelValue":e=>f.value[j.field]=e,shortcuts:v&&(v["annotation-shortcuts"]||v.annotationShortcuts)||[]},null):null])}(t,c(e),p)},e}))}})}export{f as default};
@@ -1 +1 @@
1
- import*as e from"./anchorPlugin/index.js";import*as r from"./bindEventSettingPlugin/index.js";import*as i from"./colorAndIconPlugin.js";import*as n from"./copyPastePlugin.js";import*as s from"./defaultConfigPlugin/index.js";import*as t from"./defaultValuePlugin.js";import*as d from"./filterDaterangeRenderPlugin/index.js";import*as l from"./filterRenderPlugin/index.js";import*as g from"./filterVisibleEventPlugin.js";import*as o from"./forceArrowKeyPlugin.js";import*as u from"./headerPlugin.js";import*as a from"./highLightSetPlugin.js";import*as P from"./keyboardEventPlugin/index.js";import*as m from"./lowCodeFieldAdaptorPlugin/index.js";import*as x from"./maxCheckSizePlugin.js";import*as f from"./operationalFormPlugin/index.js";import*as p from"./rendererPlugins/editableWidgets/dateRendererPlugin/index.js";import*as j from"./rendererPlugins/editableWidgets/inputRendererPlugin.js";import*as R from"./rendererPlugins/editableWidgets/levelSearchCascadePlugin/index.js";import*as b from"./rendererPlugins/editableWidgets/numberRendererPlugin.js";import*as c from"./rendererPlugins/editableWidgets/radioRendererPlugin.js";import*as w from"./rendererPlugins/editableWidgets/selectRendererPlugin/index.js";import*as h from"./rendererPlugins/editableWidgets/separateRendererPlugin/index.js";import*as W from"./rendererPlugins/editableWidgets/switchRendererPlugin.js";import*as v from"./rendererPlugins/editableWidgets/timeRendererPlugin/index.js";import*as S from"./rendererPlugins/widgets/checkRendererPlugin.js";import*as k from"./rendererPlugins/widgets/colorRendererPlugin.js";import*as C from"./rendererPlugins/widgets/defaultRendererPlugin.js";import*as y from"./rendererPlugins/widgets/htmlRendererPlugin.js";import*as A from"./rendererPlugins/widgets/labelRendererPlugin.js";import*as E from"./rendererPlugins/widgets/pictureRendererPlugin.js";import*as D from"./rendererPlugins/widgets/seqRendererPlugin.js";import*as F from"./rowClickPlugin/index.js";import*as V from"./rowDragPlugin/index.js";import*as q from"./rowGroupSettingPlugin/index.js";import*as z from"./varialbleHeightPlugin/index.js";import*as G from"./virtualTreePlugin/index.js";import*as H from"./wordbookSettingPlugin.js";import{separateMetaModule as I}from"../../../../shared/utils/index.js";var K=I(Object.assign({"./anchorPlugin/index.tsx":e,"./bindEventSettingPlugin/index.ts":r,"./colorAndIconPlugin.ts":i,"./copyPastePlugin.ts":n,"./defaultConfigPlugin/index.ts":s,"./defaultValuePlugin.ts":t,"./filterDaterangeRenderPlugin/index.tsx":d,"./filterRenderPlugin/index.tsx":l,"./filterVisibleEventPlugin.ts":g,"./forceArrowKeyPlugin.ts":o,"./headerPlugin.tsx":u,"./highLightSetPlugin.tsx":a,"./keyboardEventPlugin/index.ts":P,"./lowCodeFieldAdaptorPlugin/index.tsx":m,"./maxCheckSizePlugin.ts":x,"./operationalFormPlugin/index.ts":f,"./rendererPlugins/editableWidgets/dateRendererPlugin/index.tsx":p,"./rendererPlugins/editableWidgets/inputRendererPlugin.tsx":j,"./rendererPlugins/editableWidgets/levelSearchCascadePlugin/index.tsx":R,"./rendererPlugins/editableWidgets/numberRendererPlugin.tsx":b,"./rendererPlugins/editableWidgets/radioRendererPlugin.tsx":c,"./rendererPlugins/editableWidgets/selectRendererPlugin/index.tsx":w,"./rendererPlugins/editableWidgets/separateRendererPlugin/index.tsx":h,"./rendererPlugins/editableWidgets/switchRendererPlugin.tsx":W,"./rendererPlugins/editableWidgets/timeRendererPlugin/index.tsx":v,"./rendererPlugins/widgets/checkRendererPlugin.tsx":S,"./rendererPlugins/widgets/colorRendererPlugin.tsx":k,"./rendererPlugins/widgets/defaultRendererPlugin.tsx":C,"./rendererPlugins/widgets/htmlRendererPlugin.tsx":y,"./rendererPlugins/widgets/labelRendererPlugin.tsx":A,"./rendererPlugins/widgets/pictureRendererPlugin.tsx":E,"./rendererPlugins/widgets/seqRendererPlugin.tsx":D,"./rowClickPlugin/index.ts":F,"./rowDragPlugin/index.ts":V,"./rowGroupSettingPlugin/index.ts":q,"./varialbleHeightPlugin/index.tsx":z,"./virtualTreePlugin/index.ts":G,"./wordbookSettingPlugin.ts":H}));export{K as default};
1
+ import*as e from"./anchorPlugin/index.js";import*as r from"./bindEventSettingPlugin.js";import*as i from"./colorAndIconPlugin.js";import*as n from"./copyPastePlugin.js";import*as s from"./defaultConfigPlugin.js";import*as t from"./defaultValuePlugin.js";import*as l from"./dragScrollPlugin.js";import*as d from"./filterDaterangeRenderPlugin/index.js";import*as g from"./filterRenderPlugin/index.js";import*as o from"./filterVisibleEventPlugin.js";import*as u from"./forceArrowKeyPlugin.js";import*as a from"./headerPlugin.js";import*as P from"./highLightSetPlugin.js";import*as m from"./keyboardEventPlugin.js";import*as f from"./lowCodeFieldAdaptorPlugin.js";import*as p from"./maxCheckSizePlugin.js";import*as x from"./operationalFormPlugin.js";import*as j from"./rendererPlugins/editableWidgets/dateRendererPlugin/index.js";import*as b from"./rendererPlugins/editableWidgets/inputRendererPlugin.js";import*as c from"./rendererPlugins/editableWidgets/levelSearchCascadePlugin/index.js";import*as R from"./rendererPlugins/editableWidgets/numberRendererPlugin.js";import*as w from"./rendererPlugins/editableWidgets/radioRendererPlugin.js";import*as h from"./rendererPlugins/editableWidgets/selectRendererPlugin/index.js";import*as W from"./rendererPlugins/editableWidgets/separateRendererPlugin/index.js";import*as v from"./rendererPlugins/editableWidgets/switchRendererPlugin.js";import*as S from"./rendererPlugins/editableWidgets/timeRendererPlugin/index.js";import*as k from"./rendererPlugins/widgets/checkRendererPlugin.js";import*as C from"./rendererPlugins/widgets/colorRendererPlugin.js";import*as y from"./rendererPlugins/widgets/defaultRendererPlugin.js";import*as A from"./rendererPlugins/widgets/htmlRendererPlugin.js";import*as E from"./rendererPlugins/widgets/labelRendererPlugin.js";import*as D from"./rendererPlugins/widgets/pictureRendererPlugin.js";import*as F from"./rendererPlugins/widgets/seqRendererPlugin.js";import*as T from"./rowClickPlugin.js";import*as V from"./rowDragPlugin.js";import*as q from"./rowGroupSettingPlugin/index.js";import*as z from"./varialbleHeightPlugin.js";import*as G from"./verticalTablePlugin/index.js";import*as H from"./virtualTreePlugin.js";import*as I from"./wordbookSettingPlugin.js";import{separateMetaModule as K}from"../../../../shared/utils/index.js";var L=K(Object.assign({"./anchorPlugin/index.tsx":e,"./bindEventSettingPlugin.ts":r,"./colorAndIconPlugin.ts":i,"./copyPastePlugin.ts":n,"./defaultConfigPlugin.ts":s,"./defaultValuePlugin.ts":t,"./dragScrollPlugin.ts":l,"./filterDaterangeRenderPlugin/index.tsx":d,"./filterRenderPlugin/index.tsx":g,"./filterVisibleEventPlugin.ts":o,"./forceArrowKeyPlugin.ts":u,"./headerPlugin.tsx":a,"./highLightSetPlugin.tsx":P,"./keyboardEventPlugin.ts":m,"./lowCodeFieldAdaptorPlugin.tsx":f,"./maxCheckSizePlugin.ts":p,"./operationalFormPlugin.ts":x,"./rendererPlugins/editableWidgets/dateRendererPlugin/index.tsx":j,"./rendererPlugins/editableWidgets/inputRendererPlugin.tsx":b,"./rendererPlugins/editableWidgets/levelSearchCascadePlugin/index.tsx":c,"./rendererPlugins/editableWidgets/numberRendererPlugin.tsx":R,"./rendererPlugins/editableWidgets/radioRendererPlugin.tsx":w,"./rendererPlugins/editableWidgets/selectRendererPlugin/index.tsx":h,"./rendererPlugins/editableWidgets/separateRendererPlugin/index.tsx":W,"./rendererPlugins/editableWidgets/switchRendererPlugin.tsx":v,"./rendererPlugins/editableWidgets/timeRendererPlugin/index.tsx":S,"./rendererPlugins/widgets/checkRendererPlugin.tsx":k,"./rendererPlugins/widgets/colorRendererPlugin.tsx":C,"./rendererPlugins/widgets/defaultRendererPlugin.tsx":y,"./rendererPlugins/widgets/htmlRendererPlugin.tsx":A,"./rendererPlugins/widgets/labelRendererPlugin.tsx":E,"./rendererPlugins/widgets/pictureRendererPlugin.tsx":D,"./rendererPlugins/widgets/seqRendererPlugin.tsx":F,"./rowClickPlugin.ts":T,"./rowDragPlugin.ts":V,"./rowGroupSettingPlugin/index.ts":q,"./varialbleHeightPlugin.tsx":z,"./verticalTablePlugin/index.ts":G,"./virtualTreePlugin.ts":H,"./wordbookSettingPlugin.ts":I}));export{L as default};
@@ -1 +1 @@
1
- export declare function keyboardEventPlugin(): import("../../../../../components/iho-table").TablePlugin;
1
+ export declare function keyboardEventPlugin(): import("../../../../components/iho-table").TablePlugin;
@@ -0,0 +1 @@
1
+ import{promiseTimeout as e}from"@vueuse/shared";import"../../index.js";import{defineTablePlugin as o}from"../hooks/useTablePlugin.js";function t(){const t="keyboardEventPlugin";return o({name:t,apply(o){o.eventHooks.onKeydown.tap(t,(async({$event:o,$table:t},n,{emits:r})=>{await e(0);const{row:a,column:i}=t.getSelectedCell()||t.getEditRecord()||{};if(!a||!i)return;r("keyboard",{$table:t,key:o.key,index:t.getRowIndex(a),value:a[i.field],row:a,column:i})}))}})}export{t as keyboardEventPlugin};
@@ -1 +1 @@
1
- export declare function lowCodeFieldAdaptorPlugin(): import("../../../../../components/iho-table").TablePlugin;
1
+ export declare function lowCodeFieldAdaptorPlugin(): import("../../../../components/iho-table").TablePlugin;
@@ -0,0 +1 @@
1
+ import{isObject as e,isFunction as t,cloneDeep as i}from"lodash-es";import{toRaw as o,h as l}from"vue";import{HIGHEST_PRIORITY as s,IHO_TABLE_FIXED_STATUS as n,WIDGET_TYPE as d}from"../constants/index.js";import{defineTablePlugin as r}from"../hooks/useTablePlugin.js";import{getDefaultValue as a}from"./rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.js";import{IhoTableStatusHelper as f,IhoTableUtils as c}from"../utils/index.js";function m(){const m="lowCodeFieldAdaptorPlugin";return r({name:m,apply(r){r.fieldHooks.field.tap({name:m,stage:s},((s,r,m)=>{const p=s,u={className:p.bold?"iho-table__boldCell":"",field:p.columnName,showOverflow:"ellipsis",visible:f.notNegative(p.isShow),minWidth:p.colWidth,sortable:f.isPositive(p.isSort),fixed:n[p.isFixed],...p,title:p.alias||p.title};return function(e,i){const o={default:i.slotFn,header:i.headerSlotFn,edit:i.editSlotFn,footer:i.footerSlotFn,...i.slots};if(t(i.checkEditStatus)){const{default:e}=o;t(e)&&(o.default=t=>i.checkEditStatus(t)?e(t):[l("span",null,a(t.row,t.column.editRender.props))])}e.slots=o}(u,p),function(l,s,n){var r,a;const m=i(o(s));m.componentProps={size:"mini"===n.size?"small":n.size,...m.componentProps},n.forceClearable&&(m.componentProps.clearable=!0);l.editRender={name:c.getCellType(s),...l.editRender,props:m},l.editRender.enabled=!Reflect.get(d,l.editRender.name),!l.editRender.enabled&&t(null==(r=l.slots)?void 0:r.default)&&(l.editRender.enabled=t(null==(a=l.slots)?void 0:a.edit));if(!e(s.settingObj))return;Reflect.has(s.settingObj,"isHide")&&(l.visible=l.visible&&f.notPositive(s.settingObj.isHide))}(u,p,m),u})),r.fieldHooks.field.tap({name:m+"After",stage:1e3},(t=>(e(t.slots)&&Object.entries(t.slots).forEach((([e,i])=>{null==i&&Reflect.deleteProperty(t.slots,e)})),t)))}})}export{m as lowCodeFieldAdaptorPlugin};
@@ -1 +1 @@
1
- export declare function operationalFormPlugin(): import("../../../../../components/iho-table").TablePlugin;
1
+ export declare function operationalFormPlugin(): import("../../../../components/iho-table").TablePlugin;
@@ -0,0 +1 @@
1
+ import"../../../../shared/utils/index.js";import{format as o}from"date-fns";import"../../index.js";import{isFunction as n,isNumber as t,isDate as e}from"lodash-es";import{EDITABLE_WIDGET_TYPE as r}from"../constants/index.js";import{getLowCodeFieldFromField as i,IhoTableUtils as s}from"../utils/index.js";import{getOperationalFormHandler as a,getDateOperationalFormHandler as m}from"../../../../shared/utils/business.js";import{defineTablePlugin as l}from"../hooks/useTablePlugin.js";function u(){const u="operationalFormPlugin";return l({name:u,apply(l){l.configHooks.config.tap(u,(l=>{const u=l.onFormChange;return l.onFormChange=function(d){const{column:p,row:f,$table:c}=d;!function(n,u){const{operationalFormHandler:d}=a(l.operationalForm||l.operationForm,(o=>n[o]),((o,t)=>{u.getColumns().some((n=>n.field===o))&&(n[o]=t)})),{dateOperationalFormHandler:p}=m(l.dateOperationalForm,(o=>n[o]),((a,m)=>{const l=u.getColumns().find((o=>o.field===a));if(!l)return;const d=i(l);d&&[r.DATE,r.TIME].includes(s.getCellType(d))&&(m=t(m)||e(m)?o(new Date(m),d.valueFormat||"yyyy-MM-dd HH:mm:ss"):null),n[a]=m}));return function(o){d(o),p(o)}}(f,c)(p.field),n(u)&&u(d)},l}))}})}export{u as operationalFormPlugin};
@@ -30,6 +30,16 @@ declare const _default: import("vue").DefineComponent<{
30
30
  type: StringConstructor;
31
31
  default: string;
32
32
  };
33
+ isDateDisabled: {
34
+ type: PropType<(current: number, row: AnyObject) => boolean>;
35
+ };
36
+ isTimeDisabled: {
37
+ type: PropType<(current: number, row: AnyObject) => {
38
+ isHourDisabled: boolean;
39
+ isMinuteDisabled: boolean;
40
+ isSecondDisabled: boolean;
41
+ }>;
42
+ };
33
43
  }, {
34
44
  attr: AnyObject;
35
45
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
@@ -61,6 +71,16 @@ declare const _default: import("vue").DefineComponent<{
61
71
  type: StringConstructor;
62
72
  default: string;
63
73
  };
74
+ isDateDisabled: {
75
+ type: PropType<(current: number, row: AnyObject) => boolean>;
76
+ };
77
+ isTimeDisabled: {
78
+ type: PropType<(current: number, row: AnyObject) => {
79
+ isHourDisabled: boolean;
80
+ isMinuteDisabled: boolean;
81
+ isSecondDisabled: boolean;
82
+ }>;
83
+ };
64
84
  }>> & {
65
85
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
66
86
  }>>;
@@ -73,7 +93,7 @@ declare const _default: import("vue").DefineComponent<{
73
93
  timePickerProps: {
74
94
  format: string | undefined;
75
95
  };
76
- isDateDisabled: (ts: number) => any;
96
+ isDateDisabled: (ts: number) => boolean;
77
97
  isTimeDisabled: ((ts: number) => any) | undefined;
78
98
  type: any;
79
99
  clearable: boolean;
@@ -196,6 +216,16 @@ declare const _default: import("vue").DefineComponent<{
196
216
  type: StringConstructor;
197
217
  default: string;
198
218
  };
219
+ isDateDisabled: {
220
+ type: PropType<(current: number, row: AnyObject) => boolean>;
221
+ };
222
+ isTimeDisabled: {
223
+ type: PropType<(current: number, row: AnyObject) => {
224
+ isHourDisabled: boolean;
225
+ isMinuteDisabled: boolean;
226
+ isSecondDisabled: boolean;
227
+ }>;
228
+ };
199
229
  }>> & {
200
230
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
201
231
  }, {
@@ -1 +1 @@
1
- import{defineComponent as e,useAttrs as t,inject as i,ref as n,computed as r,openBlock as l,createBlock as o,unref as a,mergeProps as s,isRef as u}from"vue";import{generateTimeFormat as d}from"../../../../../../../shared/utils/index.js";import{isFunction as c}from"lodash-es";import{useIhoTableFormEvent as m}from"../../../../utils/index.js";import D from"../../../../../../date-picker/index.js";var f=e({__name:"editDate",props:{value:{type:String,default:null},column:{type:Object,required:!0},row:{type:Object,required:!0},rowIndex:{type:Number,required:!0},isStartDate:{type:Boolean,default:!1},isEndDate:{type:Boolean,default:!1},connectField:{type:String,default:"-_-"}},emits:["update:value"],setup(e,{emit:f}){const p=e,w=t(),v=i("$xetable"),{emitFormChangeWithParams:b}=m({...p,$table:v}),F=n(),g=r({get:()=>p.value?p.value:null,set(e){const t=p.value;if(t===e)return;const{isDateDisabled:i,isTimeDisabled:n}=y.value;if(e){const t=Date.parse(e);if(i(t))return;const{isHourDisabled:r,isMinuteDisabled:l,isSecondDisabled:o}=(null==n?void 0:n(t))||{},{h:a,m:s,s:u}=x(new Date(e)),d=null==r?void 0:r(a),c=null==l?void 0:l(s,a),m=null==o?void 0:o(u,s,a);if(d||c||m)return}f("update:value",e),b({oldValue:t})}}),y=r((()=>{const{valueFormat:e,format:t,type:i="datetime"}=w;return{type:i,clearable:!0,allowedInvalidValue:"-",...w,timePickerProps:{format:d(e||t)},isDateDisabled:h(w.isDateDisabled)||S,isTimeDisabled:(null==i?void 0:i.includes("time"))?h(w.isTimeDisabled)||T:void 0}}));function $(e,t){return p.isStartDate&&p.connectField?e>t:!(!p.isEndDate||!p.connectField)&&e<t}function S(e){return!!p.row[p.connectField]&&$(e,p.isEndDate?new Date(`${p.row[p.connectField].split(" ")[0]} 00:00:00`).getTime():new Date(p.row[p.connectField]).getTime())}function T(e){const t=new Date(p.row[p.connectField]),i=new Date(e),{h:n,m:r,s:l}=x(t),o=(e,t,i,n)=>!(p.isEndDate&&i>n)&&(!(p.isStartDate&&i<n)&&$(e,t));return{isHourDisabled:t=>{if(!p.row[p.connectField])return!1;const r=new Date(`${p.row[p.connectField].split(" ")[0]} 00:00:00`).getTime(),{m:l,s:a}=x(i);return o(t,n,e-60*t*60*1e3-60*l*1e3-1e3*a,r)},isMinuteDisabled:t=>{if(!p.row[p.connectField])return!1;const l=new Date(`${p.row[p.connectField].split(" ")[0]} ${n}:00:00`).getTime(),{s:a}=x(i);return o(t,r,e-60*t*1e3-1e3*a,l)},isSecondDisabled:t=>{if(!p.row[p.connectField])return!1;const i=new Date(`${p.row[p.connectField].split(" ")[0]} ${n}:${r}:00`).getTime();return o(t,l,e-1e3*t,i)}}}function h(e){return c(e)?t=>e(t,p.row):null}function x(e){return{h:e.getHours(),m:e.getMinutes(),s:e.getSeconds()}}return(e,t)=>(l(),o(a(D),s({ref_key:"formRef",ref:F},a(y),{"formatted-value":a(g),"onUpdate:formatted-value":t[0]||(t[0]=e=>u(g)?g.value=e:null)}),null,16,["formatted-value"]))}});export{f as default};
1
+ import{defineComponent as e,useAttrs as t,inject as i,ref as n,computed as r,openBlock as l,createBlock as a,unref as o,mergeProps as s,isRef as u}from"vue";import{generateTimeFormat as d}from"../../../../../../../shared/utils/index.js";import{isFunction as c}from"lodash-es";import{useIhoTableFormEvent as m}from"../../../../utils/index.js";import D from"../../../../../../date-picker/index.js";var f=e({__name:"editDate",props:{value:{type:String,default:null},column:{type:Object,required:!0},row:{type:Object,required:!0},rowIndex:{type:Number,required:!0},isStartDate:{type:Boolean,default:!1},isEndDate:{type:Boolean,default:!1},connectField:{type:String,default:"-_-"},isDateDisabled:{type:Function},isTimeDisabled:{type:Function}},emits:["update:value"],setup(e,{emit:f}){const p=e,v=t(),w=i("$xetable"),{emitFormChangeWithParams:b}=m({...p,$table:w}),F=n(),g=r({get:()=>p.value?p.value:null,set(e){const t=p.value;if(t===e)return;const{isDateDisabled:i,isTimeDisabled:n}=y.value;if(e){const t=Date.parse(e);if(i(t))return;const{isHourDisabled:r,isMinuteDisabled:l,isSecondDisabled:a}=(null==n?void 0:n(t))||{},{h:o,m:s,s:u}=h(new Date(e)),d=null==r?void 0:r(o),c=null==l?void 0:l(s,o),m=null==a?void 0:a(u,s,o);if(d||c||m)return}f("update:value",e),b({oldValue:t})}}),y=r((()=>{const{valueFormat:e,format:t,type:i="datetime"}=v;return{type:i,clearable:!0,allowedInvalidValue:"-",...v,timePickerProps:{format:d(e||t)},isDateDisabled:e=>{var t;return(null==(t=p.isDateDisabled)?void 0:t.call(p,e,p.row))||function(e){return!!p.row[p.connectField]&&T(e,p.isEndDate?new Date(`${p.row[p.connectField].split(" ")[0]} 00:00:00`).getTime():new Date(p.row[p.connectField]).getTime())}(e)},isTimeDisabled:(null==i?void 0:i.includes("time"))?S(p.isTimeDisabled)||$:void 0}}));function T(e,t){return p.isStartDate&&p.connectField?e>t:!(!p.isEndDate||!p.connectField)&&e<t}function $(e){const t=new Date(p.row[p.connectField]),i=new Date(e),{h:n,m:r,s:l}=h(t),a=(e,t,i,n)=>!(p.isEndDate&&i>n)&&(!(p.isStartDate&&i<n)&&T(e,t));return{isHourDisabled:t=>{if(!p.row[p.connectField])return!1;const r=new Date(`${p.row[p.connectField].split(" ")[0]} 00:00:00`).getTime(),{m:l,s:o}=h(i);return a(t,n,e-60*t*60*1e3-60*l*1e3-1e3*o,r)},isMinuteDisabled:t=>{if(!p.row[p.connectField])return!1;const l=new Date(`${p.row[p.connectField].split(" ")[0]} ${n}:00:00`).getTime(),{s:o}=h(i);return a(t,r,e-60*t*1e3-1e3*o,l)},isSecondDisabled:t=>{if(!p.row[p.connectField])return!1;const i=new Date(`${p.row[p.connectField].split(" ")[0]} ${n}:${r}:00`).getTime();return a(t,l,e-1e3*t,i)}}}function S(e){return c(e)?t=>e(t,p.row):null}function h(e){return{h:e.getHours(),m:e.getMinutes(),s:e.getSeconds()}}return(e,t)=>(l(),a(o(D),s({ref_key:"formRef",ref:F},o(y),{"formatted-value":o(g),"onUpdate:formatted-value":t[0]||(t[0]=e=>u(g)?g.value=e:null)}),null,16,["formatted-value"]))}});export{f as default};
@@ -0,0 +1 @@
1
+ export declare function rowClickPlugin(): import("../../../../components/iho-table").TablePlugin;
@@ -0,0 +1 @@
1
+ import{onBeforeUnmount as e}from"vue";import"../../index.js";import{defineTablePlugin as o}from"../hooks/useTablePlugin.js";function n(){const n="rowClickPlugin",u=new Map;return o({name:n,apply(o){o.eventHooks.onCurrentChange.tap(n,((e,{uuid:o,rowConfig:n})=>{o&&!1!==(null==n?void 0:n.clickToCancel)&&u.set(o,!0)})),o.eventHooks.onCellClick.tap(n,(async({$table:e},{uuid:o,rowConfig:n})=>{o&&!1!==(null==n?void 0:n.clickToCancel)&&(u.get(o)?u.set(o,!1):e.clearCurrentRow())})),o.setupHooks.setup.tap(n,(o=>{e((()=>{o.value.uuid&&u.delete(o.value.uuid)}))}))}})}export{n as rowClickPlugin};
@@ -0,0 +1 @@
1
+ export declare function rowDragPlugin(): import("../../../../components/iho-table").TablePlugin;
@@ -0,0 +1 @@
1
+ import{promiseTimeout as e}from"@vueuse/shared";import{isFunction as l,cloneDeep as n}from"lodash-es";import{nextTick as o,onBeforeUnmount as t}from"vue";import"../../index.js";import i from"sortablejs";import d from"xe-utils";import{defineTablePlugin as r}from"../hooks/useTablePlugin.js";function a(){const n="rowDragPlugin",d=new Map;return r({name:n,apply(r){r.fieldHooks.fieldEnd.tapPromise(n,(async(n,{$table:t,emits:r})=>{const{uuid:a}=n,s=n.sortableConfig||{};a&&s.enable&&!d.get(a)&&(await o(),async function n(o=0){if(o>2)return;const c=function(){var e,l,n,o,i,d,r,a,u,s;const c=null==(o=null==(n=null==(l=null==(e=t.value)?void 0:e.$el)?void 0:l.querySelector)?void 0:n.call(l,".vxe-table--body"))?void 0:o.scrollWidth,v=(null==(r=null==(d=null==(i=t.value)?void 0:i.$el)?void 0:d.querySelector)?void 0:r.call(d,".vxe-table.is--scroll-x"))?".fixed-left--wrapper>.vxe-table--body tbody":".body--wrapper>.vxe-table--body tbody";return c?null==(s=null==(u=null==(a=t.value)?void 0:a.$el)?void 0:u.querySelector)?void 0:s.call(u,v):null}();if(c){const e=i.create(c,{handle:".col--seq",...s,onEnd:e=>{var n,o,i,d,a,c,v;const{oldIndex:f=0,newIndex:x=0}=e,p={oldIndex:f,newIndex:x},{virtualY:b}=(null==(n=t.value)?void 0:n.getScroll())||{};if(b){const e=(null==(d=null==(i=null==(o=t.value)?void 0:o.getTableData())?void 0:i.tableData)?void 0:d[f])||{},l=null!=(v=null!=(c=e.__currentIndex)?c:null==(a=t.value)?void 0:a.getVTRowIndex(e))?v:0,n=l+(x-f);e.__currentIndex=n,p.oldIndex=l,p.newIndex=n}const y={...e,...p,...u(e,p,t.value)};r("rowDrag",y),l(s.onEnd)&&s.onEnd(y)}});return d.set(a,e)}await e(100),n(++o)}())})),r.setupHooks.setup.tap(n,(e=>{t((()=>{var l,n;const o=null==(l=e.value)?void 0:l.uuid;o&&d.has(o)&&(null==(n=d.get(o))||n.destroy(),d.delete(o))}))}))}})}function u(e,l,o){var t;const i=null==(t=null==o?void 0:o.getTableData())?void 0:t.fullData,r=o.treeConfig&&o.treeConfig.transform?function(e,l){var o,t,i,r,a;const{oldIndex:u=0,newIndex:s=0}=e,c={children:"childrenList"},{fullData:v,tableData:f}=l.getTableData(),x=null==f?void 0:f[u],p=null==f?void 0:f[s-1],b=n(v),y=d.findTree(b,(e=>e.__id===x.__id),c);if(p){const e=null==(t=null==(o=l.$el)?void 0:o.querySelector)?void 0:t.call(o,".body--wrapper>.vxe-table--body tbody"),n=null==(r=null==(i=l.$el)?void 0:i.querySelector)?void 0:r.call(i,".fixed-left--wrapper>.vxe-table--body tbody"),v=d.findTree(b,(e=>e.__id===p.__id),c);if(d.findTree(x[c.children],(e=>e.__id===p.__id),c)){const l=e.children[u],o=e.children[s];return e.insertBefore(o,l),null==(a=null==n?void 0:n.insertBefore)||a.call(n,n.children[s],n.children[u]),console.log("不允许自己给自己拖动"),b}const f=y.items.splice(y.index,1)[0];l.isTreeExpandByRow(p)?p[c.children].splice(0,0,f):v.items.splice(v.index+(y.index<v.index?0:1),0,f)}else{const e=y.items.splice(y.index,1)[0];b.unshift(e)}return b}(e,o):function(e,l){var o;const{oldIndex:t=0,newIndex:i=0}=e,d=n((null==(o=null==l?void 0:l.getTableData())?void 0:o.fullData)||[]),r=d.splice(t,1)[0];return d.splice(i,0,r),d}(l,o);return{oldData:i,newData:r}}export{a as rowDragPlugin};
@@ -1 +1 @@
1
- export declare function variableHeightRendererPlugin(): import("../../../../../components/iho-table").TablePlugin;
1
+ export declare function variableHeightRendererPlugin(): import("../../../../components/iho-table").TablePlugin;
@@ -0,0 +1 @@
1
+ import{unref as e,onBeforeUnmount as t,shallowReactive as o,createVNode as l,defineComponent as n,inject as r,ref as a,computed as s,provide as i,watch as u,onMounted as d,h as c}from"vue";import{traverse as p,widthAppend as f}from"../../../../shared/utils/index.js";import{doAnimation as m}from"../../../../shared/utils/anime.js";import{useThrottleFn as h}from"@vueuse/core";import{promiseTimeout as g}from"@vueuse/shared";import{last as v,isFunction as x,isNumber as y}from"lodash-es";import"../../index.js";import{EDITABLE_WIDGET_TYPE as b,InjectionIhoTableUUID as I}from"../constants/index.js";import{useUUIDMap as T,IhoTableUtils as w}from"../utils/index.js";import{defineTablePlugin as R}from"../hooks/useTablePlugin.js";class D{constructor(){this.records={},this.maxRecords=o(new Map)}set(e,t,o){if(this.records[e]||(this.records[e]={}),this.records[e][t]===o)return;this.records[e][t]=o;const l=Math.max(...Object.values(this.records[e]),0);this.maxRecords.get(e)!==l&&this.maxRecords.set(e,l)}getMax(e){return this.maxRecords.get(e)||0}}const{getItemFromUUID:H,removeItemFromUUID:M}=T((()=>new D),!0),{getItemFromUUID:S,removeItemFromUUID:C,setItemFromUUID:U}=T((()=>null)),{getItemFromUUID:$,removeItemFromUUID:k,setItemFromUUID:F}=T((()=>{}));let j={};function E(t,o,{scrollTop:l=0}){var n,r;const{uuid:a,rowConfig:s={}}=o;if(!a)return;const i=H(a),{oSize:u=0,gt:d=100}=null!=(n=$(a))?n:{},{internalData:c,reactData:p}=t,{scrollYStore:f,elemStore:m,afterFullData:h,fullDataRowIdData:g}=c;if(d>h.length)return;const y=null!=(r=s.height)?r:36,b=m["main-body-wrapper"],I=b?e(b):null;let T=I?Math.max(8,Math.ceil(I.clientHeight/y)+2+u):8;const w=[0];let R=0;if(l&&h.find(((e,o)=>{const n=t.getRowSeq(e),r=(v(w)||0)+Math.max(y,i.getMax(n));if(w.push(r),r>l)return R=Math.max(0,o-u),T+=Math.min(R,u),!0})),R>0&&x(o.spanMethod)){const{spanMethod:e}=o,l={rowspan:1,colspan:1};for(;R>0;){if(!t.getColumns().some(((t,o)=>{const{rowspan:n,colspan:r}=e({column:t,columnIndex:o,$columnIndex:o,row:h[R],rowIndex:R,$rowIndex:R,_rowIndex:R,isHidden:!t.visible,fixed:t.fixed,type:t.type,visibleData:h})||l;if(0===n&&0===r)return R--,!0})))break}}const D=`${w[R]}px`,M=`${h.reduce(((e,o)=>{const l=t.getRowSeq(o);return e+Math.max(y,i.getMax(l))}),0)}px`;["main","left","right"].forEach((t=>{const o=m[`${t}-body-table`],n=o?e(o):null;n&&(n.style.marginTop=D,n.scrollTop=l),["header","body","footer"].forEach((o=>{const l=m[`${t}-${o}-ySpace`],n=l?e(l):null;n&&(n.style.height=M)}))}));const S=Math.min(h.length,R+T);if(f.startIndex===R&&f.endIndex===S)return;f.startIndex=R,f.endIndex=S;const C=h.slice(f.startIndex,f.endIndex);C.forEach(((e,o)=>{const l=t.getRowid(e),n=g[l];n&&(n.$index=o)})),p.tableData.length=0,p.tableData.push(...C)}const Y=h(E,300);function q(e){var t,o;return(!0===e.variableHeight||"1"===e.variableHeight)&&(null!=(o=null==(t=e.editRender)?void 0:t.name)?o:w.getCellType(e))!==b.SEPARATE}function L(){const o="variableHeightRendererPlugin";return R({name:o,vxe(e){j=n({props:{payload:{type:Object,required:!0}},setup(t){const o=r(I),n=r("$xetable"),p=a(),m=H(o),h=s((()=>t.payload.row[t.payload.column.field]));function v(){const{row:e,column:o}=t.payload,l=n.getRowSeq(e);if(!m||null==l||!p.value)return;const r=p.value.clientHeight;m.set(l,o.field,r)}i("updateCellHeight",v),u([()=>t.payload.rowIndex,()=>t.payload.column.field,h,()=>t.payload.column.renderWidth],(async()=>{await g(0),v()})),d((()=>{n&&!S(o)&&U(o,n),v()}));const b=s((()=>{var o,l,n,r,a;const s=null!=(l=null==(o=t.payload.column.editRender)?void 0:o.props)?l:{},i=null!=(r=null==(n=s.slots)?void 0:n.default)?r:s.slotFn;if(x(i))return i;const u=null==(a=t.payload.column.editRender)?void 0:a.name;if(u){const o=e.renderer.get(u);if(null==o?void 0:o.renderCell)return()=>o.renderCell(t.payload.column.editRender,t.payload)}return()=>h.value})),T=s((()=>{if(t.payload.column.treeNode)return"";const e=t.payload.column.renderWidth;return y(e)&&e>0?f(e-20-2):""}));return()=>l("div",{ref:p,style:{padding:"7px 0",width:T.value,overflow:"hidden"}},[c(b.value,t.payload)])}})},apply(n){function r(t){const o=S(t.uuid);if(!o)return;t.scrollY={enabled:!1},o.reactData.scrollYLoad=!1;const l=function(t){const o=t.internalData.elemStore["main-body-wrapper"];return o?e(o):null}(o);l&&E(o,t,{scrollTop:l.scrollTop})}function a(e){if(!e.uuid)return;const t=$(e.uuid);t&&(e.scrollY=t),setTimeout((()=>r(e)),300)}function s(e){return l(j,{payload:e},null)}n.dataHooks.dataStart.tap(o,a),n.eventHooks.onFilterChange.tap(o,((e,t)=>a(t))),n.eventHooks.onSortChange.tap(o,((e,t)=>a(t))),n.eventHooks.onToggleTreeExpand.tap(o,((e,t)=>a(t))),n.eventHooks.onResizableChange.tap(o,(async({column:e},t)=>{e.editRender&&e.editRender.props&&q(e.editRender.props)&&a(t)})),n.eventHooks.onScroll.tap(o,h(((e,t)=>{if(e.isX)return;const{uuid:o}=t;if(!o)return;const l=S(o);l&&E(l,t,e)}),100,!0,!0)),n.fieldHooks.field.tap(o,(e=>{if(q(e)){e.slots={...e.slots,default:s};const t=e.className,o="variable-height";e.className=t?function(e){return x(t)?[t(e),o]:[t,o]}:o}return e})),n.fieldHooks.fieldList.tap(o,((t,o,{$table:l})=>(o.uuid&&p(t,((t,n)=>{var a,s;if(q(t)){const t=null!=(s=null==(a=o.rowConfig)?void 0:a.height)?s:36,i=H(o.uuid),u=o.cellStyle;if(o.cellStyle=function(e){const o={};if(l.value){const n=Math.max(t,i.getMax(l.value.getRowSeq(e.row)));o.height=`${n}px`}return Object.assign(o,u?x(u)?u(e):u:null)},o.sortableConfig&&o.sortableConfig.enable){const t=o.sortableConfig.onEnd;o.sortableConfig.onEnd=function(l){const n=S(o.uuid);if(n){const{internalData:{elemStore:t}}=n,l=t["main-table-body"];l&&e(l)&&E(n,o,{scrollTop:e(l).scrollTop})}x(t)&&t(l)}}o.scrollY={...o.scrollY,mode:"default"},o.onWheel=function(t){let o=null,l=0,n=!0;return function(r){if(!t.uuid)return;const a=S(t.uuid);if(!a)return;const{internalData:s}=a,{isHover:i}=t.rowConfig||{},{deltaX:u,deltaY:d}=r,{refTableLeftBody:c,refTableRightBody:p,refTableBody:f}=a.getRefMaps(),h=d,g=u,v=h<0,x=e(f),y=x?x.$el:null;if(!y)return;if(v?y.scrollTop<=0:y.scrollTop>=y.scrollHeight-y.clientHeight)return;const b=y.scrollTop+h,I=y.scrollLeft+g;if(b===s.lastScrollTop)return;r.preventDefault(),s.lastScrollTop=b,s.lastScrollLeft=I,s.lastScrollTime=Date.now(),i&&a.clearHoverRow();const T=c.value,w=p.value,R=T?T.$el:null,D=w?w.$el:null,H=Math.min(100,Math.abs(Math.floor(h/2)));n&&(l=y.scrollTop,n=!1),l+=H*(v?-1:1),o&&o(),o=m(y.scrollTop,l,400,(e=>{y.scrollTop=e,R&&(R.scrollTop=e),D&&(D.scrollTop=e)}),"easeOutCubic",(()=>{l=y.scrollTop,n=!0})),Y(a,t,y)}}(o),setTimeout((()=>{F(o.uuid,o.scrollY),r(o)}),300),n()}})),t))),n.setupHooks.setup.tap(o,(e=>{t((()=>{e.value.uuid&&(M(e.value.uuid),C(e.value.uuid),k(e.value.uuid))}))}))}})}export{L as variableHeightRendererPlugin};