x-essential-lib 0.9.0 → 0.9.2
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/dist/components/confirmDlg/index.vue.d.ts +2 -1
- package/dist/components/loading/index.vue.d.ts +2 -1
- package/dist/components/message/index.vue.d.ts +2 -1
- package/dist/components/message/item.vue.d.ts +2 -1
- package/dist/components/numberDlg/index.vue.d.ts +2 -1
- package/dist/components/promptDlg/index.vue.d.ts +2 -1
- package/dist/components/waitDlg/index.vue.d.ts +2 -1
- package/dist/index.js +126 -126
- package/dist/vendor.lvdyytxg.js +183 -0
- package/package.json +16 -16
- package/dist/vendor.ohp5twbt.js +0 -202
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
declare const
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
2
3
|
export default _default;
|
|
@@ -2,5 +2,6 @@ interface Props {
|
|
|
2
2
|
open?: boolean;
|
|
3
3
|
zIndex?: number;
|
|
4
4
|
}
|
|
5
|
-
declare const
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
6
7
|
export default _default;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
declare const
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
2
3
|
export default _default;
|
|
@@ -5,9 +5,10 @@ interface Props {
|
|
|
5
5
|
text: string;
|
|
6
6
|
timeout?: number;
|
|
7
7
|
}
|
|
8
|
-
declare const
|
|
8
|
+
declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
9
|
timeout: (...args: any[]) => void;
|
|
10
10
|
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
|
|
11
11
|
onTimeout?: ((...args: any[]) => any) | undefined;
|
|
12
12
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
declare const _default: typeof __VLS_export;
|
|
13
14
|
export default _default;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
declare const
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
2
3
|
export default _default;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
declare const
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
2
3
|
export default _default;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
declare const
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
2
3
|
export default _default;
|
package/dist/index.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var d=document.createElement("style");d.id="x-essential-lib",d.appendChild(document.createTextNode('.fade-leave-active[data-v-83c3cd1d]{transition:opacity .5s ease}.fade-leave-to[data-v-83c3cd1d]{opacity:0}.x-cont[data-v-83c3cd1d]{position:absolute;inset:0;display:flex;align-items:center;justify-content:center}.lds-spinner[data-v-83c3cd1d]{color:official;display:inline-block;position:relative;width:40px;height:40px}.lds-spinner div[data-v-83c3cd1d]{transform-origin:20px 20px;animation:lds-spinner-83c3cd1d 1.2s linear infinite}.lds-spinner div[data-v-83c3cd1d]:after{content:" ";display:block;position:absolute;top:3px;left:18px;width:2px;height:6px;border-radius:5%;background:#9e9e9e}.lds-spinner div[data-v-83c3cd1d]:nth-child(1){transform:rotate(0);animation-delay:-1.1s}.lds-spinner div[data-v-83c3cd1d]:nth-child(2){transform:rotate(30deg);animation-delay:-1s}.lds-spinner div[data-v-83c3cd1d]:nth-child(3){transform:rotate(60deg);animation-delay:-.9s}.lds-spinner div[data-v-83c3cd1d]:nth-child(4){transform:rotate(90deg);animation-delay:-.8s}.lds-spinner div[data-v-83c3cd1d]:nth-child(5){transform:rotate(120deg);animation-delay:-.7s}.lds-spinner div[data-v-83c3cd1d]:nth-child(6){transform:rotate(150deg);animation-delay:-.6s}.lds-spinner div[data-v-83c3cd1d]:nth-child(7){transform:rotate(180deg);animation-delay:-.5s}.lds-spinner div[data-v-83c3cd1d]:nth-child(8){transform:rotate(210deg);animation-delay:-.4s}.lds-spinner div[data-v-83c3cd1d]:nth-child(9){transform:rotate(240deg);animation-delay:-.3s}.lds-spinner div[data-v-83c3cd1d]:nth-child(10){transform:rotate(270deg);animation-delay:-.2s}.lds-spinner div[data-v-83c3cd1d]:nth-child(11){transform:rotate(300deg);animation-delay:-.1s}.lds-spinner div[data-v-83c3cd1d]:nth-child(12){transform:rotate(330deg);animation-delay:0s}@keyframes lds-spinner-83c3cd1d{0%{opacity:1}to{opacity:0}}.x-item[data-v-f1f60167]{width:600px}@media (max-width: 600px){.x-item[data-v-f1f60167]{width:calc(100vw - 16px)}}.x-cont[data-v-b482df18]{position:fixed;left:50%;bottom:20px;transform:translate(-50%);z-index:9999}')),document.head.appendChild(d)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}})();
|
|
2
|
-
import { computed as C, provide as U, inject as $, ref as p, watchEffect as le, onMounted as N, onBeforeUnmount as K, onBeforeMount as
|
|
2
|
+
import { computed as C, provide as U, inject as $, ref as p, watchEffect as le, onMounted as N, onBeforeUnmount as K, onBeforeMount as we, defineComponent as A, watch as F, resolveComponent as v, createBlock as L, openBlock as q, withKeys as z, unref as E, withModifiers as M, isRef as W, withCtx as g, createVNode as b, createTextVNode as B, toDisplayString as S, Transition as ke, createElementBlock as P, createCommentVNode as ee, normalizeStyle as ue, createElementVNode as k, Fragment as De, renderList as Ve, useTemplateRef as ce } from "vue";
|
|
3
3
|
import { useI18n as G } from "vue-i18n";
|
|
4
4
|
import { useTheme as se, useDisplay as Ce } from "vuetify";
|
|
5
5
|
import { useRouter as pe, useRoute as qe } from "vue-router";
|
|
6
6
|
import je from "axios";
|
|
7
|
-
import { a as T, m as Re, u as Se } from "./vendor.
|
|
7
|
+
import { a as T, m as Re, u as Se } from "./vendor.lvdyytxg.js";
|
|
8
8
|
function Oe() {
|
|
9
|
-
const e = se(), t = C(() => e.global.current.value.colors.primary), a = C(() => e.global.current.value.colors.secondary), o = C(() => e.current.value.dark ? "#2e2e2e" : "#bdbdbd"), l = C(() => e.current.value.dark ? "#272727" : "#eeeeee"), r = C(() => e.current.value.dark ? "#1e1e1e" : "#ffffff"),
|
|
9
|
+
const e = se(), t = C(() => e.global.current.value.colors.primary), a = C(() => e.global.current.value.colors.secondary), o = C(() => e.current.value.dark ? "#2e2e2e" : "#bdbdbd"), l = C(() => e.current.value.dark ? "#272727" : "#eeeeee"), r = C(() => e.current.value.dark ? "#1e1e1e" : "#ffffff"), s = C(() => e.current.value.dark ? "#303030" : "#f6f6f6"), n = C(() => e.current.value.dark ? "#ffffff1f" : "#0000001f");
|
|
10
10
|
return {
|
|
11
11
|
primaryColor: t,
|
|
12
12
|
secondaryColor: a,
|
|
13
13
|
backgroundColor0: o,
|
|
14
14
|
backgroundColor1: l,
|
|
15
15
|
backgroundColor2: r,
|
|
16
|
-
highlightColor:
|
|
16
|
+
highlightColor: s,
|
|
17
17
|
borderColor: n
|
|
18
18
|
};
|
|
19
19
|
}
|
|
@@ -28,7 +28,7 @@ function kt(e) {
|
|
|
28
28
|
}
|
|
29
29
|
), t.interceptors.response.use(
|
|
30
30
|
(a) => Be(a),
|
|
31
|
-
(a) =>
|
|
31
|
+
(a) => Ie(a, e.onError)
|
|
32
32
|
), t;
|
|
33
33
|
}
|
|
34
34
|
function Te(e) {
|
|
@@ -41,15 +41,15 @@ function Le(e, t) {
|
|
|
41
41
|
function Be(e) {
|
|
42
42
|
return e.data;
|
|
43
43
|
}
|
|
44
|
-
function
|
|
44
|
+
function Ie(e, t) {
|
|
45
45
|
const o = e.response;
|
|
46
|
-
return o && (o.status === 401 &&
|
|
46
|
+
return o && (o.status === 401 && Me(), o.data?.message ? t(o.data?.message) : t({
|
|
47
47
|
code: o.status,
|
|
48
48
|
message: o.statusText
|
|
49
49
|
})), Promise.reject(e);
|
|
50
50
|
}
|
|
51
|
-
function
|
|
52
|
-
T.remove("accessToken"), T.remove("refreshToken"), T.remove("
|
|
51
|
+
function Me() {
|
|
52
|
+
T.remove("accessToken"), T.remove("refreshToken"), T.remove("userId"), T.remove("userName"), T.remove("phone"), T.remove("activeOrg"), pe().replace({ path: "/passport/login" });
|
|
53
53
|
}
|
|
54
54
|
const Dt = (function() {
|
|
55
55
|
return window.globalObjects || (window.globalObjects = {
|
|
@@ -73,7 +73,7 @@ async function X(e, t, a) {
|
|
|
73
73
|
r();
|
|
74
74
|
});
|
|
75
75
|
}
|
|
76
|
-
function
|
|
76
|
+
function Ae(e, t) {
|
|
77
77
|
const a = document.getElementById("single-spa-application:" + e);
|
|
78
78
|
a && (a.classList.remove("app-left", "app-right", "app-reset"), t ? a.classList.add("app-left") : a.classList.add("app-right"), setTimeout(() => {
|
|
79
79
|
a.classList.add("app-reset");
|
|
@@ -155,13 +155,13 @@ const _e = "essentialDark", de = "essentialLocale", ie = "essentialPermissionObj
|
|
|
155
155
|
function Ke(e) {
|
|
156
156
|
U(_e, e);
|
|
157
157
|
}
|
|
158
|
-
function
|
|
158
|
+
function It() {
|
|
159
159
|
return $(_e);
|
|
160
160
|
}
|
|
161
161
|
function Ne(e) {
|
|
162
162
|
U(de, e);
|
|
163
163
|
}
|
|
164
|
-
function
|
|
164
|
+
function Mt() {
|
|
165
165
|
return $(de);
|
|
166
166
|
}
|
|
167
167
|
function We(e) {
|
|
@@ -173,7 +173,7 @@ function Xe() {
|
|
|
173
173
|
function ze(e) {
|
|
174
174
|
U(fe, e);
|
|
175
175
|
}
|
|
176
|
-
function
|
|
176
|
+
function At() {
|
|
177
177
|
return $(fe);
|
|
178
178
|
}
|
|
179
179
|
function He(e) {
|
|
@@ -304,10 +304,10 @@ function H(e) {
|
|
|
304
304
|
const o = e.split("/").filter((l) => l.trim() !== "");
|
|
305
305
|
return Je.forEach((l) => {
|
|
306
306
|
const r = l.path.split("/").filter((n) => n.trim() !== "");
|
|
307
|
-
let
|
|
307
|
+
let s = 0;
|
|
308
308
|
for (let n = 0; n < o.length && !(n >= r.length || o[n] !== r[n]); n++)
|
|
309
|
-
|
|
310
|
-
|
|
309
|
+
s++;
|
|
310
|
+
s > 0 && s > a && (t = l, a = s);
|
|
311
311
|
}), t;
|
|
312
312
|
}
|
|
313
313
|
const Z = p("");
|
|
@@ -320,8 +320,8 @@ function O(e, t, a) {
|
|
|
320
320
|
}
|
|
321
321
|
if (console.info(`~~~~routeChange~~~~ ${t} -> ${e}`), !l)
|
|
322
322
|
return;
|
|
323
|
-
const r = o.app === l.app,
|
|
324
|
-
r ?
|
|
323
|
+
const r = o.app === l.app, s = o.path === l.path, n = o.level >= l.level;
|
|
324
|
+
r ? s ? Z.value = "" : Z.value = n ? "inner-left" : "inner-right" : (Z.value = "", Ae(o.app, n));
|
|
325
325
|
}
|
|
326
326
|
function Qe() {
|
|
327
327
|
return !!T.get("accessToken");
|
|
@@ -330,12 +330,12 @@ function Ye() {
|
|
|
330
330
|
return !!T.get("activeOrg");
|
|
331
331
|
}
|
|
332
332
|
function Ut(e, t, a, o) {
|
|
333
|
-
const l = Qe(), r = Ye(),
|
|
334
|
-
if (!
|
|
333
|
+
const l = Qe(), r = Ye(), s = H(e.path);
|
|
334
|
+
if (!s) {
|
|
335
335
|
console.assert(!1), a();
|
|
336
336
|
return;
|
|
337
337
|
}
|
|
338
|
-
if (
|
|
338
|
+
if (s.requiredState === "auth")
|
|
339
339
|
if (l)
|
|
340
340
|
if (r) {
|
|
341
341
|
const n = "/main";
|
|
@@ -346,7 +346,7 @@ function Ut(e, t, a, o) {
|
|
|
346
346
|
const n = "/passport/login";
|
|
347
347
|
O(n, t.path, o), a({ path: n });
|
|
348
348
|
}
|
|
349
|
-
else if (
|
|
349
|
+
else if (s.requiredState === "org")
|
|
350
350
|
if (l)
|
|
351
351
|
if (r)
|
|
352
352
|
O(e.path, t.path, o), a();
|
|
@@ -394,21 +394,21 @@ function Kt(e) {
|
|
|
394
394
|
e.value = [];
|
|
395
395
|
}
|
|
396
396
|
function Nt(e, t, a, o, l, r) {
|
|
397
|
-
const
|
|
397
|
+
const s = qe(), n = pe(), _ = Se(), c = p(!1);
|
|
398
398
|
le(() => {
|
|
399
399
|
let f = !1;
|
|
400
|
-
typeof e.value == "boolean" ? f = e.value : f = _.value,
|
|
401
|
-
}), Ke(
|
|
402
|
-
const
|
|
400
|
+
typeof e.value == "boolean" ? f = e.value : f = _.value, c.value = f;
|
|
401
|
+
}), Ke(c), Ne(t), We(a), ze(o), He(l), Fe(r);
|
|
402
|
+
const x = se();
|
|
403
403
|
le(() => {
|
|
404
|
-
|
|
404
|
+
x.change(c.value ? "dark" : "light");
|
|
405
405
|
});
|
|
406
406
|
const D = () => {
|
|
407
407
|
if (!Ze(r)) {
|
|
408
408
|
me(r, "waitDlg") || tt(r);
|
|
409
409
|
return;
|
|
410
410
|
}
|
|
411
|
-
const f = H(
|
|
411
|
+
const f = H(s.path);
|
|
412
412
|
if (!f) {
|
|
413
413
|
console.assert(!1);
|
|
414
414
|
return;
|
|
@@ -424,17 +424,17 @@ function Nt(e, t, a, o, l, r) {
|
|
|
424
424
|
D();
|
|
425
425
|
return;
|
|
426
426
|
}
|
|
427
|
-
},
|
|
427
|
+
}, h = () => {
|
|
428
428
|
D();
|
|
429
429
|
};
|
|
430
430
|
N(() => {
|
|
431
|
-
window.addEventListener("keydown", y), u.on("backbutton",
|
|
431
|
+
window.addEventListener("keydown", y), u.on("backbutton", h);
|
|
432
432
|
}), K(() => {
|
|
433
|
-
window.removeEventListener("keydown", y), u.off("backbutton",
|
|
433
|
+
window.removeEventListener("keydown", y), u.off("backbutton", h);
|
|
434
434
|
});
|
|
435
435
|
const i = (f) => {
|
|
436
436
|
e.value = f;
|
|
437
|
-
},
|
|
437
|
+
}, w = (f) => {
|
|
438
438
|
t.value = f;
|
|
439
439
|
}, d = (f) => {
|
|
440
440
|
const m = f;
|
|
@@ -442,10 +442,10 @@ function Nt(e, t, a, o, l, r) {
|
|
|
442
442
|
}, j = (f) => {
|
|
443
443
|
l.value = f;
|
|
444
444
|
};
|
|
445
|
-
|
|
446
|
-
u.on("updateDark", i), u.on("updateLocale",
|
|
445
|
+
we(() => {
|
|
446
|
+
u.on("updateDark", i), u.on("updateLocale", w), u.on("updatePermission", d), u.on("updateLastAppPath", j), u.emit("syncGlobalState");
|
|
447
447
|
}), K(() => {
|
|
448
|
-
u.off("updateDark", i), u.off("updateLocale",
|
|
448
|
+
u.off("updateDark", i), u.off("updateLocale", w), u.off("updatePermission", d), u.off("updateLastAppPath", j);
|
|
449
449
|
});
|
|
450
450
|
}
|
|
451
451
|
function Wt() {
|
|
@@ -485,21 +485,21 @@ function J(e, t) {
|
|
|
485
485
|
u.off(e, l);
|
|
486
486
|
}), { open: o };
|
|
487
487
|
}
|
|
488
|
-
const at = /* @__PURE__ */
|
|
488
|
+
const at = /* @__PURE__ */ A({
|
|
489
489
|
__name: "index",
|
|
490
490
|
setup(e) {
|
|
491
|
-
const { t } = G(), a = p(""), o = p(""), l = p(""), r = p(""),
|
|
492
|
-
let _ = 0,
|
|
493
|
-
const
|
|
494
|
-
const i =
|
|
495
|
-
a.value = i.title, o.value = i.text, l.value = i.cancel?.color ?? "primary", r.value = i.cancel?.text ?? t("dlg.common.cancel"),
|
|
496
|
-
}, { open: D } = J("confirmDlg",
|
|
497
|
-
D.value = !1,
|
|
491
|
+
const { t } = G(), a = p(""), o = p(""), l = p(""), r = p(""), s = p(""), n = p("");
|
|
492
|
+
let _ = 0, c = !1;
|
|
493
|
+
const x = (h) => {
|
|
494
|
+
const i = h;
|
|
495
|
+
a.value = i.title, o.value = i.text, l.value = i.cancel?.color ?? "primary", r.value = i.cancel?.text ?? t("dlg.common.cancel"), s.value = i.confirm?.color ?? "primary", n.value = i.confirm?.text ?? t("dlg.common.confirm"), _ = i.seq, c = !1, D.value = !0;
|
|
496
|
+
}, { open: D } = J("confirmDlg", x), y = () => {
|
|
497
|
+
D.value = !1, c || (u.emit("confirmDlgResult" + _, !0), c = !0);
|
|
498
498
|
};
|
|
499
|
-
return F(D, (
|
|
500
|
-
!
|
|
501
|
-
}), (
|
|
502
|
-
const
|
|
499
|
+
return F(D, (h) => {
|
|
500
|
+
!h && !c && (u.emit("confirmDlgResult" + _, !1), c = !0);
|
|
501
|
+
}), (h, i) => {
|
|
502
|
+
const w = v("v-card-text"), d = v("v-btn"), j = v("v-card-actions"), f = v("v-card"), m = v("v-dialog");
|
|
503
503
|
return q(), L(m, {
|
|
504
504
|
modelValue: E(D),
|
|
505
505
|
"onUpdate:modelValue": i[1] || (i[1] = (V) => W(D) ? D.value = V : null),
|
|
@@ -507,14 +507,14 @@ const at = /* @__PURE__ */ I({
|
|
|
507
507
|
"max-width": "600px",
|
|
508
508
|
transition: "dialog-top-transition",
|
|
509
509
|
onKeydown: [
|
|
510
|
-
z(
|
|
511
|
-
i[2] || (i[2] = z(
|
|
510
|
+
z(M(y, ["stop", "prevent"]), ["enter"]),
|
|
511
|
+
i[2] || (i[2] = z(M((V) => D.value = !1, ["stop", "prevent"]), ["esc"]))
|
|
512
512
|
]
|
|
513
513
|
}, {
|
|
514
514
|
default: g(() => [
|
|
515
515
|
b(f, { title: a.value }, {
|
|
516
516
|
default: g(() => [
|
|
517
|
-
b(
|
|
517
|
+
b(w, null, {
|
|
518
518
|
default: g(() => [
|
|
519
519
|
B(S(o.value), 1)
|
|
520
520
|
]),
|
|
@@ -533,7 +533,7 @@ const at = /* @__PURE__ */ I({
|
|
|
533
533
|
_: 1
|
|
534
534
|
}, 8, ["color"]),
|
|
535
535
|
b(d, {
|
|
536
|
-
color:
|
|
536
|
+
color: s.value,
|
|
537
537
|
variant: "text",
|
|
538
538
|
onClick: y
|
|
539
539
|
}, {
|
|
@@ -553,7 +553,7 @@ const at = /* @__PURE__ */ I({
|
|
|
553
553
|
}, 8, ["modelValue", "onKeydown"]);
|
|
554
554
|
};
|
|
555
555
|
}
|
|
556
|
-
}), ot = /* @__PURE__ */
|
|
556
|
+
}), ot = /* @__PURE__ */ A({
|
|
557
557
|
__name: "index",
|
|
558
558
|
props: {
|
|
559
559
|
open: { type: Boolean, default: !0 },
|
|
@@ -567,7 +567,7 @@ const at = /* @__PURE__ */ I({
|
|
|
567
567
|
let o = 0;
|
|
568
568
|
return (l, r) => (q(), L(ke, { name: "fade" }, {
|
|
569
569
|
default: g(() => [
|
|
570
|
-
|
|
570
|
+
e.open ? (q(), P("div", {
|
|
571
571
|
key: W(o) ? ++o.value : ++o,
|
|
572
572
|
class: "x-cont",
|
|
573
573
|
style: ue(a.value)
|
|
@@ -596,7 +596,7 @@ const at = /* @__PURE__ */ I({
|
|
|
596
596
|
for (const [o, l] of t)
|
|
597
597
|
a[o] = l;
|
|
598
598
|
return a;
|
|
599
|
-
}, lt = /* @__PURE__ */ oe(ot, [["__scopeId", "data-v-83c3cd1d"]]), nt = /* @__PURE__ */
|
|
599
|
+
}, lt = /* @__PURE__ */ oe(ot, [["__scopeId", "data-v-83c3cd1d"]]), nt = /* @__PURE__ */ A({
|
|
600
600
|
__name: "item",
|
|
601
601
|
props: {
|
|
602
602
|
id: {},
|
|
@@ -627,13 +627,13 @@ const at = /* @__PURE__ */ I({
|
|
|
627
627
|
setTimeout(() => {
|
|
628
628
|
r("timeout", e.id);
|
|
629
629
|
}, e.timeout);
|
|
630
|
-
}), F(l, (
|
|
631
|
-
|
|
632
|
-
}), (
|
|
633
|
-
const _ = v("v-icon"),
|
|
634
|
-
return q(), L(
|
|
630
|
+
}), F(l, (s) => {
|
|
631
|
+
s || r("timeout", e.id);
|
|
632
|
+
}), (s, n) => {
|
|
633
|
+
const _ = v("v-icon"), c = v("v-sheet");
|
|
634
|
+
return q(), L(c, {
|
|
635
635
|
class: "x-item d-flex align-center py-2 mb-2",
|
|
636
|
-
color:
|
|
636
|
+
color: e.type,
|
|
637
637
|
elevation: 1
|
|
638
638
|
}, {
|
|
639
639
|
default: g(() => [
|
|
@@ -644,18 +644,18 @@ const at = /* @__PURE__ */ I({
|
|
|
644
644
|
}, null, 8, ["icon"])) : ee("", !0),
|
|
645
645
|
k("div", {
|
|
646
646
|
style: ue(a.value)
|
|
647
|
-
}, S(
|
|
647
|
+
}, S(e.text), 5),
|
|
648
648
|
b(_, {
|
|
649
649
|
class: "mx-1",
|
|
650
650
|
icon: "mdi-close",
|
|
651
|
-
onClick: n[0] || (n[0] = (
|
|
651
|
+
onClick: n[0] || (n[0] = (x) => r("timeout", e.id))
|
|
652
652
|
})
|
|
653
653
|
]),
|
|
654
654
|
_: 1
|
|
655
655
|
}, 8, ["color"]);
|
|
656
656
|
};
|
|
657
657
|
}
|
|
658
|
-
}), rt = /* @__PURE__ */ oe(nt, [["__scopeId", "data-v-f1f60167"]]), ut = /* @__PURE__ */
|
|
658
|
+
}), rt = /* @__PURE__ */ oe(nt, [["__scopeId", "data-v-f1f60167"]]), ut = /* @__PURE__ */ A({
|
|
659
659
|
__name: "index",
|
|
660
660
|
setup(e) {
|
|
661
661
|
const t = p([]);
|
|
@@ -665,47 +665,47 @@ const at = /* @__PURE__ */ I({
|
|
|
665
665
|
u.off("message", a);
|
|
666
666
|
});
|
|
667
667
|
const a = (n) => {
|
|
668
|
-
const { type: _, text:
|
|
669
|
-
r(_,
|
|
668
|
+
const { type: _, text: c, timeout: x } = n;
|
|
669
|
+
r(_, c, x);
|
|
670
670
|
}, o = (n) => {
|
|
671
|
-
|
|
671
|
+
s(n);
|
|
672
672
|
};
|
|
673
673
|
let l = 0;
|
|
674
|
-
const r = (n, _,
|
|
675
|
-
const
|
|
676
|
-
t.value.push({ id:
|
|
677
|
-
},
|
|
678
|
-
const _ = t.value.findIndex((
|
|
674
|
+
const r = (n, _, c) => {
|
|
675
|
+
const x = l++;
|
|
676
|
+
t.value.push({ id: x, type: n, text: _, timeout: c });
|
|
677
|
+
}, s = (n) => {
|
|
678
|
+
const _ = t.value.findIndex((c) => c.id === n);
|
|
679
679
|
_ >= 0 && t.value.splice(_, 1);
|
|
680
680
|
};
|
|
681
681
|
return (n, _) => (q(), P("div", {
|
|
682
682
|
class: "x-cont d-flex flex-column-reverse align-center",
|
|
683
|
-
onClick: _[0] || (_[0] =
|
|
683
|
+
onClick: _[0] || (_[0] = M(() => {
|
|
684
684
|
}, ["stop"]))
|
|
685
685
|
}, [
|
|
686
|
-
(q(!0), P(De, null, Ve(t.value, (
|
|
687
|
-
id:
|
|
688
|
-
key:
|
|
689
|
-
text:
|
|
690
|
-
timeout:
|
|
691
|
-
type:
|
|
686
|
+
(q(!0), P(De, null, Ve(t.value, (c) => (q(), L(rt, {
|
|
687
|
+
id: c.id,
|
|
688
|
+
key: c.id,
|
|
689
|
+
text: c.text,
|
|
690
|
+
timeout: c.timeout,
|
|
691
|
+
type: c.type,
|
|
692
692
|
onTimeout: o
|
|
693
693
|
}, null, 8, ["id", "text", "timeout", "type"]))), 128))
|
|
694
694
|
]));
|
|
695
695
|
}
|
|
696
|
-
}), ct = /* @__PURE__ */ oe(ut, [["__scopeId", "data-v-b482df18"]]), st = /* @__PURE__ */
|
|
696
|
+
}), ct = /* @__PURE__ */ oe(ut, [["__scopeId", "data-v-b482df18"]]), st = /* @__PURE__ */ A({
|
|
697
697
|
__name: "index",
|
|
698
698
|
setup(e) {
|
|
699
|
-
const { t } = G(), a = p(""), o = p(0), l = p(), r = p(-1 / 0),
|
|
700
|
-
let _ = 0,
|
|
701
|
-
const
|
|
702
|
-
a.value =
|
|
703
|
-
}, { open: y } = J("numberDlg", D),
|
|
704
|
-
y.value = !1,
|
|
699
|
+
const { t } = G(), a = p(""), o = p(0), l = p(), r = p(-1 / 0), s = p(1 / 0), n = p(1);
|
|
700
|
+
let _ = 0, c = !1;
|
|
701
|
+
const x = ce("target"), D = async (w) => {
|
|
702
|
+
a.value = w.title, o.value = w.value, l.value = w.precision, r.value = w.min, s.value = w.max, n.value = w.step, _ = w.seq, c = !1, y.value = !0, await X(() => !!x.value), x.value.focus();
|
|
703
|
+
}, { open: y } = J("numberDlg", D), h = p(!1), i = () => {
|
|
704
|
+
y.value = !1, c || (u.emit(`numberDlgResult${_}`, o.value), c = !0);
|
|
705
705
|
};
|
|
706
|
-
return F(y, (
|
|
707
|
-
!
|
|
708
|
-
}), (
|
|
706
|
+
return F(y, (w) => {
|
|
707
|
+
!w && !c && (u.emit(`numberDlgResult${_}`, void 0), c = !0);
|
|
708
|
+
}), (w, d) => {
|
|
709
709
|
const j = v("v-number-input"), f = v("v-btn"), m = v("v-card-actions"), V = v("v-form"), Q = v("v-card"), Y = v("v-dialog");
|
|
710
710
|
return q(), L(Y, {
|
|
711
711
|
modelValue: E(y),
|
|
@@ -713,25 +713,25 @@ const at = /* @__PURE__ */ I({
|
|
|
713
713
|
attach: "",
|
|
714
714
|
"max-width": "600px",
|
|
715
715
|
transition: "dialog-top-transition",
|
|
716
|
-
onKeydown: d[4] || (d[4] = z(
|
|
716
|
+
onKeydown: d[4] || (d[4] = z(M((R) => y.value = !1, ["stop", "prevent"]), ["esc"]))
|
|
717
717
|
}, {
|
|
718
718
|
default: g(() => [
|
|
719
719
|
b(Q, { title: a.value }, {
|
|
720
720
|
default: g(() => [
|
|
721
721
|
b(V, {
|
|
722
|
-
modelValue:
|
|
723
|
-
"onUpdate:modelValue": d[2] || (d[2] = (R) =>
|
|
722
|
+
modelValue: h.value,
|
|
723
|
+
"onUpdate:modelValue": d[2] || (d[2] = (R) => h.value = R),
|
|
724
724
|
class: "mx-3",
|
|
725
|
-
onSubmit:
|
|
725
|
+
onSubmit: M(i, ["prevent"])
|
|
726
726
|
}, {
|
|
727
727
|
default: g(() => [
|
|
728
728
|
b(j, {
|
|
729
729
|
ref_key: "target",
|
|
730
|
-
ref:
|
|
730
|
+
ref: x,
|
|
731
731
|
modelValue: o.value,
|
|
732
732
|
"onUpdate:modelValue": d[0] || (d[0] = (R) => o.value = R),
|
|
733
733
|
"control-variant": "stacked",
|
|
734
|
-
max:
|
|
734
|
+
max: s.value,
|
|
735
735
|
min: r.value,
|
|
736
736
|
precision: l.value,
|
|
737
737
|
step: n.value
|
|
@@ -750,7 +750,7 @@ const at = /* @__PURE__ */ I({
|
|
|
750
750
|
}),
|
|
751
751
|
b(f, {
|
|
752
752
|
color: "primary",
|
|
753
|
-
disabled: !
|
|
753
|
+
disabled: !h.value,
|
|
754
754
|
type: "submit",
|
|
755
755
|
variant: "text"
|
|
756
756
|
}, {
|
|
@@ -773,30 +773,30 @@ const at = /* @__PURE__ */ I({
|
|
|
773
773
|
}, 8, ["modelValue"]);
|
|
774
774
|
};
|
|
775
775
|
}
|
|
776
|
-
}), pt = /* @__PURE__ */
|
|
776
|
+
}), pt = /* @__PURE__ */ A({
|
|
777
777
|
__name: "index",
|
|
778
778
|
setup(e) {
|
|
779
|
-
const { t } = G(), a = p(""), o = p(""), l = p(""), r = p(""),
|
|
780
|
-
let y = 0,
|
|
781
|
-
const i = ce("target"),
|
|
782
|
-
a.value = m.title, o.value = m.text, l.value = m.label, r.value = m.placeholder,
|
|
783
|
-
}, { open: d } = J("promptDlg",
|
|
784
|
-
d.value = !1,
|
|
779
|
+
const { t } = G(), a = p(""), o = p(""), l = p(""), r = p(""), s = p(), n = p(""), _ = p(""), c = p(""), x = p(""), D = p("");
|
|
780
|
+
let y = 0, h = !1;
|
|
781
|
+
const i = ce("target"), w = async (m) => {
|
|
782
|
+
a.value = m.title, o.value = m.text, l.value = m.label, r.value = m.placeholder, s.value = m.rules, n.value = m.value, _.value = m.cancel?.color ?? "primary", c.value = m.cancel?.text ?? t("dlg.common.cancel"), x.value = m.confirm?.color ?? "primary", D.value = m.confirm?.text ?? t("dlg.common.confirm"), y = m.seq, h = !1, d.value = !0, await X(() => !!i.value), i.value.focus();
|
|
783
|
+
}, { open: d } = J("promptDlg", w), j = p(!1), f = () => {
|
|
784
|
+
d.value = !1, h || (u.emit("promptDlgResult" + y, n.value ?? ""), h = !0);
|
|
785
785
|
};
|
|
786
786
|
return F(d, (m) => {
|
|
787
|
-
!m && !
|
|
787
|
+
!m && !h && (u.emit("promptDlgResult" + y, void 0), h = !0);
|
|
788
788
|
}), (m, V) => {
|
|
789
|
-
const Q = v("v-card-text"), Y = v("v-text-field"), R = v("v-btn"), be = v("v-card-actions"), ye = v("v-form"),
|
|
790
|
-
return q(), L(
|
|
789
|
+
const Q = v("v-card-text"), Y = v("v-text-field"), R = v("v-btn"), be = v("v-card-actions"), ye = v("v-form"), xe = v("v-card"), he = v("v-dialog");
|
|
790
|
+
return q(), L(he, {
|
|
791
791
|
modelValue: E(d),
|
|
792
|
-
"onUpdate:modelValue": V[3] || (V[3] = (
|
|
792
|
+
"onUpdate:modelValue": V[3] || (V[3] = (I) => W(d) ? d.value = I : null),
|
|
793
793
|
attach: "",
|
|
794
794
|
"max-width": "600px",
|
|
795
795
|
transition: "dialog-top-transition",
|
|
796
|
-
onKeydown: V[4] || (V[4] = z(
|
|
796
|
+
onKeydown: V[4] || (V[4] = z(M((I) => d.value = !1, ["stop", "prevent"]), ["esc"]))
|
|
797
797
|
}, {
|
|
798
798
|
default: g(() => [
|
|
799
|
-
b(
|
|
799
|
+
b(xe, { title: a.value }, {
|
|
800
800
|
default: g(() => [
|
|
801
801
|
o.value ? (q(), L(Q, { key: 0 }, {
|
|
802
802
|
default: g(() => [
|
|
@@ -806,34 +806,34 @@ const at = /* @__PURE__ */ I({
|
|
|
806
806
|
})) : ee("", !0),
|
|
807
807
|
b(ye, {
|
|
808
808
|
modelValue: j.value,
|
|
809
|
-
"onUpdate:modelValue": V[2] || (V[2] = (
|
|
809
|
+
"onUpdate:modelValue": V[2] || (V[2] = (I) => j.value = I),
|
|
810
810
|
class: "mx-3",
|
|
811
|
-
onSubmit:
|
|
811
|
+
onSubmit: M(f, ["prevent"])
|
|
812
812
|
}, {
|
|
813
813
|
default: g(() => [
|
|
814
814
|
b(Y, {
|
|
815
815
|
ref_key: "target",
|
|
816
816
|
ref: i,
|
|
817
817
|
modelValue: n.value,
|
|
818
|
-
"onUpdate:modelValue": V[0] || (V[0] = (
|
|
818
|
+
"onUpdate:modelValue": V[0] || (V[0] = (I) => n.value = I),
|
|
819
819
|
label: l.value,
|
|
820
820
|
placeholder: r.value,
|
|
821
|
-
rules:
|
|
821
|
+
rules: s.value
|
|
822
822
|
}, null, 8, ["modelValue", "label", "placeholder", "rules"]),
|
|
823
823
|
b(be, { class: "d-flex justify-end" }, {
|
|
824
824
|
default: g(() => [
|
|
825
825
|
b(R, {
|
|
826
826
|
color: _.value,
|
|
827
827
|
variant: "text",
|
|
828
|
-
onClick: V[1] || (V[1] = (
|
|
828
|
+
onClick: V[1] || (V[1] = (I) => d.value = !1)
|
|
829
829
|
}, {
|
|
830
830
|
default: g(() => [
|
|
831
|
-
B(S(
|
|
831
|
+
B(S(c.value), 1)
|
|
832
832
|
]),
|
|
833
833
|
_: 1
|
|
834
834
|
}, 8, ["color"]),
|
|
835
835
|
b(R, {
|
|
836
|
-
color:
|
|
836
|
+
color: x.value,
|
|
837
837
|
disabled: !j.value,
|
|
838
838
|
type: "submit",
|
|
839
839
|
variant: "text"
|
|
@@ -857,11 +857,11 @@ const at = /* @__PURE__ */ I({
|
|
|
857
857
|
}, 8, ["modelValue"]);
|
|
858
858
|
};
|
|
859
859
|
}
|
|
860
|
-
}), _t = { class: "ma-auto" }, dt = { class: "w-100 h-100 d-flex align-center justify-center" }, it = { class: "text-body-1" }, ft = /* @__PURE__ */
|
|
860
|
+
}), _t = { class: "ma-auto" }, dt = { class: "w-100 h-100 d-flex align-center justify-center" }, it = { class: "text-body-1" }, ft = /* @__PURE__ */ A({
|
|
861
861
|
__name: "index",
|
|
862
862
|
setup(e) {
|
|
863
|
-
const { t } = G(), a = p(""), o = (
|
|
864
|
-
const n =
|
|
863
|
+
const { t } = G(), a = p(""), o = (s) => {
|
|
864
|
+
const n = s;
|
|
865
865
|
a.value = n.text ?? t("dlg.common.responding"), r.value = !0;
|
|
866
866
|
}, l = () => {
|
|
867
867
|
r.value = !1;
|
|
@@ -870,11 +870,11 @@ const at = /* @__PURE__ */ I({
|
|
|
870
870
|
u.on("closeWaitDlg", l);
|
|
871
871
|
}), K(() => {
|
|
872
872
|
u.off("closeWaitDlg", l);
|
|
873
|
-
}), (
|
|
874
|
-
const _ = v("v-card"),
|
|
875
|
-
return q(), L(
|
|
873
|
+
}), (s, n) => {
|
|
874
|
+
const _ = v("v-card"), c = v("v-dialog");
|
|
875
|
+
return q(), L(c, {
|
|
876
876
|
modelValue: E(r),
|
|
877
|
-
"onUpdate:modelValue": n[0] || (n[0] = (
|
|
877
|
+
"onUpdate:modelValue": n[0] || (n[0] = (x) => W(r) ? r.value = x : null),
|
|
878
878
|
attach: "",
|
|
879
879
|
fullscreen: "",
|
|
880
880
|
"no-click-animation": "",
|
|
@@ -915,7 +915,7 @@ const Ht = { install: gt };
|
|
|
915
915
|
export {
|
|
916
916
|
Ue as Permission,
|
|
917
917
|
Pe as addView,
|
|
918
|
-
|
|
918
|
+
Ae as appAppear,
|
|
919
919
|
Kt as clearViews,
|
|
920
920
|
St as closeWaitDlg,
|
|
921
921
|
kt as createAxios,
|
|
@@ -924,10 +924,10 @@ export {
|
|
|
924
924
|
u as eventBus,
|
|
925
925
|
Dt as globalObjects,
|
|
926
926
|
me as hasView,
|
|
927
|
-
|
|
927
|
+
It as injectDark,
|
|
928
928
|
Et as injectLastAppPath,
|
|
929
|
-
|
|
930
|
-
|
|
929
|
+
Mt as injectLocale,
|
|
930
|
+
At as injectPermissionChecksum,
|
|
931
931
|
Xe as injectPermissionObjects,
|
|
932
932
|
Ge as injectViews,
|
|
933
933
|
Ze as isEmpty,
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import { getCurrentInstance as j, getCurrentScope as M, hasInjectionContext as x, inject as I, watch as b, onScopeDispose as E, shallowRef as h, watchEffect as O, toValue as p, computed as w, onMounted as R, unref as D } from "vue";
|
|
2
|
+
function U(e, n) {
|
|
3
|
+
return M() ? (E(e, n), !0) : !1;
|
|
4
|
+
}
|
|
5
|
+
const g = /* @__PURE__ */ new WeakMap(), A = /* @__NO_SIDE_EFFECTS__ */ (...e) => {
|
|
6
|
+
var n;
|
|
7
|
+
const t = e[0], i = (n = j()) === null || n === void 0 ? void 0 : n.proxy, o = i ?? M();
|
|
8
|
+
if (o == null && !x()) throw new Error("injectLocal must be called in setup");
|
|
9
|
+
return o && g.has(o) && t in g.get(o) ? g.get(o)[t] : I(...e);
|
|
10
|
+
}, B = typeof window < "u" && typeof document < "u";
|
|
11
|
+
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
12
|
+
const F = Object.prototype.toString, L = (e) => F.call(e) === "[object Object]";
|
|
13
|
+
function S(e) {
|
|
14
|
+
return e.endsWith("rem") ? Number.parseFloat(e) * 16 : Number.parseFloat(e);
|
|
15
|
+
}
|
|
16
|
+
function y(e) {
|
|
17
|
+
return Array.isArray(e) ? e : [e];
|
|
18
|
+
}
|
|
19
|
+
function P(e, n, t) {
|
|
20
|
+
return b(e, n, {
|
|
21
|
+
...t,
|
|
22
|
+
immediate: !0
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
const W = B ? window : void 0;
|
|
26
|
+
function T(e) {
|
|
27
|
+
var n;
|
|
28
|
+
const t = p(e);
|
|
29
|
+
return (n = t?.$el) !== null && n !== void 0 ? n : t;
|
|
30
|
+
}
|
|
31
|
+
function $(...e) {
|
|
32
|
+
const n = [], t = () => {
|
|
33
|
+
n.forEach((r) => r()), n.length = 0;
|
|
34
|
+
}, i = (r, c, s, l) => (r.addEventListener(c, s, l), () => r.removeEventListener(c, s, l)), o = w(() => {
|
|
35
|
+
const r = y(p(e[0])).filter((c) => c != null);
|
|
36
|
+
return r.every((c) => typeof c != "string") ? r : void 0;
|
|
37
|
+
}), a = P(() => {
|
|
38
|
+
var r, c;
|
|
39
|
+
return [
|
|
40
|
+
(r = (c = o.value) === null || c === void 0 ? void 0 : c.map((s) => T(s))) !== null && r !== void 0 ? r : [W].filter((s) => s != null),
|
|
41
|
+
y(p(o.value ? e[1] : e[0])),
|
|
42
|
+
y(D(o.value ? e[2] : e[1])),
|
|
43
|
+
p(o.value ? e[3] : e[2])
|
|
44
|
+
];
|
|
45
|
+
}, ([r, c, s, l]) => {
|
|
46
|
+
if (t(), !r?.length || !c?.length || !s?.length) return;
|
|
47
|
+
const f = L(l) ? { ...l } : l;
|
|
48
|
+
n.push(...r.flatMap((v) => c.flatMap((d) => s.map((k) => i(v, d, k, f)))));
|
|
49
|
+
}, { flush: "post" }), u = () => {
|
|
50
|
+
a(), t();
|
|
51
|
+
};
|
|
52
|
+
return U(t), u;
|
|
53
|
+
}
|
|
54
|
+
// @__NO_SIDE_EFFECTS__
|
|
55
|
+
function z() {
|
|
56
|
+
const e = h(!1), n = j();
|
|
57
|
+
return n && R(() => {
|
|
58
|
+
e.value = !0;
|
|
59
|
+
}, n), e;
|
|
60
|
+
}
|
|
61
|
+
// @__NO_SIDE_EFFECTS__
|
|
62
|
+
function G(e) {
|
|
63
|
+
const n = /* @__PURE__ */ z();
|
|
64
|
+
return w(() => (n.value, !!e()));
|
|
65
|
+
}
|
|
66
|
+
const Q = Symbol("vueuse-ssr-width");
|
|
67
|
+
// @__NO_SIDE_EFFECTS__
|
|
68
|
+
function V() {
|
|
69
|
+
const e = x() ? /* @__PURE__ */ A(Q, null) : null;
|
|
70
|
+
return typeof e == "number" ? e : void 0;
|
|
71
|
+
}
|
|
72
|
+
function H(e, n = {}) {
|
|
73
|
+
const { window: t = W, ssrWidth: i = /* @__PURE__ */ V() } = n, o = /* @__PURE__ */ G(() => t && "matchMedia" in t && typeof t.matchMedia == "function"), a = h(typeof i == "number"), u = h(), r = h(!1), c = (s) => {
|
|
74
|
+
r.value = s.matches;
|
|
75
|
+
};
|
|
76
|
+
return O(() => {
|
|
77
|
+
if (a.value) {
|
|
78
|
+
a.value = !o.value, r.value = p(e).split(",").some((s) => {
|
|
79
|
+
const l = s.includes("not all"), f = s.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/), v = s.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);
|
|
80
|
+
let d = !!(f || v);
|
|
81
|
+
return f && d && (d = i >= S(f[1])), v && d && (d = i <= S(v[1])), l ? !d : d;
|
|
82
|
+
});
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
o.value && (u.value = t.matchMedia(p(e)), r.value = u.value.matches);
|
|
86
|
+
}), $(u, "change", c, { passive: !0 }), w(() => r.value);
|
|
87
|
+
}
|
|
88
|
+
// @__NO_SIDE_EFFECTS__
|
|
89
|
+
function X(e) {
|
|
90
|
+
return H("(prefers-color-scheme: dark)", e);
|
|
91
|
+
}
|
|
92
|
+
/*! js-cookie v3.0.5 | MIT */
|
|
93
|
+
function m(e) {
|
|
94
|
+
for (var n = 1; n < arguments.length; n++) {
|
|
95
|
+
var t = arguments[n];
|
|
96
|
+
for (var i in t)
|
|
97
|
+
e[i] = t[i];
|
|
98
|
+
}
|
|
99
|
+
return e;
|
|
100
|
+
}
|
|
101
|
+
var J = {
|
|
102
|
+
read: function(e) {
|
|
103
|
+
return e[0] === '"' && (e = e.slice(1, -1)), e.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
|
|
104
|
+
},
|
|
105
|
+
write: function(e) {
|
|
106
|
+
return encodeURIComponent(e).replace(
|
|
107
|
+
/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,
|
|
108
|
+
decodeURIComponent
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
function C(e, n) {
|
|
113
|
+
function t(o, a, u) {
|
|
114
|
+
if (!(typeof document > "u")) {
|
|
115
|
+
u = m({}, n, u), typeof u.expires == "number" && (u.expires = new Date(Date.now() + u.expires * 864e5)), u.expires && (u.expires = u.expires.toUTCString()), o = encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
|
|
116
|
+
var r = "";
|
|
117
|
+
for (var c in u)
|
|
118
|
+
u[c] && (r += "; " + c, u[c] !== !0 && (r += "=" + u[c].split(";")[0]));
|
|
119
|
+
return document.cookie = o + "=" + e.write(a, o) + r;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
function i(o) {
|
|
123
|
+
if (!(typeof document > "u" || arguments.length && !o)) {
|
|
124
|
+
for (var a = document.cookie ? document.cookie.split("; ") : [], u = {}, r = 0; r < a.length; r++) {
|
|
125
|
+
var c = a[r].split("="), s = c.slice(1).join("=");
|
|
126
|
+
try {
|
|
127
|
+
var l = decodeURIComponent(c[0]);
|
|
128
|
+
if (u[l] = e.read(s, l), o === l)
|
|
129
|
+
break;
|
|
130
|
+
} catch {
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
return o ? u[o] : u;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
return Object.create(
|
|
137
|
+
{
|
|
138
|
+
set: t,
|
|
139
|
+
get: i,
|
|
140
|
+
remove: function(o, a) {
|
|
141
|
+
t(
|
|
142
|
+
o,
|
|
143
|
+
"",
|
|
144
|
+
m({}, a, {
|
|
145
|
+
expires: -1
|
|
146
|
+
})
|
|
147
|
+
);
|
|
148
|
+
},
|
|
149
|
+
withAttributes: function(o) {
|
|
150
|
+
return C(this.converter, m({}, this.attributes, o));
|
|
151
|
+
},
|
|
152
|
+
withConverter: function(o) {
|
|
153
|
+
return C(m({}, this.converter, o), this.attributes);
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
attributes: { value: Object.freeze(n) },
|
|
158
|
+
converter: { value: Object.freeze(e) }
|
|
159
|
+
}
|
|
160
|
+
);
|
|
161
|
+
}
|
|
162
|
+
var Y = C(J, { path: "/" });
|
|
163
|
+
function Z(e) {
|
|
164
|
+
return { all: e = e || /* @__PURE__ */ new Map(), on: function(n, t) {
|
|
165
|
+
var i = e.get(n);
|
|
166
|
+
i ? i.push(t) : e.set(n, [t]);
|
|
167
|
+
}, off: function(n, t) {
|
|
168
|
+
var i = e.get(n);
|
|
169
|
+
i && (t ? i.splice(i.indexOf(t) >>> 0, 1) : e.set(n, []));
|
|
170
|
+
}, emit: function(n, t) {
|
|
171
|
+
var i = e.get(n);
|
|
172
|
+
i && i.slice().map(function(o) {
|
|
173
|
+
o(t);
|
|
174
|
+
}), (i = e.get("*")) && i.slice().map(function(o) {
|
|
175
|
+
o(n, t);
|
|
176
|
+
});
|
|
177
|
+
} };
|
|
178
|
+
}
|
|
179
|
+
export {
|
|
180
|
+
Y as a,
|
|
181
|
+
Z as m,
|
|
182
|
+
X as u
|
|
183
|
+
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "x-essential-lib",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.9.
|
|
4
|
+
"version": "0.9.2",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -22,35 +22,35 @@
|
|
|
22
22
|
"*": "prettier --write ."
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@vueuse/core": "^
|
|
26
|
-
"axios": "^1.12.
|
|
25
|
+
"@vueuse/core": "^14.0.0",
|
|
26
|
+
"axios": "^1.12.2",
|
|
27
27
|
"js-cookie": "^3.0.5",
|
|
28
28
|
"mitt": "^3.0.1",
|
|
29
|
-
"vue": "^3.5.
|
|
29
|
+
"vue": "^3.5.22",
|
|
30
30
|
"vue-i18n": "^11.1.12",
|
|
31
|
-
"vue-router": "^4.
|
|
32
|
-
"vuetify": "^3.10.
|
|
31
|
+
"vue-router": "^4.6.3",
|
|
32
|
+
"vuetify": "^3.10.7"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@eslint/js": "^9.
|
|
35
|
+
"@eslint/js": "^9.38.0",
|
|
36
36
|
"@types/js-cookie": "^3.0.6",
|
|
37
|
-
"@types/node": "^24.
|
|
37
|
+
"@types/node": "^24.9.1",
|
|
38
38
|
"@vitejs/plugin-vue": "^6.0.1",
|
|
39
|
-
"eslint": "^9.
|
|
39
|
+
"eslint": "^9.38.0",
|
|
40
40
|
"eslint-config-prettier": "^10.1.8",
|
|
41
41
|
"eslint-plugin-prettier": "^5.5.4",
|
|
42
|
-
"eslint-plugin-vue": "^10.
|
|
42
|
+
"eslint-plugin-vue": "^10.5.1",
|
|
43
43
|
"globals": "^16.4.0",
|
|
44
44
|
"husky": "^9.1.7",
|
|
45
|
-
"lint-staged": "^16.
|
|
45
|
+
"lint-staged": "^16.2.6",
|
|
46
46
|
"prettier": "3.6.2",
|
|
47
|
-
"sass": "^1.
|
|
48
|
-
"typescript": "^5.9.
|
|
49
|
-
"typescript-eslint": "^8.
|
|
50
|
-
"vite": "^7.1.
|
|
47
|
+
"sass": "^1.93.2",
|
|
48
|
+
"typescript": "^5.9.3",
|
|
49
|
+
"typescript-eslint": "^8.46.2",
|
|
50
|
+
"vite": "^7.1.11",
|
|
51
51
|
"vite-plugin-css-injected-by-js": "^3.5.2",
|
|
52
52
|
"vite-plugin-vuetify": "^2.1.2",
|
|
53
53
|
"vue-eslint-parser": "^10.2.0",
|
|
54
|
-
"vue-tsc": "^3.
|
|
54
|
+
"vue-tsc": "^3.1.1"
|
|
55
55
|
}
|
|
56
56
|
}
|
package/dist/vendor.ohp5twbt.js
DELETED
|
@@ -1,202 +0,0 @@
|
|
|
1
|
-
import { getCurrentInstance as M, hasInjectionContext as x, inject as b, watch as k, getCurrentScope as E, onScopeDispose as I, shallowRef as g, watchEffect as O, toValue as d, computed as S, onMounted as R, unref as D } from "vue";
|
|
2
|
-
function U(e) {
|
|
3
|
-
return E() ? (I(e), !0) : !1;
|
|
4
|
-
}
|
|
5
|
-
const y = /* @__PURE__ */ new WeakMap(), A = /* @__NO_SIDE_EFFECTS__ */ (...e) => {
|
|
6
|
-
var n;
|
|
7
|
-
const t = e[0], o = (n = M()) == null ? void 0 : n.proxy;
|
|
8
|
-
if (o == null && !x())
|
|
9
|
-
throw new Error("injectLocal must be called in setup");
|
|
10
|
-
return o && y.has(o) && t in y.get(o) ? y.get(o)[t] : b(...e);
|
|
11
|
-
}, B = typeof window < "u" && typeof document < "u";
|
|
12
|
-
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
13
|
-
const F = Object.prototype.toString, L = (e) => F.call(e) === "[object Object]";
|
|
14
|
-
function j(e) {
|
|
15
|
-
return e.endsWith("rem") ? Number.parseFloat(e) * 16 : Number.parseFloat(e);
|
|
16
|
-
}
|
|
17
|
-
function w(e) {
|
|
18
|
-
return Array.isArray(e) ? e : [e];
|
|
19
|
-
}
|
|
20
|
-
function z(e, n, t) {
|
|
21
|
-
return k(
|
|
22
|
-
e,
|
|
23
|
-
n,
|
|
24
|
-
{
|
|
25
|
-
...t,
|
|
26
|
-
immediate: !0
|
|
27
|
-
}
|
|
28
|
-
);
|
|
29
|
-
}
|
|
30
|
-
const W = B ? window : void 0;
|
|
31
|
-
function P(e) {
|
|
32
|
-
var n;
|
|
33
|
-
const t = d(e);
|
|
34
|
-
return (n = t?.$el) != null ? n : t;
|
|
35
|
-
}
|
|
36
|
-
function T(...e) {
|
|
37
|
-
const n = [], t = () => {
|
|
38
|
-
n.forEach((i) => i()), n.length = 0;
|
|
39
|
-
}, o = (i, c, s, l) => (i.addEventListener(c, s, l), () => i.removeEventListener(c, s, l)), r = S(() => {
|
|
40
|
-
const i = w(d(e[0])).filter((c) => c != null);
|
|
41
|
-
return i.every((c) => typeof c != "string") ? i : void 0;
|
|
42
|
-
}), a = z(
|
|
43
|
-
() => {
|
|
44
|
-
var i, c;
|
|
45
|
-
return [
|
|
46
|
-
(c = (i = r.value) == null ? void 0 : i.map((s) => P(s))) != null ? c : [W].filter((s) => s != null),
|
|
47
|
-
w(d(r.value ? e[1] : e[0])),
|
|
48
|
-
w(D(r.value ? e[2] : e[1])),
|
|
49
|
-
// @ts-expect-error - TypeScript gets the correct types, but somehow still complains
|
|
50
|
-
d(r.value ? e[3] : e[2])
|
|
51
|
-
];
|
|
52
|
-
},
|
|
53
|
-
([i, c, s, l]) => {
|
|
54
|
-
if (t(), !i?.length || !c?.length || !s?.length)
|
|
55
|
-
return;
|
|
56
|
-
const h = L(l) ? { ...l } : l;
|
|
57
|
-
n.push(
|
|
58
|
-
...i.flatMap(
|
|
59
|
-
(p) => c.flatMap(
|
|
60
|
-
(v) => s.map((f) => o(p, v, f, h))
|
|
61
|
-
)
|
|
62
|
-
)
|
|
63
|
-
);
|
|
64
|
-
},
|
|
65
|
-
{ flush: "post" }
|
|
66
|
-
), u = () => {
|
|
67
|
-
a(), t();
|
|
68
|
-
};
|
|
69
|
-
return U(t), u;
|
|
70
|
-
}
|
|
71
|
-
// @__NO_SIDE_EFFECTS__
|
|
72
|
-
function G() {
|
|
73
|
-
const e = g(!1), n = M();
|
|
74
|
-
return n && R(() => {
|
|
75
|
-
e.value = !0;
|
|
76
|
-
}, n), e;
|
|
77
|
-
}
|
|
78
|
-
// @__NO_SIDE_EFFECTS__
|
|
79
|
-
function Q(e) {
|
|
80
|
-
const n = /* @__PURE__ */ G();
|
|
81
|
-
return S(() => (n.value, !!e()));
|
|
82
|
-
}
|
|
83
|
-
const V = Symbol("vueuse-ssr-width");
|
|
84
|
-
// @__NO_SIDE_EFFECTS__
|
|
85
|
-
function $() {
|
|
86
|
-
const e = x() ? /* @__PURE__ */ A(V, null) : null;
|
|
87
|
-
return typeof e == "number" ? e : void 0;
|
|
88
|
-
}
|
|
89
|
-
function H(e, n = {}) {
|
|
90
|
-
const { window: t = W, ssrWidth: o = /* @__PURE__ */ $() } = n, r = /* @__PURE__ */ Q(() => t && "matchMedia" in t && typeof t.matchMedia == "function"), a = g(typeof o == "number"), u = g(), i = g(!1), c = (s) => {
|
|
91
|
-
i.value = s.matches;
|
|
92
|
-
};
|
|
93
|
-
return O(() => {
|
|
94
|
-
if (a.value) {
|
|
95
|
-
a.value = !r.value;
|
|
96
|
-
const s = d(e).split(",");
|
|
97
|
-
i.value = s.some((l) => {
|
|
98
|
-
const h = l.includes("not all"), p = l.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/), v = l.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);
|
|
99
|
-
let f = !!(p || v);
|
|
100
|
-
return p && f && (f = o >= j(p[1])), v && f && (f = o <= j(v[1])), h ? !f : f;
|
|
101
|
-
});
|
|
102
|
-
return;
|
|
103
|
-
}
|
|
104
|
-
r.value && (u.value = t.matchMedia(d(e)), i.value = u.value.matches);
|
|
105
|
-
}), T(u, "change", c, { passive: !0 }), S(() => i.value);
|
|
106
|
-
}
|
|
107
|
-
// @__NO_SIDE_EFFECTS__
|
|
108
|
-
function X(e) {
|
|
109
|
-
return H("(prefers-color-scheme: dark)", e);
|
|
110
|
-
}
|
|
111
|
-
/*! js-cookie v3.0.5 | MIT */
|
|
112
|
-
function m(e) {
|
|
113
|
-
for (var n = 1; n < arguments.length; n++) {
|
|
114
|
-
var t = arguments[n];
|
|
115
|
-
for (var o in t)
|
|
116
|
-
e[o] = t[o];
|
|
117
|
-
}
|
|
118
|
-
return e;
|
|
119
|
-
}
|
|
120
|
-
var J = {
|
|
121
|
-
read: function(e) {
|
|
122
|
-
return e[0] === '"' && (e = e.slice(1, -1)), e.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
|
|
123
|
-
},
|
|
124
|
-
write: function(e) {
|
|
125
|
-
return encodeURIComponent(e).replace(
|
|
126
|
-
/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,
|
|
127
|
-
decodeURIComponent
|
|
128
|
-
);
|
|
129
|
-
}
|
|
130
|
-
};
|
|
131
|
-
function C(e, n) {
|
|
132
|
-
function t(r, a, u) {
|
|
133
|
-
if (!(typeof document > "u")) {
|
|
134
|
-
u = m({}, n, u), typeof u.expires == "number" && (u.expires = new Date(Date.now() + u.expires * 864e5)), u.expires && (u.expires = u.expires.toUTCString()), r = encodeURIComponent(r).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
|
|
135
|
-
var i = "";
|
|
136
|
-
for (var c in u)
|
|
137
|
-
u[c] && (i += "; " + c, u[c] !== !0 && (i += "=" + u[c].split(";")[0]));
|
|
138
|
-
return document.cookie = r + "=" + e.write(a, r) + i;
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
function o(r) {
|
|
142
|
-
if (!(typeof document > "u" || arguments.length && !r)) {
|
|
143
|
-
for (var a = document.cookie ? document.cookie.split("; ") : [], u = {}, i = 0; i < a.length; i++) {
|
|
144
|
-
var c = a[i].split("="), s = c.slice(1).join("=");
|
|
145
|
-
try {
|
|
146
|
-
var l = decodeURIComponent(c[0]);
|
|
147
|
-
if (u[l] = e.read(s, l), r === l)
|
|
148
|
-
break;
|
|
149
|
-
} catch {
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
return r ? u[r] : u;
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
return Object.create(
|
|
156
|
-
{
|
|
157
|
-
set: t,
|
|
158
|
-
get: o,
|
|
159
|
-
remove: function(r, a) {
|
|
160
|
-
t(
|
|
161
|
-
r,
|
|
162
|
-
"",
|
|
163
|
-
m({}, a, {
|
|
164
|
-
expires: -1
|
|
165
|
-
})
|
|
166
|
-
);
|
|
167
|
-
},
|
|
168
|
-
withAttributes: function(r) {
|
|
169
|
-
return C(this.converter, m({}, this.attributes, r));
|
|
170
|
-
},
|
|
171
|
-
withConverter: function(r) {
|
|
172
|
-
return C(m({}, this.converter, r), this.attributes);
|
|
173
|
-
}
|
|
174
|
-
},
|
|
175
|
-
{
|
|
176
|
-
attributes: { value: Object.freeze(n) },
|
|
177
|
-
converter: { value: Object.freeze(e) }
|
|
178
|
-
}
|
|
179
|
-
);
|
|
180
|
-
}
|
|
181
|
-
var Y = C(J, { path: "/" });
|
|
182
|
-
function Z(e) {
|
|
183
|
-
return { all: e = e || /* @__PURE__ */ new Map(), on: function(n, t) {
|
|
184
|
-
var o = e.get(n);
|
|
185
|
-
o ? o.push(t) : e.set(n, [t]);
|
|
186
|
-
}, off: function(n, t) {
|
|
187
|
-
var o = e.get(n);
|
|
188
|
-
o && (t ? o.splice(o.indexOf(t) >>> 0, 1) : e.set(n, []));
|
|
189
|
-
}, emit: function(n, t) {
|
|
190
|
-
var o = e.get(n);
|
|
191
|
-
o && o.slice().map(function(r) {
|
|
192
|
-
r(t);
|
|
193
|
-
}), (o = e.get("*")) && o.slice().map(function(r) {
|
|
194
|
-
r(n, t);
|
|
195
|
-
});
|
|
196
|
-
} };
|
|
197
|
-
}
|
|
198
|
-
export {
|
|
199
|
-
Y as a,
|
|
200
|
-
Z as m,
|
|
201
|
-
X as u
|
|
202
|
-
};
|