x-essential-lib 0.8.3 → 0.8.5
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/index.js +180 -174
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.id="x-essential-lib",t.appendChild(document.createTextNode('.fade-leave-active[data-v-0c686889]{transition:opacity .5s ease}.fade-leave-to[data-v-0c686889]{opacity:0}.x-cont[data-v-0c686889]{position:absolute;top:0;left:0;bottom:0;right:0;display:flex;align-items:center;justify-content:center}.lds-spinner[data-v-0c686889]{color:official;display:inline-block;position:relative;width:40px;height:40px}.lds-spinner div[data-v-0c686889]{transform-origin:20px 20px;animation:lds-spinner-0c686889 1.2s linear infinite}.lds-spinner div[data-v-0c686889]:after{content:" ";display:block;position:absolute;top:3px;left:18px;width:2px;height:6px;border-radius:5%;background:#9e9e9e}.lds-spinner div[data-v-0c686889]:nth-child(1){transform:rotate(0);animation-delay:-1.1s}.lds-spinner div[data-v-0c686889]:nth-child(2){transform:rotate(30deg);animation-delay:-1s}.lds-spinner div[data-v-0c686889]:nth-child(3){transform:rotate(60deg);animation-delay:-.9s}.lds-spinner div[data-v-0c686889]:nth-child(4){transform:rotate(90deg);animation-delay:-.8s}.lds-spinner div[data-v-0c686889]:nth-child(5){transform:rotate(120deg);animation-delay:-.7s}.lds-spinner div[data-v-0c686889]:nth-child(6){transform:rotate(150deg);animation-delay:-.6s}.lds-spinner div[data-v-0c686889]:nth-child(7){transform:rotate(180deg);animation-delay:-.5s}.lds-spinner div[data-v-0c686889]:nth-child(8){transform:rotate(210deg);animation-delay:-.4s}.lds-spinner div[data-v-0c686889]:nth-child(9){transform:rotate(240deg);animation-delay:-.3s}.lds-spinner div[data-v-0c686889]:nth-child(10){transform:rotate(270deg);animation-delay:-.2s}.lds-spinner div[data-v-0c686889]:nth-child(11){transform:rotate(300deg);animation-delay:-.1s}.lds-spinner div[data-v-0c686889]:nth-child(12){transform:rotate(330deg);animation-delay:0s}@keyframes lds-spinner-0c686889{0%{opacity:1}to{opacity:0}}.x-item[data-v-d5cfe252]{width:600px}@media (max-width: 600px){.x-item[data-v-d5cfe252]{width:calc(100vw - 16px)}}.x-cont[data-v-c6a59757]{position:fixed;left:50%;bottom:20px;transform:translate(-50%);z-index:9999}')),document.head.appendChild(t)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}})();
|
|
2
|
-
import { computed as
|
|
2
|
+
import { computed as x, provide as T, inject as A, ref as g, getCurrentInstance as _e, hasInjectionContext as ie, watch as K, getCurrentScope as je, onScopeDispose as Re, shallowRef as ee, watchEffect as Ve, toValue as q, onMounted as B, unref as z, onBeforeUnmount as $, onBeforeMount as Ae, defineComponent as E, resolveComponent as b, createBlock as V, openBlock as D, withKeys as Z, withModifiers as H, isRef as Q, withCtx as w, createVNode as L, createTextVNode as O, toDisplayString as R, Transition as qe, createElementBlock as te, createCommentVNode as oe, normalizeStyle as de, createElementVNode as y, Fragment as Oe, renderList as Ie, useTemplateRef as Te } from "vue";
|
|
3
3
|
import { useI18n as ne } from "vue-i18n";
|
|
4
|
-
import { useTheme as fe, useDisplay as
|
|
5
|
-
import { useRouter as ge, useRoute as
|
|
4
|
+
import { useTheme as fe, useDisplay as Be } from "vuetify";
|
|
5
|
+
import { useRouter as ge, useRoute as Ee } from "vue-router";
|
|
6
6
|
import We from "axios";
|
|
7
7
|
function Ue() {
|
|
8
|
-
const e = fe(), t =
|
|
8
|
+
const e = fe(), t = x(() => e.global.current.value.colors.primary), a = x(() => e.global.current.value.colors.secondary), o = x(() => e.current.value.dark ? "#2e2e2e" : "#bdbdbd"), n = x(() => e.current.value.dark ? "#272727" : "#eeeeee"), l = x(() => e.current.value.dark ? "#1e1e1e" : "#ffffff"), c = x(() => e.current.value.dark ? "#303030" : "#f6f6f6"), r = x(() => e.current.value.dark ? "#ffffff1f" : "#0000001f");
|
|
9
9
|
return {
|
|
10
10
|
primaryColor: t,
|
|
11
11
|
secondaryColor: a,
|
|
@@ -51,8 +51,8 @@ function ae(e, t) {
|
|
|
51
51
|
for (var l = document.cookie ? document.cookie.split("; ") : [], c = {}, r = 0; r < l.length; r++) {
|
|
52
52
|
var u = l[r].split("="), s = u.slice(1).join("=");
|
|
53
53
|
try {
|
|
54
|
-
var
|
|
55
|
-
if (c[
|
|
54
|
+
var i = decodeURIComponent(u[0]);
|
|
55
|
+
if (c[i] = e.read(s, i), n === i)
|
|
56
56
|
break;
|
|
57
57
|
} catch {
|
|
58
58
|
}
|
|
@@ -380,8 +380,8 @@ function G(e) {
|
|
|
380
380
|
c > 0 && c > a && (t = n, a = c);
|
|
381
381
|
}), t;
|
|
382
382
|
}
|
|
383
|
-
const J =
|
|
384
|
-
function
|
|
383
|
+
const J = g("");
|
|
384
|
+
function S(e, t, a) {
|
|
385
385
|
t === "/" && (t = a);
|
|
386
386
|
const o = G(e), n = G(t);
|
|
387
387
|
if (!o) {
|
|
@@ -409,35 +409,35 @@ function _a(e, t, a, o) {
|
|
|
409
409
|
if (n)
|
|
410
410
|
if (l) {
|
|
411
411
|
const r = "/main";
|
|
412
|
-
|
|
412
|
+
S(r, t.path, o), a({ path: r });
|
|
413
413
|
} else
|
|
414
|
-
|
|
414
|
+
S(e.path, t.path, o), a();
|
|
415
415
|
else {
|
|
416
416
|
const r = "/passport/login";
|
|
417
|
-
|
|
417
|
+
S(r, t.path, o), a({ path: r });
|
|
418
418
|
}
|
|
419
419
|
else if (c.requiredState === "org")
|
|
420
420
|
if (n)
|
|
421
421
|
if (l)
|
|
422
|
-
|
|
422
|
+
S(e.path, t.path, o), a();
|
|
423
423
|
else {
|
|
424
424
|
const r = "/org/joinOrCreate";
|
|
425
|
-
|
|
425
|
+
S(r, t.path, o), a({ path: r });
|
|
426
426
|
}
|
|
427
427
|
else {
|
|
428
428
|
const r = "/passport/login";
|
|
429
|
-
|
|
429
|
+
S(r, t.path, o), a({ path: r });
|
|
430
430
|
}
|
|
431
431
|
else if (n)
|
|
432
432
|
if (l) {
|
|
433
433
|
const r = "/main";
|
|
434
|
-
|
|
434
|
+
S(r, t.path, o), a({ path: r });
|
|
435
435
|
} else {
|
|
436
436
|
const r = "/org/joinOrCreate";
|
|
437
|
-
|
|
437
|
+
S(r, t.path, o), a({ path: r });
|
|
438
438
|
}
|
|
439
439
|
else
|
|
440
|
-
|
|
440
|
+
S(e.path, t.path, o), a();
|
|
441
441
|
}
|
|
442
442
|
function st(e) {
|
|
443
443
|
return e.value.length <= 0;
|
|
@@ -499,7 +499,7 @@ function yt(e) {
|
|
|
499
499
|
function wt(...e) {
|
|
500
500
|
const t = [], a = () => {
|
|
501
501
|
t.forEach((r) => r()), t.length = 0;
|
|
502
|
-
}, o = (r, u, s,
|
|
502
|
+
}, o = (r, u, s, i) => (r.addEventListener(u, s, i), () => r.removeEventListener(u, s, i)), n = x(() => {
|
|
503
503
|
const r = P(q(e[0])).filter((u) => u != null);
|
|
504
504
|
return r.every((u) => typeof u != "string") ? r : void 0;
|
|
505
505
|
}), l = ht(
|
|
@@ -513,14 +513,14 @@ function wt(...e) {
|
|
|
513
513
|
q(n.value ? e[3] : e[2])
|
|
514
514
|
];
|
|
515
515
|
},
|
|
516
|
-
([r, u, s,
|
|
516
|
+
([r, u, s, i]) => {
|
|
517
517
|
if (a(), !(r != null && r.length) || !(u != null && u.length) || !(s != null && s.length))
|
|
518
518
|
return;
|
|
519
|
-
const
|
|
519
|
+
const v = mt(i) ? { ...i } : i;
|
|
520
520
|
t.push(
|
|
521
521
|
...r.flatMap(
|
|
522
|
-
(
|
|
523
|
-
(m) => s.map((_) => o(
|
|
522
|
+
(k) => u.flatMap(
|
|
523
|
+
(m) => s.map((_) => o(k, m, _, v))
|
|
524
524
|
)
|
|
525
525
|
)
|
|
526
526
|
);
|
|
@@ -533,13 +533,13 @@ function wt(...e) {
|
|
|
533
533
|
}
|
|
534
534
|
function xt() {
|
|
535
535
|
const e = ee(!1), t = _e();
|
|
536
|
-
return t &&
|
|
536
|
+
return t && B(() => {
|
|
537
537
|
e.value = !0;
|
|
538
538
|
}, t), e;
|
|
539
539
|
}
|
|
540
540
|
function bt(e) {
|
|
541
541
|
const t = xt();
|
|
542
|
-
return
|
|
542
|
+
return x(() => (t.value, !!e()));
|
|
543
543
|
}
|
|
544
544
|
const kt = Symbol("vueuse-ssr-width");
|
|
545
545
|
function Ct() {
|
|
@@ -547,76 +547,82 @@ function Ct() {
|
|
|
547
547
|
return typeof e == "number" ? e : void 0;
|
|
548
548
|
}
|
|
549
549
|
function Lt(e, t = {}) {
|
|
550
|
-
const { window: a = Le, ssrWidth: o = Ct() } = t, n = bt(() => a && "matchMedia" in a && typeof a.matchMedia == "function"), l =
|
|
550
|
+
const { window: a = Le, ssrWidth: o = Ct() } = t, n = bt(() => a && "matchMedia" in a && typeof a.matchMedia == "function"), l = g(typeof o == "number"), c = ee(), r = ee(!1), u = (s) => {
|
|
551
551
|
r.value = s.matches;
|
|
552
552
|
};
|
|
553
553
|
return Ve(() => {
|
|
554
554
|
if (l.value) {
|
|
555
555
|
l.value = !n.value;
|
|
556
556
|
const s = q(e).split(",");
|
|
557
|
-
r.value = s.some((
|
|
558
|
-
const
|
|
559
|
-
let _ = !!(
|
|
560
|
-
return
|
|
557
|
+
r.value = s.some((i) => {
|
|
558
|
+
const v = i.includes("not all"), k = i.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/), m = i.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);
|
|
559
|
+
let _ = !!(k || m);
|
|
560
|
+
return k && _ && (_ = o >= pe(k[1])), m && _ && (_ = o <= pe(m[1])), v ? !_ : _;
|
|
561
561
|
});
|
|
562
562
|
return;
|
|
563
563
|
}
|
|
564
564
|
n.value && (c.value = a.matchMedia(q(e)), r.value = c.value.matches);
|
|
565
|
-
}), wt(c, "change", u, { passive: !0 }),
|
|
565
|
+
}), wt(c, "change", u, { passive: !0 }), x(() => r.value);
|
|
566
566
|
}
|
|
567
567
|
function Dt(e) {
|
|
568
568
|
return Lt("(prefers-color-scheme: dark)", e);
|
|
569
569
|
}
|
|
570
570
|
function fa(e, t, a, o, n, l) {
|
|
571
|
-
const c =
|
|
571
|
+
const c = Ee(), r = ge();
|
|
572
572
|
Ye(e), Pe(t), et(a), at(o), ot(n), nt(l);
|
|
573
573
|
const u = fe(), s = Dt();
|
|
574
574
|
K(
|
|
575
575
|
e,
|
|
576
576
|
() => {
|
|
577
|
-
let
|
|
578
|
-
typeof e.value == "boolean" ?
|
|
577
|
+
let d = !1;
|
|
578
|
+
typeof e.value == "boolean" ? d = e.value : d = s.value, u.global.name.value = d ? "dark" : "light";
|
|
579
579
|
},
|
|
580
580
|
{ immediate: !0 }
|
|
581
581
|
);
|
|
582
|
-
const
|
|
583
|
-
|
|
584
|
-
g();
|
|
585
|
-
return;
|
|
586
|
-
}
|
|
587
|
-
}, g = () => {
|
|
588
|
-
var k;
|
|
582
|
+
const i = () => {
|
|
583
|
+
var C;
|
|
589
584
|
if (!st(l)) {
|
|
590
585
|
Ce(l, "waitDlg") || it(l);
|
|
591
586
|
return;
|
|
592
587
|
}
|
|
593
|
-
const
|
|
594
|
-
|
|
588
|
+
const d = G(c.path);
|
|
589
|
+
if (!d) {
|
|
590
|
+
console.assert(!1);
|
|
591
|
+
return;
|
|
592
|
+
}
|
|
593
|
+
d.level === 0 ? (C = navigator == null ? void 0 : navigator.Backbutton) == null || C.goHome(
|
|
595
594
|
() => {
|
|
596
595
|
},
|
|
597
596
|
() => {
|
|
598
597
|
}
|
|
599
598
|
) : r.back();
|
|
599
|
+
}, v = (d) => {
|
|
600
|
+
if (d.key === "Escape") {
|
|
601
|
+
i();
|
|
602
|
+
return;
|
|
603
|
+
}
|
|
604
|
+
}, k = () => {
|
|
605
|
+
i();
|
|
600
606
|
};
|
|
601
|
-
|
|
602
|
-
window.addEventListener("keydown",
|
|
607
|
+
B(() => {
|
|
608
|
+
window.addEventListener("keydown", v), p.on("backbutton", k);
|
|
603
609
|
}), $(() => {
|
|
604
|
-
window.removeEventListener("keydown",
|
|
610
|
+
window.removeEventListener("keydown", v), p.off("backbutton", k);
|
|
605
611
|
});
|
|
606
|
-
const
|
|
607
|
-
e.value =
|
|
608
|
-
},
|
|
609
|
-
t.value =
|
|
610
|
-
},
|
|
611
|
-
const
|
|
612
|
-
a.value =
|
|
613
|
-
},
|
|
614
|
-
n.value =
|
|
612
|
+
const m = (d) => {
|
|
613
|
+
e.value = d;
|
|
614
|
+
}, _ = (d) => {
|
|
615
|
+
t.value = d;
|
|
616
|
+
}, M = (d) => {
|
|
617
|
+
const C = d;
|
|
618
|
+
a.value = C[0], o.value = C[1];
|
|
619
|
+
}, h = (d) => {
|
|
620
|
+
n.value = d;
|
|
615
621
|
};
|
|
616
622
|
Ae(() => {
|
|
617
|
-
p.on("updateDark",
|
|
623
|
+
p.on("updateDark", m), p.on("updateLocale", _), p.on("updatePermission", M), p.on("updateLastAppPath", h), p.emit("syncGlobalState");
|
|
618
624
|
}), $(() => {
|
|
619
|
-
p.off("updateDark",
|
|
625
|
+
p.off("updateDark", m), p.off("updateLocale", _), p.off("updatePermission", M), p.off("updateLastAppPath", h);
|
|
620
626
|
});
|
|
621
627
|
}
|
|
622
628
|
function ga() {
|
|
@@ -631,11 +637,11 @@ function ga() {
|
|
|
631
637
|
return { verifyPermission: t };
|
|
632
638
|
}
|
|
633
639
|
function va() {
|
|
634
|
-
const e =
|
|
640
|
+
const e = x(() => !!window.cordova), t = Be(), a = x(() => t.width.value <= 1280 ? t.width.value + "px" : t.width.value <= 1920 ? 1920 / 2.5 + "px" : 2560 / 2.5 + "px");
|
|
635
641
|
return { sysBarAvail: e, compactWidth: a };
|
|
636
642
|
}
|
|
637
643
|
function le(e, t) {
|
|
638
|
-
const a = rt(), o =
|
|
644
|
+
const a = rt(), o = x({
|
|
639
645
|
get() {
|
|
640
646
|
return Ce(a, e);
|
|
641
647
|
},
|
|
@@ -645,66 +651,66 @@ function le(e, t) {
|
|
|
645
651
|
}), n = (l) => {
|
|
646
652
|
t == null || t(l), o.value = !0;
|
|
647
653
|
};
|
|
648
|
-
return
|
|
654
|
+
return B(() => {
|
|
649
655
|
p.on(e, n);
|
|
650
656
|
}), $(() => {
|
|
651
657
|
p.off(e, n);
|
|
652
658
|
}), { open: o };
|
|
653
659
|
}
|
|
654
|
-
const
|
|
660
|
+
const Mt = /* @__PURE__ */ E({
|
|
655
661
|
__name: "index",
|
|
656
662
|
setup(e) {
|
|
657
|
-
const { t } = ne(), a =
|
|
663
|
+
const { t } = ne(), a = g(""), o = g(""), n = g(""), l = g(""), c = g(""), r = g("");
|
|
658
664
|
let u = 0, s = !1;
|
|
659
|
-
const
|
|
660
|
-
var
|
|
665
|
+
const i = (m) => {
|
|
666
|
+
var M, h, d, C;
|
|
661
667
|
const _ = m;
|
|
662
|
-
a.value = _.title, o.value = _.text, n.value = ((
|
|
663
|
-
}, { open:
|
|
664
|
-
|
|
668
|
+
a.value = _.title, o.value = _.text, n.value = ((M = _.cancel) == null ? void 0 : M.color) ?? "primary", l.value = ((h = _.cancel) == null ? void 0 : h.text) ?? t("dlg.common.cancel"), c.value = ((d = _.confirm) == null ? void 0 : d.color) ?? "primary", r.value = ((C = _.confirm) == null ? void 0 : C.text) ?? t("dlg.common.confirm"), u = _.seq, s = !1, v.value = !0;
|
|
669
|
+
}, { open: v } = le("confirmDlg", i), k = () => {
|
|
670
|
+
v.value = !1, s || (p.emit("confirmDlgResult" + u, !0), s = !0);
|
|
665
671
|
};
|
|
666
|
-
return K(
|
|
672
|
+
return K(v, (m) => {
|
|
667
673
|
!m && !s && (p.emit("confirmDlgResult" + u, !1), s = !0);
|
|
668
674
|
}), (m, _) => {
|
|
669
|
-
const
|
|
670
|
-
return
|
|
671
|
-
modelValue: z(
|
|
672
|
-
"onUpdate:modelValue": _[1] || (_[1] = (j) => Q(
|
|
675
|
+
const M = b("v-card-text"), h = b("v-btn"), d = b("v-card-actions"), C = b("v-card"), f = b("v-dialog");
|
|
676
|
+
return D(), V(f, {
|
|
677
|
+
modelValue: z(v),
|
|
678
|
+
"onUpdate:modelValue": _[1] || (_[1] = (j) => Q(v) ? v.value = j : null),
|
|
673
679
|
transition: "dialog-top-transition",
|
|
674
680
|
"max-width": "600px",
|
|
675
681
|
attach: "",
|
|
676
682
|
onKeydown: [
|
|
677
|
-
_[2] || (_[2] = Z(H((j) =>
|
|
678
|
-
Z(H(
|
|
683
|
+
_[2] || (_[2] = Z(H((j) => v.value = !1, ["stop", "prevent"]), ["esc"])),
|
|
684
|
+
Z(H(k, ["stop", "prevent"]), ["enter"])
|
|
679
685
|
]
|
|
680
686
|
}, {
|
|
681
|
-
default:
|
|
682
|
-
C
|
|
683
|
-
default:
|
|
684
|
-
|
|
685
|
-
default:
|
|
687
|
+
default: w(() => [
|
|
688
|
+
L(C, { title: a.value }, {
|
|
689
|
+
default: w(() => [
|
|
690
|
+
L(M, null, {
|
|
691
|
+
default: w(() => [
|
|
686
692
|
O(R(o.value), 1)
|
|
687
693
|
]),
|
|
688
694
|
_: 1
|
|
689
695
|
}),
|
|
690
|
-
|
|
691
|
-
default:
|
|
692
|
-
|
|
696
|
+
L(d, { class: "d-flex justify-end" }, {
|
|
697
|
+
default: w(() => [
|
|
698
|
+
L(h, {
|
|
693
699
|
color: n.value,
|
|
694
700
|
variant: "text",
|
|
695
|
-
onClick: _[0] || (_[0] = (j) =>
|
|
701
|
+
onClick: _[0] || (_[0] = (j) => v.value = !1)
|
|
696
702
|
}, {
|
|
697
|
-
default:
|
|
703
|
+
default: w(() => [
|
|
698
704
|
O(R(l.value), 1)
|
|
699
705
|
]),
|
|
700
706
|
_: 1
|
|
701
707
|
}, 8, ["color"]),
|
|
702
|
-
|
|
708
|
+
L(h, {
|
|
703
709
|
color: c.value,
|
|
704
710
|
variant: "text",
|
|
705
|
-
onClick:
|
|
711
|
+
onClick: k
|
|
706
712
|
}, {
|
|
707
|
-
default:
|
|
713
|
+
default: w(() => [
|
|
708
714
|
O(R(r.value), 1)
|
|
709
715
|
]),
|
|
710
716
|
_: 1
|
|
@@ -720,38 +726,38 @@ const St = /* @__PURE__ */ B({
|
|
|
720
726
|
}, 8, ["modelValue", "onKeydown"]);
|
|
721
727
|
};
|
|
722
728
|
}
|
|
723
|
-
}),
|
|
729
|
+
}), St = /* @__PURE__ */ E({
|
|
724
730
|
__name: "index",
|
|
725
731
|
props: {
|
|
726
732
|
open: { type: Boolean, default: !0 },
|
|
727
733
|
zIndex: { default: 1 }
|
|
728
734
|
},
|
|
729
735
|
setup(e) {
|
|
730
|
-
const { backgroundColor2: t } = Ue(), a =
|
|
736
|
+
const { backgroundColor2: t } = Ue(), a = x(() => ({
|
|
731
737
|
background: t.value,
|
|
732
738
|
zIndex: e.zIndex
|
|
733
739
|
}));
|
|
734
740
|
let o = 0;
|
|
735
|
-
return (n, l) => (
|
|
736
|
-
default:
|
|
737
|
-
n.open ? (
|
|
741
|
+
return (n, l) => (D(), V(qe, { name: "fade" }, {
|
|
742
|
+
default: w(() => [
|
|
743
|
+
n.open ? (D(), te("div", {
|
|
738
744
|
key: Q(o) ? ++o.value : ++o,
|
|
739
745
|
class: "x-cont",
|
|
740
746
|
style: de(a.value)
|
|
741
747
|
}, l[0] || (l[0] = [
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
748
|
+
y("div", { class: "lds-spinner" }, [
|
|
749
|
+
y("div"),
|
|
750
|
+
y("div"),
|
|
751
|
+
y("div"),
|
|
752
|
+
y("div"),
|
|
753
|
+
y("div"),
|
|
754
|
+
y("div"),
|
|
755
|
+
y("div"),
|
|
756
|
+
y("div"),
|
|
757
|
+
y("div"),
|
|
758
|
+
y("div"),
|
|
759
|
+
y("div"),
|
|
760
|
+
y("div")
|
|
755
761
|
], -1)
|
|
756
762
|
]), 4)) : oe("", !0)
|
|
757
763
|
]),
|
|
@@ -763,9 +769,9 @@ const St = /* @__PURE__ */ B({
|
|
|
763
769
|
for (const [o, n] of t)
|
|
764
770
|
a[o] = n;
|
|
765
771
|
return a;
|
|
766
|
-
}, jt = /* @__PURE__ */ ce(
|
|
772
|
+
}, jt = /* @__PURE__ */ ce(St, [["__scopeId", "data-v-0c686889"]]);
|
|
767
773
|
var Rt = "M13,13H11V7H13M13,17H11V15H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z", Vt = "M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41 10.59L10 14.17L17.59 6.58L19 8L10 17Z", At = "M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z", qt = "M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2,6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z", Ot = "M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z";
|
|
768
|
-
const It = /* @__PURE__ */
|
|
774
|
+
const It = /* @__PURE__ */ E({
|
|
769
775
|
__name: "item",
|
|
770
776
|
props: {
|
|
771
777
|
id: {},
|
|
@@ -775,10 +781,10 @@ const It = /* @__PURE__ */ B({
|
|
|
775
781
|
},
|
|
776
782
|
emits: ["timeout"],
|
|
777
783
|
setup(e, { emit: t }) {
|
|
778
|
-
const a = e, o =
|
|
784
|
+
const a = e, o = x(() => ({
|
|
779
785
|
width: "calc(100% - 64px)",
|
|
780
786
|
overflowWrap: "break-word"
|
|
781
|
-
})), n =
|
|
787
|
+
})), n = x(() => {
|
|
782
788
|
switch (a.type) {
|
|
783
789
|
case "success":
|
|
784
790
|
return Vt;
|
|
@@ -791,68 +797,68 @@ const It = /* @__PURE__ */ B({
|
|
|
791
797
|
default:
|
|
792
798
|
return "";
|
|
793
799
|
}
|
|
794
|
-
}), l =
|
|
795
|
-
return
|
|
800
|
+
}), l = g(!0), c = t;
|
|
801
|
+
return B(() => {
|
|
796
802
|
setTimeout(() => {
|
|
797
803
|
c("timeout", a.id);
|
|
798
804
|
}, a.timeout);
|
|
799
805
|
}), K(l, (r) => {
|
|
800
806
|
r || c("timeout", a.id);
|
|
801
807
|
}), (r, u) => {
|
|
802
|
-
const s =
|
|
803
|
-
return
|
|
808
|
+
const s = b("v-icon"), i = b("v-sheet");
|
|
809
|
+
return D(), V(i, {
|
|
804
810
|
class: "x-item d-flex align-center py-2 mb-2",
|
|
805
811
|
color: a.type,
|
|
806
812
|
elevation: 1
|
|
807
813
|
}, {
|
|
808
|
-
default:
|
|
809
|
-
n.value ? (
|
|
814
|
+
default: w(() => [
|
|
815
|
+
n.value ? (D(), V(s, {
|
|
810
816
|
key: 0,
|
|
811
817
|
class: "mx-1",
|
|
812
818
|
icon: n.value
|
|
813
819
|
}, null, 8, ["icon"])) : oe("", !0),
|
|
814
|
-
|
|
820
|
+
y("div", {
|
|
815
821
|
style: de(o.value)
|
|
816
822
|
}, R(a.text), 5),
|
|
817
|
-
|
|
823
|
+
L(s, {
|
|
818
824
|
class: "mx-1",
|
|
819
825
|
icon: z(At),
|
|
820
|
-
onClick: u[0] || (u[0] = (
|
|
826
|
+
onClick: u[0] || (u[0] = (v) => c("timeout", a.id))
|
|
821
827
|
}, null, 8, ["icon"])
|
|
822
828
|
]),
|
|
823
829
|
_: 1
|
|
824
830
|
}, 8, ["color"]);
|
|
825
831
|
};
|
|
826
832
|
}
|
|
827
|
-
}), Tt = /* @__PURE__ */ ce(It, [["__scopeId", "data-v-d5cfe252"]]),
|
|
833
|
+
}), Tt = /* @__PURE__ */ ce(It, [["__scopeId", "data-v-d5cfe252"]]), Bt = /* @__PURE__ */ E({
|
|
828
834
|
__name: "index",
|
|
829
835
|
setup(e) {
|
|
830
|
-
const t =
|
|
831
|
-
|
|
836
|
+
const t = g([]);
|
|
837
|
+
B(() => {
|
|
832
838
|
p.on("message", a);
|
|
833
839
|
}), $(() => {
|
|
834
840
|
p.off("message", a);
|
|
835
841
|
});
|
|
836
842
|
const a = (r) => {
|
|
837
|
-
const { type: u, text: s, timeout:
|
|
838
|
-
l(u, s,
|
|
843
|
+
const { type: u, text: s, timeout: i } = r;
|
|
844
|
+
l(u, s, i);
|
|
839
845
|
}, o = (r) => {
|
|
840
846
|
c(r);
|
|
841
847
|
};
|
|
842
848
|
let n = 0;
|
|
843
849
|
const l = (r, u, s) => {
|
|
844
|
-
const
|
|
845
|
-
t.value.push({ id:
|
|
850
|
+
const i = n++;
|
|
851
|
+
t.value.push({ id: i, type: r, text: u, timeout: s });
|
|
846
852
|
}, c = (r) => {
|
|
847
853
|
const u = t.value.findIndex((s) => s.id === r);
|
|
848
854
|
u >= 0 && t.value.splice(u, 1);
|
|
849
855
|
};
|
|
850
|
-
return (r, u) => (
|
|
856
|
+
return (r, u) => (D(), te("div", {
|
|
851
857
|
class: "x-cont d-flex flex-column-reverse align-center",
|
|
852
858
|
onClick: u[0] || (u[0] = H(() => {
|
|
853
859
|
}, ["stop"]))
|
|
854
860
|
}, [
|
|
855
|
-
(
|
|
861
|
+
(D(!0), te(Oe, null, Ie(t.value, (s) => (D(), V(Tt, {
|
|
856
862
|
id: s.id,
|
|
857
863
|
key: s.id,
|
|
858
864
|
type: s.type,
|
|
@@ -862,47 +868,47 @@ const It = /* @__PURE__ */ B({
|
|
|
862
868
|
}, null, 8, ["id", "type", "text", "timeout"]))), 128))
|
|
863
869
|
]));
|
|
864
870
|
}
|
|
865
|
-
}),
|
|
871
|
+
}), Et = /* @__PURE__ */ ce(Bt, [["__scopeId", "data-v-c6a59757"]]), Wt = /* @__PURE__ */ E({
|
|
866
872
|
__name: "index",
|
|
867
873
|
setup(e) {
|
|
868
|
-
const { t } = ne(), a =
|
|
874
|
+
const { t } = ne(), a = g(""), o = g(""), n = g(""), l = g(""), c = g(), r = g(""), u = g(""), s = g(""), i = g(""), v = g(""), k = Te("target");
|
|
869
875
|
let m = 0, _ = !1;
|
|
870
|
-
const
|
|
876
|
+
const M = async (C) => {
|
|
871
877
|
var j, F, X, W;
|
|
872
|
-
const f =
|
|
873
|
-
a.value = f.title, o.value = f.text, n.value = f.label, l.value = f.placeholder, c.value = f.rules, r.value = f.value, u.value = ((j = f.cancel) == null ? void 0 : j.color) ?? "primary", s.value = ((F = f.cancel) == null ? void 0 : F.text) ?? t("dlg.common.cancel"),
|
|
874
|
-
}, { open:
|
|
875
|
-
|
|
878
|
+
const f = C;
|
|
879
|
+
a.value = f.title, o.value = f.text, n.value = f.label, l.value = f.placeholder, c.value = f.rules, r.value = f.value, u.value = ((j = f.cancel) == null ? void 0 : j.color) ?? "primary", s.value = ((F = f.cancel) == null ? void 0 : F.text) ?? t("dlg.common.cancel"), i.value = ((X = f.confirm) == null ? void 0 : X.color) ?? "primary", v.value = ((W = f.confirm) == null ? void 0 : W.text) ?? t("dlg.common.confirm"), m = f.seq, _ = !1, h.value = !0, await re(() => !!k.value), k.value.focus();
|
|
880
|
+
}, { open: h } = le("promptDlg", M), d = () => {
|
|
881
|
+
h.value = !1, _ || (p.emit("promptDlgResult" + m, r.value ?? ""), _ = !0);
|
|
876
882
|
};
|
|
877
|
-
return K(
|
|
878
|
-
!
|
|
879
|
-
}), (
|
|
880
|
-
const j =
|
|
881
|
-
return
|
|
882
|
-
modelValue: z(
|
|
883
|
-
"onUpdate:modelValue": f[2] || (f[2] = (U) => Q(
|
|
883
|
+
return K(h, (C) => {
|
|
884
|
+
!C && !_ && (p.emit("promptDlgResult" + m, void 0), _ = !0);
|
|
885
|
+
}), (C, f) => {
|
|
886
|
+
const j = b("v-card-text"), F = b("v-text-field"), X = b("v-form"), W = b("v-btn"), De = b("v-card-actions"), Me = b("v-card"), Se = b("v-dialog");
|
|
887
|
+
return D(), V(Se, {
|
|
888
|
+
modelValue: z(h),
|
|
889
|
+
"onUpdate:modelValue": f[2] || (f[2] = (U) => Q(h) ? h.value = U : null),
|
|
884
890
|
transition: "dialog-top-transition",
|
|
885
891
|
"max-width": "600px",
|
|
886
892
|
attach: "",
|
|
887
893
|
onKeydown: [
|
|
888
|
-
f[3] || (f[3] = Z(H((U) =>
|
|
889
|
-
Z(H(
|
|
894
|
+
f[3] || (f[3] = Z(H((U) => h.value = !1, ["stop", "prevent"]), ["esc"])),
|
|
895
|
+
Z(H(d, ["stop", "prevent"]), ["enter"])
|
|
890
896
|
]
|
|
891
897
|
}, {
|
|
892
|
-
default:
|
|
893
|
-
|
|
894
|
-
default:
|
|
895
|
-
o.value ? (
|
|
896
|
-
default:
|
|
898
|
+
default: w(() => [
|
|
899
|
+
L(Me, { title: a.value }, {
|
|
900
|
+
default: w(() => [
|
|
901
|
+
o.value ? (D(), V(j, { key: 0 }, {
|
|
902
|
+
default: w(() => [
|
|
897
903
|
O(R(o.value), 1)
|
|
898
904
|
]),
|
|
899
905
|
_: 1
|
|
900
906
|
})) : oe("", !0),
|
|
901
|
-
|
|
902
|
-
default:
|
|
903
|
-
|
|
907
|
+
L(X, { class: "mx-3" }, {
|
|
908
|
+
default: w(() => [
|
|
909
|
+
L(F, {
|
|
904
910
|
ref_key: "target",
|
|
905
|
-
ref:
|
|
911
|
+
ref: k,
|
|
906
912
|
modelValue: r.value,
|
|
907
913
|
"onUpdate:modelValue": f[0] || (f[0] = (U) => r.value = U),
|
|
908
914
|
label: n.value,
|
|
@@ -912,25 +918,25 @@ const It = /* @__PURE__ */ B({
|
|
|
912
918
|
]),
|
|
913
919
|
_: 1
|
|
914
920
|
}),
|
|
915
|
-
|
|
916
|
-
default:
|
|
917
|
-
|
|
921
|
+
L(De, { class: "d-flex justify-end" }, {
|
|
922
|
+
default: w(() => [
|
|
923
|
+
L(W, {
|
|
918
924
|
color: u.value,
|
|
919
925
|
variant: "text",
|
|
920
|
-
onClick: f[1] || (f[1] = (U) =>
|
|
926
|
+
onClick: f[1] || (f[1] = (U) => h.value = !1)
|
|
921
927
|
}, {
|
|
922
|
-
default:
|
|
928
|
+
default: w(() => [
|
|
923
929
|
O(R(s.value), 1)
|
|
924
930
|
]),
|
|
925
931
|
_: 1
|
|
926
932
|
}, 8, ["color"]),
|
|
927
|
-
|
|
928
|
-
color:
|
|
933
|
+
L(W, {
|
|
934
|
+
color: i.value,
|
|
929
935
|
variant: "text",
|
|
930
|
-
onClick:
|
|
936
|
+
onClick: d
|
|
931
937
|
}, {
|
|
932
|
-
default:
|
|
933
|
-
O(R(
|
|
938
|
+
default: w(() => [
|
|
939
|
+
O(R(v.value), 1)
|
|
934
940
|
]),
|
|
935
941
|
_: 1
|
|
936
942
|
}, 8, ["color"])
|
|
@@ -945,39 +951,39 @@ const It = /* @__PURE__ */ B({
|
|
|
945
951
|
}, 8, ["modelValue", "onKeydown"]);
|
|
946
952
|
};
|
|
947
953
|
}
|
|
948
|
-
}), Ut = { class: "mx-auto my-auto" }, $t = { class: "w-100 h-100 d-flex align-center justify-center" }, Ht = { class: "text-body-1" }, Kt = /* @__PURE__ */
|
|
954
|
+
}), Ut = { class: "mx-auto my-auto" }, $t = { class: "w-100 h-100 d-flex align-center justify-center" }, Ht = { class: "text-body-1" }, Kt = /* @__PURE__ */ E({
|
|
949
955
|
__name: "index",
|
|
950
956
|
setup(e) {
|
|
951
|
-
const { t } = ne(), a =
|
|
957
|
+
const { t } = ne(), a = g(""), o = (c) => {
|
|
952
958
|
const r = c;
|
|
953
959
|
a.value = r.text ?? t("dlg.common.waiting"), l.value = !0;
|
|
954
960
|
}, n = () => {
|
|
955
961
|
l.value = !1;
|
|
956
962
|
}, { open: l } = le("waitDlg", o);
|
|
957
|
-
return
|
|
963
|
+
return B(() => {
|
|
958
964
|
p.on("closeWaitDlg", n);
|
|
959
965
|
}), $(() => {
|
|
960
966
|
p.off("closeWaitDlg", n);
|
|
961
967
|
}), (c, r) => {
|
|
962
|
-
const u =
|
|
963
|
-
return
|
|
968
|
+
const u = b("v-card"), s = b("v-dialog");
|
|
969
|
+
return D(), V(s, {
|
|
964
970
|
modelValue: z(l),
|
|
965
|
-
"onUpdate:modelValue": r[0] || (r[0] = (
|
|
971
|
+
"onUpdate:modelValue": r[0] || (r[0] = (i) => Q(l) ? l.value = i : null),
|
|
966
972
|
persistent: "",
|
|
967
973
|
"no-click-animation": "",
|
|
968
974
|
fullscreen: "",
|
|
969
975
|
attach: ""
|
|
970
976
|
}, {
|
|
971
|
-
default:
|
|
972
|
-
|
|
973
|
-
|
|
977
|
+
default: w(() => [
|
|
978
|
+
y("div", Ut, [
|
|
979
|
+
L(u, {
|
|
974
980
|
width: "300px",
|
|
975
981
|
height: "80px",
|
|
976
982
|
loading: ""
|
|
977
983
|
}, {
|
|
978
|
-
default:
|
|
979
|
-
|
|
980
|
-
|
|
984
|
+
default: w(() => [
|
|
985
|
+
y("div", $t, [
|
|
986
|
+
y("span", Ht, R(a.value), 1)
|
|
981
987
|
])
|
|
982
988
|
]),
|
|
983
989
|
_: 1
|
|
@@ -989,7 +995,7 @@ const It = /* @__PURE__ */ B({
|
|
|
989
995
|
};
|
|
990
996
|
}
|
|
991
997
|
}), zt = (e) => {
|
|
992
|
-
e.component("XConfirmDlg",
|
|
998
|
+
e.component("XConfirmDlg", Mt), e.component("XLoading", jt), e.component("XMessage", Et), e.component("XPromptDlg", Wt), e.component("XWaitDlg", Kt);
|
|
993
999
|
}, Ft = (e, t, a) => {
|
|
994
1000
|
const o = e[t];
|
|
995
1001
|
return o ? typeof o == "function" ? o() : Promise.resolve(o) : new Promise((n, l) => {
|