x-essential-lib 0.9.3 → 0.9.4
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/composables/system.d.ts +1 -0
- package/dist/index.js +53 -50
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var d=document.createElement("style");d.id="x-essential-lib",d.appendChild(document.createTextNode('.fade-leave-active[data-v-83c3cd1d]{transition:opacity .5s ease}.fade-leave-to[data-v-83c3cd1d]{opacity:0}.x-cont[data-v-83c3cd1d]{position:absolute;inset:0;display:flex;align-items:center;justify-content:center}.lds-spinner[data-v-83c3cd1d]{color:official;display:inline-block;position:relative;width:40px;height:40px}.lds-spinner div[data-v-83c3cd1d]{transform-origin:20px 20px;animation:lds-spinner-83c3cd1d 1.2s linear infinite}.lds-spinner div[data-v-83c3cd1d]:after{content:" ";display:block;position:absolute;top:3px;left:18px;width:2px;height:6px;border-radius:5%;background:#9e9e9e}.lds-spinner div[data-v-83c3cd1d]:nth-child(1){transform:rotate(0);animation-delay:-1.1s}.lds-spinner div[data-v-83c3cd1d]:nth-child(2){transform:rotate(30deg);animation-delay:-1s}.lds-spinner div[data-v-83c3cd1d]:nth-child(3){transform:rotate(60deg);animation-delay:-.9s}.lds-spinner div[data-v-83c3cd1d]:nth-child(4){transform:rotate(90deg);animation-delay:-.8s}.lds-spinner div[data-v-83c3cd1d]:nth-child(5){transform:rotate(120deg);animation-delay:-.7s}.lds-spinner div[data-v-83c3cd1d]:nth-child(6){transform:rotate(150deg);animation-delay:-.6s}.lds-spinner div[data-v-83c3cd1d]:nth-child(7){transform:rotate(180deg);animation-delay:-.5s}.lds-spinner div[data-v-83c3cd1d]:nth-child(8){transform:rotate(210deg);animation-delay:-.4s}.lds-spinner div[data-v-83c3cd1d]:nth-child(9){transform:rotate(240deg);animation-delay:-.3s}.lds-spinner div[data-v-83c3cd1d]:nth-child(10){transform:rotate(270deg);animation-delay:-.2s}.lds-spinner div[data-v-83c3cd1d]:nth-child(11){transform:rotate(300deg);animation-delay:-.1s}.lds-spinner div[data-v-83c3cd1d]:nth-child(12){transform:rotate(330deg);animation-delay:0s}@keyframes lds-spinner-83c3cd1d{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-b482df18]{position:fixed;left:50%;bottom:20px;transform:translate(-50%);z-index:9999}')),document.head.appendChild(d)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}})();
|
|
2
|
-
import { computed as
|
|
2
|
+
import { computed as V, provide as U, inject as $, ref as p, watchEffect as le, onMounted as N, onBeforeUnmount as K, onBeforeMount as we, defineComponent as A, watch as F, resolveComponent as v, createBlock as L, openBlock as q, withKeys as z, unref as E, withModifiers as M, isRef as W, withCtx as g, createVNode as b, createTextVNode as B, toDisplayString as R, Transition as ke, createElementBlock as P, createCommentVNode as ee, normalizeStyle as ue, createElementVNode as k, Fragment as De, renderList as Ce, useTemplateRef as ce } from "vue";
|
|
3
3
|
import { useI18n as G } from "vue-i18n";
|
|
4
|
-
import { useTheme as se, useDisplay as
|
|
4
|
+
import { useTheme as se, useDisplay as Ve } from "vuetify";
|
|
5
5
|
import { useRouter as pe, useRoute as qe } from "vue-router";
|
|
6
6
|
import je from "axios";
|
|
7
|
-
import { a as T, m as
|
|
7
|
+
import { a as T, m as Se, u as Re } from "./vendor.waod39c6.js";
|
|
8
8
|
function Oe() {
|
|
9
|
-
const e = se(), t =
|
|
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"), s = V(() => e.current.value.dark ? "#303030" : "#f6f6f6"), n = V(() => e.current.value.dark ? "#ffffff1f" : "#0000001f");
|
|
10
10
|
return {
|
|
11
11
|
primaryColor: t,
|
|
12
12
|
secondaryColor: a,
|
|
@@ -57,9 +57,9 @@ const Dt = (function() {
|
|
|
57
57
|
i18n: null
|
|
58
58
|
}, console.log("globalObjects created")), window.globalObjects;
|
|
59
59
|
})(), u = (function() {
|
|
60
|
-
return window.eventBus || (window.eventBus =
|
|
60
|
+
return window.eventBus || (window.eventBus = Se(), console.log("eventBus created")), window.eventBus;
|
|
61
61
|
})();
|
|
62
|
-
async function
|
|
62
|
+
async function Ct(e) {
|
|
63
63
|
return new Promise((t) => {
|
|
64
64
|
setTimeout(t, e);
|
|
65
65
|
});
|
|
@@ -88,7 +88,7 @@ let Ee = 0;
|
|
|
88
88
|
function ae() {
|
|
89
89
|
return ++Ee;
|
|
90
90
|
}
|
|
91
|
-
async function
|
|
91
|
+
async function Vt(e) {
|
|
92
92
|
if (!te())
|
|
93
93
|
return;
|
|
94
94
|
let t = !1, a;
|
|
@@ -115,10 +115,10 @@ async function jt(e) {
|
|
|
115
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
|
-
function
|
|
118
|
+
function St(e) {
|
|
119
119
|
u.emit("waitDlg", { text: e });
|
|
120
120
|
}
|
|
121
|
-
function
|
|
121
|
+
function Rt() {
|
|
122
122
|
u.emit("closeWaitDlg");
|
|
123
123
|
}
|
|
124
124
|
function Ot(e, t) {
|
|
@@ -394,7 +394,7 @@ function Kt(e) {
|
|
|
394
394
|
e.value = [];
|
|
395
395
|
}
|
|
396
396
|
function Nt(e, t, a, o, l, r) {
|
|
397
|
-
const s = qe(), n = pe(), _ =
|
|
397
|
+
const s = qe(), n = pe(), _ = Re(), c = p(!1);
|
|
398
398
|
le(() => {
|
|
399
399
|
let f = !1;
|
|
400
400
|
typeof e.value == "boolean" ? f = e.value : f = _.value, c.value = f;
|
|
@@ -460,16 +460,19 @@ function Wt() {
|
|
|
460
460
|
return { verifyPermission: t };
|
|
461
461
|
}
|
|
462
462
|
function Xt() {
|
|
463
|
-
const e =
|
|
463
|
+
const e = V(() => !!window.cordova), t = Ve(), a = V(() => t.width.value <= 1280 ? t.width.value + "px" : t.width.value <= 1920 ? 1920 / 2.5 + "px" : 2560 / 2.5 + "px");
|
|
464
464
|
function o() {
|
|
465
465
|
return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
|
|
466
466
|
navigator.userAgent
|
|
467
467
|
);
|
|
468
468
|
}
|
|
469
|
-
|
|
469
|
+
function l() {
|
|
470
|
+
return !!t.xs.value;
|
|
471
|
+
}
|
|
472
|
+
return { sysBarAvail: e, compactWidth: a, isMobile: o, isCurvedScreen: l };
|
|
470
473
|
}
|
|
471
474
|
function J(e, t) {
|
|
472
|
-
const a = Ge(), o =
|
|
475
|
+
const a = Ge(), o = V({
|
|
473
476
|
get() {
|
|
474
477
|
return me(a, e);
|
|
475
478
|
},
|
|
@@ -502,13 +505,13 @@ const at = /* @__PURE__ */ A({
|
|
|
502
505
|
const w = v("v-card-text"), d = v("v-btn"), j = v("v-card-actions"), f = v("v-card"), m = v("v-dialog");
|
|
503
506
|
return q(), L(m, {
|
|
504
507
|
modelValue: E(D),
|
|
505
|
-
"onUpdate:modelValue": i[1] || (i[1] = (
|
|
508
|
+
"onUpdate:modelValue": i[1] || (i[1] = (C) => W(D) ? D.value = C : null),
|
|
506
509
|
attach: "",
|
|
507
510
|
"max-width": "600px",
|
|
508
511
|
transition: "dialog-top-transition",
|
|
509
512
|
onKeydown: [
|
|
510
513
|
z(M(y, ["stop", "prevent"]), ["enter"]),
|
|
511
|
-
i[2] || (i[2] = z(M((
|
|
514
|
+
i[2] || (i[2] = z(M((C) => D.value = !1, ["stop", "prevent"]), ["esc"]))
|
|
512
515
|
]
|
|
513
516
|
}, {
|
|
514
517
|
default: g(() => [
|
|
@@ -516,7 +519,7 @@ const at = /* @__PURE__ */ A({
|
|
|
516
519
|
default: g(() => [
|
|
517
520
|
b(w, null, {
|
|
518
521
|
default: g(() => [
|
|
519
|
-
B(
|
|
522
|
+
B(R(o.value), 1)
|
|
520
523
|
]),
|
|
521
524
|
_: 1
|
|
522
525
|
}),
|
|
@@ -525,10 +528,10 @@ const at = /* @__PURE__ */ A({
|
|
|
525
528
|
b(d, {
|
|
526
529
|
color: l.value,
|
|
527
530
|
variant: "text",
|
|
528
|
-
onClick: i[0] || (i[0] = (
|
|
531
|
+
onClick: i[0] || (i[0] = (C) => D.value = !1)
|
|
529
532
|
}, {
|
|
530
533
|
default: g(() => [
|
|
531
|
-
B(
|
|
534
|
+
B(R(r.value), 1)
|
|
532
535
|
]),
|
|
533
536
|
_: 1
|
|
534
537
|
}, 8, ["color"]),
|
|
@@ -538,7 +541,7 @@ const at = /* @__PURE__ */ A({
|
|
|
538
541
|
onClick: y
|
|
539
542
|
}, {
|
|
540
543
|
default: g(() => [
|
|
541
|
-
B(
|
|
544
|
+
B(R(n.value), 1)
|
|
542
545
|
]),
|
|
543
546
|
_: 1
|
|
544
547
|
}, 8, ["color"])
|
|
@@ -560,7 +563,7 @@ const at = /* @__PURE__ */ A({
|
|
|
560
563
|
zIndex: { default: 1 }
|
|
561
564
|
},
|
|
562
565
|
setup(e) {
|
|
563
|
-
const { backgroundColor2: t } = Oe(), a =
|
|
566
|
+
const { backgroundColor2: t } = Oe(), a = V(() => ({
|
|
564
567
|
background: t.value,
|
|
565
568
|
zIndex: e.zIndex
|
|
566
569
|
}));
|
|
@@ -606,10 +609,10 @@ const at = /* @__PURE__ */ A({
|
|
|
606
609
|
},
|
|
607
610
|
emits: ["timeout"],
|
|
608
611
|
setup(e, { emit: t }) {
|
|
609
|
-
const a =
|
|
612
|
+
const a = V(() => ({
|
|
610
613
|
width: "calc(100% - 64px)",
|
|
611
614
|
overflowWrap: "break-word"
|
|
612
|
-
})), o =
|
|
615
|
+
})), o = V(() => {
|
|
613
616
|
switch (e.type) {
|
|
614
617
|
case "success":
|
|
615
618
|
return "mdi-check-circle";
|
|
@@ -644,7 +647,7 @@ const at = /* @__PURE__ */ A({
|
|
|
644
647
|
}, null, 8, ["icon"])) : ee("", !0),
|
|
645
648
|
k("div", {
|
|
646
649
|
style: ue(a.value)
|
|
647
|
-
},
|
|
650
|
+
}, R(e.text), 5),
|
|
648
651
|
b(_, {
|
|
649
652
|
class: "mx-1",
|
|
650
653
|
icon: "mdi-close",
|
|
@@ -683,7 +686,7 @@ const at = /* @__PURE__ */ A({
|
|
|
683
686
|
onClick: _[0] || (_[0] = M(() => {
|
|
684
687
|
}, ["stop"]))
|
|
685
688
|
}, [
|
|
686
|
-
(q(!0), P(De, null,
|
|
689
|
+
(q(!0), P(De, null, Ce(t.value, (c) => (q(), L(rt, {
|
|
687
690
|
id: c.id,
|
|
688
691
|
key: c.id,
|
|
689
692
|
text: c.text,
|
|
@@ -706,21 +709,21 @@ const at = /* @__PURE__ */ A({
|
|
|
706
709
|
return F(y, (w) => {
|
|
707
710
|
!w && !c && (u.emit(`numberDlgResult${_}`, void 0), c = !0);
|
|
708
711
|
}), (w, d) => {
|
|
709
|
-
const j = v("v-number-input"), f = v("v-btn"), m = v("v-card-actions"),
|
|
712
|
+
const j = v("v-number-input"), f = v("v-btn"), m = v("v-card-actions"), C = v("v-form"), Q = v("v-card"), Y = v("v-dialog");
|
|
710
713
|
return q(), L(Y, {
|
|
711
714
|
modelValue: E(y),
|
|
712
|
-
"onUpdate:modelValue": d[3] || (d[3] = (
|
|
715
|
+
"onUpdate:modelValue": d[3] || (d[3] = (S) => W(y) ? y.value = S : null),
|
|
713
716
|
attach: "",
|
|
714
717
|
"max-width": "600px",
|
|
715
718
|
transition: "dialog-top-transition",
|
|
716
|
-
onKeydown: d[4] || (d[4] = z(M((
|
|
719
|
+
onKeydown: d[4] || (d[4] = z(M((S) => y.value = !1, ["stop", "prevent"]), ["esc"]))
|
|
717
720
|
}, {
|
|
718
721
|
default: g(() => [
|
|
719
722
|
b(Q, { title: a.value }, {
|
|
720
723
|
default: g(() => [
|
|
721
|
-
b(
|
|
724
|
+
b(C, {
|
|
722
725
|
modelValue: h.value,
|
|
723
|
-
"onUpdate:modelValue": d[2] || (d[2] = (
|
|
726
|
+
"onUpdate:modelValue": d[2] || (d[2] = (S) => h.value = S),
|
|
724
727
|
class: "mx-3",
|
|
725
728
|
onSubmit: M(i, ["prevent"])
|
|
726
729
|
}, {
|
|
@@ -729,7 +732,7 @@ const at = /* @__PURE__ */ A({
|
|
|
729
732
|
ref_key: "target",
|
|
730
733
|
ref: x,
|
|
731
734
|
modelValue: o.value,
|
|
732
|
-
"onUpdate:modelValue": d[0] || (d[0] = (
|
|
735
|
+
"onUpdate:modelValue": d[0] || (d[0] = (S) => o.value = S),
|
|
733
736
|
"control-variant": "stacked",
|
|
734
737
|
max: s.value,
|
|
735
738
|
min: r.value,
|
|
@@ -741,10 +744,10 @@ const at = /* @__PURE__ */ A({
|
|
|
741
744
|
b(f, {
|
|
742
745
|
color: "primary",
|
|
743
746
|
variant: "text",
|
|
744
|
-
onClick: d[1] || (d[1] = (
|
|
747
|
+
onClick: d[1] || (d[1] = (S) => y.value = !1)
|
|
745
748
|
}, {
|
|
746
749
|
default: g(() => [
|
|
747
|
-
B(
|
|
750
|
+
B(R(E(t)("dlg.common.cancel")), 1)
|
|
748
751
|
]),
|
|
749
752
|
_: 1
|
|
750
753
|
}),
|
|
@@ -755,7 +758,7 @@ const at = /* @__PURE__ */ A({
|
|
|
755
758
|
variant: "text"
|
|
756
759
|
}, {
|
|
757
760
|
default: g(() => [
|
|
758
|
-
B(
|
|
761
|
+
B(R(E(t)("dlg.common.confirm")), 1)
|
|
759
762
|
]),
|
|
760
763
|
_: 1
|
|
761
764
|
}, 8, ["disabled"])
|
|
@@ -785,28 +788,28 @@ const at = /* @__PURE__ */ A({
|
|
|
785
788
|
};
|
|
786
789
|
return F(d, (m) => {
|
|
787
790
|
!m && !h && (u.emit("promptDlgResult" + y, void 0), h = !0);
|
|
788
|
-
}), (m,
|
|
789
|
-
const Q = v("v-card-text"), Y = v("v-text-field"),
|
|
791
|
+
}), (m, C) => {
|
|
792
|
+
const Q = v("v-card-text"), Y = v("v-text-field"), S = v("v-btn"), be = v("v-card-actions"), ye = v("v-form"), xe = v("v-card"), he = v("v-dialog");
|
|
790
793
|
return q(), L(he, {
|
|
791
794
|
modelValue: E(d),
|
|
792
|
-
"onUpdate:modelValue":
|
|
795
|
+
"onUpdate:modelValue": C[3] || (C[3] = (I) => W(d) ? d.value = I : null),
|
|
793
796
|
attach: "",
|
|
794
797
|
"max-width": "600px",
|
|
795
798
|
transition: "dialog-top-transition",
|
|
796
|
-
onKeydown:
|
|
799
|
+
onKeydown: C[4] || (C[4] = z(M((I) => d.value = !1, ["stop", "prevent"]), ["esc"]))
|
|
797
800
|
}, {
|
|
798
801
|
default: g(() => [
|
|
799
802
|
b(xe, { title: a.value }, {
|
|
800
803
|
default: g(() => [
|
|
801
804
|
o.value ? (q(), L(Q, { key: 0 }, {
|
|
802
805
|
default: g(() => [
|
|
803
|
-
B(
|
|
806
|
+
B(R(o.value), 1)
|
|
804
807
|
]),
|
|
805
808
|
_: 1
|
|
806
809
|
})) : ee("", !0),
|
|
807
810
|
b(ye, {
|
|
808
811
|
modelValue: j.value,
|
|
809
|
-
"onUpdate:modelValue":
|
|
812
|
+
"onUpdate:modelValue": C[2] || (C[2] = (I) => j.value = I),
|
|
810
813
|
class: "mx-3",
|
|
811
814
|
onSubmit: M(f, ["prevent"])
|
|
812
815
|
}, {
|
|
@@ -815,31 +818,31 @@ const at = /* @__PURE__ */ A({
|
|
|
815
818
|
ref_key: "target",
|
|
816
819
|
ref: i,
|
|
817
820
|
modelValue: n.value,
|
|
818
|
-
"onUpdate:modelValue":
|
|
821
|
+
"onUpdate:modelValue": C[0] || (C[0] = (I) => n.value = I),
|
|
819
822
|
label: l.value,
|
|
820
823
|
placeholder: r.value,
|
|
821
824
|
rules: s.value
|
|
822
825
|
}, null, 8, ["modelValue", "label", "placeholder", "rules"]),
|
|
823
826
|
b(be, { class: "d-flex justify-end" }, {
|
|
824
827
|
default: g(() => [
|
|
825
|
-
b(
|
|
828
|
+
b(S, {
|
|
826
829
|
color: _.value,
|
|
827
830
|
variant: "text",
|
|
828
|
-
onClick:
|
|
831
|
+
onClick: C[1] || (C[1] = (I) => d.value = !1)
|
|
829
832
|
}, {
|
|
830
833
|
default: g(() => [
|
|
831
|
-
B(
|
|
834
|
+
B(R(c.value), 1)
|
|
832
835
|
]),
|
|
833
836
|
_: 1
|
|
834
837
|
}, 8, ["color"]),
|
|
835
|
-
b(
|
|
838
|
+
b(S, {
|
|
836
839
|
color: x.value,
|
|
837
840
|
disabled: !j.value,
|
|
838
841
|
type: "submit",
|
|
839
842
|
variant: "text"
|
|
840
843
|
}, {
|
|
841
844
|
default: g(() => [
|
|
842
|
-
B(
|
|
845
|
+
B(R(D.value), 1)
|
|
843
846
|
]),
|
|
844
847
|
_: 1
|
|
845
848
|
}, 8, ["color", "disabled"])
|
|
@@ -889,7 +892,7 @@ const at = /* @__PURE__ */ A({
|
|
|
889
892
|
}, {
|
|
890
893
|
default: g(() => [
|
|
891
894
|
k("div", dt, [
|
|
892
|
-
k("span", it,
|
|
895
|
+
k("span", it, R(a.value), 1)
|
|
893
896
|
])
|
|
894
897
|
]),
|
|
895
898
|
_: 1
|
|
@@ -917,7 +920,7 @@ export {
|
|
|
917
920
|
Pe as addView,
|
|
918
921
|
Ae as appAppear,
|
|
919
922
|
Kt as clearViews,
|
|
920
|
-
|
|
923
|
+
Rt as closeWaitDlg,
|
|
921
924
|
kt as createAxios,
|
|
922
925
|
Ht as default,
|
|
923
926
|
et as delView,
|
|
@@ -940,10 +943,10 @@ export {
|
|
|
940
943
|
Lt as messageSuccess,
|
|
941
944
|
Bt as messageWarning,
|
|
942
945
|
Ut as onBeforeEach,
|
|
943
|
-
|
|
946
|
+
Vt as openConfirmDlg,
|
|
944
947
|
qt as openNumberDlg,
|
|
945
948
|
jt as openPromptDlg,
|
|
946
|
-
|
|
949
|
+
St as openWaitDlg,
|
|
947
950
|
tt as popView,
|
|
948
951
|
Ke as provideDark,
|
|
949
952
|
He as provideLastAppPath,
|
|
@@ -958,6 +961,6 @@ export {
|
|
|
958
961
|
Xt as useSystem,
|
|
959
962
|
J as useViewStack,
|
|
960
963
|
$e as verifyPermission,
|
|
961
|
-
|
|
964
|
+
Ct as waitMs,
|
|
962
965
|
X as waitUtil
|
|
963
966
|
};
|