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

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 (420) hide show
  1. package/components/accordion/index.esm.js +312 -61
  2. package/components/accordion/index.umd.cjs +1 -1
  3. package/components/avatar/index.esm.js +1482 -56
  4. package/components/avatar/index.umd.cjs +1 -1
  5. package/components/binding-selector/index.esm.js +752 -8
  6. package/components/binding-selector/index.umd.cjs +1 -1
  7. package/components/button-group/index.esm.js +266 -110
  8. package/components/button-group/index.umd.cjs +1 -1
  9. package/components/calendar/index.esm.js +129 -128
  10. package/components/calendar/index.umd.cjs +2 -2
  11. package/components/code-editor/index.esm.js +237 -169
  12. package/components/code-editor/index.umd.cjs +3 -3
  13. package/components/collection-property-editor/index.esm.js +134 -133
  14. package/components/collection-property-editor/index.umd.cjs +2 -2
  15. package/components/color-picker/index.esm.js +812 -502
  16. package/components/color-picker/index.umd.cjs +1 -1
  17. package/components/combo-list/index.esm.js +323 -291
  18. package/components/combo-list/index.umd.cjs +1 -1
  19. package/components/combo-tree/index.esm.js +355 -174
  20. package/components/combo-tree/index.umd.cjs +1 -1
  21. package/components/comment/index.esm.js +134 -133
  22. package/components/comment/index.umd.cjs +2 -2
  23. package/components/common/index.esm.js +1 -1
  24. package/components/common/index.umd.cjs +1 -1
  25. package/components/component/index.esm.js +3830 -2796
  26. package/components/component/index.umd.cjs +8 -1
  27. package/components/condition/index.esm.js +2482 -492
  28. package/components/condition/index.umd.cjs +8 -1
  29. package/components/data-grid/index.esm.js +431 -406
  30. package/components/data-grid/index.umd.cjs +1 -1
  31. package/components/data-view/index.esm.js +3306 -3165
  32. package/components/data-view/index.umd.cjs +1 -1
  33. package/components/date-picker/index.esm.js +1 -1
  34. package/components/date-picker/index.umd.cjs +1 -1
  35. package/components/designer-canvas/index.esm.js +3094 -2731
  36. package/components/designer-canvas/index.umd.cjs +1 -1
  37. package/components/drawer/index.esm.js +397 -387
  38. package/components/drawer/index.umd.cjs +2 -2
  39. package/components/dropdown/index.esm.js +373 -124
  40. package/components/dropdown/index.umd.cjs +2 -2
  41. package/components/dynamic-form/index.esm.js +592 -1894
  42. package/components/dynamic-form/index.umd.cjs +1 -1
  43. package/components/dynamic-resolver/index.esm.js +250 -248
  44. package/components/dynamic-resolver/index.umd.cjs +2 -2
  45. package/components/dynamic-view/index.esm.js +287 -284
  46. package/components/dynamic-view/index.umd.cjs +1 -1
  47. package/components/event-parameter/index.esm.js +1 -1
  48. package/components/event-parameter/index.umd.cjs +1 -1
  49. package/components/events-editor/index.esm.js +1890 -1473
  50. package/components/events-editor/index.umd.cjs +3 -3
  51. package/components/expression-editor/index.css +1 -1
  52. package/components/expression-editor/index.esm.js +7371 -2
  53. package/components/expression-editor/index.umd.cjs +427 -1
  54. package/components/fieldset/index.esm.js +1 -1
  55. package/components/fieldset/index.umd.cjs +1 -1
  56. package/components/filter-bar/index.esm.js +4 -5
  57. package/components/filter-bar/index.umd.cjs +2 -2
  58. package/components/filter-condition-editor/index.css +1 -1
  59. package/components/filter-condition-editor/index.esm.js +9044 -425
  60. package/components/filter-condition-editor/index.umd.cjs +427 -1
  61. package/components/html-template/index.esm.js +33 -36
  62. package/components/html-template/index.umd.cjs +1 -1
  63. package/components/image/index.esm.js +2 -2
  64. package/components/image/index.umd.cjs +1 -1
  65. package/components/image-cropper/index.esm.js +615 -361
  66. package/components/image-cropper/index.umd.cjs +1 -1
  67. package/components/json-editor/index.esm.js +325 -247
  68. package/components/json-editor/index.umd.cjs +1 -1
  69. package/components/language-textbox/index.esm.js +269 -269
  70. package/components/language-textbox/index.umd.cjs +2 -2
  71. package/components/layout/index.esm.js +549 -163
  72. package/components/layout/index.umd.cjs +1 -1
  73. package/components/list-nav/index.esm.js +837 -39
  74. package/components/list-nav/index.umd.cjs +1 -1
  75. package/components/list-view/index.esm.js +404 -622
  76. package/components/list-view/index.umd.cjs +6 -6
  77. package/components/lookup/index.esm.js +3624 -3625
  78. package/components/lookup/index.umd.cjs +1 -1
  79. package/components/mapping-editor/index.esm.js +1487 -1462
  80. package/components/mapping-editor/index.umd.cjs +1 -1
  81. package/components/menu-lookup/index.esm.js +577 -536
  82. package/components/menu-lookup/index.umd.cjs +6 -6
  83. package/components/nav/index.esm.js +311 -31
  84. package/components/nav/index.umd.cjs +1 -1
  85. package/components/number-range/index.esm.js +1634 -189
  86. package/components/number-range/index.umd.cjs +1 -1
  87. package/components/number-spinner/index.esm.js +82 -82
  88. package/components/number-spinner/index.umd.cjs +1 -1
  89. package/components/order/index.esm.js +1200 -859
  90. package/components/order/index.umd.cjs +6 -6
  91. package/components/page-footer/index.esm.js +331 -48
  92. package/components/page-footer/index.umd.cjs +1 -1
  93. package/components/page-header/index.esm.js +110 -116
  94. package/components/page-header/index.umd.cjs +1 -1
  95. package/components/pagination/index.esm.js +509 -232
  96. package/components/pagination/index.umd.cjs +1 -1
  97. package/components/progress/index.esm.js +353 -148
  98. package/components/progress/index.umd.cjs +3 -3
  99. package/components/property-editor/index.esm.js +157 -153
  100. package/components/property-editor/index.umd.cjs +1 -1
  101. package/components/property-panel/index.esm.js +1825 -871
  102. package/components/property-panel/index.umd.cjs +12 -5
  103. package/components/query-solution/index.css +1 -1
  104. package/components/query-solution/index.esm.js +6075 -3862
  105. package/components/query-solution/index.umd.cjs +13 -6
  106. package/components/response-layout/index.esm.js +1 -1
  107. package/components/response-layout/index.umd.cjs +1 -1
  108. package/components/schema-selector/index.esm.js +2603 -2376
  109. package/components/schema-selector/index.umd.cjs +5 -5
  110. package/components/search-box/index.esm.js +244 -72
  111. package/components/search-box/index.umd.cjs +1 -1
  112. package/components/section/index.esm.js +134 -133
  113. package/components/section/index.umd.cjs +2 -2
  114. package/components/smoke-detector/index.esm.js +179 -8
  115. package/components/smoke-detector/index.umd.cjs +1 -1
  116. package/components/sort-condition-editor/index.css +1 -0
  117. package/components/sort-condition-editor/index.esm.js +9488 -4
  118. package/components/sort-condition-editor/index.umd.cjs +427 -1
  119. package/components/splitter/index.esm.js +1172 -142
  120. package/components/splitter/index.umd.cjs +1 -1
  121. package/components/step/index.esm.js +47 -48
  122. package/components/step/index.umd.cjs +1 -1
  123. package/components/tabs/index.esm.js +490 -419
  124. package/components/tabs/index.umd.cjs +1 -1
  125. package/components/text/index.esm.js +217 -73
  126. package/components/text/index.umd.cjs +1 -1
  127. package/components/textarea/index.esm.js +29 -27
  128. package/components/textarea/index.umd.cjs +2 -2
  129. package/components/transfer/index.esm.js +762 -544
  130. package/components/transfer/index.umd.cjs +5 -5
  131. package/components/tree-grid/index.esm.js +287 -283
  132. package/components/tree-grid/index.umd.cjs +1 -1
  133. package/components/tree-view/index.esm.js +326 -157
  134. package/components/tree-view/index.umd.cjs +1 -1
  135. package/components/uploader/index.esm.js +1125 -634
  136. package/components/uploader/index.umd.cjs +2 -2
  137. package/components/verify-detail/index.esm.js +359 -106
  138. package/components/verify-detail/index.umd.cjs +1 -1
  139. package/components/video/index.esm.js +222 -89
  140. package/components/video/index.umd.cjs +1 -1
  141. package/components/weather/index.esm.js +290 -199
  142. package/components/weather/index.umd.cjs +1 -1
  143. package/designer/data-grid/index.esm.js +5798 -4905
  144. package/designer/data-grid/index.umd.cjs +16 -9
  145. package/designer/drawer/index.esm.js +576 -567
  146. package/designer/drawer/index.umd.cjs +2 -2
  147. package/designer/dynamic-form/index.esm.js +1418 -1154
  148. package/designer/dynamic-form/index.umd.cjs +8 -1
  149. package/designer/farris-designer.all.esm.js +11332 -10754
  150. package/designer/farris-designer.all.umd.cjs +17 -17
  151. package/designer/list-view/index.esm.js +647 -647
  152. package/designer/list-view/index.umd.cjs +6 -6
  153. package/designer/modal/index.esm.js +29 -137
  154. package/designer/modal/index.umd.cjs +1 -1
  155. package/designer/radio-group/index.esm.js +2 -3
  156. package/designer/radio-group/index.umd.cjs +1 -1
  157. package/designer/response-toolbar/index.esm.js +1 -1
  158. package/designer/response-toolbar/index.umd.cjs +1 -1
  159. package/designer/section/index.esm.js +1 -6
  160. package/designer/section/index.umd.cjs +1 -1
  161. package/designer/tabs/index.esm.js +2848 -2556
  162. package/designer/tabs/index.umd.cjs +2 -2
  163. package/designer/time-picker/index.esm.js +2 -2
  164. package/designer/time-picker/index.umd.cjs +1 -1
  165. package/designer/tree-grid/index.esm.js +826 -465
  166. package/designer/tree-grid/index.umd.cjs +1 -1
  167. package/farris.all.esm.js +75302 -73138
  168. package/farris.all.umd.cjs +94 -94
  169. package/index.css +1 -1
  170. package/package.json +1 -1
  171. package/types/accordion/src/accordion.props.d.ts +1 -0
  172. package/types/accordion/src/components/accordion-item.props.d.ts +1 -0
  173. package/types/avatar/src/avatar.props.d.ts +1 -0
  174. package/types/binding-selector/index.d.ts +54 -0
  175. package/types/binding-selector/src/binding-selector.props.d.ts +1 -0
  176. package/types/button-group/index.d.ts +0 -15
  177. package/types/button-group/src/button-group.props.d.ts +1 -0
  178. package/types/code-editor/index.d.ts +1 -0
  179. package/types/code-editor/src/code-textbox.component.d.ts +6 -6
  180. package/types/code-editor/src/code-textbox.props.d.ts +2 -0
  181. package/types/color-picker/index.d.ts +15 -0
  182. package/types/color-picker/src/color-picker.props.d.ts +1 -0
  183. package/types/combo-list/src/composition/use-data-source.d.ts +2 -1
  184. package/types/combo-tree/src/combo-tree.props.d.ts +1 -0
  185. package/types/component/index.d.ts +2 -0
  186. package/types/component/src/component.props.d.ts +8 -0
  187. package/types/components.d.ts +7 -0
  188. package/types/condition/index.d.ts +55 -0
  189. package/types/data-grid/index.d.ts +5 -2
  190. package/types/data-grid/src/data-grid.component.d.ts +2 -1
  191. package/types/data-view/components/row/hierarchy-row.component.d.ts +2 -2
  192. package/types/data-view/composition/appearance/use-cell-position.d.ts +1 -1
  193. package/types/data-view/composition/types.d.ts +5 -1
  194. package/types/data-view/composition/visualization/use-virtual-scroll.d.ts +2 -2
  195. package/types/data-view/composition/visualization/use-visual-data-bound.d.ts +3 -2
  196. package/types/data-view/composition/visualization/use-visual-data-row.d.ts +2 -1
  197. package/types/designer-toolbox/index.d.ts +3 -0
  198. package/types/designer-toolbox/src/toolbox.component.d.ts +14 -0
  199. package/types/designer-toolbox/src/toolbox.props.d.ts +29 -0
  200. package/types/designer-toolbox/src/types.d.ts +21 -0
  201. package/types/designer.d.ts +13 -0
  202. package/types/dropdown/index.d.ts +6 -27
  203. package/types/dropdown/src/dropdown.item.component.d.ts +1 -1
  204. package/types/dropdown/src/dropdown.props.d.ts +1 -0
  205. package/types/dynamic-form/designer.d.ts +1 -3
  206. package/types/dynamic-form/index.d.ts +3 -9
  207. package/types/dynamic-form/src/component/dynamic-form-label/dynamic-form-label.component.d.ts +3 -3
  208. package/types/dynamic-resolver/index.d.ts +0 -3
  209. package/types/dynamic-resolver/src/resolver/property-config/property-config-resolver-design.d.ts +1 -1
  210. package/types/dynamic-resolver/src/resolver/property-config/property-config-resolver.d.ts +1 -1
  211. package/types/dynamic-resolver/src/resolver/property-config/use-property-config-resolver.d.ts +2 -2
  212. package/types/dynamic-resolver/src/resolver/schema/schema-resolver-design.d.ts +1 -1
  213. package/types/dynamic-resolver/src/resolver/schema/schema-resolver.d.ts +1 -1
  214. package/types/dynamic-view/src/components/maps.d.ts +104 -92
  215. package/types/{binding-selector/designer.d.ts → expression-editor/index.d.ts} +6 -6
  216. package/types/filter-condition-editor/index.d.ts +9 -0
  217. package/types/filter-condition-editor/src/components/filter-condition-grid.component.d.ts +12 -12
  218. package/types/filter-condition-editor/src/components/sort-editor-grid.component.d.ts +12 -12
  219. package/types/filter-condition-editor/src/filter-condition-editor.props.d.ts +1 -0
  220. package/types/flow-canvas/index.d.ts +3 -0
  221. package/types/flow-canvas/src/components/flow-node-item.component.d.ts +8 -0
  222. package/types/flow-canvas/src/components/flow-node-item.props.d.ts +3 -0
  223. package/types/flow-canvas/src/composition/types.d.ts +42 -0
  224. package/types/flow-canvas/src/composition/use-bezier-curve.d.ts +2 -0
  225. package/types/flow-canvas/src/composition/use-connections.d.ts +2 -0
  226. package/types/flow-canvas/src/composition/use-curve.d.ts +4 -0
  227. package/types/flow-canvas/src/composition/use-drawing-bezier.d.ts +2 -0
  228. package/types/flow-canvas/src/composition/use-drawing.d.ts +4 -0
  229. package/types/flow-canvas/src/flow-canvas.component.d.ts +8 -0
  230. package/types/flow-canvas/src/flow-canvas.props.d.ts +3 -0
  231. package/types/image-cropper/src/image-cropper.props.d.ts +1 -0
  232. package/types/index.d.ts +1 -0
  233. package/types/json-editor/src/json-editor.props.d.ts +1 -0
  234. package/types/layout/index.d.ts +0 -1
  235. package/types/layout/src/components/layout-pane.props.d.ts +1 -0
  236. package/types/layout/src/designer/layout-pane-use-designer-rules.d.ts +2 -0
  237. package/types/layout/src/designer/layout-pane.design.component.d.ts +8 -0
  238. package/types/layout/src/designer/layout-use-designer-rules.d.ts +2 -0
  239. package/types/layout/src/designer/layout.design.component.d.ts +8 -0
  240. package/types/layout/src/layout.props.d.ts +1 -0
  241. package/types/layout/src/schema/schema-mapper.d.ts +2 -0
  242. package/types/layout/src/schema/schema-resolver.d.ts +2 -0
  243. package/types/list-nav/index.d.ts +5 -24
  244. package/types/list-nav/src/designer/use-designer-rules.d.ts +2 -0
  245. package/types/list-nav/src/list-nav.props.d.ts +1 -0
  246. package/types/list-nav/src/property-config/list-nav.property-config.d.ts +8 -0
  247. package/types/list-nav/src/schema/schema-mapper.d.ts +2 -0
  248. package/types/list-nav/src/schema/schema-resolver.d.ts +2 -0
  249. package/types/list-view/index.d.ts +0 -1
  250. package/types/list-view/src/composition/use-draggable.d.ts +1 -1
  251. package/types/lookup/index.d.ts +1 -1
  252. package/types/lookup/src/components/favorite/lookup-favorite.component.d.ts +1 -1
  253. package/types/lookup/src/components/popup-container.component.d.ts +6 -6
  254. package/types/menu-lookup/src/menu-lookup.props.d.ts +1 -0
  255. package/types/modal/designer.d.ts +0 -2
  256. package/types/nav/index.d.ts +20 -24
  257. package/types/nav/src/nav.props.d.ts +1 -0
  258. package/types/number-range/src/number-range.props.d.ts +1 -0
  259. package/types/order/index.d.ts +5 -36
  260. package/types/order/src/designer/order.design.component.d.ts +1 -1
  261. package/types/order/src/order.props.d.ts +1 -0
  262. package/types/page-footer/index.d.ts +2 -0
  263. package/types/page-footer/src/page-footer.props.d.ts +1 -0
  264. package/types/pagination/index.d.ts +0 -15
  265. package/types/pagination/src/pagination.props.d.ts +1 -0
  266. package/types/progress/src/progress.props.d.ts +1 -0
  267. package/types/query-solution/index.d.ts +2 -1
  268. package/types/radio-group/designer.d.ts +1 -2
  269. package/types/search-box/index.d.ts +17 -1
  270. package/types/search-box/src/search-box.props.d.ts +1 -0
  271. package/types/section/designer.d.ts +0 -1
  272. package/types/smoke-detector/index.d.ts +2 -0
  273. package/types/smoke-detector/src/smoke-detector.props.d.ts +1 -0
  274. package/types/sort-condition-editor/index.d.ts +7 -2
  275. package/types/sort-condition-editor/src/sort-condition-editor.props.d.ts +1 -0
  276. package/types/splitter/index.d.ts +0 -1
  277. package/types/splitter/src/components/splitter-pane.props.d.ts +1 -0
  278. package/types/splitter/src/splitter.props.d.ts +1 -0
  279. package/types/tabs/designer.d.ts +0 -1
  280. package/types/tabs/index.d.ts +1 -0
  281. package/types/text/index.d.ts +20 -24
  282. package/types/text/src/text.props.d.ts +1 -0
  283. package/types/transfer/src/transfer.props.d.ts +1 -0
  284. package/types/tree-grid/src/components/data/data-area.component.d.ts +2 -2
  285. package/types/tree-grid/src/tree-grid.props.d.ts +1 -0
  286. package/types/tree-view/src/components/data/tree-area.component.d.ts +1 -1
  287. package/types/tree-view/src/tree-view.props.d.ts +2 -0
  288. package/types/uploader/src/uploader.props.d.ts +1 -0
  289. package/types/verify-detail/index.d.ts +5 -58
  290. package/types/verify-detail/src/designer/verify-detail.design.component.d.ts +8 -8
  291. package/types/verify-detail/src/verify-detail.props.d.ts +1 -0
  292. package/types/video/index.d.ts +20 -24
  293. package/types/video/src/video.props.d.ts +1 -0
  294. package/components/dynamic-form/index.css +0 -1
  295. package/designer/accordion/index.esm.js +0 -257
  296. package/designer/accordion/index.umd.cjs +0 -1
  297. package/designer/avatar/index.esm.js +0 -1460
  298. package/designer/avatar/index.umd.cjs +0 -1
  299. package/designer/binding-selector/index.esm.js +0 -792
  300. package/designer/binding-selector/index.umd.cjs +0 -1
  301. package/designer/button-group/index.esm.js +0 -282
  302. package/designer/button-group/index.umd.cjs +0 -1
  303. package/designer/code-editor/index.esm.js +0 -75
  304. package/designer/code-editor/index.umd.cjs +0 -1
  305. package/designer/color-picker/index.esm.js +0 -1096
  306. package/designer/color-picker/index.umd.cjs +0 -1
  307. package/designer/combo-list/index.esm.js +0 -1095
  308. package/designer/combo-list/index.umd.cjs +0 -1
  309. package/designer/combo-tree/index.esm.js +0 -186
  310. package/designer/combo-tree/index.umd.cjs +0 -1
  311. package/designer/component/index.css +0 -1
  312. package/designer/component/index.esm.js +0 -5002
  313. package/designer/component/index.umd.cjs +0 -1
  314. package/designer/condition/index.esm.js +0 -1899
  315. package/designer/condition/index.umd.cjs +0 -1
  316. package/designer/dropdown/index.esm.js +0 -261
  317. package/designer/dropdown/index.umd.cjs +0 -1
  318. package/designer/expression-editor/index.css +0 -1
  319. package/designer/expression-editor/index.esm.js +0 -7006
  320. package/designer/expression-editor/index.umd.cjs +0 -427
  321. package/designer/filter-condition-editor/index.css +0 -1
  322. package/designer/filter-condition-editor/index.esm.js +0 -4795
  323. package/designer/filter-condition-editor/index.umd.cjs +0 -1
  324. package/designer/html-template/index.esm.js +0 -718
  325. package/designer/html-template/index.umd.cjs +0 -1
  326. package/designer/image-cropper/index.esm.js +0 -765
  327. package/designer/image-cropper/index.umd.cjs +0 -1
  328. package/designer/json-editor/index.esm.js +0 -83
  329. package/designer/json-editor/index.umd.cjs +0 -1
  330. package/designer/language-textbox/index.esm.js +0 -783
  331. package/designer/language-textbox/index.umd.cjs +0 -8
  332. package/designer/layout/index.esm.js +0 -430
  333. package/designer/layout/index.umd.cjs +0 -1
  334. package/designer/list-nav/index.esm.js +0 -802
  335. package/designer/list-nav/index.umd.cjs +0 -1
  336. package/designer/lookup/index.esm.js +0 -2083
  337. package/designer/lookup/index.umd.cjs +0 -1
  338. package/designer/menu-lookup/index.esm.js +0 -46
  339. package/designer/menu-lookup/index.umd.cjs +0 -1
  340. package/designer/nav/index.esm.js +0 -284
  341. package/designer/nav/index.umd.cjs +0 -1
  342. package/designer/number-range/index.esm.js +0 -1616
  343. package/designer/number-range/index.umd.cjs +0 -1
  344. package/designer/order/index.css +0 -1
  345. package/designer/order/index.esm.js +0 -2196
  346. package/designer/order/index.umd.cjs +0 -18
  347. package/designer/page-footer/index.esm.js +0 -290
  348. package/designer/page-footer/index.umd.cjs +0 -1
  349. package/designer/page-header/index.esm.js +0 -1003
  350. package/designer/page-header/index.umd.cjs +0 -1
  351. package/designer/pagination/index.esm.js +0 -591
  352. package/designer/pagination/index.umd.cjs +0 -1
  353. package/designer/progress/index.esm.js +0 -213
  354. package/designer/progress/index.umd.cjs +0 -1
  355. package/designer/search-box/index.esm.js +0 -245
  356. package/designer/search-box/index.umd.cjs +0 -1
  357. package/designer/smoke-detector/index.css +0 -1
  358. package/designer/smoke-detector/index.esm.js +0 -178
  359. package/designer/smoke-detector/index.umd.cjs +0 -1
  360. package/designer/sort-condition-editor/index.esm.js +0 -138
  361. package/designer/sort-condition-editor/index.umd.cjs +0 -1
  362. package/designer/splitter/index.esm.js +0 -1120
  363. package/designer/splitter/index.umd.cjs +0 -1
  364. package/designer/step/index.esm.js +0 -226
  365. package/designer/step/index.umd.cjs +0 -1
  366. package/designer/text/index.esm.js +0 -147
  367. package/designer/text/index.umd.cjs +0 -1
  368. package/designer/transfer/index.esm.js +0 -254
  369. package/designer/transfer/index.umd.cjs +0 -1
  370. package/designer/tree-view/index.esm.js +0 -313
  371. package/designer/tree-view/index.umd.cjs +0 -1
  372. package/designer/uploader/index.esm.js +0 -1190
  373. package/designer/uploader/index.umd.cjs +0 -2
  374. package/designer/verify-detail/index.esm.js +0 -258
  375. package/designer/verify-detail/index.umd.cjs +0 -1
  376. package/designer/video/index.esm.js +0 -136
  377. package/designer/video/index.umd.cjs +0 -1
  378. package/designer/weather/index.css +0 -1
  379. package/designer/weather/index.esm.js +0 -6244
  380. package/designer/weather/index.umd.cjs +0 -14
  381. package/types/accordion/designer.d.ts +0 -44
  382. package/types/avatar/designer.d.ts +0 -29
  383. package/types/button-group/designer.d.ts +0 -29
  384. package/types/code-editor/designer.d.ts +0 -5
  385. package/types/color-picker/designer.d.ts +0 -29
  386. package/types/combo-list/designer.d.ts +0 -29
  387. package/types/combo-list/src/designer/combo-list.design.props.d.ts +0 -6
  388. package/types/combo-tree/designer.d.ts +0 -5
  389. package/types/component/designer.d.ts +0 -35
  390. package/types/condition/designer.d.ts +0 -56
  391. package/types/dropdown/designer.d.ts +0 -6
  392. package/types/dynamic-form/src/composition/use-input-type-resolver.d.ts +0 -11
  393. package/types/expression-editor/designer.d.ts +0 -9
  394. package/types/filter-condition-editor/designer.d.ts +0 -10
  395. package/types/html-template/designer.d.ts +0 -31
  396. package/types/html-template/src/designer/html-template.design.props.d.ts +0 -9
  397. package/types/image-cropper/designer.d.ts +0 -4
  398. package/types/json-editor/designer.d.ts +0 -5
  399. package/types/menu-lookup/designer.d.ts +0 -5
  400. package/types/nav/designer.d.ts +0 -6
  401. package/types/number-range/designer.d.ts +0 -29
  402. package/types/order/designer.d.ts +0 -6
  403. package/types/page-footer/designer.d.ts +0 -6
  404. package/types/page-header/src/designer/page-header.design.props.d.ts +0 -20
  405. package/types/pagination/designer.d.ts +0 -29
  406. package/types/progress/designer.d.ts +0 -29
  407. package/types/search-box/designer.d.ts +0 -52
  408. package/types/smoke-detector/designer.d.ts +0 -6
  409. package/types/sort-condition-editor/designer.d.ts +0 -9
  410. package/types/splitter/designer.d.ts +0 -32
  411. package/types/step/designer.d.ts +0 -6
  412. package/types/text/designer.d.ts +0 -6
  413. package/types/transfer/designer.d.ts +0 -35
  414. package/types/tree-view/designer.d.ts +0 -29
  415. package/types/uploader/designer.d.ts +0 -141
  416. package/types/verify-detail/designer.d.ts +0 -6
  417. package/types/video/designer.d.ts +0 -6
  418. /package/{designer → components}/condition/index.css +0 -0
  419. /package/{designer → components}/uploader/index.css +0 -0
  420. /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,2083 +0,0 @@
