ss-component-new 1.1.151 → 1.1.152

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 (69) hide show
  1. package/dist/{crypto-BRyGpjGR.js → JSEncrypt-B36c1iN5.js} +227 -248
  2. package/dist/{crypto-CRbcEKIz.cjs → JSEncrypt-IYbV4kRj.cjs} +11 -11
  3. package/dist/array-B5nxRJHp.cjs +7 -0
  4. package/dist/array-C-lwCO1i.js +2202 -0
  5. package/dist/{cloneDeep-Cm2ut66T.js → cloneDeep-CgCzY78k.js} +48 -54
  6. package/dist/cloneDeep-CxrTGRsH.cjs +1 -0
  7. package/dist/{index-DcuEMWMM.js → index-8K6mkF_E.js} +5 -5
  8. package/dist/{index-BH36LQch.js → index-9KKNbfsI.js} +1 -1
  9. package/dist/{index-DyhHmlGD.js → index-AGAoe6VG.js} +1 -1
  10. package/dist/{index-CcxZZo6K.cjs → index-B3mhZiQc.cjs} +1 -1
  11. package/dist/{index-DqOy9nnX.js → index-BE7Nv7hp.js} +4 -4
  12. package/dist/{index-CsK9LWak.cjs → index-BTrQjr1x.cjs} +1 -1
  13. package/dist/{index-BQK2DuaH.js → index-BZRHBGvW.js} +57 -57
  14. package/dist/{index-dm-zOhNm.cjs → index-BZRbicur.cjs} +1 -1
  15. package/dist/{index-BUkyNn3m.cjs → index-BbsmiTkh.cjs} +1 -1
  16. package/dist/{index-BgY5srT7.cjs → index-BliW6t9E.cjs} +1 -1
  17. package/dist/{index-DoHr_nug.js → index-C9MD_Vo2.js} +4 -4
  18. package/dist/{index-BHjs6gMr.js → index-CH33xxMO.js} +2 -2
  19. package/dist/{index-wsyih2HQ.cjs → index-CJclws9U.cjs} +1 -1
  20. package/dist/{index-BZaGIyxe.cjs → index-CJdkK-Tq.cjs} +1 -1
  21. package/dist/index-CUmMX7CV.cjs +1 -0
  22. package/dist/{index-GvkFEReE.js → index-CZWm6qbu.js} +4 -4
  23. package/dist/{index-Bel0p329.js → index-ClNLhrtG.js} +39 -39
  24. package/dist/{index-Ckrm7F4u.js → index-Cqkb2uUU.js} +1 -1
  25. package/dist/{index-D-6CVrZh.js → index-D2EJHSnu.js} +1 -1
  26. package/dist/{index-Cxz9ADeg.cjs → index-D8EolGmN.cjs} +3 -3
  27. package/dist/{index-ODNyDte9.js → index-D91Wj22J.js} +5 -5
  28. package/dist/{index-C8mv9PET.js → index-DAGxCefs.js} +6 -6
  29. package/dist/{index-YajCTD4A.cjs → index-DFHrtGuu.cjs} +1 -1
  30. package/dist/{index-Ch7zPabE.cjs → index-DKGLFy-2.cjs} +1 -1
  31. package/dist/{index-CtTbyHOu.js → index-DODmz1Q7.js} +8 -9
  32. package/dist/{index-DjlDuRvf.cjs → index-DSzPe1Z2.cjs} +1 -1
  33. package/dist/index-DUWRIeGS.cjs +1 -0
  34. package/dist/{index-Nb7mXZOf.js → index-DVTwGhbs.js} +3 -3
  35. package/dist/{index-D9hjyDNL.cjs → index-D_RdY--B.cjs} +1 -1
  36. package/dist/{index-BaSc02sA.cjs → index-DrHrIV8U.cjs} +1 -1
  37. package/dist/{index-D_JFO4Ed.js → index-DwqHfSsz.js} +60 -60
  38. package/dist/{index-DORM2j0-.js → index-Dx-wXRtL.js} +262 -249
  39. package/dist/{index-CMue5Zek.cjs → index-DxlKtIWw.cjs} +1 -1
  40. package/dist/{index-C_Ek6N_z.js → index-F6nuN5lZ.js} +4 -4
  41. package/dist/{index-Cy23PxmQ.cjs → index-MpEh0WVC.cjs} +1 -1
  42. package/dist/{index-BlNU-ya_.js → index-d4tpMS9t.js} +5 -5
  43. package/dist/{index-C1sMNKRi.cjs → index-xMHtCwmX.cjs} +1 -1
  44. package/dist/{index-DXQEaxeL.cjs → index-y1F5FFwJ.cjs} +1 -1
  45. package/dist/{index.vue_vue_type_script_setup_true_lang-ClNwGHXE.cjs → index.vue_vue_type_script_setup_true_lang-COi-xyWc.cjs} +1 -1
  46. package/dist/{index.vue_vue_type_script_setup_true_lang-CuQ3xcyC.js → index.vue_vue_type_script_setup_true_lang-SUEsaZWz.js} +2 -2
  47. package/dist/index.vue_vue_type_style_index_0_scoped_baf99455_lang-2MY1GUPK.cjs +1 -0
  48. package/dist/index.vue_vue_type_style_index_0_scoped_baf99455_lang-CQWVBok8.js +9 -0
  49. package/dist/{index.vue_vue_type_style_index_0_scoped_bbb8ace9_lang-ClRL5aRq.cjs → index.vue_vue_type_style_index_0_scoped_bbb8ace9_lang-BhPhB5YO.cjs} +1 -1
  50. package/dist/{index.vue_vue_type_style_index_0_scoped_bbb8ace9_lang-BAlbShP-.js → index.vue_vue_type_style_index_0_scoped_bbb8ace9_lang-Drc1rCns.js} +3 -3
  51. package/dist/{login-DnBDEGHt.js → login-C63RqIyU.js} +2 -2
  52. package/dist/{login-aDjal4KC.cjs → login-DtKN5c4A.cjs} +1 -1
  53. package/dist/{main-Do8E5J_V.js → main-Cz1fAcOm.js} +4 -4
  54. package/dist/{main-ChEDt98s.cjs → main-Sh9ep4jh.cjs} +1 -1
  55. package/dist/{request-RC5ET7Nr.js → request-BLCreYdS.js} +1 -1
  56. package/dist/{request-BId7xEpo.cjs → request-DyC7pN3w.cjs} +1 -1
  57. package/dist/ss-component.cjs +1 -1
  58. package/dist/ss-component.css +1 -1
  59. package/dist/ss-component.js +6 -6
  60. package/dist/ss-component2.cjs +1 -1
  61. package/dist/ss-component2.js +1 -1
  62. package/package.json +1 -1
  63. package/dist/array-C09NLiVl.cjs +0 -7
  64. package/dist/array-CqhTXR28.js +0 -2348
  65. package/dist/cloneDeep-B6Av9vYT.cjs +0 -1
  66. package/dist/index-1TcDjOsz.cjs +0 -1
  67. package/dist/index-LX4uBOi3.cjs +0 -1
  68. package/dist/index.vue_vue_type_style_index_0_scoped_baf99455_lang-FY_pjpOg.js +0 -478
  69. package/dist/index.vue_vue_type_style_index_0_scoped_baf99455_lang-W4auoQ9V.cjs +0 -1
