cnhis-design-vue 3.1.42-beta.6 → 3.1.42-beta.60

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 (288) hide show
  1. package/es/components/annotation-edit/src/AnnotationEdit.js +1 -1
  2. package/es/components/base-search/index.d.ts +2 -2
  3. package/es/components/base-search/src/index.vue.d.ts +2 -2
  4. package/es/components/base-search/src/index.vue.js +1 -1
  5. package/es/components/base-search/style/index.css +1 -1
  6. package/es/components/big-table/index.d.ts +3 -4
  7. package/es/components/big-table/src/BigTable.vue.d.ts +3 -4
  8. package/es/components/big-table/src/BigTable.vue2.js +1 -1
  9. package/es/components/big-table/src/components/edit-form/edit-select-table.d.ts +1 -1
  10. package/es/components/big-table/src/components/edit-form/edit-select.js +1 -1
  11. package/es/components/big-table/src/hooks/useEvent.js +1 -1
  12. package/es/components/big-table/src/hooks/useFormat.js +1 -1
  13. package/es/components/big-table/src/hooks/useNestTable.js +1 -1
  14. package/es/components/big-table/src/hooks/useTableParse.js +1 -1
  15. package/es/components/big-table/src/utils.d.ts +11 -1
  16. package/es/components/big-table/src/utils.js +1 -1
  17. package/es/components/big-table/style/index.css +1 -1
  18. package/es/components/bpmn-workflow/index.d.ts +12 -0
  19. package/es/components/bpmn-workflow/src/BpmnWorkflow.vue.d.ts +12 -0
  20. package/es/components/bpmn-workflow/src/BpmnWorkflow.vue.js +1 -1
  21. package/es/components/button-print/index.d.ts +32 -7
  22. package/es/components/button-print/src/ButtonPrint.vue.d.ts +32 -8
  23. package/es/components/button-print/src/ButtonPrint.vue2.js +1 -1
  24. package/es/components/button-print/src/components/EditFormat.vue.d.ts +4 -4
  25. package/es/components/button-print/src/components/IdentityVerification.vue.d.ts +4 -4
  26. package/es/components/button-print/src/utils/print.js +1 -1
  27. package/es/components/classification/index.d.ts +1 -1
  28. package/es/components/classification/src/index.vue.d.ts +2 -2
  29. package/es/components/classification/style/index.css +1 -1
  30. package/es/components/config-provider/src/ConfigProvider.js +1 -1
  31. package/es/components/config-provider/src/interface.d.ts +4 -4
  32. package/es/components/date-picker/index.d.ts +4 -0
  33. package/es/components/date-picker/src/DatePicker.vue.d.ts +4 -0
  34. package/es/components/date-picker/src/DatePicker.vue.js +1 -1
  35. package/es/components/fabric-chart/index.d.ts +2 -2
  36. package/es/components/fabric-chart/src/FabricChart.vue.d.ts +2 -2
  37. package/es/components/fabric-chart/src/hooks/useBirthProcess.d.ts +1 -0
  38. package/es/components/fabric-chart/src/hooks/useBirthProcess.js +1 -1
  39. package/es/components/fabric-chart/src/hooks/useBirthProcessChart.js +1 -1
  40. package/es/components/fabric-chart/src/hooks/useCenter.js +1 -1
  41. package/es/components/fabric-chart/src/hooks/useLeft.js +1 -1
  42. package/es/components/fabric-chart/src/hooks/useScaleColumn.d.ts +16 -0
  43. package/es/components/fabric-chart/src/hooks/useScaleColumn.js +1 -0
  44. package/es/components/field-set/index.d.ts +26 -81
  45. package/es/components/field-set/src/FieldSet.vue.d.ts +28 -32
  46. package/es/components/field-set/src/FieldSet.vue.js +1 -1
  47. package/es/components/field-set/style/index.css +1 -1
  48. package/es/components/form-config/index.d.ts +75 -39
  49. package/es/components/form-config/src/FormConfig.vue.d.ts +75 -39
  50. package/es/components/form-config/src/FormConfig.vue.js +1 -1
  51. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +28 -14
  52. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +39 -21
  53. package/es/components/form-config/src/components/FormConfigEdit.vue.js +1 -1
  54. package/es/components/form-config/src/components/renderer/DefaultNode.vue.js +1 -1
  55. package/es/components/form-config/src/constants/index.d.ts +12 -1
  56. package/es/components/form-config/src/constants/index.js +1 -1
  57. package/es/components/form-config/src/hooks/useConfigurationField.js +1 -1
  58. package/es/components/form-config/src/types/index.d.ts +1 -0
  59. package/es/components/form-render/index.d.ts +28 -14
  60. package/es/components/form-render/index.js +1 -1
  61. package/es/components/form-render/src/FormRender.vue.d.ts +28 -14
  62. package/es/components/form-render/src/FormRender.vue.js +1 -1
  63. package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +28 -14
  64. package/es/components/form-render/src/components/renderer/combination.js +1 -1
  65. package/es/components/form-render/src/components/renderer/complex.d.ts +1 -1
  66. package/es/components/form-render/src/components/renderer/date.d.ts +4 -0
  67. package/es/components/form-render/src/components/renderer/date.js +1 -1
  68. package/es/components/form-render/src/components/renderer/dist/levelSearchCascader.d.ts +77 -0
  69. package/es/components/form-render/src/components/renderer/dist/searchCascade.d.ts +84 -0
  70. package/es/components/form-render/src/components/renderer/jsonCombination/index.js +1 -1
  71. package/es/components/form-render/src/components/renderer/levelSearchCascader.d.ts +18 -0
  72. package/es/components/form-render/src/components/renderer/levelSearchCascader.js +1 -1
  73. package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue.d.ts +1 -1
  74. package/es/components/form-render/src/components/renderer/lineBar/index.d.ts +1 -1
  75. package/es/components/form-render/src/components/renderer/radio&checkbox.d.ts +38 -2
  76. package/es/components/form-render/src/components/renderer/radio_checkbox.js +1 -1
  77. package/es/components/form-render/src/components/renderer/remoteSearch.d.ts +18 -0
  78. package/es/components/form-render/src/components/renderer/remoteSearch.js +1 -1
  79. package/es/components/form-render/src/components/renderer/searchCascade.d.ts +27 -0
  80. package/es/components/form-render/src/components/renderer/searchCascade.js +1 -1
  81. package/es/components/form-render/src/components/renderer/select.d.ts +32 -5
  82. package/es/components/form-render/src/components/renderer/select.js +1 -1
  83. package/es/components/form-render/src/hooks/index.d.ts +1 -1
  84. package/es/components/form-render/src/hooks/index.js +1 -1
  85. package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
  86. package/es/components/form-render/src/hooks/useFieldNormalize.js +1 -1
  87. package/es/components/form-render/src/hooks/useFormAsyncQueue.d.ts +16 -0
  88. package/es/components/form-render/src/hooks/useFormAsyncQueue.js +1 -0
  89. package/es/components/form-render/src/hooks/useFormContext.js +1 -1
  90. package/es/components/form-render/src/hooks/useFormRenderOptions.d.ts +13 -8
  91. package/es/components/form-render/src/hooks/useFormRenderOptions.js +1 -1
  92. package/es/components/form-render/src/types/fieldItem.d.ts +6 -4
  93. package/es/components/form-render/src/types/index.d.ts +3 -2
  94. package/es/components/form-render/style/index.css +1 -1
  95. package/es/components/iho-table/index.d.ts +24 -5
  96. package/es/components/iho-table/src/IhoTable.vue.d.ts +24 -5
  97. package/es/components/iho-table/src/IhoTable.vue.js +1 -1
  98. package/es/components/iho-table/src/constants/index.d.ts +3 -2
  99. package/es/components/iho-table/src/constants/index.js +1 -1
  100. package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +4 -4
  101. package/es/components/iho-table/src/hooks/tapHooks/index.js +1 -1
  102. package/es/components/iho-table/src/hooks/tapHooks/useConfigHooks.d.ts +22 -21
  103. package/es/components/iho-table/src/hooks/tapHooks/useConfigHooks.js +1 -1
  104. package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.d.ts +60 -237
  105. package/es/components/iho-table/src/hooks/tapHooks/useExposeHooks.d.ts +1 -4
  106. package/es/components/iho-table/src/hooks/tapHooks/useFieldHooks.d.ts +4 -16
  107. package/es/components/iho-table/src/hooks/tapHooks/useSetupHooks.d.ts +2 -2
  108. package/es/components/iho-table/src/hooks/tapHooks/useSetupHooks.js +1 -1
  109. package/es/components/iho-table/src/hooks/useColumnConfigAdaptor.js +1 -1
  110. package/es/components/iho-table/src/plugins/anchorPlugin/useAnchor.js +1 -1
  111. package/es/components/iho-table/src/plugins/defaultConfigPlugin/index.js +1 -1
  112. package/es/components/iho-table/src/plugins/dist/highLightSetPlugin.d.ts +3 -0
  113. package/es/components/iho-table/src/plugins/filterRenderPlugin/dist/index.d.ts +3 -0
  114. package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue.d.ts +1 -1
  115. package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue.js +1 -1
  116. package/es/components/iho-table/src/plugins/filterRenderPlugin/index.js +1 -1
  117. package/es/components/iho-table/src/plugins/highLightSetPlugin.d.ts +1 -0
  118. package/es/components/iho-table/src/plugins/highLightSetPlugin.js +1 -0
  119. package/es/components/iho-table/src/plugins/index.js +1 -1
  120. package/es/components/iho-table/src/plugins/keyboardEventPlugin/index.js +1 -1
  121. package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index.js +1 -1
  122. package/es/components/iho-table/src/plugins/maxCheckSizePlugin.d.ts +1 -0
  123. package/es/components/iho-table/src/plugins/maxCheckSizePlugin.js +1 -0
  124. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +4 -0
  125. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.d.ts +25 -3
  126. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -1
  127. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +1 -1
  128. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.d.ts +2 -1
  129. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.js +1 -1
  130. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +1 -1
  131. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.d.ts +2 -1
  132. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.js +1 -1
  133. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/defaultRendererPlugin.js +1 -1
  134. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/dist/defaultRendererPlugin.d.ts +3 -0
  135. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/dist/seqRendererPlugin.d.ts +3 -0
  136. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/seqRendererPlugin.js +1 -1
  137. package/es/components/iho-table/src/plugins/rowDragPlugin/index.d.ts +1 -0
  138. package/es/components/iho-table/src/plugins/rowDragPlugin/index.js +1 -0
  139. package/es/components/iho-table/src/plugins/{rendererPlugins/widgets/variableHeightRendererPlugin.d.ts → varialbleHeightPlugin/index.d.ts} +1 -1
  140. package/es/components/iho-table/src/plugins/varialbleHeightPlugin/index.js +1 -0
  141. package/es/components/iho-table/src/types/index.d.ts +24 -5
  142. package/es/components/iho-table/src/types/pluginType.d.ts +10 -25
  143. package/es/components/iho-table/src/utils/index.d.ts +7 -3
  144. package/es/components/iho-table/src/utils/index.js +1 -1
  145. package/es/components/iho-table/style/iconfont.ttf +0 -0
  146. package/es/components/iho-table/style/index.css +1 -1
  147. package/es/components/index.css +1 -1
  148. package/es/components/index.d.ts +1 -0
  149. package/es/components/index.js +1 -1
  150. package/es/components/info-header/index.d.ts +61 -32
  151. package/es/components/info-header/src/InfoHeader.vue.d.ts +61 -32
  152. package/es/components/info-header/src/InfoHeader.vue.js +1 -1
  153. package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +3 -3
  154. package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +3 -3
  155. package/es/components/info-header/src/components/infoDescription/HiddenContent.vue.d.ts +2 -2
  156. package/es/components/info-header/src/components/infoDescription/HiddenContent.vue.js +1 -1
  157. package/es/components/info-header/src/components/infoDescription/InfoEllipsis.vue.d.ts +1 -1
  158. package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +31 -17
  159. package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +29 -14
  160. package/es/components/info-header/src/components/patientInfo/index.vue.js +1 -1
  161. package/es/components/info-header/style/index.css +1 -1
  162. package/es/components/keyboard/index.d.ts +1 -1
  163. package/es/components/keyboard/src/Keyboard.vue.d.ts +1 -1
  164. package/es/components/keyboard/src/Keyboard.vue.js +1 -1
  165. package/es/components/keyboard/src/constants/index.js +1 -1
  166. package/es/components/keyboard/style/index.css +1 -1
  167. package/es/components/map/index.d.ts +2 -14
  168. package/es/components/map/src/Map.vue.d.ts +1 -14
  169. package/es/components/map/src/types/index.d.ts +19 -0
  170. package/es/components/map/src/types/index.js +1 -0
  171. package/es/components/recommend-search/index.d.ts +13 -128
  172. package/es/components/recommend-search/src/RecommendSearch.vue.d.ts +15 -130
  173. package/es/components/recommend-search/src/RecommendSearch.vue.js +1 -1
  174. package/es/components/recommend-search/src/components/BaseSearch.d.ts +84 -0
  175. package/es/components/recommend-search/src/components/BaseSearch.js +1 -0
  176. package/es/components/recommend-search/src/components/RecommendInput.vue.d.ts +3 -63
  177. package/es/components/recommend-search/src/components/RecommendInput.vue.js +1 -1
  178. package/es/components/recommend-search/src/components/RecommendMenu.vue.d.ts +1 -3
  179. package/es/components/recommend-search/src/components/RecommendMenu.vue.js +1 -1
  180. package/es/components/recommend-search/src/components/RecommendSelect.vue.d.ts +4 -62
  181. package/es/components/recommend-search/src/components/RecommendSelect.vue.js +1 -1
  182. package/es/components/recommend-search/src/constant/index.d.ts +3 -0
  183. package/es/components/recommend-search/src/constant/index.js +1 -1
  184. package/es/components/scale-view/index.d.ts +38 -224
  185. package/es/components/scale-view/index.js +1 -1
  186. package/es/components/scale-view/src/ScaleView.vue.d.ts +37 -224
  187. package/es/components/scale-view/src/ScaleView.vue.js +1 -1
  188. package/es/components/scale-view/src/components/AnswerParse.vue.d.ts +1 -43
  189. package/es/components/scale-view/src/components/AnswerParse.vue.js +1 -1
  190. package/es/components/scale-view/src/components/EvaluateCountdown.vue.d.ts +0 -42
  191. package/es/components/scale-view/src/components/EvaluateCountdown.vue.js +1 -1
  192. package/es/components/scale-view/src/components/formitem/dist/r-address.d.ts +36 -0
  193. package/es/components/scale-view/src/components/formitem/dist/r-sign.d.ts +36 -0
  194. package/es/components/scale-view/src/components/formitem/dist/standard-modal.d.ts +82 -0
  195. package/es/components/scale-view/src/components/formitem/r-address.js +1 -1
  196. package/es/components/scale-view/src/components/formitem/r-checkbox.js +1 -1
  197. package/es/components/scale-view/src/components/formitem/r-datetime.js +1 -1
  198. package/es/components/scale-view/src/components/formitem/r-map.js +1 -1
  199. package/es/components/scale-view/src/components/formitem/r-sign.js +1 -1
  200. package/es/components/scale-view/src/components/formitem/standard-modal.d.ts +8 -8
  201. package/es/components/scale-view/src/components/formitem/standard-modal.js +1 -1
  202. package/es/components/scale-view/src/components/formitem/text-over-tooltip/TextOverTooltip.vue.d.ts +1 -1
  203. package/es/components/scale-view/src/hooks/scaleview-computed.d.ts +1 -1
  204. package/es/components/scale-view/src/hooks/scaleview-computed.js +1 -1
  205. package/es/components/scale-view/src/hooks/scaleview-init.js +1 -1
  206. package/es/components/scale-view/src/hooks/scaleview-submit.d.ts +5 -1
  207. package/es/components/scale-view/src/hooks/scaleview-submit.js +1 -1
  208. package/es/components/scale-view/src/hooks/scaleview-validate.js +1 -1
  209. package/es/components/scale-view/src/hooks/use-component.d.ts +73 -3
  210. package/es/components/scale-view/src/hooks/use-evaluate.js +1 -1
  211. package/es/components/scale-view/src/hooks/use-event.js +1 -1
  212. package/es/components/scale-view/src/types/index.d.ts +7 -0
  213. package/es/components/scale-view/src/types/index.js +1 -0
  214. package/es/components/scale-view/style/index.css +1 -1
  215. package/es/components/scale-view/style/scale-view-iconfont.ttf +0 -0
  216. package/es/components/search-cascader/index.d.ts +12 -1
  217. package/es/components/search-cascader/src/SearchCascader.vue.d.ts +12 -1
  218. package/es/components/search-cascader/src/SearchCascader.vue.js +1 -1
  219. package/es/components/search-cascader/src/components/SearchMenu.d.ts +8 -1
  220. package/es/components/search-cascader/src/components/SearchMenu.js +1 -1
  221. package/es/components/search-cascader/src/components/dist/SearchMenu.d.ts +57 -0
  222. package/es/components/search-cascader/src/components/dist/SearchMenu1.d.ts +57 -0
  223. package/es/components/search-cascader/src/constants/index.d.ts +1 -0
  224. package/es/components/search-cascader/src/constants/index.js +1 -1
  225. package/es/components/select-label/src/LabelFormContent.vue.js +1 -1
  226. package/es/components/select-label/src/SelectLabel.vue2.js +1 -1
  227. package/es/components/select-label/style/index.css +1 -1
  228. package/es/components/select-person/index.d.ts +43 -10
  229. package/es/components/select-person/src/SelectPerson.vue.d.ts +29 -8
  230. package/es/components/select-person/src/SelectPerson.vue2.js +1 -1
  231. package/es/components/select-person/src/utils/index.js +1 -1
  232. package/es/components/shortcut-setter/index.d.ts +31 -16
  233. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +31 -16
  234. package/es/components/steps-wheel/src/StepsWheel.vue.js +1 -1
  235. package/es/components/steps-wheel/src/constants/index.js +1 -1
  236. package/es/components/steps-wheel/style/index.css +1 -1
  237. package/es/components/table-filter/index.d.ts +0 -1
  238. package/es/components/table-filter/index.js +1 -1
  239. package/es/components/table-filter/src/components/render-widget/components/CheckboxGroup.vue.d.ts +1 -1
  240. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +1 -1
  241. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.js +1 -1
  242. package/es/components/table-filter/src/hooks/useMixins.js +1 -1
  243. package/es/components/table-filter/src/tool/baseOptions.d.ts +0 -10
  244. package/es/components/table-filter/src/tool/baseOptions.js +1 -1
  245. package/es/components/table-filter/src/tool/generateDefOptions.d.ts +0 -7
  246. package/es/components/table-filter/src/tool/generateDefOptions.js +1 -1
  247. package/es/components/table-filter/src/types/index.d.ts +11 -76
  248. package/es/components/time-picker/src/TimePicker.vue.js +1 -1
  249. package/es/components/vod-chunk-upload/index.d.ts +73 -3
  250. package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue.d.ts +73 -3
  251. package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue.js +1 -1
  252. package/es/env.d.ts +1 -0
  253. package/es/shared/components/TextOverTooltip/TextOverTooltip.vue.d.ts +1 -1
  254. package/es/shared/components/TextOverTooltip/TextOverTooltip.vue.js +1 -1
  255. package/es/shared/{mixins → hooks}/index.d.ts +1 -0
  256. package/es/shared/{mixins → hooks}/index.js +1 -1
  257. package/es/{components/form-render/src → shared}/hooks/useAsyncQueue.d.ts +0 -14
  258. package/es/shared/hooks/useAsyncQueue.js +1 -0
  259. package/es/shared/{mixins → hooks}/useDateTime.d.ts +2 -2
  260. package/es/shared/hooks/useDateTime.js +1 -0
  261. package/es/shared/utils/anime.d.ts +1 -1
  262. package/es/shared/utils/anime.js +1 -1
  263. package/es/shared/utils/index.d.ts +3 -14
  264. package/es/shared/utils/index.js +1 -1
  265. package/es/shared/utils/vexutils.d.ts +2 -2
  266. package/es/shared/utils/vexutils.js +1 -1
  267. package/es/shared/utils/vexutilsExpand.d.ts +254 -0
  268. package/es/shared/utils/vexutilsExpand.js +1 -0
  269. package/package.json +2 -2
  270. package/es/components/form-render/src/hooks/useAsyncQueue.js +0 -1
  271. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/variableHeightRendererPlugin.js +0 -1
  272. package/es/components/recommend-search/src/components/BaseSearch.vue.d.ts +0 -143
  273. package/es/components/recommend-search/src/components/BaseSearch.vue.js +0 -1
  274. package/es/components/scale-view/src/hooks/scaleview-props.d.ts +0 -115
  275. package/es/components/scale-view/src/hooks/scaleview-props.js +0 -1
  276. package/es/components/table-filter/src/hooks/export.d.ts +0 -1
  277. package/es/components/table-filter/src/hooks/export.js +0 -1
  278. package/es/components/table-filter/src/tool/getWidgetType.d.ts +0 -1
  279. package/es/components/table-filter/src/tool/getWidgetType.js +0 -1
  280. package/es/shared/mixins/useDateTime.js +0 -1
  281. package/es/shared/utils/colorLog.d.ts +0 -31
  282. package/es/shared/utils/colorLog.js +0 -1
  283. /package/es/components/base-search/style/{iconfont.ttf → base-search-iconfont.ttf} +0 -0
  284. /package/es/components/classification/style/{iconfont.ttf → classification-iconfont.ttf} +0 -0
  285. /package/es/components/info-header/style/{iconfont.ttf → info-header-font.ttf} +0 -0
  286. /package/es/components/select-label/style/{iconfont.ttf → select-label-iconfont.ttf} +0 -0
  287. /package/es/shared/{mixins → hooks}/useTheme.d.ts +0 -0
  288. /package/es/shared/{mixins → hooks}/useTheme.js +0 -0
