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