@farris/ui-vue 1.3.0 → 1.3.3

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 (305) hide show
  1. package/components/accordion/index.esm.js +103 -99
  2. package/components/accordion/index.umd.cjs +1 -1
  3. package/components/avatar/index.esm.js +454 -398
  4. package/components/avatar/index.umd.cjs +1 -1
  5. package/components/binding-selector/index.esm.js +444 -0
  6. package/components/binding-selector/index.umd.cjs +1 -0
  7. package/components/binding-selector/package.json +8 -0
  8. package/components/border-editor/index.esm.js +5 -3
  9. package/components/border-editor/index.umd.cjs +1 -1
  10. package/components/button-edit/index.esm.js +143 -139
  11. package/components/button-edit/index.umd.cjs +1 -1
  12. package/components/calendar/index.esm.js +479 -476
  13. package/components/calendar/index.umd.cjs +1 -1
  14. package/components/capsule/index.esm.js +255 -252
  15. package/components/capsule/index.umd.cjs +1 -1
  16. package/components/checkbox/index.esm.js +652 -567
  17. package/components/checkbox/index.umd.cjs +1 -1
  18. package/components/color-picker/index.esm.js +518 -521
  19. package/components/color-picker/index.umd.cjs +2 -2
  20. package/components/combo-list/index.esm.js +659 -553
  21. package/components/combo-list/index.umd.cjs +1 -1
  22. package/components/combo-tree/index.esm.js +162 -155
  23. package/components/combo-tree/index.umd.cjs +1 -1
  24. package/components/common/index.esm.js +866 -747
  25. package/components/common/index.umd.cjs +1 -1
  26. package/components/component/index.esm.js +371 -998
  27. package/components/component/index.umd.cjs +1 -1
  28. package/components/condition/index.esm.js +1174 -1280
  29. package/components/condition/index.umd.cjs +1 -1
  30. package/components/content-container/index.esm.js +340 -991
  31. package/components/content-container/index.umd.cjs +1 -1
  32. package/components/data-grid/index.esm.js +6066 -5847
  33. package/components/data-grid/index.umd.cjs +1 -1
  34. package/components/data-view/index.esm.js +3400 -3486
  35. package/components/data-view/index.umd.cjs +1 -1
  36. package/components/date-picker/index.esm.js +2328 -2446
  37. package/components/date-picker/index.umd.cjs +1 -1
  38. package/components/designer-canvas/index.css +1 -1
  39. package/components/designer-canvas/index.esm.js +9551 -1200
  40. package/components/designer-canvas/index.umd.cjs +1 -1
  41. package/components/designer-outline/index.esm.js +2 -1
  42. package/components/designer-outline/index.umd.cjs +1 -1
  43. package/components/drawer/index.esm.js +34 -38
  44. package/components/drawer/index.umd.cjs +1 -1
  45. package/components/dropdown/index.esm.js +234 -231
  46. package/components/dropdown/index.umd.cjs +2 -2
  47. package/components/dynamic-form/index.esm.js +1996 -2630
  48. package/components/dynamic-form/index.umd.cjs +1 -1
  49. package/components/dynamic-resolver/index.esm.js +138 -123
  50. package/components/dynamic-resolver/index.umd.cjs +1 -1
  51. package/components/dynamic-view/index.esm.js +218 -218
  52. package/components/dynamic-view/index.umd.cjs +1 -1
  53. package/components/event-parameter/index.esm.js +311 -0
  54. package/components/event-parameter/index.umd.cjs +1 -0
  55. package/components/event-parameter/package.json +8 -0
  56. package/components/events-editor/index.css +1 -1
  57. package/components/events-editor/index.esm.js +548 -586
  58. package/components/events-editor/index.umd.cjs +1 -1
  59. package/components/expression-editor/index.esm.js +95 -91
  60. package/components/expression-editor/index.umd.cjs +1 -1
  61. package/components/external-container/index.esm.js +2871 -3736
  62. package/components/external-container/index.umd.cjs +1 -1
  63. package/components/field-selector/index.esm.js +3380 -3645
  64. package/components/field-selector/index.umd.cjs +1 -1
  65. package/components/filter-bar/index.css +1 -1
  66. package/components/filter-bar/index.esm.js +10543 -3207
  67. package/components/filter-bar/index.umd.cjs +1 -1
  68. package/components/flow-canvas/index.css +1 -1
  69. package/components/flow-canvas/index.esm.js +9775 -1312
  70. package/components/flow-canvas/index.umd.cjs +1 -1
  71. package/components/image-cropper/index.esm.js +442 -438
  72. package/components/image-cropper/index.umd.cjs +1 -1
  73. package/components/input-group/index.esm.js +587 -807
  74. package/components/input-group/index.umd.cjs +1 -1
  75. package/components/layout/index.esm.js +415 -381
  76. package/components/layout/index.umd.cjs +1 -1
  77. package/components/list-nav/index.esm.js +361 -1024
  78. package/components/list-nav/index.umd.cjs +1 -1
  79. package/components/list-view/index.esm.js +2265 -2371
  80. package/components/list-view/index.umd.cjs +1 -1
  81. package/components/lookup/index.esm.js +6425 -6257
  82. package/components/lookup/index.umd.cjs +1 -1
  83. package/components/mapping-editor/index.esm.js +6164 -5946
  84. package/components/mapping-editor/index.umd.cjs +1 -1
  85. package/components/message-box/index.esm.js +252 -252
  86. package/components/message-box/index.umd.cjs +1 -1
  87. package/components/modal/index.esm.js +70 -70
  88. package/components/modal/index.umd.cjs +1 -1
  89. package/components/nav/index.esm.js +524 -1474
  90. package/components/nav/index.umd.cjs +3 -3
  91. package/components/number-range/index.esm.js +547 -502
  92. package/components/number-range/index.umd.cjs +1 -1
  93. package/components/number-spinner/index.esm.js +646 -574
  94. package/components/number-spinner/index.umd.cjs +1 -1
  95. package/components/order/index.esm.js +1181 -2028
  96. package/components/order/index.umd.cjs +1 -1
  97. package/components/page-footer/index.esm.js +134 -131
  98. package/components/page-footer/index.umd.cjs +1 -1
  99. package/components/page-header/index.esm.js +1185 -2027
  100. package/components/page-header/index.umd.cjs +1 -1
  101. package/components/pagination/index.esm.js +442 -1368
  102. package/components/pagination/index.umd.cjs +1 -1
  103. package/components/progress/index.esm.js +238 -235
  104. package/components/progress/index.umd.cjs +3 -3
  105. package/components/property-editor/index.esm.js +1635 -1713
  106. package/components/property-editor/index.umd.cjs +2 -2
  107. package/components/property-panel/index.esm.js +791 -716
  108. package/components/property-panel/index.umd.cjs +1 -1
  109. package/components/query-solution/index.css +1 -1
  110. package/components/query-solution/index.esm.js +12203 -5274
  111. package/components/query-solution/index.umd.cjs +6 -1
  112. package/components/radio-button/index.esm.js +97 -97
  113. package/components/radio-button/index.umd.cjs +1 -1
  114. package/components/radio-group/index.css +1 -1
  115. package/components/radio-group/index.esm.js +1873 -520
  116. package/components/radio-group/index.umd.cjs +1 -1
  117. package/components/rate/index.esm.js +299 -300
  118. package/components/rate/index.umd.cjs +1 -1
  119. package/components/response-layout/index.esm.js +176 -173
  120. package/components/response-layout/index.umd.cjs +1 -1
  121. package/components/response-layout-editor/index.esm.js +715 -659
  122. package/components/response-layout-editor/index.umd.cjs +1 -1
  123. package/components/response-toolbar/index.esm.js +1032 -1883
  124. package/components/response-toolbar/index.umd.cjs +1 -1
  125. package/components/schema-selector/index.esm.js +4767 -5693
  126. package/components/schema-selector/index.umd.cjs +2 -2
  127. package/components/search-box/index.esm.js +169 -161
  128. package/components/search-box/index.umd.cjs +1 -1
  129. package/components/section/index.esm.js +490 -1167
  130. package/components/section/index.umd.cjs +1 -1
  131. package/components/smoke-detector/index.esm.js +154 -151
  132. package/components/smoke-detector/index.umd.cjs +1 -1
  133. package/components/splitter/index.esm.js +575 -1204
  134. package/components/splitter/index.umd.cjs +1 -1
  135. package/components/splitter/style.js +2 -0
  136. package/components/step/index.esm.js +279 -276
  137. package/components/step/index.umd.cjs +1 -1
  138. package/components/switch/index.esm.js +478 -428
  139. package/components/switch/index.umd.cjs +1 -1
  140. package/components/tabs/index.esm.js +2591 -3326
  141. package/components/tabs/index.umd.cjs +1 -1
  142. package/components/tags/index.esm.js +442 -439
  143. package/components/tags/index.umd.cjs +1 -1
  144. package/components/text/index.esm.js +309 -307
  145. package/components/text/index.umd.cjs +1 -1
  146. package/components/textarea/index.esm.js +500 -430
  147. package/components/textarea/index.umd.cjs +1 -1
  148. package/components/time-picker/index.esm.js +1391 -1341
  149. package/components/time-picker/index.umd.cjs +1 -1
  150. package/components/transfer/index.esm.js +574 -575
  151. package/components/transfer/index.umd.cjs +1 -1
  152. package/components/tree-grid/index.esm.js +3422 -3536
  153. package/components/tree-grid/index.umd.cjs +1 -1
  154. package/components/tree-view/index.esm.js +2661 -2764
  155. package/components/tree-view/index.umd.cjs +1 -1
  156. package/components/uploader/index.esm.js +675 -674
  157. package/components/uploader/index.umd.cjs +2 -2
  158. package/components/verify-detail/index.esm.js +300 -297
  159. package/components/verify-detail/index.umd.cjs +1 -1
  160. package/components/video/index.esm.js +454 -1089
  161. package/components/video/index.umd.cjs +1 -1
  162. package/components/weather/index.esm.js +709 -706
  163. package/components/weather/index.umd.cjs +5 -5
  164. package/farris.all.esm.js +54780 -52757
  165. package/farris.all.umd.cjs +14 -9
  166. package/index.css +1 -1
  167. package/package.json +1 -1
  168. package/types/binding-selector/index.d.ts +55 -0
  169. package/types/binding-selector/src/binding-selector.component.d.ts +11 -0
  170. package/types/binding-selector/src/binding-selector.props.d.ts +52 -0
  171. package/types/binding-selector/src/components/binding-selector-container.component.d.ts +13 -0
  172. package/types/binding-selector/src/composition/use-field-selection.d.ts +9 -0
  173. package/types/combo-list/src/components/list-container.component.d.ts +6 -6
  174. package/types/combo-list/src/components/list-container.props.d.ts +1 -1
  175. package/types/combo-tree/src/components/tree-container.component.d.ts +5 -5
  176. package/types/common/directive/area-response.d.ts +10 -0
  177. package/types/common/entity/entity-schema.d.ts +26 -11
  178. package/types/common/index.d.ts +9 -0
  179. package/types/common/radio-checkbox/radio-checkbox.props.d.ts +1 -0
  180. package/types/common/types.d.ts +2 -2
  181. package/types/common/utils/resolve-field.d.ts +2 -0
  182. package/types/common/utils/use-class.d.ts +7 -0
  183. package/types/component/src/designer/use-designer-rules.d.ts +2 -2
  184. package/types/condition/src/condition-fields.design.component.d.ts +18 -0
  185. package/types/condition/src/types.d.ts +5 -4
  186. package/types/content-container/src/designer/use-designer-rules.d.ts +3 -3
  187. package/types/data-grid/index.d.ts +8 -5
  188. package/types/data-grid/src/composition/data-grid-component-creator.service.d.ts +20 -0
  189. package/types/data-grid/src/{designer/data-grid-column.props.d.ts → data-grid-column.props.d.ts} +1 -1
  190. package/types/data-grid/src/data-grid.component.d.ts +3 -2
  191. package/types/data-grid/src/data-grid.props.d.ts +2 -2
  192. package/types/data-grid/src/designer/data-grid.design.component.d.ts +2 -2
  193. package/types/data-grid/src/designer/grid-field-editor.component.d.ts +14 -14
  194. package/types/data-grid/src/designer/use-designer-rules.d.ts +2 -2
  195. package/types/data-grid/src/schema/schema-resolver.d.ts +1 -1
  196. package/types/data-view/components/row/hierarchy-row.component.d.ts +2 -2
  197. package/types/data-view/composition/data/use-tree-data.d.ts +1 -1
  198. package/types/data-view/composition/types.d.ts +9 -11
  199. package/types/date-picker/src/components/calendar/calendar.component.d.ts +3 -3
  200. package/types/date-picker/src/components/month/month.component.d.ts +3 -3
  201. package/types/date-picker/src/components/year/year.component.d.ts +3 -3
  202. package/types/designer-canvas/index.d.ts +3 -1
  203. package/types/designer-canvas/src/composition/dg-control.d.ts +5 -0
  204. package/types/designer-canvas/src/composition/function/drag-resolve.d.ts +5 -0
  205. package/types/designer-canvas/src/composition/rule/use-dragula-common-rule.d.ts +4 -0
  206. package/types/designer-canvas/src/composition/rule/use-template-rule.d.ts +30 -0
  207. package/types/designer-canvas/src/composition/types.d.ts +49 -41
  208. package/types/designer-canvas/src/types.d.ts +10 -21
  209. package/types/dynamic-form/index.d.ts +1 -1
  210. package/types/dynamic-form/src/designer/form-group-use-designer-rules.d.ts +3 -0
  211. package/types/dynamic-form/src/designer/response-form-use-designer-rules.d.ts +3 -0
  212. package/types/dynamic-form/src/designer/response-form.design.component.d.ts +7 -1
  213. package/types/dynamic-form/src/property-config/{form.property-config.d.ts → response-form.property-config.d.ts} +1 -1
  214. package/types/dynamic-form/src/schema/{schema-resolver.d.ts → response-form-schema-resolver.d.ts} +1 -1
  215. package/types/dynamic-form/src/types.d.ts +1 -1
  216. package/types/dynamic-resolver/src/common/toolbar-resolver.d.ts +6 -1
  217. package/types/dynamic-resolver/src/converter/row-number.converter.d.ts +3 -0
  218. package/types/entity-binding-selector/composition/use-entity-tree.d.ts +7 -0
  219. package/types/entity-binding-selector/entity-binding-selector.component.d.ts +11 -0
  220. package/types/entity-binding-selector/entity-binding-selector.props.d.ts +3 -0
  221. package/types/enum-editor/src/components/enum-editor-container.component.d.ts +3 -3
  222. package/types/enum-editor/src/enum-editor.component.d.ts +3 -3
  223. package/types/event-parameter/index.d.ts +31 -0
  224. package/types/event-parameter/src/composition/type.d.ts +77 -0
  225. package/types/event-parameter/src/composition/use-editor-combotree.d.ts +3 -0
  226. package/types/event-parameter/src/composition/use-editor-input.d.ts +3 -0
  227. package/types/event-parameter/src/composition/use-editor-select.d.ts +3 -0
  228. package/types/event-parameter/src/composition/use-editor-switch.d.ts +3 -0
  229. package/types/event-parameter/src/composition/use-editor.d.ts +3 -0
  230. package/types/event-parameter/src/event-parameter.component.d.ts +8 -0
  231. package/types/event-parameter/src/event-parameter.props.d.ts +34 -0
  232. package/types/external-container/src/designer/import-external-schema.component.d.ts +1 -1
  233. package/types/external-container/src/designer/use-designer-rules.d.ts +3 -3
  234. package/types/field-selector/src/field-selector.component.d.ts +1 -2
  235. package/types/field-selector/src/field-selector.props.d.ts +0 -9
  236. package/types/input-group/src/designer/use-input-group-rules.d.ts +1 -2
  237. package/types/layout/src/designer/layout-pane-use-designer-rules.d.ts +3 -3
  238. package/types/list-nav/src/designer/use-designer-rules.d.ts +3 -0
  239. package/types/list-view/src/designer/list-view-table.design.component.d.ts +15 -0
  240. package/types/list-view/src/list-view-table.component.d.ts +15 -0
  241. package/types/lookup/src/composition/use-user-data.d.ts +2 -2
  242. package/types/lookup/src/property-config/lookup.property-config.d.ts +2 -6
  243. package/types/modal/src/composition/modal.service.d.ts +2 -1
  244. package/types/page-header/src/designer/page-header.design.component.d.ts +1 -1
  245. package/types/page-header/src/page-header.component.d.ts +1 -1
  246. package/types/pagination/src/components/buttons/goto-buttons.component.d.ts +2 -2
  247. package/types/pagination/src/components/buttons/next-buttons.component.d.ts +2 -2
  248. package/types/pagination/src/components/buttons/previous-buttons.component.d.ts +2 -2
  249. package/types/pagination/src/components/pages/page-list.component.d.ts +2 -2
  250. package/types/pagination/src/components/pages/page-number.component.d.ts +2 -2
  251. package/types/property-panel/index.d.ts +3 -1
  252. package/types/property-panel/src/composition/entity/input-base-property.d.ts +1 -1
  253. package/types/property-panel/src/composition/entity/property-entity.d.ts +1 -1
  254. package/types/property-panel/src/composition/type.d.ts +0 -13
  255. package/types/query-solution/src/composition/types.d.ts +35 -4
  256. package/types/query-solution/src/composition/use-header.d.ts +21 -0
  257. package/types/query-solution/src/composition/{use-filter.d.ts → use-http.d.ts} +2 -2
  258. package/types/query-solution/src/composition/use-solution.d.ts +20 -0
  259. package/types/query-solution/src/designer/query-solution-config/composition/types.d.ts +43 -35
  260. package/types/query-solution/src/designer/query-solution-config/composition/use-panel.d.ts +2 -16
  261. package/types/query-solution/src/designer/query-solution-config/composition/use-property.d.ts +19 -0
  262. package/types/query-solution/src/designer/query-solution-config/composition/use-querysolution-rules.d.ts +3 -0
  263. package/types/query-solution/src/designer/query-solution-config/composition/use-transfer.d.ts +1 -1
  264. package/types/query-solution/src/designer/query-solution-config/query-solution-config.props.d.ts +14 -14
  265. package/types/query-solution/src/property-config/query-solution.property-config.d.ts +12 -0
  266. package/types/query-solution/src/query-solution.d.ts +10 -2
  267. package/types/query-solution/src/solutions.d.ts +108 -509
  268. package/types/radio-group/src/designer/item-collection-editor-inner.component.d.ts +29 -0
  269. package/types/radio-group/src/designer/item-collection-editor.component.d.ts +29 -0
  270. package/types/radio-group/src/designer/item-collection-editor.props.d.ts +21 -0
  271. package/types/radio-group/src/schema/schema-mapper.d.ts +1 -0
  272. package/types/radio-group/src/schema/schema-resolver.d.ts +1 -0
  273. package/types/response-layout-editor/index.d.ts +3 -1
  274. package/types/response-toolbar/src/designer/use-designer-rules.d.ts +3 -3
  275. package/types/response-toolbar/src/property-config/response-toolbar-item.property-config.d.ts +1 -0
  276. package/types/response-toolbar/src/property-config/response-toolbar.property-config.d.ts +1 -0
  277. package/types/section/src/designer/use-designer-rules.d.ts +3 -3
  278. package/types/section/src/property-config/section.property-config.d.ts +17 -17
  279. package/types/section/src/schema/schema-resolver.d.ts +1 -2
  280. package/types/section/src/schema/toolbar-resolver.d.ts +1 -1
  281. package/types/splitter/src/components/splitter-pane.component.d.ts +1 -1
  282. package/types/splitter/src/designer/splitter-pane-use-designer-rules.d.ts +3 -3
  283. package/types/splitter/src/designer/splitter-use-designer-rules.d.ts +3 -3
  284. package/types/tabs/src/composition/types.d.ts +4 -1
  285. package/types/tabs/src/designer/tab-page-use-designer-rules.d.ts +3 -3
  286. package/types/tabs/src/designer/tab-use-designer-rules.d.ts +3 -3
  287. package/types/tabs/src/property-config/tab-page.property-config.d.ts +9 -59
  288. package/types/tabs/src/property-config/tabs.property-config.d.ts +8 -71
  289. package/types/tabs/src/schema/schema-resolver.d.ts +1 -2
  290. package/types/text/src/composition/types.d.ts +4 -4
  291. package/types/textarea/src/property-config/textarea.property-config.d.ts +23 -0
  292. package/types/tree-grid/index.d.ts +3 -3
  293. package/types/tree-grid/src/tree-grid.component.d.ts +1 -1
  294. package/types/weather/src/composition/use-weather-charts.d.ts +15 -0
  295. package/types/weather/src/composition/use-weather-color.d.ts +15 -0
  296. package/types/weather/src/composition/use-weather-data.d.ts +15 -0
  297. package/types/weather/src/composition/use-weather-format-number.d.ts +15 -0
  298. package/types/designer-canvas/src/composition/rule/use-drag-drop-rules.d.ts +0 -19
  299. package/types/designer-canvas/src/composition/use-dragula-common-rule.d.ts +0 -4
  300. package/types/dynamic-form/src/designer/use-designer-rules.d.ts +0 -3
  301. package/types/list-nav/src/composition/use-designer-rules.d.ts +0 -3
  302. package/types/property-panel/src/composition/entity/use-input-rules.d.ts +0 -3
  303. package/types/query-solution/src/designer/query-solution-config/composition/mock-data.d.ts +0 -6
  304. package/types/tree-grid/src/schema/column-resolver.d.ts +0 -3
  305. package/types/weather/src/composition/types.d.ts +0 -2
