x-essential-lib 0.5.40 → 0.5.41
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 +25 -23
- package/package.json +1 -1
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 S, onBeforeUnmount as
|
|
2
|
+
import { ref as i, watch as N, computed as f, onMounted as S, onBeforeUnmount as O, defineComponent as U, resolveComponent as h, openBlock as V, createBlock as E, unref as F, isRef as G, withKeys as M, withModifiers as W, withCtx as w, createVNode as k, createTextVNode as B, toDisplayString as j, createElementBlock as J, 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 Q, useDisplay as ke } from "vuetify";
|
|
4
4
|
import { defineStore as le } from "pinia";
|
|
5
5
|
import be from "axios";
|
|
@@ -155,7 +155,7 @@ function lt(e) {
|
|
|
155
155
|
}
|
|
156
156
|
), a.interceptors.response.use(
|
|
157
157
|
(t) => qe(t),
|
|
158
|
-
(t) =>
|
|
158
|
+
(t) => Te(t, e.onError)
|
|
159
159
|
), a;
|
|
160
160
|
}
|
|
161
161
|
function Se(e) {
|
|
@@ -168,19 +168,19 @@ function Ve(e, a) {
|
|
|
168
168
|
function qe(e) {
|
|
169
169
|
return e.data;
|
|
170
170
|
}
|
|
171
|
-
function
|
|
171
|
+
function Te(e, a) {
|
|
172
172
|
var o;
|
|
173
173
|
const t = e.response;
|
|
174
174
|
if (!t)
|
|
175
175
|
return Promise.reject(e);
|
|
176
|
-
t.status === 401 &&
|
|
176
|
+
t.status === 401 && Oe();
|
|
177
177
|
let l = (o = t.data) == null ? void 0 : o.message;
|
|
178
178
|
return l || (l = {
|
|
179
179
|
code: t.status,
|
|
180
180
|
message: t.statusText
|
|
181
181
|
}), a(l), Promise.reject(e);
|
|
182
182
|
}
|
|
183
|
-
function
|
|
183
|
+
function Oe() {
|
|
184
184
|
R.remove("accessToken"), R.remove("refreshToken"), R.remove("activeOrg"), ne().replace({ path: "/passport/login" });
|
|
185
185
|
}
|
|
186
186
|
function Ae(e) {
|
|
@@ -412,7 +412,9 @@ function D(e, a) {
|
|
|
412
412
|
const l = z(e), o = z(a), r = (l == null ? void 0 : l.app) === (o == null ? void 0 : o.app), n = (l == null ? void 0 : l.path) === (o == null ? void 0 : o.path), c = ((l == null ? void 0 : l.level) ?? -1) >= ((o == null ? void 0 : o.level) ?? -1);
|
|
413
413
|
console.info(
|
|
414
414
|
`~~~~before route change~~~~ ${a} -> ${e} inner=${r} forward=${c}`
|
|
415
|
-
), r ? n ? oe.value = "" : oe.value = c ? "inner-left" : "inner-right" : l && je(l.app, c),
|
|
415
|
+
), r ? n ? oe.value = "" : oe.value = c ? "inner-left" : "inner-right" : l && je(l.app, c), setTimeout(() => {
|
|
416
|
+
t.lastAppPath = "/";
|
|
417
|
+
});
|
|
416
418
|
}
|
|
417
419
|
function Ee() {
|
|
418
420
|
return !!R.get("accessToken");
|
|
@@ -473,7 +475,7 @@ function P(e, a) {
|
|
|
473
475
|
};
|
|
474
476
|
return S(() => {
|
|
475
477
|
s.on(e, o);
|
|
476
|
-
}),
|
|
478
|
+
}), O(() => {
|
|
477
479
|
s.off(e, o);
|
|
478
480
|
}), { open: l };
|
|
479
481
|
}
|
|
@@ -499,7 +501,7 @@ const $e = /* @__PURE__ */ U({
|
|
|
499
501
|
};
|
|
500
502
|
S(() => {
|
|
501
503
|
s.on("confirmDlg", A);
|
|
502
|
-
}),
|
|
504
|
+
}), O(() => {
|
|
503
505
|
s.off("confirmDlg", A);
|
|
504
506
|
});
|
|
505
507
|
const I = () => {
|
|
@@ -508,7 +510,7 @@ const $e = /* @__PURE__ */ U({
|
|
|
508
510
|
return N(t, (u) => {
|
|
509
511
|
!u && !C && (s.emit("confirmDlgResult" + y, !1), C = !0);
|
|
510
512
|
}), (u, g) => {
|
|
511
|
-
const b = h("v-card-text"), q = h("v-btn"),
|
|
513
|
+
const b = h("v-card-text"), q = h("v-btn"), T = h("v-card-actions"), d = h("v-card"), x = h("v-dialog");
|
|
512
514
|
return V(), E(x, {
|
|
513
515
|
modelValue: F(t),
|
|
514
516
|
"onUpdate:modelValue": g[1] || (g[1] = ($) => G(t) ? t.value = $ : null),
|
|
@@ -528,7 +530,7 @@ const $e = /* @__PURE__ */ U({
|
|
|
528
530
|
]),
|
|
529
531
|
_: 1
|
|
530
532
|
}),
|
|
531
|
-
k(
|
|
533
|
+
k(T, { class: "d-flex justify-end" }, {
|
|
532
534
|
default: w(() => [
|
|
533
535
|
k(q, {
|
|
534
536
|
onClick: g[0] || (g[0] = ($) => t.value = !1),
|
|
@@ -638,7 +640,7 @@ const $e = /* @__PURE__ */ U({
|
|
|
638
640
|
const a = he({ items: [] });
|
|
639
641
|
S(() => {
|
|
640
642
|
s.on("message", t);
|
|
641
|
-
}),
|
|
643
|
+
}), O(() => {
|
|
642
644
|
s.off("message", t);
|
|
643
645
|
});
|
|
644
646
|
const t = (c) => {
|
|
@@ -692,10 +694,10 @@ const $e = /* @__PURE__ */ U({
|
|
|
692
694
|
};
|
|
693
695
|
S(() => {
|
|
694
696
|
s.on("promptDlg", q);
|
|
695
|
-
}),
|
|
697
|
+
}), O(() => {
|
|
696
698
|
s.off("promptDlg", q);
|
|
697
699
|
});
|
|
698
|
-
const
|
|
700
|
+
const T = () => {
|
|
699
701
|
t.value = !1, b || (s.emit("promptDlgResult" + g, p.value ?? ""), b = !0);
|
|
700
702
|
};
|
|
701
703
|
return N(t, (d) => {
|
|
@@ -707,7 +709,7 @@ const $e = /* @__PURE__ */ U({
|
|
|
707
709
|
"onUpdate:modelValue": x[2] || (x[2] = (K) => G(t) ? t.value = K : null),
|
|
708
710
|
onKeydown: [
|
|
709
711
|
x[3] || (x[3] = M(W((K) => t.value = !1, ["stop", "prevent"]), ["esc"])),
|
|
710
|
-
M(W(
|
|
712
|
+
M(W(T, ["stop", "prevent"]), ["enter"])
|
|
711
713
|
],
|
|
712
714
|
transition: "dialog-top-transition",
|
|
713
715
|
"max-width": "600px"
|
|
@@ -748,7 +750,7 @@ const $e = /* @__PURE__ */ U({
|
|
|
748
750
|
_: 1
|
|
749
751
|
}, 8, ["color"]),
|
|
750
752
|
k(ee, {
|
|
751
|
-
onClick:
|
|
753
|
+
onClick: T,
|
|
752
754
|
color: A.value,
|
|
753
755
|
variant: "text"
|
|
754
756
|
}, {
|
|
@@ -778,7 +780,7 @@ const $e = /* @__PURE__ */ U({
|
|
|
778
780
|
};
|
|
779
781
|
return S(() => {
|
|
780
782
|
s.on("openWaitDlg", l), s.on("closeWaitDlg", o);
|
|
781
|
-
}),
|
|
783
|
+
}), O(() => {
|
|
782
784
|
s.off("openWaitDlg", l), s.off("closeWaitDlg", o);
|
|
783
785
|
}), (r, n) => {
|
|
784
786
|
const c = h("v-card"), p = h("v-dialog");
|
|
@@ -850,7 +852,7 @@ function vt(e, a) {
|
|
|
850
852
|
};
|
|
851
853
|
S(() => {
|
|
852
854
|
s.on("pause", c), s.on("resume", p), s.on("backbutton", _);
|
|
853
|
-
}),
|
|
855
|
+
}), O(() => {
|
|
854
856
|
s.off("pause", c), s.off("resume", p), s.off("backbutton", _);
|
|
855
857
|
});
|
|
856
858
|
const v = (u) => {
|
|
@@ -869,7 +871,7 @@ function vt(e, a) {
|
|
|
869
871
|
};
|
|
870
872
|
S(() => {
|
|
871
873
|
window.addEventListener("keydown", v);
|
|
872
|
-
}),
|
|
874
|
+
}), O(() => {
|
|
873
875
|
window.removeEventListener("keydown", v);
|
|
874
876
|
});
|
|
875
877
|
let y;
|
|
@@ -885,11 +887,11 @@ function vt(e, a) {
|
|
|
885
887
|
if (!g)
|
|
886
888
|
return;
|
|
887
889
|
const q = {};
|
|
888
|
-
for (const
|
|
889
|
-
if (
|
|
890
|
+
for (const T in b) {
|
|
891
|
+
if (T === "checksum")
|
|
890
892
|
continue;
|
|
891
|
-
const d = b[
|
|
892
|
-
q[
|
|
893
|
+
const d = b[T];
|
|
894
|
+
q[T] = JSON.parse(d);
|
|
893
895
|
}
|
|
894
896
|
o.permissionObjects = q, o.permissionChecksum = b.checksum ?? "";
|
|
895
897
|
} catch (g) {
|
|
@@ -904,7 +906,7 @@ function vt(e, a) {
|
|
|
904
906
|
};
|
|
905
907
|
S(() => {
|
|
906
908
|
a && A(!0);
|
|
907
|
-
}),
|
|
909
|
+
}), O(() => {
|
|
908
910
|
I();
|
|
909
911
|
});
|
|
910
912
|
}
|