epic-designer-gold 0.0.47 → 0.0.48
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-CA-6yB0k.cjs → attributeView-CMbZBZIS.cjs} +1 -1
- package/dist/{attributeView-C75ra3CN.js → attributeView-DvYRuXDB.js} +1 -1
- package/dist/{index-9VqDmCT_.cjs → index-2_PG24En.cjs} +1 -1
- package/dist/{index-Bdnc9TGH.cjs → index-3oFTJubt.cjs} +1 -1
- package/dist/{index-B-Uox2mn.cjs → index-BIfS14i1.cjs} +1 -1
- package/dist/{index-M3HldxkA.js → index-BizWKLWZ.js} +1 -1
- package/dist/{index-DwDY6KkH.js → index-Bjj1uygU.js} +1 -1
- package/dist/{index-BGT2-jZP.cjs → index-BsyFZeFI.cjs} +1 -1
- package/dist/{index-0RqJEjlH.cjs → index-C8eSqkwT.cjs} +1 -1
- package/dist/index-CqirvAEP.js +4 -0
- package/dist/index-CtK_8YxJ.cjs +10 -0
- package/dist/{index-CML-aVic.js → index-D0xByXxW.js} +1 -1
- package/dist/{index-CvIjQtJw.js → index-DiYy4kUz.js} +1 -1
- package/dist/{index-Bgvfahgd.js → index-Dy65ngnp.js} +223 -223
- package/dist/{index-baUE53XK.cjs → index-FUj4O0Wm.cjs} +1 -1
- package/dist/{index-C32P7cCc.js → index-SmoMBzHL.js} +1 -1
- package/dist/{index-BgTlZ9gW.js → index-WBW2xl-M.js} +1 -1
- package/dist/{index-BbCEtCJA.cjs → index-YV7i1gyI.cjs} +1 -1
- package/dist/{index-BHWJ1KwT.js → index-ijn3b5rF.js} +1 -1
- package/dist/{index-Bmo9n7ut.cjs → index-zyeRTxj7.cjs} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{styleView-cuoX6XX4.js → styleView-BbQxI-Nr.js} +1 -1
- package/dist/{styleView-CXdgqy6O.cjs → styleView-CF34Ddn9.cjs} +1 -1
- package/package.json +1 -1
- package/dist/index-BRZDZuxE.js +0 -4
- package/dist/index-ETJEJKM_.cjs +0 -10
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ref as
|
|
1
|
+
import { ref as P, reactive as ne, defineComponent as oe, openBlock as T, createBlock as K, unref as R, mergeProps as he, withCtx as $, renderSlot as L, getCurrentInstance as ie, inject as Y, watch as B, useAttrs as Ve, provide as z, shallowRef as Fe, computed as k, watchEffect as ce, onUnmounted as Ae, resolveComponent as Me, resolveDynamicComponent as Re, createVNode as H, createCommentVNode as Ee, useSlots as $e, createElementBlock as ve, Suspense as be, createElementVNode as Z, Fragment as Be, renderList as Ne, nextTick as se, effectScope as Ue, isRef as Te, getCurrentScope as Le, onScopeDispose as ze, onMounted as ge, normalizeClass as Je, toRaw as we } from "vue";
|
|
2
2
|
import { p as U, E as te, a as Se, b as De, l as ee } from "./js.cookie-oHpRFPCO.js";
|
|
3
3
|
function ue(e = 10) {
|
|
4
4
|
const r = "abcdefghijklmnopqrstuvwxyz0123456789";
|
|
@@ -9,25 +9,25 @@ function ue(e = 10) {
|
|
|
9
9
|
}
|
|
10
10
|
return o;
|
|
11
11
|
}
|
|
12
|
-
function
|
|
12
|
+
function ke(e) {
|
|
13
13
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function J(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) => J(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] = J(e[t], r);
|
|
27
27
|
}), o;
|
|
28
28
|
}
|
|
29
29
|
function Mt(e) {
|
|
30
|
-
const [r] = Ke([
|
|
30
|
+
const [r] = Ke([J(e)], (o) => {
|
|
31
31
|
var n, s;
|
|
32
32
|
const t = {
|
|
33
33
|
...o,
|
|
@@ -221,7 +221,7 @@ function Tt(e) {
|
|
|
221
221
|
}
|
|
222
222
|
function ae(e, r) {
|
|
223
223
|
return e.map((o) => {
|
|
224
|
-
var f, b,
|
|
224
|
+
var f, b, w;
|
|
225
225
|
let t = o.type ?? "";
|
|
226
226
|
const n = o.options ?? {}, s = (a, D) => {
|
|
227
227
|
t === a && (t = D, n.defaultValue && (n.defaultValue = JSON.parse(n.defaultValue)));
|
|
@@ -255,7 +255,7 @@ function ae(e, r) {
|
|
|
255
255
|
"color-picker",
|
|
256
256
|
"upload-file",
|
|
257
257
|
"upload-image"
|
|
258
|
-
].includes(t) && (i.input = !0, ((b = (f = o.rules) == null ? void 0 : f[0]) == null ? void 0 : b.required) === !1 && o.rules.shift(), ((
|
|
258
|
+
].includes(t) && (i.input = !0, ((b = (f = o.rules) == null ? void 0 : f[0]) == null ? void 0 : b.required) === !1 && o.rules.shift(), ((w = o.rules) == null ? void 0 : w.length) > 0 && (i.rules = o.rules)), o.list && (i.children = ae(o.list, o)), o.columns && (i.children = ae(o.columns, o)), o.trs && (i.children = ae(o.trs, o)), o.tds && (i.children = ae(o.tds, o)), i;
|
|
259
259
|
});
|
|
260
260
|
}
|
|
261
261
|
function Lt(e, r) {
|
|
@@ -267,7 +267,7 @@ function Lt(e, r) {
|
|
|
267
267
|
};
|
|
268
268
|
}
|
|
269
269
|
function Ie() {
|
|
270
|
-
const e =
|
|
270
|
+
const e = P({}), r = P({}), o = P(!1), t = P([]), n = ne({});
|
|
271
271
|
function s(m) {
|
|
272
272
|
return e.value[m];
|
|
273
273
|
}
|
|
@@ -298,7 +298,7 @@ function Ie() {
|
|
|
298
298
|
function b(m) {
|
|
299
299
|
m != null && (r.value = m);
|
|
300
300
|
}
|
|
301
|
-
function
|
|
301
|
+
function w(m, ...S) {
|
|
302
302
|
if (!m || m.length === 0) {
|
|
303
303
|
console.warn("未提供任何动作");
|
|
304
304
|
return;
|
|
@@ -349,7 +349,7 @@ function Ie() {
|
|
|
349
349
|
console.error(`[Epic:组件${m.componentId}函数(${m.methodName})]执行异常:`, _);
|
|
350
350
|
}
|
|
351
351
|
}
|
|
352
|
-
function
|
|
352
|
+
function v(m = !0) {
|
|
353
353
|
o.value = m;
|
|
354
354
|
}
|
|
355
355
|
function d(m) {
|
|
@@ -384,17 +384,17 @@ function Ie() {
|
|
|
384
384
|
addComponentInstance: i,
|
|
385
385
|
removeComponentInstance: u,
|
|
386
386
|
setMethods: f,
|
|
387
|
-
doActions:
|
|
388
|
-
setDesignMode:
|
|
387
|
+
doActions: w,
|
|
388
|
+
setDesignMode: v,
|
|
389
389
|
setDefaultComponentIds: d
|
|
390
390
|
};
|
|
391
391
|
}
|
|
392
392
|
function qe() {
|
|
393
|
-
const e =
|
|
393
|
+
const e = P([]), r = P([]), o = P(null);
|
|
394
394
|
let t = 0;
|
|
395
395
|
function n(f, b = "插入组件") {
|
|
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: b,
|
|
399
399
|
componentSchema: JSON.stringify(f)
|
|
400
400
|
}, e.value.length > 60 && e.value.unshift());
|
|
@@ -432,7 +432,7 @@ const Ze = /* @__PURE__ */ oe({
|
|
|
432
432
|
},
|
|
433
433
|
emits: ["updateFormItemRef"],
|
|
434
434
|
setup(e, { emit: r }) {
|
|
435
|
-
const o = U.getComponent("form-item"), t = e, n = r, s =
|
|
435
|
+
const o = U.getComponent("form-item"), t = e, n = r, s = P(), i = () => {
|
|
436
436
|
n("updateFormItemRef", s.value);
|
|
437
437
|
};
|
|
438
438
|
return (u, f) => t.hasFormItem ? (T(), K(R(o), he({
|
|
@@ -462,14 +462,14 @@ const Ze = /* @__PURE__ */ oe({
|
|
|
462
462
|
},
|
|
463
463
|
emits: ["update:modelValue", "change", "update:dynamicId"],
|
|
464
464
|
setup(e, { emit: r }) {
|
|
465
|
-
const { proxy: o } = ie(), t = e, n =
|
|
465
|
+
const { proxy: o } = ie(), t = e, n = P(null);
|
|
466
466
|
let s = Y("formData", ne({}));
|
|
467
|
-
const i = Y("slots", {}), u = Y("pageManager", {}), f = Y("disabled", { value: !1 }), b = Y("ruleFieldPrefix", null),
|
|
468
|
-
let a = ne(
|
|
469
|
-
|
|
467
|
+
const i = Y("slots", {}), u = Y("pageManager", {}), f = Y("disabled", { value: !1 }), b = Y("ruleFieldPrefix", null), w = Y("resetFormData", !1);
|
|
468
|
+
let a = ne(J(t.componentSchema));
|
|
469
|
+
v();
|
|
470
470
|
async function D(l) {
|
|
471
471
|
if (["cascader", "checkbox", "select", "radio"].includes(l.type) && l.componentProps.dynamicId && t.sourceDateUrl) {
|
|
472
|
-
const
|
|
472
|
+
const h = (await Se({
|
|
473
473
|
// || "http://192.168.28.205:3000/dev-api/data-source
|
|
474
474
|
url: t.sourceDateUrl,
|
|
475
475
|
method: "get",
|
|
@@ -480,84 +480,84 @@ const Ze = /* @__PURE__ */ oe({
|
|
|
480
480
|
Authorization: "Bearer " + De.get("Admin-Token")
|
|
481
481
|
}
|
|
482
482
|
})).data.data;
|
|
483
|
-
let
|
|
484
|
-
url:
|
|
485
|
-
method:
|
|
486
|
-
data: JSON.parse(
|
|
487
|
-
params: JSON.parse(
|
|
483
|
+
let C = await Se({
|
|
484
|
+
url: h.url,
|
|
485
|
+
method: h.method,
|
|
486
|
+
data: JSON.parse(h.body),
|
|
487
|
+
params: JSON.parse(h.params),
|
|
488
488
|
headers: {
|
|
489
|
-
...JSON.parse(
|
|
489
|
+
...JSON.parse(h.headers),
|
|
490
490
|
Authorization: "Bearer " + De.get("Admin-Token")
|
|
491
491
|
}
|
|
492
492
|
});
|
|
493
|
-
if (
|
|
494
|
-
const
|
|
495
|
-
l.componentProps.options = p(
|
|
493
|
+
if (h && (h != null && h.dataPath)) {
|
|
494
|
+
const Oe = h.dataPath.split(".").reduce((_e, Pe) => _e[Pe], C.data);
|
|
495
|
+
l.componentProps.options = p(Oe, h.dataKey, h.dataValue);
|
|
496
496
|
} else
|
|
497
|
-
l.componentProps.options = p(
|
|
497
|
+
l.componentProps.options = p(C.data, h.dataKey, h.dataValue);
|
|
498
498
|
return l;
|
|
499
499
|
}
|
|
500
500
|
return l;
|
|
501
501
|
}
|
|
502
|
-
function p(l, I,
|
|
503
|
-
return l && Object.prototype.toString.call(l) === "[object Array]" ? l.map((
|
|
504
|
-
label:
|
|
505
|
-
value:
|
|
506
|
-
children: p(
|
|
502
|
+
function p(l, I, O) {
|
|
503
|
+
return l && Object.prototype.toString.call(l) === "[object Array]" ? l.map((h) => h.children && h.children.length ? {
|
|
504
|
+
label: h[I],
|
|
505
|
+
value: h[O] + "",
|
|
506
|
+
children: p(h.children, I, O)
|
|
507
507
|
} : {
|
|
508
|
-
label:
|
|
509
|
-
value:
|
|
508
|
+
label: h[I],
|
|
509
|
+
value: h[O] + ""
|
|
510
510
|
}) : [];
|
|
511
511
|
}
|
|
512
512
|
B(
|
|
513
513
|
() => t.componentSchema,
|
|
514
514
|
(l) => {
|
|
515
|
-
xe(a, l, ["children"]) || (G(a,
|
|
515
|
+
xe(a, l, ["children"]) || (G(a, J(l)), v());
|
|
516
516
|
},
|
|
517
517
|
{
|
|
518
518
|
deep: !0
|
|
519
519
|
}
|
|
520
520
|
);
|
|
521
|
-
function
|
|
521
|
+
function v() {
|
|
522
522
|
u.isDesignMode.value && typeof a.field == "string" && (a.field += "-design-mode");
|
|
523
523
|
}
|
|
524
|
-
(t.resetFormData ||
|
|
525
|
-
const d = r, V =
|
|
524
|
+
(t.resetFormData || w) && (s = {});
|
|
525
|
+
const d = r, V = P(), M = P(), m = (l) => {
|
|
526
526
|
M.value = l;
|
|
527
527
|
}, S = Ve();
|
|
528
|
-
Object.keys(S).length &&
|
|
529
|
-
const E = Fe(null), _ =
|
|
528
|
+
Object.keys(S).length && z("nodeAttrs", S);
|
|
529
|
+
const E = Fe(null), _ = k(() => {
|
|
530
530
|
var l, I;
|
|
531
531
|
return (l = a.componentProps) != null && l.hidden ? !1 : typeof a.show == "boolean" ? a.show : ((I = a.show) == null ? void 0 : I.call(a, { values: s })) ?? !0;
|
|
532
|
-
}), c =
|
|
533
|
-
var
|
|
534
|
-
const l = _.value && ((
|
|
535
|
-
...
|
|
536
|
-
validator:
|
|
532
|
+
}), c = k(() => {
|
|
533
|
+
var h;
|
|
534
|
+
const l = _.value && ((h = a.rules) == null ? void 0 : h.map((C) => ({
|
|
535
|
+
...C,
|
|
536
|
+
validator: C.validator && u.funcs.value[C.validator]
|
|
537
537
|
// 自定义校验函数
|
|
538
538
|
})));
|
|
539
539
|
let I = a.field;
|
|
540
|
-
t.ruleField ? I = t.ruleField : b && a.field && (I =
|
|
541
|
-
const
|
|
540
|
+
t.ruleField ? I = t.ruleField : b && a.field && (I = J(b), I.push(a.field));
|
|
541
|
+
const O = {
|
|
542
542
|
...a,
|
|
543
543
|
rules: l,
|
|
544
544
|
rule: l,
|
|
545
545
|
field: I
|
|
546
546
|
};
|
|
547
|
-
return
|
|
548
|
-
}), F =
|
|
549
|
-
var
|
|
550
|
-
const l = ((
|
|
551
|
-
return a.on && Object.keys(a.on).forEach((
|
|
552
|
-
I[`on${
|
|
547
|
+
return O.children && delete O.children, O;
|
|
548
|
+
}), F = k(() => {
|
|
549
|
+
var O, h;
|
|
550
|
+
const l = ((O = y.value) == null ? void 0 : O.bindModel) ?? "modelValue", I = {};
|
|
551
|
+
return a.on && Object.keys(a.on).forEach((C) => {
|
|
552
|
+
I[`on${ke(C)}`] = (...j) => u.doActions(a.on[C], ...j);
|
|
553
553
|
}), {
|
|
554
554
|
...t,
|
|
555
555
|
...a.componentProps,
|
|
556
|
-
disabled: (f == null ? void 0 : f.value) || ((
|
|
556
|
+
disabled: (f == null ? void 0 : f.value) || ((h = a.componentProps) == null ? void 0 : h.disabled),
|
|
557
557
|
bindModel: l,
|
|
558
558
|
...I
|
|
559
559
|
};
|
|
560
|
-
}),
|
|
560
|
+
}), y = k(() => U.getComponentConfingByType(a.type) ?? null);
|
|
561
561
|
ce(() => {
|
|
562
562
|
n.value = t.modelValue ?? s[a.field ?? ""];
|
|
563
563
|
}), B(
|
|
@@ -575,24 +575,24 @@ const Ze = /* @__PURE__ */ oe({
|
|
|
575
575
|
function x() {
|
|
576
576
|
var I;
|
|
577
577
|
const l = V.value || o;
|
|
578
|
-
a.id && l && (a.input && (l.setValue = N, l.getValue = () => s[a.field] || t.modelValue), l.setAttr = (
|
|
578
|
+
a.id && l && (a.input && (l.setValue = N, l.getValue = () => s[a.field] || t.modelValue), l.setAttr = (O, h) => (a.componentProps || (a.componentProps = {}), a.componentProps[O] = h), l.getAttr = (O) => a.componentProps[O], u.addComponentInstance(a.id, l), (I = y.value) != null && I.defaultSchema.input && a.noFormItem !== !0 && M.value && u.addComponentInstance(a.id + "formItem", M.value));
|
|
579
579
|
}
|
|
580
|
-
function
|
|
580
|
+
function g() {
|
|
581
581
|
var l;
|
|
582
|
-
a.id && (u.removeComponentInstance(a.id), (l =
|
|
582
|
+
a.id && (u.removeComponentInstance(a.id), (l = y.value) != null && l.defaultSchema.input && a.noFormItem !== !0 && u.removeComponentInstance(a.id + "formItem"));
|
|
583
583
|
}
|
|
584
584
|
async function W() {
|
|
585
|
-
var I,
|
|
585
|
+
var I, O, h;
|
|
586
586
|
if (a = await D(a), typeof ((I = a.componentProps) == null ? void 0 : I.defaultValue) < "u") {
|
|
587
|
-
const
|
|
588
|
-
N(
|
|
587
|
+
const C = u.isDesignMode.value ? (O = a.componentProps) == null ? void 0 : O.defaultValue : s[a.field] ?? ((h = a.componentProps) == null ? void 0 : h.defaultValue);
|
|
588
|
+
N(J(C));
|
|
589
589
|
}
|
|
590
590
|
if (a.type === "slot") {
|
|
591
|
-
const
|
|
592
|
-
if (!
|
|
591
|
+
const C = a.slotName;
|
|
592
|
+
if (!C) return;
|
|
593
593
|
E.value = oe({
|
|
594
594
|
setup() {
|
|
595
|
-
return () => L(i,
|
|
595
|
+
return () => L(i, C, {
|
|
596
596
|
componentSchema: a,
|
|
597
597
|
model: s
|
|
598
598
|
});
|
|
@@ -606,8 +606,8 @@ const Ze = /* @__PURE__ */ oe({
|
|
|
606
606
|
return;
|
|
607
607
|
}
|
|
608
608
|
if (typeof l == "function") {
|
|
609
|
-
const
|
|
610
|
-
E.value =
|
|
609
|
+
const C = await l();
|
|
610
|
+
E.value = C.default ?? C;
|
|
611
611
|
} else
|
|
612
612
|
E.value = l;
|
|
613
613
|
}
|
|
@@ -642,12 +642,12 @@ const Ze = /* @__PURE__ */ oe({
|
|
|
642
642
|
immediate: !0,
|
|
643
643
|
deep: !0
|
|
644
644
|
}
|
|
645
|
-
), Ae(
|
|
646
|
-
var
|
|
647
|
-
const
|
|
645
|
+
), Ae(g), (l, I) => {
|
|
646
|
+
var h;
|
|
647
|
+
const O = Me("ENode");
|
|
648
648
|
return E.value && _.value ? (T(), K(Ze, {
|
|
649
649
|
key: 0,
|
|
650
|
-
hasFormItem: R(a).noFormItem !== !0 && ((
|
|
650
|
+
hasFormItem: R(a).noFormItem !== !0 && ((h = y.value) == null ? void 0 : h.defaultSchema.input),
|
|
651
651
|
formItemProps: c.value,
|
|
652
652
|
onUpdateFormItemRef: m
|
|
653
653
|
}, {
|
|
@@ -659,15 +659,15 @@ const Ze = /* @__PURE__ */ oe({
|
|
|
659
659
|
model: R(s)
|
|
660
660
|
}, { ...F.value }, {
|
|
661
661
|
[F.value.bindModel]: n.value,
|
|
662
|
-
["onUpdate:" + F.value.bindModel]: I[0] || (I[0] = (
|
|
662
|
+
["onUpdate:" + F.value.bindModel]: I[0] || (I[0] = (C) => n.value = C),
|
|
663
663
|
[`onUpdate:${F.value.bindModel}` || ""]: N,
|
|
664
664
|
"onUpdate:modelValueLabel": A,
|
|
665
665
|
"onUpdate:dynamicId": Q
|
|
666
666
|
}), {
|
|
667
|
-
node: $((
|
|
668
|
-
H(
|
|
667
|
+
node: $((C) => [
|
|
668
|
+
H(O, he({
|
|
669
669
|
id: t.id
|
|
670
|
-
},
|
|
670
|
+
}, C, {
|
|
671
671
|
sourceDateUrl: t.sourceDateUrl
|
|
672
672
|
}), null, 16, ["id", "sourceDateUrl"])
|
|
673
673
|
]),
|
|
@@ -683,14 +683,14 @@ const Ze = /* @__PURE__ */ oe({
|
|
|
683
683
|
}
|
|
684
684
|
});
|
|
685
685
|
function Qe() {
|
|
686
|
-
const e =
|
|
686
|
+
const e = P(!1), r = Ie(), o = P({});
|
|
687
687
|
function t() {
|
|
688
688
|
return new Promise((p) => {
|
|
689
689
|
if (e.value)
|
|
690
690
|
p();
|
|
691
691
|
else {
|
|
692
|
-
const
|
|
693
|
-
|
|
692
|
+
const v = B(e, () => {
|
|
693
|
+
v(), p();
|
|
694
694
|
});
|
|
695
695
|
}
|
|
696
696
|
});
|
|
@@ -698,73 +698,73 @@ function Qe() {
|
|
|
698
698
|
async function n(p = "default") {
|
|
699
699
|
var d;
|
|
700
700
|
await t();
|
|
701
|
-
const
|
|
702
|
-
if (!
|
|
703
|
-
return
|
|
701
|
+
const v = (d = o.value) == null ? void 0 : d[p];
|
|
702
|
+
if (!v) throw new Error(`表单 [name=${p}] 不存在`);
|
|
703
|
+
return v;
|
|
704
704
|
}
|
|
705
|
-
async function s(p,
|
|
705
|
+
async function s(p, v) {
|
|
706
706
|
const d = await n(p);
|
|
707
|
-
return
|
|
707
|
+
return J(await v(d));
|
|
708
708
|
}
|
|
709
709
|
async function i(p = "default") {
|
|
710
|
-
return await s(p, (
|
|
710
|
+
return await s(p, (v) => v.getData());
|
|
711
711
|
}
|
|
712
|
-
function u(p,
|
|
712
|
+
function u(p, v = "default", d = void 0) {
|
|
713
713
|
var V, M;
|
|
714
714
|
if (d && Object.keys(d).length) {
|
|
715
715
|
let m = function(c) {
|
|
716
716
|
let F = [];
|
|
717
|
-
return c.forEach((
|
|
718
|
-
|
|
717
|
+
return c.forEach((y) => {
|
|
718
|
+
y.children && (F = [...F, ...m(y.children)]), F.push(y);
|
|
719
719
|
}), F;
|
|
720
720
|
}, E = function(c) {
|
|
721
|
-
var
|
|
722
|
-
let F = m((
|
|
721
|
+
var y;
|
|
722
|
+
let F = m((y = d == null ? void 0 : d.schemas[0]) == null ? void 0 : y.children);
|
|
723
723
|
return Object.keys(c).forEach((x) => {
|
|
724
|
-
var A, N, Q, q, l, I,
|
|
725
|
-
const
|
|
726
|
-
if ((
|
|
724
|
+
var A, N, Q, q, l, I, O;
|
|
725
|
+
const g = F.find((h) => h.field === x), W = ["datetimerange", "daterange", "monthrange", "dates"];
|
|
726
|
+
if ((g && (g == null ? void 0 : g.type) === "checkbox" || (g == null ? void 0 : g.type) === "select" && ((A = g == null ? void 0 : g.componentProps) != null && A.multiple) || (g == null ? void 0 : g.type) === "cascader" && !((Q = (N = g == null ? void 0 : g.componentProps) == null ? void 0 : N.props) != null && Q.multiple) || (g == null ? void 0 : g.type) === "date" && W.includes((q = g == null ? void 0 : g.componentProps) == null ? void 0 : q.type)) && typeof c[x] == "string")
|
|
727
727
|
c[x] = (l = c[x]) == null ? void 0 : l.split(",");
|
|
728
|
-
else if ((
|
|
729
|
-
c[x].indexOf(";") > -1 ? c[x] = c[x].split(";").map((
|
|
730
|
-
else if (((
|
|
731
|
-
let
|
|
732
|
-
Object.entries(c).forEach(([
|
|
733
|
-
c[x] === j &&
|
|
734
|
-
}), c[x] = c[x].split(",").map((
|
|
735
|
-
url:
|
|
736
|
-
name:
|
|
728
|
+
else if ((g == null ? void 0 : g.type) === "cascader" && ((O = (I = g == null ? void 0 : g.componentProps) == null ? void 0 : I.props) != null && O.multiple) && typeof c[x] == "string")
|
|
729
|
+
c[x].indexOf(";") > -1 ? c[x] = c[x].split(";").map((h) => h.split(",")) : c[x] = c[x].split(","), c[x].indexOf(";") > -1 ? c[x] = c[x].split(";").map((h) => h.split(",")) : c[x] = c[x].split(",");
|
|
730
|
+
else if (((g == null ? void 0 : g.type) === "upload-image" || (g == null ? void 0 : g.type) === "upload-file") && typeof c[x] == "string") {
|
|
731
|
+
let h = [];
|
|
732
|
+
Object.entries(c).forEach(([C, j]) => {
|
|
733
|
+
c[x] === j && C !== g.field && C.indexOf("@") > -1 && C.indexOf(x) > -1 && (h = C.split("@")[1].split(","));
|
|
734
|
+
}), c[x] = c[x].split(",").map((C, j) => ({
|
|
735
|
+
url: C,
|
|
736
|
+
name: h[j] || C
|
|
737
737
|
}));
|
|
738
|
-
} else (
|
|
738
|
+
} else (g == null ? void 0 : g.type) === "number" || (g == null ? void 0 : g.type) === "slider" ? c[x] = Number(c[x]) : (g == null ? void 0 : g.type) === "switch" && (c[x] = typeof c[x] == "boolean" ? c[x] : c[x].indexOf("true") > -1);
|
|
739
739
|
}), c;
|
|
740
740
|
}(p);
|
|
741
|
-
r.setFormData(E,
|
|
742
|
-
const _ = (V = o.value) == null ? void 0 : V[
|
|
741
|
+
r.setFormData(E, v);
|
|
742
|
+
const _ = (V = o.value) == null ? void 0 : V[v];
|
|
743
743
|
_ == null || _.clearValidate();
|
|
744
744
|
} else {
|
|
745
|
-
r.setFormData(p,
|
|
746
|
-
const m = (M = o.value) == null ? void 0 : M[
|
|
745
|
+
r.setFormData(p, v);
|
|
746
|
+
const m = (M = o.value) == null ? void 0 : M[v];
|
|
747
747
|
m == null || m.clearValidate();
|
|
748
748
|
}
|
|
749
749
|
}
|
|
750
750
|
async function f(p = "default") {
|
|
751
|
-
return await s(p, async (
|
|
751
|
+
return await s(p, async (v) => (await v.validate(), await v.getData()));
|
|
752
752
|
}
|
|
753
753
|
async function b(p) {
|
|
754
754
|
await t();
|
|
755
|
-
const
|
|
755
|
+
const v = {};
|
|
756
756
|
for (const d in o.value) {
|
|
757
757
|
const V = o.value[d];
|
|
758
|
-
V && (
|
|
758
|
+
V && (v[d] = J(await p(V)));
|
|
759
759
|
}
|
|
760
|
-
return
|
|
760
|
+
return v;
|
|
761
761
|
}
|
|
762
|
-
async function
|
|
762
|
+
async function w() {
|
|
763
763
|
return await b((p) => p.getData());
|
|
764
764
|
}
|
|
765
765
|
function a(p) {
|
|
766
|
-
for (const
|
|
767
|
-
u(p[
|
|
766
|
+
for (const v in p)
|
|
767
|
+
u(p[v], v);
|
|
768
768
|
}
|
|
769
769
|
async function D() {
|
|
770
770
|
return await b(async (p) => (await p.validate(), await p.getData()));
|
|
@@ -776,7 +776,7 @@ function Qe() {
|
|
|
776
776
|
getData: i,
|
|
777
777
|
setData: u,
|
|
778
778
|
validate: f,
|
|
779
|
-
getForms:
|
|
779
|
+
getForms: w,
|
|
780
780
|
setForms: a,
|
|
781
781
|
validateAll: D,
|
|
782
782
|
getFormInstance: n
|
|
@@ -796,7 +796,7 @@ const Ye = {
|
|
|
796
796
|
},
|
|
797
797
|
emits: ["change", "ready"],
|
|
798
798
|
setup(e, { expose: r, emit: o }) {
|
|
799
|
-
const t = ee(() => import("./index-DgcFxYFp.js")), n = o, { ready: s, pageManager: i, forms: u, getData: f, setData: b, validate:
|
|
799
|
+
const t = ee(() => import("./index-DgcFxYFp.js")), n = o, { ready: s, pageManager: i, forms: u, getData: f, setData: b, validate: w, getForms: a, setForms: D, validateAll: p, getFormInstance: v } = Qe(), d = e, V = ne({
|
|
800
800
|
schemas: []
|
|
801
801
|
});
|
|
802
802
|
B(
|
|
@@ -823,29 +823,29 @@ const Ye = {
|
|
|
823
823
|
);
|
|
824
824
|
function M(c) {
|
|
825
825
|
let F = [];
|
|
826
|
-
return c.forEach((
|
|
827
|
-
|
|
826
|
+
return c.forEach((y) => {
|
|
827
|
+
y.children && (F = [...F, ...M(y.children)]), F.push(y);
|
|
828
828
|
}), F;
|
|
829
829
|
}
|
|
830
830
|
function m(c) {
|
|
831
831
|
let F = M(d.pageSchema.schemas[0].children);
|
|
832
|
-
return Object.keys(c).forEach((
|
|
833
|
-
var x,
|
|
834
|
-
if (
|
|
835
|
-
const l = F.find((
|
|
836
|
-
if ((l && (l == null ? void 0 : l.type) === "checkbox" || (l == null ? void 0 : l.type) === "select" && ((x = l == null ? void 0 : l.componentProps) != null && x.multiple) || (l == null ? void 0 : l.type) === "cascader" && !((W = (
|
|
837
|
-
c[
|
|
838
|
-
else if ((l == null ? void 0 : l.type) === "cascader" && ((q = (Q = l == null ? void 0 : l.componentProps) == null ? void 0 : Q.props) != null && q.multiple) && typeof c[
|
|
839
|
-
c[
|
|
840
|
-
else if (((l == null ? void 0 : l.type) === "upload-image" || (l == null ? void 0 : l.type) === "upload-file") && typeof c[
|
|
841
|
-
let
|
|
842
|
-
Object.entries(c).forEach(([
|
|
843
|
-
c[
|
|
844
|
-
}), c[
|
|
845
|
-
url:
|
|
846
|
-
name: C
|
|
832
|
+
return Object.keys(c).forEach((y) => {
|
|
833
|
+
var x, g, W, A, N, Q, q;
|
|
834
|
+
if (y.indexOf("@") < 0) {
|
|
835
|
+
const l = F.find((O) => O.field === y), I = ["datetimerange", "daterange", "monthrange", "dates"];
|
|
836
|
+
if ((l && (l == null ? void 0 : l.type) === "checkbox" || (l == null ? void 0 : l.type) === "select" && ((x = l == null ? void 0 : l.componentProps) != null && x.multiple) || (l == null ? void 0 : l.type) === "cascader" && !((W = (g = l == null ? void 0 : l.componentProps) == null ? void 0 : g.props) != null && W.multiple) || (l == null ? void 0 : l.type) === "date" && I.includes((A = l == null ? void 0 : l.componentProps) == null ? void 0 : A.type)) && typeof c[y] == "string")
|
|
837
|
+
c[y] = (N = c[y]) == null ? void 0 : N.split(",");
|
|
838
|
+
else if ((l == null ? void 0 : l.type) === "cascader" && ((q = (Q = l == null ? void 0 : l.componentProps) == null ? void 0 : Q.props) != null && q.multiple) && typeof c[y] == "string")
|
|
839
|
+
c[y].indexOf(";") > -1 ? c[y] = c[y].split(";").map((O) => O.split(",")) : c[y] = c[y].split(","), c[y].indexOf(";") > -1 ? c[y] = c[y].split(";").map((O) => O.split(",")) : c[y] = c[y].split(",");
|
|
840
|
+
else if (((l == null ? void 0 : l.type) === "upload-image" || (l == null ? void 0 : l.type) === "upload-file") && typeof c[y] == "string") {
|
|
841
|
+
let O = [];
|
|
842
|
+
Object.entries(c).forEach(([h, C]) => {
|
|
843
|
+
c[y] === C && h !== l.field && h.indexOf("@") > -1 && h.indexOf(y) > -1 && (O = h.split("@")[1].split(","));
|
|
844
|
+
}), c[y] = c[y].split(",").map((h, C) => ({
|
|
845
|
+
url: h,
|
|
846
|
+
name: O[C] || h
|
|
847
847
|
}));
|
|
848
|
-
} else (l == null ? void 0 : l.type) === "number" || (l == null ? void 0 : l.type) === "slider" ? c[
|
|
848
|
+
} else (l == null ? void 0 : l.type) === "number" || (l == null ? void 0 : l.type) === "slider" ? c[y] = Number(c[y]) : (l == null ? void 0 : l.type) === "switch" && (c[y] = typeof c[y] == "boolean" ? c[y] : c[y].indexOf("true") > -1);
|
|
849
849
|
}
|
|
850
850
|
}), c;
|
|
851
851
|
}
|
|
@@ -857,9 +857,9 @@ const Ye = {
|
|
|
857
857
|
{
|
|
858
858
|
immediate: !0
|
|
859
859
|
}
|
|
860
|
-
),
|
|
860
|
+
), z("slots", $e()), z("pageManager", i), z("forms", u), z("pageSchema", V), z(
|
|
861
861
|
"disabled",
|
|
862
|
-
|
|
862
|
+
k(() => d.disabled)
|
|
863
863
|
);
|
|
864
864
|
const S = ie(), E = S == null ? void 0 : S.proxy;
|
|
865
865
|
function _() {
|
|
@@ -874,22 +874,22 @@ const Ye = {
|
|
|
874
874
|
pageManager: i,
|
|
875
875
|
getData: f,
|
|
876
876
|
setData: b,
|
|
877
|
-
validate:
|
|
877
|
+
validate: w,
|
|
878
878
|
getForms: a,
|
|
879
879
|
setForms: D,
|
|
880
880
|
validateAll: p,
|
|
881
|
-
getFormInstance:
|
|
881
|
+
getFormInstance: v
|
|
882
882
|
}), (c, F) => R(U).initialized.value ? (T(), K(be, {
|
|
883
883
|
key: 1,
|
|
884
884
|
onResolve: _
|
|
885
885
|
}, {
|
|
886
886
|
default: $(() => [
|
|
887
887
|
Z("div", Xe, [
|
|
888
|
-
(T(!0), ve(Be, null, Ne(V.schemas, (
|
|
888
|
+
(T(!0), ve(Be, null, Ne(V.schemas, (y, x) => (T(), K(R(Ge), {
|
|
889
889
|
id: d.id,
|
|
890
890
|
key: x,
|
|
891
891
|
sourceDateUrl: d.sourceDateUrl,
|
|
892
|
-
componentSchema:
|
|
892
|
+
componentSchema: y
|
|
893
893
|
}, null, 8, ["id", "sourceDateUrl", "componentSchema"]))), 128))
|
|
894
894
|
])
|
|
895
895
|
]),
|
|
@@ -903,7 +903,7 @@ const Ye = {
|
|
|
903
903
|
}
|
|
904
904
|
});
|
|
905
905
|
function ye(e) {
|
|
906
|
-
return Le() ? (
|
|
906
|
+
return Le() ? (ze(e), !0) : !1;
|
|
907
907
|
}
|
|
908
908
|
function tt(e) {
|
|
909
909
|
let r = 0, o, t;
|
|
@@ -929,7 +929,7 @@ function ct(e = !1, r = {}) {
|
|
|
929
929
|
const {
|
|
930
930
|
truthyValue: o = !0,
|
|
931
931
|
falsyValue: t = !1
|
|
932
|
-
} = r, n = Te(e), s =
|
|
932
|
+
} = r, n = Te(e), s = P(e);
|
|
933
933
|
function i(u) {
|
|
934
934
|
if (arguments.length)
|
|
935
935
|
return s.value = u, s.value;
|
|
@@ -940,7 +940,7 @@ function ct(e = !1, r = {}) {
|
|
|
940
940
|
}
|
|
941
941
|
return n ? i : [s, i];
|
|
942
942
|
}
|
|
943
|
-
function
|
|
943
|
+
function zt(e, r, o) {
|
|
944
944
|
const t = B(e, (...n) => (se(() => t()), r(...n)), o);
|
|
945
945
|
return t;
|
|
946
946
|
}
|
|
@@ -956,15 +956,15 @@ function ut(...e) {
|
|
|
956
956
|
return at;
|
|
957
957
|
Array.isArray(o) || (o = [o]), Array.isArray(t) || (t = [t]);
|
|
958
958
|
const s = [], i = () => {
|
|
959
|
-
s.forEach((
|
|
960
|
-
}, u = (
|
|
959
|
+
s.forEach((w) => w()), s.length = 0;
|
|
960
|
+
}, u = (w, a, D, p) => (w.addEventListener(a, D, p), () => w.removeEventListener(a, D, p)), f = B(
|
|
961
961
|
() => [X(r), re(n)],
|
|
962
|
-
([
|
|
963
|
-
if (i(), !
|
|
962
|
+
([w, a]) => {
|
|
963
|
+
if (i(), !w)
|
|
964
964
|
return;
|
|
965
965
|
const D = st(a) ? { ...a } : a;
|
|
966
966
|
s.push(
|
|
967
|
-
...o.flatMap((p) => t.map((
|
|
967
|
+
...o.flatMap((p) => t.map((v) => u(w, p, v, D)))
|
|
968
968
|
);
|
|
969
969
|
},
|
|
970
970
|
{ immediate: !0, flush: "post" }
|
|
@@ -985,8 +985,8 @@ function Ce(...e) {
|
|
|
985
985
|
passive: i = !1,
|
|
986
986
|
dedupe: u = !1
|
|
987
987
|
} = t, f = dt(r);
|
|
988
|
-
return ut(n, s, (
|
|
989
|
-
|
|
988
|
+
return ut(n, s, (w) => {
|
|
989
|
+
w.repeat && re(u) || f(w) && o(w);
|
|
990
990
|
}, i);
|
|
991
991
|
}
|
|
992
992
|
function pe(e, r, o = {}) {
|
|
@@ -996,14 +996,14 @@ function me(e, r, o = {}) {
|
|
|
996
996
|
return Ce(e, r, { ...o, eventName: "keyup" });
|
|
997
997
|
}
|
|
998
998
|
function ft() {
|
|
999
|
-
const e =
|
|
999
|
+
const e = P(!1), r = ie();
|
|
1000
1000
|
return r && ge(() => {
|
|
1001
1001
|
e.value = !0;
|
|
1002
1002
|
}, r), e;
|
|
1003
1003
|
}
|
|
1004
1004
|
function pt(e) {
|
|
1005
1005
|
const r = ft();
|
|
1006
|
-
return
|
|
1006
|
+
return k(() => (r.value, !!e()));
|
|
1007
1007
|
}
|
|
1008
1008
|
function mt(e) {
|
|
1009
1009
|
return JSON.parse(JSON.stringify(e));
|
|
@@ -1013,7 +1013,7 @@ function ht(e, r, o = {}) {
|
|
|
1013
1013
|
let s;
|
|
1014
1014
|
const i = pt(() => t && "ResizeObserver" in t), u = () => {
|
|
1015
1015
|
s && (s.disconnect(), s = void 0);
|
|
1016
|
-
}, f =
|
|
1016
|
+
}, f = k(() => {
|
|
1017
1017
|
const a = re(e);
|
|
1018
1018
|
return Array.isArray(a) ? a.map((D) => X(D)) : [X(a)];
|
|
1019
1019
|
}), b = B(
|
|
@@ -1026,31 +1026,31 @@ function ht(e, r, o = {}) {
|
|
|
1026
1026
|
}
|
|
1027
1027
|
},
|
|
1028
1028
|
{ immediate: !0, flush: "post" }
|
|
1029
|
-
),
|
|
1029
|
+
), w = () => {
|
|
1030
1030
|
u(), b();
|
|
1031
1031
|
};
|
|
1032
|
-
return ye(
|
|
1032
|
+
return ye(w), {
|
|
1033
1033
|
isSupported: i,
|
|
1034
|
-
stop:
|
|
1034
|
+
stop: w
|
|
1035
1035
|
};
|
|
1036
1036
|
}
|
|
1037
|
-
function
|
|
1038
|
-
const { window: t = de, box: n = "content-box" } = o, s =
|
|
1037
|
+
function Jt(e, r = { width: 0, height: 0 }, o = {}) {
|
|
1038
|
+
const { window: t = de, box: n = "content-box" } = o, s = k(() => {
|
|
1039
1039
|
var a, D;
|
|
1040
1040
|
return (D = (a = X(e)) == null ? void 0 : a.namespaceURI) == null ? void 0 : D.includes("svg");
|
|
1041
|
-
}), i =
|
|
1041
|
+
}), i = P(r.width), u = P(r.height), { stop: f } = ht(
|
|
1042
1042
|
e,
|
|
1043
1043
|
([a]) => {
|
|
1044
1044
|
const D = n === "border-box" ? a.borderBoxSize : n === "content-box" ? a.contentBoxSize : a.devicePixelContentBoxSize;
|
|
1045
1045
|
if (t && s.value) {
|
|
1046
1046
|
const p = X(e);
|
|
1047
1047
|
if (p) {
|
|
1048
|
-
const
|
|
1049
|
-
i.value =
|
|
1048
|
+
const v = p.getBoundingClientRect();
|
|
1049
|
+
i.value = v.width, u.value = v.height;
|
|
1050
1050
|
}
|
|
1051
1051
|
} else if (D) {
|
|
1052
1052
|
const p = Array.isArray(D) ? D : [D];
|
|
1053
|
-
i.value = p.reduce((
|
|
1053
|
+
i.value = p.reduce((v, { inlineSize: d }) => v + d, 0), u.value = p.reduce((v, { blockSize: d }) => v + d, 0);
|
|
1054
1054
|
} else
|
|
1055
1055
|
i.value = a.contentRect.width, u.value = a.contentRect.height;
|
|
1056
1056
|
},
|
|
@@ -1066,32 +1066,32 @@ function zt(e, r = { width: 0, height: 0 }, o = {}) {
|
|
|
1066
1066
|
i.value = a ? r.width : 0, u.value = a ? r.height : 0;
|
|
1067
1067
|
}
|
|
1068
1068
|
);
|
|
1069
|
-
function
|
|
1069
|
+
function w() {
|
|
1070
1070
|
f(), b();
|
|
1071
1071
|
}
|
|
1072
1072
|
return {
|
|
1073
1073
|
width: i,
|
|
1074
1074
|
height: u,
|
|
1075
|
-
stop:
|
|
1075
|
+
stop: w
|
|
1076
1076
|
};
|
|
1077
1077
|
}
|
|
1078
|
-
function
|
|
1078
|
+
function kt(e, r, o, t = {}) {
|
|
1079
1079
|
var n, s, i;
|
|
1080
1080
|
const {
|
|
1081
1081
|
clone: u = !1,
|
|
1082
1082
|
passive: f = !1,
|
|
1083
1083
|
eventName: b,
|
|
1084
|
-
deep:
|
|
1084
|
+
deep: w = !1,
|
|
1085
1085
|
defaultValue: a,
|
|
1086
1086
|
shouldEmit: D
|
|
1087
|
-
} = t, p = ie(),
|
|
1087
|
+
} = t, p = ie(), v = o || (p == null ? void 0 : p.emit) || ((n = p == null ? void 0 : p.$emit) == null ? void 0 : n.bind(p)) || ((i = (s = p == null ? void 0 : p.proxy) == null ? void 0 : s.$emit) == null ? void 0 : i.bind(p == null ? void 0 : p.proxy));
|
|
1088
1088
|
let d = b;
|
|
1089
1089
|
r || (r = "modelValue"), d = d || `update:${r.toString()}`;
|
|
1090
1090
|
const V = (S) => u ? typeof u == "function" ? u(S) : mt(S) : S, M = () => ot(e[r]) ? V(e[r]) : a, m = (S) => {
|
|
1091
|
-
D ? D(S) &&
|
|
1091
|
+
D ? D(S) && v(d, S) : v(d, S);
|
|
1092
1092
|
};
|
|
1093
1093
|
if (f) {
|
|
1094
|
-
const S = M(), E =
|
|
1094
|
+
const S = M(), E = P(S);
|
|
1095
1095
|
let _ = !1;
|
|
1096
1096
|
return B(
|
|
1097
1097
|
() => e[r],
|
|
@@ -1101,12 +1101,12 @@ function Jt(e, r, o, t = {}) {
|
|
|
1101
1101
|
), B(
|
|
1102
1102
|
E,
|
|
1103
1103
|
(c) => {
|
|
1104
|
-
!_ && (c !== e[r] ||
|
|
1104
|
+
!_ && (c !== e[r] || w) && m(c);
|
|
1105
1105
|
},
|
|
1106
|
-
{ deep:
|
|
1106
|
+
{ deep: w }
|
|
1107
1107
|
), E;
|
|
1108
1108
|
} else
|
|
1109
|
-
return
|
|
1109
|
+
return k({
|
|
1110
1110
|
get() {
|
|
1111
1111
|
return M();
|
|
1112
1112
|
},
|
|
@@ -1123,7 +1123,7 @@ function Wt() {
|
|
|
1123
1123
|
};
|
|
1124
1124
|
}
|
|
1125
1125
|
function vt() {
|
|
1126
|
-
const e =
|
|
1126
|
+
const e = P(!1);
|
|
1127
1127
|
return ge(() => {
|
|
1128
1128
|
gt(e), yt(e);
|
|
1129
1129
|
}), B(
|
|
@@ -1155,7 +1155,7 @@ function yt(e) {
|
|
|
1155
1155
|
});
|
|
1156
1156
|
}
|
|
1157
1157
|
function wt() {
|
|
1158
|
-
const e =
|
|
1158
|
+
const e = P(1), r = P(!1), { isDark: o } = vt(), { pressSpace: t, pressShift: n, pressCtrl: s } = St();
|
|
1159
1159
|
return {
|
|
1160
1160
|
canvasScale: e,
|
|
1161
1161
|
pressSpace: t,
|
|
@@ -1167,7 +1167,7 @@ function wt() {
|
|
|
1167
1167
|
}
|
|
1168
1168
|
const fe = tt(wt);
|
|
1169
1169
|
function St() {
|
|
1170
|
-
const e =
|
|
1170
|
+
const e = P(!1), r = P(!1), o = P(!1);
|
|
1171
1171
|
return pe(" ", () => {
|
|
1172
1172
|
e.value = !0;
|
|
1173
1173
|
}), me(" ", () => {
|
|
@@ -1193,8 +1193,8 @@ function Ht(e) {
|
|
|
1193
1193
|
function i(f) {
|
|
1194
1194
|
if (f.preventDefault(), !f.x || !f.y || !r.value)
|
|
1195
1195
|
return;
|
|
1196
|
-
const b = f.x - t,
|
|
1197
|
-
t = f.x, n = f.y, e.value && (e.value.scrollTop -=
|
|
1196
|
+
const b = f.x - t, w = f.y - n;
|
|
1197
|
+
t = f.x, n = f.y, e.value && (e.value.scrollTop -= w, e.value.scrollLeft -= b);
|
|
1198
1198
|
}
|
|
1199
1199
|
function u() {
|
|
1200
1200
|
r.value = !1;
|
|
@@ -1233,7 +1233,7 @@ function qt(e, r = 16.66) {
|
|
|
1233
1233
|
const Dt = { class: "min-w-750px rounded" }, At = { class: "h-full rounded" }, Et = /* @__PURE__ */ oe({
|
|
1234
1234
|
__name: "index",
|
|
1235
1235
|
setup(e, { expose: r }) {
|
|
1236
|
-
const o = U.getComponent("monacoEditor"), t = U.getComponent("modal"), n =
|
|
1236
|
+
const o = U.getComponent("monacoEditor"), t = U.getComponent("modal"), n = P(null), s = P(!1), i = P(!1), u = P({}), f = Y("pageSchema"), b = P(null), w = P("");
|
|
1237
1237
|
function a() {
|
|
1238
1238
|
i.value = !1;
|
|
1239
1239
|
}
|
|
@@ -1241,9 +1241,9 @@ const Dt = { class: "min-w-750px rounded" }, At = { class: "h-full rounded" }, E
|
|
|
1241
1241
|
s.value = !1;
|
|
1242
1242
|
}
|
|
1243
1243
|
function p() {
|
|
1244
|
-
s.value = !0,
|
|
1244
|
+
s.value = !0, w.value = ue();
|
|
1245
1245
|
}
|
|
1246
|
-
async function
|
|
1246
|
+
async function v() {
|
|
1247
1247
|
try {
|
|
1248
1248
|
let d = await b.value.validateAll();
|
|
1249
1249
|
if (!Object.keys(d).length) {
|
|
@@ -1267,13 +1267,13 @@ const Dt = { class: "min-w-750px rounded" }, At = { class: "h-full rounded" }, E
|
|
|
1267
1267
|
class: "w-900px",
|
|
1268
1268
|
width: "900px",
|
|
1269
1269
|
onClose: D,
|
|
1270
|
-
onOk:
|
|
1270
|
+
onOk: v,
|
|
1271
1271
|
okText: "表单数据"
|
|
1272
1272
|
}, {
|
|
1273
1273
|
default: $(() => [
|
|
1274
1274
|
Z("div", Dt, [
|
|
1275
1275
|
(T(), K(R(et), {
|
|
1276
|
-
key:
|
|
1276
|
+
key: w.value,
|
|
1277
1277
|
ref_key: "kb",
|
|
1278
1278
|
ref: b,
|
|
1279
1279
|
"page-schema": R(f)
|
|
@@ -1332,7 +1332,7 @@ const Dt = { class: "min-w-750px rounded" }, At = { class: "h-full rounded" }, E
|
|
|
1332
1332
|
"updateSourceData"
|
|
1333
1333
|
],
|
|
1334
1334
|
setup(e, { expose: r, emit: o }) {
|
|
1335
|
-
const t = ee(() => import("./index-BKDRMrcc.js")), n = ee(() => import("./index-XUQ1VGQg.js")), s = ee(() => import("./index-
|
|
1335
|
+
const t = ee(() => import("./index-BKDRMrcc.js")), n = ee(() => import("./index-XUQ1VGQg.js")), s = ee(() => import("./index-Bjj1uygU.js")), i = ee(() => import("./index-DNeYX6HK.js")), u = ee(() => import("./index-DgcFxYFp.js")), f = Ie(), b = qe(), w = e;
|
|
1336
1336
|
let a = {
|
|
1337
1337
|
schemas: [
|
|
1338
1338
|
{
|
|
@@ -1380,13 +1380,13 @@ defineExpose({
|
|
|
1380
1380
|
})`
|
|
1381
1381
|
};
|
|
1382
1382
|
ce(() => {
|
|
1383
|
-
if (
|
|
1384
|
-
a =
|
|
1383
|
+
if (w.defaultSchema) {
|
|
1384
|
+
a = w.defaultSchema;
|
|
1385
1385
|
return;
|
|
1386
1386
|
}
|
|
1387
|
-
|
|
1387
|
+
w.source && U.setSourceData(w.source), w.formMode && (a.schemas = U.formSchemas);
|
|
1388
1388
|
}), f.setDesignMode(), f.setDefaultComponentIds(a.schemas);
|
|
1389
|
-
const D = o, p =
|
|
1389
|
+
const D = o, p = P(null), v = ne({
|
|
1390
1390
|
checkedNode: null,
|
|
1391
1391
|
hoverNode: null,
|
|
1392
1392
|
disableHover: !1,
|
|
@@ -1396,20 +1396,20 @@ defineExpose({
|
|
|
1396
1396
|
script: a.script
|
|
1397
1397
|
}), { disabledZoom: V } = fe();
|
|
1398
1398
|
ce(() => {
|
|
1399
|
-
V.value =
|
|
1399
|
+
V.value = w.disabledZoom;
|
|
1400
1400
|
}), ce(() => {
|
|
1401
1401
|
const A = d.script;
|
|
1402
1402
|
A && A !== "" && f.setMethods(A);
|
|
1403
|
-
}),
|
|
1403
|
+
}), z("pageSchema", d), z("revoke", b), z("pageManager", f), z(
|
|
1404
1404
|
"designerProps",
|
|
1405
|
-
|
|
1406
|
-
),
|
|
1405
|
+
k(() => w)
|
|
1406
|
+
), z("designer", {
|
|
1407
1407
|
setCheckedNode: m,
|
|
1408
1408
|
setHoverNode: S,
|
|
1409
1409
|
setDisableHover: _,
|
|
1410
|
-
handleToggleDeviceMode:
|
|
1411
|
-
reset:
|
|
1412
|
-
state:
|
|
1410
|
+
handleToggleDeviceMode: g,
|
|
1411
|
+
reset: y,
|
|
1412
|
+
state: v
|
|
1413
1413
|
}), te.on("saveSourceData", (A) => {
|
|
1414
1414
|
D("saveSourceData", A);
|
|
1415
1415
|
}), te.on("deleteSourceData", (A) => {
|
|
@@ -1418,18 +1418,18 @@ defineExpose({
|
|
|
1418
1418
|
D("updateSourceData", A);
|
|
1419
1419
|
});
|
|
1420
1420
|
function M() {
|
|
1421
|
-
d.schemas =
|
|
1421
|
+
d.schemas = J(a.schemas), m(d.schemas[0]), b.push(d.schemas, "初始化撤销功能");
|
|
1422
1422
|
}
|
|
1423
1423
|
async function m(A = d.schemas[0]) {
|
|
1424
|
-
|
|
1424
|
+
v.checkedNode = A, v.matched = We(d.schemas, A.id);
|
|
1425
1425
|
}
|
|
1426
1426
|
async function S(A = null) {
|
|
1427
1427
|
var N;
|
|
1428
|
-
if (!A ||
|
|
1429
|
-
return
|
|
1430
|
-
if ((A == null ? void 0 : A.id) === ((N =
|
|
1428
|
+
if (!A || v.disableHover)
|
|
1429
|
+
return v.hoverNode = null, !1;
|
|
1430
|
+
if ((A == null ? void 0 : A.id) === ((N = v.hoverNode) == null ? void 0 : N.id))
|
|
1431
1431
|
return !1;
|
|
1432
|
-
|
|
1432
|
+
v.hoverNode = A;
|
|
1433
1433
|
}
|
|
1434
1434
|
function E() {
|
|
1435
1435
|
se(() => {
|
|
@@ -1437,21 +1437,21 @@ defineExpose({
|
|
|
1437
1437
|
});
|
|
1438
1438
|
}
|
|
1439
1439
|
async function _(A = !1) {
|
|
1440
|
-
|
|
1440
|
+
v.disableHover = A;
|
|
1441
1441
|
}
|
|
1442
1442
|
function c(A) {
|
|
1443
|
-
G(d,
|
|
1443
|
+
G(d, J(A));
|
|
1444
1444
|
}
|
|
1445
1445
|
function F() {
|
|
1446
1446
|
return we(d);
|
|
1447
1447
|
}
|
|
1448
|
-
function
|
|
1448
|
+
function y() {
|
|
1449
1449
|
xe(d.schemas, a.schemas) && d.script === a.script || (G(d.schemas, a.schemas), d.script = a.script, m(d.schemas[0]), b.push(d.schemas, "重置操作"), D("reset", d));
|
|
1450
1450
|
}
|
|
1451
1451
|
function x() {
|
|
1452
1452
|
D("save", we(d));
|
|
1453
1453
|
}
|
|
1454
|
-
function
|
|
1454
|
+
function g(A) {
|
|
1455
1455
|
D("toggleDeviceMode", A);
|
|
1456
1456
|
}
|
|
1457
1457
|
function W() {
|
|
@@ -1461,7 +1461,7 @@ defineExpose({
|
|
|
1461
1461
|
revoke: b,
|
|
1462
1462
|
setData: c,
|
|
1463
1463
|
getData: F,
|
|
1464
|
-
reset:
|
|
1464
|
+
reset: y,
|
|
1465
1465
|
preview: W
|
|
1466
1466
|
}), (A, N) => R(U).initialized.value ? (T(), K(be, {
|
|
1467
1467
|
key: 1,
|
|
@@ -1471,7 +1471,7 @@ defineExpose({
|
|
|
1471
1471
|
Z("div", xt, [
|
|
1472
1472
|
Z("div", It, [
|
|
1473
1473
|
L(A.$slots, "header", {}, () => [
|
|
1474
|
-
|
|
1474
|
+
w.hiddenHeader ? Ee("", !0) : (T(), K(R(t), {
|
|
1475
1475
|
key: 0,
|
|
1476
1476
|
onPreview: W,
|
|
1477
1477
|
onSave: x
|
|
@@ -1499,7 +1499,7 @@ defineExpose({
|
|
|
1499
1499
|
])
|
|
1500
1500
|
]),
|
|
1501
1501
|
Z("div", {
|
|
1502
|
-
class:
|
|
1502
|
+
class: Je(["epic-split-view-container", { "hidden-header": A.hiddenHeader }])
|
|
1503
1503
|
}, [
|
|
1504
1504
|
H(R(n)),
|
|
1505
1505
|
H(R(s)),
|
|
@@ -1519,8 +1519,8 @@ defineExpose({
|
|
|
1519
1519
|
_: 3
|
|
1520
1520
|
})) : (T(), ve("div", bt));
|
|
1521
1521
|
}
|
|
1522
|
-
}),
|
|
1523
|
-
component: async () => await import("./index-
|
|
1522
|
+
}), Ot = {
|
|
1523
|
+
component: async () => await import("./index-D0xByXxW.js"),
|
|
1524
1524
|
defaultSchema: {
|
|
1525
1525
|
label: "代码编辑器",
|
|
1526
1526
|
type: "monacoEditor",
|
|
@@ -1548,7 +1548,7 @@ defineExpose({
|
|
|
1548
1548
|
]
|
|
1549
1549
|
},
|
|
1550
1550
|
bindModel: "model-value"
|
|
1551
|
-
},
|
|
1551
|
+
}, _t = {
|
|
1552
1552
|
component: async () => await import("./index-DiDIFoTk.js"),
|
|
1553
1553
|
defaultSchema: {
|
|
1554
1554
|
label: "页面",
|
|
@@ -1570,11 +1570,11 @@ defineExpose({
|
|
|
1570
1570
|
}
|
|
1571
1571
|
};
|
|
1572
1572
|
function Pt(e) {
|
|
1573
|
-
e.component("EInputSize", async () => await import("./index-0GtpyUBx.js")), e.component("EColEditor", async () => await import("./index-
|
|
1573
|
+
e.component("EInputSize", async () => await import("./index-0GtpyUBx.js")), e.component("EColEditor", async () => await import("./index-ijn3b5rF.js")), e.component("EActionEditor", async () => await import("./index-WBW2xl-M.js")), e.component("ERuleEditor", async () => await import("./index-BizWKLWZ.js")), e.component("EOptionsEditor", async () => await import("./index-DiYy4kUz.js")), e.component("ENode", async () => await import("./index-CqirvAEP.js")), e.component("EDataSource", async () => await import("./index-JhxJizMR.js")), e.registerActivitybar({
|
|
1574
1574
|
id: "component_view",
|
|
1575
1575
|
title: "组件",
|
|
1576
1576
|
icon: "icon--epic--extension-outline",
|
|
1577
|
-
component: async () => await import("./index-
|
|
1577
|
+
component: async () => await import("./index-SmoMBzHL.js")
|
|
1578
1578
|
}), e.registerActivitybar({
|
|
1579
1579
|
id: "outline_view",
|
|
1580
1580
|
title: "大纲",
|
|
@@ -1583,12 +1583,12 @@ function Pt(e) {
|
|
|
1583
1583
|
}), e.registerRightSidebar({
|
|
1584
1584
|
id: "attribute_view",
|
|
1585
1585
|
title: "属性",
|
|
1586
|
-
component: async () => await import("./attributeView-
|
|
1586
|
+
component: async () => await import("./attributeView-DvYRuXDB.js")
|
|
1587
1587
|
}), e.registerRightSidebar({
|
|
1588
1588
|
id: "style_view",
|
|
1589
1589
|
title: "样式",
|
|
1590
|
-
component: async () => await import("./styleView-
|
|
1591
|
-
}), [
|
|
1590
|
+
component: async () => await import("./styleView-BbQxI-Nr.js")
|
|
1591
|
+
}), [Ot, _t].forEach((o) => {
|
|
1592
1592
|
e.registerComponent(o);
|
|
1593
1593
|
});
|
|
1594
1594
|
}
|
|
@@ -1598,7 +1598,7 @@ export {
|
|
|
1598
1598
|
le as B,
|
|
1599
1599
|
Ke as C,
|
|
1600
1600
|
ae as D,
|
|
1601
|
-
|
|
1601
|
+
ke as E,
|
|
1602
1602
|
St as F,
|
|
1603
1603
|
vt as G,
|
|
1604
1604
|
gt as H,
|
|
@@ -1611,13 +1611,13 @@ export {
|
|
|
1611
1611
|
Ht as e,
|
|
1612
1612
|
Ut as f,
|
|
1613
1613
|
Mt as g,
|
|
1614
|
-
|
|
1614
|
+
Jt as h,
|
|
1615
1615
|
Kt as i,
|
|
1616
1616
|
Lt as j,
|
|
1617
1617
|
ue as k,
|
|
1618
1618
|
Nt as l,
|
|
1619
|
-
|
|
1620
|
-
|
|
1619
|
+
J as m,
|
|
1620
|
+
kt as n,
|
|
1621
1621
|
Rt as o,
|
|
1622
1622
|
Wt as p,
|
|
1623
1623
|
et as q,
|
|
@@ -1626,7 +1626,7 @@ export {
|
|
|
1626
1626
|
Ie as t,
|
|
1627
1627
|
fe as u,
|
|
1628
1628
|
qe as v,
|
|
1629
|
-
|
|
1629
|
+
zt as w,
|
|
1630
1630
|
xe as x,
|
|
1631
1631
|
We as y,
|
|
1632
1632
|
Bt as z
|