@das-fed/web 6.4.0-dev.12 → 6.4.0-dev.121

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