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