cnhis-design-vue 3.1.54-release.4 → 3.1.55-alpha.0

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 (432) hide show
  1. package/es/components/annotation-edit/index.d.ts +1 -1
  2. package/es/components/annotation-edit/src/AnnotationEdit.d.ts +1 -1
  3. package/es/components/audio-sdk/index.d.ts +2 -0
  4. package/es/components/audio-sdk/index.js +1 -0
  5. package/es/components/audio-sdk/src/audioSDK.d.ts +28 -0
  6. package/es/components/audio-sdk/src/audioSDK.js +1 -0
  7. package/es/components/audio-sdk/src/components/recordingDialog.vue.d.ts +27 -0
  8. package/es/components/audio-sdk/src/components/recordingDialog.vue.js +1 -0
  9. package/es/components/audio-sdk/src/components/recordingDialog.vue2.js +1 -0
  10. package/es/components/audio-sdk/src/utils/recordingDialog.d.ts +8 -0
  11. package/es/components/audio-sdk/src/utils/recordingDialog.js +1 -0
  12. package/es/components/audio-sdk/style/index.css +1 -0
  13. package/es/components/base-search/index.d.ts +1 -1
  14. package/es/components/base-search/src/index.vue.d.ts +4 -4
  15. package/es/components/base-search/src/index.vue2.js +1 -1
  16. package/es/components/big-table/index.d.ts +22 -22
  17. package/es/components/big-table/src/BigTable.vue.d.ts +2 -2
  18. package/es/components/big-table/src/bigTableProps.d.ts +1 -1
  19. package/es/components/big-table/src/components/edit-form/edit-separate.vue.d.ts +5 -5
  20. package/es/components/big-table/src/components/edit-form/useCommon.d.ts +1 -1
  21. package/es/components/big-table/src/components/separate.vue.d.ts +1 -1
  22. package/es/components/big-table/src/constants/index.d.ts +1 -1
  23. package/es/components/big-table/src/hooks/useAnnotation.d.ts +1 -1
  24. package/es/components/big-table/src/hooks/useFormat.d.ts +1 -1
  25. package/es/components/big-table/src/hooks/useSeparateRow.d.ts +1 -1
  26. package/es/components/big-table/src/utils.d.ts +1 -1
  27. package/es/components/{multi-chat → biunique-chat}/index.d.ts +16 -16
  28. package/es/components/biunique-chat/index.js +1 -0
  29. package/es/components/{multi-chat/src/MultiChat.vue.d.ts → biunique-chat/src/BiuniqueChat.vue.d.ts} +1 -1
  30. package/es/components/biunique-chat/src/BiuniqueChat.vue.js +1 -0
  31. package/es/components/biunique-chat/src/BiuniqueChat.vue2.js +1 -0
  32. package/es/components/{multi-chat → biunique-chat}/src/api/index.d.ts +1 -1
  33. package/es/components/{multi-chat → biunique-chat}/src/components/ChatFooter.vue.d.ts +1 -1
  34. package/es/components/{multi-chat → biunique-chat}/src/components/ChatHeader.vue.d.ts +1 -1
  35. package/es/components/{multi-chat → biunique-chat}/src/components/ChatMain.vue.d.ts +1 -1
  36. package/es/components/{multi-chat → biunique-chat}/src/components/SiderList.vue.d.ts +1 -1
  37. package/es/components/{multi-chat → biunique-chat}/src/utils/chatSock.d.ts +1 -1
  38. package/es/components/body-select/index.d.ts +5 -5
  39. package/es/components/body-select/src/hooks/renderCanvas.d.ts +2 -2
  40. package/es/components/body-select/src/hooks/renderCanvas.js +1 -1
  41. package/es/components/body-select/src/index.vue.d.ts +1 -1
  42. package/es/components/body-select/src/index.vue2.js +1 -1
  43. package/es/components/bpmn-workflow/index.d.ts +1 -1
  44. package/es/components/button-print/index.d.ts +34 -21
  45. package/es/components/button-print/src/ButtonPrint.vue.d.ts +14 -1
  46. package/es/components/button-print/src/ButtonPrint.vue2.js +1 -1
  47. package/es/components/button-print/src/api.d.ts +1 -1
  48. package/es/components/button-print/src/components/EditFormat.vue.d.ts +1 -1
  49. package/es/components/button-print/src/utils/dialog.d.ts +1 -1
  50. package/es/components/button-print/src/utils/print.d.ts +2 -2
  51. package/es/components/callback/index.d.ts +1 -1
  52. package/es/components/callback/src/components/dialog/drawer.vue.d.ts +1 -1
  53. package/es/components/callback/src/components/dialog/modal.vue.d.ts +1 -1
  54. package/es/components/callback/src/components/render/popupMaps.d.ts +72 -52
  55. package/es/components/card-reader-sdk/src/cardReaderSDK.d.ts +1 -1
  56. package/es/components/card-reader-sdk/src/components/readCardDialog.vue.d.ts +1 -1
  57. package/es/components/card-reader-sdk/src/constants/index.d.ts +1 -1
  58. package/es/components/card-reader-sdk/src/insuranceSDK.d.ts +1 -1
  59. package/es/components/card-reader-sdk/src/types/index.d.ts +2 -2
  60. package/es/components/card-reader-sdk/src/utils/readHealthCard.d.ts +1 -1
  61. package/es/components/classification/index.d.ts +505 -20
  62. package/es/components/classification/src/components/search-filter/index.vue.d.ts +473 -1
  63. package/es/components/classification/src/components/search-filter/index.vue2.js +1 -1
  64. package/es/components/classification/src/components/set-classification/index.vue.d.ts +480 -8
  65. package/es/components/classification/src/components/table-modal/index.vue.d.ts +1 -1
  66. package/es/components/classification/src/index.vue.d.ts +493 -8
  67. package/es/components/classification/src/index.vue2.js +1 -1
  68. package/es/components/classification/style/index.css +1 -1
  69. package/es/components/config-provider/index.d.ts +1 -1
  70. package/es/components/date-picker/index.d.ts +2 -2
  71. package/es/components/date-picker/src/DatePicker.vue.d.ts +1 -1
  72. package/es/components/editor/index.d.ts +1 -1
  73. package/es/components/expand-field/index.d.ts +29 -29
  74. package/es/components/expand-field/src/components/PersonModal.vue.d.ts +2 -2
  75. package/es/components/expand-field/src/components/form.vue.d.ts +2 -2
  76. package/es/components/expand-field/src/constants/index.d.ts +1 -1
  77. package/es/components/expand-field/src/index.vue.d.ts +2 -2
  78. package/es/components/fabric-chart/index.d.ts +7 -6
  79. package/es/components/fabric-chart/src/FabricChart.vue.d.ts +2 -1
  80. package/es/components/fabric-chart/src/FabricChart.vue2.js +1 -1
  81. package/es/components/fabric-chart/src/components/PopupTip.vue.d.ts +1 -1
  82. package/es/components/fabric-chart/src/constants/index.d.ts +4 -0
  83. package/es/components/fabric-chart/src/constants/index.js +1 -1
  84. package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.d.ts +3 -3
  85. package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +1 -1
  86. package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcessChart.d.ts +3 -3
  87. package/es/components/fabric-chart/src/hooks/electrocardiogram/hooks/useDetailEvent.d.ts +2 -2
  88. package/es/components/fabric-chart/src/hooks/electrocardiogram/hooks/useDetailEvent.js +1 -1
  89. package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogram.d.ts +2 -2
  90. package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogram.js +1 -1
  91. package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogramChart.d.ts +9 -3
  92. package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogramChart.js +1 -1
  93. package/es/components/fabric-chart/src/hooks/electrocardiogram/useMeasureInstrument.d.ts +2 -2
  94. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.d.ts +3 -3
  95. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.js +1 -1
  96. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useLeft.d.ts +3 -3
  97. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useOther.d.ts +3 -3
  98. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.d.ts +3 -3
  99. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useTop.d.ts +3 -3
  100. package/es/components/fabric-chart/src/hooks/temperature/useBottom.d.ts +2 -2
  101. package/es/components/fabric-chart/src/hooks/temperature/useCenter.d.ts +4 -4
  102. package/es/components/fabric-chart/src/hooks/temperature/useLeft.d.ts +3 -3
  103. package/es/components/fabric-chart/src/hooks/temperature/useOther.d.ts +2 -2
  104. package/es/components/fabric-chart/src/hooks/temperature/useRight.d.ts +2 -2
  105. package/es/components/fabric-chart/src/hooks/temperature/useShadow.d.ts +1 -1
  106. package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.d.ts +3 -3
  107. package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +1 -1
  108. package/es/components/fabric-chart/src/hooks/temperature/useTop.d.ts +2 -2
  109. package/es/components/fabric-chart/src/hooks/useCommon.d.ts +2 -2
  110. package/es/components/fabric-chart/src/hooks/useCumputedPoint.d.ts +4 -4
  111. package/es/components/fabric-chart/src/hooks/useCumputedPoint.js +1 -1
  112. package/es/components/fabric-chart/src/hooks/useDraw.d.ts +2 -2
  113. package/es/components/fabric-chart/src/hooks/useEvent.d.ts +1 -1
  114. package/es/components/fabric-chart/src/hooks/useGrid.d.ts +2 -2
  115. package/es/components/fabric-chart/src/hooks/useScaleColumn.d.ts +2 -2
  116. package/es/components/fabric-chart/src/interface.d.ts +2 -2
  117. package/es/components/fabric-chart/src/utils/index.d.ts +1 -1
  118. package/es/components/field-set/index.d.ts +15 -15
  119. package/es/components/field-set/src/FieldSet.vue.d.ts +5 -5
  120. package/es/components/field-set/src/components/Row.vue.d.ts +2 -2
  121. package/es/components/field-set/src/types/index.d.ts +1 -1
  122. package/es/components/field-set/src/utils/index.d.ts +3 -3
  123. package/es/components/form-config/index.d.ts +349 -302
  124. package/es/components/form-config/src/FormConfig.vue.d.ts +473 -426
  125. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +38 -18
  126. package/es/components/form-config/src/components/FormConfigDragDisplay.vue.d.ts +1 -1
  127. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +219 -196
  128. package/es/components/form-config/src/components/FormConfigEventSetting.vue.d.ts +7 -7
  129. package/es/components/form-config/src/components/FormConfigMaterialItem.d.ts +1 -1
  130. package/es/components/form-config/src/components/renderer/CloseButton.vue.d.ts +1 -1
  131. package/es/components/form-config/src/components/renderer/ComplexNode.vue.d.ts +2 -2
  132. package/es/components/form-config/src/components/renderer/DefaultNode.vue.d.ts +2 -2
  133. package/es/components/form-config/src/constants/index.d.ts +2 -2
  134. package/es/components/form-config/src/hooks/useConfigurationField.d.ts +3 -3
  135. package/es/components/form-config/src/hooks/useDataNormalize.d.ts +1 -1
  136. package/es/components/form-config/src/hooks/useSortalbeConfig.d.ts +1 -1
  137. package/es/components/form-config/src/types/index.d.ts +2 -2
  138. package/es/components/form-config/src/utils/index.d.ts +3 -3
  139. package/es/components/form-render/index.d.ts +72 -52
  140. package/es/components/form-render/index.js +1 -1
  141. package/es/components/form-render/src/FormRender.vue.d.ts +36 -16
  142. package/es/components/form-render/src/FormRender.vue2.js +1 -1
  143. package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +95 -75
  144. package/es/components/form-render/src/components/renderer/combination/combination.d.ts +1 -1
  145. package/es/components/form-render/src/components/renderer/combination/hooks/useCombination.d.ts +1 -1
  146. package/es/components/form-render/src/components/renderer/combination/hooks/useDeepValidate.d.ts +1 -1
  147. package/es/components/form-render/src/components/renderer/combination/jsonCombination.d.ts +1 -1
  148. package/es/components/form-render/src/components/renderer/combination/tableCombination.d.ts +2 -2
  149. package/es/components/form-render/src/components/renderer/complex.js +1 -1
  150. package/es/components/form-render/src/components/renderer/date.js +1 -1
  151. package/es/components/form-render/src/components/renderer/formItem.d.ts +1 -1
  152. package/es/components/form-render/src/components/renderer/formItem.js +1 -1
  153. package/es/components/form-render/src/components/renderer/inputNumber.d.ts +1 -1
  154. package/es/components/form-render/src/components/renderer/levelSearchCascader/index.d.ts +1 -1
  155. package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue.d.ts +2 -2
  156. package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue2.js +1 -1
  157. package/es/components/form-render/src/components/renderer/lineBar/index.d.ts +1 -1
  158. package/es/components/form-render/src/components/renderer/radio&checkbox.d.ts +2 -2
  159. package/es/components/form-render/src/components/renderer/remoteSearch.d.ts +2 -2
  160. package/es/components/form-render/src/components/renderer/remoteSearch.js +1 -1
  161. package/es/components/form-render/src/components/renderer/searchCascade.d.ts +2 -2
  162. package/es/components/form-render/src/components/renderer/searchCascade.js +1 -1
  163. package/es/components/form-render/src/components/renderer/select.d.ts +3 -3
  164. package/es/components/form-render/src/components/renderer/select.js +1 -1
  165. package/es/components/form-render/src/components/renderer/simpleComponent.d.ts +1 -1
  166. package/es/components/form-render/src/components/renderer/switch.js +1 -1
  167. package/es/components/form-render/src/components/renderer/textarea.js +1 -1
  168. package/es/components/form-render/src/constants/index.d.ts +5 -6
  169. package/es/components/form-render/src/constants/index.js +1 -1
  170. package/es/components/form-render/src/hooks/index.d.ts +20 -9
  171. package/es/components/form-render/src/hooks/index.js +1 -1
  172. package/es/components/form-render/src/hooks/useAnchor.d.ts +2 -2
  173. package/es/components/form-render/src/hooks/useAnchor.js +1 -1
  174. package/es/components/form-render/src/hooks/useBusinessBinding.d.ts +2 -2
  175. package/es/components/form-render/src/hooks/useBusinessBinding.js +1 -1
  176. package/es/components/form-render/src/hooks/useCommonInjection.d.ts +1 -1
  177. package/es/components/form-render/src/hooks/useComplexOptions.d.ts +2 -2
  178. package/es/components/form-render/src/hooks/useFieldListAdaptor.d.ts +1 -1
  179. package/es/components/form-render/src/hooks/useFieldNormalize.d.ts +19 -19
  180. package/es/components/form-render/src/hooks/useFieldVisitor.js +1 -1
  181. package/es/components/form-render/src/hooks/useFormContext.d.ts +6 -6
  182. package/es/components/form-render/src/hooks/useFormEvent.d.ts +15 -4
  183. package/es/components/form-render/src/hooks/useFormEvent.js +1 -1
  184. package/es/components/form-render/src/hooks/useFormItemDeps.d.ts +6 -6
  185. package/es/components/form-render/src/hooks/useFormItemDeps.js +1 -1
  186. package/es/components/form-render/src/hooks/useFormRenderLifeCycle.d.ts +8 -8
  187. package/es/components/form-render/src/hooks/useFormRenderOptions.d.ts +17 -12
  188. package/es/components/form-render/src/hooks/useFormRenderOptions.js +1 -1
  189. package/es/components/form-render/src/hooks/useFormValidator.d.ts +1 -1
  190. package/es/components/form-render/src/hooks/useFormValidator.js +1 -1
  191. package/es/components/form-render/src/hooks/useLowCodeReactions.d.ts +1 -1
  192. package/es/components/form-render/src/hooks/useOperationalForm.d.ts +4 -3
  193. package/es/components/form-render/src/hooks/useOperationalForm.js +1 -1
  194. package/es/components/form-render/src/hooks/usePresetScope.js +1 -1
  195. package/es/components/form-render/src/hooks/useWordbookSetting.d.ts +14 -5
  196. package/es/components/form-render/src/hooks/useWordbookSetting.js +1 -1
  197. package/es/components/form-render/src/types/fieldItem.d.ts +4 -3
  198. package/es/components/form-render/src/types/index.d.ts +13 -8
  199. package/es/components/form-render/src/utils/business.d.ts +2 -2
  200. package/es/components/form-render/src/utils/dom.d.ts +1 -1
  201. package/es/components/form-render/src/utils/index.d.ts +4 -17
  202. package/es/components/form-render/src/utils/index.js +1 -1
  203. package/es/components/form-render/src/utils/schema.d.ts +2 -2
  204. package/es/components/grid/index.d.ts +1 -1
  205. package/es/components/guide/src/renderer.d.ts +1 -1
  206. package/es/components/guide/src/types/index.d.ts +1 -1
  207. package/es/components/guide/src/useGuide.d.ts +1 -1
  208. package/es/components/guide/src/utils/index.d.ts +1 -1
  209. package/es/components/iho-table/index.d.ts +39 -39
  210. package/es/components/iho-table/src/IhoTable.vue.d.ts +27 -27
  211. package/es/components/iho-table/src/constants/index.d.ts +5 -5
  212. package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +9 -9
  213. package/es/components/iho-table/src/hooks/tapHooks/useConfigHooks.d.ts +21 -21
  214. package/es/components/iho-table/src/hooks/tapHooks/useDataHooks.d.ts +10 -10
  215. package/es/components/iho-table/src/hooks/tapHooks/useDomInsertHooks.d.ts +4 -4
  216. package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.d.ts +65 -65
  217. package/es/components/iho-table/src/hooks/tapHooks/useExposeHooks.d.ts +4 -4
  218. package/es/components/iho-table/src/hooks/tapHooks/useFieldHooks.d.ts +7 -7
  219. package/es/components/iho-table/src/hooks/tapHooks/useSetupHooks.d.ts +3 -3
  220. package/es/components/iho-table/src/hooks/useColumnConfigAdaptor.d.ts +1 -1
  221. package/es/components/iho-table/src/hooks/useTablePlugin.d.ts +2 -2
  222. package/es/components/iho-table/src/plugins/anchorPlugin/index.d.ts +1 -1
  223. package/es/components/iho-table/src/plugins/anchorPlugin/useAnchor.d.ts +1 -1
  224. package/es/components/iho-table/src/plugins/bindEventSettingPlugin/index.d.ts +1 -1
  225. package/es/components/iho-table/src/plugins/bindEventSettingPlugin/index.js +1 -1
  226. package/es/components/iho-table/src/plugins/colorAndIconPlugin.d.ts +1 -0
  227. package/es/components/iho-table/src/plugins/colorAndIconPlugin.js +1 -0
  228. package/es/components/iho-table/src/plugins/copyPastePlugin.d.ts +1 -1
  229. package/es/components/iho-table/src/plugins/defaultConfigPlugin/index.d.ts +1 -1
  230. package/es/components/iho-table/src/plugins/defaultValuePlugin.d.ts +1 -1
  231. package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/filter.vue.d.ts +2 -2
  232. package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/index.d.ts +1 -1
  233. package/es/components/iho-table/src/plugins/filterRenderPlugin/index.d.ts +1 -1
  234. package/es/components/iho-table/src/plugins/filterVisibleEventPlugin.d.ts +1 -1
  235. package/es/components/iho-table/src/plugins/forceArrowKeyPlugin.d.ts +1 -1
  236. package/es/components/iho-table/src/plugins/headerPlugin.d.ts +1 -1
  237. package/es/components/iho-table/src/plugins/highLightSetPlugin.d.ts +1 -1
  238. package/es/components/iho-table/src/plugins/index.d.ts +1 -1
  239. package/es/components/iho-table/src/plugins/index.js +1 -1
  240. package/es/components/iho-table/src/plugins/keyboardEventPlugin/index.d.ts +1 -1
  241. package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index.d.ts +1 -1
  242. package/es/components/iho-table/src/plugins/maxCheckSizePlugin.d.ts +1 -1
  243. package/es/components/iho-table/src/plugins/operationalFormPlugin/index.d.ts +1 -1
  244. package/es/components/iho-table/src/plugins/operationalFormPlugin/index.js +1 -1
  245. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +2 -2
  246. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/index.d.ts +1 -1
  247. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useAutoFocus.d.ts +1 -1
  248. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useSelectOption.d.ts +1 -1
  249. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/inputRendererPlugin.d.ts +1 -1
  250. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/index.d.ts +1 -1
  251. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/index.js +1 -1
  252. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/levelSearchCascade.vue.d.ts +7 -7
  253. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.d.ts +1 -1
  254. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.js +1 -1
  255. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/radioRendererPlugin.d.ts +1 -1
  256. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.d.ts +8 -2
  257. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -1
  258. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.d.ts +1 -1
  259. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +1 -1
  260. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.d.ts +2 -2
  261. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/editSeparate.vue.d.ts +1 -1
  262. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.d.ts +1 -1
  263. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +1 -1
  264. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/separateUtils.d.ts +2 -2
  265. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.d.ts +9 -5
  266. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue2.js +1 -1
  267. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/index.d.ts +1 -1
  268. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/checkRendererPlugin.d.ts +1 -1
  269. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/colorRendererPlugin.d.ts +1 -1
  270. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/defaultRendererPlugin.d.ts +1 -1
  271. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/defaultRendererPlugin.js +1 -1
  272. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/htmlRendererPlugin.d.ts +1 -1
  273. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/htmlRendererPlugin.js +1 -1
  274. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/labelRendererPlugin.d.ts +1 -1
  275. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/labelRendererPlugin.js +1 -1
  276. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/pictureRendererPlugin.d.ts +1 -1
  277. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/seqRendererPlugin.d.ts +1 -1
  278. package/es/components/iho-table/src/plugins/rowClickPlugin/index.d.ts +1 -1
  279. package/es/components/iho-table/src/plugins/rowDragPlugin/index.d.ts +1 -1
  280. package/es/components/iho-table/src/plugins/rowGroupSettingPlugin/index.d.ts +1 -1
  281. package/es/components/iho-table/src/plugins/rowGroupSettingPlugin/rowGroupUtils.d.ts +2 -2
  282. package/es/components/iho-table/src/plugins/varialbleHeightPlugin/index.d.ts +1 -1
  283. package/es/components/iho-table/src/plugins/virtualTreePlugin/index.d.ts +1 -1
  284. package/es/components/iho-table/src/plugins/wordbookSettingPlugin.d.ts +1 -1
  285. package/es/components/iho-table/src/types/index.d.ts +5 -3
  286. package/es/components/iho-table/src/types/pluginType.d.ts +2 -2
  287. package/es/components/iho-table/src/utils/index.d.ts +4 -4
  288. package/es/components/iho-table/src/utils/index.js +1 -1
  289. package/es/components/iho-table/src/utils/separateMap.d.ts +2 -2
  290. package/es/components/iho-table/style/index.css +1 -1
  291. package/es/components/index.css +1 -1
  292. package/es/components/index.d.ts +6 -5
  293. package/es/components/index.js +1 -1
  294. package/es/components/info-header/index.d.ts +199 -159
  295. package/es/components/info-header/src/InfoHeader.vue.d.ts +213 -173
  296. package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +6 -6
  297. package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +9 -9
  298. package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +118 -98
  299. package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +39 -19
  300. package/es/components/info-header/src/constants/index.d.ts +1 -1
  301. package/es/components/info-header/src/types/index.d.ts +1 -1
  302. package/es/components/keyboard/index.d.ts +1 -1
  303. package/es/components/map/index.d.ts +1 -1
  304. package/es/components/map/src/Map.vue.d.ts +1 -1
  305. package/es/components/picture-clipper/index.d.ts +1 -1
  306. package/es/components/picture-clipper/src/PictureClipper.vue.d.ts +1 -1
  307. package/es/components/quick-search/index.d.ts +1 -1
  308. package/es/components/quick-search/src/index.vue.d.ts +4 -4
  309. package/es/components/quick-search/style/index.css +1 -1
  310. package/es/components/recommend-search/index.d.ts +25 -25
  311. package/es/components/recommend-search/src/RecommendSearch.vue.d.ts +7 -7
  312. package/es/components/recommend-search/src/components/RecommendInput.vue.d.ts +3 -3
  313. package/es/components/recommend-search/src/components/RecommendSelect.vue.d.ts +2 -2
  314. package/es/components/scale-view/index.d.ts +1 -1
  315. package/es/components/scale-view/src/hooks/use-component.d.ts +33 -33
  316. package/es/components/scale-view/src/types/index.d.ts +1 -1
  317. package/es/components/search-cascader/index.d.ts +34 -34
  318. package/es/components/search-cascader/src/SearchCascader.vue.d.ts +1 -1
  319. package/es/components/search-cascader/src/components/SearchMenu.d.ts +1 -1
  320. package/es/components/search-cascader/src/constants/index.d.ts +1 -1
  321. package/es/components/search-cascader/src/utils/index.d.ts +1 -1
  322. package/es/components/select-label/index.d.ts +1 -1
  323. package/es/components/select-label/src/LabelFormContent.vue.d.ts +1 -1
  324. package/es/components/select-label/src/SelectLabel.vue.d.ts +1 -1
  325. package/es/components/select-label/src/ihoLabel/IhoLabelFormContent.vue.d.ts +3 -3
  326. package/es/components/select-label/src/ihoLabel/IhoSelectLabel.vue.d.ts +3 -3
  327. package/es/components/select-label/src/ihoLabel/iho-label-classify.vue.d.ts +1 -1
  328. package/es/components/select-label/src/index.vue.d.ts +19 -19
  329. package/es/components/select-person/index.d.ts +22 -22
  330. package/es/components/select-person/src/SelectPerson.vue.d.ts +1 -1
  331. package/es/components/shortcut-provider/index.d.ts +1 -1
  332. package/es/components/shortcut-provider/src/ShortcutProvider.vue.d.ts +2 -2
  333. package/es/components/shortcut-provider/src/constants/index.d.ts +1 -1
  334. package/es/components/shortcut-provider/src/hooks/useShortcuts.d.ts +1 -1
  335. package/es/components/shortcut-provider/src/types/index.d.ts +1 -1
  336. package/es/components/shortcut-provider/src/utils/index.d.ts +1 -1
  337. package/es/components/shortcut-setter/index.d.ts +93 -72
  338. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +125 -104
  339. package/es/components/shortcut-setter/src/ShortcutSetterItem.vue.d.ts +2 -2
  340. package/es/components/shortcut-setter/src/types/index.d.ts +1 -1
  341. package/es/components/slider-tree/index.d.ts +1 -1
  342. package/es/components/steps-wheel/index.d.ts +1 -1
  343. package/es/components/table-export-field/index.d.ts +3 -3
  344. package/es/components/table-export-field/src/components/ExportModal.vue.d.ts +1 -1
  345. package/es/components/table-export-field/src/components/SaveProjectModal.vue.d.ts +1 -1
  346. package/es/components/table-export-field/src/constants/index.d.ts +1 -1
  347. package/es/components/table-export-field/src/index.vue.d.ts +1 -1
  348. package/es/components/table-filter/src/components/bi-filter/ValueCfg.vue.d.ts +320 -0
  349. package/es/components/table-filter/src/components/bi-filter/ValueCfg.vue.js +1 -0
  350. package/es/components/table-filter/src/components/bi-filter/ValueCfg.vue2.js +1 -0
  351. package/es/components/table-filter/src/components/bi-filter/components/Date.vue.d.ts +127 -0
  352. package/es/components/table-filter/src/components/bi-filter/components/Date.vue.js +1 -0
  353. package/es/components/table-filter/src/components/bi-filter/components/Date.vue2.js +1 -0
  354. package/es/components/table-filter/src/components/bi-filter/components/InputFilter.vue.d.ts +41 -0
  355. package/es/components/table-filter/src/components/bi-filter/components/InputFilter.vue.js +1 -0
  356. package/es/components/table-filter/src/components/bi-filter/components/InputFilter.vue2.js +1 -0
  357. package/es/components/table-filter/src/components/bi-filter/components/InputNumber.vue.d.ts +28 -0
  358. package/es/components/table-filter/src/components/bi-filter/components/InputNumber.vue.js +1 -0
  359. package/es/components/table-filter/src/components/bi-filter/components/InputNumber.vue2.js +1 -0
  360. package/es/components/table-filter/src/components/bi-filter/components/SelectFilter.vue.d.ts +51 -0
  361. package/es/components/table-filter/src/components/bi-filter/components/SelectFilter.vue.js +1 -0
  362. package/es/components/table-filter/src/components/bi-filter/components/SelectFilter.vue2.js +1 -0
  363. package/es/components/table-filter/src/components/bi-filter/components/index.d.ts +244 -0
  364. package/es/components/table-filter/src/components/bi-filter/components/index.js +1 -0
  365. package/es/components/table-filter/src/components/bi-filter/helpers/options.d.ts +14 -0
  366. package/es/components/table-filter/src/components/bi-filter/helpers/options.js +1 -0
  367. package/es/components/table-filter/src/components/bi-filter/hooks/useBiConditions.d.ts +13 -0
  368. package/es/components/table-filter/src/components/bi-filter/hooks/useBiConditions.js +1 -0
  369. package/es/components/table-filter/src/components/bi-filter/index.vue.d.ts +474 -0
  370. package/es/components/table-filter/src/components/bi-filter/index.vue.js +1 -0
  371. package/es/components/table-filter/src/components/bi-filter/index.vue2.js +1 -0
  372. package/es/components/table-filter/src/components/classify-filter/hooks/useDisplayCategory.d.ts +1 -1
  373. package/es/components/table-filter/src/components/classify-filter/hooks/useFilterConditions.d.ts +1 -1
  374. package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +2 -2
  375. package/es/components/table-filter/src/components/render-widget/components/CheckboxGroup.vue.d.ts +1 -1
  376. package/es/components/table-filter/src/components/render-widget/components/DateInner.vue.d.ts +2 -2
  377. package/es/components/table-filter/src/components/render-widget/components/DateOut.vue.d.ts +2 -2
  378. package/es/components/table-filter/src/components/render-widget/components/DateQuickBtn/index.vue.d.ts +1 -1
  379. package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue.d.ts +2 -2
  380. package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue.d.ts +2 -2
  381. package/es/components/table-filter/src/components/render-widget/components/InputCustom.vue.d.ts +1 -1
  382. package/es/components/table-filter/src/components/render-widget/components/LabelInner.vue.d.ts +2 -2
  383. package/es/components/table-filter/src/components/render-widget/components/LabelOut.vue.d.ts +1 -1
  384. package/es/components/table-filter/src/components/render-widget/components/SelectDynamicOption/index.vue.d.ts +1 -1
  385. package/es/components/table-filter/src/components/render-widget/helpers/setDefaultValue.d.ts +1 -1
  386. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +9 -9
  387. package/es/components/table-filter/src/constants/index.d.ts +2 -1
  388. package/es/components/table-filter/src/constants/index.js +1 -1
  389. package/es/components/table-filter/src/hooks/useAdvanced.d.ts +2 -2
  390. package/es/components/table-filter/src/hooks/useMixins.d.ts +1 -1
  391. package/es/components/table-filter/src/hooks/useRenderWidget.d.ts +1 -1
  392. package/es/components/table-filter/src/tool/transformData.d.ts +1 -1
  393. package/es/components/time-line/index.d.ts +1 -1
  394. package/es/components/time-picker/index.d.ts +2 -2
  395. package/es/components/time-picker/src/TimePicker.vue.d.ts +1 -1
  396. package/es/components/vod-chunk-upload/index.d.ts +1 -1
  397. package/es/shared/components/InputNumberSlash/InputNumberSlash.d.ts +5 -3
  398. package/es/shared/components/InputNumberSlash/InputNumberSlash.js +1 -1
  399. package/es/shared/components/SelectPage/SelectPage.vue.d.ts +1 -1
  400. package/es/shared/components/SlotRender/SlotRender.d.ts +1 -1
  401. package/es/shared/hooks/selectHooks/useOptionFiltered.d.ts +1 -1
  402. package/es/shared/hooks/selectHooks/useSearchContent.d.ts +1 -1
  403. package/es/shared/hooks/selectHooks/useSearchContent.js +1 -1
  404. package/es/shared/hooks/selectHooks/useSelectAllowModify.d.ts +1 -1
  405. package/es/shared/hooks/selectHooks/useSelectRenders.d.ts +1 -1
  406. package/es/shared/hooks/useAsyncQueue/types.d.ts +1 -1
  407. package/es/shared/hooks/useDateTime.d.ts +1 -1
  408. package/es/shared/hooks/useFormRequest/index.d.ts +2 -2
  409. package/es/shared/hooks/useFormRequest/types.d.ts +2 -2
  410. package/es/shared/hooks/useLevelSearchCascader.d.ts +2 -2
  411. package/es/shared/hooks/useTheme.d.ts +1 -1
  412. package/es/shared/package.json.js +1 -1
  413. package/es/shared/types/business.d.ts +1 -1
  414. package/es/shared/utils/business.d.ts +2 -1
  415. package/es/shared/utils/business.js +1 -1
  416. package/es/shared/utils/index.d.ts +1 -1
  417. package/es/shared/utils/index.js +1 -1
  418. package/package.json +3 -2
  419. package/es/components/multi-chat/index.js +0 -1
  420. package/es/components/multi-chat/src/MultiChat.vue.js +0 -1
  421. package/es/components/multi-chat/src/MultiChat.vue2.js +0 -1
  422. /package/es/components/{multi-chat → biunique-chat}/src/api/index.js +0 -0
  423. /package/es/components/{multi-chat → biunique-chat}/src/components/ChatFooter.vue.js +0 -0
  424. /package/es/components/{multi-chat → biunique-chat}/src/components/ChatFooter.vue2.js +0 -0
  425. /package/es/components/{multi-chat → biunique-chat}/src/components/ChatHeader.vue.js +0 -0
  426. /package/es/components/{multi-chat → biunique-chat}/src/components/ChatHeader.vue2.js +0 -0
  427. /package/es/components/{multi-chat → biunique-chat}/src/components/ChatMain.vue.js +0 -0
  428. /package/es/components/{multi-chat → biunique-chat}/src/components/ChatMain.vue2.js +0 -0
  429. /package/es/components/{multi-chat → biunique-chat}/src/components/SiderList.vue.js +0 -0
  430. /package/es/components/{multi-chat → biunique-chat}/src/components/SiderList.vue2.js +0 -0
  431. /package/es/components/{multi-chat → biunique-chat}/src/utils/chatSock.js +0 -0
  432. /package/es/components/{multi-chat → biunique-chat}/style/index.css +0 -0
