x-essential-lib 0.3.15 → 0.3.16

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.
Files changed (2) hide show
  1. package/dist/index.js +112 -112
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -2,10 +2,10 @@
2
2
  import { VAlert as ve, VBtn as me, VCard as he, VCardActions as we, VCardText as ye, VCardTitle as xe, VDialog as ke, VForm as be, VTextField as Ce } from "vuetify/lib/components/index.mjs";
3
3
  import { ref as i, computed as f, onMounted as D, onBeforeUnmount as T, defineComponent as R, watch as H, resolveComponent as g, openBlock as C, createBlock as O, unref as U, isRef as J, withKeys as W, withModifiers as A, withCtx as v, createVNode as h, createTextVNode as V, toDisplayString as b, createElementBlock as F, normalizeStyle as Ve, pushScopeId as De, popScopeId as qe, createElementVNode as m, reactive as Se, Fragment as Te, renderList as Oe, createCommentVNode as Re } from "vue";
4
4
  import { useLocale as X, useTheme as K, useDisplay as je } from "vuetify/lib/framework.mjs";
5
- import { defineStore as oe } from "pinia";
5
+ import { defineStore as le } from "pinia";
6
6
  import { useRouter as re, useRoute as Ie } from "vue-router";
7
7
  import Ee from "axios";
