cnhis-design-vue 3.1.31-beta.0 → 3.1.31-beta.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (219) hide show
  1. package/es/components/big-table/index.js +1 -1
  2. package/es/components/big-table/src/{BigTable.js → BigTable.vue.js} +1 -1
  3. package/es/components/big-table/src/{BigTable.vue_vue_type_script_setup_true_lang.js → BigTable.vue2.js} +6 -6
  4. package/es/components/{scale-view/src/components/NoData.js → big-table/src/components/NoData.vue.js} +4 -4
  5. package/es/components/big-table/src/components/edit-form/{edit-separate.js → edit-separate.vue.js} +1 -1
  6. package/es/components/big-table/src/components/{input-button.js → input-button.vue.js} +0 -0
  7. package/es/components/big-table/src/components/{separate.js → separate.vue.js} +0 -0
  8. package/es/components/big-table/src/hooks/useEdit.js +1 -1
  9. package/es/components/big-table/src/utils.js +1 -1
  10. package/es/components/bpmn-workflow/index.js +1 -1
  11. package/es/components/bpmn-workflow/src/{BpmnWorkflow.js → BpmnWorkflow.vue.js} +0 -0
  12. package/es/components/button-print/index.d.ts +76 -79
  13. package/es/components/button-print/index.js +2 -2
  14. package/es/components/button-print/src/ButtonPrint.vue.d.ts +76 -79
  15. package/es/components/button-print/src/{ButtonPrint.js → ButtonPrint.vue.js} +1 -1
  16. package/es/components/button-print/src/{ButtonPrint.vue_vue_type_script_setup_true_lang.js → ButtonPrint.vue2.js} +47 -85
  17. package/es/components/button-print/src/components/{edit.vue.d.ts → EditFormat.vue.d.ts} +61 -54
  18. package/es/components/button-print/src/components/EditFormat.vue.js +173 -0
  19. package/es/components/button-print/src/components/IdentityVerification.vue.d.ts +76 -64
  20. package/es/components/button-print/src/components/{IdentityVerification.js → IdentityVerification.vue.js} +22 -10
  21. package/es/components/button-print/src/components/Preview.vue.d.ts +41 -0
  22. package/es/components/button-print/src/components/Preview.vue.js +6 -0
  23. package/es/components/button-print/src/components/Preview.vue2.js +67 -0
  24. package/es/components/button-print/src/utils/browserPrint.d.ts +2 -1
  25. package/es/components/button-print/src/utils/browserPrint.js +6 -3
  26. package/es/components/button-print/src/utils/dialog.d.ts +6 -2
  27. package/es/components/button-print/src/utils/dialog.js +69 -25
  28. package/es/components/button-print/src/utils/index.js +1 -1
  29. package/es/components/button-print/src/utils/print.d.ts +7 -3
  30. package/es/components/button-print/src/utils/print.js +51 -4
  31. package/es/components/button-print/style/index.css +1 -1
  32. package/es/components/drag-layout/index.js +1 -1
  33. package/es/components/drag-layout/src/{DragFormLeftItem.js → DragFormLeftItem.vue.js} +0 -0
  34. package/es/components/drag-layout/src/{DragFormRightItem.js → DragFormRightItem.vue.js} +0 -0
  35. package/es/components/drag-layout/src/{DragLayout.js → DragLayout.vue.js} +2 -2
  36. package/es/components/fabric-chart/index.js +1 -1
  37. package/es/components/fabric-chart/src/{FabricChart.js → FabricChart.vue.js} +1 -1
  38. package/es/components/fabric-chart/src/components/{PopupTip.js → PopupTip.vue.js} +0 -0
  39. package/es/components/fabric-chart/src/hooks/useCenter.js +5 -6
  40. package/es/components/fabric-chart/src/hooks/useGrid.js +3 -3
  41. package/es/components/fabric-chart/src/interface.d.ts +1 -1
  42. package/es/components/fabric-chart/src/utils/index.js +0 -1
  43. package/es/components/field-set/index.js +1 -1
  44. package/es/components/field-set/src/{FieldSet.js → FieldSet.vue.js} +0 -0
  45. package/es/components/form-config/index.js +1 -1
  46. package/es/components/form-config/src/{FormConfig.js → FormConfig.vue.js} +3 -3
  47. package/es/components/form-config/src/components/{FormConfigCreator.js → FormConfigCreator.vue.js} +0 -0
  48. package/es/components/form-config/src/components/{FormConfigDragDisplay.js → FormConfigDragDisplay.vue.js} +0 -0
  49. package/es/components/form-config/src/components/{FormConfigEdit.js → FormConfigEdit.vue.js} +0 -0
  50. package/es/components/form-config/src/components/index.js +6 -6
  51. package/es/components/form-config/src/components/renderer/{CloseButton.js → CloseButton.vue.js} +0 -0
  52. package/es/components/form-config/src/components/renderer/{ComplexNode.js → ComplexNode.vue.js} +2 -2
  53. package/es/components/form-config/src/components/renderer/{DefaultNode.js → DefaultNode.vue.js} +1 -1
  54. package/es/components/form-config/src/components/renderer/index.js +3 -3
  55. package/es/components/form-config/src/hooks/usePresetRenderer.js +2 -2
  56. package/es/components/form-render/index.js +2 -2
  57. package/es/components/form-render/src/{FormRender.js → FormRender.vue.js} +0 -0
  58. package/es/components/form-render/src/{FormRenderWrapper.js → FormRenderWrapper.vue.js} +1 -1
  59. package/es/components/form-render/src/components/renderer/checkbox.js +3 -5
  60. package/es/components/form-render/src/components/renderer/index.js +2 -0
  61. package/es/components/form-render/src/components/renderer/jsonCombination/index.js +1 -1
  62. package/es/components/form-render/src/components/renderer/levelSearchCascader.js +1 -1
  63. package/es/components/form-render/src/components/renderer/lineBar/{FormCollapse.js → FormCollapse.vue.js} +0 -0
  64. package/es/components/form-render/src/components/renderer/lineBar/index.js +1 -1
  65. package/es/components/form-render/src/components/renderer/recommendSelect.d.ts +131 -0
  66. package/es/components/form-render/src/components/renderer/recommendSelect.js +213 -0
  67. package/es/components/form-render/src/components/renderer/remoteSearch.js +0 -1
  68. package/es/components/form-render/src/components/renderer/select.js +3 -5
  69. package/es/components/form-render/src/hooks/useAsyncQueue.js +2 -1
  70. package/es/components/form-render/src/hooks/useAutographOptions.js +5 -7
  71. package/es/components/form-render/src/hooks/useBusinessBinding.d.ts +3 -2
  72. package/es/components/form-render/src/hooks/useBusinessBinding.js +20 -17
  73. package/es/components/form-render/src/hooks/useFieldListAdaptor.js +7 -0
  74. package/es/components/form-render/src/hooks/useFormRequest.d.ts +8 -1
  75. package/es/components/form-render/src/hooks/useFormRequest.js +24 -1
  76. package/es/components/form-render/src/utils/index.d.ts +2 -2
  77. package/es/components/form-render/src/utils/index.js +27 -3
  78. package/es/components/form-render/style/index.css +1 -1
  79. package/es/components/iho-table/index.d.ts +160 -102
  80. package/es/components/iho-table/index.js +1 -2
  81. package/es/components/iho-table/src/IhoTable.vue.d.ts +160 -102
  82. package/es/components/iho-table/src/{IhoTable.js → IhoTable.vue.js} +2 -1
  83. package/es/components/iho-table/src/components/IhoTableColumn.js +14 -11
  84. package/es/components/iho-table/src/constants/index.d.ts +5 -3
  85. package/es/components/iho-table/src/constants/index.js +5 -3
  86. package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +64 -5
  87. package/es/components/iho-table/src/hooks/tapHooks/index.js +17 -9
  88. package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.d.ts +60 -1
  89. package/es/components/iho-table/src/hooks/useColumnConfigAdaptor.js +5 -3
  90. package/es/components/iho-table/src/hooks/useTableContext.d.ts +1 -1
  91. package/es/components/iho-table/src/plugins/anchorPlugin/useAnchor.js +3 -2
  92. package/es/components/iho-table/src/plugins/filterPlugin/filter.vue.d.ts +1 -1
  93. package/es/components/iho-table/src/plugins/filterPlugin/{filter.js → filter.vue.js} +1 -0
  94. package/es/components/iho-table/src/plugins/filterPlugin/index.js +1 -1
  95. package/es/components/iho-table/src/plugins/index.js +14 -12
  96. package/es/components/iho-table/src/plugins/keyboardEventPlugin/index.d.ts +1 -0
  97. package/es/components/iho-table/src/plugins/keyboardEventPlugin/index.js +32 -0
  98. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +1 -1
  99. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/{editDate.js → editDate.vue.js} +0 -0
  100. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/index.js +10 -12
  101. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/inputRendererPlugin.js +11 -15
  102. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.js +17 -24
  103. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +11 -13
  104. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/editSeparate.vue.d.ts +1 -1
  105. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/{editSeparate.js → editSeparate.vue.js} +2 -1
  106. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +9 -12
  107. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin.js +13 -17
  108. package/es/components/iho-table/src/types/index.d.ts +6 -6
  109. package/es/components/iho-table/src/types/pluginType.d.ts +2 -1
  110. package/es/components/iho-table/src/utils/index.d.ts +12 -2
  111. package/es/components/iho-table/src/utils/index.js +33 -2
  112. package/es/components/iho-table/style/index.css +1 -1
  113. package/es/components/index.css +1 -1
  114. package/es/components/index.d.ts +2 -1
  115. package/es/components/index.js +6 -3
  116. package/es/components/info-header/index.js +1 -1
  117. package/es/components/info-header/src/{HiddenContent.js → HiddenContent.vue.js} +1 -1
  118. package/es/components/info-header/src/{InfoEllipsis.js → InfoEllipsis.vue.js} +0 -0
  119. package/es/components/info-header/src/{InfoHeader.js → InfoHeader.vue.js} +2 -2
  120. package/es/components/keyboard/index.d.ts +146 -78
  121. package/es/components/keyboard/index.js +1 -1
  122. package/es/components/keyboard/src/Keyboard.vue.d.ts +155 -78
  123. package/es/components/keyboard/src/Keyboard.vue.js +149 -0
  124. package/es/components/keyboard/src/components/InputNumber.vue.d.ts +6 -4
  125. package/es/components/keyboard/src/components/{InputNumber.js → InputNumber.vue.js} +0 -0
  126. package/es/components/keyboard/src/components/NumberPanel.vue.d.ts +118 -0
  127. package/es/components/keyboard/src/components/NumberPanel.vue.js +206 -0
  128. package/es/components/map/index.js +1 -1
  129. package/es/components/map/src/{Map.js → Map.vue.js} +0 -0
  130. package/es/components/recommend-search/index.d.ts +813 -0
  131. package/es/components/recommend-search/index.js +10 -0
  132. package/es/components/recommend-search/src/RecommendSearch.vue.d.ts +815 -0
  133. package/es/components/recommend-search/src/RecommendSearch.vue.js +62 -0
  134. package/es/components/recommend-search/src/components/BaseSearch.vue.d.ts +119 -0
  135. package/es/components/recommend-search/src/components/BaseSearch.vue.js +148 -0
  136. package/es/components/recommend-search/src/components/RecommendInput.vue.d.ts +303 -0
  137. package/es/components/recommend-search/src/components/RecommendInput.vue.js +103 -0
  138. package/es/components/recommend-search/src/components/RecommendMenu.vue.d.ts +63 -0
  139. package/es/components/recommend-search/src/components/RecommendMenu.vue.js +104 -0
  140. package/es/components/recommend-search/src/components/RecommendSelect.vue.d.ts +350 -0
  141. package/es/components/recommend-search/src/components/RecommendSelect.vue.js +156 -0
  142. package/es/components/recommend-search/src/constant/index.d.ts +4 -0
  143. package/es/components/recommend-search/src/constant/index.js +7 -0
  144. package/es/components/recommend-search/src/types/index.d.ts +9 -0
  145. package/es/components/recommend-search/src/types/index.js +1 -0
  146. package/es/components/recommend-search/style/index.css +1 -0
  147. package/es/components/scale-view/index.js +1 -1
  148. package/es/components/scale-view/src/{ScaleView.js → ScaleView.vue.js} +5 -5
  149. package/es/components/scale-view/src/components/{AnswerParse.js → AnswerParse.vue.js} +1 -1
  150. package/es/components/scale-view/src/components/{EvaluateCountdown.js → EvaluateCountdown.vue.js} +1 -1
  151. package/es/components/scale-view/src/components/{EvaluatePage.js → EvaluatePage.vue.js} +0 -0
  152. package/es/components/scale-view/src/components/{LoadingCom.js → LoadingCom.vue.js} +0 -0
  153. package/es/components/{big-table/src/components/NoData.js → scale-view/src/components/NoData.vue.js} +4 -4
  154. package/es/components/scale-view/src/components/formitem/r-cascader.js +1 -1
  155. package/es/components/scale-view/src/components/formitem/r-select.js +1 -1
  156. package/es/components/scale-view/src/hooks/use-component.js +1 -1
  157. package/es/components/search-cascader/index.js +1 -1
  158. package/es/components/search-cascader/src/{SearchCascader.js → SearchCascader.vue.js} +0 -0
  159. package/es/components/search-cascader/src/components/SearchMenu.js +3 -3
  160. package/es/components/select-label/index.js +2 -2
  161. package/es/components/select-label/src/{LabelFormContent.js → LabelFormContent.vue.js} +1 -1
  162. package/es/components/select-label/src/{SelectLabel.js → SelectLabel.vue.js} +1 -1
  163. package/es/components/select-label/src/{SelectLabel.vue_vue_type_script_setup_true_lang.js → SelectLabel.vue2.js} +2 -2
  164. package/es/components/select-label/src/components/{label-classify.js → label-classify.vue.js} +0 -0
  165. package/es/components/select-person/index.js +1 -1
  166. package/es/components/select-person/src/{SelectPerson.js → SelectPerson.vue.js} +1 -1
  167. package/es/components/select-person/src/{SelectPerson.vue_vue_type_script_setup_true_lang.js → SelectPerson.vue2.js} +0 -0
  168. package/es/components/shortcut-provider/index.js +1 -1
  169. package/es/components/shortcut-provider/src/{ShortcutProvider.js → ShortcutProvider.vue.js} +0 -0
  170. package/es/components/shortcut-setter/index.js +1 -1
  171. package/es/components/shortcut-setter/src/{ShortcutSetter.js → ShortcutSetter.vue.js} +1 -1
  172. package/es/components/shortcut-setter/src/{ShortcutSetterItem.js → ShortcutSetterItem.vue.js} +0 -0
  173. package/es/components/steps-wheel/index.d.ts +3 -0
  174. package/es/components/steps-wheel/index.js +1 -1
  175. package/es/components/steps-wheel/src/StepsWheel.vue.d.ts +3 -0
  176. package/es/components/steps-wheel/src/{StepsWheel.js → StepsWheel.vue.js} +38 -9
  177. package/es/components/steps-wheel/style/index.css +1 -1
  178. package/es/components/time-line/index.js +1 -1
  179. package/es/components/time-line/src/{TimeLine.js → TimeLine.vue.js} +0 -0
  180. package/es/components/vod-chunk-upload/index.js +1 -1
  181. package/es/components/vod-chunk-upload/src/{chunk-upload-new.js → chunk-upload-new.vue.js} +0 -0
  182. package/es/components/vod-chunk-upload/src/vod-chunk-upload/index.js +2 -2
  183. package/es/components/vod-chunk-upload/src/vod-chunk-upload/{vod-chunk-upload.js → vod-chunk-upload.vue.js} +3 -3
  184. package/es/components/vod-chunk-upload/src/vod-upload-modal.js +1 -1
  185. package/es/shared/assets/img/failure.js +1 -3
  186. package/es/shared/assets/img/failure.png.js +3 -0
  187. package/es/shared/assets/img/no-permission.js +1 -3
  188. package/es/shared/assets/img/no-permission.png.js +3 -0
  189. package/es/shared/assets/img/nodata.js +1 -3
  190. package/es/shared/assets/img/nodata.png.js +3 -0
  191. package/es/shared/assets/img/notfound.js +1 -3
  192. package/es/shared/assets/img/notfound.png.js +3 -0
  193. package/es/shared/assets/img/qr.js +1 -3
  194. package/es/shared/assets/img/qr.png.js +3 -0
  195. package/es/shared/assets/img/success.js +1 -3
  196. package/es/shared/assets/img/success.png.js +3 -0
  197. package/es/shared/assets/img/video.js +1 -3
  198. package/es/shared/assets/img/video.png.js +3 -0
  199. package/es/shared/assets/img/video_default_cover.js +1 -3
  200. package/es/shared/assets/img/video_default_cover.png.js +3 -0
  201. package/es/shared/assets/img/xb_big.js +1 -3
  202. package/es/shared/assets/img/xb_big.png.js +3 -0
  203. package/es/shared/assets/img/xb_small.js +1 -3
  204. package/es/shared/assets/img/xb_small.png.js +3 -0
  205. package/es/shared/components/SelectPage/{SelectPage.js → SelectPage.vue.js} +0 -0
  206. package/es/shared/components/SelectPage/index.js +2 -2
  207. package/es/shared/components/SvgIcon/{SvgIcon.js → SvgIcon.vue.js} +0 -0
  208. package/es/shared/components/SvgIcon/index.js +2 -2
  209. package/es/shared/components/TextOverTooltip/{TextOverTooltip.js → TextOverTooltip.vue.js} +0 -0
  210. package/es/shared/components/TextOverTooltip/index.js +2 -2
  211. package/es/shared/components/no-data/{NoData.js → NoData.vue.js} +4 -4
  212. package/es/shared/components/no-data/index.js +2 -2
  213. package/es/shared/utils/index.d.ts +1 -1
  214. package/es/shared/utils/index.js +3 -3
  215. package/package.json +2 -2
  216. package/es/components/button-print/src/components/edit.js +0 -142
  217. package/es/components/fabric-chart/index.d.ts +0 -207
  218. package/es/components/fabric-chart/src/FabricChart.vue.d.ts +0 -208
  219. package/es/components/keyboard/src/Keyboard.js +0 -285
