x-essential-lib 0.5.52 → 0.5.54
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 +101 -101
- package/package.json +5 -4
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.id="x-essential-lib",a.appendChild(document.createTextNode('.x-cont[data-v-f4ad116e]{position:absolute;top:0;left:0;bottom:0;right:0;display:flex;align-items:center;justify-content:center}.lds-spinner[data-v-f4ad116e]{color:official;display:inline-block;position:relative;width:40px;height:40px}.lds-spinner div[data-v-f4ad116e]{transform-origin:20px 20px;animation:lds-spinner-f4ad116e 1.2s linear infinite}.lds-spinner div[data-v-f4ad116e]:after{content:" ";display:block;position:absolute;top:3px;left:18px;width:2px;height:6px;border-radius:5%;background:#9e9e9e}.lds-spinner div[data-v-f4ad116e]:nth-child(1){transform:rotate(0);animation-delay:-1.1s}.lds-spinner div[data-v-f4ad116e]:nth-child(2){transform:rotate(30deg);animation-delay:-1s}.lds-spinner div[data-v-f4ad116e]:nth-child(3){transform:rotate(60deg);animation-delay:-.9s}.lds-spinner div[data-v-f4ad116e]:nth-child(4){transform:rotate(90deg);animation-delay:-.8s}.lds-spinner div[data-v-f4ad116e]:nth-child(5){transform:rotate(120deg);animation-delay:-.7s}.lds-spinner div[data-v-f4ad116e]:nth-child(6){transform:rotate(150deg);animation-delay:-.6s}.lds-spinner div[data-v-f4ad116e]:nth-child(7){transform:rotate(180deg);animation-delay:-.5s}.lds-spinner div[data-v-f4ad116e]:nth-child(8){transform:rotate(210deg);animation-delay:-.4s}.lds-spinner div[data-v-f4ad116e]:nth-child(9){transform:rotate(240deg);animation-delay:-.3s}.lds-spinner div[data-v-f4ad116e]:nth-child(10){transform:rotate(270deg);animation-delay:-.2s}.lds-spinner div[data-v-f4ad116e]:nth-child(11){transform:rotate(300deg);animation-delay:-.1s}.lds-spinner div[data-v-f4ad116e]:nth-child(12){transform:rotate(330deg);animation-delay:0s}@keyframes lds-spinner-f4ad116e{0%{opacity:1}to{opacity:0}}.x-cont[data-v-8c2268ea]{position:absolute;left:50%;bottom:20px;transform:translate(-50%);z-index:9999}')),document.head.appendChild(a)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
2
|
-
import { ref as i, watch as N, computed as f, onMounted as
|
|
2
|
+
import { ref as i, watch as N, computed as f, onMounted as D, onBeforeUnmount as O, defineComponent as M, resolveComponent as h, openBlock as S, createBlock as E, unref as z, isRef as Q, withKeys as F, withModifiers as K, withCtx as w, createVNode as y, createTextVNode as I, toDisplayString as A, createElementBlock as X, normalizeStyle as ge, pushScopeId as ve, popScopeId as me, createElementVNode as m, reactive as he, Fragment as we, renderList as xe, createCommentVNode as ye } from "vue";
|
|
3
3
|
import { useTheme as H, useLocale as Y, useDisplay as ke } from "vuetify";
|
|
4
4
|
import { defineStore as le } from "pinia";
|
|
5
5
|
import be from "axios";
|
|
@@ -53,7 +53,7 @@ const Z = le(
|
|
|
53
53
|
e.value.push(p);
|
|
54
54
|
}
|
|
55
55
|
function r(p) {
|
|
56
|
-
const _ = e.value.findIndex((
|
|
56
|
+
const _ = e.value.findIndex((g) => g === p);
|
|
57
57
|
_ !== -1 && e.value.splice(_, e.value.length - _);
|
|
58
58
|
}
|
|
59
59
|
function n() {
|
|
@@ -108,8 +108,8 @@ function G(e, a) {
|
|
|
108
108
|
for (var r = document.cookie ? document.cookie.split("; ") : [], n = {}, c = 0; c < r.length; c++) {
|
|
109
109
|
var p = r[c].split("="), _ = p.slice(1).join("=");
|
|
110
110
|
try {
|
|
111
|
-
var
|
|
112
|
-
if (n[
|
|
111
|
+
var g = decodeURIComponent(p[0]);
|
|
112
|
+
if (n[g] = e.read(_, g), o === g)
|
|
113
113
|
break;
|
|
114
114
|
} catch {
|
|
115
115
|
}
|
|
@@ -151,24 +151,24 @@ function nt(e) {
|
|
|
151
151
|
return a.defaults.baseURL = e.baseUrl, a.interceptors.request.use(
|
|
152
152
|
(t) => Se(t),
|
|
153
153
|
(t) => {
|
|
154
|
-
|
|
154
|
+
Ve(t, e.onError);
|
|
155
155
|
}
|
|
156
156
|
), a.interceptors.response.use(
|
|
157
|
-
(t) =>
|
|
158
|
-
(t) =>
|
|
157
|
+
(t) => qe(t),
|
|
158
|
+
(t) => Re(t, e.onError)
|
|
159
159
|
), a;
|
|
160
160
|
}
|
|
161
161
|
function Se(e) {
|
|
162
162
|
const a = B.get("accessToken") ?? "";
|
|
163
163
|
return e.headers.Authorization = "Basic " + a, e.headers["Content-Type"] = "application/json", e.data = JSON.stringify(e.data), e;
|
|
164
164
|
}
|
|
165
|
-
function
|
|
165
|
+
function Ve(e, a) {
|
|
166
166
|
console.error(e), a("request timeout");
|
|
167
167
|
}
|
|
168
|
-
function
|
|
168
|
+
function qe(e) {
|
|
169
169
|
return e.data;
|
|
170
170
|
}
|
|
171
|
-
function
|
|
171
|
+
function Re(e, a) {
|
|
172
172
|
var o;
|
|
173
173
|
const t = e.response;
|
|
174
174
|
if (!t)
|
|
@@ -244,7 +244,7 @@ async function ct(e) {
|
|
|
244
244
|
const l = (r) => {
|
|
245
245
|
t = r, a = !0;
|
|
246
246
|
}, o = ue();
|
|
247
|
-
return s.on("confirmDlgResult" + o, l), s.emit("confirmDlg", { ...e, seq: o }), await P(() => a), s.off("confirmDlgResult" + o, l), t;
|
|
247
|
+
return s.on("confirmDlgResult" + o, l), s.emit("confirmDlg", { ...e, seq: o }), await P(() => a), console.log("confirm dlg closed", o, a, t), s.off("confirmDlgResult" + o, l), t;
|
|
248
248
|
}
|
|
249
249
|
async function ut(e) {
|
|
250
250
|
if (!ce())
|
|
@@ -253,7 +253,7 @@ async function ut(e) {
|
|
|
253
253
|
const l = (r) => {
|
|
254
254
|
t = r, a = !0;
|
|
255
255
|
}, o = ue();
|
|
256
|
-
return s.on("promptDlgResult" + o, l), s.emit("promptDlg", { ...e, seq: o }), await P(() => a), s.off("promptDlgResult" + o, l), t;
|
|
256
|
+
return s.on("promptDlgResult" + o, l), s.emit("promptDlg", { ...e, seq: o }), await P(() => a), console.log("prompt dlg closed", o, a, t), s.off("promptDlgResult" + o, l), t;
|
|
257
257
|
}
|
|
258
258
|
function pt() {
|
|
259
259
|
s.emit("openWaitDlg");
|
|
@@ -407,7 +407,7 @@ function L(e) {
|
|
|
407
407
|
}), a;
|
|
408
408
|
}
|
|
409
409
|
const J = i("");
|
|
410
|
-
function
|
|
410
|
+
function C(e, a) {
|
|
411
411
|
const t = Z();
|
|
412
412
|
a === "/" && (a = t.lastAppPath);
|
|
413
413
|
const l = L(e), o = L(a);
|
|
@@ -436,35 +436,35 @@ function gt(e, a, t) {
|
|
|
436
436
|
if (l)
|
|
437
437
|
if (o) {
|
|
438
438
|
const n = "/main";
|
|
439
|
-
|
|
439
|
+
C(n, a.path), t({ path: n });
|
|
440
440
|
} else
|
|
441
|
-
|
|
441
|
+
C(e.path, a.path), t();
|
|
442
442
|
else {
|
|
443
443
|
const n = "/passport/login";
|
|
444
|
-
|
|
444
|
+
C(n, a.path), t({ path: n });
|
|
445
445
|
}
|
|
446
446
|
else if (r.requiredState === "org")
|
|
447
447
|
if (l)
|
|
448
448
|
if (o)
|
|
449
|
-
|
|
449
|
+
C(e.path, a.path), t();
|
|
450
450
|
else {
|
|
451
451
|
const n = "/org/joinOrCreate";
|
|
452
|
-
|
|
452
|
+
C(n, a.path), t({ path: n });
|
|
453
453
|
}
|
|
454
454
|
else {
|
|
455
455
|
const n = "/passport/login";
|
|
456
|
-
|
|
456
|
+
C(n, a.path), t({ path: n });
|
|
457
457
|
}
|
|
458
458
|
else if (l)
|
|
459
459
|
if (o) {
|
|
460
460
|
const n = "/main";
|
|
461
|
-
|
|
461
|
+
C(n, a.path), t({ path: n });
|
|
462
462
|
} else {
|
|
463
463
|
const n = "/org/joinOrCreate";
|
|
464
|
-
|
|
464
|
+
C(n, a.path), t({ path: n });
|
|
465
465
|
}
|
|
466
466
|
else
|
|
467
|
-
|
|
467
|
+
C(e.path, a.path), t();
|
|
468
468
|
}
|
|
469
469
|
function ee(e, a) {
|
|
470
470
|
const t = re(), l = f({
|
|
@@ -477,7 +477,7 @@ function ee(e, a) {
|
|
|
477
477
|
}), o = (r) => {
|
|
478
478
|
a == null || a(r), l.value = !0;
|
|
479
479
|
};
|
|
480
|
-
return
|
|
480
|
+
return D(() => {
|
|
481
481
|
s.on(e, o);
|
|
482
482
|
}), O(() => {
|
|
483
483
|
s.off(e, o);
|
|
@@ -486,7 +486,7 @@ function ee(e, a) {
|
|
|
486
486
|
const $e = /* @__PURE__ */ M({
|
|
487
487
|
__name: "index",
|
|
488
488
|
setup(e) {
|
|
489
|
-
const a = Y(), { open: t } = ee("
|
|
489
|
+
const a = Y(), { open: t } = ee("confirmDlgInternal"), l = i(""), o = i(""), r = i(), n = i(), c = f(() => {
|
|
490
490
|
var u;
|
|
491
491
|
return ((u = r.value) == null ? void 0 : u.color) ?? "primary";
|
|
492
492
|
}), p = f(() => {
|
|
@@ -495,49 +495,49 @@ const $e = /* @__PURE__ */ M({
|
|
|
495
495
|
}), _ = f(() => {
|
|
496
496
|
var u;
|
|
497
497
|
return ((u = n.value) == null ? void 0 : u.color) ?? "primary";
|
|
498
|
-
}),
|
|
498
|
+
}), g = f(() => {
|
|
499
499
|
var u;
|
|
500
500
|
return ((u = n.value) == null ? void 0 : u.text) ?? a.t("confirm");
|
|
501
501
|
});
|
|
502
|
-
let
|
|
502
|
+
let k = 0, V = !1;
|
|
503
503
|
const T = (u) => {
|
|
504
|
-
l.value = u.title, o.value = u.text, r.value = u.cancel, n.value = u.confirm,
|
|
504
|
+
l.value = u.title, o.value = u.text, r.value = u.cancel, n.value = u.confirm, k = u.seq, V = !1, t.value = !0;
|
|
505
505
|
};
|
|
506
|
-
|
|
506
|
+
D(() => {
|
|
507
507
|
s.on("confirmDlg", T);
|
|
508
508
|
}), O(() => {
|
|
509
509
|
s.off("confirmDlg", T);
|
|
510
510
|
});
|
|
511
511
|
const j = () => {
|
|
512
|
-
t.value = !1
|
|
512
|
+
t.value = !1;
|
|
513
513
|
};
|
|
514
514
|
return N(t, (u) => {
|
|
515
|
-
!u && !
|
|
516
|
-
}), (u,
|
|
517
|
-
const b = h("v-card-text"),
|
|
518
|
-
return
|
|
515
|
+
!u && !V && (s.emit("confirmDlgResult" + k, !1), V = !0);
|
|
516
|
+
}), (u, v) => {
|
|
517
|
+
const b = h("v-card-text"), q = h("v-btn"), R = h("v-card-actions"), d = h("v-card"), x = h("v-dialog");
|
|
518
|
+
return S(), E(x, {
|
|
519
519
|
modelValue: z(t),
|
|
520
|
-
"onUpdate:modelValue":
|
|
520
|
+
"onUpdate:modelValue": v[1] || (v[1] = (U) => Q(t) ? t.value = U : null),
|
|
521
521
|
onKeydown: [
|
|
522
|
-
|
|
522
|
+
v[2] || (v[2] = F(K((U) => t.value = !1, ["stop", "prevent"]), ["esc"])),
|
|
523
523
|
F(K(j, ["stop", "prevent"]), ["enter"])
|
|
524
524
|
],
|
|
525
525
|
transition: "dialog-top-transition",
|
|
526
526
|
"max-width": "600px"
|
|
527
527
|
}, {
|
|
528
528
|
default: w(() => [
|
|
529
|
-
|
|
529
|
+
y(d, { title: l.value }, {
|
|
530
530
|
default: w(() => [
|
|
531
|
-
|
|
531
|
+
y(b, null, {
|
|
532
532
|
default: w(() => [
|
|
533
533
|
I(A(o.value), 1)
|
|
534
534
|
]),
|
|
535
535
|
_: 1
|
|
536
536
|
}),
|
|
537
|
-
|
|
537
|
+
y(R, { class: "d-flex justify-end" }, {
|
|
538
538
|
default: w(() => [
|
|
539
|
-
|
|
540
|
-
onClick:
|
|
539
|
+
y(q, {
|
|
540
|
+
onClick: v[0] || (v[0] = (U) => t.value = !1),
|
|
541
541
|
color: c.value,
|
|
542
542
|
variant: "text"
|
|
543
543
|
}, {
|
|
@@ -546,13 +546,13 @@ const $e = /* @__PURE__ */ M({
|
|
|
546
546
|
]),
|
|
547
547
|
_: 1
|
|
548
548
|
}, 8, ["color"]),
|
|
549
|
-
|
|
549
|
+
y(q, {
|
|
550
550
|
onClick: j,
|
|
551
551
|
color: _.value,
|
|
552
552
|
variant: "text"
|
|
553
553
|
}, {
|
|
554
554
|
default: w(() => [
|
|
555
|
-
I(A(
|
|
555
|
+
I(A(g.value), 1)
|
|
556
556
|
]),
|
|
557
557
|
_: 1
|
|
558
558
|
}, 8, ["color"])
|
|
@@ -595,7 +595,7 @@ const $e = /* @__PURE__ */ M({
|
|
|
595
595
|
background: a.current.value.dark ? "#1e1e1e" : "#ffffff",
|
|
596
596
|
zIndex: t.zIndex
|
|
597
597
|
}));
|
|
598
|
-
return (o, r) => (
|
|
598
|
+
return (o, r) => (S(), X("div", {
|
|
599
599
|
class: "x-cont",
|
|
600
600
|
style: ge(l.value)
|
|
601
601
|
}, We, 4));
|
|
@@ -616,7 +616,7 @@ const $e = /* @__PURE__ */ M({
|
|
|
616
616
|
emits: ["timeout"],
|
|
617
617
|
setup(e, { emit: a }) {
|
|
618
618
|
const t = e, l = i(!0), o = a;
|
|
619
|
-
return
|
|
619
|
+
return D(() => {
|
|
620
620
|
setTimeout(() => {
|
|
621
621
|
o("timeout", t.id);
|
|
622
622
|
}, t.timeout);
|
|
@@ -624,7 +624,7 @@ const $e = /* @__PURE__ */ M({
|
|
|
624
624
|
r || o("timeout", t.id);
|
|
625
625
|
}), (r, n) => {
|
|
626
626
|
const c = h("v-alert");
|
|
627
|
-
return
|
|
627
|
+
return S(), E(c, {
|
|
628
628
|
modelValue: l.value,
|
|
629
629
|
"onUpdate:modelValue": n[0] || (n[0] = (p) => l.value = p),
|
|
630
630
|
class: "mt-2",
|
|
@@ -642,7 +642,7 @@ const $e = /* @__PURE__ */ M({
|
|
|
642
642
|
__name: "index",
|
|
643
643
|
setup(e) {
|
|
644
644
|
const a = he({ items: [] });
|
|
645
|
-
|
|
645
|
+
D(() => {
|
|
646
646
|
s.on("message", t);
|
|
647
647
|
}), O(() => {
|
|
648
648
|
s.off("message", t);
|
|
@@ -654,18 +654,18 @@ const $e = /* @__PURE__ */ M({
|
|
|
654
654
|
};
|
|
655
655
|
let o = 0;
|
|
656
656
|
const r = (c, p, _) => {
|
|
657
|
-
const
|
|
658
|
-
a.items.push({ id:
|
|
657
|
+
const g = o++;
|
|
658
|
+
a.items.push({ id: g, type: c, text: p, timeout: _ });
|
|
659
659
|
}, n = (c) => {
|
|
660
660
|
const p = a.items.findIndex((_) => _.id === c);
|
|
661
661
|
p >= 0 && a.items.splice(p, 1);
|
|
662
662
|
};
|
|
663
|
-
return (c, p) => (
|
|
663
|
+
return (c, p) => (S(), X("div", {
|
|
664
664
|
onClick: p[0] || (p[0] = K(() => {
|
|
665
665
|
}, ["stop"])),
|
|
666
666
|
class: "x-cont d-flex flex-column-reverse align-center"
|
|
667
667
|
}, [
|
|
668
|
-
(
|
|
668
|
+
(S(!0), X(we, null, xe(a.items, (_) => (S(), E(Ne, {
|
|
669
669
|
onTimeout: l,
|
|
670
670
|
id: _.id,
|
|
671
671
|
type: _.type,
|
|
@@ -678,58 +678,58 @@ const $e = /* @__PURE__ */ M({
|
|
|
678
678
|
}), Je = /* @__PURE__ */ pe(He, [["__scopeId", "data-v-8c2268ea"]]), Xe = /* @__PURE__ */ M({
|
|
679
679
|
__name: "index",
|
|
680
680
|
setup(e) {
|
|
681
|
-
const a = Y(), { open: t } = ee("
|
|
681
|
+
const a = Y(), { open: t } = ee("promptDlgInternal"), l = i(""), o = i(""), r = i(), n = i(), c = i(), p = i(""), _ = i(), g = i(), k = f(() => {
|
|
682
682
|
var d;
|
|
683
683
|
return ((d = _.value) == null ? void 0 : d.color) ?? "primary";
|
|
684
|
-
}),
|
|
684
|
+
}), V = f(() => {
|
|
685
685
|
var d;
|
|
686
686
|
return ((d = _.value) == null ? void 0 : d.text) ?? a.t("cancel");
|
|
687
687
|
}), T = f(() => {
|
|
688
688
|
var d;
|
|
689
|
-
return ((d =
|
|
689
|
+
return ((d = g.value) == null ? void 0 : d.color) ?? "primary";
|
|
690
690
|
}), j = f(() => {
|
|
691
691
|
var d;
|
|
692
|
-
return ((d =
|
|
692
|
+
return ((d = g.value) == null ? void 0 : d.text) ?? a.t("confirm");
|
|
693
693
|
}), u = i();
|
|
694
|
-
let
|
|
695
|
-
const
|
|
694
|
+
let v = 0, b = !1;
|
|
695
|
+
const q = async (d) => {
|
|
696
696
|
var x;
|
|
697
|
-
l.value = d.title, o.value = d.text, r.value = d.label, n.value = d.placeholder, c.value = d.rules, p.value = d.value, _.value = d.cancel,
|
|
697
|
+
l.value = d.title, o.value = d.text, r.value = d.label, n.value = d.placeholder, c.value = d.rules, p.value = d.value, _.value = d.cancel, g.value = d.confirm, v = d.seq, b = !1, t.value = !0, await P(() => u.value !== void 0, 1e3), (x = u.value) == null || x.focus();
|
|
698
698
|
};
|
|
699
|
-
|
|
700
|
-
s.on("promptDlg",
|
|
699
|
+
D(() => {
|
|
700
|
+
s.on("promptDlg", q);
|
|
701
701
|
}), O(() => {
|
|
702
|
-
s.off("promptDlg",
|
|
702
|
+
s.off("promptDlg", q);
|
|
703
703
|
});
|
|
704
|
-
const
|
|
705
|
-
t.value = !1
|
|
704
|
+
const R = () => {
|
|
705
|
+
t.value = !1;
|
|
706
706
|
};
|
|
707
707
|
return N(t, (d) => {
|
|
708
|
-
!d && !b && (s.emit("promptDlgResult" +
|
|
708
|
+
!d && !b && (s.emit("promptDlgResult" + v, void 0), b = !0);
|
|
709
709
|
}), (d, x) => {
|
|
710
710
|
const U = h("v-card-text"), se = h("v-text-field"), _e = h("v-form"), te = h("v-btn"), de = h("v-card-actions"), ie = h("v-card"), fe = h("v-dialog");
|
|
711
|
-
return
|
|
711
|
+
return S(), E(fe, {
|
|
712
712
|
modelValue: z(t),
|
|
713
713
|
"onUpdate:modelValue": x[2] || (x[2] = ($) => Q(t) ? t.value = $ : null),
|
|
714
714
|
onKeydown: [
|
|
715
715
|
x[3] || (x[3] = F(K(($) => t.value = !1, ["stop", "prevent"]), ["esc"])),
|
|
716
|
-
F(K(
|
|
716
|
+
F(K(R, ["stop", "prevent"]), ["enter"])
|
|
717
717
|
],
|
|
718
718
|
transition: "dialog-top-transition",
|
|
719
719
|
"max-width": "600px"
|
|
720
720
|
}, {
|
|
721
721
|
default: w(() => [
|
|
722
|
-
|
|
722
|
+
y(ie, { title: l.value }, {
|
|
723
723
|
default: w(() => [
|
|
724
|
-
o.value ? (
|
|
724
|
+
o.value ? (S(), E(U, { key: 0 }, {
|
|
725
725
|
default: w(() => [
|
|
726
726
|
I(A(o.value), 1)
|
|
727
727
|
]),
|
|
728
728
|
_: 1
|
|
729
729
|
})) : ye("", !0),
|
|
730
|
-
|
|
730
|
+
y(_e, { class: "mx-3" }, {
|
|
731
731
|
default: w(() => [
|
|
732
|
-
|
|
732
|
+
y(se, {
|
|
733
733
|
modelValue: p.value,
|
|
734
734
|
"onUpdate:modelValue": x[0] || (x[0] = ($) => p.value = $),
|
|
735
735
|
label: r.value,
|
|
@@ -741,20 +741,20 @@ const $e = /* @__PURE__ */ M({
|
|
|
741
741
|
]),
|
|
742
742
|
_: 1
|
|
743
743
|
}),
|
|
744
|
-
|
|
744
|
+
y(de, { class: "d-flex justify-end" }, {
|
|
745
745
|
default: w(() => [
|
|
746
|
-
|
|
746
|
+
y(te, {
|
|
747
747
|
onClick: x[1] || (x[1] = ($) => t.value = !1),
|
|
748
|
-
color:
|
|
748
|
+
color: k.value,
|
|
749
749
|
variant: "text"
|
|
750
750
|
}, {
|
|
751
751
|
default: w(() => [
|
|
752
|
-
I(A(
|
|
752
|
+
I(A(V.value), 1)
|
|
753
753
|
]),
|
|
754
754
|
_: 1
|
|
755
755
|
}, 8, ["color"]),
|
|
756
|
-
|
|
757
|
-
onClick:
|
|
756
|
+
y(te, {
|
|
757
|
+
onClick: R,
|
|
758
758
|
color: T.value,
|
|
759
759
|
variant: "text"
|
|
760
760
|
}, {
|
|
@@ -782,13 +782,13 @@ const $e = /* @__PURE__ */ M({
|
|
|
782
782
|
}, o = () => {
|
|
783
783
|
t.value = !1;
|
|
784
784
|
};
|
|
785
|
-
return
|
|
785
|
+
return D(() => {
|
|
786
786
|
s.on("openWaitDlg", l), s.on("closeWaitDlg", o);
|
|
787
787
|
}), O(() => {
|
|
788
788
|
s.off("openWaitDlg", l), s.off("closeWaitDlg", o);
|
|
789
789
|
}), (r, n) => {
|
|
790
790
|
const c = h("v-card"), p = h("v-dialog");
|
|
791
|
-
return
|
|
791
|
+
return S(), E(p, {
|
|
792
792
|
modelValue: z(t),
|
|
793
793
|
"onUpdate:modelValue": n[0] || (n[0] = (_) => Q(t) ? t.value = _ : null),
|
|
794
794
|
persistent: "",
|
|
@@ -797,7 +797,7 @@ const $e = /* @__PURE__ */ M({
|
|
|
797
797
|
}, {
|
|
798
798
|
default: w(() => [
|
|
799
799
|
m("div", Ge, [
|
|
800
|
-
|
|
800
|
+
y(c, {
|
|
801
801
|
width: "300px",
|
|
802
802
|
height: "80px",
|
|
803
803
|
loading: ""
|
|
@@ -841,25 +841,25 @@ function mt(e, a) {
|
|
|
841
841
|
}, p = () => {
|
|
842
842
|
n = !0;
|
|
843
843
|
}, _ = () => {
|
|
844
|
-
var
|
|
844
|
+
var v;
|
|
845
845
|
if (!r.isEmpty()) {
|
|
846
846
|
r.hasView("waitDlg") || r.popView();
|
|
847
847
|
return;
|
|
848
848
|
}
|
|
849
849
|
const u = L(t.path);
|
|
850
|
-
(u == null ? void 0 : u.level) === 0 ? (
|
|
850
|
+
(u == null ? void 0 : u.level) === 0 ? (v = navigator == null ? void 0 : navigator.Backbutton) == null || v.goHome(
|
|
851
851
|
() => {
|
|
852
852
|
},
|
|
853
853
|
() => {
|
|
854
854
|
}
|
|
855
855
|
) : l.back();
|
|
856
856
|
};
|
|
857
|
-
|
|
857
|
+
D(() => {
|
|
858
858
|
s.on("pause", c), s.on("resume", p), s.on("backbutton", _);
|
|
859
859
|
}), O(() => {
|
|
860
860
|
s.off("pause", c), s.off("resume", p), s.off("backbutton", _);
|
|
861
861
|
});
|
|
862
|
-
const
|
|
862
|
+
const g = (u) => {
|
|
863
863
|
if (u.key === "Escape") {
|
|
864
864
|
_();
|
|
865
865
|
return;
|
|
@@ -873,42 +873,42 @@ function mt(e, a) {
|
|
|
873
873
|
return;
|
|
874
874
|
}
|
|
875
875
|
};
|
|
876
|
-
|
|
877
|
-
window.addEventListener("keydown",
|
|
876
|
+
D(() => {
|
|
877
|
+
window.addEventListener("keydown", g);
|
|
878
878
|
}), O(() => {
|
|
879
|
-
window.removeEventListener("keydown",
|
|
879
|
+
window.removeEventListener("keydown", g);
|
|
880
880
|
});
|
|
881
|
-
let
|
|
882
|
-
const
|
|
881
|
+
let k;
|
|
882
|
+
const V = async () => {
|
|
883
883
|
if (!n)
|
|
884
884
|
return;
|
|
885
885
|
const u = L(t.path);
|
|
886
886
|
if (!(!u || u.requiredState !== "org"))
|
|
887
887
|
try {
|
|
888
|
-
const { update:
|
|
888
|
+
const { update: v, permissions: b } = await Pe(a, {
|
|
889
889
|
checksum: o.permissionChecksum
|
|
890
890
|
});
|
|
891
|
-
if (!
|
|
891
|
+
if (!v)
|
|
892
892
|
return;
|
|
893
|
-
const
|
|
894
|
-
for (const
|
|
895
|
-
if (
|
|
893
|
+
const q = {};
|
|
894
|
+
for (const R in b) {
|
|
895
|
+
if (R === "checksum")
|
|
896
896
|
continue;
|
|
897
|
-
const d = b[
|
|
898
|
-
|
|
897
|
+
const d = b[R];
|
|
898
|
+
q[R] = JSON.parse(d);
|
|
899
899
|
}
|
|
900
|
-
o.permissionObjects =
|
|
901
|
-
} catch (
|
|
902
|
-
console.error(
|
|
900
|
+
o.permissionObjects = q, o.permissionChecksum = b.checksum ?? "";
|
|
901
|
+
} catch (v) {
|
|
902
|
+
console.error(v);
|
|
903
903
|
}
|
|
904
904
|
}, T = async (u) => {
|
|
905
|
-
u && await
|
|
906
|
-
await
|
|
905
|
+
u && await V(), clearTimeout(k), k = setTimeout(async () => {
|
|
906
|
+
await V(), k && T();
|
|
907
907
|
}, 3e3);
|
|
908
908
|
}, j = () => {
|
|
909
|
-
clearTimeout(
|
|
909
|
+
clearTimeout(k), k = void 0;
|
|
910
910
|
};
|
|
911
|
-
|
|
911
|
+
D(() => {
|
|
912
912
|
a && T(!0);
|
|
913
913
|
}), O(() => {
|
|
914
914
|
j();
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "x-essential-lib",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.5.
|
|
4
|
+
"version": "0.5.54",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
"peerDependencies": {
|
|
29
29
|
"axios": "^1.6.8",
|
|
30
30
|
"pinia": "^2.1.7",
|
|
31
|
-
"vue": "^3.4.
|
|
31
|
+
"vue": "^3.4.30",
|
|
32
32
|
"vue-i18n": "^9.13.1",
|
|
33
|
-
"vue-router": "^4.
|
|
34
|
-
"vuetify": "^3.6.
|
|
33
|
+
"vue-router": "^4.4.0",
|
|
34
|
+
"vuetify": "^3.6.10"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@rushstack/eslint-patch": "^1.8.0",
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
"eslint-plugin-vue": "^9.24.1",
|
|
45
45
|
"husky": "^9.0.11",
|
|
46
46
|
"lint-staged": "^15.2.2",
|
|
47
|
+
"pinia-plugin-persistedstate": "^3.2.1",
|
|
47
48
|
"prettier": "3.2.5",
|
|
48
49
|
"rollup-plugin-copy": "^3.5.0",
|
|
49
50
|
"sass": "^1.74.1",
|