epic-designer-gold 0.0.38 → 0.0.40
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/dist/{attributeView-CWoguTGM.cjs → attributeView-BjvAO4_R.cjs} +1 -1
- package/dist/{attributeView-CGtxobMF.js → attributeView-PbDEjn8T.js} +1 -1
- package/dist/form-2lbtG-zj.js +74 -0
- package/dist/form-BM53wx9g.cjs +1 -0
- package/dist/{index-DBRz4gi5.js → index-5datIIzJ.js} +1 -1
- package/dist/{index-DCoUYKRW.cjs → index-BUBtVoa0.cjs} +1 -1
- package/dist/{index-Bj6zKw82.js → index-BZQLip5V.js} +443 -440
- package/dist/{index-B7Uy532l.cjs → index-C2ioP4Qy.cjs} +1 -1
- package/dist/{index-BBNxCX9U.cjs → index-C3hWImRT.cjs} +1 -1
- package/dist/{index-DFP-9KaA.js → index-C95DVYrN.js} +1 -1
- package/dist/{index-wxDrmXkw.js → index-CE7JKdc3.js} +1 -1
- package/dist/index-Cpm-oLdy.js +4 -0
- package/dist/{index-F-tQsU_8.cjs → index-CzOycR7-.cjs} +1 -1
- package/dist/index-D3RJLUGU.cjs +10 -0
- package/dist/{index-Dan8DnTn.cjs → index-DHHX2mwy.cjs} +1 -1
- package/dist/{index-ChGNJr_v.cjs → index-DQjDcBV5.cjs} +1 -1
- package/dist/{index-DU0OYNvy.cjs → index-Da3mrdHZ.cjs} +1 -1
- package/dist/{index-CDzXkVHK.js → index-Da8OPaOM.js} +2 -2
- package/dist/{index-C7VY8nRX.js → index-DxkPriDk.js} +1 -1
- package/dist/{index-DWKirflC.js → index-l1DO3QH_.js} +1 -1
- package/dist/{index-9xlsE_Mf.cjs → index-l4brKgI9.cjs} +1 -1
- package/dist/{index-BALf0q8e.js → index-laQFS5Nd.js} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/sign-BS8owiJT.cjs +1 -0
- package/dist/sign-DZvUIxel.js +155 -0
- package/dist/style.css +1 -1
- package/dist/{styleView-BHaWjsLQ.js → styleView-LX_E7EFf.js} +1 -1
- package/dist/{styleView-BgoSZRkZ.cjs → styleView-oaDQbGne.cjs} +1 -1
- package/dist/ui/antd/index.cjs +2 -2
- package/dist/ui/antd/index.js +2 -2
- package/dist/ui/elementPlus/index.cjs +1 -1
- package/dist/ui/elementPlus/index.js +14 -14
- package/dist/ui/naiveUi/index.cjs +1 -1
- package/dist/ui/naiveUi/index.js +13 -13
- package/dist/{uploadImage-CYV7X1sG.js → uploadImage-tLXX1j6A.js} +12 -12
- package/package.json +1 -1
- package/dist/form-6cUK-Ari.js +0 -72
- package/dist/form-CthzLIgs.cjs +0 -1
- package/dist/index-9eiypGfJ.cjs +0 -10
- package/dist/index-By5d6rRB.js +0 -4
- package/dist/sign-BCmA2v-3.cjs +0 -1
- package/dist/sign-CSv8hClp.js +0 -149
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ref as
|
|
1
|
+
import { ref as P, reactive as j, defineComponent as ee, openBlock as k, createBlock as K, unref as R, mergeProps as pe, withCtx as $, renderSlot as T, getCurrentInstance as ae, inject as Q, watch as N, useAttrs as Pe, provide as L, shallowRef as Oe, computed as J, watchEffect as le, onUnmounted as Se, resolveComponent as Ve, resolveDynamicComponent as Fe, createTextVNode as Me, toDisplayString as Re, createVNode as H, createCommentVNode as De, useSlots as $e, createElementBlock as me, Suspense as Ae, createElementVNode as Z, Fragment as Ne, renderList as Be, nextTick as ne, effectScope as ke, isRef as Ue, getCurrentScope as Te, onScopeDispose as Le, onMounted as he, normalizeClass as ze, toRaw as ye } from "vue";
|
|
2
2
|
import { p as B, E as re, a as we, l as X } from "./axios-ITY6Uw7A.js";
|
|
3
3
|
function ie(e = 10) {
|
|
4
4
|
const r = "abcdefghijklmnopqrstuvwxyz0123456789";
|
|
@@ -9,25 +9,25 @@ function ie(e = 10) {
|
|
|
9
9
|
}
|
|
10
10
|
return o;
|
|
11
11
|
}
|
|
12
|
-
function
|
|
12
|
+
function Je(e) {
|
|
13
13
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function z(e, r = /* @__PURE__ */ new WeakMap()) {
|
|
16
16
|
if (typeof e != "object" || e === null)
|
|
17
17
|
return e;
|
|
18
18
|
if (r.has(e))
|
|
19
19
|
return r.get(e);
|
|
20
20
|
if (Array.isArray(e)) {
|
|
21
|
-
const t = e.map((n) =>
|
|
21
|
+
const t = e.map((n) => z(n, r));
|
|
22
22
|
return r.set(e, t), t;
|
|
23
23
|
}
|
|
24
24
|
const o = {};
|
|
25
25
|
return r.set(e, o), Object.keys(e).forEach((t) => {
|
|
26
|
-
o[t] =
|
|
26
|
+
o[t] = z(e[t], r);
|
|
27
27
|
}), o;
|
|
28
28
|
}
|
|
29
|
-
function
|
|
30
|
-
const [r] =
|
|
29
|
+
function Mt(e) {
|
|
30
|
+
const [r] = Ke([z(e)], (o) => {
|
|
31
31
|
var n, s;
|
|
32
32
|
const t = {
|
|
33
33
|
...o,
|
|
@@ -54,16 +54,16 @@ function Ee(e, r, o = [], t = /* @__PURE__ */ new WeakMap()) {
|
|
|
54
54
|
if (t.has(s))
|
|
55
55
|
return "[Circular]";
|
|
56
56
|
t.set(s, !0);
|
|
57
|
-
const l = Object.keys(s).sort(),
|
|
57
|
+
const l = Object.keys(s).sort(), u = {};
|
|
58
58
|
return l.forEach((f) => {
|
|
59
|
-
o.includes(f) || (
|
|
60
|
-
}), t.delete(s),
|
|
59
|
+
o.includes(f) || (u[f] = n(s[f]));
|
|
60
|
+
}), t.delete(s), u;
|
|
61
61
|
} else
|
|
62
62
|
return s;
|
|
63
63
|
};
|
|
64
64
|
return JSON.stringify(n(e)) === JSON.stringify(n(r));
|
|
65
65
|
}
|
|
66
|
-
function
|
|
66
|
+
function We(e, r) {
|
|
67
67
|
const o = [];
|
|
68
68
|
let t = !1;
|
|
69
69
|
function n(s) {
|
|
@@ -72,13 +72,13 @@ function Je(e, r) {
|
|
|
72
72
|
;
|
|
73
73
|
if (!t && s.slots)
|
|
74
74
|
for (let l in s.slots)
|
|
75
|
-
for (let
|
|
75
|
+
for (let u = 0; u < s.slots[l].length && (n(s.slots[l][u]), !t); u++)
|
|
76
76
|
;
|
|
77
77
|
t || o.pop();
|
|
78
78
|
}
|
|
79
79
|
return e.forEach(n), t || console.error(`没有查询到id为${r}的节点`), o;
|
|
80
80
|
}
|
|
81
|
-
function
|
|
81
|
+
function Rt(e, r, o) {
|
|
82
82
|
const t = r.split(".");
|
|
83
83
|
let n = e;
|
|
84
84
|
for (let s = 0; s < t.length; s++) {
|
|
@@ -88,7 +88,7 @@ function Ft(e, r, o) {
|
|
|
88
88
|
}
|
|
89
89
|
return n === void 0 ? o : n;
|
|
90
90
|
}
|
|
91
|
-
function
|
|
91
|
+
function $t(e, r, o) {
|
|
92
92
|
const t = r.replace(/\[(\d+)\]/g, ".$1").split(".").filter(Boolean);
|
|
93
93
|
let n = e;
|
|
94
94
|
for (let s = 0; s < t.length - 1; s++) {
|
|
@@ -97,10 +97,10 @@ function Mt(e, r, o) {
|
|
|
97
97
|
}
|
|
98
98
|
return n[t[t.length - 1]] = o, e;
|
|
99
99
|
}
|
|
100
|
-
function
|
|
101
|
-
return
|
|
100
|
+
function Nt(e, r = "default") {
|
|
101
|
+
return He(e, r).map((t) => t.field);
|
|
102
102
|
}
|
|
103
|
-
function
|
|
103
|
+
function He(e, r = "default") {
|
|
104
104
|
const o = se(
|
|
105
105
|
e,
|
|
106
106
|
(n) => {
|
|
@@ -121,14 +121,14 @@ function se(e, r, o = !1, t) {
|
|
|
121
121
|
for (; s.length; ) {
|
|
122
122
|
const l = s.pop();
|
|
123
123
|
if (l != null && l.children && (!t || t(l)) && s.push(...l.children), l != null && l.slots && (!t || t(l)))
|
|
124
|
-
for (let
|
|
125
|
-
s.push(...l.slots[
|
|
124
|
+
for (let u in l.slots)
|
|
125
|
+
s.push(...l.slots[u]);
|
|
126
126
|
if (r(l) && (n.push(l), o))
|
|
127
127
|
return l;
|
|
128
128
|
}
|
|
129
129
|
return o ? !1 : n;
|
|
130
130
|
}
|
|
131
|
-
function
|
|
131
|
+
function Ke(e, r, o) {
|
|
132
132
|
const t = [...e];
|
|
133
133
|
for (; t.length; ) {
|
|
134
134
|
const n = t.pop();
|
|
@@ -139,7 +139,7 @@ function We(e, r, o) {
|
|
|
139
139
|
}
|
|
140
140
|
return e;
|
|
141
141
|
}
|
|
142
|
-
function
|
|
142
|
+
function Bt(e, r) {
|
|
143
143
|
const o = se(
|
|
144
144
|
e,
|
|
145
145
|
(t) => t.id === r,
|
|
@@ -159,9 +159,9 @@ function kt(e, r) {
|
|
|
159
159
|
if (s != null && s.slots)
|
|
160
160
|
for (let l in s.slots) {
|
|
161
161
|
n = s.slots[l];
|
|
162
|
-
for (let
|
|
163
|
-
if (n[
|
|
164
|
-
return t =
|
|
162
|
+
for (let u = 0; u < n.length; u++)
|
|
163
|
+
if (n[u].id === r)
|
|
164
|
+
return t = u, !0;
|
|
165
165
|
}
|
|
166
166
|
return !1;
|
|
167
167
|
}
|
|
@@ -179,7 +179,7 @@ function kt(e, r) {
|
|
|
179
179
|
index: t
|
|
180
180
|
};
|
|
181
181
|
}
|
|
182
|
-
function
|
|
182
|
+
function Ut(e) {
|
|
183
183
|
const r = {
|
|
184
184
|
schemas: [
|
|
185
185
|
{
|
|
@@ -221,14 +221,14 @@ function Bt(e) {
|
|
|
221
221
|
}
|
|
222
222
|
function oe(e, r) {
|
|
223
223
|
return e.map((o) => {
|
|
224
|
-
var f, I,
|
|
224
|
+
var f, I, w;
|
|
225
225
|
let t = o.type ?? "";
|
|
226
|
-
const n = o.options ?? {}, s = (a,
|
|
227
|
-
t === a && (t =
|
|
226
|
+
const n = o.options ?? {}, s = (a, E) => {
|
|
227
|
+
t === a && (t = E, n.defaultValue && (n.defaultValue = JSON.parse(n.defaultValue)));
|
|
228
228
|
};
|
|
229
229
|
if (s("uploadImg", "upload-image"), s("uploadFile", "upload-file"), t === "date" && n.range && (n.type = "daterange", delete n.range), (t === "date" || t === "time") && (n.valueFormat = n.format), t === "textarea") {
|
|
230
|
-
const { minRows: a, maxRows:
|
|
231
|
-
n.autoSize = { minRows: a, maxRows:
|
|
230
|
+
const { minRows: a, maxRows: E } = n;
|
|
231
|
+
n.autoSize = { minRows: a, maxRows: E }, delete n.minRows, delete n.maxRows;
|
|
232
232
|
}
|
|
233
233
|
t === "number" && !n.precision && delete n.precision, n.width && (n.style = { width: n.width }, delete n.width), t === "grid" && (t = "row"), r && r.type === "grid" && (t = "col", n.span = o.span, o.key = ie());
|
|
234
234
|
const l = {
|
|
@@ -255,10 +255,10 @@ function oe(e, r) {
|
|
|
255
255
|
"color-picker",
|
|
256
256
|
"upload-file",
|
|
257
257
|
"upload-image"
|
|
258
|
-
].includes(t) && (l.input = !0, ((I = (f = o.rules) == null ? void 0 : f[0]) == null ? void 0 : I.required) === !1 && o.rules.shift(), ((
|
|
258
|
+
].includes(t) && (l.input = !0, ((I = (f = o.rules) == null ? void 0 : f[0]) == null ? void 0 : I.required) === !1 && o.rules.shift(), ((w = o.rules) == null ? void 0 : w.length) > 0 && (l.rules = o.rules)), o.list && (l.children = oe(o.list, o)), o.columns && (l.children = oe(o.columns, o)), o.trs && (l.children = oe(o.trs, o)), o.tds && (l.children = oe(o.tds, o)), l;
|
|
259
259
|
});
|
|
260
260
|
}
|
|
261
|
-
function
|
|
261
|
+
function Tt(e, r) {
|
|
262
262
|
let o = null;
|
|
263
263
|
return (...t) => {
|
|
264
264
|
o && clearTimeout(o), o = setTimeout(() => {
|
|
@@ -266,85 +266,85 @@ function Nt(e, r) {
|
|
|
266
266
|
}, r);
|
|
267
267
|
};
|
|
268
268
|
}
|
|
269
|
-
function
|
|
270
|
-
const e =
|
|
269
|
+
function xe() {
|
|
270
|
+
const e = P({}), r = P({}), o = P(!1), t = P([]), n = j({});
|
|
271
271
|
function s(h) {
|
|
272
272
|
return e.value[h];
|
|
273
273
|
}
|
|
274
|
-
function l(h,
|
|
275
|
-
e.value[h] =
|
|
274
|
+
function l(h, D) {
|
|
275
|
+
e.value[h] = D;
|
|
276
276
|
}
|
|
277
|
-
function
|
|
277
|
+
function u(h) {
|
|
278
278
|
delete e.value[h];
|
|
279
279
|
}
|
|
280
|
-
function f(h,
|
|
281
|
-
const
|
|
280
|
+
function f(h, D = !1) {
|
|
281
|
+
const x = Object.entries(B.publicMethods).reduce(
|
|
282
282
|
(C, [i, F]) => (C[i] = F.handler, C),
|
|
283
283
|
{}
|
|
284
284
|
);
|
|
285
285
|
try {
|
|
286
286
|
new Function(`const epic = this;${h}`).bind({
|
|
287
|
-
...
|
|
287
|
+
...x,
|
|
288
288
|
getComponent: s,
|
|
289
289
|
find: s,
|
|
290
290
|
defineExpose: I,
|
|
291
|
-
publicMethods:
|
|
291
|
+
publicMethods: x,
|
|
292
292
|
pluginManager: B
|
|
293
293
|
})();
|
|
294
294
|
} catch (C) {
|
|
295
|
-
|
|
295
|
+
D && console.error("[epic:自定义函数]异常:", C);
|
|
296
296
|
}
|
|
297
297
|
}
|
|
298
298
|
function I(h) {
|
|
299
299
|
h != null && (r.value = h);
|
|
300
300
|
}
|
|
301
|
-
function
|
|
301
|
+
function w(h, ...D) {
|
|
302
302
|
if (!h || h.length === 0) {
|
|
303
303
|
console.warn("未提供任何动作");
|
|
304
304
|
return;
|
|
305
305
|
}
|
|
306
|
-
h.forEach((
|
|
307
|
-
const C =
|
|
308
|
-
switch (
|
|
306
|
+
h.forEach((x) => {
|
|
307
|
+
const C = x.args ? JSON.parse(x.args) : D;
|
|
308
|
+
switch (x.type) {
|
|
309
309
|
case "public":
|
|
310
|
-
a(
|
|
310
|
+
a(x, C);
|
|
311
311
|
break;
|
|
312
312
|
case "custom":
|
|
313
|
-
|
|
313
|
+
E(x, C);
|
|
314
314
|
break;
|
|
315
315
|
case "component":
|
|
316
|
-
p(
|
|
316
|
+
p(x, C);
|
|
317
317
|
break;
|
|
318
318
|
default:
|
|
319
|
-
console.warn(`未知的动作类型: ${
|
|
319
|
+
console.warn(`未知的动作类型: ${x.type}`);
|
|
320
320
|
break;
|
|
321
321
|
}
|
|
322
322
|
});
|
|
323
323
|
}
|
|
324
|
-
function a(h,
|
|
325
|
-
var
|
|
324
|
+
function a(h, D) {
|
|
325
|
+
var x;
|
|
326
326
|
try {
|
|
327
|
-
(
|
|
327
|
+
(x = B.publicMethods[h.methodName]) == null || x.handler(...D);
|
|
328
328
|
} catch (C) {
|
|
329
329
|
console.error(`[Epic:公共函数(${h.methodName})]执行异常:`, C);
|
|
330
330
|
}
|
|
331
331
|
}
|
|
332
|
-
function
|
|
333
|
-
var
|
|
332
|
+
function E(h, D) {
|
|
333
|
+
var x, C;
|
|
334
334
|
try {
|
|
335
|
-
(C = (
|
|
335
|
+
(C = (x = r.value)[h.methodName]) == null || C.call(x, ...D);
|
|
336
336
|
} catch (i) {
|
|
337
337
|
console.error(`[Epic:自定义函数(${h.methodName})]执行异常:`, i);
|
|
338
338
|
}
|
|
339
339
|
}
|
|
340
|
-
function p(h,
|
|
341
|
-
const
|
|
342
|
-
if (!
|
|
340
|
+
function p(h, D) {
|
|
341
|
+
const x = h.componentId != null && s(h.componentId);
|
|
342
|
+
if (!x) {
|
|
343
343
|
console.warn(`[Epic:组件${h.componentId}]未找到`);
|
|
344
344
|
return;
|
|
345
345
|
}
|
|
346
346
|
try {
|
|
347
|
-
|
|
347
|
+
x[h.methodName](...D);
|
|
348
348
|
} catch (C) {
|
|
349
349
|
console.error(`[Epic:组件${h.componentId}函数(${h.methodName})]执行异常:`, C);
|
|
350
350
|
}
|
|
@@ -352,23 +352,23 @@ function be() {
|
|
|
352
352
|
function v(h = !0) {
|
|
353
353
|
o.value = h;
|
|
354
354
|
}
|
|
355
|
-
function
|
|
356
|
-
const
|
|
357
|
-
t.value =
|
|
355
|
+
function d(h) {
|
|
356
|
+
const D = se(h, () => !0);
|
|
357
|
+
t.value = D.map((x) => x.id);
|
|
358
358
|
}
|
|
359
|
-
function O(h,
|
|
360
|
-
if (n[
|
|
361
|
-
const
|
|
362
|
-
G(h,
|
|
359
|
+
function O(h, D = "default") {
|
|
360
|
+
if (n[D]) {
|
|
361
|
+
const x = n[D];
|
|
362
|
+
G(h, x);
|
|
363
363
|
}
|
|
364
|
-
n[
|
|
364
|
+
n[D] = h;
|
|
365
365
|
}
|
|
366
|
-
function M(h,
|
|
367
|
-
if (n[
|
|
368
|
-
G(n[
|
|
366
|
+
function M(h, D = "default") {
|
|
367
|
+
if (n[D]) {
|
|
368
|
+
G(n[D], h, !1);
|
|
369
369
|
return;
|
|
370
370
|
}
|
|
371
|
-
n[
|
|
371
|
+
n[D] = h;
|
|
372
372
|
}
|
|
373
373
|
return {
|
|
374
374
|
componentInstances: e,
|
|
@@ -382,19 +382,19 @@ function be() {
|
|
|
382
382
|
// 简化查询函数, 推荐使用
|
|
383
383
|
find: s,
|
|
384
384
|
addComponentInstance: l,
|
|
385
|
-
removeComponentInstance:
|
|
385
|
+
removeComponentInstance: u,
|
|
386
386
|
setMethods: f,
|
|
387
|
-
doActions:
|
|
387
|
+
doActions: w,
|
|
388
388
|
setDesignMode: v,
|
|
389
|
-
setDefaultComponentIds:
|
|
389
|
+
setDefaultComponentIds: d
|
|
390
390
|
};
|
|
391
391
|
}
|
|
392
|
-
function
|
|
393
|
-
const e =
|
|
392
|
+
function qe() {
|
|
393
|
+
const e = P([]), r = P([]), o = P(null);
|
|
394
394
|
let t = 0;
|
|
395
395
|
function n(f, I = "插入组件") {
|
|
396
|
-
const
|
|
397
|
-
t + 150 >
|
|
396
|
+
const w = Date.now();
|
|
397
|
+
t + 150 > w || (t = w, o.value != null && (e.value.push(o.value), r.value.splice(0, r.value.length)), o.value = {
|
|
398
398
|
type: I,
|
|
399
399
|
componentSchema: JSON.stringify(f)
|
|
400
400
|
}, e.value.length > 60 && e.value.unshift());
|
|
@@ -411,7 +411,7 @@ function He() {
|
|
|
411
411
|
const f = r.value.pop();
|
|
412
412
|
return o.value != null && e.value.push(o.value), o.value = f, JSON.parse(f.componentSchema);
|
|
413
413
|
}
|
|
414
|
-
function
|
|
414
|
+
function u() {
|
|
415
415
|
e.value = [], r.value = [], o.value = null;
|
|
416
416
|
}
|
|
417
417
|
return {
|
|
@@ -421,10 +421,10 @@ function He() {
|
|
|
421
421
|
push: n,
|
|
422
422
|
undo: s,
|
|
423
423
|
redo: l,
|
|
424
|
-
reset:
|
|
424
|
+
reset: u
|
|
425
425
|
};
|
|
426
426
|
}
|
|
427
|
-
const
|
|
427
|
+
const Ze = /* @__PURE__ */ ee({
|
|
428
428
|
__name: "dynamicFormItem",
|
|
429
429
|
props: {
|
|
430
430
|
hasFormItem: { type: Boolean },
|
|
@@ -432,22 +432,22 @@ const Ke = /* @__PURE__ */ ee({
|
|
|
432
432
|
},
|
|
433
433
|
emits: ["updateFormItemRef"],
|
|
434
434
|
setup(e, { emit: r }) {
|
|
435
|
-
const o = B.getComponent("form-item"), t = e, n = r, s =
|
|
435
|
+
const o = B.getComponent("form-item"), t = e, n = r, s = P(), l = () => {
|
|
436
436
|
n("updateFormItemRef", s.value);
|
|
437
437
|
};
|
|
438
|
-
return (
|
|
438
|
+
return (u, f) => t.hasFormItem ? (k(), K(R(o), pe({
|
|
439
439
|
key: 0,
|
|
440
440
|
ref_key: "formItemRef",
|
|
441
441
|
ref: s,
|
|
442
442
|
onVnodeMounted: l
|
|
443
443
|
}, t.formItemProps), {
|
|
444
444
|
default: $(() => [
|
|
445
|
-
T(
|
|
445
|
+
T(u.$slots, "default")
|
|
446
446
|
]),
|
|
447
447
|
_: 3
|
|
448
|
-
}, 16, ["onVnodeMounted"])) : T(
|
|
448
|
+
}, 16, ["onVnodeMounted"])) : T(u.$slots, "default", { key: 1 });
|
|
449
449
|
}
|
|
450
|
-
}),
|
|
450
|
+
}), Ge = /* @__PURE__ */ ee({
|
|
451
451
|
name: "ENode",
|
|
452
452
|
__name: "node",
|
|
453
453
|
props: {
|
|
@@ -462,12 +462,14 @@ const Ke = /* @__PURE__ */ ee({
|
|
|
462
462
|
},
|
|
463
463
|
emits: ["update:modelValue", "change", "update:dynamicId"],
|
|
464
464
|
setup(e, { emit: r }) {
|
|
465
|
-
const { proxy: o } = ae(), t = e, n =
|
|
465
|
+
const { proxy: o } = ae(), t = e, n = P(null);
|
|
466
466
|
let s = Q("formData", j({}));
|
|
467
|
-
const l = Q("slots", {}),
|
|
468
|
-
|
|
467
|
+
const l = Q("slots", {}), u = Q("pageManager", {}), f = Q("disabled", { value: !1 });
|
|
468
|
+
console.log("%c [ disabled ]-101", "font-size:13px; background:pink; color:#bf2c9f;", f.value);
|
|
469
|
+
const I = Q("ruleFieldPrefix", null), w = Q("resetFormData", !1);
|
|
470
|
+
let a = j(z(t.componentSchema));
|
|
469
471
|
v();
|
|
470
|
-
async function
|
|
472
|
+
async function E(m) {
|
|
471
473
|
if (["cascader", "checkbox", "select", "radio"].includes(m.type) && m.componentProps.dynamicId && t.sourceDateUrl) {
|
|
472
474
|
const y = (await we({
|
|
473
475
|
// || "http://192.168.28.205:3000/dev-api/data-source
|
|
@@ -477,7 +479,7 @@ const Ke = /* @__PURE__ */ ee({
|
|
|
477
479
|
id: m.componentProps.dynamicId
|
|
478
480
|
}
|
|
479
481
|
})).data.data;
|
|
480
|
-
let
|
|
482
|
+
let _ = await we({
|
|
481
483
|
url: y.url,
|
|
482
484
|
method: y.method,
|
|
483
485
|
data: JSON.parse(y.body),
|
|
@@ -485,108 +487,108 @@ const Ke = /* @__PURE__ */ ee({
|
|
|
485
487
|
headers: JSON.parse(y.headers)
|
|
486
488
|
});
|
|
487
489
|
if (y && (y != null && y.dataPath)) {
|
|
488
|
-
const
|
|
489
|
-
m.componentProps.options = p(
|
|
490
|
+
const be = y.dataPath.split(".").reduce((Ce, _e) => Ce[_e], _.data);
|
|
491
|
+
m.componentProps.options = p(be, y.dataKey, y.dataValue);
|
|
490
492
|
} else
|
|
491
|
-
m.componentProps.options = p(
|
|
493
|
+
m.componentProps.options = p(_.data, y.dataKey, y.dataValue);
|
|
492
494
|
return m;
|
|
493
495
|
}
|
|
494
496
|
return m;
|
|
495
497
|
}
|
|
496
|
-
function p(m,
|
|
498
|
+
function p(m, b, V) {
|
|
497
499
|
return m && Object.prototype.toString.call(m) === "[object Array]" ? m.map((y) => y.children && y.children.length ? {
|
|
498
|
-
label: y[
|
|
500
|
+
label: y[b],
|
|
499
501
|
value: y[V] + "",
|
|
500
|
-
children: p(y.children,
|
|
502
|
+
children: p(y.children, b, V)
|
|
501
503
|
} : {
|
|
502
|
-
label: y[
|
|
504
|
+
label: y[b],
|
|
503
505
|
value: y[V] + ""
|
|
504
506
|
}) : [];
|
|
505
507
|
}
|
|
506
|
-
|
|
508
|
+
N(
|
|
507
509
|
() => t.componentSchema,
|
|
508
510
|
(m) => {
|
|
509
|
-
Ee(a, m, ["children"]) || (G(a,
|
|
511
|
+
Ee(a, m, ["children"]) || (G(a, z(m)), v());
|
|
510
512
|
},
|
|
511
513
|
{
|
|
512
514
|
deep: !0
|
|
513
515
|
}
|
|
514
516
|
);
|
|
515
517
|
function v() {
|
|
516
|
-
|
|
518
|
+
u.isDesignMode.value && typeof a.field == "string" && (a.field += "-design-mode");
|
|
517
519
|
}
|
|
518
|
-
(t.resetFormData ||
|
|
519
|
-
const
|
|
520
|
+
(t.resetFormData || w) && (s = {});
|
|
521
|
+
const d = r, O = P(), M = P(), h = (m) => {
|
|
520
522
|
M.value = m;
|
|
521
|
-
},
|
|
522
|
-
Object.keys(
|
|
523
|
-
const
|
|
524
|
-
var m,
|
|
525
|
-
return (m = a.componentProps) != null && m.hidden ? !1 : typeof a.show == "boolean" ? a.show : ((
|
|
526
|
-
}), i =
|
|
523
|
+
}, D = Pe();
|
|
524
|
+
Object.keys(D).length && L("nodeAttrs", D);
|
|
525
|
+
const x = Oe(null), C = J(() => {
|
|
526
|
+
var m, b;
|
|
527
|
+
return (m = a.componentProps) != null && m.hidden ? !1 : typeof a.show == "boolean" ? a.show : ((b = a.show) == null ? void 0 : b.call(a, { values: s })) ?? !0;
|
|
528
|
+
}), i = J(() => {
|
|
527
529
|
var y;
|
|
528
|
-
const m = C.value && ((y = a.rules) == null ? void 0 : y.map((
|
|
529
|
-
...
|
|
530
|
-
validator:
|
|
530
|
+
const m = C.value && ((y = a.rules) == null ? void 0 : y.map((_) => ({
|
|
531
|
+
..._,
|
|
532
|
+
validator: _.validator && u.funcs.value[_.validator]
|
|
531
533
|
// 自定义校验函数
|
|
532
534
|
})));
|
|
533
|
-
let
|
|
534
|
-
t.ruleField ?
|
|
535
|
+
let b = a.field;
|
|
536
|
+
t.ruleField ? b = t.ruleField : I && a.field && (b = z(I), b.push(a.field));
|
|
535
537
|
const V = {
|
|
536
538
|
...a,
|
|
537
539
|
rules: m,
|
|
538
540
|
rule: m,
|
|
539
|
-
field:
|
|
541
|
+
field: b
|
|
540
542
|
};
|
|
541
543
|
return V.children && delete V.children, V;
|
|
542
|
-
}), F =
|
|
544
|
+
}), F = J(() => {
|
|
543
545
|
var V, y;
|
|
544
|
-
const m = ((V =
|
|
545
|
-
return a.on && Object.keys(a.on).forEach((
|
|
546
|
-
|
|
546
|
+
const m = ((V = A.value) == null ? void 0 : V.bindModel) ?? "modelValue", b = {};
|
|
547
|
+
return a.on && Object.keys(a.on).forEach((_) => {
|
|
548
|
+
b[`on${Je(_)}`] = (...ge) => u.doActions(a.on[_], ...ge);
|
|
547
549
|
}), {
|
|
548
550
|
...t,
|
|
549
551
|
...a.componentProps,
|
|
550
552
|
disabled: (f == null ? void 0 : f.value) || ((y = a.componentProps) == null ? void 0 : y.disabled),
|
|
551
553
|
bindModel: m,
|
|
552
|
-
...
|
|
554
|
+
...b
|
|
553
555
|
};
|
|
554
|
-
}),
|
|
556
|
+
}), A = J(() => B.getComponentConfingByType(a.type) ?? null);
|
|
555
557
|
le(() => {
|
|
556
558
|
n.value = t.modelValue ?? s[a.field ?? ""];
|
|
557
|
-
}),
|
|
559
|
+
}), N(
|
|
558
560
|
() => n.value,
|
|
559
561
|
() => {
|
|
560
|
-
n.value !== (t.modelValue ?? s[a.field ?? ""]) &&
|
|
562
|
+
n.value !== (t.modelValue ?? s[a.field ?? ""]) && S(n.value);
|
|
561
563
|
}
|
|
562
|
-
),
|
|
564
|
+
), N(
|
|
563
565
|
() => O.value,
|
|
564
566
|
() => {
|
|
565
|
-
|
|
567
|
+
c();
|
|
566
568
|
},
|
|
567
569
|
{ immediate: !0 }
|
|
568
570
|
);
|
|
569
|
-
function
|
|
570
|
-
var
|
|
571
|
+
function c() {
|
|
572
|
+
var b;
|
|
571
573
|
const m = O.value || o;
|
|
572
|
-
a.id && m && (a.input && (m.setValue =
|
|
574
|
+
a.id && m && (a.input && (m.setValue = S, m.getValue = () => s[a.field] || t.modelValue), m.setAttr = (V, y) => (a.componentProps || (a.componentProps = {}), a.componentProps[V] = y), m.getAttr = (V) => a.componentProps[V], u.addComponentInstance(a.id, m), (b = A.value) != null && b.defaultSchema.input && a.noFormItem !== !0 && M.value && u.addComponentInstance(a.id + "formItem", M.value));
|
|
573
575
|
}
|
|
574
|
-
function
|
|
576
|
+
function g() {
|
|
575
577
|
var m;
|
|
576
|
-
a.id && (
|
|
578
|
+
a.id && (u.removeComponentInstance(a.id), (m = A.value) != null && m.defaultSchema.input && a.noFormItem !== !0 && u.removeComponentInstance(a.id + "formItem"));
|
|
577
579
|
}
|
|
578
580
|
async function W() {
|
|
579
|
-
var
|
|
580
|
-
if (a = await
|
|
581
|
-
const
|
|
582
|
-
|
|
581
|
+
var b, V, y;
|
|
582
|
+
if (a = await E(a), typeof ((b = a.componentProps) == null ? void 0 : b.defaultValue) < "u") {
|
|
583
|
+
const _ = u.isDesignMode.value ? (V = a.componentProps) == null ? void 0 : V.defaultValue : s[a.field] ?? ((y = a.componentProps) == null ? void 0 : y.defaultValue);
|
|
584
|
+
S(z(_));
|
|
583
585
|
}
|
|
584
586
|
if (a.type === "slot") {
|
|
585
|
-
const
|
|
586
|
-
if (!
|
|
587
|
-
|
|
587
|
+
const _ = a.slotName;
|
|
588
|
+
if (!_) return;
|
|
589
|
+
x.value = ee({
|
|
588
590
|
setup() {
|
|
589
|
-
return () => T(l,
|
|
591
|
+
return () => T(l, _, {
|
|
590
592
|
componentSchema: a,
|
|
591
593
|
model: s
|
|
592
594
|
});
|
|
@@ -600,22 +602,22 @@ const Ke = /* @__PURE__ */ ee({
|
|
|
600
602
|
return;
|
|
601
603
|
}
|
|
602
604
|
if (typeof m == "function") {
|
|
603
|
-
const
|
|
604
|
-
|
|
605
|
+
const _ = await m();
|
|
606
|
+
x.value = _.default ?? _;
|
|
605
607
|
} else
|
|
606
|
-
|
|
608
|
+
x.value = m;
|
|
607
609
|
}
|
|
608
|
-
function
|
|
609
|
-
|
|
610
|
+
function S(m) {
|
|
611
|
+
d("update:modelValue", m), d("change", m), a.field && (s[a.field] = m), re.emit("updateformData" + t.id, s);
|
|
610
612
|
}
|
|
611
613
|
function U(m) {
|
|
612
|
-
|
|
614
|
+
d("update:dynamicId", m);
|
|
613
615
|
}
|
|
614
616
|
let q = null;
|
|
615
|
-
return
|
|
617
|
+
return N(
|
|
616
618
|
() => a,
|
|
617
619
|
async (m) => {
|
|
618
|
-
const
|
|
620
|
+
const b = JSON.stringify({
|
|
619
621
|
...m,
|
|
620
622
|
children: void 0,
|
|
621
623
|
componentProps: {
|
|
@@ -623,39 +625,40 @@ const Ke = /* @__PURE__ */ ee({
|
|
|
623
625
|
options: null
|
|
624
626
|
}
|
|
625
627
|
});
|
|
626
|
-
if (
|
|
628
|
+
if (b === q)
|
|
627
629
|
return !1;
|
|
628
|
-
q =
|
|
630
|
+
q = b, W();
|
|
629
631
|
},
|
|
630
632
|
{
|
|
631
633
|
immediate: !0,
|
|
632
634
|
deep: !0
|
|
633
635
|
}
|
|
634
|
-
), Se(
|
|
636
|
+
), Se(g), (m, b) => {
|
|
635
637
|
var y;
|
|
636
638
|
const V = Ve("ENode");
|
|
637
|
-
return
|
|
639
|
+
return x.value && C.value ? (k(), K(Ze, {
|
|
638
640
|
key: 0,
|
|
639
|
-
hasFormItem: R(a).noFormItem !== !0 && ((y =
|
|
641
|
+
hasFormItem: R(a).noFormItem !== !0 && ((y = A.value) == null ? void 0 : y.defaultSchema.input),
|
|
640
642
|
formItemProps: i.value,
|
|
641
643
|
onUpdateFormItemRef: h
|
|
642
644
|
}, {
|
|
643
645
|
default: $(() => [
|
|
644
|
-
(
|
|
646
|
+
(k(), K(Fe(x.value), pe({
|
|
645
647
|
ref_key: "componentInstance",
|
|
646
648
|
ref: O,
|
|
647
|
-
onVnodeMounted:
|
|
649
|
+
onVnodeMounted: c,
|
|
648
650
|
model: R(s)
|
|
649
651
|
}, { ...F.value }, {
|
|
650
652
|
[F.value.bindModel]: n.value,
|
|
651
|
-
["onUpdate:" + F.value.bindModel]:
|
|
652
|
-
[`onUpdate:${F.value.bindModel}` || ""]:
|
|
653
|
+
["onUpdate:" + F.value.bindModel]: b[0] || (b[0] = (_) => n.value = _),
|
|
654
|
+
[`onUpdate:${F.value.bindModel}` || ""]: S,
|
|
653
655
|
"onUpdate:dynamicId": U
|
|
654
656
|
}), {
|
|
655
|
-
node: $((
|
|
657
|
+
node: $((_) => [
|
|
658
|
+
Me(Re(_) + " ", 1),
|
|
656
659
|
H(V, pe({
|
|
657
660
|
id: t.id
|
|
658
|
-
},
|
|
661
|
+
}, _, {
|
|
659
662
|
sourceDateUrl: t.sourceDateUrl
|
|
660
663
|
}), null, 16, ["id", "sourceDateUrl"])
|
|
661
664
|
]),
|
|
@@ -670,54 +673,54 @@ const Ke = /* @__PURE__ */ ee({
|
|
|
670
673
|
};
|
|
671
674
|
}
|
|
672
675
|
});
|
|
673
|
-
function
|
|
674
|
-
const e =
|
|
676
|
+
function Qe() {
|
|
677
|
+
const e = P(!1), r = xe(), o = P({});
|
|
675
678
|
function t() {
|
|
676
679
|
return new Promise((p) => {
|
|
677
680
|
if (e.value)
|
|
678
681
|
p();
|
|
679
682
|
else {
|
|
680
|
-
const v =
|
|
683
|
+
const v = N(e, () => {
|
|
681
684
|
v(), p();
|
|
682
685
|
});
|
|
683
686
|
}
|
|
684
687
|
});
|
|
685
688
|
}
|
|
686
689
|
async function n(p = "default") {
|
|
687
|
-
var
|
|
690
|
+
var d;
|
|
688
691
|
await t();
|
|
689
|
-
const v = (
|
|
692
|
+
const v = (d = o.value) == null ? void 0 : d[p];
|
|
690
693
|
if (!v) throw new Error(`表单 [name=${p}] 不存在`);
|
|
691
694
|
return v;
|
|
692
695
|
}
|
|
693
696
|
async function s(p, v) {
|
|
694
|
-
const
|
|
695
|
-
return
|
|
697
|
+
const d = await n(p);
|
|
698
|
+
return z(await v(d));
|
|
696
699
|
}
|
|
697
700
|
async function l(p = "default") {
|
|
698
701
|
return await s(p, (v) => v.getData());
|
|
699
702
|
}
|
|
700
|
-
function
|
|
703
|
+
function u(p, v = "default", d = void 0) {
|
|
701
704
|
var O, M;
|
|
702
|
-
if (
|
|
705
|
+
if (d && Object.keys(d).length) {
|
|
703
706
|
let h = function(i) {
|
|
704
707
|
let F = [];
|
|
705
|
-
return i.forEach((
|
|
706
|
-
|
|
708
|
+
return i.forEach((A) => {
|
|
709
|
+
A.children && (F = [...F, ...h(A.children)]), F.push(A);
|
|
707
710
|
}), F;
|
|
708
|
-
},
|
|
709
|
-
var
|
|
710
|
-
let F = h((
|
|
711
|
-
return Object.keys(i).forEach((
|
|
712
|
-
var
|
|
713
|
-
const
|
|
714
|
-
(
|
|
715
|
-
url:
|
|
716
|
-
name:
|
|
717
|
-
})));
|
|
711
|
+
}, x = function(i) {
|
|
712
|
+
var A;
|
|
713
|
+
let F = h((A = d == null ? void 0 : d.schemas[0]) == null ? void 0 : A.children);
|
|
714
|
+
return Object.keys(i).forEach((c) => {
|
|
715
|
+
var S, U, q, m, b, V, y;
|
|
716
|
+
const g = F.find((_) => _.field === c), W = ["datetimerange", "daterange", "monthrange", "dates"];
|
|
717
|
+
(g && (g == null ? void 0 : g.type) === "checkbox" || (g == null ? void 0 : g.type) === "select" && ((S = g == null ? void 0 : g.componentProps) != null && S.multiple) || (g == null ? void 0 : g.type) === "cascader" && !((q = (U = g == null ? void 0 : g.componentProps) == null ? void 0 : U.props) != null && q.multiple) || (g == null ? void 0 : g.type) === "date" && W.includes((m = g == null ? void 0 : g.componentProps) == null ? void 0 : m.type)) && typeof i[c] == "string" ? i[c] = (b = i[c]) == null ? void 0 : b.split(",") : (g == null ? void 0 : g.type) === "cascader" && ((y = (V = g == null ? void 0 : g.componentProps) == null ? void 0 : V.props) != null && y.multiple) && typeof i[c] == "string" ? (i[c].indexOf(";") > -1 ? i[c] = i[c].split(";").map((_) => _.split(",")) : i[c] = i[c].split(","), i[c].indexOf(";") > -1 ? i[c] = i[c].split(";").map((_) => _.split(",")) : i[c] = i[c].split(",")) : ((g == null ? void 0 : g.type) === "upload-image" || (g == null ? void 0 : g.type) === "upload-file") && typeof i[c] == "string" ? i[c] = i[c].split(",").map((_) => ({
|
|
718
|
+
url: _,
|
|
719
|
+
name: _
|
|
720
|
+
})) : (g == null ? void 0 : g.type) === "number" || (g == null ? void 0 : g.type) === "slider" ? i[c] = Number(i[c]) : (g == null ? void 0 : g.type) === "switch" && (i[c] = i[c].indexOf("true") > -1);
|
|
718
721
|
}), i;
|
|
719
722
|
}(p);
|
|
720
|
-
r.setFormData(
|
|
723
|
+
r.setFormData(x, v);
|
|
721
724
|
const C = (O = o.value) == null ? void 0 : O[v];
|
|
722
725
|
C == null || C.clearValidate();
|
|
723
726
|
} else {
|
|
@@ -732,20 +735,20 @@ function Ze() {
|
|
|
732
735
|
async function I(p) {
|
|
733
736
|
await t();
|
|
734
737
|
const v = {};
|
|
735
|
-
for (const
|
|
736
|
-
const O = o.value[
|
|
737
|
-
O && (v[
|
|
738
|
+
for (const d in o.value) {
|
|
739
|
+
const O = o.value[d];
|
|
740
|
+
O && (v[d] = z(await p(O)));
|
|
738
741
|
}
|
|
739
742
|
return v;
|
|
740
743
|
}
|
|
741
|
-
async function
|
|
744
|
+
async function w() {
|
|
742
745
|
return await I((p) => p.getData());
|
|
743
746
|
}
|
|
744
747
|
function a(p) {
|
|
745
748
|
for (const v in p)
|
|
746
|
-
|
|
749
|
+
u(p[v], v);
|
|
747
750
|
}
|
|
748
|
-
async function
|
|
751
|
+
async function E() {
|
|
749
752
|
return await I(async (p) => (await p.validate(), await p.getData()));
|
|
750
753
|
}
|
|
751
754
|
return {
|
|
@@ -753,18 +756,18 @@ function Ze() {
|
|
|
753
756
|
pageManager: r,
|
|
754
757
|
forms: o,
|
|
755
758
|
getData: l,
|
|
756
|
-
setData:
|
|
759
|
+
setData: u,
|
|
757
760
|
validate: f,
|
|
758
|
-
getForms:
|
|
761
|
+
getForms: w,
|
|
759
762
|
setForms: a,
|
|
760
|
-
validateAll:
|
|
763
|
+
validateAll: E,
|
|
761
764
|
getFormInstance: n
|
|
762
765
|
};
|
|
763
766
|
}
|
|
764
|
-
const
|
|
767
|
+
const Ye = {
|
|
765
768
|
key: 0,
|
|
766
769
|
class: "epic-loading-box"
|
|
767
|
-
},
|
|
770
|
+
}, Xe = { class: "epic-builder-main" }, je = { class: "epic-loading-box" }, et = /* @__PURE__ */ ee({
|
|
768
771
|
__name: "builder",
|
|
769
772
|
props: {
|
|
770
773
|
pageSchema: {},
|
|
@@ -775,11 +778,11 @@ const Ge = {
|
|
|
775
778
|
},
|
|
776
779
|
emits: ["change", "ready"],
|
|
777
780
|
setup(e, { expose: r, emit: o }) {
|
|
778
|
-
const t = X(() => import("./index-DgcFxYFp.js")), n = o, { ready: s, pageManager: l, forms:
|
|
781
|
+
const t = X(() => import("./index-DgcFxYFp.js")), n = o, { ready: s, pageManager: l, forms: u, getData: f, setData: I, validate: w, getForms: a, setForms: E, validateAll: p, getFormInstance: v } = Qe(), d = e, O = j({
|
|
779
782
|
schemas: []
|
|
780
783
|
});
|
|
781
|
-
|
|
782
|
-
() =>
|
|
784
|
+
N(
|
|
785
|
+
() => d.pageSchema,
|
|
783
786
|
(i) => {
|
|
784
787
|
G(O, i);
|
|
785
788
|
},
|
|
@@ -787,8 +790,8 @@ const Ge = {
|
|
|
787
790
|
immediate: !0,
|
|
788
791
|
deep: !0
|
|
789
792
|
}
|
|
790
|
-
),
|
|
791
|
-
() =>
|
|
793
|
+
), N(
|
|
794
|
+
() => d.formData,
|
|
792
795
|
(i) => {
|
|
793
796
|
if (i) {
|
|
794
797
|
let F = h(i);
|
|
@@ -802,22 +805,22 @@ const Ge = {
|
|
|
802
805
|
);
|
|
803
806
|
function M(i) {
|
|
804
807
|
let F = [];
|
|
805
|
-
return i.forEach((
|
|
806
|
-
|
|
808
|
+
return i.forEach((A) => {
|
|
809
|
+
A.children && (F = [...F, ...M(A.children)]), F.push(A);
|
|
807
810
|
}), F;
|
|
808
811
|
}
|
|
809
812
|
function h(i) {
|
|
810
|
-
let F = M(
|
|
811
|
-
return Object.keys(i).forEach((
|
|
812
|
-
var W,
|
|
813
|
-
const
|
|
814
|
-
(
|
|
813
|
+
let F = M(d.pageSchema.schemas[0].children);
|
|
814
|
+
return Object.keys(i).forEach((A) => {
|
|
815
|
+
var W, S, U, q, m, b, V;
|
|
816
|
+
const c = F.find((y) => y.field === A), g = ["datetimerange", "daterange", "monthrange", "dates"];
|
|
817
|
+
(c && (c == null ? void 0 : c.type) === "checkbox" || (c == null ? void 0 : c.type) === "select" && ((W = c == null ? void 0 : c.componentProps) != null && W.multiple) || (c == null ? void 0 : c.type) === "cascader" && !((U = (S = c == null ? void 0 : c.componentProps) == null ? void 0 : S.props) != null && U.multiple) || (c == null ? void 0 : c.type) === "date" && g.includes((q = c == null ? void 0 : c.componentProps) == null ? void 0 : q.type)) && typeof i[A] == "string" ? i[A] = (m = i[A]) == null ? void 0 : m.split(",") : (c == null ? void 0 : c.type) === "cascader" && ((V = (b = c == null ? void 0 : c.componentProps) == null ? void 0 : b.props) != null && V.multiple) && typeof i[A] == "string" ? (i[A].indexOf(";") > -1 ? i[A] = i[A].split(";").map((y) => y.split(",")) : i[A] = i[A].split(","), i[A].indexOf(";") > -1 ? i[A] = i[A].split(";").map((y) => y.split(",")) : i[A] = i[A].split(",")) : ((c == null ? void 0 : c.type) === "upload-image" || (c == null ? void 0 : c.type) === "upload-file") && typeof i[A] == "string" ? i[A] = i[A].split(",").map((y) => ({
|
|
815
818
|
url: y,
|
|
816
819
|
name: y
|
|
817
|
-
})));
|
|
820
|
+
})) : (c == null ? void 0 : c.type) === "number" || (c == null ? void 0 : c.type) === "slider" ? i[A] = Number(i[A]) : (c == null ? void 0 : c.type) === "switch" && (i[A] = i[A].indexOf("true") > -1);
|
|
818
821
|
}), i;
|
|
819
822
|
}
|
|
820
|
-
|
|
823
|
+
N(
|
|
821
824
|
() => O.script,
|
|
822
825
|
(i) => {
|
|
823
826
|
i && l.setMethods(i, !0);
|
|
@@ -825,55 +828,55 @@ const Ge = {
|
|
|
825
828
|
{
|
|
826
829
|
immediate: !0
|
|
827
830
|
}
|
|
828
|
-
), L("slots",
|
|
831
|
+
), L("slots", $e()), L("pageManager", l), L("forms", u), L("pageSchema", O), L(
|
|
829
832
|
"disabled",
|
|
830
|
-
|
|
833
|
+
J(() => d.disabled)
|
|
831
834
|
);
|
|
832
|
-
const
|
|
835
|
+
const D = ae(), x = D == null ? void 0 : D.proxy;
|
|
833
836
|
function C() {
|
|
834
837
|
ne(() => {
|
|
835
|
-
s.value = !0, n("ready", l),
|
|
838
|
+
s.value = !0, n("ready", l), x && l.addComponentInstance("builder", x);
|
|
836
839
|
});
|
|
837
840
|
}
|
|
838
|
-
return re.on("updateformData" +
|
|
841
|
+
return re.on("updateformData" + d.id, (i) => {
|
|
839
842
|
n("change", i);
|
|
840
843
|
}), r({
|
|
841
844
|
ready: s,
|
|
842
845
|
pageManager: l,
|
|
843
846
|
getData: f,
|
|
844
847
|
setData: I,
|
|
845
|
-
validate:
|
|
848
|
+
validate: w,
|
|
846
849
|
getForms: a,
|
|
847
|
-
setForms:
|
|
850
|
+
setForms: E,
|
|
848
851
|
validateAll: p,
|
|
849
852
|
getFormInstance: v
|
|
850
|
-
}), (i, F) => R(B).initialized.value ? (
|
|
853
|
+
}), (i, F) => R(B).initialized.value ? (k(), K(Ae, {
|
|
851
854
|
key: 1,
|
|
852
855
|
onResolve: C
|
|
853
856
|
}, {
|
|
854
857
|
default: $(() => [
|
|
855
|
-
Z("div",
|
|
856
|
-
(
|
|
857
|
-
id:
|
|
858
|
-
key:
|
|
859
|
-
sourceDateUrl:
|
|
860
|
-
componentSchema:
|
|
858
|
+
Z("div", Xe, [
|
|
859
|
+
(k(!0), me(Ne, null, Be(O.schemas, (A, c) => (k(), K(R(Ge), {
|
|
860
|
+
id: d.id,
|
|
861
|
+
key: c,
|
|
862
|
+
sourceDateUrl: d.sourceDateUrl,
|
|
863
|
+
componentSchema: A
|
|
861
864
|
}, null, 8, ["id", "sourceDateUrl", "componentSchema"]))), 128))
|
|
862
865
|
])
|
|
863
866
|
]),
|
|
864
867
|
fallback: $(() => [
|
|
865
|
-
Z("div",
|
|
868
|
+
Z("div", je, [
|
|
866
869
|
H(R(t))
|
|
867
870
|
])
|
|
868
871
|
]),
|
|
869
872
|
_: 1
|
|
870
|
-
})) : (
|
|
873
|
+
})) : (k(), me("div", Ye));
|
|
871
874
|
}
|
|
872
875
|
});
|
|
873
876
|
function ve(e) {
|
|
874
|
-
return
|
|
877
|
+
return Te() ? (Le(e), !0) : !1;
|
|
875
878
|
}
|
|
876
|
-
function
|
|
879
|
+
function tt(e) {
|
|
877
880
|
let r = 0, o, t;
|
|
878
881
|
const n = () => {
|
|
879
882
|
r -= 1, t && r <= 0 && (t.stop(), o = void 0, t = void 0);
|
|
@@ -883,24 +886,24 @@ function je(e) {
|
|
|
883
886
|
function te(e) {
|
|
884
887
|
return typeof e == "function" ? e() : R(e);
|
|
885
888
|
}
|
|
886
|
-
const
|
|
889
|
+
const nt = typeof window < "u" && typeof document < "u";
|
|
887
890
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
888
|
-
const
|
|
891
|
+
const ot = (e) => typeof e < "u", rt = Object.prototype.toString, st = (e) => rt.call(e) === "[object Object]", at = () => {
|
|
889
892
|
};
|
|
890
|
-
function
|
|
893
|
+
function lt(e) {
|
|
891
894
|
return ae();
|
|
892
895
|
}
|
|
893
|
-
function
|
|
894
|
-
|
|
896
|
+
function it(e, r = !0, o) {
|
|
897
|
+
lt() ? he(e, o) : r ? e() : ne(e);
|
|
895
898
|
}
|
|
896
|
-
function
|
|
899
|
+
function ct(e = !1, r = {}) {
|
|
897
900
|
const {
|
|
898
901
|
truthyValue: o = !0,
|
|
899
902
|
falsyValue: t = !1
|
|
900
|
-
} = r, n =
|
|
901
|
-
function l(
|
|
903
|
+
} = r, n = Ue(e), s = P(e);
|
|
904
|
+
function l(u) {
|
|
902
905
|
if (arguments.length)
|
|
903
|
-
return s.value =
|
|
906
|
+
return s.value = u, s.value;
|
|
904
907
|
{
|
|
905
908
|
const f = te(o);
|
|
906
909
|
return s.value = s.value === f ? te(t) : f, s.value;
|
|
@@ -908,31 +911,31 @@ function lt(e = !1, r = {}) {
|
|
|
908
911
|
}
|
|
909
912
|
return n ? l : [s, l];
|
|
910
913
|
}
|
|
911
|
-
function
|
|
912
|
-
const t =
|
|
914
|
+
function Lt(e, r, o) {
|
|
915
|
+
const t = N(e, (...n) => (ne(() => t()), r(...n)), o);
|
|
913
916
|
return t;
|
|
914
917
|
}
|
|
915
|
-
const ce =
|
|
918
|
+
const ce = nt ? window : void 0;
|
|
916
919
|
function Y(e) {
|
|
917
920
|
var r;
|
|
918
921
|
const o = te(e);
|
|
919
922
|
return (r = o == null ? void 0 : o.$el) != null ? r : o;
|
|
920
923
|
}
|
|
921
|
-
function
|
|
924
|
+
function ut(...e) {
|
|
922
925
|
let r, o, t, n;
|
|
923
926
|
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([o, t, n] = e, r = ce) : [r, o, t, n] = e, !r)
|
|
924
|
-
return
|
|
927
|
+
return at;
|
|
925
928
|
Array.isArray(o) || (o = [o]), Array.isArray(t) || (t = [t]);
|
|
926
929
|
const s = [], l = () => {
|
|
927
|
-
s.forEach((
|
|
928
|
-
},
|
|
930
|
+
s.forEach((w) => w()), s.length = 0;
|
|
931
|
+
}, u = (w, a, E, p) => (w.addEventListener(a, E, p), () => w.removeEventListener(a, E, p)), f = N(
|
|
929
932
|
() => [Y(r), te(n)],
|
|
930
|
-
([
|
|
931
|
-
if (l(), !
|
|
933
|
+
([w, a]) => {
|
|
934
|
+
if (l(), !w)
|
|
932
935
|
return;
|
|
933
|
-
const
|
|
936
|
+
const E = st(a) ? { ...a } : a;
|
|
934
937
|
s.push(
|
|
935
|
-
...o.flatMap((p) => t.map((v) =>
|
|
938
|
+
...o.flatMap((p) => t.map((v) => u(w, p, v, E)))
|
|
936
939
|
);
|
|
937
940
|
},
|
|
938
941
|
{ immediate: !0, flush: "post" }
|
|
@@ -941,7 +944,7 @@ function it(...e) {
|
|
|
941
944
|
};
|
|
942
945
|
return ve(I), I;
|
|
943
946
|
}
|
|
944
|
-
function
|
|
947
|
+
function dt(e) {
|
|
945
948
|
return typeof e == "function" ? e : typeof e == "string" ? (r) => r.key === e : Array.isArray(e) ? (r) => e.includes(r.key) : () => !0;
|
|
946
949
|
}
|
|
947
950
|
function Ie(...e) {
|
|
@@ -951,10 +954,10 @@ function Ie(...e) {
|
|
|
951
954
|
target: n = ce,
|
|
952
955
|
eventName: s = "keydown",
|
|
953
956
|
passive: l = !1,
|
|
954
|
-
dedupe:
|
|
955
|
-
} = t, f =
|
|
956
|
-
return
|
|
957
|
-
|
|
957
|
+
dedupe: u = !1
|
|
958
|
+
} = t, f = dt(r);
|
|
959
|
+
return ut(n, s, (w) => {
|
|
960
|
+
w.repeat && te(u) || f(w) && o(w);
|
|
958
961
|
}, l);
|
|
959
962
|
}
|
|
960
963
|
function de(e, r, o = {}) {
|
|
@@ -963,138 +966,138 @@ function de(e, r, o = {}) {
|
|
|
963
966
|
function fe(e, r, o = {}) {
|
|
964
967
|
return Ie(e, r, { ...o, eventName: "keyup" });
|
|
965
968
|
}
|
|
966
|
-
function
|
|
967
|
-
const e =
|
|
969
|
+
function ft() {
|
|
970
|
+
const e = P(!1), r = ae();
|
|
968
971
|
return r && he(() => {
|
|
969
972
|
e.value = !0;
|
|
970
973
|
}, r), e;
|
|
971
974
|
}
|
|
972
|
-
function
|
|
973
|
-
const r =
|
|
974
|
-
return
|
|
975
|
+
function pt(e) {
|
|
976
|
+
const r = ft();
|
|
977
|
+
return J(() => (r.value, !!e()));
|
|
975
978
|
}
|
|
976
|
-
function
|
|
979
|
+
function mt(e) {
|
|
977
980
|
return JSON.parse(JSON.stringify(e));
|
|
978
981
|
}
|
|
979
|
-
function
|
|
982
|
+
function ht(e, r, o = {}) {
|
|
980
983
|
const { window: t = ce, ...n } = o;
|
|
981
984
|
let s;
|
|
982
|
-
const l =
|
|
985
|
+
const l = pt(() => t && "ResizeObserver" in t), u = () => {
|
|
983
986
|
s && (s.disconnect(), s = void 0);
|
|
984
|
-
}, f =
|
|
987
|
+
}, f = J(() => {
|
|
985
988
|
const a = te(e);
|
|
986
|
-
return Array.isArray(a) ? a.map((
|
|
987
|
-
}), I =
|
|
989
|
+
return Array.isArray(a) ? a.map((E) => Y(E)) : [Y(a)];
|
|
990
|
+
}), I = N(
|
|
988
991
|
f,
|
|
989
992
|
(a) => {
|
|
990
|
-
if (
|
|
993
|
+
if (u(), l.value && t) {
|
|
991
994
|
s = new ResizeObserver(r);
|
|
992
|
-
for (const
|
|
993
|
-
|
|
995
|
+
for (const E of a)
|
|
996
|
+
E && s.observe(E, n);
|
|
994
997
|
}
|
|
995
998
|
},
|
|
996
999
|
{ immediate: !0, flush: "post" }
|
|
997
|
-
),
|
|
998
|
-
|
|
1000
|
+
), w = () => {
|
|
1001
|
+
u(), I();
|
|
999
1002
|
};
|
|
1000
|
-
return ve(
|
|
1003
|
+
return ve(w), {
|
|
1001
1004
|
isSupported: l,
|
|
1002
|
-
stop:
|
|
1005
|
+
stop: w
|
|
1003
1006
|
};
|
|
1004
1007
|
}
|
|
1005
|
-
function
|
|
1006
|
-
const { window: t = ce, box: n = "content-box" } = o, s =
|
|
1007
|
-
var a,
|
|
1008
|
-
return (
|
|
1009
|
-
}), l =
|
|
1008
|
+
function zt(e, r = { width: 0, height: 0 }, o = {}) {
|
|
1009
|
+
const { window: t = ce, box: n = "content-box" } = o, s = J(() => {
|
|
1010
|
+
var a, E;
|
|
1011
|
+
return (E = (a = Y(e)) == null ? void 0 : a.namespaceURI) == null ? void 0 : E.includes("svg");
|
|
1012
|
+
}), l = P(r.width), u = P(r.height), { stop: f } = ht(
|
|
1010
1013
|
e,
|
|
1011
1014
|
([a]) => {
|
|
1012
|
-
const
|
|
1015
|
+
const E = n === "border-box" ? a.borderBoxSize : n === "content-box" ? a.contentBoxSize : a.devicePixelContentBoxSize;
|
|
1013
1016
|
if (t && s.value) {
|
|
1014
1017
|
const p = Y(e);
|
|
1015
1018
|
if (p) {
|
|
1016
1019
|
const v = p.getBoundingClientRect();
|
|
1017
|
-
l.value = v.width,
|
|
1020
|
+
l.value = v.width, u.value = v.height;
|
|
1018
1021
|
}
|
|
1019
|
-
} else if (
|
|
1020
|
-
const p = Array.isArray(
|
|
1021
|
-
l.value = p.reduce((v, { inlineSize:
|
|
1022
|
+
} else if (E) {
|
|
1023
|
+
const p = Array.isArray(E) ? E : [E];
|
|
1024
|
+
l.value = p.reduce((v, { inlineSize: d }) => v + d, 0), u.value = p.reduce((v, { blockSize: d }) => v + d, 0);
|
|
1022
1025
|
} else
|
|
1023
|
-
l.value = a.contentRect.width,
|
|
1026
|
+
l.value = a.contentRect.width, u.value = a.contentRect.height;
|
|
1024
1027
|
},
|
|
1025
1028
|
o
|
|
1026
1029
|
);
|
|
1027
|
-
|
|
1030
|
+
it(() => {
|
|
1028
1031
|
const a = Y(e);
|
|
1029
|
-
a && (l.value = "offsetWidth" in a ? a.offsetWidth : r.width,
|
|
1032
|
+
a && (l.value = "offsetWidth" in a ? a.offsetWidth : r.width, u.value = "offsetHeight" in a ? a.offsetHeight : r.height);
|
|
1030
1033
|
});
|
|
1031
|
-
const I =
|
|
1034
|
+
const I = N(
|
|
1032
1035
|
() => Y(e),
|
|
1033
1036
|
(a) => {
|
|
1034
|
-
l.value = a ? r.width : 0,
|
|
1037
|
+
l.value = a ? r.width : 0, u.value = a ? r.height : 0;
|
|
1035
1038
|
}
|
|
1036
1039
|
);
|
|
1037
|
-
function
|
|
1040
|
+
function w() {
|
|
1038
1041
|
f(), I();
|
|
1039
1042
|
}
|
|
1040
1043
|
return {
|
|
1041
1044
|
width: l,
|
|
1042
|
-
height:
|
|
1043
|
-
stop:
|
|
1045
|
+
height: u,
|
|
1046
|
+
stop: w
|
|
1044
1047
|
};
|
|
1045
1048
|
}
|
|
1046
|
-
function
|
|
1049
|
+
function Jt(e, r, o, t = {}) {
|
|
1047
1050
|
var n, s, l;
|
|
1048
1051
|
const {
|
|
1049
|
-
clone:
|
|
1052
|
+
clone: u = !1,
|
|
1050
1053
|
passive: f = !1,
|
|
1051
1054
|
eventName: I,
|
|
1052
|
-
deep:
|
|
1055
|
+
deep: w = !1,
|
|
1053
1056
|
defaultValue: a,
|
|
1054
|
-
shouldEmit:
|
|
1057
|
+
shouldEmit: E
|
|
1055
1058
|
} = t, p = ae(), v = o || (p == null ? void 0 : p.emit) || ((n = p == null ? void 0 : p.$emit) == null ? void 0 : n.bind(p)) || ((l = (s = p == null ? void 0 : p.proxy) == null ? void 0 : s.$emit) == null ? void 0 : l.bind(p == null ? void 0 : p.proxy));
|
|
1056
|
-
let
|
|
1057
|
-
r || (r = "modelValue"),
|
|
1058
|
-
const O = (
|
|
1059
|
-
|
|
1059
|
+
let d = I;
|
|
1060
|
+
r || (r = "modelValue"), d = d || `update:${r.toString()}`;
|
|
1061
|
+
const O = (D) => u ? typeof u == "function" ? u(D) : mt(D) : D, M = () => ot(e[r]) ? O(e[r]) : a, h = (D) => {
|
|
1062
|
+
E ? E(D) && v(d, D) : v(d, D);
|
|
1060
1063
|
};
|
|
1061
1064
|
if (f) {
|
|
1062
|
-
const
|
|
1065
|
+
const D = M(), x = P(D);
|
|
1063
1066
|
let C = !1;
|
|
1064
|
-
return
|
|
1067
|
+
return N(
|
|
1065
1068
|
() => e[r],
|
|
1066
1069
|
(i) => {
|
|
1067
|
-
C || (C = !0,
|
|
1070
|
+
C || (C = !0, x.value = O(i), ne(() => C = !1));
|
|
1068
1071
|
}
|
|
1069
|
-
),
|
|
1070
|
-
|
|
1072
|
+
), N(
|
|
1073
|
+
x,
|
|
1071
1074
|
(i) => {
|
|
1072
|
-
!C && (i !== e[r] ||
|
|
1075
|
+
!C && (i !== e[r] || w) && h(i);
|
|
1073
1076
|
},
|
|
1074
|
-
{ deep:
|
|
1075
|
-
),
|
|
1077
|
+
{ deep: w }
|
|
1078
|
+
), x;
|
|
1076
1079
|
} else
|
|
1077
|
-
return
|
|
1080
|
+
return J({
|
|
1078
1081
|
get() {
|
|
1079
1082
|
return M();
|
|
1080
1083
|
},
|
|
1081
|
-
set(
|
|
1082
|
-
h(
|
|
1084
|
+
set(D) {
|
|
1085
|
+
h(D);
|
|
1083
1086
|
}
|
|
1084
1087
|
});
|
|
1085
1088
|
}
|
|
1086
|
-
function
|
|
1087
|
-
const { isDark: e } = ue(), r =
|
|
1089
|
+
function Wt() {
|
|
1090
|
+
const { isDark: e } = ue(), r = ct(e);
|
|
1088
1091
|
return {
|
|
1089
1092
|
isDark: e,
|
|
1090
1093
|
toggleDark: r
|
|
1091
1094
|
};
|
|
1092
1095
|
}
|
|
1093
|
-
function
|
|
1094
|
-
const e =
|
|
1096
|
+
function vt() {
|
|
1097
|
+
const e = P(!1);
|
|
1095
1098
|
return he(() => {
|
|
1096
|
-
|
|
1097
|
-
}),
|
|
1099
|
+
gt(e), yt(e);
|
|
1100
|
+
}), N(
|
|
1098
1101
|
() => e.value,
|
|
1099
1102
|
() => {
|
|
1100
1103
|
e.value ? document.documentElement.classList.add("dark") : document.documentElement.classList.remove("dark");
|
|
@@ -1103,11 +1106,11 @@ function mt() {
|
|
|
1103
1106
|
isDark: e
|
|
1104
1107
|
};
|
|
1105
1108
|
}
|
|
1106
|
-
function
|
|
1109
|
+
function gt(e) {
|
|
1107
1110
|
var r = document.documentElement;
|
|
1108
1111
|
r && (r.classList.contains("dark") ? e.value = !0 : e.value = !1);
|
|
1109
1112
|
}
|
|
1110
|
-
function
|
|
1113
|
+
function yt(e) {
|
|
1111
1114
|
var r = document.querySelector("html"), o = new MutationObserver(function(t) {
|
|
1112
1115
|
for (var n of t)
|
|
1113
1116
|
if (n.type === "attributes" && n.attributeName === "class") {
|
|
@@ -1122,8 +1125,8 @@ function vt(e) {
|
|
|
1122
1125
|
o.disconnect();
|
|
1123
1126
|
});
|
|
1124
1127
|
}
|
|
1125
|
-
function
|
|
1126
|
-
const e =
|
|
1128
|
+
function wt() {
|
|
1129
|
+
const e = P(1), r = P(!1), { isDark: o } = vt(), { pressSpace: t, pressShift: n, pressCtrl: s } = St();
|
|
1127
1130
|
return {
|
|
1128
1131
|
canvasScale: e,
|
|
1129
1132
|
pressSpace: t,
|
|
@@ -1133,9 +1136,9 @@ function yt() {
|
|
|
1133
1136
|
isDark: o
|
|
1134
1137
|
};
|
|
1135
1138
|
}
|
|
1136
|
-
const ue =
|
|
1137
|
-
function
|
|
1138
|
-
const e =
|
|
1139
|
+
const ue = tt(wt);
|
|
1140
|
+
function St() {
|
|
1141
|
+
const e = P(!1), r = P(!1), o = P(!1);
|
|
1139
1142
|
return de(" ", () => {
|
|
1140
1143
|
e.value = !0;
|
|
1141
1144
|
}), fe(" ", () => {
|
|
@@ -1150,7 +1153,7 @@ function gt() {
|
|
|
1150
1153
|
o.value = !1;
|
|
1151
1154
|
}), { pressSpace: e, pressShift: r, pressCtrl: o };
|
|
1152
1155
|
}
|
|
1153
|
-
function
|
|
1156
|
+
function Ht(e) {
|
|
1154
1157
|
const { pressSpace: r } = ue(), o = new Image(1, 1);
|
|
1155
1158
|
o.src = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==";
|
|
1156
1159
|
let t = 0, n = 0;
|
|
@@ -1161,15 +1164,15 @@ function zt(e) {
|
|
|
1161
1164
|
function l(f) {
|
|
1162
1165
|
if (f.preventDefault(), !f.x || !f.y || !r.value)
|
|
1163
1166
|
return;
|
|
1164
|
-
const I = f.x - t,
|
|
1165
|
-
t = f.x, n = f.y, e.value && (e.value.scrollTop -=
|
|
1167
|
+
const I = f.x - t, w = f.y - n;
|
|
1168
|
+
t = f.x, n = f.y, e.value && (e.value.scrollTop -= w, e.value.scrollLeft -= I);
|
|
1166
1169
|
}
|
|
1167
|
-
function
|
|
1170
|
+
function u() {
|
|
1168
1171
|
r.value = !1;
|
|
1169
1172
|
}
|
|
1170
|
-
return { handleElementDragStart: s, handleElementDrag: l, handleElementDragEnd:
|
|
1173
|
+
return { handleElementDragStart: s, handleElementDrag: l, handleElementDragEnd: u };
|
|
1171
1174
|
}
|
|
1172
|
-
function
|
|
1175
|
+
function Kt(e) {
|
|
1173
1176
|
const { pressCtrl: r, canvasScale: o, disabledZoom: t } = ue();
|
|
1174
1177
|
function n(s) {
|
|
1175
1178
|
if (!r.value || t.value)
|
|
@@ -1178,14 +1181,14 @@ function Wt(e) {
|
|
|
1178
1181
|
let l = 0;
|
|
1179
1182
|
s.deltaY < 0 ? l = o.value + 0.05 : l = o.value - 0.05, !(l > 150 || l < 0.5) && (o.value = l);
|
|
1180
1183
|
}
|
|
1181
|
-
return
|
|
1184
|
+
return N(
|
|
1182
1185
|
() => o.value,
|
|
1183
1186
|
(s) => {
|
|
1184
1187
|
e.value && !t.value && (e.value.style.transform = `scale(${s})`);
|
|
1185
1188
|
}
|
|
1186
1189
|
), { handleZoom: n, canvasScale: o };
|
|
1187
1190
|
}
|
|
1188
|
-
function
|
|
1191
|
+
function qt(e, r = 16.66) {
|
|
1189
1192
|
let o;
|
|
1190
1193
|
function t() {
|
|
1191
1194
|
n(), o = window.setInterval(e, r);
|
|
@@ -1198,50 +1201,50 @@ function Ht(e, r = 16.66) {
|
|
|
1198
1201
|
stopTimedQuery: n
|
|
1199
1202
|
};
|
|
1200
1203
|
}
|
|
1201
|
-
const
|
|
1204
|
+
const Dt = { class: "min-w-750px rounded" }, At = { class: "h-full rounded" }, Et = /* @__PURE__ */ ee({
|
|
1202
1205
|
__name: "index",
|
|
1203
1206
|
setup(e, { expose: r }) {
|
|
1204
|
-
const o = B.getComponent("monacoEditor"), t = B.getComponent("modal"), n =
|
|
1207
|
+
const o = B.getComponent("monacoEditor"), t = B.getComponent("modal"), n = P(null), s = P(!1), l = P(!1), u = P({}), f = Q("pageSchema"), I = P(null), w = P("");
|
|
1205
1208
|
function a() {
|
|
1206
1209
|
l.value = !1;
|
|
1207
1210
|
}
|
|
1208
|
-
function
|
|
1211
|
+
function E() {
|
|
1209
1212
|
s.value = !1;
|
|
1210
1213
|
}
|
|
1211
1214
|
function p() {
|
|
1212
|
-
s.value = !0,
|
|
1215
|
+
s.value = !0, w.value = ie();
|
|
1213
1216
|
}
|
|
1214
1217
|
async function v() {
|
|
1215
1218
|
try {
|
|
1216
|
-
let
|
|
1217
|
-
if (!Object.keys(
|
|
1219
|
+
let d = await I.value.validateAll();
|
|
1220
|
+
if (!Object.keys(d).length) {
|
|
1218
1221
|
alert("请添加表单组件后再尝试!");
|
|
1219
1222
|
return;
|
|
1220
1223
|
}
|
|
1221
|
-
Object.keys(
|
|
1224
|
+
Object.keys(d).length === 1 && (d = d.default), u.value = JSON.stringify(d, null, 2), ne(() => {
|
|
1222
1225
|
var O;
|
|
1223
|
-
(O = n.value) == null || O.setValue(
|
|
1226
|
+
(O = n.value) == null || O.setValue(u.value);
|
|
1224
1227
|
}), l.value = !0;
|
|
1225
|
-
} catch (
|
|
1226
|
-
console.error(
|
|
1228
|
+
} catch (d) {
|
|
1229
|
+
console.error(d);
|
|
1227
1230
|
}
|
|
1228
1231
|
}
|
|
1229
1232
|
return r({
|
|
1230
1233
|
handleOpen: p
|
|
1231
|
-
}), (
|
|
1234
|
+
}), (d, O) => (k(), K(R(t), {
|
|
1232
1235
|
modelValue: s.value,
|
|
1233
1236
|
"onUpdate:modelValue": O[1] || (O[1] = (M) => s.value = M),
|
|
1234
1237
|
title: "预览",
|
|
1235
1238
|
class: "w-900px",
|
|
1236
1239
|
width: "900px",
|
|
1237
|
-
onClose:
|
|
1240
|
+
onClose: E,
|
|
1238
1241
|
onOk: v,
|
|
1239
1242
|
okText: "表单数据"
|
|
1240
1243
|
}, {
|
|
1241
1244
|
default: $(() => [
|
|
1242
|
-
Z("div",
|
|
1243
|
-
(
|
|
1244
|
-
key:
|
|
1245
|
+
Z("div", Dt, [
|
|
1246
|
+
(k(), K(R(et), {
|
|
1247
|
+
key: w.value,
|
|
1245
1248
|
ref_key: "kb",
|
|
1246
1249
|
ref: I,
|
|
1247
1250
|
"page-schema": R(f)
|
|
@@ -1256,14 +1259,14 @@ const wt = { class: "min-w-750px rounded" }, St = { class: "h-full rounded" }, D
|
|
|
1256
1259
|
onOk: a
|
|
1257
1260
|
}, {
|
|
1258
1261
|
default: $(() => [
|
|
1259
|
-
Z("div",
|
|
1262
|
+
Z("div", At, [
|
|
1260
1263
|
H(R(o), {
|
|
1261
1264
|
ref_key: "monacoEditorRef",
|
|
1262
1265
|
ref: n,
|
|
1263
1266
|
autoToggleTheme: "",
|
|
1264
1267
|
readOnly: "",
|
|
1265
1268
|
class: "h-full editor",
|
|
1266
|
-
"model-value":
|
|
1269
|
+
"model-value": u.value
|
|
1267
1270
|
}, null, 8, ["model-value"])
|
|
1268
1271
|
])
|
|
1269
1272
|
]),
|
|
@@ -1274,10 +1277,10 @@ const wt = { class: "min-w-750px rounded" }, St = { class: "h-full rounded" }, D
|
|
|
1274
1277
|
_: 1
|
|
1275
1278
|
}, 8, ["modelValue"]));
|
|
1276
1279
|
}
|
|
1277
|
-
}),
|
|
1280
|
+
}), xt = {
|
|
1278
1281
|
key: 0,
|
|
1279
1282
|
class: "epic-loading-box"
|
|
1280
|
-
},
|
|
1283
|
+
}, It = { class: "epic-designer-main" }, bt = { class: "epic-header-container" }, Ct = { class: "epic-loading-box" }, Zt = /* @__PURE__ */ ee({
|
|
1281
1284
|
__name: "designer",
|
|
1282
1285
|
props: {
|
|
1283
1286
|
disabledZoom: { type: Boolean, default: !1 },
|
|
@@ -1300,7 +1303,7 @@ const wt = { class: "min-w-750px rounded" }, St = { class: "h-full rounded" }, D
|
|
|
1300
1303
|
"updateSourceData"
|
|
1301
1304
|
],
|
|
1302
1305
|
setup(e, { expose: r, emit: o }) {
|
|
1303
|
-
const t = X(() => import("./index-C-XUgjda.js")), n = X(() => import("./index-ASoFJnMl.js")), s = X(() => import("./index-
|
|
1306
|
+
const t = X(() => import("./index-C-XUgjda.js")), n = X(() => import("./index-ASoFJnMl.js")), s = X(() => import("./index-laQFS5Nd.js")), l = X(() => import("./index-ooVzYa5L.js")), u = X(() => import("./index-DgcFxYFp.js")), f = xe(), I = qe(), w = e;
|
|
1304
1307
|
let a = {
|
|
1305
1308
|
schemas: [
|
|
1306
1309
|
{
|
|
@@ -1348,79 +1351,79 @@ defineExpose({
|
|
|
1348
1351
|
})`
|
|
1349
1352
|
};
|
|
1350
1353
|
le(() => {
|
|
1351
|
-
if (
|
|
1352
|
-
a =
|
|
1354
|
+
if (w.defaultSchema) {
|
|
1355
|
+
a = w.defaultSchema;
|
|
1353
1356
|
return;
|
|
1354
1357
|
}
|
|
1355
|
-
|
|
1358
|
+
w.source && B.setSourceData(w.source), w.formMode && (a.schemas = B.formSchemas);
|
|
1356
1359
|
}), f.setDesignMode(), f.setDefaultComponentIds(a.schemas);
|
|
1357
|
-
const
|
|
1360
|
+
const E = o, p = P(null), v = j({
|
|
1358
1361
|
checkedNode: null,
|
|
1359
1362
|
hoverNode: null,
|
|
1360
1363
|
disableHover: !1,
|
|
1361
1364
|
matched: []
|
|
1362
|
-
}),
|
|
1365
|
+
}), d = j({
|
|
1363
1366
|
schemas: [],
|
|
1364
1367
|
script: a.script
|
|
1365
1368
|
}), { disabledZoom: O } = ue();
|
|
1366
1369
|
le(() => {
|
|
1367
|
-
O.value =
|
|
1370
|
+
O.value = w.disabledZoom;
|
|
1368
1371
|
}), le(() => {
|
|
1369
|
-
const
|
|
1370
|
-
|
|
1371
|
-
}), L("pageSchema",
|
|
1372
|
+
const S = d.script;
|
|
1373
|
+
S && S !== "" && f.setMethods(S);
|
|
1374
|
+
}), L("pageSchema", d), L("revoke", I), L("pageManager", f), L(
|
|
1372
1375
|
"designerProps",
|
|
1373
|
-
|
|
1376
|
+
J(() => w)
|
|
1374
1377
|
), L("designer", {
|
|
1375
1378
|
setCheckedNode: h,
|
|
1376
|
-
setHoverNode:
|
|
1379
|
+
setHoverNode: D,
|
|
1377
1380
|
setDisableHover: C,
|
|
1378
|
-
handleToggleDeviceMode:
|
|
1379
|
-
reset:
|
|
1381
|
+
handleToggleDeviceMode: g,
|
|
1382
|
+
reset: A,
|
|
1380
1383
|
state: v
|
|
1381
|
-
}), re.on("saveSourceData", (
|
|
1382
|
-
|
|
1383
|
-
}), re.on("deleteSourceData", (
|
|
1384
|
-
|
|
1385
|
-
}), re.on("updateSourceData", (
|
|
1386
|
-
|
|
1384
|
+
}), re.on("saveSourceData", (S) => {
|
|
1385
|
+
E("saveSourceData", S);
|
|
1386
|
+
}), re.on("deleteSourceData", (S) => {
|
|
1387
|
+
E("deleteSourceData", S);
|
|
1388
|
+
}), re.on("updateSourceData", (S) => {
|
|
1389
|
+
E("updateSourceData", S);
|
|
1387
1390
|
});
|
|
1388
1391
|
function M() {
|
|
1389
|
-
|
|
1392
|
+
d.schemas = z(a.schemas), h(d.schemas[0]), I.push(d.schemas, "初始化撤销功能");
|
|
1390
1393
|
}
|
|
1391
|
-
async function h(
|
|
1392
|
-
v.checkedNode =
|
|
1394
|
+
async function h(S = d.schemas[0]) {
|
|
1395
|
+
v.checkedNode = S, v.matched = We(d.schemas, S.id);
|
|
1393
1396
|
}
|
|
1394
|
-
async function S
|
|
1397
|
+
async function D(S = null) {
|
|
1395
1398
|
var U;
|
|
1396
|
-
if (!
|
|
1399
|
+
if (!S || v.disableHover)
|
|
1397
1400
|
return v.hoverNode = null, !1;
|
|
1398
|
-
if ((
|
|
1401
|
+
if ((S == null ? void 0 : S.id) === ((U = v.hoverNode) == null ? void 0 : U.id))
|
|
1399
1402
|
return !1;
|
|
1400
|
-
v.hoverNode =
|
|
1403
|
+
v.hoverNode = S;
|
|
1401
1404
|
}
|
|
1402
|
-
function
|
|
1405
|
+
function x() {
|
|
1403
1406
|
ne(() => {
|
|
1404
|
-
|
|
1407
|
+
E("ready", { pageManager: f });
|
|
1405
1408
|
});
|
|
1406
1409
|
}
|
|
1407
|
-
async function C(
|
|
1408
|
-
v.disableHover =
|
|
1410
|
+
async function C(S = !1) {
|
|
1411
|
+
v.disableHover = S;
|
|
1409
1412
|
}
|
|
1410
|
-
function i(
|
|
1411
|
-
G(
|
|
1413
|
+
function i(S) {
|
|
1414
|
+
G(d, z(S));
|
|
1412
1415
|
}
|
|
1413
1416
|
function F() {
|
|
1414
|
-
return
|
|
1417
|
+
return ye(d);
|
|
1415
1418
|
}
|
|
1416
|
-
function
|
|
1417
|
-
Ee(
|
|
1419
|
+
function A() {
|
|
1420
|
+
Ee(d.schemas, a.schemas) && d.script === a.script || (G(d.schemas, a.schemas), d.script = a.script, h(d.schemas[0]), I.push(d.schemas, "重置操作"), E("reset", d));
|
|
1418
1421
|
}
|
|
1419
|
-
function
|
|
1420
|
-
|
|
1422
|
+
function c() {
|
|
1423
|
+
E("save", ye(d));
|
|
1421
1424
|
}
|
|
1422
|
-
function
|
|
1423
|
-
|
|
1425
|
+
function g(S) {
|
|
1426
|
+
E("toggleDeviceMode", S);
|
|
1424
1427
|
}
|
|
1425
1428
|
function W() {
|
|
1426
1429
|
p.value.handleOpen();
|
|
@@ -1429,66 +1432,66 @@ defineExpose({
|
|
|
1429
1432
|
revoke: I,
|
|
1430
1433
|
setData: i,
|
|
1431
1434
|
getData: F,
|
|
1432
|
-
reset:
|
|
1435
|
+
reset: A,
|
|
1433
1436
|
preview: W
|
|
1434
|
-
}), (
|
|
1437
|
+
}), (S, U) => R(B).initialized.value ? (k(), K(Ae, {
|
|
1435
1438
|
key: 1,
|
|
1436
|
-
onResolve:
|
|
1439
|
+
onResolve: x
|
|
1437
1440
|
}, {
|
|
1438
1441
|
default: $(() => [
|
|
1439
|
-
Z("div",
|
|
1442
|
+
Z("div", It, [
|
|
1440
1443
|
Z("div", bt, [
|
|
1441
|
-
T(
|
|
1442
|
-
|
|
1444
|
+
T(S.$slots, "header", {}, () => [
|
|
1445
|
+
w.hiddenHeader ? De("", !0) : (k(), K(R(t), {
|
|
1443
1446
|
key: 0,
|
|
1444
1447
|
onPreview: W,
|
|
1445
|
-
onSave:
|
|
1448
|
+
onSave: c
|
|
1446
1449
|
}, {
|
|
1447
1450
|
header: $(() => [
|
|
1448
|
-
T(
|
|
1451
|
+
T(S.$slots, "header-prefix")
|
|
1449
1452
|
]),
|
|
1450
1453
|
prefix: $(() => [
|
|
1451
|
-
T(
|
|
1454
|
+
T(S.$slots, "header-prefix")
|
|
1452
1455
|
]),
|
|
1453
1456
|
title: $(() => [
|
|
1454
|
-
T(
|
|
1457
|
+
T(S.$slots, "header-title")
|
|
1455
1458
|
]),
|
|
1456
1459
|
"right-prefix": $(() => [
|
|
1457
|
-
T(
|
|
1460
|
+
T(S.$slots, "header-right-prefix")
|
|
1458
1461
|
]),
|
|
1459
1462
|
"right-action": $(() => [
|
|
1460
|
-
T(
|
|
1463
|
+
T(S.$slots, "header-right-action")
|
|
1461
1464
|
]),
|
|
1462
1465
|
"right-suffix": $(() => [
|
|
1463
|
-
T(
|
|
1466
|
+
T(S.$slots, "header-right-suffix")
|
|
1464
1467
|
]),
|
|
1465
1468
|
_: 3
|
|
1466
1469
|
}))
|
|
1467
1470
|
])
|
|
1468
1471
|
]),
|
|
1469
1472
|
Z("div", {
|
|
1470
|
-
class:
|
|
1473
|
+
class: ze(["epic-split-view-container", { "hidden-header": S.hiddenHeader }])
|
|
1471
1474
|
}, [
|
|
1472
1475
|
H(R(n)),
|
|
1473
1476
|
H(R(s)),
|
|
1474
1477
|
H(R(l))
|
|
1475
1478
|
], 2),
|
|
1476
|
-
H(
|
|
1479
|
+
H(Et, {
|
|
1477
1480
|
ref_key: "previewRef",
|
|
1478
1481
|
ref: p
|
|
1479
1482
|
}, null, 512)
|
|
1480
1483
|
])
|
|
1481
1484
|
]),
|
|
1482
1485
|
fallback: $(() => [
|
|
1483
|
-
Z("div",
|
|
1484
|
-
H(R(
|
|
1486
|
+
Z("div", Ct, [
|
|
1487
|
+
H(R(u))
|
|
1485
1488
|
])
|
|
1486
1489
|
]),
|
|
1487
1490
|
_: 3
|
|
1488
|
-
})) : (
|
|
1491
|
+
})) : (k(), me("div", xt));
|
|
1489
1492
|
}
|
|
1490
|
-
}),
|
|
1491
|
-
component: async () => await import("./index-
|
|
1493
|
+
}), _t = {
|
|
1494
|
+
component: async () => await import("./index-C95DVYrN.js"),
|
|
1492
1495
|
defaultSchema: {
|
|
1493
1496
|
label: "代码编辑器",
|
|
1494
1497
|
type: "monacoEditor",
|
|
@@ -1516,7 +1519,7 @@ defineExpose({
|
|
|
1516
1519
|
]
|
|
1517
1520
|
},
|
|
1518
1521
|
bindModel: "model-value"
|
|
1519
|
-
},
|
|
1522
|
+
}, Pt = {
|
|
1520
1523
|
component: async () => await import("./index-DiDIFoTk.js"),
|
|
1521
1524
|
defaultSchema: {
|
|
1522
1525
|
label: "页面",
|
|
@@ -1537,12 +1540,12 @@ defineExpose({
|
|
|
1537
1540
|
]
|
|
1538
1541
|
}
|
|
1539
1542
|
};
|
|
1540
|
-
function
|
|
1541
|
-
e.component("EInputSize", async () => await import("./index-C4sdhgF2.js")), e.component("EColEditor", async () => await import("./index-
|
|
1543
|
+
function Ot(e) {
|
|
1544
|
+
e.component("EInputSize", async () => await import("./index-C4sdhgF2.js")), e.component("EColEditor", async () => await import("./index-Da8OPaOM.js")), e.component("EActionEditor", async () => await import("./index-l1DO3QH_.js")), e.component("ERuleEditor", async () => await import("./index-DxkPriDk.js")), e.component("EOptionsEditor", async () => await import("./index-CE7JKdc3.js")), e.component("ENode", async () => await import("./index-Cpm-oLdy.js")), e.component("EDataSource", async () => await import("./index-CCTMCqiz.js")), e.registerActivitybar({
|
|
1542
1545
|
id: "component_view",
|
|
1543
1546
|
title: "组件",
|
|
1544
1547
|
icon: "icon--epic--extension-outline",
|
|
1545
|
-
component: async () => await import("./index-
|
|
1548
|
+
component: async () => await import("./index-5datIIzJ.js")
|
|
1546
1549
|
}), e.registerActivitybar({
|
|
1547
1550
|
id: "outline_view",
|
|
1548
1551
|
title: "大纲",
|
|
@@ -1551,51 +1554,51 @@ function _t(e) {
|
|
|
1551
1554
|
}), e.registerRightSidebar({
|
|
1552
1555
|
id: "attribute_view",
|
|
1553
1556
|
title: "属性",
|
|
1554
|
-
component: async () => await import("./attributeView-
|
|
1557
|
+
component: async () => await import("./attributeView-PbDEjn8T.js")
|
|
1555
1558
|
}), e.registerRightSidebar({
|
|
1556
1559
|
id: "style_view",
|
|
1557
1560
|
title: "样式",
|
|
1558
|
-
component: async () => await import("./styleView-
|
|
1559
|
-
}), [
|
|
1561
|
+
component: async () => await import("./styleView-LX_E7EFf.js")
|
|
1562
|
+
}), [_t, Pt].forEach((o) => {
|
|
1560
1563
|
e.registerComponent(o);
|
|
1561
1564
|
});
|
|
1562
1565
|
}
|
|
1563
|
-
|
|
1566
|
+
Ot(B);
|
|
1564
1567
|
export {
|
|
1565
|
-
|
|
1568
|
+
He as A,
|
|
1566
1569
|
se as B,
|
|
1567
|
-
|
|
1570
|
+
Ke as C,
|
|
1568
1571
|
oe as D,
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1572
|
+
Je as E,
|
|
1573
|
+
St as F,
|
|
1574
|
+
vt as G,
|
|
1575
|
+
gt as H,
|
|
1576
|
+
wt as I,
|
|
1577
|
+
Ge as _,
|
|
1578
|
+
qt as a,
|
|
1579
|
+
ht as b,
|
|
1580
|
+
Ut as c,
|
|
1578
1581
|
G as d,
|
|
1579
|
-
|
|
1582
|
+
Ht as e,
|
|
1580
1583
|
kt as f,
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1584
|
+
Mt as g,
|
|
1585
|
+
zt as h,
|
|
1586
|
+
Kt as i,
|
|
1587
|
+
Tt as j,
|
|
1585
1588
|
ie as k,
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1589
|
+
Bt as l,
|
|
1590
|
+
z as m,
|
|
1591
|
+
Jt as n,
|
|
1592
|
+
Rt as o,
|
|
1593
|
+
Wt as p,
|
|
1594
|
+
et as q,
|
|
1595
|
+
Zt as r,
|
|
1596
|
+
$t as s,
|
|
1597
|
+
xe as t,
|
|
1595
1598
|
ue as u,
|
|
1596
|
-
|
|
1597
|
-
|
|
1599
|
+
qe as v,
|
|
1600
|
+
Lt as w,
|
|
1598
1601
|
Ee as x,
|
|
1599
|
-
|
|
1600
|
-
|
|
1602
|
+
We as y,
|
|
1603
|
+
Nt as z
|
|
1601
1604
|
};
|