cnhis-design-vue 3.1.48-release.3 → 3.1.48-release.5

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 (124) hide show
  1. package/README.md +87 -87
  2. package/es/components/base-search/index.d.ts +13 -0
  3. package/es/components/base-search/src/index.vue.d.ts +13 -0
  4. package/es/components/base-search/src/index.vue2.js +1 -1
  5. package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
  6. package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +1 -0
  7. package/es/components/bpmn-workflow/types/ModelingModule.d.ts +1 -0
  8. package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +1 -0
  9. package/es/components/card-reader-sdk/src/cardReaderSDK.d.ts +29 -21
  10. package/es/components/card-reader-sdk/src/cardReaderSDK.js +1 -1
  11. package/es/components/card-reader-sdk/src/components/readCardDialog.vue.d.ts +19 -0
  12. package/es/components/card-reader-sdk/src/components/readCardDialog.vue2.js +1 -1
  13. package/es/components/card-reader-sdk/src/constants/index.d.ts +60 -168
  14. package/es/components/card-reader-sdk/src/constants/index.js +1 -1
  15. package/es/components/card-reader-sdk/src/insuranceSDK.d.ts +1 -6
  16. package/es/components/card-reader-sdk/src/insuranceSDK.js +1 -1
  17. package/es/components/card-reader-sdk/src/types/index.d.ts +11 -11
  18. package/es/components/card-reader-sdk/src/utils/index.d.ts +1 -1
  19. package/es/components/card-reader-sdk/src/utils/index.js +1 -1
  20. package/es/components/card-reader-sdk/src/utils/readHealthCard.d.ts +6 -1
  21. package/es/components/card-reader-sdk/src/utils/readHealthCard.js +1 -1
  22. package/es/components/fabric-chart/src/constants/index.d.ts +4 -0
  23. package/es/components/fabric-chart/src/constants/index.js +1 -1
  24. package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +1 -1
  25. package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcessChart.js +1 -1
  26. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.d.ts +7 -1
  27. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.js +1 -1
  28. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useLeft.js +1 -1
  29. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useOther.d.ts +7 -2
  30. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useOther.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/useBottom.js +1 -1
  34. package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
  35. package/es/components/fabric-chart/src/hooks/temperature/useLeft.js +1 -1
  36. package/es/components/fabric-chart/src/hooks/temperature/useOther.js +1 -1
  37. package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +1 -1
  38. package/es/components/fabric-chart/src/hooks/temperature/useTop.js +1 -1
  39. package/es/components/fabric-chart/src/utils/index.d.ts +6 -0
  40. package/es/components/fabric-chart/src/utils/index.js +1 -1
  41. package/es/components/form-config/index.d.ts +28 -0
  42. package/es/components/form-config/src/FormConfig.vue.d.ts +28 -0
  43. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +12 -0
  44. package/es/components/form-render/src/components/renderer/radio&checkbox.d.ts +13 -0
  45. package/es/components/form-render/src/components/renderer/radio_checkbox.js +1 -1
  46. package/es/components/form-render/src/components/renderer/select.d.ts +3 -0
  47. package/es/components/form-render/src/components/renderer/select.js +1 -1
  48. package/es/components/form-render/src/hooks/useBusinessBinding.d.ts +1 -1
  49. package/es/components/form-render/src/hooks/useBusinessBinding.js +1 -1
  50. package/es/components/form-render/src/hooks/useComplexOptions.d.ts +9 -6
  51. package/es/components/form-render/src/hooks/useComplexOptions.js +1 -1
  52. package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
  53. package/es/components/form-render/src/hooks/useFieldNormalize.js +1 -1
  54. package/es/components/form-render/src/hooks/useFormRenderOptions.d.ts +4 -0
  55. package/es/components/form-render/src/hooks/useFormRenderOptions.js +1 -1
  56. package/es/components/form-render/src/hooks/useFormValidator.js +1 -1
  57. package/es/components/form-render/src/types/fieldItem.d.ts +5 -0
  58. package/es/components/form-render/src/types/index.d.ts +1 -0
  59. package/es/components/form-render/src/utils/index.js +1 -1
  60. package/es/components/form-render/style/index.css +1 -1
  61. package/es/components/iho-table/index.d.ts +8 -3
  62. package/es/components/iho-table/src/IhoTable.vue.d.ts +8 -3
  63. package/es/components/iho-table/src/constants/index.d.ts +4 -5
  64. package/es/components/iho-table/src/constants/index.js +1 -1
  65. package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +1 -0
  66. package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.d.ts +2 -1
  67. package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.js +1 -1
  68. package/es/components/iho-table/src/hooks/useColumnConfigAdaptor.js +1 -1
  69. package/es/components/iho-table/src/plugins/highLightSetPlugin.js +1 -1
  70. package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index.js +1 -1
  71. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.d.ts +9 -0
  72. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -1
  73. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/editSeparate.vue.d.ts +2 -1
  74. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/editSeparate.vue2.js +1 -1
  75. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/separateUtils.js +1 -1
  76. package/es/components/iho-table/src/plugins/rowGroupSettingPlugin/rowGroupUtils.js +1 -1
  77. package/es/components/iho-table/src/plugins/virtualTreePlugin/index.js +1 -1
  78. package/es/components/iho-table/src/types/index.d.ts +3 -1
  79. package/es/components/iho-table/src/types/pluginType.d.ts +5 -3
  80. package/es/components/iho-table/src/utils/index.d.ts +2 -2
  81. package/es/components/iho-table/src/utils/index.js +1 -1
  82. package/es/components/index.css +1 -1
  83. package/es/components/info-header/style/index.css +1 -1
  84. package/es/components/scale-view/index.d.ts +1 -0
  85. package/es/components/scale-view/src/ScaleView.vue.d.ts +1 -0
  86. package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
  87. package/es/components/scale-view/src/components/composables/choose-common.js +1 -1
  88. package/es/components/scale-view/src/components/formitem/r-address.d.ts +4 -4
  89. package/es/components/scale-view/src/components/formitem/r-address.js +1 -1
  90. package/es/components/scale-view/src/hooks/scaleview-computed.js +1 -1
  91. package/es/components/scale-view/src/hooks/scaleview-init.js +1 -1
  92. package/es/components/scale-view/src/hooks/scaleview-methods.js +1 -1
  93. package/es/components/scale-view/src/hooks/scaleview-state.d.ts +1 -0
  94. package/es/components/scale-view/src/hooks/scaleview-state.js +1 -1
  95. package/es/components/scale-view/src/hooks/use-component.d.ts +18 -4
  96. package/es/components/scale-view/src/utils/judge-types.d.ts +1 -1
  97. package/es/components/scale-view/src/utils/judge-types.js +1 -1
  98. package/es/components/scale-view/style/index.css +1 -1
  99. package/es/components/select-label/index.d.ts +14 -0
  100. package/es/components/select-label/src/LabelFormContent.vue2.js +1 -1
  101. package/es/components/select-label/src/SelectLabel.vue.d.ts +14 -0
  102. package/es/components/select-label/src/SelectLabel.vue2.js +1 -1
  103. package/es/components/select-person/src/SearchMultiple.vue.d.ts +0 -6
  104. package/es/components/shortcut-setter/index.d.ts +4 -0
  105. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +4 -0
  106. package/es/components/table-export-field/src/components/ExportModal.vue.d.ts +3 -0
  107. package/es/env.d.ts +25 -25
  108. package/es/shared/assets/img/failure.png.js +1 -1
  109. package/es/shared/assets/img/no-permission.png.js +1 -1
  110. package/es/shared/assets/img/nodata.png.js +1 -1
  111. package/es/shared/assets/img/notfound.png.js +1 -1
  112. package/es/shared/assets/img/qr.png.js +1 -1
  113. package/es/shared/assets/img/success.png.js +1 -1
  114. package/es/shared/assets/img/video.png.js +1 -1
  115. package/es/shared/assets/img/video_default_cover.png.js +1 -1
  116. package/es/shared/assets/img/xb_big.png.js +1 -1
  117. package/es/shared/assets/img/xb_small.png.js +1 -1
  118. package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +86 -0
  119. package/es/shared/package.json.js +1 -1
  120. package/es/shared/utils/fabricjs/index.d.ts +6823 -0
  121. package/es/shared/utils/tapable/index.d.ts +139 -0
  122. package/es/shared/utils/tapableLess.d.ts +28 -0
  123. package/es/shared/utils/tapableLess.js +1 -0
  124. package/package.json +2 -2
@@ -1,8 +1,7 @@
1
1
  import { AnyObject, Nullable, UndefinedAble } from '../../../../../es/shared/types';
2
2
  import { ComputedRef, InjectionKey, Ref } from 'vue';
3
3
  import { VxeTableInstance } from 'vxe-table';
4
- import { VxeTableEventProps } from 'vxe-table/types/table';
5
- import { IhoTableConfig, IhoTableEmits, IhoTableFieldItem, IhoTableHandler } from '../../../../../es/components/iho-table';
4
+ import { IhoTableConfig, IhoTableEmits, IhoTableEventTypes, IhoTableFieldItem, IhoTableHandler } from '../../../../../es/components/iho-table';
6
5
  import { IhoTableEventListener } from '../../../../../es/components/iho-table/src/hooks/tapHooks/useEventHooks';
