@farris/ui-vue 1.3.4 → 1.3.6

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