epic-designer-gold 1.0.10 → 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-CK7X8evt.js → attributeView-B__FQHVu.js} +1 -1
- package/dist/{attributeView-BLJcsZMJ.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-BQlnwEZk.js → index-AO9st9GO.js} +1 -1
- package/dist/index-B34F68Fz.js +4 -0
- package/dist/{index-Bg2Wz9aw.cjs → index-BEaUH_4C.cjs} +1 -1
- package/dist/{index-BAdyaDNP.cjs → index-BNDnGxRg.cjs} +1 -1
- package/dist/{index-RZhGRdhW.js → index-BdToAdGK.js} +1 -1
- package/dist/{index-DaFOmX2X.js → index-CAkpmC6c.js} +1 -1
- package/dist/{index-b_SMxzas.cjs → index-CKKGzeVk.cjs} +1 -1
- package/dist/index-CZ_nc70v.cjs +10 -0
- package/dist/{index-HUgegsXA.cjs → index-CanuzqIT.cjs} +1 -1
- package/dist/{index-D46qMwz4.cjs → index-Ch8hBndx.cjs} +1 -1
- package/dist/{index-BS7DLn57.js → index-D5moT97y.js} +140 -140
- package/dist/{index-C_Vm4D43.js → index-DNWIP087.js} +1 -1
- package/dist/{index-CpsrriO4.js → index-Dgdrnlh5.js} +1 -1
- package/dist/{index-BLrnu25V.js → index-Dx4IQxp4.js} +255 -255
- package/dist/{index-Cws26Bdx.cjs → index-IDj-bwmO.cjs} +1 -1
- package/dist/{index-DxzmiGMB.cjs → index-g2SN8VMi.cjs} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{styleView-C1kBC_26.cjs → styleView-DSoOUApX.cjs} +1 -1
- package/dist/{styleView-Bi4oL4aS.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-DP1V_VDl.cjs +0 -10
- package/dist/index-DYM7GA7s.js +0 -4
|
@@ -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,54 +207,49 @@ 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) {
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
headers
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
o.componentProps.options = d(_.data, u.dataKey, u.dataValue);
|
|
251
|
-
return o;
|
|
252
|
-
}
|
|
253
|
-
return o;
|
|
254
|
-
} catch {
|
|
215
|
+
if (["cascader", "checkbox", "select", "radio"].includes(o.type) && o.componentProps.dynamicId && r.sourceDateUrl) {
|
|
216
|
+
const u = (await _e({
|
|
217
|
+
// || "http://192.168.28.205:3000/dev-api/data-source
|
|
218
|
+
url: r.sourceDateUrl,
|
|
219
|
+
method: "get",
|
|
220
|
+
params: {
|
|
221
|
+
id: o.componentProps.dynamicId
|
|
222
|
+
},
|
|
223
|
+
headers: {
|
|
224
|
+
Authorization: "Bearer " + pe.get("Admin-Token"),
|
|
225
|
+
lang: pe.get("saas-locale") || "zh-CN",
|
|
226
|
+
//语言
|
|
227
|
+
zone: Intl.DateTimeFormat().resolvedOptions().timeZone
|
|
228
|
+
//时区
|
|
229
|
+
}
|
|
230
|
+
})).data.data;
|
|
231
|
+
let _ = await _e({
|
|
232
|
+
url: u.url,
|
|
233
|
+
method: u.method,
|
|
234
|
+
data: u.body ? JSON.parse(u.body) : {},
|
|
235
|
+
params: u.params ? JSON.parse(u.params) : {},
|
|
236
|
+
headers: {
|
|
237
|
+
...JSON.parse(u.headers),
|
|
238
|
+
Authorization: "Bearer " + pe.get("Admin-Token"),
|
|
239
|
+
lang: pe.get("saas-locale") || "zh-CN",
|
|
240
|
+
//语言
|
|
241
|
+
zone: Intl.DateTimeFormat().resolvedOptions().timeZone
|
|
242
|
+
//时区
|
|
243
|
+
}
|
|
244
|
+
});
|
|
245
|
+
if (u && (u != null && u.dataPath)) {
|
|
246
|
+
const oe = u.dataPath.split(".").reduce((de, fe) => de[fe], _.data);
|
|
247
|
+
o.componentProps.options = d(oe, u.dataKey, u.dataValue);
|
|
248
|
+
} else
|
|
249
|
+
o.componentProps.options = d(_.data, u.dataKey, u.dataValue);
|
|
255
250
|
return o;
|
|
256
|
-
} finally {
|
|
257
251
|
}
|
|
252
|
+
return o;
|
|
258
253
|
}
|
|
259
254
|
function d(o, l, $) {
|
|
260
255
|
return o && Object.prototype.toString.call(o) === "[object Array]" ? o.map((u) => u.children && u.children.length ? {
|
|
@@ -269,7 +264,7 @@ const je = /* @__PURE__ */ le({
|
|
|
269
264
|
B(
|
|
270
265
|
() => r.componentSchema,
|
|
271
266
|
(o) => {
|
|
272
|
-
Ve(t, o, ["children"]) || (
|
|
267
|
+
Ve(t, o, ["children"]) || (ae(t, G(o)), S());
|
|
273
268
|
},
|
|
274
269
|
{
|
|
275
270
|
deep: !0
|
|
@@ -278,14 +273,14 @@ const je = /* @__PURE__ */ le({
|
|
|
278
273
|
function S() {
|
|
279
274
|
g.isDesignMode.value && typeof t.field == "string" && (t.field += "-design-mode");
|
|
280
275
|
}
|
|
281
|
-
(r.resetFormData || O) && (
|
|
276
|
+
(r.resetFormData || O) && (i = {});
|
|
282
277
|
const y = n, E = C(), P = C(), p = (o) => {
|
|
283
278
|
P.value = o;
|
|
284
279
|
}, D = Re();
|
|
285
280
|
Object.keys(D).length && Z("nodeAttrs", D);
|
|
286
281
|
const I = Ue(null), M = W(() => {
|
|
287
282
|
var o, l;
|
|
288
|
-
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;
|
|
289
284
|
}), m = W(() => {
|
|
290
285
|
var u;
|
|
291
286
|
const o = M.value && ((u = t.rules) == null ? void 0 : u.map((_) => ({
|
|
@@ -294,7 +289,7 @@ const je = /* @__PURE__ */ le({
|
|
|
294
289
|
// 自定义校验函数
|
|
295
290
|
})));
|
|
296
291
|
let l = t.field;
|
|
297
|
-
r.ruleField ? l = r.ruleField :
|
|
292
|
+
r.ruleField ? l = r.ruleField : N && t.field && (l = G(N), l.push(t.field));
|
|
298
293
|
const $ = {
|
|
299
294
|
...t,
|
|
300
295
|
rules: o,
|
|
@@ -316,11 +311,11 @@ const je = /* @__PURE__ */ le({
|
|
|
316
311
|
};
|
|
317
312
|
}), L = W(() => J.getComponentConfingByType(t.type) ?? null);
|
|
318
313
|
he(() => {
|
|
319
|
-
c.value = r.modelValue ??
|
|
314
|
+
c.value = r.modelValue ?? i[t.field ?? ""];
|
|
320
315
|
}), B(
|
|
321
316
|
() => c.value,
|
|
322
317
|
() => {
|
|
323
|
-
c.value !== (r.modelValue ??
|
|
318
|
+
c.value !== (r.modelValue ?? i[t.field ?? ""]) && a(c.value);
|
|
324
319
|
}
|
|
325
320
|
), B(
|
|
326
321
|
() => E.value,
|
|
@@ -332,17 +327,17 @@ const je = /* @__PURE__ */ le({
|
|
|
332
327
|
function A() {
|
|
333
328
|
var l;
|
|
334
329
|
const o = E.value || s;
|
|
335
|
-
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));
|
|
336
331
|
}
|
|
337
332
|
function v() {
|
|
338
333
|
var o;
|
|
339
334
|
t.id && (g.removeComponentInstance(t.id), (o = L.value) != null && o.defaultSchema.input && t.noFormItem !== !0 && g.removeComponentInstance(t.id + "formItem"));
|
|
340
335
|
}
|
|
341
|
-
async function
|
|
336
|
+
async function j() {
|
|
342
337
|
var l, $, u;
|
|
343
338
|
if (t = await x(t), typeof ((l = t.componentProps) == null ? void 0 : l.defaultValue) < "u") {
|
|
344
|
-
const _ = g.isDesignMode.value ? ($ = t.componentProps) == null ? void 0 : $.defaultValue :
|
|
345
|
-
|
|
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(_));
|
|
346
341
|
}
|
|
347
342
|
if (t.type === "slot") {
|
|
348
343
|
const _ = t.slotName;
|
|
@@ -351,7 +346,7 @@ const je = /* @__PURE__ */ le({
|
|
|
351
346
|
setup() {
|
|
352
347
|
return () => K(w, _, {
|
|
353
348
|
componentSchema: t,
|
|
354
|
-
model:
|
|
349
|
+
model: i
|
|
355
350
|
});
|
|
356
351
|
}
|
|
357
352
|
});
|
|
@@ -370,16 +365,16 @@ const je = /* @__PURE__ */ le({
|
|
|
370
365
|
}
|
|
371
366
|
function f(o) {
|
|
372
367
|
Object.prototype.toString.call(o), Object.prototype.toString.call(o) === "[object Array]" ? o.forEach((l) => {
|
|
373
|
-
|
|
374
|
-
}) :
|
|
368
|
+
i[l.value] = l.label;
|
|
369
|
+
}) : i[o.value] = o.label, r.id ? k.emit("updateformData" + r.id, i) : k.emit("updateformData", i);
|
|
375
370
|
}
|
|
376
|
-
function
|
|
377
|
-
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);
|
|
378
373
|
}
|
|
379
|
-
function
|
|
374
|
+
function F(o) {
|
|
380
375
|
y("update:dynamicId", o);
|
|
381
376
|
}
|
|
382
|
-
let
|
|
377
|
+
let V = null;
|
|
383
378
|
return B(
|
|
384
379
|
() => t,
|
|
385
380
|
async (o) => {
|
|
@@ -391,9 +386,9 @@ const je = /* @__PURE__ */ le({
|
|
|
391
386
|
options: null
|
|
392
387
|
}
|
|
393
388
|
});
|
|
394
|
-
if (l ===
|
|
389
|
+
if (l === V)
|
|
395
390
|
return !1;
|
|
396
|
-
|
|
391
|
+
V = l, j();
|
|
397
392
|
},
|
|
398
393
|
{
|
|
399
394
|
immediate: !0,
|
|
@@ -413,13 +408,13 @@ const je = /* @__PURE__ */ le({
|
|
|
413
408
|
ref_key: "componentInstance",
|
|
414
409
|
ref: E,
|
|
415
410
|
onVnodeMounted: A,
|
|
416
|
-
model: R(
|
|
411
|
+
model: R(i)
|
|
417
412
|
}, { ...U.value }, {
|
|
418
413
|
[U.value.bindModel]: c.value,
|
|
419
414
|
["onUpdate:" + U.value.bindModel]: l[0] || (l[0] = (_) => c.value = _),
|
|
420
|
-
[`onUpdate:${U.value.bindModel}` || ""]:
|
|
415
|
+
[`onUpdate:${U.value.bindModel}` || ""]: a,
|
|
421
416
|
"onUpdate:modelValueLabel": f,
|
|
422
|
-
"onUpdate:dynamicId":
|
|
417
|
+
"onUpdate:dynamicId": F
|
|
423
418
|
}), {
|
|
424
419
|
node: T((_) => [
|
|
425
420
|
Q($, be({
|
|
@@ -459,12 +454,12 @@ function tt() {
|
|
|
459
454
|
if (!S) throw new Error(`表单 [name=${d}] 不存在`);
|
|
460
455
|
return S;
|
|
461
456
|
}
|
|
462
|
-
async function
|
|
457
|
+
async function i(d, S) {
|
|
463
458
|
const y = await c(d);
|
|
464
459
|
return G(await S(y));
|
|
465
460
|
}
|
|
466
461
|
async function w(d = "default") {
|
|
467
|
-
return await
|
|
462
|
+
return await i(d, (S) => S.getData());
|
|
468
463
|
}
|
|
469
464
|
function g(d, S = "default", y = void 0) {
|
|
470
465
|
var E, P;
|
|
@@ -478,9 +473,9 @@ function tt() {
|
|
|
478
473
|
var L;
|
|
479
474
|
let U = p((L = y == null ? void 0 : y.schemas[0]) == null ? void 0 : L.children);
|
|
480
475
|
return Object.keys(m).forEach((A) => {
|
|
481
|
-
var f,
|
|
482
|
-
const v = U.find((u) => u.field === A),
|
|
483
|
-
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")
|
|
484
479
|
m[A] = (o = m[A]) == null ? void 0 : o.split(",");
|
|
485
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")
|
|
486
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(","));
|
|
@@ -505,9 +500,9 @@ function tt() {
|
|
|
505
500
|
}
|
|
506
501
|
}
|
|
507
502
|
async function h(d = "default") {
|
|
508
|
-
return await
|
|
503
|
+
return await i(d, async (S) => (await S.validate(), await S.getData()));
|
|
509
504
|
}
|
|
510
|
-
async function
|
|
505
|
+
async function N(d) {
|
|
511
506
|
await r();
|
|
512
507
|
const S = {};
|
|
513
508
|
for (const y in s.value) {
|
|
@@ -517,14 +512,14 @@ function tt() {
|
|
|
517
512
|
return S;
|
|
518
513
|
}
|
|
519
514
|
async function O() {
|
|
520
|
-
return await
|
|
515
|
+
return await N((d) => d.getData());
|
|
521
516
|
}
|
|
522
517
|
function t(d) {
|
|
523
518
|
for (const S in d)
|
|
524
519
|
g(d[S], S);
|
|
525
520
|
}
|
|
526
521
|
async function x() {
|
|
527
|
-
return await
|
|
522
|
+
return await N(async (d) => (await d.validate(), await d.getData()));
|
|
528
523
|
}
|
|
529
524
|
return {
|
|
530
525
|
ready: e,
|
|
@@ -553,13 +548,13 @@ const nt = {
|
|
|
553
548
|
},
|
|
554
549
|
emits: ["change", "ready"],
|
|
555
550
|
setup(e, { expose: n, emit: s }) {
|
|
556
|
-
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({
|
|
557
552
|
schemas: []
|
|
558
553
|
});
|
|
559
554
|
B(
|
|
560
555
|
() => P.pageSchema,
|
|
561
556
|
(f) => {
|
|
562
|
-
|
|
557
|
+
ae(p, f);
|
|
563
558
|
},
|
|
564
559
|
{
|
|
565
560
|
immediate: !0,
|
|
@@ -569,8 +564,8 @@ const nt = {
|
|
|
569
564
|
() => P.formData,
|
|
570
565
|
(f) => {
|
|
571
566
|
if (f) {
|
|
572
|
-
let
|
|
573
|
-
w.value =
|
|
567
|
+
let a = L(f);
|
|
568
|
+
w.value = a, t(a), c("change", a);
|
|
574
569
|
}
|
|
575
570
|
},
|
|
576
571
|
{
|
|
@@ -579,78 +574,83 @@ const nt = {
|
|
|
579
574
|
}
|
|
580
575
|
);
|
|
581
576
|
function D(f) {
|
|
582
|
-
let
|
|
583
|
-
return f.forEach((
|
|
584
|
-
|
|
585
|
-
}),
|
|
577
|
+
let a = [];
|
|
578
|
+
return f.forEach((F) => {
|
|
579
|
+
F.children && (a = [...a, ...D(F.children)]), a.push(F);
|
|
580
|
+
}), a;
|
|
586
581
|
}
|
|
587
|
-
function I(f,
|
|
588
|
-
function
|
|
582
|
+
function I(f, a) {
|
|
583
|
+
function F(o) {
|
|
589
584
|
return JSON.parse(JSON.stringify(o));
|
|
590
585
|
}
|
|
591
|
-
function
|
|
586
|
+
function V(o, l) {
|
|
592
587
|
if (o.type === "card" && o.multiple && o.field && Array.isArray(l[o.field]))
|
|
593
588
|
return l[o.field].map((u) => {
|
|
594
589
|
var z;
|
|
595
|
-
const _ =
|
|
596
|
-
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(), _;
|
|
597
592
|
});
|
|
598
|
-
const $ =
|
|
599
|
-
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()), $;
|
|
600
595
|
}
|
|
601
|
-
return f.map((o) =>
|
|
596
|
+
return f.map((o) => V(o, a)).flat();
|
|
602
597
|
}
|
|
603
|
-
function M(f,
|
|
604
|
-
const
|
|
605
|
-
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) => {
|
|
606
601
|
o.field && (o.oldField = JSON.parse(JSON.stringify(o.field)));
|
|
607
602
|
const l = { ...o };
|
|
608
603
|
if (o.type === "card") {
|
|
609
604
|
const $ = o.field || "";
|
|
610
|
-
o.multiple ? (l.field =
|
|
611
|
-
const u = l.field ||
|
|
612
|
-
|
|
613
|
-
} else o.field &&
|
|
614
|
-
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;
|
|
615
610
|
});
|
|
616
611
|
}
|
|
617
|
-
function m(f,
|
|
618
|
-
const o =
|
|
619
|
-
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) => {
|
|
620
615
|
const $ = l.field || "";
|
|
621
|
-
let u =
|
|
622
|
-
l.type === "card" && l.multiple ? (typeof
|
|
623
|
-
|
|
624
|
-
}) :
|
|
625
|
-
|
|
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;
|
|
626
626
|
}
|
|
627
|
-
function U(f,
|
|
628
|
-
let
|
|
627
|
+
function U(f, a, F) {
|
|
628
|
+
let V = m(G(f), G(a));
|
|
629
629
|
return {
|
|
630
630
|
obj: M(f),
|
|
631
|
-
dataObj:
|
|
631
|
+
dataObj: V
|
|
632
632
|
};
|
|
633
633
|
}
|
|
634
634
|
function L(f) {
|
|
635
|
-
let
|
|
636
|
-
|
|
637
|
-
const
|
|
638
|
-
let { obj:
|
|
639
|
-
return f = o,
|
|
640
|
-
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;
|
|
641
641
|
if (l.indexOf("@") < 0) {
|
|
642
|
-
const b =
|
|
642
|
+
const b = a.find((q) => q.field === l), Pe = ["datetimerange", "daterange", "monthrange", "dates"];
|
|
643
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")
|
|
644
|
-
f[l] = (
|
|
644
|
+
f[l] = (oe = f[l]) == null ? void 0 : oe.split(",");
|
|
645
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")
|
|
646
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(",");
|
|
647
647
|
else if (((b == null ? void 0 : b.type) === "upload-image" || (b == null ? void 0 : b.type) === "upload-file") && typeof f[l] == "string") {
|
|
648
648
|
let q = [];
|
|
649
|
-
Object.entries(f).forEach(([
|
|
650
|
-
f[l] === ye &&
|
|
651
|
-
}), f[l] = f[l].split(",").map((
|
|
652
|
-
url:
|
|
653
|
-
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
|
|
654
654
|
}));
|
|
655
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);
|
|
656
656
|
}
|
|
@@ -664,18 +664,18 @@ const nt = {
|
|
|
664
664
|
{
|
|
665
665
|
immediate: !0
|
|
666
666
|
}
|
|
667
|
-
), Z("slots", Le()), Z("pageManager", h), Z("forms",
|
|
667
|
+
), Z("slots", Le()), Z("pageManager", h), Z("forms", N), Z("pageSchema", p), Z(
|
|
668
668
|
"disabled",
|
|
669
669
|
W(() => P.disabled)
|
|
670
670
|
);
|
|
671
671
|
const A = ue(), v = A == null ? void 0 : A.proxy;
|
|
672
|
-
function
|
|
672
|
+
function j() {
|
|
673
673
|
ce(() => {
|
|
674
674
|
g.value = !0, c("ready", h), v && h.addComponentInstance("builder", v);
|
|
675
675
|
});
|
|
676
676
|
}
|
|
677
|
-
return
|
|
678
|
-
|
|
677
|
+
return k.on("updateformData" + (P.id ? P.id : ""), (f) => {
|
|
678
|
+
c("change", f);
|
|
679
679
|
}), n({
|
|
680
680
|
ready: g,
|
|
681
681
|
pageManager: h,
|
|
@@ -686,17 +686,17 @@ const nt = {
|
|
|
686
686
|
setForms: S,
|
|
687
687
|
validateAll: y,
|
|
688
688
|
getFormInstance: E
|
|
689
|
-
}), (f,
|
|
689
|
+
}), (f, a) => R(J).initialized.value ? (H(), Y(Fe, {
|
|
690
690
|
key: 1,
|
|
691
|
-
onResolve:
|
|
691
|
+
onResolve: j
|
|
692
692
|
}, {
|
|
693
693
|
default: T(() => [
|
|
694
694
|
X("div", ot, [
|
|
695
|
-
(H(!0), Ee(Je, null, ze(p.schemas, (
|
|
695
|
+
(H(!0), Ee(Je, null, ze(p.schemas, (F, V) => (H(), Y(R(et), {
|
|
696
696
|
id: P.id,
|
|
697
|
-
key:
|
|
697
|
+
key: V,
|
|
698
698
|
sourceDateUrl: P.sourceDateUrl,
|
|
699
|
-
componentSchema:
|
|
699
|
+
componentSchema: F
|
|
700
700
|
}, null, 8, ["id", "sourceDateUrl", "componentSchema"]))), 128))
|
|
701
701
|
])
|
|
702
702
|
]),
|
|
@@ -717,14 +717,14 @@ function lt(e) {
|
|
|
717
717
|
const c = () => {
|
|
718
718
|
n -= 1, r && n <= 0 && (r.stop(), s = void 0, r = void 0);
|
|
719
719
|
};
|
|
720
|
-
return (...
|
|
720
|
+
return (...i) => (n += 1, r || (r = He(!0), s = r.run(() => e(...i))), xe(c), s);
|
|
721
721
|
}
|
|
722
|
-
function
|
|
722
|
+
function ie(e) {
|
|
723
723
|
return typeof e == "function" ? e() : R(e);
|
|
724
724
|
}
|
|
725
|
-
const
|
|
725
|
+
const at = typeof window < "u" && typeof document < "u";
|
|
726
726
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
727
|
-
const
|
|
727
|
+
const it = (e) => typeof e < "u", ct = Object.prototype.toString, ut = (e) => ct.call(e) === "[object Object]", dt = () => {
|
|
728
728
|
};
|
|
729
729
|
function ft(e) {
|
|
730
730
|
return ue();
|
|
@@ -736,25 +736,25 @@ function mt(e = !1, n = {}) {
|
|
|
736
736
|
const {
|
|
737
737
|
truthyValue: s = !0,
|
|
738
738
|
falsyValue: r = !1
|
|
739
|
-
} = n, c = Ke(e),
|
|
739
|
+
} = n, c = Ke(e), i = C(e);
|
|
740
740
|
function w(g) {
|
|
741
741
|
if (arguments.length)
|
|
742
|
-
return
|
|
742
|
+
return i.value = g, i.value;
|
|
743
743
|
{
|
|
744
|
-
const h =
|
|
745
|
-
return
|
|
744
|
+
const h = ie(s);
|
|
745
|
+
return i.value = i.value === h ? ie(r) : h, i.value;
|
|
746
746
|
}
|
|
747
747
|
}
|
|
748
|
-
return c ? w : [
|
|
748
|
+
return c ? w : [i, w];
|
|
749
749
|
}
|
|
750
750
|
function Jt(e, n, s) {
|
|
751
751
|
const r = B(e, (...c) => (ce(() => r()), n(...c)), s);
|
|
752
752
|
return r;
|
|
753
753
|
}
|
|
754
|
-
const ve =
|
|
755
|
-
function
|
|
754
|
+
const ve = at ? window : void 0;
|
|
755
|
+
function ne(e) {
|
|
756
756
|
var n;
|
|
757
|
-
const s =
|
|
757
|
+
const s = ie(e);
|
|
758
758
|
return (n = s == null ? void 0 : s.$el) != null ? n : s;
|
|
759
759
|
}
|
|
760
760
|
function ht(...e) {
|
|
@@ -762,23 +762,23 @@ function ht(...e) {
|
|
|
762
762
|
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([s, r, c] = e, n = ve) : [n, s, r, c] = e, !n)
|
|
763
763
|
return dt;
|
|
764
764
|
Array.isArray(s) || (s = [s]), Array.isArray(r) || (r = [r]);
|
|
765
|
-
const
|
|
766
|
-
|
|
765
|
+
const i = [], w = () => {
|
|
766
|
+
i.forEach((O) => O()), i.length = 0;
|
|
767
767
|
}, g = (O, t, x, d) => (O.addEventListener(t, x, d), () => O.removeEventListener(t, x, d)), h = B(
|
|
768
|
-
() => [
|
|
768
|
+
() => [ne(n), ie(c)],
|
|
769
769
|
([O, t]) => {
|
|
770
770
|
if (w(), !O)
|
|
771
771
|
return;
|
|
772
772
|
const x = ut(t) ? { ...t } : t;
|
|
773
|
-
|
|
773
|
+
i.push(
|
|
774
774
|
...s.flatMap((d) => r.map((S) => g(O, d, S, x)))
|
|
775
775
|
);
|
|
776
776
|
},
|
|
777
777
|
{ immediate: !0, flush: "post" }
|
|
778
|
-
),
|
|
778
|
+
), N = () => {
|
|
779
779
|
h(), w();
|
|
780
780
|
};
|
|
781
|
-
return xe(
|
|
781
|
+
return xe(N), N;
|
|
782
782
|
}
|
|
783
783
|
function vt(e) {
|
|
784
784
|
return typeof e == "function" ? e : typeof e == "string" ? (n) => n.key === e : Array.isArray(e) ? (n) => e.includes(n.key) : () => !0;
|
|
@@ -788,12 +788,12 @@ function Me(...e) {
|
|
|
788
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]);
|
|
789
789
|
const {
|
|
790
790
|
target: c = ve,
|
|
791
|
-
eventName:
|
|
791
|
+
eventName: i = "keydown",
|
|
792
792
|
passive: w = !1,
|
|
793
793
|
dedupe: g = !1
|
|
794
794
|
} = r, h = vt(n);
|
|
795
|
-
return ht(c,
|
|
796
|
-
O.repeat &&
|
|
795
|
+
return ht(c, i, (O) => {
|
|
796
|
+
O.repeat && ie(g) || h(O) && s(O);
|
|
797
797
|
}, w);
|
|
798
798
|
}
|
|
799
799
|
function we(e, n, s = {}) {
|
|
@@ -817,24 +817,24 @@ function wt(e) {
|
|
|
817
817
|
}
|
|
818
818
|
function St(e, n, s = {}) {
|
|
819
819
|
const { window: r = ve, ...c } = s;
|
|
820
|
-
let
|
|
820
|
+
let i;
|
|
821
821
|
const w = yt(() => r && "ResizeObserver" in r), g = () => {
|
|
822
|
-
|
|
822
|
+
i && (i.disconnect(), i = void 0);
|
|
823
823
|
}, h = W(() => {
|
|
824
|
-
const t =
|
|
825
|
-
return Array.isArray(t) ? t.map((x) =>
|
|
826
|
-
}),
|
|
824
|
+
const t = ie(e);
|
|
825
|
+
return Array.isArray(t) ? t.map((x) => ne(x)) : [ne(t)];
|
|
826
|
+
}), N = B(
|
|
827
827
|
h,
|
|
828
828
|
(t) => {
|
|
829
829
|
if (g(), w.value && r) {
|
|
830
|
-
|
|
830
|
+
i = new ResizeObserver(n);
|
|
831
831
|
for (const x of t)
|
|
832
|
-
x &&
|
|
832
|
+
x && i.observe(x, c);
|
|
833
833
|
}
|
|
834
834
|
},
|
|
835
835
|
{ immediate: !0, flush: "post" }
|
|
836
836
|
), O = () => {
|
|
837
|
-
g(),
|
|
837
|
+
g(), N();
|
|
838
838
|
};
|
|
839
839
|
return xe(O), {
|
|
840
840
|
isSupported: w,
|
|
@@ -842,15 +842,15 @@ function St(e, n, s = {}) {
|
|
|
842
842
|
};
|
|
843
843
|
}
|
|
844
844
|
function zt(e, n = { width: 0, height: 0 }, s = {}) {
|
|
845
|
-
const { window: r = ve, box: c = "content-box" } = s,
|
|
845
|
+
const { window: r = ve, box: c = "content-box" } = s, i = W(() => {
|
|
846
846
|
var t, x;
|
|
847
|
-
return (x = (t =
|
|
847
|
+
return (x = (t = ne(e)) == null ? void 0 : t.namespaceURI) == null ? void 0 : x.includes("svg");
|
|
848
848
|
}), w = C(n.width), g = C(n.height), { stop: h } = St(
|
|
849
849
|
e,
|
|
850
850
|
([t]) => {
|
|
851
851
|
const x = c === "border-box" ? t.borderBoxSize : c === "content-box" ? t.contentBoxSize : t.devicePixelContentBoxSize;
|
|
852
|
-
if (r &&
|
|
853
|
-
const d =
|
|
852
|
+
if (r && i.value) {
|
|
853
|
+
const d = ne(e);
|
|
854
854
|
if (d) {
|
|
855
855
|
const S = d.getBoundingClientRect();
|
|
856
856
|
w.value = S.width, g.value = S.height;
|
|
@@ -864,17 +864,17 @@ function zt(e, n = { width: 0, height: 0 }, s = {}) {
|
|
|
864
864
|
s
|
|
865
865
|
);
|
|
866
866
|
pt(() => {
|
|
867
|
-
const t =
|
|
867
|
+
const t = ne(e);
|
|
868
868
|
t && (w.value = "offsetWidth" in t ? t.offsetWidth : n.width, g.value = "offsetHeight" in t ? t.offsetHeight : n.height);
|
|
869
869
|
});
|
|
870
|
-
const
|
|
871
|
-
() =>
|
|
870
|
+
const N = B(
|
|
871
|
+
() => ne(e),
|
|
872
872
|
(t) => {
|
|
873
873
|
w.value = t ? n.width : 0, g.value = t ? n.height : 0;
|
|
874
874
|
}
|
|
875
875
|
);
|
|
876
876
|
function O() {
|
|
877
|
-
h(),
|
|
877
|
+
h(), N();
|
|
878
878
|
}
|
|
879
879
|
return {
|
|
880
880
|
width: w,
|
|
@@ -883,18 +883,18 @@ function zt(e, n = { width: 0, height: 0 }, s = {}) {
|
|
|
883
883
|
};
|
|
884
884
|
}
|
|
885
885
|
function Ht(e, n, s, r = {}) {
|
|
886
|
-
var c,
|
|
886
|
+
var c, i, w;
|
|
887
887
|
const {
|
|
888
888
|
clone: g = !1,
|
|
889
889
|
passive: h = !1,
|
|
890
|
-
eventName:
|
|
890
|
+
eventName: N,
|
|
891
891
|
deep: O = !1,
|
|
892
892
|
defaultValue: t,
|
|
893
893
|
shouldEmit: x
|
|
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 = (
|
|
895
|
-
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;
|
|
896
896
|
n || (n = "modelValue"), y = y || `update:${n.toString()}`;
|
|
897
|
-
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) => {
|
|
898
898
|
x ? x(D) && S(y, D) : S(y, D);
|
|
899
899
|
};
|
|
900
900
|
if (h) {
|
|
@@ -950,8 +950,8 @@ function Et(e) {
|
|
|
950
950
|
var n = document.querySelector("html"), s = new MutationObserver(function(r) {
|
|
951
951
|
for (var c of r)
|
|
952
952
|
if (c.type === "attributes" && c.attributeName === "class") {
|
|
953
|
-
const
|
|
954
|
-
new Array(...
|
|
953
|
+
const i = c.target;
|
|
954
|
+
new Array(...i.classList).includes("dark") ? e.value = !0 : e.value = !1;
|
|
955
955
|
}
|
|
956
956
|
});
|
|
957
957
|
s.observe(n, {
|
|
@@ -962,12 +962,12 @@ function Et(e) {
|
|
|
962
962
|
});
|
|
963
963
|
}
|
|
964
964
|
function At() {
|
|
965
|
-
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();
|
|
966
966
|
return {
|
|
967
967
|
canvasScale: e,
|
|
968
968
|
pressSpace: r,
|
|
969
969
|
pressShift: c,
|
|
970
|
-
pressCtrl:
|
|
970
|
+
pressCtrl: i,
|
|
971
971
|
disabledZoom: n,
|
|
972
972
|
isDark: s
|
|
973
973
|
};
|
|
@@ -993,34 +993,34 @@ function Zt(e) {
|
|
|
993
993
|
const { pressSpace: n } = ge(), s = new Image(1, 1);
|
|
994
994
|
s.src = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==";
|
|
995
995
|
let r = 0, c = 0;
|
|
996
|
-
function
|
|
997
|
-
var
|
|
998
|
-
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));
|
|
999
999
|
}
|
|
1000
1000
|
function w(h) {
|
|
1001
1001
|
if (h.preventDefault(), !h.x || !h.y || !n.value)
|
|
1002
1002
|
return;
|
|
1003
|
-
const
|
|
1004
|
-
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);
|
|
1005
1005
|
}
|
|
1006
1006
|
function g() {
|
|
1007
1007
|
n.value = !1;
|
|
1008
1008
|
}
|
|
1009
|
-
return { handleElementDragStart:
|
|
1009
|
+
return { handleElementDragStart: i, handleElementDrag: w, handleElementDragEnd: g };
|
|
1010
1010
|
}
|
|
1011
1011
|
function Wt(e) {
|
|
1012
1012
|
const { pressCtrl: n, canvasScale: s, disabledZoom: r } = ge();
|
|
1013
|
-
function c(
|
|
1013
|
+
function c(i) {
|
|
1014
1014
|
if (!n.value || r.value)
|
|
1015
1015
|
return;
|
|
1016
|
-
|
|
1016
|
+
i.preventDefault();
|
|
1017
1017
|
let w = 0;
|
|
1018
|
-
|
|
1018
|
+
i.deltaY < 0 ? w = s.value + 0.05 : w = s.value - 0.05, !(w > 150 || w < 0.5) && (s.value = w);
|
|
1019
1019
|
}
|
|
1020
1020
|
return B(
|
|
1021
1021
|
() => s.value,
|
|
1022
|
-
(
|
|
1023
|
-
e.value && !r.value && (e.value.style.transform = `scale(${
|
|
1022
|
+
(i) => {
|
|
1023
|
+
e.value && !r.value && (e.value.style.transform = `scale(${i})`);
|
|
1024
1024
|
}
|
|
1025
1025
|
), { handleZoom: c, canvasScale: s };
|
|
1026
1026
|
}
|
|
@@ -1040,19 +1040,19 @@ function Gt(e, n = 16.66) {
|
|
|
1040
1040
|
const xt = { class: "min-w-750px rounded" }, It = { class: "h-full rounded" }, _t = /* @__PURE__ */ le({
|
|
1041
1041
|
__name: "index",
|
|
1042
1042
|
setup(e, { expose: n }) {
|
|
1043
|
-
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("");
|
|
1044
1044
|
function t() {
|
|
1045
1045
|
w.value = !1;
|
|
1046
1046
|
}
|
|
1047
1047
|
function x() {
|
|
1048
|
-
|
|
1048
|
+
i.value = !1;
|
|
1049
1049
|
}
|
|
1050
1050
|
function d() {
|
|
1051
|
-
|
|
1051
|
+
i.value = !0, O.value = qe();
|
|
1052
1052
|
}
|
|
1053
1053
|
async function S() {
|
|
1054
1054
|
try {
|
|
1055
|
-
let y = await
|
|
1055
|
+
let y = await N.value.validateAll();
|
|
1056
1056
|
if (!Object.keys(y).length) {
|
|
1057
1057
|
alert("请添加表单组件后再尝试!");
|
|
1058
1058
|
return;
|
|
@@ -1068,8 +1068,8 @@ const xt = { class: "min-w-750px rounded" }, It = { class: "h-full rounded" }, _
|
|
|
1068
1068
|
return n({
|
|
1069
1069
|
handleOpen: d
|
|
1070
1070
|
}), (y, E) => (H(), Y(R(r), {
|
|
1071
|
-
modelValue:
|
|
1072
|
-
"onUpdate:modelValue": E[1] || (E[1] = (P) =>
|
|
1071
|
+
modelValue: i.value,
|
|
1072
|
+
"onUpdate:modelValue": E[1] || (E[1] = (P) => i.value = P),
|
|
1073
1073
|
title: "预览",
|
|
1074
1074
|
class: "w-900px",
|
|
1075
1075
|
width: "900px",
|
|
@@ -1082,7 +1082,7 @@ const xt = { class: "min-w-750px rounded" }, It = { class: "h-full rounded" }, _
|
|
|
1082
1082
|
(H(), Y(R(rt), {
|
|
1083
1083
|
key: O.value,
|
|
1084
1084
|
ref_key: "kb",
|
|
1085
|
-
ref:
|
|
1085
|
+
ref: N,
|
|
1086
1086
|
"page-schema": R(h)
|
|
1087
1087
|
}, null, 8, ["page-schema"])),
|
|
1088
1088
|
Q(R(r), {
|
|
@@ -1139,7 +1139,7 @@ const xt = { class: "min-w-750px rounded" }, It = { class: "h-full rounded" }, _
|
|
|
1139
1139
|
"updateSourceData"
|
|
1140
1140
|
],
|
|
1141
1141
|
setup(e, { expose: n, emit: s }) {
|
|
1142
|
-
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;
|
|
1143
1143
|
let x = {
|
|
1144
1144
|
schemas: [
|
|
1145
1145
|
{
|
|
@@ -1192,7 +1192,7 @@ defineExpose({
|
|
|
1192
1192
|
return;
|
|
1193
1193
|
}
|
|
1194
1194
|
t.source && J.setSourceData(t.source), t.formMode && (x.schemas = J.formSchemas);
|
|
1195
|
-
}),
|
|
1195
|
+
}), N.setDesignMode(), N.setDefaultComponentIds(x.schemas);
|
|
1196
1196
|
const d = s, S = C(null), y = re({
|
|
1197
1197
|
checkedNode: null,
|
|
1198
1198
|
hoverNode: null,
|
|
@@ -1205,61 +1205,61 @@ defineExpose({
|
|
|
1205
1205
|
he(() => {
|
|
1206
1206
|
P.value = t.disabledZoom;
|
|
1207
1207
|
}), he(() => {
|
|
1208
|
-
const
|
|
1209
|
-
|
|
1210
|
-
}), 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(
|
|
1211
1211
|
"designerProps",
|
|
1212
1212
|
W(() => t)
|
|
1213
1213
|
), Z("designer", {
|
|
1214
1214
|
setCheckedNode: D,
|
|
1215
1215
|
setHoverNode: I,
|
|
1216
1216
|
setDisableHover: m,
|
|
1217
|
-
handleToggleDeviceMode:
|
|
1217
|
+
handleToggleDeviceMode: j,
|
|
1218
1218
|
reset: A,
|
|
1219
1219
|
state: y
|
|
1220
|
-
}),
|
|
1221
|
-
d("saveSourceData",
|
|
1222
|
-
}),
|
|
1223
|
-
d("deleteSourceData",
|
|
1224
|
-
}),
|
|
1225
|
-
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);
|
|
1226
1226
|
});
|
|
1227
1227
|
function p() {
|
|
1228
1228
|
E.schemas = G(x.schemas), D(E.schemas[0]), O.push(E.schemas, "初始化撤销功能");
|
|
1229
1229
|
}
|
|
1230
|
-
async function D(
|
|
1231
|
-
y.checkedNode =
|
|
1230
|
+
async function D(a = E.schemas[0]) {
|
|
1231
|
+
y.checkedNode = a, y.matched = Xe(E.schemas, a.id);
|
|
1232
1232
|
}
|
|
1233
|
-
async function I(
|
|
1234
|
-
var
|
|
1235
|
-
if (!
|
|
1233
|
+
async function I(a = null) {
|
|
1234
|
+
var F;
|
|
1235
|
+
if (!a || y.disableHover)
|
|
1236
1236
|
return y.hoverNode = null, !1;
|
|
1237
|
-
if ((
|
|
1237
|
+
if ((a == null ? void 0 : a.id) === ((F = y.hoverNode) == null ? void 0 : F.id))
|
|
1238
1238
|
return !1;
|
|
1239
|
-
y.hoverNode =
|
|
1239
|
+
y.hoverNode = a;
|
|
1240
1240
|
}
|
|
1241
1241
|
function M() {
|
|
1242
1242
|
ce(() => {
|
|
1243
|
-
d("ready", { pageManager:
|
|
1243
|
+
d("ready", { pageManager: N });
|
|
1244
1244
|
});
|
|
1245
1245
|
}
|
|
1246
|
-
async function m(
|
|
1247
|
-
y.disableHover =
|
|
1246
|
+
async function m(a = !1) {
|
|
1247
|
+
y.disableHover = a;
|
|
1248
1248
|
}
|
|
1249
|
-
function U(
|
|
1250
|
-
|
|
1249
|
+
function U(a) {
|
|
1250
|
+
ae(E, G(a));
|
|
1251
1251
|
}
|
|
1252
1252
|
function L() {
|
|
1253
1253
|
return Ie(E);
|
|
1254
1254
|
}
|
|
1255
1255
|
function A() {
|
|
1256
|
-
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));
|
|
1257
1257
|
}
|
|
1258
1258
|
function v() {
|
|
1259
1259
|
d("save", Ie(E));
|
|
1260
1260
|
}
|
|
1261
|
-
function
|
|
1262
|
-
d("toggleDeviceMode",
|
|
1261
|
+
function j(a) {
|
|
1262
|
+
d("toggleDeviceMode", a);
|
|
1263
1263
|
}
|
|
1264
1264
|
function f() {
|
|
1265
1265
|
S.value.handleOpen();
|
|
@@ -1270,45 +1270,45 @@ defineExpose({
|
|
|
1270
1270
|
getData: L,
|
|
1271
1271
|
reset: A,
|
|
1272
1272
|
preview: f
|
|
1273
|
-
}), (
|
|
1273
|
+
}), (a, F) => R(J).initialized.value ? (H(), Y(Fe, {
|
|
1274
1274
|
key: 1,
|
|
1275
1275
|
onResolve: M
|
|
1276
1276
|
}, {
|
|
1277
1277
|
default: T(() => [
|
|
1278
1278
|
X("div", Nt, [
|
|
1279
1279
|
X("div", Ft, [
|
|
1280
|
-
K(
|
|
1280
|
+
K(a.$slots, "header", {}, () => [
|
|
1281
1281
|
t.hiddenHeader ? Ne("", !0) : (H(), Y(R(c), {
|
|
1282
1282
|
key: 0,
|
|
1283
1283
|
onPreview: f,
|
|
1284
1284
|
onSave: v
|
|
1285
1285
|
}, {
|
|
1286
1286
|
header: T(() => [
|
|
1287
|
-
K(
|
|
1287
|
+
K(a.$slots, "header-prefix")
|
|
1288
1288
|
]),
|
|
1289
1289
|
prefix: T(() => [
|
|
1290
|
-
K(
|
|
1290
|
+
K(a.$slots, "header-prefix")
|
|
1291
1291
|
]),
|
|
1292
1292
|
title: T(() => [
|
|
1293
|
-
K(
|
|
1293
|
+
K(a.$slots, "header-title")
|
|
1294
1294
|
]),
|
|
1295
1295
|
"right-prefix": T(() => [
|
|
1296
|
-
K(
|
|
1296
|
+
K(a.$slots, "header-right-prefix")
|
|
1297
1297
|
]),
|
|
1298
1298
|
"right-action": T(() => [
|
|
1299
|
-
K(
|
|
1299
|
+
K(a.$slots, "header-right-action")
|
|
1300
1300
|
]),
|
|
1301
1301
|
"right-suffix": T(() => [
|
|
1302
|
-
K(
|
|
1302
|
+
K(a.$slots, "header-right-suffix")
|
|
1303
1303
|
]),
|
|
1304
1304
|
_: 3
|
|
1305
1305
|
}))
|
|
1306
1306
|
])
|
|
1307
1307
|
]),
|
|
1308
1308
|
X("div", {
|
|
1309
|
-
class: Ge(["epic-split-view-container", { "hidden-header":
|
|
1309
|
+
class: Ge(["epic-split-view-container", { "hidden-header": a.hiddenHeader }])
|
|
1310
1310
|
}, [
|
|
1311
|
-
Q(R(
|
|
1311
|
+
Q(R(i)),
|
|
1312
1312
|
Q(R(w)),
|
|
1313
1313
|
Q(R(g))
|
|
1314
1314
|
], 2),
|
|
@@ -1327,7 +1327,7 @@ defineExpose({
|
|
|
1327
1327
|
})) : (H(), Ee("div", $t));
|
|
1328
1328
|
}
|
|
1329
1329
|
}), Ct = {
|
|
1330
|
-
component: async () => await import("./index-
|
|
1330
|
+
component: async () => await import("./index-CAkpmC6c.js"),
|
|
1331
1331
|
defaultSchema: {
|
|
1332
1332
|
label: "代码编辑器",
|
|
1333
1333
|
type: "monacoEditor",
|
|
@@ -1377,7 +1377,7 @@ defineExpose({
|
|
|
1377
1377
|
}
|
|
1378
1378
|
}, { t: me } = Oe();
|
|
1379
1379
|
function Pt(e) {
|
|
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-
|
|
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({
|
|
1381
1381
|
id: "component_view",
|
|
1382
1382
|
title: me("component"),
|
|
1383
1383
|
icon: "icon--epic--extension-outline",
|
|
@@ -1390,11 +1390,11 @@ function Pt(e) {
|
|
|
1390
1390
|
}), e.registerRightSidebar({
|
|
1391
1391
|
id: "attribute_view",
|
|
1392
1392
|
title: me("attribute"),
|
|
1393
|
-
component: async () => await import("./attributeView-
|
|
1393
|
+
component: async () => await import("./attributeView-B__FQHVu.js")
|
|
1394
1394
|
}), e.registerRightSidebar({
|
|
1395
1395
|
id: "style_view",
|
|
1396
1396
|
title: me("style"),
|
|
1397
|
-
component: async () => await import("./styleView-
|
|
1397
|
+
component: async () => await import("./styleView-DwuC1nZJ.js")
|
|
1398
1398
|
}), e.registerRightSidebar({
|
|
1399
1399
|
id: "event_view",
|
|
1400
1400
|
title: "事件",
|