cnhis-design-vue 3.1.45-beta.0 → 3.1.45-beta.1

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 (262) hide show
  1. package/es/components/base-search/src/index.vue.js +1 -1
  2. package/es/components/base-search/src/index.vue2.js +1 -0
  3. package/es/components/big-table/src/BigTable.vue.js +1 -1
  4. package/es/components/big-table/src/components/NoData.vue.js +1 -1
  5. package/es/components/big-table/src/components/NoData.vue2.js +1 -0
  6. package/es/components/big-table/src/components/edit-form/edit-separate.vue.js +1 -1
  7. package/es/components/big-table/src/components/edit-form/edit-separate.vue2.js +1 -0
  8. package/es/components/big-table/src/components/input-button.vue.js +1 -1
  9. package/es/components/big-table/src/components/input-button.vue2.js +1 -0
  10. package/es/components/big-table/src/components/separate.vue.js +1 -1
  11. package/es/components/big-table/src/components/separate.vue2.js +1 -0
  12. package/es/components/bpmn-workflow/src/BpmnWorkflow.vue.js +1 -1
  13. package/es/components/bpmn-workflow/src/BpmnWorkflow.vue2.js +1 -0
  14. package/es/components/button-print/src/ButtonPrint.vue.js +1 -1
  15. package/es/components/button-print/src/ButtonPrint.vue2.js +1 -1
  16. package/es/components/button-print/src/components/EditFormat.vue.js +1 -1
  17. package/es/components/button-print/src/components/EditFormat.vue2.js +1 -0
  18. package/es/components/button-print/src/components/IdentityVerification.vue.js +1 -1
  19. package/es/components/button-print/src/components/IdentityVerification.vue2.js +1 -0
  20. package/es/components/button-print/src/components/Preview.vue.js +1 -1
  21. package/es/components/classification/src/components/search-filter/index.vue.js +1 -1
  22. package/es/components/classification/src/components/search-filter/index.vue2.js +1 -0
  23. package/es/components/classification/src/components/set-classification/index.vue.js +1 -1
  24. package/es/components/classification/src/components/set-classification/index.vue2.js +1 -0
  25. package/es/components/classification/src/components/table-modal/index.vue.js +1 -1
  26. package/es/components/classification/src/components/table-modal/index.vue2.js +1 -0
  27. package/es/components/classification/src/index.vue.js +1 -1
  28. package/es/components/classification/src/index.vue2.js +1 -0
  29. package/es/components/date-picker/src/DatePicker.vue.js +1 -1
  30. package/es/components/date-picker/src/DatePicker.vue2.js +1 -0
  31. package/es/components/fabric-chart/src/FabricChart.vue.js +1 -1
  32. package/es/components/fabric-chart/src/FabricChart.vue2.js +1 -0
  33. package/es/components/fabric-chart/src/components/PopupTip.vue.js +1 -1
  34. package/es/components/fabric-chart/src/components/PopupTip.vue2.js +1 -0
  35. package/es/components/field-set/src/FieldSet.vue.js +1 -1
  36. package/es/components/field-set/src/FieldSet.vue2.js +1 -0
  37. package/es/components/form-config/src/FormConfig.vue.js +1 -1
  38. package/es/components/form-config/src/FormConfig.vue2.js +1 -0
  39. package/es/components/form-config/src/components/FormConfigCreator.vue.js +1 -1
  40. package/es/components/form-config/src/components/FormConfigCreator.vue2.js +1 -0
  41. package/es/components/form-config/src/components/FormConfigDragDisplay.vue.js +1 -1
  42. package/es/components/form-config/src/components/FormConfigDragDisplay.vue2.js +1 -0
  43. package/es/components/form-config/src/components/FormConfigEdit.vue.js +1 -1
  44. package/es/components/form-config/src/components/FormConfigEdit.vue2.js +1 -0
  45. package/es/components/form-config/src/components/renderer/CloseButton.vue.js +1 -1
  46. package/es/components/form-config/src/components/renderer/CloseButton.vue2.js +1 -0
  47. package/es/components/form-config/src/components/renderer/ComplexNode.vue.js +1 -1
  48. package/es/components/form-config/src/components/renderer/ComplexNode.vue2.js +1 -0
  49. package/es/components/form-config/src/components/renderer/DefaultNode.vue.js +1 -1
  50. package/es/components/form-config/src/components/renderer/DefaultNode.vue2.js +1 -0
  51. package/es/components/form-render/src/FormRender.vue.js +1 -1
  52. package/es/components/form-render/src/FormRender.vue2.js +1 -0
  53. package/es/components/form-render/src/FormRenderWrapper.vue.js +1 -1
  54. package/es/components/form-render/src/FormRenderWrapper.vue2.js +1 -0
  55. package/es/components/form-render/src/components/renderer/combination.js +1 -1
  56. package/es/components/form-render/src/components/renderer/formItem.js +1 -1
  57. package/es/components/form-render/src/components/renderer/levelSearchCascader.js +1 -1
  58. package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue.js +1 -1
  59. package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue2.js +1 -0
  60. package/es/components/form-render/src/components/renderer/remoteSearch.js +1 -1
  61. package/es/components/form-render/src/components/renderer/searchCascade.js +1 -1
  62. package/es/components/form-render/src/components/renderer/select.js +1 -1
  63. package/es/components/form-render/src/components/tooltipMessage.vue.js +1 -1
  64. package/es/components/form-render/src/components/tooltipMessage.vue2.js +1 -0
  65. package/es/components/form-render/src/hooks/useComplexOptions.js +1 -1
  66. package/es/components/guide/src/renderer.js +1 -1
  67. package/es/components/iho-select-label/src/LabelFormContent.vue.js +1 -1
  68. package/es/components/iho-select-label/src/LabelFormContent.vue2.js +1 -0
  69. package/es/components/iho-select-label/src/SelectLabel.vue.js +1 -1
  70. package/es/components/iho-select-label/src/SelectLabel.vue2.js +1 -0
  71. package/es/components/iho-select-label/src/components/label-classify.vue.js +1 -1
  72. package/es/components/iho-select-label/src/components/label-classify.vue2.js +1 -0
  73. package/es/components/iho-table/src/IhoTable.vue.js +1 -1
  74. package/es/components/iho-table/src/IhoTable.vue2.js +1 -0
  75. package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/filter.vue.js +1 -1
  76. package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/filter.vue2.js +1 -0
  77. package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue.js +1 -1
  78. package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue2.js +1 -0
  79. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.js +1 -1
  80. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue2.js +1 -0
  81. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.js +1 -1
  82. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/editSeparate.vue.js +1 -1
  83. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/editSeparate.vue2.js +1 -0
  84. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.js +1 -1
  85. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue2.js +1 -0
  86. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/pictureRendererPlugin.js +1 -1
  87. package/es/components/iho-table/src/plugins/varialbleHeightPlugin/index.js +1 -1
  88. package/es/components/iho-table/src/utils/index.js +1 -1
  89. package/es/components/index.css +1 -1
  90. package/es/components/info-header/src/InfoHeader.vue.js +1 -1
  91. package/es/components/info-header/src/InfoHeader.vue2.js +1 -0
  92. package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.js +1 -1
  93. package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue2.js +1 -0
  94. package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.js +1 -1
  95. package/es/components/info-header/src/components/infoDescription/DescriptionList.vue2.js +1 -0
  96. package/es/components/info-header/src/components/infoDescription/HiddenContent.vue.js +1 -1
  97. package/es/components/info-header/src/components/infoDescription/HiddenContent.vue2.js +1 -0
  98. package/es/components/info-header/src/components/infoDescription/InfoEllipsis.vue.js +1 -1
  99. package/es/components/info-header/src/components/infoDescription/InfoEllipsis.vue2.js +1 -0
  100. package/es/components/info-header/src/components/infoDescription/index.vue.js +1 -1
  101. package/es/components/info-header/src/components/infoDescription/index.vue2.js +1 -0
  102. package/es/components/info-header/src/components/patientInfo/index.vue.js +1 -1
  103. package/es/components/info-header/src/components/patientInfo/index.vue2.js +1 -0
  104. package/es/components/keyboard/src/Keyboard.vue.js +1 -1
  105. package/es/components/keyboard/src/Keyboard.vue2.js +1 -0
  106. package/es/components/keyboard/src/components/InputNumber.vue.js +1 -1
  107. package/es/components/keyboard/src/components/InputNumber.vue2.js +1 -0
  108. package/es/components/keyboard/src/components/NumberPanel.vue.js +1 -1
  109. package/es/components/keyboard/src/components/NumberPanel.vue2.js +1 -0
  110. package/es/components/map/src/Map.vue.js +1 -1
  111. package/es/components/map/src/Map.vue2.js +1 -0
  112. package/es/components/picture-clipper/src/PictureClipper.vue.js +1 -1
  113. package/es/components/picture-clipper/src/PictureClipper.vue2.js +1 -0
  114. package/es/components/quick-search/src/index.vue.js +1 -1
  115. package/es/components/quick-search/src/index.vue2.js +1 -0
  116. package/es/components/recommend-search/src/RecommendSearch.vue.js +1 -1
  117. package/es/components/recommend-search/src/RecommendSearch.vue2.js +1 -0
  118. package/es/components/recommend-search/src/components/RecommendInput.vue.js +1 -1
  119. package/es/components/recommend-search/src/components/RecommendInput.vue2.js +1 -0
  120. package/es/components/recommend-search/src/components/RecommendMenu.vue.js +1 -1
  121. package/es/components/recommend-search/src/components/RecommendMenu.vue2.js +1 -0
  122. package/es/components/recommend-search/src/components/RecommendSelect.vue.js +1 -1
  123. package/es/components/recommend-search/src/components/RecommendSelect.vue2.js +1 -0
  124. package/es/components/scale-view/src/ScaleView.vue.js +1 -1
  125. package/es/components/scale-view/src/ScaleView.vue2.js +1 -0
  126. package/es/components/scale-view/src/components/AnswerParse.vue.js +1 -1
  127. package/es/components/scale-view/src/components/AnswerParse.vue2.js +1 -0
  128. package/es/components/scale-view/src/components/EvaluateCountdown.vue.js +1 -1
  129. package/es/components/scale-view/src/components/EvaluateCountdown.vue2.js +1 -0
  130. package/es/components/scale-view/src/components/EvaluatePage.vue.js +1 -1
  131. package/es/components/scale-view/src/components/EvaluatePage.vue2.js +1 -0
  132. package/es/components/scale-view/src/components/LoadingCom.vue.js +1 -1
  133. package/es/components/scale-view/src/components/NoData.vue.js +1 -1
  134. package/es/components/scale-view/src/components/NoData.vue2.js +1 -0
  135. package/es/components/search-cascader/src/SearchCascader.vue.js +1 -1
  136. package/es/components/search-cascader/src/SearchCascader.vue2.js +1 -0
  137. package/es/components/search-cascader/src/components/SearchMenu.js +1 -1
  138. package/es/components/select-label/src/LabelFormContent.vue.js +1 -1
  139. package/es/components/select-label/src/LabelFormContent.vue2.js +1 -0
  140. package/es/components/select-label/src/SelectLabel.vue.js +1 -1
  141. package/es/components/select-label/src/components/label-classify.vue.js +1 -1
  142. package/es/components/select-label/src/components/label-classify.vue2.js +1 -0
  143. package/es/components/select-person/src/SearchMultiple.vue.js +1 -1
  144. package/es/components/select-person/src/SelectPerson.vue.js +1 -1
  145. package/es/components/shortcut-provider/src/ShortcutProvider.vue.js +1 -1
  146. package/es/components/shortcut-provider/src/ShortcutProvider.vue2.js +1 -0
  147. package/es/components/shortcut-setter/src/ShortcutSetter.vue.js +1 -1
  148. package/es/components/shortcut-setter/src/ShortcutSetter.vue2.js +1 -0
  149. package/es/components/shortcut-setter/src/ShortcutSetterItem.vue.js +1 -1
  150. package/es/components/shortcut-setter/src/ShortcutSetterItem.vue2.js +1 -0
  151. package/es/components/steps-wheel/src/StepsWheel.vue.js +1 -1
  152. package/es/components/steps-wheel/src/StepsWheel.vue2.js +1 -0
  153. package/es/components/steps-wheel/style/index.css +1 -1
  154. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.js +1 -1
  155. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue2.js +1 -0
  156. package/es/components/table-filter/src/components/classify-filter/components/Date.vue.js +1 -1
  157. package/es/components/table-filter/src/components/classify-filter/components/Date.vue2.js +1 -0
  158. package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue.js +1 -1
  159. package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue2.js +1 -0
  160. package/es/components/table-filter/src/components/classify-filter/components/InputFilter.vue.js +1 -1
  161. package/es/components/table-filter/src/components/classify-filter/components/InputFilter.vue2.js +1 -0
  162. package/es/components/table-filter/src/components/classify-filter/components/InputNumber.vue.js +1 -1
  163. package/es/components/table-filter/src/components/classify-filter/components/InputNumber.vue2.js +1 -0
  164. package/es/components/table-filter/src/components/classify-filter/components/InputNumberGroup.vue.js +1 -1
  165. package/es/components/table-filter/src/components/classify-filter/components/InputNumberGroup.vue2.js +1 -0
  166. package/es/components/table-filter/src/components/classify-filter/components/SelectDynamic.vue.js +1 -1
  167. package/es/components/table-filter/src/components/classify-filter/components/SelectDynamic.vue2.js +1 -0
  168. package/es/components/table-filter/src/components/classify-filter/components/SelectFilter.vue.js +1 -1
  169. package/es/components/table-filter/src/components/classify-filter/components/SelectFilter.vue2.js +1 -0
  170. package/es/components/table-filter/src/components/classify-filter/components/SelectLabel.vue.js +1 -1
  171. package/es/components/table-filter/src/components/classify-filter/components/SelectLabel.vue2.js +1 -0
  172. package/es/components/table-filter/src/components/classify-filter/index.vue.js +1 -1
  173. package/es/components/table-filter/src/components/classify-filter/index.vue2.js +1 -0
  174. package/es/components/table-filter/src/components/render-widget/components/CheckboxGroup.vue.js +1 -1
  175. package/es/components/table-filter/src/components/render-widget/components/CheckboxGroup.vue2.js +1 -0
  176. package/es/components/table-filter/src/components/render-widget/components/Date.vue.js +1 -1
  177. package/es/components/table-filter/src/components/render-widget/components/Date.vue2.js +1 -0
  178. package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue.js +1 -1
  179. package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue2.js +1 -0
  180. package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue.js +1 -1
  181. package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue2.js +1 -0
  182. package/es/components/table-filter/src/components/render-widget/components/InputNumberGroup.vue.js +1 -1
  183. package/es/components/table-filter/src/components/render-widget/components/InputNumberGroup.vue2.js +1 -0
  184. package/es/components/table-filter/src/components/render-widget/components/LabelInner.vue.js +1 -1
  185. package/es/components/table-filter/src/components/render-widget/components/LabelInner.vue2.js +1 -0
  186. package/es/components/table-filter/src/components/render-widget/components/LabelOut.vue.js +1 -1
  187. package/es/components/table-filter/src/components/render-widget/components/LabelOut.vue2.js +1 -0
  188. package/es/components/table-filter/src/components/render-widget/components/Select.vue.js +1 -1
  189. package/es/components/table-filter/src/components/render-widget/components/Select.vue2.js +1 -0
  190. package/es/components/table-filter/src/components/render-widget/index.vue.js +1 -1
  191. package/es/components/table-filter/src/directive/resize.js +1 -1
  192. package/es/components/time-line/src/TimeLine.vue.js +1 -1
  193. package/es/components/time-line/src/TimeLine.vue2.js +1 -0
  194. package/es/components/time-picker/src/TimePicker.vue.js +1 -1
  195. package/es/components/time-picker/src/TimePicker.vue2.js +1 -0
  196. package/es/components/vod-chunk-upload/src/chunk-upload-new.vue.js +1 -1
  197. package/es/components/vod-chunk-upload/src/chunk-upload-new.vue2.js +1 -0
  198. package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue.js +1 -1
  199. package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue2.js +1 -0
  200. package/es/shared/assets/img/failure.png.js +1 -1
  201. package/es/shared/assets/img/no-permission.png.js +1 -1
  202. package/es/shared/assets/img/nodata.png.js +1 -1
  203. package/es/shared/assets/img/notfound.png.js +1 -1
  204. package/es/shared/assets/img/qr.png.js +1 -1
  205. package/es/shared/assets/img/success.png.js +1 -1
  206. package/es/shared/assets/img/video.png.js +1 -1
  207. package/es/shared/assets/img/video_default_cover.png.js +1 -1
  208. package/es/shared/assets/img/xb_big.png.js +1 -1
  209. package/es/shared/assets/img/xb_small.png.js +1 -1
  210. package/es/shared/components/SelectPage/SelectPage.vue.js +1 -1
  211. package/es/shared/components/SelectPage/SelectPage.vue2.js +1 -0
  212. package/es/shared/components/SvgIcon/SvgIcon.vue.js +1 -1
  213. package/es/shared/components/SvgIcon/SvgIcon.vue2.js +1 -0
  214. package/es/shared/components/TextOverTooltip/TextOverTooltip.vue.js +1 -1
  215. package/es/shared/components/TextOverTooltip/TextOverTooltip.vue2.js +1 -0
  216. package/es/shared/components/no-data/NoData.vue.js +1 -1
  217. package/es/shared/components/no-data/NoData.vue2.js +1 -0
  218. package/es/shared/package.json.js +1 -1
  219. package/package.json +2 -2
  220. package/es/components/form-render/src/components/renderer/dist/levelSearchCascader.d.ts +0 -77
  221. package/es/components/form-render/src/components/renderer/dist/searchCascade.d.ts +0 -93
  222. package/es/components/iho-table/src/plugins/dist/highLightSetPlugin.d.ts +0 -3
  223. package/es/components/iho-table/src/plugins/filterRenderPlugin/dist/index.d.ts +0 -3
  224. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/dist/index.d.ts +0 -3
  225. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/dist/defaultRendererPlugin.d.ts +0 -3
  226. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/dist/seqRendererPlugin.d.ts +0 -3
  227. package/es/components/iho-table/src/plugins/varialbleHeightPlugin/dist/index.d.ts +0 -3
  228. package/es/components/iho-table/src/utils/dist/index.d.ts +0 -44
  229. package/es/components/scale-view/src/components/formitem/dist/r-address.d.ts +0 -36
  230. package/es/components/scale-view/src/components/formitem/dist/r-sign.d.ts +0 -36
  231. package/es/components/scale-view/src/components/formitem/dist/standard-modal.d.ts +0 -82
  232. package/es/components/search-cascader/src/components/dist/SearchMenu.d.ts +0 -57
  233. package/es/components/search-cascader/src/components/dist/SearchMenu1.d.ts +0 -57
  234. package/es/shared/assets/img/failure.d.ts +0 -2
  235. package/es/shared/assets/img/failure.js +0 -1
  236. package/es/shared/assets/img/icon-asc.d.ts +0 -2
  237. package/es/shared/assets/img/icon-asc.js +0 -1
  238. package/es/shared/assets/img/icon-desc.d.ts +0 -2
  239. package/es/shared/assets/img/icon-desc.js +0 -1
  240. package/es/shared/assets/img/no-permission.d.ts +0 -2
  241. package/es/shared/assets/img/no-permission.js +0 -1
  242. package/es/shared/assets/img/nodata.d.ts +0 -2
  243. package/es/shared/assets/img/nodata.js +0 -1
  244. package/es/shared/assets/img/notfound.d.ts +0 -2
  245. package/es/shared/assets/img/notfound.js +0 -1
  246. package/es/shared/assets/img/qr.d.ts +0 -2
  247. package/es/shared/assets/img/qr.js +0 -1
  248. package/es/shared/assets/img/success.d.ts +0 -2
  249. package/es/shared/assets/img/success.js +0 -1
  250. package/es/shared/assets/img/video.d.ts +0 -2
  251. package/es/shared/assets/img/video.js +0 -1
  252. package/es/shared/assets/img/video_default_cover.d.ts +0 -2
  253. package/es/shared/assets/img/video_default_cover.js +0 -1
  254. package/es/shared/assets/img/video_hover.d.ts +0 -2
  255. package/es/shared/assets/img/video_hover.js +0 -1
  256. package/es/shared/assets/img/video_play_hover.d.ts +0 -2
  257. package/es/shared/assets/img/video_play_hover.js +0 -1
  258. package/es/shared/assets/img/xb_big.d.ts +0 -2
  259. package/es/shared/assets/img/xb_big.js +0 -1
  260. package/es/shared/assets/img/xb_small.d.ts +0 -2
  261. package/es/shared/assets/img/xb_small.js +0 -1
  262. /package/es/_virtual/{plugin-vue_export-helper.js → _plugin-vue_export-helper.js} +0 -0
