ss-component-new 1.1.76 → 1.1.78

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.
Files changed (48) hide show
  1. package/dist/_plugin-vue_export-helper-BHFhmbuH.cjs +1 -0
  2. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  3. package/dist/array-DQ6meJk7.cjs +9 -0
  4. package/dist/{array-BejyPB_1.js → array-Dsurpc08.js} +247 -241
  5. package/dist/cloneDeep-BH_aXSAH.cjs +1 -0
  6. package/dist/cloneDeep-MKlVykeI.js +318 -0
  7. package/dist/{index-ChCXzsYf.js → index-54P6MUQ5.js} +2 -2
  8. package/dist/index-BCHKDSAB.cjs +1 -0
  9. package/dist/index-Bc2TP6E4.cjs +1 -0
  10. package/dist/index-C8abtcPh.cjs +87 -0
  11. package/dist/index-CBzgTVRc.cjs +1 -0
  12. package/dist/index-CRm-Cd9v.cjs +1 -0
  13. package/dist/index-CTc_dwbb.js +3133 -0
  14. package/dist/index-ChZ6L8qy.js +371 -0
  15. package/dist/index-ClguzCrn.js +131 -0
  16. package/dist/{menu-oGClEGzK.js → index-D0v2_dMz.js} +1945 -1834
  17. package/dist/{index-BT8Pkr84.js → index-D9tWUDyO.js} +8 -6
  18. package/dist/index-DB-XsCH7.cjs +1 -0
  19. package/dist/{index-BvoThyOF.js → index-DBKxwOZZ.js} +2 -2
  20. package/dist/index-DtmWzVIG.cjs +6 -0
  21. package/dist/{index-10n3uNlg.js → index-HDBRQNLs.js} +4 -3
  22. package/dist/index-YSJ2XYuj.cjs +1 -0
  23. package/dist/index-qogZoGJJ.js +351 -0
  24. package/dist/index-sjmLPf8w.cjs +1 -0
  25. package/dist/index-zIb6b0kg.cjs +6 -0
  26. package/dist/index.vue_vue_type_script_setup_true_lang-D0K1veK2.cjs +1 -0
  27. package/dist/index.vue_vue_type_style_index_0_scoped_876d48c6_lang-BWOIM9wH.js +254 -0
  28. package/dist/index.vue_vue_type_style_index_0_scoped_876d48c6_lang-Csg3VsXp.cjs +4 -0
  29. package/dist/{index.vue_vue_type_style_index_0_scoped_dc84a8f7_lang-DG5vph3h.js → index.vue_vue_type_style_index_0_scoped_dc84a8f7_lang-DHffsUIJ.js} +39 -38
  30. package/dist/index.vue_vue_type_style_index_0_scoped_dc84a8f7_lang-DzfJEE_l.cjs +1 -0
  31. package/dist/main-RfdttOpi.js +288 -0
  32. package/dist/main-u6M32FUn.cjs +1 -0
  33. package/dist/menu-BIINB-0Y.js +1013 -0
  34. package/dist/menu-B_Az9K_F.cjs +11 -0
  35. package/dist/{modelComp-CqA1NVfH.js → modelComp-B3sxj_Kp.js} +1 -1
  36. package/dist/modelComp-DAsVXKA0.cjs +1 -0
  37. package/dist/router.d.ts +1 -0
  38. package/dist/ss-component.cjs +1 -0
  39. package/dist/ss-component.css +1 -1
  40. package/dist/ss-component.js +26 -24
  41. package/dist/ss-component2.cjs +1 -0
  42. package/dist/ss-component2.js +5 -0
  43. package/package.json +11 -5
  44. package/dist/_plugin-vue_export-helper-B7R8Jogt.js +0 -524
  45. package/dist/index-CCr_UQBn.js +0 -3749
  46. package/dist/main-BUjoLIJC.js +0 -404
  47. package/dist/ss-component.umd.cjs +0 -115
  48. /package/dist/{ss-component.d.ts → main.d.ts} +0 -0
