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