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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (356) hide show
  1. package/README.md +87 -87
  2. package/es/components/annotation-edit/src/AnnotationEdit.js +1 -1
  3. package/es/components/base-search/src/index.vue.js +1 -1
  4. package/es/components/base-search/src/index.vue2.js +1 -0
  5. package/es/components/big-table/src/BigTable.vue.js +1 -1
  6. package/es/components/big-table/src/components/NoData.vue.js +1 -1
  7. package/es/components/big-table/src/components/NoData.vue2.js +1 -0
  8. package/es/components/big-table/src/components/edit-form/edit-separate.vue.js +1 -1
  9. package/es/components/big-table/src/components/edit-form/edit-separate.vue2.js +1 -0
  10. package/es/components/big-table/src/components/input-button.vue.js +1 -1
  11. package/es/components/big-table/src/components/input-button.vue2.js +1 -0
  12. package/es/components/big-table/src/components/separate.vue.js +1 -1
  13. package/es/components/big-table/src/components/separate.vue2.js +1 -0
  14. package/es/components/bpmn-workflow/src/BpmnWorkflow.vue.js +1 -1
  15. package/es/components/bpmn-workflow/src/BpmnWorkflow.vue2.js +1 -0
  16. package/es/components/button-print/src/ButtonPrint.vue.js +1 -1
  17. package/es/components/button-print/src/ButtonPrint.vue2.js +1 -1
  18. package/es/components/button-print/src/components/EditFormat.vue.js +1 -1
  19. package/es/components/button-print/src/components/EditFormat.vue2.js +1 -0
  20. package/es/components/button-print/src/components/IdentityVerification.vue.js +1 -1
  21. package/es/components/button-print/src/components/IdentityVerification.vue2.js +1 -0
  22. package/es/components/button-print/src/components/Preview.vue.js +1 -1
  23. package/es/components/classification/src/components/search-filter/index.vue.js +1 -1
  24. package/es/components/classification/src/components/search-filter/index.vue2.js +1 -0
  25. package/es/components/classification/src/components/set-classification/index.vue.js +1 -1
  26. package/es/components/classification/src/components/set-classification/index.vue2.js +1 -0
  27. package/es/components/classification/src/components/table-modal/index.vue.js +1 -1
  28. package/es/components/classification/src/components/table-modal/index.vue2.js +1 -0
  29. package/es/components/classification/src/index.vue.js +1 -1
  30. package/es/components/classification/src/index.vue2.js +1 -0
  31. package/es/components/date-picker/src/DatePicker.vue.js +1 -1
  32. package/es/components/date-picker/src/DatePicker.vue2.js +1 -0
  33. package/es/components/fabric-chart/index.d.ts +40 -5
  34. package/es/components/fabric-chart/src/FabricChart.vue.d.ts +40 -5
  35. package/es/components/fabric-chart/src/FabricChart.vue.js +1 -1
  36. package/es/components/fabric-chart/src/FabricChart.vue2.js +1 -0
  37. package/es/components/fabric-chart/src/components/PopupTip.vue.js +1 -1
  38. package/es/components/fabric-chart/src/components/PopupTip.vue2.js +1 -0
  39. package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +1 -1
  40. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/index.d.ts +2 -0
  41. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/index.js +1 -0
  42. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.d.ts +4 -0
  43. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.js +1 -0
  44. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.d.ts +20 -0
  45. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js +1 -1
  46. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useTop.d.ts +4 -0
  47. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useTop.js +1 -0
  48. package/es/components/fabric-chart/src/hooks/temperature/useLeft.js +1 -1
  49. package/es/components/fabric-chart/src/hooks/temperature/useRight.js +1 -1
  50. package/es/components/fabric-chart/src/hooks/temperature/useTop.js +1 -1
  51. package/es/components/fabric-chart/src/hooks/useDraw.d.ts +1 -1
  52. package/es/components/fabric-chart/src/hooks/useDraw.js +1 -1
  53. package/es/components/fabric-chart/src/hooks/useGrid.d.ts +1 -1
  54. package/es/components/fabric-chart/src/hooks/useGrid.js +1 -1
  55. package/es/components/fabric-chart/src/interface.d.ts +13 -0
  56. package/es/components/fabric-chart/src/utils/index.d.ts +2 -1
  57. package/es/components/fabric-chart/src/utils/index.js +1 -1
  58. package/es/components/field-set/index.d.ts +157 -38
  59. package/es/components/field-set/src/FieldSet.vue.d.ts +160 -23
  60. package/es/components/field-set/src/FieldSet.vue.js +1 -1
  61. package/es/components/field-set/src/FieldSet.vue2.js +1 -0
  62. package/es/components/field-set/src/components/Row.vue.d.ts +132 -0
  63. package/es/components/field-set/src/components/Row.vue.js +1 -0
  64. package/es/components/field-set/src/components/Row.vue2.js +1 -0
  65. package/es/components/field-set/src/types/index.d.ts +1 -0
  66. package/es/components/field-set/src/utils/index.d.ts +7 -0
  67. package/es/components/field-set/src/utils/index.js +1 -0
  68. package/es/components/field-set/style/index.css +1 -1
  69. package/es/components/form-config/index.d.ts +3534 -21
  70. package/es/components/form-config/src/FormConfig.vue.d.ts +3534 -21
  71. package/es/components/form-config/src/FormConfig.vue.js +1 -1
  72. package/es/components/form-config/src/FormConfig.vue2.js +1 -0
  73. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +31 -4
  74. package/es/components/form-config/src/components/FormConfigCreator.vue.js +1 -1
  75. package/es/components/form-config/src/components/FormConfigCreator.vue2.js +1 -0
  76. package/es/components/form-config/src/components/FormConfigDragDisplay.vue.js +1 -1
  77. package/es/components/form-config/src/components/FormConfigDragDisplay.vue2.js +1 -0
  78. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +33 -4
  79. package/es/components/form-config/src/components/FormConfigEdit.vue.js +1 -1
  80. package/es/components/form-config/src/components/FormConfigEdit.vue2.js +1 -0
  81. package/es/components/form-config/src/components/FormConfigMaterialItem.d.ts +11 -1
  82. package/es/components/form-config/src/components/FormConfigMaterialItem.js +1 -1
  83. package/es/components/form-config/src/components/renderer/CloseButton.vue.js +1 -1
  84. package/es/components/form-config/src/components/renderer/CloseButton.vue2.js +1 -0
  85. package/es/components/form-config/src/components/renderer/ComplexNode.vue.js +1 -1
  86. package/es/components/form-config/src/components/renderer/ComplexNode.vue2.js +1 -0
  87. package/es/components/form-config/src/components/renderer/DefaultNode.vue.d.ts +2 -0
  88. package/es/components/form-config/src/components/renderer/DefaultNode.vue.js +1 -1
  89. package/es/components/form-config/src/components/renderer/DefaultNode.vue2.js +1 -0
  90. package/es/components/form-config/src/constants/index.d.ts +1 -0
  91. package/es/components/form-config/src/constants/index.js +1 -1
  92. package/es/components/form-config/src/hooks/useSortalbeConfig.js +1 -1
  93. package/es/components/form-config/src/types/index.d.ts +2 -0
  94. package/es/components/form-config/style/index.css +1 -1
  95. package/es/components/form-render/index.d.ts +31 -4
  96. package/es/components/form-render/src/FormRender.vue.d.ts +31 -4
  97. package/es/components/form-render/src/FormRender.vue.js +1 -1
  98. package/es/components/form-render/src/FormRender.vue2.js +1 -0
  99. package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +31 -4
  100. package/es/components/form-render/src/FormRenderWrapper.vue.js +1 -1
  101. package/es/components/form-render/src/FormRenderWrapper.vue2.js +1 -0
  102. package/es/components/form-render/src/components/renderer/combination.d.ts +5 -5
  103. package/es/components/form-render/src/components/renderer/combination.js +1 -1
  104. package/es/components/form-render/src/components/renderer/formItem.js +1 -1
  105. package/es/components/form-render/src/components/renderer/jsonCombination/index.d.ts +5 -5
  106. package/es/components/form-render/src/components/renderer/jsonCombination/index.js +1 -1
  107. package/es/components/form-render/src/components/renderer/levelSearchCascader.js +1 -1
  108. package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue.js +1 -1
  109. package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue2.js +1 -0
  110. package/es/components/form-render/src/components/renderer/remoteSearch.js +1 -1
  111. package/es/components/form-render/src/components/renderer/searchCascade.js +1 -1
  112. package/es/components/form-render/src/components/renderer/select.js +1 -1
  113. package/es/components/form-render/src/components/tooltipMessage.vue.js +1 -1
  114. package/es/components/form-render/src/components/tooltipMessage.vue2.js +1 -0
  115. package/es/components/form-render/src/constants/index.d.ts +2 -0
  116. package/es/components/form-render/src/constants/index.js +1 -1
  117. package/es/components/form-render/src/hooks/useComplexOptions.js +1 -1
  118. package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
  119. package/es/components/form-render/src/hooks/useFormAsyncQueue.d.ts +1 -1
  120. package/es/components/form-render/src/hooks/useFormAsyncQueue.js +1 -1
  121. package/es/components/form-render/src/hooks/useFormContext.js +1 -1
  122. package/es/components/form-render/src/hooks/useFormRenderLifeCycle.d.ts +3 -1
  123. package/es/components/form-render/src/hooks/useFormRenderOptions.d.ts +1 -1
  124. package/es/components/form-render/src/hooks/useFormRenderOptions.js +1 -1
  125. package/es/components/form-render/src/hooks/useNuiThemeOverrides.js +1 -1
  126. package/es/components/form-render/src/types/index.d.ts +2 -0
  127. package/es/components/guide/src/renderer.js +1 -1
  128. package/es/components/iho-select-label/src/LabelFormContent.vue.js +1 -1
  129. package/es/components/iho-select-label/src/LabelFormContent.vue2.js +1 -0
  130. package/es/components/iho-select-label/src/SelectLabel.vue.js +1 -1
  131. package/es/components/iho-select-label/src/SelectLabel.vue2.js +1 -0
  132. package/es/components/iho-select-label/src/components/label-classify.vue.js +1 -1
  133. package/es/components/iho-select-label/src/components/label-classify.vue2.js +1 -0
  134. package/es/components/iho-table/src/IhoTable.vue.js +1 -1
  135. package/es/components/iho-table/src/IhoTable.vue2.js +1 -0
  136. package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/filter.vue.js +1 -1
  137. package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/filter.vue2.js +1 -0
  138. package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue.js +1 -1
  139. package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue2.js +1 -0
  140. package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index.js +1 -1
  141. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.js +1 -1
  142. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue2.js +1 -0
  143. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/index.js +1 -1
  144. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useAutoFocus.js +1 -1
  145. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.js +1 -1
  146. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/editSeparate.vue.js +1 -1
  147. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/editSeparate.vue2.js +1 -0
  148. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.js +1 -1
  149. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue2.js +1 -0
  150. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/pictureRendererPlugin.js +1 -1
  151. package/es/components/iho-table/src/plugins/varialbleHeightPlugin/index.js +1 -1
  152. package/es/components/iho-table/src/utils/index.js +1 -1
  153. package/es/components/index.css +1 -1
  154. package/es/components/info-header/index.d.ts +72 -10
  155. package/es/components/info-header/src/InfoHeader.vue.d.ts +72 -10
  156. package/es/components/info-header/src/InfoHeader.vue.js +1 -1
  157. package/es/components/info-header/src/InfoHeader.vue2.js +1 -0
  158. package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.js +1 -1
  159. package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue2.js +1 -0
  160. package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.js +1 -1
  161. package/es/components/info-header/src/components/infoDescription/DescriptionList.vue2.js +1 -0
  162. package/es/components/info-header/src/components/infoDescription/HiddenContent.vue.js +1 -1
  163. package/es/components/info-header/src/components/infoDescription/HiddenContent.vue2.js +1 -0
  164. package/es/components/info-header/src/components/infoDescription/InfoEllipsis.vue.js +1 -1
  165. package/es/components/info-header/src/components/infoDescription/InfoEllipsis.vue2.js +1 -0
  166. package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +31 -4
  167. package/es/components/info-header/src/components/infoDescription/index.vue.js +1 -1
  168. package/es/components/info-header/src/components/infoDescription/index.vue2.js +1 -0
  169. package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +31 -4
  170. package/es/components/info-header/src/components/patientInfo/index.vue.js +1 -1
  171. package/es/components/info-header/src/components/patientInfo/index.vue2.js +1 -0
  172. package/es/components/keyboard/index.d.ts +1 -1
  173. package/es/components/keyboard/src/Keyboard.vue.d.ts +1 -1
  174. package/es/components/keyboard/src/Keyboard.vue.js +1 -1
  175. package/es/components/keyboard/src/Keyboard.vue2.js +1 -0
  176. package/es/components/keyboard/src/components/InputNumber.vue.js +1 -1
  177. package/es/components/keyboard/src/components/InputNumber.vue2.js +1 -0
  178. package/es/components/keyboard/src/components/NumberPanel.vue.js +1 -1
  179. package/es/components/keyboard/src/components/NumberPanel.vue2.js +1 -0
  180. package/es/components/map/src/Map.vue.js +1 -1
  181. package/es/components/map/src/Map.vue2.js +1 -0
  182. package/es/components/picture-clipper/src/PictureClipper.vue.js +1 -1
  183. package/es/components/picture-clipper/src/PictureClipper.vue2.js +1 -0
  184. package/es/components/quick-search/src/index.vue.js +1 -1
  185. package/es/components/quick-search/src/index.vue2.js +1 -0
  186. package/es/components/recommend-search/index.d.ts +2 -2
  187. package/es/components/recommend-search/src/RecommendSearch.vue.d.ts +2 -2
  188. package/es/components/recommend-search/src/RecommendSearch.vue.js +1 -1
  189. package/es/components/recommend-search/src/RecommendSearch.vue2.js +1 -0
  190. package/es/components/recommend-search/src/components/BaseSearch.d.ts +1 -1
  191. package/es/components/recommend-search/src/components/RecommendInput.vue.d.ts +1 -1
  192. package/es/components/recommend-search/src/components/RecommendInput.vue.js +1 -1
  193. package/es/components/recommend-search/src/components/RecommendInput.vue2.js +1 -0
  194. package/es/components/recommend-search/src/components/RecommendMenu.vue.js +1 -1
  195. package/es/components/recommend-search/src/components/RecommendMenu.vue2.js +1 -0
  196. package/es/components/recommend-search/src/components/RecommendSelect.vue.d.ts +1 -1
  197. package/es/components/recommend-search/src/components/RecommendSelect.vue.js +1 -1
  198. package/es/components/recommend-search/src/components/RecommendSelect.vue2.js +1 -0
  199. package/es/components/scale-view/src/ScaleView.vue.js +1 -1
  200. package/es/components/scale-view/src/ScaleView.vue2.js +1 -0
  201. package/es/components/scale-view/src/components/AnswerParse.vue.js +1 -1
  202. package/es/components/scale-view/src/components/AnswerParse.vue2.js +1 -0
  203. package/es/components/scale-view/src/components/EvaluateCountdown.vue.js +1 -1
  204. package/es/components/scale-view/src/components/EvaluateCountdown.vue2.js +1 -0
  205. package/es/components/scale-view/src/components/EvaluatePage.vue.js +1 -1
  206. package/es/components/scale-view/src/components/EvaluatePage.vue2.js +1 -0
  207. package/es/components/scale-view/src/components/LoadingCom.vue.js +1 -1
  208. package/es/components/scale-view/src/components/NoData.vue.js +1 -1
  209. package/es/components/scale-view/src/components/NoData.vue2.js +1 -0
  210. package/es/components/search-cascader/index.d.ts +16 -3
  211. package/es/components/search-cascader/src/SearchCascader.vue.d.ts +16 -3
  212. package/es/components/search-cascader/src/SearchCascader.vue.js +1 -1
  213. package/es/components/search-cascader/src/SearchCascader.vue2.js +1 -0
  214. package/es/components/search-cascader/src/components/SearchMenu.js +1 -1
  215. package/es/components/select-label/src/LabelFormContent.vue.js +1 -1
  216. package/es/components/select-label/src/LabelFormContent.vue2.js +1 -0
  217. package/es/components/select-label/src/SelectLabel.vue.js +1 -1
  218. package/es/components/select-label/src/components/label-classify.vue.js +1 -1
  219. package/es/components/select-label/src/components/label-classify.vue2.js +1 -0
  220. package/es/components/select-person/src/SearchMultiple.vue.d.ts +6 -0
  221. package/es/components/select-person/src/SearchMultiple.vue.js +1 -1
  222. package/es/components/select-person/src/SelectPerson.vue.js +1 -1
  223. package/es/components/shortcut-provider/src/ShortcutProvider.vue.js +1 -1
  224. package/es/components/shortcut-provider/src/ShortcutProvider.vue2.js +1 -0
  225. package/es/components/shortcut-setter/index.d.ts +31 -4
  226. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +31 -4
  227. package/es/components/shortcut-setter/src/ShortcutSetter.vue.js +1 -1
  228. package/es/components/shortcut-setter/src/ShortcutSetter.vue2.js +1 -0
  229. package/es/components/shortcut-setter/src/ShortcutSetterItem.vue.js +1 -1
  230. package/es/components/shortcut-setter/src/ShortcutSetterItem.vue2.js +1 -0
  231. package/es/components/steps-wheel/src/StepsWheel.vue.js +1 -1
  232. package/es/components/steps-wheel/src/StepsWheel.vue2.js +1 -0
  233. package/es/components/steps-wheel/style/index.css +1 -1
  234. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.js +1 -1
  235. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue2.js +1 -0
  236. package/es/components/table-filter/src/components/classify-filter/components/Date.vue.js +1 -1
  237. package/es/components/table-filter/src/components/classify-filter/components/Date.vue2.js +1 -0
  238. package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue.js +1 -1
  239. package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue2.js +1 -0
  240. package/es/components/table-filter/src/components/classify-filter/components/InputFilter.vue.js +1 -1
  241. package/es/components/table-filter/src/components/classify-filter/components/InputFilter.vue2.js +1 -0
  242. package/es/components/table-filter/src/components/classify-filter/components/InputNumber.vue.js +1 -1
  243. package/es/components/table-filter/src/components/classify-filter/components/InputNumber.vue2.js +1 -0
  244. package/es/components/table-filter/src/components/classify-filter/components/InputNumberGroup.vue.js +1 -1
  245. package/es/components/table-filter/src/components/classify-filter/components/InputNumberGroup.vue2.js +1 -0
  246. package/es/components/table-filter/src/components/classify-filter/components/SelectDynamic.vue.js +1 -1
  247. package/es/components/table-filter/src/components/classify-filter/components/SelectDynamic.vue2.js +1 -0
  248. package/es/components/table-filter/src/components/classify-filter/components/SelectFilter.vue.js +1 -1
  249. package/es/components/table-filter/src/components/classify-filter/components/SelectFilter.vue2.js +1 -0
  250. package/es/components/table-filter/src/components/classify-filter/components/SelectLabel.vue.js +1 -1
  251. package/es/components/table-filter/src/components/classify-filter/components/SelectLabel.vue2.js +1 -0
  252. package/es/components/table-filter/src/components/classify-filter/index.vue.js +1 -1
  253. package/es/components/table-filter/src/components/classify-filter/index.vue2.js +1 -0
  254. package/es/components/table-filter/src/components/render-widget/components/CheckboxGroup.vue.js +1 -1
  255. package/es/components/table-filter/src/components/render-widget/components/CheckboxGroup.vue2.js +1 -0
  256. package/es/components/table-filter/src/components/render-widget/components/Date.vue.js +1 -1
  257. package/es/components/table-filter/src/components/render-widget/components/Date.vue2.js +1 -0
  258. package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue.js +1 -1
  259. package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue2.js +1 -0
  260. package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue.js +1 -1
  261. package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue2.js +1 -0
  262. package/es/components/table-filter/src/components/render-widget/components/InputNumberGroup.vue.js +1 -1
  263. package/es/components/table-filter/src/components/render-widget/components/InputNumberGroup.vue2.js +1 -0
  264. package/es/components/table-filter/src/components/render-widget/components/LabelInner.vue.js +1 -1
  265. package/es/components/table-filter/src/components/render-widget/components/LabelInner.vue2.js +1 -0
  266. package/es/components/table-filter/src/components/render-widget/components/LabelOut.vue.js +1 -1
  267. package/es/components/table-filter/src/components/render-widget/components/LabelOut.vue2.js +1 -0
  268. package/es/components/table-filter/src/components/render-widget/components/Select.vue.js +1 -1
  269. package/es/components/table-filter/src/components/render-widget/components/Select.vue2.js +1 -0
  270. package/es/components/table-filter/src/components/render-widget/index.vue.js +1 -1
  271. package/es/components/table-filter/src/directive/resize.js +1 -1
  272. package/es/components/time-line/src/TimeLine.vue.js +1 -1
  273. package/es/components/time-line/src/TimeLine.vue2.js +1 -0
  274. package/es/components/time-picker/src/TimePicker.vue.js +1 -1
  275. package/es/components/time-picker/src/TimePicker.vue2.js +1 -0
  276. package/es/components/vod-chunk-upload/src/chunk-upload-new.vue.js +1 -1
  277. package/es/components/vod-chunk-upload/src/chunk-upload-new.vue2.js +1 -0
  278. package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue.js +1 -1
  279. package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue2.js +1 -0
  280. package/es/env.d.ts +25 -25
  281. package/es/shared/assets/img/failure.png.js +1 -1
  282. package/es/shared/assets/img/no-permission.png.js +1 -1
  283. package/es/shared/assets/img/nodata.png.js +1 -1
  284. package/es/shared/assets/img/notfound.png.js +1 -1
  285. package/es/shared/assets/img/qr.png.js +1 -1
  286. package/es/shared/assets/img/success.png.js +1 -1
  287. package/es/shared/assets/img/video.png.js +1 -1
  288. package/es/shared/assets/img/video_default_cover.png.js +1 -1
  289. package/es/shared/assets/img/xb_big.png.js +1 -1
  290. package/es/shared/assets/img/xb_small.png.js +1 -1
  291. package/es/shared/components/SelectPage/SelectPage.vue.js +1 -1
  292. package/es/shared/components/SelectPage/SelectPage.vue2.js +1 -0
  293. package/es/shared/components/SvgIcon/SvgIcon.vue.js +1 -1
  294. package/es/shared/components/SvgIcon/SvgIcon.vue2.js +1 -0
  295. package/es/shared/components/TextOverTooltip/TextOverTooltip.vue.js +1 -1
  296. package/es/shared/components/TextOverTooltip/TextOverTooltip.vue2.js +1 -0
  297. package/es/shared/components/no-data/NoData.vue.js +1 -1
  298. package/es/shared/components/no-data/NoData.vue2.js +1 -0
  299. package/es/shared/hooks/useAsyncQueue.d.ts +3 -1
  300. package/es/shared/hooks/useAsyncQueue.js +1 -1
  301. package/es/shared/package.json.js +1 -1
  302. package/package.json +2 -2
  303. package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
  304. package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +0 -1
  305. package/es/components/bpmn-workflow/types/ModelingModule.d.ts +0 -1
  306. package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +0 -1
  307. package/es/components/form-render/src/components/renderer/dist/levelSearchCascader.d.ts +0 -77
  308. package/es/components/form-render/src/components/renderer/dist/searchCascade.d.ts +0 -93
  309. package/es/components/iho-table/src/plugins/dist/highLightSetPlugin.d.ts +0 -3
  310. package/es/components/iho-table/src/plugins/filterRenderPlugin/dist/index.d.ts +0 -3
  311. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/dist/index.d.ts +0 -3
  312. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/dist/defaultRendererPlugin.d.ts +0 -3
  313. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/dist/seqRendererPlugin.d.ts +0 -3
  314. package/es/components/iho-table/src/plugins/varialbleHeightPlugin/dist/index.d.ts +0 -3
  315. package/es/components/iho-table/src/utils/dist/index.d.ts +0 -44
  316. package/es/components/scale-view/src/components/formitem/dist/r-address.d.ts +0 -36
  317. package/es/components/scale-view/src/components/formitem/dist/r-sign.d.ts +0 -36
  318. package/es/components/scale-view/src/components/formitem/dist/standard-modal.d.ts +0 -82
  319. package/es/components/search-cascader/src/components/dist/SearchMenu.d.ts +0 -57
  320. package/es/components/search-cascader/src/components/dist/SearchMenu1.d.ts +0 -57
  321. package/es/components/search-cascader/src/hooks/index.d.ts +0 -1
  322. package/es/components/search-cascader/src/hooks/index.js +0 -1
  323. package/es/components/search-cascader/src/hooks/useCssVariable.d.ts +0 -3
  324. package/es/components/search-cascader/src/hooks/useCssVariable.js +0 -1
  325. package/es/shared/assets/img/failure.d.ts +0 -2
  326. package/es/shared/assets/img/failure.js +0 -1
  327. package/es/shared/assets/img/icon-asc.d.ts +0 -2
  328. package/es/shared/assets/img/icon-asc.js +0 -1
  329. package/es/shared/assets/img/icon-desc.d.ts +0 -2
  330. package/es/shared/assets/img/icon-desc.js +0 -1
  331. package/es/shared/assets/img/no-permission.d.ts +0 -2
  332. package/es/shared/assets/img/no-permission.js +0 -1
  333. package/es/shared/assets/img/nodata.d.ts +0 -2
  334. package/es/shared/assets/img/nodata.js +0 -1
  335. package/es/shared/assets/img/notfound.d.ts +0 -2
  336. package/es/shared/assets/img/notfound.js +0 -1
  337. package/es/shared/assets/img/qr.d.ts +0 -2
  338. package/es/shared/assets/img/qr.js +0 -1
  339. package/es/shared/assets/img/success.d.ts +0 -2
  340. package/es/shared/assets/img/success.js +0 -1
  341. package/es/shared/assets/img/video.d.ts +0 -2
  342. package/es/shared/assets/img/video.js +0 -1
  343. package/es/shared/assets/img/video_default_cover.d.ts +0 -2
  344. package/es/shared/assets/img/video_default_cover.js +0 -1
  345. package/es/shared/assets/img/video_hover.d.ts +0 -2
  346. package/es/shared/assets/img/video_hover.js +0 -1
  347. package/es/shared/assets/img/video_play_hover.d.ts +0 -2
  348. package/es/shared/assets/img/video_play_hover.js +0 -1
  349. package/es/shared/assets/img/xb_big.d.ts +0 -2
  350. package/es/shared/assets/img/xb_big.js +0 -1
  351. package/es/shared/assets/img/xb_small.d.ts +0 -2
  352. package/es/shared/assets/img/xb_small.js +0 -1
  353. package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +0 -86
  354. package/es/shared/utils/fabricjs/index.d.ts +0 -6823
  355. package/es/shared/utils/tapable/index.d.ts +0 -139
  356. /package/es/_virtual/{plugin-vue_export-helper.js → _plugin-vue_export-helper.js} +0 -0
