x-essential-lib 0.1.2 → 0.1.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/index.d.ts +19 -2
- package/dist/index.js +325 -274
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DefineComponent } from 'vue'
|
|
1
|
+
import { DefineComponent, ComputedRef, Ref } from 'vue'
|
|
2
2
|
|
|
3
3
|
export declare const XConfirmDlg: DefineComponent<
|
|
4
4
|
{
|
|
@@ -7,7 +7,7 @@ export declare const XConfirmDlg: DefineComponent<
|
|
|
7
7
|
required: true
|
|
8
8
|
}
|
|
9
9
|
},
|
|
10
|
-
|
|
10
|
+
{
|
|
11
11
|
'update:modelValue'(value: boolean): void
|
|
12
12
|
},
|
|
13
13
|
unknown
|
|
@@ -41,6 +41,23 @@ export declare const XPromptDlg: DefineComponent<
|
|
|
41
41
|
|
|
42
42
|
export declare const XMessage: DefineComponent<{}, {}, unknown>
|
|
43
43
|
|
|
44
|
+
export declare function useColor(): {
|
|
45
|
+
primaryColor: ComputedRef<string>
|
|
46
|
+
secondaryColor: ComputedRef<string>
|
|
47
|
+
backgroundColor0: ComputedRef<string>
|
|
48
|
+
backgroundColor1: ComputedRef<string>
|
|
49
|
+
backgroundColor2: ComputedRef<string>
|
|
50
|
+
highlightColor: ComputedRef<string>
|
|
51
|
+
borderColor: ComputedRef<string>
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export declare function useSystem(): {
|
|
55
|
+
dark: ComputedRef<boolean>
|
|
56
|
+
routeTransName: Ref<string>
|
|
57
|
+
sysBarAvail: ComputedRef<boolean>
|
|
58
|
+
compactWidth: ComputedRef<string>
|
|
59
|
+
}
|
|
60
|
+
|
|
44
61
|
export declare function waitMs(ms: number): Promise<void>
|
|
45
62
|
|
|
46
63
|
export declare function waitUtil(
|
package/dist/index.js
CHANGED
|
@@ -1,138 +1,171 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode('.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(a)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
2
|
-
import { getCurrentInstance as
|
|
3
|
-
function
|
|
4
|
-
return { all:
|
|
5
|
-
var o =
|
|
6
|
-
o ? o.push(
|
|
7
|
-
}, off: function(n,
|
|
8
|
-
var o =
|
|
9
|
-
o && (
|
|
10
|
-
}, emit: function(n,
|
|
11
|
-
var o =
|
|
2
|
+
import { getCurrentInstance as ae, inject as A, computed as d, defineComponent as I, useModel as H, ref as g, onMounted as W, onBeforeUnmount as U, watch as O, resolveComponent as p, openBlock as k, createBlock as M, withKeys as L, withModifiers as R, withCtx as v, createVNode as y, createTextVNode as h, toDisplayString as b, createElementBlock as z, normalizeStyle as se, pushScopeId as ue, popScopeId as ce, createElementVNode as _, reactive as ie, Fragment as de, renderList as fe, unref as me } from "vue";
|
|
3
|
+
function pe(e) {
|
|
4
|
+
return { all: e = e || /* @__PURE__ */ new Map(), on: function(n, t) {
|
|
5
|
+
var o = e.get(n);
|
|
6
|
+
o ? o.push(t) : e.set(n, [t]);
|
|
7
|
+
}, off: function(n, t) {
|
|
8
|
+
var o = e.get(n);
|
|
9
|
+
o && (t ? o.splice(o.indexOf(t) >>> 0, 1) : e.set(n, []));
|
|
10
|
+
}, emit: function(n, t) {
|
|
11
|
+
var o = e.get(n);
|
|
12
12
|
o && o.slice().map(function(l) {
|
|
13
|
-
l(
|
|
14
|
-
}), (o =
|
|
15
|
-
l(n,
|
|
13
|
+
l(t);
|
|
14
|
+
}), (o = e.get("*")) && o.slice().map(function(l) {
|
|
15
|
+
l(n, t);
|
|
16
16
|
});
|
|
17
17
|
} };
|
|
18
18
|
}
|
|
19
|
-
const
|
|
20
|
-
async function
|
|
19
|
+
const a = pe();
|
|
20
|
+
async function Te(e) {
|
|
21
21
|
return new Promise((n) => {
|
|
22
|
-
setTimeout(n,
|
|
22
|
+
setTimeout(n, e);
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
|
-
async function X(
|
|
25
|
+
async function X(e, n, t) {
|
|
26
26
|
const o = Date.now();
|
|
27
27
|
return new Promise((l) => {
|
|
28
|
-
const
|
|
29
|
-
|
|
28
|
+
const s = async () => {
|
|
29
|
+
e() ? l(!0) : n && Date.now() - o > n ? l(!1) : setTimeout(s, t ?? 30);
|
|
30
30
|
};
|
|
31
|
-
|
|
31
|
+
s();
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
|
-
function
|
|
35
|
-
|
|
36
|
-
if (
|
|
37
|
-
|
|
38
|
-
|
|
34
|
+
function B() {
|
|
35
|
+
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
|
|
36
|
+
if (B.cache.has(e))
|
|
37
|
+
return B.cache.get(e);
|
|
38
|
+
const n = e.replace(/[^a-z]/gi, "-").replace(/\B([A-Z])/g, "-$1").toLowerCase();
|
|
39
|
+
return B.cache.set(e, n), n;
|
|
39
40
|
}
|
|
40
|
-
|
|
41
|
-
function
|
|
42
|
-
const t =
|
|
41
|
+
B.cache = /* @__PURE__ */ new Map();
|
|
42
|
+
function J(e, n) {
|
|
43
|
+
const t = ae();
|
|
43
44
|
if (!t)
|
|
44
|
-
throw new Error(
|
|
45
|
+
throw new Error(`[Vuetify] ${e} must be called from inside a setup function`);
|
|
45
46
|
return t;
|
|
46
47
|
}
|
|
47
|
-
const pe = Symbol.for("vuetify:theme");
|
|
48
48
|
function ve() {
|
|
49
|
-
|
|
50
|
-
const
|
|
49
|
+
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "composables";
|
|
50
|
+
const n = J(e).type;
|
|
51
|
+
return B((n == null ? void 0 : n.aliasName) || (n == null ? void 0 : n.name));
|
|
52
|
+
}
|
|
53
|
+
const _e = Symbol.for("vuetify:locale");
|
|
54
|
+
function P() {
|
|
55
|
+
const e = A(_e);
|
|
56
|
+
if (!e)
|
|
57
|
+
throw new Error("[Vuetify] Could not find injected locale instance");
|
|
58
|
+
return e;
|
|
59
|
+
}
|
|
60
|
+
const ge = Symbol.for("vuetify:display");
|
|
61
|
+
function ye() {
|
|
62
|
+
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ve();
|
|
63
|
+
const t = A(ge);
|
|
51
64
|
if (!t)
|
|
65
|
+
throw new Error("Could not find Vuetify display injection");
|
|
66
|
+
const o = d(() => {
|
|
67
|
+
if (!e.mobileBreakpoint)
|
|
68
|
+
return t.mobile.value;
|
|
69
|
+
const s = typeof e.mobileBreakpoint == "number" ? e.mobileBreakpoint : t.thresholds.value[e.mobileBreakpoint];
|
|
70
|
+
return t.width.value < s;
|
|
71
|
+
}), l = d(() => n ? {
|
|
72
|
+
[`${n}--mobile`]: o.value
|
|
73
|
+
} : {});
|
|
74
|
+
return {
|
|
75
|
+
...t,
|
|
76
|
+
displayClasses: l,
|
|
77
|
+
mobile: o
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
const xe = Symbol.for("vuetify:theme");
|
|
81
|
+
function F() {
|
|
82
|
+
J("useTheme");
|
|
83
|
+
const e = A(xe, null);
|
|
84
|
+
if (!e)
|
|
52
85
|
throw new Error("Could not find Vuetify theme injection");
|
|
53
|
-
return
|
|
86
|
+
return e;
|
|
54
87
|
}
|
|
55
|
-
const
|
|
88
|
+
const qe = /* @__PURE__ */ I({
|
|
56
89
|
__name: "index",
|
|
57
90
|
props: {
|
|
58
91
|
modelValue: { type: Boolean, required: !0 },
|
|
59
92
|
modelModifiers: {}
|
|
60
93
|
},
|
|
61
94
|
emits: ["update:modelValue"],
|
|
62
|
-
setup(
|
|
63
|
-
const n =
|
|
64
|
-
var
|
|
65
|
-
return ((
|
|
66
|
-
}),
|
|
67
|
-
var
|
|
68
|
-
return ((
|
|
69
|
-
}),
|
|
70
|
-
var
|
|
71
|
-
return ((
|
|
72
|
-
}),
|
|
73
|
-
var
|
|
74
|
-
return ((
|
|
95
|
+
setup(e) {
|
|
96
|
+
const n = P(), t = H(e, "modelValue"), o = g(""), l = g(""), s = g(), c = g(), i = d(() => {
|
|
97
|
+
var u;
|
|
98
|
+
return ((u = s.value) == null ? void 0 : u.color) ?? "primary";
|
|
99
|
+
}), m = d(() => {
|
|
100
|
+
var u;
|
|
101
|
+
return ((u = s.value) == null ? void 0 : u.text) ?? n.t("cancel");
|
|
102
|
+
}), f = d(() => {
|
|
103
|
+
var u;
|
|
104
|
+
return ((u = c.value) == null ? void 0 : u.color) ?? "primary";
|
|
105
|
+
}), C = d(() => {
|
|
106
|
+
var u;
|
|
107
|
+
return ((u = c.value) == null ? void 0 : u.text) ?? n.t("confirm");
|
|
75
108
|
});
|
|
76
|
-
let
|
|
77
|
-
const
|
|
78
|
-
o.value =
|
|
109
|
+
let $ = 0, D = !1;
|
|
110
|
+
const E = (u) => {
|
|
111
|
+
o.value = u.title, l.value = u.text, s.value = u.cancel, c.value = u.confirm, $ = u.seq, D = !1, t.value = !0;
|
|
79
112
|
};
|
|
80
113
|
W(() => {
|
|
81
|
-
|
|
82
|
-
}),
|
|
83
|
-
|
|
114
|
+
a.on("confirmDlg", E);
|
|
115
|
+
}), U(() => {
|
|
116
|
+
a.off("confirmDlg", E);
|
|
84
117
|
});
|
|
85
|
-
const
|
|
86
|
-
|
|
118
|
+
const N = () => {
|
|
119
|
+
t.value = !1, D || (a.emit("confirmDlgResult" + $, !0), D = !0);
|
|
87
120
|
};
|
|
88
|
-
return O(
|
|
89
|
-
!
|
|
90
|
-
}), (
|
|
91
|
-
const
|
|
92
|
-
return
|
|
93
|
-
modelValue:
|
|
94
|
-
"onUpdate:modelValue":
|
|
121
|
+
return O(t, (u) => {
|
|
122
|
+
!u && !D && (a.emit("confirmDlgResult" + $, !1), D = !0);
|
|
123
|
+
}), (u, w) => {
|
|
124
|
+
const V = p("v-card-title"), j = p("v-card-text"), S = p("v-btn"), r = p("v-card-actions"), x = p("v-card"), K = p("v-dialog");
|
|
125
|
+
return k(), M(K, {
|
|
126
|
+
modelValue: t.value,
|
|
127
|
+
"onUpdate:modelValue": w[1] || (w[1] = (T) => t.value = T),
|
|
95
128
|
onKeydown: [
|
|
96
|
-
|
|
97
|
-
|
|
129
|
+
w[2] || (w[2] = L(R((T) => t.value = !1, ["stop", "prevent"]), ["esc"])),
|
|
130
|
+
L(R(N, ["stop", "prevent"]), ["enter"])
|
|
98
131
|
],
|
|
99
132
|
transition: "dialog-top-transition",
|
|
100
133
|
"max-width": "600px"
|
|
101
134
|
}, {
|
|
102
|
-
default:
|
|
103
|
-
|
|
104
|
-
default:
|
|
105
|
-
|
|
106
|
-
default:
|
|
107
|
-
h(
|
|
135
|
+
default: v(() => [
|
|
136
|
+
y(x, null, {
|
|
137
|
+
default: v(() => [
|
|
138
|
+
y(V, null, {
|
|
139
|
+
default: v(() => [
|
|
140
|
+
h(b(o.value), 1)
|
|
108
141
|
]),
|
|
109
142
|
_: 1
|
|
110
143
|
}),
|
|
111
|
-
|
|
112
|
-
default:
|
|
113
|
-
h(
|
|
144
|
+
y(j, null, {
|
|
145
|
+
default: v(() => [
|
|
146
|
+
h(b(l.value), 1)
|
|
114
147
|
]),
|
|
115
148
|
_: 1
|
|
116
149
|
}),
|
|
117
|
-
|
|
118
|
-
default:
|
|
119
|
-
|
|
120
|
-
onClick:
|
|
150
|
+
y(r, { class: "d-flex justify-end" }, {
|
|
151
|
+
default: v(() => [
|
|
152
|
+
y(S, {
|
|
153
|
+
onClick: w[0] || (w[0] = (T) => t.value = !1),
|
|
121
154
|
color: i.value,
|
|
122
155
|
variant: "text"
|
|
123
156
|
}, {
|
|
124
|
-
default:
|
|
125
|
-
h(
|
|
157
|
+
default: v(() => [
|
|
158
|
+
h(b(m.value), 1)
|
|
126
159
|
]),
|
|
127
160
|
_: 1
|
|
128
161
|
}, 8, ["color"]),
|
|
129
|
-
|
|
130
|
-
onClick:
|
|
131
|
-
color:
|
|
162
|
+
y(S, {
|
|
163
|
+
onClick: N,
|
|
164
|
+
color: f.value,
|
|
132
165
|
variant: "text"
|
|
133
166
|
}, {
|
|
134
|
-
default:
|
|
135
|
-
h(
|
|
167
|
+
default: v(() => [
|
|
168
|
+
h(b(C.value), 1)
|
|
136
169
|
]),
|
|
137
170
|
_: 1
|
|
138
171
|
}, 8, ["color"])
|
|
@@ -147,22 +180,22 @@ const Ie = /* @__PURE__ */ I({
|
|
|
147
180
|
}, 8, ["modelValue", "onKeydown"]);
|
|
148
181
|
};
|
|
149
182
|
}
|
|
150
|
-
}),
|
|
151
|
-
/* @__PURE__ */
|
|
152
|
-
/* @__PURE__ */
|
|
153
|
-
/* @__PURE__ */
|
|
154
|
-
/* @__PURE__ */
|
|
155
|
-
/* @__PURE__ */
|
|
156
|
-
/* @__PURE__ */
|
|
157
|
-
/* @__PURE__ */
|
|
158
|
-
/* @__PURE__ */
|
|
159
|
-
/* @__PURE__ */
|
|
160
|
-
/* @__PURE__ */
|
|
161
|
-
/* @__PURE__ */
|
|
162
|
-
/* @__PURE__ */
|
|
163
|
-
], -1)),
|
|
164
|
-
|
|
165
|
-
],
|
|
183
|
+
}), we = (e) => (ue("data-v-a8f3d91f"), e = e(), ce(), e), be = /* @__PURE__ */ we(() => /* @__PURE__ */ _("div", { class: "lds-spinner" }, [
|
|
184
|
+
/* @__PURE__ */ _("div"),
|
|
185
|
+
/* @__PURE__ */ _("div"),
|
|
186
|
+
/* @__PURE__ */ _("div"),
|
|
187
|
+
/* @__PURE__ */ _("div"),
|
|
188
|
+
/* @__PURE__ */ _("div"),
|
|
189
|
+
/* @__PURE__ */ _("div"),
|
|
190
|
+
/* @__PURE__ */ _("div"),
|
|
191
|
+
/* @__PURE__ */ _("div"),
|
|
192
|
+
/* @__PURE__ */ _("div"),
|
|
193
|
+
/* @__PURE__ */ _("div"),
|
|
194
|
+
/* @__PURE__ */ _("div"),
|
|
195
|
+
/* @__PURE__ */ _("div")
|
|
196
|
+
], -1)), he = [
|
|
197
|
+
be
|
|
198
|
+
], ke = /* @__PURE__ */ I({
|
|
166
199
|
__name: "index",
|
|
167
200
|
props: {
|
|
168
201
|
zIndex: {
|
|
@@ -170,22 +203,22 @@ const Ie = /* @__PURE__ */ I({
|
|
|
170
203
|
default: 1
|
|
171
204
|
}
|
|
172
205
|
},
|
|
173
|
-
setup(
|
|
174
|
-
const n =
|
|
206
|
+
setup(e) {
|
|
207
|
+
const n = F(), t = e, o = d(() => ({
|
|
175
208
|
background: n.current.value.dark ? "#1e1e1e" : "#ffffff",
|
|
176
|
-
zIndex:
|
|
209
|
+
zIndex: t.zIndex
|
|
177
210
|
}));
|
|
178
|
-
return (l,
|
|
211
|
+
return (l, s) => (k(), z("div", {
|
|
179
212
|
class: "x-cont",
|
|
180
|
-
style:
|
|
181
|
-
},
|
|
213
|
+
style: se(o.value)
|
|
214
|
+
}, he, 4));
|
|
182
215
|
}
|
|
183
|
-
}),
|
|
184
|
-
const
|
|
216
|
+
}), Q = (e, n) => {
|
|
217
|
+
const t = e.__vccOpts || e;
|
|
185
218
|
for (const [o, l] of n)
|
|
186
|
-
|
|
187
|
-
return
|
|
188
|
-
},
|
|
219
|
+
t[o] = l;
|
|
220
|
+
return t;
|
|
221
|
+
}, Be = /* @__PURE__ */ Q(ke, [["__scopeId", "data-v-a8f3d91f"]]), Ce = /* @__PURE__ */ I({
|
|
189
222
|
__name: "item",
|
|
190
223
|
props: {
|
|
191
224
|
id: {
|
|
@@ -206,10 +239,10 @@ const Ie = /* @__PURE__ */ I({
|
|
|
206
239
|
}
|
|
207
240
|
},
|
|
208
241
|
emits: ["timeout"],
|
|
209
|
-
setup(
|
|
210
|
-
const
|
|
242
|
+
setup(e, { emit: n }) {
|
|
243
|
+
const t = e, o = g(!0), l = n, s = d(() => {
|
|
211
244
|
let c = "";
|
|
212
|
-
switch (
|
|
245
|
+
switch (t.type) {
|
|
213
246
|
case "error":
|
|
214
247
|
c = "cancel";
|
|
215
248
|
break;
|
|
@@ -227,19 +260,19 @@ const Ie = /* @__PURE__ */ I({
|
|
|
227
260
|
});
|
|
228
261
|
return W(() => {
|
|
229
262
|
setTimeout(() => {
|
|
230
|
-
l("timeout",
|
|
231
|
-
},
|
|
263
|
+
l("timeout", t.id);
|
|
264
|
+
}, t.timeout);
|
|
232
265
|
}), O(o, (c) => {
|
|
233
|
-
c || l("timeout",
|
|
266
|
+
c || l("timeout", t.id);
|
|
234
267
|
}), (c, i) => {
|
|
235
|
-
const
|
|
236
|
-
return
|
|
268
|
+
const m = p("v-alert");
|
|
269
|
+
return k(), M(m, {
|
|
237
270
|
modelValue: o.value,
|
|
238
|
-
"onUpdate:modelValue": i[0] || (i[0] = (
|
|
271
|
+
"onUpdate:modelValue": i[0] || (i[0] = (f) => o.value = f),
|
|
239
272
|
class: "mt-2",
|
|
240
|
-
type:
|
|
241
|
-
icon:
|
|
242
|
-
text:
|
|
273
|
+
type: e.type,
|
|
274
|
+
icon: s.value,
|
|
275
|
+
text: e.text,
|
|
243
276
|
"max-width": "90%",
|
|
244
277
|
width: "500px",
|
|
245
278
|
elevation: "1",
|
|
@@ -250,137 +283,137 @@ const Ie = /* @__PURE__ */ I({
|
|
|
250
283
|
}
|
|
251
284
|
}), De = /* @__PURE__ */ I({
|
|
252
285
|
__name: "index",
|
|
253
|
-
setup(
|
|
254
|
-
const n =
|
|
286
|
+
setup(e) {
|
|
287
|
+
const n = ie({ items: [] });
|
|
255
288
|
W(() => {
|
|
256
|
-
|
|
257
|
-
}),
|
|
258
|
-
|
|
289
|
+
a.on("message", t);
|
|
290
|
+
}), U(() => {
|
|
291
|
+
a.off("message", t);
|
|
259
292
|
});
|
|
260
|
-
const
|
|
261
|
-
|
|
293
|
+
const t = (i) => {
|
|
294
|
+
s(i.type, i.text, i.timeout);
|
|
262
295
|
}, o = (i) => {
|
|
263
296
|
c(i);
|
|
264
297
|
};
|
|
265
298
|
let l = 0;
|
|
266
|
-
const
|
|
267
|
-
const
|
|
268
|
-
n.items.push({ id:
|
|
299
|
+
const s = (i, m, f) => {
|
|
300
|
+
const C = l++;
|
|
301
|
+
n.items.push({ id: C, type: i, text: m, timeout: f });
|
|
269
302
|
}, c = (i) => {
|
|
270
|
-
const
|
|
271
|
-
|
|
303
|
+
const m = n.items.findIndex((f) => f.id === i);
|
|
304
|
+
m >= 0 && n.items.splice(m, 1);
|
|
272
305
|
};
|
|
273
|
-
return (i,
|
|
274
|
-
onClick:
|
|
306
|
+
return (i, m) => (k(), z("div", {
|
|
307
|
+
onClick: m[0] || (m[0] = R(() => {
|
|
275
308
|
}, ["stop"])),
|
|
276
309
|
class: "x-cont d-flex flex-column-reverse align-center"
|
|
277
310
|
}, [
|
|
278
|
-
(
|
|
311
|
+
(k(!0), z(de, null, fe(n.items, (f) => (k(), M(Ce, {
|
|
279
312
|
onTimeout: o,
|
|
280
|
-
id:
|
|
281
|
-
type:
|
|
282
|
-
text:
|
|
283
|
-
timeout:
|
|
284
|
-
key:
|
|
313
|
+
id: f.id,
|
|
314
|
+
type: f.type,
|
|
315
|
+
text: f.text,
|
|
316
|
+
timeout: f.timeout,
|
|
317
|
+
key: f.id
|
|
285
318
|
}, null, 8, ["id", "type", "text", "timeout"]))), 128))
|
|
286
319
|
]));
|
|
287
320
|
}
|
|
288
|
-
}),
|
|
321
|
+
}), Re = /* @__PURE__ */ Q(De, [["__scopeId", "data-v-70ed4b89"]]), We = /* @__PURE__ */ I({
|
|
289
322
|
__name: "index",
|
|
290
323
|
props: {
|
|
291
324
|
modelValue: { type: Boolean, required: !0 },
|
|
292
325
|
modelModifiers: {}
|
|
293
326
|
},
|
|
294
327
|
emits: ["update:modelValue"],
|
|
295
|
-
setup(
|
|
296
|
-
const n =
|
|
297
|
-
var
|
|
298
|
-
return ((
|
|
299
|
-
}),
|
|
300
|
-
var
|
|
301
|
-
return ((
|
|
302
|
-
}),
|
|
303
|
-
var
|
|
304
|
-
return ((
|
|
305
|
-
}),
|
|
306
|
-
var
|
|
307
|
-
return ((
|
|
308
|
-
}),
|
|
309
|
-
let
|
|
310
|
-
const
|
|
328
|
+
setup(e) {
|
|
329
|
+
const n = P(), t = H(e, "modelValue"), o = g(""), l = g(""), s = g(), c = g(), i = g(), m = g(""), f = g(), C = g(), $ = d(() => {
|
|
330
|
+
var r;
|
|
331
|
+
return ((r = f.value) == null ? void 0 : r.color) ?? "primary";
|
|
332
|
+
}), D = d(() => {
|
|
333
|
+
var r;
|
|
334
|
+
return ((r = f.value) == null ? void 0 : r.text) ?? n.t("cancel");
|
|
335
|
+
}), E = d(() => {
|
|
336
|
+
var r;
|
|
337
|
+
return ((r = C.value) == null ? void 0 : r.color) ?? "primary";
|
|
338
|
+
}), N = d(() => {
|
|
339
|
+
var r;
|
|
340
|
+
return ((r = C.value) == null ? void 0 : r.text) ?? n.t("confirm");
|
|
341
|
+
}), u = g();
|
|
342
|
+
let w = 0, V = !1;
|
|
343
|
+
const j = async (r) => {
|
|
311
344
|
var x;
|
|
312
|
-
o.value =
|
|
345
|
+
o.value = r.title, l.value = r.text, s.value = r.label, c.value = r.placeholder, i.value = r.rules, m.value = r.value, f.value = r.cancel, C.value = r.confirm, w = r.seq, V = !1, t.value = !0, await X(() => u.value !== void 0, 1e3), (x = u.value) == null || x.focus();
|
|
313
346
|
};
|
|
314
347
|
W(() => {
|
|
315
|
-
|
|
316
|
-
}),
|
|
317
|
-
|
|
348
|
+
a.on("promptDlg", j);
|
|
349
|
+
}), U(() => {
|
|
350
|
+
a.off("promptDlg", j);
|
|
318
351
|
});
|
|
319
|
-
const
|
|
320
|
-
|
|
352
|
+
const S = () => {
|
|
353
|
+
t.value = !1, V || (a.emit("promptDlgResult" + w, m.value ?? ""), V = !0);
|
|
321
354
|
};
|
|
322
|
-
return O(
|
|
323
|
-
!
|
|
324
|
-
}), (
|
|
325
|
-
const
|
|
326
|
-
return
|
|
327
|
-
modelValue:
|
|
328
|
-
"onUpdate:modelValue": x[2] || (x[2] = (
|
|
355
|
+
return O(t, (r) => {
|
|
356
|
+
!r && !V && (a.emit("promptDlgResult" + w, void 0), V = !0);
|
|
357
|
+
}), (r, x) => {
|
|
358
|
+
const K = p("v-card-title"), T = p("v-card-text"), te = p("v-text-field"), ne = p("v-form"), Z = p("v-btn"), oe = p("v-card-actions"), le = p("v-card"), re = p("v-dialog");
|
|
359
|
+
return k(), M(re, {
|
|
360
|
+
modelValue: t.value,
|
|
361
|
+
"onUpdate:modelValue": x[2] || (x[2] = (q) => t.value = q),
|
|
329
362
|
onKeydown: [
|
|
330
|
-
x[3] || (x[3] =
|
|
331
|
-
|
|
363
|
+
x[3] || (x[3] = L(R((q) => t.value = !1, ["stop", "prevent"]), ["esc"])),
|
|
364
|
+
L(R(S, ["stop", "prevent"]), ["enter"])
|
|
332
365
|
],
|
|
333
366
|
transition: "dialog-top-transition",
|
|
334
367
|
"max-width": "600px"
|
|
335
368
|
}, {
|
|
336
|
-
default:
|
|
337
|
-
|
|
338
|
-
default:
|
|
339
|
-
|
|
340
|
-
default:
|
|
341
|
-
h(
|
|
369
|
+
default: v(() => [
|
|
370
|
+
y(le, null, {
|
|
371
|
+
default: v(() => [
|
|
372
|
+
y(K, null, {
|
|
373
|
+
default: v(() => [
|
|
374
|
+
h(b(o.value), 1)
|
|
342
375
|
]),
|
|
343
376
|
_: 1
|
|
344
377
|
}),
|
|
345
|
-
|
|
346
|
-
default:
|
|
347
|
-
h(
|
|
378
|
+
y(T, null, {
|
|
379
|
+
default: v(() => [
|
|
380
|
+
h(b(l.value), 1)
|
|
348
381
|
]),
|
|
349
382
|
_: 1
|
|
350
383
|
}),
|
|
351
|
-
|
|
352
|
-
default:
|
|
353
|
-
|
|
354
|
-
modelValue:
|
|
355
|
-
"onUpdate:modelValue": x[0] || (x[0] = (
|
|
356
|
-
label:
|
|
384
|
+
y(ne, { class: "mx-3" }, {
|
|
385
|
+
default: v(() => [
|
|
386
|
+
y(te, {
|
|
387
|
+
modelValue: m.value,
|
|
388
|
+
"onUpdate:modelValue": x[0] || (x[0] = (q) => m.value = q),
|
|
389
|
+
label: s.value,
|
|
357
390
|
placeholder: c.value,
|
|
358
391
|
rules: i.value,
|
|
359
392
|
ref_key: "target",
|
|
360
|
-
ref:
|
|
393
|
+
ref: u
|
|
361
394
|
}, null, 8, ["modelValue", "label", "placeholder", "rules"])
|
|
362
395
|
]),
|
|
363
396
|
_: 1
|
|
364
397
|
}),
|
|
365
|
-
|
|
366
|
-
default:
|
|
367
|
-
|
|
368
|
-
onClick: x[1] || (x[1] = (
|
|
369
|
-
color:
|
|
398
|
+
y(oe, { class: "d-flex justify-end" }, {
|
|
399
|
+
default: v(() => [
|
|
400
|
+
y(Z, {
|
|
401
|
+
onClick: x[1] || (x[1] = (q) => t.value = !1),
|
|
402
|
+
color: $.value,
|
|
370
403
|
variant: "text"
|
|
371
404
|
}, {
|
|
372
|
-
default:
|
|
373
|
-
h(D
|
|
405
|
+
default: v(() => [
|
|
406
|
+
h(b(D.value), 1)
|
|
374
407
|
]),
|
|
375
408
|
_: 1
|
|
376
409
|
}, 8, ["color"]),
|
|
377
|
-
|
|
378
|
-
onClick:
|
|
379
|
-
color:
|
|
410
|
+
y(Z, {
|
|
411
|
+
onClick: S,
|
|
412
|
+
color: E.value,
|
|
380
413
|
variant: "text"
|
|
381
414
|
}, {
|
|
382
|
-
default:
|
|
383
|
-
h(
|
|
415
|
+
default: v(() => [
|
|
416
|
+
h(b(N.value), 1)
|
|
384
417
|
]),
|
|
385
418
|
_: 1
|
|
386
419
|
}, 8, ["color"])
|
|
@@ -395,37 +428,37 @@ const Ie = /* @__PURE__ */ I({
|
|
|
395
428
|
}, 8, ["modelValue", "onKeydown"]);
|
|
396
429
|
};
|
|
397
430
|
}
|
|
398
|
-
}),
|
|
431
|
+
}), Ve = { class: "mx-auto my-auto" }, Ie = { class: "d-flex align-center justify-center w-100 h-100" }, Me = /* @__PURE__ */ I({
|
|
399
432
|
__name: "index",
|
|
400
|
-
setup(
|
|
401
|
-
const n =
|
|
402
|
-
|
|
433
|
+
setup(e) {
|
|
434
|
+
const n = P(), t = g(!1), o = () => {
|
|
435
|
+
t.value = !0;
|
|
403
436
|
}, l = () => {
|
|
404
|
-
|
|
437
|
+
t.value = !1;
|
|
405
438
|
};
|
|
406
439
|
return W(() => {
|
|
407
|
-
|
|
408
|
-
}),
|
|
409
|
-
|
|
410
|
-
}), (
|
|
411
|
-
const i =
|
|
412
|
-
return
|
|
413
|
-
"model-value":
|
|
414
|
-
"onUpdate:modelValue": c[0] || (c[0] = (
|
|
440
|
+
a.on("openWaitDlg", o), a.on("closeWaitDlg", l);
|
|
441
|
+
}), U(() => {
|
|
442
|
+
a.off("openWaitDlg", o), a.off("closeWaitDlg", l);
|
|
443
|
+
}), (s, c) => {
|
|
444
|
+
const i = p("v-card"), m = p("v-dialog");
|
|
445
|
+
return k(), M(m, {
|
|
446
|
+
"model-value": t.value,
|
|
447
|
+
"onUpdate:modelValue": c[0] || (c[0] = (f) => t.value = f),
|
|
415
448
|
persistent: "",
|
|
416
449
|
"no-click-animation": "",
|
|
417
450
|
fullscreen: ""
|
|
418
451
|
}, {
|
|
419
|
-
default:
|
|
420
|
-
|
|
421
|
-
|
|
452
|
+
default: v(() => [
|
|
453
|
+
_("div", Ve, [
|
|
454
|
+
y(i, {
|
|
422
455
|
width: "300px",
|
|
423
456
|
height: "80px",
|
|
424
457
|
loading: ""
|
|
425
458
|
}, {
|
|
426
|
-
default:
|
|
427
|
-
|
|
428
|
-
|
|
459
|
+
default: v(() => [
|
|
460
|
+
_("div", Ie, [
|
|
461
|
+
_("span", null, b(me(n).t("waitingResponse")), 1)
|
|
429
462
|
])
|
|
430
463
|
]),
|
|
431
464
|
_: 1
|
|
@@ -437,77 +470,95 @@ const Ie = /* @__PURE__ */ I({
|
|
|
437
470
|
};
|
|
438
471
|
}
|
|
439
472
|
});
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
473
|
+
function Ee() {
|
|
474
|
+
const e = F(), n = d(() => e.global.current.value.colors.primary), t = d(() => e.global.current.value.colors.secondary), o = d(() => e.current.value.dark ? "#2e2e2e" : "#bdbdbd"), l = d(() => e.current.value.dark ? "#272727" : "#eeeeee"), s = d(() => e.current.value.dark ? "#1e1e1e" : "#ffffff"), c = d(() => e.current.value.dark ? "#303030" : "#f6f6f6"), i = d(() => e.current.value.dark ? "#ffffff1f" : "#0000001f");
|
|
475
|
+
return {
|
|
476
|
+
primaryColor: n,
|
|
477
|
+
secondaryColor: t,
|
|
478
|
+
backgroundColor0: o,
|
|
479
|
+
backgroundColor1: l,
|
|
480
|
+
backgroundColor2: s,
|
|
481
|
+
highlightColor: c,
|
|
482
|
+
borderColor: i
|
|
483
|
+
};
|
|
484
|
+
}
|
|
485
|
+
function Ne() {
|
|
486
|
+
const e = F(), { width: n } = ye(), t = d(() => e.current.value.dark), o = g(""), l = d(() => !!window.cordova), s = d(() => n.value <= 1280 ? n.value + "px" : n.value <= 1920 ? 1920 / 2.5 + "px" : 2560 / 2.5 + "px");
|
|
487
|
+
return { dark: t, routeTransName: o, sysBarAvail: l, compactWidth: s };
|
|
488
|
+
}
|
|
489
|
+
let G = Date.now();
|
|
490
|
+
function Y() {
|
|
491
|
+
const e = Date.now();
|
|
492
|
+
return e - G > 500 ? (G = e, !0) : !1;
|
|
444
493
|
}
|
|
445
|
-
let
|
|
446
|
-
function
|
|
447
|
-
return
|
|
494
|
+
let $e = 0;
|
|
495
|
+
function ee() {
|
|
496
|
+
return ++$e;
|
|
448
497
|
}
|
|
449
|
-
async function
|
|
450
|
-
if (!
|
|
498
|
+
async function je(e) {
|
|
499
|
+
if (!Y())
|
|
451
500
|
return;
|
|
452
|
-
let n = !1,
|
|
453
|
-
const o = (
|
|
454
|
-
|
|
455
|
-
}, l =
|
|
456
|
-
return
|
|
501
|
+
let n = !1, t;
|
|
502
|
+
const o = (s) => {
|
|
503
|
+
t = s, n = !0;
|
|
504
|
+
}, l = ee();
|
|
505
|
+
return a.on("confirmDlgResult" + l, o), a.emit("confirmDlg", { ...e, seq: l }), await X(() => n), a.off("confirmDlgResult" + l, o), t;
|
|
457
506
|
}
|
|
458
|
-
async function
|
|
459
|
-
if (!
|
|
507
|
+
async function Le(e) {
|
|
508
|
+
if (!Y())
|
|
460
509
|
return;
|
|
461
|
-
let n = !1,
|
|
462
|
-
const o = (
|
|
463
|
-
|
|
464
|
-
}, l =
|
|
465
|
-
return
|
|
510
|
+
let n = !1, t;
|
|
511
|
+
const o = (s) => {
|
|
512
|
+
t = s, n = !0;
|
|
513
|
+
}, l = ee();
|
|
514
|
+
return a.on("promptDlgResult" + l, o), a.emit("promptDlg", { ...e, seq: l }), await X(() => n), a.off("promptDlgResult" + l, o), t;
|
|
466
515
|
}
|
|
467
|
-
function
|
|
468
|
-
|
|
516
|
+
function Ue() {
|
|
517
|
+
a.emit("openWaitDlg");
|
|
469
518
|
}
|
|
470
|
-
function
|
|
471
|
-
|
|
519
|
+
function Ke() {
|
|
520
|
+
a.emit("closeWaitDlg");
|
|
472
521
|
}
|
|
473
|
-
function
|
|
474
|
-
|
|
522
|
+
function ze(e, n) {
|
|
523
|
+
a.emit("message", { type: "error", text: e, timeout: n });
|
|
475
524
|
}
|
|
476
|
-
function
|
|
477
|
-
|
|
525
|
+
function Ae(e, n) {
|
|
526
|
+
a.emit("message", { type: "info", text: e, timeout: n });
|
|
478
527
|
}
|
|
479
|
-
function
|
|
480
|
-
|
|
528
|
+
function Oe(e, n) {
|
|
529
|
+
a.emit("message", { type: "success", text: e, timeout: n });
|
|
481
530
|
}
|
|
482
|
-
function
|
|
483
|
-
|
|
531
|
+
function Xe(e, n) {
|
|
532
|
+
a.emit("message", { type: "warning", text: e, timeout: n });
|
|
484
533
|
}
|
|
485
|
-
function
|
|
534
|
+
function Pe(e) {
|
|
486
535
|
var o, l;
|
|
487
536
|
if (!window.appAppear) {
|
|
488
537
|
window.appAppear = !0;
|
|
489
538
|
return;
|
|
490
539
|
}
|
|
491
|
-
const n = "single-spa-application:" +
|
|
492
|
-
|
|
493
|
-
|
|
540
|
+
const n = "single-spa-application:" + e, t = (o = document.getElementById(n)) == null ? void 0 : o.classList;
|
|
541
|
+
t && (t.remove("app-left", "app-right", "app-reset"), (l = window.routeExtras) != null && l.forward ? t.add("app-left") : t.add("app-right"), setTimeout(() => {
|
|
542
|
+
t.add("app-reset");
|
|
494
543
|
}, 0));
|
|
495
544
|
}
|
|
496
545
|
export {
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
546
|
+
qe as XConfirmDlg,
|
|
547
|
+
Be as XLoading,
|
|
548
|
+
Re as XMessage,
|
|
549
|
+
We as XPromptDlg,
|
|
550
|
+
Me as XWaitDlg,
|
|
551
|
+
Pe as appAppear,
|
|
552
|
+
Ke as closeWaitDlg,
|
|
553
|
+
ze as messageError,
|
|
554
|
+
Ae as messageInfo,
|
|
555
|
+
Oe as messageSuccess,
|
|
556
|
+
Xe as messageWarning,
|
|
557
|
+
je as openConfirmDlg,
|
|
558
|
+
Le as openPromptDlg,
|
|
559
|
+
Ue as openWaitDlg,
|
|
560
|
+
Ee as useColor,
|
|
561
|
+
Ne as useSystem,
|
|
562
|
+
Te as waitMs,
|
|
512
563
|
X as waitUtil
|
|
513
564
|
};
|