@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,7 +1,97 @@
1
- import { ref as y, computed as n, defineComponent as H, createVNode as t } from "vue";
1
+ var j = Object.defineProperty;
2
+ var K = (p, n, e) => n in p ? j(p, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : p[n] = e;
3
+ var y = (p, n, e) => K(p, typeof n != "symbol" ? n + "" : n, e);
4
+ import { ref as F, computed as I, defineComponent as U, createVNode as C, nextTick as Z, inject as B, onMounted as z } from "vue";
5
+ import { resolveAppearance as D, createPropsResolver as $ } from "../dynamic-resolver/index.esm.js";
2
6
  import "../locale/index.esm.js";
3
- import { withInstall as C } from "../common/index.esm.js";
4
- const Q = {
7
+ import { DgControl as a, canvasChanged as x, refreshCanvas as J, useDesignerComponent as X } from "../designer-canvas/index.esm.js";
8
+ import { cloneDeep as Y } from "lodash-es";
9
+ import { FormSchemaEntityField$Type as N, FormSchemaEntityFieldType$Type as _, withInstall as ee } from "../common/index.esm.js";
10
+ function te(p, n, e) {
11
+ return n;
12
+ }
13
+ const ie = /* @__PURE__ */ new Map([
14
+ ["appearance", D]
15
+ ]), ne = "https://json-schema.org/draft/2020-12/schema", se = "https://farris-design.gitee.io/avatar.schema.json", re = "avatar", oe = "A Farris Component", ae = "object", le = {
16
+ id: {
17
+ description: "The unique identifier for avatar",
18
+ type: "string"
19
+ },
20
+ type: {
21
+ description: "The type string of avatar",
22
+ type: "string",
23
+ default: "avatar"
24
+ },
25
+ appearance: {
26
+ description: "",
27
+ type: "object",
28
+ properties: {
29
+ class: {
30
+ type: "string"
31
+ },
32
+ style: {
33
+ type: "string"
34
+ }
35
+ },
36
+ default: {}
37
+ },
38
+ binding: {
39
+ description: "",
40
+ type: "object",
41
+ default: {}
42
+ },
43
+ disabled: {
44
+ type: "boolean",
45
+ default: !1
46
+ },
47
+ avatarWidth: {
48
+ description: "",
49
+ type: "number",
50
+ default: 100
51
+ },
52
+ avatarHeight: {
53
+ description: "",
54
+ type: "number",
55
+ default: 100
56
+ },
57
+ readonly: {
58
+ description: "",
59
+ type: "boolean",
60
+ default: !1
61
+ },
62
+ cover: {
63
+ description: "",
64
+ type: "string",
65
+ default: ""
66
+ },
67
+ tabindex: {
68
+ description: "",
69
+ type: "number",
70
+ default: -1
71
+ },
72
+ visible: {
73
+ description: "",
74
+ type: "boolean",
75
+ default: !0
76
+ }
77
+ }, de = [
78
+ "id",
79
+ "type"
80
+ ], ce = [
81
+ "id",
82
+ "appearance",
83
+ "binding",
84
+ "visible"
85
+ ], ue = {
86
+ $schema: ne,
87
+ $id: se,
88
+ title: re,
89
+ description: oe,
90
+ type: ae,
91
+ properties: le,
92
+ required: de,
93
+ ignore: ce
94
+ }, k = {
5
95
  /**
6
96
  * 头像宽度
7
97
  */
@@ -38,83 +128,1419 @@ const Q = {
38
128
  * 支持的头像类型
39
129
  */
40
130
  imageType: { type: Array, default: ["jpeg"] }
41
- };
42
- function R(A, s, a, r) {
43
- const u = "data:image/jpeg;base64,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", l = y(A.readonly);
44
- function o(e) {
45
- return e.match(/\.(jpeg|jpg|gif|png|svg|bmp|webp)$/) != null;
131
+ }, R = $(k, ue, ie, te);
132
+ function L(p, n, e, t) {
133
+ const i = "data:image/jpeg;base64,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", s = F(p.readonly);
134
+ function r(m) {
135
+ return m.match(/\.(jpeg|jpg|gif|png|svg|bmp|webp)$/) != null;
46
136
  }
47
- function d(e) {
48
- return e.indexOf("data:image/") > -1;
137
+ function d(m) {
138
+ return m.indexOf("data:image/") > -1;
49
139
  }
50
- function g(e) {
51
- return "data:image/jpeg;base64," + e;
140
+ function o(m) {
141
+ return "data:image/jpeg;base64," + m;
52
142
  }
53
- const i = n(() => {
54
- var m;
55
- if (!A.imageType || !A.imageType.length)
143
+ const u = I(() => {
144
+ var g;
145
+ if (!p.imageType || !p.imageType.length)
56
146
  return "";
57
- const e = (m = A.imageType) == null ? void 0 : m.map((B) => (B === "jpg" && (B = "jpeg"), `image/${B}`));
58
- return !e || !e.length ? "image/*" : e.join(",");
59
- }), c = n(() => {
60
- const e = r.value || A.cover || u;
61
- return o(e) || d(e) ? e : g(e);
62
- }), f = n(() => l.value ? "" : A.title);
63
- function v() {
64
- l.value || a && a.value && a.value.click();
65
- }
66
- return { acceptTypes: i, imageSource: c, imageTitle: f, onClickImage: v };
147
+ const m = (g = p.imageType) == null ? void 0 : g.map((h) => (h === "jpg" && (h = "jpeg"), `image/${h}`));
148
+ return !m || !m.length ? "image/*" : m.join(",");
149
+ }), c = I(() => {
150
+ const m = t.value || p.cover || i;
151
+ return r(m) || d(m) ? m : o(m);
152
+ }), l = I(() => s.value ? "" : p.title);
153
+ function f() {
154
+ s.value || e && e.value && e.value.click();
155
+ }
156
+ return { acceptTypes: u, imageSource: c, imageTitle: l, onClickImage: f };
67
157
  }
68
- const p = /* @__PURE__ */ H({
158
+ const S = /* @__PURE__ */ U({
69
159
  name: "FAvatar",
70
- props: Q,
160
+ props: k,
71
161
  emits: ["change", "update:modelValue"],
72
- setup(A, s) {
73
- const a = n(() => ({
162
+ setup(p, n) {
163
+ const e = I(() => ({
74
164
  "f-avatar": !0,
75
- "f-avatar-readonly": A.readonly,
76
- "f-avatar-circle": A.shape === "circle",
77
- "f-avatar-square": A.shape === "square"
78
- })), r = y(A.modelValue), u = n(() => ({
79
- width: A.avatarWidth + "px",
80
- height: A.avatarHeight + "px"
81
- })), l = !1;
82
- function o() {
165
+ "f-avatar-readonly": p.readonly,
166
+ "f-avatar-circle": p.shape === "circle",
167
+ "f-avatar-square": p.shape === "square"
168
+ })), t = F(p.modelValue), i = I(() => ({
169
+ width: p.avatarWidth + "px",
170
+ height: p.avatarHeight + "px"
171
+ })), s = !1;
172
+ function r() {
83
173
  return "";
84
174
  }
85
175
  function d() {
86
176
  }
87
- const g = y(null), {
88
- acceptTypes: i,
177
+ const o = F(null), {
178
+ acceptTypes: u,
89
179
  imageSource: c,
90
- onClickImage: f
91
- } = R(A, s, g, r);
92
- return () => t("div", {
93
- class: a.value,
94
- style: u.value,
95
- onClick: f
96
- }, [l, t("img", {
97
- title: A.title,
180
+ onClickImage: l
181
+ } = L(p, n, o, t);
182
+ return () => C("div", {
183
+ class: e.value,
184
+ style: i.value,
185
+ onClick: l
186
+ }, [s, C("img", {
187
+ title: p.title,
98
188
  class: "f-avatar-image",
99
189
  src: c.value,
100
- onError: o
101
- }, null), !A.readonly && t("div", {
190
+ onError: r
191
+ }, null), !p.readonly && C("div", {
102
192
  class: "f-avatar-icon"
103
- }, [t("span", {
193
+ }, [C("span", {
104
194
  class: "f-icon f-icon-camera"
105
- }, null)]), t("input", {
195
+ }, null)]), C("input", {
106
196
  ref: "file",
107
197
  name: "file-input",
108
198
  type: "file",
109
199
  class: "f-avatar-upload",
110
- accept: i.value,
200
+ accept: u.value,
111
201
  onChange: d,
112
202
  style: "display: none;"
113
203
  }, null)]);
114
204
  }
115
- }), N = C(p);
205
+ });
206
+ function pe(p) {
207
+ const { formSchemaUtils: n, formStateMachineUtils: e } = p;
208
+ function t(o, u = "") {
209
+ return {
210
+ path: u + o.code,
211
+ field: o.id,
212
+ fullPath: o.code
213
+ };
214
+ }
215
+ function i(o, u = "") {
216
+ const c = n.getViewModelById(o);
217
+ return c ? c.states.map((l) => t(l, u)) : [];
218
+ }
219
+ function s(o) {
220
+ const u = n.getRootViewModelId(), c = i(o);
221
+ if (o === u)
222
+ return c;
223
+ const l = i(u, "root-component.");
224
+ return [...c, ...l];
225
+ }
226
+ function r(o) {
227
+ return o.binding && o.binding.path || o.id || "";
228
+ }
229
+ function d() {
230
+ return e && e.getRenderStates() || [];
231
+ }
232
+ return { getVariables: s, getControlName: r, getStateMachines: d };
233
+ }
234
+ class q {
235
+ constructor(n) {
236
+ y(this, "sessionVariables", [
237
+ {
238
+ key: "CurrentSysOrgName",
239
+ name: "当前组织Name",
240
+ description: "当前组织Name"
241
+ },
242
+ // {
243
+ // key: "CurrentSysOrgCode",
244
+ // name: "当前组织Code",
245
+ // description: "当前组织Code"
246
+ // },
247
+ {
248
+ key: "CurrentSysOrgId",
249
+ name: "当前组织Id",
250
+ description: "当前组织Id"
251
+ },
252
+ {
253
+ key: "CurrentUserName",
254
+ name: "当前用户Name",
255
+ description: "当前用户Name"
256
+ },
257
+ {
258
+ key: "CurrentUserCode",
259
+ name: "当前用户Code",
260
+ description: "当前用户Code"
261
+ },
262
+ {
263
+ key: "CurrentUserId",
264
+ name: "当前用户Id",
265
+ description: "当前用户Id"
266
+ },
267
+ {
268
+ key: "CurrentLanguage",
269
+ name: "当前语言编号",
270
+ description: "当前登录的语言编号,例如简体中文返回'zh-CHS',英文返回'en',繁体中文'zh-CHT'"
271
+ }
272
+ ]);
273
+ y(this, "expressionNames", {
274
+ compute: "计算表达式",
275
+ dependency: "依赖表达式",
276
+ validate: "验证表达式",
277
+ dataPicking: "帮助前表达式",
278
+ visible: "可见表达式",
279
+ readonly: "只读表达式",
280
+ required: "必填表达式"
281
+ });
282
+ y(this, "getExpressionConverter", (n, e) => ({
283
+ convertFrom: (t, i, s, r) => {
284
+ const d = s.getExpressionRuleValue(n, e || i);
285
+ return d && d.value || "";
286
+ },
287
+ convertTo: (t, i, s, r, d) => {
288
+ var o;
289
+ if (i === "dataPicking" && (s != null && s.target)) {
290
+ const u = `${s.target}_dataPicking`;
291
+ ((o = s.rules) == null ? void 0 : o.some(
292
+ (l) => l.id === u && l.value
293
+ )) ? t.dictPickingExpressionId = u : delete t.dictPickingExpressionId;
294
+ }
295
+ r.updateExpression(s);
296
+ }
297
+ }));
298
+ this.formSchemaService = n;
299
+ }
300
+ getExpressionRule(n, e) {
301
+ const t = this.formSchemaService.getExpressions();
302
+ if (!t)
303
+ return "";
304
+ const i = t.find((r) => r.target === n);
305
+ if (!i)
306
+ return "";
307
+ const s = i.rules.find((r) => r.type === e);
308
+ return s || "";
309
+ }
310
+ // 获取上下文表单变量
311
+ getContextFormVariables() {
312
+ const { module: n } = this.formSchemaService.getFormSchema();
313
+ if (!n.viewmodels || n.viewmodels.length === 0)
314
+ return [];
315
+ const e = this.formSchemaService.getRootViewModelId(), t = this.formSchemaService.getViewModelById(e);
316
+ if (!t || !t.states || t.states.length === 0)
317
+ return [];
318
+ const i = [];
319
+ return t.states.filter((s) => s.category === "remote").forEach((s) => {
320
+ i.push({
321
+ key: s.code,
322
+ name: s.name,
323
+ description: s.name,
324
+ category: s.category
325
+ });
326
+ }), i;
327
+ }
328
+ createTreeNode(n, e, t = "label") {
329
+ return {
330
+ id: n.id,
331
+ name: n.name,
332
+ bindingPath: n[t],
333
+ parents: e,
334
+ type: "field"
335
+ };
336
+ }
337
+ buildEntityFieldsTreeData(n = null, e) {
338
+ const t = [];
339
+ return n == null || n.forEach((i) => {
340
+ var d;
341
+ const s = this.createTreeNode(i, e);
342
+ let r = [];
343
+ (d = i.type) != null && d.fields && (r = this.buildEntityFieldsTreeData(i.type.fields, [...e, i.label])), t.push({
344
+ data: s,
345
+ children: r,
346
+ expanded: !0
347
+ });
348
+ }), t;
349
+ }
350
+ buildChildEntityTreeData(n = null, e) {
351
+ const t = [];
352
+ return n == null || n.forEach((i) => {
353
+ var o, u;
354
+ const s = this.createTreeNode(i, e);
355
+ s.type = "entity";
356
+ const r = this.buildEntityFieldsTreeData((o = i.type) == null ? void 0 : o.fields, [...e, i.label]), d = this.buildChildEntityTreeData((u = i.type) == null ? void 0 : u.entities, [...e, i.label]);
357
+ d != null && d.length && (r == null || r.push(...d)), t.push({
358
+ data: s,
359
+ children: r || [],
360
+ // 空值回退
361
+ expanded: !0
362
+ });
363
+ }), t;
364
+ }
365
+ getEntitiesTreeData() {
366
+ const n = this.formSchemaService.getSchemaEntities();
367
+ if (!(n != null && n.length))
368
+ return [];
369
+ const e = n[0];
370
+ if (!(e != null && e.type))
371
+ return [];
372
+ const t = this.buildEntityFieldsTreeData(e.type.fields, [e.code]), i = this.buildChildEntityTreeData(e.type.entities, [e.code]);
373
+ return i != null && i.length && (t == null || t.push(...i)), {
374
+ entityCode: e.code,
375
+ fields: [{
376
+ data: this.createTreeNode(e, [], "code"),
377
+ children: t || []
378
+ }]
379
+ };
380
+ }
381
+ getEntitiesAndVariables() {
382
+ return {
383
+ entities: this.getEntitiesTreeData(),
384
+ variables: {
385
+ session: {
386
+ name: "系统变量",
387
+ items: this.sessionVariables,
388
+ visible: !1
389
+ },
390
+ forms: {
391
+ name: "表单变量",
392
+ items: this.getContextFormVariables(),
393
+ visible: !0
394
+ }
395
+ }
396
+ };
397
+ }
398
+ onBeforeOpenExpression(n, e, t) {
399
+ const i = t === "Field" ? n.binding.field : n.id, s = this.getExpressionRule(i, e), r = this.getEntitiesAndVariables(), d = {
400
+ message: ["validate", "required", "dataPicking"].includes(e) && s ? s.message : "",
401
+ ...r
402
+ };
403
+ return s.messageType != null && (d.messageType = s.messageType), d;
404
+ }
405
+ buildRule(n, e, t, i) {
406
+ const { expression: s, message: r, messageType: d } = e, o = {
407
+ id: `${n}_${t}`,
408
+ type: t,
409
+ value: s
410
+ };
411
+ return (t === "validate" || t === "dataPicking" || t === "required") && (o.message = r), t === "dataPicking" && (o.messageType = d), t === "validate" && i && (o.elementId = i), o;
412
+ }
413
+ getExpressionData() {
414
+ const { expressions: n } = this.formSchemaService.getFormSchema().module;
415
+ return n || [];
416
+ }
417
+ updateExpression(n, e, t, i) {
418
+ const s = e === "Field" ? n.binding.field : n.id, r = this.buildRule(s, t, i, n.type === "form-group" ? n.id : "");
419
+ let o = this.getExpressionData().find((c) => c.targetType === e && c.target === s);
420
+ const u = (c) => c.value.trim() === "";
421
+ if (o) {
422
+ const c = o.rules.find((l) => l.id === r.id);
423
+ if (c)
424
+ u(r) ? o.rules = o.rules.filter((l) => l.id !== r.id) : (Object.assign(c, r), i === "validate" && n.type === "form-group" && (c.elementId = n.id));
425
+ else {
426
+ if (u(r))
427
+ return null;
428
+ o.rules = o.rules || [], o.rules.push(r);
429
+ }
430
+ } else {
431
+ if (u(r))
432
+ return null;
433
+ o = {
434
+ target: `${s}`,
435
+ rules: [r],
436
+ targetType: e
437
+ };
438
+ }
439
+ return o;
440
+ }
441
+ getExpressionEditorOptions(n, e, t, i) {
442
+ return t.reduce((s, r) => {
443
+ var o, u;
444
+ const d = e === "Field" ? (o = n == null ? void 0 : n.binding) == null ? void 0 : o.field : n.id;
445
+ return s[r] = {
446
+ hide: e === "Field" ? !!((u = n == null ? void 0 : n.binding) != null && u.field) : !1,
447
+ description: "",
448
+ title: this.expressionNames[r],
449
+ type: "string",
450
+ $converter: this.getExpressionConverter(d),
451
+ refreshPanelAfterChanged: !0,
452
+ editor: {
453
+ type: "expression-editor",
454
+ singleExpand: !1,
455
+ dialogTitle: `${this.expressionNames[r]}编辑器`,
456
+ showMessage: r === "validate" || r === "dataPicking" || r === "required",
457
+ showMessageType: r === "dataPicking",
458
+ beforeOpen: () => this.onBeforeOpenExpression(n, r, e),
459
+ onSubmitModal: (c) => {
460
+ const l = this.updateExpression(n, e, c, r);
461
+ if (i) {
462
+ const f = this.buildRule(d, c, r);
463
+ i(f);
464
+ }
465
+ return l;
466
+ }
467
+ }
468
+ }, s;
469
+ }, {});
470
+ }
471
+ getExpressionInfo(n, e, t) {
472
+ const i = e === "Field" ? n.binding.field : n.id, s = this.getExpressionRule(i, t), r = {
473
+ value: s && s.value,
474
+ targetId: i,
475
+ targetType: e,
476
+ expressionType: t
477
+ };
478
+ return s && s.message && (r.message = s.message), r;
479
+ }
480
+ getExpressionConfig(n, e, t = ["compute", "dependency", "validate"], i) {
481
+ return {
482
+ description: "表达式",
483
+ title: "表达式",
484
+ hide: !n.binding,
485
+ properties: {
486
+ ...this.getExpressionEditorOptions(n, e, t, i)
487
+ }
488
+ };
489
+ }
490
+ getExpressionOptions(n, e, t) {
491
+ const i = this.getExpressionInfo(n, e, t);
492
+ return {
493
+ dialogTitle: `${this.expressionNames[t]}编辑器`,
494
+ singleExpand: !1,
495
+ showMessage: t === "required",
496
+ beforeOpen: () => this.onBeforeOpenExpression(n, t, e),
497
+ expressionInfo: i
498
+ };
499
+ }
500
+ }
501
+ class ge {
502
+ constructor(n, e) {
503
+ y(this, "componentId");
504
+ y(this, "viewModelId");
505
+ y(this, "eventsEditorUtils");
506
+ y(this, "formSchemaUtils");
507
+ y(this, "formMetadataConverter");
508
+ y(this, "designViewModelUtils");
509
+ y(this, "designViewModelField");
510
+ y(this, "controlCreatorUtils");
511
+ y(this, "designerHostService");
512
+ y(this, "designerContext");
513
+ y(this, "schemaService", null);
514
+ y(this, "metadataService", null);
515
+ y(this, "propertyConfig", {
516
+ type: "object",
517
+ categories: {}
518
+ });
519
+ var t;
520
+ this.componentId = n, this.designerHostService = e, this.eventsEditorUtils = e.eventsEditorUtils, this.formSchemaUtils = e.formSchemaUtils, this.formMetadataConverter = e.formMetadataConverter, this.viewModelId = ((t = this.formSchemaUtils) == null ? void 0 : t.getViewModelIdByComponentId(n)) || "", this.designViewModelUtils = e.designViewModelUtils, this.controlCreatorUtils = e.controlCreatorUtils, this.metadataService = e.metadataService, this.schemaService = e.schemaService, this.designerContext = e.designerContext;
521
+ }
522
+ getFormDesignerInstance() {
523
+ var n, e;
524
+ return (e = (n = this.designerContext) == null ? void 0 : n.instances) == null ? void 0 : e.formDesigner.value;
525
+ }
526
+ getTableInfo() {
527
+ var n;
528
+ return (n = this.schemaService) == null ? void 0 : n.getTableInfoByViewModelId(this.viewModelId);
529
+ }
530
+ setDesignViewModelField(n) {
531
+ var t;
532
+ const e = n.binding && n.binding.type === "Form" && n.binding.field;
533
+ if (e) {
534
+ if (!this.designViewModelField) {
535
+ const i = this.designViewModelUtils.getDgViewModel(this.viewModelId);
536
+ this.designViewModelField = i.fields.find((s) => s.id === e);
537
+ }
538
+ n.updateOn = (t = this.designViewModelField) == null ? void 0 : t.updateOn;
539
+ }
540
+ }
541
+ getBasicPropConfig(n) {
542
+ return {
543
+ description: "Basic Information",
544
+ title: "基本信息",
545
+ properties: {
546
+ id: {
547
+ description: "组件标识",
548
+ title: "标识",
549
+ type: "string",
550
+ readonly: !0
551
+ },
552
+ type: {
553
+ description: "组件类型",
554
+ title: "控件类型",
555
+ type: "select",
556
+ editor: {
557
+ type: "combo-list",
558
+ textField: "name",
559
+ valueField: "value",
560
+ idField: "value",
561
+ editable: !1,
562
+ data: [{ value: n.type, name: a[n.type] && a[n.type].name }]
563
+ }
564
+ }
565
+ }
566
+ };
567
+ }
568
+ getAppearanceConfig(n = null, e = {}, t) {
569
+ const i = {
570
+ title: "外观",
571
+ description: "Appearance"
572
+ }, s = {
573
+ class: {
574
+ title: "class样式",
575
+ type: "string",
576
+ description: "组件的CSS样式",
577
+ $converter: "/converter/appearance.converter",
578
+ parentPropertyID: "appearance"
579
+ },
580
+ style: {
581
+ title: "style样式",
582
+ type: "string",
583
+ description: "组件的样式",
584
+ $converter: "/converter/appearance.converter",
585
+ parentPropertyID: "appearance"
586
+ }
587
+ };
588
+ for (const r in e)
589
+ s[r] = Object.assign(s[r] || {}, e[r]);
590
+ return {
591
+ ...i,
592
+ properties: { ...s },
593
+ setPropertyRelates(r, d) {
594
+ if (r) {
595
+ switch (r && r.propertyID) {
596
+ case "class":
597
+ case "style": {
598
+ x.value++;
599
+ break;
600
+ }
601
+ }
602
+ t && t(r, n, d);
603
+ }
604
+ }
605
+ };
606
+ }
607
+ /**
608
+ *
609
+ * @param propertyData
610
+ * @param propertyTypes
611
+ * @param propertyName
612
+ * @param constInfos
613
+ * @param variableInfos
614
+ * @param expressionType 指定表达式类型,存在属性和表达式类型不一致的情况
615
+ * @returns
616
+ */
617
+ getPropertyEditorParams(n, e = [], t = "visible", i = {}, s = {}, r = "") {
618
+ const { getVariables: d, getControlName: o, getStateMachines: u } = pe(this.designerHostService), c = this.getRealTargetType(n), l = e && e.length > 0 ? e : ["Const", "Variable", "StateMachine", "Expression"], f = {
619
+ type: "property-editor",
620
+ propertyTypes: l
621
+ };
622
+ return l.map((m) => {
623
+ switch (m) {
624
+ case "Const":
625
+ Object.assign(f, {
626
+ constType: "enum",
627
+ constEnums: [{ id: !0, name: "是" }, { id: !1, name: "否" }]
628
+ }, i);
629
+ break;
630
+ case "Expression":
631
+ f.expressionConfig = this.getExpressionOptions(n, c, r || t);
632
+ break;
633
+ case "StateMachine":
634
+ f.stateMachines = u();
635
+ break;
636
+ case "Variable":
637
+ Object.assign(f, {
638
+ controlName: o(n),
639
+ newVariablePrefix: "is",
640
+ newVariableType: "Boolean",
641
+ variables: d(this.viewModelId),
642
+ parentComponentId: this.componentId === "root-component" ? "" : "root-component",
643
+ onBeforeOpenVariables: (g) => {
644
+ g.value = d(this.viewModelId);
645
+ }
646
+ }, s), this.designerContext.designerMode === "PC_RTC" && (f.newVariablePrefix = "ext_" + f.newVariablePrefix);
647
+ break;
648
+ }
649
+ }), f;
650
+ }
651
+ getVisibleProperty(n, e = "") {
652
+ var s;
653
+ let t = ["Const", "Variable", "StateMachine", "Expression"];
654
+ return e === "gridFieldEditor" ? t = ["Const", "Expression"] : e === "form-group" && !((s = n.binding) != null && s.field) && (t = ["Const", "Variable", "StateMachine"]), {
655
+ visible: {
656
+ title: "是否可见",
657
+ type: "boolean",
658
+ description: "运行时组件是否可见",
659
+ editor: this.getPropertyEditorParams(n, t, "visible")
660
+ }
661
+ };
662
+ }
663
+ /**
664
+ * 获取行为
665
+ * @param propertyData
666
+ * @param viewModelId
667
+ * @returns
668
+ */
669
+ getBehaviorConfig(n, e = "", t = {}, i) {
670
+ const s = {
671
+ title: "行为",
672
+ description: ""
673
+ }, r = this.getVisibleProperty(n, e);
674
+ for (const o in t)
675
+ r[o] = Object.assign(r[o] || {}, t[o]);
676
+ const d = this;
677
+ return {
678
+ ...s,
679
+ properties: { ...r },
680
+ setPropertyRelates(o, u) {
681
+ if (o) {
682
+ switch (o.propertyID) {
683
+ case "disabled":
684
+ case "readonly":
685
+ case "visible":
686
+ d.afterMutilEditorChanged(n, o);
687
+ break;
688
+ }
689
+ i && i(o, u);
690
+ }
691
+ }
692
+ };
693
+ }
694
+ /**
695
+ * 当多值编辑器变更时
696
+ * @param propertyData
697
+ * @param changeObject
698
+ */
699
+ afterMutilEditorChanged(n, e) {
700
+ this.addNewVariableToViewModel(e, this.viewModelId), this.updateExpressionValue(e), this.clearExpression(e, n);
701
+ }
702
+ /**
703
+ *
704
+ * @param propertyId
705
+ * @param componentInstance
706
+ * @returns
707
+ */
708
+ updateElementByParentContainer(n, e) {
709
+ const t = e && e.parent && e.parent.schema;
710
+ if (!t)
711
+ return;
712
+ const i = t.contents.findIndex((r) => r.id === n), s = Y(t.contents[i]);
713
+ t.contents.splice(i, 1), t.contents.splice(i, 0, s), J();
714
+ }
715
+ /**
716
+ * 属性编辑器,在编辑过程中会新增变量,此处需要将新增的变量追加到ViewModel中
717
+ * @param changeObject
718
+ * @param viewModelId
719
+ * @returns
720
+ */
721
+ addNewVariableToViewModel(n, e) {
722
+ const t = n.propertyValue;
723
+ if (!(t && typeof t == "object") || !(t.type === "Variable" && t.isNewVariable))
724
+ return;
725
+ const r = {
726
+ id: t.field,
727
+ category: "locale",
728
+ code: t.fullPath,
729
+ name: t.fullPath,
730
+ type: t.newVariableType || "String",
731
+ isRtcVariable: this.designerContext.designerMode === "PC_RTC" ? !0 : void 0
732
+ };
733
+ delete t.newVariableType, delete t.isNewVariable, this.formSchemaUtils.getVariableByCode(r.code) || this.formSchemaUtils.getViewModelById("root-viewmodel").states.push(r);
734
+ }
735
+ /**
736
+ * 更新表达式到expressions节点
737
+ * @param changeObject
738
+ */
739
+ updateExpressionValue(n) {
740
+ const e = n.propertyValue;
741
+ if (!((e && e.type) === "Expression" && e.expressionInfo))
742
+ return;
743
+ const { expressionId: s, expressionInfo: r } = e, { targetId: d, targetType: o, expressionType: u, value: c, message: l } = r, f = this.formSchemaUtils.getModule();
744
+ f.expressions = f.expressions || [];
745
+ const { expressions: m } = f;
746
+ let g = m.find((A) => A.target === d);
747
+ g || (g = { target: d, rules: [], targetType: o }, m.push(g));
748
+ const h = g.rules.find((A) => A.type === u);
749
+ if (h)
750
+ h.value = c, h.message = l;
751
+ else {
752
+ const A = { id: s, type: u, value: c, message: l };
753
+ g.rules.push(A);
754
+ }
755
+ delete e.expressionInfo;
756
+ }
757
+ /**
758
+ * 属性类型切换为非表达式后,清除原表达式
759
+ * @param changeObject
760
+ * @param propertyData
761
+ * @returns
762
+ */
763
+ clearExpression(n, e) {
764
+ const t = n.propertyValue;
765
+ if (t && t.type === "Expression")
766
+ return;
767
+ const s = n.propertyID, r = this.formSchemaUtils.getExpressions(), d = e.binding ? e.binding.field : e.id, o = r.find((u) => u.target === d);
768
+ !o || !o.rules || (o.rules = o.rules.filter((u) => u.type !== s));
769
+ }
770
+ getExpressionOptions(n, e, t) {
771
+ return new q(this.formSchemaUtils).getExpressionOptions(n, e, t);
772
+ }
773
+ getRealTargetType(n) {
774
+ return ["response-toolbar-item", "tab-toolbar-item", "section-toolbar-item", "drawer-toolbar-item"].indexOf(n.type) > -1 ? "Button" : n.binding && n.binding.field ? "Field" : "Container";
775
+ }
776
+ createBaseEventProperty(n) {
777
+ const e = {};
778
+ return e[this.viewModelId] = {
779
+ type: "events-editor",
780
+ editor: {
781
+ initialData: n,
782
+ viewSourceHandle: (t) => {
783
+ var i;
784
+ ((i = t.controller) == null ? void 0 : i.label.indexOf(this.formSchemaUtils.getModule().code)) > -1 && this.eventsEditorUtils.jumpToMethod(t);
785
+ }
786
+ }
787
+ }, e;
788
+ }
789
+ }
790
+ const E = class E {
791
+ /**
792
+ * 根据绑定字段类型获取可用的输入类控件
793
+ */
794
+ static getEditorTypesByMDataType(n, e = !1, t = "") {
795
+ if (e)
796
+ return [{ key: a["language-textbox"].type, value: a["language-textbox"].name }];
797
+ let i = E.fieldControlTypeMapping[n];
798
+ if (t === "data-grid-column" && (i != null && i.length)) {
799
+ const s = [a["check-group"].type, a["radio-group"].type, a.image.type, a["rich-text-editor"].type];
800
+ i = i.filter((r) => !s.includes(r.key));
801
+ }
802
+ return i;
803
+ }
804
+ /**
805
+ * 获取所有输入类控件
806
+ */
807
+ static getAllInputTypes() {
808
+ const n = [];
809
+ for (const e in E.fieldControlTypeMapping)
810
+ E.fieldControlTypeMapping[e].forEach((t) => {
811
+ n.find((i) => i.key === t.key && i.value === t.value) || n.push({ key: t.key, value: t.value });
812
+ });
813
+ return n;
814
+ }
815
+ /**
816
+ * 提供schema字段基础属性和DOM控件属性的映射
817
+ * @param control 控件元数据
818
+ */
819
+ static mappingDomPropAndSchemaProp(n, e) {
820
+ var s;
821
+ const t = (s = n.editor) == null ? void 0 : s.type, i = [];
822
+ return (n.type === a["data-grid-column"].type || n.type === a["tree-grid-column"].type) && e && e.categoryId && e.categoryId.indexOf("gridFieldEditor") < 0 && i.push({ domField: "title", schemaField: "name" }), i.push({ domField: "label", schemaField: "name" }), i.push({ domField: "editor.required", schemaField: "require" }), i.push({ domField: "editor.readonly", schemaField: "readonly" }), (t === a["input-group"].type || t === a.textarea.type || t === a["number-spinner"].type) && i.push({ domField: "editor.maxLength", schemaField: "type.length" }), t === a["number-spinner"].type && i.push({ domField: "editor.precision", schemaField: "type.precision" }), (n.type === a["data-grid-column"].type || n.type === a["tree-grid-column"].type) && i.push({ domField: "formatter.precision", schemaField: "type.precision" }), (t === a["combo-list"].type || t === a["radio-group"].type) && i.push({ domField: "editor.data", schemaField: "type.enumValues" }), (n.type === a["data-grid-column"].type || n.type === a["tree-grid-column"].type) && i.push({ domField: "formatter.data", schemaField: "type.enumValues" }), t === a["date-picker"].type && (i.push({ domField: "editor.displayFormat", schemaField: "editor.format" }), i.push({ domField: "editor.fieldType", schemaField: "type.name" })), t === a["number-spinner"].type && (i.push({ domField: "editor.max", schemaField: "editor.maxValue" }), i.push({ domField: "editor.min", schemaField: "editor.minValue" })), t === a.lookup.type && (i.push({ domField: "editor.dataSource", schemaField: "editor.dataSource" }), i.push({ domField: "editor.valueField", schemaField: "editor.valueField" }), i.push({ domField: "editor.textField", schemaField: "editor.textField" }), i.push({ domField: "editor.displayType", schemaField: "editor.displayType" }), i.push({ domField: "editor.mapFields", schemaField: "editor.mapFields" }), i.push({ domField: "editor.helpId", schemaField: "editor.helpId" })), i.push({ domField: "path", schemaField: "bindingPath" }), i.push({ domField: "binding.path", schemaField: "bindingField" }), i.push({ domField: "binding.fullPath", schemaField: "path" }), (n.type === a["data-grid-column"].type || n.type === a["tree-grid-column"].type) && i.push({ domField: "field", schemaField: "bindingPath" }), i;
823
+ }
824
+ };
825
+ /**
826
+ * <字段类型,可配置的控件类型列表>的映射
827
+ */
828
+ y(E, "fieldControlTypeMapping", {
829
+ String: [
830
+ { key: a["input-group"].type, value: a["input-group"].name },
831
+ { key: a.lookup.type, value: a.lookup.name },
832
+ { key: a.image.type, value: a.image.name },
833
+ { key: a["date-picker"].type, value: a["date-picker"].name },
834
+ { key: a.switch.type, value: a.switch.name },
835
+ { key: a["check-box"].type, value: a["check-box"].name },
836
+ { key: a["check-group"].type, value: a["check-group"].name },
837
+ { key: a["radio-group"].type, value: a["radio-group"].name },
838
+ { key: a["combo-list"].type, value: a["combo-list"].name },
839
+ { key: a.textarea.type, value: a.textarea.name },
840
+ { key: a["time-picker"].type, value: a["time-picker"].name }
841
+ ],
842
+ Text: [
843
+ { key: a.textarea.type, value: a.textarea.name },
844
+ { key: a.lookup.type, value: a.lookup.name },
845
+ { key: a.image.type, value: a.image.name },
846
+ { key: a["rich-text-editor"].type, value: a["rich-text-editor"].name }
847
+ ],
848
+ Decimal: [
849
+ { key: a["number-spinner"].type, value: a["number-spinner"].name }
850
+ ],
851
+ Integer: [
852
+ { key: a["number-spinner"].type, value: a["number-spinner"].name }
853
+ ],
854
+ Number: [
855
+ { key: a["number-spinner"].type, value: a["number-spinner"].name },
856
+ { key: a.switch.type, value: a.switch.name },
857
+ { key: a["check-box"].type, value: a["check-box"].name }
858
+ ],
859
+ BigNumber: [
860
+ { key: a["number-spinner"].type, value: a["number-spinner"].name }
861
+ ],
862
+ Date: [
863
+ { key: a["date-picker"].type, value: a["date-picker"].name }
864
+ ],
865
+ DateTime: [
866
+ { key: a["date-picker"].type, value: a["date-picker"].name }
867
+ ],
868
+ Boolean: [
869
+ { key: a.switch.type, value: a.switch.name },
870
+ { key: a["check-box"].type, value: a["check-box"].name }
871
+ ],
872
+ Enum: [
873
+ { key: a["combo-list"].type, value: a["combo-list"].name },
874
+ { key: a["radio-group"].type, value: a["radio-group"].name }
875
+ ],
876
+ Object: [
877
+ { key: a.lookup.type, value: a.lookup.name },
878
+ { key: a["combo-list"].type, value: a["combo-list"].name },
879
+ { key: a["radio-group"].type, value: a["radio-group"].name }
880
+ ]
881
+ });
882
+ let P = E;
883
+ var M = /* @__PURE__ */ ((p) => (p.Form = "Form", p.Variable = "Variable", p))(M || {});
884
+ class me {
885
+ constructor() {
886
+ /** 控件标题 */
887
+ y(this, "label", "");
888
+ /** 控件id */
889
+ y(this, "id", "");
890
+ /** 每个控件占用的栅格数 */
891
+ y(this, "columnInSM", 12);
892
+ y(this, "columnInMD", 6);
893
+ y(this, "columnInLG", 3);
894
+ y(this, "columnInEL", 2);
895
+ /** 每个控件占用的列数 */
896
+ y(this, "displayWidthInSM", 1);
897
+ y(this, "displayWidthInMD", 1);
898
+ y(this, "displayWidthInLG", 1);
899
+ y(this, "displayWidthInEL", 1);
900
+ /** 编辑器内部默认显示的屏幕大小-----可以去掉 */
901
+ y(this, "displayColumnCountAtBreakPoint", "md");
902
+ /** 控件所在行,传0即可-----编辑器内部使用 */
903
+ y(this, "tagRow", 0);
904
+ /** 控件是否显示上方空白:传0即可-----编辑器内部使用 */
905
+ y(this, "showTopBorder", 0);
906
+ /** 区域,从1开始。卡片内的控件从上往下,从左往右划分区域,遇到分组fieldSet时group+1,分组结束后group+1 */
907
+ y(this, "group", 1);
908
+ /** 控件是否符合标准的class配置(设计器用的) */
909
+ y(this, "isSupportedClass", !0);
910
+ /** 控件所在分组id(设计器用的) */
911
+ y(this, "fieldSetId", "");
912
+ }
913
+ }
914
+ function fe(p) {
915
+ let n, e;
916
+ const t = /* @__PURE__ */ new Map();
917
+ let i = [];
918
+ function s(c, l) {
919
+ const m = c.split(" ").filter((b) => b.startsWith("col-"));
920
+ if (m.length === 0) {
921
+ l.isSupportedClass = !1;
922
+ return;
923
+ }
924
+ let g = m.find((b) => /^col-([1-9]|10|11|12)$/.test(b)), h = m.find((b) => /^col-md-([1-9]|10|11|12)$/.test(b)), A = m.find((b) => /^col-xl-([1-9]|10|11|12)$/.test(b)), v = m.find((b) => /^col-el-([1-9]|10|11|12)$/.test(b));
925
+ g = g || "col-12", l.columnInSM = parseInt(g.replace("col-", ""), 10), l.displayWidthInSM = l.columnInSM / 12, l.displayWidthInSM !== 1 && (l.isSupportedClass = !1), h = h || "col-md-" + l.columnInSM, l.columnInMD = parseInt(h.replace("col-md-", ""), 10), l.displayWidthInMD = l.columnInMD / 6, [1, 2].includes(l.displayWidthInMD) || (l.isSupportedClass = !1), A = A || "col-xl-" + l.columnInMD, l.columnInLG = parseInt(A.replace("col-xl-", ""), 10), l.displayWidthInLG = l.columnInLG / 3, [1, 2, 3, 4].includes(l.displayWidthInLG) || (l.isSupportedClass = !1), v = v || "col-el-" + l.columnInLG, l.columnInEL = parseInt(v.replace("col-el-", ""), 10), l.displayWidthInEL = l.columnInEL / 2, [1, 2, 3, 4, 5, 6].includes(l.displayWidthInEL) || (l.isSupportedClass = !1);
926
+ }
927
+ function r(c, l, f, m = !1) {
928
+ let g = !1;
929
+ c.contents.forEach((h) => {
930
+ if (h.type === "fieldset") {
931
+ f += 1, r(h, l, f, !0), g = !0;
932
+ return;
933
+ }
934
+ g && (f += 1, g = !1);
935
+ const A = h.appearance && h.appearance.class, v = new me();
936
+ A ? s(A, v) : v.isSupportedClass = !1, v.label = h.label || h.id, v.id = h.id, v.group = f, m && (v.fieldSetId = c.id), e === h.id && (n = f), t.set(h.id, h), l.push(v);
937
+ });
938
+ }
939
+ function d(c) {
940
+ const l = p.getComponentById(c);
941
+ if (!l || !l.componentType || !l.componentType.startsWith("form"))
942
+ return { result: !1, message: "只可以在响应式表单组件中调整响应式布局配置" };
943
+ const f = p.selectNode(l, (m) => m.type === a["response-form"].type);
944
+ return !f || !f.contents || f.contents.length === 0 ? { result: !1, message: "Form区域内没有控件,请先添加控件" } : { result: !0, message: "", formNode: f };
945
+ }
946
+ function o(c, l) {
947
+ l = l || c.id;
948
+ const { result: f, message: m, formNode: g } = d(l);
949
+ if (!f)
950
+ return { result: f, message: m };
951
+ e = c.id, i = [], t.clear();
952
+ const h = g.contents[0].type === a.fieldset.type ? 0 : 1;
953
+ r(g, i, h);
954
+ const A = i.find((b) => !b.isSupportedClass);
955
+ return {
956
+ defaultState: {
957
+ defaultGroupNumber: n || 1,
958
+ model: A ? "customize" : "standard"
959
+ },
960
+ importData: i
961
+ };
962
+ }
963
+ function u(c, l) {
964
+ l = l;
965
+ const { result: f, formNode: m } = d(l);
966
+ if (!f)
967
+ return "";
968
+ const g = [];
969
+ return c.forEach((h) => {
970
+ var b;
971
+ const A = t.get(h.id), v = A.appearance && A.appearance.class;
972
+ if (v) {
973
+ const V = v.split(" ").filter((O) => !O.startsWith("col-")), w = "col-" + h.columnInSM, H = "col-md-" + h.columnInMD, W = "col-xl-" + h.columnInLG, Q = "col-el-" + h.columnInEL, G = [w, H, W, Q].concat(V);
974
+ A.appearance.class = G.join(" ");
975
+ }
976
+ if (h.fieldSetId) {
977
+ const T = m.contents.find((w) => w.id === h.fieldSetId), V = g.find((w) => w.id === h.fieldSetId);
978
+ V ? (b = V.contents) == null || b.push(A) : (g.push(T), T.contents = [A]);
979
+ } else
980
+ g.push(A);
981
+ }), m.contents = g, m.id;
982
+ }
983
+ return {
984
+ checkCanFindFormNode: d,
985
+ checkCanOpenLayoutEditor: o,
986
+ changeFormControlsByResponseLayoutConfig: u,
987
+ getResonseFormLayoutConfig: r
988
+ };
989
+ }
990
+ class he extends ge {
991
+ constructor(e, t) {
992
+ super(e, t);
993
+ y(this, "responseLayoutEditorFunction");
994
+ /** 控件绑定的变量 */
995
+ y(this, "bindingVarible");
996
+ y(this, "numberEditorOptions", {
997
+ type: "number-spinner",
998
+ useThousands: !1,
999
+ keyboard: !1,
1000
+ showButton: !1
1001
+ });
1002
+ this.responseLayoutEditorFunction = fe(this.formSchemaUtils);
1003
+ }
1004
+ getCommonPropertyConfig(e, t, i = "Card") {
1005
+ this.propertyConfig.categories.basic = this.getBasicProperties(e, t, i), this.propertyConfig.categories.appearance = this.getAppearanceProperties(e, t), this.propertyConfig.categories.behavior = this.getBehaviorConfig(e, "form-group");
1006
+ }
1007
+ getPropertyConfig(e, t) {
1008
+ return this.getCommonPropertyConfig(e, t, "Card"), this.propertyConfig.categories.editor = this.getEditorProperties(e), this.propertyConfig.categories.expressions = this.getExpressionConfig(e, "Field"), this.propertyConfig.categories.eventsEditor = this.getEventPropertyConfig(e), this.propertyConfig;
1009
+ }
1010
+ getGridFieldEdtiorPropConfig(e, t) {
1011
+ return this.propertyConfig.categories = {}, this.getCommonPropertyConfig(e, t, "Grid"), this.getGridFieldEdtiorProperties ? this.propertyConfig.categories.editor = this.getGridFieldEdtiorProperties(e) : this.propertyConfig.categories.editor = this.getEditorProperties(e), this.propertyConfig.categories.expressons = this.getExpressionConfig(e, "Field"), this.propertyConfig.categories;
1012
+ }
1013
+ getBasicProperties(e, t, i = "Card") {
1014
+ var u;
1015
+ const s = this;
1016
+ this.setDesignViewModelField(e);
1017
+ const { canChangeControlType: r, editorTypeList: d } = this.getAvailableEditorType(e), o = {
1018
+ description: "Basic Information",
1019
+ title: "基本信息",
1020
+ properties: {
1021
+ id: {
1022
+ description: "组件标识",
1023
+ title: "标识",
1024
+ type: "string",
1025
+ readonly: !0
1026
+ },
1027
+ type: {
1028
+ description: "编辑器类型",
1029
+ title: "编辑器类型",
1030
+ type: "string",
1031
+ $converter: "/converter/change-editor.converter",
1032
+ parentPropertyID: "editor",
1033
+ editor: {
1034
+ type: "combo-list",
1035
+ textField: "value",
1036
+ valueField: "key",
1037
+ idField: "key",
1038
+ editable: !1,
1039
+ data: d,
1040
+ readonly: !r
1041
+ }
1042
+ },
1043
+ label: {
1044
+ title: "标签",
1045
+ type: "string",
1046
+ $converter: "/converter/form-group-label.converter"
1047
+ },
1048
+ showLabelType: {
1049
+ description: "标签显示方式:1、显示:显示标签 2、占位:保留标签空间,但不显示文本 3、不显示:不显示标签",
1050
+ title: "标签显示",
1051
+ type: "enum",
1052
+ editor: {
1053
+ data: [{ id: "visible", name: "显示" }, { id: "reserve-space", name: "占位" }, { id: "none", name: "不显示" }]
1054
+ },
1055
+ defaultValue: ((u = e.editor) == null ? void 0 : u.type) === "image" ? "none" : "visible"
1056
+ },
1057
+ binding: {
1058
+ description: "绑定的表单字段",
1059
+ title: "绑定",
1060
+ editor: {
1061
+ type: "binding-selector",
1062
+ bindingType: { enable: !1 },
1063
+ editorParams: {
1064
+ componentSchema: e,
1065
+ needSyncToViewModel: !0,
1066
+ viewModelId: this.viewModelId,
1067
+ designerHostService: this.designerHostService,
1068
+ disableOccupiedFields: !0
1069
+ },
1070
+ textField: "bindingField"
1071
+ },
1072
+ refreshPanelAfterChanged: !0,
1073
+ readonly: this.formSchemaUtils.designerMode === "PC_RTC" && !e.isRtcControl
1074
+ }
1075
+ },
1076
+ setPropertyRelates(c, l, f) {
1077
+ if (c)
1078
+ switch (c && c.propertyID) {
1079
+ case "type": {
1080
+ s.changeControlType(e, c, t);
1081
+ break;
1082
+ }
1083
+ case "label": {
1084
+ c.needRefreshControlTree = !0;
1085
+ break;
1086
+ }
1087
+ case "binding": {
1088
+ s.changeBindingField(e, c, f);
1089
+ break;
1090
+ }
1091
+ }
1092
+ }
1093
+ };
1094
+ return i.toLocaleLowerCase() !== "card" && delete o.properties.showLabelType, o;
1095
+ }
1096
+ /**
1097
+ * 校验控件是否支持切换类型
1098
+ * @param control 控件
1099
+ */
1100
+ checkCanChangeControlType(e, t) {
1101
+ if (!e.binding)
1102
+ return !1;
1103
+ if (e.binding.type === "Variable") {
1104
+ if (this.bindingVarible = this.formSchemaUtils.getVariableById(e.binding.field), !this.bindingVarible)
1105
+ return !1;
1106
+ } else if (!this.designViewModelField || this.designViewModelField.$type !== N.SimpleField)
1107
+ return !1;
1108
+ return !0;
1109
+ }
1110
+ /**
1111
+ * 获取可选的编辑器类型
1112
+ */
1113
+ getAvailableEditorType(e) {
1114
+ var s;
1115
+ const t = this.checkCanChangeControlType(e, this.viewModelId);
1116
+ if (!t)
1117
+ return {
1118
+ canChangeControlType: !1,
1119
+ editorTypeList: [{
1120
+ key: e.editor.type,
1121
+ value: ((s = a[e.editor.type]) == null ? void 0 : s.name) || e.editor.type
1122
+ }]
1123
+ };
1124
+ let i = [];
1125
+ return this.designViewModelField && this.designViewModelField.$type === N.SimpleField ? i = P.getEditorTypesByMDataType(this.designViewModelField.type.name, this.designViewModelField.multiLanguage) : this.bindingVarible && (i = P.getEditorTypesByMDataType(this.bindingVarible.type, this.designViewModelField.multiLanguage)), { canChangeControlType: t, editorTypeList: i };
1126
+ }
1127
+ changeBindingField(e, t, i) {
1128
+ t.needRefreshEntityTree = !0;
1129
+ }
1130
+ getAppearanceProperties(e, t) {
1131
+ const i = this;
1132
+ return {
1133
+ title: "外观",
1134
+ description: "Appearance",
1135
+ properties: {
1136
+ class: {
1137
+ title: "class样式",
1138
+ type: "string",
1139
+ description: "组件的CSS样式",
1140
+ $converter: "/converter/appearance.converter",
1141
+ parentPropertyID: "appearance"
1142
+ },
1143
+ style: {
1144
+ title: "style样式",
1145
+ type: "string",
1146
+ description: "组件的内联样式",
1147
+ $converter: "/converter/appearance.converter",
1148
+ parentPropertyID: "appearance"
1149
+ },
1150
+ fill: {
1151
+ title: "填充宽度",
1152
+ description: "启用后,控件占满父容器宽度",
1153
+ type: "boolean",
1154
+ parentPropertyID: "appearance"
1155
+ },
1156
+ responseLayout: {
1157
+ description: "响应式列宽",
1158
+ title: "响应式列宽",
1159
+ type: "boolean",
1160
+ visible: !0,
1161
+ // 这个属性,标记当属性变更得时候触发重新更新属性
1162
+ refreshPanelAfterChanged: !0,
1163
+ editor: {
1164
+ type: "response-layout-editor-setting",
1165
+ beforeOpen: () => i.responseLayoutEditorFunction.checkCanOpenLayoutEditor(e, i.componentId)
1166
+ }
1167
+ }
1168
+ },
1169
+ setPropertyRelates(s, r) {
1170
+ if (s)
1171
+ switch (s && s.propertyID) {
1172
+ case "responseLayout":
1173
+ i.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(s.propertyValue, i.componentId || e.id), i.updateUnifiedLayoutAfterResponseLayoutChanged(i.componentId), i.updateElementByParentContainer(e.id, t), delete e.responseLayout;
1174
+ break;
1175
+ case "class":
1176
+ i.updateUnifiedLayoutAfterControlChanged(s.propertyValue, e.id, this.componentId), x.value++;
1177
+ break;
1178
+ case "style": {
1179
+ x.value++;
1180
+ break;
1181
+ }
1182
+ }
1183
+ }
1184
+ };
1185
+ }
1186
+ getEditorProperties(e) {
1187
+ return this.getComponentConfig(e);
1188
+ }
1189
+ /**
1190
+ * 卡片控件:切换控件类型后事件
1191
+ * @param propertyData 控件DOM属性
1192
+ * @param newControlType 新控件类型
1193
+ */
1194
+ changeControlType(e, t, i) {
1195
+ const s = t.propertyValue, r = i && i.parent && i.parent.schema;
1196
+ if (!r)
1197
+ return;
1198
+ const d = r.contents.findIndex((c) => c.id === e.id);
1199
+ if (d === -1)
1200
+ return;
1201
+ const o = r.contents[d];
1202
+ let u;
1203
+ if (this.designViewModelField) {
1204
+ const f = this.formSchemaUtils.getViewModelById(this.viewModelId).fields.find((g) => g.id === this.designViewModelField.id).fieldSchema || {};
1205
+ f.editor || (f.editor = {}), f.editor.$type = s, this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, f, !1), u = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, s);
1206
+ }
1207
+ u || (u = this.controlCreatorUtils.createFormGroupWithoutField(s)), Object.assign(u, {
1208
+ id: o.id,
1209
+ appearance: o.appearance,
1210
+ size: o.size,
1211
+ label: o.label,
1212
+ binding: o.binding
1213
+ }), Object.prototype.hasOwnProperty.call(o, "visible") && Object.assign(u, { visible: o.visible }), o.editor && ["readonly", "required", "placeholder"].map((c) => {
1214
+ Object.prototype.hasOwnProperty.call(o.editor, c) && (u.editor[c] = o.editor[c]);
1215
+ }), i != null && i.updateContextSchema ? i.updateContextSchema(u) : (i.schema = Object.assign(o, u), Object.assign(e, u)), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
1216
+ (c) => c.classList.remove("dgComponentSelected")
1217
+ ), Array.from(document.getElementsByClassName("dgComponentFocused")).forEach(
1218
+ (c) => c.classList.remove("dgComponentFocused")
1219
+ ), x.value++, Z(() => {
1220
+ this.getFormDesignerInstance().reloadPropertyPanel();
1221
+ });
1222
+ }
1223
+ getComponentConfig(e, t = {}, i = {}, s) {
1224
+ var f, m;
1225
+ const r = Object.assign({
1226
+ description: "编辑器",
1227
+ title: "编辑器",
1228
+ type: "input-group",
1229
+ $converter: "/converter/property-editor.converter",
1230
+ parentPropertyID: "editor"
1231
+ }, t), d = (f = e.binding) != null && f.field ? [] : ["Const", "Variable", "StateMachine"], o = this.getPropertyEditorParams(e, d, "readonly"), u = this.getPropertyEditorParams(e, d, "required"), c = {
1232
+ readonly: {
1233
+ description: "",
1234
+ title: "只读",
1235
+ editor: o
1236
+ },
1237
+ required: {
1238
+ description: "",
1239
+ title: "必填",
1240
+ type: "boolean",
1241
+ editor: u,
1242
+ visible: !!((m = e.binding) != null && m.field)
1243
+ },
1244
+ placeholder: {
1245
+ description: "当控件没有值时在输入框中显示的文本",
1246
+ title: "提示文本",
1247
+ type: "string"
1248
+ }
1249
+ };
1250
+ for (const g in i)
1251
+ c[g] = Object.assign(c[g] || {}, i[g]);
1252
+ const l = this;
1253
+ return {
1254
+ ...r,
1255
+ properties: { ...c },
1256
+ setPropertyRelates(g, h) {
1257
+ if (g) {
1258
+ switch (g.propertyID) {
1259
+ case "readonly":
1260
+ case "required":
1261
+ l.afterMutilEditorChanged(e, g);
1262
+ break;
1263
+ }
1264
+ s && s.bind(l)(g, e, h);
1265
+ }
1266
+ }
1267
+ };
1268
+ }
1269
+ /**
1270
+ * 修改某一输入控件的样式后更新Form的统一布局配置
1271
+ * @param controlClass 控件样式
1272
+ * @param controlId 控件Id
1273
+ * @param componentId 控件所在组件id
1274
+ */
1275
+ updateUnifiedLayoutAfterControlChanged(e, t, i) {
1276
+ const s = e.split(" ");
1277
+ let r = s.find((l) => /^col-([1-9]|10|11|12)$/.test(l)), d = s.find((l) => /^col-md-([1-9]|10|11|12)$/.test(l)), o = s.find((l) => /^col-xl-([1-9]|10|11|12)$/.test(l)), u = s.find((l) => /^col-el-([1-9]|10|11|12)$/.test(l));
1278
+ r = r || "col-12", d = d || "col-md-" + r.replace("col-", ""), o = o || "col-xl-" + d.replace("col-md-", ""), u = u || "col-el-" + o.replace("col-xl-", "");
1279
+ const c = {
1280
+ id: t,
1281
+ columnInSM: parseInt(r.replace("col-", ""), 10),
1282
+ columnInMD: parseInt(d.replace("col-md-", ""), 10),
1283
+ columnInLG: parseInt(o.replace("col-xl-", ""), 10),
1284
+ columnInEL: parseInt(u.replace("col-el-", ""), 10)
1285
+ };
1286
+ this.updateUnifiedLayoutAfterResponseLayoutChanged(i, c);
1287
+ }
1288
+ /**
1289
+ * 修改控件布局配置后更新Form统一布局配置
1290
+ * @param componentId 组件Id
1291
+ * @param controlLayoutConfig 某单独变动的控件配置项,FormResponseLayoutContext类型
1292
+ */
1293
+ updateUnifiedLayoutAfterResponseLayoutChanged(e, t) {
1294
+ const { formNode: i } = this.responseLayoutEditorFunction.checkCanFindFormNode(e);
1295
+ if (!i || !i.unifiedLayout)
1296
+ return;
1297
+ const s = [];
1298
+ if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(i, s, 1), t) {
1299
+ const g = s.find((h) => h.id === t.id);
1300
+ Object.assign(g || {}, t);
1301
+ }
1302
+ const r = s.map((g) => g.columnInSM), d = s.map((g) => g.columnInMD), o = s.map((g) => g.columnInLG), u = s.map((g) => g.columnInEL), c = this.checkIsUniqueColumn(r) ? r[0] : null, l = this.checkIsUniqueColumn(d) ? d[0] : null, f = this.checkIsUniqueColumn(o) ? o[0] : null, m = this.checkIsUniqueColumn(u) ? u[0] : null;
1303
+ Object.assign(i.unifiedLayout, {
1304
+ uniqueColClassInSM: c,
1305
+ uniqueColClassInMD: l,
1306
+ uniqueColClassInLG: f,
1307
+ uniqueColClassInEL: m
1308
+ });
1309
+ }
1310
+ /**
1311
+ * 校验宽度样式值是否一致
1312
+ */
1313
+ checkIsUniqueColumn(e) {
1314
+ const t = new Set(e);
1315
+ return Array.from(t).length === 1;
1316
+ }
1317
+ /**
1318
+ * 枚举项编辑器
1319
+ * @param propertyData
1320
+ * @param valueField
1321
+ * @param textField
1322
+ * @returns
1323
+ */
1324
+ getItemCollectionEditor(e, t, i) {
1325
+ return t = t || "value", i = i || "name", {
1326
+ editor: {
1327
+ columns: [
1328
+ { field: t, title: "值", dataType: "string" },
1329
+ { field: i, title: "名称", dataType: "string" }
1330
+ // { field: 'disabled', title: '禁用', dataType: 'boolean', editor: { type: 'switch' } },
1331
+ ],
1332
+ type: "item-collection-editor",
1333
+ valueField: t,
1334
+ nameField: i,
1335
+ requiredFields: [t, i],
1336
+ uniqueFields: [t, i],
1337
+ readonly: this.checkEnumDataReadonly(e)
1338
+ }
1339
+ };
1340
+ }
1341
+ /**
1342
+ * 判断枚举数据是否只读
1343
+ * 1、没有绑定信息或者绑定变量,可以新增、删除、修改
1344
+ * 2、绑定类型为字段,且字段为枚举字段,则不可新增、删除、修改枚举值。只能从be修改然后同步到表单上。
1345
+ * @param propertyData 下拉框控件属性值
1346
+ */
1347
+ checkEnumDataReadonly(e) {
1348
+ return !e.binding || e.binding.type !== "Form" ? !1 : !!(this.designViewModelField && this.designViewModelField.type && this.designViewModelField.type.$type === _.EnumType);
1349
+ }
1350
+ /**
1351
+ * 将字段值变化前事件、变化后事件追加到交互面板
1352
+ * 注意:因为绑定字段值变化后事件与下拉框的值变化事件(valueChanged)重名,所以这里将事件label都重命名下
1353
+ */
1354
+ appendFieldValueChangeEvents(e, t) {
1355
+ e.binding && e.binding.type === M.Form && e.binding.field ? (t.find((i) => i.label === "fieldValueChanging"), t.find((i) => i.label === "fieldValueChanged"), this.designViewModelField && (e.fieldValueChanging = this.designViewModelField.valueChanging, e.fieldValueChanged = this.designViewModelField.valueChanged)) : t = t.filter((i) => i.label !== "fieldValueChanging" && i.label !== "fieldValueChanged");
1356
+ }
1357
+ getControlMethodType(e) {
1358
+ if (!e.binding)
1359
+ return e.type;
1360
+ switch (e.binding.type) {
1361
+ case M.Form:
1362
+ return e.binding.path || e.type;
1363
+ case M.Variable:
1364
+ return e.binding.fullPath || e.type;
1365
+ }
1366
+ return e.type;
1367
+ }
1368
+ /**
1369
+ * 组装输入类控件的交互面板:包含标签超链、绑定字段值变化前后事件等。
1370
+ * @param propertyData 属性值
1371
+ * @param viewModelId 视图模型id
1372
+ * @param showPosition 面板展示位置
1373
+ * @param customEvent 输入控件特有的事件配置
1374
+ */
1375
+ getEventPropertyConfig(e, t = "card", i, s) {
1376
+ const r = this;
1377
+ let d = [];
1378
+ if (i && (d = d.concat(i)), d.length === 0)
1379
+ return {
1380
+ title: "事件",
1381
+ hideTitle: !0,
1382
+ properties: {},
1383
+ tabId: "commands",
1384
+ tabName: "交互",
1385
+ hide: !0
1386
+ };
1387
+ this.appendFieldValueChangeEvents(e, d);
1388
+ const o = r.eventsEditorUtils.formProperties(e, r.viewModelId, d);
1389
+ return {
1390
+ title: "事件",
1391
+ hideTitle: !0,
1392
+ properties: r.createBaseEventProperty(o),
1393
+ tabId: "commands",
1394
+ tabName: "交互",
1395
+ setPropertyRelates(l, f) {
1396
+ const m = l.propertyValue;
1397
+ delete e[r.viewModelId], m && (m.setPropertyRelates = this.setPropertyRelates, m.controlInfo = { type: r.getControlMethodType(e), name: e.title }, r.eventsEditorUtils.saveRelatedParameters(e, r.viewModelId, m.events, m)), s && s(l, f, m);
1398
+ const g = r.designViewModelUtils.getDgViewModel(r.viewModelId);
1399
+ g && r.designViewModelField && g.changeField(r.designViewModelField.id, { valueChanging: e.fieldValueChanging, valueChanged: e.fieldValueChanged });
1400
+ }
1401
+ };
1402
+ }
1403
+ getExpressionConfig(e, t, i = ["compute", "dependency", "validate"], s) {
1404
+ return new q(this.formSchemaUtils).getExpressionConfig(
1405
+ e,
1406
+ t,
1407
+ i,
1408
+ s
1409
+ );
1410
+ }
1411
+ getBindingDataType() {
1412
+ return this.designViewModelField ? this.designViewModelField.type.name === "Number" ? "number" : this.designViewModelField.type.name === "String" ? "string" : "boolean" : "boolean";
1413
+ }
1414
+ getEditor() {
1415
+ return this.getBindingDataType() === "number" ? this.numberEditorOptions : {};
1416
+ }
1417
+ updatePropertyValue(e, t, i) {
1418
+ var s;
1419
+ e.editor[t] !== i ? e.editor[t] = i : (s = this.getFormDesignerInstance()) == null || s.reloadPropertyPanel();
1420
+ }
1421
+ setBooleanValue(e, t, i) {
1422
+ let s = i;
1423
+ this.getBindingDataType() === "string" && (s = (s || "").trim() || (t === "trueValue" ? "true" : "false"));
1424
+ const d = t === "trueValue" ? "falseValue" : "trueValue";
1425
+ e.editor[d] === s && (s = s + 1), this.updatePropertyValue(e, t, s);
1426
+ }
1427
+ getBooleanValueConverter() {
1428
+ return {
1429
+ convertFrom: (e, t) => e.editor[t],
1430
+ convertTo: (e, t, i) => {
1431
+ this.setBooleanValue(e, t, i);
1432
+ }
1433
+ };
1434
+ }
1435
+ }
1436
+ class ye extends he {
1437
+ constructor(n, e) {
1438
+ super(n, e);
1439
+ }
1440
+ getEditorProperties(n) {
1441
+ return {
1442
+ description: "编辑器",
1443
+ title: "编辑器",
1444
+ type: "avatar",
1445
+ $converter: "/converter/property-editor.converter",
1446
+ parentPropertyID: "editor",
1447
+ properties: {
1448
+ readonly: {
1449
+ description: "",
1450
+ title: "只读",
1451
+ type: "boolean"
1452
+ },
1453
+ avatarWidth: {
1454
+ description: "",
1455
+ title: "头像宽度",
1456
+ type: "number"
1457
+ },
1458
+ avatarHeight: {
1459
+ description: "",
1460
+ title: "头像高度",
1461
+ type: "number"
1462
+ },
1463
+ cover: {
1464
+ description: "",
1465
+ title: "封面",
1466
+ type: "string"
1467
+ }
1468
+ }
1469
+ };
1470
+ }
1471
+ }
1472
+ function Ae(p, n) {
1473
+ const e = p.schema;
1474
+ function t(i, s) {
1475
+ return new ye(i, n).getPropertyConfig(e, s);
1476
+ }
1477
+ return {
1478
+ getPropsConfig: t
1479
+ };
1480
+ }
1481
+ const ve = /* @__PURE__ */ U({
1482
+ name: "FAvatarDesign",
1483
+ props: k,
1484
+ emits: ["change", "update:modelValue"],
1485
+ setup(p, n) {
1486
+ const e = F(), t = B("designer-host-service"), i = B("design-item-context"), s = Ae(i, t), r = X(e, i, s);
1487
+ z(() => {
1488
+ e.value.componentInstance = r;
1489
+ }), n.expose(r.value);
1490
+ const d = I(() => ({
1491
+ "f-avatar": !0,
1492
+ "f-avatar-readonly": p.readonly,
1493
+ "f-avatar-circle": p.shape === "circle",
1494
+ "f-avatar-square": p.shape === "square"
1495
+ })), o = F(p.modelValue), u = I(() => ({
1496
+ width: p.avatarWidth + "px",
1497
+ height: p.avatarHeight + "px"
1498
+ })), c = !1;
1499
+ function l() {
1500
+ return "";
1501
+ }
1502
+ function f() {
1503
+ }
1504
+ const m = F(null), {
1505
+ acceptTypes: g,
1506
+ imageSource: h,
1507
+ onClickImage: A
1508
+ } = L(p, n, m, o);
1509
+ return () => C("div", {
1510
+ ref: e,
1511
+ class: d.value,
1512
+ style: u.value,
1513
+ onClick: A
1514
+ }, [c, C("img", {
1515
+ title: p.title,
1516
+ class: "f-avatar-image",
1517
+ src: h.value,
1518
+ onError: l
1519
+ }, null), !p.readonly && C("div", {
1520
+ class: "f-avatar-icon"
1521
+ }, [C("span", {
1522
+ class: "f-icon f-icon-camera"
1523
+ }, null)]), C("input", {
1524
+ ref: "file",
1525
+ name: "file-input",
1526
+ type: "file",
1527
+ class: "f-avatar-upload",
1528
+ accept: g.value,
1529
+ onChange: f,
1530
+ style: "display: none;"
1531
+ }, null)]);
1532
+ }
1533
+ });
1534
+ S.register = (p, n, e, t) => {
1535
+ p.avatar = S, n.avatar = R;
1536
+ };
1537
+ S.registerDesigner = (p, n, e) => {
1538
+ p.avatar = ve, n.avatar = R;
1539
+ };
1540
+ const xe = ee(S);
116
1541
  export {
117
- p as FAvatar,
118
- Q as avatarProps,
119
- N as default
1542
+ S as FAvatar,
1543
+ k as avatarProps,
1544
+ xe as default,
1545
+ R as propsResolver
120
1546
  };