@farris/ui-vue 1.3.1 → 1.3.4

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