cnhis-design-vue 3.1.57-beta.3 → 3.1.57-beta.32

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 (259) hide show
  1. package/README.md +87 -87
  2. package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
  3. package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +1 -0
  4. package/es/components/bpmn-workflow/types/ModelingModule.d.ts +1 -0
  5. package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +1 -0
  6. package/es/components/button-print/index.d.ts +8 -8
  7. package/es/components/button-print/src/ButtonPrint.vue.d.ts +8 -8
  8. package/es/components/button-print/src/ButtonPrint.vue2.js +1 -1
  9. package/es/components/button-print/src/components/EditFormat.vue.d.ts +3 -3
  10. package/es/components/button-print/src/components/IdentityVerification.vue.d.ts +7 -7
  11. package/es/components/button-print/style/index.css +1 -1
  12. package/es/components/calendar/index.d.ts +277 -0
  13. package/es/components/calendar/index.js +1 -0
  14. package/es/components/calendar/src/Calendar.vue.d.ts +266 -0
  15. package/es/components/calendar/src/Calendar.vue.js +1 -0
  16. package/es/components/calendar/src/Calendar.vue2.js +1 -0
  17. package/es/components/calendar/src/types/index.d.ts +6 -0
  18. package/es/components/calendar/src/types/index.js +1 -0
  19. package/es/components/calendar/style/index.css +1 -0
  20. package/es/components/callback/src/components/render/popupMaps.d.ts +259 -224
  21. package/es/components/classification/index.d.ts +3 -3
  22. package/es/components/classification/src/components/search-filter/index.vue.d.ts +3 -3
  23. package/es/components/classification/src/components/set-classification/index.vue.d.ts +3 -3
  24. package/es/components/classification/src/index.vue.d.ts +6 -3
  25. package/es/components/date-picker/index.d.ts +1 -1
  26. package/es/components/date-picker/src/DatePicker.vue.d.ts +1 -1
  27. package/es/components/date-picker/src/DatePicker.vue2.js +1 -1
  28. package/es/components/drag-scroll/index.d.ts +2 -0
  29. package/es/components/drag-scroll/index.js +1 -0
  30. package/es/components/drag-scroll/src/index.d.ts +4 -0
  31. package/es/components/drag-scroll/src/index.js +1 -0
  32. package/es/components/drag-scroll/src/types.d.ts +19 -0
  33. package/es/components/drag-scroll/src/types.js +1 -0
  34. package/es/components/expand-field/index.d.ts +3 -3
  35. package/es/components/expand-field/src/components/form.vue.d.ts +3 -3
  36. package/es/components/expand-field/src/components/form.vue2.js +1 -1
  37. package/es/components/expand-field/src/index.vue.d.ts +3 -3
  38. package/es/components/fabric-chart/index.d.ts +4 -2
  39. package/es/components/fabric-chart/src/FabricChart.vue.d.ts +4 -2
  40. package/es/components/fabric-chart/src/FabricChart.vue2.js +1 -1
  41. package/es/components/fabric-chart/src/components/PopupMenu.js +1 -1
  42. package/es/components/fabric-chart/src/constants/index.d.ts +2 -1
  43. package/es/components/fabric-chart/src/constants/index.js +1 -1
  44. package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +1 -1
  45. package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogram.js +1 -1
  46. package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogramChart.js +1 -1
  47. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.js +1 -1
  48. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useLeft.js +1 -1
  49. package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
  50. package/es/components/fabric-chart/src/hooks/temperature/useOther.d.ts +1 -1
  51. package/es/components/fabric-chart/src/hooks/temperature/useOther.js +1 -1
  52. package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +1 -1
  53. package/es/components/fabric-chart/src/interface.d.ts +4 -3
  54. package/es/components/field-set/index.d.ts +107 -616
  55. package/es/components/field-set/index.js +1 -1
  56. package/es/components/field-set/src/FieldColor.vue.d.ts +1680 -0
  57. package/es/components/field-set/src/FieldColor.vue.js +1 -0
  58. package/es/components/field-set/src/FieldColor.vue2.js +1 -0
  59. package/es/components/field-set/src/FieldSet.vue.d.ts +58 -16
  60. package/es/components/field-set/src/FieldSet.vue2.js +1 -1
  61. package/es/components/field-set/src/Index.vue.d.ts +141 -0
  62. package/es/components/field-set/src/Index.vue.js +1 -0
  63. package/es/components/field-set/src/Index.vue2.js +1 -0
  64. package/es/components/field-set/src/components/Row.vue.d.ts +50 -9
  65. package/es/components/field-set/src/components/Row.vue2.js +1 -1
  66. package/es/components/field-set/src/components/condition.vue.d.ts +172 -0
  67. package/es/components/field-set/src/components/condition.vue.js +1 -0
  68. package/es/components/field-set/src/components/condition.vue2.js +1 -0
  69. package/es/components/field-set/src/components/edit-dialog.vue.d.ts +1194 -0
  70. package/es/components/field-set/src/components/edit-dialog.vue.js +1 -0
  71. package/es/components/field-set/src/components/edit-dialog.vue2.js +1 -0
  72. package/es/components/field-set/src/components/edit-filter.vue.d.ts +286 -0
  73. package/es/components/field-set/src/components/edit-filter.vue.js +1 -0
  74. package/es/components/field-set/src/components/edit-filter.vue2.js +1 -0
  75. package/es/components/field-set/src/constants/index.d.ts +55 -0
  76. package/es/components/field-set/src/constants/index.js +1 -0
  77. package/es/components/field-set/src/types/index.d.ts +31 -1
  78. package/es/components/field-set/src/utils/index.d.ts +2 -1
  79. package/es/components/field-set/src/utils/index.js +1 -1
  80. package/es/components/field-set/style/index.css +1 -1
  81. package/es/components/form-config/index.d.ts +89 -30
  82. package/es/components/form-config/src/FormConfig.vue.d.ts +89 -30
  83. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +31 -8
  84. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +40 -11
  85. package/es/components/form-config/src/components/FormConfigEventSetting.vue.d.ts +8 -8
  86. package/es/components/form-config/src/constants/index.d.ts +1 -1
  87. package/es/components/form-config/src/types/index.d.ts +2 -2
  88. package/es/components/form-render/index.d.ts +31 -8
  89. package/es/components/form-render/index.js +1 -1
  90. package/es/components/form-render/src/FormRender.vue.d.ts +31 -8
  91. package/es/components/form-render/src/FormRender.vue2.js +1 -1
  92. package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +31 -8
  93. package/es/components/form-render/src/components/renderer/combination/combination.d.ts +12 -0
  94. package/es/components/form-render/src/components/renderer/combination/combination.js +1 -1
  95. package/es/components/form-render/src/components/renderer/combination/hooks/useCombination.d.ts +1 -1
  96. package/es/components/form-render/src/components/renderer/combination/hooks/useCombination.js +1 -1
  97. package/es/components/form-render/src/components/renderer/combination/jsonCombination.d.ts +12 -0
  98. package/es/components/form-render/src/components/renderer/combination/jsonCombination.js +1 -1
  99. package/es/components/form-render/src/components/renderer/select.d.ts +2 -0
  100. package/es/components/form-render/src/components/renderer/select.js +1 -1
  101. package/es/components/form-render/src/components/renderer/switch.js +1 -1
  102. package/es/components/form-render/src/hooks/index.d.ts +1 -0
  103. package/es/components/form-render/src/hooks/index.js +1 -1
  104. package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
  105. package/es/components/form-render/src/hooks/useFieldNormalize.d.ts +4 -2
  106. package/es/components/form-render/src/hooks/useFormRenderOptions.js +1 -1
  107. package/es/components/form-render/src/hooks/useLowCodeReactions.d.ts +1 -1
  108. package/es/components/form-render/src/hooks/useNewLowCodeReactions.d.ts +6 -0
  109. package/es/components/form-render/src/hooks/useNewLowCodeReactions.js +1 -0
  110. package/es/components/form-render/src/types/fieldItem.d.ts +1 -0
  111. package/es/components/form-render/src/types/index.d.ts +2 -1
  112. package/es/components/guide/src/renderer.d.ts +2 -2
  113. package/es/components/iho-table/index.d.ts +228 -216
  114. package/es/components/iho-table/src/IhoTable.vue.d.ts +228 -216
  115. package/es/components/iho-table/src/IhoTable.vue2.js +1 -1
  116. package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +1 -5
  117. package/es/components/iho-table/src/hooks/tapHooks/index.js +1 -1
  118. package/es/components/iho-table/src/hooks/tapHooks/useDataHooks.d.ts +2 -1
  119. package/es/components/iho-table/src/hooks/tapHooks/useDataHooks.js +1 -1
  120. package/es/components/iho-table/src/plugins/{bindEventSettingPlugin/index.d.ts → bindEventSettingPlugin.d.ts} +1 -1
  121. package/es/components/iho-table/src/plugins/bindEventSettingPlugin.js +1 -0
  122. package/es/components/iho-table/src/plugins/{defaultConfigPlugin/index.d.ts → defaultConfigPlugin.d.ts} +1 -1
  123. package/es/components/iho-table/src/plugins/defaultConfigPlugin.js +1 -0
  124. package/es/components/iho-table/src/plugins/dragScrollPlugin.d.ts +1 -0
  125. package/es/components/iho-table/src/plugins/dragScrollPlugin.js +1 -0
  126. package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/filter.vue.d.ts +1 -1
  127. package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue.d.ts +4 -2
  128. package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue2.js +1 -1
  129. package/es/components/iho-table/src/plugins/headerPlugin.js +1 -1
  130. package/es/components/iho-table/src/plugins/index.js +1 -1
  131. package/es/components/iho-table/src/plugins/{keyboardEventPlugin/index.d.ts → keyboardEventPlugin.d.ts} +1 -1
  132. package/es/components/iho-table/src/plugins/keyboardEventPlugin.js +1 -0
  133. package/es/components/iho-table/src/plugins/{lowCodeFieldAdaptorPlugin/index.d.ts → lowCodeFieldAdaptorPlugin.d.ts} +1 -1
  134. package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin.js +1 -0
  135. package/es/components/iho-table/src/plugins/{operationalFormPlugin/index.d.ts → operationalFormPlugin.d.ts} +1 -1
  136. package/es/components/iho-table/src/plugins/operationalFormPlugin.js +1 -0
  137. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +32 -2
  138. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue2.js +1 -1
  139. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/index.js +1 -1
  140. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/index.js +1 -1
  141. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.js +1 -1
  142. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +1 -1
  143. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +1 -1
  144. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.d.ts +1 -1
  145. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue2.js +1 -1
  146. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/index.js +1 -1
  147. package/es/components/iho-table/src/plugins/rowClickPlugin.d.ts +1 -0
  148. package/es/components/iho-table/src/plugins/rowClickPlugin.js +1 -0
  149. package/es/components/iho-table/src/plugins/rowDragPlugin.d.ts +1 -0
  150. package/es/components/iho-table/src/plugins/rowDragPlugin.js +1 -0
  151. package/es/components/iho-table/src/plugins/{varialbleHeightPlugin/index.d.ts → varialbleHeightPlugin.d.ts} +1 -1
  152. package/es/components/iho-table/src/plugins/varialbleHeightPlugin.js +1 -0
  153. package/es/components/iho-table/src/plugins/verticalTablePlugin/constants.d.ts +1 -0
  154. package/es/components/iho-table/src/plugins/verticalTablePlugin/constants.js +1 -0
  155. package/es/components/iho-table/src/plugins/verticalTablePlugin/index.d.ts +1 -0
  156. package/es/components/iho-table/src/plugins/verticalTablePlugin/index.js +1 -0
  157. package/es/components/iho-table/src/plugins/verticalTablePlugin/renderer.d.ts +3 -0
  158. package/es/components/iho-table/src/plugins/verticalTablePlugin/renderer.js +1 -0
  159. package/es/components/iho-table/src/plugins/verticalTablePlugin/types.d.ts +8 -0
  160. package/es/components/iho-table/src/plugins/verticalTablePlugin/types.js +1 -0
  161. package/es/components/iho-table/src/plugins/verticalTablePlugin/utils.d.ts +15 -0
  162. package/es/components/iho-table/src/plugins/verticalTablePlugin/utils.js +1 -0
  163. package/es/components/iho-table/src/plugins/{virtualTreePlugin/index.d.ts → virtualTreePlugin.d.ts} +1 -1
  164. package/es/components/iho-table/src/plugins/virtualTreePlugin.js +1 -0
  165. package/es/components/iho-table/src/types/index.d.ts +10 -1
  166. package/es/components/iho-table/src/types/pluginType.d.ts +3 -1
  167. package/es/components/iho-table/src/utils/index.d.ts +4 -7
  168. package/es/components/iho-table/src/utils/index.js +1 -1
  169. package/es/components/index.css +1 -1
  170. package/es/components/index.d.ts +3 -1
  171. package/es/components/index.js +1 -1
  172. package/es/components/info-header/index.d.ts +74 -23
  173. package/es/components/info-header/src/InfoHeader.vue.d.ts +74 -23
  174. package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +2 -1
  175. package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +2 -1
  176. package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +33 -9
  177. package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +31 -8
  178. package/es/components/keyboard/index.d.ts +1 -1
  179. package/es/components/keyboard/src/Keyboard.vue.d.ts +1 -1
  180. package/es/components/quick-search/index.d.ts +3 -3
  181. package/es/components/quick-search/src/index.vue.d.ts +3 -3
  182. package/es/components/recommend-search/index.d.ts +6 -6
  183. package/es/components/recommend-search/src/RecommendSearch.vue.d.ts +6 -6
  184. package/es/components/recommend-search/src/components/BaseSearch.d.ts +1 -1
  185. package/es/components/recommend-search/src/components/RecommendInput.vue.d.ts +1 -1
  186. package/es/components/recommend-search/src/components/RecommendSelect.vue.d.ts +1 -1
  187. package/es/components/scale-view/index.d.ts +3 -3
  188. package/es/components/scale-view/src/ScaleView.vue.d.ts +3 -3
  189. package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
  190. package/es/components/scale-view/src/components/formitem/standard-modal.d.ts +1 -1
  191. package/es/components/scale-view/src/hooks/use-component.d.ts +1 -1
  192. package/es/components/select-label/index.d.ts +2 -2
  193. package/es/components/select-label/src/LabelFormContent.vue.d.ts +1 -1
  194. package/es/components/select-label/src/LabelFormContent.vue2.js +1 -1
  195. package/es/components/select-label/src/SelectLabel.vue.d.ts +1 -1
  196. package/es/components/select-label/src/index.vue.d.ts +1 -1
  197. package/es/components/select-person/src/SearchMultiple.vue.d.ts +0 -6
  198. package/es/components/select-person/src/SelectPerson.vue2.js +1 -1
  199. package/es/components/shortcut-provider/src/hooks/useShortcuts.js +1 -1
  200. package/es/components/shortcut-setter/index.d.ts +32 -8
  201. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +32 -8
  202. package/es/components/table-export-field/index.d.ts +3 -3
  203. package/es/components/table-export-field/src/components/ExportModal.vue.d.ts +3 -0
  204. package/es/components/table-export-field/src/components/SaveProjectModal.vue.d.ts +3 -3
  205. package/es/components/table-export-field/src/index.vue.d.ts +3 -3
  206. package/es/components/table-filter/src/components/bi-filter/ValueCfg.vue.d.ts +1 -1
  207. package/es/components/table-filter/src/components/bi-filter/components/Date.vue.d.ts +1 -1
  208. package/es/components/table-filter/src/components/bi-filter/components/index.d.ts +1 -1
  209. package/es/components/table-filter/src/components/bi-filter/index.vue.d.ts +1 -1
  210. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +2 -2
  211. package/es/components/table-filter/src/components/classify-filter/components/Date.vue.d.ts +1 -1
  212. package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue.d.ts +1 -1
  213. package/es/components/table-filter/src/components/classify-filter/components/index.d.ts +2 -2
  214. package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +2 -2
  215. package/es/components/table-filter/src/components/render-widget/components/DateInner.vue.d.ts +1 -1
  216. package/es/components/table-filter/src/components/render-widget/components/DateOut.vue.d.ts +1 -1
  217. package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue.d.ts +1 -1
  218. package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue.d.ts +1 -1
  219. package/es/components/table-filter/src/components/render-widget/components/index.d.ts +4 -4
  220. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +4 -4
  221. package/es/components/time-line/index.d.ts +7 -7
  222. package/es/components/time-line/src/TimeLine.vue.d.ts +3 -3
  223. package/es/env.d.ts +25 -25
  224. package/es/shared/assets/img/failure.png.js +1 -1
  225. package/es/shared/assets/img/no-permission.png.js +1 -1
  226. package/es/shared/assets/img/nodata.png.js +1 -1
  227. package/es/shared/assets/img/notfound.png.js +1 -1
  228. package/es/shared/assets/img/qr.png.js +1 -1
  229. package/es/shared/assets/img/success.png.js +1 -1
  230. package/es/shared/assets/img/video.png.js +1 -1
  231. package/es/shared/assets/img/video_default_cover.png.js +1 -1
  232. package/es/shared/assets/img/xb_big.png.js +1 -1
  233. package/es/shared/assets/img/xb_small.png.js +1 -1
  234. package/es/shared/components/InputNumberSlash/InputNumberSlash.js +1 -1
  235. package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +86 -0
  236. package/es/shared/hooks/selectHooks/useOptionFiltered.d.ts +3 -1
  237. package/es/shared/hooks/selectHooks/useOptionFiltered.js +1 -1
  238. package/es/shared/hooks/selectHooks/useSearchContent.d.ts +1 -1
  239. package/es/shared/hooks/selectHooks/useSearchContent.js +1 -1
  240. package/es/shared/package.json.js +1 -1
  241. package/es/shared/types/business.d.ts +23 -3
  242. package/es/shared/utils/business.d.ts +2 -1
  243. package/es/shared/utils/business.js +1 -1
  244. package/es/shared/utils/fabricjs/index.d.ts +6823 -0
  245. package/es/shared/utils/index.d.ts +2 -1
  246. package/es/shared/utils/index.js +1 -1
  247. package/es/shared/utils/tapable/index.d.ts +139 -0
  248. package/package.json +8 -2
  249. package/es/components/iho-table/src/plugins/bindEventSettingPlugin/index.js +0 -1
  250. package/es/components/iho-table/src/plugins/defaultConfigPlugin/index.js +0 -1
  251. package/es/components/iho-table/src/plugins/keyboardEventPlugin/index.js +0 -1
  252. package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index.js +0 -1
  253. package/es/components/iho-table/src/plugins/operationalFormPlugin/index.js +0 -1
  254. package/es/components/iho-table/src/plugins/rowClickPlugin/index.d.ts +0 -1
  255. package/es/components/iho-table/src/plugins/rowClickPlugin/index.js +0 -1
  256. package/es/components/iho-table/src/plugins/rowDragPlugin/index.d.ts +0 -1
  257. package/es/components/iho-table/src/plugins/rowDragPlugin/index.js +0 -1
  258. package/es/components/iho-table/src/plugins/varialbleHeightPlugin/index.js +0 -1
  259. package/es/components/iho-table/src/plugins/virtualTreePlugin/index.js +0 -1
