@farris/ui-vue 1.7.3 → 1.7.4

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