@@ -1,12 +1,13 @@
1
1
  import * as index from './anchorPlugin/index.js';
2
2
  import * as index$1 from './defaultConfigPlugin/index.js';
3
3
  import * as index$2 from './filterPlugin/index.js';
4
- import * as index$3 from './lowCodeFieldAdaptorPlugin/index.js';
5
- import * as index$4 from './rendererPlugins/editableWidgets/dateRendererPlugin/index.js';
4
+ import * as index$3 from './keyboardEventPlugin/index.js';
5
+ import * as index$4 from './lowCodeFieldAdaptorPlugin/index.js';
6
+ import * as index$5 from './rendererPlugins/editableWidgets/dateRendererPlugin/index.js';
6
7
  import * as inputRendererPlugin from './rendererPlugins/editableWidgets/inputRendererPlugin.js';
7
8
  import * as numberRendererPlugin from './rendererPlugins/editableWidgets/numberRendererPlugin.js';
8
- import * as index$5 from './rendererPlugins/editableWidgets/selectRendererPlugin/index.js';
9
- import * as index$6 from './rendererPlugins/editableWidgets/separateRendererPlugin/index.js';
9
+ import * as index$6 from './rendererPlugins/editableWidgets/selectRendererPlugin/index.js';
10
+ import * as index$7 from './rendererPlugins/editableWidgets/separateRendererPlugin/index.js';
10
11
  import * as timeRendererPlugin from './rendererPlugins/editableWidgets/timeRendererPlugin.js';