@@ -1 +1 @@
1
- var e="@cnhis-design-vue/shared",i="3.1.57-beta.3",s="index.ts",n={"naive-ui":"^2.30.0",vue:"^3.2.0"},a={"@vicons/ionicons5":"^0.12.0","lodash-es":"^4.17.21",moment:"^2.29.1","video.js":"^7.19.2","videojs-contrib-hls":"^5.15.0",viewerjs:"^1.10.5","xe-utils":"^3.5.4"},d={name:e,version:"3.1.57-beta.3",private:!0,main:"index.ts",peerDependencies:n,dependencies:a};export{d as default,a as dependencies,s as main,e as name,n as peerDependencies,i as version};
1
+ var e="@cnhis-design-vue/shared",i="3.1.57-beta.32",s="index.ts",n={"naive-ui":"^2.30.0",vue:"^3.2.0"},a={"@vicons/ionicons5":"^0.12.0","lodash-es":"^4.17.21",moment:"^2.29.1","video.js":"^7.19.2","videojs-contrib-hls":"^5.15.0",viewerjs:"^1.10.5","xe-utils":"^3.5.4"},d={name:e,version:"3.1.57-beta.32",private:!0,main:"index.ts",peerDependencies:n,dependencies:a};export{d as default,a as dependencies,s as main,e as name,n as peerDependencies,i as version};
@@ -66,7 +66,7 @@ export declare namespace LowCodeTypes {
66
66
  field_key: string;
67
67
  value: unknown;
68
68
  };
