@das-fed/web 6.4.0-dev.9 → 6.4.0-dev.91

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