x-essential-lib 0.1.13 → 0.1.14
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 +34 -34
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode('.inner-left-enter-active,.inner-right-enter-active{transition:transform .35s ease}.inner-left-enter-from{transform:translate(-100%)}.inner-right-enter-from{transform:translate(100%)}.inner-left-enter-to,.inner-right-enter-to{transform:translate(0)}.x-cont[data-v-a8f3d91f]{position:absolute;top:0;left:0;bottom:0;right:0;display:flex;align-items:center;justify-content:center}.lds-spinner[data-v-a8f3d91f]{color:official;display:inline-block;position:relative;width:40px;height:40px}.lds-spinner div[data-v-a8f3d91f]{transform-origin:20px 20px;animation:lds-spinner-a8f3d91f 1.2s linear infinite}.lds-spinner div[data-v-a8f3d91f]:after{content:" ";display:block;position:absolute;top:3px;left:18px;width:2px;height:6px;border-radius:5%;background:#9e9e9e}.lds-spinner div[data-v-a8f3d91f]:nth-child(1){transform:rotate(0);animation-delay:-1.1s}.lds-spinner div[data-v-a8f3d91f]:nth-child(2){transform:rotate(30deg);animation-delay:-1s}.lds-spinner div[data-v-a8f3d91f]:nth-child(3){transform:rotate(60deg);animation-delay:-.9s}.lds-spinner div[data-v-a8f3d91f]:nth-child(4){transform:rotate(90deg);animation-delay:-.8s}.lds-spinner div[data-v-a8f3d91f]:nth-child(5){transform:rotate(120deg);animation-delay:-.7s}.lds-spinner div[data-v-a8f3d91f]:nth-child(6){transform:rotate(150deg);animation-delay:-.6s}.lds-spinner div[data-v-a8f3d91f]:nth-child(7){transform:rotate(180deg);animation-delay:-.5s}.lds-spinner div[data-v-a8f3d91f]:nth-child(8){transform:rotate(210deg);animation-delay:-.4s}.lds-spinner div[data-v-a8f3d91f]:nth-child(9){transform:rotate(240deg);animation-delay:-.3s}.lds-spinner div[data-v-a8f3d91f]:nth-child(10){transform:rotate(270deg);animation-delay:-.2s}.lds-spinner div[data-v-a8f3d91f]:nth-child(11){transform:rotate(300deg);animation-delay:-.1s}.lds-spinner div[data-v-a8f3d91f]:nth-child(12){transform:rotate(330deg);animation-delay:0s}@keyframes lds-spinner-a8f3d91f{0%{opacity:1}to{opacity:0}}.x-cont[data-v-70ed4b89]{position:absolute;left:50%;bottom:20px;transform:translate(-50%);z-index:9999}')),document.head.appendChild(t)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}})();
|
|
2
2
|
import { VBtn as ce, VCard as ie, VCardActions as ue, VCardText as de, VCardTitle as pe, VDialog as fe, VForm as me, VTextField as ve } from "vuetify/lib/components/index.mjs";
|
|
3
|
-
import { defineComponent as S, useModel as K, ref as _, computed as d, onMounted as
|
|
3
|
+
import { defineComponent as S, useModel as K, ref as _, computed as d, onMounted as R, onBeforeUnmount as N, watch as L, resolveComponent as m, openBlock as V, createBlock as B, withKeys as E, withModifiers as $, withCtx as v, createVNode as h, createTextVNode as C, toDisplayString as k, createElementBlock as j, normalizeStyle as ge, pushScopeId as _e, popScopeId as he, createElementVNode as g, reactive as xe, Fragment as ye, renderList as we, unref as ke } from "vue";
|
|
4
4
|
import { useLocale as z, useTheme as F, useDisplay as Ce } from "vuetify/lib/framework.mjs";
|
|
5
5
|
function Ve(e) {
|
|
6
6
|
return { all: e = e || /* @__PURE__ */ new Map(), on: function(o, t) {
|
|
@@ -55,27 +55,27 @@ const be = /* @__PURE__ */ S({
|
|
|
55
55
|
return ((u = a.value) == null ? void 0 : u.text) ?? o.t("confirm");
|
|
56
56
|
});
|
|
57
57
|
let T = 0, D = !1;
|
|
58
|
-
const
|
|
58
|
+
const A = (u) => {
|
|
59
59
|
n.value = u.title, l.value = u.text, r.value = u.cancel, a.value = u.confirm, T = u.seq, D = !1, t.value = !0;
|
|
60
60
|
};
|
|
61
|
-
|
|
62
|
-
i.on("confirmDlg",
|
|
61
|
+
R(() => {
|
|
62
|
+
i.on("confirmDlg", A);
|
|
63
63
|
}), N(() => {
|
|
64
|
-
i.off("confirmDlg",
|
|
64
|
+
i.off("confirmDlg", A);
|
|
65
65
|
});
|
|
66
|
-
const
|
|
66
|
+
const O = () => {
|
|
67
67
|
t.value = !1, D || (i.emit("confirmDlgResult" + T, !0), D = !0);
|
|
68
68
|
};
|
|
69
69
|
return L(t, (u) => {
|
|
70
70
|
!u && !D && (i.emit("confirmDlgResult" + T, !1), D = !0);
|
|
71
71
|
}), (u, y) => {
|
|
72
72
|
const q = m("v-card-title"), W = m("v-card-text"), I = m("v-btn"), c = m("v-card-actions"), x = m("v-card"), U = m("v-dialog");
|
|
73
|
-
return V(),
|
|
73
|
+
return V(), B(U, {
|
|
74
74
|
modelValue: t.value,
|
|
75
75
|
"onUpdate:modelValue": y[1] || (y[1] = (M) => t.value = M),
|
|
76
76
|
onKeydown: [
|
|
77
|
-
y[2] || (y[2] = E(
|
|
78
|
-
E(
|
|
77
|
+
y[2] || (y[2] = E($((M) => t.value = !1, ["stop", "prevent"]), ["esc"])),
|
|
78
|
+
E($(O, ["stop", "prevent"]), ["enter"])
|
|
79
79
|
],
|
|
80
80
|
transition: "dialog-top-transition",
|
|
81
81
|
"max-width": "600px"
|
|
@@ -108,7 +108,7 @@ const be = /* @__PURE__ */ S({
|
|
|
108
108
|
_: 1
|
|
109
109
|
}, 8, ["color"]),
|
|
110
110
|
h(I, {
|
|
111
|
-
onClick:
|
|
111
|
+
onClick: O,
|
|
112
112
|
color: p.value,
|
|
113
113
|
variant: "text"
|
|
114
114
|
}, {
|
|
@@ -206,7 +206,7 @@ const be = /* @__PURE__ */ S({
|
|
|
206
206
|
}
|
|
207
207
|
return a;
|
|
208
208
|
});
|
|
209
|
-
return
|
|
209
|
+
return R(() => {
|
|
210
210
|
setTimeout(() => {
|
|
211
211
|
l("timeout", t.id);
|
|
212
212
|
}, t.timeout);
|
|
@@ -214,7 +214,7 @@ const be = /* @__PURE__ */ S({
|
|
|
214
214
|
a || l("timeout", t.id);
|
|
215
215
|
}), (a, s) => {
|
|
216
216
|
const f = m("v-alert");
|
|
217
|
-
return V(),
|
|
217
|
+
return V(), B(f, {
|
|
218
218
|
modelValue: n.value,
|
|
219
219
|
"onUpdate:modelValue": s[0] || (s[0] = (p) => n.value = p),
|
|
220
220
|
class: "mt-2",
|
|
@@ -233,7 +233,7 @@ const be = /* @__PURE__ */ S({
|
|
|
233
233
|
__name: "index",
|
|
234
234
|
setup(e) {
|
|
235
235
|
const o = xe({ items: [] });
|
|
236
|
-
|
|
236
|
+
R(() => {
|
|
237
237
|
i.on("message", t);
|
|
238
238
|
}), N(() => {
|
|
239
239
|
i.off("message", t);
|
|
@@ -252,11 +252,11 @@ const be = /* @__PURE__ */ S({
|
|
|
252
252
|
f >= 0 && o.items.splice(f, 1);
|
|
253
253
|
};
|
|
254
254
|
return (s, f) => (V(), j("div", {
|
|
255
|
-
onClick: f[0] || (f[0] =
|
|
255
|
+
onClick: f[0] || (f[0] = $(() => {
|
|
256
256
|
}, ["stop"])),
|
|
257
257
|
class: "x-cont d-flex flex-column-reverse align-center"
|
|
258
258
|
}, [
|
|
259
|
-
(V(!0), j(ye, null, we(o.items, (p) => (V(),
|
|
259
|
+
(V(!0), j(ye, null, we(o.items, (p) => (V(), B(Me, {
|
|
260
260
|
onTimeout: n,
|
|
261
261
|
id: p.id,
|
|
262
262
|
type: p.type,
|
|
@@ -266,7 +266,7 @@ const be = /* @__PURE__ */ S({
|
|
|
266
266
|
}, null, 8, ["id", "type", "text", "timeout"]))), 128))
|
|
267
267
|
]));
|
|
268
268
|
}
|
|
269
|
-
}),
|
|
269
|
+
}), $e = /* @__PURE__ */ Y(Pe, [["__scopeId", "data-v-70ed4b89"]]), Re = /* @__PURE__ */ S({
|
|
270
270
|
__name: "index",
|
|
271
271
|
props: {
|
|
272
272
|
modelValue: { type: Boolean },
|
|
@@ -280,10 +280,10 @@ const be = /* @__PURE__ */ S({
|
|
|
280
280
|
}), D = d(() => {
|
|
281
281
|
var c;
|
|
282
282
|
return ((c = p.value) == null ? void 0 : c.text) ?? o.t("cancel");
|
|
283
|
-
}),
|
|
283
|
+
}), A = d(() => {
|
|
284
284
|
var c;
|
|
285
285
|
return ((c = b.value) == null ? void 0 : c.color) ?? "primary";
|
|
286
|
-
}),
|
|
286
|
+
}), O = d(() => {
|
|
287
287
|
var c;
|
|
288
288
|
return ((c = b.value) == null ? void 0 : c.text) ?? o.t("confirm");
|
|
289
289
|
}), u = _();
|
|
@@ -292,7 +292,7 @@ const be = /* @__PURE__ */ S({
|
|
|
292
292
|
var x;
|
|
293
293
|
n.value = c.title, l.value = c.text, r.value = c.label, a.value = c.placeholder, s.value = c.rules, f.value = c.value, p.value = c.cancel, b.value = c.confirm, y = c.seq, q = !1, t.value = !0, await H(() => u.value !== void 0, 1e3), (x = u.value) == null || x.focus();
|
|
294
294
|
};
|
|
295
|
-
|
|
295
|
+
R(() => {
|
|
296
296
|
i.on("promptDlg", W);
|
|
297
297
|
}), N(() => {
|
|
298
298
|
i.off("promptDlg", W);
|
|
@@ -304,12 +304,12 @@ const be = /* @__PURE__ */ S({
|
|
|
304
304
|
!c && !q && (i.emit("promptDlgResult" + y, void 0), q = !0);
|
|
305
305
|
}), (c, x) => {
|
|
306
306
|
const U = m("v-card-title"), M = m("v-card-text"), ne = m("v-text-field"), le = m("v-form"), X = m("v-btn"), ae = m("v-card-actions"), re = m("v-card"), se = m("v-dialog");
|
|
307
|
-
return V(),
|
|
307
|
+
return V(), B(se, {
|
|
308
308
|
modelValue: t.value,
|
|
309
309
|
"onUpdate:modelValue": x[2] || (x[2] = (P) => t.value = P),
|
|
310
310
|
onKeydown: [
|
|
311
|
-
x[3] || (x[3] = E(
|
|
312
|
-
E(
|
|
311
|
+
x[3] || (x[3] = E($((P) => t.value = !1, ["stop", "prevent"]), ["esc"])),
|
|
312
|
+
E($(I, ["stop", "prevent"]), ["enter"])
|
|
313
313
|
],
|
|
314
314
|
transition: "dialog-top-transition",
|
|
315
315
|
"max-width": "600px"
|
|
@@ -357,11 +357,11 @@ const be = /* @__PURE__ */ S({
|
|
|
357
357
|
}, 8, ["color"]),
|
|
358
358
|
h(X, {
|
|
359
359
|
onClick: I,
|
|
360
|
-
color:
|
|
360
|
+
color: A.value,
|
|
361
361
|
variant: "text"
|
|
362
362
|
}, {
|
|
363
363
|
default: v(() => [
|
|
364
|
-
C(k(
|
|
364
|
+
C(k(O.value), 1)
|
|
365
365
|
]),
|
|
366
366
|
_: 1
|
|
367
367
|
}, 8, ["color"])
|
|
@@ -376,7 +376,7 @@ const be = /* @__PURE__ */ S({
|
|
|
376
376
|
}, 8, ["modelValue", "onKeydown"]);
|
|
377
377
|
};
|
|
378
378
|
}
|
|
379
|
-
}),
|
|
379
|
+
}), Be = { class: "mx-auto my-auto" }, Ae = { class: "d-flex align-center justify-center w-100 h-100" }, Oe = /* @__PURE__ */ S({
|
|
380
380
|
__name: "index",
|
|
381
381
|
props: {
|
|
382
382
|
modelValue: { type: Boolean },
|
|
@@ -389,13 +389,13 @@ const be = /* @__PURE__ */ S({
|
|
|
389
389
|
}, l = () => {
|
|
390
390
|
t.value = !1;
|
|
391
391
|
};
|
|
392
|
-
return
|
|
392
|
+
return R(() => {
|
|
393
393
|
i.on("openWaitDlg", n), i.on("closeWaitDlg", l);
|
|
394
394
|
}), N(() => {
|
|
395
395
|
i.off("openWaitDlg", n), i.off("closeWaitDlg", l);
|
|
396
396
|
}), (r, a) => {
|
|
397
397
|
const s = m("v-card"), f = m("v-dialog");
|
|
398
|
-
return V(),
|
|
398
|
+
return V(), B(f, {
|
|
399
399
|
modelValue: t.value,
|
|
400
400
|
"onUpdate:modelValue": a[0] || (a[0] = (p) => t.value = p),
|
|
401
401
|
persistent: "",
|
|
@@ -403,14 +403,14 @@ const be = /* @__PURE__ */ S({
|
|
|
403
403
|
fullscreen: ""
|
|
404
404
|
}, {
|
|
405
405
|
default: v(() => [
|
|
406
|
-
g("div",
|
|
406
|
+
g("div", Be, [
|
|
407
407
|
h(s, {
|
|
408
408
|
width: "300px",
|
|
409
409
|
height: "80px",
|
|
410
410
|
loading: ""
|
|
411
411
|
}, {
|
|
412
412
|
default: v(() => [
|
|
413
|
-
g("div",
|
|
413
|
+
g("div", Ae, [
|
|
414
414
|
g("span", null, k(ke(o).t("waitingResponse")), 1)
|
|
415
415
|
])
|
|
416
416
|
]),
|
|
@@ -537,10 +537,10 @@ function J(e) {
|
|
|
537
537
|
}
|
|
538
538
|
const Q = _("");
|
|
539
539
|
function w(e, o) {
|
|
540
|
-
const t = J(e), n = J(o);
|
|
541
|
-
console.info(
|
|
542
|
-
|
|
543
|
-
l ? r ? Q.value = "" : Q.value = a ? "inner-left" : "inner-right" : window.routeExtras = { forward: a };
|
|
540
|
+
const t = J(e), n = J(o), l = t.app === n.app, r = t.path === n.path, a = t.level >= n.level;
|
|
541
|
+
console.info(
|
|
542
|
+
`~~~~before route change~~~~ ${n.path} -> ${t.path} inner=${l} forward=${a}`
|
|
543
|
+
), l ? r ? Q.value = "" : Q.value = a ? "inner-left" : "inner-right" : window.routeExtras = { forward: a };
|
|
544
544
|
}
|
|
545
545
|
function Ne() {
|
|
546
546
|
return !!te.get("accessToken");
|
|
@@ -589,7 +589,7 @@ function lt(e, o, t) {
|
|
|
589
589
|
w(e.path, o.path), t();
|
|
590
590
|
}
|
|
591
591
|
const je = (e) => {
|
|
592
|
-
e.component("v-btn", ce), e.component("v-card", ie), e.component("v-card-actions", ue), e.component("v-card-text", de), e.component("v-card-title", pe), e.component("v-dialog", fe), e.component("v-form", me), e.component("v-text-field", ve), e.component("x-confirm-dlg", be), e.component("x-loading", Ie), e.component("x-message",
|
|
592
|
+
e.component("v-btn", ce), e.component("v-card", ie), e.component("v-card-actions", ue), e.component("v-card-text", de), e.component("v-card-title", pe), e.component("v-dialog", fe), e.component("v-form", me), e.component("v-text-field", ve), e.component("x-confirm-dlg", be), e.component("x-loading", Ie), e.component("x-message", $e), e.component("x-prompt-dlg", Re), e.component("x-wait-dlg", Oe);
|
|
593
593
|
}, at = { install: je };
|
|
594
594
|
export {
|
|
595
595
|
nt as appAppear,
|