@farris/ui-vue 1.3.3 → 1.3.5

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