@das-fed/web 6.4.0-dev.2 → 6.4.0-dev.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/esm-map.json +1 -2
- package/{packages/main-app-framework/index-CRT8yHn-.js → index-C9Z5Et6m.js} +1 -1
- package/index-CtOlfmIU.js +7088 -0
- package/index-CtOlfmIU.js.gz +0 -0
- package/{packages/main-app-framework/index-Twj2RXRy.js → index-D6BMoZho.js} +14 -14
- package/index-D6BMoZho.js.gz +0 -0
- package/index-DNqfV3E9.js +71 -0
- package/index-DNqfV3E9.js.gz +0 -0
- package/index.js +1 -1
- package/package.json +6 -6
- package/packages/create-das-web-app/config.js +1 -0
- package/packages/create-das-web-app/index.js +48 -807
- package/packages/create-das-web-app/index.js.gz +0 -0
- package/packages/i18n/config.js +1 -0
- package/packages/i18n/index.js.gz +0 -0
- package/packages/layout/config.js +1 -0
- package/packages/layout/index.js +298 -291
- 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/config.js +1 -0
- package/{index-CC5hN73H.js → packages/main-app-framework/index-CGRKqP1O.js} +1 -1
- package/packages/main-app-framework/index-IzpOTZ0u.js +5779 -0
- package/packages/main-app-framework/index-IzpOTZ0u.js.gz +0 -0
- package/packages/main-app-framework/index-fj8M6ijq.js +71 -0
- package/packages/main-app-framework/index-fj8M6ijq.js.gz +0 -0
- package/{index-D4LFa1We.js → packages/main-app-framework/index-t4FWMW__.js} +14 -14
- package/packages/main-app-framework/index-t4FWMW__.js.gz +0 -0
- 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/config.js +1 -0
- package/packages/micro-frontend/index.js +253 -243
- package/packages/micro-frontend/index.js.gz +0 -0
- package/packages/micro-frontend/style.css +1 -1
- package/packages/style/config.js +1 -0
- package/packages/style/style.css +1 -1
- package/packages/style/style.css.gz +0 -0
- package/packages/theme/config.js +1 -0
- package/packages/theme/index.js +24 -24
- package/packages/theme/index.js.gz +0 -0
- package/style.css +2 -2
- package/style.css.gz +0 -0
- package/types/main-app-framework/business/video-link/video-dialog/hooks/PlayerProvider.d.ts +3 -3
- package/types/main-app-framework/components/person-set-dialog/index.d.ts +1 -1
- package/types/main-app-framework/init-layout/hooks/nav-slots/use-user-command.d.ts +2 -2
- package/types/micro-frontend/index.d.ts +1 -1
- package/index-BqgahaIi.js +0 -11086
- package/index-BqgahaIi.js.gz +0 -0
- package/index-D4LFa1We.js.gz +0 -0
- package/index-DpLK467K.js +0 -70
- package/index-DpLK467K.js.gz +0 -0
- package/packages/main-app-framework/index-2WWk8ggi.js +0 -9022
- package/packages/main-app-framework/index-2WWk8ggi.js.gz +0 -0
- package/packages/main-app-framework/index-BqkWKMMe.js +0 -70
- package/packages/main-app-framework/index-BqkWKMMe.js.gz +0 -0
- package/packages/main-app-framework/index-Twj2RXRy.js.gz +0 -0
|
@@ -1,35 +1,7 @@
|
|
|
1
1
|
import '@das-fed/web/packages/micro-frontend/style.css';
|
|
2
|
-
import {
|
|
3
|
-
import { DasWebLayout as he, DasWebNav as we, DasWebMenu as ge, DasWebTabs as
|
|
4
|
-
const
|
|
5
|
-
__name: "das-micro-app",
|
|
6
|
-
props: {
|
|
7
|
-
src: {},
|
|
8
|
-
name: {},
|
|
9
|
-
actived: { type: Boolean }
|
|
10
|
-
},
|
|
11
|
-
emits: ["onLoaded", "onActivated", "onDeactivated"],
|
|
12
|
-
setup(e, { emit: t }) {
|
|
13
|
-
const n = e, r = t, c = (s) => {
|
|
14
|
-
r("onLoaded", s);
|
|
15
|
-
}, a = T(() => n.actived);
|
|
16
|
-
return y(() => a.value, (s) => {
|
|
17
|
-
s && r("onActivated"), s || r("onDeactivated");
|
|
18
|
-
}), (s, o) => (I(), N("iframe", {
|
|
19
|
-
class: "das-micro-app",
|
|
20
|
-
src: n.src,
|
|
21
|
-
entry: n.src,
|
|
22
|
-
name: n.name,
|
|
23
|
-
frameborder: "0",
|
|
24
|
-
onLoad: c
|
|
25
|
-
}, null, 40, ye));
|
|
26
|
-
}
|
|
27
|
-
}), te = (e, t) => {
|
|
28
|
-
const n = e.__vccOpts || e;
|
|
29
|
-
for (const [r, c] of t)
|
|
30
|
-
n[r] = c;
|
|
31
|
-
return n;
|
|
32
|
-
}, Le = /* @__PURE__ */ te(Me, [["__scopeId", "data-v-2266bab0"]]), z = w("/das-micro-app"), f = w([]), k = w(!1), R = w([]), D = w(!0);
|
|
2
|
+
import { ref as w, watch as M, reactive as O, getCurrentScope as oe, onScopeDispose as ce, unref as I, getCurrentInstance as le, onMounted as ue, nextTick as Z, defineComponent as x, computed as D, openBlock as E, createElementBlock as N, Fragment as $, renderList as de, withDirectives as pe, createBlock as ee, vShow as me, createCommentVNode as fe, mergeProps as ve, withCtx as C, renderSlot as V, createVNode as F, onActivated as Ae } from "vue";
|
|
3
|
+
import { DasWebLayout as he, DasWebNav as we, DasWebMenu as ge, DasWebTabs as ye } from "@das-fed/web/packages/layout/index";
|
|
4
|
+
const z = w("/das-micro-app"), f = w([]), k = w(!1), T = w([]), R = w(!0);
|
|
33
5
|
let A = null, h = null, L = null;
|
|
34
6
|
const b = (e, t, n) => {
|
|
35
7
|
var c, a, i, s;
|
|
@@ -42,12 +14,10 @@ const b = (e, t, n) => {
|
|
|
42
14
|
(s = (i = r.dom) == null ? void 0 : i.contentWindow) == null || s.postMessage({ type: t, data: n }, r.entry);
|
|
43
15
|
}
|
|
44
16
|
}, q = (e, t) => {
|
|
45
|
-
var
|
|
46
|
-
const {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
(a = window.top) == null || a.postMessage({ type: e, data: t }, c);
|
|
50
|
-
}, be = () => {
|
|
17
|
+
var r;
|
|
18
|
+
const { origin: n } = new URL(location.href);
|
|
19
|
+
(r = window.top) == null || r.postMessage({ type: e, data: t }, n);
|
|
20
|
+
}, Me = () => {
|
|
51
21
|
h || (h || (h = {}), window.addEventListener(
|
|
52
22
|
"message",
|
|
53
23
|
(e) => {
|
|
@@ -58,7 +28,7 @@ const b = (e, t, n) => {
|
|
|
58
28
|
},
|
|
59
29
|
!1
|
|
60
30
|
));
|
|
61
|
-
},
|
|
31
|
+
}, _e = () => {
|
|
62
32
|
A || (A || (A = {}), window.addEventListener(
|
|
63
33
|
"message",
|
|
64
34
|
(e) => {
|
|
@@ -69,16 +39,16 @@ const b = (e, t, n) => {
|
|
|
69
39
|
},
|
|
70
40
|
!1
|
|
71
41
|
));
|
|
72
|
-
},
|
|
73
|
-
|
|
42
|
+
}, Le = (e, t) => {
|
|
43
|
+
_e();
|
|
74
44
|
const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8);
|
|
75
45
|
return A[e] || (A[e] = {}), A[e][n] = t, {
|
|
76
46
|
remove: () => {
|
|
77
47
|
A[e] && A[e][n] && delete A[e][n];
|
|
78
48
|
}
|
|
79
49
|
};
|
|
80
|
-
},
|
|
81
|
-
|
|
50
|
+
}, be = (e, t) => {
|
|
51
|
+
Me();
|
|
82
52
|
const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8);
|
|
83
53
|
return h[e] || (h[e] = {}), h[e][n] = t, {
|
|
84
54
|
remove: () => {
|
|
@@ -88,7 +58,7 @@ const b = (e, t, n) => {
|
|
|
88
58
|
}, Q = async (e) => {
|
|
89
59
|
await Promise.all(
|
|
90
60
|
f.value.filter((t) => t.loaded).map((t) => new Promise(async (n) => {
|
|
91
|
-
t.dom || await new Promise((r) =>
|
|
61
|
+
t.dom || await new Promise((r) => M(() => t.dom, r)), setTimeout(() => {
|
|
92
62
|
b(t.name, "sessionStorage", e), n(!0);
|
|
93
63
|
}, 0);
|
|
94
64
|
}))
|
|
@@ -114,7 +84,7 @@ const b = (e, t, n) => {
|
|
|
114
84
|
},
|
|
115
85
|
hideMicroApp: async (e) => {
|
|
116
86
|
const t = f.value.find((n) => n.name === e);
|
|
117
|
-
t && t.loaded && (t.dom || await new Promise((n) =>
|
|
87
|
+
t && t.loaded && (t.dom || await new Promise((n) => M(() => t.dom, n)), b(e, "router", {
|
|
118
88
|
cmd: "push",
|
|
119
89
|
route: {
|
|
120
90
|
name: "das-micro-app-ghost",
|
|
@@ -138,7 +108,7 @@ const b = (e, t, n) => {
|
|
|
138
108
|
},
|
|
139
109
|
setMicroAppRoute: async (e, t, n) => {
|
|
140
110
|
const r = f.value.find((s) => s.name === t);
|
|
141
|
-
if (!r || !r.loaded || !r.actived || (r.dom || await new Promise((s) =>
|
|
111
|
+
if (!r || !r.loaded || !r.actived || (r.dom || await new Promise((s) => M(() => r.dom, s)), !r.actived)) return r;
|
|
142
112
|
const c = n.path || n, a = n.query || {}, i = n.params || {};
|
|
143
113
|
return e.push({
|
|
144
114
|
path: `/${t}${c}`,
|
|
@@ -156,8 +126,8 @@ const b = (e, t, n) => {
|
|
|
156
126
|
},
|
|
157
127
|
sendMessageToMicroApp: b,
|
|
158
128
|
sendMessageToMainApp: q,
|
|
159
|
-
addEventListenerFromMainApp:
|
|
160
|
-
addEventListenerFromMicroApp:
|
|
129
|
+
addEventListenerFromMainApp: Le,
|
|
130
|
+
addEventListenerFromMicroApp: be,
|
|
161
131
|
setMainAppOverlay: (e, t) => {
|
|
162
132
|
q("bodyOverlay", { visible: e, style: t });
|
|
163
133
|
},
|
|
@@ -198,139 +168,16 @@ const b = (e, t, n) => {
|
|
|
198
168
|
},
|
|
199
169
|
reloadMicroAppRoute: async (e, t) => {
|
|
200
170
|
const n = f.value.find((r) => r.name === e);
|
|
201
|
-
n && (!n.loaded || !n.actived || (n.dom || await new Promise((r) =>
|
|
171
|
+
n && (!n.loaded || !n.actived || (n.dom || await new Promise((r) => M(() => n.dom, r)), b(e, "route", { cmd: "reload", path: t })));
|
|
202
172
|
},
|
|
203
173
|
unloadMicroAppRoute: async (e, t) => {
|
|
204
174
|
const n = f.value.find((r) => r.name === e);
|
|
205
|
-
n && (!n.loaded || !n.actived || (n.dom || await new Promise((r) =>
|
|
175
|
+
n && (!n.loaded || !n.actived || (n.dom || await new Promise((r) => M(() => n.dom, r)), b(e, "route", { cmd: "unload", path: t })));
|
|
206
176
|
},
|
|
207
177
|
setMainAppLayoutVisible: (e) => {
|
|
208
178
|
q("layoutVisible", { visible: e });
|
|
209
179
|
}
|
|
210
|
-
},
|
|
211
|
-
__name: "das-micro-apps",
|
|
212
|
-
setup(e) {
|
|
213
|
-
const t = w(null), n = async (a, i) => {
|
|
214
|
-
const s = f.value.find((m) => m.name === i);
|
|
215
|
-
if (!s) return;
|
|
216
|
-
s.dom = a.target, await ee(), await new Promise((m) => setTimeout(m, 50));
|
|
217
|
-
const o = () => {
|
|
218
|
-
const m = t.value.getBoundingClientRect() || {};
|
|
219
|
-
return m.width = t.value.clientWidth, m.height = t.value.clientHeight, m;
|
|
220
|
-
};
|
|
221
|
-
d.sendMessageToMicroApp(i, "onLoaded", {
|
|
222
|
-
href: location.href,
|
|
223
|
-
microAppContainerRect: o(),
|
|
224
|
-
entry: s.entry,
|
|
225
|
-
name: s.name
|
|
226
|
-
});
|
|
227
|
-
const { dom: p, ...l } = s;
|
|
228
|
-
d.triggerMicroAppLifeCycleListener("onLoaded", l), new ResizeObserver(() => {
|
|
229
|
-
d.sendMessageToMicroApp(i, "resize", o());
|
|
230
|
-
}).observe(t.value), d.sendMessageToMicroApp(i, "setProxyMessageStatus", { visible: !0, parentHref: location.href }), d.sendMessageToMicroApp(i, "setProxSsoStatus", { visible: !0, parentHref: location.href });
|
|
231
|
-
}, r = (a, i) => {
|
|
232
|
-
const s = f.value.find((l) => l.name === i);
|
|
233
|
-
if (!s) return;
|
|
234
|
-
const { dom: o, ...p } = s;
|
|
235
|
-
d.sendMessageToMicroApp(i, "onActivated"), d.triggerMicroAppLifeCycleListener("onActivated", p);
|
|
236
|
-
}, c = (a, i) => {
|
|
237
|
-
const s = f.value.find((l) => l.name === i);
|
|
238
|
-
if (!s) return;
|
|
239
|
-
const { dom: o, ...p } = s;
|
|
240
|
-
d.sendMessageToMicroApp(i, "onDeactivated"), d.triggerMicroAppLifeCycleListener("onDeactivated", p);
|
|
241
|
-
};
|
|
242
|
-
return (a, i) => (I(), N(
|
|
243
|
-
"div",
|
|
244
|
-
{
|
|
245
|
-
ref_key: "containerRef",
|
|
246
|
-
ref: t,
|
|
247
|
-
class: "das-micro-app-container"
|
|
248
|
-
},
|
|
249
|
-
[
|
|
250
|
-
(I(!0), N(
|
|
251
|
-
$,
|
|
252
|
-
null,
|
|
253
|
-
oe(E(f), (s) => (I(), N(
|
|
254
|
-
$,
|
|
255
|
-
null,
|
|
256
|
-
[
|
|
257
|
-
s.loaded ? ce((I(), Z(Le, {
|
|
258
|
-
key: 0,
|
|
259
|
-
src: s.src || "",
|
|
260
|
-
name: s.name,
|
|
261
|
-
actived: s.actived,
|
|
262
|
-
onOnLoaded: (o) => n(o, s.name),
|
|
263
|
-
onOnActivated: (o) => r(o, s.name),
|
|
264
|
-
onOnDeactivated: (o) => c(o, s.name)
|
|
265
|
-
}, null, 8, ["src", "name", "actived", "onOnLoaded", "onOnActivated", "onOnDeactivated"])), [
|
|
266
|
-
[le, s.actived]
|
|
267
|
-
]) : ue("v-if", !0)
|
|
268
|
-
],
|
|
269
|
-
64
|
|
270
|
-
/* STABLE_FRAGMENT */
|
|
271
|
-
))),
|
|
272
|
-
256
|
|
273
|
-
/* UNKEYED_FRAGMENT */
|
|
274
|
-
))
|
|
275
|
-
],
|
|
276
|
-
512
|
|
277
|
-
/* NEED_PATCH */
|
|
278
|
-
));
|
|
279
|
-
}
|
|
280
|
-
}), Oe = /* @__PURE__ */ te(Pe, [["__scopeId", "data-v-2e3798bc"]]), Ze = /* @__PURE__ */ x({
|
|
281
|
-
__name: "das-main-app-layout",
|
|
282
|
-
props: {
|
|
283
|
-
transitionConfig: { default: () => {
|
|
284
|
-
} },
|
|
285
|
-
showLayout: { type: Boolean, default: !0 },
|
|
286
|
-
showAside: { type: Boolean, default: !0 },
|
|
287
|
-
showTabs: { type: Boolean, default: !0 },
|
|
288
|
-
menuAttr: { default: () => {
|
|
289
|
-
} },
|
|
290
|
-
tabsAttr: { default: () => {
|
|
291
|
-
} }
|
|
292
|
-
},
|
|
293
|
-
setup(e) {
|
|
294
|
-
const t = e, n = T(() => !k.value), r = T(() => ({
|
|
295
|
-
"enter-active-class": "animate__animated animate__fadeInLeft",
|
|
296
|
-
...t.transitionConfig
|
|
297
|
-
})), c = T(() => ({ showLayout: t.showLayout, showAside: t.showAside, showTabs: t.showTabs }));
|
|
298
|
-
return (a, i) => (I(), Z(E(he), de({
|
|
299
|
-
"transition-config": r.value,
|
|
300
|
-
"router-view-visible": n.value
|
|
301
|
-
}, c.value), {
|
|
302
|
-
header: C(() => [
|
|
303
|
-
V(a.$slots, "header", {}, () => [
|
|
304
|
-
F(E(we))
|
|
305
|
-
])
|
|
306
|
-
]),
|
|
307
|
-
aside: C(() => [
|
|
308
|
-
V(a.$slots, "aside", {}, () => [
|
|
309
|
-
F(E(ge), { menuAttr: a.menuAttr }, null, 8, ["menuAttr"])
|
|
310
|
-
])
|
|
311
|
-
]),
|
|
312
|
-
tab: C(() => [
|
|
313
|
-
V(a.$slots, "tab", {}, () => [
|
|
314
|
-
F(E(_e), { tabsAttr: a.tabsAttr }, null, 8, ["tabsAttr"])
|
|
315
|
-
])
|
|
316
|
-
]),
|
|
317
|
-
default: C(() => [
|
|
318
|
-
F(Oe)
|
|
319
|
-
]),
|
|
320
|
-
_: 3
|
|
321
|
-
/* FORWARDED */
|
|
322
|
-
}, 16, ["transition-config", "router-view-visible"]));
|
|
323
|
-
}
|
|
324
|
-
}), ne = /* @__PURE__ */ x({
|
|
325
|
-
__name: "das-micro-app-ghost",
|
|
326
|
-
setup(e) {
|
|
327
|
-
return pe(() => {
|
|
328
|
-
setTimeout(() => {
|
|
329
|
-
document.documentElement.checkVisibility() && history.back();
|
|
330
|
-
}, 300);
|
|
331
|
-
}), (t, n) => null;
|
|
332
|
-
}
|
|
333
|
-
}), u = O({
|
|
180
|
+
}, u = O({
|
|
334
181
|
visible: !1,
|
|
335
182
|
logo: "",
|
|
336
183
|
items: [],
|
|
@@ -341,7 +188,7 @@ const b = (e, t, n) => {
|
|
|
341
188
|
// activeItem: '',
|
|
342
189
|
// activeProject: {},
|
|
343
190
|
eventListeners: {}
|
|
344
|
-
}),
|
|
191
|
+
}), Ie = {
|
|
345
192
|
show: () => {
|
|
346
193
|
u.visible = !0;
|
|
347
194
|
},
|
|
@@ -360,10 +207,14 @@ const b = (e, t, n) => {
|
|
|
360
207
|
u.items = t;
|
|
361
208
|
},
|
|
362
209
|
appendItem: (e) => {
|
|
363
|
-
|
|
210
|
+
setTimeout(() => {
|
|
211
|
+
u.visible || (u.visible = !0), !u.items.find((n) => n.value == e.value) && u.items.push(e);
|
|
212
|
+
}, 200);
|
|
364
213
|
},
|
|
365
214
|
setActiveItem: (e) => {
|
|
366
|
-
|
|
215
|
+
setTimeout(() => {
|
|
216
|
+
u.activeItem = e;
|
|
217
|
+
}, 200);
|
|
367
218
|
},
|
|
368
219
|
setConfig: (e) => {
|
|
369
220
|
u.config = e;
|
|
@@ -414,23 +265,27 @@ const b = (e, t, n) => {
|
|
|
414
265
|
remove: r
|
|
415
266
|
};
|
|
416
267
|
}
|
|
417
|
-
},
|
|
268
|
+
}, y = O({
|
|
418
269
|
items: [],
|
|
419
270
|
eventListeners: {}
|
|
420
|
-
}),
|
|
271
|
+
}), Ee = {
|
|
421
272
|
setItems: (e) => {
|
|
422
|
-
|
|
273
|
+
setTimeout(() => {
|
|
274
|
+
y.items = e;
|
|
275
|
+
}, 200);
|
|
423
276
|
},
|
|
424
|
-
getItems: () =>
|
|
277
|
+
getItems: () => y.items,
|
|
425
278
|
setActiveItem: (e) => {
|
|
426
|
-
|
|
279
|
+
setTimeout(() => {
|
|
280
|
+
y.activeItem = e;
|
|
281
|
+
}, 200);
|
|
427
282
|
},
|
|
428
283
|
setPopupClassName: (e) => {
|
|
429
|
-
|
|
284
|
+
y.popupClassName = e;
|
|
430
285
|
},
|
|
431
286
|
triggerEventListener: (e, t, n) => {
|
|
432
287
|
var i;
|
|
433
|
-
const r =
|
|
288
|
+
const r = y.eventListeners, { autoRemove: c = !1 } = n || {}, a = [];
|
|
434
289
|
for (const s in r) {
|
|
435
290
|
const o = r[s];
|
|
436
291
|
o.type === e && a.push(
|
|
@@ -443,9 +298,9 @@ const b = (e, t, n) => {
|
|
|
443
298
|
},
|
|
444
299
|
addEventListener: (e, t) => {
|
|
445
300
|
const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8), r = () => {
|
|
446
|
-
|
|
301
|
+
y.eventListeners[n] && delete y.eventListeners[n];
|
|
447
302
|
};
|
|
448
|
-
return
|
|
303
|
+
return y.eventListeners[n] = {
|
|
449
304
|
type: e,
|
|
450
305
|
handler: async (c) => {
|
|
451
306
|
try {
|
|
@@ -462,7 +317,7 @@ const b = (e, t, n) => {
|
|
|
462
317
|
}, v = O({
|
|
463
318
|
items: [],
|
|
464
319
|
eventListeners: {}
|
|
465
|
-
}),
|
|
320
|
+
}), Se = {
|
|
466
321
|
setItems: (e) => {
|
|
467
322
|
v.items = e;
|
|
468
323
|
},
|
|
@@ -472,11 +327,15 @@ const b = (e, t, n) => {
|
|
|
472
327
|
v.items = t;
|
|
473
328
|
},
|
|
474
329
|
appendItem: (e) => {
|
|
475
|
-
|
|
476
|
-
|
|
330
|
+
setTimeout(() => {
|
|
331
|
+
const t = v.items.findIndex((n) => n.value == e.value);
|
|
332
|
+
t !== -1 ? v.items.splice(t, 1, e) : v.items.push(e);
|
|
333
|
+
}, 200);
|
|
477
334
|
},
|
|
478
335
|
setActiveItem: (e) => {
|
|
479
|
-
|
|
336
|
+
setTimeout(() => {
|
|
337
|
+
v.activeItem = e;
|
|
338
|
+
}, 200);
|
|
480
339
|
},
|
|
481
340
|
triggerEventListener: (e, t, n) => {
|
|
482
341
|
var i;
|
|
@@ -511,7 +370,7 @@ const b = (e, t, n) => {
|
|
|
511
370
|
}
|
|
512
371
|
}, P = O({
|
|
513
372
|
eventListeners: {}
|
|
514
|
-
}),
|
|
373
|
+
}), Pe = {
|
|
515
374
|
triggerEventListener: (e, t, n) => {
|
|
516
375
|
var i;
|
|
517
376
|
const r = P.eventListeners, { autoRemove: c = !1 } = n || {}, a = [];
|
|
@@ -546,64 +405,69 @@ const b = (e, t, n) => {
|
|
|
546
405
|
}, W = O({
|
|
547
406
|
visible: !1,
|
|
548
407
|
style: {}
|
|
549
|
-
}),
|
|
408
|
+
}), Oe = {
|
|
550
409
|
set: (e, t) => {
|
|
551
410
|
W.visible = e, t || (t = {}), t.transition || (t.transition = "all 0.3s"), t && (W.style = t);
|
|
552
411
|
}
|
|
553
|
-
},
|
|
412
|
+
}, Ce = {
|
|
554
413
|
nav: u,
|
|
555
|
-
menu:
|
|
414
|
+
menu: y,
|
|
556
415
|
tab: v,
|
|
557
416
|
overlay: W,
|
|
558
417
|
iframeView: P,
|
|
559
418
|
visible: w(!0)
|
|
560
419
|
}, j = {
|
|
561
|
-
nav:
|
|
562
|
-
menu:
|
|
563
|
-
tab:
|
|
564
|
-
overlay:
|
|
565
|
-
iframeView:
|
|
566
|
-
setVisible: (e) =>
|
|
420
|
+
nav: Ie,
|
|
421
|
+
menu: Ee,
|
|
422
|
+
tab: Se,
|
|
423
|
+
overlay: Oe,
|
|
424
|
+
iframeView: Pe,
|
|
425
|
+
setVisible: (e) => Ce.visible.value = e
|
|
426
|
+
}, te = (e, t) => {
|
|
427
|
+
const n = e.__vccOpts || e;
|
|
428
|
+
for (const [r, c] of t)
|
|
429
|
+
n[r] = c;
|
|
430
|
+
return n;
|
|
567
431
|
};
|
|
568
432
|
var H;
|
|
569
|
-
const B = typeof window < "u",
|
|
433
|
+
const B = typeof window < "u", Fe = (e) => typeof e == "string", Te = () => {
|
|
570
434
|
};
|
|
571
435
|
B && ((H = window == null ? void 0 : window.navigator) != null && H.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
|
|
572
|
-
function
|
|
573
|
-
return typeof e == "function" ? e() :
|
|
436
|
+
function ne(e) {
|
|
437
|
+
return typeof e == "function" ? e() : I(e);
|
|
574
438
|
}
|
|
575
|
-
function
|
|
439
|
+
function Re(e) {
|
|
576
440
|
return e;
|
|
577
441
|
}
|
|
578
|
-
function
|
|
579
|
-
return
|
|
442
|
+
function re(e) {
|
|
443
|
+
return oe() ? (ce(e), !0) : !1;
|
|
580
444
|
}
|
|
581
|
-
function
|
|
582
|
-
|
|
445
|
+
function De(e, t = !0) {
|
|
446
|
+
le() ? ue(e) : t ? e() : Z(e);
|
|
583
447
|
}
|
|
584
|
-
function
|
|
448
|
+
function se(e) {
|
|
585
449
|
var t;
|
|
586
|
-
const n =
|
|
450
|
+
const n = ne(e);
|
|
587
451
|
return (t = n == null ? void 0 : n.$el) != null ? t : n;
|
|
588
452
|
}
|
|
589
|
-
const
|
|
590
|
-
function
|
|
453
|
+
const Ne = B ? window : void 0, ke = B ? window.document : void 0;
|
|
454
|
+
function xe(...e) {
|
|
591
455
|
let t, n, r, c;
|
|
592
|
-
if (
|
|
593
|
-
return
|
|
456
|
+
if (Fe(e[0]) || Array.isArray(e[0]) ? ([n, r, c] = e, t = Ne) : [t, n, r, c] = e, !t)
|
|
457
|
+
return Te;
|
|
594
458
|
Array.isArray(n) || (n = [n]), Array.isArray(r) || (r = [r]);
|
|
595
459
|
const a = [], i = () => {
|
|
596
460
|
a.forEach((l) => l()), a.length = 0;
|
|
597
|
-
}, s = (l, g, m,
|
|
598
|
-
i(), l && a.push(...n.flatMap((m) => r.map((
|
|
461
|
+
}, s = (l, g, m, _) => (l.addEventListener(g, m, _), () => l.removeEventListener(g, m, _)), o = M(() => [se(t), ne(c)], ([l, g]) => {
|
|
462
|
+
i(), l && a.push(...n.flatMap((m) => r.map((_) => s(l, m, _, g))));
|
|
599
463
|
}, { immediate: !0, flush: "post" }), p = () => {
|
|
600
464
|
o(), i();
|
|
601
465
|
};
|
|
602
|
-
return
|
|
466
|
+
return re(p), p;
|
|
603
467
|
}
|
|
604
|
-
function
|
|
468
|
+
function Ve(e, t = !1) {
|
|
605
469
|
const n = w(), r = () => n.value = !!e();
|
|
606
|
-
return r(),
|
|
470
|
+
return r(), De(r, t), n;
|
|
607
471
|
}
|
|
608
472
|
const U = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, G = "__vueuse_ssr_handlers__";
|
|
609
473
|
U[G] = U[G] || {};
|
|
@@ -649,10 +513,10 @@ const J = [
|
|
|
649
513
|
"MSFullscreenError"
|
|
650
514
|
]
|
|
651
515
|
];
|
|
652
|
-
function
|
|
653
|
-
const { document: n =
|
|
516
|
+
function qe(e, t = {}) {
|
|
517
|
+
const { document: n = ke, autoExit: r = !1 } = t, c = n == null ? void 0 : n.querySelector("html"), a = w(!1);
|
|
654
518
|
let i = J[0];
|
|
655
|
-
const s =
|
|
519
|
+
const s = Ve(() => {
|
|
656
520
|
if (n) {
|
|
657
521
|
for (const S of J)
|
|
658
522
|
if (S[1] in n)
|
|
@@ -664,22 +528,22 @@ function ze(e, t = {}) {
|
|
|
664
528
|
async function m() {
|
|
665
529
|
s.value && (n != null && n[l] && await n[p](), a.value = !1);
|
|
666
530
|
}
|
|
667
|
-
async function
|
|
531
|
+
async function _() {
|
|
668
532
|
if (!s.value)
|
|
669
533
|
return;
|
|
670
534
|
await m();
|
|
671
|
-
const S =
|
|
535
|
+
const S = se(c);
|
|
672
536
|
S && (await S[o](), a.value = !0);
|
|
673
537
|
}
|
|
674
538
|
async function ie() {
|
|
675
|
-
a.value ? await m() : await
|
|
539
|
+
a.value ? await m() : await _();
|
|
676
540
|
}
|
|
677
|
-
return n &&
|
|
541
|
+
return n && xe(n, g, () => {
|
|
678
542
|
a.value = !!(n != null && n[l]);
|
|
679
|
-
}, !1), r &&
|
|
543
|
+
}, !1), r && re(m), {
|
|
680
544
|
isSupported: s,
|
|
681
545
|
isFullscreen: a,
|
|
682
|
-
enter:
|
|
546
|
+
enter: _,
|
|
683
547
|
exit: m,
|
|
684
548
|
toggle: ie
|
|
685
549
|
};
|
|
@@ -688,15 +552,15 @@ var K;
|
|
|
688
552
|
(function(e) {
|
|
689
553
|
e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE";
|
|
690
554
|
})(K || (K = {}));
|
|
691
|
-
var
|
|
555
|
+
var Qe = Object.defineProperty, X = Object.getOwnPropertySymbols, We = Object.prototype.hasOwnProperty, Be = Object.prototype.propertyIsEnumerable, Y = (e, t, n) => t in e ? Qe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, $e = (e, t) => {
|
|
692
556
|
for (var n in t || (t = {}))
|
|
693
|
-
|
|
557
|
+
We.call(t, n) && Y(e, n, t[n]);
|
|
694
558
|
if (X)
|
|
695
559
|
for (var n of X(t))
|
|
696
|
-
|
|
560
|
+
Be.call(t, n) && Y(e, n, t[n]);
|
|
697
561
|
return e;
|
|
698
562
|
};
|
|
699
|
-
const
|
|
563
|
+
const ze = {
|
|
700
564
|
easeInSine: [0.12, 0, 0.39, 0],
|
|
701
565
|
easeOutSine: [0.61, 1, 0.88, 1],
|
|
702
566
|
easeInOutSine: [0.37, 0, 0.63, 1],
|
|
@@ -722,15 +586,161 @@ const Je = {
|
|
|
722
586
|
easeOutBack: [0.34, 1.56, 0.64, 1],
|
|
723
587
|
easeInOutBack: [0.68, -0.6, 0.32, 1.6]
|
|
724
588
|
};
|
|
725
|
-
|
|
726
|
-
linear:
|
|
727
|
-
},
|
|
728
|
-
const
|
|
589
|
+
$e({
|
|
590
|
+
linear: Re
|
|
591
|
+
}, ze);
|
|
592
|
+
const je = ["src", "entry", "name"], He = /* @__PURE__ */ x({
|
|
593
|
+
__name: "das-micro-app",
|
|
594
|
+
props: {
|
|
595
|
+
src: {},
|
|
596
|
+
name: {},
|
|
597
|
+
actived: { type: Boolean }
|
|
598
|
+
},
|
|
599
|
+
emits: ["onLoaded", "onActivated", "onDeactivated"],
|
|
600
|
+
setup(e, { emit: t }) {
|
|
601
|
+
const n = e, r = t, c = (s) => {
|
|
602
|
+
r("onLoaded", s);
|
|
603
|
+
}, a = D(() => n.actived);
|
|
604
|
+
return M(() => a.value, (s) => {
|
|
605
|
+
s && r("onActivated"), s || r("onDeactivated");
|
|
606
|
+
}), (s, o) => (E(), N("iframe", {
|
|
607
|
+
class: "das-micro-app",
|
|
608
|
+
src: n.src,
|
|
609
|
+
entry: n.src,
|
|
610
|
+
name: n.name,
|
|
611
|
+
frameborder: "0",
|
|
612
|
+
onLoad: c
|
|
613
|
+
}, null, 40, je));
|
|
614
|
+
}
|
|
615
|
+
}), Ue = /* @__PURE__ */ te(He, [["__scopeId", "data-v-8ae871f6"]]), Ge = /* @__PURE__ */ x({
|
|
616
|
+
__name: "das-micro-apps",
|
|
617
|
+
setup(e) {
|
|
618
|
+
const t = w(null), n = async (a, i) => {
|
|
619
|
+
const s = f.value.find((m) => m.name === i);
|
|
620
|
+
if (!s) return;
|
|
621
|
+
s.dom = a.target, await Z(), await new Promise((m) => setTimeout(m, 50));
|
|
622
|
+
const o = () => {
|
|
623
|
+
const m = t.value.getBoundingClientRect() || {};
|
|
624
|
+
return m.width = t.value.clientWidth, m.height = t.value.clientHeight, m;
|
|
625
|
+
};
|
|
626
|
+
d.sendMessageToMicroApp(i, "onLoaded", {
|
|
627
|
+
href: location.href,
|
|
628
|
+
microAppContainerRect: o(),
|
|
629
|
+
entry: s.entry,
|
|
630
|
+
name: s.name
|
|
631
|
+
});
|
|
632
|
+
const { dom: p, ...l } = s;
|
|
633
|
+
d.triggerMicroAppLifeCycleListener("onLoaded", l), new ResizeObserver(() => {
|
|
634
|
+
d.sendMessageToMicroApp(i, "resize", o());
|
|
635
|
+
}).observe(t.value), d.sendMessageToMicroApp(i, "setProxyMessageStatus", { visible: !0, parentHref: location.href }), d.sendMessageToMicroApp(i, "setProxSsoStatus", { visible: !0, parentHref: location.href });
|
|
636
|
+
}, r = (a, i) => {
|
|
637
|
+
const s = f.value.find((l) => l.name === i);
|
|
638
|
+
if (!s) return;
|
|
639
|
+
const { dom: o, ...p } = s;
|
|
640
|
+
d.sendMessageToMicroApp(i, "onActivated"), d.triggerMicroAppLifeCycleListener("onActivated", p);
|
|
641
|
+
}, c = (a, i) => {
|
|
642
|
+
const s = f.value.find((l) => l.name === i);
|
|
643
|
+
if (!s) return;
|
|
644
|
+
const { dom: o, ...p } = s;
|
|
645
|
+
d.sendMessageToMicroApp(i, "onDeactivated"), d.triggerMicroAppLifeCycleListener("onDeactivated", p);
|
|
646
|
+
};
|
|
647
|
+
return (a, i) => (E(), N(
|
|
648
|
+
"div",
|
|
649
|
+
{
|
|
650
|
+
ref_key: "containerRef",
|
|
651
|
+
ref: t,
|
|
652
|
+
class: "das-micro-app-container"
|
|
653
|
+
},
|
|
654
|
+
[
|
|
655
|
+
(E(!0), N(
|
|
656
|
+
$,
|
|
657
|
+
null,
|
|
658
|
+
de(I(f), (s) => (E(), N(
|
|
659
|
+
$,
|
|
660
|
+
null,
|
|
661
|
+
[
|
|
662
|
+
s.loaded ? pe((E(), ee(Ue, {
|
|
663
|
+
key: 0,
|
|
664
|
+
src: s.src || "",
|
|
665
|
+
name: s.name,
|
|
666
|
+
actived: s.actived,
|
|
667
|
+
onOnLoaded: (o) => n(o, s.name),
|
|
668
|
+
onOnActivated: (o) => r(o, s.name),
|
|
669
|
+
onOnDeactivated: (o) => c(o, s.name)
|
|
670
|
+
}, null, 8, ["src", "name", "actived", "onOnLoaded", "onOnActivated", "onOnDeactivated"])), [
|
|
671
|
+
[me, s.actived]
|
|
672
|
+
]) : fe("v-if", !0)
|
|
673
|
+
],
|
|
674
|
+
64
|
|
675
|
+
/* STABLE_FRAGMENT */
|
|
676
|
+
))),
|
|
677
|
+
256
|
|
678
|
+
/* UNKEYED_FRAGMENT */
|
|
679
|
+
))
|
|
680
|
+
],
|
|
681
|
+
512
|
|
682
|
+
/* NEED_PATCH */
|
|
683
|
+
));
|
|
684
|
+
}
|
|
685
|
+
}), Je = /* @__PURE__ */ te(Ge, [["__scopeId", "data-v-3abdb1e9"]]), Ze = /* @__PURE__ */ x({
|
|
686
|
+
__name: "das-main-app-layout",
|
|
687
|
+
props: {
|
|
688
|
+
transitionConfig: { default: () => {
|
|
689
|
+
} },
|
|
690
|
+
showLayout: { type: Boolean, default: !0 },
|
|
691
|
+
showAside: { type: Boolean, default: !0 },
|
|
692
|
+
showTabs: { type: Boolean, default: !0 },
|
|
693
|
+
menuAttr: { default: () => {
|
|
694
|
+
} },
|
|
695
|
+
tabsAttr: { default: () => {
|
|
696
|
+
} }
|
|
697
|
+
},
|
|
698
|
+
setup(e) {
|
|
699
|
+
const t = e, n = D(() => !k.value), r = D(() => ({
|
|
700
|
+
"enter-active-class": "animate__animated animate__fadeInLeft",
|
|
701
|
+
...t.transitionConfig
|
|
702
|
+
})), c = D(() => ({ showLayout: t.showLayout, showAside: t.showAside, showTabs: t.showTabs }));
|
|
703
|
+
return (a, i) => (E(), ee(I(he), ve({
|
|
704
|
+
"transition-config": r.value,
|
|
705
|
+
"router-view-visible": n.value
|
|
706
|
+
}, c.value), {
|
|
707
|
+
header: C(() => [
|
|
708
|
+
V(a.$slots, "header", {}, () => [
|
|
709
|
+
F(I(we))
|
|
710
|
+
])
|
|
711
|
+
]),
|
|
712
|
+
aside: C(() => [
|
|
713
|
+
V(a.$slots, "aside", {}, () => [
|
|
714
|
+
F(I(ge), { menuAttr: a.menuAttr }, null, 8, ["menuAttr"])
|
|
715
|
+
])
|
|
716
|
+
]),
|
|
717
|
+
tab: C(() => [
|
|
718
|
+
V(a.$slots, "tab", {}, () => [
|
|
719
|
+
F(I(ye), { tabsAttr: a.tabsAttr }, null, 8, ["tabsAttr"])
|
|
720
|
+
])
|
|
721
|
+
]),
|
|
722
|
+
default: C(() => [
|
|
723
|
+
F(Je)
|
|
724
|
+
]),
|
|
725
|
+
_: 3
|
|
726
|
+
/* FORWARDED */
|
|
727
|
+
}, 16, ["transition-config", "router-view-visible"]));
|
|
728
|
+
}
|
|
729
|
+
}), ae = /* @__PURE__ */ x({
|
|
730
|
+
__name: "das-micro-app-ghost",
|
|
731
|
+
setup(e) {
|
|
732
|
+
return Ae(() => {
|
|
733
|
+
setTimeout(() => {
|
|
734
|
+
document.documentElement.checkVisibility() && history.back();
|
|
735
|
+
}, 300);
|
|
736
|
+
}), (t, n) => null;
|
|
737
|
+
}
|
|
738
|
+
}), Ke = (e) => ["http://", "https://", "ws://", "wss://", "/"].find((n) => e.startsWith(n)) ? e : `/${e}`, et = (e, t) => {
|
|
729
739
|
if (!(e != null && e.microApps) || !Array.isArray(e.microApps)) return;
|
|
730
740
|
window.__IN_DAS_MAIN_APP = !0, e != null && e.microAppRouterPrefix && (z.value = e.microAppRouterPrefix), f.value = (e.microApps || []).filter((c) => !!c.name).map((c) => ({ ...c, entry: Ke(c.entry || c.name) })), t == null || t.addRoute({
|
|
731
741
|
name: "das-micro-app",
|
|
732
742
|
path: `${z.value}/:pathMatch(.*)*`,
|
|
733
|
-
component:
|
|
743
|
+
component: ae,
|
|
734
744
|
meta: { isMicroApp: !0, keepAlive: !0 }
|
|
735
745
|
}), d.addEventListenerFromMicroApp("bodyOverlay", (c) => {
|
|
736
746
|
const { visible: a, style: i } = c.data;
|
|
@@ -742,7 +752,7 @@ const Ke = (e) => ["http://", "https://", "ws://", "wss://", "/"].find((n) => e.
|
|
|
742
752
|
const { name: a, cmd: i, path: s } = c.data;
|
|
743
753
|
i === "reload" && d.reloadMicroAppRoute(a, s), i === "unload" && d.unloadMicroAppRoute(a, s);
|
|
744
754
|
});
|
|
745
|
-
const { enter: n, exit: r } =
|
|
755
|
+
const { enter: n, exit: r } = qe();
|
|
746
756
|
d.addEventListenerFromMicroApp("fullscreen", (c) => {
|
|
747
757
|
const a = c.data;
|
|
748
758
|
a && n(), a || r();
|
|
@@ -757,11 +767,11 @@ const Ke = (e) => ["http://", "https://", "ws://", "wss://", "/"].find((n) => e.
|
|
|
757
767
|
t == null || t.addRoute({
|
|
758
768
|
name: n,
|
|
759
769
|
path: `/${n}/:pathMatch(.*)*`,
|
|
760
|
-
component:
|
|
770
|
+
component: ae,
|
|
761
771
|
meta: { isMicroApp: !0, keepAlive: !0 }
|
|
762
772
|
});
|
|
763
773
|
const r = w(!1), c = w(!1), a = w("");
|
|
764
|
-
|
|
774
|
+
M(
|
|
765
775
|
() => t.currentRoute.value,
|
|
766
776
|
(i) => {
|
|
767
777
|
if (r.value) {
|
|
@@ -809,10 +819,10 @@ const Ke = (e) => ["http://", "https://", "ws://", "wss://", "/"].find((n) => e.
|
|
|
809
819
|
s === "setItem" && window.sessionStorage.setItem(o, p), s === "getItem" && window.sessionStorage.getItem(o), s === "removeItem" && window.sessionStorage.removeItem(o), s === "clear" && window.sessionStorage.clear();
|
|
810
820
|
}), d.addEventListenerFromMainApp("route", (i) => {
|
|
811
821
|
const { cmd: s, path: o } = i.data;
|
|
812
|
-
s === "reload" && (
|
|
813
|
-
|
|
814
|
-
}, 300)), s === "unload" && (
|
|
815
|
-
|
|
822
|
+
s === "reload" && (T.value.push(o), R.value = !1, setTimeout(() => {
|
|
823
|
+
R.value = !0, T.value = [];
|
|
824
|
+
}, 300)), s === "unload" && (T.value.push(o), R.value = !1, setTimeout(() => {
|
|
825
|
+
R.value = !0, T.value = [];
|
|
816
826
|
}, 100));
|
|
817
827
|
});
|
|
818
828
|
};
|