cnhis-design-vue 3.1.50-beta.11 → 3.1.50-beta.13

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 (62) hide show
  1. package/README.md +87 -87
  2. package/es/components/expand-field/src/components/form.vue2.js +1 -1
  3. package/es/components/expand-field/src/index.vue2.js +1 -1
  4. package/es/components/form-config/index.d.ts +186 -6
  5. package/es/components/form-config/src/FormConfig.vue.d.ts +186 -6
  6. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +90 -3
  7. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +93 -3
  8. package/es/components/form-config/src/hooks/useConfigurationField.js +1 -1
  9. package/es/components/form-render/index.d.ts +90 -3
  10. package/es/components/form-render/src/FormRender.vue.d.ts +90 -3
  11. package/es/components/form-render/src/FormRender.vue2.js +1 -1
  12. package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +90 -3
  13. package/es/components/form-render/src/components/renderer/select.d.ts +3 -0
  14. package/es/components/form-render/src/components/renderer/select.js +1 -1
  15. package/es/components/form-render/src/hooks/useFieldListAdaptor.d.ts +2 -5
  16. package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
  17. package/es/components/form-render/src/hooks/useFieldNormalize.d.ts +173 -4
  18. package/es/components/form-render/src/hooks/useFieldNormalize.js +1 -1
  19. package/es/components/form-render/src/types/index.d.ts +1 -0
  20. package/es/components/iho-table/index.d.ts +26 -0
  21. package/es/components/iho-table/src/IhoTable.vue.d.ts +26 -0
  22. package/es/components/iho-table/src/hooks/tapHooks/useConfigHooks.d.ts +3 -1
  23. package/es/components/iho-table/src/plugins/keyboardEventPlugin/index.js +1 -1
  24. package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index.js +1 -1
  25. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/checkRendererPlugin.js +1 -1
  26. package/es/components/iho-table/src/plugins/varialbleHeightPlugin/index.js +1 -1
  27. package/es/components/iho-table/src/types/index.d.ts +4 -0
  28. package/es/components/info-header/index.d.ts +270 -9
  29. package/es/components/info-header/src/InfoHeader.vue.d.ts +270 -9
  30. package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +86 -3
  31. package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +86 -3
  32. package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +176 -6
  33. package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +90 -3
  34. package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
  35. package/es/components/select-label/src/LabelFormContent.vue2.js +1 -1
  36. package/es/components/select-person/src/SearchMultiple.vue.d.ts +6 -0
  37. package/es/components/shortcut-setter/index.d.ts +90 -3
  38. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +90 -3
  39. package/es/components/table-export-field/src/components/ExportModal.vue.d.ts +0 -3
  40. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +28 -0
  41. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.js +1 -1
  42. package/es/env.d.ts +25 -25
  43. package/es/shared/assets/img/failure.png.js +1 -1
  44. package/es/shared/assets/img/no-permission.png.js +1 -1
  45. package/es/shared/assets/img/nodata.png.js +1 -1
  46. package/es/shared/assets/img/notfound.png.js +1 -1
  47. package/es/shared/assets/img/qr.png.js +1 -1
  48. package/es/shared/assets/img/success.png.js +1 -1
  49. package/es/shared/assets/img/video.png.js +1 -1
  50. package/es/shared/assets/img/video_default_cover.png.js +1 -1
  51. package/es/shared/assets/img/xb_big.png.js +1 -1
  52. package/es/shared/assets/img/xb_small.png.js +1 -1
  53. package/es/shared/package.json.js +1 -1
  54. package/es/shared/utils/index.d.ts +3 -3
  55. package/package.json +2 -2
  56. package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
  57. package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +0 -1
  58. package/es/components/bpmn-workflow/types/ModelingModule.d.ts +0 -1
  59. package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +0 -1
  60. package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +0 -86
  61. package/es/shared/utils/fabricjs/index.d.ts +0 -6823
  62. package/es/shared/utils/tapable/index.d.ts +0 -139
@@ -1,9 +1,178 @@
1
1
  import { SyncWaterfallHook } from '../../../../../es/shared/utils/tapable';
2
2
  import { FieldItem } from '../types';
