@das-fed/web 6.4.0-test.20 → 6.4.0-test.21
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/{index-DozcsJQ6.js → index-BR2K2L20.js} +1 -1
- package/{packages/main-app-framework/index-CmHORAF1.js → index-CqHbFeJ4.js} +1 -1
- package/index-CqHbFeJ4.js.gz +0 -0
- package/{index-oWBd5vf_.js → index-pa8JpqiR.js} +813 -804
- package/index-pa8JpqiR.js.gz +0 -0
- package/index.js +1 -1
- package/package.json +6 -6
- package/packages/main-app-framework/{index-DAaPMAIp.js → index-D-yLFNAt.js} +1 -1
- package/packages/main-app-framework/{index-JNn4Rtac.js → index-PIgnnyL3.js} +4 -4
- package/packages/main-app-framework/index-PIgnnyL3.js.gz +0 -0
- package/{index-SnQNzohF.js → packages/main-app-framework/index-gbopgvrS.js} +1 -1
- package/packages/main-app-framework/index-gbopgvrS.js.gz +0 -0
- package/packages/main-app-framework/index.js +1 -1
- 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 +101 -92
- package/packages/micro-frontend/index.js.gz +0 -0
- package/style.css +1 -1
- package/style.css.gz +0 -0
- package/index-SnQNzohF.js.gz +0 -0
- package/index-oWBd5vf_.js.gz +0 -0
- package/packages/main-app-framework/index-CmHORAF1.js.gz +0 -0
- package/packages/main-app-framework/index-JNn4Rtac.js.gz +0 -0
|
@@ -1,61 +1,70 @@
|
|
|
1
1
|
import '@das-fed/web/packages/micro-frontend/style.css';
|
|
2
|
-
import { ref as w, watch as M, reactive as
|
|
2
|
+
import { ref as w, watch as M, reactive as T, getCurrentScope as ue, onScopeDispose as de, unref as I, getCurrentInstance as pe, onMounted as me, nextTick as ne, defineComponent as x, computed as N, openBlock as E, createElementBlock as D, Fragment as z, renderList as fe, withDirectives as ve, createBlock as se, vShow as he, createCommentVNode as Ae, mergeProps as we, withCtx as C, renderSlot as V, createVNode as O, onActivated as ge } from "vue";
|
|
3
3
|
import { DasWebLayout as ye, DasWebNav as Me, DasWebMenu as Le, DasWebTabs as _e } from "@das-fed/web/packages/layout/index";
|
|
4
4
|
const W = w("/das-micro-app"), f = w([]), k = w(!1), F = w([]), R = w(!0);
|
|
5
|
-
let
|
|
6
|
-
const
|
|
7
|
-
var c;
|
|
8
|
-
const { origin: s } = new URL(location.href);
|
|
9
|
-
(c = window.self) == null || c.postMessage({ type: t, data: n }, s);
|
|
10
|
-
}, be = (e) => new Promise((t) => {
|
|
5
|
+
let v = null, h = null, _ = null;
|
|
6
|
+
const be = (e) => new Promise((t) => {
|
|
11
7
|
const n = () => {
|
|
12
8
|
if (v != null && v[e]) return t();
|
|
13
9
|
setTimeout(() => n(), 50);
|
|
14
10
|
};
|
|
15
11
|
n();
|
|
12
|
+
}), b = (e, t, n, s) => {
|
|
13
|
+
var i;
|
|
14
|
+
const { awaitListener: c = !1 } = s || {}, { origin: a } = new URL(location.href);
|
|
15
|
+
c ? be(t).then(() => {
|
|
16
|
+
var r;
|
|
17
|
+
(r = window.self) == null || r.postMessage({ type: t, data: n }, a);
|
|
18
|
+
}) : (i = window.self) == null || i.postMessage({ type: t, data: n }, a);
|
|
19
|
+
}, Ie = (e) => new Promise((t) => {
|
|
20
|
+
const n = () => {
|
|
21
|
+
if (h != null && h[e]) return t();
|
|
22
|
+
setTimeout(() => n(), 50);
|
|
23
|
+
};
|
|
24
|
+
n();
|
|
16
25
|
}), q = (e, t, n) => {
|
|
17
26
|
var a;
|
|
18
|
-
const { awaitListener: s = !1 } = n, { origin: c } = new URL(location.href);
|
|
19
|
-
s ?
|
|
27
|
+
const { awaitListener: s = !1 } = n || {}, { origin: c } = new URL(location.href);
|
|
28
|
+
s ? Ie(e).then(() => {
|
|
20
29
|
var i;
|
|
21
30
|
(i = window.self) == null || i.postMessage({ type: e, data: t }, c);
|
|
22
31
|
}) : (a = window.self) == null || a.postMessage({ type: e, data: t }, c);
|
|
23
|
-
},
|
|
24
|
-
|
|
32
|
+
}, Ee = () => {
|
|
33
|
+
h || (h || (h = {}), window.addEventListener(
|
|
25
34
|
"message",
|
|
26
35
|
(e) => {
|
|
27
36
|
const { type: t, source: n } = e.data || {};
|
|
28
|
-
if (n !== "react-devtools-content-script" &&
|
|
29
|
-
for (const s in
|
|
30
|
-
|
|
37
|
+
if (n !== "react-devtools-content-script" && h[t])
|
|
38
|
+
for (const s in h[t])
|
|
39
|
+
h[t][s](e.data);
|
|
31
40
|
},
|
|
32
41
|
!1
|
|
33
42
|
));
|
|
34
|
-
},
|
|
35
|
-
|
|
43
|
+
}, Se = () => {
|
|
44
|
+
v || (v || (v = {}), window.addEventListener(
|
|
36
45
|
"message",
|
|
37
46
|
(e) => {
|
|
38
47
|
const { type: t } = e.data || {};
|
|
39
|
-
if (
|
|
40
|
-
for (const n in
|
|
41
|
-
|
|
48
|
+
if (v[t])
|
|
49
|
+
for (const n in v[t])
|
|
50
|
+
v[t][n](e.data);
|
|
42
51
|
},
|
|
43
52
|
!1
|
|
44
53
|
));
|
|
45
|
-
},
|
|
46
|
-
|
|
54
|
+
}, Pe = (e, t) => {
|
|
55
|
+
Se();
|
|
47
56
|
const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8);
|
|
48
|
-
return
|
|
57
|
+
return v[e] || (v[e] = {}), v[e][n] = t, {
|
|
49
58
|
remove: () => {
|
|
50
|
-
|
|
59
|
+
v[e] && v[e][n] && delete v[e][n];
|
|
51
60
|
}
|
|
52
61
|
};
|
|
53
|
-
},
|
|
54
|
-
|
|
62
|
+
}, Te = (e, t) => {
|
|
63
|
+
Ee();
|
|
55
64
|
const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8);
|
|
56
|
-
return
|
|
65
|
+
return h[e] || (h[e] = {}), h[e][n] = t, {
|
|
57
66
|
remove: () => {
|
|
58
|
-
|
|
67
|
+
h[e] && h[e][n] && delete h[e][n];
|
|
59
68
|
}
|
|
60
69
|
};
|
|
61
70
|
}, Q = async (e) => {
|
|
@@ -129,8 +138,8 @@ const b = (e, t, n) => {
|
|
|
129
138
|
},
|
|
130
139
|
sendMessageToMicroApp: b,
|
|
131
140
|
sendMessageToMainApp: q,
|
|
132
|
-
addEventListenerFromMainApp:
|
|
133
|
-
addEventListenerFromMicroApp:
|
|
141
|
+
addEventListenerFromMainApp: Pe,
|
|
142
|
+
addEventListenerFromMicroApp: Te,
|
|
134
143
|
setMainAppOverlay: (e, t) => {
|
|
135
144
|
q("bodyOverlay", { visible: e, style: t });
|
|
136
145
|
},
|
|
@@ -180,7 +189,7 @@ const b = (e, t, n) => {
|
|
|
180
189
|
setMainAppLayoutVisible: (e) => {
|
|
181
190
|
q("layoutVisible", { visible: e });
|
|
182
191
|
}
|
|
183
|
-
}, l =
|
|
192
|
+
}, l = T({
|
|
184
193
|
visible: !1,
|
|
185
194
|
theme: "default",
|
|
186
195
|
logo: "",
|
|
@@ -268,7 +277,7 @@ const b = (e, t, n) => {
|
|
|
268
277
|
remove: s
|
|
269
278
|
};
|
|
270
279
|
}
|
|
271
|
-
}, g =
|
|
280
|
+
}, g = T({
|
|
272
281
|
theme: "default",
|
|
273
282
|
items: [],
|
|
274
283
|
collapse: !1,
|
|
@@ -321,32 +330,32 @@ const b = (e, t, n) => {
|
|
|
321
330
|
remove: s
|
|
322
331
|
};
|
|
323
332
|
}
|
|
324
|
-
},
|
|
333
|
+
}, A = T({
|
|
325
334
|
theme: "default",
|
|
326
335
|
items: [],
|
|
327
336
|
eventListeners: {}
|
|
328
337
|
}), U = {
|
|
329
338
|
setItems: (e) => {
|
|
330
|
-
|
|
339
|
+
A.items = e;
|
|
331
340
|
},
|
|
332
|
-
getItems: () =>
|
|
341
|
+
getItems: () => A.items,
|
|
333
342
|
setTheme: (e) => {
|
|
334
|
-
|
|
343
|
+
A.theme = e;
|
|
335
344
|
},
|
|
336
345
|
removeItem: (e) => {
|
|
337
|
-
const t =
|
|
338
|
-
|
|
346
|
+
const t = A.items.filter((n) => n.value !== e);
|
|
347
|
+
A.items = t;
|
|
339
348
|
},
|
|
340
349
|
appendItem: (e) => {
|
|
341
|
-
const t =
|
|
342
|
-
t !== -1 ?
|
|
350
|
+
const t = A.items.findIndex((n) => n.value == e.value);
|
|
351
|
+
t !== -1 ? A.items.splice(t, 1, e) : A.items.push(e);
|
|
343
352
|
},
|
|
344
353
|
setActiveItem: (e) => {
|
|
345
|
-
|
|
354
|
+
A.activeItem = e;
|
|
346
355
|
},
|
|
347
356
|
triggerEventListener: (e, t, n) => {
|
|
348
357
|
var i;
|
|
349
|
-
const s =
|
|
358
|
+
const s = A.eventListeners, { autoRemove: c = !1 } = n || {}, a = [];
|
|
350
359
|
for (const r in s) {
|
|
351
360
|
const o = s[r];
|
|
352
361
|
o.type === e && a.push(
|
|
@@ -359,9 +368,9 @@ const b = (e, t, n) => {
|
|
|
359
368
|
},
|
|
360
369
|
addEventListener: (e, t) => {
|
|
361
370
|
const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8), s = () => {
|
|
362
|
-
|
|
371
|
+
A.eventListeners[n] && delete A.eventListeners[n];
|
|
363
372
|
};
|
|
364
|
-
return
|
|
373
|
+
return A.eventListeners[n] = {
|
|
365
374
|
type: e,
|
|
366
375
|
handler: async (c) => {
|
|
367
376
|
try {
|
|
@@ -375,7 +384,7 @@ const b = (e, t, n) => {
|
|
|
375
384
|
remove: s
|
|
376
385
|
};
|
|
377
386
|
}
|
|
378
|
-
}, P =
|
|
387
|
+
}, P = T({
|
|
379
388
|
eventListeners: {}
|
|
380
389
|
}), Ce = {
|
|
381
390
|
triggerEventListener: (e, t, n) => {
|
|
@@ -409,17 +418,17 @@ const b = (e, t, n) => {
|
|
|
409
418
|
remove: s
|
|
410
419
|
};
|
|
411
420
|
}
|
|
412
|
-
}, B =
|
|
421
|
+
}, B = T({
|
|
413
422
|
visible: !1,
|
|
414
423
|
style: {}
|
|
415
424
|
}), Oe = {
|
|
416
425
|
set: (e, t) => {
|
|
417
426
|
B.visible = e, t || (t = {}), t.transition || (t.transition = "all 0.3s"), t && (B.style = t);
|
|
418
427
|
}
|
|
419
|
-
},
|
|
428
|
+
}, Fe = {
|
|
420
429
|
nav: l,
|
|
421
430
|
menu: g,
|
|
422
|
-
tab:
|
|
431
|
+
tab: A,
|
|
423
432
|
overlay: B,
|
|
424
433
|
iframeView: P,
|
|
425
434
|
visible: w(!0)
|
|
@@ -429,7 +438,7 @@ const b = (e, t, n) => {
|
|
|
429
438
|
tab: U,
|
|
430
439
|
overlay: Oe,
|
|
431
440
|
iframeView: Ce,
|
|
432
|
-
setVisible: (e) =>
|
|
441
|
+
setVisible: (e) => Fe.visible.value = e,
|
|
433
442
|
setTheme: (e) => {
|
|
434
443
|
j.setTheme(e), H.setTheme(e), U.setTheme(e);
|
|
435
444
|
}
|
|
@@ -440,7 +449,7 @@ const b = (e, t, n) => {
|
|
|
440
449
|
return n;
|
|
441
450
|
};
|
|
442
451
|
var J;
|
|
443
|
-
const $ = typeof window < "u",
|
|
452
|
+
const $ = typeof window < "u", Re = (e) => typeof e == "string", Ne = () => {
|
|
444
453
|
};
|
|
445
454
|
$ && ((J = window == null ? void 0 : window.navigator) != null && J.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
|
|
446
455
|
function ae(e) {
|
|
@@ -452,7 +461,7 @@ function De(e) {
|
|
|
452
461
|
function ie(e) {
|
|
453
462
|
return ue() ? (de(e), !0) : !1;
|
|
454
463
|
}
|
|
455
|
-
function
|
|
464
|
+
function ke(e, t = !0) {
|
|
456
465
|
pe() ? me(e) : t ? e() : ne(e);
|
|
457
466
|
}
|
|
458
467
|
function oe(e) {
|
|
@@ -460,11 +469,11 @@ function oe(e) {
|
|
|
460
469
|
const n = ae(e);
|
|
461
470
|
return (t = n == null ? void 0 : n.$el) != null ? t : n;
|
|
462
471
|
}
|
|
463
|
-
const
|
|
464
|
-
function
|
|
472
|
+
const xe = $ ? window : void 0, Ve = $ ? window.document : void 0;
|
|
473
|
+
function qe(...e) {
|
|
465
474
|
let t, n, s, c;
|
|
466
|
-
if (
|
|
467
|
-
return
|
|
475
|
+
if (Re(e[0]) || Array.isArray(e[0]) ? ([n, s, c] = e, t = xe) : [t, n, s, c] = e, !t)
|
|
476
|
+
return Ne;
|
|
468
477
|
Array.isArray(n) || (n = [n]), Array.isArray(s) || (s = [s]);
|
|
469
478
|
const a = [], i = () => {
|
|
470
479
|
a.forEach((u) => u()), a.length = 0;
|
|
@@ -475,9 +484,9 @@ function Ve(...e) {
|
|
|
475
484
|
};
|
|
476
485
|
return ie(p), p;
|
|
477
486
|
}
|
|
478
|
-
function
|
|
487
|
+
function Qe(e, t = !1) {
|
|
479
488
|
const n = w(), s = () => n.value = !!e();
|
|
480
|
-
return s(),
|
|
489
|
+
return s(), ke(s, t), n;
|
|
481
490
|
}
|
|
482
491
|
const K = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, X = "__vueuse_ssr_handlers__";
|
|
483
492
|
K[X] = K[X] || {};
|
|
@@ -523,10 +532,10 @@ const Y = [
|
|
|
523
532
|
"MSFullscreenError"
|
|
524
533
|
]
|
|
525
534
|
];
|
|
526
|
-
function
|
|
527
|
-
const { document: n =
|
|
535
|
+
function Be(e, t = {}) {
|
|
536
|
+
const { document: n = Ve, autoExit: s = !1 } = t, c = n == null ? void 0 : n.querySelector("html"), a = w(!1);
|
|
528
537
|
let i = Y[0];
|
|
529
|
-
const r =
|
|
538
|
+
const r = Qe(() => {
|
|
530
539
|
if (n) {
|
|
531
540
|
for (const S of Y)
|
|
532
541
|
if (S[1] in n)
|
|
@@ -548,7 +557,7 @@ function Qe(e, t = {}) {
|
|
|
548
557
|
async function le() {
|
|
549
558
|
a.value ? await m() : await L();
|
|
550
559
|
}
|
|
551
|
-
return n &&
|
|
560
|
+
return n && qe(n, y, () => {
|
|
552
561
|
a.value = !!(n != null && n[u]);
|
|
553
562
|
}, !1), s && ie(m), {
|
|
554
563
|
isSupported: r,
|
|
@@ -562,15 +571,15 @@ var Z;
|
|
|
562
571
|
(function(e) {
|
|
563
572
|
e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE";
|
|
564
573
|
})(Z || (Z = {}));
|
|
565
|
-
var
|
|
574
|
+
var $e = Object.defineProperty, ee = Object.getOwnPropertySymbols, ze = Object.prototype.hasOwnProperty, We = Object.prototype.propertyIsEnumerable, te = (e, t, n) => t in e ? $e(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, je = (e, t) => {
|
|
566
575
|
for (var n in t || (t = {}))
|
|
567
|
-
|
|
576
|
+
ze.call(t, n) && te(e, n, t[n]);
|
|
568
577
|
if (ee)
|
|
569
578
|
for (var n of ee(t))
|
|
570
|
-
|
|
579
|
+
We.call(t, n) && te(e, n, t[n]);
|
|
571
580
|
return e;
|
|
572
581
|
};
|
|
573
|
-
const
|
|
582
|
+
const He = {
|
|
574
583
|
easeInSine: [0.12, 0, 0.39, 0],
|
|
575
584
|
easeOutSine: [0.61, 1, 0.88, 1],
|
|
576
585
|
easeInOutSine: [0.37, 0, 0.63, 1],
|
|
@@ -596,10 +605,10 @@ const je = {
|
|
|
596
605
|
easeOutBack: [0.34, 1.56, 0.64, 1],
|
|
597
606
|
easeInOutBack: [0.68, -0.6, 0.32, 1.6]
|
|
598
607
|
};
|
|
599
|
-
|
|
608
|
+
je({
|
|
600
609
|
linear: De
|
|
601
|
-
},
|
|
602
|
-
const
|
|
610
|
+
}, He);
|
|
611
|
+
const Ue = ["src", "entry", "name"], Ge = /* @__PURE__ */ x({
|
|
603
612
|
__name: "das-micro-app",
|
|
604
613
|
props: {
|
|
605
614
|
src: {},
|
|
@@ -610,19 +619,19 @@ const He = ["src", "entry", "name"], Ue = /* @__PURE__ */ x({
|
|
|
610
619
|
setup(e, { emit: t }) {
|
|
611
620
|
const n = e, s = t, c = (r) => {
|
|
612
621
|
s("onLoaded", r);
|
|
613
|
-
}, a =
|
|
622
|
+
}, a = N(() => n.actived);
|
|
614
623
|
return M(() => a.value, (r) => {
|
|
615
624
|
r && s("onActivated"), r || s("onDeactivated");
|
|
616
|
-
}), (r, o) => (E(),
|
|
625
|
+
}), (r, o) => (E(), D("iframe", {
|
|
617
626
|
class: "das-micro-app",
|
|
618
627
|
src: n.src,
|
|
619
628
|
entry: n.src,
|
|
620
629
|
name: n.name,
|
|
621
630
|
frameborder: "0",
|
|
622
631
|
onLoad: c
|
|
623
|
-
}, null, 40,
|
|
632
|
+
}, null, 40, Ue));
|
|
624
633
|
}
|
|
625
|
-
}),
|
|
634
|
+
}), Je = /* @__PURE__ */ re(Ge, [["__scopeId", "data-v-8ae871f6"]]), Ke = /* @__PURE__ */ x({
|
|
626
635
|
__name: "das-micro-apps",
|
|
627
636
|
setup(e) {
|
|
628
637
|
const t = w(null), n = async (a, i) => {
|
|
@@ -654,13 +663,13 @@ const He = ["src", "entry", "name"], Ue = /* @__PURE__ */ x({
|
|
|
654
663
|
const { dom: o, ...p } = r;
|
|
655
664
|
d.sendMessageToMicroApp(i, "onDeactivated"), d.triggerMicroAppLifeCycleListener("onDeactivated", p);
|
|
656
665
|
};
|
|
657
|
-
return (a, i) => (E(),
|
|
666
|
+
return (a, i) => (E(), D("div", {
|
|
658
667
|
ref_key: "containerRef",
|
|
659
668
|
ref: t,
|
|
660
669
|
class: "das-micro-app-container"
|
|
661
670
|
}, [
|
|
662
|
-
(E(!0),
|
|
663
|
-
r.loaded ? ve((E(), se(
|
|
671
|
+
(E(!0), D(z, null, fe(I(f), (r) => (E(), D(z, null, [
|
|
672
|
+
r.loaded ? ve((E(), se(Je, {
|
|
664
673
|
key: 0,
|
|
665
674
|
src: r.src || "",
|
|
666
675
|
name: r.name,
|
|
@@ -674,7 +683,7 @@ const He = ["src", "entry", "name"], Ue = /* @__PURE__ */ x({
|
|
|
674
683
|
], 64))), 256))
|
|
675
684
|
], 512));
|
|
676
685
|
}
|
|
677
|
-
}),
|
|
686
|
+
}), Xe = /* @__PURE__ */ re(Ke, [["__scopeId", "data-v-3abdb1e9"]]), tt = /* @__PURE__ */ x({
|
|
678
687
|
__name: "das-main-app-layout",
|
|
679
688
|
props: {
|
|
680
689
|
transitionConfig: { default: () => {
|
|
@@ -688,31 +697,31 @@ const He = ["src", "entry", "name"], Ue = /* @__PURE__ */ x({
|
|
|
688
697
|
} }
|
|
689
698
|
},
|
|
690
699
|
setup(e) {
|
|
691
|
-
const t = e, n =
|
|
700
|
+
const t = e, n = N(() => !k.value), s = N(() => ({
|
|
692
701
|
"enter-active-class": "animate__animated animate__fadeInLeft",
|
|
693
702
|
...t.transitionConfig
|
|
694
|
-
})), c =
|
|
703
|
+
})), c = N(() => ({ showLayout: t.showLayout, showAside: t.showAside, showTabs: t.showTabs }));
|
|
695
704
|
return (a, i) => (E(), se(I(ye), we({
|
|
696
705
|
"transition-config": s.value,
|
|
697
706
|
"router-view-visible": n.value
|
|
698
707
|
}, c.value), {
|
|
699
|
-
header:
|
|
708
|
+
header: C(() => [
|
|
700
709
|
V(a.$slots, "header", {}, () => [
|
|
701
|
-
|
|
710
|
+
O(I(Me))
|
|
702
711
|
])
|
|
703
712
|
]),
|
|
704
|
-
aside:
|
|
713
|
+
aside: C(() => [
|
|
705
714
|
V(a.$slots, "aside", {}, () => [
|
|
706
|
-
|
|
715
|
+
O(I(Le), { menuAttr: a.menuAttr }, null, 8, ["menuAttr"])
|
|
707
716
|
])
|
|
708
717
|
]),
|
|
709
|
-
tab:
|
|
718
|
+
tab: C(() => [
|
|
710
719
|
V(a.$slots, "tab", {}, () => [
|
|
711
|
-
|
|
720
|
+
O(I(_e), { tabsAttr: a.tabsAttr }, null, 8, ["tabsAttr"])
|
|
712
721
|
])
|
|
713
722
|
]),
|
|
714
|
-
default:
|
|
715
|
-
|
|
723
|
+
default: C(() => [
|
|
724
|
+
O(Xe)
|
|
716
725
|
]),
|
|
717
726
|
_: 3
|
|
718
727
|
}, 16, ["transition-config", "router-view-visible"]));
|
|
@@ -726,9 +735,9 @@ const He = ["src", "entry", "name"], Ue = /* @__PURE__ */ x({
|
|
|
726
735
|
}, 300);
|
|
727
736
|
}), (t, n) => null;
|
|
728
737
|
}
|
|
729
|
-
}),
|
|
738
|
+
}), Ye = (e) => ["http://", "https://", "ws://", "wss://", "/"].find((n) => e.startsWith(n)) ? e : `/${e}`, nt = (e, t) => {
|
|
730
739
|
if (!(e != null && e.microApps) || !Array.isArray(e.microApps)) return;
|
|
731
|
-
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:
|
|
740
|
+
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: Ye(c.entry || c.name) })), t == null || t.addRoute({
|
|
732
741
|
name: "das-micro-app",
|
|
733
742
|
path: `${W.value}/:pathMatch(.*)*`,
|
|
734
743
|
component: ce,
|
|
@@ -743,7 +752,7 @@ const He = ["src", "entry", "name"], Ue = /* @__PURE__ */ x({
|
|
|
743
752
|
const { name: a, cmd: i, path: r } = c.data;
|
|
744
753
|
i === "reload" && d.reloadMicroAppRoute(a, r), i === "unload" && d.unloadMicroAppRoute(a, r);
|
|
745
754
|
});
|
|
746
|
-
const { enter: n, exit: s } =
|
|
755
|
+
const { enter: n, exit: s } = Be();
|
|
747
756
|
d.addEventListenerFromMicroApp("fullscreen", (c) => {
|
|
748
757
|
const a = c.data;
|
|
749
758
|
a && n(), a || s();
|
|
@@ -751,7 +760,7 @@ const He = ["src", "entry", "name"], Ue = /* @__PURE__ */ x({
|
|
|
751
760
|
const { cmd: a, isAutoCloseApp: i } = c.data || {};
|
|
752
761
|
a === "reload" && (i !== void 0 && (window.__isAutoCloseApp = i), location.reload());
|
|
753
762
|
});
|
|
754
|
-
},
|
|
763
|
+
}, st = (e, t) => {
|
|
755
764
|
if (!(e != null && e.microAppName)) return;
|
|
756
765
|
window.config.microAppName = e.microAppName, window.self !== window.top && e.microAppName && (window.__IN_DAS_MICRO_APP = !0);
|
|
757
766
|
const n = "das-micro-app-ghost";
|
|
@@ -818,8 +827,8 @@ const He = ["src", "entry", "name"], Ue = /* @__PURE__ */ x({
|
|
|
818
827
|
});
|
|
819
828
|
};
|
|
820
829
|
export {
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
830
|
+
tt as DasMainAppLayout,
|
|
831
|
+
nt as initMainApp,
|
|
832
|
+
st as initMicroApp,
|
|
824
833
|
d as microFrontend
|
|
825
834
|
};
|
|
Binary file
|