cnhis-design-vue 3.1.57-release.3 → 3.2.1-alpha.0

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 (200) 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/button-print/index.d.ts +1 -0
  7. package/es/components/button-print/src/ButtonPrint.vue.d.ts +1 -0
  8. package/es/components/button-print/src/ButtonPrint.vue2.js +1 -1
  9. package/es/components/button-print/src/utils/print.d.ts +15 -3
  10. package/es/components/button-print/src/utils/print.js +1 -1
  11. package/es/components/calendar/index.d.ts +24 -13
  12. package/es/components/calendar/src/Calendar.vue.d.ts +24 -13
  13. package/es/components/calendar/src/Calendar.vue2.js +1 -1
  14. package/es/components/callback/src/components/render/popupMaps.d.ts +294 -2
  15. package/es/components/classification/src/components/table-modal/index.vue.d.ts +0 -3
  16. package/es/components/classification/src/index.vue.d.ts +3 -3
  17. package/es/components/drag-scroll/index.d.ts +2 -0
  18. package/es/components/drag-scroll/index.js +1 -0
  19. package/es/components/drag-scroll/src/index.d.ts +4 -0
  20. package/es/components/drag-scroll/src/index.js +1 -0
  21. package/es/components/drag-scroll/src/types.d.ts +24 -0
  22. package/es/components/drag-scroll/src/types.js +1 -0
  23. package/es/components/expand-field/src/components/form.vue2.js +1 -1
  24. package/es/components/fabric-chart/src/constants/index.d.ts +2 -1
  25. package/es/components/fabric-chart/src/constants/index.js +1 -1
  26. package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +1 -1
  27. package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogram.js +1 -1
  28. package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogramChart.js +1 -1
  29. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.js +1 -1
  30. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useLeft.js +1 -1
  31. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js +1 -1
  32. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useTop.js +1 -1
  33. package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
  34. package/es/components/fabric-chart/src/interface.d.ts +1 -1
  35. package/es/components/fabric-chart/src/utils/index.js +1 -1
  36. package/es/components/field-set/index.d.ts +1 -1
  37. package/es/components/field-set/src/FieldColor.vue.d.ts +2 -1
  38. package/es/components/field-set/src/FieldSet.vue.d.ts +2 -1
  39. package/es/components/field-set/src/Index.vue.d.ts +1 -1
  40. package/es/components/field-set/src/Index.vue2.js +1 -1
  41. package/es/components/field-set/src/TableStyle.vue.d.ts +71 -0
  42. package/es/components/field-set/src/TableStyle.vue.js +1 -0
  43. package/es/components/field-set/src/TableStyle.vue2.js +1 -0
  44. package/es/components/field-set/src/components/Row.vue.d.ts +2 -1
  45. package/es/components/field-set/src/components/Row.vue2.js +1 -1
  46. package/es/components/field-set/src/types/index.d.ts +1 -1
  47. package/es/components/field-set/style/index.css +1 -1
  48. package/es/components/form-config/index.d.ts +45 -4
  49. package/es/components/form-config/src/FormConfig.vue.d.ts +45 -4
  50. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +16 -2
  51. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +22 -2
  52. package/es/components/form-render/index.d.ts +16 -2
  53. package/es/components/form-render/index.js +1 -1
  54. package/es/components/form-render/src/FormRender.vue.d.ts +15 -1
  55. package/es/components/form-render/src/FormRender.vue2.js +1 -1
  56. package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +16 -2
  57. package/es/components/form-render/src/FormRenderWrapper.vue2.js +1 -1
  58. package/es/components/form-render/src/components/renderer/formItem.js +1 -1
  59. package/es/components/form-render/src/components/renderer/index.js +1 -1
  60. package/es/components/form-render/src/components/renderer/select.d.ts +2 -0
  61. package/es/components/form-render/src/components/renderer/select.js +1 -1
  62. package/es/components/form-render/src/components/renderer/simpleComponent.js +1 -1
  63. package/es/components/form-render/src/components/renderer/time.d.ts +7 -0
  64. package/es/components/form-render/src/components/renderer/time.js +1 -0
  65. package/es/components/form-render/src/hooks/index.d.ts +1 -0
  66. package/es/components/form-render/src/hooks/index.js +1 -1
  67. package/es/components/form-render/src/hooks/useAutoHidden.d.ts +1 -1
  68. package/es/components/form-render/src/hooks/useAutoHidden.js +1 -1
  69. package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
  70. package/es/components/form-render/src/hooks/useFieldNormalize.d.ts +6 -4
  71. package/es/components/form-render/src/hooks/useFieldNormalize.js +1 -1
  72. package/es/components/form-render/src/hooks/useFormEvent.js +1 -1
  73. package/es/components/form-render/src/hooks/useFormRenderOptions.js +1 -1
  74. package/es/components/form-render/src/hooks/useSelectedSetting.d.ts +5 -0
  75. package/es/components/form-render/src/hooks/useSelectedSetting.js +1 -0
  76. package/es/components/form-render/src/types/fieldItem.d.ts +1 -0
  77. package/es/components/form-render/src/types/index.d.ts +2 -0
  78. package/es/components/form-render/src/utils/business.d.ts +1 -1
  79. package/es/components/form-render/src/utils/business.js +1 -1
  80. package/es/components/form-render/src/utils/index.d.ts +1 -0
  81. package/es/components/form-render/src/utils/index.js +1 -1
  82. package/es/components/iho-table/index.d.ts +278 -0
  83. package/es/components/iho-table/src/IhoTable.vue.d.ts +278 -0
  84. package/es/components/iho-table/src/IhoTable.vue2.js +1 -1
  85. package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +1 -5
  86. package/es/components/iho-table/src/hooks/tapHooks/index.js +1 -1
  87. package/es/components/iho-table/src/hooks/tapHooks/useDataHooks.d.ts +2 -1
  88. package/es/components/iho-table/src/hooks/tapHooks/useDataHooks.js +1 -1
  89. package/es/components/iho-table/src/plugins/{bindEventSettingPlugin/index.d.ts → bindEventSettingPlugin.d.ts} +1 -1
  90. package/es/components/iho-table/src/plugins/bindEventSettingPlugin.js +1 -0
  91. package/es/components/iho-table/src/plugins/{defaultConfigPlugin/index.d.ts → defaultConfigPlugin.d.ts} +1 -1
  92. package/es/components/iho-table/src/plugins/defaultConfigPlugin.js +1 -0
  93. package/es/components/iho-table/src/plugins/dragScrollPlugin.d.ts +1 -0
  94. package/es/components/iho-table/src/plugins/dragScrollPlugin.js +1 -0
  95. package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue.d.ts +1 -1
  96. package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue2.js +1 -1
  97. package/es/components/iho-table/src/plugins/filterRenderPlugin/index.js +1 -1
  98. package/es/components/iho-table/src/plugins/headerPlugin.js +1 -1
  99. package/es/components/iho-table/src/plugins/index.js +1 -1
  100. package/es/components/iho-table/src/plugins/{keyboardEventPlugin/index.d.ts → keyboardEventPlugin.d.ts} +1 -1
  101. package/es/components/iho-table/src/plugins/keyboardEventPlugin.js +1 -0
  102. package/es/components/iho-table/src/plugins/{lowCodeFieldAdaptorPlugin/index.d.ts → lowCodeFieldAdaptorPlugin.d.ts} +1 -1
  103. package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin.js +1 -0
  104. package/es/components/iho-table/src/plugins/{operationalFormPlugin/index.d.ts → operationalFormPlugin.d.ts} +1 -1
  105. package/es/components/iho-table/src/plugins/operationalFormPlugin.js +1 -0
  106. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +31 -1
  107. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue2.js +1 -1
  108. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/index.js +1 -1
  109. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/index.js +1 -1
  110. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/levelSearchCascade.vue.d.ts +1 -1
  111. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.js +1 -1
  112. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -1
  113. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +1 -1
  114. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +1 -1
  115. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.d.ts +15 -12
  116. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue2.js +1 -1
  117. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/index.js +1 -1
  118. package/es/components/iho-table/src/plugins/rowClickPlugin.d.ts +1 -0
  119. package/es/components/iho-table/src/plugins/rowClickPlugin.js +1 -0
  120. package/es/components/iho-table/src/plugins/rowDragPlugin.d.ts +1 -0
  121. package/es/components/iho-table/src/plugins/rowDragPlugin.js +1 -0
  122. package/es/components/iho-table/src/plugins/{varialbleHeightPlugin/index.d.ts → varialbleHeightPlugin.d.ts} +1 -1
  123. package/es/components/iho-table/src/plugins/varialbleHeightPlugin.js +1 -0
  124. package/es/components/iho-table/src/plugins/verticalTablePlugin/constants.d.ts +1 -0
  125. package/es/components/iho-table/src/plugins/verticalTablePlugin/constants.js +1 -0
  126. package/es/components/iho-table/src/plugins/verticalTablePlugin/index.d.ts +1 -0
  127. package/es/components/iho-table/src/plugins/verticalTablePlugin/index.js +1 -0
  128. package/es/components/iho-table/src/plugins/verticalTablePlugin/renderer.d.ts +6 -0
  129. package/es/components/iho-table/src/plugins/verticalTablePlugin/renderer.js +1 -0
  130. package/es/components/iho-table/src/plugins/verticalTablePlugin/types.d.ts +12 -0
  131. package/es/components/iho-table/src/plugins/verticalTablePlugin/types.js +1 -0
  132. package/es/components/iho-table/src/plugins/verticalTablePlugin/utils.d.ts +28 -0
  133. package/es/components/iho-table/src/plugins/verticalTablePlugin/utils.js +1 -0
  134. package/es/components/iho-table/src/plugins/{virtualTreePlugin/index.d.ts → virtualTreePlugin.d.ts} +1 -1
  135. package/es/components/iho-table/src/plugins/virtualTreePlugin.js +1 -0
  136. package/es/components/iho-table/src/types/index.d.ts +11 -1
  137. package/es/components/iho-table/src/types/pluginType.d.ts +3 -1
  138. package/es/components/iho-table/src/utils/index.d.ts +5 -7
  139. package/es/components/iho-table/src/utils/index.js +1 -1
  140. package/es/components/index.css +1 -1
  141. package/es/components/index.d.ts +1 -0
  142. package/es/components/index.js +1 -1
  143. package/es/components/info-header/index.d.ts +37 -4
  144. package/es/components/info-header/src/InfoHeader.vue.d.ts +37 -4
  145. package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +1 -0
  146. package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +1 -0
  147. package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +17 -2
  148. package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +16 -2
  149. package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
  150. package/es/components/search-cascader/index.d.ts +1 -1
  151. package/es/components/search-cascader/src/SearchCascader.vue.d.ts +1 -1
  152. package/es/components/search-cascader/src/components/SearchMenu.d.ts +1 -1
  153. package/es/components/select-label/src/LabelFormContent.vue2.js +1 -1
  154. package/es/components/select-person/src/SearchMultiple.vue.d.ts +0 -6
  155. package/es/components/shortcut-setter/index.d.ts +17 -2
  156. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +17 -2
  157. package/es/components/steps-wheel/src/StepsWheel.vue2.js +1 -1
  158. package/es/components/table-export-field/src/components/ExportModal.vue2.js +1 -1
  159. package/es/components/table-export-field/style/index.css +1 -1
  160. package/es/components/table-export-field/style/table-export-field-iconfont.ttf +0 -0
  161. package/es/env.d.ts +25 -25
  162. package/es/shared/assets/img/failure.png.js +1 -1
  163. package/es/shared/assets/img/no-permission.png.js +1 -1
  164. package/es/shared/assets/img/nodata.png.js +1 -1
  165. package/es/shared/assets/img/notfound.png.js +1 -1
  166. package/es/shared/assets/img/qr.png.js +1 -1
  167. package/es/shared/assets/img/success.png.js +1 -1
  168. package/es/shared/assets/img/table_style_1.png.js +1 -0
  169. package/es/shared/assets/img/table_style_2.png.js +1 -0
  170. package/es/shared/assets/img/table_style_3.png.js +1 -0
  171. package/es/shared/assets/img/table_style_4.png.js +1 -0
  172. package/es/shared/assets/img/video.png.js +1 -1
  173. package/es/shared/assets/img/video_default_cover.png.js +1 -1
  174. package/es/shared/assets/img/xb_big.png.js +1 -1
  175. package/es/shared/assets/img/xb_small.png.js +1 -1
  176. package/es/shared/components/InputNumberSlash/InputNumberSlash.js +1 -1
  177. package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +86 -0
  178. package/es/shared/hooks/selectHooks/useOptionFiltered.d.ts +3 -1
  179. package/es/shared/hooks/selectHooks/useOptionFiltered.js +1 -1
  180. package/es/shared/hooks/selectHooks/useSearchContent.d.ts +1 -1
  181. package/es/shared/hooks/selectHooks/useSearchContent.js +1 -1
  182. package/es/shared/package.json.js +1 -1
  183. package/es/shared/types/business.d.ts +15 -6
  184. package/es/shared/utils/business.d.ts +1 -1
  185. package/es/shared/utils/fabricjs/index.d.ts +6823 -0
  186. package/es/shared/utils/index.d.ts +2 -1
  187. package/es/shared/utils/index.js +1 -1
  188. package/es/shared/utils/tapable/index.d.ts +139 -0
  189. package/package.json +16 -15
  190. package/es/components/iho-table/src/plugins/bindEventSettingPlugin/index.js +0 -1
  191. package/es/components/iho-table/src/plugins/defaultConfigPlugin/index.js +0 -1
  192. package/es/components/iho-table/src/plugins/keyboardEventPlugin/index.js +0 -1
  193. package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index.js +0 -1
  194. package/es/components/iho-table/src/plugins/operationalFormPlugin/index.js +0 -1
  195. package/es/components/iho-table/src/plugins/rowClickPlugin/index.d.ts +0 -1
  196. package/es/components/iho-table/src/plugins/rowClickPlugin/index.js +0 -1
  197. package/es/components/iho-table/src/plugins/rowDragPlugin/index.d.ts +0 -1
  198. package/es/components/iho-table/src/plugins/rowDragPlugin/index.js +0 -1
  199. package/es/components/iho-table/src/plugins/varialbleHeightPlugin/index.js +0 -1
  200. package/es/components/iho-table/src/plugins/virtualTreePlugin/index.js +0 -1