3
3
  export declare function useFieldNormalize(): {
4
- FieldNormalizeWaterfallHook: SyncWaterfallHook<FieldItem, import("../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
5
- FieldListNormalizeWaterfallHook: SyncWaterfallHook<[FieldItem[], {
4
+ FieldNormalizeWaterfallHook: SyncWaterfallHook<[FieldItem, Partial<{
5
+ fieldList: FieldItem[];
6
+ initialData: import("../../../../../es/shared/types").AnyObject;
7
+ fieldVisitor: import("../types").FieldVisitor;
6
8
  column: number;
7
- outBordered?: boolean | undefined;
8
- }], import("../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
9
+ maxHeight: string | number;
10
+ anchor: boolean;
11
+ parallelism: number;
12
+ schema: import("@formily/json-schema").Stringify<{
13
+ [key: symbol]: any;
14
+ [key: `x-${string}`]: any;
15
+ [key: `x-${number}`]: any;
16
+ version?: string | undefined;
17
+ name?: import("@formily/json-schema").SchemaKey | undefined;
18
+ title?: any;
19
+ description?: any;
20
+ default?: any;
21
+ readOnly?: boolean | undefined;
22
+ writeOnly?: boolean | undefined;
23
+ type?: import("@formily/json-schema").SchemaTypes | undefined;
24
+ enum?: import("@formily/json-schema").SchemaEnum<any> | undefined;
25
+ const?: any;
26
+ multipleOf?: number | undefined;
27
+ maximum?: number | undefined;
28
+ exclusiveMaximum?: number | undefined;
29
+ minimum?: number | undefined;
30
+ exclusiveMinimum?: number | undefined;
31
+ maxLength?: number | undefined;
32
+ minLength?: number | undefined;
33
+ pattern?: string | RegExp | undefined;
34
+ maxItems?: number | undefined;
35
+ minItems?: number | undefined;
36
+ uniqueItems?: boolean | undefined;
37
+ maxProperties?: number | undefined;
38
+ minProperties?: number | undefined;
39
+ required?: string | boolean | string[] | undefined;
40
+ format?: string | undefined;
41
+ $ref?: string | undefined;
42
+ $namespace?: string | undefined;
43
+ definitions?: import("@formily/json-schema").SchemaProperties<any, any, any, any, any, any, any, any> | undefined;
44
+ properties?: import("@formily/json-schema").SchemaProperties<any, any, any, any, any, any, any, any> | undefined;
45
+ items?: import("@formily/json-schema").SchemaItems<any, any, any, any, any, any, any, any> | undefined;
46
+ additionalItems?: import("@formily/json-schema").Stringify<any> | undefined;
47
+ patternProperties?: import("@formily/json-schema").SchemaProperties<any, any, any, any, any, any, any, any> | undefined;
48
+ additionalProperties?: import("@formily/json-schema").Stringify<any> | undefined;
49
+ "x-value"?: any;
50
+ "x-index"?: number | undefined;
51
+ "x-pattern"?: any;
52
+ "x-display"?: any;
53
+ "x-validator"?: any;
54
+ "x-decorator"?: any;
55
+ "x-decorator-props"?: any;
56
+ "x-component"?: any;
57
+ "x-component-props"?: any;
58
+ "x-reactions"?: import("@formily/json-schema").SchemaReactions<any> | undefined;
59
+ "x-content"?: any;
60
+ "x-data"?: any;
61
+ "x-visible"?: boolean | undefined;
62
+ "x-hidden"?: boolean | undefined;
63
+ "x-disabled"?: boolean | undefined;
64
+ "x-editable"?: boolean | undefined;
65
+ "x-read-only"?: boolean | undefined;
66
+ "x-read-pretty"?: boolean | undefined;
67
+ "x-compile-omitted"?: string[] | undefined;
68
+ }>;
69
+ components: Record<string, import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | import("vue").FunctionalComponent<{}, {}>>;
70
+ scope: import("../../../../../es/shared/types").AnyObject;
71
+ annotation: import("../../../../../es/shared/types").AnyObject;
72
+ consumer: boolean;
73
+ uuid: string;
74
+ lifeCycle: Partial<{
75
+ onSetup(): void;
76
+ beforeRequest(fieldKey: string, params?: import("../../../../../es/shared/types").AnyObject | undefined, payload?: import("../../../../../es/shared/types").AnyObject | undefined): void | import("../../../../../es/shared/types").UndefinedAble<import("../../../../../es/shared/types").AnyObject>;
77
+ afterRequest(fieldKey: string, res?: any, payload?: import("../../../../../es/shared/types").AnyObject | undefined): import("../../../../../es/shared/types").AnyObject[];
78
+ afterOptionInit(fieldKey: string, options: import("../../../../../es/shared/types").AnyObject[], payload?: import("../../../../../es/shared/types").AnyObject | undefined): void;
79
+ }>;
80
+ businessFormatter: import("../types").FormBusinessFormatter;
81
+ requestInstance: import("./useFormRequest").RequestInstance;
82
+ enterToNextWidget: boolean | ((fieldItem: FieldItem) => boolean | void);
83
+ lowCodeReactions: import("../types").FormLowCodeReactions.Config[];
84
+ linebarAutoHidden: boolean;
85
+ bordered: string | boolean;
86
+ uniqueCacheData: boolean;
87
+ operationalForm: import("../../../../../es/shared/types").FormOperationalConfig[];
88
+ outBordered: boolean;
89
+ forceClearable: boolean;
90
+ }>], import("../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
91
+ FieldListNormalizeWaterfallHook: SyncWaterfallHook<[FieldItem[], Partial<{
92
+ fieldList: FieldItem[];
93
+ initialData: import("../../../../../es/shared/types").AnyObject;
94
+ fieldVisitor: import("../types").FieldVisitor;
95
+ column: number;
96
+ maxHeight: string | number;
97
+ anchor: boolean;
98
+ parallelism: number;
99
+ schema: import("@formily/json-schema").Stringify<{
100
+ [key: symbol]: any;
101
+ [key: `x-${string}`]: any;
102
+ [key: `x-${number}`]: any;
103
+ version?: string | undefined;
104
+ name?: import("@formily/json-schema").SchemaKey | undefined;
105
+ title?: any;
106
+ description?: any;
107
+ default?: any;
108
+ readOnly?: boolean | undefined;
109
+ writeOnly?: boolean | undefined;
110
+ type?: import("@formily/json-schema").SchemaTypes | undefined;
111
+ enum?: import("@formily/json-schema").SchemaEnum<any> | undefined;
112
+ const?: any;
113
+ multipleOf?: number | undefined;
114
+ maximum?: number | undefined;
115
+ exclusiveMaximum?: number | undefined;
116
+ minimum?: number | undefined;
117
+ exclusiveMinimum?: number | undefined;
118
+ maxLength?: number | undefined;
119
+ minLength?: number | undefined;
120
+ pattern?: string | RegExp | undefined;
121
+ maxItems?: number | undefined;
122
+ minItems?: number | undefined;
123
+ uniqueItems?: boolean | undefined;
124
+ maxProperties?: number | undefined;
125
+ minProperties?: number | undefined;
126
+ required?: string | boolean | string[] | undefined;
127
+ format?: string | undefined;
128
+ $ref?: string | undefined;
129
+ $namespace?: string | undefined;
130
+ definitions?: import("@formily/json-schema").SchemaProperties<any, any, any, any, any, any, any, any> | undefined;
131
+ properties?: import("@formily/json-schema").SchemaProperties<any, any, any, any, any, any, any, any> | undefined;
132
+ items?: import("@formily/json-schema").SchemaItems<any, any, any, any, any, any, any, any> | undefined;
133
+ additionalItems?: import("@formily/json-schema").Stringify<any> | undefined;
134
+ patternProperties?: import("@formily/json-schema").SchemaProperties<any, any, any, any, any, any, any, any> | undefined;
135
+ additionalProperties?: import("@formily/json-schema").Stringify<any> | undefined;
136
+ "x-value"?: any;
137
+ "x-index"?: number | undefined;
138
+ "x-pattern"?: any;
139
+ "x-display"?: any;
140
+ "x-validator"?: any;
141
+ "x-decorator"?: any;
142
+ "x-decorator-props"?: any;
143
+ "x-component"?: any;
144
+ "x-component-props"?: any;
145
+ "x-reactions"?: import("@formily/json-schema").SchemaReactions<any> | undefined;
146
+ "x-content"?: any;
147
+ "x-data"?: any;
148
+ "x-visible"?: boolean | undefined;
149
+ "x-hidden"?: boolean | undefined;
150
+ "x-disabled"?: boolean | undefined;
151
+ "x-editable"?: boolean | undefined;
152
+ "x-read-only"?: boolean | undefined;
153
+ "x-read-pretty"?: boolean | undefined;
154
+ "x-compile-omitted"?: string[] | undefined;
155
+ }>;
156
+ components: Record<string, import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | import("vue").FunctionalComponent<{}, {}>>;
157
+ scope: import("../../../../../es/shared/types").AnyObject;
158
+ annotation: import("../../../../../es/shared/types").AnyObject;
159
+ consumer: boolean;
160
+ uuid: string;
161
+ lifeCycle: Partial<{
162
+ onSetup(): void;
163
+ beforeRequest(fieldKey: string, params?: import("../../../../../es/shared/types").AnyObject | undefined, payload?: import("../../../../../es/shared/types").AnyObject | undefined): void | import("../../../../../es/shared/types").UndefinedAble<import("../../../../../es/shared/types").AnyObject>;
164
+ afterRequest(fieldKey: string, res?: any, payload?: import("../../../../../es/shared/types").AnyObject | undefined): import("../../../../../es/shared/types").AnyObject[];
165
+ afterOptionInit(fieldKey: string, options: import("../../../../../es/shared/types").AnyObject[], payload?: import("../../../../../es/shared/types").AnyObject | undefined): void;
166
+ }>;
167
+ businessFormatter: import("../types").FormBusinessFormatter;
168
+ requestInstance: import("./useFormRequest").RequestInstance;
169
+ enterToNextWidget: boolean | ((fieldItem: FieldItem) => boolean | void);
170
+ lowCodeReactions: import("../types").FormLowCodeReactions.Config[];
171
+ linebarAutoHidden: boolean;
172
+ bordered: string | boolean;
173
+ uniqueCacheData: boolean;
174
+ operationalForm: import("../../../../../es/shared/types").FormOperationalConfig[];
175
+ outBordered: boolean;
176
+ forceClearable: boolean;
177
+ }>], import("../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
9
178
  };
@@ -1 +1 @@
1
- import{arrayed as e,uuidGenerator as t,traverse as l}from"../../../../shared/utils/index.js";import"../../../../shared/utils/tapable/SyncHook.js";import"../../../../shared/utils/tapable/SyncBailHook.js";import r from"../../../../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{last as o,isString as i}from"lodash-es";import{FIELD_BUSINESS_TYPE as s}from"../constants/index.js";function a(){const a=new r(["fieldList","options"]),p=new r(["fieldItem"]);p.tap("__block",(e=>(["CHECKBOX_BLOCK","RADIO_BLOCK"].includes(e.html_type)&&(e.__vertical=!0),e))),p.tap("__age",(t=>("AGE"===t.html_type&&(t.html_type="INPUT_NUMBER",t.reactions=t.reactions?e(t.reactions):[],t.reactions.push({target:t.val_key_unit,fulfill:{state:{disabled:"{{$self.disabled}}"}}}),t.suffixConfig=[{validate:{obj_type:s.AGE_UNIT},val_key:t.val_key_unit,html_type:"SELECT",option:t.option,urlConfig:t.urlConfig}]),t))),p.tap("__multiple_select",(e=>{const{html_type:t,multi_select:l,__multiple:r}=e;return e.__multiple="SEARCH"!==t&&("SEARCH_MORE"===t||("SELECT"===t?"0"===l:r)),e}));const _=[[["SEARCH","PHONE_TYPE","IDCARD_TYPE","SEARCH_MORE"],"SELECT"],["DIGITAL","INPUT_NUMBER"],["CHECKBOX_BLOCK","CHECKBOX"],["RADIO_BLOCK","RADIO"],[["DATE-INPUT","DATETIME-INPUT"],"DATE"],["SWITCH_COMPONENT","SWITCH"],["SLIDER_COMPONENT","SLIDER"],["LEVEL_SEARCH_CASCADE","LEVEL_SEARCH_CASCADER"],["SEARCH_CASCADE","SEARCH_CASCADER"]];p.tap("__normalize",(e=>(_.some((([t,l])=>(Array.isArray(t)?t.includes(e.html_type):t===e.html_type)&&(e.html_type=l))),e)));const n=new Map([[["SELECT","SEARCH","SEARCH_MORE"],new Map([["H_TILE",e=>e.html_type=e.__multiple?"CHECKBOX":"RADIO"],["V_TILE",e=>{e.html_type=e.__multiple?"CHECKBOX":"RADIO",e.__vertical=!0}]])],["RADIO",new Map([["DROPDOWN",e=>e.html_type="SELECT"]])],["CHECKBOX",new Map([["DROPDOWN",e=>{e.__multiple=!0,e.html_type="SELECT"}]])]]);return p.tap({stage:9999,name:"__show_mode"},(t=>t.show_mode?([...n].some((([l,r])=>{if(!e(l).includes(t.html_type))return;const o=r.get(t.show_mode);return o&&o(t),!0})),t):t)),a.tap("__out_bordered",((e,{column:l,outBordered:r})=>{if(!r)return e;let i=0;return e.reduce(((r,s,a)=>{const p=2*(s.elem_width||3);return i+=p,i===l&&a<e.length-1?(i=0,r.push(s),r.push({val_key:`${t()}`,html_type:"LINE_BREAKS",lineBreaksBorder:!0})):i>l?(i=p,r.push({val_key:`${t()}`,html_type:"LINE_BREAKS",lineBreaksBorder:!0}),r.push(s)):(o(r)&&(o(r).fieldItemBorder=!0),r.push(s)),r}),[])})),a.tap("__prefix/suffix",(e=>{const t=[];return l(e,(r=>{["prefix","suffix"].forEach((o=>{const s=r[o];if(!i(s))return;const a=s.match("#{(.+)}");if(!a)return;const p=i(a[1])&&function(t){let r=null;return l(e,((e,l)=>{e.val_key===t&&(r=e,l())}),["children","properties"]),r}(a[1].trim());p&&(Reflect.deleteProperty(r,o),r[`${o}Config`]=r[`${o}Config`]||[],r[`${o}Config`].push(p),t.push(p))}))}),["children","properties"]),t.length?function e(l){return l.reduce(((l,r)=>(t.includes(r)||(l.push(r),r.properties&&(r.properties=e(r.properties)),r.children&&(r.children=e(r.children))),l)),[])}(e):e})),{FieldNormalizeWaterfallHook:p,FieldListNormalizeWaterfallHook:a}}export{a as useFieldNormalize};
1
+ import{arrayed as e,uuidGenerator as t,traverse as r}from"../../../../shared/utils/index.js";import"../../../../shared/utils/tapable/SyncHook.js";import"../../../../shared/utils/tapable/SyncBailHook.js";import l from"../../../../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{last as o,isString as s}from"lodash-es";import{FIELD_BUSINESS_TYPE as i}from"../constants/index.js";function a(){const a=new l(["fieldList","props"]),p=new l(["fieldItem","props"]);p.tap("__forceClearable",((e,t)=>(t.forceClearable&&(e.componentProps={...e.componentProps,clearable:!0}),e))),p.tap("__block",(e=>(["CHECKBOX_BLOCK","RADIO_BLOCK"].includes(e.html_type)&&(e.__vertical=!0),e))),p.tap("__age",(t=>("AGE"===t.html_type&&(t.html_type="INPUT_NUMBER",t.reactions=t.reactions?e(t.reactions):[],t.reactions.push({target:t.val_key_unit,fulfill:{state:{disabled:"{{$self.disabled}}"}}}),t.suffixConfig=[{validate:{obj_type:i.AGE_UNIT},val_key:t.val_key_unit,html_type:"SELECT",option:t.option,urlConfig:t.urlConfig}]),t))),p.tap("__multiple_select",(e=>{const{html_type:t,multi_select:r,__multiple:l}=e;return e.__multiple="SEARCH"!==t&&("SEARCH_MORE"===t||("SELECT"===t?"0"===r:l)),e}));const _=[[["SEARCH","PHONE_TYPE","IDCARD_TYPE","SEARCH_MORE"],"SELECT"],["DIGITAL","INPUT_NUMBER"],["CHECKBOX_BLOCK","CHECKBOX"],["RADIO_BLOCK","RADIO"],[["DATE-INPUT","DATETIME-INPUT"],"DATE"],["SWITCH_COMPONENT","SWITCH"],["SLIDER_COMPONENT","SLIDER"],["LEVEL_SEARCH_CASCADE","LEVEL_SEARCH_CASCADER"],["SEARCH_CASCADE","SEARCH_CASCADER"]];p.tap("__normalize",(e=>(_.some((([t,r])=>(Array.isArray(t)?t.includes(e.html_type):t===e.html_type)&&(e.html_type=r))),e)));const n=new Map([[["SELECT","SEARCH","SEARCH_MORE"],new Map([["H_TILE",e=>e.html_type=e.__multiple?"CHECKBOX":"RADIO"],["V_TILE",e=>{e.html_type=e.__multiple?"CHECKBOX":"RADIO",e.__vertical=!0}]])],["RADIO",new Map([["DROPDOWN",e=>e.html_type="SELECT"]])],["CHECKBOX",new Map([["DROPDOWN",e=>{e.__multiple=!0,e.html_type="SELECT"}]])]]);return p.tap({stage:9999,name:"__show_mode"},(t=>t.show_mode?([...n].some((([r,l])=>{if(!e(r).includes(t.html_type))return;const o=l.get(t.show_mode);return o&&o(t),!0})),t):t)),a.tap("__out_bordered",((e,{column:r,outBordered:l})=>{if(!l)return e;let s=0;return e.reduce(((l,i,a)=>{const p=2*(i.elem_width||3);return s+=p,s===r&&a<e.length-1?(s=0,l.push(i),l.push({val_key:`${t()}`,html_type:"LINE_BREAKS",lineBreaksBorder:!0})):s>r?(s=p,l.push({val_key:`${t()}`,html_type:"LINE_BREAKS",lineBreaksBorder:!0}),l.push(i)):(o(l)&&(o(l).fieldItemBorder=!0),l.push(i)),l}),[])})),a.tap("__prefix/suffix",(e=>{const t=[];return r(e,(l=>{["prefix","suffix"].forEach((o=>{const i=l[o];if(!s(i))return;const a=i.match("#{(.+)}");if(!a)return;const p=s(a[1])&&function(t){let l=null;return r(e,((e,r)=>{e.val_key===t&&(l=e,r())}),["children","properties"]),l}(a[1].trim());p&&(Reflect.deleteProperty(l,o),l[`${o}Config`]=l[`${o}Config`]||[],l[`${o}Config`].push(p),t.push(p))}))}),["children","properties"]),t.length?function e(r){return r.reduce(((r,l)=>(t.includes(l)||(r.push(l),l.properties&&(l.properties=e(l.properties)),l.children&&(l.children=e(l.children))),r)),[])}(e):e})),{FieldNormalizeWaterfallHook:p,FieldListNormalizeWaterfallHook:a}}export{a as useFieldNormalize};
@@ -144,6 +144,7 @@ export declare type FormRenderProps = Partial<{
144
144
  uniqueCacheData: boolean;
145
145
  operationalForm: FormOperationalConfig[];
146
146
  outBordered: boolean;
147
+ forceClearable: boolean;
147
148
  }>;
148
149
  export declare type FormBusinessFormatter = (payload: {
149
150
  fieldKey: string;
@@ -868,6 +868,18 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
868
868
  trigger?: "default" | "cell" | "row" | undefined;
869
869
  highlight?: boolean | undefined;
870
870
  strict?: boolean | undefined;
871
+ slots?: {
872
+ title?: string | ((params: import("vxe-table").VxeColumnPropTypes.HeaderSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
873
+ radio?: string | ((params: import("vxe-table").VxeColumnPropTypes.DefaultSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
874
+ checkbox?: string | ((params: import("vxe-table").VxeColumnPropTypes.DefaultSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
875
+ default?: string | ((params: import("vxe-table").VxeColumnPropTypes.DefaultSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
876
+ header?: string | ((params: import("vxe-table").VxeColumnPropTypes.HeaderSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
877
+ footer?: string | ((params: import("vxe-table").VxeColumnPropTypes.FooterSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
878
+ content?: string | ((params: import("vxe-table").VxeColumnPropTypes.ContentSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
879
+ filter?: string | ((params: import("vxe-table").VxeColumnPropTypes.FilterSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
880
+ edit?: string | ((params: import("vxe-table").VxeColumnPropTypes.EditSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
881
+ icon?: string | ((params: import("vxe-table").VxeColumnPropTypes.IconSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
882
+ } | undefined;
871
883
  } | undefined;
872
884
  checkboxConfig?: {
873
885
  reserve?: boolean | undefined;
@@ -2111,6 +2123,7 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
2111
2123
  isSingleSelect?: import("../../../es/shared/types").MaybeString<0 | 1> | undefined;
2112
2124
  hideSettingBtn?: import("../../../es/shared/types").MaybeString<0 | 1> | undefined;
2113
2125
  showSeq?: boolean | undefined;
2126
+ forceClearable?: boolean | undefined;
2114
2127
  selectType?: "checkbox" | "radio" | null | undefined;
2115
2128
  rowGroupSetting?: {
2116
2129
  firstRowGroup?: {
@@ -3356,6 +3369,18 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
3356
3369
  trigger?: "default" | "cell" | "row" | undefined;
3357
3370
  highlight?: boolean | undefined;
3358
3371
  strict?: boolean | undefined;
3372
+ slots?: {
3373
+ title?: string | ((params: import("vxe-table").VxeColumnPropTypes.HeaderSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
3374
+ radio?: string | ((params: import("vxe-table").VxeColumnPropTypes.DefaultSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
3375
+ checkbox?: string | ((params: import("vxe-table").VxeColumnPropTypes.DefaultSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
3376
+ default?: string | ((params: import("vxe-table").VxeColumnPropTypes.DefaultSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
3377
+ header?: string | ((params: import("vxe-table").VxeColumnPropTypes.HeaderSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
3378
+ footer?: string | ((params: import("vxe-table").VxeColumnPropTypes.FooterSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
3379
+ content?: string | ((params: import("vxe-table").VxeColumnPropTypes.ContentSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
3380
+ filter?: string | ((params: import("vxe-table").VxeColumnPropTypes.FilterSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
3381
+ edit?: string | ((params: import("vxe-table").VxeColumnPropTypes.EditSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
3382
+ icon?: string | ((params: import("vxe-table").VxeColumnPropTypes.IconSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
3383
+ } | undefined;
3359
3384
  } | undefined;
3360
3385
  checkboxConfig?: {
3361
3386
  reserve?: boolean | undefined;
@@ -4539,6 +4564,7 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
4539
4564
  isSingleSelect?: import("../../../es/shared/types").MaybeString<0 | 1> | undefined;
4540
4565
  hideSettingBtn?: import("../../../es/shared/types").MaybeString<0 | 1> | undefined;
4541
4566
  showSeq?: boolean | undefined;
4567
+ forceClearable?: boolean | undefined;
4542
4568
  selectType?: "checkbox" | "radio" | null | undefined;
4543
4569
  rowGroupSetting?: {
4544
4570
  firstRowGroup?: {
@@ -867,6 +867,18 @@ declare const _default: import("vue").DefineComponent<{
867
867
  trigger?: "default" | "cell" | "row" | undefined;
868
868
  highlight?: boolean | undefined;
869
869
  strict?: boolean | undefined;
870
+ slots?: {
871
+ title?: string | ((params: import("vxe-table").VxeColumnPropTypes.HeaderSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
872
+ radio?: string | ((params: import("vxe-table").VxeColumnPropTypes.DefaultSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
873
+ checkbox?: string | ((params: import("vxe-table").VxeColumnPropTypes.DefaultSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
874
+ default?: string | ((params: import("vxe-table").VxeColumnPropTypes.DefaultSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
875
+ header?: string | ((params: import("vxe-table").VxeColumnPropTypes.HeaderSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
876
+ footer?: string | ((params: import("vxe-table").VxeColumnPropTypes.FooterSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
877
+ content?: string | ((params: import("vxe-table").VxeColumnPropTypes.ContentSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
878
+ filter?: string | ((params: import("vxe-table").VxeColumnPropTypes.FilterSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
879
+ edit?: string | ((params: import("vxe-table").VxeColumnPropTypes.EditSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
880
+ icon?: string | ((params: import("vxe-table").VxeColumnPropTypes.IconSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
881
+ } | undefined;
870
882
  } | undefined;
871
883
  checkboxConfig?: {
872
884
  reserve?: boolean | undefined;
@@ -2110,6 +2122,7 @@ declare const _default: import("vue").DefineComponent<{
2110
2122
  isSingleSelect?: import("../../../../es/shared/types").MaybeString<0 | 1> | undefined;
2111
2123
  hideSettingBtn?: import("../../../../es/shared/types").MaybeString<0 | 1> | undefined;
2112
2124
  showSeq?: boolean | undefined;
2125
+ forceClearable?: boolean | undefined;
2113
2126
  selectType?: "checkbox" | "radio" | null | undefined;
2114
2127
  rowGroupSetting?: {
2115
2128
  firstRowGroup?: {
@@ -3355,6 +3368,18 @@ declare const _default: import("vue").DefineComponent<{
3355
3368
  trigger?: "default" | "cell" | "row" | undefined;
3356
3369
  highlight?: boolean | undefined;
3357
3370
  strict?: boolean | undefined;
3371
+ slots?: {
3372
+ title?: string | ((params: import("vxe-table").VxeColumnPropTypes.HeaderSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
3373
+ radio?: string | ((params: import("vxe-table").VxeColumnPropTypes.DefaultSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
3374
+ checkbox?: string | ((params: import("vxe-table").VxeColumnPropTypes.DefaultSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
3375
+ default?: string | ((params: import("vxe-table").VxeColumnPropTypes.DefaultSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
3376
+ header?: string | ((params: import("vxe-table").VxeColumnPropTypes.HeaderSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
3377
+ footer?: string | ((params: import("vxe-table").VxeColumnPropTypes.FooterSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
3378
+ content?: string | ((params: import("vxe-table").VxeColumnPropTypes.ContentSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
3379
+ filter?: string | ((params: import("vxe-table").VxeColumnPropTypes.FilterSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
3380
+ edit?: string | ((params: import("vxe-table").VxeColumnPropTypes.EditSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
3381
+ icon?: string | ((params: import("vxe-table").VxeColumnPropTypes.IconSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
3382
+ } | undefined;
3358
3383
  } | undefined;
3359
3384
  checkboxConfig?: {
3360
3385
  reserve?: boolean | undefined;
@@ -4538,6 +4563,7 @@ declare const _default: import("vue").DefineComponent<{
4538
4563
  isSingleSelect?: import("../../../../es/shared/types").MaybeString<0 | 1> | undefined;
4539
4564
  hideSettingBtn?: import("../../../../es/shared/types").MaybeString<0 | 1> | undefined;
4540
4565
  showSeq?: boolean | undefined;
4566
+ forceClearable?: boolean | undefined;
4541
4567
  selectType?: "checkbox" | "radio" | null | undefined;
4542
4568
  rowGroupSetting?: {
4543
4569
  firstRowGroup?: {
@@ -14,7 +14,9 @@ declare class ConfigHooks extends AbstractConfigHooks {
14
14
  readonly seqConfig: SyncWaterfallHook<[import("vxe-table").VxeTablePropTypes.SeqConfig | undefined, IhoTableConfig, IhoTableHandlerContext<true>], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
15
15
  readonly sortConfig: SyncWaterfallHook<[import("vxe-table").VxeTablePropTypes.SortConfig | undefined, IhoTableConfig, IhoTableHandlerContext<true>], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
16
16
  readonly filterConfig: SyncWaterfallHook<[import("vxe-table").VxeTablePropTypes.FilterConfig | undefined, IhoTableConfig, IhoTableHandlerContext<true>], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
17
- readonly radioConfig: SyncWaterfallHook<[import("vxe-table").VxeTablePropTypes.RadioConfig | undefined, IhoTableConfig, IhoTableHandlerContext<true>], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
17
+ readonly radioConfig: SyncWaterfallHook<[(import("vxe-table").VxeTablePropTypes.RadioConfig & Partial<import("vxe-table").VxeTablePropTypes.RadioConfig & {
18
+ slots: import("vxe-table").VxeColumnPropTypes.Slots;
19
+ }>) | undefined, IhoTableConfig, IhoTableHandlerContext<true>], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
18
20
  readonly checkboxConfig: SyncWaterfallHook<[(import("vxe-table").VxeTablePropTypes.CheckboxConfig & Partial<import("vxe-table").VxeTablePropTypes.CheckboxConfig & {
19
21
  slots: import("vxe-table").VxeColumnPropTypes.Slots;
20
22
  maxCheckSize: number;
@@ -1 +1 @@
1
- import{unref as e}from"vue";import{promiseTimeout as n}from"@vueuse/shared";import"../../../index.js";import{useSessionStorage as t}from"@vueuse/core";import{isString as o,trim as i,isEmpty as l,isEqual as r,isFunction as u}from"lodash-es";import{selectOptionsMap as d}from"../rendererPlugins/editableWidgets/hooks/useSelectOption.js";import{IhoTableUtils as a}from"../../utils/index.js";import{EDITABLE_WIDGET_TYPE as s}from"../../constants/index.js";import{parse as c,isValid as p,compareDesc as f}from"date-fns";import{defineTablePlugin as m}from"../../hooks/useTablePlugin.js";function v(){const v="keyboardEventPlugin",g=t("ihoTableClipData","");return m({name:v,apply(t){function m(n,t,m,v,w){var b,y;if(!(null==(b=null==m?void 0:m.keyboardConfig)?void 0:b.isClip))return;const{row:C,column:R}=t.getSelectedCell()||t.getEditRecord()||{};if(!C||!R||!E(R,s.SELECT)&&e(g)===C[R.field])return;const x=m.uuid&&E(R,s.SELECT)&&d.get(m.uuid)[R.field],T=C[R.field];if("copy"===n){const e=(null==(y=(x||[]).filter((e=>T.includes(e.value))))?void 0:y.map((e=>e.label)).join(","))||T;g.value=e}else{if(o(e(g))&&(g.value=i(e(g)||"")),!e(g)||!function(e){var n;const t=null==(n=e.editRender)?void 0:n.props;return t&&Object.keys(s).includes(a.getCellType(t))}(R)||C.$__SEPARATE||!function(e,n,t,o){var i,l;const{beforeEditMethod:r}=n.editConfig||{},d={rowIndex:null!=(i=e.getRowIndex(t))?i:0,columnIndex:null!=(l=e.getColumnIndex(o))?l:0};return!r||u(r)&&r({row:t,column:o,...d,$table:e,$grid:void 0})}(t,m,C,R))return;if(E(R,s.DATE)&&function(n,t){var i;const l=null==(i=n.editRender)?void 0:i.props,r=e(g)||"";return!p(new Date(r))||o(l.connectField)&&t[l.connectField]&&(l.isStartDate&&f(new Date(r),new Date(t[l.connectField]))<0||l.isEndDate&&f(new Date(r),new Date(t[l.connectField]))>0)}(R,C))return;if(E(R,s.NUMBER)&&!/^-?\d*\.?\d+$/.test((e(g)||"").toString()))return;if(E(R,s.TIME)&&function(n){var t,o;const i=e(g)||"",l=null==(t=n.editRender)?void 0:t.props,r=c(i,(null==(o=null==l?void 0:l.componentProps)?void 0:o.valueFormat)||"HH:mm",new Date);return!p(r)}(R))return;let n=e(g)||"";if(x&&!l(x)){const e=x.filter((e=>n.split(",").includes(e.label))).map((e=>e.value));if(l(e))return;if(function(e){var n,t;const o=null==(n=e.editRender)?void 0:n.props;return E(e,s.SELECT)&&(null==(t=o.componentProps)?void 0:t.multiple)}(R)){if(r(T,e))return;n=e}else{if(e.includes(T))return;n=e[0]}}C[R.field]=n,v("formChange",{column:R,row:C,oldValue:T,value:n,index:t.getRowIndex(C)}),E(R,s.SEPARATE)&&(null==w||w())}}function E(e,n){var t;const o=null==(t=e.editRender)?void 0:t.props;return o&&a.getCellType(o)===n}t.eventHooks.onCopy.tap(v,(({$table:e},n,{emits:t})=>m("copy",e,n,t))),t.eventHooks.onPaste.tap(v,(({$table:e},n,{emits:t,updateTableDataRef:o})=>m("paste",e,n,t,o))),t.eventHooks.onKeydown.tap(v,(async({$event:e,$table:t},o,{emits:i})=>{await n(0);const{row:l,column:r}=t.getSelectedCell()||t.getEditRecord()||{};if(!l||!r)return;i("keyboard",{$table:t,key:e.key,index:t.getRowIndex(l),value:l[r.field],row:l,column:r})}))}})}export{v as keyboardEventPlugin};
1
+ import{unref as e}from"vue";import{promiseTimeout as t}from"@vueuse/shared";import"../../../index.js";import{useSessionStorage as n}from"@vueuse/core";import{isString as o,trim as l,isEmpty as i,isEqual as r,isFunction as u}from"lodash-es";import{selectOptionsMap as d}from"../rendererPlugins/editableWidgets/hooks/useSelectOption.js";import{IhoTableUtils as a}from"../../utils/index.js";import{EDITABLE_WIDGET_TYPE as s}from"../../constants/index.js";import{parse as c,isValid as p,compareDesc as f}from"date-fns";import{defineTablePlugin as m}from"../../hooks/useTablePlugin.js";function v(){const v="keyboardEventPlugin",g=n("ihoTableClipData","");return m({name:v,apply(n){function m(t,n,m,v,w){var b,C;if(!(null==(b=null==m?void 0:m.keyboardConfig)?void 0:b.isClip))return;if("paste"===t&&!n.getSelectedCell())return;const{row:y,column:R}=n.getSelectedCell()||n.getEditRecord()||{};if(!y||!R||!E(R,s.SELECT)&&e(g)===y[R.field])return;const x=m.uuid&&E(R,s.SELECT)&&d.get(m.uuid)[R.field],T=y[R.field];if("copy"===t){const e=(null==(C=(x||[]).filter((e=>T.includes(e.value))))?void 0:C.map((e=>e.label)).join(","))||T;g.value=e}else{if(o(e(g))&&(g.value=l(e(g)||"")),!e(g)||!function(e){var t;const n=null==(t=e.editRender)?void 0:t.props;return n&&Object.keys(s).includes(a.getCellType(n))}(R)||y.$__SEPARATE||!function(e,t,n,o){var l,i;const{beforeEditMethod:r}=t.editConfig||{},d={rowIndex:null!=(l=e.getRowIndex(n))?l:0,columnIndex:null!=(i=e.getColumnIndex(o))?i:0};return!r||u(r)&&r({row:n,column:o,...d,$table:e,$grid:void 0})}(n,m,y,R))return;if(E(R,s.DATE)&&function(t,n){var l;const i=null==(l=t.editRender)?void 0:l.props,r=e(g)||"";return!p(new Date(r))||o(i.connectField)&&n[i.connectField]&&(i.isStartDate&&f(new Date(r),new Date(n[i.connectField]))<0||i.isEndDate&&f(new Date(r),new Date(n[i.connectField]))>0)}(R,y))return;if(E(R,s.NUMBER)&&!/^-?\d*\.?\d+$/.test((e(g)||"").toString()))return;if(E(R,s.TIME)&&function(t){var n,o;const l=e(g)||"",i=null==(n=t.editRender)?void 0:n.props,r=c(l,(null==(o=null==i?void 0:i.componentProps)?void 0:o.valueFormat)||"HH:mm",new Date);return!p(r)}(R))return;let t=e(g)||"";if(x&&!i(x)){const e=x.filter((e=>t.split(",").includes(e.label))).map((e=>e.value));if(i(e))return;if(function(e){var t,n;const o=null==(t=e.editRender)?void 0:t.props;return E(e,s.SELECT)&&(null==(n=o.componentProps)?void 0:n.multiple)}(R)){if(r(T,e))return;t=e}else{if(e.includes(T))return;t=e[0]}}y[R.field]=t,v("formChange",{column:R,row:y,oldValue:T,value:t,index:n.getRowIndex(y)}),E(R,s.SEPARATE)&&(null==w||w())}}function E(e,t){var n;const o=null==(n=e.editRender)?void 0:n.props;return o&&a.getCellType(o)===t}n.eventHooks.onCopy.tap(v,(({$table:e},t,{emits:n})=>m("copy",e,t,n))),n.eventHooks.onPaste.tap(v,(({$table:e},t,{emits:n,updateTableDataRef:o})=>m("paste",e,t,n,o))),n.eventHooks.onKeydown.tap(v,(async({$event:e,$table:n},o,{emits:l})=>{await t(0);const{row:i,column:r}=n.getSelectedCell()||n.getEditRecord()||{};if(!i||!r)return;l("keyboard",{$table:n,key:e.key,index:n.getRowIndex(i),value:i[r.field],row:i,column:r})}))}})}export{v as keyboardEventPlugin};
@@ -1 +1 @@
1
- import{toRaw as e,h as t,inject as l,createVNode as i}from"vue";import{arrayed as o,widthAppend as s}from"../../../../../shared/utils/index.js";import{isObject as n,isFunction as a,cloneDeep as d,isString as r}from"lodash-es";import u from"../../../../annotation-edit/index.js";import{HIGHEST_PRIORITY as c,IHO_TABLE_FIXED_STATUS as f,LOWEST_PRIORITY as m,WIDGET_TYPE as p,InjectionIhoTableAnnotation as h,InjectionIhoTableConfig as v}from"../../constants/index.js";import{defineTablePlugin as b}from"../../hooks/useTablePlugin.js";import{IhoTableStatusHelper as g,IhoTableUtils as x,IhoTableRenderHelper as R}from"../../utils/index.js";import{getDefaultValue as j}from"../rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.js";function w(){const w="lowCodeFieldAdaptorPlugin";return b({name:w,apply(b){b.fieldHooks.field.tap({name:w,stage:c},((c,m,b)=>{const w=c,P={className:w.bold?"iho-table__boldCell":"",field:w.columnName,showOverflow:"ellipsis",visible:g.notNegative(w.isShow),minWidth:w.colWidth,sortable:g.isPositive(w.isSort),fixed:f[w.isFixed],...w,title:w.alias||w.title};return function(e,d){const c={default:d.slotFn,header:d.headerSlotFn,edit:d.editSlotFn,footer:d.footerSlotFn,...d.slots};if(a(d.checkEditStatus)){const{default:e}=c;a(e)&&(c.default=l=>d.checkEditStatus(l)?e(l):[t("span",null,j(l.row,l.column.editRender.props))])}const f=c.header;c.header=e=>function(e,t,d){var c;const f=l(h),m=l(v),p=l("$xetable"),b=e.column||{},g=n(null==f?void 0:f.value)&&!1!==t.annotation,x=R.isEditableColumn(m.value,b),j=R.hasFilter(t)||R.hasDateFiler(t),w=null==(c=t.titlePrefix)?void 0:c.content,P=r(d)?d:a(d)?d(e):null;let F=!1;if(m.value){const e=m.value.editRules&&m.value.editRules[b.field];e&&(F=o(e).some((e=>e.required)))}const S=m.value.border?Math.max(2,Math.ceil(p.reactData.scrollbarWidth/p.reactData.tableColumn.length)):1,W=s(Math.max(0,b.renderWidth-20-S-(F?14:0)-(g?18:0)-(j?23:0)-(x?22:0)-(w?20:0)-(b.sortable?23:0)));return i("section",{class:"iho-table__headerWrapper"},[i("section",{style:{width:W}},[null!=P?P:i("div",{style:{maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},[b.title])]),g?i(u,{modelValue:f.value[b.field],"onUpdate:modelValue":e=>f.value[b.field]=e},null):null])}(e,d,f),e.slots=c}(P,w),function(t,l,i){var o,s;const r=d(e(l));r.componentProps={size:"mini"===i.size?"small":i.size,...r.componentProps},t.editRender={name:x.getCellType(l),...t.editRender,props:r},t.editRender.enabled=!Reflect.get(p,t.editRender.name),a(null==(o=t.slots)?void 0:o.default)&&(t.editRender.enabled=t.editRender.enabled&&a(null==(s=t.slots)?void 0:s.edit));if(!n(l.settingObj))return;Reflect.has(l.settingObj,"isHide")&&(t.visible=t.visible&&g.notPositive(l.settingObj.isHide))}(P,w,b),P})),b.fieldHooks.field.tap({name:w+"After",stage:m},(e=>(n(e.slots)&&Object.entries(e.slots).forEach((([t,l])=>{null==l&&Reflect.deleteProperty(e.slots,t)})),e)))}})}export{w as lowCodeFieldAdaptorPlugin};
1
+ import{toRaw as e,h as t,inject as l,createVNode as i}from"vue";import{arrayed as o,widthAppend as s}from"../../../../../shared/utils/index.js";import{isObject as n,isFunction as a,cloneDeep as r,isString as d}from"lodash-es";import u from"../../../../annotation-edit/index.js";import{HIGHEST_PRIORITY as c,IHO_TABLE_FIXED_STATUS as f,LOWEST_PRIORITY as m,WIDGET_TYPE as p,InjectionIhoTableAnnotation as h,InjectionIhoTableConfig as b}from"../../constants/index.js";import{defineTablePlugin as v}from"../../hooks/useTablePlugin.js";import{IhoTableStatusHelper as g,IhoTableUtils as x,IhoTableRenderHelper as R}from"../../utils/index.js";import{getDefaultValue as P}from"../rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.js";function j(){const j="lowCodeFieldAdaptorPlugin";return v({name:j,apply(v){v.fieldHooks.field.tap({name:j,stage:c},((c,m,v)=>{const j=c,w={className:j.bold?"iho-table__boldCell":"",field:j.columnName,showOverflow:"ellipsis",visible:g.notNegative(j.isShow),minWidth:j.colWidth,sortable:g.isPositive(j.isSort),fixed:f[j.isFixed],...j,title:j.alias||j.title};return function(e,r){const c={default:r.slotFn,header:r.headerSlotFn,edit:r.editSlotFn,footer:r.footerSlotFn,...r.slots};if(a(r.checkEditStatus)){const{default:e}=c;a(e)&&(c.default=l=>r.checkEditStatus(l)?e(l):[t("span",null,P(l.row,l.column.editRender.props))])}const f=c.header;c.header=e=>function(e,t,r){var c;const f=l(h),m=l(b),p=l("$xetable"),v=e.column||{},g=n(null==f?void 0:f.value)&&!1!==t.annotation,x=R.isEditableColumn(m.value,v),P=R.hasFilter(t)||R.hasDateFiler(t),j=null==(c=t.titlePrefix)?void 0:c.content,w=d(r)?r:a(r)?r(e):null;let F=!1;if(m.value){const e=m.value.editRules&&m.value.editRules[v.field];e&&(F=o(e).some((e=>e.required)))}const S=m.value.border?Math.max(2,Math.ceil(p.reactData.scrollbarWidth/p.reactData.tableColumn.length)):1,W=s(Math.max(0,v.renderWidth-20-S-(F?14:0)-(g?18:0)-(P?23:0)-(x?22:0)-(j?20:0)-(v.sortable?23:0)));return i("section",{class:"iho-table__headerWrapper"},[i("section",{style:{width:W}},[null!=w?w:i("div",{style:{maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},[v.title])]),g?i(u,{modelValue:f.value[v.field],"onUpdate:modelValue":e=>f.value[v.field]=e},null):null])}(e,r,f),e.slots=c}(w,j),function(t,l,i){var o,s;const d=r(e(l));d.componentProps={size:"mini"===i.size?"small":i.size,...d.componentProps},i.forceClearable&&(d.componentProps.clearable=!0);t.editRender={name:x.getCellType(l),...t.editRender,props:d},t.editRender.enabled=!Reflect.get(p,t.editRender.name),a(null==(o=t.slots)?void 0:o.default)&&(t.editRender.enabled=t.editRender.enabled&&a(null==(s=t.slots)?void 0:s.edit));if(!n(l.settingObj))return;Reflect.has(l.settingObj,"isHide")&&(t.visible=t.visible&&g.notPositive(l.settingObj.isHide))}(w,j,v),w})),v.fieldHooks.field.tap({name:j+"After",stage:m},(e=>(n(e.slots)&&Object.entries(e.slots).forEach((([t,l])=>{null==l&&Reflect.deleteProperty(e.slots,t)})),e)))}})}export{j as lowCodeFieldAdaptorPlugin};
@@ -1 +1 @@
1
- import{createVNode as e,defineComponent as n,inject as t}from"vue";import"../../../../index.js";import{NCheckbox as a}from"naive-ui";import{defineTablePlugin as s}from"../../../hooks/useTablePlugin.js";function l(){const n="checkRendererPlugin";return s({name:n,apply(t){t.fieldHooks.field.tap(n,((t,{index:a,insertBefore:s},l)=>{if(0===a&&l.selectType){const{checkboxConfig:t={}}=l,a={field:n,annotation:!1,type:l.selectType,...t,width:45,align:"center",fixed:"left"};t.disableHeader&&(a.slots={header:()=>e("span",{class:"checkbox-cell--disable"},null),...a.slots}),t.useNCheckbox&&(a.slots={header:n=>[e(o,{style:"margin-left: -1px",params:n},null)],checkbox:n=>[e(o,{params:n},null)],...a.slots}),s(a)}return t}))}})}const o=n({name:"Checkbox",props:{params:{type:Object,default:()=>({})}},setup(n){const s=t("$xetable");function l(e){var t;"header"===(null==(t=n.params)?void 0:t.type)?null==s||s.triggerCheckAllEvent(new MouseEvent("mouse-down"),e):null==s||s.triggerCheckRowEvent(new MouseEvent("mouse-down"),n.params,e)}return()=>e(a,{checked:n.params.checked,"onUpdate:checked":e=>n.params.checked=e,indeterminate:n.params.indeterminate,disabled:n.params.disabled,onUpdateChecked:l},null)}});export{l as checkRendererPlugin};
1
+ import{createVNode as e,defineComponent as n,inject as t}from"vue";import"../../../../index.js";import{NCheckbox as a}from"naive-ui";import{defineTablePlugin as o}from"../../../hooks/useTablePlugin.js";function s(){const n="checkRendererPlugin";return o({name:n,apply(t){t.fieldHooks.field.tap(n,((t,{index:a,insertBefore:o},s)=>{if(0===a&&s.selectType&&["checkbox","radio"].includes(s.selectType)){const{radioConfig:t,checkboxConfig:a={}}=s,r={width:45,align:"center",fixed:"left",..."radio"===s.selectType?t:a,field:n,type:s.selectType,annotation:!1};a.disableHeader&&(r.slots={header:()=>e("span",{class:"checkbox-cell--disable"},null),...r.slots}),a.useNCheckbox&&(r.slots={header:n=>[e(l,{style:"margin-left: -1px",params:n},null)],checkbox:n=>[e(l,{params:n},null)],...r.slots}),o(r)}return t}))}})}const l=n({name:"Checkbox",props:{params:{type:Object,default:()=>({})}},setup(n){const o=t("$xetable");function s(e){var t;"header"===(null==(t=n.params)?void 0:t.type)?null==o||o.triggerCheckAllEvent(new MouseEvent("mouse-down"),e):null==o||o.triggerCheckRowEvent(new MouseEvent("mouse-down"),n.params,e)}return()=>e(a,{checked:n.params.checked,"onUpdate:checked":e=>n.params.checked=e,indeterminate:n.params.indeterminate,disabled:n.params.disabled,onUpdateChecked:s},null)}});export{s as checkRendererPlugin};
@@ -1 +1 @@
1
- import{unref as e,createVNode as t,onBeforeUnmount as o,shallowReactive 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,omit as I,isNumber as b}from"lodash-es";import"../../../index.js";import{WIDGET_TYPE as y,InjectionIhoTableUUID as T}from"../../constants/index.js";import{useUUIDMap as w}from"../../utils/index.js";import{defineTablePlugin as H}from"../../hooks/useTablePlugin.js";class R{constructor(){this.records={},this.maxRecords=l(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:D,removeItemFromUUID:M}=w((()=>new R),!0),{getItemFromUUID:S,removeItemFromUUID:U,setItemFromUUID:C}=w((()=>null)),{getItemFromUUID:$,removeItemFromUUID:E,setItemFromUUID:k}=w((()=>{})),F=n({props:{payload:{type:Object,required:!0}},setup(e){const o=r(T),l=r("$xetable"),n=a(),p=D(o),m=s((()=>e.payload.row[e.payload.column.field]));function h(){const{row:t,column:o}=e.payload,r=l.getRowSeq(t);if(!p||null==r||!n.value)return;const a=n.value.clientHeight;p.set(r,o.field,a)}i("updateCellHeight",h),u([()=>e.payload.rowIndex,()=>e.payload.column.field,m,()=>e.payload.column.renderWidth],(async()=>{await g(0),h()})),d((()=>{l&&!S(o)&&C(o,l),h()}));const v=s((()=>{var t,o,l,n;const r=null!=(o=null==(t=e.payload.column.editRender)?void 0:t.props)?o:{},a=null!=(n=null==(l=r.slots)?void 0:l.default)?n:r.slotFn;return x(a)?a:()=>m.value})),I=s((()=>{if(e.payload.column.treeNode)return"";const t=e.payload.column.renderWidth;return b(t)&&t>0?f(t-20-2):""}));return()=>t("div",{ref:n,style:{padding:"7px 0",width:I.value,overflow:"hidden"}},[c(v.value,e.payload)])}});function j(t,o,{scrollTop:l=0}){var n,r;const{uuid:a,rowConfig:s={}}=o;if(!a)return;const i=D(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 I=null!=(r=s.height)?r:36,b=m["main-body-wrapper"],y=b?e(b):null;let T=y?Math.max(8,Math.ceil(y.clientHeight/I)+2+u):8;const w=[0];let H=0;if(l&&h.find(((e,o)=>{const n=t.getRowSeq(e),r=(v(w)||0)+Math.max(I,i.getMax(n));if(w.push(r),r>l)return H=Math.max(0,o-u),T+=Math.min(H,u),!0})),H>0&&x(o.spanMethod)){const{spanMethod:e}=o,l={rowspan:1,colspan:1};for(;H>0;){if(!t.getColumns().some(((t,o)=>{const{rowspan:n,colspan:r}=e({column:t,columnIndex:o,$columnIndex:o,row:h[H],rowIndex:H,$rowIndex:H,_rowIndex:H,isHidden:!t.visible,fixed:t.fixed,type:t.type,visibleData:h})||l;if(0===n&&0===r)return H--,!0})))break}}const R=`${w[H]}px`,M=`${h.reduce(((e,o)=>{const l=t.getRowSeq(o);return e+Math.max(I,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=R,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,H+T);if(f.startIndex===H&&f.endIndex===S)return;f.startIndex=H,f.endIndex=S;const U=h.slice(f.startIndex,f.endIndex);U.forEach(((e,o)=>{const l=t.getRowid(e),n=g[l];n&&(n.$index=o)})),p.tableData.length=0,p.tableData.push(...U)}const L=h(j,300);function Y(){const l="variableHeightRendererPlugin";return H({name:l,vxe(e){e.renderer.add(y.VARIABLE_HEIGHT,{renderCell:(e,o)=>t(F,{payload:o},null)})},apply(t){function n(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&&j(o,t,{scrollTop:l.scrollTop})}function r(e){if(!e.uuid)return;const t=$(e.uuid);t&&(e.scrollY=t),setTimeout((()=>n(e)),300)}t.dataHooks.dataStart.tap(l,r),t.eventHooks.onFilterChange.tap(l,((e,t)=>r(t))),t.eventHooks.onSortChange.tap(l,((e,t)=>r(t))),t.eventHooks.onToggleTreeExpand.tap(l,((e,t)=>r(t))),t.eventHooks.onResizableChange.tap(l,(async({column:e},t)=>{if(!e.editRender||!e.editRender.props)return;e.editRender.props.variableHeight&&r(t)})),t.eventHooks.onScroll.tap(l,h(((e,t)=>{if(e.isX)return;const{uuid:o}=t;if(!o)return;const l=S(o);l&&j(l,t,e)}),100,!0,!0)),t.fieldHooks.field.tap(l,(e=>{if(Reflect.get(e,"variableHeight")){const t=e.slots;e.slots=I(t,["default"]),e.editRender={...e.editRender,name:y.VARIABLE_HEIGHT};const o=e.className,l="variable-height";e.className=o?function(e){return x(o)?[o(e),l]:[o,l]}:l}return e})),t.fieldHooks.fieldList.tap(l,((t,o,{$table:l})=>(o.uuid&&p(t,((t,r)=>{var a,s,i;if((null==(a=t.editRender)?void 0:a.name)===y.VARIABLE_HEIGHT){const t=null!=(i=null==(s=o.rowConfig)?void 0:s.height)?i:36,a=D(o.uuid),u=o.cellStyle;if(o.cellStyle=function(e){const o={};if(l.value){const n=Math.max(t,a.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)&&j(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),I=x?x.$el:null;if(!I)return;if(v?I.scrollTop<=0:I.scrollTop>=I.scrollHeight-I.clientHeight)return;const b=I.scrollTop+h,y=I.scrollLeft+g;if(b===s.lastScrollTop)return;r.preventDefault(),s.lastScrollTop=b,s.lastScrollLeft=y,s.lastScrollTime=Date.now(),i&&a.clearHoverRow();const T=c.value,w=p.value,H=T?T.$el:null,R=w?w.$el:null,D=Math.min(100,Math.abs(Math.floor(h/2)));n&&(l=I.scrollTop,n=!1),l+=D*(v?-1:1),o&&o(),o=m(I.scrollTop,l,400,(e=>{I.scrollTop=e,H&&(H.scrollTop=e),R&&(R.scrollTop=e)}),"easeOutCubic",(()=>{l=I.scrollTop,n=!0})),L(a,t,I)}}(o),setTimeout((()=>{k(o.uuid,o.scrollY),n(o)}),300),r()}})),t))),t.setupHooks.setup.tap(l,(e=>{o((()=>{e.value.uuid&&(M(e.value.uuid),U(e.value.uuid),E(e.value.uuid))}))}))}})}export{Y as variableHeightRendererPlugin};
1
+ import{unref as e,createVNode as t,onBeforeUnmount as o,shallowReactive 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,omit as I,isNumber as b}from"lodash-es";import"../../../index.js";import{WIDGET_TYPE as y,InjectionIhoTableUUID as T}from"../../constants/index.js";import{useUUIDMap as w}from"../../utils/index.js";import{defineTablePlugin as H}from"../../hooks/useTablePlugin.js";class R{constructor(){this.records={},this.maxRecords=l(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:D,removeItemFromUUID:M}=w((()=>new R),!0),{getItemFromUUID:S,removeItemFromUUID:U,setItemFromUUID:C}=w((()=>null)),{getItemFromUUID:$,removeItemFromUUID:E,setItemFromUUID:k}=w((()=>{})),F=n({props:{payload:{type:Object,required:!0}},setup(e){const o=r(T),l=r("$xetable"),n=a(),p=D(o),m=s((()=>e.payload.row[e.payload.column.field]));function h(){const{row:t,column:o}=e.payload,r=l.getRowSeq(t);if(!p||null==r||!n.value)return;const a=n.value.clientHeight;p.set(r,o.field,a)}i("updateCellHeight",h),u([()=>e.payload.rowIndex,()=>e.payload.column.field,m,()=>e.payload.column.renderWidth],(async()=>{await g(0),h()})),d((()=>{l&&!S(o)&&C(o,l),h()}));const v=s((()=>{var t,o,l,n;const r=null!=(o=null==(t=e.payload.column.editRender)?void 0:t.props)?o:{},a=null!=(n=null==(l=r.slots)?void 0:l.default)?n:r.slotFn;return x(a)?a:()=>m.value})),I=s((()=>{if(e.payload.column.treeNode)return"";const t=e.payload.column.renderWidth;return b(t)&&t>0?f(t-20-2):""}));return()=>t("div",{ref:n,style:{padding:"7px 0",width:I.value,overflow:"hidden"}},[c(v.value,e.payload)])}});function j(t,o,{scrollTop:l=0}){var n,r;const{uuid:a,rowConfig:s={}}=o;if(!a)return;const i=D(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 I=null!=(r=s.height)?r:36,b=m["main-body-wrapper"],y=b?e(b):null;let T=y?Math.max(8,Math.ceil(y.clientHeight/I)+2+u):8;const w=[0];let H=0;if(l&&h.find(((e,o)=>{const n=t.getRowSeq(e),r=(v(w)||0)+Math.max(I,i.getMax(n));if(w.push(r),r>l)return H=Math.max(0,o-u),T+=Math.min(H,u),!0})),H>0&&x(o.spanMethod)){const{spanMethod:e}=o,l={rowspan:1,colspan:1};for(;H>0;){if(!t.getColumns().some(((t,o)=>{const{rowspan:n,colspan:r}=e({column:t,columnIndex:o,$columnIndex:o,row:h[H],rowIndex:H,$rowIndex:H,_rowIndex:H,isHidden:!t.visible,fixed:t.fixed,type:t.type,visibleData:h})||l;if(0===n&&0===r)return H--,!0})))break}}const R=`${w[H]}px`,M=`${h.reduce(((e,o)=>{const l=t.getRowSeq(o);return e+Math.max(I,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=R,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,H+T);if(f.startIndex===H&&f.endIndex===S)return;f.startIndex=H,f.endIndex=S;const U=h.slice(f.startIndex,f.endIndex);U.forEach(((e,o)=>{const l=t.getRowid(e),n=g[l];n&&(n.$index=o)})),p.tableData.length=0,p.tableData.push(...U)}const L=h(j,300);function Y(e){return!0===e.variableHeight||"1"===e.variableHeight}function A(){const l="variableHeightRendererPlugin";return H({name:l,vxe(e){e.renderer.add(y.VARIABLE_HEIGHT,{renderCell:(e,o)=>t(F,{payload:o},null)})},apply(t){function n(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&&j(o,t,{scrollTop:l.scrollTop})}function r(e){if(!e.uuid)return;const t=$(e.uuid);t&&(e.scrollY=t),setTimeout((()=>n(e)),300)}t.dataHooks.dataStart.tap(l,r),t.eventHooks.onFilterChange.tap(l,((e,t)=>r(t))),t.eventHooks.onSortChange.tap(l,((e,t)=>r(t))),t.eventHooks.onToggleTreeExpand.tap(l,((e,t)=>r(t))),t.eventHooks.onResizableChange.tap(l,(async({column:e},t)=>{e.editRender&&e.editRender.props&&Y(e.editRender.props)&&r(t)})),t.eventHooks.onScroll.tap(l,h(((e,t)=>{if(e.isX)return;const{uuid:o}=t;if(!o)return;const l=S(o);l&&j(l,t,e)}),100,!0,!0)),t.fieldHooks.field.tap(l,(e=>{if(Y(e)){const t=e.slots;e.slots=I(t,["default"]),e.editRender={...e.editRender,name:y.VARIABLE_HEIGHT};const o=e.className,l="variable-height";e.className=o?function(e){return x(o)?[o(e),l]:[o,l]}:l}return e})),t.fieldHooks.fieldList.tap(l,((t,o,{$table:l})=>(o.uuid&&p(t,((t,r)=>{var a,s,i;if((null==(a=t.editRender)?void 0:a.name)===y.VARIABLE_HEIGHT){const t=null!=(i=null==(s=o.rowConfig)?void 0:s.height)?i:36,a=D(o.uuid),u=o.cellStyle;if(o.cellStyle=function(e){const o={};if(l.value){const n=Math.max(t,a.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)&&j(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),I=x?x.$el:null;if(!I)return;if(v?I.scrollTop<=0:I.scrollTop>=I.scrollHeight-I.clientHeight)return;const b=I.scrollTop+h,y=I.scrollLeft+g;if(b===s.lastScrollTop)return;r.preventDefault(),s.lastScrollTop=b,s.lastScrollLeft=y,s.lastScrollTime=Date.now(),i&&a.clearHoverRow();const T=c.value,w=p.value,H=T?T.$el:null,R=w?w.$el:null,D=Math.min(100,Math.abs(Math.floor(h/2)));n&&(l=I.scrollTop,n=!1),l+=D*(v?-1:1),o&&o(),o=m(I.scrollTop,l,400,(e=>{I.scrollTop=e,H&&(H.scrollTop=e),R&&(R.scrollTop=e)}),"easeOutCubic",(()=>{l=I.scrollTop,n=!0})),L(a,t,I)}}(o),setTimeout((()=>{k(o.uuid,o.scrollY),n(o)}),300),r()}})),t))),t.setupHooks.setup.tap(l,(e=>{o((()=>{e.value.uuid&&(M(e.value.uuid),U(e.value.uuid),E(e.value.uuid))}))}))}})}export{A as variableHeightRendererPlugin};
@@ -19,6 +19,7 @@ export declare type IhoTableConfig = VxeTableProps & Partial<{
19
19
  isSingleSelect: MaybeString<0 | 1>;
20
20
  hideSettingBtn: MaybeString<0 | 1>;
21
21
  showSeq: boolean;
22
+ forceClearable: boolean;
22
23
  selectType: Exclude<VxeTableDefines.ColumnInfo['type'], 'seq' | 'expand' | 'html'>;
23
24
  rowGroupSetting: Partial<Record<TupleToUnion<typeof IhoTableRowGroupSequence>, IhoTableRowGroupItem[]>>;
24
25
  anchorList: Array<{
@@ -37,6 +38,9 @@ export declare type IhoTableConfig = VxeTableProps & Partial<{
37
38
  disableHeader: boolean;
38
39
  useNCheckbox: boolean;
39
40
  }>;
41
+ radioConfig: Partial<VxeTableProps['radioConfig'] & {
42
+ slots: VxeColumnPropTypes.Slots;
43
+ }>;
40
44
  sortableConfig: Partial<{
41
45
  enable: boolean;
42
46
  usePreset: boolean;