@das-fed/web 6.4.0-hot.32 → 6.4.0-hot.34

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 (51) hide show
  1. package/{index-BuTRpK6M.js → index-BR2K2L20.js} +1 -1
  2. package/{packages/main-app-framework/index-BTLDhEQV.js → index-CqHbFeJ4.js} +1 -2
  3. package/index-CqHbFeJ4.js.gz +0 -0
  4. package/{index-IEBouahL.js → index-pa8JpqiR.js} +3233 -3637
  5. package/index-pa8JpqiR.js.gz +0 -0
  6. package/index.js +1 -1
  7. package/package.json +6 -6
  8. package/packages/i18n/index.js +10 -8
  9. package/packages/i18n/index.js.gz +0 -0
  10. package/packages/layout/index.js +169 -256
  11. package/packages/layout/index.js.gz +0 -0
  12. package/packages/layout/style.css +1 -1
  13. package/packages/layout/style.css.gz +0 -0
  14. package/packages/main-app-framework/{index-CrLW-KdV.js → index-D-yLFNAt.js} +1 -1
  15. package/packages/main-app-framework/{index-BsIJHNDG.js → index-PIgnnyL3.js} +3588 -3906
  16. package/packages/main-app-framework/index-PIgnnyL3.js.gz +0 -0
  17. package/{index-C4VcBGCZ.js → packages/main-app-framework/index-gbopgvrS.js} +1 -2
  18. package/packages/main-app-framework/index-gbopgvrS.js.gz +0 -0
  19. package/packages/main-app-framework/index.js +1 -1
  20. package/packages/main-app-framework/style.css +1 -1
  21. package/packages/main-app-framework/style.css.gz +0 -0
  22. package/packages/micro-frontend/index.js +213 -214
  23. package/packages/micro-frontend/index.js.gz +0 -0
  24. package/style.css +1 -1
  25. package/style.css.gz +0 -0
  26. package/types/create-das-web-app/index.d.ts +1 -1
  27. package/types/i18n/global.d.ts +10 -0
  28. package/types/i18n/index.d.ts +2 -2
  29. package/types/layout/store/index.d.ts +2 -2
  30. package/types/layout/store/nav.d.ts +1 -1
  31. package/types/main-app-framework/business/alarm/use-alarm.d.ts +4 -4
  32. package/types/main-app-framework/business/video-link/index.d.ts +3 -3
  33. package/types/main-app-framework/business/video-link/video-dialog/hooks/PlayerProvider.d.ts +3 -3
  34. package/types/main-app-framework/components/person-set-dialog/index.d.ts +1 -1
  35. package/types/main-app-framework/components/person-set-dialog/src/components/set-home/api.d.ts +1 -1
  36. package/types/main-app-framework/components/person-set-dialog/src/components/set-home/use-link-form/hooks/use-builtIn-dialog.d.ts +6 -6
  37. package/types/main-app-framework/components/person-set-dialog/src/components/set-home/use-link-form/hooks/use-notBuiltIn-dialog.d.ts +10 -10
  38. package/types/main-app-framework/index.d.ts +2 -2
  39. package/types/main-app-framework/init-config/get-nav-config/index.d.ts +2 -2
  40. package/types/main-app-framework/init-config/get-system-config/index.d.ts +2 -2
  41. package/types/main-app-framework/init-layout/hooks/nav-slots/use-change-enterprises.d.ts +3 -3
  42. package/types/main-app-framework/init-layout/hooks/nav-slots/use-user-command.d.ts +2 -2
  43. package/types/main-app-framework/init-layout/hooks/use-initialization.d.ts +5 -4
  44. package/types/main-app-framework/init-layout/hooks/use-tabs.d.ts +3 -3
  45. package/types/main-app-framework/init-platform/index.d.ts +1 -1
  46. package/types/micro-frontend/store.d.ts +5 -5
  47. package/types/theme/index.d.ts +1 -1
  48. package/index-C4VcBGCZ.js.gz +0 -0
  49. package/index-IEBouahL.js.gz +0 -0
  50. package/packages/main-app-framework/index-BTLDhEQV.js.gz +0 -0
  51. package/packages/main-app-framework/index-BsIJHNDG.js.gz +0 -0
