x-essential-lib 0.8.21 → 0.8.23

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 CHANGED
@@ -1,12 +1,12 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.id="x-essential-lib",a.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;inset: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-f1f60167]{width:600px}@media (max-width: 600px){.x-item[data-v-f1f60167]{width:calc(100vw - 16px)}}.x-cont[data-v-c6a59757]{position:fixed;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 { computed as V, provide as U, inject as $, ref as i, watchEffect as le, onMounted as W, onBeforeUnmount as K, onBeforeMount as xe, defineComponent as I, watch as F, resolveComponent as m, createBlock as T, openBlock as C, withKeys as z, unref as A, withModifiers as B, isRef as N, withCtx as g, createVNode as b, createTextVNode as L, toDisplayString as R, Transition as ke, createElementBlock as Z, createCommentVNode as P, normalizeStyle as ue, createElementVNode as w, Fragment as De, renderList as Ve, useTemplateRef as ce } from "vue";
1
+ (function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.id="x-essential-lib",a.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;inset: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-f1f60167]{width:600px}@media (max-width: 600px){.x-item[data-v-f1f60167]{width:calc(100vw - 16px)}}.x-cont[data-v-3543886b]{position:fixed;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 { computed as C, provide as U, inject as $, ref as p, watchEffect as le, onMounted as N, onBeforeUnmount as K, onBeforeMount as xe, defineComponent as I, watch as F, resolveComponent as v, createBlock as T, openBlock as q, withKeys as z, unref as A, withModifiers as B, isRef as W, withCtx as g, createVNode as b, createTextVNode as L, toDisplayString as S, Transition as ke, createElementBlock as P, createCommentVNode as ee, normalizeStyle as ue, createElementVNode as k, Fragment as De, renderList as Ve, useTemplateRef as ce } from "vue";
3
3
  import { useI18n as G } from "vue-i18n";
4
4
  import { useTheme as se, useDisplay as Ce } from "vuetify";
5
5
  import { useRouter as pe, useRoute as qe } from "vue-router";
6
6
  import je from "axios";
7
7
  import { a as E, m as Re, u as Se } from "./vendor.detlzgps.js";
8
8
  function Oe() {
9
- const e = se(), t = V(() => e.global.current.value.colors.primary), a = V(() => e.global.current.value.colors.secondary), o = V(() => e.current.value.dark ? "#2e2e2e" : "#bdbdbd"), l = V(() => e.current.value.dark ? "#272727" : "#eeeeee"), r = V(() => e.current.value.dark ? "#1e1e1e" : "#ffffff"), c = V(() => e.current.value.dark ? "#303030" : "#f6f6f6"), n = V(() => e.current.value.dark ? "#ffffff1f" : "#0000001f");
9
+ const e = se(), t = C(() => e.global.current.value.colors.primary), a = C(() => e.global.current.value.colors.secondary), o = C(() => e.current.value.dark ? "#2e2e2e" : "#bdbdbd"), l = C(() => e.current.value.dark ? "#272727" : "#eeeeee"), r = C(() => e.current.value.dark ? "#1e1e1e" : "#ffffff"), c = C(() => e.current.value.dark ? "#303030" : "#f6f6f6"), n = C(() => e.current.value.dark ? "#ffffff1f" : "#0000001f");
10
10
  return {
11
11
  primaryColor: t,
12
12
  secondaryColor: a,
@@ -80,43 +80,43 @@ function Ae(e, t) {
80
80
  }, 50));
81
81
  }
82
82
  let ne = Date.now();
83
- function ee() {
83
+ function te() {
84
84
  const e = Date.now();
85
85
  return e - ne > 500 ? (ne = e, !0) : !1;
86
86
  }
87
87
  let Ee = 0;
88
- function te() {
88
+ function ae() {
89
89
  return ++Ee;
90
90
  }
91
91
  async function Ct(e) {
92
- if (!ee())
92
+ if (!te())
93
93
  return;
94
94
  let t = !1, a;
95
95
  const o = (r) => {
96
96
  a = r, t = !0;
97
- }, l = te();
97
+ }, l = ae();
98
98
  return u.on("confirmDlgResult" + l, o), u.emit("confirmDlg", { ...e, seq: l }), await X(() => t), u.off("confirmDlgResult" + l, o), a;
99
99
  }
100
100
  async function qt(e) {
101
- if (!ee())
101
+ if (!te())
102
102
  return;
103
103
  let t = !1, a;
104
104
  const o = (r) => {
105
105
  a = r, t = !0;
106
- }, l = te();
106
+ }, l = ae();
107
107
  return u.on("numberDlgResult" + l, o), u.emit("numberDlg", { ...e, seq: l }), await X(() => t), u.off("numberDlgResult" + l, o), a;
108
108
  }
109
109
  async function jt(e) {
110
- if (!ee())
110
+ if (!te())
111
111
  return;
112
112
  let t = !1, a;
113
113
  const o = (r) => {
114
114
  a = r, t = !0;
115
- }, l = te();
115
+ }, l = ae();
116
116
  return u.on("promptDlgResult" + l, o), u.emit("promptDlg", { ...e, seq: l }), await X(() => t), u.off("promptDlgResult" + l, o), a;
117
117
  }