11
12
  import * as checkRendererPlugin from './rendererPlugins/widgets/checkRendererPlugin.js';
12
13
  import * as colorRendererPlugin from './rendererPlugins/widgets/colorRendererPlugin.js';
@@ -14,20 +15,21 @@ import * as defaultRendererPlugin from './rendererPlugins/widgets/defaultRendere
14
15
  import * as labelRendererPlugin from './rendererPlugins/widgets/labelRendererPlugin.js';
15
16
  import * as pictureRendererPlugin from './rendererPlugins/widgets/pictureRendererPlugin.js';
16
17
  import * as seqRendererPlugin from './rendererPlugins/widgets/seqRendererPlugin.js';
17
- import * as index$7 from './rowGroupSettingPlugin/index.js';
18
- import * as index$8 from './virtualTreePlugin/index.js';
18
+ import * as index$8 from './rowGroupSettingPlugin/index.js';
19
+ import * as index$9 from './virtualTreePlugin/index.js';
19
20
  import { separateMetaModule } from '../../../../shared/utils/index.js';
20
21
 
21
22
  const modules = Object.assign({
22
23
  "./anchorPlugin/index.tsx": index,
23
24
  "./defaultConfigPlugin/index.ts": index$1,
24
25
  "./filterPlugin/index.ts": index$2,
25
- "./lowCodeFieldAdaptorPlugin/index.ts": index$3,
26
- "./rendererPlugins/editableWidgets/dateRendererPlugin/index.tsx": index$4,
26
+ "./keyboardEventPlugin/index.ts": index$3,
27
+ "./lowCodeFieldAdaptorPlugin/index.ts": index$4,
28
+ "./rendererPlugins/editableWidgets/dateRendererPlugin/index.tsx": index$5,
27
29
  "./rendererPlugins/editableWidgets/inputRendererPlugin.tsx": inputRendererPlugin,
28
30
  "./rendererPlugins/editableWidgets/numberRendererPlugin.tsx": numberRendererPlugin,
29
- "./rendererPlugins/editableWidgets/selectRendererPlugin/index.tsx": index$5,
30
- "./rendererPlugins/editableWidgets/separateRendererPlugin/index.tsx": index$6,
31
+ "./rendererPlugins/editableWidgets/selectRendererPlugin/index.tsx": index$6,
32
+ "./rendererPlugins/editableWidgets/separateRendererPlugin/index.tsx": index$7,
31
33
  "./rendererPlugins/editableWidgets/timeRendererPlugin.tsx": timeRendererPlugin,
32
34
  "./rendererPlugins/widgets/checkRendererPlugin.tsx": checkRendererPlugin,
33
35
  "./rendererPlugins/widgets/colorRendererPlugin.tsx": colorRendererPlugin,
@@ -35,8 +37,8 @@ const modules = Object.assign({
35
37
  "./rendererPlugins/widgets/labelRendererPlugin.tsx": labelRendererPlugin,
36
38
  "./rendererPlugins/widgets/pictureRendererPlugin.tsx": pictureRendererPlugin,
37
39
  "./rendererPlugins/widgets/seqRendererPlugin.tsx": seqRendererPlugin,
38
- "./rowGroupSettingPlugin/index.ts": index$7,
39
- "./virtualTreePlugin/index.ts": index$8
40
+ "./rowGroupSettingPlugin/index.ts": index$8,
41
+ "./virtualTreePlugin/index.ts": index$9
40
42
  });
41
43
  var PluginPresets = separateMetaModule(modules);
42
44
 
@@ -0,0 +1 @@
1
+ export declare function keyboardEventPlugin(): import("../../../../../../es/components/iho-table").TablePlugin;
@@ -0,0 +1,32 @@
1
+ import { targetStringIncludes } from '../../../../../shared/utils/index.js';
2
+ import { promiseTimeout } from '@vueuse/shared';
3
+ import '../../../index.js';
4
+ import { defineTablePlugin } from '../../hooks/useTablePlugin.js';
5
+
6
+ function keyboardEventPlugin() {
7
+ const pluginName = "keyboardEventPlugin";
8
+ return defineTablePlugin({
9
+ name: pluginName,
10
+ apply(hooks) {
11
+ hooks.eventHooks.onKeydown.tap(pluginName, async ({ $event, $table }, { emits }) => {
12
+ await promiseTimeout(0);
13
+ const activeCellInfo = $table.getSelectedCell();
14
+ const editCellInfo = $table.getEditRecord();
15
+ const { row, column } = activeCellInfo || editCellInfo;
16
+ if (!row || !column)
17
+ return;
18
+ const key = $event.key;
19
+ !targetStringIncludes(["Arrow", "Escape", "Control", "Shift", "Alt", "Meta"], key) && await $table.setEditCell(row, column);
20
+ emits("keyboard", {
21
+ key,
22
+ index: $table.getRowIndex(row),
23
+ value: row[column.field],
24
+ row,
25
+ column
26
+ });
27
+ });
28
+ }
29
+ });
30
+ }
31
+
32
+ export { keyboardEventPlugin };
@@ -42,7 +42,7 @@ declare const _default: import("vue").DefineComponent<{
42
42
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
43
43
  }>>;
44
44
  emit: (event: "update:value", ...args: any[]) => void;
45
- globEmit: <T extends "toggleRowExpand" | "toggleTreeExpand" | "copy" | "scroll" | "formChange" | "settingClick" | "formClick" | "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">(event: T, ...args: import("../../../../../../../../es/components/iho-table").IhoTableEmitPayload<T>) => void;
45
+ globEmit: import("../../../../../../../../es/components/iho-table").IhoTableEmits;
46
46
  formRef: import("vue").Ref<HTMLElement | null>;
47
47
  isShow: import("vue").Ref<boolean>;
48
48
  formattedValue: import("vue").Ref<string | undefined>;
@@ -1,7 +1,8 @@
1
- import { createVNode, inject, mergeProps } from 'vue';
1
+ import { createVNode, mergeProps } from 'vue';
2
2
  import '../../../../../index.js';
3
- import { EDITABLE_WIDGET_TYPE, InjectionIhoTableEmits } from '../../../../constants/index.js';
4
- import EditDate from './editDate.js';
3
+ import { EDITABLE_WIDGET_TYPE } from '../../../../constants/index.js';
4
+ import { useIhoTableFormEvent } from '../../../../utils/index.js';
5
+ import EditDate from './editDate.vue.js';
5
6
  import { defineTablePlugin } from '../../../../hooks/useTablePlugin.js';
6
7
 
7
8
  function dateRendererPlugin() {
@@ -25,16 +26,13 @@ function dateRendererPlugin() {
25
26
  column,
26
27
  $rowIndex
27
28
  }) {
28
- const globEmit = inject(InjectionIhoTableEmits);
29
- const common = {
30
- value: row[column.field],
29
+ const {
30
+ emitFormClick
31
+ } = useIhoTableFormEvent({
31
32
  row,
32
33
  column,
33
- index: $rowIndex
34
- };
35
- function onClick() {
36
- globEmit("formClick", common);
37
- }
34
+ $rowIndex
35
+ });
38
36
  return [createVNode(EditDate, mergeProps({
39
37
  "value": row[column.field],
40
38
  "onUpdate:value": ($event) => row[column.field] = $event
@@ -42,7 +40,7 @@ function dateRendererPlugin() {
42
40
  "column": column,
43
41
  "row": row,
44
42
  "index": $rowIndex,
45
- "onClick": onClick
43
+ "onClick": emitFormClick
46
44
  }), null)];
47
45
  }
48
46
  });
@@ -1,7 +1,8 @@
1
- import { createVNode, inject, mergeProps } from 'vue';
1
+ import { createVNode, mergeProps } from 'vue';
2
2
  import { NInput } from 'naive-ui';
3
3
  import '../../../../index.js';
4
- import { EDITABLE_WIDGET_TYPE, InjectionIhoTableEmits } from '../../../constants/index.js';
4
+ import { EDITABLE_WIDGET_TYPE } from '../../../constants/index.js';
5
+ import { useIhoTableFormEvent } from '../../../utils/index.js';
5
6
  import { defineTablePlugin } from '../../../hooks/useTablePlugin.js';
6
7
 
7
8
  function inputRendererPlugin() {
@@ -23,24 +24,19 @@ function inputRendererPlugin() {
23
24
  column,
24
25
  $rowIndex
25
26
  }) {
26
- const emit = inject(InjectionIhoTableEmits);
27
- const common = {
28
- value: row[column.field],
27
+ const {
28
+ emitFormClick,
29
+ emitFormChange
30
+ } = useIhoTableFormEvent({
29
31
  row,
30
32
  column,
31
- index: $rowIndex
32
- };
33
- function onBlur() {
34
- emit("formChange", common);
35
- }
36
- function onClick() {
37
- emit("formClick", common);
38
- }
33
+ $rowIndex
34
+ });
39
35
  return [createVNode(NInput, mergeProps({
40
36
  "value": row[column.field],
41
37
  "onUpdate:value": ($event) => row[column.field] = $event,
42
- "onBlur": onBlur,
43
- "onClick": onClick
38
+ "onBlur": emitFormChange,
39
+ "onClick": emitFormClick
44
40
  }, props == null ? void 0 : props.componentProps), null)];
45
41
  }
46
42
  });