@@ -1 +1 @@
1
- import{arrayed as e,deepOmit as o}from"../../../../shared/utils/index.js";import{cloneDeep as t,pick as n}from"lodash-es";import"../../index.js";import{parseNumberFromMaybeString as r,formRenderLog as i}from"../utils/index.js";import{useFieldNormalize as s}from"./useFieldNormalize.js";import{fieldKeyEscape as a,createLinebarId as p}from"../utils/schema.js";import{useFormValidator as l}from"./useFormValidator.js";import{transformDateFormat as c}from"../utils/business.js";function m(e,o){Object.assign(e["x-component-props"],{...n(o,["wordbook","autograph"])})}function d(d){const{createValidatorSchema:u}=l(),x=e=>{var t;const n={name:e.val_key,type:null!=(t=e.fieldType)?t:"string",title:e.alias||e.name,"x-component":e.html_type,default:e.default_val,"x-component-props":{placeholder:e.placeholder,clearable:"0"===e.is_empty,...e.componentProps||{}},"x-content":e.slots,"x-display":"0"===e.is_show?"hidden":"visible","x-pattern":"0"===e.is_edit?"disabled":"editable"};e.reactions&&(n["x-reactions"]=e.reactions),e.noDecorator||Object.assign(n,{"x-decorator":"FORM_ITEM","x-decorator-props":{fieldItem:o(e,["reactions"]),span:2*(e.elem_width||3),showLabel:"1"!==e.hide_title,remark:e.remark,propertyKey:e.val_key,annotation:e.annotation,...e.decoratorProps||{}}});const r=u(e);return r&&(n["x-validator"]=r),"0"===e.is_null&&(n.required=!0),n},f=e=>{var o;const t=x(e);e.urlConfig?function(e,o){Object.assign(e["x-component-props"],{...n(o,["urlConfig"])})}(t,e):e.autograph&&m(t,e);const i=!!e.__multiple;return Object.assign(t["x-component-props"],{multiple:i,options:e.option||(null==(o=e.componentProps)?void 0:o.options),allowCreate:"1"===e.free_entry||!!t["x-component-props"].allowCreate,maxTagCount:r(e.multi_select_value),...n(e,["lazyRequest","requestCache"])}),i&&(t.type="array"),t},_=e=>{const o=x(e);return Object.assign(o["x-component-props"],{options:e.option,childFieldStrategy:e.childFieldStrategy,vertical:e.__vertical}),m(o,e),o},h=e=>{const t=x(e);return Object.assign(t["x-component-props"],{fieldItem:o(e,["reactions"])}),t},g=e=>({name:e.val_key,type:"void",title:e.alias||e.name,"x-component":"LINEBAR","x-display":"visible","x-component-props":{disabled:"1"===e.is_not_fold,id:p(e.val_key),show:"0"!==e.is_show,remark:e.remark}}),b=new Map([["LINEBAR",g],["LINE_BREAKS",e=>({name:e.val_key,type:"void",title:e.alias||e.name,"x-component":"LINE_BREAKS","x-display":"0"===e.is_show?"hidden":"visible"})],["INPUT",e=>{const o=x(e);return Object.assign(o["x-component-props"],{...n(e,["prefix","suffix"])}),o}],["TEXTAREA",e=>{const o=x(e);return Object.assign(o["x-component-props"],{rows:e.initialize_high||3}),o}],["INPUT_NUMBER",e=>{const o=x(e),{decimal_length:t,validate:n}=e;return Object.assign(o["x-component-props"],{precision:null!=t?t:null==n?void 0:n.decimal_length,prefix:e.prefix,suffix:e.suffix}),o}],["SELECT",f],["REMOTE_SEARCH",f],["DATE",e=>{const o=x(e);return Object.assign(o["x-component-props"],{valueFormat:e.date_format,type:c(e.date_format),validate:e.validate}),o}],["LEVEL_SEARCH_CASCADER",e=>{const o=x(e);return Object.assign(o["x-component-props"],{...n(e,["wordbook","lazyRequest","autograph"])}),o}],["SEARCH_CASCADER",e=>{var o;const t=x(e);return Object.assign(t["x-component-props"],{urlConfig:e.urlConfig,depth:null==(o=e.wordbook)?void 0:o.level_num,options:e.option}),t}],["COMBINATION",e=>{const o=x(e);return o.type="array",!1!==e.jsonCombination&&(o["x-component"]="JSON_COMBINATION"),Object.assign(o["x-decorator-props"],{showLabel:!1,showFeedback:!1}),Object.assign(o["x-component-props"],{title:e.alias||e.name,maxGroupNum:e.maxGroupNum,getProperties:()=>e.children||[],combinationItemDeletable:e.combinationItemDeletable}),o}],["RADIO",_],["CHECKBOX",_],["SWITCH",e=>{const o=x(e);return Object.assign(o["x-component-props"],{openDescription:e.open,closeDescription:e.close}),o}],["SLIDER",e=>{const o=x(e);return Object.assign(o["x-component-props"],{step:r(e.step_length),max:r(e.max_length),min:r(e.min_length),option:e.option}),o}],["COMPLEX",e=>{const o=x(e);Array.isArray(e.properties)&&i("COMPLEX控件的properties属性已经废弃, 请使用children作为替代, 在之后的版本中properties属性将不再支持");const t=Array.isArray(e.properties||e.children)?C(e.properties||e.children):{};return o.type=e.fieldType||"void",o.properties=t,Object.assign(o["x-decorator-props"],{showFeedback:!1}),Object.assign(o["x-component-props"],n(e,["wrapperStyle","display"])),o}]]),y=e=>{if(e.suffixConfig)return v(e);return(b.get(e.html_type)||h)(e)},v=o=>{if(!o.suffixConfig)return y(o);const t=e(o.suffixConfig),n=[{...o,is_show:"1",hide_title:"1",suffixConfig:void 0}].concat(t.map((e=>({...e,hide_title:"1",is_show:"1"})))),r=x(o);return Object.assign(r,{type:"void",name:a(n),title:o.alias||o.name,"x-component":"INPUT_GROUP","x-component-props":{span:2*(o.elem_width||3)},"x-decorator-props":{...r["x-decorator-props"],showFeedback:!1,suffixFields:n.map((e=>e.val_key))},properties:C(n)}),r},{FieldNormalizeWaterfallHook:O}=s();function C(o){let n=null;return o.reduce(((e,o,s)=>{var a;const p=null==(a=(o=O.call(t(o))).validate)?void 0:a.obj_type;return p&&d&&d.collect(p,t(o)),"LINEBAR"===o.html_type?(e[i(o)]=r(g(o),s),n=e[i(o)].properties={}):n?n[i(o)]=r(y(o),s):(n=null,e[i(o)]=r(y(o),s)),e}),{});function r(e,o){return e["x-index"]=o,e}function i(o){return o.suffixConfig?a([o,...e(o.suffixConfig)]):o.val_key}}return{schemaAdaptor:C}}export{d as useFieldListAdaptor};
1
+ import{arrayed as e,deepOmit as o}from"../../../../shared/utils/index.js";import{cloneDeep as t,pick as n}from"lodash-es";import"../../index.js";import{parseNumberFromMaybeString as r,formRenderLog as i}from"../utils/index.js";import{useFieldNormalize as s}from"./useFieldNormalize.js";import{fieldKeyEscape as a,createLinebarId as p}from"../utils/schema.js";import{useFormValidator as l}from"./useFormValidator.js";import{transformDateFormat as c}from"../utils/business.js";function m(e,o){Object.assign(e["x-component-props"],{...n(o,["wordbook","autograph"])})}function d(d){const{createValidatorSchema:u}=l(),x=e=>{var o;const t={name:e.val_key,type:null!=(o=e.fieldType)?o:"string",title:e.alias||e.name,"x-component":e.html_type,default:e.default_val,"x-component-props":{placeholder:e.placeholder,clearable:"0"===e.is_empty,...e.componentProps||{}},"x-content":e.slots,"x-display":"0"===e.is_show?"hidden":"visible","x-pattern":"0"===e.is_edit?"disabled":"editable","x-compile-omitted":["title","x-component-props","x-decorator-props"]};e.reactions&&(t["x-reactions"]=e.reactions),e.noDecorator||Object.assign(t,{"x-decorator":"FORM_ITEM","x-decorator-props":{fieldItem:e,span:2*(e.elem_width||3),showLabel:"1"!==e.hide_title,remark:e.remark,propertyKey:e.val_key,annotation:e.annotation,...e.decoratorProps||{}}});const n=u(e);return n&&(t["x-validator"]=n),"0"===e.is_null&&(t.required=!0),t},f=e=>{var o;const t=x(e);e.urlConfig?function(e,o){Object.assign(e["x-component-props"],{...n(o,["urlConfig"])})}(t,e):e.autograph&&m(t,e);const i=!!e.__multiple;return Object.assign(t["x-component-props"],{multiple:i,options:e.option||(null==(o=e.componentProps)?void 0:o.options),allowCreate:"1"===e.free_entry||!!t["x-component-props"].allowCreate,maxTagCount:r(e.multi_select_value),...n(e,["lazyRequest","requestCache"])}),i&&(t.type="array"),t},_=e=>{const o=x(e);return Object.assign(o["x-component-props"],{options:e.option,childFieldStrategy:e.childFieldStrategy,vertical:e.__vertical}),m(o,e),o},h=e=>{const t=x(e);return Object.assign(t["x-component-props"],{fieldItem:o(e,["reactions"])}),t},g=e=>({name:e.val_key,type:"void",title:e.alias||e.name,"x-component":"LINEBAR","x-display":"visible","x-component-props":{disabled:"1"===e.is_not_fold,id:p(e.val_key),show:"0"!==e.is_show,remark:e.remark}}),b=new Map([["LINEBAR",g],["LINE_BREAKS",e=>({name:e.val_key,type:"void",title:e.alias||e.name,"x-component":"LINE_BREAKS","x-display":"0"===e.is_show?"hidden":"visible"})],["INPUT",e=>{const o=x(e);return Object.assign(o["x-component-props"],{...n(e,["prefix","suffix"])}),o}],["TEXTAREA",e=>{const o=x(e);return Object.assign(o["x-component-props"],{rows:e.initialize_high||3}),o}],["INPUT_NUMBER",e=>{const o=x(e),{decimal_length:t,validate:n}=e;return Object.assign(o["x-component-props"],{precision:null!=t?t:null==n?void 0:n.decimal_length,prefix:e.prefix,suffix:e.suffix}),o}],["SELECT",f],["REMOTE_SEARCH",f],["DATE",e=>{const o=x(e);return Object.assign(o["x-component-props"],{valueFormat:e.date_format,type:c(e.date_format),validate:e.validate}),o}],["LEVEL_SEARCH_CASCADER",e=>{const o=x(e);return Object.assign(o["x-component-props"],{...n(e,["wordbook","lazyRequest","autograph"])}),o}],["SEARCH_CASCADER",e=>{var o;const t=x(e);return Object.assign(t["x-component-props"],{urlConfig:e.urlConfig,depth:null==(o=e.wordbook)?void 0:o.level_num,options:e.option}),t}],["COMBINATION",e=>{const o=x(e);return o.type="array",!1!==e.jsonCombination&&(o["x-component"]="JSON_COMBINATION"),Object.assign(o["x-decorator-props"],{showLabel:!1,showFeedback:!1}),Object.assign(o["x-component-props"],{title:e.alias||e.name,maxGroupNum:e.maxGroupNum,properties:e.children||[],combinationItemDeletable:e.combinationItemDeletable}),o}],["RADIO",_],["CHECKBOX",_],["SWITCH",e=>{const o=x(e);return Object.assign(o["x-component-props"],{openDescription:e.open,closeDescription:e.close}),o}],["SLIDER",e=>{const o=x(e);return Object.assign(o["x-component-props"],{step:r(e.step_length),max:r(e.max_length),min:r(e.min_length),option:e.option}),o}],["COMPLEX",e=>{const o=x(e);Array.isArray(e.properties)&&i("COMPLEX控件的properties属性已经废弃, 请使用children作为替代, 在之后的版本中properties属性将不再支持");const t=Array.isArray(e.properties||e.children)?C(e.properties||e.children):{};return o.type=e.fieldType||"void",o.properties=t,Object.assign(o["x-decorator-props"],{showFeedback:!1}),Object.assign(o["x-component-props"],n(e,["wrapperStyle","display"])),o}]]),y=e=>{if(e.suffixConfig)return v(e);return(b.get(e.html_type)||h)(e)},v=o=>{if(!o.suffixConfig)return y(o);const t=e(o.suffixConfig),n=[{...o,is_show:"1",hide_title:"1",suffixConfig:void 0}].concat(t.map((e=>({...e,hide_title:"1",is_show:"1"})))),r=x(o);return Object.assign(r,{type:"void",name:a(n),title:o.alias||o.name,"x-component":"INPUT_GROUP","x-component-props":{span:2*(o.elem_width||3)},"x-decorator-props":{...r["x-decorator-props"],showFeedback:!1,suffixFields:n.map((e=>e.val_key))},properties:C(n)}),r},{FieldNormalizeWaterfallHook:O}=s();function C(o){let n=null;return o.reduce(((e,o,s)=>{var a;const p=null==(a=(o=O.call(t(o))).validate)?void 0:a.obj_type;return p&&d&&d.collect(p,t(o)),"LINEBAR"===o.html_type?(e[i(o)]=r(g(o),s),n=e[i(o)].properties={}):n?n[i(o)]=r(y(o),s):(n=null,e[i(o)]=r(y(o),s)),e}),{});function r(e,o){return e["x-index"]=o,e}function i(o){return o.suffixConfig?a([o,...e(o.suffixConfig)]):o.val_key}}return{schemaAdaptor:C}}export{d as useFieldListAdaptor};
@@ -7,7 +7,7 @@ declare type ProcessorOption = Partial<{
7
7
  afterRequest(key: string, payload?: unknown): AnyObject[];
8
8
  beforeRequest(key: string, params?: unknown): UndefinedAble<AnyObject> | void;
9
9
  }>;
