vx-vue 0.7.6 → 0.7.9
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/LICENSE +21 -21
- package/README.md +64 -64
- package/dist/style.css +1 -1
- package/dist/vxvue.es.js +226 -217
- package/dist/vxvue.umd.js +1 -1
- package/package.json +40 -40
package/dist/vxvue.es.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { getCurrentScope as ke, onScopeDispose as $e, unref as
|
|
1
|
+
import { getCurrentScope as ke, onScopeDispose as $e, unref as V, watch as H, useAttrs as W, ref as x, computed as _, onUpdated as Ce, openBlock as u, createElementBlock as v, normalizeClass as C, createElementVNode as r, mergeProps as j, withKeys as X, withModifiers as P, createCommentVNode as D, Fragment as A, renderList as O, renderSlot as B, toDisplayString as S, createVNode as Y, Transition as oe, withCtx as Q, createTextVNode as z, nextTick as re, toValue as de, withDirectives as fe, vModelText as Se, onMounted as ue, createBlock as q, pushScopeId as Me, popScopeId as Ve, resolveDynamicComponent as ie, resolveComponent as De, vShow as _e, toHandlers as le, normalizeStyle as Ae } from "vue";
|
|
2
2
|
function Be(e) {
|
|
3
3
|
return ke() ? ($e(e), !0) : !1;
|
|
4
4
|
}
|
|
5
5
|
function he(e) {
|
|
6
|
-
return typeof e == "function" ? e() :
|
|
6
|
+
return typeof e == "function" ? e() : V(e);
|
|
7
7
|
}
|
|
8
8
|
const pe = typeof window < "u" && typeof document < "u";
|
|
9
9
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
@@ -14,49 +14,49 @@ function Ie() {
|
|
|
14
14
|
return pe && ((e = window == null ? void 0 : window.navigator) == null ? void 0 : e.userAgent) && (/iP(ad|hone|od)/.test(window.navigator.userAgent) || ((d = window == null ? void 0 : window.navigator) == null ? void 0 : d.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window == null ? void 0 : window.navigator.userAgent));
|
|
15
15
|
}
|
|
16
16
|
const Te = /[YMDHhms]o|\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a{1,2}|A{1,2}|m{1,2}|s{1,2}|Z{1,2}|SSS/g;
|
|
17
|
-
function Oe(e, d, t,
|
|
17
|
+
function Oe(e, d, t, s) {
|
|
18
18
|
let a = e < 12 ? "AM" : "PM";
|
|
19
|
-
return
|
|
19
|
+
return s && (a = a.split("").reduce((l, c) => l += `${c}.`, "")), t ? a.toLowerCase() : a;
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function Z(e) {
|
|
22
22
|
const d = ["th", "st", "nd", "rd"], t = e % 100;
|
|
23
23
|
return e + (d[(t - 20) % 10] || d[t] || d[0]);
|
|
24
24
|
}
|
|
25
25
|
function ve(e, d, t = {}) {
|
|
26
|
-
var
|
|
27
|
-
const a = e.getFullYear(), l = e.getMonth(), c = e.getDate(),
|
|
28
|
-
Yo: () =>
|
|
26
|
+
var s;
|
|
27
|
+
const a = e.getFullYear(), l = e.getMonth(), c = e.getDate(), n = e.getHours(), o = e.getMinutes(), m = e.getSeconds(), i = e.getMilliseconds(), y = e.getDay(), f = (s = t.customMeridiem) != null ? s : Oe, g = {
|
|
28
|
+
Yo: () => Z(a),
|
|
29
29
|
YY: () => String(a).slice(-2),
|
|
30
30
|
YYYY: () => a,
|
|
31
31
|
M: () => l + 1,
|
|
32
|
-
Mo: () =>
|
|
32
|
+
Mo: () => Z(l + 1),
|
|
33
33
|
MM: () => `${l + 1}`.padStart(2, "0"),
|
|
34
34
|
MMM: () => e.toLocaleDateString(t.locales, { month: "short" }),
|
|
35
35
|
MMMM: () => e.toLocaleDateString(t.locales, { month: "long" }),
|
|
36
36
|
D: () => String(c),
|
|
37
|
-
Do: () =>
|
|
37
|
+
Do: () => Z(c),
|
|
38
38
|
DD: () => `${c}`.padStart(2, "0"),
|
|
39
|
-
H: () => String(
|
|
40
|
-
Ho: () =>
|
|
41
|
-
HH: () => `${
|
|
42
|
-
h: () => `${
|
|
43
|
-
ho: () =>
|
|
44
|
-
hh: () => `${
|
|
39
|
+
H: () => String(n),
|
|
40
|
+
Ho: () => Z(n),
|
|
41
|
+
HH: () => `${n}`.padStart(2, "0"),
|
|
42
|
+
h: () => `${n % 12 || 12}`.padStart(1, "0"),
|
|
43
|
+
ho: () => Z(n % 12 || 12),
|
|
44
|
+
hh: () => `${n % 12 || 12}`.padStart(2, "0"),
|
|
45
45
|
m: () => String(o),
|
|
46
|
-
mo: () =>
|
|
46
|
+
mo: () => Z(o),
|
|
47
47
|
mm: () => `${o}`.padStart(2, "0"),
|
|
48
48
|
s: () => String(m),
|
|
49
|
-
so: () =>
|
|
49
|
+
so: () => Z(m),
|
|
50
50
|
ss: () => `${m}`.padStart(2, "0"),
|
|
51
51
|
SSS: () => `${i}`.padStart(3, "0"),
|
|
52
52
|
d: () => y,
|
|
53
53
|
dd: () => e.toLocaleDateString(t.locales, { weekday: "narrow" }),
|
|
54
54
|
ddd: () => e.toLocaleDateString(t.locales, { weekday: "short" }),
|
|
55
55
|
dddd: () => e.toLocaleDateString(t.locales, { weekday: "long" }),
|
|
56
|
-
A: () => f(
|
|
57
|
-
AA: () => f(
|
|
58
|
-
a: () => f(
|
|
59
|
-
aa: () => f(
|
|
56
|
+
A: () => f(n, o),
|
|
57
|
+
AA: () => f(n, o, !1, !0),
|
|
58
|
+
a: () => f(n, o, !0),
|
|
59
|
+
aa: () => f(n, o, !0, !0)
|
|
60
60
|
};
|
|
61
61
|
return d.replace(Te, (w, I) => {
|
|
62
62
|
var T, F;
|
|
@@ -70,20 +70,20 @@ function J(e) {
|
|
|
70
70
|
}
|
|
71
71
|
const ge = pe ? window : void 0;
|
|
72
72
|
function ae(...e) {
|
|
73
|
-
let d, t,
|
|
74
|
-
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([t,
|
|
73
|
+
let d, t, s, a;
|
|
74
|
+
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([t, s, a] = e, d = ge) : [d, t, s, a] = e, !d)
|
|
75
75
|
return ee;
|
|
76
|
-
Array.isArray(t) || (t = [t]), Array.isArray(
|
|
76
|
+
Array.isArray(t) || (t = [t]), Array.isArray(s) || (s = [s]);
|
|
77
77
|
const l = [], c = () => {
|
|
78
78
|
l.forEach((i) => i()), l.length = 0;
|
|
79
|
-
},
|
|
79
|
+
}, n = (i, y, f, g) => (i.addEventListener(y, f, g), () => i.removeEventListener(y, f, g)), o = H(
|
|
80
80
|
() => [J(d), he(a)],
|
|
81
81
|
([i, y]) => {
|
|
82
82
|
if (c(), !i)
|
|
83
83
|
return;
|
|
84
84
|
const f = Le(y) ? { ...y } : y;
|
|
85
85
|
l.push(
|
|
86
|
-
...t.flatMap((g) =>
|
|
86
|
+
...t.flatMap((g) => s.map((w) => n(i, g, w, f)))
|
|
87
87
|
);
|
|
88
88
|
},
|
|
89
89
|
{ immediate: !0, flush: "post" }
|
|
@@ -94,38 +94,38 @@ function ae(...e) {
|
|
|
94
94
|
}
|
|
95
95
|
let me = !1;
|
|
96
96
|
function ce(e, d, t = {}) {
|
|
97
|
-
const { window:
|
|
98
|
-
if (!
|
|
97
|
+
const { window: s = ge, ignore: a = [], capture: l = !0, detectIframe: c = !1 } = t;
|
|
98
|
+
if (!s)
|
|
99
99
|
return ee;
|
|
100
|
-
Fe && !me && (me = !0, Array.from(
|
|
101
|
-
let
|
|
100
|
+
Fe && !me && (me = !0, Array.from(s.document.body.children).forEach((f) => f.addEventListener("click", ee)), s.document.documentElement.addEventListener("click", ee));
|
|
101
|
+
let n = !0;
|
|
102
102
|
const o = (f) => a.some((g) => {
|
|
103
103
|
if (typeof g == "string")
|
|
104
|
-
return Array.from(
|
|
104
|
+
return Array.from(s.document.querySelectorAll(g)).some((w) => w === f.target || f.composedPath().includes(w));
|
|
105
105
|
{
|
|
106
106
|
const w = J(g);
|
|
107
107
|
return w && (f.target === w || f.composedPath().includes(w));
|
|
108
108
|
}
|
|
109
109
|
}), i = [
|
|
110
|
-
ae(
|
|
110
|
+
ae(s, "click", (f) => {
|
|
111
111
|
const g = J(e);
|
|
112
112
|
if (!(!g || g === f.target || f.composedPath().includes(g))) {
|
|
113
|
-
if (f.detail === 0 && (
|
|
114
|
-
|
|
113
|
+
if (f.detail === 0 && (n = !o(f)), !n) {
|
|
114
|
+
n = !0;
|
|
115
115
|
return;
|
|
116
116
|
}
|
|
117
117
|
d(f);
|
|
118
118
|
}
|
|
119
119
|
}, { passive: !0, capture: l }),
|
|
120
|
-
ae(
|
|
120
|
+
ae(s, "pointerdown", (f) => {
|
|
121
121
|
const g = J(e);
|
|
122
|
-
|
|
122
|
+
n = !o(f) && !!(g && !f.composedPath().includes(g));
|
|
123
123
|
}, { passive: !0 }),
|
|
124
|
-
c && ae(
|
|
124
|
+
c && ae(s, "blur", (f) => {
|
|
125
125
|
setTimeout(() => {
|
|
126
126
|
var g;
|
|
127
127
|
const w = J(e);
|
|
128
|
-
((g =
|
|
128
|
+
((g = s.document.activeElement) == null ? void 0 : g.tagName) === "IFRAME" && !(w != null && w.contains(s.document.activeElement)) && d(f);
|
|
129
129
|
}, 0);
|
|
130
130
|
})
|
|
131
131
|
].filter(Boolean);
|
|
@@ -165,18 +165,18 @@ const je = ["value", "onKeydown"], Ye = { class: "flex absolute inset-y-0 right-
|
|
|
165
165
|
},
|
|
166
166
|
emits: ["update:modelValue", "blur", "submit"],
|
|
167
167
|
setup(e, { emit: d }) {
|
|
168
|
-
const t = d,
|
|
168
|
+
const t = d, s = e, a = W(), c = (/* @__PURE__ */ (() => {
|
|
169
169
|
let k = 0;
|
|
170
170
|
return ($) => ($ || "") + ++k;
|
|
171
|
-
})())((a.id || "autocomplete") + "-"),
|
|
172
|
-
() =>
|
|
171
|
+
})())((a.id || "autocomplete") + "-"), n = x([]), o = x(-1), m = x(0), i = x(!1), y = x(!1), f = x("top-0 translate-y-12"), g = x(!0), w = x(null), I = x(null), T = x(null), F = _(
|
|
172
|
+
() => n.value.map((k, $) => ({
|
|
173
173
|
id: (a.id || "autocomplete") + "-item-" + $,
|
|
174
|
-
class: ["autocomplete-item",
|
|
174
|
+
class: ["autocomplete-item", s.resultItemClass, { "bg-vxvue-700 text-white": o.value === $ }],
|
|
175
175
|
"data-result-index": $,
|
|
176
176
|
role: "option",
|
|
177
177
|
...o.value === $ ? { "aria-selected": "true" } : {}
|
|
178
178
|
}))
|
|
179
|
-
), U =
|
|
179
|
+
), U = _(() => ({
|
|
180
180
|
role: "combobox",
|
|
181
181
|
autocomplete: "off",
|
|
182
182
|
autocapitalize: "off",
|
|
@@ -188,34 +188,34 @@ const je = ["value", "onKeydown"], Ye = { class: "flex absolute inset-y-0 right-
|
|
|
188
188
|
"aria-expanded": i.value ? "true" : "false",
|
|
189
189
|
"aria-activedescendant": o.value > -1 ? F.value[o.value].id : "",
|
|
190
190
|
...a
|
|
191
|
-
})),
|
|
191
|
+
})), K = _(() => ({
|
|
192
192
|
id: c,
|
|
193
|
-
class: ["autocomplete-list absolute min-w-full transform z-10",
|
|
193
|
+
class: ["autocomplete-list absolute min-w-full transform z-10", s.resultListClass, f.value],
|
|
194
194
|
role: "listbox"
|
|
195
195
|
})), b = () => {
|
|
196
|
-
o.value = -1,
|
|
196
|
+
o.value = -1, n.value = [], i.value = !1, g.value = !0;
|
|
197
197
|
}, p = (k) => {
|
|
198
|
-
const $ =
|
|
198
|
+
const $ = s.search(k);
|
|
199
199
|
if ($ instanceof Promise) {
|
|
200
200
|
const R = ++m.value;
|
|
201
201
|
y.value = !0, $.then((N) => {
|
|
202
|
-
R === m.value && (
|
|
202
|
+
R === m.value && (n.value = N, y.value = !1, n.value.length ? (o.value = s.autoSelect ? 0 : -1, i.value = !0) : b());
|
|
203
203
|
});
|
|
204
204
|
} else
|
|
205
|
-
|
|
205
|
+
n.value = $, n.value.length === 0 ? b() : (o.value = s.autoSelect ? 0 : -1, i.value = !0);
|
|
206
206
|
}, h = () => {
|
|
207
|
-
const k =
|
|
208
|
-
return k && t("update:modelValue",
|
|
207
|
+
const k = n.value[o.value];
|
|
208
|
+
return k && t("update:modelValue", s.getResultValue(k)), b(), k;
|
|
209
209
|
}, M = (k) => {
|
|
210
210
|
t("update:modelValue", k), p(k);
|
|
211
211
|
}, L = (k) => p(k.target.value), E = () => {
|
|
212
212
|
b(), t("blur");
|
|
213
213
|
}, G = () => {
|
|
214
|
-
const k =
|
|
214
|
+
const k = n.value.length;
|
|
215
215
|
o.value = ((o.value - 1) % k + k) % k;
|
|
216
216
|
}, te = (k) => {
|
|
217
217
|
i.value || L(k);
|
|
218
|
-
const $ =
|
|
218
|
+
const $ = n.value.length;
|
|
219
219
|
o.value = ((o.value + 1) % $ + $) % $;
|
|
220
220
|
}, xe = () => {
|
|
221
221
|
b(), t("update:modelValue", "");
|
|
@@ -226,7 +226,7 @@ const je = ["value", "onKeydown"], Ye = { class: "flex absolute inset-y-0 right-
|
|
|
226
226
|
return ce(T, b), Ce(() => {
|
|
227
227
|
if (w.value) {
|
|
228
228
|
const k = I.value.getBoundingClientRect(), $ = w.value.getBoundingClientRect();
|
|
229
|
-
g.value &&
|
|
229
|
+
g.value && n.value.length && (g.value = !1, f.value = k.bottom + $.height > window.innerHeight && window.innerHeight - k.bottom < k.top && window.pageYOffset + k.top - $.height > 0 ? "bottom-0 -translate-y-12" : "top-0 translate-y-12");
|
|
230
230
|
const R = w.value.querySelector('[data-result-index="' + o.value + '"]');
|
|
231
231
|
if (R) {
|
|
232
232
|
let N = R.getBoundingClientRect();
|
|
@@ -256,18 +256,18 @@ const je = ["value", "onKeydown"], Ye = { class: "flex absolute inset-y-0 right-
|
|
|
256
256
|
onBlur: E
|
|
257
257
|
}), null, 16, je),
|
|
258
258
|
r("span", Ye, [
|
|
259
|
-
y.value ? (u(), v("svg", Ee, Re)) :
|
|
259
|
+
y.value ? (u(), v("svg", Ee, Re)) : D("", !0)
|
|
260
260
|
]),
|
|
261
|
-
|
|
261
|
+
n.value.length ? (u(), v("ul", j({
|
|
262
262
|
key: 0,
|
|
263
263
|
ref_key: "resultList",
|
|
264
264
|
ref: w
|
|
265
|
-
},
|
|
265
|
+
}, K.value, {
|
|
266
266
|
onClick: we,
|
|
267
267
|
onMousedown: $[1] || ($[1] = P(() => {
|
|
268
268
|
}, ["prevent"]))
|
|
269
269
|
}), [
|
|
270
|
-
(u(!0), v(A, null, O(
|
|
270
|
+
(u(!0), v(A, null, O(n.value, (R, N) => B(k.$slots, "result", {
|
|
271
271
|
result: R,
|
|
272
272
|
props: F.value[N]
|
|
273
273
|
}, () => [
|
|
@@ -275,7 +275,7 @@ const je = ["value", "onKeydown"], Ye = { class: "flex absolute inset-y-0 right-
|
|
|
275
275
|
key: F.value[N].id
|
|
276
276
|
}, F.value[N]), S(e.getResultValue(R)), 17))
|
|
277
277
|
])), 256))
|
|
278
|
-
], 16)) :
|
|
278
|
+
], 16)) : D("", !0)
|
|
279
279
|
], 2));
|
|
280
280
|
}
|
|
281
281
|
}), He = {
|
|
@@ -306,15 +306,15 @@ const je = ["value", "onKeydown"], Ye = { class: "flex absolute inset-y-0 right-
|
|
|
306
306
|
}
|
|
307
307
|
},
|
|
308
308
|
setup(e, { expose: d }) {
|
|
309
|
-
const t = e,
|
|
310
|
-
let c = null,
|
|
311
|
-
const o =
|
|
312
|
-
l.value = !1, f.value !== void 0 ? f.value ? c() :
|
|
309
|
+
const t = e, s = x(""), a = x(""), l = x(!1);
|
|
310
|
+
let c = null, n = null;
|
|
311
|
+
const o = _(() => Array.isArray(t.buttons) ? t.buttons : [t.buttons]), m = x(null), i = (f, g) => {
|
|
312
|
+
l.value = !1, f.value !== void 0 ? f.value ? c() : n() : g ? n() : c();
|
|
313
313
|
};
|
|
314
|
-
return d({ open: (f, g) => (
|
|
315
|
-
c = w,
|
|
314
|
+
return d({ open: (f, g) => (s.value = f, a.value = g, l.value = !0, re(() => m.value.firstElementChild.focus()), new Promise((w, I) => {
|
|
315
|
+
c = w, n = I;
|
|
316
316
|
})) }), (f, g) => (u(), v(A, null, [
|
|
317
|
-
l.value ? (u(), v("div", He)) :
|
|
317
|
+
l.value ? (u(), v("div", He)) : D("", !0),
|
|
318
318
|
Y(oe, { name: "appear" }, {
|
|
319
319
|
default: Q(() => [
|
|
320
320
|
l.value ? (u(), v("div", Ue, [
|
|
@@ -322,14 +322,14 @@ const je = ["value", "onKeydown"], Ye = { class: "flex absolute inset-y-0 right-
|
|
|
322
322
|
l.value ? (u(), v("div", Ze, [
|
|
323
323
|
qe,
|
|
324
324
|
r("div", Ke, [
|
|
325
|
-
|
|
325
|
+
s.value ? (u(), v("h3", {
|
|
326
326
|
key: 0,
|
|
327
327
|
class: C(["py-4 pt-4 text-lg font-medium text-center sm:py-6", e.headerClass])
|
|
328
328
|
}, [
|
|
329
|
-
B(f.$slots, "title", { title:
|
|
330
|
-
z(S(
|
|
329
|
+
B(f.$slots, "title", { title: s.value }, () => [
|
|
330
|
+
z(S(s.value), 1)
|
|
331
331
|
])
|
|
332
|
-
], 2)) :
|
|
332
|
+
], 2)) : D("", !0),
|
|
333
333
|
r("div", Ge, [
|
|
334
334
|
r("div", Xe, [
|
|
335
335
|
r("div", Je, [
|
|
@@ -353,9 +353,9 @@ const je = ["value", "onKeydown"], Ye = { class: "flex absolute inset-y-0 right-
|
|
|
353
353
|
], 512)
|
|
354
354
|
])
|
|
355
355
|
])
|
|
356
|
-
])) :
|
|
356
|
+
])) : D("", !0)
|
|
357
357
|
])
|
|
358
|
-
])) :
|
|
358
|
+
])) : D("", !0)
|
|
359
359
|
]),
|
|
360
360
|
_: 3
|
|
361
361
|
})
|
|
@@ -363,31 +363,31 @@ const je = ["value", "onKeydown"], Ye = { class: "flex absolute inset-y-0 right-
|
|
|
363
363
|
}
|
|
364
364
|
};
|
|
365
365
|
function tt(e, d) {
|
|
366
|
-
const t = x(!1),
|
|
367
|
-
let a, l =
|
|
368
|
-
if ((a =
|
|
366
|
+
const t = x(!1), s = de(d);
|
|
367
|
+
let a, l = s.toLowerCase().replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), c = [];
|
|
368
|
+
if ((a = s.match(/\bd\b/gi)) && a.length === 1)
|
|
369
369
|
l = l.replace("d", "(\\d{1,2})");
|
|
370
|
-
else if ((a =
|
|
370
|
+
else if ((a = s.match(/\bdd\b/gi)) && a.length === 1)
|
|
371
371
|
l = l.replace("dd", "(\\d{2})");
|
|
372
372
|
else
|
|
373
373
|
return { date: t };
|
|
374
|
-
if (c.push({ srcPos:
|
|
374
|
+
if (c.push({ srcPos: s.toLowerCase().indexOf("d"), destPos: 2 }), (a = s.match(/\bm\b/gi)) && a.length === 1)
|
|
375
375
|
l = l.replace("m", "(\\d{1,2})");
|
|
376
|
-
else if ((a =
|
|
376
|
+
else if ((a = s.match(/\bmm\b/gi)) && a.length === 1)
|
|
377
377
|
l = l.replace("mm", "(\\d{2})");
|
|
378
378
|
else
|
|
379
379
|
return { date: t };
|
|
380
|
-
if (c.push({ srcPos:
|
|
380
|
+
if (c.push({ srcPos: s.toLowerCase().indexOf("m"), destPos: 1 }), (a = s.match(/\byyyy\b/gi)) && a.length === 1)
|
|
381
381
|
l = l.replace("yyyy", "(\\d{4})");
|
|
382
382
|
else
|
|
383
383
|
return { date: t };
|
|
384
|
-
if (c.push({ srcPos:
|
|
384
|
+
if (c.push({ srcPos: s.toLowerCase().indexOf("y"), destPos: 0 }), !(a = de(e).match(l)))
|
|
385
385
|
return { date: t };
|
|
386
386
|
a.shift(), c.sort((i, y) => i.srcPos < y.srcPos ? -1 : 1);
|
|
387
|
-
let
|
|
387
|
+
let n = [], o, m;
|
|
388
388
|
for (; o = a.shift(); )
|
|
389
|
-
m = c.shift(),
|
|
390
|
-
return
|
|
389
|
+
m = c.shift(), n[m.destPos] = o;
|
|
390
|
+
return n = Date.parse(n.join("-")), n && (n = new Date(n), t.value = new Date(n.getFullYear(), n.getMonth(), n.getDate(), 0, 0, 0)), { date: t };
|
|
391
391
|
}
|
|
392
392
|
const lt = { key: 0 }, at = { class: "text-vxvue-700" }, st = /* @__PURE__ */ r("svg", {
|
|
393
393
|
class: "w-2 h-2",
|
|
@@ -428,12 +428,12 @@ const lt = { key: 0 }, at = { class: "text-vxvue-700" }, st = /* @__PURE__ */ r(
|
|
|
428
428
|
},
|
|
429
429
|
emits: ["update:modelValue", "toggle-datepicker"],
|
|
430
430
|
setup(e, { emit: d }) {
|
|
431
|
-
const t = d,
|
|
432
|
-
let
|
|
433
|
-
return delete
|
|
431
|
+
const t = d, s = e, a = x(""), l = _(() => s.modelValue ? ve(s.modelValue, s.outputFormat) : ""), c = _(() => {
|
|
432
|
+
let n = Object.assign({}, W());
|
|
433
|
+
return delete n.class, n;
|
|
434
434
|
});
|
|
435
|
-
return H(() =>
|
|
436
|
-
class: C(["inline-block relative",
|
|
435
|
+
return H(() => s.modelValue, (n) => a.value = n ? ve(n, s.outputFormat) : ""), (n, o) => (u(), v("div", {
|
|
436
|
+
class: C(["inline-block relative", n.$attrs.class])
|
|
437
437
|
}, [
|
|
438
438
|
l.value ? (u(), v("div", lt, [
|
|
439
439
|
r("div", {
|
|
@@ -452,7 +452,7 @@ const lt = { key: 0 }, at = { class: "text-vxvue-700" }, st = /* @__PURE__ */ r(
|
|
|
452
452
|
"onUpdate:modelValue": o[1] || (o[1] = (m) => a.value = m),
|
|
453
453
|
onBlur: o[2] || (o[2] = (m) => {
|
|
454
454
|
var i;
|
|
455
|
-
return t("update:modelValue", ((i =
|
|
455
|
+
return t("update:modelValue", ((i = V(tt)(a.value, s.inputFormat).date) == null ? void 0 : i.value) || null);
|
|
456
456
|
}),
|
|
457
457
|
onInput: o[3] || (o[3] = P(() => {
|
|
458
458
|
}, ["prevent"]))
|
|
@@ -465,8 +465,8 @@ const lt = { key: 0 }, at = { class: "text-vxvue-700" }, st = /* @__PURE__ */ r(
|
|
|
465
465
|
"aria-label": "datepicker-toggle",
|
|
466
466
|
onClick: o[4] || (o[4] = P((m) => t("toggle-datepicker"), ["stop"])),
|
|
467
467
|
ref: "toggleButton"
|
|
468
|
-
}, rt, 512)) :
|
|
469
|
-
B(
|
|
468
|
+
}, rt, 512)) : D("", !0),
|
|
469
|
+
B(n.$slots, "default")
|
|
470
470
|
], 2));
|
|
471
471
|
}
|
|
472
472
|
});
|
|
@@ -603,31 +603,31 @@ const ht = { class: "flex items-center py-2 px-3 text-white bg-vxvue-700" }, pt
|
|
|
603
603
|
},
|
|
604
604
|
emits: ["update:modelValue", "month-change", "year-change"],
|
|
605
605
|
setup(e, { emit: d }) {
|
|
606
|
-
const t = e,
|
|
606
|
+
const t = e, s = d, a = (() => {
|
|
607
607
|
let b = /* @__PURE__ */ new Date();
|
|
608
608
|
return new Date(b.getFullYear(), b.getMonth(), b.getDate());
|
|
609
|
-
})(), l = x(new Date(a.getFullYear(), a.getMonth(), 1)), c = x(null),
|
|
609
|
+
})(), l = x(new Date(a.getFullYear(), a.getMonth(), 1)), c = x(null), n = x(!t.hasInput), o = x("left-0"), m = x("top-0"), i = x(null), y = x(null), f = x(null), g = _(() => t.hasInput ? { class: ["absolute", n.value ? "block" : "hidden"] } : {}), w = _(() => {
|
|
610
610
|
const b = [], p = l.value.getFullYear(), h = l.value.getMonth(), M = new Date(p, h + 1, 0), L = new Date(p, h, 0).getDay() + 1 - t.startOfWeekIndex, E = (6 + t.startOfWeekIndex - M.getDay()) % 7;
|
|
611
611
|
for (let G = -L, te = M.getDate() + E; G < te; ++G)
|
|
612
612
|
b.push(new Date(p, h, G + 1));
|
|
613
613
|
return b;
|
|
614
|
-
}), I =
|
|
614
|
+
}), I = _(() => t.startOfWeekIndex ? t.dayNames.slice(1).concat(t.dayNames[0]) : t.dayNames.slice());
|
|
615
615
|
H(() => t.modelValue, (b) => {
|
|
616
616
|
b ? (c.value = new Date(b.getFullYear(), b.getMonth(), b.getDate()), l.value = new Date(c.value.getTime())) : (c.value = null, l.value = new Date(a.getTime())), l.value.setDate(1);
|
|
617
|
-
}, { immediate: !0 }), H(
|
|
617
|
+
}, { immediate: !0 }), H(n, (b) => {
|
|
618
618
|
b && t.hasInput && re(() => {
|
|
619
619
|
const p = i.value.$el.getBoundingClientRect(), h = y.value.getBoundingClientRect();
|
|
620
620
|
o.value = p.left + h.width > window.innerWidth ? "right-0" : "left-0", m.value = p.bottom + h.height > window.innerHeight ? "bottom-0 -translate-y-12" : "top-0 translate-y-12";
|
|
621
621
|
});
|
|
622
|
-
}), ce(y, () =>
|
|
622
|
+
}), ce(y, () => n.value = !1, { ignore: [f] });
|
|
623
623
|
const T = (b) => {
|
|
624
|
-
l.value = new Date(l.value.getFullYear(), b, 1),
|
|
624
|
+
l.value = new Date(l.value.getFullYear(), b, 1), s("month-change", l.value);
|
|
625
625
|
}, F = (b) => {
|
|
626
|
-
l.value = new Date(b, l.value.getMonth(), 1),
|
|
626
|
+
l.value = new Date(b, l.value.getMonth(), 1), s("year-change", l.value);
|
|
627
627
|
}, U = (b) => {
|
|
628
|
-
c.value = b,
|
|
629
|
-
},
|
|
630
|
-
c.value = b,
|
|
628
|
+
c.value = b, s("update:modelValue", b), n.value = !t.hasInput;
|
|
629
|
+
}, K = (b) => {
|
|
630
|
+
c.value = b, s("update:modelValue", b);
|
|
631
631
|
};
|
|
632
632
|
return ue(() => {
|
|
633
633
|
var b;
|
|
@@ -635,11 +635,11 @@ const ht = { class: "flex items-center py-2 px-3 text-white bg-vxvue-700" }, pt
|
|
|
635
635
|
}), (b, p) => (u(), v("div", {
|
|
636
636
|
class: C(["relative", b.$attrs.class])
|
|
637
637
|
}, [
|
|
638
|
-
e.hasInput ? (u(),
|
|
638
|
+
e.hasInput ? (u(), q(ut, j({
|
|
639
639
|
key: 0,
|
|
640
640
|
modelValue: c.value,
|
|
641
|
-
onToggleDatepicker: p[0] || (p[0] = (h) =>
|
|
642
|
-
"onUpdate:modelValue":
|
|
641
|
+
onToggleDatepicker: p[0] || (p[0] = (h) => n.value = !n.value),
|
|
642
|
+
"onUpdate:modelValue": K
|
|
643
643
|
}, b.$attrs, {
|
|
644
644
|
ref_key: "input",
|
|
645
645
|
ref: i,
|
|
@@ -650,7 +650,7 @@ const ht = { class: "flex items-center py-2 px-3 text-white bg-vxvue-700" }, pt
|
|
|
650
650
|
B(b.$slots, "default")
|
|
651
651
|
]),
|
|
652
652
|
_: 3
|
|
653
|
-
}, 16, ["modelValue", "locale"])) :
|
|
653
|
+
}, 16, ["modelValue", "locale"])) : D("", !0),
|
|
654
654
|
r("div", j({ class: "z-10 bg-white shadow-md" }, g.value, {
|
|
655
655
|
ref_key: "calendar",
|
|
656
656
|
ref: y,
|
|
@@ -662,14 +662,14 @@ const ht = { class: "flex items-center py-2 px-3 text-white bg-vxvue-700" }, pt
|
|
|
662
662
|
onClick: p[1] || (p[1] = P((h) => T(l.value.getMonth() - 1), ["stop"])),
|
|
663
663
|
class: "flex-shrink-0 text-vxvue-100 hover:text-vxvue-50"
|
|
664
664
|
}, [
|
|
665
|
-
Y(
|
|
665
|
+
Y(V(se), { class: "w-6 h-6" })
|
|
666
666
|
]),
|
|
667
667
|
r("span", null, S(l.value.toLocaleString(e.locale, { month: "long" })), 1),
|
|
668
668
|
r("button", {
|
|
669
669
|
onClick: p[2] || (p[2] = P((h) => T(l.value.getMonth() + 1), ["stop"])),
|
|
670
670
|
class: "flex-shrink-0 text-vxvue-100 hover:text-vxvue-50"
|
|
671
671
|
}, [
|
|
672
|
-
Y(
|
|
672
|
+
Y(V(ne), { class: "w-6 h-6" })
|
|
673
673
|
])
|
|
674
674
|
]),
|
|
675
675
|
r("div", gt, [
|
|
@@ -677,14 +677,14 @@ const ht = { class: "flex items-center py-2 px-3 text-white bg-vxvue-700" }, pt
|
|
|
677
677
|
onClick: p[3] || (p[3] = P((h) => F(l.value.getFullYear() - 1), ["stop"])),
|
|
678
678
|
class: "flex-shrink-0 text-vxvue-100 hover:text-vxvue-50"
|
|
679
679
|
}, [
|
|
680
|
-
Y(
|
|
680
|
+
Y(V(se), { class: "w-6 h-6" })
|
|
681
681
|
]),
|
|
682
682
|
r("div", null, S(l.value.getFullYear()), 1),
|
|
683
683
|
r("button", {
|
|
684
684
|
onClick: p[4] || (p[4] = P((h) => F(l.value.getFullYear() + 1), ["stop"])),
|
|
685
685
|
class: "flex-shrink-0 text-vxvue-100 hover:text-vxvue-50"
|
|
686
686
|
}, [
|
|
687
|
-
Y(
|
|
687
|
+
Y(V(ne), { class: "w-6 h-6" })
|
|
688
688
|
])
|
|
689
689
|
])
|
|
690
690
|
]),
|
|
@@ -700,7 +700,7 @@ const ht = { class: "flex items-center py-2 px-3 text-white bg-vxvue-700" }, pt
|
|
|
700
700
|
class: C([
|
|
701
701
|
{
|
|
702
702
|
"bg-vxvue-700 text-white": c.value && h.getTime() === c.value.getTime(),
|
|
703
|
-
"bg-gray-200": h.getTime() ===
|
|
703
|
+
"bg-gray-200": h.getTime() === V(a).getTime(),
|
|
704
704
|
"text-red-400": e.validFrom && e.validFrom > h || e.validUntil && e.validUntil < h
|
|
705
705
|
},
|
|
706
706
|
"py-2 px-3 rounded-sm"
|
|
@@ -724,19 +724,19 @@ const ht = { class: "flex items-center py-2 px-3 text-white bg-vxvue-700" }, pt
|
|
|
724
724
|
},
|
|
725
725
|
emits: ["update:modelValue", "form-data"],
|
|
726
726
|
setup(e, { emit: d }) {
|
|
727
|
-
const t = d,
|
|
728
|
-
const
|
|
727
|
+
const t = d, s = e, a = (c) => {
|
|
728
|
+
const n = new FormData();
|
|
729
729
|
for (let o of c)
|
|
730
|
-
|
|
731
|
-
return
|
|
730
|
+
n.append(s.name, o, o.name);
|
|
731
|
+
return n;
|
|
732
732
|
}, l = (c) => {
|
|
733
|
-
const
|
|
734
|
-
if (
|
|
735
|
-
const o = [...
|
|
733
|
+
const n = c.target.files || c.dataTransfer.files;
|
|
734
|
+
if (n) {
|
|
735
|
+
const o = [...n];
|
|
736
736
|
t("update:modelValue", o), t("form-data", a(o));
|
|
737
737
|
}
|
|
738
738
|
};
|
|
739
|
-
return (c,
|
|
739
|
+
return (c, n) => (u(), v("label", { for: e.id }, [
|
|
740
740
|
B(c.$slots, "default", {}, () => [
|
|
741
741
|
z("Upload")
|
|
742
742
|
]),
|
|
@@ -760,12 +760,12 @@ const ht = { class: "flex items-center py-2 px-3 text-white bg-vxvue-700" }, pt
|
|
|
760
760
|
emits: ["update:modelValue"],
|
|
761
761
|
setup(e, { emit: d }) {
|
|
762
762
|
const t = d;
|
|
763
|
-
return (
|
|
763
|
+
return (s, a) => (u(), v("select", j(s.$attrs, {
|
|
764
764
|
value: e.modelValue,
|
|
765
765
|
class: "form-select",
|
|
766
766
|
onChange: a[0] || (a[0] = (l) => t("update:modelValue", l.target.value))
|
|
767
767
|
}), [
|
|
768
|
-
e.disabledLabel ? (u(), v("option", $t, S(e.disabledLabel), 1)) :
|
|
768
|
+
e.disabledLabel ? (u(), v("option", $t, S(e.disabledLabel), 1)) : D("", !0),
|
|
769
769
|
(u(!0), v(A, null, O(e.options, (l) => (u(), v("option", {
|
|
770
770
|
value: l.key !== void 0 ? l.key : l.label || l,
|
|
771
771
|
selected: (l.key !== void 0 ? l.key : l.label || l) === e.modelValue
|
|
@@ -777,41 +777,50 @@ const ht = { class: "flex items-center py-2 px-3 text-white bg-vxvue-700" }, pt
|
|
|
777
777
|
props: ["modelValue"],
|
|
778
778
|
emits: ["update:modelValue"],
|
|
779
779
|
setup(e, { emit: d }) {
|
|
780
|
-
const t =
|
|
781
|
-
let
|
|
782
|
-
return delete
|
|
783
|
-
});
|
|
784
|
-
return (
|
|
780
|
+
const t = d, s = _(() => {
|
|
781
|
+
let l = Object.assign({}, W());
|
|
782
|
+
return delete l.class, l;
|
|
783
|
+
}), a = _(() => W().disabled || W().disabled === "");
|
|
784
|
+
return (l, c) => (u(), v(A, null, [
|
|
785
785
|
r("label", {
|
|
786
|
-
class: C(
|
|
786
|
+
class: C(l.$attrs.class),
|
|
787
|
+
tabindex: "0"
|
|
787
788
|
}, [
|
|
788
789
|
r("span", {
|
|
789
|
-
class: C([a.value, "inline-flex relative flex-shrink-0 w-11 h-6 rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out cursor-pointer focus:ring-2 focus:ring-offset-2 focus:outline-none focus:ring-vxvue"]),
|
|
790
790
|
role: "switch",
|
|
791
|
+
class: C([
|
|
792
|
+
"inline-flex relative flex-shrink-0 w-11 h-6 rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out cursor-pointer focus:ring-2 focus:ring-offset-2 focus:outline-none focus:ring-vxvue",
|
|
793
|
+
a.value ? "bg-slate-200" : e.modelValue ? "bg-vxvue" : "bg-slate-300"
|
|
794
|
+
]),
|
|
791
795
|
"aria-checked": !!e.modelValue,
|
|
792
|
-
"aria-label":
|
|
796
|
+
"aria-label": l.$attrs["aria-label"]
|
|
793
797
|
}, [
|
|
794
798
|
r("span", {
|
|
795
799
|
"aria-hidden": "true",
|
|
796
|
-
class: C([
|
|
800
|
+
class: C([
|
|
801
|
+
"inline-block size-5 rounded-full ring-0 shadow transition duration-200 ease-in-out transform pointer-events-none",
|
|
802
|
+
e.modelValue ? "translate-x-5" : "translate-x-0",
|
|
803
|
+
a.value ? "bg-slate-100" : "bg-white"
|
|
804
|
+
])
|
|
797
805
|
}, null, 2),
|
|
798
|
-
r("input", j({
|
|
806
|
+
r("input", j(s.value, {
|
|
807
|
+
checked: e.modelValue,
|
|
799
808
|
class: "hidden",
|
|
800
809
|
value: "1",
|
|
801
810
|
type: "checkbox",
|
|
802
|
-
onChange:
|
|
803
|
-
}
|
|
811
|
+
onChange: c[0] || (c[0] = (n) => t("update:modelValue", n.target.checked))
|
|
812
|
+
}), null, 16, Vt)
|
|
804
813
|
], 10, Mt)
|
|
805
814
|
], 2),
|
|
806
|
-
B(
|
|
815
|
+
B(l.$slots, "default")
|
|
807
816
|
], 64));
|
|
808
817
|
}
|
|
809
818
|
}, be = (e, d) => {
|
|
810
819
|
const t = e.__vccOpts || e;
|
|
811
|
-
for (const [
|
|
812
|
-
t[
|
|
820
|
+
for (const [s, a] of d)
|
|
821
|
+
t[s] = a;
|
|
813
822
|
return t;
|
|
814
|
-
}, Dt = (e) => (Me("data-v-
|
|
823
|
+
}, Dt = (e) => (Me("data-v-dbccf282"), e = e(), Ve(), e), _t = {
|
|
815
824
|
"aria-live": "assertive",
|
|
816
825
|
class: "flex fixed inset-0 z-50 items-start py-6 px-4 pointer-events-none sm:p-6"
|
|
817
826
|
}, At = { class: "flex flex-col items-center space-y-4 w-full" }, Bt = { class: "p-4" }, Pt = { class: "flex items-start" }, Lt = { class: "flex-shrink-0" }, Ft = { class: "flex-1 pt-0.5 ml-3 w-0" }, It = { class: "font-bold" }, Tt = { class: "mt-1" }, Ot = { class: "flex flex-shrink-0 ml-4" }, jt = /* @__PURE__ */ Dt(() => /* @__PURE__ */ r("span", { class: "sr-only" }, "Close", -1)), Yt = /* @__PURE__ */ Object.assign({
|
|
@@ -826,55 +835,55 @@ const ht = { class: "flex items-center py-2 px-3 text-white bg-vxvue-700" }, pt
|
|
|
826
835
|
},
|
|
827
836
|
emits: ["timeout", "close"],
|
|
828
837
|
setup(e, { emit: d }) {
|
|
829
|
-
const t = e,
|
|
838
|
+
const t = e, s = d, a = x(null), l = _(() => typeof t.message == "string" ? [t.message] : t.message), c = () => {
|
|
830
839
|
window.clearTimeout(a.value), t.active && t.timeout && (a.value = window.setTimeout(() => {
|
|
831
|
-
|
|
840
|
+
s("timeout");
|
|
832
841
|
}, t.timeout));
|
|
833
842
|
};
|
|
834
|
-
return H(() => t.active, c), ue(c), (
|
|
843
|
+
return H(() => t.active, c), ue(c), (n, o) => (u(), v("div", _t, [
|
|
835
844
|
r("div", At, [
|
|
836
845
|
Y(oe, { name: "messagetoast-fade" }, {
|
|
837
846
|
default: Q(() => [
|
|
838
847
|
e.active ? (u(), v("div", {
|
|
839
848
|
key: 0,
|
|
840
|
-
class: C(["overflow-hidden w-full max-w-sm rounded-md ring-1 ring-black ring-opacity-5 shadow-lg pointer-events-auto",
|
|
849
|
+
class: C(["overflow-hidden w-full max-w-sm rounded-md ring-1 ring-black ring-opacity-5 shadow-lg pointer-events-auto", n.$attrs.class])
|
|
841
850
|
}, [
|
|
842
851
|
r("div", Bt, [
|
|
843
852
|
r("div", Pt, [
|
|
844
853
|
r("div", Lt, [
|
|
845
|
-
B(
|
|
854
|
+
B(n.$slots, "icon", {}, void 0, !0)
|
|
846
855
|
]),
|
|
847
856
|
r("div", Ft, [
|
|
848
857
|
r("p", It, [
|
|
849
|
-
B(
|
|
858
|
+
B(n.$slots, "title", {}, () => [
|
|
850
859
|
z(S(e.title), 1)
|
|
851
860
|
], !0)
|
|
852
861
|
]),
|
|
853
862
|
(u(!0), v(A, null, O(l.value, (m) => (u(), v("p", Tt, [
|
|
854
|
-
B(
|
|
863
|
+
B(n.$slots, "default", {}, () => [
|
|
855
864
|
z(S(m), 1)
|
|
856
865
|
], !0)
|
|
857
866
|
]))), 256))
|
|
858
867
|
]),
|
|
859
868
|
r("div", Ot, [
|
|
860
869
|
r("button", {
|
|
861
|
-
onClick: o[0] || (o[0] = (m) =>
|
|
870
|
+
onClick: o[0] || (o[0] = (m) => s("close")),
|
|
862
871
|
class: "inline-flex text-white bg-black bg-opacity-20 rounded-sm focus:ring-2 focus:outline-none hover:text-stone-200 focus:ring-stone-200"
|
|
863
872
|
}, [
|
|
864
873
|
jt,
|
|
865
|
-
Y(
|
|
874
|
+
Y(V(ft), { class: "size-5" })
|
|
866
875
|
])
|
|
867
876
|
])
|
|
868
877
|
])
|
|
869
878
|
])
|
|
870
|
-
], 2)) :
|
|
879
|
+
], 2)) : D("", !0)
|
|
871
880
|
]),
|
|
872
881
|
_: 3
|
|
873
882
|
})
|
|
874
883
|
])
|
|
875
884
|
]));
|
|
876
885
|
}
|
|
877
|
-
}), yl = /* @__PURE__ */ be(Yt, [["__scopeId", "data-v-
|
|
886
|
+
}), yl = /* @__PURE__ */ be(Yt, [["__scopeId", "data-v-dbccf282"]]), Et = {
|
|
878
887
|
key: 0,
|
|
879
888
|
class: "fixed inset-0 z-[9998] bg-white/50 backdrop-blur-sm",
|
|
880
889
|
"aria-hidden": "true"
|
|
@@ -891,9 +900,9 @@ const ht = { class: "flex items-center py-2 px-3 text-white bg-vxvue-700" }, pt
|
|
|
891
900
|
},
|
|
892
901
|
emits: ["clicked-outside"],
|
|
893
902
|
setup(e, { emit: d }) {
|
|
894
|
-
const t = d,
|
|
895
|
-
return ce(
|
|
896
|
-
e.show ? (u(), v("div", Et)) :
|
|
903
|
+
const t = d, s = x(null);
|
|
904
|
+
return ce(s, () => t("clicked-outside")), (a, l) => (u(), v(A, null, [
|
|
905
|
+
e.show ? (u(), v("div", Et)) : D("", !0),
|
|
897
906
|
Y(oe, { name: "appear" }, {
|
|
898
907
|
default: Q(() => [
|
|
899
908
|
e.show ? (u(), v("div", Nt, [
|
|
@@ -901,7 +910,7 @@ const ht = { class: "flex items-center py-2 px-3 text-white bg-vxvue-700" }, pt
|
|
|
901
910
|
r("div", {
|
|
902
911
|
class: C(["overflow-hidden relative max-w-full bg-white rounded ring-1 ring-black ring-opacity-10 shadow-xl transition-all transform xl:max-w-screen-xl", e.containerClass]),
|
|
903
912
|
ref_key: "container",
|
|
904
|
-
ref:
|
|
913
|
+
ref: s
|
|
905
914
|
}, [
|
|
906
915
|
r("div", {
|
|
907
916
|
class: C(e.headerClass)
|
|
@@ -915,7 +924,7 @@ const ht = { class: "flex items-center py-2 px-3 text-white bg-vxvue-700" }, pt
|
|
|
915
924
|
], 2)
|
|
916
925
|
], 2)
|
|
917
926
|
])
|
|
918
|
-
])) :
|
|
927
|
+
])) : D("", !0)
|
|
919
928
|
]),
|
|
920
929
|
_: 3
|
|
921
930
|
})
|
|
@@ -947,9 +956,9 @@ const ht = { class: "flex items-center py-2 px-3 text-white bg-vxvue-700" }, pt
|
|
|
947
956
|
},
|
|
948
957
|
emits: ["update:page"],
|
|
949
958
|
setup(e, { emit: d }) {
|
|
950
|
-
const t = d,
|
|
959
|
+
const t = d, s = e, a = x(Math.ceil(s.total / s.perPage)), l = x(null), c = _(() => (s.markerPosition === "above" ? "border-t-2 -mt-[2px]" : "border-b-2 -mb-[2px]") + " py-4"), n = _(() => {
|
|
951
960
|
let i = [1];
|
|
952
|
-
if (
|
|
961
|
+
if (s.showAllPages || a.value <= 7) {
|
|
953
962
|
for (let y = 2; y <= a.value; ++y)
|
|
954
963
|
i.push(y);
|
|
955
964
|
return i;
|
|
@@ -960,10 +969,10 @@ const ht = { class: "flex items-center py-2 px-3 text-white bg-vxvue-700" }, pt
|
|
|
960
969
|
}, m = () => {
|
|
961
970
|
l.value < a.value && t("update:page", l.value + 1);
|
|
962
971
|
};
|
|
963
|
-
return H(() =>
|
|
964
|
-
a.value = Math.ceil(
|
|
965
|
-
}), H(() =>
|
|
966
|
-
a.value = Math.ceil(
|
|
972
|
+
return H(() => s.page, (i) => l.value = Math.min(Math.max(i, 1), a.value), { immediate: !0 }), H(() => s.perPage, (i) => {
|
|
973
|
+
a.value = Math.ceil(s.total / s.perPage), t("update:page", 1);
|
|
974
|
+
}), H(() => s.total, (i) => {
|
|
975
|
+
a.value = Math.ceil(s.total / s.perPage), l.value > a.value && t("update:page", 1);
|
|
967
976
|
}), (i, y) => (u(), v("nav", Rt, [
|
|
968
977
|
r("div", Ht, [
|
|
969
978
|
e.showNavButtons ? (u(), v("a", {
|
|
@@ -972,12 +981,12 @@ const ht = { class: "flex items-center py-2 px-3 text-white bg-vxvue-700" }, pt
|
|
|
972
981
|
href: "#",
|
|
973
982
|
class: C(["inline-flex items-center pr-1 text-sm font-medium text-gray-500 border-transparent hover:text-gray-700 hover:border-gray-300", [{ "cursor-default pointer-events-none": l.value <= 1 }, c.value]])
|
|
974
983
|
}, [
|
|
975
|
-
Y(
|
|
984
|
+
Y(V(se), { class: "size-5" }),
|
|
976
985
|
z(" " + S(e.prevText), 1)
|
|
977
|
-
], 2)) :
|
|
986
|
+
], 2)) : D("", !0)
|
|
978
987
|
]),
|
|
979
988
|
r("div", Ut, [
|
|
980
|
-
(u(!0), v(A, null, O(
|
|
989
|
+
(u(!0), v(A, null, O(n.value, (f, g) => (u(), q(ie(f !== "dots" ? "a" : "span"), {
|
|
981
990
|
onClick: P((w) => f !== "dots" ? t("update:page", f) : null, ["prevent"]),
|
|
982
991
|
key: g,
|
|
983
992
|
href: f !== "dots" ? "#" : null,
|
|
@@ -1001,8 +1010,8 @@ const ht = { class: "flex items-center py-2 px-3 text-white bg-vxvue-700" }, pt
|
|
|
1001
1010
|
class: C(["inline-flex items-center pl-1 text-sm font-medium text-gray-500 border-transparent hover:text-gray-700 hover:border-gray-300", [c.value, { "cursor-default pointer-events-none": l.value >= a.value }]])
|
|
1002
1011
|
}, [
|
|
1003
1012
|
z(S(e.nextText) + " ", 1),
|
|
1004
|
-
Y(
|
|
1005
|
-
], 2)) :
|
|
1013
|
+
Y(V(ne), { class: "size-5" })
|
|
1014
|
+
], 2)) : D("", !0)
|
|
1006
1015
|
])
|
|
1007
1016
|
]));
|
|
1008
1017
|
}
|
|
@@ -1051,27 +1060,27 @@ const Kt = ["value", "type"], $l = /* @__PURE__ */ Object.assign({ inheritAttrs:
|
|
|
1051
1060
|
props: ["modelValue"],
|
|
1052
1061
|
emits: ["update:modelValue"],
|
|
1053
1062
|
setup(e, { emit: d }) {
|
|
1054
|
-
const t = d,
|
|
1055
|
-
let l = Object.assign({},
|
|
1063
|
+
const t = d, s = x(!1), a = _(() => {
|
|
1064
|
+
let l = Object.assign({}, W());
|
|
1056
1065
|
return delete l.class, l;
|
|
1057
1066
|
});
|
|
1058
1067
|
return (l, c) => (u(), v("div", {
|
|
1059
|
-
class: C("inline-block relative " +
|
|
1068
|
+
class: C("inline-block relative " + W().class)
|
|
1060
1069
|
}, [
|
|
1061
1070
|
r("input", j({
|
|
1062
1071
|
value: e.modelValue,
|
|
1063
|
-
type:
|
|
1064
|
-
onInput: c[0] || (c[0] = (
|
|
1072
|
+
type: s.value ? "text" : "password",
|
|
1073
|
+
onInput: c[0] || (c[0] = (n) => t("update:modelValue", n.target.value))
|
|
1065
1074
|
}, a.value, { class: "block pr-10 w-full form-input peer" }), null, 16, Kt),
|
|
1066
1075
|
r("button", {
|
|
1067
1076
|
class: "flex absolute inset-y-0 right-0 items-center pr-3 text-brand-700 hover:text-brand",
|
|
1068
1077
|
"aria-label": "show-password-toggle",
|
|
1069
|
-
onClick: c[1] || (c[1] = P((
|
|
1078
|
+
onClick: c[1] || (c[1] = P((n) => s.value = !s.value, ["stop"]))
|
|
1070
1079
|
}, [
|
|
1071
|
-
|
|
1080
|
+
s.value ? (u(), q(V(Zt), {
|
|
1072
1081
|
key: 0,
|
|
1073
1082
|
class: "size-5"
|
|
1074
|
-
})) : (u(),
|
|
1083
|
+
})) : (u(), q(V(qt), {
|
|
1075
1084
|
key: 1,
|
|
1076
1085
|
class: "size-5"
|
|
1077
1086
|
}))
|
|
@@ -1087,11 +1096,11 @@ const Kt = ["value", "type"], $l = /* @__PURE__ */ Object.assign({ inheritAttrs:
|
|
|
1087
1096
|
props: { branch: { type: Object, default: {} } },
|
|
1088
1097
|
emits: ["branch-selected", "expand"],
|
|
1089
1098
|
setup(e, { emit: d }) {
|
|
1090
|
-
const t = e,
|
|
1099
|
+
const t = e, s = d, a = x(!1);
|
|
1091
1100
|
return ue(() => {
|
|
1092
|
-
t.branch.current &&
|
|
1101
|
+
t.branch.current && s("expand", !0);
|
|
1093
1102
|
}), (l, c) => {
|
|
1094
|
-
const
|
|
1103
|
+
const n = De("simple-tree", !0);
|
|
1095
1104
|
return u(), v("div", {
|
|
1096
1105
|
class: C([!e.branch.branches || !e.branch.branches.length ? "terminates" : "", l.$attrs.class])
|
|
1097
1106
|
}, [
|
|
@@ -1108,27 +1117,27 @@ const Kt = ["value", "type"], $l = /* @__PURE__ */ Object.assign({ inheritAttrs:
|
|
|
1108
1117
|
for: "branch-" + e.branch.id,
|
|
1109
1118
|
class: "mr-2"
|
|
1110
1119
|
}, [
|
|
1111
|
-
(u(),
|
|
1120
|
+
(u(), q(ie(a.value ? V(vt) : V(mt)), { class: "w-4 h-4 border" }))
|
|
1112
1121
|
], 8, Jt)
|
|
1113
|
-
], 64)) :
|
|
1122
|
+
], 64)) : D("", !0),
|
|
1114
1123
|
e.branch.current ? (u(), v("strong", Qt, S(e.branch.label), 1)) : (u(), v("a", {
|
|
1115
1124
|
key: 2,
|
|
1116
1125
|
href: e.branch.path,
|
|
1117
|
-
onClick: c[1] || (c[1] = P((o) =>
|
|
1126
|
+
onClick: c[1] || (c[1] = P((o) => s("branch-selected", e.branch), ["prevent"]))
|
|
1118
1127
|
}, S(e.branch.label), 9, el))
|
|
1119
1128
|
]),
|
|
1120
1129
|
e.branch.branches && e.branch.branches.length ? fe((u(), v("ul", tl, [
|
|
1121
|
-
(u(!0), v(A, null, O(e.branch.branches, (o) => (u(),
|
|
1130
|
+
(u(!0), v(A, null, O(e.branch.branches, (o) => (u(), q(n, {
|
|
1122
1131
|
branch: o,
|
|
1123
1132
|
key: o.id,
|
|
1124
|
-
onBranchSelected: c[2] || (c[2] = (m) =>
|
|
1133
|
+
onBranchSelected: c[2] || (c[2] = (m) => s("branch-selected", m)),
|
|
1125
1134
|
onExpand: c[3] || (c[3] = (m) => {
|
|
1126
|
-
a.value = m,
|
|
1135
|
+
a.value = m, s("expand", m);
|
|
1127
1136
|
})
|
|
1128
1137
|
}, null, 8, ["branch"]))), 128))
|
|
1129
1138
|
], 512)), [
|
|
1130
1139
|
[_e, a.value]
|
|
1131
|
-
]) :
|
|
1140
|
+
]) : D("", !0)
|
|
1132
1141
|
], 2);
|
|
1133
1142
|
};
|
|
1134
1143
|
}
|
|
@@ -1145,12 +1154,12 @@ const Kt = ["value", "type"], $l = /* @__PURE__ */ Object.assign({ inheritAttrs:
|
|
|
1145
1154
|
},
|
|
1146
1155
|
emits: ["update:modelValue"],
|
|
1147
1156
|
setup(e, { emit: d }) {
|
|
1148
|
-
const t = e,
|
|
1149
|
-
let
|
|
1150
|
-
const o = x(null), m = x(0), i =
|
|
1157
|
+
const t = e, s = d, a = W(), l = { x: null, y: null }, c = { w: null, h: null };
|
|
1158
|
+
let n = !1;
|
|
1159
|
+
const o = x(null), m = x(0), i = _(() => {
|
|
1151
1160
|
const p = t.max, h = t.min;
|
|
1152
1161
|
return t.modelValue instanceof Array ? t.modelValue.map((M) => (Math.max(Math.min(M, p), h) - h) * 100 / (p - h)) : (Math.max(Math.min(t.modelValue, p), h) - h) * 100 / (p - h);
|
|
1153
|
-
}), y =
|
|
1162
|
+
}), y = _(() => {
|
|
1154
1163
|
if (t.modelValue instanceof Array) {
|
|
1155
1164
|
const p = Math.min(...i.value) + "%", h = Math.max(...i.value) - Math.min(...i.value) + "%";
|
|
1156
1165
|
return t.vertical ? { bottom: p, height: h } : { left: p, width: h };
|
|
@@ -1163,9 +1172,9 @@ const Kt = ["value", "type"], $l = /* @__PURE__ */ Object.assign({ inheritAttrs:
|
|
|
1163
1172
|
let h = parseFloat(p.toFixed(10));
|
|
1164
1173
|
if (h = Math.min(t.max, Math.max(t.min, h)), t.modelValue instanceof Array) {
|
|
1165
1174
|
let M = [...t.modelValue];
|
|
1166
|
-
M[m.value] = h,
|
|
1175
|
+
M[m.value] = h, s("update:modelValue", M);
|
|
1167
1176
|
} else
|
|
1168
|
-
|
|
1177
|
+
s("update:modelValue", h);
|
|
1169
1178
|
}, w = (p) => {
|
|
1170
1179
|
const { pageX: h, pageY: M } = p.touches ? p.touches[0] : p, L = t.vertical ? (-M + l.y) / c.h : (h - l.x) / c.w;
|
|
1171
1180
|
g(Math.floor((t.max - t.min) * L + t.min));
|
|
@@ -1173,12 +1182,12 @@ const Kt = ["value", "type"], $l = /* @__PURE__ */ Object.assign({ inheritAttrs:
|
|
|
1173
1182
|
const { clientLeft: p, clientTop: h, scrollLeft: M, scrollTop: L } = document.documentElement, E = o.value.getBoundingClientRect();
|
|
1174
1183
|
l.x = E.left + M - p, l.y = E.bottom + L - h, c.w = o.value.offsetWidth, c.h = o.value.offsetHeight;
|
|
1175
1184
|
}, T = (p) => {
|
|
1176
|
-
|
|
1185
|
+
n && (p.preventDefault(), w(p));
|
|
1177
1186
|
}, F = (p) => {
|
|
1178
|
-
p.preventDefault(), p.currentTarget.focus(), I(),
|
|
1187
|
+
p.preventDefault(), p.currentTarget.focus(), I(), n = !0, document.addEventListener("mousemove", T), document.addEventListener("mouseup", U);
|
|
1179
1188
|
}, U = () => {
|
|
1180
|
-
|
|
1181
|
-
},
|
|
1189
|
+
n && (n = !1, document.removeEventListener("mousemove", T), document.removeEventListener("mouseup", U));
|
|
1190
|
+
}, K = (p) => {
|
|
1182
1191
|
p.keyCode >= 33 && p.keyCode <= 40 && p.preventDefault();
|
|
1183
1192
|
const h = t.modelValue[m.value] ?? t.modelValue;
|
|
1184
1193
|
switch (p.keyCode) {
|
|
@@ -1218,18 +1227,18 @@ const Kt = ["value", "type"], $l = /* @__PURE__ */ Object.assign({ inheritAttrs:
|
|
|
1218
1227
|
}, le(e.disabled ? {} : {
|
|
1219
1228
|
click: b
|
|
1220
1229
|
}, !0)), [
|
|
1221
|
-
e.disabled ?
|
|
1230
|
+
e.disabled ? D("", !0) : (u(), v("div", {
|
|
1222
1231
|
key: 0,
|
|
1223
1232
|
class: C(["absolute bg-vxvue", e.vertical ? "w-full rounded-t-full rounded-b-full" : "h-full rounded-r-full rounded-l-full"]),
|
|
1224
1233
|
style: Ae(y.value)
|
|
1225
1234
|
}, null, 6)),
|
|
1226
1235
|
e.modelValue.length ? (u(!0), v(A, { key: 2 }, O(e.modelValue, (M, L) => (u(), v("button", j({
|
|
1227
|
-
id: L ? null :
|
|
1236
|
+
id: L ? null : V(a).id,
|
|
1228
1237
|
style: e.vertical ? { bottom: i.value[L] + "%" } : { left: i.value[L] + "%" },
|
|
1229
1238
|
"aria-label": "slider-thumb-" + (L + 1)
|
|
1230
1239
|
}, le(e.disabled ? {} : {
|
|
1231
1240
|
focus: () => m.value = L,
|
|
1232
|
-
keydown:
|
|
1241
|
+
keydown: K,
|
|
1233
1242
|
mousedown: (E) => {
|
|
1234
1243
|
m.value = L, F(E);
|
|
1235
1244
|
},
|
|
@@ -1240,12 +1249,12 @@ const Kt = ["value", "type"], $l = /* @__PURE__ */ Object.assign({ inheritAttrs:
|
|
|
1240
1249
|
touchend: U
|
|
1241
1250
|
}, !0), f.value), null, 16, sl))), 256)) : (u(), v("button", j({
|
|
1242
1251
|
key: 1,
|
|
1243
|
-
id:
|
|
1252
|
+
id: V(a).id,
|
|
1244
1253
|
style: e.vertical ? { bottom: i.value + "%" } : { left: i.value + "%" },
|
|
1245
1254
|
"aria-label": "slider-thumb"
|
|
1246
1255
|
}, le(e.disabled ? {} : {
|
|
1247
1256
|
focus: () => m.value = 0,
|
|
1248
|
-
keydown:
|
|
1257
|
+
keydown: K,
|
|
1249
1258
|
mousedown: (M) => {
|
|
1250
1259
|
m.value = 0, F(M);
|
|
1251
1260
|
},
|
|
@@ -1279,12 +1288,12 @@ const Kt = ["value", "type"], $l = /* @__PURE__ */ Object.assign({ inheritAttrs:
|
|
|
1279
1288
|
},
|
|
1280
1289
|
emits: ["before-sort", "after-sort"],
|
|
1281
1290
|
setup(e, { emit: d }) {
|
|
1282
|
-
const t = e,
|
|
1291
|
+
const t = e, s = d, a = x(t.sortProp), l = x(t.sortDirection), c = _(() => {
|
|
1283
1292
|
let o = t.rows.slice();
|
|
1284
1293
|
const m = t.columns.find(({ prop: i }) => i === a.value);
|
|
1285
1294
|
return m && (l.value === "asc" && m.sortAscFunction ? o.sort(m.sortAscFunction) : l.value === "desc" && m.sortDescFunction ? o.sort(m.sortDescFunction) : o.sort((i, y) => i[a.value] < y[a.value] ? l.value === "asc" ? -1 : 1 : i[a.value] > y[a.value] ? l.value === "asc" ? 1 : -1 : 0)), o.slice(t.offset || 0, (t.offset || 0) + (t.count || o.length));
|
|
1286
|
-
}),
|
|
1287
|
-
|
|
1295
|
+
}), n = (o) => {
|
|
1296
|
+
s("before-sort", { prop: a.value, dir: l.value }), a.value === o ? l.value = l.value === "asc" ? "desc" : "asc" : (a.value = o, l.value = l.value || "asc"), re(() => s("after-sort", { prop: a.value, dir: l.value }));
|
|
1288
1297
|
};
|
|
1289
1298
|
return (o, m) => (u(), v("table", {
|
|
1290
1299
|
class: C(o.$attrs.class || "w-full divide-y divide-y-slate-900 table-fixed")
|
|
@@ -1297,7 +1306,7 @@ const Kt = ["value", "type"], $l = /* @__PURE__ */ Object.assign({ inheritAttrs:
|
|
|
1297
1306
|
{ "cursor-pointer": i.sortable, active: a.value === i.prop },
|
|
1298
1307
|
i.cssClass
|
|
1299
1308
|
]]),
|
|
1300
|
-
onClick: (y) => i.sortable ?
|
|
1309
|
+
onClick: (y) => i.sortable ? n(i.prop) : null
|
|
1301
1310
|
}, [
|
|
1302
1311
|
B(o.$slots, i.prop + "-header", {
|
|
1303
1312
|
column: i,
|
|
@@ -1306,10 +1315,10 @@ const Kt = ["value", "type"], $l = /* @__PURE__ */ Object.assign({ inheritAttrs:
|
|
|
1306
1315
|
}, () => [
|
|
1307
1316
|
r("div", rl, [
|
|
1308
1317
|
r("span", null, S(i.label), 1),
|
|
1309
|
-
i.sortable ? (u(),
|
|
1318
|
+
i.sortable ? (u(), q(ie(a.value !== i.prop ? V(ct) : l.value === "asc" ? V(it) : V(dt)), {
|
|
1310
1319
|
key: 0,
|
|
1311
1320
|
class: "h-4 w-4"
|
|
1312
|
-
})) :
|
|
1321
|
+
})) : D("", !0)
|
|
1313
1322
|
])
|
|
1314
1323
|
], !0)
|
|
1315
1324
|
], 10, ol))), 256))
|
|
@@ -1331,7 +1340,7 @@ const Kt = ["value", "type"], $l = /* @__PURE__ */ Object.assign({ inheritAttrs:
|
|
|
1331
1340
|
])
|
|
1332
1341
|
], 2));
|
|
1333
1342
|
}
|
|
1334
|
-
}, Ml = /* @__PURE__ */ be(ul, [["__scopeId", "data-v-
|
|
1343
|
+
}, Ml = /* @__PURE__ */ be(ul, [["__scopeId", "data-v-5f719421"]]), il = { class: "sm:hidden" }, cl = { class: "hidden sm:block" }, dl = { class: "border-b border-gray-200" }, vl = {
|
|
1335
1344
|
class: "flex -mb-px space-x-8",
|
|
1336
1345
|
"aria-label": "Tabs"
|
|
1337
1346
|
}, ml = ["onClick", "aria-current"], Vl = {
|
|
@@ -1342,24 +1351,24 @@ const Kt = ["value", "type"], $l = /* @__PURE__ */ Object.assign({ inheritAttrs:
|
|
|
1342
1351
|
},
|
|
1343
1352
|
emits: ["update:active-index"],
|
|
1344
1353
|
setup(e, { emit: d }) {
|
|
1345
|
-
const t = e,
|
|
1346
|
-
let
|
|
1354
|
+
const t = e, s = d, a = x(t.items[t.activeIndex] || {}), l = _(() => {
|
|
1355
|
+
let n = [];
|
|
1347
1356
|
return t.items.forEach((o, m) => {
|
|
1348
|
-
o.disabled ||
|
|
1349
|
-
}),
|
|
1357
|
+
o.disabled || n.push({ label: o.name, key: m });
|
|
1358
|
+
}), n;
|
|
1350
1359
|
});
|
|
1351
|
-
H(() => t.activeIndex, (
|
|
1352
|
-
a.value = t.items[
|
|
1360
|
+
H(() => t.activeIndex, (n) => {
|
|
1361
|
+
a.value = t.items[n] || {};
|
|
1353
1362
|
});
|
|
1354
|
-
const c = (
|
|
1355
|
-
|
|
1363
|
+
const c = (n) => {
|
|
1364
|
+
n.disabled || (a.value = n, s("update:active-index", t.items.indexOf(n)));
|
|
1356
1365
|
};
|
|
1357
|
-
return (
|
|
1366
|
+
return (n, o) => (u(), v(A, null, [
|
|
1358
1367
|
r("div", il, [
|
|
1359
1368
|
Y(St, {
|
|
1360
1369
|
options: l.value,
|
|
1361
1370
|
"model-value": e.activeIndex,
|
|
1362
|
-
"onUpdate:modelValue": o[0] || (o[0] = (m) =>
|
|
1371
|
+
"onUpdate:modelValue": o[0] || (o[0] = (m) => s("update:activeIndex", m)),
|
|
1363
1372
|
class: "w-full"
|
|
1364
1373
|
}, null, 8, ["options", "model-value"])
|
|
1365
1374
|
]),
|
|
@@ -1377,9 +1386,9 @@ const Kt = ["value", "type"], $l = /* @__PURE__ */ Object.assign({ inheritAttrs:
|
|
|
1377
1386
|
]),
|
|
1378
1387
|
"aria-current": a.value === m ? "page" : void 0
|
|
1379
1388
|
}, [
|
|
1380
|
-
B(
|
|
1389
|
+
B(n.$slots, "icon", { tab: m }),
|
|
1381
1390
|
r("span", null, [
|
|
1382
|
-
B(
|
|
1391
|
+
B(n.$slots, "default", { tab: m }, () => [
|
|
1383
1392
|
z(S(m.name), 1)
|
|
1384
1393
|
])
|
|
1385
1394
|
]),
|
|
@@ -1390,7 +1399,7 @@ const Kt = ["value", "type"], $l = /* @__PURE__ */ Object.assign({ inheritAttrs:
|
|
|
1390
1399
|
m.disabled ? "bg-gray-100 text-gray-400" : "",
|
|
1391
1400
|
"hidden ml-3 py-0.5 px-2.5 rounded-full text-xs font-medium md:inline-block"
|
|
1392
1401
|
])
|
|
1393
|
-
}, S(m.badge), 3)) :
|
|
1402
|
+
}, S(m.badge), 3)) : D("", !0)
|
|
1394
1403
|
], 10, ml))), 128))
|
|
1395
1404
|
])
|
|
1396
1405
|
])
|