@@ -1,52 +1,70 @@
1
1
  import '@das-fed/web/packages/micro-frontend/style.css';
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";
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
3
  import { DasWebLayout as ye, DasWebNav as Me, DasWebMenu as Le, DasWebTabs as _e } from "@das-fed/web/packages/layout/index";
4
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
- const b = (e, t, n) => {
7
- var c;
8
- const { origin: s } = new URL(location.href);
9
- (c = window.self) == null || c.postMessage({ type: t, data: n }, s);
10
- }, q = (e, t) => {
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(
5
+ let v = null, h = null, _ = null;
6
+ const be = (e) => new Promise((t) => {
7
+ const n = () => {
8
+ if (v != null && v[e]) return t();
9
+ setTimeout(() => n(), 50);
10
+ };
11
+ n();
12
+ }), b = (e, t, n, s) => {
13
+ var i;
14
+ const { awaitListener: c = !1 } = s || {}, { origin: a } = new URL(location.href);
15
+ c ? be(t).then(() => {
16
+ var r;
17
+ (r = window.self) == null || r.postMessage({ type: t, data: n }, a);
18
+ }) : (i = window.self) == null || i.postMessage({ type: t, data: n }, a);
19
+ }, Ie = (e) => new Promise((t) => {
20
+ const n = () => {
21
+ if (h != null && h[e]) return t();
22
+ setTimeout(() => n(), 50);
23
+ };
24
+ n();
25
+ }), q = (e, t, n) => {
26
+ var a;
27
+ const { awaitListener: s = !1 } = n || {}, { origin: c } = new URL(location.href);
28
+ s ? Ie(e).then(() => {
29
+ var i;
30
+ (i = window.self) == null || i.postMessage({ type: e, data: t }, c);
31
+ }) : (a = window.self) == null || a.postMessage({ type: e, data: t }, c);
32
+ }, Ee = () => {
33
+ h || (h || (h = {}), window.addEventListener(
16
34
  "message",
17
35
  (e) => {
18
36
  const { type: t, source: n } = e.data || {};
19
- if (n !== "react-devtools-content-script" && A[t])
20
- for (const s in A[t])
21
- A[t][s](e.data);
37
+ if (n !== "react-devtools-content-script" && h[t])
38
+ for (const s in h[t])
39
+ h[t][s](e.data);
22
40
  },
23
41
  !1
24
42
  ));
25
- }, Ie = () => {
26
- h || (h || (h = {}), window.addEventListener(
43
+ }, Se = () => {
44
+ v || (v || (v = {}), window.addEventListener(
27
45
  "message",
28
46
  (e) => {
29
47
  const { type: t } = e.data || {};
30
- if (h[t])
31
- for (const n in h[t])
32
- h[t][n](e.data);
48
+ if (v[t])
49
+ for (const n in v[t])
50
+ v[t][n](e.data);
33
51
  },
34
52
  !1
35
53
  ));
36
- }, Ee = (e, t) => {
37
- Ie();
54
+ }, Pe = (e, t) => {
55
+ Se();
38
56
  const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8);
39
- return h[e] || (h[e] = {}), h[e][n] = t, {
57
+ return v[e] || (v[e] = {}), v[e][n] = t, {
40
58
  remove: () => {
41
- h[e] && h[e][n] && delete h[e][n];
59
+ v[e] && v[e][n] && delete v[e][n];
42
60
  }
43
61
  };
44
- }, Se = (e, t) => {
45
- be();
62
+ }, Te = (e, t) => {
63
+ Ee();
46
64
  const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8);
47
- return A[e] || (A[e] = {}), A[e][n] = t, {
65
+ return h[e] || (h[e] = {}), h[e][n] = t, {
48
66
  remove: () => {
49
- A[e] && A[e][n] && delete A[e][n];
67
+ h[e] && h[e][n] && delete h[e][n];
50
68
  }
51
69
  };
52
70
  }, Q = async (e) => {
@@ -60,15 +78,15 @@ const b = (e, t, n) => {
60
78
  }, d = {
61
79
  loadMicroApp: (e) => {
62
80
  k.value = !0;
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;
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;
64
82
  if (!s) {
65
83
  n && (n.actived = !1);
66
84
  return;
67
85
  }
68
86
  if (t.isFirstActived = !0, c) {
69
87
  t.src = t.entry;
70
- const o = f.value.find((r) => r.actived);
71
- o && (o.actived = !1), t.loaded = !0, t.actived = !0;
88
+ const i = f.value.find((r) => r.actived);
89
+ i && (i.actived = !1), t.loaded = !0, t.actived = !0;
72
90
  return;
73
91
  }
74
92
  if (!a) {
@@ -103,12 +121,12 @@ const b = (e, t, n) => {
103
121
  setMicroAppRoute: async (e, t, n) => {
104
122
  const s = f.value.find((r) => r.name === t);
105
123
  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 || {};
124
+ const c = n.path || n, a = n.query || {}, i = n.params || {};
107
125
  return e.push({
108
126
  path: `/${t}${c}`,
109
127
  query: a,
110
128
  // @ts-ignore
111
- params: o
129
+ params: i
112
130
  }), setTimeout(() => {
113
131
  const { isFirstActived: r } = s;
114
132
  b(t, "router", {
@@ -120,8 +138,8 @@ const b = (e, t, n) => {
120
138
  },
121
139
  sendMessageToMicroApp: b,
122
140
  sendMessageToMainApp: q,
123
- addEventListenerFromMainApp: Ee,
124
- addEventListenerFromMicroApp: Se,
141
+ addEventListenerFromMainApp: Pe,
142
+ addEventListenerFromMicroApp: Te,
125
143
  setMainAppOverlay: (e, t) => {
126
144
  q("bodyOverlay", { visible: e, style: t });
127
145
  },
@@ -153,8 +171,8 @@ const b = (e, t, n) => {
153
171
  triggerMicroAppLifeCycleListener: (e, t, n) => {
154
172
  var a;
155
173
  const s = _, { autoRemove: c = !1 } = n || {};
156
- for (const o in s) {
157
- const r = s[o];
174
+ for (const i in s) {
175
+ const r = s[i];
158
176
  r.type === e && ((a = r == null ? void 0 : r.handler) == null || a.call(r, t).then(() => {
159
177
  c && r.remove();
160
178
  }));
@@ -171,7 +189,7 @@ const b = (e, t, n) => {
171
189
  setMainAppLayoutVisible: (e) => {
172
190
  q("layoutVisible", { visible: e });
173
191
  }
174
- }, l = C({
192
+ }, l = T({
175
193
  visible: !1,
176
194
  theme: "default",
177
195
  logo: "",
@@ -229,13 +247,13 @@ const b = (e, t, n) => {
229
247
  l.searchConfig = e;
230
248
  },
231
249
  triggerEventListener: (e, t, n) => {
232
- var o;
250
+ var i;
233
251
  const s = l.eventListeners, { autoRemove: c = !1 } = n || {}, a = [];
234
252
  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();
253
+ const o = s[r];
254
+ o.type === e && a.push(
255
+ (i = o == null ? void 0 : o.handler) == null ? void 0 : i.call(o, t).then(() => {
256
+ c && o.remove();
239
257
  })
240
258
  );
241
259
  }
@@ -259,7 +277,7 @@ const b = (e, t, n) => {
259
277
  remove: s
260
278
  };
261
279
  }
262
- }, g = C({
280
+ }, g = T({
263
281
  theme: "default",
264
282
  items: [],
265
283
  collapse: !1,
@@ -282,13 +300,13 @@ const b = (e, t, n) => {
282
300
  g.popupClassName = e;
283
301
  },
284
302
  triggerEventListener: (e, t, n) => {
285
- var o;
303
+ var i;
286
304
  const s = g.eventListeners, { autoRemove: c = !1 } = n || {}, a = [];
287
305
  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();
306
+ const o = s[r];
307
+ o.type === e && a.push(
308
+ (i = o == null ? void 0 : o.handler) == null ? void 0 : i.call(o, t).then(() => {
309
+ c && o.remove();
292
310
  })
293
311
  );
294
312
  }
@@ -312,37 +330,37 @@ const b = (e, t, n) => {
312
330
  remove: s
313
331
  };
314
332
  }
315
- }, v = C({
333
+ }, A = T({
316
334
  theme: "default",
317
335
  items: [],
318
336
  eventListeners: {}
319
337
  }), U = {
320
338
  setItems: (e) => {
321
- v.items = e;
339
+ A.items = e;
322
340
  },
323
- getItems: () => v.items,
341
+ getItems: () => A.items,
324
342
  setTheme: (e) => {
325
- v.theme = e;
343
+ A.theme = e;
326
344
  },
327
345
  removeItem: (e) => {
328
- const t = v.items.filter((n) => n.value !== e);
329
- v.items = t;
346
+ const t = A.items.filter((n) => n.value !== e);
347
+ A.items = t;
330
348
  },
331
349
  appendItem: (e) => {
332
- const t = v.items.findIndex((n) => n.value == e.value);
333
- t !== -1 ? v.items.splice(t, 1, e) : v.items.push(e);
350
+ const t = A.items.findIndex((n) => n.value == e.value);
351
+ t !== -1 ? A.items.splice(t, 1, e) : A.items.push(e);
334
352
  },
335
353
  setActiveItem: (e) => {
336
- v.activeItem = e;
354
+ A.activeItem = e;
337
355
  },
338
356
  triggerEventListener: (e, t, n) => {
339
- var o;
340
- const s = v.eventListeners, { autoRemove: c = !1 } = n || {}, a = [];
357
+ var i;
358
+ const s = A.eventListeners, { autoRemove: c = !1 } = n || {}, a = [];
341
359
  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();
360
+ const o = s[r];
361
+ o.type === e && a.push(
362
+ (i = o == null ? void 0 : o.handler) == null ? void 0 : i.call(o, t).then(() => {
363
+ c && o.remove();
346
364
  })
347
365
  );
348
366
  }
@@ -350,9 +368,9 @@ const b = (e, t, n) => {
350
368
  },
351
369
  addEventListener: (e, t) => {
352
370
  const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8), s = () => {
353
- v.eventListeners[n] && delete v.eventListeners[n];
371
+ A.eventListeners[n] && delete A.eventListeners[n];
354
372
  };
355
- return v.eventListeners[n] = {
373
+ return A.eventListeners[n] = {
356
374
  type: e,
357
375
  handler: async (c) => {
358
376
  try {
@@ -366,17 +384,17 @@ const b = (e, t, n) => {
366
384
  remove: s
367
385
  };
368
386
  }
369
- }, P = C({
387
+ }, P = T({
370
388
  eventListeners: {}
371
- }), Pe = {
389
+ }), Ce = {
372
390
  triggerEventListener: (e, t, n) => {
373
- var o;
391
+ var i;
374
392
  const s = P.eventListeners, { autoRemove: c = !1 } = n || {}, a = [];
375
393
  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();
394
+ const o = s[r];
395
+ o.type === e && a.push(
396
+ (i = o == null ? void 0 : o.handler) == null ? void 0 : i.call(o, t).then(() => {
397
+ c && o.remove();
380
398
  })
381
399
  );
382
400
  }
@@ -400,17 +418,17 @@ const b = (e, t, n) => {
400
418
  remove: s
401
419
  };
402
420
  }
403
- }, B = C({
421
+ }, B = T({
404
422
  visible: !1,
405
423
  style: {}
406
- }), Ce = {
424
+ }), Oe = {
407
425
  set: (e, t) => {
408
426
  B.visible = e, t || (t = {}), t.transition || (t.transition = "all 0.3s"), t && (B.style = t);
409
427
  }
410
- }, Oe = {
428
+ }, Fe = {
411
429
  nav: l,
412
430
  menu: g,
413
- tab: v,
431
+ tab: A,
414
432
  overlay: B,
415
433
  iframeView: P,
416
434
  visible: w(!0)
@@ -418,9 +436,9 @@ const b = (e, t, n) => {
418
436
  nav: j,
419
437
  menu: H,
420
438
  tab: U,
421
- overlay: Ce,
422
- iframeView: Pe,
423
- setVisible: (e) => Oe.visible.value = e,
439
+ overlay: Oe,
440
+ iframeView: Ce,
441
+ setVisible: (e) => Fe.visible.value = e,
424
442
  setTheme: (e) => {
425
443
  j.setTheme(e), H.setTheme(e), U.setTheme(e);
426
444
  }
@@ -431,19 +449,19 @@ const b = (e, t, n) => {
431
449
  return n;
432
450
  };
433
451
  var J;
434
- const $ = typeof window < "u", Te = (e) => typeof e == "string", Fe = () => {
452
+ const $ = typeof window < "u", Re = (e) => typeof e == "string", Ne = () => {
435
453
  };
436
454
  $ && ((J = window == null ? void 0 : window.navigator) != null && J.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
437
455
  function ae(e) {
438
456
  return typeof e == "function" ? e() : I(e);
439
457
  }
440
- function Re(e) {
458
+ function De(e) {
441
459
  return e;
442
460
  }
443
461
  function ie(e) {
444
462
  return ue() ? (de(e), !0) : !1;
445
463
  }
446
- function De(e, t = !0) {
464
+ function ke(e, t = !0) {
447
465
  pe() ? me(e) : t ? e() : ne(e);
448
466
  }
449
467
  function oe(e) {
@@ -451,24 +469,24 @@ function oe(e) {
451
469
  const n = ae(e);
452
470
  return (t = n == null ? void 0 : n.$el) != null ? t : n;
453
471
  }
454
- const Ne = $ ? window : void 0, ke = $ ? window.document : void 0;
455
- function xe(...e) {
472
+ const xe = $ ? window : void 0, Ve = $ ? window.document : void 0;
473
+ function qe(...e) {
456
474
  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;
475
+ if (Re(e[0]) || Array.isArray(e[0]) ? ([n, s, c] = e, t = xe) : [t, n, s, c] = e, !t)
476
+ return Ne;
459
477
  Array.isArray(n) || (n = [n]), Array.isArray(s) || (s = [s]);
460
- const a = [], o = () => {
478
+ const a = [], i = () => {
461
479
  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))));
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))));
464
482
  }, { immediate: !0, flush: "post" }), p = () => {
465
- i(), o();
483
+ o(), i();
466
484
  };
467
485
  return ie(p), p;
468
486
  }
469
- function Ve(e, t = !1) {
487
+ function Qe(e, t = !1) {
470
488
  const n = w(), s = () => n.value = !!e();
471
- return s(), De(s, t), n;
489
+ return s(), ke(s, t), n;
472
490
  }
473
491
  const K = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, X = "__vueuse_ssr_handlers__";
474
492
  K[X] = K[X] || {};
@@ -514,18 +532,18 @@ const Y = [
514
532
  "MSFullscreenError"
515
533
  ]
516
534
  ];
517
- function qe(e, t = {}) {
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(() => {
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(() => {
521
539
  if (n) {
522
540
  for (const S of Y)
523
541
  if (S[1] in n)
524
- return o = S, !0;
542
+ return i = S, !0;
525
543
  } else
526
544
  return !1;
527
545
  return !1;
528
- }), [i, p, u, , y] = o;
546
+ }), [o, p, u, , y] = i;
529
547
  async function m() {
530
548
  r.value && (n != null && n[u] && await n[p](), a.value = !1);
531
549
  }
@@ -534,12 +552,12 @@ function qe(e, t = {}) {
534
552
  return;
535
553
  await m();
536
554
  const S = oe(c);
537
- S && (await S[i](), a.value = !0);
555
+ S && (await S[o](), a.value = !0);
538
556
  }
539
557
  async function le() {
540
558
  a.value ? await m() : await L();
541
559
  }
542
- return n && xe(n, y, () => {
560
+ return n && qe(n, y, () => {
543
561
  a.value = !!(n != null && n[u]);
544
562
  }, !1), s && ie(m), {
545
563
  isSupported: r,
@@ -553,15 +571,15 @@ var Z;
553
571
  (function(e) {
554
572
  e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE";
555
573
  })(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) => {
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) => {
557
575
  for (var n in t || (t = {}))
558
- Be.call(t, n) && te(e, n, t[n]);
576
+ ze.call(t, n) && te(e, n, t[n]);
559
577
  if (ee)
560
578
  for (var n of ee(t))
561
- $e.call(t, n) && te(e, n, t[n]);
579
+ We.call(t, n) && te(e, n, t[n]);
562
580
  return e;
563
581
  };
564
- const We = {
582
+ const He = {
565
583
  easeInSine: [0.12, 0, 0.39, 0],
566
584
  easeOutSine: [0.61, 1, 0.88, 1],
567
585
  easeInOutSine: [0.37, 0, 0.63, 1],
@@ -587,10 +605,10 @@ const We = {
587
605
  easeOutBack: [0.34, 1.56, 0.64, 1],
588
606
  easeInOutBack: [0.68, -0.6, 0.32, 1.6]
589
607
  };
590
- ze({
591
- linear: Re
592
- }, We);
593
- const je = ["src", "entry", "name"], He = /* @__PURE__ */ x({
608
+ je({
609
+ linear: De
610
+ }, He);
611
+ const Ue = ["src", "entry", "name"], Ge = /* @__PURE__ */ x({
594
612
  __name: "das-micro-app",
595
613
  props: {
596
614
  src: {},
@@ -601,89 +619,71 @@ const je = ["src", "entry", "name"], He = /* @__PURE__ */ x({
601
619
  setup(e, { emit: t }) {
602
620
  const n = e, s = t, c = (r) => {
603
621
  s("onLoaded", r);
604
- }, a = D(() => n.actived);
622
+ }, a = N(() => n.actived);
605
623
  return M(() => a.value, (r) => {
606
624
  r && s("onActivated"), r || s("onDeactivated");
607
- }), (r, i) => (E(), N("iframe", {
625
+ }), (r, o) => (E(), D("iframe", {
608
626
  class: "das-micro-app",
609
627
  src: n.src,
610
628
  entry: n.src,
611
629
  name: n.name,
612
630
  frameborder: "0",
613
631
  onLoad: c
614
- }, null, 40, je));
632
+ }, null, 40, Ue));
615
633
  }
616
- }), Ue = /* @__PURE__ */ re(He, [["__scopeId", "data-v-8ae871f6"]]), Ge = /* @__PURE__ */ x({
634
+ }), Je = /* @__PURE__ */ re(Ge, [["__scopeId", "data-v-8ae871f6"]]), Ke = /* @__PURE__ */ x({
617
635
  __name: "das-micro-apps",
618
636
  setup(e) {
619
- const t = w(null), n = async (a, o) => {
620
- const r = f.value.find((m) => m.name === o);
637
+ const t = w(null), n = async (a, i) => {
638
+ const r = f.value.find((m) => m.name === i);
621
639
  if (!r) return;
622
640
  r.dom = a.target, await ne(), await new Promise((m) => setTimeout(m, 50));
623
- const i = () => {
641
+ const o = () => {
624
642
  const m = t.value.getBoundingClientRect() || {};
625
643
  return m.width = t.value.clientWidth, m.height = t.value.clientHeight, m;
626
644
  };
627
- d.sendMessageToMicroApp(o, "onLoaded", {
645
+ d.sendMessageToMicroApp(i, "onLoaded", {
628
646
  href: location.href,
629
- microAppContainerRect: i(),
647
+ microAppContainerRect: o(),
630
648
  entry: r.entry,
631
649
  name: r.name
632
650
  });
633
651
  const { dom: p, ...u } = r;
634
652
  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);
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);
639
657
  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);
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);
644
662
  if (!r) return;
645
- const { dom: i, ...p } = r;
646
- d.sendMessageToMicroApp(o, "onDeactivated"), d.triggerMicroAppLifeCycleListener("onDeactivated", p);
663
+ const { dom: o, ...p } = r;
664
+ d.sendMessageToMicroApp(i, "onDeactivated"), d.triggerMicroAppLifeCycleListener("onDeactivated", p);
647
665
  };
648
- return (a, o) => (E(), N(
649
- "div",
650
- {
651
- ref_key: "containerRef",
652
- ref: t,
653
- class: "das-micro-app-container"
654
- },
655
- [
656
- (E(!0), N(
657
- z,
658
- null,
659
- fe(I(f), (r) => (E(), N(
660
- z,
661
- null,
662
- [
663
- r.loaded ? ve((E(), se(Ue, {
664
- key: 0,
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)
671
- }, null, 8, ["src", "name", "actived", "onOnLoaded", "onOnActivated", "onOnDeactivated"])), [
672
- [he, r.actived]
673
- ]) : Ae("v-if", !0)
674
- ],
675
- 64
676
- /* STABLE_FRAGMENT */
677
- ))),
678
- 256
679
- /* UNKEYED_FRAGMENT */
680
- ))
681
- ],
682
- 512
683
- /* NEED_PATCH */
684
- ));
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
685
  }
686
- }), Je = /* @__PURE__ */ re(Ge, [["__scopeId", "data-v-3abdb1e9"]]), Ze = /* @__PURE__ */ x({
686
+ }), Xe = /* @__PURE__ */ re(Ke, [["__scopeId", "data-v-3abdb1e9"]]), tt = /* @__PURE__ */ x({
687
687
  __name: "das-main-app-layout",
688
688
  props: {
689
689
  transitionConfig: { default: () => {
@@ -697,34 +697,33 @@ const je = ["src", "entry", "name"], He = /* @__PURE__ */ x({
697
697
  } }
698
698
  },
699
699
  setup(e) {
700
- const t = e, n = D(() => !k.value), s = D(() => ({
700
+ const t = e, n = N(() => !k.value), s = N(() => ({
701
701
  "enter-active-class": "animate__animated animate__fadeInLeft",
702
702
  ...t.transitionConfig
703
- })), c = D(() => ({ showLayout: t.showLayout, showAside: t.showAside, showTabs: t.showTabs }));
704
- return (a, o) => (E(), se(I(ye), we({
703
+ })), c = N(() => ({ showLayout: t.showLayout, showAside: t.showAside, showTabs: t.showTabs }));
704
+ return (a, i) => (E(), se(I(ye), we({
705
705
  "transition-config": s.value,
706
706
  "router-view-visible": n.value
707
707
  }, c.value), {
708
- header: O(() => [
708
+ header: C(() => [
709
709
  V(a.$slots, "header", {}, () => [
710
- T(I(Me))
710
+ O(I(Me))
711
711
  ])
712
712
  ]),
713
- aside: O(() => [
713
+ aside: C(() => [
714
714
  V(a.$slots, "aside", {}, () => [
715
- T(I(Le), { menuAttr: a.menuAttr }, null, 8, ["menuAttr"])
715
+ O(I(Le), { menuAttr: a.menuAttr }, null, 8, ["menuAttr"])
716
716
  ])
717
717
  ]),
718
- tab: O(() => [
718
+ tab: C(() => [
719
719
  V(a.$slots, "tab", {}, () => [
720
- T(I(_e), { tabsAttr: a.tabsAttr }, null, 8, ["tabsAttr"])
720
+ O(I(_e), { tabsAttr: a.tabsAttr }, null, 8, ["tabsAttr"])
721
721
  ])
722
722
  ]),
723
- default: O(() => [
724
- T(Je)
723
+ default: C(() => [
724
+ O(Xe)
725
725
  ]),
726
726
  _: 3
727
- /* FORWARDED */
728
727
  }, 16, ["transition-config", "router-view-visible"]));
729
728
  }
730
729
  }), ce = /* @__PURE__ */ x({
@@ -736,32 +735,32 @@ const je = ["src", "entry", "name"], He = /* @__PURE__ */ x({
736
735
  }, 300);
737
736
  }), (t, n) => null;
738
737
  }
739
- }), Ke = (e) => ["http://", "https://", "ws://", "wss://", "/"].find((n) => e.startsWith(n)) ? e : `/${e}`, et = (e, t) => {
738
+ }), Ye = (e) => ["http://", "https://", "ws://", "wss://", "/"].find((n) => e.startsWith(n)) ? e : `/${e}`, nt = (e, t) => {
740
739
  if (!(e != null && e.microApps) || !Array.isArray(e.microApps)) return;
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({
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({
742
741
  name: "das-micro-app",
743
742
  path: `${W.value}/:pathMatch(.*)*`,
744
743
  component: ce,
745
744
  meta: { isMicroApp: !0, keepAlive: !0 }
746
745
  }), d.addEventListenerFromMicroApp("bodyOverlay", (c) => {
747
- const { visible: a, style: o } = c.data;
748
- G.overlay.set(a, o);
746
+ const { visible: a, style: i } = c.data;
747
+ G.overlay.set(a, i);
749
748
  }), d.addEventListenerFromMicroApp("layoutVisible", (c) => {
750
749
  const { visible: a } = c.data;
751
750
  G.setVisible(a);
752
751
  }), d.addEventListenerFromMicroApp("route", (c) => {
753
- const { name: a, cmd: o, path: r } = c.data;
754
- o === "reload" && d.reloadMicroAppRoute(a, r), o === "unload" && d.unloadMicroAppRoute(a, r);
752
+ const { name: a, cmd: i, path: r } = c.data;
753
+ i === "reload" && d.reloadMicroAppRoute(a, r), i === "unload" && d.unloadMicroAppRoute(a, r);
755
754
  });
756
- const { enter: n, exit: s } = qe();
755
+ const { enter: n, exit: s } = Be();
757
756
  d.addEventListenerFromMicroApp("fullscreen", (c) => {
758
757
  const a = c.data;
759
758
  a && n(), a || s();
760
759
  }), d.addEventListenerFromMicroApp("location", (c) => {
761
- const { cmd: a, isAutoCloseApp: o } = c.data || {};
762
- a === "reload" && (o !== void 0 && (window.__isAutoCloseApp = o), location.reload());
760
+ const { cmd: a, isAutoCloseApp: i } = c.data || {};
761
+ a === "reload" && (i !== void 0 && (window.__isAutoCloseApp = i), location.reload());
763
762
  });
764
- }, tt = (e, t) => {
763
+ }, st = (e, t) => {
765
764
  if (!(e != null && e.microAppName)) return;
766
765
  window.config.microAppName = e.microAppName, window.self !== window.top && e.microAppName && (window.__IN_DAS_MICRO_APP = !0);
767
766
  const n = "das-micro-app-ghost";
@@ -774,7 +773,7 @@ const je = ["src", "entry", "name"], He = /* @__PURE__ */ x({
774
773
  const s = w(!1), c = w(!1), a = w("");
775
774
  M(
776
775
  () => t.currentRoute.value,
777
- (o) => {
776
+ (i) => {
778
777
  if (s.value) {
779
778
  s.value = !1;
780
779
  return;
@@ -783,8 +782,8 @@ const je = ["src", "entry", "name"], He = /* @__PURE__ */ x({
783
782
  c.value = !1;
784
783
  return;
785
784
  }
786
- const { path: r, query: i, params: p, meta: u } = o;
787
- if (a.value.includes(o.path)) {
785
+ const { path: r, query: o, params: p, meta: u } = i;
786
+ if (a.value.includes(i.path)) {
788
787
  a.value = "";
789
788
  return;
790
789
  }
@@ -792,44 +791,44 @@ const je = ["src", "entry", "name"], He = /* @__PURE__ */ x({
792
791
  cmd: "push",
793
792
  route: {
794
793
  path: r,
795
- query: { ...i, microAppName: e.microAppName },
794
+ query: { ...o, microAppName: e.microAppName },
796
795
  params: p,
797
796
  meta: u
798
797
  }
799
798
  });
800
799
  }
801
- ), d.addEventListenerFromMainApp("router", async (o) => {
800
+ ), d.addEventListenerFromMainApp("router", async (i) => {
802
801
  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;
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);
804
+ }), d.addEventListenerFromMainApp("onLoaded", (i) => {
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;
807
+ }), d.addEventListenerFromMainApp("onDeactivated", (i) => {
808
+ const { name: r = "", path: o, params: p = {}, query: u = {} } = t.currentRoute.value;
810
809
  c.value = !0, t == null || t.push({
811
810
  name: n,
812
- query: { microAppName: e.microAppName, fromQuery: JSON.stringify(u), fromPath: i },
811
+ query: { microAppName: e.microAppName, fromQuery: JSON.stringify(u), fromPath: o },
813
812
  params: p
814
813
  });
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(() => {
814
+ }), d.addEventListenerFromMainApp("onActivated", (i) => {
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 });
817
+ }), d.addEventListenerFromMainApp("sessionStorage", (i) => {
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();
820
+ }), d.addEventListenerFromMainApp("route", (i) => {
821
+ const { cmd: r, path: o } = i.data;
822
+ r === "reload" && (F.value.push(o), R.value = !1, setTimeout(() => {
824
823
  R.value = !0, F.value = [];
825
- }, 300)), r === "unload" && (F.value.push(i), R.value = !1, setTimeout(() => {
824
+ }, 300)), r === "unload" && (F.value.push(o), R.value = !1, setTimeout(() => {
826
825
  R.value = !0, F.value = [];
827
826
  }, 100));
828
827
  });
829
828
  };
830
829
  export {
831
- Ze as DasMainAppLayout,
832
- et as initMainApp,
833
- tt as initMicroApp,
830
+ tt as DasMainAppLayout,
831
+ nt as initMainApp,
832
+ st as initMicroApp,
834
833
  d as microFrontend
835
834
  };