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