8
- const ne = oe("viewMgr", () => {
8
+ const ne = le("viewMgr", () => {
9
9
  const e = i([]);
10
10
  function a() {
11
11
  return e.value.length <= 0;
@@ -15,10 +15,10 @@ const ne = oe("viewMgr", () => {
15
15
  if (s > 0)
16
16
  return e.value[s - 1];
17
17
  }
18
- function l(s) {
18
+ function o(s) {
19
19
  return e.value.find((c) => c === s) !== void 0;
20
20
  }
21
- function o(s) {
21
+ function l(s) {
22
22
  n(s), e.value.push(s);
23
23
  }
24
24
  function n(s) {
@@ -31,21 +31,21 @@ const ne = oe("viewMgr", () => {
31
31
  function u() {
32
32
  e.value = [];
33
33
  }
34
- return { isEmpty: a, lastView: t, hasView: l, addView: o, delView: n, popView: r, clearViews: u };
34
+ return { isEmpty: a, lastView: t, hasView: o, addView: l, delView: n, popView: r, clearViews: u };
35
35
  });
36
36
  function $e(e) {
37
37
  return { all: e = e || /* @__PURE__ */ new Map(), on: function(a, t) {
38
- var l = e.get(a);
39
- l ? l.push(t) : e.set(a, [t]);
38
+ var o = e.get(a);
39
+ o ? o.push(t) : e.set(a, [t]);
40
40
  }, off: function(a, t) {
41
- var l = e.get(a);
42
- l && (t ? l.splice(l.indexOf(t) >>> 0, 1) : e.set(a, []));
41
+ var o = e.get(a);
42
+ o && (t ? o.splice(o.indexOf(t) >>> 0, 1) : e.set(a, []));
43
43
  }, emit: function(a, t) {
44
- var l = e.get(a);
45
- l && l.slice().map(function(o) {
46
- o(t);
47
- }), (l = e.get("*")) && l.slice().map(function(o) {
48
- o(a, t);
44
+ var o = e.get(a);
45
+ o && o.slice().map(function(l) {
46
+ l(t);
47
+ }), (o = e.get("*")) && o.slice().map(function(l) {
48
+ l(a, t);
49
49
  });
50
50
  } };
51
51
  }
@@ -56,35 +56,35 @@ async function ft(e) {
56
56
  });
57
57
  }
58
58
  async function G(e, a, t) {
59
- const l = Date.now();
60
- return new Promise((o) => {
59
+ const o = Date.now();
60
+ return new Promise((l) => {
61
61
  const n = async () => {
62
- e() ? o(!0) : a && Date.now() - l > a ? o(!1) : setTimeout(n, t ?? 30);
62
+ e() ? l(!0) : a && Date.now() - o > a ? l(!1) : setTimeout(n, t ?? 30);
63
63
  };
64
64
  n();
65
65
  });
66
66
  }
67
67
  function Q(e, a) {
68
- const t = ne(), l = f({
68
+ const t = ne(), o = f({
69
69
  get() {
70
70
  return t.hasView(e);
71
71
  },
72
72
  set(n) {
73
73
  n ? t.addView(e) : t.delView(e);
74
74
  }
75
- }), o = (n) => {
76
- a == null || a(n), l.value = !0;
75
+ }), l = (n) => {
76
+ a == null || a(n), o.value = !0;
77
77
  };
78
78
  return D(() => {
79
- _.on(e, o);
79
+ _.on(e, l);
80
80
  }), T(() => {
81
- _.off(e, o);
82
- }), { open: l };
81
+ _.off(e, l);
82
+ }), { open: o };
83
83
  }
84
84
  const Ae = /* @__PURE__ */ R({
85
85
  __name: "index",
86
86
  setup(e) {
87
- const a = X(), { open: t } = Q("confirmDlg"), l = i(""), o = i(""), n = i(), r = i(), u = f(() => {
87
+ const a = X(), { open: t } = Q("confirmDlg"), o = i(""), l = i(""), n = i(), r = i(), u = f(() => {
88
88
  var d;
89
89
  return ((d = n.value) == null ? void 0 : d.color) ?? "primary";
90
90
  }), s = f(() => {
@@ -99,7 +99,7 @@ const Ae = /* @__PURE__ */ R({
99
99
  });
100
100
  let j = 0, q = !1;
101
101
  const M = (d) => {
102
- l.value = d.title, o.value = d.text, n.value = d.cancel, r.value = d.confirm, j = d.seq, q = !1, t.value = !0;
102
+ o.value = d.title, l.value = d.text, n.value = d.cancel, r.value = d.confirm, j = d.seq, q = !1, t.value = !0;
103
103
  };
104
104
  D(() => {
105
105
  _.on("confirmDlg", M);
@@ -128,13 +128,13 @@ const Ae = /* @__PURE__ */ R({
128
128
  default: v(() => [
129
129
  h(S, null, {
130
130
  default: v(() => [
131
- V(b(l.value), 1)
131
+ V(b(o.value), 1)
132
132
  ]),
133
133
  _: 1
134
134
  }),
135
135
  h(L, null, {
136
136
  default: v(() => [
137
- V(b(o.value), 1)
137
+ V(b(l.value), 1)
138
138
  ]),
139
139
  _: 1
140
140
  }),
@@ -195,19 +195,19 @@ const Ae = /* @__PURE__ */ R({
195
195
  }
196
196
  },
197
197
  setup(e) {
198
- const a = K(), t = e, l = f(() => ({
198
+ const a = K(), t = e, o = f(() => ({
199
199
  background: a.current.value.dark ? "#1e1e1e" : "#ffffff",
200
200
  zIndex: t.zIndex
201
201
  }));
202
- return (o, n) => (C(), F("div", {
202
+ return (l, n) => (C(), F("div", {
203
203
  class: "x-cont",
204
- style: Ve(l.value)
204
+ style: Ve(o.value)
205
205
  }, Le, 4));
206
206
  }
207
207
  }), ce = (e, a) => {
208
208
  const t = e.__vccOpts || e;
209
- for (const [l, o] of a)
210
- t[l] = o;
209
+ for (const [o, l] of a)
210
+ t[o] = l;
211
211
  return t;
212
212
  }, Ue = /* @__PURE__ */ ce(Ne, [["__scopeId", "data-v-a8f3d91f"]]), We = /* @__PURE__ */ R({
213
213
  __name: "item",
@@ -231,7 +231,7 @@ const Ae = /* @__PURE__ */ R({
231
231
  },
232
232
  emits: ["timeout"],
233
233
  setup(e, { emit: a }) {
234
- const t = e, l = i(!0), o = a, n = f(() => {
234
+ const t = e, o = i(!0), l = a, n = f(() => {
235
235
  let r = "";
236
236
  switch (t.type) {
237
237
  case "error":
@@ -251,15 +251,15 @@ const Ae = /* @__PURE__ */ R({
251
251
  });
252
252
  return D(() => {
253
253
  setTimeout(() => {
254
- o("timeout", t.id);
254
+ l("timeout", t.id);
255
255
  }, t.timeout);
256
- }), H(l, (r) => {
257
- r || o("timeout", t.id);
256
+ }), H(o, (r) => {
257
+ r || l("timeout", t.id);
258
258
  }), (r, u) => {
259
259
  const s = g("v-alert");
260
260
  return C(), O(s, {
261
- modelValue: l.value,
262
- "onUpdate:modelValue": u[0] || (u[0] = (c) => l.value = c),
261
+ modelValue: o.value,
262
+ "onUpdate:modelValue": u[0] || (u[0] = (c) => o.value = c),
263
263
  class: "mt-2",
264
264
  type: e.type,
265
265
  icon: n.value,
@@ -283,12 +283,12 @@ const Ae = /* @__PURE__ */ R({
283
283
  });
284
284
  const t = (u) => {
285
285
  n(u.type, u.text, u.timeout);
286
- }, l = (u) => {
286
+ }, o = (u) => {
287
287
  r(u);
288
288
  };
289
- let o = 0;
289
+ let l = 0;
290
290
  const n = (u, s, c) => {
291
- const y = o++;
291
+ const y = l++;
292
292
  a.items.push({ id: y, type: u, text: s, timeout: c });
293
293
  }, r = (u) => {
294
294
  const s = a.items.findIndex((c) => c.id === u);
@@ -300,7 +300,7 @@ const Ae = /* @__PURE__ */ R({
300
300
  class: "x-cont d-flex flex-column-reverse align-center"
301
301
  }, [
302
302
  (C(!0), F(Te, null, Oe(a.items, (c) => (C(), O(We, {
303
- onTimeout: l,
303
+ onTimeout: o,
304
304
  id: c.id,
305
305
  type: c.type,
306
306
  text: c.text,
@@ -312,7 +312,7 @@ const Ae = /* @__PURE__ */ R({
312
312
  }), Ke = /* @__PURE__ */ ce(He, [["__scopeId", "data-v-70ed4b89"]]), ze = /* @__PURE__ */ R({
313
313
  __name: "index",
314
314
  setup(e) {
315
- const a = X(), { open: t } = Q("promptDlg"), l = i(""), o = i(""), n = i(), r = i(), u = i(), s = i(""), c = i(), y = i(), j = f(() => {
315
+ const a = X(), { open: t } = Q("promptDlg"), o = i(""), l = i(""), n = i(), r = i(), u = i(), s = i(""), c = i(), y = i(), j = f(() => {
316
316
  var p;
317
317
  return ((p = c.value) == null ? void 0 : p.color) ?? "primary";
318
318
  }), q = f(() => {
@@ -328,7 +328,7 @@ const Ae = /* @__PURE__ */ R({
328
328
  let x = 0, S = !1;
329
329
  const L = async (p) => {
330
330
  var w;
331
- l.value = p.title, o.value = p.text, n.value = p.label, r.value = p.placeholder, u.value = p.rules, s.value = p.value, c.value = p.cancel, y.value = p.confirm, x = p.seq, S = !1, t.value = !0, await G(() => d.value !== void 0, 1e3), (w = d.value) == null || w.focus();
331
+ o.value = p.title, l.value = p.text, n.value = p.label, r.value = p.placeholder, u.value = p.rules, s.value = p.value, c.value = p.cancel, y.value = p.confirm, x = p.seq, S = !1, t.value = !0, await G(() => d.value !== void 0, 1e3), (w = d.value) == null || w.focus();
332
332
  };
333
333
  D(() => {
334
334
  _.on("promptDlg", L);
@@ -357,13 +357,13 @@ const Ae = /* @__PURE__ */ R({
357
357
  default: v(() => [
358
358
  h(z, null, {
359
359
  default: v(() => [
360
- V(b(l.value), 1)
360
+ V(b(o.value), 1)
361
361
  ]),
362
362
  _: 1
363
363
  }),
364
- o.value ? (C(), O(E, { key: 0 }, {
364
+ l.value ? (C(), O(E, { key: 0 }, {
365
365
  default: v(() => [
366
- V(b(o.value), 1)
366
+ V(b(l.value), 1)
367
367
  ]),
368
368
  _: 1
369
369
  })) : Re("", !0),
@@ -417,15 +417,15 @@ const Ae = /* @__PURE__ */ R({
417
417
  }), Fe = { class: "mx-auto my-auto" }, Je = { class: "d-flex align-center justify-center w-100 h-100" }, Xe = /* @__PURE__ */ R({
418
418
  __name: "index",
419
419
  setup(e) {
420
- const a = X(), { open: t } = Q("waitDlg"), l = () => {
420
+ const a = X(), { open: t } = Q("waitDlg"), o = () => {
421
421
  t.value = !0;
422
- }, o = () => {
422
+ }, l = () => {
423
423
  t.value = !1;
424
424
  };
425
425
  return D(() => {
426
- _.on("openWaitDlg", l), _.on("closeWaitDlg", o);
426
+ _.on("openWaitDlg", o), _.on("closeWaitDlg", l);
427
427
  }), T(() => {
428
- _.off("openWaitDlg", l), _.off("closeWaitDlg", o);
428
+ _.off("openWaitDlg", o), _.off("closeWaitDlg", l);
429
429
  }), (n, r) => {
430
430
  const u = g("v-card"), s = g("v-dialog");
431
431
  return C(), O(s, {
@@ -459,35 +459,35 @@ const Ae = /* @__PURE__ */ R({
459
459
  e.component("v-alert", ve), e.component("v-btn", me), e.component("v-card", he), e.component("v-card-actions", we), e.component("v-card-text", ye), e.component("v-card-title", xe), e.component("v-dialog", ke), e.component("v-form", be), e.component("v-text-field", Ce), e.component("x-confirm-dlg", Ae), e.component("x-loading", Ue), e.component("x-message", Ke), e.component("x-prompt-dlg", ze), e.component("x-wait-dlg", Xe);
460
460
  };
461
461
  function it() {
462
- const e = K(), a = f(() => e.global.current.value.colors.primary), t = f(() => e.global.current.value.colors.secondary), l = f(() => e.current.value.dark ? "#2e2e2e" : "#bdbdbd"), o = f(() => e.current.value.dark ? "#272727" : "#eeeeee"), n = f(() => e.current.value.dark ? "#1e1e1e" : "#ffffff"), r = f(() => e.current.value.dark ? "#303030" : "#f6f6f6"), u = f(() => e.current.value.dark ? "#ffffff1f" : "#0000001f");
462
+ const e = K(), a = f(() => e.global.current.value.colors.primary), t = f(() => e.global.current.value.colors.secondary), o = f(() => e.current.value.dark ? "#2e2e2e" : "#bdbdbd"), l = f(() => e.current.value.dark ? "#272727" : "#eeeeee"), n = f(() => e.current.value.dark ? "#1e1e1e" : "#ffffff"), r = f(() => e.current.value.dark ? "#303030" : "#f6f6f6"), u = f(() => e.current.value.dark ? "#ffffff1f" : "#0000001f");
463
463
  return {
464
464
  primaryColor: a,
465
465
  secondaryColor: t,
466
- backgroundColor0: l,
467
- backgroundColor1: o,
466
+ backgroundColor0: o,
467
+ backgroundColor1: l,
468
468
  backgroundColor2: n,
469
469
  highlightColor: r,
470
470
  borderColor: u
471
471
  };
472
472
  }
473
- const Y = oe(
473
+ const Y = le(
474
474
  "global",
475
475
  () => {
476
- const e = i();
476
+ const e = K(), a = i();
477
477
  H(
478
- e,
479
- (o) => {
480
- K().global.name.value = o ? "dark" : "light";
478
+ a,
479
+ (n) => {
480
+ e.global.name.value = n ? "dark" : "light";
481
481
  },
482
482
  {
483
483
  immediate: !0
484
484
  }
485
485
  );
486
- const a = i("en"), t = i({}), l = i("");
486
+ const t = i("en"), o = i({}), l = i("");
487
487
  return {
488
- dark: e,
489
- locale: a,
490
- permissionObjects: t,
488
+ dark: a,
489
+ locale: t,
490
+ permissionObjects: o,
491
491
  permissionChecksum: l
492
492
  };
493
493
  },
@@ -525,16 +525,16 @@ function Ze(e) {
525
525
  return e.data;
526
526
  }
527
527
  function Pe(e, a) {
528
- var o;
528
+ var l;
529
529
  const t = e.response;
530
530
  if (!t)
531
531
  return Promise.reject(e);
532
532
  t.status === 401 && et();
533
- let l = (o = t.data) == null ? void 0 : o.message;
534
- return l || (l = {
533
+ let o = (l = t.data) == null ? void 0 : l.message;
534
+ return o || (o = {
535
535
  code: t.status,
536
536
  message: t.statusText
537
- }), a(l), Promise.reject(e);
537
+ }), a(o), Promise.reject(e);
538
538
  }
539
539
  function et() {
540
540
  N.remove("accessToken"), N.remove("refreshToken"), N.remove("activeOrg"), re().replace({ path: "/passport/login" });
@@ -552,19 +552,19 @@ async function vt(e) {
552
552
  if (!ue())
553
553
  return;
554
554
  let a = !1, t;
555
- const l = (n) => {
555
+ const o = (n) => {
556
556
  t = n, a = !0;
557
- }, o = se();
558
- return _.on("confirmDlgResult" + o, l), _.emit("confirmDlg", { ...e, seq: o }), await G(() => a), _.off("confirmDlgResult" + o, l), t;
557
+ }, l = se();
558
+ return _.on("confirmDlgResult" + l, o), _.emit("confirmDlg", { ...e, seq: l }), await G(() => a), _.off("confirmDlgResult" + l, o), t;
559
559
  }
560
560
  async function mt(e) {
561
561
  if (!ue())
562
562
  return;
563
563
  let a = !1, t;
564
- const l = (n) => {
564
+ const o = (n) => {
565
565
  t = n, a = !0;
566
- }, o = se();
567
- return _.on("promptDlgResult" + o, l), _.emit("promptDlg", { ...e, seq: o }), await G(() => a), _.off("promptDlgResult" + o, l), t;
566
+ }, l = se();
567
+ return _.on("promptDlgResult" + l, o), _.emit("promptDlg", { ...e, seq: l }), await G(() => a), _.off("promptDlgResult" + l, o), t;
568
568
  }
569
569
  function ht() {
570
570
  _.emit("openWaitDlg");
@@ -585,13 +585,13 @@ function bt(e, a) {
585
585
  _.emit("message", { type: "warning", text: e, timeout: a });
586
586
  }
587
587
  function Ct(e) {
588
- var l, o;
588
+ var o, l;
589
589
  if (!window.appAppear) {
590
590
  window.appAppear = !0;
591
591
  return;
592
592
  }
593
- const a = "single-spa-application:" + e, t = (l = document.getElementById(a)) == null ? void 0 : l.classList;
594
- t && (t.remove("app-left", "app-right", "app-reset"), (o = window.routeExtras) != null && o.forward ? t.add("app-left") : t.add("app-right"), setTimeout(() => {
593
+ const a = "single-spa-application:" + e, t = (o = document.getElementById(a)) == null ? void 0 : o.classList;
594
+ t && (t.remove("app-left", "app-right", "app-reset"), (l = window.routeExtras) != null && l.forward ? t.add("app-left") : t.add("app-right"), setTimeout(() => {
595
595
  t.add("app-reset");
596
596
  }, 0));
597
597
  }
@@ -600,16 +600,16 @@ function te(e, a) {
600
600
  if (!e)
601
601
  return !1;
602
602
  let t = e;
603
- return Object.keys(t).length <= 0 || (a.split("/").forEach((o) => {
603
+ return Object.keys(t).length <= 0 || (a.split("/").forEach((l) => {
604
604
  if (Object.keys(t).length <= 0)
605
605
  return !0;
606
- if (t[o])
607
- t = t[o];
606
+ if (t[l])
607
+ t = t[l];
608
608
  else
609
609
  return !1;
610
610
  }), Object.keys(t).length <= 0);
611
611
  }
612
- const _e = require("js-cookie"), lt = [
612
+ const _e = require("js-cookie"), ot = [
613
613
  { path: "/passport/login", level: 0 },
614
614
  { path: "/passport/loginAccount", level: 1 },
615
615
  { path: "/passport/register", level: 1 },
@@ -631,13 +631,13 @@ const _e = require("js-cookie"), lt = [
631
631
  ];
632
632
  function Z(e) {
633
633
  let a, t = 0;
634
- const l = e.split("/");
635
- return lt.forEach((o) => {
636
- const n = o.path.split("/");
634
+ const o = e.split("/");
635
+ return ot.forEach((l) => {
636
+ const n = l.path.split("/");
637
637
  let r = 0;
638
- for (let u = 0; u < l.length && !(u >= n.length || l[u] !== n[u]); u++)
638
+ for (let u = 0; u < o.length && !(u >= n.length || o[u] !== n[u]); u++)
639
639
  r++;
640
- r >= t && (a = o, t = r);
640
+ r >= t && (a = l, t = r);
641
641
  }), a;
642
642
  }
643
643
  function ae(e) {
@@ -649,28 +649,28 @@ function ae(e) {
649
649
  const t = e.split("/");
650
650
  return console.assert(t.length >= 2), { app: t[1], path: a.path, level: a.level };
651
651
  }
652
- const le = i("");
652
+ const oe = i("");
653
653
  function k(e, a) {
654
- const t = ae(e), l = ae(a), o = t.app === l.app, n = t.path === l.path, r = t.level >= l.level;
654
+ const t = ae(e), o = ae(a), l = t.app === o.app, n = t.path === o.path, r = t.level >= o.level;
655
655
  console.info(
656
- `~~~~before route change~~~~ ${l.path} -> ${t.path} inner=${o} forward=${r}`
657
- ), o ? n ? le.value = "" : le.value = r ? "inner-left" : "inner-right" : window.routeExtras = { forward: r };
656
+ `~~~~before route change~~~~ ${o.path} -> ${t.path} inner=${l} forward=${r}`
657
+ ), l ? n ? oe.value = "" : oe.value = r ? "inner-left" : "inner-right" : window.routeExtras = { forward: r };
658
658
  }
659
- function ot() {
659
+ function lt() {
660
660
  return !!_e.get("accessToken");
661
661
  }
662
662
  function rt() {
663
663
  return !!_e.get("activeOrg");
664
664
  }
665
665
  function Vt(e, a, t) {
666
- const l = ot(), o = rt(), n = Z(e.path);
666
+ const o = lt(), l = rt(), n = Z(e.path);
667
667
  if (!n) {
668
668
  t();
669
669
  return;
670
670
  }
671
671
  if (n.requiredState === "auth")
672
- if (l)
673
- if (o) {
672
+ if (o)
673
+ if (l) {
674
674
  const r = "/main";
675
675
  k(r, a.path), t({ path: r });
676
676
  } else
@@ -680,8 +680,8 @@ function Vt(e, a, t) {
680
680
  k(r, a.path), t({ path: r });
681
681
  }
682
682
  else if (n.requiredState === "org")
683
- if (l)
684
- if (o)
683
+ if (o)
684
+ if (l)
685
685
  k(e.path, a.path), t();
686
686
  else {
687
687
  const r = "/org/joinOrCreate";
@@ -691,8 +691,8 @@ function Vt(e, a, t) {
691
691
  const r = "/passport/login";
692
692
  k(r, a.path), t({ path: r });
693
693
  }
694
- else if (l)
695
- if (o) {
694
+ else if (o)
695
+ if (l) {
696
696
  const r = "/main";
697
697
  k(r, a.path), t({ path: r });
698
698
  } else {
@@ -703,7 +703,7 @@ function Vt(e, a, t) {
703
703
  k(e.path, a.path), t();
704
704
  }
705
705
  function Dt(e) {
706
- const a = Ie(), t = re(), l = Y(), o = ne(), n = (c) => {
706
+ const a = Ie(), t = re(), o = Y(), l = ne(), n = (c) => {
707
707
  if (c.key === "Escape") {
708
708
  r();
709
709
  return;
@@ -718,8 +718,8 @@ function Dt(e) {
718
718
  }
719
719
  }, r = () => {
720
720
  var y;
721
- if (!o.isEmpty()) {
722
- o.hasView("waitDlg") || o.popView();
721
+ if (!l.isEmpty()) {
722
+ l.hasView("waitDlg") || l.popView();
723
723
  return;
724
724
  }
725
725
  const c = Z(a.path);
@@ -730,9 +730,9 @@ function Dt(e) {
730
730
  }
731
731
  ) : t.back();
732
732
  }, u = () => {
733
- l.dark = !l.dark;
733
+ o.dark = !o.dark;
734
734
  }, s = () => {
735
- l.locale === "en" ? l.locale = "zhHans" : l.locale = "en";
735
+ o.locale === "en" ? o.locale = "zhHans" : o.locale = "en";
736
736
  };
737
737
  return D(() => {
738
738
  window.addEventListener("keydown", n, !1);
@@ -742,9 +742,9 @@ function Dt(e) {
742
742
  }
743
743
  function qt() {
744
744
  const e = Y();
745
- function a(t, l) {
746
- const o = e.permissionObjects[t];
747
- return o ? l ? !(!te(o.includes, l) || te(o.excludes, l)) : !0 : !1;
745
+ function a(t, o) {
746
+ const l = e.permissionObjects[t];
747
+ return l ? o ? !(!te(l.includes, o) || te(l.excludes, o)) : !0 : !1;
748
748
  }
749
749
  return { verifyPermission: a };
750
750
  }
@@ -754,11 +754,11 @@ function nt(e, a) {
754
754
  function St(e) {
755
755
  const a = Y();
756
756
  let t;
757
- const l = () => {
757
+ const o = () => {
758
758
  clearTimeout(t), t = setTimeout(async () => {
759
- await o(), t && l();
759
+ await l(), t && o();
760
760
  }, 3e3);
761
- }, o = async () => {
761
+ }, l = async () => {
762
762
  try {
763
763
  const { update: n, permissions: r } = await nt(e, {
764
764
  checksum: a.permissionChecksum
@@ -778,17 +778,17 @@ function St(e) {
778
778
  }
779
779
  };
780
780
  return D(() => {
781
- o(), l();
781
+ l(), o();
782
782
  }), T(() => {
783
783
  clearTimeout(t), t = void 0;
784
784
  }), {};
785
785
  }
786
786
  function Tt() {
787
- const e = f(() => K().current.value.dark), a = f(() => !!window.cordova), t = f(() => {
787
+ const e = K(), a = f(() => e.current.value.dark), t = f(() => !!window.cordova), o = f(() => {
788
788
  const { width: l } = je();
789
789
  return l.value <= 1280 ? l.value + "px" : l.value <= 1920 ? 1920 / 2.5 + "px" : 2560 / 2.5 + "px";
790
790
  });
791
- return { dark: e, sysBarAvail: a, compactWidth: t };
791
+ return { dark: a, sysBarAvail: t, compactWidth: o };
792
792
  }
793
793
  const Ot = { install: Ge };
794
794
  export {
@@ -808,7 +808,7 @@ export {
808
808
  vt as openConfirmDlg,
809
809
  mt as openPromptDlg,
810
810
  ht as openWaitDlg,
811
- le as routeTransName,
811
+ oe as routeTransName,
812
812
  it as useColor,
813
813
  Y as useGlobalStore,
814
814
  Dt as useHotkey,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "x-essential-lib",
3
3
  "private": false,
4
- "version": "0.3.15",
4
+ "version": "0.3.16",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",
7
7
  "types": "dist/index.d.ts",