cnhis-design-vue 3.2.14-beta.2 → 3.2.14-beta.21

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 (245) hide show
  1. package/README.md +87 -87
  2. package/es/components/ai-chat/src/components/ChatCard.js +1 -1
  3. package/es/components/ai-chat/src/components/ChatFooter.vue2.js +1 -1
  4. package/es/components/ai-chat/src/components/ChatMain.js +1 -1
  5. package/es/components/ai-chat/src/components/ChatPatient.vue2.js +1 -1
  6. package/es/components/ai-chat/src/components/ChatPrompt.vue2.js +1 -1
  7. package/es/components/audio-sdk/src/components/recording.vue2.js +1 -1
  8. package/es/components/big-table/src/BigTable.vue2.js +1 -1
  9. package/es/components/big-table/src/components/edit-form/edit-date.js +1 -1
  10. package/es/components/big-table/src/components/edit-form/edit-select.js +1 -1
  11. package/es/components/big-table/src/components/edit-form/edit-time.js +1 -1
  12. package/es/components/big-table/src/components/input-button.vue2.js +1 -1
  13. package/es/components/big-table/src/hooks/useTableParse.js +1 -1
  14. package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
  15. package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +1 -0
  16. package/es/components/bpmn-workflow/types/ModelingModule.d.ts +1 -0
  17. package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +1 -0
  18. package/es/components/button-print/src/components/IdentityVerification.vue2.js +1 -1
  19. package/es/components/button-print/src/components/NewPrintComponent.vue2.js +1 -1
  20. package/es/components/classification/src/components/search-filter/index.vue2.js +1 -1
  21. package/es/components/classification/src/components/set-classification/index.vue2.js +1 -1
  22. package/es/components/classification/src/components/table-modal/index.vue.d.ts +0 -3
  23. package/es/components/classification/src/components/table-modal/index.vue2.js +1 -1
  24. package/es/components/classification/src/index.vue2.js +1 -1
  25. package/es/components/expand-field/src/components/FormBatchOptionsModal.vue2.js +1 -1
  26. package/es/components/expand-field/src/components/PersonModal.vue2.js +1 -1
  27. package/es/components/expand-field/src/components/form.vue2.js +1 -1
  28. package/es/components/expand-field/src/index.vue2.js +1 -1
  29. package/es/components/expand-field/src/utils/constant.js +1 -1
  30. package/es/components/fabric-chart/src/FabricChart.vue2.js +1 -1
  31. package/es/components/fabric-chart/src/components/PopupMenu.js +1 -1
  32. package/es/components/fabric-chart/src/constants/index.js +1 -1
  33. package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +1 -1
  34. package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcessChart.js +1 -1
  35. package/es/components/fabric-chart/src/hooks/electrocardiogram/hooks/useDetailEvent.js +1 -1
  36. package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogram.js +1 -1
  37. package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogramChart.js +1 -1
  38. package/es/components/fabric-chart/src/hooks/electrocardiogram/useMeasureInstrument.js +1 -1
  39. package/es/components/fabric-chart/src/hooks/newBirthProcess/useNewBirthProcess.js +1 -1
  40. package/es/components/fabric-chart/src/hooks/newBirthProcess/useNewBirthProcessChart.js +1 -1
  41. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.js +1 -1
  42. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useLeft.js +1 -1
  43. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useOther.js +1 -1
  44. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js +1 -1
  45. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useTop.js +1 -1
  46. package/es/components/fabric-chart/src/hooks/temperature/useBottom.js +1 -1
  47. package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
  48. package/es/components/fabric-chart/src/hooks/temperature/useLeft.js +1 -1
  49. package/es/components/fabric-chart/src/hooks/temperature/useOther.js +1 -1
  50. package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +1 -1
  51. package/es/components/fabric-chart/src/hooks/temperature/useTop.js +1 -1
  52. package/es/components/fabric-chart/src/hooks/useCommon.js +1 -1
  53. package/es/components/fabric-chart/src/hooks/useCumputedPoint.js +1 -1
  54. package/es/components/fabric-chart/src/utils/index.d.ts +1 -0
  55. package/es/components/fabric-chart/src/utils/index.js +1 -1
  56. package/es/components/field-set/src/FieldColor.vue.d.ts +1 -1
  57. package/es/components/field-set/src/FieldColor.vue2.js +1 -1
  58. package/es/components/field-set/src/FieldFilter.vue.d.ts +3 -2
  59. package/es/components/field-set/src/FieldFilter.vue2.js +1 -1
  60. package/es/components/field-set/src/FieldSet.vue2.js +1 -1
  61. package/es/components/field-set/src/Index.vue2.js +1 -1
  62. package/es/components/field-set/src/TableStyle.vue2.js +1 -1
  63. package/es/components/field-set/src/components/condition.vue2.js +1 -1
  64. package/es/components/field-set/src/components/edit-dialog.vue.d.ts +1 -1
  65. package/es/components/field-set/src/components/edit-dialog.vue2.js +1 -1
  66. package/es/components/field-set/src/components/edit-filter.vue2.js +1 -1
  67. package/es/components/field-set/src/components/table-row.vue2.js +1 -1
  68. package/es/components/field-set/src/constants/filter.d.ts +21 -12
  69. package/es/components/field-set/src/constants/filter.js +1 -1
  70. package/es/components/field-set/src/constants/index.js +1 -1
  71. package/es/components/field-set/src/types/index.d.ts +1 -1
  72. package/es/components/form-config/index.d.ts +7 -5
  73. package/es/components/form-config/index.js +1 -1
  74. package/es/components/form-config/src/FormConfig.vue.d.ts +7 -5
  75. package/es/components/form-config/src/FormConfig.vue2.js +1 -1
  76. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +2 -0
  77. package/es/components/form-config/src/components/FormConfigCreator.vue2.js +1 -1
  78. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +2 -2
  79. package/es/components/form-config/src/components/FormConfigEdit.vue2.js +1 -1
  80. package/es/components/form-config/src/components/FormConfigEventSetting.vue2.js +1 -1
  81. package/es/components/form-config/src/components/renderer/DefaultNode.vue2.js +1 -1
  82. package/es/components/form-config/src/constants/index.d.ts +1 -11
  83. package/es/components/form-config/src/constants/index.js +1 -1
  84. package/es/components/form-config/src/hooks/useConfigurationField.js +1 -1
  85. package/es/components/form-config/src/hooks/useLocale.d.ts +52 -0
  86. package/es/components/form-config/src/hooks/useLocale.js +1 -0
  87. package/es/components/form-render/index.js +1 -1
  88. package/es/components/form-render/src/components/renderer/combination/hooks/useCombination.js +1 -1
  89. package/es/components/form-render/src/components/renderer/combination/jsonCombination.js +1 -1
  90. package/es/components/form-render/src/components/renderer/combination/tableCombination.js +1 -1
  91. package/es/components/form-render/src/components/renderer/radio_checkbox.js +1 -1
  92. package/es/components/form-render/src/components/renderer/switch.js +1 -1
  93. package/es/components/form-render/src/hooks/useComplexOptions.js +1 -1
  94. package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
  95. package/es/components/form-render/src/hooks/usePresetScope.d.ts +1 -1
  96. package/es/components/form-render/src/hooks/usePresetScope.js +1 -1
  97. package/es/components/form-render/src/utils/index.d.ts +1 -0
  98. package/es/components/form-render/src/utils/index.js +1 -1
  99. package/es/components/iho-chat/index.d.ts +596 -52
  100. package/es/components/iho-chat/src/Index.vue.d.ts +599 -59
  101. package/es/components/iho-chat/src/Index.vue2.js +1 -1
  102. package/es/components/iho-chat/src/api/index.d.ts +1 -0
  103. package/es/components/iho-chat/src/api/index.js +1 -1
  104. package/es/components/iho-chat/src/components/ChatAdd.vue.d.ts +32 -1
  105. package/es/components/iho-chat/src/components/ChatAdd.vue2.js +1 -1
  106. package/es/components/iho-chat/src/components/ChatFile.vue.d.ts +52 -3
  107. package/es/components/iho-chat/src/components/ChatFile.vue2.js +1 -1
  108. package/es/components/iho-chat/src/components/ChatFooter.vue.d.ts +52 -2
  109. package/es/components/iho-chat/src/components/ChatFooter.vue2.js +1 -1
  110. package/es/components/iho-chat/src/components/ChatHeader.vue.d.ts +220 -11
  111. package/es/components/iho-chat/src/components/ChatHeader.vue2.js +1 -1
  112. package/es/components/iho-chat/src/components/ChatMain.vue.d.ts +82 -6
  113. package/es/components/iho-chat/src/components/ChatMain.vue2.js +1 -1
  114. package/es/components/iho-chat/src/components/ChatRecord.vue.d.ts +19 -1
  115. package/es/components/iho-chat/src/components/ChatRecord.vue2.js +1 -1
  116. package/es/components/iho-chat/src/components/ChatSearch.vue.d.ts +20 -2
  117. package/es/components/iho-chat/src/components/ChatSearch.vue2.js +1 -1
  118. package/es/components/iho-chat/src/components/ChatSet.vue.d.ts +71 -4
  119. package/es/components/iho-chat/src/components/ChatSet.vue2.js +1 -1
  120. package/es/components/iho-chat/src/components/ContextMenu.d.ts +11 -2
  121. package/es/components/iho-chat/src/components/ContextMenu.js +1 -1
  122. package/es/components/iho-chat/src/components/MessageTemplate.vue.d.ts +1 -1
  123. package/es/components/iho-chat/src/components/MessageTemplate.vue2.js +1 -1
  124. package/es/components/iho-chat/src/components/MultipleVideo.vue.d.ts +51 -2
  125. package/es/components/iho-chat/src/components/MultipleVideo.vue2.js +1 -1
  126. package/es/components/iho-chat/src/components/PersonProfile.vue.d.ts +19 -1
  127. package/es/components/iho-chat/src/components/PersonProfile.vue2.js +1 -1
  128. package/es/components/iho-chat/src/components/SiderList.vue.d.ts +66 -1
  129. package/es/components/iho-chat/src/components/SiderList.vue2.js +1 -1
  130. package/es/components/iho-chat/src/components/Video.vue.d.ts +19 -1
  131. package/es/components/iho-chat/src/components/Video.vue2.js +1 -1
  132. package/es/components/iho-chat/src/constants/index.d.ts +11 -2
  133. package/es/components/iho-chat/src/constants/index.js +1 -1
  134. package/es/components/iho-chat/src/hooks/index.d.ts +2 -2
  135. package/es/components/iho-chat/src/hooks/index.js +1 -1
  136. package/es/components/iho-chat/src/hooks/useData.d.ts +94 -0
  137. package/es/components/iho-chat/src/hooks/useData.js +1 -0
  138. package/es/components/iho-chat/src/hooks/useSearchUserList.js +1 -1
  139. package/es/components/iho-chat/src/hooks/useVideo.d.ts +19 -1
  140. package/es/components/iho-chat/src/hooks/useVideo.js +1 -1
  141. package/es/components/iho-chat/src/hooks/useWebSocket.d.ts +3 -0
  142. package/es/components/iho-chat/src/hooks/useWebSocket.js +1 -0
  143. package/es/components/iho-chat/src/types/index.d.ts +0 -6
  144. package/es/components/iho-chat/src/types/index.js +1 -1
  145. package/es/components/iho-chat/src/utils/index.d.ts +1 -0
  146. package/es/components/iho-chat/src/utils/index.js +1 -1
  147. package/es/components/iho-chat/style/index.css +1 -1
  148. package/es/components/iho-table/src/hooks/useColumnConfigAdaptor.js +1 -1
  149. package/es/components/iho-table/src/plugins/dynamicFilterRenderPlugin/dynamicFilter.vue2.js +1 -1
  150. package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue2.js +1 -1
  151. package/es/components/iho-table/src/plugins/filterRenderPlugin/index.js +1 -1
  152. package/es/components/iho-table/src/plugins/filterTextPlugin/filter.vue2.js +1 -1
  153. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -1
  154. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue2.js +1 -1
  155. package/es/components/iho-table/src/utils/index.js +1 -1
  156. package/es/components/index.css +1 -1
  157. package/es/components/index.js +1 -1
  158. package/es/components/info-header/src/components/patientInfo/index.vue2.js +1 -1
  159. package/es/components/keyboard/src/Keyboard.vue2.js +1 -1
  160. package/es/components/keyboard/src/components/NumberPanel.vue2.js +1 -1
  161. package/es/components/map/src/Map.vue2.js +1 -1
  162. package/es/components/picture-clipper/src/PictureClipper.vue2.js +1 -1
  163. package/es/components/quick-search/src/index.vue2.js +1 -1
  164. package/es/components/recommend-search/src/components/RecommendSelect.vue2.js +1 -1
  165. package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
  166. package/es/components/scale-view/src/components/formitem/r-cascader.js +1 -1
  167. package/es/components/scale-view/src/components/formitem/r-map.js +1 -1
  168. package/es/components/scale-view/src/components/formitem/r-select.js +1 -1
  169. package/es/components/scale-view/src/components/formitem/r-sign.js +1 -1
  170. package/es/components/scale-view/src/components/formitem/standard-modal.js +1 -1
  171. package/es/components/scale-view/src/hooks/scaleview-computed.js +1 -1
  172. package/es/components/scale-view/src/hooks/scaleview-methods.js +1 -1
  173. package/es/components/scale-view/src/hooks/scaleview-submit.js +1 -1
  174. package/es/components/scale-view/src/hooks/scaleview-validate.js +1 -1
  175. package/es/components/search-cascader/src/SearchCascader.vue2.js +1 -1
  176. package/es/components/select-label/src/LabelFormContent.vue2.js +1 -1
  177. package/es/components/select-label/src/SelectLabel.vue2.js +1 -1
  178. package/es/components/select-label/src/components/label-classify.vue2.js +1 -1
  179. package/es/components/select-label/src/ihoLabel/IhoLabelFormContent.vue2.js +1 -1
  180. package/es/components/select-label/src/ihoLabel/IhoSelectLabel.vue2.js +1 -1
  181. package/es/components/select-person/src/SelectPerson.vue2.js +1 -1
  182. package/es/components/select-person/src/SelectPersonType.vue2.js +1 -1
  183. package/es/components/select-person/src/index.vue2.js +1 -1
  184. package/es/components/table-export-field/src/components/ExportModal.vue2.js +1 -1
  185. package/es/components/table-export-field/src/components/SaveProjectModal.vue2.js +1 -1
  186. package/es/components/table-filter/src/components/bi-filter/helpers/options.js +1 -1
  187. package/es/components/table-filter/src/components/bi-filter/index.vue2.js +1 -1
  188. package/es/components/table-filter/src/components/classify-filter/components/Date.vue2.js +1 -1
  189. package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue2.js +1 -1
  190. package/es/components/table-filter/src/components/classify-filter/helpers/options.js +1 -1
  191. package/es/components/table-filter/src/components/classify-filter/index.vue2.js +1 -1
  192. package/es/components/table-filter/src/components/render-widget/components/SelectDynamic.vue.d.ts +4 -7
  193. package/es/components/table-filter/src/components/render-widget/components/SelectDynamic.vue2.js +1 -1
  194. package/es/components/table-filter/src/components/render-widget/components/index.d.ts +4 -7
  195. package/es/components/table-filter/src/components/render-widget/helpers/dateExtraMap.js +1 -1
  196. package/es/components/table-filter/src/components/render-widget/helpers/selectExtraMap.js +1 -1
  197. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +4 -7
  198. package/es/components/table-filter/src/tool/baseOptions.js +1 -1
  199. package/es/components/template-render/src/components/index.d.ts +23 -23
  200. package/es/components/tooth-bitmap/src/ToothBitmap.vue2.js +1 -1
  201. package/es/components/vod-chunk-upload/src/hooks/upload-computed.js +1 -1
  202. package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue2.js +1 -1
  203. package/es/components/vod-chunk-upload/src/vod-upload-modal.js +1 -1
  204. package/es/env.d.ts +25 -25
  205. package/es/shared/assets/img/ai__avatar.png.js +1 -1
  206. package/es/shared/assets/img/defaultCover/10review_successful.png.js +1 -1
  207. package/es/shared/assets/img/defaultCover/11review_fail.png.js +1 -1
  208. package/es/shared/assets/img/defaultCover/12no_setting.png.js +1 -1
  209. package/es/shared/assets/img/defaultCover/13no_menu_setting.png.js +1 -1
  210. package/es/shared/assets/img/defaultCover/14no_call_setting.png.js +1 -1
  211. package/es/shared/assets/img/defaultCover/15no_use_tag.png.js +1 -1
  212. package/es/shared/assets/img/defaultCover/16no_table_data.png.js +1 -1
  213. package/es/shared/assets/img/defaultCover/1location.png.js +1 -1
  214. package/es/shared/assets/img/defaultCover/2notfound.png.js +1 -1
  215. package/es/shared/assets/img/defaultCover/3loading.png.js +1 -1
  216. package/es/shared/assets/img/defaultCover/4no_permission.png.js +1 -1
  217. package/es/shared/assets/img/defaultCover/5no_data.png.js +1 -1
  218. package/es/shared/assets/img/defaultCover/6no_network.png.js +1 -1
  219. package/es/shared/assets/img/defaultCover/7no_doctor.png.js +1 -1
  220. package/es/shared/assets/img/defaultCover/8system_error.png.js +1 -1
  221. package/es/shared/assets/img/defaultCover/9system_upgrade.png.js +1 -1
  222. package/es/shared/assets/img/failure.png.js +1 -1
  223. package/es/shared/assets/img/logo.png.js +1 -1
  224. package/es/shared/assets/img/no-permission.png.js +1 -1
  225. package/es/shared/assets/img/nodata.png.js +1 -1
  226. package/es/shared/assets/img/notfound.png.js +1 -1
  227. package/es/shared/assets/img/qr.png.js +1 -1
  228. package/es/shared/assets/img/success.png.js +1 -1
  229. package/es/shared/assets/img/table_style_2.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/VueDraggable/src/vuedraggable.d.ts +86 -0
  235. package/es/shared/package.json.js +1 -1
  236. package/es/shared/types/index.d.ts +3 -0
  237. package/es/shared/utils/fabricjs/index.d.ts +6823 -0
  238. package/es/shared/utils/index.d.ts +1 -0
  239. package/es/shared/utils/index.js +1 -1
  240. package/es/shared/utils/tapable/index.d.ts +139 -0
  241. package/package.json +2 -2
  242. package/es/components/iho-chat/src/hooks/useSession.d.ts +0 -12
  243. package/es/components/iho-chat/src/hooks/useSession.js +0 -1
  244. package/es/components/iho-chat/src/hooks/useState.d.ts +0 -18
  245. package/es/components/iho-chat/src/hooks/useState.js +0 -1
