@farris/ui-vue 1.7.1 → 1.7.2-beta.2

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 (431) hide show
  1. package/components/accordion/index.esm.js +312 -61
  2. package/components/accordion/index.umd.cjs +1 -1
  3. package/components/avatar/index.esm.js +1492 -59
  4. package/components/avatar/index.umd.cjs +1 -1
  5. package/components/binding-selector/index.esm.js +752 -8
  6. package/components/binding-selector/index.umd.cjs +1 -1
  7. package/components/button-edit/index.esm.js +1 -1
  8. package/components/button-edit/index.umd.cjs +1 -1
  9. package/components/button-group/index.esm.js +266 -110
  10. package/components/button-group/index.umd.cjs +1 -1
  11. package/components/calendar/index.esm.js +344 -341
  12. package/components/calendar/index.umd.cjs +3 -3
  13. package/components/code-editor/index.esm.js +237 -169
  14. package/components/code-editor/index.umd.cjs +3 -3
  15. package/components/collection-property-editor/index.esm.js +302 -299
  16. package/components/collection-property-editor/index.umd.cjs +2 -2
  17. package/components/color-picker/index.esm.js +812 -502
  18. package/components/color-picker/index.umd.cjs +1 -1
  19. package/components/combo-list/index.esm.js +329 -292
  20. package/components/combo-list/index.umd.cjs +1 -1
  21. package/components/combo-tree/index.esm.js +355 -174
  22. package/components/combo-tree/index.umd.cjs +1 -1
  23. package/components/comment/index.esm.js +294 -291
  24. package/components/comment/index.umd.cjs +6 -6
  25. package/components/common/index.esm.js +1 -1
  26. package/components/common/index.umd.cjs +1 -1
  27. package/components/component/index.esm.js +4390 -2708
  28. package/components/component/index.umd.cjs +8 -1
  29. package/components/condition/index.esm.js +3140 -487
  30. package/components/condition/index.umd.cjs +8 -1
  31. package/components/data-grid/index.esm.js +4 -2
  32. package/components/data-grid/index.umd.cjs +1 -1
  33. package/components/data-view/index.esm.js +1859 -1832
  34. package/components/data-view/index.umd.cjs +1 -1
  35. package/components/date-picker/index.esm.js +1 -1
  36. package/components/date-picker/index.umd.cjs +1 -1
  37. package/components/designer-canvas/index.esm.js +3731 -2717
  38. package/components/designer-canvas/index.umd.cjs +1 -1
  39. package/components/drawer/index.esm.js +417 -405
  40. package/components/drawer/index.umd.cjs +2 -2
  41. package/components/dropdown/index.esm.js +373 -124
  42. package/components/dropdown/index.umd.cjs +2 -2
  43. package/components/dynamic-form/index.esm.js +1245 -1895
  44. package/components/dynamic-form/index.umd.cjs +1 -1
  45. package/components/dynamic-resolver/index.esm.js +275 -271
  46. package/components/dynamic-resolver/index.umd.cjs +2 -2
  47. package/components/dynamic-view/index.esm.js +529 -450
  48. package/components/dynamic-view/index.umd.cjs +1 -1
  49. package/components/event-parameter/index.esm.js +1 -1
  50. package/components/event-parameter/index.umd.cjs +1 -1
  51. package/components/events-editor/index.esm.js +2613 -1544
  52. package/components/events-editor/index.umd.cjs +3 -3
  53. package/components/expression-editor/index.css +1 -1
  54. package/components/expression-editor/index.esm.js +7376 -2
  55. package/components/expression-editor/index.umd.cjs +427 -1
  56. package/components/fieldset/index.esm.js +1 -1
  57. package/components/fieldset/index.umd.cjs +1 -1
  58. package/components/filter-bar/index.esm.js +423 -415
  59. package/components/filter-bar/index.umd.cjs +2 -2
  60. package/components/filter-condition-editor/index.css +1 -1
  61. package/components/filter-condition-editor/index.esm.js +9049 -425
  62. package/components/filter-condition-editor/index.umd.cjs +427 -1
  63. package/components/html-template/index.esm.js +33 -36
  64. package/components/html-template/index.umd.cjs +1 -1
  65. package/components/image/index.esm.js +364 -355
  66. package/components/image/index.umd.cjs +2 -2
  67. package/components/image-cropper/index.esm.js +615 -361
  68. package/components/image-cropper/index.umd.cjs +1 -1
  69. package/components/json-editor/index.esm.js +325 -247
  70. package/components/json-editor/index.umd.cjs +1 -1
  71. package/components/language-textbox/index.esm.js +411 -409
  72. package/components/language-textbox/index.umd.cjs +2 -2
  73. package/components/layout/index.esm.js +549 -163
  74. package/components/layout/index.umd.cjs +1 -1
  75. package/components/list-nav/index.esm.js +837 -39
  76. package/components/list-nav/index.umd.cjs +1 -1
  77. package/components/list-view/index.esm.js +427 -646
  78. package/components/list-view/index.umd.cjs +6 -6
  79. package/components/lookup/index.esm.js +3624 -3625
  80. package/components/lookup/index.umd.cjs +1 -1
  81. package/components/mapping-editor/index.esm.js +5 -3
  82. package/components/mapping-editor/index.umd.cjs +1 -1
  83. package/components/menu-lookup/index.esm.js +577 -536
  84. package/components/menu-lookup/index.umd.cjs +6 -6
  85. package/components/nav/index.esm.js +311 -31
  86. package/components/nav/index.umd.cjs +1 -1
  87. package/components/number-range/index.esm.js +1641 -189
  88. package/components/number-range/index.umd.cjs +1 -1
  89. package/components/number-spinner/index.esm.js +82 -82
  90. package/components/number-spinner/index.umd.cjs +1 -1
  91. package/components/order/index.esm.js +1196 -851
  92. package/components/order/index.umd.cjs +6 -6
  93. package/components/page-footer/index.esm.js +331 -48
  94. package/components/page-footer/index.umd.cjs +1 -1
  95. package/components/page-header/index.esm.js +110 -116
  96. package/components/page-header/index.umd.cjs +1 -1
  97. package/components/pagination/index.esm.js +509 -232
  98. package/components/pagination/index.umd.cjs +1 -1
  99. package/components/progress/index.esm.js +353 -148
  100. package/components/progress/index.umd.cjs +3 -3
  101. package/components/property-editor/index.esm.js +157 -153
  102. package/components/property-editor/index.umd.cjs +1 -1
  103. package/components/property-panel/index.esm.js +1817 -854
  104. package/components/property-panel/index.umd.cjs +12 -5
  105. package/components/query-solution/index.css +1 -1
  106. package/components/query-solution/index.esm.js +6858 -3984
  107. package/components/query-solution/index.umd.cjs +13 -6
  108. package/components/response-layout/index.esm.js +1 -1
  109. package/components/response-layout/index.umd.cjs +1 -1
  110. package/components/schema-selector/index.esm.js +2448 -2222
  111. package/components/schema-selector/index.umd.cjs +7 -7
  112. package/components/search-box/index.esm.js +244 -72
  113. package/components/search-box/index.umd.cjs +1 -1
  114. package/components/section/index.esm.js +212 -209
  115. package/components/section/index.umd.cjs +2 -2
  116. package/components/smoke-detector/index.esm.js +179 -8
  117. package/components/smoke-detector/index.umd.cjs +1 -1
  118. package/components/sort-condition-editor/index.css +1 -0
  119. package/components/sort-condition-editor/index.esm.js +9493 -4
  120. package/components/sort-condition-editor/index.umd.cjs +427 -1
  121. package/components/splitter/index.esm.js +1172 -142
  122. package/components/splitter/index.umd.cjs +1 -1
  123. package/components/step/index.esm.js +47 -48
  124. package/components/step/index.umd.cjs +1 -1
  125. package/components/tabs/index.esm.js +490 -419
  126. package/components/tabs/index.umd.cjs +1 -1
  127. package/components/text/index.esm.js +217 -73
  128. package/components/text/index.umd.cjs +1 -1
  129. package/components/textarea/index.esm.js +29 -27
  130. package/components/textarea/index.umd.cjs +2 -2
  131. package/components/transfer/index.esm.js +760 -543
  132. package/components/transfer/index.umd.cjs +5 -5
  133. package/components/tree-grid/index.esm.js +129 -128
  134. package/components/tree-grid/index.umd.cjs +1 -1
  135. package/components/tree-view/index.esm.js +320 -153
  136. package/components/tree-view/index.umd.cjs +1 -1
  137. package/components/uploader/index.esm.js +1112 -607
  138. package/components/uploader/index.umd.cjs +2 -2
  139. package/components/verify-detail/index.esm.js +359 -106
  140. package/components/verify-detail/index.umd.cjs +1 -1
  141. package/components/video/index.esm.js +222 -89
  142. package/components/video/index.umd.cjs +1 -1
  143. package/components/weather/index.esm.js +290 -199
  144. package/components/weather/index.umd.cjs +1 -1
  145. package/designer/data-grid/index.esm.js +5301 -4507
  146. package/designer/data-grid/index.umd.cjs +17 -10
  147. package/designer/drawer/index.esm.js +626 -615
  148. package/designer/drawer/index.umd.cjs +2 -2
  149. package/designer/dynamic-form/index.esm.js +2043 -1290
  150. package/designer/dynamic-form/index.umd.cjs +8 -1
  151. package/designer/farris-designer.all.esm.js +14263 -12505
  152. package/designer/farris-designer.all.umd.cjs +16 -16
  153. package/designer/list-view/index.esm.js +327 -327
  154. package/designer/list-view/index.umd.cjs +3 -3
  155. package/designer/modal/index.esm.js +29 -137
  156. package/designer/modal/index.umd.cjs +1 -1
  157. package/designer/radio-group/index.esm.js +238 -232
  158. package/designer/radio-group/index.umd.cjs +1 -1
  159. package/designer/response-layout-editor/index.esm.js +178 -171
  160. package/designer/response-layout-editor/index.umd.cjs +1 -1
  161. package/designer/response-toolbar/index.esm.js +1 -1
  162. package/designer/response-toolbar/index.umd.cjs +1 -1
  163. package/designer/section/index.esm.js +1 -6
  164. package/designer/section/index.umd.cjs +1 -1
  165. package/designer/tabs/index.esm.js +3431 -2493
  166. package/designer/tabs/index.umd.cjs +2 -2
  167. package/designer/time-picker/index.esm.js +195 -188
  168. package/designer/time-picker/index.umd.cjs +1 -1
  169. package/designer/tree-grid/index.esm.js +822 -464
  170. package/designer/tree-grid/index.umd.cjs +1 -1
  171. package/farris.all.esm.js +77525 -74884
  172. package/farris.all.umd.cjs +93 -93
  173. package/index.css +1 -1
  174. package/package.json +1 -1
  175. package/types/accordion/src/accordion.props.d.ts +1 -0
  176. package/types/accordion/src/components/accordion-item.props.d.ts +1 -0
  177. package/types/avatar/src/avatar.props.d.ts +1 -0
  178. package/types/binding-selector/index.d.ts +54 -0
  179. package/types/binding-selector/src/binding-selector.props.d.ts +1 -0
  180. package/types/button-group/index.d.ts +0 -15
  181. package/types/button-group/src/button-group.props.d.ts +1 -0
  182. package/types/code-editor/index.d.ts +1 -0
  183. package/types/code-editor/src/code-textbox.component.d.ts +6 -6
  184. package/types/code-editor/src/code-textbox.props.d.ts +2 -0
  185. package/types/color-picker/index.d.ts +15 -0
  186. package/types/color-picker/src/color-picker.props.d.ts +1 -0
  187. package/types/combo-list/src/composition/use-data-source.d.ts +2 -1
  188. package/types/combo-tree/src/combo-tree.props.d.ts +1 -0
  189. package/types/component/index.d.ts +2 -0
  190. package/types/component/src/component.props.d.ts +8 -0
  191. package/types/components.d.ts +8 -1
  192. package/types/condition/index.d.ts +55 -0
  193. package/types/condition/src/composition/condition-value/dropdown-value.d.ts +4 -0
  194. package/types/data-view/composition/types.d.ts +1 -1
  195. package/types/designer-canvas/src/composition/dg-control.d.ts +24 -0
  196. package/types/designer-toolbox/index.d.ts +3 -0
  197. package/types/designer-toolbox/src/toolbox.component.d.ts +14 -0
  198. package/types/designer-toolbox/src/toolbox.props.d.ts +29 -0
  199. package/types/designer-toolbox/src/types.d.ts +21 -0
  200. package/types/designer.d.ts +13 -0
  201. package/types/dropdown/index.d.ts +6 -27
  202. package/types/dropdown/src/dropdown.item.component.d.ts +1 -1
  203. package/types/dropdown/src/dropdown.props.d.ts +1 -0
  204. package/types/dynamic-form/designer.d.ts +1 -4
  205. package/types/dynamic-form/index.d.ts +6 -11
  206. package/types/dynamic-form/src/component/dynamic-form-label/dynamic-form-label.component.d.ts +3 -3
  207. package/types/dynamic-form/src/designer/dynamic-form.design.component.d.ts +8 -0
  208. package/types/dynamic-form/src/designer/response-form.design.props.d.ts +14 -0
  209. package/types/dynamic-form/src/designer/use-dynamic-form-rules.d.ts +2 -0
  210. package/types/dynamic-form/src/dynamic-form.component.d.ts +8 -0
  211. package/types/dynamic-form/src/response-form.props.d.ts +13 -1
  212. package/types/dynamic-form/src/schema/response-form-schema-resolver.d.ts +1 -0
  213. package/types/dynamic-form/src/types.d.ts +1 -0
  214. package/types/dynamic-resolver/index.d.ts +0 -3
  215. package/types/dynamic-resolver/src/resolver/property-config/property-config-resolver-design.d.ts +1 -1
  216. package/types/dynamic-resolver/src/resolver/property-config/property-config-resolver.d.ts +1 -1
  217. package/types/dynamic-resolver/src/resolver/property-config/use-property-config-resolver.d.ts +2 -2
  218. package/types/dynamic-resolver/src/resolver/schema/schema-resolver-design.d.ts +1 -1
  219. package/types/dynamic-resolver/src/resolver/schema/schema-resolver.d.ts +1 -1
  220. package/types/dynamic-resolver/src/types.d.ts +1 -0
  221. package/types/dynamic-view/index.d.ts +43 -3
  222. package/types/dynamic-view/src/components/maps.d.ts +110 -98
  223. package/types/dynamic-view/src/composition/index.d.ts +5 -0
  224. package/types/dynamic-view/src/composition/use-utils.d.ts +12 -0
  225. package/types/dynamic-view/src/dynamic-view.component.d.ts +6 -6
  226. package/types/{binding-selector/designer.d.ts → expression-editor/index.d.ts} +6 -6
  227. package/types/filter-condition-editor/index.d.ts +9 -0
  228. package/types/filter-condition-editor/src/components/filter-condition-grid.component.d.ts +12 -12
  229. package/types/filter-condition-editor/src/components/sort-editor-grid.component.d.ts +12 -12
  230. package/types/filter-condition-editor/src/filter-condition-editor.props.d.ts +1 -0
  231. package/types/flow-canvas/index.d.ts +3 -0
  232. package/types/flow-canvas/src/components/flow-node-item.component.d.ts +8 -0
  233. package/types/flow-canvas/src/components/flow-node-item.props.d.ts +3 -0
  234. package/types/flow-canvas/src/composition/types.d.ts +42 -0
  235. package/types/flow-canvas/src/composition/use-bezier-curve.d.ts +2 -0
  236. package/types/flow-canvas/src/composition/use-connections.d.ts +2 -0
  237. package/types/flow-canvas/src/composition/use-curve.d.ts +4 -0
  238. package/types/flow-canvas/src/composition/use-drawing-bezier.d.ts +2 -0
  239. package/types/flow-canvas/src/composition/use-drawing.d.ts +4 -0
  240. package/types/flow-canvas/src/flow-canvas.component.d.ts +8 -0
  241. package/types/flow-canvas/src/flow-canvas.props.d.ts +3 -0
  242. package/types/image-cropper/src/image-cropper.props.d.ts +1 -0
  243. package/types/index.d.ts +1 -0
  244. package/types/json-editor/src/json-editor.props.d.ts +1 -0
  245. package/types/language-textbox/index.d.ts +3 -3
  246. package/types/language-textbox/src/components/language-contents.component.d.ts +1 -1
  247. package/types/language-textbox/src/language-textbox.component.d.ts +1 -1
  248. package/types/layout/index.d.ts +0 -1
  249. package/types/layout/src/components/layout-pane.props.d.ts +1 -0
  250. package/types/layout/src/designer/layout-pane-use-designer-rules.d.ts +2 -0
  251. package/types/layout/src/designer/layout-pane.design.component.d.ts +8 -0
  252. package/types/layout/src/designer/layout-use-designer-rules.d.ts +2 -0
  253. package/types/layout/src/designer/layout.design.component.d.ts +8 -0
  254. package/types/layout/src/layout.props.d.ts +1 -0
  255. package/types/layout/src/schema/schema-mapper.d.ts +2 -0
  256. package/types/layout/src/schema/schema-resolver.d.ts +2 -0
  257. package/types/list-nav/index.d.ts +5 -24
  258. package/types/list-nav/src/designer/use-designer-rules.d.ts +2 -0
  259. package/types/list-nav/src/list-nav.props.d.ts +1 -0
  260. package/types/list-nav/src/property-config/list-nav.property-config.d.ts +8 -0
  261. package/types/list-nav/src/schema/schema-mapper.d.ts +2 -0
  262. package/types/list-nav/src/schema/schema-resolver.d.ts +2 -0
  263. package/types/list-view/index.d.ts +0 -1
  264. package/types/list-view/src/composition/use-draggable.d.ts +1 -1
  265. package/types/lookup/index.d.ts +1 -1
  266. package/types/lookup/src/components/popup-container.component.d.ts +3 -3
  267. package/types/menu-lookup/src/menu-lookup.props.d.ts +1 -0
  268. package/types/modal/designer.d.ts +0 -2
  269. package/types/nav/index.d.ts +20 -24
  270. package/types/nav/src/nav.props.d.ts +1 -0
  271. package/types/number-range/src/number-range.props.d.ts +1 -0
  272. package/types/order/index.d.ts +5 -36
  273. package/types/order/src/designer/order.design.component.d.ts +1 -1
  274. package/types/order/src/order.props.d.ts +1 -0
  275. package/types/page-footer/index.d.ts +2 -0
  276. package/types/page-footer/src/page-footer.props.d.ts +1 -0
  277. package/types/pagination/index.d.ts +0 -15
  278. package/types/pagination/src/pagination.props.d.ts +1 -0
  279. package/types/progress/src/progress.props.d.ts +1 -0
  280. package/types/property-panel/src/property-panel.component.d.ts +3 -3
  281. package/types/query-solution/index.d.ts +2 -1
  282. package/types/radio-group/designer.d.ts +1 -2
  283. package/types/search-box/index.d.ts +17 -1
  284. package/types/search-box/src/search-box.props.d.ts +1 -0
  285. package/types/section/designer.d.ts +0 -1
  286. package/types/smoke-detector/index.d.ts +2 -0
  287. package/types/smoke-detector/src/smoke-detector.props.d.ts +1 -0
  288. package/types/sort-condition-editor/index.d.ts +7 -2
  289. package/types/sort-condition-editor/src/sort-condition-editor.props.d.ts +1 -0
  290. package/types/splitter/index.d.ts +0 -1
  291. package/types/splitter/src/components/splitter-pane.props.d.ts +1 -0
  292. package/types/splitter/src/splitter.props.d.ts +1 -0
  293. package/types/tabs/designer.d.ts +0 -1
  294. package/types/tabs/index.d.ts +1 -0
  295. package/types/text/index.d.ts +20 -24
  296. package/types/text/src/text.props.d.ts +1 -0
  297. package/types/transfer/src/transfer.props.d.ts +1 -0
  298. package/types/tree-view/src/tree-view.props.d.ts +1 -0
  299. package/types/uploader/src/uploader.props.d.ts +1 -0
  300. package/types/verify-detail/index.d.ts +5 -58
  301. package/types/verify-detail/src/designer/verify-detail.design.component.d.ts +8 -8
  302. package/types/verify-detail/src/verify-detail.props.d.ts +1 -0
  303. package/types/video/index.d.ts +20 -24
  304. package/types/video/src/video.props.d.ts +1 -0
  305. package/components/dynamic-form/index.css +0 -1
  306. package/designer/accordion/index.esm.js +0 -257
  307. package/designer/accordion/index.umd.cjs +0 -1
  308. package/designer/avatar/index.esm.js +0 -1460
  309. package/designer/avatar/index.umd.cjs +0 -1
  310. package/designer/binding-selector/index.esm.js +0 -792
  311. package/designer/binding-selector/index.umd.cjs +0 -1
  312. package/designer/button-group/index.esm.js +0 -282
  313. package/designer/button-group/index.umd.cjs +0 -1
  314. package/designer/code-editor/index.esm.js +0 -75
  315. package/designer/code-editor/index.umd.cjs +0 -1
  316. package/designer/color-picker/index.esm.js +0 -1096
  317. package/designer/color-picker/index.umd.cjs +0 -1
  318. package/designer/combo-list/index.esm.js +0 -1095
  319. package/designer/combo-list/index.umd.cjs +0 -1
  320. package/designer/combo-tree/index.esm.js +0 -186
  321. package/designer/combo-tree/index.umd.cjs +0 -1
  322. package/designer/component/index.css +0 -1
  323. package/designer/component/index.esm.js +0 -5002
  324. package/designer/component/index.umd.cjs +0 -1
  325. package/designer/condition/index.esm.js +0 -1899
  326. package/designer/condition/index.umd.cjs +0 -1
  327. package/designer/dropdown/index.esm.js +0 -261
  328. package/designer/dropdown/index.umd.cjs +0 -1
  329. package/designer/expression-editor/index.css +0 -1
  330. package/designer/expression-editor/index.esm.js +0 -7006
  331. package/designer/expression-editor/index.umd.cjs +0 -427
  332. package/designer/filter-condition-editor/index.css +0 -1
  333. package/designer/filter-condition-editor/index.esm.js +0 -4795
  334. package/designer/filter-condition-editor/index.umd.cjs +0 -1
  335. package/designer/html-template/index.esm.js +0 -718
  336. package/designer/html-template/index.umd.cjs +0 -1
  337. package/designer/image-cropper/index.esm.js +0 -765
  338. package/designer/image-cropper/index.umd.cjs +0 -1
  339. package/designer/json-editor/index.esm.js +0 -83
  340. package/designer/json-editor/index.umd.cjs +0 -1
  341. package/designer/language-textbox/index.esm.js +0 -783
  342. package/designer/language-textbox/index.umd.cjs +0 -8
  343. package/designer/layout/index.esm.js +0 -430
  344. package/designer/layout/index.umd.cjs +0 -1
  345. package/designer/list-nav/index.esm.js +0 -802
  346. package/designer/list-nav/index.umd.cjs +0 -1
  347. package/designer/lookup/index.esm.js +0 -2083
  348. package/designer/lookup/index.umd.cjs +0 -1
  349. package/designer/menu-lookup/index.esm.js +0 -46
  350. package/designer/menu-lookup/index.umd.cjs +0 -1
  351. package/designer/nav/index.esm.js +0 -284
  352. package/designer/nav/index.umd.cjs +0 -1
  353. package/designer/number-range/index.esm.js +0 -1616
  354. package/designer/number-range/index.umd.cjs +0 -1
  355. package/designer/order/index.css +0 -1
  356. package/designer/order/index.esm.js +0 -2196
  357. package/designer/order/index.umd.cjs +0 -18
  358. package/designer/page-footer/index.esm.js +0 -290
  359. package/designer/page-footer/index.umd.cjs +0 -1
  360. package/designer/page-header/index.esm.js +0 -1003
  361. package/designer/page-header/index.umd.cjs +0 -1
  362. package/designer/pagination/index.esm.js +0 -591
  363. package/designer/pagination/index.umd.cjs +0 -1
  364. package/designer/progress/index.esm.js +0 -213
  365. package/designer/progress/index.umd.cjs +0 -1
  366. package/designer/search-box/index.esm.js +0 -245
  367. package/designer/search-box/index.umd.cjs +0 -1
  368. package/designer/smoke-detector/index.css +0 -1
  369. package/designer/smoke-detector/index.esm.js +0 -178
  370. package/designer/smoke-detector/index.umd.cjs +0 -1
  371. package/designer/sort-condition-editor/index.esm.js +0 -138
  372. package/designer/sort-condition-editor/index.umd.cjs +0 -1
  373. package/designer/splitter/index.esm.js +0 -1120
  374. package/designer/splitter/index.umd.cjs +0 -1
  375. package/designer/step/index.esm.js +0 -226
  376. package/designer/step/index.umd.cjs +0 -1
  377. package/designer/text/index.esm.js +0 -147
  378. package/designer/text/index.umd.cjs +0 -1
  379. package/designer/transfer/index.esm.js +0 -254
  380. package/designer/transfer/index.umd.cjs +0 -1
  381. package/designer/tree-view/index.esm.js +0 -313
  382. package/designer/tree-view/index.umd.cjs +0 -1
  383. package/designer/uploader/index.esm.js +0 -1190
  384. package/designer/uploader/index.umd.cjs +0 -2
  385. package/designer/verify-detail/index.esm.js +0 -258
  386. package/designer/verify-detail/index.umd.cjs +0 -1
  387. package/designer/video/index.esm.js +0 -136
  388. package/designer/video/index.umd.cjs +0 -1
  389. package/designer/weather/index.css +0 -1
  390. package/designer/weather/index.esm.js +0 -6244
  391. package/designer/weather/index.umd.cjs +0 -14
  392. package/types/accordion/designer.d.ts +0 -44
  393. package/types/avatar/designer.d.ts +0 -29
  394. package/types/button-group/designer.d.ts +0 -29
  395. package/types/code-editor/designer.d.ts +0 -5
  396. package/types/color-picker/designer.d.ts +0 -29
  397. package/types/combo-list/designer.d.ts +0 -29
  398. package/types/combo-list/src/designer/combo-list.design.props.d.ts +0 -6
  399. package/types/combo-tree/designer.d.ts +0 -5
  400. package/types/component/designer.d.ts +0 -35
  401. package/types/condition/designer.d.ts +0 -56
  402. package/types/dropdown/designer.d.ts +0 -6
  403. package/types/dynamic-form/src/composition/use-input-type-resolver.d.ts +0 -11
  404. package/types/expression-editor/designer.d.ts +0 -9
  405. package/types/filter-condition-editor/designer.d.ts +0 -10
  406. package/types/html-template/designer.d.ts +0 -31
  407. package/types/html-template/src/designer/html-template.design.props.d.ts +0 -9
  408. package/types/image-cropper/designer.d.ts +0 -4
  409. package/types/json-editor/designer.d.ts +0 -5
  410. package/types/menu-lookup/designer.d.ts +0 -5
  411. package/types/nav/designer.d.ts +0 -6
  412. package/types/number-range/designer.d.ts +0 -29
  413. package/types/order/designer.d.ts +0 -6
  414. package/types/page-footer/designer.d.ts +0 -6
  415. package/types/page-header/src/designer/page-header.design.props.d.ts +0 -20
  416. package/types/pagination/designer.d.ts +0 -29
  417. package/types/progress/designer.d.ts +0 -29
  418. package/types/search-box/designer.d.ts +0 -52
  419. package/types/smoke-detector/designer.d.ts +0 -6
  420. package/types/sort-condition-editor/designer.d.ts +0 -9
  421. package/types/splitter/designer.d.ts +0 -32
  422. package/types/step/designer.d.ts +0 -6
  423. package/types/text/designer.d.ts +0 -6
  424. package/types/transfer/designer.d.ts +0 -35
  425. package/types/tree-view/designer.d.ts +0 -29
  426. package/types/uploader/designer.d.ts +0 -141
  427. package/types/verify-detail/designer.d.ts +0 -6
  428. package/types/video/designer.d.ts +0 -6
  429. /package/{designer → components}/condition/index.css +0 -0
  430. /package/{designer → components}/uploader/index.css +0 -0
  431. /package/types/{dynamic-form/src/component/form-control/form-control.component.d.ts → list-nav/src/designer/list-nav.design.component.d.ts} +0 -0