@@ -1 +1 @@
1
- import{defineComponent as e,watch as r,onBeforeUnmount as t,createVNode as n}from"vue";import{jsonParse as i,arrayed as o}from"../../../../../../shared/utils/index.js";import"../../../../index.js";import{WIDGET_TYPE as s}from"../../../constants/index.js";import{getRowHeight as l,IhoTableWarn as u}from"../../../utils/index.js";import d from"viewerjs";import"viewerjs/dist/viewer.css";import{defineTablePlugin as m}from"../../../hooks/useTablePlugin.js";function a(){return m({name:"pictureRendererPlugin",vxe(e){function r(e){return{renderCell(r,{row:t,column:s}){try{if(!t[s.field])return[];const r=i(t[s.field]),u=l()-16;return[n("section",{style:"display:flex;justify-content:center"},[n(p,{style:{width:u+"px",height:u+"px",...e},images:o(r).map((e=>e.url))},null)])]}catch(e){return u(`invalid ${r.name} value of field(${s.field}): ${t[s.field]}`),[]}}}}e.renderer.add(s.PICTURE,r({})),e.renderer.add(s.HEADPORTRAIT,r({"border-radius":"50%"}))}})}const p=e({name:"ViewerImage",props:{images:{type:Array,default:()=>[]},options:{type:Object,default:()=>({})}},setup(e){let i=null;function o(){if(i)return i.show();const r=document.createElement("section");e.images.map((e=>r.appendChild(function(e){const r=new Image;return r.src=e,r}(e)))),i=new d(r,e.options).show()}return r([()=>e.images,()=>e.options],(()=>{null==i||i.destroy(),i=null}),{deep:!0}),t((()=>null==i?void 0:i.destroy())),()=>n("img",{style:"cursor:pointer",alt:"",src:e.images[0],onClick:o},null)}});export{a as pictureRendererPlugin};
1
+ import{createVNode as e,defineComponent as r,watch as t,onBeforeUnmount as n}from"vue";import{jsonParse as i,arrayed as o}from"../../../../../../shared/utils/index.js";import"../../../../index.js";import{WIDGET_TYPE as s}from"../../../constants/index.js";import{getRowHeight as l,IhoTableWarn as u}from"../../../utils/index.js";import d from"viewerjs";import"viewerjs/dist/viewer.css";import{defineTablePlugin as m}from"../../../hooks/useTablePlugin.js";function a(){return m({name:"pictureRendererPlugin",vxe(r){function t(r){return{renderCell(t,{row:n,column:s}){try{if(!n[s.field])return[];const t=i(n[s.field]),u=l()-16;return[e("section",{style:"display:flex;justify-content:center"},[e(p,{style:{width:u+"px",height:u+"px",...r},images:o(t).map((e=>e.url))},null)])]}catch(e){return u(`invalid ${t.name} value of field(${s.field}): ${n[s.field]}`),[]}}}}r.renderer.add(s.PICTURE,t({})),r.renderer.add(s.HEADPORTRAIT,t({"border-radius":"50%"}))}})}const p=r({name:"ViewerImage",props:{images:{type:Array,default:()=>[]},options:{type:Object,default:()=>({})}},setup(r){let i=null;function o(){if(i)return i.show();const e=document.createElement("section");r.images.map((r=>e.appendChild(function(e){const r=new Image;return r.src=e,r}(r)))),i=new d(e,r.options).show()}return t([()=>r.images,()=>r.options],(()=>{null==i||i.destroy(),i=null}),{deep:!0}),n((()=>null==i?void 0:i.destroy())),()=>e("img",{style:"cursor:pointer",alt:"",src:r.images[0],onClick:o},null)}});export{a as pictureRendererPlugin};
@@ -1 +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 H}from"../../hooks/useTablePlugin.js";class R{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 R),!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 H=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 H=Math.max(0,l-i),y+=Math.min(H,i),!0})),H>0&&v(t.spanMethod)){const{spanMethod:o}=t,l={rowspan:1,colspan:1};for(;H>0;){if(!e.getColumns().some(((e,t)=>{const{rowspan:n,colspan:r}=o({column:e,columnIndex:t,$columnIndex:t,row:h[H],rowIndex:H,$rowIndex:H,_rowIndex:H,isHidden:!e.visible,fixed:e.fixed,type:e.type,visibleData:h})||l;if(0===n&&0===r)return H--,!0})))break}}const R=`${T[H]}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=R,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,H+y);if(f.startIndex===H&&f.endIndex===S)return;f.startIndex=H,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 H({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(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,H=y?y.$el:null,R=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,H&&(H.scrollTop=e),R&&(R.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};
1
+ import{unref as e,createVNode as t,onBeforeUnmount as o,shallowReactive as l,defineComponent as n,inject as r,ref as a,computed as s,provide as i,watch as u,onMounted as d,h as c}from"vue";import{traverse as p,widthAppend as f}from"../../../../../shared/utils/index.js";import{doAnimation as m}from"../../../../../shared/utils/anime.js";import{useThrottleFn as h}from"@vueuse/core";import{promiseTimeout as g}from"@vueuse/shared";import{last as v,isFunction as x,omit as I,isNumber as b}from"lodash-es";import"../../../index.js";import{WIDGET_TYPE as w,InjectionIhoTableUUID as y}from"../../constants/index.js";import{useUUIDMap as T}from"../../utils/index.js";import{defineTablePlugin as H}from"../../hooks/useTablePlugin.js";class R{constructor(){this.records={},this.maxRecords=l(new Map)}set(e,t,o){if(this.records[e]||(this.records[e]={}),this.records[e][t]===o)return;this.records[e][t]=o;const l=Math.max(...Object.values(this.records[e]),0);this.maxRecords.get(e)!==l&&this.maxRecords.set(e,l)}getMax(e){return this.maxRecords.get(e)||0}}const{getItemFromUUID:D,removeItemFromUUID:M}=T((()=>new R),!0),{getItemFromUUID:S,removeItemFromUUID:U,setItemFromUUID:C}=T((()=>null)),{getItemFromUUID:$,removeItemFromUUID:E,setItemFromUUID:k}=T((()=>{})),F=n({props:{payload:{type:Object,required:!0}},setup(e){const o=r(y),l=r("$xetable"),n=a(),p=D(o),m=s((()=>e.payload.row[e.payload.column.field]));function h(){const{row:t,column:o}=e.payload,r=l.getRowSeq(t);if(!p||null==r||!n.value)return;const a=n.value.clientHeight;p.set(r,o.field,a)}i("updateCellHeight",h),u([()=>e.payload.rowIndex,()=>e.payload.column.field,m,()=>e.payload.column.renderWidth],(async()=>{await g(0),h()})),d((()=>{l&&!S(o)&&C(o,l),h()}));const v=s((()=>{var t,o,l,n;const r=null!=(o=null==(t=e.payload.column.editRender)?void 0:t.props)?o:{},a=null!=(n=null==(l=r.slots)?void 0:l.default)?n:r.slotFn;return x(a)?a:()=>m.value})),I=s((()=>{if(e.payload.column.treeNode)return"";const t=e.payload.column.renderWidth;return b(t)&&t>0?f(t-20-2):""}));return()=>t("div",{ref:n,style:{padding:"7px 0",width:I.value,overflow:"hidden"}},[c(v.value,e.payload)])}});function j(t,o,{scrollTop:l=0}){var n,r;const{uuid:a,rowConfig:s={}}=o;if(!a)return;const i=D(a),{oSize:u=0,gt:d=100}=null!=(n=$(a))?n:{},{internalData:c,reactData:p}=t,{scrollYStore:f,elemStore:m,afterFullData:h,fullDataRowIdData:g}=c;if(d>h.length)return;const I=null!=(r=s.height)?r:36,b=m["main-body-wrapper"],w=b?e(b):null;let y=w?Math.max(8,Math.ceil(w.clientHeight/I)+2+u):8;const T=[0];let H=0;if(l&&h.find(((e,o)=>{const n=t.getRowSeq(e),r=(v(T)||0)+Math.max(I,i.getMax(n));if(T.push(r),r>l)return H=Math.max(0,o-u),y+=Math.min(H,u),!0})),H>0&&x(o.spanMethod)){const{spanMethod:e}=o,l={rowspan:1,colspan:1};for(;H>0;){if(!t.getColumns().some(((t,o)=>{const{rowspan:n,colspan:r}=e({column:t,columnIndex:o,$columnIndex:o,row:h[H],rowIndex:H,$rowIndex:H,_rowIndex:H,isHidden:!t.visible,fixed:t.fixed,type:t.type,visibleData:h})||l;if(0===n&&0===r)return H--,!0})))break}}const R=`${T[H]}px`,M=`${h.reduce(((e,o)=>{const l=t.getRowSeq(o);return e+Math.max(I,i.getMax(l))}),0)}px`;["main","left","right"].forEach((t=>{const o=m[`${t}-body-table`],n=o?e(o):null;n&&(n.style.marginTop=R,n.scrollTop=l),["header","body","footer"].forEach((o=>{const l=m[`${t}-${o}-ySpace`],n=l?e(l):null;n&&(n.style.height=M)}))}));const S=Math.min(h.length,H+y);if(f.startIndex===H&&f.endIndex===S)return;f.startIndex=H,f.endIndex=S;const U=h.slice(f.startIndex,f.endIndex);U.forEach(((e,o)=>{const l=t.getRowid(e),n=g[l];n&&(n.$index=o)})),p.tableData.length=0,p.tableData.push(...U)}const L=h(j,300);function Y(){const l="variableHeightRendererPlugin";return H({name:l,vxe(e){e.renderer.add(w.VARIABLE_HEIGHT,{renderCell:(e,o)=>t(F,{payload:o},null)})},apply(t){function n(t){const o=S(t.uuid);if(!o)return;t.scrollY={enabled:!1},o.reactData.scrollYLoad=!1;const l=function(t){const o=t.internalData.elemStore["main-body-wrapper"];return o?e(o):null}(o);l&&j(o,t,{scrollTop:l.scrollTop})}function r(e){if(!e.uuid)return;const t=$(e.uuid);t&&(e.scrollY=t),setTimeout((()=>n(e)),300)}t.dataHooks.dataStart.tap(l,r),t.eventHooks.onFilterChange.tap(l,((e,t)=>r(t))),t.eventHooks.onSortChange.tap(l,((e,t)=>r(t))),t.eventHooks.onToggleTreeExpand.tap(l,((e,t)=>r(t))),t.eventHooks.onResizableChange.tap(l,(async({column:e},t)=>{if(!e.editRender||!e.editRender.props)return;e.editRender.props.variableHeight&&r(t)})),t.eventHooks.onScroll.tap(l,h(((e,t)=>{if(e.isX)return;const{uuid:o}=t;if(!o)return;const l=S(o);l&&j(l,t,e)}),100,!0,!0)),t.fieldHooks.field.tap(l,(e=>{if(Reflect.get(e,"variableHeight")){const t=e.slots;e.slots=I(t,["default"]),e.editRender={...e.editRender,name:w.VARIABLE_HEIGHT};const o=e.className,l="variable-height";e.className=o?function(e){return x(o)?[o(e),l]:[o,l]}:l}return e})),t.fieldHooks.fieldList.tap(l,((t,o,{$table:l})=>(o.uuid&&p(t,((r,a)=>{var s,i,u;if((null==(s=r.editRender)?void 0:s.name)===w.VARIABLE_HEIGHT){const r=null!=(u=null==(i=o.rowConfig)?void 0:i.height)?u:36,s=D(o.uuid),d=o.cellStyle;if(o.cellStyle=function(e){const t={};if(l.value){const o=Math.max(r,s.getMax(l.value.getRowSeq(e.row)));t.height=`${o}px`}return Object.assign(t,d?x(d)?d(e):d:null)},o.sortableConfig&&o.sortableConfig.enable){const t=o.sortableConfig.onEnd;o.sortableConfig.onEnd=function(l){const n=S(o.uuid);if(n){const{internalData:{elemStore:t}}=n,l=t["main-table-body"];l&&e(l)&&j(n,o,{scrollTop:e(l).scrollTop})}x(t)&&t(l)}}o.showOverflow="tooltip",p(t,(e=>{e.showOverflow="tooltip"})),o.scrollY={...o.scrollY,mode:"default"},o.onWheel=function(t){let o=null,l=0,n=!0;return function(r){if(!t.uuid)return;const a=S(t.uuid);if(!a)return;const{internalData:s}=a,{isHover:i}=t.rowConfig||{},{deltaX:u,deltaY:d}=r,{refTableLeftBody:c,refTableRightBody:p,refTableBody:f}=a.getRefMaps(),h=d,g=u,v=h<0,x=e(f),I=x?x.$el:null;if(!I)return;if(v?I.scrollTop<=0:I.scrollTop>=I.scrollHeight-I.clientHeight)return;const b=I.scrollTop+h,w=I.scrollLeft+g;if(b===s.lastScrollTop)return;r.preventDefault(),s.lastScrollTop=b,s.lastScrollLeft=w,s.lastScrollTime=Date.now(),i&&a.clearHoverRow();const y=c.value,T=p.value,H=y?y.$el:null,R=T?T.$el:null,D=Math.min(100,Math.abs(Math.floor(h/2)));n&&(l=I.scrollTop,n=!1),l+=D*(v?-1:1),o&&o(),o=m(I.scrollTop,l,400,(e=>{I.scrollTop=e,H&&(H.scrollTop=e),R&&(R.scrollTop=e)}),"easeOutCubic",(()=>{l=I.scrollTop,n=!0})),L(a,t,I)}}(o),setTimeout((()=>{k(o.uuid,o.scrollY),n(o)}),300),a()}})),t))),t.setupHooks.setup.tap(l,(e=>{o((()=>{e.value.uuid&&(M(e.value.uuid),U(e.value.uuid),E(e.value.uuid))}))}))}})}export{Y as variableHeightRendererPlugin};
@@ -1 +1 @@
1
- import{reactive as e,inject as n,unref as t,toRaw as r,createVNode as i}from"vue";import{jsonParse as o,arrayed as u,findAncestor as l}from"../../../../shared/utils/index.js";import{promiseTimeout as c}from"@vueuse/shared";import{isNumber as a,cloneDeep as d,isString as s,isObject as f,isArray as m}from"lodash-es";import{InjectionIhoTableEmits as p,InjectionIhoTableConfig as v,IHO_TABLE_STRING_STATUS as g,IHO_TABLE_NUMBER_STATUS as E,IHO_TABLE_TREE_TYPE as I}from"../constants/index.js";function h(e){return console.warn(`[IhoTable]: ${e}`)}const T=Object.freeze({getCellType(e){var n;return((null==(n=e.settingObj)?void 0:n.attr)||e.formType||"DEFAULT").toUpperCase()}});function C(){var e,t,r;const i=n(v);return i||h("this function(getRowHeight) only can be used in setup environment"),null!=(r=null==(t=null==(e=null==i?void 0:i.value)?void 0:e.rowConfig)?void 0:t.height)?r:32}function R(e){const n=e.slice(2);return`${n[0].toLowerCase()}${n.slice(1)}`}function S(e){return`on${e[0].toUpperCase()}${e.slice(1)}`}function w(n,t=!0){const r=t?e(new Map):new Map;return{getItemFromUUID:function(e){return r.set(e,r.get(e)||n()).get(e)},setItemFromUUID:function(e,n){r.set(e,n)},removeItemFromUUID:function(e){r.delete(e)}}}async function O(e,n){return r()||await c(0),r()||function(){const n=+e.colWidth;return a(n)?n:64}();function r(){var r,i;return null==(i=null==(r=t(n))?void 0:r.getColumnByField(e.field))?void 0:i.renderWidth}}function F(e){const t=n(p);function i(){var n;return{value:e.row[e.column.field],row:e.row,column:{...e.column,...null==(n=e.column.editRender)?void 0:n.props},index:e.rowIndex>-1?e.rowIndex:e.$rowIndex}}function o(e={}){t("formChange",{...i(),...d(r(e))})}function u(e={}){t("formClick",{...i(),...d(r(e))})}return{emitFormChange:function(){o()},emitFormClick:function(){u()},emitFormChangeWithParams:o,emitFormClickWithParams:u}}const P=Object.freeze({createDefaultRenderCell:function(){return function(e,{row:n,column:t}){return[i("span",null,[n[t.field]])]}},createRenderEdit:function(e){return function({props:n},t){return e({...t,fieldItem:n||{},...F(t)})}},isEditableColumn(e,n){var t;return!1!==(null==(t=e.editConfig)?void 0:t.showIcon)&&n.editRender&&!1!==n.editRender.enabled},hasFilter(e){if(y(e))return!0;let n=e.fieldSetting;return s(n)&&(n=o(n||"")),f(n)&&((t=n).notParticipatingSearch!==g.POSITIVE&&"manual"===(null==(r=t.mapping)?void 0:r.type));var t,r},hasDateFiler(e){var n;return null==(n=null==e?void 0:e.filterSetting)?void 0:n.daterange}}),A=Object.freeze({isPositive:e=>e===E.POSITIVE||e===g.POSITIVE,isNegative:e=>e===E.NEGATIVE||e===g.NEGATIVE,notPositive:e=>e!==E.POSITIVE&&e!==g.POSITIVE,notNegative:e=>e!==E.NEGATIVE&&e!==g.NEGATIVE}),N=(e,n)=>({$event:t,column:r})=>{var i;if(!u(e).includes(null==(i=r.editRender)?void 0:i.name))return!0;const o=null==t?void 0:t.target;return!f(o)||!l(o,n)};function V(e){return[I.TRANSFORM_WITH_SPAN_METHOD,I.TRANSFORM_TREE_TYPE].includes(`${e.isTree}`)}function $(e){return s(e)&&!!e.match(/^###\{[^{}]+}$/)}function x(e){try{return JSON.parse(e.replace(/^###/,""))}catch(e){return{}}}function U(e,n){if(e.$__SEPARATE||!n.editRender||!n.editRender.props)return e[n.field];const{fieldSetting:t}=n.editRender.props;if(!s(t))return e[n.field];const{mergedFeildExpression:r}=o(t);return r&&s(r)?r.replace(/#{(.+?)}/g,(function(n,t){let r=t?e[t.trim()]:null;$(r)&&(r=x(r).change_text);return r||(null==r?"--":r)})):e[n.field]}const b=["SEARCH","SELECT","RADIO","CHECKBOX"];function y(e){return e.notParticipatingSearch===E.NEGATIVE&&b.includes(T.getCellType(e))&&m(e.options)&&e.options.length}export{P as IhoTableRenderHelper,A as IhoTableStatusHelper,T as IhoTableUtils,h as IhoTableWarn,N as createIhoTableClearActivedInterceptor,R as eventListener2EventName,S as eventName2EventListener,O as getColumnRenderWidth,C as getRowHeight,y as isCompatibleColumn,$ as isRichContent,V as isTransformTreeType,U as parseMergeField,x as parseRichContent,F as useIhoTableFormEvent,w as useUUIDMap};
1
+ import{reactive as e,inject as n,unref as t,toRaw as r,createVNode as i}from"vue";import{jsonParse as o,arrayed as u,findAncestor as l}from"../../../../shared/utils/index.js";import{promiseTimeout as c}from"@vueuse/shared";import{isNumber as a,isString as d,isObject as s,isArray as f,cloneDeep as m}from"lodash-es";import{InjectionIhoTableConfig as p,InjectionIhoTableEmits as v,IHO_TABLE_STRING_STATUS as g,IHO_TABLE_NUMBER_STATUS as E,IHO_TABLE_TREE_TYPE as I}from"../constants/index.js";function h(e){return console.warn(`[IhoTable]: ${e}`)}const T=Object.freeze({getCellType(e){var n;return((null==(n=e.settingObj)?void 0:n.attr)||e.formType||"DEFAULT").toUpperCase()}});function C(){var e,t,r;const i=n(p);return i||h("this function(getRowHeight) only can be used in setup environment"),null!=(r=null==(t=null==(e=null==i?void 0:i.value)?void 0:e.rowConfig)?void 0:t.height)?r:32}function R(e){const n=e.slice(2);return`${n[0].toLowerCase()}${n.slice(1)}`}function S(e){return`on${e[0].toUpperCase()}${e.slice(1)}`}function w(n,t=!0){const r=t?e(new Map):new Map;return{getItemFromUUID:function(e){return r.set(e,r.get(e)||n()).get(e)},setItemFromUUID:function(e,n){r.set(e,n)},removeItemFromUUID:function(e){r.delete(e)}}}async function O(e,n){return r()||await c(0),r()||function(){const n=+e.colWidth;return a(n)?n:64}();function r(){var r,i;return null==(i=null==(r=t(n))?void 0:r.getColumnByField(e.field))?void 0:i.renderWidth}}function F(e){const t=n(v);function i(){var n;return{value:e.row[e.column.field],row:e.row,column:{...e.column,...null==(n=e.column.editRender)?void 0:n.props},index:e.rowIndex>-1?e.rowIndex:e.$rowIndex}}function o(e={}){t("formChange",{...i(),...m(r(e))})}function u(e={}){t("formClick",{...i(),...m(r(e))})}return{emitFormChange:function(){o()},emitFormClick:function(){u()},emitFormChangeWithParams:o,emitFormClickWithParams:u}}const P=Object.freeze({createDefaultRenderCell:function(){return function(e,{row:n,column:t}){return[i("span",null,[n[t.field]])]}},createRenderEdit:function(e){return function({props:n},t){return e({...t,fieldItem:n||{},...F(t)})}},isEditableColumn(e,n){var t;return!1!==(null==(t=e.editConfig)?void 0:t.showIcon)&&n.editRender&&!1!==n.editRender.enabled},hasFilter(e){if(y(e))return!0;let n=e.fieldSetting;return d(n)&&(n=o(n||"")),s(n)&&((t=n).notParticipatingSearch!==g.POSITIVE&&"manual"===(null==(r=t.mapping)?void 0:r.type));var t,r},hasDateFiler(e){var n;return null==(n=null==e?void 0:e.filterSetting)?void 0:n.daterange}}),A=Object.freeze({isPositive:e=>e===E.POSITIVE||e===g.POSITIVE,isNegative:e=>e===E.NEGATIVE||e===g.NEGATIVE,notPositive:e=>e!==E.POSITIVE&&e!==g.POSITIVE,notNegative:e=>e!==E.NEGATIVE&&e!==g.NEGATIVE}),N=(e,n)=>({$event:t,column:r})=>{var i;if(!u(e).includes(null==(i=r.editRender)?void 0:i.name))return!0;const o=null==t?void 0:t.target;return!s(o)||!l(o,n)};function V(e){return[I.TRANSFORM_WITH_SPAN_METHOD,I.TRANSFORM_TREE_TYPE].includes(`${e.isTree}`)}function $(e){return d(e)&&!!e.match(/^###\{[^{}]+}$/)}function x(e){try{return JSON.parse(e.replace(/^###/,""))}catch(e){return{}}}function U(e,n){if(e.$__SEPARATE||!n.editRender||!n.editRender.props)return e[n.field];const{fieldSetting:t}=n.editRender.props;if(!d(t))return e[n.field];const{mergedFeildExpression:r}=o(t);return r&&d(r)?r.replace(/#{(.+?)}/g,(function(n,t){let r=t?e[t.trim()]:null;$(r)&&(r=x(r).change_text);return r||(null==r?"--":r)})):e[n.field]}const b=["SEARCH","SELECT","RADIO","CHECKBOX"];function y(e){return e.notParticipatingSearch===E.NEGATIVE&&b.includes(T.getCellType(e))&&f(e.options)&&e.options.length}export{P as IhoTableRenderHelper,A as IhoTableStatusHelper,T as IhoTableUtils,h as IhoTableWarn,N as createIhoTableClearActivedInterceptor,R as eventListener2EventName,S as eventName2EventListener,O as getColumnRenderWidth,C as getRowHeight,y as isCompatibleColumn,$ as isRichContent,V as isTransformTreeType,U as parseMergeField,x as parseRichContent,F as useIhoTableFormEvent,w as useUUIDMap};