10
- export declare function useFormAsyncQueue(requestInstance: ComputedRef<UndefinedAble<RequestInstance>>): {
10
+ export declare function useFormAsyncQueue(requestInstance: ComputedRef<UndefinedAble<RequestInstance>>, uniqueData: ComputedRef<boolean>): {
11
11
  create: (parallelism?: number, option?: ProcessorOption) => AsyncQueue<FormAsyncQueueItem, any, {
12
12
  label: string;
13
13
  value: unknown;
@@ -1 +1 @@
1
- import{uuidGenerator as e}from"../../../../shared/utils/index.js";import{isFunction as r}from"lodash-es";import"naive-ui";import{unref as t}from"vue";import"@vueuse/core";import"date-fns";import{AsyncQueue as o}from"../../../../shared/hooks/useAsyncQueue.js";import"../../index.js";import{useCommonLog as s}from"./useCommonLog.js";import{useFormRequest as n}from"./useFormRequest.js";function a(a){const{getHttpInstance:i}=n();return{create:function(n=3,u){return new o({name:"FormRenderAsyncQueue",parallelism:n,async processor({key:e,method:o="post",cache:n,params:m,url:p},c,f){var l,d;const h=null!=(l=t(a))?l:i();if(!h)return s().invalidHttpInstanceLog(),c(),void f();try{u&&r(u.beforeRequest)&&(m=null!=(d=u.beforeRequest(e,m))?d:{});let t=await h[o](p,m);u&&r(u.afterRequest)&&(t=u.afterRequest(e,t)),c(void 0,Array.isArray(t)?t:[]),!n&&f()}catch(e){c(new Error(`Request error => ${e}`)),f()}},getKey:({url:r,method:t="post",cache:o,params:s})=>o?r+t+JSON.stringify(s||{}):e()})}}}export{a as useFormAsyncQueue};
1
+ import{uuidGenerator as e}from"../../../../shared/utils/index.js";import{isFunction as r}from"lodash-es";import"naive-ui";import{unref as t}from"vue";import"@vueuse/core";import"date-fns";import{AsyncQueue as o}from"../../../../shared/hooks/useAsyncQueue.js";import"../../index.js";import{useCommonLog as s}from"./useCommonLog.js";import{useFormRequest as a}from"./useFormRequest.js";function n(n,u){const{getHttpInstance:i}=a();return{create:function(a=3,m){return new o({name:"FormRenderAsyncQueue",uniqueData:u.value,parallelism:a,async processor({key:e,method:o="post",cache:a,params:u,url:p},c,f){var l,d;const h=null!=(l=t(n))?l:i();if(!h)return s().invalidHttpInstanceLog(),c(),void f();try{m&&r(m.beforeRequest)&&(u=null!=(d=m.beforeRequest(e,u))?d:{});let t=await h[o](p,u);m&&r(m.afterRequest)&&(t=m.afterRequest(e,t)),c(void 0,Array.isArray(t)?t:[]),!a&&f()}catch(e){c(new Error(`Request error => ${e}`)),f()}},getKey:({url:r,method:t="post",cache:o,params:s})=>o?r+t+JSON.stringify(s||{}):e()})}}}export{n as useFormAsyncQueue};
@@ -1 +1 @@
1
- import{uuidGenerator as e}from"../../../../shared/utils/index.js";import{createSchemaField as o}from"@formily/vue";import{isObject as t}from"@vue/shared";import{cloneDeep as r}from"lodash-es";import{computed as s,provide as n,readonly as i}from"vue";import"../../index.js";import m from"../components/renderer/index.js";import{InjectionAsyncQueue as a,InjectionSchemaField as u,InjectionBusinessCollector as p,InjectionChangeContextCollector as c,InjectionFormItemDepsCollector as l,InjectionFormUUID as f,InjectionAnnotation as d}from"../constants/index.js";import{useFormRenderLifeCycle as j}from"./useFormRenderLifeCycle.js";import{usePresetScope as y}from"./usePresetScope.js";import{injectOrProvide as C,presetRequestHandler as h}from"../utils/index.js";import{useFormAsyncQueue as x}from"./useFormAsyncQueue.js";import{useBusinessBinding as g}from"./useBusinessBinding.js";import{useChangeContext as v}from"./useChangeContext.js";import{useFormItemDeps as F}from"./useFormItemDeps.js";function b(b,q){const{callLifeCycle:R}=j(b),I=C(a,(()=>x(s((()=>b.requestInstance))).create(b.parallelism,{beforeRequest:(...e)=>R("beforeRequest",r(e))||e[1],afterRequest:(...e)=>R("afterRequest",r(e))||h(e[1])}))),D=C(u,(()=>o({components:{...m,...b.components},scope:Object.assign({},y(),b.scope)}).SchemaField)),S=g().create(b.businessFormatter);n(p,S);const B=v().create();n(c,B);const L=F().create();n(l,L);const Q=b.uuid||e();return n(f,Q),n(d,s({get:()=>b.annotation?i(b.annotation):null,set(e){if(!t(b.annotation)||!t(e))return;const o=b.annotation[e.property];b.annotation[e.property]=e.value,q("annotationChange",{fieldKey:e.property,value:e.value,oldValue:o})}})),{asyncQueue:I,SchemaField:D,businessCollector:S,changeContextCollector:B,formItemDepsCollector:L,formUUID:Q}}export{b as useFormContext};
1
+ import{uuidGenerator as e}from"../../../../shared/utils/index.js";import{createSchemaField as o}from"@formily/vue";import{isObject as t}from"@vue/shared";import{cloneDeep as r}from"lodash-es";import{computed as n,provide as s,readonly as i}from"vue";import"../../index.js";import m from"../components/renderer/index.js";import{InjectionAsyncQueue as a,InjectionSchemaField as u,InjectionBusinessCollector as c,InjectionChangeContextCollector as p,InjectionFormItemDepsCollector as l,InjectionFormUUID as f,InjectionAnnotation as d}from"../constants/index.js";import{useFormRenderLifeCycle as j}from"./useFormRenderLifeCycle.js";import{usePresetScope as C}from"./usePresetScope.js";import{injectOrProvide as h,presetRequestHandler as y}from"../utils/index.js";import{useFormAsyncQueue as x}from"./useFormAsyncQueue.js";import{useBusinessBinding as g}from"./useBusinessBinding.js";import{useChangeContext as q}from"./useChangeContext.js";import{useFormItemDeps as v}from"./useFormItemDeps.js";function F(F,b){const{callLifeCycle:R}=j(F),D=h(a,(()=>x(n((()=>F.requestInstance)),n((()=>!!F.uniqueCacheData))).create(F.parallelism,{beforeRequest:(...e)=>R("beforeRequest",r(e))||e[1],afterRequest:(...e)=>R("afterRequest",r(e))||y(e[1])}))),I=h(u,(()=>o({components:{...m,...F.components},scope:Object.assign({},C(),F.scope)}).SchemaField)),S=g().create(F.businessFormatter);s(c,S);const B=q().create();s(p,B);const L=v().create();s(l,L);const Q=F.uuid||e();return s(f,Q),s(d,n({get:()=>F.annotation?i(F.annotation):null,set(e){if(!t(F.annotation)||!t(e))return;const o=F.annotation[e.property];F.annotation[e.property]=e.value,b("annotationChange",{fieldKey:e.property,value:e.value,oldValue:o})}})),{asyncQueue:D,SchemaField:I,businessCollector:S,changeContextCollector:B,formItemDepsCollector:L,formUUID:Q}}export{F as useFormContext};
@@ -1,13 +1,15 @@
1
1
  import { UndefinedAble } from '../../../../../es/shared/types';
2
2
  import { FormRenderLifeCycle, FormRenderProps } from '../../../../../es/components/form-render';
3
3
  export declare function useFormRenderLifeCycle(props: FormRenderProps): {
4
- callLifeCycle: <T extends "onSetup" | "beforeRequest" | "afterRequest">(lifeCycleName: T, payload?: Parameters<Required<Partial<{
4
+ callLifeCycle: <T extends "onSetup" | "beforeRequest" | "afterRequest" | "afterOptionInit">(lifeCycleName: T, payload?: Parameters<Required<Partial<{
5
5
  onSetup(): void;
6
6
  beforeRequest(fieldKey: string, params?: import("../../../../../es/shared/types").AnyObject | undefined): void | UndefinedAble<import("../../../../../es/shared/types").AnyObject>;
7
7
  afterRequest(fieldKey: string, payload?: any): import("../../../../../es/shared/types").AnyObject[];
8
+ afterOptionInit(fieldKey: string, options: import("../../../../../es/shared/types").AnyObject[]): void;
8
9
  }>>[T]> | undefined) => UndefinedAble<ReturnType<Required<Partial<{
9
10
  onSetup(): void;
10
11
  beforeRequest(fieldKey: string, params?: import("../../../../../es/shared/types").AnyObject | undefined): void | UndefinedAble<import("../../../../../es/shared/types").AnyObject>;
11
12
  afterRequest(fieldKey: string, payload?: any): import("../../../../../es/shared/types").AnyObject[];
13
+ afterOptionInit(fieldKey: string, options: import("../../../../../es/shared/types").AnyObject[]): void;
12
14
  }>>[T]>>;
13
15
  };
@@ -2,7 +2,7 @@ import { AnyObject, Func } from '../../../../../es/shared/types';
2
2
  import { Ref } from 'vue';
3
3
  import { FormWordbook, RecommendIds, UrlConfig } from '../../../../../es/components/form-render';
4
4
  import { RecommendItem } from '../../../../../es/components/recommend-search/src/types';
5
- export declare const searchContentMatcher: (searchContent: string, label: string) => string[] | null;
5
+ export declare const searchContentMatcher: (searchContent: string, label: string) => RegExpMatchArray | null;
6
6
  export declare function useRecommendOptions(props: {
7
7
  recommend: boolean;
8
8
  commonList?: RecommendItem[];
@@ -1 +1 @@
1
- import{checkInSetupEnv as e,jsonParse as n}from"../../../../shared/utils/index.js";import{useMemoize as t,useDebounceFn as l}from"@vueuse/core";import{identity as u,uniqBy as o,isString as r,isEqual as a,omit as i,isArray as c,isFunction as s}from"lodash-es";import{computed as v,inject as m,ref as d,watch as f}from"vue";import"../../index.js";import{InjectionAsyncQueue as y,InjectionFormItemDepsCollector as p}from"../constants/index.js";import{createUrlConfigParams as h,formRenderLog as g,keywordMatcher as w}from"../utils/index.js";import{useFormField as k}from"./useFormField.js";import{useFormRequest as b}from"./useFormRequest.js";function R(e,n){const t=d();return v({get:()=>t.value?t.value:e[n],set(e){t.value=e}})}const C=(()=>{const e=new Map,n=t((e=>new RegExp(`(.*)${e.split("").map((e=>`(${function(e){return e.match(/[()\[\]{}$^\/]/)?"\\"+e:e}(e)})`)).join("(.*)")}(.*)`)),{getKey:u});return(t,l)=>{const u=e.get(t)||{};return e.set(t,u),Reflect.has(u,l)?u[l]:u[l]=l.match(n(t))}})();function K(){const e=d();return{searchContent:e,optionSearchFilter:function(n,t,l){if(!e.value)return n;const u=c(l)?l.filter((e=>e&&r(e))):[];return n.filter((n=>function(n,t,l){if(!e.value)return!0;const u=n?n[t]:"";return!!r(u)&&(!!C(e.value,u)||!!w(e.value,n.keyword)||!!l.length&&l.some((t=>r(n[t])&&n[t].includes(e.value))))}(n,t,u)))}}}function F(e,t,l,u,r){const a=R(e,"commonList"),c=R(e,"recentList"),{searchContent:d,optionSearchFilter:f}=K();function p(e){return n(e.itemObj)}const h=v((()=>{var e,n;return null!=(n=null==(e=a.value)?void 0:e.map(p))?n:[]})),g=v((()=>{var e,n;return null!=(n=null==(e=c.value)?void 0:e.map(p))?n:[]})),w=v((()=>{if(!e.recommend||!h.value.length&&!g.value.length)return t.value;const n=o(h.value.concat(g.value),(e=>e[r.value])),l=t.value.filter((e=>n.every((function(n){return n[r.value]!==e[r.value]}))));return[...f(n,u.value),...l]})),{getRecommendRequestInfo:C,getHttpInstance:F}=b();function j(n){const{url:t,getRecommendIds:l}=C(),u=s(l)?l():{},o=s(e.getRecommendInfo)?e.getRecommendInfo():{};return{url:t[n],info:Object.assign({},u,o)}}const{fieldKey:x}=k(),O=m(y);return{postRecommend:async function(n){if(!e.recommend)return;const t=F();if(!t)return;const{url:u,info:o}=j("post"),a=w.value.find((e=>e[r.value]===n));a&&l("postRecommend",await t.post(u,{...o,keyword:"",itemId:r.value,itemObj:JSON.stringify(a)}))},getRecommend:async function(n){if(!e.recommend)return;if(d.value=n,a.value&&c.value&&e.recommendCache)return;const t=await O.addAsync(function(n,t){const{url:l,info:u}=j("get");return{url:l,method:"get",key:n,cache:t,params:{...u,recNum:Math.max(e.commonNum,e.recentNum),keyword:""}}}(x.value,e.recommendCache)),{commonly:l,recently:u}=t.reduce(((e,n)=>("commonly"===n.type?e.commonly.push(i(n,["type"])):"recently"===n.type&&e.recently.push(i(n,["type"])),e)),{commonly:[],recently:[]});a.value=l.slice(0,e.commonNum),c.value=u.slice(0,e.recentNum)},sortedOptions:w}}function j(n,t){e();const u=m(y),o=v((()=>{var e,t,l;return null!=(l=null!=(t=null==(e=n.urlConfig)?void 0:e.nameKey)?t:n.labelField)?l:"text"})),i=v((()=>{var e,t,l;return null!=(l=null!=(t=null==(e=n.urlConfig)?void 0:e.valueKey)?t:n.valueField)?l:"value"})),{searchContent:c,optionSearchFilter:s}=K(),w=d(null),{field:b,fieldKey:R}=k(),C=l((async function(e){if(c.value=e||"",!n.urlConfig)return w.value=null;try{w.value=await u.addAsync(await h({config:n.urlConfig,cache:n.requestCache,field:b.value}))}catch(e){r(e)&&g(e)}}),300),F=v((()=>w.value?s(w.value,o.value):Array.isArray(n.options)?s(n.options,o.value):[])),j=v((()=>w.value||n.options||[])),x=m(p);return f((()=>n.urlConfig),((e,l)=>{a(e,l)||(w.value=null,e&&(x.setDeps(R.value,e.dependKey||[],(async()=>{w.value=null,t.value=null,!n.lazyRequest&&await C()})),(t.value||!n.lazyRequest)&&C()))}),{immediate:!0}),{labelKey:o,valueKey:i,filterOptions:F,fullOptions:j,fetchData:C}}function x(n,t){e();const u=m(y),o=v((()=>{var e,t,l,u;return null!=(u=null!=(l=null==(t=null==(e=n.wordbook)?void 0:e.render_key)?void 0:t[0])?l:n.labelField)?u:"text"})),i=v((()=>{var e,t,l;return null!=(l=null!=(t=null==(e=n.wordbook)?void 0:e.value_key)?t:n.valueField)?l:"value"})),c=v((()=>{var e;return(null==(e=n.wordbook)?void 0:e.search_key)||[]})),{searchContent:s,optionSearchFilter:p}=K(),h=d(null),{fieldKey:w}=k(),{getSearchRequestInfo:R}=b(),C=l((async function(e){if(s.value=e||"",!n.autograph||!n.wordbook)return h.value=null;try{h.value=await u.addAsync(function(e,t,l){const u={autograph:t,wordbookId:e.id,wordbookType:e.type,fieldKeys:e.search_key,keyword:"",page:1};return{...R(),params:u,key:l,cache:n.requestCache}}(n.wordbook,n.autograph,w.value))}catch(e){r(e)&&g(e)}}),300),F=v((()=>h.value?p(h.value,o.value,c.value):Array.isArray(n.options)?p(n.options,o.value):[])),j=v((()=>h.value||n.options||[]));return f((()=>n.wordbook),((e,l)=>{a(e,l)||(h.value=null,e&&(t.value||!n.lazyRequest)&&C())}),{immediate:!0}),{labelKey:o,valueKey:i,filterOptions:F,fullOptions:j,fetchData:C}}export{C as searchContentMatcher,x as useAutographOptions,F as useRecommendOptions,j as useUrlConfigOptions};
1
+ import{checkInSetupEnv as e,jsonParse as n}from"../../../../shared/utils/index.js";import{useMemoize as t,useDebounceFn as l}from"@vueuse/core";import{identity as u,uniqBy as o,isString as r,isEqual as a,omit as i,isArray as c,isFunction as s}from"lodash-es";import{computed as v,inject as m,ref as d,toRaw as f,watch as y}from"vue";import"../../index.js";import{InjectionAsyncQueue as p,InjectionFormLifeCycleCaller as h,InjectionFormItemDepsCollector as g}from"../constants/index.js";import{createUrlConfigParams as w,formRenderLog as k,keywordMatcher as b}from"../utils/index.js";import{useFormField as R}from"./useFormField.js";import{useFormRequest as C}from"./useFormRequest.js";function K(e,n){const t=d();return v({get:()=>t.value?t.value:e[n],set(e){t.value=e}})}const F=(()=>{const e=t((e=>new RegExp(`(.*)${e.split("").map((e=>`(${function(e){return e.match(/[()\[\]{}$^\/]/)?"\\"+e:e}(e)})`)).join("(.*)")}(.*)`)),{getKey:u});return(n,t)=>t.match(e(n))})();function O(){const e=d();return{searchContent:e,optionSearchFilter:function(n,t,l){if(!e.value)return n;const u=c(l)?l.filter((e=>e&&r(e))):[];return n.filter((n=>function(n,t,l){if(!e.value)return!0;const u=n?n[t]:"";return!!r(u)&&(!!F(e.value,u)||!!b(e.value,n.keyword)||!!l.length&&l.some((t=>r(n[t])&&n[t].includes(e.value))))}(n,t,u)))}}}function j(e,t,l,u,r){const a=K(e,"commonList"),c=K(e,"recentList"),{searchContent:d,optionSearchFilter:f}=O();function y(e){return n(e.itemObj)}const h=v((()=>{var e,n;return null!=(n=null==(e=a.value)?void 0:e.map(y))?n:[]})),g=v((()=>{var e,n;return null!=(n=null==(e=c.value)?void 0:e.map(y))?n:[]})),w=v((()=>{if(!e.recommend||!h.value.length&&!g.value.length)return t.value;const n=o(h.value.concat(g.value),(e=>e[r.value])),l=t.value.filter((e=>n.every((function(n){return n[r.value]!==e[r.value]}))));return[...f(n,u.value),...l]})),{getRecommendRequestInfo:k,getHttpInstance:b}=C();function F(n){const{url:t,getRecommendIds:l}=k(),u=s(l)?l():{},o=s(e.getRecommendInfo)?e.getRecommendInfo():{};return{url:t[n],info:Object.assign({},u,o)}}const{fieldKey:j}=R(),I=m(p);return{postRecommend:async function(n){if(!e.recommend)return;const t=b();if(!t)return;const{url:u,info:o}=F("post"),a=w.value.find((e=>e[r.value]===n));a&&l("postRecommend",await t.post(u,{...o,keyword:"",itemId:r.value,itemObj:JSON.stringify(a)}))},getRecommend:async function(n){if(!e.recommend)return;if(d.value=n,a.value&&c.value&&e.recommendCache)return;const t=await I.addAsync(function(n,t){const{url:l,info:u}=F("get");return{url:l,method:"get",key:n,cache:t,params:{...u,recNum:Math.max(e.commonNum,e.recentNum),keyword:""}}}(j.value,e.recommendCache)),{commonly:l,recently:u}=t.reduce(((e,n)=>("commonly"===n.type?e.commonly.push(i(n,["type"])):"recently"===n.type&&e.recently.push(i(n,["type"])),e)),{commonly:[],recently:[]});a.value=l.slice(0,e.commonNum),c.value=u.slice(0,e.recentNum)},sortedOptions:w}}function I(n,t){e();const u=m(p),o=m(h),i=v((()=>{var e,t,l;return null!=(l=null!=(t=null==(e=n.urlConfig)?void 0:e.nameKey)?t:n.labelField)?l:"text"})),c=v((()=>{var e,t,l;return null!=(l=null!=(t=null==(e=n.urlConfig)?void 0:e.valueKey)?t:n.valueField)?l:"value"})),{searchContent:s,optionSearchFilter:b}=O(),C=d(null),{field:K,fieldKey:F}=R(),j=l((async function(e){if(s.value=e||"",!n.urlConfig)return C.value=null;try{const e=await u.addAsync(await w({config:n.urlConfig,cache:n.requestCache,field:K.value}));f(C.value)!==e&&(C.value=e,o("afterOptionInit",[F.value,C.value]))}catch(e){r(e)&&k(e)}}),300),I=v((()=>C.value?b(C.value,i.value):Array.isArray(n.options)?b(n.options,i.value):[])),x=v((()=>C.value||n.options||[])),q=m(g);return y((()=>n.urlConfig),((e,l)=>{a(e,l)||(C.value=null,e&&(q.setDeps(F.value,e.dependKey||[],(async()=>{C.value=null,t.value=null,!n.lazyRequest&&await j()})),(t.value||!n.lazyRequest)&&j()))}),{immediate:!0}),{labelKey:i,valueKey:c,filterOptions:I,fullOptions:x,fetchData:j}}function x(n,t){e();const u=m(p),o=m(h),i=v((()=>{var e,t,l,u;return null!=(u=null!=(l=null==(t=null==(e=n.wordbook)?void 0:e.render_key)?void 0:t[0])?l:n.labelField)?u:"text"})),c=v((()=>{var e,t,l;return null!=(l=null!=(t=null==(e=n.wordbook)?void 0:e.value_key)?t:n.valueField)?l:"value"})),s=v((()=>{var e;return(null==(e=n.wordbook)?void 0:e.search_key)||[]})),{searchContent:g,optionSearchFilter:w}=O(),b=d(null),{fieldKey:K}=R(),{getSearchRequestInfo:F}=C(),j=l((async function(e){if(g.value=e||"",!n.autograph||!n.wordbook)return b.value=null;try{const e=await u.addAsync(function(e,t,l){const u={autograph:t,wordbookId:e.id,wordbookType:e.type,fieldKeys:e.search_key,keyword:"",page:1};return{...F(),params:u,key:l,cache:n.requestCache}}(n.wordbook,n.autograph,K.value));f(b.value)!==e&&(b.value=e,o("afterOptionInit",[K.value,b.value]))}catch(e){r(e)&&k(e)}}),300),I=v((()=>b.value?w(b.value,i.value,s.value):Array.isArray(n.options)?w(n.options,i.value):[])),x=v((()=>b.value||n.options||[]));return y((()=>n.wordbook),((e,l)=>{a(e,l)||(b.value=null,e&&(t.value||!n.lazyRequest)&&j())}),{immediate:!0}),{labelKey:i,valueKey:c,filterOptions:I,fullOptions:x,fetchData:j}}export{F as searchContentMatcher,x as useAutographOptions,j as useRecommendOptions,I as useUrlConfigOptions};
@@ -1 +1 @@
1
- function e(){return{nuiThemeOverrides:{common:{inputColorDisabled:"#F5F5F5",textColorDisabled:"#000000",placeholderColorDisabled:"#000000",borderColor:"#D5D5D5",errorColor:"#DE1919",placeholderColor:"rgba(0,0,0,0.4)"},Input:{paddingMedium:"8px",paddingSmall:"8px",paddingLarge:"8px",paddingTiny:"8px"},InternalSelection:{paddingSingle:"8px",paddingMultiple:"2px"},Form:{feedbackHeightMedium:"16px",feedbackHeightLarge:"16px",feedbackHeightSmall:"16px",feedbackFontSizeLarge:"12px",feedbackFontSizeMedium:"12px",feedbackFontSizeSmall:"12px",feedbackPadding:"0px"}}}}export{e as useNuiThemeOverrides};
1
+ function e(){return{nuiThemeOverrides:{common:{inputColorDisabled:"#F5F5F5",textColorDisabled:"#000000",placeholderColorDisabled:"#000000",borderColor:"#D5D5D5",errorColor:"#DE1919",placeholderColor:"rgba(0,0,0,0.4)"},Input:{paddingMedium:"8px",paddingSmall:"8px",paddingLarge:"8px",paddingTiny:"8px"},DatePicker:{itemTextColorDisabled:"rgba(194, 194, 194, 1)"},InternalSelection:{paddingSingle:"8px",paddingMultiple:"2px"},Form:{feedbackHeightMedium:"16px",feedbackHeightLarge:"16px",feedbackHeightSmall:"16px",feedbackFontSizeLarge:"12px",feedbackFontSizeMedium:"12px",feedbackFontSizeSmall:"12px",feedbackPadding:"0px"}}}}export{e as useNuiThemeOverrides};
@@ -60,6 +60,7 @@ export declare type FormRenderLifeCycle = Partial<{
60
60
  onSetup(): void;
61
61
  beforeRequest(fieldKey: string, params?: AnyObject): UndefinedAble<AnyObject> | void;
62
62
  afterRequest(fieldKey: string, payload?: any): AnyObject[];
63
+ afterOptionInit(fieldKey: string, options: AnyObject[]): void;
63
64
  }>;
64
65
  export declare type FormRenderProps = Partial<{
65
66
  fieldList: FieldItem[];
@@ -82,6 +83,7 @@ export declare type FormRenderProps = Partial<{
82
83
  lowCodeReactions: FormLowCodeReactions.Config[];
83
84
  linebarAutoHidden: boolean;
84
85
  bordered: boolean | string;
86
+ uniqueCacheData: boolean;
85
87
  }>;
86
88
  export declare type FormBusinessFormatter = (payload: {
87
89
  fieldKey: string;
@@ -1 +1 @@
1
- import{defineComponent as e,createVNode as t,provide as r}from"vue";import{useTheme as s}from"../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import{isFunction as n,range as i}from"lodash-es";import{widthAppend as o}from"../../../shared/utils/index.js";import{NSpace as l,NButton as u}from"naive-ui";const d=e({props:{config:{type:Object,required:!0,default:()=>({})},index:{type:Number,required:!0},length:{type:Number,required:!0}},emits:["cancel","next","toNext"],setup(e,{emit:r,slots:d}){const p=s();function a(e,{skippable:s=!0,skipText:o="跳过",nextText:d="下一步",endText:p="结束引导"},a,c){var f;return t("footer",{class:"guide__stepFooter"},[null!=(f=n(e)?e():null)?f:t(l,{justify:"end",wrapItem:!1},{default:()=>[m(),s?t(u,{ghost:!0,bordered:!1,class:"guide__stepSkipBtn",textColor:"#c5c5c5",onClick:()=>r("cancel")},{default:()=>o}):null,t(u,{type:"primary",class:"guide__stepNextBtn",onClick:()=>r("next")},{default:()=>a===c-1?p:d})]})]);function m(){return t(l,{justify:"start",style:"flex:1"},{default:function(){return i(c).map((e=>t(u,{class:"guide__stepToBtn",bordered:!1,onClick:()=>r("toNext",e)},{default:()=>t("i",{class:["guide__stepToBtnContent",{guide__stepActiveBtn:e===a}]},null)})))}})}}return()=>{const{minWidth:r=240,maxWidth:s=300,pointer:i=!0}=e.config;return t("section",{class:"guide__stepContentWrapper",style:{minWidth:o(r),maxWidth:o(s),...p.value}},[i?t("div",{class:"guide__stepPointerWrapper"},[t("div",{class:"guide__stepPointer"},null),t("div",{class:"guide__stepPointerLine"},null)]):null,(u=d.header,t("header",{class:"guide__stepHeader"},[n(u)?u():null])),(l=d.body,t("section",{class:"guide__stepBody"},[n(l)?l():null])),a(d.footer,e.config,e.index,e.length)]);var l,u}}});function p(s){return s?e({setup(e,{attrs:n,slots:i}){const o=[];let l=(null==s?void 0:s.parent)&&Reflect.get(s.parent,"provides");for(;l;)Object.entries(l).forEach((([e,t])=>{o.includes(e)||(o.push(e),r(e,t))})),l=Object.getPrototypeOf(l);return()=>t(d,n,i)}}):d}export{p as createGuideStep};
1
+ import{defineComponent as e,provide as t,createVNode as r}from"vue";import{useTheme as s}from"../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import{isFunction as n,range as i}from"lodash-es";import{widthAppend as o}from"../../../shared/utils/index.js";import{NSpace as l,NButton as u}from"naive-ui";const d=e({props:{config:{type:Object,required:!0,default:()=>({})},index:{type:Number,required:!0},length:{type:Number,required:!0}},emits:["cancel","next","toNext"],setup(e,{emit:t,slots:d}){const p=s();function a(e,{skippable:s=!0,skipText:o="跳过",nextText:d="下一步",endText:p="结束引导"},a,c){var f;return r("footer",{class:"guide__stepFooter"},[null!=(f=n(e)?e():null)?f:r(l,{justify:"end",wrapItem:!1},{default:()=>[m(),s?r(u,{ghost:!0,bordered:!1,class:"guide__stepSkipBtn",textColor:"#c5c5c5",onClick:()=>t("cancel")},{default:()=>o}):null,r(u,{type:"primary",class:"guide__stepNextBtn",onClick:()=>t("next")},{default:()=>a===c-1?p:d})]})]);function m(){return r(l,{justify:"start",style:"flex:1"},{default:function(){return i(c).map((e=>r(u,{class:"guide__stepToBtn",bordered:!1,onClick:()=>t("toNext",e)},{default:()=>r("i",{class:["guide__stepToBtnContent",{guide__stepActiveBtn:e===a}]},null)})))}})}}return()=>{const{minWidth:t=240,maxWidth:s=300,pointer:i=!0}=e.config;return r("section",{class:"guide__stepContentWrapper",style:{minWidth:o(t),maxWidth:o(s),...p.value}},[i?r("div",{class:"guide__stepPointerWrapper"},[r("div",{class:"guide__stepPointer"},null),r("div",{class:"guide__stepPointerLine"},null)]):null,(u=d.header,r("header",{class:"guide__stepHeader"},[n(u)?u():null])),(l=d.body,r("section",{class:"guide__stepBody"},[n(l)?l():null])),a(d.footer,e.config,e.index,e.length)]);var l,u}}});function p(s){return s?e({setup(e,{attrs:n,slots:i}){const o=[];let l=(null==s?void 0:s.parent)&&Reflect.get(s.parent,"provides");for(;l;)Object.entries(l).forEach((([e,r])=>{o.includes(e)||(o.push(e),t(e,r))})),l=Object.getPrototypeOf(l);return()=>r(d,n,i)}}):d}export{p as createGuideStep};
@@ -1 +1 @@
1
- import{defineComponent as e,ref as l,watch as a,openBlock as t,createElementBlock as s,createCommentVNode as i,withDirectives as r,createElementVNode as o,normalizeClass as c,createVNode as n,unref as d,withCtx as f,Fragment as p,renderList as y,createBlock as u,createTextVNode as b,toDisplayString as m,vShow as v}from"vue";import{NAnchor as g,NAnchorLink as h}from"naive-ui";import C from"./components/label-classify.vue.js";import L from"../../../_virtual/plugin-vue_export-helper.js";const w={key:0,class:"label-disable-wrap"},x=[o("p",{class:"label-disable-title"},"无可选标签",-1),o("p",{class:"label-disable-desc"},"请联系管理员进行标签管理设置",-1)],I={style:{height:"100%"}},k={class:"label-wrap"},N=["id"];var _=L(e({__name:"LabelFormContent",props:{selectedList:{type:Array,default:()=>[]},categoryList:{type:Array,default:()=>[]},isChangeWindow:{type:Boolean,default:!1},explicit:{type:Boolean,default:!1}},emits:["explicitOnChange"],setup(e,{expose:L,emit:_}){const S=e,A=l(),F=l(null),O=()=>{var e;return null==(e=F.value)?void 0:e.querySelector(".right-label-wrap")},$=e=>{e.preventDefault()},W=(e,l,a)=>{let t=A.value||[];if(e)t.push({classifyId:a.classifyId,classifyName:a.classifyName,labelCode:l.labelCode,labelShowText:l.labelShowText,backgroundColor:l.backgroundColor});else{const e=t.findIndex((e=>e.classifyId===a.classifyId&&e.labelCode===l.labelCode));e>-1&&t.splice(e,1)}A.value=t,S.explicit&&_("explicitOnChange",t)};return a((()=>S.selectedList),(e=>{if(e){let l=Array.isArray(e)?e:[];A.value=JSON.parse(JSON.stringify(l))}}),{immediate:!0,deep:!0}),L({handleLabelForm:e=>{e([...A.value||[]])}}),(l,a)=>(t(),s("div",{class:"c-iho-label-form-content",ref_key:"labelFormContent",ref:F},[e.categoryList.length?i("v-if",!0):(t(),s("div",w,x)),r(o("div",I,[o("div",k,[o("div",{class:c(["left-label-wrap",{"total-left-label-wrap":e.isChangeWindow}])},[n(d(g),{"offset-target":O,type:"block",onClick:$},{default:f((()=>[(t(!0),s(p,null,y(e.categoryList,(e=>(t(),u(d(h),{key:e.classifyId,href:`#${e.classifyId}-${e.classifyName}`,title:e.classifyName},null,8,["href","title"])))),128))])),_:1})],2),o("div",{class:c(["right-label-wrap",{"total-right-label-wrap":e.isChangeWindow}])},[(t(!0),s(p,null,y(e.categoryList,((e,l)=>(t(),s("div",{key:l,class:"edit-label-content"},[o("div",{class:"edit-label",id:`${e.classifyId}-${e.classifyName}`},[b(m(e.classifyName),1),i(" <span class=\"edit-label-type\">({{ v.multipleChoice == 2 ? '单' : '多' }}选)</span> ")],8,N),n(C,{categoryItem:e,selectedList:A.value,handleLabelChange:W},null,8,["categoryItem","selectedList"])])))),128))],2)])],512),[[v,e.categoryList.length>0]])],512))}}),[["__file","LabelFormContent.vue"]]);export{_ as default};
1
+ import e from"./LabelFormContent.vue2.js";import r from"../../../_virtual/_plugin-vue_export-helper.js";var o=r(e,[["__file","LabelFormContent.vue"]]);export{o as default};
@@ -0,0 +1 @@
1
+ import{defineComponent as e,ref as l,watch as a,openBlock as t,createElementBlock as s,createCommentVNode as i,withDirectives as o,createElementVNode as r,normalizeClass as c,createVNode as d,unref as n,withCtx as f,Fragment as y,renderList as p,createBlock as b,createTextVNode as u,toDisplayString as m,vShow as g}from"vue";import{NAnchor as v,NAnchorLink as h}from"naive-ui";import C from"./components/label-classify.vue.js";const w={key:0,class:"label-disable-wrap"},L=[r("p",{class:"label-disable-title"},"无可选标签",-1),r("p",{class:"label-disable-desc"},"请联系管理员进行标签管理设置",-1)],I={style:{height:"100%"}},x={class:"label-wrap"},k=["id"];var N=e({__name:"LabelFormContent",props:{selectedList:{type:Array,default:()=>[]},categoryList:{type:Array,default:()=>[]},isChangeWindow:{type:Boolean,default:!1},explicit:{type:Boolean,default:!1}},emits:["explicitOnChange"],setup(e,{expose:N,emit:S}){const A=e,O=l(),$=l(null),_=()=>{var e;return null==(e=$.value)?void 0:e.querySelector(".right-label-wrap")},F=e=>{e.preventDefault()},W=(e,l,a)=>{let t=O.value||[];if(e)t.push({classifyId:a.classifyId,classifyName:a.classifyName,labelCode:l.labelCode,labelShowText:l.labelShowText,backgroundColor:l.backgroundColor});else{const e=t.findIndex((e=>e.classifyId===a.classifyId&&e.labelCode===l.labelCode));e>-1&&t.splice(e,1)}O.value=t,A.explicit&&S("explicitOnChange",t)};return a((()=>A.selectedList),(e=>{if(e){let l=Array.isArray(e)?e:[];O.value=JSON.parse(JSON.stringify(l))}}),{immediate:!0,deep:!0}),N({handleLabelForm:e=>{e([...O.value||[]])}}),(l,a)=>(t(),s("div",{class:"c-iho-label-form-content",ref_key:"labelFormContent",ref:$},[e.categoryList.length?i("v-if",!0):(t(),s("div",w,L)),o(r("div",I,[r("div",x,[r("div",{class:c(["left-label-wrap",{"total-left-label-wrap":e.isChangeWindow}])},[d(n(v),{"offset-target":_,type:"block",onClick:F},{default:f((()=>[(t(!0),s(y,null,p(e.categoryList,(e=>(t(),b(n(h),{key:e.classifyId,href:`#${e.classifyId}-${e.classifyName}`,title:e.classifyName},null,8,["href","title"])))),128))])),_:1})],2),r("div",{class:c(["right-label-wrap",{"total-right-label-wrap":e.isChangeWindow}])},[(t(!0),s(y,null,p(e.categoryList,((e,l)=>(t(),s("div",{key:l,class:"edit-label-content"},[r("div",{class:"edit-label",id:`${e.classifyId}-${e.classifyName}`},[u(m(e.classifyName),1),i(" <span class=\"edit-label-type\">({{ v.multipleChoice == 2 ? '单' : '多' }}选)</span> ")],8,k),d(C,{categoryItem:e,selectedList:O.value,handleLabelChange:W},null,8,["categoryItem","selectedList"])])))),128))],2)])],512),[[g,e.categoryList.length>0]])],512))}});export{N as default};
@@ -1 +1 @@
1
- import{defineComponent as e,ref as l,reactive as i,watch as a,openBlock as t,createElementBlock as o,Fragment as n,createElementVNode as s,createBlock as d,unref as c,withCtx as r,renderList as p,normalizeStyle as h,createVNode as g,toDisplayString as u,createTextVNode as m,createCommentVNode as x,normalizeClass as b}from"vue";import{NSpace as f,NTag as C,NTooltip as y,NIcon as v,NModal as w}from"naive-ui";import{AddCircleOutline as L}from"@vicons/ionicons5";import W from"./LabelFormContent.vue.js";import k from"../../../_virtual/plugin-vue_export-helper.js";const _={class:"c-iho-select-label"},H={key:1,class:"outexplicit"},z=s("span",null,"选择标签",-1),S={class:"svg-wrap"};var V=k(e({__name:"SelectLabel",props:{selectedList:{type:Array,default:()=>[]},categoryList:{type:Array,default:()=>[]},explicit:{type:Boolean,default:!1}},emits:["onChange"],setup(e,{emit:k}){const V=e,A=l(null),F=l(),I=i({labelVisible:!1,isChangeWindow:!1,modalWidth:"763px",modalHeight:"404px",maxHeight:"404px"}),O=()=>{V.explicit||(I.labelVisible=!0)},N=()=>{V.explicit||(I.modalWidth="763px",I.modalHeight="404px",I.maxHeight="404px",I.isChangeWindow=!1,I.labelVisible=!1)},j=()=>{I.isChangeWindow=!I.isChangeWindow;let e=document.body.clientHeight;I.modalWidth="763px"===I.modalWidth?"100%":"763px",I.modalHeight="404px"===I.modalHeight?e-110+"px":"404px",I.maxHeight="auto"===I.modalHeight?"404px":"none"},E=()=>{var e;null==(e=A.value)||e.handleLabelForm((e=>{k("onChange",[...e]),F.value=e,N()}))},J=()=>{E()};return a((()=>V.selectedList),(e=>{if(e){let l=Array.isArray(e)?e:[];F.value=JSON.parse(JSON.stringify(l))}}),{immediate:!0,deep:!0}),(l,i)=>(t(),o(n,null,[s("div",_,[e.explicit?x("v-if",!0):(t(),d(c(f),{key:0,align:"center"},{default:r((()=>[(t(!0),o(n,null,p(F.value,(e=>{return t(),d(c(C),{bordered:!1,key:`${e.classifyId}-${e.labelCode}`,class:"select-label-active",style:h((l=e,{background:l.backgroundColor,color:"#fff",borderColor:l.backgroundColor})),size:"small",closable:"",onClose:l=>(e=>{const l=F.value||[],i=l.findIndex((l=>l.classifyId==e.classifyId&&l.labelCode==e.labelCode));i>-1&&l.splice(i,1),F.value=l,k("onChange",[...l])})(e)},{default:r((()=>[g(c(y),{placement:"top-start",duration:0},{trigger:r((()=>[s("span",null,u(e.labelShowText),1)])),default:r((()=>[s("span",null,u(e.labelShowText),1)])),_:2},1024)])),_:2},1032,["style","onClose"]);var l})),128)),e.explicit?x("v-if",!0):(t(),o("span",{key:0,class:"form-add-icon form-add-icon-label",onClick:O},[g(c(v),{class:"add-icon",component:c(L)},null,8,["component"]),m(" 新增 ")]))])),_:1})),e.explicit?(t(),o("div",H,[g(W,{ref_key:"labelFormContentRef",ref:A,categoryList:e.categoryList,selectedList:e.selectedList,isChangeWindow:I.isChangeWindow,explicit:e.explicit,onExplicitOnChange:J},null,8,["categoryList","selectedList","isChangeWindow","explicit"])])):x("v-if",!0)]),x(" 弹窗 "),g(c(w),{preset:"dialog",class:b(["label-form-modal-wrap modal-wrap standard-modal standard-modal-white",{"modal-screen":I.isChangeWindow}]),show:I.labelVisible,"onUpdate:show":i[0]||(i[0]=e=>I.labelVisible=e),onPositiveClick:E,onNegativeClick:N,onClose:N,"mask-closable":!1,"close-on-esc":!1,"show-icon":!1,"negative-text":"取消","positive-text":"确定",style:h({width:I.modalWidth})},{header:r((()=>[z,s("div",S,[s("i",{onClick:j,class:b(["iconfont-select-label",I.isChangeWindow?"icon-iho-select-label-menzhenyishengzhanxitongtubiaozuixiaohua2":"icon-iho-select-label-menzhenyishengzhanxitongtubiaozuidahua"])},null,2)])])),default:r((()=>[g(W,{ref_key:"labelFormContentRef",ref:A,categoryList:e.categoryList,selectedList:F.value,isChangeWindow:I.isChangeWindow,explicit:e.explicit,onExplicitOnChange:J},null,8,["categoryList","selectedList","isChangeWindow","explicit"])])),_:1},8,["show","class","style"])],64))}}),[["__file","SelectLabel.vue"]]);export{V as default};
1
+ import e from"./SelectLabel.vue2.js";import l from"../../../_virtual/_plugin-vue_export-helper.js";var r=l(e,[["__file","SelectLabel.vue"]]);export{r as default};
@@ -0,0 +1 @@
1
+ import{defineComponent as e,ref as l,reactive as i,watch as a,openBlock as t,createElementBlock as o,Fragment as n,createElementVNode as s,createBlock as d,unref as c,withCtx as r,renderList as p,normalizeStyle as h,createVNode as g,toDisplayString as m,createTextVNode as u,createCommentVNode as x,normalizeClass as b}from"vue";import{NSpace as f,NTag as C,NTooltip as y,NIcon as v,NModal as w}from"naive-ui";import{AddCircleOutline as L}from"@vicons/ionicons5";import W from"./LabelFormContent.vue.js";const k={class:"c-iho-select-label"},H={key:1,class:"outexplicit"},_=s("span",null,"选择标签",-1),z={class:"svg-wrap"};var S=e({__name:"SelectLabel",props:{selectedList:{type:Array,default:()=>[]},categoryList:{type:Array,default:()=>[]},explicit:{type:Boolean,default:!1}},emits:["onChange"],setup(e,{emit:S}){const V=e,A=l(null),F=l(),I=i({labelVisible:!1,isChangeWindow:!1,modalWidth:"763px",modalHeight:"404px",maxHeight:"404px"}),O=()=>{V.explicit||(I.labelVisible=!0)},N=()=>{V.explicit||(I.modalWidth="763px",I.modalHeight="404px",I.maxHeight="404px",I.isChangeWindow=!1,I.labelVisible=!1)},E=()=>{I.isChangeWindow=!I.isChangeWindow;let e=document.body.clientHeight;I.modalWidth="763px"===I.modalWidth?"100%":"763px",I.modalHeight="404px"===I.modalHeight?e-110+"px":"404px",I.maxHeight="auto"===I.modalHeight?"404px":"none"},J=()=>{var e;null==(e=A.value)||e.handleLabelForm((e=>{S("onChange",[...e]),F.value=e,N()}))},R=()=>{J()};return a((()=>V.selectedList),(e=>{if(e){let l=Array.isArray(e)?e:[];F.value=JSON.parse(JSON.stringify(l))}}),{immediate:!0,deep:!0}),(l,i)=>(t(),o(n,null,[s("div",k,[e.explicit?x("v-if",!0):(t(),d(c(f),{key:0,align:"center"},{default:r((()=>[(t(!0),o(n,null,p(F.value,(e=>{return t(),d(c(C),{bordered:!1,key:`${e.classifyId}-${e.labelCode}`,class:"select-label-active",style:h((l=e,{background:l.backgroundColor,color:"#fff",borderColor:l.backgroundColor})),size:"small",closable:"",onClose:l=>(e=>{const l=F.value||[],i=l.findIndex((l=>l.classifyId==e.classifyId&&l.labelCode==e.labelCode));i>-1&&l.splice(i,1),F.value=l,S("onChange",[...l])})(e)},{default:r((()=>[g(c(y),{placement:"top-start",duration:0},{trigger:r((()=>[s("span",null,m(e.labelShowText),1)])),default:r((()=>[s("span",null,m(e.labelShowText),1)])),_:2},1024)])),_:2},1032,["style","onClose"]);var l})),128)),e.explicit?x("v-if",!0):(t(),o("span",{key:0,class:"form-add-icon form-add-icon-label",onClick:O},[g(c(v),{class:"add-icon",component:c(L)},null,8,["component"]),u(" 新增 ")]))])),_:1})),e.explicit?(t(),o("div",H,[g(W,{ref_key:"labelFormContentRef",ref:A,categoryList:e.categoryList,selectedList:e.selectedList,isChangeWindow:I.isChangeWindow,explicit:e.explicit,onExplicitOnChange:R},null,8,["categoryList","selectedList","isChangeWindow","explicit"])])):x("v-if",!0)]),x(" 弹窗 "),g(c(w),{preset:"dialog",class:b(["label-form-modal-wrap modal-wrap standard-modal standard-modal-white",{"modal-screen":I.isChangeWindow}]),show:I.labelVisible,"onUpdate:show":i[0]||(i[0]=e=>I.labelVisible=e),onPositiveClick:J,onNegativeClick:N,onClose:N,"mask-closable":!1,"close-on-esc":!1,"show-icon":!1,"negative-text":"取消","positive-text":"确定",style:h({width:I.modalWidth})},{header:r((()=>[_,s("div",z,[s("i",{onClick:E,class:b(["iconfont-select-label",I.isChangeWindow?"icon-iho-select-label-menzhenyishengzhanxitongtubiaozuixiaohua2":"icon-iho-select-label-menzhenyishengzhanxitongtubiaozuidahua"])},null,2)])])),default:r((()=>[g(W,{ref_key:"labelFormContentRef",ref:A,categoryList:e.categoryList,selectedList:F.value,isChangeWindow:I.isChangeWindow,explicit:e.explicit,onExplicitOnChange:R},null,8,["categoryList","selectedList","isChangeWindow","explicit"])])),_:1},8,["show","class","style"])],64))}});export{S as default};
@@ -1 +1 @@
1
- import{defineComponent as e,ref as l,openBlock as a,createElementBlock as t,unref as o,Fragment as s,renderList as c,createBlock as d,normalizeStyle as r,withCtx as n,createVNode as i,createElementVNode as u,toDisplayString as b}from"vue";import{NTag as p,NTooltip as y}from"naive-ui";import f from"../../../../_virtual/plugin-vue_export-helper.js";const g={class:"edit-content"},h={key:0,class:"label-disable-wrap"},m=[u("p",{class:"label-disable-title"},"无可选标签",-1),u("p",{class:"label-disable-desc"},"请联系管理员进行标签管理设置",-1)],k={key:1,class:"label-content"};var v=f(e({__name:"label-classify",props:{categoryItem:{type:Object,default:()=>({})},selectedList:{type:Array,default:()=>[]},handleLabelChange:{type:Function,default:()=>({})}},setup(e){var f;const v=e,C="rgb(85, 133, 245)";let _=l((null==(f=v.categoryItem)?void 0:f.labelList)||[]);const I=e=>v.selectedList.findIndex((l=>l.classifyId===v.categoryItem.classifyId&&l.labelCode===e.labelCode))>-1;function x(e){return I(e)?{background:e.backgroundColor||C,borderColor:e.backgroundColor||C}:{}}return(l,f)=>(a(),t("div",g,[o(_)&&0!==o(_).length?(a(),t("div",k,[(a(!0),t(s,null,c(o(_),(l=>(a(),d(o(p),{checkable:"",checked:I(l),"onUpdate:checked":a=>((e,l,a)=>{v.handleLabelChange(e,l,a)})(a,l,e.categoryItem),key:l.labelCode,style:r(x(l))},{default:n((()=>[i(o(y),{placement:"top-start",duration:0},{trigger:n((()=>[u("span",null,b(l.labelShowText),1)])),default:n((()=>[u("span",null,b(l.labelShowText),1)])),_:2},1024)])),_:2},1032,["checked","onUpdate:checked","style"])))),128))])):(a(),t("div",h,m))]))}}),[["__file","label-classify.vue"]]);export{v as default};
1
+ import e from"./label-classify.vue2.js";import l from"../../../../_virtual/_plugin-vue_export-helper.js";var r=l(e,[["__file","label-classify.vue"]]);export{r as default};
@@ -0,0 +1 @@
1
+ import{defineComponent as e,ref as l,openBlock as a,createElementBlock as t,unref as c,Fragment as d,renderList as o,createBlock as s,normalizeStyle as n,withCtx as r,createVNode as i,createElementVNode as b,toDisplayString as u}from"vue";import{NTag as p,NTooltip as y}from"naive-ui";const f={class:"edit-content"},g={key:0,class:"label-disable-wrap"},h=[b("p",{class:"label-disable-title"},"无可选标签",-1),b("p",{class:"label-disable-desc"},"请联系管理员进行标签管理设置",-1)],k={key:1,class:"label-content"};var m=e({__name:"label-classify",props:{categoryItem:{type:Object,default:()=>({})},selectedList:{type:Array,default:()=>[]},handleLabelChange:{type:Function,default:()=>({})}},setup(e){var m;const v=e,C="rgb(85, 133, 245)";let I=l((null==(m=v.categoryItem)?void 0:m.labelList)||[]);const L=e=>v.selectedList.findIndex((l=>l.classifyId===v.categoryItem.classifyId&&l.labelCode===e.labelCode))>-1;function x(e){return L(e)?{background:e.backgroundColor||C,borderColor:e.backgroundColor||C}:{}}return(l,m)=>(a(),t("div",f,[c(I)&&0!==c(I).length?(a(),t("div",k,[(a(!0),t(d,null,o(c(I),(l=>(a(),s(c(p),{checkable:"",checked:L(l),"onUpdate:checked":a=>((e,l,a)=>{v.handleLabelChange(e,l,a)})(a,l,e.categoryItem),key:l.labelCode,style:n(x(l))},{default:r((()=>[i(c(y),{placement:"top-start",duration:0},{trigger:r((()=>[b("span",null,u(l.labelShowText),1)])),default:r((()=>[b("span",null,u(l.labelShowText),1)])),_:2},1024)])),_:2},1032,["checked","onUpdate:checked","style"])))),128))])):(a(),t("div",g,h))]))}});export{m as default};
@@ -1 +1 @@
1
- import{defineComponent as e,computed as t,provide as o,ref as a,watch as l,resolveComponent as n,openBlock as s,createElementBlock as r,unref as i,normalizeStyle as u,createBlock as d,resolveDynamicComponent as c,createElementVNode as f,createVNode as m,mergeProps as v,createSlots as p,renderList as b,withCtx as h,createCommentVNode as g,renderSlot as x,normalizeProps as k,guardReactiveProps as y}from"vue";import{useTheme as C}from"../../../shared/hooks/useTheme.js";import{useDebounceFn as D}from"@vueuse/core";import"date-fns";import{isString as $,isFunction as j,pick as _}from"lodash-es";import{widthAppend as w,uuidGenerator as I}from"../../../shared/utils/index.js";import{promiseTimeout as H}from"@vueuse/shared";import{VxeTableEventNameList as T,InjectionIhoTableEmits as A,InjectionIhoTableAnnotation as L,InjectionIhoTableUUID as R,InjectionIhoTableInstance as E,InjectionIhoTableConfig as F,InjectionIhoTableFieldList as O,InjectionIhoTableHandler as S}from"./constants/index.js";import{createTableHooks as W,applyTableConfigHooks as q,applyTableFieldHooks as z,createTableEventHandlers as B,createDomInsertComponent as G,createDataTransfer as J}from"./hooks/tapHooks/index.js";import{provideIhoTableEventListener as K}from"./hooks/tapHooks/useEventHooks.js";import{eventName2EventListener as M}from"./utils/index.js";import N from"../../../_virtual/plugin-vue_export-helper.js";const P=["id"];var Q=N(e({__name:"IhoTable",props:{tableConfig:{type:Object,default:()=>({})},fieldList:{type:Array,default:()=>[]},tableData:{type:Array,default:()=>[]},annotation:{type:Object}},emits:["formChange","settingClick","formClick","keyboard","rowDrag",...T],setup(e,{expose:T,emit:N}){var Q,U;const V=e,X=C({"--c-border-color":"#e2e2e2","--c-head-bg-color":"#f2f2f2","--c-hover-color":"#f7f7f7"}),Y=t((()=>{var e,t;const o=null!=(t=null==(e=V.tableConfig)?void 0:e.height)?t:"100%";return{height:"auto"===o?"100%":$(o)&&(o.includes("calc")||o.endsWith("%"))?o:w(o)}})),Z=K(),ee=function(e,...t){N(e,...t);const o=i(le)[M(e)];j(o)&&o(...t),Z.trigger(e,...t)};o(A,ee);const te=W();o(L,t((()=>V.annotation)));const oe=I();o(R,oe);const ae=a();o(E,ae);const le=a({uuid:null!=(U=null==(Q=V.tableConfig)?void 0:Q.uuid)?U:oe});o(F,le);const ne=D(se,10);function se(){le.value=q(te,V.tableConfig,{$table:ae,emits:ee}),le.value.uuid=oe}const re=a([]);o(O,re);const ie=D(ue,10);function ue(){re.value=z(te,V.fieldList,le.value,{$table:ae,emits:ee})}const de=J(te,le,ae),ce=a([]);async function fe(){var e;ce.value=await de(V.tableData),null==(e=ae.value)||e.recalculate(!0)}const me={updateTableDataRef:D(fe,10),updateConfigRef:ne,updateFieldListRef:ie};o(S,me);const ve=B({hooks:te,config:le,$table:ae,context:me,emits:ee}),pe=t((()=>({...le.value,...ve})));let be=!1,he=!1,ge=!1;const xe=D((()=>{be&&se(),he&&ue(),ge&&fe(),be=!1,he=!1,ge=!1}),10);l((()=>V.tableConfig),(()=>{be=!0,he=!0,ge=!0,xe()}),{deep:!0}),l((()=>V.fieldList),(()=>{he=!0,ge=!0,xe()}),{deep:!0}),l([()=>[...V.tableData],()=>{var e;return null==(e=V.tableData)?void 0:e.length}],(()=>{ge=!0,xe()})),l([()=>V.tableData,()=>{var e;return null==(e=V.tableData)?void 0:e.length}],(async()=>{var e,t;(null==(e=le.value.treeConfig)?void 0:e.expandAll)&&(await H(11),null==(t=ae.value)||t.setAllTreeExpand(!0))})),se(),ue(),fe();const{header:ke,footer:ye}=G(te);function Ce(e){return _(e,["row","rowIndex","$rowIndex","column","columnIndex","$columnIndex","_columnIndex","checked","disabled","indeterminate"])}return T({$table:ae,async loadData(e){var t;null==(t=ae.value)||t.loadData(await de(e))},setSort:(e,t)=>({field:e,value:t}),setFilter:(e,t)=>({field:e,value:t}),reload(){var e,t;null==(e=ae.value)||e.loadColumn([]),null==(t=ae.value)||t.loadData([]),se(),ue(),fe()},...te.exposeHooks.expose.call({},le,{$table:ae,emits:ee})}),te.setupHooks.setup.call(le,re,{$table:ae,emits:ee}),(e,t)=>{const o=n("vxe-grid");return s(),r("section",{class:"iho-table",id:i(oe),style:u(i(X))},[(s(),d(c(i(ke)))),f("section",{style:u(i(Y))},[m(o,v({ref_key:"$table",ref:ae},i(pe),{columns:re.value,data:ce.value}),p({_:2},[b(e.$slots,((t,o)=>({name:o,fn:h((t=>[g(" 实际上所有的vxe-grid插槽都支持 "),x(e.$slots,o,k(y(Ce(t))))]))})))]),1040,["columns","data"])],4),(s(),d(c(i(ye))))],12,P)}}}),[["__file","IhoTable.vue"]]);export{Q as default};
1
+ import e from"./IhoTable.vue2.js";import r from"../../../_virtual/_plugin-vue_export-helper.js";var o=r(e,[["__file","IhoTable.vue"]]);export{o as default};
@@ -0,0 +1 @@
1
+ import{defineComponent as e,computed as t,provide as a,ref as o,watch as l,resolveComponent as n,openBlock as s,createElementBlock as r,unref as i,normalizeStyle as u,createBlock as d,resolveDynamicComponent as c,createElementVNode as f,createVNode as m,mergeProps as v,createSlots as p,renderList as b,withCtx as h,createCommentVNode as g,renderSlot as x,normalizeProps as k,guardReactiveProps as y}from"vue";import{useTheme as C}from"../../../shared/hooks/useTheme.js";import{useDebounceFn as D}from"@vueuse/core";import"date-fns";import{isString as $,isFunction as j,pick as w}from"lodash-es";import{widthAppend as I,uuidGenerator as H}from"../../../shared/utils/index.js";import{promiseTimeout as _}from"@vueuse/shared";import{VxeTableEventNameList as A,InjectionIhoTableEmits as L,InjectionIhoTableAnnotation as T,InjectionIhoTableUUID as R,InjectionIhoTableInstance as E,InjectionIhoTableConfig as F,InjectionIhoTableFieldList as O,InjectionIhoTableHandler as S}from"./constants/index.js";import{createTableHooks as W,applyTableConfigHooks as q,applyTableFieldHooks as z,createTableEventHandlers as B,createDomInsertComponent as G,createDataTransfer as J}from"./hooks/tapHooks/index.js";import{provideIhoTableEventListener as K}from"./hooks/tapHooks/useEventHooks.js";import{eventName2EventListener as M}from"./utils/index.js";const N=["id"];var P=e({__name:"IhoTable",props:{tableConfig:{type:Object,default:()=>({})},fieldList:{type:Array,default:()=>[]},tableData:{type:Array,default:()=>[]},annotation:{type:Object}},emits:["formChange","settingClick","formClick","keyboard","rowDrag",...A],setup(e,{expose:A,emit:P}){var Q,U;const V=e,X=C({"--c-border-color":"#e2e2e2","--c-head-bg-color":"#f2f2f2","--c-hover-color":"#f7f7f7"}),Y=t((()=>{var e,t;const a=null!=(t=null==(e=V.tableConfig)?void 0:e.height)?t:"100%";return{height:"auto"===a?"100%":$(a)&&(a.includes("calc")||a.endsWith("%"))?a:I(a)}})),Z=K(),ee=function(e,...t){P(e,...t);const a=i(le)[M(e)];j(a)&&a(...t),Z.trigger(e,...t)};a(L,ee);const te=W();a(T,t((()=>V.annotation)));const ae=H();a(R,ae);const oe=o();a(E,oe);const le=o({uuid:null!=(U=null==(Q=V.tableConfig)?void 0:Q.uuid)?U:ae});a(F,le);const ne=D(se,10);function se(){le.value=q(te,V.tableConfig,{$table:oe,emits:ee}),le.value.uuid=ae}const re=o([]);a(O,re);const ie=D(ue,10);function ue(){re.value=z(te,V.fieldList,le.value,{$table:oe,emits:ee})}const de=J(te,le,oe),ce=o([]);async function fe(){var e;ce.value=await de(V.tableData),null==(e=oe.value)||e.recalculate(!0)}const me={updateTableDataRef:D(fe,10),updateConfigRef:ne,updateFieldListRef:ie};a(S,me);const ve=B({hooks:te,config:le,$table:oe,context:me,emits:ee}),pe=t((()=>({...le.value,...ve})));let be=!1,he=!1,ge=!1;const xe=D((()=>{be&&se(),he&&ue(),ge&&fe(),be=!1,he=!1,ge=!1}),10);l((()=>V.tableConfig),(()=>{be=!0,he=!0,ge=!0,xe()}),{deep:!0}),l((()=>V.fieldList),(()=>{he=!0,ge=!0,xe()}),{deep:!0}),l([()=>[...V.tableData],()=>{var e;return null==(e=V.tableData)?void 0:e.length}],(()=>{ge=!0,xe()})),l([()=>V.tableData,()=>{var e;return null==(e=V.tableData)?void 0:e.length}],(async()=>{var e,t;(null==(e=le.value.treeConfig)?void 0:e.expandAll)&&(await _(11),null==(t=oe.value)||t.setAllTreeExpand(!0))})),se(),ue(),fe();const{header:ke,footer:ye}=G(te);function Ce(e){return w(e,["row","rowIndex","$rowIndex","column","columnIndex","$columnIndex","_columnIndex","checked","disabled","indeterminate"])}return A({$table:oe,async loadData(e){var t;null==(t=oe.value)||t.loadData(await de(e))},setSort:(e,t)=>({field:e,value:t}),setFilter:(e,t)=>({field:e,value:t}),reload(){var e,t;null==(e=oe.value)||e.loadColumn([]),null==(t=oe.value)||t.loadData([]),se(),ue(),fe()},...te.exposeHooks.expose.call({},le,{$table:oe,emits:ee})}),te.setupHooks.setup.call(le,re,{$table:oe,emits:ee}),(e,t)=>{const a=n("vxe-grid");return s(),r("section",{class:"iho-table",id:i(ae),style:u(i(X))},[(s(),d(c(i(ke)))),f("section",{style:u(i(Y))},[m(a,v({ref_key:"$table",ref:oe},i(pe),{columns:re.value,data:ce.value}),p({_:2},[b(e.$slots,((t,a)=>({name:a,fn:h((t=>[g(" 实际上所有的vxe-grid插槽都支持 "),x(e.$slots,a,k(y(Ce(t))))]))})))]),1040,["columns","data"])],4),(s(),d(c(i(ye))))],12,N)}}});export{P as default};
@@ -1 +1 @@
1
- import{defineComponent as e,reactive as t,openBlock as a,createBlock as l,unref as o}from"vue";import r from"../../../../date-picker/index.js";import{subDays as n,subMonths as i}from"date-fns";import p from"../../../../../_virtual/plugin-vue_export-helper.js";var u=p(e({__name:"filter",props:{payload:{type:Object,required:!0}},setup(e){var p,u,d;const m=e,f=t((null==(d=null==(u=null==(p=m.payload)?void 0:p.column)?void 0:u.filters)?void 0:d[0])||{data:void 0}),v=t({"近一周":()=>[n(new Date,7).getTime(),(new Date).getTime()],"近一个月":()=>[i(new Date,1).getTime(),(new Date).getTime()]});function s(e,t){var a;f.value=t,(null==(a=m.payload)?void 0:a.$panel)&&(m.payload.$panel.changeOption(null,!!t,f),m.payload.$panel.confirmFilter(new CustomEvent("click")))}return(e,t)=>(a(),l(o(r),{type:"datetimerange",panel:"",clearable:"","default-time":["00:00:00","23:59:59"],"formatted-value":f.data,"onUpdate:formatted-value":t[0]||(t[0]=e=>f.data=e),shortcuts:v,onConfirm:s},null,8,["formatted-value","shortcuts"]))}}),[["__file","filter.vue"]]);export{u as default};
1
+ import e from"./filter.vue2.js";import r from"../../../../../_virtual/_plugin-vue_export-helper.js";var t=r(e,[["__file","filter.vue"]]);export{t as default};
@@ -0,0 +1 @@
1
+ import{defineComponent as e,reactive as a,openBlock as t,createBlock as l,unref as o}from"vue";import n from"../../../../date-picker/index.js";import{subDays as r,subMonths as i}from"date-fns";var d=e({__name:"filter",props:{payload:{type:Object,required:!0}},setup(e){var d,p,u;const m=e,f=a((null==(u=null==(p=null==(d=m.payload)?void 0:d.column)?void 0:p.filters)?void 0:u[0])||{data:void 0}),v=a({"近一周":()=>[r(new Date,7).getTime(),(new Date).getTime()],"近一个月":()=>[i(new Date,1).getTime(),(new Date).getTime()]});function c(e,a){var t;f.value=a,(null==(t=m.payload)?void 0:t.$panel)&&(m.payload.$panel.changeOption(null,!!a,f),m.payload.$panel.confirmFilter(new CustomEvent("click")))}return(e,a)=>(t(),l(o(n),{type:"datetimerange",panel:"",clearable:"","default-time":["00:00:00","23:59:59"],"formatted-value":f.data,"onUpdate:formatted-value":a[0]||(a[0]=e=>f.data=e),shortcuts:v,onConfirm:c},null,8,["formatted-value","shortcuts"]))}});export{d as default};
@@ -1 +1 @@
1
- import{defineComponent as e,computed as l,inject as a,ref as t,onDeactivated as u,openBlock as r,createElementBlock as o,unref as i,createBlock as n,createCommentVNode as v,createElementVNode as s,createVNode as c,isRef as p,withCtx as d,normalizeStyle as f,Fragment as h,renderList as m,toDisplayString as _,createTextVNode as y}from"vue";import{widthAppend as g}from"../../../../../shared/utils/index.js";import{useVirtualList as b}from"@vueuse/core";import{isNumber as k}from"lodash-es";import{NInput as C,NCheckbox as $,NCheckboxGroup as x,NButtonGroup as S,NButton as j}from"naive-ui";import L from"../../../../../_virtual/plugin-vue_export-helper.js";const U={class:"iho-table__filterWrapper"},w={class:"iho-table__filterListItem"},E={class:"iho-table__filterFooter"};var F=L(e({__name:"filter",props:{payload:{type:Object,required:!0}},setup(e){const L=e,F=l((()=>{var e,l,a;return null!=(a=null==(l=null==(e=L.payload)?void 0:e.column)?void 0:l.filters)?a:[]})),I=l({get:()=>F.value.reduce(((e,l)=>(l.checked&&e.push(l.value),e)),[]),set(e){if(L.payload)return F.value.forEach((l=>{L.payload.$panel.changeOption(null,e.includes(l.value),l)})),L.payload.$panel.confirmFilter(new CustomEvent("click"))}}),O=a("$xetable"),P=t([...I.value]),W=t("");function q(){O&&(O.reactData.filterStore.visible=!1)}u(q);const z=l((()=>{var e,l;if(!L.payload||!L.payload.column)return 10;const{filterCapacity:a}=null!=(l=null==(e=L.payload.column.editRender)?void 0:e.props)?l:{};return k(a)&&a>0?a:10})),{list:D,containerProps:H,wrapperProps:R}=b(l((()=>W.value?F.value.filter((e=>`${e.label}`.includes(W.value))):F.value)),{itemHeight:32,overscan:3}),A=l((()=>!!P.value.length&&P.value.length!==F.value.length)),B=l({get:()=>P.value.length===F.value.length&&0!==F.value.length,set:e=>{P.value=e?F.value.map((e=>e.value)):[]}}),G=l((()=>({...H.style,height:g(32*z.value)})));function J(){I.value=P.value,q()}function K(){P.value=[]}return(e,l)=>(r(),o("section",U,[i(F).length>5?(r(),n(i(C),{key:0,value:W.value,"onUpdate:value":l[0]||(l[0]=e=>W.value=e)},null,8,["value"])):v("v-if",!0),s("div",w,[c(i($),{label:"全选",checked:i(B),"onUpdate:checked":l[1]||(l[1]=e=>p(B)?B.value=e:null),indeterminate:i(A)},null,8,["checked","indeterminate"])]),c(i(x),{value:P.value,"onUpdate:value":l[3]||(l[3]=e=>P.value=e)},{default:d((()=>[s("section",{ref:i(H).ref,style:f(i(G)),onScroll:l[2]||(l[2]=(...e)=>i(H).onScroll&&i(H).onScroll(...e)),class:"iho-table__filterListWrapper"},[s("section",{style:f(i(R).style)},[(r(!0),o(h,null,m(i(D),(e=>(r(),o("div",{class:"iho-table__filterListItem",key:e.data.value},[c(i($),{value:e.data.value,label:e.data.label},null,8,["value","label"])])))),128))],4)],36)])),_:1},8,["value"]),s("footer",E,[s("section",null,_(`已选择${P.value.length}项`),1),c(i(S),{size:"small"},{default:d((()=>[c(i(j),{onClick:K},{default:d((()=>[y("清空")])),_:1}),c(i(j),{onClick:q},{default:d((()=>[y("取消")])),_:1}),c(i(j),{type:"primary",onClick:J},{default:d((()=>[y("确定")])),_:1})])),_:1})])]))}}),[["__file","filter.vue"]]);export{F as default};
1
+ import e from"./filter.vue2.js";import r from"../../../../../_virtual/_plugin-vue_export-helper.js";var t=r(e,[["__file","filter.vue"]]);export{t as default};
@@ -0,0 +1 @@
1
+ import{defineComponent as e,computed as l,inject as a,ref as t,onDeactivated as u,openBlock as n,createElementBlock as o,unref as r,createBlock as i,createCommentVNode as v,createElementVNode as s,createVNode as c,isRef as d,withCtx as p,normalizeStyle as f,Fragment as h,renderList as m,toDisplayString as y,createTextVNode as _}from"vue";import{widthAppend as b}from"../../../../../shared/utils/index.js";import{useVirtualList as g}from"@vueuse/core";import{isNumber as k}from"lodash-es";import{NInput as C,NCheckbox as $,NCheckboxGroup as S,NButtonGroup as x,NButton as L}from"naive-ui";const U={class:"iho-table__filterWrapper"},j={class:"iho-table__filterListItem"},w={class:"iho-table__filterFooter"};var E=e({__name:"filter",props:{payload:{type:Object,required:!0}},setup(e){const E=e,F=l((()=>{var e,l,a;return null!=(a=null==(l=null==(e=E.payload)?void 0:e.column)?void 0:l.filters)?a:[]})),I=l({get:()=>F.value.reduce(((e,l)=>(l.checked&&e.push(l.value),e)),[]),set(e){if(E.payload)return F.value.forEach((l=>{E.payload.$panel.changeOption(null,e.includes(l.value),l)})),E.payload.$panel.confirmFilter(new CustomEvent("click"))}}),O=a("$xetable"),P=t([...I.value]),W=t("");function q(){O&&(O.reactData.filterStore.visible=!1)}u(q);const z=l((()=>{var e,l;if(!E.payload||!E.payload.column)return 10;const{filterCapacity:a}=null!=(l=null==(e=E.payload.column.editRender)?void 0:e.props)?l:{};return k(a)&&a>0?a:10})),{list:D,containerProps:H,wrapperProps:R}=g(l((()=>W.value?F.value.filter((e=>`${e.label}`.includes(W.value))):F.value)),{itemHeight:32,overscan:3}),A=l((()=>!!P.value.length&&P.value.length!==F.value.length)),B=l({get:()=>P.value.length===F.value.length&&0!==F.value.length,set:e=>{P.value=e?F.value.map((e=>e.value)):[]}}),G=l((()=>({...H.style,height:b(32*z.value)})));function J(){I.value=P.value,q()}function K(){P.value=[]}return(e,l)=>(n(),o("section",U,[r(F).length>5?(n(),i(r(C),{key:0,value:W.value,"onUpdate:value":l[0]||(l[0]=e=>W.value=e)},null,8,["value"])):v("v-if",!0),s("div",j,[c(r($),{label:"全选",checked:r(B),"onUpdate:checked":l[1]||(l[1]=e=>d(B)?B.value=e:null),indeterminate:r(A)},null,8,["checked","indeterminate"])]),c(r(S),{value:P.value,"onUpdate:value":l[3]||(l[3]=e=>P.value=e)},{default:p((()=>[s("section",{ref:r(H).ref,style:f(r(G)),onScroll:l[2]||(l[2]=(...e)=>r(H).onScroll&&r(H).onScroll(...e)),class:"iho-table__filterListWrapper"},[s("section",{style:f(r(R).style)},[(n(!0),o(h,null,m(r(D),(e=>(n(),o("div",{class:"iho-table__filterListItem",key:e.data.value},[c(r($),{value:e.data.value,label:e.data.label},null,8,["value","label"])])))),128))],4)],36)])),_:1},8,["value"]),s("footer",w,[s("section",null,y(`已选择${P.value.length}项`),1),c(r(x),{size:"small"},{default:p((()=>[c(r(L),{onClick:K},{default:p((()=>[_("清空")])),_:1}),c(r(L),{onClick:q},{default:p((()=>[_("取消")])),_:1}),c(r(L),{type:"primary",onClick:J},{default:p((()=>[_("确定")])),_:1})])),_:1})])]))}});export{E as default};
@@ -1 +1 @@
1
- import{toRaw as e,h as t,inject as l,createVNode as i}from"vue";import{arrayed as o,widthAppend as s}from"../../../../../shared/utils/index.js";import{isObject as n,isFunction as 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=x.hasFilter(t)||x.hasDateFiler(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)-(p.sortable?23: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};
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){var m;const c=l(v),p=l(b),h=e.column||{},g=n(null==c?void 0:c.value)&&!1!==t.annotation,R=x.isEditableColumn(p.value,h),j=x.hasFilter(t)||x.hasDateFiler(t),P=null==(m=t.titlePrefix)?void 0:m.content,F=r(a)?a:d(a)?a(e):null;let S=!1;if(p.value){const e=p.value.editRules&&p.value.editRules[h.field];e&&(S=o(e).some((e=>e.required)))}return i("section",{class:"iho-table__headerWrapper"},[i("section",{style:{width:s(Math.max(0,h.renderWidth-20-(S?14:0)-(g?18:0)-(j?23:0)-(R?22:0)-(P?20:0)-(h.sortable?23:0)))}},[null!=F?F:i(u,{style:{maxWidth:"100%"}},{default:()=>h.title})]),g?i(f,{modelValue:c.value[h.field],"onUpdate:modelValue":e=>c.value[h.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};
@@ -1 +1 @@
1
- import{defineComponent as e,useAttrs as t,ref as r,computed as i,openBlock as a,createBlock as o,unref as s,mergeProps as u,isRef as n}from"vue";import{generateTimeFormat as l}from"../../../../../../../shared/utils/index.js";import{isFunction as m}from"lodash-es";import{useIhoTableFormEvent as d}from"../../../../utils/index.js";import p from"../../../../../../date-picker/index.js";import f from"../../../../../../../_virtual/plugin-vue_export-helper.js";var c=f(e({__name:"editDate",props:{value:{type:String,default:void 0},column:{type:Object,required:!0},row:{type:Object,required:!0},rowIndex:{type:Number,required:!0}},emits:["update:value"],setup(e,{emit:f}){const c=e,w=t(),{emitFormChangeWithParams:D}=d(c),v=r(),g=i({get:()=>c.value,set(e){const t=c.value;t!==e&&(f("update:value",e),D({oldValue:t}))}}),y=i((()=>{const e=w.valueFormat||"yyyy-MM-dd HH:mm:ss";return{valueFormat:e,format:e,timePickerProps:{format:l(e)}}})),{isStartDate:b=!1,isEndDate:h=!1}=w,T=w.connectField||"",$=(e,t)=>b&&T?e>t:!(!h||!T)&&e<t,_=e=>{const t=new Date(c.row[T]),r=new Date(e),{h:i,m:a,s:o}=F(t),s=(e,t,r,i)=>!(h&&r>i)&&(!(b&&r<i)&&$(e,t));return{isHourDisabled:t=>{if(!c.row[T])return!1;const a=new Date(`${c.row[T].split(" ")[0]} 00:00:00`).getTime(),{m:o,s:u}=F(r);return s(t,i,e-60*t*60*1e3-60*o*1e3-1e3*u,a)},isMinuteDisabled:t=>{if(!c.row[T])return!1;const o=new Date(`${c.row[T].split(" ")[0]} ${i}:00:00`).getTime(),{s:u}=F(r);return s(t,a,e-60*t*1e3-1e3*u,o)},isSecondDisabled:t=>{if(!c.row[T])return!1;const r=new Date(`${c.row[T].split(" ")[0]} ${i}:${a}:00`).getTime();return s(t,o,e-1e3*t,r)}}},j={type:w.type||"datetime",clearable:!0,placeholder:w.placeholder||"请选择",...w,...y.value,isDateDisabled:x(w.isDateDisabled)||(e=>!!c.row[T]&&$(e,h?new Date(`${c.row[T].split(" ")[0]} 00:00:00`).getTime():new Date(c.row[T]).getTime()))};function x(e){return m(e)?t=>e(t,c.row):null}function F(e){return{h:e.getHours(),m:e.getMinutes(),s:e.getSeconds()}}return j.type.includes("time")&&(j.isTimeDisabled=x(w.isTimeDisabled)||_),(e,t)=>(a(),o(s(p),u({ref_key:"formRef",ref:v},s(j),{"formatted-value":s(g),"onUpdate:formatted-value":t[0]||(t[0]=e=>n(g)?g.value=e:null)}),null,16,["formatted-value"]))}}),[["__file","editDate.vue"]]);export{c as default};
1
+ import e from"./editDate.vue2.js";import t from"../../../../../../../_virtual/_plugin-vue_export-helper.js";var r=t(e,[["__file","editDate.vue"]]);export{r as default};
@@ -0,0 +1 @@
1
+ import{defineComponent as e,useAttrs as t,ref as r,computed as i,onMounted as a,openBlock as l,createBlock as o,unref as n,mergeProps as u,isRef as s}from"vue";import{generateTimeFormat as d}from"../../../../../../../shared/utils/index.js";import{isFunction as m}from"lodash-es";import{useIhoTableFormEvent as p}from"../../../../utils/index.js";import c from"../../../../../../date-picker/index.js";var f=e({__name:"editDate",props:{value:{type:String,default:void 0},column:{type:Object,required:!0},row:{type:Object,required:!0},rowIndex:{type:Number,required:!0}},emits:["update:value"],setup(e,{emit:f}){const v=e,w=t(),{emitFormChangeWithParams:D}=p(v),y=r(),b=i({get:()=>v.value,set(e){const t=v.value;t!==e&&(f("update:value",e),D({oldValue:t}))}}),g=i((()=>{const e=w.valueFormat||"yyyy-MM-dd HH:mm:ss";return{valueFormat:e,format:e,timePickerProps:{format:d(e)}}})),{isStartDate:$=!1,isEndDate:h=!1}=w,T=w.connectField||"",j=(e,t)=>$&&T?e>t:!(!h||!T)&&e<t,x=e=>{const t=new Date(v.row[T]),r=new Date(e),{h:i,m:a,s:l}=q(t),o=(e,t,r,i)=>!(h&&r>i)&&(!($&&r<i)&&j(e,t));return{isHourDisabled:t=>{if(!v.row[T])return!1;const a=new Date(`${v.row[T].split(" ")[0]} 00:00:00`).getTime(),{m:l,s:n}=q(r);return o(t,i,e-60*t*60*1e3-60*l*1e3-1e3*n,a)},isMinuteDisabled:t=>{if(!v.row[T])return!1;const l=new Date(`${v.row[T].split(" ")[0]} ${i}:00:00`).getTime(),{s:n}=q(r);return o(t,a,e-60*t*1e3-1e3*n,l)},isSecondDisabled:t=>{if(!v.row[T])return!1;const r=new Date(`${v.row[T].split(" ")[0]} ${i}:${a}:00`).getTime();return o(t,l,e-1e3*t,r)}}},S={type:w.type||"datetime",clearable:!0,placeholder:w.placeholder||"请选择",...w,...g.value,isDateDisabled:k(w.isDateDisabled)||(e=>!!v.row[T]&&j(e,h?new Date(`${v.row[T].split(" ")[0]} 00:00:00`).getTime():new Date(v.row[T]).getTime()))};function k(e){return m(e)?t=>e(t,v.row):null}function q(e){return{h:e.getHours(),m:e.getMinutes(),s:e.getSeconds()}}return S.type.includes("time")&&(S.isTimeDisabled=k(w.isTimeDisabled)||x),a((()=>{var e,t,r,i,a,l,o;return null==(o=null==(a=null==(r=null==(t=null==(e=y.value)?void 0:e.$datePicker)?void 0:t.inputInstRef)?void 0:(i=r.$el).querySelector)?void 0:(l=a.call(i,"input")).select)?void 0:o.call(l)})),(e,t)=>(l(),o(n(c),u({ref_key:"formRef",ref:y},n(S),{"formatted-value":n(b),"onUpdate:formatted-value":t[0]||(t[0]=e=>s(b)?b.value=e:null)}),null,16,["formatted-value"]))}});export{f as default};
@@ -1 +1 @@
1
- import{createVNode as e,mergeProps as t}from"vue";import"../../../../../index.js";import{EDITABLE_WIDGET_TYPE as n}from"../../../../constants/index.js";import{useAutoFocus as o}from"../hooks/useAutoFocus.js";import{createIhoTableClearActivedInterceptor as r,IhoTableRenderHelper as i}from"../../../../utils/index.js";import d from"./editDate.vue.js";import{defineTablePlugin as l}from"../../../../hooks/useTablePlugin.js";function a(){const a="dateRendererPlugin";return l({name:a,vxe(o){o.interceptor.add("event.clearActived",r(n.DATE,(e=>e.classList.contains("n-date-panel")))),o.renderer.add(n.DATE,{renderCell:i.createDefaultRenderCell(),renderEdit:i.createRenderEdit((({fieldItem:n,emitFormClick:o,row:r,column:i,$rowIndex:l})=>[e(d,t({value:r[i.field],"onUpdate:value":e=>r[i.field]=e,isStartDate:n.isStartDate,isEndDate:n.isEndDate,connectField:n.connectField},n.componentProps,{column:i,row:r,"row-index":l,onClick:o}),null)]))})},apply(e){o(e).bindAutoFocusConfig(a,n.DATE,"input")}})}export{a as dateRendererPlugin};
1
+ import{createVNode as e,mergeProps as t}from"vue";import"../../../../../index.js";import{EDITABLE_WIDGET_TYPE as n}from"../../../../constants/index.js";import{createIhoTableClearActivedInterceptor as r,IhoTableRenderHelper as i}from"../../../../utils/index.js";import o from"./editDate.vue.js";import{defineTablePlugin as d}from"../../../../hooks/useTablePlugin.js";function l(){return d({name:"dateRendererPlugin",vxe(d){d.interceptor.add("event.clearActived",r(n.DATE,(e=>e.classList.contains("n-date-panel")))),d.renderer.add(n.DATE,{renderCell:i.createDefaultRenderCell(),renderEdit:i.createRenderEdit((({fieldItem:n,emitFormClick:r,row:i,column:d,$rowIndex:l})=>[e(o,t({value:i[d.field],"onUpdate:value":e=>i[d.field]=e,isStartDate:n.isStartDate,isEndDate:n.isEndDate,connectField:n.connectField},n.componentProps,{column:d,row:i,"row-index":l,onClick:r}),null)]))})}})}export{l as dateRendererPlugin};
@@ -1 +1 @@
1
- function e(e){return{bindAutoFocusConfig:function(n,t,o){e.fieldHooks.field.tap(n,(e=>{var n;return(null==(n=e.editRender)?void 0:n.name)===t&&Reflect.set(e.editRender,"autofocus",(({cell:e}={})=>{var n;e&&(null==(n=e.querySelector(o))||n.click())})),e}))}}}export{e as useAutoFocus};
1
+ function e(e){return{bindAutoFocusConfig:function(t,n,r){e.fieldHooks.field.tap(t,(e=>{var t;return(null==(t=e.editRender)?void 0:t.name)===n&&(Reflect.set(e.editRender,"autofocus",(({cell:e}={})=>{if(!e)return;const t=e.querySelector(r);return null==t||t.click(),t})),"TIME"===n&&Reflect.set(e.editRender,"autoselect",!0)),e}))}}}export{e as useAutoFocus};
@@ -1 +1 @@
1
- import{defineComponent as e,computed as l,createVNode as r,mergeProps as o}from"vue";import{isNumber as t}from"lodash-es";import{NInputNumber as n}from"naive-ui";import"../../../../index.js";import{EDITABLE_WIDGET_TYPE as u}from"../../../constants/index.js";import{IhoTableRenderHelper as a}from"../../../utils/index.js";import{defineTablePlugin as i}from"../../../hooks/useTablePlugin.js";const d=e({name:"IhoTableInputNumber",props:{value:[String,Number]},emits:["update:value"],setup(e,{emit:o}){const u=l({get:()=>t(e.value)?e.value:e.value&&t(+e.value)?+e.value:null,set(e){o("update:value",e)}});return()=>r(n,{value:u.value,"onUpdate:value":e=>u.value=e},null)}});function m(){return i({name:"numberRendererPlugin",vxe(e){e.renderer.add(u.NUMBER,{renderCell:a.createDefaultRenderCell(),renderEdit:a.createRenderEdit((({row:e,column:l,fieldItem:t,emitFormClick:n,emitFormChangeWithParams:u})=>{const{placeholder:a="请输入"}=t.componentProps||{},i={clearable:!0,placeholder:a,onBlur:()=>u({type:"blur",oldValue:e[l.field]}),onUpdateValue:r=>{const o=e[l.field];e[l.field]=r,u({oldValue:o})},onClick:n};return[r(d,o({value:e[l.field],"onUpdate:value":r=>e[l.field]=r},i,t.componentProps),null)]}))})}})}export{m as numberRendererPlugin};
1
+ import{createVNode as e,mergeProps as l,defineComponent as r,computed as o}from"vue";import{isNumber as t}from"lodash-es";import{NInputNumber as n}from"naive-ui";import"../../../../index.js";import{EDITABLE_WIDGET_TYPE as u}from"../../../constants/index.js";import{IhoTableRenderHelper as a}from"../../../utils/index.js";import{defineTablePlugin as i}from"../../../hooks/useTablePlugin.js";const d=r({name:"IhoTableInputNumber",props:{value:[String,Number]},emits:["update:value"],setup(l,{emit:r}){const u=o({get:()=>t(l.value)?l.value:l.value&&t(+l.value)?+l.value:null,set(e){r("update:value",e)}});return()=>e(n,{value:u.value,"onUpdate:value":e=>u.value=e},null)}});function m(){return i({name:"numberRendererPlugin",vxe(r){r.renderer.add(u.NUMBER,{renderCell:a.createDefaultRenderCell(),renderEdit:a.createRenderEdit((({row:r,column:o,fieldItem:t,emitFormClick:n,emitFormChangeWithParams:u})=>{const{placeholder:a="请输入"}=t.componentProps||{},i={clearable:!0,placeholder:a,onBlur:()=>u({type:"blur",oldValue:r[o.field]}),onUpdateValue:e=>{const l=r[o.field];r[o.field]=e,u({oldValue:l})},onClick:n};return[e(d,l({value:r[o.field],"onUpdate:value":e=>r[o.field]=e},i,t.componentProps),null)]}))})}})}export{m as numberRendererPlugin};
@@ -1 +1 @@
1
- import{defineComponent as e,inject as t,ref as a,watch as o,computed as u,onDeactivated as l,openBlock as r,createBlock as i,unref as n,withCtx as s,createElementVNode as p,withModifiers as v,normalizeStyle as d,toDisplayString as c,renderSlot as m,createVNode as f}from"vue";import{cloneDeep as h,isObject as g,isArray as w}from"lodash-es";import{NPopover as y,NInput as x}from"naive-ui";import{InjectionIhoTableHandler as b}from"../../../../constants/index.js";import{useIhoTableFormEvent as _}from"../../../../utils/index.js";import k from"../../../../../../../_virtual/plugin-vue_export-helper.js";const j=["onClick"];var C=k(e({__name:"editSeparate",props:{value:{},height:{type:Number,default:48},column:{type:Object,required:!0},row:{type:Object,required:!0},displayContent:{type:String,default:""},rowIndex:{type:Number,required:!0}},emits:["update:value","click"],setup(e,{emit:k}){const C=e,S=t(b),U=a(),q=a();function P(e){q.value=e}const T=a(!1);function I(e){T.value=e}function N(e){T.value=!T.value,k("click",e)}o(T,(function(e){e?async function(){var e;q.value=h(C.value),await new Promise((e=>setTimeout(e))),null==(e=U.value)||e.syncPosition()}():R()}));const{emitFormChangeWithParams:O}=_(C);async function R(){if(!g(q.value)&&!w(q.value)&&C.value===q.value)return;const e=C.value;k("update:value",q.value),O({oldValue:e}),S.updateTableDataRef()}const z=u((()=>({border:"1px solid #f5f5f5",height:C.height-16+"px",display:"flex",alignItems:"center",padding:"0",background:"white",wordBreak:"keep-all",boxSizing:"border-box","border-radius":"4px"})));return l(R),(t,a)=>(r(),i(n(y),{ref_key:"popoverRef",ref:U,trigger:"manual",show:T.value,"onUpdate:show":a[1]||(a[1]=e=>T.value=e),"show-arrow":!1},{trigger:s((()=>[p("div",{onClick:v(N,["stop"]),style:d(n(z)),class:"iho-table__separateText"},c(e.displayContent||" "),13,j)])),default:s((()=>[m(t.$slots,"menu",{value:q.value,"onUpdate:value":P,"onUpdate:show":I,col:e.column,row:e.row},(()=>[f(n(x),{value:q.value,"onUpdate:value":a[0]||(a[0]=e=>q.value=e),type:"textarea"},null,8,["value"])]))])),_:3},8,["show"]))}}),[["__file","editSeparate.vue"]]);export{C as default};
1
+ import e from"./editSeparate.vue2.js";import r from"../../../../../../../_virtual/_plugin-vue_export-helper.js";var t=r(e,[["__file","editSeparate.vue"]]);export{t as default};
@@ -0,0 +1 @@
1
+ import{defineComponent as e,inject as a,ref as t,watch as o,computed as u,onDeactivated as l,openBlock as r,createBlock as n,unref as i,withCtx as s,createElementVNode as p,withModifiers as d,normalizeStyle as v,toDisplayString as c,renderSlot as m,createVNode as f}from"vue";import{cloneDeep as h,isObject as w,isArray as y}from"lodash-es";import{NPopover as g,NInput as b}from"naive-ui";import{InjectionIhoTableHandler as x}from"../../../../constants/index.js";import{useIhoTableFormEvent as k}from"../../../../utils/index.js";const _=["onClick"];var C=e({__name:"editSeparate",props:{value:{},height:{type:Number,default:48},column:{type:Object,required:!0},row:{type:Object,required:!0},displayContent:{type:String,default:""},rowIndex:{type:Number,required:!0}},emits:["update:value","click"],setup(e,{emit:C}){const j=e,U=a(x),q=t(),P=t();function S(e){P.value=e}const T=t(!1);function I(e){T.value=e}function N(e){T.value=!T.value,C("click",e)}o(T,(function(e){e?async function(){var e;P.value=h(j.value),await new Promise((e=>setTimeout(e))),null==(e=q.value)||e.syncPosition()}():R()}));const{emitFormChangeWithParams:O}=k(j);async function R(){if(!w(P.value)&&!y(P.value)&&j.value===P.value)return;const e=j.value;C("update:value",P.value),O({oldValue:e}),U.updateTableDataRef()}const z=u((()=>({border:"1px solid #f5f5f5",height:j.height-16+"px",display:"flex",alignItems:"center",padding:"0",background:"white",wordBreak:"keep-all",boxSizing:"border-box","border-radius":"4px"})));return l(R),(a,t)=>(r(),n(i(g),{ref_key:"popoverRef",ref:q,trigger:"manual",show:T.value,"onUpdate:show":t[1]||(t[1]=e=>T.value=e),"show-arrow":!1},{trigger:s((()=>[p("div",{onClick:d(N,["stop"]),style:v(i(z)),class:"iho-table__separateText"},c(e.displayContent||" "),13,_)])),default:s((()=>[m(a.$slots,"menu",{value:P.value,"onUpdate:value":S,"onUpdate:show":I,col:e.column,row:e.row},(()=>[f(i(b),{value:P.value,"onUpdate:value":t[0]||(t[0]=e=>P.value=e),type:"textarea"},null,8,["value"])]))])),_:3},8,["show"]))}});export{C as default};
@@ -1 +1 @@
1
- import{defineComponent as e,useAttrs as l,ref as t,watch as a,nextTick as r,openBlock as o,createBlock as u,unref as i,mergeProps as n,withCtx as m,createVNode as v,createElementBlock as c,Fragment as d,renderList as f,createTextVNode as s,toDisplayString as p,createCommentVNode as _}from"vue";import{NPopover as k,NInput as h,NSpace as y,NScrollbar as w,NButton as g}from"naive-ui";import{useIhoTableFormEvent as b}from"../../../../utils/index.js";import V from"../../../../../../time-picker/index.js";import{parse as C,isValid as F,format as j}from"date-fns";import q from"../../../../../../../_virtual/plugin-vue_export-helper.js";var x=q(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:q}){const x=e,I=l(),{emitFormChangeWithParams:O}=b(x),P=t(null),R=t(!1),S=t(),$=t(),A=t();let E=x.formattedValue;const{placeholder:H="请选择",valueFormat:T="HH:mm",shortcutOptions:U=[]}=I,z={placeholder:H,valueFormat:T,format:T};function D(e){A.value=e,E!==e&&(q("update:formattedValue",e),O({oldValue:E}),E=e)}function K(){[z.valueFormat.replace(/:/,""),z.valueFormat].some((e=>{const l=C(($.value||"").trim(),e,new Date);if(F(l)){return D(j(l,z.valueFormat)),!0}}))}function N(e){var l;const{key:t}=e;"Enter"===t&&(null==(l=P.value)||l.blur(),R.value=!1)}return a((()=>x.formattedValue),(e=>{$.value=e,A.value=e}),{immediate:!0}),a((()=>R.value),(async e=>{var l,t,a,o,u;e&&(await r(),null==(u=null==(o=null==(a=null==(t=null==(l=S.value)?void 0:l.$timePicker)?void 0:t.panelInstRef)?void 0:a.$el)?void 0:o.querySelectorAll(".n-time-picker-col"))||u.forEach((e=>{var l,t;return null==(t=null==(l=null==e?void 0:e.querySelector)?void 0:l.call(e,".n-time-picker-col__item--active"))?void 0:t.scrollIntoView()})))})),(e,l)=>(o(),u(i(k),n({show:R.value,trigger:"click",showArrow:!1,placement:"bottom-start",style:{padding:"0"}},e.$attrs,{onClickoutside:l[3]||(l[3]=()=>R.value=!1)}),{trigger:m((()=>[v(i(h),{ref_key:"formRef",ref:P,clearable:"",value:$.value,"onUpdate:value":l[0]||(l[0]=e=>$.value=e),onClick:l[1]||(l[1]=()=>R.value=!0),onChange:K,onKeydown:N},null,8,["value"])])),default:m((()=>[v(i(y),null,{default:m((()=>[v(i(V),n({ref_key:"timePickerRef",ref:S,show:"","formatted-value":A.value},i(z),{class:"iho-table__time-picker",to:!1,"onUpdate:formattedValue":D,onConfirm:l[2]||(l[2]=()=>R.value=!1)}),null,16,["formatted-value"]),v(i(w),{class:"iho-table__scrollbar"},{default:m((()=>[i(U).length?(o(),u(i(y),{key:0,vertical:"",wrap:!1},{default:m((()=>[(o(!0),c(d,null,f(i(U),(e=>(o(),u(i(g),{size:"tiny",key:e,onClick:l=>function(e){D(e),R.value=!1}(e)},{default:m((()=>[s(p(e),1)])),_:2},1032,["onClick"])))),128))])),_:1})):_("v-if",!0)])),_:1})])),_:1})])),_:1},16,["show"]))}}),[["__file","editTime.vue"]]);export{x as default};
1
+ import e from"./editTime.vue2.js";import i from"../../../../../../../_virtual/_plugin-vue_export-helper.js";var r=i(e,[["__file","editTime.vue"]]);export{r as default};
@@ -0,0 +1 @@
1
+ import{defineComponent as e,useAttrs as l,ref as t,watch as a,nextTick as r,openBlock as o,createBlock as u,unref as i,mergeProps as n,withCtx as m,createVNode as c,createElementBlock as d,Fragment as v,renderList as f,createTextVNode as s,toDisplayString as p,createCommentVNode as k}from"vue";import{NPopover as y,NInput as _,NSpace as h,NScrollbar as w,NButton as b}from"naive-ui";import{useIhoTableFormEvent as g}from"../../../../utils/index.js";import V from"../../../../../../time-picker/index.js";import{parse as C,isValid as F,format as q}from"date-fns";var j=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:j}){const x=e,I=l(),{emitFormChangeWithParams:O}=g(x),P=t(null),R=t(!1),S=t(),$=t(),A=t();let E=x.formattedValue;const{placeholder:H="请选择",valueFormat:U="HH:mm",shortcutOptions:z=[]}=I,D={placeholder:H,valueFormat:U,format:U};function K(e){A.value=e,E!==e&&(j("update:formattedValue",e),O({oldValue:E}),E=e)}function N(){[D.valueFormat.replace(/:/,""),D.valueFormat].some((e=>{const l=C(($.value||"").trim(),e,new Date);if(F(l)){return K(q(l,D.valueFormat)),!0}}))}function T(e){var l;const{key:t}=e;"Enter"===t&&(null==(l=P.value)||l.blur(),R.value=!1)}return a((()=>x.formattedValue),(e=>{$.value=e,A.value=e}),{immediate:!0}),a((()=>R.value),(async e=>{var l,t,a,o,u;e&&(await r(),null==(u=null==(o=null==(a=null==(t=null==(l=S.value)?void 0:l.$timePicker)?void 0:t.panelInstRef)?void 0:a.$el)?void 0:o.querySelectorAll(".n-time-picker-col"))||u.forEach((e=>{var l,t;return null==(t=null==(l=null==e?void 0:e.querySelector)?void 0:l.call(e,".n-time-picker-col__item--active"))?void 0:t.scrollIntoView()})))})),(e,l)=>(o(),u(i(y),n({show:R.value,trigger:"click",showArrow:!1,placement:"bottom-start",style:{padding:"0"}},e.$attrs,{onClickoutside:l[3]||(l[3]=()=>R.value=!1)}),{trigger:m((()=>[c(i(_),{ref_key:"formRef",ref:P,clearable:"",value:$.value,"onUpdate:value":l[0]||(l[0]=e=>$.value=e),onClick:l[1]||(l[1]=()=>R.value=!0),onChange:N,onKeydown:T},null,8,["value"])])),default:m((()=>[c(i(h),null,{default:m((()=>[c(i(V),n({ref_key:"timePickerRef",ref:S,show:"","formatted-value":A.value},i(D),{class:"iho-table__time-picker",to:!1,"onUpdate:formattedValue":K,onConfirm:l[2]||(l[2]=()=>R.value=!1)}),null,16,["formatted-value"]),c(i(w),{class:"iho-table__scrollbar"},{default:m((()=>[i(z).length?(o(),u(i(h),{key:0,vertical:"",wrap:!1},{default:m((()=>[(o(!0),d(v,null,f(i(z),(e=>(o(),u(i(b),{size:"tiny",key:e,onClick:l=>function(e){K(e),R.value=!1}(e)},{default:m((()=>[s(p(e),1)])),_:2},1032,["onClick"])))),128))])),_:1})):k("v-if",!0)])),_:1})])),_:1})])),_:1},16,["show"]))}});export{j as default};
@@ -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};