@@ -1,478 +0,0 @@
1
- import { ref as re } from "vue";
2
- import { c as C, g as N, u as F, d as ne, p as se } from "./index-BH36LQch.js";
3
- import { s as ye, u as oe } from "./menu-XcYMZJLY.js";
4
- import { u as ce } from "./login-DnBDEGHt.js";
5
- import { d as Y } from "./array-CqhTXR28.js";
6
- import { c as m } from "./cloneDeep-Cm2ut66T.js";
7
- import { g as le } from "./crypto-BRyGpjGR.js";
8
- re([]);
9
- const B = (o) => {
10
- var t, s, c, f;
11
- const a = o;
12
- let r = [];
13
- a.compData = (t = a.compData) == null ? void 0 : t.filter((n) => (n == null ? void 0 : n.key) !== "tableContents" && (n == null ? void 0 : n.key) !== "tableIndex");
14
- const e = (c = (s = m(a.compData)) == null ? void 0 : s.find((n) => (n == null ? void 0 : n.key) === "tableIndexColumn")) == null ? void 0 : c.contents;
15
- return (f = m(a.compData)) == null || f.forEach((n) => {
16
- if ((n == null ? void 0 : n.key) !== "tableIndexColumn" && (n == null ? void 0 : n.key) !== "header")
17
- r.push(n);
18
- else if ((n == null ? void 0 : n.key) === "header") {
19
- let l = n.contents;
20
- e && (l != null && l.every((y) => Array.isArray(y)) ? l == null || l[0].unshift({ label: e }) : l.unshift({ label: e })), r.push({
21
- key: "header",
22
- contents: l
23
- });
24
- }
25
- }), a.compData = r, a;
26
- }, J = (o) => {
27
- var s, c, f, n, l;
28
- const a = (s = o.compData) == null ? void 0 : s.filter((y) => (y == null ? void 0 : y.key) === "tableContents" || (y == null ? void 0 : y.key) === "tableIndex"), r = (f = (c = a == null ? void 0 : a.find((y) => (y == null ? void 0 : y.key) === "tableIndex")) == null ? void 0 : c.contents) == null ? void 0 : f.map((y) => y.label), e = (n = a == null ? void 0 : a.find((y) => (y == null ? void 0 : y.key) === "tableContents")) == null ? void 0 : n.contents;
29
- let t = [];
30
- return (r == null ? void 0 : r.length) > 0 && (e != null && e.every((y) => Array.isArray(y))) ? t = r == null ? void 0 : r.map((y, g) => e[g] ? [y, ...e[g]] : [y]) : Array.isArray(e == null ? void 0 : e[0]) && ((l = e == null ? void 0 : e[0]) != null && l.every((y) => Array.isArray(y))) ? t = e == null ? void 0 : e[0] : Array.isArray(e == null ? void 0 : e[0]) ? t = e : t.push(e), t;
31
- }, pe = (o) => {
32
- const a = [];
33
- function r(e) {
34
- !e || e.length === 0 || (a.push(e == null ? void 0 : e.map((t) => ({ label: t.label }))), e == null || e.forEach((t) => {
35
- t != null && t.children && (t == null ? void 0 : t.children.length) > 0 && r(t == null ? void 0 : t.children);
36
- }));
37
- }
38
- return r(o), a;
39
- }, ie = (o) => {
40
- const a = [];
41
- function r(e, t = []) {
42
- !e || e.length === 0 || (a.push({
43
- key: t == null ? void 0 : t.filter((s) => !Array.isArray(s)),
44
- value: e
45
- }), e == null || e.forEach((s) => {
46
- s != null && s.some((c) => Array.isArray(c)) && r(s.find((c) => Array.isArray(c)), s);
47
- }));
48
- }
49
- return r(o), a;
50
- }, ue = (o) => {
51
- const a = [];
52
- function r(e) {
53
- !e || e.length === 0 || (a.push(e == null ? void 0 : e.map((t) => t == null ? void 0 : t.filter((s) => !Array.isArray(s)))), e == null || e.forEach((t) => {
54
- t != null && t.some((s) => Array.isArray(s)) && r(t.find((s) => Array.isArray(s)));
55
- }));
56
- }
57
- return r(o), a;
58
- }, fe = (o) => {
59
- const a = [];
60
- function r(e) {
61
- var t;
62
- !e || e.length === 0 || (e != null && e.every((s) => !Array.isArray(s)) ? a.push(e) : (a.push((t = e == null ? void 0 : e.map((s) => s == null ? void 0 : s.filter((c) => !Array.isArray(c)))) == null ? void 0 : t[0]), e == null || e.forEach((s) => {
63
- s != null && s.some((c) => Array.isArray(c)) && r(s.find((c) => Array.isArray(c)));
64
- })));
65
- }
66
- return r(o), a;
67
- }, ge = (o, a) => {
68
- let r;
69
- function e(t, s, c = 1) {
70
- var n;
71
- if (!t || t.length === 0) return;
72
- const f = (n = m(s)) == null ? void 0 : n.map((l) => l == null ? void 0 : l.filter((y) => !Array.isArray(y)));
73
- return f != null && f.find((l) => Y(l, t == null ? void 0 : t.key)) ? (s == null || s.forEach((l) => {
74
- !e(t, l.find((g) => Array.isArray(g))) && Y(l.filter((g) => !Array.isArray(g)), t == null ? void 0 : t.key) && (r = {
75
- type: c,
76
- contents: l.filter((g) => !Array.isArray(g))
77
- });
78
- }), !0) : !1;
79
- }
80
- return e(o, a, 0), r;
81
- }, Z = (o, a) => {
82
- function r(e, t) {
83
- return !e || e.length === 0 || e == null ? void 0 : e.map((c, f) => {
84
- var l, y;
85
- let n = c;
86
- return n.unshift((l = t == null ? void 0 : t[f]) == null ? void 0 : l.label), n.some((g) => Array.isArray(g)) && (n[n.length - 1] = r(n.find((g) => Array.isArray(g)), (y = t == null ? void 0 : t[f]) == null ? void 0 : y.children)), n;
87
- });
88
- }
89
- return r(o, a);
90
- }, Q = (o) => {
91
- var r, e, t, s, c, f, n, l, y, g, h, D, k, u, K, E, x, S, V, A, M, T, d, O, j;
92
- const a = o;
93
- if ((o == null ? void 0 : o.comp) === "Table") {
94
- if ((t = (e = (r = o.compData) == null ? void 0 : r.find((p) => (p == null ? void 0 : p.key) === "tableIndex")) == null ? void 0 : e.contents) != null && t.every((p) => !(p != null && p.children)) || !((s = o.compData) != null && s.find((p) => (p == null ? void 0 : p.key) === "tableIndex")))
95
- return ((n = (f = (c = a.compData) == null ? void 0 : c.find((p) => (p == null ? void 0 : p.key) === "tableContents")) == null ? void 0 : f.contents) == null ? void 0 : n.length) === 1 && ((h = (g = (y = (l = a.compData) == null ? void 0 : l.find((p) => (p == null ? void 0 : p.key) === "tableContents")) == null ? void 0 : y.contents) == null ? void 0 : g[0]) != null && h.every((p) => Array.isArray(p))) ? (a.compData = (D = a.compData) == null ? void 0 : D.map((p) => {
96
- var b;
97
- return (p == null ? void 0 : p.key) === "tableContents" && (p.contents = (b = p.contents) == null ? void 0 : b[0]), p;
98
- }), [a]) : [a];
99
- {
100
- let p = [];
101
- const b = a.compData, z = (k = m(b)) == null ? void 0 : k.find((i) => (i == null ? void 0 : i.key) === "tableIndexColumn"), P = (u = m(b)) == null ? void 0 : u.find((i) => (i == null ? void 0 : i.key) === "extraButton"), G = (K = m(b)) == null ? void 0 : K.find((i) => (i == null ? void 0 : i.key) === "rowButton"), w = fe((x = (E = m(b)) == null ? void 0 : E.find((i) => (i == null ? void 0 : i.key) === "header")) == null ? void 0 : x.contents), U = (S = m(b)) == null ? void 0 : S.find((i) => (i == null ? void 0 : i.key) === "tableIndex"), ee = ue((A = (V = m(b)) == null ? void 0 : V.find((i) => (i == null ? void 0 : i.key) === "tableContents")) == null ? void 0 : A.contents), ae = Z((T = (M = m(b)) == null ? void 0 : M.find((i) => (i == null ? void 0 : i.key) === "tableContents")) == null ? void 0 : T.contents, U == null ? void 0 : U.contents), te = ie(Z((O = (d = m(b)) == null ? void 0 : d.find((i) => (i == null ? void 0 : i.key) === "tableContents")) == null ? void 0 : O.contents, U == null ? void 0 : U.contents));
102
- if (U)
103
- return (j = pe(U.contents)) == null || j.forEach((i, q) => {
104
- var X;
105
- let L = [];
106
- L.push({
107
- key: "tableIndex",
108
- contents: i
109
- }), L.push(z), L.push(P), L.push(G), L.push({
110
- key: "tableContents",
111
- contents: ee[q]
112
- }), L.push({
113
- key: "header",
114
- contents: w != null && w[q] ? [w == null ? void 0 : w[q]] : [w == null ? void 0 : w[0]]
115
- }), p.push({
116
- comp: "Table",
117
- compData: L,
118
- name: "",
119
- parentTableContents: ((X = ge(te[q], ae)) == null ? void 0 : X.contents) ?? ""
120
- });
121
- }), p;
122
- }
123
- } else
124
- return [a];
125
- }, _ = async (o) => {
126
- let a = [];
127
- o == null || o.forEach((r) => {
128
- var e;
129
- (e = r.compData) == null || e.forEach((t) => {
130
- var s;
131
- (s = t.contents) == null || s.forEach((c) => {
132
- var f;
133
- Array.isArray(c) ? c == null || c.forEach((n) => {
134
- var l;
135
- (l = Q(m(n))) == null || l.forEach(async (y) => {
136
- var g, h, D, k;
137
- if (n.comp === "Table") {
138
- const u = await C({
139
- key: {
140
- systemKey: sessionStorage.getItem("systemKey"),
141
- pageKey: r.name,
142
- type: "structure",
143
- version: 1,
144
- parentTable: (y == null ? void 0 : y.parentTableContents) ?? ""
145
- },
146
- value: {
147
- pageData: {
148
- comp: (g = B(m(y))) == null ? void 0 : g.comp,
149
- compData: (h = B(m(y))) == null ? void 0 : h.compData,
150
- name: (D = B(m(y))) == null ? void 0 : D.name
151
- }
152
- }
153
- }), K = u.data.result, E = (k = J(m(y))) == null ? void 0 : k.map(async (x) => {
154
- var M;
155
- const S = await C({
156
- key: {
157
- systemKey: sessionStorage.getItem("systemKey"),
158
- pageKey: r.name,
159
- type: "data",
160
- tableId: K
161
- },
162
- value: {
163
- tableData: x
164
- }
165
- }), A = await ((M = (await N({
166
- key: {
167
- systemKey: sessionStorage.getItem("systemKey"),
168
- pageKey: r.name,
169
- type: "structure",
170
- parentTable: x
171
- }
172
- })).data.result) == null ? void 0 : M.map(async (T) => await F({
173
- id: T.id,
174
- key: {
175
- systemKey: T.key.systemKey,
176
- pageKey: T.key.pageKey,
177
- type: T.key.type,
178
- version: T.key.version,
179
- parentTable: S.data.result
180
- }
181
- })));
182
- return a.push(A), S;
183
- });
184
- a.push(u), a.push(E);
185
- } else if ((y == null ? void 0 : y.key) === "extraButton") {
186
- const u = await C({
187
- key: {
188
- systemKey: sessionStorage.getItem("systemKey"),
189
- pageKey: r.name,
190
- type: "structureMethod",
191
- version: 1
192
- },
193
- value: {
194
- pageData: y.value
195
- }
196
- });
197
- a.push(u);
198
- } else {
199
- const u = await C({
200
- key: {
201
- systemKey: sessionStorage.getItem("systemKey"),
202
- pageKey: r.name,
203
- type: "structure",
204
- version: 1,
205
- parentTable: (y == null ? void 0 : y.parentTableContents) ?? ""
206
- },
207
- value: {
208
- pageData: y
209
- }
210
- });
211
- a.push(u);
212
- }
213
- });
214
- }) : (f = Q(m(c))) == null || f.forEach(async (n) => {
215
- var l, y, g, h;
216
- if (c.comp === "Table") {
217
- const D = await C({
218
- key: {
219
- systemKey: sessionStorage.getItem("systemKey"),
220
- pageKey: r.name,
221
- type: "structure",
222
- version: 1,
223
- parentTable: (n == null ? void 0 : n.parentTableContents) ?? ""
224
- },
225
- value: {
226
- pageData: {
227
- comp: (l = B(m(n))) == null ? void 0 : l.comp,
228
- compData: (y = B(m(n))) == null ? void 0 : y.compData,
229
- name: (g = B(m(n))) == null ? void 0 : g.name
230
- }
231
- }
232
- }), k = D.data.result, u = (h = J(m(n))) == null ? void 0 : h.map(async (K) => {
233
- var V;
234
- const E = await C({
235
- key: {
236
- systemKey: sessionStorage.getItem("systemKey"),
237
- pageKey: r.name,
238
- type: "data",
239
- tableId: k
240
- },
241
- value: {
242
- tableData: K
243
- }
244
- }), S = await ((V = (await N({
245
- key: {
246
- parentTable: K,
247
- systemKey: sessionStorage.getItem("systemKey"),
248
- pageKey: r.name,
249
- type: "structure"
250
- }
251
- })).data.result) == null ? void 0 : V.map(async (A) => await F({
252
- id: A.id,
253
- key: {
254
- systemKey: A.key.systemKey,
255
- pageKey: A.key.pageKey,
256
- type: A.key.type,
257
- version: A.key.version,
258
- parentTable: E.data.result
259
- }
260
- })));
261
- return a.push(S), E;
262
- });
263
- a.push(D), a.push(u);
264
- } else if ((n == null ? void 0 : n.key) === "extraButton") {
265
- const D = await C({
266
- key: {
267
- systemKey: sessionStorage.getItem("systemKey"),
268
- pageKey: r.name,
269
- type: "structureMethod",
270
- version: 1
271
- },
272
- value: {
273
- pageData: n.value
274
- }
275
- });
276
- a.push(D);
277
- } else {
278
- const D = await C({
279
- key: {
280
- systemKey: sessionStorage.getItem("systemKey"),
281
- pageKey: r.name,
282
- type: "structure",
283
- version: 1,
284
- parentTable: (n == null ? void 0 : n.parentTableContents) ?? ""
285
- },
286
- value: {
287
- pageData: n
288
- }
289
- });
290
- a.push(D);
291
- }
292
- });
293
- });
294
- });
295
- }), await Promise.all(a);
296
- }, $ = async (o) => {
297
- let a = [];
298
- o == null || o.forEach((r) => {
299
- var e;
300
- (e = r.compData) == null || e.forEach((t) => {
301
- var s;
302
- (s = t.contents) == null || s.forEach((c) => {
303
- var n, l, y, g;
304
- const f = (l = (n = c == null ? void 0 : c.compData) == null ? void 0 : n.find((h) => (h == null ? void 0 : h.key) === "extra")) == null ? void 0 : l.value;
305
- (g = (y = c.compData) == null ? void 0 : y.filter((h) => (h == null ? void 0 : h.key) !== "extra")) == null || g.forEach((h) => {
306
- var D;
307
- (D = Q(m(h))) == null || D.forEach(async (k) => {
308
- var u, K, E, x, S, V, A, M;
309
- if (k.comp === "Table") {
310
- const T = await C({
311
- key: {
312
- systemKey: sessionStorage.getItem("systemKey"),
313
- pageKey: r.name,
314
- type: "method",
315
- version: 1,
316
- methodName: (E = (u = r.name) == null ? void 0 : u.split("/")) == null ? void 0 : E[((K = r.name) == null ? void 0 : K.split("/").length) - 1],
317
- methodKey: (x = Object.values(f[0])) == null ? void 0 : x[0],
318
- parentTable: (k == null ? void 0 : k.parentTableContents) ?? ""
319
- },
320
- value: {
321
- pageData: {
322
- comp: (S = B(m(k))) == null ? void 0 : S.comp,
323
- compData: (V = B(m(k))) == null ? void 0 : V.compData,
324
- name: (A = B(m(k))) == null ? void 0 : A.name
325
- }
326
- }
327
- }), d = T.data.result, O = (M = J(m(k))) == null ? void 0 : M.map(async (j) => {
328
- var P, G;
329
- const p = await C({
330
- key: {
331
- systemKey: sessionStorage.getItem("systemKey"),
332
- pageKey: r.name,
333
- type: "methodData",
334
- methodKey: (P = Object.values(f[0])) == null ? void 0 : P[0],
335
- tableId: d
336
- },
337
- value: {
338
- tableData: j
339
- }
340
- }), z = (G = (await N({
341
- key: {
342
- parentTable: j,
343
- systemKey: sessionStorage.getItem("systemKey"),
344
- pageKey: r.name,
345
- type: "method"
346
- }
347
- })).data.result) == null ? void 0 : G.map(async (w) => await F({
348
- id: w.id,
349
- key: {
350
- systemKey: w.key.systemKey,
351
- pageKey: w.key.pageKey,
352
- type: w.key.type,
353
- methodKey: w.key.methodKey,
354
- parentTable: p.data.result
355
- }
356
- }));
357
- return a.push(z), p;
358
- });
359
- a.push(T), a.push(O);
360
- }
361
- });
362
- });
363
- });
364
- });
365
- }), await Promise.all(a);
366
- }, he = ce(se), { isStructureExist: me } = ye(he), De = oe(), W = (o) => o == null ? void 0 : o.map((a) => (a.contents && (a.contents = a.contents.filter((r) => {
367
- var e;
368
- return ((e = r.comp) == null ? void 0 : e.toUpperCase()) !== "CALCULATOR";
369
- })), a.compData && (a.compData = W(a.compData)), a)), I = (o) => o == null ? void 0 : o.map((a) => (a.contents && (a.contents = a.contents.filter((r) => {
370
- var e;
371
- return ((e = r.comp) == null ? void 0 : e.toUpperCase()) === "CALCULATOR";
372
- })), a.compData && (a.compData = I(a.compData)), a)), R = (o) => {
373
- const a = I(o);
374
- let r = [];
375
- return a == null || a.forEach((e) => {
376
- var t;
377
- (t = e.compData) != null && t.find((s) => {
378
- var c;
379
- return (c = s == null ? void 0 : s.contents) == null ? void 0 : c.find((f) => (f == null ? void 0 : f.comp) === "calculator");
380
- }) && r.push(e);
381
- }), r;
382
- }, H = async (o) => {
383
- var a, r, e, t;
384
- try {
385
- const s = await C({
386
- key: {
387
- systemKey: sessionStorage.getItem("systemKey"),
388
- pageKey: "menu",
389
- type: "structure"
390
- },
391
- value: {
392
- pageData: o
393
- }
394
- });
395
- if (((a = s == null ? void 0 : s.data) == null ? void 0 : a.code) === 200) {
396
- const c = (e = (r = o == null ? void 0 : o.compData) == null ? void 0 : r[0]) == null ? void 0 : e.contents;
397
- De.setRawMenus(c ?? []);
398
- }
399
- return (t = s == null ? void 0 : s.data) == null ? void 0 : t.code;
400
- } catch (s) {
401
- return Promise.reject(s);
402
- }
403
- }, Ke = async () => {
404
- var s, c, f, n, l, y;
405
- const o = N({
406
- key: {
407
- systemKey: sessionStorage.getItem("systemKey"),
408
- pageKey: "menu"
409
- }
410
- }), a = N({
411
- key: {
412
- systemKey: sessionStorage.getItem("systemKey"),
413
- type: "structure"
414
- }
415
- }), r = await Promise.all([o, a]), e = r == null ? void 0 : r[0], t = r == null ? void 0 : r[1];
416
- return {
417
- menuExist: ((s = e == null ? void 0 : e.data) == null ? void 0 : s.result) && ((f = (c = e == null ? void 0 : e.data) == null ? void 0 : c.result) == null ? void 0 : f.length) > 0,
418
- structureExist: ((n = t == null ? void 0 : t.data) == null ? void 0 : n.result) && ((y = (l = t == null ? void 0 : t.data) == null ? void 0 : l.result) == null ? void 0 : y.length) > 0
419
- };
420
- }, v = async () => {
421
- var o;
422
- try {
423
- const a = le(), r = await C({
424
- key: {
425
- systemKey: sessionStorage.getItem("systemKey"),
426
- pageKey: "secret",
427
- type: "system"
428
- },
429
- value: {
430
- cryptoInfo: {
431
- publicKey: a.publicKey,
432
- privateKey: a.privateKey
433
- }
434
- }
435
- });
436
- return ((o = r == null ? void 0 : r.data) == null ? void 0 : o.code) === 200;
437
- } catch (a) {
438
- throw a;
439
- }
440
- }, Se = async (o) => {
441
- var t, s, c, f, n, l;
442
- const a = m(o);
443
- console.log("savePageDataAsync", o, me.value);
444
- const { menuExist: r, structureExist: e } = await Ke();
445
- if (console.log("promises", r, e), sessionStorage.getItem("systemKey") && !r && !e) {
446
- const y = (t = W(a)) == null ? void 0 : t.filter((h) => {
447
- var D;
448
- return ((D = h == null ? void 0 : h.comp) == null ? void 0 : D.toUpperCase()) !== "MENU";
449
- }), g = a == null ? void 0 : a.find((h) => h.comp === "Menu");
450
- await H(g), v(), await _(y), await $((s = R(m(o))) == null ? void 0 : s.filter((h) => {
451
- var D;
452
- return ((D = h == null ? void 0 : h.comp) == null ? void 0 : D.toUpperCase()) !== "MENU";
453
- }));
454
- } else {
455
- const g = (f = (c = (await N({
456
- key: {
457
- systemKey: sessionStorage.getItem("systemKey")
458
- }
459
- })).data.result) == null ? void 0 : c.filter((u) => {
460
- var K;
461
- return ((K = u == null ? void 0 : u.key) == null ? void 0 : K.layer) !== "superAdmin";
462
- })) == null ? void 0 : f.map((u) => u.id), h = g == null ? void 0 : g.map(async (u) => await ne({
463
- id: u
464
- }));
465
- await Promise.all(h);
466
- const D = (n = W(a)) == null ? void 0 : n.filter((u) => {
467
- var K;
468
- return ((K = u == null ? void 0 : u.comp) == null ? void 0 : K.toUpperCase()) !== "MENU";
469
- }), k = a == null ? void 0 : a.find((u) => u.comp === "Menu");
470
- await H(k), v(), await _(D), await $((l = R(m(o))) == null ? void 0 : l.filter((u) => {
471
- var K;
472
- return ((K = u == null ? void 0 : u.comp) == null ? void 0 : K.toUpperCase()) !== "MENU";
473
- }));
474
- }
475
- };
476
- export {
477
- Se as s
478
- };
@@ -1 +0,0 @@
1
- "use strict";const te=require("vue"),K=require("./index-DjlDuRvf.cjs"),R=require("./menu-CxtX8L48.cjs"),ne=require("./login-aDjal4KC.cjs"),Q=require("./array-C09NLiVl.cjs"),h=require("./cloneDeep-B6Av9vYT.cjs"),re=require("./crypto-CRbcEKIz.cjs");te.ref([]);const q=y=>{var t,s,c,f;const a=y;let n=[];a.compData=(t=a.compData)==null?void 0:t.filter(r=>(r==null?void 0:r.key)!=="tableContents"&&(r==null?void 0:r.key)!=="tableIndex");const e=(c=(s=h.cloneDeep(a.compData))==null?void 0:s.find(r=>(r==null?void 0:r.key)==="tableIndexColumn"))==null?void 0:c.contents;return(f=h.cloneDeep(a.compData))==null||f.forEach(r=>{if((r==null?void 0:r.key)!=="tableIndexColumn"&&(r==null?void 0:r.key)!=="header")n.push(r);else if((r==null?void 0:r.key)==="header"){let p=r.contents;e&&(p!=null&&p.every(o=>Array.isArray(o))?p==null||p[0].unshift({label:e}):p.unshift({label:e})),n.push({key:"header",contents:p})}}),a.compData=n,a},G=y=>{var s,c,f,r,p;const a=(s=y.compData)==null?void 0:s.filter(o=>(o==null?void 0:o.key)==="tableContents"||(o==null?void 0:o.key)==="tableIndex"),n=(f=(c=a==null?void 0:a.find(o=>(o==null?void 0:o.key)==="tableIndex"))==null?void 0:c.contents)==null?void 0:f.map(o=>o.label),e=(r=a==null?void 0:a.find(o=>(o==null?void 0:o.key)==="tableContents"))==null?void 0:r.contents;let t=[];return(n==null?void 0:n.length)>0&&(e!=null&&e.every(o=>Array.isArray(o)))?t=n==null?void 0:n.map((o,D)=>e[D]?[o,...e[D]]:[o]):Array.isArray(e==null?void 0:e[0])&&((p=e==null?void 0:e[0])!=null&&p.every(o=>Array.isArray(o)))?t=e==null?void 0:e[0]:Array.isArray(e==null?void 0:e[0])?t=e:t.push(e),t},se=y=>{const a=[];function n(e){!e||e.length===0||(a.push(e==null?void 0:e.map(t=>({label:t.label}))),e==null||e.forEach(t=>{t!=null&&t.children&&(t==null?void 0:t.children.length)>0&&n(t==null?void 0:t.children)}))}return n(y),a},oe=y=>{const a=[];function n(e,t=[]){!e||e.length===0||(a.push({key:t==null?void 0:t.filter(s=>!Array.isArray(s)),value:e}),e==null||e.forEach(s=>{s!=null&&s.some(c=>Array.isArray(c))&&n(s.find(c=>Array.isArray(c)),s)}))}return n(y),a},ye=y=>{const a=[];function n(e){!e||e.length===0||(a.push(e==null?void 0:e.map(t=>t==null?void 0:t.filter(s=>!Array.isArray(s)))),e==null||e.forEach(t=>{t!=null&&t.some(s=>Array.isArray(s))&&n(t.find(s=>Array.isArray(s)))}))}return n(y),a},ce=y=>{const a=[];function n(e){var t;!e||e.length===0||(e!=null&&e.every(s=>!Array.isArray(s))?a.push(e):(a.push((t=e==null?void 0:e.map(s=>s==null?void 0:s.filter(c=>!Array.isArray(c))))==null?void 0:t[0]),e==null||e.forEach(s=>{s!=null&&s.some(c=>Array.isArray(c))&&n(s.find(c=>Array.isArray(c)))})))}return n(y),a},pe=(y,a)=>{let n;function e(t,s,c=1){var r;if(!t||t.length===0)return;const f=(r=h.cloneDeep(s))==null?void 0:r.map(p=>p==null?void 0:p.filter(o=>!Array.isArray(o)));return f!=null&&f.find(p=>Q.equalArrays(p,t==null?void 0:t.key))?(s==null||s.forEach(p=>{!e(t,p.find(D=>Array.isArray(D)))&&Q.equalArrays(p.filter(D=>!Array.isArray(D)),t==null?void 0:t.key)&&(n={type:c,contents:p.filter(D=>!Array.isArray(D))})}),!0):!1}return e(y,a,0),n},W=(y,a)=>{function n(e,t){return!e||e.length===0||e==null?void 0:e.map((c,f)=>{var p,o;let r=c;return r.unshift((p=t==null?void 0:t[f])==null?void 0:p.label),r.some(D=>Array.isArray(D))&&(r[r.length-1]=n(r.find(D=>Array.isArray(D)),(o=t==null?void 0:t[f])==null?void 0:o.children)),r})}return n(y,a)},z=y=>{var n,e,t,s,c,f,r,p,o,D,g,A,k,u,m,E,x,S,V,b,M,T,d,L,I;const a=y;if((y==null?void 0:y.comp)==="Table"){if((t=(e=(n=y.compData)==null?void 0:n.find(l=>(l==null?void 0:l.key)==="tableIndex"))==null?void 0:e.contents)!=null&&t.every(l=>!(l!=null&&l.children))||!((s=y.compData)!=null&&s.find(l=>(l==null?void 0:l.key)==="tableIndex")))return((r=(f=(c=a.compData)==null?void 0:c.find(l=>(l==null?void 0:l.key)==="tableContents"))==null?void 0:f.contents)==null?void 0:r.length)===1&&((g=(D=(o=(p=a.compData)==null?void 0:p.find(l=>(l==null?void 0:l.key)==="tableContents"))==null?void 0:o.contents)==null?void 0:D[0])!=null&&g.every(l=>Array.isArray(l)))?(a.compData=(A=a.compData)==null?void 0:A.map(l=>{var C;return(l==null?void 0:l.key)==="tableContents"&&(l.contents=(C=l.contents)==null?void 0:C[0]),l}),[a]):[a];{let l=[];const C=a.compData,O=(k=h.cloneDeep(C))==null?void 0:k.find(i=>(i==null?void 0:i.key)==="tableIndexColumn"),N=(u=h.cloneDeep(C))==null?void 0:u.find(i=>(i==null?void 0:i.key)==="extraButton"),P=(m=h.cloneDeep(C))==null?void 0:m.find(i=>(i==null?void 0:i.key)==="rowButton"),w=ce((x=(E=h.cloneDeep(C))==null?void 0:E.find(i=>(i==null?void 0:i.key)==="header"))==null?void 0:x.contents),U=(S=h.cloneDeep(C))==null?void 0:S.find(i=>(i==null?void 0:i.key)==="tableIndex"),v=ye((b=(V=h.cloneDeep(C))==null?void 0:V.find(i=>(i==null?void 0:i.key)==="tableContents"))==null?void 0:b.contents),ee=W((T=(M=h.cloneDeep(C))==null?void 0:M.find(i=>(i==null?void 0:i.key)==="tableContents"))==null?void 0:T.contents,U==null?void 0:U.contents),ae=oe(W((L=(d=h.cloneDeep(C))==null?void 0:d.find(i=>(i==null?void 0:i.key)==="tableContents"))==null?void 0:L.contents,U==null?void 0:U.contents));if(U)return(I=se(U.contents))==null||I.forEach((i,j)=>{var J;let B=[];B.push({key:"tableIndex",contents:i}),B.push(O),B.push(N),B.push(P),B.push({key:"tableContents",contents:v[j]}),B.push({key:"header",contents:w!=null&&w[j]?[w==null?void 0:w[j]]:[w==null?void 0:w[0]]}),l.push({comp:"Table",compData:B,name:"",parentTableContents:((J=pe(ae[j],ee))==null?void 0:J.contents)??""})}),l}}else return[a]},X=async y=>{let a=[];y==null||y.forEach(n=>{var e;(e=n.compData)==null||e.forEach(t=>{var s;(s=t.contents)==null||s.forEach(c=>{var f;Array.isArray(c)?c==null||c.forEach(r=>{var p;(p=z(h.cloneDeep(r)))==null||p.forEach(async o=>{var D,g,A,k;if(r.comp==="Table"){const u=await K.createInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:n.name,type:"structure",version:1,parentTable:(o==null?void 0:o.parentTableContents)??""},value:{pageData:{comp:(D=q(h.cloneDeep(o)))==null?void 0:D.comp,compData:(g=q(h.cloneDeep(o)))==null?void 0:g.compData,name:(A=q(h.cloneDeep(o)))==null?void 0:A.name}}}),m=u.data.result,E=(k=G(h.cloneDeep(o)))==null?void 0:k.map(async x=>{var M;const S=await K.createInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:n.name,type:"data",tableId:m},value:{tableData:x}}),b=await((M=(await K.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:n.name,type:"structure",parentTable:x}})).data.result)==null?void 0:M.map(async T=>await K.updateInsofDataApi({id:T.id,key:{systemKey:T.key.systemKey,pageKey:T.key.pageKey,type:T.key.type,version:T.key.version,parentTable:S.data.result}})));return a.push(b),S});a.push(u),a.push(E)}else if((o==null?void 0:o.key)==="extraButton"){const u=await K.createInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:n.name,type:"structureMethod",version:1},value:{pageData:o.value}});a.push(u)}else{const u=await K.createInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:n.name,type:"structure",version:1,parentTable:(o==null?void 0:o.parentTableContents)??""},value:{pageData:o}});a.push(u)}})}):(f=z(h.cloneDeep(c)))==null||f.forEach(async r=>{var p,o,D,g;if(c.comp==="Table"){const A=await K.createInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:n.name,type:"structure",version:1,parentTable:(r==null?void 0:r.parentTableContents)??""},value:{pageData:{comp:(p=q(h.cloneDeep(r)))==null?void 0:p.comp,compData:(o=q(h.cloneDeep(r)))==null?void 0:o.compData,name:(D=q(h.cloneDeep(r)))==null?void 0:D.name}}}),k=A.data.result,u=(g=G(h.cloneDeep(r)))==null?void 0:g.map(async m=>{var V;const E=await K.createInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:n.name,type:"data",tableId:k},value:{tableData:m}}),S=await((V=(await K.getInsofDataApi({key:{parentTable:m,systemKey:sessionStorage.getItem("systemKey"),pageKey:n.name,type:"structure"}})).data.result)==null?void 0:V.map(async b=>await K.updateInsofDataApi({id:b.id,key:{systemKey:b.key.systemKey,pageKey:b.key.pageKey,type:b.key.type,version:b.key.version,parentTable:E.data.result}})));return a.push(S),E});a.push(A),a.push(u)}else if((r==null?void 0:r.key)==="extraButton"){const A=await K.createInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:n.name,type:"structureMethod",version:1},value:{pageData:r.value}});a.push(A)}else{const A=await K.createInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:n.name,type:"structure",version:1,parentTable:(r==null?void 0:r.parentTableContents)??""},value:{pageData:r}});a.push(A)}})})})}),await Promise.all(a)},Y=async y=>{let a=[];y==null||y.forEach(n=>{var e;(e=n.compData)==null||e.forEach(t=>{var s;(s=t.contents)==null||s.forEach(c=>{var r,p,o,D;const f=(p=(r=c==null?void 0:c.compData)==null?void 0:r.find(g=>(g==null?void 0:g.key)==="extra"))==null?void 0:p.value;(D=(o=c.compData)==null?void 0:o.filter(g=>(g==null?void 0:g.key)!=="extra"))==null||D.forEach(g=>{var A;(A=z(h.cloneDeep(g)))==null||A.forEach(async k=>{var u,m,E,x,S,V,b,M;if(k.comp==="Table"){const T=await K.createInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:n.name,type:"method",version:1,methodName:(E=(u=n.name)==null?void 0:u.split("/"))==null?void 0:E[((m=n.name)==null?void 0:m.split("/").length)-1],methodKey:(x=Object.values(f[0]))==null?void 0:x[0],parentTable:(k==null?void 0:k.parentTableContents)??""},value:{pageData:{comp:(S=q(h.cloneDeep(k)))==null?void 0:S.comp,compData:(V=q(h.cloneDeep(k)))==null?void 0:V.compData,name:(b=q(h.cloneDeep(k)))==null?void 0:b.name}}}),d=T.data.result,L=(M=G(h.cloneDeep(k)))==null?void 0:M.map(async I=>{var N,P;const l=await K.createInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:n.name,type:"methodData",methodKey:(N=Object.values(f[0]))==null?void 0:N[0],tableId:d},value:{tableData:I}}),O=(P=(await K.getInsofDataApi({key:{parentTable:I,systemKey:sessionStorage.getItem("systemKey"),pageKey:n.name,type:"method"}})).data.result)==null?void 0:P.map(async w=>await K.updateInsofDataApi({id:w.id,key:{systemKey:w.key.systemKey,pageKey:w.key.pageKey,type:w.key.type,methodKey:w.key.methodKey,parentTable:l.data.result}}));return a.push(O),l});a.push(T),a.push(L)}})})})})}),await Promise.all(a)},le=ne.useLoginState(K.pinia),{isStructureExist:ie}=R.storeToRefs(le),ue=R.useMenuState(),F=y=>y==null?void 0:y.map(a=>(a.contents&&(a.contents=a.contents.filter(n=>{var e;return((e=n.comp)==null?void 0:e.toUpperCase())!=="CALCULATOR"})),a.compData&&(a.compData=F(a.compData)),a)),H=y=>y==null?void 0:y.map(a=>(a.contents&&(a.contents=a.contents.filter(n=>{var e;return((e=n.comp)==null?void 0:e.toUpperCase())==="CALCULATOR"})),a.compData&&(a.compData=H(a.compData)),a)),Z=y=>{const a=H(y);let n=[];return a==null||a.forEach(e=>{var t;(t=e.compData)!=null&&t.find(s=>{var c;return(c=s==null?void 0:s.contents)==null?void 0:c.find(f=>(f==null?void 0:f.comp)==="calculator")})&&n.push(e)}),n},_=async y=>{var a,n,e,t;try{const s=await K.createInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu",type:"structure"},value:{pageData:y}});if(((a=s==null?void 0:s.data)==null?void 0:a.code)===200){const c=(e=(n=y==null?void 0:y.compData)==null?void 0:n[0])==null?void 0:e.contents;ue.setRawMenus(c??[])}return(t=s==null?void 0:s.data)==null?void 0:t.code}catch(s){return Promise.reject(s)}},fe=async()=>{var s,c,f,r,p,o;const y=K.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),a=K.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),type:"structure"}}),n=await Promise.all([y,a]),e=n==null?void 0:n[0],t=n==null?void 0:n[1];return{menuExist:((s=e==null?void 0:e.data)==null?void 0:s.result)&&((f=(c=e==null?void 0:e.data)==null?void 0:c.result)==null?void 0:f.length)>0,structureExist:((r=t==null?void 0:t.data)==null?void 0:r.result)&&((o=(p=t==null?void 0:t.data)==null?void 0:p.result)==null?void 0:o.length)>0}},$=async()=>{var y;try{const a=re.generateKeyPair(),n=await K.createInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"secret",type:"system"},value:{cryptoInfo:{publicKey:a.publicKey,privateKey:a.privateKey}}});return((y=n==null?void 0:n.data)==null?void 0:y.code)===200}catch(a){throw a}},De=async y=>{var t,s,c,f,r,p;const a=h.cloneDeep(y);console.log("savePageDataAsync",y,ie.value);const{menuExist:n,structureExist:e}=await fe();if(console.log("promises",n,e),sessionStorage.getItem("systemKey")&&!n&&!e){const o=(t=F(a))==null?void 0:t.filter(g=>{var A;return((A=g==null?void 0:g.comp)==null?void 0:A.toUpperCase())!=="MENU"}),D=a==null?void 0:a.find(g=>g.comp==="Menu");await _(D),$(),await X(o),await Y((s=Z(h.cloneDeep(y)))==null?void 0:s.filter(g=>{var A;return((A=g==null?void 0:g.comp)==null?void 0:A.toUpperCase())!=="MENU"}))}else{const D=(f=(c=(await K.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey")}})).data.result)==null?void 0:c.filter(u=>{var m;return((m=u==null?void 0:u.key)==null?void 0:m.layer)!=="superAdmin"}))==null?void 0:f.map(u=>u.id),g=D==null?void 0:D.map(async u=>await K.deleteInsofDataApi({id:u}));await Promise.all(g);const A=(r=F(a))==null?void 0:r.filter(u=>{var m;return((m=u==null?void 0:u.comp)==null?void 0:m.toUpperCase())!=="MENU"}),k=a==null?void 0:a.find(u=>u.comp==="Menu");await _(k),$(),await X(A),await Y((p=Z(h.cloneDeep(y)))==null?void 0:p.filter(u=>{var m;return((m=u==null?void 0:u.comp)==null?void 0:m.toUpperCase())!=="MENU"}))}};exports.savePageDataAsync=De;