@@ -33,7 +33,7 @@ export declare const LINEBAR: import("vue").DefineComponent<{
33
33
  headerClass: import("vue").ComputedRef<(string | {
34
34
  'form-render__linebarHeader--disabled': boolean;
35
35
  })[]>;
36
- fieldKey: import("vue").ComputedRef<string>;
36
+ field: import("vue").Ref<import("@formily/core").GeneralField>;
37
37
  formItemDepsCollector: import("../../../hooks").FormItemDepsCollector;
38
38
  TooltipMessage: import("vue").DefineComponent<{
39
39
  message: StringConstructor;
@@ -1,6 +1,6 @@
1
- import { AnyObject } from '../../../../../../es/shared/types';
1
+ import { AnyObject } from '../../../../../shared/types';
2
2
  import { PropType } from 'vue';
3
- import { UrlConfig } from '../../../../../../es/components/form-render';
3
+ import { UrlConfig } from '../../../../../components/form-render';
4
4
  export declare const RADIO: import("vue").DefineComponent<{
5
5
  value: {
6
6
  type: (ArrayConstructor | NumberConstructor | ObjectConstructor | StringConstructor)[];
@@ -1,6 +1,6 @@
1
- import { AnyObject } from '../../../../../../es/shared/types';
1
+ import { AnyObject } from '../../../../../shared/types';
2
2
  import { PropType } from 'vue';
3
- import { UrlConfig } from '../../../../../../es/components/form-render';
3
+ import { UrlConfig } from '../../../../../components/form-render';
4
4
  export declare const REMOTE_SEARCH: import("vue").DefineComponent<{
5
5
  value: {
6
6
  type: PropType<string | null>;
@@ -1 +1 @@
1
- import{defineComponent as e,watch as l,inject as o,computed as a,ref as t,createVNode as n}from"vue";import{connect as u,mapProps as r}from"@formily/vue";import{HelpCircleSharp as i}from"@vicons/ionicons5";import{useVModel as s,useDebounceFn as p}from"@vueuse/core";import{cloneDeep as v,isString as d}from"lodash-es";import{NSelect as m,NSpin as c,NEmpty as f,NTooltip as y,NIcon as g,NTag as h}from"naive-ui";import"../../../index.js";import{InjectionChangeContextCollector as C}from"../../constants/index.js";import{useCommonInjection as b,useSelectOptionProps as j}from"../../hooks/useCommonInjection.js";import{assignUpdateValue as F,assignClearBindVisited as w,createVisitedSetter as x}from"../../utils/schema.js";import{useFormField as B}from"../../hooks/useFormField.js";import{useUrlConfigOptions as K,useAutographOptions as S}from"../../hooks/useFormRenderOptions.js";const k=u(e({name:"FormRemoteSearch",props:{value:{type:String},requestCache:{type:Boolean,default:!0},options:{type:Array,default:()=>[]},allowCreate:Boolean,labelField:{type:String,default:"text"},valueField:{type:String,default:"value"},showField:{type:String},urlConfig:{type:Object},autograph:{type:String},wordbook:{type:Object},onChange:{},useLoading:{type:Boolean,default:!0},lazyRequest:{type:Boolean,default:!0},multiple:Boolean,deletable:Boolean},emits:["update:value"],setup(e,{slots:u,emit:r}){const F=s(e,"value",r),{field:w,fieldKey:k}=B(),{injectValueValidate:O,injectValueBindKey:D}=b();O(F);const R=D(F),q={onRequestConfigChange:({fetchData:e,valueKey:l})=>e(F.value,{[l]:F.value}),onDepsChange:({fetchData:e,valueKey:l})=>e(F.value,{[l]:F.value})},{labelKey:L,valueKey:P,showKey:V,fetchData:I,searchContent:U,fullOptions:z,loading:A}=e.urlConfig?K(e,F,q):S(e,F,q),T=p(((e,l="label")=>I(e,{["value"===l?P.value:"keyword"]:e})),300);l(F,(e=>{if(e&&!z.value.find((l=>l[P.value]===e)))return T(e,"value")}));o(C).setContext(k.value,(e=>{return{currentOption:v((l=e,z.value.find((e=>e[P.value]===l))))};var l}));const{menuProps:$,nodeProps:E}=j(),G=a((()=>z.value.length||!e.allowCreate?z.value:U.value?[{[L.value]:U.value,[P.value]:U.value},...z.value]:z.value));async function H(e){A.value=e,e&&T()}function J(e){const l=e.alias||e[L.value];if(!l||!d(l))return"";const o=l;return e.desc?n("section",{style:{display:"flex",alignItems:"center",gap:"4px"}},[o,e.desc?n(y,null,{trigger:()=>n(g,{component:i},null),default:()=>e.desc}):null]):o}function M({option:l,handleClose:o}){var a;const t=null!=(a=V.value&&l[V.value])?a:l[L.value];if(!e.multiple)return N.value=t,t;return N.value="",e.deletable?n(h,{closable:!0,onClose:function(e){e.stopPropagation(),o()}},{default:()=>t}):`${t};`}const N=t("");return()=>n(m,{title:N.value,remote:!0,filterable:!0,key:R.value,value:F.value,"onUpdate:value":e=>F.value=e,labelField:L.value,valueField:P.value,"menu-props":$,"node-props":E,onSearch:T,"onUpdate:show":H,options:G.value,onFocus:x(w),renderLabel:J,renderTag:M},{empty:()=>e.useLoading&&A.value?n(c,null,null):n(f,{description:"无数据"},null),...u})}}),r(F,w));export{k as REMOTE_SEARCH};
1
+ import{defineComponent as e,watch as l,inject as o,computed as a,ref as t,createVNode as n}from"vue";import{connect as u,mapProps as r}from"@formily/vue";import{HelpCircleSharp as i}from"@vicons/ionicons5";import{useVModel as s,useDebounceFn as v}from"@vueuse/core";import{cloneDeep as p,isString as d}from"lodash-es";import{NSelect as m,NSpin as c,NEmpty as f,NTooltip as y,NIcon as g,NTag as h}from"naive-ui";import"../../../index.js";import{InjectionChangeContextCollector as C}from"../../constants/index.js";import{useCommonInjection as b,useSelectOptionProps as j}from"../../hooks/useCommonInjection.js";import{assignUpdateValue as F,assignClearBindVisited as S,createVisitedSetter as w}from"../../utils/schema.js";import{useFormField as x}from"../../hooks/useFormField.js";import{useUrlConfigOptions as B,useAutographOptions as K}from"../../hooks/useFormRenderOptions.js";const k=u(e({name:"FormRemoteSearch",props:{value:{type:String},requestCache:{type:Boolean,default:!0},options:{type:Array,default:()=>[]},allowCreate:Boolean,labelField:{type:String,default:"text"},valueField:{type:String,default:"value"},showField:{type:String},urlConfig:{type:Object},autograph:{type:String},wordbook:{type:Object},onChange:{},useLoading:{type:Boolean,default:!0},lazyRequest:{type:Boolean,default:!0},multiple:Boolean,deletable:Boolean},emits:["update:value"],setup(e,{slots:u,emit:r}){const F=s(e,"value",r),{field:S,fieldKey:k}=x(),{injectValueValidate:O,injectValueBindKey:D}=b();O(F);const R=D(F),q={onRequestConfigChange:({fetchData:e,valueKey:l})=>e(F.value,{[l]:F.value}),onDepsChange:({fetchData:e,valueKey:l})=>e(F.value,{[l]:F.value})},{labelKey:L,valueKey:P,showKey:V,fetchData:I,searchContent:U,fullOptions:z,loading:A}=e.urlConfig?B(e,F,q):K(e,F,q),T=v(((e,l="label")=>I(e,{["value"===l?P.value:"keyword"]:e},{avoidSearchContent:!1})),300);l(F,(e=>{if(e&&!z.value.find((l=>l[P.value]===e)))return T(e,"value")}));o(C).setContext(k.value,(e=>{return{currentOption:p((l=e,z.value.find((e=>e[P.value]===l))))};var l}));const{menuProps:$,nodeProps:E}=j(),G=a((()=>z.value.length||!e.allowCreate?z.value:U.value?[{[L.value]:U.value,[P.value]:U.value},...z.value]:z.value));async function H(e){A.value=e,e&&T()}function J(e){const l=e.alias||e[L.value];if(!l||!d(l))return"";const o=l;return e.desc?n("section",{style:{display:"flex",alignItems:"center",gap:"4px"}},[o,e.desc?n(y,null,{trigger:()=>n(g,{component:i},null),default:()=>e.desc}):null]):o}function M({option:l,handleClose:o}){var a;const t=null!=(a=V.value&&l[V.value])?a:l[L.value];if(!e.multiple)return N.value=t,t;return N.value="",e.deletable?n(h,{closable:!0,onClose:function(e){e.stopPropagation(),o()}},{default:()=>t}):`${t};`}const N=t("");return()=>n(m,{title:N.value,remote:!0,filterable:!0,key:R.value,value:F.value,"onUpdate:value":e=>F.value=e,labelField:L.value,valueField:P.value,"menu-props":$,"node-props":E,onSearch:T,"onUpdate:show":H,options:G.value,onFocus:w(S),renderLabel:J,renderTag:M},{empty:()=>e.useLoading&&A.value?n(c,null,null):n(f,{description:"无数据"},null),...u})}}),r(F,S));export{k as REMOTE_SEARCH};
@@ -1,6 +1,6 @@
1
- import { AnyObject, AnyFn } from '../../../../../../es/shared/types';
1
+ import { AnyObject, AnyFn } from '../../../../../shared/types';
2
2
  import { PropType } from 'vue';
3
- import { UrlConfig } from '../../../../../../es/components/form-render';
3
+ import { UrlConfig } from '../../../../../components/form-render';
4
4
  export declare const SEARCH_CASCADER: import("vue").DefineComponent<{
5
5
  options: {
6
6
  type: PropType<AnyObject[]>;
@@ -1 +1 @@
1
- import{defineComponent as e,ref as t,computed as a,inject as l,watch as r,createVNode as o,nextTick as n}from"vue";import{connect as u,mapProps as i}from"@formily/vue";import{isEqual as s,isArray as c,isString as p}from"lodash-es";import{NCascader as d}from"naive-ui";import"../../../index.js";import{useCommonInjection as m}from"../../hooks/useCommonInjection.js";import{InjectionAsyncQueue as v,InjectionFormUUID as f}from"../../constants/index.js";import"../../../../../shared/utils/index.js";import"@formily/core";import"@formily/path";import"@vicons/ionicons5";import"@vue/shared";import"@vueuse/core";import"date-fns";import{assignUpdateValue as y,createVisitedSetter as h,traverseDependKey as k}from"../../utils/schema.js";import{useFormField as j}from"../../hooks/useFormField.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"../../hooks/useFormValidator.js";import"@vueuse/shared";import"../../../../../shared/hooks/selectHooks/useSearchContent.js";import"./index.js";const g=u(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:u,emit:i}){const y=t(),{field:g,title:b}=j(),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){i("update:value",c(a)?a.map((function(e){return{...e,label:e[w.value],children:void 0,parent:void 0,mergeItemValue:void 0}})):null)}const q=l(v);async function x(t){e.filterable?await async function(){if(!e.urlConfig||y.value&&e.requestCache)return;const t=await q.addAsync({...e.urlConfig,params:{lvlnr:"1"},key:b.value,cache:e.requestCache,payload:{field:g.value,labelKey:w.value,valueKey:F.value}});function a(e,t,r){const o=[...r,...l(e)],n={[w.value]:e[w.value],[F.value]:e[F.value],depth:t+1,isLeaf:!0,keyword:e.keyword,mergeItemValue:o};return c(e.children)&&(n.children=e.children.map((e=>a(e,t+1,o))),n.isLeaf=!e.children.length),S.value=Math.max(S.value,t+1),n}function l(e){let t=[];if(p(e[w.value])&&(t=[...t,e[w.value]]),p(e.keyword)&&e.keyword.length>0){const a=e.keyword.split(",");t=[...t,...a]}return t}y.value=t.map((e=>a(e,0,[])))}():await async function(t){if(r(e,t))return;const a=await q.addAsync(o(s(t),i(e),b.value,t));if(!a.length&&t)return t.isLeaf=!0,H(0,0,n(t)),void(W.value=!1);const l=a.map((e=>u(e,s(t))));function r(e,t){return!i(e)||!t&&y.value&&e.requestCache||s(t)>=s(e)-1}function o(t,a,l,r){const o={lvlnr:t+1+""};return r&&a.dependKey&&k(a.dependKey,((e,t)=>{o[t]=r[e]})),{params:o,...a,key:l,cache:e.requestCache}}function n(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:y.value=l}(t),await B()}const V=`form-render__cascade--menu-${l(f)}`;async function B(){await n();const e=document.querySelector(`.${V} .v-vl`);e&&e.dispatchEvent(new CustomEvent("scroll"))}function K(t,a){if(!t||!a)return!1;const{mergeItemValue:l}=a;return!(e.checkStrategy.includes("child")&&a.depth<S.value)&&(l.length>0&&l.some((e=>e.includes(t.trim()))))}const{injectValueValidate:L,injectValueWatchFromEmpty:I,injectValueBindKey:E}=m();I((()=>e.value),x),L((()=>e.value)),r((()=>e.urlConfig),(async(t,a)=>{s(t,a)||(y.value=null,C.value?e.lazyRequest||(x(),C.value=!C.value):await x())}),{immediate:!0});const W=t(!1);function z(e){W.value=!!e,e&&x()}const N=a((()=>y.value||e.options||[])),O=a((()=>!e.filterable)),P=E(A);return()=>o(d,{key:P.value,remote:O.value,filterable:e.filterable,"menu-props":{class:V,onClick:B},"check-strategy":e.checkStrategy,show:!!W.value,"onUpdate:show":z,value:A.value,filter:K,"onUpdate:value":H,labelField:w.value,valueField:F.value,options:N.value,onLoad:x,onFocus:h(g)},u)}}),i({dataSource:"options"},y));export{g as SEARCH_CASCADER};
1
+ import{defineComponent as e,ref as t,computed as a,inject as l,watch as o,createVNode as r,nextTick as n}from"vue";import{connect as u,mapProps as i}from"@formily/vue";import{isEqual as s,isArray as c,isString as p}from"lodash-es";import{NCascader as d}from"naive-ui";import"../../../index.js";import{useCommonInjection as m}from"../../hooks/useCommonInjection.js";import{InjectionAsyncQueue as v,InjectionFormUUID as f}from"../../constants/index.js";import"@formily/path";import"@vueuse/core";import"../../../../../shared/utils/index.js";import"@formily/core";import"@vicons/ionicons5";import"@vue/shared";import"date-fns";import{assignUpdateValue as y,createVisitedSetter as h,traverseDependKey as k}from"../../utils/schema.js";import"@formily/reactive";import"../../hooks/useComplexOptions.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"@vueuse/shared";import"../../../../../shared/hooks/selectHooks/useSearchContent.js";import"./index.js";import{useFormField as j}from"../../hooks/useFormField.js";import"../../hooks/useFormValidator.js";const g=u(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:u,emit:i}){const y=t(),{field:g,title:b}=j(),C=t(1),S=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){i("update:value",c(a)?a.map((function(e){return{...e,label:e[w.value],children:void 0,parent:void 0,mergeItemValue:void 0}})):null)}const x=l(v);async function q(t){e.filterable?await async function(){if(!e.urlConfig||y.value&&e.requestCache)return;const t=await x.addAsync({...e.urlConfig,params:{lvlnr:"1"},key:b.value,cache:e.requestCache,payload:{field:g.value,labelKey:w.value,valueKey:F.value}});function a(e,t,o){const r=[...o,...l(e)],n={[w.value]:e[w.value],[F.value]:e[F.value],depth:t+1,isLeaf:!0,keyword:e.keyword,mergeItemValue:r};return c(e.children)&&(n.children=e.children.map((e=>a(e,t+1,r))),n.isLeaf=!e.children.length),C.value=Math.max(C.value,t+1),n}function l(e){let t=[];if(p(e[w.value])&&(t=[...t,e[w.value]]),p(e.keyword)&&e.keyword.length>0){const a=e.keyword.split(",");t=[...t,...a]}return t}y.value=t.map((e=>a(e,0,[])))}():await async function(t){if(o(e,t))return;const a=await x.addAsync(r(s(t),i(e),b.value,t));if(!a.length&&t)return t.isLeaf=!0,H(0,0,n(t)),void(O.value=!1);const l=a.map((e=>u(e,s(t))));function o(e,t){return!i(e)||!t&&y.value&&e.requestCache||s(t)>=s(e)-1}function r(t,a,l,o){const r={lvlnr:t+1+""};return o&&a.dependKey&&k(a.dependKey,((e,t)=>{r[t]=o[e]})),{params:r,...a,key:l,cache:e.requestCache}}function n(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:y.value=l}(t),await B()}const V=`form-render__cascade--menu-${l(f)}`;async function B(){await n();const e=document.querySelector(`.${V} .v-vl`);e&&e.dispatchEvent(new CustomEvent("scroll"))}function K(t,a){if(!t||!a)return!1;const{mergeItemValue:l}=a;return!(e.checkStrategy.includes("child")&&a.depth<C.value)&&(l.length>0&&l.some((e=>e.includes(t.trim()))))}const{injectValueValidate:L,injectValueWatchFromEmpty:I,injectValueBindKey:E}=m();I((()=>e.value),q),L((()=>e.value)),o((()=>e.urlConfig),(async(t,a)=>{s(t,a)||(y.value=null,S.value?e.lazyRequest||(q(),S.value=!S.value):await q())}),{immediate:!0});const O=t(!1);function W(e){O.value=!!e,e&&q()}const z=a((()=>y.value||e.options||[])),N=a((()=>!e.filterable)),P=E(A);return()=>r(d,{key:P.value,remote:N.value,filterable:e.filterable,"menu-props":{class:V,onClick:B},"check-strategy":e.checkStrategy,show:!!O.value,"onUpdate:show":W,value:A.value,filter:K,"onUpdate:value":H,labelField:w.value,valueField:F.value,options:z.value,onLoad:q,onFocus:h(g)},u)}}),i({dataSource:"options"},y));export{g as SEARCH_CASCADER};
@@ -1,7 +1,7 @@
1
- import { FormRequestDefine } from '../../../../../../es/shared/hooks';
2
- import { AnyObject, ArrayAble } from '../../../../../../es/shared/types';
1
+ import { FormRequestDefine } from '../../../../../shared/hooks';
2
+ import { AnyObject, ArrayAble } from '../../../../../shared/types';
3
3
  import { PropType } from 'vue';
4
- import { RecommendItem } from '../../../../../../es/components/recommend-search/src/types';
4
+ import { RecommendItem } from '../../../../../components/recommend-search/src/types';
5
5
  import { UrlConfig } from '../../types';
6
6
  export declare const SELECT: import("vue").DefineComponent<{
7
7
  value: {
@@ -1 +1 @@
1
- import{defineComponent as e,computed as o,inject as t,useAttrs as l,ref as a,createVNode as r,mergeProps as s,toRaw as n}from"vue";import{arrayed as u}from"../../../../../shared/utils/index.js";import{cloneDeep as i,isArray as p,isObject as m,omit as d,xor as c}from"lodash-es";import{NSelect as f}from"naive-ui";import"@vueuse/core";import"date-fns";import"@vue/shared";import{useSelectAllowModify as y}from"../../../../../shared/hooks/selectHooks/useSelectAllowModify.js";import"../../../../../shared/hooks/selectHooks/useSearchContent.js";import{useSelectRenders as v}from"../../../../../shared/hooks/selectHooks/useSelectRenders.js";import{connect as h,mapProps as b}from"@formily/vue";import{useCommonInjection as j,useSelectOptionProps as S}from"../../hooks/useCommonInjection.js";import{useComplexOptions as k,useComplexOptionsSpan as g}from"../../hooks/useComplexOptions.js";import{InjectionChangeContextCollector as C,InjectionFormUUID as B}from"../../constants/index.js";import"../../../index.js";import"@formily/core";import"@formily/path";import"@vicons/ionicons5";import{assignUpdateValue as F,assignClearBindVisited as A,createVisitedSetter as w}from"../../utils/schema.js";import{useFormField as H}from"../../hooks/useFormField.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"../../hooks/useFormValidator.js";import"./index.js";import{useUrlConfigOptions as O,useAutographOptions as K,useRecommendOptions as R}from"../../hooks/useFormRenderOptions.js";const x=h(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"},showField:{type:String},allowCreate:Boolean,shouldSave:Boolean,allowModify:Boolean,showCustomValue:Boolean,cursorPlacement:{type:String,default:"end"},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},useLoading:{type:Boolean,default:!0},multiple:{type:Boolean},deletable:{type:Boolean,default:!0},selectAll:{type:Boolean},searchByValue:{type:Boolean}},emits:["update:value","postRecommend"],setup(e,{slots:h,emit:b}){const F=o({get:()=>e.value,async set(e){b("update:value",e),D(e)}}),{labelKey:A,valueKey:x,showKey:V,fetchData:L,searchContent:P,fullOptions:_,filterOptions:N,remoteOptions:I,loading:W}=e.urlConfig?O(e,F):K(e,F),{modifyEvent:E,modifyAbleRef:q,getOptionsWithCreated:M}=y(e,{searchContent:P,labelKey:A,valueKey:x,valueRef:F,fullOptions:_}),{renderComplexOption:T,hasComplexOption:U}=k(e,F),{getRecommend:z,postRecommend:D,sortedOptions:G}=R(e,N,b,A,x),{field:J,fieldKey:Q}=H();t(C).setContext(Q.value,(e=>({currentOption:i(function(e){const o=M(_.value);return p(e)?function(e){const t=o.reduce(((e,o)=>(e[o[x.value]]=o,e)),{});return e.map((e=>t[e]))}(e):(t=e,o.find((e=>e[x.value]===t)));var t}(e))})));const X=async e=>(P.value=e,Promise.allSettled([L(e),z(e)])),{injectValueValidate:Y,injectValueWatchFromEmpty:Z,injectValueBindKey:$}=j();Z(F,X),Y(F);const ee=$(F),{menuProps:oe,nodeProps:te}=S(),{renderTag:le,renderLabel:ae,renderSelectAll:re,titleRef:se}=v(e,{labelKey:A,valueKey:x,valueRef:F,showKey:V,searchContent:P}),ne=o((()=>M(q.value?_.value:G.value))),ue=l(),ie=o((()=>{if(e.allowCreate||e.showCustomValue)return F.value;const o=e.multiple&&p(F.value);return _.value.find((e=>o?F.value.includes(e[x.value]):e[x.value]===F.value))?F.value:null})),pe=a(!1);async function me(e){e&&await X(),pe.value=e}async function de(e,o){await E.updateValue(e,o),I.value&&o&&u(o).forEach((e=>{if(!m(e))return;const o=e;o.created&&o.shouldSave&&I.value.push(d(n(o),["created","shouldSave"]))}))}const ce=t(B),{getSpan:fe}=g(),ye=w(J,E.focus);function ve(o){if(!e.multiple)return;const t=o?ne.value.map((e=>e[x.value])):[];c(t,e.value).length&&(F.value=t)}function he(o){let t=h;return e.multiple&&e.selectAll&&(t={action:()=>re(ve),...h}),r(f,s({title:se.value,key:ee.value,multiple:e.multiple,remote:!0,filterable:!0,loading:W.value,value:ie.value,onUpdateValue:de,"menu-props":oe,"node-props":te,labelField:A.value,valueField:x.value,options:ne.value,onSearch:X,show:pe.value,"onUpdate:show":me,onFocus:ye,onBlur:E.blur,renderLabel:ae,renderTag:le},o,ue),t)}return()=>{var e,o;if(!U.value)return he();const t=null!=(o=null==(e=J.value.decoratorProps)?void 0:e.span)?o:6,l=fe(ce,J.value.address);return r("section",{class:"form-render__selectChildField",style:{"--column":l+t}},[he({class:"form-render__selectChildFieldItem",style:{"--form-item-column":t}}),_.value.map((e=>T({option:e,value:F.value,valueKey:x.value,labelKey:A.value,childFieldStrategy:"checked",renderLabel:!1,attrs:{class:"form-render__selectChildFieldItem",style:{"--form-item-column":l}}})))])}}}),b({dataSource:"options"},F,A));export{x as SELECT};
1
+ import{defineComponent as e,computed as o,inject as t,useAttrs as l,ref as a,createVNode as r,mergeProps as s,toRaw as n}from"vue";import{arrayed as u}from"../../../../../shared/utils/index.js";import{cloneDeep as i,isArray as p,isObject as m,omit as d,xor as c}from"lodash-es";import{NSelect as y}from"naive-ui";import"@vueuse/core";import"date-fns";import"@vue/shared";import{useSelectAllowModify as f}from"../../../../../shared/hooks/selectHooks/useSelectAllowModify.js";import"../../../../../shared/hooks/selectHooks/useSearchContent.js";import{useSelectRenders as v}from"../../../../../shared/hooks/selectHooks/useSelectRenders.js";import{connect as h,mapProps as b}from"@formily/vue";import{useCommonInjection as j,useSelectOptionProps as S}from"../../hooks/useCommonInjection.js";import{useComplexOptions as k,useComplexOptionsSpan as g}from"../../hooks/useComplexOptions.js";import{InjectionChangeContextCollector as C,InjectionFormUUID as B}from"../../constants/index.js";import"@formily/path";import"@formily/core";import"@vicons/ionicons5";import{assignUpdateValue as F,assignClearBindVisited as A,createVisitedSetter as w}from"../../utils/schema.js";import"@formily/reactive";import"../../../index.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"./index.js";import"@vueuse/shared";import{useFormField as H}from"../../hooks/useFormField.js";import{useUrlConfigOptions as O,useAutographOptions as K,useRecommendOptions as R}from"../../hooks/useFormRenderOptions.js";import"../../hooks/useFormValidator.js";const x=h(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"},showField:{type:String},allowCreate:Boolean,shouldSave:Boolean,allowModify:Boolean,showCustomValue:Boolean,cursorPlacement:{type:String,default:"end"},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},useLoading:{type:Boolean,default:!0},multiple:{type:Boolean},deletable:{type:Boolean,default:!0},selectAll:{type:Boolean},searchByValue:{type:Boolean}},emits:["update:value","postRecommend"],setup(e,{slots:h,emit:b}){const F=o({get:()=>e.value,async set(e){b("update:value",e),D(e)}}),{labelKey:A,valueKey:x,showKey:V,fetchData:L,searchContent:P,fullOptions:_,filterOptions:N,remoteOptions:I,loading:W}=e.urlConfig?O(e,F):K(e,F),{modifyEvent:q,modifyAbleRef:E,getOptionsWithCreated:z}=f(e,{searchContent:P,labelKey:A,valueKey:x,valueRef:F,fullOptions:_}),{renderComplexOption:M,hasComplexOption:T}=k(e,F),{getRecommend:U,postRecommend:D,sortedOptions:G}=R(e,N,b,A,x),{field:J,fieldKey:Q}=H();t(C).setContext(Q.value,(e=>({currentOption:i(function(e){const o=z(_.value);return p(e)?function(e){const t=o.reduce(((e,o)=>(e[o[x.value]]=o,e)),{});return e.map((e=>t[e]))}(e):(t=e,o.find((e=>e[x.value]===t)));var t}(e))})));const X=async e=>(P.value=e,Promise.allSettled([L(e),U(e)])),{injectValueValidate:Y,injectValueWatchFromEmpty:Z,injectValueBindKey:$}=j();Z(F,(()=>e.lazyRequest&&X())),Y(F);const ee=$(F),{menuProps:oe,nodeProps:te}=S(),{renderTag:le,renderLabel:ae,renderSelectAll:re,titleRef:se}=v(e,{labelKey:A,valueKey:x,valueRef:F,showKey:V,searchContent:P}),ne=o((()=>z(E.value?_.value:G.value))),ue=l(),ie=o((()=>{if(e.allowCreate||e.showCustomValue)return F.value;const o=e.multiple&&p(F.value);return _.value.find((e=>o?F.value.includes(e[x.value]):e[x.value]===F.value))?F.value:null})),pe=a(!1);async function me(e){e&&await X(),pe.value=e}async function de(e,o){await q.updateValue(e,o),I.value&&o&&u(o).forEach((e=>{if(!m(e))return;const o=e;o.created&&o.shouldSave&&I.value.push(d(n(o),["created","shouldSave"]))}))}const ce=t(B),{getSpan:ye}=g(),fe=w(J,q.focus);function ve(o){if(!e.multiple)return;const t=o?ne.value.map((e=>e[x.value])):[];c(t,e.value).length&&(F.value=t)}function he(o){let t=h;return e.multiple&&e.selectAll&&(t={action:()=>re(ve),...h}),r(y,s({title:se.value,key:ee.value,multiple:e.multiple,remote:!0,filterable:!0,loading:W.value,value:ie.value,onUpdateValue:de,"menu-props":oe,"node-props":te,labelField:A.value,valueField:x.value,options:ne.value,onSearch:X,show:pe.value,"onUpdate:show":me,onFocus:fe,onBlur:q.blur,renderLabel:ae,renderTag:le},o,ue),t)}return()=>{var e,o;if(!T.value)return he();const t=null!=(o=null==(e=J.value.decoratorProps)?void 0:e.span)?o:6,l=ye(ce,J.value.address);return r("section",{class:"form-render__selectChildField",style:{"--column":l+t}},[he({class:"form-render__selectChildFieldItem",style:{"--form-item-column":t}}),_.value.map((e=>M({option:e,value:F.value,valueKey:x.value,labelKey:A.value,childFieldStrategy:"checked",renderLabel:!1,attrs:{class:"form-render__selectChildFieldItem",style:{"--form-item-column":l}}})))])}}}),b({dataSource:"options"},F,A));export{x as SELECT};
@@ -1,4 +1,4 @@
1
- import { AnyObject } from '../../../../../../es/shared/types';
1
+ import { AnyObject } from '../../../../../shared/types';
2
2
  export declare const TEXT: {
3
3
  (props: AnyObject): JSX.Element;
4
4
  props: {
@@ -1 +1 @@
1
- import{defineComponent as e,computed as r,createVNode as o,createTextVNode as i}from"vue";import{NSwitch as t}from"naive-ui";import"../../../../../shared/utils/index.js";import"@formily/core";import"@formily/path";import"@vicons/ionicons5";import"@vue/shared";import"@vueuse/core";import"lodash-es";import"../../../index.js";import"date-fns";import{assignUpdateValue as n,assignValueBindKey as l}from"../../utils/schema.js";import{connect as u,mapProps as c}from"@formily/vue";const p=u(e({name:"FormSwitch",props:{openDescription:{type:Object},closeDescription:{type:Object},onChange:{}},setup:e=>()=>{const n=r((()=>{var r,o;return null==(o=null==(r=e.openDescription)?void 0:r.value)||o})),l=r((()=>{var r,o;return null!=(o=null==(r=e.closeDescription)?void 0:r.value)&&o}));return o(t,{checkedValue:n.value,uncheckedValue:l.value},{checked:()=>{var r,o;return i(null!=(o=null==(r=e.openDescription)?void 0:r.describe)?o:"")},unchecked:()=>{var r,o;return i(null!=(o=null==(r=e.closeDescription)?void 0:r.describe)?o:"")}})}}),c(n,l));export{p as SWITCH};
1
+ import{defineComponent as e,computed as r,createVNode as o,createTextVNode as i}from"vue";import{NSwitch as t}from"naive-ui";import"../../../../../shared/utils/index.js";import"@formily/core";import"@formily/path";import"@vicons/ionicons5";import"@vue/shared";import"@vueuse/core";import"lodash-es";import"date-fns";import{assignUpdateValue as n,assignValueBindKey as l}from"../../utils/schema.js";import{connect as u,mapProps as c}from"@formily/vue";const p=u(e({name:"FormSwitch",props:{openDescription:{type:Object},closeDescription:{type:Object},onChange:{}},setup:e=>()=>{const n=r((()=>{var r,o;return null==(o=null==(r=e.openDescription)?void 0:r.value)||o})),l=r((()=>{var r,o;return null!=(o=null==(r=e.closeDescription)?void 0:r.value)&&o}));return o(t,{checkedValue:n.value,uncheckedValue:l.value},{checked:()=>{var r,o;return i(null!=(o=null==(r=e.openDescription)?void 0:r.describe)?o:"")},unchecked:()=>{var r,o;return i(null!=(o=null==(r=e.closeDescription)?void 0:r.describe)?o:"")}})}}),c(n,l));export{p as SWITCH};
@@ -1 +1 @@
1
- import{defineComponent as e,computed as o,createVNode as t}from"vue";import{useCommonInjection as r}from"../../hooks/useCommonInjection.js";import"../../../../../shared/utils/index.js";import"@formily/core";import"@formily/path";import"@vicons/ionicons5";import"@vue/shared";import"@vueuse/core";import"lodash-es";import{NInput as i}from"naive-ui";import"../../../index.js";import"date-fns";import{assignUpdateValue as m,assignClearBindVisited as a}from"../../utils/schema.js";import{connect as p,mapProps as u}from"@formily/vue";const s=p(e({name:"FormTextarea",props:{value:{type:String}},emits:["update:value"],setup(e,{emit:m}){const a=o({get:()=>e.value,set:e=>m("update:value",e)}),p=r().injectValueBindKey(a);return()=>t(i,{type:"textarea",key:p.value,value:a.value,"onUpdate:value":e=>a.value=e},null)}}),u(m,a));export{s as TEXTAREA};
1
+ import{defineComponent as e,computed as o,createVNode as t}from"vue";import{useCommonInjection as r}from"../../hooks/useCommonInjection.js";import"../../../../../shared/utils/index.js";import"@formily/core";import"@formily/path";import"@vicons/ionicons5";import"@vue/shared";import"@vueuse/core";import"lodash-es";import{NInput as i}from"naive-ui";import"date-fns";import{assignUpdateValue as m,assignClearBindVisited as a}from"../../utils/schema.js";import{connect as u,mapProps as p}from"@formily/vue";const s=u(e({name:"FormTextarea",props:{value:{type:String}},emits:["update:value"],setup(e,{emit:m}){const a=o({get:()=>e.value,set:e=>m("update:value",e)}),u=r().injectValueBindKey(a);return()=>t(i,{type:"textarea",key:u.value,value:a.value,"onUpdate:value":e=>a.value=e},null)}}),p(m,a));export{s as TEXTAREA};
@@ -1,9 +1,9 @@
1
- import { FormRequestDefine } from '../../../../../es/shared/hooks';
2
- import { Nullable } from '../../../../../es/shared/types';
1
+ import { FormRequestDefine } from '../../../../shared/hooks';
2
+ import { Nullable } from '../../../../shared/types';
3
3
  import { GeneralField } from '@formily/core';
4
- import { AnnotationItem } from '../../../../../es/components/annotation-edit/src/type';
5
- import { ContextCollector } from '../../../../../es/components/form-render/src/hooks/useChangeContext';
6
- import { useFormRenderLifeCycle } from '../../../../../es/components/form-render/src/hooks/useFormRenderLifeCycle';
4
+ import { AnnotationItem } from '../../../../components/annotation-edit/src/type';
5
+ import { ContextCollector } from '../../../../components/form-render/src/hooks/useChangeContext';
6
+ import { useFormRenderLifeCycle } from '../../../../components/form-render/src/hooks/useFormRenderLifeCycle';
7
7
  import { BusinessCollector, FormItemDepsCollector } from '../hooks';
8
8
  import { FormRenderProps } from '../types';
9
9
  import { Component, InjectionKey, WritableComputedRef } from 'vue';
@@ -17,7 +17,6 @@ export declare const InjectionFormUUID: InjectionKey<string>;
17
17
  export declare const InjectionFormGraph: InjectionKey<Record<string, GeneralField>>;
18
18
  export declare const InjectionAnnotation: InjectionKey<WritableComputedRef<Nullable<Record<string, AnnotationItem>>>>;
19
19
  export declare const InjectionFormGlobalProps: InjectionKey<Readonly<FormRenderProps>>;
20
- export declare const FormItemLineBarDepKeyPrepend = "__dep_LINEBAR_";
21
20
  export declare enum FIELD_BUSINESS_TYPE {
22
21
  PASSWORD = "password",
23
22
  ID_CARD = "id_card",
@@ -1 +1 @@
1
- const o=Symbol("InjectionAsyncQueue"),e=Symbol("InjectionSchemaField"),n=Symbol("InjectionBusinessCollector"),t=Symbol("InjectionChangeContextCollector"),l=Symbol("InjectionFormItemDepsCollector"),E=Symbol("InjectionFormLifeCycleCaller"),I=Symbol("InjectionFormUUID"),i=Symbol("InjectionFormGraph"),A=Symbol("InjectionAnnotation"),a=Symbol("InjectionFormGlobalProps"),c="__dep_LINEBAR_";var m=(o=>(o.PASSWORD="password",o.ID_CARD="id_card",o.AGE="age",o.AGE_UNIT="age_unit",o.MOBILE="mobile",o.TELEPHONE="telephone",o.EMAIL="email",o.SEX="sex",o.BIRTHDAY="birthday",o.BANK_CARD="bank_card",o.WEBSITE="website",o.GESTATIONAL_WEEKS="gestational_weeks",o.GESTATIONAL_STAGE="gestational_stage",o.CUSTOMER_NAME="customer_name",o))(m||{}),S=(o=>(o.MALE="1",o.FEMALE="2",o))(S||{}),r=(o=>(o.DAY="D",o.MONTH="M",o.YEAR="Y",o.HOUR="H",o.WEEK="W",o.MINUTE="N",o))(r||{});const s=["COMPLEX","COMBINATION"];export{r as FIELD_AGE_UNIT,m as FIELD_BUSINESS_TYPE,S as FIELD_SEX_VALUE,c as FormItemLineBarDepKeyPrepend,A as InjectionAnnotation,o as InjectionAsyncQueue,n as InjectionBusinessCollector,t as InjectionChangeContextCollector,a as InjectionFormGlobalProps,i as InjectionFormGraph,l as InjectionFormItemDepsCollector,E as InjectionFormLifeCycleCaller,I as InjectionFormUUID,e as InjectionSchemaField,s as NESTED_FORM_ITEM_TYPE};
1
+ const o=Symbol("InjectionAsyncQueue"),e=Symbol("InjectionSchemaField"),n=Symbol("InjectionBusinessCollector"),t=Symbol("InjectionChangeContextCollector"),l=Symbol("InjectionFormItemDepsCollector"),E=Symbol("InjectionFormLifeCycleCaller"),I=Symbol("InjectionFormUUID"),i=Symbol("InjectionFormGraph"),a=Symbol("InjectionAnnotation"),c=Symbol("InjectionFormGlobalProps");var m=(o=>(o.PASSWORD="password",o.ID_CARD="id_card",o.AGE="age",o.AGE_UNIT="age_unit",o.MOBILE="mobile",o.TELEPHONE="telephone",o.EMAIL="email",o.SEX="sex",o.BIRTHDAY="birthday",o.BANK_CARD="bank_card",o.WEBSITE="website",o.GESTATIONAL_WEEKS="gestational_weeks",o.GESTATIONAL_STAGE="gestational_stage",o.CUSTOMER_NAME="customer_name",o))(m||{}),A=(o=>(o.MALE="1",o.FEMALE="2",o))(A||{}),S=(o=>(o.DAY="D",o.MONTH="M",o.YEAR="Y",o.HOUR="H",o.WEEK="W",o.MINUTE="N",o))(S||{});const r=["COMPLEX","COMBINATION"];export{S as FIELD_AGE_UNIT,m as FIELD_BUSINESS_TYPE,A as FIELD_SEX_VALUE,a as InjectionAnnotation,o as InjectionAsyncQueue,n as InjectionBusinessCollector,t as InjectionChangeContextCollector,c as InjectionFormGlobalProps,i as InjectionFormGraph,l as InjectionFormItemDepsCollector,E as InjectionFormLifeCycleCaller,I as InjectionFormUUID,e as InjectionSchemaField,r as NESTED_FORM_ITEM_TYPE};
@@ -1,13 +1,24 @@
1
- export * from './useFieldListAdaptor';
2
- export * from './useCommonLog';
3
- export * from './useFormField';
4
- export * from './useFieldVisitor';
5
- export * from './useFieldNormalize';
6
- export * from './useFormValidator';
1
+ export * from './useAnchor';
2
+ export * from './useAutoHidden';
7
3
  export * from './useBusinessBinding';
8
4
  export * from './useChangeContext';
9
- export * from './useFormItemDeps';
10
- export * from './useAnchor';
11
- export * from './useFormContext';
12
5
  export * from './useCommonInjection';
6
+ export * from './useCommonLog';
7
+ export * from './useComplexOptions';
8
+ export * from './useFieldListAdaptor';
9
+ export * from './useFieldNormalize';
10
+ export * from './useFieldVisitor';
11
+ export * from './useFormContext';
12
+ export * from './useFormEvent';
13
+ export * from './useFormField';
14
+ export * from './useFormGraph';
15
+ export * from './useFormItemDeps';
16
+ export * from './useFormRenderLifeCycle';
13
17
  export * from './useFormRenderOptions';
18
+ export * from './useFormValidator';
19
+ export * from './useLowCodeEvent';
20
+ export * from './useLowCodeReactions';
21
+ export * from './useNuiThemeOverrides';
22
+ export * from './useOperationalForm';
23
+ export * from './usePresetScope';
24
+ export * from './useWordbookSetting';
@@ -1 +1 @@
1
- export{useFieldListAdaptor}from"./useFieldListAdaptor.js";export{useCommonLog}from"./useCommonLog.js";export{useFormField}from"./useFormField.js";export{useFieldVisitor}from"./useFieldVisitor.js";export{useFieldNormalize}from"./useFieldNormalize.js";export{useFormValidator,validateMessageLocale}from"./useFormValidator.js";export{BusinessCollector,useBusinessBinding}from"./useBusinessBinding.js";export{ContextCollector,useChangeContext}from"./useChangeContext.js";export{FormItemDepsCollector,useFormItemDeps}from"./useFormItemDeps.js";export{useAnchor}from"./useAnchor.js";export{useFormContext}from"./useFormContext.js";export{useCommonInjection,useSelectOptionProps}from"./useCommonInjection.js";export{useAutographOptions,useRecommendOptions,useUrlConfigOptions}from"./useFormRenderOptions.js";
1
+ export{useAnchor}from"./useAnchor.js";export{useAutoHidden}from"./useAutoHidden.js";export{BusinessCollector,useBusinessBinding}from"./useBusinessBinding.js";export{ContextCollector,useChangeContext}from"./useChangeContext.js";export{useCommonInjection,useSelectOptionProps}from"./useCommonInjection.js";export{useCommonLog}from"./useCommonLog.js";export{useComplexOptions,useComplexOptionsSpan}from"./useComplexOptions.js";export{useFieldListAdaptor}from"./useFieldListAdaptor.js";export{useFieldNormalize}from"./useFieldNormalize.js";export{useFieldVisitor}from"./useFieldVisitor.js";export{useFormContext}from"./useFormContext.js";export{useFormDomEvent,useFormExposeEvent}from"./useFormEvent.js";export{useFormField}from"./useFormField.js";export{useFormGraph}from"./useFormGraph.js";export{FormItemDepsCollector,useFormItemDeps}from"./useFormItemDeps.js";export{useFormRenderLifeCycle}from"./useFormRenderLifeCycle.js";export{useAutographOptions,useRecommendOptions,useUrlConfigOptions}from"./useFormRenderOptions.js";export{useFormValidator,validateMessageLocale}from"./useFormValidator.js";export{useLowCodeEvent}from"./useLowCodeEvent.js";export{useLowCodeReactions}from"./useLowCodeReactions.js";export{useNuiThemeOverrides}from"./useNuiThemeOverrides.js";export{useOperationalForm}from"./useOperationalForm.js";export{usePresetScope}from"./usePresetScope.js";export{useWordbookSetting,wordbookSettingHandler}from"./useWordbookSetting.js";
@@ -1,7 +1,7 @@
1
- import { AnyFn, UndefinedAble } from '../../../../../es/shared/types';
1
+ import { AnyFn, UndefinedAble } from '../../../../shared/types';
2
2
  import { Form, GeneralField } from '@formily/core';
3
3
  import { Ref } from 'vue';
4
- import { FormItemDepsCollector, FormRenderProps } from '../../../../../es/components/form-render';
4
+ import { FormItemDepsCollector, FormRenderProps } from '../../../../components/form-render';
5
5
  export declare function useAnchor(props: Readonly<FormRenderProps>, emit: AnyFn, scrollbarRef: Ref<UndefinedAble<HTMLElement>>, collector: FormItemDepsCollector): {
6
6
  currentAnchor: import("vue").WritableComputedRef<string>;
7
7
  onScroll: (scrollEvent: Event) => void;
@@ -1 +1 @@
1
- import{doAnimation as e}from"../../../../shared/utils/anime.js";import{useDebounceFn as o,watchOnce as t}from"@vueuse/core";import{ref as r,computed as n,nextTick as i}from"vue";import{FormItemLineBarDepKeyPrepend as l}from"../constants/index.js";import"../../../../shared/utils/index.js";import"@formily/core";import"@formily/path";import"@vicons/ionicons5";import"@vue/shared";import"lodash-es";import"naive-ui";import"../../index.js";import"date-fns";import{createLinebarId as a}from"../utils/schema.js";function s(s,u,c,m){const v=r(),p=r(""),f=r([]),d=async function(e){var o;f.value=Object.values(e.fields).reduce(((e,o)=>{var t,r;return"LINEBAR"===o.componentType&&"visible"===o.selfDisplay&&e.push({title:null!=(r=null==(t=o.componentProps)?void 0:t.title)?r:o.title,name:o.address.toString()}),e}),[]),await i(),null==(o=v.value)||o.syncBarPosition()};let h=!1;async function y(o){h=!0;try{if(!c.value)return;m.trigger(l+o,!0),await i();const t=c.value.querySelector(`#${a(o)}`);if(!t)return;await new Promise((o=>{e(c.value.scrollTop,t.offsetTop,300,(e=>{var o;null==(o=c.value)||o.scrollTo({top:e})}),"easeInSine",(()=>setTimeout(o,300)))}))}finally{h=!1}}const T=o((function(e){var o;if(h||!c.value)return;const{scrollTop:t,clientHeight:r}=c.value,n=f.value.find(((e,o,n)=>{const i=n[o+1];if(!i)return!0;const l=c.value.querySelector(`#${a(i.name)}`);return l?l.offsetTop>t+r/2:void 0}))||f.value[f.value.length-1];p.value=null!=(o=null==n?void 0:n.name)?o:"",u("scroll",e)}),300);t(f,(e=>{var o,t;p.value=null!=(t=null==(o=e[0])?void 0:o.name)?t:""}));return{currentAnchor:n({get:()=>p.value,async set(e){p.value=e,await new Promise((e=>setTimeout(e,100))),await y(e)}}),onScroll:T,anchorIdList:f,generateAnchorList:d,updateAnchorList:function(e){"LINEBAR"===e.componentType&&e.selfDisplay&&d(e.form)},scrollTo:y,anchorBarRef:v}}export{s as useAnchor};
1
+ import{doAnimation as e}from"../../../../shared/utils/anime.js";import{Path as o}from"@formily/path";import{useDebounceFn as t,watchOnce as r}from"@vueuse/core";import{ref as n,computed as l,nextTick as i}from"vue";import"../../../../shared/utils/index.js";import"@formily/core";import"@vicons/ionicons5";import"@vue/shared";import"lodash-es";import"naive-ui";import"date-fns";import{createLinebarId as a}from"../utils/schema.js";function s(s,u,c,m){const v=n(),p=n(""),f=n([]),d=async function(e){var o;f.value=Object.values(e.fields).reduce(((e,o)=>{var t,r;return"LINEBAR"===o.componentType&&"visible"===o.selfDisplay&&e.push({title:null!=(r=null==(t=o.componentProps)?void 0:t.title)?r:o.title,name:o.address.toString()}),e}),[]),await i(),null==(o=v.value)||o.syncBarPosition()};let h=!1;async function y(t){h=!0;try{if(!c.value)return;m.trigger(o.parse(t),!0),await i();const r=c.value.querySelector(`#${a(t)}`);if(!r)return;await new Promise((o=>{e(c.value.scrollTop,r.offsetTop,300,(e=>{var o;null==(o=c.value)||o.scrollTo({top:e})}),"easeInSine",(()=>setTimeout(o,300)))}))}finally{h=!1}}const T=t((function(e){var o;if(h||!c.value)return;const{scrollTop:t,clientHeight:r}=c.value,n=f.value.find(((e,o,n)=>{const l=n[o+1];if(!l)return!0;const i=c.value.querySelector(`#${a(l.name)}`);return i?i.offsetTop>t+r/2:void 0}))||f.value[f.value.length-1];p.value=null!=(o=null==n?void 0:n.name)?o:"",u("scroll",e)}),300);r(f,(e=>{var o,t;p.value=null!=(t=null==(o=e[0])?void 0:o.name)?t:""}));return{currentAnchor:l({get:()=>p.value,async set(e){p.value=e,await new Promise((e=>setTimeout(e,100))),await y(e)}}),onScroll:T,anchorIdList:f,generateAnchorList:d,updateAnchorList:function(e){"LINEBAR"===e.componentType&&e.selfDisplay&&d(e.form)},scrollTo:y,anchorBarRef:v}}export{s as useAnchor};
@@ -1,9 +1,9 @@
1
1
  import { Form } from '@formily/core';
2
- import { FieldItem, FormBusinessFormatter } from '../../../../../es/components/form-render';
2
+ import { FieldItem, FormBusinessFormatter } from '../../../../components/form-render';
3
3
  import { FIELD_BUSINESS_TYPE } from '../constants';
4
4
  export declare class BusinessCollector {
5
5
  private businessFormatter?;
6
- triggerLock: boolean;
6
+ triggerDisabled: boolean | string;
7
7
  private readonly typeLockMap;
8
8
  private readonly typeCollector;
9
9
  private readonly fieldNameCollector;
@@ -1 +1 @@
1
- import{isField as e}from"@formily/core";import{isString as t}from"@vueuse/core";import{format as s}from"date-fns";import{isFunction as i,isNumber as r}from"lodash-es";import{FIELD_BUSINESS_TYPE as n}from"../constants/index.js";import"vue";import"../../../../shared/utils/index.js";import"@formily/path";import"@vicons/ionicons5";import"@vue/shared";import"naive-ui";import"../../index.js";import{isIdCard as a,parseIdCard as l,parseAgeFromContext as o,parseBirthday as u,parseAge2Birthday as h}from"../utils/business.js";class y{constructor(e){this.businessFormatter=e,this.triggerLock=!1,this.typeLockMap=new Map,this.typeCollector=new Map,this.fieldNameCollector=new Map,this.changeHandlerMap=new Map([])}formatter(...e){return i(this.businessFormatter)?this.businessFormatter(...e):e[0].value}collect(e,t){this.typeCollector.set(e,t),this.fieldNameCollector.set(t.val_key,e)}getField(e){return this.typeCollector.get(e)}getFieldInstanceByType(e,t){const s=this.getField(t);return s?e.query(s.val_key).take():null}getType(e){return this.fieldNameCollector.get(e)}getValueByField(t,s){const i=t.query(s).take();return e(i)?i.value:null}getValueByType(e,t){const s=this.getField(t);return s?this.getValueByField(e,s.val_key):null}setValueByType(e,t,s,i){const r=this.getField(t);r&&e.setFieldState(r.val_key,(e=>{e.value!==s&&(!this.typeLockMap.get(t)&&this.typeLockMap.set(t,1),e.value=this.formatter({value:s,type:t,fieldKey:r.val_key,from:i}))}))}registerChangeBusiness(e,t){return this.changeHandlerMap.set(e,t),this}trigger(e,t,s="change"){var i;if(this.triggerLock)return;const r=this.getType(t);if(!r)return;if("change"===s&&this.typeLockMap.get(r))return this.typeLockMap.set(r,0);const n="change"===s?this.changeHandlerMap:null;n&&(null==(i=n.get(r))||i.call(this,e))}}function c(){function e(){var e;const t=this.getField(n.BIRTHDAY);return null!=(e=null==t?void 0:t.date_format)?e:"yyyy-MM-dd HH:mm"}function i(i){const r=this.getValueByType(i,n.ID_CARD);if(!r||!t(r)||!a(r))return;const u=l(r),{age:h,ageUnit:y}=o(u);this.setValueByType(i,n.AGE_UNIT,y,n.ID_CARD),this.setValueByType(i,n.AGE,h,n.ID_CARD),this.setValueByType(i,n.SEX,u.sex,n.ID_CARD),this.setValueByType(i,n.BIRTHDAY,s(new Date(u.birthday),e.call(this)),n.ID_CARD)}function c(e){const s=this.getValueByType(e,n.BIRTHDAY);if(!t(s))return;const{age:i,ageUnit:r}=o(u(s));this.setValueByType(e,n.AGE_UNIT,r,n.BIRTHDAY),this.setValueByType(e,n.AGE,i,n.BIRTHDAY)}function p(s){return function(i){const a=this.getValueByType(i,n.AGE),l=this.getValueByType(i,n.AGE_UNIT);(t(a)||r(a))&&""!==a&&t(l)&&""!==l&&this.setValueByType(i,n.BIRTHDAY,h(+a,l,e.call(this)),s)}}return{create:function(e){return new y(e).registerChangeBusiness(n.ID_CARD,i).registerChangeBusiness(n.AGE_UNIT,p(n.AGE_UNIT)).registerChangeBusiness(n.AGE,p(n.AGE)).registerChangeBusiness(n.BIRTHDAY,c)}}}export{y as BusinessCollector,c as useBusinessBinding};
1
+ import{isField as e}from"@formily/core";import{Path as t}from"@formily/path";import{isString as s}from"@vueuse/core";import{format as i}from"date-fns";import{isFunction as r,isNumber as a}from"lodash-es";import{FIELD_BUSINESS_TYPE as n}from"../constants/index.js";import"vue";import"../../../../shared/utils/index.js";import"@vicons/ionicons5";import"@vue/shared";import"naive-ui";import{isIdCard as l,parseIdCard as o,parseAgeFromContext as u,parseBirthday as h,parseAge2Birthday as y}from"../utils/business.js";class c{constructor(e){this.businessFormatter=e,this.triggerDisabled=!1,this.typeLockMap=new Map,this.typeCollector=new Map,this.fieldNameCollector=new Map,this.changeHandlerMap=new Map([])}formatter(...e){return r(this.businessFormatter)?this.businessFormatter(...e):e[0].value}collect(e,t){this.typeCollector.set(e,t),this.fieldNameCollector.set(t.val_key,e)}getField(e){return this.typeCollector.get(e)}getFieldInstanceByType(e,t){const s=this.getField(t);return s?e.query(s.val_key).take():null}getType(e){return this.fieldNameCollector.get(e)}getValueByField(t,s){const i=t.query(s).take();return e(i)?i.value:null}getValueByType(e,t){const s=this.getField(t);return s?this.getValueByField(e,s.val_key):null}setValueByType(e,i,r,a){const n=this.getField(i);n&&e.setFieldState(n.val_key,(e=>{e.value!==r&&(!this.typeLockMap.get(i)&&this.typeLockMap.set(i,1),this.triggerDisabled&&s(this.triggerDisabled)&&t.parse(this.triggerDisabled).match(n.val_key)||(e.value=this.formatter({value:r,type:i,fieldKey:n.val_key,from:a})))}))}registerChangeBusiness(e,t){return this.changeHandlerMap.set(e,t),this}trigger(e,t,s="change"){var i;if(!0===this.triggerDisabled)return;const r=this.getType(t);if(!r)return;if("change"===s&&this.typeLockMap.get(r))return this.typeLockMap.set(r,0);const a="change"===s?this.changeHandlerMap:null;a&&(null==(i=a.get(r))||i.call(this,e))}}function g(){function e(){var e;const t=this.getField(n.BIRTHDAY);return null!=(e=null==t?void 0:t.date_format)?e:"yyyy-MM-dd HH:mm"}function t(t){const r=this.getValueByType(t,n.ID_CARD);if(!r||!s(r)||!l(r))return;const a=o(r),{age:h,ageUnit:y}=u(a);this.setValueByType(t,n.AGE_UNIT,y,n.ID_CARD),this.setValueByType(t,n.AGE,h,n.ID_CARD),this.setValueByType(t,n.SEX,a.sex,n.ID_CARD),this.setValueByType(t,n.BIRTHDAY,i(new Date(a.birthday),e.call(this)),n.ID_CARD)}function r(e){const t=this.getValueByType(e,n.BIRTHDAY);if(!s(t))return;const{age:i,ageUnit:r}=u(h(t));this.setValueByType(e,n.AGE_UNIT,r,n.BIRTHDAY),this.setValueByType(e,n.AGE,i,n.BIRTHDAY)}function g(t){return function(i){const r=this.getValueByType(i,n.AGE),l=this.getValueByType(i,n.AGE_UNIT);(s(r)||a(r))&&""!==r&&s(l)&&""!==l&&this.setValueByType(i,n.BIRTHDAY,y(+r,l,e.call(this)),t)}}return{create:function(e){return new c(e).registerChangeBusiness(n.ID_CARD,t).registerChangeBusiness(n.AGE_UNIT,g(n.AGE_UNIT)).registerChangeBusiness(n.AGE,g(n.AGE)).registerChangeBusiness(n.BIRTHDAY,r)}}}export{c as BusinessCollector,g as useBusinessBinding};
@@ -1,4 +1,4 @@
1
- import { AnyFn } from '../../../../../es/shared/types';
1
+ import { AnyFn } from '../../../../shared/types';
2
2
  import { WatchSource } from '@vue/runtime-core';
3
3
  export declare function useCommonInjection(): {
4
4
  injectValueValidate: (traverser: WatchSource) => void;
@@ -1,7 +1,7 @@
1
- import { AnyObject } from '../../../../../es/shared/types';
1
+ import { AnyObject } from '../../../../shared/types';
2
2
  import { Path } from '@formily/path';
3
3
  import { Ref } from 'vue';
4
- import { FormOptionItem } from '../../../../../es/components/form-render';
4
+ import { FormOptionItem } from '../../../../components/form-render';
5
5
  declare function setSpan(uuid: string, address: Path | string, span?: number): void;
6
6
  declare function getSpan(uuid: string, address: Path | string, withSelf?: boolean): number;
7
7
  declare function deleteSpan(uuid: string, address: Path | string): void;
@@ -1,4 +1,4 @@
1
- import { BusinessCollector, FormRenderProps, FormRenderLifeCycle } from '../../../../../es/components/form-render';
1
+ import { BusinessCollector, FormRenderProps, FormRenderLifeCycle } from '../../../../components/form-render';
2
2
  import { FieldItem } from '../types';
3
3
  /**
4
4
  * @description 胶水层, 将低代码平台中的fieldList转换为JSONSchema
@@ -1,9 +1,9 @@
1
- import { SyncWaterfallHook } from '../../../../../es/shared/utils/tapable';
1
+ import { SyncWaterfallHook } from '../../../../shared/utils/tapable';
2
2
  import { FieldItem } from '../types';
3
3
  export declare function useFieldNormalize(): {
4
4
  FieldNormalizeWaterfallHook: SyncWaterfallHook<[FieldItem, Partial<{
5
5
  fieldList: FieldItem[];
6
- initialData: import("../../../../../es/shared/types").AnyObject;
6
+ initialData: import("../../../../shared/types").AnyObject;
7
7
  fieldVisitor: import("../types").FieldVisitor;
8
8
  column: number;
9
9
  maxHeight: string | number;
@@ -67,8 +67,8 @@ export declare function useFieldNormalize(): {
67
67
  "x-compile-omitted"?: string[] | undefined;
68
68
  }>;
69
69
  components: Record<string, import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | import("vue").FunctionalComponent<{}, {}>>;
70
- scope: import("../../../../../es/shared/types").AnyObject;
71
- annotation: import("../../../../../es/shared/types").AnyObject;
70
+ scope: import("../../../../shared/types").AnyObject;
71
+ annotation: import("../../../../shared/types").AnyObject;
72
72
  consumer: boolean;
73
73
  uuid: string;
74
74
  lifeCycle: Partial<{
@@ -77,24 +77,24 @@ export declare function useFieldNormalize(): {
77
77
  field: import("@formily/core").GeneralField;
78
78
  oldValue: unknown;
79
79
  }): any;
80
- beforeRequest(fieldKey: string, params?: import("../../../../../es/shared/types").AnyObject | undefined, payload?: import("../../../../../es/shared/types").AnyObject | undefined): void | import("../../../../../es/shared/types").UndefinedAble<import("../../../../../es/shared/types").AnyObject>;
81
- afterRequest(fieldKey: string, res?: any, payload?: import("../../../../../es/shared/types").AnyObject | undefined): import("../../../../../es/shared/types").AnyObject[];
82
- afterOptionInit(fieldKey: string, options: import("../../../../../es/shared/types").AnyObject[], payload?: import("../../../../../es/shared/types").AnyObject | undefined): void;
80
+ beforeRequest(fieldKey: string, params?: import("../../../../shared/types").AnyObject | undefined, payload?: import("../../../../shared/types").AnyObject | undefined): void | import("../../../../shared/types").UndefinedAble<import("../../../../shared/types").AnyObject>;
81
+ afterRequest(fieldKey: string, res?: any, payload?: import("../../../../shared/types").AnyObject | undefined): import("../../../../shared/types").AnyObject[];
82
+ afterOptionInit(fieldKey: string, options: import("../../../../shared/types").AnyObject[], payload?: import("../../../../shared/types").AnyObject | undefined): void;
83
83
  }>;
84
84
  businessFormatter: import("../types").FormBusinessFormatter;
85
85
  requestInstance: import("../../..").FormRequestDefine.RequestInstance;
86
86
  enterToNextWidget: boolean | ((fieldItem: FieldItem) => boolean | void);
87
- lowCodeReactions: import("../../../../../es/shared/types").LowCodeTypes.reactionsConfig[];
87
+ lowCodeReactions: import("../../../../shared/types").LowCodeTypes.reactionsConfig[];
88
88
  linebarAutoHidden: boolean;
89
89
  bordered: string | boolean;
90
90
  uniqueCacheData: boolean;
91
- operationalForm: import("../../../../../es/shared/types").LowCodeTypes.operationalConfig[];
91
+ operationalForm: import("../../../../shared/types").LowCodeTypes.operationalConfig[];
92
92
  outBordered: boolean;
93
93
  forceClearable: boolean;
94
- }>], import("../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
94
+ }>], import("../../../../shared/utils/tapable").UnsetAdditionalOptions>;
95
95
  FieldListNormalizeWaterfallHook: SyncWaterfallHook<[FieldItem[], Partial<{
96
96
  fieldList: FieldItem[];
97
- initialData: import("../../../../../es/shared/types").AnyObject;
97
+ initialData: import("../../../../shared/types").AnyObject;
98
98
  fieldVisitor: import("../types").FieldVisitor;
99
99
  column: number;
100
100
  maxHeight: string | number;
@@ -158,8 +158,8 @@ export declare function useFieldNormalize(): {
158
158
  "x-compile-omitted"?: string[] | undefined;
159
159
  }>;
160
160
  components: Record<string, import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | import("vue").FunctionalComponent<{}, {}>>;
161
- scope: import("../../../../../es/shared/types").AnyObject;
162
- annotation: import("../../../../../es/shared/types").AnyObject;
161
+ scope: import("../../../../shared/types").AnyObject;
162
+ annotation: import("../../../../shared/types").AnyObject;
163
163
  consumer: boolean;
164
164
  uuid: string;
165
165
  lifeCycle: Partial<{
@@ -168,19 +168,19 @@ export declare function useFieldNormalize(): {
168
168
  field: import("@formily/core").GeneralField;
169
169
  oldValue: unknown;
170
170
  }): any;
171
- beforeRequest(fieldKey: string, params?: import("../../../../../es/shared/types").AnyObject | undefined, payload?: import("../../../../../es/shared/types").AnyObject | undefined): void | import("../../../../../es/shared/types").UndefinedAble<import("../../../../../es/shared/types").AnyObject>;
172
- afterRequest(fieldKey: string, res?: any, payload?: import("../../../../../es/shared/types").AnyObject | undefined): import("../../../../../es/shared/types").AnyObject[];
173
- afterOptionInit(fieldKey: string, options: import("../../../../../es/shared/types").AnyObject[], payload?: import("../../../../../es/shared/types").AnyObject | undefined): void;
171
+ beforeRequest(fieldKey: string, params?: import("../../../../shared/types").AnyObject | undefined, payload?: import("../../../../shared/types").AnyObject | undefined): void | import("../../../../shared/types").UndefinedAble<import("../../../../shared/types").AnyObject>;
172
+ afterRequest(fieldKey: string, res?: any, payload?: import("../../../../shared/types").AnyObject | undefined): import("../../../../shared/types").AnyObject[];
173
+ afterOptionInit(fieldKey: string, options: import("../../../../shared/types").AnyObject[], payload?: import("../../../../shared/types").AnyObject | undefined): void;
174
174
  }>;
175
175
  businessFormatter: import("../types").FormBusinessFormatter;
176
176
  requestInstance: import("../../..").FormRequestDefine.RequestInstance;
177
177
  enterToNextWidget: boolean | ((fieldItem: FieldItem) => boolean | void);
178
- lowCodeReactions: import("../../../../../es/shared/types").LowCodeTypes.reactionsConfig[];
178
+ lowCodeReactions: import("../../../../shared/types").LowCodeTypes.reactionsConfig[];
179
179
  linebarAutoHidden: boolean;
180
180
  bordered: string | boolean;
181
181
  uniqueCacheData: boolean;
182
- operationalForm: import("../../../../../es/shared/types").LowCodeTypes.operationalConfig[];
182
+ operationalForm: import("../../../../shared/types").LowCodeTypes.operationalConfig[];
183
183
  outBordered: boolean;
184
184
  forceClearable: boolean;
185
- }>], import("../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
185
+ }>], import("../../../../shared/utils/tapable").UnsetAdditionalOptions>;
186
186
  };
@@ -1 +1 @@
1
- import{arrayed as r}from"../../../../shared/utils/index.js";import{isFunction as e}from"@vueuse/core";function i(){return{traverse:function i(t,n,s="val_key"){return n?t.reduce(((t,o)=>{Array.isArray(o.children)&&(o.children=i(o.children,n,s)),Array.isArray(o.properties)&&(o.properties=i(o.properties,n,s)),o.suffixConfig&&(o.suffixConfig=i(r(o.suffixConfig),n,s));const f=Object.keys(n).find((r=>function(r,e){return r.split("|").some((r=>r.trim()===e))}(r,o[s]))),u=f&&n[f];let c=o;const p=[],a=[];return e(u)&&u({field:o,replace(r){c=r},insertBefore(e){p.push(...r(e))},insertAfter(e){a.push(...r(e))}}),t.concat([...p,c,...a])}),[]):t}}}export{i as useFieldVisitor};
1
+ import{arrayed as r}from"../../../../shared/utils/index.js";import{isFunction as e}from"@vueuse/core";function i(){return{traverse:function i(t,n,s="val_key"){return n?t.reduce(((t,o)=>{Array.isArray(o.children)&&(o.children=i(o.children,n,s)),Array.isArray(o.properties)&&(o.properties=i(o.properties,n,s)),o.suffixConfig&&(o.suffixConfig=i(r(o.suffixConfig),n,s));const f=Object.keys(n).filter((r=>function(r,e){return"*"===r||r.split("|").some((r=>r.trim()===e))}(r,o[s]))),u=f.length&&f.map((r=>n[r]));let c=o;const p=[],a=[];return u&&u.forEach((i=>{e(i)&&i({field:o,replace(r){c=r},insertBefore(e){p.push(...r(e))},insertAfter(e){a.push(...r(e))}})})),t.concat([...p,c,...a])}),[]):t}}}export{i as useFieldVisitor};
@@ -1,8 +1,8 @@
1
- import { AnyFn } from '../../../../../es/shared/types';
1
+ import { AnyFn } from '../../../../shared/types';
2
2
  import { ShallowReactive } from 'vue';
3
- import { FormRenderProps } from '../../../../../es/components/form-render';
3
+ import { FormRenderProps } from '../../../../components/form-render';
4
4
  export declare function useFormContext(props: ShallowReactive<FormRenderProps>, emit: AnyFn): {
5
- asyncQueue: import("../../../../../es/shared/hooks").AsyncQueue<import("../../../../../es/shared/hooks").FormRequestDefine.AsyncQueueItem, any, {
5
+ asyncQueue: import("../../../../shared/hooks").AsyncQueue<import("../../../../shared/hooks").FormRequestDefine.AsyncQueueItem, any, {
6
6
  label: string;
7
7
  value: unknown;
8
8
  }[]>;
@@ -17,8 +17,8 @@ export declare function useFormContext(props: ShallowReactive<FormRenderProps>,
17
17
  mapProperties: any;
18
18
  filterProperties: any;
19
19
  }>;
20
- businessCollector: import("../../../../../es/components/form-render").BusinessCollector;
21
- changeContextCollector: import("../../../../../es/components/form-render").ContextCollector;
22
- formItemDepsCollector: import("../../../../../es/components/form-render").FormItemDepsCollector;
20
+ businessCollector: import("../../../../components/form-render").BusinessCollector;
21
+ changeContextCollector: import("../../../../components/form-render").ContextCollector;
22
+ formItemDepsCollector: import("../../../../components/form-render").FormItemDepsCollector;
23
23
  formUUID: string;
24
24
  };
@@ -1,19 +1,30 @@
1
- import { AnyObject } from '../../../../../es/shared/types';
1
+ import { AnyObject } from '../../../../shared/types';
2
2
  import { Field, Form, IFieldState } from '@formily/core';
3
3
  import { Ref } from 'vue';
4
- import { FieldItem, FormItemDepsCollector, FormRenderProps } from '../../../../../es/components/form-render';
5
- export declare function useFormExposeEvent({ formModel, formRenderRef, formUUID, getFieldList, formItemDepsCollector }: {
4
+ import { BusinessCollector, FieldItem, FormItemDepsCollector, FormRenderProps, useOperationalForm } from '../../../../components/form-render';
5
+ import { wordbookSettingHandler } from '../../../../components/form-render/src/hooks';
6
+ export declare function useFormExposeEvent({ formModel, formRenderRef, formUUID, getFieldList, formItemDepsCollector, businessCollector, wordbookSettingHandler, operationalFormHandler }: {
6
7
  formModel: Form;
7
8
  formRenderRef: Ref<HTMLElement | undefined>;
8
9
  formUUID: string;
9
10
  getFieldList: () => FieldItem[];
10
11
  formItemDepsCollector: FormItemDepsCollector;
12
+ businessCollector: BusinessCollector;
13
+ wordbookSettingHandler: wordbookSettingHandler;
14
+ operationalFormHandler: ReturnType<typeof useOperationalForm>;
11
15
  }): {
12
16
  validate(path?: string | ((field: Field) => boolean), { force }?: {
13
17
  force?: boolean | undefined;
14
18
  }): Promise<void>;
15
19
  getFormValues(needCombineExtendKey?: boolean): any;
16
- setFormValues(values: AnyObject, needSplitExtendKey?: boolean, overwrite?: boolean): void;
20
+ setFormValues(values: AnyObject, options?: boolean | {
21
+ needSplitExtendKey?: boolean | undefined;
22
+ avoidBusinessConnection?: string | boolean | undefined;
23
+ avoidDependKeyConnection?: string | boolean | undefined;
24
+ avoidWordbookSettingConnection?: string | boolean | undefined;
25
+ avoidOperationalFormConnection?: string | boolean | undefined;
26
+ overwrite?: boolean | undefined;
27
+ }, avoidBusinessConnection?: string | boolean, overwrite?: boolean): Promise<void>;
17
28
  setFieldState(path: string, setter: (field: IFieldState) => void): void;
18
29
  resetFields(path?: string): Promise<void>;
19
30
  queryWidget(key: string): Promise<{
@@ -1 +1 @@
1
- import{arrayed as e,findAncestor as t}from"../../../../shared/utils/index.js";import{isField as r}from"@formily/core";import{Path as o}from"@formily/path";import{isObject as i}from"@vue/shared";import{promiseTimeout as n}from"@vueuse/shared";import{isFunction as s,isArray as a,isString as f}from"lodash-es";import{nextTick as m}from"vue";import"../../index.js";import{FormItemLineBarDepKeyPrepend as l,NESTED_FORM_ITEM_TYPE as u}from"../constants/index.js";import{queryDecoratorByAddress as d,queryInput as c,queryDecoratorByFieldKey as p,findNextWidget as g}from"../utils/dom.js";import{validateMessageParser as h,combineExtendKey as v,splitExtendKey as y}from"../utils/index.js";import{getParentLinebar as x}from"../utils/schema.js";function I({formModel:t,formRenderRef:n,formUUID:u,getFieldList:g,formItemDepsCollector:I}){return{validate(o="*",{force:m}={}){if(s(o)){const e=Object.entries(t.fields).reduce(((e,[t,r])=>(o(r)&&e.push(t),e)),[]);if(!e.length)return Promise.resolve();o=e.length?`*(${e.join(",")})`:"*"}const l=[];m&&t.setFieldState(o,(e=>{"visible"===e.display&&"editable"!==e.pattern&&r(e)&&(l.push({pattern:e.pattern,state:e}),e.pattern="editable")}));const p=t.validate(o).catch((e=>Promise.reject(Array.isArray(e)?e.reduce(g,[]):e)));return m&&l.forEach((({pattern:e,state:t})=>t.pattern=e)),p;function g(t,r){if(!i(r))return t;let o=!1;return a(r.messages)&&r.messages.forEach((r=>{i(r)&&(t.push(...e(r).map(v)),o=!0)})),!o&&t.push(v(r)),t}function v(e){if(e.decoratorElement)return e;const r=t.query(e.path),o=r.get("title"),s=e.messages.map((e=>function(e,t){if(!t||!i(t.fieldItem))return e;const r=t.fieldItem.defined_error_msg;return h(r&&f(r)?r:e,t.fieldItem)}(e,r.get("decoratorProps")))),a=d(e.address,n.value,u);return{...e,messages:s,title:o,decoratorElement:a,...c(a)}}},getFormValues(e=!0){let r=t.getFormState().values;return e&&(r=v(g(),r)),r},setFormValues(e,i=!0,n=!0){i&&(e=y(g(),e)),t.setFieldState("*",(t=>{r(t)&&(n||o.existIn(e,t.path))&&(t.value=o.getIn(e,t.path))}))},setFieldState(e,r){t.setFieldState(e,r)},resetFields:(e="*")=>t.reset(e),queryWidget:async e=>n.value?await async function(e,t,r){if(!n.value)return s();const o=p(e,t,u);if(o)return s(o);const i=x(e,r);return i?(I.trigger(l+i,!0),await m(),s(p(e,t,u))):s();function s(e){return{decoratorElement:e,...c(e)}}}(e,n.value,g()):null}}function j({props:e,formRenderRef:r,formModel:o}){return{onKeydown:async function i(a){var f;if(e.enterToNextWidget&&a.target){if("TEXTAREA"===a.target.tagName&&!a.ctrlKey)return;a.preventDefault()}if(await n(0),Reflect.get(a,"stopCapture")||!e.enterToNextWidget||!r.value)return;const m=t(a.target,(e=>e.classList.contains("form-render__formItem")));if(!m)return;const l=`.form-render__formItem${u.map((e=>`:not([widget-type=${e}])`)).join("")}`,d=Array.from(r.value.querySelectorAll(l)),c=d.findIndex((e=>e.id===m.id));if(!~c)return;const{widget:p,field:h}=g(d,c,a.target);if(p)if(s(e.enterToNextWidget)){const t=h&&o.query(h).take();!t||e.enterToNextWidget(null==(f=t.decoratorProps)?void 0:f.fieldItem)?v():i({target:p})}else v();async function v(){await n(0),p.focus()}}}}export{j as useFormDomEvent,I as useFormExposeEvent};
1
+ import{arrayed as e,findAncestor as t}from"../../../../shared/utils/index.js";import{isField as r}from"@formily/core";import{Path as o}from"@formily/path";import{isObject as i}from"@vue/shared";import{promiseTimeout as n}from"@vueuse/shared";import{isFunction as a,isArray as s,isString as l,isBoolean as d}from"lodash-es";import{nextTick as u}from"vue";import"../../index.js";import{NESTED_FORM_ITEM_TYPE as m}from"../constants/index.js";import{queryDecoratorByAddress as f,queryInput as c,queryDecoratorByFieldKey as g,findNextWidget as p}from"../utils/dom.js";import{validateMessageParser as v,combineExtendKey as y,splitExtendKey as h}from"../utils/index.js";import{getParentLinebar as b}from"../utils/schema.js";function x({formModel:t,formRenderRef:n,formUUID:m,getFieldList:p,formItemDepsCollector:x,businessCollector:D,wordbookSettingHandler:F,operationalFormHandler:I}){return{validate(o="*",{force:d}={}){if(a(o)){const e=Object.entries(t.fields).reduce(((e,[t,r])=>(o(r)&&e.push(t),e)),[]);if(!e.length)return Promise.resolve();o=e.length?`*(${e.join(",")})`:"*"}const u=[];d&&t.setFieldState(o,(e=>{"visible"===e.display&&"editable"!==e.pattern&&r(e)&&(u.push({pattern:e.pattern,state:e}),e.pattern="editable")}));const g=t.validate(o).catch((e=>Promise.reject(Array.isArray(e)?e.reduce(p,[]):e)));return d&&u.forEach((({pattern:e,state:t})=>t.pattern=e)),g;function p(t,r){if(!i(r))return t;let o=!1;return s(r.messages)&&r.messages.forEach((r=>{i(r)&&(t.push(...e(r).map(y)),o=!0)})),!o&&t.push(y(r)),t}function y(e){if(e.decoratorElement)return e;const r=t.query(e.path),o=r.get("title"),a=e.messages.map((e=>function(e,t){if(!t||!i(t.fieldItem))return e;const r=t.fieldItem.defined_error_msg;return v(r&&l(r)?r:e,t.fieldItem)}(e,r.get("decoratorProps")))),s=f(e.address,n.value,m);return{...e,messages:a,title:o,decoratorElement:s,...c(s)}}},getFormValues(e=!0){let r=t.getFormState().values;return e&&(r=y(p(),r)),r},async setFormValues(e,n={},a=!1,s=!0){var l,m,f,c,g,v;let y=!0,b=!0,j=!0,w=!0;i(n)?(b=null==(l=n.needSplitExtendKey)||l,y=null==(m=n.avoidDependKeyConnection)||m,a=null!=(f=n.avoidBusinessConnection)&&f,j=null==(c=n.avoidWordbookSettingConnection)||c,w=null==(g=n.avoidOperationalFormConnection)||g,s=null==(v=n.overwrite)||v):d(n)&&(b=n),D.triggerDisabled=a,x.triggerDisabled=y,F.triggerDisabled=j,I.triggerDisabled=w,b&&(e=h(p(),e)),t.setFieldState("*",(t=>{r(t)&&(s||o.existIn(e,t.path))&&(t.value=o.getIn(e,t.path))})),await u(),D.triggerDisabled=!1,x.triggerDisabled=!1,F.triggerDisabled=!1,I.triggerDisabled=!1},setFieldState(e,r){t.setFieldState(e,r)},resetFields:(e="*")=>t.reset(e),queryWidget:async e=>n.value?await async function(e,t,r){if(!n.value)return s();const i=g(e,t,m);if(i)return s(i);const a=b(e,r);return a?(x.trigger(o.parse(a),!0),await u(),s(g(e,t,m))):s();function s(e){return{decoratorElement:e,...c(e)}}}(e,n.value,p()):null}}function D({props:e,formRenderRef:r,formModel:o}){return{onKeydown:async function i(s){var l;if(e.enterToNextWidget&&s.target){if("TEXTAREA"===s.target.tagName&&!s.ctrlKey)return;s.preventDefault()}if(await n(0),Reflect.get(s,"stopCapture")||!e.enterToNextWidget||!r.value)return;const d=t(s.target,(e=>e.classList.contains("form-render__formItem")));if(!d)return;const u=`.form-render__formItem${m.map((e=>`:not([widget-type=${e}])`)).join("")}`,f=Array.from(r.value.querySelectorAll(u)),c=f.findIndex((e=>e.id===d.id));if(!~c)return;const{widget:g,field:v}=p(f,c,s.target);if(g)if(a(e.enterToNextWidget)){const t=v&&o.query(v).take();!t||e.enterToNextWidget(null==(l=t.decoratorProps)?void 0:l.fieldItem)?y():i({target:g})}else y();async function y(){await n(0),g.focus()}}}}export{D as useFormDomEvent,x as useFormExposeEvent};
@@ -1,11 +1,11 @@
1
- import { AnyFn } from '../../../../../es/shared/types';
2
- import { DependKeyType } from '../../../../../es/components/form-render';
1
+ import { AnyFn } from '../../../../shared/types';
2
+ import { Path } from '@formily/path';
3
+ import { DependKeyType } from '../../../../components/form-render';
3
4
  export declare class FormItemDepsCollector {
4
- triggerDisabled: boolean;
5
+ triggerDisabled: string | boolean;
5
6
  private readonly collector;
6
- setDeps(key: string, dependKeys: DependKeyType, callback: AnyFn): void;
7
- getDeps(dependKey: string): Map<string, AnyFn<any[], any>> | undefined;
8
- trigger(dependKey: string, payload?: unknown): void;
7
+ setDeps(fieldPath: Path, dependKeys: DependKeyType, callback: AnyFn): void;
8
+ trigger(dependPath: Path, payload?: unknown): void;
9
9
  }
10
10
  export declare function useFormItemDeps(): {
11
11
  create: () => FormItemDepsCollector;
@@ -1 +1 @@
1
- import{isFunction as t}from"lodash-es";import"vue";import"../../../../shared/utils/index.js";import"@formily/core";import"@formily/path";import"@vicons/ionicons5";import"@vue/shared";import"@vueuse/core";import"naive-ui";import"../../index.js";import"date-fns";import{traverseDependKey as e}from"../utils/schema.js";class r{constructor(){this.triggerDisabled=!1,this.collector=new Map}setDeps(t,r,i){e(r,(e=>{const r=this.collector.get(e)||new Map;r.set(t,i),this.collector.set(e,r)}))}getDeps(t){return this.collector.get(t)}trigger(e,r){var i;this.triggerDisabled||null==(i=this.getDeps(e))||i.forEach((e=>t(e)&&e(r)))}}function i(){return{create:function(){return new r}}}export{r as FormItemDepsCollector,i as useFormItemDeps};
1
+ import{Path as t}from"@formily/path";import{isFunction as r,isString as e}from"lodash-es";import"../../index.js";import{getAbsoluteKey as i}from"../utils/index.js";import{traverseDependKey as s}from"../utils/schema.js";class o{constructor(){this.triggerDisabled=!1,this.collector=new Map}setDeps(t,r,e){s(r,(r=>{const s=i(r,t),o=this.collector.get(s)||new Map;o.set(t,e),this.collector.set(s,o)}))}trigger(i,s){if(!0===this.triggerDisabled)return;const o=this.collector.get(i.toString());o&&[...o.entries()].forEach((([i,o])=>{!r(o)||this.triggerDisabled&&e(this.triggerDisabled)&&t.parse(this.triggerDisabled).match(i)||o(s)}))}}function c(){return{create:function(){return new o}}}export{o as FormItemDepsCollector,c as useFormItemDeps};