@das-fed/web 6.3.0-beta.0 → 6.3.0-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm-map.json +27 -0
- package/index.js +2078 -9818
- package/index.js.gz +0 -0
- package/package.json +32 -16
- package/packages/create-das-web-app/index.js +799 -0
- package/packages/create-das-web-app/index.js.gz +0 -0
- package/packages/i18n/index.js +35 -0
- package/packages/layout/index.js +736 -0
- package/packages/layout/index.js.gz +0 -0
- package/packages/layout/style.css +7 -0
- package/packages/layout/style.css.gz +0 -0
- package/packages/micro-frontend/index.js +820 -0
- package/packages/micro-frontend/index.js.gz +0 -0
- package/packages/micro-frontend/style.css +1 -0
- package/packages/style/index.js +2 -0
- package/packages/style/style.css +1 -0
- package/packages/style/style.css.gz +0 -0
- package/packages/theme/index.js +76 -0
- package/packages/theme/index.js.gz +0 -0
- package/style.css +2 -2
- package/style.css.gz +0 -0
- package/types/create-das-web-app/get-global-config.d.ts +2 -0
- package/types/create-das-web-app/index.d.ts +9 -0
- package/types/create-das-web-app/plugins/index.d.ts +4 -0
- package/types/create-das-web-app/router/index.d.ts +4 -0
- package/types/create-das-web-app/store/index.d.ts +2 -0
- package/types/i18n/index.d.ts +21 -0
- package/types/index.d.ts +5 -0
- package/types/layout/index.d.ts +5 -0
- package/types/layout/store/iframe-view.d.ts +12 -0
- package/types/layout/store/index.d.ts +70 -0
- package/types/layout/store/menu.d.ts +16 -0
- package/types/layout/store/nav.d.ts +26 -0
- package/types/layout/store/overlay.d.ts +5 -0
- package/types/layout/store/tab.d.ts +17 -0
- package/types/micro-frontend/bus.d.ts +33 -0
- package/types/micro-frontend/index.d.ts +7 -0
- package/types/micro-frontend/store.d.ts +5 -0
- package/types/theme/index.d.ts +13 -0
- package/index.umd.cjs +0 -41
|
@@ -0,0 +1,799 @@
|
|
|
1
|
+
import { effectScope as K, ref as D, markRaw as U, toRaw as $, watch as q, unref as X, createApp as Z } from "vue";
|
|
2
|
+
import { initTheme as ee } from "@das-fed/web/packages/theme/index";
|
|
3
|
+
import { initI18n as te } from "@das-fed/web/packages/i18n/index";
|
|
4
|
+
import { initMainApp as ne, initMicroApp as re } from "@das-fed/web/packages/micro-frontend/index";
|
|
5
|
+
import { DasWebLayout as oe } from "@das-fed/web/packages/layout/index";
|
|
6
|
+
import { createRouter as se, createWebHistory as ie } from "vue-router";
|
|
7
|
+
const ae = {
|
|
8
|
+
install: (e, t) => {
|
|
9
|
+
var n;
|
|
10
|
+
const r = (n = t == null ? void 0 : t.plugins) == null ? void 0 : n.glob;
|
|
11
|
+
r && Object.values(r).sort((o, a) => (o.index ?? 0) - (a.index ?? 0)).filter((o) => o ? !!(o.default && o.default.install || o.install) : !1).forEach((o) => {
|
|
12
|
+
o.default && o.default.install && e.use(o.default, t), o.install && e.use(o, t);
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
var ce = !1;
|
|
17
|
+
function le() {
|
|
18
|
+
return C().__VUE_DEVTOOLS_GLOBAL_HOOK__;
|
|
19
|
+
}
|
|
20
|
+
function C() {
|
|
21
|
+
return typeof navigator < "u" && typeof window < "u" ? window : typeof globalThis < "u" ? globalThis : {};
|
|
22
|
+
}
|
|
23
|
+
const ue = typeof Proxy == "function", fe = "devtools-plugin:setup", de = "plugin:settings:set";
|
|
24
|
+
let b, E;
|
|
25
|
+
function ge() {
|
|
26
|
+
var e;
|
|
27
|
+
return b !== void 0 || (typeof window < "u" && window.performance ? (b = !0, E = window.performance) : typeof globalThis < "u" && (!((e = globalThis.perf_hooks) === null || e === void 0) && e.performance) ? (b = !0, E = globalThis.perf_hooks.performance) : b = !1), b;
|
|
28
|
+
}
|
|
29
|
+
function he() {
|
|
30
|
+
return ge() ? E.now() : Date.now();
|
|
31
|
+
}
|
|
32
|
+
class pe {
|
|
33
|
+
constructor(t, r) {
|
|
34
|
+
this.target = null, this.targetQueue = [], this.onQueue = [], this.plugin = t, this.hook = r;
|
|
35
|
+
const n = {};
|
|
36
|
+
if (t.settings)
|
|
37
|
+
for (const s in t.settings) {
|
|
38
|
+
const i = t.settings[s];
|
|
39
|
+
n[s] = i.defaultValue;
|
|
40
|
+
}
|
|
41
|
+
const o = `__vue-devtools-plugin-settings__${t.id}`;
|
|
42
|
+
let a = Object.assign({}, n);
|
|
43
|
+
try {
|
|
44
|
+
const s = localStorage.getItem(o), i = JSON.parse(s);
|
|
45
|
+
Object.assign(a, i);
|
|
46
|
+
} catch {
|
|
47
|
+
}
|
|
48
|
+
this.fallbacks = {
|
|
49
|
+
getSettings() {
|
|
50
|
+
return a;
|
|
51
|
+
},
|
|
52
|
+
setSettings(s) {
|
|
53
|
+
try {
|
|
54
|
+
localStorage.setItem(o, JSON.stringify(s));
|
|
55
|
+
} catch {
|
|
56
|
+
}
|
|
57
|
+
a = s;
|
|
58
|
+
},
|
|
59
|
+
now() {
|
|
60
|
+
return he();
|
|
61
|
+
}
|
|
62
|
+
}, r && r.on(de, (s, i) => {
|
|
63
|
+
s === this.plugin.id && this.fallbacks.setSettings(i);
|
|
64
|
+
}), this.proxiedOn = new Proxy({}, {
|
|
65
|
+
get: (s, i) => this.target ? this.target.on[i] : (...c) => {
|
|
66
|
+
this.onQueue.push({
|
|
67
|
+
method: i,
|
|
68
|
+
args: c
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
}), this.proxiedTarget = new Proxy({}, {
|
|
72
|
+
get: (s, i) => this.target ? this.target[i] : i === "on" ? this.proxiedOn : Object.keys(this.fallbacks).includes(i) ? (...c) => (this.targetQueue.push({
|
|
73
|
+
method: i,
|
|
74
|
+
args: c,
|
|
75
|
+
resolve: () => {
|
|
76
|
+
}
|
|
77
|
+
}), this.fallbacks[i](...c)) : (...c) => new Promise((l) => {
|
|
78
|
+
this.targetQueue.push({
|
|
79
|
+
method: i,
|
|
80
|
+
args: c,
|
|
81
|
+
resolve: l
|
|
82
|
+
});
|
|
83
|
+
})
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
async setRealTarget(t) {
|
|
87
|
+
this.target = t;
|
|
88
|
+
for (const r of this.onQueue)
|
|
89
|
+
this.target.on[r.method](...r.args);
|
|
90
|
+
for (const r of this.targetQueue)
|
|
91
|
+
r.resolve(await this.target[r.method](...r.args));
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
function M(e, t) {
|
|
95
|
+
const r = e, n = C(), o = le(), a = ue && r.enableEarlyProxy;
|
|
96
|
+
if (o && (n.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !a))
|
|
97
|
+
o.emit(fe, e, t);
|
|
98
|
+
else {
|
|
99
|
+
const s = a ? new pe(r, o) : null;
|
|
100
|
+
(n.__VUE_DEVTOOLS_PLUGINS__ = n.__VUE_DEVTOOLS_PLUGINS__ || []).push({
|
|
101
|
+
pluginDescriptor: r,
|
|
102
|
+
setupFn: t,
|
|
103
|
+
proxy: s
|
|
104
|
+
}), s && t(s.proxiedTarget);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
/*!
|
|
108
|
+
* pinia v2.1.7
|
|
109
|
+
* (c) 2023 Eduardo San Martin Morote
|
|
110
|
+
* @license MIT
|
|
111
|
+
*/
|
|
112
|
+
const me = process.env.NODE_ENV !== "production" ? Symbol("pinia") : (
|
|
113
|
+
/* istanbul ignore next */
|
|
114
|
+
Symbol()
|
|
115
|
+
);
|
|
116
|
+
var y;
|
|
117
|
+
(function(e) {
|
|
118
|
+
e.direct = "direct", e.patchObject = "patch object", e.patchFunction = "patch function";
|
|
119
|
+
})(y || (y = {}));
|
|
120
|
+
const G = typeof window < "u", L = (process.env.NODE_ENV !== "production" || !1) && process.env.NODE_ENV !== "test" && G, R = typeof window == "object" && window.window === window ? window : typeof self == "object" && self.self === self ? self : typeof global == "object" && global.global === global ? global : typeof globalThis == "object" ? globalThis : { HTMLElement: null };
|
|
121
|
+
function _e(e, { autoBom: t = !1 } = {}) {
|
|
122
|
+
return t && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type) ? new Blob(["\uFEFF", e], { type: e.type }) : e;
|
|
123
|
+
}
|
|
124
|
+
function P(e, t, r) {
|
|
125
|
+
const n = new XMLHttpRequest();
|
|
126
|
+
n.open("GET", e), n.responseType = "blob", n.onload = function() {
|
|
127
|
+
B(n.response, t, r);
|
|
128
|
+
}, n.onerror = function() {
|
|
129
|
+
}, n.send();
|
|
130
|
+
}
|
|
131
|
+
function F(e) {
|
|
132
|
+
const t = new XMLHttpRequest();
|
|
133
|
+
t.open("HEAD", e, !1);
|
|
134
|
+
try {
|
|
135
|
+
t.send();
|
|
136
|
+
} catch {
|
|
137
|
+
}
|
|
138
|
+
return t.status >= 200 && t.status <= 299;
|
|
139
|
+
}
|
|
140
|
+
function v(e) {
|
|
141
|
+
try {
|
|
142
|
+
e.dispatchEvent(new MouseEvent("click"));
|
|
143
|
+
} catch {
|
|
144
|
+
const r = document.createEvent("MouseEvents");
|
|
145
|
+
r.initMouseEvent("click", !0, !0, window, 0, 0, 0, 80, 20, !1, !1, !1, !1, 0, null), e.dispatchEvent(r);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
const w = typeof navigator == "object" ? navigator : { userAgent: "" }, H = /Macintosh/.test(w.userAgent) && /AppleWebKit/.test(w.userAgent) && !/Safari/.test(w.userAgent), B = G ? (
|
|
149
|
+
// Use download attribute first if possible (#193 Lumia mobile) unless this is a macOS WebView or mini program
|
|
150
|
+
typeof HTMLAnchorElement < "u" && "download" in HTMLAnchorElement.prototype && !H ? ye : (
|
|
151
|
+
// Use msSaveOrOpenBlob as a second approach
|
|
152
|
+
"msSaveOrOpenBlob" in w ? be : (
|
|
153
|
+
// Fallback to using FileReader and a popup
|
|
154
|
+
Se
|
|
155
|
+
)
|
|
156
|
+
)
|
|
157
|
+
) : () => {
|
|
158
|
+
};
|
|
159
|
+
function ye(e, t = "download", r) {
|
|
160
|
+
const n = document.createElement("a");
|
|
161
|
+
n.download = t, n.rel = "noopener", typeof e == "string" ? (n.href = e, n.origin !== location.origin ? F(n.href) ? P(e, t, r) : (n.target = "_blank", v(n)) : v(n)) : (n.href = URL.createObjectURL(e), setTimeout(function() {
|
|
162
|
+
URL.revokeObjectURL(n.href);
|
|
163
|
+
}, 4e4), setTimeout(function() {
|
|
164
|
+
v(n);
|
|
165
|
+
}, 0));
|
|
166
|
+
}
|
|
167
|
+
function be(e, t = "download", r) {
|
|
168
|
+
if (typeof e == "string")
|
|
169
|
+
if (F(e))
|
|
170
|
+
P(e, t, r);
|
|
171
|
+
else {
|
|
172
|
+
const n = document.createElement("a");
|
|
173
|
+
n.href = e, n.target = "_blank", setTimeout(function() {
|
|
174
|
+
v(n);
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
else
|
|
178
|
+
navigator.msSaveOrOpenBlob(_e(e, r), t);
|
|
179
|
+
}
|
|
180
|
+
function Se(e, t, r, n) {
|
|
181
|
+
if (n = n || open("", "_blank"), n && (n.document.title = n.document.body.innerText = "downloading..."), typeof e == "string")
|
|
182
|
+
return P(e, t, r);
|
|
183
|
+
const o = e.type === "application/octet-stream", a = /constructor/i.test(String(R.HTMLElement)) || "safari" in R, s = /CriOS\/[\d]+/.test(navigator.userAgent);
|
|
184
|
+
if ((s || o && a || H) && typeof FileReader < "u") {
|
|
185
|
+
const i = new FileReader();
|
|
186
|
+
i.onloadend = function() {
|
|
187
|
+
let c = i.result;
|
|
188
|
+
if (typeof c != "string")
|
|
189
|
+
throw n = null, new Error("Wrong reader.result type");
|
|
190
|
+
c = s ? c : c.replace(/^data:[^;]*;/, "data:attachment/file;"), n ? n.location.href = c : location.assign(c), n = null;
|
|
191
|
+
}, i.readAsDataURL(e);
|
|
192
|
+
} else {
|
|
193
|
+
const i = URL.createObjectURL(e);
|
|
194
|
+
n ? n.location.assign(i) : location.href = i, n = null, setTimeout(function() {
|
|
195
|
+
URL.revokeObjectURL(i);
|
|
196
|
+
}, 4e4);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
function u(e, t) {
|
|
200
|
+
const r = "🍍 " + e;
|
|
201
|
+
typeof __VUE_DEVTOOLS_TOAST__ == "function" && __VUE_DEVTOOLS_TOAST__(r, t);
|
|
202
|
+
}
|
|
203
|
+
function k(e) {
|
|
204
|
+
return "_a" in e && "install" in e;
|
|
205
|
+
}
|
|
206
|
+
function J() {
|
|
207
|
+
if (!("clipboard" in navigator))
|
|
208
|
+
return u("Your browser doesn't support the Clipboard API", "error"), !0;
|
|
209
|
+
}
|
|
210
|
+
function z(e) {
|
|
211
|
+
return e instanceof Error && e.message.toLowerCase().includes("document is not focused") ? (u('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.', "warn"), !0) : !1;
|
|
212
|
+
}
|
|
213
|
+
async function ve(e) {
|
|
214
|
+
if (!J())
|
|
215
|
+
try {
|
|
216
|
+
await navigator.clipboard.writeText(JSON.stringify(e.state.value)), u("Global state copied to clipboard.");
|
|
217
|
+
} catch (t) {
|
|
218
|
+
if (z(t))
|
|
219
|
+
return;
|
|
220
|
+
u("Failed to serialize the state. Check the console for more details.", "error");
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
async function we(e) {
|
|
224
|
+
if (!J())
|
|
225
|
+
try {
|
|
226
|
+
W(e, JSON.parse(await navigator.clipboard.readText())), u("Global state pasted from clipboard.");
|
|
227
|
+
} catch (t) {
|
|
228
|
+
if (z(t))
|
|
229
|
+
return;
|
|
230
|
+
u("Failed to deserialize the state from clipboard. Check the console for more details.", "error");
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
async function Oe(e) {
|
|
234
|
+
try {
|
|
235
|
+
B(new Blob([JSON.stringify(e.state.value)], {
|
|
236
|
+
type: "text/plain;charset=utf-8"
|
|
237
|
+
}), "pinia-state.json");
|
|
238
|
+
} catch {
|
|
239
|
+
u("Failed to export the state as JSON. Check the console for more details.", "error");
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
let h;
|
|
243
|
+
function Ie() {
|
|
244
|
+
h || (h = document.createElement("input"), h.type = "file", h.accept = ".json");
|
|
245
|
+
function e() {
|
|
246
|
+
return new Promise((t, r) => {
|
|
247
|
+
h.onchange = async () => {
|
|
248
|
+
const n = h.files;
|
|
249
|
+
if (!n)
|
|
250
|
+
return t(null);
|
|
251
|
+
const o = n.item(0);
|
|
252
|
+
return t(o ? { text: await o.text(), file: o } : null);
|
|
253
|
+
}, h.oncancel = () => t(null), h.onerror = r, h.click();
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
return e;
|
|
257
|
+
}
|
|
258
|
+
async function Ee(e) {
|
|
259
|
+
try {
|
|
260
|
+
const r = await Ie()();
|
|
261
|
+
if (!r)
|
|
262
|
+
return;
|
|
263
|
+
const { text: n, file: o } = r;
|
|
264
|
+
W(e, JSON.parse(n)), u(`Global state imported from "${o.name}".`);
|
|
265
|
+
} catch {
|
|
266
|
+
u("Failed to import the state from JSON. Check the console for more details.", "error");
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
function W(e, t) {
|
|
270
|
+
for (const r in t) {
|
|
271
|
+
const n = e.state.value[r];
|
|
272
|
+
n ? Object.assign(n, t[r]) : e.state.value[r] = t[r];
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
function g(e) {
|
|
276
|
+
return {
|
|
277
|
+
_custom: {
|
|
278
|
+
display: e
|
|
279
|
+
}
|
|
280
|
+
};
|
|
281
|
+
}
|
|
282
|
+
const Q = "🍍 Pinia (root)", T = "_root";
|
|
283
|
+
function Te(e) {
|
|
284
|
+
return k(e) ? {
|
|
285
|
+
id: T,
|
|
286
|
+
label: Q
|
|
287
|
+
} : {
|
|
288
|
+
id: e.$id,
|
|
289
|
+
label: e.$id
|
|
290
|
+
};
|
|
291
|
+
}
|
|
292
|
+
function Ae(e) {
|
|
293
|
+
if (k(e)) {
|
|
294
|
+
const r = Array.from(e._s.keys()), n = e._s;
|
|
295
|
+
return {
|
|
296
|
+
state: r.map((a) => ({
|
|
297
|
+
editable: !0,
|
|
298
|
+
key: a,
|
|
299
|
+
value: e.state.value[a]
|
|
300
|
+
})),
|
|
301
|
+
getters: r.filter((a) => n.get(a)._getters).map((a) => {
|
|
302
|
+
const s = n.get(a);
|
|
303
|
+
return {
|
|
304
|
+
editable: !1,
|
|
305
|
+
key: a,
|
|
306
|
+
value: s._getters.reduce((i, c) => (i[c] = s[c], i), {})
|
|
307
|
+
};
|
|
308
|
+
})
|
|
309
|
+
};
|
|
310
|
+
}
|
|
311
|
+
const t = {
|
|
312
|
+
state: Object.keys(e.$state).map((r) => ({
|
|
313
|
+
editable: !0,
|
|
314
|
+
key: r,
|
|
315
|
+
value: e.$state[r]
|
|
316
|
+
}))
|
|
317
|
+
};
|
|
318
|
+
return e._getters && e._getters.length && (t.getters = e._getters.map((r) => ({
|
|
319
|
+
editable: !1,
|
|
320
|
+
key: r,
|
|
321
|
+
value: e[r]
|
|
322
|
+
}))), e._customProperties.size && (t.customProperties = Array.from(e._customProperties).map((r) => ({
|
|
323
|
+
editable: !0,
|
|
324
|
+
key: r,
|
|
325
|
+
value: e[r]
|
|
326
|
+
}))), t;
|
|
327
|
+
}
|
|
328
|
+
function $e(e) {
|
|
329
|
+
return e ? Array.isArray(e) ? e.reduce((t, r) => (t.keys.push(r.key), t.operations.push(r.type), t.oldValue[r.key] = r.oldValue, t.newValue[r.key] = r.newValue, t), {
|
|
330
|
+
oldValue: {},
|
|
331
|
+
keys: [],
|
|
332
|
+
operations: [],
|
|
333
|
+
newValue: {}
|
|
334
|
+
}) : {
|
|
335
|
+
operation: g(e.type),
|
|
336
|
+
key: g(e.key),
|
|
337
|
+
oldValue: e.oldValue,
|
|
338
|
+
newValue: e.newValue
|
|
339
|
+
} : {};
|
|
340
|
+
}
|
|
341
|
+
function Pe(e) {
|
|
342
|
+
switch (e) {
|
|
343
|
+
case y.direct:
|
|
344
|
+
return "mutation";
|
|
345
|
+
case y.patchFunction:
|
|
346
|
+
return "$patch";
|
|
347
|
+
case y.patchObject:
|
|
348
|
+
return "$patch";
|
|
349
|
+
default:
|
|
350
|
+
return "unknown";
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
let S = !0;
|
|
354
|
+
const O = [], _ = "pinia:mutations", d = "pinia", { assign: ke } = Object, I = (e) => "🍍 " + e;
|
|
355
|
+
function Le(e, t) {
|
|
356
|
+
M({
|
|
357
|
+
id: "dev.esm.pinia",
|
|
358
|
+
label: "Pinia 🍍",
|
|
359
|
+
logo: "https://pinia.vuejs.org/logo.svg",
|
|
360
|
+
packageName: "pinia",
|
|
361
|
+
homepage: "https://pinia.vuejs.org",
|
|
362
|
+
componentStateTypes: O,
|
|
363
|
+
app: e
|
|
364
|
+
}, (r) => {
|
|
365
|
+
typeof r.now != "function" && u("You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."), r.addTimelineLayer({
|
|
366
|
+
id: _,
|
|
367
|
+
label: "Pinia 🍍",
|
|
368
|
+
color: 15064968
|
|
369
|
+
}), r.addInspector({
|
|
370
|
+
id: d,
|
|
371
|
+
label: "Pinia 🍍",
|
|
372
|
+
icon: "storage",
|
|
373
|
+
treeFilterPlaceholder: "Search stores",
|
|
374
|
+
actions: [
|
|
375
|
+
{
|
|
376
|
+
icon: "content_copy",
|
|
377
|
+
action: () => {
|
|
378
|
+
ve(t);
|
|
379
|
+
},
|
|
380
|
+
tooltip: "Serialize and copy the state"
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
icon: "content_paste",
|
|
384
|
+
action: async () => {
|
|
385
|
+
await we(t), r.sendInspectorTree(d), r.sendInspectorState(d);
|
|
386
|
+
},
|
|
387
|
+
tooltip: "Replace the state with the content of your clipboard"
|
|
388
|
+
},
|
|
389
|
+
{
|
|
390
|
+
icon: "save",
|
|
391
|
+
action: () => {
|
|
392
|
+
Oe(t);
|
|
393
|
+
},
|
|
394
|
+
tooltip: "Save the state as a JSON file"
|
|
395
|
+
},
|
|
396
|
+
{
|
|
397
|
+
icon: "folder_open",
|
|
398
|
+
action: async () => {
|
|
399
|
+
await Ee(t), r.sendInspectorTree(d), r.sendInspectorState(d);
|
|
400
|
+
},
|
|
401
|
+
tooltip: "Import the state from a JSON file"
|
|
402
|
+
}
|
|
403
|
+
],
|
|
404
|
+
nodeActions: [
|
|
405
|
+
{
|
|
406
|
+
icon: "restore",
|
|
407
|
+
tooltip: 'Reset the state (with "$reset")',
|
|
408
|
+
action: (n) => {
|
|
409
|
+
const o = t._s.get(n);
|
|
410
|
+
o ? typeof o.$reset != "function" ? u(`Cannot reset "${n}" store because it doesn't have a "$reset" method implemented.`, "warn") : (o.$reset(), u(`Store "${n}" reset.`)) : u(`Cannot reset "${n}" store because it wasn't found.`, "warn");
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
]
|
|
414
|
+
}), r.on.inspectComponent((n, o) => {
|
|
415
|
+
const a = n.componentInstance && n.componentInstance.proxy;
|
|
416
|
+
if (a && a._pStores) {
|
|
417
|
+
const s = n.componentInstance.proxy._pStores;
|
|
418
|
+
Object.values(s).forEach((i) => {
|
|
419
|
+
n.instanceData.state.push({
|
|
420
|
+
type: I(i.$id),
|
|
421
|
+
key: "state",
|
|
422
|
+
editable: !0,
|
|
423
|
+
value: i._isOptionsAPI ? {
|
|
424
|
+
_custom: {
|
|
425
|
+
value: $(i.$state),
|
|
426
|
+
actions: [
|
|
427
|
+
{
|
|
428
|
+
icon: "restore",
|
|
429
|
+
tooltip: "Reset the state of this store",
|
|
430
|
+
action: () => i.$reset()
|
|
431
|
+
}
|
|
432
|
+
]
|
|
433
|
+
}
|
|
434
|
+
} : (
|
|
435
|
+
// NOTE: workaround to unwrap transferred refs
|
|
436
|
+
Object.keys(i.$state).reduce((c, l) => (c[l] = i.$state[l], c), {})
|
|
437
|
+
)
|
|
438
|
+
}), i._getters && i._getters.length && n.instanceData.state.push({
|
|
439
|
+
type: I(i.$id),
|
|
440
|
+
key: "getters",
|
|
441
|
+
editable: !1,
|
|
442
|
+
value: i._getters.reduce((c, l) => {
|
|
443
|
+
try {
|
|
444
|
+
c[l] = i[l];
|
|
445
|
+
} catch (f) {
|
|
446
|
+
c[l] = f;
|
|
447
|
+
}
|
|
448
|
+
return c;
|
|
449
|
+
}, {})
|
|
450
|
+
});
|
|
451
|
+
});
|
|
452
|
+
}
|
|
453
|
+
}), r.on.getInspectorTree((n) => {
|
|
454
|
+
if (n.app === e && n.inspectorId === d) {
|
|
455
|
+
let o = [t];
|
|
456
|
+
o = o.concat(Array.from(t._s.values())), n.rootNodes = (n.filter ? o.filter((a) => "$id" in a ? a.$id.toLowerCase().includes(n.filter.toLowerCase()) : Q.toLowerCase().includes(n.filter.toLowerCase())) : o).map(Te);
|
|
457
|
+
}
|
|
458
|
+
}), r.on.getInspectorState((n) => {
|
|
459
|
+
if (n.app === e && n.inspectorId === d) {
|
|
460
|
+
const o = n.nodeId === T ? t : t._s.get(n.nodeId);
|
|
461
|
+
if (!o)
|
|
462
|
+
return;
|
|
463
|
+
o && (n.state = Ae(o));
|
|
464
|
+
}
|
|
465
|
+
}), r.on.editInspectorState((n, o) => {
|
|
466
|
+
if (n.app === e && n.inspectorId === d) {
|
|
467
|
+
const a = n.nodeId === T ? t : t._s.get(n.nodeId);
|
|
468
|
+
if (!a)
|
|
469
|
+
return u(`store "${n.nodeId}" not found`, "error");
|
|
470
|
+
const { path: s } = n;
|
|
471
|
+
k(a) ? s.unshift("state") : (s.length !== 1 || !a._customProperties.has(s[0]) || s[0] in a.$state) && s.unshift("$state"), S = !1, n.set(a, s, n.state.value), S = !0;
|
|
472
|
+
}
|
|
473
|
+
}), r.on.editComponentState((n) => {
|
|
474
|
+
if (n.type.startsWith("🍍")) {
|
|
475
|
+
const o = n.type.replace(/^🍍\s*/, ""), a = t._s.get(o);
|
|
476
|
+
if (!a)
|
|
477
|
+
return u(`store "${o}" not found`, "error");
|
|
478
|
+
const { path: s } = n;
|
|
479
|
+
if (s[0] !== "state")
|
|
480
|
+
return u(`Invalid path for store "${o}":
|
|
481
|
+
${s}
|
|
482
|
+
Only state can be modified.`);
|
|
483
|
+
s[0] = "$state", S = !1, n.set(a, s, n.state.value), S = !0;
|
|
484
|
+
}
|
|
485
|
+
});
|
|
486
|
+
});
|
|
487
|
+
}
|
|
488
|
+
function Re(e, t) {
|
|
489
|
+
O.includes(I(t.$id)) || O.push(I(t.$id)), M({
|
|
490
|
+
id: "dev.esm.pinia",
|
|
491
|
+
label: "Pinia 🍍",
|
|
492
|
+
logo: "https://pinia.vuejs.org/logo.svg",
|
|
493
|
+
packageName: "pinia",
|
|
494
|
+
homepage: "https://pinia.vuejs.org",
|
|
495
|
+
componentStateTypes: O,
|
|
496
|
+
app: e,
|
|
497
|
+
settings: {
|
|
498
|
+
logStoreChanges: {
|
|
499
|
+
label: "Notify about new/deleted stores",
|
|
500
|
+
type: "boolean",
|
|
501
|
+
defaultValue: !0
|
|
502
|
+
}
|
|
503
|
+
// useEmojis: {
|
|
504
|
+
// label: 'Use emojis in messages ⚡️',
|
|
505
|
+
// type: 'boolean',
|
|
506
|
+
// defaultValue: true,
|
|
507
|
+
// },
|
|
508
|
+
}
|
|
509
|
+
}, (r) => {
|
|
510
|
+
const n = typeof r.now == "function" ? r.now.bind(r) : Date.now;
|
|
511
|
+
t.$onAction(({ after: s, onError: i, name: c, args: l }) => {
|
|
512
|
+
const f = Y++;
|
|
513
|
+
r.addTimelineEvent({
|
|
514
|
+
layerId: _,
|
|
515
|
+
event: {
|
|
516
|
+
time: n(),
|
|
517
|
+
title: "🛫 " + c,
|
|
518
|
+
subtitle: "start",
|
|
519
|
+
data: {
|
|
520
|
+
store: g(t.$id),
|
|
521
|
+
action: g(c),
|
|
522
|
+
args: l
|
|
523
|
+
},
|
|
524
|
+
groupId: f
|
|
525
|
+
}
|
|
526
|
+
}), s((m) => {
|
|
527
|
+
p = void 0, r.addTimelineEvent({
|
|
528
|
+
layerId: _,
|
|
529
|
+
event: {
|
|
530
|
+
time: n(),
|
|
531
|
+
title: "🛬 " + c,
|
|
532
|
+
subtitle: "end",
|
|
533
|
+
data: {
|
|
534
|
+
store: g(t.$id),
|
|
535
|
+
action: g(c),
|
|
536
|
+
args: l,
|
|
537
|
+
result: m
|
|
538
|
+
},
|
|
539
|
+
groupId: f
|
|
540
|
+
}
|
|
541
|
+
});
|
|
542
|
+
}), i((m) => {
|
|
543
|
+
p = void 0, r.addTimelineEvent({
|
|
544
|
+
layerId: _,
|
|
545
|
+
event: {
|
|
546
|
+
time: n(),
|
|
547
|
+
logType: "error",
|
|
548
|
+
title: "💥 " + c,
|
|
549
|
+
subtitle: "end",
|
|
550
|
+
data: {
|
|
551
|
+
store: g(t.$id),
|
|
552
|
+
action: g(c),
|
|
553
|
+
args: l,
|
|
554
|
+
error: m
|
|
555
|
+
},
|
|
556
|
+
groupId: f
|
|
557
|
+
}
|
|
558
|
+
});
|
|
559
|
+
});
|
|
560
|
+
}, !0), t._customProperties.forEach((s) => {
|
|
561
|
+
q(() => X(t[s]), (i, c) => {
|
|
562
|
+
r.notifyComponentUpdate(), r.sendInspectorState(d), S && r.addTimelineEvent({
|
|
563
|
+
layerId: _,
|
|
564
|
+
event: {
|
|
565
|
+
time: n(),
|
|
566
|
+
title: "Change",
|
|
567
|
+
subtitle: s,
|
|
568
|
+
data: {
|
|
569
|
+
newValue: i,
|
|
570
|
+
oldValue: c
|
|
571
|
+
},
|
|
572
|
+
groupId: p
|
|
573
|
+
}
|
|
574
|
+
});
|
|
575
|
+
}, { deep: !0 });
|
|
576
|
+
}), t.$subscribe(({ events: s, type: i }, c) => {
|
|
577
|
+
if (r.notifyComponentUpdate(), r.sendInspectorState(d), !S)
|
|
578
|
+
return;
|
|
579
|
+
const l = {
|
|
580
|
+
time: n(),
|
|
581
|
+
title: Pe(i),
|
|
582
|
+
data: ke({ store: g(t.$id) }, $e(s)),
|
|
583
|
+
groupId: p
|
|
584
|
+
};
|
|
585
|
+
i === y.patchFunction ? l.subtitle = "⤵️" : i === y.patchObject ? l.subtitle = "🧩" : s && !Array.isArray(s) && (l.subtitle = s.type), s && (l.data["rawEvent(s)"] = {
|
|
586
|
+
_custom: {
|
|
587
|
+
display: "DebuggerEvent",
|
|
588
|
+
type: "object",
|
|
589
|
+
tooltip: "raw DebuggerEvent[]",
|
|
590
|
+
value: s
|
|
591
|
+
}
|
|
592
|
+
}), r.addTimelineEvent({
|
|
593
|
+
layerId: _,
|
|
594
|
+
event: l
|
|
595
|
+
});
|
|
596
|
+
}, { detached: !0, flush: "sync" });
|
|
597
|
+
const o = t._hotUpdate;
|
|
598
|
+
t._hotUpdate = U((s) => {
|
|
599
|
+
o(s), r.addTimelineEvent({
|
|
600
|
+
layerId: _,
|
|
601
|
+
event: {
|
|
602
|
+
time: n(),
|
|
603
|
+
title: "🔥 " + t.$id,
|
|
604
|
+
subtitle: "HMR update",
|
|
605
|
+
data: {
|
|
606
|
+
store: g(t.$id),
|
|
607
|
+
info: g("HMR update")
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
}), r.notifyComponentUpdate(), r.sendInspectorTree(d), r.sendInspectorState(d);
|
|
611
|
+
});
|
|
612
|
+
const { $dispose: a } = t;
|
|
613
|
+
t.$dispose = () => {
|
|
614
|
+
a(), r.notifyComponentUpdate(), r.sendInspectorTree(d), r.sendInspectorState(d), r.getSettings().logStoreChanges && u(`Disposed "${t.$id}" store 🗑`);
|
|
615
|
+
}, r.notifyComponentUpdate(), r.sendInspectorTree(d), r.sendInspectorState(d), r.getSettings().logStoreChanges && u(`"${t.$id}" store installed 🆕`);
|
|
616
|
+
});
|
|
617
|
+
}
|
|
618
|
+
let Y = 0, p;
|
|
619
|
+
function N(e, t, r) {
|
|
620
|
+
const n = t.reduce((o, a) => (o[a] = $(e)[a], o), {});
|
|
621
|
+
for (const o in n)
|
|
622
|
+
e[o] = function() {
|
|
623
|
+
const a = Y, s = r ? new Proxy(e, {
|
|
624
|
+
get(...c) {
|
|
625
|
+
return p = a, Reflect.get(...c);
|
|
626
|
+
},
|
|
627
|
+
set(...c) {
|
|
628
|
+
return p = a, Reflect.set(...c);
|
|
629
|
+
}
|
|
630
|
+
}) : e;
|
|
631
|
+
p = a;
|
|
632
|
+
const i = n[o].apply(s, arguments);
|
|
633
|
+
return p = void 0, i;
|
|
634
|
+
};
|
|
635
|
+
}
|
|
636
|
+
function Ne({ app: e, store: t, options: r }) {
|
|
637
|
+
if (t.$id.startsWith("__hot:"))
|
|
638
|
+
return;
|
|
639
|
+
t._isOptionsAPI = !!r.state, N(t, Object.keys(r.actions), t._isOptionsAPI);
|
|
640
|
+
const n = t._hotUpdate;
|
|
641
|
+
$(t)._hotUpdate = function(o) {
|
|
642
|
+
n.apply(this, arguments), N(t, Object.keys(o._hmrPayload.actions), !!t._isOptionsAPI);
|
|
643
|
+
}, Re(
|
|
644
|
+
e,
|
|
645
|
+
// FIXME: is there a way to allow the assignment from Store<Id, S, G, A> to StoreGeneric?
|
|
646
|
+
t
|
|
647
|
+
);
|
|
648
|
+
}
|
|
649
|
+
function je() {
|
|
650
|
+
const e = K(!0), t = e.run(() => D({}));
|
|
651
|
+
let r = [], n = [];
|
|
652
|
+
const o = U({
|
|
653
|
+
install(a) {
|
|
654
|
+
o._a = a, a.provide(me, o), a.config.globalProperties.$pinia = o, L && Le(a, o), n.forEach((s) => r.push(s)), n = [];
|
|
655
|
+
},
|
|
656
|
+
use(a) {
|
|
657
|
+
return !this._a && !ce ? n.push(a) : r.push(a), this;
|
|
658
|
+
},
|
|
659
|
+
_p: r,
|
|
660
|
+
// it's actually undefined here
|
|
661
|
+
// @ts-expect-error
|
|
662
|
+
_a: null,
|
|
663
|
+
_e: e,
|
|
664
|
+
_s: /* @__PURE__ */ new Map(),
|
|
665
|
+
state: t
|
|
666
|
+
});
|
|
667
|
+
return L && typeof Proxy < "u" && o.use(Ne), o;
|
|
668
|
+
}
|
|
669
|
+
process.env.NODE_ENV !== "production" ? Symbol("pinia:skipHydration") : (
|
|
670
|
+
/* istanbul ignore next */
|
|
671
|
+
Symbol()
|
|
672
|
+
);
|
|
673
|
+
function xe(e) {
|
|
674
|
+
return typeof e == "object" && e !== null;
|
|
675
|
+
}
|
|
676
|
+
function j(e, t) {
|
|
677
|
+
return e = xe(e) ? e : /* @__PURE__ */ Object.create(null), new Proxy(e, {
|
|
678
|
+
get(r, n, o) {
|
|
679
|
+
return n === "key" ? Reflect.get(r, n, o) : Reflect.get(r, n, o) || Reflect.get(t, n, o);
|
|
680
|
+
}
|
|
681
|
+
});
|
|
682
|
+
}
|
|
683
|
+
function Ve(e, t) {
|
|
684
|
+
return t.reduce((r, n) => r == null ? void 0 : r[n], e);
|
|
685
|
+
}
|
|
686
|
+
function De(e, t, r) {
|
|
687
|
+
return t.slice(0, -1).reduce((n, o) => /^(__proto__)$/.test(o) ? {} : n[o] = n[o] || {}, e)[t[t.length - 1]] = r, e;
|
|
688
|
+
}
|
|
689
|
+
function Ue(e, t) {
|
|
690
|
+
return t.reduce((r, n) => {
|
|
691
|
+
const o = n.split(".");
|
|
692
|
+
return De(r, o, Ve(e, o));
|
|
693
|
+
}, {});
|
|
694
|
+
}
|
|
695
|
+
function Ce(e, t) {
|
|
696
|
+
return (r) => {
|
|
697
|
+
var n;
|
|
698
|
+
try {
|
|
699
|
+
const {
|
|
700
|
+
storage: o = localStorage,
|
|
701
|
+
beforeRestore: a = void 0,
|
|
702
|
+
afterRestore: s = void 0,
|
|
703
|
+
serializer: i = {
|
|
704
|
+
serialize: JSON.stringify,
|
|
705
|
+
deserialize: JSON.parse
|
|
706
|
+
},
|
|
707
|
+
key: c = t.$id,
|
|
708
|
+
paths: l = null,
|
|
709
|
+
debug: f = !1
|
|
710
|
+
} = r;
|
|
711
|
+
return {
|
|
712
|
+
storage: o,
|
|
713
|
+
beforeRestore: a,
|
|
714
|
+
afterRestore: s,
|
|
715
|
+
serializer: i,
|
|
716
|
+
key: ((n = e.key) != null ? n : (m) => m)(typeof c == "string" ? c : c(t.$id)),
|
|
717
|
+
paths: l,
|
|
718
|
+
debug: f
|
|
719
|
+
};
|
|
720
|
+
} catch {
|
|
721
|
+
return r.debug, null;
|
|
722
|
+
}
|
|
723
|
+
};
|
|
724
|
+
}
|
|
725
|
+
function x(e, { storage: t, serializer: r, key: n, debug: o }) {
|
|
726
|
+
try {
|
|
727
|
+
const a = t == null ? void 0 : t.getItem(n);
|
|
728
|
+
a && e.$patch(r == null ? void 0 : r.deserialize(a));
|
|
729
|
+
} catch {
|
|
730
|
+
}
|
|
731
|
+
}
|
|
732
|
+
function V(e, { storage: t, serializer: r, key: n, paths: o, debug: a }) {
|
|
733
|
+
try {
|
|
734
|
+
const s = Array.isArray(o) ? Ue(e, o) : e;
|
|
735
|
+
t.setItem(n, r.serialize(s));
|
|
736
|
+
} catch {
|
|
737
|
+
}
|
|
738
|
+
}
|
|
739
|
+
function Me(e = {}) {
|
|
740
|
+
return (t) => {
|
|
741
|
+
const { auto: r = !1 } = e, {
|
|
742
|
+
options: { persist: n = r },
|
|
743
|
+
store: o,
|
|
744
|
+
pinia: a
|
|
745
|
+
} = t;
|
|
746
|
+
if (!n)
|
|
747
|
+
return;
|
|
748
|
+
if (!(o.$id in a.state.value)) {
|
|
749
|
+
const i = a._s.get(o.$id.replace("__hot:", ""));
|
|
750
|
+
i && Promise.resolve().then(() => i.$persist());
|
|
751
|
+
return;
|
|
752
|
+
}
|
|
753
|
+
const s = (Array.isArray(n) ? n.map((i) => j(i, e)) : [j(n, e)]).map(Ce(e, o)).filter(Boolean);
|
|
754
|
+
o.$persist = () => {
|
|
755
|
+
s.forEach((i) => {
|
|
756
|
+
V(o.$state, i);
|
|
757
|
+
});
|
|
758
|
+
}, o.$hydrate = ({ runHooks: i = !0 } = {}) => {
|
|
759
|
+
s.forEach((c) => {
|
|
760
|
+
const { beforeRestore: l, afterRestore: f } = c;
|
|
761
|
+
i && (l == null || l(t)), x(o, c), i && (f == null || f(t));
|
|
762
|
+
});
|
|
763
|
+
}, s.forEach((i) => {
|
|
764
|
+
const { beforeRestore: c, afterRestore: l } = i;
|
|
765
|
+
c == null || c(t), x(o, i), l == null || l(t), o.$subscribe(
|
|
766
|
+
(f, m) => {
|
|
767
|
+
V(m, i);
|
|
768
|
+
},
|
|
769
|
+
{
|
|
770
|
+
detached: !0
|
|
771
|
+
}
|
|
772
|
+
);
|
|
773
|
+
});
|
|
774
|
+
};
|
|
775
|
+
}
|
|
776
|
+
var Ge = Me();
|
|
777
|
+
const A = je();
|
|
778
|
+
A.use(Ge);
|
|
779
|
+
const Fe = (e) => {
|
|
780
|
+
var s, i, c;
|
|
781
|
+
const t = ((s = e == null ? void 0 : e.router) == null ? void 0 : s.routerBase) ?? "/", r = ((i = e == null ? void 0 : e.router) == null ? void 0 : i.options) || {}, o = Object.values(((c = e == null ? void 0 : e.router) == null ? void 0 : c.glob) || []).filter((l) => !!l).flat().sort((l, f) => (l.index ?? 0) - (f.index ?? 0)).map((l) => {
|
|
782
|
+
const f = l.meta || {};
|
|
783
|
+
return f.keepAlive = f.keepAlive ?? e.keepAlive ?? !0, { ...l, meta: f };
|
|
784
|
+
});
|
|
785
|
+
return { router: se({ history: ie(t), routes: o, ...r }) };
|
|
786
|
+
}, He = () => window.config || {}, Ke = (e) => {
|
|
787
|
+
e || (e = {}), e = { ...e, ...He() };
|
|
788
|
+
const t = D(!0);
|
|
789
|
+
Promise.all([ee(e), te(e)]).then(() => {
|
|
790
|
+
t.value = !1;
|
|
791
|
+
});
|
|
792
|
+
const { container: r, component: n, props: o } = (e == null ? void 0 : e.root) || {}, a = Z(n || oe, o);
|
|
793
|
+
a.use(ae, e), a.use(A);
|
|
794
|
+
const { router: s } = Fe(e);
|
|
795
|
+
return e.microApps && e.microApps.length > 0 && ne(e, s), e.microAppName && re(e, s), a.use(s), a.mount(r || "#app"), { app: a, router: s, loading: t, store: A };
|
|
796
|
+
};
|
|
797
|
+
export {
|
|
798
|
+
Ke as createDasWebApp
|
|
799
|
+
};
|