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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (431) hide show
  1. package/components/accordion/index.esm.js +312 -61
  2. package/components/accordion/index.umd.cjs +1 -1
  3. package/components/avatar/index.esm.js +1492 -59
  4. package/components/avatar/index.umd.cjs +1 -1
  5. package/components/binding-selector/index.esm.js +752 -8
  6. package/components/binding-selector/index.umd.cjs +1 -1
  7. package/components/button-edit/index.esm.js +1 -1
  8. package/components/button-edit/index.umd.cjs +1 -1
  9. package/components/button-group/index.esm.js +266 -110
  10. package/components/button-group/index.umd.cjs +1 -1
  11. package/components/calendar/index.esm.js +344 -341
  12. package/components/calendar/index.umd.cjs +3 -3
  13. package/components/code-editor/index.esm.js +237 -169
  14. package/components/code-editor/index.umd.cjs +3 -3
  15. package/components/collection-property-editor/index.esm.js +302 -299
  16. package/components/collection-property-editor/index.umd.cjs +2 -2
  17. package/components/color-picker/index.esm.js +812 -502
  18. package/components/color-picker/index.umd.cjs +1 -1
  19. package/components/combo-list/index.esm.js +329 -292
  20. package/components/combo-list/index.umd.cjs +1 -1
  21. package/components/combo-tree/index.esm.js +355 -174
  22. package/components/combo-tree/index.umd.cjs +1 -1
  23. package/components/comment/index.esm.js +294 -291
  24. package/components/comment/index.umd.cjs +6 -6
  25. package/components/common/index.esm.js +1 -1
  26. package/components/common/index.umd.cjs +1 -1
  27. package/components/component/index.esm.js +4390 -2708
  28. package/components/component/index.umd.cjs +8 -1
  29. package/components/condition/index.esm.js +3140 -487
  30. package/components/condition/index.umd.cjs +8 -1
  31. package/components/data-grid/index.esm.js +4 -2
  32. package/components/data-grid/index.umd.cjs +1 -1
  33. package/components/data-view/index.esm.js +1859 -1832
  34. package/components/data-view/index.umd.cjs +1 -1
  35. package/components/date-picker/index.esm.js +1 -1
  36. package/components/date-picker/index.umd.cjs +1 -1
  37. package/components/designer-canvas/index.esm.js +3731 -2717
  38. package/components/designer-canvas/index.umd.cjs +1 -1
  39. package/components/drawer/index.esm.js +417 -405
  40. package/components/drawer/index.umd.cjs +2 -2
  41. package/components/dropdown/index.esm.js +373 -124
  42. package/components/dropdown/index.umd.cjs +2 -2
  43. package/components/dynamic-form/index.esm.js +1245 -1895
  44. package/components/dynamic-form/index.umd.cjs +1 -1
  45. package/components/dynamic-resolver/index.esm.js +275 -271
  46. package/components/dynamic-resolver/index.umd.cjs +2 -2
  47. package/components/dynamic-view/index.esm.js +529 -450
  48. package/components/dynamic-view/index.umd.cjs +1 -1
  49. package/components/event-parameter/index.esm.js +1 -1
  50. package/components/event-parameter/index.umd.cjs +1 -1
  51. package/components/events-editor/index.esm.js +2613 -1544
  52. package/components/events-editor/index.umd.cjs +3 -3
  53. package/components/expression-editor/index.css +1 -1
  54. package/components/expression-editor/index.esm.js +7376 -2
  55. package/components/expression-editor/index.umd.cjs +427 -1
  56. package/components/fieldset/index.esm.js +1 -1
  57. package/components/fieldset/index.umd.cjs +1 -1
  58. package/components/filter-bar/index.esm.js +423 -415
  59. package/components/filter-bar/index.umd.cjs +2 -2
  60. package/components/filter-condition-editor/index.css +1 -1
  61. package/components/filter-condition-editor/index.esm.js +9049 -425
  62. package/components/filter-condition-editor/index.umd.cjs +427 -1
  63. package/components/html-template/index.esm.js +33 -36
  64. package/components/html-template/index.umd.cjs +1 -1
  65. package/components/image/index.esm.js +364 -355
  66. package/components/image/index.umd.cjs +2 -2
  67. package/components/image-cropper/index.esm.js +615 -361
  68. package/components/image-cropper/index.umd.cjs +1 -1
  69. package/components/json-editor/index.esm.js +325 -247
  70. package/components/json-editor/index.umd.cjs +1 -1
  71. package/components/language-textbox/index.esm.js +411 -409
  72. package/components/language-textbox/index.umd.cjs +2 -2
  73. package/components/layout/index.esm.js +549 -163
  74. package/components/layout/index.umd.cjs +1 -1
  75. package/components/list-nav/index.esm.js +837 -39
  76. package/components/list-nav/index.umd.cjs +1 -1
  77. package/components/list-view/index.esm.js +427 -646
  78. package/components/list-view/index.umd.cjs +6 -6
  79. package/components/lookup/index.esm.js +3624 -3625
  80. package/components/lookup/index.umd.cjs +1 -1
  81. package/components/mapping-editor/index.esm.js +5 -3
  82. package/components/mapping-editor/index.umd.cjs +1 -1
  83. package/components/menu-lookup/index.esm.js +577 -536
  84. package/components/menu-lookup/index.umd.cjs +6 -6
  85. package/components/nav/index.esm.js +311 -31
  86. package/components/nav/index.umd.cjs +1 -1
  87. package/components/number-range/index.esm.js +1641 -189
  88. package/components/number-range/index.umd.cjs +1 -1
  89. package/components/number-spinner/index.esm.js +82 -82
  90. package/components/number-spinner/index.umd.cjs +1 -1
  91. package/components/order/index.esm.js +1196 -851
  92. package/components/order/index.umd.cjs +6 -6
  93. package/components/page-footer/index.esm.js +331 -48
  94. package/components/page-footer/index.umd.cjs +1 -1
  95. package/components/page-header/index.esm.js +110 -116
  96. package/components/page-header/index.umd.cjs +1 -1
  97. package/components/pagination/index.esm.js +509 -232
  98. package/components/pagination/index.umd.cjs +1 -1
  99. package/components/progress/index.esm.js +353 -148
  100. package/components/progress/index.umd.cjs +3 -3
  101. package/components/property-editor/index.esm.js +157 -153
  102. package/components/property-editor/index.umd.cjs +1 -1
  103. package/components/property-panel/index.esm.js +1817 -854
  104. package/components/property-panel/index.umd.cjs +12 -5
  105. package/components/query-solution/index.css +1 -1
  106. package/components/query-solution/index.esm.js +6858 -3984
  107. package/components/query-solution/index.umd.cjs +13 -6
  108. package/components/response-layout/index.esm.js +1 -1
  109. package/components/response-layout/index.umd.cjs +1 -1
  110. package/components/schema-selector/index.esm.js +2448 -2222
  111. package/components/schema-selector/index.umd.cjs +7 -7
  112. package/components/search-box/index.esm.js +244 -72
  113. package/components/search-box/index.umd.cjs +1 -1
  114. package/components/section/index.esm.js +212 -209
  115. package/components/section/index.umd.cjs +2 -2
  116. package/components/smoke-detector/index.esm.js +179 -8
  117. package/components/smoke-detector/index.umd.cjs +1 -1
  118. package/components/sort-condition-editor/index.css +1 -0
  119. package/components/sort-condition-editor/index.esm.js +9493 -4
  120. package/components/sort-condition-editor/index.umd.cjs +427 -1
  121. package/components/splitter/index.esm.js +1172 -142
  122. package/components/splitter/index.umd.cjs +1 -1
  123. package/components/step/index.esm.js +47 -48
  124. package/components/step/index.umd.cjs +1 -1
  125. package/components/tabs/index.esm.js +490 -419
  126. package/components/tabs/index.umd.cjs +1 -1
  127. package/components/text/index.esm.js +217 -73
  128. package/components/text/index.umd.cjs +1 -1
  129. package/components/textarea/index.esm.js +29 -27
  130. package/components/textarea/index.umd.cjs +2 -2
  131. package/components/transfer/index.esm.js +760 -543
  132. package/components/transfer/index.umd.cjs +5 -5
  133. package/components/tree-grid/index.esm.js +129 -128
  134. package/components/tree-grid/index.umd.cjs +1 -1
  135. package/components/tree-view/index.esm.js +320 -153
  136. package/components/tree-view/index.umd.cjs +1 -1
  137. package/components/uploader/index.esm.js +1112 -607
  138. package/components/uploader/index.umd.cjs +2 -2
  139. package/components/verify-detail/index.esm.js +359 -106
  140. package/components/verify-detail/index.umd.cjs +1 -1
  141. package/components/video/index.esm.js +222 -89
  142. package/components/video/index.umd.cjs +1 -1
  143. package/components/weather/index.esm.js +290 -199
  144. package/components/weather/index.umd.cjs +1 -1
  145. package/designer/data-grid/index.esm.js +5301 -4507
  146. package/designer/data-grid/index.umd.cjs +17 -10
  147. package/designer/drawer/index.esm.js +626 -615
  148. package/designer/drawer/index.umd.cjs +2 -2
  149. package/designer/dynamic-form/index.esm.js +2043 -1290
  150. package/designer/dynamic-form/index.umd.cjs +8 -1
  151. package/designer/farris-designer.all.esm.js +14263 -12505
  152. package/designer/farris-designer.all.umd.cjs +16 -16
  153. package/designer/list-view/index.esm.js +327 -327
  154. package/designer/list-view/index.umd.cjs +3 -3
  155. package/designer/modal/index.esm.js +29 -137
  156. package/designer/modal/index.umd.cjs +1 -1
  157. package/designer/radio-group/index.esm.js +238 -232
  158. package/designer/radio-group/index.umd.cjs +1 -1
  159. package/designer/response-layout-editor/index.esm.js +178 -171
  160. package/designer/response-layout-editor/index.umd.cjs +1 -1
  161. package/designer/response-toolbar/index.esm.js +1 -1
  162. package/designer/response-toolbar/index.umd.cjs +1 -1
  163. package/designer/section/index.esm.js +1 -6
  164. package/designer/section/index.umd.cjs +1 -1
  165. package/designer/tabs/index.esm.js +3431 -2493
  166. package/designer/tabs/index.umd.cjs +2 -2
  167. package/designer/time-picker/index.esm.js +195 -188
  168. package/designer/time-picker/index.umd.cjs +1 -1
  169. package/designer/tree-grid/index.esm.js +822 -464
  170. package/designer/tree-grid/index.umd.cjs +1 -1
  171. package/farris.all.esm.js +77525 -74884
  172. package/farris.all.umd.cjs +93 -93
  173. package/index.css +1 -1
  174. package/package.json +1 -1
  175. package/types/accordion/src/accordion.props.d.ts +1 -0
  176. package/types/accordion/src/components/accordion-item.props.d.ts +1 -0
  177. package/types/avatar/src/avatar.props.d.ts +1 -0
  178. package/types/binding-selector/index.d.ts +54 -0
  179. package/types/binding-selector/src/binding-selector.props.d.ts +1 -0
  180. package/types/button-group/index.d.ts +0 -15
  181. package/types/button-group/src/button-group.props.d.ts +1 -0
  182. package/types/code-editor/index.d.ts +1 -0
  183. package/types/code-editor/src/code-textbox.component.d.ts +6 -6
  184. package/types/code-editor/src/code-textbox.props.d.ts +2 -0
  185. package/types/color-picker/index.d.ts +15 -0
  186. package/types/color-picker/src/color-picker.props.d.ts +1 -0
  187. package/types/combo-list/src/composition/use-data-source.d.ts +2 -1
  188. package/types/combo-tree/src/combo-tree.props.d.ts +1 -0
  189. package/types/component/index.d.ts +2 -0
  190. package/types/component/src/component.props.d.ts +8 -0
  191. package/types/components.d.ts +8 -1
  192. package/types/condition/index.d.ts +55 -0
  193. package/types/condition/src/composition/condition-value/dropdown-value.d.ts +4 -0
  194. package/types/data-view/composition/types.d.ts +1 -1
  195. package/types/designer-canvas/src/composition/dg-control.d.ts +24 -0
  196. package/types/designer-toolbox/index.d.ts +3 -0
  197. package/types/designer-toolbox/src/toolbox.component.d.ts +14 -0
  198. package/types/designer-toolbox/src/toolbox.props.d.ts +29 -0
  199. package/types/designer-toolbox/src/types.d.ts +21 -0
  200. package/types/designer.d.ts +13 -0
  201. package/types/dropdown/index.d.ts +6 -27
  202. package/types/dropdown/src/dropdown.item.component.d.ts +1 -1
  203. package/types/dropdown/src/dropdown.props.d.ts +1 -0
  204. package/types/dynamic-form/designer.d.ts +1 -4
  205. package/types/dynamic-form/index.d.ts +6 -11
  206. package/types/dynamic-form/src/component/dynamic-form-label/dynamic-form-label.component.d.ts +3 -3
  207. package/types/dynamic-form/src/designer/dynamic-form.design.component.d.ts +8 -0
  208. package/types/dynamic-form/src/designer/response-form.design.props.d.ts +14 -0
  209. package/types/dynamic-form/src/designer/use-dynamic-form-rules.d.ts +2 -0
  210. package/types/dynamic-form/src/dynamic-form.component.d.ts +8 -0
  211. package/types/dynamic-form/src/response-form.props.d.ts +13 -1
  212. package/types/dynamic-form/src/schema/response-form-schema-resolver.d.ts +1 -0
  213. package/types/dynamic-form/src/types.d.ts +1 -0
  214. package/types/dynamic-resolver/index.d.ts +0 -3
  215. package/types/dynamic-resolver/src/resolver/property-config/property-config-resolver-design.d.ts +1 -1
  216. package/types/dynamic-resolver/src/resolver/property-config/property-config-resolver.d.ts +1 -1
  217. package/types/dynamic-resolver/src/resolver/property-config/use-property-config-resolver.d.ts +2 -2
  218. package/types/dynamic-resolver/src/resolver/schema/schema-resolver-design.d.ts +1 -1
  219. package/types/dynamic-resolver/src/resolver/schema/schema-resolver.d.ts +1 -1
  220. package/types/dynamic-resolver/src/types.d.ts +1 -0
  221. package/types/dynamic-view/index.d.ts +43 -3
  222. package/types/dynamic-view/src/components/maps.d.ts +110 -98
  223. package/types/dynamic-view/src/composition/index.d.ts +5 -0
  224. package/types/dynamic-view/src/composition/use-utils.d.ts +12 -0
  225. package/types/dynamic-view/src/dynamic-view.component.d.ts +6 -6
  226. package/types/{binding-selector/designer.d.ts → expression-editor/index.d.ts} +6 -6
  227. package/types/filter-condition-editor/index.d.ts +9 -0
  228. package/types/filter-condition-editor/src/components/filter-condition-grid.component.d.ts +12 -12
  229. package/types/filter-condition-editor/src/components/sort-editor-grid.component.d.ts +12 -12
  230. package/types/filter-condition-editor/src/filter-condition-editor.props.d.ts +1 -0
  231. package/types/flow-canvas/index.d.ts +3 -0
  232. package/types/flow-canvas/src/components/flow-node-item.component.d.ts +8 -0
  233. package/types/flow-canvas/src/components/flow-node-item.props.d.ts +3 -0
  234. package/types/flow-canvas/src/composition/types.d.ts +42 -0
  235. package/types/flow-canvas/src/composition/use-bezier-curve.d.ts +2 -0
  236. package/types/flow-canvas/src/composition/use-connections.d.ts +2 -0
  237. package/types/flow-canvas/src/composition/use-curve.d.ts +4 -0
  238. package/types/flow-canvas/src/composition/use-drawing-bezier.d.ts +2 -0
  239. package/types/flow-canvas/src/composition/use-drawing.d.ts +4 -0
  240. package/types/flow-canvas/src/flow-canvas.component.d.ts +8 -0
  241. package/types/flow-canvas/src/flow-canvas.props.d.ts +3 -0
  242. package/types/image-cropper/src/image-cropper.props.d.ts +1 -0
  243. package/types/index.d.ts +1 -0
  244. package/types/json-editor/src/json-editor.props.d.ts +1 -0
  245. package/types/language-textbox/index.d.ts +3 -3
  246. package/types/language-textbox/src/components/language-contents.component.d.ts +1 -1
  247. package/types/language-textbox/src/language-textbox.component.d.ts +1 -1
  248. package/types/layout/index.d.ts +0 -1
  249. package/types/layout/src/components/layout-pane.props.d.ts +1 -0
  250. package/types/layout/src/designer/layout-pane-use-designer-rules.d.ts +2 -0
  251. package/types/layout/src/designer/layout-pane.design.component.d.ts +8 -0
  252. package/types/layout/src/designer/layout-use-designer-rules.d.ts +2 -0
  253. package/types/layout/src/designer/layout.design.component.d.ts +8 -0
  254. package/types/layout/src/layout.props.d.ts +1 -0
  255. package/types/layout/src/schema/schema-mapper.d.ts +2 -0
  256. package/types/layout/src/schema/schema-resolver.d.ts +2 -0
  257. package/types/list-nav/index.d.ts +5 -24
  258. package/types/list-nav/src/designer/use-designer-rules.d.ts +2 -0
  259. package/types/list-nav/src/list-nav.props.d.ts +1 -0
  260. package/types/list-nav/src/property-config/list-nav.property-config.d.ts +8 -0
  261. package/types/list-nav/src/schema/schema-mapper.d.ts +2 -0
  262. package/types/list-nav/src/schema/schema-resolver.d.ts +2 -0
  263. package/types/list-view/index.d.ts +0 -1
  264. package/types/list-view/src/composition/use-draggable.d.ts +1 -1
  265. package/types/lookup/index.d.ts +1 -1
  266. package/types/lookup/src/components/popup-container.component.d.ts +3 -3
  267. package/types/menu-lookup/src/menu-lookup.props.d.ts +1 -0
  268. package/types/modal/designer.d.ts +0 -2
  269. package/types/nav/index.d.ts +20 -24
  270. package/types/nav/src/nav.props.d.ts +1 -0
  271. package/types/number-range/src/number-range.props.d.ts +1 -0
  272. package/types/order/index.d.ts +5 -36
  273. package/types/order/src/designer/order.design.component.d.ts +1 -1
  274. package/types/order/src/order.props.d.ts +1 -0
  275. package/types/page-footer/index.d.ts +2 -0
  276. package/types/page-footer/src/page-footer.props.d.ts +1 -0
  277. package/types/pagination/index.d.ts +0 -15
  278. package/types/pagination/src/pagination.props.d.ts +1 -0
  279. package/types/progress/src/progress.props.d.ts +1 -0
  280. package/types/property-panel/src/property-panel.component.d.ts +3 -3
  281. package/types/query-solution/index.d.ts +2 -1
  282. package/types/radio-group/designer.d.ts +1 -2
  283. package/types/search-box/index.d.ts +17 -1
  284. package/types/search-box/src/search-box.props.d.ts +1 -0
  285. package/types/section/designer.d.ts +0 -1
  286. package/types/smoke-detector/index.d.ts +2 -0
  287. package/types/smoke-detector/src/smoke-detector.props.d.ts +1 -0
  288. package/types/sort-condition-editor/index.d.ts +7 -2
  289. package/types/sort-condition-editor/src/sort-condition-editor.props.d.ts +1 -0
  290. package/types/splitter/index.d.ts +0 -1
  291. package/types/splitter/src/components/splitter-pane.props.d.ts +1 -0
  292. package/types/splitter/src/splitter.props.d.ts +1 -0
  293. package/types/tabs/designer.d.ts +0 -1
  294. package/types/tabs/index.d.ts +1 -0
  295. package/types/text/index.d.ts +20 -24
  296. package/types/text/src/text.props.d.ts +1 -0
  297. package/types/transfer/src/transfer.props.d.ts +1 -0
  298. package/types/tree-view/src/tree-view.props.d.ts +1 -0
  299. package/types/uploader/src/uploader.props.d.ts +1 -0
  300. package/types/verify-detail/index.d.ts +5 -58
  301. package/types/verify-detail/src/designer/verify-detail.design.component.d.ts +8 -8
  302. package/types/verify-detail/src/verify-detail.props.d.ts +1 -0
  303. package/types/video/index.d.ts +20 -24
  304. package/types/video/src/video.props.d.ts +1 -0
  305. package/components/dynamic-form/index.css +0 -1
  306. package/designer/accordion/index.esm.js +0 -257
  307. package/designer/accordion/index.umd.cjs +0 -1
  308. package/designer/avatar/index.esm.js +0 -1460
  309. package/designer/avatar/index.umd.cjs +0 -1
  310. package/designer/binding-selector/index.esm.js +0 -792
  311. package/designer/binding-selector/index.umd.cjs +0 -1
  312. package/designer/button-group/index.esm.js +0 -282
  313. package/designer/button-group/index.umd.cjs +0 -1
  314. package/designer/code-editor/index.esm.js +0 -75
  315. package/designer/code-editor/index.umd.cjs +0 -1
  316. package/designer/color-picker/index.esm.js +0 -1096
  317. package/designer/color-picker/index.umd.cjs +0 -1
  318. package/designer/combo-list/index.esm.js +0 -1095
  319. package/designer/combo-list/index.umd.cjs +0 -1
  320. package/designer/combo-tree/index.esm.js +0 -186
  321. package/designer/combo-tree/index.umd.cjs +0 -1
  322. package/designer/component/index.css +0 -1
  323. package/designer/component/index.esm.js +0 -5002
  324. package/designer/component/index.umd.cjs +0 -1
  325. package/designer/condition/index.esm.js +0 -1899
  326. package/designer/condition/index.umd.cjs +0 -1
  327. package/designer/dropdown/index.esm.js +0 -261
  328. package/designer/dropdown/index.umd.cjs +0 -1
  329. package/designer/expression-editor/index.css +0 -1
  330. package/designer/expression-editor/index.esm.js +0 -7006
  331. package/designer/expression-editor/index.umd.cjs +0 -427
  332. package/designer/filter-condition-editor/index.css +0 -1
  333. package/designer/filter-condition-editor/index.esm.js +0 -4795
  334. package/designer/filter-condition-editor/index.umd.cjs +0 -1
  335. package/designer/html-template/index.esm.js +0 -718
  336. package/designer/html-template/index.umd.cjs +0 -1
  337. package/designer/image-cropper/index.esm.js +0 -765
  338. package/designer/image-cropper/index.umd.cjs +0 -1
  339. package/designer/json-editor/index.esm.js +0 -83
  340. package/designer/json-editor/index.umd.cjs +0 -1
  341. package/designer/language-textbox/index.esm.js +0 -783
  342. package/designer/language-textbox/index.umd.cjs +0 -8
  343. package/designer/layout/index.esm.js +0 -430
  344. package/designer/layout/index.umd.cjs +0 -1
  345. package/designer/list-nav/index.esm.js +0 -802
  346. package/designer/list-nav/index.umd.cjs +0 -1
  347. package/designer/lookup/index.esm.js +0 -2083
  348. package/designer/lookup/index.umd.cjs +0 -1
  349. package/designer/menu-lookup/index.esm.js +0 -46
  350. package/designer/menu-lookup/index.umd.cjs +0 -1
  351. package/designer/nav/index.esm.js +0 -284
  352. package/designer/nav/index.umd.cjs +0 -1
  353. package/designer/number-range/index.esm.js +0 -1616
  354. package/designer/number-range/index.umd.cjs +0 -1
  355. package/designer/order/index.css +0 -1
  356. package/designer/order/index.esm.js +0 -2196
  357. package/designer/order/index.umd.cjs +0 -18
  358. package/designer/page-footer/index.esm.js +0 -290
  359. package/designer/page-footer/index.umd.cjs +0 -1
  360. package/designer/page-header/index.esm.js +0 -1003
  361. package/designer/page-header/index.umd.cjs +0 -1
  362. package/designer/pagination/index.esm.js +0 -591
  363. package/designer/pagination/index.umd.cjs +0 -1
  364. package/designer/progress/index.esm.js +0 -213
  365. package/designer/progress/index.umd.cjs +0 -1
  366. package/designer/search-box/index.esm.js +0 -245
  367. package/designer/search-box/index.umd.cjs +0 -1
  368. package/designer/smoke-detector/index.css +0 -1
  369. package/designer/smoke-detector/index.esm.js +0 -178
  370. package/designer/smoke-detector/index.umd.cjs +0 -1
  371. package/designer/sort-condition-editor/index.esm.js +0 -138
  372. package/designer/sort-condition-editor/index.umd.cjs +0 -1
  373. package/designer/splitter/index.esm.js +0 -1120
  374. package/designer/splitter/index.umd.cjs +0 -1
  375. package/designer/step/index.esm.js +0 -226
  376. package/designer/step/index.umd.cjs +0 -1
  377. package/designer/text/index.esm.js +0 -147
  378. package/designer/text/index.umd.cjs +0 -1
  379. package/designer/transfer/index.esm.js +0 -254
  380. package/designer/transfer/index.umd.cjs +0 -1
  381. package/designer/tree-view/index.esm.js +0 -313
  382. package/designer/tree-view/index.umd.cjs +0 -1
  383. package/designer/uploader/index.esm.js +0 -1190
  384. package/designer/uploader/index.umd.cjs +0 -2
  385. package/designer/verify-detail/index.esm.js +0 -258
  386. package/designer/verify-detail/index.umd.cjs +0 -1
  387. package/designer/video/index.esm.js +0 -136
  388. package/designer/video/index.umd.cjs +0 -1
  389. package/designer/weather/index.css +0 -1
  390. package/designer/weather/index.esm.js +0 -6244
  391. package/designer/weather/index.umd.cjs +0 -14
  392. package/types/accordion/designer.d.ts +0 -44
  393. package/types/avatar/designer.d.ts +0 -29
  394. package/types/button-group/designer.d.ts +0 -29
  395. package/types/code-editor/designer.d.ts +0 -5
  396. package/types/color-picker/designer.d.ts +0 -29
  397. package/types/combo-list/designer.d.ts +0 -29
  398. package/types/combo-list/src/designer/combo-list.design.props.d.ts +0 -6
  399. package/types/combo-tree/designer.d.ts +0 -5
  400. package/types/component/designer.d.ts +0 -35
  401. package/types/condition/designer.d.ts +0 -56
  402. package/types/dropdown/designer.d.ts +0 -6
  403. package/types/dynamic-form/src/composition/use-input-type-resolver.d.ts +0 -11
  404. package/types/expression-editor/designer.d.ts +0 -9
  405. package/types/filter-condition-editor/designer.d.ts +0 -10
  406. package/types/html-template/designer.d.ts +0 -31
  407. package/types/html-template/src/designer/html-template.design.props.d.ts +0 -9
  408. package/types/image-cropper/designer.d.ts +0 -4
  409. package/types/json-editor/designer.d.ts +0 -5
  410. package/types/menu-lookup/designer.d.ts +0 -5
  411. package/types/nav/designer.d.ts +0 -6
  412. package/types/number-range/designer.d.ts +0 -29
  413. package/types/order/designer.d.ts +0 -6
  414. package/types/page-footer/designer.d.ts +0 -6
  415. package/types/page-header/src/designer/page-header.design.props.d.ts +0 -20
  416. package/types/pagination/designer.d.ts +0 -29
  417. package/types/progress/designer.d.ts +0 -29
  418. package/types/search-box/designer.d.ts +0 -52
  419. package/types/smoke-detector/designer.d.ts +0 -6
  420. package/types/sort-condition-editor/designer.d.ts +0 -9
  421. package/types/splitter/designer.d.ts +0 -32
  422. package/types/step/designer.d.ts +0 -6
  423. package/types/text/designer.d.ts +0 -6
  424. package/types/transfer/designer.d.ts +0 -35
  425. package/types/tree-view/designer.d.ts +0 -29
  426. package/types/uploader/designer.d.ts +0 -141
  427. package/types/verify-detail/designer.d.ts +0 -6
  428. package/types/video/designer.d.ts +0 -6
  429. /package/{designer → components}/condition/index.css +0 -0
  430. /package/{designer → components}/uploader/index.css +0 -0
  431. /package/types/{dynamic-form/src/component/form-control/form-control.component.d.ts → list-nav/src/designer/list-nav.design.component.d.ts} +0 -0