@@ -1,134 +1,712 @@
1
- var Ze = Object.defineProperty;
2
- var We = (e, t, n) => t in e ? Ze(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var le = (e, t, n) => We(e, typeof t != "symbol" ? t + "" : t, n);
4
- import { defineComponent as H, ref as V, computed as Z, withDirectives as Ie, createVNode as F, resolveDirective as Be, watch as oe, createTextVNode as ee, mergeProps as ce, inject as te, onMounted as me } from "vue";
5
- import { LocaleService as Je } from "../locale/index.esm.js";
6
- import ze from "../../designer/accordion/index.esm.js";
7
- import Xe from "../../designer/avatar/index.esm.js";
8
- import Ke from "../../designer/button-edit/index.esm.js";
9
- import Qe from "../../designer/button-group/index.esm.js";
10
- import xe, { calendarProps as _e } from "../calendar/index.esm.js";
11
- import Ye from "../../designer/capsule/index.esm.js";
12
- import ve from "../../designer/checkbox/index.esm.js";
13
- import Ce from "../../designer/checkbox-group/index.esm.js";
14
- import He from "../../designer/combo-list/index.esm.js";
15
- import et from "../../designer/combo-tree/index.esm.js";
16
- import tt from "../../designer/component/index.esm.js";
17
- import ot from "../../designer/color-picker/index.esm.js";
18
- import nt from "../content-container/index.esm.js";
19
- import rt from "../../designer/date-picker/index.esm.js";
20
- import at from "../../designer/data-grid/index.esm.js";
21
- import it from "../../designer/dropdown/index.esm.js";
22
- import st, { dynamicFormGroupProps as lt, FDynamicFormLabel as ut } from "../dynamic-form/index.esm.js";
23
- import ct from "../events-editor/index.esm.js";
24
- import dt from "../filter-bar/index.esm.js";
25
- import pt from "../field-selector/index.esm.js";
26
- import mt from "../../designer/binding-selector/index.esm.js";
27
- import ft from "../../designer/image-cropper/index.esm.js";
28
- import gt from "../../designer/input-group/index.esm.js";
29
- import yt from "../layout/index.esm.js";
30
- import ht from "../list-nav/index.esm.js";
31
- import vt from "../../designer/list-view/index.esm.js";
32
- import Ee, { lookupProps as Ct } from "../lookup/index.esm.js";
33
- import Ft from "../mapping-editor/index.esm.js";
34
- import bt from "../../designer/nav/index.esm.js";
35
- import wt from "../../designer/number-range/index.esm.js";
36
- import Vt from "../../designer/number-spinner/index.esm.js";
37
- import kt from "../../designer/order/index.esm.js";
38
- import Tt from "../page-header/index.esm.js";
39
- import It from "../../designer/page-footer/index.esm.js";
40
- import Bt from "../../designer/pagination/index.esm.js";
41
- import xt from "../../designer/progress/index.esm.js";
42
- import Et from "../query-solution/index.esm.js";
1
+ var Pe = Object.defineProperty;
2
+ var Be = (t, e, r) => e in t ? Pe(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
3
+ var re = (t, e, r) => Be(t, typeof e != "symbol" ? e + "" : e, r);
4
+ import { defineComponent as te, ref as U, computed as J, onMounted as ke, watch as z, withDirectives as he, createVNode as q, resolveDirective as Fe, reactive as ce, createTextVNode as Ee, mergeProps as be } from "vue";
5
+ import { resolveAppearance as Ue, createPropsResolver as le, schemaResolverMap as Le, propertyEffectMap as Oe, propertyConfigSchemaMap as Ne, schemaMap as ve } from "../dynamic-resolver/index.esm.js";
6
+ import { FormSchemaEntityField$Type as ue, FormSchemaEntityFieldTypeName as pe, getCustomClass as Ve, useThirdComponent as De, isMobilePhone as Re, useGuid as me } from "../common/index.esm.js";
7
+ import { cloneDeep as Ae, mergeWith as je, merge as $e } from "lodash-es";
8
+ import { LocaleService as Ie } from "../locale/index.esm.js";
9
+ import { loadRegister as qe, useComponentManager as xe, useBindingData as Ge, useEntityState as We, useDynamicViewUtils as Ke, componentMap as ae, resolverMap as _e } from "../dynamic-view/index.esm.js";
10
+ import Xe from "../accordion/index.esm.js";
11
+ import Je from "../avatar/index.esm.js";
12
+ import Qe from "../../designer/button-edit/index.esm.js";
13
+ import ze from "../button-group/index.esm.js";
14
+ import Ye from "../calendar/index.esm.js";
15
+ import Ze from "../../designer/capsule/index.esm.js";
16
+ import de from "../../designer/checkbox/index.esm.js";
17
+ import fe from "../../designer/checkbox-group/index.esm.js";
18
+ import Se from "../combo-list/index.esm.js";
19
+ import He from "../combo-tree/index.esm.js";
20
+ import et from "../component/index.esm.js";
21
+ import tt from "../color-picker/index.esm.js";
22
+ import ot from "../content-container/index.esm.js";
23
+ import nt from "../../designer/date-picker/index.esm.js";
24
+ import rt from "../../designer/data-grid/index.esm.js";
25
+ import st from "../dropdown/index.esm.js";
26
+ import it from "../../designer/dynamic-form/index.esm.js";
27
+ import at from "../events-editor/index.esm.js";
28
+ import lt from "../filter-bar/index.esm.js";
29
+ import ct from "../field-selector/index.esm.js";
30
+ import ut from "../binding-selector/index.esm.js";
31
+ import pt from "../image-cropper/index.esm.js";
32
+ import mt from "../../designer/input-group/index.esm.js";
33
+ import dt from "../layout/index.esm.js";
34
+ import ft from "../list-nav/index.esm.js";
35
+ import yt from "../../designer/list-view/index.esm.js";
36
+ import gt from "../lookup/index.esm.js";
37
+ import Ct from "../mapping-editor/index.esm.js";
38
+ import ht from "../nav/index.esm.js";
39
+ import Ft from "../number-range/index.esm.js";
40
+ import bt from "../../designer/number-spinner/index.esm.js";
41
+ import vt from "../order/index.esm.js";
42
+ import Vt from "../page-header/index.esm.js";
43
+ import It from "../page-footer/index.esm.js";
44
+ import Tt from "../pagination/index.esm.js";
45
+ import Mt from "../progress/index.esm.js";
46
+ import wt from "../query-solution/index.esm.js";
43
47
  import Pt from "../../designer/radio-group/index.esm.js";
44
- import Lt from "../../designer/rate/index.esm.js";
45
- import Nt from "../../designer/response-toolbar/index.esm.js";
46
- import Mt from "../response-layout/index.esm.js";
47
- import $t, { useResponseLayoutEditorSetting as Dt } from "../../designer/response-layout-editor/index.esm.js";
48
- import Ut from "../../designer/search-box/index.esm.js";
49
- import Rt from "../../designer/section/index.esm.js";
50
- import At from "../../designer/smoke-detector/index.esm.js";
51
- import qt from "../../designer/splitter/index.esm.js";
52
- import St from "../../designer/step/index.esm.js";
53
- import Gt from "../../designer/switch/index.esm.js";
54
- import Ot from "../../designer/tabs/index.esm.js";
55
- import jt from "../../designer/tags/index.esm.js";
56
- import Zt from "../../designer/text/index.esm.js";
57
- import Wt from "../../designer/time-picker/index.esm.js";
58
- import Jt from "../../designer/transfer/index.esm.js";
59
- import zt from "../../designer/tree-view/index.esm.js";
60
- import Xt from "../../designer/uploader/index.esm.js";
61
- import Kt from "../../designer/verify-detail/index.esm.js";
62
- import Qt from "../../designer/video/index.esm.js";
63
- import _t from "../../designer/textarea/index.esm.js";
64
- import Yt from "../schema-selector/index.esm.js";
65
- import Ht from "../../designer/tree-grid/index.esm.js";
66
- import eo from "../event-parameter/index.esm.js";
67
- import to from "../../designer/filter-condition-editor/index.esm.js";
68
- import oo from "../fieldset/index.esm.js";
69
- import no from "../../designer/sort-condition-editor/index.esm.js";
70
- import ro from "../../designer/menu-lookup/index.esm.js";
71
- import ao from "../../designer/drawer/index.esm.js";
72
- import io from "../../designer/json-editor/index.esm.js";
73
- import so from "../property-editor/index.esm.js";
74
- import lo from "../../designer/expression-editor/index.esm.js";
75
- import uo from "../../designer/code-editor/index.esm.js";
76
- import co from "../../designer/html-template/index.esm.js";
77
- import po from "../collection-property-editor/index.esm.js";
78
- import mo from "../../designer/modal/index.esm.js";
79
- import fo from "../external-container/index.esm.js";
80
- import Pe, { languageTextBoxProps as go } from "../language-textbox/index.esm.js";
81
- import yo from "../image/index.esm.js";
82
- import ho from "../comment/index.esm.js";
83
- import { schemaResolverMap as vo, propertyEffectMap as Co, propertyConfigSchemaMap as Fo, schemaMap as Le, createPropsResolver as de, propertyConfigSchemaMapForDesigner as bo, resolveAppearance as wo, createFormGroupEditorResolver as Vo } from "../dynamic-resolver/index.esm.js";
84
- import { useThirdComponent as Ne, isMobilePhone as ko, useGuid as Fe, areaResponseDirective as To, useTextBoxDesign as Io, FormSchemaEntityField$Type as be, FormSchemaEntityFieldTypeName as we } from "../common/index.esm.js";
85
- import Bo, { buttonEditProps as xo } from "../button-edit/index.esm.js";
86
- import Eo, { checkboxProps as Po } from "../checkbox/index.esm.js";
87
- import Lo, { checkboxGroupProps as No } from "../checkbox-group/index.esm.js";
88
- import ue, { comboListProps as Mo } from "../combo-list/index.esm.js";
89
- import $o, { datePickerProps as Do } from "../date-picker/index.esm.js";
90
- import Uo, { inputGroupProps as Ro } from "../input-group/index.esm.js";
91
- import Ao, { numberRangeProps as qo } from "../number-range/index.esm.js";
92
- import So, { numberSpinnerProps as Go } from "../number-spinner/index.esm.js";
93
- import Oo, { progressProps as jo } from "../progress/index.esm.js";
94
- import Zo, { radioGroupProps as Wo } from "../radio-group/index.esm.js";
95
- import Jo, { rateProps as zo } from "../rate/index.esm.js";
96
- import Xo, { switchProps as Ko } from "../switch/index.esm.js";
97
- import Qo, { timePickerProps as _o } from "../time-picker/index.esm.js";
98
- import Yo, { textAreaProps as Ho } from "../textarea/index.esm.js";
99
- import { DgControl as l, refreshCanvas as en, UseTemplateDragAndDropRules as tn, useDragulaCommonRule as on, useDesignerComponent as ye } from "../designer-canvas/index.esm.js";
100
- import { BaseControlProperty as nn, FormBindingType as ae, InputBaseProperty as rn } from "../property-panel/index.esm.js";
101
- import "../../designer/dynamic-form/index.esm.js";
102
- import "../nav/index.esm.js";
103
- import "../step/index.esm.js";
104
- import "../html-template/index.esm.js";
105
- import { cloneDeep as an } from "lodash-es";
106
- import { FMessageBoxService as sn } from "../message-box/index.esm.js";
107
- const Me = {
48
+ import Bt from "../../designer/rate/index.esm.js";
49
+ import kt from "../../designer/response-toolbar/index.esm.js";
50
+ import Et from "../response-layout/index.esm.js";
51
+ import Ut, { useResponseLayoutEditorSetting as Lt } from "../../designer/response-layout-editor/index.esm.js";
52
+ import Ot from "../search-box/index.esm.js";
53
+ import Nt from "../../designer/section/index.esm.js";
54
+ import Dt from "../smoke-detector/index.esm.js";
55
+ import Rt from "../splitter/index.esm.js";
56
+ import At from "../step/index.esm.js";
57
+ import jt from "../../designer/switch/index.esm.js";
58
+ import $t from "../../designer/tabs/index.esm.js";
59
+ import qt from "../../designer/tags/index.esm.js";
60
+ import xt from "../text/index.esm.js";
61
+ import Gt from "../../designer/time-picker/index.esm.js";
62
+ import Wt from "../transfer/index.esm.js";
63
+ import Kt from "../tree-view/index.esm.js";
64
+ import _t from "../uploader/index.esm.js";
65
+ import Xt from "../verify-detail/index.esm.js";
66
+ import Jt from "../video/index.esm.js";
67
+ import Qt from "../../designer/textarea/index.esm.js";
68
+ import zt from "../schema-selector/index.esm.js";
69
+ import Yt from "../../designer/tree-grid/index.esm.js";
70
+ import Zt from "../event-parameter/index.esm.js";
71
+ import St from "../filter-condition-editor/index.esm.js";
72
+ import Ht from "../fieldset/index.esm.js";
73
+ import eo from "../sort-condition-editor/index.esm.js";
74
+ import to from "../menu-lookup/index.esm.js";
75
+ import oo from "../../designer/drawer/index.esm.js";
76
+ import no from "../json-editor/index.esm.js";
77
+ import ro from "../property-editor/index.esm.js";
78
+ import so from "../expression-editor/index.esm.js";
79
+ import io from "../code-editor/index.esm.js";
80
+ import ao from "../html-template/index.esm.js";
81
+ import lo from "../collection-property-editor/index.esm.js";
82
+ import co from "../../designer/modal/index.esm.js";
83
+ import uo from "../external-container/index.esm.js";
84
+ import po from "../language-textbox/index.esm.js";
85
+ import mo from "../image/index.esm.js";
86
+ import fo from "../comment/index.esm.js";
87
+ import { DgControl as ee, refreshCanvas as yo, UseTemplateDragAndDropRules as go, useDragulaCommonRule as Co } from "../designer-canvas/index.esm.js";
88
+ import { BaseControlProperty as ho, FormBindingType as S } from "../property-panel/index.esm.js";
89
+ const Fo = "root-viewmodel";
90
+ class bo {
91
+ constructor(e, r) {
92
+ re(this, "formSchemaUtils");
93
+ re(this, "controlCreatorUtils");
94
+ re(this, "designViewModelUtils");
95
+ this.resolver = e, this.designerHostService = r, this.formSchemaUtils = this.designerHostService.formSchemaUtils, this.controlCreatorUtils = this.designerHostService.controlCreatorUtils, this.designViewModelUtils = this.designerHostService.designViewModelUtils;
96
+ }
97
+ createComponent(e) {
98
+ const r = this.createComponentRefNode(e), f = this.createComponentNode(e), i = this.createViewModeNode(e), F = this.formSchemaUtils.getFormSchema();
99
+ return F.module.viewmodels.push(i), F.module.components.push(f), this.designViewModelUtils.assembleDesignViewModel(), r;
100
+ }
101
+ createComponentRefNode(e) {
102
+ const r = this.resolver.getSchemaByType("component-ref");
103
+ return Object.assign(r, {
104
+ id: `${e.componentId}-component-ref`,
105
+ component: `${e.componentId}-component`
106
+ }), r;
107
+ }
108
+ createComponentNode(e) {
109
+ const r = this.resolver.getSchemaByType("component"), f = this.createFormComponentContents(e);
110
+ return Object.assign(r, {
111
+ id: `${e.componentId}-component`,
112
+ viewModel: `${e.componentId}-component-viewmodel`,
113
+ componentType: e.componentType,
114
+ appearance: {
115
+ class: this.getFormComponentClass(e)
116
+ },
117
+ formColumns: e.formColumns,
118
+ contents: f
119
+ }), r;
120
+ }
121
+ /**
122
+ * 获取卡片组件层级的class样式
123
+ */
124
+ getFormComponentClass(e) {
125
+ var f, i;
126
+ const { templateId: r } = this.formSchemaUtils.getFormSchema().module;
127
+ if (r === "double-list-in-tab-template" && ((i = (f = e.parentComponentInstance) == null ? void 0 : f.schema) == null ? void 0 : i.type) === "tab-page") {
128
+ const F = e.parentComponentInstance.parent && e.parentComponentInstance.parent.schema;
129
+ if ((F == null ? void 0 : F.type) === "tabs" && (F == null ? void 0 : F.fill) === !0)
130
+ return "f-struct-wrapper f-utils-fill-flex-column";
131
+ }
132
+ return "f-struct-wrapper";
133
+ }
134
+ createFormComponentContents(e) {
135
+ var T, V;
136
+ const r = this.resolver.getSchemaByType("section");
137
+ Object.assign(r, {
138
+ id: e.componentId + "-form-section",
139
+ appearance: {
140
+ class: "f-section-form f-section-in-mainsubcard"
141
+ },
142
+ mainTitle: e.componentName
143
+ });
144
+ const f = this.resolver.getSchemaByType("response-form"), i = [];
145
+ Object.assign(f, {
146
+ id: e.componentId + "-form",
147
+ appearance: {
148
+ class: "f-form-layout farris-form farris-form-controls-inline"
149
+ },
150
+ contents: i,
151
+ controlsInline: !0
152
+ }), r.contents = [f];
153
+ const { selectedFields: F } = e;
154
+ F == null || F.forEach((C) => {
155
+ if (C.$type === ue.SimpleField) {
156
+ const w = Ae(C), b = this.resolveControlClassByFormColumns(e), I = this.controlCreatorUtils.setFormFieldProperty(w, "", b);
157
+ I && i.push(I);
158
+ }
159
+ });
160
+ const { templateId: v } = this.formSchemaUtils.getFormSchema().module;
161
+ if (v === "double-list-in-tab-template" && ((V = (T = e.parentComponentInstance) == null ? void 0 : T.schema) == null ? void 0 : V.type) === "tab-page") {
162
+ const C = e.parentComponentInstance.parent && e.parentComponentInstance.parent.schema;
163
+ (C == null ? void 0 : C.type) === "tabs" && (C == null ? void 0 : C.fill) === !0 && (r.appearance.class = "f-section-grid f-section-in-main px-0 pt-0", r.fill = !0);
164
+ }
165
+ return [r];
166
+ }
167
+ resolveControlClassByFormColumns(e) {
168
+ let r = "";
169
+ switch (e.formColumns) {
170
+ case 1: {
171
+ r = "col-12 col-md-12 col-xl-12 col-el-12";
172
+ break;
173
+ }
174
+ case 2: {
175
+ r = "col-12 col-md-6 col-xl-6 col-el-6";
176
+ break;
177
+ }
178
+ case 3: {
179
+ r = "col-12 col-md-6 col-xl-4 col-el-4";
180
+ break;
181
+ }
182
+ case 4: {
183
+ r = "col-12 col-md-6 col-xl-3 col-el-2";
184
+ break;
185
+ }
186
+ }
187
+ return r;
188
+ }
189
+ /**
190
+ * 添加viewModel节点
191
+ */
192
+ createViewModeNode(e) {
193
+ return {
194
+ id: `${e.componentId}-component-viewmodel`,
195
+ code: `${e.componentId}-component-viewmodel`,
196
+ name: e.componentName,
197
+ bindTo: e.bindTo,
198
+ parent: Fo,
199
+ fields: this.assembleViewModelFields(e),
200
+ commands: [],
201
+ states: [],
202
+ enableValidation: !0
203
+ };
204
+ }
205
+ /**
206
+ * 组装viewModel fields 节点
207
+ */
208
+ assembleViewModelFields(e) {
209
+ const r = [], { selectedFields: f } = e;
210
+ return f == null || f.forEach((i) => {
211
+ if (i.$type === ue.SimpleField) {
212
+ let F = "blur";
213
+ const v = i.type.name;
214
+ (v === pe.Enum || v === pe.Boolean) && (F = "change"), r.push({
215
+ type: "Form",
216
+ id: i.id,
217
+ fieldName: i.bindingField,
218
+ groupId: null,
219
+ groupName: null,
220
+ updateOn: F,
221
+ fieldSchema: {}
222
+ });
223
+ }
224
+ }), r;
225
+ }
226
+ }
227
+ function Te(t, e, r, f) {
228
+ var F, v, T, V, C, w;
229
+ const i = r.parentComponentInstance;
230
+ if (i && f) {
231
+ const b = (F = i.schema) == null ? void 0 : F.type, R = {
232
+ componentId: `form-${Math.random().toString(36).slice(2, 6)}`,
233
+ componentName: ((v = r.bindingSourceContext) == null ? void 0 : v.entityTitle) || ((V = (T = r.bindingSourceContext) == null ? void 0 : T.bindingEntity) == null ? void 0 : V.name) || "标题",
234
+ componentType: "form",
235
+ formColumns: b === "splitter-pane" ? 1 : 4,
236
+ parentContainerId: i.schema.id,
237
+ parentComponentInstance: i,
238
+ bindTo: ((C = r.bindingSourceContext) == null ? void 0 : C.bindTo) || "/",
239
+ selectedFields: (w = r.bindingSourceContext) == null ? void 0 : w.bindingEntityFields
240
+ };
241
+ return new bo(t, f).createComponent(R);
242
+ } else
243
+ return e;
244
+ }
245
+ const vo = "https://json-schema.org/draft/2020-12/schema", Vo = "https://farris-design.gitee.io/response-form.schema.json", Io = "response-form", To = "A Farris Data Collection Component", Mo = "object", wo = {
246
+ id: {
247
+ description: "The unique identifier for a form group",
248
+ type: "string"
249
+ },
250
+ type: {
251
+ description: "The type string of form group component",
252
+ type: "string",
253
+ default: "response-form"
254
+ },
255
+ appearance: {
256
+ description: "",
257
+ type: "object",
258
+ properties: {
259
+ class: {
260
+ type: "string"
261
+ },
262
+ style: {
263
+ type: "string"
264
+ }
265
+ },
266
+ default: {}
267
+ },
268
+ contents: {
269
+ description: "",
270
+ type: "array",
271
+ default: []
272
+ },
273
+ visible: {
274
+ description: "",
275
+ type: "boolean",
276
+ default: !0
277
+ },
278
+ labelAutoOverflow: {
279
+ description: "",
280
+ type: "boolean",
281
+ default: !1
282
+ },
283
+ adaptForLanguage: {
284
+ description: "",
285
+ type: "boolean",
286
+ default: !0
287
+ },
288
+ layout: {
289
+ description: "",
290
+ type: "string",
291
+ default: "col-12 col-md-6 col-xl-3 col-el-2"
292
+ },
293
+ fields: {
294
+ description: "",
295
+ type: "array"
296
+ },
297
+ formData: {
298
+ description: "",
299
+ type: "object"
300
+ },
301
+ formType: {
302
+ description: "",
303
+ type: "string",
304
+ default: "static"
305
+ }
306
+ }, Po = [
307
+ "id",
308
+ "type",
309
+ "contents"
310
+ ], Bo = {
311
+ $schema: vo,
312
+ $id: Vo,
313
+ title: Io,
314
+ description: To,
315
+ type: Mo,
316
+ properties: wo,
317
+ required: Po
318
+ }, Me = /* @__PURE__ */ new Map([
319
+ ["appearance", Ue]
320
+ ]), ko = "https://json-schema.org/draft/2020-12/schema", Eo = "https://farris-design.gitee.io/dynamic-form.schema.json", Uo = "dynamic-form", Lo = "A Farris Data Collection Component", Oo = "object", No = {
321
+ id: {
322
+ description: "The unique identifier for a form group",
323
+ type: "string"
324
+ },
325
+ type: {
326
+ description: "The type string of form group component",
327
+ type: "string",
328
+ default: "dynamic-form"
329
+ },
330
+ appearance: {
331
+ description: "",
332
+ type: "object",
333
+ properties: {
334
+ class: {
335
+ type: "string"
336
+ },
337
+ style: {
338
+ type: "string"
339
+ }
340
+ },
341
+ default: {}
342
+ },
343
+ contents: {
344
+ description: "",
345
+ type: "array",
346
+ default: []
347
+ },
348
+ visible: {
349
+ description: "",
350
+ type: "boolean",
351
+ default: !0
352
+ },
353
+ labelAutoOverflow: {
354
+ description: "",
355
+ type: "boolean",
356
+ default: !1
357
+ },
358
+ adaptForLanguage: {
359
+ description: "",
360
+ type: "boolean",
361
+ default: !0
362
+ },
363
+ formType: {
364
+ description: "",
365
+ type: "string",
366
+ default: "dynamic"
367
+ },
368
+ layout: {
369
+ description: "",
370
+ type: "string",
371
+ default: "col-12 col-md-6 col-xl-3 col-el-2"
372
+ },
373
+ fields: {
374
+ description: "",
375
+ type: "array"
376
+ },
377
+ formData: {
378
+ description: "",
379
+ type: "object"
380
+ }
381
+ }, Do = [
382
+ "id",
383
+ "type",
384
+ "contents"
385
+ ], Ro = {
386
+ $schema: ko,
387
+ $id: Eo,
388
+ title: Uo,
389
+ description: Lo,
390
+ type: Oo,
391
+ properties: No,
392
+ required: Do
393
+ }, ie = {
108
394
  customClass: { type: String, default: "" },
109
395
  customStyle: { type: String, defaut: "" },
110
396
  /** 控制是否可见 */
111
397
  visible: { type: Boolean, default: !0 },
112
398
  /** 内部控件布局是否响应国际化 */
113
- adaptForLanguage: { type: Boolean, default: !0 }
114
- }, se = /* @__PURE__ */ H({
115
- name: "FResponseForm",
116
- props: Me,
117
- emits: [],
118
- setup(e, t) {
119
- const n = V(), a = Z(() => {
120
- const o = Je.getLocale(), s = e.customClass.split(" "), i = {
121
- "drag-container": !0
399
+ adaptForLanguage: { type: Boolean, default: !0 },
400
+ /** 绑定动态字段 */
401
+ fields: { type: Array, default: [] },
402
+ /** 绑定动态字段的值*/
403
+ formData: { type: Object, default: null },
404
+ /** 为动态字段指定样式*/
405
+ layout: { type: String, default: "col-12 col-md-6 col-xl-3 col-el-2" }
406
+ }, Ao = Object.assign({}, ie, {
407
+ // 是否渲染form层级
408
+ canRenderForm: { type: Boolean, default: !0 },
409
+ callback: { type: Function }
410
+ }), Pr = le(ie, Bo, Me, Te), Br = le(ie, Ro, Me, Te), se = /* @__PURE__ */ te({
411
+ name: "FDynamicForm",
412
+ props: Ao,
413
+ emits: ["update:modelValue", "event"],
414
+ setup(t, e) {
415
+ const r = U(t.fields), f = /* @__PURE__ */ new Map(), i = U(t.callback);
416
+ qe();
417
+ const F = xe(), v = U(t.formData || {}), T = Ge(v, e);
418
+ We(r.value).setup();
419
+ const C = /* @__PURE__ */ new Map(), w = U(t.canRenderForm), {
420
+ mergeArray: b,
421
+ resolveCallbacks: I,
422
+ resolveEvents: R
423
+ } = Ke(), G = J(() => {
424
+ const o = Ie.getLocale(), a = t.fields && t.fields.length > 0, m = {
425
+ "f-form-layout": a,
426
+ "farris-form": a
427
+ };
428
+ return t.adaptForLanguage && o && (m["farris-form-controls-inline"] = o !== "en"), Ve(m, t.customClass);
429
+ });
430
+ function K() {
431
+ function o(a, m) {
432
+ const {
433
+ id: g
434
+ } = a || {}, {
435
+ field: h
436
+ } = a.binding || {};
437
+ return {
438
+ modelValue: m.getValue(g),
439
+ "onUpdate:modelValue": (y) => {
440
+ m.setValue(g, h || g, y);
441
+ }
442
+ };
443
+ }
444
+ return {
445
+ resolve: o
446
+ };
447
+ }
448
+ function _(o) {
449
+ const a = K();
450
+ return T.getValue(o.id) === void 0 && Object.hasOwnProperty.call(o, "modelValue") && T.setValue(o.id, void 0, o.modelValue), a.resolve(o, T);
451
+ }
452
+ function X(o) {
453
+ const a = {};
454
+ return o && Object.entries(o).forEach(([m, g]) => {
455
+ a[m] = () => Array.isArray(g) ? g.map((h) => A(h)) : A(g);
456
+ }), a;
457
+ }
458
+ function B(o) {
459
+ return o.type ? o.type : o.fields ? "fieldset" : "form-group";
460
+ }
461
+ function P(o) {
462
+ const a = B(o);
463
+ let m = o.customClass;
464
+ m || (m = a === "form-group" ? t.layout : "col-12 px-0");
465
+ const {
466
+ fields: g,
467
+ customClass: h,
468
+ ...y
469
+ } = o, M = {
470
+ ...R(o, e, a)
471
+ }, E = {
472
+ ...I(o, i, a)
473
+ };
474
+ return {
475
+ props: {
476
+ ...{
477
+ ...y,
478
+ customClass: m,
479
+ ..._(o)
480
+ },
481
+ key: o.id,
482
+ ref: (O) => {
483
+ if (O && o.id && !F.has(o.id)) {
484
+ F.register(o.id, O);
485
+ const N = {
486
+ token: o.id,
487
+ name: "component:ready",
488
+ type: B(o),
489
+ payloads: [U(O)],
490
+ schema: o
491
+ };
492
+ e.emit("event", N);
493
+ }
494
+ },
495
+ onVnodeUnmounted: (O) => {
496
+ if (o.id && F.has(o.id)) {
497
+ F.remove(o.id);
498
+ const N = {
499
+ token: o.id,
500
+ name: "component:unmounted",
501
+ type: B(o),
502
+ payloads: [O],
503
+ schema: o
504
+ };
505
+ e.emit("event", N);
506
+ }
507
+ }
508
+ },
509
+ eventProps: M,
510
+ callbackProps: E
122
511
  };
123
- return s.reduce((h, d) => (h[d] = !0, h), i), e.adaptForLanguage && o && (i["farris-form-controls-inline"] = o !== "en"), i;
512
+ }
513
+ function k(o, a) {
514
+ return Array.isArray(o) ? o.map((m) => a(m)) : a(o);
515
+ }
516
+ function A(o, a) {
517
+ var E;
518
+ const m = B(o), g = ae[m];
519
+ if (o.id && f.set(o.id, o), !g)
520
+ return null;
521
+ const h = () => o.fields ? o.fields.map((x) => A(x)) : null, y = (x, $, O) => {
522
+ let N;
523
+ return O && O.length > 0 ? N = q(x, {
524
+ ...$
525
+ }, O) : N = q(x, {
526
+ ...$
527
+ }, null), N;
528
+ }, M = ((E = C.get(o.id)) == null ? void 0 : E.props) || {};
529
+ return o.fields && o.fields.length > 0 ? y(g, M, [h()]) : o.slots ? y(g, M, [...Object.values(X(o.slots))]) : y(g, M);
530
+ }
531
+ function j(o) {
532
+ const a = B(o);
533
+ if (!ae[a])
534
+ return;
535
+ const {
536
+ props: g,
537
+ eventProps: h,
538
+ callbackProps: y
539
+ } = P(o), M = _e[a], E = M ? M.editorResolver : null, {
540
+ componentEventProps: x,
541
+ editorEventProps: $
542
+ } = h, {
543
+ componentCallbackProps: O,
544
+ editorCallbackProps: N
545
+ } = y;
546
+ if (x && Object.keys(x).length > 0 && Object.assign(g, x), O && Object.keys(O).length > 0 && Object.assign(g, O), E && $ && Object.keys($).length > 0) {
547
+ const D = E.resolve(o);
548
+ Object.assign(D, $);
549
+ }
550
+ if (E && N && Object.keys(N).length > 0) {
551
+ const D = E.resolve(o);
552
+ Object.assign(D, N);
553
+ }
554
+ if (g && Object.keys(g).length > 0) {
555
+ const D = C.get(o.id);
556
+ D ? $e(D == null ? void 0 : D.props, g) : C.set(o.id, ce({
557
+ props: g
558
+ }));
559
+ }
560
+ !o.fields || !Array.isArray(o.fields) || o.fields.forEach((D) => j(D));
561
+ }
562
+ function Y(o) {
563
+ const a = B(o);
564
+ ae[a] && (Q(o), !(!o.fields || !Array.isArray(o.fields)) && o.fields.forEach((g) => Y(g)));
565
+ }
566
+ function Q(o) {
567
+ const a = _(o);
568
+ if (a && Object.keys(a).length > 0) {
569
+ const m = C.get(o.id);
570
+ if (!m)
571
+ C.set(o.id, ce({
572
+ props: a
573
+ }));
574
+ else {
575
+ const g = {
576
+ ...m == null ? void 0 : m.props
577
+ };
578
+ Object.keys(a).forEach((h) => {
579
+ g[h] = a[h];
580
+ }), Object.assign(m == null ? void 0 : m.props, g);
581
+ }
582
+ }
583
+ }
584
+ ke(() => {
585
+ }), z(() => t.formData, (o) => {
586
+ v.value = o;
587
+ }), z(() => v.value, (o) => {
588
+ k(r.value, Y);
589
+ }, {
590
+ deep: !0
591
+ });
592
+ function Z(o) {
593
+ o && k(r.value, j);
594
+ }
595
+ z(() => t.fields, (o) => {
596
+ f.clear(), F.clear(), v.value = t.formData || {}, C.clear(), r.value = o, Z(o);
597
+ }), Z(t.fields);
598
+ function oe(o) {
599
+ o.$forceUpdate && o.$forceUpdate();
600
+ }
601
+ function ne(o) {
602
+ return T.getValue(o);
603
+ }
604
+ function H() {
605
+ return v.value;
606
+ }
607
+ function L(o, a) {
608
+ T.setValue(o, void 0, a);
609
+ const m = f.get(o);
610
+ m && Q(m);
611
+ }
612
+ function W(o) {
613
+ var a;
614
+ return (a = C.get(o)) == null ? void 0 : a.props;
615
+ }
616
+ function n(o, a) {
617
+ const m = C.get(o);
618
+ je(m == null ? void 0 : m.props, a, b);
619
+ }
620
+ e.expose({
621
+ componentManager: F,
622
+ rerender: oe,
623
+ getProps: W,
624
+ setProps: n,
625
+ getControlValue: ne,
626
+ setControlValue: L,
627
+ getValues: H
124
628
  });
125
- return () => e.visible && Ie(F("div", {
126
- ref: n,
127
- class: a.value,
128
- style: e.customStyle
129
- }, [t.slots.default && t.slots.default()]), [[Be("area-response")]]);
629
+ function s() {
630
+ return w.value && he(q("div", {
631
+ class: G.value,
632
+ style: t.customStyle
633
+ }, [e.slots.default && e.slots.default(), r.value && r.value.length > 0 && k(r.value, A)]), [[Fe("area-response")]]);
634
+ }
635
+ function d() {
636
+ return !w.value && r.value && r.value.length > 0 && k(r.value, A);
637
+ }
638
+ return () => t.visible ? s() || d() : null;
130
639
  }
131
- }), ln = {
640
+ }), ye = /* @__PURE__ */ te({
641
+ name: "FResponseForm",
642
+ props: ie,
643
+ emits: [],
644
+ setup(t, e) {
645
+ var b;
646
+ const r = U(), f = U(), i = J(() => {
647
+ const I = Ie.getLocale(), R = t.fields && t.fields.length > 0, G = {
648
+ "drag-container": !0,
649
+ "f-form-layout": R,
650
+ "farris-form": R
651
+ };
652
+ return t.adaptForLanguage && I && (G["farris-form-controls-inline"] = I !== "en"), Ve(G, t.customClass);
653
+ }), F = (b = f.value) == null ? void 0 : b.componentManager;
654
+ function v(I) {
655
+ f.value.render(I);
656
+ }
657
+ function T(I) {
658
+ return f.value.getControlValue(I);
659
+ }
660
+ function V(I, R) {
661
+ f.value.setControlValue(I, R);
662
+ }
663
+ function C(I) {
664
+ return f.value.getProps(I);
665
+ }
666
+ function w(I, R) {
667
+ f.value.setProps(I, R);
668
+ }
669
+ return e.expose({
670
+ componentManager: F,
671
+ rerender: v,
672
+ getProps: C,
673
+ setProps: w,
674
+ getControlValue: T,
675
+ setControlValue: V
676
+ }), () => t.visible && he(q("div", {
677
+ ref: r,
678
+ class: i.value,
679
+ style: t.customStyle
680
+ }, [e.slots.default && e.slots.default(), t.fields && t.fields.length > 0 && q(se, {
681
+ ref: f,
682
+ fields: t.fields,
683
+ canRenderForm: !1,
684
+ formData: t.formData,
685
+ layout: t.layout
686
+ }, null)]), [[Fe("area-response")]]);
687
+ }
688
+ }), jo = {
689
+ id: { type: String, default: "" },
690
+ customClass: { type: String, default: "" },
691
+ customStyle: { type: String, default: "" },
692
+ /** 筛选组件配置器,具体配置项可查看各组件文档 */
693
+ editor: { type: Object, default: {} },
694
+ label: { type: String, default: "" },
695
+ /** value is uncertain because type is uncertain, default value should not be set */
696
+ modelValue: { type: [String, Boolean, Array, Number], default: null },
697
+ // readonly: { type: Boolean, default: false },
698
+ visible: { type: Boolean, default: !0 },
699
+ required: { type: Boolean, default: !1 },
700
+ showLabel: { type: Boolean, default: !0 },
701
+ /**
702
+ * visible相当于showLabel为true,none相当于showLabel为false
703
+ */
704
+ showLabelType: { type: String, default: "visible" },
705
+ type: { type: String, default: "input-group" },
706
+ componentId: { type: String, default: "" },
707
+ errors: { type: Object, default: null },
708
+ fill: { type: Boolean, default: !1 }
709
+ }, $o = {
132
710
  id: { type: String },
133
711
  required: { type: Boolean, default: !1 },
134
712
  text: { type: String, default: "" },
@@ -139,69 +717,69 @@ const Me = {
139
717
  * 实际支持 'visible'可见 | 'reserve-space' 占位不显示
140
718
  */
141
719
  showType: { type: String, default: "visible" }
142
- }, $e = /* @__PURE__ */ H({
720
+ }, qo = /* @__PURE__ */ te({
143
721
  name: "FDynamicFormLabel",
144
- props: ln,
722
+ props: $o,
145
723
  emits: [],
146
- setup(e, t) {
147
- V(e.title || e.text);
148
- const n = V(e.required), a = V(e.text), o = V(e.valid), s = V(e.inValidTip);
149
- oe(() => e.text, () => {
150
- a.value = e.text;
151
- }), oe(() => e.required, (C, u) => {
152
- C !== u && (n.value = C);
153
- }), oe([() => e.valid, () => e.inValidTip], ([C, u]) => {
154
- o.value = C, s.value = u;
724
+ setup(t, e) {
725
+ U(t.title || t.text);
726
+ const r = U(t.required), f = U(t.text), i = U(t.valid), F = U(t.inValidTip);
727
+ z(() => t.text, () => {
728
+ f.value = t.text;
729
+ }), z(() => t.required, (w, b) => {
730
+ w !== b && (r.value = w);
731
+ }), z([() => t.valid, () => t.inValidTip], ([w, b]) => {
732
+ i.value = w, F.value = b;
155
733
  });
156
- const i = Z(() => o.value ? a.value : s.value), h = Z(() => o.value ? "" : "color:red"), d = Z(() => ({
734
+ const v = J(() => i.value ? f.value : F.value), T = J(() => i.value ? "" : "color:red"), V = J(() => ({
157
735
  "col-form-label": !0,
158
736
  // 指定必填,当显示模式是隐藏或者没有指定标签名时,宽度不限定
159
- "f-width-auto": n.value && (e.showType === "none" || !a.value)
160
- })), g = Z(() => e.showType === "force-none" ? !1 : e.showType === "reserve-space" || n.value || !!a.value && e.showType !== "none");
161
- return () => g.value && F("label", {
162
- class: d.value,
163
- title: i.value,
164
- style: h.value
165
- }, [!o.value && F("span", {
737
+ "f-width-auto": r.value && (t.showType === "none" || !f.value)
738
+ })), C = J(() => t.showType === "force-none" ? !1 : t.showType === "reserve-space" || r.value || !!f.value && t.showType !== "none");
739
+ return () => C.value && q("label", {
740
+ class: V.value,
741
+ title: v.value,
742
+ style: T.value
743
+ }, [!i.value && q("span", {
166
744
  class: "f-icon f-icon-warning mr-1",
167
745
  style: "color: red; min-width: 16px;",
168
- title: s.value
169
- }, null), F("span", {
746
+ title: F.value
747
+ }, null), q("span", {
170
748
  class: "farris-label-text"
171
- }, [n.value && F("span", {
749
+ }, [r.value && q("span", {
172
750
  class: "farris-label-info text-danger"
173
- }, [ee("*")]), e.showType === "visible" && a.value])]);
751
+ }, [Ee("*")]), t.showType === "visible" && f.value])]);
174
752
  }
175
- }), { globalStorageKey: un } = Ne(), p = {}, m = {}, f = {}, y = {};
176
- async function cn() {
753
+ }), { globalStorageKey: xo } = De(), l = {}, c = {}, u = {}, p = {};
754
+ async function Go() {
177
755
  {
178
- const e = {
179
- schemaMap: Le,
180
- propertyConfigSchemaMap: Fo,
181
- propertyEffectMap: Co,
182
- schemaResolverMap: vo
756
+ const t = {
757
+ schemaMap: ve,
758
+ propertyConfigSchemaMap: Ne,
759
+ propertyEffectMap: Oe,
760
+ schemaResolverMap: Le
183
761
  };
184
- Xe.register(p, m, f, y), ze.register(p, m, f, y), Ke.register(p, m, f, y), Qe.register(p, m, f, y), xe.register(p, m, f, y, e), Ye.register(p, m, f, y), ve.register(p, m, f, y, e), Ce.register(p, m, f, y, e), ve.register(p, m, f, y, e), Ce.register(p, m, f, y, e), He.register(p, m, f, y, e), et.register(p, m, f, y), tt.register(p, m, f, y), nt.register(p, m, f, y, e), ot.register(p, m, f, y), rt.register(p, m, f, y, e), at.register(p, m, f, y, e), it.register(p, m, f, y), st.register(p, m, f, y, e), ct.register(p, m, f, y), lo.register(p, m, f, y), dt.register(p, m, f, y), pt.register(p, m, f, y), to.register(p, m, f, y), ft.register(p, m, f, y), gt.register(p, m, f, y, e), yt.register(p, m, f, y, e), vt.register(p, m, f, y, e), ht.register(p, m, f, y), Ee.register(p, m, f, y, e), Ft.register(p, m, f, y), bt.register(p, m, f, y), wt.register(p, m, f, y), Vt.register(p, m, f, y, e), kt.register(p, m, f, y), Tt.register(p, m, f, y, e), It.register(p, m, f, y), Bt.register(p, m, f, y), xt.register(p, m, f, y), Et.register(p, m, f, y, e), Pt.register(p, m, f, y, e), Lt.register(p, m, f, y), Mt.register(p, m, f, y, e), $t.register(p, m, f, y), Nt.register(p, m, f, y), Yt.register(p, m, f), Ut.register(p, m, f, y), Rt.register(p, m, f, y, e), At.register(p, m, f, y), qt.register(p, m, f, y), St.register(p, m, f, y), Gt.register(p, m, f, y, e), no.register(p, m, f, y), Ot.register(p, m, f, y, e), jt.register(p, m, f, y), Zt.register(p, m, f, y), Wt.register(p, m, f, y, e), Jt.register(p, m, f, y), zt.register(p, m, f, y), Kt.register(p, m, f, y), Xt.register(p, m, f, y), Qt.register(p, m, f, y), _t.register(p, m, f, y, e), Ht.register(p, m, f, y), mt.register(p, m, f, y), eo.register(p, m, f, y), oo.register(p, m, f, y, e), ro.register(p, m, f, y), ao.register(p, m, f, y), io.register(p, m, f, y), so.register(p, m, f, y), uo.register(p, m, f, y), co.register(p, m, f, y, e), po.register(p, m, f, y), mo.register(p, m, f, y), fo.register(p, m, f, y), Pe.register(p, m, f, y, e), yo.register(p, m, f, y, e), ho.register(p, m, f, y);
185
- const t = window[un];
186
- if (t)
187
- for (const n in t)
188
- t[n].createPropsResolver = de, t[n].register(p, m, f);
762
+ Je.register(l, c, u, p), Xe.register(l, c, u, p), Qe.register(l, c, u, p), ze.register(l, c, u, p), Ye.register(l, c, u, p, t), Ze.register(l, c, u, p), de.register(l, c, u, p, t), fe.register(l, c, u, p, t), de.register(l, c, u, p, t), fe.register(l, c, u, p, t), Se.register(l, c, u, p, t), He.register(l, c, u, p), et.register(l, c, u, p), ot.register(l, c, u, p, t), tt.register(l, c, u, p), nt.register(l, c, u, p, t), rt.register(l, c, u, p, t), st.register(l, c, u, p), it.register(l, c, u, p, t), at.register(l, c, u, p), so.register(l, c, u, p), lt.register(l, c, u, p), ct.register(l, c, u, p), St.register(l, c, u, p), pt.register(l, c, u, p), mt.register(l, c, u, p, t), dt.register(l, c, u, p, t), yt.register(l, c, u, p, t), ft.register(l, c, u, p), gt.register(l, c, u, p, t), Ct.register(l, c, u, p), ht.register(l, c, u, p), Ft.register(l, c, u, p), bt.register(l, c, u, p, t), vt.register(l, c, u, p), Vt.register(l, c, u, p, t), It.register(l, c, u, p), Tt.register(l, c, u, p), Mt.register(l, c, u, p), wt.register(l, c, u, p, t), Pt.register(l, c, u, p, t), Bt.register(l, c, u, p), Et.register(l, c, u, p, t), Ut.register(l, c, u, p), kt.register(l, c, u, p), zt.register(l, c, u), Ot.register(l, c, u, p), Nt.register(l, c, u, p, t), Dt.register(l, c, u, p), Rt.register(l, c, u, p), At.register(l, c, u, p), jt.register(l, c, u, p, t), eo.register(l, c, u, p), $t.register(l, c, u, p, t), qt.register(l, c, u, p), xt.register(l, c, u, p), Gt.register(l, c, u, p, t), Wt.register(l, c, u, p), Kt.register(l, c, u, p), Xt.register(l, c, u, p), _t.register(l, c, u, p), Jt.register(l, c, u, p), Qt.register(l, c, u, p, t), Yt.register(l, c, u, p), ut.register(l, c, u, p), Zt.register(l, c, u, p), Ht.register(l, c, u, p, t), to.register(l, c, u, p), oo.register(l, c, u, p), no.register(l, c, u, p), ro.register(l, c, u, p), io.register(l, c, u, p), ao.register(l, c, u, p, t), lo.register(l, c, u, p), co.register(l, c, u, p), uo.register(l, c, u, p), po.register(l, c, u, p, t), mo.register(l, c, u, p, t), fo.register(l, c, u, p);
763
+ const e = window[xo];
764
+ if (e)
765
+ for (const r in e)
766
+ e[r].createPropsResolver = le, e[r].register(l, c, u);
189
767
  }
190
768
  }
191
- function De() {
192
- cn();
193
- function e(i) {
194
- const h = p[i];
195
- if (!h)
196
- throw new Error(`Could not find the editor of type '${i}'`);
197
- return h;
198
- }
199
- function t(i, h) {
200
- const d = m[i];
201
- return d ? d(h) : {};
202
- }
203
- function n(i) {
204
- switch (i) {
769
+ function we() {
770
+ Go();
771
+ function t(v) {
772
+ const T = l[v];
773
+ if (!T)
774
+ throw new Error(`Could not find the editor of type '${v}'`);
775
+ return T;
776
+ }
777
+ function e(v, T) {
778
+ const V = c[v];
779
+ return V ? V(T) : {};
780
+ }
781
+ function r(v) {
782
+ switch (v) {
205
783
  case "check-box":
206
784
  return "onChangeValue";
207
785
  case "switch":
@@ -275,1919 +853,691 @@ function De() {
275
853
  return "onUpdate:modelValue";
276
854
  }
277
855
  }
278
- function a(i) {
279
- switch (i) {
856
+ function f(v) {
857
+ switch (v) {
280
858
  case "combo-list":
281
859
  case "input-group":
282
860
  case "textarea":
283
861
  return "onClear";
284
862
  }
285
863
  }
286
- function o(i) {
287
- switch (i) {
864
+ function i(v) {
865
+ switch (v) {
288
866
  case "input-group":
289
867
  case "textarea":
290
868
  return "onMousedownEvent";
291
869
  }
292
870
  }
293
- function s(i) {
294
- switch (i) {
871
+ function F(v) {
872
+ switch (v) {
295
873
  case "input-group":
296
874
  case "textarea":
297
875
  return "onMouseupEvent";
298
876
  }
299
877
  }
300
- return { resolveEditorProps: t, resolveEditorType: e, getChangeFunctionName: n, getClearFunctionName: a, getMousedownFunctionName: o, getMouseupFunctionName: s };
878
+ return { resolveEditorProps: e, resolveEditorType: t, getChangeFunctionName: r, getClearFunctionName: f, getMousedownFunctionName: i, getMouseupFunctionName: F };
301
879
  }
302
- const Ue = {
303
- id: { type: String, default: "" },
304
- /** 筛选组件配置器,具体配置项可查看各组件文档 */
305
- editor: { type: Object, default: {} },
306
- /** value is uncertain because type is uncertain, default value should not be set */
307
- modelValue: { type: [String, Boolean, Array, Number] },
308
- /**
309
- * 作为内嵌编辑器被创建后默认获得焦点
310
- */
311
- focusOnCreated: { type: Boolean, default: !1 },
880
+ const Wo = {
312
881
  /**
313
- * 作为内嵌编辑器被创建后默认选中文本
314
- */
315
- selectOnCreated: { type: Boolean, default: !1 }
316
- }, fe = /* @__PURE__ */ H({
317
- name: "FDynamicFormInput",
318
- props: Ue,
319
- emits: ["change", "update:modelValue", "mousedown", "mouseup"],
320
- setup(e, t) {
321
- const n = V(e.id), a = V(e.editor), o = V(e.modelValue), {
322
- resolveEditorProps: s,
323
- resolveEditorType: i,
324
- getChangeFunctionName: h,
325
- getMousedownFunctionName: d,
326
- getMouseupFunctionName: g,
327
- getClearFunctionName: C
328
- } = De();
329
- function u(b, B, M) {
330
- o.value = B !== void 0 ? B : b, t.emit("update:modelValue", o.value), t.emit("change", o.value, {
331
- newValue: b,
332
- newModelValue: B,
333
- parameters: M
334
- });
335
- }
336
- function w(b) {
337
- t.emit("mousedown", b);
338
- }
339
- function x(b) {
340
- t.emit("mouseup", b);
341
- }
342
- function $() {
343
- t.emit("update:modelValue", "");
344
- }
345
- function U(b) {
346
- return (...B) => {
347
- $(), typeof b == "function" && b(...B);
348
- };
349
- }
350
- function A(b) {
351
- return (B, M, O) => {
352
- u(B, M, O), typeof b == "function" && b(B, M, O);
353
- };
354
- }
355
- const L = Z(() => {
356
- const b = i(a.value.type), B = s(a.value.type, a.value);
357
- B.focusOnCreated = e.focusOnCreated, B.selectOnCreated = e.selectOnCreated;
358
- const M = h(a.value.type), O = C(a.value.type);
359
- O && (B[O] = U(B[O])), M && (B[M] = A(B[M]));
360
- const S = d(a.value.type);
361
- B[S] = w;
362
- const K = g(a.value.type);
363
- return B[K] = x, B.id = n.value, () => F(b, ce(B, {
364
- modelValue: o.value,
365
- "onUpdate:modelValue": (R) => o.value = R
366
- }), null);
367
- });
368
- return oe([() => e.id, () => e.editor, () => e.modelValue], ([b, B, M]) => {
369
- n.value = b, a.value = B, o.value = M;
370
- }), () => L.value();
371
- }
372
- }), dn = {
373
- /**
374
- * 显示的错误信息
882
+ * 显示的错误信息
375
883
  */
376
884
  errors: {
377
885
  type: Object,
378
886
  default: null
379
887
  }
380
- }, Re = /* @__PURE__ */ H({
888
+ }, Ko = /* @__PURE__ */ te({
381
889
  name: "FValidationMessage",
382
- props: dn,
890
+ props: Wo,
383
891
  emits: [],
384
- setup(e, t) {
385
- const n = V(e.errors);
386
- oe(() => e.errors, (s) => {
387
- n.value = s;
892
+ setup(t, e) {
893
+ const r = U(t.errors);
894
+ z(() => t.errors, (F) => {
895
+ r.value = F;
388
896
  });
389
- const a = V(!0), o = Z(() => {
390
- if (n.value) {
391
- const s = Object.keys(n.value).map((i) => {
392
- var h;
393
- return (h = n.value[i]) == null ? void 0 : h.name;
897
+ const f = U(!0), i = J(() => {
898
+ if (r.value) {
899
+ const F = Object.keys(r.value).map((v) => {
900
+ var T;
901
+ return (T = r.value[v]) == null ? void 0 : T.name;
394
902
  });
395
- return s.length ? s.join(" ") : "";
903
+ return F.length ? F.join(" ") : "";
396
904
  }
397
905
  return "";
398
906
  });
399
- return () => o.value && F("div", {
907
+ return () => i.value && q("div", {
400
908
  class: "farris-feedback f-state-invalid",
401
- onClick: () => a.value = !a.value
402
- }, [!a.value && F("span", {
909
+ onClick: () => f.value = !f.value
910
+ }, [!f.value && q("span", {
403
911
  class: "f-icon f-icon-message_warning f-feedback-icon"
404
- }, null), a.value && F("span", {
912
+ }, null), f.value && q("span", {
405
913
  class: "f-feedback-message"
406
- }, [o.value])]);
407
- }
408
- });
409
- function pn(e, t) {
410
- e["button-edit"] = Bo, e.calendar = xe, e["check-box"] = Eo, e["check-group"] = Lo, e["combo-list"] = ue, e["date-picker"] = $o, e["input-group"] = Uo, e.lookup = Ee, e["number-range"] = Ao, e["number-spinner"] = So, e.progress = Oo, e["radio-group"] = Zo, e.rate = Jo, e.switch = Xo, e["time-picker"] = Qo, e.textarea = Yo, e["language-textbox"] = Pe, t["button-edit"] = xo, t.calendar = _e, t["check-box"] = Po, t["check-group"] = No, t["combo-list"] = Mo, t["date-picker"] = Do, t["input-group"] = Ro, t.lookup = Ct, t["number-range"] = qo, t["number-spinner"] = Go, t.progress = jo, t["radio-group"] = Wo, t.rate = zo, t.switch = Ko, t["time-picker"] = _o, t.textarea = Ho, t["language-textbox"] = go;
411
- }
412
- function mn() {
413
- const e = {}, t = {};
414
- pn(e, t);
415
- function n(d) {
416
- return e[d || "input-group"];
914
+ }, [i.value])]);
417
915
  }
418
- function a(d, g) {
419
- const C = t[d || "input-group"], u = Object.keys(C).reduce((w, x) => (w[x] = C[x].default, w), {});
420
- return Object.assign(u, g);
421
- }
422
- function o(d) {
423
- switch (d) {
424
- case "check-box":
425
- return "onChangeValue";
426
- case "switch":
427
- return "onModelValueChanged";
428
- case "check-group":
429
- return "onChangeValue";
430
- case "combo-list":
431
- case "combo-tree":
432
- return "onChange";
433
- case "combo-lookup":
434
- return "";
435
- case "year-range":
436
- case "year-picker":
437
- case "month-range":
438
- case "month-picker":
439
- case "date-range":
440
- case "datetime-range":
441
- case "datetime-picker":
442
- case "date-picker":
443
- return "onDatePicked";
444
- case "time-picker":
445
- return "onValueChange";
446
- case "input-group":
447
- return "onChange";
448
- case "lookup":
449
- case "language-textbox":
450
- return "onUpdate:modelValue";
451
- case "number-range":
452
- return "onValueChange";
453
- case "number-spinner":
454
- return "onValueChange";
455
- case "radio-group":
456
- return "onChangeValue";
457
- case "text":
458
- return "";
459
- case "textarea":
460
- return "onChange";
461
- }
462
- }
463
- function s(d) {
464
- switch (d) {
465
- case "combo-list":
466
- case "input-group":
467
- case "textarea":
468
- return "onClear";
469
- }
470
- }
471
- function i(d) {
472
- switch (d) {
473
- case "input-group":
474
- case "textarea":
475
- return "onMousedownEvent";
476
- }
477
- }
478
- function h(d) {
479
- switch (d) {
480
- case "input-group":
481
- case "textarea":
482
- return "onMouseupEvent";
483
- }
484
- }
485
- return { resolveEditorProps: a, resolveEditorType: n, getChangeFunctionName: o, getClearFunctionName: s, getMousedownFunctionName: i, getMouseupFunctionName: h };
486
- }
487
- const pe = {
488
- id: { type: String, default: "" },
489
- customClass: { type: String, default: "" },
490
- customStyle: { type: String, default: "" },
491
- /** 筛选组件配置器,具体配置项可查看各组件文档 */
492
- editor: { type: Object, default: {} },
493
- label: { type: String, default: "" },
494
- /** value is uncertain because type is uncertain, default value should not be set */
495
- modelValue: { type: [String, Boolean, Array, Number] },
496
- // readonly: { type: Boolean, default: false },
497
- visible: { type: Boolean, default: !0 },
498
- required: { type: Boolean, default: !1 },
499
- showLabel: { type: Boolean, default: !0 },
500
- /**
501
- * visible相当于showLabel为true,none相当于showLabel为false
502
- */
503
- showLabelType: { type: String, default: "visible" },
504
- type: { type: String, default: "input-group" },
505
- componentId: { type: String, default: "" },
506
- errors: { type: Object, default: null },
507
- fill: { type: Boolean, default: !1 }
508
- }, Ve = /* @__PURE__ */ H({
509
- name: "FFormControl",
510
- props: pe,
511
- emits: ["change", "update:modelValue"],
512
- setup(e, t) {
513
- var K;
514
- const n = V(e.id), a = V(e.customClass), o = V(e.editor), s = V(e.label), i = V(e.modelValue), h = V(e.readonly), d = V(((K = e.editor) == null ? void 0 : K.required) || e.required), g = V(e.showLabel), C = V(e.visible);
515
- V(e.type);
516
- const u = V(), w = V(e.errors), x = Z(() => g.value ? e.showLabelType : "none"), {
517
- resolveEditorProps: $,
518
- resolveEditorType: U,
519
- getChangeFunctionName: A,
520
- getClearFunctionName: L
521
- } = mn(), b = Z(() => ({
522
- "form-group": !0,
523
- "farris-form-group": !0,
524
- "common-group": !0,
525
- "q-state-readonly": h.value
526
- }));
527
- function B(R, J, j) {
528
- i.value = J !== void 0 ? J : R, t.emit("update:modelValue", i.value), t.emit("change", i.value, {
529
- newValue: R,
530
- newModelValue: J,
531
- parameters: j
532
- });
533
- }
534
- function M() {
535
- t.emit("update:modelValue", "");
536
- }
537
- const O = Z(() => {
538
- const R = o.value.type || "input-group", J = U(R), j = $(R, o.value), Q = A(R), _ = L(o.value.type);
539
- return _ && (j[_] = M), j[Q] = B, (j.id == null || j.id === "") && (j.id = n.value), R === "number-range" && o.value.onBeginValueChange && typeof o.value.onBeginValueChange == "function" ? (o.value.onBeginValueChange && typeof o.value.onBeginValueChange == "function" && (j.onBeginValueChange = o.value.onBeginValueChange), o.value.onEndValueChange && typeof o.value.onEndValueChange == "function" && (j.onEndValueChange = o.value.onEndValueChange)) : R === "lookup" && o.value["onUpdate:idValue"] && typeof o.value["onUpdate:idValue"] == "function" && (j["onUpdate:idValue"] = o.value["onUpdate:idValue"], j.id = n.value), () => F(J, ce({
540
- ref: u
541
- }, j, {
542
- modelValue: i.value,
543
- "onUpdate:modelValue": (D) => i.value = D
544
- }), t.slots);
545
- });
546
- function S() {
547
- return F(Re, {
548
- id: `${n.value}-validation-message`,
549
- errors: w.value
550
- }, null);
551
- }
552
- return oe([() => e.id, () => e.customClass, () => e.editor, () => e.label, () => e.modelValue, () => e.readonly, () => e.required, () => e.showLabel, () => e.visible, () => e.errors], ([R, J, j, Q, _, D, W, r, c, v]) => {
553
- var T;
554
- n.value = R, a.value = J, o.value = j, s.value = Q, i.value = _, h.value = D, d.value = ((T = o.value) == null ? void 0 : T.required) || W, g.value = r, C.value = c, w.value = v;
555
- }), t.expose({
556
- editorRef: u
557
- }), () => C.value && F("div", {
558
- id: `${n.value}-input-group`,
559
- class: a.value,
560
- style: e.customStyle
561
- }, [F("div", {
562
- class: "farris-group-wrap"
563
- }, [F("div", {
564
- class: b.value
565
- }, [F($e, {
566
- id: `${n.value}-lable`,
567
- showType: x.value,
568
- required: d.value,
569
- text: s.value,
570
- title: s.value
571
- }, null), F("div", {
572
- class: "farris-input-wrap"
573
- }, [O.value(), S()])])])]);
574
- }
575
- }), fn = /* @__PURE__ */ H({
916
+ }), ge = /* @__PURE__ */ te({
576
917
  name: "FDynamicFormGroup",
577
- props: pe,
918
+ props: jo,
578
919
  emits: ["change", "update:modelValue"],
579
- setup(e, t) {
580
- var _;
581
- const n = V(e.id), a = V(e.customClass), o = V(e.editor), s = V(e.label), i = V(e.modelValue), h = V(e.readonly), d = V(((_ = e.editor) == null ? void 0 : _.required) || e.required), g = V(e.showLabel), C = V(e.visible);
582
- V(e.type);
583
- const u = V(), w = V(e.errors), x = ko(), $ = V(e.editor.type || "input-group"), U = Z(() => g.value ? e.showLabelType : "none"), {
584
- resolveEditorProps: A,
585
- resolveEditorType: L,
586
- getChangeFunctionName: b,
587
- getClearFunctionName: B
588
- } = De(), M = Z(() => {
589
- const D = {
920
+ setup(t, e) {
921
+ var H;
922
+ const r = U(t.id), f = U(t.customClass), i = U(t.editor), F = U(t.label), v = U(t.modelValue), T = U(t.readonly), V = U(((H = t.editor) == null ? void 0 : H.required) || t.required), C = U(t.showLabel), w = U(t.visible);
923
+ U(t.type);
924
+ const b = U(), I = U(t.errors), R = Re(), G = U(t.editor.type || "input-group"), K = J(() => C.value ? t.showLabelType : "none"), {
925
+ resolveEditorProps: _,
926
+ resolveEditorType: X,
927
+ getChangeFunctionName: B,
928
+ getClearFunctionName: P
929
+ } = we(), k = J(() => {
930
+ const L = {
590
931
  "form-group": !0,
591
932
  "farris-form-group": !0,
592
933
  "common-group": !0,
593
- "q-state-readonly": h.value,
594
- "form-group--in-mobile": x
934
+ "q-state-readonly": T.value,
935
+ "form-group--in-mobile": R
595
936
  };
596
- return D["form-group--has-" + $.value] = !0, D;
597
- }), O = Z(() => {
598
- if (e.fill)
937
+ return L["form-group--has-" + G.value] = !0, L;
938
+ }), A = J(() => {
939
+ if (t.fill)
599
940
  return {
600
941
  maxWidth: "none"
601
942
  };
602
943
  });
603
- function S(D, W, r) {
604
- i.value = W !== void 0 ? W : D, t.emit("update:modelValue", i.value), t.emit("change", i.value, {
605
- newValue: D,
944
+ function j(L, W, n) {
945
+ v.value = W !== void 0 ? W : L, e.emit("update:modelValue", v.value), e.emit("change", v.value, {
946
+ newValue: L,
606
947
  newModelValue: W,
607
- parameters: r
948
+ parameters: n
608
949
  });
609
950
  }
610
- function K() {
611
- t.emit("update:modelValue", "");
951
+ function Y() {
952
+ e.emit("update:modelValue", "");
612
953
  }
613
- function R(D) {
954
+ function Q(L) {
614
955
  return (...W) => {
615
- K(), typeof D == "function" && D(...W);
956
+ Y(), typeof L == "function" && L(...W);
616
957
  };
617
958
  }
618
- function J(D) {
619
- return (W, r, c) => {
620
- S(W, r, c), typeof D == "function" && D(W, r, c);
959
+ function Z(L) {
960
+ return (W, n, s) => {
961
+ j(W, n, s), typeof L == "function" && L(W, n, s);
621
962
  };
622
963
  }
623
- const j = Z(() => {
624
- const D = o.value.type || "input-group", W = L(D), r = A(D, o.value), c = b(D), v = B(o.value.type);
625
- return v && (r[v] = R(r[v])), c && (r[c] = J(r[c])), (r.id == null || r.id === "") && (r.id = n.value), D === "number-range" && o.value.onBeginValueChange && typeof o.value.onBeginValueChange == "function" ? (o.value.onBeginValueChange && typeof o.value.onBeginValueChange == "function" && (r.onBeginValueChange = o.value.onBeginValueChange), o.value.onEndValueChange && typeof o.value.onEndValueChange == "function" && (r.onEndValueChange = o.value.onEndValueChange)) : D === "lookup" && o.value["onUpdate:idValue"] && typeof o.value["onUpdate:idValue"] == "function" ? (r["onUpdate:idValue"] = o.value["onUpdate:idValue"], r.id = n.value) : D === "collection-property-editor" && o.value.onSelectionChange && typeof o.value.onSelectionChange == "function" ? r.onSelectionChange = o.value.onSelectionChange : D === "property-editor" && (r.onBeforeOpenVariables = o.value.onBeforeOpenVariables), () => F(W, ce({
626
- ref: u
627
- }, r, {
628
- modelValue: i.value,
629
- "onUpdate:modelValue": (T) => i.value = T
630
- }), t.slots);
964
+ const oe = J(() => {
965
+ const L = i.value.type || "input-group", W = X(L), n = _(L, i.value), s = B(L), d = P(i.value.type);
966
+ return d && (n[d] = Q(n[d])), s && (n[s] = Z(n[s])), (n.id == null || n.id === "") && (n.id = r.value), L === "number-range" && i.value.onBeginValueChange && typeof i.value.onBeginValueChange == "function" ? (i.value.onBeginValueChange && typeof i.value.onBeginValueChange == "function" && (n.onBeginValueChange = i.value.onBeginValueChange), i.value.onEndValueChange && typeof i.value.onEndValueChange == "function" && (n.onEndValueChange = i.value.onEndValueChange)) : L === "lookup" && i.value["onUpdate:idValue"] && typeof i.value["onUpdate:idValue"] == "function" ? (n["onUpdate:idValue"] = i.value["onUpdate:idValue"], n.id = r.value) : L === "collection-property-editor" && i.value.onSelectionChange && typeof i.value.onSelectionChange == "function" ? n.onSelectionChange = i.value.onSelectionChange : L === "property-editor" && (n.onBeforeOpenVariables = i.value.onBeforeOpenVariables), () => q(W, be({
967
+ ref: b
968
+ }, n, {
969
+ modelValue: v.value,
970
+ "onUpdate:modelValue": (o) => v.value = o
971
+ }), e.slots);
631
972
  });
632
- function Q() {
633
- return F(Re, {
634
- id: `${n.value}-validation-message`,
635
- errors: w.value
973
+ function ne() {
974
+ return q(Ko, {
975
+ id: `${r.value}-validation-message`,
976
+ errors: I.value
636
977
  }, null);
637
978
  }
638
- return oe([() => e.id, () => e.customClass, () => e.editor, () => e.label, () => e.modelValue, () => e.readonly, () => e.required, () => e.showLabel, () => e.visible, () => e.errors], ([D, W, r, c, v, T, E, P, N, I]) => {
639
- var k;
640
- n.value = D, a.value = W, o.value = r, s.value = c, i.value = v, h.value = T, d.value = ((k = o.value) == null ? void 0 : k.required) || E, g.value = P, C.value = N, w.value = I;
641
- }), t.expose({
642
- editorRef: u
643
- }), () => C.value && F("div", {
644
- id: `${n.value}-form-group`,
645
- class: a.value,
646
- style: e.customStyle
647
- }, [F("div", {
979
+ return z([() => t.id, () => t.customClass, () => t.editor, () => t.label, () => t.modelValue, () => t.readonly, () => t.required, () => t.showLabel, () => t.visible, () => t.errors], ([L, W, n, s, d, o, a, m, g, h]) => {
980
+ var y;
981
+ r.value = L, f.value = W, i.value = n, F.value = s, v.value = d, T.value = o, V.value = ((y = i.value) == null ? void 0 : y.required) || a, C.value = m, w.value = g, I.value = h;
982
+ }), e.expose({
983
+ editorRef: b
984
+ }), () => w.value && q("div", {
985
+ id: `${r.value}-form-group`,
986
+ class: f.value,
987
+ style: t.customStyle
988
+ }, [q("div", {
648
989
  class: "farris-group-wrap",
649
- style: O.value
650
- }, [F("div", {
651
- class: M.value
652
- }, [F($e, {
653
- id: `${n.value}-lable`,
654
- showType: U.value,
655
- required: d.value,
656
- text: s.value,
657
- title: s.value
658
- }, null), F("div", {
990
+ style: A.value
991
+ }, [q("div", {
992
+ class: k.value
993
+ }, [q(qo, {
994
+ id: `${r.value}-lable`,
995
+ showType: K.value,
996
+ required: V.value,
997
+ text: F.value,
998
+ title: F.value
999
+ }, null), q("div", {
659
1000
  class: "farris-input-wrap"
660
- }, [j.value(), Q()])])])]);
661
- }
662
- });
663
- function gn(e, t) {
664
- function n(d, g = null) {
665
- if (g)
666
- return g;
667
- const C = e.getComponentById(t);
668
- return e.selectNode(C, (u) => u.id === d);
669
- }
670
- function a(d) {
671
- const g = e.getComponentById(d);
672
- return !(!g || !g.componentType || !g.componentType.startsWith("form"));
1001
+ }, [oe.value(), ne()])])])]);
673
1002
  }
674
- function o(d) {
675
- const g = new Set(d);
676
- return Array.from(g).length === 1;
1003
+ }), _o = {
1004
+ id: { type: String, default: "" },
1005
+ /** 筛选组件配置器,具体配置项可查看各组件文档 */
1006
+ editor: { type: Object, default: {} },
1007
+ /** value is uncertain because type is uncertain, default value should not be set */
1008
+ modelValue: { type: [String, Boolean, Array, Number] },
1009
+ /**
1010
+ * 作为内嵌编辑器被创建后默认获得焦点
1011
+ */
1012
+ focusOnCreated: { type: Boolean, default: !1 },
1013
+ /**
1014
+ * 作为内嵌编辑器被创建后默认选中文本
1015
+ */
1016
+ selectOnCreated: { type: Boolean, default: !1 }
1017
+ }, Ce = /* @__PURE__ */ te({
1018
+ name: "FDynamicFormInput",
1019
+ props: _o,
1020
+ emits: ["change", "update:modelValue", "mousedown", "mouseup"],
1021
+ setup(t, e) {
1022
+ const r = U(t.id), f = U(t.editor), i = U(t.modelValue), {
1023
+ resolveEditorProps: F,
1024
+ resolveEditorType: v,
1025
+ getChangeFunctionName: T,
1026
+ getMousedownFunctionName: V,
1027
+ getMouseupFunctionName: C,
1028
+ getClearFunctionName: w
1029
+ } = we();
1030
+ function b(B, P, k) {
1031
+ i.value = P !== void 0 ? P : B, e.emit("update:modelValue", i.value), e.emit("change", i.value, {
1032
+ newValue: B,
1033
+ newModelValue: P,
1034
+ parameters: k
1035
+ });
1036
+ }
1037
+ function I(B) {
1038
+ e.emit("mousedown", B);
1039
+ }
1040
+ function R(B) {
1041
+ e.emit("mouseup", B);
1042
+ }
1043
+ function G() {
1044
+ e.emit("update:modelValue", "");
1045
+ }
1046
+ function K(B) {
1047
+ return (...P) => {
1048
+ G(), typeof B == "function" && B(...P);
1049
+ };
1050
+ }
1051
+ function _(B) {
1052
+ return (P, k, A) => {
1053
+ b(P, k, A), typeof B == "function" && B(P, k, A);
1054
+ };
1055
+ }
1056
+ const X = J(() => {
1057
+ const B = v(f.value.type), P = F(f.value.type, f.value);
1058
+ P.focusOnCreated = t.focusOnCreated, P.selectOnCreated = t.selectOnCreated;
1059
+ const k = T(f.value.type), A = w(f.value.type);
1060
+ A && (P[A] = K(P[A])), k && (P[k] = _(P[k]));
1061
+ const j = V(f.value.type);
1062
+ P[j] = I;
1063
+ const Y = C(f.value.type);
1064
+ return P[Y] = R, P.id = r.value, () => q(B, be(P, {
1065
+ modelValue: i.value,
1066
+ "onUpdate:modelValue": (Q) => i.value = Q
1067
+ }), null);
1068
+ });
1069
+ return z([() => t.id, () => t.editor, () => t.modelValue], ([B, P, k]) => {
1070
+ r.value = B, f.value = P, i.value = k;
1071
+ }), () => X.value();
677
1072
  }
678
- function s(d) {
679
- const g = n(d.id), C = Dt(e), u = [];
680
- C.getResonseFormLayoutConfig(g, u, 1);
681
- const w = u.map((M) => M.columnInSM), x = u.map((M) => M.columnInMD), $ = u.map((M) => M.columnInLG), U = u.map((M) => M.columnInEL), A = o(w) ? w[0] : 0, L = o(x) ? x[0] : 0, b = o($) ? $[0] : 0, B = o(U) ? U[0] : 0;
1073
+ });
1074
+ function Xo(t, e) {
1075
+ function r(V, C = null) {
1076
+ if (C)
1077
+ return C;
1078
+ const w = t.getComponentById(e);
1079
+ return t.selectNode(w, (b) => b.id === V);
1080
+ }
1081
+ function f(V) {
1082
+ const C = t.getComponentById(V);
1083
+ return !(!C || !C.componentType || !C.componentType.startsWith("form"));
1084
+ }
1085
+ function i(V) {
1086
+ const C = new Set(V);
1087
+ return Array.from(C).length === 1;
1088
+ }
1089
+ function F(V) {
1090
+ const C = r(V.id), w = Lt(t), b = [];
1091
+ w.getResonseFormLayoutConfig(C, b, 1);
1092
+ const I = b.map((k) => k.columnInSM), R = b.map((k) => k.columnInMD), G = b.map((k) => k.columnInLG), K = b.map((k) => k.columnInEL), _ = i(I) ? I[0] : 0, X = i(R) ? R[0] : 0, B = i(G) ? G[0] : 0, P = i(K) ? K[0] : 0;
682
1093
  return {
683
- uniqueColClassInSM: A,
684
- uniqueColClassInMD: L,
685
- uniqueColClassInLG: b,
686
- uniqueColClassInEL: B
1094
+ uniqueColClassInSM: _,
1095
+ uniqueColClassInMD: X,
1096
+ uniqueColClassInLG: B,
1097
+ uniqueColClassInEL: P
687
1098
  };
688
1099
  }
689
- function i(d, g) {
690
- let C, u, w, x, $ = [];
691
- if (d) {
692
- const M = d.split(" "), O = M.filter((S) => S.startsWith("col-"));
693
- C = O.find((S) => /^col-([1-9]|10|11|12)$/.test(S)), u = O.find((S) => /^col-md-([1-9]|10|11|12)$/.test(S)), w = O.find((S) => /^col-xl-([1-9]|10|11|12)$/.test(S)), x = O.find((S) => /^col-el-([1-9]|10|11|12)$/.test(S)), $ = M.filter((S) => !S.startsWith("col-"));
1100
+ function v(V, C) {
1101
+ let w, b, I, R, G = [];
1102
+ if (V) {
1103
+ const k = V.split(" "), A = k.filter((j) => j.startsWith("col-"));
1104
+ w = A.find((j) => /^col-([1-9]|10|11|12)$/.test(j)), b = A.find((j) => /^col-md-([1-9]|10|11|12)$/.test(j)), I = A.find((j) => /^col-xl-([1-9]|10|11|12)$/.test(j)), R = A.find((j) => /^col-el-([1-9]|10|11|12)$/.test(j)), G = k.filter((j) => !j.startsWith("col-"));
694
1105
  }
695
- const U = g.uniqueColClassInSM ? "col-" + g.uniqueColClassInSM : C, A = g.uniqueColClassInMD ? "col-md-" + g.uniqueColClassInMD : u, L = g.uniqueColClassInLG ? "col-xl-" + g.uniqueColClassInLG : w, b = g.uniqueColClassInEL ? "col-el-" + g.uniqueColClassInEL : x;
696
- return [U, A, L, b].concat($).join(" ");
1106
+ const K = C.uniqueColClassInSM ? "col-" + C.uniqueColClassInSM : w, _ = C.uniqueColClassInMD ? "col-md-" + C.uniqueColClassInMD : b, X = C.uniqueColClassInLG ? "col-xl-" + C.uniqueColClassInLG : I, B = C.uniqueColClassInEL ? "col-el-" + C.uniqueColClassInEL : R;
1107
+ return [K, _, X, B].concat(G).join(" ");
697
1108
  }
698
- function h(d, g, C) {
699
- d = n(C, d), d.contents.forEach((u) => {
700
- if (u.type === l.fieldset.type) {
701
- h(u, g, u.id);
1109
+ function T(V, C, w) {
1110
+ V = r(w, V), V.contents.forEach((b) => {
1111
+ if (b.type === ee["dynamic-form"].type)
1112
+ return;
1113
+ if (b.type === ee.fieldset.type) {
1114
+ T(b, C, b.id);
702
1115
  return;
703
1116
  }
704
- u.appearance || (u.appearance = {});
705
- const w = u.appearance.class;
706
- u.appearance.class = i(w, g);
1117
+ b.appearance || (b.appearance = {});
1118
+ const I = b.appearance.class;
1119
+ b.appearance.class = v(I, C);
707
1120
  });
708
1121
  }
709
- return { checkIsInFormComponent: a, assembleUnifiedLayoutContext: s, changeFormControlsByUnifiedLayoutConfig: h };
1122
+ return { checkIsInFormComponent: f, assembleUnifiedLayoutContext: F, changeFormControlsByUnifiedLayoutConfig: T, changeControlClassInByColumn: v };
710
1123
  }
711
- class yn extends nn {
712
- constructor(t, n) {
713
- super(t, n);
714
- }
715
- getPropertyConfig(t, n) {
716
- const a = this;
717
- this.propertyConfig.categories.basic = this.getBasicPropConfig(t);
718
- const { checkIsInFormComponent: o, assembleUnifiedLayoutContext: s, changeFormControlsByUnifiedLayoutConfig: i } = gn(this.formSchemaUtils, this.componentId), h = this.getAppearanceConfig(t), d = o(this.componentId);
719
- return h.properties.adaptForLanguage = {
1124
+ class Jo extends ho {
1125
+ constructor(e, r) {
1126
+ super(e, r);
1127
+ }
1128
+ getPropertyConfig(e, r) {
1129
+ const f = this;
1130
+ this.propertyConfig.categories.basic = this.getBasicPropConfig(e);
1131
+ const { checkIsInFormComponent: i, assembleUnifiedLayoutContext: F, changeFormControlsByUnifiedLayoutConfig: v, changeControlClassInByColumn: T } = Xo(this.formSchemaUtils, this.componentId), V = this.getAppearanceConfig(e), C = i(this.componentId);
1132
+ V.properties.adaptForLanguage = {
720
1133
  title: "控件布局响应国际化",
721
1134
  description: "启用国际化后:简体中文、繁体中文环境下控件标签与输入框在一行展示,其他语言环境下控件标签与输入框上下排列。",
722
- visible: d,
1135
+ visible: e.formType === "dynamic" || C,
723
1136
  type: "boolean"
724
- }, h.properties.labelAutoOverflow = {
1137
+ }, V.properties.labelAutoOverflow = {
725
1138
  title: "控件标签换行",
726
1139
  description: "控件标签字数超长时,换行显示。控件标签与输入框在一行展示时,此属性有效。",
727
- visible: d,
1140
+ visible: e.formType === "dynamic" || C,
728
1141
  type: "boolean"
729
- }, h.properties.unifiedLayout = {
1142
+ }, V.properties.formType = {
1143
+ title: "控件来源",
1144
+ description: "",
1145
+ type: "enum",
1146
+ editor: {
1147
+ readonly: e.type === "dynamic-form",
1148
+ type: "combo-list",
1149
+ textField: "name",
1150
+ valueField: "value",
1151
+ data: [
1152
+ {
1153
+ value: "static",
1154
+ name: "静态"
1155
+ },
1156
+ {
1157
+ value: "dynamic",
1158
+ name: "动态"
1159
+ },
1160
+ {
1161
+ value: "mixed",
1162
+ name: "混合"
1163
+ }
1164
+ ]
1165
+ },
1166
+ refreshPanelAfterChanged: !0
1167
+ }, V.properties.unifiedLayout = {
730
1168
  title: "统一布局配置",
731
1169
  description: "统一配置卡片区域内所有控件的宽度,只支持标准模式",
732
- visible: d,
1170
+ visible: e.formType === "dynamic" || C,
733
1171
  refreshPanelAfterChanged: !0,
734
1172
  editor: {
735
1173
  type: "response-form-layout-setting",
736
- initialState: s(t)
1174
+ initialState: F(e)
737
1175
  }
738
- }, h.setPropertyRelates = function(g, C) {
739
- if (g)
740
- switch (g && g.propertyID) {
1176
+ }, V.setPropertyRelates = function(b, I) {
1177
+ if (b)
1178
+ switch (b && b.propertyID) {
741
1179
  case "unifiedLayout": {
742
- i(null, g.propertyValue, t.id), a.updateElementByParentContainer(t.id, n);
1180
+ e.formType === "dynamic" ? e.layout = T("", b.propertyValue) : (v(null, b.propertyValue, e.id), f.updateElementByParentContainer(e.id, r));
743
1181
  break;
744
1182
  }
745
1183
  case "labelAutoOverflow": {
746
- a.setLabelAutoOverflow(t, g.propertyValue), en();
1184
+ f.setLabelAutoOverflow(e, b.propertyValue), yo();
747
1185
  break;
748
1186
  }
749
1187
  }
750
- }, this.propertyConfig.categories.appearance = h, this.propertyConfig.categories.behavior = this.getBehaviorConfig(t), this.propertyConfig;
1188
+ }, this.propertyConfig.categories.appearance = V;
1189
+ let w = {};
1190
+ if (e.formType && ["dynamic", "mixed"].indexOf(e.formType) > -1) {
1191
+ const b = this.getPropertyEditorParams(e, ["Variable", "Custom"], "fields", {}, { newVariablePrefix: "", newVariableType: "Array" }), I = this.getPropertyEditorParams(e, ["Variable", "Custom"], "formData", {}, { newVariablePrefix: "", newVariableType: "Object" });
1192
+ w = {
1193
+ fields: {
1194
+ title: "动态控件列表",
1195
+ type: "string",
1196
+ description: "动态控件列表",
1197
+ editor: b
1198
+ },
1199
+ formData: {
1200
+ title: "动态控件列表初始值",
1201
+ type: "string",
1202
+ description: "动态控件列表初始值",
1203
+ editor: I
1204
+ }
1205
+ };
1206
+ }
1207
+ return this.propertyConfig.categories.behavior = this.getBehaviorConfig(e, "", w, (b, I) => {
1208
+ switch (b.propertyID) {
1209
+ case "fields":
1210
+ case "formData":
1211
+ f.afterMutilEditorChanged(e, b);
1212
+ break;
1213
+ }
1214
+ }), this.propertyConfig;
751
1215
  }
752
- setLabelAutoOverflow(t, n, a) {
753
- if (!a) {
754
- const o = this.formSchemaUtils.getComponentById(this.componentId);
755
- a = this.formSchemaUtils.selectNode(o, (s) => s.id === t.id);
1216
+ setLabelAutoOverflow(e, r, f) {
1217
+ if (!f) {
1218
+ const i = this.formSchemaUtils.getComponentById(this.componentId);
1219
+ f = this.formSchemaUtils.selectNode(i, (F) => F.id === e.id);
756
1220
  }
757
- a && a.contents && a.contents.length && a.contents.forEach((o) => {
758
- if (o.type === l.fieldset.type) {
759
- this.setLabelAutoOverflow(null, n, o);
1221
+ f && f.contents && f.contents.length && f.contents.forEach((i) => {
1222
+ if (i.type === ee.fieldset.type) {
1223
+ this.setLabelAutoOverflow(null, r, i);
760
1224
  return;
761
1225
  }
762
- o.appearance || (o.appearance = {
1226
+ i.appearance || (i.appearance = {
763
1227
  class: ""
764
- }), o.appearance.class || (o.appearance.class = ""), n ? o.appearance.class.includes("farris-group-multi-label") || (o.appearance.class = o.appearance.class + " farris-group-multi-label") : o.appearance.class = o.appearance.class.replace("farris-group-multi-label", "").trim();
1228
+ }), i.appearance.class || (i.appearance.class = ""), r ? i.appearance.class.includes("farris-group-multi-label") || (i.appearance.class = i.appearance.class + " farris-group-multi-label") : i.appearance.class = i.appearance.class.replace("farris-group-multi-label", "").trim();
765
1229
  });
766
1230
  }
767
1231
  }
768
- function hn(e, t) {
769
- const n = e.schema, a = new tn(), { canMove: o, canAccept: s, canDelete: i } = a.getTemplateRule(e, t);
770
- function h(r, c) {
771
- const { sourceElement: v } = r, { componentInstance: T } = v, E = t == null ? void 0 : t.formSchemaUtils;
772
- if (!E)
1232
+ function kr(t, e) {
1233
+ const r = t.schema, f = new go(), { canMove: i, canAccept: F, canDelete: v } = f.getTemplateRule(t, e);
1234
+ function T(n, s) {
1235
+ const { sourceElement: d } = n, { componentInstance: o } = d, a = e == null ? void 0 : e.formSchemaUtils;
1236
+ if (!a)
773
1237
  return !0;
774
- const P = E.getComponentById(T.value.belongedComponentId), N = E.getViewModelById(P.viewModel), I = E.getComponentById(e.componentInstance.value.belongedComponentId), k = E.getViewModelById(I.viewModel);
775
- return c ? N != null && N.id && (k != null && k.id) && N.id !== k.id ? N.bindTo === k.bindTo : !0 : (N == null ? void 0 : N.id) === (k == null ? void 0 : k.id);
1238
+ const m = a.getComponentById(o.value.belongedComponentId), g = a.getViewModelById(m.viewModel), h = a.getComponentById(t.componentInstance.value.belongedComponentId), y = a.getViewModelById(h.viewModel);
1239
+ return s ? g != null && g.id && (y != null && y.id) && g.id !== y.id ? g.bindTo === y.bindTo : !0 : (g == null ? void 0 : g.id) === (y == null ? void 0 : y.id);
776
1240
  }
777
- function d(r) {
778
- const { bindingTargetId: c } = r;
779
- if (!t)
1241
+ function V(n) {
1242
+ const { bindingTargetId: s } = n;
1243
+ if (!e)
780
1244
  return;
781
- const { formSchemaUtils: v, schemaService: T } = t, E = v.getComponentById(e.componentInstance.value.belongedComponentId), P = T.getFieldByIDAndVMID(c, E.viewModel);
782
- return !!(P != null && P.schemaField);
1245
+ const { formSchemaUtils: d, schemaService: o } = e, a = d.getComponentById(t.componentInstance.value.belongedComponentId), m = o.getFieldByIDAndVMID(s, a.viewModel);
1246
+ return !!(m != null && m.schemaField);
783
1247
  }
784
- function g(r) {
785
- const c = a.getComponentContext(e);
786
- if (c && c.componentClassList && c.componentClassList.includes("f-form-layout") && c.componentClassList.includes("farris-form")) {
787
- if (r.sourceType === "control" && (r.componentCategory === "input" || r.componentType === "fieldset"))
1248
+ function C(n) {
1249
+ const s = f.getComponentContext(t);
1250
+ if (s && s.componentClassList && s.componentClassList.includes("f-form-layout") && s.componentClassList.includes("farris-form")) {
1251
+ if (n.sourceType === "control" && (n.componentCategory === "input" || n.componentType && ["fieldset", "dynamic-form"].indexOf(n.componentType) > -1))
788
1252
  return !0;
789
- if (r.sourceType === "move") {
790
- if (r.componentType === "form-group")
791
- return h(r, !0);
792
- if (r.componentType === "fieldset")
793
- return h(r, !1);
1253
+ if (n.sourceType === "move") {
1254
+ if (n.componentType === "form-group")
1255
+ return T(n, !0);
1256
+ if (n.componentType === "fieldset")
1257
+ return T(n, !1);
1258
+ if (n.componentType === "dynamic-form")
1259
+ return !0;
794
1260
  }
795
- return r.sourceType === "field" && r.componentCategory === "input" ? d(r) : !1;
1261
+ return n.sourceType === "field" && n.componentCategory === "input" ? V(n) : !1;
796
1262
  }
797
1263
  return !0;
798
1264
  }
799
- function C(r) {
800
- return !(!on().basalDragulaRuleForContainer(r, t) || !s || !g(r));
801
- }
802
- function u(r) {
803
- var k;
804
- const c = r.componentInstance, v = c.value.schema, T = t == null ? void 0 : t.formSchemaUtils, E = t == null ? void 0 : t.designViewModelUtils, P = T.getViewModelIdByComponentId(c.value.belongedComponentId), N = E.getDgViewModel(P), I = c.value.parent;
805
- if (I && l.fieldset && ((k = I.schema) == null ? void 0 : k.type) === l.fieldset.type && N) {
806
- const q = { groupId: null, groupName: null };
807
- switch (v.binding.type) {
808
- case ae.Form: {
809
- N.changeField(v.binding.field, q);
1265
+ function w(n) {
1266
+ return !(!Co().basalDragulaRuleForContainer(n, e) || !F || !C(n));
1267
+ }
1268
+ function b(n) {
1269
+ var y;
1270
+ const s = n.componentInstance, d = s.value.schema, o = e == null ? void 0 : e.formSchemaUtils, a = e == null ? void 0 : e.designViewModelUtils, m = o.getViewModelIdByComponentId(s.value.belongedComponentId), g = a.getDgViewModel(m), h = s.value.parent;
1271
+ if (h && ee.fieldset && ((y = h.schema) == null ? void 0 : y.type) === ee.fieldset.type && g) {
1272
+ const M = { groupId: null, groupName: null };
1273
+ switch (d.binding.type) {
1274
+ case S.Form: {
1275
+ g.changeField(d.binding.field, M);
810
1276
  break;
811
1277
  }
812
- case ae.Variable: {
813
- T.modifyViewModelFieldById(P, v.binding.field, q, !0);
1278
+ case S.Variable: {
1279
+ o.modifyViewModelFieldById(m, d.binding.field, M, !0);
814
1280
  break;
815
1281
  }
816
1282
  }
817
1283
  }
818
1284
  }
819
- function w(r, c, v) {
820
- const T = c.fields.find((k) => k.id === r), E = t == null ? void 0 : t.designViewModelUtils, P = E.getDgViewModel(c.id), N = P.fields.find((k) => k.id === r);
821
- P.removeField([r]);
822
- const I = E.getDgViewModel(v);
823
- I.addField(N), T.fieldSchema && I.changeField(N.id, T.fieldSchema);
1285
+ function I(n, s, d) {
1286
+ const o = s.fields.find((y) => y.id === n), a = e == null ? void 0 : e.designViewModelUtils, m = a.getDgViewModel(s.id), g = m.fields.find((y) => y.id === n);
1287
+ m.removeField([n]);
1288
+ const h = a.getDgViewModel(d);
1289
+ h.addField(g), o.fieldSchema && h.changeField(g.id, o.fieldSchema);
824
1290
  }
825
- function x(r, c, v, T = []) {
826
- const E = c.id, P = r.binding.field, N = c.fields.findIndex((k) => k.id === P);
827
- if (N > -1 && (v.fields.push(c.fields[N]), c.fields.splice(N, 1)), E === "root-viewmodel" && v.id !== "root-viewmodel") {
828
- r.binding.path && !r.binding.path.includes("root-component.") && (r.binding.path = "root-component." + r.binding.path);
1291
+ function R(n, s, d, o = []) {
1292
+ const a = s.id, m = n.binding.field, g = s.fields.findIndex((y) => y.id === m);
1293
+ if (g > -1 && (d.fields.push(s.fields[g]), s.fields.splice(g, 1)), a === "root-viewmodel" && d.id !== "root-viewmodel") {
1294
+ n.binding.path && !n.binding.path.includes("root-component.") && (n.binding.path = "root-component." + n.binding.path);
829
1295
  return;
830
1296
  }
831
- if (v.id === "root-viewmodel" && E !== "root-viewmodel" && r.binding.path && r.binding.path.includes("root-component.")) {
832
- r.binding.path = r.binding.path.replace("root-component.", "");
1297
+ if (d.id === "root-viewmodel" && a !== "root-viewmodel" && n.binding.path && n.binding.path.includes("root-component.")) {
1298
+ n.binding.path = n.binding.path.replace("root-component.", "");
833
1299
  return;
834
1300
  }
835
- const I = c.states.find((k) => k.id === P);
836
- I && (v.states = v.states ? v.states : [], v.states.findIndex((k) => k.id === I.id) < 0 && (v.states.push(I), T.push(I.id)));
1301
+ const h = s.states.find((y) => y.id === m);
1302
+ h && (d.states = d.states ? d.states : [], d.states.findIndex((y) => y.id === h.id) < 0 && (d.states.push(h), o.push(h.id)));
837
1303
  }
838
- function $(r, c, v, T = []) {
839
- var N;
840
- if (!r)
1304
+ function G(n, s, d, o = []) {
1305
+ var g;
1306
+ if (!n)
841
1307
  return;
842
- const E = c.id === "root-viewmodel" && v.id !== "root-viewmodel", P = v.id === "root-viewmodel" && c.id !== "root-viewmodel";
843
- Object.keys(r).forEach((I) => {
844
- if (I === "binding")
1308
+ const a = s.id === "root-viewmodel" && d.id !== "root-viewmodel", m = d.id === "root-viewmodel" && s.id !== "root-viewmodel";
1309
+ Object.keys(n).forEach((h) => {
1310
+ if (h === "binding")
845
1311
  return;
846
- const k = r[I];
847
- if (k && typeof k == "object" && k.type === ae.Variable && k.field) {
848
- if (E) {
849
- k.path && !k.path.includes("root-component.") && (k.path = "root-component." + k.path);
1312
+ const y = n[h];
1313
+ if (y && typeof y == "object" && y.type === S.Variable && y.field) {
1314
+ if (a) {
1315
+ y.path && !y.path.includes("root-component.") && (y.path = "root-component." + y.path);
850
1316
  return;
851
1317
  }
852
- if (P && k.path && k.path.includes("root-component.")) {
853
- k.path = k.path.replace("root-component.", "");
1318
+ if (m && y.path && y.path.includes("root-component.")) {
1319
+ y.path = y.path.replace("root-component.", "");
854
1320
  return;
855
1321
  }
856
- const q = c.states.find((G) => G.id === k.field);
857
- if (q) {
858
- T.push(q.id), v.states = v.states ? v.states : [];
859
- const G = v.states.find((ne) => ne.code === q.code);
860
- if (G)
861
- k.field = G.id;
1322
+ const M = s.states.find((E) => E.id === y.field);
1323
+ if (M) {
1324
+ o.push(M.id), d.states = d.states ? d.states : [];
1325
+ const E = d.states.find((x) => x.code === M.code);
1326
+ if (E)
1327
+ y.field = E.id;
862
1328
  else {
863
- const ne = Object.assign({}, { newId: Fe().guid() }, q);
864
- v.states.push(ne), k.field = ne.newId;
1329
+ const x = Object.assign({}, { newId: me().guid() }, M);
1330
+ d.states.push(x), y.field = x.newId;
865
1331
  }
866
1332
  }
867
1333
  }
868
- }), (N = v.states) != null && N.length && v.states.map((I) => {
869
- I.newId && (I.id = I.newId, delete I.newId);
1334
+ }), (g = d.states) != null && g.length && d.states.map((h) => {
1335
+ h.newId && (h.id = h.newId, delete h.newId);
870
1336
  });
871
1337
  }
872
- function U(r, c, v) {
873
- if (r && (c(r, v), r.contents))
874
- for (const T of r.contents)
875
- U(T, c, v);
1338
+ function K(n, s, d) {
1339
+ if (n && (s(n, d), n.contents))
1340
+ for (const o of n.contents)
1341
+ K(o, s, d);
876
1342
  }
877
- function A(r = [], c) {
878
- if (!r.length)
1343
+ function _(n = [], s) {
1344
+ if (!n.length)
879
1345
  return;
880
- const v = t == null ? void 0 : t.formSchemaUtils, T = v.getComponentByViewModelId(c), E = [], P = (I, k) => {
881
- I && (Object.keys(I).forEach((q) => {
882
- const G = I[q];
883
- G && typeof G == "object" && G.type === ae.Variable && r.includes(G.field) && !k.includes(G.field) && k.push(G.field);
884
- }), I.editor && P(I.editor, k));
1346
+ const d = e == null ? void 0 : e.formSchemaUtils, o = d.getComponentByViewModelId(s), a = [], m = (h, y) => {
1347
+ h && (Object.keys(h).forEach((M) => {
1348
+ const E = h[M];
1349
+ E && typeof E == "object" && E.type === S.Variable && n.includes(E.field) && !y.includes(E.field) && y.push(E.field);
1350
+ }), h.editor && m(h.editor, y));
885
1351
  };
886
- U(T, P, E);
887
- const N = v.getViewModelById(c);
888
- r.forEach((I) => {
889
- E.includes(I) || (N.states = N.states.filter((k) => k.id !== I));
1352
+ K(o, m, a);
1353
+ const g = d.getViewModelById(s);
1354
+ n.forEach((h) => {
1355
+ a.includes(h) || (g.states = g.states.filter((y) => y.id !== h));
890
1356
  });
891
1357
  }
892
- function L(r) {
893
- const c = Fe().guid(), v = Object.assign({}, r, {
894
- id: c,
895
- code: r.code + c.slice(0, 4),
896
- name: r.name + c.slice(0, 4)
897
- }), P = (t == null ? void 0 : t.formSchemaUtils).getCommands().find((N) => N.id === r.cmpId);
898
- return P && P.refedHandlers.push({
899
- host: c,
900
- handler: r.handlerName
901
- }), v;
902
- }
903
- function b(r, c, v) {
904
- var q, G, ne;
905
- const T = {}, E = r.type === "form-group" && r.editor ? r.editor.type : r.type, P = (q = Le[E]) == null ? void 0 : q.events;
906
- if (!P)
1358
+ function X(n) {
1359
+ const s = me().guid(), d = Object.assign({}, n, {
1360
+ id: s,
1361
+ code: n.code + s.slice(0, 4),
1362
+ name: n.name + s.slice(0, 4)
1363
+ }), m = (e == null ? void 0 : e.formSchemaUtils).getCommands().find((g) => g.id === n.cmpId);
1364
+ return m && m.refedHandlers.push({
1365
+ host: s,
1366
+ handler: n.handlerName
1367
+ }), d;
1368
+ }
1369
+ function B(n, s, d) {
1370
+ var M, E, x;
1371
+ const o = {}, a = n.type === "form-group" && n.editor ? n.editor.type : n.type, m = (M = ve[a]) == null ? void 0 : M.events;
1372
+ if (!m)
907
1373
  return;
908
- Object.keys(r).forEach((re) => {
909
- const Y = Object.keys(P).find((X) => X === re);
910
- if (Y && r[Y]) {
911
- const X = c.commands.find((z) => z.code === r[Y]);
912
- if (X) {
913
- let z = T[X.code];
914
- z || (z = L(X), T[X.code] = z, v.commands.push(z)), r[Y] = z.code;
1374
+ Object.keys(n).forEach(($) => {
1375
+ const O = Object.keys(m).find((N) => N === $);
1376
+ if (O && n[O]) {
1377
+ const N = s.commands.find((D) => D.code === n[O]);
1378
+ if (N) {
1379
+ let D = o[N.code];
1380
+ D || (D = X(N), o[N.code] = D, d.commands.push(D)), n[O] = D.code;
915
1381
  }
916
1382
  }
917
1383
  });
918
- const I = (t == null ? void 0 : t.designViewModelUtils).getDgViewModel(v.id), k = ["valueChanging", "valueChanged"];
919
- if (((G = r.binding) == null ? void 0 : G.type) === ae.Form) {
920
- const re = (ne = v.fields) == null ? void 0 : ne.find((Y) => Y.id === r.binding.field);
921
- re && k.forEach((Y) => {
922
- if (re[Y]) {
923
- const X = c.commands.find((z) => z.code === re[Y]);
924
- if (!X)
1384
+ const h = (e == null ? void 0 : e.designViewModelUtils).getDgViewModel(d.id), y = ["valueChanging", "valueChanged"];
1385
+ if (((E = n.binding) == null ? void 0 : E.type) === S.Form) {
1386
+ const $ = (x = d.fields) == null ? void 0 : x.find((O) => O.id === n.binding.field);
1387
+ $ && y.forEach((O) => {
1388
+ if ($[O]) {
1389
+ const N = s.commands.find((D) => D.code === $[O]);
1390
+ if (!N)
925
1391
  return;
926
- if (T[X.code])
927
- I.changeField(re.id, { [Y]: T[X.code].code });
1392
+ if (o[N.code])
1393
+ h.changeField($.id, { [O]: o[N.code].code });
928
1394
  else {
929
- const z = L(X);
930
- T[X.code] = z, v.commands.push(z), I.changeField(re.id, { [Y]: z.code });
1395
+ const D = X(N);
1396
+ o[N.code] = D, d.commands.push(D), h.changeField($.id, { [O]: D.code });
931
1397
  }
932
1398
  }
933
1399
  });
934
1400
  }
935
1401
  }
936
- function B(r) {
937
- const c = t == null ? void 0 : t.formSchemaUtils, v = r.componentInstance, T = v.value.schema, E = c.getViewModelIdByComponentId(v.value.belongedComponentId), P = c.getViewModelById(E), N = c.getComponentById(e.componentInstance.value.belongedComponentId), I = c.getViewModelById(N.viewModel);
938
- if (E !== I.id) {
939
- const k = T.binding.type, q = T.binding.field, G = [];
940
- switch (k) {
941
- case ae.Form: {
942
- w(q, P, I.id);
1402
+ function P(n) {
1403
+ var y, M;
1404
+ const s = e == null ? void 0 : e.formSchemaUtils, d = n.componentInstance, o = d.value.schema, a = s.getViewModelIdByComponentId(d.value.belongedComponentId), m = s.getViewModelById(a), g = s.getComponentById(t.componentInstance.value.belongedComponentId), h = s.getViewModelById(g.viewModel);
1405
+ if (a !== h.id) {
1406
+ const E = (y = o.binding) == null ? void 0 : y.type, x = (M = o.binding) == null ? void 0 : M.field, $ = [];
1407
+ switch (E) {
1408
+ case S.Form: {
1409
+ I(x, m, h.id);
943
1410
  break;
944
1411
  }
945
- case ae.Variable: {
946
- x(T, P, I, G);
1412
+ case S.Variable: {
1413
+ R(o, m, h, $);
947
1414
  break;
948
1415
  }
949
1416
  }
950
- $(T, P, I, G), $(T.editor, P, I, G), b(T, P, I), E !== "root-viewmodel" && A(G, E);
1417
+ G(o, m, h, $), G(o.editor, m, h, $), B(o, m, h), a !== "root-viewmodel" && _($, a);
951
1418
  }
952
1419
  }
953
- function M(r) {
954
- if (!r || !r.componentInstance)
1420
+ function k(n) {
1421
+ var o;
1422
+ if (!n || !n.componentInstance)
955
1423
  return;
956
- const v = r.componentInstance.value.schema;
957
- !v.binding || !v.binding.field || (u(r), B(r));
1424
+ const d = n.componentInstance.value.schema;
1425
+ if (d.type === "dynamic-form") {
1426
+ const a = ((o = d == null ? void 0 : d.appearance) == null ? void 0 : o.class) || "";
1427
+ a.indexOf("col-12") < 0 && (d.appearance = {
1428
+ ...d.appearance,
1429
+ class: a + " col-12 px-0"
1430
+ }), P(n);
1431
+ return;
1432
+ }
1433
+ !d.binding || !d.binding.field || (b(n), P(n));
958
1434
  }
959
- function O() {
960
- return n.componentType ? "display:inherit;flex-direction:inherit;margin-bottom:10px" : "";
1435
+ function A() {
1436
+ return r.componentType ? "display:inherit;flex-direction:inherit;margin-bottom:10px" : "";
961
1437
  }
962
- function S(r) {
963
- let c = "";
964
- switch (r) {
1438
+ function j(n) {
1439
+ let s = "";
1440
+ switch (n) {
965
1441
  case 1: {
966
- c = "col-12 col-md-12 col-xl-12 col-el-12";
1442
+ s = "col-12 col-md-12 col-xl-12 col-el-12";
967
1443
  break;
968
1444
  }
969
1445
  case 2: {
970
- c = "col-12 col-md-6 col-xl-6 col-el-6";
1446
+ s = "col-12 col-md-6 col-xl-6 col-el-6";
971
1447
  break;
972
1448
  }
973
1449
  case 3: {
974
- c = "col-12 col-md-6 col-xl-4 col-el-4";
1450
+ s = "col-12 col-md-6 col-xl-4 col-el-4";
975
1451
  break;
976
1452
  }
977
1453
  case 4: {
978
- c = "col-12 col-md-6 col-xl-3 col-el-2";
1454
+ s = "col-12 col-md-6 col-xl-3 col-el-2";
979
1455
  break;
980
1456
  }
981
1457
  }
982
- return c;
1458
+ return s;
983
1459
  }
984
- function K(r, c) {
985
- let v = !1;
986
- if (e.schema && Object.prototype.hasOwnProperty.call(e.schema, "labelAutoOverflow"))
987
- v = e.schema.labelAutoOverflow;
1460
+ function Y(n, s) {
1461
+ let d = !1;
1462
+ if (t.schema && Object.prototype.hasOwnProperty.call(t.schema, "labelAutoOverflow"))
1463
+ d = t.schema.labelAutoOverflow;
988
1464
  else {
989
- const T = t == null ? void 0 : t.formSchemaUtils, E = T == null ? void 0 : T.selectNode(c, (P) => P.type === l["response-form"].type);
990
- E && (v = E.labelAutoOverflow);
1465
+ const o = e == null ? void 0 : e.formSchemaUtils, a = o == null ? void 0 : o.selectNode(s, (m) => m.type === ee["response-form"].type);
1466
+ a && (d = a.labelAutoOverflow);
991
1467
  }
992
- return v && (r += " farris-group-multi-label"), r;
993
- }
994
- function R(r) {
995
- const c = e.componentInstance.value.getBelongedComponentInstance(e.componentInstance);
996
- if (c && c.schema && c.schema.componentType) {
997
- const { formColumns: v } = c.schema;
998
- let T = S(v);
999
- T = t == null ? void 0 : t.formSchemaUtils.getControlClassByFormUnifiedLayout(T, c.schema.id, e.schema), T = K(T, c.schema), r.appearance || (r.appearance = {}), r.appearance.class = T;
1468
+ return d && (n += " farris-group-multi-label"), n;
1469
+ }
1470
+ function Q(n) {
1471
+ const s = t.componentInstance.value.getBelongedComponentInstance(t.componentInstance);
1472
+ if (s && s.schema && s.schema.componentType) {
1473
+ const { formColumns: d } = s.schema;
1474
+ let o = j(d);
1475
+ o = e == null ? void 0 : e.formSchemaUtils.getControlClassByFormUnifiedLayout(o, s.schema.id, t.schema), o = Y(o, s.schema), n.appearance || (n.appearance = {}), n.appearance.class = o;
1000
1476
  }
1001
1477
  }
1002
- function J(r, c, v, T) {
1003
- const { bindingSourceContext: E, parentComponentInstance: P } = r;
1004
- if (E != null && E.entityFieldNode && P) {
1005
- const N = t == null ? void 0 : t.designViewModelUtils, k = (t == null ? void 0 : t.formSchemaUtils).getViewModelIdByComponentId(P.belongedComponentId), q = N.getDgViewModel(k);
1006
- q.removeField([E.entityFieldNode.id]), q.addField(E.designViewModelField), c && q.changeField(E.entityFieldNode.id, { editor: { $type: c }, groupId: v, groupName: T });
1478
+ function Z(n, s, d, o) {
1479
+ const { bindingSourceContext: a, parentComponentInstance: m } = n;
1480
+ if (a != null && a.entityFieldNode && m) {
1481
+ const g = e == null ? void 0 : e.designViewModelUtils, y = (e == null ? void 0 : e.formSchemaUtils).getViewModelIdByComponentId(m.belongedComponentId), M = g.getDgViewModel(y);
1482
+ M.removeField([a.entityFieldNode.id]), M.addField(a.designViewModelField), s && M.changeField(a.entityFieldNode.id, { editor: { $type: s }, groupId: d, groupName: o });
1007
1483
  }
1008
1484
  }
1009
- function j(r, c) {
1010
- var P, N, I;
1011
- const v = n;
1012
- if ((v.appearance && v.appearance.class || "").split(" ").includes("f-form-layout") && r.componentCategory === "input") {
1013
- const { label: k } = r;
1014
- let q;
1015
- const G = t == null ? void 0 : t.controlCreatorUtils;
1016
- return (P = r.bindingSourceContext) != null && P.entityFieldNode ? q = G.setFormFieldProperty((N = r.bindingSourceContext) == null ? void 0 : N.entityFieldNode, c == null ? void 0 : c.type) : (q = G.createFormGroupWithoutField(c == null ? void 0 : c.type), q.label = k), R(q), J(r, (I = q.editor) == null ? void 0 : I.type), q;
1485
+ function oe(n, s) {
1486
+ var m, g, h;
1487
+ const d = r;
1488
+ if ((d.appearance && d.appearance.class || "").split(" ").includes("f-form-layout") && n.componentCategory === "input") {
1489
+ const { label: y } = n;
1490
+ let M;
1491
+ const E = e == null ? void 0 : e.controlCreatorUtils;
1492
+ return (m = n.bindingSourceContext) != null && m.entityFieldNode ? M = E.setFormFieldProperty((g = n.bindingSourceContext) == null ? void 0 : g.entityFieldNode, s == null ? void 0 : s.type) : (M = E.createFormGroupWithoutField(s == null ? void 0 : s.type), M.label = y), Q(M), Z(n, (h = M.editor) == null ? void 0 : h.type), M;
1017
1493
  }
1018
- return c;
1019
- }
1020
- function Q() {
1021
- return o;
1494
+ return n.componentType === "dynamic-form" && (s.appearance = {
1495
+ class: "col-12",
1496
+ ...s.appearance
1497
+ }), s;
1022
1498
  }
1023
- function _() {
1499
+ function ne() {
1024
1500
  return i;
1025
1501
  }
1026
- function D() {
1027
- return !1;
1028
- }
1029
- function W(r) {
1030
- return new yn(r, t).getPropertyConfig(n, e.componentInstance.value);
1031
- }
1032
- return {
1033
- canAccepts: C,
1034
- checkCanDeleteComponent: _,
1035
- checkCanMoveComponent: Q,
1036
- getStyles: O,
1037
- getPropsConfig: W,
1038
- hideNestedPaddingInDesginerView: D,
1039
- onAcceptMovedChildElement: M,
1040
- onResolveNewComponentSchema: j,
1041
- moveInputBetweenComponent: B,
1042
- resolveFormGroupAppearance: R,
1043
- syncFieldToViewModel: J
1044
- };
1045
- }
1046
- const vn = /* @__PURE__ */ H({
1047
- name: "FResponseFormDesign",
1048
- directives: {
1049
- "area-response": To
1050
- },
1051
- props: pe,
1052
- emits: [],
1053
- setup(e, t) {
1054
- const n = V(), a = te("design-item-context"), o = te("designer-host-service"), s = hn(a, o), i = ye(n, a, s);
1055
- me(() => {
1056
- n.value.componentInstance = i;
1057
- }), t.expose(i.value);
1058
- const h = Z(() => {
1059
- const d = e.customClass.split(" "), g = {
1060
- "drag-container": !0
1061
- };
1062
- return d.reduce((C, u) => (C[u] = !0, C), g), g;
1063
- });
1064
- return () => Ie(F("div", {
1065
- ref: n,
1066
- class: h.value,
1067
- style: e.customClass,
1068
- "data-dragref": `${a.schema.id}-container`,
1069
- "data-associate": `${a.schema.id}-component`
1070
- }, [t.slots.default && t.slots.default()]), [[Be("area-response")]]);
1071
- }
1072
- }), Cn = {}, Fn = {}, { globalStorageKey: si } = Ne(), bn = {
1073
- id: { Type: String, default: "" },
1074
- /** 是否自动完成 */
1075
- autocomplete: { Type: String, default: "off" },
1076
- /** 自定义CLASS */
1077
- customClass: { Type: String, default: "" },
1078
- /** 禁用 */
1079
- disabled: { Type: Boolean, default: !1 },
1080
- /** 允许编辑 */
1081
- editable: { Type: Boolean, default: !0 },
1082
- /** 启用清除按钮 */
1083
- enableClear: { Type: Boolean, default: !0 },
1084
- /** 启用提示文本 */
1085
- enableTitle: { Type: Boolean, default: !0 },
1086
- /** 能否查看密码 */
1087
- enableViewPassword: { Type: Boolean, default: !0 },
1088
- /** 始终显示占位符文本 */
1089
- forcePlaceholder: { Type: Boolean, default: !1 },
1090
- /** 扩展按钮 */
1091
- groupText: { Type: String, default: "" },
1092
- /** 密码模式 */
1093
- showType: { Type: String, default: "text" },
1094
- /** 密码模式 --废弃*/
1095
- type: { Type: String, default: "text" },
1096
- /** 最大值 */
1097
- max: { type: [Number, String] },
1098
- /** 最小值 */
1099
- min: { type: [Number, String] },
1100
- /** 最大长度 */
1101
- maxLength: { Type: Number || void 0, default: void 0 },
1102
- /** 最小长度 */
1103
- minLength: { Type: Number || void 0, default: void 0 },
1104
- /** 组件值 */
1105
- modelValue: { Type: String || Boolean, default: "" },
1106
- /** 隐藏边线 */
1107
- showBorder: { Type: Boolean, default: !0 },
1108
- /** 步长 */
1109
- step: { Type: Number, default: 1 },
1110
- /** 启用提示信息 */
1111
- placeholder: { Type: String, default: "" },
1112
- precision: { Type: Number, default: 0 },
1113
- /** 只读 */
1114
- readonly: { Type: Boolean, default: !1 },
1115
- /** 当组件禁用或只读时显示后边的按钮 */
1116
- showButtonWhenDisabled: { Type: Boolean, default: !1 },
1117
- /** tab索引 */
1118
- tabIndex: { Type: Number, default: 0 },
1119
- /** 文本在输入框中的对齐方式 */
1120
- textAlign: { Type: String, default: "left" },
1121
- /** 是否启用前置扩展信息;在输入框前面 显示 ① 图标鼠标滑过后显示 */
1122
- useExtendInfo: { Type: Boolean, default: !1 },
1123
- /** 前置扩展信息 */
1124
- extendInfo: { Type: String, default: "" },
1125
- /** 输入值 */
1126
- value: { Type: String, default: "" },
1127
- /** 是否撑开高度 */
1128
- autoHeight: { type: Boolean, default: !1 },
1129
- /** 自动聚焦 */
1130
- autofocus: { type: Boolean, default: !1 },
1131
- /** 文本区域可见的行数 */
1132
- rows: { type: Number, default: 2 },
1133
- /** 展示输入文本数量 */
1134
- showCount: { type: Boolean, default: !1 },
1135
- showZero: { type: Boolean, default: !1 },
1136
- /**
1137
- * 作为内嵌编辑器被创建后默认获得焦点
1138
- */
1139
- focusOnCreated: { type: Boolean, default: !1 },
1140
- /**
1141
- * 作为内嵌编辑器被创建后默认选中文本
1142
- */
1143
- selectOnCreated: { type: Boolean, default: !1 },
1144
- /**
1145
- * modelValue 更新时机, 默认 blur; 可选值:blur | input
1146
- * - blur: 离开焦点时更新
1147
- * - change: 输入时更新
1148
- */
1149
- updateOn: { type: String, default: "blur" },
1150
- formatValidation: { type: Object, default: {} },
1151
- /**
1152
- * 是否启用快捷键
1153
- */
1154
- keyboard: { type: Boolean, default: !0 }
1155
- }, Ae = [
1156
- { key: "none", value: "无" },
1157
- { key: "cellNumber", value: "手机号" },
1158
- { key: "tel", value: "座机号/传真号" },
1159
- { key: "telOrCell", value: "手机号/座机号/传真号" },
1160
- { key: "postCode", value: "邮编" },
1161
- { key: "email", value: "电子邮箱" },
1162
- { key: "idCode", value: "身份证号" },
1163
- { key: "carCode", value: "车牌号" },
1164
- { key: "subjectCode", value: "10位数字会计科目代码" },
1165
- { key: "custom", value: "自定义" }
1166
- ];
1167
- function wn(e) {
1168
- switch (e) {
1169
- case "none":
1170
- return "";
1171
- case "cellNumber":
1172
- return "^1[0-9]{10}$";
1173
- case "tel":
1174
- return "^(0[0-9]{2,3}\\-)?([2-9][0-9]{6,7})+(\\-[0-9]{1,4})?$";
1175
- case "telOrCell":
1176
- return "^(0[0-9]{2,3}\\-)?([2-9][0-9]{6,7})+(\\-[0-9]{1,4})?$|^1[0-9]{10}$";
1177
- case "postCode":
1178
- return "^[1-9]\\d{5}(?!\\d)$";
1179
- case "workCode":
1180
- return "^\\d{8}$";
1181
- case "email":
1182
- return "^[A-Za-z\\d]+([-_.][A-Za-z\\d]+)*@([A-Za-z\\d]+[-.])+[A-Za-z]{2,5}$";
1183
- case "idCode":
1184
- return "^[1-9]\\d{5}[1-9]\\d{3}((0[1-9])|(1[0-2]))(0[1-9]|([1|2][0-9])|3[0-1])((\\d{4})|\\d{3}X)$";
1185
- case "carCode":
1186
- return "^([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-Z][·\\s]?[A-HJ-NP-Z0-9]{4,5}[挂学警港澳]?|粤[Z港澳][·\\s]?[港澳][0-9A-HJ-NP-Z]{4}|[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼][A-Z][·\\s]?([DF][0-9A-HJ-NP-Z][0-9]{4}|[0-9]{5}[DF])[挂港澳]?|[使领][0-9]{3}[·\\s]?[0-9]{3}|临[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼][A-Z][·\\s]?[0-9A-Z]{4,5}|[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼][A-Z]?[·\\s]?警[0-9A-Z]{4}|[军海空][A-Z][·\\s]?[0-9]{4,5}|WJ(?:[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼]|\\d{2})[·\\s]?[0-9A-Z]{4,5})$";
1187
- case "carCodeNew":
1188
- return "^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([0-9]{5}[DF])|([DF][A-HJ-NP-Z0-9][0-9]{4}))$";
1189
- case "subjectCode":
1190
- return "^\\d{10}$";
1191
- }
1192
- return "";
1193
- }
1194
- function Vn(e) {
1195
- var t;
1196
- return "请输入正确的" + ((t = Ae.find((n) => n.key === e)) == null ? void 0 : t.value);
1197
- }
1198
- const kn = {
1199
- convertTo: (e, t, n, a) => {
1200
- e.editor.formatValidation || (e.editor.formatValidation = { type: "none" }), e.editor.formatValidation.type = n, e.editor.formatValidation.expression = wn(n), e.editor.formatValidation.message = Vn(n);
1201
- },
1202
- convertFrom: (e, t, n) => e.editor.formatValidation ? t === "type" ? e.editor.formatValidation[t] || "none" : e.editor.formatValidation[t] : "none"
1203
- }, ke = {
1204
- convertTo: (e, t, n, a) => {
1205
- e.editor.formatValidation || (e.editor.formatValidation = { type: "none" }), e.editor.formatValidation[t] = n;
1206
- },
1207
- convertFrom: (e, t, n) => e.editor.formatValidation ? e.editor.formatValidation[t] : e.editor[t]
1208
- };
1209
- class Tn extends rn {
1210
- constructor(t, n) {
1211
- super(t, n);
1212
- }
1213
- getPropertyConfig(t, n) {
1214
- return super.getPropertyConfig(t, n), this.propertyConfig.categories.formatValidation = this.getFormatValidation(t), this.propertyConfig;
1215
- }
1216
- getEditorProperties(t) {
1217
- var a, o;
1218
- let n;
1219
- if (((a = t == null ? void 0 : t.binding) == null ? void 0 : a.type) === "Form") {
1220
- const s = this.schemaService.getFieldByIDAndVMID(t.binding.field, this.viewModelId);
1221
- (o = s == null ? void 0 : s.schemaField) != null && o.type && (n = s.schemaField.type.length);
1222
- }
1223
- return this.getComponentConfig(t, {}, {
1224
- maxLength: {
1225
- description: "文本字数最大长度",
1226
- title: "最大长度",
1227
- type: "number",
1228
- editor: {
1229
- nullable: !0,
1230
- min: 0,
1231
- useThousands: !1,
1232
- max: n,
1233
- needValid: !0
1234
- }
1235
- },
1236
- showType: {
1237
- description: "指定是文本框还是密码框",
1238
- title: "展示类型",
1239
- type: "enum",
1240
- editor: {
1241
- type: "combo-list",
1242
- data: [
1243
- { id: "text", name: "文本框" },
1244
- { id: "password", name: "密码框" }
1245
- ]
1246
- },
1247
- refreshPanelAfterChanged: !0,
1248
- defaultValue: "text"
1249
- },
1250
- enableViewPassword: {
1251
- description: "",
1252
- title: "能否查看密码",
1253
- visible: t.editor.showType === "password",
1254
- type: "boolean"
1255
- }
1256
- });
1257
- }
1258
- getGridFieldEdtiorProperties(t) {
1259
- var a, o;
1260
- let n;
1261
- if (((a = t == null ? void 0 : t.binding) == null ? void 0 : a.type) === "Form") {
1262
- const s = this.schemaService.getFieldByIDAndVMID(t.binding.field, this.viewModelId);
1263
- (o = s == null ? void 0 : s.schemaField) != null && o.type && (n = s.schemaField.type.length);
1264
- }
1265
- return this.getComponentConfig(t, {}, {
1266
- maxLength: {
1267
- description: "文本字数最大长度",
1268
- title: "最大长度",
1269
- type: "number",
1270
- editor: {
1271
- nullable: !0,
1272
- min: 0,
1273
- useThousands: !1,
1274
- max: n
1275
- }
1276
- },
1277
- showType: {
1278
- description: "指定是文本框还是密码框",
1279
- title: "展示类型",
1280
- type: "enum",
1281
- editor: {
1282
- type: "combo-list",
1283
- data: [
1284
- { id: "text", name: "文本框" },
1285
- { id: "password", name: "密码框" }
1286
- ]
1287
- },
1288
- refreshPanelAfterChanged: !0,
1289
- defaultValue: "text"
1290
- },
1291
- enableViewPassword: {
1292
- description: "",
1293
- title: "能否查看密码",
1294
- visible: t.editor.showType === "password",
1295
- type: "boolean"
1296
- }
1297
- });
1298
- }
1299
- getFormatValidation(t) {
1300
- var a, o, s, i;
1301
- const n = {
1302
- title: "输入格式校验",
1303
- description: "输入校验",
1304
- hide: !((a = t.binding) != null && a.field),
1305
- properties: {
1306
- type: {
1307
- title: "格式类型",
1308
- type: "enum",
1309
- description: "格式类型",
1310
- defaultValue: "",
1311
- editor: {
1312
- type: "combo-list",
1313
- textField: "value",
1314
- valueField: "key",
1315
- idField: "key",
1316
- editable: !1,
1317
- data: Ae
1318
- },
1319
- refreshPanelAfterChanged: !0,
1320
- $converter: kn,
1321
- parentPropertyID: "formatValidation"
1322
- }
1323
- }
1324
- };
1325
- return (o = t.editor.formatValidation) != null && o.type && ((s = t.editor.formatValidation) == null ? void 0 : s.type) !== "none" && (n.properties.message = {
1326
- title: "输入错误提示",
1327
- type: "string",
1328
- description: "输入错误提示",
1329
- $converter: ke,
1330
- parentPropertyID: "formatValidation"
1331
- }), ((i = t.editor.formatValidation) == null ? void 0 : i.type) === "custom" && (n.properties.expression = {
1332
- title: "匹配正则",
1333
- type: "string",
1334
- description: "匹配正则",
1335
- $converter: ke,
1336
- parentPropertyID: "formatValidation"
1337
- }), n;
1338
- }
1339
- }
1340
- function In(e, t) {
1341
- const n = e.schema;
1342
- function a(o, s) {
1343
- return new Tn(o, t).getPropertyConfig(n, s);
1344
- }
1345
- return { getPropsConfig: a };
1346
- }
1347
- const Bn = /* @__PURE__ */ H({
1348
- name: "FInputGroupDesign",
1349
- props: bn,
1350
- emits: ["updateExtendInfo", "clear", "valueChange", "clickHandle", "blurHandle", "focusHandle", "enterHandle", "iconMouseEnter", "iconMouseLeave", "keyupHandle", "keydownHandle", "inputClick"],
1351
- setup(e, t) {
1352
- const n = V(e.modelValue), a = V(e.modelValue), o = Io(e, t, n, a), {
1353
- inputGroupClass: s,
1354
- inputType: i,
1355
- inputGroupStyle: h
1356
- } = o, d = V(), g = te("designer-host-service"), C = te("design-item-context"), u = In(C, g), w = ye(d, C, u), x = Z(() => e.showType === "password" ? "password" : "");
1357
- return me(() => {
1358
- d.value.componentInstance = w;
1359
- }), t.expose(w.value), () => F("div", {
1360
- id: "inputGroup",
1361
- ref: d,
1362
- class: s.value,
1363
- style: h.value
1364
- }, [F("input", {
1365
- class: "form-control",
1366
- type: e.showType,
1367
- placeholder: e.placeholder,
1368
- value: x.value
1369
- }, null), e.showType === "password" && e.enableViewPassword && F("span", {
1370
- class: "input-group-append"
1371
- }, [F("span", {
1372
- class: "input-group-text"
1373
- }, [F("span", {
1374
- class: "f-icon f-icon-eye"
1375
- }, null)])])]);
1376
- }
1377
- });
1378
- function xn() {
1379
- function e(i, h) {
1380
- const d = Fn[i];
1381
- return d ? d(h) : {};
1382
- }
1383
- function t(i) {
1384
- return Cn[i] || Bn;
1385
- }
1386
- function n(i) {
1387
- }
1388
- function a(i) {
1389
- }
1390
- function o(i) {
1391
- }
1392
- function s(i) {
1393
- }
1394
- return { getChangeFunctionName: n, getClearFunctionName: a, resolveEditorProps: e, resolveEditorType: t, getMousedownFunctionName: o, getMouseupFunctionName: s };
1395
- }
1396
- const ie = class ie {
1397
- /**
1398
- * 根据绑定字段类型获取可用的输入类控件
1399
- */
1400
- static getEditorTypesByMDataType(t, n = !1, a = "") {
1401
- if (n)
1402
- return [{ key: l["language-textbox"].type, value: l["language-textbox"].name }];
1403
- let o = ie.fieldControlTypeMapping[t];
1404
- if (a === "data-grid-column" && (o != null && o.length)) {
1405
- const s = [l["check-group"].type, l["radio-group"].type, l.image.type, l["rich-text-editor"].type];
1406
- o = o.filter((i) => !s.includes(i.key));
1407
- }
1408
- return o;
1409
- }
1410
- /**
1411
- * 获取所有输入类控件
1412
- */
1413
- static getAllInputTypes() {
1414
- const t = [];
1415
- for (const n in ie.fieldControlTypeMapping)
1416
- ie.fieldControlTypeMapping[n].forEach((a) => {
1417
- t.find((o) => o.key === a.key && o.value === a.value) || t.push({ key: a.key, value: a.value });
1418
- });
1419
- return t;
1502
+ function H() {
1503
+ return v;
1420
1504
  }
1421
- /**
1422
- * 提供schema字段基础属性和DOM控件属性的映射
1423
- * @param control 控件元数据
1424
- */
1425
- static mappingDomPropAndSchemaProp(t, n) {
1426
- var s;
1427
- const a = (s = t.editor) == null ? void 0 : s.type, o = [];
1428
- return (t.type === l["data-grid-column"].type || t.type === l["tree-grid-column"].type) && n && n.categoryId && n.categoryId.indexOf("gridFieldEditor") < 0 && o.push({ domField: "title", schemaField: "name" }), o.push({ domField: "label", schemaField: "name" }), o.push({ domField: "editor.required", schemaField: "require" }), o.push({ domField: "editor.readonly", schemaField: "readonly" }), (a === l["input-group"].type || a === l.textarea.type || a === l["number-spinner"].type) && o.push({ domField: "editor.maxLength", schemaField: "type.length" }), a === l["number-spinner"].type && o.push({ domField: "editor.precision", schemaField: "type.precision" }), (t.type === l["data-grid-column"].type || t.type === l["tree-grid-column"].type) && o.push({ domField: "formatter.precision", schemaField: "type.precision" }), (a === l["combo-list"].type || a === l["radio-group"].type) && o.push({ domField: "editor.data", schemaField: "type.enumValues" }), (t.type === l["data-grid-column"].type || t.type === l["tree-grid-column"].type) && o.push({ domField: "formatter.data", schemaField: "type.enumValues" }), a === l["date-picker"].type && (o.push({ domField: "editor.displayFormat", schemaField: "editor.format" }), o.push({ domField: "editor.fieldType", schemaField: "type.name" })), a === l["number-spinner"].type && (o.push({ domField: "editor.max", schemaField: "editor.maxValue" }), o.push({ domField: "editor.min", schemaField: "editor.minValue" })), a === l.lookup.type && (o.push({ domField: "editor.dataSource", schemaField: "editor.dataSource" }), o.push({ domField: "editor.valueField", schemaField: "editor.valueField" }), o.push({ domField: "editor.textField", schemaField: "editor.textField" }), o.push({ domField: "editor.displayType", schemaField: "editor.displayType" }), o.push({ domField: "editor.mapFields", schemaField: "editor.mapFields" }), o.push({ domField: "editor.helpId", schemaField: "editor.helpId" })), o.push({ domField: "path", schemaField: "bindingPath" }), o.push({ domField: "binding.path", schemaField: "bindingField" }), o.push({ domField: "binding.fullPath", schemaField: "path" }), (t.type === l["data-grid-column"].type || t.type === l["tree-grid-column"].type) && o.push({ domField: "field", schemaField: "bindingPath" }), o;
1429
- }
1430
- };
1431
- /**
1432
- * <字段类型,可配置的控件类型列表>的映射
1433
- */
1434
- le(ie, "fieldControlTypeMapping", {
1435
- String: [
1436
- { key: l["input-group"].type, value: l["input-group"].name },
1437
- { key: l.lookup.type, value: l.lookup.name },
1438
- { key: l.image.type, value: l.image.name },
1439
- { key: l["date-picker"].type, value: l["date-picker"].name },
1440
- { key: l.switch.type, value: l.switch.name },
1441
- { key: l["check-box"].type, value: l["check-box"].name },
1442
- { key: l["check-group"].type, value: l["check-group"].name },
1443
- { key: l["radio-group"].type, value: l["radio-group"].name },
1444
- { key: l["combo-list"].type, value: l["combo-list"].name },
1445
- { key: l.textarea.type, value: l.textarea.name },
1446
- { key: l["time-picker"].type, value: l["time-picker"].name }
1447
- ],
1448
- Text: [
1449
- { key: l.textarea.type, value: l.textarea.name },
1450
- { key: l.lookup.type, value: l.lookup.name },
1451
- { key: l.image.type, value: l.image.name },
1452
- { key: l["rich-text-editor"].type, value: l["rich-text-editor"].name }
1453
- ],
1454
- Decimal: [
1455
- { key: l["number-spinner"].type, value: l["number-spinner"].name }
1456
- ],
1457
- Integer: [
1458
- { key: l["number-spinner"].type, value: l["number-spinner"].name }
1459
- ],
1460
- Number: [
1461
- { key: l["number-spinner"].type, value: l["number-spinner"].name },
1462
- { key: l.switch.type, value: l.switch.name },
1463
- { key: l["check-box"].type, value: l["check-box"].name }
1464
- ],
1465
- BigNumber: [
1466
- { key: l["number-spinner"].type, value: l["number-spinner"].name }
1467
- ],
1468
- Date: [
1469
- { key: l["date-picker"].type, value: l["date-picker"].name }
1470
- ],
1471
- DateTime: [
1472
- { key: l["date-picker"].type, value: l["date-picker"].name }
1473
- ],
1474
- Boolean: [
1475
- { key: l.switch.type, value: l.switch.name },
1476
- { key: l["check-box"].type, value: l["check-box"].name }
1477
- ],
1478
- Enum: [
1479
- { key: l["combo-list"].type, value: l["combo-list"].name },
1480
- { key: l["radio-group"].type, value: l["radio-group"].name }
1481
- ],
1482
- Object: [
1483
- { key: l.lookup.type, value: l.lookup.name },
1484
- { key: l["combo-list"].type, value: l["combo-list"].name },
1485
- { key: l["radio-group"].type, value: l["radio-group"].name }
1486
- ]
1487
- });
1488
- let Te = ie;
1489
- var ge = /* @__PURE__ */ ((e) => (e.Form = "Form", e.Variable = "Variable", e))(ge || {}), qe = /* @__PURE__ */ ((e) => (e.SimpleField = "SimpleField", e.ComplexField = "ComplexField", e))(qe || {});
1490
- function En(e, t, n) {
1491
- function a() {
1492
- const i = n.componentId;
1493
- if (!i)
1494
- return !1;
1495
- const h = e.formSchemaUtils.getViewModelIdByComponentId(i);
1496
- if (!h)
1497
- return !1;
1498
- const { schema: d } = t, { designViewModelUtils: g } = e, C = g.getDgViewModel(h), u = C == null ? void 0 : C.fields.find((w) => w.id === d.binding.field);
1499
- return !(!u || u.$type !== qe.SimpleField);
1500
- }
1501
- function o() {
1502
- const { schema: i } = t;
1503
- return !!e.formSchemaUtils.getVariableById(i.binding.field);
1504
- }
1505
- function s() {
1506
- var d;
1507
- const { schema: i } = t;
1508
- let h = !0;
1509
- if (!e || !((d = i.binding) != null && d.field))
1510
- return h;
1511
- switch (i.binding.type) {
1512
- case ge.Form: {
1513
- h = a();
1514
- break;
1515
- }
1516
- case ge.Variable:
1517
- h = o();
1518
- }
1519
- return h;
1520
- }
1521
- return { checkBindingFieldValidation: s };
1522
- }
1523
- const Pn = /* @__PURE__ */ H({
1524
- name: "FDynamicFormGroupDesign",
1525
- props: lt,
1526
- emits: ["change", "update:modelValue"],
1527
- setup(e, t) {
1528
- var K;
1529
- const n = V(e.id), a = V(e.customClass), o = V(e.editor), s = V(e.label), i = V(e.modelValue), h = V(!0), d = V(((K = e.editor) == null ? void 0 : K.required) === !0), g = V(e.showLabel);
1530
- V(e.type);
1531
- const C = V(), u = te("designer-host-service"), w = te("design-item-context"), x = Z(() => g.value ? e.showLabelType : "none"), {
1532
- resolveEditorProps: $,
1533
- resolveEditorType: U
1534
- } = xn(), A = Z(() => ({
1535
- "form-group": !0,
1536
- "farris-form-group": !0,
1537
- "common-group": !0,
1538
- "q-state-readonly": h.value,
1539
- "form-group-in-canvas": !0
1540
- })), L = Z(() => {
1541
- const R = o.value.type || "input-group", J = U(R), j = $(R, o.value);
1542
- return () => F(J, ce({
1543
- ref: C
1544
- }, j, {
1545
- modelValue: i.value,
1546
- "onUpdate:modelValue": (Q) => i.value = Q
1547
- }), null);
1548
- });
1549
- oe([() => e.id, () => e.customClass, () => e.editor, () => e.label, () => e.modelValue, () => e.readonly, () => e.showLabel], ([R, J, j, Q, _, D, W]) => {
1550
- var r;
1551
- n.value = R, a.value = J, o.value = {
1552
- ...j
1553
- }, s.value = Q, i.value = _, h.value = D, d.value = ((r = o.value) == null ? void 0 : r.required) === !0, g.value = W;
1554
- }, {
1555
- deep: !0
1556
- });
1557
- const B = !te("external-container-id"), {
1558
- checkBindingFieldValidation: M
1559
- } = En(u, w, e);
1560
- function O() {
1561
- const R = B ? M() : !0;
1562
- return F(ut, {
1563
- id: `${n.value}-lable`,
1564
- showType: x.value,
1565
- required: d.value,
1566
- text: s.value,
1567
- title: s.value,
1568
- valid: R,
1569
- inValidTip: "绑定信息已失效,请切换绑定或移除控件"
1570
- }, null);
1571
- }
1572
- const S = Z(() => {
1573
- if (e.fill)
1574
- return {
1575
- maxWidth: "none"
1576
- };
1577
- });
1578
- return t.expose({
1579
- editorRef: C
1580
- }), () => F("div", {
1581
- id: `${n.value}-input-group`,
1582
- class: a.value
1583
- }, [F("div", {
1584
- class: "farris-group-wrap",
1585
- style: S.value
1586
- }, [F("div", {
1587
- class: A.value
1588
- }, [O(), F("div", {
1589
- class: "farris-input-wrap"
1590
- }, [L.value()])])])]);
1591
- }
1592
- });
1593
- function Ln(e, t) {
1594
- function n() {
1595
- return !0;
1596
- }
1597
- function a() {
1598
- return !0;
1599
- }
1600
- function o() {
1505
+ function L() {
1601
1506
  return !1;
1602
1507
  }
1603
- function s() {
1604
- return !0;
1605
- }
1606
- function i(u) {
1607
- var L;
1608
- const w = t == null ? void 0 : t.designViewModelUtils, x = t == null ? void 0 : t.formSchemaUtils, $ = (L = e == null ? void 0 : e.componentInstance.value) == null ? void 0 : L.belongedComponentId;
1609
- if (!$ || !w || !x)
1610
- return;
1611
- const U = x.getViewModelIdByComponentId($), A = w.getDgViewModel(U);
1612
- A && A.removeField([u]);
1613
- }
1614
- function h(u, w) {
1615
- const x = t == null ? void 0 : t.formSchemaUtils, { schema: $ } = e;
1616
- if (x.getComponents().find((A) => {
1617
- let L = x.getControlsInCmpWidthBinding(A.viewModel, u);
1618
- if (L = L.filter((b) => {
1619
- var M;
1620
- if (b.id === $.id)
1621
- return !1;
1622
- const B = w.type === "visible" ? b[w.type] : (M = b.editor) == null ? void 0 : M[w.type];
1623
- if (B && B.type === "Expression" && B.expressionId === w.id)
1624
- return !0;
1625
- }), L.length)
1626
- return !0;
1627
- }))
1628
- return !0;
1629
- }
1630
- function d(u) {
1631
- var $;
1632
- const w = t == null ? void 0 : t.formSchemaUtils, { schema: x } = e;
1633
- if (w.getExpressions().length) {
1634
- const U = w.getExpressions(), A = U.findIndex((L) => L.target === u);
1635
- A > -1 && (($ = U[A].rules) == null || $.map((L) => {
1636
- var b;
1637
- switch (L.type) {
1638
- case "visible":
1639
- case "readonly":
1640
- case "required": {
1641
- const B = L.type === "visible" ? x[L.type] : (b = x.editor) == null ? void 0 : b[L.type];
1642
- B && B.type === "Expression" && B.expressionId === L.id && (h(u, L) || (L.needDelete = !0));
1643
- break;
1644
- }
1645
- default:
1646
- h(u, L) || (L.needDelete = !0);
1647
- }
1648
- }), U[A].rules = U[A].rules.filter((L) => !L.needDelete));
1649
- }
1650
- }
1651
- function g() {
1652
- var w, x;
1653
- const u = (w = e == null ? void 0 : e.parent) == null ? void 0 : w.componentInstance.value;
1654
- ((x = u == null ? void 0 : u.schema) == null ? void 0 : x.type) === l["response-layout-item"].type && (u != null && u.schema.appearance.class) && (u.schema.appearance.class = u.schema.appearance.class.replace("f-form-layout", ""), u.schema.appearance.class = u.schema.appearance.class.replace("farris-form", ""), u.schema.appearance.class = u.schema.appearance.class.replace("farris-form-controls-inline", ""), u.schema.appearance.class = u.schema.appearance.class.replace("farris-form-auto", ""), u.schema.appearance.class = u.schema.appearance.class.trim().replace(" ", " "));
1655
- }
1656
- function C() {
1657
- const { schema: u } = e, w = u.binding && u.binding.field;
1658
- w && (i(w), d(w)), g();
1508
+ function W(n) {
1509
+ return new Jo(n, e).getPropertyConfig(r, t.componentInstance.value);
1659
1510
  }
1660
1511
  return {
1661
- canAccepts: o,
1662
- checkCanDeleteComponent: a,
1663
- checkCanMoveComponent: n,
1664
- hideNestedPaddingInDesginerView: s,
1665
- onRemoveComponent: C
1512
+ canAccepts: w,
1513
+ checkCanDeleteComponent: H,
1514
+ checkCanMoveComponent: ne,
1515
+ getStyles: A,
1516
+ getPropsConfig: W,
1517
+ hideNestedPaddingInDesginerView: L,
1518
+ onAcceptMovedChildElement: k,
1519
+ onResolveNewComponentSchema: oe,
1520
+ moveInputBetweenComponent: P,
1521
+ resolveFormGroupAppearance: Q,
1522
+ syncFieldToViewModel: Z
1666
1523
  };
1667
1524
  }
1668
- const Nn = /* @__PURE__ */ H({
1669
- name: "FFormGroupDesign",
1670
- props: pe,
1671
- emits: [],
1672
- setup(e, t) {
1673
- const n = V(), a = te("design-item-context"), o = te("designer-host-service"), s = Ln(a, o), i = ye(n, a, s);
1674
- return me(() => {
1675
- n.value.componentInstance = i, i.value.getPropConfig = (...h) => {
1676
- var g, C, u;
1677
- let d = bo[e.editor.type];
1678
- return d && Object.keys(d).length === 0 && ((g = n.value) != null && g.editorRef) && ((u = (C = n.value) == null ? void 0 : C.editorRef) != null && u.getPropConfig) && (d = n.value.editorRef.getPropConfig(...h, i.value)), d;
1679
- };
1680
- }), t.expose(i.value), () => F(Pn, ce(e, {
1681
- ref: n
1682
- }), null);
1683
- }
1684
- }), he = /* @__PURE__ */ new Map([
1685
- ["appearance", wo]
1686
- ]), Mn = /* @__PURE__ */ new Map([]), $n = "root-viewmodel";
1687
- class Dn {
1688
- constructor(t, n) {
1689
- le(this, "formSchemaUtils");
1690
- le(this, "controlCreatorUtils");
1691
- le(this, "designViewModelUtils");
1692
- this.resolver = t, this.designerHostService = n, this.formSchemaUtils = this.designerHostService.formSchemaUtils, this.controlCreatorUtils = this.designerHostService.controlCreatorUtils, this.designViewModelUtils = this.designerHostService.designViewModelUtils;
1693
- }
1694
- createComponent(t) {
1695
- const n = this.createComponentRefNode(t), a = this.createComponentNode(t), o = this.createViewModeNode(t), s = this.formSchemaUtils.getFormSchema();
1696
- return s.module.viewmodels.push(o), s.module.components.push(a), this.designViewModelUtils.assembleDesignViewModel(), n;
1697
- }
1698
- createComponentRefNode(t) {
1699
- const n = this.resolver.getSchemaByType("component-ref");
1700
- return Object.assign(n, {
1701
- id: `${t.componentId}-component-ref`,
1702
- component: `${t.componentId}-component`
1703
- }), n;
1704
- }
1705
- createComponentNode(t) {
1706
- const n = this.resolver.getSchemaByType("component"), a = this.createFormComponentContents(t);
1707
- return Object.assign(n, {
1708
- id: `${t.componentId}-component`,
1709
- viewModel: `${t.componentId}-component-viewmodel`,
1710
- componentType: t.componentType,
1711
- appearance: {
1712
- class: this.getFormComponentClass(t)
1713
- },
1714
- formColumns: t.formColumns,
1715
- contents: a
1716
- }), n;
1717
- }
1718
- /**
1719
- * 获取卡片组件层级的class样式
1720
- */
1721
- getFormComponentClass(t) {
1722
- var a, o;
1723
- const { templateId: n } = this.formSchemaUtils.getFormSchema().module;
1724
- if (n === "double-list-in-tab-template" && ((o = (a = t.parentComponentInstance) == null ? void 0 : a.schema) == null ? void 0 : o.type) === "tab-page") {
1725
- const s = t.parentComponentInstance.parent && t.parentComponentInstance.parent.schema;
1726
- if ((s == null ? void 0 : s.type) === "tabs" && (s == null ? void 0 : s.fill) === !0)
1727
- return "f-struct-wrapper f-utils-fill-flex-column";
1728
- }
1729
- return "f-struct-wrapper";
1730
- }
1731
- createFormComponentContents(t) {
1732
- var h, d;
1733
- const n = this.resolver.getSchemaByType("section");
1734
- Object.assign(n, {
1735
- id: t.componentId + "-form-section",
1736
- appearance: {
1737
- class: "f-section-form f-section-in-mainsubcard"
1738
- },
1739
- mainTitle: t.componentName
1740
- });
1741
- const a = this.resolver.getSchemaByType("response-form"), o = [];
1742
- Object.assign(a, {
1743
- id: t.componentId + "-form",
1744
- appearance: {
1745
- class: "f-form-layout farris-form farris-form-controls-inline"
1746
- },
1747
- contents: o,
1748
- controlsInline: !0
1749
- }), n.contents = [a];
1750
- const { selectedFields: s } = t;
1751
- s == null || s.forEach((g) => {
1752
- if (g.$type === be.SimpleField) {
1753
- const C = an(g), u = this.resolveControlClassByFormColumns(t), w = this.controlCreatorUtils.setFormFieldProperty(C, "", u);
1754
- w && o.push(w);
1755
- }
1756
- });
1757
- const { templateId: i } = this.formSchemaUtils.getFormSchema().module;
1758
- if (i === "double-list-in-tab-template" && ((d = (h = t.parentComponentInstance) == null ? void 0 : h.schema) == null ? void 0 : d.type) === "tab-page") {
1759
- const g = t.parentComponentInstance.parent && t.parentComponentInstance.parent.schema;
1760
- (g == null ? void 0 : g.type) === "tabs" && (g == null ? void 0 : g.fill) === !0 && (n.appearance.class = "f-section-grid f-section-in-main px-0 pt-0", n.fill = !0);
1761
- }
1762
- return [n];
1763
- }
1764
- resolveControlClassByFormColumns(t) {
1765
- let n = "";
1766
- switch (t.formColumns) {
1767
- case 1: {
1768
- n = "col-12 col-md-12 col-xl-12 col-el-12";
1769
- break;
1770
- }
1771
- case 2: {
1772
- n = "col-12 col-md-6 col-xl-6 col-el-6";
1773
- break;
1774
- }
1775
- case 3: {
1776
- n = "col-12 col-md-6 col-xl-4 col-el-4";
1777
- break;
1778
- }
1779
- case 4: {
1780
- n = "col-12 col-md-6 col-xl-3 col-el-2";
1781
- break;
1782
- }
1783
- }
1784
- return n;
1785
- }
1786
- /**
1787
- * 添加viewModel节点
1788
- */
1789
- createViewModeNode(t) {
1790
- return {
1791
- id: `${t.componentId}-component-viewmodel`,
1792
- code: `${t.componentId}-component-viewmodel`,
1793
- name: t.componentName,
1794
- bindTo: t.bindTo,
1795
- parent: $n,
1796
- fields: this.assembleViewModelFields(t),
1797
- commands: [],
1798
- states: [],
1799
- enableValidation: !0
1800
- };
1801
- }
1802
- /**
1803
- * 组装viewModel fields 节点
1804
- */
1805
- assembleViewModelFields(t) {
1806
- const n = [], { selectedFields: a } = t;
1807
- return a == null || a.forEach((o) => {
1808
- if (o.$type === be.SimpleField) {
1809
- let s = "blur";
1810
- const i = o.type.name;
1811
- (i === we.Enum || i === we.Boolean) && (s = "change"), n.push({
1812
- type: "Form",
1813
- id: o.id,
1814
- fieldName: o.bindingField,
1815
- groupId: null,
1816
- groupName: null,
1817
- updateOn: s,
1818
- fieldSchema: {}
1819
- });
1820
- }
1821
- }), n;
1822
- }
1823
- }
1824
- function Un(e, t, n, a) {
1825
- var s, i, h, d, g, C;
1826
- const o = n.parentComponentInstance;
1827
- if (o && a) {
1828
- const u = (s = o.schema) == null ? void 0 : s.type, x = {
1829
- componentId: `form-${Math.random().toString(36).slice(2, 6)}`,
1830
- componentName: ((i = n.bindingSourceContext) == null ? void 0 : i.entityTitle) || ((d = (h = n.bindingSourceContext) == null ? void 0 : h.bindingEntity) == null ? void 0 : d.name) || "标题",
1831
- componentType: "form",
1832
- formColumns: u === "splitter-pane" ? 1 : 4,
1833
- parentContainerId: o.schema.id,
1834
- parentComponentInstance: o,
1835
- bindTo: ((g = n.bindingSourceContext) == null ? void 0 : g.bindTo) || "/",
1836
- selectedFields: (C = n.bindingSourceContext) == null ? void 0 : C.bindingEntityFields
1837
- };
1838
- return new Dn(e, a).createComponent(x);
1839
- } else
1840
- return t;
1841
- }
1842
- function Rn(e, t, n) {
1843
- return t;
1844
- }
1845
- const An = "https://json-schema.org/draft/2020-12/schema", qn = "https://farris-design.gitee.io/grid-field-editor.schema.json", Sn = "response-form-layout-setting", Gn = "A Farris Data Grid Component", On = "object", jn = {
1846
- id: {
1847
- description: "The unique identifier for a Input Group",
1848
- type: "string"
1849
- },
1850
- type: {
1851
- description: "The type string of Input Group component",
1852
- type: "string",
1853
- default: "response-form-layout-setting"
1854
- },
1855
- initialState: {
1856
- description: "",
1857
- type: "object"
1858
- }
1859
- }, Zn = [
1860
- "id",
1861
- "type"
1862
- ], Wn = {
1863
- $schema: An,
1864
- $id: qn,
1865
- title: Sn,
1866
- description: Gn,
1867
- type: On,
1868
- properties: jn,
1869
- required: Zn
1870
- }, Se = {
1871
- initialState: {
1872
- type: Object,
1873
- default: {
1874
- uniqueColClassInSM: 12,
1875
- uniqueColClassInMD: 6,
1876
- uniqueColClassInLG: 3,
1877
- uniqueColClassInEL: 2
1878
- }
1879
- }
1880
- }, Jn = de(Se, Wn, Mn, Rn), zn = /* @__PURE__ */ H({
1881
- name: "FResponseFormLayoutSetting",
1882
- props: Se,
1883
- emits: ["change"],
1884
- setup(e, t) {
1885
- const n = [1], a = [1, 2], o = [1, 2, 3, 4], s = [1, 2, 3, 4, 6];
1886
- let i = [], h = [], d = [], g = [];
1887
- const C = V(e.initialState), u = V(-1), w = V(-1), x = V(-1), $ = V(-1);
1888
- function U() {
1889
- const b = "自定义", B = 12 / C.value.uniqueColClassInSM;
1890
- n.includes(B) ? u.value = B : (i.push({
1891
- value: 0,
1892
- name: b
1893
- }), u.value = 0);
1894
- const M = 12 / C.value.uniqueColClassInMD;
1895
- a.includes(M) ? w.value = M : (h.push({
1896
- value: 0,
1897
- name: b
1898
- }), w.value = 0);
1899
- const O = 12 / C.value.uniqueColClassInLG;
1900
- o.includes(O) ? x.value = O : (d.push({
1901
- value: 0,
1902
- name: b
1903
- }), x.value = 0);
1904
- const S = 12 / C.value.uniqueColClassInEL;
1905
- s.includes(S) ? $.value = S : (g.push({
1906
- value: 0,
1907
- name: b
1908
- }), $.value = 0), i = [...i], h = [...h], d = [...d], g = [...g];
1909
- }
1910
- function A() {
1911
- n.forEach((b) => {
1912
- i.push({
1913
- value: b,
1914
- name: b + ""
1915
- });
1916
- }), a.forEach((b) => {
1917
- h.push({
1918
- value: b,
1919
- name: b + ""
1920
- });
1921
- }), o.forEach((b) => {
1922
- d.push({
1923
- value: b,
1924
- name: b + ""
1925
- });
1926
- }), s.forEach((b) => {
1927
- g.push({
1928
- value: b,
1929
- name: b + ""
1930
- });
1931
- });
1932
- }
1933
- function L() {
1934
- sn.question("应用统一布局,将重置区域内部所有控件的宽度样式,确定应用?", "", () => {
1935
- C.value.uniqueColClassInSM = u.value === 0 ? null : 12 / u.value, C.value.uniqueColClassInMD = w.value === 0 ? null : 12 / w.value, C.value.uniqueColClassInLG = x.value === 0 ? null : 12 / x.value, C.value.uniqueColClassInEL = $.value === 0 ? null : 12 / $.value, t.emit("change", C.value);
1936
- }, () => {
1937
- });
1938
- }
1939
- return me(() => {
1940
- A(), U();
1941
- }), () => F("div", null, [F("div", {
1942
- class: "f-form-layout farris-form farris-form-controls-inline"
1943
- }, [F("div", {
1944
- class: "form-group farris-form-group screenGroup"
1945
- }, [F("span", {
1946
- class: "screenName"
1947
- }, [ee(" 小屏幕 ")]), F("div", {
1948
- class: "d-flex ml-2 screen-input"
1949
- }, [F(ue, {
1950
- data: i,
1951
- idField: "value",
1952
- valueField: "value",
1953
- editable: !1,
1954
- enableClear: !1,
1955
- modelValue: u.value,
1956
- "onUpdate:modelValue": (b) => u.value = b
1957
- }, null), F("span", {
1958
- class: "ml-2 columnText"
1959
- }, [ee("列")])])]), F("div", {
1960
- class: "form-group farris-form-group screenGroup"
1961
- }, [F("span", {
1962
- class: "screenName"
1963
- }, [ee("中等屏幕")]), F("div", {
1964
- class: "d-flex ml-2 screen-input"
1965
- }, [F(ue, {
1966
- data: h,
1967
- idField: "value",
1968
- valueField: "value",
1969
- editable: !1,
1970
- enableClear: !1,
1971
- modelValue: w.value,
1972
- "onUpdate:modelValue": (b) => w.value = b
1973
- }, null), F("span", {
1974
- class: "ml-2 columnText"
1975
- }, [ee("列")])])]), F("div", {
1976
- class: "form-group farris-form-group screenGroup"
1977
- }, [F("span", {
1978
- class: "screenName"
1979
- }, [ee("大屏幕")]), F("div", {
1980
- class: "d-flex ml-2 screen-input"
1981
- }, [F(ue, {
1982
- data: d,
1983
- idField: "value",
1984
- valueField: "value",
1985
- editable: !1,
1986
- enableClear: !1,
1987
- modelValue: x.value,
1988
- "onUpdate:modelValue": (b) => x.value = b
1989
- }, null), F("span", {
1990
- class: "ml-2 columnText"
1991
- }, [ee("列")])])]), F("div", {
1992
- class: "form-group farris-form-group screenGroup"
1993
- }, [F("span", {
1994
- class: "screenName"
1995
- }, [ee("极大屏幕")]), F("div", {
1996
- class: "d-flex ml-2 screen-input"
1997
- }, [F(ue, {
1998
- data: g,
1999
- idField: "value",
2000
- valueField: "value",
2001
- editable: !1,
2002
- enableClear: !1,
2003
- modelValue: $.value,
2004
- "onUpdate:modelValue": (b) => $.value = b
2005
- }, null), F("span", {
2006
- class: "ml-2 columnText"
2007
- }, [ee("列")])])])]), F("div", {
2008
- class: "applyBtn"
2009
- }, [F("button", {
2010
- class: "btn f-rt-btn btn-primary",
2011
- type: "button",
2012
- onClick: () => L()
2013
- }, [ee("应用")])])]);
2014
- }
2015
- }), Xn = "https://json-schema.org/draft/2020-12/schema", Kn = "https://farris-design.gitee.io/response-form.schema.json", Qn = "response-form", _n = "A Farris Data Collection Component", Yn = "object", Hn = {
2016
- id: {
2017
- description: "The unique identifier for a form group",
2018
- type: "string"
2019
- },
2020
- type: {
2021
- description: "The type string of form group component",
2022
- type: "string",
2023
- default: "response-form"
2024
- },
2025
- appearance: {
2026
- description: "",
2027
- type: "object",
2028
- properties: {
2029
- class: {
2030
- type: "string"
2031
- },
2032
- style: {
2033
- type: "string"
2034
- }
2035
- },
2036
- default: {}
2037
- },
2038
- contents: {
2039
- description: "",
2040
- type: "array",
2041
- default: []
2042
- },
2043
- visible: {
2044
- description: "",
2045
- type: "boolean",
2046
- default: !0
2047
- },
2048
- labelAutoOverflow: {
2049
- description: "",
2050
- type: "boolean",
2051
- default: !1
2052
- },
2053
- adaptForLanguage: {
2054
- description: "",
2055
- type: "boolean",
2056
- default: !0
2057
- }
2058
- }, er = [
2059
- "id",
2060
- "type",
2061
- "contents"
2062
- ], tr = {
2063
- $schema: Xn,
2064
- $id: Kn,
2065
- title: Qn,
2066
- description: _n,
2067
- type: Yn,
2068
- properties: Hn,
2069
- required: er
2070
- }, or = "https://json-schema.org/draft/2020-12/schema", nr = "https://farris-design.gitee.io/form-group.schema.json", rr = "form-group", ar = "A Farris Input Component", ir = "object", sr = {
2071
- id: {
2072
- description: "The unique identifier for a form group",
2073
- type: "string"
2074
- },
2075
- type: {
2076
- description: "The type string of form group component",
2077
- type: "string",
2078
- default: "form-group"
2079
- },
2080
- appearance: {
2081
- description: "",
2082
- type: "object",
2083
- properties: {
2084
- class: {
2085
- type: "string"
2086
- },
2087
- style: {
2088
- type: "string"
2089
- }
2090
- },
2091
- default: {}
2092
- },
2093
- enableLinkLabel: {
2094
- description: "",
2095
- type: "boolean",
2096
- default: !1
2097
- },
2098
- editor: {
2099
- description: "",
2100
- type: "object",
2101
- default: null
2102
- },
2103
- label: {
2104
- description: "",
2105
- type: "string",
2106
- default: ""
2107
- },
2108
- lableWidth: {
2109
- description: "",
2110
- type: "number"
2111
- },
2112
- binding: {
2113
- description: "",
2114
- type: "object",
2115
- default: {}
2116
- },
2117
- visible: {
2118
- description: "",
2119
- type: "boolean",
2120
- default: !0
2121
- },
2122
- required: {
2123
- description: "",
2124
- type: "boolean",
2125
- default: !1
2126
- },
2127
- errors: {
2128
- description: "",
2129
- type: "object",
2130
- default: null
2131
- },
2132
- name: {
2133
- description: "The name string of form group component",
2134
- type: "string",
2135
- default: "form group"
2136
- },
2137
- showLabelType: {
2138
- description: "",
2139
- type: "string"
2140
- },
2141
- fill: {
2142
- type: "boolean",
2143
- default: !1
2144
- }
2145
- }, lr = [
2146
- "id",
2147
- "type",
2148
- "editor"
2149
- ], Ge = {
2150
- $schema: or,
2151
- $id: nr,
2152
- title: rr,
2153
- description: ar,
2154
- type: ir,
2155
- properties: sr,
2156
- required: lr
2157
- }, Oe = de(Me, tr, he, Un), je = de(
2158
- pe,
2159
- Ge,
2160
- he,
2161
- void 0
2162
- ), ur = Vo(), cr = de(
2163
- Ue,
2164
- Ge,
2165
- he,
2166
- void 0
2167
- );
2168
- se.register = (e, t, n, a) => {
2169
- e["form-group"] = fn, t["form-group"] = je, e["response-form"] = se, t["response-form"] = Oe, e["form-input"] = fe, t["form-input"] = cr, a["form-group"] = { editorResolver: ur }, e["response-form-layout-setting"] = zn, t["response-form-layout-setting"] = Jn;
2170
- };
2171
- se.registerDesigner = (e, t, n) => {
2172
- e["form-group"] = Nn, t["form-group"] = je, e["response-form"] = vn, t["response-form"] = Oe;
2173
- };
2174
- se.install = (e) => {
2175
- e.component(se.name, se).component(fe.name, fe).component(Ve.name, Ve);
1525
+ se.install = (t) => {
1526
+ t.component(ye.name, ye).component(Ce.name, Ce).component(se.name, se).component(ge.name, ge);
2176
1527
  };
2177
1528
  export {
2178
- fn as FDynamicFormGroup,
2179
- fe as FDynamicFormInput,
2180
- $e as FDynamicFormLabel,
2181
- Ve as FFormControl,
2182
- se as FResponseForm,
1529
+ se as FDynamicForm,
1530
+ ge as FDynamicFormGroup,
1531
+ Ce as FDynamicFormInput,
1532
+ qo as FDynamicFormLabel,
1533
+ ye as FResponseForm,
2183
1534
  se as default,
2184
- pe as dynamicFormGroupProps,
2185
- Ue as dynamicFormInputProps,
2186
- ur as editorResolver,
2187
- je as formGroupPropsResolver,
2188
- cr as formInputPropsResolver,
2189
- Oe as formPropsResolver,
2190
- Me as responseFormProps,
2191
- hn as useDesignerRules,
2192
- De as useTypeResolver
1535
+ jo as dynamicFormGroupProps,
1536
+ _o as dynamicFormInputProps,
1537
+ Ao as dynamicFormProps,
1538
+ Br as dynamicFormPropsResolver,
1539
+ Pr as formPropsResolver,
1540
+ ie as responseFormProps,
1541
+ kr as useDesignerRules,
1542
+ we as useTypeResolver
2193
1543
  };