@@ -6,7 +6,7 @@ import { VxeGlobalCommands, VxeGlobalFormats, VxeGlobalHooks, VxeGlobalMenus, Vx
6
6
  import { VxeTableEvents } from 'vxe-table/types/table';
7
7
  import { VxePagerEvents } from 'vxe-table/types/pager';
8
8
  import { VxeGlobalInterceptor } from 'vxe-table/types/v-x-e-table';
9
- import { IhoTableConfig, IhoTableEmits, IhoTableEventTypes, IhoTableFieldItem, IhoTableHandler } from '.';
9
+ import { IhoTableConfig, IhoTableEmits, IhoTableEventTypes, IhoTableFieldItem, IhoTableHandler, IhoTableProps } from '.';
10
10
  export declare type IhoTableInstance = {
11
11
  interceptor: VxeGlobalInterceptor;
12
12
  renderer: VxeGlobalRenderer;
@@ -24,6 +24,7 @@ export declare type TablePlugin = {
24
24
  export declare type IhoTableHandlerContext<isRef extends boolean = true> = {
25
25
  $table: isRef extends true ? Ref<Nullable<VxeTableInstance>> : Nullable<VxeTableInstance>;
26
26
  emits: IhoTableEmits;
27
+ globProps: IhoTableProps;
27
28
  };
28
29
  export declare type TableHooks = Readonly<{
29
30
  configHooks: AbstractConfigHooks;
@@ -150,6 +151,7 @@ export declare abstract class AbstractDataHooks {
150
151
  abstract readonly dataStart: AsyncParallelHook<WithTableConfig>;
151
152
  abstract readonly data: AsyncSeriesHook<WithTableDataContext<[AnyObject]>>;
152
153
  abstract readonly dataEnd: AsyncParallelHook<WithTableConfig>;
154
+ abstract readonly dataList: SyncWaterfallHook<WithTableConfig<[AnyObject[]]>>;
153
155
  }
154
156
  export declare abstract class AbstractSetupHooks {
155
157
  abstract readonly setup: SyncHook<[Ref<IhoTableConfig>, Ref<IhoTableFieldItem[]>, IhoTableHandlerContext]>;
@@ -1,9 +1,8 @@
1
- import { AnyObject, ArrayAble, Nullable } from '../../../../shared/types';
1
+ import { AnyObject, Nullable } from '../../../../shared/types';
2
2
  import { MaybeRef } from '@vueuse/core';
3
3
  import { VxeTableDefines, VxeTableInstance } from 'vxe-table';
4
4
  import { VxeGlobalRendererHandles } from 'vxe-table/types/v-x-e-table/renderer';
5
- import { EventListenerToEventName, EventNameToEventListener, IhoTableConfig, IhoTableFieldItem, LowCodeTableFieldItem } from '../../../../components/iho-table';
6
- import { EDITABLE_WIDGET_TYPE } from '../../../../components/iho-table/src/constants';
5
+ import { $VxeTable, EventListenerToEventName, EventNameToEventListener, IhoTableConfig, IhoTableFieldItem, LowCodeTableFieldItem } from '../../../../components/iho-table';
7
6
  export * from './separateMap';
8
7
  export declare function IhoTableLog(message: string): void;
9
8
  export declare function IhoTableWarn(message: string): void;
@@ -38,6 +37,7 @@ export declare const IhoTableRenderHelper: Readonly<{
38
37
  isEditableColumn(config: IhoTableConfig, column: IhoTableFieldItem): boolean | undefined;
39
38
  hasFilter(lowCodeField: LowCodeTableFieldItem): boolean;
40
39
  hasDateFiler(lowCodeField: LowCodeTableFieldItem): boolean | undefined;
40
+ hasTitlePrefix(lowCodeField: LowCodeTableFieldItem): unknown;
41
41
  }>;
42
42
  export declare const IhoTableStatusHelper: Readonly<{
43
43
  isPositive(value: string | number | undefined | null): boolean;
@@ -45,10 +45,6 @@ export declare const IhoTableStatusHelper: Readonly<{
45
45
  notPositive(value: string | number | undefined | null): boolean;
46
46
  notNegative(value: string | number | undefined | null): boolean;
47
47
  }>;
48
- export declare const createIhoTableClearActivedInterceptor: (type: ArrayAble<EDITABLE_WIDGET_TYPE>, solution: (ele: HTMLElement) => boolean) => ({ $event, column }: {
49
- $event: Event;
50
- column: VxeTableDefines.ColumnInfo;
51
- }) => boolean;
52
48
  export declare function isTransformTreeType(config: IhoTableConfig): boolean;
53
49
  export declare function isRichContent(content: string): content is string;
54
50
  export declare function parseRichContent(richContent: string): any;
@@ -57,3 +53,5 @@ export declare function isCompatibleColumn(field: LowCodeTableFieldItem): number
57
53
  export declare function getTitle(column: VxeTableDefines.ColumnInfo, value?: unknown): string;
58
54
  export declare function isInvalidTime(column: VxeTableDefines.ColumnInfo, newValue: MaybeRef<any>): boolean;
59
55
  export declare function isInvalidDate(column: VxeTableDefines.ColumnInfo, row: AnyObject, newValue: MaybeRef<any>): any;
56
+ export declare function isVariableHeightColumn(field: AnyObject): boolean;
57
+ export declare function isVariableHeightTable($table: $VxeTable): boolean;
@@ -1 +1 @@
1
- import{reactive as e,inject as n,unref as t,toRaw as r,createVNode as o}from"vue";import{jsonParse as i,arrayed as l,findAncestor as u}from"../../../../shared/utils/index.js";import{promiseTimeout as a}from"@vueuse/shared";import{parse as c,isValid as d,compareDesc as s}from"date-fns";import{isNumber as f,isFunction as p,isString as m,isObject as v,isArray as I}from"lodash-es";import{InjectionIhoTableConfig as g,InjectionIhoTableEmits as h,IHO_TABLE_STRING_STATUS as E,IHO_TABLE_NUMBER_STATUS as w,IHO_TABLE_TREE_TYPE as T,InjectionIhoTableUUID as R}from"../constants/index.js";import{getSeparateInfo as S}from"./separateMap.js";export{deleteSeparateInfo,getSeparateInfo,setSeparateInfo}from"./separateMap.js";function C(e){return console.warn(`[IhoTable]: ${e}`)}const F=Object.freeze({getCellType(e){var n;return((null==(n=e.settingObj)?void 0:n.attr)||e.formType||"DEFAULT").toUpperCase()}});function D(){var e,t,r;const o=n(g);return o||C("this function(getRowHeight) only can be used in setup environment"),null!=(r=null==(t=null==(e=null==o?void 0:o.value)?void 0:e.rowConfig)?void 0:t.height)?r:32}function O(e){const n=e.slice(2);return`${n[0].toLowerCase()}${n.slice(1)}`}function P(e){return`on${e[0].toUpperCase()}${e.slice(1)}`}function A(n,t=!0){const r=t?e(new Map):new Map;return{getItemFromUUID:function(e){return r.set(e,r.get(e)||n()).get(e)},setItemFromUUID:function(e,n){r.set(e,n)},removeItemFromUUID:function(e){r.delete(e)}}}async function b(e,n,r,o,i=2){const l=function(){var i;const l=null==(i=t(o))?void 0:i.getColumnByField(e.field);if(!l)return;const u=x(l);return u?p(u.separateWidth)?u.separateWidth({column:l,row:n,rowIndex:r,$table:t(o)}):f(u.separateWidth)?u.separateWidth:l.renderWidth:l.renderWidth}();return f(l)&&l>0?l:i<=0?function(){const n=+e.colWidth;return f(n)?n:64}():(await a(0),b(e,n,r,o,i-1))}function $(e){const o=n(h);function i(){var n;const r=t(e);return{$table:r.$table,value:r.row[r.column.field],row:r.row,column:{...r.column,...null==(n=r.column.editRender)?void 0:n.props},index:r.rowIndex>-1?r.rowIndex:r.$rowIndex}}function l(e={}){o("formChange",{...i(),...r(e)})}function u(e={}){o("formClick",{...i(),...r(e)})}return{emitFormChange:function(){l()},emitFormClick:function(){u()},emitFormChangeWithParams:l,emitFormClickWithParams:u}}function x(e){var n;return null==(n=e.editRender)?void 0:n.props}const N=Object.freeze({createDefaultRenderCell:function(){return function({props:e},{row:t,column:r}){if("bottom"!==(null==e?void 0:e.separatePlacement))return c(t[r.field]);const i=n(R),l=S(i,t);if(!l)return c(t[r.field]);const{originalData:u=t,isLastRow:a}=l;return c(a?u[r.field]:null);function c(e){return[o("span",{title:G(r,e),class:"iho-table__colorAndIcon"},[e])]}}},createRenderEdit:function(e){return function({props:n},t){return e({...t,fieldItem:n||{},...$(t)})}},isEditableColumn(e,n){var t;return!1!==(null==(t=e.editConfig)?void 0:t.showIcon)&&n.editRender&&!1!==n.editRender.enabled},hasFilter(e){if(M(e))return!0;let n=e.fieldSetting;return m(n)&&(n=i(n||"")),v(n)&&((t=n).notParticipatingSearch!==E.POSITIVE&&"manual"===(null==(r=t.mapping)?void 0:r.type));var t,r},hasDateFiler(e){var n;return null==(n=null==e?void 0:e.filterSetting)?void 0:n.daterange}}),V=Object.freeze({isPositive:e=>e===w.POSITIVE||e===E.POSITIVE,isNegative:e=>e===w.NEGATIVE||e===E.NEGATIVE,notPositive:e=>e!==w.POSITIVE&&e!==E.POSITIVE,notNegative:e=>e!==w.NEGATIVE&&e!==E.NEGATIVE}),W=(e,n)=>({$event:t,column:r})=>{var o;if(!l(e).includes(null==(o=r.editRender)?void 0:o.name))return!0;const i=null==t?void 0:t.target;return!v(i)||!u(i,n)};function _(e){return[T.TRANSFORM_WITH_SPAN_METHOD,T.TRANSFORM_TREE_TYPE].includes(`${e.isTree}`)}function U(e){return m(e)&&!!e.match(/^###\{[^{}]+}$/)}function j(e){try{return JSON.parse(e.replace(/^###/,""))}catch(e){return{}}}function y(e,n){if(e.$__SEPARATE||!n.editRender||!n.editRender.props)return e[n.field];const{fieldSetting:t}=n.editRender.props;if(!m(t))return e[n.field];const{mergedFeildExpression:r}=i(t);return r&&m(r)?r.replace(/#{(.+?)}/g,(function(n,t){let r=t?e[t.trim()]:null;U(r)&&(r=j(r).change_text);return r||(null==r?"--":r)})):e[n.field]}const H=["SEARCH","SELECT","RADIO","CHECKBOX"];function M(e){return e.notParticipatingSearch===w.NEGATIVE&&H.includes(F.getCellType(e))&&I(e.options)&&e.options.length}function G(e,n=""){return"tooltip"!==e.showOverflow&&m(n)?n:""}function L(e,n){var r,o,i;n=t(n)||"";const l=null!=(o=null==(r=e.editRender)?void 0:r.props)?o:{},u=c(n,(null==(i=null==l?void 0:l.componentProps)?void 0:i.valueFormat)||"HH:mm",new Date);return!d(u)}function k(e,n,r){var o,i;const l=null!=(i=null==(o=e.editRender)?void 0:o.props)?i:{};return r=t(r)||"",!d(new Date(r))||m(l.connectField)&&n[l.connectField]&&(l.isStartDate&&s(new Date(r),new Date(n[l.connectField]))<0||l.isEndDate&&s(new Date(r),new Date(n[l.connectField]))>0)}export{N as IhoTableRenderHelper,V as IhoTableStatusHelper,F as IhoTableUtils,C as IhoTableWarn,W as createIhoTableClearActivedInterceptor,O as eventListener2EventName,P as eventName2EventListener,b as getColumnRenderWidth,x as getLowCodeFieldFromField,D as getRowHeight,G as getTitle,M as isCompatibleColumn,k as isInvalidDate,L as isInvalidTime,U as isRichContent,_ as isTransformTreeType,y as parseMergeField,j as parseRichContent,$ as useIhoTableFormEvent,A as useUUIDMap};
1
+ import{reactive as e,inject as n,unref as t,toRaw as r,createVNode as o}from"vue";import{jsonParse as i}from"../../../../shared/utils/index.js";import{promiseTimeout as l}from"@vueuse/shared";import{parse as u,isValid as a,compareDesc as c}from"date-fns";import{isNumber as d,isFunction as s,isString as f,isObject as p,isArray as m}from"lodash-es";import{InjectionIhoTableConfig as v,InjectionIhoTableEmits as g,IHO_TABLE_STRING_STATUS as h,IHO_TABLE_NUMBER_STATUS as I,IHO_TABLE_TREE_TYPE as E,EDITABLE_WIDGET_TYPE as T,InjectionIhoTableUUID as w}from"../constants/index.js";import{getSeparateInfo as R}from"./separateMap.js";export{deleteSeparateInfo,getSeparateInfo,setSeparateInfo}from"./separateMap.js";function C(e){return console.warn(`[IhoTable]: ${e}`)}const S=Object.freeze({getCellType(e){var n;return((null==(n=e.settingObj)?void 0:n.attr)||e.formType||"DEFAULT").toUpperCase()}});function F(){var e,t,r;const o=n(v);return o||C("this function(getRowHeight) only can be used in setup environment"),null!=(r=null==(t=null==(e=null==o?void 0:o.value)?void 0:e.rowConfig)?void 0:t.height)?r:32}function D(e){const n=e.slice(2);return`${n[0].toLowerCase()}${n.slice(1)}`}function P(e){return`on${e[0].toUpperCase()}${e.slice(1)}`}function b(n,t=!0){const r=t?e(new Map):new Map;return{getItemFromUUID:function(e){return r.set(e,r.get(e)||n()).get(e)},setItemFromUUID:function(e,n){r.set(e,n)},removeItemFromUUID:function(e){r.delete(e)}}}async function O(e,n,r,o,i=2){const u=function(){var i;const l=null==(i=t(o))?void 0:i.getColumnByField(e.field);if(!l)return;const u=x(l);return u?s(u.separateWidth)?u.separateWidth({column:l,row:n,rowIndex:r,$table:t(o)}):d(u.separateWidth)?u.separateWidth:l.renderWidth:l.renderWidth}();return d(u)&&u>0?u:i<=0?function(){const n=+e.colWidth;return d(n)?n:64}():(await l(0),O(e,n,r,o,i-1))}function A(e){const o=n(g);function i(){var n;const r=t(e);return{$table:r.$table,value:r.row[r.column.field],row:r.row,column:{...r.column,...null==(n=r.column.editRender)?void 0:n.props},index:r.rowIndex>-1?r.rowIndex:r.$rowIndex}}function l(e={}){o("formChange",{...i(),...r(e)})}function u(e={}){o("formClick",{...i(),...r(e)})}return{emitFormChange:function(){l()},emitFormClick:function(){u()},emitFormChangeWithParams:l,emitFormClickWithParams:u}}function x(e){var n;return null==(n=e.editRender)?void 0:n.props}const $=Object.freeze({createDefaultRenderCell:function(){return function({props:e},{row:t,column:r}){if("bottom"!==(null==e?void 0:e.separatePlacement))return c(t[r.field]);const i=n(w),l=R(i,t);if(!l)return c(t[r.field]);const{originalData:u=t,isLastRow:a}=l;return c(a?u[r.field]:null);function c(e){return[o("span",{title:U(r,e),class:"iho-table__colorAndIcon"},[e])]}}},createRenderEdit:function(e){return function({props:n},t){return e({...t,fieldItem:n||{},...A(t)})}},isEditableColumn(e,n){var t;return!1!==(null==(t=e.editConfig)?void 0:t.showIcon)&&n.editRender&&!1!==n.editRender.enabled},hasFilter(e){if(H(e))return!0;let n=e.fieldSetting;return f(n)&&(n=i(n||"")),p(n)&&((t=n).notParticipatingSearch!==h.POSITIVE&&"manual"===(null==(r=t.mapping)?void 0:r.type));var t,r},hasDateFiler(e){var n;return null==(n=null==e?void 0:e.filterSetting)?void 0:n.daterange},hasTitlePrefix(e){var n,t;return(null==(n=null==e?void 0:e.titlePrefix)?void 0:n.content)||(null==(t=null==e?void 0:e.settingObj)?void 0:t.feildDescribe)}}),N=Object.freeze({isPositive:e=>e===I.POSITIVE||e===h.POSITIVE,isNegative:e=>e===I.NEGATIVE||e===h.NEGATIVE,notPositive:e=>e!==I.POSITIVE&&e!==h.POSITIVE,notNegative:e=>e!==I.NEGATIVE&&e!==h.NEGATIVE});function V(e){return[E.TRANSFORM_WITH_SPAN_METHOD,E.TRANSFORM_TREE_TYPE].includes(`${e.isTree}`)}function W(e){return f(e)&&!!e.match(/^###\{[^{}]+}$/)}function _(e){try{return JSON.parse(e.replace(/^###/,""))}catch(e){return{}}}function j(e,n){if(e.$__SEPARATE||!n.editRender||!n.editRender.props)return e[n.field];const{fieldSetting:t}=n.editRender.props;if(!f(t))return e[n.field];const{mergedFeildExpression:r}=i(t);return r&&f(r)?r.replace(/#{(.+?)}/g,(function(n,t){let r=t?e[t.trim()]:null;W(r)&&(r=_(r).change_text);return r||(null==r?"--":r)})):e[n.field]}const y=["SEARCH","SELECT","RADIO","CHECKBOX"];function H(e){return e.notParticipatingSearch===I.NEGATIVE&&y.includes(S.getCellType(e))&&m(e.options)&&e.options.length}function U(e,n=""){return"tooltip"!==e.showOverflow&&f(n)?n:""}function M(e,n){var r,o,i;n=t(n)||"";const l=null!=(o=null==(r=e.editRender)?void 0:r.props)?o:{},c=u(n,(null==(i=null==l?void 0:l.componentProps)?void 0:i.valueFormat)||"HH:mm",new Date);return!a(c)}function G(e,n,r){var o,i;const l=null!=(i=null==(o=e.editRender)?void 0:o.props)?i:{};return r=t(r)||"",!a(new Date(r))||f(l.connectField)&&n[l.connectField]&&(l.isStartDate&&c(new Date(r),new Date(n[l.connectField]))<0||l.isEndDate&&c(new Date(r),new Date(n[l.connectField]))>0)}function L(e){var n,t;return(!0===e.variableHeight||"1"===e.variableHeight)&&(null!=(t=null==(n=e.editRender)?void 0:n.name)?t:S.getCellType(e))!==T.SEPARATE}function k(e){const n=e.internalData.tableFullColumn;return!!m(n)&&n.some((e=>{var n,t;return L(null!=(t=null==(n=e.editRender)?void 0:n.props)?t:{})}))}export{$ as IhoTableRenderHelper,N as IhoTableStatusHelper,S as IhoTableUtils,C as IhoTableWarn,D as eventListener2EventName,P as eventName2EventListener,O as getColumnRenderWidth,x as getLowCodeFieldFromField,F as getRowHeight,U as getTitle,H as isCompatibleColumn,G as isInvalidDate,M as isInvalidTime,W as isRichContent,V as isTransformTreeType,L as isVariableHeightColumn,k as isVariableHeightTable,j as parseMergeField,_ as parseRichContent,A as useIhoTableFormEvent,b as useUUIDMap};