x-essential-lib 0.5.85 → 0.6.1

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.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  declare const _default: {
2
- install: (app: import("vue").App<any>) => void;
2
+ install: (app: import("vue").App) => void;
3
3
  };
4
4
  export default _default;
5
5
  export * from './composables';
package/dist/index.js CHANGED
@@ -1,11 +1,11 @@
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-ea85eb65]{position:absolute;top:0;left:0;bottom:0;right:0;display:flex;align-items:center;justify-content:center}.lds-spinner[data-v-ea85eb65]{color:official;display:inline-block;position:relative;width:40px;height:40px}.lds-spinner div[data-v-ea85eb65]{transform-origin:20px 20px;animation:lds-spinner-ea85eb65 1.2s linear infinite}.lds-spinner div[data-v-ea85eb65]:after{content:" ";display:block;position:absolute;top:3px;left:18px;width:2px;height:6px;border-radius:5%;background:#9e9e9e}.lds-spinner div[data-v-ea85eb65]:nth-child(1){transform:rotate(0);animation-delay:-1.1s}.lds-spinner div[data-v-ea85eb65]:nth-child(2){transform:rotate(30deg);animation-delay:-1s}.lds-spinner div[data-v-ea85eb65]:nth-child(3){transform:rotate(60deg);animation-delay:-.9s}.lds-spinner div[data-v-ea85eb65]:nth-child(4){transform:rotate(90deg);animation-delay:-.8s}.lds-spinner div[data-v-ea85eb65]:nth-child(5){transform:rotate(120deg);animation-delay:-.7s}.lds-spinner div[data-v-ea85eb65]:nth-child(6){transform:rotate(150deg);animation-delay:-.6s}.lds-spinner div[data-v-ea85eb65]:nth-child(7){transform:rotate(180deg);animation-delay:-.5s}.lds-spinner div[data-v-ea85eb65]:nth-child(8){transform:rotate(210deg);animation-delay:-.4s}.lds-spinner div[data-v-ea85eb65]:nth-child(9){transform:rotate(240deg);animation-delay:-.3s}.lds-spinner div[data-v-ea85eb65]:nth-child(10){transform:rotate(270deg);animation-delay:-.2s}.lds-spinner div[data-v-ea85eb65]:nth-child(11){transform:rotate(300deg);animation-delay:-.1s}.lds-spinner div[data-v-ea85eb65]:nth-child(12){transform:rotate(330deg);animation-delay:0s}@keyframes lds-spinner-ea85eb65{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(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
- import { ref as d, defineComponent as U, computed as m, onMounted as S, onBeforeUnmount as I, watch as N, resolveComponent as h, openBlock as V, createBlock as T, withKeys as K, withModifiers as L, withCtx as w, createVNode as b, createTextVNode as j, toDisplayString as O, createElementBlock as X, normalizeStyle as de, pushScopeId as _e, popScopeId as ie, createElementVNode as v, reactive as fe, Fragment as ge, renderList as ve, createCommentVNode as me, getCurrentScope as he, onScopeDispose as we, unref as xe, watchEffect as ye, getCurrentInstance as ke } from "vue";
3
- import { useI18n as Y } from "vue-i18n";
2
+ import { ref as d, defineComponent as U, computed as m, onMounted as S, onBeforeUnmount as O, watch as G, resolveComponent as h, openBlock as V, createBlock as T, withKeys as H, withModifiers as W, withCtx as w, createVNode as b, createTextVNode as j, toDisplayString as I, createElementBlock as J, normalizeStyle as de, pushScopeId as _e, popScopeId as ie, createElementVNode as v, reactive as fe, Fragment as ge, renderList as ve, createCommentVNode as me, getCurrentScope as he, onScopeDispose as we, unref as xe, watchEffect as ye, getCurrentInstance as ke } from "vue";
3
+ import { useI18n as Z } from "vue-i18n";
4
4
  import { defineStore as oe } from "pinia";
5
5
  import be from "axios";
6
6
  import { useRouter as ne, useRoute as De } from "vue-router";
7
- import { useTheme as Z, useDisplay as Ce } from "vuetify";
8
- const G = oe("global", () => {
7
+ import { useTheme as P, useDisplay as Ce } from "vuetify";
8
+ const Q = oe("global", () => {
9
9
  const e = d(), t = d("en"), a = d({}), n = d(""), o = d("");
10
10
  return {
11
11
  dark: e,
@@ -14,7 +14,7 @@ const G = oe("global", () => {
14
14
  permissionChecksum: n,
15
15
  lastAppPath: o
16
16
  };
17
- }), W = oe("viewMgr", () => {
17
+ }), $ = oe("viewMgr", () => {
18
18
  const e = d([]);
19
19
  function t() {
20
20
  return e.value.length <= 0;
@@ -28,7 +28,8 @@ const G = oe("global", () => {
28
28
  return e.value.find((p) => p === u) !== void 0;
29
29
  }
30
30
  function o(u) {
31
- e.value.push(u);
31
+ const p = e.value.findIndex((i) => i === u);
32
+ p !== -1 && e.value.splice(p, 1), e.value.push(u);
32
33
  }
33
34
  function r(u) {
34
35
  const p = e.value.findIndex((i) => i === u);
@@ -52,7 +53,7 @@ const G = oe("global", () => {
52
53
  };
53
54
  });
54
55
  /*! js-cookie v3.0.5 | MIT */
55
- function F(e) {
56
+ function K(e) {
56
57
  for (var t = 1; t < arguments.length; t++) {
57
58
  var a = arguments[t];
58
59
  for (var n in a)
@@ -71,10 +72,10 @@ var Ve = {
71
72
  );
72
73
  }
73
74
  };
74
- function J(e, t) {
75
+ function Y(e, t) {
75
76
  function a(o, r, l) {
76
77
  if (!(typeof document > "u")) {
77
- l = F({}, t, l), typeof l.expires == "number" && (l.expires = new Date(Date.now() + l.expires * 864e5)), l.expires && (l.expires = l.expires.toUTCString()), o = encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
78
+ l = K({}, t, l), typeof l.expires == "number" && (l.expires = new Date(Date.now() + l.expires * 864e5)), l.expires && (l.expires = l.expires.toUTCString()), o = encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
78
79
  var c = "";
79
80
  for (var u in l)
80
81
  l[u] && (c += "; " + u, l[u] !== !0 && (c += "=" + l[u].split(";")[0]));
@@ -103,16 +104,16 @@ function J(e, t) {
103
104
  a(
104
105
  o,
105
106
  "",
106
- F({}, r, {
107
+ K({}, r, {
107
108
  expires: -1
108
109
  })
109
110
  );
110
111
  },
111
112
  withAttributes: function(o) {
112
- return J(this.converter, F({}, this.attributes, o));
113
+ return Y(this.converter, K({}, this.attributes, o));
113
114
  },
114
115
  withConverter: function(o) {
115
- return J(F({}, this.converter, o), this.attributes);
116
+ return Y(K({}, this.converter, o), this.attributes);
116
117
  }
117
118
  },
118
119
  {
@@ -121,7 +122,7 @@ function J(e, t) {
121
122
  }
122
123
  );
123
124
  }
124
- var E = J(Ve, { path: "/" });
125
+ var E = Y(Ve, { path: "/" });
125
126
  function vt(e) {
126
127
  const t = be.create({
127
128
  timeout: 6e3
@@ -161,7 +162,7 @@ function Re(e, t) {
161
162
  function Ae() {
162
163
  E.remove("accessToken"), E.remove("refreshToken"), E.remove("activeOrg"), ne().replace({ path: "/passport/login" });
163
164
  }
164
- function Oe(e) {
165
+ function Ie(e) {
165
166
  return { all: e = e || /* @__PURE__ */ new Map(), on: function(t, a) {
166
167
  var n = e.get(t);
167
168
  n ? n.push(a) : e.set(t, [a]);
@@ -178,14 +179,14 @@ function Oe(e) {
178
179
  } };
179
180
  }
180
181
  const s = function() {
181
- return window.eventBus || (window.eventBus = Oe()), window.eventBus;
182
+ return window.eventBus || (window.eventBus = Ie()), window.eventBus;
182
183
  }();
183
184
  async function mt(e) {
184
185
  return new Promise((t) => {
185
186
  setTimeout(t, e);
186
187
  });
187
188
  }
188
- async function P(e, t, a) {
189
+ async function ee(e, t, a) {
189
190
  const n = Date.now();
190
191
  return new Promise((o) => {
191
192
  const r = async () => {
@@ -194,7 +195,7 @@ async function P(e, t, a) {
194
195
  r();
195
196
  });
196
197
  }
197
- function Ie(e, t) {
198
+ function Oe(e, t) {
198
199
  var o;
199
200
  const a = "single-spa-application:" + e, n = (o = document.getElementById(a)) == null ? void 0 : o.classList;
200
201
  n && (n.remove("app-left", "app-right", "app-reset"), t ? n.add("app-left") : n.add("app-right"), setTimeout(() => {
@@ -217,7 +218,7 @@ async function ht(e) {
217
218
  const n = (r) => {
218
219
  a = r, t = !0;
219
220
  }, o = re();
220
- return s.on("confirmDlgResult" + o, n), s.emit("confirmDlg", { ...e, seq: o }), await P(() => t), s.off("confirmDlgResult" + o, n), a;
221
+ return s.on("confirmDlgResult" + o, n), s.emit("confirmDlg", { ...e, seq: o }), await ee(() => t), s.off("confirmDlgResult" + o, n), a;
221
222
  }
222
223
  async function wt(e) {
223
224
  if (!le())
@@ -226,7 +227,7 @@ async function wt(e) {
226
227
  const n = (r) => {
227
228
  a = r, t = !0;
228
229
  }, o = re();
229
- return s.on("promptDlgResult" + o, n), s.emit("promptDlg", { ...e, seq: o }), await P(() => t), s.off("promptDlgResult" + o, n), a;
230
+ return s.on("promptDlgResult" + o, n), s.emit("promptDlg", { ...e, seq: o }), await ee(() => t), s.off("promptDlgResult" + o, n), a;
230
231
  }
231
232
  function xt(e) {
232
233
  s.emit("openWaitDlg", { text: e });
@@ -368,7 +369,7 @@ const Te = [
368
369
  mainActive: 2
369
370
  }
370
371
  ];
371
- function H(e) {
372
+ function N(e) {
372
373
  let t, a = 0;
373
374
  const n = e.split("/").filter((o) => o.trim() !== "");
374
375
  return Te.forEach((o) => {
@@ -379,11 +380,11 @@ function H(e) {
379
380
  l > 0 && l > a && (t = o, a = l);
380
381
  }), t;
381
382
  }
382
- const Q = d("");
383
+ const X = d("");
383
384
  function C(e, t) {
384
- const a = G();
385
+ const a = Q();
385
386
  t === "/" && (t = a.lastAppPath);
386
- const n = H(e), o = H(t);
387
+ const n = N(e), o = N(t);
387
388
  if (!n) {
388
389
  console.assert(!1);
389
390
  return;
@@ -391,7 +392,7 @@ function C(e, t) {
391
392
  if (console.info(`~~~~routeChange~~~~ ${t} -> ${e}`), !o)
392
393
  return;
393
394
  const r = n.app === o.app, l = n.path === o.path, c = n.level >= o.level;
394
- r ? l ? Q.value = "" : Q.value = c ? "inner-left" : "inner-right" : (Q.value = "", Ie(n.app, c));
395
+ r ? l ? X.value = "" : X.value = c ? "inner-left" : "inner-right" : (X.value = "", Oe(n.app, c));
395
396
  }
396
397
  function Ue() {
397
398
  return !!E.get("accessToken");
@@ -400,7 +401,7 @@ function Be() {
400
401
  return !!E.get("activeOrg");
401
402
  }
402
403
  function Vt(e, t, a) {
403
- const n = Ue(), o = Be(), r = H(e.path);
404
+ const n = Ue(), o = Be(), r = N(e.path);
404
405
  if (!r) {
405
406
  console.assert(!1), a();
406
407
  return;
@@ -442,7 +443,7 @@ function Vt(e, t, a) {
442
443
  const Le = /* @__PURE__ */ U({
443
444
  __name: "index",
444
445
  setup(e) {
445
- const { t } = Y(), a = W(), n = m({
446
+ const { t } = Z(), a = $(), n = m({
446
447
  get() {
447
448
  return a.hasView("confirmDlg");
448
449
  },
@@ -457,13 +458,13 @@ const Le = /* @__PURE__ */ U({
457
458
  };
458
459
  S(() => {
459
460
  s.on("confirmDlg", _);
460
- }), I(() => {
461
+ }), O(() => {
461
462
  s.off("confirmDlg", _);
462
463
  });
463
464
  const q = () => {
464
465
  n.value = !1, x || (s.emit("confirmDlgResult" + i, !0), x = !0);
465
466
  };
466
- return N(n, (g) => {
467
+ return G(n, (g) => {
467
468
  !g && !x && (s.emit("confirmDlgResult" + i, !1), x = !0);
468
469
  }), (g, y) => {
469
470
  const D = h("v-card-text"), M = h("v-btn"), A = h("v-card-actions"), f = h("v-card"), k = h("v-dialog");
@@ -471,8 +472,8 @@ const Le = /* @__PURE__ */ U({
471
472
  modelValue: n.value,
472
473
  "onUpdate:modelValue": y[1] || (y[1] = (R) => n.value = R),
473
474
  onKeydown: [
474
- y[2] || (y[2] = K(L((R) => n.value = !1, ["stop", "prevent"]), ["esc"])),
475
- K(L(q, ["stop", "prevent"]), ["enter"])
475
+ y[2] || (y[2] = H(W((R) => n.value = !1, ["stop", "prevent"]), ["esc"])),
476
+ H(W(q, ["stop", "prevent"]), ["enter"])
476
477
  ],
477
478
  transition: "dialog-top-transition",
478
479
  "max-width": "600px"
@@ -482,7 +483,7 @@ const Le = /* @__PURE__ */ U({
482
483
  default: w(() => [
483
484
  b(D, null, {
484
485
  default: w(() => [
485
- j(O(r.value), 1)
486
+ j(I(r.value), 1)
486
487
  ]),
487
488
  _: 1
488
489
  }),
@@ -494,7 +495,7 @@ const Le = /* @__PURE__ */ U({
494
495
  variant: "text"
495
496
  }, {
496
497
  default: w(() => [
497
- j(O(c.value), 1)
498
+ j(I(c.value), 1)
498
499
  ]),
499
500
  _: 1
500
501
  }, 8, ["color"]),
@@ -504,7 +505,7 @@ const Le = /* @__PURE__ */ U({
504
505
  variant: "text"
505
506
  }, {
506
507
  default: w(() => [
507
- j(O(p.value), 1)
508
+ j(I(p.value), 1)
508
509
  ]),
509
510
  _: 1
510
511
  }, 8, ["color"])
@@ -543,11 +544,11 @@ const Le = /* @__PURE__ */ U({
543
544
  }
544
545
  },
545
546
  setup(e) {
546
- const t = Z(), a = e, n = m(() => ({
547
+ const t = P(), a = e, n = m(() => ({
547
548
  background: t.current.value.dark ? "#1e1e1e" : "#ffffff",
548
549
  zIndex: a.zIndex
549
550
  }));
550
- return (o, r) => (V(), X("div", {
551
+ return (o, r) => (V(), J("div", {
551
552
  class: "x-cont",
552
553
  style: de(n.value)
553
554
  }, ze, 4));
@@ -572,7 +573,7 @@ const Le = /* @__PURE__ */ U({
572
573
  setTimeout(() => {
573
574
  o("timeout", a.id);
574
575
  }, a.timeout);
575
- }), N(n, (r) => {
576
+ }), G(n, (r) => {
576
577
  r || o("timeout", a.id);
577
578
  }), (r, l) => {
578
579
  const c = h("v-alert");
@@ -596,7 +597,7 @@ const Le = /* @__PURE__ */ U({
596
597
  const t = fe({ items: [] });
597
598
  S(() => {
598
599
  s.on("message", a);
599
- }), I(() => {
600
+ }), O(() => {
600
601
  s.off("message", a);
601
602
  });
602
603
  const a = (c) => {
@@ -612,12 +613,12 @@ const Le = /* @__PURE__ */ U({
612
613
  const u = t.items.findIndex((p) => p.id === c);
613
614
  u >= 0 && t.items.splice(u, 1);
614
615
  };
615
- return (c, u) => (V(), X("div", {
616
- onClick: u[0] || (u[0] = L(() => {
616
+ return (c, u) => (V(), J("div", {
617
+ onClick: u[0] || (u[0] = W(() => {
617
618
  }, ["stop"])),
618
619
  class: "x-cont d-flex flex-column-reverse align-center"
619
620
  }, [
620
- (V(!0), X(ge, null, ve(t.items, (p) => (V(), T(He, {
621
+ (V(!0), J(ge, null, ve(t.items, (p) => (V(), T(He, {
621
622
  onTimeout: n,
622
623
  id: p.id,
623
624
  type: p.type,
@@ -630,7 +631,7 @@ const Le = /* @__PURE__ */ U({
630
631
  }), Ge = /* @__PURE__ */ ce(Ne, [["__scopeId", "data-v-8c2268ea"]]), Qe = /* @__PURE__ */ U({
631
632
  __name: "index",
632
633
  setup(e) {
633
- const { t } = Y(), a = W(), n = m({
634
+ const { t } = Z(), a = $(), n = m({
634
635
  get() {
635
636
  return a.hasView("promptDlg");
636
637
  },
@@ -640,27 +641,27 @@ const Le = /* @__PURE__ */ U({
640
641
  }), o = d(""), r = d(""), l = d(""), c = d(""), u = d(), p = d(""), i = d(""), x = d(""), _ = d(""), q = d(""), g = d();
641
642
  let y = 0, D = !1;
642
643
  const M = async (f) => {
643
- var k, R, $, z;
644
- o.value = f.title, r.value = f.text, l.value = f.label, c.value = f.placeholder, u.value = f.rules, p.value = f.value, i.value = ((k = f.cancel) == null ? void 0 : k.color) ?? "primary", x.value = ((R = f.cancel) == null ? void 0 : R.text) ?? t("dlg.common.cancel"), _.value = (($ = f.confirm) == null ? void 0 : $.color) ?? "primary", q.value = ((z = f.confirm) == null ? void 0 : z.text) ?? t("dlg.common.confirm"), y = f.seq, D = !1, n.value = !0, await P(() => g.value !== void 0, 1e3), g.value.focus();
644
+ var k, R, z, F, B;
645
+ o.value = f.title, r.value = f.text, l.value = f.label, c.value = f.placeholder, u.value = f.rules, p.value = f.value, i.value = ((k = f.cancel) == null ? void 0 : k.color) ?? "primary", x.value = ((R = f.cancel) == null ? void 0 : R.text) ?? t("dlg.common.cancel"), _.value = ((z = f.confirm) == null ? void 0 : z.color) ?? "primary", q.value = ((F = f.confirm) == null ? void 0 : F.text) ?? t("dlg.common.confirm"), y = f.seq, D = !1, n.value = !0, await ee(() => !!g.value, 1e3), (B = g.value) == null || B.focus();
645
646
  };
646
647
  S(() => {
647
648
  s.on("promptDlg", M);
648
- }), I(() => {
649
+ }), O(() => {
649
650
  s.off("promptDlg", M);
650
651
  });
651
652
  const A = () => {
652
653
  n.value = !1, D || (s.emit("promptDlgResult" + y, p.value ?? ""), D = !0);
653
654
  };
654
- return N(n, (f) => {
655
+ return G(n, (f) => {
655
656
  !f && !D && (s.emit("promptDlgResult" + y, void 0), D = !0);
656
657
  }), (f, k) => {
657
- const R = h("v-card-text"), $ = h("v-text-field"), z = h("v-form"), ee = h("v-btn"), ue = h("v-card-actions"), se = h("v-card"), pe = h("v-dialog");
658
+ const R = h("v-card-text"), z = h("v-text-field"), F = h("v-form"), B = h("v-btn"), ue = h("v-card-actions"), se = h("v-card"), pe = h("v-dialog");
658
659
  return V(), T(pe, {
659
660
  modelValue: n.value,
660
- "onUpdate:modelValue": k[2] || (k[2] = (B) => n.value = B),
661
+ "onUpdate:modelValue": k[2] || (k[2] = (L) => n.value = L),
661
662
  onKeydown: [
662
- k[3] || (k[3] = K(L((B) => n.value = !1, ["stop", "prevent"]), ["esc"])),
663
- K(L(A, ["stop", "prevent"]), ["enter"])
663
+ k[3] || (k[3] = H(W((L) => n.value = !1, ["stop", "prevent"]), ["esc"])),
664
+ H(W(A, ["stop", "prevent"]), ["enter"])
664
665
  ],
665
666
  transition: "dialog-top-transition",
666
667
  "max-width": "600px"
@@ -670,15 +671,15 @@ const Le = /* @__PURE__ */ U({
670
671
  default: w(() => [
671
672
  r.value ? (V(), T(R, { key: 0 }, {
672
673
  default: w(() => [
673
- j(O(r.value), 1)
674
+ j(I(r.value), 1)
674
675
  ]),
675
676
  _: 1
676
677
  })) : me("", !0),
677
- b(z, { class: "mx-3" }, {
678
+ b(F, { class: "mx-3" }, {
678
679
  default: w(() => [
679
- b($, {
680
+ b(z, {
680
681
  modelValue: p.value,
681
- "onUpdate:modelValue": k[0] || (k[0] = (B) => p.value = B),
682
+ "onUpdate:modelValue": k[0] || (k[0] = (L) => p.value = L),
682
683
  label: l.value,
683
684
  placeholder: c.value,
684
685
  rules: u.value,
@@ -690,23 +691,23 @@ const Le = /* @__PURE__ */ U({
690
691
  }),
691
692
  b(ue, { class: "d-flex justify-end" }, {
692
693
  default: w(() => [
693
- b(ee, {
694
- onClick: k[1] || (k[1] = (B) => n.value = !1),
694
+ b(B, {
695
+ onClick: k[1] || (k[1] = (L) => n.value = !1),
695
696
  color: i.value,
696
697
  variant: "text"
697
698
  }, {
698
699
  default: w(() => [
699
- j(O(x.value), 1)
700
+ j(I(x.value), 1)
700
701
  ]),
701
702
  _: 1
702
703
  }, 8, ["color"]),
703
- b(ee, {
704
+ b(B, {
704
705
  onClick: A,
705
706
  color: _.value,
706
707
  variant: "text"
707
708
  }, {
708
709
  default: w(() => [
709
- j(O(q.value), 1)
710
+ j(I(q.value), 1)
710
711
  ]),
711
712
  _: 1
712
713
  }, 8, ["color"])
@@ -724,7 +725,7 @@ const Le = /* @__PURE__ */ U({
724
725
  }), Xe = { class: "mx-auto my-auto" }, Je = { class: "w-100 h-100 d-flex align-center justify-center" }, Ye = { class: "text-body-1" }, Ze = /* @__PURE__ */ U({
725
726
  __name: "index",
726
727
  setup(e) {
727
- const { t } = Y(), a = W(), n = m({
728
+ const { t } = Z(), a = $(), n = m({
728
729
  get() {
729
730
  return a.hasView("waitDlg");
730
731
  },
@@ -738,7 +739,7 @@ const Le = /* @__PURE__ */ U({
738
739
  };
739
740
  return S(() => {
740
741
  s.on("openWaitDlg", r), s.on("closeWaitDlg", l);
741
- }), I(() => {
742
+ }), O(() => {
742
743
  s.off("openWaitDlg", r), s.off("closeWaitDlg", l);
743
744
  }), (c, u) => {
744
745
  const p = h("v-card"), i = h("v-dialog");
@@ -758,7 +759,7 @@ const Le = /* @__PURE__ */ U({
758
759
  }, {
759
760
  default: w(() => [
760
761
  v("div", Je, [
761
- v("span", Ye, O(o.value), 1)
762
+ v("span", Ye, I(o.value), 1)
762
763
  ])
763
764
  ]),
764
765
  _: 1
@@ -773,7 +774,7 @@ const Le = /* @__PURE__ */ U({
773
774
  e.component("x-confirm-dlg", Le), e.component("x-loading", Ke), e.component("x-message", Ge), e.component("x-prompt-dlg", Qe), e.component("x-wait-dlg", Ze);
774
775
  };
775
776
  function St() {
776
- const e = Z(), t = m(() => e.global.current.value.colors.primary), a = m(() => e.global.current.value.colors.secondary), n = m(() => e.current.value.dark ? "#2e2e2e" : "#bdbdbd"), o = m(() => e.current.value.dark ? "#272727" : "#eeeeee"), r = m(() => e.current.value.dark ? "#1e1e1e" : "#ffffff"), l = m(() => e.current.value.dark ? "#303030" : "#f6f6f6"), c = m(() => e.current.value.dark ? "#ffffff1f" : "#0000001f");
777
+ const e = P(), t = m(() => e.global.current.value.colors.primary), a = m(() => e.global.current.value.colors.secondary), n = m(() => e.current.value.dark ? "#2e2e2e" : "#bdbdbd"), o = m(() => e.current.value.dark ? "#272727" : "#eeeeee"), r = m(() => e.current.value.dark ? "#1e1e1e" : "#ffffff"), l = m(() => e.current.value.dark ? "#303030" : "#f6f6f6"), c = m(() => e.current.value.dark ? "#ffffff1f" : "#0000001f");
777
778
  return {
778
779
  primaryColor: t,
779
780
  secondaryColor: a,
@@ -821,12 +822,12 @@ function ct(e) {
821
822
  return rt("(prefers-color-scheme: dark)", e);
822
823
  }
823
824
  function ut() {
824
- const e = Ce(), t = G(), a = ct(), n = m(() => typeof t.dark == "boolean" ? t.dark : a.value), o = m(() => !!window.cordova), r = m(() => e.width.value <= 1280 ? e.width.value + "px" : e.width.value <= 1920 ? 1920 / 2.5 + "px" : 2560 / 2.5 + "px");
825
+ const e = Ce(), t = Q(), a = ct(), n = m(() => typeof t.dark == "boolean" ? t.dark : a.value), o = m(() => !!window.cordova), r = m(() => e.width.value <= 1280 ? e.width.value + "px" : e.width.value <= 1920 ? 1920 / 2.5 + "px" : 2560 / 2.5 + "px");
825
826
  return { dark: n, sysBarAvail: o, compactWidth: r };
826
827
  }
827
828
  function qt() {
828
- const e = De(), t = ne(), a = Z(), { dark: n } = ut(), o = G(), r = W();
829
- N(
829
+ const e = De(), t = ne(), a = P(), { dark: n } = ut(), o = Q(), r = $();
830
+ G(
830
831
  n,
831
832
  (_) => {
832
833
  a.global.name.value = _ ? "dark" : "light";
@@ -844,7 +845,7 @@ function qt() {
844
845
  r.hasView("waitDlg") || r.popView();
845
846
  return;
846
847
  }
847
- const _ = H(e.path);
848
+ const _ = N(e.path);
848
849
  (_ == null ? void 0 : _.level) === 0 ? (q = navigator == null ? void 0 : navigator.Backbutton) == null || q.goHome(
849
850
  () => {
850
851
  },
@@ -854,7 +855,7 @@ function qt() {
854
855
  };
855
856
  S(() => {
856
857
  window.addEventListener("keydown", l), s.on("backbutton", c);
857
- }), I(() => {
858
+ }), O(() => {
858
859
  window.removeEventListener("keydown", l), s.off("backbutton", c);
859
860
  });
860
861
  const u = (_) => {
@@ -868,12 +869,12 @@ function qt() {
868
869
  };
869
870
  S(() => {
870
871
  s.on("updateDark", u), s.on("updateLocale", p), s.on("updatePermission", i), s.on("updateLastAppPath", x), s.emit("syncGlobalState");
871
- }), I(() => {
872
+ }), O(() => {
872
873
  s.off("updateDark", u), s.off("updateLocale", p), s.off("updatePermission", i), s.off("updateLastAppPath", x);
873
874
  });
874
875
  }
875
876
  function Mt() {
876
- const e = G();
877
+ const e = Q();
877
878
  function t(a, n) {
878
879
  const o = e.permissionObjects[a];
879
880
  return o ? n ? !(!ae(o.includes, n) || ae(o.excludes, n)) : !0 : !1;
@@ -881,7 +882,7 @@ function Mt() {
881
882
  return { verifyPermission: t };
882
883
  }
883
884
  function Rt(e, t) {
884
- const a = W(), n = m({
885
+ const a = $(), n = m({
885
886
  get() {
886
887
  return a.hasView(e);
887
888
  },
@@ -893,30 +894,37 @@ function Rt(e, t) {
893
894
  };
894
895
  return S(() => {
895
896
  s.on(e, o);
896
- }), I(() => {
897
+ }), O(() => {
897
898
  s.off(e, o);
898
899
  }), { open: n };
899
900
  }
900
901
  const st = (e, t, a) => {
901
902
  const n = e[t];
902
903
  return n ? typeof n == "function" ? n() : Promise.resolve(n) : new Promise((o, r) => {
903
- (typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(r.bind(null, new Error("Unknown variable dynamic import: " + t + (t.split("/").length !== a ? ". Note that variables only represent file names one level deep." : ""))));
904
+ (typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(
905
+ r.bind(
906
+ null,
907
+ new Error(
908
+ "Unknown variable dynamic import: " + t + (t.split("/").length !== a ? ". Note that variables only represent file names one level deep." : "")
909
+ )
910
+ )
911
+ );
904
912
  });
905
913
  };
906
914
  async function At(e) {
907
915
  return (await st(/* @__PURE__ */ Object.assign({ "./locales/en/index.ts": () => import("./en-iuzmkt0n.js"), "./locales/zhHans/index.ts": () => import("./zhHans-m6y1by9n.js") }), `./locales/${e}/index.ts`, 4)).default;
908
916
  }
909
- const Ot = { install: Pe };
917
+ const It = { install: Pe };
910
918
  export {
911
919
  Ee as Permission,
912
- Ie as appAppear,
920
+ Oe as appAppear,
913
921
  yt as closeWaitDlg,
914
922
  vt as createAxios,
915
- Ot as default,
923
+ It as default,
916
924
  s as eventBus,
917
925
  ae as isExist,
918
926
  At as loadLocaleMessageEssential,
919
- H as matchRouteMeta,
927
+ N as matchRouteMeta,
920
928
  kt as messageError,
921
929
  bt as messageInfo,
922
930
  Dt as messageSuccess,
@@ -925,14 +933,14 @@ export {
925
933
  ht as openConfirmDlg,
926
934
  wt as openPromptDlg,
927
935
  xt as openWaitDlg,
928
- Q as routeTransName,
936
+ X as routeTransName,
929
937
  St as useColor,
930
- G as useGlobalStore,
938
+ Q as useGlobalStore,
931
939
  qt as useMicroApp,
932
940
  Mt as usePermission,
933
941
  ut as useSystem,
934
- W as useViewMgrStore,
942
+ $ as useViewMgrStore,
935
943
  Rt as useViewStack,
936
944
  mt as waitMs,
937
- P as waitUtil
945
+ ee as waitUtil
938
946
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "x-essential-lib",
3
3
  "private": false,
4
- "version": "0.5.85",
4
+ "version": "0.6.1",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -27,31 +27,32 @@
27
27
  "mitt": "^3.0.1"
28
28
  },
29
29
  "peerDependencies": {
30
- "axios": "^1.6.8",
30
+ "axios": "^1.7.2",
31
31
  "pinia": "^2.1.7",
32
32
  "pinia-plugin-persistedstate": "^3.2.1",
33
- "vue": "^3.4.30",
33
+ "vue": "^3.4.31",
34
34
  "vue-i18n": "^9.13.1",
35
35
  "vue-router": "^4.4.0",
36
- "vuetify": "^3.6.10"
36
+ "vuetify": "^3.6.12"
37
37
  },
38
38
  "devDependencies": {
39
- "@rushstack/eslint-patch": "^1.8.0",
39
+ "@mdi/js": "^7.4.47",
40
+ "@rushstack/eslint-patch": "^1.10.3",
40
41
  "@types/js-cookie": "^3.0.6",
41
- "@types/node": "^20.12.2",
42
- "@vitejs/plugin-vue": "^5.0.4",
42
+ "@types/node": "^20.14.10",
43
+ "@vitejs/plugin-vue": "^5.0.5",
43
44
  "@vue/eslint-config-prettier": "^9.0.0",
44
45
  "@vue/eslint-config-typescript": "^13.0.0",
45
46
  "eslint": "^8.57.0",
46
- "eslint-plugin-vue": "^9.24.1",
47
+ "eslint-plugin-vue": "^9.27.0",
47
48
  "husky": "^9.0.11",
48
- "lint-staged": "^15.2.2",
49
- "prettier": "3.2.5",
50
- "sass": "^1.74.1",
51
- "typescript": "^5.2.2",
52
- "vite": "^5.2.0",
53
- "vite-plugin-css-injected-by-js": "^3.5.0",
49
+ "lint-staged": "^15.2.7",
50
+ "prettier": "3.3.2",
51
+ "sass": "^1.77.7",
52
+ "typescript": "^5.5.3",
53
+ "vite": "^5.3.3",
54
+ "vite-plugin-css-injected-by-js": "^3.5.1",
54
55
  "vite-plugin-vuetify": "^2.0.3",
55
- "vue-tsc": "^2.0.6"
56
+ "vue-tsc": "^2.0.26"
56
57
  }
57
58
  }