@@ -0,0 +1,254 @@
1
+ import { v as M, c as x } from "./array-Dsurpc08.js";
2
+ import { ref as Y } from "vue";
3
+ import { c as l } from "./cloneDeep-MKlVykeI.js";
4
+ const L = Y(0), Z = (e) => {
5
+ let s;
6
+ e.includes(`\r
7
+ `) ? s = e.split(`\r
8
+ `).filter((t) => t.trim() !== "") : s = e.split(`
9
+ `).filter((t) => t.trim() !== "");
10
+ const p = [];
11
+ let r = "";
12
+ for (const t of s)
13
+ t.includes("{") || r.includes("{") || t.includes("[") || r.includes("[") || t.includes("【") || r.includes("【") || t.includes("(") || r.includes("(") || t.includes("(") || r.includes("(") || t.includes("/*") || r.includes("/*") ? (r += t.trim(), l(r).split("{").length - 1 === l(r).split("}").length - 1 && l(r).split("【").length - 1 === l(r).split("】").length - 1 && l(r).split("[").length - 1 === l(r).split("]").length - 1 && l(r).split("(").length - 1 === l(r).split(")").length - 1 && l(r).split("(").length - 1 === l(r).split(")").length - 1 && l(r).split("/*").length - 1 === l(r).split("*/").length - 1 && (p.push(r), r = "")) : p.push(t.trim());
14
+ return p;
15
+ }, _ = (e) => {
16
+ const [s, p] = e.split(/=(.+)/), r = s.replace(/['"]/g, "").trim(), t = p.replace(/^['"]|['"]$/g, "");
17
+ return { key: r, value: t };
18
+ }, V = (e) => {
19
+ try {
20
+ return JSON.parse(e), !0;
21
+ } catch {
22
+ return !1;
23
+ }
24
+ }, R = (e) => {
25
+ try {
26
+ const s = e.replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",").replace(/:/g, ":").replace(/:\s*(?=,|}|$)/g, ': ""');
27
+ if (l(s).split("{").length - 1 > 1) {
28
+ let p = l(s).replace(/^\{(.*)\}$/, "[$1]");
29
+ if (V(p) && !p.includes("$") || (p = p.replace(/"([^"]+)"\$([\w\u4e00-\u9fa5]+\([^)]*\))/g, '"$1$$$2"')), V(p)) {
30
+ const r = JSON.parse(p);
31
+ let t = [];
32
+ return r == null || r.forEach((o) => {
33
+ var y;
34
+ (y = Object.entries(l(o))) == null || y.forEach((i) => {
35
+ L.value++, t.push({
36
+ id: L.value,
37
+ key: (i == null ? void 0 : i[0]) ?? "",
38
+ value: (i == null ? void 0 : i[1]) === "" ? "" : i == null ? void 0 : i[1],
39
+ // 如果值为空,则key设为空字符串,否则保留原值
40
+ width: Object.keys(l(o)).length
41
+ });
42
+ });
43
+ }), t;
44
+ } else
45
+ return console.error("转换类型不正确:"), [];
46
+ } else if (V(s)) {
47
+ const p = JSON.parse(s);
48
+ return Object.entries(p).map(([r, t]) => (L.value++, {
49
+ id: L.value,
50
+ key: r,
51
+ value: t === "" ? "" : t,
52
+ // 如果值为空,则key设为空字符串,否则保留原值
53
+ width: 1
54
+ }));
55
+ } else
56
+ return s;
57
+ } catch (s) {
58
+ return console.error("转换失败:", s), [];
59
+ }
60
+ }, w = (e, s) => {
61
+ var p;
62
+ try {
63
+ if ((p = M) != null && p.find((r) => (r == null ? void 0 : r.key) === s))
64
+ return e.replace(/['"]/g, "").trim();
65
+ if (l(e).split("[").length - 1 > 1) {
66
+ const r = l(e).replace(/[’]|[‘]|[']/g, '"').replaceAll(/,/g, ",").replaceAll("(", "[").replaceAll(")", "]").replaceAll("],]", "]]");
67
+ return JSON.parse(r);
68
+ } else {
69
+ const r = l(e).replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",");
70
+ if (V(r)) {
71
+ const t = JSON.parse(r);
72
+ return Array.isArray(t) ? t.map((o) => ({ label: o })) : t;
73
+ } else
74
+ return R(l(e));
75
+ }
76
+ } catch (r) {
77
+ return console.error("解析失败:", r), e;
78
+ }
79
+ }, S = (e) => ({ [e == null ? void 0 : e.key]: w(e == null ? void 0 : e.value, e == null ? void 0 : e.key) }), v = (e) => {
80
+ try {
81
+ if (l(e).split("[").length - 1 > 1) {
82
+ const s = l(e).replace(/[’]|[‘]|[']/g, '"').replaceAll(/,/g, ",").replaceAll("(", "[").replaceAll(")", "]").replaceAll("],]", "]]");
83
+ return JSON.parse(s);
84
+ } else
85
+ return JSON.parse(l(e).replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",")).map((p) => ({ label: p }));
86
+ } catch (s) {
87
+ return console.error("解析失败:", s), e;
88
+ }
89
+ }, ee = (e) => {
90
+ const s = e.match(/\(([^)]+)\)/);
91
+ return s ? s[1] : "";
92
+ }, re = (e) => {
93
+ const s = e.match(/^([^(]+)\s*\(/);
94
+ return s ? s[1].trim() : e;
95
+ }, Q = (e) => e.replace(/'/g, "").replace(/"/g, "").replace(/{|}/g, "").split(":").map((s) => s.trim()).filter((s) => s).join("/"), te = (e) => {
96
+ var y, i;
97
+ let s = [], p = [];
98
+ const r = (y = l(e)) == null ? void 0 : y.map((d) => d == null ? void 0 : d.key), t = [...new Set((i = l(r)) == null ? void 0 : i.map((d) => ee(d)))];
99
+ t == null || t.forEach((d) => {
100
+ let U = e == null ? void 0 : e.filter((u) => u.key.includes(d));
101
+ U == null || U.forEach((u) => {
102
+ u != null && u.key.includes("Menus") && (s.push({
103
+ key: "GroupName",
104
+ value: Q(u == null ? void 0 : u.value)
105
+ }), p.push(Q(u == null ? void 0 : u.value)));
106
+ });
107
+ let C = e == null ? void 0 : e.filter((u) => u.key.includes(d) && !(u != null && u.key.includes("Menus")));
108
+ C = C == null ? void 0 : C.map((u) => (u.key = re(u.key), u));
109
+ const P = {
110
+ key: "GroupContents",
111
+ value: C
112
+ };
113
+ s.push(P);
114
+ });
115
+ const o = {
116
+ key: "Menus",
117
+ value: p
118
+ };
119
+ return s.unshift(o), s;
120
+ }, X = (e) => {
121
+ var s, p;
122
+ if (Array.isArray(Object.keys(e)) && ((s = Object.keys(e)) == null ? void 0 : s.length) > 0) {
123
+ let r = [];
124
+ return (p = Object.entries(e)) == null || p.forEach(([t, o]) => {
125
+ var i, d;
126
+ let y = [];
127
+ if (y.push(t), ((i = Object.keys(o)) == null ? void 0 : i.length) > 0) {
128
+ let U = [];
129
+ U.push((d = X(o)) == null ? void 0 : d[0]), y.push(U == null ? void 0 : U[0]);
130
+ }
131
+ r.push(y);
132
+ }), r;
133
+ }
134
+ }, se = (e, s) => {
135
+ var r;
136
+ let p = s;
137
+ return Array.isArray(Object.keys(e)) && ((r = Object.entries(e)) == null || r.forEach(([t, o]) => {
138
+ let y = [t];
139
+ if (typeof o == "object" && o !== null) {
140
+ let i = X(o);
141
+ i == null || i.forEach((d) => {
142
+ y.push(d);
143
+ });
144
+ }
145
+ p.push(y);
146
+ })), p;
147
+ }, ce = (e) => {
148
+ const s = {};
149
+ return e.forEach((r) => {
150
+ const t = r.split("/");
151
+ let o = s;
152
+ t.forEach((y) => {
153
+ o[y] || (o[y] = {}), o = o[y];
154
+ });
155
+ }), se(s, []);
156
+ }, le = (e) => ce(e), ue = (e) => {
157
+ var y, i, d, U, C, P, u;
158
+ const s = Z((i = (y = l(e)) == null ? void 0 : y.replace("(", "(")) == null ? void 0 : i.replace(")", ")")), p = (U = (d = l(s)) == null ? void 0 : d.filter((c) => !c.includes("/*"))) == null ? void 0 : U.map((c) => _(c)), r = te(p), t = [];
159
+ (C = l(r)) == null || C.forEach((c) => {
160
+ var D, n, a, $, b, E, g, J, N;
161
+ (D = M) != null && D.find((h) => {
162
+ var m, k;
163
+ return ((m = h == null ? void 0 : h.key) == null ? void 0 : m.toUpperCase()) === ((k = c == null ? void 0 : c.key) == null ? void 0 : k.toUpperCase());
164
+ }) ? t.push({
165
+ comp: ((a = (n = M) == null ? void 0 : n.find((h) => {
166
+ var m, k;
167
+ return ((m = h == null ? void 0 : h.key) == null ? void 0 : m.toUpperCase()) === ((k = c == null ? void 0 : c.key) == null ? void 0 : k.toUpperCase());
168
+ })) == null ? void 0 : a.value) ?? "",
169
+ name: ($ = c == null ? void 0 : c.value) == null ? void 0 : $.replace(/[’]|[‘]|[']/g, ""),
170
+ compData: []
171
+ }) : (b = x) != null && b.find((h) => {
172
+ var m, k;
173
+ return ((m = h == null ? void 0 : h.key) == null ? void 0 : m.toUpperCase()) === ((k = c == null ? void 0 : c.key) == null ? void 0 : k.toUpperCase());
174
+ }) && ((t == null ? void 0 : t.length) === 0 && (E = c.key) != null && E.includes("Menus") && t.push({
175
+ comp: "Menu",
176
+ name: "",
177
+ compData: []
178
+ }), (g = t == null ? void 0 : t[(t == null ? void 0 : t.length) - 1]) != null && g.compData && t[(t == null ? void 0 : t.length) - 1].compData.push({
179
+ key: (N = (J = x) == null ? void 0 : J.find((h) => {
180
+ var m, k;
181
+ return ((m = h == null ? void 0 : h.key) == null ? void 0 : m.toUpperCase()) === ((k = c == null ? void 0 : c.key) == null ? void 0 : k.toUpperCase());
182
+ })) == null ? void 0 : N.value,
183
+ contents: c == null ? void 0 : c.value
184
+ }));
185
+ });
186
+ let o = (P = l(t)) == null ? void 0 : P.map((c) => {
187
+ var D;
188
+ return c != null && c.compData && (c.compData = (D = c == null ? void 0 : c.compData) == null ? void 0 : D.map((n) => {
189
+ var a, $, b, E, g, J, N, h, m, k, T;
190
+ if ((n == null ? void 0 : n.key) === "formFlex")
191
+ n.contents = (($ = (a = n.contents) == null ? void 0 : a.replace(/[’]|[‘]|[']/g, "")) == null ? void 0 : $.toUpperCase()) !== "Vertical".toUpperCase();
192
+ else if ((n == null ? void 0 : n.key) === "groupContents")
193
+ n.contents = (b = l(n.contents)) == null ? void 0 : b.map((G) => S(l(G)));
194
+ else if (Array.isArray(n == null ? void 0 : n.contents))
195
+ n.contents = le(n.contents);
196
+ else if (((g = (E = n == null ? void 0 : n.contents) == null ? void 0 : E.trim()) != null && g.startsWith("[") || (N = (J = n.contents) == null ? void 0 : J.trim()) != null && N.startsWith("【")) && ((m = (h = n.contents) == null ? void 0 : h.trim()) != null && m.endsWith("]") || (T = (k = n.contents) == null ? void 0 : k.trim()) != null && T.endsWith("】")))
197
+ n.contents = v(l(n.contents));
198
+ else {
199
+ if (!n.contents) return;
200
+ n.contents = R(l(n.contents));
201
+ }
202
+ return n;
203
+ })), c;
204
+ });
205
+ return o = (u = l(o)) == null ? void 0 : u.map((c) => {
206
+ var D;
207
+ return (c == null ? void 0 : c.comp) === "Group" && (c.compData = (D = c.compData) == null ? void 0 : D.map((n) => {
208
+ var $;
209
+ let a = [];
210
+ return ($ = n.contents) == null || $.forEach((b) => {
211
+ var E, g, J, N, h, m, k, T, G, W, I, F, H, q, z, B, K;
212
+ if ((E = M) != null && E.find((f) => {
213
+ var O, j, A;
214
+ return ((O = f == null ? void 0 : f.key) == null ? void 0 : O.toUpperCase()) === ((A = (j = Object.keys(b)) == null ? void 0 : j[0]) == null ? void 0 : A.toUpperCase());
215
+ }))
216
+ a.push({
217
+ comp: (J = (g = M) == null ? void 0 : g.find((f) => {
218
+ var O, j, A;
219
+ return ((O = f == null ? void 0 : f.key) == null ? void 0 : O.toUpperCase()) === ((A = (j = Object.keys(b)) == null ? void 0 : j[0]) == null ? void 0 : A.toUpperCase());
220
+ })) == null ? void 0 : J.value,
221
+ name: (h = (N = Object.values(b)) == null ? void 0 : N[0]) == null ? void 0 : h.replace(/[’]|[‘]|[']/g, ""),
222
+ compData: []
223
+ });
224
+ else if ((m = x) != null && m.find((f) => {
225
+ var O, j, A;
226
+ return ((O = f == null ? void 0 : f.key) == null ? void 0 : O.toUpperCase()) === ((A = (j = Object.keys(b)) == null ? void 0 : j[0]) == null ? void 0 : A.toUpperCase());
227
+ })) {
228
+ if ((a == null ? void 0 : a.length) === 0) return;
229
+ (k = a == null ? void 0 : a[(a == null ? void 0 : a.length) - 1]) != null && k.compData && a[(a == null ? void 0 : a.length) - 1].compData.push({
230
+ key: (G = (T = x) == null ? void 0 : T.find((f) => {
231
+ var O, j, A;
232
+ return ((O = f == null ? void 0 : f.key) == null ? void 0 : O.toUpperCase()) === ((A = (j = Object.keys(b)) == null ? void 0 : j[0]) == null ? void 0 : A.toUpperCase());
233
+ })) == null ? void 0 : G.value,
234
+ contents: (W = Object.values(b)) == null ? void 0 : W[0]
235
+ });
236
+ } else if ((F = (I = Object.keys(b)) == null ? void 0 : I[0]) != null && F.includes("$")) {
237
+ const f = (q = (H = Object.keys(l(b))) == null ? void 0 : H[0]) == null ? void 0 : q.split("$");
238
+ a[(a == null ? void 0 : a.length) - 1].compData.push({
239
+ key: (B = (z = x) == null ? void 0 : z.find((O) => {
240
+ var j, A;
241
+ return ((j = O == null ? void 0 : O.key) == null ? void 0 : j.toUpperCase()) === ((A = f == null ? void 0 : f[0]) == null ? void 0 : A.toUpperCase());
242
+ })) == null ? void 0 : B.value,
243
+ contents: (K = Object.values(b)) == null ? void 0 : K[0],
244
+ selectLabel: f == null ? void 0 : f[1]
245
+ });
246
+ }
247
+ return b;
248
+ }), n.contents = a, n;
249
+ })), c;
250
+ }), o;
251
+ };
252
+ export {
253
+ ue as e
254
+ };
@@ -0,0 +1,4 @@
1
+ "use strict";const C=require("./array-DQ6meJk7.cjs"),R=require("vue"),l=require("./cloneDeep-BH_aXSAH.cjs"),w=R.ref(0),X=e=>{let c;e.includes(`\r
2
+ `)?c=e.split(`\r
3
+ `).filter(t=>t.trim()!==""):c=e.split(`
4
+ `).filter(t=>t.trim()!=="");const p=[];let r="";for(const t of c)t.includes("{")||r.includes("{")||t.includes("[")||r.includes("[")||t.includes("【")||r.includes("【")||t.includes("(")||r.includes("(")||t.includes("(")||r.includes("(")||t.includes("/*")||r.includes("/*")?(r+=t.trim(),l.cloneDeep(r).split("{").length-1===l.cloneDeep(r).split("}").length-1&&l.cloneDeep(r).split("【").length-1===l.cloneDeep(r).split("】").length-1&&l.cloneDeep(r).split("[").length-1===l.cloneDeep(r).split("]").length-1&&l.cloneDeep(r).split("(").length-1===l.cloneDeep(r).split(")").length-1&&l.cloneDeep(r).split("(").length-1===l.cloneDeep(r).split(")").length-1&&l.cloneDeep(r).split("/*").length-1===l.cloneDeep(r).split("*/").length-1&&(p.push(r),r="")):p.push(t.trim());return p},Y=e=>{const[c,p]=e.split(/=(.+)/),r=c.replace(/['"]/g,"").trim(),t=p.replace(/^['"]|['"]$/g,"");return{key:r,value:t}},G=e=>{try{return JSON.parse(e),!0}catch{return!1}},K=e=>{try{const c=e.replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",").replace(/:/g,":").replace(/:\s*(?=,|}|$)/g,': ""');if(l.cloneDeep(c).split("{").length-1>1){let p=l.cloneDeep(c).replace(/^\{(.*)\}$/,"[$1]");if(G(p)&&!p.includes("$")||(p=p.replace(/"([^"]+)"\$([\w\u4e00-\u9fa5]+\([^)]*\))/g,'"$1$$$2"')),G(p)){const r=JSON.parse(p);let t=[];return r==null||r.forEach(u=>{var f;(f=Object.entries(l.cloneDeep(u)))==null||f.forEach(i=>{w.value++,t.push({id:w.value,key:(i==null?void 0:i[0])??"",value:(i==null?void 0:i[1])===""?"":i==null?void 0:i[1],width:Object.keys(l.cloneDeep(u)).length})})}),t}else return console.error("转换类型不正确:"),[]}else if(G(c)){const p=JSON.parse(c);return Object.entries(p).map(([r,t])=>(w.value++,{id:w.value,key:r,value:t===""?"":t,width:1}))}else return c}catch(c){return console.error("转换失败:",c),[]}},Z=(e,c)=>{var p;try{if((p=C.viewMainDict)!=null&&p.find(r=>(r==null?void 0:r.key)===c))return e.replace(/['"]/g,"").trim();if(l.cloneDeep(e).split("[").length-1>1){const r=l.cloneDeep(e).replace(/[’]|[‘]|[']/g,'"').replaceAll(/,/g,",").replaceAll("(","[").replaceAll(")","]").replaceAll("],]","]]");return JSON.parse(r)}else{const r=l.cloneDeep(e).replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",");if(G(r)){const t=JSON.parse(r);return Array.isArray(t)?t.map(u=>({label:u})):t}else return K(l.cloneDeep(e))}}catch(r){return console.error("解析失败:",r),e}},_=e=>({[e==null?void 0:e.key]:Z(e==null?void 0:e.value,e==null?void 0:e.key)}),S=e=>{try{if(l.cloneDeep(e).split("[").length-1>1){const c=l.cloneDeep(e).replace(/[’]|[‘]|[']/g,'"').replaceAll(/,/g,",").replaceAll("(","[").replaceAll(")","]").replaceAll("],]","]]");return JSON.parse(c)}else return JSON.parse(l.cloneDeep(e).replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",")).map(p=>({label:p}))}catch(c){return console.error("解析失败:",c),e}},v=e=>{const c=e.match(/\(([^)]+)\)/);return c?c[1]:""},ee=e=>{const c=e.match(/^([^(]+)\s*\(/);return c?c[1].trim():e},B=e=>e.replace(/'/g,"").replace(/"/g,"").replace(/{|}/g,"").split(":").map(c=>c.trim()).filter(c=>c).join("/"),re=e=>{var f,i;let c=[],p=[];const r=(f=l.cloneDeep(e))==null?void 0:f.map(d=>d==null?void 0:d.key),t=[...new Set((i=l.cloneDeep(r))==null?void 0:i.map(d=>v(d)))];t==null||t.forEach(d=>{let A=e==null?void 0:e.filter(o=>o.key.includes(d));A==null||A.forEach(o=>{o!=null&&o.key.includes("Menus")&&(c.push({key:"GroupName",value:B(o==null?void 0:o.value)}),p.push(B(o==null?void 0:o.value)))});let U=e==null?void 0:e.filter(o=>o.key.includes(d)&&!(o!=null&&o.key.includes("Menus")));U=U==null?void 0:U.map(o=>(o.key=ee(o.key),o));const x={key:"GroupContents",value:U};c.push(x)});const u={key:"Menus",value:p};return c.unshift(u),c},Q=e=>{var c,p;if(Array.isArray(Object.keys(e))&&((c=Object.keys(e))==null?void 0:c.length)>0){let r=[];return(p=Object.entries(e))==null||p.forEach(([t,u])=>{var i,d;let f=[];if(f.push(t),((i=Object.keys(u))==null?void 0:i.length)>0){let A=[];A.push((d=Q(u))==null?void 0:d[0]),f.push(A==null?void 0:A[0])}r.push(f)}),r}},te=(e,c)=>{var r;let p=c;return Array.isArray(Object.keys(e))&&((r=Object.entries(e))==null||r.forEach(([t,u])=>{let f=[t];if(typeof u=="object"&&u!==null){let i=Q(u);i==null||i.forEach(d=>{f.push(d)})}p.push(f)})),p},ce=e=>{const c={};return e.forEach(r=>{const t=r.split("/");let u=c;t.forEach(f=>{u[f]||(u[f]={}),u=u[f]})}),te(c,[])},se=e=>ce(e),le=e=>{var f,i,d,A,U,x,o;const c=X((i=(f=l.cloneDeep(e))==null?void 0:f.replace("(","("))==null?void 0:i.replace(")",")")),p=(A=(d=l.cloneDeep(c))==null?void 0:d.filter(s=>!s.includes("/*")))==null?void 0:A.map(s=>Y(s)),r=re(p),t=[];(U=l.cloneDeep(r))==null||U.forEach(s=>{var $,n,a,g,k,E,J,M,N;($=C.viewMainDict)!=null&&$.find(y=>{var D,m;return((D=y==null?void 0:y.key)==null?void 0:D.toUpperCase())===((m=s==null?void 0:s.key)==null?void 0:m.toUpperCase())})?t.push({comp:((a=(n=C.viewMainDict)==null?void 0:n.find(y=>{var D,m;return((D=y==null?void 0:y.key)==null?void 0:D.toUpperCase())===((m=s==null?void 0:s.key)==null?void 0:m.toUpperCase())}))==null?void 0:a.value)??"",name:(g=s==null?void 0:s.value)==null?void 0:g.replace(/[’]|[‘]|[']/g,""),compData:[]}):(k=C.viewChildDict)!=null&&k.find(y=>{var D,m;return((D=y==null?void 0:y.key)==null?void 0:D.toUpperCase())===((m=s==null?void 0:s.key)==null?void 0:m.toUpperCase())})&&((t==null?void 0:t.length)===0&&(E=s.key)!=null&&E.includes("Menus")&&t.push({comp:"Menu",name:"",compData:[]}),(J=t==null?void 0:t[(t==null?void 0:t.length)-1])!=null&&J.compData&&t[(t==null?void 0:t.length)-1].compData.push({key:(N=(M=C.viewChildDict)==null?void 0:M.find(y=>{var D,m;return((D=y==null?void 0:y.key)==null?void 0:D.toUpperCase())===((m=s==null?void 0:s.key)==null?void 0:m.toUpperCase())}))==null?void 0:N.value,contents:s==null?void 0:s.value}))});let u=(x=l.cloneDeep(t))==null?void 0:x.map(s=>{var $;return s!=null&&s.compData&&(s.compData=($=s==null?void 0:s.compData)==null?void 0:$.map(n=>{var a,g,k,E,J,M,N,y,D,m,T;if((n==null?void 0:n.key)==="formFlex")n.contents=((g=(a=n.contents)==null?void 0:a.replace(/[’]|[‘]|[']/g,""))==null?void 0:g.toUpperCase())!=="Vertical".toUpperCase();else if((n==null?void 0:n.key)==="groupContents")n.contents=(k=l.cloneDeep(n.contents))==null?void 0:k.map(P=>_(l.cloneDeep(P)));else if(Array.isArray(n==null?void 0:n.contents))n.contents=se(n.contents);else if(((J=(E=n==null?void 0:n.contents)==null?void 0:E.trim())!=null&&J.startsWith("[")||(N=(M=n.contents)==null?void 0:M.trim())!=null&&N.startsWith("【"))&&((D=(y=n.contents)==null?void 0:y.trim())!=null&&D.endsWith("]")||(T=(m=n.contents)==null?void 0:m.trim())!=null&&T.endsWith("】")))n.contents=S(l.cloneDeep(n.contents));else{if(!n.contents)return;n.contents=K(l.cloneDeep(n.contents))}return n})),s});return u=(o=l.cloneDeep(u))==null?void 0:o.map(s=>{var $;return(s==null?void 0:s.comp)==="Group"&&(s.compData=($=s.compData)==null?void 0:$.map(n=>{var g;let a=[];return(g=n.contents)==null||g.forEach(k=>{var E,J,M,N,y,D,m,T,P,L,V,W,q,I,F,H,z;if((E=C.viewMainDict)!=null&&E.find(h=>{var b,O,j;return((b=h==null?void 0:h.key)==null?void 0:b.toUpperCase())===((j=(O=Object.keys(k))==null?void 0:O[0])==null?void 0:j.toUpperCase())}))a.push({comp:(M=(J=C.viewMainDict)==null?void 0:J.find(h=>{var b,O,j;return((b=h==null?void 0:h.key)==null?void 0:b.toUpperCase())===((j=(O=Object.keys(k))==null?void 0:O[0])==null?void 0:j.toUpperCase())}))==null?void 0:M.value,name:(y=(N=Object.values(k))==null?void 0:N[0])==null?void 0:y.replace(/[’]|[‘]|[']/g,""),compData:[]});else if((D=C.viewChildDict)!=null&&D.find(h=>{var b,O,j;return((b=h==null?void 0:h.key)==null?void 0:b.toUpperCase())===((j=(O=Object.keys(k))==null?void 0:O[0])==null?void 0:j.toUpperCase())})){if((a==null?void 0:a.length)===0)return;(m=a==null?void 0:a[(a==null?void 0:a.length)-1])!=null&&m.compData&&a[(a==null?void 0:a.length)-1].compData.push({key:(P=(T=C.viewChildDict)==null?void 0:T.find(h=>{var b,O,j;return((b=h==null?void 0:h.key)==null?void 0:b.toUpperCase())===((j=(O=Object.keys(k))==null?void 0:O[0])==null?void 0:j.toUpperCase())}))==null?void 0:P.value,contents:(L=Object.values(k))==null?void 0:L[0]})}else if((W=(V=Object.keys(k))==null?void 0:V[0])!=null&&W.includes("$")){const h=(I=(q=Object.keys(l.cloneDeep(k)))==null?void 0:q[0])==null?void 0:I.split("$");a[(a==null?void 0:a.length)-1].compData.push({key:(H=(F=C.viewChildDict)==null?void 0:F.find(b=>{var O,j;return((O=b==null?void 0:b.key)==null?void 0:O.toUpperCase())===((j=h==null?void 0:h[0])==null?void 0:j.toUpperCase())}))==null?void 0:H.value,contents:(z=Object.values(k))==null?void 0:z[0],selectLabel:h==null?void 0:h[1]})}return k}),n.contents=a,n})),s}),u};exports.expandNewStringToJson=le;
@@ -1,8 +1,9 @@
1
1
  import { defineAsyncComponent as U, computed as D, onMounted as O, resolveComponent as G, createBlock as v, openBlock as C, withCtx as I, resolveDynamicComponent as N, defineComponent as k, ref as T, watch as q } from "vue";
2
- import { E as M, u as z, s as E } from "./menu-oGClEGzK.js";
3
- import { u as H } from "./modelComp-CqA1NVfH.js";
4
- import { c as f } from "./_plugin-vue_export-helper-B7R8Jogt.js";
5
- const g = U(() => import("./index-BvoThyOF.js"));
2
+ import { E as M } from "./index-D0v2_dMz.js";
3
+ import { u as z, s as E } from "./menu-BIINB-0Y.js";
4
+ import { u as H } from "./modelComp-B3sxj_Kp.js";
5
+ import { c as f } from "./cloneDeep-MKlVykeI.js";
6
+ const g = U(() => import("./index-DBKxwOZZ.js"));
6
7
  g.install = (u) => {
7
8
  u.component("ssMenu", g);
8
9
  };
@@ -12,64 +13,64 @@ const J = {
12
13
  name: String
13
14
  },
14
15
  setup(u) {
15
- const c = u, m = D(() => M[c.name]);
16
+ const m = u, p = D(() => M[m.name]);
16
17
  return O(() => {
17
- const p = Object.keys(M);
18
- console.log("iconComponent", m.value, c.name, M, p);
19
- }), (p, A) => {
18
+ const c = Object.keys(M);
19
+ console.log("iconComponent", p.value, m.name, M, c);
20
+ }), (c, A) => {
20
21
  const d = G("el-icon");
21
22
  return C(), v(d, null, {
22
23
  default: I(() => [
23
- (C(), v(N(m.value)))
24
+ (C(), v(N(p.value)))
24
25
  ]),
25
26
  _: 1
26
27
  });
27
28
  };
28
29
  }
29
- }, Y = k({
30
+ }, Z = k({
30
31
  name: "menu",
31
32
  components: {
32
33
  ssMenu: g,
33
34
  DynamicIcon: J
34
35
  },
35
36
  setup() {
36
- const u = z(), c = H(), { rawMenu: m, menuTriggerType: p } = E(u), { itemData: A } = E(c), d = T([]);
37
+ const u = z(), m = H(), { rawMenu: p, menuTriggerType: c } = E(u), { itemData: A } = E(m), d = T([]);
37
38
  let h;
38
39
  ((e) => {
39
40
  e[e.Menu = 0] = "Menu", e[e.FolderOpened = 1] = "FolderOpened";
40
41
  })(h || (h = {}));
41
42
  const S = (e) => {
42
- let n = [], s = [];
43
+ let o = [], s = [];
43
44
  return e == null || e.forEach((r) => {
44
- n = y(r, s);
45
- }), console.log("splitMenu", n), n;
46
- }, y = (e, n) => {
47
- const s = n, r = [];
48
- e == null || e.forEach((o) => {
49
- Array.isArray(o) ? r.push({ children: y(o, []) }) : r.push({ title: o });
45
+ o = y(r, s);
46
+ }), console.log("splitMenu", o), o;
47
+ }, y = (e, o) => {
48
+ const s = o, r = [];
49
+ e == null || e.forEach((n) => {
50
+ Array.isArray(n) ? r.push({ children: y(n, []) }) : r.push({ title: n });
50
51
  });
51
- let i = r.reduce((o, a) => (Object.entries(a).forEach(([t, l]) => {
52
- o[t] === void 0 ? l != null && l.title ? o[t] = [l] : o[t] = l : (Array.isArray(o[t]) || (o[t] = [{ title: o[t] }]), l != null && l.title || Array.isArray(l) ? o[t].push(l) : o[t].push({ title: l }));
53
- }), o), {});
52
+ let i = r.reduce((n, a) => (Object.entries(a).forEach(([t, l]) => {
53
+ n[t] === void 0 ? l != null && l.title ? n[t] = [l] : n[t] = l : (Array.isArray(n[t]) || (n[t] = [{ title: n[t] }]), l != null && l.title || Array.isArray(l) ? n[t].push(l) : n[t].push({ title: l }));
54
+ }), n), {});
54
55
  return i = F(f(i)), s.push(i), Array.isArray(s) && (s == null ? void 0 : s.length) > 1 ? s : s == null ? void 0 : s[0];
55
56
  }, F = (e) => {
56
- var n, s, r;
57
- return Array.isArray(e == null ? void 0 : e.title) && ((n = e == null ? void 0 : e.title) == null ? void 0 : n.length) === ((r = (s = e == null ? void 0 : e.title) == null ? void 0 : s.filter((i) => i.title)) == null ? void 0 : r.length) ? e == null ? void 0 : e.title : Array.isArray(e == null ? void 0 : e.children) ? P(e) : e;
57
+ var o, s, r;
58
+ return Array.isArray(e == null ? void 0 : e.title) && ((o = e == null ? void 0 : e.title) == null ? void 0 : o.length) === ((r = (s = e == null ? void 0 : e.title) == null ? void 0 : s.filter((i) => i.title)) == null ? void 0 : r.length) ? e == null ? void 0 : e.title : Array.isArray(e == null ? void 0 : e.children) ? P(e) : e;
58
59
  }, P = (e) => {
59
60
  var s;
60
- const n = e;
61
- return n.children = (s = n.children) == null ? void 0 : s.map((r) => {
61
+ const o = e;
62
+ return o.children = (s = o.children) == null ? void 0 : s.map((r) => {
62
63
  var i;
63
64
  return (i = r == null ? void 0 : r.title) != null && i.children ? r == null ? void 0 : r.title : r;
64
- }), n;
65
- }, b = (e, n = "", s = 0) => {
66
- var o;
67
- const r = f(A.value), i = (o = r == null ? void 0 : r.filter((a) => {
65
+ }), o;
66
+ }, b = (e, o = "", s = 0) => {
67
+ var n;
68
+ const r = f(A.value), i = (n = r == null ? void 0 : r.filter((a) => {
68
69
  var t;
69
70
  return ((t = a.comp) == null ? void 0 : t.toUpperCase()) === "GROUP";
70
- })) == null ? void 0 : o.map((a) => a.name);
71
+ })) == null ? void 0 : n.map((a) => a.name);
71
72
  return e == null ? void 0 : e.map((a) => {
72
- const t = n ? `${n}/${a.title}` : a.title, l = {
73
+ const t = o ? `${o}/${a.title}` : a.title, l = {
73
74
  ...a,
74
75
  path: t,
75
76
  level: s,
@@ -84,7 +85,7 @@ const J = {
84
85
  }), $ = (e) => {
85
86
  console.log("clickMenu", e), u.setMenuTriggerType("click"), u.setActiveMenuPath(e == null ? void 0 : e.path);
86
87
  }, R = (e) => {
87
- p.value === "click" ? u.setActiveMenuPath(e) : u.setMenuTriggerType("click");
88
+ c.value === "click" ? u.setActiveMenuPath(e) : u.setMenuTriggerType("click");
88
89
  }, j = (e) => {
89
90
  u.setActiveMenuPath(e);
90
91
  }, w = T([
@@ -113,17 +114,17 @@ const J = {
113
114
  value: "#1d7bef"
114
115
  }
115
116
  ]), B = () => {
116
- var n;
117
+ var o;
117
118
  const e = document.documentElement;
118
- (n = w.value) == null || n.forEach((s) => {
119
+ (o = w.value) == null || o.forEach((s) => {
119
120
  e.style.setProperty(s.name, s.value);
120
121
  });
121
122
  };
122
123
  return O(() => {
123
- }), q(() => m.value, (e) => {
124
- var n, s, r;
124
+ }), q(() => p.value, (e) => {
125
+ var o, s, r;
125
126
  if (e) {
126
- const i = (r = (s = (n = f(e)) == null ? void 0 : n.compData) == null ? void 0 : s[0]) == null ? void 0 : r.contents;
127
+ const i = (r = (s = (o = f(e)) == null ? void 0 : o.compData) == null ? void 0 : s[0]) == null ? void 0 : r.contents;
127
128
  d.value = S(i), console.log("rawMenu", _.value);
128
129
  } else
129
130
  u.setActiveMenuPath("");
@@ -139,5 +140,5 @@ const J = {
139
140
  }
140
141
  });
141
142
  export {
142
- Y as _
143
+ Z as _
143
144
  };
@@ -0,0 +1 @@
1
+ "use strict";const t=require("vue"),f=require("./index-zIb6b0kg.cjs"),g=require("./menu-B_Az9K_F.cjs"),F=require("./modelComp-DAsVXKA0.cjs"),A=require("./cloneDeep-BH_aXSAH.cjs"),y=t.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-sjmLPf8w.cjs")));y.install=c=>{c.component("ssMenu",y)};const R={__name:"index",props:{name:String},setup(c){const p=c,m=t.computed(()=>f.ElIcons[p.name]);return t.onMounted(()=>{const d=Object.keys(f.ElIcons);console.log("iconComponent",m.value,p.name,f.ElIcons,d)}),(d,b)=>{const h=t.resolveComponent("el-icon");return t.openBlock(),t.createBlock(h,null,{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(m.value)))]),_:1})}}},$=t.defineComponent({name:"menu",components:{ssMenu:y,DynamicIcon:R},setup(){const c=g.useMenuState(),p=F.useModelComp(),{rawMenu:m,menuTriggerType:d}=g.storeToRefs(c),{itemData:b}=g.storeToRefs(p),h=t.ref([]);let M;(e=>{e[e.Menu=0]="Menu",e[e.FolderOpened=1]="FolderOpened"})(M||(M={}));const T=e=>{let n=[],s=[];return e==null||e.forEach(r=>{n=_(r,s)}),console.log("splitMenu",n),n},_=(e,n)=>{const s=n,r=[];e==null||e.forEach(o=>{Array.isArray(o)?r.push({children:_(o,[])}):r.push({title:o})});let u=r.reduce((o,a)=>(Object.entries(a).forEach(([l,i])=>{o[l]===void 0?i!=null&&i.title?o[l]=[i]:o[l]=i:(Array.isArray(o[l])||(o[l]=[{title:o[l]}]),i!=null&&i.title||Array.isArray(i)?o[l].push(i):o[l].push({title:i}))}),o),{});return u=D(A.cloneDeep(u)),s.push(u),Array.isArray(s)&&(s==null?void 0:s.length)>1?s:s==null?void 0:s[0]},D=e=>{var n,s,r;return Array.isArray(e==null?void 0:e.title)&&((n=e==null?void 0:e.title)==null?void 0:n.length)===((r=(s=e==null?void 0:e.title)==null?void 0:s.filter(u=>u.title))==null?void 0:r.length)?e==null?void 0:e.title:Array.isArray(e==null?void 0:e.children)?E(e):e},E=e=>{var s;const n=e;return n.children=(s=n.children)==null?void 0:s.map(r=>{var u;return(u=r==null?void 0:r.title)!=null&&u.children?r==null?void 0:r.title:r}),n},v=(e,n="",s=0)=>{var o;const r=A.cloneDeep(b.value),u=(o=r==null?void 0:r.filter(a=>{var l;return((l=a.comp)==null?void 0:l.toUpperCase())==="GROUP"}))==null?void 0:o.map(a=>a.name);return e==null?void 0:e.map(a=>{const l=n?`${n}/${a.title}`:a.title,i={...a,path:l,level:s,icon:M[`${s}`],carryData:u==null?void 0:u.includes(l)};return a.children&&a.children.length>0&&(i.children=v(a.children,l,s+1)),i})},C=t.computed(()=>{const e=v(h.value);return console.log("temps",e),c.setMenus(e),e}),q=e=>{console.log("clickMenu",e),c.setMenuTriggerType("click"),c.setActiveMenuPath(e==null?void 0:e.path)},O=e=>{d.value==="click"?c.setActiveMenuPath(e):c.setMenuTriggerType("click")},P=e=>{c.setActiveMenuPath(e)},S=t.ref([{name:"--ssComponent-menu-bg",value:"#426ec4"},{name:"--ssComponent-submenu-hover-bg",value:"#00000033"},{name:"--ssComponent-submenu-open-bg",value:"#2DA0FF"},{name:"--ssComponent-submenu-open-inline-bg",value:"#1C4275"},{name:"--ssComponent-menuitem-hover-bg",value:"#1d7bef"},{name:"--ssComponent-menuitem-active-bg",value:"#1d7bef"}]),B=()=>{var n;const e=document.documentElement;(n=S.value)==null||n.forEach(s=>{e.style.setProperty(s.name,s.value)})};return t.onMounted(()=>{}),t.watch(()=>m.value,e=>{var n,s,r;if(e){const u=(r=(s=(n=A.cloneDeep(e))==null?void 0:n.compData)==null?void 0:s[0])==null?void 0:r.contents;h.value=T(u),console.log("rawMenu",C.value)}else c.setActiveMenuPath("")},{immediate:!0}),{renderMenuList:C,clickMenu:q,openMenu:O,closeMenu:P,changeMenuStyle:B}}});exports._sfc_main=$;