69
- type reactionsConfig = {
69
+ type reactionConfig = {
70
70
  conObj: reactionsConObj[];
71
71
  } & Partial<{
72
72
  compareMap: BindEventSettingItem['compareMap'];
@@ -78,9 +78,29 @@ export declare namespace LowCodeTypes {
78
78
  notRequiredField: string[];
79
79
  enabledField: string[];
80
80
  disabledField: string[];
81
- __oppositeBindField: reactionsConfig;
82
- __oppositeTargetField: reactionsConfig;
81
+ __oppositeBindField: reactionConfig;
82
+ __oppositeTargetField: reactionConfig;
83
83
  }>;
84
+ type reactionActionType = 'show' | 'hide' | 'required' | 'notRequired' | 'enabled' | 'disabled';
85
+ type reactionAction = {
86
+ action: reactionActionType;
87
+ fields: string[];
88
+ actionConfig?: Partial<{
89
+ restoreDefault: boolean;
90
+ restoreEmpty: boolean;
91
+ }>;
92
+ };
93
+ type newReactionConfig = {
94
+ conditions: {
95
+ field: string;
96
+ type: VALUE_RELATION;
97
+ valueType?: 'const' | 'field';
98
+ value?: any;
99
+ }[];
100
+ compareMap?: BindEventSettingItem['compareMap'];
101
+ sqlExpression?: string;
102
+ actions: reactionAction[];
103
+ };
84
104
  type switchProperty = {
85
105
  value?: any;
86
106
  describe?: string;
@@ -5,7 +5,8 @@ export declare function isMatchLowCodeCondition(value: unknown, condition: {
5
5
  value: unknown;
6
6
  }, overwriteCompareMap?: LowCodeTypes.BindEventSettingItem['compareMap']): boolean;
7
7
  export declare function isConditionsMatchSqlExpression(conditions: boolean[], sqlExpression?: string): any;
8
- export declare function isMatchLowCodeConditionsWithSqlExpression(formData: AnyObject, config: LowCodeTypes.reactionsConfig): any;
8
+ export declare function isMatchLowCodeConditionsWithSqlExpression(formData: AnyObject, config: LowCodeTypes.reactionConfig): any;
9
+ export declare function isMatchNewLowCodeConditionsWithSqlExpression(formData: AnyObject, config: LowCodeTypes.newReactionConfig): any;
9
10
  declare function handleFieldTriggerSetValue(bindEventSetting: LowCodeTypes.BindEventSettingItem, { getter, setter }: {
10
11
  setter: (key: string, value: unknown) => void;
11
12
  getter: (key: string) => unknown;
@@ -1 +1 @@
1
- import{Path as e}from"@formily/path";import{isArray as t,isString as n,includes as r,negate as a,isNumber as i,gt as o,gte as l,lt as c,lte as u,identity as f,noop as s,isObject as d}from"lodash-es";import{unref as p}from"vue";import{add as m,differenceInMilliseconds as F}from"date-fns";function D(e){return null==e||""==e}function N(e){return(t,r)=>(n(t)&&(t=+t),n(r)&&(r=+r),!(!i(t)||Number.isNaN(t)||!i(r)||Number.isNaN(r))&&e(t,r))}const h={EQ:(e,t)=>`${e}`===t,NEQ:(e,t)=>`${e}`!==t,CL:(e,a)=>!(!t(e)&&!n(e))&&r(e,a),NC:(e,a)=>!t(e)&&!n(e)||!r(e,a),NULL:D,NOT_NULL:a(D),BIG:N(o),BIGEQ:N(l),LESS:N(c),LESSEQ:N(u)};function E(e,t,n={}){return(n[t.con]||h[t.con]||(()=>!1))(e,`${t.value}`)}function g(e,t){if(!t||!n(t))return e.every(f);try{return new Function("return "+t.replace(/OR/g,"||").replace(/AND/g,"&&").replace(/[a-zA-Z]/g,"").replace(/\d+/g,(t=>e[+t-1]?"true":"false")))()}catch(e){return console.error("表达式错误=>",t),!1}}function A(n,r){if(!t(r.conObj))return!1;return g(r.conObj.map((t=>E(e.getIn(n,t.field_key),t,r.compareMap))),r.sqlExpression)}const b=Object.freeze({SET_VALUE:function(e,{getter:t,setter:r}){if(!d(e))return;const{results:a=[],params:i=[],compareMap:o={}}=e;if(!a.length)return;function l(e){var r;if(!n(e))return e;const a=e.trim().match(/^\$\{([a-zA-Z\d\s]+)}$/);return a?t(null==(r=a[1])?void 0:r.trim()):e}i.every((e=>e&&e.p_name&&E(t(e.p_name),{con:e.p_select,value:l(e.p_value)},o)))&&a.forEach((e=>r(e.p_name,l(e.p_value))))},REPEAT_VALIDATE:s,IS_SHOW_FIELD:s,SQLSAVE:s,API:s});function L(e){return b[e]||s}function V(e,r,a){function o(e){return t(e)&&!!e.length}function l(e,t=!0){e.forEach((e=>{if(!e.operationalResult||!t&&null!=r(e.operationalResult))return;const o=e.operationFormParam.reduce(((e,t)=>(e[t=t.replace(/^table\./,"")]=+r(t),e)),{}),l=e.operationalRule.replace(/\${(.+?)}/g,"$1");let c=new Function("table",`return ${l}`)(o);n(c)&&(c=+c),c=i(c)?isNaN(c)?"":c.toFixed(+e.operationalPrecision):"",a(e.operationalResult,c)}))}return{operationalFormHandler:function(t){if(!o(p(e)))return;const n=p(e).filter((e=>e.operationFormParam.includes(`table.${t}`)));n.length&&l(n)},triggerAllOperationalFormHandler:function(){o(p(e))&&l(p(e),!1)}}}function $(e,n,r){function a(e){return t(e)&&!!e.length}function o(e,t=!0){e.forEach((e=>{e.diffValField&&e.diffValUnit&&e.scene&&(t||null==n(e.diffValField))&&("DIFF"===e.scene?function({startDateField:e,endDateField:t,diffValField:a,diffValUnit:i,precision:o="0"}){const l=n(e),c=n(t);if(l&&c){const e=F(new Date(c),new Date(l))/1e3/60,t=e/60,n=t/24;let u="";switch(i){case"DAY":u=n.toFixed(+o);break;case"HOUR":u=t.toFixed(+o);break;case"MIN":u=e.toFixed(+o);break;case"DHM":u=`${Math.floor(n)}天${Math.floor(t%24)}小时${Math.floor(e%60)}分钟`;break}r(a,u)}else r(a,null)}(e):"CALC"===e.scene&&function(e){const t=+e.diffValField;if(!i(t)||Number.isNaN(t))return;const a=n(e.endDateField);if(a){const n=m(new Date(a),{days:"DAY"===e.diffValUnit?t:0,hours:"HOUR"===e.diffValUnit?t:0,minutes:"MIN"===e.diffValUnit?t:0});r(e.startDateField,n)}else r(e.startDateField,null)}(e))}))}return{dateOperationalFormHandler:function(t){if(!a(p(e)))return;const n=p(e).filter((e=>"DIFF"===e.scene&&e.startDateField===t||e.endDateField===t));n.length&&o(n)},triggerAllDateOperationalFormHandler:function(){a(p(e))&&o(p(e),!1)}}}export{L as getBindEventSettingTrigger,$ as getDateOperationalFormHandler,V as getOperationalFormHandler,g as isConditionsMatchSqlExpression,E as isMatchLowCodeCondition,A as isMatchLowCodeConditionsWithSqlExpression};
1
+ import{Path as e}from"@formily/path";import{isArray as n,isString as t,includes as r,negate as a,isNumber as o,gt as i,gte as l,lt as u,lte as c,identity as f,noop as s,isObject as p}from"lodash-es";import{unref as d}from"vue";import{add as m,differenceInMilliseconds as F}from"date-fns";function D(e){return null==e||""==e}function N(e){return(n,r)=>(t(n)&&(n=+n),t(r)&&(r=+r),!(!o(n)||Number.isNaN(n)||!o(r)||Number.isNaN(r))&&e(n,r))}const g={EQ:(e,n)=>`${e}`===n,NEQ:(e,n)=>`${e}`!==n,CL:(e,a)=>!(!n(e)&&!t(e))&&r(e,a),NC:(e,a)=>!n(e)&&!t(e)||!r(e,a),NULL:D,NOT_NULL:a(D),BIG:N(i),BIGEQ:N(l),LESS:N(u),LESSEQ:N(c)};function E(e,n,t={}){return(t[n.con]||g[n.con]||(()=>!1))(e,`${n.value}`)}function h(e,n){if(!n||!t(n))return e.every(f);try{return new Function("return "+n.replace(/OR/g,"||").replace(/AND/g,"&&").replace(/[a-zA-Z]/g,"").replace(/\d+/g,(n=>e[+n-1]?"true":"false")))()}catch(e){return console.error("表达式错误=>",n),!1}}function v(t,r){if(!n(r.conObj))return!1;return h(r.conObj.map((n=>E(e.getIn(t,n.field_key),n,r.compareMap))),r.sqlExpression)}function A(t,r){if(!n(r.conditions))return!1;return h(r.conditions.map((n=>{const a=e.getIn(t,n.field);return"field"===n.valueType?E(a,{con:n.type,value:e.getIn(t,n.value)},r.compareMap):E(a,{con:n.type,value:n.value},r.compareMap)})),r.sqlExpression)}const b=Object.freeze({SET_VALUE:function(e,{getter:n,setter:r}){if(!p(e))return;const{results:a=[],params:o=[],compareMap:i={}}=e;if(!a.length)return;function l(e){var r;if(!t(e))return e;const a=e.trim().match(/^\$\{([a-zA-Z\d\s]+)}$/);return a?n(null==(r=a[1])?void 0:r.trim()):e}o.every((e=>e&&e.p_name&&E(n(e.p_name),{con:e.p_select,value:l(e.p_value)},i)))&&a.forEach((e=>r(e.p_name,l(e.p_value))))},REPEAT_VALIDATE:s,IS_SHOW_FIELD:s,SQLSAVE:s,API:s});function I(e){return b[e]||s}function L(e,r,a){function i(e){return n(e)&&!!e.length}function l(e,n=!0){e.forEach((e=>{if(!e.operationalResult||!n&&null!=r(e.operationalResult))return;const i=e.operationFormParam.reduce(((e,n)=>(e[n=n.replace(/^table\./,"")]=+r(n),e)),{}),l=e.operationalRule.replace(/\${(.+?)}/g,"$1");let u=new Function("table",`return ${l}`)(i);t(u)&&(u=+u),u=o(u)?isNaN(u)?"":u.toFixed(+e.operationalPrecision):"",a(e.operationalResult,u)}))}return{operationalFormHandler:function(n){if(!i(d(e)))return;const t=d(e).filter((e=>e.operationFormParam.includes(`table.${n}`)));t.length&&l(t)},triggerAllOperationalFormHandler:function(){i(d(e))&&l(d(e),!1)}}}function V(e,t,r){function a(e){return n(e)&&!!e.length}function i(e,n=!0){e.forEach((e=>{e.diffValField&&e.diffValUnit&&e.scene&&(n||null==t(e.diffValField))&&("DIFF"===e.scene?function({startDateField:e,endDateField:n,diffValField:a,diffValUnit:o,precision:i="0"}){const l=t(e),u=t(n);if(l&&u){const e=F(new Date(u),new Date(l))/1e3/60,n=e/60,t=n/24;let c="";switch(o){case"DAY":c=t.toFixed(+i);break;case"HOUR":c=n.toFixed(+i);break;case"MIN":c=e.toFixed(+i);break;case"DHM":c=`${Math.floor(t)}天${Math.floor(n%24)}小时${Math.floor(e%60)}分钟`;break}r(a,c)}else r(a,null)}(e):"CALC"===e.scene&&function(e){const n=+e.diffValField;if(!o(n)||Number.isNaN(n))return;const a=t(e.endDateField);if(a){const t=m(new Date(a),{days:"DAY"===e.diffValUnit?n:0,hours:"HOUR"===e.diffValUnit?n:0,minutes:"MIN"===e.diffValUnit?n:0});r(e.startDateField,t)}else r(e.startDateField,null)}(e))}))}return{dateOperationalFormHandler:function(n){if(!a(d(e)))return;const t=d(e).filter((e=>"DIFF"===e.scene&&e.startDateField===n||e.endDateField===n));t.length&&i(t)},triggerAllDateOperationalFormHandler:function(){a(d(e))&&i(d(e),!1)}}}export{I as getBindEventSettingTrigger,V as getDateOperationalFormHandler,L as getOperationalFormHandler,h as isConditionsMatchSqlExpression,E as isMatchLowCodeCondition,v as isMatchLowCodeConditionsWithSqlExpression,A as isMatchNewLowCodeConditionsWithSqlExpression};