x-essential-lib 0.8.21 → 0.8.22
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 +206 -207
- package/dist/utils/dialog.d.ts +1 -0
- package/package.json +7 -7
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-
|
|
2
|
-
import { computed as
|
|
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 W, 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 N, 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 =
|
|
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,39 +80,39 @@ function Ae(e, t) {
|
|
|
80
80
|
}, 50));
|
|
81
81
|
}
|
|
82
82
|
let ne = Date.now();
|
|
83
|
-
function
|
|
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
|
|
88
|
+
function ae() {
|
|
89
89
|
return ++Ee;
|
|
90
90
|
}
|
|
91
91
|
async function Ct(e) {
|
|
92
|
-
if (!
|
|
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 =
|
|
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 (!
|
|
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 =
|
|
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 (!
|
|
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 =
|
|
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) {
|
|
@@ -307,7 +307,7 @@ function H(e) {
|
|
|
307
307
|
c > 0 && c > a && (t = l, a = c);
|
|
308
308
|
}), t;
|
|
309
309
|
}
|
|
310
|
-
const
|
|
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 ?
|
|
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");
|
|
@@ -391,58 +391,58 @@ function Kt(e) {
|
|
|
391
391
|
e.value = [];
|
|
392
392
|
}
|
|
393
393
|
function Wt(e, t, a, o, l, r) {
|
|
394
|
-
const c = qe(), n = pe(), _ = Se(),
|
|
394
|
+
const c = qe(), n = pe(), _ = Se(), s = p(!1);
|
|
395
395
|
le(() => {
|
|
396
|
-
let
|
|
397
|
-
typeof e.value == "boolean" ?
|
|
398
|
-
}), Ke(
|
|
399
|
-
const
|
|
396
|
+
let f = !1;
|
|
397
|
+
typeof e.value == "boolean" ? f = e.value : f = _.value, s.value = f;
|
|
398
|
+
}), Ke(s), We(t), Ne(a), ze(o), He(l), Fe(r);
|
|
399
|
+
const w = se();
|
|
400
400
|
le(() => {
|
|
401
|
-
|
|
401
|
+
w.change(s.value ? "dark" : "light");
|
|
402
402
|
});
|
|
403
|
-
const
|
|
403
|
+
const D = () => {
|
|
404
404
|
if (!Ze(r)) {
|
|
405
405
|
me(r, "waitDlg") || tt(r);
|
|
406
406
|
return;
|
|
407
407
|
}
|
|
408
|
-
const
|
|
409
|
-
if (!
|
|
408
|
+
const f = H(c.path);
|
|
409
|
+
if (!f) {
|
|
410
410
|
console.assert(!1);
|
|
411
411
|
return;
|
|
412
412
|
}
|
|
413
|
-
|
|
413
|
+
f.level === 0 ? navigator?.Backbutton?.goHome(
|
|
414
414
|
() => {
|
|
415
415
|
},
|
|
416
416
|
() => {
|
|
417
417
|
}
|
|
418
418
|
) : n.back();
|
|
419
|
-
},
|
|
420
|
-
if (
|
|
421
|
-
|
|
419
|
+
}, y = (f) => {
|
|
420
|
+
if (f.key === "Escape") {
|
|
421
|
+
D();
|
|
422
422
|
return;
|
|
423
423
|
}
|
|
424
|
-
},
|
|
425
|
-
|
|
424
|
+
}, h = () => {
|
|
425
|
+
D();
|
|
426
426
|
};
|
|
427
427
|
W(() => {
|
|
428
|
-
window.addEventListener("keydown",
|
|
428
|
+
window.addEventListener("keydown", y), u.on("backbutton", h);
|
|
429
429
|
}), K(() => {
|
|
430
|
-
window.removeEventListener("keydown",
|
|
430
|
+
window.removeEventListener("keydown", y), u.off("backbutton", h);
|
|
431
431
|
});
|
|
432
|
-
const
|
|
433
|
-
e.value =
|
|
434
|
-
},
|
|
435
|
-
t.value =
|
|
436
|
-
},
|
|
437
|
-
const
|
|
438
|
-
a.value =
|
|
439
|
-
},
|
|
440
|
-
l.value =
|
|
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",
|
|
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",
|
|
445
|
+
u.off("updateDark", i), u.off("updateLocale", x), u.off("updatePermission", d), u.off("updateLastAppPath", j);
|
|
446
446
|
});
|
|
447
447
|
}
|
|
448
448
|
function Nt() {
|
|
@@ -457,7 +457,7 @@ function Nt() {
|
|
|
457
457
|
return { verifyPermission: t };
|
|
458
458
|
}
|
|
459
459
|
function Xt() {
|
|
460
|
-
const e =
|
|
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 =
|
|
469
|
+
const a = Ge(), o = C({
|
|
470
470
|
get() {
|
|
471
471
|
return me(a, e);
|
|
472
472
|
},
|
|
@@ -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 =
|
|
489
|
-
let _ = 0,
|
|
490
|
-
const
|
|
491
|
-
const
|
|
492
|
-
a.value =
|
|
493
|
-
}, { open:
|
|
494
|
-
|
|
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(
|
|
497
|
-
!
|
|
498
|
-
}), (
|
|
499
|
-
const
|
|
500
|
-
return
|
|
501
|
-
modelValue: A(
|
|
502
|
-
"onUpdate:modelValue":
|
|
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) => N(D) ? D.value = V : null),
|
|
505
503
|
attach: "",
|
|
504
|
+
"max-width": "600px",
|
|
505
|
+
transition: "dialog-top-transition",
|
|
506
506
|
onKeydown: [
|
|
507
|
-
|
|
508
|
-
z(B(
|
|
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(
|
|
512
|
+
b(f, { title: a.value }, {
|
|
513
513
|
default: g(() => [
|
|
514
|
-
b(
|
|
514
|
+
b(x, null, {
|
|
515
515
|
default: g(() => [
|
|
516
|
-
L(
|
|
516
|
+
L(S(o.value), 1)
|
|
517
517
|
]),
|
|
518
518
|
_: 1
|
|
519
519
|
}),
|
|
520
|
-
b(
|
|
520
|
+
b(j, { class: "d-flex justify-end" }, {
|
|
521
521
|
default: g(() => [
|
|
522
|
-
b(
|
|
522
|
+
b(d, {
|
|
523
523
|
color: l.value,
|
|
524
524
|
variant: "text",
|
|
525
|
-
onClick:
|
|
525
|
+
onClick: i[0] || (i[0] = (V) => D.value = !1)
|
|
526
526
|
}, {
|
|
527
527
|
default: g(() => [
|
|
528
|
-
L(
|
|
528
|
+
L(S(r.value), 1)
|
|
529
529
|
]),
|
|
530
530
|
_: 1
|
|
531
531
|
}, 8, ["color"]),
|
|
532
|
-
b(
|
|
532
|
+
b(d, {
|
|
533
533
|
color: c.value,
|
|
534
534
|
variant: "text",
|
|
535
|
-
onClick:
|
|
535
|
+
onClick: y
|
|
536
536
|
}, {
|
|
537
537
|
default: g(() => [
|
|
538
|
-
L(
|
|
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 =
|
|
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) => (
|
|
565
|
+
return (l, r) => (q(), T(ke, { name: "fade" }, {
|
|
566
566
|
default: g(() => [
|
|
567
|
-
l.open ? (
|
|
567
|
+
l.open ? (q(), P("div", {
|
|
568
568
|
key: N(o) ? ++o.value : ++o,
|
|
569
569
|
class: "x-cont",
|
|
570
570
|
style: ue(a.value)
|
|
571
571
|
}, r[0] || (r[0] = [
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
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)) :
|
|
586
|
+
]), 4)) : ee("", !0)
|
|
587
587
|
]),
|
|
588
588
|
_: 1
|
|
589
589
|
}));
|
|
590
590
|
}
|
|
591
|
-
}),
|
|
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__ */
|
|
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 =
|
|
606
|
+
const a = C(() => ({
|
|
607
607
|
width: "calc(100% - 64px)",
|
|
608
608
|
overflowWrap: "break-word"
|
|
609
|
-
})), o =
|
|
609
|
+
})), o = C(() => {
|
|
610
610
|
switch (e.type) {
|
|
611
611
|
case "success":
|
|
612
612
|
return "mdi-check-circle";
|
|
@@ -619,7 +619,7 @@ const at = /* @__PURE__ */ I({
|
|
|
619
619
|
default:
|
|
620
620
|
return "";
|
|
621
621
|
}
|
|
622
|
-
}), l =
|
|
622
|
+
}), l = p(!0), r = t;
|
|
623
623
|
return W(() => {
|
|
624
624
|
setTimeout(() => {
|
|
625
625
|
r("timeout", e.id);
|
|
@@ -627,132 +627,132 @@ const at = /* @__PURE__ */ I({
|
|
|
627
627
|
}), F(l, (c) => {
|
|
628
628
|
c || r("timeout", e.id);
|
|
629
629
|
}), (c, n) => {
|
|
630
|
-
const _ =
|
|
631
|
-
return
|
|
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 ? (
|
|
637
|
+
o.value ? (q(), T(_, {
|
|
638
638
|
key: 0,
|
|
639
639
|
class: "mx-1",
|
|
640
640
|
icon: o.value
|
|
641
|
-
}, null, 8, ["icon"])) :
|
|
642
|
-
|
|
641
|
+
}, null, 8, ["icon"])) : ee("", !0),
|
|
642
|
+
k("div", {
|
|
643
643
|
style: ue(a.value)
|
|
644
|
-
},
|
|
644
|
+
}, S(c.text), 5),
|
|
645
645
|
b(_, {
|
|
646
646
|
class: "mx-1",
|
|
647
647
|
icon: "mdi-close",
|
|
648
|
-
onClick: n[0] || (n[0] = (
|
|
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__ */
|
|
655
|
+
}), rt = /* @__PURE__ */ oe(nt, [["__scopeId", "data-v-f1f60167"]]), ut = /* @__PURE__ */ I({
|
|
656
656
|
__name: "index",
|
|
657
657
|
setup(e) {
|
|
658
|
-
const t =
|
|
658
|
+
const t = p([]);
|
|
659
659
|
W(() => {
|
|
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:
|
|
666
|
-
r(_,
|
|
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, _,
|
|
672
|
-
const
|
|
673
|
-
t.value.push({ id:
|
|
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((
|
|
675
|
+
const _ = t.value.findIndex((s) => s.id === n);
|
|
676
676
|
_ >= 0 && t.value.splice(_, 1);
|
|
677
677
|
};
|
|
678
|
-
return (n, _) => (
|
|
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
|
-
(
|
|
684
|
-
id:
|
|
685
|
-
key:
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
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", "
|
|
690
|
+
}, null, 8, ["id", "text", "timeout", "type"]))), 128))
|
|
691
691
|
]));
|
|
692
692
|
}
|
|
693
|
-
}), ct = /* @__PURE__ */
|
|
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 =
|
|
697
|
-
let
|
|
698
|
-
const
|
|
699
|
-
a.value =
|
|
700
|
-
}, { open:
|
|
701
|
-
|
|
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(
|
|
704
|
-
!
|
|
705
|
-
}), (
|
|
706
|
-
const
|
|
707
|
-
return
|
|
708
|
-
modelValue: A(
|
|
709
|
-
"onUpdate:modelValue":
|
|
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) => N(y) ? y.value = R : null),
|
|
712
710
|
attach: "",
|
|
713
|
-
|
|
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(
|
|
716
|
+
b(Q, { title: a.value }, {
|
|
717
717
|
default: g(() => [
|
|
718
|
-
b(
|
|
719
|
-
modelValue:
|
|
720
|
-
"onUpdate:modelValue":
|
|
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(
|
|
722
|
+
onSubmit: B(i, ["prevent"])
|
|
723
723
|
}, {
|
|
724
724
|
default: g(() => [
|
|
725
|
-
b(
|
|
725
|
+
b(j, {
|
|
726
726
|
ref_key: "target",
|
|
727
|
-
ref:
|
|
728
|
-
modelValue:
|
|
729
|
-
"onUpdate:modelValue":
|
|
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:
|
|
732
|
-
min:
|
|
733
|
-
precision:
|
|
734
|
-
step:
|
|
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(
|
|
736
|
+
b(m, { class: "d-flex justify-end" }, {
|
|
737
737
|
default: g(() => [
|
|
738
|
-
b(
|
|
739
|
-
variant: "text",
|
|
738
|
+
b(f, {
|
|
740
739
|
color: "primary",
|
|
741
|
-
|
|
740
|
+
variant: "text",
|
|
741
|
+
onClick: d[1] || (d[1] = (R) => y.value = !1)
|
|
742
742
|
}, {
|
|
743
743
|
default: g(() => [
|
|
744
|
-
L(
|
|
744
|
+
L(S(A(t)("dlg.common.cancel")), 1)
|
|
745
745
|
]),
|
|
746
746
|
_: 1
|
|
747
747
|
}),
|
|
748
|
-
b(
|
|
749
|
-
disabled: !k.value,
|
|
750
|
-
variant: "text",
|
|
748
|
+
b(f, {
|
|
751
749
|
color: "primary",
|
|
752
|
-
|
|
750
|
+
disabled: !h.value,
|
|
751
|
+
type: "submit",
|
|
752
|
+
variant: "text"
|
|
753
753
|
}, {
|
|
754
754
|
default: g(() => [
|
|
755
|
-
L(
|
|
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 =
|
|
777
|
-
let
|
|
778
|
-
const
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
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(
|
|
785
|
-
!
|
|
786
|
-
}), (
|
|
787
|
-
const Q =
|
|
788
|
-
return
|
|
789
|
-
modelValue: A(
|
|
790
|
-
"onUpdate:modelValue":
|
|
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) => N(d) ? d.value = M : null),
|
|
793
790
|
attach: "",
|
|
794
|
-
|
|
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 ? (
|
|
798
|
+
o.value ? (q(), T(Q, { key: 0 }, {
|
|
800
799
|
default: g(() => [
|
|
801
|
-
L(
|
|
800
|
+
L(S(o.value), 1)
|
|
802
801
|
]),
|
|
803
802
|
_: 1
|
|
804
|
-
})) :
|
|
803
|
+
})) : ee("", !0),
|
|
805
804
|
b(ye, {
|
|
806
|
-
modelValue:
|
|
807
|
-
"onUpdate:modelValue":
|
|
805
|
+
modelValue: j.value,
|
|
806
|
+
"onUpdate:modelValue": V[2] || (V[2] = (M) => j.value = M),
|
|
808
807
|
class: "mx-3",
|
|
809
|
-
onSubmit: B(
|
|
808
|
+
onSubmit: B(f, ["prevent"])
|
|
810
809
|
}, {
|
|
811
810
|
default: g(() => [
|
|
812
|
-
b(
|
|
811
|
+
b(Y, {
|
|
813
812
|
ref_key: "target",
|
|
814
|
-
ref:
|
|
813
|
+
ref: i,
|
|
815
814
|
modelValue: n.value,
|
|
816
|
-
"onUpdate:modelValue":
|
|
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(
|
|
824
|
-
variant: "text",
|
|
822
|
+
b(R, {
|
|
825
823
|
color: _.value,
|
|
826
|
-
|
|
824
|
+
variant: "text",
|
|
825
|
+
onClick: V[1] || (V[1] = (M) => d.value = !1)
|
|
827
826
|
}, {
|
|
828
827
|
default: g(() => [
|
|
829
|
-
L(
|
|
828
|
+
L(S(s.value), 1)
|
|
830
829
|
]),
|
|
831
830
|
_: 1
|
|
832
831
|
}, 8, ["color"]),
|
|
833
|
-
b(
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
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(
|
|
839
|
+
L(S(D.value), 1)
|
|
841
840
|
]),
|
|
842
841
|
_: 1
|
|
843
|
-
}, 8, ["
|
|
842
|
+
}, 8, ["color", "disabled"])
|
|
844
843
|
]),
|
|
845
844
|
_: 1
|
|
846
845
|
})
|
|
@@ -858,7 +857,7 @@ const at = /* @__PURE__ */ I({
|
|
|
858
857
|
}), _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({
|
|
859
858
|
__name: "index",
|
|
860
859
|
setup(e) {
|
|
861
|
-
const { t } = G(), a =
|
|
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 = () => {
|
|
@@ -869,25 +868,25 @@ const at = /* @__PURE__ */ I({
|
|
|
869
868
|
}), K(() => {
|
|
870
869
|
u.off("closeWaitDlg", l);
|
|
871
870
|
}), (c, n) => {
|
|
872
|
-
const _ =
|
|
873
|
-
return
|
|
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] = (
|
|
876
|
-
|
|
877
|
-
"no-click-animation": "",
|
|
874
|
+
"onUpdate:modelValue": n[0] || (n[0] = (w) => N(r) ? r.value = w : null),
|
|
875
|
+
attach: "",
|
|
878
876
|
fullscreen: "",
|
|
879
|
-
|
|
877
|
+
"no-click-animation": "",
|
|
878
|
+
persistent: ""
|
|
880
879
|
}, {
|
|
881
880
|
default: g(() => [
|
|
882
|
-
|
|
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
|
-
|
|
890
|
-
|
|
888
|
+
k("div", dt, [
|
|
889
|
+
k("span", it, S(a.value), 1)
|
|
891
890
|
])
|
|
892
891
|
]),
|
|
893
892
|
_: 1
|
|
@@ -949,7 +948,7 @@ export {
|
|
|
949
948
|
ze as providePermissionChecksum,
|
|
950
949
|
Ne as providePermissionObjects,
|
|
951
950
|
Fe as provideViews,
|
|
952
|
-
|
|
951
|
+
Z as routeTransName,
|
|
953
952
|
Oe as useColor,
|
|
954
953
|
Wt as useMicroApp,
|
|
955
954
|
Nt as usePermission,
|
package/dist/utils/dialog.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "x-essential-lib",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.8.
|
|
4
|
+
"version": "0.8.22",
|
|
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.
|
|
30
|
+
"vue-i18n": "^11.1.10",
|
|
31
31
|
"vue-router": "^4.5.1",
|
|
32
32
|
"vuetify": "^3.9.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@eslint/js": "^9.
|
|
35
|
+
"@eslint/js": "^9.31.0",
|
|
36
36
|
"@types/js-cookie": "^3.0.6",
|
|
37
|
-
"@types/node": "^24.0.
|
|
37
|
+
"@types/node": "^24.0.14",
|
|
38
38
|
"@vitejs/plugin-vue": "^6.0.0",
|
|
39
|
-
"eslint": "^9.
|
|
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,8 +46,8 @@
|
|
|
46
46
|
"prettier": "3.6.2",
|
|
47
47
|
"sass": "^1.89.2",
|
|
48
48
|
"typescript": "^5.8.3",
|
|
49
|
-
"typescript-eslint": "^8.
|
|
50
|
-
"vite": "^7.0.
|
|
49
|
+
"typescript-eslint": "^8.37.0",
|
|
50
|
+
"vite": "^7.0.4",
|
|
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",
|