@@ -1,117 +1,122 @@
1
- import { ref as b, defineComponent as D, createVNode as t, inject as R, Fragment as ee, createTextVNode as T, computed as F, provide as O, onMounted as W } from "vue";
2
- import { isPlainObject as q, cloneDeep as B } from "lodash-es";
3
- import { FSchemaSelector as ne } from "../schema-selector/index.esm.js";
4
- import { FModalService as te } from "../modal/index.esm.js";
1
+ import { ref as g, defineComponent as F, createVNode as s, inject as O, Fragment as te, createTextVNode as R, computed as A, provide as T, onMounted as _ } from "vue";
2
+ import { isPlainObject as z, cloneDeep as S } from "lodash-es";
3
+ import oe from "../notify/index.esm.js/src/notify.service";
4
+ import "../schema-selector/index.esm.js";
5
+ import "../modal/index.esm.js";
5
6
  import "../combo-list/index.esm.js";
6
- const J = {}, U = {};
7
- function z(n) {
8
- const { properties: e, title: a, ignore: r } = n, u = r && Array.isArray(r), f = Object.keys(e).reduce((l, h) => ((!u || !r.find((m) => m == h)) && (l[h] = e[h].type === "object" && e[h].properties ? z(e[h]) : B(e[h].default)), l), {});
9
- return (!u || !r.find((l) => l == "id")) && (f.id = `${a}-${Date.now()}`), f;
7
+ const G = {}, W = {};
8
+ function $(n) {
9
+ const { properties: e, title: r, ignore: o } = n, u = o && Array.isArray(o), m = Object.keys(e).reduce((i, h) => ((!u || !o.find((f) => f === h)) && (i[h] = e[h].type === "object" && e[h].properties ? $(e[h]) : S(e[h].default)), i), {});
10
+ if (r && (!u || !o.find((i) => i === "id"))) {
11
+ const i = r.toLowerCase().replace(/-/g, "_");
12
+ m.id = `${i}_${Math.random().toString().slice(2, 6)}`;
13
+ }
14
+ return m;
10
15
  }
11
- function $(n, e = {}, a) {
12
- const r = J[n];
13
- if (r) {
14
- let u = z(r);
15
- const f = U[n];
16
- return u = f ? f({ getSchemaByType: $ }, u, e, a) : u, u;
16
+ function U(n, e = {}, r) {
17
+ const o = G[n];
18
+ if (o) {
19
+ let u = $(o);
20
+ const m = W[n];
21
+ return u = m ? m({ getSchemaByType: U }, u, e, r) : u, u;
17
22
  }
18
23
  return null;
19
24
  }
20
- function oe(n, e) {
21
- const a = z(e);
22
- return Object.keys(n).reduce((r, u) => (r[u] && q(r[u]) && q(n[u]) ? Object.assign(r[u], n[u]) : r[u] = n[u], r), a), a;
23
- }
24
25
  function re(n, e) {
25
- return Object.keys(n).filter((r) => n[r] != null).reduce((r, u) => {
26
+ const r = $(e);
27
+ return Object.keys(r).reduce((o, u) => (o[u] && z(o[u]) && z(n[u] || !n[u]) ? Object.assign(o[u], n[u] || {}) : o[u] = n[u], o), r), r;
28
+ }
29
+ function ae(n, e) {
30
+ return Object.keys(n).filter((o) => n[o] != null).reduce((o, u) => {
26
31
  if (e.has(u)) {
27
- const f = e.get(u);
28
- if (typeof f == "string")
29
- r[f] = n[u];
32
+ const m = e.get(u);
33
+ if (typeof m == "string")
34
+ o[m] = n[u];
30
35
  else {
31
- const l = f(u, n[u], n);
32
- Object.assign(r, l);
36
+ const i = m(u, n[u], n);
37
+ Object.assign(o, i);
33
38
  }
34
39
  } else
35
- r[u] = n[u];
36
- return r;
40
+ o[u] = n[u];
41
+ return o;
37
42
  }, {});
38
43
  }
39
- function ae(n, e, a = /* @__PURE__ */ new Map()) {
40
- const r = oe(n, e);
41
- return re(r, a);
44
+ function se(n, e, r = /* @__PURE__ */ new Map()) {
45
+ const o = re(n, e);
46
+ return ae(o, r);
42
47
  }
43
- function se(n = {}) {
44
- function e(s, i, o, c) {
45
- if (typeof o == "number")
46
- return c[s].length === o;
47
- if (typeof o == "object") {
48
- const p = Object.keys(o)[0], d = o[p];
49
- if (p === "not")
50
- return Number(c[s].length) !== Number(d);
51
- if (p === "moreThan")
52
- return Number(c[s].length) >= Number(d);
53
- if (p === "lessThan")
54
- return Number(c[s].length) <= Number(d);
48
+ function le(n = {}) {
49
+ function e(a, c, t, l) {
50
+ if (typeof t == "number")
51
+ return l[a].length === t;
52
+ if (typeof t == "object") {
53
+ const w = Object.keys(t)[0], d = t[w];
54
+ if (w === "not")
55
+ return Number(l[a].length) !== Number(d);
56
+ if (w === "moreThan")
57
+ return Number(l[a].length) >= Number(d);
58
+ if (w === "lessThan")
59
+ return Number(l[a].length) <= Number(d);
55
60
  }
56
61
  return !1;
57
62
  }
58
- function a(s, i, o, c) {
59
- return c[s] && c[s].propertyValue && String(c[s].propertyValue.value) === String(o);
63
+ function r(a, c, t, l) {
64
+ return l[a] && l[a].propertyValue && String(l[a].propertyValue.value) === String(t);
60
65
  }
61
- const r = /* @__PURE__ */ new Map([
66
+ const o = /* @__PURE__ */ new Map([
62
67
  ["length", e],
63
- ["getProperty", a]
68
+ ["getProperty", r]
64
69
  ]);
65
- Object.keys(n).reduce((s, i) => (s.set(i, n[i]), s), r);
66
- function u(s, i) {
67
- const o = s;
68
- return typeof i == "number" ? [{ target: o, operator: "length", param: null, value: Number(i) }] : typeof i == "boolean" ? [{ target: o, operator: "getProperty", param: s, value: !!i }] : typeof i == "object" ? Object.keys(i).map((c) => {
69
- if (c === "length")
70
- return { target: o, operator: "length", param: null, value: i[c] };
71
- const p = c, d = i[c];
72
- return { target: o, operator: "getProperty", param: p, value: d };
70
+ Object.keys(n).reduce((a, c) => (a.set(c, n[c]), a), o);
71
+ function u(a, c) {
72
+ const t = a;
73
+ return typeof c == "number" ? [{ target: t, operator: "length", param: null, value: Number(c) }] : typeof c == "boolean" ? [{ target: t, operator: "getProperty", param: a, value: !!c }] : typeof c == "object" ? Object.keys(c).map((l) => {
74
+ if (l === "length")
75
+ return { target: t, operator: "length", param: null, value: c[l] };
76
+ const w = l, d = c[l];
77
+ return { target: t, operator: "getProperty", param: w, value: d };
73
78
  }) : [];
74
79
  }
75
- function f(s) {
76
- return Object.keys(s).reduce((o, c) => {
77
- const p = u(c, s[c]);
78
- return o.push(...p), o;
80
+ function m(a) {
81
+ return Object.keys(a).reduce((t, l) => {
82
+ const w = u(l, a[l]);
83
+ return t.push(...w), t;
79
84
  }, []);
80
85
  }
81
- function l(s, i) {
82
- if (r.has(s.operator)) {
83
- const o = r.get(s.operator);
84
- return o && o(s.target, s.param, s.value, i) || !1;
86
+ function i(a, c) {
87
+ if (o.has(a.operator)) {
88
+ const t = o.get(a.operator);
89
+ return t && t(a.target, a.param, a.value, c) || !1;
85
90
  }
86
91
  return !1;
87
92
  }
88
- function h(s, i) {
89
- return f(s).reduce((p, d) => p && l(d, i), !0);
93
+ function h(a, c) {
94
+ return m(a).reduce((w, d) => w && i(d, c), !0);
90
95
  }
91
- function m(s, i) {
92
- const o = Object.keys(s), c = o.includes("allOf"), p = o.includes("anyOf"), d = c || p, g = (d ? s[d ? c ? "allOf" : "anyOf" : "allOf"] : [s]).map((y) => h(y, i));
93
- return c ? !g.includes(!1) : g.includes(!0);
96
+ function f(a, c) {
97
+ const t = Object.keys(a), l = t.includes("allOf"), w = t.includes("anyOf"), d = l || w, b = (d ? a[d ? l ? "allOf" : "anyOf" : "allOf"] : [a]).map((B) => h(B, c));
98
+ return l ? !b.includes(!1) : b.includes(!0);
94
99
  }
95
- return { parseValueSchema: m };
100
+ return { parseValueSchema: f };
96
101
  }
97
- const le = {}, ce = {};
98
- se();
99
- function ie(n, e, a = /* @__PURE__ */ new Map(), r = (l, h, m) => h, u = {}, f = (l) => l) {
100
- return J[e.title] = e, U[e.title] = r, le[e.title] = u, ce[e.title] = f, (l = {}) => {
101
- const h = ae(l, e, a), m = Object.keys(n).reduce((s, i) => (s[i] = n[i].default, s), {});
102
- return Object.assign(m, h);
102
+ const ce = {}, ie = {};
103
+ le();
104
+ function ue(n, e, r = /* @__PURE__ */ new Map(), o = (i, h, f, a) => h, u = {}, m = (i) => i) {
105
+ return G[e.title] = e, W[e.title] = o, ce[e.title] = u, ie[e.title] = m, (i = {}) => {
106
+ const h = se(i, e, r), f = Object.keys(n).reduce((a, c) => (a[c] = n[c].default, a), {});
107
+ return Object.assign(f, h);
103
108
  };
104
109
  }
105
- function ue(n, e) {
110
+ function de(n, e) {
106
111
  return { customClass: e.class, customStyle: e.style };
107
112
  }
108
- const de = /* @__PURE__ */ new Map([
109
- ["appearance", ue]
113
+ const me = /* @__PURE__ */ new Map([
114
+ ["appearance", de]
110
115
  ]);
111
- function fe(n, e, a) {
116
+ function fe(n, e, r) {
112
117
  return e;
113
118
  }
114
- const me = "https://json-schema.org/draft/2020-12/schema", ve = "https://farris-design.gitee.io/events-editor.schema.json", pe = "events-editor", he = "A Farris Component", we = "object", ge = {
119
+ const pe = "https://json-schema.org/draft/2020-12/schema", ve = "https://farris-design.gitee.io/events-editor.schema.json", he = "events-editor", we = "A Farris Component", ge = "object", be = {
115
120
  id: {
116
121
  description: "The unique identifier for events-editor",
117
122
  type: "string"
@@ -173,23 +178,23 @@ const me = "https://json-schema.org/draft/2020-12/schema", ve = "https://farris-
173
178
  type: "boolean",
174
179
  default: !0
175
180
  }
176
- }, be = [
181
+ }, Ce = [
177
182
  "id",
178
183
  "type"
179
- ], Ce = {
180
- $schema: me,
184
+ ], Ee = {
185
+ $schema: pe,
181
186
  $id: ve,
182
- title: pe,
183
- description: he,
184
- type: we,
185
- properties: ge,
186
- required: be
187
- }, Ee = "events-editor", Se = "A Farris Component", ye = "object", Me = {}, Be = {
188
- title: Ee,
189
- description: Se,
190
- type: ye,
191
- categories: Me
192
- }, H = [
187
+ title: he,
188
+ description: we,
189
+ type: ge,
190
+ properties: be,
191
+ required: Ce
192
+ }, Se = "events-editor", ye = "A Farris Component", Me = "object", Be = {}, Le = {
193
+ title: Se,
194
+ description: ye,
195
+ type: Me,
196
+ categories: Be
197
+ }, q = [
193
198
  {
194
199
  label: "pageChange",
195
200
  name: "MockMock切换页码"
@@ -210,7 +215,7 @@ const me = "https://json-schema.org/draft/2020-12/schema", ve = "https://farris-
210
215
  label: "onDeleteClicked",
211
216
  name: "Mock操作列点击删除"
212
217
  }
213
- ], Le = {
218
+ ], ke = {
214
219
  propertyID: "data-grid-component-viewmodel",
215
220
  propertyType: "events",
216
221
  /** 内置构件显示的命令列表 */
@@ -274,7 +279,7 @@ const me = "https://json-schema.org/draft/2020-12/schema", ve = "https://farris-
274
279
  }
275
280
  ],
276
281
  /** (事件设定)可绑定事件默认列表; */
277
- events: H,
282
+ events: q,
278
283
  /** 已绑定的事件(拼接已有的参数值,拼接当前事件->待集成-从dom结构中取值,事件及对应的字符串) */
279
284
  boundEventsList: [],
280
285
  /** 视图模型已有命令 */
@@ -292,24 +297,24 @@ const me = "https://json-schema.org/draft/2020-12/schema", ve = "https://farris-
292
297
  /** 初始为空,用于存储用户点击「导入新命令」的控制器值 */
293
298
  newController: [],
294
299
  isAddControllerMethod: !1,
295
- getEventList: () => ({ events: H, boundEventsList: [] })
296
- }, _ = {
297
- initialData: { type: Object, default: Le }
298
- }, G = ie(
299
- _,
300
- Ce,
301
- de,
300
+ getEventList: () => ({ events: q, boundEventsList: [] })
301
+ }, I = {
302
+ initialData: { type: Object, default: ke }
303
+ }, H = ue(
304
+ I,
305
+ Ee,
306
+ me,
302
307
  fe,
303
- Be
308
+ Le
304
309
  );
305
310
  function Y(n, e) {
306
- const a = b([]), { boundEvents: r, unBoundEvent: u } = e;
307
- function f(o) {
311
+ const r = g([]), { boundEvents: o, unBoundEvent: u } = e;
312
+ function m(t) {
308
313
  return {
309
314
  /** 当前事件名称及label */
310
315
  event: {
311
- label: o.boundEvents.label,
312
- name: o.boundEvents.name
316
+ label: t.boundEvents.label,
317
+ name: t.boundEvents.name
313
318
  },
314
319
  /** 控制组件的展示及顺序:
315
320
  * 0:事件下拉框
@@ -324,160 +329,161 @@ function Y(n, e) {
324
329
  showSwitchNumber: 2
325
330
  }],
326
331
  /** 方法列表 */
327
- command: B(o.command),
332
+ command: S(t.command),
328
333
  /** 当前的控制器 */
329
- controller: B(o.controller)
334
+ controller: S(t.controller)
330
335
  };
331
336
  }
332
- function l() {
333
- var o;
334
- a.value = (o = r.value) == null ? void 0 : o.map((c) => f(c));
337
+ function i() {
338
+ var t;
339
+ r.value = (t = o.value) == null ? void 0 : t.map((l) => m(l));
335
340
  }
336
- function h(o) {
337
- const p = f({
338
- boundEvents: o,
341
+ function h(t) {
342
+ const w = m({
343
+ boundEvents: t,
339
344
  command: null,
340
345
  controller: { id: "", name: "", label: "" }
341
346
  });
342
- p.showSwitch[0].showSwitchNumber = 1, p.showSwitch[0].showSection[2][3] = !0, a.value.unshift(p);
347
+ w.showSwitch[0].showSwitchNumber = 1, w.showSwitch[0].showSection[2][3] = !0, r.value.unshift(w);
343
348
  }
344
- function m() {
345
- var o;
346
- (o = a.value) == null || o.forEach((c) => {
347
- c.showSwitch.forEach((p) => {
348
- p.showSection[2][3] = !1;
349
+ function f() {
350
+ var t;
351
+ (t = r.value) == null || t.forEach((l) => {
352
+ l.showSwitch.forEach((w) => {
353
+ w.showSection[2][3] = !1;
349
354
  });
350
355
  });
351
356
  }
352
- function s(o) {
353
- a.value[o].showSwitch.forEach((c) => {
354
- c.showSection[2][3] = !c.showSection[2][3];
357
+ function a(t) {
358
+ r.value[t].showSwitch.forEach((l) => {
359
+ l.showSection[2][3] = !l.showSection[2][3];
355
360
  });
356
361
  }
357
- function i(o) {
358
- if (o >= 0 && o <= a.value.length - 1) {
359
- const c = a.value[o];
360
- u(c.event), a.value.splice(o, 1);
362
+ function c(t) {
363
+ if (t >= 0 && t <= r.value.length - 1) {
364
+ const l = r.value[t];
365
+ u(l.event), r.value.splice(t, 1);
361
366
  }
362
367
  }
363
368
  return {
364
369
  addNewInteraction: h,
365
- collapseInteractions: m,
366
- deleteInteracton: i,
367
- toggleMethodInInteraction: s,
368
- interactions: a,
369
- loadInteractions: l
370
+ collapseInteractions: f,
371
+ deleteInteracton: c,
372
+ toggleMethodInInteraction: a,
373
+ interactions: r,
374
+ loadInteractions: i
370
375
  };
371
376
  }
372
- function Q(n) {
373
- const e = b([]), a = b([]), r = b([]);
377
+ function J(n) {
378
+ const e = g([]), r = g([]), o = g([]);
374
379
  function u() {
375
- const i = a.value.reduce(
376
- (c, p) => (c.set(p.boundEvents.label, !0), c),
380
+ const c = r.value.reduce(
381
+ (l, w) => (l.set(w.boundEvents.label, !0), l),
377
382
  /* @__PURE__ */ new Map()
378
383
  );
379
- return e.value.filter((c) => !i.has(c.label));
384
+ return e.value.filter((l) => !c.has(l.label));
380
385
  }
381
- function f() {
382
- var o;
383
- const i = ((o = a.value) == null ? void 0 : o.length) > 0;
384
- r.value = i ? u() : e.value;
386
+ function m() {
387
+ var t;
388
+ const c = ((t = r.value) == null ? void 0 : t.length) > 0;
389
+ o.value = c ? u() : e.value;
385
390
  }
386
- function l() {
387
- e.value = n.value.events, a.value = n.value.boundEventsList, f();
391
+ function i() {
392
+ e.value = n.value.events, r.value = n.value.boundEventsList, m();
388
393
  }
389
- function h(i) {
390
- r.value = r.value.filter((o) => o.label !== i.label);
394
+ function h(c) {
395
+ o.value = o.value.filter((t) => t.label !== c.label);
391
396
  }
392
- function m(i) {
393
- a.value = a.value.filter((o) => o.boundEvents.label !== i.label), f();
397
+ function f(c) {
398
+ r.value = r.value.filter((t) => t.boundEvents.label !== c.label), m();
394
399
  }
395
- function s() {
396
- var c;
397
- const i = (c = n.value) == null ? void 0 : c.getEventList(), { events: o } = i;
398
- i && (n.value.events = B(o), n.value.boundEventsList = i.boundEventsList), n.value.boundEventsList && (n.value.boundEventsList = n.value.boundEventsList.filter(function(p) {
399
- return o.find((d) => d.label == p.boundEvents.label);
400
+ function a() {
401
+ var l;
402
+ const c = (l = n.value) == null ? void 0 : l.getEventList(), { events: t } = c;
403
+ c && (n.value.events = S(t), n.value.boundEventsList = c.boundEventsList), n.value.boundEventsList && (n.value.boundEventsList = n.value.boundEventsList.filter(function(w) {
404
+ return t.find((d) => d.label === w.boundEvents.label);
400
405
  }));
401
406
  }
402
407
  return {
403
408
  allEvents: e,
404
- boundEvents: a,
405
- candidateEvents: r,
409
+ boundEvents: r,
410
+ candidateEvents: o,
406
411
  excludeFromCandidates: h,
407
- loadEvents: l,
408
- resetBoundEvents: s,
409
- unBoundEvent: m
412
+ loadEvents: i,
413
+ resetBoundEvents: a,
414
+ unBoundEvent: f
410
415
  };
411
416
  }
412
- const ke = {}, Ne = {
417
+ const Ne = {}, Pe = {
413
418
  events: { type: Array, default: [] }
414
- }, Ae = /* @__PURE__ */ D({
419
+ }, Ae = /* @__PURE__ */ F({
415
420
  name: "FEventList",
416
- props: Ne,
421
+ props: Pe,
417
422
  emits: ["click"],
418
423
  setup(n, e) {
419
- const a = b(n.events);
420
- function r(f) {
421
- e.emit("click", f);
424
+ const r = g(n.events);
425
+ function o(m) {
426
+ e.emit("click", m);
422
427
  }
423
- function u(f) {
424
- return t("div", {
428
+ function u(m) {
429
+ return s("div", {
425
430
  class: "f-page-events-editor-first-bound-event"
426
- }, [t("div", {
427
- onClick: () => r(f),
431
+ }, [s("div", {
432
+ onClick: () => o(m),
428
433
  class: "f-page-events-editor-first-bound-event-name"
429
- }, [f.name])]);
434
+ }, [m.name])]);
430
435
  }
431
- return () => t("div", {
436
+ return () => s("div", {
432
437
  class: "f-page-events-editor-events"
433
- }, [a.value.map((f) => u(f))]);
438
+ }, [r.value.map((m) => u(m))]);
434
439
  }
435
- }), X = /* @__PURE__ */ D({
440
+ }), Q = /* @__PURE__ */ F({
436
441
  name: "FInteractionButton",
437
- props: ke,
442
+ props: Ne,
438
443
  emits: ["click"],
439
444
  setup(n, e) {
440
- const a = R("useEventsComposition"), r = R("useInteractionCompostion"), {
441
- candidateEvents: u
442
- } = a, {
443
- collapseInteractions: f
444
- } = r, l = b(!1);
445
- function h(p) {
446
- u.value = u.value.filter((d) => d.label !== p.label);
445
+ const r = new oe(), o = O("useEventsComposition"), u = O("useInteractionCompostion"), {
446
+ candidateEvents: m
447
+ } = o, {
448
+ collapseInteractions: i
449
+ } = u, h = g(!1);
450
+ function f(l) {
451
+ m.value = m.value.filter((w) => w.label !== l.label);
447
452
  }
448
- function m() {
449
- l.value = !1;
453
+ function a(l = !1) {
454
+ h.value = l;
450
455
  }
451
- function s() {
452
- l.value = !0;
456
+ function c(l) {
457
+ a(), f(l), e.emit("click", l);
453
458
  }
454
- function i(p) {
455
- m(), h(p), e.emit("click", p);
456
- }
457
- function o() {
458
- l.value ? m() : s();
459
- }
460
- function c() {
461
- f(), o();
459
+ function t() {
460
+ if (m.value.length === 0) {
461
+ r.info({
462
+ position: "top-center",
463
+ message: "事件已全部绑定"
464
+ });
465
+ return;
466
+ }
467
+ i(), a(!h.value);
462
468
  }
463
- return () => t(ee, null, [t("div", {
469
+ return () => s(te, null, [s("div", {
464
470
  class: "f-page-events-editor-top-button"
465
- }, [t("button", {
471
+ }, [s("button", {
466
472
  class: "f-page-events-editor-button",
467
- onClick: c
468
- }, [t("span", {
473
+ onClick: t
474
+ }, [s("span", {
469
475
  class: "f-page-events-editor-text"
470
- }, [T("新建交互事件")])])]), l.value && t(Ae, {
471
- events: u.value,
472
- onClick: i
476
+ }, [R("新建交互事件")])])]), h.value && s(Ae, {
477
+ events: m.value,
478
+ onClick: c
473
479
  }, null)]);
474
480
  }
475
- }), Pe = {
481
+ }), Fe = {
476
482
  collapsed: { type: Boolean, default: !0 },
477
483
  displayOrder: { type: Number, default: -1 },
478
484
  interaction: { type: Object, default: {} },
479
485
  controllers: { type: Array, default: [] }
480
- }, Fe = {
486
+ }, Te = {
481
487
  /** 入参 */
482
488
  initialData: { Type: Object, default: {} },
483
489
  /** 原层级结构数据 */
@@ -494,380 +500,337 @@ const ke = {}, Ne = {
494
500
  haveBoundcommand: { Type: Boolean, default: !1 }
495
501
  }, De = {
496
502
  controllers: { type: Array, default: [] }
497
- }, Te = /* @__PURE__ */ D({
503
+ }, Oe = /* @__PURE__ */ F({
498
504
  name: "FCommandList",
499
505
  props: De,
500
506
  emits: ["selectMethod"],
501
507
  setup(n, e) {
502
- const a = b(n.controllers);
503
- function r(m) {
504
- return m.controllerList.length !== 0;
508
+ const r = g(n.controllers);
509
+ function o(f) {
510
+ return f.controllerList.length !== 0;
505
511
  }
506
- function u(m) {
507
- return r(m) && t("div", {
512
+ function u(f) {
513
+ return o(f) && s("div", {
508
514
  class: "f-page-internals-controller"
509
- }, [t("div", {
515
+ }, [s("div", {
510
516
  class: "f-page-internals-controller-name",
511
- title: m.controllerName.name
512
- }, [m.controllerName.name])]);
517
+ title: f.controllerName.name
518
+ }, [f.controllerName.name])]);
513
519
  }
514
- function f(m, s) {
520
+ function m(f, a) {
515
521
  e.emit("selectMethod", {
516
- method: m,
517
- controller: s
522
+ method: f,
523
+ controller: a
518
524
  });
519
525
  }
520
- function l(m) {
521
- return m.controllerList.map((s) => t("div", {
526
+ function i(f) {
527
+ return f.controllerList.map((a) => s("div", {
522
528
  class: "f-page-internals-command",
523
- onClick: () => f(s, m)
524
- }, [t("div", {
529
+ onClick: () => m(a, f)
530
+ }, [s("div", {
525
531
  class: "f-page-internals-command-name",
526
- title: s.label
527
- }, [s.name])]));
532
+ title: a.label
533
+ }, [a.name])]));
528
534
  }
529
- function h(m) {
530
- return t("div", null, [u(m), l(m)]);
535
+ function h(f) {
536
+ return s("div", null, [u(f), i(f)]);
531
537
  }
532
- return () => t("div", {
538
+ return () => s("div", {
533
539
  class: "f-page-internals"
534
- }, [a.value.map((m) => h(m))]);
540
+ }, [r.value.map((f) => h(f))]);
535
541
  }
536
- }), Oe = /* @__PURE__ */ D({
542
+ }), je = /* @__PURE__ */ F({
537
543
  name: "FCommandSource",
538
- props: Fe,
544
+ props: Te,
539
545
  emits: ["addInternalCommandListChanged", "newImportChanged", "currentCommandChanged", "originalDataChanged", "click", "existChanged", "newFucChanged", "close", "selectMethod"],
540
546
  setup(n, e) {
541
- const a = R("useMethodsComposition"), {
542
- controllers: r
543
- } = a, u = b(!1), f = b(n.canAddNewMethod), l = F(() => !f.value), h = F(() => u.value), m = F(() => ({
547
+ const r = O("useMethodsComposition"), {
548
+ controllers: o
549
+ } = r, u = g(!1), m = g(n.canAddNewMethod);
550
+ A(() => !m.value), A(() => u.value), A(() => ({
544
551
  "font-size": "15px",
545
552
  margin: "5px",
546
553
  color: "#226eff",
547
554
  flex: 1
548
- })), s = Symbol("controller schema repository inject token");
555
+ }));
549
556
  function i() {
550
- return t(ne, {
551
- injectSymbolToken: s,
552
- "view-type": "NavList"
553
- }, null);
554
- }
555
- function o() {
556
- te.show({
557
- title: "选择控制器",
558
- width: 950,
559
- render: i
560
- });
561
- }
562
- function c() {
563
- }
564
- function p() {
565
- }
566
- function d() {
567
- }
568
- function E() {
569
557
  e.emit("close", null);
570
558
  }
571
- function L() {
572
- return t("div", {
559
+ function h() {
560
+ return s("div", {
573
561
  class: "f-command-breakline"
574
- }, [T("------------------------------------------------------------")]);
562
+ }, [R("------------------------------------------------------------")]);
575
563
  }
576
- function g() {
577
- return t("div", {
578
- class: "f-page-internals-new-command"
579
- }, [t("div", {
580
- class: "f-page-internals-new-command-func1"
581
- }, [t("div", {
582
- class: "f-icon f-icon-panel-retraction",
583
- style: m.value
584
- }, null), t("div", {
585
- class: "f-function-class",
586
- onClick: () => o()
587
- }, [T("引入控制器")])]), l.value && t("div", {
588
- class: "f-page-internals-new-command-func2"
589
- }, [t("div", {
590
- class: "f-icon f-icon-new-edit",
591
- style: m.value
592
- }, null), t("div", {
593
- class: "f-function-class",
594
- onClick: () => void 0
595
- }, [T("添加新方法")])]), h.value && void 0, t("div", {
596
- class: "f-page-internals-new-command-func3"
597
- }, [t("div", {
598
- class: "f-icon f-icon-licensed",
599
- style: m.value
600
- }, null), t("div", {
601
- class: "f-function-class",
602
- onClick: () => void 0
603
- }, [T("已有方法")])])]);
604
- }
605
- function S(v) {
606
- e.emit("selectMethod", v);
564
+ function f(c) {
565
+ e.emit("selectMethod", c);
607
566
  }
608
- function y() {
609
- return t("div", {
567
+ function a() {
568
+ return s("div", {
610
569
  class: "f-page-command-source-choice"
611
- }, [t(Te, {
612
- controllers: r.value,
613
- onSelectMethod: S
570
+ }, [s(Oe, {
571
+ controllers: o.value,
572
+ onSelectMethod: f
614
573
  }, null)]);
615
574
  }
616
- return () => t("div", {
575
+ return () => s("div", {
617
576
  class: "f-page-events-editor-command-source"
618
- }, [y(), L(), g(), L(), t("div", null, [t("div", {
577
+ }, [a(), h(), h(), s("div", null, [s("div", {
619
578
  class: "f-page-internals-close",
620
- onClick: E
621
- }, [T("取消")])])]);
579
+ onClick: i
580
+ }, [R("取消")])])]);
622
581
  }
623
- }), je = {
582
+ }), Re = {
624
583
  command: { type: Object, default: {} }
625
- }, Re = /* @__PURE__ */ D({
584
+ }, Ve = /* @__PURE__ */ F({
626
585
  name: "FParameterEditor",
627
- props: je,
586
+ props: Re,
628
587
  emits: ["confirm", "change"],
629
588
  setup(n, e) {
630
- const a = b(n.command), r = b(0), u = b(!1), f = b(!1);
631
- b(""), b([]);
632
- const l = F(() => a.value !== null), h = F(() => u.value), m = F(() => f.value), s = F(() => !u.value && !f.value), i = b(!1);
633
- function o() {
589
+ const r = g(n.command), o = g(0), u = g(!1), m = g(!1);
590
+ g(""), g([]);
591
+ const i = A(() => r.value !== null), h = A(() => u.value), f = A(() => m.value), a = A(() => !u.value && !m.value), c = g(!1);
592
+ function t() {
634
593
  }
635
- function c() {
636
- return t("div", null, [t("div", {
594
+ function l() {
595
+ return s("div", null, [s("div", {
637
596
  title: "'方法已被移除,请重新绑定'",
638
597
  class: "f-icon f-icon-flowline-warning",
639
598
  style: "font-size: 13px;margin-right:10px; color: red;width: 30px;height: 20px;text-align: center;",
640
599
  onClick: () => void 0
641
600
  }, null)]);
642
601
  }
643
- function p() {
602
+ function w() {
644
603
  }
645
604
  function d() {
646
- return t("div", null, [t("div", {
605
+ return s("div", null, [s("div", {
647
606
  title: "'方法已被删除,请绑定其他方法'",
648
607
  class: "f-icon f-icon-flowline-warning",
649
608
  style: "font-size: 13px;margin-right:10px; color: red;width: 30px;height: 20px;text-align: center;",
650
609
  onClick: () => void 0
651
610
  }, null)]);
652
611
  }
653
- function E(M) {
654
- i.value = !i.value;
612
+ function y(k) {
613
+ c.value = !c.value;
655
614
  }
656
615
  function L() {
657
- return t("div", null, [t("div", {
616
+ return s("div", null, [s("div", {
658
617
  class: "f-icon f-icon-edit-button",
659
618
  style: "font-size: 13px;margin-right:10px;",
660
- onClick: () => E(r.value)
619
+ onClick: () => y(o.value)
661
620
  }, null)]);
662
621
  }
663
- function g(M, A) {
664
- A.value = M.target.value;
622
+ function b(k, P) {
623
+ P.value = k.target.value;
665
624
  }
666
- function S() {
667
- e.emit("change", a.value);
625
+ function M() {
626
+ e.emit("change", r.value);
668
627
  }
669
- function y(M) {
670
- return t("div", null, [t("input", {
628
+ function B(k) {
629
+ return s("div", null, [s("input", {
630
+ title: "ide-parameter-editor",
671
631
  class: "form-control f-utils-fill text-left",
672
- value: M.value,
673
- onChange: (A) => g(A, M),
674
- onBlur: (A) => S()
632
+ value: k.value,
633
+ onChange: (P) => b(P, k),
634
+ onBlur: (P) => M()
675
635
  }, null)]);
676
636
  }
677
- function v() {
678
- var M;
679
- return (M = a.value.property) == null ? void 0 : M.map((A) => t("div", null, [t("div", {
637
+ function p() {
638
+ var k;
639
+ return (k = r.value.property) == null ? void 0 : k.map((P) => s("div", null, [s("div", {
680
640
  class: "f-page-parameter-editor-row1"
681
- }, [t("div", {
641
+ }, [s("div", {
682
642
  class: "f-page-parameter-editor-parameter-name"
683
- }, [A.shownName, A.description && t("div", {
684
- class: "farris-label-tips"
685
- }, [t("i", {
686
- class: "f-icon f-icon-message_help",
687
- style: "color:#878D99;"
688
- }, null)])])]), t("div", {
643
+ }, [P.shownName, P.description && s("div", {
644
+ class: "ml-2 farris-label-tips"
645
+ }, [s("i", {
646
+ class: "f-icon f-icon-description-tips"
647
+ }, null)])])]), s("div", {
689
648
  class: "f-page-parameter-editor-row2"
690
- }, [y(A)])]));
649
+ }, [B(P)])]));
691
650
  }
692
- function C(M) {
693
- i.value = !1, e.emit("confirm");
651
+ function v(k) {
652
+ c.value = !1, e.emit("confirm");
694
653
  }
695
- function w() {
696
- return t("div", null, [t("div", {
654
+ function C() {
655
+ return s("div", null, [s("div", {
697
656
  class: "f-page-parameter-editor-btn"
698
- }, [t("div", {
657
+ }, [s("div", {
699
658
  class: "btn-finish",
700
- onClick: () => C(r.value)
701
- }, [T("完成")])])]);
659
+ onClick: () => v(o.value)
660
+ }, [R("完成")])])]);
702
661
  }
703
- function k() {
704
- return t("div", {
662
+ function E() {
663
+ return s("div", {
705
664
  class: "f-page-parameter-editor-group"
706
- }, [v()]);
665
+ }, [p()]);
707
666
  }
708
667
  function N() {
709
- return t("div", null, [t("div", {
668
+ return s("div", null, [s("div", {
710
669
  class: "f-page-parameter-editor-first-row"
711
- }, [t("span", {
670
+ }, [s("span", {
712
671
  class: "f-page-parameter-editor-command-name",
713
- title: a.value.label
714
- }, [a.value.name]), t("div", {
672
+ title: r.value.label
673
+ }, [r.value.name]), s("div", {
715
674
  class: "f-page-parameter-editor-first-row-icon"
716
- }, [h.value && c(), m.value && d(), s.value && L()])]), i.value && k(), i.value && w()]);
675
+ }, [h.value && l(), f.value && d(), a.value && L()])]), c.value && E(), c.value && C()]);
717
676
  }
718
- return () => t("div", {
677
+ return () => s("div", {
719
678
  class: "f-page-parameter-editor"
720
- }, [l.value && N()]);
679
+ }, [i.value && N()]);
721
680
  }
722
- }), Z = /* @__PURE__ */ D({
681
+ }), X = /* @__PURE__ */ F({
723
682
  name: "FInteractionItem",
724
- props: Pe,
683
+ props: Fe,
725
684
  emits: ["addAction", "delete", "toggle"],
726
685
  setup(n, e) {
727
- const a = R("useMethodsComposition"), {
728
- toggleSelectingMethod: r,
686
+ const r = O("useMethodsComposition"), {
687
+ toggleSelectingMethod: o,
729
688
  emitFinalState: u
730
- } = a, f = b(n.controllers), l = b(n.interaction), h = b(n.displayOrder), m = F(() => {
731
- const v = l.value.showSwitch[0];
732
- return v.showSection[v.showSwitchNumber][2];
733
- }), s = F(() => {
734
- const v = !!l.value.command, C = l.value.showSwitch[0], w = C.showSection[C.showSwitchNumber][3];
735
- return v && w;
736
- }), i = F(() => ({
689
+ } = r, m = g(n.controllers), i = g(n.interaction), h = g(n.displayOrder), f = A(() => {
690
+ const p = i.value.showSwitch[0];
691
+ return p.showSection[p.showSwitchNumber][2];
692
+ }), a = A(() => {
693
+ const p = !!i.value.command, v = i.value.showSwitch[0], C = v.showSection[v.showSwitchNumber][3];
694
+ return p && C;
695
+ }), c = A(() => ({
737
696
  "f-icon": !0,
738
- "f-icon-arrow-chevron-down": s.value,
739
- "f-icon-arrow-chevron-left": !s.value
697
+ "f-icon-arrow-chevron-down": a.value,
698
+ "f-icon-arrow-chevron-left": !a.value
740
699
  }));
741
- function o() {
700
+ function t() {
742
701
  e.emit("delete", h.value);
743
702
  }
744
- function c() {
745
- const v = l.value.showSwitch[0];
746
- v.showSection[v.showSwitchNumber][3] = !v.showSection[v.showSwitchNumber][3], e.emit("toggle", h.value);
703
+ function l() {
704
+ const p = i.value.showSwitch[0];
705
+ p.showSection[p.showSwitchNumber][3] = !p.showSection[p.showSwitchNumber][3], e.emit("toggle", h.value);
747
706
  }
748
- function p() {
749
- if (l.value.command !== null) {
750
- const C = l.value.showSwitch[0];
751
- r(C), e.emit("addAction", h.value);
707
+ function w() {
708
+ if (i.value.command !== null) {
709
+ const v = i.value.showSwitch[0];
710
+ o(v), e.emit("addAction", h.value);
752
711
  }
753
712
  }
754
- function d(v) {
755
- v === null && l.value.command === null && e.emit("delete", h.value);
756
- const C = l.value.showSwitch[0];
757
- r(C);
713
+ function d(p) {
714
+ p === null && i.value.command === null && e.emit("delete", h.value);
715
+ const v = i.value.showSwitch[0];
716
+ o(v);
758
717
  }
759
- function E(v) {
718
+ function y(p) {
760
719
  const {
761
- method: C,
762
- controller: w
763
- } = v, {
764
- id: k,
720
+ method: v,
721
+ controller: C
722
+ } = p, {
723
+ id: E,
765
724
  label: N,
766
- name: M,
767
- handlerName: A
768
- } = C, {
769
- controllerName: P
770
- } = w, I = !1, K = P.id;
771
- l.value.command = {
772
- id: k,
725
+ name: k,
726
+ handlerName: P,
727
+ property: x,
728
+ componentLists: K
729
+ } = v, {
730
+ controllerName: j
731
+ } = C, ee = !1, ne = j.id;
732
+ i.value.command = {
733
+ id: E,
773
734
  label: N,
774
- name: M,
775
- handlerName: A,
776
- hasPath: I,
777
- cmpId: K
778
- }, l.value.controller = {
779
- id: P.id,
780
- label: P.label,
781
- name: P.name
735
+ name: k,
736
+ handlerName: P,
737
+ hasPath: ee,
738
+ cmpId: ne,
739
+ property: x,
740
+ componentLists: K
741
+ }, i.value.controller = {
742
+ id: j.id,
743
+ label: j.label,
744
+ name: j.name
782
745
  };
783
- const j = l.value.showSwitch[0];
784
- j.showSwitchNumber = 2, j.showSection[j.showSwitchNumber][2] = !1, j.showSection[j.showSwitchNumber][3] = !0, u();
746
+ const D = i.value.showSwitch[0];
747
+ D.showSwitchNumber = 2, D.showSection[D.showSwitchNumber][2] = !1, D.showSection[D.showSwitchNumber][3] = !0, u();
785
748
  }
786
749
  function L() {
787
- return t(Oe, {
788
- controllers: f.value,
750
+ return s(je, {
751
+ controllers: m.value,
789
752
  onClose: d,
790
- onSelectMethod: E
753
+ onSelectMethod: y
791
754
  }, null);
792
755
  }
793
- function g() {
794
- const v = l.value.showSwitch[0];
795
- v.showSection[v.showSwitchNumber][3] = !1;
756
+ function b() {
757
+ const p = i.value.showSwitch[0];
758
+ p.showSection[p.showSwitchNumber][3] = !1;
796
759
  }
797
- function S(v) {
798
- l.value.command = B(v), u();
760
+ function M(p) {
761
+ i.value.command = S(p), u();
799
762
  }
800
- function y() {
801
- return t(Re, {
802
- command: l.value.command,
803
- onConfirm: () => g(),
804
- onChange: (v) => S(v)
763
+ function B() {
764
+ return s(Ve, {
765
+ command: i.value.command,
766
+ onConfirm: () => b(),
767
+ onChange: (p) => M(p)
805
768
  }, null);
806
769
  }
807
- return () => t("div", {
770
+ return () => s("div", {
808
771
  class: "show-switch"
809
- }, [t("div", {
772
+ }, [s("div", {
810
773
  class: "f-page-events-editor-bound-event"
811
- }, [t("div", {
774
+ }, [s("div", {
812
775
  class: "f-page-events-editor-bound-event-name",
813
- title: l.value.event.label
814
- }, [l.value.event.name]), t("div", {
776
+ title: i.value.event.label
777
+ }, [i.value.event.name]), s("div", {
815
778
  style: "float:right;margin:5px;"
816
- }, [t("div", {
817
- class: i.value,
779
+ }, [s("div", {
780
+ class: c.value,
818
781
  style: "font-size: 10px;",
819
- onClick: c
820
- }, null)]), t("div", {
782
+ onClick: l
783
+ }, null)]), s("div", {
821
784
  class: "f-icon f-icon-yxs_delete",
822
785
  style: "font-size: 13px;float: right; margin:8px;",
823
- onClick: o
824
- }, null), t("div", {
786
+ onClick: t
787
+ }, null), s("div", {
825
788
  class: "f-icon f-icon-home-add",
826
789
  style: "float:right; font-size: 10px; margin:8px;",
827
- onClick: p
828
- }, null)]), m.value && L(), s.value && y()]);
790
+ onClick: w
791
+ }, null)]), f.value && L(), a.value && B()]);
829
792
  }
830
793
  });
831
- function x(n, e, a) {
832
- const { interactions: r } = e, u = b(n.value.internalCommandList);
833
- function f(d) {
834
- r.value[d].showSwitch = [], r.value[d].showSwitch.push(B({
794
+ function Z(n, e, r) {
795
+ const { interactions: o } = e, u = g(n.value.internalCommandList);
796
+ function m(d) {
797
+ o.value[d].showSwitch = [], o.value[d].showSwitch.push(S({
835
798
  // 存储所有的展示设定
836
799
  showSection: [[!1, !1, !1, !1, !1], [!1, !1, !0, !1, !1], [!1, !0, !1, !0, !1]],
837
800
  // 展示哪个部分
838
801
  showSwitchNumber: 2
839
- })), r.value = B(r.value);
802
+ })), o.value = S(o.value);
840
803
  }
841
- function l(d, E, L) {
804
+ function i(d, y, L) {
842
805
  }
843
806
  function h(d) {
844
807
  var L;
845
- const E = [];
846
- return (L = n.value.newController) == null || L.forEach((g) => {
847
- d.forEach((S) => {
848
- g.Code === S.controller.label && E.push(B(g));
808
+ const y = [];
809
+ return (L = n.value.newController) == null || L.forEach((b) => {
810
+ d.forEach((M) => {
811
+ b.Code === M.controller.label && y.push(S(b));
849
812
  });
850
- }), E;
813
+ }), y;
851
814
  }
852
- function m() {
853
- var S;
815
+ function f() {
816
+ var M;
854
817
  n.value.isAddControllerMethod = !!n.value.newFuncEvents;
855
- const d = [], E = B(n.value.internalCommandList);
856
- r.value.map((y) => {
857
- const v = B(y.controller), C = B(y.command), w = B(y.event), k = { controller: v, command: C, boundEvents: w };
858
- d.push(B(k));
818
+ const d = [], y = S(n.value.internalCommandList);
819
+ o.value.map((B) => {
820
+ const p = S(B.controller), v = S(B.command), C = S(B.event), E = { controller: p, command: v, boundEvents: C };
821
+ d.push(S(E));
859
822
  });
860
- const L = (S = n.value.newController) != null && S.length && d.length ? B(h(d)) : [], g = {
823
+ const L = (M = n.value.newController) != null && M.length && d.length ? S(h(d)) : [], b = {
861
824
  /** 拼接名称时的前缀 */
862
825
  viewModelId: n.value.viewModelId,
863
826
  /** 视图模型绑定的事件下的方法列表 */
864
- savedCommand: B(n.value.viewModel),
827
+ savedCommand: S(n.value.viewModel),
865
828
  /** 当前界面显示的绑定事件 */
866
- boundEventsList: B(d),
829
+ boundEventsList: S(d),
867
830
  /** 可选择的绑定事件列表 */
868
- events: B(n.value.events),
831
+ events: S(n.value.events),
869
832
  /** 内置构件列表; */
870
- internalCommandList: B(E),
833
+ internalCommandList: S(y),
871
834
  /** 所有可选的组件 */
872
835
  componentLists: [],
873
836
  /** 接收formBasicService.formMetaBasicInfo.relativePath */
@@ -875,7 +838,7 @@ function x(n, e, a) {
875
838
  /** 接收formBasicService.envType */
876
839
  envType: n.value.envType,
877
840
  /** 初始为空,用于存储用户点击「导入新方法」的控制器值 */
878
- newController: B(L),
841
+ newController: S(L),
879
842
  /** 切换到代码视图标识 */
880
843
  isAddControllerMethod: n.value.isAddControllerMethod,
881
844
  /** 用户选择「已有方法」 */
@@ -883,234 +846,233 @@ function x(n, e, a) {
883
846
  /** 上一个绑定的方法 */
884
847
  preCommand: n.value.preCommand,
885
848
  /** 新增方法的对应事件 */
886
- newFuncEvents: B(n.value.newFuncEvents)
849
+ newFuncEvents: S(n.value.newFuncEvents)
887
850
  };
888
- a.emit("savedCommandListChanged", g);
851
+ r.emit("savedCommandListChanged", b);
889
852
  }
890
- function s(d) {
853
+ function a(d) {
891
854
  d.showSection[d.showSwitchNumber][2] = !0;
892
855
  }
893
- function i(d) {
856
+ function c(d) {
894
857
  d.showSection[d.showSwitchNumber][2] = !1;
895
858
  }
896
- function o(d) {
859
+ function t(d) {
897
860
  d.showSection[d.showSwitchNumber][3] = !0;
898
861
  }
899
- function c(d) {
862
+ function l(d) {
900
863
  d.showSection[d.showSwitchNumber][3] = !1;
901
864
  }
902
- function p(d) {
903
- d.showSection[d.showSwitchNumber][2] ? (i(d), o(d)) : (s(d), c(d));
865
+ function w(d) {
866
+ d.showSection[d.showSwitchNumber][2] ? (c(d), t(d)) : (a(d), l(d));
904
867
  }
905
868
  return {
906
869
  controllers: u,
907
- onClosed: f,
908
- emitFinalState: m,
909
- onCurrentCommandChanged: l,
910
- toggleSelectingMethod: p
870
+ onClosed: m,
871
+ emitFinalState: f,
872
+ onCurrentCommandChanged: i,
873
+ toggleSelectingMethod: w
911
874
  };
912
875
  }
913
- const V = /* @__PURE__ */ D({
876
+ const V = /* @__PURE__ */ F({
914
877
  name: "FEventsEditor",
915
- props: _,
878
+ props: I,
916
879
  emits: ["savedCommandListChanged"],
917
880
  setup(n, e) {
918
- const a = b(n.initialData), r = Q(a), {
881
+ const r = g(n.initialData), o = J(r), {
919
882
  loadEvents: u,
920
- resetBoundEvents: f
921
- } = r, l = Y(a, r), {
883
+ resetBoundEvents: m
884
+ } = o, i = Y(r, o), {
922
885
  addNewInteraction: h,
923
- deleteInteracton: m,
924
- interactions: s,
925
- loadInteractions: i
926
- } = l, o = x(a, l, e);
927
- O("useEventsComposition", r), O("useInteractionCompostion", l), O("useMethodsComposition", o);
928
- function c() {
929
- a.value.isAddControllerMethod = !1;
886
+ deleteInteracton: f,
887
+ interactions: a,
888
+ loadInteractions: c
889
+ } = i, t = Z(r, i, e);
890
+ T("useEventsComposition", o), T("useInteractionCompostion", i), T("useMethodsComposition", t);
891
+ function l() {
892
+ r.value.isAddControllerMethod = !1;
930
893
  }
931
- W(() => {
932
- c(), f(), u(), i();
894
+ _(() => {
895
+ l(), m(), u(), c();
933
896
  });
934
- function p(g) {
935
- m(g);
897
+ function w(b) {
898
+ f(b);
936
899
  }
937
- function d(g, S) {
938
- const y = g.showSwitch[0], v = y.showSection[y.showSwitchNumber][3];
939
- return t(Z, {
940
- interaction: g,
941
- displayOrder: S,
942
- collapsed: v,
943
- onDelete: p
900
+ function d(b, M) {
901
+ const B = b.showSwitch[0], p = B.showSection[B.showSwitchNumber][3];
902
+ return s(X, {
903
+ interaction: b,
904
+ displayOrder: M,
905
+ collapsed: p,
906
+ onDelete: w
944
907
  }, null);
945
908
  }
946
- function E() {
947
- var g;
948
- return (g = s.value) == null ? void 0 : g.map((S, y) => t("div", {
909
+ function y() {
910
+ var b;
911
+ return (b = a.value) == null ? void 0 : b.map((M, B) => s("div", {
949
912
  class: "events-display-order",
950
- key: S.event.label
951
- }, [d(S, y)]));
913
+ key: M.event.label
914
+ }, [d(M, B)]));
952
915
  }
953
- function L(g) {
954
- h(g);
916
+ function L(b) {
917
+ h(b);
955
918
  }
956
- return () => t("div", {
919
+ return () => s("div", {
957
920
  class: "f-page-events-editor"
958
- }, [t("div", {
921
+ }, [s("div", {
959
922
  class: "f-page-events-editor-content"
960
- }, [t(X, {
923
+ }, [s(Q, {
961
924
  onClick: L
962
- }, null), E()])]);
925
+ }, null), y()])]);
963
926
  }
964
927
  });
965
- function Ie(n, e, a) {
966
- var C;
967
- function r() {
968
- }
969
- const u = "", f = "", l = b();
970
- function h() {
928
+ function $e(n, e, r) {
929
+ var p;
930
+ const o = "", u = "", m = g();
931
+ function i() {
971
932
  return (e == null ? void 0 : e.schema.componentType) !== "frame";
972
933
  }
973
- function m() {
934
+ function h() {
974
935
  return !1;
975
936
  }
976
- function s() {
937
+ function f() {
977
938
  return (e == null ? void 0 : e.schema.componentType) !== "frame";
978
939
  }
979
- function i() {
940
+ function a() {
980
941
  return (e == null ? void 0 : e.schema.componentType) === "frame";
981
942
  }
982
- function o(w) {
983
- if (!w || !w.value)
943
+ function c(v) {
944
+ if (!v || !v.value)
984
945
  return null;
985
- if (w.value.schema && w.value.schema.type === "component")
986
- return w.value;
987
- const k = b(w == null ? void 0 : w.value.parent), N = o(k);
988
- return N || null;
946
+ if (v.value.schema && v.value.schema.type === "component")
947
+ return v.value;
948
+ const C = g(v == null ? void 0 : v.value.parent), E = c(C);
949
+ return E || null;
989
950
  }
990
- function c(w = e) {
991
- const { componentInstance: k, designerItemElementRef: N } = w;
992
- return !k || !k.value ? null : k.value.canMove ? N : c(w.parent);
951
+ function t(v = e) {
952
+ const { componentInstance: C, designerItemElementRef: E } = v;
953
+ return !C || !C.value ? null : C.value.canMove ? E : t(v.parent);
993
954
  }
994
- function p(w) {
995
- return !!a;
955
+ function l(v) {
956
+ return !!r;
996
957
  }
997
- function d() {
958
+ function w() {
998
959
  return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
999
960
  }
1000
- function E() {
961
+ function d() {
1001
962
  }
1002
- function L(w, k) {
963
+ function y(v, C) {
1003
964
  }
1004
- function g(w, k) {
1005
- const { componentType: N } = w;
1006
- let M = $(N, w, k);
1007
- const A = N.toLowerCase().replace("-", "_");
1008
- return M && !M.id && M.type === N && (M.id = `${A}_${Math.random().toString().slice(2, 6)}`), M;
965
+ function L(v, C) {
966
+ const { componentType: E } = v;
967
+ let N = U(E, v, C);
968
+ const k = E.toLowerCase().replace(/-/g, "_");
969
+ return N && !N.id && N.type === E && (N.id = `${k}_${Math.random().toString().slice(2, 6)}`), N;
1009
970
  }
1010
- function S(w, k) {
1011
- const N = String(w.getAttribute("data-controltype")), M = w.getAttribute("data-feature"), A = M ? JSON.parse(M) : {};
1012
- A.parentComponentInstance = l.value;
1013
- let P = $(N, A);
1014
- const I = N.toLowerCase().replace("-", "_");
1015
- return P && !P.id && P.type === N && (P.id = `${I}_${Math.random().toString().slice(2, 6)}`), P;
971
+ function b(v) {
1016
972
  }
1017
- function y(w) {
973
+ function M(...v) {
1018
974
  }
1019
- function v(...w) {
975
+ function B() {
976
+ e != null && e.schema.contents && e.schema.contents.map((v) => {
977
+ var N;
978
+ let C = v.id;
979
+ v.type === "component-ref" && (C = v.component);
980
+ const E = n.value.querySelector(`#${C}-design-item`);
981
+ (N = E == null ? void 0 : E.componentInstance) != null && N.value.onRemoveComponent && E.componentInstance.value.onRemoveComponent();
982
+ });
1020
983
  }
1021
- return l.value = {
1022
- canMove: h(),
1023
- canSelectParent: m(),
1024
- canDelete: s(),
1025
- canNested: !i(),
984
+ return m.value = {
985
+ canMove: i(),
986
+ canSelectParent: h(),
987
+ canDelete: f(),
988
+ canNested: !a(),
1026
989
  contents: e == null ? void 0 : e.schema.contents,
1027
990
  elementRef: n,
1028
- parent: (C = e == null ? void 0 : e.parent) == null ? void 0 : C.componentInstance,
991
+ parent: (p = e == null ? void 0 : e.parent) == null ? void 0 : p.componentInstance,
1029
992
  schema: e == null ? void 0 : e.schema,
1030
- styles: u,
1031
- designerClass: f,
1032
- canAccepts: p,
1033
- getBelongedComponentInstance: o,
1034
- getDraggableDesignItemElement: c,
1035
- getDraggingDisplayText: d,
1036
- getPropConfig: v,
1037
- getDragScopeElement: E,
1038
- onAcceptMovedChildElement: L,
1039
- onAcceptNewChildElement: S,
1040
- onChildElementMovedOut: y,
1041
- addNewChildComponentSchema: g,
1042
- updateDragAndDropRules: r,
1043
- triggerBelongedComponentToMoveWhenMoved: b(!1),
1044
- triggerBelongedComponentToDeleteWhenDeleted: b(!1)
1045
- }, l;
993
+ styles: o,
994
+ designerClass: u,
995
+ canAccepts: l,
996
+ getBelongedComponentInstance: c,
997
+ getDraggableDesignItemElement: t,
998
+ getDraggingDisplayText: w,
999
+ getPropConfig: M,
1000
+ getDragScopeElement: d,
1001
+ onAcceptMovedChildElement: y,
1002
+ onChildElementMovedOut: b,
1003
+ addNewChildComponentSchema: L,
1004
+ triggerBelongedComponentToMoveWhenMoved: g(!1),
1005
+ triggerBelongedComponentToDeleteWhenDeleted: g(!1),
1006
+ onRemoveComponent: B
1007
+ }, m;
1046
1008
  }
1047
- const Ve = /* @__PURE__ */ D({
1009
+ const Ie = /* @__PURE__ */ F({
1048
1010
  name: "FEventsEditorDesign",
1049
- props: _,
1011
+ props: I,
1050
1012
  emits: ["savedCommandListChanged"],
1051
1013
  setup(n, e) {
1052
- const a = b(n.initialData), r = Q(a), {
1014
+ const r = g(n.initialData), o = J(r), {
1053
1015
  loadEvents: u,
1054
- resetBoundEvents: f
1055
- } = r, l = Y(a, r), {
1016
+ resetBoundEvents: m
1017
+ } = o, i = Y(r, o), {
1056
1018
  addNewInteraction: h,
1057
- deleteInteracton: m,
1058
- interactions: s,
1059
- loadInteractions: i
1060
- } = l, o = x(a, l, e);
1061
- O("useEventsComposition", r), O("useInteractionCompostion", l), O("useMethodsComposition", o);
1062
- const c = b(), p = R("design-item-context"), d = Ie(c, p);
1063
- W(() => {
1064
- c.value.componentInstance = d, E(), f(), u(), i();
1019
+ deleteInteracton: f,
1020
+ interactions: a,
1021
+ loadInteractions: c
1022
+ } = i, t = Z(r, i, e);
1023
+ T("useEventsComposition", o), T("useInteractionCompostion", i), T("useMethodsComposition", t);
1024
+ const l = g(), w = O("design-item-context"), d = $e(l, w);
1025
+ _(() => {
1026
+ l.value.componentInstance = d, y(), m(), u(), c();
1065
1027
  }), e.expose(d.value);
1066
- function E() {
1067
- a.value.isAddControllerMethod = !1;
1028
+ function y() {
1029
+ r.value.isAddControllerMethod = !1;
1068
1030
  }
1069
- function L(v) {
1070
- m(v);
1031
+ function L(p) {
1032
+ f(p);
1071
1033
  }
1072
- function g(v, C) {
1073
- const w = v.showSwitch[0], k = w.showSection[w.showSwitchNumber][3];
1074
- return t(Z, {
1075
- interaction: v,
1076
- displayOrder: C,
1077
- collapsed: k,
1034
+ function b(p, v) {
1035
+ const C = p.showSwitch[0], E = C.showSection[C.showSwitchNumber][3];
1036
+ return s(X, {
1037
+ interaction: p,
1038
+ displayOrder: v,
1039
+ collapsed: E,
1078
1040
  onDelete: L
1079
1041
  }, null);
1080
1042
  }
1081
- function S() {
1082
- var v;
1083
- return (v = s.value) == null ? void 0 : v.map((C, w) => t("div", {
1043
+ function M() {
1044
+ var p;
1045
+ return (p = a.value) == null ? void 0 : p.map((v, C) => s("div", {
1084
1046
  class: "events-display-order",
1085
- key: C.event.label
1086
- }, [g(C, w)]));
1047
+ key: v.event.label
1048
+ }, [b(v, C)]));
1087
1049
  }
1088
- function y(v) {
1089
- h(v);
1050
+ function B(p) {
1051
+ h(p);
1090
1052
  }
1091
- return () => t("div", {
1092
- ref: c,
1053
+ return () => s("div", {
1054
+ ref: l,
1093
1055
  class: "f-page-events-editor"
1094
- }, [t("div", {
1056
+ }, [s("div", {
1095
1057
  class: "f-page-events-editor-content"
1096
- }, [t(X, {
1097
- onClick: y
1098
- }, null), S()])]);
1058
+ }, [s(Q, {
1059
+ onClick: B
1060
+ }, null), M()])]);
1099
1061
  }
1100
- }), Ge = {
1062
+ }), Ue = {
1101
1063
  install(n) {
1102
1064
  n.component(V.name, V);
1103
1065
  },
1104
- register(n, e, a, r) {
1105
- n["events-editor"] = V, e["events-editor"] = G;
1066
+ register(n, e, r, o) {
1067
+ n["events-editor"] = V, e["events-editor"] = H;
1106
1068
  },
1107
- registerDesigner(n, e, a) {
1108
- n["events-editor"] = Ve, e["events-editor"] = G;
1069
+ registerDesigner(n, e, r) {
1070
+ n["events-editor"] = Ie, e["events-editor"] = H;
1109
1071
  }
1110
1072
  };
1111
1073
  export {
1112
1074
  V as FEventsEditor,
1113
- Ge as default,
1114
- _ as eventsEditorProps,
1115
- G as propsResolver
1075
+ Ue as default,
1076
+ I as eventsEditorProps,
1077
+ H as propsResolver
1116
1078
  };