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