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