ss-component-new 1.1.128 → 1.1.132
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/array-B4DGq65v.js +2179 -0
- package/dist/array-DDHmcL8S.cjs +7 -0
- package/dist/cloneDeep-C82qXIWn.cjs +1 -0
- package/dist/{cloneDeep-BeJbt_NY.js → cloneDeep-DMKEzwyr.js} +66 -60
- package/dist/{index-DfBZbIAi.cjs → index-0Bbk1Ay9.cjs} +1 -1
- package/dist/{index-BaPi4aK6.cjs → index-4jP6cc1c.cjs} +1 -1
- package/dist/{index-Yw-mcPG7.cjs → index-AObYqnmb.cjs} +1 -1
- package/dist/{index-Bh_-F4Id.js → index-B8FfR8Z2.js} +6 -6
- package/dist/{index-DGYLBlfx.js → index-BEKnrHJW.js} +4 -4
- package/dist/{index-CBJjvZFS.cjs → index-BL0DKJul.cjs} +1 -1
- package/dist/{index-iraMzG6n.js → index-BTCrWMro.js} +58 -58
- package/dist/{index-DEyp7wh8.cjs → index-BY-bs7k4.cjs} +1 -1
- package/dist/{index-9rOuawyB.js → index-BcZIkNE5.js} +1 -1
- package/dist/{index-KsV16VF6.js → index-BczKzzfZ.js} +1 -1
- package/dist/{index-DGNI_CXr.cjs → index-C6bg0LwO.cjs} +1 -1
- package/dist/{index-BeOMaH_G.js → index-CCJfX_f_.js} +105 -105
- package/dist/{index-C4QvoiMP.js → index-CKkuGGCT.js} +7 -7
- package/dist/{index-CStK1opH.js → index-CMLNq3NH.js} +4 -4
- package/dist/{index-DQWu6fVL.js → index-CMbV6ORa.js} +1 -1
- package/dist/{index-DVsKlPlV.js → index-CPlabQMg.js} +4 -4
- package/dist/{index-C_rDmX9a.js → index-CUET-Yll.js} +6 -6
- package/dist/{index-DYQg2cA_.cjs → index-CloCAGs1.cjs} +1 -1
- package/dist/{index-C6I6HtWu.js → index-CuxuHFI8.js} +47 -47
- package/dist/{index-vv0Rtkkx.cjs → index-D53nFT93.cjs} +1 -1
- package/dist/{index-CKM-0Y0x.cjs → index-D80-gS4q.cjs} +1 -1
- package/dist/{index-DPe7ZcYp.cjs → index-DDkieM-F.cjs} +1 -1
- package/dist/{index-BgQE4ifB.cjs → index-DHg3iFd8.cjs} +1 -1
- package/dist/{index-B2yxYtLf.cjs → index-DMusjZZf.cjs} +1 -1
- package/dist/{index-CTx9ubYu.js → index-DgYmGICp.js} +6 -6
- package/dist/{index-CL6v5mgc.cjs → index-DiQ4q1BD.cjs} +1 -1
- package/dist/index-DpcPXeWN.cjs +1 -0
- package/dist/{index-BEpq21G9.js → index-E4X9tQ-Q.js} +1 -1
- package/dist/{index-B3kpuuIk.js → index-IfWbjRSD.js} +6 -6
- package/dist/{index-CGYd3pYq.js → index-KNMDTAtj.js} +1 -1
- package/dist/{index-CmuBsAdx.cjs → index-KVr4cYt2.cjs} +1 -1
- package/dist/{index-BXN1Mys0.js → index-NA3YGQZ0.js} +90 -90
- package/dist/{index-DJLykEcb.cjs → index-RZ7jxfFv.cjs} +1 -1
- package/dist/{index-C0OhLosu.js → index-mC2Ln1Te.js} +7 -7
- package/dist/{index-BkBamqRv.cjs → index-qejFMxWc.cjs} +1 -1
- package/dist/{index-CK2k-HLE.cjs → index-teA8C86s.cjs} +1 -1
- package/dist/index.vue_vue_type_style_index_0_scoped_baf99455_lang-B2z7YlNq.cjs +1 -0
- package/dist/index.vue_vue_type_style_index_0_scoped_baf99455_lang-DET0h2mg.js +374 -0
- package/dist/{index.vue_vue_type_style_index_0_scoped_bbb8ace9_lang-BVEZZVEw.cjs → index.vue_vue_type_style_index_0_scoped_bbb8ace9_lang-As-UotA9.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_bbb8ace9_lang-DUfGnQi_.js → index.vue_vue_type_style_index_0_scoped_bbb8ace9_lang-BYNSBnsv.js} +6 -6
- package/dist/{login-DrK3HTbS.js → login-BFf2aL4J.js} +2 -2
- package/dist/{login-hORqNi9k.cjs → login-cYWvHMOS.cjs} +1 -1
- package/dist/{main-CQ7b9epx.cjs → main-B2X4rasg.cjs} +1 -1
- package/dist/{main-D6zGutYb.js → main-GFmRcu29.js} +6 -6
- package/dist/{menu-BGO9QAfL.cjs → menu-CdaKonj8.cjs} +1 -1
- package/dist/{menu-wxq6YFz-.js → menu-D6D61V-w.js} +46 -46
- package/dist/{modelComp-P07wD2Ek.js → modelComp-BTnY8qyI.js} +1 -1
- package/dist/{modelComp-DhmH4toT.cjs → modelComp-tF0PKce3.cjs} +1 -1
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +1 -1
- package/dist/ss-component.js +6 -6
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +1 -1
- package/package.json +1 -1
- package/dist/array-3h5FEx7F.cjs +0 -7
- package/dist/array-BOENHuZm.js +0 -2013
- package/dist/cloneDeep-CoXmejBp.cjs +0 -1
- package/dist/index-nqKsDBRx.cjs +0 -1
- package/dist/index.vue_vue_type_style_index_0_scoped_baf99455_lang-CP80ZjoQ.cjs +0 -1
- package/dist/index.vue_vue_type_style_index_0_scoped_baf99455_lang-DkmN9lQw.js +0 -8
|
@@ -0,0 +1,2179 @@
|
|
|
1
|
+
import { u as pl, s as il } from "./index-CuxuHFI8.js";
|
|
2
|
+
import { ref as U, watch as Y, createElementBlock as q, openBlock as H, createVNode as G, resolveComponent as Ie, createElementVNode as w, toDisplayString as M, withCtx as K, createTextVNode as ae, Fragment as me, renderList as ve, createBlock as Ee, resolveDynamicComponent as De } from "vue";
|
|
3
|
+
import { p as $e } from "./index-BczKzzfZ.js";
|
|
4
|
+
import { s as Oe, f as fl, a as re, b as dl } from "./index-CMLNq3NH.js";
|
|
5
|
+
import { _ as he } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
6
|
+
import { U as Ne, g as Se, a as Pe, i as je, S as be, b as yl, c as u } from "./cloneDeep-DMKEzwyr.js";
|
|
7
|
+
import { _ as hl } from "./index.vue_vue_type_script_setup_true_lang-DQ2k4Z7D.js";
|
|
8
|
+
import { M as ml, S as Be, e as bl, i as Fe, a as Ue } from "./index-BTCrWMro.js";
|
|
9
|
+
import { s as qe, u as gl } from "./menu-D6D61V-w.js";
|
|
10
|
+
import "./index-CMbV6ORa.js";
|
|
11
|
+
import { u as kl } from "./modelComp-BTnY8qyI.js";
|
|
12
|
+
var Cl = "__lodash_hash_undefined__";
|
|
13
|
+
function Al(e) {
|
|
14
|
+
return this.__data__.set(e, Cl), this;
|
|
15
|
+
}
|
|
16
|
+
function $l(e) {
|
|
17
|
+
return this.__data__.has(e);
|
|
18
|
+
}
|
|
19
|
+
function ye(e) {
|
|
20
|
+
var t = -1, n = e == null ? 0 : e.length;
|
|
21
|
+
for (this.__data__ = new ml(); ++t < n; )
|
|
22
|
+
this.add(e[t]);
|
|
23
|
+
}
|
|
24
|
+
ye.prototype.add = ye.prototype.push = Al;
|
|
25
|
+
ye.prototype.has = $l;
|
|
26
|
+
function Ol(e, t) {
|
|
27
|
+
for (var n = -1, l = e == null ? 0 : e.length; ++n < l; )
|
|
28
|
+
if (t(e[n], n, e))
|
|
29
|
+
return !0;
|
|
30
|
+
return !1;
|
|
31
|
+
}
|
|
32
|
+
function _l(e, t) {
|
|
33
|
+
return e.has(t);
|
|
34
|
+
}
|
|
35
|
+
var xl = 1, Tl = 2;
|
|
36
|
+
function ze(e, t, n, l, s, a) {
|
|
37
|
+
var i = n & xl, h = e.length, k = t.length;
|
|
38
|
+
if (h != k && !(i && k > h))
|
|
39
|
+
return !1;
|
|
40
|
+
var g = a.get(e), C = a.get(t);
|
|
41
|
+
if (g && C)
|
|
42
|
+
return g == t && C == e;
|
|
43
|
+
var $ = -1, _ = !0, x = n & Tl ? new ye() : void 0;
|
|
44
|
+
for (a.set(e, t), a.set(t, e); ++$ < h; ) {
|
|
45
|
+
var d = e[$], P = t[$];
|
|
46
|
+
if (l)
|
|
47
|
+
var o = i ? l(P, d, $, t, e, a) : l(d, P, $, e, t, a);
|
|
48
|
+
if (o !== void 0) {
|
|
49
|
+
if (o)
|
|
50
|
+
continue;
|
|
51
|
+
_ = !1;
|
|
52
|
+
break;
|
|
53
|
+
}
|
|
54
|
+
if (x) {
|
|
55
|
+
if (!Ol(t, function(r, f) {
|
|
56
|
+
if (!_l(x, f) && (d === r || s(d, r, n, l, a)))
|
|
57
|
+
return x.push(f);
|
|
58
|
+
})) {
|
|
59
|
+
_ = !1;
|
|
60
|
+
break;
|
|
61
|
+
}
|
|
62
|
+
} else if (!(d === P || s(d, P, n, l, a))) {
|
|
63
|
+
_ = !1;
|
|
64
|
+
break;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
return a.delete(e), a.delete(t), _;
|
|
68
|
+
}
|
|
69
|
+
function vl(e) {
|
|
70
|
+
var t = -1, n = Array(e.size);
|
|
71
|
+
return e.forEach(function(l, s) {
|
|
72
|
+
n[++t] = [s, l];
|
|
73
|
+
}), n;
|
|
74
|
+
}
|
|
75
|
+
function El(e) {
|
|
76
|
+
var t = -1, n = Array(e.size);
|
|
77
|
+
return e.forEach(function(l) {
|
|
78
|
+
n[++t] = l;
|
|
79
|
+
}), n;
|
|
80
|
+
}
|
|
81
|
+
var Dl = 1, Nl = 2, Sl = "[object Boolean]", Pl = "[object Date]", jl = "[object Error]", Bl = "[object Map]", Fl = "[object Number]", Ul = "[object RegExp]", Jl = "[object Set]", Rl = "[object String]", Ll = "[object Symbol]", wl = "[object ArrayBuffer]", Gl = "[object DataView]", Je = Be ? Be.prototype : void 0, ge = Je ? Je.valueOf : void 0;
|
|
82
|
+
function Ml(e, t, n, l, s, a, i) {
|
|
83
|
+
switch (n) {
|
|
84
|
+
case Gl:
|
|
85
|
+
if (e.byteLength != t.byteLength || e.byteOffset != t.byteOffset)
|
|
86
|
+
return !1;
|
|
87
|
+
e = e.buffer, t = t.buffer;
|
|
88
|
+
case wl:
|
|
89
|
+
return !(e.byteLength != t.byteLength || !a(new Ne(e), new Ne(t)));
|
|
90
|
+
case Sl:
|
|
91
|
+
case Pl:
|
|
92
|
+
case Fl:
|
|
93
|
+
return bl(+e, +t);
|
|
94
|
+
case jl:
|
|
95
|
+
return e.name == t.name && e.message == t.message;
|
|
96
|
+
case Ul:
|
|
97
|
+
case Rl:
|
|
98
|
+
return e == t + "";
|
|
99
|
+
case Bl:
|
|
100
|
+
var h = vl;
|
|
101
|
+
case Jl:
|
|
102
|
+
var k = l & Dl;
|
|
103
|
+
if (h || (h = El), e.size != t.size && !k)
|
|
104
|
+
return !1;
|
|
105
|
+
var g = i.get(e);
|
|
106
|
+
if (g)
|
|
107
|
+
return g == t;
|
|
108
|
+
l |= Nl, i.set(e, t);
|
|
109
|
+
var C = ze(h(e), h(t), l, s, a, i);
|
|
110
|
+
return i.delete(e), C;
|
|
111
|
+
case Ll:
|
|
112
|
+
if (ge)
|
|
113
|
+
return ge.call(e) == ge.call(t);
|
|
114
|
+
}
|
|
115
|
+
return !1;
|
|
116
|
+
}
|
|
117
|
+
var Wl = 1, Hl = Object.prototype, Zl = Hl.hasOwnProperty;
|
|
118
|
+
function Il(e, t, n, l, s, a) {
|
|
119
|
+
var i = n & Wl, h = Se(e), k = h.length, g = Se(t), C = g.length;
|
|
120
|
+
if (k != C && !i)
|
|
121
|
+
return !1;
|
|
122
|
+
for (var $ = k; $--; ) {
|
|
123
|
+
var _ = h[$];
|
|
124
|
+
if (!(i ? _ in t : Zl.call(t, _)))
|
|
125
|
+
return !1;
|
|
126
|
+
}
|
|
127
|
+
var x = a.get(e), d = a.get(t);
|
|
128
|
+
if (x && d)
|
|
129
|
+
return x == t && d == e;
|
|
130
|
+
var P = !0;
|
|
131
|
+
a.set(e, t), a.set(t, e);
|
|
132
|
+
for (var o = i; ++$ < k; ) {
|
|
133
|
+
_ = h[$];
|
|
134
|
+
var r = e[_], f = t[_];
|
|
135
|
+
if (l)
|
|
136
|
+
var b = i ? l(f, r, _, t, e, a) : l(r, f, _, e, t, a);
|
|
137
|
+
if (!(b === void 0 ? r === f || s(r, f, n, l, a) : b)) {
|
|
138
|
+
P = !1;
|
|
139
|
+
break;
|
|
140
|
+
}
|
|
141
|
+
o || (o = _ == "constructor");
|
|
142
|
+
}
|
|
143
|
+
if (P && !o) {
|
|
144
|
+
var p = e.constructor, c = t.constructor;
|
|
145
|
+
p != c && "constructor" in e && "constructor" in t && !(typeof p == "function" && p instanceof p && typeof c == "function" && c instanceof c) && (P = !1);
|
|
146
|
+
}
|
|
147
|
+
return a.delete(e), a.delete(t), P;
|
|
148
|
+
}
|
|
149
|
+
var ql = 1, Re = "[object Arguments]", Le = "[object Array]", ce = "[object Object]", zl = Object.prototype, we = zl.hasOwnProperty;
|
|
150
|
+
function Ql(e, t, n, l, s, a) {
|
|
151
|
+
var i = Fe(e), h = Fe(t), k = i ? Le : Pe(e), g = h ? Le : Pe(t);
|
|
152
|
+
k = k == Re ? ce : k, g = g == Re ? ce : g;
|
|
153
|
+
var C = k == ce, $ = g == ce, _ = k == g;
|
|
154
|
+
if (_ && je(e)) {
|
|
155
|
+
if (!je(t))
|
|
156
|
+
return !1;
|
|
157
|
+
i = !0, C = !1;
|
|
158
|
+
}
|
|
159
|
+
if (_ && !C)
|
|
160
|
+
return a || (a = new be()), i || yl(e) ? ze(e, t, n, l, s, a) : Ml(e, t, k, n, l, s, a);
|
|
161
|
+
if (!(n & ql)) {
|
|
162
|
+
var x = C && we.call(e, "__wrapped__"), d = $ && we.call(t, "__wrapped__");
|
|
163
|
+
if (x || d) {
|
|
164
|
+
var P = x ? e.value() : e, o = d ? t.value() : t;
|
|
165
|
+
return a || (a = new be()), s(P, o, n, l, a);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
return _ ? (a || (a = new be()), Il(e, t, n, l, s, a)) : !1;
|
|
169
|
+
}
|
|
170
|
+
function Qe(e, t, n, l, s) {
|
|
171
|
+
return e === t ? !0 : e == null || t == null || !Ue(e) && !Ue(t) ? e !== e && t !== t : Ql(e, t, n, l, Qe, s);
|
|
172
|
+
}
|
|
173
|
+
function Xl(e, t) {
|
|
174
|
+
return Qe(e, t);
|
|
175
|
+
}
|
|
176
|
+
const ue = [
|
|
177
|
+
{
|
|
178
|
+
key: "单选",
|
|
179
|
+
value: "Select"
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
key: "日期",
|
|
183
|
+
value: "Date"
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
key: "长文本",
|
|
187
|
+
value: "TextArea"
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
key: "上传",
|
|
191
|
+
value: "Upload"
|
|
192
|
+
}
|
|
193
|
+
], Yl = { class: "form-content" }, Kl = {
|
|
194
|
+
__name: "index",
|
|
195
|
+
props: {
|
|
196
|
+
itemData: {
|
|
197
|
+
type: Array,
|
|
198
|
+
default: () => []
|
|
199
|
+
},
|
|
200
|
+
childItemData: {
|
|
201
|
+
type: Array,
|
|
202
|
+
default: () => []
|
|
203
|
+
},
|
|
204
|
+
index: Number
|
|
205
|
+
},
|
|
206
|
+
emits: ["change", "contentChange"],
|
|
207
|
+
setup(e, { emit: t }) {
|
|
208
|
+
const n = e, l = t, s = U([]), a = U(!1), i = U([]), h = pl($e), k = U(), g = ($) => {
|
|
209
|
+
var o, r, f, b;
|
|
210
|
+
const _ = (r = (o = u(n.itemData)) == null ? void 0 : o.find((p) => (p == null ? void 0 : p.key) === "formContent")) == null ? void 0 : r.contents, x = u($.content);
|
|
211
|
+
let d = {};
|
|
212
|
+
x && ((f = Object.values(x)) == null ? void 0 : f.length) > 0 && ((b = Object.values(x)) == null || b.forEach((p, c) => {
|
|
213
|
+
d[_[c].key] = p;
|
|
214
|
+
}));
|
|
215
|
+
const P = {
|
|
216
|
+
content: d,
|
|
217
|
+
index: n == null ? void 0 : n.index,
|
|
218
|
+
buttonName: $ == null ? void 0 : $.buttonName
|
|
219
|
+
};
|
|
220
|
+
l("change", P);
|
|
221
|
+
}, C = ($) => {
|
|
222
|
+
var d, P;
|
|
223
|
+
if (!$) return;
|
|
224
|
+
if (((d = Object.values(u($))) == null ? void 0 : d.length) > 0) {
|
|
225
|
+
const o = (P = Object.values(u($))) == null ? void 0 : P.map((f) => f);
|
|
226
|
+
let r = "";
|
|
227
|
+
o == null || o.forEach((f) => {
|
|
228
|
+
f !== "" && f !== void 0 && (r = r === "" ? f : r + "/" + f);
|
|
229
|
+
}), h.setSelectArray(o), h.setSelectString(r);
|
|
230
|
+
}
|
|
231
|
+
const _ = u(n.itemData), x = _ == null ? void 0 : _.map((o) => {
|
|
232
|
+
var r;
|
|
233
|
+
return (o == null ? void 0 : o.key) === "formContent" && ((r = o.contents) == null || r.map((f, b) => {
|
|
234
|
+
var p, c, y, O, E, N, A, D, v, T, j, B, S, m, F, L, Z, W, X;
|
|
235
|
+
return f.type = f != null && f.type ? f.type : (O = (y = (c = (p = f == null ? void 0 : f.key) == null ? void 0 : p.split("$")) == null ? void 0 : c[1]) == null ? void 0 : y.split("(")) != null && O[0] ? (E = ue == null ? void 0 : ue.find((z) => {
|
|
236
|
+
var te, V, I, oe;
|
|
237
|
+
return (z == null ? void 0 : z.key) === ((oe = (I = (V = (te = f == null ? void 0 : f.key) == null ? void 0 : te.split("$")) == null ? void 0 : V[1]) == null ? void 0 : I.split("(")) == null ? void 0 : oe[0]);
|
|
238
|
+
})) == null ? void 0 : E.value : "Input", f.options = f != null && f.options ? f.options : ((D = (A = (N = f == null ? void 0 : f.key) == null ? void 0 : N.split("$")) == null ? void 0 : A[1]) == null ? void 0 : D.length) > 0 ? (B = (j = fl((T = (v = f == null ? void 0 : f.key) == null ? void 0 : v.split("$")) == null ? void 0 : T[1])) == null ? void 0 : j.split(",")) == null ? void 0 : B.map((z) => ({
|
|
239
|
+
label: z,
|
|
240
|
+
value: z
|
|
241
|
+
})) : [], (S = f == null ? void 0 : f.key) != null && S.includes("$") && (f.key = (F = (m = f == null ? void 0 : f.key) == null ? void 0 : m.split("$")) == null ? void 0 : F[0]), f.value = f != null && f.value ? f.value : Array.isArray((L = Object.values($)) == null ? void 0 : L[b]) ? (W = (Z = Object.values($)) == null ? void 0 : Z[b]) == null ? void 0 : W[0] : (X = Object.values($)) == null ? void 0 : X[b], f;
|
|
242
|
+
})), o;
|
|
243
|
+
});
|
|
244
|
+
l("contentChange", {
|
|
245
|
+
contents: x,
|
|
246
|
+
index: n.index
|
|
247
|
+
});
|
|
248
|
+
};
|
|
249
|
+
return Y(
|
|
250
|
+
() => n.itemData,
|
|
251
|
+
() => {
|
|
252
|
+
var P, o, r, f, b, p, c, y, O, E;
|
|
253
|
+
const $ = (P = u(n.itemData)) == null ? void 0 : P.find((N) => (N == null ? void 0 : N.key) === "formContent"), _ = (o = u(n.itemData)) == null ? void 0 : o.find((N) => (N == null ? void 0 : N.key) === "formButton"), x = (r = u(n.itemData)) == null ? void 0 : r.find((N) => (N == null ? void 0 : N.key) === "formFlex"), d = (f = u(n.itemData)) == null ? void 0 : f.find((N) => (N == null ? void 0 : N.key) === "formWrap");
|
|
254
|
+
if ((d == null ? void 0 : d.contents) === "纵向" ? a.value = !1 : a.value = !0, k.value = typeof (x == null ? void 0 : x.contents) != "boolean" ? !(!(x != null && x.contents) === "" || ((b = x == null ? void 0 : x.contents) == null ? void 0 : b.toUpperCase()) === "VERTICAL") : x == null ? void 0 : x.contents, ((p = $ == null ? void 0 : $.contents) == null ? void 0 : p.length) > 0 && Array.isArray($ == null ? void 0 : $.contents)) {
|
|
255
|
+
const N = [];
|
|
256
|
+
(c = $ == null ? void 0 : $.contents) == null || c.forEach((v, T) => {
|
|
257
|
+
var j, B, S, m, F, L, Z, W, X, z;
|
|
258
|
+
if ((v == null ? void 0 : v.label) !== "") {
|
|
259
|
+
let te = (v == null ? void 0 : v.key) ?? "", V = (v == null ? void 0 : v.type) ?? "", I = (v == null ? void 0 : v.options) ?? [];
|
|
260
|
+
if ((j = v == null ? void 0 : v.key) != null && j.includes("$") && (te = (B = u(v == null ? void 0 : v.key).split("$")) == null ? void 0 : B[0], ((m = (S = u(v == null ? void 0 : v.key).split("$")) == null ? void 0 : S[1]) == null ? void 0 : m.length) > 0)) {
|
|
261
|
+
const [oe, ee] = (L = (F = u(v == null ? void 0 : v.key).split("$")) == null ? void 0 : F[1]) == null ? void 0 : L.split(/[()]/);
|
|
262
|
+
V = ((Z = ue.find((le) => (le == null ? void 0 : le.key) === oe)) == null ? void 0 : Z.value) ?? "", ((W = ee == null ? void 0 : ee.split(",")) == null ? void 0 : W.length) > 0 && (I = (X = ee == null ? void 0 : ee.split(",")) == null ? void 0 : X.map((le) => ({
|
|
263
|
+
label: le,
|
|
264
|
+
value: le
|
|
265
|
+
})));
|
|
266
|
+
}
|
|
267
|
+
N.push({
|
|
268
|
+
label: te ?? "",
|
|
269
|
+
name: "t" + T,
|
|
270
|
+
type: V === "" ? "Input" : V,
|
|
271
|
+
value: v != null && v.value ? v.value : (I == null ? void 0 : I.length) > 0 ? (z = I == null ? void 0 : I[0]) == null ? void 0 : z.value : (v == null ? void 0 : v.value) ?? "",
|
|
272
|
+
id: (v == null ? void 0 : v.id) ?? T,
|
|
273
|
+
contents: I ?? [],
|
|
274
|
+
width: (v == null ? void 0 : v.width) ?? 1
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
});
|
|
278
|
+
const A = (y = u(N)) == null ? void 0 : y.map((v) => v.value);
|
|
279
|
+
let D = "";
|
|
280
|
+
A == null || A.forEach((v) => {
|
|
281
|
+
v !== "" && v !== void 0 && (D = D === "" ? v : D + "/" + v);
|
|
282
|
+
}), h.setSelectArray(A), h.setSelectString(D), s.value = N;
|
|
283
|
+
} else
|
|
284
|
+
s.value = [];
|
|
285
|
+
if (((O = _ == null ? void 0 : _.contents) == null ? void 0 : O.length) > 0) {
|
|
286
|
+
const N = [];
|
|
287
|
+
(E = _ == null ? void 0 : _.contents) == null || E.forEach((A, D) => {
|
|
288
|
+
(A == null ? void 0 : A.label) !== "" && N.push({
|
|
289
|
+
label: (A == null ? void 0 : A.label) ?? "",
|
|
290
|
+
id: (A == null ? void 0 : A.id) ?? D,
|
|
291
|
+
type: (A == null ? void 0 : A.type) ?? "",
|
|
292
|
+
background: A == null ? void 0 : A.background
|
|
293
|
+
});
|
|
294
|
+
}), i.value = N;
|
|
295
|
+
} else
|
|
296
|
+
i.value = [];
|
|
297
|
+
},
|
|
298
|
+
{ deep: !0, immediate: !0 }
|
|
299
|
+
), ($, _) => (H(), q("div", Yl, [
|
|
300
|
+
G(Oe, {
|
|
301
|
+
rowContents: s.value,
|
|
302
|
+
buttonValue: i.value,
|
|
303
|
+
isRowFlex: k.value,
|
|
304
|
+
isEnableWrap: !1,
|
|
305
|
+
onOnButtonClick: g,
|
|
306
|
+
onChange: C,
|
|
307
|
+
isButtonRow: a.value
|
|
308
|
+
}, null, 8, ["rowContents", "buttonValue", "isRowFlex", "isButtonRow"])
|
|
309
|
+
]));
|
|
310
|
+
}
|
|
311
|
+
}, Vl = /* @__PURE__ */ he(Kl, [["__scopeId", "data-v-1b0ef247"]]), en = { class: "table-operate-content" }, ln = { class: "table-operate-item" }, nn = { class: "operate-title" }, tn = { class: "operate-content" }, sn = { class: "operate-title" }, an = { class: "operate-content" }, rn = { class: "operate-title" }, on = { class: "operate-content" }, cn = { class: "operate-content" }, un = {
|
|
312
|
+
__name: "operate",
|
|
313
|
+
props: {
|
|
314
|
+
itemContents: {
|
|
315
|
+
type: Array,
|
|
316
|
+
default: () => []
|
|
317
|
+
},
|
|
318
|
+
originalItemContents: {
|
|
319
|
+
type: Array,
|
|
320
|
+
default: () => []
|
|
321
|
+
}
|
|
322
|
+
},
|
|
323
|
+
emits: ["change"],
|
|
324
|
+
setup(e, { emit: t }) {
|
|
325
|
+
const n = e, l = t, s = U([]), a = U([]), i = U([]), h = U([{
|
|
326
|
+
label: "按钮名称",
|
|
327
|
+
prop: "label",
|
|
328
|
+
type: "edit"
|
|
329
|
+
}, {
|
|
330
|
+
label: "按钮类型",
|
|
331
|
+
prop: "type",
|
|
332
|
+
type: "edit"
|
|
333
|
+
}, {
|
|
334
|
+
label: "按钮背景颜色",
|
|
335
|
+
prop: "background",
|
|
336
|
+
type: "edit",
|
|
337
|
+
columnType: "Color"
|
|
338
|
+
}, {
|
|
339
|
+
label: "操作",
|
|
340
|
+
prop: "operate",
|
|
341
|
+
type: "operate",
|
|
342
|
+
sortable: !1
|
|
343
|
+
}]), k = U([{
|
|
344
|
+
label: "标签名称",
|
|
345
|
+
prop: "label",
|
|
346
|
+
type: "edit"
|
|
347
|
+
}, {
|
|
348
|
+
label: "标签类型",
|
|
349
|
+
prop: "type",
|
|
350
|
+
type: "edit"
|
|
351
|
+
}, {
|
|
352
|
+
label: "按钮文字颜色",
|
|
353
|
+
prop: "textColor",
|
|
354
|
+
type: "edit",
|
|
355
|
+
columnType: "Color"
|
|
356
|
+
}, {
|
|
357
|
+
label: "操作",
|
|
358
|
+
prop: "operate",
|
|
359
|
+
type: "operate",
|
|
360
|
+
sortable: !1
|
|
361
|
+
}]), g = U([]), C = U(0), $ = U([{
|
|
362
|
+
name: "isPagination",
|
|
363
|
+
label: "是否显示分页",
|
|
364
|
+
type: "Switch",
|
|
365
|
+
value: !0
|
|
366
|
+
}]), _ = [{
|
|
367
|
+
label: "标签名",
|
|
368
|
+
prop: "label",
|
|
369
|
+
type: "edit"
|
|
370
|
+
}, {
|
|
371
|
+
label: "属性名",
|
|
372
|
+
prop: "prop",
|
|
373
|
+
type: "edit"
|
|
374
|
+
}, {
|
|
375
|
+
label: "宽度",
|
|
376
|
+
prop: "width",
|
|
377
|
+
type: "edit",
|
|
378
|
+
columnType: "Number"
|
|
379
|
+
}, {
|
|
380
|
+
label: "是否固定列",
|
|
381
|
+
prop: "fixed",
|
|
382
|
+
type: "edit",
|
|
383
|
+
columnType: "Radio",
|
|
384
|
+
contents: [{
|
|
385
|
+
label: "left",
|
|
386
|
+
value: "左"
|
|
387
|
+
}, {
|
|
388
|
+
label: "right",
|
|
389
|
+
value: "右"
|
|
390
|
+
}]
|
|
391
|
+
}, {
|
|
392
|
+
label: "是否支持排序",
|
|
393
|
+
prop: "sortable",
|
|
394
|
+
type: "edit",
|
|
395
|
+
columnType: "Switch"
|
|
396
|
+
}, {
|
|
397
|
+
label: "文本所在位置",
|
|
398
|
+
prop: "align",
|
|
399
|
+
type: "edit",
|
|
400
|
+
columnType: "Radio",
|
|
401
|
+
contents: [{
|
|
402
|
+
label: "left",
|
|
403
|
+
value: "左"
|
|
404
|
+
}, {
|
|
405
|
+
label: "center",
|
|
406
|
+
value: "中"
|
|
407
|
+
}, {
|
|
408
|
+
label: "right",
|
|
409
|
+
value: "右"
|
|
410
|
+
}]
|
|
411
|
+
}, {
|
|
412
|
+
label: "溢出悬浮文字",
|
|
413
|
+
prop: "showOverflowTooltip",
|
|
414
|
+
type: "edit",
|
|
415
|
+
columnType: "Switch"
|
|
416
|
+
}, {
|
|
417
|
+
label: "是否不可拖动",
|
|
418
|
+
prop: "isNotDrag",
|
|
419
|
+
type: "edit",
|
|
420
|
+
columnType: "Switch"
|
|
421
|
+
}, {
|
|
422
|
+
label: "是否可编辑列名",
|
|
423
|
+
//暂不支持
|
|
424
|
+
prop: "isEditCol",
|
|
425
|
+
type: "edit",
|
|
426
|
+
columnType: "Switch"
|
|
427
|
+
}, {
|
|
428
|
+
label: "是否出现在附属界面",
|
|
429
|
+
//暂不支持
|
|
430
|
+
prop: "isOperate",
|
|
431
|
+
type: "edit",
|
|
432
|
+
columnType: "Switch"
|
|
433
|
+
}, {
|
|
434
|
+
label: "操作",
|
|
435
|
+
prop: "operate",
|
|
436
|
+
type: "operate",
|
|
437
|
+
sortable: !1
|
|
438
|
+
}], x = (p) => {
|
|
439
|
+
let c = u(s.value);
|
|
440
|
+
const y = c == null ? void 0 : c.find((O) => O.key === "page");
|
|
441
|
+
(y == null ? void 0 : y.contents) !== void 0 ? c = c == null ? void 0 : c.map((O) => ((O == null ? void 0 : O.key) === "page" && (O.contents = p == null ? void 0 : p.isPagination), O)) : c.push({
|
|
442
|
+
key: "page",
|
|
443
|
+
contents: p == null ? void 0 : p.isPagination
|
|
444
|
+
}), s.value = c;
|
|
445
|
+
};
|
|
446
|
+
Y(
|
|
447
|
+
() => n.originalItemContents,
|
|
448
|
+
() => {
|
|
449
|
+
var p, c, y, O, E, N, A, D, v, T, j, B, S;
|
|
450
|
+
!n.originalItemContents || n.originalItemContents.length === 0 || (s.value = u(n.originalItemContents), a.value = (c = (p = s.value) == null ? void 0 : p.find((m) => (m == null ? void 0 : m.key) === "header")) == null ? void 0 : c.contents, i.value = (O = (y = s.value) == null ? void 0 : y.find((m) => (m == null ? void 0 : m.key) === "rowButton")) == null ? void 0 : O.contents, h.value = (N = (E = s.value) == null ? void 0 : E.find((m) => (m == null ? void 0 : m.key) === "extraButton")) == null ? void 0 : N.contents, $.value = (D = (A = s.value) == null ? void 0 : A.find((m) => (m == null ? void 0 : m.key) === "page")) != null && D.contents ? [{
|
|
451
|
+
name: "isPagination",
|
|
452
|
+
label: "是否显示分页",
|
|
453
|
+
type: "Switch",
|
|
454
|
+
value: (T = (v = s.value) == null ? void 0 : v.find((m) => (m == null ? void 0 : m.key) === "page")) == null ? void 0 : T.contents
|
|
455
|
+
}] : [{
|
|
456
|
+
name: "isPagination",
|
|
457
|
+
label: "是否显示分页",
|
|
458
|
+
type: "Switch",
|
|
459
|
+
value: !0
|
|
460
|
+
}], a.value = (j = a.value) == null ? void 0 : j.map((m, F) => m = {
|
|
461
|
+
label: (m == null ? void 0 : m.label) ?? "",
|
|
462
|
+
prop: (m == null ? void 0 : m.label) === "操作" ? "operate" : m == null ? void 0 : m.prop,
|
|
463
|
+
width: m != null && m.width ? parseInt(m.width) : "",
|
|
464
|
+
fixed: (m == null ? void 0 : m.fixed) ?? void 0,
|
|
465
|
+
sortable: (m == null ? void 0 : m.sortable) ?? !1,
|
|
466
|
+
align: (m == null ? void 0 : m.align) ?? "center",
|
|
467
|
+
showOverflowTooltip: (m == null ? void 0 : m.showOverflowTooltip) ?? !0,
|
|
468
|
+
isNotDrag: (m == null ? void 0 : m.isNotDrag) ?? !1,
|
|
469
|
+
isEditCol: (m == null ? void 0 : m.isEditCol) ?? !1,
|
|
470
|
+
isOperate: (m == null ? void 0 : m.isOperate) ?? !1,
|
|
471
|
+
id: (m == null ? void 0 : m.id) ?? F
|
|
472
|
+
}), i.value = (B = i.value) == null ? void 0 : B.map((m, F) => m = {
|
|
473
|
+
label: (m == null ? void 0 : m.label) ?? "",
|
|
474
|
+
type: (m == null ? void 0 : m.type) ?? "",
|
|
475
|
+
textColor: (m == null ? void 0 : m.textColor) ?? "#000000",
|
|
476
|
+
id: (m == null ? void 0 : m.id) ?? F
|
|
477
|
+
}), h.value = (S = h.value) == null ? void 0 : S.map((m, F) => m = {
|
|
478
|
+
label: (m == null ? void 0 : m.label) ?? "",
|
|
479
|
+
type: (m == null ? void 0 : m.type) ?? "",
|
|
480
|
+
background: (m == null ? void 0 : m.textColor) ?? "#FFFFFF",
|
|
481
|
+
id: (m == null ? void 0 : m.id) ?? F
|
|
482
|
+
}));
|
|
483
|
+
},
|
|
484
|
+
{ deep: !0, immediate: !0 }
|
|
485
|
+
), Y(
|
|
486
|
+
() => $.value,
|
|
487
|
+
() => {
|
|
488
|
+
var y;
|
|
489
|
+
let p = u(s.value);
|
|
490
|
+
const c = p == null ? void 0 : p.find((O) => O.key === "page");
|
|
491
|
+
c != null && c.contents ? p = p == null ? void 0 : p.map((O) => {
|
|
492
|
+
var E;
|
|
493
|
+
return (O == null ? void 0 : O.key) === "page" && (O.contents = (E = $.value) == null ? void 0 : E[0].value), O;
|
|
494
|
+
}) : p.push({
|
|
495
|
+
key: "page",
|
|
496
|
+
contents: (y = $.value) == null ? void 0 : y[0].value
|
|
497
|
+
}), s.value = p;
|
|
498
|
+
},
|
|
499
|
+
{ immediate: !0, deep: !0 }
|
|
500
|
+
);
|
|
501
|
+
const d = () => {
|
|
502
|
+
const p = u(a.value);
|
|
503
|
+
let c = u(s.value);
|
|
504
|
+
p.push({
|
|
505
|
+
label: "",
|
|
506
|
+
prop: "",
|
|
507
|
+
width: "",
|
|
508
|
+
fixed: void 0,
|
|
509
|
+
sortable: !1,
|
|
510
|
+
align: "center",
|
|
511
|
+
showOverflowTooltip: !0,
|
|
512
|
+
isNotDrag: !1,
|
|
513
|
+
isEditCol: !1,
|
|
514
|
+
isOperate: !1,
|
|
515
|
+
id: C.value
|
|
516
|
+
}), a.value = p, C.value++;
|
|
517
|
+
const y = c == null ? void 0 : c.find((O) => (O == null ? void 0 : O.key) === "header");
|
|
518
|
+
y != null && y.contents ? (y.contents = p, c = c == null ? void 0 : c.map((O) => ((O == null ? void 0 : O.key) === "header" && (O.contents = p), O))) : c.push({
|
|
519
|
+
key: "header",
|
|
520
|
+
contents: p
|
|
521
|
+
}), s.value = c;
|
|
522
|
+
}, P = () => {
|
|
523
|
+
const p = u(i.value);
|
|
524
|
+
let c = u(s.value);
|
|
525
|
+
p.push({
|
|
526
|
+
label: "",
|
|
527
|
+
type: "",
|
|
528
|
+
textColor: "#000000",
|
|
529
|
+
id: C.value
|
|
530
|
+
}), i.value = p, C.value++;
|
|
531
|
+
const y = c == null ? void 0 : c.find((O) => (O == null ? void 0 : O.key) === "rowButton");
|
|
532
|
+
y != null && y.contents ? (y.contents = p, c = c == null ? void 0 : c.map((O) => ((O == null ? void 0 : O.key) === "rowButton" && (O.contents = p), O))) : c.push({
|
|
533
|
+
key: "rowButton",
|
|
534
|
+
contents: p
|
|
535
|
+
}), s.value = c;
|
|
536
|
+
}, o = () => {
|
|
537
|
+
const p = u(g.value);
|
|
538
|
+
let c = u(s.value);
|
|
539
|
+
p.push({
|
|
540
|
+
label: "",
|
|
541
|
+
type: "",
|
|
542
|
+
background: "#FFFFFF",
|
|
543
|
+
id: C.value
|
|
544
|
+
}), g.value = p, C.value++;
|
|
545
|
+
const y = c == null ? void 0 : c.find((O) => (O == null ? void 0 : O.key) === "extraButton");
|
|
546
|
+
y != null && y.contents ? (y.contents = p, c = c == null ? void 0 : c.map((O) => ((O == null ? void 0 : O.key) === "extraButton" && (O.contents = p), O))) : c.push({
|
|
547
|
+
key: "extraButton",
|
|
548
|
+
contents: p
|
|
549
|
+
}), s.value = c;
|
|
550
|
+
}, r = (p) => {
|
|
551
|
+
const c = u(i.value);
|
|
552
|
+
let y = u(s.value);
|
|
553
|
+
i.value = c.filter((E) => E.id !== p.id);
|
|
554
|
+
const O = y == null ? void 0 : y.find((E) => E.key === "rowButton");
|
|
555
|
+
O != null && O.contents && (y = y == null ? void 0 : y.map((E) => ((E == null ? void 0 : E.key) === "rowButton" && (E.contents = c.filter((N) => N.id !== p.id)), E))), s.value = y;
|
|
556
|
+
}, f = (p) => {
|
|
557
|
+
const c = u(g.value);
|
|
558
|
+
let y = u(s.value);
|
|
559
|
+
g.value = c.filter((E) => E.id !== p.id);
|
|
560
|
+
const O = y == null ? void 0 : y.find((E) => E.key === "extraButton");
|
|
561
|
+
O != null && O.contents && (y = y == null ? void 0 : y.map((E) => ((E == null ? void 0 : E.key) === "extraButton" && (E.contents = c.filter((N) => N.id !== p.id)), E))), s.value = y;
|
|
562
|
+
}, b = (p) => {
|
|
563
|
+
const c = u(a.value);
|
|
564
|
+
let y = u(s.value);
|
|
565
|
+
a.value = c.filter((E) => E.id !== p.id);
|
|
566
|
+
const O = y == null ? void 0 : y.find((E) => E.key === "header");
|
|
567
|
+
O != null && O.contents && (y = y == null ? void 0 : y.map((E) => ((E == null ? void 0 : E.key) === "header" && (E.contents = c.filter((N) => N.id !== p.id)), E))), s.value = y;
|
|
568
|
+
};
|
|
569
|
+
return Y(
|
|
570
|
+
() => [s.value, a.value],
|
|
571
|
+
() => {
|
|
572
|
+
let p = u(s.value);
|
|
573
|
+
const c = p == null ? void 0 : p.find((y) => (y == null ? void 0 : y.key) === "header");
|
|
574
|
+
c != null && c.contents ? (c.contents = a.value, p = p == null ? void 0 : p.map((y) => ((y == null ? void 0 : y.key) === "header" && (y.contents = a.value), y))) : p.push({
|
|
575
|
+
key: "header",
|
|
576
|
+
contents: a.value
|
|
577
|
+
}), l("change", p);
|
|
578
|
+
},
|
|
579
|
+
{ deep: !0, immediate: !0 }
|
|
580
|
+
), (p, c) => {
|
|
581
|
+
const y = Ie("el-button");
|
|
582
|
+
return H(), q("div", en, [
|
|
583
|
+
w("div", ln, [
|
|
584
|
+
w("div", nn, [
|
|
585
|
+
c[1] || (c[1] = w("div", null, M("表头"), -1)),
|
|
586
|
+
G(y, {
|
|
587
|
+
class: "blue-operate-button",
|
|
588
|
+
icon: "ele-Plus",
|
|
589
|
+
onClick: d
|
|
590
|
+
}, {
|
|
591
|
+
default: K(() => c[0] || (c[0] = [
|
|
592
|
+
ae(M("新建"))
|
|
593
|
+
])),
|
|
594
|
+
_: 1,
|
|
595
|
+
__: [0]
|
|
596
|
+
})
|
|
597
|
+
]),
|
|
598
|
+
w("div", tn, [
|
|
599
|
+
G(re, {
|
|
600
|
+
columns: _,
|
|
601
|
+
isShowPagination: !1,
|
|
602
|
+
isShowEdit: !1,
|
|
603
|
+
isMoveColumn: !1,
|
|
604
|
+
tableData: a.value,
|
|
605
|
+
onDeleteRow: b
|
|
606
|
+
}, null, 8, ["tableData"])
|
|
607
|
+
]),
|
|
608
|
+
w("div", sn, [
|
|
609
|
+
c[3] || (c[3] = w("div", null, M("行内按钮"), -1)),
|
|
610
|
+
G(y, {
|
|
611
|
+
class: "blue-operate-button",
|
|
612
|
+
icon: "ele-Plus",
|
|
613
|
+
onClick: P
|
|
614
|
+
}, {
|
|
615
|
+
default: K(() => c[2] || (c[2] = [
|
|
616
|
+
ae(M("新建"))
|
|
617
|
+
])),
|
|
618
|
+
_: 1,
|
|
619
|
+
__: [2]
|
|
620
|
+
})
|
|
621
|
+
]),
|
|
622
|
+
w("div", an, [
|
|
623
|
+
G(re, {
|
|
624
|
+
columns: k.value,
|
|
625
|
+
isShowPagination: !1,
|
|
626
|
+
isShowEdit: !1,
|
|
627
|
+
isMoveColumn: !1,
|
|
628
|
+
tableData: i.value,
|
|
629
|
+
onDeleteRow: r
|
|
630
|
+
}, null, 8, ["columns", "tableData"])
|
|
631
|
+
]),
|
|
632
|
+
w("div", rn, [
|
|
633
|
+
c[5] || (c[5] = w("div", null, M("表格外部按钮"), -1)),
|
|
634
|
+
G(y, {
|
|
635
|
+
class: "blue-operate-button",
|
|
636
|
+
icon: "ele-Plus",
|
|
637
|
+
onClick: o
|
|
638
|
+
}, {
|
|
639
|
+
default: K(() => c[4] || (c[4] = [
|
|
640
|
+
ae(M("新建"))
|
|
641
|
+
])),
|
|
642
|
+
_: 1,
|
|
643
|
+
__: [4]
|
|
644
|
+
})
|
|
645
|
+
]),
|
|
646
|
+
w("div", on, [
|
|
647
|
+
G(re, {
|
|
648
|
+
columns: h.value,
|
|
649
|
+
isShowPagination: !1,
|
|
650
|
+
isShowEdit: !1,
|
|
651
|
+
isMoveColumn: !1,
|
|
652
|
+
tableData: g.value,
|
|
653
|
+
onDeleteRow: f
|
|
654
|
+
}, null, 8, ["columns", "tableData"])
|
|
655
|
+
]),
|
|
656
|
+
c[6] || (c[6] = w("div", { class: "operate-title" }, [
|
|
657
|
+
w("div", null, M("分页"))
|
|
658
|
+
], -1)),
|
|
659
|
+
w("div", cn, [
|
|
660
|
+
G(Oe, {
|
|
661
|
+
rowContents: $.value,
|
|
662
|
+
onChange: x
|
|
663
|
+
}, null, 8, ["rowContents"])
|
|
664
|
+
])
|
|
665
|
+
])
|
|
666
|
+
]);
|
|
667
|
+
};
|
|
668
|
+
}
|
|
669
|
+
}, pn = /* @__PURE__ */ he(un, [["__scopeId", "data-v-877911eb"]]), fn = { class: "form-operate-content" }, dn = { class: "form-operate-item" }, yn = { class: "operate-title" }, hn = { class: "operate-content" }, mn = { class: "operate-title" }, bn = { class: "operate-content" }, gn = { class: "operate-content" }, kn = {
|
|
670
|
+
__name: "operate",
|
|
671
|
+
props: {
|
|
672
|
+
itemContents: {
|
|
673
|
+
type: Array,
|
|
674
|
+
default: () => []
|
|
675
|
+
},
|
|
676
|
+
originalItemContents: {
|
|
677
|
+
type: Array,
|
|
678
|
+
default: () => []
|
|
679
|
+
}
|
|
680
|
+
},
|
|
681
|
+
emits: ["change"],
|
|
682
|
+
setup(e, { emit: t }) {
|
|
683
|
+
const n = e, l = t, s = U([{
|
|
684
|
+
name: "isRowFlex",
|
|
685
|
+
label: "是否横向布局",
|
|
686
|
+
type: "Switch",
|
|
687
|
+
value: !0
|
|
688
|
+
}]), a = U([{
|
|
689
|
+
label: "字段名称",
|
|
690
|
+
prop: "label",
|
|
691
|
+
type: "edit"
|
|
692
|
+
}, {
|
|
693
|
+
label: "字段类型",
|
|
694
|
+
prop: "type",
|
|
695
|
+
type: "edit"
|
|
696
|
+
}, {
|
|
697
|
+
label: "字段值",
|
|
698
|
+
prop: "key",
|
|
699
|
+
type: "edit"
|
|
700
|
+
}, {
|
|
701
|
+
label: "字段选项值",
|
|
702
|
+
prop: "options",
|
|
703
|
+
type: "edit"
|
|
704
|
+
}, {
|
|
705
|
+
label: "操作",
|
|
706
|
+
prop: "operate",
|
|
707
|
+
type: "operate",
|
|
708
|
+
sortable: !1
|
|
709
|
+
}]), i = U([{
|
|
710
|
+
label: "字段名称",
|
|
711
|
+
prop: "label",
|
|
712
|
+
type: "edit"
|
|
713
|
+
}, {
|
|
714
|
+
label: "字段类型",
|
|
715
|
+
prop: "type",
|
|
716
|
+
type: "edit"
|
|
717
|
+
}, {
|
|
718
|
+
label: "按钮背景颜色",
|
|
719
|
+
prop: "background",
|
|
720
|
+
type: "edit",
|
|
721
|
+
columnType: "Color"
|
|
722
|
+
}, {
|
|
723
|
+
label: "操作",
|
|
724
|
+
prop: "operate",
|
|
725
|
+
type: "operate",
|
|
726
|
+
sortable: !1
|
|
727
|
+
}]), h = U([]), k = U([]), g = U([]), C = U(0);
|
|
728
|
+
Y(
|
|
729
|
+
() => n.originalItemContents,
|
|
730
|
+
() => {
|
|
731
|
+
var o, r, f, b, p, c, y, O, E, N;
|
|
732
|
+
!n.originalItemContents || n.originalItemContents.length === 0 || (k.value = u(n.originalItemContents), g.value = (r = (o = k.value) == null ? void 0 : o.find((A) => (A == null ? void 0 : A.key) === "formContent")) == null ? void 0 : r.contents, h.value = (b = (f = k.value) == null ? void 0 : f.find((A) => (A == null ? void 0 : A.key) === "formButton")) == null ? void 0 : b.contents, g.value = (p = g.value) == null ? void 0 : p.map((A, D) => A = {
|
|
733
|
+
label: (A == null ? void 0 : A.label) ?? "",
|
|
734
|
+
type: (A == null ? void 0 : A.type) ?? "",
|
|
735
|
+
key: (A == null ? void 0 : A.key) ?? "",
|
|
736
|
+
options: (A == null ? void 0 : A.options) ?? "",
|
|
737
|
+
id: (A == null ? void 0 : A.id) ?? D
|
|
738
|
+
}), h.value = (c = h.value) == null ? void 0 : c.map((A, D) => A = {
|
|
739
|
+
label: (A == null ? void 0 : A.label) ?? "",
|
|
740
|
+
type: (A == null ? void 0 : A.type) ?? "",
|
|
741
|
+
background: (A == null ? void 0 : A.background) ?? "#000000",
|
|
742
|
+
id: (A == null ? void 0 : A.id) ?? D
|
|
743
|
+
}), s.value = (O = (y = k.value) == null ? void 0 : y.find((A) => (A == null ? void 0 : A.key) === "formFlex")) != null && O.contents ? [{
|
|
744
|
+
name: "isRowFlex",
|
|
745
|
+
label: "是否横向布局",
|
|
746
|
+
type: "Switch",
|
|
747
|
+
value: (N = (E = k.value) == null ? void 0 : E.find((A) => (A == null ? void 0 : A.key) === "formFlex")) == null ? void 0 : N.contents
|
|
748
|
+
}] : [{
|
|
749
|
+
name: "isRowFlex",
|
|
750
|
+
label: "是否横向布局",
|
|
751
|
+
type: "Switch",
|
|
752
|
+
value: !0
|
|
753
|
+
}]);
|
|
754
|
+
},
|
|
755
|
+
{ deep: !0, immediate: !0 }
|
|
756
|
+
);
|
|
757
|
+
const $ = () => {
|
|
758
|
+
const o = u(h.value);
|
|
759
|
+
let r = u(k.value);
|
|
760
|
+
o.push({
|
|
761
|
+
label: "",
|
|
762
|
+
type: "",
|
|
763
|
+
background: "#000000",
|
|
764
|
+
id: C.value
|
|
765
|
+
}), h.value = o, C.value++;
|
|
766
|
+
const f = r == null ? void 0 : r.find((b) => (b == null ? void 0 : b.key) === "formButton");
|
|
767
|
+
f != null && f.contents ? (f.contents = o, r = r == null ? void 0 : r.map((b) => ((b == null ? void 0 : b.key) === "formButton" && (b.contents = o), b))) : r.push({
|
|
768
|
+
key: "formButton",
|
|
769
|
+
contents: o
|
|
770
|
+
}), k.value = r;
|
|
771
|
+
}, _ = () => {
|
|
772
|
+
const o = u(g.value);
|
|
773
|
+
let r = u(k.value);
|
|
774
|
+
o.push({
|
|
775
|
+
label: "",
|
|
776
|
+
type: "",
|
|
777
|
+
key: "",
|
|
778
|
+
options: "",
|
|
779
|
+
id: C.value
|
|
780
|
+
}), g.value = o, C.value++;
|
|
781
|
+
const f = r == null ? void 0 : r.find((b) => (b == null ? void 0 : b.key) === "formContent");
|
|
782
|
+
f != null && f.contents ? (f.contents = o, r = r == null ? void 0 : r.map((b) => ((b == null ? void 0 : b.key) === "formContent" && (b.contents = o), b))) : r.push({
|
|
783
|
+
key: "formContent",
|
|
784
|
+
contents: o
|
|
785
|
+
}), k.value = r;
|
|
786
|
+
}, x = (o) => {
|
|
787
|
+
const r = u(h.value);
|
|
788
|
+
let f = u(k.value);
|
|
789
|
+
h.value = r.filter((p) => p.id !== o.id);
|
|
790
|
+
const b = f == null ? void 0 : f.find((p) => p.key === "formButton");
|
|
791
|
+
b != null && b.contents && (f = f == null ? void 0 : f.map((p) => ((p == null ? void 0 : p.key) === "formButton" && (p.contents = r.filter((c) => c.id !== o.id)), p))), k.value = f;
|
|
792
|
+
}, d = (o) => {
|
|
793
|
+
const r = u(g.value);
|
|
794
|
+
let f = u(k.value);
|
|
795
|
+
g.value = r.filter((p) => p.id !== o.id);
|
|
796
|
+
const b = f == null ? void 0 : f.find((p) => p.key === "formContent");
|
|
797
|
+
b != null && b.contents && (f = f == null ? void 0 : f.map((p) => ((p == null ? void 0 : p.key) === "formContent" && (p.contents = r.filter((c) => c.id !== o.id)), p))), k.value = f;
|
|
798
|
+
}, P = (o) => {
|
|
799
|
+
let r = u(k.value);
|
|
800
|
+
const f = r == null ? void 0 : r.find((b) => b.key === "formFlex");
|
|
801
|
+
(f == null ? void 0 : f.contents) !== void 0 ? r = r == null ? void 0 : r.map((b) => ((b == null ? void 0 : b.key) === "formFlex" && (b.contents = o == null ? void 0 : o.isRowFlex), b)) : r.push({
|
|
802
|
+
key: "formFlex",
|
|
803
|
+
contents: o == null ? void 0 : o.isRowFlex
|
|
804
|
+
}), k.value = r;
|
|
805
|
+
};
|
|
806
|
+
return Y(
|
|
807
|
+
() => [k.value, g.value],
|
|
808
|
+
() => {
|
|
809
|
+
let o = u(k.value);
|
|
810
|
+
const r = o == null ? void 0 : o.find((f) => (f == null ? void 0 : f.key) === "formContent");
|
|
811
|
+
r != null && r.contents ? (r.contents = g.value, o = o == null ? void 0 : o.map((f) => ((f == null ? void 0 : f.key) === "formContent" && (f.contents = g.value), f))) : o.push({
|
|
812
|
+
key: "formContent",
|
|
813
|
+
contents: g.value
|
|
814
|
+
}), l("change", o);
|
|
815
|
+
},
|
|
816
|
+
{ deep: !0, immediate: !0 }
|
|
817
|
+
), (o, r) => {
|
|
818
|
+
const f = Ie("el-button");
|
|
819
|
+
return H(), q("div", fn, [
|
|
820
|
+
w("div", dn, [
|
|
821
|
+
w("div", yn, [
|
|
822
|
+
r[1] || (r[1] = w("div", null, M("表单信息"), -1)),
|
|
823
|
+
G(f, {
|
|
824
|
+
class: "blue-operate-button",
|
|
825
|
+
icon: "ele-Plus",
|
|
826
|
+
onClick: _
|
|
827
|
+
}, {
|
|
828
|
+
default: K(() => r[0] || (r[0] = [
|
|
829
|
+
ae(M("新建"))
|
|
830
|
+
])),
|
|
831
|
+
_: 1,
|
|
832
|
+
__: [0]
|
|
833
|
+
})
|
|
834
|
+
]),
|
|
835
|
+
w("div", hn, [
|
|
836
|
+
G(re, {
|
|
837
|
+
columns: a.value,
|
|
838
|
+
isShowPagination: !1,
|
|
839
|
+
isShowEdit: !1,
|
|
840
|
+
isMoveColumn: !1,
|
|
841
|
+
tableData: g.value,
|
|
842
|
+
onDeleteRow: d
|
|
843
|
+
}, null, 8, ["columns", "tableData"])
|
|
844
|
+
]),
|
|
845
|
+
w("div", mn, [
|
|
846
|
+
r[3] || (r[3] = w("div", null, M("表单按钮"), -1)),
|
|
847
|
+
G(f, {
|
|
848
|
+
class: "blue-operate-button",
|
|
849
|
+
icon: "ele-Plus",
|
|
850
|
+
onClick: $
|
|
851
|
+
}, {
|
|
852
|
+
default: K(() => r[2] || (r[2] = [
|
|
853
|
+
ae(M("新建"))
|
|
854
|
+
])),
|
|
855
|
+
_: 1,
|
|
856
|
+
__: [2]
|
|
857
|
+
})
|
|
858
|
+
]),
|
|
859
|
+
w("div", bn, [
|
|
860
|
+
G(re, {
|
|
861
|
+
columns: i.value,
|
|
862
|
+
isShowPagination: !1,
|
|
863
|
+
isShowEdit: !1,
|
|
864
|
+
isMoveColumn: !1,
|
|
865
|
+
tableData: h.value,
|
|
866
|
+
onDeleteRow: x
|
|
867
|
+
}, null, 8, ["columns", "tableData"])
|
|
868
|
+
]),
|
|
869
|
+
r[4] || (r[4] = w("div", { class: "operate-title" }, [
|
|
870
|
+
w("div", null, M("表单布局"))
|
|
871
|
+
], -1)),
|
|
872
|
+
w("div", gn, [
|
|
873
|
+
G(Oe, {
|
|
874
|
+
rowContents: s.value,
|
|
875
|
+
onChange: P
|
|
876
|
+
}, null, 8, ["rowContents"])
|
|
877
|
+
])
|
|
878
|
+
])
|
|
879
|
+
]);
|
|
880
|
+
};
|
|
881
|
+
}
|
|
882
|
+
}, Cn = /* @__PURE__ */ he(kn, [["__scopeId", "data-v-a36b8468"]]), An = { class: "extra-content" }, $n = { key: 0 }, On = { key: 1 }, _n = {
|
|
883
|
+
__name: "index",
|
|
884
|
+
props: {
|
|
885
|
+
itemData: {
|
|
886
|
+
type: Array,
|
|
887
|
+
default: () => []
|
|
888
|
+
},
|
|
889
|
+
childItemData: {
|
|
890
|
+
type: Array,
|
|
891
|
+
default: () => []
|
|
892
|
+
},
|
|
893
|
+
index: Number,
|
|
894
|
+
changedContent: {
|
|
895
|
+
type: Object,
|
|
896
|
+
default: () => {
|
|
897
|
+
}
|
|
898
|
+
}
|
|
899
|
+
},
|
|
900
|
+
emits: ["change"],
|
|
901
|
+
setup(e, { emit: t }) {
|
|
902
|
+
const n = e, l = U(0), s = U(), a = U(), i = t, h = U(!1), k = U({}), g = U({}), C = U();
|
|
903
|
+
Y(
|
|
904
|
+
() => [n.itemData],
|
|
905
|
+
() => {
|
|
906
|
+
var p;
|
|
907
|
+
const b = u(n.itemData);
|
|
908
|
+
s.value = (p = u(b)) == null ? void 0 : p.map((c) => {
|
|
909
|
+
var y;
|
|
910
|
+
if (c.key === "extra") {
|
|
911
|
+
let O = [];
|
|
912
|
+
(y = c.value) == null || y.forEach((E) => {
|
|
913
|
+
var N;
|
|
914
|
+
O.push((N = Object.values(E)) == null ? void 0 : N[0]);
|
|
915
|
+
}), c.value = O;
|
|
916
|
+
}
|
|
917
|
+
return c;
|
|
918
|
+
});
|
|
919
|
+
},
|
|
920
|
+
{ deep: !0, immediate: !0 }
|
|
921
|
+
);
|
|
922
|
+
const $ = (b, p, c, y) => {
|
|
923
|
+
var E;
|
|
924
|
+
let O = {};
|
|
925
|
+
((E = b == null ? void 0 : b[0]) == null ? void 0 : E.contents) === "详情" && (h.value = !0, O[p] = b, a.value = b == null ? void 0 : b.filter((N) => (N == null ? void 0 : N.key) !== "tableContentName"), k.value = O, g.value = c, C.value = y.id);
|
|
926
|
+
}, _ = (b) => {
|
|
927
|
+
var N, A, D, v;
|
|
928
|
+
const p = (A = (N = Object.values(u(k.value))) == null ? void 0 : N[0]) == null ? void 0 : A.filter((T) => (T == null ? void 0 : T.key) === "tableContentName"), c = (v = (D = Object.values(u(k.value))) == null ? void 0 : D[0]) == null ? void 0 : v.filter((T) => (T == null ? void 0 : T.key) !== "tableContentName"), y = c == null ? void 0 : c.map((T, j) => {
|
|
929
|
+
var B;
|
|
930
|
+
return j === b.index && (T == null ? void 0 : T.comp) === "Table" && (T.compData = (B = T.compData) == null ? void 0 : B.map((S) => {
|
|
931
|
+
var m, F;
|
|
932
|
+
return (S == null ? void 0 : S.key) === "tableContents" && (S.contents = (F = (m = b.content) == null ? void 0 : m.map((L) => {
|
|
933
|
+
let Z = {};
|
|
934
|
+
for (let W in L)
|
|
935
|
+
W !== "id" && (Z[W] = L[W]);
|
|
936
|
+
return Z;
|
|
937
|
+
})) == null ? void 0 : F.map((L) => Object.values(L))), S;
|
|
938
|
+
})), T;
|
|
939
|
+
});
|
|
940
|
+
y.unshift(p == null ? void 0 : p[0]);
|
|
941
|
+
let O = u(k.value), E = {};
|
|
942
|
+
for (let T in O)
|
|
943
|
+
E[T] = y;
|
|
944
|
+
k.value = E;
|
|
945
|
+
}, x = () => {
|
|
946
|
+
h.value = !1, k.value = {}, g.value = {}, C.value = void 0, l.value++;
|
|
947
|
+
}, d = (b) => {
|
|
948
|
+
var N, A, D, v;
|
|
949
|
+
const p = (A = (N = Object.values(u(k.value))) == null ? void 0 : N[0]) == null ? void 0 : A.filter((T) => (T == null ? void 0 : T.key) === "tableContentName"), c = (v = (D = Object.values(u(k.value))) == null ? void 0 : D[0]) == null ? void 0 : v.filter((T) => (T == null ? void 0 : T.key) !== "tableContentName"), y = c == null ? void 0 : c.map((T, j) => (j === b.index && (T.compData = b.contents), T));
|
|
950
|
+
y.unshift(p == null ? void 0 : p[0]);
|
|
951
|
+
let O = u(k.value), E = {};
|
|
952
|
+
for (let T in O)
|
|
953
|
+
E[T] = y;
|
|
954
|
+
k.value = E;
|
|
955
|
+
}, P = () => {
|
|
956
|
+
var p, c;
|
|
957
|
+
let b = {};
|
|
958
|
+
for (let y in g.value)
|
|
959
|
+
y === ((p = Object.keys(k.value)) == null ? void 0 : p[0]) ? b[y] = (c = Object.values(k.value)) == null ? void 0 : c[0] : b[y] = g.value[y];
|
|
960
|
+
i("change", {
|
|
961
|
+
buttonName: "编辑",
|
|
962
|
+
index: C.value,
|
|
963
|
+
singleContent: b
|
|
964
|
+
}, "methodData"), h.value = !1, k.value = {}, g.value = {}, C.value = void 0;
|
|
965
|
+
}, o = () => {
|
|
966
|
+
h.value = !1, k.value = {}, g.value = {}, C.value = void 0;
|
|
967
|
+
}, r = (b) => {
|
|
968
|
+
i("change", b, "methodData");
|
|
969
|
+
}, f = (b) => vn(b);
|
|
970
|
+
return (b, p) => (H(), q(me, null, [
|
|
971
|
+
w("div", An, [
|
|
972
|
+
(H(!0), q(me, null, ve(s.value, (c, y) => (H(), q("div", { key: l.value }, [
|
|
973
|
+
(c == null ? void 0 : c.key) === "extra" ? (H(), q("div", $n)) : (H(), q("div", On, [
|
|
974
|
+
(H(), Ee(De(f(c.comp)), {
|
|
975
|
+
itemData: c == null ? void 0 : c.compData,
|
|
976
|
+
childItemData: c == null ? void 0 : c.itemChildData,
|
|
977
|
+
key: y,
|
|
978
|
+
index: (c == null ? void 0 : c.id) ?? y,
|
|
979
|
+
onContentClick: $,
|
|
980
|
+
onChange: r
|
|
981
|
+
}, null, 40, ["itemData", "childItemData", "index"]))
|
|
982
|
+
]))
|
|
983
|
+
]))), 128))
|
|
984
|
+
]),
|
|
985
|
+
G(dl, {
|
|
986
|
+
visible: h.value,
|
|
987
|
+
onBeforeDestroy: o
|
|
988
|
+
}, {
|
|
989
|
+
default: K(() => [
|
|
990
|
+
(H(!0), q(me, null, ve(a.value, (c, y) => (H(), q("div", {
|
|
991
|
+
key: y,
|
|
992
|
+
class: "extra-dialog"
|
|
993
|
+
}, [
|
|
994
|
+
(H(), Ee(De(f(c.comp)), {
|
|
995
|
+
itemData: c == null ? void 0 : c.compData,
|
|
996
|
+
onChange: _,
|
|
997
|
+
childItemData: c == null ? void 0 : c.itemChildData,
|
|
998
|
+
key: y,
|
|
999
|
+
onContentChange: d,
|
|
1000
|
+
index: (c == null ? void 0 : c.id) ?? y,
|
|
1001
|
+
class: "extra-component"
|
|
1002
|
+
}, null, 40, ["itemData", "childItemData", "index"]))
|
|
1003
|
+
]))), 128))
|
|
1004
|
+
]),
|
|
1005
|
+
footer: K(() => [
|
|
1006
|
+
w("div", { class: "dialog-footer" }, [
|
|
1007
|
+
w("div", {
|
|
1008
|
+
class: "cancel-button footer-button",
|
|
1009
|
+
onClick: x
|
|
1010
|
+
}, M("取消")),
|
|
1011
|
+
w("div", {
|
|
1012
|
+
class: "confirm-button footer-button",
|
|
1013
|
+
onClick: P
|
|
1014
|
+
}, M("确认"))
|
|
1015
|
+
])
|
|
1016
|
+
]),
|
|
1017
|
+
_: 1
|
|
1018
|
+
}, 8, ["visible"])
|
|
1019
|
+
], 64));
|
|
1020
|
+
}
|
|
1021
|
+
}, xn = /* @__PURE__ */ he(_n, [["__scopeId", "data-v-e3e0f29d"]]), Tt = U([
|
|
1022
|
+
{
|
|
1023
|
+
name: "表格",
|
|
1024
|
+
type: "table",
|
|
1025
|
+
comp: "Table",
|
|
1026
|
+
icon: "Grid"
|
|
1027
|
+
},
|
|
1028
|
+
{
|
|
1029
|
+
name: "表单",
|
|
1030
|
+
type: "form",
|
|
1031
|
+
comp: "Form",
|
|
1032
|
+
icon: "Film"
|
|
1033
|
+
},
|
|
1034
|
+
{
|
|
1035
|
+
name: "折叠",
|
|
1036
|
+
type: "fold",
|
|
1037
|
+
comp: "Fold",
|
|
1038
|
+
icon: "Fold"
|
|
1039
|
+
}
|
|
1040
|
+
]), Tn = {
|
|
1041
|
+
TABLE: il,
|
|
1042
|
+
FORM: Vl,
|
|
1043
|
+
TableOperate: pn,
|
|
1044
|
+
FormOperate: Cn,
|
|
1045
|
+
FOLD: hl,
|
|
1046
|
+
CALCULATOR: xn
|
|
1047
|
+
// 添加其他组件...
|
|
1048
|
+
};
|
|
1049
|
+
function vn(e) {
|
|
1050
|
+
return Tn[e == null ? void 0 : e.toUpperCase()] || null;
|
|
1051
|
+
}
|
|
1052
|
+
const R = [
|
|
1053
|
+
{
|
|
1054
|
+
key: "FormName",
|
|
1055
|
+
value: "Form"
|
|
1056
|
+
},
|
|
1057
|
+
{
|
|
1058
|
+
key: "TableName",
|
|
1059
|
+
value: "Table"
|
|
1060
|
+
},
|
|
1061
|
+
{
|
|
1062
|
+
key: "MenuName",
|
|
1063
|
+
value: "Menu"
|
|
1064
|
+
},
|
|
1065
|
+
{
|
|
1066
|
+
key: "GroupName",
|
|
1067
|
+
value: "Group"
|
|
1068
|
+
},
|
|
1069
|
+
{
|
|
1070
|
+
key: "SystemKey",
|
|
1071
|
+
value: "System"
|
|
1072
|
+
}
|
|
1073
|
+
], J = [
|
|
1074
|
+
{
|
|
1075
|
+
key: "FormDirect",
|
|
1076
|
+
value: "formFlex"
|
|
1077
|
+
},
|
|
1078
|
+
{
|
|
1079
|
+
key: "Form",
|
|
1080
|
+
value: "formContent"
|
|
1081
|
+
},
|
|
1082
|
+
{
|
|
1083
|
+
key: "FormButton",
|
|
1084
|
+
value: "formButton"
|
|
1085
|
+
},
|
|
1086
|
+
{
|
|
1087
|
+
key: "FormFlex",
|
|
1088
|
+
value: "formWrap"
|
|
1089
|
+
},
|
|
1090
|
+
{
|
|
1091
|
+
key: "TableColumns",
|
|
1092
|
+
value: "header"
|
|
1093
|
+
},
|
|
1094
|
+
{
|
|
1095
|
+
key: "TableButton",
|
|
1096
|
+
value: "extraButton"
|
|
1097
|
+
},
|
|
1098
|
+
{
|
|
1099
|
+
key: "TableLineButton",
|
|
1100
|
+
value: "rowButton"
|
|
1101
|
+
},
|
|
1102
|
+
{
|
|
1103
|
+
key: "Table",
|
|
1104
|
+
value: "tableContents"
|
|
1105
|
+
},
|
|
1106
|
+
{
|
|
1107
|
+
key: "TableIndex",
|
|
1108
|
+
value: "tableIndex"
|
|
1109
|
+
},
|
|
1110
|
+
{
|
|
1111
|
+
key: "Menus",
|
|
1112
|
+
value: "menuContents"
|
|
1113
|
+
},
|
|
1114
|
+
{
|
|
1115
|
+
key: "GroupContents",
|
|
1116
|
+
value: "groupContents"
|
|
1117
|
+
}
|
|
1118
|
+
], ne = U(0), En = (e) => {
|
|
1119
|
+
const [t, n] = e.split(/=(.+)/), l = t.replace(/['"]/g, "").trim(), s = n.replace(/^['"]|['"]$/g, "");
|
|
1120
|
+
return { key: l, value: s };
|
|
1121
|
+
}, fe = (e) => {
|
|
1122
|
+
try {
|
|
1123
|
+
return JSON.parse(e), !0;
|
|
1124
|
+
} catch {
|
|
1125
|
+
return !1;
|
|
1126
|
+
}
|
|
1127
|
+
}, Dn = (e) => e.includes("$") && e.trim().endsWith("(") ? e + ")" : e, Nn = (e) => {
|
|
1128
|
+
let t = e;
|
|
1129
|
+
const n = [];
|
|
1130
|
+
let l = "";
|
|
1131
|
+
for (const s of t)
|
|
1132
|
+
s.includes("{") || l.includes("{") || s.includes("[") || l.includes("[") || s.includes("【") || l.includes("【") || s.includes("(") || l.includes("(") || s.includes("(") || l.includes("(") || s.includes("/*") || l.includes("/*") ? (l += s.trim(), u(l).split("{").length - 1 === u(l).split("}").length - 1 && u(l).split("【").length - 1 === u(l).split("】").length - 1 && u(l).split("[").length - 1 === u(l).split("]").length - 1 && u(l).split("(").length - 1 === u(l).split(")").length - 1 && u(l).split("(").length - 1 === u(l).split(")").length - 1 && u(l).split("/*").length - 1 === u(l).split("*/").length - 1 && (n.push(l), l = "")) : n.push(s.trim());
|
|
1133
|
+
return n == null ? void 0 : n.filter((s) => s.includes("{"));
|
|
1134
|
+
}, Sn = (e) => {
|
|
1135
|
+
var n;
|
|
1136
|
+
let t = [];
|
|
1137
|
+
return (n = Nn(e.slice(1, -1))) == null || n.forEach((l) => {
|
|
1138
|
+
var a, i, h, k;
|
|
1139
|
+
let s = ((i = (a = l.slice(1, -1)) == null ? void 0 : a.split(",")) == null ? void 0 : i.length) ?? 1;
|
|
1140
|
+
(k = (h = l.slice(1, -1)) == null ? void 0 : h.split(",")) == null || k.forEach((g) => {
|
|
1141
|
+
var x, d, P, o, r, f, b, p, c, y, O, E, N;
|
|
1142
|
+
let C = g == null ? void 0 : g.split(":"), $ = C != null && C[0] ? (C == null ? void 0 : C[1].split("$").length) - 1 === 1 ? ((x = C == null ? void 0 : C[0]) == null ? void 0 : x.replace(/^"(.*)"$/, "$1")) + ((d = C == null ? void 0 : C[1]) == null ? void 0 : d.replace(/^"(.*)"$/, "$1")) : Array.isArray((o = (P = C == null ? void 0 : C[1]) == null ? void 0 : P.replace(/^"(.*)"$/, "$1")) == null ? void 0 : o.split("(")) && ((b = (f = (r = C == null ? void 0 : C[1]) == null ? void 0 : r.replace(/^"(.*)"$/, "$1")) == null ? void 0 : f.split("(")) == null ? void 0 : b.length) > 1 ? ((p = C == null ? void 0 : C[0]) == null ? void 0 : p.replace(/^"(.*)"$/, "$1")) + ((O = (y = (c = C == null ? void 0 : C[1]) == null ? void 0 : c.replace(/^"(.*)"$/, "$1")) == null ? void 0 : y.split("(")) == null ? void 0 : O[0]) + "()" : (E = C == null ? void 0 : C[0]) == null ? void 0 : E.replace(/^"(.*)"$/, "$1") : "", _ = (C == null ? void 0 : C[1].split("$").length) - 1 === 0 ? (N = C == null ? void 0 : C[1]) == null ? void 0 : N.replace(/^"(.*)"$/, "$1") : "";
|
|
1143
|
+
ne.value++, t.push({
|
|
1144
|
+
id: ne.value,
|
|
1145
|
+
key: $,
|
|
1146
|
+
value: _,
|
|
1147
|
+
// 如果值为空,则key设为空字符串,否则保留原值
|
|
1148
|
+
width: s,
|
|
1149
|
+
extraContent: C == null ? void 0 : C[1]
|
|
1150
|
+
});
|
|
1151
|
+
});
|
|
1152
|
+
}), t;
|
|
1153
|
+
}, Xe = (e) => {
|
|
1154
|
+
var t, n;
|
|
1155
|
+
try {
|
|
1156
|
+
const l = e.replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",").replace(/:/g, ":").replace(/:\s*(?=,|}|$)/g, ': ""');
|
|
1157
|
+
if (u(l).split("{").length - 1 > 1) {
|
|
1158
|
+
let s = u(l).replace(/^\{(.*)\}$/, "[$1]");
|
|
1159
|
+
if (fe(s) && !s.includes("$") || (s = s.replace(/"([^"]+)"\$([\w\u4e00-\u9fa5]+\([^)]*\))/g, '"$1$$$2"')), fe(s)) {
|
|
1160
|
+
const a = JSON.parse(s);
|
|
1161
|
+
let i = [];
|
|
1162
|
+
return a == null || a.forEach((h) => {
|
|
1163
|
+
var k;
|
|
1164
|
+
(k = Object.entries(u(h))) == null || k.forEach((g) => {
|
|
1165
|
+
ne.value++, i.push({
|
|
1166
|
+
id: ne.value,
|
|
1167
|
+
key: (g == null ? void 0 : g[0]) ?? "",
|
|
1168
|
+
value: (g == null ? void 0 : g[1]) === "" ? "" : g == null ? void 0 : g[1],
|
|
1169
|
+
// 如果值为空,则key设为空字符串,否则保留原值
|
|
1170
|
+
width: Object.keys(u(h)).length
|
|
1171
|
+
});
|
|
1172
|
+
});
|
|
1173
|
+
}), i;
|
|
1174
|
+
} else
|
|
1175
|
+
return l.trim().startsWith("{{") ? Sn(l.trim()) : ke(s);
|
|
1176
|
+
} else if (fe(l)) {
|
|
1177
|
+
const s = JSON.parse(l);
|
|
1178
|
+
return Object.entries(s).map(([a, i]) => (ne.value++, {
|
|
1179
|
+
id: ne.value,
|
|
1180
|
+
key: a,
|
|
1181
|
+
value: i === "" ? "" : i,
|
|
1182
|
+
// 如果值为空,则key设为空字符串,否则保留原值
|
|
1183
|
+
width: 1
|
|
1184
|
+
}));
|
|
1185
|
+
} else
|
|
1186
|
+
return ((t = ke(l)) == null ? void 0 : t.length) === 0 ? l : (n = ke(l)) == null ? void 0 : n.map((s) => ({
|
|
1187
|
+
label: s.label,
|
|
1188
|
+
method: Dn(s.method)
|
|
1189
|
+
}));
|
|
1190
|
+
} catch (l) {
|
|
1191
|
+
return console.error("转换失败:", l), [];
|
|
1192
|
+
}
|
|
1193
|
+
}, ke = (e) => {
|
|
1194
|
+
e = e.trim().replace(/^\{|\}$/g, "").trim();
|
|
1195
|
+
const t = [];
|
|
1196
|
+
let n = 0;
|
|
1197
|
+
for (; n < e.length; ) {
|
|
1198
|
+
const l = e.slice(n).match(/^\s*"([^"]+)"\s*:\s*/);
|
|
1199
|
+
if (!l) break;
|
|
1200
|
+
const s = l[1];
|
|
1201
|
+
n += l[0].length;
|
|
1202
|
+
let a = "", i = 0, h = !1, k = "";
|
|
1203
|
+
for (let g = n; g < e.length; g++) {
|
|
1204
|
+
const C = e[g];
|
|
1205
|
+
if ((C === '"' || C === "'") && !h ? (h = !0, k = C) : C === k && h && (h = !1, k = ""), !h && ((C === "{" || C === "(" || C === "[") && i++, (C === "}" || C === ")" || C === "]") && i--, C === "," && i === 0 || g === e.length - 1)) {
|
|
1206
|
+
a = e.slice(n, g + 1).trim(), n = g + 1;
|
|
1207
|
+
break;
|
|
1208
|
+
}
|
|
1209
|
+
}
|
|
1210
|
+
t.push({
|
|
1211
|
+
label: s,
|
|
1212
|
+
method: a
|
|
1213
|
+
});
|
|
1214
|
+
}
|
|
1215
|
+
return t;
|
|
1216
|
+
}, Pn = (e, t) => {
|
|
1217
|
+
try {
|
|
1218
|
+
if (R != null && R.find((n) => (n == null ? void 0 : n.key) === t))
|
|
1219
|
+
return e.replace(/['"]/g, "").trim();
|
|
1220
|
+
if (u(e).split("[").length - 1 > 1) {
|
|
1221
|
+
const n = u(e).replace(/[’]|[‘]|[']/g, '"').replaceAll(/,/g, ",").replaceAll("(", "[").replaceAll(")", "]").replaceAll("],]", "]]");
|
|
1222
|
+
return JSON.parse(n);
|
|
1223
|
+
} else {
|
|
1224
|
+
const n = u(e).replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",");
|
|
1225
|
+
if (fe(n)) {
|
|
1226
|
+
const l = JSON.parse(n);
|
|
1227
|
+
return Array.isArray(l) ? l.map((s) => ({ label: s })) : l;
|
|
1228
|
+
} else
|
|
1229
|
+
return Xe(u(e));
|
|
1230
|
+
}
|
|
1231
|
+
} catch (n) {
|
|
1232
|
+
return console.error("解析失败:", n), e;
|
|
1233
|
+
}
|
|
1234
|
+
}, jn = (e) => ({ [e == null ? void 0 : e.key]: Pn(e == null ? void 0 : e.value, e == null ? void 0 : e.key) }), Bn = (e) => {
|
|
1235
|
+
try {
|
|
1236
|
+
if (u(e).split("[").length - 1 > 1) {
|
|
1237
|
+
const t = u(e).replace(/[’]|[‘]|[']/g, '"').replaceAll(/,/g, ",").replaceAll("(", "[").replaceAll(")", "]").replaceAll("],]", "]]");
|
|
1238
|
+
return JSON.parse(t);
|
|
1239
|
+
} else
|
|
1240
|
+
return JSON.parse(u(e).replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",")).map((n) => ({ label: n }));
|
|
1241
|
+
} catch (t) {
|
|
1242
|
+
return console.error("解析失败:", t), e;
|
|
1243
|
+
}
|
|
1244
|
+
}, Fn = (e) => {
|
|
1245
|
+
const t = e.match(/\(([^)]+)\)/);
|
|
1246
|
+
return t ? t[1] : "";
|
|
1247
|
+
}, Un = (e) => {
|
|
1248
|
+
const t = e.match(/^([^(]+)\s*\(/);
|
|
1249
|
+
return t ? t[1].trim() : e;
|
|
1250
|
+
}, Ge = (e) => e.replace(/'/g, "").replace(/"/g, "").replace(/{|}/g, "").split(":").map((t) => t.trim()).filter((t) => t).join("/"), Jn = (e) => {
|
|
1251
|
+
var i, h;
|
|
1252
|
+
let t = [], n = [];
|
|
1253
|
+
const l = (i = u(e)) == null ? void 0 : i.map((k) => k == null ? void 0 : k.key), s = [...new Set((h = u(l)) == null ? void 0 : h.map((k) => Fn(k)))];
|
|
1254
|
+
s == null || s.forEach((k) => {
|
|
1255
|
+
let g = e == null ? void 0 : e.filter((_) => _.key.includes(k));
|
|
1256
|
+
g == null || g.forEach((_) => {
|
|
1257
|
+
_ != null && _.key.includes("Menus") && (t.push({
|
|
1258
|
+
key: "GroupName",
|
|
1259
|
+
value: Ge(_ == null ? void 0 : _.value)
|
|
1260
|
+
}), n.push(Ge(_ == null ? void 0 : _.value)));
|
|
1261
|
+
});
|
|
1262
|
+
let C = e == null ? void 0 : e.filter((_) => _.key.includes(k) && !(_ != null && _.key.includes("Menus")));
|
|
1263
|
+
C = C == null ? void 0 : C.map((_) => (_.key = Un(_.key), _));
|
|
1264
|
+
const $ = {
|
|
1265
|
+
key: "GroupContents",
|
|
1266
|
+
value: C
|
|
1267
|
+
};
|
|
1268
|
+
t.push($);
|
|
1269
|
+
});
|
|
1270
|
+
const a = {
|
|
1271
|
+
key: "Menus",
|
|
1272
|
+
value: n
|
|
1273
|
+
};
|
|
1274
|
+
return t.unshift(a), t;
|
|
1275
|
+
}, Ye = (e) => {
|
|
1276
|
+
var t, n;
|
|
1277
|
+
if (Array.isArray(Object.keys(e)) && ((t = Object.keys(e)) == null ? void 0 : t.length) > 0) {
|
|
1278
|
+
let l = [];
|
|
1279
|
+
return (n = Object.entries(e)) == null || n.forEach(([s, a]) => {
|
|
1280
|
+
var h, k;
|
|
1281
|
+
let i = [];
|
|
1282
|
+
if (i.push(s), ((h = Object.keys(a)) == null ? void 0 : h.length) > 0) {
|
|
1283
|
+
let g = [];
|
|
1284
|
+
(k = Ye(a)) == null || k.forEach((C) => {
|
|
1285
|
+
g.push(C);
|
|
1286
|
+
}), g == null || g.forEach((C) => {
|
|
1287
|
+
i.push(C);
|
|
1288
|
+
});
|
|
1289
|
+
}
|
|
1290
|
+
l.push(i);
|
|
1291
|
+
}), l;
|
|
1292
|
+
}
|
|
1293
|
+
}, Rn = (e, t) => {
|
|
1294
|
+
var l;
|
|
1295
|
+
let n = t;
|
|
1296
|
+
return Array.isArray(Object.keys(e)) && ((l = Object.entries(e)) == null || l.forEach(([s, a]) => {
|
|
1297
|
+
let i = [s];
|
|
1298
|
+
if (typeof a == "object" && a !== null) {
|
|
1299
|
+
let h = Ye(a);
|
|
1300
|
+
h == null || h.forEach((k) => {
|
|
1301
|
+
i.push(k);
|
|
1302
|
+
});
|
|
1303
|
+
}
|
|
1304
|
+
n.push(i);
|
|
1305
|
+
})), n;
|
|
1306
|
+
}, Ln = (e) => {
|
|
1307
|
+
const t = {};
|
|
1308
|
+
return e.forEach((l) => {
|
|
1309
|
+
const s = l.split("/");
|
|
1310
|
+
let a = t;
|
|
1311
|
+
s.forEach((i) => {
|
|
1312
|
+
a[i] || (a[i] = {}), a = a[i];
|
|
1313
|
+
});
|
|
1314
|
+
}), Rn(t, []);
|
|
1315
|
+
}, Ke = (e) => Ln(e), vt = (e) => {
|
|
1316
|
+
var t, n, l, s, a, i, h, k;
|
|
1317
|
+
try {
|
|
1318
|
+
const g = xe((n = (t = u(e)) == null ? void 0 : t.replace("(", "(")) == null ? void 0 : n.replace(")", ")")), C = (s = (l = u(g)) == null ? void 0 : l.filter((d) => !d.includes("/*"))) == null ? void 0 : s.map((d) => En(d)), $ = Jn(C), _ = [];
|
|
1319
|
+
if (((a = $ == null ? void 0 : $.find((d) => (d == null ? void 0 : d.key) === "Menus")) == null ? void 0 : a.value.length) === 0)
|
|
1320
|
+
return !1;
|
|
1321
|
+
(i = u($)) == null || i.forEach((d) => {
|
|
1322
|
+
var P, o, r, f, b;
|
|
1323
|
+
R != null && R.find((p) => {
|
|
1324
|
+
var c, y;
|
|
1325
|
+
return ((c = p == null ? void 0 : p.key) == null ? void 0 : c.toUpperCase()) === ((y = d == null ? void 0 : d.key) == null ? void 0 : y.toUpperCase());
|
|
1326
|
+
}) ? _.push({
|
|
1327
|
+
comp: ((P = R == null ? void 0 : R.find((p) => {
|
|
1328
|
+
var c, y;
|
|
1329
|
+
return ((c = p == null ? void 0 : p.key) == null ? void 0 : c.toUpperCase()) === ((y = d == null ? void 0 : d.key) == null ? void 0 : y.toUpperCase());
|
|
1330
|
+
})) == null ? void 0 : P.value) ?? "",
|
|
1331
|
+
name: (o = d == null ? void 0 : d.value) == null ? void 0 : o.replace(/[’]|[‘]|[']/g, ""),
|
|
1332
|
+
compData: []
|
|
1333
|
+
}) : J != null && J.find((p) => {
|
|
1334
|
+
var c, y;
|
|
1335
|
+
return ((c = p == null ? void 0 : p.key) == null ? void 0 : c.toUpperCase()) === ((y = d == null ? void 0 : d.key) == null ? void 0 : y.toUpperCase());
|
|
1336
|
+
}) && ((_ == null ? void 0 : _.length) === 0 && (r = d.key) != null && r.includes("Menus") && _.push({
|
|
1337
|
+
comp: "Menu",
|
|
1338
|
+
name: "",
|
|
1339
|
+
compData: []
|
|
1340
|
+
}), (f = _ == null ? void 0 : _[(_ == null ? void 0 : _.length) - 1]) != null && f.compData && _[(_ == null ? void 0 : _.length) - 1].compData.push({
|
|
1341
|
+
key: (b = J == null ? void 0 : J.find((p) => {
|
|
1342
|
+
var c, y;
|
|
1343
|
+
return ((c = p == null ? void 0 : p.key) == null ? void 0 : c.toUpperCase()) === ((y = d == null ? void 0 : d.key) == null ? void 0 : y.toUpperCase());
|
|
1344
|
+
})) == null ? void 0 : b.value,
|
|
1345
|
+
contents: d == null ? void 0 : d.value
|
|
1346
|
+
}));
|
|
1347
|
+
});
|
|
1348
|
+
let x = (h = u(_)) == null ? void 0 : h.map((d) => {
|
|
1349
|
+
var P;
|
|
1350
|
+
return d != null && d.compData && (d.compData = (P = d == null ? void 0 : d.compData) == null ? void 0 : P.map((o) => {
|
|
1351
|
+
var r, f, b, p, c, y, O, E, N, A, D;
|
|
1352
|
+
if ((o == null ? void 0 : o.key) === "formFlex")
|
|
1353
|
+
o.contents = ((f = (r = o.contents) == null ? void 0 : r.replace(/[’]|[‘]|[']/g, "")) == null ? void 0 : f.toUpperCase()) !== "Vertical".toUpperCase();
|
|
1354
|
+
else if ((o == null ? void 0 : o.key) === "groupContents")
|
|
1355
|
+
o.contents = (b = u(o.contents)) == null ? void 0 : b.map((v) => jn(u(v)));
|
|
1356
|
+
else if (Array.isArray(o == null ? void 0 : o.contents))
|
|
1357
|
+
o.contents = Ke(o.contents);
|
|
1358
|
+
else if (((c = (p = o == null ? void 0 : o.contents) == null ? void 0 : p.trim()) != null && c.startsWith("[") || (O = (y = o.contents) == null ? void 0 : y.trim()) != null && O.startsWith("【")) && ((N = (E = o.contents) == null ? void 0 : E.trim()) != null && N.endsWith("]") || (D = (A = o.contents) == null ? void 0 : A.trim()) != null && D.endsWith("】")))
|
|
1359
|
+
o.contents = Bn(u(o.contents));
|
|
1360
|
+
else {
|
|
1361
|
+
if (!o.contents) return;
|
|
1362
|
+
o.contents = Xe(u(o.contents));
|
|
1363
|
+
}
|
|
1364
|
+
return o;
|
|
1365
|
+
})), d;
|
|
1366
|
+
});
|
|
1367
|
+
return x = (k = u(x)) == null ? void 0 : k.map((d) => {
|
|
1368
|
+
var P;
|
|
1369
|
+
return (d == null ? void 0 : d.comp) === "Group" && (d.compData = (P = d.compData) == null ? void 0 : P.map((o) => {
|
|
1370
|
+
var f;
|
|
1371
|
+
let r = [];
|
|
1372
|
+
return (f = o.contents) == null || f.forEach((b) => {
|
|
1373
|
+
var p, c, y, O, E, N, A, D, v, T, j, B;
|
|
1374
|
+
if (R != null && R.find((S) => {
|
|
1375
|
+
var m, F, L;
|
|
1376
|
+
return ((m = S == null ? void 0 : S.key) == null ? void 0 : m.toUpperCase()) === ((L = (F = Object.keys(b)) == null ? void 0 : F[0]) == null ? void 0 : L.toUpperCase());
|
|
1377
|
+
}))
|
|
1378
|
+
r.push({
|
|
1379
|
+
comp: (p = R == null ? void 0 : R.find((S) => {
|
|
1380
|
+
var m, F, L;
|
|
1381
|
+
return ((m = S == null ? void 0 : S.key) == null ? void 0 : m.toUpperCase()) === ((L = (F = Object.keys(b)) == null ? void 0 : F[0]) == null ? void 0 : L.toUpperCase());
|
|
1382
|
+
})) == null ? void 0 : p.value,
|
|
1383
|
+
name: (y = (c = Object.values(b)) == null ? void 0 : c[0]) == null ? void 0 : y.replace(/[’]|[‘]|[']/g, ""),
|
|
1384
|
+
compData: []
|
|
1385
|
+
});
|
|
1386
|
+
else if (J != null && J.find((S) => {
|
|
1387
|
+
var m, F, L;
|
|
1388
|
+
return ((m = S == null ? void 0 : S.key) == null ? void 0 : m.toUpperCase()) === ((L = (F = Object.keys(b)) == null ? void 0 : F[0]) == null ? void 0 : L.toUpperCase());
|
|
1389
|
+
})) {
|
|
1390
|
+
if ((r == null ? void 0 : r.length) === 0) return;
|
|
1391
|
+
(O = r == null ? void 0 : r[(r == null ? void 0 : r.length) - 1]) != null && O.compData && r[(r == null ? void 0 : r.length) - 1].compData.push({
|
|
1392
|
+
key: (E = J == null ? void 0 : J.find((S) => {
|
|
1393
|
+
var m, F, L;
|
|
1394
|
+
return ((m = S == null ? void 0 : S.key) == null ? void 0 : m.toUpperCase()) === ((L = (F = Object.keys(b)) == null ? void 0 : F[0]) == null ? void 0 : L.toUpperCase());
|
|
1395
|
+
})) == null ? void 0 : E.value,
|
|
1396
|
+
contents: (N = Object.values(b)) == null ? void 0 : N[0]
|
|
1397
|
+
});
|
|
1398
|
+
} else if ((D = (A = Object.keys(b)) == null ? void 0 : A[0]) != null && D.includes("$")) {
|
|
1399
|
+
const S = (T = (v = Object.keys(u(b))) == null ? void 0 : v[0]) == null ? void 0 : T.split("$");
|
|
1400
|
+
r[(r == null ? void 0 : r.length) - 1].compData.push({
|
|
1401
|
+
key: (j = J == null ? void 0 : J.find((m) => {
|
|
1402
|
+
var F, L;
|
|
1403
|
+
return ((F = m == null ? void 0 : m.key) == null ? void 0 : F.toUpperCase()) === ((L = S == null ? void 0 : S[0]) == null ? void 0 : L.toUpperCase());
|
|
1404
|
+
})) == null ? void 0 : j.value,
|
|
1405
|
+
contents: (B = Object.values(b)) == null ? void 0 : B[0],
|
|
1406
|
+
selectLabel: S == null ? void 0 : S[1]
|
|
1407
|
+
});
|
|
1408
|
+
}
|
|
1409
|
+
return b;
|
|
1410
|
+
}), o.contents = r, o;
|
|
1411
|
+
})), d;
|
|
1412
|
+
}), x;
|
|
1413
|
+
} catch {
|
|
1414
|
+
return !1;
|
|
1415
|
+
}
|
|
1416
|
+
}, Q = (e) => {
|
|
1417
|
+
try {
|
|
1418
|
+
return JSON.parse(e), !0;
|
|
1419
|
+
} catch {
|
|
1420
|
+
return !1;
|
|
1421
|
+
}
|
|
1422
|
+
}, Et = (e, t) => Xl(e, t), Ve = (e) => {
|
|
1423
|
+
const t = [];
|
|
1424
|
+
let n = null;
|
|
1425
|
+
for (let l = 0; l < e.length; l++) {
|
|
1426
|
+
const s = e[l];
|
|
1427
|
+
if (Array.isArray(s))
|
|
1428
|
+
n && (n.children = Ve(s));
|
|
1429
|
+
else {
|
|
1430
|
+
const a = { label: s };
|
|
1431
|
+
t.push(a), n = a;
|
|
1432
|
+
}
|
|
1433
|
+
}
|
|
1434
|
+
return t;
|
|
1435
|
+
}, el = (e) => {
|
|
1436
|
+
let t = 0;
|
|
1437
|
+
for (const n of e)
|
|
1438
|
+
t++, n.children && (t += el(n.children));
|
|
1439
|
+
return t;
|
|
1440
|
+
}, ll = (e, t, n = []) => {
|
|
1441
|
+
let l = 0;
|
|
1442
|
+
for (const s of t) {
|
|
1443
|
+
if (l >= e.length) break;
|
|
1444
|
+
const a = [...e[l]];
|
|
1445
|
+
if (n.push(a), l++, s.children && s.children.length > 0) {
|
|
1446
|
+
const i = [];
|
|
1447
|
+
ll(
|
|
1448
|
+
e.slice(l),
|
|
1449
|
+
s.children,
|
|
1450
|
+
i
|
|
1451
|
+
), i.length > 0 && (a.push(i), l += el(s.children));
|
|
1452
|
+
}
|
|
1453
|
+
}
|
|
1454
|
+
return n;
|
|
1455
|
+
}, wn = (e, t) => {
|
|
1456
|
+
let n = [];
|
|
1457
|
+
return e == null || e.forEach((s) => {
|
|
1458
|
+
s.some((a) => Array.isArray(a)) ? n.push(...s) : n.push(s);
|
|
1459
|
+
}), ll(n, t);
|
|
1460
|
+
}, Ae = (e) => {
|
|
1461
|
+
const t = { label: e[0].trim() };
|
|
1462
|
+
if (e.length > 1) {
|
|
1463
|
+
const n = e.slice(1);
|
|
1464
|
+
n.length === 1 && Array.isArray(n[0]) ? t.children = n[0].map(
|
|
1465
|
+
(l) => Array.isArray(l) ? Ae(l) : { label: l.trim() }
|
|
1466
|
+
) : t.children = n.map(
|
|
1467
|
+
(l) => Array.isArray(l) ? Ae(l) : { label: l.trim() }
|
|
1468
|
+
);
|
|
1469
|
+
}
|
|
1470
|
+
return t;
|
|
1471
|
+
}, Me = (e) => {
|
|
1472
|
+
let t = e.replace(/:([^{}\[\],\s]+)([,\]}])/g, ':"$1"$2');
|
|
1473
|
+
return t = t.replace(/:}(?=,|]|}|$)/g, ':""}'), t = t.replace(/:,(?=\s*")/g, ':"",'), t = t.replace(
|
|
1474
|
+
/(https?|HTTPS?):"\/\/([^"]+)"/gi,
|
|
1475
|
+
(n, l, s) => `"${l}://${s}"`
|
|
1476
|
+
), t = t.replace(
|
|
1477
|
+
/(\[|\s|,)((?:https?|HTTPS?):\/\/[^\s,\]]+)(\]|,|$)/gi,
|
|
1478
|
+
'$1"$2"$3'
|
|
1479
|
+
), t;
|
|
1480
|
+
}, Gn = (e) => {
|
|
1481
|
+
var n;
|
|
1482
|
+
return e.some((l) => !Array.isArray(l)) ? e : (n = u(e)) == null ? void 0 : n.map((l) => {
|
|
1483
|
+
let s = [];
|
|
1484
|
+
return l.some((a) => Array.isArray(a)) ? l == null || l.forEach((a) => {
|
|
1485
|
+
Array.isArray(a) && s.push(Ae(a));
|
|
1486
|
+
}) : l.some((a) => a.includes("[")) ? s.push(l) : s = l.map((a) => ({ label: a.trim() })), s;
|
|
1487
|
+
});
|
|
1488
|
+
}, nl = (e, t, n) => {
|
|
1489
|
+
let l = e, s = n, a = t;
|
|
1490
|
+
return a.children && (Array.isArray(s[s.length - 1]) ? s[s.length - 1].push(l[0]) : s.push(l[0]), l.shift(), a = a.children), Array.isArray(a) && a.forEach((i) => {
|
|
1491
|
+
if (i.children) {
|
|
1492
|
+
const h = nl(l, i, s);
|
|
1493
|
+
s = h[0], l = h[1];
|
|
1494
|
+
}
|
|
1495
|
+
}), [s, l];
|
|
1496
|
+
}, Mn = (e, t) => {
|
|
1497
|
+
let n = e, l = [];
|
|
1498
|
+
return t.length > 0 ? t == null || t.forEach((s) => {
|
|
1499
|
+
let a = n == null ? void 0 : n[0];
|
|
1500
|
+
n.shift();
|
|
1501
|
+
const i = nl(u(n), s, a);
|
|
1502
|
+
a = i[0], n = i[1], l.push(a);
|
|
1503
|
+
}) : l = n, l;
|
|
1504
|
+
}, _e = (e, t) => {
|
|
1505
|
+
const n = Gn(u(e));
|
|
1506
|
+
return Mn(n, t);
|
|
1507
|
+
}, Wn = (e) => {
|
|
1508
|
+
const t = [];
|
|
1509
|
+
let n = 0;
|
|
1510
|
+
const l = e.length;
|
|
1511
|
+
for (; n < l; ) {
|
|
1512
|
+
const s = e[n];
|
|
1513
|
+
s.key === "tableColumns" && n + 1 < l && e[n + 1].key === "tableContents" ? (t.push({
|
|
1514
|
+
comp: "Table",
|
|
1515
|
+
compData: [s, e[n + 1]],
|
|
1516
|
+
name: ""
|
|
1517
|
+
}), n += 2) : (t.push(s), n += 1);
|
|
1518
|
+
}
|
|
1519
|
+
return t;
|
|
1520
|
+
}, tl = (e) => _e([e], []), We = (e) => {
|
|
1521
|
+
let t = Wn(e);
|
|
1522
|
+
return t = t == null ? void 0 : t.map((n) => {
|
|
1523
|
+
var l, s;
|
|
1524
|
+
return n.comp === "Table" ? (l = n.compData) != null && l.find((a) => (a == null ? void 0 : a.key) === "header") || (n.compData = (s = n.compData) == null ? void 0 : s.map((a) => (a.key === "tableColumns" ? a = {
|
|
1525
|
+
key: "header",
|
|
1526
|
+
contents: _e(a.value, [])
|
|
1527
|
+
} : a = {
|
|
1528
|
+
key: a.key,
|
|
1529
|
+
contents: a.value
|
|
1530
|
+
}, a)), n.compData.push({
|
|
1531
|
+
key: "extraButton",
|
|
1532
|
+
contents: [{ label: "新增" }]
|
|
1533
|
+
}), n.compData.push({
|
|
1534
|
+
key: "rowButton",
|
|
1535
|
+
contents: [{ label: "查看" }, { label: "编辑" }, { label: "删除" }]
|
|
1536
|
+
})) : n.key === "form" && (n = {
|
|
1537
|
+
comp: "Form",
|
|
1538
|
+
compData: [],
|
|
1539
|
+
name: ""
|
|
1540
|
+
}), n;
|
|
1541
|
+
}), t;
|
|
1542
|
+
}, Hn = (e, t) => {
|
|
1543
|
+
var h, k, g, C, $, _;
|
|
1544
|
+
const n = [], l = Ve((k = (h = e == null ? void 0 : e.find((x) => x.key === "tableIndex")) == null ? void 0 : h.value) == null ? void 0 : k[0]);
|
|
1545
|
+
n.push({
|
|
1546
|
+
key: "tableIndexColumn",
|
|
1547
|
+
contents: t
|
|
1548
|
+
}), n.push({
|
|
1549
|
+
key: "tableIndex",
|
|
1550
|
+
contents: l
|
|
1551
|
+
});
|
|
1552
|
+
let s = [];
|
|
1553
|
+
const a = (g = e == null ? void 0 : e.find((x) => x.key === "tableColumns")) == null ? void 0 : g.value;
|
|
1554
|
+
a.length === 1 && !(a != null && a[0].some((x) => Array.isArray(x))) ? s = (C = a == null ? void 0 : a[0]) == null ? void 0 : C.map((x) => ({ label: x })) : s = _e(($ = e == null ? void 0 : e.find((x) => x.key === "tableColumns")) == null ? void 0 : $.value, l), n.push({
|
|
1555
|
+
key: "header",
|
|
1556
|
+
contents: s
|
|
1557
|
+
});
|
|
1558
|
+
const i = wn((_ = e == null ? void 0 : e.find((x) => x.key === "tableContents")) == null ? void 0 : _.value, l);
|
|
1559
|
+
return n.push({
|
|
1560
|
+
key: "tableContents",
|
|
1561
|
+
contents: i
|
|
1562
|
+
}), n.push({
|
|
1563
|
+
key: "extraButton",
|
|
1564
|
+
contents: [{ label: "新增" }]
|
|
1565
|
+
}), n.push({
|
|
1566
|
+
key: "rowButton",
|
|
1567
|
+
contents: [{ label: "查看" }, { label: "编辑" }, { label: "删除" }]
|
|
1568
|
+
}), n;
|
|
1569
|
+
}, sl = (e) => e.replace(/"([^"]+)"\s*==\s*(\[[^\]]+\])/g, (t, n, l) => {
|
|
1570
|
+
const s = sl(l);
|
|
1571
|
+
return `"${n}",${s}`;
|
|
1572
|
+
}), pe = (e) => {
|
|
1573
|
+
const t = e.replace(/"([^"]+)"\s*==\s*(\[[^\]]+\])/g, '"$1",$2');
|
|
1574
|
+
return sl(t).replace(/^"(.*)"$/, "$1");
|
|
1575
|
+
}, Zn = (e) => {
|
|
1576
|
+
const t = /* @__PURE__ */ new Set();
|
|
1577
|
+
return e.filter((n) => {
|
|
1578
|
+
const l = JSON.stringify(n);
|
|
1579
|
+
return t.has(l) ? !1 : t.add(l);
|
|
1580
|
+
});
|
|
1581
|
+
}, He = (e) => {
|
|
1582
|
+
var n;
|
|
1583
|
+
let t = [];
|
|
1584
|
+
return (n = u(e)) == null || n.forEach((l) => {
|
|
1585
|
+
var s;
|
|
1586
|
+
(s = l.contents) == null || s.forEach((a) => {
|
|
1587
|
+
t.push(a);
|
|
1588
|
+
});
|
|
1589
|
+
}), t = Zn(t), t.push({
|
|
1590
|
+
label: "操作"
|
|
1591
|
+
}), [t];
|
|
1592
|
+
}, In = (e, t) => e.reduce((n, l, s) => {
|
|
1593
|
+
const a = Math.floor(s / t);
|
|
1594
|
+
return n[a] || (n[a] = []), n[a].push(l), n;
|
|
1595
|
+
}, []), al = (e) => e.reduce((t, n) => n.children && n.children.length > 0 ? t + al(n.children) : t + 1, 0), qn = (e, t) => {
|
|
1596
|
+
var l;
|
|
1597
|
+
let n = [];
|
|
1598
|
+
return (l = In(e, al(t == null ? void 0 : t[0]) - 1)) == null || l.forEach((s) => {
|
|
1599
|
+
let a = [];
|
|
1600
|
+
s.forEach((i) => {
|
|
1601
|
+
var h;
|
|
1602
|
+
Array.isArray(i.contents) ? (h = i.contents) == null || h.forEach((k) => {
|
|
1603
|
+
a.push(k);
|
|
1604
|
+
}) : a.push(i.contents);
|
|
1605
|
+
}), n.push(a);
|
|
1606
|
+
}), [n];
|
|
1607
|
+
}, zn = ["方法体", "输入", "输出"], Ze = U(1), xe = (e) => {
|
|
1608
|
+
let t;
|
|
1609
|
+
e.replaceAll(" ", `\r
|
|
1610
|
+
`).includes(`\r
|
|
1611
|
+
`) ? t = e.replaceAll(" ", `\r
|
|
1612
|
+
`).split(`\r
|
|
1613
|
+
`).filter((s) => s.trim() !== "") : t = e.replaceAll(" ", `\r
|
|
1614
|
+
`).split(`
|
|
1615
|
+
`).filter((s) => s.trim() !== "");
|
|
1616
|
+
const n = [];
|
|
1617
|
+
let l = "";
|
|
1618
|
+
for (const s of t)
|
|
1619
|
+
s.includes("{") || l.includes("{") || s.includes("[") || l.includes("[") || s.includes("【") || l.includes("【") || s.includes("(") || l.includes("(") || s.includes("(") || l.includes("(") || s.includes("/*") || l.includes("/*") ? (l += s.trim(), u(l).split("{").length - 1 === u(l).split("}").length - 1 && u(l).split("【").length - 1 === u(l).split("】").length - 1 && u(l).split("[").length - 1 === u(l).split("]").length - 1 && u(l).split("(").length - 1 === u(l).split(")").length - 1 && u(l).split("(").length - 1 === u(l).split(")").length - 1 && u(l).split("/*").length - 1 === u(l).split("*/").length - 1 && l[l.length - 1] !== "," && (n.push(l.replace(/\/\*[\s\S]*?\*\//g, "")), l = "")) : n.push(s.trim().replace(/\/\*[\s\S]*?\*\//g, ""));
|
|
1620
|
+
return n;
|
|
1621
|
+
}, Qn = (e) => {
|
|
1622
|
+
const [t, n] = e.split(/=(.+)/), l = t.replace(/['"]/g, "").trim(), s = n.replace(/^['"]|['"]$/g, "");
|
|
1623
|
+
return { key: l, value: s };
|
|
1624
|
+
}, Te = (e) => {
|
|
1625
|
+
let t;
|
|
1626
|
+
e.includes(":") ? t = e.split(":").filter((s) => s.trim() !== "") : t = e.split(":").filter((s) => s.trim() !== "");
|
|
1627
|
+
const n = [];
|
|
1628
|
+
let l = "";
|
|
1629
|
+
for (const s of t)
|
|
1630
|
+
s.includes("{") || l.includes("{") || s.includes("[") || l.includes("[") || s.includes("【") || l.includes("【") || s.includes("(") || l.includes("(") || s.includes("(") || l.includes("(") || s.includes("/*") || l.includes("/*") ? (l = l !== "" ? l + ":" + s.trim() : s.trim(), u(l).split("{").length - 1 === u(l).split("}").length - 1 && u(l).split("【").length - 1 === u(l).split("】").length - 1 && u(l).split("[").length - 1 === u(l).split("]").length - 1 && u(l).split("(").length - 1 === u(l).split(")").length - 1 && u(l).split("(").length - 1 === u(l).split(")").length - 1 && u(l).split("/*").length - 1 === u(l).split("*/").length - 1 && (n.push(l.replace(/\/\*[\s\S]*?\*\//g, "")), l = "")) : n.push(s.trim().replace(/\/\*[\s\S]*?\*\//g, ""));
|
|
1631
|
+
return n;
|
|
1632
|
+
}, Xn = (e) => /^[\x00-\x7F]*$/.test(e), Yn = (e) => {
|
|
1633
|
+
var s;
|
|
1634
|
+
const t = e.map((a) => {
|
|
1635
|
+
var h, k;
|
|
1636
|
+
let i = (k = (h = a.key.split("(")) == null ? void 0 : h[1]) == null ? void 0 : k.trim();
|
|
1637
|
+
return i.slice(0, i.length - 1);
|
|
1638
|
+
}), n = t == null ? void 0 : t.map((a) => {
|
|
1639
|
+
var h;
|
|
1640
|
+
return (h = Te(a)) == null ? void 0 : h.map((k) => {
|
|
1641
|
+
var g;
|
|
1642
|
+
if (k.includes("{")) {
|
|
1643
|
+
let C = (g = k.split(":")) == null ? void 0 : g[0];
|
|
1644
|
+
k = C.slice(1, C.length);
|
|
1645
|
+
}
|
|
1646
|
+
return k;
|
|
1647
|
+
});
|
|
1648
|
+
}).filter((a) => a.length !== 0), l = (s = n == null ? void 0 : n.filter((a) => a.length !== 0)) == null ? void 0 : s.map((a) => {
|
|
1649
|
+
let i = "";
|
|
1650
|
+
return a.forEach((h) => {
|
|
1651
|
+
h.includes("{") || (i = i === "" ? i + u(h) : i + "/" + u(h));
|
|
1652
|
+
}), i;
|
|
1653
|
+
});
|
|
1654
|
+
return Ke([...new Set(l)]);
|
|
1655
|
+
}, rl = (e) => {
|
|
1656
|
+
var n, l;
|
|
1657
|
+
const t = (l = (n = e.split("(")) == null ? void 0 : n[1]) == null ? void 0 : l.trim();
|
|
1658
|
+
return t.slice(0, t.length - 1);
|
|
1659
|
+
}, Kn = (e) => {
|
|
1660
|
+
var s;
|
|
1661
|
+
if (!e) return;
|
|
1662
|
+
const t = rl(e), n = (s = Te(t)) == null ? void 0 : s.map((a) => {
|
|
1663
|
+
var i;
|
|
1664
|
+
if (a.includes("{")) {
|
|
1665
|
+
let h = (i = a.split(":")) == null ? void 0 : i[0];
|
|
1666
|
+
a = h.slice(1, h.length);
|
|
1667
|
+
}
|
|
1668
|
+
return a;
|
|
1669
|
+
});
|
|
1670
|
+
let l = "";
|
|
1671
|
+
return n.forEach((a) => {
|
|
1672
|
+
a.includes("{") || (l = l === "" ? l + u(a) : l + "/" + u(a));
|
|
1673
|
+
}), l;
|
|
1674
|
+
}, Vn = (e) => {
|
|
1675
|
+
const t = e.match(/\[(.*)\]/s);
|
|
1676
|
+
if (t) {
|
|
1677
|
+
const n = `[${t[1]}]`;
|
|
1678
|
+
try {
|
|
1679
|
+
const l = n.replace(/([^\[\],\s]+)/g, '"$1"');
|
|
1680
|
+
return JSON.parse(l);
|
|
1681
|
+
} catch (l) {
|
|
1682
|
+
console.error("解析失败:", l);
|
|
1683
|
+
}
|
|
1684
|
+
}
|
|
1685
|
+
}, et = (e) => {
|
|
1686
|
+
var a;
|
|
1687
|
+
if (!e) return;
|
|
1688
|
+
const t = rl(e);
|
|
1689
|
+
let n = [], l = [], s = [];
|
|
1690
|
+
return (a = Te(t)) == null || a.forEach((i) => {
|
|
1691
|
+
var h;
|
|
1692
|
+
i.includes("[") ? n.push(Vn(i)) : i.includes("{") && (Xn((h = i.slice(1, i.length - 1).split(":")) == null ? void 0 : h[0]) ? s.push(JSON.parse(i.replace(/([{,]\s*)([^:{\[\],\s]+)(\s*:\s*)/g, '$1"$2"$3').replace(/(:\s*)([^{}\[\]",\s]+)(\s*[,}])/g, '$1"$2"$3'))) : Q(i.replace(/([{,]\s*)([^:{\[\],\s]+)(\s*:\s*)/g, '$1"$2"$3').replace(/(:\s*)([^{}\[\]",\s]+)(\s*[,}])/g, '$1"$2"$3')) ? l.push(JSON.parse(i.replace(/([{,]\s*)([^:{\[\],\s]+)(\s*:\s*)/g, '$1"$2"$3').replace(/(:\s*)([^{}\[\]",\s]+)(\s*[,}])/g, '$1"$2"$3'))) : i.includes("$") || l.push(i.replace(/([{,]\s*)([^:{\[\],\s]+)(\s*:\s*)/g, '$1"$2"$3').replace(/(:\s*)([^{}\[\]",\s]+)(\s*[,}])/g, '$1"$2"$3')));
|
|
1693
|
+
}), [n, l, s];
|
|
1694
|
+
}, lt = (e) => {
|
|
1695
|
+
const t = [];
|
|
1696
|
+
let n = "";
|
|
1697
|
+
for (const l of e)
|
|
1698
|
+
l.includes("[") || n.includes("[") || l.includes("/*") || n.includes("/*") ? (n += l.trim(), u(n).split("{").length - 1 === u(n).split("}").length - 1 && u(n).split("【").length - 1 === u(n).split("】").length - 1 && u(n).split("[").length - 1 === u(n).split("]").length - 1 && u(n).split("(").length - 1 === u(n).split(")").length - 1 && u(n).split("(").length - 1 === u(n).split(")").length - 1 && u(n).split("/*").length - 1 === u(n).split("*/").length - 1 && (t.push(n.replace(/\/\*[\s\S]*?\*\//g, "")), n = "")) : t.push(l.trim().replace(/\/\*[\s\S]*?\*\//g, ""));
|
|
1699
|
+
return t;
|
|
1700
|
+
}, nt = (e) => {
|
|
1701
|
+
var a, i, h, k, g, C, $, _, x;
|
|
1702
|
+
let t = [], n = [], l = e.trim(), s = [];
|
|
1703
|
+
if (l.trim().includes("输入") && l.trim().includes("输出")) {
|
|
1704
|
+
let d = [], P = e.trim();
|
|
1705
|
+
P = u(P).slice(1, u(P).length - 1);
|
|
1706
|
+
const o = /(\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})*\})/g;
|
|
1707
|
+
(C = P.match(o)) == null || C.forEach((r, f) => {
|
|
1708
|
+
var c;
|
|
1709
|
+
const b = r;
|
|
1710
|
+
let p = [];
|
|
1711
|
+
(c = b.slice(1, b.length - 1).replace(":", "$:").split("$:")) == null || c.forEach((y) => {
|
|
1712
|
+
var O, E, N;
|
|
1713
|
+
if (zn.find((A) => y.includes(A)))
|
|
1714
|
+
if (!y.includes("=="))
|
|
1715
|
+
p.push({ key: "tableIndexColumn", contents: y.replaceAll("'", "") });
|
|
1716
|
+
else {
|
|
1717
|
+
let A = [];
|
|
1718
|
+
const D = y.replaceAll("'", "").split("==");
|
|
1719
|
+
A.push(D == null ? void 0 : D[0]), D != null && D[1].includes("[") ? A.push(D == null ? void 0 : D[1].trim().slice(1, (D == null ? void 0 : D[1].length) - 1).split(",")) : A.push([D == null ? void 0 : D[1]]), p.push({ key: "header", contents: [(E = (O = tl([A])) == null ? void 0 : O[0]) == null ? void 0 : E[0]] });
|
|
1720
|
+
}
|
|
1721
|
+
else {
|
|
1722
|
+
let A = y.trim().replaceAll(",", ",").replaceAll("'", '"');
|
|
1723
|
+
if (f % 3 === 0)
|
|
1724
|
+
A.slice(1, A.length - 1).includes("[") ? d.push({
|
|
1725
|
+
key: "tableIndex",
|
|
1726
|
+
contents: [{ label: A }]
|
|
1727
|
+
}) : d.push({
|
|
1728
|
+
key: "tableIndex",
|
|
1729
|
+
contents: [{ label: A.slice(1, A.length - 1) }]
|
|
1730
|
+
});
|
|
1731
|
+
else if ((A == null ? void 0 : A[0]) === "{") {
|
|
1732
|
+
let D = [];
|
|
1733
|
+
const v = A.slice(1, A.length - 1).split(":");
|
|
1734
|
+
if (v.every((T) => Q(T.trim()))) {
|
|
1735
|
+
D.push({ key: "tableContentName", contents: "详情" });
|
|
1736
|
+
let T = [];
|
|
1737
|
+
v.forEach((j, B) => {
|
|
1738
|
+
if (B === 0) {
|
|
1739
|
+
const S = JSON.parse(j).map((m) => ({ label: m }));
|
|
1740
|
+
S.push({
|
|
1741
|
+
label: "操作"
|
|
1742
|
+
}), T.push({
|
|
1743
|
+
key: "header",
|
|
1744
|
+
contents: S
|
|
1745
|
+
});
|
|
1746
|
+
} else
|
|
1747
|
+
T.push({
|
|
1748
|
+
key: "tableContents",
|
|
1749
|
+
contents: JSON.parse(j)
|
|
1750
|
+
});
|
|
1751
|
+
}), T.push({
|
|
1752
|
+
key: "extraButton",
|
|
1753
|
+
contents: [{ label: "新增" }]
|
|
1754
|
+
}), T.push({
|
|
1755
|
+
key: "rowButton",
|
|
1756
|
+
contents: [{ label: "查看" }, { label: "编辑" }, { label: "删除" }]
|
|
1757
|
+
}), D.push({
|
|
1758
|
+
comp: "Table",
|
|
1759
|
+
compData: T,
|
|
1760
|
+
name: ""
|
|
1761
|
+
}), d.push({
|
|
1762
|
+
key: "tableContents",
|
|
1763
|
+
contents: [D]
|
|
1764
|
+
});
|
|
1765
|
+
}
|
|
1766
|
+
} else {
|
|
1767
|
+
let D = A;
|
|
1768
|
+
D.slice(1, D.length - 1).includes("[") || D.slice(1, D.length - 1).includes("{") ? Q(Me(D.replace(/\s+/g, ""))) && ((N = JSON.parse(Me(D.replace(/\s+/g, "")))) == null || N.map((v) => {
|
|
1769
|
+
if (Array.isArray(v == null ? void 0 : v[0])) {
|
|
1770
|
+
const T = [];
|
|
1771
|
+
T.push({ key: "tableContentName", contents: "详情" });
|
|
1772
|
+
let j = [];
|
|
1773
|
+
v.forEach((B) => {
|
|
1774
|
+
B.forEach((S) => {
|
|
1775
|
+
var m, F;
|
|
1776
|
+
Ze.value++, j.push({
|
|
1777
|
+
id: Ze.value,
|
|
1778
|
+
key: (m = Object.keys(S)) == null ? void 0 : m[0],
|
|
1779
|
+
value: (F = Object.values(S)) == null ? void 0 : F[0],
|
|
1780
|
+
width: B.length
|
|
1781
|
+
});
|
|
1782
|
+
});
|
|
1783
|
+
}), T.push({
|
|
1784
|
+
comp: "Form",
|
|
1785
|
+
compData: [{
|
|
1786
|
+
key: "formFlex",
|
|
1787
|
+
contents: ""
|
|
1788
|
+
}, {
|
|
1789
|
+
key: "formContent",
|
|
1790
|
+
contents: j
|
|
1791
|
+
}],
|
|
1792
|
+
name: ""
|
|
1793
|
+
}), d.push({
|
|
1794
|
+
key: "tableContents",
|
|
1795
|
+
contents: [T]
|
|
1796
|
+
});
|
|
1797
|
+
} else
|
|
1798
|
+
d.push({
|
|
1799
|
+
key: "tableContents",
|
|
1800
|
+
contents: v == null ? void 0 : v[0]
|
|
1801
|
+
});
|
|
1802
|
+
})) : d.push({
|
|
1803
|
+
key: "tableContents",
|
|
1804
|
+
contents: D.trim().slice(1, D.length - 1)
|
|
1805
|
+
});
|
|
1806
|
+
}
|
|
1807
|
+
}
|
|
1808
|
+
}), d.push(p == null ? void 0 : p[0]);
|
|
1809
|
+
}), s.push({
|
|
1810
|
+
key: "tableIndex",
|
|
1811
|
+
contents: ($ = d == null ? void 0 : d.filter((r) => (r == null ? void 0 : r.key) === "tableIndex")) == null ? void 0 : $.map((r) => {
|
|
1812
|
+
var f;
|
|
1813
|
+
return (f = r.contents) == null ? void 0 : f[0];
|
|
1814
|
+
})
|
|
1815
|
+
}), s.push({
|
|
1816
|
+
key: "extraButton",
|
|
1817
|
+
contents: [{ label: "新增" }]
|
|
1818
|
+
}), s.push({
|
|
1819
|
+
key: "rowButton",
|
|
1820
|
+
contents: [{ label: "查看" }, { label: "编辑" }, { label: "删除" }]
|
|
1821
|
+
}), s.push({
|
|
1822
|
+
key: "tableIndexColumn",
|
|
1823
|
+
contents: (x = (_ = d == null ? void 0 : d.filter((r) => (r == null ? void 0 : r.key) === "tableIndexColumn")) == null ? void 0 : _[0]) == null ? void 0 : x.contents
|
|
1824
|
+
}), s.push({
|
|
1825
|
+
key: "header",
|
|
1826
|
+
contents: He(d == null ? void 0 : d.filter((r) => (r == null ? void 0 : r.key) === "header"))
|
|
1827
|
+
}), s.push({
|
|
1828
|
+
key: "tableContents",
|
|
1829
|
+
contents: qn(d == null ? void 0 : d.filter((r) => (r == null ? void 0 : r.key) === "tableContents"), He(d == null ? void 0 : d.filter((r) => (r == null ? void 0 : r.key) === "header")))
|
|
1830
|
+
});
|
|
1831
|
+
} else {
|
|
1832
|
+
const d = (a = l.trim().split(",$")) == null ? void 0 : a[0];
|
|
1833
|
+
d[0] === "[" ? l = d.slice(1, d.length - 1) : l.includes(",$") && (l = (i = l.trim().split(",$")) == null ? void 0 : i[0]);
|
|
1834
|
+
let P;
|
|
1835
|
+
l.includes("$") ? l = u(l) : P = (k = (h = u(l).split("}")) == null ? void 0 : h.filter((o) => o !== "")) == null ? void 0 : k.map((o) => {
|
|
1836
|
+
let r = o;
|
|
1837
|
+
return r[0] === "," ? r = r.slice(2, r.length) : r = r.slice(1, r.length), r;
|
|
1838
|
+
}), (g = u(P)) == null || g.forEach((o) => {
|
|
1839
|
+
var r, f, b, p, c, y, O, E, N, A;
|
|
1840
|
+
if (o.includes("==")) {
|
|
1841
|
+
const D = (O = o == null ? void 0 : o.split(":")) == null ? void 0 : O[0].replace(/^"|"$/g, "'").replace(/'([^']+)'/g, '"$1"').replaceAll("'", '"'), v = (E = o == null ? void 0 : o.split(":")) == null ? void 0 : E[1].replace(/^"|"$/g, "'").replace(/'([^']+)'/g, '"$1"');
|
|
1842
|
+
if (Q(v.trim()) ? n.push(JSON.parse(v.trim())) : n.push(JSON.parse(v.replaceAll("'", '"').trim())), D[0] !== "[") {
|
|
1843
|
+
let T = [];
|
|
1844
|
+
Q("[" + pe(D) + "]") ? T.push(JSON.parse("[" + pe(D) + "]")) : Q("[" + pe(D).replaceAll("==", ",") + "]") && T.push(JSON.parse("[" + pe(D).replaceAll("==", ",") + "]"));
|
|
1845
|
+
const j = u(T);
|
|
1846
|
+
j.push(["操作"]), t.push(j);
|
|
1847
|
+
} else {
|
|
1848
|
+
const T = (N = D.slice(1, D.length - 1).replaceAll(",", ",|")) == null ? void 0 : N.split("|"), j = (A = lt(T)) == null ? void 0 : A.map((m) => ((m == null ? void 0 : m[m.length - 1]) === "," && (m = m.slice(0, m.length - 1)), m));
|
|
1849
|
+
let B = [];
|
|
1850
|
+
j == null || j.forEach((m) => {
|
|
1851
|
+
var L, Z, W, X;
|
|
1852
|
+
let F = [];
|
|
1853
|
+
F.push((L = m.split("==")) == null ? void 0 : L[0].trim().replace(/^"|"$/g, "")), ((Z = m.split("==")) == null ? void 0 : Z[1].trim()[0]) === "[" ? F.push(JSON.parse((W = m.split("==")) == null ? void 0 : W[1].trim())) : F.push([JSON.parse((X = m.split("==")) == null ? void 0 : X[1].trim())]), B.push(F);
|
|
1854
|
+
});
|
|
1855
|
+
const S = u(B);
|
|
1856
|
+
S.push(["操作"]), t.push(S);
|
|
1857
|
+
}
|
|
1858
|
+
} else {
|
|
1859
|
+
if (Q((r = o == null ? void 0 : o.split(":")) == null ? void 0 : r[0].replace(/^"|"$/g, "'").replace(/'([^']+)'/g, '"$1"').replaceAll("'", '"'))) {
|
|
1860
|
+
let D = JSON.parse((f = o == null ? void 0 : o.split(":")) == null ? void 0 : f[0].replace(/^"|"$/g, "'").replace(/'([^']+)'/g, '"$1"').replaceAll("'", '"'));
|
|
1861
|
+
Array.isArray(D) || (D = [D]), D.push("操作"), t.push(D);
|
|
1862
|
+
}
|
|
1863
|
+
Q((b = o == null ? void 0 : o.split(":")) == null ? void 0 : b[1].replace(/^"|"$/g, "'").replace(/'([^']+)'/g, '"$1"')) ? n.push(JSON.parse((p = o == null ? void 0 : o.split(":")) == null ? void 0 : p[1].replace(/^"|"$/g, "'").replace(/'([^']+)'/g, '"$1"'))) : Q((c = o == null ? void 0 : o.split(":")) == null ? void 0 : c[1].replace(/^"|"$/g, "'").replaceAll("'", '"').replace(/'([^']+)'/g, '"$1"')) && n.push(JSON.parse((y = o == null ? void 0 : o.split(":")) == null ? void 0 : y[1].replace(/^"|"$/g, "'").replaceAll("'", '"').replace(/'([^']+)'/g, '"$1"')));
|
|
1864
|
+
}
|
|
1865
|
+
});
|
|
1866
|
+
}
|
|
1867
|
+
return [t, n, s];
|
|
1868
|
+
}, tt = (e) => {
|
|
1869
|
+
const t = [], n = Kn(e == null ? void 0 : e.key), l = et(e == null ? void 0 : e.key), s = nt(e == null ? void 0 : e.value), a = l == null ? void 0 : l[0], i = l == null ? void 0 : l[1], h = l == null ? void 0 : l[2], k = s == null ? void 0 : s[0], g = s == null ? void 0 : s[1], C = s == null ? void 0 : s[2];
|
|
1870
|
+
return n && t.push({
|
|
1871
|
+
key: "contentPath",
|
|
1872
|
+
value: n
|
|
1873
|
+
}), (a == null ? void 0 : a.length) > 0 && t.push({
|
|
1874
|
+
key: "tableIndex",
|
|
1875
|
+
value: a
|
|
1876
|
+
}), (i == null ? void 0 : i.length) > 0 && t.push({
|
|
1877
|
+
key: "form",
|
|
1878
|
+
value: i
|
|
1879
|
+
}), (h == null ? void 0 : h.length) > 0 && t.push({
|
|
1880
|
+
key: "extra",
|
|
1881
|
+
value: h
|
|
1882
|
+
}), (C == null ? void 0 : C.length) > 0 && t.push({
|
|
1883
|
+
comp: "Table",
|
|
1884
|
+
compData: C,
|
|
1885
|
+
name: ""
|
|
1886
|
+
}), (k == null ? void 0 : k.length) > 0 && t.push({
|
|
1887
|
+
key: "tableColumns",
|
|
1888
|
+
value: k
|
|
1889
|
+
}), (g == null ? void 0 : g.length) > 0 && t.push({
|
|
1890
|
+
key: "tableContents",
|
|
1891
|
+
value: g
|
|
1892
|
+
}), t;
|
|
1893
|
+
}, st = (e, t) => {
|
|
1894
|
+
const n = t.split("/");
|
|
1895
|
+
let l = [];
|
|
1896
|
+
return e == null || e.forEach((s) => {
|
|
1897
|
+
var h, k, g, C, $, _, x, d, P;
|
|
1898
|
+
const a = [], i = (k = (h = s.find((o) => o.key === "tableIndex")) == null ? void 0 : h.value) == null ? void 0 : k[0];
|
|
1899
|
+
if (i && !i.some((o) => Array.isArray(o))) {
|
|
1900
|
+
const o = (C = (g = s.find((r) => r.key === "tableColumns")) == null ? void 0 : g.value) == null ? void 0 : C[0];
|
|
1901
|
+
a.push({
|
|
1902
|
+
key: "tableIndexColumn",
|
|
1903
|
+
contents: n[n.length - 1]
|
|
1904
|
+
}), a.push({
|
|
1905
|
+
key: "tableIndex",
|
|
1906
|
+
contents: i == null ? void 0 : i.map((r) => ({ label: r }))
|
|
1907
|
+
}), a.push({
|
|
1908
|
+
key: "extraButton",
|
|
1909
|
+
contents: [{ label: "新增" }]
|
|
1910
|
+
}), a.push({
|
|
1911
|
+
key: "rowButton",
|
|
1912
|
+
contents: [{ label: "查看" }, { label: "编辑" }, { label: "删除" }]
|
|
1913
|
+
}), Array.isArray(o) && o.some((r) => Array.isArray(r)) ? a.push({
|
|
1914
|
+
key: "header",
|
|
1915
|
+
contents: tl(o)
|
|
1916
|
+
}) : a.push({
|
|
1917
|
+
key: "header",
|
|
1918
|
+
contents: Array.isArray(o) ? o == null ? void 0 : o.map((r) => ({ label: r })) : [o].map((r) => ({ label: r }))
|
|
1919
|
+
}), a.push({
|
|
1920
|
+
key: "tableContents",
|
|
1921
|
+
contents: Array.isArray(o) ? (_ = ($ = s.find((r) => r.key === "tableContents")) == null ? void 0 : $.value) == null ? void 0 : _[0] : (P = (d = (x = s.find((r) => r.key === "tableContents")) == null ? void 0 : x.value) == null ? void 0 : d[0]) == null ? void 0 : P.map((r) => [r])
|
|
1922
|
+
}), l.push({
|
|
1923
|
+
comp: "Table",
|
|
1924
|
+
name: "",
|
|
1925
|
+
compData: a
|
|
1926
|
+
});
|
|
1927
|
+
} else i ? l.push({
|
|
1928
|
+
comp: "Table",
|
|
1929
|
+
name: "",
|
|
1930
|
+
compData: Hn(s, n[n.length - 1])
|
|
1931
|
+
}) : s.some((o) => o.key === "extra") ? l.push({
|
|
1932
|
+
comp: "calculator",
|
|
1933
|
+
name: "",
|
|
1934
|
+
compData: We(s)
|
|
1935
|
+
}) : l.push(We(s));
|
|
1936
|
+
}), l;
|
|
1937
|
+
}, at = (e, t) => {
|
|
1938
|
+
var s, a;
|
|
1939
|
+
const n = e.map((i) => i.filter((h) => h.key !== "contentPath"));
|
|
1940
|
+
return {
|
|
1941
|
+
comp: "Group",
|
|
1942
|
+
compData: [{
|
|
1943
|
+
contents: st(n, t),
|
|
1944
|
+
key: "groupContents"
|
|
1945
|
+
}],
|
|
1946
|
+
name: (a = (s = e[0]) == null ? void 0 : s.find((i) => i.key === "contentPath")) == null ? void 0 : a.value
|
|
1947
|
+
};
|
|
1948
|
+
}, rt = (e) => {
|
|
1949
|
+
var s;
|
|
1950
|
+
const t = [], n = u(e).map((a) => {
|
|
1951
|
+
var i;
|
|
1952
|
+
if (a != null && a.find((h) => (h == null ? void 0 : h.key) === "contentPath"))
|
|
1953
|
+
return (i = a == null ? void 0 : a.find((h) => (h == null ? void 0 : h.key) === "contentPath")) == null ? void 0 : i.value;
|
|
1954
|
+
}).filter((a) => a !== ""), l = [...new Set(n)];
|
|
1955
|
+
return (s = l == null ? void 0 : l.filter((a) => a)) == null || s.forEach((a) => {
|
|
1956
|
+
var i;
|
|
1957
|
+
t.push(at((i = u(e)) == null ? void 0 : i.filter((h) => h.find((k) => k.key === "contentPath" && k.value === a)), a));
|
|
1958
|
+
}), t;
|
|
1959
|
+
}, ot = (e) => {
|
|
1960
|
+
let t = [];
|
|
1961
|
+
t.push({
|
|
1962
|
+
comp: "Menu",
|
|
1963
|
+
compData: [{
|
|
1964
|
+
contents: Yn(u(e)),
|
|
1965
|
+
key: "menuContents"
|
|
1966
|
+
}],
|
|
1967
|
+
name: ""
|
|
1968
|
+
});
|
|
1969
|
+
const n = e.map((l) => tt(l)).filter((l) => l.length !== 0);
|
|
1970
|
+
return t = [...t, ...rt(n)], t;
|
|
1971
|
+
}, Dt = (e) => {
|
|
1972
|
+
var s, a, i, h, k;
|
|
1973
|
+
const t = (i = xe((a = (s = u(e)) == null ? void 0 : s.replace("(", "(")) == null ? void 0 : a.replace(")", ")"))) == null ? void 0 : i.filter((g) => g !== ""), n = (k = (h = u(t)) == null ? void 0 : h.filter((g) => !g.includes("/*"))) == null ? void 0 : k.map((g) => Qn(g));
|
|
1974
|
+
return ot(n);
|
|
1975
|
+
}, ie = U(0), Ce = U(0), ct = (e) => {
|
|
1976
|
+
const t = e.trim().replace(/^'|'$/g, ""), n = /((?:\$?[a-zA-Z_][a-zA-Z0-9_]*\$?\([^)]*\))|[a-zA-Z_][a-zA-Z0-9_]*)\s*=\s*(.*?)(?=\s*(?:(?:\$?[a-zA-Z_][a-zA-Z0-9_]*\$?\([^)]*\))|[a-zA-Z_][a-zA-Z0-9_]*)\s*=|$)/g, l = {};
|
|
1977
|
+
let s;
|
|
1978
|
+
for (; (s = n.exec(t)) !== null; ) {
|
|
1979
|
+
const a = s[1];
|
|
1980
|
+
let i = s[2].trim();
|
|
1981
|
+
(i.match(/\[/g) || []).length !== (i.match(/\]/g) || []).length && (i = i == null ? void 0 : i.replace(/]$/, "")), l[a] ? (l[a + Ce.value] && Ce.value++, l[a + Ce.value] = a + "=" + i) : l[a] = a + "=" + i;
|
|
1982
|
+
}
|
|
1983
|
+
return l;
|
|
1984
|
+
}, ol = (e) => {
|
|
1985
|
+
const [t, n] = e.split("=").map((a) => a.trim()), l = t.replace(/['"]/g, ""), s = n.replace(/^['"]|['"]$/g, "");
|
|
1986
|
+
return { key: l, value: s };
|
|
1987
|
+
}, ut = (e) => {
|
|
1988
|
+
var i;
|
|
1989
|
+
let t = [];
|
|
1990
|
+
const [n, l] = e.split(/=(.+)/), s = n.replace(/['"]/g, "").trim(), a = l.replace(/^['"]|['"]$/g, "");
|
|
1991
|
+
return (i = Object.values(ct(a))) == null || i.forEach((h) => {
|
|
1992
|
+
t.push(ol(h));
|
|
1993
|
+
}), { key: s, value: t };
|
|
1994
|
+
}, de = (e) => {
|
|
1995
|
+
try {
|
|
1996
|
+
return JSON.parse(e), !0;
|
|
1997
|
+
} catch {
|
|
1998
|
+
return !1;
|
|
1999
|
+
}
|
|
2000
|
+
}, cl = (e) => {
|
|
2001
|
+
try {
|
|
2002
|
+
const t = e.replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",").replace(/:/g, ":").replace(/:\s*(?=,|}|$)/g, ': ""');
|
|
2003
|
+
if (u(t).split("{").length - 1 > 1) {
|
|
2004
|
+
let n = u(t).replace(/^\{(.*)\}$/, "[$1]");
|
|
2005
|
+
if (de(n) && !n.includes("$") || (n = n.replace(/"([^"]+)"\$([\w\u4e00-\u9fa5]+\([^)]*\))/g, '"$1$$$2"')), de(n)) {
|
|
2006
|
+
const l = JSON.parse(n);
|
|
2007
|
+
let s = [];
|
|
2008
|
+
return l == null || l.forEach((a) => {
|
|
2009
|
+
var i;
|
|
2010
|
+
(i = Object.entries(u(a))) == null || i.forEach((h) => {
|
|
2011
|
+
ie.value++, s.push({
|
|
2012
|
+
id: ie.value,
|
|
2013
|
+
key: (h == null ? void 0 : h[0]) ?? "",
|
|
2014
|
+
value: (h == null ? void 0 : h[1]) === "" ? "" : h == null ? void 0 : h[1],
|
|
2015
|
+
// 如果值为空,则key设为空字符串,否则保留原值
|
|
2016
|
+
width: Object.keys(u(a)).length
|
|
2017
|
+
});
|
|
2018
|
+
});
|
|
2019
|
+
}), s;
|
|
2020
|
+
} else
|
|
2021
|
+
return console.error("转换类型不正确:"), [];
|
|
2022
|
+
} else if (de(t)) {
|
|
2023
|
+
const n = JSON.parse(t);
|
|
2024
|
+
return Object.entries(n).map(([l, s]) => (ie.value++, {
|
|
2025
|
+
id: ie.value,
|
|
2026
|
+
key: l,
|
|
2027
|
+
value: s === "" ? "" : s,
|
|
2028
|
+
// 如果值为空,则key设为空字符串,否则保留原值
|
|
2029
|
+
width: 1
|
|
2030
|
+
}));
|
|
2031
|
+
} else
|
|
2032
|
+
return t;
|
|
2033
|
+
} catch (t) {
|
|
2034
|
+
return console.error("转换失败:", t), [];
|
|
2035
|
+
}
|
|
2036
|
+
}, pt = (e, t) => {
|
|
2037
|
+
try {
|
|
2038
|
+
if (R != null && R.find((n) => (n == null ? void 0 : n.key) === t))
|
|
2039
|
+
return JSON.parse(e.replace(/[’]|[‘]|[']/g, '"'));
|
|
2040
|
+
if (u(e).split("[").length - 1 > 1) {
|
|
2041
|
+
const n = u(e).replace(/[’]|[‘]|[']/g, '"').replaceAll(/,/g, ",").replaceAll("(", "[").replaceAll(")", "]").replaceAll("],]", "]]");
|
|
2042
|
+
return JSON.parse(n);
|
|
2043
|
+
} else {
|
|
2044
|
+
const n = u(e).replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",");
|
|
2045
|
+
if (de(n)) {
|
|
2046
|
+
const l = JSON.parse(n);
|
|
2047
|
+
return Array.isArray(l) ? l.map((s) => ({ label: s })) : l;
|
|
2048
|
+
} else
|
|
2049
|
+
return cl(u(e));
|
|
2050
|
+
}
|
|
2051
|
+
} catch (n) {
|
|
2052
|
+
return console.error("解析失败:", n), e;
|
|
2053
|
+
}
|
|
2054
|
+
}, it = (e) => ({ [e == null ? void 0 : e.key]: pt(e == null ? void 0 : e.value, e == null ? void 0 : e.key) }), ft = (e) => {
|
|
2055
|
+
try {
|
|
2056
|
+
if (u(e).split("[").length - 1 > 1) {
|
|
2057
|
+
const t = u(e).replace(/[’]|[‘]|[']/g, '"').replaceAll(/,/g, ",").replaceAll("(", "[").replaceAll(")", "]").replaceAll("],]", "]]");
|
|
2058
|
+
return JSON.parse(t);
|
|
2059
|
+
} else
|
|
2060
|
+
return JSON.parse(u(e).replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",")).map((n) => ({ label: n }));
|
|
2061
|
+
} catch (t) {
|
|
2062
|
+
return console.error("解析失败:", t), e;
|
|
2063
|
+
}
|
|
2064
|
+
}, ul = (e) => {
|
|
2065
|
+
var t, n, l, s, a, i;
|
|
2066
|
+
try {
|
|
2067
|
+
const h = xe((n = (t = u(e)) == null ? void 0 : t.replace("(", "(")) == null ? void 0 : n.replace(")", ")")), k = (l = u(h)) == null ? void 0 : l.map(($) => {
|
|
2068
|
+
var x, d;
|
|
2069
|
+
let _ = (d = (x = u($)) == null ? void 0 : x.split("=")) == null ? void 0 : d[0];
|
|
2070
|
+
return _ != null && _.includes("GroupContents") ? ut($) : ol($);
|
|
2071
|
+
}), g = [];
|
|
2072
|
+
(s = u(k)) == null || s.forEach(($) => {
|
|
2073
|
+
var _, x, d, P, o;
|
|
2074
|
+
R != null && R.find((r) => {
|
|
2075
|
+
var f, b;
|
|
2076
|
+
return ((f = r == null ? void 0 : r.key) == null ? void 0 : f.toUpperCase()) === ((b = $ == null ? void 0 : $.key) == null ? void 0 : b.toUpperCase());
|
|
2077
|
+
}) ? g.push({
|
|
2078
|
+
comp: ((_ = R == null ? void 0 : R.find((r) => {
|
|
2079
|
+
var f, b;
|
|
2080
|
+
return ((f = r == null ? void 0 : r.key) == null ? void 0 : f.toUpperCase()) === ((b = $ == null ? void 0 : $.key) == null ? void 0 : b.toUpperCase());
|
|
2081
|
+
})) == null ? void 0 : _.value) ?? "",
|
|
2082
|
+
name: (x = $ == null ? void 0 : $.value) == null ? void 0 : x.replace(/[’]|[‘]|[']/g, ""),
|
|
2083
|
+
compData: []
|
|
2084
|
+
}) : J != null && J.find((r) => {
|
|
2085
|
+
var f, b;
|
|
2086
|
+
return ((f = r == null ? void 0 : r.key) == null ? void 0 : f.toUpperCase()) === ((b = $ == null ? void 0 : $.key) == null ? void 0 : b.toUpperCase());
|
|
2087
|
+
}) && ((g == null ? void 0 : g.length) === 0 && (d = $.key) != null && d.includes("Menus") && g.push({
|
|
2088
|
+
comp: "Menu",
|
|
2089
|
+
name: "",
|
|
2090
|
+
compData: []
|
|
2091
|
+
}), (P = g == null ? void 0 : g[(g == null ? void 0 : g.length) - 1]) != null && P.compData && g[(g == null ? void 0 : g.length) - 1].compData.push({
|
|
2092
|
+
key: (o = J == null ? void 0 : J.find((r) => {
|
|
2093
|
+
var f, b;
|
|
2094
|
+
return ((f = r == null ? void 0 : r.key) == null ? void 0 : f.toUpperCase()) === ((b = $ == null ? void 0 : $.key) == null ? void 0 : b.toUpperCase());
|
|
2095
|
+
})) == null ? void 0 : o.value,
|
|
2096
|
+
contents: $ == null ? void 0 : $.value
|
|
2097
|
+
}));
|
|
2098
|
+
}), console.log("newContents", g);
|
|
2099
|
+
let C = (a = u(g)) == null ? void 0 : a.map(($) => {
|
|
2100
|
+
var _;
|
|
2101
|
+
return $ != null && $.compData && ($.compData = (_ = $ == null ? void 0 : $.compData) == null ? void 0 : _.map((x) => {
|
|
2102
|
+
var d, P, o, r, f, b, p, c, y, O, E;
|
|
2103
|
+
if ((x == null ? void 0 : x.key) === "formFlex")
|
|
2104
|
+
x.contents = ((P = (d = x.contents) == null ? void 0 : d.replace(/[’]|[‘]|[']/g, "")) == null ? void 0 : P.toUpperCase()) !== "Vertical".toUpperCase();
|
|
2105
|
+
else if ((x == null ? void 0 : x.key) === "groupContents")
|
|
2106
|
+
x.contents = (o = u(x.contents)) == null ? void 0 : o.map((N) => it(u(N)));
|
|
2107
|
+
else if (((f = (r = x.contents) == null ? void 0 : r.trim()) != null && f.startsWith("[") || (p = (b = x.contents) == null ? void 0 : b.trim()) != null && p.startsWith("【")) && ((y = (c = x.contents) == null ? void 0 : c.trim()) != null && y.endsWith("]") || (E = (O = x.contents) == null ? void 0 : O.trim()) != null && E.endsWith("】")))
|
|
2108
|
+
x.contents = ft(u(x.contents));
|
|
2109
|
+
else {
|
|
2110
|
+
if (!x.contents) return;
|
|
2111
|
+
x.contents = cl(u(x.contents));
|
|
2112
|
+
}
|
|
2113
|
+
return x;
|
|
2114
|
+
})), $;
|
|
2115
|
+
});
|
|
2116
|
+
return C = (i = u(C)) == null ? void 0 : i.map(($) => {
|
|
2117
|
+
var _;
|
|
2118
|
+
return ($ == null ? void 0 : $.comp) === "Group" && ($.compData = (_ = $.compData) == null ? void 0 : _.map((x) => {
|
|
2119
|
+
var P;
|
|
2120
|
+
let d = [];
|
|
2121
|
+
return (P = x.contents) == null || P.forEach((o) => {
|
|
2122
|
+
var r, f, b, p, c, y, O, E, N, A, D, v;
|
|
2123
|
+
if (R != null && R.find((T) => {
|
|
2124
|
+
var j, B, S;
|
|
2125
|
+
return ((j = T == null ? void 0 : T.key) == null ? void 0 : j.toUpperCase()) === ((S = (B = Object.keys(o)) == null ? void 0 : B[0]) == null ? void 0 : S.toUpperCase());
|
|
2126
|
+
}))
|
|
2127
|
+
d.push({
|
|
2128
|
+
comp: (r = R == null ? void 0 : R.find((T) => {
|
|
2129
|
+
var j, B, S;
|
|
2130
|
+
return ((j = T == null ? void 0 : T.key) == null ? void 0 : j.toUpperCase()) === ((S = (B = Object.keys(o)) == null ? void 0 : B[0]) == null ? void 0 : S.toUpperCase());
|
|
2131
|
+
})) == null ? void 0 : r.value,
|
|
2132
|
+
name: (b = (f = Object.values(o)) == null ? void 0 : f[0]) == null ? void 0 : b.replace(/[’]|[‘]|[']/g, ""),
|
|
2133
|
+
compData: []
|
|
2134
|
+
});
|
|
2135
|
+
else if (J != null && J.find((T) => {
|
|
2136
|
+
var j, B, S;
|
|
2137
|
+
return ((j = T == null ? void 0 : T.key) == null ? void 0 : j.toUpperCase()) === ((S = (B = Object.keys(o)) == null ? void 0 : B[0]) == null ? void 0 : S.toUpperCase());
|
|
2138
|
+
})) {
|
|
2139
|
+
if ((d == null ? void 0 : d.length) === 0) return;
|
|
2140
|
+
(p = d == null ? void 0 : d[(d == null ? void 0 : d.length) - 1]) != null && p.compData && d[(d == null ? void 0 : d.length) - 1].compData.push({
|
|
2141
|
+
key: (c = J == null ? void 0 : J.find((T) => {
|
|
2142
|
+
var j, B, S;
|
|
2143
|
+
return ((j = T == null ? void 0 : T.key) == null ? void 0 : j.toUpperCase()) === ((S = (B = Object.keys(o)) == null ? void 0 : B[0]) == null ? void 0 : S.toUpperCase());
|
|
2144
|
+
})) == null ? void 0 : c.value,
|
|
2145
|
+
contents: (y = Object.values(o)) == null ? void 0 : y[0]
|
|
2146
|
+
});
|
|
2147
|
+
} else if ((E = (O = Object.keys(o)) == null ? void 0 : O[0]) != null && E.includes("$")) {
|
|
2148
|
+
const T = (A = (N = Object.keys(u(o))) == null ? void 0 : N[0]) == null ? void 0 : A.split("$");
|
|
2149
|
+
d[(d == null ? void 0 : d.length) - 1].compData.push({
|
|
2150
|
+
key: (D = J == null ? void 0 : J.find((j) => {
|
|
2151
|
+
var B, S;
|
|
2152
|
+
return ((B = j == null ? void 0 : j.key) == null ? void 0 : B.toUpperCase()) === ((S = T == null ? void 0 : T[0]) == null ? void 0 : S.toUpperCase());
|
|
2153
|
+
})) == null ? void 0 : D.value,
|
|
2154
|
+
contents: (v = Object.values(o)) == null ? void 0 : v[0],
|
|
2155
|
+
selectLabel: T == null ? void 0 : T[1]
|
|
2156
|
+
});
|
|
2157
|
+
}
|
|
2158
|
+
return o;
|
|
2159
|
+
}), x.contents = d, x;
|
|
2160
|
+
})), $;
|
|
2161
|
+
}), C;
|
|
2162
|
+
} catch {
|
|
2163
|
+
return !1;
|
|
2164
|
+
}
|
|
2165
|
+
}, Nt = (e) => ul(e), St = (e) => !!ul(e), dt = kl($e), { itemData: Pt } = qe(dt), yt = gl($e), { systemKey: jt, activeMenuPath: Bt } = qe(yt), se = U(0), Ft = (e) => e.reduce((n, l) => {
|
|
2166
|
+
var a, i;
|
|
2167
|
+
const s = Object.values(n);
|
|
2168
|
+
return (((a = Object.keys(n)) == null ? void 0 : a.length) === 0 || s[s.length - 1].length >= (l == null ? void 0 : l.width)) && (n[se.value] = [], se.value++), n[se.value - 1].push(l), ((i = Object.keys(n)) == null ? void 0 : i.length) === (l == null ? void 0 : l.width) && (n[se.value] = [], se.value++), n;
|
|
2169
|
+
}, {});
|
|
2170
|
+
export {
|
|
2171
|
+
Ft as a,
|
|
2172
|
+
vt as b,
|
|
2173
|
+
Dt as c,
|
|
2174
|
+
Et as d,
|
|
2175
|
+
Nt as e,
|
|
2176
|
+
vn as g,
|
|
2177
|
+
St as i,
|
|
2178
|
+
Tt as s
|
|
2179
|
+
};
|