@das-fed/web 6.4.0-dev.12 → 6.4.0-dev.121
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-ByvKrojI.js +10 -0
- package/index-CUEaQqhg.js +13946 -0
- package/index-CUEaQqhg.js.gz +0 -0
- package/index-DNmPYqCc.js +87 -0
- package/index-DNmPYqCc.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 +495 -465
- 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-BsqHCDiq.js +10 -0
- package/packages/main-app-framework/index-CEUVvcoF.js +87 -0
- package/packages/main-app-framework/index-CEUVvcoF.js.gz +0 -0
- package/packages/main-app-framework/index-DGMsib08.js +12454 -0
- package/packages/main-app-framework/index-DGMsib08.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 +290 -278
- 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/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/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 +5 -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 +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/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 +6 -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-B0_oruhN.js +0 -10
- package/index-C2ZSdOo4.js +0 -7079
- package/index-C2ZSdOo4.js.gz +0 -0
- package/index-DCv0mp9Q.js +0 -68
- package/index-DCv0mp9Q.js.gz +0 -0
- package/index-E3_VNsYI.js +0 -71
- package/index-E3_VNsYI.js.gz +0 -0
- package/packages/main-app-framework/index-BKvL69_g.js +0 -5768
- package/packages/main-app-framework/index-BKvL69_g.js.gz +0 -0
- package/packages/main-app-framework/index-BmlzT8Nw.js +0 -10
- package/packages/main-app-framework/index-DGFe8dVS.js +0 -71
- package/packages/main-app-framework/index-DGFe8dVS.js.gz +0 -0
- package/packages/main-app-framework/index-csrvxtZY.js +0 -68
- package/packages/main-app-framework/index-csrvxtZY.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
|
},
|
|
@@ -209,14 +223,10 @@ const b = (e, t, n) => {
|
|
|
209
223
|
u.items = t;
|
|
210
224
|
},
|
|
211
225
|
appendItem: (e) => {
|
|
212
|
-
|
|
213
|
-
u.visible || (u.visible = !0), !u.items.find((n) => n.value == e.value) && u.items.push(e);
|
|
214
|
-
}, 200);
|
|
226
|
+
u.visible || (u.visible = !0), !u.items.find((n) => n.value == e.value) && u.items.push(e);
|
|
215
227
|
},
|
|
216
228
|
setActiveItem: (e) => {
|
|
217
|
-
|
|
218
|
-
u.activeItem = e;
|
|
219
|
-
}, 200);
|
|
229
|
+
u.activeItem = e;
|
|
220
230
|
},
|
|
221
231
|
setConfig: (e) => {
|
|
222
232
|
u.config = e;
|
|
@@ -238,9 +248,9 @@ const b = (e, t, n) => {
|
|
|
238
248
|
},
|
|
239
249
|
triggerEventListener: (e, t, n) => {
|
|
240
250
|
var i;
|
|
241
|
-
const
|
|
242
|
-
for (const
|
|
243
|
-
const o = r
|
|
251
|
+
const s = u.eventListeners, { autoRemove: c = !1 } = n || {}, a = [];
|
|
252
|
+
for (const r in s) {
|
|
253
|
+
const o = s[r];
|
|
244
254
|
o.type === e && a.push(
|
|
245
255
|
(i = o == null ? void 0 : o.handler) == null ? void 0 : i.call(o, t).then(() => {
|
|
246
256
|
c && o.remove();
|
|
@@ -250,7 +260,7 @@ const b = (e, t, n) => {
|
|
|
250
260
|
return Promise.all(a).then(() => !0).catch(() => !1);
|
|
251
261
|
},
|
|
252
262
|
addEventListener: (e, t) => {
|
|
253
|
-
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 = () => {
|
|
254
264
|
u.eventListeners[n] && delete u.eventListeners[n];
|
|
255
265
|
};
|
|
256
266
|
return u.eventListeners[n] = {
|
|
@@ -262,34 +272,38 @@ const b = (e, t, n) => {
|
|
|
262
272
|
throw a;
|
|
263
273
|
}
|
|
264
274
|
},
|
|
265
|
-
remove:
|
|
275
|
+
remove: s
|
|
266
276
|
}, {
|
|
267
|
-
remove:
|
|
277
|
+
remove: s
|
|
268
278
|
};
|
|
269
279
|
}
|
|
270
|
-
},
|
|
280
|
+
}, g = P({
|
|
281
|
+
theme: "default",
|
|
271
282
|
items: [],
|
|
283
|
+
collapse: !1,
|
|
272
284
|
eventListeners: {}
|
|
273
|
-
}),
|
|
285
|
+
}), j = {
|
|
274
286
|
setItems: (e) => {
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
287
|
+
g.items = e;
|
|
288
|
+
},
|
|
289
|
+
getItems: () => g.items,
|
|
290
|
+
setTheme: (e) => {
|
|
291
|
+
g.theme = e;
|
|
278
292
|
},
|
|
279
|
-
getItems: () => _.items,
|
|
280
293
|
setActiveItem: (e) => {
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
294
|
+
g.activeItem = e;
|
|
295
|
+
},
|
|
296
|
+
setCollapse: (e) => {
|
|
297
|
+
g.collapse = e;
|
|
284
298
|
},
|
|
285
299
|
setPopupClassName: (e) => {
|
|
286
|
-
|
|
300
|
+
g.popupClassName = e;
|
|
287
301
|
},
|
|
288
302
|
triggerEventListener: (e, t, n) => {
|
|
289
303
|
var i;
|
|
290
|
-
const
|
|
291
|
-
for (const
|
|
292
|
-
const o = r
|
|
304
|
+
const s = g.eventListeners, { autoRemove: c = !1 } = n || {}, a = [];
|
|
305
|
+
for (const r in s) {
|
|
306
|
+
const o = s[r];
|
|
293
307
|
o.type === e && a.push(
|
|
294
308
|
(i = o == null ? void 0 : o.handler) == null ? void 0 : i.call(o, t).then(() => {
|
|
295
309
|
c && o.remove();
|
|
@@ -299,10 +313,10 @@ const b = (e, t, n) => {
|
|
|
299
313
|
return Promise.all(a).then(() => !0).catch(() => !1);
|
|
300
314
|
},
|
|
301
315
|
addEventListener: (e, t) => {
|
|
302
|
-
const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8),
|
|
303
|
-
|
|
316
|
+
const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8), s = () => {
|
|
317
|
+
g.eventListeners[n] && delete g.eventListeners[n];
|
|
304
318
|
};
|
|
305
|
-
return
|
|
319
|
+
return g.eventListeners[n] = {
|
|
306
320
|
type: e,
|
|
307
321
|
handler: async (c) => {
|
|
308
322
|
try {
|
|
@@ -311,39 +325,39 @@ const b = (e, t, n) => {
|
|
|
311
325
|
throw a;
|
|
312
326
|
}
|
|
313
327
|
},
|
|
314
|
-
remove:
|
|
328
|
+
remove: s
|
|
315
329
|
}, {
|
|
316
|
-
remove:
|
|
330
|
+
remove: s
|
|
317
331
|
};
|
|
318
332
|
}
|
|
319
|
-
},
|
|
333
|
+
}, A = P({
|
|
334
|
+
theme: "default",
|
|
320
335
|
items: [],
|
|
321
336
|
eventListeners: {}
|
|
322
|
-
}),
|
|
337
|
+
}), H = {
|
|
323
338
|
setItems: (e) => {
|
|
324
|
-
|
|
339
|
+
A.items = e;
|
|
340
|
+
},
|
|
341
|
+
getItems: () => A.items,
|
|
342
|
+
setTheme: (e) => {
|
|
343
|
+
A.theme = e;
|
|
325
344
|
},
|
|
326
|
-
getItems: () => v.items,
|
|
327
345
|
removeItem: (e) => {
|
|
328
|
-
const t =
|
|
329
|
-
|
|
346
|
+
const t = A.items.filter((n) => n.value !== e);
|
|
347
|
+
A.items = t;
|
|
330
348
|
},
|
|
331
349
|
appendItem: (e) => {
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
t !== -1 ? v.items.splice(t, 1, e) : v.items.push(e);
|
|
335
|
-
}, 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);
|
|
336
352
|
},
|
|
337
353
|
setActiveItem: (e) => {
|
|
338
|
-
|
|
339
|
-
v.activeItem = e;
|
|
340
|
-
}, 200);
|
|
354
|
+
A.activeItem = e;
|
|
341
355
|
},
|
|
342
356
|
triggerEventListener: (e, t, n) => {
|
|
343
357
|
var i;
|
|
344
|
-
const
|
|
345
|
-
for (const
|
|
346
|
-
const o = r
|
|
358
|
+
const s = A.eventListeners, { autoRemove: c = !1 } = n || {}, a = [];
|
|
359
|
+
for (const r in s) {
|
|
360
|
+
const o = s[r];
|
|
347
361
|
o.type === e && a.push(
|
|
348
362
|
(i = o == null ? void 0 : o.handler) == null ? void 0 : i.call(o, t).then(() => {
|
|
349
363
|
c && o.remove();
|
|
@@ -353,10 +367,10 @@ const b = (e, t, n) => {
|
|
|
353
367
|
return Promise.all(a).then(() => !0).catch(() => !1);
|
|
354
368
|
},
|
|
355
369
|
addEventListener: (e, t) => {
|
|
356
|
-
const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8),
|
|
357
|
-
|
|
370
|
+
const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8), s = () => {
|
|
371
|
+
A.eventListeners[n] && delete A.eventListeners[n];
|
|
358
372
|
};
|
|
359
|
-
return
|
|
373
|
+
return A.eventListeners[n] = {
|
|
360
374
|
type: e,
|
|
361
375
|
handler: async (c) => {
|
|
362
376
|
try {
|
|
@@ -365,19 +379,19 @@ const b = (e, t, n) => {
|
|
|
365
379
|
throw a;
|
|
366
380
|
}
|
|
367
381
|
},
|
|
368
|
-
remove:
|
|
382
|
+
remove: s
|
|
369
383
|
}, {
|
|
370
|
-
remove:
|
|
384
|
+
remove: s
|
|
371
385
|
};
|
|
372
386
|
}
|
|
373
|
-
},
|
|
387
|
+
}, R = P({
|
|
374
388
|
eventListeners: {}
|
|
375
|
-
}),
|
|
389
|
+
}), Ce = {
|
|
376
390
|
triggerEventListener: (e, t, n) => {
|
|
377
391
|
var i;
|
|
378
|
-
const
|
|
379
|
-
for (const
|
|
380
|
-
const o = r
|
|
392
|
+
const s = R.eventListeners, { autoRemove: c = !1 } = n || {}, a = [];
|
|
393
|
+
for (const r in s) {
|
|
394
|
+
const o = s[r];
|
|
381
395
|
o.type === e && a.push(
|
|
382
396
|
(i = o == null ? void 0 : o.handler) == null ? void 0 : i.call(o, t).then(() => {
|
|
383
397
|
c && o.remove();
|
|
@@ -387,10 +401,10 @@ const b = (e, t, n) => {
|
|
|
387
401
|
return Promise.all(a).then(() => !0).catch(() => !1);
|
|
388
402
|
},
|
|
389
403
|
addEventListener: (e, t) => {
|
|
390
|
-
const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8),
|
|
391
|
-
|
|
404
|
+
const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8), s = () => {
|
|
405
|
+
R.eventListeners[n] && delete R.eventListeners[n];
|
|
392
406
|
};
|
|
393
|
-
return
|
|
407
|
+
return R.eventListeners[n] = {
|
|
394
408
|
type: e,
|
|
395
409
|
handler: async (c) => {
|
|
396
410
|
try {
|
|
@@ -399,81 +413,79 @@ const b = (e, t, n) => {
|
|
|
399
413
|
throw a;
|
|
400
414
|
}
|
|
401
415
|
},
|
|
402
|
-
remove:
|
|
416
|
+
remove: s
|
|
403
417
|
}, {
|
|
404
|
-
remove:
|
|
418
|
+
remove: s
|
|
405
419
|
};
|
|
406
420
|
}
|
|
407
|
-
},
|
|
421
|
+
}, U = P({
|
|
408
422
|
visible: !1,
|
|
409
423
|
style: {}
|
|
410
424
|
}), Oe = {
|
|
411
425
|
set: (e, t) => {
|
|
412
|
-
|
|
426
|
+
U.visible = e, t || (t = {}), t.transition || (t.transition = "all 0.3s"), t && (U.style = t);
|
|
413
427
|
}
|
|
414
|
-
},
|
|
415
|
-
nav: u,
|
|
416
|
-
menu: _,
|
|
417
|
-
tab: v,
|
|
418
|
-
overlay: W,
|
|
419
|
-
iframeView: P,
|
|
428
|
+
}, Fe = {
|
|
420
429
|
visible: w(!0)
|
|
421
|
-
},
|
|
422
|
-
nav:
|
|
423
|
-
menu:
|
|
424
|
-
tab:
|
|
430
|
+
}, G = {
|
|
431
|
+
nav: W,
|
|
432
|
+
menu: j,
|
|
433
|
+
tab: H,
|
|
425
434
|
overlay: Oe,
|
|
426
|
-
iframeView:
|
|
427
|
-
setVisible: (e) =>
|
|
428
|
-
|
|
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) => {
|
|
429
441
|
const n = e.__vccOpts || e;
|
|
430
|
-
for (const [
|
|
431
|
-
n[
|
|
442
|
+
for (const [s, c] of t)
|
|
443
|
+
n[s] = c;
|
|
432
444
|
return n;
|
|
433
445
|
};
|
|
434
|
-
var
|
|
435
|
-
const B = typeof window < "u",
|
|
446
|
+
var J;
|
|
447
|
+
const B = typeof window < "u", Re = (e) => typeof e == "string", Ne = () => {
|
|
436
448
|
};
|
|
437
|
-
B && ((
|
|
438
|
-
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) {
|
|
439
451
|
return typeof e == "function" ? e() : I(e);
|
|
440
452
|
}
|
|
441
|
-
function
|
|
453
|
+
function De(e) {
|
|
442
454
|
return e;
|
|
443
455
|
}
|
|
444
|
-
function
|
|
445
|
-
return
|
|
456
|
+
function ie(e) {
|
|
457
|
+
return ue() ? (de(e), !0) : !1;
|
|
446
458
|
}
|
|
447
|
-
function
|
|
448
|
-
|
|
459
|
+
function ke(e, t = !0) {
|
|
460
|
+
pe() ? me(e) : t ? e() : ne(e);
|
|
449
461
|
}
|
|
450
|
-
function
|
|
462
|
+
function oe(e) {
|
|
451
463
|
var t;
|
|
452
|
-
const n =
|
|
464
|
+
const n = ae(e);
|
|
453
465
|
return (t = n == null ? void 0 : n.$el) != null ? t : n;
|
|
454
466
|
}
|
|
455
|
-
const
|
|
456
|
-
function
|
|
457
|
-
let t, n,
|
|
458
|
-
if (
|
|
459
|
-
return
|
|
460
|
-
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]);
|
|
461
473
|
const a = [], i = () => {
|
|
462
474
|
a.forEach((l) => l()), a.length = 0;
|
|
463
|
-
},
|
|
464
|
-
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))));
|
|
465
477
|
}, { immediate: !0, flush: "post" }), p = () => {
|
|
466
478
|
o(), i();
|
|
467
479
|
};
|
|
468
|
-
return
|
|
480
|
+
return ie(p), p;
|
|
469
481
|
}
|
|
470
|
-
function
|
|
471
|
-
const n = w(),
|
|
472
|
-
return
|
|
482
|
+
function Qe(e, t = !1) {
|
|
483
|
+
const n = w(), s = () => n.value = !!e();
|
|
484
|
+
return s(), ke(s, t), n;
|
|
473
485
|
}
|
|
474
|
-
const
|
|
475
|
-
|
|
476
|
-
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 = [
|
|
477
489
|
[
|
|
478
490
|
"requestFullscreen",
|
|
479
491
|
"exitFullscreen",
|
|
@@ -515,54 +527,54 @@ const J = [
|
|
|
515
527
|
"MSFullscreenError"
|
|
516
528
|
]
|
|
517
529
|
];
|
|
518
|
-
function
|
|
519
|
-
const { document: n =
|
|
520
|
-
let i =
|
|
521
|
-
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(() => {
|
|
522
534
|
if (n) {
|
|
523
|
-
for (const S of
|
|
535
|
+
for (const S of Y)
|
|
524
536
|
if (S[1] in n)
|
|
525
537
|
return i = S, !0;
|
|
526
538
|
} else
|
|
527
539
|
return !1;
|
|
528
540
|
return !1;
|
|
529
|
-
}), [o, p, l, ,
|
|
541
|
+
}), [o, p, l, , y] = i;
|
|
530
542
|
async function m() {
|
|
531
|
-
|
|
543
|
+
r.value && (n != null && n[l] && await n[p](), a.value = !1);
|
|
532
544
|
}
|
|
533
|
-
async function
|
|
534
|
-
if (!
|
|
545
|
+
async function L() {
|
|
546
|
+
if (!r.value)
|
|
535
547
|
return;
|
|
536
548
|
await m();
|
|
537
|
-
const S =
|
|
549
|
+
const S = oe(c);
|
|
538
550
|
S && (await S[o](), a.value = !0);
|
|
539
551
|
}
|
|
540
|
-
async function
|
|
541
|
-
a.value ? await m() : await
|
|
552
|
+
async function le() {
|
|
553
|
+
a.value ? await m() : await L();
|
|
542
554
|
}
|
|
543
|
-
return n &&
|
|
555
|
+
return n && qe(n, y, () => {
|
|
544
556
|
a.value = !!(n != null && n[l]);
|
|
545
|
-
}, !1),
|
|
546
|
-
isSupported:
|
|
557
|
+
}, !1), s && ie(m), {
|
|
558
|
+
isSupported: r,
|
|
547
559
|
isFullscreen: a,
|
|
548
|
-
enter:
|
|
560
|
+
enter: L,
|
|
549
561
|
exit: m,
|
|
550
|
-
toggle:
|
|
562
|
+
toggle: le
|
|
551
563
|
};
|
|
552
564
|
}
|
|
553
|
-
var
|
|
565
|
+
var Z;
|
|
554
566
|
(function(e) {
|
|
555
567
|
e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE";
|
|
556
|
-
})(
|
|
557
|
-
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) => {
|
|
558
570
|
for (var n in t || (t = {}))
|
|
559
|
-
|
|
560
|
-
if (
|
|
561
|
-
for (var n of
|
|
562
|
-
|
|
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]);
|
|
563
575
|
return e;
|
|
564
576
|
};
|
|
565
|
-
const
|
|
577
|
+
const He = {
|
|
566
578
|
easeInSine: [0.12, 0, 0.39, 0],
|
|
567
579
|
easeOutSine: [0.61, 1, 0.88, 1],
|
|
568
580
|
easeInOutSine: [0.37, 0, 0.63, 1],
|
|
@@ -588,10 +600,10 @@ const ze = {
|
|
|
588
600
|
easeOutBack: [0.34, 1.56, 0.64, 1],
|
|
589
601
|
easeInOutBack: [0.68, -0.6, 0.32, 1.6]
|
|
590
602
|
};
|
|
591
|
-
|
|
592
|
-
linear:
|
|
593
|
-
},
|
|
594
|
-
const
|
|
603
|
+
je({
|
|
604
|
+
linear: De
|
|
605
|
+
}, He);
|
|
606
|
+
const Ue = ["src", "entry", "name"], Ge = /* @__PURE__ */ x({
|
|
595
607
|
__name: "das-micro-app",
|
|
596
608
|
props: {
|
|
597
609
|
src: {},
|
|
@@ -600,27 +612,27 @@ const je = ["src", "entry", "name"], He = /* @__PURE__ */ x({
|
|
|
600
612
|
},
|
|
601
613
|
emits: ["onLoaded", "onActivated", "onDeactivated"],
|
|
602
614
|
setup(e, { emit: t }) {
|
|
603
|
-
const n = e,
|
|
604
|
-
|
|
605
|
-
}, a =
|
|
606
|
-
return
|
|
607
|
-
|
|
608
|
-
}), (
|
|
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", {
|
|
609
621
|
class: "das-micro-app",
|
|
610
622
|
src: n.src,
|
|
611
623
|
entry: n.src,
|
|
612
624
|
name: n.name,
|
|
613
625
|
frameborder: "0",
|
|
614
626
|
onLoad: c
|
|
615
|
-
}, null, 40,
|
|
627
|
+
}, null, 40, Ue));
|
|
616
628
|
}
|
|
617
|
-
}),
|
|
629
|
+
}), Je = /* @__PURE__ */ re(Ge, [["__scopeId", "data-v-8ae871f6"]]), Ke = /* @__PURE__ */ x({
|
|
618
630
|
__name: "das-micro-apps",
|
|
619
631
|
setup(e) {
|
|
620
632
|
const t = w(null), n = async (a, i) => {
|
|
621
|
-
const
|
|
622
|
-
if (!
|
|
623
|
-
|
|
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));
|
|
624
636
|
const o = () => {
|
|
625
637
|
const m = t.value.getBoundingClientRect() || {};
|
|
626
638
|
return m.width = t.value.clientWidth, m.height = t.value.clientHeight, m;
|
|
@@ -628,25 +640,25 @@ const je = ["src", "entry", "name"], He = /* @__PURE__ */ x({
|
|
|
628
640
|
d.sendMessageToMicroApp(i, "onLoaded", {
|
|
629
641
|
href: location.href,
|
|
630
642
|
microAppContainerRect: o(),
|
|
631
|
-
entry:
|
|
632
|
-
name:
|
|
643
|
+
entry: r.entry,
|
|
644
|
+
name: r.name
|
|
633
645
|
});
|
|
634
|
-
const { dom: p, ...l } =
|
|
646
|
+
const { dom: p, ...l } = r;
|
|
635
647
|
d.triggerMicroAppLifeCycleListener("onLoaded", l), new ResizeObserver(() => {
|
|
636
648
|
d.sendMessageToMicroApp(i, "resize", o());
|
|
637
649
|
}).observe(t.value), d.sendMessageToMicroApp(i, "setProxyMessageStatus", { visible: !0, parentHref: location.href }), d.sendMessageToMicroApp(i, "setProxSsoStatus", { visible: !0, parentHref: location.href });
|
|
638
|
-
},
|
|
639
|
-
const
|
|
640
|
-
if (!
|
|
641
|
-
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;
|
|
642
654
|
d.sendMessageToMicroApp(i, "onActivated"), d.triggerMicroAppLifeCycleListener("onActivated", p);
|
|
643
655
|
}, c = (a, i) => {
|
|
644
|
-
const
|
|
645
|
-
if (!
|
|
646
|
-
const { dom: o, ...p } =
|
|
656
|
+
const r = f.value.find((l) => l.name === i);
|
|
657
|
+
if (!r) return;
|
|
658
|
+
const { dom: o, ...p } = r;
|
|
647
659
|
d.sendMessageToMicroApp(i, "onDeactivated"), d.triggerMicroAppLifeCycleListener("onDeactivated", p);
|
|
648
660
|
};
|
|
649
|
-
return (a, i) => (E(),
|
|
661
|
+
return (a, i) => (E(), D(
|
|
650
662
|
"div",
|
|
651
663
|
{
|
|
652
664
|
ref_key: "containerRef",
|
|
@@ -654,24 +666,24 @@ const je = ["src", "entry", "name"], He = /* @__PURE__ */ x({
|
|
|
654
666
|
class: "das-micro-app-container"
|
|
655
667
|
},
|
|
656
668
|
[
|
|
657
|
-
(E(!0),
|
|
669
|
+
(E(!0), D(
|
|
658
670
|
$,
|
|
659
671
|
null,
|
|
660
|
-
|
|
672
|
+
fe(I(f), (r) => (E(), D(
|
|
661
673
|
$,
|
|
662
674
|
null,
|
|
663
675
|
[
|
|
664
|
-
|
|
676
|
+
r.loaded ? ve((E(), se(Je, {
|
|
665
677
|
key: 0,
|
|
666
|
-
src:
|
|
667
|
-
name:
|
|
668
|
-
actived:
|
|
669
|
-
onOnLoaded: (o) => n(o,
|
|
670
|
-
onOnActivated: (o) =>
|
|
671
|
-
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)
|
|
672
684
|
}, null, 8, ["src", "name", "actived", "onOnLoaded", "onOnActivated", "onOnDeactivated"])), [
|
|
673
|
-
[
|
|
674
|
-
]) :
|
|
685
|
+
[Ae, r.actived]
|
|
686
|
+
]) : he("v-if", !0)
|
|
675
687
|
],
|
|
676
688
|
64
|
|
677
689
|
/* STABLE_FRAGMENT */
|
|
@@ -684,7 +696,7 @@ const je = ["src", "entry", "name"], He = /* @__PURE__ */ x({
|
|
|
684
696
|
/* NEED_PATCH */
|
|
685
697
|
));
|
|
686
698
|
}
|
|
687
|
-
}),
|
|
699
|
+
}), Xe = /* @__PURE__ */ re(Ke, [["__scopeId", "data-v-3abdb1e9"]]), tt = /* @__PURE__ */ x({
|
|
688
700
|
__name: "das-main-app-layout",
|
|
689
701
|
props: {
|
|
690
702
|
transitionConfig: { default: () => {
|
|
@@ -698,93 +710,93 @@ const je = ["src", "entry", "name"], He = /* @__PURE__ */ x({
|
|
|
698
710
|
} }
|
|
699
711
|
},
|
|
700
712
|
setup(e) {
|
|
701
|
-
const t = e, n =
|
|
713
|
+
const t = e, n = N(() => !k.value), s = N(() => ({
|
|
702
714
|
"enter-active-class": "animate__animated animate__fadeInLeft",
|
|
703
715
|
...t.transitionConfig
|
|
704
|
-
})), c =
|
|
705
|
-
return (a, i) => (E(),
|
|
706
|
-
"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,
|
|
707
719
|
"router-view-visible": n.value
|
|
708
720
|
}, c.value), {
|
|
709
|
-
header:
|
|
721
|
+
header: T(() => [
|
|
710
722
|
V(a.$slots, "header", {}, () => [
|
|
711
|
-
|
|
723
|
+
C(I(_e))
|
|
712
724
|
])
|
|
713
725
|
]),
|
|
714
|
-
aside:
|
|
726
|
+
aside: T(() => [
|
|
715
727
|
V(a.$slots, "aside", {}, () => [
|
|
716
|
-
|
|
728
|
+
C(I(Le), { menuAttr: a.menuAttr }, null, 8, ["menuAttr"])
|
|
717
729
|
])
|
|
718
730
|
]),
|
|
719
|
-
tab:
|
|
731
|
+
tab: T(() => [
|
|
720
732
|
V(a.$slots, "tab", {}, () => [
|
|
721
|
-
|
|
733
|
+
C(I(Me), { tabsAttr: a.tabsAttr }, null, 8, ["tabsAttr"])
|
|
722
734
|
])
|
|
723
735
|
]),
|
|
724
|
-
default:
|
|
725
|
-
|
|
736
|
+
default: T(() => [
|
|
737
|
+
C(Xe)
|
|
726
738
|
]),
|
|
727
739
|
_: 3
|
|
728
740
|
/* FORWARDED */
|
|
729
741
|
}, 16, ["transition-config", "router-view-visible"]));
|
|
730
742
|
}
|
|
731
|
-
}),
|
|
743
|
+
}), ce = /* @__PURE__ */ x({
|
|
732
744
|
__name: "das-micro-app-ghost",
|
|
733
745
|
setup(e) {
|
|
734
|
-
return
|
|
746
|
+
return ge(() => {
|
|
735
747
|
setTimeout(() => {
|
|
736
748
|
document.documentElement.checkVisibility() && history.back();
|
|
737
749
|
}, 300);
|
|
738
750
|
}), (t, n) => null;
|
|
739
751
|
}
|
|
740
|
-
}),
|
|
752
|
+
}), Ye = (e) => ["http://", "https://", "ws://", "wss://", "/"].find((n) => e.startsWith(n)) ? e : `/${e}`, nt = (e, t) => {
|
|
741
753
|
if (!(e != null && e.microApps) || !Array.isArray(e.microApps)) return;
|
|
742
|
-
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({
|
|
743
755
|
name: "das-micro-app",
|
|
744
756
|
path: `${z.value}/:pathMatch(.*)*`,
|
|
745
|
-
component:
|
|
757
|
+
component: ce,
|
|
746
758
|
meta: { isMicroApp: !0, keepAlive: !0 }
|
|
747
759
|
}), d.addEventListenerFromMicroApp("bodyOverlay", (c) => {
|
|
748
760
|
const { visible: a, style: i } = c.data;
|
|
749
|
-
|
|
761
|
+
G.overlay.set(a, i);
|
|
750
762
|
}), d.addEventListenerFromMicroApp("layoutVisible", (c) => {
|
|
751
763
|
const { visible: a } = c.data;
|
|
752
|
-
|
|
764
|
+
G.setVisible(a);
|
|
753
765
|
}), d.addEventListenerFromMicroApp("route", (c) => {
|
|
754
|
-
const { name: a, cmd: i, path:
|
|
755
|
-
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);
|
|
756
768
|
});
|
|
757
|
-
const { enter: n, exit:
|
|
769
|
+
const { enter: n, exit: s } = Be();
|
|
758
770
|
d.addEventListenerFromMicroApp("fullscreen", (c) => {
|
|
759
771
|
const a = c.data;
|
|
760
|
-
a && n(), a ||
|
|
772
|
+
a && n(), a || s();
|
|
761
773
|
}), d.addEventListenerFromMicroApp("location", (c) => {
|
|
762
774
|
const { cmd: a, isAutoCloseApp: i } = c.data || {};
|
|
763
775
|
a === "reload" && (i !== void 0 && (window.__isAutoCloseApp = i), location.reload());
|
|
764
776
|
});
|
|
765
|
-
},
|
|
777
|
+
}, st = (e, t) => {
|
|
766
778
|
if (!(e != null && e.microAppName)) return;
|
|
767
779
|
window.config.microAppName = e.microAppName, window.self !== window.top && e.microAppName && (window.__IN_DAS_MICRO_APP = !0);
|
|
768
780
|
const n = "das-micro-app-ghost";
|
|
769
781
|
t == null || t.addRoute({
|
|
770
782
|
name: n,
|
|
771
783
|
path: `/${n}/:pathMatch(.*)*`,
|
|
772
|
-
component:
|
|
784
|
+
component: ce,
|
|
773
785
|
meta: { isMicroApp: !0, keepAlive: !0 }
|
|
774
786
|
});
|
|
775
|
-
const
|
|
776
|
-
|
|
787
|
+
const s = w(!1), c = w(!1), a = w("");
|
|
788
|
+
M(
|
|
777
789
|
() => t.currentRoute.value,
|
|
778
790
|
(i) => {
|
|
779
|
-
if (
|
|
780
|
-
|
|
791
|
+
if (s.value) {
|
|
792
|
+
s.value = !1;
|
|
781
793
|
return;
|
|
782
794
|
}
|
|
783
795
|
if (c.value) {
|
|
784
796
|
c.value = !1;
|
|
785
797
|
return;
|
|
786
798
|
}
|
|
787
|
-
const { path:
|
|
799
|
+
const { path: r, query: o, params: p, meta: l } = i;
|
|
788
800
|
if (a.value.includes(i.path)) {
|
|
789
801
|
a.value = "";
|
|
790
802
|
return;
|
|
@@ -792,7 +804,7 @@ const je = ["src", "entry", "name"], He = /* @__PURE__ */ x({
|
|
|
792
804
|
d.sendMessageToMainApp("router", {
|
|
793
805
|
cmd: "push",
|
|
794
806
|
route: {
|
|
795
|
-
path:
|
|
807
|
+
path: r,
|
|
796
808
|
query: { ...o, microAppName: e.microAppName },
|
|
797
809
|
params: p,
|
|
798
810
|
meta: l
|
|
@@ -801,36 +813,36 @@ const je = ["src", "entry", "name"], He = /* @__PURE__ */ x({
|
|
|
801
813
|
}
|
|
802
814
|
), d.addEventListenerFromMainApp("router", async (i) => {
|
|
803
815
|
var l;
|
|
804
|
-
const { cmd:
|
|
805
|
-
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);
|
|
806
818
|
}), d.addEventListenerFromMainApp("onLoaded", (i) => {
|
|
807
|
-
const { href:
|
|
808
|
-
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;
|
|
809
821
|
}), d.addEventListenerFromMainApp("onDeactivated", (i) => {
|
|
810
|
-
const { name:
|
|
822
|
+
const { name: r = "", path: o, params: p = {}, query: l = {} } = t.currentRoute.value;
|
|
811
823
|
c.value = !0, t == null || t.push({
|
|
812
824
|
name: n,
|
|
813
825
|
query: { microAppName: e.microAppName, fromQuery: JSON.stringify(l), fromPath: o },
|
|
814
826
|
params: p
|
|
815
827
|
});
|
|
816
828
|
}), d.addEventListenerFromMainApp("onActivated", (i) => {
|
|
817
|
-
const { name:
|
|
818
|
-
|
|
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 });
|
|
819
831
|
}), d.addEventListenerFromMainApp("sessionStorage", (i) => {
|
|
820
|
-
const { cmd:
|
|
821
|
-
|
|
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();
|
|
822
834
|
}), d.addEventListenerFromMainApp("route", (i) => {
|
|
823
|
-
const { cmd:
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
}, 300)),
|
|
827
|
-
|
|
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 = [];
|
|
828
840
|
}, 100));
|
|
829
841
|
});
|
|
830
842
|
};
|
|
831
843
|
export {
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
844
|
+
tt as DasMainAppLayout,
|
|
845
|
+
nt as initMainApp,
|
|
846
|
+
st as initMicroApp,
|
|
835
847
|
d as microFrontend
|
|
836
848
|
};
|