@das-fed/web 6.4.0-hot.27 → 6.4.0-hot.29
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/esm-map.json +2 -1
- package/{index-CpODRa8I.js → index-BuTRpK6M.js} +1 -1
- package/index-C4VcBGCZ.js +82 -0
- package/index-C4VcBGCZ.js.gz +0 -0
- package/index-IEBouahL.js +13744 -0
- package/index-IEBouahL.js.gz +0 -0
- package/index.js +19 -18
- package/package.json +8 -6
- package/packages/i18n/index.js +171 -38
- package/packages/i18n/index.js.gz +0 -0
- package/packages/layout/index.js +165 -169
- package/packages/layout/index.js.gz +0 -0
- package/packages/layout/style.css +2 -2
- package/packages/layout/style.css.gz +0 -0
- package/packages/main-app-framework/index-BTLDhEQV.js +82 -0
- package/packages/main-app-framework/index-BTLDhEQV.js.gz +0 -0
- package/packages/main-app-framework/index-BsIJHNDG.js +12274 -0
- package/packages/main-app-framework/index-BsIJHNDG.js.gz +0 -0
- package/packages/main-app-framework/{index-m4zk_olI.js → index-CrLW-KdV.js} +1 -1
- package/packages/main-app-framework/index.js +3 -2
- package/packages/main-app-framework/style.css +1 -1
- package/packages/main-app-framework/style.css.gz +0 -0
- package/packages/micro-frontend/index.js +199 -205
- package/packages/micro-frontend/index.js.gz +0 -0
- package/packages/style/style.css +1 -1
- package/packages/style/style.css.gz +0 -0
- package/style.css +2 -2
- package/style.css.gz +0 -0
- package/types/i18n/global.d.ts +573 -0
- package/types/i18n/index.d.ts +4 -3
- package/types/main-app-framework/components/person-set-dialog/src/api.d.ts +2 -0
- package/types/main-app-framework/components/person-set-dialog/src/components/index.d.ts +2 -0
- package/types/main-app-framework/components/person-set-dialog/src/components/set-home/api.d.ts +20 -0
- package/types/main-app-framework/components/person-set-dialog/src/components/set-home/use-link-form/hooks/use-builtIn-dialog.d.ts +19 -0
- package/types/main-app-framework/components/person-set-dialog/src/components/set-home/use-link-form/hooks/use-notBuiltIn-dialog.d.ts +22 -0
- package/types/main-app-framework/constant/index.d.ts +1 -1
- package/types/main-app-framework/data-track/api.d.ts +2 -0
- package/types/main-app-framework/data-track/index.d.ts +2 -0
- package/types/main-app-framework/i18n/index.d.ts +518 -0
- package/types/main-app-framework/index.d.ts +1 -0
- package/types/main-app-framework/init-config/get-project-config/api.d.ts +3 -2
- package/types/main-app-framework/init-config/get-system-config/api.d.ts +2 -0
- package/types/main-app-framework/init-config/get-system-config/index.d.ts +2 -2
- package/types/main-app-framework/init-config/get-tenant-config/api.d.ts +1 -1
- package/types/main-app-framework/utils/src/get-portal-url/crypto.d.ts +14 -0
- package/types/main-app-framework/utils/src/get-portal-url/encrypt.d.ts +42 -0
- package/types/main-app-framework/utils/src/get-portal-url/generate-url.d.ts +4 -0
- package/types/main-app-framework/utils/src/get-portal-url/handle-portal-params.d.ts +2 -0
- package/types/main-app-framework/utils/src/get-portal-url/index.d.ts +2 -0
- package/types/main-app-framework/utils/src/get-portal-url/type.d.ts +16 -0
- package/types/main-app-framework/utils/src/set-common-info.d.ts +4 -2
- package/types/main-app-framework/utils/src/tools.d.ts +5 -1
- package/i18n-collection/en.js +0 -93
- package/i18n-collection/zh-CN.js +0 -93
- package/index-BiVgxNT8.js +0 -75
- package/index-BiVgxNT8.js.gz +0 -0
- package/index-Bokomj-R.js +0 -7444
- package/index-Bokomj-R.js.gz +0 -0
- package/packages/main-app-framework/index-B9fx9Od2.js +0 -75
- package/packages/main-app-framework/index-B9fx9Od2.js.gz +0 -0
- package/packages/main-app-framework/index-Dblko0RX.js +0 -6097
- package/packages/main-app-framework/index-Dblko0RX.js.gz +0 -0
|
@@ -1,30 +1,24 @@
|
|
|
1
1
|
import '@das-fed/web/packages/micro-frontend/style.css';
|
|
2
|
-
import { ref as w, watch as M, reactive as C, getCurrentScope as ue, onScopeDispose as de, unref as I, getCurrentInstance as pe, onMounted as me, nextTick as ne, defineComponent as x, computed as D, openBlock as E, createElementBlock as N, Fragment as
|
|
3
|
-
import { DasWebLayout as ye, DasWebNav as Me, DasWebMenu as
|
|
4
|
-
const
|
|
5
|
-
let h = null, A = null,
|
|
2
|
+
import { ref as w, watch as M, reactive as C, getCurrentScope as ue, onScopeDispose as de, unref as I, getCurrentInstance as pe, onMounted as me, nextTick as ne, defineComponent as x, computed as D, openBlock as E, createElementBlock as N, Fragment as z, renderList as fe, withDirectives as ve, createBlock as se, vShow as he, createCommentVNode as Ae, mergeProps as we, withCtx as O, renderSlot as V, createVNode as T, onActivated as ge } from "vue";
|
|
3
|
+
import { DasWebLayout as ye, DasWebNav as Me, DasWebMenu as Le, DasWebTabs as _e } from "@das-fed/web/packages/layout/index";
|
|
4
|
+
const W = w("/das-micro-app"), f = w([]), k = w(!1), F = w([]), R = w(!0);
|
|
5
|
+
let h = null, A = null, _ = null;
|
|
6
6
|
const b = (e, t, n) => {
|
|
7
|
-
var c
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
if (r.entry.startsWith("/") || r.entry.match(location.origin)) {
|
|
11
|
-
(a = (c = r.dom) == null ? void 0 : c.contentWindow) == null || a.postMessage({ type: t, data: n });
|
|
12
|
-
return;
|
|
13
|
-
}
|
|
14
|
-
(s = (i = r.dom) == null ? void 0 : i.contentWindow) == null || s.postMessage({ type: t, data: n }, r.entry);
|
|
15
|
-
}
|
|
7
|
+
var c;
|
|
8
|
+
const { origin: s } = new URL(location.href);
|
|
9
|
+
(c = window.self) == null || c.postMessage({ type: t, data: n }, s);
|
|
16
10
|
}, q = (e, t) => {
|
|
17
|
-
var
|
|
11
|
+
var s;
|
|
18
12
|
const { origin: n } = new URL(location.href);
|
|
19
|
-
(
|
|
13
|
+
(s = window.self) == null || s.postMessage({ type: e, data: t }, n);
|
|
20
14
|
}, be = () => {
|
|
21
15
|
A || (A || (A = {}), window.addEventListener(
|
|
22
16
|
"message",
|
|
23
17
|
(e) => {
|
|
24
18
|
const { type: t, source: n } = e.data || {};
|
|
25
19
|
if (n !== "react-devtools-content-script" && A[t])
|
|
26
|
-
for (const
|
|
27
|
-
A[t][
|
|
20
|
+
for (const s in A[t])
|
|
21
|
+
A[t][s](e.data);
|
|
28
22
|
},
|
|
29
23
|
!1
|
|
30
24
|
));
|
|
@@ -58,7 +52,7 @@ const b = (e, t, n) => {
|
|
|
58
52
|
}, Q = async (e) => {
|
|
59
53
|
await Promise.all(
|
|
60
54
|
f.value.filter((t) => t.loaded).map((t) => new Promise(async (n) => {
|
|
61
|
-
t.dom || await new Promise((
|
|
55
|
+
t.dom || await new Promise((s) => M(() => t.dom, s)), setTimeout(() => {
|
|
62
56
|
b(t.name, "sessionStorage", e), n(!0);
|
|
63
57
|
}, 0);
|
|
64
58
|
}))
|
|
@@ -66,15 +60,15 @@ const b = (e, t, n) => {
|
|
|
66
60
|
}, d = {
|
|
67
61
|
loadMicroApp: (e) => {
|
|
68
62
|
k.value = !0;
|
|
69
|
-
const t = f.value.find((
|
|
70
|
-
if (!
|
|
63
|
+
const t = f.value.find((o) => o.name === e), n = f.value.find((o) => o.actived), s = !!t, c = !(t != null && t.loaded), a = t == null ? void 0 : t.actived;
|
|
64
|
+
if (!s) {
|
|
71
65
|
n && (n.actived = !1);
|
|
72
66
|
return;
|
|
73
67
|
}
|
|
74
68
|
if (t.isFirstActived = !0, c) {
|
|
75
69
|
t.src = t.entry;
|
|
76
|
-
const
|
|
77
|
-
|
|
70
|
+
const o = f.value.find((r) => r.actived);
|
|
71
|
+
o && (o.actived = !1), t.loaded = !0, t.actived = !0;
|
|
78
72
|
return;
|
|
79
73
|
}
|
|
80
74
|
if (!a) {
|
|
@@ -107,22 +101,22 @@ const b = (e, t, n) => {
|
|
|
107
101
|
});
|
|
108
102
|
},
|
|
109
103
|
setMicroAppRoute: async (e, t, n) => {
|
|
110
|
-
const
|
|
111
|
-
if (!
|
|
112
|
-
const c = n.path || n, a = n.query || {},
|
|
104
|
+
const s = f.value.find((r) => r.name === t);
|
|
105
|
+
if (!s || !s.loaded || !s.actived || (s.dom || await new Promise((r) => M(() => s.dom, r)), !s.actived)) return s;
|
|
106
|
+
const c = n.path || n, a = n.query || {}, o = n.params || {};
|
|
113
107
|
return e.push({
|
|
114
108
|
path: `/${t}${c}`,
|
|
115
109
|
query: a,
|
|
116
110
|
// @ts-ignore
|
|
117
|
-
params:
|
|
111
|
+
params: o
|
|
118
112
|
}), setTimeout(() => {
|
|
119
|
-
const { isFirstActived:
|
|
113
|
+
const { isFirstActived: r } = s;
|
|
120
114
|
b(t, "router", {
|
|
121
|
-
cmd:
|
|
115
|
+
cmd: r ? "replace" : "push",
|
|
122
116
|
route: n,
|
|
123
117
|
microAppName: t
|
|
124
|
-
}),
|
|
125
|
-
}, 0),
|
|
118
|
+
}), r && (s.isFirstActived = !1);
|
|
119
|
+
}, 0), s;
|
|
126
120
|
},
|
|
127
121
|
sendMessageToMicroApp: b,
|
|
128
122
|
sendMessageToMainApp: q,
|
|
@@ -146,33 +140,33 @@ const b = (e, t, n) => {
|
|
|
146
140
|
},
|
|
147
141
|
addMicroAppLifeCycleListener: (e, t) => {
|
|
148
142
|
const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8);
|
|
149
|
-
|
|
150
|
-
const
|
|
151
|
-
|
|
143
|
+
_ || (_ = {});
|
|
144
|
+
const s = () => {
|
|
145
|
+
_[n] && delete _[n];
|
|
152
146
|
};
|
|
153
|
-
return
|
|
147
|
+
return _[n] = {
|
|
154
148
|
type: e,
|
|
155
149
|
handler: async (c) => await t(c),
|
|
156
|
-
remove:
|
|
157
|
-
}, { remove:
|
|
150
|
+
remove: s
|
|
151
|
+
}, { remove: s };
|
|
158
152
|
},
|
|
159
153
|
triggerMicroAppLifeCycleListener: (e, t, n) => {
|
|
160
154
|
var a;
|
|
161
|
-
const
|
|
162
|
-
for (const
|
|
163
|
-
const
|
|
164
|
-
|
|
165
|
-
c &&
|
|
155
|
+
const s = _, { autoRemove: c = !1 } = n || {};
|
|
156
|
+
for (const o in s) {
|
|
157
|
+
const r = s[o];
|
|
158
|
+
r.type === e && ((a = r == null ? void 0 : r.handler) == null || a.call(r, t).then(() => {
|
|
159
|
+
c && r.remove();
|
|
166
160
|
}));
|
|
167
161
|
}
|
|
168
162
|
},
|
|
169
163
|
reloadMicroAppRoute: async (e, t) => {
|
|
170
|
-
const n = f.value.find((
|
|
171
|
-
n && (!n.loaded || !n.actived || (n.dom || await new Promise((
|
|
164
|
+
const n = f.value.find((s) => s.name === e);
|
|
165
|
+
n && (!n.loaded || !n.actived || (n.dom || await new Promise((s) => M(() => n.dom, s)), b(e, "route", { cmd: "reload", path: t })));
|
|
172
166
|
},
|
|
173
167
|
unloadMicroAppRoute: async (e, t) => {
|
|
174
|
-
const n = f.value.find((
|
|
175
|
-
n && (!n.loaded || !n.actived || (n.dom || await new Promise((
|
|
168
|
+
const n = f.value.find((s) => s.name === e);
|
|
169
|
+
n && (!n.loaded || !n.actived || (n.dom || await new Promise((s) => M(() => n.dom, s)), b(e, "route", { cmd: "unload", path: t })));
|
|
176
170
|
},
|
|
177
171
|
setMainAppLayoutVisible: (e) => {
|
|
178
172
|
q("layoutVisible", { visible: e });
|
|
@@ -235,20 +229,20 @@ const b = (e, t, n) => {
|
|
|
235
229
|
l.searchConfig = e;
|
|
236
230
|
},
|
|
237
231
|
triggerEventListener: (e, t, n) => {
|
|
238
|
-
var
|
|
239
|
-
const
|
|
240
|
-
for (const
|
|
241
|
-
const
|
|
242
|
-
|
|
243
|
-
(
|
|
244
|
-
c &&
|
|
232
|
+
var o;
|
|
233
|
+
const s = l.eventListeners, { autoRemove: c = !1 } = n || {}, a = [];
|
|
234
|
+
for (const r in s) {
|
|
235
|
+
const i = s[r];
|
|
236
|
+
i.type === e && a.push(
|
|
237
|
+
(o = i == null ? void 0 : i.handler) == null ? void 0 : o.call(i, t).then(() => {
|
|
238
|
+
c && i.remove();
|
|
245
239
|
})
|
|
246
240
|
);
|
|
247
241
|
}
|
|
248
242
|
return Promise.all(a).then(() => !0).catch(() => !1);
|
|
249
243
|
},
|
|
250
244
|
addEventListener: (e, t) => {
|
|
251
|
-
const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8),
|
|
245
|
+
const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8), s = () => {
|
|
252
246
|
l.eventListeners[n] && delete l.eventListeners[n];
|
|
253
247
|
};
|
|
254
248
|
return l.eventListeners[n] = {
|
|
@@ -260,9 +254,9 @@ const b = (e, t, n) => {
|
|
|
260
254
|
throw a;
|
|
261
255
|
}
|
|
262
256
|
},
|
|
263
|
-
remove:
|
|
257
|
+
remove: s
|
|
264
258
|
}, {
|
|
265
|
-
remove:
|
|
259
|
+
remove: s
|
|
266
260
|
};
|
|
267
261
|
}
|
|
268
262
|
}, g = C({
|
|
@@ -288,20 +282,20 @@ const b = (e, t, n) => {
|
|
|
288
282
|
g.popupClassName = e;
|
|
289
283
|
},
|
|
290
284
|
triggerEventListener: (e, t, n) => {
|
|
291
|
-
var
|
|
292
|
-
const
|
|
293
|
-
for (const
|
|
294
|
-
const
|
|
295
|
-
|
|
296
|
-
(
|
|
297
|
-
c &&
|
|
285
|
+
var o;
|
|
286
|
+
const s = g.eventListeners, { autoRemove: c = !1 } = n || {}, a = [];
|
|
287
|
+
for (const r in s) {
|
|
288
|
+
const i = s[r];
|
|
289
|
+
i.type === e && a.push(
|
|
290
|
+
(o = i == null ? void 0 : i.handler) == null ? void 0 : o.call(i, t).then(() => {
|
|
291
|
+
c && i.remove();
|
|
298
292
|
})
|
|
299
293
|
);
|
|
300
294
|
}
|
|
301
295
|
return Promise.all(a).then(() => !0).catch(() => !1);
|
|
302
296
|
},
|
|
303
297
|
addEventListener: (e, t) => {
|
|
304
|
-
const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8),
|
|
298
|
+
const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8), s = () => {
|
|
305
299
|
g.eventListeners[n] && delete g.eventListeners[n];
|
|
306
300
|
};
|
|
307
301
|
return g.eventListeners[n] = {
|
|
@@ -313,9 +307,9 @@ const b = (e, t, n) => {
|
|
|
313
307
|
throw a;
|
|
314
308
|
}
|
|
315
309
|
},
|
|
316
|
-
remove:
|
|
310
|
+
remove: s
|
|
317
311
|
}, {
|
|
318
|
-
remove:
|
|
312
|
+
remove: s
|
|
319
313
|
};
|
|
320
314
|
}
|
|
321
315
|
}, v = C({
|
|
@@ -342,20 +336,20 @@ const b = (e, t, n) => {
|
|
|
342
336
|
v.activeItem = e;
|
|
343
337
|
},
|
|
344
338
|
triggerEventListener: (e, t, n) => {
|
|
345
|
-
var
|
|
346
|
-
const
|
|
347
|
-
for (const
|
|
348
|
-
const
|
|
349
|
-
|
|
350
|
-
(
|
|
351
|
-
c &&
|
|
339
|
+
var o;
|
|
340
|
+
const s = v.eventListeners, { autoRemove: c = !1 } = n || {}, a = [];
|
|
341
|
+
for (const r in s) {
|
|
342
|
+
const i = s[r];
|
|
343
|
+
i.type === e && a.push(
|
|
344
|
+
(o = i == null ? void 0 : i.handler) == null ? void 0 : o.call(i, t).then(() => {
|
|
345
|
+
c && i.remove();
|
|
352
346
|
})
|
|
353
347
|
);
|
|
354
348
|
}
|
|
355
349
|
return Promise.all(a).then(() => !0).catch(() => !1);
|
|
356
350
|
},
|
|
357
351
|
addEventListener: (e, t) => {
|
|
358
|
-
const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8),
|
|
352
|
+
const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8), s = () => {
|
|
359
353
|
v.eventListeners[n] && delete v.eventListeners[n];
|
|
360
354
|
};
|
|
361
355
|
return v.eventListeners[n] = {
|
|
@@ -367,29 +361,29 @@ const b = (e, t, n) => {
|
|
|
367
361
|
throw a;
|
|
368
362
|
}
|
|
369
363
|
},
|
|
370
|
-
remove:
|
|
364
|
+
remove: s
|
|
371
365
|
}, {
|
|
372
|
-
remove:
|
|
366
|
+
remove: s
|
|
373
367
|
};
|
|
374
368
|
}
|
|
375
369
|
}, P = C({
|
|
376
370
|
eventListeners: {}
|
|
377
371
|
}), Pe = {
|
|
378
372
|
triggerEventListener: (e, t, n) => {
|
|
379
|
-
var
|
|
380
|
-
const
|
|
381
|
-
for (const
|
|
382
|
-
const
|
|
383
|
-
|
|
384
|
-
(
|
|
385
|
-
c &&
|
|
373
|
+
var o;
|
|
374
|
+
const s = P.eventListeners, { autoRemove: c = !1 } = n || {}, a = [];
|
|
375
|
+
for (const r in s) {
|
|
376
|
+
const i = s[r];
|
|
377
|
+
i.type === e && a.push(
|
|
378
|
+
(o = i == null ? void 0 : i.handler) == null ? void 0 : o.call(i, t).then(() => {
|
|
379
|
+
c && i.remove();
|
|
386
380
|
})
|
|
387
381
|
);
|
|
388
382
|
}
|
|
389
383
|
return Promise.all(a).then(() => !0).catch(() => !1);
|
|
390
384
|
},
|
|
391
385
|
addEventListener: (e, t) => {
|
|
392
|
-
const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8),
|
|
386
|
+
const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8), s = () => {
|
|
393
387
|
P.eventListeners[n] && delete P.eventListeners[n];
|
|
394
388
|
};
|
|
395
389
|
return P.eventListeners[n] = {
|
|
@@ -401,23 +395,23 @@ const b = (e, t, n) => {
|
|
|
401
395
|
throw a;
|
|
402
396
|
}
|
|
403
397
|
},
|
|
404
|
-
remove:
|
|
398
|
+
remove: s
|
|
405
399
|
}, {
|
|
406
|
-
remove:
|
|
400
|
+
remove: s
|
|
407
401
|
};
|
|
408
402
|
}
|
|
409
|
-
},
|
|
403
|
+
}, B = C({
|
|
410
404
|
visible: !1,
|
|
411
405
|
style: {}
|
|
412
406
|
}), Ce = {
|
|
413
407
|
set: (e, t) => {
|
|
414
|
-
|
|
408
|
+
B.visible = e, t || (t = {}), t.transition || (t.transition = "all 0.3s"), t && (B.style = t);
|
|
415
409
|
}
|
|
416
410
|
}, Oe = {
|
|
417
411
|
nav: l,
|
|
418
412
|
menu: g,
|
|
419
413
|
tab: v,
|
|
420
|
-
overlay:
|
|
414
|
+
overlay: B,
|
|
421
415
|
iframeView: P,
|
|
422
416
|
visible: w(!0)
|
|
423
417
|
}, G = {
|
|
@@ -430,16 +424,16 @@ const b = (e, t, n) => {
|
|
|
430
424
|
setTheme: (e) => {
|
|
431
425
|
j.setTheme(e), H.setTheme(e), U.setTheme(e);
|
|
432
426
|
}
|
|
433
|
-
},
|
|
427
|
+
}, re = (e, t) => {
|
|
434
428
|
const n = e.__vccOpts || e;
|
|
435
|
-
for (const [
|
|
436
|
-
n[
|
|
429
|
+
for (const [s, c] of t)
|
|
430
|
+
n[s] = c;
|
|
437
431
|
return n;
|
|
438
432
|
};
|
|
439
433
|
var J;
|
|
440
|
-
const
|
|
434
|
+
const $ = typeof window < "u", Te = (e) => typeof e == "string", Fe = () => {
|
|
441
435
|
};
|
|
442
|
-
|
|
436
|
+
$ && ((J = window == null ? void 0 : window.navigator) != null && J.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
|
|
443
437
|
function ae(e) {
|
|
444
438
|
return typeof e == "function" ? e() : I(e);
|
|
445
439
|
}
|
|
@@ -457,24 +451,24 @@ function oe(e) {
|
|
|
457
451
|
const n = ae(e);
|
|
458
452
|
return (t = n == null ? void 0 : n.$el) != null ? t : n;
|
|
459
453
|
}
|
|
460
|
-
const Ne =
|
|
454
|
+
const Ne = $ ? window : void 0, ke = $ ? window.document : void 0;
|
|
461
455
|
function xe(...e) {
|
|
462
|
-
let t, n,
|
|
463
|
-
if (Te(e[0]) || Array.isArray(e[0]) ? ([n,
|
|
456
|
+
let t, n, s, c;
|
|
457
|
+
if (Te(e[0]) || Array.isArray(e[0]) ? ([n, s, c] = e, t = Ne) : [t, n, s, c] = e, !t)
|
|
464
458
|
return Fe;
|
|
465
|
-
Array.isArray(n) || (n = [n]), Array.isArray(
|
|
466
|
-
const a = [],
|
|
459
|
+
Array.isArray(n) || (n = [n]), Array.isArray(s) || (s = [s]);
|
|
460
|
+
const a = [], o = () => {
|
|
467
461
|
a.forEach((u) => u()), a.length = 0;
|
|
468
|
-
},
|
|
469
|
-
|
|
462
|
+
}, r = (u, y, m, L) => (u.addEventListener(y, m, L), () => u.removeEventListener(y, m, L)), i = M(() => [oe(t), ae(c)], ([u, y]) => {
|
|
463
|
+
o(), u && a.push(...n.flatMap((m) => s.map((L) => r(u, m, L, y))));
|
|
470
464
|
}, { immediate: !0, flush: "post" }), p = () => {
|
|
471
|
-
|
|
465
|
+
i(), o();
|
|
472
466
|
};
|
|
473
467
|
return ie(p), p;
|
|
474
468
|
}
|
|
475
469
|
function Ve(e, t = !1) {
|
|
476
|
-
const n = w(),
|
|
477
|
-
return
|
|
470
|
+
const n = w(), s = () => n.value = !!e();
|
|
471
|
+
return s(), De(s, t), n;
|
|
478
472
|
}
|
|
479
473
|
const K = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, X = "__vueuse_ssr_handlers__";
|
|
480
474
|
K[X] = K[X] || {};
|
|
@@ -521,36 +515,36 @@ const Y = [
|
|
|
521
515
|
]
|
|
522
516
|
];
|
|
523
517
|
function qe(e, t = {}) {
|
|
524
|
-
const { document: n = ke, autoExit:
|
|
525
|
-
let
|
|
526
|
-
const
|
|
518
|
+
const { document: n = ke, autoExit: s = !1 } = t, c = n == null ? void 0 : n.querySelector("html"), a = w(!1);
|
|
519
|
+
let o = Y[0];
|
|
520
|
+
const r = Ve(() => {
|
|
527
521
|
if (n) {
|
|
528
522
|
for (const S of Y)
|
|
529
523
|
if (S[1] in n)
|
|
530
|
-
return
|
|
524
|
+
return o = S, !0;
|
|
531
525
|
} else
|
|
532
526
|
return !1;
|
|
533
527
|
return !1;
|
|
534
|
-
}), [
|
|
528
|
+
}), [i, p, u, , y] = o;
|
|
535
529
|
async function m() {
|
|
536
|
-
|
|
530
|
+
r.value && (n != null && n[u] && await n[p](), a.value = !1);
|
|
537
531
|
}
|
|
538
|
-
async function
|
|
539
|
-
if (!
|
|
532
|
+
async function L() {
|
|
533
|
+
if (!r.value)
|
|
540
534
|
return;
|
|
541
535
|
await m();
|
|
542
536
|
const S = oe(c);
|
|
543
|
-
S && (await S[
|
|
537
|
+
S && (await S[i](), a.value = !0);
|
|
544
538
|
}
|
|
545
539
|
async function le() {
|
|
546
|
-
a.value ? await m() : await
|
|
540
|
+
a.value ? await m() : await L();
|
|
547
541
|
}
|
|
548
542
|
return n && xe(n, y, () => {
|
|
549
543
|
a.value = !!(n != null && n[u]);
|
|
550
|
-
}, !1),
|
|
551
|
-
isSupported:
|
|
544
|
+
}, !1), s && ie(m), {
|
|
545
|
+
isSupported: r,
|
|
552
546
|
isFullscreen: a,
|
|
553
|
-
enter:
|
|
547
|
+
enter: L,
|
|
554
548
|
exit: m,
|
|
555
549
|
toggle: le
|
|
556
550
|
};
|
|
@@ -559,15 +553,15 @@ var Z;
|
|
|
559
553
|
(function(e) {
|
|
560
554
|
e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE";
|
|
561
555
|
})(Z || (Z = {}));
|
|
562
|
-
var Qe = Object.defineProperty, ee = Object.getOwnPropertySymbols,
|
|
556
|
+
var Qe = Object.defineProperty, ee = Object.getOwnPropertySymbols, Be = Object.prototype.hasOwnProperty, $e = Object.prototype.propertyIsEnumerable, te = (e, t, n) => t in e ? Qe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, ze = (e, t) => {
|
|
563
557
|
for (var n in t || (t = {}))
|
|
564
|
-
|
|
558
|
+
Be.call(t, n) && te(e, n, t[n]);
|
|
565
559
|
if (ee)
|
|
566
560
|
for (var n of ee(t))
|
|
567
|
-
|
|
561
|
+
$e.call(t, n) && te(e, n, t[n]);
|
|
568
562
|
return e;
|
|
569
563
|
};
|
|
570
|
-
const
|
|
564
|
+
const We = {
|
|
571
565
|
easeInSine: [0.12, 0, 0.39, 0],
|
|
572
566
|
easeOutSine: [0.61, 1, 0.88, 1],
|
|
573
567
|
easeInOutSine: [0.37, 0, 0.63, 1],
|
|
@@ -593,9 +587,9 @@ const ze = {
|
|
|
593
587
|
easeOutBack: [0.34, 1.56, 0.64, 1],
|
|
594
588
|
easeInOutBack: [0.68, -0.6, 0.32, 1.6]
|
|
595
589
|
};
|
|
596
|
-
|
|
590
|
+
ze({
|
|
597
591
|
linear: Re
|
|
598
|
-
},
|
|
592
|
+
}, We);
|
|
599
593
|
const je = ["src", "entry", "name"], He = /* @__PURE__ */ x({
|
|
600
594
|
__name: "das-micro-app",
|
|
601
595
|
props: {
|
|
@@ -605,12 +599,12 @@ const je = ["src", "entry", "name"], He = /* @__PURE__ */ x({
|
|
|
605
599
|
},
|
|
606
600
|
emits: ["onLoaded", "onActivated", "onDeactivated"],
|
|
607
601
|
setup(e, { emit: t }) {
|
|
608
|
-
const n = e,
|
|
609
|
-
|
|
602
|
+
const n = e, s = t, c = (r) => {
|
|
603
|
+
s("onLoaded", r);
|
|
610
604
|
}, a = D(() => n.actived);
|
|
611
|
-
return M(() => a.value, (
|
|
612
|
-
|
|
613
|
-
}), (
|
|
605
|
+
return M(() => a.value, (r) => {
|
|
606
|
+
r && s("onActivated"), r || s("onDeactivated");
|
|
607
|
+
}), (r, i) => (E(), N("iframe", {
|
|
614
608
|
class: "das-micro-app",
|
|
615
609
|
src: n.src,
|
|
616
610
|
entry: n.src,
|
|
@@ -619,39 +613,39 @@ const je = ["src", "entry", "name"], He = /* @__PURE__ */ x({
|
|
|
619
613
|
onLoad: c
|
|
620
614
|
}, null, 40, je));
|
|
621
615
|
}
|
|
622
|
-
}), Ue = /* @__PURE__ */
|
|
616
|
+
}), Ue = /* @__PURE__ */ re(He, [["__scopeId", "data-v-8ae871f6"]]), Ge = /* @__PURE__ */ x({
|
|
623
617
|
__name: "das-micro-apps",
|
|
624
618
|
setup(e) {
|
|
625
|
-
const t = w(null), n = async (a,
|
|
626
|
-
const
|
|
627
|
-
if (!
|
|
628
|
-
|
|
629
|
-
const
|
|
619
|
+
const t = w(null), n = async (a, o) => {
|
|
620
|
+
const r = f.value.find((m) => m.name === o);
|
|
621
|
+
if (!r) return;
|
|
622
|
+
r.dom = a.target, await ne(), await new Promise((m) => setTimeout(m, 50));
|
|
623
|
+
const i = () => {
|
|
630
624
|
const m = t.value.getBoundingClientRect() || {};
|
|
631
625
|
return m.width = t.value.clientWidth, m.height = t.value.clientHeight, m;
|
|
632
626
|
};
|
|
633
|
-
d.sendMessageToMicroApp(
|
|
627
|
+
d.sendMessageToMicroApp(o, "onLoaded", {
|
|
634
628
|
href: location.href,
|
|
635
|
-
microAppContainerRect:
|
|
636
|
-
entry:
|
|
637
|
-
name:
|
|
629
|
+
microAppContainerRect: i(),
|
|
630
|
+
entry: r.entry,
|
|
631
|
+
name: r.name
|
|
638
632
|
});
|
|
639
|
-
const { dom: p, ...u } =
|
|
633
|
+
const { dom: p, ...u } = r;
|
|
640
634
|
d.triggerMicroAppLifeCycleListener("onLoaded", u), new ResizeObserver(() => {
|
|
641
|
-
d.sendMessageToMicroApp(
|
|
642
|
-
}).observe(t.value), d.sendMessageToMicroApp(
|
|
643
|
-
},
|
|
644
|
-
const
|
|
645
|
-
if (!
|
|
646
|
-
const { dom:
|
|
647
|
-
d.sendMessageToMicroApp(
|
|
648
|
-
}, c = (a,
|
|
649
|
-
const
|
|
650
|
-
if (!
|
|
651
|
-
const { dom:
|
|
652
|
-
d.sendMessageToMicroApp(
|
|
635
|
+
d.sendMessageToMicroApp(o, "resize", i());
|
|
636
|
+
}).observe(t.value), d.sendMessageToMicroApp(o, "setProxyMessageStatus", { visible: !0, parentHref: location.href }), d.sendMessageToMicroApp(o, "setProxSsoStatus", { visible: !0, parentHref: location.href });
|
|
637
|
+
}, s = (a, o) => {
|
|
638
|
+
const r = f.value.find((u) => u.name === o);
|
|
639
|
+
if (!r) return;
|
|
640
|
+
const { dom: i, ...p } = r;
|
|
641
|
+
d.sendMessageToMicroApp(o, "onActivated"), d.triggerMicroAppLifeCycleListener("onActivated", p);
|
|
642
|
+
}, c = (a, o) => {
|
|
643
|
+
const r = f.value.find((u) => u.name === o);
|
|
644
|
+
if (!r) return;
|
|
645
|
+
const { dom: i, ...p } = r;
|
|
646
|
+
d.sendMessageToMicroApp(o, "onDeactivated"), d.triggerMicroAppLifeCycleListener("onDeactivated", p);
|
|
653
647
|
};
|
|
654
|
-
return (a,
|
|
648
|
+
return (a, o) => (E(), N(
|
|
655
649
|
"div",
|
|
656
650
|
{
|
|
657
651
|
ref_key: "containerRef",
|
|
@@ -660,22 +654,22 @@ const je = ["src", "entry", "name"], He = /* @__PURE__ */ x({
|
|
|
660
654
|
},
|
|
661
655
|
[
|
|
662
656
|
(E(!0), N(
|
|
663
|
-
|
|
657
|
+
z,
|
|
664
658
|
null,
|
|
665
|
-
fe(I(f), (
|
|
666
|
-
|
|
659
|
+
fe(I(f), (r) => (E(), N(
|
|
660
|
+
z,
|
|
667
661
|
null,
|
|
668
662
|
[
|
|
669
|
-
|
|
663
|
+
r.loaded ? ve((E(), se(Ue, {
|
|
670
664
|
key: 0,
|
|
671
|
-
src:
|
|
672
|
-
name:
|
|
673
|
-
actived:
|
|
674
|
-
onOnLoaded: (
|
|
675
|
-
onOnActivated: (
|
|
676
|
-
onOnDeactivated: (
|
|
665
|
+
src: r.src || "",
|
|
666
|
+
name: r.name,
|
|
667
|
+
actived: r.actived,
|
|
668
|
+
onOnLoaded: (i) => n(i, r.name),
|
|
669
|
+
onOnActivated: (i) => s(i, r.name),
|
|
670
|
+
onOnDeactivated: (i) => c(i, r.name)
|
|
677
671
|
}, null, 8, ["src", "name", "actived", "onOnLoaded", "onOnActivated", "onOnDeactivated"])), [
|
|
678
|
-
[he,
|
|
672
|
+
[he, r.actived]
|
|
679
673
|
]) : Ae("v-if", !0)
|
|
680
674
|
],
|
|
681
675
|
64
|
|
@@ -689,7 +683,7 @@ const je = ["src", "entry", "name"], He = /* @__PURE__ */ x({
|
|
|
689
683
|
/* NEED_PATCH */
|
|
690
684
|
));
|
|
691
685
|
}
|
|
692
|
-
}), Je = /* @__PURE__ */
|
|
686
|
+
}), Je = /* @__PURE__ */ re(Ge, [["__scopeId", "data-v-3abdb1e9"]]), Ze = /* @__PURE__ */ x({
|
|
693
687
|
__name: "das-main-app-layout",
|
|
694
688
|
props: {
|
|
695
689
|
transitionConfig: { default: () => {
|
|
@@ -703,12 +697,12 @@ const je = ["src", "entry", "name"], He = /* @__PURE__ */ x({
|
|
|
703
697
|
} }
|
|
704
698
|
},
|
|
705
699
|
setup(e) {
|
|
706
|
-
const t = e, n = D(() => !k.value),
|
|
700
|
+
const t = e, n = D(() => !k.value), s = D(() => ({
|
|
707
701
|
"enter-active-class": "animate__animated animate__fadeInLeft",
|
|
708
702
|
...t.transitionConfig
|
|
709
703
|
})), c = D(() => ({ showLayout: t.showLayout, showAside: t.showAside, showTabs: t.showTabs }));
|
|
710
|
-
return (a,
|
|
711
|
-
"transition-config":
|
|
704
|
+
return (a, o) => (E(), se(I(ye), we({
|
|
705
|
+
"transition-config": s.value,
|
|
712
706
|
"router-view-visible": n.value
|
|
713
707
|
}, c.value), {
|
|
714
708
|
header: O(() => [
|
|
@@ -718,12 +712,12 @@ const je = ["src", "entry", "name"], He = /* @__PURE__ */ x({
|
|
|
718
712
|
]),
|
|
719
713
|
aside: O(() => [
|
|
720
714
|
V(a.$slots, "aside", {}, () => [
|
|
721
|
-
T(I(
|
|
715
|
+
T(I(Le), { menuAttr: a.menuAttr }, null, 8, ["menuAttr"])
|
|
722
716
|
])
|
|
723
717
|
]),
|
|
724
718
|
tab: O(() => [
|
|
725
719
|
V(a.$slots, "tab", {}, () => [
|
|
726
|
-
T(I(
|
|
720
|
+
T(I(_e), { tabsAttr: a.tabsAttr }, null, 8, ["tabsAttr"])
|
|
727
721
|
])
|
|
728
722
|
]),
|
|
729
723
|
default: O(() => [
|
|
@@ -744,28 +738,28 @@ const je = ["src", "entry", "name"], He = /* @__PURE__ */ x({
|
|
|
744
738
|
}
|
|
745
739
|
}), Ke = (e) => ["http://", "https://", "ws://", "wss://", "/"].find((n) => e.startsWith(n)) ? e : `/${e}`, et = (e, t) => {
|
|
746
740
|
if (!(e != null && e.microApps) || !Array.isArray(e.microApps)) return;
|
|
747
|
-
window.__IN_DAS_MAIN_APP = !0, e != null && e.microAppRouterPrefix && (
|
|
741
|
+
window.__IN_DAS_MAIN_APP = !0, e != null && e.microAppRouterPrefix && (W.value = e.microAppRouterPrefix), f.value = (e.microApps || []).filter((c) => !!c.name).map((c) => ({ ...c, entry: Ke(c.entry || c.name) })), t == null || t.addRoute({
|
|
748
742
|
name: "das-micro-app",
|
|
749
|
-
path: `${
|
|
743
|
+
path: `${W.value}/:pathMatch(.*)*`,
|
|
750
744
|
component: ce,
|
|
751
745
|
meta: { isMicroApp: !0, keepAlive: !0 }
|
|
752
746
|
}), d.addEventListenerFromMicroApp("bodyOverlay", (c) => {
|
|
753
|
-
const { visible: a, style:
|
|
754
|
-
G.overlay.set(a,
|
|
747
|
+
const { visible: a, style: o } = c.data;
|
|
748
|
+
G.overlay.set(a, o);
|
|
755
749
|
}), d.addEventListenerFromMicroApp("layoutVisible", (c) => {
|
|
756
750
|
const { visible: a } = c.data;
|
|
757
751
|
G.setVisible(a);
|
|
758
752
|
}), d.addEventListenerFromMicroApp("route", (c) => {
|
|
759
|
-
const { name: a, cmd:
|
|
760
|
-
|
|
753
|
+
const { name: a, cmd: o, path: r } = c.data;
|
|
754
|
+
o === "reload" && d.reloadMicroAppRoute(a, r), o === "unload" && d.unloadMicroAppRoute(a, r);
|
|
761
755
|
});
|
|
762
|
-
const { enter: n, exit:
|
|
756
|
+
const { enter: n, exit: s } = qe();
|
|
763
757
|
d.addEventListenerFromMicroApp("fullscreen", (c) => {
|
|
764
758
|
const a = c.data;
|
|
765
|
-
a && n(), a ||
|
|
759
|
+
a && n(), a || s();
|
|
766
760
|
}), d.addEventListenerFromMicroApp("location", (c) => {
|
|
767
|
-
const { cmd: a, isAutoCloseApp:
|
|
768
|
-
a === "reload" && (
|
|
761
|
+
const { cmd: a, isAutoCloseApp: o } = c.data || {};
|
|
762
|
+
a === "reload" && (o !== void 0 && (window.__isAutoCloseApp = o), location.reload());
|
|
769
763
|
});
|
|
770
764
|
}, tt = (e, t) => {
|
|
771
765
|
if (!(e != null && e.microAppName)) return;
|
|
@@ -777,58 +771,58 @@ const je = ["src", "entry", "name"], He = /* @__PURE__ */ x({
|
|
|
777
771
|
component: ce,
|
|
778
772
|
meta: { isMicroApp: !0, keepAlive: !0 }
|
|
779
773
|
});
|
|
780
|
-
const
|
|
774
|
+
const s = w(!1), c = w(!1), a = w("");
|
|
781
775
|
M(
|
|
782
776
|
() => t.currentRoute.value,
|
|
783
|
-
(
|
|
784
|
-
if (
|
|
785
|
-
|
|
777
|
+
(o) => {
|
|
778
|
+
if (s.value) {
|
|
779
|
+
s.value = !1;
|
|
786
780
|
return;
|
|
787
781
|
}
|
|
788
782
|
if (c.value) {
|
|
789
783
|
c.value = !1;
|
|
790
784
|
return;
|
|
791
785
|
}
|
|
792
|
-
const { path:
|
|
793
|
-
if (a.value.includes(
|
|
786
|
+
const { path: r, query: i, params: p, meta: u } = o;
|
|
787
|
+
if (a.value.includes(o.path)) {
|
|
794
788
|
a.value = "";
|
|
795
789
|
return;
|
|
796
790
|
}
|
|
797
791
|
d.sendMessageToMainApp("router", {
|
|
798
792
|
cmd: "push",
|
|
799
793
|
route: {
|
|
800
|
-
path:
|
|
801
|
-
query: { ...
|
|
794
|
+
path: r,
|
|
795
|
+
query: { ...i, microAppName: e.microAppName },
|
|
802
796
|
params: p,
|
|
803
797
|
meta: u
|
|
804
798
|
}
|
|
805
799
|
});
|
|
806
800
|
}
|
|
807
|
-
), d.addEventListenerFromMainApp("router", async (
|
|
801
|
+
), d.addEventListenerFromMainApp("router", async (o) => {
|
|
808
802
|
var u;
|
|
809
|
-
const { cmd:
|
|
810
|
-
a.value = ("/" + p +
|
|
811
|
-
}), d.addEventListenerFromMainApp("onLoaded", (
|
|
812
|
-
const { href:
|
|
813
|
-
window.__IN_DAS_MICRO_APP = !0, window.__DAS_MICRO_APP_NAME = e.microAppName, window.__DAS_MAIN_APP_HREF =
|
|
814
|
-
}), d.addEventListenerFromMainApp("onDeactivated", (
|
|
815
|
-
const { name:
|
|
803
|
+
const { cmd: r, route: i, microAppName: p = "" } = o.data;
|
|
804
|
+
a.value = ("/" + p + i.path).replace(/\/\//g, "/"), (u = t == null ? void 0 : t[r]) == null || u.call(t, i);
|
|
805
|
+
}), d.addEventListenerFromMainApp("onLoaded", (o) => {
|
|
806
|
+
const { href: r, microAppContainerRect: i } = o.data;
|
|
807
|
+
window.__IN_DAS_MICRO_APP = !0, window.__DAS_MICRO_APP_NAME = e.microAppName, window.__DAS_MAIN_APP_HREF = r, window.__DAS_MICRO_APP_CONTAINER_RECT = i;
|
|
808
|
+
}), d.addEventListenerFromMainApp("onDeactivated", (o) => {
|
|
809
|
+
const { name: r = "", path: i, params: p = {}, query: u = {} } = t.currentRoute.value;
|
|
816
810
|
c.value = !0, t == null || t.push({
|
|
817
811
|
name: n,
|
|
818
|
-
query: { microAppName: e.microAppName, fromQuery: JSON.stringify(u), fromPath:
|
|
812
|
+
query: { microAppName: e.microAppName, fromQuery: JSON.stringify(u), fromPath: i },
|
|
819
813
|
params: p
|
|
820
814
|
});
|
|
821
|
-
}), d.addEventListenerFromMainApp("onActivated", (
|
|
822
|
-
const { name:
|
|
823
|
-
|
|
824
|
-
}), d.addEventListenerFromMainApp("sessionStorage", (
|
|
825
|
-
const { cmd:
|
|
826
|
-
|
|
827
|
-
}), d.addEventListenerFromMainApp("route", (
|
|
828
|
-
const { cmd:
|
|
829
|
-
|
|
815
|
+
}), d.addEventListenerFromMainApp("onActivated", (o) => {
|
|
816
|
+
const { name: r = "", params: i = {}, query: p = {} } = t.currentRoute.value, { fromPath: u = "", fromQuery: y = "{}" } = p || {};
|
|
817
|
+
s.value = !0, t == null || t.push({ path: u, query: JSON.parse(y), params: i });
|
|
818
|
+
}), d.addEventListenerFromMainApp("sessionStorage", (o) => {
|
|
819
|
+
const { cmd: r, key: i, value: p } = o.data;
|
|
820
|
+
r === "setItem" && window.sessionStorage.setItem(i, p), r === "getItem" && window.sessionStorage.getItem(i), r === "removeItem" && window.sessionStorage.removeItem(i), r === "clear" && window.sessionStorage.clear();
|
|
821
|
+
}), d.addEventListenerFromMainApp("route", (o) => {
|
|
822
|
+
const { cmd: r, path: i } = o.data;
|
|
823
|
+
r === "reload" && (F.value.push(i), R.value = !1, setTimeout(() => {
|
|
830
824
|
R.value = !0, F.value = [];
|
|
831
|
-
}, 300)),
|
|
825
|
+
}, 300)), r === "unload" && (F.value.push(i), R.value = !1, setTimeout(() => {
|
|
832
826
|
R.value = !0, F.value = [];
|
|
833
827
|
}, 100));
|
|
834
828
|
});
|