1
- var R = Object.defineProperty;
2
- var U = (n, i, e) => i in n ? R(n, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[i] = e;
3
- var h = (n, i, e) => U(n, typeof i != "symbol" ? i + "" : i, e);
4
- import { withInstall as A } from "../../components/common/index.esm.js";
5
- import { defineComponent as z, ref as j, inject as w, computed as I, onMounted as D, createVNode as F } from "vue";
6
- import q from "../button-edit/index.esm.js";
7
- import { useDesignerComponent as W, DgControl as S, canvasChanged as _, refreshCanvas as J } from "../../components/designer-canvas/index.esm.js";
8
- import G, { lookupProps as V } from "../../components/lookup/index.esm.js";
9
- import { InputBaseProperty as Q, ExpressionProperty as M } from "../../components/property-panel/index.esm.js";
10
- import { FieldSelectorRepositoryToken as E } from "../../components/field-selector/index.esm.js";
11
- import { isNil as X, cloneDeep as Y } from "lodash-es";
12
- import { FNotifyService as Z } from "../../components/notify/index.esm.js";
13
- import { resolveAppearance as H, createPropsResolver as O } from "../../components/dynamic-resolver/index.esm.js";
14
- const K = [
15
- { value: "both", text: "同步选择" },
16
- { value: "up", text: "包含上级" },
17
- { value: "down", text: "包含下级" },
18
- { value: "disable", text: "仅选择自身" }
19
- ], ee = "";
20
- function P(n) {
21
- let i = [10, 20, 30, 50, 100];
22
- return n && (typeof n == "string" && (i = n.replaceAll("[", "").replaceAll("]", "").replaceAll(" ", "").split(",")), Array.isArray(n) && (i = n)), i.map((e) => ({ value: parseInt(e, 10) })).sort((e, t) => e.value - t.value);
23
- }
24
- const f = {
25
- convertFrom: (n, i) => {
26
- const e = n.editor ? n.editor : n;
27
- return i === "multiSelect" || i === "enableTitle" ? !!e[i] : i === "separator" ? e[i] || "," : i === "onlySelectLeaf" ? e[i] == null ? !1 : e[i] : i === "loadTreeDataType" ? e[i] || "default" : i === "placeholder" ? X(e[i]) ? "请选择" : e[i] : i === "openType" ? e[i] || "Modal" : e[i];
28
- },
29
- convertTo: (n, i, e) => {
30
- const t = n.editor ? n.editor : n;
31
- if (t[i] = e, i === "multiSelect" && !e && (t.enableCascade = !1), i === "openType") {
32
- if (e === "Popup")
33
- t.showSelections = !1, t.enableCascade = !1;
34
- else if (t.dialog) {
35
- const { width: o } = t.dialog, { displayType: r } = t;
36
- r && r.toUpperCase().indexOf("NAV") > -1 && (!o || o < 520) && (t.dialog.width = 960);
37
- }
38
- }
39
- t.multiSelect && t.openType === "Popup" && (t.editable = !1, t.allowFreeInput = !1);
40
- }
41
- };
42
- function te(n) {
43
- let i = "form_group_" + Date.now();
44
- return n && (i = n.replaceAll("-", "_").replaceAll(".", "_")), "lookup." + i;
45
- }
46
- function ie(n, i) {
47
- const { enablePager: e, pageSize: t, pageList: o } = i;
48
- n.pagination = n.pagination || {}, Object.assign(n.pagination, {
49
- enable: e,
50
- sizeLimits: P(o).map((r) => r.value),
51
- size: t,
52
- showLimits: !0,
53
- showGoto: !1,
54
- mode: "server"
55
- });
56
- }
57
- const L = {
58
- convertFrom: (n, i) => {
59
- var t;
60
- return (t = (n.editor ? n.editor : n).dataSource) == null ? void 0 : t.displayName;
61
- },
62
- convertTo: (n, i, e) => {
63
- if (e && e.length > 0) {
64
- const t = n.editor ? n.editor : n, o = e[0], { name: r, id: s, metadataContent: c, code: a } = o;
65
- t.dataSource || (t.dataSource = {}), t.dataSource.displayName = `${r}(${a})`, t.helpId = s;
66
- const { displayType: d, idField: l, textField: u } = c;
67
- t.displayType = d, t.dataSource.idField = l, t.textField = u, t.dataSource.type = "ViewObject", t.enableEqualSearch = !1;
68
- const { pageInfo: p } = c.dataSource;
69
- ie(t, p);
70
- const { treeInfo: v } = d.toUpperCase() === "NAVTREELIST" ? c.navigation : c.dataSource;
71
- if (v) {
72
- const { onlySelectLeaf: b, loadDataType: g } = v;
73
- t.loadTreeDataType = "default", t.onlySelectLeaf = b ?? !1;
74
- }
75
- if (t.dataSource.uri || (t.dataSource.uri = te(n.id)), t.dialog) {
76
- const { width: b } = t.dialog;
77
- d && d.toUpperCase().indexOf("NAV") > -1 && (!b || b < 520) && (t.dialog.width = 960);
78
- }
79
- }
80
- }
81
- }, oe = {
82
- convertFrom: (n, i) => {
83
- var e;
84
- return (e = n.editor.dataSource) == null ? void 0 : e.idField;
85
- },
86
- convertTo: (n, i, e) => {
87
- if (e && e.length > 0) {
88
- const t = e[0];
89
- n.editor.dataSource.idField = t == null ? void 0 : t.bindingPath;
90
- }
91
- }
92
- }, ne = {
93
- convertFrom: (n, i) => {
94
- var e;
95
- return (e = n.editor) == null ? void 0 : e.textField;
96
- },
97
- convertTo: (n, i, e) => {
98
- if (e && e.length > 0) {
99
- const t = e[0];
100
- n.editor.textField = t == null ? void 0 : t.bindingPath;
101
- }
102
- }
103
- }, re = {
104
- convertFrom: (n, i) => n.editor.displayType ? n.editor.displayType.toUpperCase() : "LIST",
105
- convertTo: (n, i, e) => {
106
- n.editor.displayType = e;
107
- }
108
- }, y = {
109
- convertFrom: (n, i) => {
110
- var r;
111
- let e = n.editor ? n.editor.dialog : n.dialog;
112
- const t = n.editor ? n.editor.openType : n.openType;
113
- if (e || (e = {}), i === "title")
114
- return e[i] || ee;
115
- if (!t || t === "Modal") {
116
- if (i === "width")
117
- return (r = e.displayType) != null && r.toUpperCase().startsWith("NAV") ? e[i] || 960 : e[i] || 590;
118
- if (i === "height")
119
- return e[i] || 620;
120
- if (i === "navigatorWidth")
121
- return e[i] || 320;
122
- } else {
123
- if (i === "width")
124
- return e[i] || 460;
125
- if (i === "height")
126
- return e[i] || 380;
127
- }
128
- if (i === "draggable")
129
- return !0;
130
- if (["showMaxButton", "showCloseButton", "resizeable", "enableEsc", "rememberSize"].includes(i))
131
- return e[i] == null ? !0 : e[i];
132
- },
133
- convertTo: (n, i, e) => {
134
- const t = n.editor ? n.editor : n;
135
- t.dialog = t.dialog || {}, t.dialog[i] = e;
136
- }
137
- }, se = {
138
- convertFrom: (n, i) => {
139
- const e = n.editor ? n.editor : n;
140
- if (e.pagination = e.pagination || {}, i === "enable" || i === "showLimits")
141
- return e.pagination[i] == null ? !1 : e.pagination[i];
142
- if (i === "sizeLimits") {
143
- const t = e.pagination[i];
144
- return P(t);
145
- }
146
- if (i === "size")
147
- return e.pagination[i] || 20;
148
- },
149
- convertTo: (n, i, e) => {
150
- var o;
151
- const t = n.editor ? n.editor.pagination || {} : n;
152
- if (t.pagination = t.pagination || {}, i === "sizeLimits") {
153
- const r = e.map((c) => c.value);
154
- t.pagination[i] = r;
155
- const s = ((o = t.pagination) == null ? void 0 : o.size) ?? 20;
156
- r.includes(s) || (t.pagination.size = r[0]);
157
- return;
158
- }
159
- t.pagination[i] = e;
160
- }
161
- }, ae = [
162
- {
163
- label: "clear",
164
- name: "清空事件"
165
- },
166
- {
167
- label: "dictPicking",
168
- name: "帮助前事件"
169
- },
170
- {
171
- label: "beforeLoadData",
172
- name: "数据加载前事件"
173
- },
174
- {
175
- label: "beforeSelectData",
176
- name: "选择数据确认前事件"
177
- },
178
- {
179
- label: "dictPicked",
180
- name: "帮助后事件"
181
- }
182
- ], le = [
183
- {
184
- label: "dictPicking",
185
- name: "帮助前事件"
186
- },
187
- {
188
- label: "beforeLoadData",
189
- name: "数据加载前事件"
190
- },
191
- {
192
- label: "beforeSelectData",
193
- name: "选择数据确认前事件"
194
- },
195
- {
196
- label: "dictPicked",
197
- name: "帮助后事件"
198
- }
199
- ], de = Symbol("schema_repository_token");
200
- function ce(n, i) {
201
- const e = (t) => t && t.length ? t.map((o) => `${o.name}[${o.bindingPath}]`).join(",") : "";
202
- return {
203
- dataSourceEditor: {
204
- type: "schema-selector",
205
- title: "选择数据源",
206
- editorParams: {
207
- propertyData: n,
208
- formBasicInfo: i.formSchemaUtils.getFormMetadataBasicInfo()
209
- },
210
- viewOptions: i.formSchemaUtils.designerMode === "PC_RTC" ? [
211
- { id: "total", title: "全部", type: "List", dataSource: "Total" }
212
- ] : [
213
- {
214
- id: "recommend",
215
- title: "推荐",
216
- type: "List",
217
- dataSource: "Recommand",
218
- enableGroup: !0,
219
- groupField: "category",
220
- groupFormatter: (t, o) => `${t === "local" ? "本地元数据" : "最近使用"}`
221
- },
222
- { id: "total", title: "全部", type: "List", dataSource: "Total" }
223
- ],
224
- repositoryToken: de
225
- },
226
- dataSourceConverter: L,
227
- defaultConverter: f,
228
- idFieldEditor: {
229
- type: "field-selector",
230
- textField: "bindingPath",
231
- idField: "bindingPath",
232
- disabled: !1,
233
- editorParams: {
234
- propertyData: n,
235
- formBasicInfo: i.formSchemaUtils.getFormMetadataBasicInfo()
236
- },
237
- columns: [
238
- { field: "name", title: "名称" },
239
- { field: "code", title: "编号" },
240
- { field: "bindingPath", title: "绑定字段" }
241
- ],
242
- repositoryToken: E
243
- },
244
- textFieldEditor: {
245
- type: "field-selector",
246
- textField: "bindingPath",
247
- idField: "bindingPath",
248
- editorParams: {
249
- propertyData: n,
250
- formBasicInfo: i.formSchemaUtils.getFormMetadataBasicInfo()
251
- },
252
- columns: [
253
- { field: "name", title: "名称" },
254
- { field: "code", title: "编号" },
255
- { field: "bindingPath", title: "绑定字段" }
256
- ],
257
- repositoryToken: E
258
- },
259
- mappingFieldsEditor: {
260
- type: "mapping-editor",
261
- modalWidth: 800,
262
- modalHeight: 600,
263
- editable: !1,
264
- editorParams: {
265
- propertyData: n,
266
- formBasicInfo: i.formSchemaUtils.getFormMetadataBasicInfo()
267
- },
268
- fromData: {
269
- editable: !0,
270
- formatter: (t, o) => `${o.raw.name} [${o.raw.bindingPath}]`,
271
- idField: "bindingPath",
272
- textField: "name",
273
- valueField: "bindingPath",
274
- searchFields: ["name", "bindingPath"],
275
- repositoryToken: E,
276
- displayFormatter: e
277
- },
278
- toData: {
279
- editable: !1,
280
- idField: "bindingPath",
281
- textField: "name",
282
- valueField: "bindingPath",
283
- searchFields: ["name", "bindingPath"],
284
- dataSource: () => {
285
- const t = i.designViewModelUtils.getAllFields2TreeByVMId(i.viewModelId), o = i.schemaService.getPrimaryField();
286
- return o ? t.filter((r) => r.data.bindingPath !== o) : t;
287
- },
288
- formatter: (t, o) => `${o.raw.name} [${o.raw.bindingPath}]`,
289
- displayFormatter: e
290
- }
291
- }
292
- };
293
- }
294
- function ue(n) {
295
- var r, s;
296
- const i = {
297
- type: "combo-list",
298
- enableClear: !1,
299
- editable: !1
300
- }, e = {
301
- type: "number-spinner",
302
- useThousands: !1
303
- }, t = () => n.displayType ? n.displayType.toUpperCase() : "", o = () => t().startsWith("NAV") ? n.showNavigation === void 0 ? !0 : !!n.showNavigation : !1;
304
- return {
305
- openType: {
306
- description: "窗口展示方式:弹出窗口、下拉面板",
307
- title: "打开方式",
308
- type: "string",
309
- refreshPanelAfterChanged: !0,
310
- $converter: f,
311
- editor: {
312
- ...i,
313
- data: [
314
- { text: "弹出窗口", value: "Modal" },
315
- { text: "下拉面板", value: "Popup" }
316
- ],
317
- valueField: "value",
318
- textField: "text",
319
- idField: "value"
320
- },
321
- visible: !0,
322
- defaultValue: "Modal"
323
- },
324
- title: {
325
- description: "帮助标题",
326
- title: "标题",
327
- type: "string",
328
- visible: n.openType !== "Popup",
329
- $converter: y
330
- },
331
- width: {
332
- description: "窗口宽度,单位:px,最小值:300px",
333
- title: "宽度",
334
- type: "number",
335
- editor: {
336
- ...e,
337
- min: o() ? 520 : 300,
338
- needValid: !0
339
- },
340
- $converter: y
341
- },
342
- height: {
343
- description: "窗口高度,单位:px,最小值:200px",
344
- title: "高度",
345
- type: "number",
346
- editor: {
347
- ...e,
348
- min: 200,
349
- needValid: !0
350
- },
351
- $converter: y
352
- },
353
- showNavigation: {
354
- description: "显示导航栏",
355
- $converter: f,
356
- refreshPanelAfterChanged: !0,
357
- title: "显示导航栏",
358
- type: "boolean",
359
- visible: t().includes("NAV") && n.openType !== "Popup"
360
- },
361
- navigatorWidth: {
362
- description: "导航栏宽度,最小200px, 最大为窗口宽度减去200px",
363
- title: "导航栏宽度",
364
- type: "number",
365
- visible: o() && n.openType !== "Popup",
366
- editor: {
367
- ...e,
368
- min: 200,
369
- max: (((r = n == null ? void 0 : n.dialog) == null ? void 0 : r.width) ?? 960) - 200,
370
- needValid: !0
371
- },
372
- $converter: y
373
- },
374
- resizeable: {
375
- description: "允许鼠标拖拽窗口边缘调整尺寸",
376
- title: "允许调整窗口尺寸",
377
- type: "boolean",
378
- visible: n.openType !== "Popup",
379
- $converter: y
380
- },
381
- rememberSize: {
382
- description: "记录窗口尺寸",
383
- title: "记录窗口尺寸",
384
- type: "boolean",
385
- visible: !!n.enableUserData && (((s = n == null ? void 0 : n.dialog) == null ? void 0 : s.resizeable) ?? !0) && n.openType !== "Popup",
386
- $converter: y
387
- },
388
- enableEsc: {
389
- description: "允许ESC关闭",
390
- title: "允许ESC关闭",
391
- type: "boolean",
392
- visible: n.openType !== "Popup",
393
- $converter: y
394
- },
395
- showMaxButton: {
396
- description: "显示最大化按钮",
397
- title: "显示最大化按钮",
398
- type: "boolean",
399
- visible: n.openType !== "Popup",
400
- $converter: y
401
- },
402
- showCloseButton: {
403
- description: "显示关闭按钮",
404
- title: "显示关闭按钮",
405
- type: "boolean",
406
- visible: n.openType !== "Popup",
407
- $converter: y
408
- }
409
- };
410
- }
411
- function pe(n, i = !0) {
412
- var r, s, c, a;
413
- const e = !((r = n.pagination) != null && r.enable), t = () => n.displayType ? n.displayType.toUpperCase() : "", o = (d, l) => {
414
- const u = t() !== "TREELIST" || d.treeToList;
415
- return l && u ? d.pagination && d.pagination[l] : u;
416
- };
417
- return {
418
- hide: !o(n) || e,
419
- description: "分页配置",
420
- title: "分页",
421
- parentPropertyID: "pagination",
422
- $converter: se,
423
- properties: {
424
- // enable: {
425
- // description: "启用分页",
426
- // title: "启用分页",
427
- // type: "boolean",
428
- // refreshPanelAfterChanged: true,
429
- // $converter: lookupPaginationConverter
430
- // },
431
- showLimits: {
432
- description: "显示每页条数选择器",
433
- title: "显示条数选择器",
434
- type: "boolean",
435
- refreshPanelAfterChanged: i,
436
- visible: o(n)
437
- },
438
- sizeLimits: {
439
- description: "每页可显示条数",
440
- title: "每页显示条数",
441
- type: "array",
442
- refreshPanelAfterChanged: i,
443
- visible: o(n, "showLimits"),
444
- editor: {
445
- columns: [
446
- {
447
- field: "value",
448
- title: "显示条数",
449
- dataType: "number",
450
- editor: {
451
- type: "number-spinner",
452
- useThousands: !1,
453
- min: 10,
454
- max: 1e4
455
- }
456
- }
457
- ],
458
- title: "每页显示条数编辑器",
459
- modalWidth: 400,
460
- modalHeight: 500,
461
- type: "item-collection-editor",
462
- valueField: "value",
463
- nameField: "value",
464
- requiredFields: ["value"],
465
- uniqueFields: ["value"],
466
- modelValue: P((s = n.pagination) == null ? void 0 : s.sizeLimits),
467
- beforeSubmit: ({ notifyService: d, data: l }) => !l || !l.length ? (d == null || d.warning({ message: "每页显示条数不能为空!" }), !1) : new Set(l.map((p) => parseInt(p.value, 10))).size === l.length ? !0 : (d == null || d.warning({ message: "每页显示条数不能重复!" }), !1)
468
- }
469
- },
470
- size: {
471
- description: "默认显示条数",
472
- title: "默认显示条数",
473
- type: "number",
474
- visible: o(n),
475
- editor: {
476
- type: "combo-list",
477
- enableClear: !1,
478
- editable: !1,
479
- data: P((c = n.pagination) == null ? void 0 : c.sizeLimits),
480
- textField: "value",
481
- idField: "value",
482
- valueField: "value",
483
- modelValue: (a = n.pagination) == null ? void 0 : a.size
484
- }
485
- }
486
- }
487
- };
488
- }
489
- class $ extends Q {
490
- constructor() {
491
- super(...arguments);
492
- h(this, "comboListEditor", {
493
- type: "combo-list",
494
- enableClear: !1,
495
- editable: !1
496
- });
497
- h(this, "numberEditor", {
498
- type: "number-spinner",
499
- useThousands: !1
500
- });
501
- h(this, "readonlyEditor", { ...this.comboListEditor, editable: !0 });
502
- h(this, "visibleEditor", { ...this.comboListEditor, editable: !1 });
503
- h(this, "requiredEditor", { ...this.comboListEditor, editable: !1 });
504
- h(this, "freeInputEditor", { ...this.comboListEditor, editable: !1 });
505
- }
506
- getExpressionConfig(e, t) {
507
- const o = ["validate"];
508
- return e.type === "form-group" && o.push("dataPicking"), new M(this.formSchemaUtils).getExpressionConfig(e, "Field", o);
509
- }
510
- getPropertyConfig(e, t, o = "Card") {
511
- var T;
512
- const r = (T = e.binding) != null && T.field ? [] : ["Const", "Variable", "StateMachine"];
513
- this.readonlyEditor = this.getPropertyEditorParams(e, r, "readonly"), this.visibleEditor = this.getPropertyEditorParams(e, r, "visible"), this.requiredEditor = this.getPropertyEditorParams(e, r, "required"), this.freeInputEditor = this.getPropertyEditorParams(e, ["Const", "Variable"], "allowFreeInput");
514
- const s = this.getBasicProperties(e, t, o), c = this.getBehaviorConfig(e), a = this.getAppearanceProperties(e, t), d = this.getLookupConfig(e), l = this.getEventPropConfig(e), u = this.getDialogPropertyConfig(e), p = this.getPageConfig(e.editor), v = this.getTreePropConfig(e.editor), b = this.getSearchConfig(e), g = this.getExpressionConfig(e, "Field"), m = {
515
- basic: s,
516
- appearance: a,
517
- behavior: c,
518
- lookup: d,
519
- treeConfig: v,
520
- dialog: u,
521
- pager: p,
522
- searchConfig: b,
523
- expressions: g
524
- };
525
- return e.type === "form-group" && (m.eventsEditor = l), {
526
- type: "object",
527
- categories: m
528
- };
529
- }
530
- getGridFieldEdtiorPropConfig(e) {
531
- return this.getPropertyConfig(e, null, "Grid").categories;
532
- }
533
- flattenTreeNodes(e) {
534
- return e.reduce((t, o) => {
535
- var r;
536
- return t.push(o), (r = o.children) != null && r.length && t.push(...this.flattenTreeNodes(o.children)), t;
537
- }, []);
538
- }
539
- isSimpleStringField() {
540
- var c;
541
- const e = ((c = this.designViewModelField) == null ? void 0 : c.path) || "";
542
- if (!e || !e.includes("."))
543
- return !0;
544
- const t = e.split("."), o = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
545
- if (!(o != null && o.length))
546
- return !1;
547
- const r = o.find((a) => a.data.code === t[0]);
548
- if (!r)
549
- return !1;
550
- const s = [r, ...this.flattenTreeNodes(r.children)];
551
- return !t.reduce(
552
- (a, d, l) => [...a, l ? `${a[l - 1]}.${d}` : d],
553
- []
554
- ).some(
555
- (a) => {
556
- var d, l, u;
557
- return ((u = (l = (d = s.find((p) => p.data.path === a)) == null ? void 0 : d.data) == null ? void 0 : l.type) == null ? void 0 : u.$type) === "EntityType";
558
- }
559
- );
560
- }
561
- getBehaviorConfig(e) {
562
- return {
563
- description: "Basic Infomation",
564
- title: "行为",
565
- properties: {
566
- visible: {
567
- description: "运行时组件是否可见",
568
- title: "是否可见",
569
- type: "boolean",
570
- editor: this.visibleEditor
571
- }
572
- },
573
- setPropertyRelates: (t, o) => {
574
- this.afterMutilEditorChanged(o, t);
575
- }
576
- };
577
- }
578
- // 绑定字段更新后,处理lookup 的相关属性
579
- changeBindingField(e, t) {
580
- super.changeBindingField(e, t), e.editor.multiSelect = !1;
581
- }
582
- getDisplayType(e) {
583
- return e.displayType ? e.displayType.toUpperCase() : "";
584
- }
585
- mapFieldsDisplayFormatter(e) {
586
- return e && e.length ? e.map((t) => `${t.name}[${t.bindingPath}]`).join(",") : "";
587
- }
588
- getSearchConfig(e) {
589
- var t;
590
- return {
591
- description: "Lookup Search Infomation",
592
- title: "搜索",
593
- parentPropertyID: "editor",
594
- properties: {
595
- enableSearchBar: {
596
- $converter: f,
597
- description: "是否启用搜索栏",
598
- refreshPanelAfterChanged: !0,
599
- title: "启用搜索栏",
600
- type: "boolean",
601
- visible: !1
602
- },
603
- searchAnyField: {
604
- description: "显示所有列",
605
- $converter: f,
606
- title: "允许查询所有列",
607
- type: "boolean",
608
- visible: e.editor.openType !== "Popup" && e.editor.enableSearchBar == null ? !0 : !!e.editor.enableSearchBar
609
- },
610
- enableEqualSearch: {
611
- $converter: f,
612
- description: "是否启用等于搜索",
613
- title: "启用精确搜索",
614
- type: "boolean",
615
- visible: e.editor.openType !== "Popup" && (((t = e.editor) == null ? void 0 : t.enableSearchBar) ?? !0) !== !1 && this.getDisplayType(e.editor) !== "TREELIST"
616
- }
617
- },
618
- hide: e.editor.openType === "Popup"
619
- };
620
- }
621
- getLookupConfig(e) {
622
- var d;
623
- const t = e.editor, o = () => {
624
- const l = this.formSchemaUtils.getFormSchema().module.entity[0].id, u = this.formSchemaUtils.getFormMetadataBasicInfo();
625
- return { propertyData: t, formBasicInfo: u, viewModelId: l, dataSourceId: t.helpId };
626
- }, { dataSourceEditor: r, idFieldEditor: s, textFieldEditor: c, mappingFieldsEditor: a } = ce(t, this);
627
- return {
628
- description: "Basic Infomation",
629
- title: "编辑器",
630
- setPropertyRelates: (l, u) => {
631
- if (l)
632
- switch (l.propertyID) {
633
- case "readonly":
634
- case "required":
635
- this.afterMutilEditorChanged(u, l);
636
- break;
637
- }
638
- },
639
- parentPropertyID: "editor",
640
- properties: {
641
- readonly: {
642
- description: "",
643
- title: "只读",
644
- type: "boolean",
645
- $converter: "/converter/property-editor.converter",
646
- editor: this.readonlyEditor
647
- },
648
- required: {
649
- description: "",
650
- title: "必填",
651
- type: "boolean",
652
- $converter: "/converter/property-editor.converter",
653
- editor: this.requiredEditor,
654
- visible: !!((d = e.binding) != null && d.field)
655
- },
656
- placeholder: {
657
- description: "当控件没有值时在输入框中显示的文本",
658
- title: "提示文本",
659
- type: "string",
660
- $converter: f
661
- },
662
- enableTitle: {
663
- description: "鼠标悬停显示文本内容",
664
- title: "悬停提示",
665
- type: "boolean",
666
- $converter: f,
667
- editor: this.comboListEditor
668
- },
669
- editable: {
670
- description: "",
671
- title: "允许编辑",
672
- type: "boolean",
673
- $converter: f,
674
- refreshPanelAfterChanged: !0,
675
- editor: this.comboListEditor,
676
- visible: !(t.multiSelect && t.openType === "Popup")
677
- },
678
- allowFreeInput: {
679
- description: "",
680
- title: "任意输入",
681
- type: "boolean",
682
- $converter: f,
683
- editor: this.freeInputEditor,
684
- visible: !!t.editable && this.isSimpleStringField()
685
- },
686
- enableClear: {
687
- title: "启用清除按钮",
688
- type: "boolean",
689
- $converter: f
690
- },
691
- dataSource: {
692
- description: "数据源",
693
- title: "数据源",
694
- type: "string",
695
- refreshPanelAfterChanged: !0,
696
- editor: {
697
- ...r,
698
- displayFormatter: (l) => l && l.length ? l.map((u) => `${u.name}(${u.code})`).join(",") : "",
699
- validateFunction: async (l) => this.formSchemaUtils.designerMode !== "PC_RTC" ? !0 : this.checkSameBESource(l, e),
700
- onSubmitModal: (l) => {
701
- if (l) {
702
- delete t.mappingFields;
703
- const u = this.formSchemaUtils.getFormMetadataBasicInfo();
704
- return this.metadataService.getPickMetadata(u.relativePath, l[0].data).then((p) => JSON.parse(p == null ? void 0 : p.metadata.content));
705
- }
706
- }
707
- },
708
- $converter: L
709
- },
710
- filterConditions: {
711
- descriptions: "帮助过滤条件",
712
- title: "过滤条件",
713
- type: "string",
714
- $converter: f,
715
- editor: {
716
- type: "filter-condition-editor",
717
- editable: !1,
718
- displayText: "点击配置",
719
- enableClear: !1,
720
- enableExpression: !0,
721
- editorParams: {
722
- propertyData: t,
723
- formBasicInfo: this.formSchemaUtils.getFormMetadataBasicInfo(),
724
- viewModelId: this.formSchemaUtils.getFormSchema().module.entity[0].id
725
- },
726
- idField: "path",
727
- repositoryToken: E,
728
- beforeOpen: async ({ repository: l, notifyService: u }) => {
729
- var T;
730
- if (!(t == null ? void 0 : t.helpId))
731
- return u == null || u.warning({ message: "请先配置数据源!" }), !1;
732
- const v = o(), g = new M(this.formSchemaUtils).getEntitiesAndVariables();
733
- let m = {};
734
- if (l) {
735
- const x = await l.getData(v), B = await l.getLookupConditions(v);
736
- m = { fieldList: x, conditionList: B };
737
- }
738
- return (T = g.variables) != null && T.forms && (g.variables.forms.items = g.variables.forms.items.filter((x) => x.category === "remote")), { ...m, ...g, isServerSide: !0 };
739
- },
740
- onSubmitModal: async ({ loadingService: l, repository: u, conditions: p, originalConditions: v, FMessageBoxService: b }) => {
741
- if (u)
742
- try {
743
- const g = o(), m = await u.getLookupConditions(g) || [];
744
- return JSON.stringify(m) !== JSON.stringify(v.value) ? (l == null || l.clearAll(), b.question("视图对象中的帮助过滤条件已更改,请点击确定同步过滤数据", "", () => {
745
- p.value = m, v.value = JSON.parse(JSON.stringify(p.value));
746
- }, () => {
747
- }), !1) : (JSON.stringify(p.value) === JSON.stringify(v.value) || await u.saveFilterCondition(p.value, g, this.formSchemaUtils.getFormMetadataBasicInfo()), !0);
748
- } catch {
749
- return b == null || b.error("保存失败", ""), !1;
750
- } finally {
751
- l == null || l.clearAll();
752
- }
753
- }
754
- },
755
- visible: !!t.helpId
756
- },
757
- displayType: {
758
- description: "类型: 树列表、列表、双列表、左树右列表",
759
- title: "展示类型",
760
- type: "string",
761
- $converter: re,
762
- editor: {
763
- type: "combo-list",
764
- editable: !1,
765
- disabled: !0,
766
- data: [
767
- { text: "列表", value: "LIST" },
768
- { text: "树列表", value: "TREELIST" },
769
- { text: "双列表", value: "NAVLIST" },
770
- { text: "左树右列表", value: "NAVTREELIST" }
771
- ],
772
- textField: "text",
773
- idField: "value",
774
- valueField: "value"
775
- }
776
- },
777
- idField: {
778
- description: "数据源标识字段",
779
- title: "标识字段",
780
- type: "string",
781
- editor: {
782
- ...s
783
- },
784
- $converter: oe
785
- },
786
- textField: {
787
- description: "显示文本字段",
788
- title: "文本字段",
789
- type: "string",
790
- $converter: ne,
791
- editor: c
792
- },
793
- mappingFields: {
794
- description: "字段映射",
795
- title: "字段映射",
796
- type: "string",
797
- $converter: f,
798
- editor: {
799
- ...a
800
- }
801
- },
802
- enableToSelect: {
803
- description: "数据加载后是否选中现有值",
804
- $converter: f,
805
- title: "选中已选值",
806
- type: "boolean",
807
- editor: this.comboListEditor
808
- },
809
- multiSelect: {
810
- description: "启用多选",
811
- $converter: f,
812
- title: "启用多选",
813
- type: "boolean",
814
- editor: this.comboListEditor,
815
- refreshPanelAfterChanged: !0,
816
- visible: this.isSimpleStringField()
817
- },
818
- showSelections: {
819
- description: "显示已选记录",
820
- $converter: f,
821
- title: "显示已选记录",
822
- type: "boolean",
823
- visible: !!t.multiSelect && t.openType !== "Popup"
824
- },
825
- separator: {
826
- description: "多选分隔符",
827
- $converter: f,
828
- title: "多选分隔符",
829
- type: "string",
830
- editor: {
831
- type: "combo-list",
832
- editable: !1,
833
- disabled: !1,
834
- data: [
835
- { text: ",", value: "," },
836
- { text: "|", value: "|" },
837
- { text: "#", value: "#" }
838
- ],
839
- textField: "text",
840
- idField: "value",
841
- valueField: "value",
842
- separator: "@"
843
- },
844
- visible: !!t.multiSelect
845
- },
846
- enableSearchBar: {
847
- description: "显示搜索工具条",
848
- $converter: f,
849
- refreshPanelAfterChanged: !0,
850
- title: "启用搜索框",
851
- type: "boolean",
852
- visible: !1
853
- },
854
- enableFavorite: {
855
- description: "启用收藏夹",
856
- $converter: f,
857
- title: "启用收藏夹",
858
- type: "boolean",
859
- visible: t.openType !== "Popup"
860
- },
861
- enableUserData: {
862
- description: "保存界面状态",
863
- $converter: f,
864
- refreshPanelAfterChanged: !0,
865
- title: "保存界面状态",
866
- type: "boolean",
867
- visible: t.openType !== "Popup"
868
- }
869
- }
870
- };
871
- }
872
- showNavigatiorWidth(e) {
873
- return this.getDisplayType(e).startsWith("NAV") && e.openType !== "Popup" ? e.showNavigation === void 0 ? !0 : !!e.showNavigation : !1;
874
- }
875
- getDialogPropertyConfig(e) {
876
- const t = ue(e.editor);
877
- return t.openType.$converter = f, {
878
- description: "帮助窗口尺寸配置",
879
- title: "帮助窗口",
880
- parentPropertyID: "dialog",
881
- $converter: y,
882
- properties: t
883
- };
884
- }
885
- showPagerProperty(e, t) {
886
- const o = this.getDisplayType(e) !== "TREELIST" || e.treeToList;
887
- return t && o ? e.pagination && e.pagination[t] : o;
888
- }
889
- /**
890
- * 获取页配置
891
- * @param editorOptions
892
- * @returns
893
- */
894
- getPageConfig(e) {
895
- return pe(e);
896
- }
897
- showLoadType(e) {
898
- const t = this.getDisplayType(e);
899
- return (t === "TREELIST" || t === "NAVTREELIST") && !e.treeToList && !e.navTreeToList;
900
- }
901
- isTree(e) {
902
- return this.getDisplayType(e) === "TREELIST" && !e.treeToList;
903
- }
904
- getTreePropConfig(e) {
905
- return {
906
- hide: this.getDisplayType(e) !== "TREELIST" && this.getDisplayType(e) !== "NAVTREELIST",
907
- description: "树形数据配置",
908
- title: "树形数据配置",
909
- parentPropertyID: "editor",
910
- properties: {
911
- treeToList: {
912
- description: "以列表的形式展示树结构数据",
913
- $converter: f,
914
- refreshPanelAfterChanged: !0,
915
- title: "以列表形式展示",
916
- type: "boolean",
917
- visible: this.getDisplayType(e) === "TREELIST"
918
- },
919
- navTreeToList: {
920
- description: "以列表的形式展示树结构数据",
921
- $converter: f,
922
- refreshPanelAfterChanged: !0,
923
- title: "以列表形式展示",
924
- type: "boolean",
925
- visible: this.getDisplayType(e) === "NAVTREELIST"
926
- },
927
- loadTreeDataType: {
928
- description: "树形数据加载方式",
929
- $converter: f,
930
- title: "数据加载方式",
931
- type: "string",
932
- editor: {
933
- ...this.comboListEditor,
934
- data: [
935
- { value: "default", text: "默认" },
936
- { value: "all", text: "全部加载" },
937
- { value: "async", text: "分层加载" }
938
- ],
939
- textField: "text",
940
- valueField: "value"
941
- },
942
- visible: this.showLoadType(e)
943
- },
944
- enableFullTree: {
945
- description: "启用构造完整树",
946
- $converter: f,
947
- title: "构造完整树",
948
- type: "boolean",
949
- visible: this.showLoadType(e)
950
- },
951
- onlySelectLeaf: {
952
- description: "仅选择叶子节点",
953
- $converter: f,
954
- title: "仅选择叶子节点",
955
- type: "boolean",
956
- visible: this.isTree(e)
957
- },
958
- enableCascade: {
959
- description: "启用级联选择",
960
- $converter: f,
961
- refreshPanelAfterChanged: !0,
962
- title: "启用级联选择",
963
- type: "boolean",
964
- visible: this.isTree(e) && !!e.multiSelect && e.openType !== "Popup"
965
- },
966
- showCascadeControl: {
967
- description: "是否在界面中显示级联状态",
968
- $converter: f,
969
- title: "显示级联状态",
970
- type: "boolean",
971
- visible: !!e.enableCascade && this.isTree(e)
972
- },
973
- cascadeValue: {
974
- description: "缺省级联选择模式",
975
- $converter: f,
976
- title: "缺省级联选择模式",
977
- type: "string",
978
- visible: !!e.enableCascade && this.isTree(e),
979
- editor: {
980
- ...this.comboListEditor,
981
- data: K,
982
- textField: "text",
983
- valueField: "value"
984
- }
985
- },
986
- expandLevel: {
987
- description: "默认展开层级: 0: 不展开; -1: 全部展开;>0: 展开到指定级数 ",
988
- $converter: f,
989
- title: "默认展开层级",
990
- type: "number",
991
- visible: this.showLoadType(e),
992
- editor: {
993
- ...this.numberEditor,
994
- min: -1,
995
- max: 99,
996
- needValid: !0
997
- }
998
- }
999
- }
1000
- };
1001
- }
1002
- getEventPropConfig(e) {
1003
- const t = this;
1004
- let o = ae;
1005
- e.editor.openType === "Popup" && (o = o.filter((c) => c.label !== "beforeSelectData"));
1006
- const r = t.eventsEditorUtils.formProperties(e, t.viewModelId, o);
1007
- return {
1008
- title: "事件",
1009
- hideTitle: !0,
1010
- properties: t.createBaseEventProperty(r),
1011
- // 这个属性,标记当属性变更得时候触发重新更新属性
1012
- refreshPanelAfterChanged: !0,
1013
- tabId: "commands",
1014
- tabName: "交互",
1015
- setPropertyRelates(c, a) {
1016
- const d = c.propertyValue;
1017
- delete a[t.viewModelId], d && t.eventsEditorUtils.saveRelatedParameters(a, t.viewModelId, d.events, d);
1018
- const l = t.designViewModelUtils.getDgViewModel(t.viewModelId);
1019
- l && t.designViewModelField && l.changeField(t.designViewModelField.id, { valueChanging: a.fieldValueChanging, valueChanged: a.fieldValueChanged });
1020
- }
1021
- };
1022
- }
1023
- /**
1024
- * 运行时定制:校验帮助是否绑定同一be(目前不限制通过vo创建的帮助元数据)
1025
- * @param newHelpDataSource 新选的帮助
1026
- */
1027
- async checkSameBESource(e, t) {
1028
- var o, r, s, c, a;
1029
- if (e && ((o = t == null ? void 0 : t.editor) != null && o.helpId) && !t.isRtcControl) {
1030
- if (e.data.id === t.editor.helpId)
1031
- return !0;
1032
- const d = await this.metadataService.getPickMetadata("", e.data).then((g) => {
1033
- var m;
1034
- if ((m = g == null ? void 0 : g.metadata) != null && m.content)
1035
- return JSON.parse(g.metadata.content);
1036
- }), l = await this.metadataService.getPickMetadata("", { id: t.editor.helpId }).then((g) => {
1037
- var m;
1038
- if ((m = g == null ? void 0 : g.metadata) != null && m.content)
1039
- return JSON.parse(g.metadata.content);
1040
- }), u = (r = d == null ? void 0 : d.dataSource) == null ? void 0 : r.sourceType, p = (s = l.dataSource) == null ? void 0 : s.sourceType, v = (c = d == null ? void 0 : d.dataSource) == null ? void 0 : c.sourceId, b = (a = l == null ? void 0 : l.dataSource) == null ? void 0 : a.sourceId;
1041
- if (u === "BE" && p === "BE" && v !== b)
1042
- return new Z().error({ message: "只允许更换同数据源的帮助元数据", position: "top-center" }), !1;
1043
- }
1044
- return !0;
1045
- }
1046
- }
1047
- function fe(n, i) {
1048
- function e(t, o) {
1049
- const r = n.schema;
1050
- return new $(t, i).getPropertyConfig(r, o);
1051
- }
1052
- return { getPropsConfig: e };
1053
- }
1054
- const C = /* @__PURE__ */ z({
1055
- name: "FLookupDesign",
1056
- props: V,
1057
- emits: [],
1058
- setup(n, i) {
1059
- const e = j(), t = w("design-item-context"), o = w("designer-host-service"), r = fe(t, o), s = W(e, t, r), c = '<i class="f-icon f-icon-lookup"></i>', a = '<i class="f-icon f-icon-arrow-chevron-down"></i>', d = I(() => n.openType === "Popup" ? "Popup" : "Modal"), l = I(() => d.value === "Popup" ? a : c);
1060
- return D(() => {
1061
- e.value.componentInstance = s;
1062
- }), i.expose(s.value), () => F("div", {
1063
- class: "f-lookup-design",
1064
- ref: e
1065
- }, [F(q, {
1066
- ref: e,
1067
- buttonContent: l.value,
1068
- readonly: !0,
1069
- editable: !1,
1070
- placeholder: n.placeholder
1071
- }, null)]);
1072
- }
1073
- });
1074
- function k(n) {
1075
- return typeof n == "string" && n.startsWith("{") && n.endsWith("}") ? (n = n.replace(/'/g, '"'), { mappingFields: JSON.parse(n) }) : { mappingFields: n };
1076
- }
1077
- const ge = /* @__PURE__ */ new Map([
1078
- ["appearance", H],
1079
- ["mappingFields", (n, i, e) => {
1080
- if (i)
1081
- return k(i);
1082
- const { mappingFields: t } = e;
1083
- return k(t);
1084
- }],
1085
- ["uri", (n, i, e) => {
1086
- var t;
1087
- return i ? { uri: i } : { uri: (t = e == null ? void 0 : e.dataSource) == null ? void 0 : t.uri };
1088
- }],
1089
- ["idField", (n, i, e) => {
1090
- var t;
1091
- return i ? { idField: i } : { idField: (t = e == null ? void 0 : e.dataSource) == null ? void 0 : t.idField };
1092
- }]
1093
- ]), he = "https://json-schema.org/draft/2020-12/schema", be = "https://farris-design.gitee.io/lookup.schema.json", me = "lookup", ve = "A Farris Input Component", ye = "object", Te = {
1094
- id: {
1095
- description: "The unique identifier for a combo list",
1096
- type: "string"
1097
- },
1098
- type: {
1099
- description: "The type string of number combo list component",
1100
- type: "string",
1101
- default: "lookup"
1102
- },
1103
- appearance: {
1104
- description: "",
1105
- type: "object",
1106
- properties: {
1107
- class: {
1108
- type: "string"
1109
- },
1110
- style: {
1111
- type: "string"
1112
- }
1113
- },
1114
- default: {}
1115
- },
1116
- binding: {
1117
- description: "",
1118
- type: "object",
1119
- default: {}
1120
- },
1121
- editable: {
1122
- description: "",
1123
- type: "boolean",
1124
- default: !1
1125
- },
1126
- enableLinkLabel: {
1127
- description: "",
1128
- type: "boolean",
1129
- default: !1
1130
- },
1131
- label: {
1132
- description: "",
1133
- type: "string",
1134
- default: "帮助"
1135
- },
1136
- lableWidth: {
1137
- description: "",
1138
- type: "number"
1139
- },
1140
- placeholder: {
1141
- description: "",
1142
- type: "string",
1143
- default: "请选择"
1144
- },
1145
- readonly: {
1146
- description: "",
1147
- type: "boolean",
1148
- default: !1
1149
- },
1150
- required: {
1151
- description: "",
1152
- type: "boolean",
1153
- default: !1
1154
- },
1155
- tabindex: {
1156
- description: "",
1157
- type: "number",
1158
- default: -1
1159
- },
1160
- textAlign: {
1161
- description: "",
1162
- type: "string",
1163
- enum: [
1164
- "left",
1165
- "middle",
1166
- "right"
1167
- ],
1168
- default: "left"
1169
- },
1170
- visible: {
1171
- description: "",
1172
- type: "boolean",
1173
- default: !0
1174
- },
1175
- textField: {
1176
- description: "帮助显示文本字段",
1177
- type: "string",
1178
- default: ""
1179
- },
1180
- mappingFields: {
1181
- description: "帮助字段映射",
1182
- type: "object",
1183
- default: {}
1184
- },
1185
- uri: {
1186
- type: "string",
1187
- default: ""
1188
- },
1189
- dataSource: {
1190
- type: "object",
1191
- default: null
1192
- },
1193
- displayType: {
1194
- type: "string",
1195
- default: "list"
1196
- },
1197
- "onUpdate:dataMapping": {
1198
- type: "object",
1199
- default: null
1200
- },
1201
- onClear: {
1202
- type: "object",
1203
- default: null
1204
- },
1205
- context: {
1206
- type: "object",
1207
- default: null
1208
- },
1209
- enableToSelect: {
1210
- type: "boolean",
1211
- default: !0
1212
- },
1213
- idValue: {
1214
- type: "string",
1215
- default: ""
1216
- },
1217
- multiSelect: {
1218
- type: "boolean",
1219
- default: !1
1220
- },
1221
- separator: {
1222
- type: "string",
1223
- default: ","
1224
- },
1225
- fitColumns: {
1226
- type: "boolean",
1227
- default: !0
1228
- },
1229
- enableFavorite: {
1230
- type: "boolean",
1231
- default: !1
1232
- },
1233
- enableUserData: {
1234
- type: "boolean",
1235
- default: !1
1236
- },
1237
- showSelections: {
1238
- type: "boolean",
1239
- default: !0
1240
- },
1241
- treeToList: {
1242
- type: "boolean",
1243
- default: !1
1244
- },
1245
- navTreeToList: {
1246
- type: "boolean",
1247
- default: !1
1248
- },
1249
- showNavigation: {
1250
- type: "boolean",
1251
- default: !0
1252
- },
1253
- dictPicking: {
1254
- type: "object",
1255
- default: null
1256
- },
1257
- dictPicked: {
1258
- type: "object",
1259
- default: null
1260
- },
1261
- enableSearchBar: {
1262
- type: "boolean",
1263
- default: !0
1264
- },
1265
- searchAnyField: {
1266
- type: "boolean",
1267
- default: !0
1268
- },
1269
- dialog: {
1270
- type: "object",
1271
- default: null
1272
- },
1273
- idField: {
1274
- type: "string",
1275
- default: "id"
1276
- },
1277
- pagination: {
1278
- type: "object",
1279
- default: null
1280
- },
1281
- allowFreeInput: {
1282
- type: "boolean",
1283
- default: !1
1284
- },
1285
- loadTreeDataType: {
1286
- type: "string",
1287
- default: "default"
1288
- },
1289
- onlySelectLeaf: {
1290
- type: "boolean",
1291
- default: !1
1292
- },
1293
- enableFullTree: {
1294
- type: "boolean",
1295
- default: !0
1296
- },
1297
- beforeLoadData: {
1298
- type: "object",
1299
- default: null
1300
- },
1301
- beforeSelectData: {
1302
- type: "object",
1303
- default: null
1304
- },
1305
- enableCascade: {
1306
- type: "boolean",
1307
- default: !1
1308
- },
1309
- showCascadeControl: {
1310
- type: "boolean",
1311
- default: !0
1312
- },
1313
- cascadeItems: {
1314
- type: "object",
1315
- default: {
1316
- both: !0,
1317
- up: !0,
1318
- down: !0,
1319
- disable: !0
1320
- }
1321
- },
1322
- cascadeValue: {
1323
- type: "string",
1324
- default: "both"
1325
- },
1326
- expandLevel: {
1327
- type: "number",
1328
- default: 0
1329
- },
1330
- enableClear: {
1331
- type: "boolean",
1332
- default: !0
1333
- },
1334
- openType: {
1335
- type: "string",
1336
- default: "Modal"
1337
- },
1338
- enableTitle: {
1339
- type: "boolean",
1340
- default: !1
1341
- },
1342
- showIncludeChildNodes: {
1343
- type: "boolean",
1344
- default: !0
1345
- },
1346
- includeChildNodesValue: {
1347
- type: "boolean",
1348
- default: !0
1349
- },
1350
- enableEqualSearch: {
1351
- type: "boolean",
1352
- default: !1
1353
- },
1354
- onClearMapping: {
1355
- type: "string",
1356
- default: ""
1357
- }
1358
- }, Ee = [
1359
- "type"
1360
- ], Pe = [
1361
- "appearance",
1362
- "binding",
1363
- "visible"
1364
- ], Ce = {
1365
- dictPicking: "帮助前事件",
1366
- dictPicked: "帮助后事件",
1367
- beforeSelectData: "数据选择确认前事件",
1368
- beforeLoadData: "数据加载前事件",
1369
- clear: "清空事件"
1370
- }, xe = {
1371
- $schema: he,
1372
- $id: be,
1373
- title: me,
1374
- description: ve,
1375
- type: ye,
1376
- properties: Te,
1377
- required: Ee,
1378
- ignore: Pe,
1379
- events: Ce
1380
- };
1381
- function we(n, i, e) {
1382
- return i;
1383
- }
1384
- function Ie() {
1385
- function n(i, e, t) {
1386
- const o = {};
1387
- return o.dictPicking = (r) => e.call("dictPicking", i, [r, i], t), o.beforeLoadData = (r) => e.call("beforeLoadData", i, [r, i], t), o.beforeSelectData = (r) => e.call("beforeSelectData", i, [r, i], t), o.dictPicked = (r) => e.call("dictPicked", i, [r, i], t), o;
1388
- }
1389
- return {
1390
- resolve: n
1391
- };
1392
- }
1393
- function Fe(n) {
1394
- const { formSchemaUtils: i, formStateMachineUtils: e } = n;
1395
- function t(a, d = "") {
1396
- return {
1397
- path: d + a.code,
1398
- field: a.id,
1399
- fullPath: a.code
1400
- };
1401
- }
1402
- function o(a, d = "") {
1403
- const l = i.getViewModelById(a);
1404
- return l ? l.states.map((u) => t(u, d)) : [];
1405
- }
1406
- function r(a) {
1407
- const d = i.getRootViewModelId(), l = o(a);
1408
- if (a === d)
1409
- return l;
1410
- const u = o(d, "root-component.");
1411
- return [...l, ...u];
1412
- }
1413
- function s(a) {
1414
- return a.binding && a.binding.path || a.id || "";
1415
- }
1416
- function c() {
1417
- return e && e.getRenderStates() || [];
1418
- }
1419
- return { getVariables: r, getControlName: s, getStateMachines: c };
1420
- }
1421
- class Se {
1422
- constructor(i) {
1423
- h(this, "sessionVariables", [
1424
- {
1425
- key: "CurrentSysOrgName",
1426
- name: "当前组织Name",
1427
- description: "当前组织Name"
1428
- },
1429
- // {
1430
- // key: "CurrentSysOrgCode",
1431
- // name: "当前组织Code",
1432
- // description: "当前组织Code"
1433
- // },
1434
- {
1435
- key: "CurrentSysOrgId",
1436
- name: "当前组织Id",
1437
- description: "当前组织Id"
1438
- },
1439
- {
1440
- key: "CurrentUserName",
1441
- name: "当前用户Name",
1442
- description: "当前用户Name"
1443
- },
1444
- {
1445
- key: "CurrentUserCode",
1446
- name: "当前用户Code",
1447
- description: "当前用户Code"
1448
- },
1449
- {
1450
- key: "CurrentUserId",
1451
- name: "当前用户Id",
1452
- description: "当前用户Id"
1453
- },
1454
- {
1455
- key: "CurrentLanguage",
1456
- name: "当前语言编号",
1457
- description: "当前登录的语言编号,例如简体中文返回'zh-CHS',英文返回'en',繁体中文'zh-CHT'"
1458
- }
1459
- ]);
1460
- h(this, "expressionNames", {
1461
- compute: "计算表达式",
1462
- dependency: "依赖表达式",
1463
- validate: "验证表达式",
1464
- dataPicking: "帮助前表达式",
1465
- visible: "可见表达式",
1466
- readonly: "只读表达式",
1467
- required: "必填表达式"
1468
- });
1469
- h(this, "getExpressionConverter", (i, e) => ({
1470
- convertFrom: (t, o, r, s) => {
1471
- const c = r.getExpressionRuleValue(i, e || o);
1472
- return c && c.value || "";
1473
- },
1474
- convertTo: (t, o, r, s, c) => {
1475
- var a;
1476
- if (o === "dataPicking" && (r != null && r.target)) {
1477
- const d = `${r.target}_dataPicking`;
1478
- ((a = r.rules) == null ? void 0 : a.some(
1479
- (u) => u.id === d && u.value
1480
- )) ? t.dictPickingExpressionId = d : delete t.dictPickingExpressionId;
1481
- }
1482
- s.updateExpression(r);
1483
- }
1484
- }));
1485
- this.formSchemaService = i;
1486
- }
1487
- getExpressionRule(i, e) {
1488
- const t = this.formSchemaService.getExpressions();
1489
- if (!t)
1490
- return "";
1491
- const o = t.find((s) => s.target === i);
1492
- if (!o)
1493
- return "";
1494
- const r = o.rules.find((s) => s.type === e);
1495
- return r || "";
1496
- }
1497
- // 获取上下文表单变量
1498
- getContextFormVariables() {
1499
- const { module: i } = this.formSchemaService.getFormSchema();
1500
- if (!i.viewmodels || i.viewmodels.length === 0)
1501
- return [];
1502
- const e = this.formSchemaService.getRootViewModelId(), t = this.formSchemaService.getViewModelById(e);
1503
- if (!t || !t.states || t.states.length === 0)
1504
- return [];
1505
- const o = [];
1506
- return t.states.filter((r) => r.category === "remote").forEach((r) => {
1507
- o.push({
1508
- key: r.code,
1509
- name: r.name,
1510
- description: r.name,
1511
- category: r.category
1512
- });
1513
- }), o;
1514
- }
1515
- createTreeNode(i, e, t = "label") {
1516
- return {
1517
- id: i.id,
1518
- name: i.name,
1519
- bindingPath: i[t],
1520
- parents: e,
1521
- type: "field"
1522
- };
1523
- }
1524
- buildEntityFieldsTreeData(i = null, e) {
1525
- const t = [];
1526
- return i == null || i.forEach((o) => {
1527
- var c;
1528
- const r = this.createTreeNode(o, e);
1529
- let s = [];
1530
- (c = o.type) != null && c.fields && (s = this.buildEntityFieldsTreeData(o.type.fields, [...e, o.label])), t.push({
1531
- data: r,
1532
- children: s,
1533
- expanded: !0
1534
- });
1535
- }), t;
1536
- }
1537
- buildChildEntityTreeData(i = null, e) {
1538
- const t = [];
1539
- return i == null || i.forEach((o) => {
1540
- var a, d;
1541
- const r = this.createTreeNode(o, e);
1542
- r.type = "entity";
1543
- const s = this.buildEntityFieldsTreeData((a = o.type) == null ? void 0 : a.fields, [...e, o.label]), c = this.buildChildEntityTreeData((d = o.type) == null ? void 0 : d.entities, [...e, o.label]);
1544
- c != null && c.length && (s == null || s.push(...c)), t.push({
1545
- data: r,
1546
- children: s || [],
1547
- // 空值回退
1548
- expanded: !0
1549
- });
1550
- }), t;
1551
- }
1552
- getEntitiesTreeData() {
1553
- const i = this.formSchemaService.getSchemaEntities();
1554
- if (!(i != null && i.length))
1555
- return [];
1556
- const e = i[0];
1557
- if (!(e != null && e.type))
1558
- return [];
1559
- const t = this.buildEntityFieldsTreeData(e.type.fields, [e.code]), o = this.buildChildEntityTreeData(e.type.entities, [e.code]);
1560
- return o != null && o.length && (t == null || t.push(...o)), {
1561
- entityCode: e.code,
1562
- fields: [{
1563
- data: this.createTreeNode(e, [], "code"),
1564
- children: t || []
1565
- }]
1566
- };
1567
- }
1568
- getEntitiesAndVariables() {
1569
- return {
1570
- entities: this.getEntitiesTreeData(),
1571
- variables: {
1572
- session: {
1573
- name: "系统变量",
1574
- items: this.sessionVariables,
1575
- visible: !1
1576
- },
1577
- forms: {
1578
- name: "表单变量",
1579
- items: this.getContextFormVariables(),
1580
- visible: !0
1581
- }
1582
- }
1583
- };
1584
- }
1585
- onBeforeOpenExpression(i, e, t) {
1586
- const o = t === "Field" ? i.binding.field : i.id, r = this.getExpressionRule(o, e), s = this.getEntitiesAndVariables(), c = {
1587
- message: ["validate", "required", "dataPicking"].includes(e) && r ? r.message : "",
1588
- ...s
1589
- };
1590
- return r.messageType != null && (c.messageType = r.messageType), c;
1591
- }
1592
- buildRule(i, e, t, o) {
1593
- const { expression: r, message: s, messageType: c } = e, a = {
1594
- id: `${i}_${t}`,
1595
- type: t,
1596
- value: r
1597
- };
1598
- return (t === "validate" || t === "dataPicking" || t === "required") && (a.message = s), t === "dataPicking" && (a.messageType = c), t === "validate" && o && (a.elementId = o), a;
1599
- }
1600
- getExpressionData() {
1601
- const { expressions: i } = this.formSchemaService.getFormSchema().module;
1602
- return i || [];
1603
- }
1604
- updateExpression(i, e, t, o) {
1605
- const r = e === "Field" ? i.binding.field : i.id, s = this.buildRule(r, t, o, i.type === "form-group" ? i.id : "");
1606
- let a = this.getExpressionData().find((l) => l.targetType === e && l.target === r);
1607
- const d = (l) => l.value.trim() === "";
1608
- if (a) {
1609
- const l = a.rules.find((u) => u.id === s.id);
1610
- if (l)
1611
- d(s) ? a.rules = a.rules.filter((u) => u.id !== s.id) : (Object.assign(l, s), o === "validate" && i.type === "form-group" && (l.elementId = i.id));
1612
- else {
1613
- if (d(s))
1614
- return null;
1615
- a.rules = a.rules || [], a.rules.push(s);
1616
- }
1617
- } else {
1618
- if (d(s))
1619
- return null;
1620
- a = {
1621
- target: `${r}`,
1622
- rules: [s],
1623
- targetType: e
1624
- };
1625
- }
1626
- return a;
1627
- }
1628
- getExpressionEditorOptions(i, e, t, o) {
1629
- return t.reduce((r, s) => {
1630
- var a, d;
1631
- const c = e === "Field" ? (a = i == null ? void 0 : i.binding) == null ? void 0 : a.field : i.id;
1632
- return r[s] = {
1633
- hide: e === "Field" ? !!((d = i == null ? void 0 : i.binding) != null && d.field) : !1,
1634
- description: "",
1635
- title: this.expressionNames[s],
1636
- type: "string",
1637
- $converter: this.getExpressionConverter(c),
1638
- refreshPanelAfterChanged: !0,
1639
- editor: {
1640
- type: "expression-editor",
1641
- singleExpand: !1,
1642
- dialogTitle: `${this.expressionNames[s]}编辑器`,
1643
- showMessage: s === "validate" || s === "dataPicking" || s === "required",
1644
- showMessageType: s === "dataPicking",
1645
- beforeOpen: () => this.onBeforeOpenExpression(i, s, e),
1646
- onSubmitModal: (l) => {
1647
- const u = this.updateExpression(i, e, l, s);
1648
- if (o) {
1649
- const p = this.buildRule(c, l, s);
1650
- o(p);
1651
- }
1652
- return u;
1653
- }
1654
- }
1655
- }, r;
1656
- }, {});
1657
- }
1658
- getExpressionInfo(i, e, t) {
1659
- const o = e === "Field" ? i.binding.field : i.id, r = this.getExpressionRule(o, t), s = {
1660
- value: r && r.value,
1661
- targetId: o,
1662
- targetType: e,
1663
- expressionType: t
1664
- };
1665
- return r && r.message && (s.message = r.message), s;
1666
- }
1667
- getExpressionConfig(i, e, t = ["compute", "dependency", "validate"], o) {
1668
- return {
1669
- description: "表达式",
1670
- title: "表达式",
1671
- hide: !i.binding,
1672
- properties: {
1673
- ...this.getExpressionEditorOptions(i, e, t, o)
1674
- }
1675
- };
1676
- }
1677
- getExpressionOptions(i, e, t) {
1678
- const o = this.getExpressionInfo(i, e, t);
1679
- return {
1680
- dialogTitle: `${this.expressionNames[t]}编辑器`,
1681
- singleExpand: !1,
1682
- showMessage: t === "required",
1683
- beforeOpen: () => this.onBeforeOpenExpression(i, t, e),
1684
- expressionInfo: o
1685
- };
1686
- }
1687
- }
1688
- class Me {
1689
- constructor(i, e) {
1690
- h(this, "componentId");
1691
- h(this, "viewModelId");
1692
- h(this, "eventsEditorUtils");
1693
- h(this, "formSchemaUtils");
1694
- h(this, "formMetadataConverter");
1695
- h(this, "designViewModelUtils");
1696
- h(this, "designViewModelField");
1697
- h(this, "controlCreatorUtils");
1698
- h(this, "designerHostService");
1699
- h(this, "designerContext");
1700
- h(this, "schemaService", null);
1701
- h(this, "metadataService", null);
1702
- h(this, "propertyConfig", {
1703
- type: "object",
1704
- categories: {}
1705
- });
1706
- var t;
1707
- this.componentId = i, 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(i)) || "", this.designViewModelUtils = e.designViewModelUtils, this.controlCreatorUtils = e.controlCreatorUtils, this.metadataService = e.metadataService, this.schemaService = e.schemaService, this.designerContext = e.designerContext;
1708
- }
1709
- getFormDesignerInstance() {
1710
- var i, e;
1711
- return (e = (i = this.designerContext) == null ? void 0 : i.instances) == null ? void 0 : e.formDesigner.value;
1712
- }
1713
- getTableInfo() {
1714
- var i;
1715
- return (i = this.schemaService) == null ? void 0 : i.getTableInfoByViewModelId(this.viewModelId);
1716
- }
1717
- setDesignViewModelField(i) {
1718
- var t;
1719
- const e = i.binding && i.binding.type === "Form" && i.binding.field;
1720
- if (e) {
1721
- if (!this.designViewModelField) {
1722
- const o = this.designViewModelUtils.getDgViewModel(this.viewModelId);
1723
- this.designViewModelField = o.fields.find((r) => r.id === e);
1724
- }
1725
- i.updateOn = (t = this.designViewModelField) == null ? void 0 : t.updateOn;
1726
- }
1727
- }
1728
- getBasicPropConfig(i) {
1729
- return {
1730
- description: "Basic Information",
1731
- title: "基本信息",
1732
- properties: {
1733
- id: {
1734
- description: "组件标识",
1735
- title: "标识",
1736
- type: "string",
1737
- readonly: !0
1738
- },
1739
- type: {
1740
- description: "组件类型",
1741
- title: "控件类型",
1742
- type: "select",
1743
- editor: {
1744
- type: "combo-list",
1745
- textField: "name",
1746
- valueField: "value",
1747
- idField: "value",
1748
- editable: !1,
1749
- data: [{ value: i.type, name: S[i.type] && S[i.type].name }]
1750
- }
1751
- }
1752
- }
1753
- };
1754
- }
1755
- getAppearanceConfig(i = null, e = {}, t) {
1756
- const o = {
1757
- title: "外观",
1758
- description: "Appearance"
1759
- }, r = {
1760
- class: {
1761
- title: "class样式",
1762
- type: "string",
1763
- description: "组件的CSS样式",
1764
- $converter: "/converter/appearance.converter",
1765
- parentPropertyID: "appearance"
1766
- },
1767
- style: {
1768
- title: "style样式",
1769
- type: "string",
1770
- description: "组件的样式",
1771
- $converter: "/converter/appearance.converter",
1772
- parentPropertyID: "appearance"
1773
- }
1774
- };
1775
- for (const s in e)
1776
- r[s] = Object.assign(r[s] || {}, e[s]);
1777
- return {
1778
- ...o,
1779
- properties: { ...r },
1780
- setPropertyRelates(s, c) {
1781
- if (s) {
1782
- switch (s && s.propertyID) {
1783
- case "class":
1784
- case "style": {
1785
- _.value++;
1786
- break;
1787
- }
1788
- }
1789
- t && t(s, i, c);
1790
- }
1791
- }
1792
- };
1793
- }
1794
- /**
1795
- *
1796
- * @param propertyData
1797
- * @param propertyTypes
1798
- * @param propertyName
1799
- * @param constInfos
1800
- * @param variableInfos
1801
- * @param expressionType 指定表达式类型,存在属性和表达式类型不一致的情况
1802
- * @returns
1803
- */
1804
- getPropertyEditorParams(i, e = [], t = "visible", o = {}, r = {}, s = "") {
1805
- const { getVariables: c, getControlName: a, getStateMachines: d } = Fe(this.designerHostService), l = this.getRealTargetType(i), u = e && e.length > 0 ? e : ["Const", "Variable", "StateMachine", "Expression"], p = {
1806
- type: "property-editor",
1807
- propertyTypes: u
1808
- };
1809
- return u.map((v) => {
1810
- switch (v) {
1811
- case "Const":
1812
- Object.assign(p, {
1813
- constType: "enum",
1814
- constEnums: [{ id: !0, name: "是" }, { id: !1, name: "否" }]
1815
- }, o);
1816
- break;
1817
- case "Expression":
1818
- p.expressionConfig = this.getExpressionOptions(i, l, s || t);
1819
- break;
1820
- case "StateMachine":
1821
- p.stateMachines = d();
1822
- break;
1823
- case "Variable":
1824
- Object.assign(p, {
1825
- controlName: a(i),
1826
- newVariablePrefix: "is",
1827
- newVariableType: "Boolean",
1828
- variables: c(this.viewModelId),
1829
- parentComponentId: this.componentId === "root-component" ? "" : "root-component",
1830
- onBeforeOpenVariables: (b) => {
1831
- b.value = c(this.viewModelId);
1832
- }
1833
- }, r), this.designerContext.designerMode === "PC_RTC" && (p.newVariablePrefix = "ext_" + p.newVariablePrefix);
1834
- break;
1835
- }
1836
- }), p;
1837
- }
1838
- getVisibleProperty(i, e = "") {
1839
- var r;
1840
- let t = ["Const", "Variable", "StateMachine", "Expression"];
1841
- return e === "gridFieldEditor" ? t = ["Const", "Expression"] : e === "form-group" && !((r = i.binding) != null && r.field) && (t = ["Const", "Variable", "StateMachine"]), {
1842
- visible: {
1843
- title: "是否可见",
1844
- type: "boolean",
1845
- description: "运行时组件是否可见",
1846
- editor: this.getPropertyEditorParams(i, t, "visible")
1847
- }
1848
- };
1849
- }
1850
- /**
1851
- * 获取行为
1852
- * @param propertyData
1853
- * @param viewModelId
1854
- * @returns
1855
- */
1856
- getBehaviorConfig(i, e = "", t = {}, o) {
1857
- const r = {
1858
- title: "行为",
1859
- description: ""
1860
- }, s = this.getVisibleProperty(i, e);
1861
- for (const a in t)
1862
- s[a] = Object.assign(s[a] || {}, t[a]);
1863
- const c = this;
1864
- return {
1865
- ...r,
1866
- properties: { ...s },
1867
- setPropertyRelates(a, d) {
1868
- if (a) {
1869
- switch (a.propertyID) {
1870
- case "disabled":
1871
- case "readonly":
1872
- case "visible":
1873
- c.afterMutilEditorChanged(i, a);
1874
- break;
1875
- }
1876
- o && o(a, d);
1877
- }
1878
- }
1879
- };
1880
- }
1881
- /**
1882
- * 当多值编辑器变更时
1883
- * @param propertyData
1884
- * @param changeObject
1885
- */
1886
- afterMutilEditorChanged(i, e) {
1887
- this.addNewVariableToViewModel(e, this.viewModelId), this.updateExpressionValue(e), this.clearExpression(e, i);
1888
- }
1889
- /**
1890
- *
1891
- * @param propertyId
1892
- * @param componentInstance
1893
- * @returns
1894
- */
1895
- updateElementByParentContainer(i, e) {
1896
- const t = e && e.parent && e.parent.schema;
1897
- if (!t)
1898
- return;
1899
- const o = t.contents.findIndex((s) => s.id === i), r = Y(t.contents[o]);
1900
- t.contents.splice(o, 1), t.contents.splice(o, 0, r), J();
1901
- }
1902
- /**
1903
- * 属性编辑器,在编辑过程中会新增变量,此处需要将新增的变量追加到ViewModel中
1904
- * @param changeObject
1905
- * @param viewModelId
1906
- * @returns
1907
- */
1908
- addNewVariableToViewModel(i, e) {
1909
- const t = i.propertyValue;
1910
- if (!(t && typeof t == "object") || !(t.type === "Variable" && t.isNewVariable))
1911
- return;
1912
- const s = {
1913
- id: t.field,
1914
- category: "locale",
1915
- code: t.fullPath,
1916
- name: t.fullPath,
1917
- type: t.newVariableType || "String",
1918
- isRtcVariable: this.designerContext.designerMode === "PC_RTC" ? !0 : void 0
1919
- };
1920
- delete t.newVariableType, delete t.isNewVariable, this.formSchemaUtils.getVariableByCode(s.code) || this.formSchemaUtils.getViewModelById("root-viewmodel").states.push(s);
1921
- }
1922
- /**
1923
- * 更新表达式到expressions节点
1924
- * @param changeObject
1925
- */
1926
- updateExpressionValue(i) {
1927
- const e = i.propertyValue;
1928
- if (!((e && e.type) === "Expression" && e.expressionInfo))
1929
- return;
1930
- const { expressionId: r, expressionInfo: s } = e, { targetId: c, targetType: a, expressionType: d, value: l, message: u } = s, p = this.formSchemaUtils.getModule();
1931
- p.expressions = p.expressions || [];
1932
- const { expressions: v } = p;
1933
- let b = v.find((m) => m.target === c);
1934
- b || (b = { target: c, rules: [], targetType: a }, v.push(b));
1935
- const g = b.rules.find((m) => m.type === d);
1936
- if (g)
1937
- g.value = l, g.message = u;
1938
- else {
1939
- const m = { id: r, type: d, value: l, message: u };
1940
- b.rules.push(m);
1941
- }
1942
- delete e.expressionInfo;
1943
- }
1944
- /**
1945
- * 属性类型切换为非表达式后,清除原表达式
1946
- * @param changeObject
1947
- * @param propertyData
1948
- * @returns
1949
- */
1950
- clearExpression(i, e) {
1951
- const t = i.propertyValue;
1952
- if (t && t.type === "Expression")
1953
- return;
1954
- const r = i.propertyID, s = this.formSchemaUtils.getExpressions(), c = e.binding ? e.binding.field : e.id, a = s.find((d) => d.target === c);
1955
- !a || !a.rules || (a.rules = a.rules.filter((d) => d.type !== r));
1956
- }
1957
- getExpressionOptions(i, e, t) {
1958
- return new Se(this.formSchemaUtils).getExpressionOptions(i, e, t);
1959
- }
1960
- getRealTargetType(i) {
1961
- return ["response-toolbar-item", "tab-toolbar-item", "section-toolbar-item", "drawer-toolbar-item"].indexOf(i.type) > -1 ? "Button" : i.binding && i.binding.field ? "Field" : "Container";
1962
- }
1963
- createBaseEventProperty(i) {
1964
- const e = {};
1965
- return e[this.viewModelId] = {
1966
- type: "events-editor",
1967
- editor: {
1968
- initialData: i,
1969
- viewSourceHandle: (t) => {
1970
- var o;
1971
- ((o = t.controller) == null ? void 0 : o.label.indexOf(this.formSchemaUtils.getModule().code)) > -1 && this.eventsEditorUtils.jumpToMethod(t);
1972
- }
1973
- }
1974
- }, e;
1975
- }
1976
- }
1977
- class qe extends Me {
1978
- constructor(e, t) {
1979
- super(e, t);
1980
- h(this, "propertyConfigFilters", {
1981
- lookup: [
1982
- "dataSource",
1983
- "filterConditions",
1984
- "displayType",
1985
- "idField",
1986
- "multiSelect",
1987
- "showSelections",
1988
- "enableSearchBar",
1989
- "searchAnyField",
1990
- "enableFavorite",
1991
- "enableUserData"
1992
- ],
1993
- pager: ["showLimits", "sizeLimits", "size"],
1994
- treeConfig: [
1995
- "cascadeStatus",
1996
- "enableCascade",
1997
- "enableFullTree",
1998
- "expandLevel",
1999
- "loadTreeDataType",
2000
- "navTreeToList",
2001
- "onlySelectLeaf",
2002
- "showCascadeControl",
2003
- "treeToList"
2004
- ],
2005
- dialog: [
2006
- "title",
2007
- "width",
2008
- "height",
2009
- "showNavigation",
2010
- "navigatorWidth",
2011
- "resizeable",
2012
- "rememberSize",
2013
- "enableEsc",
2014
- "showMaxButton",
2015
- "showCloseButton"
2016
- ]
2017
- });
2018
- h(this, "events", le);
2019
- }
2020
- /**
2021
- * 获取帮助的属性
2022
- * @param propertyData
2023
- * @returns
2024
- */
2025
- getPropertyConfig(e) {
2026
- const t = new $("root-component", this.designerHostService), o = t.getLookupConfig(e), r = t.getPageConfig(e.editor), s = t.getTreePropConfig(e.editor), c = t.getDialogPropertyConfig(e), a = this.getEventPropConfig(e), d = {
2027
- type: "object",
2028
- categories: {
2029
- lookup: o,
2030
- treeConfig: s,
2031
- pager: r,
2032
- dialog: c
2033
- }
2034
- };
2035
- return this.filterLookupPropertyConfig(d), d.categories.eventsEditor = a, d;
2036
- }
2037
- /**
2038
- * 过滤帮助的属性配置
2039
- * @param propertyConfig
2040
- */
2041
- filterLookupPropertyConfig(e) {
2042
- Object.keys(e.categories).forEach((t) => {
2043
- const o = this.propertyConfigFilters[t], r = e.categories[t];
2044
- Object.keys(r.properties).forEach((s) => {
2045
- o.includes(s) || delete r.properties[s];
2046
- });
2047
- });
2048
- }
2049
- getEventPropConfig(e) {
2050
- const t = this, o = t.eventsEditorUtils.formProperties(e, t.viewModelId, this.events);
2051
- return {
2052
- title: "事件",
2053
- hideTitle: !0,
2054
- properties: t.createBaseEventProperty(o),
2055
- refreshPanelAfterChanged: !0,
2056
- tabId: "commands",
2057
- tabName: "交互",
2058
- setPropertyRelates(s, c) {
2059
- const a = c.editor, d = s.propertyValue;
2060
- delete a[t.viewModelId], d && t.eventsEditorUtils.saveRelatedParameters(a, t.viewModelId, d.events, d), t.events.forEach((l) => {
2061
- c[l.label] = a[l.label];
2062
- });
2063
- }
2064
- };
2065
- }
2066
- }
2067
- const N = O(V, xe, ge, we), ke = Ie();
2068
- C.register = (n, i, e, t) => {
2069
- n.lookup = G, i.lookup = N, t.lookup = { callbackResolver: ke };
2070
- };
2071
- C.registerDesigner = (n, i, e) => {
2072
- n.lookup = C, i.lookup = N;
2073
- };
2074
- const We = A(C);
2075
- export {
2076
- qe as ExternalLookupPropertyConfig,
2077
- C as FLookupDesign,
2078
- de as LookupSchemaRepositoryToken,
2079
- ke as callbackResolver,
2080
- We as default,
2081
- L as lookupDataSourceConverter,
2082
- N as propsResolver
2083
- };