@@ -1,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 ne = Object.defineProperty;
2
+ var re = (o, n, e) => n in o ? ne(o, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[n] = e;
3
+ var y = (o, n, e) => re(o, typeof n != "symbol" ? n + "" : n, e);
4
+ import { computed as M, ref as N, createVNode as E, defineComponent as H, onMounted as J, watch as G, createTextVNode as Q, nextTick as se, inject as K } from "vue";
5
+ import { resolveAppearance as oe, createPropsResolver as le } from "../dynamic-resolver/index.esm.js";
6
+ import I from "bignumber.js";
7
+ import { useNumberLocales as ae } from "../number-spinner/index.esm.js";
8
+ import { DgControl as p, canvasChanged as R, refreshCanvas as de, useDesignerComponent as ue } from "../designer-canvas/index.esm.js";
9
+ import { cloneDeep as ce } from "lodash-es";
10
+ import { FormSchemaEntityField$Type as Z, FormSchemaEntityFieldType$Type as pe, withInstall as ge } from "../common/index.esm.js";
11
+ function me(o, n, e) {
12
+ return n;
13
+ }
14
+ const fe = /* @__PURE__ */ new Map([
15
+ ["appearance", oe]
16
+ ]), he = "https://json-schema.org/draft/2020-12/schema", ye = "https://farris-design.gitee.io/number-range.schema.json", be = "number-range", ve = "A Farris Component", Ce = "object", we = {
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
+ }, xe = [
123
+ "type"
124
+ ], Ve = {
125
+ $schema: he,
126
+ $id: ye,
127
+ title: be,
128
+ description: ve,
129
+ type: Ce,
130
+ properties: we,
131
+ required: xe
132
+ }, W = {
6
133
  /**
7
134
  * 组件标识
8
135
  */
@@ -114,244 +241,1569 @@ 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
+ }, Y = le(W, Ve, fe, me);
245
+ function ee(o, n) {
246
+ const e = M(() => Number(o.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 u = i(o.max) ? null : new I(String(o.max), 10), d = i(o.min) ? null : new I(String(o.min), 10);
255
+ return u && l.gt(u) ? u : d && l.lt(d) ? d : l;
256
+ }
257
+ function s(l, u, d, a) {
258
+ const g = new I(l, 10), f = i(d && d.value) ? null : new I(String(d.value), 10), m = i(u && u.value) ? null : new I(String(u.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, u = !0) {
263
+ if (o.parser)
264
+ return isNaN(Number(l)) ? o.parser(l) : l;
265
+ let d = new I(l, 10);
266
+ if (u && (d = r(d)), d.isNaN()) {
267
+ if (o.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("" + o.min, 10), f = new I("" + o.max, 10);
270
+ if (!g.isNaN())
271
+ d = g;
272
+ else if (!f.isNaN())
273
+ d = f;
147
274
  else
148
275
  return 0;
149
276
  }
150
- return t(a);
277
+ return t(d);
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: s };
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 te(o, n, e) {
282
+ const t = M(() => ({
283
+ prefix: o.prefix,
284
+ suffix: o.suffix,
285
+ decimalSeparator: o.decimalSeparator,
286
+ groupSeparator: o.useThousands ? o.groupSeparator : "",
287
+ groupSize: o.groupSize
288
+ })), { getValidNumberObject: i, precision: r } = e;
289
+ function s(u) {
290
+ return u = u == null || u === "" ? "" : String(u), u = u.replace(new RegExp(o.prefix, "g"), "").replace(new RegExp(o.suffix, "g"), "").replace(/,/g, ""), o.groupSeparator && o.groupSeparator !== "," && (u = u.replace(new RegExp(`\\${o.groupSeparator}`, "g"), "")), o.decimalSeparator && o.decimalSeparator !== "." && (u = u.replace(new RegExp(`\\${o.decimalSeparator}`, "g"), ".")), u;
291
+ }
292
+ function c(u, d) {
293
+ return o.precision !== null && o.precision !== void 0 ? u.toFormat(r.value, d) : u.toFormat(d);
294
+ }
295
+ function l(u, d = !0) {
296
+ const a = s(u), g = new I(a, 10);
297
+ let f = g;
298
+ return d && (f = i(g)), f.valueOf() === "0" && !o.showZero || f.isNaN() ? "" : o.formatter ? o.formatter(f.toNumber()) : c(f, t.value);
299
+ }
300
+ return { cleanFormat: s, 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(o, n, e, t, i, r, s, c, l, u) {
303
+ const { format: d } = i, { getRealValue: a, getValidNumberInRange: g } = r;
304
+ function f() {
305
+ const v = new I(t.value || 0);
306
+ return !((o.max || o.max === 0) && !new I(o.max).isNaN() && v.gte(new I(o.max)) && (t.value || t.value === 0));
307
+ }
308
+ function m() {
309
+ const v = new I(t.value || 0);
310
+ return !((o.min || o.min === 0) && !new I(o.min).isNaN() && v.lte(new I(o.min)) && (t.value || t.value === 0));
311
+ }
312
+ function h(v) {
313
+ if (o.readonly || o.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(o.step)).toFixed();
318
+ P = g(P, c, l, u);
319
+ const T = a(P);
320
+ e.value = d(P), t.value !== T && (t.value = T, s(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(o, n, e, t, i, r, s, c, l, u, d) {
338
+ const { cleanFormat: a, format: g } = i, { getRealValue: f, isEmpty: m, getValidNumberInRange: h } = r, { downward: b, upward: C } = s, w = M(() => e.value), V = N(!1);
339
+ function v(x) {
340
+ var z;
341
+ if (x.stopPropagation(), o.readonly || o.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
+ o.nullable || (P = P || 0);
346
+ let T = a(P);
347
+ T = h(T, l, u, d);
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(), !(o.readonly || o.disabled) && (V.value = !0, e.value = m(t.value) || !o.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
+ o.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 X(o, 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: s,
371
+ onInput: c,
372
+ onKeyDown: l,
373
+ textBoxValue: u
374
+ } = e, d = M(() => o.disabled || o.readonly || !o.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": o.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: u.value,
388
+ disabled: o.disabled,
389
+ readonly: o.readonly || !o.editable,
390
+ placeholder: d.value,
391
+ onBlur: r,
392
+ onChange: f,
393
+ onFocus: s,
394
+ onInput: c,
395
+ onKeydown: l
269
396
  }, null);
270
397
  }
271
- function U(e, i, r) {
398
+ function q(o, 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: s
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
+ })), u = M(() => ({
414
+ cursor: i() ? "pointer" : "not-allowed",
288
415
  "margin-left": 0
289
- })), a = B(() => ({
416
+ })), d = 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: u.value,
425
+ onClick: s,
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: d.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__ */ H({
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(o, n) {
443
+ const e = N(o.beginValue), t = N(""), i = N(o.endValue), r = N(""), s = ee(o), c = te(o, n, s), l = ae(o), u = (F) => {
444
+ n.emit("beginValueChange", F);
445
+ }, d = A(o, n, t, e, c, s, u, e, i, !0), a = O(o, n, t, e, c, s, d, u, e, i, !0), g = q(o, n, d), f = X(o, n, a, !0, l), m = (F) => {
446
+ n.emit("endValueChange", F);
447
+ }, h = A(o, n, r, i, c, s, m, e, i, !1), b = O(o, n, r, i, c, s, h, m, e, i, !1), C = q(o, n, h), w = X(o, n, b, !1, l), {
448
+ getRealValue: V
449
+ } = s, {
450
+ format: v
451
+ } = c, k = M(() => !o.disabled && !o.readonly && o.showButton);
452
+ return J(() => {
453
+ const F = V(o.beginValue, !1), S = V(o.endValue, !1);
454
+ t.value = v(F, !1), r.value = v(S, !1);
455
+ }), G(() => [o.beginValue], ([F]) => {
456
+ if (!a.isTextBoxFocused.value) {
457
+ const S = V(F, !1);
458
+ e.value = S, t.value = v(S, !1);
332
459
  }
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);
460
+ }), G(() => [o.endValue], ([F]) => {
461
+ if (!b.isTextBoxFocused.value) {
462
+ const S = V(F, !1);
463
+ i.value = S, r.value = v(S, !1);
337
464
  }
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", {
465
+ }), G(() => [o.precision, o.useThousands, o.prefix, o.suffix, o.showZero], () => {
466
+ t.value = v(e.value), r.value = v(i.value);
467
+ }), () => E("div", {
341
468
  class: "input-group number-range f-cmp-number-spinner"
342
- }, [S("div", {
469
+ }, [E("div", {
343
470
  class: "form-control input-container"
344
- }, [S("div", {
471
+ }, [E("div", {
345
472
  class: "sub-input-group"
346
- }, [o(), j.value && b()]), S("span", {
473
+ }, [f(), k.value && g()]), E("span", {
347
474
  class: "spliter"
348
- }, [z("~")]), S("div", {
475
+ }, [Q("~")]), E("div", {
349
476
  class: "sub-input-group"
350
- }, [F(), j.value && O()])])]);
477
+ }, [w(), k.value && C()])])]);
478
+ }
479
+ });
480
+ function _(o, n, e, t) {
481
+ const {
482
+ onBlurTextBox: i,
483
+ onFocusTextBox: r,
484
+ onInput: s,
485
+ onKeyDown: c,
486
+ textBoxValue: l
487
+ } = e, u = M(() => t ? o.beginPlaceholder : o.endPlaceholder), d = M(() => ({
488
+ "form-control": !0,
489
+ "sub-input": !0
490
+ })), a = M(() => ({
491
+ "text-align": o.textAlign
492
+ }));
493
+ function g(f) {
494
+ f.stopPropagation();
495
+ }
496
+ return () => E("input", {
497
+ class: d.value,
498
+ style: a.value,
499
+ type: "text",
500
+ value: l.value,
501
+ disabled: o.disabled,
502
+ readonly: o.readonly || !o.editable,
503
+ placeholder: u.value,
504
+ onBlur: i,
505
+ onChange: g,
506
+ onFocus: r,
507
+ onInput: s,
508
+ onKeydown: c
509
+ }, null);
510
+ }
511
+ function Fe(o) {
512
+ const { formSchemaUtils: n, formStateMachineUtils: e } = o;
513
+ function t(l, u = "") {
514
+ return {
515
+ path: u + l.code,
516
+ field: l.id,
517
+ fullPath: l.code
518
+ };
519
+ }
520
+ function i(l, u = "") {
521
+ const d = n.getViewModelById(l);
522
+ return d ? d.states.map((a) => t(a, u)) : [];
523
+ }
524
+ function r(l) {
525
+ const u = n.getRootViewModelId(), d = i(l);
526
+ if (l === u)
527
+ return d;
528
+ const a = i(u, "root-component.");
529
+ return [...d, ...a];
530
+ }
531
+ function s(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: s, getStateMachines: c };
538
+ }
539
+ class ie {
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, s) => {
589
+ const c = r.getExpressionRuleValue(n, e || i);
590
+ return c && c.value || "";
591
+ },
592
+ convertTo: (t, i, r, s, c) => {
593
+ var l;
594
+ if (i === "dataPicking" && (r != null && r.target)) {
595
+ const u = `${r.target}_dataPicking`;
596
+ ((l = r.rules) == null ? void 0 : l.some(
597
+ (a) => a.id === u && a.value
598
+ )) ? t.dictPickingExpressionId = u : delete t.dictPickingExpressionId;
599
+ }
600
+ s.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((s) => s.target === n);
610
+ if (!i)
611
+ return "";
612
+ const r = i.rules.find((s) => s.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 s = [];
648
+ (c = i.type) != null && c.fields && (s = this.buildEntityFieldsTreeData(i.type.fields, [...e, i.label])), t.push({
649
+ data: r,
650
+ children: s,
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, u;
659
+ const r = this.createTreeNode(i, e);
660
+ r.type = "entity";
661
+ const s = this.buildEntityFieldsTreeData((l = i.type) == null ? void 0 : l.fields, [...e, i.label]), c = this.buildChildEntityTreeData((u = i.type) == null ? void 0 : u.entities, [...e, i.label]);
662
+ c != null && c.length && (s == null || s.push(...c)), t.push({
663
+ data: r,
664
+ children: s || [],
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), s = this.getEntitiesAndVariables(), c = {
705
+ message: ["validate", "required", "dataPicking"].includes(e) && r ? r.message : "",
706
+ ...s
707
+ };
708
+ return r.messageType != null && (c.messageType = r.messageType), c;
709
+ }
710
+ buildRule(n, e, t, i) {
711
+ const { expression: r, message: s, 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 = s), 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, s = this.buildRule(r, t, i, n.type === "form-group" ? n.id : "");
724
+ let l = this.getExpressionData().find((d) => d.targetType === e && d.target === r);
725
+ const u = (d) => d.value.trim() === "";
726
+ if (l) {
727
+ const d = l.rules.find((a) => a.id === s.id);
728
+ if (d)
729
+ u(s) ? l.rules = l.rules.filter((a) => a.id !== s.id) : (Object.assign(d, s), i === "validate" && n.type === "form-group" && (d.elementId = n.id));
730
+ else {
731
+ if (u(s))
732
+ return null;
733
+ l.rules = l.rules || [], l.rules.push(s);
734
+ }
735
+ } else {
736
+ if (u(s))
737
+ return null;
738
+ l = {
739
+ target: `${r}`,
740
+ rules: [s],
741
+ targetType: e
742
+ };
743
+ }
744
+ return l;
745
+ }
746
+ getExpressionEditorOptions(n, e, t, i) {
747
+ return t.reduce((r, s) => {
748
+ var l, u;
749
+ const c = e === "Field" ? (l = n == null ? void 0 : n.binding) == null ? void 0 : l.field : n.id;
750
+ return r[s] = {
751
+ hide: e === "Field" ? !!((u = n == null ? void 0 : n.binding) != null && u.field) : !1,
752
+ description: "",
753
+ title: this.expressionNames[s],
754
+ type: "string",
755
+ $converter: this.getExpressionConverter(c),
756
+ refreshPanelAfterChanged: !0,
757
+ editor: {
758
+ type: "expression-editor",
759
+ singleExpand: !1,
760
+ dialogTitle: `${this.expressionNames[s]}编辑器`,
761
+ showMessage: s === "validate" || s === "dataPicking" || s === "required",
762
+ showMessageType: s === "dataPicking",
763
+ beforeOpen: () => this.onBeforeOpenExpression(n, s, e),
764
+ onSubmitModal: (d) => {
765
+ const a = this.updateExpression(n, e, d, s);
766
+ if (i) {
767
+ const g = this.buildRule(c, d, s);
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), s = {
778
+ value: r && r.value,
779
+ targetId: i,
780
+ targetType: e,
781
+ expressionType: t
782
+ };
783
+ return r && r.message && (s.message = r.message), s;
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 Ee {
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 s in e)
894
+ r[s] = Object.assign(r[s] || {}, e[s]);
895
+ return {
896
+ ...i,
897
+ properties: { ...r },
898
+ setPropertyRelates(s, c) {
899
+ if (s) {
900
+ switch (s && s.propertyID) {
901
+ case "class":
902
+ case "style": {
903
+ R.value++;
904
+ break;
905
+ }
906
+ }
907
+ t && t(s, 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 = {}, s = "") {
923
+ const { getVariables: c, getControlName: l, getStateMachines: u } = Fe(this.designerHostService), d = 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, d, s || t);
937
+ break;
938
+ case "StateMachine":
939
+ g.stateMachines = u();
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
+ }, s = this.getVisibleProperty(n, e);
979
+ for (const l in t)
980
+ s[l] = Object.assign(s[l] || {}, t[l]);
981
+ const c = this;
982
+ return {
983
+ ...r,
984
+ properties: { ...s },
985
+ setPropertyRelates(l, u) {
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, u);
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((s) => s.id === n), r = ce(t.contents[i]);
1018
+ t.contents.splice(i, 1), t.contents.splice(i, 0, r), de();
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 s = {
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(s.code) || this.formSchemaUtils.getViewModelById("root-viewmodel").states.push(s);
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: s } = e, { targetId: c, targetType: l, expressionType: u, value: d, message: a } = s, 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 === u);
1054
+ if (h)
1055
+ h.value = d, h.message = a;
1056
+ else {
1057
+ const b = { id: r, type: u, value: d, 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, s = this.formSchemaUtils.getExpressions(), c = e.binding ? e.binding.field : e.id, l = s.find((u) => u.target === c);
1073
+ !l || !l.rules || (l.rules = l.rules.filter((u) => u.type !== r));
1074
+ }
1075
+ getExpressionOptions(n, e, t) {
1076
+ return new ie(this.formSchemaUtils).getExpressionOptions(n, e, t);
351
1077
  }
352
- }), Y = L(H);
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
+ }
1091
+ }
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((s) => !r.includes(s.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__ */ ((o) => (o.Form = "Form", o.Variable = "Variable", o))(L || {});
1189
+ class D {
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(o) {
1220
+ let n, e;
1221
+ const t = /* @__PURE__ */ new Map();
1222
+ let i = [];
1223
+ function r(d, a) {
1224
+ const f = ((d == null ? void 0 : d.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 s(d, a, g, f = !1) {
1233
+ let m = !1;
1234
+ if (!d.contents || d.contents.length === 0) {
1235
+ const h = new D();
1236
+ r(d.layout, h), a.push(h);
1237
+ return;
1238
+ }
1239
+ d.contents.forEach((h) => {
1240
+ if (h.type === "fieldset") {
1241
+ g += 1, s(h, a, g, !0), m = !0;
1242
+ return;
1243
+ }
1244
+ if (h.type === "dynamic-form")
1245
+ return;
1246
+ m && (g += 1, m = !1);
1247
+ const b = h.appearance && h.appearance.class, C = new D();
1248
+ b ? r(b, C) : C.isSupportedClass = !1, C.label = h.label || h.id, C.id = h.id, C.group = g, f && (C.fieldSetId = d.id), e === h.id && (n = g), t.set(h.id, h), a.push(C);
1249
+ });
1250
+ }
1251
+ function c(d) {
1252
+ const a = o.getComponentById(d);
1253
+ if (!a || !a.componentType || !a.componentType.startsWith("form"))
1254
+ return { result: !1, message: "只可以在响应式表单组件中调整响应式布局配置" };
1255
+ const g = o.selectNode(a, (f) => f.type === p["response-form"].type);
1256
+ return !g || !g.contents || g.contents.length === 0 ? { result: !1, message: "Form区域内没有控件,请先添加控件" } : { result: !0, message: "", formNode: g };
1257
+ }
1258
+ function l(d, a) {
1259
+ a = a || d.id;
1260
+ const { result: g, message: f, formNode: m } = c(a);
1261
+ if (!g)
1262
+ return { result: g, message: f };
1263
+ e = d.id, i = [], t.clear();
1264
+ const h = m.contents[0].type === p.fieldset.type ? 0 : 1;
1265
+ s(m, i, h);
1266
+ const b = i.find((w) => !w.isSupportedClass);
1267
+ return {
1268
+ defaultState: {
1269
+ defaultGroupNumber: n || 1,
1270
+ model: b ? "customize" : "standard"
1271
+ },
1272
+ importData: i
1273
+ };
1274
+ }
1275
+ function u(d, a) {
1276
+ a = a;
1277
+ const { result: g, formNode: f } = c(a);
1278
+ if (!g)
1279
+ return "";
1280
+ const m = [];
1281
+ return d.forEach((h) => {
1282
+ var w;
1283
+ const b = t.get(h.id), C = b.appearance && b.appearance.class;
1284
+ if (C) {
1285
+ 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);
1286
+ b.appearance.class = P.join(" ");
1287
+ }
1288
+ if (h.fieldSetId) {
1289
+ const V = f.contents.find((k) => k.id === h.fieldSetId), v = m.find((k) => k.id === h.fieldSetId);
1290
+ v ? (w = v.contents) == null || w.push(b) : (m.push(V), V.contents = [b]);
1291
+ } else
1292
+ m.push(b);
1293
+ }), f.contents = m, f.id;
1294
+ }
1295
+ return {
1296
+ checkCanFindFormNode: c,
1297
+ checkCanOpenLayoutEditor: l,
1298
+ changeFormControlsByResponseLayoutConfig: u,
1299
+ getResonseFormLayoutConfig: s
1300
+ };
1301
+ }
1302
+ class Se extends Ee {
1303
+ constructor(e, t) {
1304
+ super(e, t);
1305
+ y(this, "responseLayoutEditorFunction");
1306
+ /** 控件绑定的变量 */
1307
+ y(this, "bindingVarible");
1308
+ y(this, "numberEditorOptions", {
1309
+ type: "number-spinner",
1310
+ useThousands: !1,
1311
+ keyboard: !1,
1312
+ showButton: !1
1313
+ });
1314
+ this.responseLayoutEditorFunction = Ie(this.formSchemaUtils);
1315
+ }
1316
+ getCommonPropertyConfig(e, t, i = "Card") {
1317
+ 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");
1318
+ }
1319
+ getPropertyConfig(e, t) {
1320
+ 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;
1321
+ }
1322
+ getGridFieldEdtiorPropConfig(e, t) {
1323
+ 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;
1324
+ }
1325
+ getBasicProperties(e, t, i = "Card") {
1326
+ var u;
1327
+ const r = this;
1328
+ this.setDesignViewModelField(e);
1329
+ const { canChangeControlType: s, editorTypeList: c } = this.getAvailableEditorType(e), l = {
1330
+ description: "Basic Information",
1331
+ title: "基本信息",
1332
+ properties: {
1333
+ id: {
1334
+ description: "组件标识",
1335
+ title: "标识",
1336
+ type: "string",
1337
+ readonly: !0
1338
+ },
1339
+ type: {
1340
+ description: "编辑器类型",
1341
+ title: "编辑器类型",
1342
+ type: "string",
1343
+ $converter: "/converter/change-editor.converter",
1344
+ parentPropertyID: "editor",
1345
+ editor: {
1346
+ type: "combo-list",
1347
+ textField: "value",
1348
+ valueField: "key",
1349
+ idField: "key",
1350
+ editable: !1,
1351
+ data: c,
1352
+ readonly: !s
1353
+ }
1354
+ },
1355
+ label: {
1356
+ title: "标签",
1357
+ type: "string",
1358
+ $converter: "/converter/form-group-label.converter"
1359
+ },
1360
+ showLabelType: {
1361
+ description: "标签显示方式:1、显示:显示标签 2、占位:保留标签空间,但不显示文本 3、不显示:不显示标签",
1362
+ title: "标签显示",
1363
+ type: "enum",
1364
+ editor: {
1365
+ data: [{ id: "visible", name: "显示" }, { id: "reserve-space", name: "占位" }, { id: "none", name: "不显示" }]
1366
+ },
1367
+ defaultValue: ((u = e.editor) == null ? void 0 : u.type) === "image" ? "none" : "visible"
1368
+ },
1369
+ binding: {
1370
+ description: "绑定的表单字段",
1371
+ title: "绑定",
1372
+ editor: {
1373
+ type: "binding-selector",
1374
+ bindingType: { enable: !1 },
1375
+ editorParams: {
1376
+ componentSchema: e,
1377
+ needSyncToViewModel: !0,
1378
+ viewModelId: this.viewModelId,
1379
+ designerHostService: this.designerHostService,
1380
+ disableOccupiedFields: !0
1381
+ },
1382
+ textField: "bindingField"
1383
+ },
1384
+ refreshPanelAfterChanged: !0,
1385
+ readonly: this.formSchemaUtils.designerMode === "PC_RTC" && !e.isRtcControl
1386
+ }
1387
+ },
1388
+ setPropertyRelates(d, a, g) {
1389
+ if (d)
1390
+ switch (d && d.propertyID) {
1391
+ case "type": {
1392
+ r.changeControlType(e, d, t);
1393
+ break;
1394
+ }
1395
+ case "label": {
1396
+ d.needRefreshControlTree = !0;
1397
+ break;
1398
+ }
1399
+ case "binding": {
1400
+ r.changeBindingField(e, d, g);
1401
+ break;
1402
+ }
1403
+ }
1404
+ }
1405
+ };
1406
+ return i.toLocaleLowerCase() !== "card" && delete l.properties.showLabelType, l;
1407
+ }
1408
+ /**
1409
+ * 校验控件是否支持切换类型
1410
+ * @param control 控件
1411
+ */
1412
+ checkCanChangeControlType(e, t) {
1413
+ if (!e.binding)
1414
+ return !1;
1415
+ if (e.binding.type === "Variable") {
1416
+ if (this.bindingVarible = this.formSchemaUtils.getVariableById(e.binding.field), !this.bindingVarible)
1417
+ return !1;
1418
+ } else if (!this.designViewModelField || this.designViewModelField.$type !== Z.SimpleField)
1419
+ return !1;
1420
+ return !0;
1421
+ }
1422
+ /**
1423
+ * 获取可选的编辑器类型
1424
+ */
1425
+ getAvailableEditorType(e) {
1426
+ var r, s;
1427
+ const t = this.checkCanChangeControlType(e, this.viewModelId);
1428
+ if (!t)
1429
+ return {
1430
+ canChangeControlType: !1,
1431
+ editorTypeList: [{
1432
+ key: e.editor.type,
1433
+ value: ((r = p[e.editor.type]) == null ? void 0 : r.name) || e.editor.type
1434
+ }]
1435
+ };
1436
+ let i = [];
1437
+ return this.designViewModelField && this.designViewModelField.$type === Z.SimpleField ? i = j.getEditorTypesByMDataType(this.designViewModelField.type.name, this.designViewModelField.multiLanguage) : this.bindingVarible && (i = j.getEditorTypesByMDataType(this.bindingVarible.type, !!((s = this.designViewModelField) != null && s.multiLanguage))), { canChangeControlType: t, editorTypeList: i };
1438
+ }
1439
+ changeBindingField(e, t, i) {
1440
+ t.needRefreshEntityTree = !0;
1441
+ }
1442
+ getAppearanceProperties(e, t) {
1443
+ const i = this;
1444
+ return {
1445
+ title: "外观",
1446
+ description: "Appearance",
1447
+ properties: {
1448
+ class: {
1449
+ title: "class样式",
1450
+ type: "string",
1451
+ description: "组件的CSS样式",
1452
+ $converter: "/converter/appearance.converter",
1453
+ parentPropertyID: "appearance"
1454
+ },
1455
+ style: {
1456
+ title: "style样式",
1457
+ type: "string",
1458
+ description: "组件的内联样式",
1459
+ $converter: "/converter/appearance.converter",
1460
+ parentPropertyID: "appearance"
1461
+ },
1462
+ fill: {
1463
+ title: "填充宽度",
1464
+ description: "启用后,控件占满父容器宽度",
1465
+ type: "boolean",
1466
+ parentPropertyID: "appearance"
1467
+ },
1468
+ responseLayout: {
1469
+ description: "响应式列宽",
1470
+ title: "响应式列宽",
1471
+ type: "boolean",
1472
+ visible: !0,
1473
+ // 这个属性,标记当属性变更得时候触发重新更新属性
1474
+ refreshPanelAfterChanged: !0,
1475
+ editor: {
1476
+ type: "response-layout-editor-setting",
1477
+ beforeOpen: () => i.responseLayoutEditorFunction.checkCanOpenLayoutEditor(e, i.componentId)
1478
+ }
1479
+ }
1480
+ },
1481
+ setPropertyRelates(r, s) {
1482
+ if (r)
1483
+ switch (r && r.propertyID) {
1484
+ case "responseLayout":
1485
+ i.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(r.propertyValue, i.componentId || e.id), i.updateUnifiedLayoutAfterResponseLayoutChanged(i.componentId), i.updateElementByParentContainer(e.id, t), delete e.responseLayout;
1486
+ break;
1487
+ case "class":
1488
+ i.updateUnifiedLayoutAfterControlChanged(r.propertyValue, e.id, this.componentId), R.value++;
1489
+ break;
1490
+ case "style": {
1491
+ R.value++;
1492
+ break;
1493
+ }
1494
+ }
1495
+ }
1496
+ };
1497
+ }
1498
+ getEditorProperties(e) {
1499
+ return this.getComponentConfig(e);
1500
+ }
1501
+ /**
1502
+ * 卡片控件:切换控件类型后事件
1503
+ * @param propertyData 控件DOM属性
1504
+ * @param newControlType 新控件类型
1505
+ */
1506
+ changeControlType(e, t, i) {
1507
+ const r = t.propertyValue, s = i && i.parent && i.parent.schema;
1508
+ if (!s)
1509
+ return;
1510
+ const c = s.contents.findIndex((d) => d.id === e.id);
1511
+ if (c === -1)
1512
+ return;
1513
+ const l = s.contents[c];
1514
+ let u;
1515
+ if (this.designViewModelField) {
1516
+ const g = this.formSchemaUtils.getViewModelById(this.viewModelId).fields.find((m) => m.id === this.designViewModelField.id).fieldSchema || {};
1517
+ g.editor || (g.editor = {}), g.editor.$type = r, this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, g, !1), u = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, r);
1518
+ }
1519
+ u || (u = this.controlCreatorUtils.createFormGroupWithoutField(r)), Object.assign(u, {
1520
+ id: l.id,
1521
+ appearance: l.appearance,
1522
+ size: l.size,
1523
+ label: l.label,
1524
+ binding: l.binding
1525
+ }), Object.prototype.hasOwnProperty.call(l, "visible") && Object.assign(u, { visible: l.visible }), l.editor && ["readonly", "required", "placeholder"].map((d) => {
1526
+ Object.prototype.hasOwnProperty.call(l.editor, d) && (u.editor[d] = l.editor[d]);
1527
+ }), i != null && i.updateContextSchema ? i.updateContextSchema(u) : (i.schema = Object.assign(l, u), Object.assign(e, u)), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
1528
+ (d) => d.classList.remove("dgComponentSelected")
1529
+ ), Array.from(document.getElementsByClassName("dgComponentFocused")).forEach(
1530
+ (d) => d.classList.remove("dgComponentFocused")
1531
+ ), R.value++, se(() => {
1532
+ this.getFormDesignerInstance().reloadPropertyPanel();
1533
+ });
1534
+ }
1535
+ getComponentConfig(e, t = {}, i = {}, r) {
1536
+ var g, f;
1537
+ const s = Object.assign({
1538
+ description: "编辑器",
1539
+ title: "编辑器",
1540
+ type: "input-group",
1541
+ $converter: "/converter/property-editor.converter",
1542
+ parentPropertyID: "editor"
1543
+ }, t), c = (g = e.binding) != null && g.field ? [] : ["Const", "Variable", "StateMachine"], l = this.getPropertyEditorParams(e, c, "readonly"), u = this.getPropertyEditorParams(e, c, "required"), d = {
1544
+ readonly: {
1545
+ description: "",
1546
+ title: "只读",
1547
+ editor: l
1548
+ },
1549
+ required: {
1550
+ description: "",
1551
+ title: "必填",
1552
+ type: "boolean",
1553
+ editor: u,
1554
+ visible: !!((f = e.binding) != null && f.field)
1555
+ },
1556
+ placeholder: {
1557
+ description: "当控件没有值时在输入框中显示的文本",
1558
+ title: "提示文本",
1559
+ type: "string"
1560
+ }
1561
+ };
1562
+ for (const m in i)
1563
+ d[m] = Object.assign(d[m] || {}, i[m]);
1564
+ const a = this;
1565
+ return {
1566
+ ...s,
1567
+ properties: { ...d },
1568
+ setPropertyRelates(m, h) {
1569
+ if (m) {
1570
+ switch (m.propertyID) {
1571
+ case "readonly":
1572
+ case "required":
1573
+ a.afterMutilEditorChanged(e, m);
1574
+ break;
1575
+ }
1576
+ r && r.bind(a)(m, e, h);
1577
+ }
1578
+ }
1579
+ };
1580
+ }
1581
+ /**
1582
+ * 修改某一输入控件的样式后更新Form的统一布局配置
1583
+ * @param controlClass 控件样式
1584
+ * @param controlId 控件Id
1585
+ * @param componentId 控件所在组件id
1586
+ */
1587
+ updateUnifiedLayoutAfterControlChanged(e, t, i) {
1588
+ const r = e.split(" ");
1589
+ let s = 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)), u = r.find((a) => /^col-el-([1-9]|10|11|12)$/.test(a));
1590
+ s = s || "col-12", c = c || "col-md-" + s.replace("col-", ""), l = l || "col-xl-" + c.replace("col-md-", ""), u = u || "col-el-" + l.replace("col-xl-", "");
1591
+ const d = {
1592
+ id: t,
1593
+ columnInSM: parseInt(s.replace("col-", ""), 10),
1594
+ columnInMD: parseInt(c.replace("col-md-", ""), 10),
1595
+ columnInLG: parseInt(l.replace("col-xl-", ""), 10),
1596
+ columnInEL: parseInt(u.replace("col-el-", ""), 10)
1597
+ };
1598
+ this.updateUnifiedLayoutAfterResponseLayoutChanged(i, d);
1599
+ }
1600
+ /**
1601
+ * 修改控件布局配置后更新Form统一布局配置
1602
+ * @param componentId 组件Id
1603
+ * @param controlLayoutConfig 某单独变动的控件配置项,FormResponseLayoutContext类型
1604
+ */
1605
+ updateUnifiedLayoutAfterResponseLayoutChanged(e, t) {
1606
+ const { formNode: i } = this.responseLayoutEditorFunction.checkCanFindFormNode(e);
1607
+ if (!i || !i.unifiedLayout)
1608
+ return;
1609
+ const r = [];
1610
+ if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(i, r, 1), t) {
1611
+ const m = r.find((h) => h.id === t.id);
1612
+ Object.assign(m || {}, t);
1613
+ }
1614
+ const s = r.map((m) => m.columnInSM), c = r.map((m) => m.columnInMD), l = r.map((m) => m.columnInLG), u = r.map((m) => m.columnInEL), d = this.checkIsUniqueColumn(s) ? s[0] : null, a = this.checkIsUniqueColumn(c) ? c[0] : null, g = this.checkIsUniqueColumn(l) ? l[0] : null, f = this.checkIsUniqueColumn(u) ? u[0] : null;
1615
+ Object.assign(i.unifiedLayout, {
1616
+ uniqueColClassInSM: d,
1617
+ uniqueColClassInMD: a,
1618
+ uniqueColClassInLG: g,
1619
+ uniqueColClassInEL: f
1620
+ });
1621
+ }
1622
+ /**
1623
+ * 校验宽度样式值是否一致
1624
+ */
1625
+ checkIsUniqueColumn(e) {
1626
+ const t = new Set(e);
1627
+ return Array.from(t).length === 1;
1628
+ }
1629
+ /**
1630
+ * 枚举项编辑器
1631
+ * @param propertyData
1632
+ * @param valueField
1633
+ * @param textField
1634
+ * @returns
1635
+ */
1636
+ getItemCollectionEditor(e, t, i) {
1637
+ return t = t || "value", i = i || "name", {
1638
+ editor: {
1639
+ columns: [
1640
+ { field: t, title: "值", dataType: "string" },
1641
+ { field: i, title: "名称", dataType: "string" }
1642
+ // { field: 'disabled', title: '禁用', dataType: 'boolean', editor: { type: 'switch' } },
1643
+ ],
1644
+ type: "item-collection-editor",
1645
+ valueField: t,
1646
+ nameField: i,
1647
+ requiredFields: [t, i],
1648
+ uniqueFields: [t, i],
1649
+ readonly: this.checkEnumDataReadonly(e)
1650
+ }
1651
+ };
1652
+ }
1653
+ /**
1654
+ * 判断枚举数据是否只读
1655
+ * 1、没有绑定信息或者绑定变量,可以新增、删除、修改
1656
+ * 2、绑定类型为字段,且字段为枚举字段,则不可新增、删除、修改枚举值。只能从be修改然后同步到表单上。
1657
+ * @param propertyData 下拉框控件属性值
1658
+ */
1659
+ checkEnumDataReadonly(e) {
1660
+ return !e.binding || e.binding.type !== "Form" ? !1 : !!(this.designViewModelField && this.designViewModelField.type && this.designViewModelField.type.$type === pe.EnumType);
1661
+ }
1662
+ /**
1663
+ * 将字段值变化前事件、变化后事件追加到交互面板
1664
+ * 注意:因为绑定字段值变化后事件与下拉框的值变化事件(valueChanged)重名,所以这里将事件label都重命名下
1665
+ */
1666
+ appendFieldValueChangeEvents(e, t) {
1667
+ 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");
1668
+ }
1669
+ getControlMethodType(e) {
1670
+ if (!e.binding)
1671
+ return e.type;
1672
+ switch (e.binding.type) {
1673
+ case L.Form:
1674
+ return e.binding.path || e.type;
1675
+ case L.Variable:
1676
+ return e.binding.fullPath || e.type;
1677
+ }
1678
+ return e.type;
1679
+ }
1680
+ /**
1681
+ * 组装输入类控件的交互面板:包含标签超链、绑定字段值变化前后事件等。
1682
+ * @param propertyData 属性值
1683
+ * @param viewModelId 视图模型id
1684
+ * @param showPosition 面板展示位置
1685
+ * @param customEvent 输入控件特有的事件配置
1686
+ */
1687
+ getEventPropertyConfig(e, t = "card", i, r) {
1688
+ const s = this;
1689
+ let c = [];
1690
+ if (i && (c = c.concat(i)), c.length === 0)
1691
+ return {
1692
+ title: "事件",
1693
+ hideTitle: !0,
1694
+ properties: {},
1695
+ tabId: "commands",
1696
+ tabName: "交互",
1697
+ hide: !0
1698
+ };
1699
+ this.appendFieldValueChangeEvents(e, c);
1700
+ const l = s.eventsEditorUtils.formProperties(e, s.viewModelId, c);
1701
+ return {
1702
+ title: "事件",
1703
+ hideTitle: !0,
1704
+ properties: s.createBaseEventProperty(l),
1705
+ tabId: "commands",
1706
+ tabName: "交互",
1707
+ setPropertyRelates(a, g) {
1708
+ const f = a.propertyValue;
1709
+ delete e[s.viewModelId], f && (f.setPropertyRelates = this.setPropertyRelates, f.controlInfo = { type: s.getControlMethodType(e), name: e.title }, s.eventsEditorUtils.saveRelatedParameters(e, s.viewModelId, f.events, f)), r && r(a, g, f);
1710
+ const m = s.designViewModelUtils.getDgViewModel(s.viewModelId);
1711
+ m && s.designViewModelField && m.changeField(s.designViewModelField.id, { valueChanging: e.fieldValueChanging, valueChanged: e.fieldValueChanged });
1712
+ }
1713
+ };
1714
+ }
1715
+ getExpressionConfig(e, t, i = ["compute", "dependency", "validate"], r) {
1716
+ return new ie(this.formSchemaUtils).getExpressionConfig(
1717
+ e,
1718
+ t,
1719
+ i,
1720
+ r
1721
+ );
1722
+ }
1723
+ getBindingDataType() {
1724
+ return this.designViewModelField ? this.designViewModelField.type.name === "Number" ? "number" : this.designViewModelField.type.name === "String" ? "string" : "boolean" : "boolean";
1725
+ }
1726
+ getEditor() {
1727
+ return this.getBindingDataType() === "number" ? this.numberEditorOptions : {};
1728
+ }
1729
+ updatePropertyValue(e, t, i) {
1730
+ var r;
1731
+ e.editor[t] !== i ? e.editor[t] = i : (r = this.getFormDesignerInstance()) == null || r.reloadPropertyPanel();
1732
+ }
1733
+ setBooleanValue(e, t, i) {
1734
+ let r = i;
1735
+ this.getBindingDataType() === "string" && (r = (r || "").trim() || (t === "trueValue" ? "true" : "false"));
1736
+ const c = t === "trueValue" ? "falseValue" : "trueValue";
1737
+ e.editor[c] === r && (r = r + 1), this.updatePropertyValue(e, t, r);
1738
+ }
1739
+ getBooleanValueConverter() {
1740
+ return {
1741
+ convertFrom: (e, t) => e.editor[t],
1742
+ convertTo: (e, t, i) => {
1743
+ this.setBooleanValue(e, t, i);
1744
+ }
1745
+ };
1746
+ }
1747
+ }
1748
+ class Me extends Se {
1749
+ constructor(n, e) {
1750
+ super(n, e);
1751
+ }
1752
+ getEditorProperties(n) {
1753
+ return this.getComponentConfig(n, { type: "number-range" }, {
1754
+ editable: {
1755
+ description: "",
1756
+ title: "允许编辑",
1757
+ type: "boolean"
1758
+ }
1759
+ });
1760
+ }
1761
+ }
1762
+ function ke(o, n) {
1763
+ const e = o.schema;
1764
+ function t(i, r) {
1765
+ return new Me(i, n).getPropertyConfig(e, r);
1766
+ }
1767
+ return { getPropsConfig: t };
1768
+ }
1769
+ const Pe = /* @__PURE__ */ H({
1770
+ name: "FNumberRangeDesign",
1771
+ props: W,
1772
+ emits: ["valueChange", "blur", "focus", "click", "input", "beginValueChange", "endValueChange"],
1773
+ setup(o, n) {
1774
+ const e = N(o.beginValue), t = N(""), i = N(o.endValue), r = N(""), s = ee(o), c = te(o, n, s), l = (x) => {
1775
+ n.emit("beginValueChange", x);
1776
+ }, u = N(), d = K("designer-host-service"), a = K("design-item-context"), g = ke(a, d), f = ue(u, a, g);
1777
+ J(() => {
1778
+ u.value.componentInstance = f;
1779
+ }), n.expose(f.value);
1780
+ const m = A(o, n, t, e, c, s, l, e, i, !0), h = O(o, n, t, e, c, s, m, l, e, i, !0), b = q(o, n, m), C = _(o, n, h, !0), w = (x) => {
1781
+ n.emit("endValueChange", x);
1782
+ }, V = A(o, n, r, i, c, s, w, e, i, !1), v = O(o, n, r, i, c, s, V, w, e, i, !1), k = q(o, n, V), F = _(o, n, v, !1), S = M(() => o.showButton);
1783
+ return () => E("div", {
1784
+ ref: u,
1785
+ class: "input-group number-range f-cmp-number-spinner"
1786
+ }, [E("div", {
1787
+ class: "form-control input-container"
1788
+ }, [E("div", {
1789
+ class: "sub-input-group"
1790
+ }, [C(), S.value && b()]), E("span", {
1791
+ class: "spliter"
1792
+ }, [Q("~")]), E("div", {
1793
+ class: "sub-input-group"
1794
+ }, [F(), S.value && k()])])]);
1795
+ }
1796
+ });
1797
+ $.register = (o, n, e, t) => {
1798
+ o["number-range"] = $, n["number-range"] = Y;
1799
+ };
1800
+ $.registerDesigner = (o, n, e) => {
1801
+ o["number-range"] = Pe, n["number-range"] = Y;
1802
+ };
1803
+ const qe = ge($);
353
1804
  export {
354
- H as FNumberRange,
355
- Y as default,
356
- M as numberRangeProps
1805
+ $ as FNumberRange,
1806
+ qe as default,
1807
+ W as numberRangeProps,
1808
+ Y as propsResolver
357
1809
  };