@das-fed/web 6.4.0-dev.3 → 6.4.0-dev.31

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.
Files changed (57) hide show
  1. package/index-2T_H15dv.js +71 -0
  2. package/index-2T_H15dv.js.gz +0 -0
  3. package/{index-CTiS2AQx.js → index-CjVC66ff.js} +14 -14
  4. package/index-CjVC66ff.js.gz +0 -0
  5. package/{packages/main-app-framework/index-CRT8yHn-.js → index-DPpRTnrf.js} +1 -1
  6. package/index-puk4QfAT.js +7087 -0
  7. package/index-puk4QfAT.js.gz +0 -0
  8. package/index.js +1 -1
  9. package/package.json +6 -6
  10. package/packages/create-das-web-app/config.js +1 -0
  11. package/packages/create-das-web-app/index.js +48 -807
  12. package/packages/create-das-web-app/index.js.gz +0 -0
  13. package/packages/i18n/config.js +1 -0
  14. package/packages/i18n/index.js.gz +0 -0
  15. package/packages/layout/config.js +1 -0
  16. package/packages/layout/index.js +277 -278
  17. package/packages/layout/index.js.gz +0 -0
  18. package/packages/layout/style.css +2 -2
  19. package/packages/layout/style.css.gz +0 -0
  20. package/packages/main-app-framework/config.js +1 -0
  21. package/packages/main-app-framework/index-A69EQVG4.js +5786 -0
  22. package/packages/main-app-framework/index-A69EQVG4.js.gz +0 -0
  23. package/packages/main-app-framework/{index-Twj2RXRy.js → index-B9FQmM02.js} +14 -14
  24. package/packages/main-app-framework/index-B9FQmM02.js.gz +0 -0
  25. package/{index-DZPzbqdK.js → packages/main-app-framework/index-DLw2CpC0.js} +1 -1
  26. package/packages/main-app-framework/index-j5ACjIDv.js +71 -0
  27. package/packages/main-app-framework/index-j5ACjIDv.js.gz +0 -0
  28. package/packages/main-app-framework/index.js +3 -2
  29. package/packages/main-app-framework/style.css +1 -1
  30. package/packages/main-app-framework/style.css.gz +0 -0
  31. package/packages/micro-frontend/config.js +1 -0
  32. package/packages/micro-frontend/index.js +242 -240
  33. package/packages/micro-frontend/index.js.gz +0 -0
  34. package/packages/micro-frontend/style.css +1 -1
  35. package/packages/style/config.js +1 -0
  36. package/packages/style/style.css +1 -1
  37. package/packages/style/style.css.gz +0 -0
  38. package/packages/theme/config.js +1 -0
  39. package/packages/theme/index.js +24 -24
  40. package/packages/theme/index.js.gz +0 -0
  41. package/style.css +2 -2
  42. package/style.css.gz +0 -0
  43. package/types/main-app-framework/business/video-link/api.d.ts +2 -0
  44. package/types/main-app-framework/business/video-link/video-dialog/hooks/PlayerProvider.d.ts +3 -3
  45. package/types/main-app-framework/components/person-set-dialog/index.d.ts +1 -1
  46. package/types/main-app-framework/init-layout/hooks/nav-slots/use-user-command.d.ts +2 -2
  47. package/types/micro-frontend/index.d.ts +1 -1
  48. package/index-CTiS2AQx.js.gz +0 -0
  49. package/index-DjsZCo03.js +0 -70
  50. package/index-DjsZCo03.js.gz +0 -0
  51. package/index-LVjuqzoG.js +0 -11086
  52. package/index-LVjuqzoG.js.gz +0 -0
  53. package/packages/main-app-framework/index-2WWk8ggi.js +0 -9022
  54. package/packages/main-app-framework/index-2WWk8ggi.js.gz +0 -0
  55. package/packages/main-app-framework/index-BqkWKMMe.js +0 -70
  56. package/packages/main-app-framework/index-BqkWKMMe.js.gz +0 -0
  57. package/packages/main-app-framework/index-Twj2RXRy.js.gz +0 -0
@@ -1,35 +1,7 @@
1
1
  import '@das-fed/web/packages/micro-frontend/style.css';
