@das-fed/web 6.4.0-dev.11 → 6.4.0-dev.111
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 +4 -1
- package/index-DeKFYMKY.js +10 -0
- package/index-DgV7dEtR.js +82 -0
- package/index-DgV7dEtR.js.gz +0 -0
- package/index-g3DWTus2.js +13893 -0
- package/index-g3DWTus2.js.gz +0 -0
- package/index.js +24 -21
- package/package.json +8 -6
- package/packages/create-das-web-app/index.js +40 -40
- package/packages/create-das-web-app/index.js.gz +0 -0
- package/packages/i18n/index.js +172 -31
- package/packages/i18n/index.js.gz +0 -0
- package/packages/layout/index.js +479 -441
- 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-CGXiI8Px.js +82 -0
- package/packages/main-app-framework/index-CGXiI8Px.js.gz +0 -0
- package/packages/main-app-framework/index-CX-Rv9Hu.js +10 -0
- package/packages/main-app-framework/index-iFGtZyh-.js +12405 -0
- package/packages/main-app-framework/index-iFGtZyh-.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/index.js +286 -262
- package/packages/micro-frontend/index.js.gz +0 -0
- package/packages/micro-frontend/style.css +1 -1
- package/packages/style/style.css +1 -1
- package/packages/style/style.css.gz +0 -0
- package/packages/theme/index.js.gz +0 -0
- package/style.css +2 -2
- package/style.css.gz +0 -0
- package/types/create-das-web-app/index.d.ts +1 -1
- package/types/i18n/global.d.ts +583 -0
- package/types/i18n/index.d.ts +6 -4
- package/types/layout/index.d.ts +1 -1
- package/types/layout/store/index.d.ts +7 -2
- package/types/layout/store/menu.d.ts +2 -0
- package/types/layout/store/nav.d.ts +2 -1
- package/types/layout/store/tab.d.ts +1 -0
- package/types/main-app-framework/business/alarm/use-alarm.d.ts +4 -4
- package/types/main-app-framework/business/remote-control/apis.d.ts +2 -0
- package/types/main-app-framework/business/remote-control/utils.d.ts +7 -0
- package/types/main-app-framework/business/video-link/api.d.ts +2 -0
- package/types/main-app-framework/business/video-link/index.d.ts +3 -3
- package/types/main-app-framework/business/video-link/video-dialog/hooks/PlayerProvider.d.ts +3 -3
- package/types/main-app-framework/components/iframe-page/index.d.ts +3 -0
- package/types/main-app-framework/components/index.d.ts +1 -0
- package/types/main-app-framework/components/person-set-dialog/index.d.ts +1 -1
- package/types/main-app-framework/components/person-set-dialog/src/api.d.ts +4 -0
- package/types/main-app-framework/components/person-set-dialog/src/components/index.d.ts +3 -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 +538 -0
- package/types/main-app-framework/index.d.ts +2 -1
- package/types/main-app-framework/init-config/get-nav-config/api.d.ts +2 -0
- package/types/main-app-framework/init-config/get-nav-config/index.d.ts +4 -3
- 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 +4 -0
- package/types/main-app-framework/init-config/get-system-config/index.d.ts +6 -4
- package/types/main-app-framework/init-config/get-tenant-config/api.d.ts +1 -1
- package/types/main-app-framework/init-layout/hooks/nav-slots/use-change-enterprises.d.ts +3 -3
- package/types/main-app-framework/init-layout/hooks/nav-slots/use-user-command.d.ts +2 -2
- package/types/main-app-framework/init-layout/hooks/use-initialization.d.ts +5 -4
- package/types/main-app-framework/init-layout/hooks/use-tabs.d.ts +3 -3
- package/types/main-app-framework/init-platform/index.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/types/micro-frontend/store.d.ts +5 -5
- package/types/theme/index.d.ts +1 -1
- package/index-CdrOv9ce.js +0 -7064
- package/index-CdrOv9ce.js.gz +0 -0
- package/index-CzmiHoa4.js +0 -68
- package/index-CzmiHoa4.js.gz +0 -0
- package/index-D7VM--Bp.js +0 -10
- package/index-jFzyVhGM.js +0 -70
- package/index-jFzyVhGM.js.gz +0 -0
- package/packages/main-app-framework/index-Cq8Fro8z.js +0 -70
- package/packages/main-app-framework/index-Cq8Fro8z.js.gz +0 -0
- package/packages/main-app-framework/index-D38gLa5D.js +0 -10
- package/packages/main-app-framework/index-DyKCvROV.js +0 -68
- package/packages/main-app-framework/index-DyKCvROV.js.gz +0 -0
- package/packages/main-app-framework/index-_nvo7ltJ.js +0 -5765
- package/packages/main-app-framework/index-_nvo7ltJ.js.gz +0 -0
|
@@ -1,56 +1,66 @@
|
|
|
1
1
|
import '@das-fed/web/packages/micro-frontend/style.css';
|
|
2
|
-
import { ref as w, watch as
|
|
3
|
-
import { DasWebLayout as
|
|
4
|
-
const z = w("/das-micro-app"), f = w([]), k = w(!1),
|
|
5
|
-
let
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
2
|
+
import { ref as w, watch as M, reactive as P, getCurrentScope as ue, onScopeDispose as de, getCurrentInstance as pe, onMounted as me, nextTick as ne, unref as I, defineComponent as x, computed as N, createElementBlock as D, openBlock as E, Fragment as $, renderList as fe, withDirectives as ve, createCommentVNode as he, createBlock as se, vShow as Ae, mergeProps as we, withCtx as T, createVNode as C, renderSlot as V, onActivated as ge } from "vue";
|
|
3
|
+
import { DasWebLayout as ye, DasWebTabs as Me, DasWebMenu as Le, DasWebNav as _e } from "@das-fed/web/packages/layout/index";
|
|
4
|
+
const z = w("/das-micro-app"), f = w([]), k = w(!1), O = w([]), F = w(!0);
|
|
5
|
+
let v = null, h = null, _ = null;
|
|
6
|
+
const be = (e) => new Promise((t) => {
|
|
7
|
+
const n = () => {
|
|
8
|
+
if (v != null && v[e]) return t();
|
|
9
|
+
setTimeout(() => n(), 50);
|
|
10
|
+
};
|
|
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();
|
|
25
|
+
}), q = (e, t, n) => {
|
|
17
26
|
var a;
|
|
18
|
-
const {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
27
|
+
const { awaitListener: s = !1 } = n || {}, { origin: c } = new URL(location.href);
|
|
28
|
+
s ? Ie(e).then(() => {
|
|
29
|
+
var i;
|
|
30
|
+
(i = window.self) == null || i.postMessage({ type: e, data: t }, c);
|
|
31
|
+
}) : (a = window.self) == null || a.postMessage({ type: e, data: t }, c);
|
|
32
|
+
}, Ee = () => {
|
|
23
33
|
h || (h || (h = {}), window.addEventListener(
|
|
24
34
|
"message",
|
|
25
35
|
(e) => {
|
|
26
36
|
const { type: t, source: n } = e.data || {};
|
|
27
37
|
if (n !== "react-devtools-content-script" && h[t])
|
|
28
|
-
for (const
|
|
29
|
-
h[t][
|
|
38
|
+
for (const s in h[t])
|
|
39
|
+
h[t][s](e.data);
|
|
30
40
|
},
|
|
31
41
|
!1
|
|
32
42
|
));
|
|
33
|
-
},
|
|
34
|
-
|
|
43
|
+
}, Se = () => {
|
|
44
|
+
v || (v || (v = {}), window.addEventListener(
|
|
35
45
|
"message",
|
|
36
46
|
(e) => {
|
|
37
47
|
const { type: t } = e.data || {};
|
|
38
|
-
if (
|
|
39
|
-
for (const n in
|
|
40
|
-
|
|
48
|
+
if (v[t])
|
|
49
|
+
for (const n in v[t])
|
|
50
|
+
v[t][n](e.data);
|
|
41
51
|
},
|
|
42
52
|
!1
|
|
43
53
|
));
|
|
44
|
-
},
|
|
45
|
-
|
|
54
|
+
}, Pe = (e, t) => {
|
|
55
|
+
Se();
|
|
46
56
|
const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8);
|
|
47
|
-
return
|
|
57
|
+
return v[e] || (v[e] = {}), v[e][n] = t, {
|
|
48
58
|
remove: () => {
|
|
49
|
-
|
|
59
|
+
v[e] && v[e][n] && delete v[e][n];
|
|
50
60
|
}
|
|
51
61
|
};
|
|
52
|
-
},
|
|
53
|
-
|
|
62
|
+
}, Te = (e, t) => {
|
|
63
|
+
Ee();
|
|
54
64
|
const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8);
|
|
55
65
|
return h[e] || (h[e] = {}), h[e][n] = t, {
|
|
56
66
|
remove: () => {
|
|
@@ -60,7 +70,7 @@ const b = (e, t, n) => {
|
|
|
60
70
|
}, Q = async (e) => {
|
|
61
71
|
await Promise.all(
|
|
62
72
|
f.value.filter((t) => t.loaded).map((t) => new Promise(async (n) => {
|
|
63
|
-
t.dom || await new Promise((
|
|
73
|
+
t.dom || await new Promise((s) => M(() => t.dom, s)), setTimeout(() => {
|
|
64
74
|
b(t.name, "sessionStorage", e), n(!0);
|
|
65
75
|
}, 0);
|
|
66
76
|
}))
|
|
@@ -68,14 +78,14 @@ const b = (e, t, n) => {
|
|
|
68
78
|
}, d = {
|
|
69
79
|
loadMicroApp: (e) => {
|
|
70
80
|
k.value = !0;
|
|
71
|
-
const t = f.value.find((i) => i.name === e), n = f.value.find((i) => i.actived),
|
|
72
|
-
if (!
|
|
81
|
+
const t = f.value.find((i) => i.name === e), n = f.value.find((i) => i.actived), s = !!t, c = !(t != null && t.loaded), a = t == null ? void 0 : t.actived;
|
|
82
|
+
if (!s) {
|
|
73
83
|
n && (n.actived = !1);
|
|
74
84
|
return;
|
|
75
85
|
}
|
|
76
86
|
if (t.isFirstActived = !0, c) {
|
|
77
87
|
t.src = t.entry;
|
|
78
|
-
const i = f.value.find((
|
|
88
|
+
const i = f.value.find((r) => r.actived);
|
|
79
89
|
i && (i.actived = !1), t.loaded = !0, t.actived = !0;
|
|
80
90
|
return;
|
|
81
91
|
}
|
|
@@ -86,7 +96,7 @@ const b = (e, t, n) => {
|
|
|
86
96
|
},
|
|
87
97
|
hideMicroApp: async (e) => {
|
|
88
98
|
const t = f.value.find((n) => n.name === e);
|
|
89
|
-
t && t.loaded && (t.dom || await new Promise((n) =>
|
|
99
|
+
t && t.loaded && (t.dom || await new Promise((n) => M(() => t.dom, n)), b(e, "router", {
|
|
90
100
|
cmd: "push",
|
|
91
101
|
route: {
|
|
92
102
|
name: "das-micro-app-ghost",
|
|
@@ -109,8 +119,8 @@ const b = (e, t, n) => {
|
|
|
109
119
|
});
|
|
110
120
|
},
|
|
111
121
|
setMicroAppRoute: async (e, t, n) => {
|
|
112
|
-
const
|
|
113
|
-
if (!
|
|
122
|
+
const s = f.value.find((r) => r.name === t);
|
|
123
|
+
if (!s || !s.loaded || !s.actived || (s.dom || await new Promise((r) => M(() => s.dom, r)), !s.actived)) return s;
|
|
114
124
|
const c = n.path || n, a = n.query || {}, i = n.params || {};
|
|
115
125
|
return e.push({
|
|
116
126
|
path: `/${t}${c}`,
|
|
@@ -118,18 +128,18 @@ const b = (e, t, n) => {
|
|
|
118
128
|
// @ts-ignore
|
|
119
129
|
params: i
|
|
120
130
|
}), setTimeout(() => {
|
|
121
|
-
const { isFirstActived:
|
|
131
|
+
const { isFirstActived: r } = s;
|
|
122
132
|
b(t, "router", {
|
|
123
|
-
cmd:
|
|
133
|
+
cmd: r ? "replace" : "push",
|
|
124
134
|
route: n,
|
|
125
135
|
microAppName: t
|
|
126
|
-
}),
|
|
127
|
-
}, 0),
|
|
136
|
+
}), r && (s.isFirstActived = !1);
|
|
137
|
+
}, 0), s;
|
|
128
138
|
},
|
|
129
139
|
sendMessageToMicroApp: b,
|
|
130
140
|
sendMessageToMainApp: q,
|
|
131
|
-
addEventListenerFromMainApp:
|
|
132
|
-
addEventListenerFromMicroApp:
|
|
141
|
+
addEventListenerFromMainApp: Pe,
|
|
142
|
+
addEventListenerFromMicroApp: Te,
|
|
133
143
|
setMainAppOverlay: (e, t) => {
|
|
134
144
|
q("bodyOverlay", { visible: e, style: t });
|
|
135
145
|
},
|
|
@@ -148,39 +158,40 @@ const b = (e, t, n) => {
|
|
|
148
158
|
},
|
|
149
159
|
addMicroAppLifeCycleListener: (e, t) => {
|
|
150
160
|
const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8);
|
|
151
|
-
|
|
152
|
-
const
|
|
153
|
-
|
|
161
|
+
_ || (_ = {});
|
|
162
|
+
const s = () => {
|
|
163
|
+
_[n] && delete _[n];
|
|
154
164
|
};
|
|
155
|
-
return
|
|
165
|
+
return _[n] = {
|
|
156
166
|
type: e,
|
|
157
167
|
handler: async (c) => await t(c),
|
|
158
|
-
remove:
|
|
159
|
-
}, { remove:
|
|
168
|
+
remove: s
|
|
169
|
+
}, { remove: s };
|
|
160
170
|
},
|
|
161
171
|
triggerMicroAppLifeCycleListener: (e, t, n) => {
|
|
162
172
|
var a;
|
|
163
|
-
const
|
|
164
|
-
for (const i in
|
|
165
|
-
const
|
|
166
|
-
|
|
167
|
-
c &&
|
|
173
|
+
const s = _, { autoRemove: c = !1 } = n || {};
|
|
174
|
+
for (const i in s) {
|
|
175
|
+
const r = s[i];
|
|
176
|
+
r.type === e && ((a = r == null ? void 0 : r.handler) == null || a.call(r, t).then(() => {
|
|
177
|
+
c && r.remove();
|
|
168
178
|
}));
|
|
169
179
|
}
|
|
170
180
|
},
|
|
171
181
|
reloadMicroAppRoute: async (e, t) => {
|
|
172
|
-
const n = f.value.find((
|
|
173
|
-
n && (!n.loaded || !n.actived || (n.dom || await new Promise((
|
|
182
|
+
const n = f.value.find((s) => s.name === e);
|
|
183
|
+
n && (!n.loaded || !n.actived || (n.dom || await new Promise((s) => M(() => n.dom, s)), b(e, "route", { cmd: "reload", path: t })));
|
|
174
184
|
},
|
|
175
185
|
unloadMicroAppRoute: async (e, t) => {
|
|
176
|
-
const n = f.value.find((
|
|
177
|
-
n && (!n.loaded || !n.actived || (n.dom || await new Promise((
|
|
186
|
+
const n = f.value.find((s) => s.name === e);
|
|
187
|
+
n && (!n.loaded || !n.actived || (n.dom || await new Promise((s) => M(() => n.dom, s)), b(e, "route", { cmd: "unload", path: t })));
|
|
178
188
|
},
|
|
179
189
|
setMainAppLayoutVisible: (e) => {
|
|
180
190
|
q("layoutVisible", { visible: e });
|
|
181
191
|
}
|
|
182
|
-
}, u =
|
|
192
|
+
}, u = P({
|
|
183
193
|
visible: !1,
|
|
194
|
+
theme: "default",
|
|
184
195
|
logo: "",
|
|
185
196
|
items: [],
|
|
186
197
|
projects: [],
|
|
@@ -190,7 +201,7 @@ const b = (e, t, n) => {
|
|
|
190
201
|
// activeItem: '',
|
|
191
202
|
// activeProject: {},
|
|
192
203
|
eventListeners: {}
|
|
193
|
-
}),
|
|
204
|
+
}), W = {
|
|
194
205
|
show: () => {
|
|
195
206
|
u.visible = !0;
|
|
196
207
|
},
|
|
@@ -200,6 +211,9 @@ const b = (e, t, n) => {
|
|
|
200
211
|
setLogo: (e) => {
|
|
201
212
|
u.logo = e;
|
|
202
213
|
},
|
|
214
|
+
setTheme: (e) => {
|
|
215
|
+
u.theme = e;
|
|
216
|
+
},
|
|
203
217
|
setItems: (e) => {
|
|
204
218
|
u.visible || (u.visible = !0), u.items = e;
|
|
205
219
|
},
|
|
@@ -234,9 +248,9 @@ const b = (e, t, n) => {
|
|
|
234
248
|
},
|
|
235
249
|
triggerEventListener: (e, t, n) => {
|
|
236
250
|
var i;
|
|
237
|
-
const
|
|
238
|
-
for (const
|
|
239
|
-
const o = r
|
|
251
|
+
const s = u.eventListeners, { autoRemove: c = !1 } = n || {}, a = [];
|
|
252
|
+
for (const r in s) {
|
|
253
|
+
const o = s[r];
|
|
240
254
|
o.type === e && a.push(
|
|
241
255
|
(i = o == null ? void 0 : o.handler) == null ? void 0 : i.call(o, t).then(() => {
|
|
242
256
|
c && o.remove();
|
|
@@ -246,7 +260,7 @@ const b = (e, t, n) => {
|
|
|
246
260
|
return Promise.all(a).then(() => !0).catch(() => !1);
|
|
247
261
|
},
|
|
248
262
|
addEventListener: (e, t) => {
|
|
249
|
-
const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8),
|
|
263
|
+
const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8), s = () => {
|
|
250
264
|
u.eventListeners[n] && delete u.eventListeners[n];
|
|
251
265
|
};
|
|
252
266
|
return u.eventListeners[n] = {
|
|
@@ -258,30 +272,38 @@ const b = (e, t, n) => {
|
|
|
258
272
|
throw a;
|
|
259
273
|
}
|
|
260
274
|
},
|
|
261
|
-
remove:
|
|
275
|
+
remove: s
|
|
262
276
|
}, {
|
|
263
|
-
remove:
|
|
277
|
+
remove: s
|
|
264
278
|
};
|
|
265
279
|
}
|
|
266
|
-
},
|
|
280
|
+
}, g = P({
|
|
281
|
+
theme: "default",
|
|
267
282
|
items: [],
|
|
283
|
+
collapse: !1,
|
|
268
284
|
eventListeners: {}
|
|
269
|
-
}),
|
|
285
|
+
}), j = {
|
|
270
286
|
setItems: (e) => {
|
|
271
|
-
|
|
287
|
+
g.items = e;
|
|
288
|
+
},
|
|
289
|
+
getItems: () => g.items,
|
|
290
|
+
setTheme: (e) => {
|
|
291
|
+
g.theme = e;
|
|
272
292
|
},
|
|
273
|
-
getItems: () => _.items,
|
|
274
293
|
setActiveItem: (e) => {
|
|
275
|
-
|
|
294
|
+
g.activeItem = e;
|
|
295
|
+
},
|
|
296
|
+
setCollapse: (e) => {
|
|
297
|
+
g.collapse = e;
|
|
276
298
|
},
|
|
277
299
|
setPopupClassName: (e) => {
|
|
278
|
-
|
|
300
|
+
g.popupClassName = e;
|
|
279
301
|
},
|
|
280
302
|
triggerEventListener: (e, t, n) => {
|
|
281
303
|
var i;
|
|
282
|
-
const
|
|
283
|
-
for (const
|
|
284
|
-
const o = r
|
|
304
|
+
const s = g.eventListeners, { autoRemove: c = !1 } = n || {}, a = [];
|
|
305
|
+
for (const r in s) {
|
|
306
|
+
const o = s[r];
|
|
285
307
|
o.type === e && a.push(
|
|
286
308
|
(i = o == null ? void 0 : o.handler) == null ? void 0 : i.call(o, t).then(() => {
|
|
287
309
|
c && o.remove();
|
|
@@ -291,10 +313,10 @@ const b = (e, t, n) => {
|
|
|
291
313
|
return Promise.all(a).then(() => !0).catch(() => !1);
|
|
292
314
|
},
|
|
293
315
|
addEventListener: (e, t) => {
|
|
294
|
-
const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8),
|
|
295
|
-
|
|
316
|
+
const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8), s = () => {
|
|
317
|
+
g.eventListeners[n] && delete g.eventListeners[n];
|
|
296
318
|
};
|
|
297
|
-
return
|
|
319
|
+
return g.eventListeners[n] = {
|
|
298
320
|
type: e,
|
|
299
321
|
handler: async (c) => {
|
|
300
322
|
try {
|
|
@@ -303,35 +325,39 @@ const b = (e, t, n) => {
|
|
|
303
325
|
throw a;
|
|
304
326
|
}
|
|
305
327
|
},
|
|
306
|
-
remove:
|
|
328
|
+
remove: s
|
|
307
329
|
}, {
|
|
308
|
-
remove:
|
|
330
|
+
remove: s
|
|
309
331
|
};
|
|
310
332
|
}
|
|
311
|
-
},
|
|
333
|
+
}, A = P({
|
|
334
|
+
theme: "default",
|
|
312
335
|
items: [],
|
|
313
336
|
eventListeners: {}
|
|
314
|
-
}),
|
|
337
|
+
}), H = {
|
|
315
338
|
setItems: (e) => {
|
|
316
|
-
|
|
339
|
+
A.items = e;
|
|
340
|
+
},
|
|
341
|
+
getItems: () => A.items,
|
|
342
|
+
setTheme: (e) => {
|
|
343
|
+
A.theme = e;
|
|
317
344
|
},
|
|
318
|
-
getItems: () => v.items,
|
|
319
345
|
removeItem: (e) => {
|
|
320
|
-
const t =
|
|
321
|
-
|
|
346
|
+
const t = A.items.filter((n) => n.value !== e);
|
|
347
|
+
A.items = t;
|
|
322
348
|
},
|
|
323
349
|
appendItem: (e) => {
|
|
324
|
-
const t =
|
|
325
|
-
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);
|
|
326
352
|
},
|
|
327
353
|
setActiveItem: (e) => {
|
|
328
|
-
|
|
354
|
+
A.activeItem = e;
|
|
329
355
|
},
|
|
330
356
|
triggerEventListener: (e, t, n) => {
|
|
331
357
|
var i;
|
|
332
|
-
const
|
|
333
|
-
for (const
|
|
334
|
-
const o = r
|
|
358
|
+
const s = A.eventListeners, { autoRemove: c = !1 } = n || {}, a = [];
|
|
359
|
+
for (const r in s) {
|
|
360
|
+
const o = s[r];
|
|
335
361
|
o.type === e && a.push(
|
|
336
362
|
(i = o == null ? void 0 : o.handler) == null ? void 0 : i.call(o, t).then(() => {
|
|
337
363
|
c && o.remove();
|
|
@@ -341,10 +367,10 @@ const b = (e, t, n) => {
|
|
|
341
367
|
return Promise.all(a).then(() => !0).catch(() => !1);
|
|
342
368
|
},
|
|
343
369
|
addEventListener: (e, t) => {
|
|
344
|
-
const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8),
|
|
345
|
-
|
|
370
|
+
const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8), s = () => {
|
|
371
|
+
A.eventListeners[n] && delete A.eventListeners[n];
|
|
346
372
|
};
|
|
347
|
-
return
|
|
373
|
+
return A.eventListeners[n] = {
|
|
348
374
|
type: e,
|
|
349
375
|
handler: async (c) => {
|
|
350
376
|
try {
|
|
@@ -353,19 +379,19 @@ const b = (e, t, n) => {
|
|
|
353
379
|
throw a;
|
|
354
380
|
}
|
|
355
381
|
},
|
|
356
|
-
remove:
|
|
382
|
+
remove: s
|
|
357
383
|
}, {
|
|
358
|
-
remove:
|
|
384
|
+
remove: s
|
|
359
385
|
};
|
|
360
386
|
}
|
|
361
|
-
},
|
|
387
|
+
}, R = P({
|
|
362
388
|
eventListeners: {}
|
|
363
|
-
}),
|
|
389
|
+
}), Ce = {
|
|
364
390
|
triggerEventListener: (e, t, n) => {
|
|
365
391
|
var i;
|
|
366
|
-
const
|
|
367
|
-
for (const
|
|
368
|
-
const o = r
|
|
392
|
+
const s = R.eventListeners, { autoRemove: c = !1 } = n || {}, a = [];
|
|
393
|
+
for (const r in s) {
|
|
394
|
+
const o = s[r];
|
|
369
395
|
o.type === e && a.push(
|
|
370
396
|
(i = o == null ? void 0 : o.handler) == null ? void 0 : i.call(o, t).then(() => {
|
|
371
397
|
c && o.remove();
|
|
@@ -375,10 +401,10 @@ const b = (e, t, n) => {
|
|
|
375
401
|
return Promise.all(a).then(() => !0).catch(() => !1);
|
|
376
402
|
},
|
|
377
403
|
addEventListener: (e, t) => {
|
|
378
|
-
const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8),
|
|
379
|
-
|
|
404
|
+
const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8), s = () => {
|
|
405
|
+
R.eventListeners[n] && delete R.eventListeners[n];
|
|
380
406
|
};
|
|
381
|
-
return
|
|
407
|
+
return R.eventListeners[n] = {
|
|
382
408
|
type: e,
|
|
383
409
|
handler: async (c) => {
|
|
384
410
|
try {
|
|
@@ -387,81 +413,79 @@ const b = (e, t, n) => {
|
|
|
387
413
|
throw a;
|
|
388
414
|
}
|
|
389
415
|
},
|
|
390
|
-
remove:
|
|
416
|
+
remove: s
|
|
391
417
|
}, {
|
|
392
|
-
remove:
|
|
418
|
+
remove: s
|
|
393
419
|
};
|
|
394
420
|
}
|
|
395
|
-
},
|
|
421
|
+
}, U = P({
|
|
396
422
|
visible: !1,
|
|
397
423
|
style: {}
|
|
398
424
|
}), Oe = {
|
|
399
425
|
set: (e, t) => {
|
|
400
|
-
|
|
426
|
+
U.visible = e, t || (t = {}), t.transition || (t.transition = "all 0.3s"), t && (U.style = t);
|
|
401
427
|
}
|
|
402
|
-
},
|
|
403
|
-
nav: u,
|
|
404
|
-
menu: _,
|
|
405
|
-
tab: v,
|
|
406
|
-
overlay: W,
|
|
407
|
-
iframeView: P,
|
|
428
|
+
}, Fe = {
|
|
408
429
|
visible: w(!0)
|
|
409
|
-
},
|
|
410
|
-
nav:
|
|
411
|
-
menu:
|
|
412
|
-
tab:
|
|
430
|
+
}, G = {
|
|
431
|
+
nav: W,
|
|
432
|
+
menu: j,
|
|
433
|
+
tab: H,
|
|
413
434
|
overlay: Oe,
|
|
414
|
-
iframeView:
|
|
415
|
-
setVisible: (e) =>
|
|
416
|
-
|
|
435
|
+
iframeView: Ce,
|
|
436
|
+
setVisible: (e) => Fe.visible.value = e,
|
|
437
|
+
setTheme: (e) => {
|
|
438
|
+
W.setTheme(e), j.setTheme(e), H.setTheme(e);
|
|
439
|
+
}
|
|
440
|
+
}, re = (e, t) => {
|
|
417
441
|
const n = e.__vccOpts || e;
|
|
418
|
-
for (const [
|
|
419
|
-
n[
|
|
442
|
+
for (const [s, c] of t)
|
|
443
|
+
n[s] = c;
|
|
420
444
|
return n;
|
|
421
445
|
};
|
|
422
|
-
var
|
|
423
|
-
const B = typeof window < "u",
|
|
446
|
+
var J;
|
|
447
|
+
const B = typeof window < "u", Re = (e) => typeof e == "string", Ne = () => {
|
|
424
448
|
};
|
|
425
|
-
B && ((
|
|
426
|
-
function
|
|
449
|
+
B && ((J = window == null ? void 0 : window.navigator) != null && J.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
|
|
450
|
+
function ae(e) {
|
|
427
451
|
return typeof e == "function" ? e() : I(e);
|
|
428
452
|
}
|
|
429
453
|
function De(e) {
|
|
430
454
|
return e;
|
|
431
455
|
}
|
|
432
|
-
function
|
|
433
|
-
return
|
|
456
|
+
function ie(e) {
|
|
457
|
+
return ue() ? (de(e), !0) : !1;
|
|
434
458
|
}
|
|
435
|
-
function
|
|
436
|
-
|
|
459
|
+
function ke(e, t = !0) {
|
|
460
|
+
pe() ? me(e) : t ? e() : ne(e);
|
|
437
461
|
}
|
|
438
|
-
function
|
|
462
|
+
function oe(e) {
|
|
439
463
|
var t;
|
|
440
|
-
const n =
|
|
464
|
+
const n = ae(e);
|
|
441
465
|
return (t = n == null ? void 0 : n.$el) != null ? t : n;
|
|
442
466
|
}
|
|
443
|
-
const
|
|
444
|
-
function
|
|
445
|
-
let t, n,
|
|
446
|
-
if (
|
|
447
|
-
return
|
|
448
|
-
Array.isArray(n) || (n = [n]), Array.isArray(
|
|
467
|
+
const xe = B ? window : void 0, Ve = B ? window.document : void 0;
|
|
468
|
+
function qe(...e) {
|
|
469
|
+
let t, n, s, c;
|
|
470
|
+
if (Re(e[0]) || Array.isArray(e[0]) ? ([n, s, c] = e, t = xe) : [t, n, s, c] = e, !t)
|
|
471
|
+
return Ne;
|
|
472
|
+
Array.isArray(n) || (n = [n]), Array.isArray(s) || (s = [s]);
|
|
449
473
|
const a = [], i = () => {
|
|
450
474
|
a.forEach((l) => l()), a.length = 0;
|
|
451
|
-
},
|
|
452
|
-
i(), l && a.push(...n.flatMap((m) =>
|
|
475
|
+
}, r = (l, y, m, L) => (l.addEventListener(y, m, L), () => l.removeEventListener(y, m, L)), o = M(() => [oe(t), ae(c)], ([l, y]) => {
|
|
476
|
+
i(), l && a.push(...n.flatMap((m) => s.map((L) => r(l, m, L, y))));
|
|
453
477
|
}, { immediate: !0, flush: "post" }), p = () => {
|
|
454
478
|
o(), i();
|
|
455
479
|
};
|
|
456
|
-
return
|
|
480
|
+
return ie(p), p;
|
|
457
481
|
}
|
|
458
|
-
function
|
|
459
|
-
const n = w(),
|
|
460
|
-
return
|
|
482
|
+
function Qe(e, t = !1) {
|
|
483
|
+
const n = w(), s = () => n.value = !!e();
|
|
484
|
+
return s(), ke(s, t), n;
|
|
461
485
|
}
|
|
462
|
-
const
|
|
463
|
-
|
|
464
|
-
const
|
|
486
|
+
const K = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, X = "__vueuse_ssr_handlers__";
|
|
487
|
+
K[X] = K[X] || {};
|
|
488
|
+
const Y = [
|
|
465
489
|
[
|
|
466
490
|
"requestFullscreen",
|
|
467
491
|
"exitFullscreen",
|
|
@@ -503,54 +527,54 @@ const J = [
|
|
|
503
527
|
"MSFullscreenError"
|
|
504
528
|
]
|
|
505
529
|
];
|
|
506
|
-
function
|
|
507
|
-
const { document: n =
|
|
508
|
-
let i =
|
|
509
|
-
const
|
|
530
|
+
function Be(e, t = {}) {
|
|
531
|
+
const { document: n = Ve, autoExit: s = !1 } = t, c = n == null ? void 0 : n.querySelector("html"), a = w(!1);
|
|
532
|
+
let i = Y[0];
|
|
533
|
+
const r = Qe(() => {
|
|
510
534
|
if (n) {
|
|
511
|
-
for (const S of
|
|
535
|
+
for (const S of Y)
|
|
512
536
|
if (S[1] in n)
|
|
513
537
|
return i = S, !0;
|
|
514
538
|
} else
|
|
515
539
|
return !1;
|
|
516
540
|
return !1;
|
|
517
|
-
}), [o, p, l, ,
|
|
541
|
+
}), [o, p, l, , y] = i;
|
|
518
542
|
async function m() {
|
|
519
|
-
|
|
543
|
+
r.value && (n != null && n[l] && await n[p](), a.value = !1);
|
|
520
544
|
}
|
|
521
|
-
async function
|
|
522
|
-
if (!
|
|
545
|
+
async function L() {
|
|
546
|
+
if (!r.value)
|
|
523
547
|
return;
|
|
524
548
|
await m();
|
|
525
|
-
const S =
|
|
549
|
+
const S = oe(c);
|
|
526
550
|
S && (await S[o](), a.value = !0);
|
|
527
551
|
}
|
|
528
|
-
async function
|
|
529
|
-
a.value ? await m() : await
|
|
552
|
+
async function le() {
|
|
553
|
+
a.value ? await m() : await L();
|
|
530
554
|
}
|
|
531
|
-
return n &&
|
|
555
|
+
return n && qe(n, y, () => {
|
|
532
556
|
a.value = !!(n != null && n[l]);
|
|
533
|
-
}, !1),
|
|
534
|
-
isSupported:
|
|
557
|
+
}, !1), s && ie(m), {
|
|
558
|
+
isSupported: r,
|
|
535
559
|
isFullscreen: a,
|
|
536
|
-
enter:
|
|
560
|
+
enter: L,
|
|
537
561
|
exit: m,
|
|
538
|
-
toggle:
|
|
562
|
+
toggle: le
|
|
539
563
|
};
|
|
540
564
|
}
|
|
541
|
-
var
|
|
565
|
+
var Z;
|
|
542
566
|
(function(e) {
|
|
543
567
|
e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE";
|
|
544
|
-
})(
|
|
545
|
-
var
|
|
568
|
+
})(Z || (Z = {}));
|
|
569
|
+
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) => {
|
|
546
570
|
for (var n in t || (t = {}))
|
|
547
|
-
|
|
548
|
-
if (
|
|
549
|
-
for (var n of
|
|
550
|
-
|
|
571
|
+
ze.call(t, n) && te(e, n, t[n]);
|
|
572
|
+
if (ee)
|
|
573
|
+
for (var n of ee(t))
|
|
574
|
+
We.call(t, n) && te(e, n, t[n]);
|
|
551
575
|
return e;
|
|
552
576
|
};
|
|
553
|
-
const
|
|
577
|
+
const He = {
|
|
554
578
|
easeInSine: [0.12, 0, 0.39, 0],
|
|
555
579
|
easeOutSine: [0.61, 1, 0.88, 1],
|
|
556
580
|
easeInOutSine: [0.37, 0, 0.63, 1],
|
|
@@ -576,10 +600,10 @@ const ze = {
|
|
|
576
600
|
easeOutBack: [0.34, 1.56, 0.64, 1],
|
|
577
601
|
easeInOutBack: [0.68, -0.6, 0.32, 1.6]
|
|
578
602
|
};
|
|
579
|
-
|
|
603
|
+
je({
|
|
580
604
|
linear: De
|
|
581
|
-
},
|
|
582
|
-
const
|
|
605
|
+
}, He);
|
|
606
|
+
const Ue = ["src", "entry", "name"], Ge = /* @__PURE__ */ x({
|
|
583
607
|
__name: "das-micro-app",
|
|
584
608
|
props: {
|
|
585
609
|
src: {},
|
|
@@ -588,27 +612,27 @@ const je = ["src", "entry", "name"], He = /* @__PURE__ */ x({
|
|
|
588
612
|
},
|
|
589
613
|
emits: ["onLoaded", "onActivated", "onDeactivated"],
|
|
590
614
|
setup(e, { emit: t }) {
|
|
591
|
-
const n = e,
|
|
592
|
-
|
|
593
|
-
}, a =
|
|
594
|
-
return
|
|
595
|
-
|
|
596
|
-
}), (
|
|
615
|
+
const n = e, s = t, c = (r) => {
|
|
616
|
+
s("onLoaded", r);
|
|
617
|
+
}, a = N(() => n.actived);
|
|
618
|
+
return M(() => a.value, (r) => {
|
|
619
|
+
r && s("onActivated"), r || s("onDeactivated");
|
|
620
|
+
}), (r, o) => (E(), D("iframe", {
|
|
597
621
|
class: "das-micro-app",
|
|
598
622
|
src: n.src,
|
|
599
623
|
entry: n.src,
|
|
600
624
|
name: n.name,
|
|
601
625
|
frameborder: "0",
|
|
602
626
|
onLoad: c
|
|
603
|
-
}, null, 40,
|
|
627
|
+
}, null, 40, Ue));
|
|
604
628
|
}
|
|
605
|
-
}),
|
|
629
|
+
}), Je = /* @__PURE__ */ re(Ge, [["__scopeId", "data-v-8ae871f6"]]), Ke = /* @__PURE__ */ x({
|
|
606
630
|
__name: "das-micro-apps",
|
|
607
631
|
setup(e) {
|
|
608
632
|
const t = w(null), n = async (a, i) => {
|
|
609
|
-
const
|
|
610
|
-
if (!
|
|
611
|
-
|
|
633
|
+
const r = f.value.find((m) => m.name === i);
|
|
634
|
+
if (!r) return;
|
|
635
|
+
r.dom = a.target, await ne(), await new Promise((m) => setTimeout(m, 50));
|
|
612
636
|
const o = () => {
|
|
613
637
|
const m = t.value.getBoundingClientRect() || {};
|
|
614
638
|
return m.width = t.value.clientWidth, m.height = t.value.clientHeight, m;
|
|
@@ -616,25 +640,25 @@ const je = ["src", "entry", "name"], He = /* @__PURE__ */ x({
|
|
|
616
640
|
d.sendMessageToMicroApp(i, "onLoaded", {
|
|
617
641
|
href: location.href,
|
|
618
642
|
microAppContainerRect: o(),
|
|
619
|
-
entry:
|
|
620
|
-
name:
|
|
643
|
+
entry: r.entry,
|
|
644
|
+
name: r.name
|
|
621
645
|
});
|
|
622
|
-
const { dom: p, ...l } =
|
|
646
|
+
const { dom: p, ...l } = r;
|
|
623
647
|
d.triggerMicroAppLifeCycleListener("onLoaded", l), new ResizeObserver(() => {
|
|
624
648
|
d.sendMessageToMicroApp(i, "resize", o());
|
|
625
649
|
}).observe(t.value), d.sendMessageToMicroApp(i, "setProxyMessageStatus", { visible: !0, parentHref: location.href }), d.sendMessageToMicroApp(i, "setProxSsoStatus", { visible: !0, parentHref: location.href });
|
|
626
|
-
},
|
|
627
|
-
const
|
|
628
|
-
if (!
|
|
629
|
-
const { dom: o, ...p } =
|
|
650
|
+
}, s = (a, i) => {
|
|
651
|
+
const r = f.value.find((l) => l.name === i);
|
|
652
|
+
if (!r) return;
|
|
653
|
+
const { dom: o, ...p } = r;
|
|
630
654
|
d.sendMessageToMicroApp(i, "onActivated"), d.triggerMicroAppLifeCycleListener("onActivated", p);
|
|
631
655
|
}, c = (a, i) => {
|
|
632
|
-
const
|
|
633
|
-
if (!
|
|
634
|
-
const { dom: o, ...p } =
|
|
656
|
+
const r = f.value.find((l) => l.name === i);
|
|
657
|
+
if (!r) return;
|
|
658
|
+
const { dom: o, ...p } = r;
|
|
635
659
|
d.sendMessageToMicroApp(i, "onDeactivated"), d.triggerMicroAppLifeCycleListener("onDeactivated", p);
|
|
636
660
|
};
|
|
637
|
-
return (a, i) => (E(),
|
|
661
|
+
return (a, i) => (E(), D(
|
|
638
662
|
"div",
|
|
639
663
|
{
|
|
640
664
|
ref_key: "containerRef",
|
|
@@ -642,24 +666,24 @@ const je = ["src", "entry", "name"], He = /* @__PURE__ */ x({
|
|
|
642
666
|
class: "das-micro-app-container"
|
|
643
667
|
},
|
|
644
668
|
[
|
|
645
|
-
(E(!0),
|
|
669
|
+
(E(!0), D(
|
|
646
670
|
$,
|
|
647
671
|
null,
|
|
648
|
-
|
|
672
|
+
fe(I(f), (r) => (E(), D(
|
|
649
673
|
$,
|
|
650
674
|
null,
|
|
651
675
|
[
|
|
652
|
-
|
|
676
|
+
r.loaded ? ve((E(), se(Je, {
|
|
653
677
|
key: 0,
|
|
654
|
-
src:
|
|
655
|
-
name:
|
|
656
|
-
actived:
|
|
657
|
-
onOnLoaded: (o) => n(o,
|
|
658
|
-
onOnActivated: (o) =>
|
|
659
|
-
onOnDeactivated: (o) => c(o,
|
|
678
|
+
src: r.src || "",
|
|
679
|
+
name: r.name,
|
|
680
|
+
actived: r.actived,
|
|
681
|
+
onOnLoaded: (o) => n(o, r.name),
|
|
682
|
+
onOnActivated: (o) => s(o, r.name),
|
|
683
|
+
onOnDeactivated: (o) => c(o, r.name)
|
|
660
684
|
}, null, 8, ["src", "name", "actived", "onOnLoaded", "onOnActivated", "onOnDeactivated"])), [
|
|
661
|
-
[
|
|
662
|
-
]) :
|
|
685
|
+
[Ae, r.actived]
|
|
686
|
+
]) : he("v-if", !0)
|
|
663
687
|
],
|
|
664
688
|
64
|
|
665
689
|
/* STABLE_FRAGMENT */
|
|
@@ -672,7 +696,7 @@ const je = ["src", "entry", "name"], He = /* @__PURE__ */ x({
|
|
|
672
696
|
/* NEED_PATCH */
|
|
673
697
|
));
|
|
674
698
|
}
|
|
675
|
-
}),
|
|
699
|
+
}), Xe = /* @__PURE__ */ re(Ke, [["__scopeId", "data-v-3abdb1e9"]]), tt = /* @__PURE__ */ x({
|
|
676
700
|
__name: "das-main-app-layout",
|
|
677
701
|
props: {
|
|
678
702
|
transitionConfig: { default: () => {
|
|
@@ -686,93 +710,93 @@ const je = ["src", "entry", "name"], He = /* @__PURE__ */ x({
|
|
|
686
710
|
} }
|
|
687
711
|
},
|
|
688
712
|
setup(e) {
|
|
689
|
-
const t = e, n =
|
|
713
|
+
const t = e, n = N(() => !k.value), s = N(() => ({
|
|
690
714
|
"enter-active-class": "animate__animated animate__fadeInLeft",
|
|
691
715
|
...t.transitionConfig
|
|
692
|
-
})), c =
|
|
693
|
-
return (a, i) => (E(),
|
|
694
|
-
"transition-config":
|
|
716
|
+
})), c = N(() => ({ showLayout: t.showLayout, showAside: t.showAside, showTabs: t.showTabs }));
|
|
717
|
+
return (a, i) => (E(), se(I(ye), we({
|
|
718
|
+
"transition-config": s.value,
|
|
695
719
|
"router-view-visible": n.value
|
|
696
720
|
}, c.value), {
|
|
697
|
-
header:
|
|
721
|
+
header: T(() => [
|
|
698
722
|
V(a.$slots, "header", {}, () => [
|
|
699
|
-
|
|
723
|
+
C(I(_e))
|
|
700
724
|
])
|
|
701
725
|
]),
|
|
702
|
-
aside:
|
|
726
|
+
aside: T(() => [
|
|
703
727
|
V(a.$slots, "aside", {}, () => [
|
|
704
|
-
|
|
728
|
+
C(I(Le), { menuAttr: a.menuAttr }, null, 8, ["menuAttr"])
|
|
705
729
|
])
|
|
706
730
|
]),
|
|
707
|
-
tab:
|
|
731
|
+
tab: T(() => [
|
|
708
732
|
V(a.$slots, "tab", {}, () => [
|
|
709
|
-
|
|
733
|
+
C(I(Me), { tabsAttr: a.tabsAttr }, null, 8, ["tabsAttr"])
|
|
710
734
|
])
|
|
711
735
|
]),
|
|
712
|
-
default:
|
|
713
|
-
|
|
736
|
+
default: T(() => [
|
|
737
|
+
C(Xe)
|
|
714
738
|
]),
|
|
715
739
|
_: 3
|
|
716
740
|
/* FORWARDED */
|
|
717
741
|
}, 16, ["transition-config", "router-view-visible"]));
|
|
718
742
|
}
|
|
719
|
-
}),
|
|
743
|
+
}), ce = /* @__PURE__ */ x({
|
|
720
744
|
__name: "das-micro-app-ghost",
|
|
721
745
|
setup(e) {
|
|
722
|
-
return
|
|
746
|
+
return ge(() => {
|
|
723
747
|
setTimeout(() => {
|
|
724
748
|
document.documentElement.checkVisibility() && history.back();
|
|
725
749
|
}, 300);
|
|
726
750
|
}), (t, n) => null;
|
|
727
751
|
}
|
|
728
|
-
}),
|
|
752
|
+
}), Ye = (e) => ["http://", "https://", "ws://", "wss://", "/"].find((n) => e.startsWith(n)) ? e : `/${e}`, nt = (e, t) => {
|
|
729
753
|
if (!(e != null && e.microApps) || !Array.isArray(e.microApps)) return;
|
|
730
|
-
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:
|
|
754
|
+
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: Ye(c.entry || c.name) })), t == null || t.addRoute({
|
|
731
755
|
name: "das-micro-app",
|
|
732
756
|
path: `${z.value}/:pathMatch(.*)*`,
|
|
733
|
-
component:
|
|
757
|
+
component: ce,
|
|
734
758
|
meta: { isMicroApp: !0, keepAlive: !0 }
|
|
735
759
|
}), d.addEventListenerFromMicroApp("bodyOverlay", (c) => {
|
|
736
760
|
const { visible: a, style: i } = c.data;
|
|
737
|
-
|
|
761
|
+
G.overlay.set(a, i);
|
|
738
762
|
}), d.addEventListenerFromMicroApp("layoutVisible", (c) => {
|
|
739
763
|
const { visible: a } = c.data;
|
|
740
|
-
|
|
764
|
+
G.setVisible(a);
|
|
741
765
|
}), d.addEventListenerFromMicroApp("route", (c) => {
|
|
742
|
-
const { name: a, cmd: i, path:
|
|
743
|
-
i === "reload" && d.reloadMicroAppRoute(a,
|
|
766
|
+
const { name: a, cmd: i, path: r } = c.data;
|
|
767
|
+
i === "reload" && d.reloadMicroAppRoute(a, r), i === "unload" && d.unloadMicroAppRoute(a, r);
|
|
744
768
|
});
|
|
745
|
-
const { enter: n, exit:
|
|
769
|
+
const { enter: n, exit: s } = Be();
|
|
746
770
|
d.addEventListenerFromMicroApp("fullscreen", (c) => {
|
|
747
771
|
const a = c.data;
|
|
748
|
-
a && n(), a ||
|
|
772
|
+
a && n(), a || s();
|
|
749
773
|
}), d.addEventListenerFromMicroApp("location", (c) => {
|
|
750
774
|
const { cmd: a, isAutoCloseApp: i } = c.data || {};
|
|
751
775
|
a === "reload" && (i !== void 0 && (window.__isAutoCloseApp = i), location.reload());
|
|
752
776
|
});
|
|
753
|
-
},
|
|
777
|
+
}, st = (e, t) => {
|
|
754
778
|
if (!(e != null && e.microAppName)) return;
|
|
755
779
|
window.config.microAppName = e.microAppName, window.self !== window.top && e.microAppName && (window.__IN_DAS_MICRO_APP = !0);
|
|
756
780
|
const n = "das-micro-app-ghost";
|
|
757
781
|
t == null || t.addRoute({
|
|
758
782
|
name: n,
|
|
759
783
|
path: `/${n}/:pathMatch(.*)*`,
|
|
760
|
-
component:
|
|
784
|
+
component: ce,
|
|
761
785
|
meta: { isMicroApp: !0, keepAlive: !0 }
|
|
762
786
|
});
|
|
763
|
-
const
|
|
764
|
-
|
|
787
|
+
const s = w(!1), c = w(!1), a = w("");
|
|
788
|
+
M(
|
|
765
789
|
() => t.currentRoute.value,
|
|
766
790
|
(i) => {
|
|
767
|
-
if (
|
|
768
|
-
|
|
791
|
+
if (s.value) {
|
|
792
|
+
s.value = !1;
|
|
769
793
|
return;
|
|
770
794
|
}
|
|
771
795
|
if (c.value) {
|
|
772
796
|
c.value = !1;
|
|
773
797
|
return;
|
|
774
798
|
}
|
|
775
|
-
const { path:
|
|
799
|
+
const { path: r, query: o, params: p, meta: l } = i;
|
|
776
800
|
if (a.value.includes(i.path)) {
|
|
777
801
|
a.value = "";
|
|
778
802
|
return;
|
|
@@ -780,7 +804,7 @@ const je = ["src", "entry", "name"], He = /* @__PURE__ */ x({
|
|
|
780
804
|
d.sendMessageToMainApp("router", {
|
|
781
805
|
cmd: "push",
|
|
782
806
|
route: {
|
|
783
|
-
path:
|
|
807
|
+
path: r,
|
|
784
808
|
query: { ...o, microAppName: e.microAppName },
|
|
785
809
|
params: p,
|
|
786
810
|
meta: l
|
|
@@ -789,36 +813,36 @@ const je = ["src", "entry", "name"], He = /* @__PURE__ */ x({
|
|
|
789
813
|
}
|
|
790
814
|
), d.addEventListenerFromMainApp("router", async (i) => {
|
|
791
815
|
var l;
|
|
792
|
-
const { cmd:
|
|
793
|
-
a.value = ("/" + p + o.path).replace(/\/\//g, "/"), (l = t == null ? void 0 : t[
|
|
816
|
+
const { cmd: r, route: o, microAppName: p = "" } = i.data;
|
|
817
|
+
a.value = ("/" + p + o.path).replace(/\/\//g, "/"), (l = t == null ? void 0 : t[r]) == null || l.call(t, o);
|
|
794
818
|
}), d.addEventListenerFromMainApp("onLoaded", (i) => {
|
|
795
|
-
const { href:
|
|
796
|
-
window.__IN_DAS_MICRO_APP = !0, window.__DAS_MICRO_APP_NAME = e.microAppName, window.__DAS_MAIN_APP_HREF =
|
|
819
|
+
const { href: r, microAppContainerRect: o } = i.data;
|
|
820
|
+
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 = o;
|
|
797
821
|
}), d.addEventListenerFromMainApp("onDeactivated", (i) => {
|
|
798
|
-
const { name:
|
|
822
|
+
const { name: r = "", path: o, params: p = {}, query: l = {} } = t.currentRoute.value;
|
|
799
823
|
c.value = !0, t == null || t.push({
|
|
800
824
|
name: n,
|
|
801
825
|
query: { microAppName: e.microAppName, fromQuery: JSON.stringify(l), fromPath: o },
|
|
802
826
|
params: p
|
|
803
827
|
});
|
|
804
828
|
}), d.addEventListenerFromMainApp("onActivated", (i) => {
|
|
805
|
-
const { name:
|
|
806
|
-
|
|
829
|
+
const { name: r = "", params: o = {}, query: p = {} } = t.currentRoute.value, { fromPath: l = "", fromQuery: y = "{}" } = p || {};
|
|
830
|
+
s.value = !0, t == null || t.push({ path: l, query: JSON.parse(y), params: o });
|
|
807
831
|
}), d.addEventListenerFromMainApp("sessionStorage", (i) => {
|
|
808
|
-
const { cmd:
|
|
809
|
-
|
|
832
|
+
const { cmd: r, key: o, value: p } = i.data;
|
|
833
|
+
r === "setItem" && window.sessionStorage.setItem(o, p), r === "getItem" && window.sessionStorage.getItem(o), r === "removeItem" && window.sessionStorage.removeItem(o), r === "clear" && window.sessionStorage.clear();
|
|
810
834
|
}), d.addEventListenerFromMainApp("route", (i) => {
|
|
811
|
-
const { cmd:
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
}, 300)),
|
|
815
|
-
|
|
835
|
+
const { cmd: r, path: o } = i.data;
|
|
836
|
+
r === "reload" && (O.value.push(o), F.value = !1, setTimeout(() => {
|
|
837
|
+
F.value = !0, O.value = [];
|
|
838
|
+
}, 300)), r === "unload" && (O.value.push(o), F.value = !1, setTimeout(() => {
|
|
839
|
+
F.value = !0, O.value = [];
|
|
816
840
|
}, 100));
|
|
817
841
|
});
|
|
818
842
|
};
|
|
819
843
|
export {
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
844
|
+
tt as DasMainAppLayout,
|
|
845
|
+
nt as initMainApp,
|
|
846
|
+
st as initMicroApp,
|
|
823
847
|
d as microFrontend
|
|
824
848
|
};
|