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