@farris/ui-vue 1.3.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/accordion/index.esm.js +1 -1
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +472 -366
- package/components/avatar/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +1 -1
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +472 -480
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +225 -233
- package/components/capsule/index.umd.cjs +1 -1
- package/components/checkbox/index.esm.js +615 -517
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +325 -333
- package/components/color-picker/index.umd.cjs +2 -2
- package/components/combo-list/index.esm.js +578 -472
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +49 -49
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/common/index.esm.js +832 -722
- package/components/common/index.umd.cjs +1 -1
- package/components/component/index.esm.js +303 -981
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +8 -8
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +335 -1002
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.esm.js +4429 -4312
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +3037 -3020
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +2216 -2119
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +914 -883
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/dropdown/index.esm.js +223 -231
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +1691 -2187
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +143 -136
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +250 -258
- package/components/events-editor/index.umd.cjs +1 -1
- package/components/expression-editor/index.esm.js +1 -1
- package/components/expression-editor/index.umd.cjs +1 -1
- package/components/external-container/index.esm.js +2672 -3438
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.esm.js +2965 -2970
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.esm.js +1650 -1602
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.css +1 -1
- package/components/flow-canvas/index.esm.js +684 -675
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +453 -461
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/input-group/index.esm.js +604 -507
- package/components/input-group/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +402 -378
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +348 -1019
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.esm.js +1658 -1666
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.esm.js +5209 -5088
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +4329 -4213
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +905 -1357
- package/components/nav/index.umd.cjs +3 -3
- package/components/number-range/index.esm.js +517 -420
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +588 -491
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.esm.js +1376 -1965
- package/components/order/index.umd.cjs +1 -1
- package/components/page-footer/index.esm.js +1 -1
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +1073 -1905
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +809 -1237
- package/components/pagination/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +198 -206
- package/components/progress/index.umd.cjs +3 -3
- package/components/property-editor/index.esm.js +1297 -1200
- package/components/property-editor/index.umd.cjs +2 -2
- package/components/property-panel/index.esm.js +609 -507
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/query-solution/index.esm.js +3391 -3758
- package/components/query-solution/index.umd.cjs +1 -1
- package/components/radio-button/index.esm.js +1 -1
- package/components/radio-button/index.umd.cjs +1 -1
- package/components/radio-group/index.esm.js +544 -447
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +247 -255
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +146 -154
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +700 -675
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +956 -1786
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +4963 -5617
- package/components/schema-selector/index.umd.cjs +2 -2
- package/components/search-box/index.esm.js +158 -161
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +436 -1124
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +92 -100
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/splitter/index.esm.js +571 -1210
- package/components/splitter/index.umd.cjs +1 -1
- package/components/splitter/style.js +2 -0
- package/components/step/index.esm.js +239 -247
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +445 -348
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +2278 -3031
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tags/index.esm.js +311 -319
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +215 -223
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +468 -371
- package/components/textarea/index.umd.cjs +1 -1
- package/components/time-picker/index.esm.js +1271 -1174
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +469 -477
- package/components/transfer/index.umd.cjs +1 -1
- package/components/tree-grid/index.esm.js +3060 -3065
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +2476 -2481
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +374 -382
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +248 -256
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +414 -1093
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +498 -506
- package/components/weather/index.umd.cjs +5 -5
- package/farris.all.esm.js +20216 -21844
- package/farris.all.umd.cjs +9 -9
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/common/directive/area-response.d.ts +10 -0
- package/types/common/index.d.ts +8 -0
- package/types/common/radio-checkbox/radio-checkbox.props.d.ts +1 -0
- package/types/common/utils/resolve-field.d.ts +2 -0
- package/types/common/utils/use-class.d.ts +7 -0
- package/types/component/src/designer/use-designer-rules.d.ts +2 -2
- package/types/condition/src/types.d.ts +2 -1
- package/types/content-container/src/designer/use-designer-rules.d.ts +3 -3
- package/types/data-grid/index.d.ts +8 -5
- package/types/data-grid/src/data-grid.component.d.ts +3 -2
- package/types/data-grid/src/designer/data-grid.design.component.d.ts +2 -2
- package/types/data-grid/src/designer/use-designer-rules.d.ts +2 -2
- package/types/data-view/components/row/hierarchy-row.component.d.ts +2 -2
- package/types/data-view/composition/data/use-tree-data.d.ts +1 -1
- package/types/data-view/composition/types.d.ts +7 -9
- package/types/designer-canvas/index.d.ts +2 -1
- package/types/designer-canvas/src/composition/rule/use-dragula-common-rule.d.ts +4 -0
- package/types/designer-canvas/src/composition/rule/use-template-rule.d.ts +30 -0
- package/types/designer-canvas/src/composition/types.d.ts +1 -2
- package/types/designer-canvas/src/types.d.ts +2 -1
- package/types/dynamic-form/src/designer/response-form.design.component.d.ts +7 -1
- package/types/dynamic-form/src/designer/use-designer-rules.d.ts +2 -2
- package/types/dynamic-form/src/property-config/form.property-config.d.ts +1 -1
- package/types/dynamic-resolver/src/common/toolbar-resolver.d.ts +1 -1
- package/types/external-container/src/designer/use-designer-rules.d.ts +3 -3
- package/types/layout/src/designer/layout-pane-use-designer-rules.d.ts +3 -3
- package/types/list-nav/src/designer/use-designer-rules.d.ts +3 -0
- package/types/pagination/src/components/buttons/goto-buttons.component.d.ts +2 -2
- package/types/pagination/src/components/buttons/next-buttons.component.d.ts +2 -2
- package/types/pagination/src/components/buttons/previous-buttons.component.d.ts +2 -2
- package/types/pagination/src/components/pages/page-list.component.d.ts +2 -2
- package/types/pagination/src/components/pages/page-number.component.d.ts +2 -2
- package/types/property-panel/index.d.ts +2 -1
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +1 -1
- package/types/query-solution/src/designer/query-solution-config/composition/types.d.ts +34 -27
- package/types/query-solution/src/designer/query-solution-config/composition/use-panel.d.ts +2 -16
- package/types/query-solution/src/designer/query-solution-config/composition/use-property.d.ts +19 -0
- package/types/query-solution/src/designer/query-solution-config/composition/use-querysolution-rules.d.ts +3 -0
- package/types/query-solution/src/designer/query-solution-config/composition/use-transfer.d.ts +1 -1
- package/types/query-solution/src/property-config/query-solution.property-config.d.ts +60 -0
- package/types/query-solution/src/solutions.d.ts +108 -509
- package/types/response-layout-editor/index.d.ts +3 -1
- package/types/response-toolbar/src/designer/use-designer-rules.d.ts +3 -3
- package/types/response-toolbar/src/property-config/response-toolbar-item.property-config.d.ts +1 -0
- package/types/section/src/designer/use-designer-rules.d.ts +3 -3
- package/types/splitter/src/components/splitter-pane.component.d.ts +1 -1
- package/types/splitter/src/designer/splitter-pane-use-designer-rules.d.ts +3 -3
- package/types/splitter/src/designer/splitter-use-designer-rules.d.ts +3 -3
- package/types/tabs/src/designer/tab-page-use-designer-rules.d.ts +3 -3
- package/types/tabs/src/designer/tab-use-designer-rules.d.ts +3 -3
- package/types/tree-grid/index.d.ts +3 -3
- package/types/tree-grid/src/tree-grid.component.d.ts +1 -1
- package/types/designer-canvas/src/composition/rule/use-drag-drop-rules.d.ts +0 -19
- package/types/designer-canvas/src/composition/use-dragula-common-rule.d.ts +0 -4
- package/types/list-nav/src/composition/use-designer-rules.d.ts +0 -3
- package/types/query-solution/src/designer/query-solution-config/composition/mock-data.d.ts +0 -6
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { ref as b, defineComponent as
|
|
2
|
-
import { isPlainObject as
|
|
1
|
+
import { ref as b, defineComponent as F, createVNode as t, inject as j, Fragment as ee, createTextVNode as D, computed as P, provide as T, onMounted as _ } from "vue";
|
|
2
|
+
import { isPlainObject as z, cloneDeep as M } from "lodash-es";
|
|
3
3
|
import { FSchemaSelector as ne } from "../schema-selector/index.esm.js";
|
|
4
4
|
import { FModalService as te } from "../modal/index.esm.js";
|
|
5
5
|
import "../combo-list/index.esm.js";
|
|
6
|
-
const
|
|
7
|
-
function
|
|
8
|
-
const { properties: e, title:
|
|
9
|
-
return (!u || !r.find((l) => l == "id")) && (f.id = `${
|
|
6
|
+
const G = {}, W = {};
|
|
7
|
+
function V(n) {
|
|
8
|
+
const { properties: e, title: s, ignore: r } = n, u = r && Array.isArray(r), f = Object.keys(e).reduce((l, h) => ((!u || !r.find((m) => m == h)) && (l[h] = e[h].type === "object" && e[h].properties ? V(e[h]) : M(e[h].default)), l), {});
|
|
9
|
+
return s && (!u || !r.find((l) => l == "id")) && (f.id = `${s}-${Date.now()}`), f;
|
|
10
10
|
}
|
|
11
|
-
function
|
|
12
|
-
const r =
|
|
11
|
+
function U(n, e = {}, s) {
|
|
12
|
+
const r = G[n];
|
|
13
13
|
if (r) {
|
|
14
|
-
let u =
|
|
15
|
-
const f =
|
|
16
|
-
return u = f ? f({ getSchemaByType:
|
|
14
|
+
let u = V(r);
|
|
15
|
+
const f = W[n];
|
|
16
|
+
return u = f ? f({ getSchemaByType: U }, u, e, s) : u, u;
|
|
17
17
|
}
|
|
18
18
|
return null;
|
|
19
19
|
}
|
|
20
20
|
function oe(n, e) {
|
|
21
|
-
const
|
|
22
|
-
return Object.keys(n).reduce((r, u) => (r[u] &&
|
|
21
|
+
const s = V(e);
|
|
22
|
+
return Object.keys(n).reduce((r, u) => (r[u] && z(r[u]) && z(n[u]) ? Object.assign(r[u], n[u]) : r[u] = n[u], r), s), s;
|
|
23
23
|
}
|
|
24
24
|
function re(n, e) {
|
|
25
25
|
return Object.keys(n).filter((r) => n[r] != null).reduce((r, u) => {
|
|
@@ -36,69 +36,69 @@ function re(n, e) {
|
|
|
36
36
|
return r;
|
|
37
37
|
}, {});
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function se(n, e, s = /* @__PURE__ */ new Map()) {
|
|
40
40
|
const r = oe(n, e);
|
|
41
|
-
return re(r,
|
|
41
|
+
return re(r, s);
|
|
42
42
|
}
|
|
43
|
-
function
|
|
44
|
-
function e(
|
|
43
|
+
function ae(n = {}) {
|
|
44
|
+
function e(a, i, o, c) {
|
|
45
45
|
if (typeof o == "number")
|
|
46
|
-
return c[
|
|
46
|
+
return c[a].length === o;
|
|
47
47
|
if (typeof o == "object") {
|
|
48
48
|
const p = Object.keys(o)[0], d = o[p];
|
|
49
49
|
if (p === "not")
|
|
50
|
-
return Number(c[
|
|
50
|
+
return Number(c[a].length) !== Number(d);
|
|
51
51
|
if (p === "moreThan")
|
|
52
|
-
return Number(c[
|
|
52
|
+
return Number(c[a].length) >= Number(d);
|
|
53
53
|
if (p === "lessThan")
|
|
54
|
-
return Number(c[
|
|
54
|
+
return Number(c[a].length) <= Number(d);
|
|
55
55
|
}
|
|
56
56
|
return !1;
|
|
57
57
|
}
|
|
58
|
-
function a
|
|
59
|
-
return c[
|
|
58
|
+
function s(a, i, o, c) {
|
|
59
|
+
return c[a] && c[a].propertyValue && String(c[a].propertyValue.value) === String(o);
|
|
60
60
|
}
|
|
61
61
|
const r = /* @__PURE__ */ new Map([
|
|
62
62
|
["length", e],
|
|
63
|
-
["getProperty",
|
|
63
|
+
["getProperty", s]
|
|
64
64
|
]);
|
|
65
|
-
Object.keys(n).reduce((
|
|
66
|
-
function u(
|
|
67
|
-
const o =
|
|
68
|
-
return typeof i == "number" ? [{ target: o, operator: "length", param: null, value: Number(i) }] : typeof i == "boolean" ? [{ target: o, operator: "getProperty", param:
|
|
65
|
+
Object.keys(n).reduce((a, i) => (a.set(i, n[i]), a), r);
|
|
66
|
+
function u(a, i) {
|
|
67
|
+
const o = a;
|
|
68
|
+
return typeof i == "number" ? [{ target: o, operator: "length", param: null, value: Number(i) }] : typeof i == "boolean" ? [{ target: o, operator: "getProperty", param: a, value: !!i }] : typeof i == "object" ? Object.keys(i).map((c) => {
|
|
69
69
|
if (c === "length")
|
|
70
70
|
return { target: o, operator: "length", param: null, value: i[c] };
|
|
71
71
|
const p = c, d = i[c];
|
|
72
72
|
return { target: o, operator: "getProperty", param: p, value: d };
|
|
73
73
|
}) : [];
|
|
74
74
|
}
|
|
75
|
-
function f(
|
|
76
|
-
return Object.keys(
|
|
77
|
-
const p = u(c,
|
|
75
|
+
function f(a) {
|
|
76
|
+
return Object.keys(a).reduce((o, c) => {
|
|
77
|
+
const p = u(c, a[c]);
|
|
78
78
|
return o.push(...p), o;
|
|
79
79
|
}, []);
|
|
80
80
|
}
|
|
81
|
-
function l(
|
|
82
|
-
if (r.has(
|
|
83
|
-
const o = r.get(
|
|
84
|
-
return o && o(
|
|
81
|
+
function l(a, i) {
|
|
82
|
+
if (r.has(a.operator)) {
|
|
83
|
+
const o = r.get(a.operator);
|
|
84
|
+
return o && o(a.target, a.param, a.value, i) || !1;
|
|
85
85
|
}
|
|
86
86
|
return !1;
|
|
87
87
|
}
|
|
88
|
-
function h(
|
|
89
|
-
return f(
|
|
88
|
+
function h(a, i) {
|
|
89
|
+
return f(a).reduce((p, d) => p && l(d, i), !0);
|
|
90
90
|
}
|
|
91
|
-
function m(
|
|
92
|
-
const o = Object.keys(
|
|
91
|
+
function m(a, i) {
|
|
92
|
+
const o = Object.keys(a), c = o.includes("allOf"), p = o.includes("anyOf"), d = c || p, g = (d ? a[d ? c ? "allOf" : "anyOf" : "allOf"] : [a]).map((y) => h(y, i));
|
|
93
93
|
return c ? !g.includes(!1) : g.includes(!0);
|
|
94
94
|
}
|
|
95
95
|
return { parseValueSchema: m };
|
|
96
96
|
}
|
|
97
97
|
const le = {}, ce = {};
|
|
98
|
-
|
|
99
|
-
function ie(n, e,
|
|
100
|
-
return
|
|
101
|
-
const h =
|
|
98
|
+
ae();
|
|
99
|
+
function ie(n, e, s = /* @__PURE__ */ new Map(), r = (l, h, m) => h, u = {}, f = (l) => l) {
|
|
100
|
+
return G[e.title] = e, W[e.title] = r, le[e.title] = u, ce[e.title] = f, (l = {}) => {
|
|
101
|
+
const h = se(l, e, s), m = Object.keys(n).reduce((a, i) => (a[i] = n[i].default, a), {});
|
|
102
102
|
return Object.assign(m, h);
|
|
103
103
|
};
|
|
104
104
|
}
|
|
@@ -108,7 +108,7 @@ function ue(n, e) {
|
|
|
108
108
|
const de = /* @__PURE__ */ new Map([
|
|
109
109
|
["appearance", ue]
|
|
110
110
|
]);
|
|
111
|
-
function fe(n, e,
|
|
111
|
+
function fe(n, e, s) {
|
|
112
112
|
return e;
|
|
113
113
|
}
|
|
114
114
|
const me = "https://json-schema.org/draft/2020-12/schema", ve = "https://farris-design.gitee.io/events-editor.schema.json", pe = "events-editor", he = "A Farris Component", we = "object", ge = {
|
|
@@ -189,7 +189,7 @@ const me = "https://json-schema.org/draft/2020-12/schema", ve = "https://farris-
|
|
|
189
189
|
description: Se,
|
|
190
190
|
type: ye,
|
|
191
191
|
categories: Me
|
|
192
|
-
},
|
|
192
|
+
}, q = [
|
|
193
193
|
{
|
|
194
194
|
label: "pageChange",
|
|
195
195
|
name: "MockMock切换页码"
|
|
@@ -210,7 +210,7 @@ const me = "https://json-schema.org/draft/2020-12/schema", ve = "https://farris-
|
|
|
210
210
|
label: "onDeleteClicked",
|
|
211
211
|
name: "Mock操作列点击删除"
|
|
212
212
|
}
|
|
213
|
-
],
|
|
213
|
+
], ke = {
|
|
214
214
|
propertyID: "data-grid-component-viewmodel",
|
|
215
215
|
propertyType: "events",
|
|
216
216
|
/** 内置构件显示的命令列表 */
|
|
@@ -274,7 +274,7 @@ const me = "https://json-schema.org/draft/2020-12/schema", ve = "https://farris-
|
|
|
274
274
|
}
|
|
275
275
|
],
|
|
276
276
|
/** (事件设定)可绑定事件默认列表; */
|
|
277
|
-
events:
|
|
277
|
+
events: q,
|
|
278
278
|
/** 已绑定的事件(拼接已有的参数值,拼接当前事件->待集成-从dom结构中取值,事件及对应的字符串) */
|
|
279
279
|
boundEventsList: [],
|
|
280
280
|
/** 视图模型已有命令 */
|
|
@@ -292,18 +292,18 @@ const me = "https://json-schema.org/draft/2020-12/schema", ve = "https://farris-
|
|
|
292
292
|
/** 初始为空,用于存储用户点击「导入新命令」的控制器值 */
|
|
293
293
|
newController: [],
|
|
294
294
|
isAddControllerMethod: !1,
|
|
295
|
-
getEventList: () => ({ events:
|
|
296
|
-
},
|
|
297
|
-
initialData: { type: Object, default:
|
|
298
|
-
},
|
|
299
|
-
|
|
295
|
+
getEventList: () => ({ events: q, boundEventsList: [] })
|
|
296
|
+
}, $ = {
|
|
297
|
+
initialData: { type: Object, default: ke }
|
|
298
|
+
}, H = ie(
|
|
299
|
+
$,
|
|
300
300
|
Ce,
|
|
301
301
|
de,
|
|
302
302
|
fe,
|
|
303
303
|
Be
|
|
304
304
|
);
|
|
305
305
|
function Y(n, e) {
|
|
306
|
-
const
|
|
306
|
+
const s = b([]), { boundEvents: r, unBoundEvent: u } = e;
|
|
307
307
|
function f(o) {
|
|
308
308
|
return {
|
|
309
309
|
/** 当前事件名称及label */
|
|
@@ -324,14 +324,14 @@ function Y(n, e) {
|
|
|
324
324
|
showSwitchNumber: 2
|
|
325
325
|
}],
|
|
326
326
|
/** 方法列表 */
|
|
327
|
-
command:
|
|
327
|
+
command: M(o.command),
|
|
328
328
|
/** 当前的控制器 */
|
|
329
|
-
controller:
|
|
329
|
+
controller: M(o.controller)
|
|
330
330
|
};
|
|
331
331
|
}
|
|
332
332
|
function l() {
|
|
333
333
|
var o;
|
|
334
|
-
|
|
334
|
+
s.value = (o = r.value) == null ? void 0 : o.map((c) => f(c));
|
|
335
335
|
}
|
|
336
336
|
function h(o) {
|
|
337
337
|
const p = f({
|
|
@@ -339,40 +339,40 @@ function Y(n, e) {
|
|
|
339
339
|
command: null,
|
|
340
340
|
controller: { id: "", name: "", label: "" }
|
|
341
341
|
});
|
|
342
|
-
p.showSwitch[0].showSwitchNumber = 1, p.showSwitch[0].showSection[2][3] = !0,
|
|
342
|
+
p.showSwitch[0].showSwitchNumber = 1, p.showSwitch[0].showSection[2][3] = !0, s.value.unshift(p);
|
|
343
343
|
}
|
|
344
344
|
function m() {
|
|
345
345
|
var o;
|
|
346
|
-
(o =
|
|
346
|
+
(o = s.value) == null || o.forEach((c) => {
|
|
347
347
|
c.showSwitch.forEach((p) => {
|
|
348
348
|
p.showSection[2][3] = !1;
|
|
349
349
|
});
|
|
350
350
|
});
|
|
351
351
|
}
|
|
352
|
-
function
|
|
353
|
-
|
|
352
|
+
function a(o) {
|
|
353
|
+
s.value[o].showSwitch.forEach((c) => {
|
|
354
354
|
c.showSection[2][3] = !c.showSection[2][3];
|
|
355
355
|
});
|
|
356
356
|
}
|
|
357
357
|
function i(o) {
|
|
358
|
-
if (o >= 0 && o <=
|
|
359
|
-
const c =
|
|
360
|
-
u(c.event),
|
|
358
|
+
if (o >= 0 && o <= s.value.length - 1) {
|
|
359
|
+
const c = s.value[o];
|
|
360
|
+
u(c.event), s.value.splice(o, 1);
|
|
361
361
|
}
|
|
362
362
|
}
|
|
363
363
|
return {
|
|
364
364
|
addNewInteraction: h,
|
|
365
365
|
collapseInteractions: m,
|
|
366
366
|
deleteInteracton: i,
|
|
367
|
-
toggleMethodInInteraction:
|
|
368
|
-
interactions:
|
|
367
|
+
toggleMethodInInteraction: a,
|
|
368
|
+
interactions: s,
|
|
369
369
|
loadInteractions: l
|
|
370
370
|
};
|
|
371
371
|
}
|
|
372
|
-
function
|
|
373
|
-
const e = b([]),
|
|
372
|
+
function J(n) {
|
|
373
|
+
const e = b([]), s = b([]), r = b([]);
|
|
374
374
|
function u() {
|
|
375
|
-
const i =
|
|
375
|
+
const i = s.value.reduce(
|
|
376
376
|
(c, p) => (c.set(p.boundEvents.label, !0), c),
|
|
377
377
|
/* @__PURE__ */ new Map()
|
|
378
378
|
);
|
|
@@ -380,43 +380,43 @@ function Q(n) {
|
|
|
380
380
|
}
|
|
381
381
|
function f() {
|
|
382
382
|
var o;
|
|
383
|
-
const i = ((o =
|
|
383
|
+
const i = ((o = s.value) == null ? void 0 : o.length) > 0;
|
|
384
384
|
r.value = i ? u() : e.value;
|
|
385
385
|
}
|
|
386
386
|
function l() {
|
|
387
|
-
e.value = n.value.events,
|
|
387
|
+
e.value = n.value.events, s.value = n.value.boundEventsList, f();
|
|
388
388
|
}
|
|
389
389
|
function h(i) {
|
|
390
390
|
r.value = r.value.filter((o) => o.label !== i.label);
|
|
391
391
|
}
|
|
392
392
|
function m(i) {
|
|
393
|
-
|
|
393
|
+
s.value = s.value.filter((o) => o.boundEvents.label !== i.label), f();
|
|
394
394
|
}
|
|
395
|
-
function
|
|
395
|
+
function a() {
|
|
396
396
|
var c;
|
|
397
397
|
const i = (c = n.value) == null ? void 0 : c.getEventList(), { events: o } = i;
|
|
398
|
-
i && (n.value.events =
|
|
398
|
+
i && (n.value.events = M(o), n.value.boundEventsList = i.boundEventsList), n.value.boundEventsList && (n.value.boundEventsList = n.value.boundEventsList.filter(function(p) {
|
|
399
399
|
return o.find((d) => d.label == p.boundEvents.label);
|
|
400
400
|
}));
|
|
401
401
|
}
|
|
402
402
|
return {
|
|
403
403
|
allEvents: e,
|
|
404
|
-
boundEvents:
|
|
404
|
+
boundEvents: s,
|
|
405
405
|
candidateEvents: r,
|
|
406
406
|
excludeFromCandidates: h,
|
|
407
407
|
loadEvents: l,
|
|
408
|
-
resetBoundEvents:
|
|
408
|
+
resetBoundEvents: a,
|
|
409
409
|
unBoundEvent: m
|
|
410
410
|
};
|
|
411
411
|
}
|
|
412
|
-
const
|
|
412
|
+
const Le = {}, Ne = {
|
|
413
413
|
events: { type: Array, default: [] }
|
|
414
|
-
},
|
|
414
|
+
}, Pe = /* @__PURE__ */ F({
|
|
415
415
|
name: "FEventList",
|
|
416
416
|
props: Ne,
|
|
417
417
|
emits: ["click"],
|
|
418
418
|
setup(n, e) {
|
|
419
|
-
const
|
|
419
|
+
const s = b(n.events);
|
|
420
420
|
function r(f) {
|
|
421
421
|
e.emit("click", f);
|
|
422
422
|
}
|
|
@@ -430,16 +430,16 @@ const ke = {}, Ne = {
|
|
|
430
430
|
}
|
|
431
431
|
return () => t("div", {
|
|
432
432
|
class: "f-page-events-editor-events"
|
|
433
|
-
}, [
|
|
433
|
+
}, [s.value.map((f) => u(f))]);
|
|
434
434
|
}
|
|
435
|
-
}),
|
|
435
|
+
}), Q = /* @__PURE__ */ F({
|
|
436
436
|
name: "FInteractionButton",
|
|
437
|
-
props:
|
|
437
|
+
props: Le,
|
|
438
438
|
emits: ["click"],
|
|
439
439
|
setup(n, e) {
|
|
440
|
-
const
|
|
440
|
+
const s = j("useEventsComposition"), r = j("useInteractionCompostion"), {
|
|
441
441
|
candidateEvents: u
|
|
442
|
-
} =
|
|
442
|
+
} = s, {
|
|
443
443
|
collapseInteractions: f
|
|
444
444
|
} = r, l = b(!1);
|
|
445
445
|
function h(p) {
|
|
@@ -448,14 +448,14 @@ const ke = {}, Ne = {
|
|
|
448
448
|
function m() {
|
|
449
449
|
l.value = !1;
|
|
450
450
|
}
|
|
451
|
-
function
|
|
451
|
+
function a() {
|
|
452
452
|
l.value = !0;
|
|
453
453
|
}
|
|
454
454
|
function i(p) {
|
|
455
455
|
m(), h(p), e.emit("click", p);
|
|
456
456
|
}
|
|
457
457
|
function o() {
|
|
458
|
-
l.value ? m() :
|
|
458
|
+
l.value ? m() : a();
|
|
459
459
|
}
|
|
460
460
|
function c() {
|
|
461
461
|
f(), o();
|
|
@@ -467,12 +467,12 @@ const ke = {}, Ne = {
|
|
|
467
467
|
onClick: c
|
|
468
468
|
}, [t("span", {
|
|
469
469
|
class: "f-page-events-editor-text"
|
|
470
|
-
}, [
|
|
470
|
+
}, [D("新建交互事件")])])]), l.value && t(Pe, {
|
|
471
471
|
events: u.value,
|
|
472
472
|
onClick: i
|
|
473
473
|
}, null)]);
|
|
474
474
|
}
|
|
475
|
-
}),
|
|
475
|
+
}), Ae = {
|
|
476
476
|
collapsed: { type: Boolean, default: !0 },
|
|
477
477
|
displayOrder: { type: Number, default: -1 },
|
|
478
478
|
interaction: { type: Object, default: {} },
|
|
@@ -494,12 +494,12 @@ const ke = {}, Ne = {
|
|
|
494
494
|
haveBoundcommand: { Type: Boolean, default: !1 }
|
|
495
495
|
}, De = {
|
|
496
496
|
controllers: { type: Array, default: [] }
|
|
497
|
-
}, Te = /* @__PURE__ */
|
|
497
|
+
}, Te = /* @__PURE__ */ F({
|
|
498
498
|
name: "FCommandList",
|
|
499
499
|
props: De,
|
|
500
500
|
emits: ["selectMethod"],
|
|
501
501
|
setup(n, e) {
|
|
502
|
-
const
|
|
502
|
+
const s = b(n.controllers);
|
|
503
503
|
function r(m) {
|
|
504
504
|
return m.controllerList.length !== 0;
|
|
505
505
|
}
|
|
@@ -511,44 +511,44 @@ const ke = {}, Ne = {
|
|
|
511
511
|
title: m.controllerName.name
|
|
512
512
|
}, [m.controllerName.name])]);
|
|
513
513
|
}
|
|
514
|
-
function f(m,
|
|
514
|
+
function f(m, a) {
|
|
515
515
|
e.emit("selectMethod", {
|
|
516
516
|
method: m,
|
|
517
|
-
controller:
|
|
517
|
+
controller: a
|
|
518
518
|
});
|
|
519
519
|
}
|
|
520
520
|
function l(m) {
|
|
521
|
-
return m.controllerList.map((
|
|
521
|
+
return m.controllerList.map((a) => t("div", {
|
|
522
522
|
class: "f-page-internals-command",
|
|
523
|
-
onClick: () => f(
|
|
523
|
+
onClick: () => f(a, m)
|
|
524
524
|
}, [t("div", {
|
|
525
525
|
class: "f-page-internals-command-name",
|
|
526
|
-
title:
|
|
527
|
-
}, [
|
|
526
|
+
title: a.label
|
|
527
|
+
}, [a.name])]));
|
|
528
528
|
}
|
|
529
529
|
function h(m) {
|
|
530
530
|
return t("div", null, [u(m), l(m)]);
|
|
531
531
|
}
|
|
532
532
|
return () => t("div", {
|
|
533
533
|
class: "f-page-internals"
|
|
534
|
-
}, [
|
|
534
|
+
}, [s.value.map((m) => h(m))]);
|
|
535
535
|
}
|
|
536
|
-
}), Oe = /* @__PURE__ */
|
|
536
|
+
}), Oe = /* @__PURE__ */ F({
|
|
537
537
|
name: "FCommandSource",
|
|
538
538
|
props: Fe,
|
|
539
539
|
emits: ["addInternalCommandListChanged", "newImportChanged", "currentCommandChanged", "originalDataChanged", "click", "existChanged", "newFucChanged", "close", "selectMethod"],
|
|
540
540
|
setup(n, e) {
|
|
541
|
-
const
|
|
541
|
+
const s = j("useMethodsComposition"), {
|
|
542
542
|
controllers: r
|
|
543
|
-
} =
|
|
543
|
+
} = s, u = b(!1), f = b(n.canAddNewMethod), l = P(() => !f.value), h = P(() => u.value), m = P(() => ({
|
|
544
544
|
"font-size": "15px",
|
|
545
545
|
margin: "5px",
|
|
546
546
|
color: "#226eff",
|
|
547
547
|
flex: 1
|
|
548
|
-
})),
|
|
548
|
+
})), a = Symbol("controller schema repository inject token");
|
|
549
549
|
function i() {
|
|
550
550
|
return t(ne, {
|
|
551
|
-
injectSymbolToken:
|
|
551
|
+
injectSymbolToken: a,
|
|
552
552
|
"view-type": "NavList"
|
|
553
553
|
}, null);
|
|
554
554
|
}
|
|
@@ -568,10 +568,10 @@ const ke = {}, Ne = {
|
|
|
568
568
|
function E() {
|
|
569
569
|
e.emit("close", null);
|
|
570
570
|
}
|
|
571
|
-
function
|
|
571
|
+
function B() {
|
|
572
572
|
return t("div", {
|
|
573
573
|
class: "f-command-breakline"
|
|
574
|
-
}, [
|
|
574
|
+
}, [D("------------------------------------------------------------")]);
|
|
575
575
|
}
|
|
576
576
|
function g() {
|
|
577
577
|
return t("div", {
|
|
@@ -584,7 +584,7 @@ const ke = {}, Ne = {
|
|
|
584
584
|
}, null), t("div", {
|
|
585
585
|
class: "f-function-class",
|
|
586
586
|
onClick: () => o()
|
|
587
|
-
}, [
|
|
587
|
+
}, [D("引入控制器")])]), l.value && t("div", {
|
|
588
588
|
class: "f-page-internals-new-command-func2"
|
|
589
589
|
}, [t("div", {
|
|
590
590
|
class: "f-icon f-icon-new-edit",
|
|
@@ -592,7 +592,7 @@ const ke = {}, Ne = {
|
|
|
592
592
|
}, null), t("div", {
|
|
593
593
|
class: "f-function-class",
|
|
594
594
|
onClick: () => void 0
|
|
595
|
-
}, [
|
|
595
|
+
}, [D("添加新方法")])]), h.value && void 0, t("div", {
|
|
596
596
|
class: "f-page-internals-new-command-func3"
|
|
597
597
|
}, [t("div", {
|
|
598
598
|
class: "f-icon f-icon-licensed",
|
|
@@ -600,7 +600,7 @@ const ke = {}, Ne = {
|
|
|
600
600
|
}, null), t("div", {
|
|
601
601
|
class: "f-function-class",
|
|
602
602
|
onClick: () => void 0
|
|
603
|
-
}, [
|
|
603
|
+
}, [D("已有方法")])])]);
|
|
604
604
|
}
|
|
605
605
|
function S(v) {
|
|
606
606
|
e.emit("selectMethod", v);
|
|
@@ -615,21 +615,21 @@ const ke = {}, Ne = {
|
|
|
615
615
|
}
|
|
616
616
|
return () => t("div", {
|
|
617
617
|
class: "f-page-events-editor-command-source"
|
|
618
|
-
}, [y(),
|
|
618
|
+
}, [y(), B(), g(), B(), t("div", null, [t("div", {
|
|
619
619
|
class: "f-page-internals-close",
|
|
620
620
|
onClick: E
|
|
621
|
-
}, [
|
|
621
|
+
}, [D("取消")])])]);
|
|
622
622
|
}
|
|
623
623
|
}), je = {
|
|
624
624
|
command: { type: Object, default: {} }
|
|
625
|
-
}, Re = /* @__PURE__ */
|
|
625
|
+
}, Re = /* @__PURE__ */ F({
|
|
626
626
|
name: "FParameterEditor",
|
|
627
627
|
props: je,
|
|
628
628
|
emits: ["confirm", "change"],
|
|
629
629
|
setup(n, e) {
|
|
630
|
-
const
|
|
630
|
+
const s = b(n.command), r = b(0), u = b(!1), f = b(!1);
|
|
631
631
|
b(""), b([]);
|
|
632
|
-
const l =
|
|
632
|
+
const l = P(() => s.value !== null), h = P(() => u.value), m = P(() => f.value), a = P(() => !u.value && !f.value), i = b(!1);
|
|
633
633
|
function o() {
|
|
634
634
|
}
|
|
635
635
|
function c() {
|
|
@@ -650,93 +650,93 @@ const ke = {}, Ne = {
|
|
|
650
650
|
onClick: () => void 0
|
|
651
651
|
}, null)]);
|
|
652
652
|
}
|
|
653
|
-
function E(
|
|
653
|
+
function E(L) {
|
|
654
654
|
i.value = !i.value;
|
|
655
655
|
}
|
|
656
|
-
function
|
|
656
|
+
function B() {
|
|
657
657
|
return t("div", null, [t("div", {
|
|
658
658
|
class: "f-icon f-icon-edit-button",
|
|
659
659
|
style: "font-size: 13px;margin-right:10px;",
|
|
660
660
|
onClick: () => E(r.value)
|
|
661
661
|
}, null)]);
|
|
662
662
|
}
|
|
663
|
-
function g(
|
|
664
|
-
|
|
663
|
+
function g(L, N) {
|
|
664
|
+
N.value = L.target.value;
|
|
665
665
|
}
|
|
666
666
|
function S() {
|
|
667
|
-
e.emit("change",
|
|
667
|
+
e.emit("change", s.value);
|
|
668
668
|
}
|
|
669
|
-
function y(
|
|
669
|
+
function y(L) {
|
|
670
670
|
return t("div", null, [t("input", {
|
|
671
671
|
class: "form-control f-utils-fill text-left",
|
|
672
|
-
value:
|
|
673
|
-
onChange: (
|
|
674
|
-
onBlur: (
|
|
672
|
+
value: L.value,
|
|
673
|
+
onChange: (N) => g(N, L),
|
|
674
|
+
onBlur: (N) => S()
|
|
675
675
|
}, null)]);
|
|
676
676
|
}
|
|
677
677
|
function v() {
|
|
678
|
-
var
|
|
679
|
-
return (
|
|
678
|
+
var L;
|
|
679
|
+
return (L = s.value.property) == null ? void 0 : L.map((N) => t("div", null, [t("div", {
|
|
680
680
|
class: "f-page-parameter-editor-row1"
|
|
681
681
|
}, [t("div", {
|
|
682
682
|
class: "f-page-parameter-editor-parameter-name"
|
|
683
|
-
}, [
|
|
683
|
+
}, [N.shownName, N.description && t("div", {
|
|
684
684
|
class: "farris-label-tips"
|
|
685
685
|
}, [t("i", {
|
|
686
686
|
class: "f-icon f-icon-message_help",
|
|
687
687
|
style: "color:#878D99;"
|
|
688
688
|
}, null)])])]), t("div", {
|
|
689
689
|
class: "f-page-parameter-editor-row2"
|
|
690
|
-
}, [y(
|
|
690
|
+
}, [y(N)])]));
|
|
691
691
|
}
|
|
692
|
-
function
|
|
692
|
+
function w(L) {
|
|
693
693
|
i.value = !1, e.emit("confirm");
|
|
694
694
|
}
|
|
695
|
-
function
|
|
695
|
+
function C() {
|
|
696
696
|
return t("div", null, [t("div", {
|
|
697
697
|
class: "f-page-parameter-editor-btn"
|
|
698
698
|
}, [t("div", {
|
|
699
699
|
class: "btn-finish",
|
|
700
|
-
onClick: () =>
|
|
701
|
-
}, [
|
|
700
|
+
onClick: () => w(r.value)
|
|
701
|
+
}, [D("完成")])])]);
|
|
702
702
|
}
|
|
703
703
|
function k() {
|
|
704
704
|
return t("div", {
|
|
705
705
|
class: "f-page-parameter-editor-group"
|
|
706
706
|
}, [v()]);
|
|
707
707
|
}
|
|
708
|
-
function
|
|
708
|
+
function A() {
|
|
709
709
|
return t("div", null, [t("div", {
|
|
710
710
|
class: "f-page-parameter-editor-first-row"
|
|
711
711
|
}, [t("span", {
|
|
712
712
|
class: "f-page-parameter-editor-command-name",
|
|
713
|
-
title:
|
|
714
|
-
}, [
|
|
713
|
+
title: s.value.label
|
|
714
|
+
}, [s.value.name]), t("div", {
|
|
715
715
|
class: "f-page-parameter-editor-first-row-icon"
|
|
716
|
-
}, [h.value && c(), m.value && d(),
|
|
716
|
+
}, [h.value && c(), m.value && d(), a.value && B()])]), i.value && k(), i.value && C()]);
|
|
717
717
|
}
|
|
718
718
|
return () => t("div", {
|
|
719
719
|
class: "f-page-parameter-editor"
|
|
720
|
-
}, [l.value &&
|
|
720
|
+
}, [l.value && A()]);
|
|
721
721
|
}
|
|
722
|
-
}),
|
|
722
|
+
}), X = /* @__PURE__ */ F({
|
|
723
723
|
name: "FInteractionItem",
|
|
724
|
-
props:
|
|
724
|
+
props: Ae,
|
|
725
725
|
emits: ["addAction", "delete", "toggle"],
|
|
726
726
|
setup(n, e) {
|
|
727
|
-
const
|
|
727
|
+
const s = j("useMethodsComposition"), {
|
|
728
728
|
toggleSelectingMethod: r,
|
|
729
729
|
emitFinalState: u
|
|
730
|
-
} =
|
|
730
|
+
} = s, f = b(n.controllers), l = b(n.interaction), h = b(n.displayOrder), m = P(() => {
|
|
731
731
|
const v = l.value.showSwitch[0];
|
|
732
732
|
return v.showSection[v.showSwitchNumber][2];
|
|
733
|
-
}),
|
|
734
|
-
const v = !!l.value.command,
|
|
735
|
-
return v &&
|
|
736
|
-
}), i =
|
|
733
|
+
}), a = P(() => {
|
|
734
|
+
const v = !!l.value.command, w = l.value.showSwitch[0], C = w.showSection[w.showSwitchNumber][3];
|
|
735
|
+
return v && C;
|
|
736
|
+
}), i = P(() => ({
|
|
737
737
|
"f-icon": !0,
|
|
738
|
-
"f-icon-arrow-chevron-down":
|
|
739
|
-
"f-icon-arrow-chevron-left": !
|
|
738
|
+
"f-icon-arrow-chevron-down": a.value,
|
|
739
|
+
"f-icon-arrow-chevron-left": !a.value
|
|
740
740
|
}));
|
|
741
741
|
function o() {
|
|
742
742
|
e.emit("delete", h.value);
|
|
@@ -747,43 +747,43 @@ const ke = {}, Ne = {
|
|
|
747
747
|
}
|
|
748
748
|
function p() {
|
|
749
749
|
if (l.value.command !== null) {
|
|
750
|
-
const
|
|
751
|
-
r(
|
|
750
|
+
const w = l.value.showSwitch[0];
|
|
751
|
+
r(w), e.emit("addAction", h.value);
|
|
752
752
|
}
|
|
753
753
|
}
|
|
754
754
|
function d(v) {
|
|
755
755
|
v === null && l.value.command === null && e.emit("delete", h.value);
|
|
756
|
-
const
|
|
757
|
-
r(
|
|
756
|
+
const w = l.value.showSwitch[0];
|
|
757
|
+
r(w);
|
|
758
758
|
}
|
|
759
759
|
function E(v) {
|
|
760
760
|
const {
|
|
761
|
-
method:
|
|
762
|
-
controller:
|
|
761
|
+
method: w,
|
|
762
|
+
controller: C
|
|
763
763
|
} = v, {
|
|
764
764
|
id: k,
|
|
765
|
-
label:
|
|
766
|
-
name:
|
|
767
|
-
handlerName:
|
|
768
|
-
} =
|
|
769
|
-
controllerName:
|
|
770
|
-
} =
|
|
765
|
+
label: A,
|
|
766
|
+
name: L,
|
|
767
|
+
handlerName: N
|
|
768
|
+
} = w, {
|
|
769
|
+
controllerName: R
|
|
770
|
+
} = C, x = !1, K = R.id;
|
|
771
771
|
l.value.command = {
|
|
772
772
|
id: k,
|
|
773
|
-
label:
|
|
774
|
-
name:
|
|
775
|
-
handlerName:
|
|
776
|
-
hasPath:
|
|
773
|
+
label: A,
|
|
774
|
+
name: L,
|
|
775
|
+
handlerName: N,
|
|
776
|
+
hasPath: x,
|
|
777
777
|
cmpId: K
|
|
778
778
|
}, l.value.controller = {
|
|
779
|
-
id:
|
|
780
|
-
label:
|
|
781
|
-
name:
|
|
779
|
+
id: R.id,
|
|
780
|
+
label: R.label,
|
|
781
|
+
name: R.name
|
|
782
782
|
};
|
|
783
|
-
const
|
|
784
|
-
|
|
783
|
+
const O = l.value.showSwitch[0];
|
|
784
|
+
O.showSwitchNumber = 2, O.showSection[O.showSwitchNumber][2] = !1, O.showSection[O.showSwitchNumber][3] = !0, u();
|
|
785
785
|
}
|
|
786
|
-
function
|
|
786
|
+
function B() {
|
|
787
787
|
return t(Oe, {
|
|
788
788
|
controllers: f.value,
|
|
789
789
|
onClose: d,
|
|
@@ -795,7 +795,7 @@ const ke = {}, Ne = {
|
|
|
795
795
|
v.showSection[v.showSwitchNumber][3] = !1;
|
|
796
796
|
}
|
|
797
797
|
function S(v) {
|
|
798
|
-
l.value.command =
|
|
798
|
+
l.value.command = M(v), u();
|
|
799
799
|
}
|
|
800
800
|
function y() {
|
|
801
801
|
return t(Re, {
|
|
@@ -825,49 +825,49 @@ const ke = {}, Ne = {
|
|
|
825
825
|
class: "f-icon f-icon-home-add",
|
|
826
826
|
style: "float:right; font-size: 10px; margin:8px;",
|
|
827
827
|
onClick: p
|
|
828
|
-
}, null)]), m.value &&
|
|
828
|
+
}, null)]), m.value && B(), a.value && y()]);
|
|
829
829
|
}
|
|
830
830
|
});
|
|
831
|
-
function
|
|
831
|
+
function Z(n, e, s) {
|
|
832
832
|
const { interactions: r } = e, u = b(n.value.internalCommandList);
|
|
833
833
|
function f(d) {
|
|
834
|
-
r.value[d].showSwitch = [], r.value[d].showSwitch.push(
|
|
834
|
+
r.value[d].showSwitch = [], r.value[d].showSwitch.push(M({
|
|
835
835
|
// 存储所有的展示设定
|
|
836
836
|
showSection: [[!1, !1, !1, !1, !1], [!1, !1, !0, !1, !1], [!1, !0, !1, !0, !1]],
|
|
837
837
|
// 展示哪个部分
|
|
838
838
|
showSwitchNumber: 2
|
|
839
|
-
})), r.value =
|
|
839
|
+
})), r.value = M(r.value);
|
|
840
840
|
}
|
|
841
|
-
function l(d, E,
|
|
841
|
+
function l(d, E, B) {
|
|
842
842
|
}
|
|
843
843
|
function h(d) {
|
|
844
|
-
var
|
|
844
|
+
var B;
|
|
845
845
|
const E = [];
|
|
846
|
-
return (
|
|
846
|
+
return (B = n.value.newController) == null || B.forEach((g) => {
|
|
847
847
|
d.forEach((S) => {
|
|
848
|
-
g.Code === S.controller.label && E.push(
|
|
848
|
+
g.Code === S.controller.label && E.push(M(g));
|
|
849
849
|
});
|
|
850
850
|
}), E;
|
|
851
851
|
}
|
|
852
852
|
function m() {
|
|
853
853
|
var S;
|
|
854
854
|
n.value.isAddControllerMethod = !!n.value.newFuncEvents;
|
|
855
|
-
const d = [], E =
|
|
855
|
+
const d = [], E = M(n.value.internalCommandList);
|
|
856
856
|
r.value.map((y) => {
|
|
857
|
-
const v =
|
|
858
|
-
d.push(
|
|
857
|
+
const v = M(y.controller), w = M(y.command), C = M(y.event), k = { controller: v, command: w, boundEvents: C };
|
|
858
|
+
d.push(M(k));
|
|
859
859
|
});
|
|
860
|
-
const
|
|
860
|
+
const B = (S = n.value.newController) != null && S.length && d.length ? M(h(d)) : [], g = {
|
|
861
861
|
/** 拼接名称时的前缀 */
|
|
862
862
|
viewModelId: n.value.viewModelId,
|
|
863
863
|
/** 视图模型绑定的事件下的方法列表 */
|
|
864
|
-
savedCommand:
|
|
864
|
+
savedCommand: M(n.value.viewModel),
|
|
865
865
|
/** 当前界面显示的绑定事件 */
|
|
866
|
-
boundEventsList:
|
|
866
|
+
boundEventsList: M(d),
|
|
867
867
|
/** 可选择的绑定事件列表 */
|
|
868
|
-
events:
|
|
868
|
+
events: M(n.value.events),
|
|
869
869
|
/** 内置构件列表; */
|
|
870
|
-
internalCommandList:
|
|
870
|
+
internalCommandList: M(E),
|
|
871
871
|
/** 所有可选的组件 */
|
|
872
872
|
componentLists: [],
|
|
873
873
|
/** 接收formBasicService.formMetaBasicInfo.relativePath */
|
|
@@ -875,7 +875,7 @@ function x(n, e, a) {
|
|
|
875
875
|
/** 接收formBasicService.envType */
|
|
876
876
|
envType: n.value.envType,
|
|
877
877
|
/** 初始为空,用于存储用户点击「导入新方法」的控制器值 */
|
|
878
|
-
newController: B
|
|
878
|
+
newController: M(B),
|
|
879
879
|
/** 切换到代码视图标识 */
|
|
880
880
|
isAddControllerMethod: n.value.isAddControllerMethod,
|
|
881
881
|
/** 用户选择「已有方法」 */
|
|
@@ -883,11 +883,11 @@ function x(n, e, a) {
|
|
|
883
883
|
/** 上一个绑定的方法 */
|
|
884
884
|
preCommand: n.value.preCommand,
|
|
885
885
|
/** 新增方法的对应事件 */
|
|
886
|
-
newFuncEvents:
|
|
886
|
+
newFuncEvents: M(n.value.newFuncEvents)
|
|
887
887
|
};
|
|
888
|
-
|
|
888
|
+
s.emit("savedCommandListChanged", g);
|
|
889
889
|
}
|
|
890
|
-
function
|
|
890
|
+
function a(d) {
|
|
891
891
|
d.showSection[d.showSwitchNumber][2] = !0;
|
|
892
892
|
}
|
|
893
893
|
function i(d) {
|
|
@@ -900,7 +900,7 @@ function x(n, e, a) {
|
|
|
900
900
|
d.showSection[d.showSwitchNumber][3] = !1;
|
|
901
901
|
}
|
|
902
902
|
function p(d) {
|
|
903
|
-
d.showSection[d.showSwitchNumber][2] ? (i(d), o(d)) : (
|
|
903
|
+
d.showSection[d.showSwitchNumber][2] ? (i(d), o(d)) : (a(d), c(d));
|
|
904
904
|
}
|
|
905
905
|
return {
|
|
906
906
|
controllers: u,
|
|
@@ -910,25 +910,25 @@ function x(n, e, a) {
|
|
|
910
910
|
toggleSelectingMethod: p
|
|
911
911
|
};
|
|
912
912
|
}
|
|
913
|
-
const
|
|
913
|
+
const I = /* @__PURE__ */ F({
|
|
914
914
|
name: "FEventsEditor",
|
|
915
|
-
props:
|
|
915
|
+
props: $,
|
|
916
916
|
emits: ["savedCommandListChanged"],
|
|
917
917
|
setup(n, e) {
|
|
918
|
-
const
|
|
918
|
+
const s = b(n.initialData), r = J(s), {
|
|
919
919
|
loadEvents: u,
|
|
920
920
|
resetBoundEvents: f
|
|
921
|
-
} = r, l = Y(
|
|
921
|
+
} = r, l = Y(s, r), {
|
|
922
922
|
addNewInteraction: h,
|
|
923
923
|
deleteInteracton: m,
|
|
924
|
-
interactions:
|
|
924
|
+
interactions: a,
|
|
925
925
|
loadInteractions: i
|
|
926
|
-
} = l, o =
|
|
927
|
-
|
|
926
|
+
} = l, o = Z(s, l, e);
|
|
927
|
+
T("useEventsComposition", r), T("useInteractionCompostion", l), T("useMethodsComposition", o);
|
|
928
928
|
function c() {
|
|
929
|
-
|
|
929
|
+
s.value.isAddControllerMethod = !1;
|
|
930
930
|
}
|
|
931
|
-
|
|
931
|
+
_(() => {
|
|
932
932
|
c(), f(), u(), i();
|
|
933
933
|
});
|
|
934
934
|
function p(g) {
|
|
@@ -936,7 +936,7 @@ const V = /* @__PURE__ */ D({
|
|
|
936
936
|
}
|
|
937
937
|
function d(g, S) {
|
|
938
938
|
const y = g.showSwitch[0], v = y.showSection[y.showSwitchNumber][3];
|
|
939
|
-
return t(
|
|
939
|
+
return t(X, {
|
|
940
940
|
interaction: g,
|
|
941
941
|
displayOrder: S,
|
|
942
942
|
collapsed: v,
|
|
@@ -945,25 +945,25 @@ const V = /* @__PURE__ */ D({
|
|
|
945
945
|
}
|
|
946
946
|
function E() {
|
|
947
947
|
var g;
|
|
948
|
-
return (g =
|
|
948
|
+
return (g = a.value) == null ? void 0 : g.map((S, y) => t("div", {
|
|
949
949
|
class: "events-display-order",
|
|
950
950
|
key: S.event.label
|
|
951
951
|
}, [d(S, y)]));
|
|
952
952
|
}
|
|
953
|
-
function
|
|
953
|
+
function B(g) {
|
|
954
954
|
h(g);
|
|
955
955
|
}
|
|
956
956
|
return () => t("div", {
|
|
957
957
|
class: "f-page-events-editor"
|
|
958
958
|
}, [t("div", {
|
|
959
959
|
class: "f-page-events-editor-content"
|
|
960
|
-
}, [t(
|
|
961
|
-
onClick:
|
|
960
|
+
}, [t(Q, {
|
|
961
|
+
onClick: B
|
|
962
962
|
}, null), E()])]);
|
|
963
963
|
}
|
|
964
964
|
});
|
|
965
|
-
function Ie(n, e,
|
|
966
|
-
var
|
|
965
|
+
function Ie(n, e, s) {
|
|
966
|
+
var v;
|
|
967
967
|
function r() {
|
|
968
968
|
}
|
|
969
969
|
const u = "", f = "", l = b();
|
|
@@ -973,7 +973,7 @@ function Ie(n, e, a) {
|
|
|
973
973
|
function m() {
|
|
974
974
|
return !1;
|
|
975
975
|
}
|
|
976
|
-
function
|
|
976
|
+
function a() {
|
|
977
977
|
return (e == null ? void 0 : e.schema.componentType) !== "frame";
|
|
978
978
|
}
|
|
979
979
|
function i() {
|
|
@@ -984,48 +984,41 @@ function Ie(n, e, a) {
|
|
|
984
984
|
return null;
|
|
985
985
|
if (w.value.schema && w.value.schema.type === "component")
|
|
986
986
|
return w.value;
|
|
987
|
-
const
|
|
988
|
-
return
|
|
987
|
+
const C = b(w == null ? void 0 : w.value.parent), k = o(C);
|
|
988
|
+
return k || null;
|
|
989
989
|
}
|
|
990
990
|
function c(w = e) {
|
|
991
|
-
const { componentInstance:
|
|
992
|
-
return !
|
|
991
|
+
const { componentInstance: C, designerItemElementRef: k } = w;
|
|
992
|
+
return !C || !C.value ? null : C.value.canMove ? k : c(w.parent);
|
|
993
993
|
}
|
|
994
994
|
function p(w) {
|
|
995
|
-
return !!
|
|
995
|
+
return !!s;
|
|
996
996
|
}
|
|
997
997
|
function d() {
|
|
998
998
|
return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
|
|
999
999
|
}
|
|
1000
1000
|
function E() {
|
|
1001
1001
|
}
|
|
1002
|
-
function
|
|
1002
|
+
function B(w, C) {
|
|
1003
1003
|
}
|
|
1004
|
-
function g(w,
|
|
1005
|
-
const { componentType:
|
|
1006
|
-
let
|
|
1007
|
-
const
|
|
1008
|
-
return
|
|
1004
|
+
function g(w, C) {
|
|
1005
|
+
const { componentType: k } = w;
|
|
1006
|
+
let A = U(k, w, C);
|
|
1007
|
+
const L = k.toLowerCase().replace("-", "_");
|
|
1008
|
+
return A && !A.id && A.type === k && (A.id = `${L}_${Math.random().toString().slice(2, 6)}`), A;
|
|
1009
1009
|
}
|
|
1010
|
-
function S(w
|
|
1011
|
-
const N = String(w.getAttribute("data-controltype")), M = w.getAttribute("data-feature"), A = M ? JSON.parse(M) : {};
|
|
1012
|
-
A.parentComponentInstance = l.value;
|
|
1013
|
-
let P = $(N, A);
|
|
1014
|
-
const I = N.toLowerCase().replace("-", "_");
|
|
1015
|
-
return P && !P.id && P.type === N && (P.id = `${I}_${Math.random().toString().slice(2, 6)}`), P;
|
|
1010
|
+
function S(w) {
|
|
1016
1011
|
}
|
|
1017
|
-
function y(w) {
|
|
1018
|
-
}
|
|
1019
|
-
function v(...w) {
|
|
1012
|
+
function y(...w) {
|
|
1020
1013
|
}
|
|
1021
1014
|
return l.value = {
|
|
1022
1015
|
canMove: h(),
|
|
1023
1016
|
canSelectParent: m(),
|
|
1024
|
-
canDelete:
|
|
1017
|
+
canDelete: a(),
|
|
1025
1018
|
canNested: !i(),
|
|
1026
1019
|
contents: e == null ? void 0 : e.schema.contents,
|
|
1027
1020
|
elementRef: n,
|
|
1028
|
-
parent: (
|
|
1021
|
+
parent: (v = e == null ? void 0 : e.parent) == null ? void 0 : v.componentInstance,
|
|
1029
1022
|
schema: e == null ? void 0 : e.schema,
|
|
1030
1023
|
styles: u,
|
|
1031
1024
|
designerClass: f,
|
|
@@ -1033,57 +1026,56 @@ function Ie(n, e, a) {
|
|
|
1033
1026
|
getBelongedComponentInstance: o,
|
|
1034
1027
|
getDraggableDesignItemElement: c,
|
|
1035
1028
|
getDraggingDisplayText: d,
|
|
1036
|
-
getPropConfig:
|
|
1029
|
+
getPropConfig: y,
|
|
1037
1030
|
getDragScopeElement: E,
|
|
1038
|
-
onAcceptMovedChildElement:
|
|
1039
|
-
|
|
1040
|
-
onChildElementMovedOut: y,
|
|
1031
|
+
onAcceptMovedChildElement: B,
|
|
1032
|
+
onChildElementMovedOut: S,
|
|
1041
1033
|
addNewChildComponentSchema: g,
|
|
1042
1034
|
updateDragAndDropRules: r,
|
|
1043
1035
|
triggerBelongedComponentToMoveWhenMoved: b(!1),
|
|
1044
1036
|
triggerBelongedComponentToDeleteWhenDeleted: b(!1)
|
|
1045
1037
|
}, l;
|
|
1046
1038
|
}
|
|
1047
|
-
const Ve = /* @__PURE__ */
|
|
1039
|
+
const Ve = /* @__PURE__ */ F({
|
|
1048
1040
|
name: "FEventsEditorDesign",
|
|
1049
|
-
props:
|
|
1041
|
+
props: $,
|
|
1050
1042
|
emits: ["savedCommandListChanged"],
|
|
1051
1043
|
setup(n, e) {
|
|
1052
|
-
const
|
|
1044
|
+
const s = b(n.initialData), r = J(s), {
|
|
1053
1045
|
loadEvents: u,
|
|
1054
1046
|
resetBoundEvents: f
|
|
1055
|
-
} = r, l = Y(
|
|
1047
|
+
} = r, l = Y(s, r), {
|
|
1056
1048
|
addNewInteraction: h,
|
|
1057
1049
|
deleteInteracton: m,
|
|
1058
|
-
interactions:
|
|
1050
|
+
interactions: a,
|
|
1059
1051
|
loadInteractions: i
|
|
1060
|
-
} = l, o =
|
|
1061
|
-
|
|
1062
|
-
const c = b(), p =
|
|
1063
|
-
|
|
1052
|
+
} = l, o = Z(s, l, e);
|
|
1053
|
+
T("useEventsComposition", r), T("useInteractionCompostion", l), T("useMethodsComposition", o);
|
|
1054
|
+
const c = b(), p = j("design-item-context"), d = Ie(c, p);
|
|
1055
|
+
_(() => {
|
|
1064
1056
|
c.value.componentInstance = d, E(), f(), u(), i();
|
|
1065
1057
|
}), e.expose(d.value);
|
|
1066
1058
|
function E() {
|
|
1067
|
-
|
|
1059
|
+
s.value.isAddControllerMethod = !1;
|
|
1068
1060
|
}
|
|
1069
|
-
function
|
|
1061
|
+
function B(v) {
|
|
1070
1062
|
m(v);
|
|
1071
1063
|
}
|
|
1072
|
-
function g(v,
|
|
1073
|
-
const
|
|
1074
|
-
return t(
|
|
1064
|
+
function g(v, w) {
|
|
1065
|
+
const C = v.showSwitch[0], k = C.showSection[C.showSwitchNumber][3];
|
|
1066
|
+
return t(X, {
|
|
1075
1067
|
interaction: v,
|
|
1076
|
-
displayOrder:
|
|
1068
|
+
displayOrder: w,
|
|
1077
1069
|
collapsed: k,
|
|
1078
|
-
onDelete:
|
|
1070
|
+
onDelete: B
|
|
1079
1071
|
}, null);
|
|
1080
1072
|
}
|
|
1081
1073
|
function S() {
|
|
1082
1074
|
var v;
|
|
1083
|
-
return (v =
|
|
1075
|
+
return (v = a.value) == null ? void 0 : v.map((w, C) => t("div", {
|
|
1084
1076
|
class: "events-display-order",
|
|
1085
|
-
key:
|
|
1086
|
-
}, [g(
|
|
1077
|
+
key: w.event.label
|
|
1078
|
+
}, [g(w, C)]));
|
|
1087
1079
|
}
|
|
1088
1080
|
function y(v) {
|
|
1089
1081
|
h(v);
|
|
@@ -1093,24 +1085,24 @@ const Ve = /* @__PURE__ */ D({
|
|
|
1093
1085
|
class: "f-page-events-editor"
|
|
1094
1086
|
}, [t("div", {
|
|
1095
1087
|
class: "f-page-events-editor-content"
|
|
1096
|
-
}, [t(
|
|
1088
|
+
}, [t(Q, {
|
|
1097
1089
|
onClick: y
|
|
1098
1090
|
}, null), S()])]);
|
|
1099
1091
|
}
|
|
1100
1092
|
}), Ge = {
|
|
1101
1093
|
install(n) {
|
|
1102
|
-
n.component(
|
|
1094
|
+
n.component(I.name, I);
|
|
1103
1095
|
},
|
|
1104
|
-
register(n, e,
|
|
1105
|
-
n["events-editor"] =
|
|
1096
|
+
register(n, e, s, r) {
|
|
1097
|
+
n["events-editor"] = I, e["events-editor"] = H;
|
|
1106
1098
|
},
|
|
1107
|
-
registerDesigner(n, e,
|
|
1108
|
-
n["events-editor"] = Ve, e["events-editor"] =
|
|
1099
|
+
registerDesigner(n, e, s) {
|
|
1100
|
+
n["events-editor"] = Ve, e["events-editor"] = H;
|
|
1109
1101
|
}
|
|
1110
1102
|
};
|
|
1111
1103
|
export {
|
|
1112
|
-
|
|
1104
|
+
I as FEventsEditor,
|
|
1113
1105
|
Ge as default,
|
|
1114
|
-
|
|
1115
|
-
|
|
1106
|
+
$ as eventsEditorProps,
|
|
1107
|
+
H as propsResolver
|
|
1116
1108
|
};
|