epic-designer-gold 1.0.9 → 1.0.11
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-BvXOVbk7.js → attributeView-B__FQHVu.js} +1 -1
- package/dist/{attributeView-iVaomUyI.cjs → attributeView-D_snTI-K.cjs} +1 -1
- package/dist/col-B1GUMkMK.cjs +1 -0
- package/dist/col-D4hvKfJ6.js +31 -0
- package/dist/{index-Lc9Y13sl.js → index-AO9st9GO.js} +1 -1
- package/dist/index-B34F68Fz.js +4 -0
- package/dist/{index-CXN5JcDN.cjs → index-BEaUH_4C.cjs} +1 -1
- package/dist/{index-D-MYAFvk.cjs → index-BNDnGxRg.cjs} +1 -1
- package/dist/{index-BUloiuNZ.js → index-BdToAdGK.js} +1 -1
- package/dist/{index-DqPRxkxh.js → index-CAkpmC6c.js} +1 -1
- package/dist/{index-QROM92Xw.cjs → index-CKKGzeVk.cjs} +1 -1
- package/dist/index-CZ_nc70v.cjs +10 -0
- package/dist/{index-DDxqWsLh.cjs → index-CanuzqIT.cjs} +1 -1
- package/dist/{index-Dmfk0xI0.cjs → index-Ch8hBndx.cjs} +1 -1
- package/dist/{index-CXXMKZDX.js → index-D5moT97y.js} +140 -140
- package/dist/{index-B3keiKRy.js → index-DNWIP087.js} +1 -1
- package/dist/{index-B-VAOMev.js → index-Dgdrnlh5.js} +1 -1
- package/dist/{index-DChr8CfB.js → index-Dx4IQxp4.js} +221 -216
- package/dist/{index-BhYl2S9H.cjs → index-IDj-bwmO.cjs} +1 -1
- package/dist/{index-jgqfPmDS.cjs → index-g2SN8VMi.cjs} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{styleView-rQBBbLFF.cjs → styleView-DSoOUApX.cjs} +1 -1
- package/dist/{styleView-BAOpKnjx.js → styleView-DwuC1nZJ.js} +1 -1
- package/dist/ui/elementPlus/index.cjs +1 -1
- package/dist/ui/elementPlus/index.js +1 -1
- package/package.json +1 -1
- package/vite.config.ts.timestamp-1748427578982-d7ce374e905ab.mjs +78 -78
- package/dist/col-C4lVVBzC.cjs +0 -1
- package/dist/col-DcVPBKEc.js +0 -31
- package/dist/index-B8Ir-lho.js +0 -4
- package/dist/index-CgboTSgt.cjs +0 -10
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ref as C, reactive as re, defineComponent as le, openBlock as H, createBlock as Y, unref as R, mergeProps as be, withCtx as T, renderSlot as K, getCurrentInstance as ue, inject as
|
|
2
|
-
import { p as J, f as Qe, d as
|
|
1
|
+
import { ref as C, reactive as re, defineComponent as le, openBlock as H, createBlock as Y, unref as R, mergeProps as be, withCtx as T, renderSlot as K, getCurrentInstance as ue, inject as te, watch as B, useAttrs as Re, provide as Z, shallowRef as Ue, computed as W, watchEffect as he, onUnmounted as $e, resolveComponent as Te, resolveDynamicComponent as Be, createVNode as Q, createCommentVNode as Ne, useSlots as Le, createElementBlock as Ee, Suspense as Fe, createElementVNode as X, Fragment as Je, renderList as ze, nextTick as ce, effectScope as He, isRef as Ke, getCurrentScope as Ze, onScopeDispose as We, onMounted as Ae, normalizeClass as Ge, toRaw as Ie } from "vue";
|
|
2
|
+
import { p as J, f as Qe, d as ae, a as G, b as Ve, c as Ye, E as k, l as se, g as qe, e as Xe } from "./pluginManager-BCnrHPYv.js";
|
|
3
3
|
import { a as pe, u as Oe } from "./index-B1s67XDZ.js";
|
|
4
4
|
import { a as _e } from "./axios-CXDYiOMX.js";
|
|
5
5
|
function Lt(e, n) {
|
|
@@ -12,7 +12,7 @@ function Lt(e, n) {
|
|
|
12
12
|
}
|
|
13
13
|
function Ce() {
|
|
14
14
|
const e = C({}), n = C({}), s = C(!1), r = C([]), c = re({});
|
|
15
|
-
function
|
|
15
|
+
function i(p) {
|
|
16
16
|
return e.value[p];
|
|
17
17
|
}
|
|
18
18
|
function w(p, D) {
|
|
@@ -29,9 +29,9 @@ function Ce() {
|
|
|
29
29
|
try {
|
|
30
30
|
new Function(`const epic = this;${p}`).bind({
|
|
31
31
|
...I,
|
|
32
|
-
getComponent:
|
|
33
|
-
find:
|
|
34
|
-
defineExpose:
|
|
32
|
+
getComponent: i,
|
|
33
|
+
find: i,
|
|
34
|
+
defineExpose: N,
|
|
35
35
|
publicMethods: I,
|
|
36
36
|
pluginManager: J
|
|
37
37
|
})();
|
|
@@ -39,7 +39,7 @@ function Ce() {
|
|
|
39
39
|
D && console.error("[epic:自定义函数]异常:", M);
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function N(p) {
|
|
43
43
|
p != null && (n.value = p);
|
|
44
44
|
}
|
|
45
45
|
function O(p, ...D) {
|
|
@@ -82,7 +82,7 @@ function Ce() {
|
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
function d(p, D) {
|
|
85
|
-
const I = p.componentId != null &&
|
|
85
|
+
const I = p.componentId != null && i(p.componentId);
|
|
86
86
|
if (!I) {
|
|
87
87
|
console.warn(`[Epic:组件${p.componentId}]未找到`);
|
|
88
88
|
return;
|
|
@@ -103,13 +103,13 @@ function Ce() {
|
|
|
103
103
|
function E(p, D = "default") {
|
|
104
104
|
if (c[D]) {
|
|
105
105
|
const I = c[D];
|
|
106
|
-
|
|
106
|
+
ae(p, I);
|
|
107
107
|
}
|
|
108
108
|
c[D] = p;
|
|
109
109
|
}
|
|
110
110
|
function P(p, D = "default") {
|
|
111
111
|
if (c[D]) {
|
|
112
|
-
|
|
112
|
+
ae(c[D], p, !1);
|
|
113
113
|
return;
|
|
114
114
|
}
|
|
115
115
|
c[D] = p;
|
|
@@ -122,9 +122,9 @@ function Ce() {
|
|
|
122
122
|
forms: c,
|
|
123
123
|
addFormData: E,
|
|
124
124
|
setFormData: P,
|
|
125
|
-
getComponentInstance:
|
|
125
|
+
getComponentInstance: i,
|
|
126
126
|
// 简化查询函数, 推荐使用
|
|
127
|
-
find:
|
|
127
|
+
find: i,
|
|
128
128
|
addComponentInstance: w,
|
|
129
129
|
removeComponentInstance: g,
|
|
130
130
|
setMethods: h,
|
|
@@ -136,14 +136,14 @@ function Ce() {
|
|
|
136
136
|
function ke() {
|
|
137
137
|
const e = C([]), n = C([]), s = C(null);
|
|
138
138
|
let r = 0;
|
|
139
|
-
function c(h,
|
|
139
|
+
function c(h, N = "插入组件") {
|
|
140
140
|
const O = Date.now();
|
|
141
141
|
r + 150 > O || (r = O, s.value != null && (e.value.push(s.value), n.value.splice(0, n.value.length)), s.value = {
|
|
142
|
-
type:
|
|
142
|
+
type: N,
|
|
143
143
|
componentSchema: JSON.stringify(h)
|
|
144
144
|
}, e.value.length > 60 && e.value.unshift());
|
|
145
145
|
}
|
|
146
|
-
function
|
|
146
|
+
function i() {
|
|
147
147
|
if (e.value.length === 0)
|
|
148
148
|
return !1;
|
|
149
149
|
const h = e.value.pop();
|
|
@@ -163,7 +163,7 @@ function ke() {
|
|
|
163
163
|
undoList: n,
|
|
164
164
|
currentRecord: s,
|
|
165
165
|
push: c,
|
|
166
|
-
undo:
|
|
166
|
+
undo: i,
|
|
167
167
|
redo: w,
|
|
168
168
|
reset: g
|
|
169
169
|
};
|
|
@@ -176,13 +176,13 @@ const je = /* @__PURE__ */ le({
|
|
|
176
176
|
},
|
|
177
177
|
emits: ["updateFormItemRef"],
|
|
178
178
|
setup(e, { emit: n }) {
|
|
179
|
-
const s = J.getComponent("form-item"), r = e, c = n,
|
|
180
|
-
c("updateFormItemRef",
|
|
179
|
+
const s = J.getComponent("form-item"), r = e, c = n, i = C(), w = () => {
|
|
180
|
+
c("updateFormItemRef", i.value);
|
|
181
181
|
};
|
|
182
182
|
return (g, h) => r.hasFormItem ? (H(), Y(R(s), be({
|
|
183
183
|
key: 0,
|
|
184
184
|
ref_key: "formItemRef",
|
|
185
|
-
ref:
|
|
185
|
+
ref: i,
|
|
186
186
|
onVnodeMounted: w
|
|
187
187
|
}, r.formItemProps), {
|
|
188
188
|
default: T(() => [
|
|
@@ -207,8 +207,8 @@ const je = /* @__PURE__ */ le({
|
|
|
207
207
|
emits: ["update:modelValue", "change", "update:dynamicId"],
|
|
208
208
|
setup(e, { emit: n }) {
|
|
209
209
|
const { proxy: s } = ue(), r = e, c = C(null);
|
|
210
|
-
let
|
|
211
|
-
const w =
|
|
210
|
+
let i = te("formData", re({}));
|
|
211
|
+
const w = te("slots", {}), g = te("pageManager", {}), h = te("disabled", { value: !1 }), N = te("ruleFieldPrefix", null), O = te("resetFormData", !1);
|
|
212
212
|
let t = re(G(r.componentSchema));
|
|
213
213
|
S();
|
|
214
214
|
async function x(o) {
|
|
@@ -243,8 +243,8 @@ const je = /* @__PURE__ */ le({
|
|
|
243
243
|
}
|
|
244
244
|
});
|
|
245
245
|
if (u && (u != null && u.dataPath)) {
|
|
246
|
-
const
|
|
247
|
-
o.componentProps.options = d(
|
|
246
|
+
const oe = u.dataPath.split(".").reduce((de, fe) => de[fe], _.data);
|
|
247
|
+
o.componentProps.options = d(oe, u.dataKey, u.dataValue);
|
|
248
248
|
} else
|
|
249
249
|
o.componentProps.options = d(_.data, u.dataKey, u.dataValue);
|
|
250
250
|
return o;
|
|
@@ -264,7 +264,7 @@ const je = /* @__PURE__ */ le({
|
|
|
264
264
|
B(
|
|
265
265
|
() => r.componentSchema,
|
|
266
266
|
(o) => {
|
|
267
|
-
Ve(t, o, ["children"]) || (
|
|
267
|
+
Ve(t, o, ["children"]) || (ae(t, G(o)), S());
|
|
268
268
|
},
|
|
269
269
|
{
|
|
270
270
|
deep: !0
|
|
@@ -273,14 +273,14 @@ const je = /* @__PURE__ */ le({
|
|
|
273
273
|
function S() {
|
|
274
274
|
g.isDesignMode.value && typeof t.field == "string" && (t.field += "-design-mode");
|
|
275
275
|
}
|
|
276
|
-
(r.resetFormData || O) && (
|
|
276
|
+
(r.resetFormData || O) && (i = {});
|
|
277
277
|
const y = n, E = C(), P = C(), p = (o) => {
|
|
278
278
|
P.value = o;
|
|
279
279
|
}, D = Re();
|
|
280
280
|
Object.keys(D).length && Z("nodeAttrs", D);
|
|
281
281
|
const I = Ue(null), M = W(() => {
|
|
282
282
|
var o, l;
|
|
283
|
-
return (o = t.componentProps) != null && o.hidden ? !1 : typeof t.show == "boolean" ? t.show : ((l = t.show) == null ? void 0 : l.call(t, { values:
|
|
283
|
+
return (o = t.componentProps) != null && o.hidden ? !1 : typeof t.show == "boolean" ? t.show : ((l = t.show) == null ? void 0 : l.call(t, { values: i })) ?? !0;
|
|
284
284
|
}), m = W(() => {
|
|
285
285
|
var u;
|
|
286
286
|
const o = M.value && ((u = t.rules) == null ? void 0 : u.map((_) => ({
|
|
@@ -289,7 +289,7 @@ const je = /* @__PURE__ */ le({
|
|
|
289
289
|
// 自定义校验函数
|
|
290
290
|
})));
|
|
291
291
|
let l = t.field;
|
|
292
|
-
r.ruleField ? l = r.ruleField :
|
|
292
|
+
r.ruleField ? l = r.ruleField : N && t.field && (l = G(N), l.push(t.field));
|
|
293
293
|
const $ = {
|
|
294
294
|
...t,
|
|
295
295
|
rules: o,
|
|
@@ -311,11 +311,11 @@ const je = /* @__PURE__ */ le({
|
|
|
311
311
|
};
|
|
312
312
|
}), L = W(() => J.getComponentConfingByType(t.type) ?? null);
|
|
313
313
|
he(() => {
|
|
314
|
-
c.value = r.modelValue ??
|
|
314
|
+
c.value = r.modelValue ?? i[t.field ?? ""];
|
|
315
315
|
}), B(
|
|
316
316
|
() => c.value,
|
|
317
317
|
() => {
|
|
318
|
-
c.value !== (r.modelValue ??
|
|
318
|
+
c.value !== (r.modelValue ?? i[t.field ?? ""]) && a(c.value);
|
|
319
319
|
}
|
|
320
320
|
), B(
|
|
321
321
|
() => E.value,
|
|
@@ -327,17 +327,17 @@ const je = /* @__PURE__ */ le({
|
|
|
327
327
|
function A() {
|
|
328
328
|
var l;
|
|
329
329
|
const o = E.value || s;
|
|
330
|
-
t.id && o && ((t.input || t.type === "table" && t.field || t.type === "card" && t.field && t.multiple) && (o.setValue =
|
|
330
|
+
t.id && o && ((t.input || t.type === "table" && t.field || t.type === "card" && t.field && t.multiple) && (o.setValue = a, o.getValue = () => i[t.field] || r.modelValue), o.setAttr = ($, u) => (t.componentProps || (t.componentProps = {}), t.componentProps[$] = u), o.getAttr = ($) => t.componentProps[$], g.addComponentInstance(t.id, o), (l = L.value) != null && l.defaultSchema.input && t.noFormItem !== !0 && P.value && g.addComponentInstance(t.id + "formItem", P.value));
|
|
331
331
|
}
|
|
332
332
|
function v() {
|
|
333
333
|
var o;
|
|
334
334
|
t.id && (g.removeComponentInstance(t.id), (o = L.value) != null && o.defaultSchema.input && t.noFormItem !== !0 && g.removeComponentInstance(t.id + "formItem"));
|
|
335
335
|
}
|
|
336
|
-
async function
|
|
336
|
+
async function j() {
|
|
337
337
|
var l, $, u;
|
|
338
338
|
if (t = await x(t), typeof ((l = t.componentProps) == null ? void 0 : l.defaultValue) < "u") {
|
|
339
|
-
const _ = g.isDesignMode.value ? ($ = t.componentProps) == null ? void 0 : $.defaultValue :
|
|
340
|
-
|
|
339
|
+
const _ = g.isDesignMode.value ? ($ = t.componentProps) == null ? void 0 : $.defaultValue : i[t.field] ?? ((u = t.componentProps) == null ? void 0 : u.defaultValue);
|
|
340
|
+
a(G(_));
|
|
341
341
|
}
|
|
342
342
|
if (t.type === "slot") {
|
|
343
343
|
const _ = t.slotName;
|
|
@@ -346,7 +346,7 @@ const je = /* @__PURE__ */ le({
|
|
|
346
346
|
setup() {
|
|
347
347
|
return () => K(w, _, {
|
|
348
348
|
componentSchema: t,
|
|
349
|
-
model:
|
|
349
|
+
model: i
|
|
350
350
|
});
|
|
351
351
|
}
|
|
352
352
|
});
|
|
@@ -365,16 +365,16 @@ const je = /* @__PURE__ */ le({
|
|
|
365
365
|
}
|
|
366
366
|
function f(o) {
|
|
367
367
|
Object.prototype.toString.call(o), Object.prototype.toString.call(o) === "[object Array]" ? o.forEach((l) => {
|
|
368
|
-
|
|
369
|
-
}) :
|
|
368
|
+
i[l.value] = l.label;
|
|
369
|
+
}) : i[o.value] = o.label, r.id ? k.emit("updateformData" + r.id, i) : k.emit("updateformData", i);
|
|
370
370
|
}
|
|
371
|
-
function
|
|
372
|
-
y("update:modelValue", o), y("change", o), t.field && (
|
|
371
|
+
function a(o) {
|
|
372
|
+
y("update:modelValue", o), y("change", o), t.field && (i[t.field] = o), r.id ? k.emit("updateformData" + r.id, i) : k.emit("updateformData", i);
|
|
373
373
|
}
|
|
374
|
-
function
|
|
374
|
+
function F(o) {
|
|
375
375
|
y("update:dynamicId", o);
|
|
376
376
|
}
|
|
377
|
-
let
|
|
377
|
+
let V = null;
|
|
378
378
|
return B(
|
|
379
379
|
() => t,
|
|
380
380
|
async (o) => {
|
|
@@ -386,9 +386,9 @@ const je = /* @__PURE__ */ le({
|
|
|
386
386
|
options: null
|
|
387
387
|
}
|
|
388
388
|
});
|
|
389
|
-
if (l ===
|
|
389
|
+
if (l === V)
|
|
390
390
|
return !1;
|
|
391
|
-
|
|
391
|
+
V = l, j();
|
|
392
392
|
},
|
|
393
393
|
{
|
|
394
394
|
immediate: !0,
|
|
@@ -408,13 +408,13 @@ const je = /* @__PURE__ */ le({
|
|
|
408
408
|
ref_key: "componentInstance",
|
|
409
409
|
ref: E,
|
|
410
410
|
onVnodeMounted: A,
|
|
411
|
-
model: R(
|
|
411
|
+
model: R(i)
|
|
412
412
|
}, { ...U.value }, {
|
|
413
413
|
[U.value.bindModel]: c.value,
|
|
414
414
|
["onUpdate:" + U.value.bindModel]: l[0] || (l[0] = (_) => c.value = _),
|
|
415
|
-
[`onUpdate:${U.value.bindModel}` || ""]:
|
|
415
|
+
[`onUpdate:${U.value.bindModel}` || ""]: a,
|
|
416
416
|
"onUpdate:modelValueLabel": f,
|
|
417
|
-
"onUpdate:dynamicId":
|
|
417
|
+
"onUpdate:dynamicId": F
|
|
418
418
|
}), {
|
|
419
419
|
node: T((_) => [
|
|
420
420
|
Q($, be({
|
|
@@ -454,12 +454,12 @@ function tt() {
|
|
|
454
454
|
if (!S) throw new Error(`表单 [name=${d}] 不存在`);
|
|
455
455
|
return S;
|
|
456
456
|
}
|
|
457
|
-
async function
|
|
457
|
+
async function i(d, S) {
|
|
458
458
|
const y = await c(d);
|
|
459
459
|
return G(await S(y));
|
|
460
460
|
}
|
|
461
461
|
async function w(d = "default") {
|
|
462
|
-
return await
|
|
462
|
+
return await i(d, (S) => S.getData());
|
|
463
463
|
}
|
|
464
464
|
function g(d, S = "default", y = void 0) {
|
|
465
465
|
var E, P;
|
|
@@ -473,9 +473,9 @@ function tt() {
|
|
|
473
473
|
var L;
|
|
474
474
|
let U = p((L = y == null ? void 0 : y.schemas[0]) == null ? void 0 : L.children);
|
|
475
475
|
return Object.keys(m).forEach((A) => {
|
|
476
|
-
var f,
|
|
477
|
-
const v = U.find((u) => u.field === A),
|
|
478
|
-
if ((v && (v == null ? void 0 : v.type) === "checkbox" || (v == null ? void 0 : v.type) === "select" && ((f = v == null ? void 0 : v.componentProps) != null && f.multiple) || (v == null ? void 0 : v.type) === "cascader" && !((
|
|
476
|
+
var f, a, F, V, o, l, $;
|
|
477
|
+
const v = U.find((u) => u.field === A), j = ["datetimerange", "daterange", "monthrange", "dates"];
|
|
478
|
+
if ((v && (v == null ? void 0 : v.type) === "checkbox" || (v == null ? void 0 : v.type) === "select" && ((f = v == null ? void 0 : v.componentProps) != null && f.multiple) || (v == null ? void 0 : v.type) === "cascader" && !((F = (a = v == null ? void 0 : v.componentProps) == null ? void 0 : a.props) != null && F.multiple) || (v == null ? void 0 : v.type) === "date" && j.includes((V = v == null ? void 0 : v.componentProps) == null ? void 0 : V.type)) && typeof m[A] == "string")
|
|
479
479
|
m[A] = (o = m[A]) == null ? void 0 : o.split(",");
|
|
480
480
|
else if ((v == null ? void 0 : v.type) === "cascader" && (($ = (l = v == null ? void 0 : v.componentProps) == null ? void 0 : l.props) != null && $.multiple) && typeof m[A] == "string")
|
|
481
481
|
m[A].indexOf(";") === -1 && m[A].indexOf(";") === -1 ? m[A][m[A]] : m[A].indexOf(";") > -1 ? m[A] = m[A].split(";").map((u) => u.split(",")) : m[A].indexOf(";") === -1 ? m[A] = m[A].split(",") : m[A].indexOf(";") > -1 ? m[A] = m[A].split(";").map((u) => u.split(",")) : m[A].indexOf(";") === -1 && (m[A] = m[A].split(","));
|
|
@@ -500,9 +500,9 @@ function tt() {
|
|
|
500
500
|
}
|
|
501
501
|
}
|
|
502
502
|
async function h(d = "default") {
|
|
503
|
-
return await
|
|
503
|
+
return await i(d, async (S) => (await S.validate(), await S.getData()));
|
|
504
504
|
}
|
|
505
|
-
async function
|
|
505
|
+
async function N(d) {
|
|
506
506
|
await r();
|
|
507
507
|
const S = {};
|
|
508
508
|
for (const y in s.value) {
|
|
@@ -512,14 +512,14 @@ function tt() {
|
|
|
512
512
|
return S;
|
|
513
513
|
}
|
|
514
514
|
async function O() {
|
|
515
|
-
return await
|
|
515
|
+
return await N((d) => d.getData());
|
|
516
516
|
}
|
|
517
517
|
function t(d) {
|
|
518
518
|
for (const S in d)
|
|
519
519
|
g(d[S], S);
|
|
520
520
|
}
|
|
521
521
|
async function x() {
|
|
522
|
-
return await
|
|
522
|
+
return await N(async (d) => (await d.validate(), await d.getData()));
|
|
523
523
|
}
|
|
524
524
|
return {
|
|
525
525
|
ready: e,
|
|
@@ -548,13 +548,13 @@ const nt = {
|
|
|
548
548
|
},
|
|
549
549
|
emits: ["change", "ready"],
|
|
550
550
|
setup(e, { expose: n, emit: s }) {
|
|
551
|
-
const r =
|
|
551
|
+
const r = se(() => import("./index-DgcFxYFp.js")), c = s, i = C([]), w = C({}), { ready: g, pageManager: h, forms: N, getData: O, setData: t, validate: x, getForms: d, setForms: S, validateAll: y, getFormInstance: E } = tt(), P = e, p = re({
|
|
552
552
|
schemas: []
|
|
553
553
|
});
|
|
554
554
|
B(
|
|
555
555
|
() => P.pageSchema,
|
|
556
556
|
(f) => {
|
|
557
|
-
|
|
557
|
+
ae(p, f);
|
|
558
558
|
},
|
|
559
559
|
{
|
|
560
560
|
immediate: !0,
|
|
@@ -564,8 +564,8 @@ const nt = {
|
|
|
564
564
|
() => P.formData,
|
|
565
565
|
(f) => {
|
|
566
566
|
if (f) {
|
|
567
|
-
let
|
|
568
|
-
w.value =
|
|
567
|
+
let a = L(f);
|
|
568
|
+
w.value = a, t(a), c("change", a);
|
|
569
569
|
}
|
|
570
570
|
},
|
|
571
571
|
{
|
|
@@ -574,78 +574,83 @@ const nt = {
|
|
|
574
574
|
}
|
|
575
575
|
);
|
|
576
576
|
function D(f) {
|
|
577
|
-
let
|
|
578
|
-
return f.forEach((
|
|
579
|
-
|
|
580
|
-
}),
|
|
577
|
+
let a = [];
|
|
578
|
+
return f.forEach((F) => {
|
|
579
|
+
F.children && (a = [...a, ...D(F.children)]), a.push(F);
|
|
580
|
+
}), a;
|
|
581
581
|
}
|
|
582
|
-
function I(f,
|
|
583
|
-
function
|
|
582
|
+
function I(f, a) {
|
|
583
|
+
function F(o) {
|
|
584
584
|
return JSON.parse(JSON.stringify(o));
|
|
585
585
|
}
|
|
586
|
-
function
|
|
586
|
+
function V(o, l) {
|
|
587
587
|
if (o.type === "card" && o.multiple && o.field && Array.isArray(l[o.field]))
|
|
588
588
|
return l[o.field].map((u) => {
|
|
589
589
|
var z;
|
|
590
|
-
const _ =
|
|
591
|
-
return _.children = (z = _.children) == null ? void 0 : z.map((
|
|
590
|
+
const _ = F({ ...o, multiple: !0 });
|
|
591
|
+
return _.children = (z = _.children) == null ? void 0 : z.map((oe) => V(oe, u)).flat(), _;
|
|
592
592
|
});
|
|
593
|
-
const $ =
|
|
594
|
-
return Array.isArray($.children) && ($.children = $.children.map((u) =>
|
|
593
|
+
const $ = F(o);
|
|
594
|
+
return Array.isArray($.children) && ($.children = $.children.map((u) => V(u, l)).flat()), $;
|
|
595
595
|
}
|
|
596
|
-
return f.map((o) =>
|
|
596
|
+
return f.map((o) => V(o, a)).flat();
|
|
597
597
|
}
|
|
598
|
-
function M(f,
|
|
599
|
-
const
|
|
600
|
-
return
|
|
598
|
+
function M(f, a = "", F = { root: 0 }) {
|
|
599
|
+
const V = a || "root";
|
|
600
|
+
return a || (F.root = 0), F[V] === void 0 && (F[V] = 0), f.map((o) => {
|
|
601
601
|
o.field && (o.oldField = JSON.parse(JSON.stringify(o.field)));
|
|
602
602
|
const l = { ...o };
|
|
603
603
|
if (o.type === "card") {
|
|
604
604
|
const $ = o.field || "";
|
|
605
|
-
o.multiple ? (l.field =
|
|
606
|
-
const u = l.field ||
|
|
607
|
-
|
|
608
|
-
} else o.field &&
|
|
609
|
-
return o.children && (l.children = M(o.children, l.field ||
|
|
605
|
+
o.multiple ? (l.field = a ? `${a}.${$}[${F[V]}]` : `${$}[${F[V]}]`, F[V]++) : o.field && a && (l.field = `${a}.${$}`);
|
|
606
|
+
const u = l.field || a;
|
|
607
|
+
F[u] = 0;
|
|
608
|
+
} else o.field && a && (l.field = `${a}.${o.field}`);
|
|
609
|
+
return o.children && (l.children = M(o.children, l.field || a, F)), l;
|
|
610
610
|
});
|
|
611
611
|
}
|
|
612
|
-
function m(f,
|
|
613
|
-
const o =
|
|
614
|
-
return
|
|
612
|
+
function m(f, a, F = "", V = {}) {
|
|
613
|
+
const o = F || "root";
|
|
614
|
+
return V[o] === void 0 && (V[o] = 0), f.forEach((l) => {
|
|
615
615
|
const $ = l.field || "";
|
|
616
|
-
let u =
|
|
617
|
-
l.type === "card" && l.multiple ? (typeof
|
|
618
|
-
|
|
619
|
-
}) :
|
|
620
|
-
|
|
616
|
+
let u = F ? `${F}.${$}` : `${$}`;
|
|
617
|
+
l.type === "card" && l.multiple ? (typeof a[u][`${V[o]}`] == "object" ? Object.keys(a[u][`${V[o]}`]).forEach((_) => {
|
|
618
|
+
a[`${u}[${V[o]}].${_}`] = a[u][`${V[o]}`][_];
|
|
619
|
+
}) : a[`${u}[${V[o]}]`] = a[u][`${V[o]}`], l.children && (l.children = m(
|
|
620
|
+
l.children,
|
|
621
|
+
a,
|
|
622
|
+
`${u}[${V[o]}]` || F,
|
|
623
|
+
V
|
|
624
|
+
)), V[o]++) : l.children && (l.children = m(l.children, a, F, V));
|
|
625
|
+
}), V[o] = 0, a;
|
|
621
626
|
}
|
|
622
|
-
function U(f,
|
|
623
|
-
let
|
|
627
|
+
function U(f, a, F) {
|
|
628
|
+
let V = m(G(f), G(a));
|
|
624
629
|
return {
|
|
625
630
|
obj: M(f),
|
|
626
|
-
dataObj:
|
|
631
|
+
dataObj: V
|
|
627
632
|
};
|
|
628
633
|
}
|
|
629
634
|
function L(f) {
|
|
630
|
-
let
|
|
631
|
-
|
|
632
|
-
const
|
|
633
|
-
let { obj:
|
|
634
|
-
return f = o,
|
|
635
|
-
var $, u, _, z,
|
|
635
|
+
let a = D(P.pageSchema.schemas[0].children);
|
|
636
|
+
i.value = a.filter((l) => l.type === "card" && l.multiple);
|
|
637
|
+
const F = I(P.pageSchema.schemas[0].children, f);
|
|
638
|
+
let { obj: V, dataObj: o } = U(F, f, i.value);
|
|
639
|
+
return f = o, P.pageSchema.schemas[0].children = V, Object.keys(f).forEach((l) => {
|
|
640
|
+
var $, u, _, z, oe, de, fe;
|
|
636
641
|
if (l.indexOf("@") < 0) {
|
|
637
|
-
const b =
|
|
642
|
+
const b = a.find((q) => q.field === l), Pe = ["datetimerange", "daterange", "monthrange", "dates"];
|
|
638
643
|
if ((b && (b == null ? void 0 : b.type) === "checkbox" || (b == null ? void 0 : b.type) === "select" && (($ = b == null ? void 0 : b.componentProps) != null && $.multiple) || (b == null ? void 0 : b.type) === "cascader" && !((_ = (u = b == null ? void 0 : b.componentProps) == null ? void 0 : u.props) != null && _.multiple) || (b == null ? void 0 : b.type) === "date" && Pe.includes((z = b == null ? void 0 : b.componentProps) == null ? void 0 : z.type)) && typeof f[l] == "string")
|
|
639
|
-
f[l] = (
|
|
644
|
+
f[l] = (oe = f[l]) == null ? void 0 : oe.split(",");
|
|
640
645
|
else if ((b == null ? void 0 : b.type) === "cascader" && ((fe = (de = b == null ? void 0 : b.componentProps) == null ? void 0 : de.props) != null && fe.multiple) && typeof f[l] == "string")
|
|
641
646
|
f[l].indexOf(";") > -1 ? f[l] = f[l].split(";").map((q) => q.split(",")) : f[l] = f[l].split(","), f[l].indexOf(";") > -1 ? f[l] = f[l].split(";").map((q) => q.split(",")) : f[l] = f[l].split(",");
|
|
642
647
|
else if (((b == null ? void 0 : b.type) === "upload-image" || (b == null ? void 0 : b.type) === "upload-file") && typeof f[l] == "string") {
|
|
643
648
|
let q = [];
|
|
644
|
-
Object.entries(f).forEach(([
|
|
645
|
-
f[l] === ye &&
|
|
646
|
-
}), f[l] = f[l].split(",").map((
|
|
647
|
-
url:
|
|
648
|
-
name: q[ye] ||
|
|
649
|
+
Object.entries(f).forEach(([ee, ye]) => {
|
|
650
|
+
f[l] === ye && ee !== b.field && ee.indexOf("@") > -1 && ee.indexOf(l) > -1 && (q = ee.split("@")[1].split(","));
|
|
651
|
+
}), f[l] = f[l].split(",").map((ee, ye) => ({
|
|
652
|
+
url: ee,
|
|
653
|
+
name: q[ye] || ee
|
|
649
654
|
}));
|
|
650
655
|
} else (b == null ? void 0 : b.type) === "number" || (b == null ? void 0 : b.type) === "slider" ? f[l] = Number(f[l]) : (b == null ? void 0 : b.type) === "switch" && (f[l] = typeof f[l] == "boolean" ? f[l] : f[l].indexOf("true") > -1);
|
|
651
656
|
}
|
|
@@ -659,18 +664,18 @@ const nt = {
|
|
|
659
664
|
{
|
|
660
665
|
immediate: !0
|
|
661
666
|
}
|
|
662
|
-
), Z("slots", Le()), Z("pageManager", h), Z("forms",
|
|
667
|
+
), Z("slots", Le()), Z("pageManager", h), Z("forms", N), Z("pageSchema", p), Z(
|
|
663
668
|
"disabled",
|
|
664
669
|
W(() => P.disabled)
|
|
665
670
|
);
|
|
666
671
|
const A = ue(), v = A == null ? void 0 : A.proxy;
|
|
667
|
-
function
|
|
672
|
+
function j() {
|
|
668
673
|
ce(() => {
|
|
669
674
|
g.value = !0, c("ready", h), v && h.addComponentInstance("builder", v);
|
|
670
675
|
});
|
|
671
676
|
}
|
|
672
|
-
return
|
|
673
|
-
|
|
677
|
+
return k.on("updateformData" + (P.id ? P.id : ""), (f) => {
|
|
678
|
+
c("change", f);
|
|
674
679
|
}), n({
|
|
675
680
|
ready: g,
|
|
676
681
|
pageManager: h,
|
|
@@ -681,17 +686,17 @@ const nt = {
|
|
|
681
686
|
setForms: S,
|
|
682
687
|
validateAll: y,
|
|
683
688
|
getFormInstance: E
|
|
684
|
-
}), (f,
|
|
689
|
+
}), (f, a) => R(J).initialized.value ? (H(), Y(Fe, {
|
|
685
690
|
key: 1,
|
|
686
|
-
onResolve:
|
|
691
|
+
onResolve: j
|
|
687
692
|
}, {
|
|
688
693
|
default: T(() => [
|
|
689
694
|
X("div", ot, [
|
|
690
|
-
(H(!0), Ee(Je, null, ze(p.schemas, (
|
|
695
|
+
(H(!0), Ee(Je, null, ze(p.schemas, (F, V) => (H(), Y(R(et), {
|
|
691
696
|
id: P.id,
|
|
692
|
-
key:
|
|
697
|
+
key: V,
|
|
693
698
|
sourceDateUrl: P.sourceDateUrl,
|
|
694
|
-
componentSchema:
|
|
699
|
+
componentSchema: F
|
|
695
700
|
}, null, 8, ["id", "sourceDateUrl", "componentSchema"]))), 128))
|
|
696
701
|
])
|
|
697
702
|
]),
|
|
@@ -712,14 +717,14 @@ function lt(e) {
|
|
|
712
717
|
const c = () => {
|
|
713
718
|
n -= 1, r && n <= 0 && (r.stop(), s = void 0, r = void 0);
|
|
714
719
|
};
|
|
715
|
-
return (...
|
|
720
|
+
return (...i) => (n += 1, r || (r = He(!0), s = r.run(() => e(...i))), xe(c), s);
|
|
716
721
|
}
|
|
717
|
-
function
|
|
722
|
+
function ie(e) {
|
|
718
723
|
return typeof e == "function" ? e() : R(e);
|
|
719
724
|
}
|
|
720
|
-
const
|
|
725
|
+
const at = typeof window < "u" && typeof document < "u";
|
|
721
726
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
722
|
-
const
|
|
727
|
+
const it = (e) => typeof e < "u", ct = Object.prototype.toString, ut = (e) => ct.call(e) === "[object Object]", dt = () => {
|
|
723
728
|
};
|
|
724
729
|
function ft(e) {
|
|
725
730
|
return ue();
|
|
@@ -731,25 +736,25 @@ function mt(e = !1, n = {}) {
|
|
|
731
736
|
const {
|
|
732
737
|
truthyValue: s = !0,
|
|
733
738
|
falsyValue: r = !1
|
|
734
|
-
} = n, c = Ke(e),
|
|
739
|
+
} = n, c = Ke(e), i = C(e);
|
|
735
740
|
function w(g) {
|
|
736
741
|
if (arguments.length)
|
|
737
|
-
return
|
|
742
|
+
return i.value = g, i.value;
|
|
738
743
|
{
|
|
739
|
-
const h =
|
|
740
|
-
return
|
|
744
|
+
const h = ie(s);
|
|
745
|
+
return i.value = i.value === h ? ie(r) : h, i.value;
|
|
741
746
|
}
|
|
742
747
|
}
|
|
743
|
-
return c ? w : [
|
|
748
|
+
return c ? w : [i, w];
|
|
744
749
|
}
|
|
745
750
|
function Jt(e, n, s) {
|
|
746
751
|
const r = B(e, (...c) => (ce(() => r()), n(...c)), s);
|
|
747
752
|
return r;
|
|
748
753
|
}
|
|
749
|
-
const ve =
|
|
750
|
-
function
|
|
754
|
+
const ve = at ? window : void 0;
|
|
755
|
+
function ne(e) {
|
|
751
756
|
var n;
|
|
752
|
-
const s =
|
|
757
|
+
const s = ie(e);
|
|
753
758
|
return (n = s == null ? void 0 : s.$el) != null ? n : s;
|
|
754
759
|
}
|
|
755
760
|
function ht(...e) {
|
|
@@ -757,23 +762,23 @@ function ht(...e) {
|
|
|
757
762
|
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([s, r, c] = e, n = ve) : [n, s, r, c] = e, !n)
|
|
758
763
|
return dt;
|
|
759
764
|
Array.isArray(s) || (s = [s]), Array.isArray(r) || (r = [r]);
|
|
760
|
-
const
|
|
761
|
-
|
|
765
|
+
const i = [], w = () => {
|
|
766
|
+
i.forEach((O) => O()), i.length = 0;
|
|
762
767
|
}, g = (O, t, x, d) => (O.addEventListener(t, x, d), () => O.removeEventListener(t, x, d)), h = B(
|
|
763
|
-
() => [
|
|
768
|
+
() => [ne(n), ie(c)],
|
|
764
769
|
([O, t]) => {
|
|
765
770
|
if (w(), !O)
|
|
766
771
|
return;
|
|
767
772
|
const x = ut(t) ? { ...t } : t;
|
|
768
|
-
|
|
773
|
+
i.push(
|
|
769
774
|
...s.flatMap((d) => r.map((S) => g(O, d, S, x)))
|
|
770
775
|
);
|
|
771
776
|
},
|
|
772
777
|
{ immediate: !0, flush: "post" }
|
|
773
|
-
),
|
|
778
|
+
), N = () => {
|
|
774
779
|
h(), w();
|
|
775
780
|
};
|
|
776
|
-
return xe(
|
|
781
|
+
return xe(N), N;
|
|
777
782
|
}
|
|
778
783
|
function vt(e) {
|
|
779
784
|
return typeof e == "function" ? e : typeof e == "string" ? (n) => n.key === e : Array.isArray(e) ? (n) => e.includes(n.key) : () => !0;
|
|
@@ -783,12 +788,12 @@ function Me(...e) {
|
|
|
783
788
|
e.length === 3 ? (n = e[0], s = e[1], r = e[2]) : e.length === 2 ? typeof e[1] == "object" ? (n = !0, s = e[0], r = e[1]) : (n = e[0], s = e[1]) : (n = !0, s = e[0]);
|
|
784
789
|
const {
|
|
785
790
|
target: c = ve,
|
|
786
|
-
eventName:
|
|
791
|
+
eventName: i = "keydown",
|
|
787
792
|
passive: w = !1,
|
|
788
793
|
dedupe: g = !1
|
|
789
794
|
} = r, h = vt(n);
|
|
790
|
-
return ht(c,
|
|
791
|
-
O.repeat &&
|
|
795
|
+
return ht(c, i, (O) => {
|
|
796
|
+
O.repeat && ie(g) || h(O) && s(O);
|
|
792
797
|
}, w);
|
|
793
798
|
}
|
|
794
799
|
function we(e, n, s = {}) {
|
|
@@ -812,24 +817,24 @@ function wt(e) {
|
|
|
812
817
|
}
|
|
813
818
|
function St(e, n, s = {}) {
|
|
814
819
|
const { window: r = ve, ...c } = s;
|
|
815
|
-
let
|
|
820
|
+
let i;
|
|
816
821
|
const w = yt(() => r && "ResizeObserver" in r), g = () => {
|
|
817
|
-
|
|
822
|
+
i && (i.disconnect(), i = void 0);
|
|
818
823
|
}, h = W(() => {
|
|
819
|
-
const t =
|
|
820
|
-
return Array.isArray(t) ? t.map((x) =>
|
|
821
|
-
}),
|
|
824
|
+
const t = ie(e);
|
|
825
|
+
return Array.isArray(t) ? t.map((x) => ne(x)) : [ne(t)];
|
|
826
|
+
}), N = B(
|
|
822
827
|
h,
|
|
823
828
|
(t) => {
|
|
824
829
|
if (g(), w.value && r) {
|
|
825
|
-
|
|
830
|
+
i = new ResizeObserver(n);
|
|
826
831
|
for (const x of t)
|
|
827
|
-
x &&
|
|
832
|
+
x && i.observe(x, c);
|
|
828
833
|
}
|
|
829
834
|
},
|
|
830
835
|
{ immediate: !0, flush: "post" }
|
|
831
836
|
), O = () => {
|
|
832
|
-
g(),
|
|
837
|
+
g(), N();
|
|
833
838
|
};
|
|
834
839
|
return xe(O), {
|
|
835
840
|
isSupported: w,
|
|
@@ -837,15 +842,15 @@ function St(e, n, s = {}) {
|
|
|
837
842
|
};
|
|
838
843
|
}
|
|
839
844
|
function zt(e, n = { width: 0, height: 0 }, s = {}) {
|
|
840
|
-
const { window: r = ve, box: c = "content-box" } = s,
|
|
845
|
+
const { window: r = ve, box: c = "content-box" } = s, i = W(() => {
|
|
841
846
|
var t, x;
|
|
842
|
-
return (x = (t =
|
|
847
|
+
return (x = (t = ne(e)) == null ? void 0 : t.namespaceURI) == null ? void 0 : x.includes("svg");
|
|
843
848
|
}), w = C(n.width), g = C(n.height), { stop: h } = St(
|
|
844
849
|
e,
|
|
845
850
|
([t]) => {
|
|
846
851
|
const x = c === "border-box" ? t.borderBoxSize : c === "content-box" ? t.contentBoxSize : t.devicePixelContentBoxSize;
|
|
847
|
-
if (r &&
|
|
848
|
-
const d =
|
|
852
|
+
if (r && i.value) {
|
|
853
|
+
const d = ne(e);
|
|
849
854
|
if (d) {
|
|
850
855
|
const S = d.getBoundingClientRect();
|
|
851
856
|
w.value = S.width, g.value = S.height;
|
|
@@ -859,17 +864,17 @@ function zt(e, n = { width: 0, height: 0 }, s = {}) {
|
|
|
859
864
|
s
|
|
860
865
|
);
|
|
861
866
|
pt(() => {
|
|
862
|
-
const t =
|
|
867
|
+
const t = ne(e);
|
|
863
868
|
t && (w.value = "offsetWidth" in t ? t.offsetWidth : n.width, g.value = "offsetHeight" in t ? t.offsetHeight : n.height);
|
|
864
869
|
});
|
|
865
|
-
const
|
|
866
|
-
() =>
|
|
870
|
+
const N = B(
|
|
871
|
+
() => ne(e),
|
|
867
872
|
(t) => {
|
|
868
873
|
w.value = t ? n.width : 0, g.value = t ? n.height : 0;
|
|
869
874
|
}
|
|
870
875
|
);
|
|
871
876
|
function O() {
|
|
872
|
-
h(),
|
|
877
|
+
h(), N();
|
|
873
878
|
}
|
|
874
879
|
return {
|
|
875
880
|
width: w,
|
|
@@ -878,18 +883,18 @@ function zt(e, n = { width: 0, height: 0 }, s = {}) {
|
|
|
878
883
|
};
|
|
879
884
|
}
|
|
880
885
|
function Ht(e, n, s, r = {}) {
|
|
881
|
-
var c,
|
|
886
|
+
var c, i, w;
|
|
882
887
|
const {
|
|
883
888
|
clone: g = !1,
|
|
884
889
|
passive: h = !1,
|
|
885
|
-
eventName:
|
|
890
|
+
eventName: N,
|
|
886
891
|
deep: O = !1,
|
|
887
892
|
defaultValue: t,
|
|
888
893
|
shouldEmit: x
|
|
889
|
-
} = r, d = ue(), S = s || (d == null ? void 0 : d.emit) || ((c = d == null ? void 0 : d.$emit) == null ? void 0 : c.bind(d)) || ((w = (
|
|
890
|
-
let y =
|
|
894
|
+
} = r, d = ue(), S = s || (d == null ? void 0 : d.emit) || ((c = d == null ? void 0 : d.$emit) == null ? void 0 : c.bind(d)) || ((w = (i = d == null ? void 0 : d.proxy) == null ? void 0 : i.$emit) == null ? void 0 : w.bind(d == null ? void 0 : d.proxy));
|
|
895
|
+
let y = N;
|
|
891
896
|
n || (n = "modelValue"), y = y || `update:${n.toString()}`;
|
|
892
|
-
const E = (D) => g ? typeof g == "function" ? g(D) : wt(D) : D, P = () =>
|
|
897
|
+
const E = (D) => g ? typeof g == "function" ? g(D) : wt(D) : D, P = () => it(e[n]) ? E(e[n]) : t, p = (D) => {
|
|
893
898
|
x ? x(D) && S(y, D) : S(y, D);
|
|
894
899
|
};
|
|
895
900
|
if (h) {
|
|
@@ -945,8 +950,8 @@ function Et(e) {
|
|
|
945
950
|
var n = document.querySelector("html"), s = new MutationObserver(function(r) {
|
|
946
951
|
for (var c of r)
|
|
947
952
|
if (c.type === "attributes" && c.attributeName === "class") {
|
|
948
|
-
const
|
|
949
|
-
new Array(...
|
|
953
|
+
const i = c.target;
|
|
954
|
+
new Array(...i.classList).includes("dark") ? e.value = !0 : e.value = !1;
|
|
950
955
|
}
|
|
951
956
|
});
|
|
952
957
|
s.observe(n, {
|
|
@@ -957,12 +962,12 @@ function Et(e) {
|
|
|
957
962
|
});
|
|
958
963
|
}
|
|
959
964
|
function At() {
|
|
960
|
-
const e = C(1), n = C(!1), { isDark: s } = Dt(), { pressSpace: r, pressShift: c, pressCtrl:
|
|
965
|
+
const e = C(1), n = C(!1), { isDark: s } = Dt(), { pressSpace: r, pressShift: c, pressCtrl: i } = Ot();
|
|
961
966
|
return {
|
|
962
967
|
canvasScale: e,
|
|
963
968
|
pressSpace: r,
|
|
964
969
|
pressShift: c,
|
|
965
|
-
pressCtrl:
|
|
970
|
+
pressCtrl: i,
|
|
966
971
|
disabledZoom: n,
|
|
967
972
|
isDark: s
|
|
968
973
|
};
|
|
@@ -988,34 +993,34 @@ function Zt(e) {
|
|
|
988
993
|
const { pressSpace: n } = ge(), s = new Image(1, 1);
|
|
989
994
|
s.src = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==";
|
|
990
995
|
let r = 0, c = 0;
|
|
991
|
-
function
|
|
992
|
-
var
|
|
993
|
-
n.value && (r = h.x, c = h.y, (
|
|
996
|
+
function i(h) {
|
|
997
|
+
var N;
|
|
998
|
+
n.value && (r = h.x, c = h.y, (N = h.dataTransfer) == null || N.setDragImage(document.createElement("div"), 0, 0));
|
|
994
999
|
}
|
|
995
1000
|
function w(h) {
|
|
996
1001
|
if (h.preventDefault(), !h.x || !h.y || !n.value)
|
|
997
1002
|
return;
|
|
998
|
-
const
|
|
999
|
-
r = h.x, c = h.y, e.value && (e.value.scrollTop -= O, e.value.scrollLeft -=
|
|
1003
|
+
const N = h.x - r, O = h.y - c;
|
|
1004
|
+
r = h.x, c = h.y, e.value && (e.value.scrollTop -= O, e.value.scrollLeft -= N);
|
|
1000
1005
|
}
|
|
1001
1006
|
function g() {
|
|
1002
1007
|
n.value = !1;
|
|
1003
1008
|
}
|
|
1004
|
-
return { handleElementDragStart:
|
|
1009
|
+
return { handleElementDragStart: i, handleElementDrag: w, handleElementDragEnd: g };
|
|
1005
1010
|
}
|
|
1006
1011
|
function Wt(e) {
|
|
1007
1012
|
const { pressCtrl: n, canvasScale: s, disabledZoom: r } = ge();
|
|
1008
|
-
function c(
|
|
1013
|
+
function c(i) {
|
|
1009
1014
|
if (!n.value || r.value)
|
|
1010
1015
|
return;
|
|
1011
|
-
|
|
1016
|
+
i.preventDefault();
|
|
1012
1017
|
let w = 0;
|
|
1013
|
-
|
|
1018
|
+
i.deltaY < 0 ? w = s.value + 0.05 : w = s.value - 0.05, !(w > 150 || w < 0.5) && (s.value = w);
|
|
1014
1019
|
}
|
|
1015
1020
|
return B(
|
|
1016
1021
|
() => s.value,
|
|
1017
|
-
(
|
|
1018
|
-
e.value && !r.value && (e.value.style.transform = `scale(${
|
|
1022
|
+
(i) => {
|
|
1023
|
+
e.value && !r.value && (e.value.style.transform = `scale(${i})`);
|
|
1019
1024
|
}
|
|
1020
1025
|
), { handleZoom: c, canvasScale: s };
|
|
1021
1026
|
}
|
|
@@ -1035,19 +1040,19 @@ function Gt(e, n = 16.66) {
|
|
|
1035
1040
|
const xt = { class: "min-w-750px rounded" }, It = { class: "h-full rounded" }, _t = /* @__PURE__ */ le({
|
|
1036
1041
|
__name: "index",
|
|
1037
1042
|
setup(e, { expose: n }) {
|
|
1038
|
-
const s = J.getComponent("monacoEditor"), r = J.getComponent("modal"), c = C(null),
|
|
1043
|
+
const s = J.getComponent("monacoEditor"), r = J.getComponent("modal"), c = C(null), i = C(!1), w = C(!1), g = C({}), h = te("pageSchema"), N = C(null), O = C("");
|
|
1039
1044
|
function t() {
|
|
1040
1045
|
w.value = !1;
|
|
1041
1046
|
}
|
|
1042
1047
|
function x() {
|
|
1043
|
-
|
|
1048
|
+
i.value = !1;
|
|
1044
1049
|
}
|
|
1045
1050
|
function d() {
|
|
1046
|
-
|
|
1051
|
+
i.value = !0, O.value = qe();
|
|
1047
1052
|
}
|
|
1048
1053
|
async function S() {
|
|
1049
1054
|
try {
|
|
1050
|
-
let y = await
|
|
1055
|
+
let y = await N.value.validateAll();
|
|
1051
1056
|
if (!Object.keys(y).length) {
|
|
1052
1057
|
alert("请添加表单组件后再尝试!");
|
|
1053
1058
|
return;
|
|
@@ -1063,8 +1068,8 @@ const xt = { class: "min-w-750px rounded" }, It = { class: "h-full rounded" }, _
|
|
|
1063
1068
|
return n({
|
|
1064
1069
|
handleOpen: d
|
|
1065
1070
|
}), (y, E) => (H(), Y(R(r), {
|
|
1066
|
-
modelValue:
|
|
1067
|
-
"onUpdate:modelValue": E[1] || (E[1] = (P) =>
|
|
1071
|
+
modelValue: i.value,
|
|
1072
|
+
"onUpdate:modelValue": E[1] || (E[1] = (P) => i.value = P),
|
|
1068
1073
|
title: "预览",
|
|
1069
1074
|
class: "w-900px",
|
|
1070
1075
|
width: "900px",
|
|
@@ -1077,7 +1082,7 @@ const xt = { class: "min-w-750px rounded" }, It = { class: "h-full rounded" }, _
|
|
|
1077
1082
|
(H(), Y(R(rt), {
|
|
1078
1083
|
key: O.value,
|
|
1079
1084
|
ref_key: "kb",
|
|
1080
|
-
ref:
|
|
1085
|
+
ref: N,
|
|
1081
1086
|
"page-schema": R(h)
|
|
1082
1087
|
}, null, 8, ["page-schema"])),
|
|
1083
1088
|
Q(R(r), {
|
|
@@ -1134,7 +1139,7 @@ const xt = { class: "min-w-750px rounded" }, It = { class: "h-full rounded" }, _
|
|
|
1134
1139
|
"updateSourceData"
|
|
1135
1140
|
],
|
|
1136
1141
|
setup(e, { expose: n, emit: s }) {
|
|
1137
|
-
const { t: r } = Oe(), c =
|
|
1142
|
+
const { t: r } = Oe(), c = se(() => import("./index-IGxCNti8.js")), i = se(() => import("./index-WkZdU_zw.js")), w = se(() => import("./index-D5moT97y.js")), g = se(() => import("./index-Cln9MN7u.js")), h = se(() => import("./index-DgcFxYFp.js")), N = Ce(), O = ke(), t = e;
|
|
1138
1143
|
let x = {
|
|
1139
1144
|
schemas: [
|
|
1140
1145
|
{
|
|
@@ -1187,7 +1192,7 @@ defineExpose({
|
|
|
1187
1192
|
return;
|
|
1188
1193
|
}
|
|
1189
1194
|
t.source && J.setSourceData(t.source), t.formMode && (x.schemas = J.formSchemas);
|
|
1190
|
-
}),
|
|
1195
|
+
}), N.setDesignMode(), N.setDefaultComponentIds(x.schemas);
|
|
1191
1196
|
const d = s, S = C(null), y = re({
|
|
1192
1197
|
checkedNode: null,
|
|
1193
1198
|
hoverNode: null,
|
|
@@ -1200,61 +1205,61 @@ defineExpose({
|
|
|
1200
1205
|
he(() => {
|
|
1201
1206
|
P.value = t.disabledZoom;
|
|
1202
1207
|
}), he(() => {
|
|
1203
|
-
const
|
|
1204
|
-
|
|
1205
|
-
}), Z("pageSchema", E), Z("revoke", O), Z("pageManager",
|
|
1208
|
+
const a = E.script;
|
|
1209
|
+
a && a !== "" && N.setMethods(a);
|
|
1210
|
+
}), Z("pageSchema", E), Z("revoke", O), Z("pageManager", N), Z(
|
|
1206
1211
|
"designerProps",
|
|
1207
1212
|
W(() => t)
|
|
1208
1213
|
), Z("designer", {
|
|
1209
1214
|
setCheckedNode: D,
|
|
1210
1215
|
setHoverNode: I,
|
|
1211
1216
|
setDisableHover: m,
|
|
1212
|
-
handleToggleDeviceMode:
|
|
1217
|
+
handleToggleDeviceMode: j,
|
|
1213
1218
|
reset: A,
|
|
1214
1219
|
state: y
|
|
1215
|
-
}),
|
|
1216
|
-
d("saveSourceData",
|
|
1217
|
-
}),
|
|
1218
|
-
d("deleteSourceData",
|
|
1219
|
-
}),
|
|
1220
|
-
d("updateSourceData",
|
|
1220
|
+
}), k.on("saveSourceData", (a) => {
|
|
1221
|
+
d("saveSourceData", a);
|
|
1222
|
+
}), k.on("deleteSourceData", (a) => {
|
|
1223
|
+
d("deleteSourceData", a);
|
|
1224
|
+
}), k.on("updateSourceData", (a) => {
|
|
1225
|
+
d("updateSourceData", a);
|
|
1221
1226
|
});
|
|
1222
1227
|
function p() {
|
|
1223
1228
|
E.schemas = G(x.schemas), D(E.schemas[0]), O.push(E.schemas, "初始化撤销功能");
|
|
1224
1229
|
}
|
|
1225
|
-
async function D(
|
|
1226
|
-
y.checkedNode =
|
|
1230
|
+
async function D(a = E.schemas[0]) {
|
|
1231
|
+
y.checkedNode = a, y.matched = Xe(E.schemas, a.id);
|
|
1227
1232
|
}
|
|
1228
|
-
async function I(
|
|
1229
|
-
var
|
|
1230
|
-
if (!
|
|
1233
|
+
async function I(a = null) {
|
|
1234
|
+
var F;
|
|
1235
|
+
if (!a || y.disableHover)
|
|
1231
1236
|
return y.hoverNode = null, !1;
|
|
1232
|
-
if ((
|
|
1237
|
+
if ((a == null ? void 0 : a.id) === ((F = y.hoverNode) == null ? void 0 : F.id))
|
|
1233
1238
|
return !1;
|
|
1234
|
-
y.hoverNode =
|
|
1239
|
+
y.hoverNode = a;
|
|
1235
1240
|
}
|
|
1236
1241
|
function M() {
|
|
1237
1242
|
ce(() => {
|
|
1238
|
-
d("ready", { pageManager:
|
|
1243
|
+
d("ready", { pageManager: N });
|
|
1239
1244
|
});
|
|
1240
1245
|
}
|
|
1241
|
-
async function m(
|
|
1242
|
-
y.disableHover =
|
|
1246
|
+
async function m(a = !1) {
|
|
1247
|
+
y.disableHover = a;
|
|
1243
1248
|
}
|
|
1244
|
-
function U(
|
|
1245
|
-
|
|
1249
|
+
function U(a) {
|
|
1250
|
+
ae(E, G(a));
|
|
1246
1251
|
}
|
|
1247
1252
|
function L() {
|
|
1248
1253
|
return Ie(E);
|
|
1249
1254
|
}
|
|
1250
1255
|
function A() {
|
|
1251
|
-
Ve(E.schemas, x.schemas) && E.script === x.script || (
|
|
1256
|
+
Ve(E.schemas, x.schemas) && E.script === x.script || (ae(E.schemas, x.schemas), E.script = x.script, D(E.schemas[0]), O.push(E.schemas, "重置操作"), d("reset", E));
|
|
1252
1257
|
}
|
|
1253
1258
|
function v() {
|
|
1254
1259
|
d("save", Ie(E));
|
|
1255
1260
|
}
|
|
1256
|
-
function
|
|
1257
|
-
d("toggleDeviceMode",
|
|
1261
|
+
function j(a) {
|
|
1262
|
+
d("toggleDeviceMode", a);
|
|
1258
1263
|
}
|
|
1259
1264
|
function f() {
|
|
1260
1265
|
S.value.handleOpen();
|
|
@@ -1265,45 +1270,45 @@ defineExpose({
|
|
|
1265
1270
|
getData: L,
|
|
1266
1271
|
reset: A,
|
|
1267
1272
|
preview: f
|
|
1268
|
-
}), (
|
|
1273
|
+
}), (a, F) => R(J).initialized.value ? (H(), Y(Fe, {
|
|
1269
1274
|
key: 1,
|
|
1270
1275
|
onResolve: M
|
|
1271
1276
|
}, {
|
|
1272
1277
|
default: T(() => [
|
|
1273
1278
|
X("div", Nt, [
|
|
1274
1279
|
X("div", Ft, [
|
|
1275
|
-
K(
|
|
1280
|
+
K(a.$slots, "header", {}, () => [
|
|
1276
1281
|
t.hiddenHeader ? Ne("", !0) : (H(), Y(R(c), {
|
|
1277
1282
|
key: 0,
|
|
1278
1283
|
onPreview: f,
|
|
1279
1284
|
onSave: v
|
|
1280
1285
|
}, {
|
|
1281
1286
|
header: T(() => [
|
|
1282
|
-
K(
|
|
1287
|
+
K(a.$slots, "header-prefix")
|
|
1283
1288
|
]),
|
|
1284
1289
|
prefix: T(() => [
|
|
1285
|
-
K(
|
|
1290
|
+
K(a.$slots, "header-prefix")
|
|
1286
1291
|
]),
|
|
1287
1292
|
title: T(() => [
|
|
1288
|
-
K(
|
|
1293
|
+
K(a.$slots, "header-title")
|
|
1289
1294
|
]),
|
|
1290
1295
|
"right-prefix": T(() => [
|
|
1291
|
-
K(
|
|
1296
|
+
K(a.$slots, "header-right-prefix")
|
|
1292
1297
|
]),
|
|
1293
1298
|
"right-action": T(() => [
|
|
1294
|
-
K(
|
|
1299
|
+
K(a.$slots, "header-right-action")
|
|
1295
1300
|
]),
|
|
1296
1301
|
"right-suffix": T(() => [
|
|
1297
|
-
K(
|
|
1302
|
+
K(a.$slots, "header-right-suffix")
|
|
1298
1303
|
]),
|
|
1299
1304
|
_: 3
|
|
1300
1305
|
}))
|
|
1301
1306
|
])
|
|
1302
1307
|
]),
|
|
1303
1308
|
X("div", {
|
|
1304
|
-
class: Ge(["epic-split-view-container", { "hidden-header":
|
|
1309
|
+
class: Ge(["epic-split-view-container", { "hidden-header": a.hiddenHeader }])
|
|
1305
1310
|
}, [
|
|
1306
|
-
Q(R(
|
|
1311
|
+
Q(R(i)),
|
|
1307
1312
|
Q(R(w)),
|
|
1308
1313
|
Q(R(g))
|
|
1309
1314
|
], 2),
|
|
@@ -1322,7 +1327,7 @@ defineExpose({
|
|
|
1322
1327
|
})) : (H(), Ee("div", $t));
|
|
1323
1328
|
}
|
|
1324
1329
|
}), Ct = {
|
|
1325
|
-
component: async () => await import("./index-
|
|
1330
|
+
component: async () => await import("./index-CAkpmC6c.js"),
|
|
1326
1331
|
defaultSchema: {
|
|
1327
1332
|
label: "代码编辑器",
|
|
1328
1333
|
type: "monacoEditor",
|
|
@@ -1372,7 +1377,7 @@ defineExpose({
|
|
|
1372
1377
|
}
|
|
1373
1378
|
}, { t: me } = Oe();
|
|
1374
1379
|
function Pt(e) {
|
|
1375
|
-
e.component("EInputSize", async () => await import("./index-Cx7gKpkD.js")), e.component("EColEditor", async () => await import("./index-CpTA2IRB.js")), e.component("EActionEditor", async () => await import("./index-
|
|
1380
|
+
e.component("EInputSize", async () => await import("./index-Cx7gKpkD.js")), e.component("EColEditor", async () => await import("./index-CpTA2IRB.js")), e.component("EActionEditor", async () => await import("./index-Dgdrnlh5.js")), e.component("ERuleEditor", async () => await import("./index-BdToAdGK.js")), e.component("EOptionsEditor", async () => await import("./index-DNWIP087.js")), e.component("ENode", async () => await import("./index-B34F68Fz.js")), e.component("EDataSource", async () => await import("./index-B0OgKtuT.js")), e.component("EColumnEditor", async () => await import("./index-AO9st9GO.js")), e.component("PaddingMarginControl", async () => await import("./index-CdnV7DS4.js")), e.registerActivitybar({
|
|
1376
1381
|
id: "component_view",
|
|
1377
1382
|
title: me("component"),
|
|
1378
1383
|
icon: "icon--epic--extension-outline",
|
|
@@ -1385,11 +1390,11 @@ function Pt(e) {
|
|
|
1385
1390
|
}), e.registerRightSidebar({
|
|
1386
1391
|
id: "attribute_view",
|
|
1387
1392
|
title: me("attribute"),
|
|
1388
|
-
component: async () => await import("./attributeView-
|
|
1393
|
+
component: async () => await import("./attributeView-B__FQHVu.js")
|
|
1389
1394
|
}), e.registerRightSidebar({
|
|
1390
1395
|
id: "style_view",
|
|
1391
1396
|
title: me("style"),
|
|
1392
|
-
component: async () => await import("./styleView-
|
|
1397
|
+
component: async () => await import("./styleView-DwuC1nZJ.js")
|
|
1393
1398
|
}), e.registerRightSidebar({
|
|
1394
1399
|
id: "event_view",
|
|
1395
1400
|
title: "事件",
|