vx-vue 0.7.4 → 0.7.5
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/style.css +1 -1
- package/dist/vxvue.es.js +368 -372
- package/dist/vxvue.umd.js +1 -1
- package/package.json +1 -1
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 L, watch as H, useAttrs as K, ref as x, computed as V, onUpdated as Ce, openBlock as u, createElementBlock as d, normalizeClass as C, createElementVNode as i, mergeProps as j, withKeys as Z, withModifiers as B, createCommentVNode as D, Fragment as _, renderList as O, renderSlot as A, toDisplayString as S, createVNode as Y, Transition as oe, withCtx as Q, createTextVNode as z, nextTick as re, toValue as ce, withDirectives as me, vModelText as Se, onMounted as ue, createBlock as G, pushScopeId as Me, popScopeId as Ve, resolveDynamicComponent as fe, resolveComponent as De, vShow as _e, toHandlers as te, 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() : L(e);
|
|
7
7
|
}
|
|
8
8
|
const pe = typeof window < "u" && typeof document < "u";
|
|
9
9
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
@@ -24,7 +24,7 @@ function W(e) {
|
|
|
24
24
|
}
|
|
25
25
|
function de(e, m, t = {}) {
|
|
26
26
|
var n;
|
|
27
|
-
const a = e.getFullYear(), l = e.getMonth(), c = e.getDate(), s = e.getHours(), o = e.getMinutes(), v = e.getSeconds(),
|
|
27
|
+
const a = e.getFullYear(), l = e.getMonth(), c = e.getDate(), s = e.getHours(), o = e.getMinutes(), v = e.getSeconds(), r = e.getMilliseconds(), y = e.getDay(), f = (n = t.customMeridiem) != null ? n : Oe, g = {
|
|
28
28
|
Yo: () => W(a),
|
|
29
29
|
YY: () => String(a).slice(-2),
|
|
30
30
|
YYYY: () => a,
|
|
@@ -48,19 +48,19 @@ function de(e, m, t = {}) {
|
|
|
48
48
|
s: () => String(v),
|
|
49
49
|
so: () => W(v),
|
|
50
50
|
ss: () => `${v}`.padStart(2, "0"),
|
|
51
|
-
SSS: () => `${
|
|
52
|
-
d: () =>
|
|
51
|
+
SSS: () => `${r}`.padStart(3, "0"),
|
|
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: () =>
|
|
57
|
-
AA: () =>
|
|
58
|
-
a: () =>
|
|
59
|
-
aa: () =>
|
|
56
|
+
A: () => f(s, o),
|
|
57
|
+
AA: () => f(s, o, !1, !0),
|
|
58
|
+
a: () => f(s, o, !0),
|
|
59
|
+
aa: () => f(s, o, !0, !0)
|
|
60
60
|
};
|
|
61
|
-
return m.replace(Te, (w,
|
|
62
|
-
var
|
|
63
|
-
return (
|
|
61
|
+
return m.replace(Te, (w, I) => {
|
|
62
|
+
var T, F;
|
|
63
|
+
return (F = I ?? ((T = g[w]) == null ? void 0 : T.call(g))) != null ? F : w;
|
|
64
64
|
});
|
|
65
65
|
}
|
|
66
66
|
function J(e) {
|
|
@@ -75,15 +75,15 @@ function le(...e) {
|
|
|
75
75
|
return ae;
|
|
76
76
|
Array.isArray(t) || (t = [t]), Array.isArray(n) || (n = [n]);
|
|
77
77
|
const l = [], c = () => {
|
|
78
|
-
l.forEach((
|
|
79
|
-
}, s = (
|
|
78
|
+
l.forEach((r) => r()), l.length = 0;
|
|
79
|
+
}, s = (r, y, f, g) => (r.addEventListener(y, f, g), () => r.removeEventListener(y, f, g)), o = H(
|
|
80
80
|
() => [J(m), he(a)],
|
|
81
|
-
([
|
|
82
|
-
if (c(), !
|
|
81
|
+
([r, y]) => {
|
|
82
|
+
if (c(), !r)
|
|
83
83
|
return;
|
|
84
|
-
const
|
|
84
|
+
const f = Le(y) ? { ...y } : y;
|
|
85
85
|
l.push(
|
|
86
|
-
...t.flatMap((g) => n.map((w) => s(
|
|
86
|
+
...t.flatMap((g) => n.map((w) => s(r, g, w, f)))
|
|
87
87
|
);
|
|
88
88
|
},
|
|
89
89
|
{ immediate: !0, flush: "post" }
|
|
@@ -97,39 +97,39 @@ function ie(e, m, t = {}) {
|
|
|
97
97
|
const { window: n = ge, ignore: a = [], capture: l = !0, detectIframe: c = !1 } = t;
|
|
98
98
|
if (!n)
|
|
99
99
|
return;
|
|
100
|
-
Fe && !ve && (ve = !0, Array.from(n.document.body.children).forEach((
|
|
100
|
+
Fe && !ve && (ve = !0, Array.from(n.document.body.children).forEach((f) => f.addEventListener("click", ae)), n.document.documentElement.addEventListener("click", ae));
|
|
101
101
|
let s = !0;
|
|
102
|
-
const o = (
|
|
102
|
+
const o = (f) => a.some((g) => {
|
|
103
103
|
if (typeof g == "string")
|
|
104
|
-
return Array.from(n.document.querySelectorAll(g)).some((w) => w ===
|
|
104
|
+
return Array.from(n.document.querySelectorAll(g)).some((w) => w === f.target || f.composedPath().includes(w));
|
|
105
105
|
{
|
|
106
106
|
const w = J(g);
|
|
107
|
-
return w && (
|
|
107
|
+
return w && (f.target === w || f.composedPath().includes(w));
|
|
108
108
|
}
|
|
109
|
-
}),
|
|
110
|
-
le(n, "click", (
|
|
109
|
+
}), r = [
|
|
110
|
+
le(n, "click", (f) => {
|
|
111
111
|
const g = J(e);
|
|
112
|
-
if (!(!g || g ===
|
|
113
|
-
if (
|
|
112
|
+
if (!(!g || g === f.target || f.composedPath().includes(g))) {
|
|
113
|
+
if (f.detail === 0 && (s = !o(f)), !s) {
|
|
114
114
|
s = !0;
|
|
115
115
|
return;
|
|
116
116
|
}
|
|
117
|
-
m(
|
|
117
|
+
m(f);
|
|
118
118
|
}
|
|
119
119
|
}, { passive: !0, capture: l }),
|
|
120
|
-
le(n, "pointerdown", (
|
|
120
|
+
le(n, "pointerdown", (f) => {
|
|
121
121
|
const g = J(e);
|
|
122
|
-
s = !o(
|
|
122
|
+
s = !o(f) && !!(g && !f.composedPath().includes(g));
|
|
123
123
|
}, { passive: !0 }),
|
|
124
|
-
c && le(n, "blur", (
|
|
124
|
+
c && le(n, "blur", (f) => {
|
|
125
125
|
setTimeout(() => {
|
|
126
126
|
var g;
|
|
127
127
|
const w = J(e);
|
|
128
|
-
((g = n.document.activeElement) == null ? void 0 : g.tagName) === "IFRAME" && !(w != null && w.contains(n.document.activeElement)) && m(
|
|
128
|
+
((g = n.document.activeElement) == null ? void 0 : g.tagName) === "IFRAME" && !(w != null && w.contains(n.document.activeElement)) && m(f);
|
|
129
129
|
}, 0);
|
|
130
130
|
})
|
|
131
131
|
].filter(Boolean);
|
|
132
|
-
return () =>
|
|
132
|
+
return () => r.forEach((f) => f());
|
|
133
133
|
}
|
|
134
134
|
const je = ["value", "onKeydown"], Ye = { class: "flex absolute inset-y-0 right-0 items-center pr-3 text-vxvue-700" }, Ee = {
|
|
135
135
|
key: 0,
|
|
@@ -151,7 +151,7 @@ const je = ["value", "onKeydown"], Ye = { class: "flex absolute inset-y-0 right-
|
|
|
151
151
|
}, null, -1), Re = [
|
|
152
152
|
Ne,
|
|
153
153
|
ze
|
|
154
|
-
],
|
|
154
|
+
], pl = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
155
155
|
__name: "autocomplete",
|
|
156
156
|
props: {
|
|
157
157
|
modelValue: { type: String, default: "" },
|
|
@@ -165,10 +165,10 @@ 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: m }) {
|
|
168
|
-
const t = m, n = e, a = K(), c = (() => {
|
|
168
|
+
const t = m, n = e, a = K(), c = (/* @__PURE__ */ (() => {
|
|
169
169
|
let k = 0;
|
|
170
170
|
return ($) => ($ || "") + ++k;
|
|
171
|
-
})()((a.id || "autocomplete") + "-"), s =
|
|
171
|
+
})())((a.id || "autocomplete") + "-"), s = x([]), o = x(-1), v = x(0), r = 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 = V(
|
|
172
172
|
() => s.value.map((k, $) => ({
|
|
173
173
|
id: (a.id || "autocomplete") + "-item-" + $,
|
|
174
174
|
class: ["autocomplete-item", n.resultItemClass, { "bg-vxvue-700 text-white": o.value === $ }],
|
|
@@ -176,7 +176,7 @@ const je = ["value", "onKeydown"], Ye = { class: "flex absolute inset-y-0 right-
|
|
|
176
176
|
role: "option",
|
|
177
177
|
...o.value === $ ? { "aria-selected": "true" } : {}
|
|
178
178
|
}))
|
|
179
|
-
),
|
|
179
|
+
), U = V(() => ({
|
|
180
180
|
role: "combobox",
|
|
181
181
|
autocomplete: "off",
|
|
182
182
|
autocapitalize: "off",
|
|
@@ -185,97 +185,97 @@ const je = ["value", "onKeydown"], Ye = { class: "flex absolute inset-y-0 right-
|
|
|
185
185
|
"aria-autocomplete": "list",
|
|
186
186
|
"aria-haspopup": "listbox",
|
|
187
187
|
"aria-owns": c,
|
|
188
|
-
"aria-expanded":
|
|
189
|
-
"aria-activedescendant": o.value > -1 ?
|
|
188
|
+
"aria-expanded": r.value ? "true" : "false",
|
|
189
|
+
"aria-activedescendant": o.value > -1 ? F.value[o.value].id : "",
|
|
190
190
|
...a
|
|
191
|
-
})), q =
|
|
191
|
+
})), q = V(() => ({
|
|
192
192
|
id: c,
|
|
193
|
-
class: ["autocomplete-list absolute min-w-full transform z-10", n.resultListClass,
|
|
193
|
+
class: ["autocomplete-list absolute min-w-full transform z-10", n.resultListClass, f.value],
|
|
194
194
|
role: "listbox"
|
|
195
|
-
})),
|
|
196
|
-
o.value = -1, s.value = [],
|
|
197
|
-
},
|
|
195
|
+
})), b = () => {
|
|
196
|
+
o.value = -1, s.value = [], r.value = !1, g.value = !0;
|
|
197
|
+
}, p = (k) => {
|
|
198
198
|
const $ = n.search(k);
|
|
199
199
|
if ($ instanceof Promise) {
|
|
200
|
-
const
|
|
201
|
-
|
|
202
|
-
|
|
200
|
+
const R = ++v.value;
|
|
201
|
+
y.value = !0, $.then((N) => {
|
|
202
|
+
R === v.value && (s.value = N, y.value = !1, s.value.length ? (o.value = n.autoSelect ? 0 : -1, r.value = !0) : b());
|
|
203
203
|
});
|
|
204
204
|
} else
|
|
205
|
-
s.value = $, s.value.length === 0 ?
|
|
205
|
+
s.value = $, s.value.length === 0 ? b() : (o.value = n.autoSelect ? 0 : -1, r.value = !0);
|
|
206
206
|
}, h = () => {
|
|
207
207
|
const k = s.value[o.value];
|
|
208
|
-
return k && t("update:modelValue", n.getResultValue(k)),
|
|
208
|
+
return k && t("update:modelValue", n.getResultValue(k)), b(), k;
|
|
209
209
|
}, M = (k) => {
|
|
210
|
-
t("update:modelValue", k),
|
|
211
|
-
},
|
|
212
|
-
|
|
210
|
+
t("update:modelValue", k), p(k);
|
|
211
|
+
}, P = (k) => p(k.target.value), E = () => {
|
|
212
|
+
b(), t("blur");
|
|
213
213
|
}, X = () => {
|
|
214
214
|
const k = s.value.length;
|
|
215
215
|
o.value = ((o.value - 1) % k + k) % k;
|
|
216
216
|
}, ee = (k) => {
|
|
217
|
-
|
|
217
|
+
r.value || P(k);
|
|
218
218
|
const $ = s.value.length;
|
|
219
219
|
o.value = ((o.value + 1) % $ + $) % $;
|
|
220
220
|
}, xe = () => {
|
|
221
|
-
|
|
221
|
+
b(), t("update:modelValue", "");
|
|
222
222
|
}, ye = () => t("submit", h()), we = (k) => {
|
|
223
223
|
const $ = k.target.closest("[data-result-index]");
|
|
224
224
|
$ && (o.value = parseInt($.dataset.resultIndex, 10), t("submit", h()));
|
|
225
225
|
};
|
|
226
|
-
return ie(
|
|
226
|
+
return ie(T, b), Ce(() => {
|
|
227
227
|
if (w.value) {
|
|
228
|
-
const k =
|
|
229
|
-
g.value && s.value.length && (g.value = !1,
|
|
230
|
-
const
|
|
231
|
-
if (
|
|
232
|
-
let
|
|
233
|
-
|
|
228
|
+
const k = I.value.getBoundingClientRect(), $ = w.value.getBoundingClientRect();
|
|
229
|
+
g.value && s.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
|
+
const R = w.value.querySelector('[data-result-index="' + o.value + '"]');
|
|
231
|
+
if (R) {
|
|
232
|
+
let N = R.getBoundingClientRect();
|
|
233
|
+
N.top < $.top ? w.value.scrollTop -= $.top - N.top : N.bottom > $.bottom && (w.value.scrollTop += N.bottom - $.bottom);
|
|
234
234
|
}
|
|
235
235
|
}
|
|
236
|
-
}), (k, $) => (
|
|
236
|
+
}), (k, $) => (u(), d("div", {
|
|
237
237
|
class: C(["inline-block relative", k.$attrs.class]),
|
|
238
238
|
ref_key: "container",
|
|
239
|
-
ref:
|
|
239
|
+
ref: T
|
|
240
240
|
}, [
|
|
241
|
-
i("input",
|
|
241
|
+
i("input", j({
|
|
242
242
|
ref_key: "input",
|
|
243
|
-
ref:
|
|
243
|
+
ref: I,
|
|
244
244
|
class: "block pr-10 w-full form-input focus:border-vxvue",
|
|
245
245
|
value: e.modelValue
|
|
246
|
-
},
|
|
247
|
-
onInput: $[0] || ($[0] = (
|
|
246
|
+
}, U.value, {
|
|
247
|
+
onInput: $[0] || ($[0] = (R) => M(R.target.value)),
|
|
248
248
|
onKeydown: [
|
|
249
249
|
Z(ye, ["enter"]),
|
|
250
250
|
Z(xe, ["esc"]),
|
|
251
251
|
Z(h, ["tab"]),
|
|
252
|
-
Z(
|
|
253
|
-
Z(
|
|
252
|
+
Z(B(X, ["prevent"]), ["up"]),
|
|
253
|
+
Z(B(ee, ["prevent"]), ["down"])
|
|
254
254
|
],
|
|
255
|
-
onFocus:
|
|
256
|
-
onBlur:
|
|
255
|
+
onFocus: P,
|
|
256
|
+
onBlur: E
|
|
257
257
|
}), null, 16, je),
|
|
258
258
|
i("span", Ye, [
|
|
259
|
-
|
|
259
|
+
y.value ? (u(), d("svg", Ee, Re)) : D("", !0)
|
|
260
260
|
]),
|
|
261
|
-
s.value.length ? (
|
|
261
|
+
s.value.length ? (u(), d("ul", j({
|
|
262
262
|
key: 0,
|
|
263
263
|
ref_key: "resultList",
|
|
264
264
|
ref: w
|
|
265
265
|
}, q.value, {
|
|
266
266
|
onClick: we,
|
|
267
|
-
onMousedown: $[1] || ($[1] =
|
|
267
|
+
onMousedown: $[1] || ($[1] = B(() => {
|
|
268
268
|
}, ["prevent"]))
|
|
269
269
|
}), [
|
|
270
|
-
(
|
|
271
|
-
result:
|
|
272
|
-
props:
|
|
270
|
+
(u(!0), d(_, null, O(s.value, (R, N) => A(k.$slots, "result", {
|
|
271
|
+
result: R,
|
|
272
|
+
props: F.value[N]
|
|
273
273
|
}, () => [
|
|
274
|
-
(
|
|
275
|
-
key:
|
|
276
|
-
},
|
|
274
|
+
(u(), d("li", j({
|
|
275
|
+
key: F.value[N].id
|
|
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 = {
|
|
@@ -288,7 +288,7 @@ const je = ["value", "onKeydown"], Ye = { class: "flex absolute inset-y-0 right-
|
|
|
288
288
|
}, We = { class: "flex justify-center items-center min-h-screen text-center sm:block sm:p-0" }, qe = { key: 0 }, Ke = /* @__PURE__ */ i("span", {
|
|
289
289
|
class: "hidden sm:inline-block sm:h-screen sm:align-middle",
|
|
290
290
|
"aria-hidden": "true"
|
|
291
|
-
}, "", -1), Ge = { class: "inline-block overflow-hidden text-left align-bottom bg-white rounded shadow-xl transition-all transform sm:my-8 sm:w-full sm:max-w-sm sm:align-middle lg:max-w-lg" }, Xe = { class: "px-4 pb-4 mt-4 sm:px-6 sm:pb-6 sm:mt-5" }, Ze = { class: "flex flex-row items-center" }, Je = { class: "flex-shrink-0" }, Qe = { class: "flex-grow text-center" }, et = ["onClick"],
|
|
291
|
+
}, "", -1), Ge = { class: "inline-block overflow-hidden text-left align-bottom bg-white rounded shadow-xl transition-all transform sm:my-8 sm:w-full sm:max-w-sm sm:align-middle lg:max-w-lg" }, Xe = { class: "px-4 pb-4 mt-4 sm:px-6 sm:pb-6 sm:mt-5" }, Ze = { class: "flex flex-row items-center" }, Je = { class: "flex-shrink-0" }, Qe = { class: "flex-grow text-center" }, et = ["onClick"], gl = {
|
|
292
292
|
__name: "confirm",
|
|
293
293
|
props: {
|
|
294
294
|
buttons: {
|
|
@@ -306,36 +306,38 @@ const je = ["value", "onKeydown"], Ye = { class: "flex absolute inset-y-0 right-
|
|
|
306
306
|
}
|
|
307
307
|
},
|
|
308
308
|
setup(e, { expose: m }) {
|
|
309
|
-
const t = e, n =
|
|
309
|
+
const t = e, n = x(""), a = x(""), l = x(!1);
|
|
310
310
|
let c = null, s = null;
|
|
311
|
-
const o =
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
311
|
+
const o = V(() => Array.isArray(t.buttons) ? t.buttons : [t.buttons]), v = x(null), r = (f, g) => {
|
|
312
|
+
l.value = !1, f.value !== void 0 ? f.value ? c() : s() : g ? s() : c();
|
|
313
|
+
};
|
|
314
|
+
return m({ open: (f, g) => (n.value = f, a.value = g, l.value = !0, re(() => v.value.firstElementChild.focus()), new Promise((w, I) => {
|
|
315
|
+
c = w, s = I;
|
|
316
|
+
})) }), (f, g) => (u(), d(_, null, [
|
|
317
|
+
l.value ? (u(), d("div", He)) : D("", !0),
|
|
316
318
|
Y(oe, { name: "appear" }, {
|
|
317
319
|
default: Q(() => [
|
|
318
|
-
l.value ? (
|
|
320
|
+
l.value ? (u(), d("div", Ue, [
|
|
319
321
|
i("div", We, [
|
|
320
|
-
l.value ? (
|
|
322
|
+
l.value ? (u(), d("div", qe, [
|
|
321
323
|
Ke,
|
|
322
324
|
i("div", Ge, [
|
|
323
|
-
n.value ? (
|
|
325
|
+
n.value ? (u(), d("h3", {
|
|
324
326
|
key: 0,
|
|
325
327
|
class: C(["py-4 pt-4 text-lg font-medium text-center sm:py-6", e.headerClass])
|
|
326
328
|
}, [
|
|
327
|
-
|
|
328
|
-
|
|
329
|
+
A(f.$slots, "title", { title: n.value }, () => [
|
|
330
|
+
z(S(n.value), 1)
|
|
329
331
|
])
|
|
330
|
-
], 2)) :
|
|
332
|
+
], 2)) : D("", !0),
|
|
331
333
|
i("div", Xe, [
|
|
332
334
|
i("div", Ze, [
|
|
333
335
|
i("div", Je, [
|
|
334
|
-
|
|
336
|
+
A(f.$slots, "icon")
|
|
335
337
|
]),
|
|
336
338
|
i("p", Qe, [
|
|
337
|
-
|
|
338
|
-
|
|
339
|
+
A(f.$slots, "default", { message: a.value }, () => [
|
|
340
|
+
z(S(a.value), 1)
|
|
339
341
|
])
|
|
340
342
|
])
|
|
341
343
|
]),
|
|
@@ -344,18 +346,16 @@ const je = ["value", "onKeydown"], Ye = { class: "flex absolute inset-y-0 right-
|
|
|
344
346
|
ref_key: "buttonsContainer",
|
|
345
347
|
ref: v
|
|
346
348
|
}, [
|
|
347
|
-
(
|
|
348
|
-
class: C([e.buttonClass,
|
|
349
|
-
onClick:
|
|
350
|
-
|
|
351
|
-
}, ["prevent"])
|
|
352
|
-
}, S(g.label), 11, et))), 256))
|
|
349
|
+
(u(!0), d(_, null, O(o.value, (w, I) => (u(), d("button", {
|
|
350
|
+
class: C([e.buttonClass, w.class]),
|
|
351
|
+
onClick: B((T) => r(w, I), ["prevent"])
|
|
352
|
+
}, S(w.label), 11, et))), 256))
|
|
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,7 +363,7 @@ const je = ["value", "onKeydown"], Ye = { class: "flex absolute inset-y-0 right-
|
|
|
363
363
|
}
|
|
364
364
|
};
|
|
365
365
|
function tt(e, m) {
|
|
366
|
-
const t =
|
|
366
|
+
const t = x(!1), n = ce(m);
|
|
367
367
|
let a, l = n.toLowerCase().replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), c = [];
|
|
368
368
|
if ((a = n.match(/\bd\b/gi)) && a.length === 1)
|
|
369
369
|
l = l.replace("d", "(\\d{1,2})");
|
|
@@ -383,7 +383,7 @@ function tt(e, m) {
|
|
|
383
383
|
return { date: t };
|
|
384
384
|
if (c.push({ srcPos: n.toLowerCase().indexOf("y"), destPos: 0 }), !(a = ce(e).match(l)))
|
|
385
385
|
return { date: t };
|
|
386
|
-
a.shift(), c.sort((
|
|
386
|
+
a.shift(), c.sort((r, y) => r.srcPos < y.srcPos ? -1 : 1);
|
|
387
387
|
let s = [], o, v;
|
|
388
388
|
for (; o = a.shift(); )
|
|
389
389
|
v = c.shift(), s[v.destPos] = o;
|
|
@@ -428,14 +428,14 @@ const lt = { key: 0 }, at = { class: "text-vxvue-700" }, st = /* @__PURE__ */ i(
|
|
|
428
428
|
},
|
|
429
429
|
emits: ["update:modelValue", "toggle-datepicker"],
|
|
430
430
|
setup(e, { emit: m }) {
|
|
431
|
-
const t = m, n = e, a =
|
|
431
|
+
const t = m, n = e, a = x(""), l = V(() => n.modelValue ? de(n.modelValue, n.outputFormat) : ""), c = V(() => {
|
|
432
432
|
let s = Object.assign({}, K());
|
|
433
433
|
return delete s.class, s;
|
|
434
434
|
});
|
|
435
|
-
return
|
|
435
|
+
return H(() => n.modelValue, (s) => a.value = s ? de(s, n.outputFormat) : ""), (s, o) => (u(), d("div", {
|
|
436
436
|
class: C(["inline-block relative", s.$attrs.class])
|
|
437
437
|
}, [
|
|
438
|
-
l.value ? (
|
|
438
|
+
l.value ? (u(), d("div", lt, [
|
|
439
439
|
i("div", {
|
|
440
440
|
class: C(["block flex items-center w-full form-input bg-vxvue-50", { "pr-10": e.showButton }])
|
|
441
441
|
}, [
|
|
@@ -445,32 +445,32 @@ const lt = { key: 0 }, at = { class: "text-vxvue-700" }, st = /* @__PURE__ */ i(
|
|
|
445
445
|
class: "inline-flex flex-shrink-0 justify-center items-center ml-2 w-4 h-4 rounded-full focus:text-white focus:outline-none text-vxvue hover:bg-vxvue-100 hover:text-vue-700 focus:bg-vxvue-700"
|
|
446
446
|
}, nt)
|
|
447
447
|
], 2)
|
|
448
|
-
])) : me((
|
|
448
|
+
])) : me((u(), d("input", j({
|
|
449
449
|
key: 1,
|
|
450
450
|
type: "text",
|
|
451
451
|
class: ["block w-full form-input peer focus:border-vxvue", { "pr-10": e.showButton }],
|
|
452
452
|
"onUpdate:modelValue": o[1] || (o[1] = (v) => a.value = v),
|
|
453
453
|
onBlur: o[2] || (o[2] = (v) => {
|
|
454
|
-
var
|
|
455
|
-
return t("update:modelValue", ((
|
|
454
|
+
var r;
|
|
455
|
+
return t("update:modelValue", ((r = L(tt)(a.value, n.inputFormat).date) == null ? void 0 : r.value) || null);
|
|
456
456
|
}),
|
|
457
|
-
onInput: o[3] || (o[3] =
|
|
457
|
+
onInput: o[3] || (o[3] = B(() => {
|
|
458
458
|
}, ["prevent"]))
|
|
459
459
|
}, c.value), null, 16)), [
|
|
460
460
|
[Se, a.value]
|
|
461
461
|
]),
|
|
462
|
-
e.showButton ? (
|
|
462
|
+
e.showButton ? (u(), d("button", {
|
|
463
463
|
key: 2,
|
|
464
464
|
class: "flex absolute inset-y-0 right-0 items-center px-2 text-vxvue-700 hover:text-vxvue",
|
|
465
|
-
onClick: o[4] || (o[4] =
|
|
465
|
+
onClick: o[4] || (o[4] = B((v) => t("toggle-datepicker"), ["stop"])),
|
|
466
466
|
ref: "toggleButton"
|
|
467
|
-
}, rt, 512)) :
|
|
468
|
-
|
|
467
|
+
}, rt, 512)) : D("", !0),
|
|
468
|
+
A(s.$slots, "default")
|
|
469
469
|
], 2));
|
|
470
470
|
}
|
|
471
471
|
};
|
|
472
472
|
function se(e, m) {
|
|
473
|
-
return
|
|
473
|
+
return u(), d("svg", {
|
|
474
474
|
xmlns: "http://www.w3.org/2000/svg",
|
|
475
475
|
viewBox: "0 0 24 24",
|
|
476
476
|
fill: "currentColor",
|
|
@@ -484,7 +484,7 @@ function se(e, m) {
|
|
|
484
484
|
]);
|
|
485
485
|
}
|
|
486
486
|
function ne(e, m) {
|
|
487
|
-
return
|
|
487
|
+
return u(), d("svg", {
|
|
488
488
|
xmlns: "http://www.w3.org/2000/svg",
|
|
489
489
|
viewBox: "0 0 24 24",
|
|
490
490
|
fill: "currentColor",
|
|
@@ -498,7 +498,7 @@ function ne(e, m) {
|
|
|
498
498
|
]);
|
|
499
499
|
}
|
|
500
500
|
function it(e, m) {
|
|
501
|
-
return
|
|
501
|
+
return u(), d("svg", {
|
|
502
502
|
xmlns: "http://www.w3.org/2000/svg",
|
|
503
503
|
viewBox: "0 0 24 24",
|
|
504
504
|
fill: "currentColor",
|
|
@@ -512,7 +512,7 @@ function it(e, m) {
|
|
|
512
512
|
]);
|
|
513
513
|
}
|
|
514
514
|
function ct(e, m) {
|
|
515
|
-
return
|
|
515
|
+
return u(), d("svg", {
|
|
516
516
|
xmlns: "http://www.w3.org/2000/svg",
|
|
517
517
|
viewBox: "0 0 24 24",
|
|
518
518
|
fill: "currentColor",
|
|
@@ -526,7 +526,7 @@ function ct(e, m) {
|
|
|
526
526
|
]);
|
|
527
527
|
}
|
|
528
528
|
function dt(e, m) {
|
|
529
|
-
return
|
|
529
|
+
return u(), d("svg", {
|
|
530
530
|
xmlns: "http://www.w3.org/2000/svg",
|
|
531
531
|
viewBox: "0 0 24 24",
|
|
532
532
|
fill: "currentColor",
|
|
@@ -539,7 +539,7 @@ function dt(e, m) {
|
|
|
539
539
|
})
|
|
540
540
|
]);
|
|
541
541
|
}
|
|
542
|
-
const vt = { class: "flex items-center py-2 px-3 text-white bg-vxvue-700" }, mt = { class: "flex w-1/2 justify-between" }, ft = { class: "flex w-1/2 justify-between" }, ht = { class: "grid grid-cols-7 gap-0.5 p-0.5" }, pt = ["disabled", "onClick"],
|
|
542
|
+
const vt = { class: "flex items-center py-2 px-3 text-white bg-vxvue-700" }, mt = { class: "flex w-1/2 justify-between" }, ft = { class: "flex w-1/2 justify-between" }, ht = { class: "grid grid-cols-7 gap-0.5 p-0.5" }, pt = ["disabled", "onClick"], bl = {
|
|
543
543
|
__name: "datepicker",
|
|
544
544
|
props: {
|
|
545
545
|
modelValue: [Date, Boolean],
|
|
@@ -553,116 +553,116 @@ const vt = { class: "flex items-center py-2 px-3 text-white bg-vxvue-700" }, mt
|
|
|
553
553
|
emits: ["update:modelValue", "month-change", "year-change"],
|
|
554
554
|
setup(e, { emit: m }) {
|
|
555
555
|
const t = e, n = m, a = (() => {
|
|
556
|
-
let
|
|
557
|
-
return new Date(
|
|
558
|
-
})(), l =
|
|
559
|
-
const
|
|
560
|
-
for (let X = -
|
|
561
|
-
|
|
562
|
-
return
|
|
563
|
-
}),
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
}, { immediate: !0 }),
|
|
567
|
-
|
|
568
|
-
const
|
|
569
|
-
o.value =
|
|
556
|
+
let b = /* @__PURE__ */ new Date();
|
|
557
|
+
return new Date(b.getFullYear(), b.getMonth(), b.getDate());
|
|
558
|
+
})(), l = x(new Date(a.getFullYear(), a.getMonth(), 1)), c = x(null), s = x(!t.hasInput), o = x("left-0"), v = x("top-0"), r = x(null), y = x(null), f = x(null), g = V(() => t.hasInput ? { class: ["absolute", s.value ? "block" : "hidden"] } : {}), w = V(() => {
|
|
559
|
+
const b = [], p = l.value.getFullYear(), h = l.value.getMonth(), M = new Date(p, h + 1, 0), P = new Date(p, h, 0).getDay() + 1 - t.startOfWeekIndex, E = (6 + t.startOfWeekIndex - M.getDay()) % 7;
|
|
560
|
+
for (let X = -P, ee = M.getDate() + E; X < ee; ++X)
|
|
561
|
+
b.push(new Date(p, h, X + 1));
|
|
562
|
+
return b;
|
|
563
|
+
}), I = V(() => t.startOfWeekIndex ? t.dayNames.slice(1).concat(t.dayNames[0]) : t.dayNames.slice());
|
|
564
|
+
H(() => t.modelValue, (b) => {
|
|
565
|
+
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);
|
|
566
|
+
}, { immediate: !0 }), H(s, (b) => {
|
|
567
|
+
b && t.hasInput && re(() => {
|
|
568
|
+
const p = r.value.$el.getBoundingClientRect(), h = y.value.getBoundingClientRect();
|
|
569
|
+
o.value = p.left + h.width > window.innerWidth ? "right-0" : "left-0", v.value = p.bottom + h.height > window.innerHeight ? "bottom-0 -translate-y-12" : "top-0 translate-y-12";
|
|
570
570
|
});
|
|
571
|
-
}), ie(
|
|
572
|
-
const
|
|
573
|
-
l.value = new Date(l.value.getFullYear(),
|
|
574
|
-
},
|
|
575
|
-
l.value = new Date(
|
|
576
|
-
},
|
|
577
|
-
c.value =
|
|
578
|
-
}, q = (
|
|
579
|
-
c.value =
|
|
571
|
+
}), ie(y, () => s.value = !1, { ignore: [f] });
|
|
572
|
+
const T = (b) => {
|
|
573
|
+
l.value = new Date(l.value.getFullYear(), b, 1), n("month-change", l.value);
|
|
574
|
+
}, F = (b) => {
|
|
575
|
+
l.value = new Date(b, l.value.getMonth(), 1), n("year-change", l.value);
|
|
576
|
+
}, U = (b) => {
|
|
577
|
+
c.value = b, n("update:modelValue", b), s.value = !t.hasInput;
|
|
578
|
+
}, q = (b) => {
|
|
579
|
+
c.value = b, n("update:modelValue", b);
|
|
580
580
|
};
|
|
581
581
|
return ue(() => {
|
|
582
|
-
var
|
|
583
|
-
return
|
|
584
|
-
}), (
|
|
585
|
-
class: C(["relative",
|
|
582
|
+
var b;
|
|
583
|
+
return f.value = (b = r.value) == null ? void 0 : b.$refs.toggleButton;
|
|
584
|
+
}), (b, p) => (u(), d("div", {
|
|
585
|
+
class: C(["relative", b.$attrs.class])
|
|
586
586
|
}, [
|
|
587
|
-
e.hasInput ? (
|
|
587
|
+
e.hasInput ? (u(), G(ut, j({
|
|
588
588
|
key: 0,
|
|
589
589
|
modelValue: c.value,
|
|
590
|
-
onToggleDatepicker:
|
|
590
|
+
onToggleDatepicker: p[0] || (p[0] = (h) => s.value = !s.value),
|
|
591
591
|
"onUpdate:modelValue": q
|
|
592
|
-
},
|
|
592
|
+
}, b.$attrs, {
|
|
593
593
|
ref_key: "input",
|
|
594
|
-
ref:
|
|
594
|
+
ref: r,
|
|
595
595
|
class: "w-full",
|
|
596
596
|
locale: e.locale
|
|
597
597
|
}), {
|
|
598
598
|
default: Q(() => [
|
|
599
|
-
|
|
599
|
+
A(b.$slots, "default")
|
|
600
600
|
]),
|
|
601
601
|
_: 3
|
|
602
|
-
}, 16, ["modelValue", "locale"])) :
|
|
603
|
-
i("div",
|
|
602
|
+
}, 16, ["modelValue", "locale"])) : D("", !0),
|
|
603
|
+
i("div", j({ class: "z-10 bg-white shadow-md" }, g.value, {
|
|
604
604
|
ref_key: "calendar",
|
|
605
|
-
ref:
|
|
605
|
+
ref: y,
|
|
606
606
|
class: [o.value, v.value]
|
|
607
607
|
}), [
|
|
608
608
|
i("div", vt, [
|
|
609
609
|
i("div", mt, [
|
|
610
610
|
i("button", {
|
|
611
|
-
onClick:
|
|
611
|
+
onClick: p[1] || (p[1] = B((h) => T(l.value.getMonth() - 1), ["stop"])),
|
|
612
612
|
class: "flex-shrink-0 text-vxvue-100 hover:text-vxvue-50"
|
|
613
613
|
}, [
|
|
614
|
-
Y(
|
|
614
|
+
Y(L(se), { class: "w-6 h-6" })
|
|
615
615
|
]),
|
|
616
616
|
i("span", null, S(l.value.toLocaleString(e.locale, { month: "long" })), 1),
|
|
617
617
|
i("button", {
|
|
618
|
-
onClick:
|
|
618
|
+
onClick: p[2] || (p[2] = B((h) => T(l.value.getMonth() + 1), ["stop"])),
|
|
619
619
|
class: "flex-shrink-0 text-vxvue-100 hover:text-vxvue-50"
|
|
620
620
|
}, [
|
|
621
|
-
Y(
|
|
621
|
+
Y(L(ne), { class: "w-6 h-6" })
|
|
622
622
|
])
|
|
623
623
|
]),
|
|
624
624
|
i("div", ft, [
|
|
625
625
|
i("button", {
|
|
626
|
-
onClick:
|
|
626
|
+
onClick: p[3] || (p[3] = B((h) => F(l.value.getFullYear() - 1), ["stop"])),
|
|
627
627
|
class: "flex-shrink-0 text-vxvue-100 hover:text-vxvue-50"
|
|
628
628
|
}, [
|
|
629
|
-
Y(
|
|
629
|
+
Y(L(se), { class: "w-6 h-6" })
|
|
630
630
|
]),
|
|
631
631
|
i("div", null, S(l.value.getFullYear()), 1),
|
|
632
632
|
i("button", {
|
|
633
|
-
onClick:
|
|
633
|
+
onClick: p[4] || (p[4] = B((h) => F(l.value.getFullYear() + 1), ["stop"])),
|
|
634
634
|
class: "flex-shrink-0 text-vxvue-100 hover:text-vxvue-50"
|
|
635
635
|
}, [
|
|
636
|
-
Y(
|
|
636
|
+
Y(L(ne), { class: "w-6 h-6" })
|
|
637
637
|
])
|
|
638
638
|
])
|
|
639
639
|
]),
|
|
640
640
|
i("div", ht, [
|
|
641
|
-
(
|
|
641
|
+
(u(!0), d(_, null, O(I.value, (h, M) => (u(), d("div", {
|
|
642
642
|
class: "py-2 text-center bg-gray-200",
|
|
643
643
|
key: M
|
|
644
644
|
}, S(h), 1))), 128)),
|
|
645
|
-
(
|
|
645
|
+
(u(!0), d(_, null, O(w.value, (h) => (u(), d("div", {
|
|
646
646
|
class: C(["text-center", h.getMonth() - l.value.getMonth() === 0 ? "text-vxvue-700" : "text-gray-400"])
|
|
647
647
|
}, [
|
|
648
648
|
i("button", {
|
|
649
649
|
class: C([
|
|
650
650
|
{
|
|
651
651
|
"bg-vxvue-700 text-white": c.value && h.getTime() === c.value.getTime(),
|
|
652
|
-
"bg-gray-200": h.getTime() ===
|
|
652
|
+
"bg-gray-200": h.getTime() === L(a).getTime(),
|
|
653
653
|
"text-red-400": e.validFrom && e.validFrom > h || e.validUntil && e.validUntil < h
|
|
654
654
|
},
|
|
655
655
|
"py-2 px-3 rounded-sm"
|
|
656
656
|
]),
|
|
657
657
|
disabled: e.validFrom && e.validFrom > h || e.validUntil && e.validUntil < h,
|
|
658
|
-
onClick:
|
|
658
|
+
onClick: B((M) => e.validFrom && e.validFrom > h || e.validUntil && e.validUntil < h ? null : U(h), ["stop"])
|
|
659
659
|
}, S(h.getDate()), 11, pt)
|
|
660
660
|
], 2))), 256))
|
|
661
661
|
])
|
|
662
662
|
], 16)
|
|
663
663
|
], 2));
|
|
664
664
|
}
|
|
665
|
-
}, gt = ["for"], bt = ["id", "multiple", "accept"],
|
|
665
|
+
}, gt = ["for"], bt = ["id", "multiple", "accept"], xl = {
|
|
666
666
|
__name: "form-file-button",
|
|
667
667
|
props: {
|
|
668
668
|
modelValue: { type: Array },
|
|
@@ -685,9 +685,9 @@ const vt = { class: "flex items-center py-2 px-3 text-white bg-vxvue-700" }, mt
|
|
|
685
685
|
t("update:modelValue", o), t("form-data", a(o));
|
|
686
686
|
}
|
|
687
687
|
};
|
|
688
|
-
return (c, s) => (
|
|
689
|
-
|
|
690
|
-
|
|
688
|
+
return (c, s) => (u(), d("label", { for: e.id }, [
|
|
689
|
+
A(c.$slots, "default", {}, () => [
|
|
690
|
+
z("Upload")
|
|
691
691
|
]),
|
|
692
692
|
i("input", {
|
|
693
693
|
type: "file",
|
|
@@ -709,28 +709,28 @@ const vt = { class: "flex items-center py-2 px-3 text-white bg-vxvue-700" }, mt
|
|
|
709
709
|
emits: ["update:modelValue"],
|
|
710
710
|
setup(e, { emit: m }) {
|
|
711
711
|
const t = m;
|
|
712
|
-
return (n, a) => (
|
|
712
|
+
return (n, a) => (u(), d("select", j(n.$attrs, {
|
|
713
713
|
value: e.modelValue,
|
|
714
714
|
class: "form-select",
|
|
715
715
|
onChange: a[0] || (a[0] = (l) => t("update:modelValue", l.target.value))
|
|
716
716
|
}), [
|
|
717
|
-
e.disabledLabel ? (
|
|
718
|
-
(
|
|
717
|
+
e.disabledLabel ? (u(), d("option", yt, S(e.disabledLabel), 1)) : D("", !0),
|
|
718
|
+
(u(!0), d(_, null, O(e.options, (l) => (u(), d("option", {
|
|
719
719
|
value: l.key !== void 0 ? l.key : l.label || l,
|
|
720
720
|
selected: (l.key !== void 0 ? l.key : l.label || l) === e.modelValue
|
|
721
721
|
}, S(l.label || l), 9, wt))), 256))
|
|
722
722
|
], 16, xt));
|
|
723
723
|
}
|
|
724
|
-
}, $t = ["aria-checked"], Ct = ["checked"],
|
|
724
|
+
}, $t = ["aria-checked"], Ct = ["checked"], yl = {
|
|
725
725
|
__name: "form-switch",
|
|
726
726
|
props: ["modelValue"],
|
|
727
727
|
emits: ["update:modelValue"],
|
|
728
728
|
setup(e, { emit: m }) {
|
|
729
|
-
const t = e, n = m, a =
|
|
729
|
+
const t = e, n = m, a = V(() => t.modelValue ? "bg-vxvue" : "bg-slate-200"), l = V(() => t.modelValue ? "translate-x-5" : "translate-x-0"), c = V(() => {
|
|
730
730
|
let s = Object.assign({}, K());
|
|
731
731
|
return delete s.class, s;
|
|
732
732
|
});
|
|
733
|
-
return (s, o) => (
|
|
733
|
+
return (s, o) => (u(), d(_, null, [
|
|
734
734
|
i("label", {
|
|
735
735
|
class: C(s.$attrs.class)
|
|
736
736
|
}, [
|
|
@@ -743,7 +743,7 @@ const vt = { class: "flex items-center py-2 px-3 text-white bg-vxvue-700" }, mt
|
|
|
743
743
|
"aria-hidden": "true",
|
|
744
744
|
class: C([l.value, "inline-block w-5 h-5 bg-white rounded-full ring-0 shadow transition duration-200 ease-in-out transform pointer-events-none"])
|
|
745
745
|
}, null, 2),
|
|
746
|
-
i("input",
|
|
746
|
+
i("input", j({
|
|
747
747
|
class: "hidden",
|
|
748
748
|
value: "1",
|
|
749
749
|
type: "checkbox",
|
|
@@ -751,19 +751,18 @@ const vt = { class: "flex items-center py-2 px-3 text-white bg-vxvue-700" }, mt
|
|
|
751
751
|
}, c.value, { checked: e.modelValue }), null, 16, Ct)
|
|
752
752
|
], 10, $t)
|
|
753
753
|
], 2),
|
|
754
|
-
|
|
754
|
+
A(s.$slots, "default")
|
|
755
755
|
], 64));
|
|
756
756
|
}
|
|
757
|
-
}
|
|
758
|
-
const be = (e, m) => {
|
|
757
|
+
}, be = (e, m) => {
|
|
759
758
|
const t = e.__vccOpts || e;
|
|
760
759
|
for (const [n, a] of m)
|
|
761
760
|
t[n] = a;
|
|
762
761
|
return t;
|
|
763
|
-
}, St = (e) => (
|
|
762
|
+
}, St = (e) => (Me("data-v-1be10676"), e = e(), Ve(), e), Mt = {
|
|
764
763
|
"aria-live": "assertive",
|
|
765
764
|
class: "flex fixed inset-0 z-50 items-start py-6 px-4 pointer-events-none sm:p-6"
|
|
766
|
-
},
|
|
765
|
+
}, Vt = { class: "flex flex-col items-center space-y-4 w-full" }, Dt = { class: "p-4" }, _t = { class: "flex items-start" }, At = { class: "flex-shrink-0" }, Bt = { class: "flex-1 pt-0.5 ml-3 w-0" }, Pt = { class: "font-bold" }, Lt = { class: "mt-1" }, Ft = { class: "flex flex-shrink-0 ml-4" }, It = /* @__PURE__ */ St(() => /* @__PURE__ */ i("span", { class: "sr-only" }, "Close", -1)), Tt = /* @__PURE__ */ Object.assign({
|
|
767
766
|
inheritAttrs: !1
|
|
768
767
|
}, {
|
|
769
768
|
__name: "message-toast",
|
|
@@ -775,33 +774,33 @@ const be = (e, m) => {
|
|
|
775
774
|
},
|
|
776
775
|
emits: ["timeout", "close"],
|
|
777
776
|
setup(e, { emit: m }) {
|
|
778
|
-
const t = e, n = m, a =
|
|
777
|
+
const t = e, n = m, a = x(null), l = V(() => typeof t.message == "string" ? [t.message] : t.message), c = () => {
|
|
779
778
|
window.clearTimeout(a.value), t.active && t.timeout && (a.value = window.setTimeout(() => {
|
|
780
779
|
n("timeout");
|
|
781
780
|
}, t.timeout));
|
|
782
781
|
};
|
|
783
|
-
return
|
|
784
|
-
i("div",
|
|
782
|
+
return H(() => t.active, c), ue(c), (s, o) => (u(), d("div", Mt, [
|
|
783
|
+
i("div", Vt, [
|
|
785
784
|
Y(oe, { name: "messagetoast-fade" }, {
|
|
786
785
|
default: Q(() => [
|
|
787
|
-
e.active ? (
|
|
786
|
+
e.active ? (u(), d("div", {
|
|
788
787
|
key: 0,
|
|
789
788
|
class: C(["overflow-hidden w-full max-w-sm rounded-md ring-1 ring-black ring-opacity-5 shadow-lg pointer-events-auto", s.$attrs.class])
|
|
790
789
|
}, [
|
|
791
|
-
i("div",
|
|
792
|
-
i("div",
|
|
790
|
+
i("div", Dt, [
|
|
791
|
+
i("div", _t, [
|
|
793
792
|
i("div", At, [
|
|
794
|
-
|
|
793
|
+
A(s.$slots, "icon", {}, void 0, !0)
|
|
795
794
|
]),
|
|
796
795
|
i("div", Bt, [
|
|
797
796
|
i("p", Pt, [
|
|
798
|
-
|
|
799
|
-
|
|
797
|
+
A(s.$slots, "title", {}, () => [
|
|
798
|
+
z(S(e.title), 1)
|
|
800
799
|
], !0)
|
|
801
800
|
]),
|
|
802
|
-
(
|
|
803
|
-
|
|
804
|
-
|
|
801
|
+
(u(!0), d(_, null, O(l.value, (v) => (u(), d("p", Lt, [
|
|
802
|
+
A(s.$slots, "default", {}, () => [
|
|
803
|
+
z(S(v), 1)
|
|
805
804
|
], !0)
|
|
806
805
|
]))), 256))
|
|
807
806
|
]),
|
|
@@ -811,26 +810,26 @@ const be = (e, m) => {
|
|
|
811
810
|
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"
|
|
812
811
|
}, [
|
|
813
812
|
It,
|
|
814
|
-
Y(
|
|
813
|
+
Y(L(dt), { class: "w-5 h-5" })
|
|
815
814
|
])
|
|
816
815
|
])
|
|
817
816
|
])
|
|
818
817
|
])
|
|
819
|
-
], 2)) :
|
|
818
|
+
], 2)) : D("", !0)
|
|
820
819
|
]),
|
|
821
820
|
_: 3
|
|
822
821
|
})
|
|
823
822
|
])
|
|
824
823
|
]));
|
|
825
824
|
}
|
|
826
|
-
}),
|
|
825
|
+
}), wl = /* @__PURE__ */ be(Tt, [["__scopeId", "data-v-1be10676"]]), Ot = {
|
|
827
826
|
key: 0,
|
|
828
827
|
class: "fixed inset-0 z-[9998] bg-white/50 backdrop-blur-sm",
|
|
829
828
|
"aria-hidden": "true"
|
|
830
829
|
}, jt = {
|
|
831
830
|
key: 0,
|
|
832
831
|
class: "fixed inset-0 z-[9999]"
|
|
833
|
-
}, Yt = { class: "flex justify-center items-center h-screen" },
|
|
832
|
+
}, Yt = { class: "flex justify-center items-center h-screen" }, kl = {
|
|
834
833
|
__name: "modal",
|
|
835
834
|
props: {
|
|
836
835
|
show: Boolean,
|
|
@@ -840,12 +839,12 @@ const be = (e, m) => {
|
|
|
840
839
|
},
|
|
841
840
|
emits: ["clicked-outside"],
|
|
842
841
|
setup(e, { emit: m }) {
|
|
843
|
-
const t = m, n =
|
|
844
|
-
return ie(n, () => t("clicked-outside")), (a, l) => (
|
|
845
|
-
e.show ? (
|
|
842
|
+
const t = m, n = x(null);
|
|
843
|
+
return ie(n, () => t("clicked-outside")), (a, l) => (u(), d(_, null, [
|
|
844
|
+
e.show ? (u(), d("div", Ot)) : D("", !0),
|
|
846
845
|
Y(oe, { name: "appear" }, {
|
|
847
846
|
default: Q(() => [
|
|
848
|
-
e.show ? (
|
|
847
|
+
e.show ? (u(), d("div", jt, [
|
|
849
848
|
i("div", Yt, [
|
|
850
849
|
i("div", {
|
|
851
850
|
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]),
|
|
@@ -855,22 +854,22 @@ const be = (e, m) => {
|
|
|
855
854
|
i("div", {
|
|
856
855
|
class: C(e.headerClass)
|
|
857
856
|
}, [
|
|
858
|
-
|
|
857
|
+
A(a.$slots, "title")
|
|
859
858
|
], 2),
|
|
860
859
|
i("div", {
|
|
861
860
|
class: C(["overflow-y-auto h-full pb-4 mt-16", e.contentClass])
|
|
862
861
|
}, [
|
|
863
|
-
|
|
862
|
+
A(a.$slots, "default")
|
|
864
863
|
], 2)
|
|
865
864
|
], 2)
|
|
866
865
|
])
|
|
867
|
-
])) :
|
|
866
|
+
])) : D("", !0)
|
|
868
867
|
]),
|
|
869
868
|
_: 3
|
|
870
869
|
})
|
|
871
870
|
], 64));
|
|
872
871
|
}
|
|
873
|
-
}, Et = { class: "flex justify-between items-center px-4 sm:px-0" }, Nt = { class: "flex flex-1 -mt-px w-0" }, zt = ["onClick"], Rt = { class: "hidden md:flex md:-mt-px" }, Ht = { class: "flex flex-1 justify-end -mt-px w-0" }, Ut = ["onClick"],
|
|
872
|
+
}, Et = { class: "flex justify-between items-center px-4 sm:px-0" }, Nt = { class: "flex flex-1 -mt-px w-0" }, zt = ["onClick"], Rt = { class: "hidden md:flex md:-mt-px" }, Ht = { class: "flex flex-1 justify-end -mt-px w-0" }, Ut = ["onClick"], $l = {
|
|
874
873
|
__name: "pagination",
|
|
875
874
|
props: {
|
|
876
875
|
page: { type: Number, default: 1 },
|
|
@@ -896,68 +895,68 @@ const be = (e, m) => {
|
|
|
896
895
|
},
|
|
897
896
|
emits: ["update:page"],
|
|
898
897
|
setup(e, { emit: m }) {
|
|
899
|
-
const t = m, n = e, a =
|
|
900
|
-
let
|
|
898
|
+
const t = m, n = e, a = x(Math.ceil(n.total / n.perPage)), l = x(null), c = V(() => n.markerPosition === "above" ? "border-t-2 pt-4" : "border-b-2 pb-4"), s = V(() => {
|
|
899
|
+
let r = [1];
|
|
901
900
|
if (n.showAllPages || a.value <= 7) {
|
|
902
|
-
for (let
|
|
903
|
-
|
|
904
|
-
return
|
|
901
|
+
for (let y = 2; y <= a.value; ++y)
|
|
902
|
+
r.push(y);
|
|
903
|
+
return r;
|
|
905
904
|
}
|
|
906
|
-
return l.value >= a.value ?
|
|
905
|
+
return l.value >= a.value ? r.push("dots", l.value - 2, l.value - 1) : l.value - 1 && l.value - 1 > 1 && (l.value > 1 && r.push("dots"), r.push(l.value - 1)), l.value > 1 && r.push(l.value), l.value + 1 < a.value && (r.push(l.value + 1), l.value <= 1 && r.push(l.value + 2), l.value + 2 < a.value && r.push("dots")), l.value < a.value && r.push(a.value), r;
|
|
907
906
|
}), o = () => {
|
|
908
907
|
l.value > 1 && t("update:page", l.value - 1);
|
|
909
908
|
}, v = () => {
|
|
910
909
|
l.value < a.value && t("update:page", l.value + 1);
|
|
911
910
|
};
|
|
912
|
-
return
|
|
911
|
+
return H(() => n.page, (r) => l.value = Math.min(Math.max(r, 1), a.value), { immediate: !0 }), H(() => n.perPage, (r) => {
|
|
913
912
|
a.value = Math.ceil(n.total / n.perPage), t("update:page", 1);
|
|
914
|
-
}),
|
|
913
|
+
}), H(() => n.total, (r) => {
|
|
915
914
|
a.value = Math.ceil(n.total / n.perPage), l.value > a.value && t("update:page", 1);
|
|
916
|
-
}), (
|
|
915
|
+
}), (r, y) => (u(), d("nav", Et, [
|
|
917
916
|
i("div", Nt, [
|
|
918
|
-
e.showNavButtons ? (
|
|
917
|
+
e.showNavButtons ? (u(), d("a", {
|
|
919
918
|
key: 0,
|
|
920
|
-
onClick:
|
|
919
|
+
onClick: B(o, ["prevent"]),
|
|
921
920
|
href: "#",
|
|
922
921
|
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]])
|
|
923
922
|
}, [
|
|
924
|
-
Y(
|
|
925
|
-
|
|
926
|
-
], 10, zt)) :
|
|
923
|
+
Y(L(se), { class: "w-5 h-5" }),
|
|
924
|
+
z(" " + S(e.prevText), 1)
|
|
925
|
+
], 10, zt)) : D("", !0)
|
|
927
926
|
]),
|
|
928
927
|
i("div", Rt, [
|
|
929
|
-
(
|
|
930
|
-
onClick:
|
|
928
|
+
(u(!0), d(_, null, O(s.value, (f, g) => (u(), G(fe(f !== "dots" ? "a" : "span"), {
|
|
929
|
+
onClick: B((w) => f !== "dots" ? t("update:page", f) : null, ["prevent"]),
|
|
931
930
|
key: g,
|
|
932
|
-
href:
|
|
931
|
+
href: f !== "dots" ? "#" : null,
|
|
933
932
|
class: C(["inline-flex items-center px-4 text-sm font-medium", [{
|
|
934
|
-
"border-vxvue-500 text-vxvue-700":
|
|
935
|
-
"border-transparent text-gray-500":
|
|
936
|
-
"hover:text-gray-700 hover:border-gray-300":
|
|
933
|
+
"border-vxvue-500 text-vxvue-700": f === l.value,
|
|
934
|
+
"border-transparent text-gray-500": f !== l.value,
|
|
935
|
+
"hover:text-gray-700 hover:border-gray-300": f !== "dots"
|
|
937
936
|
}, c.value]])
|
|
938
937
|
}, {
|
|
939
938
|
default: Q(() => [
|
|
940
|
-
|
|
939
|
+
z(S(f !== "dots" ? f : "..."), 1)
|
|
941
940
|
]),
|
|
942
941
|
_: 2
|
|
943
942
|
}, 1032, ["onClick", "href", "class"]))), 128))
|
|
944
943
|
]),
|
|
945
944
|
i("div", Ht, [
|
|
946
|
-
e.showNavButtons ? (
|
|
945
|
+
e.showNavButtons ? (u(), d("a", {
|
|
947
946
|
key: 0,
|
|
948
|
-
onClick:
|
|
947
|
+
onClick: B(v, ["prevent"]),
|
|
949
948
|
href: "#",
|
|
950
949
|
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 }]])
|
|
951
950
|
}, [
|
|
952
|
-
|
|
953
|
-
Y(
|
|
954
|
-
], 10, Ut)) :
|
|
951
|
+
z(S(e.nextText) + " ", 1),
|
|
952
|
+
Y(L(ne), { class: "w-5 h-5" })
|
|
953
|
+
], 10, Ut)) : D("", !0)
|
|
955
954
|
])
|
|
956
955
|
]));
|
|
957
956
|
}
|
|
958
957
|
};
|
|
959
958
|
function Wt(e, m) {
|
|
960
|
-
return
|
|
959
|
+
return u(), d("svg", {
|
|
961
960
|
xmlns: "http://www.w3.org/2000/svg",
|
|
962
961
|
fill: "none",
|
|
963
962
|
viewBox: "0 0 24 24",
|
|
@@ -973,7 +972,7 @@ function Wt(e, m) {
|
|
|
973
972
|
]);
|
|
974
973
|
}
|
|
975
974
|
function qt(e, m) {
|
|
976
|
-
return
|
|
975
|
+
return u(), d("svg", {
|
|
977
976
|
xmlns: "http://www.w3.org/2000/svg",
|
|
978
977
|
fill: "none",
|
|
979
978
|
viewBox: "0 0 24 24",
|
|
@@ -993,56 +992,56 @@ function qt(e, m) {
|
|
|
993
992
|
})
|
|
994
993
|
]);
|
|
995
994
|
}
|
|
996
|
-
const Kt = ["value", "type"],
|
|
995
|
+
const Kt = ["value", "type"], Cl = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
997
996
|
__name: "password-input",
|
|
998
997
|
props: ["modelValue"],
|
|
999
998
|
emits: ["update:modelValue"],
|
|
1000
999
|
setup(e, { emit: m }) {
|
|
1001
|
-
const t = m, n =
|
|
1000
|
+
const t = m, n = x(!1), a = V(() => {
|
|
1002
1001
|
let l = Object.assign({}, K());
|
|
1003
1002
|
return delete l.class, l;
|
|
1004
1003
|
});
|
|
1005
|
-
return (l, c) => (
|
|
1004
|
+
return (l, c) => (u(), d("div", {
|
|
1006
1005
|
class: C("inline-block relative " + K().class)
|
|
1007
1006
|
}, [
|
|
1008
|
-
i("input",
|
|
1007
|
+
i("input", j({
|
|
1009
1008
|
value: e.modelValue,
|
|
1010
1009
|
type: n.value ? "text" : "password",
|
|
1011
1010
|
onInput: c[0] || (c[0] = (s) => t("update:modelValue", s.target.value))
|
|
1012
1011
|
}, a.value, { class: "block pr-10 w-full form-input peer" }), null, 16, Kt),
|
|
1013
1012
|
i("button", {
|
|
1014
|
-
onClick: c[1] || (c[1] =
|
|
1013
|
+
onClick: c[1] || (c[1] = B((s) => n.value = !n.value, ["stop"])),
|
|
1015
1014
|
class: "flex absolute inset-y-0 right-0 items-center pr-3 text-brand-700 hover:text-brand"
|
|
1016
1015
|
}, [
|
|
1017
|
-
n.value ? (
|
|
1016
|
+
n.value ? (u(), G(L(Wt), {
|
|
1018
1017
|
key: 0,
|
|
1019
1018
|
class: "w-5 h-5"
|
|
1020
|
-
})) : (
|
|
1019
|
+
})) : (u(), G(L(qt), {
|
|
1021
1020
|
key: 1,
|
|
1022
1021
|
class: "w-5 h-5"
|
|
1023
1022
|
}))
|
|
1024
1023
|
]),
|
|
1025
|
-
|
|
1024
|
+
A(l.$slots, "default")
|
|
1026
1025
|
], 2));
|
|
1027
1026
|
}
|
|
1028
1027
|
}), Gt = { class: "flex items-center pb-1" }, Xt = ["id", "checked"], Zt = ["for"], Jt = { key: 1 }, Qt = ["href"], el = {
|
|
1029
1028
|
key: 0,
|
|
1030
1029
|
class: "ml-6"
|
|
1031
|
-
},
|
|
1030
|
+
}, Sl = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
1032
1031
|
__name: "simple-tree",
|
|
1033
1032
|
props: { branch: { type: Object, default: {} } },
|
|
1034
1033
|
emits: ["branch-selected", "expand"],
|
|
1035
1034
|
setup(e, { emit: m }) {
|
|
1036
|
-
const t = e, n = m, a =
|
|
1035
|
+
const t = e, n = m, a = x(!1);
|
|
1037
1036
|
return ue(() => {
|
|
1038
1037
|
t.branch.current && n("expand", !0);
|
|
1039
1038
|
}), (l, c) => {
|
|
1040
|
-
const s =
|
|
1041
|
-
return
|
|
1039
|
+
const s = De("simple-tree", !0);
|
|
1040
|
+
return u(), d("div", {
|
|
1042
1041
|
class: C([!e.branch.branches || !e.branch.branches.length ? "terminates" : "", l.$attrs.class])
|
|
1043
1042
|
}, [
|
|
1044
1043
|
i("div", Gt, [
|
|
1045
|
-
e.branch.branches && e.branch.branches.length ? (
|
|
1044
|
+
e.branch.branches && e.branch.branches.length ? (u(), d(_, { key: 0 }, [
|
|
1046
1045
|
i("input", {
|
|
1047
1046
|
type: "checkbox",
|
|
1048
1047
|
id: "branch-" + e.branch.id,
|
|
@@ -1054,17 +1053,17 @@ const Kt = ["value", "type"], Sl = /* @__PURE__ */ Object.assign({ inheritAttrs:
|
|
|
1054
1053
|
for: "branch-" + e.branch.id,
|
|
1055
1054
|
class: "mr-2"
|
|
1056
1055
|
}, [
|
|
1057
|
-
(
|
|
1056
|
+
(u(), G(fe(a.value ? L(it) : L(ct)), { class: "w-4 h-4 border" }))
|
|
1058
1057
|
], 8, Zt)
|
|
1059
|
-
], 64)) :
|
|
1060
|
-
e.branch.current ? (
|
|
1058
|
+
], 64)) : D("", !0),
|
|
1059
|
+
e.branch.current ? (u(), d("strong", Jt, S(e.branch.label), 1)) : (u(), d("a", {
|
|
1061
1060
|
key: 2,
|
|
1062
1061
|
href: e.branch.path,
|
|
1063
|
-
onClick: c[1] || (c[1] =
|
|
1062
|
+
onClick: c[1] || (c[1] = B((o) => n("branch-selected", e.branch), ["prevent"]))
|
|
1064
1063
|
}, S(e.branch.label), 9, Qt))
|
|
1065
1064
|
]),
|
|
1066
|
-
e.branch.branches && e.branch.branches.length ? me((
|
|
1067
|
-
(
|
|
1065
|
+
e.branch.branches && e.branch.branches.length ? me((u(), d("ul", el, [
|
|
1066
|
+
(u(!0), d(_, null, O(e.branch.branches, (o) => (u(), G(s, {
|
|
1068
1067
|
branch: o,
|
|
1069
1068
|
key: o.id,
|
|
1070
1069
|
onBranchSelected: c[2] || (c[2] = (v) => n("branch-selected", v)),
|
|
@@ -1073,8 +1072,8 @@ const Kt = ["value", "type"], Sl = /* @__PURE__ */ Object.assign({ inheritAttrs:
|
|
|
1073
1072
|
})
|
|
1074
1073
|
}, null, 8, ["branch"]))), 128))
|
|
1075
1074
|
], 512)), [
|
|
1076
|
-
[
|
|
1077
|
-
]) :
|
|
1075
|
+
[_e, a.value]
|
|
1076
|
+
]) : D("", !0)
|
|
1078
1077
|
], 2);
|
|
1079
1078
|
};
|
|
1080
1079
|
}
|
|
@@ -1091,50 +1090,46 @@ const Kt = ["value", "type"], Sl = /* @__PURE__ */ Object.assign({ inheritAttrs:
|
|
|
1091
1090
|
},
|
|
1092
1091
|
emits: ["update:modelValue"],
|
|
1093
1092
|
setup(e, { emit: m }) {
|
|
1094
|
-
const t = e, n = m, a = K(), l =
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1093
|
+
const t = e, n = m, a = K(), l = { x: null, y: null }, c = { w: null, h: null };
|
|
1094
|
+
let s = !1;
|
|
1095
|
+
const o = x(null), v = x(0), r = V(() => {
|
|
1096
|
+
const p = t.max, h = t.min;
|
|
1097
|
+
return t.modelValue instanceof Array ? t.modelValue.map((M) => Math.max(Math.min(M, p), h) * 100 / (p - h)) : Math.max(Math.min(t.modelValue, p), h) * 100 / (p - h);
|
|
1098
|
+
}), y = V(() => {
|
|
1098
1099
|
if (t.modelValue instanceof Array) {
|
|
1099
|
-
const
|
|
1100
|
-
return t.vertical ? { bottom:
|
|
1100
|
+
const p = Math.min(...r.value) + "%", h = Math.max(...r.value) - Math.min(...r.value) + "%";
|
|
1101
|
+
return t.vertical ? { bottom: p, height: h } : { left: p, width: h };
|
|
1101
1102
|
}
|
|
1102
|
-
return t.vertical ? { bottom: 0, height:
|
|
1103
|
-
}),
|
|
1103
|
+
return t.vertical ? { bottom: 0, height: r.value + "%" } : { width: r.value + "%" };
|
|
1104
|
+
}), f = x({
|
|
1104
1105
|
class: (t.vertical ? "left-0 -translate-x-1.5 translate-y-2.5" : "top-0 -translate-x-2.5 -translate-y-1.5") + " touch-none absolute w-5 h-5 rounded-full border-2 bg-white transition-colors duration-200 " + (t.disabled ? "" : " focus:ring-4 focus:outline-none border-vxvue cursor-grab hover:bg-vxvue focus:ring-vxvue/50"),
|
|
1105
1106
|
tabindex: 0,
|
|
1106
1107
|
role: "slider",
|
|
1107
1108
|
"aria-valuemin": t.min,
|
|
1108
1109
|
"aria-valuemax": t.max
|
|
1109
|
-
}), g = (
|
|
1110
|
-
let h = parseFloat(
|
|
1110
|
+
}), g = (p) => {
|
|
1111
|
+
let h = parseFloat(p.toFixed(10));
|
|
1111
1112
|
if (h = Math.min(t.max, Math.max(t.min, h)), t.modelValue instanceof Array) {
|
|
1112
1113
|
let M = [...t.modelValue];
|
|
1113
1114
|
M[v.value] = h, n("update:modelValue", M);
|
|
1114
1115
|
} else
|
|
1115
1116
|
n("update:modelValue", h);
|
|
1116
|
-
}, w = (
|
|
1117
|
-
const { pageX: h, pageY: M } =
|
|
1118
|
-
g(Math.floor((t.max - t.min) *
|
|
1119
|
-
},
|
|
1120
|
-
const
|
|
1121
|
-
l.value =
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
},
|
|
1129
|
-
|
|
1130
|
-
}, L = (f) => {
|
|
1131
|
-
f.preventDefault(), f.currentTarget.focus(), j(), s.value = !0, document.addEventListener("mousemove", I), document.addEventListener("mouseup", H);
|
|
1132
|
-
}, H = () => {
|
|
1133
|
-
s.value && (s.value = !1, document.removeEventListener("mousemove", I), document.removeEventListener("mouseup", H));
|
|
1134
|
-
}, q = (f) => {
|
|
1135
|
-
f.keyCode >= 33 && f.keyCode <= 40 && f.preventDefault();
|
|
1117
|
+
}, w = (p) => {
|
|
1118
|
+
const { pageX: h, pageY: M } = p.touches ? p.touches[0] : p, P = t.vertical ? (-M + l.y) / c.h : (h - l.x) / c.w;
|
|
1119
|
+
g(Math.floor((t.max - t.min) * P + t.min));
|
|
1120
|
+
}, I = () => {
|
|
1121
|
+
const { clientLeft: p, clientTop: h, scrollLeft: M, scrollTop: P } = document.documentElement, E = o.value.getBoundingClientRect();
|
|
1122
|
+
l.x = E.left + M - p, l.y = E.bottom + P - h, c.w = o.value.offsetWidth, c.h = o.value.offsetHeight;
|
|
1123
|
+
}, T = (p) => {
|
|
1124
|
+
s && (p.preventDefault(), w(p));
|
|
1125
|
+
}, F = (p) => {
|
|
1126
|
+
p.preventDefault(), p.currentTarget.focus(), I(), s = !0, document.addEventListener("mousemove", T), document.addEventListener("mouseup", U);
|
|
1127
|
+
}, U = () => {
|
|
1128
|
+
s && (s = !1, document.removeEventListener("mousemove", T), document.removeEventListener("mouseup", U));
|
|
1129
|
+
}, q = (p) => {
|
|
1130
|
+
p.keyCode >= 33 && p.keyCode <= 40 && p.preventDefault();
|
|
1136
1131
|
const h = t.modelValue[v.value] ?? t.modelValue;
|
|
1137
|
-
switch (
|
|
1132
|
+
switch (p.keyCode) {
|
|
1138
1133
|
case 37:
|
|
1139
1134
|
case 40:
|
|
1140
1135
|
g(h - 1);
|
|
@@ -1155,70 +1150,69 @@ const Kt = ["value", "type"], Sl = /* @__PURE__ */ Object.assign({ inheritAttrs:
|
|
|
1155
1150
|
case 35:
|
|
1156
1151
|
g(t.max);
|
|
1157
1152
|
}
|
|
1158
|
-
},
|
|
1159
|
-
|
|
1153
|
+
}, b = (p) => {
|
|
1154
|
+
I(), w(p);
|
|
1160
1155
|
};
|
|
1161
|
-
return (
|
|
1156
|
+
return (p, h) => (u(), d("div", j({
|
|
1162
1157
|
class: ["relative bg-slate-300", e.vertical ? "h-full w-2 rounded-t-full rounded-b-full" : "w-full h-2 rounded-r-full rounded-l-full"],
|
|
1163
1158
|
ref_key: "track",
|
|
1164
1159
|
ref: o
|
|
1165
1160
|
}, te(e.disabled ? {} : {
|
|
1166
|
-
click:
|
|
1161
|
+
click: b
|
|
1167
1162
|
}, !0)), [
|
|
1168
|
-
e.disabled ?
|
|
1163
|
+
e.disabled ? D("", !0) : (u(), d("div", {
|
|
1169
1164
|
key: 0,
|
|
1170
1165
|
class: C(["absolute bg-vxvue", e.vertical ? "w-full rounded-t-full rounded-b-full" : "h-full rounded-r-full rounded-l-full"]),
|
|
1171
|
-
style: Ae(
|
|
1166
|
+
style: Ae(y.value)
|
|
1172
1167
|
}, null, 6)),
|
|
1173
|
-
e.modelValue.length ? (
|
|
1174
|
-
id:
|
|
1175
|
-
style: e.vertical ? { bottom:
|
|
1176
|
-
"aria-valuenow": e.modelValue[
|
|
1168
|
+
e.modelValue.length ? (u(!0), d(_, { key: 2 }, O(e.modelValue, (M, P) => (u(), d("button", j({
|
|
1169
|
+
id: P ? null : L(a).id,
|
|
1170
|
+
style: e.vertical ? { bottom: r.value[P] + "%" } : { left: r.value[P] + "%" },
|
|
1171
|
+
"aria-valuenow": e.modelValue[P]
|
|
1177
1172
|
}, te(e.disabled ? {} : {
|
|
1178
|
-
focus: () => v.value =
|
|
1173
|
+
focus: () => v.value = P,
|
|
1179
1174
|
keydown: q,
|
|
1180
|
-
mousedown: (
|
|
1181
|
-
v.value =
|
|
1175
|
+
mousedown: (E) => {
|
|
1176
|
+
v.value = P, F(E);
|
|
1182
1177
|
},
|
|
1183
|
-
touchstart: (
|
|
1184
|
-
v.value =
|
|
1178
|
+
touchstart: (E) => {
|
|
1179
|
+
v.value = P, F(E);
|
|
1185
1180
|
},
|
|
1186
|
-
touchmove:
|
|
1187
|
-
touchend:
|
|
1188
|
-
}, !0),
|
|
1181
|
+
touchmove: T,
|
|
1182
|
+
touchend: U
|
|
1183
|
+
}, !0), f.value), null, 16, ll))), 256)) : (u(), d("button", j({
|
|
1189
1184
|
key: 1,
|
|
1190
|
-
id:
|
|
1191
|
-
style: e.vertical ? { bottom:
|
|
1185
|
+
id: L(a).id,
|
|
1186
|
+
style: e.vertical ? { bottom: r.value + "%" } : { left: r.value + "%" },
|
|
1192
1187
|
"aria-valuenow": e.modelValue
|
|
1193
1188
|
}, te(e.disabled ? {} : {
|
|
1194
1189
|
focus: () => v.value = 0,
|
|
1195
1190
|
keydown: q,
|
|
1196
1191
|
mousedown: (M) => {
|
|
1197
|
-
v.value = 0,
|
|
1192
|
+
v.value = 0, F(M);
|
|
1198
1193
|
},
|
|
1199
1194
|
touchstart: (M) => {
|
|
1200
|
-
v.value = 0,
|
|
1195
|
+
v.value = 0, F(M);
|
|
1201
1196
|
},
|
|
1202
|
-
touchmove:
|
|
1203
|
-
touchend:
|
|
1204
|
-
}, !0),
|
|
1197
|
+
touchmove: T,
|
|
1198
|
+
touchend: U
|
|
1199
|
+
}, !0), f.value), null, 16, tl))
|
|
1205
1200
|
], 16));
|
|
1206
1201
|
}
|
|
1207
|
-
})
|
|
1208
|
-
const al = { class: "w-full divide-y divide-y-slate-900" }, sl = { class: "text-white bg-slate-700" }, nl = ["onClick"], ol = { class: "flex items-center" }, rl = {
|
|
1202
|
+
}), al = { class: "text-white bg-slate-700" }, sl = ["onClick"], nl = { class: "flex items-center" }, ol = {
|
|
1209
1203
|
key: 0,
|
|
1210
1204
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1211
1205
|
class: "flex-shrink-0 ml-2 w-4 h-4",
|
|
1212
1206
|
fill: "none",
|
|
1213
1207
|
viewBox: "0 0 24 24",
|
|
1214
1208
|
stroke: "currentColor"
|
|
1215
|
-
},
|
|
1209
|
+
}, rl = ["d"], ul = {
|
|
1216
1210
|
key: 1,
|
|
1217
1211
|
"stroke-linecap": "round",
|
|
1218
1212
|
"stroke-linejoin": "round",
|
|
1219
1213
|
"stroke-width": "2",
|
|
1220
1214
|
d: "M8 9l4-4 4 4m0 6l-4 4-4-4"
|
|
1221
|
-
},
|
|
1215
|
+
}, il = {
|
|
1222
1216
|
__name: "sortable",
|
|
1223
1217
|
props: {
|
|
1224
1218
|
columns: {
|
|
@@ -1240,65 +1234,67 @@ const al = { class: "w-full divide-y divide-y-slate-900" }, sl = { class: "text-
|
|
|
1240
1234
|
},
|
|
1241
1235
|
emits: ["before-sort", "after-sort"],
|
|
1242
1236
|
setup(e, { emit: m }) {
|
|
1243
|
-
const t = e, n = m, a =
|
|
1237
|
+
const t = e, n = m, a = x(t.sortProp), l = x(t.sortDirection), c = V(() => {
|
|
1244
1238
|
let o = t.rows.slice();
|
|
1245
|
-
const v = t.columns.find(({ prop:
|
|
1246
|
-
return v && (l.value === "asc" && v.sortAscFunction ? o.sort(v.sortAscFunction) : l.value === "desc" && v.sortDescFunction ? o.sort(v.sortDescFunction) : o.sort((
|
|
1239
|
+
const v = t.columns.find(({ prop: r }) => r === a.value);
|
|
1240
|
+
return v && (l.value === "asc" && v.sortAscFunction ? o.sort(v.sortAscFunction) : l.value === "desc" && v.sortDescFunction ? o.sort(v.sortDescFunction) : o.sort((r, y) => r[a.value] < y[a.value] ? l.value === "asc" ? -1 : 1 : r[a.value] > y[a.value] ? l.value === "asc" ? 1 : -1 : 0)), o.slice(t.offset || 0, (t.offset || 0) + (t.count || o.length));
|
|
1247
1241
|
}), s = (o) => {
|
|
1248
1242
|
n("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(() => n("after-sort", { prop: a.value, dir: l.value }));
|
|
1249
1243
|
};
|
|
1250
|
-
return (o, v) => (
|
|
1251
|
-
|
|
1244
|
+
return (o, v) => (u(), d("table", {
|
|
1245
|
+
class: C(o.$attrs.class || "w-full divide-y divide-y-slate-900 table-fixed")
|
|
1246
|
+
}, [
|
|
1247
|
+
i("thead", al, [
|
|
1252
1248
|
i("tr", null, [
|
|
1253
|
-
(
|
|
1249
|
+
(u(!0), d(_, null, O(e.columns, (r) => (u(), d("th", {
|
|
1254
1250
|
scope: "col",
|
|
1255
1251
|
class: C(["py-3 px-6 text-left", [
|
|
1256
|
-
{ "cursor-pointer":
|
|
1257
|
-
|
|
1252
|
+
{ "cursor-pointer": r.sortable, active: a.value === r.prop },
|
|
1253
|
+
r.cssClass
|
|
1258
1254
|
]]),
|
|
1259
|
-
onClick: (
|
|
1255
|
+
onClick: (y) => r.sortable ? s(r.prop) : null
|
|
1260
1256
|
}, [
|
|
1261
|
-
|
|
1262
|
-
column:
|
|
1257
|
+
A(o.$slots, r.prop + "-header", {
|
|
1258
|
+
column: r,
|
|
1263
1259
|
sortDir: l.value,
|
|
1264
1260
|
sortProp: a.value
|
|
1265
1261
|
}, () => [
|
|
1266
|
-
i("div",
|
|
1267
|
-
i("span", null, S(
|
|
1268
|
-
|
|
1269
|
-
a.value ===
|
|
1262
|
+
i("div", nl, [
|
|
1263
|
+
i("span", null, S(r.label), 1),
|
|
1264
|
+
r.sortable ? (u(), d("svg", ol, [
|
|
1265
|
+
a.value === r.prop ? (u(), d("path", {
|
|
1270
1266
|
key: 0,
|
|
1271
1267
|
"stroke-linecap": "round",
|
|
1272
1268
|
"stroke-linejoin": "round",
|
|
1273
1269
|
"stroke-width": "2",
|
|
1274
1270
|
d: l.value === "asc" ? "M19 9l-7 7-7-7" : "M5 15l7-7 7 7"
|
|
1275
|
-
}, null, 8,
|
|
1276
|
-
])) :
|
|
1271
|
+
}, null, 8, rl)) : (u(), d("path", ul))
|
|
1272
|
+
])) : D("", !0)
|
|
1277
1273
|
])
|
|
1278
1274
|
], !0)
|
|
1279
|
-
], 10,
|
|
1275
|
+
], 10, sl))), 256))
|
|
1280
1276
|
])
|
|
1281
1277
|
]),
|
|
1282
1278
|
i("tbody", null, [
|
|
1283
|
-
(
|
|
1284
|
-
key:
|
|
1285
|
-
class: C(
|
|
1279
|
+
(u(!0), d(_, null, O(c.value, (r) => (u(), d("tr", {
|
|
1280
|
+
key: r[e.keyProperty],
|
|
1281
|
+
class: C(r.cssClass)
|
|
1286
1282
|
}, [
|
|
1287
|
-
(
|
|
1288
|
-
class: C(["py-3 px-6 whitespace-nowrap", { active: a.value ===
|
|
1283
|
+
(u(!0), d(_, null, O(e.columns, (y) => (u(), d("td", {
|
|
1284
|
+
class: C(["py-3 px-6 whitespace-nowrap text-ellipsis overflow-hidden", { active: a.value === y.prop }])
|
|
1289
1285
|
}, [
|
|
1290
|
-
|
|
1291
|
-
|
|
1286
|
+
A(o.$slots, y.prop, { row: r }, () => [
|
|
1287
|
+
z(S(r[y.prop]), 1)
|
|
1292
1288
|
], !0)
|
|
1293
1289
|
], 2))), 256))
|
|
1294
1290
|
], 2))), 128))
|
|
1295
1291
|
])
|
|
1296
|
-
]));
|
|
1292
|
+
], 2));
|
|
1297
1293
|
}
|
|
1298
|
-
}, Vl = /* @__PURE__ */ be(
|
|
1294
|
+
}, Vl = /* @__PURE__ */ be(il, [["__scopeId", "data-v-b7864909"]]), cl = { class: "sm:hidden" }, dl = { class: "hidden sm:block" }, vl = { class: "border-b border-gray-200" }, ml = {
|
|
1299
1295
|
class: "flex -mb-px space-x-8",
|
|
1300
1296
|
"aria-label": "Tabs"
|
|
1301
|
-
},
|
|
1297
|
+
}, fl = ["onClick", "aria-current"], Dl = {
|
|
1302
1298
|
__name: "tabs",
|
|
1303
1299
|
props: {
|
|
1304
1300
|
items: { type: Array, default: [] },
|
|
@@ -1306,20 +1302,20 @@ const al = { class: "w-full divide-y divide-y-slate-900" }, sl = { class: "text-
|
|
|
1306
1302
|
},
|
|
1307
1303
|
emits: ["update:active-index"],
|
|
1308
1304
|
setup(e, { emit: m }) {
|
|
1309
|
-
const t = e, n = m, a =
|
|
1305
|
+
const t = e, n = m, a = x(t.items[t.activeIndex] || {}), l = V(() => {
|
|
1310
1306
|
let s = [];
|
|
1311
1307
|
return t.items.forEach((o, v) => {
|
|
1312
1308
|
o.disabled || s.push({ label: o.name, key: v });
|
|
1313
1309
|
}), s;
|
|
1314
1310
|
});
|
|
1315
|
-
|
|
1311
|
+
H(() => t.activeIndex, (s) => {
|
|
1316
1312
|
a.value = t.items[s] || {};
|
|
1317
1313
|
});
|
|
1318
1314
|
const c = (s) => {
|
|
1319
1315
|
s.disabled || (a.value = s, n("update:active-index", t.items.indexOf(s)));
|
|
1320
1316
|
};
|
|
1321
|
-
return (s, o) => (
|
|
1322
|
-
i("div",
|
|
1317
|
+
return (s, o) => (u(), d(_, null, [
|
|
1318
|
+
i("div", cl, [
|
|
1323
1319
|
Y(kt, {
|
|
1324
1320
|
options: l.value,
|
|
1325
1321
|
"model-value": e.activeIndex,
|
|
@@ -1327,13 +1323,13 @@ const al = { class: "w-full divide-y divide-y-slate-900" }, sl = { class: "text-
|
|
|
1327
1323
|
class: "w-full"
|
|
1328
1324
|
}, null, 8, ["options", "model-value"])
|
|
1329
1325
|
]),
|
|
1330
|
-
i("div",
|
|
1331
|
-
i("div",
|
|
1332
|
-
i("nav",
|
|
1333
|
-
(
|
|
1326
|
+
i("div", dl, [
|
|
1327
|
+
i("div", vl, [
|
|
1328
|
+
i("nav", ml, [
|
|
1329
|
+
(u(!0), d(_, null, O(e.items, (v) => (u(), d("a", {
|
|
1334
1330
|
key: v.name,
|
|
1335
1331
|
href: "#",
|
|
1336
|
-
onClick:
|
|
1332
|
+
onClick: B((r) => c(v), ["prevent"]),
|
|
1337
1333
|
class: C([
|
|
1338
1334
|
a.value === v ? "border-vxvue-500 text-vxvue-600" : "border-transparent text-gray-900 hover:text-gray-700 hover:border-gray-300",
|
|
1339
1335
|
v.disabled ? "cursor-not-allowed text-gray-400 hover:border-transparent" : "",
|
|
@@ -1341,21 +1337,21 @@ const al = { class: "w-full divide-y divide-y-slate-900" }, sl = { class: "text-
|
|
|
1341
1337
|
]),
|
|
1342
1338
|
"aria-current": a.value === v ? "page" : void 0
|
|
1343
1339
|
}, [
|
|
1344
|
-
|
|
1340
|
+
A(s.$slots, "icon", { tab: v }),
|
|
1345
1341
|
i("span", null, [
|
|
1346
|
-
|
|
1347
|
-
|
|
1342
|
+
A(s.$slots, "default", { tab: v }, () => [
|
|
1343
|
+
z(S(v.name), 1)
|
|
1348
1344
|
])
|
|
1349
1345
|
]),
|
|
1350
|
-
v.badge ? (
|
|
1346
|
+
v.badge ? (u(), d("span", {
|
|
1351
1347
|
key: 0,
|
|
1352
1348
|
class: C([
|
|
1353
1349
|
a.value === v ? "bg-vxvue-50 text-vxvue-700" : "bg-gray-200 text-gray-900",
|
|
1354
1350
|
v.disabled ? "bg-gray-100 text-gray-400" : "",
|
|
1355
1351
|
"hidden ml-3 py-0.5 px-2.5 rounded-full text-xs font-medium md:inline-block"
|
|
1356
1352
|
])
|
|
1357
|
-
}, S(v.badge), 3)) :
|
|
1358
|
-
], 10,
|
|
1353
|
+
}, S(v.badge), 3)) : D("", !0)
|
|
1354
|
+
], 10, fl))), 128))
|
|
1359
1355
|
])
|
|
1360
1356
|
])
|
|
1361
1357
|
])
|
|
@@ -1363,18 +1359,18 @@ const al = { class: "w-full divide-y divide-y-slate-900" }, sl = { class: "text-
|
|
|
1363
1359
|
}
|
|
1364
1360
|
};
|
|
1365
1361
|
export {
|
|
1366
|
-
|
|
1367
|
-
|
|
1362
|
+
pl as Autocomplete,
|
|
1363
|
+
gl as Confirm,
|
|
1368
1364
|
ut as DateInput,
|
|
1369
|
-
|
|
1370
|
-
|
|
1365
|
+
bl as Datepicker,
|
|
1366
|
+
xl as FormFileButton,
|
|
1371
1367
|
kt as FormSelect,
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1368
|
+
yl as FormSwitch,
|
|
1369
|
+
wl as MessageToast,
|
|
1370
|
+
kl as Modal,
|
|
1371
|
+
$l as Pagination,
|
|
1372
|
+
Cl as PasswordInput,
|
|
1373
|
+
Sl as SimpleTree,
|
|
1378
1374
|
Ml as Slider,
|
|
1379
1375
|
Vl as Sortable,
|
|
1380
1376
|
Dl as Tabs
|