@@ -1,7 +1,8 @@
1
- import { createVNode, inject, mergeProps } from 'vue';
1
+ import { createVNode, mergeProps } from 'vue';
2
2
  import { NInputNumber } from 'naive-ui';
3
3
  import '../../../../index.js';
4
- import { EDITABLE_WIDGET_TYPE, InjectionIhoTableEmits } from '../../../constants/index.js';
4
+ import { EDITABLE_WIDGET_TYPE } from '../../../constants/index.js';
5
+ import { useIhoTableFormEvent } from '../../../utils/index.js';
5
6
  import { defineTablePlugin } from '../../../hooks/useTablePlugin.js';
6
7
 
7
8
  function numberRendererPlugin() {
@@ -23,7 +24,15 @@ function numberRendererPlugin() {
23
24
  column,
24
25
  $rowIndex
25
26
  }) {
26
- const emit = inject(InjectionIhoTableEmits);
27
+ const {
28
+ emitFormClick,
29
+ emitFormChange,
30
+ createCustomEvent
31
+ } = useIhoTableFormEvent({
32
+ row,
33
+ column,
34
+ $rowIndex
35
+ });
27
36
  const {
28
37
  placeholder = "\u8BF7\u8F93\u5165"
29
38
  } = (props == null ? void 0 : props.componentProps) || {};
@@ -31,28 +40,12 @@ function numberRendererPlugin() {
31
40
  ...(props == null ? void 0 : props.componentProps) || {},
32
41
  clearable: true,
33
42
  placeholder,
34
- onBlur,
35
- onUpdateValue,
36
- onClick
37
- };
38
- const common = {
39
- value: row[column.field],
40
- row,
41
- column,
42
- index: $rowIndex
43
- };
44
- function onBlur() {
45
- emit("formChange", {
46
- ...common,
43
+ onBlur: createCustomEvent("formChange", {
47
44
  type: "blur"
48
- });
49
- }
50
- function onUpdateValue() {
51
- emit("formChange", common);
52
- }
53
- function onClick() {
54
- emit("formClick", common);
55
- }
45
+ }),
46
+ onUpdateValue: emitFormChange,
47
+ onClick: emitFormClick
48
+ };
56
49
  return [createVNode(NInputNumber, mergeProps({
57
50
  "value": row[column.field],
58
51
  "onUpdate:value": ($event) => row[column.field] = $event
@@ -1,6 +1,7 @@
1
- import { createVNode, inject, mergeProps } from 'vue';
1
+ import { createVNode, mergeProps } from 'vue';
2
2
  import '../../../../../index.js';
3
- import { EDITABLE_WIDGET_TYPE, InjectionIhoTableEmits } from '../../../../constants/index.js';
3
+ import { EDITABLE_WIDGET_TYPE } from '../../../../constants/index.js';
4
+ import { useIhoTableFormEvent } from '../../../../utils/index.js';
4
5
  import EditSelect from './editSelect.js';
5
6
  import { getDefaultValue } from './selectUtils.js';
6
7
  import { defineTablePlugin } from '../../../../hooks/useTablePlugin.js';
@@ -26,23 +27,20 @@ function selectRendererPlugin() {
26
27
  column,
27
28
  $rowIndex
28
29
  }) {
29
- const emit = inject(InjectionIhoTableEmits);
30
- function onClick() {
31
- const common = {
32
- value: row[column.field],
33
- row,
34
- column,
35
- index: $rowIndex
36
- };
37
- emit("formClick", common);
38
- }
30
+ const {
31
+ emitFormClick
32
+ } = useIhoTableFormEvent({
33
+ row,
34
+ column,
35
+ $rowIndex
36
+ });
39
37
  return [createVNode(EditSelect, mergeProps((props == null ? void 0 : props.componentProps) || {}, {
40
38
  "column": column,
41
39
  "row": row,
42
40
  "index": $rowIndex,
43
41
  "value": row[column.field],
44
42
  "onUpdate:value": ($event) => row[column.field] = $event,
45
- "onClick": onClick
43
+ "onClick": emitFormClick
46
44
  }), null)];
47
45
  }
48
46
  });
@@ -49,7 +49,7 @@ declare const _default: import("vue").DefineComponent<{
49
49
  }>> & {
50
50
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
51
51
  }>>;
52
- globEmit: <T extends "toggleRowExpand" | "toggleTreeExpand" | "copy" | "scroll" | "formChange" | "settingClick" | "formClick" | "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">(event: T, ...args: import("../../../../../../../../es/components/iho-table").IhoTableEmitPayload<T>) => void;
52
+ globEmit: import("../../../../../../../../es/components/iho-table").IhoTableEmits;
53
53
  tableHandler: import("../../../../../../../../es/components/iho-table").IhoTableHandler;
54
54
  popoverRef: import("vue").Ref<any>;
55
55
  editContent: import("vue").Ref<any>;
@@ -1,4 +1,4 @@
1
- import { defineComponent, inject, ref, watch, computed, onDeactivated, openBlock, createBlock, unref, withCtx, createElementVNode, withModifiers, normalizeStyle, toDisplayString, renderSlot, createVNode } from 'vue';
1
+ import { defineComponent, inject, ref, watch, computed, onMounted, onDeactivated, openBlock, createBlock, unref, withCtx, createElementVNode, withModifiers, normalizeStyle, toDisplayString, renderSlot, createVNode } from 'vue';
2
2
  import { cloneDeep, isObject, isArray } from 'lodash-es';
3
3
  import { NPopover, NInput } from 'naive-ui';
4
4
  import { InjectionIhoTableEmits, InjectionIhoTableHandler } from '../../../../constants/index.js';
@@ -62,6 +62,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
62
62
  boxSizing: "border-box",
63
63
  "border-radius": "4px"
64
64
  }));