@@ -1 +1 @@
1
- import{mergeWith as e,isObject as o}from"lodash-es";import{HIGHEST_PRIORITY as i}from"../../constants/index.js";import{defineTablePlugin as t}from"../../hooks/useTablePlugin.js";import{IhoTableStatusHelper as s}from"../../utils/index.js";function n(){const n="defaultTablePlugin";return t({name:n,apply(t){t.configHooks.config.tap({name:n,stage:i},(o=>{const i=e({height:"100%",border:!0,showSeq:!0,columnConfig:{resizable:!0},rowConfig:{height:36,useKey:!0,isHover:!0,isCurrent:!0,keyField:"theUniqueKey"},showOverflow:"tooltip",editConfig:{trigger:"click",mode:"cell"}},o);return(s.isPositive(o.isBatchSelect)||o.selectType)&&(i.selectType=o.selectType||"checkbox"),i})),t.configHooks.mouseConfig.tap({name:n,stage:i},((e,i)=>o(i.keyboardConfig)?Object.assign({selected:!!i.keyboardConfig.isEdit},e):e))}})}export{n as defaultConfigPlugin};
1
+ import{mergeWith as e,isObject as o}from"lodash-es";import{HIGHEST_PRIORITY as i}from"../../constants/index.js";import{defineTablePlugin as t}from"../../hooks/useTablePlugin.js";import{IhoTableStatusHelper as s}from"../../utils/index.js";function n(){const n="defaultTablePlugin";return t({name:n,apply(t){t.configHooks.config.tap({name:n,stage:i},(o=>{const i=e({border:!0,showSeq:!0,columnConfig:{resizable:!0},rowConfig:{height:36,useKey:!0,isHover:!0,isCurrent:!0,keyField:"theUniqueKey"},showOverflow:"tooltip",editConfig:{trigger:"click",mode:"cell"}},o,{height:o.height?"auto":void 0});return(s.isPositive(o.isBatchSelect)||o.selectType)&&(i.selectType=o.selectType||"checkbox"),i})),t.configHooks.mouseConfig.tap({name:n,stage:i},((e,i)=>o(i.keyboardConfig)?Object.assign({selected:!!i.keyboardConfig.isEdit},e):e))}})}export{n as defaultConfigPlugin};
@@ -0,0 +1,3 @@
1
+ export const __esModule: true;
2
+ export function highLightSetPlugin(): iho_table_1.TablePlugin;
3
+ import iho_table_1 = require("../../../../../../es/components/iho-table");
@@ -0,0 +1,3 @@
1
+ export const __esModule: true;
2
+ export function filterRenderPlugin(): iho_table_1.TablePlugin;
3
+ import iho_table_1 = require("../../../../../../../es/components/iho-table");
@@ -21,7 +21,7 @@ declare const _default: import("vue").DefineComponent<{
21
21
  searchFilterText: import("vue").Ref<string>;
22
22
  close: () => void;
23
23
  OPTION_ITEM_HEIGHT: number;
24
- VIEW_CAPACITY: number;
24
+ viewCapacity: import("vue").ComputedRef<number>;
25
25
  list: import("vue").Ref<import("@vueuse/core").UseVirtualListItem<VxeTableDefines.FilterOption>[]>;
26
26
  containerProps: {
27
27
  ref: import("vue").Ref<any>;
@@ -1 +1 @@
1
- import{defineComponent as e,computed as l,inject as t,ref as a,onDeactivated as u,openBlock as o,createElementBlock as n,unref as i,Fragment as r,renderList as s,createElementVNode as v,normalizeClass as c,createBlock as d,createCommentVNode as p,createTextVNode as f,toDisplayString as m,createVNode as h,isRef as _,withCtx as y,normalizeStyle as g}from"vue";import{widthAppend as b}from"../../../../../shared/utils/index.js";import{CheckmarkOutline as k}from"@vicons/ionicons5";import{useVirtualList as C}from"@vueuse/core";import{NInput as x,NCheckbox as S,NCheckboxGroup as $,NButtonGroup as E,NButton as j}from"naive-ui";import w from"../../../../../_virtual/plugin-vue_export-helper.js";const A={class:"iho-table__filterWrapper"},I={key:0},L=["onClick"],U={class:"iho-table__filterListItem"},B={class:"iho-table__filterFooter"};var F=w(e({__name:"filter",props:{payload:{type:Object,required:!0}},setup(e){const w=e,F=l((()=>{var e,l,t;return null==(t=null==(l=null==(e=w.payload)?void 0:e.column.editRender)?void 0:l.props)?void 0:t.sortable})),O=l((()=>{var e,l,t;return null!=(t=null==(l=null==(e=w.payload)?void 0:e.column)?void 0:l.filters)?t:[]})),P=l({get:()=>O.value.reduce(((e,l)=>(l.checked&&e.push(l.value),e)),[]),set(e){if(w.payload)return O.value.forEach((l=>{w.payload.$panel.changeOption(null,e.includes(l.value),l)})),w.payload.$panel.confirmFilter(new CustomEvent("click"))}}),W=t("$xetable"),Z=l({get(){if(!W)return null;const e=W.getSortColumns().find((e=>{var l;return e.column===(null==(l=w.payload)?void 0:l.column)}));return e?e.order:null},set(e){W&&w.payload&&w.payload.$panel&&W.triggerSortEvent(new CustomEvent("click"),w.payload.column,e)}}),q=a([...P.value]),z=a("");function D(){W&&(W.reactData.filterStore.visible=!1)}u(D);const{list:H,containerProps:R,wrapperProps:G}=C(l((()=>z.value?O.value.filter((e=>`${e.label}`.includes(z.value))):O.value)),{itemHeight:32,overscan:3}),J=l((()=>!!q.value.length&&q.value.length!==O.value.length)),K=l({get:()=>q.value.length===O.value.length&&0!==O.value.length,set:e=>{q.value=e?O.value.map((e=>e.value)):[]}}),M=l((()=>({...R.style,height:b(320)})));function N(){P.value=q.value,D()}function Q(){q.value=[]}const T=[{status:"asc",text:"升序 A to Z"},{status:"desc",text:"降序 Z to A"}];return(e,l)=>(o(),n("section",A,[i(F)?(o(),n("div",I,[(o(),n(r,null,s(T,(e=>v("div",{key:e.status,class:c(["iho-table__filterButton",{"iho-table__filterButton--active":i(Z)===e.status}]),onClick:l=>{return t=e.status,Z.value=t,void D();var t}},[i(Z)===e.status?(o(),d(i(k),{key:0,class:"iho-table__sortActiveIcon"})):p("v-if",!0),f(" "+m(e.text),1)],10,L))),64))])):p("v-if",!0),i(O).length>5?(o(),d(i(x),{key:1,value:z.value,"onUpdate:value":l[0]||(l[0]=e=>z.value=e)},null,8,["value"])):p("v-if",!0),v("div",U,[h(i(S),{label:"全选",checked:i(K),"onUpdate:checked":l[1]||(l[1]=e=>_(K)?K.value=e:null),indeterminate:i(J)},null,8,["checked","indeterminate"])]),h(i($),{value:q.value,"onUpdate:value":l[3]||(l[3]=e=>q.value=e)},{default:y((()=>[v("section",{ref:i(R).ref,style:g(i(M)),onScroll:l[2]||(l[2]=(...e)=>i(R).onScroll&&i(R).onScroll(...e)),class:"iho-table__filterListWrapper"},[v("section",{style:g(i(G).style)},[(o(!0),n(r,null,s(i(H),(e=>(o(),n("div",{class:"iho-table__filterListItem",key:e.data.value},[h(i(S),{value:e.data.value,label:e.data.label},null,8,["value","label"])])))),128))],4)],36)])),_:1},8,["value"]),v("footer",B,[v("section",null,m(`已选择${q.value.length}项`),1),h(i(E),{size:"small"},{default:y((()=>[h(i(j),{onClick:Q},{default:y((()=>[f("清空")])),_:1}),h(i(j),{onClick:D},{default:y((()=>[f("取消")])),_:1}),h(i(j),{type:"primary",onClick:N},{default:y((()=>[f("确定")])),_:1})])),_:1})])]))}}),[["__file","filter.vue"]]);export{F as default};
1
+ import{defineComponent as e,computed as l,inject as t,ref as a,onDeactivated as o,openBlock as u,createElementBlock as n,unref as r,Fragment as i,renderList as s,createElementVNode as v,normalizeClass as c,createBlock as d,createCommentVNode as p,createTextVNode as f,toDisplayString as m,createVNode as h,isRef as _,withCtx as y,normalizeStyle as g}from"vue";import{widthAppend as b}from"../../../../../shared/utils/index.js";import{CheckmarkOutline as k}from"@vicons/ionicons5";import{useVirtualList as C}from"@vueuse/core";import{isNumber as x}from"lodash-es";import{NInput as S,NCheckbox as $,NCheckboxGroup as E,NButtonGroup as j,NButton as w}from"naive-ui";import A from"../../../../../_virtual/plugin-vue_export-helper.js";const I={class:"iho-table__filterWrapper"},L={key:0},U=["onClick"],B={class:"iho-table__filterListItem"},F={class:"iho-table__filterFooter"};var O=A(e({__name:"filter",props:{payload:{type:Object,required:!0}},setup(e){const A=e,O=l((()=>{var e,l,t;return null==(t=null==(l=null==(e=A.payload)?void 0:e.column.editRender)?void 0:l.props)?void 0:t.sortable})),P=l((()=>{var e,l,t;return null!=(t=null==(l=null==(e=A.payload)?void 0:e.column)?void 0:l.filters)?t:[]})),R=l({get:()=>P.value.reduce(((e,l)=>(l.checked&&e.push(l.value),e)),[]),set(e){if(A.payload)return P.value.forEach((l=>{A.payload.$panel.changeOption(null,e.includes(l.value),l)})),A.payload.$panel.confirmFilter(new CustomEvent("click"))}}),W=t("$xetable"),Z=l({get(){if(!W)return null;const e=W.getSortColumns().find((e=>{var l;return e.column===(null==(l=A.payload)?void 0:l.column)}));return e?e.order:null},set(e){W&&A.payload&&A.payload.$panel&&W.triggerSortEvent(new CustomEvent("click"),A.payload.column,e)}}),q=a([...R.value]),z=a("");function D(){W&&(W.reactData.filterStore.visible=!1)}o(D);const H=l((()=>{var e,l;if(!A.payload||!A.payload.column)return 10;const{filterCapacity:t}=null!=(l=null==(e=A.payload.column.editRender)?void 0:e.props)?l:{};return x(t)&&t>0?t:10})),{list:G,containerProps:J,wrapperProps:K}=C(l((()=>z.value?P.value.filter((e=>`${e.label}`.includes(z.value))):P.value)),{itemHeight:32,overscan:3}),M=l((()=>!!q.value.length&&q.value.length!==P.value.length)),N=l({get:()=>q.value.length===P.value.length&&0!==P.value.length,set:e=>{q.value=e?P.value.map((e=>e.value)):[]}}),Q=l((()=>({...J.style,height:b(32*H.value)})));function T(){R.value=q.value,D()}function V(){q.value=[]}const X=[{status:"asc",text:"升序 A to Z"},{status:"desc",text:"降序 Z to A"}];return(e,l)=>(u(),n("section",I,[r(O)?(u(),n("div",L,[(u(),n(i,null,s(X,(e=>v("div",{key:e.status,class:c(["iho-table__filterButton",{"iho-table__filterButton--active":r(Z)===e.status}]),onClick:l=>{return t=e.status,Z.value=t,void D();var t}},[r(Z)===e.status?(u(),d(r(k),{key:0,class:"iho-table__sortActiveIcon"})):p("v-if",!0),f(" "+m(e.text),1)],10,U))),64))])):p("v-if",!0),r(P).length>5?(u(),d(r(S),{key:1,value:z.value,"onUpdate:value":l[0]||(l[0]=e=>z.value=e)},null,8,["value"])):p("v-if",!0),v("div",B,[h(r($),{label:"全选",checked:r(N),"onUpdate:checked":l[1]||(l[1]=e=>_(N)?N.value=e:null),indeterminate:r(M)},null,8,["checked","indeterminate"])]),h(r(E),{value:q.value,"onUpdate:value":l[3]||(l[3]=e=>q.value=e)},{default:y((()=>[v("section",{ref:r(J).ref,style:g(r(Q)),onScroll:l[2]||(l[2]=(...e)=>r(J).onScroll&&r(J).onScroll(...e)),class:"iho-table__filterListWrapper"},[v("section",{style:g(r(K).style)},[(u(!0),n(i,null,s(r(G),(e=>(u(),n("div",{class:"iho-table__filterListItem",key:e.data.value},[h(r($),{value:e.data.value,label:e.data.label},null,8,["value","label"])])))),128))],4)],36)])),_:1},8,["value"]),v("footer",F,[v("section",null,m(`已选择${q.value.length}项`),1),h(r(j),{size:"small"},{default:y((()=>[h(r(w),{onClick:V},{default:y((()=>[f("清空")])),_:1}),h(r(w),{onClick:D},{default:y((()=>[f("取消")])),_:1}),h(r(w),{type:"primary",onClick:T},{default:y((()=>[f("确定")])),_:1})])),_:1})])]))}}),[["__file","filter.vue"]]);export{O as default};
@@ -1 +1 @@
1
- import{createVNode as e,nextTick as r}from"vue";import{jsonParse as t,traverse as l,arrayed as i}from"../../../../../shared/utils/index.js";import{isObject as n,first as o,isArray as s}from"lodash-es";import"../../../index.js";import{IHO_TABLE_NUMBER_STATUS as u}from"../../constants/index.js";import{IhoTableRenderHelper as a,IhoTableUtils as d}from"../../utils/index.js";import f from"./filter.vue.js";import{defineTablePlugin as p}from"../../hooks/useTablePlugin.js";function c(){const c="filterRenderPlugin";return p({name:c,vxe(r){r.renderer.mixin({filterRenderPlugin:{showFilterFooter:!1,renderFilter:(r,t)=>e(f,{payload:t},null)}})},apply(e){let f=[];e.fieldHooks.field.tap(c,(e=>{var r,l,i,f,p,c;const v=null==(r=e.editRender)?void 0:r.props;if(!n(v))return e;const m=t(v.fieldSetting||"");if(!a.hasFilter(m))return e;e.editRender={...e.editRender,props:{...null==(l=e.editRender)?void 0:l.props,sortable:e.sortable}},e.filterRender={name:"filterRenderPlugin"};let h=null!=(p=null==(f=null==(i=m.mapping)?void 0:i.mappingFiled)?void 0:f.reduce(((e,r)=>{const t=o(r.value);return n(t)&&e.push({label:t.key,value:t.value,data:t.value}),e}),[]))?p:[];return function(e){const r=["SEARCH","SELECT","RADIO","CHECKBOX"];return(e.notParticipatingSearch||"")!==u.POSITIVE&&r.includes(d.getCellType(e))&&s(e.options)&&e.options.length}(v)&&(h=null!=(c=v.options)?c:[]),e.filters=h,e.sortable?e.headerClassName=({$table:e,column:r})=>{const t=["iho-table__hideSortIcon"];return e.isSort(r)&&t.push("is--filter-active"),t}:e.headerClassName="iho-table__hideSortIcon",e})),e.fieldHooks.fieldList.tap(c,(e=>f=e)),e.fieldHooks.fieldEnd.tapPromise(c,(async(e,{$table:t})=>{var i;try{if(await r(),!t.value)return;const o=null!=(i=t.value.getColumns())?i:[],s=[];if(l(f,(e=>{o.find((r=>r.field===e.field))||s.push(e)})),!s.length)return;setTimeout((()=>{var r,l;if(null==(r=e.sortConfig)?void 0:r.multiple){const e=null!=(l=t.value.getColumns())?l:[],r=s.concat(e).reduce(((e,r)=>{var t;const l=null==(t=r.editRender)?void 0:t.props;return n(l)&&v(l.isOrder)&&e.push({field:r.field,order:l.isOrder}),e}),[]);t.value.sort(r)}else s.reverse().some((e=>{var r;const l=null==(r=e.editRender)?void 0:r.props;if(n(l)&&v(l.isOrder))return e&&t.value.sort(e.field,l.isOrder),!0}))}),100)}finally{f=[]}})),e.exposeHooks.expose.tap(c,((e,r,{$table:t})=>(Object.assign(e,{setSort(e,r){t.value&&t.value.sort(e,r)},setFilter(e,r){if(!t.value)return;const l=t.value.getColumnByField(e);if(!l||!s(l.filters))return;const n=i(r);l.filters.forEach((e=>{e.checked=n.includes(e.value)})),t.value.updateData()}}),e)))}})}function v(e){return["asc","desc",null].includes(e)}export{c as filterRenderPlugin};
1
+ import{createVNode as e,nextTick as l}from"vue";import{jsonParse as r,traverse as t,arrayed as i}from"../../../../../shared/utils/index.js";import{isObject as o}from"@vue/shared";import{isArray as n,first as s,isString as u}from"lodash-es";import"../../../index.js";import{IhoTableRenderHelper as a,isCompatibleColumn as d,parseRichContent as f}from"../../utils/index.js";import c from"./filter.vue.js";import{defineTablePlugin as p}from"../../hooks/useTablePlugin.js";function v(){const v="filterRenderPlugin";return p({name:v,vxe(l){l.renderer.mixin({filterRenderPlugin:{showFilterFooter:!1,renderFilter:(l,r)=>e(c,{payload:r,key:r.column.field},null)}})},apply(e){let c=[];e.fieldHooks.field.tap(v,((e,l,t,{$table:i})=>{var c,p,v,h,m,b,g,k;const C=null==(c=e.editRender)?void 0:c.props;if(!o(C))return e;const R=r(C.fieldSetting||"");if(!a.hasFilter(C))return e;e.editRender={...e.editRender,props:{...null==(p=e.editRender)?void 0:p.props,sortable:e.sortable}},e.filterRender={name:"filterRenderPlugin"};const x=null==(v=i.value)?void 0:v.getColumnByField(e.field),y={};x&&n(x.filters)&&x.filters.forEach((e=>{e&&(y[`${e.label}_${e.value}`]=e.checked)}));let F=null!=(b=null==(m=null==(h=R.mapping)?void 0:h.mappingFiled)?void 0:m.reduce(((e,l)=>{const r=s(l.value);return o(r)&&e.push({label:r.key,value:r.value,data:r.value}),e}),[]))?b:[];if(d(C)&&(F=null!=(g=C.options)?g:[]),e.filters=F.reduce(((e,l)=>(o(l)&&e.push({...l,checked:!!y[`${l.label}_${l.value}`]}),e)),[]),!e.filterMethod){const l=null==(k=t.treeConfig)?void 0:k.children;e.filterMethod=function({option:e,column:r,row:t}){if(l&&n(t[l])&&t[l].length)return!1;const i=t[r.field];if(!u(i))return!1;if(i===e.value||i===e.label)return!0;const{value:o,change_text:s}=f(i);return s===e.label||o===e.value}}return e.sortable?e.headerClassName=({$table:e,column:l})=>{const r=["iho-table__hideSortIcon"];return e.isSort(l)&&r.push("is--filter-active"),r}:e.headerClassName="iho-table__hideSortIcon",t.filterConfig={iconMatch:"iho-table--iconfont iho-table-icon-filter",iconNone:"iho-table--iconfont iho-table-icon-filter",...t.filterConfig},e})),e.fieldHooks.fieldList.tap(v,(e=>c=e)),e.fieldHooks.fieldEnd.tapPromise(v,(async(e,{$table:r})=>{var i;try{if(await l(),!r.value)return;const n=null!=(i=r.value.getColumns())?i:[],s=[];if(t(c,(e=>{n.find((l=>l.field===e.field))||s.push(e)})),!s.length)return;setTimeout((()=>{var l,t;if(null==(l=e.sortConfig)?void 0:l.multiple){const e=null!=(t=r.value.getColumns())?t:[],l=s.concat(e).reduce(((e,l)=>{var r;const t=null==(r=l.editRender)?void 0:r.props;return o(t)&&h(t.isOrder)&&e.push({field:l.field,order:t.isOrder}),e}),[]);r.value.sort(l)}else s.reverse().some((e=>{var l;const t=null==(l=e.editRender)?void 0:l.props;if(o(t)&&h(t.isOrder))return e&&r.value.sort(e.field,t.isOrder),!0}))}),100)}finally{c=[]}})),e.exposeHooks.expose.tap(v,((e,l,{$table:r})=>(Object.assign(e,{setSort(e,l){r.value&&r.value.sort(e,l)},setFilter(e,l){if(!r.value)return;const t=r.value.getColumnByField(e);if(!t||!n(t.filters))return;const o=i(l);t.filters.forEach((e=>{e.checked=o.includes(e.value)})),r.value.updateData()}}),e)))}})}function h(e){return["asc","desc",null].includes(e)}export{v as filterRenderPlugin};
@@ -0,0 +1 @@
1
+ export declare function highLightSetPlugin(): import("../../../../../es/components/iho-table").TablePlugin;
@@ -0,0 +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 +1 @@
1
- import*as e from"./anchorPlugin/index.js";import*as r from"./defaultConfigPlugin/index.js";import*as i from"./filterRenderPlugin/index.js";import*as n from"./keyboardEventPlugin/index.js";import*as d from"./lowCodeFieldAdaptorPlugin/index.js";import*as s from"./rendererPlugins/editableWidgets/dateRendererPlugin/index.js";import*as t from"./rendererPlugins/editableWidgets/inputRendererPlugin.js";import*as l from"./rendererPlugins/editableWidgets/numberRendererPlugin.js";import*as g from"./rendererPlugins/editableWidgets/selectRendererPlugin/index.js";import*as u from"./rendererPlugins/editableWidgets/separateRendererPlugin/index.js";import*as P from"./rendererPlugins/editableWidgets/timeRendererPlugin/index.js";import*as o from"./rendererPlugins/widgets/checkRendererPlugin.js";import*as a from"./rendererPlugins/widgets/colorRendererPlugin.js";import*as m from"./rendererPlugins/widgets/defaultRendererPlugin.js";import*as x from"./rendererPlugins/widgets/labelRendererPlugin.js";import*as p from"./rendererPlugins/widgets/pictureRendererPlugin.js";import*as f from"./rendererPlugins/widgets/seqRendererPlugin.js";import*as R from"./rendererPlugins/widgets/variableHeightRendererPlugin.js";import*as j from"./rowClickPlugin/index.js";import*as b from"./rowGroupSettingPlugin/index.js";import*as w from"./virtualTreePlugin/index.js";import{separateMetaModule as c}from"../../../../shared/utils/index.js";var W=c(Object.assign({"./anchorPlugin/index.tsx":e,"./defaultConfigPlugin/index.ts":r,"./filterRenderPlugin/index.tsx":i,"./keyboardEventPlugin/index.ts":n,"./lowCodeFieldAdaptorPlugin/index.tsx":d,"./rendererPlugins/editableWidgets/dateRendererPlugin/index.tsx":s,"./rendererPlugins/editableWidgets/inputRendererPlugin.tsx":t,"./rendererPlugins/editableWidgets/numberRendererPlugin.tsx":l,"./rendererPlugins/editableWidgets/selectRendererPlugin/index.tsx":g,"./rendererPlugins/editableWidgets/separateRendererPlugin/index.tsx":u,"./rendererPlugins/editableWidgets/timeRendererPlugin/index.tsx":P,"./rendererPlugins/widgets/checkRendererPlugin.tsx":o,"./rendererPlugins/widgets/colorRendererPlugin.tsx":a,"./rendererPlugins/widgets/defaultRendererPlugin.tsx":m,"./rendererPlugins/widgets/labelRendererPlugin.tsx":x,"./rendererPlugins/widgets/pictureRendererPlugin.tsx":p,"./rendererPlugins/widgets/seqRendererPlugin.tsx":f,"./rendererPlugins/widgets/variableHeightRendererPlugin.tsx":R,"./rowClickPlugin/index.ts":j,"./rowGroupSettingPlugin/index.ts":b,"./virtualTreePlugin/index.ts":w}));export{W as default};
1
+ import*as e from"./anchorPlugin/index.js";import*as r from"./defaultConfigPlugin/index.js";import*as i from"./filterRenderPlugin/index.js";import*as n from"./highLightSetPlugin.js";import*as s from"./keyboardEventPlugin/index.js";import*as d from"./lowCodeFieldAdaptorPlugin/index.js";import*as t from"./maxCheckSizePlugin.js";import*as l from"./rendererPlugins/editableWidgets/dateRendererPlugin/index.js";import*as g from"./rendererPlugins/editableWidgets/inputRendererPlugin.js";import*as u from"./rendererPlugins/editableWidgets/numberRendererPlugin.js";import*as o from"./rendererPlugins/editableWidgets/selectRendererPlugin/index.js";import*as P from"./rendererPlugins/editableWidgets/separateRendererPlugin/index.js";import*as a from"./rendererPlugins/editableWidgets/timeRendererPlugin/index.js";import*as m from"./rendererPlugins/widgets/checkRendererPlugin.js";import*as x from"./rendererPlugins/widgets/colorRendererPlugin.js";import*as p from"./rendererPlugins/widgets/defaultRendererPlugin.js";import*as f from"./rendererPlugins/widgets/labelRendererPlugin.js";import*as j from"./rendererPlugins/widgets/pictureRendererPlugin.js";import*as R from"./rendererPlugins/widgets/seqRendererPlugin.js";import*as b from"./rowClickPlugin/index.js";import*as w from"./rowDragPlugin/index.js";import*as c from"./rowGroupSettingPlugin/index.js";import*as h from"./varialbleHeightPlugin/index.js";import*as W from"./virtualTreePlugin/index.js";import{separateMetaModule as k}from"../../../../shared/utils/index.js";var C=k(Object.assign({"./anchorPlugin/index.tsx":e,"./defaultConfigPlugin/index.ts":r,"./filterRenderPlugin/index.tsx":i,"./highLightSetPlugin.tsx":n,"./keyboardEventPlugin/index.ts":s,"./lowCodeFieldAdaptorPlugin/index.tsx":d,"./maxCheckSizePlugin.ts":t,"./rendererPlugins/editableWidgets/dateRendererPlugin/index.tsx":l,"./rendererPlugins/editableWidgets/inputRendererPlugin.tsx":g,"./rendererPlugins/editableWidgets/numberRendererPlugin.tsx":u,"./rendererPlugins/editableWidgets/selectRendererPlugin/index.tsx":o,"./rendererPlugins/editableWidgets/separateRendererPlugin/index.tsx":P,"./rendererPlugins/editableWidgets/timeRendererPlugin/index.tsx":a,"./rendererPlugins/widgets/checkRendererPlugin.tsx":m,"./rendererPlugins/widgets/colorRendererPlugin.tsx":x,"./rendererPlugins/widgets/defaultRendererPlugin.tsx":p,"./rendererPlugins/widgets/labelRendererPlugin.tsx":f,"./rendererPlugins/widgets/pictureRendererPlugin.tsx":j,"./rendererPlugins/widgets/seqRendererPlugin.tsx":R,"./rowClickPlugin/index.ts":b,"./rowDragPlugin/index.ts":w,"./rowGroupSettingPlugin/index.ts":c,"./varialbleHeightPlugin/index.tsx":h,"./virtualTreePlugin/index.ts":W}));export{C as default};
@@ -1 +1 @@
1
- import{targetStringIncludes as e}from"../../../../../shared/utils/index.js";import{promiseTimeout as t}from"@vueuse/shared";import"../../../index.js";import{defineTablePlugin as o}from"../../hooks/useTablePlugin.js";function n(){const n="keyboardEventPlugin";return o({name:n,apply(o){o.eventHooks.onKeydown.tap(n,(async({$event:o,$table:n},r,{emits:i})=>{await t(0);const{row:a,column:l}=n.getSelectedCell()||n.getEditRecord()||{};if(!a||!l)return;const s=o.key;!e(["Arrow","Escape","Control","Shift","Alt","Meta"],s)&&await n.setEditCell(a,l),i("keyboard",{key:s,index:n.getRowIndex(a),value:a[l.field],row:a,column:l})}))}})}export{n as keyboardEventPlugin};
1
+ import{promiseTimeout as e}from"@vueuse/shared";import"../../../index.js";import{defineTablePlugin as o}from"../../hooks/useTablePlugin.js";function t(){const t="keyboardEventPlugin";return o({name:t,apply(o){o.eventHooks.onKeydown.tap(t,(async({$event:o,$table:t},n,{emits:r})=>{await e(0);const{row:i,column:a}=t.getSelectedCell()||t.getEditRecord()||{};if(!i||!a)return;r("keyboard",{key:o.key,index:t.getRowIndex(i),value:i[a.field],row:i,column:a})}))}})}export{t as keyboardEventPlugin};
@@ -1 +1 @@
1
- import{toRaw as e,h as t,inject as i,createVNode as l}from"vue";import{widthAppend as o,arrayed as n}from"../../../../../shared/utils/index.js";import{isObject as s,isFunction as d,cloneDeep as r,isString as a}from"lodash-es";import{NEllipsis as u}from"naive-ui";import f from"../../../../annotation-edit/index.js";import{HIGHEST_PRIORITY as m,IHO_TABLE_FIXED_STATUS as c,LOWEST_PRIORITY as p,WIDGET_TYPE as h,InjectionIhoTableAnnotation as b,InjectionIhoTableConfig as v}from"../../constants/index.js";import{defineTablePlugin as g}from"../../hooks/useTablePlugin.js";import{IhoTableStatusHelper as j,IhoTableUtils as R,IhoTableRenderHelper as P}from"../../utils/index.js";import{getDefaultValue as x}from"../rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.js";function S(){const S="lowCodeFieldAdaptorPlugin";return g({name:S,apply(g){g.fieldHooks.field.tap({name:S,stage:m},((m,p,g)=>{const S=m,F={className:S.bold?"iho-table__boldCell":"",field:S.columnName,showOverflow:"tooltip",visible:j.notNegative(S.isShow),minWidth:S.colWidth,sortable:j.isPositive(S.isSort),fixed:c[S.isFixed],...S,title:S.alias||S.title};return function(e,r){const m={default:r.slotFn,header:r.headerSlotFn,edit:r.editSlotFn,footer:r.footerSlotFn,...r.slots};if(d(r.checkEditStatus)){const{default:e}=m;d(e)&&(m.default=i=>r.checkEditStatus(i)?e(i):[t("span",null,x(i.row,i.column.editRender.props))])}if(!1!==r.annotation){const e=m.header;m.header=t=>function(e,t,r){const m=i(b),c=i(v),p=e.column||{},h=s(null==m?void 0:m.value)&&!1!==t.annotation,g=P.isEditableColumn(c.value,p),j=p.sortable||P.hasFilter(t.fieldSetting),R=a(r)?r:d(r)?r(e):null;return l("section",{class:"iho-table__headerWrapper"},[l("section",{style:{width:o(p.renderWidth-(h?36:20)-(j?24:0)-(g?20:0))}},[[...n(null!=R?R:l(u,{style:{maxWidth:"100%"}},{default:()=>p.title}))]]),h?l(f,{modelValue:m.value[p.field],"onUpdate:modelValue":e=>m.value[p.field]=e},null):null])}(t,r,e)}e.slots=m}(F,S),function(t,i,l){var o,n;const a=r(e(i));a.componentProps={size:"mini"===l.size?"small":l.size,...a.componentProps},t.editRender={autofocus:"input",name:R.getCellType(i),props:a},t.editRender.enabled=!Reflect.get(h,t.editRender.name),d(null==(o=t.slots)?void 0:o.default)&&(t.editRender.enabled=t.editRender.enabled&&d(null==(n=t.slots)?void 0:n.edit));if(!s(i.settingObj))return;Reflect.has(i.settingObj,"isHide")&&(t.visible=t.visible&&j.notPositive(i.settingObj.isHide))}(F,S,g),F})),g.fieldHooks.field.tap({name:S+"After",stage:p},(e=>(s(e.slots)&&Object.entries(e.slots).forEach((([t,i])=>{null==i&&Reflect.deleteProperty(e.slots,t)})),e)))}})}export{S 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 d,cloneDeep as a,isString as r}from"lodash-es";import{NEllipsis as u}from"naive-ui";import f from"../../../../annotation-edit/index.js";import{HIGHEST_PRIORITY as m,IHO_TABLE_FIXED_STATUS as c,LOWEST_PRIORITY as p,WIDGET_TYPE as h,InjectionIhoTableAnnotation as v,InjectionIhoTableConfig as b}from"../../constants/index.js";import{defineTablePlugin as g}from"../../hooks/useTablePlugin.js";import{IhoTableStatusHelper as R,IhoTableUtils as j,IhoTableRenderHelper as x}from"../../utils/index.js";import{getDefaultValue as P}from"../rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.js";function F(){const F="lowCodeFieldAdaptorPlugin";return g({name:F,apply(g){g.fieldHooks.field.tap({name:F,stage:m},((m,p,g)=>{const F=m,S={className:F.bold?"iho-table__boldCell":"",field:F.columnName,showOverflow:"tooltip",visible:R.notNegative(F.isShow),minWidth:F.colWidth,sortable:R.isPositive(F.isSort),fixed:c[F.isFixed],...F,title:F.alias||F.title};return function(e,a){const m={default:a.slotFn,header:a.headerSlotFn,edit:a.editSlotFn,footer:a.footerSlotFn,...a.slots};if(d(a.checkEditStatus)){const{default:e}=m;d(e)&&(m.default=l=>a.checkEditStatus(l)?e(l):[t("span",null,P(l.row,l.column.editRender.props))])}const c=m.header;m.header=e=>function(e,t,a){const m=l(v),c=l(b),p=e.column||{},h=n(null==m?void 0:m.value)&&!1!==t.annotation,g=x.isEditableColumn(c.value,p),R=p.sortable||x.hasFilter(t),j=r(a)?a:d(a)?a(e):null;let P=!1;if(c.value){const e=c.value.editRules&&c.value.editRules[p.field];e&&(P=o(e).some((e=>e.required)))}return i("section",{class:"iho-table__headerWrapper"},[i("section",{style:{width:s(Math.max(0,p.renderWidth-20-(P?14:0)-(h?18:0)-(R?23:0)-(g?22:0)))}},[null!=j?j:i(u,{style:{maxWidth:"100%"}},{default:()=>p.title})]),h?i(f,{modelValue:m.value[p.field],"onUpdate:modelValue":e=>m.value[p.field]=e},null):null])}(e,a,c),e.slots=m}(S,F),function(t,l,i){var o,s;const r=a(e(l));r.componentProps={size:"mini"===i.size?"small":i.size,...r.componentProps},t.editRender={autofocus:"input",name:j.getCellType(l),props:r},t.editRender.enabled=!Reflect.get(h,t.editRender.name),d(null==(o=t.slots)?void 0:o.default)&&(t.editRender.enabled=t.editRender.enabled&&d(null==(s=t.slots)?void 0:s.edit));if(!n(l.settingObj))return;Reflect.has(l.settingObj,"isHide")&&(t.visible=t.visible&&R.notPositive(l.settingObj.isHide))}(S,F,g),S})),g.fieldHooks.field.tap({name:F+"After",stage:p},(e=>(n(e.slots)&&Object.entries(e.slots).forEach((([t,l])=>{null==l&&Reflect.deleteProperty(e.slots,t)})),e)))}})}export{F as lowCodeFieldAdaptorPlugin};
@@ -0,0 +1 @@
1
+ export declare function maxCheckSizePlugin(): import("../../../../../es/components/iho-table").TablePlugin;
@@ -0,0 +1 @@
1
+ import{isNumber as e,isFunction as o}from"lodash-es";import"../../index.js";import{defineTablePlugin as n}from"../hooks/useTablePlugin.js";function t(){const t="maxCheckSizePlugin";return n({name:t,apply(n){n.configHooks.checkboxConfig.tap(t,((n,t,{$table:r})=>{if(n&&e(n.maxCheckSize)){const e=n.checkMethod,t=({row:e})=>{if(!r.value)return!0;const o=r.value.getCheckboxRecords()||[];return o.length<n.maxCheckSize||o.includes(e)};n.checkMethod=o(e)?function(o){return t(o)&&e(o)}:t,n.showHeader=!1}return n}))}})}export{t as maxCheckSizePlugin};
@@ -71,9 +71,13 @@ declare const _default: import("vue").DefineComponent<{
71
71
  [x: string]: unknown;
72
72
  };
73
73
  datePickerRef: import("vue").Ref<AnyObject | null>;
74
+ panelInstRef: import("vue").Ref<null>;
75
+ isDateTime: import("vue").ComputedRef<boolean>;
74
76
  formatRef: import("vue").ComputedRef<string>;
77
+ panelFormatRef: import("vue").ComputedRef<string | [string, string]>;
75
78
  focus: () => any;
76
79
  blur: () => any;
80
+ onUpdateShow: (show: boolean) => void;
77
81
  NDatePicker: any;
78
82
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>>;
79
83
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
@@ -1,10 +1,10 @@
1
1
  import { PropType } from 'vue';
2
2
  import { VxeTableDefines } from 'vxe-table';
3
3
  import { AnyObject } from '../../../../../../../../es/shared/types';
4
+ import { IhoTableLowCodeField } from '../../../../../../../../es/components/iho-table';
4
5
  declare const _default: import("vue").DefineComponent<{
5
6
  value: {
6
7
  type: PropType<string | number | (string | number)[]>;
7
- default: undefined;
8
8
  };
9
9
  column: {
10
10
  type: PropType<VxeTableDefines.ColumnInfo>;
@@ -18,10 +18,20 @@ declare const _default: import("vue").DefineComponent<{
18
18
  type: NumberConstructor;
19
19
  required: true;
20
20
  };
21
+ options: {
22
+ type: PropType<AnyObject[]>;
23
+ default: () => never[];
24
+ };
25
+ queryOptions: {
26
+ type: PropType<IhoTableLowCodeField.QueryOptions>;
27
+ };
28
+ placeholder: {
29
+ type: StringConstructor;
30
+ default: string;
31
+ };
21
32
  }, () => 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<{
22
33
  value: {
23
34
  type: PropType<string | number | (string | number)[]>;
24
- default: undefined;
25
35
  };
26
36
  column: {
27
37
  type: PropType<VxeTableDefines.ColumnInfo>;
@@ -35,9 +45,21 @@ declare const _default: import("vue").DefineComponent<{
35
45
  type: NumberConstructor;
36
46
  required: true;
37
47
  };
48
+ options: {
49
+ type: PropType<AnyObject[]>;
50
+ default: () => never[];
51
+ };
52
+ queryOptions: {
53
+ type: PropType<IhoTableLowCodeField.QueryOptions>;
54
+ };
55
+ placeholder: {
56
+ type: StringConstructor;
57
+ default: string;
58
+ };
38
59
  }>> & {
39
60
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
40
61
  }, {
41
- value: string | number | (string | number)[];
62
+ options: AnyObject[];
63
+ placeholder: string;
42
64
  }>;
43
65
  export default _default;
@@ -1 +1 @@
1
- import{defineComponent as e,reactive as o,createVNode as t,mergeProps as r}from"vue";import{NSelect as n}from"naive-ui";import{useIhoTableFormEvent as l}from"../../../../utils/index.js";import{useAutoFocus as i}from"../hooks/useAutoFocus.js";var a=e({name:"EditSelect",inheritAttrs:!1,components:{NSelect:n},props:{value:{type:[Array,String,Number],default:void 0},column:{type:Object,required:!0},row:{type:Object,required:!0},rowIndex:{type:Number,required:!0}},emits:["update:value"],setup(e,{attrs:a,emit:u}){const{isShow:s,setRef:d}=i(),{emitFormChangeWithParams:p}=l(e),c=o({placeholder:a.placeholder||"请选择",options:a.options});function m(o){const t=e.value;u("update:value",o),p({oldValue:t})}return c.options||(c.remote=!0,c.loading=!1,c.onSearch=async o=>{var t,r;c.loading=!0;const n={keyword:o,row:e.row,column:e.column,rowIndex:e.rowIndex};try{c.options=await(null==(t=a.queryOptions)?void 0:t.call(a,n)),c.loading=!1,(null==(r=e.row)?void 0:r[`${e.column.field}_options`])||(e.row[`${e.column.field}_options`]=c.options)}catch(o){console.log(`获取${e.column.field}_options错误`)}},c.onSearch("")),()=>t(n,r({ref:d,show:s.value,"onUpdate:show":e=>s.value=e},a,c,{value:e.value,consistentMenuWidth:!1,clearable:!0,filterable:!0,onUpdateValue:m}),null)}});export{a as default};
1
+ import{defineComponent as e,reactive as o,watch as t,createVNode as r,mergeProps as n}from"vue";import{NSelect as l}from"naive-ui";import{useIhoTableFormEvent as a}from"../../../../utils/index.js";import{useAutoFocus as u}from"../hooks/useAutoFocus.js";import{useDebounceFn as i}from"@vueuse/core";import{isFunction as s,isArray 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:"请选择"}},emits:["update:value"],setup(e,{emit:c}){const{isShow:d,setRef:m,formRef:f}=u(),{emitFormChangeWithParams:y}=a(e),h=o({options:e.options,loading:!1,remote:!1,onSearch:null}),v=i((async function(o=""){h.loading=!0;try{if(!s(e.queryOptions))return;h.options=await e.queryOptions({keyword:o,row:e.row,column:e.column,rowIndex:e.rowIndex})}catch(o){console.log(`获取${e.column.field}_options错误`)}finally{h.loading=!1}}),400);function w(o){const t=e.value;c("update:value",o),y({oldValue:t})}function b(e){var o,t;"Tab"===e.key&&f.value&&(null==(t=(o=f.value).handleKeydown)||t.call(o,{...e,key:"Enter",preventDefault:e.preventDefault.bind(e)}))}t((()=>e.options),(e=>{if(p(e)&&e.length)return h.options=e,h.remote=!1,void(h.onSearch=null);h.remote=!0,h.onSearch=v,h.onSearch()}),{immediate:!0});const g=()=>({class:"iho-table__selectOption"}),S={class:"iho-table__selectMenu"};return()=>r(l,n({ref:m,show:d.value,"onUpdate:show":e=>d.value=e,placeholder:e.placeholder},h,{value:e.value,clearable:!0,filterable:!0,nodeProps:g,menuProps:S,onUpdateValue:w,onKeydown:b}),null)}});export{c as default};
@@ -1 +1 @@
1
- import{createVNode as e,mergeProps as o}from"vue";import"../../../../../index.js";import{EDITABLE_WIDGET_TYPE as r}from"../../../../constants/index.js";import{createIhoTableClearActivedInterceptor as n,IhoTableRenderHelper as t}from"../../../../utils/index.js";import i from"./editSelect.js";import{getDefaultValue as s}from"./selectUtils.js";import{defineTablePlugin as l}from"../../../../hooks/useTablePlugin.js";function d(){return l({name:"selectRendererPlugin",vxe(l){l.interceptor.add("event.clearActived",n(r.SELECT,(e=>e.classList.contains("n-base-select-menu-option-wrapper")))),l.renderer.add(r.SELECT,{renderCell:({props:o},{row:r})=>[e("span",null,[s(r,o)])],renderEdit:t.createRenderEdit((({fieldItem:r,emitFormClick:n,row:t,column:s,$rowIndex:l})=>[e(i,o({options:r.options,queryOptions:r.queryOptions},r.componentProps,{column:s,row:t,"row-index":l,value:t[s.field],"onUpdate:value":e=>t[s.field]=e,onClick:n}),null)]))})}})}export{d as selectRendererPlugin};
1
+ import{reactive as e,inject as t,createVNode as o,mergeProps as i,onBeforeUnmount as n}from"vue";import"../../../../../index.js";import{EDITABLE_WIDGET_TYPE as l,InjectionIhoTableUUID as r}from"../../../../constants/index.js";import{createIhoTableClearActivedInterceptor as s,IhoTableRenderHelper as d,IhoTableUtils as u}from"../../../../utils/index.js";import p from"./editSelect.js";import{getDefaultValue as a}from"./selectUtils.js";import{defineTablePlugin as c}from"../../../../hooks/useTablePlugin.js";function f(){const f="selectRendererPlugin",m=e(new Map),v=e(new Map);return c({name:f,vxe(e){e.interceptor.add("event.clearActived",s(l.SELECT,(e=>e.classList.contains("iho-table__selectMenu")))),e.renderer.add(l.SELECT,{renderCell({props:e},{row:i,column:n}){const l=t(r),s=m.get(l)[n.field]||[];return[o("span",null,[a(i,e,s)])]},renderEdit:d.createRenderEdit((({fieldItem:e,emitFormClick:n,row:l,column:s,$rowIndex:d})=>{const u=t(r),a=m.get(u)[s.field]||[];return[o(p,i({queryOptions:e.queryOptions,options:a},e.componentProps,{column:s,row:l,"row-index":d,value:l[s.field],"onUpdate:value":e=>l[s.field]=e,onClick:n}),null)]}))})},apply(e){e.fieldHooks.fieldList.tap(f,((e,{uuid:t})=>(t&&(v.set(t,e),m.set(t,{})),e))),e.fieldHooks.fieldEnd.tapPromise(f,(async({uuid:e})=>{if(!e)return;const t=v.get(e),o=m.get(e);t.forEach((async e=>{var t,i;const n=null==(t=e.editRender)?void 0:t.props;if(e.field&&n&&"SELECT"===u.getCellType(n)){if(o[e.field])return;let t=n.options||[];if(n.queryOptions)try{const o={column:e,isFullData:!0};t=await(null==(i=n.queryOptions)?void 0:i.call(n,o))}catch(e){console.log(`获取${n.field}_options错误`)}o[e.field]=t}}))})),e.setupHooks.setup.tap(f,(e=>{n((()=>{e.value.uuid&&(v.delete(e.value.uuid),m.delete(e.value.uuid))}))}))}})}export{f as selectRendererPlugin};
@@ -1,2 +1,3 @@
1
+ import { AnyObject } from '../../../../../../../../es/shared/types';
1
2
  import { LowCodeTableFieldItem } from '../../../../../../../../es/components/iho-table/src/types';
2
- export declare function getDefaultValue(row: any, item: LowCodeTableFieldItem | any): any;
3
+ export declare function getDefaultValue(row: any, item: LowCodeTableFieldItem | any, options?: AnyObject[]): any;
@@ -1 +1 @@
1
- function n(n,o){const r=n[o.columnName];return Array.isArray(r)?r.map((n=>i(n))).join(","):i(r);function i(r){var i;return l=(null==(i=o.componentProps)?void 0:i.options)||o.options||n[`${o.columnName}_options`]||[],(null==(t=null==l?void 0:l.find((n=>n.value==r)))?void 0:t.label)||r||"";var l,t}}export{n as getDefaultValue};
1
+ function n(n,o,r=[]){const i=n[o.columnName];return Array.isArray(i)?i.map((n=>l(n))).join(","):l(i);function l(n){var i;return l=(null==(i=o.componentProps)?void 0:i.options)||o.options||r,(null==(t=null==l?void 0:l.find((o=>o.value==n)))?void 0:t.label)||n||"";var l,t}}export{n as getDefaultValue};
@@ -1 +1 @@
1
- import{reactive as e,inject as t,createVNode as o,toRaw as n,h as i,onBeforeUnmount as r}from"vue";import{traverse as a}from"../../../../../../../shared/utils/index.js";import{isFunction as d,isObject as s,range as l}from"lodash-es";import"../../../../../index.js";import{EDITABLE_WIDGET_TYPE as u,InjectionIhoTableUUID as c}from"../../../../constants/index.js";import{createIhoTableClearActivedInterceptor as p,IhoTableRenderHelper as f,getRowHeight as m,getColumnRenderWidth as v}from"../../../../utils/index.js";import{isSeparateColumn as h,contentSeparate as A,getColumnInfoMaxLength as E,generateSeparateRowData as g}from"./separateUtils.js";import k from"./editSeparate.vue.js";import{defineTablePlugin as x}from"../../../../hooks/useTablePlugin.js";function b(){const b="separateRendererPlugins",w=e(new Map);function P(e,t){var o;return null==(o=w.get(e))?void 0:o.get(t)}function R(e,t,o){const n=w.get(e)||new WeakMap;w.set(e,n),n.set(t,o)}const T=e(new Map);return x({name:b,vxe(e){e.interceptor.add("event.clearActived",p(u.SEPARATE,(e=>e.classList.contains("v-binder-follower-content")))),e.renderer.add(u.SEPARATE,{renderCell(e,{column:n,row:i}){const r=P(t(c),i)||{separateData:{}};return o("section",null,[r.separateData[n.field]])},renderEdit:f.createRenderEdit((({fieldItem:e,column:r,row:a,emitFormClick:l})=>{var u,p,f;const v=P(t(c),a),h=m(),A={};let E=null!=(p=null==(u=e.componentProps)?void 0:u.separateSlot)?p:e.separateSlot;return E&&(E=n(E),A.menu=d(E)?E:s(E)?e=>i(E,e):void 0),[o(k,{value:a[r.field],"onUpdate:value":e=>a[r.field]=e,"row-index":null==v?void 0:v.index,height:h,column:r,row:a,"display-content":null==(f=null==v?void 0:v.separateData)?void 0:f[r.field],onClick:l},A)]}))})},apply(e){function t(e){return(...t)=>{var o;return!(null==(o=t[0].row)?void 0:o.$__SEPARATE)&&(!d(e)||e(...t))}}e.fieldHooks.fieldList.tap(b,((e,{uuid:t})=>(t&&T.set(t,e.reduce(((e,t)=>(a(t,(t=>{h(t)&&e.push(n(t))})),e)),[])),e))),e.dataHooks.data.tapPromise(b,(async(e,t,{insertAfter:o,index:n,$table:i})=>{if(!t.uuid)return;const r=T.get(t.uuid);if(!r||!r.length)return;const a=[];for(const t of r){if(!t.field)continue;const o=await v(t,i);a.push({field:t.field,data:A(e[t.field],t,o)})}l(E(a)).forEach(((i,r)=>{const d=g(a,r);if(0===r)return R(t.uuid,e,{index:n,separateData:d}),void(e.$__SEPARATE_DATA=[d]);const s={$__SEPARATE:!0};R(t.uuid,s,{index:n,separateData:d}),e.$__SEPARATE_DATA.push(d),o(s)}))})),e.eventHooks.onResizableChange.tap(b,(async({column:e},t,o)=>{h(e)&&o.updateTableDataRef()})),e.configHooks.editConfig.tap(b,((e={},o)=>(e.beforeEditMethod=t(e.beforeEditMethod),e))),e.configHooks.checkboxConfig.tap(b,((e={},o)=>(e.checkMethod=t(e.checkMethod),e.visibleMethod=t(e.visibleMethod),e))),e.setupHooks.setup.tap(b,(e=>{r((()=>{e.value.uuid&&(w.delete(e.value.uuid),T.delete(e.value.uuid))}))}))}})}export{b as separateRendererPlugins};
1
+ import{reactive as e,inject as t,createVNode as o,toRaw as n,h as i,onBeforeUnmount as r}from"vue";import{traverse as a}from"../../../../../../../shared/utils/index.js";import{isFunction as d,isObject as s,range as l}from"lodash-es";import"../../../../../index.js";import{EDITABLE_WIDGET_TYPE as u,InjectionIhoTableUUID as c}from"../../../../constants/index.js";import{createIhoTableClearActivedInterceptor as p,IhoTableRenderHelper as f,getRowHeight as m,getColumnRenderWidth as v,parseMergeField as h}from"../../../../utils/index.js";import{isSeparateColumn as A,contentSeparate as E,getColumnInfoMaxLength as g,generateSeparateRowData as k}from"./separateUtils.js";import x from"./editSeparate.vue.js";import{defineTablePlugin as b}from"../../../../hooks/useTablePlugin.js";function w(){const w="separateRendererPlugins",P=e(new Map);function R(e,t){var o;return null==(o=P.get(e))?void 0:o.get(t)}function T(e,t,o){const n=P.get(e)||new WeakMap;P.set(e,n),n.set(t,o)}const _=e(new Map);return b({name:w,vxe(e){e.interceptor.add("event.clearActived",p(u.SEPARATE,(e=>e.classList.contains("v-binder-follower-content")))),e.renderer.add(u.SEPARATE,{renderCell(e,{column:n,row:i}){const r=R(t(c),i)||{separateData:{}};return o("section",null,[r.separateData[n.field]])},renderEdit:f.createRenderEdit((({fieldItem:e,column:r,row:a,emitFormClick:l})=>{var u,p,f;const v=R(t(c),a),h=m(),A={};let E=null!=(p=null==(u=e.componentProps)?void 0:u.separateSlot)?p:e.separateSlot;return E&&(E=n(E),A.menu=d(E)?E:s(E)?e=>i(E,e):void 0),[o(x,{value:a[r.field],"onUpdate:value":e=>a[r.field]=e,"row-index":null==v?void 0:v.index,height:h,column:r,row:a,"display-content":null==(f=null==v?void 0:v.separateData)?void 0:f[r.field],onClick:l},A)]}))})},apply(e){function t(e){return(...t)=>{var o;return!(null==(o=t[0].row)?void 0:o.$__SEPARATE)&&(!d(e)||e(...t))}}e.fieldHooks.fieldList.tap(w,((e,{uuid:t})=>(t&&_.set(t,e.reduce(((e,t)=>(a(t,(t=>{A(t)&&e.push(n(t))})),e)),[])),e))),e.dataHooks.data.tapPromise(w,(async(e,t,{insertAfter:o,index:n,$table:i})=>{if(!t.uuid)return;const r=_.get(t.uuid);if(!r||!r.length)return;const a=[];for(const t of r){if(!t.field)continue;const o=await v(t,i);a.push({field:t.field,data:E(h(e,t),t,o)})}l(g(a)).forEach(((i,r)=>{const d=k(a,r);if(0===r)return T(t.uuid,e,{index:n,separateData:d}),void(e.$__SEPARATE_DATA=[d]);const s={$__SEPARATE:!0};T(t.uuid,s,{index:n,separateData:d}),e.$__SEPARATE_DATA.push(d),o(s)}))})),e.eventHooks.onResizableChange.tap(w,(async({column:e},t,o)=>{A(e)&&o.updateTableDataRef()})),e.configHooks.editConfig.tap(w,((e={},o)=>(e.beforeEditMethod=t(e.beforeEditMethod),e))),e.configHooks.checkboxConfig.tap(w,((e={},o)=>(e.checkMethod=t(e.checkMethod),e.visibleMethod=t(e.visibleMethod),e))),e.setupHooks.setup.tap(w,(e=>{r((()=>{e.value.uuid&&(P.delete(e.value.uuid),_.delete(e.value.uuid))}))}))}})}export{w as separateRendererPlugins};
@@ -45,6 +45,7 @@ declare const _default: import("vue").DefineComponent<{
45
45
  emit: (event: "click" | "update:formattedValue", ...args: any[]) => void;
46
46
  formRef: import("vue").Ref<HTMLElement | null>;
47
47
  isShow: import("vue").Ref<boolean>;
48
+ timePickerRef: import("vue").Ref<any>;
48
49
  __formattedValue: import("vue").Ref<string | undefined>;
49
50
  oldValue: string | undefined;
50
51
  placeholder: any;
@@ -54,7 +55,7 @@ declare const _default: import("vue").DefineComponent<{
54
55
  clickShortcutOption: (item: string) => void;
55
56
  onUpdateFormattedValue: (value: string) => void;
56
57
  onBlur: () => void;
57
- onKeyUp: (event: AnyObject) => void;
58
+ onKeyUp: (event: KeyboardEvent) => void;
58
59
  NInput: any;
59
60
  NPopover: any;
60
61
  NSpace: any;
@@ -1 +1 @@
1
- import{defineComponent as e,useAttrs as t,ref as a,openBlock as o,createBlock as l,unref as r,mergeProps as u,withCtx as i,createVNode as m,isRef as n,createElementBlock as d,Fragment as f,renderList as s,createTextVNode as c,toDisplayString as p,createCommentVNode as v}from"vue";import{NPopover as _,NInput as h,NSpace as y,NScrollbar as k,NButton as V}from"naive-ui";import{useIhoTableFormEvent as w}from"../../../../utils/index.js";import{useAutoFocus as b}from"../hooks/useAutoFocus.js";import g from"../../../../../../time-picker/index.js";import{parse as C,isValid as j,format as F}from"date-fns";import x from"../../../../../../../_virtual/plugin-vue_export-helper.js";var H=x(e({__name:"editTime",props:{formattedValue:{type:String,default:void 0},column:{type:Object,required:!0},row:{type:Object,required:!0},rowIndex:{type:Number,required:!0}},emits:["update:formattedValue","click"],setup(e,{emit:x}){const H=e,q=t(),{emitFormChangeWithParams:O}=w(H),{formRef:A,isShow:M}=b(),R=a(H.formattedValue);let S=H.formattedValue;const{placeholder:T="请选择",valueFormat:U="HH:mm",shortcutOptions:z=[]}=q,B={placeholder:T,valueFormat:U,format:U||"yyyy-MM-dd HH:mm:ss"};function D(e){R.value=e,S!==e&&(x("update:formattedValue",e),O({oldValue:S}),S=e)}function I(){const e=C(H.formattedValue||"",B.valueFormat.replace(/:/,""),new Date);if(j(e)){D(F(e,B.valueFormat))}}function K(e){var t;const{keyCode:a=0}=e;13==a&&(null==(t=A.value)||t.blur(),M.value=!1)}return(t,a)=>(o(),l(r(_),u({show:r(M),trigger:"click",showArrow:!1,placement:"bottom-start",style:{padding:"0"}},t.$attrs,{onClickoutside:a[3]||(a[3]=()=>M.value=!1)}),{trigger:i((()=>[m(r(h),{ref_key:"formRef",ref:A,clearable:"",value:e.formattedValue,"onUpdate:value":a[0]||(a[0]=e=>n(formattedValue)?formattedValue.value=e:null),onClick:a[1]||(a[1]=()=>M.value=!0),onBlur:I,onKeyup:K},null,8,["value"])])),default:i((()=>[m(r(y),null,{default:i((()=>[m(r(g),u({show:"","formatted-value":R.value},r(B),{class:"iho-table__time-picker",to:!1,"onUpdate:formattedValue":D,onConfirm:a[2]||(a[2]=()=>M.value=!1)}),null,16,["formatted-value"]),m(r(k),{class:"iho-table__scrollbar"},{default:i((()=>[r(z).length?(o(),l(r(y),{key:0,vertical:"",wrap:!1},{default:i((()=>[(o(!0),d(f,null,s(r(z),(e=>(o(),l(r(V),{size:"tiny",key:e,onClick:t=>function(e){D(e),M.value=!1}(e)},{default:i((()=>[c(p(e),1)])),_:2},1032,["onClick"])))),128))])),_:1})):v("v-if",!0)])),_:1})])),_:1})])),_:1},16,["show"]))}}),[["__file","editTime.vue"]]);export{H as default};
1
+ import{defineComponent as e,useAttrs as t,ref as l,watch as a,nextTick as o,openBlock as r,createBlock as u,unref as i,mergeProps as n,withCtx as m,createVNode as f,isRef as d,createElementBlock as c,Fragment as v,renderList as s,createTextVNode as p,toDisplayString as _,createCommentVNode as k}from"vue";import{NPopover as h,NInput as y,NSpace as w,NScrollbar as V,NButton as b}from"naive-ui";import{useIhoTableFormEvent as g}from"../../../../utils/index.js";import{useAutoFocus as j}from"../hooks/useAutoFocus.js";import C from"../../../../../../time-picker/index.js";import{parse as F,isValid as q,format as x}from"date-fns";import R from"../../../../../../../_virtual/plugin-vue_export-helper.js";var S=R(e({__name:"editTime",props:{formattedValue:{type:String,default:void 0},column:{type:Object,required:!0},row:{type:Object,required:!0},rowIndex:{type:Number,required:!0}},emits:["update:formattedValue","click"],setup(e,{emit:R}){const S=e,A=t(),{emitFormChangeWithParams:I}=g(S),{formRef:O,isShow:P}=j(),$=l(),E=l(S.formattedValue);let H=S.formattedValue;const{placeholder:T="请选择",valueFormat:U="HH:mm",shortcutOptions:z=[]}=A,B={placeholder:T,valueFormat:U,format:U};function D(e){E.value=e,H!==e&&(R("update:formattedValue",e),I({oldValue:H}),H=e)}function K(){const e=F(S.formattedValue||"",B.valueFormat.replace(/:/,""),new Date);if(q(e)){D(x(e,B.valueFormat))}}function N(e){var t;const{key:l}=e;"Enter"===l&&(null==(t=O.value)||t.blur(),P.value=!1)}return a((()=>P.value),(async e=>{var t,l,a,r,u;e&&(await o(),null==(u=null==(r=null==(a=null==(l=null==(t=$.value)?void 0:t.$timePicker)?void 0:l.panelInstRef)?void 0:a.$el)?void 0:r.querySelectorAll(".n-time-picker-col"))||u.forEach((e=>{var t,l;return null==(l=null==(t=null==e?void 0:e.querySelector)?void 0:t.call(e,".n-time-picker-col__item--active"))?void 0:l.scrollIntoView()})))})),(t,l)=>(r(),u(i(h),n({show:i(P),trigger:"click",showArrow:!1,placement:"bottom-start",style:{padding:"0"}},t.$attrs,{onClickoutside:l[3]||(l[3]=()=>P.value=!1)}),{trigger:m((()=>[f(i(y),{ref_key:"formRef",ref:O,clearable:"",value:e.formattedValue,"onUpdate:value":l[0]||(l[0]=e=>d(formattedValue)?formattedValue.value=e:null),onClick:l[1]||(l[1]=()=>P.value=!0),onBlur:K,onKeyup:N},null,8,["value"])])),default:m((()=>[f(i(w),null,{default:m((()=>[f(i(C),n({ref_key:"timePickerRef",ref:$,show:"","formatted-value":E.value},i(B),{class:"iho-table__time-picker",to:!1,"onUpdate:formattedValue":D,onConfirm:l[2]||(l[2]=()=>P.value=!1)}),null,16,["formatted-value"]),f(i(V),{class:"iho-table__scrollbar"},{default:m((()=>[i(z).length?(r(),u(i(w),{key:0,vertical:"",wrap:!1},{default:m((()=>[(r(!0),c(v,null,s(i(z),(e=>(r(),u(i(b),{size:"tiny",key:e,onClick:t=>function(e){D(e),P.value=!1}(e)},{default:m((()=>[p(_(e),1)])),_:2},1032,["onClick"])))),128))])),_:1})):k("v-if",!0)])),_:1})])),_:1})])),_:1},16,["show"]))}}),[["__file","editTime.vue"]]);export{S as default};
@@ -1 +1 @@
1
- import{createVNode as n}from"vue";import{isMatchLowCodeCondition as r}from"../../../../../../shared/utils/index.js";import{isString as o,isObject as e,isArray as t}from"lodash-es";import"../../../../index.js";import{WIDGET_TYPE as i}from"../../../constants/index.js";import{IhoTableWarn as c}from"../../../utils/index.js";import{defineTablePlugin as l}from"../../../hooks/useTablePlugin.js";function d(){return l({name:"defaultRendererPlugin",vxe(l){l.renderer.add(i.DEFAULT,{renderCell(i,{row:l,column:d}){const u=l[d.field],s=function(n){return o(n)&&!!n.match(/^###\{[^{}]+}$/)}(u)?function(r){const o=t(r);return[n("div",{style:{color:o.background||o.icon}},[e(o.icon),o.change_text])];function e(r){return r?r.match(/#[\da-f]{6}|[\da-f]{3}/i)?n("i",{class:"icon-dot",style:{"--table-icon-color":r,"--table-icon-shadow":r}},null):n("i",{class:o.icon},null):null}function t(n){try{return JSON.parse(n.replace(/^###/,""))}catch(r){return c(`invalid json-content ${n}`),{}}}}(u):[u];return function(o,e,i,c){if(!t(o)||!o.length)return c;const l=o.find((n=>n.condition&&n.condition.find((n=>{const o=e[n.field_key||i.field];return r(o,n)}))));return l?n("div",{style:{color:l.color},class:l.icon},[c]):c}(function(n){var r,o,t;const i=null==(r=n.editRender)?void 0:r.props;if(!e(i))return;return null!=(t=i.colorAndIcon)?t:null==(o=i.settingObj)?void 0:o.colorAndIcon}(d),l,d,s)}}),l.renderer.add(i.STATUS,l.renderer.get(i.DEFAULT))}})}export{d as defaultRendererPlugin};
1
+ import{createVNode as n}from"vue";import{isMatchLowCodeCondition as o}from"../../../../../../shared/utils/index.js";import{isObject as r,isArray as e}from"lodash-es";import"../../../../index.js";import{WIDGET_TYPE as t}from"../../../constants/index.js";import{parseMergeField as i,isRichContent as l,parseRichContent as c}from"../../../utils/index.js";import{defineTablePlugin as d}from"../../../hooks/useTablePlugin.js";function s(){return d({name:"defaultRendererPlugin",vxe(d){d.renderer.add(t.DEFAULT,{renderCell(t,{row:d,column:s}){const u=i(d,s),a=l(u)?function(o){const r=c(o);return[n("div",{style:{color:r.background||r.icon}},[e(r.icon),r.change_text])];function e(o){return o?o.match(/#[\da-f]{6}|[\da-f]{3}/i)?n("i",{class:"icon-dot",style:{"--table-icon-color":o,"--table-icon-shadow":o}},null):n("i",{class:r.icon},null):null}}(u):[u];return function(r,t,i,l){if(!e(r)||!r.length)return l;const c=r.find((n=>n.condition&&n.condition.find((n=>{const r=t[n.field_key||i.field];return o(r,n)}))));return c?n("div",{style:{color:c.color},class:c.icon},[l]):l}(function(n){var o,e,t;const i=null==(o=n.editRender)?void 0:o.props;if(!r(i))return;return null!=(t=i.colorAndIcon)?t:null==(e=i.settingObj)?void 0:e.colorAndIcon}(s),d,s,a)}}),d.renderer.add(t.STATUS,d.renderer.get(t.DEFAULT))}})}export{s as defaultRendererPlugin};
@@ -0,0 +1,3 @@
1
+ export const __esModule: true;
2
+ export function defaultRendererPlugin(): iho_table_1.TablePlugin;
3
+ import iho_table_1 = require("../../../../../../../../es/components/iho-table");
@@ -0,0 +1,3 @@
1
+ export const __esModule: true;
2
+ export function seqRendererPlugin(): iho_table_1.TablePlugin;
3
+ import iho_table_1 = require("../../../../../../../../es/components/iho-table");
@@ -1 +1 @@
1
- import{inject as o,createVNode as e}from"vue";import{SettingsSharp as n}from"@vicons/ionicons5";import{isFunction as i}from"lodash-es";import{NIcon as t}from"naive-ui";import"../../../../index.js";import{InjectionIhoTableEmits as r}from"../../../constants/index.js";import{IhoTableStatusHelper as s}from"../../../utils/index.js";import{defineTablePlugin as l}from"../../../hooks/useTablePlugin.js";function f(){const f="seqRendererPlugin";return l({name:f,apply(l){l.fieldHooks.field.tap({name:f,before:"checkRendererPlugin"},((l,{index:m,insertBefore:u},c)=>{var d;if(0===m&&c.showSeq){const l={align:"center",fixed:"left",width:50,type:"seq",field:f,annotation:!1,slots:{header(){if(s.isPositive(c.hideSettingBtn))return[];const i=o(r);return[e(t,{style:{cursor:"pointer"},size:"14",color:"#777",component:n,onClick:function(){i&&i("settingClick")}},null)]}}};i(null==(d=c.columnConfig)?void 0:d.seqSlotFn)&&(l.slots||(l.slots={}),l.slots.default=c.columnConfig.seqSlotFn),u(l)}return l}))}})}export{f as seqRendererPlugin};
1
+ import{inject as o,createVNode as e}from"vue";import{SettingsSharp as n}from"@vicons/ionicons5";import{isFunction as i}from"lodash-es";import{NIcon as t}from"naive-ui";import"../../../../index.js";import{InjectionIhoTableEmits as r}from"../../../constants/index.js";import{IhoTableStatusHelper as s}from"../../../utils/index.js";import{defineTablePlugin as l}from"../../../hooks/useTablePlugin.js";function f(){const f="seqRendererPlugin";return l({name:f,apply(l){l.fieldHooks.field.tap({name:f,before:"checkRendererPlugin"},((l,{index:m,insertBefore:c},u)=>{var a,d;if(0===m&&u.showSeq){const l={align:"center",fixed:"left",width:50,type:"seq",field:f,annotation:!1,slots:{header(){if(s.isPositive(u.hideSettingBtn))return[];const i=o(r);return[e(t,{style:{cursor:"pointer"},size:"14",color:"#777",component:n,onClick:function(){i&&i("settingClick")}},null)]}}};i(null==(a=u.columnConfig)?void 0:a.seqSlotFn)&&(l.slots||(l.slots={}),l.slots.default=u.columnConfig.seqSlotFn),(null==(d=u.sortableConfig)?void 0:d.enable)&&(l.className="col--drag"),c(l)}return l}))}})}export{f as seqRendererPlugin};
@@ -0,0 +1 @@
1
+ export declare function rowDragPlugin(): import("../../../../../../es/components/iho-table").TablePlugin;
@@ -0,0 +1 @@
1
+ import{promiseTimeout as e}from"@vueuse/shared";import{isFunction as l,cloneDeep as o}from"lodash-es";import{nextTick as n,onBeforeUnmount as t}from"vue";import"../../../index.js";import r from"sortablejs";import{defineTablePlugin as a}from"../../hooks/useTablePlugin.js";function u(){const o="rowDragPlugin",u=new Map;return a({name:o,apply(a){a.fieldHooks.fieldEnd.tapPromise(o,(async(o,{$table:t,emits:a})=>{const{uuid:d}=o,s=o.sortableConfig||{};d&&s.enable&&!u.get(d)&&(await n(),async function n(v=0){if(v>2)return;const c=function(){var e,l,o,n,r,a,u,i,d,s;const v=null==(n=null==(o=null==(l=null==(e=t.value)?void 0:e.$el)?void 0:l.querySelector)?void 0:o.call(l,".vxe-table--body"))?void 0:n.scrollWidth,c=(null==(u=null==(a=null==(r=t.value)?void 0:r.$el)?void 0:a.querySelector)?void 0:u.call(a,".vxe-table.is--scroll-x"))?".fixed-left--wrapper>.vxe-table--body tbody":".body--wrapper>.vxe-table--body tbody";return v?null==(s=null==(d=null==(i=t.value)?void 0:i.$el)?void 0:d.querySelector)?void 0:s.call(d,c):null}();if(c){const e=r.create(c,{handle:".col--seq",...s,onEnd:e=>{var n,r,u,d,v;const c={},{oldIndex:f=0,newIndex:p=0,item:b}=e,{virtualY:m}=(null==(n=t.value)?void 0:n.getScroll())||{};if(m){const{item:e}=(null==(r=t.value)?void 0:r.getRowNode(b))||{},l=null!=(v=null!=(d=e.__currentIndex)?d:null==(u=t.value)?void 0:u.getVTRowIndex(e))?v:0,o=l+(p-f);e.__currentIndex=o,c.oldIndex=l,c.newIndex=o}const x={...e,...c,...i(e,o,t.value)};a("rowDrag",x),l(s.onEnd)&&s.onEnd(x)}});return u.set(d,e)}await e(100),n(++v)}())})),a.setupHooks.setup.tap(o,(e=>{t((()=>{var l;const o=null==(l=e.value)?void 0:l.uuid;o&&u.has(o)&&u.delete(o)}))}))}})}function i(e,l,n){var t;const r=null==(t=null==n?void 0:n.getTableData())?void 0:t.tableData,a=n.treeConfig&&n.treeConfig.transform?void 0:function(e,l){const{oldIndex:n=0,newIndex:t=0}=e,r=o(l),a=r.splice(n,1)[0];return r.splice(t,0,a),r}(e,r);return{oldData:r,newData:a}}export{u as rowDragPlugin};
@@ -1 +1 @@
1
- export declare function variableHeightRendererPlugin(): import("../../../../../../../es/components/iho-table").TablePlugin;
1
+ export declare function variableHeightRendererPlugin(): import("../../../../../../es/components/iho-table").TablePlugin;
@@ -0,0 +1 @@
1
+ import{defineComponent as e,inject as t,ref as o,computed as l,provide as n,watch as r,onMounted as a,createVNode as s,h as i,unref as u,onBeforeUnmount as d,shallowReactive as c}from"vue";import{widthAppend as p,traverse as f}from"../../../../../shared/utils/index.js";import{doAnimation as m}from"../../../../../shared/utils/anime.js";import{useThrottleFn as h}from"@vueuse/core";import{promiseTimeout as g}from"@vueuse/shared";import{isFunction as v,isNumber as x,last as I,omit as b}from"lodash-es";import"../../../index.js";import{InjectionIhoTableUUID as w,WIDGET_TYPE as y}from"../../constants/index.js";import{useUUIDMap as T}from"../../utils/index.js";import{defineTablePlugin as R}from"../../hooks/useTablePlugin.js";class H{constructor(){this.records={},this.maxRecords=c(new Map)}set(e,t,o){if(this.records[e]||(this.records[e]={}),this.records[e][t]===o)return;this.records[e][t]=o;const l=Math.max(...Object.values(this.records[e]),0);this.maxRecords.get(e)!==l&&this.maxRecords.set(e,l)}getMax(e){return this.maxRecords.get(e)||0}}const{getItemFromUUID:D,removeItemFromUUID:M}=T((()=>new H),!0),{getItemFromUUID:S,removeItemFromUUID:U,setItemFromUUID:C}=T((()=>null)),{getItemFromUUID:$,removeItemFromUUID:E,setItemFromUUID:k}=T((()=>{})),F=e({props:{payload:{type:Object,required:!0}},setup(e){const u=t(w),d=t("$xetable"),c=o(),f=D(u),m=l((()=>e.payload.row[e.payload.column.field]));function h(){const{row:t,column:o}=e.payload,l=d.getRowSeq(t);if(!f||null==l||!c.value)return;const n=c.value.clientHeight;f.set(l,o.field,n)}n("updateCellHeight",h),r([()=>e.payload.rowIndex,()=>e.payload.column.field,m,()=>e.payload.column.renderWidth],(async()=>{await g(0),h()})),a((()=>{d&&!S(u)&&C(u,d),h()}));const I=l((()=>{var t,o,l,n;const r=null!=(o=null==(t=e.payload.column.editRender)?void 0:t.props)?o:{},a=null!=(n=null==(l=r.slots)?void 0:l.default)?n:r.slotFn;return v(a)?a:()=>m.value})),b=l((()=>{if(e.payload.column.treeNode)return"";const t=e.payload.column.renderWidth;return x(t)&&t>0?p(t-20-2):""}));return()=>s("div",{ref:c,style:{padding:"7px 0",width:b.value,overflow:"hidden"}},[i(I.value,e.payload)])}});function j(e,t,{scrollTop:o=0}){var l,n;const{uuid:r,rowConfig:a={}}=t;if(!r)return;const s=D(r),{oSize:i=0,gt:d=100}=null!=(l=$(r))?l:{},{internalData:c,reactData:p}=e,{scrollYStore:f,elemStore:m,afterFullData:h,fullDataRowIdData:g}=c;if(d>h.length)return;const x=null!=(n=a.height)?n:36,b=m["main-body-wrapper"],w=b?u(b):null;let y=w?Math.max(8,Math.ceil(w.clientHeight/x)+2+i):8;const T=[0];let R=0;if(o&&h.find(((t,l)=>{const n=e.getRowSeq(t),r=(I(T)||0)+Math.max(x,s.getMax(n));if(T.push(r),r>o)return R=Math.max(0,l-i),y+=Math.min(R,i),!0})),R>0&&v(t.spanMethod)){const{spanMethod:o}=t,l={rowspan:1,colspan:1};for(;R>0;){if(!e.getColumns().some(((e,t)=>{const{rowspan:n,colspan:r}=o({column:e,columnIndex:t,$columnIndex:t,row:h[R],rowIndex:R,$rowIndex:R,_rowIndex:R,isHidden:!e.visible,fixed:e.fixed,type:e.type,visibleData:h})||l;if(0===n&&0===r)return R--,!0})))break}}const H=`${T[R]}px`,M=`${h.reduce(((t,o)=>{const l=e.getRowSeq(o);return t+Math.max(x,s.getMax(l))}),0)}px`;["main","left","right"].forEach((e=>{const t=m[`${e}-body-table`],l=t?u(t):null;l&&(l.style.marginTop=H,l.scrollTop=o),["header","body","footer"].forEach((t=>{const o=m[`${e}-${t}-ySpace`],l=o?u(o):null;l&&(l.style.height=M)}))}));const S=Math.min(h.length,R+y);if(f.startIndex===R&&f.endIndex===S)return;f.startIndex=R,f.endIndex=S;const U=h.slice(f.startIndex,f.endIndex);U.forEach(((t,o)=>{const l=e.getRowid(t),n=g[l];n&&(n.$index=o)})),p.tableData.length=0,p.tableData.push(...U)}const L=h(j,300);function Y(){const e="variableHeightRendererPlugin";return R({name:e,vxe(e){e.renderer.add(y.VARIABLE_HEIGHT,{renderCell:(e,t)=>s(F,{payload:t},null)})},apply(t){function o(e){const t=S(e.uuid);if(!t)return;e.scrollY={enabled:!1},t.reactData.scrollYLoad=!1;const o=function(e){const t=e.internalData.elemStore["main-body-wrapper"];return t?u(t):null}(t);o&&j(t,e,{scrollTop:o.scrollTop})}function l(e){if(!e.uuid)return;const t=$(e.uuid);t&&(e.scrollY=t),setTimeout((()=>o(e)),300)}t.dataHooks.dataStart.tap(e,l),t.eventHooks.onFilterChange.tap(e,((e,t)=>l(t))),t.eventHooks.onSortChange.tap(e,((e,t)=>l(t))),t.eventHooks.onToggleTreeExpand.tap(e,((e,t)=>l(t))),t.eventHooks.onResizableChange.tap(e,(async({column:e},t)=>{if(!e.editRender||!e.editRender.props)return;e.editRender.props.variableHeight&&l(t)})),t.eventHooks.onScroll.tap(e,h(((e,t)=>{if(e.isX)return;const{uuid:o}=t;if(!o)return;const l=S(o);l&&j(l,t,e)}),100,!0,!0)),t.fieldHooks.field.tap(e,(e=>{if(Reflect.get(e,"variableHeight")){const t=e.slots;e.slots=b(t,["default"]),e.editRender={...e.editRender,name:y.VARIABLE_HEIGHT};const o=e.className,l="variable-height";e.className=o?function(e){return v(o)?[o(e),l]:[o,l]}:l}return e})),t.fieldHooks.fieldList.tap(e,((e,t,{$table:l})=>(t.uuid&&f(e,((n,r)=>{var a,s,i;if((null==(a=n.editRender)?void 0:a.name)===y.VARIABLE_HEIGHT){const n=null!=(i=null==(s=t.rowConfig)?void 0:s.height)?i:36,a=D(t.uuid),d=t.cellStyle;if(t.cellStyle=function(e){const t={};if(e.column.fixed&&Reflect.get(e,"fixed")&&l.value){const o=Math.max(n,a.getMax(l.value.getRowSeq(e.row)));t.height=`${o}px`}return Object.assign(t,d?v(d)?d(e):d:null)},t.sortableConfig&&t.sortableConfig.enable){const e=t.sortableConfig.onEnd;t.sortableConfig.onEnd=function(o){const l=S(t.uuid);if(l){const{internalData:{elemStore:e}}=l,o=e["main-table-body"];o&&u(o)&&j(l,t,{scrollTop:u(o).scrollTop})}v(e)&&e(o)}}t.showOverflow="tooltip",f(e,(e=>{e.showOverflow="tooltip"})),t.scrollY={...t.scrollY,mode:"default"},t.onWheel=function(e){let t=null,o=0,l=!0;return function(n){if(!e.uuid)return;const r=S(e.uuid);if(!r)return;const{internalData:a}=r,{isHover:s}=e.rowConfig||{},{deltaX:i,deltaY:d}=n,{refTableLeftBody:c,refTableRightBody:p,refTableBody:f}=r.getRefMaps(),h=d,g=i,v=h<0,x=u(f),I=x?x.$el:null;if(!I)return;if(v?I.scrollTop<=0:I.scrollTop>=I.scrollHeight-I.clientHeight)return;const b=I.scrollTop+h,w=I.scrollLeft+g;if(b===a.lastScrollTop)return;n.preventDefault(),a.lastScrollTop=b,a.lastScrollLeft=w,a.lastScrollTime=Date.now(),s&&r.clearHoverRow();const y=c.value,T=p.value,R=y?y.$el:null,H=T?T.$el:null,D=Math.min(100,Math.abs(Math.floor(h/2)));l&&(o=I.scrollTop,l=!1),o+=D*(v?-1:1),t&&t(),t=m(I.scrollTop,o,400,(e=>{I.scrollTop=e,R&&(R.scrollTop=e),H&&(H.scrollTop=e)}),"easeOutCubic",(()=>{o=I.scrollTop,l=!0})),L(r,e,I)}}(t),setTimeout((()=>{k(t.uuid,t.scrollY),o(t)}),300),r()}})),e))),t.setupHooks.setup.tap(e,(e=>{d((()=>{e.value.uuid&&(M(e.value.uuid),U(e.value.uuid),E(e.value.uuid))}))}))}})}export{Y as variableHeightRendererPlugin};
@@ -3,6 +3,7 @@ import { LOW_CODE_VALUE_RELATION } from '../../../../../es/shared/utils';
3
3
  import { VxeTableProps, VxeTableDefines, VxeTableInstance, VxeColumnPropTypes, VxeTablePropTypes } from 'vxe-table';
4
4
  import { VxeTableListeners } from 'vxe-table/types/table';
5
5
  import { IHO_TABLE_STRING_STATUS, IhoTableEventNameTuple, IhoTableRowGroupSequence } from '../../../../../es/components/iho-table/src/constants';
6
+ import Sortable from 'sortablejs';
6
7
  export * from './pluginType';
7
8
  export interface IhoTableRowGroupItem {
8
9
  groupName?: string;
@@ -25,6 +26,12 @@ export declare type IhoTableConfig = VxeTableProps & Partial<{
25
26
  };
26
27
  checkboxConfig: Partial<VxeTableProps['checkboxConfig'] & {
27
28
  slots: VxeColumnPropTypes.Slots;
29
+ maxCheckSize: number;
30
+ }>;
31
+ sortableConfig: Partial<{
32
+ enable: boolean;
33
+ usePreset: boolean;
34
+ [K: string]: any;
28
35
  }>;
29
36
  [K: string]: unknown;
30
37
  }>;
@@ -34,18 +41,19 @@ export declare type IhoTableFieldItem = {
34
41
  annotation: boolean;
35
42
  }>;
36
43
  export declare namespace IhoTableLowCodeField {
37
- type FieldSetting = {
44
+ type FieldSetting = Partial<{
45
+ mergedFeildExpression: string;
38
46
  notParticipatingSearch: IHO_TABLE_STRING_STATUS;
39
- mapping?: {
47
+ mapping: {
40
48
  type: string;
41
49
  mappingFiled: Array<{
42
50
  value: Array<Record<'key' | 'value', string>>;
43
51
  }>;
44
52
  };
45
- };
53
+ }>;
46
54
  type ColorAndIconItem = {
47
55
  condition?: {
48
- con: LOW_CODE_VALUE_RELATION & string;
56
+ con: LOW_CODE_VALUE_RELATION;
49
57
  value: unknown;
50
58
  field_key?: string;
51
59
  }[];
@@ -58,6 +66,13 @@ export declare namespace IhoTableLowCodeField {
58
66
  colorAndIcon: ColorAndIconItem[];
59
67
  [K: string]: unknown;
60
68
  }>;
69
+ type QueryOptions = (payload: {
70
+ keyword?: string;
71
+ row?: AnyObject;
72
+ column: VxeTableDefines.ColumnInfo;
73
+ rowIndex?: number;
74
+ isFullData?: boolean;
75
+ }) => Promise<AnyObject[]>;
61
76
  }
62
77
  export declare type LowCodeTableFieldItem = {
63
78
  columnName: string;
@@ -74,6 +89,8 @@ export declare type LowCodeTableFieldItem = {
74
89
  isOrder: MaybeString<0> | VxeTablePropTypes.SortOrder;
75
90
  formType: string;
76
91
  fieldSetting: string;
92
+ filterCapacity: number;
93
+ notParticipatingSearch: 0 | 1;
77
94
  componentProps: AnyObject;
78
95
  options: {
79
96
  label?: string;
@@ -81,6 +98,7 @@ export declare type LowCodeTableFieldItem = {
81
98
  value: string;
82
99
  disabled?: boolean;
83
100
  }[];
101
+ queryOptions: IhoTableLowCodeField.QueryOptions;
84
102
  annotation: boolean;
85
103
  slotFn: NonNullable<IhoTableFieldItem['slots']>['default'];
86
104
  headerSlotFn: NonNullable<IhoTableFieldItem['slots']>['header'];
@@ -92,6 +110,7 @@ export declare type LowCodeTableFieldItem = {
92
110
  */
93
111
  checkEditStatus: (payload: VxeTableDefines.CellRenderBodyParams) => boolean | void;
94
112
  colorAndIcon: IhoTableLowCodeField.ColorAndIconItem[];
113
+ variableHeight: boolean;
95
114
  }> & Partial<VxeTableDefines.ColumnInfo>;
96
115
  export declare type IhoTableFormChangePayload = {
97
116
  column: IhoTableFieldItem;
@@ -109,7 +128,7 @@ export declare type IhoTableEventNameUnion = TupleToUnion<typeof IhoTableEventNa
109
128
  export declare type IHoTableKeyboardPayload = IhoTableFormChangePayload & {
110
129
  key: string;
111
130
  };
112
- export declare type IhoTableEmitPayload<T extends typeof IhoTableEventNameTuple[number]> = T extends 'formChange' | 'formClick' ? [IhoTableFormChangePayload] : T extends 'keyboard' ? [IHoTableKeyboardPayload] : T extends 'settingClick' ? [] : T extends keyof VxeTableListeners ? Parameters<NonNullable<VxeTableListeners[T]>> : [];
131
+ export declare type IhoTableEmitPayload<T extends typeof IhoTableEventNameTuple[number]> = T extends 'formChange' | 'formClick' ? [IhoTableFormChangePayload] : T extends 'keyboard' ? [IHoTableKeyboardPayload] : T extends 'settingClick' ? [] : T extends 'rowDrag' ? [Sortable.SortableEvent] : T extends keyof VxeTableListeners ? Parameters<NonNullable<VxeTableListeners[T]>> : [];
113
132
  export declare type IhoTableAnchorItem = {
114
133
  field: string;
115
134
  title: string;
@@ -19,6 +19,10 @@ export declare type TablePlugin = {
19
19
  vxe?(vxeTable: IhoTableInstance): void;
20
20
  apply?(hooks: TableHooks): void;
21
21
  };
22
+ export declare type IhoTableHandlerContext<isRef extends boolean = true> = {
23
+ $table: isRef extends true ? Ref<Nullable<VxeTableInstance>> : Nullable<VxeTableInstance>;
24
+ emits: IhoTableEmits;
25
+ };
22
26
  export declare type TableHooks = Readonly<{
23
27
  configHooks: AbstractConfigHooks;
24
28
  fieldHooks: AbstractFieldHooks;
@@ -29,9 +33,9 @@ export declare type TableHooks = Readonly<{
29
33
  exposeHooks: AbstractExposeHooks;
30
34
  }>;
31
35
  export declare type WithTableConfig<T = []> = T extends any[] ? [...T, IhoTableConfig] : [T, IhoTableConfig];
32
- declare type ConfigHookType<T> = SyncWaterfallHook<WithTableConfig<T>>;
36
+ declare type ConfigHookType<T> = SyncWaterfallHook<[...WithTableConfig<[T]>, IhoTableHandlerContext]>;
33
37
  export declare abstract class AbstractConfigHooks {
34
- abstract readonly config: SyncWaterfallHook<IhoTableConfig>;
38
+ abstract readonly config: SyncWaterfallHook<[IhoTableConfig, IhoTableHandlerContext]>;
35
39
  abstract readonly rowConfig: ConfigHookType<IhoTableConfig['rowConfig']>;
36
40
  abstract readonly editConfig: ConfigHookType<IhoTableConfig['editConfig']>;
37
41
  abstract readonly columnConfig: ConfigHookType<IhoTableConfig['columnConfig']>;
@@ -56,26 +60,14 @@ export interface FieldHookContext {
56
60
  insertBefore(field: ArrayAble<IhoTableFieldItem>): void;
57
61
  insertAfter(field: ArrayAble<IhoTableFieldItem>): void;
58
62
  }
59
- export declare type WithFieldHookContext<T = []> = [
60
- ...WithTableConfig<T>,
61
- {
62
- $table: Ref<Nullable<VxeTableInstance>>;
63
- emits: IhoTableEmits;
64
- }
65
- ];
63
+ export declare type WithFieldHookContext<T = []> = [...WithTableConfig<T>, IhoTableHandlerContext];
66
64
  export declare abstract class AbstractFieldHooks {
67
65
  abstract readonly fieldStart: AsyncParallelHook<WithFieldHookContext>;
68
66
  abstract readonly field: SyncWaterfallHook<WithFieldHookContext<[IhoTableFieldItem, FieldHookContext]>>;
69
67
  abstract readonly fieldList: SyncWaterfallHook<WithFieldHookContext<[IhoTableFieldItem[]]>>;
70
68
  abstract readonly fieldEnd: AsyncParallelHook<WithFieldHookContext>;
71
69
  }
72
- export declare type WithIhoEventContext<T> = [
73
- ...WithTableConfig<T>,
74
- IhoTableHandler & {
75
- $table: Nullable<VxeTableInstance>;
76
- emits: IhoTableEmits;
77
- }
78
- ];
70
+ export declare type WithIhoEventContext<T> = [...WithTableConfig<T>, IhoTableHandler & IhoTableHandlerContext<false>];
79
71
  declare type EventHookType<T extends Func> = AsyncParallelHook<WithIhoEventContext<Parameters<T>>>;
80
72
  declare type VxeEventTypes = Required<{
81
73
  readonly [K in keyof VxeTableEventProps]: EventHookType<NonNullable<VxeTableEventProps[K]>>;
@@ -155,20 +147,13 @@ export declare abstract class AbstractDataHooks {
155
147
  abstract readonly dataEnd: AsyncParallelHook<WithTableConfig>;
156
148
  }
157
149
  export declare abstract class AbstractSetupHooks {
158
- abstract readonly setup: SyncHook<[Ref<IhoTableConfig>, Ref<IhoTableFieldItem[]>]>;
150
+ abstract readonly setup: SyncHook<[Ref<IhoTableConfig>, Ref<IhoTableFieldItem[]>, IhoTableHandlerContext]>;
159
151
  }
160
152
  export declare abstract class AbstractDomInsertHooks {
161
153
  abstract readonly header: SyncWaterfallHook<[VNode[]]>;
162
154
  abstract readonly footer: SyncWaterfallHook<[VNode[]]>;
163
155
  }
164
- export declare type WithExposeHookConfig<T = []> = [
165
- ...(T extends any[] ? T : [T]),
166
- Ref<IhoTableConfig>,
167
- {
168
- $table: Ref<Nullable<VxeTableInstance>>;
169
- emits: IhoTableEmits;
170
- }
171
- ];
156
+ export declare type WithExposeHookConfig<T = []> = [...(T extends any[] ? T : [T]), Ref<IhoTableConfig>, IhoTableHandlerContext];
172
157
  export declare abstract class AbstractExposeHooks {
173
158
  abstract readonly expose: SyncWaterfallHook<WithExposeHookConfig<Record<string, Func>>>;
174
159
  }
@@ -1,4 +1,4 @@
1
- import { AnyObject, Nullable } from '../../../../../es/shared/types';
1
+ import { AnyObject, ArrayAble, Nullable } from '../../../../../es/shared/types';
2
2
  import { MaybeRef } from '@vueuse/core';
3
3
  import { VxeTableDefines, VxeTableInstance } from 'vxe-table';
4
4
  import { VxeGlobalRendererHandles } from 'vxe-table/types/v-x-e-table/renderer';
@@ -35,7 +35,7 @@ export declare const IhoTableRenderHelper: Readonly<{
35
35
  createDefaultRenderCell: typeof createDefaultRenderCell;
36
36
  createRenderEdit: typeof createRenderEdit;
37
37
  isEditableColumn(config: IhoTableConfig, column: IhoTableFieldItem): boolean | undefined;
38
- hasFilter(fieldSetting: unknown): boolean;
38
+ hasFilter(lowCodeField: LowCodeTableFieldItem): boolean;
39
39
  }>;
40
40
  export declare const IhoTableStatusHelper: Readonly<{
41
41
  isPositive(value: string | number | undefined | null): boolean;
@@ -43,9 +43,13 @@ export declare const IhoTableStatusHelper: Readonly<{
43
43
  notPositive(value: string | number | undefined | null): boolean;
44
44
  notNegative(value: string | number | undefined | null): boolean;
45
45
  }>;
46
- export declare const createIhoTableClearActivedInterceptor: (type: EDITABLE_WIDGET_TYPE, solution: (ele: HTMLElement) => boolean) => ({ $event, column }: {
46
+ export declare const createIhoTableClearActivedInterceptor: (type: ArrayAble<EDITABLE_WIDGET_TYPE>, solution: (ele: HTMLElement) => boolean) => ({ $event, column }: {
47
47
  $event: Event;
48
48
  column: VxeTableDefines.ColumnInfo;
49
49
  }) => boolean;
50
50
  export declare function isTransformTreeType(config: IhoTableConfig): boolean;
51
+ export declare function isRichContent(content: string): content is string;
52
+ export declare function parseRichContent(richContent: string): any;
53
+ export declare function parseMergeField(row: AnyObject, column: VxeTableDefines.ColumnInfo): any;
54
+ export declare function isCompatibleColumn(field: LowCodeTableFieldItem): number | false;
51
55
  export {};