x-essential-lib 0.6.2 → 0.6.3
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/components/loading/index.vue.d.ts +25 -11
- package/dist/index.js +75 -78
- package/package.json +4 -4
|
@@ -1,14 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
zIndex
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
zIndex:
|
|
8
|
-
|
|
9
|
-
default: number;
|
|
10
|
-
};
|
|
11
|
-
}>>, {
|
|
1
|
+
interface Props {
|
|
2
|
+
zIndex?: number;
|
|
3
|
+
}
|
|
4
|
+
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
|
|
5
|
+
zIndex: number;
|
|
6
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
|
|
7
|
+
zIndex: number;
|
|
8
|
+
}>>>, {
|
|
12
9
|
zIndex: number;
|
|
13
10
|
}, {}>;
|
|
14
11
|
export default _default;
|
|
12
|
+
type __VLS_WithDefaults<P, D> = {
|
|
13
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
14
|
+
default: D[K];
|
|
15
|
+
}> : P[K];
|
|
16
|
+
};
|
|
17
|
+
type __VLS_Prettify<T> = {
|
|
18
|
+
[K in keyof T]: T[K];
|
|
19
|
+
} & {};
|
|
20
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
21
|
+
type __VLS_TypePropsToOption<T> = {
|
|
22
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
23
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
24
|
+
} : {
|
|
25
|
+
type: import('vue').PropType<T[K]>;
|
|
26
|
+
required: true;
|
|
27
|
+
};
|
|
28
|
+
};
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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-
|
|
2
|
-
import { ref as d, defineComponent as T, computed as g, onMounted as V, onBeforeUnmount as I, watch as Z, resolveComponent as h, openBlock as D, createBlock as O, withKeys as
|
|
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-7ab74c70]{position:absolute;top:0;left:0;bottom:0;right:0;display:flex;align-items:center;justify-content:center}.lds-spinner[data-v-7ab74c70]{color:official;display:inline-block;position:relative;width:40px;height:40px}.lds-spinner div[data-v-7ab74c70]{transform-origin:20px 20px;animation:lds-spinner-7ab74c70 1.2s linear infinite}.lds-spinner div[data-v-7ab74c70]:after{content:" ";display:block;position:absolute;top:3px;left:18px;width:2px;height:6px;border-radius:5%;background:#9e9e9e}.lds-spinner div[data-v-7ab74c70]:nth-child(1){transform:rotate(0);animation-delay:-1.1s}.lds-spinner div[data-v-7ab74c70]:nth-child(2){transform:rotate(30deg);animation-delay:-1s}.lds-spinner div[data-v-7ab74c70]:nth-child(3){transform:rotate(60deg);animation-delay:-.9s}.lds-spinner div[data-v-7ab74c70]:nth-child(4){transform:rotate(90deg);animation-delay:-.8s}.lds-spinner div[data-v-7ab74c70]:nth-child(5){transform:rotate(120deg);animation-delay:-.7s}.lds-spinner div[data-v-7ab74c70]:nth-child(6){transform:rotate(150deg);animation-delay:-.6s}.lds-spinner div[data-v-7ab74c70]:nth-child(7){transform:rotate(180deg);animation-delay:-.5s}.lds-spinner div[data-v-7ab74c70]:nth-child(8){transform:rotate(210deg);animation-delay:-.4s}.lds-spinner div[data-v-7ab74c70]:nth-child(9){transform:rotate(240deg);animation-delay:-.3s}.lds-spinner div[data-v-7ab74c70]:nth-child(10){transform:rotate(270deg);animation-delay:-.2s}.lds-spinner div[data-v-7ab74c70]:nth-child(11){transform:rotate(300deg);animation-delay:-.1s}.lds-spinner div[data-v-7ab74c70]:nth-child(12){transform:rotate(330deg);animation-delay:0s}@keyframes lds-spinner-7ab74c70{0%{opacity:1}to{opacity:0}}.x-item[data-v-d5cfe252]{width:600px}@media (max-width: 600px){.x-item[data-v-d5cfe252]{width:calc(100vw - 16px)}}.x-cont[data-v-d525e6f5]{position:absolute;left:50%;bottom:20px;transform:translate(-50%);z-index:9999}')),document.head.appendChild(a)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
2
|
+
import { ref as d, defineComponent as T, computed as g, onMounted as V, onBeforeUnmount as I, watch as Z, resolveComponent as h, openBlock as D, createBlock as O, withKeys as F, withModifiers as W, withCtx as w, createVNode as b, createTextVNode as j, toDisplayString as q, createElementBlock as Q, normalizeStyle as ne, pushScopeId as fe, popScopeId as ge, createElementVNode as v, createCommentVNode as le, unref as re, Fragment as ve, renderList as me, getCurrentScope as he, onScopeDispose as we, watchEffect as ye, getCurrentInstance as xe } from "vue";
|
|
3
3
|
import { useI18n as Y } from "vue-i18n";
|
|
4
4
|
import { defineStore as ce } from "pinia";
|
|
5
5
|
import ke from "axios";
|
|
@@ -53,7 +53,7 @@ const G = ce("global", () => {
|
|
|
53
53
|
};
|
|
54
54
|
});
|
|
55
55
|
/*! js-cookie v3.0.5 | MIT */
|
|
56
|
-
function
|
|
56
|
+
function X(e) {
|
|
57
57
|
for (var t = 1; t < arguments.length; t++) {
|
|
58
58
|
var a = arguments[t];
|
|
59
59
|
for (var n in a)
|
|
@@ -75,7 +75,7 @@ var De = {
|
|
|
75
75
|
function J(e, t) {
|
|
76
76
|
function a(o, r, l) {
|
|
77
77
|
if (!(typeof document > "u")) {
|
|
78
|
-
l =
|
|
78
|
+
l = X({}, 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);
|
|
79
79
|
var c = "";
|
|
80
80
|
for (var u in l)
|
|
81
81
|
l[u] && (c += "; " + u, l[u] !== !0 && (c += "=" + l[u].split(";")[0]));
|
|
@@ -104,16 +104,16 @@ function J(e, t) {
|
|
|
104
104
|
a(
|
|
105
105
|
o,
|
|
106
106
|
"",
|
|
107
|
-
|
|
107
|
+
X({}, r, {
|
|
108
108
|
expires: -1
|
|
109
109
|
})
|
|
110
110
|
);
|
|
111
111
|
},
|
|
112
112
|
withAttributes: function(o) {
|
|
113
|
-
return J(this.converter,
|
|
113
|
+
return J(this.converter, X({}, this.attributes, o));
|
|
114
114
|
},
|
|
115
115
|
withConverter: function(o) {
|
|
116
|
-
return J(
|
|
116
|
+
return J(X({}, this.converter, o), this.attributes);
|
|
117
117
|
}
|
|
118
118
|
},
|
|
119
119
|
{
|
|
@@ -123,7 +123,7 @@ function J(e, t) {
|
|
|
123
123
|
);
|
|
124
124
|
}
|
|
125
125
|
var E = J(De, { path: "/" });
|
|
126
|
-
function
|
|
126
|
+
function xt(e) {
|
|
127
127
|
const t = ke.create({
|
|
128
128
|
timeout: 6e3
|
|
129
129
|
});
|
|
@@ -369,7 +369,7 @@ const je = [
|
|
|
369
369
|
mainActive: 2
|
|
370
370
|
}
|
|
371
371
|
];
|
|
372
|
-
function
|
|
372
|
+
function K(e) {
|
|
373
373
|
let t, a = 0;
|
|
374
374
|
const n = e.split("/").filter((o) => o.trim() !== "");
|
|
375
375
|
return je.forEach((o) => {
|
|
@@ -380,11 +380,11 @@ function N(e) {
|
|
|
380
380
|
l > 0 && l > a && (t = o, a = l);
|
|
381
381
|
}), t;
|
|
382
382
|
}
|
|
383
|
-
const
|
|
383
|
+
const N = d("");
|
|
384
384
|
function L(e, t) {
|
|
385
385
|
const a = G();
|
|
386
386
|
t === "/" && (t = a.lastAppPath);
|
|
387
|
-
const n =
|
|
387
|
+
const n = K(e), o = K(t);
|
|
388
388
|
if (!n) {
|
|
389
389
|
console.assert(!1);
|
|
390
390
|
return;
|
|
@@ -392,7 +392,7 @@ function L(e, t) {
|
|
|
392
392
|
if (console.info(`~~~~routeChange~~~~ ${t} -> ${e}`), !o)
|
|
393
393
|
return;
|
|
394
394
|
const r = n.app === o.app, l = n.path === o.path, c = n.level >= o.level;
|
|
395
|
-
r ? l ?
|
|
395
|
+
r ? l ? N.value = "" : N.value = c ? "inner-left" : "inner-right" : (N.value = "", Re(n.app, c));
|
|
396
396
|
}
|
|
397
397
|
function Ee() {
|
|
398
398
|
return !!E.get("accessToken");
|
|
@@ -401,7 +401,7 @@ function Te() {
|
|
|
401
401
|
return !!E.get("activeOrg");
|
|
402
402
|
}
|
|
403
403
|
function qt(e, t, a) {
|
|
404
|
-
const n = Ee(), o = Te(), r =
|
|
404
|
+
const n = Ee(), o = Te(), r = K(e.path);
|
|
405
405
|
if (!r) {
|
|
406
406
|
console.assert(!1), a();
|
|
407
407
|
return;
|
|
@@ -451,10 +451,10 @@ const Be = /* @__PURE__ */ T({
|
|
|
451
451
|
m ? a.addView("confirmDlg") : a.delView("confirmDlg");
|
|
452
452
|
}
|
|
453
453
|
}), o = d(""), r = d(""), l = d(""), c = d(""), u = d(""), p = d("");
|
|
454
|
-
let _ = 0,
|
|
454
|
+
let _ = 0, y = !1;
|
|
455
455
|
const i = (m) => {
|
|
456
|
-
var
|
|
457
|
-
o.value = m.title, r.value = m.text, l.value = ((
|
|
456
|
+
var x, C, S, R;
|
|
457
|
+
o.value = m.title, r.value = m.text, l.value = ((x = m.cancel) == null ? void 0 : x.color) ?? "primary", c.value = ((C = m.cancel) == null ? void 0 : C.text) ?? t("dlg.common.cancel"), u.value = ((S = m.confirm) == null ? void 0 : S.color) ?? "primary", p.value = ((R = m.confirm) == null ? void 0 : R.text) ?? t("dlg.common.confirm"), _ = m.seq, y = !1, n.value = !0;
|
|
458
458
|
};
|
|
459
459
|
V(() => {
|
|
460
460
|
s.on("confirmDlg", i);
|
|
@@ -462,21 +462,21 @@ const Be = /* @__PURE__ */ T({
|
|
|
462
462
|
s.off("confirmDlg", i);
|
|
463
463
|
});
|
|
464
464
|
const M = () => {
|
|
465
|
-
n.value = !1,
|
|
465
|
+
n.value = !1, y || (s.emit("confirmDlgResult" + _, !0), y = !0);
|
|
466
466
|
};
|
|
467
467
|
return Z(n, (m) => {
|
|
468
|
-
!m && !
|
|
469
|
-
}), (m,
|
|
468
|
+
!m && !y && (s.emit("confirmDlgResult" + _, !1), y = !0);
|
|
469
|
+
}), (m, x) => {
|
|
470
470
|
const C = h("v-card-text"), S = h("v-btn"), R = h("v-card-actions"), f = h("v-card"), k = h("v-dialog");
|
|
471
471
|
return D(), O(k, {
|
|
472
472
|
modelValue: n.value,
|
|
473
|
-
"onUpdate:modelValue":
|
|
474
|
-
onKeydown: [
|
|
475
|
-
y[2] || (y[2] = K(W((A) => n.value = !1, ["stop", "prevent"]), ["esc"])),
|
|
476
|
-
K(W(M, ["stop", "prevent"]), ["enter"])
|
|
477
|
-
],
|
|
473
|
+
"onUpdate:modelValue": x[1] || (x[1] = (A) => n.value = A),
|
|
478
474
|
transition: "dialog-top-transition",
|
|
479
|
-
"max-width": "600px"
|
|
475
|
+
"max-width": "600px",
|
|
476
|
+
onKeydown: [
|
|
477
|
+
x[2] || (x[2] = F(W((A) => n.value = !1, ["stop", "prevent"]), ["esc"])),
|
|
478
|
+
F(W(M, ["stop", "prevent"]), ["enter"])
|
|
479
|
+
]
|
|
480
480
|
}, {
|
|
481
481
|
default: w(() => [
|
|
482
482
|
b(f, { title: o.value }, {
|
|
@@ -490,9 +490,9 @@ const Be = /* @__PURE__ */ T({
|
|
|
490
490
|
b(R, { class: "d-flex justify-end" }, {
|
|
491
491
|
default: w(() => [
|
|
492
492
|
b(S, {
|
|
493
|
-
onClick: y[0] || (y[0] = (A) => n.value = !1),
|
|
494
493
|
color: l.value,
|
|
495
|
-
variant: "text"
|
|
494
|
+
variant: "text",
|
|
495
|
+
onClick: x[0] || (x[0] = (A) => n.value = !1)
|
|
496
496
|
}, {
|
|
497
497
|
default: w(() => [
|
|
498
498
|
j(q(c.value), 1)
|
|
@@ -500,9 +500,9 @@ const Be = /* @__PURE__ */ T({
|
|
|
500
500
|
_: 1
|
|
501
501
|
}, 8, ["color"]),
|
|
502
502
|
b(S, {
|
|
503
|
-
onClick: M,
|
|
504
503
|
color: u.value,
|
|
505
|
-
variant: "text"
|
|
504
|
+
variant: "text",
|
|
505
|
+
onClick: M
|
|
506
506
|
}, {
|
|
507
507
|
default: w(() => [
|
|
508
508
|
j(q(p.value), 1)
|
|
@@ -520,7 +520,7 @@ const Be = /* @__PURE__ */ T({
|
|
|
520
520
|
}, 8, ["modelValue", "onKeydown"]);
|
|
521
521
|
};
|
|
522
522
|
}
|
|
523
|
-
}), Ue = (e) => (fe("data-v-
|
|
523
|
+
}), Ue = (e) => (fe("data-v-7ab74c70"), e = e(), ge(), e), We = /* @__PURE__ */ Ue(() => /* @__PURE__ */ v("div", { class: "lds-spinner" }, [
|
|
524
524
|
/* @__PURE__ */ v("div"),
|
|
525
525
|
/* @__PURE__ */ v("div"),
|
|
526
526
|
/* @__PURE__ */ v("div"),
|
|
@@ -538,10 +538,7 @@ const Be = /* @__PURE__ */ T({
|
|
|
538
538
|
], He = /* @__PURE__ */ T({
|
|
539
539
|
__name: "index",
|
|
540
540
|
props: {
|
|
541
|
-
zIndex: {
|
|
542
|
-
type: Number,
|
|
543
|
-
default: 1
|
|
544
|
-
}
|
|
541
|
+
zIndex: { default: 1 }
|
|
545
542
|
},
|
|
546
543
|
setup(e) {
|
|
547
544
|
const t = P(), a = e, n = g(() => ({
|
|
@@ -558,9 +555,9 @@ const Be = /* @__PURE__ */ T({
|
|
|
558
555
|
for (const [n, o] of t)
|
|
559
556
|
a[n] = o;
|
|
560
557
|
return a;
|
|
561
|
-
}, ze = /* @__PURE__ */ te(He, [["__scopeId", "data-v-
|
|
562
|
-
var
|
|
563
|
-
const
|
|
558
|
+
}, ze = /* @__PURE__ */ te(He, [["__scopeId", "data-v-7ab74c70"]]);
|
|
559
|
+
var Xe = "M13,13H11V7H13M13,17H11V15H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z", Fe = "M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41 10.59L10 14.17L17.59 6.58L19 8L10 17Z", Ke = "M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z", Ze = "M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2,6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z", Ge = "M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z";
|
|
560
|
+
const Ne = /* @__PURE__ */ T({
|
|
564
561
|
__name: "item",
|
|
565
562
|
props: {
|
|
566
563
|
id: {},
|
|
@@ -576,13 +573,13 @@ const Xe = /* @__PURE__ */ T({
|
|
|
576
573
|
})), o = g(() => {
|
|
577
574
|
switch (a.type) {
|
|
578
575
|
case "success":
|
|
579
|
-
return
|
|
576
|
+
return Fe;
|
|
580
577
|
case "info":
|
|
581
578
|
return Ge;
|
|
582
579
|
case "error":
|
|
583
580
|
return Ze;
|
|
584
581
|
case "warning":
|
|
585
|
-
return
|
|
582
|
+
return Xe;
|
|
586
583
|
default:
|
|
587
584
|
return "";
|
|
588
585
|
}
|
|
@@ -596,7 +593,7 @@ const Xe = /* @__PURE__ */ T({
|
|
|
596
593
|
}), (c, u) => {
|
|
597
594
|
const p = h("v-icon"), _ = h("v-sheet");
|
|
598
595
|
return D(), O(_, {
|
|
599
|
-
class: "x-item d-flex align-center mb-2",
|
|
596
|
+
class: "x-item d-flex align-center py-2 mb-2",
|
|
600
597
|
color: a.type,
|
|
601
598
|
elevation: 1
|
|
602
599
|
}, {
|
|
@@ -610,16 +607,16 @@ const Xe = /* @__PURE__ */ T({
|
|
|
610
607
|
style: ne(n.value)
|
|
611
608
|
}, q(a.text), 5),
|
|
612
609
|
b(p, {
|
|
613
|
-
onClick: u[0] || (u[0] = (x) => l("timeout", a.id)),
|
|
614
610
|
class: "mx-1",
|
|
615
|
-
icon: re(
|
|
611
|
+
icon: re(Ke),
|
|
612
|
+
onClick: u[0] || (u[0] = (y) => l("timeout", a.id))
|
|
616
613
|
}, null, 8, ["icon"])
|
|
617
614
|
]),
|
|
618
615
|
_: 1
|
|
619
616
|
}, 8, ["color"]);
|
|
620
617
|
};
|
|
621
618
|
}
|
|
622
|
-
}), Qe = /* @__PURE__ */ te(
|
|
619
|
+
}), Qe = /* @__PURE__ */ te(Ne, [["__scopeId", "data-v-d5cfe252"]]), Je = /* @__PURE__ */ T({
|
|
623
620
|
__name: "index",
|
|
624
621
|
setup(e) {
|
|
625
622
|
const t = d([]);
|
|
@@ -642,21 +639,21 @@ const Xe = /* @__PURE__ */ T({
|
|
|
642
639
|
u >= 0 && t.value.splice(u, 1);
|
|
643
640
|
};
|
|
644
641
|
return (c, u) => (D(), Q("div", {
|
|
642
|
+
class: "x-cont d-flex flex-column-reverse align-center",
|
|
645
643
|
onClick: u[0] || (u[0] = W(() => {
|
|
646
|
-
}, ["stop"]))
|
|
647
|
-
class: "x-cont d-flex flex-column-reverse align-center"
|
|
644
|
+
}, ["stop"]))
|
|
648
645
|
}, [
|
|
649
646
|
(D(!0), Q(ve, null, me(t.value, (p) => (D(), O(Qe, {
|
|
650
|
-
key: p.id,
|
|
651
|
-
onTimeout: n,
|
|
652
647
|
id: p.id,
|
|
648
|
+
key: p.id,
|
|
653
649
|
type: p.type,
|
|
654
650
|
text: p.text,
|
|
655
|
-
timeout: p.timeout
|
|
651
|
+
timeout: p.timeout,
|
|
652
|
+
onTimeout: n
|
|
656
653
|
}, null, 8, ["id", "type", "text", "timeout"]))), 128))
|
|
657
654
|
]));
|
|
658
655
|
}
|
|
659
|
-
}), Ye = /* @__PURE__ */ te(Je, [["__scopeId", "data-v-
|
|
656
|
+
}), Ye = /* @__PURE__ */ te(Je, [["__scopeId", "data-v-d525e6f5"]]), Pe = /* @__PURE__ */ T({
|
|
660
657
|
__name: "index",
|
|
661
658
|
setup(e) {
|
|
662
659
|
const { t } = Y(), a = $(), n = g({
|
|
@@ -666,11 +663,11 @@ const Xe = /* @__PURE__ */ T({
|
|
|
666
663
|
set(f) {
|
|
667
664
|
f ? a.addView("promptDlg") : a.delView("promptDlg");
|
|
668
665
|
}
|
|
669
|
-
}), o = d(""), r = d(""), l = d(""), c = d(""), u = d(), p = d(""), _ = d(""),
|
|
670
|
-
let
|
|
666
|
+
}), o = d(""), r = d(""), l = d(""), c = d(""), u = d(), p = d(""), _ = d(""), y = d(""), i = d(""), M = d(""), m = d();
|
|
667
|
+
let x = 0, C = !1;
|
|
671
668
|
const S = async (f) => {
|
|
672
669
|
var k, A, H, z, B;
|
|
673
|
-
o.value = f.title, r.value = f.text, l.value = f.label, c.value = f.placeholder, u.value = f.rules, p.value = f.value, _.value = ((k = f.cancel) == null ? void 0 : k.color) ?? "primary",
|
|
670
|
+
o.value = f.title, r.value = f.text, l.value = f.label, c.value = f.placeholder, u.value = f.rules, p.value = f.value, _.value = ((k = f.cancel) == null ? void 0 : k.color) ?? "primary", y.value = ((A = f.cancel) == null ? void 0 : A.text) ?? t("dlg.common.cancel"), i.value = ((H = f.confirm) == null ? void 0 : H.color) ?? "primary", M.value = ((z = f.confirm) == null ? void 0 : z.text) ?? t("dlg.common.confirm"), x = f.seq, C = !1, n.value = !0, await ee(() => !!m.value, 1e3), (B = m.value) == null || B.focus();
|
|
674
671
|
};
|
|
675
672
|
V(() => {
|
|
676
673
|
s.on("promptDlg", S);
|
|
@@ -678,21 +675,21 @@ const Xe = /* @__PURE__ */ T({
|
|
|
678
675
|
s.off("promptDlg", S);
|
|
679
676
|
});
|
|
680
677
|
const R = () => {
|
|
681
|
-
n.value = !1, C || (s.emit("promptDlgResult" +
|
|
678
|
+
n.value = !1, C || (s.emit("promptDlgResult" + x, p.value ?? ""), C = !0);
|
|
682
679
|
};
|
|
683
680
|
return Z(n, (f) => {
|
|
684
|
-
!f && !C && (s.emit("promptDlgResult" +
|
|
681
|
+
!f && !C && (s.emit("promptDlgResult" + x, void 0), C = !0);
|
|
685
682
|
}), (f, k) => {
|
|
686
683
|
const A = h("v-card-text"), H = h("v-text-field"), z = h("v-form"), B = h("v-btn"), de = h("v-card-actions"), _e = h("v-card"), ie = h("v-dialog");
|
|
687
684
|
return D(), O(ie, {
|
|
688
685
|
modelValue: n.value,
|
|
689
686
|
"onUpdate:modelValue": k[2] || (k[2] = (U) => n.value = U),
|
|
690
|
-
onKeydown: [
|
|
691
|
-
k[3] || (k[3] = K(W((U) => n.value = !1, ["stop", "prevent"]), ["esc"])),
|
|
692
|
-
K(W(R, ["stop", "prevent"]), ["enter"])
|
|
693
|
-
],
|
|
694
687
|
transition: "dialog-top-transition",
|
|
695
|
-
"max-width": "600px"
|
|
688
|
+
"max-width": "600px",
|
|
689
|
+
onKeydown: [
|
|
690
|
+
k[3] || (k[3] = F(W((U) => n.value = !1, ["stop", "prevent"]), ["esc"])),
|
|
691
|
+
F(W(R, ["stop", "prevent"]), ["enter"])
|
|
692
|
+
]
|
|
696
693
|
}, {
|
|
697
694
|
default: w(() => [
|
|
698
695
|
b(_e, { title: o.value }, {
|
|
@@ -706,13 +703,13 @@ const Xe = /* @__PURE__ */ T({
|
|
|
706
703
|
b(z, { class: "mx-3" }, {
|
|
707
704
|
default: w(() => [
|
|
708
705
|
b(H, {
|
|
706
|
+
ref_key: "target",
|
|
707
|
+
ref: m,
|
|
709
708
|
modelValue: p.value,
|
|
710
709
|
"onUpdate:modelValue": k[0] || (k[0] = (U) => p.value = U),
|
|
711
710
|
label: l.value,
|
|
712
711
|
placeholder: c.value,
|
|
713
|
-
rules: u.value
|
|
714
|
-
ref_key: "target",
|
|
715
|
-
ref: m
|
|
712
|
+
rules: u.value
|
|
716
713
|
}, null, 8, ["modelValue", "label", "placeholder", "rules"])
|
|
717
714
|
]),
|
|
718
715
|
_: 1
|
|
@@ -720,19 +717,19 @@ const Xe = /* @__PURE__ */ T({
|
|
|
720
717
|
b(de, { class: "d-flex justify-end" }, {
|
|
721
718
|
default: w(() => [
|
|
722
719
|
b(B, {
|
|
723
|
-
onClick: k[1] || (k[1] = (U) => n.value = !1),
|
|
724
720
|
color: _.value,
|
|
725
|
-
variant: "text"
|
|
721
|
+
variant: "text",
|
|
722
|
+
onClick: k[1] || (k[1] = (U) => n.value = !1)
|
|
726
723
|
}, {
|
|
727
724
|
default: w(() => [
|
|
728
|
-
j(q(
|
|
725
|
+
j(q(y.value), 1)
|
|
729
726
|
]),
|
|
730
727
|
_: 1
|
|
731
728
|
}, 8, ["color"]),
|
|
732
729
|
b(B, {
|
|
733
|
-
onClick: R,
|
|
734
730
|
color: i.value,
|
|
735
|
-
variant: "text"
|
|
731
|
+
variant: "text",
|
|
732
|
+
onClick: R
|
|
736
733
|
}, {
|
|
737
734
|
default: w(() => [
|
|
738
735
|
j(q(M.value), 1)
|
|
@@ -773,7 +770,7 @@ const Xe = /* @__PURE__ */ T({
|
|
|
773
770
|
const p = h("v-card"), _ = h("v-dialog");
|
|
774
771
|
return D(), O(_, {
|
|
775
772
|
modelValue: n.value,
|
|
776
|
-
"onUpdate:modelValue": u[0] || (u[0] = (
|
|
773
|
+
"onUpdate:modelValue": u[0] || (u[0] = (y) => n.value = y),
|
|
777
774
|
persistent: "",
|
|
778
775
|
"no-click-animation": "",
|
|
779
776
|
fullscreen: ""
|
|
@@ -799,7 +796,7 @@ const Xe = /* @__PURE__ */ T({
|
|
|
799
796
|
};
|
|
800
797
|
}
|
|
801
798
|
}), nt = (e) => {
|
|
802
|
-
e.component("
|
|
799
|
+
e.component("XConfirmDlg", Be), e.component("XLoading", ze), e.component("XMessage", Ye), e.component("XPromptDlg", Pe), e.component("XWaitDlg", ot);
|
|
803
800
|
};
|
|
804
801
|
function Rt() {
|
|
805
802
|
const e = P(), t = g(() => e.global.current.value.colors.primary), a = g(() => e.global.current.value.colors.secondary), n = g(() => e.current.value.dark ? "#2e2e2e" : "#bdbdbd"), o = g(() => e.current.value.dark ? "#272727" : "#eeeeee"), r = g(() => e.current.value.dark ? "#1e1e1e" : "#ffffff"), l = g(() => e.current.value.dark ? "#303030" : "#f6f6f6"), c = g(() => e.current.value.dark ? "#ffffff1f" : "#0000001f");
|
|
@@ -823,7 +820,7 @@ const ct = typeof window < "u" && typeof document < "u";
|
|
|
823
820
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
824
821
|
const ut = ct ? window : void 0;
|
|
825
822
|
function st() {
|
|
826
|
-
const e = d(!1), t =
|
|
823
|
+
const e = d(!1), t = xe();
|
|
827
824
|
return t && V(() => {
|
|
828
825
|
e.value = !0;
|
|
829
826
|
}, t), e;
|
|
@@ -839,7 +836,7 @@ function dt(e, t = {}) {
|
|
|
839
836
|
r.value = p.matches;
|
|
840
837
|
}, c = () => {
|
|
841
838
|
o && ("removeEventListener" in o ? o.removeEventListener("change", l) : o.removeListener(l));
|
|
842
|
-
}, u =
|
|
839
|
+
}, u = ye(() => {
|
|
843
840
|
n.value && (c(), o = a.matchMedia(rt(e)), "addEventListener" in o ? o.addEventListener("change", l) : o.addListener(l), r.value = o.matches);
|
|
844
841
|
});
|
|
845
842
|
return lt(() => {
|
|
@@ -873,7 +870,7 @@ function It() {
|
|
|
873
870
|
r.hasView("waitDlg") || r.popView();
|
|
874
871
|
return;
|
|
875
872
|
}
|
|
876
|
-
const i =
|
|
873
|
+
const i = K(e.path);
|
|
877
874
|
(i == null ? void 0 : i.level) === 0 ? (M = navigator == null ? void 0 : navigator.Backbutton) == null || M.goHome(
|
|
878
875
|
() => {
|
|
879
876
|
},
|
|
@@ -892,13 +889,13 @@ function It() {
|
|
|
892
889
|
o.locale = i;
|
|
893
890
|
}, _ = (i) => {
|
|
894
891
|
o.permissionObjects = i[0], o.permissionChecksum = i[1];
|
|
895
|
-
},
|
|
892
|
+
}, y = (i) => {
|
|
896
893
|
o.lastAppPath = i;
|
|
897
894
|
};
|
|
898
895
|
V(() => {
|
|
899
|
-
s.on("updateDark", u), s.on("updateLocale", p), s.on("updatePermission", _), s.on("updateLastAppPath",
|
|
896
|
+
s.on("updateDark", u), s.on("updateLocale", p), s.on("updatePermission", _), s.on("updateLastAppPath", y), s.emit("syncGlobalState");
|
|
900
897
|
}), I(() => {
|
|
901
|
-
s.off("updateDark", u), s.off("updateLocale", p), s.off("updatePermission", _), s.off("updateLastAppPath",
|
|
898
|
+
s.off("updateDark", u), s.off("updateLocale", p), s.off("updatePermission", _), s.off("updateLastAppPath", y);
|
|
902
899
|
});
|
|
903
900
|
}
|
|
904
901
|
function Ot() {
|
|
@@ -947,12 +944,12 @@ export {
|
|
|
947
944
|
Oe as Permission,
|
|
948
945
|
Re as appAppear,
|
|
949
946
|
Lt as closeWaitDlg,
|
|
950
|
-
|
|
947
|
+
xt as createAxios,
|
|
951
948
|
Tt as default,
|
|
952
949
|
s as eventBus,
|
|
953
950
|
oe as isExist,
|
|
954
951
|
Et as loadLocaleMessageEssential,
|
|
955
|
-
|
|
952
|
+
K as matchRouteMeta,
|
|
956
953
|
Vt as messageError,
|
|
957
954
|
Mt as messageInfo,
|
|
958
955
|
St as messageSuccess,
|
|
@@ -961,7 +958,7 @@ export {
|
|
|
961
958
|
bt as openConfirmDlg,
|
|
962
959
|
Ct as openPromptDlg,
|
|
963
960
|
Dt as openWaitDlg,
|
|
964
|
-
|
|
961
|
+
N as routeTransName,
|
|
965
962
|
Rt as useColor,
|
|
966
963
|
G as useGlobalStore,
|
|
967
964
|
It as useMicroApp,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "x-essential-lib",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.6.
|
|
4
|
+
"version": "0.6.3",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -30,10 +30,10 @@
|
|
|
30
30
|
"axios": "^1.7.2",
|
|
31
31
|
"pinia": "^2.1.7",
|
|
32
32
|
"pinia-plugin-persistedstate": "^3.2.1",
|
|
33
|
-
"vue": "^3.4.
|
|
33
|
+
"vue": "^3.4.32",
|
|
34
34
|
"vue-i18n": "^9.13.1",
|
|
35
35
|
"vue-router": "^4.4.0",
|
|
36
|
-
"vuetify": "^3.6.
|
|
36
|
+
"vuetify": "^3.6.13"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@mdi/js": "^7.4.47",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"eslint-plugin-vue": "^9.27.0",
|
|
48
48
|
"husky": "^9.0.11",
|
|
49
49
|
"lint-staged": "^15.2.7",
|
|
50
|
-
"prettier": "3.3.
|
|
50
|
+
"prettier": "3.3.3",
|
|
51
51
|
"sass": "^1.77.7",
|
|
52
52
|
"typescript": "^5.5.3",
|
|
53
53
|
"vite": "^5.3.3",
|