7
6
  export declare enum WIDGET_TYPE {
8
7
  DEFAULT = "DEFAULT",
@@ -39,8 +38,8 @@ export declare enum WIDGET_TYPE {
39
38
  SEQUENCE = "SEQUENCE",
40
39
  VARIABLE_HEIGHT = "VARIABLE_HEIGHT"
41
40
  }
42
- export declare const VxeEventListenerNameList: Readonly<(keyof VxeTableEventProps)[]>;
43
- export declare const VxeTableEventNameList: ("toggleRowExpand" | "toggleTreeExpand" | "copy" | "scroll" | "cut" | "paste" | "keydown" | "keydownStart" | "keydownEnd" | "currentChange" | "radioChange" | "checkboxChange" | "checkboxAll" | "checkboxRangeStart" | "checkboxRangeChange" | "checkboxRangeEnd" | "cellClick" | "cellDblclick" | "cellMenu" | "cellMouseenter" | "cellMouseleave" | "headerCellClick" | "headerCellDblclick" | "headerCellMenu" | "footerCellClick" | "footerCellDblclick" | "footerCellMenu" | "sortChange" | "filterChange" | "filterVisible" | "resizableChange" | "menuClick" | "editClosed" | "editActived" | "editDisabled" | "validError" | "custom" | "openFnr" | "fnrChange" | "fnrFind" | "fnrFindAll" | "fnrReplace" | "fnrReplaceAll" | "cellAreaCopy" | "cellAreaCut" | "cellAreaPaste" | "cellAreaMerge" | "clearCellAreaMerge" | "headerCellAreaSelection" | "cellAreaSelectionStart" | "cellAreaSelectionDrag" | "cellAreaSelectionEnd" | "cellAreaExtensionStart" | "cellAreaExtensionDrag" | "cellAreaExtensionEnd" | "cellAreaArrowsStart" | "cellAreaArrowsEnd" | "activeCellChangeStart" | "activeCellChangeEnd")[];
41
+ export declare const VxeEventListenerNameList: Readonly<(keyof IhoTableEventTypes)[]>;
42
+ export declare const VxeTableEventNameList: ("toggleRowExpand" | "toggleTreeExpand" | "copy" | "scroll" | "cut" | "paste" | "keydown" | "keydownStart" | "keydownEnd" | "currentChange" | "radioChange" | "checkboxChange" | "checkboxAll" | "checkboxRangeStart" | "checkboxRangeChange" | "checkboxRangeEnd" | "cellClick" | "cellDblclick" | "cellMenu" | "cellMouseenter" | "cellMouseleave" | "headerCellClick" | "headerCellDblclick" | "headerCellMenu" | "footerCellClick" | "footerCellDblclick" | "footerCellMenu" | "sortChange" | "filterChange" | "filterVisible" | "resizableChange" | "menuClick" | "editClosed" | "editActived" | "editDisabled" | "validError" | "custom" | "openFnr" | "fnrChange" | "fnrFind" | "fnrFindAll" | "fnrReplace" | "fnrReplaceAll" | "cellAreaCopy" | "cellAreaCut" | "cellAreaPaste" | "cellAreaMerge" | "clearCellAreaMerge" | "headerCellAreaSelection" | "cellAreaSelectionStart" | "cellAreaSelectionDrag" | "cellAreaSelectionEnd" | "cellAreaExtensionStart" | "cellAreaExtensionDrag" | "cellAreaExtensionEnd" | "cellAreaArrowsStart" | "cellAreaArrowsEnd" | "activeCellChangeStart" | "activeCellChangeEnd" | "pageChange")[];
44
43
  export declare const IhoTableRowGroupSequence: readonly ["firstRowGroup", "secondRowGroup", "thirdRowGroup", "fourthRowGroup", "fifthRowGroup", "sixthRowGroup", "seventhRowGroup", "eighthRowGroup", "ninthRowGroup", "tenthRowGroup"];
45
44
  export declare const HIGHEST_PRIORITY: number;
46
45
  export declare const LOWEST_PRIORITY: number;
@@ -73,7 +72,7 @@ export declare enum IHO_TABLE_FIXED_STATUS {
73
72
  right = 2
74
73
  }
75
74
  export declare const IhoTableCustomEventNameTuple: readonly ["formChange", "settingClick", "formClick", "keyboard", "rowDrag"];
76
- export declare const IhoTableEventNameTuple: readonly ["formChange", "settingClick", "formClick", "keyboard", "rowDrag", ...("toggleRowExpand" | "toggleTreeExpand" | "copy" | "scroll" | "cut" | "paste" | "keydown" | "keydownStart" | "keydownEnd" | "currentChange" | "radioChange" | "checkboxChange" | "checkboxAll" | "checkboxRangeStart" | "checkboxRangeChange" | "checkboxRangeEnd" | "cellClick" | "cellDblclick" | "cellMenu" | "cellMouseenter" | "cellMouseleave" | "headerCellClick" | "headerCellDblclick" | "headerCellMenu" | "footerCellClick" | "footerCellDblclick" | "footerCellMenu" | "sortChange" | "filterChange" | "filterVisible" | "resizableChange" | "menuClick" | "editClosed" | "editActived" | "editDisabled" | "validError" | "custom" | "openFnr" | "fnrChange" | "fnrFind" | "fnrFindAll" | "fnrReplace" | "fnrReplaceAll" | "cellAreaCopy" | "cellAreaCut" | "cellAreaPaste" | "cellAreaMerge" | "clearCellAreaMerge" | "headerCellAreaSelection" | "cellAreaSelectionStart" | "cellAreaSelectionDrag" | "cellAreaSelectionEnd" | "cellAreaExtensionStart" | "cellAreaExtensionDrag" | "cellAreaExtensionEnd" | "cellAreaArrowsStart" | "cellAreaArrowsEnd" | "activeCellChangeStart" | "activeCellChangeEnd")[]];
75
+ export declare const IhoTableEventNameTuple: readonly ["formChange", "settingClick", "formClick", "keyboard", "rowDrag", ...("toggleRowExpand" | "toggleTreeExpand" | "copy" | "scroll" | "cut" | "paste" | "keydown" | "keydownStart" | "keydownEnd" | "currentChange" | "radioChange" | "checkboxChange" | "checkboxAll" | "checkboxRangeStart" | "checkboxRangeChange" | "checkboxRangeEnd" | "cellClick" | "cellDblclick" | "cellMenu" | "cellMouseenter" | "cellMouseleave" | "headerCellClick" | "headerCellDblclick" | "headerCellMenu" | "footerCellClick" | "footerCellDblclick" | "footerCellMenu" | "sortChange" | "filterChange" | "filterVisible" | "resizableChange" | "menuClick" | "editClosed" | "editActived" | "editDisabled" | "validError" | "custom" | "openFnr" | "fnrChange" | "fnrFind" | "fnrFindAll" | "fnrReplace" | "fnrReplaceAll" | "cellAreaCopy" | "cellAreaCut" | "cellAreaPaste" | "cellAreaMerge" | "clearCellAreaMerge" | "headerCellAreaSelection" | "cellAreaSelectionStart" | "cellAreaSelectionDrag" | "cellAreaSelectionEnd" | "cellAreaExtensionStart" | "cellAreaExtensionDrag" | "cellAreaExtensionEnd" | "cellAreaArrowsStart" | "cellAreaArrowsEnd" | "activeCellChangeStart" | "activeCellChangeEnd" | "pageChange")[]];
77
76
  export declare const InjectionIhoTableConfig: InjectionKey<Ref<IhoTableConfig>>;
78
77
  export declare const InjectionIhoTableFieldList: InjectionKey<Ref<IhoTableFieldItem[]>>;
79
78
  export declare const InjectionIhoTableEmits: InjectionKey<IhoTableEmits>;
@@ -1 +1 @@
1
- import{eventListener2EventName as e}from"../utils/index.js";var o=(e=>(e.DEFAULT="DEFAULT",e.PICTURE="PICTURE",e.FILE="FILE",e.MONEY="MONEY",e.HEADPORTRAIT="HEADPORTRAIT",e.LABEL="LABEL",e.TELEPHONE="TELEPHONE",e.BIRTHDAY="BIRTHDAY",e.MULTISELECT="MULTISELECT",e.CASCADE="CASCADE",e.SEARCH_TREE="SEARCH_TREE",e.COLOR="COLOR",e.EVALUATE="EVALUATE",e.MAP="MAP",e.VIDEO="VIDEO",e.SYSTEMFIELDS="SYSTEMFIELDS",e.PERCENTAGE="PERCENTAGE",e.HTML="HTML",e.CANDIDATE_COMPONENTS="CANDIDATE_COMPONENTS",e.TASKDATE="TASKDATE",e.AGE="AGE",e.STATUS="STATUS",e.WEBSITE="WEBSITE",e.IDCARD="IDCARD",e.COUNTDOWN="COUNTDOWN",e.DURATION="DURATION",e.COMBINATION="COMBINATION",e.PASSWORD="PASSWORD",e.QR_CODE="QR_CODE",e.CUSTOMER_NAME="CUSTOMER_NAME",e.BANK_CARD="BANK_CARD",e.SEQUENCE="SEQUENCE",e.VARIABLE_HEIGHT="VARIABLE_HEIGHT",e))(o||{});const n=Object.freeze(["onKeydownStart","onKeydown","onKeydownEnd","onPaste","onCopy","onCut","onCurrentChange","onRadioChange","onCheckboxChange","onCheckboxAll","onCheckboxRangeStart","onCheckboxRangeChange","onCheckboxRangeEnd","onCellClick","onCellDblclick","onCellMenu","onCellMouseenter","onCellMouseleave","onHeaderCellClick","onHeaderCellDblclick","onHeaderCellMenu","onFooterCellClick","onFooterCellDblclick","onFooterCellMenu","onSortChange","onFilterChange","onFilterVisible","onResizableChange","onToggleRowExpand","onToggleTreeExpand","onMenuClick","onEditClosed","onEditActived","onEditDisabled","onValidError","onScroll","onCustom","onOpenFnr","onFnrChange","onFnrFind","onFnrFindAll","onFnrReplace","onFnrReplaceAll","onCellAreaCopy","onCellAreaCut","onCellAreaPaste","onCellAreaMerge","onClearCellAreaMerge","onHeaderCellAreaSelection","onCellAreaSelectionStart","onCellAreaSelectionDrag","onCellAreaSelectionEnd","onCellAreaExtensionStart","onCellAreaExtensionDrag","onCellAreaExtensionEnd","onCellAreaArrowsStart","onCellAreaArrowsEnd","onActiveCellChangeStart","onActiveCellChangeEnd"]),E=n.map(e),l=Object.freeze(["firstRowGroup","secondRowGroup","thirdRowGroup","fourthRowGroup","fifthRowGroup","sixthRowGroup","seventhRowGroup","eighthRowGroup","ninthRowGroup","tenthRowGroup"]),C=-1/0,A=1/0;var T=(e=>(e.INPUT="INPUT",e.SEPARATE="SEPARATE",e.SELECT="SELECT",e.SELECT_MORE="SELECT_MORE",e.DATE="DATE",e.TIME="TIME",e.NUMBER="NUMBER",e.RADIO="RADIO",e))(T||{}),r=(e=>(e[e.NEGATIVE=0]="NEGATIVE",e[e.POSITIVE=1]="POSITIVE",e))(r||{}),t=(e=>(e.NEGATIVE="0",e.POSITIVE="1",e))(t||{}),a=(e=>(e.NOT_TREE="0",e.UNKNOWN="1",e.TRANSFORM_TREE_TYPE="2",e.TRANSFORM_WITH_SPAN_METHOD="3",e))(a||{}),I=(e=>(e[e.left=1]="left",e[e.right=2]="right",e))(I||{});const R=["formChange","settingClick","formClick","keyboard","rowDrag"],S=[...R,...E],i=Symbol("injectionIhoTableConfig"),O=Symbol("injectionIhoTableFieldList"),D=Symbol("InjectionIhoTableEmits"),N=Symbol("InjectionIhoTableAnnotation"),c=Symbol("InjectionIhoTableUUID"),h=Symbol("InjectionIhoTableInstance"),M=Symbol("InjectionIhoTableHandler"),d=Symbol("InjectionIhoTableEventListener");export{T as EDITABLE_WIDGET_TYPE,C as HIGHEST_PRIORITY,I as IHO_TABLE_FIXED_STATUS,r as IHO_TABLE_NUMBER_STATUS,t as IHO_TABLE_STRING_STATUS,a as IHO_TABLE_TREE_TYPE,R as IhoTableCustomEventNameTuple,S as IhoTableEventNameTuple,l as IhoTableRowGroupSequence,N as InjectionIhoTableAnnotation,i as InjectionIhoTableConfig,D as InjectionIhoTableEmits,d as InjectionIhoTableEventListener,O as InjectionIhoTableFieldList,M as InjectionIhoTableHandler,h as InjectionIhoTableInstance,c as InjectionIhoTableUUID,A as LOWEST_PRIORITY,n as VxeEventListenerNameList,E as VxeTableEventNameList,o as WIDGET_TYPE};
1
+ import{eventListener2EventName as e}from"../utils/index.js";var o=(e=>(e.DEFAULT="DEFAULT",e.PICTURE="PICTURE",e.FILE="FILE",e.MONEY="MONEY",e.HEADPORTRAIT="HEADPORTRAIT",e.LABEL="LABEL",e.TELEPHONE="TELEPHONE",e.BIRTHDAY="BIRTHDAY",e.MULTISELECT="MULTISELECT",e.CASCADE="CASCADE",e.SEARCH_TREE="SEARCH_TREE",e.COLOR="COLOR",e.EVALUATE="EVALUATE",e.MAP="MAP",e.VIDEO="VIDEO",e.SYSTEMFIELDS="SYSTEMFIELDS",e.PERCENTAGE="PERCENTAGE",e.HTML="HTML",e.CANDIDATE_COMPONENTS="CANDIDATE_COMPONENTS",e.TASKDATE="TASKDATE",e.AGE="AGE",e.STATUS="STATUS",e.WEBSITE="WEBSITE",e.IDCARD="IDCARD",e.COUNTDOWN="COUNTDOWN",e.DURATION="DURATION",e.COMBINATION="COMBINATION",e.PASSWORD="PASSWORD",e.QR_CODE="QR_CODE",e.CUSTOMER_NAME="CUSTOMER_NAME",e.BANK_CARD="BANK_CARD",e.SEQUENCE="SEQUENCE",e.VARIABLE_HEIGHT="VARIABLE_HEIGHT",e))(o||{});const n=Object.freeze(["onKeydownStart","onKeydown","onKeydownEnd","onPaste","onCopy","onCut","onCurrentChange","onRadioChange","onCheckboxChange","onCheckboxAll","onCheckboxRangeStart","onCheckboxRangeChange","onCheckboxRangeEnd","onCellClick","onCellDblclick","onCellMenu","onCellMouseenter","onCellMouseleave","onHeaderCellClick","onHeaderCellDblclick","onHeaderCellMenu","onFooterCellClick","onFooterCellDblclick","onFooterCellMenu","onSortChange","onFilterChange","onFilterVisible","onResizableChange","onToggleRowExpand","onToggleTreeExpand","onMenuClick","onEditClosed","onEditActived","onEditDisabled","onValidError","onScroll","onCustom","onOpenFnr","onFnrChange","onFnrFind","onFnrFindAll","onFnrReplace","onFnrReplaceAll","onCellAreaCopy","onCellAreaCut","onCellAreaPaste","onCellAreaMerge","onClearCellAreaMerge","onHeaderCellAreaSelection","onCellAreaSelectionStart","onCellAreaSelectionDrag","onCellAreaSelectionEnd","onCellAreaExtensionStart","onCellAreaExtensionDrag","onCellAreaExtensionEnd","onCellAreaArrowsStart","onCellAreaArrowsEnd","onActiveCellChangeStart","onActiveCellChangeEnd","onPageChange"]),E=n.map(e),l=Object.freeze(["firstRowGroup","secondRowGroup","thirdRowGroup","fourthRowGroup","fifthRowGroup","sixthRowGroup","seventhRowGroup","eighthRowGroup","ninthRowGroup","tenthRowGroup"]),C=-1/0,A=1/0;var T=(e=>(e.INPUT="INPUT",e.SEPARATE="SEPARATE",e.SELECT="SELECT",e.SELECT_MORE="SELECT_MORE",e.DATE="DATE",e.TIME="TIME",e.NUMBER="NUMBER",e.RADIO="RADIO",e))(T||{}),r=(e=>(e[e.NEGATIVE=0]="NEGATIVE",e[e.POSITIVE=1]="POSITIVE",e))(r||{}),t=(e=>(e.NEGATIVE="0",e.POSITIVE="1",e))(t||{}),a=(e=>(e.NOT_TREE="0",e.UNKNOWN="1",e.TRANSFORM_TREE_TYPE="2",e.TRANSFORM_WITH_SPAN_METHOD="3",e))(a||{}),I=(e=>(e[e.left=1]="left",e[e.right=2]="right",e))(I||{});const R=["formChange","settingClick","formClick","keyboard","rowDrag"],S=[...R,...E],i=Symbol("injectionIhoTableConfig"),O=Symbol("injectionIhoTableFieldList"),D=Symbol("InjectionIhoTableEmits"),N=Symbol("InjectionIhoTableAnnotation"),c=Symbol("InjectionIhoTableUUID"),h=Symbol("InjectionIhoTableInstance"),M=Symbol("InjectionIhoTableHandler"),d=Symbol("InjectionIhoTableEventListener");export{T as EDITABLE_WIDGET_TYPE,C as HIGHEST_PRIORITY,I as IHO_TABLE_FIXED_STATUS,r as IHO_TABLE_NUMBER_STATUS,t as IHO_TABLE_STRING_STATUS,a as IHO_TABLE_TREE_TYPE,R as IhoTableCustomEventNameTuple,S as IhoTableEventNameTuple,l as IhoTableRowGroupSequence,N as InjectionIhoTableAnnotation,i as InjectionIhoTableConfig,D as InjectionIhoTableEmits,d as InjectionIhoTableEventListener,O as InjectionIhoTableFieldList,M as InjectionIhoTableHandler,h as InjectionIhoTableInstance,c as InjectionIhoTableUUID,A as LOWEST_PRIORITY,n as VxeEventListenerNameList,E as VxeTableEventNameList,o as WIDGET_TYPE};
@@ -83,6 +83,7 @@ export declare function createTableEventHandlers({ hooks, config, $table, emits,
83
83
  onCellAreaArrowsEnd: import("vxe-table").VxeTableEvents.CellAreaArrowsEnd | undefined;
84
84
  onActiveCellChangeStart: import("vxe-table").VxeTableEvents.ActiveCellChangeStart | undefined;
85
85
  onActiveCellChangeEnd: import("vxe-table").VxeTableEvents.ActiveCellChangeEnd | undefined;
86
+ onPageChange: unknown;
86
87
  };
87
88
  export declare function createDataTransfer(hooks: TableHooks, config: MaybeRef<IhoTableConfig>, $table: MaybeRef<Nullable<VxeTableInstance>>): (data: AnyObject[]) => Promise<AnyObject[]>;
88
89
  export declare function createDomInsertComponent(hooks: TableHooks): {
@@ -63,12 +63,13 @@ declare class EventHooks extends AbstractEventHooks {
63
63
  readonly onActiveCellChangeEnd: AsyncParallelHook<[import("vxe-table").VxeTableProDefines.ActiveCellChangeEndEventParams, import("../../../../../../es/components/iho-table/src/types").IhoTableConfig, import("../../../../../../es/components/iho-table/src/types").IhoTableHandler & import("../../../../../../es/components/iho-table/src/types").IhoTableHandlerContext<false>], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
64
64
  readonly onCellAreaSelectionAllStart: AsyncParallelHook<[any, import("../../../../../../es/components/iho-table/src/types").IhoTableConfig, import("../../../../../../es/components/iho-table/src/types").IhoTableHandler & import("../../../../../../es/components/iho-table/src/types").IhoTableHandlerContext<false>], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
65
65
  readonly onCellAreaSelectionAllEnd: AsyncParallelHook<[any, import("../../../../../../es/components/iho-table/src/types").IhoTableConfig, import("../../../../../../es/components/iho-table/src/types").IhoTableHandler & import("../../../../../../es/components/iho-table/src/types").IhoTableHandlerContext<false>], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
66
+ readonly onPageChange: AsyncParallelHook<[import("vxe-table/types/pager").VxePagerDefines.PageChangeEventParams, import("../../../../../../es/components/iho-table/src/types").IhoTableConfig, import("../../../../../../es/components/iho-table/src/types").IhoTableHandler & import("../../../../../../es/components/iho-table/src/types").IhoTableHandlerContext<false>], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
66
67
  }
67
68
  export declare function useEventHooks(): {
68
69
  create: () => EventHooks;
69
70
  };
70
71
  export declare class IhoTableEventListener {
71
- eventMap: Map<"toggleRowExpand" | "toggleTreeExpand" | "copy" | "scroll" | "formChange" | "settingClick" | "formClick" | "keyboard" | "rowDrag" | "cut" | "paste" | "keydown" | "keydownStart" | "keydownEnd" | "currentChange" | "radioChange" | "checkboxChange" | "checkboxAll" | "checkboxRangeStart" | "checkboxRangeChange" | "checkboxRangeEnd" | "cellClick" | "cellDblclick" | "cellMenu" | "cellMouseenter" | "cellMouseleave" | "headerCellClick" | "headerCellDblclick" | "headerCellMenu" | "footerCellClick" | "footerCellDblclick" | "footerCellMenu" | "sortChange" | "filterChange" | "filterVisible" | "resizableChange" | "menuClick" | "editClosed" | "editActived" | "editDisabled" | "validError" | "custom" | "openFnr" | "fnrChange" | "fnrFind" | "fnrFindAll" | "fnrReplace" | "fnrReplaceAll" | "cellAreaCopy" | "cellAreaCut" | "cellAreaPaste" | "cellAreaMerge" | "clearCellAreaMerge" | "headerCellAreaSelection" | "cellAreaSelectionStart" | "cellAreaSelectionDrag" | "cellAreaSelectionEnd" | "cellAreaExtensionStart" | "cellAreaExtensionDrag" | "cellAreaExtensionEnd" | "cellAreaArrowsStart" | "cellAreaArrowsEnd" | "activeCellChangeStart" | "activeCellChangeEnd", Set<Func<any[], any>>>;
72
+ eventMap: Map<"toggleRowExpand" | "toggleTreeExpand" | "copy" | "scroll" | "formChange" | "settingClick" | "formClick" | "keyboard" | "rowDrag" | "cut" | "paste" | "keydown" | "keydownStart" | "keydownEnd" | "currentChange" | "radioChange" | "checkboxChange" | "checkboxAll" | "checkboxRangeStart" | "checkboxRangeChange" | "checkboxRangeEnd" | "cellClick" | "cellDblclick" | "cellMenu" | "cellMouseenter" | "cellMouseleave" | "headerCellClick" | "headerCellDblclick" | "headerCellMenu" | "footerCellClick" | "footerCellDblclick" | "footerCellMenu" | "sortChange" | "filterChange" | "filterVisible" | "resizableChange" | "menuClick" | "editClosed" | "editActived" | "editDisabled" | "validError" | "custom" | "openFnr" | "fnrChange" | "fnrFind" | "fnrFindAll" | "fnrReplace" | "fnrReplaceAll" | "cellAreaCopy" | "cellAreaCut" | "cellAreaPaste" | "cellAreaMerge" | "clearCellAreaMerge" | "headerCellAreaSelection" | "cellAreaSelectionStart" | "cellAreaSelectionDrag" | "cellAreaSelectionEnd" | "cellAreaExtensionStart" | "cellAreaExtensionDrag" | "cellAreaExtensionEnd" | "cellAreaArrowsStart" | "cellAreaArrowsEnd" | "activeCellChangeStart" | "activeCellChangeEnd" | "pageChange", Set<Func<any[], any>>>;
72
73
  addEventListener<T extends IhoTableEventNameUnion>(key: T, handler: (...payload: IhoTableEmitPayload<T>) => void): void;
73
74
  trigger<T extends IhoTableEventNameUnion>(key: T, ...payload: IhoTableEmitPayload<T>): void;
74
75
  }
@@ -1 +1 @@
1
- import"../../../../../shared/utils/tapable/SyncHook.js";import"../../../../../shared/utils/tapable/SyncBailHook.js";import"../../../../../shared/utils/tapable/SyncWaterfallHook.js";import"../../../../../shared/utils/tapable/SyncLoopHook.js";import e from"../../../../../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{getCurrentInstance as n,onMounted as t,onBeforeUnmount as o,provide as i}from"vue";import{InjectionIhoTableEventListener as c}from"../../constants/index.js";import{AbstractEventHooks as s}from"../../types/pluginType.js";class l extends s{constructor(){super(...arguments),this.onKeydownStart=new e(["event","context","config"]),this.onKeydown=new e(["event","context","config"]),this.onKeydownEnd=new e(["event","context","config"]),this.onPaste=new e(["event","context","config"]),this.onCopy=new e(["event","context","config"]),this.onCut=new e(["event","context","config"]),this.onCurrentChange=new e(["event","context","config"]),this.onRadioChange=new e(["event","context","config"]),this.onCheckboxChange=new e(["event","context","config"]),this.onCheckboxAll=new e(["event","context","config"]),this.onCheckboxRangeStart=new e(["event","context","config"]),this.onCheckboxRangeChange=new e(["event","context","config"]),this.onCheckboxRangeEnd=new e(["event","context","config"]),this.onCellClick=new e(["event","context","config"]),this.onCellDblclick=new e(["event","context","config"]),this.onCellMenu=new e(["event","context","config"]),this.onCellMouseenter=new e(["event","context","config"]),this.onCellMouseleave=new e(["event","context","config"]),this.onHeaderCellClick=new e(["event","context","config"]),this.onHeaderCellDblclick=new e(["event","context","config"]),this.onHeaderCellMenu=new e(["event","context","config"]),this.onFooterCellClick=new e(["event","context","config"]),this.onFooterCellDblclick=new e(["event","context","config"]),this.onFooterCellMenu=new e(["event","context","config"]),this.onSortChange=new e(["event","context","config"]),this.onFilterChange=new e(["event","context","config"]),this.onFilterVisible=new e(["event","context","config"]),this.onResizableChange=new e(["event","context","config"]),this.onToggleRowExpand=new e(["event","context","config"]),this.onToggleTreeExpand=new e(["event","context","config"]),this.onMenuClick=new e(["event","context","config"]),this.onEditClosed=new e(["event","context","config"]),this.onEditActived=new e(["event","context","config"]),this.onEditDisabled=new e(["event","context","config"]),this.onValidError=new e(["event","context","config"]),this.onScroll=new e(["event","context","config"]),this.onCustom=new e(["event","context","config"]),this.onOpenFnr=new e(["event","context","config"]),this.onFnrChange=new e(["event","context","config"]),this.onFnrFind=new e(["event","context","config"]),this.onFnrFindAll=new e(["event","context","config"]),this.onFnrReplace=new e(["event","context","config"]),this.onFnrReplaceAll=new e(["event","context","config"]),this.onCellAreaCopy=new e(["event","context","config"]),this.onCellAreaCut=new e(["event","context","config"]),this.onCellAreaPaste=new e(["event","context","config"]),this.onCellAreaMerge=new e(["event","context","config"]),this.onClearCellAreaMerge=new e(["event","context","config"]),this.onHeaderCellAreaSelection=new e(["event","context","config"]),this.onCellAreaSelectionStart=new e(["event","context","config"]),this.onCellAreaSelectionDrag=new e(["event","context","config"]),this.onCellAreaSelectionEnd=new e(["event","context","config"]),this.onCellAreaExtensionStart=new e(["event","context","config"]),this.onCellAreaExtensionDrag=new e(["event","context","config"]),this.onCellAreaExtensionEnd=new e(["event","context","config"]),this.onCellAreaArrowsStart=new e(["event","context","config"]),this.onCellAreaArrowsEnd=new e(["event","context","config"]),this.onActiveCellChangeStart=new e(["event","context","config"]),this.onActiveCellChangeEnd=new e(["event","context","config"]),this.onCellAreaSelectionAllStart=new e(["event","context","config"]),this.onCellAreaSelectionAllEnd=new e(["event","context","config"])}}function r(){return{create:function(){return new l}}}class a{constructor(){this.eventMap=new Map}addEventListener(e,i){if(!n())throw new Error("addEventListener can only used in setup environment!");const c=this.eventMap.get(e)||new Set;this.eventMap.set(e,c),t((()=>c.add(i))),o((()=>c.delete(i)))}trigger(e,...n){var t;null==(t=this.eventMap.get(e))||t.forEach((e=>{e(...n)}))}}function h(){if(!n())throw new Error("provideIhoTableEventListener can only used in setup environment!");const e=new a;return i(c,e),e}export{a as IhoTableEventListener,h as provideIhoTableEventListener,r as useEventHooks};
1
+ import"../../../../../shared/utils/tapable/SyncHook.js";import"../../../../../shared/utils/tapable/SyncBailHook.js";import"../../../../../shared/utils/tapable/SyncWaterfallHook.js";import"../../../../../shared/utils/tapable/SyncLoopHook.js";import e from"../../../../../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{getCurrentInstance as n,onMounted as t,onBeforeUnmount as o,provide as i}from"vue";import{InjectionIhoTableEventListener as c}from"../../constants/index.js";import{AbstractEventHooks as s}from"../../types/pluginType.js";class l extends s{constructor(){super(...arguments),this.onKeydownStart=new e(["event","context","config"]),this.onKeydown=new e(["event","context","config"]),this.onKeydownEnd=new e(["event","context","config"]),this.onPaste=new e(["event","context","config"]),this.onCopy=new e(["event","context","config"]),this.onCut=new e(["event","context","config"]),this.onCurrentChange=new e(["event","context","config"]),this.onRadioChange=new e(["event","context","config"]),this.onCheckboxChange=new e(["event","context","config"]),this.onCheckboxAll=new e(["event","context","config"]),this.onCheckboxRangeStart=new e(["event","context","config"]),this.onCheckboxRangeChange=new e(["event","context","config"]),this.onCheckboxRangeEnd=new e(["event","context","config"]),this.onCellClick=new e(["event","context","config"]),this.onCellDblclick=new e(["event","context","config"]),this.onCellMenu=new e(["event","context","config"]),this.onCellMouseenter=new e(["event","context","config"]),this.onCellMouseleave=new e(["event","context","config"]),this.onHeaderCellClick=new e(["event","context","config"]),this.onHeaderCellDblclick=new e(["event","context","config"]),this.onHeaderCellMenu=new e(["event","context","config"]),this.onFooterCellClick=new e(["event","context","config"]),this.onFooterCellDblclick=new e(["event","context","config"]),this.onFooterCellMenu=new e(["event","context","config"]),this.onSortChange=new e(["event","context","config"]),this.onFilterChange=new e(["event","context","config"]),this.onFilterVisible=new e(["event","context","config"]),this.onResizableChange=new e(["event","context","config"]),this.onToggleRowExpand=new e(["event","context","config"]),this.onToggleTreeExpand=new e(["event","context","config"]),this.onMenuClick=new e(["event","context","config"]),this.onEditClosed=new e(["event","context","config"]),this.onEditActived=new e(["event","context","config"]),this.onEditDisabled=new e(["event","context","config"]),this.onValidError=new e(["event","context","config"]),this.onScroll=new e(["event","context","config"]),this.onCustom=new e(["event","context","config"]),this.onOpenFnr=new e(["event","context","config"]),this.onFnrChange=new e(["event","context","config"]),this.onFnrFind=new e(["event","context","config"]),this.onFnrFindAll=new e(["event","context","config"]),this.onFnrReplace=new e(["event","context","config"]),this.onFnrReplaceAll=new e(["event","context","config"]),this.onCellAreaCopy=new e(["event","context","config"]),this.onCellAreaCut=new e(["event","context","config"]),this.onCellAreaPaste=new e(["event","context","config"]),this.onCellAreaMerge=new e(["event","context","config"]),this.onClearCellAreaMerge=new e(["event","context","config"]),this.onHeaderCellAreaSelection=new e(["event","context","config"]),this.onCellAreaSelectionStart=new e(["event","context","config"]),this.onCellAreaSelectionDrag=new e(["event","context","config"]),this.onCellAreaSelectionEnd=new e(["event","context","config"]),this.onCellAreaExtensionStart=new e(["event","context","config"]),this.onCellAreaExtensionDrag=new e(["event","context","config"]),this.onCellAreaExtensionEnd=new e(["event","context","config"]),this.onCellAreaArrowsStart=new e(["event","context","config"]),this.onCellAreaArrowsEnd=new e(["event","context","config"]),this.onActiveCellChangeStart=new e(["event","context","config"]),this.onActiveCellChangeEnd=new e(["event","context","config"]),this.onCellAreaSelectionAllStart=new e(["event","context","config"]),this.onCellAreaSelectionAllEnd=new e(["event","context","config"]),this.onPageChange=new e(["event","context","config"])}}function r(){return{create:function(){return new l}}}class a{constructor(){this.eventMap=new Map}addEventListener(e,i){if(!n())throw new Error("addEventListener can only used in setup environment!");const c=this.eventMap.get(e)||new Set;this.eventMap.set(e,c),t((()=>c.add(i))),o((()=>c.delete(i)))}trigger(e,...n){var t;null==(t=this.eventMap.get(e))||t.forEach((e=>{e(...n)}))}}function h(){if(!n())throw new Error("provideIhoTableEventListener can only used in setup environment!");const e=new a;return i(c,e),e}export{a as IhoTableEventListener,h as provideIhoTableEventListener,r as useEventHooks};
@@ -1 +1 @@
1
- import{cloneDeep as e,isString as t,isFunction as n,pick as o,isArray as i,isNumber as a}from"lodash-es";import{isObject as r}from"@vue/shared";const s=Symbol("remove property");function l(){return{formConfigLikeAdaptor:function(l){const p={};return r(l)?{fieldList:function(l){const m=new Map([["NONE",0],["LEFT",1],["RIGHT",2]]),u=new Map([["0",0],["1",1]]),c=new Map([...["RADIO","RADIO_BLOCK","CHECKBOX","CHECKBOX_BLOCK","SELECT","SEARCH","SEARCH_MORE","SWITCH_COMPONENT"].map((e=>[e,"select"])),...["DATE"].map((e=>[e,"date"])),...["INPUT"].map((e=>[e,"input"])),...["DIGITAL"].map((e=>[e,"number"]))]),d=(e,t)=>{if(!r(e))return;const n={label:e.describe,...e};t.options=i(t.options)?[...t.options,n]:[n]},f=(e,n)=>{0!==e&&"0"!==e&&e&&(t(e)||a(e))&&(console.log("value=>",e),n.componentProps={maxTagCount:+e,...n.componentProps})},_=new Map([["multi_select_value",f],["is_null",(e,t,n,o)=>{"1"!==e&&"0"===e&&(o[n.val_key]=[{required:!0,message:"必填"}])}],["validate",(e,t)=>{if(!r(e))return;t.componentProps={...Object.entries({maxlength:"max_length",minlength:"min_length",max:"max_value",min:"min_value",precision:"decimal_length"}).reduce(((t,[n,o])=>(t[n]=e[o],t)),{}),...t.componentProps}}],["dateValidate",(e,t)=>{r(e)&&(t.isDateDisabled=(t,n)=>{if(!r(n))return;const{startDate:o,endDate:i}=e;let a=!1;return o&&(a=new Date(n[o]).getTime()>t),i&&(a=a||new Date(n[i]).getTime()<t),a})}],["date_format","valueFormat"],...["open","close"].map((e=>[e,d])),["is_edit",{property:"isEdit",valueMap:u}],["html_type",(e,n,o)=>{var i;if(!t(e))return;if("DATE"===e)return void(n.formType=t(o.date_format)&&o.date_format.startsWith("HH:mm")?"time":"date");n.formType=null!=(i=c.get(e))?i:e;const a="SEARCH"!==e&&("SEARCH_MORE"===e||("SELECT"===e?"0"===o.multi_select:null));a&&(n.componentProps={multiple:a,...n.componentProps})}],["option",{property:"options",fieldMap:new Map([["text","label"]])}],...["alias","name"].map((e=>[e,(e,t,n)=>{var o;t.title=`${null!=(o=n.alias)?o:n.name}${n.suffix?`(${n.suffix})`:""}`}]))]),v=new Map([["sum","isSum"],["show","isShow"],["elementId","columnName"],["columnWidth","colWidth"],["fixedWayEnum",{property:"isFixed",valueMap:m}],["multi_select_value",f],["setting",{fieldMap:_,assign:!0}]]);return l.map((e=>E(e,p,v)));function E(a,l,p){if(!p)return e(a);const m={};return Object.entries(a).forEach((([e,o])=>{const i=p.get(e);return i?i!==s?t(i)?m[i]=o:n(i)?i(o,m,a,l):void(r(i)&&(i.assign?Object.assign(m,u(o,i)):m[i.property||e]=u(o,i))):void 0:m[e]=o})),m.componentProps=Object.assign({},m.componentProps,o(m,["options","isDateDisabled"])),m;function u(e,t){var o,a;return!r(t)||n(t)?e:i(e)?e.map((e=>u(e,t))):r(e)?E(e,l,t.fieldMap):null!=(a=null==(o=t.valueMap)?void 0:o.get(e))?a:e}}}(l.fieldList),editRules:p}:{fieldList:[],editRules:p}}}}export{l as useColumnConfigAdaptor};
1
+ import{cloneDeep as e,isString as t,isFunction as n,pick as o,isArray as a,isNumber as i}from"lodash-es";import{isObject as r}from"@vue/shared";const s=Symbol("remove property");function l(){return{formConfigLikeAdaptor:function(l){const p={};return r(l)?{fieldList:function(l){const m=new Map([["NONE",0],["LEFT",1],["RIGHT",2]]),u=new Map([["0",0],["1",1]]),c=new Map([...["RADIO","RADIO_BLOCK","CHECKBOX","CHECKBOX_BLOCK","SELECT","SEARCH","SEARCH_MORE","SWITCH_COMPONENT"].map((e=>[e,"select"])),...["DATE"].map((e=>[e,"date"])),...["INPUT"].map((e=>[e,"input"])),...["DIGITAL"].map((e=>[e,"number"]))]),d=(e,t)=>{if(!r(e))return;const n={label:e.describe,...e};t.options=a(t.options)?[...t.options,n]:[n]},f=(e,n)=>{0!==e&&"0"!==e&&e&&(t(e)||i(e))&&(console.log("value=>",e),n.componentProps={maxTagCount:+e,...n.componentProps})},_=new Map([["multi_select_value",f],["is_null",(e,t,n,o)=>{"1"!==e&&"0"===e&&(o[n.val_key]=[{required:!0,message:"必填"}])}],["validate",(e,t)=>{if(!r(e))return;t.componentProps={...Object.entries({maxlength:"max_length",minlength:"min_length",max:"max_value",min:"min_value",precision:"decimal_length"}).reduce(((t,[n,o])=>(t[n]=e[o],t)),{}),...t.componentProps}}],["dateValidate",(e,t)=>{r(e)&&(t.isDateDisabled=(t,n)=>{if(!r(n))return;const{startDate:o,endDate:a}=e;let i=!1;return o&&(i=new Date(n[o]).getTime()>t),a&&(i=i||new Date(n[a]).getTime()<t),i})}],["date_format","valueFormat"],...["open","close"].map((e=>[e,d])),["is_edit",{property:"isEdit",valueMap:u}],["free_entry",(e,t,n)=>{t.componentProps={...t.componentProps,allowCreate:"1"===e||1===e,shouldSave:"1"===n.save_free_entry||1===n.save_free_entry}}],["html_type",(e,n,o)=>{var a;if(!t(e))return;if("DATE"===e)return void(n.formType=t(o.date_format)&&o.date_format.startsWith("HH:mm")?"time":"date");n.formType=null!=(a=c.get(e))?a:e;const i="SEARCH"!==e&&("SEARCH_MORE"===e||("SELECT"===e?"0"===o.multi_select:null));i&&(n.componentProps={multiple:i,...n.componentProps})}],["option",{property:"options",fieldMap:new Map([["text","label"]])}],...["alias","name"].map((e=>[e,(e,t,n)=>{var o;t.title=`${null!=(o=n.alias)?o:n.name}${n.suffix?`(${n.suffix})`:""}`}]))]),v=new Map([["sum","isSum"],["show","isShow"],["elementId","columnName"],["columnWidth","colWidth"],["fixedWayEnum",{property:"isFixed",valueMap:m}],["multi_select_value",f],["setting",{fieldMap:_,assign:!0}]]);return l.map((e=>E(e,p,v)));function E(i,l,p){if(!p)return e(i);const m={};return Object.entries(i).forEach((([e,o])=>{const a=p.get(e);return a?a!==s?t(a)?m[a]=o:n(a)?a(o,m,i,l):void(r(a)&&(a.assign?Object.assign(m,u(o,a)):m[a.property||e]=u(o,a))):void 0:m[e]=o})),m.componentProps=Object.assign({},m.componentProps,o(m,["options","isDateDisabled"])),m;function u(e,t){var o,i;return!r(t)||n(t)?e:a(e)?e.map((e=>u(e,t))):r(e)?E(e,l,t.fieldMap):null!=(i=null==(o=t.valueMap)?void 0:o.get(e))?i:e}}}(l.fieldList),editRules:p}:{fieldList:[],editRules:p}}}}export{l as useColumnConfigAdaptor};
@@ -1 +1 @@
1
- import{hex2rgba as o}from"../../../../shared/utils/index.js";import{isFunction as r,isString as t,isObject as n}from"lodash-es";import"../../index.js";import{useUUIDMap as e}from"../utils/index.js";import{defineTablePlugin as s}from"../hooks/useTablePlugin.js";function u(){const u="highLightSetPlugin",{getItemFromUUID:i,removeItemFromUUID:l,setItemFromUUID:a}=e((()=>!1));return s({name:u,apply(e){e.dataHooks.data.tapPromise(u,(async(o,r)=>{r.uuid&&(o.rowColor||o.fontColor)&&a(r.uuid,!0)})),e.dataHooks.dataEnd.tap(u,(e=>{if(!e.uuid||!i(e.uuid))return;const s=e.rowStyle;e.rowStyle=function(t){if(t.row.rowColor||t.row.fontColor){const[n,e,u,i]=o(t.row.rowColor||"",.2),l={"--row-background-color":`rgba(${n}, ${e}, ${u}, ${i})`,color:t.row.fontColor};return r(s)?Object.assign(l,s(t)):l}return r(s)?s(t):null};const u=e.rowClassName;e.rowClassName=function(o){if(o.row.rowColor){const e="row--custom";if(t(u))return`${e} ${u}`;if(r(u)){const r=u(o);return n(r)?Object.assign({"row--custom":!0},r):t(r)?`${e} ${r}`:null}return e}return r(u)?u(o):t(u)?u:null},l(e.uuid)}))}})}export{u as highLightSetPlugin};
1
+ import{traverse as o,hex2rgba as r}from"../../../../shared/utils/index.js";import{isFunction as t,isString as n,isObject as e}from"lodash-es";import"../../index.js";import{useUUIDMap as i}from"../utils/index.js";import{defineTablePlugin as u}from"../hooks/useTablePlugin.js";function s(){const s="highLightSetPlugin",{getItemFromUUID:l,removeItemFromUUID:a,setItemFromUUID:m}=i((()=>!1));return u({name:s,apply(i){i.dataHooks.data.tapPromise(s,(async(r,t)=>{if(!t.uuid||l(t.uuid))return;let n=!1;o(r,((o,r)=>{(o.rowColor||o.fontColor)&&(n=!0,r())}),["children","childrenList"]),n&&m(t.uuid,!0)})),i.dataHooks.dataEnd.tap(s,(o=>{if(!o.uuid||!l(o.uuid))return;const i=o.rowStyle;o.rowStyle=function(o){if(o.row.rowColor||o.row.fontColor){const[n,e,u,s]=r(o.row.rowColor||"",.2),l={"--row-background-color":`rgba(${n}, ${e}, ${u}, ${s})`,color:o.row.fontColor};return t(i)?Object.assign(l,i(o)):l}return t(i)?i(o):null};const u=o.rowClassName;o.rowClassName=function(o){if(o.row.rowColor){const r="row--custom";if(n(u))return`${r} ${u}`;if(t(u)){const t=u(o);return e(t)?Object.assign({"row--custom":!0},t):n(t)?`${r} ${t}`:null}return r}return t(u)?u(o):n(u)?u:null},a(o.uuid)}))}})}export{s as highLightSetPlugin};
@@ -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;return i("section",{class:"iho-table__headerWrapper"},[i("section",{style:{width: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)))}},[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={autofocus:"input",name:x.getCellType(l),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 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={autofocus:"input",name:x.getCellType(l),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};
@@ -33,6 +33,10 @@ declare const _default: import("vue").DefineComponent<{
33
33
  type: BooleanConstructor;
34
34
  default: boolean;
35
35
  };
36
+ shouldSave: {
37
+ type: BooleanConstructor;
38
+ default: boolean;
39
+ };
36
40
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
37
41
  value: {
38
42
  type: PropType<string | number | (string | number)[]>;
@@ -64,11 +68,16 @@ declare const _default: import("vue").DefineComponent<{
64
68
  type: BooleanConstructor;
65
69
  default: boolean;
66
70
  };
71
+ shouldSave: {
72
+ type: BooleanConstructor;
73
+ default: boolean;
74
+ };
67
75
  }>> & {
68
76
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
69
77
  }, {
70
78
  options: AnyObject[];
71
79
  placeholder: string;
72
80
  allowCreate: boolean;
81
+ shouldSave: boolean;
73
82
  }>;
74
83
  export default _default;
@@ -1 +1 @@
1
- import{defineComponent as e,inject as l,ref as o,computed as a,createVNode as t}from"vue";import{keywordMatcher as u}from"../../../../../../../shared/utils/index.js";import{NSelect as r}from"naive-ui";import{useIhoTableFormEvent as n}from"../../../../utils/index.js";import{useDebounceFn as i}from"@vueuse/core";import{isEmpty as s,isFunction as p}from"lodash-es";var c=e({name:"EditSelect",props:{value:{type:[Array,String,Number]},column:{type:Object,required:!0},row:{type:Object,required:!0},rowIndex:{type:Number,required:!0},options:{type:Array,default:()=>[]},queryOptions:{type:Function},placeholder:{type:String,default:"请选择"},allowCreate:{type:Boolean,default:!1}},emits:["update:value"],setup(e,{emit:c}){const d=l("$xetable"),v=o(null);function m(e){v.value=e}const f=o(!1),{emitFormChangeWithParams:y}=n({...e,$table:d}),b=o("");function w(){b.value=""}const h=o([]),x=a((()=>{const l=s(h.value)?e.options:h.value;if(!b.value)return l;const o=l.filter((e=>e.label&&e.label.includes(b.value)||u(b.value,e.keyword)));return!e.allowCreate||o.some((e=>e.label===b.value))?o:[...o,{label:b.value,value:b.value,created:!0}]})),q=o(!1),O=i((async function(l=""){b.value=l;try{if(q.value=!0,!p(e.queryOptions))return;h.value=await e.queryOptions({keyword:l,row:e.row,column:e.column,rowIndex:e.rowIndex})}catch(l){console.log(`获取${e.column.field}options错误`)}finally{q.value=!1}}),400);function g(l,o){const a=e.value;c("update:value",l),y({oldValue:a,option:o})}function S(e){var l,o;"Tab"===e.key&&v.value&&(null==(o=(l=v.value).handleKeydown)||o.call(l,{...e,key:"Enter",preventDefault:e.preventDefault.bind(e)}))}const j=()=>({class:"iho-table__selectOption"}),k={class:"iho-table__selectMenu"};return()=>t(r,{ref:m,show:f.value,"onUpdate:show":e=>f.value=e,placeholder:e.placeholder,loading:q.value,options:x.value,value:e.value,remote:!0,onSearch:O,clearable:!0,filterable:!0,nodeProps:j,menuProps:k,onUpdateShow:w,onUpdateValue:g,onKeydown:S},null)}});export{c as default};
1
+ import{defineComponent as e,inject as o,ref as l,computed as t,createVNode as a,toRaw as u}from"vue";import{keywordMatcher as r,arrayed as n}from"../../../../../../../shared/utils/index.js";import{NSelect as i}from"naive-ui";import{InjectionIhoTableUUID as s}from"../../../../constants/index.js";import{selectOptionsMap as d}from"../hooks/useSelectOption.js";import{useIhoTableFormEvent as p}from"../../../../utils/index.js";import{useDebounceFn as c}from"@vueuse/core";import{isEmpty as v,isFunction as m,isArray as f,isObject as h,omit as y}from"lodash-es";var b=e({name:"EditSelect",props:{value:{type:[Array,String,Number]},column:{type:Object,required:!0},row:{type:Object,required:!0},rowIndex:{type:Number,required:!0},options:{type:Array,default:()=>[]},queryOptions:{type:Function},placeholder:{type:String,default:"请选择"},allowCreate:{type:Boolean,default:!1},shouldSave:{type:Boolean,default:!1}},emits:["update:value"],setup(e,{emit:b}){const w=o("$xetable"),S=l(null);function x(e){S.value=e}const O=l(!1),{emitFormChangeWithParams:g}=p({...e,$table:w}),j=l("");function q(){return E()}const k=l([]),_=t((()=>{let o=v(k.value)?e.options:k.value;return j.value?(o=o.filter((e=>e.label&&e.label.includes(j.value)||r(j.value,e.keyword))),!e.allowCreate||o.some((e=>e.label===j.value))?o:[...o,{label:j.value,value:j.value,created:!0,shouldSave:e.shouldSave}]):o})),C=l(!1),E=c((async function(o=""){j.value=o;try{if(C.value=!0,!m(e.queryOptions)||!v(e.options))return;k.value=await e.queryOptions({keyword:o,row:e.row,column:e.column,rowIndex:e.rowIndex})}catch(o){console.log(`获取${e.column.field}options错误`)}finally{C.value=!1}}),400),I=o(s);function P(o,l){const t=e.value;b("update:value",o);const a=d.get(I);a&&f(a[e.column.field])&&n(l).forEach((o=>{if(!h(o))return;const l=o;l.created&&l.shouldSave&&a[e.column.field].push(y(u(l),["created","shouldSave"]))})),g({oldValue:t,option:l})}function U(e){var o,l;"Tab"===e.key&&S.value&&(null==(l=(o=S.value).handleKeydown)||l.call(o,{...e,key:"Enter",preventDefault:e.preventDefault.bind(e)}))}const $=()=>({class:"iho-table__selectOption"}),A={class:"iho-table__selectMenu"};return()=>a(i,{ref:x,show:O.value,"onUpdate:show":e=>O.value=e,placeholder:e.placeholder,loading:C.value,options:_.value,value:e.value,remote:!0,onSearch:E,clearable:!0,filterable:!0,nodeProps:$,menuProps:A,onUpdateShow:q,onUpdateValue:P,onKeydown:U},null)}});export{b as default};
@@ -1,6 +1,6 @@
1
1
  import { AnyObject, Func } from '../../../../../../../../es/shared/types';
2
2
  import { CSSProperties, PropType } from 'vue';
3
- import { VxeTableDefines } from 'vxe-table';
3
+ import { VxeTableConstructor, VxeTableDefines, VxeTableMethods, VxeTablePrivateMethods } from 'vxe-table';
4
4
  declare const _default: import("vue").DefineComponent<{
5
5
  value: {};
6
6
  height: {
@@ -52,6 +52,7 @@ declare const _default: import("vue").DefineComponent<{
52
52
  }>>;
53
53
  emit: (event: "click" | "update:value", ...args: any[]) => void;
54
54
  tableHandler: import("../../../../types").IhoTableHandler;
55
+ $table: VxeTableConstructor & VxeTablePrivateMethods & VxeTableMethods;
55
56
  popoverRef: import("vue").Ref<{
56
57
  syncPosition: Func;
57
58
  } | undefined>;
@@ -1 +1 @@
1
- import{defineComponent as e,inject as a,ref as t,watch as o,computed as u,onDeactivated as l,openBlock as r,createBlock as n,unref as i,withCtx as s,createElementVNode as p,withModifiers as d,normalizeStyle as v,toDisplayString as c,renderSlot as m,createVNode as f}from"vue";import{cloneDeep as h,isObject as w,isArray as y}from"lodash-es";import{NPopover as g,NInput as b}from"naive-ui";import{InjectionIhoTableHandler as x}from"../../../../constants/index.js";import{useIhoTableFormEvent as k}from"../../../../utils/index.js";const _=["onClick"];var C=e({__name:"editSeparate",props:{value:{},height:{type:Number,default:48},column:{type:Object,required:!0},row:{type:Object,required:!0},displayContent:{type:String,default:""},rowIndex:{type:Number,required:!0}},emits:["update:value","click"],setup(e,{emit:C}){const j=e,U=a(x),q=t(),P=t();function S(e){P.value=e}const T=t(!1);function I(e){T.value=e}function N(e){T.value=!T.value,C("click",e)}o(T,(function(e){e?async function(){var e;P.value=h(j.value),await new Promise((e=>setTimeout(e))),null==(e=q.value)||e.syncPosition()}():R()}));const{emitFormChangeWithParams:O}=k(j);async function R(){if(!w(P.value)&&!y(P.value)&&j.value===P.value)return;const e=j.value;C("update:value",P.value),O({oldValue:e}),U.updateTableDataRef()}const z=u((()=>({border:"1px solid #f5f5f5",height:j.height-16+"px",display:"flex",alignItems:"center",padding:"0",background:"white",wordBreak:"keep-all",boxSizing:"border-box","border-radius":"4px"})));return l(R),(a,t)=>(r(),n(i(g),{ref_key:"popoverRef",ref:q,trigger:"manual",show:T.value,"onUpdate:show":t[1]||(t[1]=e=>T.value=e),"show-arrow":!1},{trigger:s((()=>[p("div",{onClick:d(N,["stop"]),style:v(i(z)),class:"iho-table__separateText"},c(e.displayContent||" "),13,_)])),default:s((()=>[m(a.$slots,"menu",{value:P.value,"onUpdate:value":S,"onUpdate:show":I,col:e.column,row:e.row},(()=>[f(i(b),{value:P.value,"onUpdate:value":t[0]||(t[0]=e=>P.value=e),type:"textarea"},null,8,["value"])]))])),_:3},8,["show"]))}});export{C as default};
1
+ import{defineComponent as e,inject as a,ref as t,watch as o,computed as l,onBeforeUnmount as u,onDeactivated as r,openBlock as n,createBlock as i,unref as s,withCtx as p,createElementVNode as d,withModifiers as v,normalizeStyle as c,toDisplayString as m,renderSlot as f,createVNode as h}from"vue";import{cloneDeep as b,isObject as w,isArray as y}from"lodash-es";import{NPopover as g,NInput as x}from"naive-ui";import{InjectionIhoTableHandler as k}from"../../../../constants/index.js";import{useIhoTableFormEvent as _}from"../../../../utils/index.js";const C=["onClick"];var j=e({__name:"editSeparate",props:{value:{},height:{type:Number,default:48},column:{type:Object,required:!0},row:{type:Object,required:!0},displayContent:{type:String,default:""},rowIndex:{type:Number,required:!0}},emits:["update:value","click"],setup(e,{emit:j}){const U=e,q=a(k),P=a("$xetable"),S=t(),T=t();function $(e){T.value=e}const I=t(!1);function N(e){I.value=e}function O(e){I.value=!I.value,j("click",e)}o(I,(function(e){e?async function(){var e;T.value=b(U.value),await new Promise((e=>setTimeout(e))),null==(e=S.value)||e.syncPosition()}():z()}));const{emitFormChangeWithParams:R}=_(l((()=>({...U,$table:P}))));async function z(){if(!w(T.value)&&!y(T.value)&&U.value===T.value)return;const e=U.value;j("update:value",T.value),R({oldValue:e}),q.updateTableDataRef()}const B=l((()=>({border:"1px solid #f5f5f5",height:U.height-16+"px",display:"flex",alignItems:"center",padding:"0",background:"white",wordBreak:"keep-all",boxSizing:"border-box","border-radius":"4px"})));return u(z),r(z),(a,t)=>(n(),i(s(g),{ref_key:"popoverRef",ref:S,trigger:"manual",show:I.value,"onUpdate:show":t[1]||(t[1]=e=>I.value=e),"show-arrow":!1},{trigger:p((()=>[d("div",{onClick:v(O,["stop"]),style:c(s(B)),class:"iho-table__separateText"},m(e.displayContent||" "),13,C)])),default:p((()=>[f(a.$slots,"menu",{value:T.value,"onUpdate:value":$,"onUpdate:show":N,col:e.column,row:e.row},(()=>[h(s(x),{value:T.value,"onUpdate:value":t[0]||(t[0]=e=>T.value=e),type:"textarea"},null,8,["value"])]))])),_:3},8,["show"]))}});export{j as default};
@@ -1 +1 @@
1
- import{getStringWidth as e}from"../../../../../../../shared/utils/index.js";import{isArray as n,cloneDeep as r,isString as t,isNumber as o}from"lodash-es";import{EDITABLE_WIDGET_TYPE as l}from"../../../../constants/index.js";function u(e){return Math.max(...e.map((e=>e.data.length)),1)}function a(e,n){return e.reduce(((e,r)=>(e[r.field]=r.data[n],e)),{})}function d(l,u,a){return n(l)?l.map((e=>{var n,t,o,l;return null!=(l=null==(o=null==(t=null==(n=u.editRender)?void 0:n.props)?void 0:t.separateFormatter)?void 0:o.call(t,r(e)))?l:e})):t(l)&&o(a)?(a-=24,[...l].reduce(((n,r)=>{const t=n[n.length-1];return e(t+r)>a?n.push(r):n[n.length-1]=t+r,n}),[""])):[l]}function i(e){var n;return e.field&&(null==(n=e.editRender)?void 0:n.name)===l.SEPARATE}export{d as contentSeparate,a as generateSeparateRowData,u as getColumnInfoMaxLength,i as isSeparateColumn};
1
+ import{getStringWidth as e}from"../../../../../../../shared/utils/index.js";import{isArray as n,cloneDeep as r,isString as t,isNumber as l}from"lodash-es";import{EDITABLE_WIDGET_TYPE as d}from"../../../../constants/index.js";function i(e){return Math.max(...e.map((e=>e.data.length)),1)}function o(e,n){return e.reduce(((e,r)=>(e[r.field]=r.data[n],e)),{})}function u(d,i,o){return n(d)?d.map((e=>{var n,t,l,d;return null!=(d=null==(l=null==(t=null==(n=i.editRender)?void 0:n.props)?void 0:t.separateFormatter)?void 0:l.call(t,r(e)))?d:i.field?e[i.field]:null})):t(d)&&l(o)?(o-=24,[...d].reduce(((n,r)=>{const t=n[n.length-1];return e(t+r)>o?n.push(r):n[n.length-1]=t+r,n}),[""])):[d]}function a(e){var n;return e.field&&(null==(n=e.editRender)?void 0:n.name)===d.SEPARATE}export{u as contentSeparate,o as generateSeparateRowData,i as getColumnInfoMaxLength,a as isSeparateColumn};
@@ -1 +1 @@
1
- import{isObject as e}from"@vue/shared";import{isArray as n,isString as t}from"lodash-es";import{IhoTableRowGroupSequence as r}from"../../constants/index.js";function i(t,i,o=(e=>e.field)){const s=i.map((e=>o(e)));return r.some((r=>{const i=t[r];if(!n(i))return!0;i.forEach((t=>{if(!n(t.list)||!t.list.length)return;const r=[];let i=null;t.list.forEach(((n,o)=>{const c=function(n,t,r){return t.findIndex((t=>t!==r&&(e(t)?t.fieldName:t)===n))}(n,s,i);~c&&(r.push(s[c]),0===o?s.splice(c,1,i={fieldName:t.title,children:r}):s.splice(c,1))}))}))})),s}function o(n,r){return n.reduce(((n,i)=>{if(t(i)){const e=r(i);e&&n.push(e)}if(e(i)&&i.children){const e=r(i.fieldName,!0);e&&(e.children=o(i.children,r),n.push(e))}return n}),[])}export{i as createRowGroupList,o as groupTraverser};
1
+ import{isObject as e}from"@vue/shared";import{isArray as n,isString as t}from"lodash-es";import{IhoTableRowGroupSequence as r}from"../../constants/index.js";function i(t,i,o=(e=>e.field)){const s=i.map((e=>o(e)));return r.some((r=>{const i=t[r];if(!n(i))return!0;i.forEach((t=>{if(!n(t.list)||!t.list.length)return;const r=[];let i=null,o=0;t.list.forEach(((n,c)=>{const l=function(n,t,r){return t.findIndex((t=>t!==r&&(e(t)?t.fieldName:t)===n))}(n,s,i);~l?(r.push(s[l]),c===o?s.splice(l,1,i={fieldName:t.title,children:r}):s.splice(l,1)):c===o&&o++}))}))})),s}function o(n,r){return n.reduce(((n,i)=>{if(t(i)){const e=r(i);e&&n.push(e)}if(e(i)&&i.children){const e=r(i.fieldName,!0);e&&(e.children=o(i.children,r),n.push(e))}return n}),[])}export{i as createRowGroupList,o as groupTraverser};
@@ -1 +1 @@
1
- import{traverse as e,uuidGenerator as t,DMZ as r}from"../../../../../shared/utils/index.js";import{isArray as n,isFunction as i,isEmpty as o}from"lodash-es";import{onBeforeUnmount as s}from"vue";import"../../../index.js";import{HIGHEST_PRIORITY as d,IHO_TABLE_TREE_TYPE as a}from"../../constants/index.js";import{isTransformTreeType as l}from"../../utils/index.js";import{defineTablePlugin as f}from"../../hooks/useTablePlugin.js";function u(){const u="virtualTreePlugin",p=new Map;return f({name:u,apply(f){f.configHooks.treeConfig.tap({name:u,stage:d},((e,t)=>l(t)?Object.assign({transform:!0,expandAll:!0,reserve:!0,children:"childrenList",rowField:"__id"},e):e)),f.dataHooks.data.tap(u,((r,i,o)=>{if(!i.treeConfig)return;const{transform:s,rowField:d="__id",parentField:a="parentId",children:f="childrenList"}=i.treeConfig;function u(e){e[d]=e[d]||e.theUniqueKey||t()}l(i)&&s&&(u(r),n(r[f])&&e(r[f],((e,t,r)=>{r&&(e[a]=r[d]),o.insertAfter(e),u(e)}),f,r))})),f.fieldHooks.fieldList.tap(u,((e,t)=>{if(!t.treeConfig)return e;const{transform:n}=t.treeConfig||r;if(!l(t)||!n||!t.uuid)return e;const i=e.filter((e=>!1!==e.visible));let o=i.findIndex((e=>e.treeNode));~o||i.some(((e,t)=>{if(!e.type)return o=t,e.treeNode=!0}));const s=i.length-o-i.filter((e=>"right"===e.fixed)).length;return p.set(t.uuid,{index:o,colspan:s}),e})),f.configHooks.treeConfig.tap(u,((e,t)=>{if(!e)return e;const{transform:r,parentField:n="parentId",hasChild:s="hasChild",children:d="childrenList"}=e;if(i(t.spanMethod)||!r||`${t.isTree}`!==a.TRANSFORM_WITH_SPAN_METHOD)return e;const l=Object.freeze({rowspan:0,colspan:0});return t.spanMethod=({row:e,column:r,$columnIndex:i})=>{const a=p.get(t.uuid);if(a&&(Reflect.has(e,s)?e[s]:!e[n])&&!o(e[d]))return r.treeNode?{rowspan:1,colspan:a.colspan}:"right"!==r.fixed&&i>=a.index?l:void 0},e})),f.setupHooks.setup.tap(u,(e=>{s((()=>{var t;(null==(t=e.value)?void 0:t.uuid)&&p.delete(e.value.uuid)}))}))}})}export{u as virtualTreePlugin};
1
+ import{traverse as e,uuidGenerator as t,DMZ as r}from"../../../../../shared/utils/index.js";import{isArray as i,sortBy as n,isFunction as o,isEmpty as s}from"lodash-es";import{onBeforeUnmount as d}from"vue";import"../../../index.js";import{HIGHEST_PRIORITY as a,IHO_TABLE_TREE_TYPE as f}from"../../constants/index.js";import{isTransformTreeType as l}from"../../utils/index.js";import{defineTablePlugin as u}from"../../hooks/useTablePlugin.js";function p(){const p="virtualTreePlugin",c=new Map;return u({name:p,apply(u){u.configHooks.treeConfig.tap({name:p,stage:a},((e,t)=>l(t)?Object.assign({transform:!0,expandAll:!0,reserve:!0,children:"childrenList",rowField:"__id"},e):e)),u.dataHooks.data.tap(p,((r,n,o)=>{if(!n.treeConfig)return;const{transform:s,rowField:d="__id",parentField:a="parentId",children:f="childrenList"}=n.treeConfig;function u(e){e[d]=e[d]||e.theUniqueKey||t()}l(n)&&s&&(u(r),i(r[f])&&e(r[f],((e,t,r)=>{r&&(e[a]=r[d]),o.insertAfter(e),u(e)}),f,r))})),u.fieldHooks.fieldList.tap(p,((e,t)=>{if(!t.treeConfig)return e;const{transform:i}=t.treeConfig||r;if(!l(t)||!i||!t.uuid)return e;const o=e.filter((e=>!1!==e.visible));let s=o.findIndex((e=>e.treeNode));if(~s&&o[s].fixed){const e=n(o,(e=>"left"===e.fixed?-1:"right"===e.fixed?1:0));s=e.findIndex((e=>e.treeNode))}~s||o.some(((e,t)=>{if(!e.type)return s=t,e.treeNode=!0}));const d=o.length-s-o.filter((e=>"right"===e.fixed)).length;return c.set(t.uuid,{index:s,colspan:d}),e})),u.configHooks.treeConfig.tap(p,((e,t)=>{if(!e)return e;const{transform:r,parentField:i="parentId",hasChild:n="hasChild",children:d="childrenList"}=e;if(o(t.spanMethod)||!r||`${t.isTree}`!==f.TRANSFORM_WITH_SPAN_METHOD)return e;const a=Object.freeze({rowspan:0,colspan:0});return t.spanMethod=({row:e,column:r,$columnIndex:o})=>{const f=c.get(t.uuid);if(f&&(Reflect.has(e,n)?e[n]:!e[i])&&!s(e[d]))return r.treeNode?{rowspan:1,colspan:f.colspan}:"right"!==r.fixed&&o>=f.index?a:void 0},e})),u.setupHooks.setup.tap(p,(e=>{d((()=>{var t;(null==(t=e.value)?void 0:t.uuid)&&c.delete(e.value.uuid)}))}))}})}export{p as virtualTreePlugin};
@@ -1,6 +1,7 @@
1
1
  import { AnyObject, ArrayAble, BindEventSettingItem, FormOperationalConfig, LOW_CODE_VALUE_RELATION, MaybeString, TupleToUnion } from '../../../../../es/shared/types';
2
2
  import { VxeTableProps, VxeTableDefines, VxeTableInstance, VxeColumnPropTypes, VxeTablePropTypes, VxeTableConstructor } from 'vxe-table';
3
- import { VxeTableListeners, VxeTablePrivateMethods } from 'vxe-table/types/table';
3
+ import { VxePagerEventProps } from 'vxe-table/types/pager';
4
+ import { VxeTableEventProps, VxeTableListeners, VxeTablePrivateMethods } from 'vxe-table/types/table';
4
5
  import { IHO_TABLE_STRING_STATUS, IhoTableEventNameTuple, IhoTableRowGroupSequence } from '../../../../../es/components/iho-table/src/constants';
5
6
  import Sortable from 'sortablejs';
6
7
  export * from './pluginType';
@@ -151,6 +152,7 @@ export declare type IhoTableAnchorItem = {
151
152
  title: string;
152
153
  left: number;
153
154
  };
155
+ export declare type IhoTableEventTypes = VxeTableEventProps & VxePagerEventProps;
154
156
  export declare type IhoTableExpose = {
155
157
  $table: VxeTableInstance;
156
158
  loadData(data: AnyObject[]): void;
@@ -3,9 +3,10 @@ import { AsyncParallelHook, AsyncSeriesHook, SyncHook, SyncWaterfallHook } from
3
3
  import { MaybeRef } from '@vueuse/core';
4
4
  import { Ref, VNode } from 'vue';
5
5
  import { VxeGlobalCommands, VxeGlobalFormats, VxeGlobalHooks, VxeGlobalMenus, VxeGlobalRenderer, VxeTableInstance, VXETableSetupOptions } from 'vxe-table';
6
- import { VxeTableEventProps, VxeTableEvents } from 'vxe-table/types/table';
6
+ import { VxeTableEvents } from 'vxe-table/types/table';
7
+ import { VxePagerEvents } from 'vxe-table/types/pager';
7
8
  import { VxeGlobalInterceptor } from 'vxe-table/types/v-x-e-table';
8
- import { IhoTableConfig, IhoTableEmits, IhoTableFieldItem, IhoTableHandler } from '.';
9
+ import { IhoTableConfig, IhoTableEmits, IhoTableEventTypes, IhoTableFieldItem, IhoTableHandler } from '.';
9
10
  export declare type IhoTableInstance = {
10
11
  interceptor: VxeGlobalInterceptor;
11
12
  renderer: VxeGlobalRenderer;
@@ -71,7 +72,7 @@ export declare abstract class AbstractFieldHooks {
71
72
  export declare type WithIhoEventContext<T> = [...WithTableConfig<T>, IhoTableHandler & IhoTableHandlerContext<false>];
72
73
  declare type EventHookType<T extends Func> = AsyncParallelHook<WithIhoEventContext<Parameters<T>>>;
73
74
  declare type VxeEventTypes = Required<{
74
- readonly [K in keyof VxeTableEventProps]: EventHookType<NonNullable<VxeTableEventProps[K]>>;
75
+ readonly [K in keyof IhoTableEventTypes]: EventHookType<NonNullable<IhoTableEventTypes[K]>>;
75
76
  }>;
76
77
  export declare abstract class AbstractEventHooks implements VxeEventTypes {
77
78
  abstract readonly onKeydownStart: EventHookType<VxeTableEvents.KeydownStart>;
@@ -135,6 +136,7 @@ export declare abstract class AbstractEventHooks implements VxeEventTypes {
135
136
  abstract readonly onActiveCellChangeEnd: EventHookType<VxeTableEvents.ActiveCellChangeEnd>;
136
137
  abstract readonly onCellAreaSelectionAllStart: EventHookType<(payload: any) => void>;
137
138
  abstract readonly onCellAreaSelectionAllEnd: EventHookType<(payload: any) => void>;
139
+ abstract readonly onPageChange: EventHookType<VxePagerEvents.PageChange>;
138
140
  }
139
141
  declare type DataHookContext = {
140
142
  remove(): void;
@@ -18,9 +18,9 @@ export declare function useUUIDMap<T>(creator: () => T, isReactive?: boolean): {
18
18
  removeItemFromUUID: (uuid: string) => void;
19
19
  };
20
20
  export declare function getColumnRenderWidth(column: AnyObject, $table: MaybeRef<Nullable<VxeTableInstance>>): Promise<number>;
21
- export declare function useIhoTableFormEvent(payload: Pick<VxeGlobalRendererHandles.RenderEditParams, 'row' | 'rowIndex' | 'column' | '$table'> & {
21
+ export declare function useIhoTableFormEvent(payloadRef: MaybeRef<Pick<VxeGlobalRendererHandles.RenderEditParams, 'row' | 'rowIndex' | 'column' | '$table'> & {
22
22
  $rowIndex?: number;
23
- }): {
23
+ }>): {
24
24
  emitFormChange: () => void;
25
25
  emitFormClick: () => void;
26
26
  emitFormChangeWithParams: (params?: AnyObject) => void;
@@ -1 +1 @@
1
- import{reactive as e,inject as n,unref as t,toRaw as r,createVNode as i}from"vue";import{jsonParse as o,arrayed as u,findAncestor as l}from"../../../../shared/utils/index.js";import{promiseTimeout as c}from"@vueuse/shared";import{isNumber as d,isString as a,isObject as s,isArray as f,cloneDeep as m}from"lodash-es";import{InjectionIhoTableConfig as p,InjectionIhoTableEmits as v,IHO_TABLE_STRING_STATUS as g,IHO_TABLE_NUMBER_STATUS as E,IHO_TABLE_TREE_TYPE as I}from"../constants/index.js";function h(e){return console.warn(`[IhoTable]: ${e}`)}const T=Object.freeze({getCellType(e){var n;return((null==(n=e.settingObj)?void 0:n.attr)||e.formType||"DEFAULT").toUpperCase()}});function C(){var e,t,r;const i=n(p);return i||h("this function(getRowHeight) only can be used in setup environment"),null!=(r=null==(t=null==(e=null==i?void 0:i.value)?void 0:e.rowConfig)?void 0:t.height)?r:32}function R(e){const n=e.slice(2);return`${n[0].toLowerCase()}${n.slice(1)}`}function w(e){return`on${e[0].toUpperCase()}${e.slice(1)}`}function S(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){return r()||await c(0),r()||function(){const n=+e.colWidth;return d(n)?n:64}();function r(){var r,i;return null==(i=null==(r=t(n))?void 0:r.getColumnByField(e.field))?void 0:i.renderWidth}}function F(e){const t=n(v);function i(){var n;return{$table:e.$table,value:e.row[e.column.field],row:e.row,column:{...e.column,...null==(n=e.column.editRender)?void 0:n.props},index:e.rowIndex>-1?e.rowIndex:e.$rowIndex}}function o(e={}){t("formChange",{...i(),...m(r(e))})}function u(e={}){t("formClick",{...i(),...m(r(e))})}return{emitFormChange:function(){o()},emitFormClick:function(){u()},emitFormChangeWithParams:o,emitFormClickWithParams:u}}function P(e){var n;return null==(n=e.editRender)?void 0:n.props}const A=Object.freeze({createDefaultRenderCell:function(){return function(e,{row:n,column:t}){return[i("span",{title:_(t,n[t.field])},[n[t.field]])]}},createRenderEdit:function(e){return function({props:n},t){return e({...t,fieldItem:n||{},...F(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(D(e))return!0;let n=e.fieldSetting;return a(n)&&(n=o(n||"")),s(n)&&((t=n).notParticipatingSearch!==g.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}}),$=Object.freeze({isPositive:e=>e===E.POSITIVE||e===g.POSITIVE,isNegative:e=>e===E.NEGATIVE||e===g.NEGATIVE,notPositive:e=>e!==E.POSITIVE&&e!==g.POSITIVE,notNegative:e=>e!==E.NEGATIVE&&e!==g.NEGATIVE}),N=(e,n)=>({$event:t,column:r})=>{var i;if(!u(e).includes(null==(i=r.editRender)?void 0:i.name))return!0;const o=null==t?void 0:t.target;return!s(o)||!l(o,n)};function b(e){return[I.TRANSFORM_WITH_SPAN_METHOD,I.TRANSFORM_TREE_TYPE].includes(`${e.isTree}`)}function V(e){return a(e)&&!!e.match(/^###\{[^{}]+}$/)}function x(e){try{return JSON.parse(e.replace(/^###/,""))}catch(e){return{}}}function U(e,n){if(e.$__SEPARATE||!n.editRender||!n.editRender.props)return e[n.field];const{fieldSetting:t}=n.editRender.props;if(!a(t))return e[n.field];const{mergedFeildExpression:r}=o(t);return r&&a(r)?r.replace(/#{(.+?)}/g,(function(n,t){let r=t?e[t.trim()]:null;V(r)&&(r=x(r).change_text);return r||(null==r?"--":r)})):e[n.field]}const y=["SEARCH","SELECT","RADIO","CHECKBOX"];function D(e){return e.notParticipatingSearch===E.NEGATIVE&&y.includes(T.getCellType(e))&&f(e.options)&&e.options.length}function _(e,n=""){return"tooltip"===e.showOverflow?"":n}export{A as IhoTableRenderHelper,$ as IhoTableStatusHelper,T as IhoTableUtils,h as IhoTableWarn,N as createIhoTableClearActivedInterceptor,R as eventListener2EventName,w as eventName2EventListener,O as getColumnRenderWidth,P as getLowCodeFieldFromField,C as getRowHeight,_ as getTitle,D as isCompatibleColumn,V as isRichContent,b as isTransformTreeType,U as parseMergeField,x as parseRichContent,F as useIhoTableFormEvent,S as useUUIDMap};
1
+ import{reactive as e,inject as n,unref as t,toRaw as r,createVNode as i}from"vue";import{jsonParse as o,arrayed as u,findAncestor as l}from"../../../../shared/utils/index.js";import{promiseTimeout as c}from"@vueuse/shared";import{isNumber as d,isString as a,isObject as s,isArray as f,cloneDeep as m}from"lodash-es";import{InjectionIhoTableConfig as p,InjectionIhoTableEmits as v,IHO_TABLE_STRING_STATUS as g,IHO_TABLE_NUMBER_STATUS as E,IHO_TABLE_TREE_TYPE as I}from"../constants/index.js";function h(e){return console.warn(`[IhoTable]: ${e}`)}const T=Object.freeze({getCellType(e){var n;return((null==(n=e.settingObj)?void 0:n.attr)||e.formType||"DEFAULT").toUpperCase()}});function C(){var e,t,r;const i=n(p);return i||h("this function(getRowHeight) only can be used in setup environment"),null!=(r=null==(t=null==(e=null==i?void 0:i.value)?void 0:e.rowConfig)?void 0:t.height)?r:32}function R(e){const n=e.slice(2);return`${n[0].toLowerCase()}${n.slice(1)}`}function w(e){return`on${e[0].toUpperCase()}${e.slice(1)}`}function S(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){return r()||await c(0),r()||function(){const n=+e.colWidth;return d(n)?n:64}();function r(){var r,i;return null==(i=null==(r=t(n))?void 0:r.getColumnByField(e.field))?void 0:i.renderWidth}}function F(e){const i=n(v);function o(){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 u(e={}){i("formChange",{...o(),...m(r(e))})}function l(e={}){i("formClick",{...o(),...m(r(e))})}return{emitFormChange:function(){u()},emitFormClick:function(){l()},emitFormChangeWithParams:u,emitFormClickWithParams:l}}function P(e){var n;return null==(n=e.editRender)?void 0:n.props}const A=Object.freeze({createDefaultRenderCell:function(){return function(e,{row:n,column:t}){return[i("span",{title:_(t,n[t.field])},[n[t.field]])]}},createRenderEdit:function(e){return function({props:n},t){return e({...t,fieldItem:n||{},...F(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(D(e))return!0;let n=e.fieldSetting;return a(n)&&(n=o(n||"")),s(n)&&((t=n).notParticipatingSearch!==g.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}}),$=Object.freeze({isPositive:e=>e===E.POSITIVE||e===g.POSITIVE,isNegative:e=>e===E.NEGATIVE||e===g.NEGATIVE,notPositive:e=>e!==E.POSITIVE&&e!==g.POSITIVE,notNegative:e=>e!==E.NEGATIVE&&e!==g.NEGATIVE}),N=(e,n)=>({$event:t,column:r})=>{var i;if(!u(e).includes(null==(i=r.editRender)?void 0:i.name))return!0;const o=null==t?void 0:t.target;return!s(o)||!l(o,n)};function b(e){return[I.TRANSFORM_WITH_SPAN_METHOD,I.TRANSFORM_TREE_TYPE].includes(`${e.isTree}`)}function V(e){return a(e)&&!!e.match(/^###\{[^{}]+}$/)}function x(e){try{return JSON.parse(e.replace(/^###/,""))}catch(e){return{}}}function U(e,n){if(e.$__SEPARATE||!n.editRender||!n.editRender.props)return e[n.field];const{fieldSetting:t}=n.editRender.props;if(!a(t))return e[n.field];const{mergedFeildExpression:r}=o(t);return r&&a(r)?r.replace(/#{(.+?)}/g,(function(n,t){let r=t?e[t.trim()]:null;V(r)&&(r=x(r).change_text);return r||(null==r?"--":r)})):e[n.field]}const y=["SEARCH","SELECT","RADIO","CHECKBOX"];function D(e){return e.notParticipatingSearch===E.NEGATIVE&&y.includes(T.getCellType(e))&&f(e.options)&&e.options.length}function _(e,n=""){return"tooltip"===e.showOverflow?"":n}export{A as IhoTableRenderHelper,$ as IhoTableStatusHelper,T as IhoTableUtils,h as IhoTableWarn,N as createIhoTableClearActivedInterceptor,R as eventListener2EventName,w as eventName2EventListener,O as getColumnRenderWidth,P as getLowCodeFieldFromField,C as getRowHeight,_ as getTitle,D as isCompatibleColumn,V as isRichContent,b as isTransformTreeType,U as parseMergeField,x as parseRichContent,F as useIhoTableFormEvent,S as useUUIDMap};