@@ -1,5 +1,6 @@
1
1
  import { SFCWithInstall } from '../../shared/types';
2
2
  export * from './src/types';
3
+ export * from './src/hooks/useLocale';
3
4
  declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
4
5
  maxHeight: {
5
6
  type: StringConstructor;
@@ -16,7 +17,6 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
16
17
  extraMaterialList: {
17
18
  type: import("vue").PropType<import("./src/types").FormConfigItem[] | (() => import("./src/types").FormConfigItem[] | Promise<import("./src/types").FormConfigItem[]>)>;
18
19
  };
19
- showLowCodeReactions: BooleanConstructor;
20
20
  formProps: {
21
21
  type: import("vue").PropType<Partial<Partial<{
22
22
  fieldList: import("..").FieldItem[];
@@ -127,6 +127,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
127
127
  beforeMove: {
128
128
  type: import("vue").PropType<((payload: import("./src/types").FormConfigBeforeMovePayload) => boolean | void) | undefined>;
129
129
  };
130
+ showLowCodeReactions: BooleanConstructor;
130
131
  }, {
131
132
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
132
133
  maxHeight: {
@@ -144,7 +145,6 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
144
145
  extraMaterialList: {
145
146
  type: import("vue").PropType<import("./src/types").FormConfigItem[] | (() => import("./src/types").FormConfigItem[] | Promise<import("./src/types").FormConfigItem[]>)>;
146
147
  };
147
- showLowCodeReactions: BooleanConstructor;
148
148
  formProps: {
149
149
  type: import("vue").PropType<Partial<Partial<{
150
150
  fieldList: import("..").FieldItem[];
@@ -255,6 +255,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
255
255
  beforeMove: {
256
256
  type: import("vue").PropType<((payload: import("./src/types").FormConfigBeforeMovePayload) => boolean | void) | undefined>;
257
257
  };
258
+ showLowCodeReactions: BooleanConstructor;
258
259
  }>> & {
259
260
  onAddItem?: ((...args: any[]) => any) | undefined;
260
261
  onRemoveItem?: ((...args: any[]) => any) | undefined;
@@ -317,6 +318,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
317
318
  extraOptions: import("vue").ComputedRef<import("./src/types").FormConfigItem[]>;
318
319
  onFocus: () => Promise<void>;
319
320
  useVersion: typeof import("../../shared/hooks").useVersion;
321
+ useFormConfigLocale: typeof import("./src/hooks/useLocale").useFormConfigLocale;
320
322
  Draggable: import("vue").DefineComponent<{
321
323
  list: {
322
324
  type: ArrayConstructor;
@@ -404,6 +406,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
404
406
  NButton: any;
405
407
  NButtonGroup: any;
406
408
  NPopconfirm: any;
409
+ useFormConfigLocale: typeof import("./src/hooks/useLocale").useFormConfigLocale;
407
410
  CFormRender: SFCWithInstall<import("vue").DefineComponent<{}, {
408
411
  formRenderRef: import("vue").Ref<import("..").FormRenderExpose | undefined>;
409
412
  key: import("vue").Ref<number>;
@@ -2444,8 +2447,6 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
2444
2447
  __extra?: boolean | undefined;
2445
2448
  }>;
2446
2449
  generateFieldListByFormConfigItem: (formConfigItem: import("./src/types").FormConfigItem, fieldItem?: import("..").FieldItem | undefined) => import("..").FieldItem[];
2447
- showModal: import("vue").Ref<boolean>;
2448
- onPositiveClick: () => Promise<void>;
2449
2450
  prevOldField: null;
2450
2451
  onFormChange: ({ fieldKey, value }: import("..").FormChangePayload) => void;
2451
2452
  createLabelRender: (originOptions?: import("../../shared/types").AnyObject[] | undefined) => (label: string) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
@@ -2671,6 +2672,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
2671
2672
  }[]>;
2672
2673
  onOptionModalCancel: () => void;
2673
2674
  onOptionModalConfirm: () => void;
2675
+ useFormConfigLocale: typeof import("./src/hooks/useLocale").useFormConfigLocale;
2674
2676
  NModal: any;
2675
2677
  NSpace: any;
2676
2678
  NInput: any;
@@ -3931,7 +3933,6 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
3931
3933
  extraMaterialList: {
3932
3934
  type: import("vue").PropType<import("./src/types").FormConfigItem[] | (() => import("./src/types").FormConfigItem[] | Promise<import("./src/types").FormConfigItem[]>)>;
3933
3935
  };
3934
- showLowCodeReactions: BooleanConstructor;
3935
3936
  formProps: {
3936
3937
  type: import("vue").PropType<Partial<Partial<{
3937
3938
  fieldList: import("..").FieldItem[];
@@ -4042,6 +4043,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
4042
4043
  beforeMove: {
4043
4044
  type: import("vue").PropType<((payload: import("./src/types").FormConfigBeforeMovePayload) => boolean | void) | undefined>;
4044
4045
  };
4046
+ showLowCodeReactions: BooleanConstructor;
4045
4047
  }>> & {
4046
4048
  onAddItem?: ((...args: any[]) => any) | undefined;
4047
4049
  onRemoveItem?: ((...args: any[]) => any) | undefined;
@@ -1 +1 @@
1
- import{COMPONENT_NAMESPACE as o}from"../../shared/global/variable.js";import{safeComponentRegister as r}from"../../shared/utils/index.js";import i from"./src/FormConfig.vue.js";const s=i;s.install=function(i){r(i,s,o+"FormConfig")};export{s as default};
1
+ import{COMPONENT_NAMESPACE as o}from"../../shared/global/variable.js";import{safeComponentRegister as r}from"../../shared/utils/index.js";import s from"./src/FormConfig.vue.js";export{registFormConfigLocale,useFormConfigLocale}from"./src/hooks/useLocale.js";const e=s;e.install=function(s){r(s,e,o+"FormConfig")};export{e as default};
@@ -1,5 +1,6 @@
1
1
  import { useVersion } from '../../../shared/hooks';
2
2
  import { AnyFn, LowCodeTypes } from '../../../shared/types';
3
+ import { useFormConfigLocale } from '@cnhis-design-vue/components/form-config/src/hooks/useLocale';
3
4
  import { PropType, Ref } from 'vue';
4
5
  import { FormConfigItem, FormConfigTextFormatter, FormConfigVisitor } from '../../../components/form-config/src/types';
5
6
  import { FormRenderExpose } from '../../../components/form-render';
@@ -19,7 +20,6 @@ declare const _default: import("vue").DefineComponent<{
19
20
  extraMaterialList: {
20
21
  type: PropType<FormConfigItem[] | (() => FormConfigItem[] | Promise<FormConfigItem[]>)>;
21
22
  };
22
- showLowCodeReactions: BooleanConstructor;
23
23
  formProps: {
24
24
  type: PropType<Partial<Partial<{
25
25
  fieldList: import("../../../components/form-render").FieldItem[];
@@ -130,6 +130,7 @@ declare const _default: import("vue").DefineComponent<{
130
130
  beforeMove: {
131
131
  type: PropType<((payload: import("../../../components/form-config/src/types").FormConfigBeforeMovePayload) => boolean | void) | undefined>;
132
132
  };
133
+ showLowCodeReactions: BooleanConstructor;
133
134
  }, {
134
135
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
135
136
  maxHeight: {
@@ -147,7 +148,6 @@ declare const _default: import("vue").DefineComponent<{
147
148
  extraMaterialList: {
148
149
  type: PropType<FormConfigItem[] | (() => FormConfigItem[] | Promise<FormConfigItem[]>)>;
149
150
  };
150
- showLowCodeReactions: BooleanConstructor;
151
151
  formProps: {
152
152
  type: PropType<Partial<Partial<{
153
153
  fieldList: import("../../../components/form-render").FieldItem[];
@@ -258,6 +258,7 @@ declare const _default: import("vue").DefineComponent<{
258
258
  beforeMove: {
259
259
  type: PropType<((payload: import("../../../components/form-config/src/types").FormConfigBeforeMovePayload) => boolean | void) | undefined>;
260
260
  };
261
+ showLowCodeReactions: BooleanConstructor;
261
262
  }>> & {
262
263
  onAddItem?: ((...args: any[]) => any) | undefined;
263
264
  onRemoveItem?: ((...args: any[]) => any) | undefined;
@@ -320,6 +321,7 @@ declare const _default: import("vue").DefineComponent<{
320
321
  extraOptions: import("vue").ComputedRef<FormConfigItem[]>;
321
322
  onFocus: () => Promise<void>;
322
323
  useVersion: typeof useVersion;
324
+ useFormConfigLocale: typeof useFormConfigLocale;
323
325
  Draggable: import("vue").DefineComponent<{
324
326
  list: {
325
327
  type: ArrayConstructor;
@@ -407,6 +409,7 @@ declare const _default: import("vue").DefineComponent<{
407
409
  NButton: any;
408
410
  NButtonGroup: any;
409
411
  NPopconfirm: any;
412
+ useFormConfigLocale: typeof useFormConfigLocale;
410
413
  CFormRender: import("../../../shared/types").SFCWithInstall<import("vue").DefineComponent<{}, {
411
414
  formRenderRef: Ref<FormRenderExpose | undefined>;
412
415
  key: Ref<number>;
@@ -2447,8 +2450,6 @@ declare const _default: import("vue").DefineComponent<{
2447
2450
  __extra?: boolean | undefined;
2448
2451
  }>;
2449
2452
  generateFieldListByFormConfigItem: (formConfigItem: FormConfigItem, fieldItem?: import("../../../components/form-render").FieldItem | undefined) => import("../../../components/form-render").FieldItem[];
2450
- showModal: Ref<boolean>;
2451
- onPositiveClick: () => Promise<void>;
2452
2453
  prevOldField: null;
2453
2454
  onFormChange: ({ fieldKey, value }: import("../../../components/form-render").FormChangePayload) => void;
2454
2455
  createLabelRender: (originOptions?: import("../../../shared/types").AnyObject[] | undefined) => (label: string) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
@@ -2674,6 +2675,7 @@ declare const _default: import("vue").DefineComponent<{
2674
2675
  }[]>;
2675
2676
  onOptionModalCancel: () => void;
2676
2677
  onOptionModalConfirm: () => void;
2678
+ useFormConfigLocale: typeof useFormConfigLocale;
2677
2679
  NModal: any;
2678
2680
  NSpace: any;
2679
2681
  NInput: any;
@@ -3934,7 +3936,6 @@ declare const _default: import("vue").DefineComponent<{
3934
3936
  extraMaterialList: {
3935
3937
  type: PropType<FormConfigItem[] | (() => FormConfigItem[] | Promise<FormConfigItem[]>)>;
3936
3938
  };
3937
- showLowCodeReactions: BooleanConstructor;
3938
3939
  formProps: {
3939
3940
  type: PropType<Partial<Partial<{
3940
3941
  fieldList: import("../../../components/form-render").FieldItem[];
@@ -4045,6 +4046,7 @@ declare const _default: import("vue").DefineComponent<{
4045
4046
  beforeMove: {
4046
4047
  type: PropType<((payload: import("../../../components/form-config/src/types").FormConfigBeforeMovePayload) => boolean | void) | undefined>;
4047
4048
  };
4049
+ showLowCodeReactions: BooleanConstructor;
4048
4050
  }>> & {
4049
4051
  onAddItem?: ((...args: any[]) => any) | undefined;
4050
4052
  onRemoveItem?: ((...args: any[]) => any) | undefined;
@@ -1 +1 @@
1
- import{defineComponent as e,provide as o,ref as t,computed as r,toRaw as a,openBlock as i,createElementBlock as s,mergeProps as l,unref as n,createElementVNode as m,createVNode as u,isRef as f,withCtx as d,createBlock as c,createCommentVNode as p,createTextVNode as v}from"vue";import{useTheme as g}from"../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import{isArray as h,cloneDeep as _,isFunction as y}from"lodash-es";import"@vue/shared";import{uuidGenerator as x,traverse as j}from"../../../shared/utils/index.js";import"@vueuse/shared";import"../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import{NSelect as k,NSpace as C}from"naive-ui";import{useVersion as L}from"../../../shared/hooks/useVersion.js";import"../../../shared/hooks/useScrollLoading.js";import F from"../../../shared/components/VueDraggable/src/vuedraggable.js";import V from"./components/FormConfigCreator.vue.js";import b from"./components/FormConfigDragDisplay.vue.js";import w from"./components/FormConfigEdit.vue.js";import M from"./components/FormConfigEventSetting.vue.js";import R from"./components/FormConfigMaterialItem.js";import{useDataNormalize as D}from"./hooks/useDataNormalize.js";import{InjectionFormConfigProps as E,InjectionFormConfigEmit as H,InjectionFieldList as S,InjectionMaterialList as I,InjectionLowCodeReactions as U,InjectionActiveFieldItem as O,FORM_CONFIG_GROUP as P}from"./constants/index.js";import{fieldItemNormalize as T}from"./utils/index.js";import{useSortableConfig as z}from"./hooks/useSortalbeConfig.js";import"./hooks/useConfigurationField.js";const A=["id"],B={class:"form-config__material"},N=m("header",{class:"form-config__materialHeader"},"物料区",-1),W={class:"form-config__displayWrapper"},q={class:"form-config__displayHeader"},G={class:"form-config__config"},J=m("header",{class:"form-config__configHeader"},"配置区",-1),K={class:"form-config__configContent"};var Q=e({__name:"FormConfig",props:{maxHeight:{type:String},fieldVisitor:{type:Object},textFormatter:{type:Function},formRenderRef:{type:Object},extraMaterialList:{type:[Array,Function]},showLowCodeReactions:Boolean,formProps:{type:Object},beforeMove:{type:Function}},emits:["addItem","removeItem","reactionsValidateFailure"],setup(e,{expose:Q,emit:X}){const Y=e;o(E,Y),o(H,X);const Z=x(),$=g(),ee=t([]);o(S,ee);const oe=t([]);o(I,oe);const te=t([]);function re(e){ee.value.some((o=>o.key===e.key))||ee.value.push(e)}o(U,te);const ae=(e,o)=>y(Y.textFormatter)?Y.textFormatter(e,o):o,ie=t();o(O,ie);const se=t(),{transform:le,inverseTransform:ne}=D(Y),me=r({get:()=>null,set(e){if(!e)return;const o=fe.value.find((o=>o.key===e));o&&(o.__extra=!0,T(o),oe.value.push(o),X("addItem",o))}}),ue=t([]),fe=r((()=>{if(!h(ue.value))return[];const e=[];return j([...oe.value,...ee.value],(o=>e.push(o.key))),ue.value.filter((o=>!e.find((e=>e===o.key))))}));async function de(){Y.extraMaterialList&&!ue.value.length&&(ue.value=y(Y.extraMaterialList)?await Y.extraMaterialList():Y.extraMaterialList)}return Q({loadData({fieldList:e,lowCodeReactions:o=[]}){let t=[],r=[];e.forEach((e=>{return!1===(o=_(a(e))).show?r.push(o):t.push(o),void T(o);var o})),ee.value=le(t),oe.value=r,te.value=o,ie.value=void 0},validate(){var e;return null==(e=se.value)?void 0:e.validate()},getData:(e=!1)=>({fieldList:ne(_(a(ee.value)),e,{show:!0}),materialList:ne(_(a(oe.value)),e,{show:!1}),lowCodeReactions:_(a(te.value))}),clearExtraList(){ue.value=[]}}),(o,t)=>(i(),s("section",l({class:"form-config",style:{"--max-height":e.maxHeight,...n($)},id:n(Z)},n(L)()),[m("section",B,[N,u(n(F),l(z({fieldList:ee,materialList:oe,hooks:{beforeMove:Y.beforeMove}}),{class:"form-config__materialContent",modelValue:n(oe),"onUpdate:modelValue":t[0]||(t[0]=e=>f(oe)?oe.value=e:null)}),{item:d((({element:e})=>[u(n(R),{"form-config-item":e,"text-formatter":ae,"material-List":n(oe)},null,8,["form-config-item","material-List"])])),_:1},16,["modelValue"]),e.extraMaterialList?(i(),c(n(k),{key:0,class:"form-config__materialExtraList",filterable:"",value:n(me),"onUpdate:value":t[1]||(t[1]=e=>f(me)?me.value=e:null),placeholder:"请选择额外物料",options:n(fe),"label-field":"name","value-field":"key",onFocus:de},null,8,["value","options"])):p("v-if",!0)]),m("section",W,[m("header",q,[v(" 布局区 "),u(n(C),null,{default:d((()=>[e.showLowCodeReactions?(i(),c(M,{key:0,modelValue:te.value,"onUpdate:modelValue":t[2]||(t[2]=e=>te.value=e),onValidateFailure:t[3]||(t[3]=e=>X("reactionsValidateFailure",e))},null,8,["modelValue"])):p("v-if",!0),u(V,{onSubmit:re})])),_:1})]),u(b,{class:"form-config__displayContent",group:n(P),"text-formatter":ae,modelValue:n(ee),"onUpdate:modelValue":t[4]||(t[4]=e=>f(ee)?ee.value=e:null)},null,8,["group","modelValue"])]),m("section",G,[J,m("section",K,[u(w,{ref_key:"formConfigEditRef",ref:se,uuid:n(Z),"bind-form-render-ref":e.formRenderRef,"form-props":e.formProps},null,8,["uuid","bind-form-render-ref","form-props"])])])],16,A))}});export{Q as default};
1
+ import{defineComponent as e,provide as o,ref as t,computed as r,toRaw as a,openBlock as i,createElementBlock as s,mergeProps as l,unref as n,createElementVNode as m,toDisplayString as u,createVNode as f,isRef as d,withCtx as c,createBlock as p,createCommentVNode as v,createTextVNode as g}from"vue";import{useTheme as h}from"../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import{isArray as _,cloneDeep as y,isFunction as x}from"lodash-es";import"@vue/shared";import{uuidGenerator as j,traverse as k}from"../../../shared/utils/index.js";import"@vueuse/shared";import"../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import{NSelect as L,NSpace as C}from"naive-ui";import{useVersion as F}from"../../../shared/hooks/useVersion.js";import"../../../shared/hooks/useScrollLoading.js";import{useFormConfigLocale as V}from"./hooks/useLocale.js";import b from"../../../shared/components/VueDraggable/src/vuedraggable.js";import M from"./components/FormConfigCreator.vue.js";import w from"./components/FormConfigDragDisplay.vue.js";import R from"./components/FormConfigEdit.vue.js";import D from"./components/FormConfigEventSetting.vue.js";import E from"./components/FormConfigMaterialItem.js";import{useDataNormalize as H}from"./hooks/useDataNormalize.js";import{InjectionFormConfigProps as S,InjectionFormConfigEmit as A,InjectionFieldList as I,InjectionMaterialList as U,InjectionLowCodeReactions as O,InjectionActiveFieldItem as P,FORM_CONFIG_GROUP as T}from"./constants/index.js";import{fieldItemNormalize as z}from"./utils/index.js";import{useSortableConfig as B}from"./hooks/useSortalbeConfig.js";import"./hooks/useConfigurationField.js";const N=["id"],W={class:"form-config__material"},q={class:"form-config__materialHeader"},G={class:"form-config__displayWrapper"},J={class:"form-config__displayHeader"},K={class:"form-config__config"},Q={class:"form-config__configHeader"},X={class:"form-config__configContent"};var Y=e({__name:"FormConfig",props:{maxHeight:{type:String},fieldVisitor:{type:Object},textFormatter:{type:Function},formRenderRef:{type:Object},extraMaterialList:{type:[Array,Function]},formProps:{type:Object},beforeMove:{type:Function},showLowCodeReactions:Boolean},emits:["addItem","removeItem","reactionsValidateFailure"],setup(e,{expose:Y,emit:Z}){const $=e;o(S,$),o(A,Z);const ee=j(),oe=h(),te=t([]);o(I,te);const re=t([]);o(U,re);const ae=t([]);function ie(e){te.value.some((o=>o.key===e.key))||te.value.push(e)}o(O,ae);const se=(e,o)=>x($.textFormatter)?$.textFormatter(e,o):o,le=t();o(P,le);const ne=t(),{transform:me,inverseTransform:ue}=H($),fe=r({get:()=>null,set(e){if(!e)return;const o=ce.value.find((o=>o.key===e));o&&(o.__extra=!0,z(o),re.value.push(o),Z("addItem",o))}}),de=t([]),ce=r((()=>{if(!_(de.value))return[];const e=[];return k([...re.value,...te.value],(o=>e.push(o.key))),de.value.filter((o=>!e.find((e=>e===o.key))))}));async function pe(){$.extraMaterialList&&!de.value.length&&(de.value=x($.extraMaterialList)?await $.extraMaterialList():$.extraMaterialList)}return Y({loadData({fieldList:e,lowCodeReactions:o=[]}){let t=[],r=[];e.forEach((e=>{return!1===(o=y(a(e))).show?r.push(o):t.push(o),void z(o);var o})),te.value=me(t),re.value=r,ae.value=o,le.value=void 0},validate(){var e;return null==(e=ne.value)?void 0:e.validate()},getData:(e=!1)=>({fieldList:ue(y(a(te.value)),e,{show:!0}),materialList:ue(y(a(re.value)),e,{show:!1}),lowCodeReactions:y(a(ae.value))}),clearExtraList(){de.value=[]}}),(o,t)=>(i(),s("section",l({class:"form-config",style:{"--max-height":e.maxHeight,...n(oe)},id:n(ee)},n(F)()),[m("section",W,[m("header",q,u(n(V)("materialArea")),1),f(n(b),l(B({fieldList:te,materialList:re,hooks:{beforeMove:$.beforeMove}}),{class:"form-config__materialContent",modelValue:n(re),"onUpdate:modelValue":t[0]||(t[0]=e=>d(re)?re.value=e:null)}),{item:c((({element:e})=>[f(n(E),{"form-config-item":e,"text-formatter":se,"material-List":n(re)},null,8,["form-config-item","material-List"])])),_:1},16,["modelValue"]),e.extraMaterialList?(i(),p(n(L),{key:0,class:"form-config__materialExtraList",filterable:"",value:n(fe),"onUpdate:value":t[1]||(t[1]=e=>d(fe)?fe.value=e:null),placeholder:n(V)("materialArea.createMaterialPlaceholder"),options:n(ce),"label-field":"name","value-field":"key",onFocus:pe},null,8,["value","placeholder","options"])):v("v-if",!0)]),m("section",G,[m("header",J,[g(u(n(V)("layoutArea"))+" ",1),f(n(C),null,{default:c((()=>[e.showLowCodeReactions?(i(),p(D,{key:0,modelValue:ae.value,"onUpdate:modelValue":t[2]||(t[2]=e=>ae.value=e),onValidateFailure:t[3]||(t[3]=e=>Z("reactionsValidateFailure",e))},null,8,["modelValue"])):v("v-if",!0),f(M,{onSubmit:ie})])),_:1})]),f(w,{class:"form-config__displayContent",group:n(T),"text-formatter":se,modelValue:n(te),"onUpdate:modelValue":t[4]||(t[4]=e=>d(te)?te.value=e:null)},null,8,["group","modelValue"])]),m("section",K,[m("header",Q,u(n(V)("configArea")),1),m("section",X,[f(R,{ref_key:"formConfigEditRef",ref:ne,uuid:n(ee),"bind-form-render-ref":e.formRenderRef,"form-props":e.formProps},null,8,["uuid","bind-form-render-ref","form-props"])])])],16,N))}});export{Y as default};
@@ -1,3 +1,4 @@
1
+ import { useFormConfigLocale } from '../../../../components/form-config/src/hooks/useLocale';
1
2
  import { FieldItem, FormRenderExpose } from '../../../../components/form-render';
2
3
  import { AnyObject, FormConfigItem } from '../../..';
3
4
  declare const _default: import("vue").DefineComponent<{}, {
@@ -14,6 +15,7 @@ declare const _default: import("vue").DefineComponent<{}, {
14
15
  NButton: any;
15
16
  NButtonGroup: any;
16
17
  NPopconfirm: any;
18
+ useFormConfigLocale: typeof useFormConfigLocale;
17
19
  CFormRender: import("../../../../shared/types").SFCWithInstall<import("vue").DefineComponent<{}, {
18
20
  formRenderRef: import("vue").Ref<FormRenderExpose | undefined>;
19
21
  key: import("vue").Ref<number>;
@@ -1 +1 @@
1
- import{defineComponent as e,ref as t,openBlock as i,createBlock as l,unref as o,withCtx as a,createVNode as n,createTextVNode as r}from"vue";import{pick as s}from"lodash-es";import{NButtonGroup as m,NPopconfirm as u,NButton as d}from"naive-ui";import{EditAbleField as f}from"../constants/index.js";import{useConfigurationField as _}from"../hooks/useConfigurationField.js";import"../../../index.js";import c from"../../../form-render/index.js";var p=e({__name:"FormConfigCreator",emits:{submit:e=>e},setup(e,{emit:p}){const L=_().generateFieldListByKeys([f.NAME,f.LAYOUT_WIDTH_ENUM,f.NOTES,f.DEFAULT_EXPAND,f.FOLD]);Object.assign(L[0],{html_type:"INPUT",is_null:"0"});const h=t(),E=t(),y={defaultExpand:!0,fold:!0,layoutWidthEnum:"ALL_LINE"};async function w(e,t,i){if(!i)return;await i.validate();const l=i.getFormValues();p("submit",{layoutWidthEnum:"ALL_LINE",...l,type:e,key:l.name,...t,__new:!0})}return(e,t)=>(i(),l(o(m),{size:"small"},{default:a((()=>[n(o(u),{width:"200px","show-icon":!1,"show-arrow":!1,to:"body",onPositiveClick:t[0]||(t[0]=e=>w("NEWLINE",{},E.value))},{trigger:a((()=>[n(o(d),null,{default:a((()=>[r("新建分行符")])),_:1})])),default:a((()=>[n(o(c),{column:12,ref_key:"lineBreakFormRef",ref:E,"initial-data":o(s)(y,["layoutWidthEnum"]),size:"small","label-width":"auto","label-placement":"left",fieldList:o(L).slice(0,1)},null,8,["initial-data","fieldList"])])),_:1}),n(o(u),{width:"300px","show-icon":!1,"show-arrow":!1,to:"body",onPositiveClick:t[1]||(t[1]=e=>w("LINE_BAR",{children:[]},h.value))},{trigger:a((()=>[n(o(d),null,{default:a((()=>[r("新建分线栏")])),_:1})])),default:a((()=>[n(o(c),{column:12,ref_key:"linebarFormRef",ref:h,"initial-data":y,size:"small","label-width":"auto","label-placement":"left",fieldList:o(L)},null,8,["fieldList"])])),_:1})])),_:1}))}});export{p as default};
1
+ import{defineComponent as e,ref as t,openBlock as i,createBlock as a,unref as o,withCtx as l,createVNode as n,createTextVNode as r,toDisplayString as s}from"vue";import{pick as u}from"lodash-es";import{NButtonGroup as m,NPopconfirm as f,NButton as d}from"naive-ui";import{EditAbleField as c}from"../constants/index.js";import{useConfigurationField as p}from"../hooks/useConfigurationField.js";import{useFormConfigLocale as v}from"../hooks/useLocale.js";import"../../../index.js";import g from"../../../form-render/index.js";var L=e({__name:"FormConfigCreator",emits:{submit:e=>e},setup(e,{emit:L}){const _=p().generateFieldListByKeys([c.NAME,c.LAYOUT_WIDTH_ENUM,c.NOTES,c.DEFAULT_EXPAND,c.FOLD]);Object.assign(_[0],{html_type:"INPUT",is_null:"0"});const h=t(),x=t(),y={defaultExpand:!0,fold:!0,layoutWidthEnum:"ALL_LINE"};async function E(e,t,i){if(!i)return;await i.validate();const a=i.getFormValues();L("submit",{layoutWidthEnum:"ALL_LINE",...a,type:e,key:a.name,...t,__new:!0})}return(e,t)=>(i(),a(o(m),{size:"small"},{default:l((()=>[n(o(f),{width:"300px","show-icon":!1,"show-arrow":!1,to:"body","positive-text":o(v)("configArea.positiveBtn"),"negative-text":o(v)("configArea.negativeBtn"),onPositiveClick:t[0]||(t[0]=e=>E("NEWLINE",{},x.value))},{trigger:l((()=>[n(o(d),null,{default:l((()=>[r(s(o(v)("layoutArea.createLinebreak")),1)])),_:1})])),default:l((()=>[n(o(g),{column:12,ref_key:"lineBreakFormRef",ref:x,"initial-data":o(u)(y,["layoutWidthEnum"]),size:"small","label-width":"auto","label-placement":"left",fieldList:o(_).slice(0,1)},null,8,["initial-data","fieldList"])])),_:1},8,["positive-text","negative-text"]),n(o(f),{width:"300px","show-icon":!1,"show-arrow":!1,to:"body","positive-text":o(v)("configArea.positiveBtn"),"negative-text":o(v)("configArea.negativeBtn"),onPositiveClick:t[1]||(t[1]=e=>E("LINE_BAR",{children:[]},h.value))},{trigger:l((()=>[n(o(d),null,{default:l((()=>[r(s(o(v)("layoutArea.createLinebar")),1)])),_:1})])),default:l((()=>[n(o(g),{column:12,ref_key:"linebarFormRef",ref:h,"initial-data":y,size:"small","label-width":"auto","label-placement":"left",fieldList:o(_)},null,8,["fieldList"])])),_:1},8,["positive-text","negative-text"])])),_:1}))}});export{L as default};
@@ -1,5 +1,6 @@
1
1
  import { AnyObject } from '../../../../shared/types';
2
2
  import { PropType } from 'vue';
3
+ import { useFormConfigLocale } from '../../../../components/form-config/src/hooks/useLocale';
3
4
  import { FieldItem, FieldVisitor, FormChangePayload, FormRenderExpose } from '../../../../components/form-render';
4
5
  import { FormConfigItem } from '../../../../components/index';
5
6
  declare const _default: import("vue").DefineComponent<{
@@ -934,8 +935,6 @@ declare const _default: import("vue").DefineComponent<{
934
935
  __extra?: boolean | undefined;
935
936
  }>;
936
937
  generateFieldListByFormConfigItem: (formConfigItem: FormConfigItem, fieldItem?: FieldItem | undefined) => FieldItem[];
937
- showModal: import("vue").Ref<boolean>;
938
- onPositiveClick: () => Promise<void>;
939
938
  prevOldField: null;
940
939
  onFormChange: ({ fieldKey, value }: FormChangePayload) => void;
941
940
  createLabelRender: (originOptions?: AnyObject[]) => (label: string) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
@@ -1161,6 +1160,7 @@ declare const _default: import("vue").DefineComponent<{
1161
1160
  }[]>;
1162
1161
  onOptionModalCancel: () => void;
1163
1162
  onOptionModalConfirm: () => void;
1163
+ useFormConfigLocale: typeof useFormConfigLocale;
1164
1164
  NModal: any;
1165
1165
  NSpace: any;
1166
1166
  NInput: any;
@@ -1 +1 @@
1
- import{defineComponent as e,computed as l,ref as t,inject as a,watch as i,toRaw as o,openBlock as n,createElementBlock as u,Fragment as s,createVNode as r,unref as v,mergeProps as d,withCtx as p,createElementVNode as c,renderList as f,toDisplayString as m,nextTick as g,h}from"vue";import{cloneDeep as y,isEmpty as x,isArray as b}from"lodash-es";import{InjectionActiveFieldItem as k,EditAbleField as w}from"../constants/index.js";import"../../../../shared/components/VueDraggable/src/vuedraggable.js";import{findFieldItemByKey as j}from"../utils/index.js";import"@vicons/ionicons5";import{NModal as F,NInput as C,NSpace as L,NButton as _}from"naive-ui";import"../../../../shared/utils/index.js";import{useConfigurationField as R}from"../hooks/useConfigurationField.js";import"../../../index.js";import A from"../../../form-render/index.js";const U={style:{"padding-top":"8px"}},P={style:{width:"100%","text-align":"left"}},E=c("thead",null,[c("tr",null,[c("th",null,"值"),c("th",null,"原始文本"),c("th",null,"调整后文本")])],-1);var D=e({__name:"FormConfigEdit",props:{uuid:{type:String,required:!0},bindFormRenderRef:{type:Object},formProps:{type:Object}},setup(e,{expose:D}){const I=e;l((()=>`#${I.uuid} .form-config__config`));const O=t(),V=a(k),q=t([]),z=t({}),{generateFieldListByFormConfigItem:B}=R(),K=t(!1);async function N(){var e;V.value=S,await g(),null==(e=O.value)||e.validate()}let S=null;function T({fieldKey:e,value:l}){V.value&&(V.value[e]=l)}i(V,(async(e,l)=>{var t,a,i;if(!e)return q.value=[];if(l&&e!==S)try{await(null==(t=O.value)?void 0:t.validate())}catch(e){return K.value=!0}S=e,z.value={editable:!0,show:!0,...y(o(e))};const n=null==(a=I.bindFormRenderRef)?void 0:a.getFieldList();q.value=B(e,j(n,e.key)),null==(i=O.value)||i.reload()}),{immediate:!0});const $={"*"({field:e}){if(e.val_key!==w.DEFAULT_VALUE)return;const l=e.option;var t,a;e.option=(t=e.option,b(t)?t.map((e=>{var l;const t=null==(l=V.value.optionAliasList)?void 0:l.find((l=>l.value===e.value));return t?{...e,text:t.text}:e})):t),e.decoratorProps={labelRender:(a=l,e=>{const l=h("span",{},e);return x(a)?l:h("div",{style:{display:"flex",alignItems:"center",gap:"8px"}},[l,h(_,{text:!0,type:"primary",onClick(){var e;G.value=!0,H.value=y(a),x(null==(e=V.value)?void 0:e.optionAliasList)||H.value.forEach((e=>{const l=V.value.optionAliasList.find((l=>l.value===e.value));l&&(e.alias=l.text)}))}},{default:()=>"修改选项文本"})])})}}},G=t(!1),H=t([]);function J(){G.value=!1,H.value=[]}function M(){var e;G.value=!1,V.value.optionAliasList=H.value.reduce(((e,l)=>(l.alias&&e.push({value:l.value,text:l.alias}),e)),[]),H.value=[],z.value={editable:!0,show:!0,...y(o(V.value))},null==(e=O.value)||e.reload()}return D({validate(){var e;return null==(e=O.value)?void 0:e.validate()}}),(l,t)=>(n(),u(s,null,[r(v(A),d({size:"small"},e.formProps,{column:12,ref_key:"formRenderRef",ref:O,onFormChange:T,"field-visitor":$,"field-list":q.value,"initial-data":z.value}),null,16,["field-list","initial-data"]),r(v(F),{show:K.value,"onUpdate:show":t[0]||(t[0]=e=>K.value=e),preset:"dialog",to:"body","close-on-esc":!1,"mask-closable":!1,closable:!1,title:"存在填写错误的字段","positive-text":"继续编辑",onPositiveClick:N},null,8,["show","to"]),r(v(F),{show:G.value,"onUpdate:show":t[1]||(t[1]=e=>G.value=e),preset:"dialog",to:"body","close-on-esc":!1,"mask-closable":!1,title:"修改选项文本","positive-text":"确定","negative-text":"取消",onNegativeClick:J,onPositiveClick:M},{default:p((()=>[c("section",U,[c("table",P,[E,c("tbody",null,[(n(!0),u(s,null,f(H.value,(e=>(n(),u("tr",{key:e.value},[c("td",null,m(e.value),1),c("td",null,m(e.text),1),c("td",null,[r(v(C),{value:e.alias,"onUpdate:value":l=>e.alias=l},null,8,["value","onUpdate:value"])])])))),128))])]),r(v(L),{vertical:""})])])),_:1},8,["show","to"])],64))}});export{D as default};
1
+ import{defineComponent as e,computed as t,ref as l,inject as i,watch as o,toRaw as a,openBlock as n,createElementBlock as r,Fragment as s,createVNode as u,unref as d,mergeProps as v,createCommentVNode as p,withCtx as f,createElementVNode as c,toDisplayString as m,renderList as g,h as x}from"vue";import{cloneDeep as y,isEmpty as h,isArray as b}from"lodash-es";import{InjectionActiveFieldItem as k,EditAbleField as A}from"../constants/index.js";import"../../../../shared/components/VueDraggable/src/vuedraggable.js";import{findFieldItemByKey as j}from"../utils/index.js";import"@vicons/ionicons5";import{NModal as w,NInput as F,NSpace as L,NButton as C}from"naive-ui";import"../../../../shared/utils/index.js";import{useConfigurationField as O}from"../hooks/useConfigurationField.js";import{useFormConfigLocale as _}from"../hooks/useLocale.js";import"../../../index.js";import R from"../../../form-render/index.js";const P={style:{"padding-top":"8px"}},T={style:{width:"100%","text-align":"left"}};var U=e({__name:"FormConfigEdit",props:{uuid:{type:String,required:!0},bindFormRenderRef:{type:Object},formProps:{type:Object}},setup(e,{expose:U}){const E=e;t((()=>`#${E.uuid} .form-config__config`));const B=l(),N=i(k),D=l([]),I=l({}),{generateFieldListByFormConfigItem:S}=O();function V({fieldKey:e,value:t}){N.value&&(N.value[e]=t)}o(N,(async(e,t)=>{var l,i;if(!e)return D.value=[];I.value={editable:!0,show:!0,...y(a(e))};const o=null==(l=E.bindFormRenderRef)?void 0:l.getFieldList();D.value=S(e,j(o,e.key)),null==(i=B.value)||i.reload()}),{immediate:!0});const q={"*"({field:e}){if(e.val_key!==A.DEFAULT_VALUE)return;const t=e.option;var l,i;e.option=(l=e.option,b(l)?l.map((e=>{var t;const l=null==(t=N.value.optionAliasList)?void 0:t.find((t=>t.value===e.value));return l?{...e,text:l.text}:e})):l),e.decoratorProps={labelRender:(i=t,e=>{const t=x("span",{},e);return h(i)?t:x("div",{style:{display:"flex",alignItems:"center",gap:"8px"}},[t,x(C,{text:!0,type:"primary",onClick(){var e;z.value=!0,K.value=y(i),h(null==(e=N.value)?void 0:e.optionAliasList)||K.value.forEach((e=>{const t=N.value.optionAliasList.find((t=>t.value===e.value));t&&(e.alias=t.text)}))}},{default:()=>_("configArea.modifyOptionTitle")})])})}}},z=l(!1),K=l([]);function M(){z.value=!1,K.value=[]}function $(){var e;z.value=!1,N.value.optionAliasList=K.value.reduce(((e,t)=>(t.alias&&e.push({value:t.value,text:t.alias}),e)),[]),K.value=[],I.value={editable:!0,show:!0,...y(a(N.value))},null==(e=B.value)||e.reload()}return U({validate(){var e;return null==(e=B.value)?void 0:e.validate()}}),(t,l)=>(n(),r(s,null,[u(d(R),v({size:"small"},e.formProps,{column:12,ref_key:"formRenderRef",ref:B,onFormChange:V,"field-visitor":q,"field-list":D.value,"initial-data":I.value}),null,16,["field-list","initial-data"]),p("\t<n-modal"),p('\t\tv-model:show="showModal"'),p('\t\tpreset="dialog"'),p('\t\tto="body"'),p('\t\t:to="wrapperSelector"'),p('\t\t:close-on-esc="false"'),p('\t\t:mask-closable="false"'),p('\t\t:closable="false"'),p('\t\ttitle="存在填写错误的字段"'),p('\t\tpositive-text="继续编辑"'),p('\t\t@positive-click="onPositiveClick"'),p("\t/>"),u(d(w),{show:z.value,"onUpdate:show":l[0]||(l[0]=e=>z.value=e),preset:"dialog",to:"body","close-on-esc":!1,"mask-closable":!1,title:d(_)("configArea.modifyOptionTitle"),"positive-text":d(_)("configArea.positiveBtn"),"negative-text":d(_)("configArea.negativeBtn"),onNegativeClick:M,onPositiveClick:$},{default:f((()=>[c("section",P,[c("table",T,[c("thead",null,[c("tr",null,[c("th",null,m(d(_)("configArea.modifyOptionName")),1),c("th",null,m(d(_)("configArea.modifyOptionOriginText")),1),c("th",null,m(d(_)("configArea.modifyOptionNewText")),1)])]),c("tbody",null,[(n(!0),r(s,null,g(K.value,(e=>(n(),r("tr",{key:e.value},[c("td",null,m(e.value),1),c("td",null,m(e.text),1),c("td",null,[u(d(F),{value:e.alias,"onUpdate:value":t=>e.alias=t},null,8,["value","onUpdate:value"])])])))),128))])]),u(d(L),{vertical:""})])])),_:1},8,["show","to","title","positive-text","negative-text"])],64))}});export{U as default};
@@ -1 +1 @@
1
- import{defineComponent as e,ref as l,watchEffect as o,watch as n,inject as i,computed as t,reactive as a,openBlock as s,createElementBlock as d,createVNode as r,unref as u,withCtx as p,createTextVNode as c,normalizeStyle as _,createElementVNode as v,Fragment as f,renderList as m,createBlock as h,toDisplayString as g,withModifiers as y,createCommentVNode as b,normalizeClass as k}from"vue";import{useTheme as F}from"../../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import{cloneDeep as x,isEmpty as O,isArray as j,union as C,omit as T}from"lodash-es";import"@vue/shared";import{traverse as B}from"../../../../shared/utils/index.js";import"@vueuse/shared";import"../../../../shared/hooks/selectHooks/useSearchContent.js";import{HelpCircleSharp as E}from"@vicons/ionicons5";import{useDialog as N,NButton as U,NModal as L,NScrollbar as z,NCollapse as q,NCollapseItem as w,NEllipsis as P,NThing as R,NSpace as $,NInputGroup as I,NSelect as A,NInput as D,NTooltip as V,NIcon as H,NEmpty as M}from"naive-ui";import"../../../../shared/hooks/useScrollLoading.js";import{conditionOppositeMap as S,connectionTypeOptions as W,connectionTypeOppositeMap as X,InjectionFieldList as G,conditionTypeOptions as J}from"../constants/index.js";const K={class:"form-config__connectionOperation"},Q={class:"form-config__connectionConditionHeaderDesc"},Y={class:"form-config__connectionCondition"},Z={class:"form-config__connectionConditionItem"},ee={style:{"margin-right":"8px"}},le={class:"form-config__connectionFieldType"},oe=["onClick"],ne={style:{display:"inline-flex","align-items":"center",gap:"4px","margin-bottom":"4px"}};var ie=e({__name:"FormConfigEventSetting",props:{modelValue:{default:()=>[]}},emits:["update:modelValue","validateFailure"],setup(e,{emit:ie}){const te=e,ae=F(),se=l([]),de=l("");function re(){se.value.push({conObj:[]}),de.value=se.value.length-1+""}function ue(e){return e.__oppositeBindField?`已绑定互斥联动: 联动${se.value.findIndex((l=>l===e.__oppositeBindField))+1}`:e.__oppositeTargetField?`已关联互斥联动: 联动${se.value.findIndex((l=>l===e.__oppositeTargetField))+1}`:void 0}function pe(e){return null==e?void 0:e.replace(/(AND|OR)/g,(e=>"AND"===e?"OR":"AND"))}function ce(e){var l;const o=e.__oppositeTargetField||{conObj:[]};return o.conObj=x(e.conObj),null==(l=o.conObj)||l.forEach((e=>{e.con=S[e.con]})),o.sqlExpression=pe(e.sqlExpression),W.forEach((({value:l})=>{O(e[l])?Reflect.deleteProperty(o,X[l]):o[X[l]]=x(e[l])})),o.__oppositeBindField=e,o}function _e(e,l){var o,n,i,t;return(null==(o=e.conObj)?void 0:o.length)===(null==(n=l.conObj)?void 0:n.length)&&(!(e.conObj&&l.conObj&&e.conObj.some((e=>!l.conObj.find((l=>{return n=l,(o=e).field_key===n.field_key&&o.con&&S[o.con]===n.con&&o.value===n.value;var o,n})))))&&(i=e.sqlExpression,t=l.sqlExpression,(!i&&!t||pe(i)===t)&&!W.some((({value:o})=>{return n=e[o],i=l[X[o]],!(n&&i?n.length===i.length&&n.every((e=>i.some((l=>e===l)))):!n&&!i);var n,i}))))}function ve(e){de.value=e[0]}function fe(e){const l=se.value[e];if(!l)return"";const o=l.conObj||[],n=W.reduce(((e,{value:o})=>(j(l[o])&&l[o].length&&e.push(...l[o].map(t)),e)),[]),i=C([...o.map((({field_key:e})=>t(e))),...n]).filter((e=>!!e));return i.length?`( 相关字段: ${i} )`:"";function t(e){var l,o;return null!=(o=null==(l=ge.value.find((l=>e===l.key)))?void 0:l.name)?o:e}}o((()=>{se.value.forEach((e=>{e.__oppositeTargetField&&(e.__oppositeTargetField=ce(e))}))}));const me=l(!1);n(me,(e=>{e&&(se.value=x(te.modelValue),se.value.forEach(((e,l)=>{if(e.__oppositeBindField||e.__oppositeTargetField)return;const o=se.value.find(((o,n)=>n!==l&&!o.__oppositeBindField&&!o.__oppositeTargetField&&_e(o,e)));o&&(o.__oppositeBindField=e,e.__oppositeTargetField=o)})))}));const he=i(G,l([])),ge=t((()=>{const e=[];return B(he.value,(l=>{!["NEWLINE","LINE_BAR","COMPLEX","COMBINATION"].includes(l.type)&&e.push(l)})),e})),ye=a([]),be=N();async function ke(){be.warning({title:"提示",content:"直接关闭弹窗会丢失已编辑的配置, 确定要关闭吗?",positiveText:"确定",negativeText:"取消",onPositiveClick:()=>{me.value=!1,se.value=[]}})}async function Fe(){try{await function(){var e;const l=[];return null==(e=se.value)||e.forEach(((e,o)=>{const n=[];e.conObj&&e.conObj.length?e.conObj.forEach(((e,l)=>{e.field_key||n.push(`条件${l+1}字段为空`),e.con||n.push(`条件${l+1}判断类型为空`),["NULL","NOT_NULL"].includes(e.con)||!e.con||e.value||n.push(`条件${l+1}值为空`)})):n.push("联动条件为空"),W.every((({value:l})=>!e[l]||!e[l].length))&&n.push("联动字段为空"),n.length&&l.push(`联动${o+1}: ${n}`)})),l.length?Promise.reject(l):Promise.resolve()}(),me.value=!1,ie("update:modelValue",se.value.map((e=>T(e,["__oppositeBindField","__oppositeTargetField"]))))}catch(e){ie("validateFailure",e)}}return(e,l)=>(s(),d("section",null,[r(u(U),{size:"small",onClick:l[0]||(l[0]=e=>me.value=!0)},{default:p((()=>[c("调整联动绑定")])),_:1}),r(u(L),{show:me.value,"onUpdate:show":l[1]||(l[1]=e=>me.value=e),closable:!1,bordered:!1,"show-icon":!1,title:"联动绑定设置",preset:"dialog","mask-closable":!1,"close-on-esc":!1,style:_({width:"1000px",...u(ae)}),class:"form-config__connectionModal"},{action:p((()=>[r(u(U),{size:"small",onClick:ke},{default:p((()=>[c("取消")])),_:1}),r(u(U),{size:"small",onClick:Fe,type:"primary"},{default:p((()=>[c("确定")])),_:1})])),default:p((()=>[v("header",K,[r(u(U),{onClick:re,size:"small"},{default:p((()=>[c("新增联动")])),_:1})]),r(u(z),{style:{"max-height":"500px","min-height":"500px"}},{default:p((()=>[r(u(q),{accordion:"","expanded-names":de.value,"onUpdate:expandedNames":ve},{default:p((()=>[(s(!0),d(f,null,m(se.value,((e,l)=>(s(),h(u(w),{name:l+""},{header:p((()=>[c(" 联动"+g(l+1)+" ",1),r(u(P),{class:"form-config__connectionConditionHeaderDesc",style:{"max-width":"500px"}},{default:p((()=>[c(g(fe(l)),1)])),_:2},1024)])),"header-extra":p((()=>[e.__oppositeBindField||e.__oppositeTargetField?(s(),d(f,{key:1},[v("span",Q,"( "+g(ue(e))+" )",1),r(u(U),{quaternary:"",type:"primary",size:"small",onClick:y((l=>function(e){const l=e.__oppositeTargetField||e.__oppositeBindField;l&&[l,e].forEach((e=>{Reflect.deleteProperty(e,"__oppositeBindField"),Reflect.deleteProperty(e,"__oppositeTargetField")}))}(e)),["stop"])},{default:p((()=>[c("解除互斥")])),_:2},1032,["onClick"])],64)):(s(),h(u(U),{key:0,onClick:y((l=>function(e){se.value.push(e.__oppositeTargetField=ce(e))}(e)),["stop"]),quaternary:"",type:"primary",size:"small"},{default:p((()=>[c(" 创建互斥条件 ")])),_:2},1032,["onClick"])),r(u(U),{onClick:y((e=>function(e){var l;const o=null==(l=se.value)?void 0:l.splice(e,1);null==o||o.forEach((e=>{const l=e.__oppositeTargetField||e.__oppositeBindField;l&&(Reflect.deleteProperty(l,"__oppositeTargetField"),Reflect.deleteProperty(l,"__oppositeBindField"))})),ye.splice(e,1),!de.value||+de.value<e||(de.value=de.value===e+""?"":+de.value-1+"")}(l)),["stop"]),quaternary:"",type:"error",size:"small"},{default:p((()=>[c("移除")])),_:2},1032,["onClick"])])),default:p((()=>[r(u(R),{class:"form-config__connectionWrapper"},{default:p((()=>[r(u($),{justify:"space-between",wrap:!1},{default:p((()=>[v("section",Y,[v("header",null,[c(" 条件 "),e.__oppositeBindField?b("v-if",!0):(s(),h(u(U),{key:0,size:"small",quaternary:"",type:"primary",onClick:l=>{var o;j((o=e).conObj)?o.conObj.push({}):o.conObj=[{}]}},{default:p((()=>[c(" 添加条件 ")])),_:2},1032,["onClick"]))]),r(u(z),{style:{"max-height":"145px","min-height":"145px"},class:"form-config__connectionWrapper"},{default:p((()=>[(s(!0),d(f,null,m(e.conObj||[],((l,o)=>(s(),d("div",Z,[v("span",ee,g(o+1),1),r(u(I),{size:"small"},{default:p((()=>[r(u(A),{value:l.field_key,"onUpdate:value":e=>l.field_key=e,disabled:!!e.__oppositeBindField,placeholder:"请选择字段",options:u(ge),"label-field":"name","value-field":"key",filterable:""},null,8,["value","onUpdate:value","disabled","options"]),r(u(A),{value:l.con,disabled:!!e.__oppositeBindField,"onUpdate:value":e=>function(e,l){e.con=l,["NOT_NULL","NULL"].includes(l)&&Reflect.deleteProperty(e,"value")}(l,e),placeholder:"请选择判断类型",options:u(J)},null,8,["value","disabled","onUpdate:value","options"]),l.con&&!["NULL","NOT_NULL"].includes(l.con)?(s(),h(u(D),{key:0,disabled:!!e.__oppositeBindField,value:l.value,"onUpdate:value":e=>l.value=e,placeholder:"请输入值",clearable:""},null,8,["disabled","value","onUpdate:value"])):b("v-if",!0)])),_:2},1024),r(u(U),{disabled:!!e.__oppositeBindField,quaternary:"",onClick:l=>function(e,l){j(e.conObj)&&e.conObj.splice(l,1)}(e,o),type:"error",size:"small"},{default:p((()=>[c(" 移除 ")])),_:2},1032,["disabled","onClick"])])))),256))])),_:2},1024)]),v("section",le,[v("div",null,[(s(!0),d(f,null,m(u(W),(o=>{var n,i;return s(),d("div",{key:o.value,class:k({"is-active":ye[l]===o.value}),onClick:e=>ye[l]=o.value},g(o.label)+" ( "+g(null!=(i=null==(n=e[o.value])?void 0:n.length)?i:0)+" ) ",11,oe)})),128))]),v("div",null,[ye[l]?(s(),h(u(A),{key:0,value:e[ye[l]],"onUpdate:value":o=>e[ye[l]]=o,disabled:!!e.__oppositeBindField,multiple:"",placeholder:"请选择字段",options:u(ge),"label-field":"name","value-field":"key",filterable:"","max-tag-count":10},null,8,["value","onUpdate:value","disabled","options"])):b("v-if",!0)])])])),_:2},1024),v("section",null,[v("label",null,[v("span",ne,[c(" 条件逻辑 "),r(u(V),null,{trigger:p((()=>[r(u(H),{size:"16",component:u(E)},null,8,["component"])])),default:p((()=>[c(" 非必填, 默认为需要全部满足. 示例: (1 AND 2) OR 3, 表示 条件1和2需要满足其一, 条件3必须满足 ")])),_:1})]),r(u(D),{value:e.sqlExpression,"onUpdate:value":l=>e.sqlExpression=l,disabled:!!e.__oppositeBindField,placeholder:"请输入条件逻辑"},null,8,["value","onUpdate:value","disabled"])])])])),_:2},1024)])),_:2},1032,["name"])))),256))])),_:1},8,["expanded-names"]),se.value.length?b("v-if",!0):(s(),h(u(M),{key:0,size:"huge",style:{"margin-top":"20px"},description:"无联动配置"}))])),_:1})])),_:1},8,["show","style"])]))}});export{ie as default};
1
+ import{defineComponent as e,ref as l,watchEffect as o,watch as n,inject as i,computed as a,reactive as t,openBlock as s,createElementBlock as d,createVNode as u,unref as r,withCtx as p,createTextVNode as c,normalizeStyle as v,createElementVNode as _,Fragment as f,renderList as m,createBlock as g,toDisplayString as h,withModifiers as y,createCommentVNode as b,normalizeClass as k}from"vue";import{useTheme as F}from"../../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import{cloneDeep as x,isEmpty as O,isArray as w,union as C,omit as j}from"lodash-es";import"@vue/shared";import{traverse as B}from"../../../../shared/utils/index.js";import"@vueuse/shared";import"../../../../shared/hooks/selectHooks/useSearchContent.js";import{HelpCircleSharp as T}from"@vicons/ionicons5";import{useDialog as L,NButton as E,NModal as N,NScrollbar as U,NCollapse as z,NCollapseItem as q,NEllipsis as P,NThing as R,NSpace as $,NInputGroup as I,NSelect as A,NInput as D,NTooltip as V,NIcon as H,NEmpty as M}from"naive-ui";import"../../../../shared/hooks/useScrollLoading.js";import{conditionOppositeMap as S,connectionTypeOptions as W,connectionTypeOppositeMap as X,InjectionFieldList as G,conditionTypeOptions as J}from"../constants/index.js";const K={class:"form-config__connectionOperation"},Q={class:"form-config__connectionConditionHeaderDesc"},Y={class:"form-config__connectionCondition"},Z={class:"form-config__connectionConditionItem"},ee={style:{"margin-right":"8px"}},le={class:"form-config__connectionFieldType"},oe=["onClick"],ne={style:{display:"inline-flex","align-items":"center",gap:"4px","margin-bottom":"4px"}};var ie=e({__name:"FormConfigEventSetting",props:{modelValue:{default:()=>[]}},emits:["update:modelValue","validateFailure"],setup(e,{emit:ie}){const ae=e,te=F(),se=l([]),de=l("");function ue(){se.value.push({conObj:[]}),de.value=se.value.length-1+""}function re(e){return e.__oppositeBindField?`已绑定互斥联动: 联动${se.value.findIndex((l=>l===e.__oppositeBindField))+1}`:e.__oppositeTargetField?`已关联互斥联动: 联动${se.value.findIndex((l=>l===e.__oppositeTargetField))+1}`:void 0}function pe(e){return null==e?void 0:e.replace(/(AND|OR)/g,(e=>"AND"===e?"OR":"AND"))}function ce(e){var l;const o=e.__oppositeTargetField||{conObj:[]};return o.conObj=x(e.conObj),null==(l=o.conObj)||l.forEach((e=>{e.con=S[e.con]})),o.sqlExpression=pe(e.sqlExpression),W.forEach((({value:l})=>{O(e[l])?Reflect.deleteProperty(o,X[l]):o[X[l]]=x(e[l])})),o.__oppositeBindField=e,o}function ve(e,l){var o,n,i,a;return(null==(o=e.conObj)?void 0:o.length)===(null==(n=l.conObj)?void 0:n.length)&&(!(e.conObj&&l.conObj&&e.conObj.some((e=>!l.conObj.find((l=>{return n=l,(o=e).field_key===n.field_key&&o.con&&S[o.con]===n.con&&o.value===n.value;var o,n})))))&&(i=e.sqlExpression,a=l.sqlExpression,(!i&&!a||pe(i)===a)&&!W.some((({value:o})=>{return n=e[o],i=l[X[o]],!(n&&i?n.length===i.length&&n.every((e=>i.some((l=>e===l)))):!n&&!i);var n,i}))))}function _e(e){de.value=e[0]}function fe(e){const l=se.value[e];if(!l)return"";const o=l.conObj||[],n=W.reduce(((e,{value:o})=>(w(l[o])&&l[o].length&&e.push(...l[o].map(a)),e)),[]),i=C([...o.map((({field_key:e})=>a(e))),...n]).filter((e=>!!e));return i.length?`( 相关字段: ${i} )`:"";function a(e){var l,o;return null!=(o=null==(l=he.value.find((l=>e===l.key)))?void 0:l.name)?o:e}}o((()=>{se.value.forEach((e=>{e.__oppositeTargetField&&(e.__oppositeTargetField=ce(e))}))}));const me=l(!1);n(me,(e=>{e&&(se.value=x(ae.modelValue),se.value.forEach(((e,l)=>{if(e.__oppositeBindField||e.__oppositeTargetField)return;const o=se.value.find(((o,n)=>n!==l&&!o.__oppositeBindField&&!o.__oppositeTargetField&&ve(o,e)));o&&(o.__oppositeBindField=e,e.__oppositeTargetField=o)})))}));const ge=i(G,l([])),he=a((()=>{const e=[];return B(ge.value,(l=>{!["NEWLINE","LINE_BAR","COMPLEX","COMBINATION"].includes(l.type)&&e.push(l)})),e})),ye=t([]),be=L();async function ke(){var e,l;be.warning({title:"提示",content:"直接关闭弹窗会丢失已编辑的配置, 确定要关闭吗?",positiveText:(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.27"))||"确定",negativeText:(null==(l=window.getLanguageByCode)?void 0:l.call(window,"10010.1.28"))||"取消",onPositiveClick:()=>{me.value=!1,se.value=[]}})}async function Fe(){try{await function(){var e;const l=[];return null==(e=se.value)||e.forEach(((e,o)=>{const n=[];e.conObj&&e.conObj.length?e.conObj.forEach(((e,l)=>{e.field_key||n.push(`条件${l+1}字段为空`),e.con||n.push(`条件${l+1}判断类型为空`),["NULL","NOT_NULL"].includes(e.con)||!e.con||e.value||n.push(`条件${l+1}值为空`)})):n.push("联动条件为空"),W.every((({value:l})=>!e[l]||!e[l].length))&&n.push("联动字段为空"),n.length&&l.push(`联动${o+1}: ${n}`)})),l.length?Promise.reject(l):Promise.resolve()}(),me.value=!1,ie("update:modelValue",se.value.map((e=>j(e,["__oppositeBindField","__oppositeTargetField"]))))}catch(e){ie("validateFailure",e)}}return(e,l)=>(s(),d("section",null,[u(r(E),{size:"small",onClick:l[0]||(l[0]=e=>me.value=!0)},{default:p((()=>[c("调整联动绑定")])),_:1}),u(r(N),{show:me.value,"onUpdate:show":l[1]||(l[1]=e=>me.value=e),closable:!1,bordered:!1,"show-icon":!1,title:"联动绑定设置",preset:"dialog","mask-closable":!1,"close-on-esc":!1,style:v({width:"1000px",...r(te)}),class:"form-config__connectionModal"},{action:p((()=>[u(r(E),{size:"small",onClick:ke},{default:p((()=>{var e;return[c((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.28"))||"取消")]})),_:1}),u(r(E),{size:"small",onClick:Fe,type:"primary"},{default:p((()=>{var e;return[c((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.27"))||"确定")]})),_:1})])),default:p((()=>[_("header",K,[u(r(E),{onClick:ue,size:"small"},{default:p((()=>[c("新增联动")])),_:1})]),u(r(U),{style:{"max-height":"500px","min-height":"500px"}},{default:p((()=>[u(r(z),{accordion:"","expanded-names":de.value,"onUpdate:expandedNames":_e},{default:p((()=>[(s(!0),d(f,null,m(se.value,((e,l)=>(s(),g(r(q),{name:l+""},{header:p((()=>[c(" 联动"+h(l+1)+" ",1),u(r(P),{class:"form-config__connectionConditionHeaderDesc",style:{"max-width":"500px"}},{default:p((()=>[c(h(fe(l)),1)])),_:2},1024)])),"header-extra":p((()=>[e.__oppositeBindField||e.__oppositeTargetField?(s(),d(f,{key:1},[_("span",Q,"( "+h(re(e))+" )",1),u(r(E),{quaternary:"",type:"primary",size:"small",onClick:y((l=>function(e){const l=e.__oppositeTargetField||e.__oppositeBindField;l&&[l,e].forEach((e=>{Reflect.deleteProperty(e,"__oppositeBindField"),Reflect.deleteProperty(e,"__oppositeTargetField")}))}(e)),["stop"])},{default:p((()=>[c("解除互斥")])),_:2},1032,["onClick"])],64)):(s(),g(r(E),{key:0,onClick:y((l=>function(e){se.value.push(e.__oppositeTargetField=ce(e))}(e)),["stop"]),quaternary:"",type:"primary",size:"small"},{default:p((()=>[c(" 创建互斥条件 ")])),_:2},1032,["onClick"])),u(r(E),{onClick:y((e=>function(e){var l;const o=null==(l=se.value)?void 0:l.splice(e,1);null==o||o.forEach((e=>{const l=e.__oppositeTargetField||e.__oppositeBindField;l&&(Reflect.deleteProperty(l,"__oppositeTargetField"),Reflect.deleteProperty(l,"__oppositeBindField"))})),ye.splice(e,1),!de.value||+de.value<e||(de.value=de.value===e+""?"":+de.value-1+"")}(l)),["stop"]),quaternary:"",type:"error",size:"small"},{default:p((()=>{var e;return[c((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.88"))||"移除")]})),_:2},1032,["onClick"])])),default:p((()=>[u(r(R),{class:"form-config__connectionWrapper"},{default:p((()=>[u(r($),{justify:"space-between",wrap:!1},{default:p((()=>[_("section",Y,[_("header",null,[c(" 条件 "),e.__oppositeBindField?b("v-if",!0):(s(),g(r(E),{key:0,size:"small",quaternary:"",type:"primary",onClick:l=>{var o;w((o=e).conObj)?o.conObj.push({}):o.conObj=[{}]}},{default:p((()=>[c(" 添加条件 ")])),_:2},1032,["onClick"]))]),u(r(U),{style:{"max-height":"145px","min-height":"145px"},class:"form-config__connectionWrapper"},{default:p((()=>[(s(!0),d(f,null,m(e.conObj||[],((l,o)=>(s(),d("div",Z,[_("span",ee,h(o+1),1),u(r(I),{size:"small"},{default:p((()=>[u(r(A),{value:l.field_key,"onUpdate:value":e=>l.field_key=e,disabled:!!e.__oppositeBindField,placeholder:"请选择字段",options:r(he),"label-field":"name","value-field":"key",filterable:""},null,8,["value","onUpdate:value","disabled","options"]),u(r(A),{value:l.con,disabled:!!e.__oppositeBindField,"onUpdate:value":e=>function(e,l){e.con=l,["NOT_NULL","NULL"].includes(l)&&Reflect.deleteProperty(e,"value")}(l,e),placeholder:"请选择判断类型",options:r(J)},null,8,["value","disabled","onUpdate:value","options"]),l.con&&!["NULL","NOT_NULL"].includes(l.con)?(s(),g(r(D),{key:0,disabled:!!e.__oppositeBindField,value:l.value,"onUpdate:value":e=>l.value=e,placeholder:"请输入值",clearable:""},null,8,["disabled","value","onUpdate:value"])):b("v-if",!0)])),_:2},1024),u(r(E),{disabled:!!e.__oppositeBindField,quaternary:"",onClick:l=>function(e,l){w(e.conObj)&&e.conObj.splice(l,1)}(e,o),type:"error",size:"small"},{default:p((()=>[c(" 移除 ")])),_:2},1032,["disabled","onClick"])])))),256))])),_:2},1024)]),_("section",le,[_("div",null,[(s(!0),d(f,null,m(r(W),(o=>{var n,i;return s(),d("div",{key:o.value,class:k({"is-active":ye[l]===o.value}),onClick:e=>ye[l]=o.value},h(o.label)+" ( "+h(null!=(i=null==(n=e[o.value])?void 0:n.length)?i:0)+" ) ",11,oe)})),128))]),_("div",null,[ye[l]?(s(),g(r(A),{key:0,value:e[ye[l]],"onUpdate:value":o=>e[ye[l]]=o,disabled:!!e.__oppositeBindField,multiple:"",placeholder:"请选择字段",options:r(he),"label-field":"name","value-field":"key",filterable:"","max-tag-count":10},null,8,["value","onUpdate:value","disabled","options"])):b("v-if",!0)])])])),_:2},1024),_("section",null,[_("label",null,[_("span",ne,[c(" 条件逻辑 "),u(r(V),null,{trigger:p((()=>[u(r(H),{size:"16",component:r(T)},null,8,["component"])])),default:p((()=>[c(" 非必填, 默认为需要全部满足. 示例: (1 AND 2) OR 3, 表示 条件1和2需要满足其一, 条件3必须满足 ")])),_:1})]),u(r(D),{value:e.sqlExpression,"onUpdate:value":l=>e.sqlExpression=l,disabled:!!e.__oppositeBindField,placeholder:"请输入条件逻辑"},null,8,["value","onUpdate:value","disabled"])])])])),_:2},1024)])),_:2},1032,["name"])))),256))])),_:1},8,["expanded-names"]),se.value.length?b("v-if",!0):(s(),g(r(M),{key:0,size:"huge",style:{"margin-top":"20px"},description:"无联动配置"}))])),_:1})])),_:1},8,["show","style"])]))}});export{ie as default};
@@ -1 +1 @@
1
- import{defineComponent as e,inject as t,computed as o,openBlock as r,createElementBlock as i,mergeProps as f,unref as m,withModifiers as n,createVNode as a,normalizeClass as l,withCtx as d,createTextVNode as u,toDisplayString as s,renderSlot as C,createBlock as g,createCommentVNode as c}from"vue";import{NEllipsis as p}from"naive-ui";import I from"./CloseButton.vue.js";import{InjectionActiveFieldItem as _,WidgetTextMap as v}from"../../constants/index.js";import{getFormConfigTitle as y,bindHover as x}from"../../utils/index.js";const k=["onClick","data-type","data-key","data-required","data-extra"];var q=e({__name:"DefaultNode",props:{formConfigItem:{type:Object,required:!0},textFormatter:{type:Function,required:!0},showCloseButton:{type:Boolean,default:!0},allowClick:{type:Boolean,default:!0}},setup(e){const q=e,B=t(_);function b(){q.allowClick&&(B.value=q.formConfigItem)}const j=o((()=>["form-config__renderer--default",{"is-required":q.formConfigItem.required}])),w=o((()=>{var e;return[{"is-active":B.value===q.formConfigItem,"is-disabled":$.value,"is-extra":null==(e=q.formConfigItem)?void 0:e.__extra},"form-config__renderer","form-config__renderer--defaultWrapper"]})),$=o((()=>!1===q.formConfigItem.editable)),h=o((()=>{const e=v.get(q.formConfigItem.type);return q.textFormatter(q.formConfigItem,`${y(q.formConfigItem)}${e?`(${e})`:""}`)})),F=o((()=>q.showCloseButton&&(!q.formConfigItem.required&&!q.formConfigItem.__isCombinationChild||q.formConfigItem.__extra)));return(t,o)=>(r(),i("div",f(m(x)(e.formConfigItem),{onClick:n(b,["stop"]),class:m(w),"data-type":e.formConfigItem.type,"data-key":e.formConfigItem.key,"data-required":!!e.formConfigItem.required,"data-extra":!!e.formConfigItem.__extra}),[a(m(p),{class:l(m(j))},{default:d((()=>[u(s(m(h)),1)])),_:1},8,["class"]),C(t.$slots,"default"),m(F)?(r(),g(I,{key:0,"form-config-item":e.formConfigItem},null,8,["form-config-item"])):c("v-if",!0)],16,k))}});export{q as default};
1
+ import{defineComponent as e,inject as o,computed as t,openBlock as r,createElementBlock as i,mergeProps as f,unref as m,withModifiers as n,createVNode as a,normalizeClass as l,withCtx as d,createTextVNode as u,toDisplayString as s,renderSlot as C,createBlock as g,createCommentVNode as c}from"vue";import{NEllipsis as p}from"naive-ui";import I from"./CloseButton.vue.js";import{InjectionActiveFieldItem as _,getWidgetText as v}from"../../constants/index.js";import{getFormConfigTitle as y,bindHover as x}from"../../utils/index.js";const k=["onClick","data-type","data-key","data-required","data-extra"];var q=e({__name:"DefaultNode",props:{formConfigItem:{type:Object,required:!0},textFormatter:{type:Function,required:!0},showCloseButton:{type:Boolean,default:!0},allowClick:{type:Boolean,default:!0}},setup(e){const q=e,B=o(_);function b(){q.allowClick&&(B.value=q.formConfigItem)}const j=t((()=>["form-config__renderer--default",{"is-required":q.formConfigItem.required}])),w=t((()=>{var e;return[{"is-active":B.value===q.formConfigItem,"is-disabled":$.value,"is-extra":null==(e=q.formConfigItem)?void 0:e.__extra},"form-config__renderer","form-config__renderer--defaultWrapper"]})),$=t((()=>!1===q.formConfigItem.editable)),h=t((()=>{const e=v(q.formConfigItem.type);return q.textFormatter(q.formConfigItem,`${y(q.formConfigItem)}${e?`(${e})`:""}`)})),F=t((()=>q.showCloseButton&&(!q.formConfigItem.required&&!q.formConfigItem.__isCombinationChild||q.formConfigItem.__extra)));return(o,t)=>(r(),i("div",f(m(x)(e.formConfigItem),{onClick:n(b,["stop"]),class:m(w),"data-type":e.formConfigItem.type,"data-key":e.formConfigItem.key,"data-required":!!e.formConfigItem.required,"data-extra":!!e.formConfigItem.__extra}),[a(m(p),{class:l(m(j))},{default:d((()=>[u(s(m(h)),1)])),_:1},8,["class"]),C(o.$slots,"default"),m(F)?(r(),g(I,{key:0,"form-config-item":e.formConfigItem},null,8,["form-config-item"])):c("v-if",!0)],16,k))}});export{q as default};
@@ -1,7 +1,7 @@
1
1
  import { AnyObject, LowCodeTypes, UndefinedAble } from '../../../../shared/types';
2
2
  import { InjectionKey, Ref } from 'vue';
3
3
  import { FormConfigItem } from '../../../../components/form-config';
4
- export declare const WidgetTextMap: Map<string, string>;
4
+ export declare function getWidgetText(type: string): string;
5
5
  export declare enum EditAbleField {
6
6
  KEY = "key",
7
7
  NAME = "name",
@@ -31,51 +31,41 @@ export declare function rowsOptionConfig(): {
31
31
  };
32
32
  export declare function isShowOptionConfig(): {
33
33
  open: {
34
- describe: string;
35
34
  value: boolean;
36
35
  };
37
36
  close: {
38
- describe: string;
39
37
  value: boolean;
40
38
  };
41
39
  };
42
40
  export declare function isNotFoldOptionConfig(): {
43
41
  open: {
44
- describe: string;
45
42
  value: boolean;
46
43
  };
47
44
  close: {
48
- describe: string;
49
45
  value: boolean;
50
46
  };
51
47
  };
52
48
  export declare function isEditOptionConfig(): {
53
49
  open: {
54
- describe: string;
55
50
  value: boolean;
56
51
  };
57
52
  close: {
58
- describe: string;
59
53
  value: boolean;
60
54
  };
61
55
  };
62
56
  export declare function isNullOptionConfig(): {
63
57
  open: {
64
- describe: string;
65
58
  value: boolean;
66
59
  };
67
60
  close: {
68
- describe: string;
69
61
  value: boolean;
70
62
  };
71
63
  };
72
64
  export declare function isVisibleOptionConfig(): {
73
65
  open: {
74
- describe: string;
75
66
  value: boolean;
76
67
  };
77
68
  close: {
78
- describe: string;
79
69
  value: boolean;
80
70
  };
81
71
  };
@@ -1 +1 @@
1
- import{range as e}from"lodash-es";const l=new Map([["LINE_BAR","分线栏"],["NEWLINE","分行符"]]);var a=(e=>(e.KEY="key",e.NAME="name",e.ALIAS="alias",e.NOTES="notes",e.DEFAULT_VALUE="defaultValue",e.LAYOUT_WIDTH_ENUM="layoutWidthEnum",e.DESC="desc",e.DEFAULT_EXPAND="defaultExpand",e.FOLD="fold",e.REQUIRED="required",e.EDITABLE="editable",e.SHOW="show",e.ROWS="initialHigh",e))(a||{});function i(){return{option:[{text:"整行",value:"ALL_LINE"},{text:"半行",value:"HALF_LINE"},{text:"5/6",value:"FIVE_SIX"},{text:"2/3",value:"TWO_THREE"},{text:"1/3",value:"ONE_THREE"},{text:"3/4",value:"THREE_FOUR"},{text:"1/4",value:"ONE_FOUR"},{text:"1/6",value:"ONE_SIX"},{text:"1/8",value:"ONE_EIGHT"}]}}function t(){return{option:e(1,11).map((e=>({text:`${e}行`,value:e})))}}function u(){return{open:{describe:"默认展开",value:!0},close:{describe:"默认收起",value:!1}}}function d(){return{open:{describe:"可折叠",value:!0},close:{describe:"不可折叠",value:!1}}}function n(){return{open:{describe:"可编辑",value:!0},close:{describe:"不可编辑",value:!1}}}function o(){return{open:{describe:"必填",value:!0},close:{describe:"不必填",value:!1}}}function E(){return{open:{describe:"显示",value:!0},close:{describe:"隐藏",value:!1}}}const r={EQ:"NEQ",NEQ:"EQ",CL:"NC",NC:"CL",NULL:"NOT_NULL",NOT_NULL:"NULL",BIG:"LESSEQ",BIGEQ:"LESS",LESS:"BIGEQ",LESSEQ:"BIG"},b=[{value:"EQ",label:"等于"},{value:"NEQ",label:"不等于"},{value:"CL",label:"包含"},{value:"NC",label:"不包含"},{value:"NULL",label:"为空"},{value:"NOT_NULL",label:"不为空"},{value:"BIG",label:"大于"},{value:"BIGEQ",label:"大于等于"},{value:"LESS",label:"小于"},{value:"LESSEQ",label:"小于等于"}],v={showField:"hideField",hideField:"showField",requiredField:"notRequiredField",notRequiredField:"requiredField",enabledField:"disabledField",disabledField:"enabledField"},L=[{value:"showField",label:"显示字段"},{value:"hideField",label:"隐藏字段"},{value:"requiredField",label:"必填字段"},{value:"notRequiredField",label:"非必填字段"},{value:"enabledField",label:"启用字段"},{value:"disabledField",label:"禁用字段"}],s="__display",c=Symbol("InjectionFieldList"),F=Symbol("InjectionMaterialList"),N=Symbol("InjectionLowCodeReactions"),I=Symbol("InjectionActiveFieldItem"),S=Symbol("InjectionFormConfigEmit"),_=Symbol("InjectionFormConfigProps");export{a as EditAbleField,s as FORM_CONFIG_GROUP,I as InjectionActiveFieldItem,c as InjectionFieldList,S as InjectionFormConfigEmit,_ as InjectionFormConfigProps,N as InjectionLowCodeReactions,F as InjectionMaterialList,l as WidgetTextMap,r as conditionOppositeMap,b as conditionTypeOptions,v as connectionTypeOppositeMap,L as connectionTypeOptions,n as isEditOptionConfig,d as isNotFoldOptionConfig,o as isNullOptionConfig,u as isShowOptionConfig,E as isVisibleOptionConfig,t as rowsOptionConfig,i as widgetWidthOptionConfig};
1
+ import{range as e}from"lodash-es";import{useFormConfigLocale as l}from"../hooks/useLocale.js";var a,o,n,i,d,u,t,E,L,v;function w(e){return new Map([["LINE_BAR",l("layoutArea.linebar")],["NEWLINE",l("layoutArea.linebreak")]]).get(e)||""}var r=(e=>(e.KEY="key",e.NAME="name",e.ALIAS="alias",e.NOTES="notes",e.DEFAULT_VALUE="defaultValue",e.LAYOUT_WIDTH_ENUM="layoutWidthEnum",e.DESC="desc",e.DEFAULT_EXPAND="defaultExpand",e.FOLD="fold",e.REQUIRED="required",e.EDITABLE="editable",e.SHOW="show",e.ROWS="initialHigh",e))(r||{});function c(){return{option:[{text:l("configArea.fullLine"),value:"ALL_LINE"},{text:l("configArea.halfLine"),value:"HALF_LINE"},{text:"5/6",value:"FIVE_SIX"},{text:"2/3",value:"TWO_THREE"},{text:"1/3",value:"ONE_THREE"},{text:"3/4",value:"THREE_FOUR"},{text:"1/4",value:"ONE_FOUR"},{text:"1/6",value:"ONE_SIX"},{text:"1/8",value:"ONE_EIGHT"}]}}function g(){return{option:e(1,11).map((e=>({text:`${e}`,value:e})))}}function b(){return{open:{value:!0},close:{value:!1}}}function F(){return{open:{value:!0},close:{value:!1}}}function N(){return{open:{value:!0},close:{value:!1}}}function s(){return{open:{value:!0},close:{value:!1}}}function I(){return{open:{value:!0},close:{value:!1}}}const S={EQ:"NEQ",NEQ:"EQ",CL:"NC",NC:"CL",NULL:"NOT_NULL",NOT_NULL:"NULL",BIG:"LESSEQ",BIGEQ:"LESS",LESS:"BIGEQ",LESSEQ:"BIG"},y=[{value:"EQ",label:(null==(a=window.getLanguageByCode)?void 0:a.call(window,"10010.1.317"))||"等于"},{value:"NEQ",label:(null==(o=window.getLanguageByCode)?void 0:o.call(window,"10010.1.318"))||"不等于"},{value:"CL",label:(null==(n=window.getLanguageByCode)?void 0:n.call(window,"10010.1.340"))||"包含"},{value:"NC",label:(null==(i=window.getLanguageByCode)?void 0:i.call(window,"10010.1.341"))||"不包含"},{value:"NULL",label:(null==(d=window.getLanguageByCode)?void 0:d.call(window,"10010.1.338"))||"为空"},{value:"NOT_NULL",label:(null==(u=window.getLanguageByCode)?void 0:u.call(window,"10010.1.339"))||"不为空"},{value:"BIG",label:(null==(t=window.getLanguageByCode)?void 0:t.call(window,"10010.1.319"))||"大于"},{value:"BIGEQ",label:(null==(E=window.getLanguageByCode)?void 0:E.call(window,"10010.1.321"))||"大于等于"},{value:"LESS",label:(null==(L=window.getLanguageByCode)?void 0:L.call(window,"10010.1.320"))||"小于"},{value:"LESSEQ",label:(null==(v=window.getLanguageByCode)?void 0:v.call(window,"10010.1.322"))||"小于等于"}],C={showField:"hideField",hideField:"showField",requiredField:"notRequiredField",notRequiredField:"requiredField",enabledField:"disabledField",disabledField:"enabledField"},f=[{value:"showField",label:"显示字段"},{value:"hideField",label:"隐藏字段"},{value:"requiredField",label:"必填字段"},{value:"notRequiredField",label:"非必填字段"},{value:"enabledField",label:"启用字段"},{value:"disabledField",label:"禁用字段"}],_="__display",B=Symbol("InjectionFieldList"),m=Symbol("InjectionMaterialList"),A=Symbol("InjectionLowCodeReactions"),p=Symbol("InjectionActiveFieldItem"),O=Symbol("InjectionFormConfigEmit"),T=Symbol("InjectionFormConfigProps");export{r as EditAbleField,_ as FORM_CONFIG_GROUP,p as InjectionActiveFieldItem,B as InjectionFieldList,O as InjectionFormConfigEmit,T as InjectionFormConfigProps,A as InjectionLowCodeReactions,m as InjectionMaterialList,S as conditionOppositeMap,y as conditionTypeOptions,C as connectionTypeOppositeMap,f as connectionTypeOptions,w as getWidgetText,N as isEditOptionConfig,F as isNotFoldOptionConfig,s as isNullOptionConfig,b as isShowOptionConfig,I as isVisibleOptionConfig,g as rowsOptionConfig,c as widgetWidthOptionConfig};
@@ -1 +1 @@
1
- import{omit as e,pick as t}from"lodash-es";import{EditAbleField as l,widgetWidthOptionConfig as i,isShowOptionConfig as a,isNotFoldOptionConfig as o,isEditOptionConfig as _,isNullOptionConfig as n,isVisibleOptionConfig as m,rowsOptionConfig as r}from"../constants/index.js";import"../../../form-render/index.js";import{useFieldNormalize as s}from"../../../form-render/src/hooks/useFieldNormalize.js";const{FieldNormalizeWaterfallHook:d}=s();function E(){const s=new Map([[l.KEY,e=>({alias:"字段",elem_width:6,html_type:"TEXT",content:null==e?void 0:e.key,decoratorProps:{labelPlacement:"left"}})],[l.ALIAS,()=>({alias:"别名",elem_width:6,default_val:"",html_type:"INPUT"})],[l.NAME,()=>({alias:"名称",elem_width:6,html_type:"TEXT",decoratorProps:{labelPlacement:"left"}})],[l.NOTES,()=>({alias:"问号提示",elem_width:6,html_type:"INPUT",is_empty:"0"})],[l.DEFAULT_VALUE,(l,i)=>{const a=d.call(Object.assign({},null==l?void 0:l.originalSetting,i),{});return{alias:"默认值",elem_width:6,html_type:"INPUT",is_empty:"0",componentProps:e(a.componentProps,["class","style","disabled"]),...t(a,["html_type","validate","option","multi_select","multi_select_value","wordbook","open","close","date_format","step_length","urlConfig","autograph","defined_error_msg","free_entry","validator","allowSlash","is_allow_check_mid","allow_check_mid_level"])}}],[l.LAYOUT_WIDTH_ENUM,()=>({alias:"宽度",fieldType:"number",html_type:"SELECT",elem_width:6,...i()})],[l.DESC,()=>({alias:"说明文本",elem_width:6,html_type:"INPUT",is_empty:"0",validate:{max_length:30}})],[l.DEFAULT_EXPAND,()=>({alias:"是否默认展开",html_type:"SWITCH",elem_width:6,...a()})],[l.FOLD,()=>({alias:"是否可折叠",html_type:"SWITCH",elem_width:6,...o()})],[l.EDITABLE,e=>({alias:"是否可编辑",html_type:"SWITCH",elem_width:6,is_edit:(null==e?void 0:e.editableDisabled)?"0":"1",..._()})],[l.REQUIRED,e=>({alias:"是否必填",html_type:"SWITCH",elem_width:6,is_edit:(null==e?void 0:e.requiredDisabled)?"0":"1",requiredReminderContent:null==e?void 0:e.requiredReminderContent,...n()})],[l.SHOW,e=>({alias:"是否显示",html_type:"SWITCH",elem_width:6,is_show:(null==e?void 0:e.__isCombinationChild)?"1":"0",...m()})],[l.ROWS,()=>({alias:"高度",elem_width:6,remark:"默认为3行高度,可调整为1-10行高度",default_val:3,is_empty:"0",html_type:"SELECT",...r()})]]);function E(e,t,l){return e.map((e=>{var i,a;return{...null!=(a=null==(i=s.get(e))?void 0:i(t,l))?a:{},val_key:e}}))}const p=new Map([["LINE_BAR",[l.KEY,l.NAME,l.ALIAS,l.LAYOUT_WIDTH_ENUM,l.NOTES,l.DEFAULT_EXPAND,l.FOLD]],["NEWLINE",[l.KEY,l.NAME,l.ALIAS]],...["COMPLEX","COMBINATION"].map((e=>[e,[l.KEY,l.NAME,l.ALIAS,l.LAYOUT_WIDTH_ENUM]]))]),h=[l.KEY,l.NAME,l.ALIAS,l.DEFAULT_VALUE,l.LAYOUT_WIDTH_ENUM,l.DESC,l.NOTES,l.EDITABLE,l.REQUIRED,l.SHOW];return{generateFieldListByKeys:E,generateFieldListByFormConfigItem:function(e,t){var i;const a=p.get(e.type)||h;return"TEXTAREA"===(t?t.html_type:null==(i=e.originalSetting)?void 0:i.html_type)&&a.splice(3,0,l.ROWS),E(a,e,t)}}}export{E as useConfigurationField};
1
+ import{omit as e,pick as t}from"lodash-es";import{EditAbleField as l,widgetWidthOptionConfig as i,isShowOptionConfig as a,isNotFoldOptionConfig as o,isEditOptionConfig as r,isNullOptionConfig as n,isVisibleOptionConfig as s,rowsOptionConfig as _}from"../constants/index.js";import{useFormConfigLocale as m}from"./useLocale.js";import"../../../form-render/index.js";import{useFieldNormalize as d}from"../../../form-render/src/hooks/useFieldNormalize.js";const{FieldNormalizeWaterfallHook:E}=d();function A(){const d=new Map([[l.KEY,e=>({alias:m("configArea.field"),elem_width:6,html_type:"TEXT",content:null==e?void 0:e.key,decoratorProps:{labelPlacement:"left"}})],[l.ALIAS,()=>({alias:m("configArea.alias"),elem_width:6,default_val:"",html_type:"INPUT"})],[l.NAME,()=>({alias:m("configArea.name"),elem_width:6,html_type:"TEXT",decoratorProps:{labelPlacement:"left"}})],[l.NOTES,()=>({alias:m("configArea.tips"),elem_width:6,html_type:"INPUT",is_empty:"0"})],[l.DEFAULT_VALUE,(l,i)=>{const a=E.call(Object.assign({},null==l?void 0:l.originalSetting,i),{});return{alias:m("configArea.defaultValue"),elem_width:6,html_type:"INPUT",is_empty:"0",componentProps:e(a.componentProps,["class","style","disabled"]),...t(a,["html_type","validate","option","multi_select","multi_select_value","wordbook","open","close","date_format","step_length","urlConfig","autograph","defined_error_msg","free_entry","validator","allowSlash","is_allow_check_mid","allow_check_mid_level"])}}],[l.LAYOUT_WIDTH_ENUM,()=>({alias:m("configArea.width"),fieldType:"number",html_type:"SELECT",elem_width:6,...i()})],[l.DESC,()=>({alias:m("configArea.describeText"),elem_width:6,html_type:"INPUT",is_empty:"0",validate:{max_length:30}})],[l.DEFAULT_EXPAND,()=>({alias:m("configArea.isExpand"),html_type:"SWITCH",elem_width:6,...a()})],[l.FOLD,()=>({alias:m("configArea.isFoldAble"),html_type:"SWITCH",elem_width:6,...o()})],[l.EDITABLE,e=>({alias:m("configArea.isEditable"),html_type:"SWITCH",elem_width:6,is_edit:(null==e?void 0:e.editableDisabled)?"0":"1",...r()})],[l.REQUIRED,e=>({alias:m("configArea.isRequired"),html_type:"SWITCH",elem_width:6,is_edit:(null==e?void 0:e.requiredDisabled)?"0":"1",requiredReminderContent:null==e?void 0:e.requiredReminderContent,...n()})],[l.SHOW,e=>({alias:m("configArea.isShow"),html_type:"SWITCH",elem_width:6,is_show:(null==e?void 0:e.__isCombinationChild)?"1":"0",...s()})],[l.ROWS,()=>({alias:m("configArea.rowsHeight"),elem_width:6,remark:m("configArea.rowsTips"),default_val:3,is_empty:"0",html_type:"SELECT",..._()})]]);function A(e,t,l){return e.map((e=>{var i,a;return{...null!=(a=null==(i=d.get(e))?void 0:i(t,l))?a:{},val_key:e}}))}const p=new Map([["LINE_BAR",[l.KEY,l.NAME,l.ALIAS,l.LAYOUT_WIDTH_ENUM,l.NOTES,l.DEFAULT_EXPAND,l.FOLD]],["NEWLINE",[l.KEY,l.NAME,l.ALIAS]],...["COMPLEX","COMBINATION"].map((e=>[e,[l.KEY,l.NAME,l.ALIAS,l.LAYOUT_WIDTH_ENUM]]))]),c=[l.KEY,l.NAME,l.ALIAS,l.DEFAULT_VALUE,l.LAYOUT_WIDTH_ENUM,l.DESC,l.NOTES,l.EDITABLE,l.REQUIRED,l.SHOW];return{generateFieldListByKeys:A,generateFieldListByFormConfigItem:function(e,t){var i;const a=p.get(e.type)||c;return"TEXTAREA"===(t?t.html_type:null==(i=e.originalSetting)?void 0:i.html_type)&&a.splice(3,0,l.ROWS),A(a,e,t)}}}export{A as useConfigurationField};
@@ -0,0 +1,52 @@
1
+ import { DeepPartial } from '../../../../shared/types';
2
+ declare const formConfigLocale: {
3
+ materialArea: {
4
+ areaName: string;
5
+ createMaterialPlaceholder: string;
6
+ toString: () => string;
7
+ };
8
+ layoutArea: {
9
+ areaName: string;
10
+ linebreak: string;
11
+ linebar: string;
12
+ createLinebreak: string;
13
+ createLinebar: string;
14
+ toString: () => string;
15
+ };
16
+ configArea: {
17
+ areaName: string;
18
+ field: string;
19
+ name: string;
20
+ alias: string;
21
+ defaultValue: string;
22
+ width: string;
23
+ describeText: string;
24
+ tips: string;
25
+ isRequired: string;
26
+ isEditable: string;
27
+ isExpand: string;
28
+ isFoldAble: string;
29
+ isShow: string;
30
+ modifyOptionTitle: string;
31
+ modifyOptionName: string;
32
+ modifyOptionOriginText: string;
33
+ modifyOptionNewText: string;
34
+ rowsHeight: string;
35
+ rowsTips: string;
36
+ positiveBtn: string;
37
+ negativeBtn: string;
38
+ fullLine: string;
39
+ halfLine: string;
40
+ toString: () => string;
41
+ };
42
+ };
43
+ type FormConfigLocale = typeof formConfigLocale;
44
+ type Join<K, P> = K extends string | number ? (P extends string | number ? `${K}.${P}` : never) : never;
45
+ type Prev = [never, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, ...0[]];
46
+ type Leaves<T, D extends number = 1> = [D] extends [never] ? never : T extends object ? {
47
+ [K in keyof T]: K extends string | number ? `${K}` | Join<K, Leaves<T[K], Prev[D]>> : never;
48
+ }[keyof T] : '';
49
+ type FormConfigLocaleKeys = Leaves<FormConfigLocale>;
50
+ export declare function registFormConfigLocale(locale: DeepPartial<FormConfigLocale>): void;
51
+ export declare function useFormConfigLocale(key: FormConfigLocaleKeys): string;
52
+ export {};
@@ -0,0 +1 @@
1
+ import{deepMerge as o}from"../../../../shared/utils/index.js";import{property as e}from"lodash-es";import{reactive as n}from"vue";var l,i,a,d,w,g,t,u,r,c,y,v,L,B,C,s,m,f,p,h,N,b,x,O,T,A,S,k,E,j;const q=n({materialArea:{areaName:(null==(l=window.getLanguageByCode)?void 0:l.call(window,"10010.1.1"))||"物料区",createMaterialPlaceholder:(null==(i=window.getLanguageByCode)?void 0:i.call(window,"10010.1.2"))||"请选择额外物料",toString(){return this.areaName}},layoutArea:{areaName:(null==(a=window.getLanguageByCode)?void 0:a.call(window,"10010.1.3"))||"布局区",linebreak:(null==(d=window.getLanguageByCode)?void 0:d.call(window,"10010.1.4"))||"分行符",linebar:(null==(w=window.getLanguageByCode)?void 0:w.call(window,"10010.1.5"))||"分线栏",createLinebreak:(null==(g=window.getLanguageByCode)?void 0:g.call(window,"10010.1.6"))||"新建分行符",createLinebar:(null==(t=window.getLanguageByCode)?void 0:t.call(window,"10010.1.7"))||"新建分线栏",toString(){return this.areaName}},configArea:{areaName:(null==(u=window.getLanguageByCode)?void 0:u.call(window,"10010.1.8"))||"配置区",field:(null==(r=window.getLanguageByCode)?void 0:r.call(window,"10010.1.9"))||"字段",name:(null==(c=window.getLanguageByCode)?void 0:c.call(window,"10010.1.10"))||"名称",alias:(null==(y=window.getLanguageByCode)?void 0:y.call(window,"10010.1.11"))||"别名",defaultValue:(null==(v=window.getLanguageByCode)?void 0:v.call(window,"10010.1.12"))||"默认值",width:(null==(L=window.getLanguageByCode)?void 0:L.call(window,"10010.1.13"))||"宽度",describeText:(null==(B=window.getLanguageByCode)?void 0:B.call(window,"10010.1.14"))||"说明文本",tips:(null==(C=window.getLanguageByCode)?void 0:C.call(window,"10010.1.15"))||"问号提示",isRequired:(null==(s=window.getLanguageByCode)?void 0:s.call(window,"10010.1.16"))||"是否必填",isEditable:(null==(m=window.getLanguageByCode)?void 0:m.call(window,"10010.1.17"))||"是否可编辑",isExpand:(null==(f=window.getLanguageByCode)?void 0:f.call(window,"10010.1.18"))||"是否默认展开",isFoldAble:(null==(p=window.getLanguageByCode)?void 0:p.call(window,"10010.1.19"))||"是否可折叠",isShow:(null==(h=window.getLanguageByCode)?void 0:h.call(window,"10010.1.20"))||"是否显示",modifyOptionTitle:(null==(N=window.getLanguageByCode)?void 0:N.call(window,"10010.1.21"))||"修改选项文本",modifyOptionName:(null==(b=window.getLanguageByCode)?void 0:b.call(window,"10010.1.22"))||"值",modifyOptionOriginText:(null==(x=window.getLanguageByCode)?void 0:x.call(window,"10010.1.23"))||"原文本",modifyOptionNewText:(null==(O=window.getLanguageByCode)?void 0:O.call(window,"10010.1.24"))||"调整后文本",rowsHeight:(null==(T=window.getLanguageByCode)?void 0:T.call(window,"10010.1.25"))||"高度",rowsTips:(null==(A=window.getLanguageByCode)?void 0:A.call(window,"10010.1.26"))||"默认为3行高度,可调整为1-10行高度",positiveBtn:(null==(S=window.getLanguageByCode)?void 0:S.call(window,"10010.1.27"))||"确定",negativeBtn:(null==(k=window.getLanguageByCode)?void 0:k.call(window,"10010.1.28"))||"取消",fullLine:(null==(E=window.getLanguageByCode)?void 0:E.call(window,"10010.1.29"))||"整行",halfLine:(null==(j=window.getLanguageByCode)?void 0:j.call(window,"10010.1.30"))||"半行",toString(){return this.areaName}}});function F(e){o(q,e),console.log(q)}function H(o){const n=e(o)(q);return n?n+"":""}export{F as registFormConfigLocale,H as useFormConfigLocale};
@@ -1 +1 @@
1
- import{COMPONENT_NAMESPACE as e}from"../../shared/global/variable.js";import{safeComponentRegister as o}from"../../shared/utils/index.js";import s from"./src/FormRenderWrapper.vue.js";export{useAnchor}from"./src/hooks/useAnchor.js";export{BusinessCollector,useBusinessBinding}from"./src/hooks/useBusinessBinding.js";export{ContextCollector,useChangeContext}from"./src/hooks/useChangeContext.js";export{useCommonInjection,useSelectOptionProps}from"./src/hooks/useCommonInjection.js";export{useCommonLog}from"./src/hooks/useCommonLog.js";export{useComplexOptions,useComplexOptionsSpan}from"./src/hooks/useComplexOptions.js";export{useFieldListAdaptor}from"./src/hooks/useFieldListAdaptor.js";export{useFieldNormalize}from"./src/hooks/useFieldNormalize.js";export{useFieldVisitor}from"./src/hooks/useFieldVisitor.js";export{useFormContext}from"./src/hooks/useFormContext.js";export{useFormDomEvent,useFormExposeEvent}from"./src/hooks/useFormEvent.js";export{useFormField}from"./src/hooks/useFormField.js";export{useFormGraph}from"./src/hooks/useFormGraph.js";export{FormItemDepsCollector,useFormItemDeps}from"./src/hooks/useFormItemDeps.js";export{useFormRenderLifeCycle}from"./src/hooks/useFormRenderLifeCycle.js";export{useAutographOptions,useRecommendOptions,useUrlConfigOptions}from"./src/hooks/useFormRenderOptions.js";export{useFormValidator,validateMessageLocale}from"./src/hooks/useFormValidator.js";export{useLowCodeEvent}from"./src/hooks/useLowCodeEvent.js";export{useLowCodeReactions}from"./src/hooks/useLowCodeReactions.js";export{useNuiThemeOverrides}from"./src/hooks/useNuiThemeOverrides.js";export{useOperationalForm}from"./src/hooks/useOperationalForm.js";export{usePresetScope}from"./src/hooks/usePresetScope.js";export{useWordbookSetting,wordbookSettingHandler}from"./src/hooks/useWordbookSetting.js";export{useNewLowCodeReactions}from"./src/hooks/useNewLowCodeReactions.js";export{useSelectedSetting}from"./src/hooks/useSelectedSetting.js";export{FieldListFilter,combineExtendKey,createInputSlot,createSlot,editorUnescape,findItemByValCondition,formRenderLog,getAbsoluteKey,injectOrProvide,isEnter,isNegative,isNestedFieldType,isNestedType,isPositive,mergeDeepProperties,parseEnhanceText,parseNumberFromMaybeString,renderDescOption,replace2Any,splitExtendKey,validateMessageParser}from"./src/utils/index.js";export{businessDateParser,isForeignerID,isIdCard,isMobile,parseAge2Birthday,parseAgeFromContext,parseBirthday,parseIdCard,transformDateFormat}from"./src/utils/business.js";export{findNextWidget,queryDecoratorByAddress,queryDecoratorByFieldKey,queryInput}from"./src/utils/dom.js";export{assignClearBindVisited,assignUpdateValue,assignValueBindKey,createFieldAddressId,createLinebarId,createObjSchema,createVisitedSetter,dotEscape,fieldKeyEscape,getParentLinebar,traverseDependKey,traverseSchema}from"./src/utils/schema.js";const r=s;r.install=function(s){o(s,r,e+"FormRender")};export{r as default};
1
+ import{COMPONENT_NAMESPACE as e}from"../../shared/global/variable.js";import{safeComponentRegister as o}from"../../shared/utils/index.js";import s from"./src/FormRenderWrapper.vue.js";export{useAnchor}from"./src/hooks/useAnchor.js";export{BusinessCollector,useBusinessBinding}from"./src/hooks/useBusinessBinding.js";export{ContextCollector,useChangeContext}from"./src/hooks/useChangeContext.js";export{useCommonInjection,useSelectOptionProps}from"./src/hooks/useCommonInjection.js";export{useCommonLog}from"./src/hooks/useCommonLog.js";export{useComplexOptions,useComplexOptionsSpan}from"./src/hooks/useComplexOptions.js";export{useFieldListAdaptor}from"./src/hooks/useFieldListAdaptor.js";export{useFieldNormalize}from"./src/hooks/useFieldNormalize.js";export{useFieldVisitor}from"./src/hooks/useFieldVisitor.js";export{useFormContext}from"./src/hooks/useFormContext.js";export{useFormDomEvent,useFormExposeEvent}from"./src/hooks/useFormEvent.js";export{useFormField}from"./src/hooks/useFormField.js";export{useFormGraph}from"./src/hooks/useFormGraph.js";export{FormItemDepsCollector,useFormItemDeps}from"./src/hooks/useFormItemDeps.js";export{useFormRenderLifeCycle}from"./src/hooks/useFormRenderLifeCycle.js";export{useAutographOptions,useRecommendOptions,useUrlConfigOptions}from"./src/hooks/useFormRenderOptions.js";export{useFormValidator,validateMessageLocale}from"./src/hooks/useFormValidator.js";export{useLowCodeEvent}from"./src/hooks/useLowCodeEvent.js";export{useLowCodeReactions}from"./src/hooks/useLowCodeReactions.js";export{useNuiThemeOverrides}from"./src/hooks/useNuiThemeOverrides.js";export{useOperationalForm}from"./src/hooks/useOperationalForm.js";export{usePresetScope}from"./src/hooks/usePresetScope.js";export{useWordbookSetting,wordbookSettingHandler}from"./src/hooks/useWordbookSetting.js";export{useNewLowCodeReactions}from"./src/hooks/useNewLowCodeReactions.js";export{useSelectedSetting}from"./src/hooks/useSelectedSetting.js";export{FieldListFilter,combineExtendKey,createInputSlot,createSlot,editorUnescape,findItemByValCondition,formRenderLog,getAbsoluteKey,injectOrProvide,isEnter,isNegative,isNestedFieldType,isNestedType,isPositive,mergeDeepProperties,parseEnhanceText,parseNumberFromMaybeString,renderDescOption,renderOptionLabel,replace2Any,splitExtendKey,validateMessageParser}from"./src/utils/index.js";export{businessDateParser,isForeignerID,isIdCard,isMobile,parseAge2Birthday,parseAgeFromContext,parseBirthday,parseIdCard,transformDateFormat}from"./src/utils/business.js";export{findNextWidget,queryDecoratorByAddress,queryDecoratorByFieldKey,queryInput}from"./src/utils/dom.js";export{assignClearBindVisited,assignUpdateValue,assignValueBindKey,createFieldAddressId,createLinebarId,createObjSchema,createVisitedSetter,dotEscape,fieldKeyEscape,getParentLinebar,traverseDependKey,traverseSchema}from"./src/utils/schema.js";const r=s;r.install=function(s){o(s,r,e+"FormRender")};export{r as default};
@@ -1 +1 @@
1
- import{ref as e,computed as o,watch as r,onBeforeUnmount as t,createVNode as m,mergeProps as a}from"vue";import{autorun as n}from"@formily/reactive";import{AddCircleOutline as i,RemoveCircle as l}from"@vicons/ionicons5";import{isNumber as u,isArray as c,isFunction as d}from"lodash-es";import{NButton as s,NIcon as p}from"naive-ui";import"../../../../../index.js";import{useFormField as v}from"../../../../hooks/useFormField.js";function f(f){var b;const{field:x}=v(),h=e(null!=(b=f.minGroupNum)?b:1),G=o((()=>u(f.maxGroupNum)?f.maxGroupNum<1?0:~~f.maxGroupNum:1/0));r((()=>f.value),(e=>{c(e)&&(h.value=Math.min(Math.max(e.length,f.minGroupNum),G.value))}),{immediate:!0});const N=e([]);return t(n((()=>{c(x.value.value)&&(N.value=x.value.value.map(((e,o)=>d(f.combinationItemDeletable)?f.combinationItemDeletable(e||{},o):f.combinationItemDeletable)))}))),{deletableList:N,currentGroupNum:h,maxGroupNum:G,renderHeader:function(e){return m("header",{class:"form-render__combinationHeader"},[f.showLabel?m("div",{class:"form-render__combinationHeaderText"},[f.title]):null,m(s,a(e,{text:!0,style:{"--n-text-color":"var(--c-primary-color)"},disabled:h.value>=G.value||f.disabled}),{icon:()=>m(p,{component:i},null),default:()=>"新增"})])},renderRemoveBtn:function(e,o){return m(s,a(e,{text:!0,disabled:!N.value[o],type:"error",size:"small"}),{icon:()=>m(p,{component:l},null)})}}}export{f as useCombination};
1
+ import{ref as e,computed as o,watch as r,onBeforeUnmount as n,createVNode as t,mergeProps as a}from"vue";import{autorun as l}from"@formily/reactive";import{AddCircleOutline as i,RemoveCircle as m}from"@vicons/ionicons5";import{isNumber as u,isArray as d,isFunction as c}from"lodash-es";import{NButton as s,NIcon as v}from"naive-ui";import"../../../../../index.js";import{useFormField as p}from"../../../../hooks/useFormField.js";function f(f){var b;const{field:x}=p(),h=e(null!=(b=f.minGroupNum)?b:1),G=o((()=>u(f.maxGroupNum)?f.maxGroupNum<1?0:~~f.maxGroupNum:1/0));r((()=>f.value),(e=>{d(e)&&(h.value=Math.min(Math.max(e.length,f.minGroupNum),G.value))}),{immediate:!0});const N=e([]);return n(l((()=>{d(x.value.value)&&(N.value=x.value.value.map(((e,o)=>c(f.combinationItemDeletable)?f.combinationItemDeletable(e||{},o):f.combinationItemDeletable)))}))),{deletableList:N,currentGroupNum:h,maxGroupNum:G,renderHeader:function(e){return t("header",{class:"form-render__combinationHeader"},[f.showLabel?t("div",{class:"form-render__combinationHeaderText"},[f.title]):null,t(s,a(e,{text:!0,style:{"--n-text-color":"var(--c-primary-color)"},disabled:h.value>=G.value||f.disabled}),{icon:()=>t(v,{component:i},null),default:()=>{var e;return(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.279"))||"新增"}})])},renderRemoveBtn:function(e,o){return t(s,a(e,{text:!0,disabled:!N.value[o],type:"error",size:"small"}),{icon:()=>t(v,{component:m},null)})}}}export{f as useCombination};
@@ -1 +1 @@
1
- import{defineComponent as e,ref as o,computed as r,watch as n,onMounted as t,createVNode as i}from"vue";import{isField as l}from"@formily/core";import{Path as u}from"@formily/path";import{AddCircleOutline as a,RemoveCircle as m}from"@vicons/ionicons5";import{range as s,isNumber as p,isArray as c,isEqual as f}from"lodash-es";import"../../../../index.js";import{useDeepValidate as v}from"./hooks/useDeepValidate.js";import{connect as d,mapProps as y}from"@formily/vue";import{useDebounceFn as h,isObject as N}from"@vueuse/core";import{NButton as b,NIcon as g}from"naive-ui";import x from"../../../FormRender.vue.js";import{formRenderLog as _,mergeDeepProperties as j}from"../../../utils/index.js";import{assignUpdateValue as C}from"../../../utils/schema.js";const G=d(e({name:"FormJsonCombination",props:{title:{type:String,default:""},value:{type:[String,Array]},maxGroupNum:{type:Number},minGroupNum:{type:Number,default:1},properties:{type:Array,default:()=>[]},showLabel:Boolean,onInput:{},onBlur:{},onChange:{}},emits:["update:value"],setup(e,{emit:d}){_("当前COMBINATION控件为json模式,推荐使用非json模式,FieldItem.jsonCombination=false");const y=h((function(){d("update:value",JSON.stringify(C.value))}),300),C=o([]),G=r((()=>C.value.length));function I(o,r=!1){c(o)&&(o.length||o.push(...s(e.minGroupNum).map((()=>({})))),o=JSON.stringify(o));const n=function(e){try{if(!e)return null;const o=JSON.parse(e);return Array.isArray(o)?o:null}catch(e){return null}}(o);var t;(t=n)&&!f(t,C.value)&&(n.splice(J.value),n.forEach((function(o,n){if(!N(o))return;C.value[n]=o,r&&j(o,e.properties)})),C.value.splice(n.length),C.value.forEach(A))}n((()=>e.value),(e=>I(e))),t((()=>{const o=`[${s(e.minGroupNum).map((()=>"{}")).join(",")}]`;I(e.value||o,!0),y()}));const S=o([]);function A(e,o){var r;null==(r=S.value[o])||r.setFieldState("*",(o=>{l(o)&&(o.value=u.getIn(e,o.path))}))}function F(){C.value.push(j({},e.properties)),y()}v().bindDeepValidate(S);const J=r((()=>p(e.maxGroupNum)?e.maxGroupNum<1?0:~~e.maxGroupNum:1/0));n(J,(e=>{G.value<=e||(C.value.splice(e),y(),S.value.splice(e))}),{immediate:!0});const O=x;return()=>i("section",{class:"form-render__combination"},[i("header",{class:"form-render__combinationHeader"},[i("div",{class:"form-render__combinationHeaderText"},[e.title]),i(b,{onClick:F,style:{"--n-text-color":"var(--c-primary-color)"},text:!0,disabled:G.value>=J.value},{icon:()=>i(g,{component:a},null),default:()=>"新增"})]),s(G.value).map(((o,r)=>i("section",{class:"form-render__combinationContentJson"},[i(O,{ref:e=>function(e,o){S.value[e]=o,A(C.value[e]||{},e)}(r,e),fieldList:e.properties,onFormChange:e=>function(e,{fieldKey:o,value:r}){!C.value[e]&&(C.value[e]={}),u.setIn(C.value[e],o,r),y()}(r,e)},null),i(b,{text:!0,class:"form-render__combinationClose",type:"error",onClick:()=>function(o){C.value.length>e.minGroupNum?(C.value.splice(o,1),S.value.splice(o,1)):C.value.splice(o,1,{}),y()}(r)},{icon:()=>i(g,{component:m},null)})])))])}}),y(C));export{G as JSON_COMBINATION};
1
+ import{defineComponent as e,ref as o,computed as r,watch as n,onMounted as t,createVNode as i}from"vue";import{isField as l}from"@formily/core";import{Path as a}from"@formily/path";import{AddCircleOutline as u,RemoveCircle as m}from"@vicons/ionicons5";import{range as s,isNumber as p,isArray as c,isEqual as f}from"lodash-es";import"../../../../index.js";import{useDeepValidate as v}from"./hooks/useDeepValidate.js";import{connect as d,mapProps as y}from"@formily/vue";import{useDebounceFn as h,isObject as N}from"@vueuse/core";import{NButton as g,NIcon as b}from"naive-ui";import x from"../../../FormRender.vue.js";import{formRenderLog as C,mergeDeepProperties as _}from"../../../utils/index.js";import{assignUpdateValue as j}from"../../../utils/schema.js";const G=d(e({name:"FormJsonCombination",props:{title:{type:String,default:""},value:{type:[String,Array]},maxGroupNum:{type:Number},minGroupNum:{type:Number,default:1},properties:{type:Array,default:()=>[]},showLabel:Boolean,onInput:{},onBlur:{},onChange:{}},emits:["update:value"],setup(e,{emit:d}){C("当前COMBINATION控件为json模式,推荐使用非json模式,FieldItem.jsonCombination=false");const y=h((function(){d("update:value",JSON.stringify(j.value))}),300),j=o([]),G=r((()=>j.value.length));function I(o,r=!1){c(o)&&(o.length||o.push(...s(e.minGroupNum).map((()=>({})))),o=JSON.stringify(o));const n=function(e){try{if(!e)return null;const o=JSON.parse(e);return Array.isArray(o)?o:null}catch(e){return null}}(o);var t;(t=n)&&!f(t,j.value)&&(n.splice(F.value),n.forEach((function(o,n){if(!N(o))return;j.value[n]=o,r&&_(o,e.properties)})),j.value.splice(n.length),j.value.forEach(w))}n((()=>e.value),(e=>I(e))),t((()=>{const o=`[${s(e.minGroupNum).map((()=>"{}")).join(",")}]`;I(e.value||o,!0),y()}));const S=o([]);function w(e,o){var r;null==(r=S.value[o])||r.setFieldState("*",(o=>{l(o)&&(o.value=a.getIn(e,o.path))}))}function A(){j.value.push(_({},e.properties)),y()}v().bindDeepValidate(S);const F=r((()=>p(e.maxGroupNum)?e.maxGroupNum<1?0:~~e.maxGroupNum:1/0));n(F,(e=>{G.value<=e||(j.value.splice(e),y(),S.value.splice(e))}),{immediate:!0});const J=x;return()=>i("section",{class:"form-render__combination"},[i("header",{class:"form-render__combinationHeader"},[i("div",{class:"form-render__combinationHeaderText"},[e.title]),i(g,{onClick:A,style:{"--n-text-color":"var(--c-primary-color)"},text:!0,disabled:G.value>=F.value},{icon:()=>i(b,{component:u},null),default:()=>{var e;return(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.279"))||"新增"}})]),s(G.value).map(((o,r)=>i("section",{class:"form-render__combinationContentJson"},[i(J,{ref:e=>function(e,o){S.value[e]=o,w(j.value[e]||{},e)}(r,e),fieldList:e.properties,onFormChange:e=>function(e,{fieldKey:o,value:r}){!j.value[e]&&(j.value[e]={}),a.setIn(j.value[e],o,r),y()}(r,e)},null),i(g,{text:!0,class:"form-render__combinationClose",type:"error",onClick:()=>function(o){j.value.length>e.minGroupNum?(j.value.splice(o,1),S.value.splice(o,1)):j.value.splice(o,1,{}),y()}(r)},{icon:()=>i(b,{component:m},null)})])))])}}),y(j));export{G as JSON_COMBINATION};