vx-vue 0.7.2 → 0.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -16
- package/dist/vxvue.es.js +594 -555
- package/dist/vxvue.umd.js +1 -1
- package/package.json +3 -3
package/dist/vxvue.es.js
CHANGED
|
@@ -1,143 +1,156 @@
|
|
|
1
|
-
import { getCurrentScope as
|
|
2
|
-
function
|
|
3
|
-
return
|
|
1
|
+
import { getCurrentScope as ke, onScopeDispose as $e, unref as D, watch as R, useAttrs as K, ref as y, computed as _, onUpdated as Ce, openBlock as r, createElementBlock as d, normalizeClass as C, createElementVNode as i, mergeProps as O, withKeys as Z, withModifiers as P, createCommentVNode as V, Fragment as A, renderList as T, renderSlot as B, toDisplayString as S, createVNode as Y, Transition as oe, withCtx as Q, createTextVNode as N, nextTick as re, toValue as ce, withDirectives as me, vModelText as Se, onMounted as ue, createBlock as G, pushScopeId as _e, popScopeId as Me, resolveDynamicComponent as fe, resolveComponent as Ve, vShow as De, toHandlers as te, normalizeStyle as Ae } from "vue";
|
|
2
|
+
function Be(e) {
|
|
3
|
+
return ke() ? ($e(e), !0) : !1;
|
|
4
4
|
}
|
|
5
|
-
function
|
|
6
|
-
return typeof e == "function" ? e() :
|
|
5
|
+
function he(e) {
|
|
6
|
+
return typeof e == "function" ? e() : D(e);
|
|
7
7
|
}
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
const pe = typeof window < "u" && typeof document < "u";
|
|
9
|
+
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
10
|
+
const Pe = Object.prototype.toString, Le = (e) => Pe.call(e) === "[object Object]", ae = () => {
|
|
11
|
+
}, Fe = /* @__PURE__ */ Ie();
|
|
12
|
+
function Ie() {
|
|
11
13
|
var e;
|
|
12
|
-
return
|
|
14
|
+
return pe && ((e = window == null ? void 0 : window.navigator) == null ? void 0 : e.userAgent) && /* @__PURE__ */ /iP(ad|hone|od)/.test(window.navigator.userAgent);
|
|
13
15
|
}
|
|
14
|
-
const
|
|
15
|
-
function
|
|
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, m, t, n) {
|
|
16
18
|
let a = e < 12 ? "AM" : "PM";
|
|
17
|
-
return
|
|
19
|
+
return n && (a = a.split("").reduce((l, c) => l += `${c}.`, "")), t ? a.toLowerCase() : a;
|
|
18
20
|
}
|
|
19
|
-
function
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
function W(e) {
|
|
22
|
+
const m = ["th", "st", "nd", "rd"], t = e % 100;
|
|
23
|
+
return e + (m[(t - 20) % 10] || m[t] || m[0]);
|
|
24
|
+
}
|
|
25
|
+
function de(e, m, t = {}) {
|
|
26
|
+
var n;
|
|
27
|
+
const a = e.getFullYear(), l = e.getMonth(), c = e.getDate(), s = e.getHours(), o = e.getMinutes(), v = e.getSeconds(), u = e.getMilliseconds(), b = e.getDay(), p = (n = t.customMeridiem) != null ? n : Oe, g = {
|
|
28
|
+
Yo: () => W(a),
|
|
22
29
|
YY: () => String(a).slice(-2),
|
|
23
30
|
YYYY: () => a,
|
|
24
31
|
M: () => l + 1,
|
|
32
|
+
Mo: () => W(l + 1),
|
|
25
33
|
MM: () => `${l + 1}`.padStart(2, "0"),
|
|
26
34
|
MMM: () => e.toLocaleDateString(t.locales, { month: "short" }),
|
|
27
35
|
MMMM: () => e.toLocaleDateString(t.locales, { month: "long" }),
|
|
28
36
|
D: () => String(c),
|
|
37
|
+
Do: () => W(c),
|
|
29
38
|
DD: () => `${c}`.padStart(2, "0"),
|
|
30
|
-
H: () => String(
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
39
|
+
H: () => String(s),
|
|
40
|
+
Ho: () => W(s),
|
|
41
|
+
HH: () => `${s}`.padStart(2, "0"),
|
|
42
|
+
h: () => `${s % 12 || 12}`.padStart(1, "0"),
|
|
43
|
+
ho: () => W(s % 12 || 12),
|
|
44
|
+
hh: () => `${s % 12 || 12}`.padStart(2, "0"),
|
|
34
45
|
m: () => String(o),
|
|
46
|
+
mo: () => W(o),
|
|
35
47
|
mm: () => `${o}`.padStart(2, "0"),
|
|
36
48
|
s: () => String(v),
|
|
49
|
+
so: () => W(v),
|
|
37
50
|
ss: () => `${v}`.padStart(2, "0"),
|
|
38
51
|
SSS: () => `${u}`.padStart(3, "0"),
|
|
39
52
|
d: () => b,
|
|
40
53
|
dd: () => e.toLocaleDateString(t.locales, { weekday: "narrow" }),
|
|
41
54
|
ddd: () => e.toLocaleDateString(t.locales, { weekday: "short" }),
|
|
42
55
|
dddd: () => e.toLocaleDateString(t.locales, { weekday: "long" }),
|
|
43
|
-
A: () =>
|
|
44
|
-
AA: () =>
|
|
45
|
-
a: () =>
|
|
46
|
-
aa: () =>
|
|
56
|
+
A: () => p(s, o),
|
|
57
|
+
AA: () => p(s, o, !1, !0),
|
|
58
|
+
a: () => p(s, o, !0),
|
|
59
|
+
aa: () => p(s, o, !0, !0)
|
|
47
60
|
};
|
|
48
|
-
return m.replace(
|
|
49
|
-
var
|
|
50
|
-
return (L =
|
|
61
|
+
return m.replace(Te, (w, j) => {
|
|
62
|
+
var I, L;
|
|
63
|
+
return (L = j ?? ((I = g[w]) == null ? void 0 : I.call(g))) != null ? L : w;
|
|
51
64
|
});
|
|
52
65
|
}
|
|
53
|
-
function
|
|
66
|
+
function J(e) {
|
|
54
67
|
var m;
|
|
55
|
-
const t =
|
|
68
|
+
const t = he(e);
|
|
56
69
|
return (m = t == null ? void 0 : t.$el) != null ? m : t;
|
|
57
70
|
}
|
|
58
|
-
const
|
|
59
|
-
function
|
|
60
|
-
let m, t,
|
|
61
|
-
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([t,
|
|
62
|
-
return
|
|
63
|
-
Array.isArray(t) || (t = [t]), Array.isArray(
|
|
71
|
+
const ge = pe ? window : void 0;
|
|
72
|
+
function le(...e) {
|
|
73
|
+
let m, t, n, a;
|
|
74
|
+
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([t, n, a] = e, m = ge) : [m, t, n, a] = e, !m)
|
|
75
|
+
return ae;
|
|
76
|
+
Array.isArray(t) || (t = [t]), Array.isArray(n) || (n = [n]);
|
|
64
77
|
const l = [], c = () => {
|
|
65
78
|
l.forEach((u) => u()), l.length = 0;
|
|
66
|
-
},
|
|
67
|
-
() => [
|
|
79
|
+
}, s = (u, b, p, g) => (u.addEventListener(b, p, g), () => u.removeEventListener(b, p, g)), o = R(
|
|
80
|
+
() => [J(m), he(a)],
|
|
68
81
|
([u, b]) => {
|
|
69
82
|
if (c(), !u)
|
|
70
83
|
return;
|
|
71
|
-
const
|
|
84
|
+
const p = Le(b) ? { ...b } : b;
|
|
72
85
|
l.push(
|
|
73
|
-
...t.flatMap((
|
|
86
|
+
...t.flatMap((g) => n.map((w) => s(u, g, w, p)))
|
|
74
87
|
);
|
|
75
88
|
},
|
|
76
89
|
{ immediate: !0, flush: "post" }
|
|
77
90
|
), v = () => {
|
|
78
91
|
o(), c();
|
|
79
92
|
};
|
|
80
|
-
return
|
|
93
|
+
return Be(v), v;
|
|
81
94
|
}
|
|
82
|
-
let
|
|
83
|
-
function
|
|
84
|
-
const { window:
|
|
85
|
-
if (!
|
|
95
|
+
let ve = !1;
|
|
96
|
+
function ie(e, m, t = {}) {
|
|
97
|
+
const { window: n = ge, ignore: a = [], capture: l = !0, detectIframe: c = !1 } = t;
|
|
98
|
+
if (!n)
|
|
86
99
|
return;
|
|
87
|
-
|
|
88
|
-
let
|
|
89
|
-
const o = (
|
|
90
|
-
if (typeof
|
|
91
|
-
return Array.from(
|
|
100
|
+
Fe && !ve && (ve = !0, Array.from(n.document.body.children).forEach((p) => p.addEventListener("click", ae)), n.document.documentElement.addEventListener("click", ae));
|
|
101
|
+
let s = !0;
|
|
102
|
+
const o = (p) => a.some((g) => {
|
|
103
|
+
if (typeof g == "string")
|
|
104
|
+
return Array.from(n.document.querySelectorAll(g)).some((w) => w === p.target || p.composedPath().includes(w));
|
|
92
105
|
{
|
|
93
|
-
const w =
|
|
94
|
-
return w && (
|
|
106
|
+
const w = J(g);
|
|
107
|
+
return w && (p.target === w || p.composedPath().includes(w));
|
|
95
108
|
}
|
|
96
109
|
}), u = [
|
|
97
|
-
|
|
98
|
-
const
|
|
99
|
-
if (!(!
|
|
100
|
-
if (
|
|
101
|
-
|
|
110
|
+
le(n, "click", (p) => {
|
|
111
|
+
const g = J(e);
|
|
112
|
+
if (!(!g || g === p.target || p.composedPath().includes(g))) {
|
|
113
|
+
if (p.detail === 0 && (s = !o(p)), !s) {
|
|
114
|
+
s = !0;
|
|
102
115
|
return;
|
|
103
116
|
}
|
|
104
|
-
m(
|
|
117
|
+
m(p);
|
|
105
118
|
}
|
|
106
119
|
}, { passive: !0, capture: l }),
|
|
107
|
-
|
|
108
|
-
const
|
|
109
|
-
p && (
|
|
120
|
+
le(n, "pointerdown", (p) => {
|
|
121
|
+
const g = J(e);
|
|
122
|
+
s = !o(p) && !!(g && !p.composedPath().includes(g));
|
|
110
123
|
}, { passive: !0 }),
|
|
111
|
-
c &&
|
|
124
|
+
c && le(n, "blur", (p) => {
|
|
112
125
|
setTimeout(() => {
|
|
113
|
-
var
|
|
114
|
-
const w =
|
|
115
|
-
((
|
|
126
|
+
var g;
|
|
127
|
+
const w = J(e);
|
|
128
|
+
((g = n.document.activeElement) == null ? void 0 : g.tagName) === "IFRAME" && !(w != null && w.contains(n.document.activeElement)) && m(p);
|
|
116
129
|
}, 0);
|
|
117
130
|
})
|
|
118
131
|
].filter(Boolean);
|
|
119
|
-
return () => u.forEach((
|
|
132
|
+
return () => u.forEach((p) => p());
|
|
120
133
|
}
|
|
121
|
-
const
|
|
134
|
+
const je = ["value", "onKeydown"], Ye = { class: "flex absolute inset-y-0 right-0 items-center pr-3 text-vxvue-700" }, Ee = {
|
|
122
135
|
key: 0,
|
|
123
136
|
class: "w-5 h-5 animate-spin",
|
|
124
137
|
xmlns: "http://www.w3.org/2000/svg",
|
|
125
138
|
fill: "none",
|
|
126
139
|
viewBox: "0 0 24 24"
|
|
127
|
-
}, Ne = /* @__PURE__ */
|
|
140
|
+
}, Ne = /* @__PURE__ */ i("circle", {
|
|
128
141
|
class: "opacity-25",
|
|
129
142
|
cx: "12",
|
|
130
143
|
cy: "12",
|
|
131
144
|
r: "10",
|
|
132
145
|
stroke: "currentColor",
|
|
133
146
|
"stroke-width": "4"
|
|
134
|
-
}, null, -1),
|
|
147
|
+
}, null, -1), ze = /* @__PURE__ */ i("path", {
|
|
135
148
|
class: "opacity-75",
|
|
136
149
|
fill: "currentColor",
|
|
137
150
|
d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
|
|
138
|
-
}, null, -1),
|
|
151
|
+
}, null, -1), Re = [
|
|
139
152
|
Ne,
|
|
140
|
-
|
|
153
|
+
ze
|
|
141
154
|
], gl = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
142
155
|
__name: "autocomplete",
|
|
143
156
|
props: {
|
|
@@ -147,23 +160,23 @@ const Oe = ["value", "onKeydown"], je = { class: "flex absolute inset-y-0 right-
|
|
|
147
160
|
resultListClass: { type: String, default: "result-list" },
|
|
148
161
|
resultItemClass: { type: String, default: "result-list-item" },
|
|
149
162
|
inputClass: { type: String, default: "autocomplete-input" },
|
|
150
|
-
|
|
151
|
-
|
|
163
|
+
getResultValue: { type: Function, default: (e) => e },
|
|
164
|
+
autoSelect: Boolean
|
|
152
165
|
},
|
|
153
166
|
emits: ["update:modelValue", "blur", "submit"],
|
|
154
167
|
setup(e, { emit: m }) {
|
|
155
|
-
const t = m,
|
|
168
|
+
const t = m, n = e, a = K(), c = (() => {
|
|
156
169
|
let k = 0;
|
|
157
170
|
return ($) => ($ || "") + ++k;
|
|
158
|
-
})()((a.id || "autocomplete") + "-"),
|
|
159
|
-
() =>
|
|
171
|
+
})()((a.id || "autocomplete") + "-"), s = y([]), o = y(-1), v = y(0), u = y(!1), b = y(!1), p = y("top-0 translate-y-12"), g = y(!0), w = y(null), j = y(null), I = y(null), L = _(
|
|
172
|
+
() => s.value.map((k, $) => ({
|
|
160
173
|
id: (a.id || "autocomplete") + "-item-" + $,
|
|
161
|
-
class: ["autocomplete-item",
|
|
174
|
+
class: ["autocomplete-item", n.resultItemClass, { "bg-vxvue-700 text-white": o.value === $ }],
|
|
162
175
|
"data-result-index": $,
|
|
163
176
|
role: "option",
|
|
164
177
|
...o.value === $ ? { "aria-selected": "true" } : {}
|
|
165
178
|
}))
|
|
166
|
-
), H =
|
|
179
|
+
), H = _(() => ({
|
|
167
180
|
role: "combobox",
|
|
168
181
|
autocomplete: "off",
|
|
169
182
|
autocapitalize: "off",
|
|
@@ -175,107 +188,107 @@ const Oe = ["value", "onKeydown"], je = { class: "flex absolute inset-y-0 right-
|
|
|
175
188
|
"aria-expanded": u.value ? "true" : "false",
|
|
176
189
|
"aria-activedescendant": o.value > -1 ? L.value[o.value].id : "",
|
|
177
190
|
...a
|
|
178
|
-
})),
|
|
191
|
+
})), q = _(() => ({
|
|
179
192
|
id: c,
|
|
180
|
-
class: ["autocomplete-list absolute min-w-full transform z-10",
|
|
193
|
+
class: ["autocomplete-list absolute min-w-full transform z-10", n.resultListClass, p.value],
|
|
181
194
|
role: "listbox"
|
|
182
|
-
})),
|
|
183
|
-
o.value = -1,
|
|
184
|
-
},
|
|
185
|
-
const $ =
|
|
195
|
+
})), x = () => {
|
|
196
|
+
o.value = -1, s.value = [], u.value = !1, g.value = !0;
|
|
197
|
+
}, f = (k) => {
|
|
198
|
+
const $ = n.search(k);
|
|
186
199
|
if ($ instanceof Promise) {
|
|
187
|
-
const
|
|
188
|
-
b.value = !0, $.then((
|
|
189
|
-
|
|
200
|
+
const z = ++v.value;
|
|
201
|
+
b.value = !0, $.then((E) => {
|
|
202
|
+
z === v.value && (s.value = E, b.value = !1, s.value.length ? (o.value = n.autoSelect ? 0 : -1, u.value = !0) : x());
|
|
190
203
|
});
|
|
191
204
|
} else
|
|
192
|
-
|
|
193
|
-
},
|
|
194
|
-
const k =
|
|
195
|
-
return k && t("update:modelValue",
|
|
196
|
-
},
|
|
197
|
-
t("update:modelValue", k),
|
|
198
|
-
},
|
|
199
|
-
|
|
200
|
-
},
|
|
201
|
-
const k =
|
|
205
|
+
s.value = $, s.value.length === 0 ? x() : (o.value = n.autoSelect ? 0 : -1, u.value = !0);
|
|
206
|
+
}, h = () => {
|
|
207
|
+
const k = s.value[o.value];
|
|
208
|
+
return k && t("update:modelValue", n.getResultValue(k)), x(), k;
|
|
209
|
+
}, M = (k) => {
|
|
210
|
+
t("update:modelValue", k), f(k);
|
|
211
|
+
}, F = (k) => f(k.target.value), U = () => {
|
|
212
|
+
x(), t("blur");
|
|
213
|
+
}, X = () => {
|
|
214
|
+
const k = s.value.length;
|
|
202
215
|
o.value = ((o.value - 1) % k + k) % k;
|
|
203
|
-
},
|
|
204
|
-
u.value ||
|
|
205
|
-
const $ =
|
|
216
|
+
}, ee = (k) => {
|
|
217
|
+
u.value || F(k);
|
|
218
|
+
const $ = s.value.length;
|
|
206
219
|
o.value = ((o.value + 1) % $ + $) % $;
|
|
207
|
-
},
|
|
208
|
-
|
|
209
|
-
}, ye = () => t("submit",
|
|
220
|
+
}, xe = () => {
|
|
221
|
+
x(), t("update:modelValue", "");
|
|
222
|
+
}, ye = () => t("submit", h()), we = (k) => {
|
|
210
223
|
const $ = k.target.closest("[data-result-index]");
|
|
211
|
-
$ && (o.value = parseInt($.dataset.resultIndex, 10), t("submit",
|
|
224
|
+
$ && (o.value = parseInt($.dataset.resultIndex, 10), t("submit", h()));
|
|
212
225
|
};
|
|
213
|
-
return
|
|
226
|
+
return ie(I, x), Ce(() => {
|
|
214
227
|
if (w.value) {
|
|
215
|
-
const k =
|
|
216
|
-
|
|
217
|
-
const
|
|
218
|
-
if (
|
|
219
|
-
let
|
|
220
|
-
|
|
228
|
+
const k = j.value.getBoundingClientRect(), $ = w.value.getBoundingClientRect();
|
|
229
|
+
g.value && s.value.length && (g.value = !1, p.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 z = w.value.querySelector('[data-result-index="' + o.value + '"]');
|
|
231
|
+
if (z) {
|
|
232
|
+
let E = z.getBoundingClientRect();
|
|
233
|
+
E.top < $.top ? w.value.scrollTop -= $.top - E.top : E.bottom > $.bottom && (w.value.scrollTop += E.bottom - $.bottom);
|
|
221
234
|
}
|
|
222
235
|
}
|
|
223
|
-
}), (k, $) => (r(),
|
|
224
|
-
class:
|
|
236
|
+
}), (k, $) => (r(), d("div", {
|
|
237
|
+
class: C(["inline-block relative", k.$attrs.class]),
|
|
225
238
|
ref_key: "container",
|
|
226
|
-
ref:
|
|
239
|
+
ref: I
|
|
227
240
|
}, [
|
|
228
|
-
|
|
241
|
+
i("input", O({
|
|
229
242
|
ref_key: "input",
|
|
230
|
-
ref:
|
|
243
|
+
ref: j,
|
|
231
244
|
class: "block pr-10 w-full form-input focus:border-vxvue",
|
|
232
245
|
value: e.modelValue
|
|
233
246
|
}, H.value, {
|
|
234
|
-
onInput: $[0] || ($[0] = (
|
|
247
|
+
onInput: $[0] || ($[0] = (z) => M(z.target.value)),
|
|
235
248
|
onKeydown: [
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
249
|
+
Z(ye, ["enter"]),
|
|
250
|
+
Z(xe, ["esc"]),
|
|
251
|
+
Z(h, ["tab"]),
|
|
252
|
+
Z(P(X, ["prevent"]), ["up"]),
|
|
253
|
+
Z(P(ee, ["prevent"]), ["down"])
|
|
241
254
|
],
|
|
242
|
-
onFocus:
|
|
243
|
-
onBlur:
|
|
244
|
-
}), null, 16,
|
|
245
|
-
|
|
246
|
-
b.value ? (r(),
|
|
255
|
+
onFocus: F,
|
|
256
|
+
onBlur: U
|
|
257
|
+
}), null, 16, je),
|
|
258
|
+
i("span", Ye, [
|
|
259
|
+
b.value ? (r(), d("svg", Ee, Re)) : V("", !0)
|
|
247
260
|
]),
|
|
248
|
-
|
|
261
|
+
s.value.length ? (r(), d("ul", O({
|
|
249
262
|
key: 0,
|
|
250
263
|
ref_key: "resultList",
|
|
251
264
|
ref: w
|
|
252
|
-
},
|
|
253
|
-
onClick:
|
|
254
|
-
onMousedown: $[1] || ($[1] =
|
|
265
|
+
}, q.value, {
|
|
266
|
+
onClick: we,
|
|
267
|
+
onMousedown: $[1] || ($[1] = P(() => {
|
|
255
268
|
}, ["prevent"]))
|
|
256
269
|
}), [
|
|
257
|
-
(r(!0),
|
|
258
|
-
result:
|
|
259
|
-
props: L.value[
|
|
270
|
+
(r(!0), d(A, null, T(s.value, (z, E) => B(k.$slots, "result", {
|
|
271
|
+
result: z,
|
|
272
|
+
props: L.value[E]
|
|
260
273
|
}, () => [
|
|
261
|
-
(r(),
|
|
262
|
-
key: L.value[
|
|
263
|
-
}, L.value[
|
|
274
|
+
(r(), d("li", O({
|
|
275
|
+
key: L.value[E].id
|
|
276
|
+
}, L.value[E]), S(e.getResultValue(z)), 17))
|
|
264
277
|
])), 256))
|
|
265
278
|
], 16)) : V("", !0)
|
|
266
279
|
], 2));
|
|
267
280
|
}
|
|
268
|
-
}),
|
|
281
|
+
}), He = {
|
|
269
282
|
key: 0,
|
|
270
283
|
class: "fixed inset-0 z-50 bg-black bg-opacity-50 backdrop-blur-sm",
|
|
271
284
|
"aria-hidden": "true"
|
|
272
|
-
},
|
|
285
|
+
}, Ue = {
|
|
273
286
|
key: 0,
|
|
274
287
|
class: "overflow-y-auto fixed inset-0 z-50"
|
|
275
|
-
},
|
|
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", {
|
|
276
289
|
class: "hidden sm:inline-block sm:h-screen sm:align-middle",
|
|
277
290
|
"aria-hidden": "true"
|
|
278
|
-
}, "", -1),
|
|
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"], bl = {
|
|
279
292
|
__name: "confirm",
|
|
280
293
|
props: {
|
|
281
294
|
buttons: {
|
|
@@ -293,50 +306,50 @@ const Oe = ["value", "onKeydown"], je = { class: "flex absolute inset-y-0 right-
|
|
|
293
306
|
}
|
|
294
307
|
},
|
|
295
308
|
setup(e, { expose: m }) {
|
|
296
|
-
const t = e,
|
|
297
|
-
let c = null,
|
|
298
|
-
const o =
|
|
299
|
-
return m({ open: (b,
|
|
300
|
-
c =
|
|
301
|
-
})) }), (b,
|
|
302
|
-
l.value ? (r(),
|
|
303
|
-
|
|
304
|
-
default:
|
|
305
|
-
l.value ? (r(),
|
|
306
|
-
|
|
307
|
-
l.value ? (r(),
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
309
|
+
const t = e, n = y(""), a = y(""), l = y(!1);
|
|
310
|
+
let c = null, s = null;
|
|
311
|
+
const o = _(() => Array.isArray(t.buttons) ? t.buttons : [t.buttons]), v = y(null);
|
|
312
|
+
return m({ open: (b, p) => (n.value = b, a.value = p, l.value = !0, re(() => v.value.firstElementChild.focus()), new Promise((g, w) => {
|
|
313
|
+
c = g, s = w;
|
|
314
|
+
})) }), (b, p) => (r(), d(A, null, [
|
|
315
|
+
l.value ? (r(), d("div", He)) : V("", !0),
|
|
316
|
+
Y(oe, { name: "appear" }, {
|
|
317
|
+
default: Q(() => [
|
|
318
|
+
l.value ? (r(), d("div", Ue, [
|
|
319
|
+
i("div", We, [
|
|
320
|
+
l.value ? (r(), d("div", qe, [
|
|
321
|
+
Ke,
|
|
322
|
+
i("div", Ge, [
|
|
323
|
+
n.value ? (r(), d("h3", {
|
|
311
324
|
key: 0,
|
|
312
|
-
class:
|
|
325
|
+
class: C(["py-4 pt-4 text-lg font-medium text-center sm:py-6", e.headerClass])
|
|
313
326
|
}, [
|
|
314
|
-
|
|
315
|
-
|
|
327
|
+
B(b.$slots, "title", { title: n.value }, () => [
|
|
328
|
+
N(S(n.value), 1)
|
|
316
329
|
])
|
|
317
330
|
], 2)) : V("", !0),
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
331
|
+
i("div", Xe, [
|
|
332
|
+
i("div", Ze, [
|
|
333
|
+
i("div", Je, [
|
|
334
|
+
B(b.$slots, "icon")
|
|
322
335
|
]),
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
336
|
+
i("p", Qe, [
|
|
337
|
+
B(b.$slots, "default", { message: a.value }, () => [
|
|
338
|
+
N(S(a.value), 1)
|
|
326
339
|
])
|
|
327
340
|
])
|
|
328
341
|
]),
|
|
329
|
-
|
|
342
|
+
i("div", {
|
|
330
343
|
class: "flex justify-center mt-5 space-x-2 sm:mt-6",
|
|
331
344
|
ref_key: "buttonsContainer",
|
|
332
345
|
ref: v
|
|
333
346
|
}, [
|
|
334
|
-
(r(!0),
|
|
335
|
-
class:
|
|
336
|
-
onClick:
|
|
337
|
-
l.value = !1, w === 0 ?
|
|
347
|
+
(r(!0), d(A, null, T(o.value, (g, w) => (r(), d("button", {
|
|
348
|
+
class: C([e.buttonClass, g.class]),
|
|
349
|
+
onClick: P((j) => {
|
|
350
|
+
l.value = !1, w === 0 ? D(c)() : D(s)();
|
|
338
351
|
}, ["prevent"])
|
|
339
|
-
},
|
|
352
|
+
}, S(g.label), 11, et))), 256))
|
|
340
353
|
], 512)
|
|
341
354
|
])
|
|
342
355
|
])
|
|
@@ -349,62 +362,62 @@ const Oe = ["value", "onKeydown"], je = { class: "flex absolute inset-y-0 right-
|
|
|
349
362
|
], 64));
|
|
350
363
|
}
|
|
351
364
|
};
|
|
352
|
-
function
|
|
353
|
-
const t =
|
|
354
|
-
let a, l =
|
|
355
|
-
if ((a =
|
|
365
|
+
function tt(e, m) {
|
|
366
|
+
const t = y(!1), n = ce(m);
|
|
367
|
+
let a, l = n.toLowerCase().replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), c = [];
|
|
368
|
+
if ((a = n.match(/\bd\b/gi)) && a.length === 1)
|
|
356
369
|
l = l.replace("d", "(\\d{1,2})");
|
|
357
|
-
else if ((a =
|
|
370
|
+
else if ((a = n.match(/\bdd\b/gi)) && a.length === 1)
|
|
358
371
|
l = l.replace("dd", "(\\d{2})");
|
|
359
372
|
else
|
|
360
373
|
return { date: t };
|
|
361
|
-
if (c.push({ srcPos:
|
|
374
|
+
if (c.push({ srcPos: n.toLowerCase().indexOf("d"), destPos: 2 }), (a = n.match(/\bm\b/gi)) && a.length === 1)
|
|
362
375
|
l = l.replace("m", "(\\d{1,2})");
|
|
363
|
-
else if ((a =
|
|
376
|
+
else if ((a = n.match(/\bmm\b/gi)) && a.length === 1)
|
|
364
377
|
l = l.replace("mm", "(\\d{2})");
|
|
365
378
|
else
|
|
366
379
|
return { date: t };
|
|
367
|
-
if (c.push({ srcPos:
|
|
380
|
+
if (c.push({ srcPos: n.toLowerCase().indexOf("m"), destPos: 1 }), (a = n.match(/\byyyy\b/gi)) && a.length === 1)
|
|
368
381
|
l = l.replace("yyyy", "(\\d{4})");
|
|
369
382
|
else
|
|
370
383
|
return { date: t };
|
|
371
|
-
if (c.push({ srcPos:
|
|
384
|
+
if (c.push({ srcPos: n.toLowerCase().indexOf("y"), destPos: 0 }), !(a = ce(e).match(l)))
|
|
372
385
|
return { date: t };
|
|
373
386
|
a.shift(), c.sort((u, b) => u.srcPos < b.srcPos ? -1 : 1);
|
|
374
|
-
let
|
|
387
|
+
let s = [], o, v;
|
|
375
388
|
for (; o = a.shift(); )
|
|
376
|
-
v = c.shift(),
|
|
377
|
-
return
|
|
389
|
+
v = c.shift(), s[v.destPos] = o;
|
|
390
|
+
return s = Date.parse(s.join("-")), s && (s = new Date(s), t.value = new Date(s.getFullYear(), s.getMonth(), s.getDate(), 0, 0, 0)), { date: t };
|
|
378
391
|
}
|
|
379
|
-
const
|
|
392
|
+
const lt = { key: 0 }, at = { class: "text-vxvue-700" }, st = /* @__PURE__ */ i("svg", {
|
|
380
393
|
class: "w-2 h-2",
|
|
381
394
|
stroke: "currentColor",
|
|
382
395
|
fill: "none",
|
|
383
396
|
viewBox: "0 0 8 8"
|
|
384
397
|
}, [
|
|
385
|
-
/* @__PURE__ */
|
|
398
|
+
/* @__PURE__ */ i("path", {
|
|
386
399
|
"stroke-linecap": "round",
|
|
387
400
|
"stroke-width": "1.5",
|
|
388
401
|
d: "M1 1l6 6m0-6L1 7"
|
|
389
402
|
})
|
|
390
|
-
], -1),
|
|
391
|
-
|
|
392
|
-
],
|
|
403
|
+
], -1), nt = [
|
|
404
|
+
st
|
|
405
|
+
], ot = /* @__PURE__ */ i("svg", {
|
|
393
406
|
xmlns: "http://www.w3.org/2000/svg",
|
|
394
407
|
class: "w-6 h-6",
|
|
395
408
|
fill: "none",
|
|
396
409
|
viewBox: "0 0 24 24",
|
|
397
410
|
stroke: "currentColor"
|
|
398
411
|
}, [
|
|
399
|
-
/* @__PURE__ */
|
|
412
|
+
/* @__PURE__ */ i("path", {
|
|
400
413
|
"stroke-linecap": "round",
|
|
401
414
|
"stroke-linejoin": "round",
|
|
402
415
|
"stroke-width": "2",
|
|
403
416
|
d: "M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"
|
|
404
417
|
})
|
|
405
|
-
], -1),
|
|
406
|
-
|
|
407
|
-
],
|
|
418
|
+
], -1), rt = [
|
|
419
|
+
ot
|
|
420
|
+
], ut = {
|
|
408
421
|
__name: "date-input",
|
|
409
422
|
props: {
|
|
410
423
|
outputFormat: { type: String, default: "YYYY-MM-DD" },
|
|
@@ -415,117 +428,118 @@ const tt = { key: 0 }, lt = { class: "text-vxvue-700" }, at = /* @__PURE__ */ d(
|
|
|
415
428
|
},
|
|
416
429
|
emits: ["update:modelValue", "toggle-datepicker"],
|
|
417
430
|
setup(e, { emit: m }) {
|
|
418
|
-
const t = m,
|
|
419
|
-
let
|
|
420
|
-
return delete
|
|
431
|
+
const t = m, n = e, a = y(""), l = _(() => n.modelValue ? de(n.modelValue, n.outputFormat) : ""), c = _(() => {
|
|
432
|
+
let s = Object.assign({}, K());
|
|
433
|
+
return delete s.class, s;
|
|
421
434
|
});
|
|
422
|
-
return
|
|
423
|
-
class:
|
|
435
|
+
return R(() => n.modelValue, (s) => a.value = s ? de(s, n.outputFormat) : ""), (s, o) => (r(), d("div", {
|
|
436
|
+
class: C(["inline-block relative", s.$attrs.class])
|
|
424
437
|
}, [
|
|
425
|
-
l.value ? (r(),
|
|
426
|
-
|
|
427
|
-
class:
|
|
438
|
+
l.value ? (r(), d("div", lt, [
|
|
439
|
+
i("div", {
|
|
440
|
+
class: C(["block flex items-center w-full form-input bg-vxvue-50", { "pr-10": e.showButton }])
|
|
428
441
|
}, [
|
|
429
|
-
|
|
430
|
-
|
|
442
|
+
i("span", at, S(l.value), 1),
|
|
443
|
+
i("button", {
|
|
431
444
|
onClick: o[0] || (o[0] = (v) => t("update:modelValue", null)),
|
|
432
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"
|
|
433
|
-
},
|
|
446
|
+
}, nt)
|
|
434
447
|
], 2)
|
|
435
|
-
])) :
|
|
448
|
+
])) : me((r(), d("input", O({
|
|
436
449
|
key: 1,
|
|
437
450
|
type: "text",
|
|
438
451
|
class: ["block w-full form-input peer focus:border-vxvue", { "pr-10": e.showButton }],
|
|
439
452
|
"onUpdate:modelValue": o[1] || (o[1] = (v) => a.value = v),
|
|
440
453
|
onBlur: o[2] || (o[2] = (v) => {
|
|
441
454
|
var u;
|
|
442
|
-
return t("update:modelValue", ((u =
|
|
455
|
+
return t("update:modelValue", ((u = D(tt)(a.value, n.inputFormat).date) == null ? void 0 : u.value) || null);
|
|
443
456
|
}),
|
|
444
|
-
onInput: o[3] || (o[3] =
|
|
457
|
+
onInput: o[3] || (o[3] = P(() => {
|
|
445
458
|
}, ["prevent"]))
|
|
446
459
|
}, c.value), null, 16)), [
|
|
447
|
-
[
|
|
460
|
+
[Se, a.value]
|
|
448
461
|
]),
|
|
449
|
-
e.showButton ? (r(),
|
|
462
|
+
e.showButton ? (r(), d("button", {
|
|
450
463
|
key: 2,
|
|
451
464
|
class: "flex absolute inset-y-0 right-0 items-center px-2 text-vxvue-700 hover:text-vxvue",
|
|
452
|
-
onClick: o[4] || (o[4] =
|
|
453
|
-
|
|
454
|
-
|
|
465
|
+
onClick: o[4] || (o[4] = P((v) => t("toggle-datepicker"), ["stop"])),
|
|
466
|
+
ref: "toggleButton"
|
|
467
|
+
}, rt, 512)) : V("", !0),
|
|
468
|
+
B(s.$slots, "default")
|
|
455
469
|
], 2));
|
|
456
470
|
}
|
|
457
471
|
};
|
|
458
|
-
function
|
|
459
|
-
return r(),
|
|
472
|
+
function se(e, m) {
|
|
473
|
+
return r(), d("svg", {
|
|
460
474
|
xmlns: "http://www.w3.org/2000/svg",
|
|
461
475
|
viewBox: "0 0 24 24",
|
|
462
476
|
fill: "currentColor",
|
|
463
477
|
"aria-hidden": "true"
|
|
464
478
|
}, [
|
|
465
|
-
|
|
479
|
+
i("path", {
|
|
466
480
|
"fill-rule": "evenodd",
|
|
467
481
|
d: "M7.72 12.53a.75.75 0 010-1.06l7.5-7.5a.75.75 0 111.06 1.06L9.31 12l6.97 6.97a.75.75 0 11-1.06 1.06l-7.5-7.5z",
|
|
468
482
|
"clip-rule": "evenodd"
|
|
469
483
|
})
|
|
470
484
|
]);
|
|
471
485
|
}
|
|
472
|
-
function
|
|
473
|
-
return r(),
|
|
486
|
+
function ne(e, m) {
|
|
487
|
+
return r(), d("svg", {
|
|
474
488
|
xmlns: "http://www.w3.org/2000/svg",
|
|
475
489
|
viewBox: "0 0 24 24",
|
|
476
490
|
fill: "currentColor",
|
|
477
491
|
"aria-hidden": "true"
|
|
478
492
|
}, [
|
|
479
|
-
|
|
493
|
+
i("path", {
|
|
480
494
|
"fill-rule": "evenodd",
|
|
481
495
|
d: "M16.28 11.47a.75.75 0 010 1.06l-7.5 7.5a.75.75 0 01-1.06-1.06L14.69 12 7.72 5.03a.75.75 0 011.06-1.06l7.5 7.5z",
|
|
482
496
|
"clip-rule": "evenodd"
|
|
483
497
|
})
|
|
484
498
|
]);
|
|
485
499
|
}
|
|
486
|
-
function
|
|
487
|
-
return r(),
|
|
500
|
+
function it(e, m) {
|
|
501
|
+
return r(), d("svg", {
|
|
488
502
|
xmlns: "http://www.w3.org/2000/svg",
|
|
489
503
|
viewBox: "0 0 24 24",
|
|
490
504
|
fill: "currentColor",
|
|
491
505
|
"aria-hidden": "true"
|
|
492
506
|
}, [
|
|
493
|
-
|
|
507
|
+
i("path", {
|
|
494
508
|
"fill-rule": "evenodd",
|
|
495
509
|
d: "M3.75 12a.75.75 0 01.75-.75h15a.75.75 0 010 1.5h-15a.75.75 0 01-.75-.75z",
|
|
496
510
|
"clip-rule": "evenodd"
|
|
497
511
|
})
|
|
498
512
|
]);
|
|
499
513
|
}
|
|
500
|
-
function
|
|
501
|
-
return r(),
|
|
514
|
+
function ct(e, m) {
|
|
515
|
+
return r(), d("svg", {
|
|
502
516
|
xmlns: "http://www.w3.org/2000/svg",
|
|
503
517
|
viewBox: "0 0 24 24",
|
|
504
518
|
fill: "currentColor",
|
|
505
519
|
"aria-hidden": "true"
|
|
506
520
|
}, [
|
|
507
|
-
|
|
521
|
+
i("path", {
|
|
508
522
|
"fill-rule": "evenodd",
|
|
509
523
|
d: "M12 3.75a.75.75 0 01.75.75v6.75h6.75a.75.75 0 010 1.5h-6.75v6.75a.75.75 0 01-1.5 0v-6.75H4.5a.75.75 0 010-1.5h6.75V4.5a.75.75 0 01.75-.75z",
|
|
510
524
|
"clip-rule": "evenodd"
|
|
511
525
|
})
|
|
512
526
|
]);
|
|
513
527
|
}
|
|
514
|
-
function
|
|
515
|
-
return r(),
|
|
528
|
+
function dt(e, m) {
|
|
529
|
+
return r(), d("svg", {
|
|
516
530
|
xmlns: "http://www.w3.org/2000/svg",
|
|
517
531
|
viewBox: "0 0 24 24",
|
|
518
532
|
fill: "currentColor",
|
|
519
533
|
"aria-hidden": "true"
|
|
520
534
|
}, [
|
|
521
|
-
|
|
535
|
+
i("path", {
|
|
522
536
|
"fill-rule": "evenodd",
|
|
523
537
|
d: "M5.47 5.47a.75.75 0 011.06 0L12 10.94l5.47-5.47a.75.75 0 111.06 1.06L13.06 12l5.47 5.47a.75.75 0 11-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 01-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 010-1.06z",
|
|
524
538
|
"clip-rule": "evenodd"
|
|
525
539
|
})
|
|
526
540
|
]);
|
|
527
541
|
}
|
|
528
|
-
const
|
|
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"], xl = {
|
|
529
543
|
__name: "datepicker",
|
|
530
544
|
props: {
|
|
531
545
|
modelValue: [Date, Boolean],
|
|
@@ -536,99 +550,119 @@ const dt = { class: "flex flex-row items-center py-2 px-3 text-white bg-vxvue-70
|
|
|
536
550
|
startOfWeekIndex: { type: Number, default: 0, validator: (e) => e === 0 || e === 1 },
|
|
537
551
|
hasInput: { type: Boolean, default: !0 }
|
|
538
552
|
},
|
|
539
|
-
emits: ["update:modelValue", "month-change"],
|
|
553
|
+
emits: ["update:modelValue", "month-change", "year-change"],
|
|
540
554
|
setup(e, { emit: m }) {
|
|
541
|
-
const t = e,
|
|
542
|
-
let
|
|
543
|
-
return new Date(
|
|
544
|
-
})(), l =
|
|
545
|
-
const
|
|
546
|
-
for (let
|
|
547
|
-
|
|
548
|
-
return
|
|
549
|
-
}),
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
}, { immediate: !0 }),
|
|
553
|
-
|
|
554
|
-
const
|
|
555
|
-
o.value =
|
|
555
|
+
const t = e, n = m, a = (() => {
|
|
556
|
+
let x = /* @__PURE__ */ new Date();
|
|
557
|
+
return new Date(x.getFullYear(), x.getMonth(), x.getDate());
|
|
558
|
+
})(), l = y(new Date(a.getFullYear(), a.getMonth(), 1)), c = y(null), s = y(!t.hasInput), o = y("left-0"), v = y("top-0"), u = y(null), b = y(null), p = y(null), g = _(() => t.hasInput ? { class: ["absolute", s.value ? "block" : "hidden"] } : {}), w = _(() => {
|
|
559
|
+
const x = [], f = l.value.getFullYear(), h = l.value.getMonth(), M = new Date(f, h + 1, 0), F = new Date(f, h, 0).getDay() + 1 - t.startOfWeekIndex, U = (6 + t.startOfWeekIndex - M.getDay()) % 7;
|
|
560
|
+
for (let X = -F, ee = M.getDate() + U; X < ee; ++X)
|
|
561
|
+
x.push(new Date(f, h, X + 1));
|
|
562
|
+
return x;
|
|
563
|
+
}), j = _(() => t.startOfWeekIndex ? t.dayNames.slice(1).concat(t.dayNames[0]) : t.dayNames.slice());
|
|
564
|
+
R(() => t.modelValue, (x) => {
|
|
565
|
+
x ? (c.value = new Date(x.getFullYear(), x.getMonth(), x.getDate()), l.value = new Date(c.value.getTime())) : (c.value = null, l.value = new Date(a.getTime())), l.value.setDate(1);
|
|
566
|
+
}, { immediate: !0 }), R(s, (x) => {
|
|
567
|
+
x && t.hasInput && re(() => {
|
|
568
|
+
const f = u.value.$el.getBoundingClientRect(), h = b.value.getBoundingClientRect();
|
|
569
|
+
o.value = f.left + h.width > window.innerWidth ? "right-0" : "left-0", v.value = f.bottom + h.height > window.innerHeight ? "bottom-0 -translate-y-12" : "top-0 translate-y-12";
|
|
556
570
|
});
|
|
557
|
-
}),
|
|
558
|
-
const
|
|
559
|
-
l.value = new Date(l.value.getFullYear(),
|
|
560
|
-
},
|
|
561
|
-
l.value = new Date(
|
|
562
|
-
},
|
|
563
|
-
c.value =
|
|
564
|
-
},
|
|
565
|
-
c.value =
|
|
571
|
+
}), ie(b, () => s.value = !1, { ignore: [p] });
|
|
572
|
+
const I = (x) => {
|
|
573
|
+
l.value = new Date(l.value.getFullYear(), x, 1), n("month-change", l.value);
|
|
574
|
+
}, L = (x) => {
|
|
575
|
+
l.value = new Date(x, l.value.getMonth(), 1), n("year-change", l.value);
|
|
576
|
+
}, H = (x) => {
|
|
577
|
+
c.value = x, n("update:modelValue", x), s.value = !t.hasInput;
|
|
578
|
+
}, q = (x) => {
|
|
579
|
+
c.value = x, n("update:modelValue", x);
|
|
566
580
|
};
|
|
567
|
-
return (
|
|
568
|
-
|
|
581
|
+
return ue(() => {
|
|
582
|
+
var x;
|
|
583
|
+
return p.value = (x = u.value) == null ? void 0 : x.$refs.toggleButton;
|
|
584
|
+
}), (x, f) => (r(), d("div", {
|
|
585
|
+
class: C(["relative", x.$attrs.class])
|
|
569
586
|
}, [
|
|
570
|
-
e.hasInput ? (r(),
|
|
587
|
+
e.hasInput ? (r(), G(ut, O({
|
|
571
588
|
key: 0,
|
|
572
589
|
modelValue: c.value,
|
|
573
|
-
onToggleDatepicker:
|
|
574
|
-
"onUpdate:modelValue":
|
|
575
|
-
},
|
|
590
|
+
onToggleDatepicker: f[0] || (f[0] = (h) => s.value = !s.value),
|
|
591
|
+
"onUpdate:modelValue": q
|
|
592
|
+
}, x.$attrs, {
|
|
576
593
|
ref_key: "input",
|
|
577
594
|
ref: u,
|
|
578
595
|
class: "w-full",
|
|
579
596
|
locale: e.locale
|
|
580
597
|
}), {
|
|
581
|
-
default:
|
|
582
|
-
|
|
598
|
+
default: Q(() => [
|
|
599
|
+
B(x.$slots, "default")
|
|
583
600
|
]),
|
|
584
601
|
_: 3
|
|
585
602
|
}, 16, ["modelValue", "locale"])) : V("", !0),
|
|
586
|
-
|
|
603
|
+
i("div", O({ class: "z-10 bg-white shadow-md" }, g.value, {
|
|
587
604
|
ref_key: "calendar",
|
|
588
605
|
ref: b,
|
|
589
606
|
class: [o.value, v.value]
|
|
590
607
|
}), [
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
608
|
+
i("div", vt, [
|
|
609
|
+
i("div", mt, [
|
|
610
|
+
i("button", {
|
|
611
|
+
onClick: f[1] || (f[1] = P((h) => I(l.value.getMonth() - 1), ["stop"])),
|
|
612
|
+
class: "flex-shrink-0 text-vxvue-100 hover:text-vxvue-50"
|
|
613
|
+
}, [
|
|
614
|
+
Y(D(se), { class: "w-6 h-6" })
|
|
615
|
+
]),
|
|
616
|
+
i("span", null, S(l.value.toLocaleString(e.locale, { month: "long" })), 1),
|
|
617
|
+
i("button", {
|
|
618
|
+
onClick: f[2] || (f[2] = P((h) => I(l.value.getMonth() + 1), ["stop"])),
|
|
619
|
+
class: "flex-shrink-0 text-vxvue-100 hover:text-vxvue-50"
|
|
620
|
+
}, [
|
|
621
|
+
Y(D(ne), { class: "w-6 h-6" })
|
|
622
|
+
])
|
|
623
|
+
]),
|
|
624
|
+
i("div", ft, [
|
|
625
|
+
i("button", {
|
|
626
|
+
onClick: f[3] || (f[3] = P((h) => L(l.value.getFullYear() - 1), ["stop"])),
|
|
627
|
+
class: "flex-shrink-0 text-vxvue-100 hover:text-vxvue-50"
|
|
628
|
+
}, [
|
|
629
|
+
Y(D(se), { class: "w-6 h-6" })
|
|
630
|
+
]),
|
|
631
|
+
i("div", null, S(l.value.getFullYear()), 1),
|
|
632
|
+
i("button", {
|
|
633
|
+
onClick: f[4] || (f[4] = P((h) => L(l.value.getFullYear() + 1), ["stop"])),
|
|
634
|
+
class: "flex-shrink-0 text-vxvue-100 hover:text-vxvue-50"
|
|
635
|
+
}, [
|
|
636
|
+
Y(D(ne), { class: "w-6 h-6" })
|
|
637
|
+
])
|
|
638
|
+
])
|
|
605
639
|
]),
|
|
606
|
-
|
|
607
|
-
(r(!0),
|
|
640
|
+
i("div", ht, [
|
|
641
|
+
(r(!0), d(A, null, T(j.value, (h, M) => (r(), d("div", {
|
|
608
642
|
class: "py-2 text-center bg-gray-200",
|
|
609
643
|
key: M
|
|
610
|
-
},
|
|
611
|
-
(r(!0),
|
|
612
|
-
class:
|
|
644
|
+
}, S(h), 1))), 128)),
|
|
645
|
+
(r(!0), d(A, null, T(w.value, (h) => (r(), d("div", {
|
|
646
|
+
class: C(["text-center", h.getMonth() - l.value.getMonth() === 0 ? "text-vxvue-700" : "text-gray-400"])
|
|
613
647
|
}, [
|
|
614
|
-
|
|
615
|
-
class:
|
|
648
|
+
i("button", {
|
|
649
|
+
class: C([
|
|
616
650
|
{
|
|
617
|
-
"bg-vxvue-700 text-white": c.value &&
|
|
618
|
-
"bg-gray-200":
|
|
619
|
-
"text-red-400": e.validFrom && e.validFrom >
|
|
651
|
+
"bg-vxvue-700 text-white": c.value && h.getTime() === c.value.getTime(),
|
|
652
|
+
"bg-gray-200": h.getTime() === D(a).getTime(),
|
|
653
|
+
"text-red-400": e.validFrom && e.validFrom > h || e.validUntil && e.validUntil < h
|
|
620
654
|
},
|
|
621
655
|
"py-2 px-3 rounded-sm"
|
|
622
656
|
]),
|
|
623
|
-
disabled: e.validFrom && e.validFrom >
|
|
624
|
-
onClick:
|
|
625
|
-
},
|
|
657
|
+
disabled: e.validFrom && e.validFrom > h || e.validUntil && e.validUntil < h,
|
|
658
|
+
onClick: P((M) => e.validFrom && e.validFrom > h || e.validUntil && e.validUntil < h ? null : H(h), ["stop"])
|
|
659
|
+
}, S(h.getDate()), 11, pt)
|
|
626
660
|
], 2))), 256))
|
|
627
661
|
])
|
|
628
662
|
], 16)
|
|
629
663
|
], 2));
|
|
630
664
|
}
|
|
631
|
-
}, gt = ["for"], bt = ["id", "multiple", "accept"],
|
|
665
|
+
}, gt = ["for"], bt = ["id", "multiple", "accept"], yl = {
|
|
632
666
|
__name: "form-file-button",
|
|
633
667
|
props: {
|
|
634
668
|
modelValue: { type: Array },
|
|
@@ -639,23 +673,23 @@ const dt = { class: "flex flex-row items-center py-2 px-3 text-white bg-vxvue-70
|
|
|
639
673
|
},
|
|
640
674
|
emits: ["update:modelValue", "form-data"],
|
|
641
675
|
setup(e, { emit: m }) {
|
|
642
|
-
const t = m,
|
|
643
|
-
const
|
|
676
|
+
const t = m, n = e, a = (c) => {
|
|
677
|
+
const s = new FormData();
|
|
644
678
|
for (let o of c)
|
|
645
|
-
|
|
646
|
-
return
|
|
679
|
+
s.append(n.name, o, o.name);
|
|
680
|
+
return s;
|
|
647
681
|
}, l = (c) => {
|
|
648
|
-
const
|
|
649
|
-
if (
|
|
650
|
-
const o = [...
|
|
682
|
+
const s = c.target.files || c.dataTransfer.files;
|
|
683
|
+
if (s) {
|
|
684
|
+
const o = [...s];
|
|
651
685
|
t("update:modelValue", o), t("form-data", a(o));
|
|
652
686
|
}
|
|
653
687
|
};
|
|
654
|
-
return (c,
|
|
655
|
-
|
|
656
|
-
|
|
688
|
+
return (c, s) => (r(), d("label", { for: e.id }, [
|
|
689
|
+
B(c.$slots, "default", {}, () => [
|
|
690
|
+
N("Upload")
|
|
657
691
|
]),
|
|
658
|
-
|
|
692
|
+
i("input", {
|
|
659
693
|
type: "file",
|
|
660
694
|
id: e.id,
|
|
661
695
|
multiple: e.multiple,
|
|
@@ -665,7 +699,7 @@ const dt = { class: "flex flex-row items-center py-2 px-3 text-white bg-vxvue-70
|
|
|
665
699
|
}, null, 40, bt)
|
|
666
700
|
], 8, gt));
|
|
667
701
|
}
|
|
668
|
-
},
|
|
702
|
+
}, xt = ["value"], yt = {
|
|
669
703
|
key: 0,
|
|
670
704
|
disabled: "",
|
|
671
705
|
value: ""
|
|
@@ -675,61 +709,61 @@ const dt = { class: "flex flex-row items-center py-2 px-3 text-white bg-vxvue-70
|
|
|
675
709
|
emits: ["update:modelValue"],
|
|
676
710
|
setup(e, { emit: m }) {
|
|
677
711
|
const t = m;
|
|
678
|
-
return (
|
|
712
|
+
return (n, a) => (r(), d("select", O(n.$attrs, {
|
|
679
713
|
value: e.modelValue,
|
|
680
714
|
class: "form-select",
|
|
681
715
|
onChange: a[0] || (a[0] = (l) => t("update:modelValue", l.target.value))
|
|
682
716
|
}), [
|
|
683
|
-
e.disabledLabel ? (r(),
|
|
684
|
-
(r(!0),
|
|
717
|
+
e.disabledLabel ? (r(), d("option", yt, S(e.disabledLabel), 1)) : V("", !0),
|
|
718
|
+
(r(!0), d(A, null, T(e.options, (l) => (r(), d("option", {
|
|
685
719
|
value: l.key !== void 0 ? l.key : l.label || l,
|
|
686
720
|
selected: (l.key !== void 0 ? l.key : l.label || l) === e.modelValue
|
|
687
|
-
},
|
|
688
|
-
], 16,
|
|
721
|
+
}, S(l.label || l), 9, wt))), 256))
|
|
722
|
+
], 16, xt));
|
|
689
723
|
}
|
|
690
|
-
}, $t = ["aria-checked"],
|
|
724
|
+
}, $t = ["aria-checked"], Ct = ["checked"], wl = {
|
|
691
725
|
__name: "form-switch",
|
|
692
726
|
props: ["modelValue"],
|
|
693
727
|
emits: ["update:modelValue"],
|
|
694
728
|
setup(e, { emit: m }) {
|
|
695
|
-
const t = e,
|
|
696
|
-
let
|
|
697
|
-
return delete
|
|
729
|
+
const t = e, n = m, a = _(() => t.modelValue ? "bg-vxvue" : "bg-slate-200"), l = _(() => t.modelValue ? "translate-x-5" : "translate-x-0"), c = _(() => {
|
|
730
|
+
let s = Object.assign({}, K());
|
|
731
|
+
return delete s.class, s;
|
|
698
732
|
});
|
|
699
|
-
return (
|
|
700
|
-
|
|
701
|
-
class:
|
|
733
|
+
return (s, o) => (r(), d(A, null, [
|
|
734
|
+
i("label", {
|
|
735
|
+
class: C(s.$attrs.class)
|
|
702
736
|
}, [
|
|
703
|
-
|
|
704
|
-
class:
|
|
737
|
+
i("span", {
|
|
738
|
+
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"]),
|
|
705
739
|
role: "switch",
|
|
706
740
|
"aria-checked": !!e.modelValue
|
|
707
741
|
}, [
|
|
708
|
-
|
|
742
|
+
i("span", {
|
|
709
743
|
"aria-hidden": "true",
|
|
710
|
-
class:
|
|
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"])
|
|
711
745
|
}, null, 2),
|
|
712
|
-
|
|
746
|
+
i("input", O({
|
|
713
747
|
class: "hidden",
|
|
714
748
|
value: "1",
|
|
715
749
|
type: "checkbox",
|
|
716
|
-
onChange: o[0] || (o[0] = (v) =>
|
|
717
|
-
}, c.value, { checked: e.modelValue }), null, 16,
|
|
750
|
+
onChange: o[0] || (o[0] = (v) => n("update:modelValue", v.target.checked))
|
|
751
|
+
}, c.value, { checked: e.modelValue }), null, 16, Ct)
|
|
718
752
|
], 10, $t)
|
|
719
753
|
], 2),
|
|
720
|
-
|
|
754
|
+
B(s.$slots, "default")
|
|
721
755
|
], 64));
|
|
722
756
|
}
|
|
723
757
|
};
|
|
724
|
-
const
|
|
758
|
+
const be = (e, m) => {
|
|
725
759
|
const t = e.__vccOpts || e;
|
|
726
|
-
for (const [
|
|
727
|
-
t[
|
|
760
|
+
for (const [n, a] of m)
|
|
761
|
+
t[n] = a;
|
|
728
762
|
return t;
|
|
729
|
-
},
|
|
763
|
+
}, St = (e) => (_e("data-v-1be10676"), e = e(), Me(), e), _t = {
|
|
730
764
|
"aria-live": "assertive",
|
|
731
765
|
class: "flex fixed inset-0 z-50 items-start py-6 px-4 pointer-events-none sm:p-6"
|
|
732
|
-
}, Mt = { class: "flex flex-col items-center space-y-4 w-full" }, Vt = { class: "p-4" }, Dt = { class: "flex items-start" }, At = { class: "flex-shrink-0" },
|
|
766
|
+
}, Mt = { class: "flex flex-col items-center space-y-4 w-full" }, Vt = { class: "p-4" }, Dt = { 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({
|
|
733
767
|
inheritAttrs: !1
|
|
734
768
|
}, {
|
|
735
769
|
__name: "message-toast",
|
|
@@ -741,43 +775,43 @@ const pe = (e, m) => {
|
|
|
741
775
|
},
|
|
742
776
|
emits: ["timeout", "close"],
|
|
743
777
|
setup(e, { emit: m }) {
|
|
744
|
-
const t = e,
|
|
778
|
+
const t = e, n = m, a = y(null), l = _(() => typeof t.message == "string" ? [t.message] : t.message), c = () => {
|
|
745
779
|
window.clearTimeout(a.value), t.active && t.timeout && (a.value = window.setTimeout(() => {
|
|
746
|
-
|
|
780
|
+
n("timeout");
|
|
747
781
|
}, t.timeout));
|
|
748
782
|
};
|
|
749
|
-
return
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
default:
|
|
753
|
-
e.active ? (r(),
|
|
783
|
+
return R(() => t.active, c), ue(c), (s, o) => (r(), d("div", _t, [
|
|
784
|
+
i("div", Mt, [
|
|
785
|
+
Y(oe, { name: "messagetoast-fade" }, {
|
|
786
|
+
default: Q(() => [
|
|
787
|
+
e.active ? (r(), d("div", {
|
|
754
788
|
key: 0,
|
|
755
|
-
class:
|
|
789
|
+
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])
|
|
756
790
|
}, [
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
791
|
+
i("div", Vt, [
|
|
792
|
+
i("div", Dt, [
|
|
793
|
+
i("div", At, [
|
|
794
|
+
B(s.$slots, "icon", {}, void 0, !0)
|
|
761
795
|
]),
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
796
|
+
i("div", Bt, [
|
|
797
|
+
i("p", Pt, [
|
|
798
|
+
B(s.$slots, "title", {}, () => [
|
|
799
|
+
N(S(e.title), 1)
|
|
766
800
|
], !0)
|
|
767
801
|
]),
|
|
768
|
-
(r(!0),
|
|
769
|
-
|
|
770
|
-
|
|
802
|
+
(r(!0), d(A, null, T(l.value, (v) => (r(), d("p", Lt, [
|
|
803
|
+
B(s.$slots, "default", {}, () => [
|
|
804
|
+
N(S(v), 1)
|
|
771
805
|
], !0)
|
|
772
806
|
]))), 256))
|
|
773
807
|
]),
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
onClick: o[0] || (o[0] = (v) =>
|
|
808
|
+
i("div", Ft, [
|
|
809
|
+
i("button", {
|
|
810
|
+
onClick: o[0] || (o[0] = (v) => n("close")),
|
|
777
811
|
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"
|
|
778
812
|
}, [
|
|
779
813
|
It,
|
|
780
|
-
|
|
814
|
+
Y(D(dt), { class: "w-5 h-5" })
|
|
781
815
|
])
|
|
782
816
|
])
|
|
783
817
|
])
|
|
@@ -789,14 +823,14 @@ const pe = (e, m) => {
|
|
|
789
823
|
])
|
|
790
824
|
]));
|
|
791
825
|
}
|
|
792
|
-
}), kl = /* @__PURE__ */
|
|
826
|
+
}), kl = /* @__PURE__ */ be(Tt, [["__scopeId", "data-v-1be10676"]]), Ot = {
|
|
793
827
|
key: 0,
|
|
794
828
|
class: "fixed inset-0 z-[9998] bg-white/50 backdrop-blur-sm",
|
|
795
829
|
"aria-hidden": "true"
|
|
796
830
|
}, jt = {
|
|
797
831
|
key: 0,
|
|
798
832
|
class: "fixed inset-0 z-[9999]"
|
|
799
|
-
},
|
|
833
|
+
}, Yt = { class: "flex justify-center items-center h-screen" }, $l = {
|
|
800
834
|
__name: "modal",
|
|
801
835
|
props: {
|
|
802
836
|
show: Boolean,
|
|
@@ -806,27 +840,27 @@ const pe = (e, m) => {
|
|
|
806
840
|
},
|
|
807
841
|
emits: ["clicked-outside"],
|
|
808
842
|
setup(e, { emit: m }) {
|
|
809
|
-
const t = m,
|
|
810
|
-
return
|
|
811
|
-
e.show ? (r(),
|
|
812
|
-
|
|
813
|
-
default:
|
|
814
|
-
e.show ? (r(),
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
class:
|
|
843
|
+
const t = m, n = y(null);
|
|
844
|
+
return ie(n, () => t("clicked-outside")), (a, l) => (r(), d(A, null, [
|
|
845
|
+
e.show ? (r(), d("div", Ot)) : V("", !0),
|
|
846
|
+
Y(oe, { name: "appear" }, {
|
|
847
|
+
default: Q(() => [
|
|
848
|
+
e.show ? (r(), d("div", jt, [
|
|
849
|
+
i("div", Yt, [
|
|
850
|
+
i("div", {
|
|
851
|
+
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]),
|
|
818
852
|
ref_key: "container",
|
|
819
|
-
ref:
|
|
853
|
+
ref: n
|
|
820
854
|
}, [
|
|
821
|
-
|
|
822
|
-
class:
|
|
855
|
+
i("div", {
|
|
856
|
+
class: C(e.headerClass)
|
|
823
857
|
}, [
|
|
824
|
-
|
|
858
|
+
B(a.$slots, "title")
|
|
825
859
|
], 2),
|
|
826
|
-
|
|
827
|
-
class:
|
|
860
|
+
i("div", {
|
|
861
|
+
class: C(["overflow-y-auto h-full pb-4 mt-16", e.contentClass])
|
|
828
862
|
}, [
|
|
829
|
-
|
|
863
|
+
B(a.$slots, "default")
|
|
830
864
|
], 2)
|
|
831
865
|
], 2)
|
|
832
866
|
])
|
|
@@ -836,7 +870,7 @@ const pe = (e, m) => {
|
|
|
836
870
|
})
|
|
837
871
|
], 64));
|
|
838
872
|
}
|
|
839
|
-
},
|
|
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"], Cl = {
|
|
840
874
|
__name: "pagination",
|
|
841
875
|
props: {
|
|
842
876
|
page: { type: Number, default: 1 },
|
|
@@ -862,9 +896,9 @@ const pe = (e, m) => {
|
|
|
862
896
|
},
|
|
863
897
|
emits: ["update:page"],
|
|
864
898
|
setup(e, { emit: m }) {
|
|
865
|
-
const t = m,
|
|
899
|
+
const t = m, n = e, a = y(Math.ceil(n.total / n.perPage)), l = y(null), c = _(() => n.markerPosition === "above" ? "border-t-2 pt-4" : "border-b-2 pb-4"), s = _(() => {
|
|
866
900
|
let u = [1];
|
|
867
|
-
if (
|
|
901
|
+
if (n.showAllPages || a.value <= 7) {
|
|
868
902
|
for (let b = 2; b <= a.value; ++b)
|
|
869
903
|
u.push(b);
|
|
870
904
|
return u;
|
|
@@ -875,55 +909,55 @@ const pe = (e, m) => {
|
|
|
875
909
|
}, v = () => {
|
|
876
910
|
l.value < a.value && t("update:page", l.value + 1);
|
|
877
911
|
};
|
|
878
|
-
return
|
|
879
|
-
a.value = Math.ceil(
|
|
880
|
-
}),
|
|
881
|
-
a.value = Math.ceil(
|
|
882
|
-
}), (u, b) => (r(),
|
|
883
|
-
|
|
884
|
-
e.showNavButtons ? (r(),
|
|
912
|
+
return R(() => n.page, (u) => l.value = Math.min(Math.max(u, 1), a.value), { immediate: !0 }), R(() => n.perPage, (u) => {
|
|
913
|
+
a.value = Math.ceil(n.total / n.perPage), t("update:page", 1);
|
|
914
|
+
}), R(() => n.total, (u) => {
|
|
915
|
+
a.value = Math.ceil(n.total / n.perPage), l.value > a.value && t("update:page", 1);
|
|
916
|
+
}), (u, b) => (r(), d("nav", Et, [
|
|
917
|
+
i("div", Nt, [
|
|
918
|
+
e.showNavButtons ? (r(), d("a", {
|
|
885
919
|
key: 0,
|
|
886
|
-
onClick:
|
|
920
|
+
onClick: P(o, ["prevent"]),
|
|
887
921
|
href: "#",
|
|
888
|
-
class:
|
|
922
|
+
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]])
|
|
889
923
|
}, [
|
|
890
|
-
|
|
891
|
-
|
|
924
|
+
Y(D(se), { class: "w-5 h-5" }),
|
|
925
|
+
N(" " + S(e.prevText), 1)
|
|
892
926
|
], 10, zt)) : V("", !0)
|
|
893
927
|
]),
|
|
894
|
-
|
|
895
|
-
(r(!0),
|
|
896
|
-
onClick:
|
|
897
|
-
key:
|
|
898
|
-
href:
|
|
899
|
-
class:
|
|
900
|
-
"border-vxvue-500 text-vxvue-700":
|
|
901
|
-
"border-transparent text-gray-500":
|
|
902
|
-
"hover:text-gray-700 hover:border-gray-300":
|
|
928
|
+
i("div", Rt, [
|
|
929
|
+
(r(!0), d(A, null, T(s.value, (p, g) => (r(), G(fe(p !== "dots" ? "a" : "span"), {
|
|
930
|
+
onClick: P((w) => p !== "dots" ? t("update:page", p) : null, ["prevent"]),
|
|
931
|
+
key: g,
|
|
932
|
+
href: p !== "dots" ? "#" : null,
|
|
933
|
+
class: C(["inline-flex items-center px-4 text-sm font-medium", [{
|
|
934
|
+
"border-vxvue-500 text-vxvue-700": p === l.value,
|
|
935
|
+
"border-transparent text-gray-500": p !== l.value,
|
|
936
|
+
"hover:text-gray-700 hover:border-gray-300": p !== "dots"
|
|
903
937
|
}, c.value]])
|
|
904
938
|
}, {
|
|
905
|
-
default:
|
|
906
|
-
|
|
939
|
+
default: Q(() => [
|
|
940
|
+
N(S(p !== "dots" ? p : "..."), 1)
|
|
907
941
|
]),
|
|
908
942
|
_: 2
|
|
909
943
|
}, 1032, ["onClick", "href", "class"]))), 128))
|
|
910
944
|
]),
|
|
911
|
-
|
|
912
|
-
e.showNavButtons ? (r(),
|
|
945
|
+
i("div", Ht, [
|
|
946
|
+
e.showNavButtons ? (r(), d("a", {
|
|
913
947
|
key: 0,
|
|
914
|
-
onClick:
|
|
948
|
+
onClick: P(v, ["prevent"]),
|
|
915
949
|
href: "#",
|
|
916
|
-
class:
|
|
950
|
+
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 }]])
|
|
917
951
|
}, [
|
|
918
|
-
|
|
919
|
-
|
|
952
|
+
N(S(e.nextText) + " ", 1),
|
|
953
|
+
Y(D(ne), { class: "w-5 h-5" })
|
|
920
954
|
], 10, Ut)) : V("", !0)
|
|
921
955
|
])
|
|
922
956
|
]));
|
|
923
957
|
}
|
|
924
958
|
};
|
|
925
959
|
function Wt(e, m) {
|
|
926
|
-
return r(),
|
|
960
|
+
return r(), d("svg", {
|
|
927
961
|
xmlns: "http://www.w3.org/2000/svg",
|
|
928
962
|
fill: "none",
|
|
929
963
|
viewBox: "0 0 24 24",
|
|
@@ -931,7 +965,7 @@ function Wt(e, m) {
|
|
|
931
965
|
stroke: "currentColor",
|
|
932
966
|
"aria-hidden": "true"
|
|
933
967
|
}, [
|
|
934
|
-
|
|
968
|
+
i("path", {
|
|
935
969
|
"stroke-linecap": "round",
|
|
936
970
|
"stroke-linejoin": "round",
|
|
937
971
|
d: "M3.98 8.223A10.477 10.477 0 001.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.45 10.45 0 0112 4.5c4.756 0 8.773 3.162 10.065 7.498a10.523 10.523 0 01-4.293 5.774M6.228 6.228L3 3m3.228 3.228l3.65 3.65m7.894 7.894L21 21m-3.228-3.228l-3.65-3.65m0 0a3 3 0 10-4.243-4.243m4.242 4.242L9.88 9.88"
|
|
@@ -939,7 +973,7 @@ function Wt(e, m) {
|
|
|
939
973
|
]);
|
|
940
974
|
}
|
|
941
975
|
function qt(e, m) {
|
|
942
|
-
return r(),
|
|
976
|
+
return r(), d("svg", {
|
|
943
977
|
xmlns: "http://www.w3.org/2000/svg",
|
|
944
978
|
fill: "none",
|
|
945
979
|
viewBox: "0 0 24 24",
|
|
@@ -947,99 +981,99 @@ function qt(e, m) {
|
|
|
947
981
|
stroke: "currentColor",
|
|
948
982
|
"aria-hidden": "true"
|
|
949
983
|
}, [
|
|
950
|
-
|
|
984
|
+
i("path", {
|
|
951
985
|
"stroke-linecap": "round",
|
|
952
986
|
"stroke-linejoin": "round",
|
|
953
987
|
d: "M2.036 12.322a1.012 1.012 0 010-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178z"
|
|
954
988
|
}),
|
|
955
|
-
|
|
989
|
+
i("path", {
|
|
956
990
|
"stroke-linecap": "round",
|
|
957
991
|
"stroke-linejoin": "round",
|
|
958
992
|
d: "M15 12a3 3 0 11-6 0 3 3 0 016 0z"
|
|
959
993
|
})
|
|
960
994
|
]);
|
|
961
995
|
}
|
|
962
|
-
const Kt = ["value", "type"],
|
|
996
|
+
const Kt = ["value", "type"], Sl = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
963
997
|
__name: "password-input",
|
|
964
998
|
props: ["modelValue"],
|
|
965
999
|
emits: ["update:modelValue"],
|
|
966
1000
|
setup(e, { emit: m }) {
|
|
967
|
-
const t = m,
|
|
968
|
-
let l = Object.assign({},
|
|
1001
|
+
const t = m, n = y(!1), a = _(() => {
|
|
1002
|
+
let l = Object.assign({}, K());
|
|
969
1003
|
return delete l.class, l;
|
|
970
1004
|
});
|
|
971
|
-
return (l, c) => (r(),
|
|
972
|
-
class:
|
|
1005
|
+
return (l, c) => (r(), d("div", {
|
|
1006
|
+
class: C("inline-block relative " + K().class)
|
|
973
1007
|
}, [
|
|
974
|
-
|
|
1008
|
+
i("input", O({
|
|
975
1009
|
value: e.modelValue,
|
|
976
|
-
type:
|
|
977
|
-
onInput: c[0] || (c[0] = (
|
|
1010
|
+
type: n.value ? "text" : "password",
|
|
1011
|
+
onInput: c[0] || (c[0] = (s) => t("update:modelValue", s.target.value))
|
|
978
1012
|
}, a.value, { class: "block pr-10 w-full form-input peer" }), null, 16, Kt),
|
|
979
|
-
|
|
980
|
-
onClick: c[1] || (c[1] =
|
|
1013
|
+
i("button", {
|
|
1014
|
+
onClick: c[1] || (c[1] = P((s) => n.value = !n.value, ["stop"])),
|
|
981
1015
|
class: "flex absolute inset-y-0 right-0 items-center pr-3 text-brand-700 hover:text-brand"
|
|
982
1016
|
}, [
|
|
983
|
-
|
|
1017
|
+
n.value ? (r(), G(D(Wt), {
|
|
984
1018
|
key: 0,
|
|
985
1019
|
class: "w-5 h-5"
|
|
986
|
-
})) : (r(),
|
|
1020
|
+
})) : (r(), G(D(qt), {
|
|
987
1021
|
key: 1,
|
|
988
1022
|
class: "w-5 h-5"
|
|
989
1023
|
}))
|
|
990
1024
|
]),
|
|
991
|
-
|
|
1025
|
+
B(l.$slots, "default")
|
|
992
1026
|
], 2));
|
|
993
1027
|
}
|
|
994
|
-
}),
|
|
1028
|
+
}), Gt = { class: "flex items-center pb-1" }, Xt = ["id", "checked"], Zt = ["for"], Jt = { key: 1 }, Qt = ["href"], el = {
|
|
995
1029
|
key: 0,
|
|
996
1030
|
class: "ml-6"
|
|
997
|
-
},
|
|
1031
|
+
}, _l = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
998
1032
|
__name: "simple-tree",
|
|
999
1033
|
props: { branch: { type: Object, default: {} } },
|
|
1000
1034
|
emits: ["branch-selected", "expand"],
|
|
1001
1035
|
setup(e, { emit: m }) {
|
|
1002
|
-
const t = e,
|
|
1003
|
-
return
|
|
1004
|
-
t.branch.current &&
|
|
1036
|
+
const t = e, n = m, a = y(!1);
|
|
1037
|
+
return ue(() => {
|
|
1038
|
+
t.branch.current && n("expand", !0);
|
|
1005
1039
|
}), (l, c) => {
|
|
1006
|
-
const
|
|
1007
|
-
return r(),
|
|
1008
|
-
class:
|
|
1040
|
+
const s = Ve("simple-tree", !0);
|
|
1041
|
+
return r(), d("div", {
|
|
1042
|
+
class: C([!e.branch.branches || !e.branch.branches.length ? "terminates" : "", l.$attrs.class])
|
|
1009
1043
|
}, [
|
|
1010
|
-
|
|
1011
|
-
e.branch.branches && e.branch.branches.length ? (r(),
|
|
1012
|
-
|
|
1044
|
+
i("div", Gt, [
|
|
1045
|
+
e.branch.branches && e.branch.branches.length ? (r(), d(A, { key: 0 }, [
|
|
1046
|
+
i("input", {
|
|
1013
1047
|
type: "checkbox",
|
|
1014
1048
|
id: "branch-" + e.branch.id,
|
|
1015
1049
|
onClick: c[0] || (c[0] = (o) => a.value = !a.value),
|
|
1016
1050
|
checked: a.value,
|
|
1017
1051
|
class: "hidden"
|
|
1018
|
-
}, null, 8,
|
|
1019
|
-
|
|
1052
|
+
}, null, 8, Xt),
|
|
1053
|
+
i("label", {
|
|
1020
1054
|
for: "branch-" + e.branch.id,
|
|
1021
1055
|
class: "mr-2"
|
|
1022
1056
|
}, [
|
|
1023
|
-
(r(),
|
|
1057
|
+
(r(), G(fe(a.value ? D(it) : D(ct)), { class: "w-4 h-4 border" }))
|
|
1024
1058
|
], 8, Zt)
|
|
1025
1059
|
], 64)) : V("", !0),
|
|
1026
|
-
e.branch.current ? (r(),
|
|
1060
|
+
e.branch.current ? (r(), d("strong", Jt, S(e.branch.label), 1)) : (r(), d("a", {
|
|
1027
1061
|
key: 2,
|
|
1028
1062
|
href: e.branch.path,
|
|
1029
|
-
onClick: c[1] || (c[1] =
|
|
1030
|
-
},
|
|
1063
|
+
onClick: c[1] || (c[1] = P((o) => n("branch-selected", e.branch), ["prevent"]))
|
|
1064
|
+
}, S(e.branch.label), 9, Qt))
|
|
1031
1065
|
]),
|
|
1032
|
-
e.branch.branches && e.branch.branches.length ?
|
|
1033
|
-
(r(!0),
|
|
1066
|
+
e.branch.branches && e.branch.branches.length ? me((r(), d("ul", el, [
|
|
1067
|
+
(r(!0), d(A, null, T(e.branch.branches, (o) => (r(), G(s, {
|
|
1034
1068
|
branch: o,
|
|
1035
1069
|
key: o.id,
|
|
1036
|
-
onBranchSelected: c[2] || (c[2] = (v) =>
|
|
1070
|
+
onBranchSelected: c[2] || (c[2] = (v) => n("branch-selected", v)),
|
|
1037
1071
|
onExpand: c[3] || (c[3] = (v) => {
|
|
1038
|
-
a.value = v,
|
|
1072
|
+
a.value = v, n("expand", v);
|
|
1039
1073
|
})
|
|
1040
1074
|
}, null, 8, ["branch"]))), 128))
|
|
1041
1075
|
], 512)), [
|
|
1042
|
-
[
|
|
1076
|
+
[De, a.value]
|
|
1043
1077
|
]) : V("", !0)
|
|
1044
1078
|
], 2);
|
|
1045
1079
|
};
|
|
@@ -1057,113 +1091,118 @@ const Kt = ["value", "type"], Cl = /* @__PURE__ */ Object.assign({ inheritAttrs:
|
|
|
1057
1091
|
},
|
|
1058
1092
|
emits: ["update:modelValue"],
|
|
1059
1093
|
setup(e, { emit: m }) {
|
|
1060
|
-
const t = e,
|
|
1061
|
-
const f = t.max,
|
|
1062
|
-
return t.modelValue instanceof Array ? t.modelValue.map((
|
|
1063
|
-
}), b =
|
|
1094
|
+
const t = e, n = m, a = K(), l = y({ x: null, y: null }), c = y({ w: null, h: null }), s = y(!1), o = y(null), v = y(0), u = _(() => {
|
|
1095
|
+
const f = t.max, h = t.min;
|
|
1096
|
+
return t.modelValue instanceof Array ? t.modelValue.map((M) => Math.max(Math.min(M, f), h) * 100 / (f - h)) : Math.max(Math.min(t.modelValue, f), h) * 100 / (f - h);
|
|
1097
|
+
}), b = _(() => {
|
|
1064
1098
|
if (t.modelValue instanceof Array) {
|
|
1065
|
-
const f = Math.min(...u.value) + "%",
|
|
1066
|
-
return t.vertical ? { bottom: f, height:
|
|
1099
|
+
const f = Math.min(...u.value) + "%", h = Math.max(...u.value) - Math.min(...u.value) + "%";
|
|
1100
|
+
return t.vertical ? { bottom: f, height: h } : { left: f, width: h };
|
|
1067
1101
|
}
|
|
1068
1102
|
return t.vertical ? { bottom: 0, height: u.value + "%" } : { width: u.value + "%" };
|
|
1069
|
-
}),
|
|
1103
|
+
}), p = y({
|
|
1070
1104
|
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"),
|
|
1071
1105
|
tabindex: 0,
|
|
1072
1106
|
role: "slider",
|
|
1073
1107
|
"aria-valuemin": t.min,
|
|
1074
1108
|
"aria-valuemax": t.max
|
|
1075
|
-
}),
|
|
1076
|
-
let
|
|
1077
|
-
if (
|
|
1078
|
-
let
|
|
1079
|
-
|
|
1109
|
+
}), g = (f) => {
|
|
1110
|
+
let h = parseFloat(f.toFixed(10));
|
|
1111
|
+
if (h = Math.min(t.max, Math.max(t.min, h)), t.modelValue instanceof Array) {
|
|
1112
|
+
let M = [...t.modelValue];
|
|
1113
|
+
M[v.value] = h, n("update:modelValue", M);
|
|
1080
1114
|
} else
|
|
1081
|
-
|
|
1115
|
+
n("update:modelValue", h);
|
|
1082
1116
|
}, w = (f) => {
|
|
1083
|
-
const { pageX:
|
|
1084
|
-
|
|
1085
|
-
},
|
|
1086
|
-
|
|
1087
|
-
}, T = (f) => {
|
|
1088
|
-
f.preventDefault(), n.value = !0;
|
|
1089
|
-
const g = document.documentElement, y = o.value.getBoundingClientRect();
|
|
1117
|
+
const { pageX: h, pageY: M } = f.touches ? f.touches[0] : f, F = t.vertical ? (-M + l.value.y) / c.value.h : (h - l.value.x) / c.value.w;
|
|
1118
|
+
g(Math.floor((t.max - t.min) * F + t.min));
|
|
1119
|
+
}, j = () => {
|
|
1120
|
+
const f = document.documentElement, h = o.value.getBoundingClientRect();
|
|
1090
1121
|
l.value = {
|
|
1091
|
-
x:
|
|
1092
|
-
y:
|
|
1122
|
+
x: h.left + f.scrollLeft - f.clientLeft,
|
|
1123
|
+
y: h.bottom + f.scrollTop - f.clientTop
|
|
1093
1124
|
}, c.value = {
|
|
1094
1125
|
w: o.value.offsetWidth,
|
|
1095
1126
|
h: o.value.offsetHeight
|
|
1096
|
-
}
|
|
1097
|
-
},
|
|
1098
|
-
|
|
1099
|
-
},
|
|
1127
|
+
};
|
|
1128
|
+
}, I = (f) => {
|
|
1129
|
+
s.value && (f.preventDefault(), w(f));
|
|
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) => {
|
|
1100
1135
|
f.keyCode >= 33 && f.keyCode <= 40 && f.preventDefault();
|
|
1101
|
-
const
|
|
1136
|
+
const h = t.modelValue[v.value] ?? t.modelValue;
|
|
1102
1137
|
switch (f.keyCode) {
|
|
1103
1138
|
case 37:
|
|
1104
1139
|
case 40:
|
|
1105
|
-
|
|
1140
|
+
g(h - 1);
|
|
1106
1141
|
break;
|
|
1107
1142
|
case 39:
|
|
1108
1143
|
case 38:
|
|
1109
|
-
|
|
1144
|
+
g(h + 1);
|
|
1110
1145
|
break;
|
|
1111
1146
|
case 33:
|
|
1112
|
-
|
|
1147
|
+
g(h + (t.max - t.min) / 10);
|
|
1113
1148
|
break;
|
|
1114
1149
|
case 34:
|
|
1115
|
-
|
|
1150
|
+
g(h - (t.max - t.min) / 10);
|
|
1116
1151
|
break;
|
|
1117
1152
|
case 36:
|
|
1118
|
-
|
|
1153
|
+
g(t.min);
|
|
1119
1154
|
break;
|
|
1120
1155
|
case 35:
|
|
1121
|
-
|
|
1156
|
+
g(t.max);
|
|
1122
1157
|
}
|
|
1158
|
+
}, x = (f) => {
|
|
1159
|
+
j(), w(f);
|
|
1123
1160
|
};
|
|
1124
|
-
return (f,
|
|
1125
|
-
class:
|
|
1161
|
+
return (f, h) => (r(), d("div", O({
|
|
1162
|
+
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"],
|
|
1126
1163
|
ref_key: "track",
|
|
1127
1164
|
ref: o
|
|
1128
|
-
},
|
|
1129
|
-
|
|
1165
|
+
}, te(e.disabled ? {} : {
|
|
1166
|
+
click: x
|
|
1167
|
+
}, !0)), [
|
|
1168
|
+
e.disabled ? V("", !0) : (r(), d("div", {
|
|
1130
1169
|
key: 0,
|
|
1131
|
-
class:
|
|
1132
|
-
style:
|
|
1170
|
+
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(b.value)
|
|
1133
1172
|
}, null, 6)),
|
|
1134
|
-
e.modelValue.length ? (r(!0),
|
|
1135
|
-
id:
|
|
1136
|
-
style: e.vertical ? { bottom: u.value[
|
|
1137
|
-
"aria-valuenow": e.modelValue[
|
|
1138
|
-
},
|
|
1139
|
-
focus: () => v.value =
|
|
1140
|
-
keydown:
|
|
1141
|
-
mousedown: (
|
|
1142
|
-
v.value =
|
|
1173
|
+
e.modelValue.length ? (r(!0), d(A, { key: 2 }, T(e.modelValue, (M, F) => (r(), d("button", O({
|
|
1174
|
+
id: F ? null : D(a).id,
|
|
1175
|
+
style: e.vertical ? { bottom: u.value[F] + "%" } : { left: u.value[F] + "%" },
|
|
1176
|
+
"aria-valuenow": e.modelValue[F]
|
|
1177
|
+
}, te(e.disabled ? {} : {
|
|
1178
|
+
focus: () => v.value = F,
|
|
1179
|
+
keydown: q,
|
|
1180
|
+
mousedown: (U) => {
|
|
1181
|
+
v.value = F, L(U);
|
|
1143
1182
|
},
|
|
1144
|
-
touchstart: (
|
|
1145
|
-
v.value =
|
|
1183
|
+
touchstart: (U) => {
|
|
1184
|
+
v.value = F, L(U);
|
|
1146
1185
|
},
|
|
1147
|
-
touchmove:
|
|
1148
|
-
touchend:
|
|
1149
|
-
}, !0),
|
|
1186
|
+
touchmove: I,
|
|
1187
|
+
touchend: H
|
|
1188
|
+
}, !0), p.value), null, 16, ll))), 256)) : (r(), d("button", O({
|
|
1150
1189
|
key: 1,
|
|
1151
|
-
id:
|
|
1190
|
+
id: D(a).id,
|
|
1152
1191
|
style: e.vertical ? { bottom: u.value + "%" } : { left: u.value + "%" },
|
|
1153
1192
|
"aria-valuenow": e.modelValue
|
|
1154
|
-
},
|
|
1193
|
+
}, te(e.disabled ? {} : {
|
|
1155
1194
|
focus: () => v.value = 0,
|
|
1156
|
-
keydown:
|
|
1157
|
-
mousedown: (
|
|
1158
|
-
v.value = 0,
|
|
1195
|
+
keydown: q,
|
|
1196
|
+
mousedown: (M) => {
|
|
1197
|
+
v.value = 0, L(M);
|
|
1159
1198
|
},
|
|
1160
|
-
touchstart: (
|
|
1161
|
-
v.value = 0,
|
|
1199
|
+
touchstart: (M) => {
|
|
1200
|
+
v.value = 0, L(M);
|
|
1162
1201
|
},
|
|
1163
|
-
touchmove:
|
|
1164
|
-
touchend:
|
|
1165
|
-
}, !0),
|
|
1166
|
-
],
|
|
1202
|
+
touchmove: I,
|
|
1203
|
+
touchend: H
|
|
1204
|
+
}, !0), p.value), null, 16, tl))
|
|
1205
|
+
], 16));
|
|
1167
1206
|
}
|
|
1168
1207
|
});
|
|
1169
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 = {
|
|
@@ -1201,62 +1240,62 @@ const al = { class: "w-full divide-y divide-y-slate-900" }, sl = { class: "text-
|
|
|
1201
1240
|
},
|
|
1202
1241
|
emits: ["before-sort", "after-sort"],
|
|
1203
1242
|
setup(e, { emit: m }) {
|
|
1204
|
-
const t = e,
|
|
1243
|
+
const t = e, n = m, a = y(t.sortProp), l = y(t.sortDirection), c = _(() => {
|
|
1205
1244
|
let o = t.rows.slice();
|
|
1206
1245
|
const v = t.columns.find(({ prop: u }) => u === a.value);
|
|
1207
1246
|
return v && (l.value === "asc" && v.sortAscFunction ? o.sort(v.sortAscFunction) : l.value === "desc" && v.sortDescFunction ? o.sort(v.sortDescFunction) : o.sort((u, b) => u[a.value] < b[a.value] ? l.value === "asc" ? -1 : 1 : u[a.value] > b[a.value] ? l.value === "asc" ? 1 : -1 : 0)), o.slice(t.offset || 0, (t.offset || 0) + (t.count || o.length));
|
|
1208
|
-
}),
|
|
1209
|
-
|
|
1247
|
+
}), s = (o) => {
|
|
1248
|
+
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 }));
|
|
1210
1249
|
};
|
|
1211
|
-
return (o, v) => (r(),
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
(r(!0),
|
|
1250
|
+
return (o, v) => (r(), d("table", al, [
|
|
1251
|
+
i("thead", sl, [
|
|
1252
|
+
i("tr", null, [
|
|
1253
|
+
(r(!0), d(A, null, T(e.columns, (u) => (r(), d("th", {
|
|
1215
1254
|
scope: "col",
|
|
1216
|
-
class:
|
|
1255
|
+
class: C(["py-3 px-6 text-left", [
|
|
1217
1256
|
{ "cursor-pointer": u.sortable, active: a.value === u.prop },
|
|
1218
1257
|
u.cssClass
|
|
1219
1258
|
]]),
|
|
1220
|
-
onClick: (b) => u.sortable ?
|
|
1259
|
+
onClick: (b) => u.sortable ? s(u.prop) : null
|
|
1221
1260
|
}, [
|
|
1222
|
-
|
|
1261
|
+
B(o.$slots, u.prop + "-header", {
|
|
1223
1262
|
column: u,
|
|
1224
1263
|
sortDir: l.value,
|
|
1225
1264
|
sortProp: a.value
|
|
1226
1265
|
}, () => [
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
u.sortable ? (r(),
|
|
1230
|
-
a.value === u.prop ? (r(),
|
|
1266
|
+
i("div", ol, [
|
|
1267
|
+
i("span", null, S(u.label), 1),
|
|
1268
|
+
u.sortable ? (r(), d("svg", rl, [
|
|
1269
|
+
a.value === u.prop ? (r(), d("path", {
|
|
1231
1270
|
key: 0,
|
|
1232
1271
|
"stroke-linecap": "round",
|
|
1233
1272
|
"stroke-linejoin": "round",
|
|
1234
1273
|
"stroke-width": "2",
|
|
1235
1274
|
d: l.value === "asc" ? "M19 9l-7 7-7-7" : "M5 15l7-7 7 7"
|
|
1236
|
-
}, null, 8, ul)) : (r(),
|
|
1275
|
+
}, null, 8, ul)) : (r(), d("path", il))
|
|
1237
1276
|
])) : V("", !0)
|
|
1238
1277
|
])
|
|
1239
1278
|
], !0)
|
|
1240
1279
|
], 10, nl))), 256))
|
|
1241
1280
|
])
|
|
1242
1281
|
]),
|
|
1243
|
-
|
|
1244
|
-
(r(!0),
|
|
1282
|
+
i("tbody", null, [
|
|
1283
|
+
(r(!0), d(A, null, T(c.value, (u) => (r(), d("tr", {
|
|
1245
1284
|
key: u[e.keyProperty],
|
|
1246
|
-
class:
|
|
1285
|
+
class: C(u.cssClass)
|
|
1247
1286
|
}, [
|
|
1248
|
-
(r(!0),
|
|
1249
|
-
class:
|
|
1287
|
+
(r(!0), d(A, null, T(e.columns, (b) => (r(), d("td", {
|
|
1288
|
+
class: C(["py-3 px-6 whitespace-nowrap", { active: a.value === b.prop }])
|
|
1250
1289
|
}, [
|
|
1251
|
-
|
|
1252
|
-
|
|
1290
|
+
B(o.$slots, b.prop, { row: u }, () => [
|
|
1291
|
+
N(S(u[b.prop]), 1)
|
|
1253
1292
|
], !0)
|
|
1254
1293
|
], 2))), 256))
|
|
1255
1294
|
], 2))), 128))
|
|
1256
1295
|
])
|
|
1257
1296
|
]));
|
|
1258
1297
|
}
|
|
1259
|
-
}, Vl = /* @__PURE__ */
|
|
1298
|
+
}, Vl = /* @__PURE__ */ be(cl, [["__scopeId", "data-v-1c751c5a"]]), dl = { class: "sm:hidden" }, vl = { class: "hidden sm:block" }, ml = { class: "border-b border-gray-200" }, fl = {
|
|
1260
1299
|
class: "flex -mb-px space-x-8",
|
|
1261
1300
|
"aria-label": "Tabs"
|
|
1262
1301
|
}, hl = ["onClick", "aria-current"], Dl = {
|
|
@@ -1267,55 +1306,55 @@ const al = { class: "w-full divide-y divide-y-slate-900" }, sl = { class: "text-
|
|
|
1267
1306
|
},
|
|
1268
1307
|
emits: ["update:active-index"],
|
|
1269
1308
|
setup(e, { emit: m }) {
|
|
1270
|
-
const t = e,
|
|
1271
|
-
let
|
|
1309
|
+
const t = e, n = m, a = y(t.items[t.activeIndex] || {}), l = _(() => {
|
|
1310
|
+
let s = [];
|
|
1272
1311
|
return t.items.forEach((o, v) => {
|
|
1273
|
-
o.disabled ||
|
|
1274
|
-
}),
|
|
1312
|
+
o.disabled || s.push({ label: o.name, key: v });
|
|
1313
|
+
}), s;
|
|
1275
1314
|
});
|
|
1276
|
-
|
|
1277
|
-
a.value = t.items[
|
|
1315
|
+
R(() => t.activeIndex, (s) => {
|
|
1316
|
+
a.value = t.items[s] || {};
|
|
1278
1317
|
});
|
|
1279
|
-
const c = (
|
|
1280
|
-
|
|
1318
|
+
const c = (s) => {
|
|
1319
|
+
s.disabled || (a.value = s, n("update:active-index", t.items.indexOf(s)));
|
|
1281
1320
|
};
|
|
1282
|
-
return (
|
|
1283
|
-
|
|
1284
|
-
|
|
1321
|
+
return (s, o) => (r(), d(A, null, [
|
|
1322
|
+
i("div", dl, [
|
|
1323
|
+
Y(kt, {
|
|
1285
1324
|
options: l.value,
|
|
1286
1325
|
"model-value": e.activeIndex,
|
|
1287
|
-
"onUpdate:modelValue": o[0] || (o[0] = (v) =>
|
|
1326
|
+
"onUpdate:modelValue": o[0] || (o[0] = (v) => n("update:activeIndex", v)),
|
|
1288
1327
|
class: "w-full"
|
|
1289
1328
|
}, null, 8, ["options", "model-value"])
|
|
1290
1329
|
]),
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
(r(!0),
|
|
1330
|
+
i("div", vl, [
|
|
1331
|
+
i("div", ml, [
|
|
1332
|
+
i("nav", fl, [
|
|
1333
|
+
(r(!0), d(A, null, T(e.items, (v) => (r(), d("a", {
|
|
1295
1334
|
key: v.name,
|
|
1296
1335
|
href: "#",
|
|
1297
|
-
onClick:
|
|
1298
|
-
class:
|
|
1336
|
+
onClick: P((u) => c(v), ["prevent"]),
|
|
1337
|
+
class: C([
|
|
1299
1338
|
a.value === v ? "border-vxvue-500 text-vxvue-600" : "border-transparent text-gray-900 hover:text-gray-700 hover:border-gray-300",
|
|
1300
1339
|
v.disabled ? "cursor-not-allowed text-gray-400 hover:border-transparent" : "",
|
|
1301
1340
|
"group inline-flex items-center py-4 px-1 border-b-4 font-medium"
|
|
1302
1341
|
]),
|
|
1303
1342
|
"aria-current": a.value === v ? "page" : void 0
|
|
1304
1343
|
}, [
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1344
|
+
B(s.$slots, "icon", { tab: v }),
|
|
1345
|
+
i("span", null, [
|
|
1346
|
+
B(s.$slots, "default", { tab: v }, () => [
|
|
1347
|
+
N(S(v.name), 1)
|
|
1309
1348
|
])
|
|
1310
1349
|
]),
|
|
1311
|
-
v.badge ? (r(),
|
|
1350
|
+
v.badge ? (r(), d("span", {
|
|
1312
1351
|
key: 0,
|
|
1313
|
-
class:
|
|
1352
|
+
class: C([
|
|
1314
1353
|
a.value === v ? "bg-vxvue-50 text-vxvue-700" : "bg-gray-200 text-gray-900",
|
|
1315
1354
|
v.disabled ? "bg-gray-100 text-gray-400" : "",
|
|
1316
1355
|
"hidden ml-3 py-0.5 px-2.5 rounded-full text-xs font-medium md:inline-block"
|
|
1317
1356
|
])
|
|
1318
|
-
},
|
|
1357
|
+
}, S(v.badge), 3)) : V("", !0)
|
|
1319
1358
|
], 10, hl))), 128))
|
|
1320
1359
|
])
|
|
1321
1360
|
])
|
|
@@ -1326,16 +1365,16 @@ const al = { class: "w-full divide-y divide-y-slate-900" }, sl = { class: "text-
|
|
|
1326
1365
|
export {
|
|
1327
1366
|
gl as Autocomplete,
|
|
1328
1367
|
bl as Confirm,
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1368
|
+
ut as DateInput,
|
|
1369
|
+
xl as Datepicker,
|
|
1370
|
+
yl as FormFileButton,
|
|
1332
1371
|
kt as FormSelect,
|
|
1333
1372
|
wl as FormSwitch,
|
|
1334
1373
|
kl as MessageToast,
|
|
1335
1374
|
$l as Modal,
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1375
|
+
Cl as Pagination,
|
|
1376
|
+
Sl as PasswordInput,
|
|
1377
|
+
_l as SimpleTree,
|
|
1339
1378
|
Ml as Slider,
|
|
1340
1379
|
Vl as Sortable,
|
|
1341
1380
|
Dl as Tabs
|