118
118
  function Rt(e) {
119
- u.emit("openWaitDlg", { text: e });
119
+ u.emit("waitDlg", { text: e });
120
120
  }
121
121
  function St() {
122
122
  u.emit("closeWaitDlg");
@@ -158,13 +158,13 @@ function Ke(e) {
158
158
  function Bt() {
159
159
  return $(_e);
160
160
  }
161
- function We(e) {
161
+ function Ne(e) {
162
162
  U(de, e);
163
163
  }
164
164
  function It() {
165
165
  return $(de);
166
166
  }
167
- function Ne(e) {
167
+ function We(e) {
168
168
  U(ie, e);
169
169
  }
170
170
  function Xe() {
@@ -307,7 +307,7 @@ function H(e) {
307
307
  c > 0 && c > a && (t = l, a = c);
308
308
  }), t;
309
309
  }
310
- const Y = i("");
310
+ const Z = p("");
311
311
  function O(e, t, a) {
312
312
  t === "/" && (t = a);
313
313
  const o = H(e), l = H(t);
@@ -318,7 +318,7 @@ function O(e, t, a) {
318
318
  if (console.info(`~~~~routeChange~~~~ ${t} -> ${e}`), !l)
319
319
  return;
320
320
  const r = o.app === l.app, c = o.path === l.path, n = o.level >= l.level;
321
- r ? c ? Y.value = "" : Y.value = n ? "inner-left" : "inner-right" : (Y.value = "", Ae(o.app, n));
321
+ r ? c ? Z.value = "" : Z.value = n ? "inner-left" : "inner-right" : (Z.value = "", Ae(o.app, n));
322
322
  }
323
323
  function Qe() {
324
324
  return !!E.get("accessToken");
@@ -390,62 +390,62 @@ function tt(e) {
390
390
  function Kt(e) {
391
391
  e.value = [];
392
392
  }
393
- function Wt(e, t, a, o, l, r) {
394
- const c = qe(), n = pe(), _ = Se(), p = i(!1);
393
+ function Nt(e, t, a, o, l, r) {
394
+ const c = qe(), n = pe(), _ = Se(), s = p(!1);
395
395
  le(() => {
396
- let v = !1;
397
- typeof e.value == "boolean" ? v = e.value : v = _.value, p.value = v;
398
- }), Ke(p), We(t), Ne(a), ze(o), He(l), Fe(r);
399
- const x = se();
396
+ let f = !1;
397
+ typeof e.value == "boolean" ? f = e.value : f = _.value, s.value = f;
398
+ }), Ke(s), Ne(t), We(a), ze(o), He(l), Fe(r);
399
+ const w = se();
400
400
  le(() => {
401
- x.change(p.value ? "dark" : "light");
401
+ w.change(s.value ? "dark" : "light");
402
402
  });
403
- const f = () => {
403
+ const D = () => {
404
404
  if (!Ze(r)) {
405
405
  me(r, "waitDlg") || tt(r);
406
406
  return;
407
407
  }
408
- const v = H(c.path);
409
- if (!v) {
408
+ const f = H(c.path);
409
+ if (!f) {
410
410
  console.assert(!1);
411
411
  return;
412
412
  }
413
- v.level === 0 ? navigator?.Backbutton?.goHome(
413
+ f.level === 0 ? navigator?.Backbutton?.goHome(
414
414
  () => {
415
415
  },
416
416
  () => {
417
417
  }
418
418
  ) : n.back();
419
- }, k = (v) => {
420
- if (v.key === "Escape") {
421
- f();
419
+ }, y = (f) => {
420
+ if (f.key === "Escape") {
421
+ D();
422
422
  return;
423
423
  }
424
- }, D = () => {
425
- f();
424
+ }, h = () => {
425
+ D();
426
426
  };
427
- W(() => {
428
- window.addEventListener("keydown", k), u.on("backbutton", D);
427
+ N(() => {
428
+ window.addEventListener("keydown", y), u.on("backbutton", h);
429
429
  }), K(() => {
430
- window.removeEventListener("keydown", k), u.off("backbutton", D);
430
+ window.removeEventListener("keydown", y), u.off("backbutton", h);
431
431
  });
432
- const s = (v) => {
433
- e.value = v;
434
- }, y = (v) => {
435
- t.value = v;
436
- }, h = (v) => {
437
- const j = v;
438
- a.value = j[0], o.value = j[1];
439
- }, q = (v) => {
440
- l.value = v;
432
+ const i = (f) => {
433
+ e.value = f;
434
+ }, x = (f) => {
435
+ t.value = f;
436
+ }, d = (f) => {
437
+ const m = f;
438
+ a.value = m[0], o.value = m[1];
439
+ }, j = (f) => {
440
+ l.value = f;
441
441
  };
442
442
  xe(() => {
443
- u.on("updateDark", s), u.on("updateLocale", y), u.on("updatePermission", h), u.on("updateLastAppPath", q), u.emit("syncGlobalState");
443
+ u.on("updateDark", i), u.on("updateLocale", x), u.on("updatePermission", d), u.on("updateLastAppPath", j), u.emit("syncGlobalState");
444
444
  }), K(() => {
445
- u.off("updateDark", s), u.off("updateLocale", y), u.off("updatePermission", h), u.off("updateLastAppPath", q);
445
+ u.off("updateDark", i), u.off("updateLocale", x), u.off("updatePermission", d), u.off("updateLastAppPath", j);
446
446
  });
447
447
  }
448
- function Nt() {
448
+ function Wt() {
449
449
  const e = Xe();
450
450
  function t(a, o) {
451
451
  return $e(
@@ -457,7 +457,7 @@ function Nt() {
457
457
  return { verifyPermission: t };
458
458
  }
459
459
  function Xt() {
460
- const e = V(() => !!window.cordova), t = Ce(), a = V(() => t.width.value <= 1280 ? t.width.value + "px" : t.width.value <= 1920 ? 1920 / 2.5 + "px" : 2560 / 2.5 + "px");
460
+ const e = C(() => !!window.cordova), t = Ce(), a = C(() => t.width.value <= 1280 ? t.width.value + "px" : t.width.value <= 1920 ? 1920 / 2.5 + "px" : 2560 / 2.5 + "px");
461
461
  function o() {
462
462
  return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
463
463
  navigator.userAgent
@@ -466,7 +466,7 @@ function Xt() {
466
466
  return { sysBarAvail: e, compactWidth: a, isMobile: o };
467
467
  }
468
468
  function J(e, t) {
469
- const a = Ge(), o = V({
469
+ const a = Ge(), o = C({
470
470
  get() {
471
471
  return me(a, e);
472
472
  },
@@ -476,7 +476,7 @@ function J(e, t) {
476
476
  }), l = (r) => {
477
477
  t?.(r), o.value = !0;
478
478
  };
479
- return W(() => {
479
+ return N(() => {
480
480
  u.on(e, l);
481
481
  }), K(() => {
482
482
  u.off(e, l);
@@ -485,57 +485,57 @@ function J(e, t) {
485
485
  const at = /* @__PURE__ */ I({
486
486
  __name: "index",
487
487
  setup(e) {
488
- const { t } = G(), a = i(""), o = i(""), l = i(""), r = i(""), c = i(""), n = i("");
489
- let _ = 0, p = !1;
490
- const x = (D) => {
491
- const s = D;
492
- a.value = s.title, o.value = s.text, l.value = s.cancel?.color ?? "primary", r.value = s.cancel?.text ?? t("dlg.common.cancel"), c.value = s.confirm?.color ?? "primary", n.value = s.confirm?.text ?? t("dlg.common.confirm"), _ = s.seq, p = !1, f.value = !0;
493
- }, { open: f } = J("confirmDlg", x), k = () => {
494
- f.value = !1, p || (u.emit("confirmDlgResult" + _, !0), p = !0);
488
+ const { t } = G(), a = p(""), o = p(""), l = p(""), r = p(""), c = p(""), n = p("");
489
+ let _ = 0, s = !1;
490
+ const w = (h) => {
491
+ const i = h;
492
+ a.value = i.title, o.value = i.text, l.value = i.cancel?.color ?? "primary", r.value = i.cancel?.text ?? t("dlg.common.cancel"), c.value = i.confirm?.color ?? "primary", n.value = i.confirm?.text ?? t("dlg.common.confirm"), _ = i.seq, s = !1, D.value = !0;
493
+ }, { open: D } = J("confirmDlg", w), y = () => {
494
+ D.value = !1, s || (u.emit("confirmDlgResult" + _, !0), s = !0);
495
495
  };
496
- return F(f, (D) => {
497
- !D && !p && (u.emit("confirmDlgResult" + _, !1), p = !0);
498
- }), (D, s) => {
499
- const y = m("v-card-text"), h = m("v-btn"), q = m("v-card-actions"), v = m("v-card"), j = m("v-dialog");
500
- return C(), T(j, {
501
- modelValue: A(f),
502
- "onUpdate:modelValue": s[1] || (s[1] = (d) => N(f) ? f.value = d : null),
503
- transition: "dialog-top-transition",
504
- "max-width": "600px",
496
+ return F(D, (h) => {
497
+ !h && !s && (u.emit("confirmDlgResult" + _, !1), s = !0);
498
+ }), (h, i) => {
499
+ const x = v("v-card-text"), d = v("v-btn"), j = v("v-card-actions"), f = v("v-card"), m = v("v-dialog");
500
+ return q(), T(m, {
501
+ modelValue: A(D),
502
+ "onUpdate:modelValue": i[1] || (i[1] = (V) => W(D) ? D.value = V : null),
505
503
  attach: "",
504
+ "max-width": "600px",
505
+ transition: "dialog-top-transition",
506
506
  onKeydown: [
507
- s[2] || (s[2] = z(B((d) => f.value = !1, ["stop", "prevent"]), ["esc"])),
508
- z(B(k, ["stop", "prevent"]), ["enter"])
507
+ z(B(y, ["stop", "prevent"]), ["enter"]),
508
+ i[2] || (i[2] = z(B((V) => D.value = !1, ["stop", "prevent"]), ["esc"]))
509
509
  ]
510
510
  }, {
511
511
  default: g(() => [
512
- b(v, { title: a.value }, {
512
+ b(f, { title: a.value }, {
513
513
  default: g(() => [
514
- b(y, null, {
514
+ b(x, null, {
515
515
  default: g(() => [
516
- L(R(o.value), 1)
516
+ L(S(o.value), 1)
517
517
  ]),
518
518
  _: 1
519
519
  }),
520
- b(q, { class: "d-flex justify-end" }, {
520
+ b(j, { class: "d-flex justify-end" }, {
521
521
  default: g(() => [
522
- b(h, {
522
+ b(d, {
523
523
  color: l.value,
524
524
  variant: "text",
525
- onClick: s[0] || (s[0] = (d) => f.value = !1)
525
+ onClick: i[0] || (i[0] = (V) => D.value = !1)
526
526
  }, {
527
527
  default: g(() => [
528
- L(R(r.value), 1)
528
+ L(S(r.value), 1)
529
529
  ]),
530
530
  _: 1
531
531
  }, 8, ["color"]),
532
- b(h, {
532
+ b(d, {
533
533
  color: c.value,
534
534
  variant: "text",
535
- onClick: k
535
+ onClick: y
536
536
  }, {
537
537
  default: g(() => [
538
- L(R(n.value), 1)
538
+ L(S(n.value), 1)
539
539
  ]),
540
540
  _: 1
541
541
  }, 8, ["color"])
@@ -557,43 +557,43 @@ const at = /* @__PURE__ */ I({
557
557
  zIndex: { default: 1 }
558
558
  },
559
559
  setup(e) {
560
- const { backgroundColor2: t } = Oe(), a = V(() => ({
560
+ const { backgroundColor2: t } = Oe(), a = C(() => ({
561
561
  background: t.value,
562
562
  zIndex: e.zIndex
563
563
  }));
564
564
  let o = 0;
565
- return (l, r) => (C(), T(ke, { name: "fade" }, {
565
+ return (l, r) => (q(), T(ke, { name: "fade" }, {
566
566
  default: g(() => [
567
- l.open ? (C(), Z("div", {
568
- key: N(o) ? ++o.value : ++o,
567
+ l.open ? (q(), P("div", {
568
+ key: W(o) ? ++o.value : ++o,
569
569
  class: "x-cont",
570
570
  style: ue(a.value)
571
571
  }, r[0] || (r[0] = [
572
- w("div", { class: "lds-spinner" }, [
573
- w("div"),
574
- w("div"),
575
- w("div"),
576
- w("div"),
577
- w("div"),
578
- w("div"),
579
- w("div"),
580
- w("div"),
581
- w("div"),
582
- w("div"),
583
- w("div"),
584
- w("div")
572
+ k("div", { class: "lds-spinner" }, [
573
+ k("div"),
574
+ k("div"),
575
+ k("div"),
576
+ k("div"),
577
+ k("div"),
578
+ k("div"),
579
+ k("div"),
580
+ k("div"),
581
+ k("div"),
582
+ k("div"),
583
+ k("div"),
584
+ k("div")
585
585
  ], -1)
586
- ]), 4)) : P("", !0)
586
+ ]), 4)) : ee("", !0)
587
587
  ]),
588
588
  _: 1
589
589
  }));
590
590
  }
591
- }), ae = (e, t) => {
591
+ }), oe = (e, t) => {
592
592
  const a = e.__vccOpts || e;
593
593
  for (const [o, l] of t)
594
594
  a[o] = l;
595
595
  return a;
596
- }, lt = /* @__PURE__ */ ae(ot, [["__scopeId", "data-v-0c686889"]]), nt = /* @__PURE__ */ I({
596
+ }, lt = /* @__PURE__ */ oe(ot, [["__scopeId", "data-v-0c686889"]]), nt = /* @__PURE__ */ I({
597
597
  __name: "item",
598
598
  props: {
599
599
  id: {},
@@ -603,10 +603,10 @@ const at = /* @__PURE__ */ I({
603
603
  },
604
604
  emits: ["timeout"],
605
605
  setup(e, { emit: t }) {
606
- const a = V(() => ({
606
+ const a = C(() => ({
607
607
  width: "calc(100% - 64px)",
608
608
  overflowWrap: "break-word"
609
- })), o = V(() => {
609
+ })), o = C(() => {
610
610
  switch (e.type) {
611
611
  case "success":
612
612
  return "mdi-check-circle";
@@ -619,140 +619,140 @@ const at = /* @__PURE__ */ I({
619
619
  default:
620
620
  return "";
621
621
  }
622
- }), l = i(!0), r = t;
623
- return W(() => {
622
+ }), l = p(!0), r = t;
623
+ return N(() => {
624
624
  setTimeout(() => {
625
625
  r("timeout", e.id);
626
626
  }, e.timeout);
627
627
  }), F(l, (c) => {
628
628
  c || r("timeout", e.id);
629
629
  }), (c, n) => {
630
- const _ = m("v-icon"), p = m("v-sheet");
631
- return C(), T(p, {
630
+ const _ = v("v-icon"), s = v("v-sheet");
631
+ return q(), T(s, {
632
632
  class: "x-item d-flex align-center py-2 mb-2",
633
633
  color: c.type,
634
634
  elevation: 1
635
635
  }, {
636
636
  default: g(() => [
637
- o.value ? (C(), T(_, {
637
+ o.value ? (q(), T(_, {
638
638
  key: 0,
639
639
  class: "mx-1",
640
640
  icon: o.value
641
- }, null, 8, ["icon"])) : P("", !0),
642
- w("div", {
641
+ }, null, 8, ["icon"])) : ee("", !0),
642
+ k("div", {
643
643
  style: ue(a.value)
644
- }, R(c.text), 5),
644
+ }, S(c.text), 5),
645
645
  b(_, {
646
646
  class: "mx-1",
647
647
  icon: "mdi-close",
648
- onClick: n[0] || (n[0] = (x) => r("timeout", c.id))
648
+ onClick: n[0] || (n[0] = (w) => r("timeout", c.id))
649
649
  })
650
650
  ]),
651
651
  _: 1
652
652
  }, 8, ["color"]);
653
653
  };
654
654
  }
655
- }), rt = /* @__PURE__ */ ae(nt, [["__scopeId", "data-v-f1f60167"]]), ut = /* @__PURE__ */ I({
655
+ }), rt = /* @__PURE__ */ oe(nt, [["__scopeId", "data-v-f1f60167"]]), ut = /* @__PURE__ */ I({
656
656
  __name: "index",
657
657
  setup(e) {
658
- const t = i([]);
659
- W(() => {
658
+ const t = p([]);
659
+ N(() => {
660
660
  u.on("message", a);
661
661
  }), K(() => {
662
662
  u.off("message", a);
663
663
  });
664
664
  const a = (n) => {
665
- const { type: _, text: p, timeout: x } = n;
666
- r(_, p, x);
665
+ const { type: _, text: s, timeout: w } = n;
666
+ r(_, s, w);
667
667
  }, o = (n) => {
668
668
  c(n);
669
669
  };
670
670
  let l = 0;
671
- const r = (n, _, p) => {
672
- const x = l++;
673
- t.value.push({ id: x, type: n, text: _, timeout: p });
671
+ const r = (n, _, s) => {
672
+ const w = l++;
673
+ t.value.push({ id: w, type: n, text: _, timeout: s });
674
674
  }, c = (n) => {
675
- const _ = t.value.findIndex((p) => p.id === n);
675
+ const _ = t.value.findIndex((s) => s.id === n);
676
676
  _ >= 0 && t.value.splice(_, 1);
677
677
  };
678
- return (n, _) => (C(), Z("div", {
678
+ return (n, _) => (q(), P("div", {
679
679
  class: "x-cont d-flex flex-column-reverse align-center",
680
680
  onClick: _[0] || (_[0] = B(() => {
681
681
  }, ["stop"]))
682
682
  }, [
683
- (C(!0), Z(De, null, Ve(t.value, (p) => (C(), T(rt, {
684
- id: p.id,
685
- key: p.id,
686
- type: p.type,
687
- text: p.text,
688
- timeout: p.timeout,
683
+ (q(!0), P(De, null, Ve(t.value, (s) => (q(), T(rt, {
684
+ id: s.id,
685
+ key: s.id,
686
+ text: s.text,
687
+ timeout: s.timeout,
688
+ type: s.type,
689
689
  onTimeout: o
690
- }, null, 8, ["id", "type", "text", "timeout"]))), 128))
690
+ }, null, 8, ["id", "text", "timeout", "type"]))), 128))
691
691
  ]));
692
692
  }
693
- }), ct = /* @__PURE__ */ ae(ut, [["__scopeId", "data-v-c6a59757"]]), st = /* @__PURE__ */ I({
693
+ }), ct = /* @__PURE__ */ oe(ut, [["__scopeId", "data-v-3543886b"]]), st = /* @__PURE__ */ I({
694
694
  __name: "index",
695
695
  setup(e) {
696
- const { t } = G(), a = i(0), o = i(), l = i(-1 / 0), r = i(1 / 0), c = i(1);
697
- let n = 0, _ = !1;
698
- const p = ce("target"), x = async (s) => {
699
- a.value = s.value, o.value = s.precision, l.value = s.min, r.value = s.max, c.value = s.step, n = s.seq, _ = !1, f.value = !0, await X(() => !!p.value), p.value.focus();
700
- }, { open: f } = J("numberDlg", x), k = i(!1), D = () => {
701
- f.value = !1, _ || (u.emit(`numberDlgResult${n}`, a.value), _ = !0);
696
+ const { t } = G(), a = p(""), o = p(0), l = p(), r = p(-1 / 0), c = p(1 / 0), n = p(1);
697
+ let _ = 0, s = !1;
698
+ const w = ce("target"), D = async (x) => {
699
+ a.value = x.title, o.value = x.value, l.value = x.precision, r.value = x.min, c.value = x.max, n.value = x.step, _ = x.seq, s = !1, y.value = !0, await X(() => !!w.value), w.value.focus();
700
+ }, { open: y } = J("numberDlg", D), h = p(!1), i = () => {
701
+ y.value = !1, s || (u.emit(`numberDlgResult${_}`, o.value), s = !0);
702
702
  };
703
- return F(f, (s) => {
704
- !s && !_ && (u.emit(`numberDlgResult${n}`, void 0), _ = !0);
705
- }), (s, y) => {
706
- const h = m("v-number-input"), q = m("v-btn"), v = m("v-card-actions"), j = m("v-form"), d = m("v-card"), Q = m("v-dialog");
707
- return C(), T(Q, {
708
- modelValue: A(f),
709
- "onUpdate:modelValue": y[3] || (y[3] = (S) => N(f) ? f.value = S : null),
710
- transition: "dialog-top-transition",
711
- "max-width": "600px",
703
+ return F(y, (x) => {
704
+ !x && !s && (u.emit(`numberDlgResult${_}`, void 0), s = !0);
705
+ }), (x, d) => {
706
+ const j = v("v-number-input"), f = v("v-btn"), m = v("v-card-actions"), V = v("v-form"), Q = v("v-card"), Y = v("v-dialog");
707
+ return q(), T(Y, {
708
+ modelValue: A(y),
709
+ "onUpdate:modelValue": d[3] || (d[3] = (R) => W(y) ? y.value = R : null),
712
710
  attach: "",
713
- onKeydown: y[4] || (y[4] = z(B((S) => f.value = !1, ["stop", "prevent"]), ["esc"]))
711
+ "max-width": "600px",
712
+ transition: "dialog-top-transition",
713
+ onKeydown: d[4] || (d[4] = z(B((R) => y.value = !1, ["stop", "prevent"]), ["esc"]))
714
714
  }, {
715
715
  default: g(() => [
716
- b(d, null, {
716
+ b(Q, { title: a.value }, {
717
717
  default: g(() => [
718
- b(j, {
719
- modelValue: k.value,
720
- "onUpdate:modelValue": y[2] || (y[2] = (S) => k.value = S),
718
+ b(V, {
719
+ modelValue: h.value,
720
+ "onUpdate:modelValue": d[2] || (d[2] = (R) => h.value = R),
721
721
  class: "mx-3",
722
- onSubmit: B(D, ["prevent"])
722
+ onSubmit: B(i, ["prevent"])
723
723
  }, {
724
724
  default: g(() => [
725
- b(h, {
725
+ b(j, {
726
726
  ref_key: "target",
727
- ref: p,
728
- modelValue: a.value,
729
- "onUpdate:modelValue": y[0] || (y[0] = (S) => a.value = S),
727
+ ref: w,
728
+ modelValue: o.value,
729
+ "onUpdate:modelValue": d[0] || (d[0] = (R) => o.value = R),
730
730
  "control-variant": "stacked",
731
- max: r.value,
732
- min: l.value,
733
- precision: o.value,
734
- step: c.value
731
+ max: c.value,
732
+ min: r.value,
733
+ precision: l.value,
734
+ step: n.value
735
735
  }, null, 8, ["modelValue", "max", "min", "precision", "step"]),
736
- b(v, { class: "d-flex justify-end" }, {
736
+ b(m, { class: "d-flex justify-end" }, {
737
737
  default: g(() => [
738
- b(q, {
739
- variant: "text",
738
+ b(f, {
740
739
  color: "primary",
741
- onClick: y[1] || (y[1] = (S) => f.value = !1)
740
+ variant: "text",
741
+ onClick: d[1] || (d[1] = (R) => y.value = !1)
742
742
  }, {
743
743
  default: g(() => [
744
- L(R(A(t)("dlg.common.cancel")), 1)
744
+ L(S(A(t)("dlg.common.cancel")), 1)
745
745
  ]),
746
746
  _: 1
747
747
  }),
748
- b(q, {
749
- disabled: !k.value,
750
- variant: "text",
748
+ b(f, {
751
749
  color: "primary",
752
- type: "submit"
750
+ disabled: !h.value,
751
+ type: "submit",
752
+ variant: "text"
753
753
  }, {
754
754
  default: g(() => [
755
- L(R(A(t)("dlg.common.confirm")), 1)
755
+ L(S(A(t)("dlg.common.confirm")), 1)
756
756
  ]),
757
757
  _: 1
758
758
  }, 8, ["disabled"])
@@ -764,7 +764,7 @@ const at = /* @__PURE__ */ I({
764
764
  }, 8, ["modelValue"])
765
765
  ]),
766
766
  _: 1
767
- })
767
+ }, 8, ["title"])
768
768
  ]),
769
769
  _: 1
770
770
  }, 8, ["modelValue"]);
@@ -773,74 +773,73 @@ const at = /* @__PURE__ */ I({
773
773
  }), pt = /* @__PURE__ */ I({
774
774
  __name: "index",
775
775
  setup(e) {
776
- const { t } = G(), a = i(""), o = i(""), l = i(""), r = i(""), c = i(), n = i(""), _ = i(""), p = i(""), x = i(""), f = i(""), k = ce("target");
777
- let D = 0, s = !1;
778
- const y = async (j) => {
779
- const d = j;
780
- a.value = d.title, o.value = d.text, l.value = d.label, r.value = d.placeholder, c.value = d.rules, n.value = d.value, _.value = d.cancel?.color ?? "primary", p.value = d.cancel?.text ?? t("dlg.common.cancel"), x.value = d.confirm?.color ?? "primary", f.value = d.confirm?.text ?? t("dlg.common.confirm"), D = d.seq, s = !1, h.value = !0, await X(() => !!k.value), k.value.focus();
781
- }, { open: h } = J("promptDlg", y), q = i(!1), v = () => {
782
- h.value = !1, s || (u.emit("promptDlgResult" + D, n.value ?? ""), s = !0);
776
+ const { t } = G(), a = p(""), o = p(""), l = p(""), r = p(""), c = p(), n = p(""), _ = p(""), s = p(""), w = p(""), D = p("");
777
+ let y = 0, h = !1;
778
+ const i = ce("target"), x = async (m) => {
779
+ a.value = m.title, o.value = m.text, l.value = m.label, r.value = m.placeholder, c.value = m.rules, n.value = m.value, _.value = m.cancel?.color ?? "primary", s.value = m.cancel?.text ?? t("dlg.common.cancel"), w.value = m.confirm?.color ?? "primary", D.value = m.confirm?.text ?? t("dlg.common.confirm"), y = m.seq, h = !1, d.value = !0, await X(() => !!i.value), i.value.focus();
780
+ }, { open: d } = J("promptDlg", x), j = p(!1), f = () => {
781
+ d.value = !1, h || (u.emit("promptDlgResult" + y, n.value ?? ""), h = !0);
783
782
  };
784
- return F(h, (j) => {
785
- !j && !s && (u.emit("promptDlgResult" + D, void 0), s = !0);
786
- }), (j, d) => {
787
- const Q = m("v-card-text"), S = m("v-text-field"), oe = m("v-btn"), be = m("v-card-actions"), ye = m("v-form"), we = m("v-card"), he = m("v-dialog");
788
- return C(), T(he, {
789
- modelValue: A(h),
790
- "onUpdate:modelValue": d[3] || (d[3] = (M) => N(h) ? h.value = M : null),
791
- transition: "dialog-top-transition",
792
- "max-width": "600px",
783
+ return F(d, (m) => {
784
+ !m && !h && (u.emit("promptDlgResult" + y, void 0), h = !0);
785
+ }), (m, V) => {
786
+ const Q = v("v-card-text"), Y = v("v-text-field"), R = v("v-btn"), be = v("v-card-actions"), ye = v("v-form"), we = v("v-card"), he = v("v-dialog");
787
+ return q(), T(he, {
788
+ modelValue: A(d),
789
+ "onUpdate:modelValue": V[3] || (V[3] = (M) => W(d) ? d.value = M : null),
793
790
  attach: "",
794
- onKeydown: d[4] || (d[4] = z(B((M) => h.value = !1, ["stop", "prevent"]), ["esc"]))
791
+ "max-width": "600px",
792
+ transition: "dialog-top-transition",
793
+ onKeydown: V[4] || (V[4] = z(B((M) => d.value = !1, ["stop", "prevent"]), ["esc"]))
795
794
  }, {
796
795
  default: g(() => [
797
796
  b(we, { title: a.value }, {
798
797
  default: g(() => [
799
- o.value ? (C(), T(Q, { key: 0 }, {
798
+ o.value ? (q(), T(Q, { key: 0 }, {
800
799
  default: g(() => [
801
- L(R(o.value), 1)
800
+ L(S(o.value), 1)
802
801
  ]),
803
802
  _: 1
804
- })) : P("", !0),
803
+ })) : ee("", !0),
805
804
  b(ye, {
806
- modelValue: q.value,
807
- "onUpdate:modelValue": d[2] || (d[2] = (M) => q.value = M),
805
+ modelValue: j.value,
806
+ "onUpdate:modelValue": V[2] || (V[2] = (M) => j.value = M),
808
807
  class: "mx-3",
809
- onSubmit: B(v, ["prevent"])
808
+ onSubmit: B(f, ["prevent"])
810
809
  }, {
811
810
  default: g(() => [
812
- b(S, {
811
+ b(Y, {
813
812
  ref_key: "target",
814
- ref: k,
813
+ ref: i,
815
814
  modelValue: n.value,
816
- "onUpdate:modelValue": d[0] || (d[0] = (M) => n.value = M),
815
+ "onUpdate:modelValue": V[0] || (V[0] = (M) => n.value = M),
817
816
  label: l.value,
818
817
  placeholder: r.value,
819
818
  rules: c.value
820
819
  }, null, 8, ["modelValue", "label", "placeholder", "rules"]),
821
820
  b(be, { class: "d-flex justify-end" }, {
822
821
  default: g(() => [
823
- b(oe, {
824
- variant: "text",
822
+ b(R, {
825
823
  color: _.value,
826
- onClick: d[1] || (d[1] = (M) => h.value = !1)
824
+ variant: "text",
825
+ onClick: V[1] || (V[1] = (M) => d.value = !1)
827
826
  }, {
828
827
  default: g(() => [
829
- L(R(p.value), 1)
828
+ L(S(s.value), 1)
830
829
  ]),
831
830
  _: 1
832
831
  }, 8, ["color"]),
833
- b(oe, {
834
- disabled: !q.value,
835
- variant: "text",
836
- color: x.value,
837
- type: "submit"
832
+ b(R, {
833
+ color: w.value,
834
+ disabled: !j.value,
835
+ type: "submit",
836
+ variant: "text"
838
837
  }, {
839
838
  default: g(() => [
840
- L(R(f.value), 1)
839
+ L(S(D.value), 1)
841
840
  ]),
842
841
  _: 1
843
- }, 8, ["disabled", "color"])
842
+ }, 8, ["color", "disabled"])
844
843
  ]),
845
844
  _: 1
846
845
  })
@@ -855,39 +854,39 @@ const at = /* @__PURE__ */ I({
855
854
  }, 8, ["modelValue"]);
856
855
  };
857
856
  }
858
- }), _t = { class: "mx-auto my-auto" }, dt = { class: "w-100 h-100 d-flex align-center justify-center" }, it = { class: "text-body-1" }, ft = /* @__PURE__ */ I({
857
+ }), _t = { class: "ma-auto" }, dt = { class: "w-100 h-100 d-flex align-center justify-center" }, it = { class: "text-body-1" }, ft = /* @__PURE__ */ I({
859
858
  __name: "index",
860
859
  setup(e) {
861
- const { t } = G(), a = i(""), o = (c) => {
860
+ const { t } = G(), a = p(""), o = (c) => {
862
861
  const n = c;
863
862
  a.value = n.text ?? t("dlg.common.waiting"), r.value = !0;
864
863
  }, l = () => {
865
864
  r.value = !1;
866
865
  }, { open: r } = J("waitDlg", o);
867
- return W(() => {
866
+ return N(() => {
868
867
  u.on("closeWaitDlg", l);
869
868
  }), K(() => {
870
869
  u.off("closeWaitDlg", l);
871
870
  }), (c, n) => {
872
- const _ = m("v-card"), p = m("v-dialog");
873
- return C(), T(p, {
871
+ const _ = v("v-card"), s = v("v-dialog");
872
+ return q(), T(s, {
874
873
  modelValue: A(r),
875
- "onUpdate:modelValue": n[0] || (n[0] = (x) => N(r) ? r.value = x : null),
876
- persistent: "",
877
- "no-click-animation": "",
874
+ "onUpdate:modelValue": n[0] || (n[0] = (w) => W(r) ? r.value = w : null),
875
+ attach: "",
878
876
  fullscreen: "",
879
- attach: ""
877
+ "no-click-animation": "",
878
+ persistent: ""
880
879
  }, {
881
880
  default: g(() => [
882
- w("div", _t, [
881
+ k("div", _t, [
883
882
  b(_, {
884
- width: "300px",
885
883
  height: "80px",
886
- loading: ""
884
+ loading: "",
885
+ width: "300px"
887
886
  }, {
888
887
  default: g(() => [
889
- w("div", dt, [
890
- w("span", it, R(a.value), 1)
888
+ k("div", dt, [
889
+ k("span", it, S(a.value), 1)
891
890
  ])
892
891
  ]),
893
892
  _: 1
@@ -945,14 +944,14 @@ export {
945
944
  tt as popView,
946
945
  Ke as provideDark,
947
946
  He as provideLastAppPath,
948
- We as provideLocale,
947
+ Ne as provideLocale,
949
948
  ze as providePermissionChecksum,
950
- Ne as providePermissionObjects,
949
+ We as providePermissionObjects,
951
950
  Fe as provideViews,
952
- Y as routeTransName,
951
+ Z as routeTransName,
953
952
  Oe as useColor,
954
- Wt as useMicroApp,
955
- Nt as usePermission,
953
+ Nt as useMicroApp,
954
+ Wt as usePermission,
956
955
  Xt as useSystem,
957
956
  J as useViewStack,
958
957
  $e as verifyPermission,
@@ -10,6 +10,7 @@ interface ConfirmParams {
10
10
  }
11
11
  export declare function openConfirmDlg(params: ConfirmParams): Promise<boolean | undefined>;
12
12
  interface NumberParams {
13
+ title: string;
13
14
  value: number;
14
15
  precision?: number;
15
16
  min?: number;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "x-essential-lib",
3
3
  "private": false,
4
- "version": "0.8.21",
4
+ "version": "0.8.23",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -27,16 +27,16 @@
27
27
  "js-cookie": "^3.0.5",
28
28
  "mitt": "^3.0.1",
29
29
  "vue": "^3.5.17",
30
- "vue-i18n": "^11.1.9",
30
+ "vue-i18n": "^11.1.10",
31
31
  "vue-router": "^4.5.1",
32
- "vuetify": "^3.9.0"
32
+ "vuetify": "^3.9.1"
33
33
  },
34
34
  "devDependencies": {
35
- "@eslint/js": "^9.30.1",
35
+ "@eslint/js": "^9.31.0",
36
36
  "@types/js-cookie": "^3.0.6",
37
- "@types/node": "^24.0.12",
37
+ "@types/node": "^24.0.14",
38
38
  "@vitejs/plugin-vue": "^6.0.0",
39
- "eslint": "^9.30.1",
39
+ "eslint": "^9.31.0",
40
40
  "eslint-config-prettier": "^10.1.5",
41
41
  "eslint-plugin-prettier": "^5.5.1",
42
42
  "eslint-plugin-vue": "^10.3.0",
@@ -46,11 +46,11 @@
46
46
  "prettier": "3.6.2",
47
47
  "sass": "^1.89.2",
48
48
  "typescript": "^5.8.3",
49
- "typescript-eslint": "^8.36.0",
50
- "vite": "^7.0.3",
49
+ "typescript-eslint": "^8.37.0",
50
+ "vite": "^7.0.5",
51
51
  "vite-plugin-css-injected-by-js": "^3.5.2",
52
52
  "vite-plugin-vuetify": "^2.1.1",
53
53
  "vue-eslint-parser": "^10.2.0",
54
- "vue-tsc": "^3.0.1"
54
+ "vue-tsc": "^3.0.2"
55
55
  }
56
56
  }