2
- import { defineComponent as x, computed as T, watch as y, openBlock as I, createElementBlock as N, ref as w, Fragment as $, renderList as oe, unref as E, withDirectives as ce, createBlock as Z, vShow as le, createCommentVNode as ue, nextTick as ee, mergeProps as de, withCtx as C, renderSlot as V, createVNode as F, onActivated as pe, reactive as O, getCurrentScope as me, onScopeDispose as fe, getCurrentInstance as ve, onMounted as Ae } from "vue";
3
- import { DasWebLayout as he, DasWebNav as we, DasWebMenu as ge, DasWebTabs as _e } from "@das-fed/web/packages/layout/index";
4
- const ye = ["src", "entry", "name"], Me = /* @__PURE__ */ x({
5
- __name: "das-micro-app",
6
- props: {
7
- src: {},
8
- name: {},
9
- actived: { type: Boolean }
10
- },
11
- emits: ["onLoaded", "onActivated", "onDeactivated"],
12
- setup(e, { emit: t }) {
13
- const n = e, r = t, c = (s) => {
14
- r("onLoaded", s);
15
- }, a = T(() => n.actived);
16
- return y(() => a.value, (s) => {
17
- s && r("onActivated"), s || r("onDeactivated");
18
- }), (s, o) => (I(), N("iframe", {
19
- class: "das-micro-app",
20
- src: n.src,
21
- entry: n.src,
22
- name: n.name,
23
- frameborder: "0",
24
- onLoad: c
25
- }, null, 40, ye));
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);
2
+ import { ref as w, watch as M, reactive as O, getCurrentScope as oe, onScopeDispose as ce, unref as I, getCurrentInstance as le, onMounted as ue, nextTick as Z, defineComponent as x, computed as D, openBlock as E, createElementBlock as N, Fragment as $, renderList as de, withDirectives as pe, createBlock as ee, vShow as me, createCommentVNode as fe, mergeProps as ve, withCtx as C, renderSlot as V, createVNode as F, onActivated as Ae } from "vue";
3
+ import { DasWebLayout as he, DasWebNav as we, DasWebMenu as ge, DasWebTabs as ye } from "@das-fed/web/packages/layout/index";
4
+ const z = w("/das-micro-app"), f = w([]), k = w(!1), R = w([]), T = w(!0);
33
5
  let A = null, h = null, L = null;
34
6
  const b = (e, t, n) => {
35
7
  var c, a, i, s;
@@ -42,12 +14,10 @@ const b = (e, t, n) => {
42
14
  (s = (i = r.dom) == null ? void 0 : i.contentWindow) == null || s.postMessage({ type: t, data: n }, r.entry);
43
15
  }
44
16
  }, q = (e, t) => {
45
- var a;
46
- const { __IN_DAS_MICRO_APP: n, __DAS_MAIN_APP_HREF: r } = window;
47
- if (!n || !r) return;
48
- const { origin: c } = new URL(r);
49
- (a = window.top) == null || a.postMessage({ type: e, data: t }, c);
50
- }, be = () => {
17
+ var r;
18
+ const { origin: n } = new URL(location.href);
19
+ (r = window.top) == null || r.postMessage({ type: e, data: t }, n);
20
+ }, Me = () => {
51
21
  h || (h || (h = {}), window.addEventListener(
52
22
  "message",
53
23
  (e) => {
@@ -58,7 +28,7 @@ const b = (e, t, n) => {
58
28
  },
59
29
  !1
60
30
  ));
61
- }, Ie = () => {
31
+ }, _e = () => {
62
32
  A || (A || (A = {}), window.addEventListener(
63
33
  "message",
64
34
  (e) => {
@@ -69,16 +39,16 @@ const b = (e, t, n) => {
69
39
  },
70
40
  !1
71
41
  ));
72
- }, Ee = (e, t) => {
73
- Ie();
42
+ }, Le = (e, t) => {
43
+ _e();
74
44
  const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8);
75
45
  return A[e] || (A[e] = {}), A[e][n] = t, {
76
46
  remove: () => {
77
47
  A[e] && A[e][n] && delete A[e][n];
78
48
  }
79
49
  };
80
- }, Se = (e, t) => {
81
- be();
50
+ }, be = (e, t) => {
51
+ Me();
82
52
  const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8);
83
53
  return h[e] || (h[e] = {}), h[e][n] = t, {
84
54
  remove: () => {
@@ -88,7 +58,7 @@ const b = (e, t, n) => {
88
58
  }, Q = async (e) => {
89
59
  await Promise.all(
90
60
  f.value.filter((t) => t.loaded).map((t) => new Promise(async (n) => {
91
- t.dom || await new Promise((r) => y(() => t.dom, r)), setTimeout(() => {
61
+ t.dom || await new Promise((r) => M(() => t.dom, r)), setTimeout(() => {
92
62
  b(t.name, "sessionStorage", e), n(!0);
93
63
  }, 0);
94
64
  }))
@@ -114,7 +84,7 @@ const b = (e, t, n) => {
114
84
  },
115
85
  hideMicroApp: async (e) => {
116
86
  const t = f.value.find((n) => n.name === e);
117
- t && t.loaded && (t.dom || await new Promise((n) => y(() => t.dom, n)), b(e, "router", {
87
+ t && t.loaded && (t.dom || await new Promise((n) => M(() => t.dom, n)), b(e, "router", {
118
88
  cmd: "push",
119
89
  route: {
120
90
  name: "das-micro-app-ghost",
@@ -138,7 +108,7 @@ const b = (e, t, n) => {
138
108
  },
139
109
  setMicroAppRoute: async (e, t, n) => {
140
110
  const r = f.value.find((s) => s.name === t);
141
- if (!r || !r.loaded || !r.actived || (r.dom || await new Promise((s) => y(() => r.dom, s)), !r.actived)) return r;
111
+ if (!r || !r.loaded || !r.actived || (r.dom || await new Promise((s) => M(() => r.dom, s)), !r.actived)) return r;
142
112
  const c = n.path || n, a = n.query || {}, i = n.params || {};
143
113
  return e.push({
144
114
  path: `/${t}${c}`,
@@ -156,8 +126,8 @@ const b = (e, t, n) => {
156
126
  },
157
127
  sendMessageToMicroApp: b,
158
128
  sendMessageToMainApp: q,
159
- addEventListenerFromMainApp: Ee,
160
- addEventListenerFromMicroApp: Se,
129
+ addEventListenerFromMainApp: Le,
130
+ addEventListenerFromMicroApp: be,
161
131
  setMainAppOverlay: (e, t) => {
162
132
  q("bodyOverlay", { visible: e, style: t });
163
133
  },
@@ -198,139 +168,16 @@ const b = (e, t, n) => {
198
168
  },
199
169
  reloadMicroAppRoute: async (e, t) => {
200
170
  const n = f.value.find((r) => r.name === e);
201
- n && (!n.loaded || !n.actived || (n.dom || await new Promise((r) => y(() => n.dom, r)), b(e, "route", { cmd: "reload", path: t })));
171
+ n && (!n.loaded || !n.actived || (n.dom || await new Promise((r) => M(() => n.dom, r)), b(e, "route", { cmd: "reload", path: t })));
202
172
  },
203
173
  unloadMicroAppRoute: async (e, t) => {
204
174
  const n = f.value.find((r) => r.name === e);
205
- n && (!n.loaded || !n.actived || (n.dom || await new Promise((r) => y(() => n.dom, r)), b(e, "route", { cmd: "unload", path: t })));
175
+ n && (!n.loaded || !n.actived || (n.dom || await new Promise((r) => M(() => n.dom, r)), b(e, "route", { cmd: "unload", path: t })));
206
176
  },
207
177
  setMainAppLayoutVisible: (e) => {
208
178
  q("layoutVisible", { visible: e });
209
179
  }
210
- }, Pe = /* @__PURE__ */ x({
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({
180
+ }, u = O({
334
181
  visible: !1,
335
182
  logo: "",
336
183
  items: [],
@@ -341,7 +188,7 @@ const b = (e, t, n) => {
341
188
  // activeItem: '',
342
189
  // activeProject: {},
343
190
  eventListeners: {}
344
- }), Ce = {
191
+ }), Ie = {
345
192
  show: () => {
346
193
  u.visible = !0;
347
194
  },
@@ -360,10 +207,14 @@ const b = (e, t, n) => {
360
207
  u.items = t;
361
208
  },
362
209
  appendItem: (e) => {
363
- u.visible || (u.visible = !0), !u.items.find((n) => n.value == e.value) && u.items.push(e);
210
+ setTimeout(() => {
211
+ u.visible || (u.visible = !0), !u.items.find((n) => n.value == e.value) && u.items.push(e);
212
+ }, 200);
364
213
  },
365
214
  setActiveItem: (e) => {
366
- u.activeItem = e;
215
+ setTimeout(() => {
216
+ u.activeItem = e;
217
+ }, 200);
367
218
  },
368
219
  setConfig: (e) => {
369
220
  u.config = e;
@@ -414,23 +265,23 @@ const b = (e, t, n) => {
414
265
  remove: r
415
266
  };
416
267
  }
417
- }, _ = O({
268
+ }, y = O({
418
269
  items: [],
419
270
  eventListeners: {}
420
- }), Fe = {
271
+ }), Ee = {
421
272
  setItems: (e) => {
422
- _.items = e;
273
+ y.items = e;
423
274
  },
424
- getItems: () => _.items,
275
+ getItems: () => y.items,
425
276
  setActiveItem: (e) => {
426
- _.activeItem = e;
277
+ y.activeItem = e;
427
278
  },
428
279
  setPopupClassName: (e) => {
429
- _.popupClassName = e;
280
+ y.popupClassName = e;
430
281
  },
431
282
  triggerEventListener: (e, t, n) => {
432
283
  var i;
433
- const r = _.eventListeners, { autoRemove: c = !1 } = n || {}, a = [];
284
+ const r = y.eventListeners, { autoRemove: c = !1 } = n || {}, a = [];
434
285
  for (const s in r) {
435
286
  const o = r[s];
436
287
  o.type === e && a.push(
@@ -443,9 +294,9 @@ const b = (e, t, n) => {
443
294
  },
444
295
  addEventListener: (e, t) => {
445
296
  const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8), r = () => {
446
- _.eventListeners[n] && delete _.eventListeners[n];
297
+ y.eventListeners[n] && delete y.eventListeners[n];
447
298
  };
448
- return _.eventListeners[n] = {
299
+ return y.eventListeners[n] = {
449
300
  type: e,
450
301
  handler: async (c) => {
451
302
  try {
@@ -462,7 +313,7 @@ const b = (e, t, n) => {
462
313
  }, v = O({
463
314
  items: [],
464
315
  eventListeners: {}
465
- }), Re = {
316
+ }), Se = {
466
317
  setItems: (e) => {
467
318
  v.items = e;
468
319
  },
@@ -511,7 +362,7 @@ const b = (e, t, n) => {
511
362
  }
512
363
  }, P = O({
513
364
  eventListeners: {}
514
- }), De = {
365
+ }), Pe = {
515
366
  triggerEventListener: (e, t, n) => {
516
367
  var i;
517
368
  const r = P.eventListeners, { autoRemove: c = !1 } = n || {}, a = [];
@@ -546,64 +397,69 @@ const b = (e, t, n) => {
546
397
  }, W = O({
547
398
  visible: !1,
548
399
  style: {}
549
- }), Te = {
400
+ }), Oe = {
550
401
  set: (e, t) => {
551
402
  W.visible = e, t || (t = {}), t.transition || (t.transition = "all 0.3s"), t && (W.style = t);
552
403
  }
553
- }, Ne = {
404
+ }, Ce = {
554
405
  nav: u,
555
- menu: _,
406
+ menu: y,
556
407
  tab: v,
557
408
  overlay: W,
558
409
  iframeView: P,
559
410
  visible: w(!0)
560
411
  }, j = {
561
- nav: Ce,
562
- menu: Fe,
563
- tab: Re,
564
- overlay: Te,
565
- iframeView: De,
566
- setVisible: (e) => Ne.visible.value = e
412
+ nav: Ie,
413
+ menu: Ee,
414
+ tab: Se,
415
+ overlay: Oe,
416
+ iframeView: Pe,
417
+ setVisible: (e) => Ce.visible.value = e
418
+ }, te = (e, t) => {
419
+ const n = e.__vccOpts || e;
420
+ for (const [r, c] of t)
421
+ n[r] = c;
422
+ return n;
567
423
  };
568
424
  var H;
569
- const B = typeof window < "u", ke = (e) => typeof e == "string", xe = () => {
425
+ const B = typeof window < "u", Fe = (e) => typeof e == "string", Re = () => {
570
426
  };
571
427
  B && ((H = window == null ? void 0 : window.navigator) != null && H.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
572
- function re(e) {
573
- return typeof e == "function" ? e() : E(e);
428
+ function ne(e) {
429
+ return typeof e == "function" ? e() : I(e);
574
430
  }
575
- function Ve(e) {
431
+ function Te(e) {
576
432
  return e;
577
433
  }
578
- function se(e) {
579
- return me() ? (fe(e), !0) : !1;
434
+ function re(e) {
435
+ return oe() ? (ce(e), !0) : !1;
580
436
  }
581
- function qe(e, t = !0) {
582
- ve() ? Ae(e) : t ? e() : ee(e);
437
+ function De(e, t = !0) {
438
+ le() ? ue(e) : t ? e() : Z(e);
583
439
  }
584
- function ae(e) {
440
+ function se(e) {
585
441
  var t;
586
- const n = re(e);
442
+ const n = ne(e);
587
443
  return (t = n == null ? void 0 : n.$el) != null ? t : n;
588
444
  }
589
- const Qe = B ? window : void 0, We = B ? window.document : void 0;
590
- function Be(...e) {
445
+ const Ne = B ? window : void 0, ke = B ? window.document : void 0;
446
+ function xe(...e) {
591
447
  let t, n, r, c;
592
- if (ke(e[0]) || Array.isArray(e[0]) ? ([n, r, c] = e, t = Qe) : [t, n, r, c] = e, !t)
593
- return xe;
448
+ if (Fe(e[0]) || Array.isArray(e[0]) ? ([n, r, c] = e, t = Ne) : [t, n, r, c] = e, !t)
449
+ return Re;
594
450
  Array.isArray(n) || (n = [n]), Array.isArray(r) || (r = [r]);
595
451
  const a = [], i = () => {
596
452
  a.forEach((l) => l()), a.length = 0;
597
- }, s = (l, g, m, M) => (l.addEventListener(g, m, M), () => l.removeEventListener(g, m, M)), o = y(() => [ae(t), re(c)], ([l, g]) => {
598
- i(), l && a.push(...n.flatMap((m) => r.map((M) => s(l, m, M, g))));
453
+ }, s = (l, g, m, _) => (l.addEventListener(g, m, _), () => l.removeEventListener(g, m, _)), o = M(() => [se(t), ne(c)], ([l, g]) => {
454
+ i(), l && a.push(...n.flatMap((m) => r.map((_) => s(l, m, _, g))));
599
455
  }, { immediate: !0, flush: "post" }), p = () => {
600
456
  o(), i();
601
457
  };
602
- return se(p), p;
458
+ return re(p), p;
603
459
  }
604
- function $e(e, t = !1) {
460
+ function Ve(e, t = !1) {
605
461
  const n = w(), r = () => n.value = !!e();
606
- return r(), qe(r, t), n;
462
+ return r(), De(r, t), n;
607
463
  }
608
464
  const U = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, G = "__vueuse_ssr_handlers__";
609
465
  U[G] = U[G] || {};
@@ -649,10 +505,10 @@ const J = [
649
505
  "MSFullscreenError"
650
506
  ]
651
507
  ];
652
- function ze(e, t = {}) {
653
- const { document: n = We, autoExit: r = !1 } = t, c = n == null ? void 0 : n.querySelector("html"), a = w(!1);
508
+ function qe(e, t = {}) {
509
+ const { document: n = ke, autoExit: r = !1 } = t, c = n == null ? void 0 : n.querySelector("html"), a = w(!1);
654
510
  let i = J[0];
655
- const s = $e(() => {
511
+ const s = Ve(() => {
656
512
  if (n) {
657
513
  for (const S of J)
658
514
  if (S[1] in n)
@@ -664,22 +520,22 @@ function ze(e, t = {}) {
664
520
  async function m() {
665
521
  s.value && (n != null && n[l] && await n[p](), a.value = !1);
666
522
  }
667
- async function M() {
523
+ async function _() {
668
524
  if (!s.value)
669
525
  return;
670
526
  await m();
671
- const S = ae(c);
527
+ const S = se(c);
672
528
  S && (await S[o](), a.value = !0);
673
529
  }
674
530
  async function ie() {
675
- a.value ? await m() : await M();
531
+ a.value ? await m() : await _();
676
532
  }
677
- return n && Be(n, g, () => {
533
+ return n && xe(n, g, () => {
678
534
  a.value = !!(n != null && n[l]);
679
- }, !1), r && se(m), {
535
+ }, !1), r && re(m), {
680
536
  isSupported: s,
681
537
  isFullscreen: a,
682
- enter: M,
538
+ enter: _,
683
539
  exit: m,
684
540
  toggle: ie
685
541
  };
@@ -688,15 +544,15 @@ var K;
688
544
  (function(e) {
689
545
  e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE";
690
546
  })(K || (K = {}));
691
- var je = Object.defineProperty, X = Object.getOwnPropertySymbols, He = Object.prototype.hasOwnProperty, Ue = Object.prototype.propertyIsEnumerable, Y = (e, t, n) => t in e ? je(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Ge = (e, t) => {
547
+ var Qe = Object.defineProperty, X = Object.getOwnPropertySymbols, We = Object.prototype.hasOwnProperty, Be = Object.prototype.propertyIsEnumerable, Y = (e, t, n) => t in e ? Qe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, $e = (e, t) => {
692
548
  for (var n in t || (t = {}))
693
- He.call(t, n) && Y(e, n, t[n]);
549
+ We.call(t, n) && Y(e, n, t[n]);
694
550
  if (X)
695
551
  for (var n of X(t))
696
- Ue.call(t, n) && Y(e, n, t[n]);
552
+ Be.call(t, n) && Y(e, n, t[n]);
697
553
  return e;
698
554
  };
699
- const Je = {
555
+ const ze = {
700
556
  easeInSine: [0.12, 0, 0.39, 0],
701
557
  easeOutSine: [0.61, 1, 0.88, 1],
702
558
  easeInOutSine: [0.37, 0, 0.63, 1],
@@ -722,15 +578,161 @@ const Je = {
722
578
  easeOutBack: [0.34, 1.56, 0.64, 1],
723
579
  easeInOutBack: [0.68, -0.6, 0.32, 1.6]
724
580
  };
725
- Ge({
726
- linear: Ve
727
- }, Je);
728
- const Ke = (e) => ["http://", "https://", "ws://", "wss://", "/"].find((n) => e.startsWith(n)) ? e : `/${e}`, et = (e, t) => {
581
+ $e({
582
+ linear: Te
583
+ }, ze);
584
+ const je = ["src", "entry", "name"], He = /* @__PURE__ */ x({
585
+ __name: "das-micro-app",
586
+ props: {
587
+ src: {},
588
+ name: {},
589
+ actived: { type: Boolean }
590
+ },
591
+ emits: ["onLoaded", "onActivated", "onDeactivated"],
592
+ setup(e, { emit: t }) {
593
+ const n = e, r = t, c = (s) => {
594
+ r("onLoaded", s);
595
+ }, a = D(() => n.actived);
596
+ return M(() => a.value, (s) => {
597
+ s && r("onActivated"), s || r("onDeactivated");
598
+ }), (s, o) => (E(), N("iframe", {
599
+ class: "das-micro-app",
600
+ src: n.src,
601
+ entry: n.src,
602
+ name: n.name,
603
+ frameborder: "0",
604
+ onLoad: c
605
+ }, null, 40, je));
606
+ }
607
+ }), Ue = /* @__PURE__ */ te(He, [["__scopeId", "data-v-8ae871f6"]]), Ge = /* @__PURE__ */ x({
608
+ __name: "das-micro-apps",
609
+ setup(e) {
610
+ const t = w(null), n = async (a, i) => {
611
+ const s = f.value.find((m) => m.name === i);
612
+ if (!s) return;
613
+ s.dom = a.target, await Z(), await new Promise((m) => setTimeout(m, 50));
614
+ const o = () => {
615
+ const m = t.value.getBoundingClientRect() || {};
616
+ return m.width = t.value.clientWidth, m.height = t.value.clientHeight, m;
617
+ };
618
+ d.sendMessageToMicroApp(i, "onLoaded", {
619
+ href: location.href,
620
+ microAppContainerRect: o(),
621
+ entry: s.entry,
622
+ name: s.name
623
+ });
624
+ const { dom: p, ...l } = s;
625
+ d.triggerMicroAppLifeCycleListener("onLoaded", l), new ResizeObserver(() => {
626
+ d.sendMessageToMicroApp(i, "resize", o());
627
+ }).observe(t.value), d.sendMessageToMicroApp(i, "setProxyMessageStatus", { visible: !0, parentHref: location.href }), d.sendMessageToMicroApp(i, "setProxSsoStatus", { visible: !0, parentHref: location.href });
628
+ }, r = (a, i) => {
629
+ const s = f.value.find((l) => l.name === i);
630
+ if (!s) return;
631
+ const { dom: o, ...p } = s;
632
+ d.sendMessageToMicroApp(i, "onActivated"), d.triggerMicroAppLifeCycleListener("onActivated", p);
633
+ }, c = (a, i) => {
634
+ const s = f.value.find((l) => l.name === i);
635
+ if (!s) return;
636
+ const { dom: o, ...p } = s;
637
+ d.sendMessageToMicroApp(i, "onDeactivated"), d.triggerMicroAppLifeCycleListener("onDeactivated", p);
638
+ };
639
+ return (a, i) => (E(), N(
640
+ "div",
641
+ {
642
+ ref_key: "containerRef",
643
+ ref: t,
644
+ class: "das-micro-app-container"
645
+ },
646
+ [
647
+ (E(!0), N(
648
+ $,
649
+ null,
650
+ de(I(f), (s) => (E(), N(
651
+ $,
652
+ null,
653
+ [
654
+ s.loaded ? pe((E(), ee(Ue, {
655
+ key: 0,
656
+ src: s.src || "",
657
+ name: s.name,
658
+ actived: s.actived,
659
+ onOnLoaded: (o) => n(o, s.name),
660
+ onOnActivated: (o) => r(o, s.name),
661
+ onOnDeactivated: (o) => c(o, s.name)
662
+ }, null, 8, ["src", "name", "actived", "onOnLoaded", "onOnActivated", "onOnDeactivated"])), [
663
+ [me, s.actived]
664
+ ]) : fe("v-if", !0)
665
+ ],
666
+ 64
667
+ /* STABLE_FRAGMENT */
668
+ ))),
669
+ 256
670
+ /* UNKEYED_FRAGMENT */
671
+ ))
672
+ ],
673
+ 512
674
+ /* NEED_PATCH */
675
+ ));
676
+ }
677
+ }), Je = /* @__PURE__ */ te(Ge, [["__scopeId", "data-v-3abdb1e9"]]), Ze = /* @__PURE__ */ x({
678
+ __name: "das-main-app-layout",
679
+ props: {
680
+ transitionConfig: { default: () => {
681
+ } },
682
+ showLayout: { type: Boolean, default: !0 },
683
+ showAside: { type: Boolean, default: !0 },
684
+ showTabs: { type: Boolean, default: !0 },
685
+ menuAttr: { default: () => {
686
+ } },
687
+ tabsAttr: { default: () => {
688
+ } }
689
+ },
690
+ setup(e) {
691
+ const t = e, n = D(() => !k.value), r = D(() => ({
692
+ "enter-active-class": "animate__animated animate__fadeInLeft",
693
+ ...t.transitionConfig
694
+ })), c = D(() => ({ showLayout: t.showLayout, showAside: t.showAside, showTabs: t.showTabs }));
695
+ return (a, i) => (E(), ee(I(he), ve({
696
+ "transition-config": r.value,
697
+ "router-view-visible": n.value
698
+ }, c.value), {
699
+ header: C(() => [
700
+ V(a.$slots, "header", {}, () => [
701
+ F(I(we))
702
+ ])
703
+ ]),
704
+ aside: C(() => [
705
+ V(a.$slots, "aside", {}, () => [
706
+ F(I(ge), { menuAttr: a.menuAttr }, null, 8, ["menuAttr"])
707
+ ])
708
+ ]),
709
+ tab: C(() => [
710
+ V(a.$slots, "tab", {}, () => [
711
+ F(I(ye), { tabsAttr: a.tabsAttr }, null, 8, ["tabsAttr"])
712
+ ])
713
+ ]),
714
+ default: C(() => [
715
+ F(Je)
716
+ ]),
717
+ _: 3
718
+ /* FORWARDED */
719
+ }, 16, ["transition-config", "router-view-visible"]));
720
+ }
721
+ }), ae = /* @__PURE__ */ x({
722
+ __name: "das-micro-app-ghost",
723
+ setup(e) {
724
+ return Ae(() => {
725
+ setTimeout(() => {
726
+ document.documentElement.checkVisibility() && history.back();
727
+ }, 300);
728
+ }), (t, n) => null;
729
+ }
730
+ }), Ke = (e) => ["http://", "https://", "ws://", "wss://", "/"].find((n) => e.startsWith(n)) ? e : `/${e}`, et = (e, t) => {
729
731
  if (!(e != null && e.microApps) || !Array.isArray(e.microApps)) return;
730
732
  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: Ke(c.entry || c.name) })), t == null || t.addRoute({
731
733
  name: "das-micro-app",
732
734
  path: `${z.value}/:pathMatch(.*)*`,
733
- component: ne,
735
+ component: ae,
734
736
  meta: { isMicroApp: !0, keepAlive: !0 }
735
737
  }), d.addEventListenerFromMicroApp("bodyOverlay", (c) => {
736
738
  const { visible: a, style: i } = c.data;
@@ -742,7 +744,7 @@ const Ke = (e) => ["http://", "https://", "ws://", "wss://", "/"].find((n) => e.
742
744
  const { name: a, cmd: i, path: s } = c.data;
743
745
  i === "reload" && d.reloadMicroAppRoute(a, s), i === "unload" && d.unloadMicroAppRoute(a, s);
744
746
  });
745
- const { enter: n, exit: r } = ze();
747
+ const { enter: n, exit: r } = qe();
746
748
  d.addEventListenerFromMicroApp("fullscreen", (c) => {
747
749
  const a = c.data;
748
750
  a && n(), a || r();
@@ -757,11 +759,11 @@ const Ke = (e) => ["http://", "https://", "ws://", "wss://", "/"].find((n) => e.
757
759
  t == null || t.addRoute({
758
760
  name: n,
759
761
  path: `/${n}/:pathMatch(.*)*`,
760
- component: ne,
762
+ component: ae,
761
763
  meta: { isMicroApp: !0, keepAlive: !0 }
762
764
  });
763
765
  const r = w(!1), c = w(!1), a = w("");
764
- y(
766
+ M(
765
767
  () => t.currentRoute.value,
766
768
  (i) => {
767
769
  if (r.value) {
@@ -809,10 +811,10 @@ const Ke = (e) => ["http://", "https://", "ws://", "wss://", "/"].find((n) => e.
809
811
  s === "setItem" && window.sessionStorage.setItem(o, p), s === "getItem" && window.sessionStorage.getItem(o), s === "removeItem" && window.sessionStorage.removeItem(o), s === "clear" && window.sessionStorage.clear();
810
812
  }), d.addEventListenerFromMainApp("route", (i) => {
811
813
  const { cmd: s, path: o } = i.data;
812
- s === "reload" && (R.value.push(o), D.value = !1, setTimeout(() => {
813
- D.value = !0, R.value = [];
814
- }, 300)), s === "unload" && (R.value.push(o), D.value = !1, setTimeout(() => {
815
- D.value = !0, R.value = [];
814
+ s === "reload" && (R.value.push(o), T.value = !1, setTimeout(() => {
815
+ T.value = !0, R.value = [];
816
+ }, 300)), s === "unload" && (R.value.push(o), T.value = !1, setTimeout(() => {
817
+ T.value = !0, R.value = [];
816
818
  }, 100));
817
819
  });
818
820
  };