65
+ onMounted(() => setShow(true));
65
66
  onDeactivated(onClose);
66
67
  return (_ctx, _cache) => {
67
68
  return openBlock(), createBlock(unref(NPopover), {
@@ -2,10 +2,10 @@ import { reactive, inject, createVNode, toRaw, h, onBeforeUnmount } from 'vue';
2
2
  import { traverse } from '../../../../../../../shared/utils/index.js';
3
3
  import { isFunction, isObject } from 'lodash-es';
4
4
  import '../../../../../index.js';
5
- import { EDITABLE_WIDGET_TYPE, InjectionIhoTableUUID, InjectionIhoTableEmits } from '../../../../constants/index.js';
6
- import { getRowHeight, getColumnRenderWidth } from '../../../../utils/index.js';
5
+ import { EDITABLE_WIDGET_TYPE, InjectionIhoTableUUID } from '../../../../constants/index.js';
6
+ import { getRowHeight, useIhoTableFormEvent, getColumnRenderWidth } from '../../../../utils/index.js';
7
7
  import { isSeparateColumn, contentSeparate, getColumnInfoMaxLength, generateSeparateRowData } from './separateUtils.js';
8
- import EditSeparate from './editSeparate.js';
8
+ import EditSeparate from './editSeparate.vue.js';
9
9
  import { defineTablePlugin } from '../../../../hooks/useTablePlugin.js';
10
10
 
11
11
  function separateRendererPlugins() {
@@ -42,7 +42,6 @@ function separateRendererPlugins() {
42
42
  }) {
43
43
  var _a, _b;
44
44
  const uuid = inject(InjectionIhoTableUUID);
45
- const emit = inject(InjectionIhoTableEmits);
46
45
  const separateRow = getSeparateRowData(uuid, row);
47
46
  const height = getRowHeight();
48
47
  const slots = {};
@@ -50,15 +49,13 @@ function separateRendererPlugins() {
50
49
  const separate = toRaw(renderOpts.props.separateSlot);
51
50
  slots.menu = isFunction(separate) ? separate : isObject(separate) ? (props) => h(separate, props) : void 0;
52
51
  }
53
- const common = {
54
- value: row[column.field],
52
+ const {
53
+ emitFormClick
54
+ } = useIhoTableFormEvent({
55
55
  row,
56
56
  column,
57
- index: $rowIndex
58
- };
59
- function onClick() {
60
- emit("formClick", common);
61
- }
57
+ $rowIndex
58
+ });
62
59
  return [createVNode(EditSeparate, {
63
60
  "value": row[column.field],
64
61
  "onUpdate:value": ($event) => row[column.field] = $event,
@@ -67,7 +64,7 @@ function separateRendererPlugins() {
67
64
  "column": column,
68
65
  "row": row,
69
66
  "displayContent": (_b = separateRow == null ? void 0 : separateRow.separateData) == null ? void 0 : _b[column.field],
70
- "onClick": onClick
67
+ "onClick": emitFormClick
71
68
  }, slots)];
72
69
  }
73
70
  });
@@ -1,7 +1,8 @@
1
- import { createVNode, inject, mergeProps } from 'vue';
1
+ import { createVNode, mergeProps } from 'vue';
2
2
  import '../../../../index.js';
3
- import { EDITABLE_WIDGET_TYPE, InjectionIhoTableEmits } from '../../../constants/index.js';
3
+ import { EDITABLE_WIDGET_TYPE } from '../../../constants/index.js';
4
4
  import { NTimePicker } from 'naive-ui';
5
+ import { useIhoTableFormEvent } from '../../../utils/index.js';
5
6
  import { defineTablePlugin } from '../../../hooks/useTablePlugin.js';
6
7
 
7
8
  function timeRendererPlugin() {
@@ -23,7 +24,14 @@ function timeRendererPlugin() {
23
24
  column,
24
25
  $rowIndex
25
26
  }) {
26
- const emit = inject(InjectionIhoTableEmits);
27
+ const {
28
+ emitFormClick,
29
+ emitFormChange
30
+ } = useIhoTableFormEvent({
31
+ row,
32
+ column,
33
+ $rowIndex
34
+ });
27
35
  const {
28
36
  placeholder = "\u8BF7\u9009\u62E9",
29
37
  valueFormat = "HH:mm"
@@ -33,21 +41,9 @@ function timeRendererPlugin() {
33
41
  placeholder,
34
42
  valueFormat,
35
43
  format: valueFormat || "yyyy-MM-dd HH:mm:ss",
36
- onUpdateFormattedValue: onUpdateValue,
37
- onClick
38
- };
39
- const common = {
40
- value: row[column.field],
41
- row,
42
- column,
43
- index: $rowIndex
44
+ onUpdateFormattedValue: emitFormChange,
45
+ onClick: emitFormClick
44
46
  };
45
- function onUpdateValue() {
46
- emit("formChange", common);
47
- }
48
- function onClick() {
49
- emit("formClick", common);
50
- }
51
47
  return [createVNode(NTimePicker, mergeProps({
52
48
  "formattedValue": row[column.field],
53
49
  "onUpdate:formattedValue": ($event) => row[column.field] = $event
@@ -1,7 +1,7 @@
1
1
  import { AnyObject, TupleToUnion } from '../../../../../es/shared/types';
2
2
  import { VxeTableProps, VxeTableDefines, VxeTableInstance, VxeColumnPropTypes } from 'vxe-table';
3
3
  import { VxeTableEventProps } from 'vxe-table/types/table';
4
- import { IHO_TABLE_STRING_STATUS, IhoTableEventNameTuple, IhoTableRowGroupSequence, VxeEventListenerNameList } from '../../../../../es/components/iho-table/src/constants';
4
+ import { IHO_TABLE_STRING_STATUS, IhoTableCustomEventNameTuple, IhoTableEventNameTuple, IhoTableRowGroupSequence, VxeEventListenerNameList } from '../../../../../es/components/iho-table/src/constants';
5
5
  import { IHO_TABLE_FILTER_STATUS } from '../../../../../es/components/iho-table/src/plugins/filterPlugin/types';
6
6
  export * from './pluginType';
7
7
  export interface IhoTableRowGroupItem {
@@ -24,10 +24,6 @@ export declare type IhoTableConfig = VxeTableProps & Partial<{
24
24
  }>;
25
25
  export declare type IhoTableFieldItem = {
26
26
  [K in keyof VxeTableDefines.ColumnInfo]?: K extends 'children' ? IhoTableFieldItem[] : K extends keyof VxeTableDefines.ColumnInfo ? VxeTableDefines.ColumnInfo[K] : never;
27
- } & Partial<{
28
- annotation: boolean;
29
- }> & {
30
- [K: string]: unknown;
31
27
  };
32
28
  export declare namespace IhoTableLowCodeField {
33
29
  type FieldSetting = {
@@ -62,6 +58,7 @@ export declare type LowCodeTableFieldItem = {
62
58
  componentProps: AnyObject;
63
59
  showOverflow: VxeTableDefines.ColumnInfo['showOverflow'];
64
60
  options: AnyObject[];
61
+ annotation: boolean;
65
62
  }> & Partial<Pick<VxeTableDefines.ColumnInfo, 'resizable'>>;
66
63
  export declare type IhoTableFormChangePayload = {
67
64
  column: IhoTableFieldItem;
@@ -70,6 +67,7 @@ export declare type IhoTableFormChangePayload = {
70
67
  index: number;
71
68
  type?: string;
72
69
  };
70
+ export declare type IhoTableEmits = <T extends typeof IhoTableEventNameTuple[number]>(event: T, ...args: IhoTableEmitPayload<T>) => void;
73
71
  export declare type EventListenerToEventName<T extends string> = T extends `on${infer R}` ? R extends `${infer F}${infer L}` ? `${Lowercase<F>}${L}` : never : never;
74
72
  export declare type EventNameToEventListener<T extends string> = T extends `${infer L}${infer R}` ? `on${Uppercase<L>}${R}` : never;
75
73
  export declare type IhoTableHandler = Record<'updateConfigRef' | 'updateFieldListRef' | 'updateTableDataRef', () => void>;
@@ -81,7 +79,9 @@ export declare type IhoTableFilterPayload = {
81
79
  type: 'filter';
82
80
  value: string[];
83
81
  };
84
- export declare type IhoTableEmitPayload<T extends typeof IhoTableEventNameTuple[number]> = T extends 'formChange' | 'formClick' ? [IhoTableFormChangePayload] : T extends 'settingClick' ? [] : T extends 'sortChange' ? [IhoTableFilterPayload] : Parameters<NonNullable<VxeTableEventProps[EventNameToEventListener<Exclude<T, 'formChange' | 'settingClick' | 'formClick' | 'sortChange'>>]>>;
82
+ export declare type IhoTableEmitPayload<T extends typeof IhoTableEventNameTuple[number]> = T extends 'formChange' | 'formClick' ? [IhoTableFormChangePayload] : T extends 'keyboard' ? [IhoTableFormChangePayload & {
83
+ key: string;
84
+ }] : T extends 'settingClick' ? [] : T extends 'sortChange' ? [IhoTableFilterPayload] : Parameters<NonNullable<VxeTableEventProps[EventNameToEventListener<Exclude<T, typeof IhoTableCustomEventNameTuple[number]>>]>>;
85
85
  export declare type IhoTableAnchorItem = {
86
86
  field: string;
87
87
  title: string;
@@ -5,7 +5,7 @@ import { Ref, VNode } from 'vue';
5
5
  import { VxeGlobalCommands, VxeGlobalFormats, VxeGlobalHooks, VxeGlobalMenus, VxeGlobalRenderer, VxeTableInstance } from 'vxe-table';
6
6
  import { VxeTableEventProps, VxeTableEvents } from 'vxe-table/types/table';
7
7
  import { VxeGlobalInterceptor } from 'vxe-table/types/v-x-e-table';
8
- import { IhoTableConfig, IhoTableFieldItem, IhoTableHandler } from '.';
8
+ import { IhoTableConfig, IhoTableEmits, IhoTableFieldItem, IhoTableHandler } from '.';
9
9
  export declare type IhoTableInstance = {
10
10
  interceptor: VxeGlobalInterceptor;
11
11
  renderer: VxeGlobalRenderer;
@@ -63,6 +63,7 @@ export declare abstract class AbstractFieldHooks {
63
63
  }
64
64
  export declare type WithIhoEventContext<T> = T extends any[] ? [...T, IhoTableHandler & {
65
65
  $table: Nullable<VxeTableInstance>;
66
+ emits: IhoTableEmits;
66
67
  }, IhoTableConfig] : [T, IhoTableHandler & {
67
68
  $table: Nullable<VxeTableInstance>;
68
69
  }, IhoTableConfig];
@@ -1,7 +1,7 @@
1
1
  import { AnyObject, Nullable } from '../../../../../es/shared/types';
2
2
  import { MaybeRef } from '@vueuse/core';
3
- import { VxeTableInstance } from 'vxe-table';
4
- import { EventListenerToEventName, LowCodeTableFieldItem } from '../../../../../es/components/iho-table';
3
+ import { VxeTableDefines, VxeTableInstance } from 'vxe-table';
4
+ import { EventListenerToEventName, IhoTableFieldItem, IhoTableFormChangePayload, LowCodeTableFieldItem } from '../../../../../es/components/iho-table';
5
5
  export declare function IhoTableLog(message: string): void;
6
6
  export declare function IhoTableWarn(message: string): void;
7
7
  export declare const IhoTableUtils: Readonly<{
@@ -14,3 +14,13 @@ export declare function useUUIDMap<T>(creator: () => T, isReactive?: boolean): {
14
14
  removeItemFromUUID: (uuid: string) => void;
15
15
  };
16
16
  export declare function getColumnRenderWidth(column: AnyObject, $table: MaybeRef<Nullable<VxeTableInstance>>): Promise<number>;
17
+ export declare function useIhoTableFormEvent({ row, column, $rowIndex }: {
18
+ row: AnyObject;
19
+ column: VxeTableDefines.ColumnInfo;
20
+ $rowIndex: number;
21
+ }): {
22
+ emitFormChange: () => void;
23
+ emitFormClick: () => void;
24
+ createCustomEvent: (eventName: 'formChange' | 'formClick', params: Partial<IhoTableFormChangePayload>) => () => void;
25
+ };
26
+ export declare function getLowCodeFieldFromField(field: IhoTableFieldItem): LowCodeTableFieldItem | undefined;
@@ -1,6 +1,6 @@
1
1
  import { isNumber } from 'lodash-es';
2
2
  import { inject, reactive, nextTick, unref } from 'vue';
3
- import { InjectionIhoTableConfig } from '../constants/index.js';
3
+ import { InjectionIhoTableConfig, InjectionIhoTableEmits } from '../constants/index.js';
4
4
 
5
5
  function IhoTableLog(message) {
6
6
  return console.log(`[IhoTable]: ${message}`);
@@ -53,5 +53,36 @@ async function getColumnRenderWidth(column, $table) {
53
53
  return isNumber(column.width) ? column.width : 64;
54
54
  }
55
55
  }
56
+ function useIhoTableFormEvent({
57
+ row,
58
+ column,
59
+ $rowIndex
60
+ }) {
61
+ const emit = inject(InjectionIhoTableEmits);
62
+ function getPayload() {
63
+ return {
64
+ value: row[column.field],
65
+ row,
66
+ column,
67
+ index: $rowIndex
68
+ };
69
+ }
70
+ function emitFormChange() {
71
+ emit("formChange", getPayload());
72
+ }
73
+ function emitFormClick() {
74
+ emit("formClick", getPayload());
75
+ }
76
+ function createCustomEvent(eventName, params) {
77
+ return function() {
78
+ emit(eventName, { ...getPayload(), ...params });
79
+ };
80
+ }
81
+ return { emitFormChange, emitFormClick, createCustomEvent };
82
+ }
83
+ function getLowCodeFieldFromField(field) {
84
+ var _a;
85
+ return (_a = field.editRender) == null ? void 0 : _a.props;
86
+ }
56
87
 
57
- export { IhoTableLog, IhoTableUtils, IhoTableWarn, getColumnRenderWidth, getEventName, getRowHeight, useUUIDMap };
88
+ export { IhoTableLog, IhoTableUtils, IhoTableWarn, getColumnRenderWidth, getEventName, getLowCodeFieldFromField, getRowHeight, useIhoTableFormEvent, useUUIDMap };
@@ -1 +1 @@
1
- .iho-table .vxe-table--render-default .vxe-table--fixed-left-wrapper.scrolling--middle{box-shadow:7px 0 8px -3px rgba(0,0,0,.15)}.iho-table .vxe-table--render-default .vxe-table--fixed-right-wrapper.scrolling--middle{box-shadow:-7px 0 8px -3px rgba(0,0,0,.15)}.iho-table__boldCell{font-weight:700}.iho-table .icon-dot{background:var(--table-icon-color);box-shadow:0 2px 4px 0 var(--table-icon-shadow)}.iho-table .icon-dot,.iho-table .icon-dot-red{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-red{background:red;box-shadow:0 2px 4px 0 rgba(255,0,0,.5)}.iho-table .icon-dot-blue{background:blue;box-shadow:0 2px 4px 0 rgba(0,0,255,.5)}.iho-table .icon-dot-blue,.iho-table .icon-dot-green{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-green{background:green;box-shadow:0 2px 4px 0 rgba(0,128,0,.5)}.iho-table .icon-dot-gray{background:gray;box-shadow:0 2px 4px 0 hsla(0,0%,50%,.5)}.iho-table .icon-dot-gray,.iho-table .icon-dot-yellow{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-yellow{background:#ff0;box-shadow:0 2px 4px 0 rgba(255,255,0,.5)}.iho-table .icon-dot-resolved{background:#36be8c;box-shadow:0 2px 4px 0 rgba(54,190,140,.5)}.iho-table .icon-dot-huifu,.iho-table .icon-dot-resolved{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-huifu{background:#42d0f6;box-shadow:0 2px 4px 0 rgba(66,208,246,.5)}.iho-table .icon-dot-close{background:#718391;box-shadow:0 2px 4px 0 rgba(113,131,145,.5)}.iho-table .icon-dot-audit,.iho-table .icon-dot-close{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-audit{background:#f4ba32;box-shadow:0 2px 4px 0 rgba(244,186,50,.5)}.iho-table .icon-dot-design{background:#927ce1;box-shadow:0 2px 4px 0 rgba(146,124,225,.5)}.iho-table .icon-dot-design,.iho-table .icon-dot-develop{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-develop{background:#4eb0ef;box-shadow:0 2px 4px 0 rgba(78,176,239,.5)}.iho-table .icon-dot-develop-complete{background:#6381f9;border-radius:50%;box-shadow:0 2px 4px 0 rgba(99,129,249,.5);display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table__filterIcon{cursor:pointer;padding:0 4px}.iho-table__filterIcon:hover{opacity:.7}.iho-table__filterWrapper{display:flex;flex-direction:column;gap:8px;width:200px}.iho-table__filterButton{align-items:center;border-radius:4px;cursor:pointer;display:flex;height:30px;padding:0 8px}.iho-table__filterButton--active{color:#5585f5}.iho-table__filterButton:hover{background:rgba(0,0,0,.05)}.iho-table__filterListWrapper{border:1px solid rgba(0,0,0,.05)}.iho-table__filterListItem{align-items:center;border-radius:4px;display:flex;height:32px;padding:0 8px}.iho-table__filterListItem:hover{background:rgba(0,0,0,.05)}.iho-table__filterFooter{display:flex;justify-content:space-between}.iho-table .vxe-header--column [annotation-hover-show=true]{visibility:hidden}.iho-table .vxe-header--column:hover [annotation-hover-show=true]{visibility:visible}.iho-table__headerWrapper{display:inline-flex}
1
+ .iho-table .vxe-table--render-default .vxe-table--fixed-left-wrapper.scrolling--middle{box-shadow:7px 0 8px -3px rgba(0,0,0,.15)}.iho-table .vxe-table--render-default .vxe-table--fixed-right-wrapper.scrolling--middle{box-shadow:-7px 0 8px -3px rgba(0,0,0,.15)}.iho-table__boldCell{font-weight:700}.iho-table .vxe-table--body-wrapper::-webkit-scrollbar,.iho-table .vxe-table--footer-wrapper.body--wrapper::-webkit-scrollbar{background-color:transparent;height:10px;width:10px}.iho-table .vxe-table--body-wrapper::-webkit-scrollbar-thumb,.iho-table .vxe-table--footer-wrapper.body--wrapper::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:#f2f2f2;border:3px dashed transparent;border-radius:5px}.iho-table .vxe-table--body-wrapper::-webkit-scrollbar-thumb:hover,.iho-table .vxe-table--footer-wrapper.body--wrapper::-webkit-scrollbar-thumb:hover{background:#b2b2b2}.iho-table .icon-dot{background:var(--table-icon-color);box-shadow:0 2px 4px 0 var(--table-icon-shadow)}.iho-table .icon-dot,.iho-table .icon-dot-red{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-red{background:red;box-shadow:0 2px 4px 0 rgba(255,0,0,.5)}.iho-table .icon-dot-blue{background:blue;box-shadow:0 2px 4px 0 rgba(0,0,255,.5)}.iho-table .icon-dot-blue,.iho-table .icon-dot-green{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-green{background:green;box-shadow:0 2px 4px 0 rgba(0,128,0,.5)}.iho-table .icon-dot-gray{background:gray;box-shadow:0 2px 4px 0 hsla(0,0%,50%,.5)}.iho-table .icon-dot-gray,.iho-table .icon-dot-yellow{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-yellow{background:#ff0;box-shadow:0 2px 4px 0 rgba(255,255,0,.5)}.iho-table .icon-dot-resolved{background:#36be8c;box-shadow:0 2px 4px 0 rgba(54,190,140,.5)}.iho-table .icon-dot-huifu,.iho-table .icon-dot-resolved{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-huifu{background:#42d0f6;box-shadow:0 2px 4px 0 rgba(66,208,246,.5)}.iho-table .icon-dot-close{background:#718391;box-shadow:0 2px 4px 0 rgba(113,131,145,.5)}.iho-table .icon-dot-audit,.iho-table .icon-dot-close{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-audit{background:#f4ba32;box-shadow:0 2px 4px 0 rgba(244,186,50,.5)}.iho-table .icon-dot-design{background:#927ce1;box-shadow:0 2px 4px 0 rgba(146,124,225,.5)}.iho-table .icon-dot-design,.iho-table .icon-dot-develop{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-develop{background:#4eb0ef;box-shadow:0 2px 4px 0 rgba(78,176,239,.5)}.iho-table .icon-dot-develop-complete{background:#6381f9;border-radius:50%;box-shadow:0 2px 4px 0 rgba(99,129,249,.5);display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table__filterIcon{cursor:pointer;padding:0 4px}.iho-table__filterIcon:hover{opacity:.7}.iho-table__filterWrapper{display:flex;flex-direction:column;gap:8px;width:200px}.iho-table__filterButton{align-items:center;border-radius:4px;cursor:pointer;display:flex;height:30px;padding:0 8px}.iho-table__filterButton--active{color:#5585f5}.iho-table__filterButton:hover{background:rgba(0,0,0,.05)}.iho-table__filterListWrapper{border:1px solid rgba(0,0,0,.05)}.iho-table__filterListItem{align-items:center;border-radius:4px;display:flex;height:32px;padding:0 8px}.iho-table__filterListItem:hover{background:rgba(0,0,0,.05)}.iho-table__filterFooter{display:flex;justify-content:space-between}.iho-table .vxe-header--column [annotation-hover-show=true]{visibility:hidden}.iho-table .vxe-header--column:hover [annotation-hover-show=true]{visibility:visible}.iho-table__headerWrapper{display:inline-flex}