@farris/ui-vue 1.5.8 → 1.5.9
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/avatar/index.esm.js +1 -1
- package/components/avatar/index.umd.cjs +1 -1
- package/components/component/index.esm.js +1 -1
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +1 -1
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +1 -1
- package/components/content-container/index.umd.cjs +1 -1
- package/components/designer-canvas/index.esm.js +904 -893
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/dynamic-form/index.esm.js +1 -1
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-view/index.esm.js +1 -1
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +1 -1
- package/components/events-editor/index.umd.cjs +1 -1
- package/components/filter-bar/index.esm.js +1 -1
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.esm.js +1 -1
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/number-range/index.esm.js +1 -1
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +1 -1
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +795 -2822
- package/components/page-header/index.umd.cjs +1 -1
- package/components/property-panel/index.esm.js +1 -1
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/query-solution/index.esm.js +1 -1
- package/components/query-solution/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +1 -1
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/section/index.esm.js +119 -7475
- package/components/section/index.umd.cjs +1 -1
- package/components/time-picker/index.esm.js +1 -1
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/video/index.esm.js +1 -1
- package/components/video/index.umd.cjs +1 -1
- package/designer/data-grid/index.esm.js +1 -1
- package/designer/data-grid/index.umd.cjs +1 -1
- package/designer/farris-designer.all.esm.js +946 -934
- package/designer/farris-designer.all.umd.cjs +4 -4
- package/designer/radio-group/index.esm.js +1 -1
- package/designer/radio-group/index.umd.cjs +1 -1
- package/designer/section/index.esm.js +744 -0
- package/designer/section/index.umd.cjs +1 -0
- package/farris.all.esm.js +10489 -10488
- package/farris.all.umd.cjs +16 -16
- package/package.json +1 -1
- package/types/designer-canvas/index.d.ts +2 -2
- package/types/section/designer.d.ts +26 -0
- package/types/section/index.d.ts +1 -0
- package/types/section/src/designer/section-header.design.component.d.ts +2 -2
- package/types/section/src/designer/section-toolbar-item.design.props.d.ts +16 -0
- package/types/section/src/designer/section-toolbar-item.props.d.ts +0 -1
- package/types/section/src/designer/section-toolbar.design.component.d.ts +2 -2
- package/types/section/src/designer/section.design.props.d.ts +11 -0
- package/types/section/src/designer/use-designer-rules.d.ts +1 -2
- package/types/section/src/property-config/section.property-config.d.ts +1 -1
- package/types/section/src/schema/schema-resolver.d.ts +1 -1
- package/types/section/src/section.props.d.ts +0 -10
- package/components/section/index.css +0 -1
|
@@ -1,125 +1,120 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { defineComponent as
|
|
5
|
-
import { isPlainObject as
|
|
6
|
-
import
|
|
7
|
-
import { responseToolbarResolver as
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
if (e && (!r || !o.find((s) => s === "id"))) {
|
|
17
|
-
const s = e.toLowerCase().replace(/-/g, "_");
|
|
18
|
-
i.id = `${s}_${Math.random().toString().slice(2, 6)}`;
|
|
19
|
-
}
|
|
20
|
-
return i;
|
|
1
|
+
var ie = Object.defineProperty;
|
|
2
|
+
var se = (i, e, t) => e in i ? ie(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
|
|
3
|
+
var B = (i, e, t) => se(i, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { defineComponent as W, ref as S, computed as T, watch as j, createVNode as y, createTextVNode as R, inject as $, provide as re, onMounted as K, onBeforeUnmount as ae, withModifiers as le } from "vue";
|
|
5
|
+
import { isPlainObject as X, cloneDeep as G } from "lodash-es";
|
|
6
|
+
import ce from "../response-toolbar/index.esm.js";
|
|
7
|
+
import ue, { responseToolbarResolver as Y } from "../../designer/response-toolbar/index.esm.js";
|
|
8
|
+
const ee = {}, te = {};
|
|
9
|
+
function z(i) {
|
|
10
|
+
const { properties: e, title: t, ignore: n } = i, o = n && Array.isArray(n), r = Object.keys(e).reduce((s, u) => ((!o || !n.find((l) => l === u)) && (s[u] = e[u].type === "object" && e[u].properties ? z(e[u]) : G(e[u].default)), s), {});
|
|
11
|
+
if (t && (!o || !n.find((s) => s === "id"))) {
|
|
12
|
+
const s = t.toLowerCase().replace(/-/g, "_");
|
|
13
|
+
r.id = `${s}_${Math.random().toString().slice(2, 6)}`;
|
|
14
|
+
}
|
|
15
|
+
return r;
|
|
21
16
|
}
|
|
22
|
-
function
|
|
23
|
-
const { properties:
|
|
24
|
-
if (
|
|
25
|
-
const
|
|
26
|
-
if (
|
|
27
|
-
const
|
|
28
|
-
|
|
17
|
+
function de(i) {
|
|
18
|
+
const { properties: e, title: t, required: n } = i;
|
|
19
|
+
if (n && Array.isArray(n)) {
|
|
20
|
+
const o = n.reduce((r, s) => (r[s] = e[s].type === "object" && e[s].properties ? z(e[s]) : G(e[s].default), r), {});
|
|
21
|
+
if (t && n.find((r) => r === "id")) {
|
|
22
|
+
const r = t.toLowerCase().replace(/-/g, "_");
|
|
23
|
+
o.id = `${r}_${Math.random().toString().slice(2, 6)}`;
|
|
29
24
|
}
|
|
30
|
-
return
|
|
25
|
+
return o;
|
|
31
26
|
}
|
|
32
27
|
return {
|
|
33
|
-
type:
|
|
28
|
+
type: t
|
|
34
29
|
};
|
|
35
30
|
}
|
|
36
|
-
function
|
|
37
|
-
const
|
|
38
|
-
if (
|
|
39
|
-
let
|
|
40
|
-
const
|
|
41
|
-
return
|
|
31
|
+
function J(i, e = {}, t) {
|
|
32
|
+
const n = ee[i];
|
|
33
|
+
if (n) {
|
|
34
|
+
let o = de(n);
|
|
35
|
+
const r = te[i];
|
|
36
|
+
return o = r ? r({ getSchemaByType: J }, o, e, t) : o, o;
|
|
42
37
|
}
|
|
43
38
|
return null;
|
|
44
39
|
}
|
|
45
|
-
function
|
|
46
|
-
const
|
|
47
|
-
return Object.keys(
|
|
40
|
+
function pe(i, e) {
|
|
41
|
+
const t = z(e);
|
|
42
|
+
return Object.keys(t).reduce((n, o) => (Object.prototype.hasOwnProperty.call(i, o) && (n[o] && X(n[o]) && X(i[o] || !i[o]) ? Object.assign(n[o], i[o] || {}) : n[o] = i[o]), n), t), t;
|
|
48
43
|
}
|
|
49
|
-
function
|
|
50
|
-
return Object.keys(
|
|
51
|
-
if (
|
|
52
|
-
const
|
|
53
|
-
if (typeof
|
|
54
|
-
|
|
44
|
+
function ne(i, e) {
|
|
45
|
+
return Object.keys(i).filter((n) => i[n] != null).reduce((n, o) => {
|
|
46
|
+
if (e.has(o)) {
|
|
47
|
+
const r = e.get(o);
|
|
48
|
+
if (typeof r == "string")
|
|
49
|
+
n[r] = i[o];
|
|
55
50
|
else {
|
|
56
|
-
const s =
|
|
57
|
-
Object.assign(
|
|
51
|
+
const s = r(o, i[o], i);
|
|
52
|
+
Object.assign(n, s);
|
|
58
53
|
}
|
|
59
54
|
} else
|
|
60
|
-
o
|
|
61
|
-
return
|
|
55
|
+
n[o] = i[o];
|
|
56
|
+
return n;
|
|
62
57
|
}, {});
|
|
63
58
|
}
|
|
64
|
-
function
|
|
65
|
-
const
|
|
66
|
-
return
|
|
59
|
+
function fe(i, e, t = /* @__PURE__ */ new Map()) {
|
|
60
|
+
const n = pe(i, e);
|
|
61
|
+
return ne(n, t);
|
|
67
62
|
}
|
|
68
|
-
function
|
|
69
|
-
function
|
|
70
|
-
if (typeof
|
|
71
|
-
return
|
|
72
|
-
if (typeof
|
|
73
|
-
const f = Object.keys(
|
|
63
|
+
function me(i = {}) {
|
|
64
|
+
function e(a, d, c, m) {
|
|
65
|
+
if (typeof c == "number")
|
|
66
|
+
return m[a].length === c;
|
|
67
|
+
if (typeof c == "object") {
|
|
68
|
+
const f = Object.keys(c)[0], b = c[f];
|
|
74
69
|
if (f === "not")
|
|
75
|
-
return Number(
|
|
70
|
+
return Number(m[a].length) !== Number(b);
|
|
76
71
|
if (f === "moreThan")
|
|
77
|
-
return Number(
|
|
72
|
+
return Number(m[a].length) >= Number(b);
|
|
78
73
|
if (f === "lessThan")
|
|
79
|
-
return Number(
|
|
74
|
+
return Number(m[a].length) <= Number(b);
|
|
80
75
|
}
|
|
81
76
|
return !1;
|
|
82
77
|
}
|
|
83
|
-
function
|
|
84
|
-
return
|
|
78
|
+
function t(a, d, c, m) {
|
|
79
|
+
return m[a] && m[a].propertyValue && String(m[a].propertyValue.value) === String(c);
|
|
85
80
|
}
|
|
86
|
-
const
|
|
87
|
-
["length",
|
|
88
|
-
["getProperty",
|
|
81
|
+
const n = /* @__PURE__ */ new Map([
|
|
82
|
+
["length", e],
|
|
83
|
+
["getProperty", t]
|
|
89
84
|
]);
|
|
90
|
-
Object.keys(
|
|
91
|
-
function
|
|
92
|
-
const
|
|
93
|
-
return typeof
|
|
94
|
-
if (
|
|
95
|
-
return { target:
|
|
96
|
-
const f =
|
|
97
|
-
return { target:
|
|
85
|
+
Object.keys(i).reduce((a, d) => (a.set(d, i[d]), a), n);
|
|
86
|
+
function o(a, d) {
|
|
87
|
+
const c = a;
|
|
88
|
+
return typeof d == "number" ? [{ target: c, operator: "length", param: null, value: Number(d) }] : typeof d == "boolean" ? [{ target: c, operator: "getProperty", param: a, value: !!d }] : typeof d == "object" ? Object.keys(d).map((m) => {
|
|
89
|
+
if (m === "length")
|
|
90
|
+
return { target: c, operator: "length", param: null, value: d[m] };
|
|
91
|
+
const f = m, b = d[m];
|
|
92
|
+
return { target: c, operator: "getProperty", param: f, value: b };
|
|
98
93
|
}) : [];
|
|
99
94
|
}
|
|
100
|
-
function
|
|
101
|
-
return Object.keys(
|
|
102
|
-
const f =
|
|
103
|
-
return
|
|
95
|
+
function r(a) {
|
|
96
|
+
return Object.keys(a).reduce((c, m) => {
|
|
97
|
+
const f = o(m, a[m]);
|
|
98
|
+
return c.push(...f), c;
|
|
104
99
|
}, []);
|
|
105
100
|
}
|
|
106
|
-
function s(
|
|
107
|
-
if (
|
|
108
|
-
const
|
|
109
|
-
return
|
|
101
|
+
function s(a, d) {
|
|
102
|
+
if (n.has(a.operator)) {
|
|
103
|
+
const c = n.get(a.operator);
|
|
104
|
+
return c && c(a.target, a.param, a.value, d) || !1;
|
|
110
105
|
}
|
|
111
106
|
return !1;
|
|
112
107
|
}
|
|
113
|
-
function
|
|
114
|
-
return
|
|
108
|
+
function u(a, d) {
|
|
109
|
+
return r(a).reduce((f, b) => f && s(b, d), !0);
|
|
115
110
|
}
|
|
116
|
-
function l(
|
|
117
|
-
const
|
|
118
|
-
return
|
|
111
|
+
function l(a, d) {
|
|
112
|
+
const c = Object.keys(a), m = c.includes("allOf"), f = c.includes("anyOf"), b = m || f, D = (b ? a[b ? m ? "allOf" : "anyOf" : "allOf"] : [a]).map((h) => u(h, d));
|
|
113
|
+
return m ? !D.includes(!1) : D.includes(!0);
|
|
119
114
|
}
|
|
120
115
|
return { parseValueSchema: l };
|
|
121
116
|
}
|
|
122
|
-
const
|
|
117
|
+
const ge = {
|
|
123
118
|
button: { type: "button", name: "按钮" },
|
|
124
119
|
"response-toolbar": { type: "response-toolbar", name: "工具栏" },
|
|
125
120
|
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮" },
|
|
@@ -164,66 +159,66 @@ const Zt = {
|
|
|
164
159
|
"external-container": { type: "external-container", name: "外部容器", icon: "content-container" },
|
|
165
160
|
"list-nav": { type: "list-nav", name: "列表导航" },
|
|
166
161
|
"filter-bar": { type: "filter-bar", name: "筛选条" }
|
|
167
|
-
},
|
|
168
|
-
|
|
169
|
-
function
|
|
170
|
-
return
|
|
171
|
-
if (!
|
|
172
|
-
return
|
|
173
|
-
const l =
|
|
174
|
-
return Object.assign(
|
|
162
|
+
}, he = {}, ve = {};
|
|
163
|
+
me();
|
|
164
|
+
function ye(i, e, t = /* @__PURE__ */ new Map(), n = (s, u, l, a) => u, o = {}, r = (s) => s) {
|
|
165
|
+
return ee[e.title] = e, te[e.title] = n, he[e.title] = o, ve[e.title] = r, (s = {}, u = !0) => {
|
|
166
|
+
if (!u)
|
|
167
|
+
return ne(s, t);
|
|
168
|
+
const l = fe(s, e, t), a = Object.keys(i).reduce((d, c) => (d[c] = i[c].default, d), {});
|
|
169
|
+
return Object.assign(a, l);
|
|
175
170
|
};
|
|
176
171
|
}
|
|
177
|
-
function
|
|
178
|
-
return { customClass:
|
|
172
|
+
function be(i, e) {
|
|
173
|
+
return { customClass: e.class, customStyle: e.style };
|
|
179
174
|
}
|
|
180
|
-
function
|
|
181
|
-
var
|
|
182
|
-
const
|
|
183
|
-
if (
|
|
184
|
-
const
|
|
185
|
-
(
|
|
186
|
-
const
|
|
175
|
+
function Ce(i, e) {
|
|
176
|
+
var n, o;
|
|
177
|
+
const t = {};
|
|
178
|
+
if (e != null && e.buttons) {
|
|
179
|
+
const r = [];
|
|
180
|
+
(n = e == null ? void 0 : e.buttons) == null || n.map((s) => {
|
|
181
|
+
const u = {};
|
|
187
182
|
Object.keys(s).map((l) => {
|
|
188
|
-
var
|
|
189
|
-
l === "appearance" ?
|
|
190
|
-
}),
|
|
191
|
-
}),
|
|
183
|
+
var a;
|
|
184
|
+
l === "appearance" ? u.class = ((a = s[l]) == null ? void 0 : a.class) || "" : u[l] = s[l];
|
|
185
|
+
}), r.push(u);
|
|
186
|
+
}), t.buttons = r;
|
|
192
187
|
}
|
|
193
|
-
return (
|
|
188
|
+
return (o = e == null ? void 0 : e.appearance) != null && o.class && (t.buttonClass = e.appearance.class || "col-6"), e != null && e.id && (t.toolbarId = e.id), e && Object.prototype.hasOwnProperty.call(e, "visible") && (t.buttonsVisible = e.visible), t;
|
|
194
189
|
}
|
|
195
|
-
function
|
|
196
|
-
if (!
|
|
190
|
+
function we(i, e) {
|
|
191
|
+
if (!i || i.length < 1)
|
|
197
192
|
return null;
|
|
198
|
-
for (const
|
|
199
|
-
if (
|
|
200
|
-
return
|
|
201
|
-
if (
|
|
202
|
-
const
|
|
203
|
-
if (
|
|
204
|
-
return
|
|
193
|
+
for (const t of i) {
|
|
194
|
+
if (t.id === e)
|
|
195
|
+
return t;
|
|
196
|
+
if (t.children) {
|
|
197
|
+
const n = t.children.find((o) => o.id === e);
|
|
198
|
+
if (n)
|
|
199
|
+
return n;
|
|
205
200
|
}
|
|
206
201
|
}
|
|
207
202
|
return null;
|
|
208
203
|
}
|
|
209
|
-
function
|
|
210
|
-
function
|
|
211
|
-
var
|
|
212
|
-
const
|
|
213
|
-
if (!
|
|
204
|
+
function Pe() {
|
|
205
|
+
function i(e, t) {
|
|
206
|
+
var u;
|
|
207
|
+
const n = (u = e.toolbar) == null ? void 0 : u.buttons;
|
|
208
|
+
if (!n || n.length < 1)
|
|
214
209
|
return null;
|
|
215
|
-
const [
|
|
210
|
+
const [o, r] = t.payloads, s = we(n, r);
|
|
216
211
|
return s ? s.onClick || s.click : null;
|
|
217
212
|
}
|
|
218
213
|
return {
|
|
219
|
-
resolve:
|
|
214
|
+
resolve: i
|
|
220
215
|
};
|
|
221
216
|
}
|
|
222
|
-
const
|
|
223
|
-
["appearance",
|
|
224
|
-
["toolbar",
|
|
217
|
+
const Se = /* @__PURE__ */ new Map([
|
|
218
|
+
["appearance", be],
|
|
219
|
+
["toolbar", Ce]
|
|
225
220
|
// 内部处理可见、Id、样式、按钮
|
|
226
|
-
]),
|
|
221
|
+
]), Ee = "https://json-schema.org/draft/2020-12/schema", Me = "https://farris-design.gitee.io/page-header.schema.json", Ve = "page-header", ke = "A Farris Container Component", Be = "object", Te = {
|
|
227
222
|
id: {
|
|
228
223
|
description: "The unique identifier for a Page Header",
|
|
229
224
|
type: "string"
|
|
@@ -356,22 +351,22 @@ const an = /* @__PURE__ */ new Map([
|
|
|
356
351
|
type: "boolean",
|
|
357
352
|
default: !0
|
|
358
353
|
}
|
|
359
|
-
},
|
|
354
|
+
}, De = [
|
|
360
355
|
"id",
|
|
361
356
|
"type"
|
|
362
|
-
],
|
|
363
|
-
$schema:
|
|
364
|
-
$id:
|
|
365
|
-
title:
|
|
366
|
-
description:
|
|
367
|
-
type:
|
|
368
|
-
properties:
|
|
369
|
-
required:
|
|
357
|
+
], Ne = {
|
|
358
|
+
$schema: Ee,
|
|
359
|
+
$id: Me,
|
|
360
|
+
title: Ve,
|
|
361
|
+
description: ke,
|
|
362
|
+
type: Be,
|
|
363
|
+
properties: Te,
|
|
364
|
+
required: De
|
|
370
365
|
};
|
|
371
|
-
function
|
|
372
|
-
return
|
|
366
|
+
function xe(i, e, t) {
|
|
367
|
+
return e.title = "标题", e;
|
|
373
368
|
}
|
|
374
|
-
const
|
|
369
|
+
const Q = {
|
|
375
370
|
/** 组件自定义样式 */
|
|
376
371
|
customClass: { type: String, default: "" },
|
|
377
372
|
/** 是否显示图标 */
|
|
@@ -406,324 +401,324 @@ const Fe = {
|
|
|
406
401
|
visible: { type: Boolean, default: !0 },
|
|
407
402
|
/** 控制按钮是否可见 */
|
|
408
403
|
buttonsVisible: { type: Boolean, default: !0 }
|
|
409
|
-
},
|
|
404
|
+
}, Ae = Object.assign({}, Q, {
|
|
410
405
|
componentId: { type: String, default: "" }
|
|
411
|
-
}),
|
|
406
|
+
}), Z = ye(Q, Ne, Se, xe), Ie = Pe(), _ = /* @__PURE__ */ W({
|
|
412
407
|
name: "FPageHeader",
|
|
413
|
-
props:
|
|
408
|
+
props: Q,
|
|
414
409
|
emits: ["click", "prePaginationClick", "nextPaginationClick"],
|
|
415
|
-
setup(
|
|
416
|
-
const
|
|
417
|
-
|
|
410
|
+
setup(i, e) {
|
|
411
|
+
const t = S(i.buttons), n = (h, I) => {
|
|
412
|
+
e.emit("click", h, I);
|
|
418
413
|
};
|
|
419
|
-
function
|
|
420
|
-
|
|
414
|
+
function o(h, I) {
|
|
415
|
+
h && I && I.split(" ").reduce((F, M) => (F[M] = !0, F), h);
|
|
421
416
|
}
|
|
422
|
-
const
|
|
423
|
-
const
|
|
417
|
+
const r = T(() => {
|
|
418
|
+
const h = {
|
|
424
419
|
"f-page-header": !0,
|
|
425
|
-
"d-none": !
|
|
420
|
+
"d-none": !i.visible
|
|
426
421
|
};
|
|
427
|
-
return
|
|
428
|
-
}), s =
|
|
429
|
-
const
|
|
422
|
+
return o(h, i.customClass), h;
|
|
423
|
+
}), s = T(() => {
|
|
424
|
+
const h = {
|
|
430
425
|
"f-title-icon": !0
|
|
431
426
|
};
|
|
432
|
-
return
|
|
433
|
-
}),
|
|
434
|
-
const
|
|
427
|
+
return o(h, i.iconClass), h;
|
|
428
|
+
}), u = T(() => {
|
|
429
|
+
const h = {
|
|
435
430
|
"f-icon": !0
|
|
436
431
|
};
|
|
437
|
-
return
|
|
438
|
-
}), l =
|
|
439
|
-
const
|
|
432
|
+
return o(h, i.icon), h;
|
|
433
|
+
}), l = T(() => {
|
|
434
|
+
const h = {
|
|
440
435
|
"f-title": !0
|
|
441
436
|
};
|
|
442
|
-
return
|
|
443
|
-
}),
|
|
444
|
-
const
|
|
437
|
+
return o(h, i.titleContentClass), h;
|
|
438
|
+
}), a = T(() => {
|
|
439
|
+
const h = {
|
|
445
440
|
"f-content": !0
|
|
446
441
|
};
|
|
447
|
-
return
|
|
448
|
-
}),
|
|
449
|
-
const
|
|
442
|
+
return o(h, i.contentClass), h;
|
|
443
|
+
}), d = T(() => {
|
|
444
|
+
const h = {
|
|
450
445
|
"f-content": !0
|
|
451
446
|
};
|
|
452
|
-
return
|
|
453
|
-
}),
|
|
447
|
+
return o(h, i.downContentClass), h;
|
|
448
|
+
}), c = T(() => ({
|
|
454
449
|
"f-icon f-icon-arrow-w": !0,
|
|
455
|
-
"f-state-disabled":
|
|
456
|
-
})),
|
|
450
|
+
"f-state-disabled": i.prePaginationDisabled
|
|
451
|
+
})), m = T(() => ({
|
|
457
452
|
"f-icon f-icon-arrow-e": !0,
|
|
458
|
-
"f-state-disabled":
|
|
453
|
+
"f-state-disabled": i.nextPaginationDisabled
|
|
459
454
|
}));
|
|
460
|
-
function f(
|
|
461
|
-
|
|
455
|
+
function f(h) {
|
|
456
|
+
i.prePaginationDisabled || e.emit("prePaginationClick", h);
|
|
462
457
|
}
|
|
463
|
-
function
|
|
464
|
-
|
|
458
|
+
function b(h) {
|
|
459
|
+
i.nextPaginationDisabled || e.emit("nextPaginationClick", h);
|
|
465
460
|
}
|
|
466
|
-
function
|
|
467
|
-
return
|
|
461
|
+
function v() {
|
|
462
|
+
return e.slots.titleContent ? y("div", {
|
|
468
463
|
class: l.value
|
|
469
|
-
}, [
|
|
464
|
+
}, [R(" "), e.slots.titleContent()]) : y("div", {
|
|
470
465
|
class: "f-title"
|
|
471
|
-
}, [
|
|
466
|
+
}, [i.showIcon && i.icon ? y("span", {
|
|
472
467
|
class: s.value
|
|
473
|
-
}, [
|
|
474
|
-
class:
|
|
475
|
-
}, null)]) : "",
|
|
468
|
+
}, [y("i", {
|
|
469
|
+
class: u.value
|
|
470
|
+
}, null)]) : "", y("h4", {
|
|
476
471
|
class: "f-title-text"
|
|
477
|
-
}, [
|
|
472
|
+
}, [i.title]), i.subTitle ? y("h5", {
|
|
478
473
|
class: "f-title-subtitle"
|
|
479
|
-
}, [
|
|
474
|
+
}, [i.subTitle]) : "", i.showPagination ? y("div", {
|
|
480
475
|
class: "f-title-pagination"
|
|
481
|
-
}, [
|
|
482
|
-
class:
|
|
476
|
+
}, [y("span", {
|
|
477
|
+
class: c.value,
|
|
483
478
|
onClick: f
|
|
484
|
-
}, null),
|
|
485
|
-
class:
|
|
486
|
-
onClick:
|
|
479
|
+
}, null), y("span", {
|
|
480
|
+
class: m.value,
|
|
481
|
+
onClick: b
|
|
487
482
|
}, null)]) : ""]);
|
|
488
483
|
}
|
|
489
|
-
function
|
|
490
|
-
return
|
|
491
|
-
class:
|
|
492
|
-
}, [
|
|
484
|
+
function k() {
|
|
485
|
+
return e.slots.content ? y("div", {
|
|
486
|
+
class: a.value
|
|
487
|
+
}, [R(" "), e.slots.content()]) : "";
|
|
493
488
|
}
|
|
494
|
-
function
|
|
495
|
-
if (
|
|
496
|
-
return
|
|
497
|
-
id:
|
|
498
|
-
customClass:
|
|
499
|
-
visible:
|
|
500
|
-
items:
|
|
501
|
-
onClick:
|
|
489
|
+
function D() {
|
|
490
|
+
if (i.buttons && i.buttons.length > 0)
|
|
491
|
+
return y(ce, {
|
|
492
|
+
id: i.toolbarId,
|
|
493
|
+
customClass: i.buttonClass,
|
|
494
|
+
visible: i.buttonsVisible,
|
|
495
|
+
items: t.value,
|
|
496
|
+
onClick: n
|
|
502
497
|
}, null);
|
|
503
498
|
}
|
|
504
|
-
function
|
|
505
|
-
return
|
|
506
|
-
class:
|
|
507
|
-
}, [
|
|
499
|
+
function N() {
|
|
500
|
+
return e.slots.downContent ? y("div", {
|
|
501
|
+
class: d.value
|
|
502
|
+
}, [R(" "), e.slots.downContent()]) : "";
|
|
508
503
|
}
|
|
509
|
-
return
|
|
510
|
-
|
|
504
|
+
return j(() => i.buttons, (h) => {
|
|
505
|
+
t.value = h;
|
|
511
506
|
}, {
|
|
512
507
|
deep: !0
|
|
513
|
-
}), () =>
|
|
514
|
-
class:
|
|
515
|
-
}, [
|
|
508
|
+
}), () => i.visible ? y("div", {
|
|
509
|
+
class: r.value
|
|
510
|
+
}, [y("nav", {
|
|
516
511
|
class: "f-page-header-base"
|
|
517
|
-
}, [
|
|
512
|
+
}, [v(), k(), D()]), N()]) : null;
|
|
518
513
|
}
|
|
519
514
|
});
|
|
520
|
-
function
|
|
521
|
-
var
|
|
522
|
-
const
|
|
515
|
+
function Fe(i, e, t) {
|
|
516
|
+
var M;
|
|
517
|
+
const n = t && t.getStyles && t.getStyles() || "", o = t && t.getDesignerClass && t.getDesignerClass() || "", r = S();
|
|
523
518
|
function s() {
|
|
524
|
-
return (
|
|
519
|
+
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanMoveComponent ? t.checkCanMoveComponent() : !0;
|
|
525
520
|
}
|
|
526
|
-
function
|
|
521
|
+
function u() {
|
|
527
522
|
return !1;
|
|
528
523
|
}
|
|
529
524
|
function l() {
|
|
530
|
-
return (
|
|
525
|
+
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanDeleteComponent ? t.checkCanDeleteComponent() : !0;
|
|
531
526
|
}
|
|
532
|
-
function
|
|
533
|
-
return (
|
|
527
|
+
function a() {
|
|
528
|
+
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !0 : t && t.hideNestedPaddingInDesginerView ? t.hideNestedPaddingInDesginerView() : !1;
|
|
534
529
|
}
|
|
535
|
-
function
|
|
536
|
-
if (!
|
|
530
|
+
function d(p) {
|
|
531
|
+
if (!p || !p.value)
|
|
537
532
|
return null;
|
|
538
|
-
if (
|
|
539
|
-
return
|
|
540
|
-
const
|
|
541
|
-
return
|
|
533
|
+
if (p.value.schema && p.value.schema.type === "component")
|
|
534
|
+
return p.value;
|
|
535
|
+
const P = S(p == null ? void 0 : p.value.parent), w = d(P);
|
|
536
|
+
return w || null;
|
|
542
537
|
}
|
|
543
|
-
function
|
|
538
|
+
function c(p = e) {
|
|
544
539
|
var x;
|
|
545
|
-
if (
|
|
546
|
-
return
|
|
547
|
-
const { componentInstance:
|
|
548
|
-
if (
|
|
540
|
+
if (t != null && t.getDraggableDesignItemElement)
|
|
541
|
+
return t.getDraggableDesignItemElement(p);
|
|
542
|
+
const { componentInstance: P, designerItemElementRef: w } = p;
|
|
543
|
+
if (!P || !P.value)
|
|
549
544
|
return null;
|
|
550
|
-
const { getCustomButtons:
|
|
551
|
-
return
|
|
545
|
+
const { getCustomButtons: E } = P.value;
|
|
546
|
+
return P.value.canMove || E && ((x = E()) != null && x.length) ? w : c(p.parent);
|
|
552
547
|
}
|
|
553
|
-
function p
|
|
554
|
-
return !!
|
|
548
|
+
function m(p) {
|
|
549
|
+
return !!t && t.canAccepts(p);
|
|
555
550
|
}
|
|
556
551
|
function f() {
|
|
557
|
-
return (
|
|
552
|
+
return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
|
|
558
553
|
}
|
|
559
|
-
function
|
|
554
|
+
function b() {
|
|
560
555
|
}
|
|
561
|
-
function
|
|
562
|
-
var
|
|
563
|
-
!
|
|
556
|
+
function v(p, P) {
|
|
557
|
+
var w;
|
|
558
|
+
!p || !P || (t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(p, P), (w = e == null ? void 0 : e.setupContext) == null || w.emit("dragEnd"));
|
|
564
559
|
}
|
|
565
|
-
function
|
|
566
|
-
const { componentType:
|
|
567
|
-
let
|
|
568
|
-
|
|
569
|
-
const x =
|
|
570
|
-
return
|
|
560
|
+
function k(p, P) {
|
|
561
|
+
const { componentType: w } = p;
|
|
562
|
+
let E = J(w, p, P);
|
|
563
|
+
t && t.onResolveNewComponentSchema && (E = t.onResolveNewComponentSchema(p, E));
|
|
564
|
+
const x = w.toLowerCase().replace(/-/g, "_");
|
|
565
|
+
return E && !E.id && E.type === w && (E.id = `${x}_${Math.random().toString().slice(2, 6)}`), E;
|
|
571
566
|
}
|
|
572
|
-
function
|
|
573
|
-
|
|
567
|
+
function D(p) {
|
|
568
|
+
p && t != null && t.onChildElementMovedOut && t.onChildElementMovedOut(p);
|
|
574
569
|
}
|
|
575
|
-
function
|
|
576
|
-
if (
|
|
577
|
-
return
|
|
570
|
+
function N(...p) {
|
|
571
|
+
if (t && t.getPropsConfig)
|
|
572
|
+
return t.getPropsConfig(...p);
|
|
578
573
|
}
|
|
579
|
-
function
|
|
580
|
-
if (!
|
|
574
|
+
function h(p) {
|
|
575
|
+
if (!p)
|
|
581
576
|
return;
|
|
582
|
-
const
|
|
583
|
-
if (
|
|
584
|
-
const
|
|
585
|
-
|
|
577
|
+
const P = e == null ? void 0 : e.schema, { formSchemaUtils: w } = p;
|
|
578
|
+
if (P && w.getExpressions().length) {
|
|
579
|
+
const E = w.getExpressions().findIndex((x) => x.target === P.id);
|
|
580
|
+
E > -1 && w.getExpressions().splice(E, 1);
|
|
586
581
|
}
|
|
587
582
|
}
|
|
588
|
-
function
|
|
589
|
-
|
|
590
|
-
let
|
|
591
|
-
|
|
592
|
-
const
|
|
593
|
-
|
|
594
|
-
var
|
|
595
|
-
(
|
|
583
|
+
function I(p) {
|
|
584
|
+
t && t.onRemoveComponent && t.onRemoveComponent(), h(p), e != null && e.schema.contents && e.schema.contents.map((P) => {
|
|
585
|
+
let w = P.id;
|
|
586
|
+
P.type === "component-ref" && (w = P.component);
|
|
587
|
+
const E = i.value.querySelectorAll(`#${w}-design-item`);
|
|
588
|
+
E != null && E.length && Array.from(E).map((x) => {
|
|
589
|
+
var O;
|
|
590
|
+
(O = x == null ? void 0 : x.componentInstance) != null && O.value.onRemoveComponent && x.componentInstance.value.onRemoveComponent(p);
|
|
596
591
|
});
|
|
597
592
|
});
|
|
598
593
|
}
|
|
599
|
-
function
|
|
600
|
-
if (
|
|
601
|
-
return
|
|
594
|
+
function U() {
|
|
595
|
+
if (t && t.getCustomButtons)
|
|
596
|
+
return t.getCustomButtons();
|
|
602
597
|
}
|
|
603
|
-
function
|
|
604
|
-
if (
|
|
605
|
-
return
|
|
598
|
+
function F(p) {
|
|
599
|
+
if (t && t.onPropertyChanged)
|
|
600
|
+
return t.onPropertyChanged(p);
|
|
606
601
|
}
|
|
607
|
-
return
|
|
602
|
+
return r.value = {
|
|
608
603
|
canMove: s(),
|
|
609
|
-
canSelectParent:
|
|
604
|
+
canSelectParent: u(),
|
|
610
605
|
canDelete: l(),
|
|
611
|
-
canNested: !
|
|
612
|
-
contents:
|
|
613
|
-
elementRef:
|
|
614
|
-
parent: (
|
|
615
|
-
schema:
|
|
616
|
-
styles:
|
|
617
|
-
designerClass:
|
|
618
|
-
canAccepts:
|
|
619
|
-
getBelongedComponentInstance:
|
|
620
|
-
getDraggableDesignItemElement:
|
|
606
|
+
canNested: !a(),
|
|
607
|
+
contents: e == null ? void 0 : e.schema.contents,
|
|
608
|
+
elementRef: i,
|
|
609
|
+
parent: (M = e == null ? void 0 : e.parent) == null ? void 0 : M.componentInstance,
|
|
610
|
+
schema: e == null ? void 0 : e.schema,
|
|
611
|
+
styles: n,
|
|
612
|
+
designerClass: o,
|
|
613
|
+
canAccepts: m,
|
|
614
|
+
getBelongedComponentInstance: d,
|
|
615
|
+
getDraggableDesignItemElement: c,
|
|
621
616
|
getDraggingDisplayText: f,
|
|
622
|
-
getPropConfig:
|
|
623
|
-
getDragScopeElement:
|
|
624
|
-
onAcceptMovedChildElement:
|
|
625
|
-
onChildElementMovedOut:
|
|
626
|
-
addNewChildComponentSchema:
|
|
627
|
-
triggerBelongedComponentToMoveWhenMoved: !!
|
|
628
|
-
triggerBelongedComponentToDeleteWhenDeleted: !!
|
|
629
|
-
onRemoveComponent:
|
|
630
|
-
getCustomButtons:
|
|
631
|
-
onPropertyChanged:
|
|
632
|
-
},
|
|
617
|
+
getPropConfig: N,
|
|
618
|
+
getDragScopeElement: b,
|
|
619
|
+
onAcceptMovedChildElement: v,
|
|
620
|
+
onChildElementMovedOut: D,
|
|
621
|
+
addNewChildComponentSchema: k,
|
|
622
|
+
triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || S(!1),
|
|
623
|
+
triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || S(!1),
|
|
624
|
+
onRemoveComponent: I,
|
|
625
|
+
getCustomButtons: U,
|
|
626
|
+
onPropertyChanged: F
|
|
627
|
+
}, r;
|
|
633
628
|
}
|
|
634
|
-
const
|
|
635
|
-
function
|
|
636
|
-
|
|
629
|
+
const Ue = S(0);
|
|
630
|
+
function $e() {
|
|
631
|
+
Ue.value++;
|
|
637
632
|
}
|
|
638
|
-
const
|
|
639
|
-
function
|
|
640
|
-
const
|
|
641
|
-
return
|
|
633
|
+
const H = S(0);
|
|
634
|
+
function Oe(i, e) {
|
|
635
|
+
const t = e.getBoundingClientRect(), n = i.getBoundingClientRect(), o = n.top >= t.top, r = n.top <= t.bottom;
|
|
636
|
+
return o && r;
|
|
642
637
|
}
|
|
643
|
-
function
|
|
644
|
-
const
|
|
645
|
-
if (!
|
|
638
|
+
function Le(i) {
|
|
639
|
+
const e = i.querySelector(".component-btn-group");
|
|
640
|
+
if (!e)
|
|
646
641
|
return;
|
|
647
|
-
|
|
648
|
-
const
|
|
649
|
-
if (!(
|
|
650
|
-
const
|
|
651
|
-
if (
|
|
652
|
-
const
|
|
653
|
-
|
|
654
|
-
let
|
|
642
|
+
e.style.display = "";
|
|
643
|
+
const t = e.getBoundingClientRect();
|
|
644
|
+
if (!(t.top === 0 && t.left === 0)) {
|
|
645
|
+
const n = e.querySelector("div");
|
|
646
|
+
if (n) {
|
|
647
|
+
const o = n.getBoundingClientRect();
|
|
648
|
+
n.style.top = t.top + "px";
|
|
649
|
+
let r = t.left - o.width;
|
|
655
650
|
const s = document.querySelector(".editorDiv");
|
|
656
651
|
if (s) {
|
|
657
|
-
const
|
|
658
|
-
|
|
652
|
+
const u = s.getBoundingClientRect();
|
|
653
|
+
r < u.left && ({ left: r } = i.getBoundingClientRect());
|
|
659
654
|
}
|
|
660
|
-
|
|
655
|
+
n.style.left = r + "px";
|
|
661
656
|
}
|
|
662
657
|
}
|
|
663
658
|
}
|
|
664
|
-
function
|
|
659
|
+
function qe(i) {
|
|
665
660
|
if (!window.scrollContainerList)
|
|
666
661
|
return;
|
|
667
|
-
const
|
|
668
|
-
if (
|
|
669
|
-
const
|
|
670
|
-
if (
|
|
671
|
-
return
|
|
662
|
+
const e = Array.from(window.scrollContainerList);
|
|
663
|
+
if (e.length && e.length === 1) {
|
|
664
|
+
const t = e[0], n = document.querySelector(`[id=${t}]`);
|
|
665
|
+
if (n && n.contains(i))
|
|
666
|
+
return n;
|
|
672
667
|
}
|
|
673
668
|
}
|
|
674
|
-
function
|
|
675
|
-
if (!
|
|
669
|
+
function oe(i) {
|
|
670
|
+
if (!i)
|
|
676
671
|
return;
|
|
677
|
-
const
|
|
678
|
-
if (
|
|
672
|
+
const e = i.getBoundingClientRect();
|
|
673
|
+
if (e.width === 0 && e.height === 0)
|
|
679
674
|
return;
|
|
680
|
-
const
|
|
681
|
-
if (
|
|
682
|
-
let
|
|
683
|
-
const
|
|
684
|
-
if (
|
|
685
|
-
|
|
675
|
+
const t = i.querySelector(".component-btn-group");
|
|
676
|
+
if (t) {
|
|
677
|
+
let n = !0;
|
|
678
|
+
const o = qe(i);
|
|
679
|
+
if (o && (n = Oe(i, o)), !n) {
|
|
680
|
+
t.style.display = "none";
|
|
686
681
|
return;
|
|
687
682
|
}
|
|
688
|
-
|
|
683
|
+
Le(i);
|
|
689
684
|
}
|
|
690
685
|
}
|
|
691
|
-
function
|
|
692
|
-
if (!
|
|
686
|
+
function Re(i) {
|
|
687
|
+
if (!i)
|
|
693
688
|
return;
|
|
694
|
-
let
|
|
695
|
-
|
|
689
|
+
let e;
|
|
690
|
+
i.className.includes("dgComponentSelected") ? e = i : e = i.querySelector(".dgComponentSelected"), e && oe(e);
|
|
696
691
|
}
|
|
697
|
-
function
|
|
698
|
-
const { formSchemaUtils:
|
|
699
|
-
function
|
|
692
|
+
function _e(i) {
|
|
693
|
+
const { formSchemaUtils: e, formStateMachineUtils: t } = i;
|
|
694
|
+
function n(l, a = "") {
|
|
700
695
|
return {
|
|
701
|
-
path:
|
|
696
|
+
path: a + l.code,
|
|
702
697
|
field: l.id,
|
|
703
698
|
fullPath: l.code
|
|
704
699
|
};
|
|
705
700
|
}
|
|
706
|
-
function
|
|
707
|
-
return
|
|
701
|
+
function o(l, a = "") {
|
|
702
|
+
return e.getViewModelById(l).states.map((c) => n(c, a));
|
|
708
703
|
}
|
|
709
|
-
function
|
|
710
|
-
const
|
|
711
|
-
if (l ===
|
|
712
|
-
return
|
|
713
|
-
const
|
|
714
|
-
return [...
|
|
704
|
+
function r(l) {
|
|
705
|
+
const a = e.getRootViewModelId(), d = o(l);
|
|
706
|
+
if (l === a)
|
|
707
|
+
return d;
|
|
708
|
+
const c = o(a, "root-component.");
|
|
709
|
+
return [...d, ...c];
|
|
715
710
|
}
|
|
716
711
|
function s(l) {
|
|
717
712
|
return l.binding && l.binding.path || l.id || "";
|
|
718
713
|
}
|
|
719
|
-
function
|
|
720
|
-
return
|
|
714
|
+
function u() {
|
|
715
|
+
return t && t.getRenderStates() || [];
|
|
721
716
|
}
|
|
722
|
-
return { getVariables:
|
|
717
|
+
return { getVariables: r, getControlName: s, getStateMachines: u };
|
|
723
718
|
}
|
|
724
|
-
class
|
|
725
|
-
constructor(
|
|
726
|
-
|
|
719
|
+
class He {
|
|
720
|
+
constructor(e) {
|
|
721
|
+
B(this, "sessionVariables", [
|
|
727
722
|
{
|
|
728
723
|
key: "CurrentSysOrgName",
|
|
729
724
|
name: "当前组织Name",
|
|
@@ -760,7 +755,7 @@ class In {
|
|
|
760
755
|
description: "当前登录的语言编号,例如简体中文返回'zh-CHS',英文返回'en',繁体中文'zh-CHT'"
|
|
761
756
|
}
|
|
762
757
|
]);
|
|
763
|
-
|
|
758
|
+
B(this, "expressionNames", {
|
|
764
759
|
compute: "计算表达式",
|
|
765
760
|
dependency: "依赖表达式",
|
|
766
761
|
validate: "验证表达式",
|
|
@@ -769,99 +764,99 @@ class In {
|
|
|
769
764
|
readonly: "只读表达式",
|
|
770
765
|
required: "必填表达式"
|
|
771
766
|
});
|
|
772
|
-
|
|
773
|
-
convertFrom: (o, r,
|
|
774
|
-
const
|
|
775
|
-
return
|
|
767
|
+
B(this, "getExpressionConverter", (e, t) => ({
|
|
768
|
+
convertFrom: (n, o, r, s) => {
|
|
769
|
+
const u = r.getExpressionRuleValue(e, t || o);
|
|
770
|
+
return u && u.value || "";
|
|
776
771
|
},
|
|
777
|
-
convertTo: (o, r,
|
|
772
|
+
convertTo: (n, o, r, s, u) => {
|
|
778
773
|
var l;
|
|
779
|
-
if (
|
|
780
|
-
const
|
|
781
|
-
((l =
|
|
782
|
-
(
|
|
783
|
-
)) ?
|
|
774
|
+
if (o === "dataPicking" && (r != null && r.target)) {
|
|
775
|
+
const a = `${r.target}_dataPicking`;
|
|
776
|
+
((l = r.rules) == null ? void 0 : l.some(
|
|
777
|
+
(c) => c.id === a && c.value
|
|
778
|
+
)) ? n.dictPickingExpressionId = a : delete n.dictPickingExpressionId;
|
|
784
779
|
}
|
|
785
|
-
s.updateExpression(
|
|
780
|
+
s.updateExpression(r);
|
|
786
781
|
}
|
|
787
782
|
}));
|
|
788
|
-
this.formSchemaService =
|
|
783
|
+
this.formSchemaService = e;
|
|
789
784
|
}
|
|
790
|
-
getExpressionRule(
|
|
791
|
-
const
|
|
792
|
-
if (!
|
|
785
|
+
getExpressionRule(e, t) {
|
|
786
|
+
const n = this.formSchemaService.getExpressions();
|
|
787
|
+
if (!n)
|
|
793
788
|
return "";
|
|
794
|
-
const
|
|
795
|
-
if (!
|
|
789
|
+
const o = n.find((s) => s.target === e);
|
|
790
|
+
if (!o)
|
|
796
791
|
return "";
|
|
797
|
-
const
|
|
798
|
-
return
|
|
792
|
+
const r = o.rules.find((s) => s.type === t);
|
|
793
|
+
return r || "";
|
|
799
794
|
}
|
|
800
795
|
// 获取上下文表单变量
|
|
801
796
|
getContextFormVariables() {
|
|
802
|
-
const { module:
|
|
803
|
-
if (!
|
|
797
|
+
const { module: e } = this.formSchemaService.getFormSchema();
|
|
798
|
+
if (!e.viewmodels || e.viewmodels.length === 0)
|
|
804
799
|
return [];
|
|
805
|
-
const
|
|
806
|
-
if (!
|
|
800
|
+
const t = this.formSchemaService.getRootViewModelId(), n = this.formSchemaService.getViewModelById(t);
|
|
801
|
+
if (!n || !n.states || n.states.length === 0)
|
|
807
802
|
return [];
|
|
808
|
-
const
|
|
809
|
-
return
|
|
810
|
-
|
|
811
|
-
key:
|
|
812
|
-
name:
|
|
813
|
-
description:
|
|
814
|
-
category:
|
|
803
|
+
const o = [];
|
|
804
|
+
return n.states.forEach((r) => {
|
|
805
|
+
o.push({
|
|
806
|
+
key: r.code,
|
|
807
|
+
name: r.name,
|
|
808
|
+
description: r.name,
|
|
809
|
+
category: r.category
|
|
815
810
|
});
|
|
816
|
-
}),
|
|
811
|
+
}), o;
|
|
817
812
|
}
|
|
818
|
-
createTreeNode(
|
|
813
|
+
createTreeNode(e, t, n = "label") {
|
|
819
814
|
return {
|
|
820
|
-
id:
|
|
821
|
-
name:
|
|
822
|
-
bindingPath:
|
|
823
|
-
parents:
|
|
815
|
+
id: e.id,
|
|
816
|
+
name: e.name,
|
|
817
|
+
bindingPath: e[n],
|
|
818
|
+
parents: t
|
|
824
819
|
};
|
|
825
820
|
}
|
|
826
|
-
buildEntityFieldsTreeData(
|
|
827
|
-
const
|
|
828
|
-
return
|
|
829
|
-
var
|
|
830
|
-
const
|
|
821
|
+
buildEntityFieldsTreeData(e = null, t) {
|
|
822
|
+
const n = [];
|
|
823
|
+
return e == null || e.forEach((o) => {
|
|
824
|
+
var u;
|
|
825
|
+
const r = this.createTreeNode(o, t);
|
|
831
826
|
let s = [];
|
|
832
|
-
(
|
|
833
|
-
data:
|
|
827
|
+
(u = o.type) != null && u.fields && (s = this.buildEntityFieldsTreeData(o.type.fields, [...t, o.label])), n.push({
|
|
828
|
+
data: r,
|
|
834
829
|
children: s,
|
|
835
830
|
expanded: !0
|
|
836
831
|
});
|
|
837
|
-
}),
|
|
838
|
-
}
|
|
839
|
-
buildChildEntityTreeData(
|
|
840
|
-
const
|
|
841
|
-
return
|
|
842
|
-
var l,
|
|
843
|
-
const
|
|
844
|
-
|
|
845
|
-
data:
|
|
832
|
+
}), n;
|
|
833
|
+
}
|
|
834
|
+
buildChildEntityTreeData(e = null, t) {
|
|
835
|
+
const n = [];
|
|
836
|
+
return e == null || e.forEach((o) => {
|
|
837
|
+
var l, a;
|
|
838
|
+
const r = this.createTreeNode(o, t), s = this.buildEntityFieldsTreeData((l = o.type) == null ? void 0 : l.fields, [...t, o.label]), u = this.buildChildEntityTreeData((a = o.type) == null ? void 0 : a.entities, [...t, o.label]);
|
|
839
|
+
u != null && u.length && (s == null || s.push(...u)), n.push({
|
|
840
|
+
data: r,
|
|
846
841
|
children: s || [],
|
|
847
842
|
// 空值回退
|
|
848
843
|
expanded: !0
|
|
849
844
|
});
|
|
850
|
-
}),
|
|
845
|
+
}), n;
|
|
851
846
|
}
|
|
852
847
|
getEntitiesTreeData() {
|
|
853
|
-
const
|
|
854
|
-
if (!(
|
|
848
|
+
const e = this.formSchemaService.getSchemaEntities();
|
|
849
|
+
if (!(e != null && e.length))
|
|
855
850
|
return [];
|
|
856
|
-
const
|
|
857
|
-
if (!(
|
|
851
|
+
const t = e[0];
|
|
852
|
+
if (!(t != null && t.type))
|
|
858
853
|
return [];
|
|
859
|
-
const
|
|
860
|
-
return
|
|
861
|
-
entityCode:
|
|
854
|
+
const n = this.buildEntityFieldsTreeData(t.type.fields, [t.code]), o = this.buildChildEntityTreeData(t.type.entities, [t.code]);
|
|
855
|
+
return o != null && o.length && (n == null || n.push(...o)), {
|
|
856
|
+
entityCode: t.code,
|
|
862
857
|
fields: [{
|
|
863
|
-
data: this.createTreeNode(
|
|
864
|
-
children:
|
|
858
|
+
data: this.createTreeNode(t, [], "code"),
|
|
859
|
+
children: n || []
|
|
865
860
|
}]
|
|
866
861
|
};
|
|
867
862
|
}
|
|
@@ -882,143 +877,143 @@ class In {
|
|
|
882
877
|
}
|
|
883
878
|
};
|
|
884
879
|
}
|
|
885
|
-
onBeforeOpenExpression(
|
|
886
|
-
const
|
|
887
|
-
message: ["validate", "required", "dataPicking"].includes(
|
|
880
|
+
onBeforeOpenExpression(e, t, n) {
|
|
881
|
+
const o = n === "Field" ? e.binding.field : e.id, r = this.getExpressionRule(o, t), s = this.getEntitiesAndVariables(), u = {
|
|
882
|
+
message: ["validate", "required", "dataPicking"].includes(t) && r ? r.message : "",
|
|
888
883
|
...s
|
|
889
884
|
};
|
|
890
|
-
return
|
|
885
|
+
return r.messageType != null && (u.messageType = r.messageType), u;
|
|
891
886
|
}
|
|
892
|
-
buildRule(t,
|
|
893
|
-
const { expression:
|
|
894
|
-
id: `${
|
|
895
|
-
type:
|
|
896
|
-
value:
|
|
887
|
+
buildRule(e, t, n, o) {
|
|
888
|
+
const { expression: r, message: s, messageType: u } = t, l = {
|
|
889
|
+
id: `${e}_${n}`,
|
|
890
|
+
type: n,
|
|
891
|
+
value: r
|
|
897
892
|
};
|
|
898
|
-
return (
|
|
893
|
+
return (n === "validate" || n === "dataPicking" || n === "required") && (l.message = s), n === "dataPicking" && (l.messageType = u), n === "validate" && o && (l.elementId = o), l;
|
|
899
894
|
}
|
|
900
895
|
getExpressionData() {
|
|
901
|
-
const { expressions:
|
|
902
|
-
return
|
|
896
|
+
const { expressions: e } = this.formSchemaService.getFormSchema().module;
|
|
897
|
+
return e || [];
|
|
903
898
|
}
|
|
904
|
-
updateExpression(t,
|
|
905
|
-
const
|
|
906
|
-
let l = this.getExpressionData().find((
|
|
907
|
-
const
|
|
899
|
+
updateExpression(e, t, n, o) {
|
|
900
|
+
const r = t === "Field" ? e.binding.field : e.id, s = this.buildRule(r, n, o, e.type === "form-group" ? e.id : "");
|
|
901
|
+
let l = this.getExpressionData().find((d) => d.targetType === t && d.target === r);
|
|
902
|
+
const a = (d) => d.value.trim() === "";
|
|
908
903
|
if (l) {
|
|
909
|
-
const
|
|
910
|
-
if (
|
|
911
|
-
|
|
904
|
+
const d = l.rules.find((c) => c.id === s.id);
|
|
905
|
+
if (d)
|
|
906
|
+
a(s) ? l.rules = l.rules.filter((c) => c.id !== s.id) : (Object.assign(d, s), o === "validate" && e.type === "form-group" && (d.elementId = e.id));
|
|
912
907
|
else {
|
|
913
|
-
if (
|
|
908
|
+
if (a(s))
|
|
914
909
|
return null;
|
|
915
910
|
l.rules = l.rules || [], l.rules.push(s);
|
|
916
911
|
}
|
|
917
912
|
} else {
|
|
918
|
-
if (
|
|
913
|
+
if (a(s))
|
|
919
914
|
return null;
|
|
920
915
|
l = {
|
|
921
|
-
target: `${
|
|
916
|
+
target: `${r}`,
|
|
922
917
|
rules: [s],
|
|
923
|
-
targetType:
|
|
918
|
+
targetType: t
|
|
924
919
|
};
|
|
925
920
|
}
|
|
926
921
|
return l;
|
|
927
922
|
}
|
|
928
|
-
getExpressionEditorOptions(t,
|
|
929
|
-
return
|
|
930
|
-
var l,
|
|
931
|
-
const
|
|
932
|
-
return
|
|
933
|
-
hide:
|
|
923
|
+
getExpressionEditorOptions(e, t, n, o) {
|
|
924
|
+
return n.reduce((r, s) => {
|
|
925
|
+
var l, a;
|
|
926
|
+
const u = t === "Field" ? (l = e == null ? void 0 : e.binding) == null ? void 0 : l.field : e.id;
|
|
927
|
+
return r[s] = {
|
|
928
|
+
hide: t === "Field" ? !!((a = e == null ? void 0 : e.binding) != null && a.field) : !1,
|
|
934
929
|
description: "",
|
|
935
930
|
title: this.expressionNames[s],
|
|
936
931
|
type: "string",
|
|
937
|
-
$converter: this.getExpressionConverter(
|
|
932
|
+
$converter: this.getExpressionConverter(u),
|
|
938
933
|
editor: {
|
|
939
934
|
type: "expression-editor",
|
|
940
935
|
singleExpand: !1,
|
|
941
936
|
dialogTitle: `${this.expressionNames[s]}编辑器`,
|
|
942
937
|
showMessage: s === "validate" || s === "dataPicking" || s === "required",
|
|
943
938
|
showMessageType: s === "dataPicking",
|
|
944
|
-
beforeOpen: () => this.onBeforeOpenExpression(
|
|
945
|
-
onSubmitModal: (
|
|
946
|
-
const
|
|
947
|
-
if (
|
|
948
|
-
const
|
|
949
|
-
|
|
939
|
+
beforeOpen: () => this.onBeforeOpenExpression(e, s, t),
|
|
940
|
+
onSubmitModal: (d) => {
|
|
941
|
+
const c = this.updateExpression(e, t, d, s);
|
|
942
|
+
if (o) {
|
|
943
|
+
const m = this.buildRule(u, d, s);
|
|
944
|
+
o(m);
|
|
950
945
|
}
|
|
951
|
-
return
|
|
946
|
+
return c;
|
|
952
947
|
}
|
|
953
948
|
}
|
|
954
|
-
},
|
|
949
|
+
}, r;
|
|
955
950
|
}, {});
|
|
956
951
|
}
|
|
957
|
-
getExpressionInfo(
|
|
958
|
-
const
|
|
959
|
-
value:
|
|
960
|
-
targetId:
|
|
961
|
-
targetType:
|
|
962
|
-
expressionType:
|
|
952
|
+
getExpressionInfo(e, t, n) {
|
|
953
|
+
const o = t === "Field" ? e.binding.field : e.id, r = this.getExpressionRule(o, n), s = {
|
|
954
|
+
value: r && r.value,
|
|
955
|
+
targetId: o,
|
|
956
|
+
targetType: t,
|
|
957
|
+
expressionType: n
|
|
963
958
|
};
|
|
964
|
-
return
|
|
959
|
+
return r && r.message && (s.message = r.message), s;
|
|
965
960
|
}
|
|
966
|
-
getExpressionConfig(
|
|
961
|
+
getExpressionConfig(e, t, n = ["compute", "dependency", "validate"], o) {
|
|
967
962
|
return {
|
|
968
963
|
description: "表达式",
|
|
969
964
|
title: "表达式",
|
|
970
965
|
properties: {
|
|
971
|
-
...this.getExpressionEditorOptions(t,
|
|
966
|
+
...this.getExpressionEditorOptions(e, t, n, o)
|
|
972
967
|
}
|
|
973
968
|
};
|
|
974
969
|
}
|
|
975
|
-
getExpressionOptions(
|
|
976
|
-
const
|
|
970
|
+
getExpressionOptions(e, t, n) {
|
|
971
|
+
const o = this.getExpressionInfo(e, t, n);
|
|
977
972
|
return {
|
|
978
|
-
dialogTitle: `${this.expressionNames[
|
|
973
|
+
dialogTitle: `${this.expressionNames[n]}编辑器`,
|
|
979
974
|
singleExpand: !1,
|
|
980
|
-
showMessage:
|
|
981
|
-
beforeOpen: () => this.onBeforeOpenExpression(
|
|
982
|
-
expressionInfo:
|
|
975
|
+
showMessage: n === "required",
|
|
976
|
+
beforeOpen: () => this.onBeforeOpenExpression(e, n, t),
|
|
977
|
+
expressionInfo: o
|
|
983
978
|
};
|
|
984
979
|
}
|
|
985
980
|
}
|
|
986
|
-
class
|
|
987
|
-
constructor(
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
981
|
+
class We {
|
|
982
|
+
constructor(e, t) {
|
|
983
|
+
B(this, "componentId");
|
|
984
|
+
B(this, "viewModelId");
|
|
985
|
+
B(this, "eventsEditorUtils");
|
|
986
|
+
B(this, "formSchemaUtils");
|
|
987
|
+
B(this, "formMetadataConverter");
|
|
988
|
+
B(this, "designViewModelUtils");
|
|
989
|
+
B(this, "designViewModelField");
|
|
990
|
+
B(this, "controlCreatorUtils");
|
|
991
|
+
B(this, "designerHostService");
|
|
992
|
+
B(this, "schemaService", null);
|
|
993
|
+
B(this, "metadataService", null);
|
|
994
|
+
B(this, "propertyConfig", {
|
|
1000
995
|
type: "object",
|
|
1001
996
|
categories: {}
|
|
1002
997
|
});
|
|
1003
|
-
var
|
|
1004
|
-
this.componentId =
|
|
998
|
+
var n;
|
|
999
|
+
this.componentId = e, this.designerHostService = t, this.eventsEditorUtils = t.eventsEditorUtils, this.formSchemaUtils = t.formSchemaUtils, this.formMetadataConverter = t.formMetadataConverter, this.viewModelId = ((n = this.formSchemaUtils) == null ? void 0 : n.getViewModelIdByComponentId(e)) || "", this.designViewModelUtils = t.designViewModelUtils, this.controlCreatorUtils = t.controlCreatorUtils, this.metadataService = t.metadataService, this.schemaService = t.schemaService;
|
|
1005
1000
|
}
|
|
1006
1001
|
getTableInfo() {
|
|
1007
|
-
var
|
|
1008
|
-
return (
|
|
1002
|
+
var e;
|
|
1003
|
+
return (e = this.schemaService) == null ? void 0 : e.getTableInfoByViewModelId(this.viewModelId);
|
|
1009
1004
|
}
|
|
1010
|
-
setDesignViewModelField(
|
|
1011
|
-
var
|
|
1012
|
-
const
|
|
1013
|
-
if (
|
|
1005
|
+
setDesignViewModelField(e) {
|
|
1006
|
+
var n;
|
|
1007
|
+
const t = e.binding && e.binding.type === "Form" && e.binding.field;
|
|
1008
|
+
if (t) {
|
|
1014
1009
|
if (!this.designViewModelField) {
|
|
1015
|
-
const
|
|
1016
|
-
this.designViewModelField =
|
|
1010
|
+
const o = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
1011
|
+
this.designViewModelField = o.fields.find((r) => r.id === t);
|
|
1017
1012
|
}
|
|
1018
|
-
|
|
1013
|
+
e.updateOn = (n = this.designViewModelField) == null ? void 0 : n.updateOn;
|
|
1019
1014
|
}
|
|
1020
1015
|
}
|
|
1021
|
-
getBasicPropConfig(
|
|
1016
|
+
getBasicPropConfig(e) {
|
|
1022
1017
|
return {
|
|
1023
1018
|
description: "Basic Information",
|
|
1024
1019
|
title: "基本信息",
|
|
@@ -1039,17 +1034,17 @@ class Mn {
|
|
|
1039
1034
|
valueField: "value",
|
|
1040
1035
|
idField: "value",
|
|
1041
1036
|
editable: !1,
|
|
1042
|
-
data: [{ value:
|
|
1037
|
+
data: [{ value: e.type, name: ge[e.type].name }]
|
|
1043
1038
|
}
|
|
1044
1039
|
}
|
|
1045
1040
|
}
|
|
1046
1041
|
};
|
|
1047
1042
|
}
|
|
1048
|
-
getAppearanceConfig(
|
|
1049
|
-
const
|
|
1043
|
+
getAppearanceConfig(e = null, t = {}, n) {
|
|
1044
|
+
const o = {
|
|
1050
1045
|
title: "外观",
|
|
1051
1046
|
description: "Appearance"
|
|
1052
|
-
},
|
|
1047
|
+
}, r = {
|
|
1053
1048
|
class: {
|
|
1054
1049
|
title: "class样式",
|
|
1055
1050
|
type: "string",
|
|
@@ -1063,65 +1058,65 @@ class Mn {
|
|
|
1063
1058
|
$converter: "/converter/appearance.converter"
|
|
1064
1059
|
}
|
|
1065
1060
|
};
|
|
1066
|
-
for (const s in
|
|
1067
|
-
|
|
1061
|
+
for (const s in t)
|
|
1062
|
+
r[s] = Object.assign(r[s] || {}, t[s]);
|
|
1068
1063
|
return {
|
|
1069
|
-
...
|
|
1070
|
-
properties: { ...
|
|
1071
|
-
setPropertyRelates(s,
|
|
1064
|
+
...o,
|
|
1065
|
+
properties: { ...r },
|
|
1066
|
+
setPropertyRelates(s, u) {
|
|
1072
1067
|
if (s) {
|
|
1073
1068
|
switch (s && s.propertyID) {
|
|
1074
1069
|
case "class":
|
|
1075
1070
|
case "style": {
|
|
1076
|
-
|
|
1071
|
+
H.value++;
|
|
1077
1072
|
break;
|
|
1078
1073
|
}
|
|
1079
1074
|
}
|
|
1080
|
-
|
|
1075
|
+
n && n(s, e, u);
|
|
1081
1076
|
}
|
|
1082
1077
|
}
|
|
1083
1078
|
};
|
|
1084
1079
|
}
|
|
1085
|
-
getPropertyEditorParams(
|
|
1086
|
-
const { getVariables: s, getControlName:
|
|
1080
|
+
getPropertyEditorParams(e, t = [], n = "visible", o = {}, r = {}) {
|
|
1081
|
+
const { getVariables: s, getControlName: u, getStateMachines: l } = _e(this.designerHostService), a = this.getRealTargetType(e), d = t && t.length > 0 ? t : ["Const", "Variable", "StateMachine", "Expression"], c = {
|
|
1087
1082
|
type: "property-editor",
|
|
1088
|
-
propertyTypes:
|
|
1083
|
+
propertyTypes: d
|
|
1089
1084
|
};
|
|
1090
|
-
return
|
|
1091
|
-
switch (
|
|
1085
|
+
return d.map((m) => {
|
|
1086
|
+
switch (m) {
|
|
1092
1087
|
case "Const":
|
|
1093
|
-
Object.assign(
|
|
1088
|
+
Object.assign(c, {
|
|
1094
1089
|
constType: "enum",
|
|
1095
1090
|
constEnums: [{ id: !0, name: "是" }, { id: !1, name: "否" }]
|
|
1096
|
-
},
|
|
1091
|
+
}, o);
|
|
1097
1092
|
break;
|
|
1098
1093
|
case "Expression":
|
|
1099
|
-
|
|
1094
|
+
c.expressionConfig = this.getExpressionOptions(e, a, n);
|
|
1100
1095
|
break;
|
|
1101
1096
|
case "StateMachine":
|
|
1102
|
-
|
|
1097
|
+
c.stateMachines = l();
|
|
1103
1098
|
break;
|
|
1104
1099
|
case "Variable":
|
|
1105
|
-
Object.assign(
|
|
1106
|
-
controlName:
|
|
1100
|
+
Object.assign(c, {
|
|
1101
|
+
controlName: u(e),
|
|
1107
1102
|
newVariablePrefix: "is",
|
|
1108
1103
|
newVariableType: "Boolean",
|
|
1109
1104
|
variables: s(this.viewModelId),
|
|
1110
1105
|
onBeforeOpenVariables: (f) => {
|
|
1111
1106
|
f.value = s(this.viewModelId);
|
|
1112
1107
|
}
|
|
1113
|
-
},
|
|
1108
|
+
}, r);
|
|
1114
1109
|
break;
|
|
1115
1110
|
}
|
|
1116
|
-
}),
|
|
1111
|
+
}), c;
|
|
1117
1112
|
}
|
|
1118
|
-
getVisibleProperty(
|
|
1113
|
+
getVisibleProperty(e, t = "") {
|
|
1119
1114
|
return {
|
|
1120
1115
|
visible: {
|
|
1121
1116
|
title: "是否可见",
|
|
1122
1117
|
type: "boolean",
|
|
1123
1118
|
description: "运行时组件是否可见",
|
|
1124
|
-
editor: this.getPropertyEditorParams(
|
|
1119
|
+
editor: this.getPropertyEditorParams(e, t === "gridFieldEditor" ? ["Const", "Expression"] : ["Const", "Variable", "StateMachine", "Expression"], "visible")
|
|
1125
1120
|
}
|
|
1126
1121
|
};
|
|
1127
1122
|
}
|
|
@@ -1131,27 +1126,27 @@ class Mn {
|
|
|
1131
1126
|
* @param viewModelId
|
|
1132
1127
|
* @returns
|
|
1133
1128
|
*/
|
|
1134
|
-
getBehaviorConfig(
|
|
1135
|
-
const
|
|
1129
|
+
getBehaviorConfig(e, t = "", n = {}, o) {
|
|
1130
|
+
const r = {
|
|
1136
1131
|
title: "行为",
|
|
1137
1132
|
description: ""
|
|
1138
|
-
}, s = this.getVisibleProperty(
|
|
1139
|
-
for (const l in
|
|
1140
|
-
s[l] = Object.assign(s[l] || {},
|
|
1141
|
-
const
|
|
1133
|
+
}, s = this.getVisibleProperty(e, t);
|
|
1134
|
+
for (const l in n)
|
|
1135
|
+
s[l] = Object.assign(s[l] || {}, n[l]);
|
|
1136
|
+
const u = this;
|
|
1142
1137
|
return {
|
|
1143
|
-
...
|
|
1138
|
+
...r,
|
|
1144
1139
|
properties: { ...s },
|
|
1145
|
-
setPropertyRelates(l,
|
|
1140
|
+
setPropertyRelates(l, a) {
|
|
1146
1141
|
if (l) {
|
|
1147
1142
|
switch (l.propertyID) {
|
|
1148
1143
|
case "disabled":
|
|
1149
1144
|
case "readonly":
|
|
1150
1145
|
case "visible":
|
|
1151
|
-
|
|
1146
|
+
u.afterMutilEditorChanged(e, l);
|
|
1152
1147
|
break;
|
|
1153
1148
|
}
|
|
1154
|
-
|
|
1149
|
+
o && o(l, a);
|
|
1155
1150
|
}
|
|
1156
1151
|
}
|
|
1157
1152
|
};
|
|
@@ -1161,8 +1156,8 @@ class Mn {
|
|
|
1161
1156
|
* @param propertyData
|
|
1162
1157
|
* @param changeObject
|
|
1163
1158
|
*/
|
|
1164
|
-
afterMutilEditorChanged(
|
|
1165
|
-
this.addNewVariableToViewModel(
|
|
1159
|
+
afterMutilEditorChanged(e, t) {
|
|
1160
|
+
this.addNewVariableToViewModel(t, this.viewModelId), this.updateExpressionValue(t), this.clearExpression(t, e);
|
|
1166
1161
|
}
|
|
1167
1162
|
/**
|
|
1168
1163
|
*
|
|
@@ -1170,12 +1165,12 @@ class Mn {
|
|
|
1170
1165
|
* @param componentInstance
|
|
1171
1166
|
* @returns
|
|
1172
1167
|
*/
|
|
1173
|
-
updateElementByParentContainer(
|
|
1174
|
-
const
|
|
1175
|
-
if (!
|
|
1168
|
+
updateElementByParentContainer(e, t) {
|
|
1169
|
+
const n = t && t.parent && t.parent.schema;
|
|
1170
|
+
if (!n)
|
|
1176
1171
|
return;
|
|
1177
|
-
const
|
|
1178
|
-
|
|
1172
|
+
const o = n.contents.findIndex((s) => s.id === e), r = G(n.contents[o]);
|
|
1173
|
+
n.contents.splice(o, 1), n.contents.splice(o, 0, r), $e();
|
|
1179
1174
|
}
|
|
1180
1175
|
/**
|
|
1181
1176
|
* 属性编辑器,在编辑过程中会新增变量,此处需要将新增的变量追加到ViewModel中
|
|
@@ -1183,40 +1178,40 @@ class Mn {
|
|
|
1183
1178
|
* @param viewModelId
|
|
1184
1179
|
* @returns
|
|
1185
1180
|
*/
|
|
1186
|
-
addNewVariableToViewModel(
|
|
1187
|
-
const
|
|
1188
|
-
if (!(
|
|
1181
|
+
addNewVariableToViewModel(e, t) {
|
|
1182
|
+
const n = e.propertyValue;
|
|
1183
|
+
if (!(n && typeof n == "object") || !(n.type === "Variable" && n.isNewVariable))
|
|
1189
1184
|
return;
|
|
1190
1185
|
const s = {
|
|
1191
|
-
id:
|
|
1186
|
+
id: n.field,
|
|
1192
1187
|
category: "locale",
|
|
1193
|
-
code:
|
|
1194
|
-
name:
|
|
1195
|
-
type:
|
|
1188
|
+
code: n.fullPath,
|
|
1189
|
+
name: n.fullPath,
|
|
1190
|
+
type: n.newVariableType || "String"
|
|
1196
1191
|
};
|
|
1197
|
-
delete
|
|
1192
|
+
delete n.newVariableType, delete n.isNewVariable, this.formSchemaUtils.getVariableByCode(s.code) || this.formSchemaUtils.getViewModelById(t).states.push(s);
|
|
1198
1193
|
}
|
|
1199
1194
|
/**
|
|
1200
1195
|
* 更新表达式到expressions节点
|
|
1201
1196
|
* @param changeObject
|
|
1202
1197
|
*/
|
|
1203
|
-
updateExpressionValue(
|
|
1204
|
-
const
|
|
1205
|
-
if (!((
|
|
1198
|
+
updateExpressionValue(e) {
|
|
1199
|
+
const t = e.propertyValue;
|
|
1200
|
+
if (!((t && t.type) === "Expression" && t.expressionInfo))
|
|
1206
1201
|
return;
|
|
1207
|
-
const { expressionId:
|
|
1208
|
-
|
|
1209
|
-
const { expressions: f } =
|
|
1210
|
-
let
|
|
1211
|
-
|
|
1212
|
-
const
|
|
1213
|
-
if (
|
|
1214
|
-
|
|
1202
|
+
const { expressionId: r, expressionInfo: s } = t, { targetId: u, targetType: l, expressionType: a, value: d, message: c } = s, m = this.formSchemaUtils.getModule();
|
|
1203
|
+
m.expressions ?? (m.expressions = []);
|
|
1204
|
+
const { expressions: f } = m;
|
|
1205
|
+
let b = f.find((k) => k.target === u);
|
|
1206
|
+
b || (b = { target: u, rules: [], targetType: l }, f.push(b));
|
|
1207
|
+
const v = b.rules.find((k) => k.type === a);
|
|
1208
|
+
if (v)
|
|
1209
|
+
v.value = d, v.message = c;
|
|
1215
1210
|
else {
|
|
1216
|
-
const
|
|
1217
|
-
|
|
1211
|
+
const k = { id: r, type: a, value: d, message: c };
|
|
1212
|
+
b.rules.push(k);
|
|
1218
1213
|
}
|
|
1219
|
-
delete
|
|
1214
|
+
delete t.expressionInfo;
|
|
1220
1215
|
}
|
|
1221
1216
|
/**
|
|
1222
1217
|
* 属性类型切换为非表达式后,清除原表达式
|
|
@@ -1224,28 +1219,28 @@ class Mn {
|
|
|
1224
1219
|
* @param propertyData
|
|
1225
1220
|
* @returns
|
|
1226
1221
|
*/
|
|
1227
|
-
clearExpression(
|
|
1228
|
-
const
|
|
1229
|
-
if (
|
|
1222
|
+
clearExpression(e, t) {
|
|
1223
|
+
const n = e.propertyValue;
|
|
1224
|
+
if (n && n.type === "Expression")
|
|
1230
1225
|
return;
|
|
1231
|
-
const
|
|
1232
|
-
!l || !l.rules || (l.rules = l.rules.filter((
|
|
1226
|
+
const r = e.propertyID, s = this.formSchemaUtils.getExpressions(), u = t.binding ? t.binding.field : t.id, l = s.find((a) => a.target === u);
|
|
1227
|
+
!l || !l.rules || (l.rules = l.rules.filter((a) => a.type !== r));
|
|
1233
1228
|
}
|
|
1234
|
-
getExpressionOptions(
|
|
1235
|
-
return new
|
|
1229
|
+
getExpressionOptions(e, t, n) {
|
|
1230
|
+
return new He(this.formSchemaUtils).getExpressionOptions(e, t, n);
|
|
1236
1231
|
}
|
|
1237
|
-
getRealTargetType(
|
|
1238
|
-
return ["response-toolbar-item", "tab-toolbar-item", "section-toolbar-item"].indexOf(
|
|
1232
|
+
getRealTargetType(e) {
|
|
1233
|
+
return ["response-toolbar-item", "tab-toolbar-item", "section-toolbar-item"].indexOf(e.type) > -1 ? "Button" : e.binding && e.binding.field ? "Field" : "Container";
|
|
1239
1234
|
}
|
|
1240
1235
|
}
|
|
1241
|
-
class
|
|
1242
|
-
constructor(
|
|
1243
|
-
super(
|
|
1236
|
+
class je extends We {
|
|
1237
|
+
constructor(e, t) {
|
|
1238
|
+
super(e, t);
|
|
1244
1239
|
}
|
|
1245
|
-
getPropertyConfig(
|
|
1246
|
-
return this.propertyConfig.categories.basic = this.getBasicPropConfig(
|
|
1240
|
+
getPropertyConfig(e) {
|
|
1241
|
+
return this.propertyConfig.categories.basic = this.getBasicPropConfig(e), this.propertyConfig.categories.appearance = this.getAppearanceProperties(e), this.propertyConfig.categories.behavior = this.getBehaviorConfig(e), this.propertyConfig;
|
|
1247
1242
|
}
|
|
1248
|
-
getAppearanceProperties(
|
|
1243
|
+
getAppearanceProperties(e) {
|
|
1249
1244
|
return {
|
|
1250
1245
|
title: "外观",
|
|
1251
1246
|
description: "",
|
|
@@ -1266,11 +1261,11 @@ class Dn extends Mn {
|
|
|
1266
1261
|
description: "标题"
|
|
1267
1262
|
}
|
|
1268
1263
|
},
|
|
1269
|
-
setPropertyRelates(
|
|
1270
|
-
if (
|
|
1271
|
-
switch (
|
|
1264
|
+
setPropertyRelates(t, n) {
|
|
1265
|
+
if (t)
|
|
1266
|
+
switch (t && t.propertyID) {
|
|
1272
1267
|
case "title": {
|
|
1273
|
-
|
|
1268
|
+
t.needRefreshControlTree = !0;
|
|
1274
1269
|
break;
|
|
1275
1270
|
}
|
|
1276
1271
|
}
|
|
@@ -1278,1314 +1273,31 @@ class Dn extends Mn {
|
|
|
1278
1273
|
};
|
|
1279
1274
|
}
|
|
1280
1275
|
}
|
|
1281
|
-
function
|
|
1282
|
-
function
|
|
1276
|
+
function Ge(i, e) {
|
|
1277
|
+
function t(u) {
|
|
1283
1278
|
return !1;
|
|
1284
1279
|
}
|
|
1285
|
-
function
|
|
1280
|
+
function n() {
|
|
1286
1281
|
return !1;
|
|
1287
1282
|
}
|
|
1288
|
-
function
|
|
1283
|
+
function o() {
|
|
1289
1284
|
return !1;
|
|
1290
1285
|
}
|
|
1291
|
-
function i() {
|
|
1292
|
-
return !0;
|
|
1293
|
-
}
|
|
1294
|
-
function s(c) {
|
|
1295
|
-
return new Dn(c, t).getPropertyConfig(n);
|
|
1296
|
-
}
|
|
1297
|
-
return {
|
|
1298
|
-
canAccepts: e,
|
|
1299
|
-
hideNestedPaddingInDesginerView: i,
|
|
1300
|
-
getPropsConfig: s,
|
|
1301
|
-
checkCanDeleteComponent: o,
|
|
1302
|
-
checkCanMoveComponent: r
|
|
1303
|
-
};
|
|
1304
|
-
}
|
|
1305
|
-
const Bn = /* @__PURE__ */ new Map([
|
|
1306
|
-
["buttons", "items"],
|
|
1307
|
-
["appearance", qt]
|
|
1308
|
-
]);
|
|
1309
|
-
function ft(n, t, e) {
|
|
1310
|
-
return t;
|
|
1311
|
-
}
|
|
1312
|
-
const An = "https://json-schema.org/draft/2020-12/schema", Vn = "https://farris-design.gitee.io/response-toolbar.schema.json", Nn = "response-toolbar", $n = "A Farris Toolbar Component", On = "object", Rn = {
|
|
1313
|
-
id: {
|
|
1314
|
-
description: "The unique identifier for a Response Toolbar",
|
|
1315
|
-
type: "string"
|
|
1316
|
-
},
|
|
1317
|
-
type: {
|
|
1318
|
-
description: "The type string of Response Toolbar",
|
|
1319
|
-
type: "string",
|
|
1320
|
-
default: "response-toolbar"
|
|
1321
|
-
},
|
|
1322
|
-
appearance: {
|
|
1323
|
-
description: "",
|
|
1324
|
-
type: "object",
|
|
1325
|
-
properties: {
|
|
1326
|
-
class: {
|
|
1327
|
-
type: "string",
|
|
1328
|
-
default: ""
|
|
1329
|
-
}
|
|
1330
|
-
}
|
|
1331
|
-
},
|
|
1332
|
-
alignment: {
|
|
1333
|
-
description: "The alignment of Response Toolbar Button.",
|
|
1334
|
-
type: "string",
|
|
1335
|
-
default: "right"
|
|
1336
|
-
},
|
|
1337
|
-
buttons: {
|
|
1338
|
-
description: "The items of Response Toolbar.",
|
|
1339
|
-
type: "array",
|
|
1340
|
-
default: []
|
|
1341
|
-
},
|
|
1342
|
-
buttonSize: {
|
|
1343
|
-
type: "string",
|
|
1344
|
-
default: ""
|
|
1345
|
-
},
|
|
1346
|
-
visible: {
|
|
1347
|
-
description: "",
|
|
1348
|
-
type: "boolean",
|
|
1349
|
-
default: !0
|
|
1350
|
-
}
|
|
1351
|
-
}, Fn = [
|
|
1352
|
-
"id",
|
|
1353
|
-
"type",
|
|
1354
|
-
"buttons"
|
|
1355
|
-
], _n = {
|
|
1356
|
-
onClick: "点击事件"
|
|
1357
|
-
}, Ln = {
|
|
1358
|
-
$schema: An,
|
|
1359
|
-
$id: Vn,
|
|
1360
|
-
title: Nn,
|
|
1361
|
-
description: $n,
|
|
1362
|
-
type: On,
|
|
1363
|
-
properties: Rn,
|
|
1364
|
-
required: Fn,
|
|
1365
|
-
events: _n
|
|
1366
|
-
}, jn = "https://json-schema.org/draft/2020-12/schema", qn = "https://farris-design.gitee.io/response-toolbar-item.schema.json", Un = "response-toolbar-item", Wn = "A Farris Toolbar Item Component", Hn = "object", Gn = {
|
|
1367
|
-
id: {
|
|
1368
|
-
description: "The unique identifier for a Response Toolbar",
|
|
1369
|
-
type: "string"
|
|
1370
|
-
},
|
|
1371
|
-
type: {
|
|
1372
|
-
description: "The type string of Response Toolbar",
|
|
1373
|
-
type: "string",
|
|
1374
|
-
default: "response-toolbar-item"
|
|
1375
|
-
},
|
|
1376
|
-
appearance: {
|
|
1377
|
-
description: "",
|
|
1378
|
-
type: "object",
|
|
1379
|
-
properties: {
|
|
1380
|
-
class: {
|
|
1381
|
-
type: "string",
|
|
1382
|
-
default: ""
|
|
1383
|
-
}
|
|
1384
|
-
}
|
|
1385
|
-
},
|
|
1386
|
-
alignment: {
|
|
1387
|
-
description: "对齐",
|
|
1388
|
-
type: "string",
|
|
1389
|
-
default: "right"
|
|
1390
|
-
},
|
|
1391
|
-
text: {
|
|
1392
|
-
description: "文本",
|
|
1393
|
-
type: "string",
|
|
1394
|
-
default: "按钮"
|
|
1395
|
-
},
|
|
1396
|
-
icon: {
|
|
1397
|
-
description: "图标",
|
|
1398
|
-
type: "string",
|
|
1399
|
-
default: ""
|
|
1400
|
-
},
|
|
1401
|
-
disabled: {
|
|
1402
|
-
description: "禁用",
|
|
1403
|
-
type: "boolean",
|
|
1404
|
-
default: !1
|
|
1405
|
-
},
|
|
1406
|
-
visible: {
|
|
1407
|
-
description: "是否可见",
|
|
1408
|
-
type: "boolean",
|
|
1409
|
-
default: !0
|
|
1410
|
-
},
|
|
1411
|
-
onClick: {
|
|
1412
|
-
description: "点击事件",
|
|
1413
|
-
type: "string",
|
|
1414
|
-
default: ""
|
|
1415
|
-
},
|
|
1416
|
-
tipsEnable: {
|
|
1417
|
-
description: "",
|
|
1418
|
-
type: "boolean",
|
|
1419
|
-
default: !1
|
|
1420
|
-
},
|
|
1421
|
-
tipsText: {
|
|
1422
|
-
description: "",
|
|
1423
|
-
type: "string",
|
|
1424
|
-
default: ""
|
|
1425
|
-
},
|
|
1426
|
-
dropdownClass: {
|
|
1427
|
-
description: "处于下拉菜单时的样式",
|
|
1428
|
-
type: "string",
|
|
1429
|
-
default: ""
|
|
1430
|
-
},
|
|
1431
|
-
split: {
|
|
1432
|
-
description: "",
|
|
1433
|
-
type: "boolean",
|
|
1434
|
-
default: !1
|
|
1435
|
-
}
|
|
1436
|
-
}, zn = [
|
|
1437
|
-
"id",
|
|
1438
|
-
"type",
|
|
1439
|
-
"text"
|
|
1440
|
-
], Xn = {
|
|
1441
|
-
$schema: jn,
|
|
1442
|
-
$id: qn,
|
|
1443
|
-
title: Un,
|
|
1444
|
-
description: Wn,
|
|
1445
|
-
type: Hn,
|
|
1446
|
-
properties: Gn,
|
|
1447
|
-
required: zn
|
|
1448
|
-
}, Yn = Object.assign({}, rt, {
|
|
1449
|
-
componentId: { type: String, default: "" }
|
|
1450
|
-
});
|
|
1451
|
-
it(
|
|
1452
|
-
rt,
|
|
1453
|
-
Ln,
|
|
1454
|
-
Bn,
|
|
1455
|
-
ft
|
|
1456
|
-
);
|
|
1457
|
-
const pt = {
|
|
1458
|
-
id: { type: String, default: "" },
|
|
1459
|
-
item: { type: Object, default: {} },
|
|
1460
|
-
items: { type: Object, default: {} },
|
|
1461
|
-
class: { type: String, default: "btn-secondary" },
|
|
1462
|
-
text: { type: String, default: "" },
|
|
1463
|
-
disabled: { type: Boolean, default: !1 },
|
|
1464
|
-
icon: { type: String, default: "" },
|
|
1465
|
-
componentId: { type: String, default: "" },
|
|
1466
|
-
// 是否展开子级
|
|
1467
|
-
expanded: { type: Boolean, default: !1 },
|
|
1468
|
-
alignment: { Type: String, default: "right" },
|
|
1469
|
-
// 下拉按钮分离
|
|
1470
|
-
split: { type: Boolean, default: !1 },
|
|
1471
|
-
// 是否下拉
|
|
1472
|
-
isDP: { type: Boolean, default: !1 },
|
|
1473
|
-
// 是否下拉项
|
|
1474
|
-
isDPItem: { type: Boolean, default: !1 }
|
|
1475
|
-
};
|
|
1476
|
-
it(
|
|
1477
|
-
pt,
|
|
1478
|
-
Xn,
|
|
1479
|
-
void 0,
|
|
1480
|
-
ft
|
|
1481
|
-
);
|
|
1482
|
-
Ut();
|
|
1483
|
-
class Qn extends at {
|
|
1484
|
-
constructor(e, o, r = "response-toolbar") {
|
|
1485
|
-
super(e, o);
|
|
1486
|
-
// 有三类值 response-toolbar、section-toolbar、tab-toolbar
|
|
1487
|
-
Z(this, "toolbarType", "response-toolbar");
|
|
1488
|
-
this.toolbarType = r;
|
|
1489
|
-
}
|
|
1490
|
-
getPropertyConfig(e) {
|
|
1491
|
-
return this.propertyConfig.categories.basic = this.getBasicPropConfig(e), this.toolbarType !== "tab-toolbar" && this.getAppearancePropConfig(e), this.toolbarType === "response-toolbar" && (this.propertyConfig.categories.behavior = this.getBehaviorConfig(e)), this.propertyConfig;
|
|
1492
|
-
}
|
|
1493
|
-
getAppearancePropConfig(e) {
|
|
1494
|
-
this.propertyConfig.categories.appearance = {
|
|
1495
|
-
title: "外观",
|
|
1496
|
-
description: "Appearance",
|
|
1497
|
-
properties: {
|
|
1498
|
-
class: {
|
|
1499
|
-
title: "class样式",
|
|
1500
|
-
type: "string",
|
|
1501
|
-
description: "组件的CSS样式",
|
|
1502
|
-
$converter: "/converter/appearance.converter"
|
|
1503
|
-
}
|
|
1504
|
-
}
|
|
1505
|
-
};
|
|
1506
|
-
}
|
|
1507
|
-
getBehaviorProperties(e) {
|
|
1508
|
-
this.propertyConfig.categories.behavior = {
|
|
1509
|
-
title: "行为",
|
|
1510
|
-
description: "",
|
|
1511
|
-
properties: {
|
|
1512
|
-
alignment: {
|
|
1513
|
-
title: "对齐方式",
|
|
1514
|
-
description: "在工具栏区域内按钮组的位置",
|
|
1515
|
-
type: "enum",
|
|
1516
|
-
editor: {
|
|
1517
|
-
type: "combo-list",
|
|
1518
|
-
textField: "name",
|
|
1519
|
-
valueField: "value",
|
|
1520
|
-
data: [
|
|
1521
|
-
{
|
|
1522
|
-
value: "left",
|
|
1523
|
-
name: "左对齐"
|
|
1524
|
-
},
|
|
1525
|
-
{
|
|
1526
|
-
value: "center",
|
|
1527
|
-
name: "居中"
|
|
1528
|
-
},
|
|
1529
|
-
{
|
|
1530
|
-
value: "right",
|
|
1531
|
-
name: "右对齐"
|
|
1532
|
-
}
|
|
1533
|
-
]
|
|
1534
|
-
}
|
|
1535
|
-
}
|
|
1536
|
-
}
|
|
1537
|
-
};
|
|
1538
|
-
}
|
|
1539
|
-
}
|
|
1540
|
-
function Jn(n, t, e) {
|
|
1541
|
-
const o = n.schema;
|
|
1542
1286
|
function r() {
|
|
1543
|
-
var S;
|
|
1544
|
-
let m = ((S = n.parent) == null ? void 0 : S.schema.type) || "";
|
|
1545
|
-
["page-header", "tabs", "section"].findIndex((N) => N === m) === -1 && (m = ""), e.toolbarPosition = m;
|
|
1546
|
-
}
|
|
1547
|
-
r();
|
|
1548
|
-
function i(m) {
|
|
1549
|
-
return !1;
|
|
1550
|
-
}
|
|
1551
|
-
function s(m, S) {
|
|
1552
|
-
return S.text = m.label, S;
|
|
1553
|
-
}
|
|
1554
|
-
function c() {
|
|
1555
|
-
return !1;
|
|
1556
|
-
}
|
|
1557
|
-
function l() {
|
|
1558
|
-
return !1;
|
|
1559
|
-
}
|
|
1560
|
-
function u() {
|
|
1561
|
-
return !1;
|
|
1562
|
-
}
|
|
1563
|
-
function g() {
|
|
1564
1287
|
return !0;
|
|
1565
1288
|
}
|
|
1566
|
-
function
|
|
1567
|
-
return new
|
|
1568
|
-
}
|
|
1569
|
-
function p(m) {
|
|
1570
|
-
var M;
|
|
1571
|
-
m && (m.stopPropagation(), m.preventDefault());
|
|
1572
|
-
const { schema: S } = n;
|
|
1573
|
-
S.buttons || (S.buttons = []);
|
|
1574
|
-
let N = "";
|
|
1575
|
-
if (S.type)
|
|
1576
|
-
N = S.type + "-item";
|
|
1577
|
-
else {
|
|
1578
|
-
const C = (M = n.parent) == null ? void 0 : M.schema.type;
|
|
1579
|
-
N = C === "tabs" ? "tab-toolbar-item" : C === "section" ? "section-toolbar-item" : "response-toolbar-item";
|
|
1580
|
-
}
|
|
1581
|
-
const _ = $e(N);
|
|
1582
|
-
_.id = `toolbar_item_${Math.random().toString().slice(2, 6)}`, S.buttons.push(_), e.updateToolbarItems(), e.changeSelectedId("");
|
|
1583
|
-
}
|
|
1584
|
-
function f() {
|
|
1585
|
-
return [
|
|
1586
|
-
{
|
|
1587
|
-
id: "appendItem",
|
|
1588
|
-
title: "新增按钮",
|
|
1589
|
-
text: "",
|
|
1590
|
-
icon: "f-icon f-icon-plus-circle text-white",
|
|
1591
|
-
onClick: (m) => p(m)
|
|
1592
|
-
}
|
|
1593
|
-
];
|
|
1594
|
-
}
|
|
1595
|
-
return {
|
|
1596
|
-
canAccepts: i,
|
|
1597
|
-
checkCanAddComponent: u,
|
|
1598
|
-
checkCanDeleteComponent: l,
|
|
1599
|
-
checkCanMoveComponent: c,
|
|
1600
|
-
hideNestedPaddingInDesginerView: g,
|
|
1601
|
-
onResolveNewComponentSchema: s,
|
|
1602
|
-
getPropsConfig: d,
|
|
1603
|
-
getCustomButtons: f
|
|
1604
|
-
};
|
|
1605
|
-
}
|
|
1606
|
-
var ue = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
1607
|
-
function Zn(n) {
|
|
1608
|
-
return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
|
|
1609
|
-
}
|
|
1610
|
-
function he(n) {
|
|
1611
|
-
throw new Error('Could not dynamically require "' + n + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
1612
|
-
}
|
|
1613
|
-
var mt = { exports: {} };
|
|
1614
|
-
(function(n, t) {
|
|
1615
|
-
(function(e) {
|
|
1616
|
-
n.exports = e();
|
|
1617
|
-
})(function() {
|
|
1618
|
-
return (/* @__PURE__ */ function() {
|
|
1619
|
-
function e(o, r, i) {
|
|
1620
|
-
function s(u, g) {
|
|
1621
|
-
if (!r[u]) {
|
|
1622
|
-
if (!o[u]) {
|
|
1623
|
-
var d = typeof he == "function" && he;
|
|
1624
|
-
if (!g && d) return d(u, !0);
|
|
1625
|
-
if (c) return c(u, !0);
|
|
1626
|
-
var p = new Error("Cannot find module '" + u + "'");
|
|
1627
|
-
throw p.code = "MODULE_NOT_FOUND", p;
|
|
1628
|
-
}
|
|
1629
|
-
var f = r[u] = { exports: {} };
|
|
1630
|
-
o[u][0].call(f.exports, function(m) {
|
|
1631
|
-
var S = o[u][1][m];
|
|
1632
|
-
return s(S || m);
|
|
1633
|
-
}, f, f.exports, e, o, r, i);
|
|
1634
|
-
}
|
|
1635
|
-
return r[u].exports;
|
|
1636
|
-
}
|
|
1637
|
-
for (var c = typeof he == "function" && he, l = 0; l < i.length; l++) s(i[l]);
|
|
1638
|
-
return s;
|
|
1639
|
-
}
|
|
1640
|
-
return e;
|
|
1641
|
-
}())({
|
|
1642
|
-
1: [function(e, o, r) {
|
|
1643
|
-
var i = {}, s = "(?:^|\\s)", c = "(?:\\s|$)";
|
|
1644
|
-
function l(d) {
|
|
1645
|
-
var p = i[d];
|
|
1646
|
-
return p ? p.lastIndex = 0 : i[d] = p = new RegExp(s + d + c, "g"), p;
|
|
1647
|
-
}
|
|
1648
|
-
function u(d, p) {
|
|
1649
|
-
var f = d.className;
|
|
1650
|
-
f.length ? l(p).test(f) || (d.className += " " + p) : d.className = p;
|
|
1651
|
-
}
|
|
1652
|
-
function g(d, p) {
|
|
1653
|
-
d.className = d.className.replace(l(p), " ").trim();
|
|
1654
|
-
}
|
|
1655
|
-
o.exports = {
|
|
1656
|
-
add: u,
|
|
1657
|
-
rm: g
|
|
1658
|
-
};
|
|
1659
|
-
}, {}],
|
|
1660
|
-
2: [function(e, o, r) {
|
|
1661
|
-
(function(i) {
|
|
1662
|
-
var s = e("contra/emitter"), c = e("crossvent"), l = e("./classes"), u = document, g = u.documentElement;
|
|
1663
|
-
function d(a, x) {
|
|
1664
|
-
var E = arguments.length;
|
|
1665
|
-
E === 1 && Array.isArray(a) === !1 && (x = a, a = []);
|
|
1666
|
-
var v, P, B, H, oe, K, F, L, z, G = null, X, j, de = !1, fe = 0, J, O = x || {};
|
|
1667
|
-
O.moves === void 0 && (O.moves = M), O.accepts === void 0 && (O.accepts = M), O.invalid === void 0 && (O.invalid = xt), O.containers === void 0 && (O.containers = a || []), O.isContainer === void 0 && (O.isContainer = _), O.copy === void 0 && (O.copy = !1), O.copySortSource === void 0 && (O.copySortSource = !1), O.revertOnSpill === void 0 && (O.revertOnSpill = !1), O.removeOnSpill === void 0 && (O.removeOnSpill = !1), O.direction === void 0 && (O.direction = "vertical"), O.ignoreInputTextSelection === void 0 && (O.ignoreInputTextSelection = !0), O.mirrorContainer === void 0 && (O.mirrorContainer = u.body);
|
|
1668
|
-
var Y = s({
|
|
1669
|
-
containers: O.containers,
|
|
1670
|
-
start: wt,
|
|
1671
|
-
end: Ue,
|
|
1672
|
-
cancel: ze,
|
|
1673
|
-
remove: Ge,
|
|
1674
|
-
destroy: vt,
|
|
1675
|
-
canMove: Ct,
|
|
1676
|
-
dragging: !1
|
|
1677
|
-
});
|
|
1678
|
-
return O.removeOnSpill === !0 && Y.on("over", Tt).on("out", Pt), _e(), Y;
|
|
1679
|
-
function Ce(h) {
|
|
1680
|
-
return Y.containers.indexOf(h) !== -1 || O.isContainer(h);
|
|
1681
|
-
}
|
|
1682
|
-
function _e(h) {
|
|
1683
|
-
var I = h ? "remove" : "add";
|
|
1684
|
-
m(g, I, "mousedown", yt), m(g, I, "mouseup", Se);
|
|
1685
|
-
}
|
|
1686
|
-
function we(h) {
|
|
1687
|
-
var I = h ? "remove" : "add";
|
|
1688
|
-
m(g, I, "mousemove", bt);
|
|
1689
|
-
}
|
|
1690
|
-
function Le(h) {
|
|
1691
|
-
var I = h ? "remove" : "add";
|
|
1692
|
-
c[I](g, "selectstart", je), c[I](g, "click", je);
|
|
1693
|
-
}
|
|
1694
|
-
function vt() {
|
|
1695
|
-
_e(!0), Se({});
|
|
1696
|
-
}
|
|
1697
|
-
function je(h) {
|
|
1698
|
-
X && h.preventDefault();
|
|
1699
|
-
}
|
|
1700
|
-
function yt(h) {
|
|
1701
|
-
H = h.clientX, oe = h.clientY;
|
|
1702
|
-
var I = S(h) !== 1 || h.metaKey || h.ctrlKey;
|
|
1703
|
-
if (!I) {
|
|
1704
|
-
var D = h.target, R = xe(D);
|
|
1705
|
-
R && (X = R, we(), h.type === "mousedown" && (k(D) ? D.focus() : h.preventDefault()));
|
|
1706
|
-
}
|
|
1707
|
-
}
|
|
1708
|
-
function bt(h) {
|
|
1709
|
-
if (X) {
|
|
1710
|
-
if (S(h) === 0) {
|
|
1711
|
-
Se({});
|
|
1712
|
-
return;
|
|
1713
|
-
}
|
|
1714
|
-
if (!(h.clientX !== void 0 && Math.abs(h.clientX - H) <= (O.slideFactorX || 0) && h.clientY !== void 0 && Math.abs(h.clientY - oe) <= (O.slideFactorY || 0))) {
|
|
1715
|
-
if (O.ignoreInputTextSelection) {
|
|
1716
|
-
var I = y("clientX", h) || 0, D = y("clientY", h) || 0, R = u.elementFromPoint(I, D);
|
|
1717
|
-
if (k(R))
|
|
1718
|
-
return;
|
|
1719
|
-
}
|
|
1720
|
-
var U = X;
|
|
1721
|
-
we(!0), Le(), Ue(), qe(U), l.add(L || B, "gu-transit"), It(), Et(), fe = 0, Ee(h);
|
|
1722
|
-
}
|
|
1723
|
-
}
|
|
1724
|
-
}
|
|
1725
|
-
function xe(h) {
|
|
1726
|
-
if (!(Y.dragging && v) && !Ce(h)) {
|
|
1727
|
-
for (var I = h; w(h) && Ce(w(h)) === !1; )
|
|
1728
|
-
if (O.invalid(h, I) || (h = w(h), !h))
|
|
1729
|
-
return;
|
|
1730
|
-
var D = w(h);
|
|
1731
|
-
if (D && !O.invalid(h, I)) {
|
|
1732
|
-
var R = O.moves(h, D, I, T(h));
|
|
1733
|
-
if (R)
|
|
1734
|
-
return {
|
|
1735
|
-
item: h,
|
|
1736
|
-
source: D
|
|
1737
|
-
};
|
|
1738
|
-
}
|
|
1739
|
-
}
|
|
1740
|
-
}
|
|
1741
|
-
function Ct(h) {
|
|
1742
|
-
return !!xe(h);
|
|
1743
|
-
}
|
|
1744
|
-
function wt(h) {
|
|
1745
|
-
var I = xe(h);
|
|
1746
|
-
I && qe(I);
|
|
1747
|
-
}
|
|
1748
|
-
function qe(h) {
|
|
1749
|
-
$t(h.item, h.source) && (L = h.item.cloneNode(!0), Y.emit("cloned", L, h.item, "copy")), P = h.source, B = h.item, K = F = T(h.item), Y.dragging = !0, Y.emit("drag", B, P);
|
|
1750
|
-
}
|
|
1751
|
-
function xt() {
|
|
1752
|
-
return !1;
|
|
1753
|
-
}
|
|
1754
|
-
function Ue() {
|
|
1755
|
-
if (Y.dragging) {
|
|
1756
|
-
var h = L || B;
|
|
1757
|
-
He(h, w(h));
|
|
1758
|
-
}
|
|
1759
|
-
}
|
|
1760
|
-
function We() {
|
|
1761
|
-
X = !1, we(!0), Le(!0);
|
|
1762
|
-
}
|
|
1763
|
-
function Se(h) {
|
|
1764
|
-
if (We(), !!Y.dragging) {
|
|
1765
|
-
var I = L || B, D = y("clientX", h) || 0, R = y("clientY", h) || 0, U = N(v, D, R), W = Xe(U, D, R);
|
|
1766
|
-
W && (L && O.copySortSource || !L || W !== P) ? He(I, W) : O.removeOnSpill ? Ge() : ze();
|
|
1767
|
-
}
|
|
1768
|
-
}
|
|
1769
|
-
function He(h, I) {
|
|
1770
|
-
var D = w(h);
|
|
1771
|
-
L && O.copySortSource && I === P && D.removeChild(B), Pe(I) ? Y.emit("cancel", h, P) : Y.emit("drop", h, I, P, F), Te();
|
|
1772
|
-
}
|
|
1773
|
-
function Ge() {
|
|
1774
|
-
if (Y.dragging) {
|
|
1775
|
-
var h = L || B, I = w(h);
|
|
1776
|
-
I && I.removeChild(h), Y.emit(L ? "cancel" : "remove", h, I, P), Te();
|
|
1777
|
-
}
|
|
1778
|
-
}
|
|
1779
|
-
function ze(h) {
|
|
1780
|
-
if (Y.dragging) {
|
|
1781
|
-
var I = arguments.length > 0 ? h : O.revertOnSpill, D = L || B, R = w(D), U = Pe(R);
|
|
1782
|
-
U === !1 && I && (L ? R && R.removeChild(L) : P.insertBefore(D, K)), U || I ? Y.emit("cancel", D, P, P) : Y.emit("drop", D, R, P, F), Te();
|
|
1783
|
-
}
|
|
1784
|
-
}
|
|
1785
|
-
function Te() {
|
|
1786
|
-
var h = L || B;
|
|
1787
|
-
We(), Mt(), Dt(), h && l.rm(h, "gu-transit"), z && clearTimeout(z), Y.dragging = !1, G && Y.emit("out", h, G, P), Y.emit("dragend", h, fe), P = B = L = K = F = z = G = null;
|
|
1788
|
-
}
|
|
1789
|
-
function Pe(h, I) {
|
|
1790
|
-
var D;
|
|
1791
|
-
return I !== void 0 ? D = I : v ? D = F : D = T(L || B), h === P && D === K;
|
|
1792
|
-
}
|
|
1793
|
-
function Xe(h, I, D) {
|
|
1794
|
-
for (var R = h; R && !U(); )
|
|
1795
|
-
R = w(R);
|
|
1796
|
-
return R;
|
|
1797
|
-
function U() {
|
|
1798
|
-
var W = Ce(R);
|
|
1799
|
-
if (W === !1)
|
|
1800
|
-
return !1;
|
|
1801
|
-
var ae = Ye(R, h), ne = Qe(R, ae, I, D), se = Pe(R, ne);
|
|
1802
|
-
return se ? !0 : O.accepts(B, R, P, ne);
|
|
1803
|
-
}
|
|
1804
|
-
}
|
|
1805
|
-
function Ee(h) {
|
|
1806
|
-
if (!v)
|
|
1807
|
-
return;
|
|
1808
|
-
h.preventDefault();
|
|
1809
|
-
var I = y("clientX", h) || 0, D = y("clientY", h) || 0;
|
|
1810
|
-
v.style.left = I - 2 + "px", v.style.top = D - 2 + "px";
|
|
1811
|
-
var R = L || B, U = N(v, I, D), W = Xe(U, I, D), ae = W !== null && W !== G;
|
|
1812
|
-
(ae || W === null) && (re(), G = W, ce()), Nt(U, D);
|
|
1813
|
-
var ne = w(R);
|
|
1814
|
-
if (W === P && L && !O.copySortSource) {
|
|
1815
|
-
ne && ne.removeChild(R);
|
|
1816
|
-
return;
|
|
1817
|
-
}
|
|
1818
|
-
var se, le = Ye(W, U);
|
|
1819
|
-
if (de = kt(le, W), le !== null)
|
|
1820
|
-
se = Qe(W, le, I, D);
|
|
1821
|
-
else if (O.revertOnSpill === !0 && !L)
|
|
1822
|
-
se = K, W = P;
|
|
1823
|
-
else {
|
|
1824
|
-
L && ne && ne.removeChild(R), L && j && (j.style.display = "none");
|
|
1825
|
-
return;
|
|
1826
|
-
}
|
|
1827
|
-
j.style.display = "block", St(se, R, ae), se ? At(le, se) : Vt(W);
|
|
1828
|
-
function ee(te) {
|
|
1829
|
-
Y.emit(te, R, G, P);
|
|
1830
|
-
}
|
|
1831
|
-
function ce() {
|
|
1832
|
-
ae && ee("over");
|
|
1833
|
-
}
|
|
1834
|
-
function re() {
|
|
1835
|
-
G && ee("out");
|
|
1836
|
-
}
|
|
1837
|
-
}
|
|
1838
|
-
function St(h, I, D) {
|
|
1839
|
-
(h === I || h === T(I)) && (F = T(I)), (h === null && D || h !== I && h !== T(I)) && (F = h);
|
|
1840
|
-
}
|
|
1841
|
-
function Tt(h) {
|
|
1842
|
-
l.rm(h, "gu-hide");
|
|
1843
|
-
}
|
|
1844
|
-
function Pt(h) {
|
|
1845
|
-
Y.dragging && l.add(h, "gu-hide");
|
|
1846
|
-
}
|
|
1847
|
-
function Et() {
|
|
1848
|
-
v || (v = document.createElement("div"), v.style = "background: grey; color: white; height: 24px; text-align: center; padding: 3px 10px; min-width: 100px;border-radius: 4px; box-shadow: 0 0 6px grey;", v.innerHTML = O.getMirrorText && O.getMirrorText(B) || "控件", l.add(v, "gu-mirror"), O.mirrorContainer.appendChild(v), m(g, "add", "mousemove", Ee), l.add(O.mirrorContainer, "gu-unselectable"), Y.emit("cloned", v, B, "mirror"));
|
|
1849
|
-
}
|
|
1850
|
-
function It() {
|
|
1851
|
-
if (j = document.createElement("div"), l.add(j, "gu-insertion"), B) {
|
|
1852
|
-
var h = B.getBoundingClientRect();
|
|
1853
|
-
j.style.left = h.left + "px", j.style.top = h.top + "px";
|
|
1854
|
-
}
|
|
1855
|
-
de = !1, O.mirrorContainer.appendChild(j);
|
|
1856
|
-
}
|
|
1857
|
-
function Mt() {
|
|
1858
|
-
v && (l.rm(O.mirrorContainer, "gu-unselectable"), m(g, "remove", "mousemove", Ee), w(v).removeChild(v), v = null);
|
|
1859
|
-
}
|
|
1860
|
-
function Dt() {
|
|
1861
|
-
j && (w(j).removeChild(j), j = null);
|
|
1862
|
-
}
|
|
1863
|
-
function Ye(h, I) {
|
|
1864
|
-
for (var D = I; D !== h && w(D) !== h; )
|
|
1865
|
-
D = w(D);
|
|
1866
|
-
return D === g ? null : D;
|
|
1867
|
-
}
|
|
1868
|
-
function kt(h, I) {
|
|
1869
|
-
if (!I)
|
|
1870
|
-
return de;
|
|
1871
|
-
var D = h || I && I.lastElementChild;
|
|
1872
|
-
if (!D)
|
|
1873
|
-
return !0;
|
|
1874
|
-
var R = getComputedStyle(h), U = /^inline/.test(R.getPropertyValue("display")) || /^(left|right)$/.test(R.getPropertyValue("float"));
|
|
1875
|
-
if (U)
|
|
1876
|
-
return !0;
|
|
1877
|
-
if (I) {
|
|
1878
|
-
var W = getComputedStyle(I), ae = W.getPropertyValue("display");
|
|
1879
|
-
if (/flex$/.test(ae)) {
|
|
1880
|
-
var ne = W.getPropertyValue("flex-direction") || "row";
|
|
1881
|
-
if (ne === "row" || ne === "row-reverse")
|
|
1882
|
-
return !Bt(I);
|
|
1883
|
-
}
|
|
1884
|
-
return !1;
|
|
1885
|
-
}
|
|
1886
|
-
return !0;
|
|
1887
|
-
}
|
|
1888
|
-
function Bt(h) {
|
|
1889
|
-
if (!h.children || !h.children.length)
|
|
1890
|
-
return !1;
|
|
1891
|
-
for (const I of Array.from(h.children)) {
|
|
1892
|
-
const R = (I.className && I.className.split(" ") || []).filter((U) => /^col(-md|-xl|-el){0,1}-([1-9]|10|11|12)$/.test(U));
|
|
1893
|
-
if (!R.length)
|
|
1894
|
-
return !1;
|
|
1895
|
-
for (const U of R) {
|
|
1896
|
-
const W = U.slice(U.lastIndexOf("-") + 1);
|
|
1897
|
-
if (parseInt(W, 10) !== 12)
|
|
1898
|
-
return !1;
|
|
1899
|
-
}
|
|
1900
|
-
}
|
|
1901
|
-
return !0;
|
|
1902
|
-
}
|
|
1903
|
-
function At(h, I) {
|
|
1904
|
-
const D = I.getBoundingClientRect();
|
|
1905
|
-
if (j.style.left = D.left + "px", j.style.top = D.top + "px", de) {
|
|
1906
|
-
if (j.style.height = D.height + "px", j.style.width = "4px", h) {
|
|
1907
|
-
const R = h.getBoundingClientRect();
|
|
1908
|
-
R.top !== D.top && (j.style.left = R.right + "px", j.style.top = R.top + "px", j.style.height = R.height + "px");
|
|
1909
|
-
}
|
|
1910
|
-
} else if (j.style.height = "4px", j.style.width = D.width + "px", J) {
|
|
1911
|
-
const R = J.getBoundingClientRect();
|
|
1912
|
-
D.top < R.top && (j.style.display = "none");
|
|
1913
|
-
}
|
|
1914
|
-
I === B && B && (j.style.display = "none");
|
|
1915
|
-
}
|
|
1916
|
-
function Vt(h) {
|
|
1917
|
-
F = null;
|
|
1918
|
-
var I = h.lastElementChild;
|
|
1919
|
-
if (I) {
|
|
1920
|
-
var D = I.getBoundingClientRect();
|
|
1921
|
-
de ? (j.style.left = D.right + "px", j.style.top = D.top + "px", j.style.height = D.height + "px", j.style.width = "4px") : (j.style.left = D.left + "px", j.style.top = D.bottom + "px", j.style.height = "4px", j.style.width = D.width + "px"), I === B && B && (j.style.display = "none");
|
|
1922
|
-
} else
|
|
1923
|
-
j.style.display = "none";
|
|
1924
|
-
}
|
|
1925
|
-
function Nt(h, I) {
|
|
1926
|
-
if (!O.mirrorContainer.contains(h) || !window.scrollContainerList || !Array.from(window.scrollContainerList).length || (J = p(h), !J || !J.contains(h)))
|
|
1927
|
-
return;
|
|
1928
|
-
const D = document.querySelector(".dgComponentSelected"), R = J.getBoundingClientRect();
|
|
1929
|
-
if (I - 30 < R.top && J.scrollTop > 0) {
|
|
1930
|
-
let U = J.scrollTop < 10 ? J.scrollTop : 10;
|
|
1931
|
-
J.scrollBy(0, -1 * U), D && J.contains(D) && (fe = fe + -1 * U);
|
|
1932
|
-
}
|
|
1933
|
-
if (I + 30 > R.bottom && J.scrollTop < J.scrollHeight - J.clientHeight) {
|
|
1934
|
-
const U = J.scrollHeight - J.clientHeight - J.scrollTop;
|
|
1935
|
-
let W = U < 10 ? U : 10;
|
|
1936
|
-
J.scrollBy(0, W), D && J.contains(D) && (fe = fe + W);
|
|
1937
|
-
}
|
|
1938
|
-
}
|
|
1939
|
-
function Qe(h, I, D, R) {
|
|
1940
|
-
var U = O.direction === "horizontal", W = O.direction === "mixed", ae = I !== h ? se() : ne();
|
|
1941
|
-
return ae;
|
|
1942
|
-
function ne() {
|
|
1943
|
-
var ee = h.children.length, ce, re, te;
|
|
1944
|
-
for (ce = 0; ce < ee; ce++)
|
|
1945
|
-
if (re = h.children[ce], te = re.getBoundingClientRect(), U && te.left + te.width / 2 > D || !W && !U && te.top + te.height / 2 > R || W && te.left + te.width > D && te.top + te.height > R)
|
|
1946
|
-
return re;
|
|
1947
|
-
return null;
|
|
1948
|
-
}
|
|
1949
|
-
function se() {
|
|
1950
|
-
var ee = I.getBoundingClientRect();
|
|
1951
|
-
if (W) {
|
|
1952
|
-
var ce = R - ee.top, re = D - ee.left, te = ee.bottom - R, Ie = ee.right - D, Me = Math.min(re, Ie, ce, te), De;
|
|
1953
|
-
return de ? De = Ie < re : De = te === Me || Ie === Me || re === Me, le(De);
|
|
1954
|
-
}
|
|
1955
|
-
return le(U ? D > ee.left + C(ee) / 2 : R > ee.top + b(ee) / 2);
|
|
1956
|
-
}
|
|
1957
|
-
function le(ee) {
|
|
1958
|
-
return ee ? T(I) : I;
|
|
1959
|
-
}
|
|
1960
|
-
}
|
|
1961
|
-
function $t(h, I) {
|
|
1962
|
-
return typeof O.copy == "boolean" ? O.copy : O.copy(h, I);
|
|
1963
|
-
}
|
|
1964
|
-
}
|
|
1965
|
-
function p(a) {
|
|
1966
|
-
const x = Array.from(window.scrollContainerList);
|
|
1967
|
-
if (x.length === 1) {
|
|
1968
|
-
const v = Array.from(window.scrollContainerList)[0];
|
|
1969
|
-
return document.getElementById(v);
|
|
1970
|
-
}
|
|
1971
|
-
const E = f(x);
|
|
1972
|
-
for (const v of E)
|
|
1973
|
-
if (v.contains(a))
|
|
1974
|
-
return v;
|
|
1975
|
-
return null;
|
|
1976
|
-
}
|
|
1977
|
-
function f(a) {
|
|
1978
|
-
const x = [];
|
|
1979
|
-
return a.forEach((E) => {
|
|
1980
|
-
const v = document.getElementById(E);
|
|
1981
|
-
v && x.push(v);
|
|
1982
|
-
}), x.sort((E, v) => E.contains(v) ? 1 : v.contains(E) ? -1 : 0), x;
|
|
1983
|
-
}
|
|
1984
|
-
function m(a, x, E, v) {
|
|
1985
|
-
var P = {
|
|
1986
|
-
mouseup: "touchend",
|
|
1987
|
-
mousedown: "touchstart",
|
|
1988
|
-
mousemove: "touchmove"
|
|
1989
|
-
}, B = {
|
|
1990
|
-
mouseup: "pointerup",
|
|
1991
|
-
mousedown: "pointerdown",
|
|
1992
|
-
mousemove: "pointermove"
|
|
1993
|
-
}, H = {
|
|
1994
|
-
mouseup: "MSPointerUp",
|
|
1995
|
-
mousedown: "MSPointerDown",
|
|
1996
|
-
mousemove: "MSPointerMove"
|
|
1997
|
-
};
|
|
1998
|
-
i.navigator.pointerEnabled ? c[x](a, B[E], v) : i.navigator.msPointerEnabled ? c[x](a, H[E], v) : (c[x](a, P[E], v), c[x](a, E, v));
|
|
1999
|
-
}
|
|
2000
|
-
function S(a) {
|
|
2001
|
-
if (a.touches !== void 0)
|
|
2002
|
-
return a.touches.length;
|
|
2003
|
-
if (a.which !== void 0 && a.which !== 0)
|
|
2004
|
-
return a.which;
|
|
2005
|
-
if (a.buttons !== void 0)
|
|
2006
|
-
return a.buttons;
|
|
2007
|
-
var x = a.button;
|
|
2008
|
-
if (x !== void 0)
|
|
2009
|
-
return x & 1 ? 1 : x & 2 ? 3 : x & 4 ? 2 : 0;
|
|
2010
|
-
}
|
|
2011
|
-
function N(a, x, E) {
|
|
2012
|
-
a = a || {};
|
|
2013
|
-
var v = a.className || "", P;
|
|
2014
|
-
return a.className += " gu-hide", P = u.elementFromPoint(x, E), a.className = v, P;
|
|
2015
|
-
}
|
|
2016
|
-
function _() {
|
|
2017
|
-
return !1;
|
|
2018
|
-
}
|
|
2019
|
-
function M() {
|
|
2020
|
-
return !0;
|
|
2021
|
-
}
|
|
2022
|
-
function C(a) {
|
|
2023
|
-
return a.width || a.right - a.left;
|
|
2024
|
-
}
|
|
2025
|
-
function b(a) {
|
|
2026
|
-
return a.height || a.bottom - a.top;
|
|
2027
|
-
}
|
|
2028
|
-
function w(a) {
|
|
2029
|
-
return a.parentNode === u ? null : a.parentNode;
|
|
2030
|
-
}
|
|
2031
|
-
function k(a) {
|
|
2032
|
-
return a.tagName === "INPUT" || a.tagName === "TEXTAREA" || a.tagName === "SELECT" || A(a);
|
|
2033
|
-
}
|
|
2034
|
-
function A(a) {
|
|
2035
|
-
return !a || a.contentEditable === "false" ? !1 : a.contentEditable === "true" ? !0 : A(w(a));
|
|
2036
|
-
}
|
|
2037
|
-
function T(a) {
|
|
2038
|
-
return a.nextElementSibling || x();
|
|
2039
|
-
function x() {
|
|
2040
|
-
var E = a;
|
|
2041
|
-
do
|
|
2042
|
-
E = E.nextSibling;
|
|
2043
|
-
while (E && E.nodeType !== 1);
|
|
2044
|
-
return E;
|
|
2045
|
-
}
|
|
2046
|
-
}
|
|
2047
|
-
function $(a) {
|
|
2048
|
-
return a.targetTouches && a.targetTouches.length ? a.targetTouches[0] : a.changedTouches && a.changedTouches.length ? a.changedTouches[0] : a;
|
|
2049
|
-
}
|
|
2050
|
-
function y(a, x) {
|
|
2051
|
-
var E = $(x), v = {
|
|
2052
|
-
pageX: "clientX",
|
|
2053
|
-
// IE8
|
|
2054
|
-
pageY: "clientY"
|
|
2055
|
-
// IE8
|
|
2056
|
-
};
|
|
2057
|
-
return a in v && !(a in E) && v[a] in E && (a = v[a]), E[a];
|
|
2058
|
-
}
|
|
2059
|
-
o.exports = d;
|
|
2060
|
-
}).call(this, typeof ue < "u" ? ue : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
2061
|
-
}, { "./classes": 1, "contra/emitter": 5, crossvent: 6 }],
|
|
2062
|
-
3: [function(e, o, r) {
|
|
2063
|
-
o.exports = function(s, c) {
|
|
2064
|
-
return Array.prototype.slice.call(s, c);
|
|
2065
|
-
};
|
|
2066
|
-
}, {}],
|
|
2067
|
-
4: [function(e, o, r) {
|
|
2068
|
-
var i = e("ticky");
|
|
2069
|
-
o.exports = function(c, l, u) {
|
|
2070
|
-
c && i(function() {
|
|
2071
|
-
c.apply(u || null, l || []);
|
|
2072
|
-
});
|
|
2073
|
-
};
|
|
2074
|
-
}, { ticky: 10 }],
|
|
2075
|
-
5: [function(e, o, r) {
|
|
2076
|
-
var i = e("atoa"), s = e("./debounce");
|
|
2077
|
-
o.exports = function(l, u) {
|
|
2078
|
-
var g = u || {}, d = {};
|
|
2079
|
-
return l === void 0 && (l = {}), l.on = function(p, f) {
|
|
2080
|
-
return d[p] ? d[p].push(f) : d[p] = [f], l;
|
|
2081
|
-
}, l.once = function(p, f) {
|
|
2082
|
-
return f._once = !0, l.on(p, f), l;
|
|
2083
|
-
}, l.off = function(p, f) {
|
|
2084
|
-
var m = arguments.length;
|
|
2085
|
-
if (m === 1)
|
|
2086
|
-
delete d[p];
|
|
2087
|
-
else if (m === 0)
|
|
2088
|
-
d = {};
|
|
2089
|
-
else {
|
|
2090
|
-
var S = d[p];
|
|
2091
|
-
if (!S)
|
|
2092
|
-
return l;
|
|
2093
|
-
S.splice(S.indexOf(f), 1);
|
|
2094
|
-
}
|
|
2095
|
-
return l;
|
|
2096
|
-
}, l.emit = function() {
|
|
2097
|
-
var p = i(arguments);
|
|
2098
|
-
return l.emitterSnapshot(p.shift()).apply(this, p);
|
|
2099
|
-
}, l.emitterSnapshot = function(p) {
|
|
2100
|
-
var f = (d[p] || []).slice(0);
|
|
2101
|
-
return function() {
|
|
2102
|
-
var m = i(arguments), S = this || l;
|
|
2103
|
-
if (p === "error" && g.throws !== !1 && !f.length)
|
|
2104
|
-
throw m.length === 1 ? m[0] : m;
|
|
2105
|
-
return f.forEach(function(_) {
|
|
2106
|
-
g.async ? s(_, m, S) : _.apply(S, m), _._once && l.off(p, _);
|
|
2107
|
-
}), l;
|
|
2108
|
-
};
|
|
2109
|
-
}, l;
|
|
2110
|
-
};
|
|
2111
|
-
}, { "./debounce": 4, atoa: 3 }],
|
|
2112
|
-
6: [function(e, o, r) {
|
|
2113
|
-
(function(i) {
|
|
2114
|
-
var s = e("custom-event"), c = e("./eventmap"), l = i.document, u = p, g = m, d = [];
|
|
2115
|
-
i.addEventListener || (u = f, g = S), o.exports = {
|
|
2116
|
-
add: u,
|
|
2117
|
-
remove: g,
|
|
2118
|
-
fabricate: N
|
|
2119
|
-
};
|
|
2120
|
-
function p(w, k, A, T) {
|
|
2121
|
-
return w.addEventListener(k, A, T);
|
|
2122
|
-
}
|
|
2123
|
-
function f(w, k, A) {
|
|
2124
|
-
return w.attachEvent("on" + k, M(w, k, A));
|
|
2125
|
-
}
|
|
2126
|
-
function m(w, k, A, T) {
|
|
2127
|
-
return w.removeEventListener(k, A, T);
|
|
2128
|
-
}
|
|
2129
|
-
function S(w, k, A) {
|
|
2130
|
-
var T = C(w, k, A);
|
|
2131
|
-
if (T)
|
|
2132
|
-
return w.detachEvent("on" + k, T);
|
|
2133
|
-
}
|
|
2134
|
-
function N(w, k, A) {
|
|
2135
|
-
var T = c.indexOf(k) === -1 ? y() : $();
|
|
2136
|
-
w.dispatchEvent ? w.dispatchEvent(T) : w.fireEvent("on" + k, T);
|
|
2137
|
-
function $() {
|
|
2138
|
-
var a;
|
|
2139
|
-
return l.createEvent ? (a = l.createEvent("Event"), a.initEvent(k, !0, !0)) : l.createEventObject && (a = l.createEventObject()), a;
|
|
2140
|
-
}
|
|
2141
|
-
function y() {
|
|
2142
|
-
return new s(k, { detail: A });
|
|
2143
|
-
}
|
|
2144
|
-
}
|
|
2145
|
-
function _(w, k, A) {
|
|
2146
|
-
return function($) {
|
|
2147
|
-
var y = $ || i.event;
|
|
2148
|
-
y.target = y.target || y.srcElement, y.preventDefault = y.preventDefault || function() {
|
|
2149
|
-
y.returnValue = !1;
|
|
2150
|
-
}, y.stopPropagation = y.stopPropagation || function() {
|
|
2151
|
-
y.cancelBubble = !0;
|
|
2152
|
-
}, y.which = y.which || y.keyCode, A.call(w, y);
|
|
2153
|
-
};
|
|
2154
|
-
}
|
|
2155
|
-
function M(w, k, A) {
|
|
2156
|
-
var T = C(w, k, A) || _(w, k, A);
|
|
2157
|
-
return d.push({
|
|
2158
|
-
wrapper: T,
|
|
2159
|
-
element: w,
|
|
2160
|
-
type: k,
|
|
2161
|
-
fn: A
|
|
2162
|
-
}), T;
|
|
2163
|
-
}
|
|
2164
|
-
function C(w, k, A) {
|
|
2165
|
-
var T = b(w, k, A);
|
|
2166
|
-
if (T) {
|
|
2167
|
-
var $ = d[T].wrapper;
|
|
2168
|
-
return d.splice(T, 1), $;
|
|
2169
|
-
}
|
|
2170
|
-
}
|
|
2171
|
-
function b(w, k, A) {
|
|
2172
|
-
var T, $;
|
|
2173
|
-
for (T = 0; T < d.length; T++)
|
|
2174
|
-
if ($ = d[T], $.element === w && $.type === k && $.fn === A)
|
|
2175
|
-
return T;
|
|
2176
|
-
}
|
|
2177
|
-
}).call(this, typeof ue < "u" ? ue : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
2178
|
-
}, { "./eventmap": 7, "custom-event": 8 }],
|
|
2179
|
-
7: [function(e, o, r) {
|
|
2180
|
-
(function(i) {
|
|
2181
|
-
var s = [], c = "", l = /^on/;
|
|
2182
|
-
for (c in i)
|
|
2183
|
-
l.test(c) && s.push(c.slice(2));
|
|
2184
|
-
o.exports = s;
|
|
2185
|
-
}).call(this, typeof ue < "u" ? ue : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
2186
|
-
}, {}],
|
|
2187
|
-
8: [function(e, o, r) {
|
|
2188
|
-
(function(i) {
|
|
2189
|
-
var s = i.CustomEvent;
|
|
2190
|
-
function c() {
|
|
2191
|
-
try {
|
|
2192
|
-
var l = new s("cat", { detail: { foo: "bar" } });
|
|
2193
|
-
return l.type === "cat" && l.detail.foo === "bar";
|
|
2194
|
-
} catch {
|
|
2195
|
-
}
|
|
2196
|
-
return !1;
|
|
2197
|
-
}
|
|
2198
|
-
o.exports = c() ? s : (
|
|
2199
|
-
// IE >= 9
|
|
2200
|
-
typeof document < "u" && typeof document.createEvent == "function" ? function(u, g) {
|
|
2201
|
-
var d = document.createEvent("CustomEvent");
|
|
2202
|
-
return g ? d.initCustomEvent(u, g.bubbles, g.cancelable, g.detail) : d.initCustomEvent(u, !1, !1, void 0), d;
|
|
2203
|
-
} : (
|
|
2204
|
-
// IE <= 8
|
|
2205
|
-
function(u, g) {
|
|
2206
|
-
var d = document.createEventObject();
|
|
2207
|
-
return d.type = u, g ? (d.bubbles = !!g.bubbles, d.cancelable = !!g.cancelable, d.detail = g.detail) : (d.bubbles = !1, d.cancelable = !1, d.detail = void 0), d;
|
|
2208
|
-
}
|
|
2209
|
-
)
|
|
2210
|
-
);
|
|
2211
|
-
}).call(this, typeof ue < "u" ? ue : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
2212
|
-
}, {}],
|
|
2213
|
-
9: [function(e, o, r) {
|
|
2214
|
-
var i = o.exports = {}, s, c;
|
|
2215
|
-
function l() {
|
|
2216
|
-
throw new Error("setTimeout has not been defined");
|
|
2217
|
-
}
|
|
2218
|
-
function u() {
|
|
2219
|
-
throw new Error("clearTimeout has not been defined");
|
|
2220
|
-
}
|
|
2221
|
-
(function() {
|
|
2222
|
-
try {
|
|
2223
|
-
typeof setTimeout == "function" ? s = setTimeout : s = l;
|
|
2224
|
-
} catch {
|
|
2225
|
-
s = l;
|
|
2226
|
-
}
|
|
2227
|
-
try {
|
|
2228
|
-
typeof clearTimeout == "function" ? c = clearTimeout : c = u;
|
|
2229
|
-
} catch {
|
|
2230
|
-
c = u;
|
|
2231
|
-
}
|
|
2232
|
-
})();
|
|
2233
|
-
function g(b) {
|
|
2234
|
-
if (s === setTimeout)
|
|
2235
|
-
return setTimeout(b, 0);
|
|
2236
|
-
if ((s === l || !s) && setTimeout)
|
|
2237
|
-
return s = setTimeout, setTimeout(b, 0);
|
|
2238
|
-
try {
|
|
2239
|
-
return s(b, 0);
|
|
2240
|
-
} catch {
|
|
2241
|
-
try {
|
|
2242
|
-
return s.call(null, b, 0);
|
|
2243
|
-
} catch {
|
|
2244
|
-
return s.call(this, b, 0);
|
|
2245
|
-
}
|
|
2246
|
-
}
|
|
2247
|
-
}
|
|
2248
|
-
function d(b) {
|
|
2249
|
-
if (c === clearTimeout)
|
|
2250
|
-
return clearTimeout(b);
|
|
2251
|
-
if ((c === u || !c) && clearTimeout)
|
|
2252
|
-
return c = clearTimeout, clearTimeout(b);
|
|
2253
|
-
try {
|
|
2254
|
-
return c(b);
|
|
2255
|
-
} catch {
|
|
2256
|
-
try {
|
|
2257
|
-
return c.call(null, b);
|
|
2258
|
-
} catch {
|
|
2259
|
-
return c.call(this, b);
|
|
2260
|
-
}
|
|
2261
|
-
}
|
|
2262
|
-
}
|
|
2263
|
-
var p = [], f = !1, m, S = -1;
|
|
2264
|
-
function N() {
|
|
2265
|
-
!f || !m || (f = !1, m.length ? p = m.concat(p) : S = -1, p.length && _());
|
|
2266
|
-
}
|
|
2267
|
-
function _() {
|
|
2268
|
-
if (!f) {
|
|
2269
|
-
var b = g(N);
|
|
2270
|
-
f = !0;
|
|
2271
|
-
for (var w = p.length; w; ) {
|
|
2272
|
-
for (m = p, p = []; ++S < w; )
|
|
2273
|
-
m && m[S].run();
|
|
2274
|
-
S = -1, w = p.length;
|
|
2275
|
-
}
|
|
2276
|
-
m = null, f = !1, d(b);
|
|
2277
|
-
}
|
|
2278
|
-
}
|
|
2279
|
-
i.nextTick = function(b) {
|
|
2280
|
-
var w = new Array(arguments.length - 1);
|
|
2281
|
-
if (arguments.length > 1)
|
|
2282
|
-
for (var k = 1; k < arguments.length; k++)
|
|
2283
|
-
w[k - 1] = arguments[k];
|
|
2284
|
-
p.push(new M(b, w)), p.length === 1 && !f && g(_);
|
|
2285
|
-
};
|
|
2286
|
-
function M(b, w) {
|
|
2287
|
-
this.fun = b, this.array = w;
|
|
2288
|
-
}
|
|
2289
|
-
M.prototype.run = function() {
|
|
2290
|
-
this.fun.apply(null, this.array);
|
|
2291
|
-
}, i.title = "browser", i.browser = !0, i.env = {}, i.argv = [], i.version = "", i.versions = {};
|
|
2292
|
-
function C() {
|
|
2293
|
-
}
|
|
2294
|
-
i.on = C, i.addListener = C, i.once = C, i.off = C, i.removeListener = C, i.removeAllListeners = C, i.emit = C, i.prependListener = C, i.prependOnceListener = C, i.listeners = function(b) {
|
|
2295
|
-
return [];
|
|
2296
|
-
}, i.binding = function(b) {
|
|
2297
|
-
throw new Error("process.binding is not supported");
|
|
2298
|
-
}, i.cwd = function() {
|
|
2299
|
-
return "/";
|
|
2300
|
-
}, i.chdir = function(b) {
|
|
2301
|
-
throw new Error("process.chdir is not supported");
|
|
2302
|
-
}, i.umask = function() {
|
|
2303
|
-
return 0;
|
|
2304
|
-
};
|
|
2305
|
-
}, {}],
|
|
2306
|
-
10: [function(e, o, r) {
|
|
2307
|
-
(function(i) {
|
|
2308
|
-
var s = typeof i == "function", c;
|
|
2309
|
-
s ? c = function(l) {
|
|
2310
|
-
i(l);
|
|
2311
|
-
} : c = function(l) {
|
|
2312
|
-
setTimeout(l, 0);
|
|
2313
|
-
}, o.exports = c;
|
|
2314
|
-
}).call(this, e("timers").setImmediate);
|
|
2315
|
-
}, { timers: 11 }],
|
|
2316
|
-
11: [function(e, o, r) {
|
|
2317
|
-
(function(i, s) {
|
|
2318
|
-
var c = e("process/browser.js").nextTick, l = Function.prototype.apply, u = Array.prototype.slice, g = {}, d = 0;
|
|
2319
|
-
r.setTimeout = function() {
|
|
2320
|
-
return new p(l.call(setTimeout, window, arguments), clearTimeout);
|
|
2321
|
-
}, r.setInterval = function() {
|
|
2322
|
-
return new p(l.call(setInterval, window, arguments), clearInterval);
|
|
2323
|
-
}, r.clearTimeout = r.clearInterval = function(f) {
|
|
2324
|
-
f.close();
|
|
2325
|
-
};
|
|
2326
|
-
function p(f, m) {
|
|
2327
|
-
this._id = f, this._clearFn = m;
|
|
2328
|
-
}
|
|
2329
|
-
p.prototype.unref = p.prototype.ref = function() {
|
|
2330
|
-
}, p.prototype.close = function() {
|
|
2331
|
-
this._clearFn.call(window, this._id);
|
|
2332
|
-
}, r.enroll = function(f, m) {
|
|
2333
|
-
clearTimeout(f._idleTimeoutId), f._idleTimeout = m;
|
|
2334
|
-
}, r.unenroll = function(f) {
|
|
2335
|
-
clearTimeout(f._idleTimeoutId), f._idleTimeout = -1;
|
|
2336
|
-
}, r._unrefActive = r.active = function(f) {
|
|
2337
|
-
clearTimeout(f._idleTimeoutId);
|
|
2338
|
-
var m = f._idleTimeout;
|
|
2339
|
-
m >= 0 && (f._idleTimeoutId = setTimeout(function() {
|
|
2340
|
-
f._onTimeout && f._onTimeout();
|
|
2341
|
-
}, m));
|
|
2342
|
-
}, r.setImmediate = typeof i == "function" ? i : function(f) {
|
|
2343
|
-
var m = d++, S = arguments.length < 2 ? !1 : u.call(arguments, 1);
|
|
2344
|
-
return g[m] = !0, c(function() {
|
|
2345
|
-
g[m] && (S ? f.apply(null, S) : f.call(null), r.clearImmediate(m));
|
|
2346
|
-
}), m;
|
|
2347
|
-
}, r.clearImmediate = typeof s == "function" ? s : function(f) {
|
|
2348
|
-
delete g[f];
|
|
2349
|
-
};
|
|
2350
|
-
}).call(this, e("timers").setImmediate, e("timers").clearImmediate);
|
|
2351
|
-
}, { "process/browser.js": 9, timers: 11 }]
|
|
2352
|
-
}, {}, [2])(2);
|
|
2353
|
-
});
|
|
2354
|
-
})(mt);
|
|
2355
|
-
var Kn = mt.exports;
|
|
2356
|
-
const et = /* @__PURE__ */ Zn(Kn);
|
|
2357
|
-
function eo(n) {
|
|
2358
|
-
let t;
|
|
2359
|
-
function e(r, i, s, c) {
|
|
2360
|
-
const l = n.schema;
|
|
2361
|
-
if (!(l != null && l.buttons))
|
|
2362
|
-
return;
|
|
2363
|
-
let u;
|
|
2364
|
-
if (s) {
|
|
2365
|
-
const f = s.getAttribute("id");
|
|
2366
|
-
u = Array.from(i.children).findIndex((m) => m.getAttribute("id") === f);
|
|
2367
|
-
} else
|
|
2368
|
-
u = Array.from(i.children).length;
|
|
2369
|
-
const g = r.getAttribute("id"), d = Array.from(i.children).findIndex((f) => f.getAttribute("id") === g), p = l.buttons[d];
|
|
2370
|
-
d !== u && d > -1 && u > -1 && (d < u && (u = u - 1), l.buttons.splice(d, 1), l.buttons.splice(u, 0, p), c(), Ne(() => {
|
|
2371
|
-
const f = i.querySelector(".dgComponentSelected");
|
|
2372
|
-
f != null && f.className.includes("dgComponentSelected") && (f.classList.remove("dgComponentSelected"), f.classList.remove("dgComponentFocused"), f.click()), st.value++;
|
|
2373
|
-
}));
|
|
2374
|
-
}
|
|
2375
|
-
function o(r, i, s) {
|
|
2376
|
-
t && t.destroy(), !(!et || !r || !i) && (t = et([r], {
|
|
2377
|
-
mirrorContainer: i,
|
|
2378
|
-
direction: "horizontal",
|
|
2379
|
-
getMirrorText(c) {
|
|
2380
|
-
return c.innerText;
|
|
2381
|
-
},
|
|
2382
|
-
// 判断是否可移动
|
|
2383
|
-
moves(c, l, u) {
|
|
2384
|
-
let g = !0;
|
|
2385
|
-
return u.classList.contains("dropdown-item") ? (g = !1, g) : (c.classList.contains("no-drag") && (g = !1), g);
|
|
2386
|
-
}
|
|
2387
|
-
}).on("drop", (c, l, u, g) => e(c, l, g, s)));
|
|
2388
|
-
}
|
|
2389
|
-
return {
|
|
2390
|
-
dragulaInstance: t,
|
|
2391
|
-
initDragula: o
|
|
2392
|
-
};
|
|
2393
|
-
}
|
|
2394
|
-
function to(n, t, e) {
|
|
2395
|
-
const {
|
|
2396
|
-
renderToolbarItemDesigner: o,
|
|
2397
|
-
actionHandlers: r
|
|
2398
|
-
} = e;
|
|
2399
|
-
let i;
|
|
2400
|
-
function s(M) {
|
|
2401
|
-
i = M;
|
|
2402
|
-
}
|
|
2403
|
-
function c(M, C = null) {
|
|
2404
|
-
const b = t.value.find((w) => w.id === M.id);
|
|
2405
|
-
if (b.isDP)
|
|
2406
|
-
if (document.body.click(), typeof C == "boolean")
|
|
2407
|
-
b.expanded = C;
|
|
2408
|
-
else {
|
|
2409
|
-
const w = M.expanded;
|
|
2410
|
-
b.expanded = !w;
|
|
2411
|
-
}
|
|
2412
|
-
}
|
|
2413
|
-
r.toggleDropdownMenu = c;
|
|
2414
|
-
function l(M) {
|
|
2415
|
-
var b;
|
|
2416
|
-
const C = {
|
|
2417
|
-
"dropdown-menu": !0
|
|
2418
|
-
};
|
|
2419
|
-
if (M.class) {
|
|
2420
|
-
const w = (b = M.menuClass) == null ? void 0 : b.split(" ");
|
|
2421
|
-
w && w.length && w.reduce((k, A) => (k[A] = !0, k), C);
|
|
2422
|
-
}
|
|
2423
|
-
return C;
|
|
2424
|
-
}
|
|
2425
|
-
function u(M) {
|
|
2426
|
-
var w;
|
|
2427
|
-
const C = {
|
|
2428
|
-
disabled: M.disabled === !1,
|
|
2429
|
-
"dropdown-submenu": !0,
|
|
2430
|
-
"f-rt-dropdown": !0,
|
|
2431
|
-
"text-truncate": !0
|
|
2432
|
-
}, b = (w = M.dropdownClass) == null ? void 0 : w.split(" ");
|
|
2433
|
-
return b && b.length && b.reduce((k, A) => (k[A] = !0, k), C), C;
|
|
2434
|
-
}
|
|
2435
|
-
function g(M) {
|
|
2436
|
-
const C = {
|
|
2437
|
-
disabled: !1,
|
|
2438
|
-
"dropdown-item": !0,
|
|
2439
|
-
"f-rt-btn": !0,
|
|
2440
|
-
"position-relative": !0,
|
|
2441
|
-
"farris-component": !0,
|
|
2442
|
-
"text-truncate": !0
|
|
2443
|
-
}, b = (M.class || "").split(" ");
|
|
2444
|
-
return b && b.length && b.reduce((w, k) => (w[k] = !0, w), C), C;
|
|
2445
|
-
}
|
|
2446
|
-
let d;
|
|
2447
|
-
const p = /* @__PURE__ */ new Map();
|
|
2448
|
-
function f(M, C, b) {
|
|
2449
|
-
M.stopPropagation();
|
|
2450
|
-
const w = b ? b.id : "__top_item__";
|
|
2451
|
-
if (C.children && C.children.length && (C.expanded = !C.expanded, C.expanded)) {
|
|
2452
|
-
if (p.has(w) && p.get(w) !== C) {
|
|
2453
|
-
const k = p.get(w);
|
|
2454
|
-
k && (k.expanded = !1, p.delete(w));
|
|
2455
|
-
}
|
|
2456
|
-
p.set(w, C);
|
|
2457
|
-
}
|
|
2458
|
-
}
|
|
2459
|
-
function m(M) {
|
|
2460
|
-
var C;
|
|
2461
|
-
return (C = M.children) == null ? void 0 : C.map((b, w) => b.children && b.children.length ? V("li", {
|
|
2462
|
-
class: u(b),
|
|
2463
|
-
id: b.id
|
|
2464
|
-
}, [V("span", {
|
|
2465
|
-
class: g(b),
|
|
2466
|
-
onClick: (k) => f(k, b, M)
|
|
2467
|
-
}, [b.text, V("i", {
|
|
2468
|
-
class: "f-icon f-icon-arrow-chevron-right",
|
|
2469
|
-
style: "display: inline-block;float: right;line-height: 1.25rem;"
|
|
2470
|
-
}, null)]), d(b, b)]) : o(b, w, !0));
|
|
2471
|
-
}
|
|
2472
|
-
function S(M, C, b, w) {
|
|
2473
|
-
const {
|
|
2474
|
-
height: T,
|
|
2475
|
-
left: $,
|
|
2476
|
-
top: y
|
|
2477
|
-
} = w[0], {
|
|
2478
|
-
width: a,
|
|
2479
|
-
height: x
|
|
2480
|
-
} = b.getBoundingClientRect(), {
|
|
2481
|
-
marginTop: E,
|
|
2482
|
-
marginBottom: v
|
|
2483
|
-
} = getComputedStyle(b), P = Math.ceil(parseFloat(E)) + Math.ceil(parseFloat(v)), B = y + T, H = C == null ? void 0 : C.getBoundingClientRect();
|
|
2484
|
-
function oe() {
|
|
2485
|
-
let z = 0, G = "left";
|
|
2486
|
-
const X = H ? H.right : window.innerWidth, j = H ? H.left : 0;
|
|
2487
|
-
return z = X - $ - 10, X - $ < a && $ - j > X - $ && (G = "right", z = $ - j - 10), {
|
|
2488
|
-
hposition: G,
|
|
2489
|
-
maxWidth: Math.min(z, 300)
|
|
2490
|
-
};
|
|
2491
|
-
}
|
|
2492
|
-
let K = 0, F = "bottom";
|
|
2493
|
-
if (M === "tabs" || M === "section")
|
|
2494
|
-
K = C.getBoundingClientRect().bottom - B - P - 10;
|
|
2495
|
-
else {
|
|
2496
|
-
const z = H ? H.bottom : window.innerHeight;
|
|
2497
|
-
K = M === "page-header" ? z - B : y, K = K - P - 10, F = M === "page-header" ? "bottom" : "top";
|
|
2498
|
-
}
|
|
2499
|
-
const L = oe();
|
|
2500
|
-
return {
|
|
2501
|
-
position: F + "-" + L.hposition,
|
|
2502
|
-
maxWidth: L.maxWidth,
|
|
2503
|
-
maxHeight: K
|
|
2504
|
-
};
|
|
2505
|
-
}
|
|
2506
|
-
function N(M) {
|
|
2507
|
-
var A, T, $;
|
|
2508
|
-
const C = "300px", b = {
|
|
2509
|
-
display: M.expanded === !0 ? "block" : "none",
|
|
2510
|
-
position: "absolute",
|
|
2511
|
-
maxWidth: C,
|
|
2512
|
-
minWidth: "120px"
|
|
2513
|
-
};
|
|
2514
|
-
if (!(i != null && i.value))
|
|
2515
|
-
return b;
|
|
2516
|
-
const w = i.value.querySelector("#" + M.id), k = w == null ? void 0 : w.getClientRects();
|
|
2517
|
-
if (w && k && k.length > 0) {
|
|
2518
|
-
const y = w ? w.querySelector("#" + M.id + "_menu") : null;
|
|
2519
|
-
if (!y || M.expanded !== !0)
|
|
2520
|
-
return b;
|
|
2521
|
-
y.style.visibility = "hidden", y.style.display = "block", y.style.maxHeight = "auto", y.style.maxWidth = C;
|
|
2522
|
-
let a;
|
|
2523
|
-
switch (r.toolbarPosition) {
|
|
2524
|
-
case "tabs":
|
|
2525
|
-
a = (A = i.value) == null ? void 0 : A.closest(".farris-tabs");
|
|
2526
|
-
break;
|
|
2527
|
-
case "section":
|
|
2528
|
-
a = (T = i.value) == null ? void 0 : T.closest(".f-section");
|
|
2529
|
-
break;
|
|
2530
|
-
default:
|
|
2531
|
-
a = ($ = i.value) == null ? void 0 : $.closest(".f-page");
|
|
2532
|
-
}
|
|
2533
|
-
const x = S(r.toolbarPosition, a, y, k), {
|
|
2534
|
-
position: E,
|
|
2535
|
-
maxHeight: v,
|
|
2536
|
-
maxWidth: P
|
|
2537
|
-
} = x;
|
|
2538
|
-
y.style.visibility = "visible";
|
|
2539
|
-
const B = {
|
|
2540
|
-
left: E.indexOf("left") > -1 ? 0 : "unset",
|
|
2541
|
-
right: E.indexOf("left") > -1 ? "unset" : 0,
|
|
2542
|
-
bottom: E.indexOf("bottom") > -1 ? "unset" : "100%",
|
|
2543
|
-
top: E.indexOf("bottom") > -1 ? "!00%" : "unset",
|
|
2544
|
-
maxWidth: P ? P + "px" : "300px",
|
|
2545
|
-
maxHeight: v ? v + "px" : "auto",
|
|
2546
|
-
overflowY: v ? "auto" : "unset"
|
|
2547
|
-
};
|
|
2548
|
-
Object.assign(b, B);
|
|
2549
|
-
}
|
|
2550
|
-
return b;
|
|
2551
|
-
}
|
|
2552
|
-
r.changeMenuPosition = N, d = function(M, C) {
|
|
2553
|
-
return V("ul", {
|
|
2554
|
-
class: l(M),
|
|
2555
|
-
style: N(M),
|
|
2556
|
-
id: M.id + "_menu"
|
|
2557
|
-
}, [m(M)]);
|
|
2558
|
-
};
|
|
2559
|
-
function _(M = "") {
|
|
2560
|
-
M && p.has(M) ? p.forEach((C, b) => {
|
|
2561
|
-
b !== M && (C.expanded = !1, p.delete(b));
|
|
2562
|
-
}) : (p.forEach((C) => {
|
|
2563
|
-
C.expanded = !1;
|
|
2564
|
-
}), p.clear());
|
|
1289
|
+
function s(u) {
|
|
1290
|
+
return new je(u, e).getPropertyConfig(i);
|
|
2565
1291
|
}
|
|
2566
1292
|
return {
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
1293
|
+
canAccepts: t,
|
|
1294
|
+
hideNestedPaddingInDesginerView: r,
|
|
1295
|
+
getPropsConfig: s,
|
|
1296
|
+
checkCanDeleteComponent: n,
|
|
1297
|
+
checkCanMoveComponent: o
|
|
2570
1298
|
};
|
|
2571
1299
|
}
|
|
2572
|
-
|
|
2573
|
-
function n(e) {
|
|
2574
|
-
const o = {
|
|
2575
|
-
"f-icon": !0
|
|
2576
|
-
};
|
|
2577
|
-
if (e.icon) {
|
|
2578
|
-
const r = e.icon.trim().split(" ");
|
|
2579
|
-
r && r.length && r.reduce((i, s) => (i[s] = !0, i), o);
|
|
2580
|
-
}
|
|
2581
|
-
return o;
|
|
2582
|
-
}
|
|
2583
|
-
function t(e) {
|
|
2584
|
-
return !!(e.icon && e.icon.trim());
|
|
2585
|
-
}
|
|
2586
|
-
return { iconClass: n, shouldShowIcon: t };
|
|
2587
|
-
}
|
|
2588
|
-
const no = {
|
|
1300
|
+
const ze = {
|
|
2589
1301
|
id: { type: String, default: "" },
|
|
2590
1302
|
componentId: { type: String, default: "" },
|
|
2591
1303
|
canAdd: { type: Boolean, default: !1 },
|
|
@@ -2599,1078 +1311,339 @@ const no = {
|
|
|
2599
1311
|
*/
|
|
2600
1312
|
modelValue: { type: Object }
|
|
2601
1313
|
};
|
|
2602
|
-
function
|
|
2603
|
-
var
|
|
2604
|
-
const
|
|
2605
|
-
function
|
|
1314
|
+
function Je(i, e, t) {
|
|
1315
|
+
var F;
|
|
1316
|
+
const n = "", o = S();
|
|
1317
|
+
function r() {
|
|
2606
1318
|
return !0;
|
|
2607
1319
|
}
|
|
2608
1320
|
function s() {
|
|
2609
1321
|
return !1;
|
|
2610
1322
|
}
|
|
2611
|
-
function
|
|
1323
|
+
function u() {
|
|
2612
1324
|
return !0;
|
|
2613
1325
|
}
|
|
2614
1326
|
function l() {
|
|
2615
1327
|
return !0;
|
|
2616
1328
|
}
|
|
2617
|
-
function
|
|
1329
|
+
function a() {
|
|
2618
1330
|
return !0;
|
|
2619
1331
|
}
|
|
2620
|
-
function
|
|
2621
|
-
if (!
|
|
1332
|
+
function d(M) {
|
|
1333
|
+
if (!M || !M.value)
|
|
2622
1334
|
return null;
|
|
2623
|
-
const
|
|
2624
|
-
return
|
|
1335
|
+
const p = S(M == null ? void 0 : M.value.parent), P = d(p);
|
|
1336
|
+
return P || null;
|
|
2625
1337
|
}
|
|
2626
|
-
function
|
|
2627
|
-
var
|
|
2628
|
-
const { componentInstance:
|
|
2629
|
-
if (!
|
|
1338
|
+
function c(M = e) {
|
|
1339
|
+
var E;
|
|
1340
|
+
const { componentInstance: p, designerItemElementRef: P } = M;
|
|
1341
|
+
if (!p || !p.value)
|
|
2630
1342
|
return null;
|
|
2631
|
-
const { getCustomButtons:
|
|
2632
|
-
return
|
|
1343
|
+
const { getCustomButtons: w } = p.value;
|
|
1344
|
+
return p.value.canMove || p.value.canAdd || p.value.canDelete || w && ((E = w()) != null && E.length) ? P : c(M.parent);
|
|
2633
1345
|
}
|
|
2634
|
-
function
|
|
1346
|
+
function m() {
|
|
2635
1347
|
}
|
|
2636
|
-
function f(
|
|
2637
|
-
return !!
|
|
1348
|
+
function f(M) {
|
|
1349
|
+
return !!t;
|
|
2638
1350
|
}
|
|
2639
|
-
function
|
|
2640
|
-
return (
|
|
1351
|
+
function b() {
|
|
1352
|
+
return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
|
|
2641
1353
|
}
|
|
2642
|
-
function
|
|
1354
|
+
function v() {
|
|
2643
1355
|
}
|
|
2644
|
-
function
|
|
1356
|
+
function k(M, p) {
|
|
2645
1357
|
}
|
|
2646
|
-
function
|
|
2647
|
-
const { componentType:
|
|
2648
|
-
let
|
|
2649
|
-
const
|
|
2650
|
-
return
|
|
1358
|
+
function D(M) {
|
|
1359
|
+
const { componentType: p } = M, P = $("designer-host-service");
|
|
1360
|
+
let w = J(p, M, P);
|
|
1361
|
+
const E = p.toLowerCase().replace(/-/g, "_");
|
|
1362
|
+
return w && !w.id && w.type === p && (w.id = `${E}_${Math.random().toString().slice(2, 6)}`), w;
|
|
2651
1363
|
}
|
|
2652
|
-
function M
|
|
1364
|
+
function N(M) {
|
|
2653
1365
|
}
|
|
2654
|
-
function
|
|
1366
|
+
function h(...M) {
|
|
2655
1367
|
return [];
|
|
2656
1368
|
}
|
|
2657
|
-
function
|
|
1369
|
+
function I() {
|
|
2658
1370
|
}
|
|
2659
|
-
function
|
|
1371
|
+
function U(M) {
|
|
2660
1372
|
}
|
|
2661
|
-
return
|
|
2662
|
-
canMove:
|
|
1373
|
+
return o.value = {
|
|
1374
|
+
canMove: r(),
|
|
2663
1375
|
canSelectParent: s(),
|
|
2664
1376
|
canAdd: l(),
|
|
2665
|
-
canDelete:
|
|
2666
|
-
canNested: !
|
|
1377
|
+
canDelete: u(),
|
|
1378
|
+
canNested: !a(),
|
|
2667
1379
|
contents: [],
|
|
2668
|
-
elementRef:
|
|
2669
|
-
parent: (
|
|
2670
|
-
schema:
|
|
2671
|
-
styles:
|
|
1380
|
+
elementRef: i,
|
|
1381
|
+
parent: (F = e.parent) == null ? void 0 : F.componentInstance,
|
|
1382
|
+
schema: e.schema,
|
|
1383
|
+
styles: n,
|
|
2672
1384
|
canAccepts: f,
|
|
2673
|
-
getBelongedComponentInstance:
|
|
2674
|
-
getDraggableDesignItemElement:
|
|
2675
|
-
getDraggingDisplayText:
|
|
2676
|
-
getPropConfig:
|
|
2677
|
-
getDragScopeElement:
|
|
2678
|
-
onAcceptMovedChildElement:
|
|
2679
|
-
onChildElementMovedOut:
|
|
2680
|
-
addNewChildComponentSchema:
|
|
2681
|
-
onRemoveComponent:
|
|
2682
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
2683
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
2684
|
-
onPropertyChanged:
|
|
2685
|
-
getCustomButtons:
|
|
2686
|
-
},
|
|
1385
|
+
getBelongedComponentInstance: d,
|
|
1386
|
+
getDraggableDesignItemElement: c,
|
|
1387
|
+
getDraggingDisplayText: b,
|
|
1388
|
+
getPropConfig: h,
|
|
1389
|
+
getDragScopeElement: v,
|
|
1390
|
+
onAcceptMovedChildElement: k,
|
|
1391
|
+
onChildElementMovedOut: N,
|
|
1392
|
+
addNewChildComponentSchema: D,
|
|
1393
|
+
onRemoveComponent: I,
|
|
1394
|
+
triggerBelongedComponentToMoveWhenMoved: S(!1),
|
|
1395
|
+
triggerBelongedComponentToDeleteWhenDeleted: S(!1),
|
|
1396
|
+
onPropertyChanged: U,
|
|
1397
|
+
getCustomButtons: m
|
|
1398
|
+
}, o;
|
|
2687
1399
|
}
|
|
2688
|
-
const
|
|
1400
|
+
const Qe = /* @__PURE__ */ W({
|
|
2689
1401
|
name: "FDesignerInnerItem",
|
|
2690
|
-
props:
|
|
1402
|
+
props: ze,
|
|
2691
1403
|
emits: ["selectionChange", "addComponent", "removeComponent", "clickButton"],
|
|
2692
|
-
setup(
|
|
2693
|
-
const
|
|
2694
|
-
designerItemElementRef:
|
|
1404
|
+
setup(i, e) {
|
|
1405
|
+
const t = S(i.canMove), n = S(i.canAdd), o = S(i.canDelete), r = S(!1), s = S(i.contentKey), u = S(i.childType), l = S(i.childLabel), a = S(i.modelValue), d = S(""), c = S(), m = $("canvas-dragula"), f = S(), b = $("design-item-context"), v = {
|
|
1406
|
+
designerItemElementRef: c,
|
|
2695
1407
|
componentInstance: f,
|
|
2696
|
-
schema:
|
|
2697
|
-
parent:
|
|
2698
|
-
setupContext:
|
|
1408
|
+
schema: a.value,
|
|
1409
|
+
parent: b,
|
|
1410
|
+
setupContext: e
|
|
2699
1411
|
};
|
|
2700
|
-
|
|
2701
|
-
const
|
|
2702
|
-
var
|
|
2703
|
-
const
|
|
1412
|
+
re("design-item-context", v);
|
|
1413
|
+
const k = T(() => {
|
|
1414
|
+
var V;
|
|
1415
|
+
const g = ((V = f.value) == null ? void 0 : V.getCustomButtons) && f.value.getCustomButtons();
|
|
2704
1416
|
return {
|
|
2705
1417
|
"farris-component": !0,
|
|
2706
1418
|
// 受position-relative影响,整个容器的高度不能被撑起
|
|
2707
|
-
"flex-fill":
|
|
2708
|
-
"position-relative":
|
|
2709
|
-
"farris-nested":
|
|
2710
|
-
"can-move":
|
|
2711
|
-
"d-none":
|
|
1419
|
+
"flex-fill": i.id === "root-component",
|
|
1420
|
+
"position-relative": t.value || o.value || (g == null ? void 0 : g.length),
|
|
1421
|
+
"farris-nested": r.value,
|
|
1422
|
+
"can-move": t.value,
|
|
1423
|
+
"d-none": c.value && c.value.classList.contains("d-none")
|
|
2712
1424
|
};
|
|
2713
|
-
}),
|
|
2714
|
-
const
|
|
2715
|
-
return
|
|
2716
|
-
const [
|
|
2717
|
-
return
|
|
2718
|
-
},
|
|
1425
|
+
}), D = T(() => {
|
|
1426
|
+
const g = {};
|
|
1427
|
+
return d.value && d.value.split(";").reduce((C, V) => {
|
|
1428
|
+
const [A, L] = V.split(":");
|
|
1429
|
+
return A && (C[A] = L), C;
|
|
1430
|
+
}, g), g;
|
|
2719
1431
|
});
|
|
2720
|
-
function
|
|
2721
|
-
if (
|
|
2722
|
-
const
|
|
2723
|
-
if (
|
|
2724
|
-
const
|
|
2725
|
-
|
|
1432
|
+
function N(g, C) {
|
|
1433
|
+
if (b && b.schema[s.value]) {
|
|
1434
|
+
const V = b.schema[s.value].findIndex((A) => A.id === C.id);
|
|
1435
|
+
if (V > -1) {
|
|
1436
|
+
const A = b.schema[s.value].length, L = b.schema[s.value][V % A];
|
|
1437
|
+
b.designerItemElementRef.value.querySelector(`#${L.id}-design-item`), b.schema[s.value].splice(V, 1), H.value++, e.emit("removeComponent"), e.emit("selectionChange");
|
|
2726
1438
|
}
|
|
2727
1439
|
}
|
|
2728
1440
|
}
|
|
2729
|
-
function
|
|
1441
|
+
function h(g) {
|
|
2730
1442
|
if (f.value.addNewChildComponentSchema) {
|
|
2731
|
-
const
|
|
2732
|
-
componentType:
|
|
1443
|
+
const C = {
|
|
1444
|
+
componentType: u.value,
|
|
2733
1445
|
label: l.value,
|
|
2734
1446
|
parentComponentInstance: f.value,
|
|
2735
1447
|
targetPosition: -1
|
|
2736
|
-
},
|
|
2737
|
-
|
|
1448
|
+
}, V = f.value.addNewChildComponentSchema(C);
|
|
1449
|
+
a.value[s.value].push(V), e.emit("addComponent");
|
|
2738
1450
|
}
|
|
2739
1451
|
}
|
|
2740
|
-
function
|
|
2741
|
-
return
|
|
1452
|
+
function I() {
|
|
1453
|
+
return n.value && y("div", {
|
|
2742
1454
|
role: "button",
|
|
2743
1455
|
class: "btn component-settings-button",
|
|
2744
1456
|
title: "新增",
|
|
2745
1457
|
ref: "removeComponent",
|
|
2746
|
-
onClick: (
|
|
2747
|
-
|
|
1458
|
+
onClick: (g) => {
|
|
1459
|
+
h();
|
|
2748
1460
|
}
|
|
2749
|
-
}, [
|
|
1461
|
+
}, [y("i", {
|
|
2750
1462
|
class: "f-icon f-icon-plus-circle"
|
|
2751
1463
|
}, null)]);
|
|
2752
1464
|
}
|
|
2753
|
-
function
|
|
2754
|
-
return
|
|
1465
|
+
function U(g) {
|
|
1466
|
+
return o.value && y("div", {
|
|
2755
1467
|
role: "button",
|
|
2756
1468
|
class: "btn component-settings-button",
|
|
2757
1469
|
title: "删除",
|
|
2758
1470
|
ref: "removeComponent",
|
|
2759
|
-
onClick:
|
|
2760
|
-
}, [
|
|
1471
|
+
onClick: le((C) => N(C, g), ["stop"])
|
|
1472
|
+
}, [y("i", {
|
|
2761
1473
|
class: "f-icon f-icon-yxs_delete"
|
|
2762
1474
|
}, null)]);
|
|
2763
1475
|
}
|
|
2764
|
-
function
|
|
2765
|
-
return
|
|
1476
|
+
function F() {
|
|
1477
|
+
return t.value && y("div", {
|
|
2766
1478
|
role: "button",
|
|
2767
1479
|
class: "btn component-settings-button",
|
|
2768
1480
|
title: "移动",
|
|
2769
1481
|
ref: "moveComponent"
|
|
2770
|
-
}, [
|
|
1482
|
+
}, [y("i", {
|
|
2771
1483
|
"data-dragging-icon": "true",
|
|
2772
1484
|
class: "cmp_move f-icon f-icon-yxs_move"
|
|
2773
1485
|
}, null)]);
|
|
2774
1486
|
}
|
|
2775
|
-
function
|
|
2776
|
-
var
|
|
2777
|
-
const
|
|
2778
|
-
return
|
|
1487
|
+
function M() {
|
|
1488
|
+
var C;
|
|
1489
|
+
const g = ((C = f.value) == null ? void 0 : C.getCustomButtons) && f.value.getCustomButtons();
|
|
1490
|
+
return g && !!g.length && g.map((V) => y("div", {
|
|
2779
1491
|
role: "button",
|
|
2780
|
-
class: `btn component-settings-button ${
|
|
2781
|
-
title:
|
|
2782
|
-
ref:
|
|
2783
|
-
onClick: (
|
|
2784
|
-
}, [
|
|
2785
|
-
class: "f-icon " +
|
|
2786
|
-
}, null),
|
|
1492
|
+
class: `btn component-settings-button ${V.class || ""} ${V.text ? "settings-button-extend" : ""}`,
|
|
1493
|
+
title: V.title,
|
|
1494
|
+
ref: V.id,
|
|
1495
|
+
onClick: (A) => V.onClick && V.onClick(A)
|
|
1496
|
+
}, [y("i", {
|
|
1497
|
+
class: "f-icon " + V.icon
|
|
1498
|
+
}, null), V.text && y("span", {
|
|
2787
1499
|
class: "icon-text"
|
|
2788
|
-
}, [
|
|
1500
|
+
}, [V.text])]));
|
|
2789
1501
|
}
|
|
2790
|
-
function
|
|
2791
|
-
return
|
|
1502
|
+
function p(g) {
|
|
1503
|
+
return y("div", {
|
|
2792
1504
|
class: "component-btn-group",
|
|
2793
1505
|
"data-noattach": "true"
|
|
2794
|
-
}, [
|
|
1506
|
+
}, [y("div", null, [I(), F(), U(g), M()])]);
|
|
2795
1507
|
}
|
|
2796
|
-
|
|
2797
|
-
|
|
1508
|
+
j(() => i.modelValue, (g) => {
|
|
1509
|
+
a.value = g, v.schema = g;
|
|
2798
1510
|
});
|
|
2799
|
-
function
|
|
1511
|
+
function P(g) {
|
|
2800
1512
|
window.scrollContainerList || (window.scrollContainerList = /* @__PURE__ */ new Set());
|
|
2801
|
-
const
|
|
2802
|
-
|
|
1513
|
+
const C = g.getAttribute("id");
|
|
1514
|
+
C && window.scrollContainerList.add(C);
|
|
2803
1515
|
}
|
|
2804
|
-
function
|
|
2805
|
-
const
|
|
2806
|
-
|
|
1516
|
+
function w(g) {
|
|
1517
|
+
const C = g.target;
|
|
1518
|
+
P(C), Re(C);
|
|
2807
1519
|
}
|
|
2808
|
-
function
|
|
2809
|
-
var
|
|
2810
|
-
(
|
|
1520
|
+
function E() {
|
|
1521
|
+
var g, C;
|
|
1522
|
+
(C = (g = a.value) == null ? void 0 : g.contents) != null && C.length && c.value && c.value.addEventListener("scroll", w);
|
|
2811
1523
|
}
|
|
2812
1524
|
function x() {
|
|
2813
|
-
const
|
|
2814
|
-
return
|
|
1525
|
+
const g = c.value, C = S(g.children[1]);
|
|
1526
|
+
return Je(C, v).value;
|
|
2815
1527
|
}
|
|
2816
|
-
|
|
2817
|
-
if (
|
|
2818
|
-
const
|
|
2819
|
-
f.value =
|
|
1528
|
+
K(() => {
|
|
1529
|
+
if (c.value) {
|
|
1530
|
+
const g = c.value.querySelector(`[data-dragref='${a.value.id}-container']`);
|
|
1531
|
+
f.value = g && g.componentInstance ? g.componentInstance.value : x(), m && g && m.attachComponents(g, a.value), r.value = f.value.canNested !== void 0 ? f.value.canNested : r.value, n.value = f.value.canAdd !== void 0 ? f.value.canAdd : n.value, o.value = f.value.canDelete !== void 0 ? f.value.canDelete : o.value, t.value = f.value.canMove !== void 0 ? f.value.canMove : t.value, d.value = f.value.styles || "", c.value && (c.value.componentInstance = f, c.value.designItemContext = v);
|
|
2820
1532
|
}
|
|
2821
|
-
|
|
2822
|
-
}),
|
|
2823
|
-
|
|
1533
|
+
E(), H.value++;
|
|
1534
|
+
}), ae(() => {
|
|
1535
|
+
c.value && c.value.removeEventListener("scroll", w);
|
|
2824
1536
|
});
|
|
2825
|
-
function
|
|
2826
|
-
|
|
2827
|
-
let
|
|
2828
|
-
const
|
|
2829
|
-
if (
|
|
2830
|
-
const
|
|
2831
|
-
|
|
2832
|
-
}
|
|
2833
|
-
dt(P == null ? void 0 : P.value);
|
|
2834
|
-
}
|
|
2835
|
-
return () => V("div", {
|
|
2836
|
-
id: `${n.id}-design-item`,
|
|
2837
|
-
ref: d,
|
|
2838
|
-
class: N.value,
|
|
2839
|
-
style: _.value,
|
|
2840
|
-
onClick: E
|
|
2841
|
-
}, [T(u.value), t.slots.default && t.slots.default()]);
|
|
2842
|
-
}
|
|
2843
|
-
});
|
|
2844
|
-
class ro extends at {
|
|
2845
|
-
constructor(e, o, r = "response-toolbar-item") {
|
|
2846
|
-
super(e, o);
|
|
2847
|
-
Z(this, "toolbarType", "response-toolbar-item");
|
|
2848
|
-
this.toolbarType = r;
|
|
2849
|
-
}
|
|
2850
|
-
/**
|
|
2851
|
-
*
|
|
2852
|
-
* @param propertyData
|
|
2853
|
-
* @param isDropdownItem 是否是下拉子项,有些属性在下拉子项上不应该显示
|
|
2854
|
-
* @returns
|
|
2855
|
-
*/
|
|
2856
|
-
getPropertyConfig(e, o = !1) {
|
|
2857
|
-
this.propertyConfig.categories.basic = this.getBasicPropConfig(e), this.propertyConfig.categories.basic.properties.text = {
|
|
2858
|
-
title: "文本",
|
|
2859
|
-
type: "string",
|
|
2860
|
-
description: "",
|
|
2861
|
-
refreshPanelAfterChanged: !0
|
|
2862
|
-
}, this.propertyConfig.categories.basic.setPropertyRelates = (i) => {
|
|
2863
|
-
if (i)
|
|
2864
|
-
switch (i && i.propertyID) {
|
|
2865
|
-
case "text": {
|
|
2866
|
-
i.needRefreshControlTree = !0;
|
|
2867
|
-
break;
|
|
2868
|
-
}
|
|
2869
|
-
}
|
|
2870
|
-
}, this.getAppearanceProperties(e, o);
|
|
2871
|
-
const r = this.getPropertyEditorParams(e, ["Const", "Variable", "StateMachine", "Expression"], "disabled");
|
|
2872
|
-
return this.propertyConfig.categories.behavior = this.getBehaviorConfig(e, "", {
|
|
2873
|
-
disabled: {
|
|
2874
|
-
title: "禁用",
|
|
2875
|
-
type: "boolean",
|
|
2876
|
-
description: "按钮禁用状态",
|
|
2877
|
-
refreshPanelAfterChanged: !0,
|
|
2878
|
-
editor: r
|
|
1537
|
+
function O(g) {
|
|
1538
|
+
g && (g.preventDefault(), g.stopPropagation());
|
|
1539
|
+
let C = v.designerItemElementRef;
|
|
1540
|
+
const V = c.value;
|
|
1541
|
+
if (V) {
|
|
1542
|
+
const A = document.getElementsByClassName("dgComponentFocused");
|
|
1543
|
+
A && A.length === 1 && A[0] === c.value && c.value.classList.contains("dgComponentSelected") || (Array.from(A).forEach((q) => q.classList.remove("dgComponentFocused")), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach((q) => q.classList.remove("dgComponentSelected")), V.classList.add("dgComponentFocused"), e.emit("selectionChange", a.value.type, a.value, i.componentId, f.value), f.value.getDraggableDesignItemElement && (C = f.value.getDraggableDesignItemElement(v), C && C.value && C.value.classList.add("dgComponentSelected")));
|
|
2879
1544
|
}
|
|
2880
|
-
|
|
2881
|
-
}
|
|
2882
|
-
getAppearanceProperties(e, o = !1) {
|
|
2883
|
-
this.propertyConfig.categories.appearance = {
|
|
2884
|
-
title: "外观",
|
|
2885
|
-
description: "Appearance",
|
|
2886
|
-
properties: {
|
|
2887
|
-
class: {
|
|
2888
|
-
title: "class样式",
|
|
2889
|
-
type: "string",
|
|
2890
|
-
description: "",
|
|
2891
|
-
$converter: "/converter/appearance.converter",
|
|
2892
|
-
visible: !o
|
|
2893
|
-
},
|
|
2894
|
-
// "dropdownClass": {
|
|
2895
|
-
// "title": "在下拉菜单中的样式",
|
|
2896
|
-
// "type": "string",
|
|
2897
|
-
// "description": ""
|
|
2898
|
-
// },
|
|
2899
|
-
icon: {
|
|
2900
|
-
title: "图标",
|
|
2901
|
-
type: "string",
|
|
2902
|
-
description: ""
|
|
2903
|
-
},
|
|
2904
|
-
split: {
|
|
2905
|
-
title: "下拉按钮分离",
|
|
2906
|
-
type: "boolean",
|
|
2907
|
-
description: "启用下拉按钮分离,可以单独点击按钮。单独点击下拉按钮展开下拉面板",
|
|
2908
|
-
visible: !!(e.children && e.children.length > 0)
|
|
2909
|
-
},
|
|
2910
|
-
tipsEnable: {
|
|
2911
|
-
title: "启用提示",
|
|
2912
|
-
type: "boolean",
|
|
2913
|
-
description: "当启用提示时,鼠标滑过按钮会有消息提示框",
|
|
2914
|
-
refreshPanelAfterChanged: !0,
|
|
2915
|
-
visible: this.toolbarType === "response-toolbar-item"
|
|
2916
|
-
},
|
|
2917
|
-
tipsText: {
|
|
2918
|
-
title: "提示消息内容",
|
|
2919
|
-
type: "string",
|
|
2920
|
-
description: "消息提示框内的展示内容",
|
|
2921
|
-
visible: e.tipsEnable === !0
|
|
2922
|
-
}
|
|
2923
|
-
}
|
|
2924
|
-
};
|
|
2925
|
-
}
|
|
2926
|
-
getEventPropConfig(e) {
|
|
2927
|
-
const o = [
|
|
2928
|
-
{
|
|
2929
|
-
label: "onClick",
|
|
2930
|
-
name: "点击事件"
|
|
2931
|
-
}
|
|
2932
|
-
], r = this, i = r.eventsEditorUtils.formProperties(e, r.viewModelId, o), s = {};
|
|
2933
|
-
s[r.viewModelId] = {
|
|
2934
|
-
type: "events-editor",
|
|
2935
|
-
editor: {
|
|
2936
|
-
initialData: i
|
|
2937
|
-
}
|
|
2938
|
-
}, this.propertyConfig.categories.eventsEditor = {
|
|
2939
|
-
title: "事件",
|
|
2940
|
-
hideTitle: !0,
|
|
2941
|
-
properties: s,
|
|
2942
|
-
// 这个属性,标记当属性变更得时候触发重新更新属性
|
|
2943
|
-
refreshPanelAfterChanged: !0,
|
|
2944
|
-
tabId: "commands",
|
|
2945
|
-
tabName: "交互",
|
|
2946
|
-
setPropertyRelates(c, l) {
|
|
2947
|
-
const u = c.propertyValue;
|
|
2948
|
-
delete e[r.viewModelId], u && (u.setPropertyRelates = this.setPropertyRelates, r.eventsEditorUtils.saveRelatedParameters(e, r.viewModelId, u.events, u));
|
|
2949
|
-
}
|
|
2950
|
-
};
|
|
2951
|
-
}
|
|
2952
|
-
}
|
|
2953
|
-
function Ae(n, t) {
|
|
2954
|
-
if (!n)
|
|
2955
|
-
return !1;
|
|
2956
|
-
const e = t || [];
|
|
2957
|
-
return (e == null ? void 0 : e.findIndex((r) => r.id === n)) === -1;
|
|
2958
|
-
}
|
|
2959
|
-
function tt(n, t) {
|
|
2960
|
-
const e = t || [];
|
|
2961
|
-
let o = { parentIndex: -1, itemIndex: -1 };
|
|
2962
|
-
return e.some((r, i) => {
|
|
2963
|
-
if (r.children && r.children.length > 0) {
|
|
2964
|
-
const s = r.children.findIndex((c) => c.id === n);
|
|
2965
|
-
return s > -1 ? (o = { parentIndex: i, itemIndex: s }, !0) : !1;
|
|
1545
|
+
oe(C == null ? void 0 : C.value);
|
|
2966
1546
|
}
|
|
2967
|
-
|
|
2968
|
-
}
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
return c > -1 ? (o = { parentIndex: s, itemIndex: c }, !0) : !1;
|
|
2977
|
-
}
|
|
2978
|
-
}), o.parentIndex < 0 ? { parent: null, item: null } : { parent: e[o.parentIndex], item: e[o.parentIndex].children[o.itemIndex] });
|
|
2979
|
-
}
|
|
2980
|
-
function io(n, t) {
|
|
2981
|
-
const e = t || [], o = e == null ? void 0 : e.findIndex((r) => r.id === n);
|
|
2982
|
-
return o > -1 && e[o].children && e[o].children.length > 0 ? e[o].expanded === !0 : !1;
|
|
2983
|
-
}
|
|
2984
|
-
function so(n, t, e) {
|
|
2985
|
-
function o(y) {
|
|
2986
|
-
return !1;
|
|
2987
|
-
}
|
|
2988
|
-
function r() {
|
|
2989
|
-
return !1;
|
|
2990
|
-
}
|
|
2991
|
-
function i() {
|
|
2992
|
-
return !1;
|
|
2993
|
-
}
|
|
2994
|
-
function s() {
|
|
2995
|
-
return !1;
|
|
2996
|
-
}
|
|
2997
|
-
function c() {
|
|
2998
|
-
return e.toolbarContext.schema.buttons || [];
|
|
2999
|
-
}
|
|
3000
|
-
function l(y, a = "") {
|
|
3001
|
-
setTimeout(() => {
|
|
3002
|
-
var P, B;
|
|
3003
|
-
const x = (P = n.parent) == null ? void 0 : P.designerItemElementRef.value;
|
|
3004
|
-
let E;
|
|
3005
|
-
a && (E = x == null ? void 0 : x.querySelector("#" + a));
|
|
3006
|
-
const v = (B = E || x) == null ? void 0 : B.querySelector("#" + y);
|
|
3007
|
-
v == null || v.click();
|
|
3008
|
-
}, 0);
|
|
3009
|
-
}
|
|
3010
|
-
function u(y, a) {
|
|
3011
|
-
a.disabled && a.disabled.expressionId && (a.disabled.expressionId = `${a.id}_disabled`), a.visible && a.visible.expressionId && (a.visible.expressionId = `${a.id}_visible`);
|
|
3012
|
-
const x = t.formSchemaUtils.getExpressions(), E = x.find((P) => P.target === y.id);
|
|
3013
|
-
if (!E || !E.rules || !E.rules.length)
|
|
3014
|
-
return;
|
|
3015
|
-
const v = {
|
|
3016
|
-
target: a.id,
|
|
3017
|
-
rules: [],
|
|
3018
|
-
targetType: "Button"
|
|
3019
|
-
};
|
|
3020
|
-
E.rules.forEach((P) => {
|
|
3021
|
-
const B = Object.assign(me(P), {
|
|
3022
|
-
id: `${a.id}_${P.type}`
|
|
3023
|
-
});
|
|
3024
|
-
v.rules.push(B);
|
|
3025
|
-
}), x.push(v);
|
|
3026
|
-
}
|
|
3027
|
-
function g() {
|
|
3028
|
-
const y = n.schema, a = Object.assign(
|
|
3029
|
-
me(y),
|
|
3030
|
-
{
|
|
3031
|
-
id: `${n.schema.type}-cloned-${Math.random().toString(36).slice(2, 6)}`,
|
|
3032
|
-
onClick: null
|
|
3033
|
-
}
|
|
3034
|
-
);
|
|
3035
|
-
let x = [];
|
|
3036
|
-
return a.children && a.children.length && (x = a.children.map((E) => {
|
|
3037
|
-
const v = me(E);
|
|
3038
|
-
return Object.assign(
|
|
3039
|
-
v,
|
|
3040
|
-
{
|
|
3041
|
-
id: `${n.schema.type}-cloned-${Math.random().toString(36).slice(2, 6)}`,
|
|
3042
|
-
onClick: null
|
|
3043
|
-
}
|
|
3044
|
-
), u(E, v), v;
|
|
3045
|
-
}), a.children = x), u(y, a), a;
|
|
3046
|
-
}
|
|
3047
|
-
function d() {
|
|
3048
|
-
const y = n.schema.type || "response-toolbar-item", a = $e(y), x = y.toLowerCase().replace("-", "_");
|
|
3049
|
-
return a && !a.id && a.type === y && (a.id = `${x}_${Math.random().toString().slice(2, 6)}`, a.text = "按钮"), a;
|
|
3050
|
-
}
|
|
3051
|
-
function p(y) {
|
|
3052
|
-
const a = c(), x = a == null ? void 0 : a.findIndex((v) => v.id === y), E = x === -1 ? null : a[x];
|
|
3053
|
-
return { index: x, toolbarItem: E };
|
|
3054
|
-
}
|
|
3055
|
-
function f() {
|
|
3056
|
-
const y = n.schema.id, a = c();
|
|
3057
|
-
return Ae(y, a);
|
|
3058
|
-
}
|
|
3059
|
-
function m(y) {
|
|
3060
|
-
const a = t.formSchemaUtils.getExpressions();
|
|
3061
|
-
if (!a || !a.length)
|
|
3062
|
-
return;
|
|
3063
|
-
const x = (E) => {
|
|
3064
|
-
const v = a && a.findIndex((P) => P.target === E.id);
|
|
3065
|
-
v > -1 && a.splice(v, 1);
|
|
3066
|
-
};
|
|
3067
|
-
x(y), y.children && y.children.length && y.children.forEach((E) => {
|
|
3068
|
-
x(E);
|
|
3069
|
-
});
|
|
3070
|
-
}
|
|
3071
|
-
function S(y) {
|
|
3072
|
-
e.changeSelectedId(y);
|
|
3073
|
-
}
|
|
3074
|
-
function N() {
|
|
3075
|
-
var E, v;
|
|
3076
|
-
const y = c(), { parentIndex: a, itemIndex: x } = tt(n.schema.id, y);
|
|
3077
|
-
a === -1 || x === -1 || (m(n.schema), y[a].children.splice(x, 1), e.updateToolbarItems(), (E = n.setupContext) == null || E.emit("removeComponent"), (v = n.setupContext) == null || v.emit("selectionChange"));
|
|
3078
|
-
}
|
|
3079
|
-
function _() {
|
|
3080
|
-
var E, v;
|
|
3081
|
-
const y = n.schema.id, a = c(), x = a == null ? void 0 : a.findIndex((P) => P.id === y);
|
|
3082
|
-
x !== -1 && (m(a[x]), a == null || a.splice(x, 1), e.updateToolbarItems(), (E = n.setupContext) == null || E.emit("removeComponent"), (v = n.setupContext) == null || v.emit("selectionChange"), st.value++);
|
|
3083
|
-
}
|
|
3084
|
-
function M(y = "Append") {
|
|
3085
|
-
var B;
|
|
3086
|
-
const a = c(), { parentIndex: x, itemIndex: E } = tt(n.schema.id, a);
|
|
3087
|
-
if (x === -1 || E === -1)
|
|
3088
|
-
return;
|
|
3089
|
-
const v = d(), P = y === "Copy" ? g() : Object.assign({}, v);
|
|
3090
|
-
a[x].children.splice(E + 1, 0, P), e.updateToolbarItems(), S(P.id), (B = n.setupContext) == null || B.emit("addComponent");
|
|
3091
|
-
}
|
|
3092
|
-
function C(y, a) {
|
|
3093
|
-
const { index: x } = p(a);
|
|
3094
|
-
if (x === -1)
|
|
3095
|
-
return { index: x, schema: null };
|
|
3096
|
-
const E = d(), v = y === "Copy" ? g() : Object.assign({}, E);
|
|
3097
|
-
return { index: x, schema: v };
|
|
3098
|
-
}
|
|
3099
|
-
function b() {
|
|
3100
|
-
var E;
|
|
3101
|
-
const y = n.schema.id, { index: a, schema: x } = C("Copy", y);
|
|
3102
|
-
x && (c().splice(a + 1, 0, x), e.updateToolbarItems(), l(x.id), (E = n.setupContext) == null || E.emit("addComponent"));
|
|
3103
|
-
}
|
|
3104
|
-
function w() {
|
|
3105
|
-
var E;
|
|
3106
|
-
const y = n.schema.id, { index: a, schema: x } = C("Append", y);
|
|
3107
|
-
if (x && n.parent) {
|
|
3108
|
-
const P = c()[a].children || [];
|
|
3109
|
-
P.push(x);
|
|
3110
|
-
const B = c();
|
|
3111
|
-
B[a].children = P, e.updateToolbarItems(), S(x.id), (E = n.setupContext) == null || E.emit("addComponent");
|
|
3112
|
-
}
|
|
3113
|
-
}
|
|
3114
|
-
function k(y) {
|
|
3115
|
-
let a;
|
|
3116
|
-
switch (n.schema.type) {
|
|
3117
|
-
case "tab-toolbar-item":
|
|
3118
|
-
a = new zt(y, t);
|
|
3119
|
-
break;
|
|
3120
|
-
default:
|
|
3121
|
-
a = new ro(y, t, n.schema.type);
|
|
3122
|
-
}
|
|
3123
|
-
return a.getPropertyConfig(n.schema, f());
|
|
3124
|
-
}
|
|
3125
|
-
function A(y) {
|
|
3126
|
-
y.stopPropagation(), y.stopImmediatePropagation();
|
|
3127
|
-
}
|
|
3128
|
-
function T() {
|
|
3129
|
-
const y = [{
|
|
3130
|
-
id: "delete",
|
|
3131
|
-
title: "删除",
|
|
3132
|
-
text: "",
|
|
3133
|
-
icon: "f-icon-yxs_delete",
|
|
3134
|
-
onClick: (a) => {
|
|
3135
|
-
A(a), f() ? N() : _();
|
|
3136
|
-
}
|
|
3137
|
-
}, {
|
|
3138
|
-
id: "copy",
|
|
3139
|
-
title: "复制",
|
|
3140
|
-
icon: "f-icon-yxs_copy",
|
|
3141
|
-
onClick: (a) => {
|
|
3142
|
-
A(a);
|
|
3143
|
-
const { activeElement: x } = document, E = x ? x.tagName.toLowerCase() : "";
|
|
3144
|
-
E && E === "input" || E === "textarea" ? (x == null || x.blur(), Ne(() => {
|
|
3145
|
-
f() ? M("Copy") : b();
|
|
3146
|
-
})) : f() ? M("Copy") : b();
|
|
3147
|
-
}
|
|
3148
|
-
}];
|
|
3149
|
-
return y.push(f() ? {
|
|
3150
|
-
id: "appendSiblingButton",
|
|
3151
|
-
title: "",
|
|
3152
|
-
text: "新增同级",
|
|
3153
|
-
icon: "f-icon-plus-circle",
|
|
3154
|
-
onClick: (a) => {
|
|
3155
|
-
A(a), M();
|
|
3156
|
-
}
|
|
3157
|
-
} : {
|
|
3158
|
-
id: "appendChildButton",
|
|
3159
|
-
title: "",
|
|
3160
|
-
text: "新增子级",
|
|
3161
|
-
icon: "f-icon-plus-circle",
|
|
3162
|
-
onClick: (a) => {
|
|
3163
|
-
A(a), w();
|
|
3164
|
-
}
|
|
3165
|
-
}), y;
|
|
3166
|
-
}
|
|
3167
|
-
function $() {
|
|
3168
|
-
const { schema: y } = n;
|
|
3169
|
-
m(y);
|
|
3170
|
-
}
|
|
3171
|
-
return {
|
|
3172
|
-
canAccepts: o,
|
|
3173
|
-
checkCanMoveComponent: r,
|
|
3174
|
-
checkCanDeleteComponent: i,
|
|
3175
|
-
checkCanAddComponent: s,
|
|
3176
|
-
getPropsConfig: k,
|
|
3177
|
-
getCustomButtons: T,
|
|
3178
|
-
onRemoveComponent: $
|
|
3179
|
-
};
|
|
3180
|
-
}
|
|
3181
|
-
const ao = /* @__PURE__ */ ge({
|
|
3182
|
-
name: "FResponseToolbarItemDesign",
|
|
3183
|
-
props: pt,
|
|
3184
|
-
emits: ["Click", "dropdown", "clearAll"],
|
|
3185
|
-
setup(n, t) {
|
|
3186
|
-
const e = q(n.alignment), o = gt(), r = q(), i = ie("designer-host-service"), s = ie("design-item-context"), c = ie("toolbar-item-action"), l = so(s, i, c), u = Wt(r, s, l);
|
|
3187
|
-
be(() => {
|
|
3188
|
-
r.value.componentInstance = u;
|
|
3189
|
-
}), t.expose(u.value);
|
|
3190
|
-
function g() {
|
|
3191
|
-
const b = {
|
|
3192
|
-
"f-icon": !0
|
|
3193
|
-
}, w = n.icon ? n.icon.trim() : "";
|
|
3194
|
-
return pe(b, w);
|
|
3195
|
-
}
|
|
3196
|
-
function d() {
|
|
3197
|
-
return !!(n.icon && n.icon.trim());
|
|
3198
|
-
}
|
|
3199
|
-
const p = Q(() => {
|
|
3200
|
-
const b = {
|
|
3201
|
-
btn: !0,
|
|
3202
|
-
"f-rt-btn": !0,
|
|
3203
|
-
"f-btn-ml": !n.isDP && (e.value === "right" || e.value === "center"),
|
|
3204
|
-
"f-btn-mr": !n.isDP && e.value === "left",
|
|
3205
|
-
"btn-icontext": !!(n.icon && n.icon.trim()),
|
|
3206
|
-
disabled: n.disabled === !0,
|
|
3207
|
-
"no-drag": !0,
|
|
3208
|
-
"text-truncate": !0
|
|
3209
|
-
// 'f-rt-toggle':props.isDP&&!props.split
|
|
3210
|
-
};
|
|
3211
|
-
return pe(b, n.class);
|
|
3212
|
-
}), f = Q(() => n.split ? {
|
|
3213
|
-
display: "flex",
|
|
3214
|
-
"align-items": "center"
|
|
3215
|
-
} : {
|
|
3216
|
-
display: "flex",
|
|
3217
|
-
"align-items": "center",
|
|
3218
|
-
"border-radius": "6px",
|
|
3219
|
-
"padding-right": "0.1rem",
|
|
3220
|
-
"border-top-right-radius": "6px",
|
|
3221
|
-
"border-bottom-right-radius": "6px"
|
|
3222
|
-
}), m = Q(() => {
|
|
3223
|
-
const b = {
|
|
3224
|
-
btn: !0,
|
|
3225
|
-
"dropdown-toggle": !0,
|
|
3226
|
-
"f-btn-mr": e.value === "left",
|
|
3227
|
-
"dropdown-toggle-split": !0,
|
|
3228
|
-
"no-drag": !0
|
|
3229
|
-
};
|
|
3230
|
-
return pe(b, n.class);
|
|
3231
|
-
}), S = Q(() => {
|
|
3232
|
-
let b = {
|
|
3233
|
-
btn: !n.isDPItem,
|
|
3234
|
-
// 不是下拉按钮,不是下拉项
|
|
3235
|
-
disabled: n.disabled === !0,
|
|
3236
|
-
"dropdown-item": n.isDPItem,
|
|
3237
|
-
"f-rt-btn": !0,
|
|
3238
|
-
"text-truncate": !0,
|
|
3239
|
-
"btn-icontext": !n.isDPItem && !!(n.icon && n.icon.trim()),
|
|
3240
|
-
"dropdown-item-icontext": n.isDPItem && !!(n.icon && n.icon.trim()),
|
|
3241
|
-
// 保证内部层级不被拖拽
|
|
3242
|
-
"no-drag": !0
|
|
3243
|
-
};
|
|
3244
|
-
return n.isDPItem || (b = pe(b, n.class || "")), n.isDP && (b = pe(b, n.dropdownClass || "")), b;
|
|
3245
|
-
});
|
|
3246
|
-
function N(b, w) {
|
|
3247
|
-
w && w.stopPropagation(), t.emit(b, {
|
|
3248
|
-
id: n.id,
|
|
3249
|
-
isDP: n.isDP
|
|
3250
|
-
});
|
|
3251
|
-
}
|
|
3252
|
-
function _() {
|
|
3253
|
-
return {
|
|
3254
|
-
"btn-group": !0,
|
|
3255
|
-
"no-drag": !0,
|
|
3256
|
-
"f-rt-dropdown": !0,
|
|
3257
|
-
"f-btn-ml": e.value === "right" || e.value === "center",
|
|
3258
|
-
"f-btn-mr": e.value === "left"
|
|
3259
|
-
};
|
|
3260
|
-
}
|
|
3261
|
-
function M() {
|
|
3262
|
-
return V("div", {
|
|
3263
|
-
ref: r,
|
|
3264
|
-
"data-dragref": `${s.schema.id}-container`,
|
|
3265
|
-
class: "farris-component position-relative",
|
|
3266
|
-
style: "display:inline-block!important;"
|
|
3267
|
-
}, [V("div", {
|
|
3268
|
-
class: _(),
|
|
3269
|
-
id: n.id
|
|
3270
|
-
}, [V("div", {
|
|
3271
|
-
class: p.value,
|
|
3272
|
-
style: f.value,
|
|
3273
|
-
onClick: () => N("clearAll")
|
|
3274
|
-
}, [o.shouldShowIcon(n) && V("i", {
|
|
3275
|
-
class: o.iconClass(n)
|
|
3276
|
-
}, null), V("span", null, [n.text]), !n.split && V("span", {
|
|
3277
|
-
class: "f-icon f-icon-arrow-chevron-down",
|
|
3278
|
-
style: "margin:0 0.5rem 0 0.25rem;",
|
|
3279
|
-
onClick: (b) => N("dropdown", b)
|
|
3280
|
-
}, null)]), n.split && V("button", {
|
|
3281
|
-
class: m.value,
|
|
3282
|
-
style: "border-radius:0 6px 6px 0;",
|
|
3283
|
-
onClick: (b) => N("dropdown", b)
|
|
3284
|
-
}, null), c.renderDropdownMenu(n.item, n.item)])]);
|
|
3285
|
-
}
|
|
3286
|
-
function C() {
|
|
3287
|
-
return V("li", {
|
|
3288
|
-
ref: r,
|
|
3289
|
-
"data-dragref": `${s.schema.id}-container`,
|
|
3290
|
-
id: n.id,
|
|
3291
|
-
class: S.value
|
|
3292
|
-
}, [o.shouldShowIcon(n) && V("i", {
|
|
3293
|
-
class: o.iconClass(n)
|
|
3294
|
-
}, null), n.text]);
|
|
3295
|
-
}
|
|
3296
|
-
return () => n.isDP ? M() : n.isDPItem ? C() : V("div", {
|
|
3297
|
-
ref: r,
|
|
3298
|
-
"data-dragref": `${s.schema.id}-container`,
|
|
3299
|
-
class: "farris-component position-relative",
|
|
3300
|
-
style: "display:inline-block!important;"
|
|
3301
|
-
}, [V("button", {
|
|
3302
|
-
type: "button",
|
|
3303
|
-
class: p.value,
|
|
3304
|
-
id: n.id,
|
|
3305
|
-
onClick: () => N("clearAll")
|
|
3306
|
-
}, [d() && V("i", {
|
|
3307
|
-
class: g()
|
|
3308
|
-
}, null), n.text])]);
|
|
3309
|
-
}
|
|
3310
|
-
});
|
|
3311
|
-
function lo(n, t, e, o) {
|
|
3312
|
-
function r(p, f, m, S) {
|
|
3313
|
-
o.changeSelectedId((f == null ? void 0 : f.id) || ""), e && e.setupContext && e.setupContext.emit("selectionChange", p, f, m, S);
|
|
3314
|
-
}
|
|
3315
|
-
function i() {
|
|
3316
|
-
}
|
|
3317
|
-
function s(p) {
|
|
3318
|
-
const f = p.expanded;
|
|
3319
|
-
o.clearAllDropdown(), o.toggleDropdownMenu(p, !f);
|
|
3320
|
-
}
|
|
3321
|
-
function c(p) {
|
|
3322
|
-
o.clearAllDropdown(p.isDP ? p.id : "");
|
|
3323
|
-
}
|
|
3324
|
-
function l(p, f = "") {
|
|
3325
|
-
const m = n.items || [], S = f || p, N = m.find((_) => _.id === S);
|
|
3326
|
-
return f ? N.children.find((_) => _.id === p) : N;
|
|
3327
|
-
}
|
|
3328
|
-
function u(p, f = !1) {
|
|
3329
|
-
if (!f)
|
|
3330
|
-
return;
|
|
3331
|
-
const m = p.target;
|
|
3332
|
-
m != null && m.classList.contains("dgComponentFocused") && (m == null || m.classList.add("dgComponentSelected"));
|
|
3333
|
-
}
|
|
3334
|
-
function g(p, f = !1) {
|
|
3335
|
-
if (!f)
|
|
3336
|
-
return;
|
|
3337
|
-
const m = p.target;
|
|
3338
|
-
m != null && m.classList.contains("dgComponentFocused") && (m == null || m.classList.remove("dgComponentSelected"));
|
|
3339
|
-
}
|
|
3340
|
-
function d(p, f, m = !1) {
|
|
3341
|
-
const S = l(p.id, p.parent), N = q(S);
|
|
3342
|
-
return V(ht, {
|
|
3343
|
-
key: S.id,
|
|
3344
|
-
class: ["p-0", m ? "d-block no-drag" : "d-inline-block"],
|
|
3345
|
-
modelValue: N.value,
|
|
3346
|
-
"onUpdate:modelValue": (_) => N.value = _,
|
|
3347
|
-
canMove: !1,
|
|
3348
|
-
childType: "response-toolbar-item",
|
|
3349
|
-
childLabel: "按钮",
|
|
3350
|
-
contentKey: "buttons",
|
|
3351
|
-
componentId: n.componentId,
|
|
3352
|
-
id: S.id,
|
|
3353
|
-
onSelectionChange: r,
|
|
3354
|
-
onRemoveComponent: i,
|
|
3355
|
-
onMouseenter: (_) => u(_, m),
|
|
3356
|
-
onMouseleave: (_) => g(_, m)
|
|
3357
|
-
}, {
|
|
3358
|
-
default: () => {
|
|
3359
|
-
var _;
|
|
3360
|
-
return [V(ao, {
|
|
3361
|
-
id: S.id,
|
|
3362
|
-
disabled: S.disabled,
|
|
3363
|
-
text: S.text,
|
|
3364
|
-
icon: S.icon,
|
|
3365
|
-
isDP: p.isDP,
|
|
3366
|
-
item: p,
|
|
3367
|
-
split: S.split,
|
|
3368
|
-
isDPItem: p.isDPItem,
|
|
3369
|
-
class: ((_ = p.appearance) == null ? void 0 : _.class) || "btn-secondary",
|
|
3370
|
-
alignment: n.alignment || "right",
|
|
3371
|
-
onDropdown: () => s(p),
|
|
3372
|
-
onClearAll: (M) => c(M),
|
|
3373
|
-
componentId: n.componentId
|
|
3374
|
-
}, null)];
|
|
3375
|
-
}
|
|
3376
|
-
});
|
|
3377
|
-
}
|
|
3378
|
-
return {
|
|
3379
|
-
renderToolbarItemDesigner: d,
|
|
3380
|
-
actionHandlers: o
|
|
3381
|
-
};
|
|
3382
|
-
}
|
|
3383
|
-
function Ve(n, t = !1, e = "") {
|
|
3384
|
-
const o = [];
|
|
3385
|
-
return n.reduce((r, i) => {
|
|
3386
|
-
if (i.children && i.children.length > 0) {
|
|
3387
|
-
const s = Ve(i.children, !0, i.id);
|
|
3388
|
-
r.push(Object.assign({}, i, {
|
|
3389
|
-
children: s,
|
|
3390
|
-
isDPItem: !1,
|
|
3391
|
-
isDP: !0,
|
|
3392
|
-
parent: "",
|
|
3393
|
-
expanded: !1
|
|
3394
|
-
}));
|
|
3395
|
-
} else
|
|
3396
|
-
r.push(Object.assign({}, i, {
|
|
3397
|
-
isDPItem: t,
|
|
3398
|
-
isDP: !1,
|
|
3399
|
-
parent: e
|
|
3400
|
-
}));
|
|
3401
|
-
return r;
|
|
3402
|
-
}, o), o;
|
|
3403
|
-
}
|
|
3404
|
-
const co = /* @__PURE__ */ ge({
|
|
3405
|
-
name: "FResponseToolbarDesign",
|
|
3406
|
-
props: Yn,
|
|
3407
|
-
emits: ["Click"],
|
|
3408
|
-
setup(n, t) {
|
|
3409
|
-
const e = q(Ve(n.items)), o = q(), r = q(), i = q(), s = q("");
|
|
3410
|
-
let c = 0;
|
|
3411
|
-
const l = 15, u = ie("designer-host-service"), g = ie("design-item-context"), d = {
|
|
3412
|
-
clearAllDropdown: (F) => {
|
|
3413
|
-
},
|
|
3414
|
-
toggleDropdownMenu: (F) => {
|
|
3415
|
-
},
|
|
3416
|
-
updateToolbarItems: () => {
|
|
3417
|
-
},
|
|
3418
|
-
changeSelectedId: (F) => {
|
|
3419
|
-
s.value = F;
|
|
3420
|
-
},
|
|
3421
|
-
renderDropdownMenu: (F, L) => {
|
|
3422
|
-
},
|
|
3423
|
-
toolbarContext: g,
|
|
3424
|
-
changeMenuPosition: (F, L, z) => ({}),
|
|
3425
|
-
toolbarPosition: ""
|
|
3426
|
-
}, p = Jn(g, u, d), f = Ht(i, g, p), m = ie("toolbar-item-handler"), {
|
|
3427
|
-
initDragula: S,
|
|
3428
|
-
dragulaInstance: N
|
|
3429
|
-
} = eo(g), _ = gt(), M = lo(n, r, g, d), C = to(_, e, M), {
|
|
3430
|
-
renderToolbarItemDesigner: b
|
|
3431
|
-
} = M, {
|
|
3432
|
-
clearAllDropDownMenu: w,
|
|
3433
|
-
renderDropdownMenu: k,
|
|
3434
|
-
setResponseToolbarRef: A
|
|
3435
|
-
} = C;
|
|
3436
|
-
ot("toolbar-item-action", d), d.renderDropdownMenu = k, A(i), m && (m.changeSelectedId = function(F) {
|
|
3437
|
-
s.value = F;
|
|
3438
|
-
});
|
|
3439
|
-
function T() {
|
|
3440
|
-
const F = r.value.querySelector(".dgComponentSelected");
|
|
3441
|
-
F && Gt(F);
|
|
3442
|
-
}
|
|
3443
|
-
function $() {
|
|
3444
|
-
if (s.value)
|
|
3445
|
-
if (Ae(s.value, e.value)) {
|
|
3446
|
-
const {
|
|
3447
|
-
parent: F,
|
|
3448
|
-
item: L
|
|
3449
|
-
} = nt(s.value, e.value);
|
|
3450
|
-
F && (d.toggleDropdownMenu(F, !0), setTimeout(() => {
|
|
3451
|
-
var X;
|
|
3452
|
-
const z = i.value.querySelector("#" + F.id), G = z == null ? void 0 : z.querySelector("#" + L.id);
|
|
3453
|
-
(((X = G == null ? void 0 : G.parentElement) == null ? void 0 : X.className) || "").indexOf("dgComponentFocused") < 0 && (G == null || G.click());
|
|
3454
|
-
}, 0));
|
|
3455
|
-
} else
|
|
3456
|
-
T();
|
|
3457
|
-
}
|
|
3458
|
-
function y(F = "") {
|
|
3459
|
-
e.value.filter((L) => L.id !== F && L.children && L.children.length > 0).forEach((L) => {
|
|
3460
|
-
L.expanded = !1;
|
|
3461
|
-
}), w(F);
|
|
3462
|
-
}
|
|
3463
|
-
d.clearAllDropdown = y;
|
|
3464
|
-
function a() {
|
|
3465
|
-
m && m.updateToolbarItems && m.updateToolbarItems();
|
|
3466
|
-
}
|
|
3467
|
-
d.updateToolbarItems = a;
|
|
3468
|
-
function x(F) {
|
|
3469
|
-
if (F) {
|
|
3470
|
-
const L = i.value.querySelector("#" + F.id), z = L.querySelector("#" + F.id + "_menu"), G = d.changeMenuPosition(F, L);
|
|
3471
|
-
Object.keys(G).forEach((X) => {
|
|
3472
|
-
z.style[X] = G[X];
|
|
3473
|
-
});
|
|
3474
|
-
}
|
|
3475
|
-
}
|
|
3476
|
-
function E() {
|
|
3477
|
-
const z = r.value.clientWidth, G = r.value.querySelectorAll(".farris-component>.f-rt-btn");
|
|
3478
|
-
G && G.forEach((j) => {
|
|
3479
|
-
j.style.maxWidth = z - 12 + "px";
|
|
3480
|
-
});
|
|
3481
|
-
const X = r.value.querySelectorAll(".farris-component>.f-rt-dropdown");
|
|
3482
|
-
X && X.forEach((j) => {
|
|
3483
|
-
j.querySelector(".dropdown-toggle-split") ? j.querySelector(".f-rt-btn").style.maxWidth = z - 38 + "px" : j.style.maxWidth = z - 12 + "px";
|
|
3484
|
-
});
|
|
3485
|
-
}
|
|
3486
|
-
const v = new ResizeObserver((F) => {
|
|
3487
|
-
var L;
|
|
3488
|
-
if (F.length) {
|
|
3489
|
-
const G = F[0].contentRect.width;
|
|
3490
|
-
if (G === 0) {
|
|
3491
|
-
c = 0;
|
|
3492
|
-
return;
|
|
3493
|
-
}
|
|
3494
|
-
if (Math.abs(G - c) > l) {
|
|
3495
|
-
if (c = G, Ae(s.value, e.value)) {
|
|
3496
|
-
const {
|
|
3497
|
-
parent: X,
|
|
3498
|
-
item: j
|
|
3499
|
-
} = nt(s.value, e.value);
|
|
3500
|
-
x(X);
|
|
3501
|
-
} else if (io(s.value, e.value)) {
|
|
3502
|
-
const X = (L = e.value) == null ? void 0 : L.find((j) => j.id === s.value);
|
|
3503
|
-
x(X);
|
|
3504
|
-
} else
|
|
3505
|
-
y();
|
|
3506
|
-
E();
|
|
3507
|
-
}
|
|
3508
|
-
}
|
|
3509
|
-
});
|
|
3510
|
-
be(() => {
|
|
3511
|
-
v.observe(i.value), c = i.value.clientWidth, i.value.componentInstance = f, S(r.value, o.value, a);
|
|
3512
|
-
}), Lt(() => {
|
|
3513
|
-
v.disconnect(), N && N.destroy && N.destroy();
|
|
3514
|
-
}), t.expose(f.value);
|
|
3515
|
-
const P = Q(() => {
|
|
3516
|
-
const F = {
|
|
3517
|
-
"f-toolbar": !0,
|
|
3518
|
-
"f-response-toolbar": !0,
|
|
3519
|
-
"position-relative": !0,
|
|
3520
|
-
"f-response-toolbar-sm": n.buttonSize === "sm",
|
|
3521
|
-
"f-response-toolbar-lg": n.buttonSize === "lg"
|
|
3522
|
-
};
|
|
3523
|
-
return pe(F, n.customClass);
|
|
3524
|
-
}), B = Q(() => ({
|
|
3525
|
-
"text-left": n.alignment === "left",
|
|
3526
|
-
"text-right": n.alignment === "right",
|
|
3527
|
-
"justify-content-end": n.alignment === "right",
|
|
3528
|
-
"justify-content-start": n.alignment === "left",
|
|
3529
|
-
"justify-content-center": n.alignment === "center",
|
|
3530
|
-
"no-drag": !0,
|
|
3531
|
-
"w-100": !0
|
|
3532
|
-
}));
|
|
3533
|
-
ye(() => n.items, () => {
|
|
3534
|
-
e.value = Ve(n.items), Ne(() => {
|
|
3535
|
-
$(), E();
|
|
3536
|
-
});
|
|
3537
|
-
}, {
|
|
3538
|
-
deep: !0
|
|
3539
|
-
});
|
|
3540
|
-
function H(F) {
|
|
3541
|
-
F && (F.stopPropagation(), F.preventDefault());
|
|
3542
|
-
const {
|
|
3543
|
-
schema: L
|
|
3544
|
-
} = g;
|
|
3545
|
-
L.buttons || (L.buttons = []);
|
|
3546
|
-
const z = $e("response-toolbar-item");
|
|
3547
|
-
z.id = `toolbar_item_${Math.random().toString().slice(2, 6)}`, z.appearance = {
|
|
3548
|
-
class: "btn btn-secondary"
|
|
3549
|
-
}, L.buttons.push(z);
|
|
3550
|
-
}
|
|
3551
|
-
function oe() {
|
|
3552
|
-
return V("li", {
|
|
3553
|
-
style: "border-width: 1px;border-style: dashed;display: inline-block;padding: 0 8px;line-height: 24px; border-radius: 3px; cursor: default;color: #B4BCCC;",
|
|
3554
|
-
onClick: H
|
|
3555
|
-
}, [V("span", {
|
|
3556
|
-
class: "f-icon f-icon-amplification mr-1",
|
|
3557
|
-
style: "font-size: 12px;"
|
|
3558
|
-
}, null), V("span", {
|
|
3559
|
-
class: "farris-tag-add-text"
|
|
3560
|
-
}, [ve("添加按钮")])]);
|
|
3561
|
-
}
|
|
3562
|
-
function K() {
|
|
3563
|
-
return e.value.map((F, L) => b(F, L));
|
|
3564
|
-
}
|
|
3565
|
-
return () => {
|
|
3566
|
-
var F;
|
|
3567
|
-
return V("div", {
|
|
3568
|
-
ref: i,
|
|
3569
|
-
"data-dragref": `${g.schema.id}-container`,
|
|
3570
|
-
class: P.value,
|
|
3571
|
-
id: n.id
|
|
3572
|
-
}, [V("div", {
|
|
3573
|
-
ref: o,
|
|
3574
|
-
class: B.value,
|
|
3575
|
-
onClick: (L) => y(L)
|
|
3576
|
-
}, [V("div", {
|
|
3577
|
-
ref: r,
|
|
3578
|
-
class: "d-block f-response-content"
|
|
3579
|
-
}, [(F = e.value) != null && F.length ? K() : oe()])])]);
|
|
3580
|
-
};
|
|
3581
|
-
}
|
|
3582
|
-
}), uo = /* @__PURE__ */ ge({
|
|
1547
|
+
return () => y("div", {
|
|
1548
|
+
id: `${i.id}-design-item`,
|
|
1549
|
+
ref: c,
|
|
1550
|
+
class: k.value,
|
|
1551
|
+
style: D.value,
|
|
1552
|
+
onClick: O
|
|
1553
|
+
}, [p(a.value), e.slots.default && e.slots.default()]);
|
|
1554
|
+
}
|
|
1555
|
+
}), Xe = /* @__PURE__ */ W({
|
|
3583
1556
|
name: "FPageHeaderDesign",
|
|
3584
|
-
props:
|
|
1557
|
+
props: Ae,
|
|
3585
1558
|
emits: ["click"],
|
|
3586
|
-
setup(
|
|
3587
|
-
const
|
|
1559
|
+
setup(i, e) {
|
|
1560
|
+
const t = S(), n = $("designer-host-service"), o = $("design-item-context"), r = Ge(o.schema, n), s = Fe(t, o, r), u = S(o.schema.toolbar || {
|
|
3588
1561
|
type: "response-toolbar",
|
|
3589
1562
|
buttons: []
|
|
3590
|
-
}), l =
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
}),
|
|
3594
|
-
|
|
1563
|
+
}), l = S(Y(u.value));
|
|
1564
|
+
K(() => {
|
|
1565
|
+
t.value.componentInstance = s;
|
|
1566
|
+
}), j(() => o.schema.toolbar, () => {
|
|
1567
|
+
u.value = o.schema.toolbar || {
|
|
3595
1568
|
type: "response-toolbar",
|
|
3596
1569
|
buttons: []
|
|
3597
|
-
}, l.value =
|
|
1570
|
+
}, l.value = Y(u.value);
|
|
3598
1571
|
}, {
|
|
3599
1572
|
deep: !0
|
|
3600
1573
|
});
|
|
3601
|
-
const
|
|
3602
|
-
function
|
|
3603
|
-
|
|
1574
|
+
const a = T(() => [...l.value.items]);
|
|
1575
|
+
function d(v, k, D, N) {
|
|
1576
|
+
o && o.setupContext && o.setupContext.emit("selectionChange", v, k, D, N);
|
|
3604
1577
|
}
|
|
3605
|
-
|
|
3606
|
-
function
|
|
3607
|
-
|
|
1578
|
+
e.expose(s.value);
|
|
1579
|
+
function c(v, k) {
|
|
1580
|
+
v && k && k.split(" ").reduce((N, h) => (N[h] = !0, N), v);
|
|
3608
1581
|
}
|
|
3609
|
-
const
|
|
3610
|
-
const
|
|
1582
|
+
const m = T(() => {
|
|
1583
|
+
const v = {
|
|
3611
1584
|
"f-title-icon": !0
|
|
3612
1585
|
};
|
|
3613
|
-
return
|
|
3614
|
-
}), f =
|
|
3615
|
-
const
|
|
1586
|
+
return c(v, i.iconClass), v;
|
|
1587
|
+
}), f = T(() => {
|
|
1588
|
+
const v = {
|
|
3616
1589
|
"f-icon": !0
|
|
3617
1590
|
};
|
|
3618
|
-
return
|
|
3619
|
-
}),
|
|
3620
|
-
const
|
|
1591
|
+
return c(v, i.icon), v;
|
|
1592
|
+
}), b = T(() => {
|
|
1593
|
+
const v = {
|
|
3621
1594
|
"text-right": !0,
|
|
3622
1595
|
"col-6": !0
|
|
3623
1596
|
};
|
|
3624
|
-
return
|
|
1597
|
+
return c(v, i.buttonClass || ""), v;
|
|
3625
1598
|
});
|
|
3626
|
-
return () =>
|
|
3627
|
-
ref:
|
|
3628
|
-
}, [
|
|
1599
|
+
return () => y("div", {
|
|
1600
|
+
ref: t
|
|
1601
|
+
}, [y("nav", {
|
|
3629
1602
|
class: "f-page-header-base"
|
|
3630
|
-
}, [
|
|
1603
|
+
}, [y("div", {
|
|
3631
1604
|
class: "f-title"
|
|
3632
|
-
}, [
|
|
3633
|
-
class:
|
|
3634
|
-
}, [
|
|
1605
|
+
}, [i.showIcon && i.icon ? y("span", {
|
|
1606
|
+
class: m.value
|
|
1607
|
+
}, [y("i", {
|
|
3635
1608
|
class: f.value
|
|
3636
|
-
}, null)]) : "",
|
|
1609
|
+
}, null)]) : "", y("h4", {
|
|
3637
1610
|
class: "f-title-text"
|
|
3638
|
-
}, [
|
|
3639
|
-
class:
|
|
3640
|
-
modelValue:
|
|
3641
|
-
"onUpdate:modelValue": (
|
|
1611
|
+
}, [i.title])]), y(Qe, {
|
|
1612
|
+
class: b.value,
|
|
1613
|
+
modelValue: u.value,
|
|
1614
|
+
"onUpdate:modelValue": (v) => u.value = v,
|
|
3642
1615
|
canAdd: !1,
|
|
3643
1616
|
childType: "response-toolbar-item",
|
|
3644
1617
|
childLabel: "按钮",
|
|
3645
1618
|
contentKey: "buttons",
|
|
3646
|
-
id:
|
|
3647
|
-
componentId:
|
|
3648
|
-
onSelectionChange:
|
|
1619
|
+
id: u.value.id,
|
|
1620
|
+
componentId: i.componentId,
|
|
1621
|
+
onSelectionChange: d
|
|
3649
1622
|
}, {
|
|
3650
|
-
default: () => [
|
|
3651
|
-
id:
|
|
1623
|
+
default: () => [y(ue, {
|
|
1624
|
+
id: u.value.id,
|
|
3652
1625
|
customClass: "w-100",
|
|
3653
|
-
items:
|
|
3654
|
-
componentId:
|
|
1626
|
+
items: a.value,
|
|
1627
|
+
componentId: i.componentId
|
|
3655
1628
|
}, null)]
|
|
3656
1629
|
})])]);
|
|
3657
1630
|
}
|
|
3658
|
-
}),
|
|
3659
|
-
install(
|
|
3660
|
-
|
|
1631
|
+
}), nt = {
|
|
1632
|
+
install(i) {
|
|
1633
|
+
i.component(_.name, _);
|
|
3661
1634
|
},
|
|
3662
|
-
register(
|
|
3663
|
-
|
|
1635
|
+
register(i, e, t, n) {
|
|
1636
|
+
i["page-header"] = _, e["page-header"] = Z, n["page-header"] = { eventHandlerResolver: Ie };
|
|
3664
1637
|
},
|
|
3665
|
-
registerDesigner(
|
|
3666
|
-
|
|
1638
|
+
registerDesigner(i, e, t) {
|
|
1639
|
+
i["page-header"] = Xe, e["page-header"] = Z;
|
|
3667
1640
|
}
|
|
3668
1641
|
};
|
|
3669
1642
|
export {
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
|
|
3673
|
-
|
|
3674
|
-
|
|
3675
|
-
|
|
1643
|
+
_ as PageHeader,
|
|
1644
|
+
nt as default,
|
|
1645
|
+
Ie as eventHandlerResolver,
|
|
1646
|
+
Ae as pageHeaderDesignerProps,
|
|
1647
|
+
Q as pageHeaderProps,
|
|
1648
|
+
Z as propsResolver
|
|
3676
1649
|
};
|