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
@@ -114,6 +114,7 @@ declare const _default: import("vue").DefineComponent<{
114
114
  onSetup(): void;
115
115
  beforeRequest(fieldKey: string, params?: AnyObject | undefined): void | import("../../../../es/shared/types").UndefinedAble<AnyObject>;
116
116
  afterRequest(fieldKey: string, payload?: any): AnyObject[];
117
+ afterOptionInit(fieldKey: string, options: AnyObject[]): void;
117
118
  }>>;
118
119
  };
119
120
  requestInstance: {
@@ -133,6 +134,10 @@ declare const _default: import("vue").DefineComponent<{
133
134
  type: (BooleanConstructor | StringConstructor)[];
134
135
  default: boolean;
135
136
  };
137
+ uniqueCacheData: {
138
+ type: BooleanConstructor;
139
+ default: boolean;
140
+ };
136
141
  }, {
137
142
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
138
143
  fieldList: {
@@ -246,6 +251,7 @@ declare const _default: import("vue").DefineComponent<{
246
251
  onSetup(): void;
247
252
  beforeRequest(fieldKey: string, params?: AnyObject | undefined): void | import("../../../../es/shared/types").UndefinedAble<AnyObject>;
248
253
  afterRequest(fieldKey: string, payload?: any): AnyObject[];
254
+ afterOptionInit(fieldKey: string, options: AnyObject[]): void;
249
255
  }>>;
250
256
  };
251
257
  requestInstance: {
@@ -265,12 +271,16 @@ declare const _default: import("vue").DefineComponent<{
265
271
  type: (BooleanConstructor | StringConstructor)[];
266
272
  default: boolean;
267
273
  };
274
+ uniqueCacheData: {
275
+ type: BooleanConstructor;
276
+ default: boolean;
277
+ };
268
278
  }>> & {
269
279
  onFormChange?: ((...args: any[]) => any) | undefined;
270
280
  onScroll?: ((...args: any[]) => any) | undefined;
271
281
  onAnnotationChange?: ((...args: any[]) => any) | undefined;
272
282
  }>>;
273
- emit: (event: "scroll" | "formChange" | "annotationChange", ...args: any[]) => void;
283
+ emit: (event: "formChange" | "scroll" | "annotationChange", ...args: any[]) => void;
274
284
  cssVars: import("vue").ComputedRef<import("vue").CSSProperties>;
275
285
  nuiThemeOverrides: import("naive-ui").GlobalThemeOverrides;
276
286
  formRenderRef: import("vue").Ref<HTMLElement | undefined>;
@@ -290,6 +300,17 @@ declare const _default: import("vue").DefineComponent<{
290
300
  title: string;
291
301
  }[]>;
292
302
  onScroll: (scrollEvent: Event) => void;
303
+ callLifeCycle: <T extends "onSetup" | "beforeRequest" | "afterRequest" | "afterOptionInit">(lifeCycleName: T, payload?: Parameters<Required<Partial<{
304
+ onSetup(): void;
305
+ beforeRequest(fieldKey: string, params?: AnyObject | undefined): void | import("../../../../es/shared/types").UndefinedAble<AnyObject>;
306
+ afterRequest(fieldKey: string, payload?: any): AnyObject[];
307
+ afterOptionInit(fieldKey: string, options: AnyObject[]): void;
308
+ }>>[T]> | undefined) => import("../../../../es/shared/types").UndefinedAble<ReturnType<Required<Partial<{
309
+ onSetup(): void;
310
+ beforeRequest(fieldKey: string, params?: AnyObject | undefined): void | import("../../../../es/shared/types").UndefinedAble<AnyObject>;
311
+ afterRequest(fieldKey: string, payload?: any): AnyObject[];
312
+ afterOptionInit(fieldKey: string, options: AnyObject[]): void;
313
+ }>>[T]>>;
293
314
  triggerAutoHidden: (field: import("@formily/core").GeneralField) => Promise<void>;
294
315
  observeFormGraph: Record<string, import("@formily/core").GeneralField>;
295
316
  setGraph: (field: import("@formily/core").GeneralField) => void;
@@ -433,11 +454,11 @@ declare const _default: import("vue").DefineComponent<{
433
454
  onFocus: (...args: any[]) => Promise<void>;
434
455
  onBlur: (...args: any[]) => Promise<void>;
435
456
  onInput: (...args: any[]) => Promise<void>;
457
+ editable: boolean;
436
458
  reset: (options?: import("@formily/core").IFieldResetOptions | undefined) => Promise<void>;
437
459
  title: string;
438
- editable: boolean;
439
460
  visible: boolean;
440
- submit: <T>(onSubmit?: ((values: any) => void | Promise<T>) | undefined) => Promise<T>;
461
+ submit: <T_1>(onSubmit?: ((values: any) => void | Promise<T_1>) | undefined) => Promise<T_1>;
441
462
  validator: import("@formily/core").FieldValidator;
442
463
  pattern: import("@formily/core").FieldPatternTypes;
443
464
  content: any;
@@ -581,7 +602,7 @@ declare const _default: import("vue").DefineComponent<{
581
602
  readonly displayDirective: "if" | "show" | "show:lazy";
582
603
  }>;
583
604
  NTabs: any;
584
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("scroll" | "formChange" | "annotationChange")[], "scroll" | "formChange" | "annotationChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
605
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("formChange" | "scroll" | "annotationChange")[], "scroll" | "formChange" | "annotationChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
585
606
  fieldList: {
586
607
  type: PropType<FieldItem[]>;
587
608
  };
@@ -693,6 +714,7 @@ declare const _default: import("vue").DefineComponent<{
693
714
  onSetup(): void;
694
715
  beforeRequest(fieldKey: string, params?: AnyObject | undefined): void | import("../../../../es/shared/types").UndefinedAble<AnyObject>;
695
716
  afterRequest(fieldKey: string, payload?: any): AnyObject[];
717
+ afterOptionInit(fieldKey: string, options: AnyObject[]): void;
696
718
  }>>;
697
719
  };
698
720
  requestInstance: {
@@ -712,6 +734,10 @@ declare const _default: import("vue").DefineComponent<{
712
734
  type: (BooleanConstructor | StringConstructor)[];
713
735
  default: boolean;
714
736
  };
737
+ uniqueCacheData: {
738
+ type: BooleanConstructor;
739
+ default: boolean;
740
+ };
715
741
  }>> & {
716
742
  onFormChange?: ((...args: any[]) => any) | undefined;
717
743
  onScroll?: ((...args: any[]) => any) | undefined;
@@ -728,5 +754,6 @@ declare const _default: import("vue").DefineComponent<{
728
754
  enterToNextWidget: boolean | ((fieldItem: FieldItem) => boolean | void);
729
755
  linebarAutoHidden: boolean;
730
756
  bordered: string | boolean;
757
+ uniqueCacheData: boolean;
731
758
  }>;
732
759
  export default _default;
@@ -1 +1 @@
1
- import{defineComponent as e,ref as o,computed as t,provide as r,onMounted as s,onUnmounted as a,nextTick as i,openBlock as l,createBlock as n,unref as m,normalizeClass as d,normalizeStyle as p,withCtx as u,createElementBlock as c,createVNode as f,isRef as h,Fragment as y,renderList as j,createCommentVNode as g,createElementVNode as b,withKeys as v,withModifiers as k,toDisplayString as F,renderSlot as C}from"vue";import{useTheme as S}from"../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import{isNumber as x,cloneDeep as H}from"lodash-es";import{createForm as A,onFieldValueChange as L,onFieldMount as R,onFieldUnmount as _,onFieldReact as O,onFormMount as w}from"@formily/core";import{FormProvider as B,FormConsumer as V}from"@formily/vue";import{NForm as I,NTabs as N,NTabPane as D,NConfigProvider as q}from"naive-ui";import{InjectionFormGraph as T}from"./constants/index.js";import{useAutoHidden as U}from"./hooks/useAutoHidden.js";import{useComplexOptionsSpan as W}from"./hooks/useComplexOptions.js";import{useFormDomEvent as E,useFormExposeEvent as G}from"./hooks/useFormEvent.js";import{useFormGraph as K}from"./hooks/useFormGraph.js";import{useFormRenderLifeCycle as M}from"./hooks/useFormRenderLifeCycle.js";import{useLowCodeEvent as P}from"./hooks/useLowCodeEvent.js";import{useLowCodeReactions as J}from"./hooks/useLowCodeReactions.js";import{useNuiThemeOverrides as $}from"./hooks/useNuiThemeOverrides.js";import"./utils/index.js";import{useFieldListAdaptor as z}from"./hooks/useFieldListAdaptor.js";import"../../../shared/utils/index.js";import"../index.js";import{useFieldVisitor as Q}from"./hooks/useFieldVisitor.js";import"../../../shared/utils/tapable/SyncHook.js";import"../../../shared/utils/tapable/SyncBailHook.js";import"../../../shared/utils/tapable/SyncWaterfallHook.js";import"../../../shared/utils/tapable/SyncLoopHook.js";import"../../../shared/utils/tapable/AsyncParallelHook.js";import"../../../shared/utils/tapable/AsyncParallelBailHook.js";import"../../../shared/utils/tapable/AsyncSeriesHook.js";import"../../../shared/utils/tapable/AsyncSeriesBailHook.js";import"../../../shared/utils/tapable/AsyncSeriesLoopHook.js";import"../../../shared/utils/tapable/AsyncSeriesWaterfallHook.js";import{validateMessageLocale as X}from"./hooks/useFormValidator.js";import{useAnchor as Y}from"./hooks/useAnchor.js";import{useFormContext as Z}from"./hooks/useFormContext.js";import"./hooks/useFormRenderOptions.js";import ee from"../../../_virtual/plugin-vue_export-helper.js";import{createObjSchema as oe}from"./utils/schema.js";const te={key:0,style:{height:"54px"}},re={style:{"white-space":"pre"}};var se=ee(e({__name:"FormRender",props:{fieldList:{type:Array},initialData:{type:Object,default:()=>({})},fieldVisitor:{type:Object},column:{type:Number,default:24},maxHeight:{type:[Number,String],default:""},anchor:{type:Boolean,default:!1},parallelism:{type:Number,default:3},businessFormatter:{type:Function},schema:{type:Object},components:{type:Object,default:()=>({})},scope:{type:Object,default:()=>({})},annotation:{type:Object},consumer:{type:Boolean,default:!1},uuid:{type:String},lifeCycle:{type:Object},requestInstance:{type:Object},enterToNextWidget:{type:[Boolean,Function],default:!0},lowCodeReactions:{type:Array},linebarAutoHidden:{type:Boolean},bordered:{type:[Boolean,String],default:!0}},emits:["formChange","annotationChange","scroll"],setup(e,{expose:ee,emit:se}){const ae=e,ie=S(),{nuiThemeOverrides:le}=$();X();const ne=o(),me=t((()=>x(ae.maxHeight)?ae.maxHeight+"px":ae.maxHeight)),{SchemaField:de,businessCollector:pe,formItemDepsCollector:ue,changeContextCollector:ce,formUUID:fe}=Z(ae,se),{anchorBarRef:he,currentAnchor:ye,updateAnchorList:je,anchorIdList:ge,onScroll:be}=Y(ae,se,ne,ue);M(ae).callLifeCycle("onSetup");const{trigger:ve}=U(),{observeFormGraph:ke,setGraph:Fe,removeGraph:Ce}=K();r(T,ke);const{lowCodeEventTrigger:Se}=P(),xe=A({initialValues:ae.initialData,effects(e){L("*",(o=>{const t=o.props.name.toString();pe.trigger(e,t),ue.trigger(t),se("formChange",{fieldInstance:o,fieldKey:t,fieldName:o.title,value:o.value,context:ce.getContext(t,o.value)}),Se(o),He(t,o.value)})),R("*",Fe),_("*",Ce),ae.linebarAutoHidden&&(O("*",ve),w((e=>e.query("*").forEach(ve)))),ae.anchor&&O("*",je)}}),{lowCodeReactionsHandler:He,triggerAllReactionsHandler:Ae}=J(t((()=>ae.lowCodeReactions)),xe);s(Ae);const{schemaAdaptor:Le}=z(pe);let Re=ae.fieldList||[];const _e=t((()=>ae.schema?ae.schema:ae.fieldList?(Re=Q().traverse(H(ae.fieldList),ae.fieldVisitor),oe(Le(Re))):oe({}))),{onKeydown:Oe}=E({formModel:xe,formRenderRef:ne,props:ae}),{clearSpan:we}=W();a((()=>we(fe)));const Be=G({formModel:xe,formRenderRef:ne,formItemDepsCollector:ue,getFieldList:()=>Re,formUUID:fe});return ee({formModel:xe,validate:(e="*")=>Be.validate(e),getFormValues:(e=!0)=>Be.getFormValues(e),async setFormValues(e,o=!0,t=!1,r=!0){t&&(pe.triggerLock=!0),Be.setFormValues(e,o,r),await i(),pe.triggerLock=!1},setFieldState(e,o){Be.setFieldState(e,o)},resetFields(e="*"){Be.resetFields(e)},queryWidget:async e=>Be.queryWidget(e),getFieldList:()=>Re,async reload(){console.error("reload function is abstract,it should be overwrite!")}}),(o,t)=>(l(),n(m(I),{class:d(["form-render",{"form-render--no-border":!e.bordered,"form-render--underline":"underline"===e.bordered}]),"require-mark-placement":"left",style:p(m(ie))},{default:u((()=>[e.anchor?(l(),c("section",te,[f(m(N),{value:m(ye),"onUpdate:value":t[0]||(t[0]=e=>h(ye)?ye.value=e:null),type:"line",ref_key:"anchorBarRef",ref:he},{default:u((()=>[(l(!0),c(y,null,j(m(ge),(e=>(l(),n(m(D),{name:e.name,tab:e.title,key:e.name},null,8,["name","tab"])))),128))])),_:1},8,["value"])])):g("v-if",!0),f(m(q),{"theme-overrides":m(le)},{default:u((()=>[b("section",{class:"form-render__wrapper",style:p({"--column":e.column,"--form-height":m(me)}),ref_key:"formRenderRef",ref:ne,onScroll:t[1]||(t[1]=(...e)=>m(be)&&m(be)(...e)),onKeydownCapture:t[2]||(t[2]=v(k(((...e)=>m(Oe)&&m(Oe)(...e)),["prevent"]),["enter"]))},[f(m(B),{form:m(xe)},{default:u((()=>[f(m(de),{schema:m(_e)},null,8,["schema"]),e.consumer?(l(),n(m(V),{key:0},{default:u((({form:e})=>[b("div",re,F(JSON.stringify(e.values,null,2)),1)])),_:1})):g("v-if",!0),C(o.$slots,"default")])),_:3},8,["form"])],36)])),_:3},8,["theme-overrides"])])),_:3},8,["class","style"]))}}),[["__file","FormRender.vue"]]);export{se as default};
1
+ import e from"./FormRender.vue2.js";import r from"../../../_virtual/_plugin-vue_export-helper.js";var o=r(e,[["__file","FormRender.vue"]]);export{o as default};
@@ -0,0 +1 @@
1
+ import{defineComponent as e,ref as o,computed as t,provide as r,onMounted as s,onUnmounted as a,nextTick as i,openBlock as l,createBlock as n,unref as m,normalizeClass as d,normalizeStyle as p,withCtx as u,createElementBlock as c,createVNode as f,isRef as h,Fragment as y,renderList as j,createCommentVNode as g,createElementVNode as b,withKeys as k,withModifiers as v,toDisplayString as F,renderSlot as C}from"vue";import{useTheme as S}from"../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import{isNumber as H,cloneDeep as x}from"lodash-es";import{createForm as A,onFieldValueChange as L,onFieldMount as R,onFieldUnmount as O,onFieldReact as w,onFormMount as B}from"@formily/core";import{FormProvider as _,FormConsumer as V}from"@formily/vue";import{NForm as D,NTabs as I,NTabPane as N,NConfigProvider as q}from"naive-ui";import{InjectionFormLifeCycleCaller as T,InjectionFormGraph as U}from"./constants/index.js";import{useAutoHidden as W}from"./hooks/useAutoHidden.js";import{useComplexOptionsSpan as E}from"./hooks/useComplexOptions.js";import{useFormDomEvent as G,useFormExposeEvent as K}from"./hooks/useFormEvent.js";import{useFormGraph as M}from"./hooks/useFormGraph.js";import{useFormRenderLifeCycle as P}from"./hooks/useFormRenderLifeCycle.js";import{useLowCodeEvent as J}from"./hooks/useLowCodeEvent.js";import{useLowCodeReactions as $}from"./hooks/useLowCodeReactions.js";import{useNuiThemeOverrides as z}from"./hooks/useNuiThemeOverrides.js";import"./utils/index.js";import{useFieldListAdaptor as Q}from"./hooks/useFieldListAdaptor.js";import"../../../shared/utils/index.js";import"../index.js";import{useFieldVisitor as X}from"./hooks/useFieldVisitor.js";import"../../../shared/utils/tapable/SyncHook.js";import"../../../shared/utils/tapable/SyncBailHook.js";import"../../../shared/utils/tapable/SyncWaterfallHook.js";import"../../../shared/utils/tapable/SyncLoopHook.js";import"../../../shared/utils/tapable/AsyncParallelHook.js";import"../../../shared/utils/tapable/AsyncParallelBailHook.js";import"../../../shared/utils/tapable/AsyncSeriesHook.js";import"../../../shared/utils/tapable/AsyncSeriesBailHook.js";import"../../../shared/utils/tapable/AsyncSeriesLoopHook.js";import"../../../shared/utils/tapable/AsyncSeriesWaterfallHook.js";import{validateMessageLocale as Y}from"./hooks/useFormValidator.js";import{useAnchor as Z}from"./hooks/useAnchor.js";import{useFormContext as ee}from"./hooks/useFormContext.js";import"./hooks/useFormRenderOptions.js";import{createObjSchema as oe}from"./utils/schema.js";const te={key:0,style:{height:"54px"}},re={style:{"white-space":"pre"}};var se=e({__name:"FormRender",props:{fieldList:{type:Array},initialData:{type:Object,default:()=>({})},fieldVisitor:{type:Object},column:{type:Number,default:24},maxHeight:{type:[Number,String],default:""},anchor:{type:Boolean,default:!1},parallelism:{type:Number,default:3},businessFormatter:{type:Function},schema:{type:Object},components:{type:Object,default:()=>({})},scope:{type:Object,default:()=>({})},annotation:{type:Object},consumer:{type:Boolean,default:!1},uuid:{type:String},lifeCycle:{type:Object},requestInstance:{type:Object},enterToNextWidget:{type:[Boolean,Function],default:!0},lowCodeReactions:{type:Array},linebarAutoHidden:{type:Boolean},bordered:{type:[Boolean,String],default:!0},uniqueCacheData:{type:Boolean,default:!1}},emits:["formChange","annotationChange","scroll"],setup(e,{expose:se,emit:ae}){const ie=e,le=S(),{nuiThemeOverrides:ne}=z();Y();const me=o(),de=t((()=>H(ie.maxHeight)?ie.maxHeight+"px":ie.maxHeight)),{SchemaField:pe,businessCollector:ue,formItemDepsCollector:ce,changeContextCollector:fe,formUUID:he}=ee(ie,ae),{anchorBarRef:ye,currentAnchor:je,updateAnchorList:ge,anchorIdList:be,onScroll:ke}=Z(ie,ae,me,ce),{callLifeCycle:ve}=P(ie);r(T,ve),ve("onSetup");const{trigger:Fe}=W(),{observeFormGraph:Ce,setGraph:Se,removeGraph:He}=M();r(U,Ce);const{lowCodeEventTrigger:xe}=J(),Ae=A({initialValues:ie.initialData,effects(e){L("*",(o=>{const t=o.props.name.toString();ue.trigger(e,t),ce.trigger(t),ae("formChange",{fieldInstance:o,fieldKey:t,fieldName:o.title,value:o.value,context:fe.getContext(t,o.value)}),xe(o),Le(t,o.value)})),R("*",Se),O("*",He),ie.linebarAutoHidden&&(w("*",Fe),B((e=>e.query("*").forEach(Fe)))),ie.anchor&&w("*",ge)}}),{lowCodeReactionsHandler:Le,triggerAllReactionsHandler:Re}=$(t((()=>ie.lowCodeReactions)),Ae);s(Re);const{schemaAdaptor:Oe}=Q(ue);let we=ie.fieldList||[];const Be=t((()=>ie.schema?ie.schema:ie.fieldList?(we=X().traverse(x(ie.fieldList),ie.fieldVisitor),oe(Oe(we))):oe({}))),{onKeydown:_e}=G({formModel:Ae,formRenderRef:me,props:ie}),{clearSpan:Ve}=E();a((()=>Ve(he)));const De=K({formModel:Ae,formRenderRef:me,formItemDepsCollector:ce,getFieldList:()=>we,formUUID:he});return se({formModel:Ae,validate:(e="*")=>De.validate(e),getFormValues:(e=!0)=>De.getFormValues(e),async setFormValues(e,o=!0,t=!1,r=!0){t&&(ue.triggerLock=!0),De.setFormValues(e,o,r),await i(),ue.triggerLock=!1},setFieldState(e,o){De.setFieldState(e,o)},resetFields(e="*"){De.resetFields(e)},queryWidget:async e=>De.queryWidget(e),getFieldList:()=>we,async reload(){console.error("reload function is abstract,it should be overwrite!")}}),(o,t)=>(l(),n(m(D),{class:d(["form-render",{"form-render--no-border":!e.bordered,"form-render--underline":"underline"===e.bordered}]),"require-mark-placement":"left",style:p(m(le))},{default:u((()=>[e.anchor?(l(),c("section",te,[f(m(I),{value:m(je),"onUpdate:value":t[0]||(t[0]=e=>h(je)?je.value=e:null),type:"line",ref_key:"anchorBarRef",ref:ye},{default:u((()=>[(l(!0),c(y,null,j(m(be),(e=>(l(),n(m(N),{name:e.name,tab:e.title,key:e.name},null,8,["name","tab"])))),128))])),_:1},8,["value"])])):g("v-if",!0),f(m(q),{"theme-overrides":m(ne)},{default:u((()=>[b("section",{class:"form-render__wrapper",style:p({"--column":e.column,"--form-height":m(de)}),ref_key:"formRenderRef",ref:me,onScroll:t[1]||(t[1]=(...e)=>m(ke)&&m(ke)(...e)),onKeydownCapture:t[2]||(t[2]=k(v(((...e)=>m(_e)&&m(_e)(...e)),["prevent"]),["enter"]))},[f(m(_),{form:m(Ae)},{default:u((()=>[f(m(pe),{schema:m(Be)},null,8,["schema"]),e.consumer?(l(),n(m(V),{key:0},{default:u((({form:e})=>[b("div",re,F(JSON.stringify(e.values,null,2)),1)])),_:1})):g("v-if",!0),C(o.$slots,"default")])),_:3},8,["form"])],36)])),_:3},8,["theme-overrides"])])),_:3},8,["class","style"]))}});export{se as default};
@@ -118,6 +118,7 @@ declare const _default: import("vue").DefineComponent<{}, {
118
118
  onSetup(): void;
119
119
  beforeRequest(fieldKey: string, params?: import("../../../../es/shared/types").AnyObject | undefined): void | import("../../../../es/shared/types").UndefinedAble<import("../../../../es/shared/types").AnyObject>;
120
120
  afterRequest(fieldKey: string, payload?: any): import("../../../../es/shared/types").AnyObject[];
121
+ afterOptionInit(fieldKey: string, options: import("../../../../es/shared/types").AnyObject[]): void;
121
122
  }>>;
122
123
  };
123
124
  requestInstance: {
@@ -137,6 +138,10 @@ declare const _default: import("vue").DefineComponent<{}, {
137
138
  type: (BooleanConstructor | StringConstructor)[];
138
139
  default: boolean;
139
140
  };
141
+ uniqueCacheData: {
142
+ type: BooleanConstructor;
143
+ default: boolean;
144
+ };
140
145
  }, {
141
146
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
142
147
  fieldList: {
@@ -250,6 +255,7 @@ declare const _default: import("vue").DefineComponent<{}, {
250
255
  onSetup(): void;
251
256
  beforeRequest(fieldKey: string, params?: import("../../../../es/shared/types").AnyObject | undefined): void | import("../../../../es/shared/types").UndefinedAble<import("../../../../es/shared/types").AnyObject>;
252
257
  afterRequest(fieldKey: string, payload?: any): import("../../../../es/shared/types").AnyObject[];
258
+ afterOptionInit(fieldKey: string, options: import("../../../../es/shared/types").AnyObject[]): void;
253
259
  }>>;
254
260
  };
255
261
  requestInstance: {
@@ -269,12 +275,16 @@ declare const _default: import("vue").DefineComponent<{}, {
269
275
  type: (BooleanConstructor | StringConstructor)[];
270
276
  default: boolean;
271
277
  };
278
+ uniqueCacheData: {
279
+ type: BooleanConstructor;
280
+ default: boolean;
281
+ };
272
282
  }>> & {
273
283
  onFormChange?: ((...args: any[]) => any) | undefined;
274
284
  onScroll?: ((...args: any[]) => any) | undefined;
275
285
  onAnnotationChange?: ((...args: any[]) => any) | undefined;
276
286
  }>>;
277
- emit: (event: "scroll" | "formChange" | "annotationChange", ...args: any[]) => void;
287
+ emit: (event: "formChange" | "scroll" | "annotationChange", ...args: any[]) => void;
278
288
  cssVars: import("vue").ComputedRef<import("vue").CSSProperties>;
279
289
  nuiThemeOverrides: import("naive-ui").GlobalThemeOverrides;
280
290
  formRenderRef: import("vue").Ref<HTMLElement | undefined>;
@@ -294,6 +304,17 @@ declare const _default: import("vue").DefineComponent<{}, {
294
304
  title: string;
295
305
  }[]>;
296
306
  onScroll: (scrollEvent: Event) => void;
307
+ callLifeCycle: <T extends "onSetup" | "beforeRequest" | "afterRequest" | "afterOptionInit">(lifeCycleName: T, payload?: Parameters<Required<Partial<{
308
+ onSetup(): void;
309
+ beforeRequest(fieldKey: string, params?: import("../../../../es/shared/types").AnyObject | undefined): void | import("../../../../es/shared/types").UndefinedAble<import("../../../../es/shared/types").AnyObject>;
310
+ afterRequest(fieldKey: string, payload?: any): import("../../../../es/shared/types").AnyObject[];
311
+ afterOptionInit(fieldKey: string, options: import("../../../../es/shared/types").AnyObject[]): void;
312
+ }>>[T]> | undefined) => import("../../../../es/shared/types").UndefinedAble<ReturnType<Required<Partial<{
313
+ onSetup(): void;
314
+ beforeRequest(fieldKey: string, params?: import("../../../../es/shared/types").AnyObject | undefined): void | import("../../../../es/shared/types").UndefinedAble<import("../../../../es/shared/types").AnyObject>;
315
+ afterRequest(fieldKey: string, payload?: any): import("../../../../es/shared/types").AnyObject[];
316
+ afterOptionInit(fieldKey: string, options: import("../../../../es/shared/types").AnyObject[]): void;
317
+ }>>[T]>>;
297
318
  triggerAutoHidden: (field: import("../../../../es/components/form-render").GeneralField) => Promise<void>;
298
319
  observeFormGraph: Record<string, import("../../../../es/components/form-render").GeneralField>;
299
320
  setGraph: (field: import("../../../../es/components/form-render").GeneralField) => void;
@@ -437,11 +458,11 @@ declare const _default: import("vue").DefineComponent<{}, {
437
458
  onFocus: (...args: any[]) => Promise<void>;
438
459
  onBlur: (...args: any[]) => Promise<void>;
439
460
  onInput: (...args: any[]) => Promise<void>;
461
+ editable: boolean;
440
462
  reset: (options?: import("../../../../es/components/form-render").IFieldResetOptions | undefined) => Promise<void>;
441
463
  title: string;
442
- editable: boolean;
443
464
  visible: boolean;
444
- submit: <T>(onSubmit?: ((values: any) => void | Promise<T>) | undefined) => Promise<T>;
465
+ submit: <T_1>(onSubmit?: ((values: any) => void | Promise<T_1>) | undefined) => Promise<T_1>;
445
466
  validator: import("../../../../es/components/form-render").FieldValidator;
446
467
  pattern: import("../../../../es/components/form-render").FieldPatternTypes;
447
468
  content: any;
@@ -585,7 +606,7 @@ declare const _default: import("vue").DefineComponent<{}, {
585
606
  readonly displayDirective: "if" | "show" | "show:lazy";
586
607
  }>;
587
608
  NTabs: any;
588
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("scroll" | "formChange" | "annotationChange")[], "scroll" | "formChange" | "annotationChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
609
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("formChange" | "scroll" | "annotationChange")[], "scroll" | "formChange" | "annotationChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
589
610
  fieldList: {
590
611
  type: import("vue").PropType<import("../../../../es/components/form-render").FieldItem[]>;
591
612
  };
@@ -697,6 +718,7 @@ declare const _default: import("vue").DefineComponent<{}, {
697
718
  onSetup(): void;
698
719
  beforeRequest(fieldKey: string, params?: import("../../../../es/shared/types").AnyObject | undefined): void | import("../../../../es/shared/types").UndefinedAble<import("../../../../es/shared/types").AnyObject>;
699
720
  afterRequest(fieldKey: string, payload?: any): import("../../../../es/shared/types").AnyObject[];
721
+ afterOptionInit(fieldKey: string, options: import("../../../../es/shared/types").AnyObject[]): void;
700
722
  }>>;
701
723
  };
702
724
  requestInstance: {
@@ -716,6 +738,10 @@ declare const _default: import("vue").DefineComponent<{}, {
716
738
  type: (BooleanConstructor | StringConstructor)[];
717
739
  default: boolean;
718
740
  };
741
+ uniqueCacheData: {
742
+ type: BooleanConstructor;
743
+ default: boolean;
744
+ };
719
745
  }>> & {
720
746
  onFormChange?: ((...args: any[]) => any) | undefined;
721
747
  onScroll?: ((...args: any[]) => any) | undefined;
@@ -732,6 +758,7 @@ declare const _default: import("vue").DefineComponent<{}, {
732
758
  enterToNextWidget: boolean | ((fieldItem: import("../../../../es/components/form-render").FieldItem) => boolean | void);
733
759
  linebarAutoHidden: boolean;
734
760
  bordered: string | boolean;
761
+ uniqueCacheData: boolean;
735
762
  }>;
736
763
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
737
764
  export default _default;
@@ -1 +1 @@
1
- import{defineComponent as e,ref as r,computed as l,openBlock as t,createBlock as a,withCtx as o,renderSlot as u,nextTick as d}from"vue";import i from"./FormRender.vue.js";import s from"../../../_virtual/plugin-vue_export-helper.js";var m=s(e({__name:"FormRenderWrapper",setup(e,{expose:s}){const m=r(),n=r(0);return s({...["validate","getFormValues","setFormValues","setFieldState","resetFields","queryWidget","getFieldList"].reduce(((e,r)=>(e[r]=(...e)=>{var l;return(null==(l=m.value)?void 0:l[r]).call(l,...e)},e)),{}),formModel:l((()=>{var e;return null==(e=m.value)?void 0:e.formModel})),reload:async function(){n.value++,await d()}}),(e,r)=>(t(),a(i,{key:n.value,ref_key:"formRenderRef",ref:m},{default:o((()=>[u(e.$slots,"default")])),_:3}))}}),[["__file","FormRenderWrapper.vue"]]);export{m as default};
1
+ import r from"./FormRenderWrapper.vue2.js";import e from"../../../_virtual/_plugin-vue_export-helper.js";var p=e(r,[["__file","FormRenderWrapper.vue"]]);export{p as default};
@@ -0,0 +1 @@
1
+ import{defineComponent as e,ref as r,computed as t,openBlock as a,createBlock as l,withCtx as o,renderSlot as u,nextTick as d}from"vue";import s from"./FormRender.vue.js";var n=e({__name:"FormRenderWrapper",setup(e,{expose:n}){const f=r(),i=r(0);return n({...["validate","getFormValues","setFormValues","setFieldState","resetFields","queryWidget","getFieldList"].reduce(((e,r)=>(e[r]=(...e)=>{var t;return(null==(t=f.value)?void 0:t[r]).call(t,...e)},e)),{}),formModel:t((()=>{var e;return null==(e=f.value)?void 0:e.formModel})),reload:async function(){i.value++,await d()}}),(e,r)=>(a(),l(s,{key:i.value,ref_key:"formRenderRef",ref:f},{default:o((()=>[u(e.$slots,"default")])),_:3}))}});export{n as default};
@@ -14,8 +14,8 @@ export declare const COMBINATION: import("vue").DefineComponent<{
14
14
  disabled: {
15
15
  type: BooleanConstructor;
16
16
  };
17
- getProperties: {
18
- type: PropType<() => FieldItem[]>;
17
+ properties: {
18
+ type: PropType<FieldItem[]>;
19
19
  default: () => never[];
20
20
  };
21
21
  combinationItemDeletable: {
@@ -39,8 +39,8 @@ export declare const COMBINATION: import("vue").DefineComponent<{
39
39
  disabled: {
40
40
  type: BooleanConstructor;
41
41
  };
42
- getProperties: {
43
- type: PropType<() => FieldItem[]>;
42
+ properties: {
43
+ type: PropType<FieldItem[]>;
44
44
  default: () => never[];
45
45
  };
46
46
  combinationItemDeletable: {
@@ -56,5 +56,5 @@ export declare const COMBINATION: import("vue").DefineComponent<{
56
56
  disabled: boolean;
57
57
  title: string;
58
58
  combinationItemDeletable: boolean | CombinationItemDeletableFn;
59
- getProperties: () => FieldItem[];
59
+ properties: FieldItem[];
60
60
  }>;
@@ -1 +1 @@
1
- import{defineComponent as e,ref as o,computed as t,watch as a,inject as i,onBeforeUnmount as r,createVNode as n}from"vue";import{isObjectField as m}from"@formily/core";import{autorun as l}from"@formily/reactive";import{RecursionField as u,connect as s}from"@formily/vue";import{AddCircleOutline as c,RemoveCircle as p}from"@vicons/ionicons5";import{isNumber as d,isArray as f,isFunction as v,range as b}from"lodash-es";import{NButton as y,NIcon as x}from"naive-ui";import"../../../index.js";import{InjectionBusinessCollector as h}from"../../constants/index.js";import"../../utils/index.js";import{useFormField as _}from"../../hooks/useFormField.js";import{useFieldListAdaptor as j}from"../../hooks/useFieldListAdaptor.js";import{createObjSchema as C}from"../../utils/schema.js";const F=s(e({name:"FormCombination",props:{title:{type:String,default:""},value:{type:Array},maxGroupNum:{type:Number},disabled:{type:Boolean},getProperties:{type:Function,default:()=>[]},combinationItemDeletable:{type:[Boolean,Function],default:!0},onInput:{},onBlur:{},onChange:{}},emits:["update:value"],setup(e){const{field:s,fieldKey:F}=_(),g=o(1),k=t((()=>d(e.maxGroupNum)?e.maxGroupNum<1?0:~~e.maxGroupNum:1/0));function I(){g.value++}a((()=>e.value),(e=>{f(e)&&(g.value=Math.min(Math.max(e.length,1),k.value))}),{immediate:!0});const N=i(h),{schemaAdaptor:D}=j(N),G=o([]);return r(l((()=>{f(s.value.value)&&(G.value=s.value.value.map(((o,t)=>v(e.combinationItemDeletable)?e.combinationItemDeletable(o||{},t):e.combinationItemDeletable)))}))),()=>n("section",{class:"form-render__combination"},[n("header",{class:"form-render__combinationHeader"},[n("div",{class:"form-render__combinationHeaderText"},[e.title]),n(y,{onClick:I,text:!0,style:{"--n-text-color":"var(--c-primary-color)"},disabled:g.value>=k.value||e.disabled},{icon:()=>n(x,{component:c},null),default:()=>"新增"})]),b(g.value).map(((o,t)=>n("section",{class:"form-render__combinationContent"},[n(u,{schema:C(D(e.getProperties())),name:t},null),n(y,{text:!0,disabled:!G.value[t],type:"error",class:"form-render__combinationClose",onClick:()=>async function(e){if(g.value>1)g.value--,await s.value.remove(e);else{const o=s.value.query(`${F.value}.${e}`).take();if(!o||!m(o))return;await o.reset()}}(t)},{icon:()=>n(x,{component:p},null)})])))])}}));export{F as COMBINATION};
1
+ import{defineComponent as e,ref as o,computed as t,watch as a,inject as r,onBeforeUnmount as i,createVNode as n}from"vue";import{isObjectField as m}from"@formily/core";import{autorun as l}from"@formily/reactive";import{connect as u,RecursionField as s}from"@formily/vue";import{AddCircleOutline as c,RemoveCircle as p}from"@vicons/ionicons5";import{isNumber as d,isArray as f,isFunction as v,range as b}from"lodash-es";import{NButton as y,NIcon as x}from"naive-ui";import"../../../index.js";import{InjectionBusinessCollector as h}from"../../constants/index.js";import"../../utils/index.js";import{useFormField as _}from"../../hooks/useFormField.js";import{useFieldListAdaptor as j}from"../../hooks/useFieldListAdaptor.js";import{createObjSchema as C}from"../../utils/schema.js";const k=u(e({name:"FormCombination",props:{title:{type:String,default:""},value:{type:Array},maxGroupNum:{type:Number},disabled:{type:Boolean},properties:{type:Array,default:()=>[]},combinationItemDeletable:{type:[Boolean,Function],default:!0},onInput:{},onBlur:{},onChange:{}},emits:["update:value"],setup(e){const{field:u,fieldKey:k}=_(),F=o(1),I=t((()=>d(e.maxGroupNum)?e.maxGroupNum<1?0:~~e.maxGroupNum:1/0));function N(){F.value++}a((()=>e.value),(e=>{f(e)&&(F.value=Math.min(Math.max(e.length,1),I.value))}),{immediate:!0});const A=r(h),{schemaAdaptor:D}=j(A),G=o([]);return i(l((()=>{f(u.value.value)&&(G.value=u.value.value.map(((o,t)=>v(e.combinationItemDeletable)?e.combinationItemDeletable(o||{},t):e.combinationItemDeletable)))}))),()=>n("section",{class:"form-render__combination"},[n("header",{class:"form-render__combinationHeader"},[n("div",{class:"form-render__combinationHeaderText"},[e.title]),n(y,{onClick:N,text:!0,style:{"--n-text-color":"var(--c-primary-color)"},disabled:F.value>=I.value||e.disabled},{icon:()=>n(x,{component:c},null),default:()=>"新增"})]),b(F.value).map(((o,t)=>n("section",{class:"form-render__combinationContent"},[n(s,{schema:C(D(e.properties)),name:t},null),n(y,{text:!0,disabled:!G.value[t],type:"error",class:"form-render__combinationClose",onClick:()=>async function(e){if(F.value>1)F.value--,await u.value.remove(e);else{const o=u.value.query(`${k.value}.${e}`).take();if(!o||!m(o))return;await o.reset()}}(t)},{icon:()=>n(x,{component:p},null)})])))])}}));export{k as COMBINATION};
@@ -1 +1 @@
1
- import{defineComponent as e,inject as r,computed as o,ref as l,onUnmounted as t,createVNode as i,mergeProps as a}from"vue";import{arrayed as s,widthAppend as n}from"../../../../../shared/utils/index.js";import{isVoidField as m}from"@formily/core";import{observe as u,autorun as d}from"@formily/reactive";import{connect as f,mapProps as p}from"@formily/vue";import{useDebounceFn as v}from"@vueuse/core";import{isArray as c,isString as y,isFunction as _}from"lodash-es";import{NFormItem as b}from"naive-ui";import g from"../../../../annotation-edit/index.js";import"../../../index.js";import x from"../tooltipMessage.vue.js";import{InjectionFormUUID as j,InjectionFormGraph as I,InjectionAnnotation as k}from"../../constants/index.js";import{useComplexOptionsSpan as F}from"../../hooks/useComplexOptions.js";import{dotEscape as h}from"../../utils/schema.js";import{useFormField as R}from"../../hooks/useFormField.js";import{validateMessageParser as L}from"../../utils/index.js";const q=f(e({name:"FormRenderItem",props:{label:String,propertyKey:String,remark:String,span:{type:Number,default:6},suffixFields:{type:Array},labelRender:Function,annotation:{},fieldItem:{}},setup(e,{slots:s}){const{field:f,fieldKey:p,fieldAddress:y}=R(),L=r(j),q=o((()=>h(`${L}-${y.value}`))),K=l(!1);if(m(f.value)&&c(e.suffixFields)){const o=r(I);t(u(o,v((()=>{m(f.value)&&c(e.suffixFields)&&(K.value=e.suffixFields.some((e=>{const r=f.value.form.query(e).take();return r&&Reflect.get(r,"required")})))}),100)))}else t(d((()=>{K.value=Reflect.get(f.value,"required")})));const S=r(k),A=o({get(){var r,o;return null!=(o=null==(r=S.value)?void 0:r[e.propertyKey])?o:""},set(r){S.value={property:e.propertyKey,value:r}}});const E=o((()=>S.value&&!1!==e.annotation)),V=o((()=>e.label&&" "!==e.label)),$=o((()=>{let r=0;return E.value&&(r+=18),e.remark&&(r+=18),r}));function w(){return V.value?i("section",{class:"form-render__formItemLabel"},[i("span",{class:"form-render__formItemLabel--text",style:{marginRight:n($.value)}},[_(e.labelRender)?e.labelRender(e.label):e.label]),$.value?i("section",{class:"form-render__formItemLabel--operation"},[e.remark?i("div",{class:"form-render__formItemLabel--tooltip"},[i(x,{message:e.remark},null)]):null,E.value?i(g,{class:"form-render__formItemLabel--annotation",modelValue:A.value,"onUpdate:modelValue":e=>A.value=e},null):null]):null]):null}const{getSpan:C}=F();return()=>i(b,a({class:"form-render__formItem",style:{"--form-item-column":C(L,f.value.address,!1)+e.span}},{id:q.value,uuid:L,"widget-type":f.value.componentType,"field-key":h(p.value),"field-address":h(y.value),required:K.value}),{...s,label:w})}}),p({title:"label"},((e,r)=>{const o=m(r)?void 0:s(r.selfErrors).length?function(e,r){if(!y(r.defined_error_msg)||!r.defined_error_msg)return e.map((e=>L(e,r))).join(",");return L(r.defined_error_msg,r)}(s(r.selfErrors),e.fieldItem):void 0;return{...e,fieldItem:void 0,feedback:o,"validation-status":o?"error":void 0}})));export{q as FORM_ITEM};
1
+ import{defineComponent as e,inject as r,computed as o,ref as l,onUnmounted as t,createVNode as i,mergeProps as a}from"vue";import{arrayed as s,widthAppend as n}from"../../../../../shared/utils/index.js";import{isVoidField as m}from"@formily/core";import{observe as u,autorun as d}from"@formily/reactive";import{connect as f,mapProps as p}from"@formily/vue";import{useDebounceFn as v}from"@vueuse/core";import{isString as c,isArray as y,isFunction as _}from"lodash-es";import{NFormItem as b}from"naive-ui";import g from"../../../../annotation-edit/index.js";import"../../../index.js";import x from"../tooltipMessage.vue.js";import{InjectionFormUUID as j,InjectionFormGraph as I,InjectionAnnotation as k}from"../../constants/index.js";import{useComplexOptionsSpan as F}from"../../hooks/useComplexOptions.js";import{dotEscape as h}from"../../utils/schema.js";import{validateMessageParser as R}from"../../utils/index.js";import{useFormField as L}from"../../hooks/useFormField.js";const q=f(e({name:"FormRenderItem",props:{label:String,propertyKey:String,remark:String,span:{type:Number,default:6},suffixFields:{type:Array},labelRender:Function,annotation:{},fieldItem:{}},setup(e,{slots:s}){const{field:f,fieldKey:p,fieldAddress:c}=L(),R=r(j),q=o((()=>h(`${R}-${c.value}`))),K=l(!1);if(m(f.value)&&y(e.suffixFields)){const o=r(I);t(u(o,v((()=>{m(f.value)&&y(e.suffixFields)&&(K.value=e.suffixFields.some((e=>{const r=f.value.form.query(e).take();return r&&Reflect.get(r,"required")})))}),100)))}else t(d((()=>{K.value=Reflect.get(f.value,"required")})));const S=r(k),A=o({get(){var r,o;return null!=(o=null==(r=S.value)?void 0:r[e.propertyKey])?o:""},set(r){S.value={property:e.propertyKey,value:r}}});const E=o((()=>S.value&&!1!==e.annotation)),V=o((()=>e.label&&" "!==e.label)),$=o((()=>{let r=0;return E.value&&(r+=18),e.remark&&(r+=18),r}));function w(){return V.value?i("section",{class:"form-render__formItemLabel"},[i("span",{class:"form-render__formItemLabel--text",style:{marginRight:n($.value)}},[_(e.labelRender)?e.labelRender(e.label):e.label]),$.value?i("section",{class:"form-render__formItemLabel--operation"},[e.remark?i("div",{class:"form-render__formItemLabel--tooltip"},[i(x,{message:e.remark},null)]):null,E.value?i(g,{class:"form-render__formItemLabel--annotation",modelValue:A.value,"onUpdate:modelValue":e=>A.value=e},null):null]):null]):null}const{getSpan:C}=F();return()=>i(b,a({class:"form-render__formItem",style:{"--form-item-column":C(R,f.value.address,!1)+e.span}},{id:q.value,uuid:R,"widget-type":f.value.componentType,"field-key":h(p.value),"field-address":h(c.value),required:K.value}),{...s,label:w})}}),p({title:"label"},((e,r)=>{const o=m(r)?void 0:s(r.selfErrors).length?function(e,r){if(!c(r.defined_error_msg)||!r.defined_error_msg)return e.map((e=>R(e,r))).join(",");return R(r.defined_error_msg,r)}(s(r.selfErrors),e.fieldItem):void 0;return{...e,fieldItem:void 0,feedback:o,"validation-status":o?"error":void 0}})));export{q as FORM_ITEM};
@@ -11,8 +11,8 @@ export declare const JSON_COMBINATION: import("vue").DefineComponent<{
11
11
  maxGroupNum: {
12
12
  type: NumberConstructor;
13
13
  };
14
- getProperties: {
15
- type: PropType<() => FieldItem[]>;
14
+ properties: {
15
+ type: PropType<FieldItem[]>;
16
16
  default: () => never[];
17
17
  };
18
18
  onInput: {};
@@ -29,8 +29,8 @@ export declare const JSON_COMBINATION: import("vue").DefineComponent<{
29
29
  maxGroupNum: {
30
30
  type: NumberConstructor;
31
31
  };
32
- getProperties: {
33
- type: PropType<() => FieldItem[]>;
32
+ properties: {
33
+ type: PropType<FieldItem[]>;
34
34
  default: () => never[];
35
35
  };
36
36
  onInput: {};
@@ -40,5 +40,5 @@ export declare const JSON_COMBINATION: import("vue").DefineComponent<{
40
40
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
41
41
  }, {
42
42
  title: string;
43
- getProperties: () => FieldItem[];
43
+ properties: FieldItem[];
44
44
  }>;
@@ -1 +1 @@
1
- import{defineComponent as e,ref as o,computed as t,watch as r,onMounted as n,createVNode as i}from"vue";import{isField as l}from"@formily/core";import{Path as a}from"@formily/path";import{AddCircleOutline as u,RemoveCircle as s}from"@vicons/ionicons5";import{isNumber as m,range as c,isArray as p,isEqual as f}from"lodash-es";import{useDeepValidate as v}from"./hooks/useDeepValidate.js";import{formRenderLog as d,mergeDeepProperties as h}from"../../../utils/index.js";import{connect as y,mapProps as g}from"@formily/vue";import{useDebounceFn as b,isObject as x}from"@vueuse/core";import{NButton as N,NIcon as _}from"naive-ui";import C from"../../../FormRender.vue.js";import{assignUpdateValue as j}from"../../../utils/schema.js";const F=y(e({name:"FormJsonCombination",props:{title:{type:String,default:""},value:{type:[String,Array]},maxGroupNum:{type:Number},getProperties:{type:Function,default:()=>[]},onInput:{},onBlur:{},onChange:{}},emits:["update:value"],setup(e,{emit:y}){d("当前COMBINATION控件为json模式,推荐使用非json模式,FieldItem.jsonCombination=false");const g=b((function(){y("update:value",JSON.stringify(j.value))}),300),j=o([]),F=t((()=>j.value.length));function I(o,t=!1){p(o)&&(o.length||o.push({}),o=JSON.stringify(o));const r=function(e){try{if(!e)return null;const o=JSON.parse(e);return Array.isArray(o)?o:null}catch(e){return null}}(o);var n;(n=r)&&!f(n,j.value)&&(r.splice(A.value),r.forEach((function(o,r){if(!x(o))return;j.value[r]=o,t&&h(o,e.getProperties())})),j.value.splice(r.length),j.value.forEach(J))}r((()=>e.value),(e=>I(e))),n((()=>{I(e.value||"[{}]",!0),g()}));const S=o([]);function J(e,o){var t;null==(t=S.value[o])||t.setFieldState("*",(o=>{l(o)&&(o.value=a.getIn(e,o.path))}))}function O(){j.value.push(h({},e.getProperties())),g()}v().bindDeepValidate(S);const A=t((()=>m(e.maxGroupNum)?e.maxGroupNum<1?0:~~e.maxGroupNum:1/0));r(A,(e=>{F.value<=e||(j.value.splice(e),g(),S.value.splice(e))}),{immediate:!0});const G=C;return()=>i("section",{class:"form-render__combination"},[i("header",{class:"form-render__combinationHeader"},[i("div",{class:"form-render__combinationHeaderText"},[e.title]),i(N,{onClick:O,style:{"--n-text-color":"var(--c-primary-color)"},text:!0,disabled:F.value>=A.value},{icon:()=>i(_,{component:u},null),default:()=>"新增"})]),c(F.value).map(((o,t)=>i("section",{class:"form-render__combinationContentJson"},[i(G,{ref:e=>function(e,o){S.value[e]=o,J(j.value[e]||{},e)}(t,e),fieldList:e.getProperties(),onFormChange:e=>function(e,{fieldKey:o,value:t}){!j.value[e]&&(j.value[e]={}),a.setIn(j.value[e],o,t),g()}(t,e)},null),i(N,{text:!0,class:"form-render__combinationClose",type:"error",onClick:()=>function(e){j.value.length>1?(j.value.splice(e,1),S.value.splice(e,1)):j.value.splice(e,1,{}),g()}(t)},{icon:()=>i(_,{component:s},null)})])))])}}),g(j));export{F as JSON_COMBINATION};
1
+ import{defineComponent as e,ref as o,computed as r,watch as t,onMounted as n,createVNode as i}from"vue";import{isField as l}from"@formily/core";import{Path as a}from"@formily/path";import{AddCircleOutline as u,RemoveCircle as s}from"@vicons/ionicons5";import{isNumber as m,range as p,isArray as c,isEqual as f}from"lodash-es";import{useDeepValidate as v}from"./hooks/useDeepValidate.js";import{formRenderLog as d,mergeDeepProperties as y}from"../../../utils/index.js";import{connect as h,mapProps as g}from"@formily/vue";import{useDebounceFn as b,isObject as x}from"@vueuse/core";import{NButton as N,NIcon as _}from"naive-ui";import C from"../../../FormRender.vue.js";import{assignUpdateValue as j}from"../../../utils/schema.js";const I=h(e({name:"FormJsonCombination",props:{title:{type:String,default:""},value:{type:[String,Array]},maxGroupNum:{type:Number},properties:{type:Array,default:()=>[]},onInput:{},onBlur:{},onChange:{}},emits:["update:value"],setup(e,{emit:h}){d("当前COMBINATION控件为json模式,推荐使用非json模式,FieldItem.jsonCombination=false");const g=b((function(){h("update:value",JSON.stringify(j.value))}),300),j=o([]),I=r((()=>j.value.length));function S(o,r=!1){c(o)&&(o.length||o.push({}),o=JSON.stringify(o));const t=function(e){try{if(!e)return null;const o=JSON.parse(e);return Array.isArray(o)?o:null}catch(e){return null}}(o);var n;(n=t)&&!f(n,j.value)&&(t.splice(O.value),t.forEach((function(o,t){if(!x(o))return;j.value[t]=o,r&&y(o,e.properties)})),j.value.splice(t.length),j.value.forEach(F))}t((()=>e.value),(e=>S(e))),n((()=>{S(e.value||"[{}]",!0),g()}));const A=o([]);function F(e,o){var r;null==(r=A.value[o])||r.setFieldState("*",(o=>{l(o)&&(o.value=a.getIn(e,o.path))}))}function J(){j.value.push(y({},e.properties)),g()}v().bindDeepValidate(A);const O=r((()=>m(e.maxGroupNum)?e.maxGroupNum<1?0:~~e.maxGroupNum:1/0));t(O,(e=>{I.value<=e||(j.value.splice(e),g(),A.value.splice(e))}),{immediate:!0});const G=C;return()=>i("section",{class:"form-render__combination"},[i("header",{class:"form-render__combinationHeader"},[i("div",{class:"form-render__combinationHeaderText"},[e.title]),i(N,{onClick:J,style:{"--n-text-color":"var(--c-primary-color)"},text:!0,disabled:I.value>=O.value},{icon:()=>i(_,{component:u},null),default:()=>"新增"})]),p(I.value).map(((o,r)=>i("section",{class:"form-render__combinationContentJson"},[i(G,{ref:e=>function(e,o){A.value[e]=o,F(j.value[e]||{},e)}(r,e),fieldList:e.properties,onFormChange:e=>function(e,{fieldKey:o,value:r}){!j.value[e]&&(j.value[e]={}),a.setIn(j.value[e],o,r),g()}(r,e)},null),i(N,{text:!0,class:"form-render__combinationClose",type:"error",onClick:()=>function(e){j.value.length>1?(j.value.splice(e,1),A.value.splice(e,1)):j.value.splice(e,1,{}),g()}(r)},{icon:()=>i(_,{component:s},null)})])))])}}),g(j));export{I as JSON_COMBINATION};
@@ -1 +1 @@
1
- import{defineComponent as e,ref as r,computed as t,inject as o,watch as a,createVNode as n}from"vue";import{useVModel as u}from"@vueuse/core";import{isEqual as i,isString as l,isEmpty as s,isFunction as c,omit as d}from"lodash-es";import"../../../index.js";import{InjectionAsyncQueue as p}from"../../constants/index.js";import{useCommonInjection as v}from"../../hooks/useCommonInjection.js";import{formRenderLog as f}from"../../utils/index.js";import{connect as m,mapProps as y}from"@formily/vue";import h from"../../../../search-cascader/index.js";import k from"../../../../../shared/components/no-data/NoData.vue.js";import{createVisitedSetter as j,assignUpdateValue as _}from"../../utils/schema.js";import{useFormField as w}from"../../hooks/useFormField.js";import{useFormRequest as b}from"../../hooks/useFormRequest.js";const g=m(e({name:"FormSearchCascade",props:{options:{type:Array,default:()=>[]},labelField:{type:String,default:"text"},valueField:{type:String,default:"value"},autograph:{type:String,required:!0},lazyRequest:{type:Boolean,default:!0},requestCache:{type:Boolean,default:!0},wordbook:{type:Object,required:!0},onChange:{},value:{type:[String,Array]}},emits:["update:value"],setup(e,{emit:m}){const y=u(e,"value",m),_=r(!1),g=r([]),{field:F,fieldKey:K}=w(),O=t((()=>{var r,t,o;return null!=(o=null==(t=null==(r=e.wordbook)?void 0:r.show_key)?void 0:t[0])?o:e.labelField})),q=t((()=>{var r,t;return null!=(t=null==(r=e.wordbook)?void 0:r.value_key)?t:e.valueField})),S=t((()=>{var r,t;return null==(t=null==(r=e.wordbook)?void 0:r.render_key)?void 0:t[0]})),x=t((()=>{var r;return(null==(r=e.wordbook)?void 0:r.level_num)||1/0})),C=o(p),{getSearchRequestInfo:L}=b();async function V(r,t){try{if(r&&!r.__keyword&&r.isLeaf)return o(r);if(null==r?void 0:r.__keyword){if(!l(r.id_link))return Promise.reject();const t=r.id_link.split("_").filter((e=>e)),o=await async function(r){if(!L().primaryKeyUrl)return[];try{return await C.addAsync(t(e.wordbook,e.autograph,r,K.value))}catch(e){l(e)&&f(e)}function t(r,t,o,a){const n=L();return{key:a,params:{autograph:t,tableId:r.id,primaryKeyValue:o.join(","),page:1},...n,url:n.primaryKeyUrl,cache:e.requestCache}}}(t);if(!o)return Promise.reject();const{lastOption:a,options:n}=function(e,r){let t=e[0];return{options:r.reduce(((r,a,n)=>{const u=o(e,a);return 0===n?(t=u,[u]):(Object.assign(u,{parent:t,isLeaf:n+1>=x.value}),t.children=[u],t=u,r)}),[]),lastOption:t};function o(e,r){return e.find((e=>e[q.value]===r))}}(o,t);return await V(a),s(a.children)?(y.value=function(e,r){return r.map((r=>e.find((e=>e[q.value]===r))))}(o,t),_.value=!1,Promise.reject()):(g.value=n,a)}{const n=await C.addAsync(function(r,o,a,n,u){const i={autograph:()=>o,wordbookId:"id",wordbookType:"type",fieldKeys:()=>r.search_key?JSON.stringify(r.search_key):void 0,conObj:()=>JSON.stringify(function(e,r,t){return r?e.conObj||[]:t?[{con:"EQ",is_compare_field:!1,field_key:e.level_key,value:t[q.value]}]:e.conObjFirstLevel||[]}(r,t,n)),primaryKey:"primary_key",levelKey:"level_key",keyword:()=>t,page:()=>1},s=Object.entries(i).reduce(((e,[t,o])=>(e[t]=l(o)?r[o]:c(o)?o():void 0,e)),{});return{...L(),params:s,key:u,cache:e.requestCache}}(e.wordbook,e.autograph,F.value,r,K.value));if(r){if(!n.length)return o(r);r.children=n.map((e=>function(e,r,t){return{...e,parent:r,isLeaf:a(r)+1>=t}}(e,r,x.value)))}else g.value=n.map((e=>function(e,r){e.__keyword=!!r,e.isLeaf=!!r,r&&(e[O.value]=e[S.value||O.value]||e[O.value]);return e}(e,t)))}}catch(e){l(e)&&f(e)}function o(e){return y.value=function(e){const r=[];let t=e;for(;t;)r.unshift(d(t,["parent","isLeaf","__keyword","children"])),t=t.parent;return r}(e),_.value=!1,Promise.reject()}function a(e){let r=1,t=e.parent;for(;t;)r++,t=t.parent;return r}}a((()=>e.wordbook),((r,t)=>{i(r,t)||(g.value=[],r&&(y.value||!e.lazyRequest)&&V())}),{immediate:!0});const{injectValueValidate:A,injectValueWatchFromEmpty:I,injectValueBindKey:P}=v();I(y,V),A(y);const R=P(y);return()=>n(h,{value:y.value,"onUpdate:value":e=>y.value=e,show:_.value,"onUpdate:show":e=>_.value=e,options:g.value,key:R.value,labelKey:O.value,valueKey:q.value,search:V,onFocus:j(F)},{empty:()=>n(k,null,null)})}}),y({dataSource:"options"},_));export{g as LEVEL_SEARCH_CASCADER};
1
+ import{defineComponent as e,ref as r,computed as t,inject as o,watch as a,createVNode as n}from"vue";import{useVModel as u}from"@vueuse/core";import{isEqual as l,isString as i,isNumber as s,isEmpty as c,isFunction as d,omit as v,cloneDeep as p}from"lodash-es";import"../../../index.js";import{InjectionAsyncQueue as f}from"../../constants/index.js";import{useCommonInjection as m}from"../../hooks/useCommonInjection.js";import{formRenderLog as y}from"../../utils/index.js";import{connect as h,mapProps as k}from"@formily/vue";import j from"../../../../search-cascader/index.js";import w from"../../../../../shared/components/no-data/NoData.vue.js";import{assignUpdateValue as _,createVisitedSetter as g}from"../../utils/schema.js";import{useFormField as b}from"../../hooks/useFormField.js";import{useFormRequest as F}from"../../hooks/useFormRequest.js";const K=h(e({name:"FormSearchCascade",props:{options:{type:Array,default:()=>[]},labelField:{type:String,default:"text"},valueField:{type:String,default:"value"},autograph:{type:String,required:!0},lazyRequest:{type:Boolean,default:!0},requestCache:{type:Boolean,default:!0},wordbook:{type:Object,required:!0},onChange:{},value:{type:[String,Array]}},emits:["update:value"],setup(e,{emit:h}){const k=u(e,"value",h),_=r(!1),K=r([]),{field:O,fieldKey:q}=b(),S=t((()=>{var r,t,o;return null!=(o=null==(t=null==(r=e.wordbook)?void 0:r.show_key)?void 0:t[0])?o:e.labelField})),x=t((()=>{var r,t;return null!=(t=null==(r=e.wordbook)?void 0:r.value_key)?t:e.valueField})),C=t((()=>{var r,t;return null==(t=null==(r=e.wordbook)?void 0:r.render_key)?void 0:t[0]})),L=t((()=>{var r;return(null==(r=e.wordbook)?void 0:r.level_num)||1/0})),P=o(f),{getSearchRequestInfo:V}=F(),A=r(150),I=r();async function R(r,t){var o;if(e.value&&!r&&!t){if(i(e.value))return Promise.reject("1");const[r,t]=function(e){if(!e.length)return[];const r=[(e=p(e))[0]];let t=e[0];for(let r=1;r<e.length;r++){const o=e[r];o&&(t.children=[o],o.parent=t,t=o)}return[e,r]}(e.value);K.value=t;const o=r[Math.max(0,r.length-2)];return await R(o),o}try{if(r&&!r.__keyword&&r.isLeaf)return a(r);if(null==r?void 0:r.__keyword){if(!i(r.id_link))return Promise.reject();const t=r.id_link.split("_").filter((e=>e));s(L.value)&&L.value!==1/0&&t.splice(L.value);const o=await async function(r){if(!V().primaryKeyUrl)return[];try{return await P.addAsync(t(e.wordbook,e.autograph,r,q.value))}catch(e){i(e)&&y(e)}function t(r,t,o,a){const n=V();return{key:a,params:{autograph:t,tableId:r.id,primaryKeyValue:o.join(","),page:1},...n,url:n.primaryKeyUrl,cache:e.requestCache}}}(t);if(!o)return Promise.reject();const{lastOption:a,options:n}=function(e,r){let t=e[0];return{options:r.reduce(((r,a,n)=>{const u=o(e,a);return 0===n?(t=u,[u]):(Object.assign(u,{parent:t,isLeaf:n+1>=L.value}),t.children=[u],t=u,r)}),[]),lastOption:t};function o(e,r){return e.find((e=>e[x.value]===r))}}(o,t);return n.length<L.value&&(await R(a),c(a.children))?(k.value=function(e,r){return r.map((r=>e.find((e=>e[x.value]===r))))}(o,t),_.value=!1,Promise.reject()):(K.value=n,a)}{const u=await P.addAsync(function(r,o,a,n,u){const l={autograph:()=>o,wordbookId:"id",wordbookType:"type",fieldKeys:()=>r.search_key?JSON.stringify(r.search_key):void 0,conObj:()=>JSON.stringify(function(e,r,t){return r?e.conObj||[]:t?[{con:"EQ",is_compare_field:!1,field_key:e.level_key,value:t[x.value]}]:e.conObjFirstLevel||[]}(r,t,n)),primaryKey:"primary_key",levelKey:"level_key",keyword:()=>t,page:()=>1},s=Object.entries(l).reduce(((e,[t,o])=>(e[t]=i(o)?r[o]:d(o)?o():void 0,e)),{});return{...V(),params:s,key:u,cache:e.requestCache}}(e.wordbook,e.autograph,O.value,r,q.value));if(r){if(!u.length)return a(r);r.children=u.map((e=>function(e,r,t){return{...e,parent:r,isLeaf:n(r)+1>=t}}(e,r,L.value)))}else K.value=u.map((e=>function(e,r){e.__keyword=!!r,e.isLeaf=!!r,r&&(e[S.value]=e[C.value||S.value]||e[S.value]);return e}(e,t))),A.value=t&&(null==(o=I.value)?void 0:o.getWidth())||150}}catch(e){i(e)&&y(e)}function a(e){return k.value=function(e){const r=[];let t=e;for(;t;)r.unshift(v(t,["parent","isLeaf","__keyword","children"])),t=t.parent;return r}(e),_.value=!1,Promise.reject()}function n(e){let r=1,t=e.parent;for(;t;)r++,t=t.parent;return r}}a((()=>e.wordbook),((r,t)=>{l(r,t)||(K.value=[],r&&(k.value||!e.lazyRequest)&&R())}),{immediate:!0});const{injectValueValidate:U,injectValueWatchFromEmpty:B,injectValueBindKey:N}=m();B(k,R),U(k);const W=N(k);return()=>n(j,{ref:I,value:k.value,"onUpdate:value":e=>k.value=e,show:_.value,"onUpdate:show":e=>_.value=e,options:K.value,key:W.value,labelKey:S.value,valueKey:x.value,search:R,onFocus:g(O),menuWidth:A.value},{empty:()=>n(w,null,null)})}}),k({dataSource:"options"},_));export{K as LEVEL_SEARCH_CASCADER};
@@ -1 +1 @@
1
- import{defineComponent as e,ref as r,computed as o,inject as a,openBlock as l,createElementBlock as s,createElementVNode as t,normalizeClass as i,unref as n,createTextVNode as d,toDisplayString as m,createBlock as u,createCommentVNode as f,Fragment as p,createVNode as v,withCtx as _,renderSlot as c}from"vue";import"../../../../index.js";import b from"../../tooltipMessage.vue.js";import{InjectionFormItemDepsCollector as k,FormItemLineBarDepKeyPrepend as h}from"../../../constants/index.js";import{ChevronDown as y,ChevronUp as g}from"@vicons/ionicons5";import{NCollapseTransition as j}from"naive-ui";import w from"../../../../../../_virtual/plugin-vue_export-helper.js";import{useFormField as x}from"../../../hooks/useFormField.js";const F={class:"form-render__linebar","anchor-target":""},C={class:"form-render__linebarHeaderTitle"};var H=w(e({__name:"FormCollapse",props:{show:{type:Boolean,default:!0},title:{type:String,default:""},remark:String,disabled:{type:Boolean,default:!1}},setup(e){const w=e,H=r(w.show);function B(){w.disabled||(H.value=!H.value)}const S=o((()=>["form-render__linebarHeader",{"form-render__linebarHeader--disabled":!!w.disabled}])),{fieldKey:D}=x();return a(k).setDeps(D.value,h+D.value,((e=!0)=>{H.value=e})),(r,o)=>(l(),s("section",F,[t("header",{class:i(n(S)),onClick:B},[t("div",C,[d(m(e.title)+" ",1),e.remark?(l(),u(b,{key:0,message:e.remark},null,8,["message"])):f("v-if",!0)]),e.disabled?f("v-if",!0):(l(),s(p,{key:0},[H.value?(l(),u(n(y),{key:0})):(l(),u(n(g),{key:1}))],64))],2),v(n(j),{class:"form-render__linebarItem",show:H.value},{default:_((()=>[c(r.$slots,"default")])),_:3},8,["show"])]))}}),[["__file","FormCollapse.vue"]]);export{H as default};
1
+ import e from"./FormCollapse.vue2.js";import r from"../../../../../../_virtual/_plugin-vue_export-helper.js";var o=r(e,[["__file","FormCollapse.vue"]]);export{o as default};
@@ -0,0 +1 @@
1
+ import{defineComponent as e,ref as r,computed as a,inject as o,openBlock as s,createElementBlock as l,createElementVNode as t,normalizeClass as i,unref as n,createTextVNode as d,toDisplayString as m,createBlock as f,createCommentVNode as u,Fragment as p,createVNode as v,withCtx as c,renderSlot as _}from"vue";import"../../../../index.js";import b from"../../tooltipMessage.vue.js";import{InjectionFormItemDepsCollector as k,FormItemLineBarDepKeyPrepend as y}from"../../../constants/index.js";import{ChevronDown as h,ChevronUp as g}from"@vicons/ionicons5";import{NCollapseTransition as j}from"naive-ui";import{useFormField as w}from"../../../hooks/useFormField.js";const x={class:"form-render__linebar","anchor-target":""},F={class:"form-render__linebarHeaderTitle"};var H=e({__name:"FormCollapse",props:{show:{type:Boolean,default:!0},title:{type:String,default:""},remark:String,disabled:{type:Boolean,default:!1}},setup(e){const H=e,B=r(H.show);function C(){H.disabled||(B.value=!B.value)}const S=a((()=>["form-render__linebarHeader",{"form-render__linebarHeader--disabled":!!H.disabled}])),{fieldKey:D}=w();return o(k).setDeps(D.value,y+D.value,((e=!0)=>{B.value=e})),(r,a)=>(s(),l("section",x,[t("header",{class:i(n(S)),onClick:C},[t("div",F,[d(m(e.title)+" ",1),e.remark?(s(),f(b,{key:0,message:e.remark},null,8,["message"])):u("v-if",!0)]),e.disabled?u("v-if",!0):(s(),l(p,{key:0},[B.value?(s(),f(n(h),{key:0})):(s(),f(n(g),{key:1}))],64))],2),v(n(j),{class:"form-render__linebarItem",show:B.value},{default:c((()=>[_(r.$slots,"default")])),_:3},8,["show"])]))}});export{H as default};
@@ -1 +1 @@
1
- import{defineComponent as e,ref as l,computed as u,inject as a,watch as o,createVNode as t}from"vue";import{connect as n,mapProps as r}from"@formily/vue";import{useVModel as i,useDebounceFn as s}from"@vueuse/core";import{isString as v,isArray as m,cloneDeep as p,isEqual as d}from"lodash-es";import{NSelect as f}from"naive-ui";import"../../../index.js";import{InjectionAsyncQueue as c,InjectionChangeContextCollector as y,InjectionFormItemDepsCollector as g}from"../../constants/index.js";import{createUrlConfigParams as h,formRenderLog as C}from"../../utils/index.js";import{useCommonInjection as j,useSelectOptionProps as F}from"../../hooks/useCommonInjection.js";import{useFormField as x}from"../../hooks/useFormField.js";import{createVisitedSetter as b,assignUpdateValue as K,assignClearBindVisited as S}from"../../utils/schema.js";const k=n(e({name:"FormRemoteSearch",props:{value:{type:String},requestCache:{type:Boolean,default:!0},options:{type:Array,default:()=>[]},labelField:{type:String,default:"text"},valueField:{type:String,default:"value"},urlConfig:{type:Object},onChange:{}},emits:["update:value"],setup(e,{slots:n,emit:r}){const K=i(e,"value",r),{field:S,fieldKey:k}=x(),w=l(null),V=u((()=>{var l,u,a;return null!=(a=null!=(u=null==(l=e.urlConfig)?void 0:l.nameKey)?u:e.labelField)?a:"text"})),q=u((()=>{var l,u,a;return null!=(a=null!=(u=null==(l=e.urlConfig)?void 0:l.valueKey)?u:e.valueField)?a:"value"})),A=a(c),B=s((async(l="",u="label")=>{if(!e.urlConfig)return w.value=null;try{w.value=await A.addAsync(await h({config:{...e.urlConfig,params:{...e.urlConfig.params,["value"===u?q.value:"keyword"]:l}},cache:e.requestCache,field:S.value}))}catch(e){v(e)&&C(e)}})),O=u((()=>m(w.value)?w.value:m(e.options)?e.options:[])),{injectValueValidate:P,injectValueBindKey:U}=j();P(K);const D=U(K);o(K,(e=>{if(e&&!O.value.find((l=>l[q.value]===e)))return B(e,"value")}));a(y).setContext(k.value,(e=>{return{currentOption:p((l=e,O.value.find((e=>e[q.value]===l))))};var l}));const I=a(g);o((()=>e.urlConfig),((e,l)=>{d(e,l)||(w.value=null,e&&(I.setDeps(k.value,e.dependKey||[],(async()=>{w.value=null,K.value=null})),K.value&&B(K.value,"value")))}),{immediate:!0});const{menuProps:R,nodeProps:z}=F();return()=>t(f,{remote:!0,filterable:!0,key:D.value,value:K.value,"onUpdate:value":e=>K.value=e,labelField:V.value,valueField:q.value,"menu-props":R,"node-props":z,onSearch:B,"onUpdate:show":e=>e&&B(),options:O.value,onFocus:b(S)},n)}}),r(K,S));export{k as REMOTE_SEARCH};
1
+ import{defineComponent as e,ref as l,computed as u,inject as a,watch as o,createVNode as t}from"vue";import{connect as n,mapProps as r}from"@formily/vue";import{useVModel as i,useDebounceFn as s}from"@vueuse/core";import{isString as v,isArray as m,cloneDeep as p,isEqual as d}from"lodash-es";import{NSelect as f}from"naive-ui";import"../../../index.js";import{InjectionAsyncQueue as c,InjectionChangeContextCollector as y,InjectionFormItemDepsCollector as g}from"../../constants/index.js";import{createUrlConfigParams as h,formRenderLog as C}from"../../utils/index.js";import{useCommonInjection as j,useSelectOptionProps as F}from"../../hooks/useCommonInjection.js";import{assignUpdateValue as x,assignClearBindVisited as b,createVisitedSetter as K}from"../../utils/schema.js";import{useFormField as S}from"../../hooks/useFormField.js";const k=n(e({name:"FormRemoteSearch",props:{value:{type:String},requestCache:{type:Boolean,default:!0},options:{type:Array,default:()=>[]},labelField:{type:String,default:"text"},valueField:{type:String,default:"value"},urlConfig:{type:Object},onChange:{}},emits:["update:value"],setup(e,{slots:n,emit:r}){const x=i(e,"value",r),{field:b,fieldKey:k}=S(),w=l(null),V=u((()=>{var l,u,a;return null!=(a=null!=(u=null==(l=e.urlConfig)?void 0:l.nameKey)?u:e.labelField)?a:"text"})),q=u((()=>{var l,u,a;return null!=(a=null!=(u=null==(l=e.urlConfig)?void 0:l.valueKey)?u:e.valueField)?a:"value"})),A=a(c),B=s((async(l="",u="label")=>{if(!e.urlConfig)return w.value=null;try{w.value=await A.addAsync(await h({config:{...e.urlConfig,params:{...e.urlConfig.params,["value"===u?q.value:"keyword"]:l}},cache:e.requestCache,field:b.value}))}catch(e){v(e)&&C(e)}})),O=u((()=>m(w.value)?w.value:m(e.options)?e.options:[])),{injectValueValidate:P,injectValueBindKey:U}=j();P(x);const D=U(x);o(x,(e=>{if(e&&!O.value.find((l=>l[q.value]===e)))return B(e,"value")}));a(y).setContext(k.value,(e=>{return{currentOption:p((l=e,O.value.find((e=>e[q.value]===l))))};var l}));const I=a(g);o((()=>e.urlConfig),((e,l)=>{d(e,l)||(w.value=null,e&&(I.setDeps(k.value,e.dependKey||[],(async()=>{w.value=null,x.value=null})),x.value&&B(x.value,"value")))}),{immediate:!0});const{menuProps:R,nodeProps:z}=F();return()=>t(f,{remote:!0,filterable:!0,key:D.value,value:x.value,"onUpdate:value":e=>x.value=e,labelField:V.value,valueField:q.value,"menu-props":R,"node-props":z,onSearch:B,"onUpdate:show":e=>e&&B(),options:O.value,onFocus:K(b)},n)}}),r(x,b));export{k as REMOTE_SEARCH};
@@ -1 +1 @@
1
- import{defineComponent as e,ref as t,computed as a,inject as l,watch as r,createVNode as n,nextTick as o}from"vue";import{isEqual as u,isArray as i,isString as s}from"lodash-es";import"../../../index.js";import{useCommonInjection as c}from"../../hooks/useCommonInjection.js";import{InjectionAsyncQueue as p,InjectionFormUUID as d}from"../../constants/index.js";import"../../../../../shared/utils/index.js";import"../../utils/index.js";import{useFormField as m}from"../../hooks/useFormField.js";import{NCascader as v}from"naive-ui";import"@vueuse/core";import"date-fns";import"../../../../../shared/utils/tapable/SyncHook.js";import"../../../../../shared/utils/tapable/SyncBailHook.js";import"../../../../../shared/utils/tapable/SyncWaterfallHook.js";import"../../../../../shared/utils/tapable/SyncLoopHook.js";import"../../../../../shared/utils/tapable/AsyncParallelHook.js";import"../../../../../shared/utils/tapable/AsyncParallelBailHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesBailHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesLoopHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesWaterfallHook.js";import"../../hooks/useFormValidator.js";import"@formily/core";import{connect as f,mapProps as y}from"@formily/vue";import"@vue/shared";import"./index.js";import"../../hooks/useFormRenderOptions.js";import{createVisitedSetter as h,assignUpdateValue as j,traverseDependKey as k}from"../../utils/schema.js";const g=f(e({name:"FormCascader",props:{options:{type:Array,default:()=>[]},depth:{type:[Number,String]},urlConfig:{type:Object},lazyRequest:{type:Boolean,default:!0},requestCache:{type:Boolean,default:!0},onFocus:{type:Function},filterable:{type:Boolean,default:!1},checkStrategy:{type:String,default:"child"},labelField:{type:String,default:"text"},valueField:{type:String,default:"value"},onChange:{},value:{}},emits:["update:value"],setup(e,{slots:f,emit:y}){const j=t(),{field:g,title:b}=m(),S=t(1),C=t(!0);const w=a((()=>{var t,a,l;return null!=(l=null!=(a=null==(t=e.urlConfig)?void 0:t.nameKey)?a:e.labelField)?l:"text"})),F=a((()=>{var t,a,l;return null!=(l=null!=(a=null==(t=e.urlConfig)?void 0:t.valueKey)?a:e.valueField)?l:"value"})),A=a((()=>{try{const t=Array.isArray(e.value)?e.value:JSON.parse(e.value||"");if(!Array.isArray(t)||!t.length)return null;const a=t.map((e=>e[F.value])).slice(-1).join(""),l=t.map((e=>e[w.value])).join(" / ");return a||l}catch(e){return null}}));function H(e,t,a){y("update:value",i(a)?a.map((function(e){return{...e,label:e[w.value],children:void 0,parent:void 0,mergeItemValue:void 0}})):null)}const x=l(p);async function q(t){e.filterable?await async function(){if(!e.urlConfig||j.value&&e.requestCache)return;const t=await x.addAsync({...e.urlConfig,params:{lvlnr:"1"},key:b.value,cache:e.requestCache});function a(e,t,r){const n=[...r,...l(e)],o={[w.value]:e[w.value],[F.value]:e[F.value],depth:t+1,isLeaf:!0,keyword:e.keyword,mergeItemValue:n};return i(e.children)&&(o.children=e.children.map((e=>a(e,t+1,n))),o.isLeaf=!e.children.length),S.value=Math.max(S.value,t+1),o}function l(e){let t=[];if(s(e[w.value])&&(t=[...t,e[w.value]]),s(e.keyword)&&e.keyword.length>0){const a=e.keyword.split(",");t=[...t,...a]}return t}j.value=t.map((e=>a(e,0,[])))}():await async function(t){if(r(e,t))return;const a=await x.addAsync(n(s(t),i(e),b.value,t));if(!a.length&&t)return t.isLeaf=!0,H(0,0,o(t)),void(O.value=!1);const l=a.map((e=>u(e,s(t))));function r(e,t){return!i(e)||!t&&j.value&&e.requestCache||s(t)>=s(e)-1}function n(t,a,l,r){const n={lvlnr:t+1+""};return r&&a.dependKey&&k(a.dependKey,((e,t)=>{n[t]=r[e]})),{params:n,...a,key:l,cache:e.requestCache}}function o(e){let t=e;const a=[e];for(;t.parent;)a.unshift(t.parent),t=t.parent;return a}function u(a,l){return{[w.value]:a[w.value],[F.value]:a[F.value],depth:l+1,parent:t,isLeaf:l+2>=s(e)}}function i(e){return e.urlConfig}function s(e){var t;return null!=(t=null==e?void 0:e.depth)?t:-1}t?t.children=l:j.value=l}(t),await B()}const V=`form-render__cascade--menu-${l(d)}`;async function B(){await o();const e=document.querySelector(`.${V} .v-vl`);e&&e.dispatchEvent(new CustomEvent("scroll"))}function L(t,a){if(!t||!a)return!1;const{mergeItemValue:l}=a;if(e.checkStrategy.includes("child")&&a.depth<S.value)return!1;return l.length>0&&l.some((e=>e.includes(t.trim())))}const{injectValueValidate:K,injectValueWatchFromEmpty:I,injectValueBindKey:E}=c();I((()=>e.value),q),K((()=>e.value)),r((()=>e.urlConfig),(async(t,a)=>{u(t,a)||(j.value=null,C.value?e.lazyRequest||(q(),C.value=!C.value):await q())}),{immediate:!0});const O=t(!1);function R(e){O.value=!!e,e&&q()}const W=a((()=>j.value||e.options||[])),z=a((()=>!e.filterable)),N=E(A);return()=>n(v,{key:N.value,remote:z.value,filterable:e.filterable,"menu-props":{class:V,onClick:B},"check-strategy":e.checkStrategy,show:!!O.value,"onUpdate:show":R,value:A.value,filter:L,"onUpdate:value":H,labelField:w.value,valueField:F.value,options:W.value,onLoad:q,onFocus:h(g)},f)}}),y({dataSource:"options"},j));export{g as SEARCH_CASCADER};
1
+ import{defineComponent as e,ref as t,computed as a,inject as l,watch as r,createVNode as n,nextTick as o}from"vue";import{isEqual as u,isArray as i,isString as s}from"lodash-es";import"../../../index.js";import{useCommonInjection as c}from"../../hooks/useCommonInjection.js";import{InjectionAsyncQueue as p,InjectionFormUUID as d}from"../../constants/index.js";import"../../../../../shared/utils/index.js";import"../../utils/index.js";import{useFormField as m}from"../../hooks/useFormField.js";import{NCascader as v}from"naive-ui";import"@vueuse/core";import"date-fns";import"../../../../../shared/utils/tapable/SyncHook.js";import"../../../../../shared/utils/tapable/SyncBailHook.js";import"../../../../../shared/utils/tapable/SyncWaterfallHook.js";import"../../../../../shared/utils/tapable/SyncLoopHook.js";import"../../../../../shared/utils/tapable/AsyncParallelHook.js";import"../../../../../shared/utils/tapable/AsyncParallelBailHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesBailHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesLoopHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesWaterfallHook.js";import"../../hooks/useFormValidator.js";import"@formily/core";import{connect as f,mapProps as y}from"@formily/vue";import"@vue/shared";import"./index.js";import"../../hooks/useFormRenderOptions.js";import{assignUpdateValue as h,createVisitedSetter as j,traverseDependKey as k}from"../../utils/schema.js";const g=f(e({name:"FormCascader",props:{options:{type:Array,default:()=>[]},depth:{type:[Number,String]},urlConfig:{type:Object},lazyRequest:{type:Boolean,default:!0},requestCache:{type:Boolean,default:!0},onFocus:{type:Function},filterable:{type:Boolean,default:!1},checkStrategy:{type:String,default:"child"},labelField:{type:String,default:"text"},valueField:{type:String,default:"value"},onChange:{},value:{}},emits:["update:value"],setup(e,{slots:f,emit:y}){const h=t(),{field:g,title:b}=m(),S=t(1),C=t(!0);const w=a((()=>{var t,a,l;return null!=(l=null!=(a=null==(t=e.urlConfig)?void 0:t.nameKey)?a:e.labelField)?l:"text"})),F=a((()=>{var t,a,l;return null!=(l=null!=(a=null==(t=e.urlConfig)?void 0:t.valueKey)?a:e.valueField)?l:"value"})),A=a((()=>{try{const t=Array.isArray(e.value)?e.value:JSON.parse(e.value||"");if(!Array.isArray(t)||!t.length)return null;const a=t.map((e=>e[F.value])).slice(-1).join(""),l=t.map((e=>e[w.value])).join(" / ");return a||l}catch(e){return null}}));function H(e,t,a){y("update:value",i(a)?a.map((function(e){return{...e,label:e[w.value],children:void 0,parent:void 0,mergeItemValue:void 0}})):null)}const x=l(p);async function q(t){e.filterable?await async function(){if(!e.urlConfig||h.value&&e.requestCache)return;const t=await x.addAsync({...e.urlConfig,params:{lvlnr:"1"},key:b.value,cache:e.requestCache});function a(e,t,r){const n=[...r,...l(e)],o={[w.value]:e[w.value],[F.value]:e[F.value],depth:t+1,isLeaf:!0,keyword:e.keyword,mergeItemValue:n};return i(e.children)&&(o.children=e.children.map((e=>a(e,t+1,n))),o.isLeaf=!e.children.length),S.value=Math.max(S.value,t+1),o}function l(e){let t=[];if(s(e[w.value])&&(t=[...t,e[w.value]]),s(e.keyword)&&e.keyword.length>0){const a=e.keyword.split(",");t=[...t,...a]}return t}h.value=t.map((e=>a(e,0,[])))}():await async function(t){if(r(e,t))return;const a=await x.addAsync(n(s(t),i(e),b.value,t));if(!a.length&&t)return t.isLeaf=!0,H(0,0,o(t)),void(O.value=!1);const l=a.map((e=>u(e,s(t))));function r(e,t){return!i(e)||!t&&h.value&&e.requestCache||s(t)>=s(e)-1}function n(t,a,l,r){const n={lvlnr:t+1+""};return r&&a.dependKey&&k(a.dependKey,((e,t)=>{n[t]=r[e]})),{params:n,...a,key:l,cache:e.requestCache}}function o(e){let t=e;const a=[e];for(;t.parent;)a.unshift(t.parent),t=t.parent;return a}function u(a,l){return{[w.value]:a[w.value],[F.value]:a[F.value],depth:l+1,parent:t,isLeaf:l+2>=s(e)}}function i(e){return e.urlConfig}function s(e){var t;return null!=(t=null==e?void 0:e.depth)?t:-1}t?t.children=l:h.value=l}(t),await B()}const V=`form-render__cascade--menu-${l(d)}`;async function B(){await o();const e=document.querySelector(`.${V} .v-vl`);e&&e.dispatchEvent(new CustomEvent("scroll"))}function L(t,a){if(!t||!a)return!1;const{mergeItemValue:l}=a;if(e.checkStrategy.includes("child")&&a.depth<S.value)return!1;return l.length>0&&l.some((e=>e.includes(t.trim())))}const{injectValueValidate:K,injectValueWatchFromEmpty:I,injectValueBindKey:E}=c();I((()=>e.value),q),K((()=>e.value)),r((()=>e.urlConfig),(async(t,a)=>{u(t,a)||(h.value=null,C.value?e.lazyRequest||(q(),C.value=!C.value):await q())}),{immediate:!0});const O=t(!1);function R(e){O.value=!!e,e&&q()}const W=a((()=>h.value||e.options||[])),z=a((()=>!e.filterable)),N=E(A);return()=>n(v,{key:N.value,remote:z.value,filterable:e.filterable,"menu-props":{class:V,onClick:B},"check-strategy":e.checkStrategy,show:!!O.value,"onUpdate:show":R,value:A.value,filter:L,"onUpdate:value":H,labelField:w.value,valueField:F.value,options:W.value,onLoad:q,onFocus:j(g)},f)}}),y({dataSource:"options"},h));export{g as SEARCH_CASCADER};
@@ -1 +1 @@
1
- import{defineComponent as e,computed as o,inject as t,ref as a,createVNode as l}from"vue";import{useDebounceFn as r}from"@vueuse/core";import{cloneDeep as s,isArray as n,isString as i}from"lodash-es";import{useCommonInjection as u,useSelectOptionProps as p}from"../../hooks/useCommonInjection.js";import{InjectionChangeContextCollector as m}from"../../constants/index.js";import"../../../../../shared/utils/index.js";import"../../../index.js";import"../../utils/index.js";import{useFormField as c}from"../../hooks/useFormField.js";import{NSelect as d}from"naive-ui";import"date-fns";import"../../../../../shared/utils/tapable/SyncHook.js";import"../../../../../shared/utils/tapable/SyncBailHook.js";import"../../../../../shared/utils/tapable/SyncWaterfallHook.js";import"../../../../../shared/utils/tapable/SyncLoopHook.js";import"../../../../../shared/utils/tapable/AsyncParallelHook.js";import"../../../../../shared/utils/tapable/AsyncParallelBailHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesBailHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesLoopHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesWaterfallHook.js";import"../../hooks/useFormValidator.js";import"@formily/core";import{connect as y,mapProps as v}from"@formily/vue";import"@vue/shared";import"./index.js";import{useUrlConfigOptions as f,useAutographOptions as h,useRecommendOptions as j,searchContentMatcher as b}from"../../hooks/useFormRenderOptions.js";import{createVisitedSetter as k,assignUpdateValue as S,assignClearBindVisited as g}from"../../utils/schema.js";const F=y(e({name:"FormSelect",props:{value:{type:[String,Array,Number]},lazyRequest:{type:Boolean,default:!0},requestCache:{type:Boolean,default:!0},options:{type:Array,default:()=>[]},onChange:{},labelField:{type:String,default:"text"},valueField:{type:String,default:"value"},allowCreate:Boolean,urlConfig:{type:Object},autograph:{type:String},wordbook:{type:Object},recommend:{type:Boolean,default:!1},commonList:{type:Array},recentList:{type:Array},getRecommendInfo:{type:Function},commonNum:{type:Number,default:10},recentNum:{type:Number,default:10},recommendCache:{type:Boolean,default:!1}},emits:["update:value","postRecommend"],setup(e,{slots:y,emit:v}){const S=o({get:()=>e.value,async set(e){v("update:value",e),C(e)}}),{labelKey:g,valueKey:F,fetchData:A,fullOptions:H,filterOptions:x}=e.urlConfig?f(e,S):h(e,S),{getRecommend:B,postRecommend:C,sortedOptions:O}=j(e,x,v,g,F),{field:R,fieldKey:L}=c();t(m).setContext(L.value,(e=>{return{currentOption:s((o=e,n(o)?function(e){const o=H.value.reduce(((e,o)=>(e[o[F.value]]=o,e)),{});return e.map((e=>o[e]))}(o):(t=o,H.value.find((e=>e[F.value]===t)))))};var o,t}));const N=a(""),V=r((async(e="")=>{N.value=e,A(e),B(e)}),300),{injectValueValidate:w,injectValueWatchFromEmpty:K,injectValueBindKey:P}=u();K(S,V),w(S);const W=P(S),{menuProps:q,nodeProps:I}=p();function U(e){const o=e[g.value];if(!o||!i(o))return"";const t=b(N.value,o);return t?l("section",null,[t.map(((e,o)=>0!==o&&e?l("span",{style:{color:o%2==0?"var(--n-option-text-color-active)":""}},[e]):null))]):o}const z=o((()=>O.value.length||!e.allowCreate?O.value:N.value?[{[g.value]:N.value,[F.value]:N.value},...O.value]:O.value));return()=>l(d,{key:W.value,remote:!0,filterable:!0,value:S.value,"onUpdate:value":e=>S.value=e,"menu-props":q,"node-props":I,labelField:g.value,valueField:F.value,options:z.value,onSearch:V,"onUpdate:show":e=>e&&V(),onFocus:k(R),renderLabel:U},y)}}),v({dataSource:"options"},S,g));export{F as SELECT};
1
+ import{defineComponent as e,computed as o,inject as t,ref as a,createVNode as l}from"vue";import{useDebounceFn as r}from"@vueuse/core";import{cloneDeep as s,isArray as n,isString as i}from"lodash-es";import{useCommonInjection as u,useSelectOptionProps as p}from"../../hooks/useCommonInjection.js";import{InjectionChangeContextCollector as m}from"../../constants/index.js";import"../../../../../shared/utils/index.js";import"../../../index.js";import"../../utils/index.js";import{useFormField as c}from"../../hooks/useFormField.js";import{NSelect as d}from"naive-ui";import"date-fns";import"../../../../../shared/utils/tapable/SyncHook.js";import"../../../../../shared/utils/tapable/SyncBailHook.js";import"../../../../../shared/utils/tapable/SyncWaterfallHook.js";import"../../../../../shared/utils/tapable/SyncLoopHook.js";import"../../../../../shared/utils/tapable/AsyncParallelHook.js";import"../../../../../shared/utils/tapable/AsyncParallelBailHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesBailHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesLoopHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesWaterfallHook.js";import"../../hooks/useFormValidator.js";import"@formily/core";import{connect as y,mapProps as v}from"@formily/vue";import"@vue/shared";import"./index.js";import{useUrlConfigOptions as f,useAutographOptions as h,useRecommendOptions as j,searchContentMatcher as b}from"../../hooks/useFormRenderOptions.js";import{assignUpdateValue as k,assignClearBindVisited as S,createVisitedSetter as g}from"../../utils/schema.js";const F=y(e({name:"FormSelect",props:{value:{type:[String,Array,Number]},lazyRequest:{type:Boolean,default:!0},requestCache:{type:Boolean,default:!0},options:{type:Array,default:()=>[]},onChange:{},labelField:{type:String,default:"text"},valueField:{type:String,default:"value"},allowCreate:Boolean,urlConfig:{type:Object},autograph:{type:String},wordbook:{type:Object},recommend:{type:Boolean,default:!1},commonList:{type:Array},recentList:{type:Array},getRecommendInfo:{type:Function},commonNum:{type:Number,default:10},recentNum:{type:Number,default:10},recommendCache:{type:Boolean,default:!1}},emits:["update:value","postRecommend"],setup(e,{slots:y,emit:v}){const k=o({get:()=>e.value,async set(e){v("update:value",e),C(e)}}),{labelKey:S,valueKey:F,fetchData:A,fullOptions:H,filterOptions:x}=e.urlConfig?f(e,k):h(e,k),{getRecommend:B,postRecommend:C,sortedOptions:O}=j(e,x,v,S,F),{field:R,fieldKey:L}=c();t(m).setContext(L.value,(e=>{return{currentOption:s((o=e,n(o)?function(e){const o=H.value.reduce(((e,o)=>(e[o[F.value]]=o,e)),{});return e.map((e=>o[e]))}(o):(t=o,H.value.find((e=>e[F.value]===t)))))};var o,t}));const N=a(""),V=r((async(e="")=>{N.value=e,A(e),B(e)}),300),{injectValueValidate:w,injectValueWatchFromEmpty:K,injectValueBindKey:P}=u();K(k,V),w(k);const W=P(k),{menuProps:q,nodeProps:I}=p();function U(e){const o=e[S.value];if(!o||!i(o))return"";const t=b(N.value,o);return t?l("section",null,[t.map(((e,o)=>0!==o&&e?l("span",{style:{color:o%2==0?"var(--n-option-text-color-active)":""}},[e]):null))]):o}const z=o((()=>O.value.length||!e.allowCreate?O.value:N.value?[{[S.value]:N.value,[F.value]:N.value},...O.value]:O.value));return()=>l(d,{key:W.value,remote:!0,filterable:!0,value:k.value,"onUpdate:value":e=>k.value=e,"menu-props":q,"node-props":I,labelField:S.value,valueField:F.value,options:z.value,onSearch:V,"onUpdate:show":e=>e&&V(),onFocus:g(R),renderLabel:U},y)}}),v({dataSource:"options"},k,S));export{F as SELECT};
@@ -1 +1 @@
1
- import{defineComponent as e,computed as o,openBlock as r,createBlock as i,unref as s,withCtx as t,createVNode as l,createElementVNode as n,createElementBlock as p,Fragment as a,renderList as m,toDisplayString as u}from"vue";import{HelpCircleOutline as g}from"@vicons/ionicons5";import{isString as f}from"lodash-es";import{NTooltip as v}from"naive-ui";import c from"../../../../_virtual/plugin-vue_export-helper.js";const _={style:{display:"inline-flex","flex-direction":"column"}};var d=c(e({__name:"tooltipMessage",props:{message:String},setup(e){const c=e,d=o((()=>f(c.message)?c.message.split("<br>"):[]));return(e,o)=>(r(),i(s(v),{trigger:"hover"},{trigger:t((()=>[l(s(g))])),default:t((()=>[n("section",_,[(r(!0),p(a,null,m(s(d),(e=>(r(),p("span",{key:e},u(e),1)))),128))])])),_:1}))}}),[["__file","tooltipMessage.vue"]]);export{d as default};
1
+ import e from"./tooltipMessage.vue2.js";import o from"../../../../_virtual/_plugin-vue_export-helper.js";var t=o(e,[["__file","tooltipMessage.vue"]]);export{t as default};
@@ -0,0 +1 @@
1
+ import{defineComponent as e,computed as o,openBlock as s,createBlock as r,unref as i,withCtx as t,createVNode as n,createElementVNode as a,createElementBlock as l,Fragment as m,renderList as p,toDisplayString as g}from"vue";import{HelpCircleOutline as f}from"@vicons/ionicons5";import{isString as u}from"lodash-es";import{NTooltip as c}from"naive-ui";const d={style:{display:"inline-flex","flex-direction":"column"}};var v=e({__name:"tooltipMessage",props:{message:String},setup(e){const v=e,x=o((()=>u(v.message)?v.message.split("<br>"):[]));return(e,o)=>(s(),r(i(c),{trigger:"hover"},{trigger:t((()=>[n(i(f))])),default:t((()=>[a("section",d,[(s(!0),l(m,null,p(i(x),(e=>(s(),l("span",{key:e},g(e),1)))),128))])])),_:1}))}});export{v as default};
@@ -2,6 +2,7 @@ import { Nullable } from '../../../../../es/shared/types';
2
2
  import { GeneralField } from '@formily/core';
3
3
  import { AnnotationItem } from '../../../../../es/components/annotation-edit/src/type';
4
4
  import { ContextCollector } from '../../../../../es/components/form-render/src/hooks/useChangeContext';
5
+ import { useFormRenderLifeCycle } from '../../../../../es/components/form-render/src/hooks/useFormRenderLifeCycle';
5
6
  import { BusinessCollector, FormItemDepsCollector } from '../hooks';
6
7
  import { FormAsyncQueue } from '../types';
7
8
  import { Component, InjectionKey, WritableComputedRef } from 'vue';
@@ -10,6 +11,7 @@ export declare const InjectionSchemaField: InjectionKey<Component>;
10
11
  export declare const InjectionBusinessCollector: InjectionKey<BusinessCollector>;
11
12
  export declare const InjectionChangeContextCollector: InjectionKey<ContextCollector>;
12
13
  export declare const InjectionFormItemDepsCollector: InjectionKey<FormItemDepsCollector>;
14
+ export declare const InjectionFormLifeCycleCaller: InjectionKey<ReturnType<typeof useFormRenderLifeCycle>['callLifeCycle']>;
13
15
  export declare const InjectionFormUUID: InjectionKey<string>;
14
16
  export declare const InjectionFormGraph: InjectionKey<Record<string, GeneralField>>;
15
17
  export declare const InjectionAnnotation: InjectionKey<WritableComputedRef<Nullable<Record<string, AnnotationItem>>>>;
@@ -1 +1 @@
1
- const e=Symbol("InjectionAsyncQueue"),o=Symbol("InjectionSchemaField"),n=Symbol("InjectionBusinessCollector"),t=Symbol("InjectionChangeContextCollector"),E=Symbol("InjectionFormItemDepsCollector"),A=Symbol("InjectionFormUUID"),I=Symbol("InjectionFormGraph"),l=Symbol("InjectionAnnotation"),a="__dep_LINEBAR_";var i=(e=>(e.PASSWORD="password",e.ID_CARD="id_card",e.AGE="age",e.AGE_UNIT="age_unit",e.MOBILE="mobile",e.TELEPHONE="telephone",e.EMAIL="email",e.SEX="sex",e.BIRTHDAY="birthday",e.BANK_CARD="bank_card",e.WEBSITE="website",e.GESTATIONAL_WEEKS="gestational_weeks",e.GESTATIONAL_STAGE="gestational_stage",e.CUSTOMER_NAME="customer_name",e))(i||{}),c=(e=>(e.MALE="1",e.FEMALE="2",e))(c||{}),S=(e=>(e.DAY="D",e.MONTH="M",e.YEAR="Y",e.HOUR="H",e.WEEK="W",e.MINUTE="N",e))(S||{});const m=["COMPLEX","COMBINATION"];export{S as FIELD_AGE_UNIT,i as FIELD_BUSINESS_TYPE,c as FIELD_SEX_VALUE,a as FormItemLineBarDepKeyPrepend,l as InjectionAnnotation,e as InjectionAsyncQueue,n as InjectionBusinessCollector,t as InjectionChangeContextCollector,I as InjectionFormGraph,E as InjectionFormItemDepsCollector,A as InjectionFormUUID,o as InjectionSchemaField,m as NESTED_FORM_ITEM_TYPE};
1
+ const e=Symbol("InjectionAsyncQueue"),o=Symbol("InjectionSchemaField"),n=Symbol("InjectionBusinessCollector"),t=Symbol("InjectionChangeContextCollector"),E=Symbol("InjectionFormItemDepsCollector"),l=Symbol("InjectionFormLifeCycleCaller"),I=Symbol("InjectionFormUUID"),A=Symbol("InjectionFormGraph"),i=Symbol("InjectionAnnotation"),a="__dep_LINEBAR_";var c=(e=>(e.PASSWORD="password",e.ID_CARD="id_card",e.AGE="age",e.AGE_UNIT="age_unit",e.MOBILE="mobile",e.TELEPHONE="telephone",e.EMAIL="email",e.SEX="sex",e.BIRTHDAY="birthday",e.BANK_CARD="bank_card",e.WEBSITE="website",e.GESTATIONAL_WEEKS="gestational_weeks",e.GESTATIONAL_STAGE="gestational_stage",e.CUSTOMER_NAME="customer_name",e))(c||{}),m=(e=>(e.MALE="1",e.FEMALE="2",e))(m||{}),S=(e=>(e.DAY="D",e.MONTH="M",e.YEAR="Y",e.HOUR="H",e.WEEK="W",e.MINUTE="N",e))(S||{});const r=["COMPLEX","COMBINATION"];export{S as FIELD_AGE_UNIT,c as FIELD_BUSINESS_TYPE,m as FIELD_SEX_VALUE,a as FormItemLineBarDepKeyPrepend,i as InjectionAnnotation,e as InjectionAsyncQueue,n as InjectionBusinessCollector,t as InjectionChangeContextCollector,A as InjectionFormGraph,E as InjectionFormItemDepsCollector,l as InjectionFormLifeCycleCaller,I as InjectionFormUUID,o as InjectionSchemaField,r as NESTED_FORM_ITEM_TYPE};
@@ -1 +1 @@
1
- import{reactive as e,defineComponent as t,inject as r,provide as n,computed as l,watch as o,onUnmounted as a,onMounted as i,withModifiers as s,createVNode as c,mergeProps as u}from"vue";import{checkInSetupEnv as d}from"../../../../shared/utils/index.js";import{useField as p,useForm as m,RecursionField as f}from"@formily/vue";import{noop as v,isArray as h,isNumber as y}from"lodash-es";import"../../index.js";import{InjectionFormUUID as g,InjectionBusinessCollector as b}from"../constants/index.js";import{useFieldListAdaptor as F}from"./useFieldListAdaptor.js";import{createObjSchema as x}from"../utils/schema.js";const S=e(new Map);function j(e,t,r=0){S.set(e,S.get(e)||{});S.get(e)[t+""]=r}function O(e,t,r=!0){const n=S.get(e);return n?Object.entries(n).reduce(((e,[n,l])=>r&&n===`${t}`||n.startsWith(`${t}.`)?e+l:e),0):0}function $(e,t){const r=S.get(e);r&&Reflect.deleteProperty(r,t+"")}function k(e){S.delete(e)}const E=t({props:{fieldItems:{type:Array,default:()=>[]},childFieldStrategy:{type:String,default:"checked"},name:{type:String,required:!0}},setup(e){const t=r(g),d=r(b),h=p(),y=r(t+"_virtualParent",""),S=`${y?y+".":""}${h.value.address}`;function k(e){return`${S}.${e}`}n(t+"_virtualParent",S);const{schemaAdaptor:E}=F(d);function K(t){var r,n;return Object.assign(t,{"x-decorator-props":{...t["x-decorator-props"],labelPlacement:"left",showFeedback:!1,showLabel:!!t.title},"x-component-props":{...t["x-component-props"],childFieldStrategy:null!=(n=null==(r=t["x-component-props"])?void 0:r.childFieldStrategy)?n:e.childFieldStrategy,size:"small"}})}const P=l((()=>{const t=E(e.fieldItems);return Object.values(t).forEach(K),x(t)}));o(P,(()=>{return e=P.value,void Object.values(e.properties||{}).forEach((e=>{var r;j(t,k(e.name),null==(r=null==e?void 0:e["x-decorator-props"])?void 0:r.span)}));var e}),{immediate:!0});const _=m();function w(){return e.fieldItems.map((e=>_.value.query(e.val_key).take()))}a((()=>{var e;w().forEach((e=>{e&&(e.display="none")})),e=P.value,Object.values(e.properties||{}).forEach((e=>{$(t,k(e.name))}))})),i((()=>{w().forEach((e=>{e&&(e.display="visible")}))}));const I=s(v,["stop"]),A=["onClick","onKeydown","onKeyup","onKeypress"].reduce(((e,t)=>(e[t]=I,e)),{});return()=>{return c("section",u({class:"form-render__labelField",style:{"--column":(e=P.value,Object.values(e.properties||{}).reduce(((e,r)=>e+O(t,k(r.name))),0))}},A),[c(f,{basePath:".",schema:P.value},null)]);var e}}});function K(e,t){d();const r=l((()=>e.options.some((e=>h(e.childrenFields)&&e.childrenFields.length))));function n(e,t,r="value"){if(h(e)?e.includes(t[r]):e===t[r])return h(t.childrenFields)&&t.childrenFields.length}return{renderComplexOption:function({value:e,option:t,valueKey:l="value",labelKey:o="label",childFieldStrategy:a}){return[t[o],r.value&&("all"===a||n(e,t,l))?c(E,{fieldItems:t.childrenFields,name:t[l],childFieldStrategy:a},null):null]},valueRef:l({get(){return t=e.value,y(t)?t+"":t;var t},set(e){t("update:value",e)}}),hasComplexOption:r}}function P(){return{getSpan:O,setSpan:j,deleteSpan:$,clearSpan:k}}export{K as useComplexOptions,P as useComplexOptionsSpan};
1
+ import{reactive as e,computed as t,createVNode as r,defineComponent as n,inject as l,provide as o,watch as a,onUnmounted as i,onMounted as s,withModifiers as c,mergeProps as u}from"vue";import{checkInSetupEnv as d}from"../../../../shared/utils/index.js";import{useField as p,useForm as m,RecursionField as f}from"@formily/vue";import{isArray as v,isNumber as h,noop as y}from"lodash-es";import"../../index.js";import{InjectionFormUUID as g,InjectionBusinessCollector as b}from"../constants/index.js";import{useFieldListAdaptor as F}from"./useFieldListAdaptor.js";import{createObjSchema as x}from"../utils/schema.js";const S=e(new Map);function j(e,t,r=0){S.set(e,S.get(e)||{});S.get(e)[t+""]=r}function O(e,t,r=!0){const n=S.get(e);return n?Object.entries(n).reduce(((e,[n,l])=>r&&n===`${t}`||n.startsWith(`${t}.`)?e+l:e),0):0}function $(e,t){const r=S.get(e);r&&Reflect.deleteProperty(r,t+"")}function k(e){S.delete(e)}const E=n({props:{fieldItems:{type:Array,default:()=>[]},childFieldStrategy:{type:String,default:"checked"},name:{type:String,required:!0}},setup(e){const n=l(g),d=l(b),v=p(),h=l(n+"_virtualParent",""),S=`${h?h+".":""}${v.value.address}`;function k(e){return`${S}.${e}`}o(n+"_virtualParent",S);const{schemaAdaptor:E}=F(d);function K(t){var r,n;return Object.assign(t,{"x-decorator-props":{...t["x-decorator-props"],labelPlacement:"left",showFeedback:!1,showLabel:!!t.title},"x-component-props":{...t["x-component-props"],childFieldStrategy:null!=(n=null==(r=t["x-component-props"])?void 0:r.childFieldStrategy)?n:e.childFieldStrategy,size:"small"}})}const P=t((()=>{const t=E(e.fieldItems);return Object.values(t).forEach(K),x(t)}));a(P,(()=>{return e=P.value,void Object.values(e.properties||{}).forEach((e=>{var t;j(n,k(e.name),null==(t=null==e?void 0:e["x-decorator-props"])?void 0:t.span)}));var e}),{immediate:!0});const _=m();function w(){return e.fieldItems.map((e=>_.value.query(e.val_key).take()))}i((()=>{var e;w().forEach((e=>{e&&(e.display="none")})),e=P.value,Object.values(e.properties||{}).forEach((e=>{$(n,k(e.name))}))})),s((()=>{w().forEach((e=>{e&&(e.display="visible")}))}));const I=c(y,["stop"]),A=["onClick","onKeydown","onKeyup","onKeypress"].reduce(((e,t)=>(e[t]=I,e)),{});return()=>{return r("section",u({class:"form-render__labelField",style:{"--column":(e=P.value,Object.values(e.properties||{}).reduce(((e,t)=>e+O(n,k(t.name))),0))}},A),[r(f,{basePath:".",schema:P.value},null)]);var e}}});function K(e,n){d();const l=t((()=>e.options.some((e=>v(e.childrenFields)&&e.childrenFields.length))));function o(e,t,r="value"){if(v(e)?e.includes(t[r]):e===t[r])return v(t.childrenFields)&&t.childrenFields.length}return{renderComplexOption:function({value:e,option:t,valueKey:n="value",labelKey:a="label",childFieldStrategy:i}){return[t[a],l.value&&("all"===i||o(e,t,n))?r(E,{fieldItems:t.childrenFields,name:t[n],childFieldStrategy:i},null):null]},valueRef:t({get(){return t=e.value,h(t)?t+"":t;var t},set(e){n("update:value",e)}}),hasComplexOption:l}}function P(){return{getSpan:O,setSpan:j,deleteSpan:$,clearSpan:k}}export{K as useComplexOptions,P as useComplexOptionsSpan};