@ianicdev/datatables2 0.10.9 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Comparison-ChMG_TLF.js → Comparison-C2hZMBq4.js} +3 -3
- package/dist/{Comparison-Cz2qINPo.cjs → Comparison-tLPSEm-Q.cjs} +1 -1
- package/dist/{Datepicker-DHZwRCiL.cjs → Datepicker-BA4mQx6C.cjs} +1 -1
- package/dist/{Datepicker-CHMHJOq1.js → Datepicker-BO2Ixl4r.js} +51 -51
- package/dist/Options-C7EAVB8f.cjs +1 -0
- package/dist/Options-DrhE_fto.js +108 -0
- package/dist/RefreshTable-BNy_MWZg.js +21 -0
- package/dist/RefreshTable-C-AgoC97.cjs +1 -0
- package/dist/{Search-C5Nj3AJd.js → Search-CdHQz2KW.js} +8 -8
- package/dist/{Search-DsKhSX_l.cjs → Search-D_zU2pXl.cjs} +1 -1
- package/dist/{Table-BnieRooB.cjs → Table-B2iOe4P0.cjs} +1 -1
- package/dist/{Table-dk0Au7Sd.js → Table-DHHVRPoA.js} +3 -3
- package/dist/{TableServer-B1QsOkJ2.js → TableServer-D4Q_9dET.js} +3 -3
- package/dist/{TableServer-CW6o1KQR.cjs → TableServer-k8aRa4f5.cjs} +1 -1
- package/dist/{cellRender-DGXXI6zI.cjs → cellRender-DuBdvYbh.cjs} +1 -1
- package/dist/{cellRender-n1kqNyoy.js → cellRender-LGC_k50e.js} +56 -56
- package/dist/{dataTables-BMvhNk0d.cjs → dataTables-DV00l1p8.cjs} +1 -1
- package/dist/{dataTables-RDdW6ocQ.js → dataTables-j8j4naMl.js} +100 -100
- package/dist/datatables.cjs +1 -1
- package/dist/datatables.js +1 -1
- package/dist/datatables2.css +1 -1
- package/dist/{index-Xn9pmgz0.js → index-BU9rb0Q-.js} +2 -2
- package/dist/index-BjbhnehN.js +4477 -0
- package/dist/index-CEe--P_C.cjs +1 -0
- package/dist/{index-CXga_1To.cjs → index-CU-Eak9-.cjs} +1 -1
- package/dist/index-CXUreMkK.cjs +1 -0
- package/dist/index-DzyBRRkM.js +30 -0
- package/dist/index-_cYryjRU.cjs +1 -0
- package/dist/index-zhSEiNN0.js +61 -0
- package/dist/useColumns-CCJ04VF-.cjs +1 -0
- package/dist/useColumns-Dfrb9p8A.js +1473 -0
- package/dist/useDownload-CL90ZIqP.cjs +1 -0
- package/dist/{Download-DhsPo8yJ.js → useDownload-DgATsbOV.js} +105 -132
- package/dist/useRefreshTable-BhEgI00Z.cjs +1 -0
- package/dist/useRefreshTable-Cf0gpIuT.js +18 -0
- package/package.json +8 -8
- package/dist/Columns-W_jSwaNc.cjs +0 -1
- package/dist/Columns-dl3eMPe2.js +0 -28
- package/dist/Download-kq1kmD5M.cjs +0 -1
- package/dist/Options-BNWiVRrF.cjs +0 -1
- package/dist/Options-DwiLD_hO.js +0 -82
- package/dist/RefreshTable-Cq6mrqWi.js +0 -26
- package/dist/RefreshTable-OLZf9tHE.cjs +0 -1
- package/dist/escapeKeyString-CngwDxKW.js +0 -17
- package/dist/escapeKeyString-nS7kXLwu.cjs +0 -1
- package/dist/index-DIHxM6eL.cjs +0 -1
- package/dist/index-Doqj_5F5.js +0 -5891
|
@@ -0,0 +1,4477 @@
|
|
|
1
|
+
import { ref as W, inject as _e, computed as I, toRef as B, shallowRef as J, watch as re, createVNode as f, normalizeStyle as xe, normalizeClass as oe, createElementVNode as b, mergeProps as L, withDirectives as He, vShow as Ct, Fragment as ce, toDisplayString as bt, mergeModels as Lt, useModel as Vt, createBlock as ke, openBlock as le, withCtx as Ie, createElementBlock as ze, renderList as Ht, unref as M, useId as je, provide as Ue, onScopeDispose as nt, nextTick as Ve, onBeforeMount as dn, onBeforeUnmount as vn, onMounted as Ye, cloneVNode as fn, watchEffect as Rt, toValue as mn, createTextVNode as vl, defineAsyncComponent as Te, resolveDynamicComponent as Oe, createCommentVNode as Re, isRef as pt, defineComponent as fl } from "vue";
|
|
2
|
+
import { defineStore as ml } from "pinia";
|
|
3
|
+
import { u as xt, m as Mt, P as gl, c as Me, a as gn, e as yn, r as hn, g as ie, p as G, b as yl, d as hl, f as kt, I as at, h as de, V as tl, i as Se, j as bl, k as Be, l as bn, n as pe, o as be, q as pn, s as Qe, t as zt, v as Ut, w as Ne, x as We, R as Je, y as Ze, z as Kt, A as It, B as jt, C as rt, D as kn, E as we, F as ll, G as pl, H as kl, J as Sl, K as Cl, L as Ae, M as Xe, N as Sn, O as Vl, Q as ct, S as Cn, T as Gt, U as dt, W as Wt, X as $e, Y as wt, Z as vt, _ as qt, $ as xl, a0 as Il, a1 as Jt, a2 as ft, a3 as wl, a4 as De, a5 as mt, a6 as ot, a7 as Ge, a8 as _l, a9 as Xt, aa as _t, ab as Pl, ac as Al, ad as Fl, ae as $t, af as Vn, ag as Dl, ah as xn, ai as In, aj as lt, ak as Tl, al as Bl, am as wn, an as nl, ao as gt, ap as _n, aq as El, ar as Pn, as as Ol, at as Rl, au as Yt, av as it, aw as An, ax as Le, ay as Ml, az as $l, aA as Nl, aB as St, aC as Fn, aD as Dn, aE as Tn, aF as Bn, aG as En, aH as al, aI as On, aJ as Rn, aK as Mn, aL as qe, aM as $n, aN as Nn, aO as Ln, aP as Hn } from "./dataTables-j8j4naMl.js";
|
|
4
|
+
import { useI18n as zn } from "vue-i18n";
|
|
5
|
+
import { createSharedComposable as Un, useResizeObserver as Kn } from "@vueuse/core";
|
|
6
|
+
const Pt = ml("datatables", () => {
|
|
7
|
+
const e = W([]), a = ({ table_id: u }) => {
|
|
8
|
+
const d = e.value.findIndex(
|
|
9
|
+
(r) => r.id === u
|
|
10
|
+
), o = {
|
|
11
|
+
search: {
|
|
12
|
+
query: ""
|
|
13
|
+
},
|
|
14
|
+
advancedFilters: {
|
|
15
|
+
query: {}
|
|
16
|
+
},
|
|
17
|
+
hardFilters: {
|
|
18
|
+
query: {}
|
|
19
|
+
},
|
|
20
|
+
options: {
|
|
21
|
+
hash: null,
|
|
22
|
+
columns: {},
|
|
23
|
+
state: {}
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
d !== -1 && e.value.splice(d, 1), e.value.push({ id: u, ...o });
|
|
27
|
+
}, t = async (u) => {
|
|
28
|
+
const o = new TextEncoder().encode(u), r = await crypto.subtle.digest("SHA-256", o);
|
|
29
|
+
return Array.from(new Uint8Array(r)).map((y) => y.toString(16).padStart(2, "0")).join("");
|
|
30
|
+
}, n = ({ table_id: u, headers: d }) => {
|
|
31
|
+
t(JSON.stringify(d ?? [])).then((o) => {
|
|
32
|
+
l({ table_id: u, name: "options", value: { hash: o } });
|
|
33
|
+
});
|
|
34
|
+
}, l = ({ table_id: u, name: d, value: o }) => {
|
|
35
|
+
e.value = e.value.map((r) => {
|
|
36
|
+
if (r.id === u && r.hasOwnProperty(d)) {
|
|
37
|
+
const m = r[d];
|
|
38
|
+
if (m && typeof o == "object")
|
|
39
|
+
for (const g in o)
|
|
40
|
+
g in m && (m[g] = o[g]);
|
|
41
|
+
}
|
|
42
|
+
return r;
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
return {
|
|
46
|
+
// Store Data
|
|
47
|
+
tables: e,
|
|
48
|
+
// Store Methods
|
|
49
|
+
addTable: a,
|
|
50
|
+
setData: l,
|
|
51
|
+
restoreData: ({ table_id: u, data: d }) => {
|
|
52
|
+
e.value = e.value.map((o) => (o.id === u && (o = d), o));
|
|
53
|
+
},
|
|
54
|
+
getCurrentTable: (u) => e.value.find((d) => d.id === u),
|
|
55
|
+
// Hash
|
|
56
|
+
hashString: t,
|
|
57
|
+
setTableHash: n
|
|
58
|
+
};
|
|
59
|
+
});
|
|
60
|
+
function At() {
|
|
61
|
+
const { setData: e, getCurrentTable: a } = Pt(), t = _e("table_props"), n = I(() => a(t.id)), l = I(() => n.value.search?.query), i = I(() => {
|
|
62
|
+
if (!t?.headers.length) return null;
|
|
63
|
+
const d = n.value.options?.columns.selected ?? [];
|
|
64
|
+
return (n.value.options?.columns.sorted ?? []).filter((m) => d.includes(m)).map(
|
|
65
|
+
(m) => t.headers.find((g) => g.key === m)
|
|
66
|
+
);
|
|
67
|
+
}), c = I(() => n.value.hardFilters?.query), s = I(() => n.value.advancedFilters?.query);
|
|
68
|
+
return {
|
|
69
|
+
tableState: n,
|
|
70
|
+
searchState: l,
|
|
71
|
+
advancedFiltersState: s,
|
|
72
|
+
hardFiltersState: c,
|
|
73
|
+
headersState: i,
|
|
74
|
+
saveTableOptions: (d) => {
|
|
75
|
+
e({
|
|
76
|
+
table_id: t.id,
|
|
77
|
+
name: "options",
|
|
78
|
+
value: {
|
|
79
|
+
state: d
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
const jn = /* @__PURE__ */ Symbol.for("vuetify:goto");
|
|
86
|
+
function Gn() {
|
|
87
|
+
return {
|
|
88
|
+
container: void 0,
|
|
89
|
+
duration: 300,
|
|
90
|
+
layout: !1,
|
|
91
|
+
offset: 0,
|
|
92
|
+
easing: "easeInOutCubic",
|
|
93
|
+
patterns: yn
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
function Wn(e) {
|
|
97
|
+
return Qt(e) ?? (document.scrollingElement || document.body);
|
|
98
|
+
}
|
|
99
|
+
function Qt(e) {
|
|
100
|
+
return typeof e == "string" ? document.querySelector(e) : hn(e);
|
|
101
|
+
}
|
|
102
|
+
function Bt(e, a, t) {
|
|
103
|
+
if (typeof e == "number") return a && t ? -e : e;
|
|
104
|
+
let n = Qt(e), l = 0;
|
|
105
|
+
for (; n; )
|
|
106
|
+
l += a ? n.offsetLeft : n.offsetTop, n = n.offsetParent;
|
|
107
|
+
return l;
|
|
108
|
+
}
|
|
109
|
+
async function ol(e, a, t, n) {
|
|
110
|
+
const l = t ? "scrollLeft" : "scrollTop", i = Mt(n?.options ?? Gn(), a), c = n?.rtl.value, s = (typeof e == "number" ? e : Qt(e)) ?? 0, u = i.container === "parent" && s instanceof HTMLElement ? s.parentElement : Wn(i.container), d = gl() ? i.patterns.instant : typeof i.easing == "function" ? i.easing : i.patterns[i.easing];
|
|
111
|
+
if (!d) throw new TypeError(`Easing function "${i.easing}" not found.`);
|
|
112
|
+
let o;
|
|
113
|
+
if (typeof s == "number")
|
|
114
|
+
o = Bt(s, t, c);
|
|
115
|
+
else if (o = Bt(s, t, c) - Bt(u, t, c), i.layout) {
|
|
116
|
+
const y = window.getComputedStyle(s).getPropertyValue("--v-layout-top");
|
|
117
|
+
y && (o -= parseInt(y, 10));
|
|
118
|
+
}
|
|
119
|
+
o += i.offset, o = Jn(u, o, !!c, !!t);
|
|
120
|
+
const r = u[l] ?? 0;
|
|
121
|
+
if (o === r) return Promise.resolve(o);
|
|
122
|
+
const m = performance.now();
|
|
123
|
+
return new Promise((g) => requestAnimationFrame(function y(h) {
|
|
124
|
+
const _ = (h - m) / i.duration, C = Math.floor(r + (o - r) * d(Me(_, 0, 1)));
|
|
125
|
+
if (u[l] = C, _ >= 1 && Math.abs(C - u[l]) < 10)
|
|
126
|
+
return g(o);
|
|
127
|
+
if (_ > 2)
|
|
128
|
+
return gn("Scroll target is not reachable"), g(u[l]);
|
|
129
|
+
requestAnimationFrame(y);
|
|
130
|
+
}));
|
|
131
|
+
}
|
|
132
|
+
function qn() {
|
|
133
|
+
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
134
|
+
const a = _e(jn), {
|
|
135
|
+
isRtl: t
|
|
136
|
+
} = xt();
|
|
137
|
+
if (!a) throw new Error("[Vuetify] Could not find injected goto instance");
|
|
138
|
+
const n = {
|
|
139
|
+
...a,
|
|
140
|
+
// can be set via VLocaleProvider
|
|
141
|
+
rtl: B(() => a.rtl.value || t.value)
|
|
142
|
+
};
|
|
143
|
+
async function l(i, c) {
|
|
144
|
+
return ol(i, Mt(e, c), !1, n);
|
|
145
|
+
}
|
|
146
|
+
return l.horizontal = async (i, c) => ol(i, Mt(e, c), !0, n), l;
|
|
147
|
+
}
|
|
148
|
+
function Jn(e, a, t, n) {
|
|
149
|
+
const {
|
|
150
|
+
scrollWidth: l,
|
|
151
|
+
scrollHeight: i
|
|
152
|
+
} = e, [c, s] = e === document.scrollingElement ? [window.innerWidth, window.innerHeight] : [e.offsetWidth, e.offsetHeight];
|
|
153
|
+
let u, d;
|
|
154
|
+
return n ? t ? (u = -(l - c), d = 0) : (u = 0, d = l - c) : (u = 0, d = i + -s), Me(a, u, d);
|
|
155
|
+
}
|
|
156
|
+
function Xn(e) {
|
|
157
|
+
let {
|
|
158
|
+
selectedElement: a,
|
|
159
|
+
containerElement: t,
|
|
160
|
+
isRtl: n,
|
|
161
|
+
isHorizontal: l
|
|
162
|
+
} = e;
|
|
163
|
+
const i = ut(l, t), c = Ll(l, n, t), s = ut(l, a), u = Hl(l, a), d = s * 0.4;
|
|
164
|
+
return c > u ? u - d : c + i < u + s ? u - i + s + d : c;
|
|
165
|
+
}
|
|
166
|
+
function Yn(e) {
|
|
167
|
+
let {
|
|
168
|
+
selectedElement: a,
|
|
169
|
+
containerElement: t,
|
|
170
|
+
isHorizontal: n
|
|
171
|
+
} = e;
|
|
172
|
+
const l = ut(n, t), i = Hl(n, a), c = ut(n, a);
|
|
173
|
+
return i - l / 2 + c / 2;
|
|
174
|
+
}
|
|
175
|
+
function il(e, a) {
|
|
176
|
+
return a?.[e ? "scrollWidth" : "scrollHeight"] || 0;
|
|
177
|
+
}
|
|
178
|
+
function Qn(e, a) {
|
|
179
|
+
return a?.[e ? "clientWidth" : "clientHeight"] || 0;
|
|
180
|
+
}
|
|
181
|
+
function Ll(e, a, t) {
|
|
182
|
+
if (!t)
|
|
183
|
+
return 0;
|
|
184
|
+
const {
|
|
185
|
+
scrollLeft: n,
|
|
186
|
+
offsetWidth: l,
|
|
187
|
+
scrollWidth: i
|
|
188
|
+
} = t;
|
|
189
|
+
return e ? a ? i - l + n : n : t.scrollTop;
|
|
190
|
+
}
|
|
191
|
+
function ut(e, a) {
|
|
192
|
+
return a?.[e ? "offsetWidth" : "offsetHeight"] || 0;
|
|
193
|
+
}
|
|
194
|
+
function Hl(e, a) {
|
|
195
|
+
return a?.[e ? "offsetLeft" : "offsetTop"] || 0;
|
|
196
|
+
}
|
|
197
|
+
const zl = /* @__PURE__ */ Symbol.for("vuetify:v-slide-group"), Ul = G({
|
|
198
|
+
centerActive: Boolean,
|
|
199
|
+
scrollToActive: {
|
|
200
|
+
type: Boolean,
|
|
201
|
+
default: !0
|
|
202
|
+
},
|
|
203
|
+
contentClass: null,
|
|
204
|
+
direction: {
|
|
205
|
+
type: String,
|
|
206
|
+
default: "horizontal"
|
|
207
|
+
},
|
|
208
|
+
symbol: {
|
|
209
|
+
type: null,
|
|
210
|
+
default: zl
|
|
211
|
+
},
|
|
212
|
+
nextIcon: {
|
|
213
|
+
type: be,
|
|
214
|
+
default: "$next"
|
|
215
|
+
},
|
|
216
|
+
prevIcon: {
|
|
217
|
+
type: be,
|
|
218
|
+
default: "$prev"
|
|
219
|
+
},
|
|
220
|
+
showArrows: {
|
|
221
|
+
type: [Boolean, String],
|
|
222
|
+
validator: (e) => typeof e == "boolean" || ["always", "desktop", "mobile", "never"].includes(e)
|
|
223
|
+
},
|
|
224
|
+
...pe(),
|
|
225
|
+
...bn({
|
|
226
|
+
mobile: null
|
|
227
|
+
}),
|
|
228
|
+
...Be(),
|
|
229
|
+
...bl({
|
|
230
|
+
selectedClass: "v-slide-group-item--active"
|
|
231
|
+
})
|
|
232
|
+
}, "VSlideGroup"), ul = ie()({
|
|
233
|
+
name: "VSlideGroup",
|
|
234
|
+
props: Ul(),
|
|
235
|
+
emits: {
|
|
236
|
+
"update:modelValue": (e) => !0
|
|
237
|
+
},
|
|
238
|
+
setup(e, a) {
|
|
239
|
+
let {
|
|
240
|
+
slots: t
|
|
241
|
+
} = a;
|
|
242
|
+
const {
|
|
243
|
+
isRtl: n
|
|
244
|
+
} = xt(), {
|
|
245
|
+
displayClasses: l,
|
|
246
|
+
mobile: i
|
|
247
|
+
} = yl(e), c = hl(e, e.symbol), s = J(!1), u = J(0), d = J(0), o = J(0), r = I(() => e.direction === "horizontal"), {
|
|
248
|
+
resizeRef: m,
|
|
249
|
+
contentRect: g
|
|
250
|
+
} = kt(), {
|
|
251
|
+
resizeRef: y,
|
|
252
|
+
contentRect: h
|
|
253
|
+
} = kt(), x = qn(), _ = I(() => ({
|
|
254
|
+
container: m.el,
|
|
255
|
+
duration: 200,
|
|
256
|
+
easing: "easeOutQuart"
|
|
257
|
+
})), C = I(() => c.selected.value.length ? c.items.value.findIndex((w) => w.id === c.selected.value[0]) : -1), k = I(() => c.selected.value.length ? c.items.value.findIndex((w) => w.id === c.selected.value[c.selected.value.length - 1]) : -1);
|
|
258
|
+
if (at) {
|
|
259
|
+
let w = -1;
|
|
260
|
+
re(() => [c.selected.value, g.value, h.value, r.value], () => {
|
|
261
|
+
cancelAnimationFrame(w), w = requestAnimationFrame(() => {
|
|
262
|
+
if (g.value && h.value) {
|
|
263
|
+
const v = r.value ? "width" : "height";
|
|
264
|
+
d.value = g.value[v], o.value = h.value[v], s.value = d.value + 1 < o.value;
|
|
265
|
+
}
|
|
266
|
+
if (e.scrollToActive && C.value >= 0 && y.el) {
|
|
267
|
+
const v = y.el.children[k.value];
|
|
268
|
+
F(v, e.centerActive);
|
|
269
|
+
}
|
|
270
|
+
});
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
const T = J(!1);
|
|
274
|
+
function F(w, v) {
|
|
275
|
+
let P = 0;
|
|
276
|
+
v ? P = Yn({
|
|
277
|
+
containerElement: m.el,
|
|
278
|
+
isHorizontal: r.value,
|
|
279
|
+
selectedElement: w
|
|
280
|
+
}) : P = Xn({
|
|
281
|
+
containerElement: m.el,
|
|
282
|
+
isHorizontal: r.value,
|
|
283
|
+
isRtl: n.value,
|
|
284
|
+
selectedElement: w
|
|
285
|
+
}), H(P);
|
|
286
|
+
}
|
|
287
|
+
function H(w) {
|
|
288
|
+
if (!at || !m.el) return;
|
|
289
|
+
const v = ut(r.value, m.el), P = Ll(r.value, n.value, m.el);
|
|
290
|
+
if (!(il(r.value, m.el) <= v || // Prevent scrolling by only a couple of pixels, which doesn't look smooth
|
|
291
|
+
Math.abs(w - P) < 16)) {
|
|
292
|
+
if (r.value && n.value && m.el) {
|
|
293
|
+
const {
|
|
294
|
+
scrollWidth: O,
|
|
295
|
+
offsetWidth: j
|
|
296
|
+
} = m.el;
|
|
297
|
+
w = O - j - w;
|
|
298
|
+
}
|
|
299
|
+
r.value ? x.horizontal(w, _.value) : x(w, _.value);
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
function A(w) {
|
|
303
|
+
const {
|
|
304
|
+
scrollTop: v,
|
|
305
|
+
scrollLeft: P
|
|
306
|
+
} = w.target;
|
|
307
|
+
u.value = r.value ? P : v;
|
|
308
|
+
}
|
|
309
|
+
function p(w) {
|
|
310
|
+
if (T.value = !0, !(!s.value || !y.el)) {
|
|
311
|
+
for (const v of w.composedPath())
|
|
312
|
+
for (const P of y.el.children)
|
|
313
|
+
if (P === v) {
|
|
314
|
+
F(P);
|
|
315
|
+
return;
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
function R(w) {
|
|
320
|
+
T.value = !1;
|
|
321
|
+
}
|
|
322
|
+
let E = !1;
|
|
323
|
+
function q(w) {
|
|
324
|
+
!E && !T.value && !(w.relatedTarget && y.el?.contains(w.relatedTarget)) && K(), E = !1;
|
|
325
|
+
}
|
|
326
|
+
function te() {
|
|
327
|
+
E = !0;
|
|
328
|
+
}
|
|
329
|
+
function ee(w) {
|
|
330
|
+
if (!y.el) return;
|
|
331
|
+
function v(P) {
|
|
332
|
+
w.preventDefault(), K(P);
|
|
333
|
+
}
|
|
334
|
+
r.value ? w.key === "ArrowRight" ? v(n.value ? "prev" : "next") : w.key === "ArrowLeft" && v(n.value ? "next" : "prev") : w.key === "ArrowDown" ? v("next") : w.key === "ArrowUp" && v("prev"), w.key === "Home" ? v("first") : w.key === "End" && v("last");
|
|
335
|
+
}
|
|
336
|
+
function U(w, v) {
|
|
337
|
+
if (!w) return;
|
|
338
|
+
let P = w;
|
|
339
|
+
do
|
|
340
|
+
P = P?.[v === "next" ? "nextElementSibling" : "previousElementSibling"];
|
|
341
|
+
while (P?.hasAttribute("disabled"));
|
|
342
|
+
return P;
|
|
343
|
+
}
|
|
344
|
+
function K(w) {
|
|
345
|
+
if (!y.el) return;
|
|
346
|
+
let v;
|
|
347
|
+
if (!w)
|
|
348
|
+
v = pn(y.el)[0];
|
|
349
|
+
else if (w === "next") {
|
|
350
|
+
if (v = U(y.el.querySelector(":focus"), w), !v) return K("first");
|
|
351
|
+
} else if (w === "prev") {
|
|
352
|
+
if (v = U(y.el.querySelector(":focus"), w), !v) return K("last");
|
|
353
|
+
} else w === "first" ? (v = y.el.firstElementChild, v?.hasAttribute("disabled") && (v = U(v, "next"))) : w === "last" && (v = y.el.lastElementChild, v?.hasAttribute("disabled") && (v = U(v, "prev")));
|
|
354
|
+
v && v.focus({
|
|
355
|
+
preventScroll: !0
|
|
356
|
+
});
|
|
357
|
+
}
|
|
358
|
+
function Z(w) {
|
|
359
|
+
const v = r.value && n.value ? -1 : 1, P = (w === "prev" ? -v : v) * d.value;
|
|
360
|
+
let V = u.value + P;
|
|
361
|
+
if (r.value && n.value && m.el) {
|
|
362
|
+
const {
|
|
363
|
+
scrollWidth: O,
|
|
364
|
+
offsetWidth: j
|
|
365
|
+
} = m.el;
|
|
366
|
+
V += O - j;
|
|
367
|
+
}
|
|
368
|
+
H(V);
|
|
369
|
+
}
|
|
370
|
+
const N = I(() => ({
|
|
371
|
+
next: c.next,
|
|
372
|
+
prev: c.prev,
|
|
373
|
+
select: c.select,
|
|
374
|
+
isSelected: c.isSelected
|
|
375
|
+
})), ne = I(() => s.value || Math.abs(u.value) > 0), ue = I(() => {
|
|
376
|
+
switch (e.showArrows) {
|
|
377
|
+
case "never":
|
|
378
|
+
return !1;
|
|
379
|
+
// Always show arrows on desktop & mobile
|
|
380
|
+
case "always":
|
|
381
|
+
return !0;
|
|
382
|
+
// Always show arrows on desktop
|
|
383
|
+
case "desktop":
|
|
384
|
+
return !i.value;
|
|
385
|
+
// Show arrows on mobile when overflowing.
|
|
386
|
+
// This matches the default 2.2 behavior
|
|
387
|
+
case !0:
|
|
388
|
+
return ne.value;
|
|
389
|
+
// Always show on mobile
|
|
390
|
+
case "mobile":
|
|
391
|
+
return i.value || ne.value;
|
|
392
|
+
// https://material.io/components/tabs#scrollable-tabs
|
|
393
|
+
// Always show arrows when
|
|
394
|
+
// overflowed on desktop
|
|
395
|
+
default:
|
|
396
|
+
return !i.value && ne.value;
|
|
397
|
+
}
|
|
398
|
+
}), D = I(() => Math.abs(u.value) > 1), $ = I(() => {
|
|
399
|
+
if (!m.value || !ne.value) return !1;
|
|
400
|
+
const w = il(r.value, m.el), v = Qn(r.value, m.el);
|
|
401
|
+
return w - v - Math.abs(u.value) > 1;
|
|
402
|
+
});
|
|
403
|
+
return de(() => f(e.tag, {
|
|
404
|
+
class: oe(["v-slide-group", {
|
|
405
|
+
"v-slide-group--vertical": !r.value,
|
|
406
|
+
"v-slide-group--has-affixes": ue.value,
|
|
407
|
+
"v-slide-group--is-overflowing": s.value
|
|
408
|
+
}, l.value, e.class]),
|
|
409
|
+
style: xe(e.style),
|
|
410
|
+
tabindex: T.value || c.selected.value.length ? -1 : 0,
|
|
411
|
+
onFocus: q
|
|
412
|
+
}, {
|
|
413
|
+
default: () => [ue.value && b("div", {
|
|
414
|
+
key: "prev",
|
|
415
|
+
class: oe(["v-slide-group__prev", {
|
|
416
|
+
"v-slide-group__prev--disabled": !D.value
|
|
417
|
+
}]),
|
|
418
|
+
onMousedown: te,
|
|
419
|
+
onClick: () => D.value && Z("prev")
|
|
420
|
+
}, [t.prev?.(N.value) ?? f(tl, null, {
|
|
421
|
+
default: () => [f(Se, {
|
|
422
|
+
icon: n.value ? e.nextIcon : e.prevIcon
|
|
423
|
+
}, null)]
|
|
424
|
+
})]), b("div", {
|
|
425
|
+
key: "container",
|
|
426
|
+
ref: m,
|
|
427
|
+
class: oe(["v-slide-group__container", e.contentClass]),
|
|
428
|
+
onScroll: A
|
|
429
|
+
}, [b("div", {
|
|
430
|
+
ref: y,
|
|
431
|
+
class: "v-slide-group__content",
|
|
432
|
+
onFocusin: p,
|
|
433
|
+
onFocusout: R,
|
|
434
|
+
onKeydown: ee
|
|
435
|
+
}, [t.default?.(N.value)])]), ue.value && b("div", {
|
|
436
|
+
key: "next",
|
|
437
|
+
class: oe(["v-slide-group__next", {
|
|
438
|
+
"v-slide-group__next--disabled": !$.value
|
|
439
|
+
}]),
|
|
440
|
+
onMousedown: te,
|
|
441
|
+
onClick: () => $.value && Z("next")
|
|
442
|
+
}, [t.next?.(N.value) ?? f(tl, null, {
|
|
443
|
+
default: () => [f(Se, {
|
|
444
|
+
icon: n.value ? e.prevIcon : e.nextIcon
|
|
445
|
+
}, null)]
|
|
446
|
+
})])]
|
|
447
|
+
})), {
|
|
448
|
+
selected: c.selected,
|
|
449
|
+
scrollTo: Z,
|
|
450
|
+
scrollOffset: u,
|
|
451
|
+
focus: K,
|
|
452
|
+
hasPrev: D,
|
|
453
|
+
hasNext: $
|
|
454
|
+
};
|
|
455
|
+
}
|
|
456
|
+
}), Kl = /* @__PURE__ */ Symbol.for("vuetify:v-chip-group"), Zn = G({
|
|
457
|
+
baseColor: String,
|
|
458
|
+
column: Boolean,
|
|
459
|
+
filter: Boolean,
|
|
460
|
+
valueComparator: {
|
|
461
|
+
type: Function,
|
|
462
|
+
default: We
|
|
463
|
+
},
|
|
464
|
+
...Ul({
|
|
465
|
+
scrollToActive: !1
|
|
466
|
+
}),
|
|
467
|
+
...pe(),
|
|
468
|
+
...bl({
|
|
469
|
+
selectedClass: "v-chip--selected"
|
|
470
|
+
}),
|
|
471
|
+
...Be(),
|
|
472
|
+
...Ne(),
|
|
473
|
+
...Ut({
|
|
474
|
+
variant: "tonal"
|
|
475
|
+
})
|
|
476
|
+
}, "VChipGroup"), ea = ie()({
|
|
477
|
+
name: "VChipGroup",
|
|
478
|
+
props: Zn(),
|
|
479
|
+
emits: {
|
|
480
|
+
"update:modelValue": (e) => !0
|
|
481
|
+
},
|
|
482
|
+
setup(e, a) {
|
|
483
|
+
let {
|
|
484
|
+
slots: t
|
|
485
|
+
} = a;
|
|
486
|
+
const {
|
|
487
|
+
themeClasses: n
|
|
488
|
+
} = Qe(e), {
|
|
489
|
+
isSelected: l,
|
|
490
|
+
select: i,
|
|
491
|
+
next: c,
|
|
492
|
+
prev: s,
|
|
493
|
+
selected: u
|
|
494
|
+
} = hl(e, Kl);
|
|
495
|
+
return zt({
|
|
496
|
+
VChip: {
|
|
497
|
+
baseColor: B(() => e.baseColor),
|
|
498
|
+
color: B(() => e.color),
|
|
499
|
+
disabled: B(() => e.disabled),
|
|
500
|
+
filter: B(() => e.filter),
|
|
501
|
+
variant: B(() => e.variant)
|
|
502
|
+
}
|
|
503
|
+
}), de(() => {
|
|
504
|
+
const d = ul.filterProps(e);
|
|
505
|
+
return f(ul, L(d, {
|
|
506
|
+
class: ["v-chip-group", {
|
|
507
|
+
"v-chip-group--column": e.column
|
|
508
|
+
}, n.value, e.class],
|
|
509
|
+
style: e.style
|
|
510
|
+
}), {
|
|
511
|
+
default: () => [t.default?.({
|
|
512
|
+
isSelected: l,
|
|
513
|
+
select: i,
|
|
514
|
+
next: c,
|
|
515
|
+
prev: s,
|
|
516
|
+
selected: u.value
|
|
517
|
+
})]
|
|
518
|
+
});
|
|
519
|
+
}), {};
|
|
520
|
+
}
|
|
521
|
+
}), ta = G({
|
|
522
|
+
activeClass: String,
|
|
523
|
+
appendAvatar: String,
|
|
524
|
+
appendIcon: be,
|
|
525
|
+
baseColor: String,
|
|
526
|
+
closable: Boolean,
|
|
527
|
+
closeIcon: {
|
|
528
|
+
type: be,
|
|
529
|
+
default: "$delete"
|
|
530
|
+
},
|
|
531
|
+
closeLabel: {
|
|
532
|
+
type: String,
|
|
533
|
+
default: "$vuetify.close"
|
|
534
|
+
},
|
|
535
|
+
draggable: Boolean,
|
|
536
|
+
filter: Boolean,
|
|
537
|
+
filterIcon: {
|
|
538
|
+
type: be,
|
|
539
|
+
default: "$complete"
|
|
540
|
+
},
|
|
541
|
+
label: Boolean,
|
|
542
|
+
link: {
|
|
543
|
+
type: Boolean,
|
|
544
|
+
default: void 0
|
|
545
|
+
},
|
|
546
|
+
pill: Boolean,
|
|
547
|
+
prependAvatar: String,
|
|
548
|
+
prependIcon: be,
|
|
549
|
+
ripple: {
|
|
550
|
+
type: [Boolean, Object],
|
|
551
|
+
default: !0
|
|
552
|
+
},
|
|
553
|
+
text: {
|
|
554
|
+
type: [String, Number, Boolean],
|
|
555
|
+
default: void 0
|
|
556
|
+
},
|
|
557
|
+
modelValue: {
|
|
558
|
+
type: Boolean,
|
|
559
|
+
default: !0
|
|
560
|
+
},
|
|
561
|
+
onClick: $e(),
|
|
562
|
+
onClickOnce: $e(),
|
|
563
|
+
...Wt(),
|
|
564
|
+
...pe(),
|
|
565
|
+
...dt(),
|
|
566
|
+
...Gt(),
|
|
567
|
+
...Cn(),
|
|
568
|
+
...ct(),
|
|
569
|
+
...Vl(),
|
|
570
|
+
...Sn(),
|
|
571
|
+
...Be({
|
|
572
|
+
tag: "span"
|
|
573
|
+
}),
|
|
574
|
+
...Ne(),
|
|
575
|
+
...Ut({
|
|
576
|
+
variant: "tonal"
|
|
577
|
+
})
|
|
578
|
+
}, "VChip"), st = ie()({
|
|
579
|
+
name: "VChip",
|
|
580
|
+
directives: {
|
|
581
|
+
vRipple: Je
|
|
582
|
+
},
|
|
583
|
+
props: ta(),
|
|
584
|
+
emits: {
|
|
585
|
+
"click:close": (e) => !0,
|
|
586
|
+
"update:modelValue": (e) => !0,
|
|
587
|
+
"group:selected": (e) => !0,
|
|
588
|
+
click: (e) => !0
|
|
589
|
+
},
|
|
590
|
+
setup(e, a) {
|
|
591
|
+
let {
|
|
592
|
+
attrs: t,
|
|
593
|
+
emit: n,
|
|
594
|
+
slots: l
|
|
595
|
+
} = a;
|
|
596
|
+
const {
|
|
597
|
+
t: i
|
|
598
|
+
} = Ze(), {
|
|
599
|
+
borderClasses: c
|
|
600
|
+
} = Kt(e), {
|
|
601
|
+
densityClasses: s
|
|
602
|
+
} = It(e), {
|
|
603
|
+
elevationClasses: u
|
|
604
|
+
} = jt(e), {
|
|
605
|
+
roundedClasses: d
|
|
606
|
+
} = rt(e), {
|
|
607
|
+
sizeClasses: o
|
|
608
|
+
} = kn(e), {
|
|
609
|
+
themeClasses: r
|
|
610
|
+
} = Qe(e), m = we(e, "modelValue"), g = ll(e, Kl, !1), y = ll(e, zl, !1), h = pl(e, t), x = B(() => e.link !== !1 && h.isLink.value), _ = I(() => !e.disabled && e.link !== !1 && (!!g || e.link || h.isClickable.value)), C = B(() => ({
|
|
611
|
+
"aria-label": i(e.closeLabel),
|
|
612
|
+
disabled: e.disabled,
|
|
613
|
+
onClick(p) {
|
|
614
|
+
p.preventDefault(), p.stopPropagation(), m.value = !1, n("click:close", p);
|
|
615
|
+
}
|
|
616
|
+
}));
|
|
617
|
+
re(m, (p) => {
|
|
618
|
+
p ? (g?.register(), y?.register()) : (g?.unregister(), y?.unregister());
|
|
619
|
+
});
|
|
620
|
+
const {
|
|
621
|
+
colorClasses: k,
|
|
622
|
+
colorStyles: T,
|
|
623
|
+
variantClasses: F
|
|
624
|
+
} = kl(() => ({
|
|
625
|
+
color: !g || g.isSelected.value ? e.color ?? e.baseColor : e.baseColor,
|
|
626
|
+
variant: e.variant
|
|
627
|
+
}));
|
|
628
|
+
function H(p) {
|
|
629
|
+
n("click", p), _.value && (h.navigate?.(p), g?.toggle());
|
|
630
|
+
}
|
|
631
|
+
function A(p) {
|
|
632
|
+
(p.key === "Enter" || p.key === " ") && (p.preventDefault(), H(p));
|
|
633
|
+
}
|
|
634
|
+
return () => {
|
|
635
|
+
const p = h.isLink.value ? "a" : e.tag, R = !!(e.appendIcon || e.appendAvatar), E = !!(R || l.append), q = !!(l.close || e.closable), te = !!(l.filter || e.filter) && g, ee = !!(e.prependIcon || e.prependAvatar), U = !!(ee || l.prepend);
|
|
636
|
+
return m.value && He(f(p, L(h.linkProps, {
|
|
637
|
+
class: ["v-chip", {
|
|
638
|
+
"v-chip--disabled": e.disabled,
|
|
639
|
+
"v-chip--label": e.label,
|
|
640
|
+
"v-chip--link": _.value,
|
|
641
|
+
"v-chip--filter": te,
|
|
642
|
+
"v-chip--pill": e.pill,
|
|
643
|
+
[`${e.activeClass}`]: e.activeClass && h.isActive?.value
|
|
644
|
+
}, r.value, c.value, k.value, s.value, u.value, d.value, o.value, F.value, g?.selectedClass.value, e.class],
|
|
645
|
+
style: [T.value, e.style],
|
|
646
|
+
disabled: e.disabled || void 0,
|
|
647
|
+
draggable: e.draggable,
|
|
648
|
+
tabindex: _.value ? 0 : void 0,
|
|
649
|
+
onClick: H,
|
|
650
|
+
onKeydown: _.value && !x.value && A
|
|
651
|
+
}), {
|
|
652
|
+
default: () => [Sl(_.value, "v-chip"), te && f(Cl, {
|
|
653
|
+
key: "filter"
|
|
654
|
+
}, {
|
|
655
|
+
default: () => [He(b("div", {
|
|
656
|
+
class: "v-chip__filter"
|
|
657
|
+
}, [l.filter ? f(Ae, {
|
|
658
|
+
key: "filter-defaults",
|
|
659
|
+
disabled: !e.filterIcon,
|
|
660
|
+
defaults: {
|
|
661
|
+
VIcon: {
|
|
662
|
+
icon: e.filterIcon
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
}, l.filter) : f(Se, {
|
|
666
|
+
key: "filter-icon",
|
|
667
|
+
icon: e.filterIcon
|
|
668
|
+
}, null)]), [[Ct, g.isSelected.value]])]
|
|
669
|
+
}), U && b("div", {
|
|
670
|
+
key: "prepend",
|
|
671
|
+
class: "v-chip__prepend"
|
|
672
|
+
}, [l.prepend ? f(Ae, {
|
|
673
|
+
key: "prepend-defaults",
|
|
674
|
+
disabled: !ee,
|
|
675
|
+
defaults: {
|
|
676
|
+
VAvatar: {
|
|
677
|
+
image: e.prependAvatar,
|
|
678
|
+
start: !0
|
|
679
|
+
},
|
|
680
|
+
VIcon: {
|
|
681
|
+
icon: e.prependIcon,
|
|
682
|
+
start: !0
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
}, l.prepend) : b(ce, null, [e.prependIcon && f(Se, {
|
|
686
|
+
key: "prepend-icon",
|
|
687
|
+
icon: e.prependIcon,
|
|
688
|
+
start: !0
|
|
689
|
+
}, null), e.prependAvatar && f(Xe, {
|
|
690
|
+
key: "prepend-avatar",
|
|
691
|
+
image: e.prependAvatar,
|
|
692
|
+
start: !0
|
|
693
|
+
}, null)])]), b("div", {
|
|
694
|
+
class: "v-chip__content",
|
|
695
|
+
"data-no-activator": ""
|
|
696
|
+
}, [l.default?.({
|
|
697
|
+
isSelected: g?.isSelected.value,
|
|
698
|
+
selectedClass: g?.selectedClass.value,
|
|
699
|
+
select: g?.select,
|
|
700
|
+
toggle: g?.toggle,
|
|
701
|
+
value: g?.value.value,
|
|
702
|
+
disabled: e.disabled
|
|
703
|
+
}) ?? bt(e.text)]), E && b("div", {
|
|
704
|
+
key: "append",
|
|
705
|
+
class: "v-chip__append"
|
|
706
|
+
}, [l.append ? f(Ae, {
|
|
707
|
+
key: "append-defaults",
|
|
708
|
+
disabled: !R,
|
|
709
|
+
defaults: {
|
|
710
|
+
VAvatar: {
|
|
711
|
+
end: !0,
|
|
712
|
+
image: e.appendAvatar
|
|
713
|
+
},
|
|
714
|
+
VIcon: {
|
|
715
|
+
end: !0,
|
|
716
|
+
icon: e.appendIcon
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
}, l.append) : b(ce, null, [e.appendIcon && f(Se, {
|
|
720
|
+
key: "append-icon",
|
|
721
|
+
end: !0,
|
|
722
|
+
icon: e.appendIcon
|
|
723
|
+
}, null), e.appendAvatar && f(Xe, {
|
|
724
|
+
key: "append-avatar",
|
|
725
|
+
end: !0,
|
|
726
|
+
image: e.appendAvatar
|
|
727
|
+
}, null)])]), q && b("button", L({
|
|
728
|
+
key: "close",
|
|
729
|
+
class: "v-chip__close",
|
|
730
|
+
type: "button",
|
|
731
|
+
"data-testid": "close-chip"
|
|
732
|
+
}, C.value), [l.close ? f(Ae, {
|
|
733
|
+
key: "close-defaults",
|
|
734
|
+
defaults: {
|
|
735
|
+
VIcon: {
|
|
736
|
+
icon: e.closeIcon,
|
|
737
|
+
size: "x-small"
|
|
738
|
+
}
|
|
739
|
+
}
|
|
740
|
+
}, l.close) : f(Se, {
|
|
741
|
+
key: "close-icon",
|
|
742
|
+
icon: e.closeIcon,
|
|
743
|
+
size: "x-small"
|
|
744
|
+
}, null)])]
|
|
745
|
+
}), [[Je, _.value && e.ripple, null]]);
|
|
746
|
+
};
|
|
747
|
+
}
|
|
748
|
+
}), la = G({
|
|
749
|
+
color: String,
|
|
750
|
+
...Wt(),
|
|
751
|
+
...pe(),
|
|
752
|
+
...ft(),
|
|
753
|
+
...Gt(),
|
|
754
|
+
...Jt(),
|
|
755
|
+
...Il(),
|
|
756
|
+
...ct(),
|
|
757
|
+
...Be(),
|
|
758
|
+
...Ne()
|
|
759
|
+
}, "VSheet"), na = ie()({
|
|
760
|
+
name: "VSheet",
|
|
761
|
+
props: la(),
|
|
762
|
+
setup(e, a) {
|
|
763
|
+
let {
|
|
764
|
+
slots: t
|
|
765
|
+
} = a;
|
|
766
|
+
const {
|
|
767
|
+
themeClasses: n
|
|
768
|
+
} = Qe(e), {
|
|
769
|
+
backgroundColorClasses: l,
|
|
770
|
+
backgroundColorStyles: i
|
|
771
|
+
} = wt(() => e.color), {
|
|
772
|
+
borderClasses: c
|
|
773
|
+
} = Kt(e), {
|
|
774
|
+
dimensionStyles: s
|
|
775
|
+
} = vt(e), {
|
|
776
|
+
elevationClasses: u
|
|
777
|
+
} = jt(e), {
|
|
778
|
+
locationStyles: d
|
|
779
|
+
} = qt(e), {
|
|
780
|
+
positionClasses: o
|
|
781
|
+
} = xl(e), {
|
|
782
|
+
roundedClasses: r
|
|
783
|
+
} = rt(e);
|
|
784
|
+
return de(() => f(e.tag, {
|
|
785
|
+
class: oe(["v-sheet", n.value, l.value, c.value, u.value, o.value, r.value, e.class]),
|
|
786
|
+
style: xe([i.value, s.value, d.value, e.style])
|
|
787
|
+
}, t)), {};
|
|
788
|
+
}
|
|
789
|
+
}), aa = {
|
|
790
|
+
__name: "Selected",
|
|
791
|
+
props: {
|
|
792
|
+
modelValue: {},
|
|
793
|
+
modelModifiers: {}
|
|
794
|
+
},
|
|
795
|
+
emits: /* @__PURE__ */ Lt("save", ["update:modelValue"]),
|
|
796
|
+
setup(e, { emit: a }) {
|
|
797
|
+
const { advancedFiltersState: t } = At(), n = _e("table_props"), l = Vt(e, "modelValue"), i = (u, d) => {
|
|
798
|
+
const o = n.headers.find((y) => (y.advancedFilter?.key ?? y.key) === d), r = u.comparison === "=" ? ":" : " " + u.comparison, m = Array.isArray(u.value) ? u.value : [u.value], g = m.filter((y, h) => !(o.advancedFilter?.component === "datepicker" && h !== 0 && h !== m.length - 1)).map((y) => {
|
|
799
|
+
const h = o.advancedFilter?.options?.items ?? [];
|
|
800
|
+
let x = y, _;
|
|
801
|
+
return h.length && (_ = h.find((C) => C.value === y), _ && (x = _.title)), typeof o.advancedFilter?.valueFormatter == "function" && (x = o.advancedFilter.valueFormatter({
|
|
802
|
+
item: _,
|
|
803
|
+
value: y
|
|
804
|
+
})), x;
|
|
805
|
+
});
|
|
806
|
+
return `${o.title}${r} ${g.join(", ")}`;
|
|
807
|
+
}, c = (u) => {
|
|
808
|
+
l.value[u] = { comparison: "=", value: null }, s("save");
|
|
809
|
+
}, s = a;
|
|
810
|
+
return (u, d) => (le(), ke(na, null, {
|
|
811
|
+
default: Ie(() => [
|
|
812
|
+
f(ea, null, {
|
|
813
|
+
default: Ie(() => [
|
|
814
|
+
(le(!0), ze(ce, null, Ht(M(t), (o, r) => (le(), ke(st, {
|
|
815
|
+
key: r,
|
|
816
|
+
class: "my-0",
|
|
817
|
+
text: i(o, r),
|
|
818
|
+
closable: "",
|
|
819
|
+
value: o,
|
|
820
|
+
density: "comfortable",
|
|
821
|
+
"onClick:close": (m) => c(r)
|
|
822
|
+
}, null, 8, ["text", "value", "onClick:close"]))), 128))
|
|
823
|
+
]),
|
|
824
|
+
_: 1
|
|
825
|
+
})
|
|
826
|
+
]),
|
|
827
|
+
_: 1
|
|
828
|
+
}));
|
|
829
|
+
}
|
|
830
|
+
}, oa = G({
|
|
831
|
+
text: String,
|
|
832
|
+
onClick: $e(),
|
|
833
|
+
...pe(),
|
|
834
|
+
...Ne()
|
|
835
|
+
}, "VLabel"), jl = ie()({
|
|
836
|
+
name: "VLabel",
|
|
837
|
+
props: oa(),
|
|
838
|
+
setup(e, a) {
|
|
839
|
+
let {
|
|
840
|
+
slots: t
|
|
841
|
+
} = a;
|
|
842
|
+
return de(() => b("label", {
|
|
843
|
+
class: oe(["v-label", {
|
|
844
|
+
"v-label--clickable": !!e.onClick
|
|
845
|
+
}, e.class]),
|
|
846
|
+
style: xe(e.style),
|
|
847
|
+
onClick: e.onClick
|
|
848
|
+
}, [e.text, t.default?.()])), {};
|
|
849
|
+
}
|
|
850
|
+
}), Gl = /* @__PURE__ */ Symbol.for("vuetify:selection-control-group"), Wl = G({
|
|
851
|
+
color: String,
|
|
852
|
+
disabled: {
|
|
853
|
+
type: Boolean,
|
|
854
|
+
default: null
|
|
855
|
+
},
|
|
856
|
+
defaultsTarget: String,
|
|
857
|
+
error: Boolean,
|
|
858
|
+
id: String,
|
|
859
|
+
inline: Boolean,
|
|
860
|
+
falseIcon: be,
|
|
861
|
+
trueIcon: be,
|
|
862
|
+
ripple: {
|
|
863
|
+
type: [Boolean, Object],
|
|
864
|
+
default: !0
|
|
865
|
+
},
|
|
866
|
+
multiple: {
|
|
867
|
+
type: Boolean,
|
|
868
|
+
default: null
|
|
869
|
+
},
|
|
870
|
+
name: String,
|
|
871
|
+
readonly: {
|
|
872
|
+
type: Boolean,
|
|
873
|
+
default: null
|
|
874
|
+
},
|
|
875
|
+
modelValue: null,
|
|
876
|
+
type: String,
|
|
877
|
+
valueComparator: {
|
|
878
|
+
type: Function,
|
|
879
|
+
default: We
|
|
880
|
+
},
|
|
881
|
+
...pe(),
|
|
882
|
+
...dt(),
|
|
883
|
+
...Ne()
|
|
884
|
+
}, "SelectionControlGroup"), ia = G({
|
|
885
|
+
...Wl({
|
|
886
|
+
defaultsTarget: "VSelectionControl"
|
|
887
|
+
})
|
|
888
|
+
}, "VSelectionControlGroup");
|
|
889
|
+
ie()({
|
|
890
|
+
name: "VSelectionControlGroup",
|
|
891
|
+
props: ia(),
|
|
892
|
+
emits: {
|
|
893
|
+
"update:modelValue": (e) => !0
|
|
894
|
+
},
|
|
895
|
+
setup(e, a) {
|
|
896
|
+
let {
|
|
897
|
+
slots: t
|
|
898
|
+
} = a;
|
|
899
|
+
const n = we(e, "modelValue"), l = je(), i = B(() => e.id || `v-selection-control-group-${l}`), c = B(() => e.name || i.value), s = /* @__PURE__ */ new Set();
|
|
900
|
+
return Ue(Gl, {
|
|
901
|
+
modelValue: n,
|
|
902
|
+
forceUpdate: () => {
|
|
903
|
+
s.forEach((u) => u());
|
|
904
|
+
},
|
|
905
|
+
onForceUpdate: (u) => {
|
|
906
|
+
s.add(u), nt(() => {
|
|
907
|
+
s.delete(u);
|
|
908
|
+
});
|
|
909
|
+
}
|
|
910
|
+
}), zt({
|
|
911
|
+
[e.defaultsTarget]: {
|
|
912
|
+
color: B(() => e.color),
|
|
913
|
+
disabled: B(() => e.disabled),
|
|
914
|
+
density: B(() => e.density),
|
|
915
|
+
error: B(() => e.error),
|
|
916
|
+
inline: B(() => e.inline),
|
|
917
|
+
modelValue: n,
|
|
918
|
+
multiple: B(() => !!e.multiple || e.multiple == null && Array.isArray(n.value)),
|
|
919
|
+
name: c,
|
|
920
|
+
falseIcon: B(() => e.falseIcon),
|
|
921
|
+
trueIcon: B(() => e.trueIcon),
|
|
922
|
+
readonly: B(() => e.readonly),
|
|
923
|
+
ripple: B(() => e.ripple),
|
|
924
|
+
type: B(() => e.type),
|
|
925
|
+
valueComparator: B(() => e.valueComparator)
|
|
926
|
+
}
|
|
927
|
+
}), de(() => b("div", {
|
|
928
|
+
class: oe(["v-selection-control-group", {
|
|
929
|
+
"v-selection-control-group--inline": e.inline
|
|
930
|
+
}, e.class]),
|
|
931
|
+
style: xe(e.style),
|
|
932
|
+
role: e.type === "radio" ? "radiogroup" : void 0
|
|
933
|
+
}, [t.default?.()])), {};
|
|
934
|
+
}
|
|
935
|
+
});
|
|
936
|
+
const ql = G({
|
|
937
|
+
label: String,
|
|
938
|
+
baseColor: String,
|
|
939
|
+
trueValue: null,
|
|
940
|
+
falseValue: null,
|
|
941
|
+
value: null,
|
|
942
|
+
...pe(),
|
|
943
|
+
...Wl()
|
|
944
|
+
}, "VSelectionControl");
|
|
945
|
+
function ua(e) {
|
|
946
|
+
const a = _e(Gl, void 0), {
|
|
947
|
+
densityClasses: t
|
|
948
|
+
} = It(e), n = we(e, "modelValue"), l = I(() => e.trueValue !== void 0 ? e.trueValue : e.value !== void 0 ? e.value : !0), i = I(() => e.falseValue !== void 0 ? e.falseValue : !1), c = I(() => !!e.multiple || e.multiple == null && Array.isArray(n.value)), s = I({
|
|
949
|
+
get() {
|
|
950
|
+
const g = a ? a.modelValue.value : n.value;
|
|
951
|
+
return c.value ? De(g).some((y) => e.valueComparator(y, l.value)) : e.valueComparator(g, l.value);
|
|
952
|
+
},
|
|
953
|
+
set(g) {
|
|
954
|
+
if (e.readonly) return;
|
|
955
|
+
const y = g ? l.value : i.value;
|
|
956
|
+
let h = y;
|
|
957
|
+
c.value && (h = g ? [...De(n.value), y] : De(n.value).filter((x) => !e.valueComparator(x, l.value))), a ? a.modelValue.value = h : n.value = h;
|
|
958
|
+
}
|
|
959
|
+
}), {
|
|
960
|
+
textColorClasses: u,
|
|
961
|
+
textColorStyles: d
|
|
962
|
+
} = mt(() => {
|
|
963
|
+
if (!(e.error || e.disabled))
|
|
964
|
+
return s.value ? e.color : e.baseColor;
|
|
965
|
+
}), {
|
|
966
|
+
backgroundColorClasses: o,
|
|
967
|
+
backgroundColorStyles: r
|
|
968
|
+
} = wt(() => s.value && !e.error && !e.disabled ? e.color : e.baseColor), m = I(() => s.value ? e.trueIcon : e.falseIcon);
|
|
969
|
+
return {
|
|
970
|
+
group: a,
|
|
971
|
+
densityClasses: t,
|
|
972
|
+
trueValue: l,
|
|
973
|
+
falseValue: i,
|
|
974
|
+
model: s,
|
|
975
|
+
textColorClasses: u,
|
|
976
|
+
textColorStyles: d,
|
|
977
|
+
backgroundColorClasses: o,
|
|
978
|
+
backgroundColorStyles: r,
|
|
979
|
+
icon: m
|
|
980
|
+
};
|
|
981
|
+
}
|
|
982
|
+
const sl = ie()({
|
|
983
|
+
name: "VSelectionControl",
|
|
984
|
+
directives: {
|
|
985
|
+
vRipple: Je
|
|
986
|
+
},
|
|
987
|
+
inheritAttrs: !1,
|
|
988
|
+
props: ql(),
|
|
989
|
+
emits: {
|
|
990
|
+
"update:modelValue": (e) => !0
|
|
991
|
+
},
|
|
992
|
+
setup(e, a) {
|
|
993
|
+
let {
|
|
994
|
+
attrs: t,
|
|
995
|
+
slots: n
|
|
996
|
+
} = a;
|
|
997
|
+
const {
|
|
998
|
+
group: l,
|
|
999
|
+
densityClasses: i,
|
|
1000
|
+
icon: c,
|
|
1001
|
+
model: s,
|
|
1002
|
+
textColorClasses: u,
|
|
1003
|
+
textColorStyles: d,
|
|
1004
|
+
backgroundColorClasses: o,
|
|
1005
|
+
backgroundColorStyles: r,
|
|
1006
|
+
trueValue: m
|
|
1007
|
+
} = ua(e), g = je(), y = J(!1), h = J(!1), x = W(), _ = B(() => e.id || `input-${g}`), C = B(() => !e.disabled && !e.readonly);
|
|
1008
|
+
l?.onForceUpdate(() => {
|
|
1009
|
+
x.value && (x.value.checked = s.value);
|
|
1010
|
+
});
|
|
1011
|
+
function k(A) {
|
|
1012
|
+
C.value && (y.value = !0, ot(A.target, ":focus-visible") !== !1 && (h.value = !0));
|
|
1013
|
+
}
|
|
1014
|
+
function T() {
|
|
1015
|
+
y.value = !1, h.value = !1;
|
|
1016
|
+
}
|
|
1017
|
+
function F(A) {
|
|
1018
|
+
A.stopPropagation();
|
|
1019
|
+
}
|
|
1020
|
+
function H(A) {
|
|
1021
|
+
if (!C.value) {
|
|
1022
|
+
x.value && (x.value.checked = s.value);
|
|
1023
|
+
return;
|
|
1024
|
+
}
|
|
1025
|
+
e.readonly && l && Ve(() => l.forceUpdate()), s.value = A.target.checked;
|
|
1026
|
+
}
|
|
1027
|
+
return de(() => {
|
|
1028
|
+
const A = n.label ? n.label({
|
|
1029
|
+
label: e.label,
|
|
1030
|
+
props: {
|
|
1031
|
+
for: _.value
|
|
1032
|
+
}
|
|
1033
|
+
}) : e.label, [p, R] = wl(t), E = b("input", L({
|
|
1034
|
+
ref: x,
|
|
1035
|
+
checked: s.value,
|
|
1036
|
+
disabled: !!e.disabled,
|
|
1037
|
+
id: _.value,
|
|
1038
|
+
onBlur: T,
|
|
1039
|
+
onFocus: k,
|
|
1040
|
+
onInput: H,
|
|
1041
|
+
"aria-disabled": !!e.disabled,
|
|
1042
|
+
"aria-label": e.label,
|
|
1043
|
+
type: e.type,
|
|
1044
|
+
value: m.value,
|
|
1045
|
+
name: e.name,
|
|
1046
|
+
"aria-checked": e.type === "checkbox" ? s.value : void 0
|
|
1047
|
+
}, R), null);
|
|
1048
|
+
return b("div", L({
|
|
1049
|
+
class: ["v-selection-control", {
|
|
1050
|
+
"v-selection-control--dirty": s.value,
|
|
1051
|
+
"v-selection-control--disabled": e.disabled,
|
|
1052
|
+
"v-selection-control--error": e.error,
|
|
1053
|
+
"v-selection-control--focused": y.value,
|
|
1054
|
+
"v-selection-control--focus-visible": h.value,
|
|
1055
|
+
"v-selection-control--inline": e.inline
|
|
1056
|
+
}, i.value, e.class]
|
|
1057
|
+
}, p, {
|
|
1058
|
+
style: e.style
|
|
1059
|
+
}), [b("div", {
|
|
1060
|
+
class: oe(["v-selection-control__wrapper", u.value]),
|
|
1061
|
+
style: xe(d.value)
|
|
1062
|
+
}, [n.default?.({
|
|
1063
|
+
backgroundColorClasses: o,
|
|
1064
|
+
backgroundColorStyles: r
|
|
1065
|
+
}), He(b("div", {
|
|
1066
|
+
class: oe(["v-selection-control__input"])
|
|
1067
|
+
}, [n.input?.({
|
|
1068
|
+
model: s,
|
|
1069
|
+
textColorClasses: u,
|
|
1070
|
+
textColorStyles: d,
|
|
1071
|
+
backgroundColorClasses: o,
|
|
1072
|
+
backgroundColorStyles: r,
|
|
1073
|
+
inputNode: E,
|
|
1074
|
+
icon: c.value,
|
|
1075
|
+
props: {
|
|
1076
|
+
onFocus: k,
|
|
1077
|
+
onBlur: T,
|
|
1078
|
+
id: _.value
|
|
1079
|
+
}
|
|
1080
|
+
}) ?? b(ce, null, [c.value && f(Se, {
|
|
1081
|
+
key: "icon",
|
|
1082
|
+
icon: c.value
|
|
1083
|
+
}, null), E])]), [[Je, !e.disabled && !e.readonly && e.ripple, null, {
|
|
1084
|
+
center: !0,
|
|
1085
|
+
circle: !0
|
|
1086
|
+
}]])]), A && f(jl, {
|
|
1087
|
+
for: _.value,
|
|
1088
|
+
onClick: F
|
|
1089
|
+
}, {
|
|
1090
|
+
default: () => [A]
|
|
1091
|
+
})]);
|
|
1092
|
+
}), {
|
|
1093
|
+
isFocused: y,
|
|
1094
|
+
input: x
|
|
1095
|
+
};
|
|
1096
|
+
}
|
|
1097
|
+
}), sa = G({
|
|
1098
|
+
indeterminate: Boolean,
|
|
1099
|
+
indeterminateIcon: {
|
|
1100
|
+
type: be,
|
|
1101
|
+
default: "$checkboxIndeterminate"
|
|
1102
|
+
},
|
|
1103
|
+
...ql({
|
|
1104
|
+
falseIcon: "$checkboxOff",
|
|
1105
|
+
trueIcon: "$checkboxOn"
|
|
1106
|
+
})
|
|
1107
|
+
}, "VCheckboxBtn"), Jl = ie()({
|
|
1108
|
+
name: "VCheckboxBtn",
|
|
1109
|
+
props: sa(),
|
|
1110
|
+
emits: {
|
|
1111
|
+
"update:modelValue": (e) => !0,
|
|
1112
|
+
"update:indeterminate": (e) => !0
|
|
1113
|
+
},
|
|
1114
|
+
setup(e, a) {
|
|
1115
|
+
let {
|
|
1116
|
+
slots: t
|
|
1117
|
+
} = a;
|
|
1118
|
+
const n = we(e, "indeterminate"), l = we(e, "modelValue");
|
|
1119
|
+
function i(u) {
|
|
1120
|
+
n.value && (n.value = !1);
|
|
1121
|
+
}
|
|
1122
|
+
const c = B(() => n.value ? e.indeterminateIcon : e.falseIcon), s = B(() => n.value ? e.indeterminateIcon : e.trueIcon);
|
|
1123
|
+
return de(() => {
|
|
1124
|
+
const u = Ge(sl.filterProps(e), ["modelValue"]);
|
|
1125
|
+
return f(sl, L(u, {
|
|
1126
|
+
modelValue: l.value,
|
|
1127
|
+
"onUpdate:modelValue": [(d) => l.value = d, i],
|
|
1128
|
+
class: ["v-checkbox-btn", e.class],
|
|
1129
|
+
style: e.style,
|
|
1130
|
+
type: "checkbox",
|
|
1131
|
+
falseIcon: c.value,
|
|
1132
|
+
trueIcon: s.value,
|
|
1133
|
+
"aria-checked": n.value ? "mixed" : void 0
|
|
1134
|
+
}), t);
|
|
1135
|
+
}), {};
|
|
1136
|
+
}
|
|
1137
|
+
});
|
|
1138
|
+
function Ft(e) {
|
|
1139
|
+
const {
|
|
1140
|
+
t: a
|
|
1141
|
+
} = Ze();
|
|
1142
|
+
function t(n) {
|
|
1143
|
+
let {
|
|
1144
|
+
name: l,
|
|
1145
|
+
color: i,
|
|
1146
|
+
...c
|
|
1147
|
+
} = n;
|
|
1148
|
+
const s = {
|
|
1149
|
+
prepend: "prependAction",
|
|
1150
|
+
prependInner: "prependAction",
|
|
1151
|
+
append: "appendAction",
|
|
1152
|
+
appendInner: "appendAction",
|
|
1153
|
+
clear: "clear"
|
|
1154
|
+
}[l], u = e[`onClick:${l}`];
|
|
1155
|
+
function d(r) {
|
|
1156
|
+
r.key !== "Enter" && r.key !== " " || (r.preventDefault(), r.stopPropagation(), _l(u, new PointerEvent("click", r)));
|
|
1157
|
+
}
|
|
1158
|
+
const o = u && s ? a(`$vuetify.input.${s}`, e.label ?? "") : void 0;
|
|
1159
|
+
return f(Se, L({
|
|
1160
|
+
icon: e[`${l}Icon`],
|
|
1161
|
+
"aria-label": o,
|
|
1162
|
+
onClick: u,
|
|
1163
|
+
onKeydown: d,
|
|
1164
|
+
color: i
|
|
1165
|
+
}, c), null);
|
|
1166
|
+
}
|
|
1167
|
+
return {
|
|
1168
|
+
InputIcon: t
|
|
1169
|
+
};
|
|
1170
|
+
}
|
|
1171
|
+
const ra = G({
|
|
1172
|
+
active: Boolean,
|
|
1173
|
+
color: String,
|
|
1174
|
+
messages: {
|
|
1175
|
+
type: [Array, String],
|
|
1176
|
+
default: () => []
|
|
1177
|
+
},
|
|
1178
|
+
...pe(),
|
|
1179
|
+
..._t({
|
|
1180
|
+
transition: {
|
|
1181
|
+
component: Pl,
|
|
1182
|
+
leaveAbsolute: !0,
|
|
1183
|
+
group: !0
|
|
1184
|
+
}
|
|
1185
|
+
})
|
|
1186
|
+
}, "VMessages"), ca = ie()({
|
|
1187
|
+
name: "VMessages",
|
|
1188
|
+
props: ra(),
|
|
1189
|
+
setup(e, a) {
|
|
1190
|
+
let {
|
|
1191
|
+
slots: t
|
|
1192
|
+
} = a;
|
|
1193
|
+
const n = I(() => De(e.messages)), {
|
|
1194
|
+
textColorClasses: l,
|
|
1195
|
+
textColorStyles: i
|
|
1196
|
+
} = mt(() => e.color);
|
|
1197
|
+
return de(() => f(Xt, {
|
|
1198
|
+
transition: e.transition,
|
|
1199
|
+
tag: "div",
|
|
1200
|
+
class: oe(["v-messages", l.value, e.class]),
|
|
1201
|
+
style: xe([i.value, e.style])
|
|
1202
|
+
}, {
|
|
1203
|
+
default: () => [e.active && n.value.map((c, s) => b("div", {
|
|
1204
|
+
class: "v-messages__message",
|
|
1205
|
+
key: `${s}-${n.value}`
|
|
1206
|
+
}, [t.message ? t.message({
|
|
1207
|
+
message: c
|
|
1208
|
+
}) : c]))]
|
|
1209
|
+
})), {};
|
|
1210
|
+
}
|
|
1211
|
+
}), Xl = G({
|
|
1212
|
+
focused: Boolean,
|
|
1213
|
+
"onUpdate:focused": $e()
|
|
1214
|
+
}, "focus");
|
|
1215
|
+
function Yl(e) {
|
|
1216
|
+
let a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Al();
|
|
1217
|
+
const t = we(e, "focused"), n = B(() => ({
|
|
1218
|
+
[`${a}--focused`]: t.value
|
|
1219
|
+
}));
|
|
1220
|
+
function l() {
|
|
1221
|
+
t.value = !0;
|
|
1222
|
+
}
|
|
1223
|
+
function i() {
|
|
1224
|
+
t.value = !1;
|
|
1225
|
+
}
|
|
1226
|
+
return {
|
|
1227
|
+
focusClasses: n,
|
|
1228
|
+
isFocused: t,
|
|
1229
|
+
focus: l,
|
|
1230
|
+
blur: i
|
|
1231
|
+
};
|
|
1232
|
+
}
|
|
1233
|
+
const da = /* @__PURE__ */ Symbol.for("vuetify:form");
|
|
1234
|
+
function Dt(e) {
|
|
1235
|
+
const a = _e(da, null);
|
|
1236
|
+
return {
|
|
1237
|
+
...a,
|
|
1238
|
+
isReadonly: I(() => !!(e?.readonly ?? a?.isReadonly.value)),
|
|
1239
|
+
isDisabled: I(() => !!(e?.disabled ?? a?.isDisabled.value))
|
|
1240
|
+
};
|
|
1241
|
+
}
|
|
1242
|
+
const va = /* @__PURE__ */ Symbol.for("vuetify:rules");
|
|
1243
|
+
function fa(e) {
|
|
1244
|
+
const a = _e(va, null);
|
|
1245
|
+
if (!e) {
|
|
1246
|
+
if (!a)
|
|
1247
|
+
throw new Error("Could not find Vuetify rules injection");
|
|
1248
|
+
return a.aliases;
|
|
1249
|
+
}
|
|
1250
|
+
return a?.resolve(e) ?? B(e);
|
|
1251
|
+
}
|
|
1252
|
+
const ma = G({
|
|
1253
|
+
disabled: {
|
|
1254
|
+
type: Boolean,
|
|
1255
|
+
default: null
|
|
1256
|
+
},
|
|
1257
|
+
error: Boolean,
|
|
1258
|
+
errorMessages: {
|
|
1259
|
+
type: [Array, String],
|
|
1260
|
+
default: () => []
|
|
1261
|
+
},
|
|
1262
|
+
maxErrors: {
|
|
1263
|
+
type: [Number, String],
|
|
1264
|
+
default: 1
|
|
1265
|
+
},
|
|
1266
|
+
name: String,
|
|
1267
|
+
label: String,
|
|
1268
|
+
readonly: {
|
|
1269
|
+
type: Boolean,
|
|
1270
|
+
default: null
|
|
1271
|
+
},
|
|
1272
|
+
rules: {
|
|
1273
|
+
type: Array,
|
|
1274
|
+
default: () => []
|
|
1275
|
+
},
|
|
1276
|
+
modelValue: null,
|
|
1277
|
+
validateOn: String,
|
|
1278
|
+
validationValue: null,
|
|
1279
|
+
...Xl()
|
|
1280
|
+
}, "validation");
|
|
1281
|
+
function ga(e) {
|
|
1282
|
+
let a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Al(), t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : je();
|
|
1283
|
+
const n = we(e, "modelValue"), l = I(() => e.validationValue === void 0 ? n.value : e.validationValue), i = Dt(e), c = fa(() => e.rules), s = W([]), u = J(!0), d = I(() => !!(De(n.value === "" ? null : n.value).length || De(l.value === "" ? null : l.value).length)), o = I(() => e.errorMessages?.length ? De(e.errorMessages).concat(s.value).slice(0, Math.max(0, Number(e.maxErrors))) : s.value), r = I(() => {
|
|
1284
|
+
let T = (e.validateOn ?? i.validateOn?.value) || "input";
|
|
1285
|
+
T === "lazy" && (T = "input lazy"), T === "eager" && (T = "input eager");
|
|
1286
|
+
const F = new Set(T?.split(" ") ?? []);
|
|
1287
|
+
return {
|
|
1288
|
+
input: F.has("input"),
|
|
1289
|
+
blur: F.has("blur") || F.has("input") || F.has("invalid-input"),
|
|
1290
|
+
invalidInput: F.has("invalid-input"),
|
|
1291
|
+
lazy: F.has("lazy"),
|
|
1292
|
+
eager: F.has("eager")
|
|
1293
|
+
};
|
|
1294
|
+
}), m = I(() => e.error || e.errorMessages?.length ? !1 : e.rules.length ? u.value ? s.value.length || r.value.lazy ? null : !0 : !s.value.length : !0), g = J(!1), y = I(() => ({
|
|
1295
|
+
[`${a}--error`]: m.value === !1,
|
|
1296
|
+
[`${a}--dirty`]: d.value,
|
|
1297
|
+
[`${a}--disabled`]: i.isDisabled.value,
|
|
1298
|
+
[`${a}--readonly`]: i.isReadonly.value
|
|
1299
|
+
})), h = Fl("validation"), x = I(() => e.name ?? M(t));
|
|
1300
|
+
dn(() => {
|
|
1301
|
+
i.register?.({
|
|
1302
|
+
id: x.value,
|
|
1303
|
+
vm: h,
|
|
1304
|
+
validate: k,
|
|
1305
|
+
reset: _,
|
|
1306
|
+
resetValidation: C
|
|
1307
|
+
});
|
|
1308
|
+
}), vn(() => {
|
|
1309
|
+
i.unregister?.(x.value);
|
|
1310
|
+
}), Ye(async () => {
|
|
1311
|
+
r.value.lazy || await k(!r.value.eager), i.update?.(x.value, m.value, o.value);
|
|
1312
|
+
}), $t(() => r.value.input || r.value.invalidInput && m.value === !1, () => {
|
|
1313
|
+
re(l, () => {
|
|
1314
|
+
if (l.value != null)
|
|
1315
|
+
k();
|
|
1316
|
+
else if (e.focused) {
|
|
1317
|
+
const T = re(() => e.focused, (F) => {
|
|
1318
|
+
F || k(), T();
|
|
1319
|
+
});
|
|
1320
|
+
}
|
|
1321
|
+
});
|
|
1322
|
+
}), $t(() => r.value.blur, () => {
|
|
1323
|
+
re(() => e.focused, (T) => {
|
|
1324
|
+
T || k();
|
|
1325
|
+
});
|
|
1326
|
+
}), re([m, o], () => {
|
|
1327
|
+
i.update?.(x.value, m.value, o.value);
|
|
1328
|
+
});
|
|
1329
|
+
async function _() {
|
|
1330
|
+
n.value = null, await Ve(), await C();
|
|
1331
|
+
}
|
|
1332
|
+
async function C() {
|
|
1333
|
+
u.value = !0, r.value.lazy ? s.value = [] : await k(!r.value.eager);
|
|
1334
|
+
}
|
|
1335
|
+
async function k() {
|
|
1336
|
+
let T = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
|
|
1337
|
+
const F = [];
|
|
1338
|
+
g.value = !0;
|
|
1339
|
+
for (const H of c.value) {
|
|
1340
|
+
if (F.length >= Number(e.maxErrors ?? 1))
|
|
1341
|
+
break;
|
|
1342
|
+
const p = await (typeof H == "function" ? H : () => H)(l.value);
|
|
1343
|
+
if (p !== !0) {
|
|
1344
|
+
if (p !== !1 && typeof p != "string") {
|
|
1345
|
+
console.warn(`${p} is not a valid value. Rule functions must return boolean true or a string.`);
|
|
1346
|
+
continue;
|
|
1347
|
+
}
|
|
1348
|
+
F.push(p || "");
|
|
1349
|
+
}
|
|
1350
|
+
}
|
|
1351
|
+
return s.value = F, g.value = !1, u.value = T, s.value;
|
|
1352
|
+
}
|
|
1353
|
+
return {
|
|
1354
|
+
errorMessages: o,
|
|
1355
|
+
isDirty: d,
|
|
1356
|
+
isDisabled: i.isDisabled,
|
|
1357
|
+
isReadonly: i.isReadonly,
|
|
1358
|
+
isPristine: u,
|
|
1359
|
+
isValid: m,
|
|
1360
|
+
isValidating: g,
|
|
1361
|
+
reset: _,
|
|
1362
|
+
resetValidation: C,
|
|
1363
|
+
validate: k,
|
|
1364
|
+
validationClasses: y
|
|
1365
|
+
};
|
|
1366
|
+
}
|
|
1367
|
+
const Ql = G({
|
|
1368
|
+
id: String,
|
|
1369
|
+
appendIcon: be,
|
|
1370
|
+
baseColor: String,
|
|
1371
|
+
centerAffix: {
|
|
1372
|
+
type: Boolean,
|
|
1373
|
+
default: !0
|
|
1374
|
+
},
|
|
1375
|
+
color: String,
|
|
1376
|
+
glow: Boolean,
|
|
1377
|
+
iconColor: [Boolean, String],
|
|
1378
|
+
prependIcon: be,
|
|
1379
|
+
hideDetails: [Boolean, String],
|
|
1380
|
+
hideSpinButtons: Boolean,
|
|
1381
|
+
hint: String,
|
|
1382
|
+
persistentHint: Boolean,
|
|
1383
|
+
messages: {
|
|
1384
|
+
type: [Array, String],
|
|
1385
|
+
default: () => []
|
|
1386
|
+
},
|
|
1387
|
+
direction: {
|
|
1388
|
+
type: String,
|
|
1389
|
+
default: "horizontal",
|
|
1390
|
+
validator: (e) => ["horizontal", "vertical"].includes(e)
|
|
1391
|
+
},
|
|
1392
|
+
"onClick:prepend": $e(),
|
|
1393
|
+
"onClick:append": $e(),
|
|
1394
|
+
...pe(),
|
|
1395
|
+
...dt(),
|
|
1396
|
+
...Vn(ft(), ["maxWidth", "minWidth", "width"]),
|
|
1397
|
+
...Ne(),
|
|
1398
|
+
...ma()
|
|
1399
|
+
}, "VInput"), rl = ie()({
|
|
1400
|
+
name: "VInput",
|
|
1401
|
+
props: {
|
|
1402
|
+
...Ql()
|
|
1403
|
+
},
|
|
1404
|
+
emits: {
|
|
1405
|
+
"update:modelValue": (e) => !0
|
|
1406
|
+
},
|
|
1407
|
+
setup(e, a) {
|
|
1408
|
+
let {
|
|
1409
|
+
attrs: t,
|
|
1410
|
+
slots: n,
|
|
1411
|
+
emit: l
|
|
1412
|
+
} = a;
|
|
1413
|
+
const {
|
|
1414
|
+
densityClasses: i
|
|
1415
|
+
} = It(e), {
|
|
1416
|
+
dimensionStyles: c
|
|
1417
|
+
} = vt(e), {
|
|
1418
|
+
themeClasses: s
|
|
1419
|
+
} = Qe(e), {
|
|
1420
|
+
rtlClasses: u
|
|
1421
|
+
} = xt(), {
|
|
1422
|
+
InputIcon: d
|
|
1423
|
+
} = Ft(e), o = je(), r = I(() => e.id || `input-${o}`), {
|
|
1424
|
+
errorMessages: m,
|
|
1425
|
+
isDirty: g,
|
|
1426
|
+
isDisabled: y,
|
|
1427
|
+
isReadonly: h,
|
|
1428
|
+
isPristine: x,
|
|
1429
|
+
isValid: _,
|
|
1430
|
+
isValidating: C,
|
|
1431
|
+
reset: k,
|
|
1432
|
+
resetValidation: T,
|
|
1433
|
+
validate: F,
|
|
1434
|
+
validationClasses: H
|
|
1435
|
+
} = ga(e, "v-input", r), A = I(() => e.errorMessages?.length || !x.value && m.value.length ? m.value : e.hint && (e.persistentHint || e.focused) ? e.hint : e.messages), p = B(() => A.value.length > 0), R = B(() => !e.hideDetails || e.hideDetails === "auto" && (p.value || !!n.details)), E = I(() => R.value ? `${r.value}-messages` : void 0), q = I(() => ({
|
|
1436
|
+
id: r,
|
|
1437
|
+
messagesId: E,
|
|
1438
|
+
isDirty: g,
|
|
1439
|
+
isDisabled: y,
|
|
1440
|
+
isReadonly: h,
|
|
1441
|
+
isPristine: x,
|
|
1442
|
+
isValid: _,
|
|
1443
|
+
isValidating: C,
|
|
1444
|
+
hasDetails: R,
|
|
1445
|
+
reset: k,
|
|
1446
|
+
resetValidation: T,
|
|
1447
|
+
validate: F
|
|
1448
|
+
})), te = B(() => e.error || e.disabled ? void 0 : e.focused ? e.color : e.baseColor), ee = B(() => {
|
|
1449
|
+
if (e.iconColor)
|
|
1450
|
+
return e.iconColor === !0 ? te.value : e.iconColor;
|
|
1451
|
+
});
|
|
1452
|
+
return de(() => {
|
|
1453
|
+
const U = !!(n.prepend || e.prependIcon), K = !!(n.append || e.appendIcon);
|
|
1454
|
+
return b("div", {
|
|
1455
|
+
class: oe(["v-input", `v-input--${e.direction}`, {
|
|
1456
|
+
"v-input--center-affix": e.centerAffix,
|
|
1457
|
+
"v-input--focused": e.focused,
|
|
1458
|
+
"v-input--glow": e.glow,
|
|
1459
|
+
"v-input--hide-spin-buttons": e.hideSpinButtons
|
|
1460
|
+
}, i.value, s.value, u.value, H.value, e.class]),
|
|
1461
|
+
style: xe([c.value, e.style])
|
|
1462
|
+
}, [U && b("div", {
|
|
1463
|
+
key: "prepend",
|
|
1464
|
+
class: "v-input__prepend"
|
|
1465
|
+
}, [n.prepend ? n.prepend(q.value) : e.prependIcon && f(d, {
|
|
1466
|
+
key: "prepend-icon",
|
|
1467
|
+
name: "prepend",
|
|
1468
|
+
color: ee.value
|
|
1469
|
+
}, null)]), n.default && b("div", {
|
|
1470
|
+
class: "v-input__control"
|
|
1471
|
+
}, [n.default?.(q.value)]), K && b("div", {
|
|
1472
|
+
key: "append",
|
|
1473
|
+
class: "v-input__append"
|
|
1474
|
+
}, [n.append ? n.append(q.value) : e.appendIcon && f(d, {
|
|
1475
|
+
key: "append-icon",
|
|
1476
|
+
name: "append",
|
|
1477
|
+
color: ee.value
|
|
1478
|
+
}, null)]), R.value && b("div", {
|
|
1479
|
+
id: E.value,
|
|
1480
|
+
class: "v-input__details",
|
|
1481
|
+
role: "alert",
|
|
1482
|
+
"aria-live": "polite"
|
|
1483
|
+
}, [f(ca, {
|
|
1484
|
+
active: p.value,
|
|
1485
|
+
messages: A.value
|
|
1486
|
+
}, {
|
|
1487
|
+
message: n.message
|
|
1488
|
+
}), n.details?.(q.value)])]);
|
|
1489
|
+
}), {
|
|
1490
|
+
reset: k,
|
|
1491
|
+
resetValidation: T,
|
|
1492
|
+
validate: F,
|
|
1493
|
+
isValid: _,
|
|
1494
|
+
errorMessages: m
|
|
1495
|
+
};
|
|
1496
|
+
}
|
|
1497
|
+
}), ya = G({
|
|
1498
|
+
active: Boolean,
|
|
1499
|
+
disabled: Boolean,
|
|
1500
|
+
max: [Number, String],
|
|
1501
|
+
value: {
|
|
1502
|
+
type: [Number, String],
|
|
1503
|
+
default: 0
|
|
1504
|
+
},
|
|
1505
|
+
...pe(),
|
|
1506
|
+
..._t({
|
|
1507
|
+
transition: {
|
|
1508
|
+
component: Pl
|
|
1509
|
+
}
|
|
1510
|
+
})
|
|
1511
|
+
}, "VCounter"), ha = ie()({
|
|
1512
|
+
name: "VCounter",
|
|
1513
|
+
functional: !0,
|
|
1514
|
+
props: ya(),
|
|
1515
|
+
setup(e, a) {
|
|
1516
|
+
let {
|
|
1517
|
+
slots: t
|
|
1518
|
+
} = a;
|
|
1519
|
+
const n = B(() => e.max ? `${e.value} / ${e.max}` : String(e.value));
|
|
1520
|
+
return de(() => f(Xt, {
|
|
1521
|
+
transition: e.transition
|
|
1522
|
+
}, {
|
|
1523
|
+
default: () => [He(b("div", {
|
|
1524
|
+
class: oe(["v-counter", {
|
|
1525
|
+
"text-error": e.max && !e.disabled && parseFloat(e.value) > parseFloat(e.max)
|
|
1526
|
+
}, e.class]),
|
|
1527
|
+
style: xe(e.style)
|
|
1528
|
+
}, [t.default ? t.default({
|
|
1529
|
+
counter: n.value,
|
|
1530
|
+
max: e.max,
|
|
1531
|
+
value: e.value
|
|
1532
|
+
}) : n.value]), [[Ct, e.active]])]
|
|
1533
|
+
})), {};
|
|
1534
|
+
}
|
|
1535
|
+
}), ba = G({
|
|
1536
|
+
floating: Boolean,
|
|
1537
|
+
...pe()
|
|
1538
|
+
}, "VFieldLabel"), ht = ie()({
|
|
1539
|
+
name: "VFieldLabel",
|
|
1540
|
+
props: ba(),
|
|
1541
|
+
setup(e, a) {
|
|
1542
|
+
let {
|
|
1543
|
+
slots: t
|
|
1544
|
+
} = a;
|
|
1545
|
+
return de(() => f(jl, {
|
|
1546
|
+
class: oe(["v-field-label", {
|
|
1547
|
+
"v-field-label--floating": e.floating
|
|
1548
|
+
}, e.class]),
|
|
1549
|
+
style: xe(e.style)
|
|
1550
|
+
}, t)), {};
|
|
1551
|
+
}
|
|
1552
|
+
}), pa = ["underlined", "outlined", "filled", "solo", "solo-inverted", "solo-filled", "plain"], Zl = G({
|
|
1553
|
+
appendInnerIcon: be,
|
|
1554
|
+
bgColor: String,
|
|
1555
|
+
clearable: Boolean,
|
|
1556
|
+
clearIcon: {
|
|
1557
|
+
type: be,
|
|
1558
|
+
default: "$clear"
|
|
1559
|
+
},
|
|
1560
|
+
active: Boolean,
|
|
1561
|
+
centerAffix: {
|
|
1562
|
+
type: Boolean,
|
|
1563
|
+
default: void 0
|
|
1564
|
+
},
|
|
1565
|
+
color: String,
|
|
1566
|
+
baseColor: String,
|
|
1567
|
+
dirty: Boolean,
|
|
1568
|
+
disabled: {
|
|
1569
|
+
type: Boolean,
|
|
1570
|
+
default: null
|
|
1571
|
+
},
|
|
1572
|
+
glow: Boolean,
|
|
1573
|
+
error: Boolean,
|
|
1574
|
+
flat: Boolean,
|
|
1575
|
+
iconColor: [Boolean, String],
|
|
1576
|
+
label: String,
|
|
1577
|
+
persistentClear: Boolean,
|
|
1578
|
+
prependInnerIcon: be,
|
|
1579
|
+
reverse: Boolean,
|
|
1580
|
+
singleLine: Boolean,
|
|
1581
|
+
variant: {
|
|
1582
|
+
type: String,
|
|
1583
|
+
default: "filled",
|
|
1584
|
+
validator: (e) => pa.includes(e)
|
|
1585
|
+
},
|
|
1586
|
+
"onClick:clear": $e(),
|
|
1587
|
+
"onClick:appendInner": $e(),
|
|
1588
|
+
"onClick:prependInner": $e(),
|
|
1589
|
+
...pe(),
|
|
1590
|
+
...Bl(),
|
|
1591
|
+
...ct(),
|
|
1592
|
+
...Ne()
|
|
1593
|
+
}, "VField"), cl = ie()({
|
|
1594
|
+
name: "VField",
|
|
1595
|
+
inheritAttrs: !1,
|
|
1596
|
+
props: {
|
|
1597
|
+
id: String,
|
|
1598
|
+
details: Boolean,
|
|
1599
|
+
labelId: String,
|
|
1600
|
+
...Xl(),
|
|
1601
|
+
...Zl()
|
|
1602
|
+
},
|
|
1603
|
+
emits: {
|
|
1604
|
+
"update:focused": (e) => !0,
|
|
1605
|
+
"update:modelValue": (e) => !0
|
|
1606
|
+
},
|
|
1607
|
+
setup(e, a) {
|
|
1608
|
+
let {
|
|
1609
|
+
attrs: t,
|
|
1610
|
+
emit: n,
|
|
1611
|
+
slots: l
|
|
1612
|
+
} = a;
|
|
1613
|
+
const {
|
|
1614
|
+
themeClasses: i
|
|
1615
|
+
} = Qe(e), {
|
|
1616
|
+
loaderClasses: c
|
|
1617
|
+
} = Dl(e), {
|
|
1618
|
+
focusClasses: s,
|
|
1619
|
+
isFocused: u,
|
|
1620
|
+
focus: d,
|
|
1621
|
+
blur: o
|
|
1622
|
+
} = Yl(e), {
|
|
1623
|
+
InputIcon: r
|
|
1624
|
+
} = Ft(e), {
|
|
1625
|
+
roundedClasses: m
|
|
1626
|
+
} = rt(e), {
|
|
1627
|
+
rtlClasses: g
|
|
1628
|
+
} = xt(), y = B(() => e.dirty || e.active), h = B(() => !!(e.label || l.label)), x = B(() => !e.singleLine && h.value), _ = je(), C = I(() => e.id || `input-${_}`), k = B(() => e.details ? `${C.value}-messages` : void 0), T = W(), F = W(), H = W(), A = I(() => ["plain", "underlined"].includes(e.variant)), p = I(() => e.error || e.disabled ? void 0 : y.value && u.value ? e.color : e.baseColor), R = I(() => {
|
|
1629
|
+
if (!(!e.iconColor || e.glow && !u.value))
|
|
1630
|
+
return e.iconColor === !0 ? p.value : e.iconColor;
|
|
1631
|
+
}), {
|
|
1632
|
+
backgroundColorClasses: E,
|
|
1633
|
+
backgroundColorStyles: q
|
|
1634
|
+
} = wt(() => e.bgColor), {
|
|
1635
|
+
textColorClasses: te,
|
|
1636
|
+
textColorStyles: ee
|
|
1637
|
+
} = mt(p);
|
|
1638
|
+
re(y, (Z) => {
|
|
1639
|
+
if (x.value && !gl()) {
|
|
1640
|
+
const N = T.value.$el, ne = F.value.$el;
|
|
1641
|
+
requestAnimationFrame(() => {
|
|
1642
|
+
const ue = xn(N), D = ne.getBoundingClientRect(), $ = D.x - ue.x, w = D.y - ue.y - (ue.height / 2 - D.height / 2), v = D.width / 0.75, P = Math.abs(v - ue.width) > 1 ? {
|
|
1643
|
+
maxWidth: lt(v)
|
|
1644
|
+
} : void 0, V = getComputedStyle(N), O = getComputedStyle(ne), j = parseFloat(V.transitionDuration) * 1e3 || 150, ve = parseFloat(O.getPropertyValue("--v-field-label-scale")), me = O.getPropertyValue("color");
|
|
1645
|
+
N.style.visibility = "visible", ne.style.visibility = "hidden", In(N, {
|
|
1646
|
+
transform: `translate(${$}px, ${w}px) scale(${ve})`,
|
|
1647
|
+
color: me,
|
|
1648
|
+
...P
|
|
1649
|
+
}, {
|
|
1650
|
+
duration: j,
|
|
1651
|
+
easing: wn,
|
|
1652
|
+
direction: Z ? "normal" : "reverse"
|
|
1653
|
+
}).finished.then(() => {
|
|
1654
|
+
N.style.removeProperty("visibility"), ne.style.removeProperty("visibility");
|
|
1655
|
+
});
|
|
1656
|
+
});
|
|
1657
|
+
}
|
|
1658
|
+
}, {
|
|
1659
|
+
flush: "post"
|
|
1660
|
+
});
|
|
1661
|
+
const U = I(() => ({
|
|
1662
|
+
isActive: y,
|
|
1663
|
+
isFocused: u,
|
|
1664
|
+
controlRef: H,
|
|
1665
|
+
iconColor: R,
|
|
1666
|
+
blur: o,
|
|
1667
|
+
focus: d
|
|
1668
|
+
}));
|
|
1669
|
+
function K(Z) {
|
|
1670
|
+
Z.target !== document.activeElement && Z.preventDefault();
|
|
1671
|
+
}
|
|
1672
|
+
return de(() => {
|
|
1673
|
+
const Z = e.variant === "outlined", N = !!(l["prepend-inner"] || e.prependInnerIcon), ne = !!(e.clearable || l.clear) && !e.disabled, ue = !!(l["append-inner"] || e.appendInnerIcon || ne), D = () => l.label ? l.label({
|
|
1674
|
+
...U.value,
|
|
1675
|
+
label: e.label,
|
|
1676
|
+
props: {
|
|
1677
|
+
for: C.value
|
|
1678
|
+
}
|
|
1679
|
+
}) : e.label;
|
|
1680
|
+
return b("div", L({
|
|
1681
|
+
class: ["v-field", {
|
|
1682
|
+
"v-field--active": y.value,
|
|
1683
|
+
"v-field--appended": ue,
|
|
1684
|
+
"v-field--center-affix": e.centerAffix ?? !A.value,
|
|
1685
|
+
"v-field--disabled": e.disabled,
|
|
1686
|
+
"v-field--dirty": e.dirty,
|
|
1687
|
+
"v-field--error": e.error,
|
|
1688
|
+
"v-field--glow": e.glow,
|
|
1689
|
+
"v-field--flat": e.flat,
|
|
1690
|
+
"v-field--has-background": !!e.bgColor,
|
|
1691
|
+
"v-field--persistent-clear": e.persistentClear,
|
|
1692
|
+
"v-field--prepended": N,
|
|
1693
|
+
"v-field--reverse": e.reverse,
|
|
1694
|
+
"v-field--single-line": e.singleLine,
|
|
1695
|
+
"v-field--no-label": !D(),
|
|
1696
|
+
[`v-field--variant-${e.variant}`]: !0
|
|
1697
|
+
}, i.value, E.value, s.value, c.value, m.value, g.value, e.class],
|
|
1698
|
+
style: [q.value, e.style],
|
|
1699
|
+
onClick: K
|
|
1700
|
+
}, t), [b("div", {
|
|
1701
|
+
class: "v-field__overlay"
|
|
1702
|
+
}, null), f(Tl, {
|
|
1703
|
+
name: "v-field",
|
|
1704
|
+
active: !!e.loading,
|
|
1705
|
+
color: e.error ? "error" : typeof e.loading == "string" ? e.loading : e.color
|
|
1706
|
+
}, {
|
|
1707
|
+
default: l.loader
|
|
1708
|
+
}), N && b("div", {
|
|
1709
|
+
key: "prepend",
|
|
1710
|
+
class: "v-field__prepend-inner"
|
|
1711
|
+
}, [l["prepend-inner"] ? l["prepend-inner"](U.value) : e.prependInnerIcon && f(r, {
|
|
1712
|
+
key: "prepend-icon",
|
|
1713
|
+
name: "prependInner",
|
|
1714
|
+
color: R.value
|
|
1715
|
+
}, null)]), b("div", {
|
|
1716
|
+
class: "v-field__field",
|
|
1717
|
+
"data-no-activator": ""
|
|
1718
|
+
}, [["filled", "solo", "solo-inverted", "solo-filled"].includes(e.variant) && x.value && f(ht, {
|
|
1719
|
+
key: "floating-label",
|
|
1720
|
+
ref: F,
|
|
1721
|
+
class: oe([te.value]),
|
|
1722
|
+
floating: !0,
|
|
1723
|
+
for: C.value,
|
|
1724
|
+
"aria-hidden": !y.value,
|
|
1725
|
+
style: xe(ee.value)
|
|
1726
|
+
}, {
|
|
1727
|
+
default: () => [D()]
|
|
1728
|
+
}), h.value && f(ht, {
|
|
1729
|
+
key: "label",
|
|
1730
|
+
ref: T,
|
|
1731
|
+
id: e.labelId,
|
|
1732
|
+
for: C.value,
|
|
1733
|
+
"aria-hidden": x.value && y.value
|
|
1734
|
+
}, {
|
|
1735
|
+
default: () => [D()]
|
|
1736
|
+
}), l.default?.({
|
|
1737
|
+
...U.value,
|
|
1738
|
+
props: {
|
|
1739
|
+
id: C.value,
|
|
1740
|
+
class: "v-field__input",
|
|
1741
|
+
"aria-describedby": k.value
|
|
1742
|
+
},
|
|
1743
|
+
focus: d,
|
|
1744
|
+
blur: o
|
|
1745
|
+
}) ?? b("div", {
|
|
1746
|
+
id: C.value,
|
|
1747
|
+
class: "v-field__input",
|
|
1748
|
+
"aria-describedby": k.value
|
|
1749
|
+
}, null)]), ne && f(Cl, {
|
|
1750
|
+
key: "clear"
|
|
1751
|
+
}, {
|
|
1752
|
+
default: () => [He(b("div", {
|
|
1753
|
+
class: "v-field__clearable",
|
|
1754
|
+
onMousedown: ($) => {
|
|
1755
|
+
$.preventDefault(), $.stopPropagation();
|
|
1756
|
+
}
|
|
1757
|
+
}, [f(Ae, {
|
|
1758
|
+
defaults: {
|
|
1759
|
+
VIcon: {
|
|
1760
|
+
icon: e.clearIcon
|
|
1761
|
+
}
|
|
1762
|
+
}
|
|
1763
|
+
}, {
|
|
1764
|
+
default: () => [l.clear ? l.clear({
|
|
1765
|
+
...U.value,
|
|
1766
|
+
props: {
|
|
1767
|
+
onFocus: d,
|
|
1768
|
+
onBlur: o,
|
|
1769
|
+
onClick: e["onClick:clear"],
|
|
1770
|
+
tabindex: -1
|
|
1771
|
+
}
|
|
1772
|
+
}) : f(r, {
|
|
1773
|
+
name: "clear",
|
|
1774
|
+
onFocus: d,
|
|
1775
|
+
onBlur: o,
|
|
1776
|
+
tabindex: -1
|
|
1777
|
+
}, null)]
|
|
1778
|
+
})]), [[Ct, e.dirty]])]
|
|
1779
|
+
}), ue && b("div", {
|
|
1780
|
+
key: "append",
|
|
1781
|
+
class: "v-field__append-inner"
|
|
1782
|
+
}, [l["append-inner"] ? l["append-inner"](U.value) : e.appendInnerIcon && f(r, {
|
|
1783
|
+
key: "append-icon",
|
|
1784
|
+
name: "appendInner",
|
|
1785
|
+
color: R.value
|
|
1786
|
+
}, null)]), b("div", {
|
|
1787
|
+
class: oe(["v-field__outline", te.value]),
|
|
1788
|
+
style: xe(ee.value)
|
|
1789
|
+
}, [Z && b(ce, null, [b("div", {
|
|
1790
|
+
class: "v-field__outline__start"
|
|
1791
|
+
}, null), x.value && b("div", {
|
|
1792
|
+
class: "v-field__outline__notch"
|
|
1793
|
+
}, [f(ht, {
|
|
1794
|
+
ref: F,
|
|
1795
|
+
floating: !0,
|
|
1796
|
+
for: C.value,
|
|
1797
|
+
"aria-hidden": !y.value
|
|
1798
|
+
}, {
|
|
1799
|
+
default: () => [D()]
|
|
1800
|
+
})]), b("div", {
|
|
1801
|
+
class: "v-field__outline__end"
|
|
1802
|
+
}, null)]), A.value && x.value && f(ht, {
|
|
1803
|
+
ref: F,
|
|
1804
|
+
floating: !0,
|
|
1805
|
+
for: C.value,
|
|
1806
|
+
"aria-hidden": !y.value
|
|
1807
|
+
}, {
|
|
1808
|
+
default: () => [D()]
|
|
1809
|
+
})])]);
|
|
1810
|
+
}), {
|
|
1811
|
+
controlRef: H,
|
|
1812
|
+
fieldIconColor: R
|
|
1813
|
+
};
|
|
1814
|
+
}
|
|
1815
|
+
}), ka = G({
|
|
1816
|
+
autocomplete: String
|
|
1817
|
+
}, "autocomplete");
|
|
1818
|
+
function en(e) {
|
|
1819
|
+
const a = je(), t = J(0), n = B(() => e.autocomplete === "suppress"), l = B(() => {
|
|
1820
|
+
if (e.name)
|
|
1821
|
+
return n.value ? `${e.name}-${a}-${t.value}` : e.name;
|
|
1822
|
+
}), i = B(() => n.value ? "off" : e.autocomplete);
|
|
1823
|
+
return {
|
|
1824
|
+
isSuppressing: n,
|
|
1825
|
+
fieldAutocomplete: i,
|
|
1826
|
+
fieldName: l,
|
|
1827
|
+
update: () => t.value = (/* @__PURE__ */ new Date()).getTime()
|
|
1828
|
+
};
|
|
1829
|
+
}
|
|
1830
|
+
function Sa(e) {
|
|
1831
|
+
function a(t, n) {
|
|
1832
|
+
if (!e.autofocus || !t) return;
|
|
1833
|
+
const l = n[0].target;
|
|
1834
|
+
(l.matches("input,textarea") ? l : l.querySelector("input,textarea"))?.focus();
|
|
1835
|
+
}
|
|
1836
|
+
return {
|
|
1837
|
+
onIntersect: a
|
|
1838
|
+
};
|
|
1839
|
+
}
|
|
1840
|
+
const Ca = ["color", "file", "time", "date", "datetime-local", "week", "month"], Tt = G({
|
|
1841
|
+
autofocus: Boolean,
|
|
1842
|
+
counter: [Boolean, Number, String],
|
|
1843
|
+
counterValue: [Number, Function],
|
|
1844
|
+
prefix: String,
|
|
1845
|
+
placeholder: String,
|
|
1846
|
+
persistentPlaceholder: Boolean,
|
|
1847
|
+
persistentCounter: Boolean,
|
|
1848
|
+
suffix: String,
|
|
1849
|
+
role: String,
|
|
1850
|
+
type: {
|
|
1851
|
+
type: String,
|
|
1852
|
+
default: "text"
|
|
1853
|
+
},
|
|
1854
|
+
modelModifiers: Object,
|
|
1855
|
+
...ka(),
|
|
1856
|
+
...Ge(Ql(), ["direction"]),
|
|
1857
|
+
...Zl()
|
|
1858
|
+
}, "VTextField"), Ke = ie()({
|
|
1859
|
+
name: "VTextField",
|
|
1860
|
+
directives: {
|
|
1861
|
+
vIntersect: nl
|
|
1862
|
+
},
|
|
1863
|
+
inheritAttrs: !1,
|
|
1864
|
+
props: Tt(),
|
|
1865
|
+
emits: {
|
|
1866
|
+
"click:control": (e) => !0,
|
|
1867
|
+
"mousedown:control": (e) => !0,
|
|
1868
|
+
"update:focused": (e) => !0,
|
|
1869
|
+
"update:modelValue": (e) => !0
|
|
1870
|
+
},
|
|
1871
|
+
setup(e, a) {
|
|
1872
|
+
let {
|
|
1873
|
+
attrs: t,
|
|
1874
|
+
emit: n,
|
|
1875
|
+
slots: l
|
|
1876
|
+
} = a;
|
|
1877
|
+
const i = we(e, "modelValue"), {
|
|
1878
|
+
isFocused: c,
|
|
1879
|
+
focus: s,
|
|
1880
|
+
blur: u
|
|
1881
|
+
} = Yl(e), {
|
|
1882
|
+
onIntersect: d
|
|
1883
|
+
} = Sa(e), o = I(() => typeof e.counterValue == "function" ? e.counterValue(i.value) : typeof e.counterValue == "number" ? e.counterValue : (i.value ?? "").toString().length), r = I(() => {
|
|
1884
|
+
if (t.maxlength) return t.maxlength;
|
|
1885
|
+
if (!(!e.counter || typeof e.counter != "number" && typeof e.counter != "string"))
|
|
1886
|
+
return e.counter;
|
|
1887
|
+
}), m = I(() => ["plain", "underlined"].includes(e.variant)), g = W(), y = W(), h = W(), x = en(e), _ = I(() => Ca.includes(e.type) || e.persistentPlaceholder || c.value || e.active);
|
|
1888
|
+
function C() {
|
|
1889
|
+
x.isSuppressing.value && x.update(), c.value || s(), Ve(() => {
|
|
1890
|
+
h.value !== document.activeElement && h.value?.focus();
|
|
1891
|
+
});
|
|
1892
|
+
}
|
|
1893
|
+
function k(A) {
|
|
1894
|
+
n("mousedown:control", A), A.target !== h.value && (C(), A.preventDefault());
|
|
1895
|
+
}
|
|
1896
|
+
function T(A) {
|
|
1897
|
+
n("click:control", A);
|
|
1898
|
+
}
|
|
1899
|
+
function F(A, p) {
|
|
1900
|
+
A.stopPropagation(), C(), Ve(() => {
|
|
1901
|
+
p(), _l(e["onClick:clear"], A);
|
|
1902
|
+
});
|
|
1903
|
+
}
|
|
1904
|
+
function H(A) {
|
|
1905
|
+
const p = A.target;
|
|
1906
|
+
if (!(e.modelModifiers?.trim && ["text", "search", "password", "tel", "url"].includes(e.type))) {
|
|
1907
|
+
i.value = p.value;
|
|
1908
|
+
return;
|
|
1909
|
+
}
|
|
1910
|
+
const R = p.value, E = p.selectionStart, q = p.selectionEnd;
|
|
1911
|
+
i.value = R, Ve(() => {
|
|
1912
|
+
let te = 0;
|
|
1913
|
+
R.trimStart().length === p.value.length && (te = R.length - p.value.length), E != null && (p.selectionStart = E - te), q != null && (p.selectionEnd = q - te);
|
|
1914
|
+
});
|
|
1915
|
+
}
|
|
1916
|
+
return de(() => {
|
|
1917
|
+
const A = !!(l.counter || e.counter !== !1 && e.counter != null), p = !!(A || l.details), [R, E] = wl(t), {
|
|
1918
|
+
modelValue: q,
|
|
1919
|
+
...te
|
|
1920
|
+
} = rl.filterProps(e), ee = cl.filterProps(e);
|
|
1921
|
+
return f(rl, L({
|
|
1922
|
+
ref: g,
|
|
1923
|
+
modelValue: i.value,
|
|
1924
|
+
"onUpdate:modelValue": (U) => i.value = U,
|
|
1925
|
+
class: ["v-text-field", {
|
|
1926
|
+
"v-text-field--prefixed": e.prefix,
|
|
1927
|
+
"v-text-field--suffixed": e.suffix,
|
|
1928
|
+
"v-input--plain-underlined": m.value
|
|
1929
|
+
}, e.class],
|
|
1930
|
+
style: e.style
|
|
1931
|
+
}, R, te, {
|
|
1932
|
+
centerAffix: !m.value,
|
|
1933
|
+
focused: c.value
|
|
1934
|
+
}), {
|
|
1935
|
+
...l,
|
|
1936
|
+
default: (U) => {
|
|
1937
|
+
let {
|
|
1938
|
+
id: K,
|
|
1939
|
+
isDisabled: Z,
|
|
1940
|
+
isDirty: N,
|
|
1941
|
+
isReadonly: ne,
|
|
1942
|
+
isValid: ue,
|
|
1943
|
+
hasDetails: D,
|
|
1944
|
+
reset: $
|
|
1945
|
+
} = U;
|
|
1946
|
+
return f(cl, L({
|
|
1947
|
+
ref: y,
|
|
1948
|
+
onMousedown: k,
|
|
1949
|
+
onClick: T,
|
|
1950
|
+
"onClick:clear": (w) => F(w, $),
|
|
1951
|
+
role: e.role
|
|
1952
|
+
}, Ge(ee, ["onClick:clear"]), {
|
|
1953
|
+
id: K.value,
|
|
1954
|
+
labelId: `${K.value}-label`,
|
|
1955
|
+
active: _.value || N.value,
|
|
1956
|
+
dirty: N.value || e.dirty,
|
|
1957
|
+
disabled: Z.value,
|
|
1958
|
+
focused: c.value,
|
|
1959
|
+
details: D.value,
|
|
1960
|
+
error: ue.value === !1
|
|
1961
|
+
}), {
|
|
1962
|
+
...l,
|
|
1963
|
+
default: (w) => {
|
|
1964
|
+
let {
|
|
1965
|
+
props: {
|
|
1966
|
+
class: v,
|
|
1967
|
+
...P
|
|
1968
|
+
},
|
|
1969
|
+
controlRef: V
|
|
1970
|
+
} = w;
|
|
1971
|
+
const O = b("input", L({
|
|
1972
|
+
ref: (j) => h.value = V.value = j,
|
|
1973
|
+
value: i.value,
|
|
1974
|
+
onInput: H,
|
|
1975
|
+
autofocus: e.autofocus,
|
|
1976
|
+
readonly: ne.value,
|
|
1977
|
+
disabled: Z.value,
|
|
1978
|
+
name: x.fieldName.value,
|
|
1979
|
+
autocomplete: x.fieldAutocomplete.value,
|
|
1980
|
+
placeholder: e.placeholder,
|
|
1981
|
+
size: 1,
|
|
1982
|
+
role: e.role,
|
|
1983
|
+
type: e.type,
|
|
1984
|
+
onFocus: s,
|
|
1985
|
+
onBlur: u,
|
|
1986
|
+
"aria-labelledby": `${K.value}-label`
|
|
1987
|
+
}, P, E), null);
|
|
1988
|
+
return b(ce, null, [e.prefix && b("span", {
|
|
1989
|
+
class: "v-text-field__prefix"
|
|
1990
|
+
}, [b("span", {
|
|
1991
|
+
class: "v-text-field__prefix__text"
|
|
1992
|
+
}, [e.prefix])]), He(l.default ? b("div", {
|
|
1993
|
+
class: oe(v),
|
|
1994
|
+
"data-no-activator": ""
|
|
1995
|
+
}, [l.default({
|
|
1996
|
+
id: K
|
|
1997
|
+
}), O]) : fn(O, {
|
|
1998
|
+
class: v
|
|
1999
|
+
}), [[nl, d, null, {
|
|
2000
|
+
once: !0
|
|
2001
|
+
}]]), e.suffix && b("span", {
|
|
2002
|
+
class: "v-text-field__suffix"
|
|
2003
|
+
}, [b("span", {
|
|
2004
|
+
class: "v-text-field__suffix__text"
|
|
2005
|
+
}, [e.suffix])])]);
|
|
2006
|
+
}
|
|
2007
|
+
});
|
|
2008
|
+
},
|
|
2009
|
+
details: p ? (U) => b(ce, null, [l.details?.(U), A && b(ce, null, [b("span", null, null), f(ha, {
|
|
2010
|
+
active: e.persistentCounter || c.value,
|
|
2011
|
+
value: o.value,
|
|
2012
|
+
max: r.value,
|
|
2013
|
+
disabled: e.disabled
|
|
2014
|
+
}, l.counter)])]) : void 0
|
|
2015
|
+
});
|
|
2016
|
+
}), gt({}, g, y, h);
|
|
2017
|
+
}
|
|
2018
|
+
}), Va = G({
|
|
2019
|
+
renderless: Boolean,
|
|
2020
|
+
...pe()
|
|
2021
|
+
}, "VVirtualScrollItem"), xa = ie()({
|
|
2022
|
+
name: "VVirtualScrollItem",
|
|
2023
|
+
inheritAttrs: !1,
|
|
2024
|
+
props: Va(),
|
|
2025
|
+
emits: {
|
|
2026
|
+
"update:height": (e) => !0
|
|
2027
|
+
},
|
|
2028
|
+
setup(e, a) {
|
|
2029
|
+
let {
|
|
2030
|
+
attrs: t,
|
|
2031
|
+
emit: n,
|
|
2032
|
+
slots: l
|
|
2033
|
+
} = a;
|
|
2034
|
+
const {
|
|
2035
|
+
resizeRef: i,
|
|
2036
|
+
contentRect: c
|
|
2037
|
+
} = kt(void 0, "border");
|
|
2038
|
+
re(() => c.value?.height, (s) => {
|
|
2039
|
+
s != null && n("update:height", s);
|
|
2040
|
+
}), de(() => e.renderless ? b(ce, null, [l.default?.({
|
|
2041
|
+
itemRef: i
|
|
2042
|
+
})]) : b("div", L({
|
|
2043
|
+
ref: i,
|
|
2044
|
+
class: ["v-virtual-scroll__item", e.class],
|
|
2045
|
+
style: e.style
|
|
2046
|
+
}, t), [l.default?.()]));
|
|
2047
|
+
}
|
|
2048
|
+
}), Ia = -1, wa = 1, Et = 100, _a = G({
|
|
2049
|
+
itemHeight: {
|
|
2050
|
+
type: [Number, String],
|
|
2051
|
+
default: null
|
|
2052
|
+
},
|
|
2053
|
+
itemKey: {
|
|
2054
|
+
type: [String, Array, Function],
|
|
2055
|
+
default: null
|
|
2056
|
+
},
|
|
2057
|
+
height: [Number, String]
|
|
2058
|
+
}, "virtual");
|
|
2059
|
+
function Pa(e, a) {
|
|
2060
|
+
const t = yl(), n = J(0);
|
|
2061
|
+
Rt(() => {
|
|
2062
|
+
n.value = parseFloat(e.itemHeight || 0);
|
|
2063
|
+
});
|
|
2064
|
+
const l = J(0), i = J(Math.ceil(
|
|
2065
|
+
// Assume 16px items filling the entire screen height if
|
|
2066
|
+
// not provided. This is probably incorrect but it minimises
|
|
2067
|
+
// the chance of ending up with empty space at the bottom.
|
|
2068
|
+
// The default value is set here to avoid poisoning getSize()
|
|
2069
|
+
(parseInt(e.height) || t.height.value) / (n.value || 16)
|
|
2070
|
+
) || 1), c = J(0), s = J(0), u = W(), d = W();
|
|
2071
|
+
let o = 0;
|
|
2072
|
+
const {
|
|
2073
|
+
resizeRef: r,
|
|
2074
|
+
contentRect: m
|
|
2075
|
+
} = kt();
|
|
2076
|
+
Rt(() => {
|
|
2077
|
+
r.value = u.value;
|
|
2078
|
+
});
|
|
2079
|
+
const g = I(() => u.value === document.documentElement ? t.height.value : m.value?.height || parseInt(e.height) || 0), y = I(() => !!(u.value && d.value && g.value && n.value));
|
|
2080
|
+
let h = Array.from({
|
|
2081
|
+
length: a.value.length
|
|
2082
|
+
}), x = Array.from({
|
|
2083
|
+
length: a.value.length
|
|
2084
|
+
});
|
|
2085
|
+
const _ = J(0);
|
|
2086
|
+
let C = -1;
|
|
2087
|
+
function k(D) {
|
|
2088
|
+
return h[D] || n.value;
|
|
2089
|
+
}
|
|
2090
|
+
const T = _n(() => {
|
|
2091
|
+
const D = performance.now();
|
|
2092
|
+
x[0] = 0;
|
|
2093
|
+
const $ = a.value.length;
|
|
2094
|
+
for (let w = 1; w <= $; w++)
|
|
2095
|
+
x[w] = (x[w - 1] || 0) + k(w - 1);
|
|
2096
|
+
_.value = Math.max(_.value, performance.now() - D);
|
|
2097
|
+
}, _), F = re(y, (D) => {
|
|
2098
|
+
D && (F(), o = d.value.offsetTop, T.immediate(), Z(), ~C && Ve(() => {
|
|
2099
|
+
at && window.requestAnimationFrame(() => {
|
|
2100
|
+
ne(C), C = -1;
|
|
2101
|
+
});
|
|
2102
|
+
}));
|
|
2103
|
+
});
|
|
2104
|
+
nt(() => {
|
|
2105
|
+
T.clear();
|
|
2106
|
+
});
|
|
2107
|
+
function H(D, $) {
|
|
2108
|
+
const w = h[D], v = n.value;
|
|
2109
|
+
n.value = v ? Math.min(n.value, $) : $, (w !== $ || v !== n.value) && (h[D] = $, T());
|
|
2110
|
+
}
|
|
2111
|
+
function A(D) {
|
|
2112
|
+
D = Me(D, 0, a.value.length);
|
|
2113
|
+
const $ = Math.floor(D), w = D % 1, v = $ + 1, P = x[$] || 0, V = x[v] || P;
|
|
2114
|
+
return P + (V - P) * w;
|
|
2115
|
+
}
|
|
2116
|
+
function p(D) {
|
|
2117
|
+
return Aa(x, D);
|
|
2118
|
+
}
|
|
2119
|
+
let R = 0, E = 0, q = 0;
|
|
2120
|
+
re(g, (D, $) => {
|
|
2121
|
+
Z(), D < $ && requestAnimationFrame(() => {
|
|
2122
|
+
E = 0, Z();
|
|
2123
|
+
});
|
|
2124
|
+
});
|
|
2125
|
+
let te = -1;
|
|
2126
|
+
function ee() {
|
|
2127
|
+
if (!u.value || !d.value) return;
|
|
2128
|
+
const D = u.value.scrollTop, $ = performance.now();
|
|
2129
|
+
$ - q > 500 ? (E = Math.sign(D - R), o = d.value.offsetTop) : E = D - R, R = D, q = $, window.clearTimeout(te), te = window.setTimeout(U, 500), Z();
|
|
2130
|
+
}
|
|
2131
|
+
function U() {
|
|
2132
|
+
!u.value || !d.value || (E = 0, q = 0, window.clearTimeout(te), Z());
|
|
2133
|
+
}
|
|
2134
|
+
let K = -1;
|
|
2135
|
+
function Z() {
|
|
2136
|
+
cancelAnimationFrame(K), K = requestAnimationFrame(N);
|
|
2137
|
+
}
|
|
2138
|
+
function N() {
|
|
2139
|
+
if (!u.value || !g.value || !n.value) return;
|
|
2140
|
+
const D = R - o, $ = Math.sign(E), w = Math.max(0, D - Et), v = Me(p(w), 0, a.value.length), P = D + g.value + Et, V = Me(p(P) + 1, v + 1, a.value.length);
|
|
2141
|
+
if (
|
|
2142
|
+
// Only update the side we're scrolling towards,
|
|
2143
|
+
// the other side will be updated incidentally
|
|
2144
|
+
($ !== Ia || v < l.value) && ($ !== wa || V > i.value)
|
|
2145
|
+
) {
|
|
2146
|
+
const O = A(l.value) - A(v), j = A(V) - A(i.value);
|
|
2147
|
+
Math.max(O, j) > Et ? (l.value = v, i.value = V) : (v <= 0 && (l.value = v), V >= a.value.length && (i.value = V));
|
|
2148
|
+
}
|
|
2149
|
+
c.value = A(l.value), s.value = A(a.value.length) - A(i.value);
|
|
2150
|
+
}
|
|
2151
|
+
function ne(D) {
|
|
2152
|
+
const $ = A(D);
|
|
2153
|
+
!u.value || D && !$ ? C = D : u.value.scrollTop = $;
|
|
2154
|
+
}
|
|
2155
|
+
const ue = I(() => a.value.slice(l.value, i.value).map((D, $) => {
|
|
2156
|
+
const w = $ + l.value;
|
|
2157
|
+
return {
|
|
2158
|
+
raw: D,
|
|
2159
|
+
index: w,
|
|
2160
|
+
key: El(D, e.itemKey, w)
|
|
2161
|
+
};
|
|
2162
|
+
}));
|
|
2163
|
+
return re(a, () => {
|
|
2164
|
+
h = Array.from({
|
|
2165
|
+
length: a.value.length
|
|
2166
|
+
}), x = Array.from({
|
|
2167
|
+
length: a.value.length
|
|
2168
|
+
}), T.immediate(), Z();
|
|
2169
|
+
}, {
|
|
2170
|
+
deep: 1
|
|
2171
|
+
}), {
|
|
2172
|
+
calculateVisibleItems: Z,
|
|
2173
|
+
containerRef: u,
|
|
2174
|
+
markerRef: d,
|
|
2175
|
+
computedItems: ue,
|
|
2176
|
+
paddingTop: c,
|
|
2177
|
+
paddingBottom: s,
|
|
2178
|
+
scrollToIndex: ne,
|
|
2179
|
+
handleScroll: ee,
|
|
2180
|
+
handleScrollend: U,
|
|
2181
|
+
handleItemResize: H
|
|
2182
|
+
};
|
|
2183
|
+
}
|
|
2184
|
+
function Aa(e, a) {
|
|
2185
|
+
let t = e.length - 1, n = 0, l = 0, i = null, c = -1;
|
|
2186
|
+
if (e[t] < a)
|
|
2187
|
+
return t;
|
|
2188
|
+
for (; n <= t; )
|
|
2189
|
+
if (l = n + t >> 1, i = e[l], i > a)
|
|
2190
|
+
t = l - 1;
|
|
2191
|
+
else if (i < a)
|
|
2192
|
+
c = l, n = l + 1;
|
|
2193
|
+
else return i === a ? l : n;
|
|
2194
|
+
return c;
|
|
2195
|
+
}
|
|
2196
|
+
const Fa = G({
|
|
2197
|
+
items: {
|
|
2198
|
+
type: Array,
|
|
2199
|
+
default: () => []
|
|
2200
|
+
},
|
|
2201
|
+
renderless: Boolean,
|
|
2202
|
+
..._a(),
|
|
2203
|
+
...pe(),
|
|
2204
|
+
...ft()
|
|
2205
|
+
}, "VVirtualScroll"), tn = ie()({
|
|
2206
|
+
name: "VVirtualScroll",
|
|
2207
|
+
props: Fa(),
|
|
2208
|
+
setup(e, a) {
|
|
2209
|
+
let {
|
|
2210
|
+
slots: t
|
|
2211
|
+
} = a;
|
|
2212
|
+
const n = Fl("VVirtualScroll"), {
|
|
2213
|
+
dimensionStyles: l
|
|
2214
|
+
} = vt(e), {
|
|
2215
|
+
calculateVisibleItems: i,
|
|
2216
|
+
containerRef: c,
|
|
2217
|
+
markerRef: s,
|
|
2218
|
+
handleScroll: u,
|
|
2219
|
+
handleScrollend: d,
|
|
2220
|
+
handleItemResize: o,
|
|
2221
|
+
scrollToIndex: r,
|
|
2222
|
+
paddingTop: m,
|
|
2223
|
+
paddingBottom: g,
|
|
2224
|
+
computedItems: y
|
|
2225
|
+
} = Pa(e, B(() => e.items));
|
|
2226
|
+
return $t(() => e.renderless, () => {
|
|
2227
|
+
function h() {
|
|
2228
|
+
const _ = (arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1) ? "addEventListener" : "removeEventListener";
|
|
2229
|
+
c.value === document.documentElement ? (document[_]("scroll", u, {
|
|
2230
|
+
passive: !0
|
|
2231
|
+
}), document[_]("scrollend", d)) : (c.value?.[_]("scroll", u, {
|
|
2232
|
+
passive: !0
|
|
2233
|
+
}), c.value?.[_]("scrollend", d));
|
|
2234
|
+
}
|
|
2235
|
+
Ye(() => {
|
|
2236
|
+
c.value = Pn(n.vnode.el, !0), h(!0);
|
|
2237
|
+
}), nt(h);
|
|
2238
|
+
}), de(() => {
|
|
2239
|
+
const h = y.value.map((x) => f(xa, {
|
|
2240
|
+
key: x.key,
|
|
2241
|
+
renderless: e.renderless,
|
|
2242
|
+
"onUpdate:height": (_) => o(x.index, _)
|
|
2243
|
+
}, {
|
|
2244
|
+
default: (_) => t.default?.({
|
|
2245
|
+
item: x.raw,
|
|
2246
|
+
index: x.index,
|
|
2247
|
+
..._
|
|
2248
|
+
})
|
|
2249
|
+
}));
|
|
2250
|
+
return e.renderless ? b(ce, null, [b("div", {
|
|
2251
|
+
ref: s,
|
|
2252
|
+
class: "v-virtual-scroll__spacer",
|
|
2253
|
+
style: {
|
|
2254
|
+
paddingTop: lt(m.value)
|
|
2255
|
+
}
|
|
2256
|
+
}, null), h, b("div", {
|
|
2257
|
+
class: "v-virtual-scroll__spacer",
|
|
2258
|
+
style: {
|
|
2259
|
+
paddingBottom: lt(g.value)
|
|
2260
|
+
}
|
|
2261
|
+
}, null)]) : b("div", {
|
|
2262
|
+
ref: c,
|
|
2263
|
+
class: oe(["v-virtual-scroll", e.class]),
|
|
2264
|
+
onScrollPassive: u,
|
|
2265
|
+
onScrollend: d,
|
|
2266
|
+
style: xe([l.value, e.style])
|
|
2267
|
+
}, [b("div", {
|
|
2268
|
+
ref: s,
|
|
2269
|
+
class: "v-virtual-scroll__container",
|
|
2270
|
+
style: {
|
|
2271
|
+
paddingTop: lt(m.value),
|
|
2272
|
+
paddingBottom: lt(g.value)
|
|
2273
|
+
}
|
|
2274
|
+
}, [h])]);
|
|
2275
|
+
}), {
|
|
2276
|
+
calculateVisibleItems: i,
|
|
2277
|
+
scrollToIndex: r
|
|
2278
|
+
};
|
|
2279
|
+
}
|
|
2280
|
+
});
|
|
2281
|
+
function ln(e, a) {
|
|
2282
|
+
const t = J(!1);
|
|
2283
|
+
let n;
|
|
2284
|
+
function l(s) {
|
|
2285
|
+
cancelAnimationFrame(n), t.value = !0, n = requestAnimationFrame(() => {
|
|
2286
|
+
n = requestAnimationFrame(() => {
|
|
2287
|
+
t.value = !1;
|
|
2288
|
+
});
|
|
2289
|
+
});
|
|
2290
|
+
}
|
|
2291
|
+
async function i() {
|
|
2292
|
+
await new Promise((s) => requestAnimationFrame(s)), await new Promise((s) => requestAnimationFrame(s)), await new Promise((s) => requestAnimationFrame(s)), await new Promise((s) => {
|
|
2293
|
+
if (t.value) {
|
|
2294
|
+
const u = re(t, () => {
|
|
2295
|
+
u(), s();
|
|
2296
|
+
});
|
|
2297
|
+
} else s();
|
|
2298
|
+
});
|
|
2299
|
+
}
|
|
2300
|
+
async function c(s) {
|
|
2301
|
+
if (s.key === "Tab" && a.value?.focus(), !["PageDown", "PageUp", "Home", "End"].includes(s.key)) return;
|
|
2302
|
+
const u = e.value?.$el;
|
|
2303
|
+
if (!u) return;
|
|
2304
|
+
(s.key === "Home" || s.key === "End") && u.scrollTo({
|
|
2305
|
+
top: s.key === "Home" ? 0 : u.scrollHeight,
|
|
2306
|
+
behavior: "smooth"
|
|
2307
|
+
}), await i();
|
|
2308
|
+
const d = u.querySelectorAll(":scope > :not(.v-virtual-scroll__spacer)");
|
|
2309
|
+
if (s.key === "PageDown" || s.key === "Home") {
|
|
2310
|
+
const o = u.getBoundingClientRect().top;
|
|
2311
|
+
for (const r of d)
|
|
2312
|
+
if (r.getBoundingClientRect().top >= o) {
|
|
2313
|
+
r.focus();
|
|
2314
|
+
break;
|
|
2315
|
+
}
|
|
2316
|
+
} else {
|
|
2317
|
+
const o = u.getBoundingClientRect().bottom;
|
|
2318
|
+
for (const r of [...d].reverse())
|
|
2319
|
+
if (r.getBoundingClientRect().bottom <= o) {
|
|
2320
|
+
r.focus();
|
|
2321
|
+
break;
|
|
2322
|
+
}
|
|
2323
|
+
}
|
|
2324
|
+
}
|
|
2325
|
+
return {
|
|
2326
|
+
onScrollPassive: l,
|
|
2327
|
+
onKeydown: c
|
|
2328
|
+
};
|
|
2329
|
+
}
|
|
2330
|
+
const Da = G({
|
|
2331
|
+
closeText: {
|
|
2332
|
+
type: String,
|
|
2333
|
+
default: "$vuetify.close"
|
|
2334
|
+
},
|
|
2335
|
+
openText: {
|
|
2336
|
+
type: String,
|
|
2337
|
+
default: "$vuetify.open"
|
|
2338
|
+
}
|
|
2339
|
+
}, "autocomplete");
|
|
2340
|
+
function nn(e, a) {
|
|
2341
|
+
const t = je(), n = I(() => `menu-${t}`), l = B(() => mn(a)), i = B(() => n.value);
|
|
2342
|
+
return {
|
|
2343
|
+
menuId: n,
|
|
2344
|
+
ariaExpanded: l,
|
|
2345
|
+
ariaControls: i
|
|
2346
|
+
};
|
|
2347
|
+
}
|
|
2348
|
+
const an = G({
|
|
2349
|
+
chips: Boolean,
|
|
2350
|
+
closableChips: Boolean,
|
|
2351
|
+
eager: Boolean,
|
|
2352
|
+
hideNoData: Boolean,
|
|
2353
|
+
hideSelected: Boolean,
|
|
2354
|
+
listProps: {
|
|
2355
|
+
type: Object
|
|
2356
|
+
},
|
|
2357
|
+
menu: Boolean,
|
|
2358
|
+
menuIcon: {
|
|
2359
|
+
type: be,
|
|
2360
|
+
default: "$dropdown"
|
|
2361
|
+
},
|
|
2362
|
+
menuProps: {
|
|
2363
|
+
type: Object
|
|
2364
|
+
},
|
|
2365
|
+
multiple: Boolean,
|
|
2366
|
+
noDataText: {
|
|
2367
|
+
type: String,
|
|
2368
|
+
default: "$vuetify.noDataText"
|
|
2369
|
+
},
|
|
2370
|
+
openOnClear: Boolean,
|
|
2371
|
+
itemColor: String,
|
|
2372
|
+
noAutoScroll: Boolean,
|
|
2373
|
+
...Da(),
|
|
2374
|
+
...Fn({
|
|
2375
|
+
itemChildren: !1
|
|
2376
|
+
})
|
|
2377
|
+
}, "Select"), Ta = G({
|
|
2378
|
+
...an(),
|
|
2379
|
+
...Ge(Tt({
|
|
2380
|
+
modelValue: null,
|
|
2381
|
+
role: "combobox"
|
|
2382
|
+
}), ["validationValue", "dirty"]),
|
|
2383
|
+
..._t({
|
|
2384
|
+
transition: {
|
|
2385
|
+
component: Nl
|
|
2386
|
+
}
|
|
2387
|
+
})
|
|
2388
|
+
}, "VSelect"), Co = ie()({
|
|
2389
|
+
name: "VSelect",
|
|
2390
|
+
props: Ta(),
|
|
2391
|
+
emits: {
|
|
2392
|
+
"update:focused": (e) => !0,
|
|
2393
|
+
"update:modelValue": (e) => !0,
|
|
2394
|
+
"update:menu": (e) => !0
|
|
2395
|
+
},
|
|
2396
|
+
setup(e, a) {
|
|
2397
|
+
let {
|
|
2398
|
+
slots: t
|
|
2399
|
+
} = a;
|
|
2400
|
+
const {
|
|
2401
|
+
t: n
|
|
2402
|
+
} = Ze(), l = W(), i = W(), c = W(), {
|
|
2403
|
+
items: s,
|
|
2404
|
+
transformIn: u,
|
|
2405
|
+
transformOut: d
|
|
2406
|
+
} = Ol(e), o = we(e, "modelValue", [], (V) => u(V === null ? [null] : De(V)), (V) => {
|
|
2407
|
+
const O = d(V);
|
|
2408
|
+
return e.multiple ? O : O[0] ?? null;
|
|
2409
|
+
}), r = I(() => typeof e.counterValue == "function" ? e.counterValue(o.value) : typeof e.counterValue == "number" ? e.counterValue : o.value.length), m = Dt(e), g = en(e), y = I(() => o.value.map((V) => V.value)), h = J(!1), x = B(() => e.closableChips && !m.isReadonly.value && !m.isDisabled.value), {
|
|
2410
|
+
InputIcon: _
|
|
2411
|
+
} = Ft(e);
|
|
2412
|
+
let C = "", k = 0, T;
|
|
2413
|
+
const F = I(() => e.hideSelected ? s.value.filter((V) => !o.value.some((O) => (e.valueComparator || We)(O, V))) : s.value), H = I(() => e.hideNoData && !F.value.length || m.isReadonly.value || m.isDisabled.value), A = we(e, "menu"), p = I({
|
|
2414
|
+
get: () => A.value,
|
|
2415
|
+
set: (V) => {
|
|
2416
|
+
A.value && !V && i.value?.ΨopenChildren.size || V && H.value || (A.value = V);
|
|
2417
|
+
}
|
|
2418
|
+
}), {
|
|
2419
|
+
menuId: R,
|
|
2420
|
+
ariaExpanded: E,
|
|
2421
|
+
ariaControls: q
|
|
2422
|
+
} = nn(e, p), te = I(() => ({
|
|
2423
|
+
...e.menuProps,
|
|
2424
|
+
activatorProps: {
|
|
2425
|
+
...e.menuProps?.activatorProps || {},
|
|
2426
|
+
"aria-haspopup": "listbox"
|
|
2427
|
+
// Set aria-haspopup to 'listbox'
|
|
2428
|
+
}
|
|
2429
|
+
})), ee = W(), U = ln(ee, l);
|
|
2430
|
+
function K(V) {
|
|
2431
|
+
e.openOnClear && (p.value = !0);
|
|
2432
|
+
}
|
|
2433
|
+
function Z() {
|
|
2434
|
+
H.value || (p.value = !p.value);
|
|
2435
|
+
}
|
|
2436
|
+
function N(V) {
|
|
2437
|
+
St(V) && ne(V);
|
|
2438
|
+
}
|
|
2439
|
+
function ne(V) {
|
|
2440
|
+
if (!V.key || m.isReadonly.value) return;
|
|
2441
|
+
if (["Enter", " ", "ArrowDown", "ArrowUp", "Home", "End"].includes(V.key) && V.preventDefault(), ["Enter", "ArrowDown", " "].includes(V.key) && (p.value = !0), ["Escape", "Tab"].includes(V.key) && (p.value = !1), e.clearable && V.key === "Backspace") {
|
|
2442
|
+
V.preventDefault(), o.value = [], K();
|
|
2443
|
+
return;
|
|
2444
|
+
}
|
|
2445
|
+
V.key === "Home" ? ee.value?.focus("first") : V.key === "End" && ee.value?.focus("last");
|
|
2446
|
+
const O = 1e3;
|
|
2447
|
+
if (!St(V)) return;
|
|
2448
|
+
const j = performance.now();
|
|
2449
|
+
j - T > O && (C = "", k = 0), C += V.key.toLowerCase(), T = j;
|
|
2450
|
+
const ve = F.value;
|
|
2451
|
+
function me() {
|
|
2452
|
+
let z = ge();
|
|
2453
|
+
return z || C.at(-1) === C.at(-2) && (C = C.slice(0, -1), k++, z = ge(), z) || (k = 0, z = ge(), z) ? z : (C = V.key.toLowerCase(), ge());
|
|
2454
|
+
}
|
|
2455
|
+
function ge() {
|
|
2456
|
+
for (let z = k; z < ve.length; z++) {
|
|
2457
|
+
const ye = ve[z];
|
|
2458
|
+
if (ye.title.toLowerCase().startsWith(C))
|
|
2459
|
+
return [ye, z];
|
|
2460
|
+
}
|
|
2461
|
+
}
|
|
2462
|
+
const Fe = me();
|
|
2463
|
+
if (!Fe) return;
|
|
2464
|
+
const [X, fe] = Fe;
|
|
2465
|
+
k = fe, ee.value?.focus(fe), e.multiple || (o.value = [X]);
|
|
2466
|
+
}
|
|
2467
|
+
function ue(V) {
|
|
2468
|
+
let O = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
|
|
2469
|
+
if (!V.props.disabled)
|
|
2470
|
+
if (e.multiple) {
|
|
2471
|
+
const j = o.value.findIndex((me) => (e.valueComparator || We)(me.value, V.value)), ve = O ?? !~j;
|
|
2472
|
+
if (~j) {
|
|
2473
|
+
const me = ve ? [...o.value, V] : [...o.value];
|
|
2474
|
+
me.splice(j, 1), o.value = me;
|
|
2475
|
+
} else ve && (o.value = [...o.value, V]);
|
|
2476
|
+
} else {
|
|
2477
|
+
const j = O !== !1;
|
|
2478
|
+
o.value = j ? [V] : [], Ve(() => {
|
|
2479
|
+
p.value = !1;
|
|
2480
|
+
});
|
|
2481
|
+
}
|
|
2482
|
+
}
|
|
2483
|
+
function D(V) {
|
|
2484
|
+
ee.value?.$el.contains(V.relatedTarget) || (p.value = !1);
|
|
2485
|
+
}
|
|
2486
|
+
function $() {
|
|
2487
|
+
e.eager && c.value?.calculateVisibleItems();
|
|
2488
|
+
}
|
|
2489
|
+
function w() {
|
|
2490
|
+
h.value && l.value?.focus();
|
|
2491
|
+
}
|
|
2492
|
+
function v(V) {
|
|
2493
|
+
h.value = !0;
|
|
2494
|
+
}
|
|
2495
|
+
function P(V) {
|
|
2496
|
+
if (V == null) o.value = [];
|
|
2497
|
+
else if (ot(l.value, ":autofill") || ot(l.value, ":-webkit-autofill")) {
|
|
2498
|
+
const O = s.value.find((j) => j.title === V);
|
|
2499
|
+
O && ue(O);
|
|
2500
|
+
} else l.value && (l.value.value = "");
|
|
2501
|
+
}
|
|
2502
|
+
return re(p, () => {
|
|
2503
|
+
if (!e.hideSelected && p.value && o.value.length) {
|
|
2504
|
+
const V = F.value.findIndex((O) => o.value.some((j) => (e.valueComparator || We)(j.value, O.value)));
|
|
2505
|
+
at && !e.noAutoScroll && window.requestAnimationFrame(() => {
|
|
2506
|
+
V >= 0 && c.value?.scrollToIndex(V);
|
|
2507
|
+
});
|
|
2508
|
+
}
|
|
2509
|
+
}), re(s, (V, O) => {
|
|
2510
|
+
p.value || h.value && e.hideNoData && !O.length && V.length && (p.value = !0);
|
|
2511
|
+
}), de(() => {
|
|
2512
|
+
const V = !!(e.chips || t.chip), O = !!(!e.hideNoData || F.value.length || t["prepend-item"] || t["append-item"] || t["no-data"]), j = o.value.length > 0, ve = Ke.filterProps(e), me = j || !h.value && e.label && !e.persistentPlaceholder ? void 0 : e.placeholder;
|
|
2513
|
+
return f(Ke, L({
|
|
2514
|
+
ref: l
|
|
2515
|
+
}, ve, {
|
|
2516
|
+
modelValue: o.value.map((ge) => ge.props.title).join(", "),
|
|
2517
|
+
name: void 0,
|
|
2518
|
+
"onUpdate:modelValue": P,
|
|
2519
|
+
focused: h.value,
|
|
2520
|
+
"onUpdate:focused": (ge) => h.value = ge,
|
|
2521
|
+
validationValue: o.externalValue,
|
|
2522
|
+
counterValue: r.value,
|
|
2523
|
+
dirty: j,
|
|
2524
|
+
class: ["v-select", {
|
|
2525
|
+
"v-select--active-menu": p.value,
|
|
2526
|
+
"v-select--chips": !!e.chips,
|
|
2527
|
+
[`v-select--${e.multiple ? "multiple" : "single"}`]: !0,
|
|
2528
|
+
"v-select--selected": o.value.length,
|
|
2529
|
+
"v-select--selection-slot": !!t.selection
|
|
2530
|
+
}, e.class],
|
|
2531
|
+
style: e.style,
|
|
2532
|
+
inputmode: "none",
|
|
2533
|
+
placeholder: me,
|
|
2534
|
+
"onClick:clear": K,
|
|
2535
|
+
"onMousedown:control": Z,
|
|
2536
|
+
onBlur: D,
|
|
2537
|
+
onKeydown: ne,
|
|
2538
|
+
"aria-expanded": E.value,
|
|
2539
|
+
"aria-controls": q.value
|
|
2540
|
+
}), {
|
|
2541
|
+
...t,
|
|
2542
|
+
default: (ge) => {
|
|
2543
|
+
let {
|
|
2544
|
+
id: Fe
|
|
2545
|
+
} = ge;
|
|
2546
|
+
return b(ce, null, [b("select", {
|
|
2547
|
+
hidden: !0,
|
|
2548
|
+
multiple: e.multiple,
|
|
2549
|
+
name: g.fieldName.value
|
|
2550
|
+
}, [s.value.map((X) => b("option", {
|
|
2551
|
+
key: X.value,
|
|
2552
|
+
value: X.value,
|
|
2553
|
+
selected: y.value.includes(X.value)
|
|
2554
|
+
}, null))]), f(Rl, L({
|
|
2555
|
+
id: R.value,
|
|
2556
|
+
ref: i,
|
|
2557
|
+
modelValue: p.value,
|
|
2558
|
+
"onUpdate:modelValue": (X) => p.value = X,
|
|
2559
|
+
activator: "parent",
|
|
2560
|
+
contentClass: "v-select__content",
|
|
2561
|
+
disabled: H.value,
|
|
2562
|
+
eager: e.eager,
|
|
2563
|
+
maxHeight: 310,
|
|
2564
|
+
openOnClick: !1,
|
|
2565
|
+
closeOnContentClick: !1,
|
|
2566
|
+
transition: e.transition,
|
|
2567
|
+
onAfterEnter: $,
|
|
2568
|
+
onAfterLeave: w
|
|
2569
|
+
}, te.value), {
|
|
2570
|
+
default: () => [O && f(Yt, L({
|
|
2571
|
+
ref: ee,
|
|
2572
|
+
selected: y.value,
|
|
2573
|
+
selectStrategy: e.multiple ? "independent" : "single-independent",
|
|
2574
|
+
onMousedown: (X) => X.preventDefault(),
|
|
2575
|
+
onKeydown: N,
|
|
2576
|
+
onFocusin: v,
|
|
2577
|
+
tabindex: "-1",
|
|
2578
|
+
selectable: !!F.value.length,
|
|
2579
|
+
"aria-live": "polite",
|
|
2580
|
+
"aria-labelledby": `${Fe.value}-label`,
|
|
2581
|
+
"aria-multiselectable": e.multiple,
|
|
2582
|
+
color: e.itemColor ?? e.color
|
|
2583
|
+
}, U, e.listProps), {
|
|
2584
|
+
default: () => [t["prepend-item"]?.(), !F.value.length && !e.hideNoData && (t["no-data"]?.() ?? f(it, {
|
|
2585
|
+
key: "no-data",
|
|
2586
|
+
title: n(e.noDataText)
|
|
2587
|
+
}, null)), f(tn, {
|
|
2588
|
+
ref: c,
|
|
2589
|
+
renderless: !0,
|
|
2590
|
+
items: F.value,
|
|
2591
|
+
itemKey: "value"
|
|
2592
|
+
}, {
|
|
2593
|
+
default: (X) => {
|
|
2594
|
+
let {
|
|
2595
|
+
item: fe,
|
|
2596
|
+
index: z,
|
|
2597
|
+
itemRef: ye
|
|
2598
|
+
} = X;
|
|
2599
|
+
const S = An(fe.props), Y = L(fe.props, {
|
|
2600
|
+
ref: ye,
|
|
2601
|
+
key: fe.value,
|
|
2602
|
+
onClick: () => ue(fe, null),
|
|
2603
|
+
"aria-posinset": z + 1,
|
|
2604
|
+
"aria-setsize": F.value.length
|
|
2605
|
+
});
|
|
2606
|
+
return fe.type === "divider" ? t.divider?.({
|
|
2607
|
+
props: fe.raw,
|
|
2608
|
+
index: z
|
|
2609
|
+
}) ?? f(Le, L(fe.props, {
|
|
2610
|
+
key: `divider-${z}`
|
|
2611
|
+
}), null) : fe.type === "subheader" ? t.subheader?.({
|
|
2612
|
+
props: fe.raw,
|
|
2613
|
+
index: z
|
|
2614
|
+
}) ?? f(Ml, L(fe.props, {
|
|
2615
|
+
key: `subheader-${z}`
|
|
2616
|
+
}), null) : t.item?.({
|
|
2617
|
+
item: fe,
|
|
2618
|
+
index: z,
|
|
2619
|
+
props: Y
|
|
2620
|
+
}) ?? f(it, L(Y, {
|
|
2621
|
+
role: "option"
|
|
2622
|
+
}), {
|
|
2623
|
+
prepend: (Q) => {
|
|
2624
|
+
let {
|
|
2625
|
+
isSelected: ae
|
|
2626
|
+
} = Q;
|
|
2627
|
+
return b(ce, null, [e.multiple && !e.hideSelected ? f(Jl, {
|
|
2628
|
+
key: fe.value,
|
|
2629
|
+
modelValue: ae,
|
|
2630
|
+
ripple: !1,
|
|
2631
|
+
tabindex: "-1",
|
|
2632
|
+
"aria-hidden": !0,
|
|
2633
|
+
onClick: (Ce) => Ce.preventDefault()
|
|
2634
|
+
}, null) : void 0, S.prependAvatar && f(Xe, {
|
|
2635
|
+
image: S.prependAvatar
|
|
2636
|
+
}, null), S.prependIcon && f(Se, {
|
|
2637
|
+
icon: S.prependIcon
|
|
2638
|
+
}, null)]);
|
|
2639
|
+
}
|
|
2640
|
+
});
|
|
2641
|
+
}
|
|
2642
|
+
}), t["append-item"]?.()]
|
|
2643
|
+
})]
|
|
2644
|
+
}), o.value.map((X, fe) => {
|
|
2645
|
+
function z(Q) {
|
|
2646
|
+
Q.stopPropagation(), Q.preventDefault(), ue(X, !1);
|
|
2647
|
+
}
|
|
2648
|
+
const ye = L(st.filterProps(X.props), {
|
|
2649
|
+
"onClick:close": z,
|
|
2650
|
+
onKeydown(Q) {
|
|
2651
|
+
Q.key !== "Enter" && Q.key !== " " || (Q.preventDefault(), Q.stopPropagation(), z(Q));
|
|
2652
|
+
},
|
|
2653
|
+
onMousedown(Q) {
|
|
2654
|
+
Q.preventDefault(), Q.stopPropagation();
|
|
2655
|
+
},
|
|
2656
|
+
modelValue: !0,
|
|
2657
|
+
"onUpdate:modelValue": void 0
|
|
2658
|
+
}), S = V ? !!t.chip : !!t.selection, Y = S ? $l(V ? t.chip({
|
|
2659
|
+
item: X,
|
|
2660
|
+
index: fe,
|
|
2661
|
+
props: ye
|
|
2662
|
+
}) : t.selection({
|
|
2663
|
+
item: X,
|
|
2664
|
+
index: fe
|
|
2665
|
+
})) : void 0;
|
|
2666
|
+
if (!(S && !Y))
|
|
2667
|
+
return b("div", {
|
|
2668
|
+
key: X.value,
|
|
2669
|
+
class: "v-select__selection"
|
|
2670
|
+
}, [V ? t.chip ? f(Ae, {
|
|
2671
|
+
key: "chip-defaults",
|
|
2672
|
+
defaults: {
|
|
2673
|
+
VChip: {
|
|
2674
|
+
closable: x.value,
|
|
2675
|
+
size: "small",
|
|
2676
|
+
text: X.title
|
|
2677
|
+
}
|
|
2678
|
+
}
|
|
2679
|
+
}, {
|
|
2680
|
+
default: () => [Y]
|
|
2681
|
+
}) : f(st, L({
|
|
2682
|
+
key: "chip",
|
|
2683
|
+
closable: x.value,
|
|
2684
|
+
size: "small",
|
|
2685
|
+
text: X.title,
|
|
2686
|
+
disabled: X.props.disabled
|
|
2687
|
+
}, ye), null) : Y ?? b("span", {
|
|
2688
|
+
class: "v-select__selection-text"
|
|
2689
|
+
}, [X.title, e.multiple && fe < o.value.length - 1 && b("span", {
|
|
2690
|
+
class: "v-select__selection-comma"
|
|
2691
|
+
}, [vl(",")])])]);
|
|
2692
|
+
})]);
|
|
2693
|
+
},
|
|
2694
|
+
"append-inner": function() {
|
|
2695
|
+
for (var ge = arguments.length, Fe = new Array(ge), X = 0; X < ge; X++)
|
|
2696
|
+
Fe[X] = arguments[X];
|
|
2697
|
+
return b(ce, null, [t["append-inner"]?.(...Fe), e.menuIcon ? f(Se, {
|
|
2698
|
+
class: "v-select__menu-icon",
|
|
2699
|
+
color: l.value?.fieldIconColor,
|
|
2700
|
+
icon: e.menuIcon,
|
|
2701
|
+
"aria-hidden": !0
|
|
2702
|
+
}, null) : void 0, e.appendInnerIcon && f(_, {
|
|
2703
|
+
key: "append-icon",
|
|
2704
|
+
name: "appendInner",
|
|
2705
|
+
color: Fe[0].iconColor.value
|
|
2706
|
+
}, null)]);
|
|
2707
|
+
}
|
|
2708
|
+
});
|
|
2709
|
+
}), gt({
|
|
2710
|
+
isFocused: h,
|
|
2711
|
+
menu: p,
|
|
2712
|
+
select: ue
|
|
2713
|
+
}, l);
|
|
2714
|
+
}
|
|
2715
|
+
}), Ba = (e, a, t) => {
|
|
2716
|
+
if (e == null || a == null) return -1;
|
|
2717
|
+
if (!a.length) return 0;
|
|
2718
|
+
e = e.toString().toLocaleLowerCase(), a = a.toString().toLocaleLowerCase();
|
|
2719
|
+
const n = [];
|
|
2720
|
+
let l = e.indexOf(a);
|
|
2721
|
+
for (; ~l; )
|
|
2722
|
+
n.push([l, l + a.length]), l = e.indexOf(a, l + a.length);
|
|
2723
|
+
return n.length ? n : -1;
|
|
2724
|
+
};
|
|
2725
|
+
function Ot(e, a) {
|
|
2726
|
+
if (!(e == null || typeof e == "boolean" || e === -1))
|
|
2727
|
+
return typeof e == "number" ? [[e, e + a.length]] : Array.isArray(e[0]) ? e : [e];
|
|
2728
|
+
}
|
|
2729
|
+
const Ea = G({
|
|
2730
|
+
customFilter: Function,
|
|
2731
|
+
customKeyFilter: Object,
|
|
2732
|
+
filterKeys: [Array, String],
|
|
2733
|
+
filterMode: {
|
|
2734
|
+
type: String,
|
|
2735
|
+
default: "intersection"
|
|
2736
|
+
},
|
|
2737
|
+
noFilter: Boolean
|
|
2738
|
+
}, "filter");
|
|
2739
|
+
function Oa(e, a, t) {
|
|
2740
|
+
const n = [], l = t?.default ?? Ba, i = t?.filterKeys ? De(t.filterKeys) : !1, c = Object.keys(t?.customKeyFilter ?? {}).length;
|
|
2741
|
+
if (!e?.length) return n;
|
|
2742
|
+
let s = null;
|
|
2743
|
+
e: for (let u = 0; u < e.length; u++) {
|
|
2744
|
+
const [d, o = d] = De(e[u]), r = {}, m = {};
|
|
2745
|
+
let g = -1;
|
|
2746
|
+
if ((a || c > 0) && !t?.noFilter) {
|
|
2747
|
+
let y = !1;
|
|
2748
|
+
if (typeof d == "object") {
|
|
2749
|
+
if (d.type === "divider" || d.type === "subheader") {
|
|
2750
|
+
s?.type === "divider" && d.type === "subheader" && n.push(s), s = {
|
|
2751
|
+
index: u,
|
|
2752
|
+
matches: {},
|
|
2753
|
+
type: d.type
|
|
2754
|
+
};
|
|
2755
|
+
continue;
|
|
2756
|
+
}
|
|
2757
|
+
const _ = i || Object.keys(o);
|
|
2758
|
+
y = _.length === c;
|
|
2759
|
+
for (const C of _) {
|
|
2760
|
+
const k = El(o, C), T = t?.customKeyFilter?.[C];
|
|
2761
|
+
if (g = T ? T(k, a, d) : l(k, a, d), g !== -1 && g !== !1)
|
|
2762
|
+
T ? r[C] = Ot(g, a) : m[C] = Ot(g, a);
|
|
2763
|
+
else if (t?.filterMode === "every")
|
|
2764
|
+
continue e;
|
|
2765
|
+
}
|
|
2766
|
+
} else
|
|
2767
|
+
g = l(d, a, d), g !== -1 && g !== !1 && (m.title = Ot(g, a));
|
|
2768
|
+
const h = Object.keys(m).length, x = Object.keys(r).length;
|
|
2769
|
+
if (!h && !x || t?.filterMode === "union" && x !== c && !h || t?.filterMode === "intersection" && (x !== c || !h && c > 0 && !y)) continue;
|
|
2770
|
+
}
|
|
2771
|
+
s && (n.push(s), s = null), n.push({
|
|
2772
|
+
index: u,
|
|
2773
|
+
matches: {
|
|
2774
|
+
...m,
|
|
2775
|
+
...r
|
|
2776
|
+
}
|
|
2777
|
+
});
|
|
2778
|
+
}
|
|
2779
|
+
return n;
|
|
2780
|
+
}
|
|
2781
|
+
function Ra(e, a, t, n) {
|
|
2782
|
+
const l = J([]), i = J(/* @__PURE__ */ new Map()), c = I(() => n?.transform ? M(a).map((u) => [u, n.transform(u)]) : M(a));
|
|
2783
|
+
Rt(() => {
|
|
2784
|
+
const u = typeof t == "function" ? t() : M(t), d = typeof u != "string" && typeof u != "number" ? "" : String(u), o = Oa(c.value, d, {
|
|
2785
|
+
customKeyFilter: {
|
|
2786
|
+
...e.customKeyFilter,
|
|
2787
|
+
...M(n?.customKeyFilter)
|
|
2788
|
+
},
|
|
2789
|
+
default: e.customFilter,
|
|
2790
|
+
filterKeys: e.filterKeys,
|
|
2791
|
+
filterMode: e.filterMode,
|
|
2792
|
+
noFilter: e.noFilter
|
|
2793
|
+
}), r = M(a), m = [], g = /* @__PURE__ */ new Map();
|
|
2794
|
+
o.forEach((y) => {
|
|
2795
|
+
let {
|
|
2796
|
+
index: h,
|
|
2797
|
+
matches: x
|
|
2798
|
+
} = y;
|
|
2799
|
+
const _ = r[h];
|
|
2800
|
+
m.push(_), g.set(_.value, x);
|
|
2801
|
+
}), l.value = m, i.value = g;
|
|
2802
|
+
});
|
|
2803
|
+
function s(u) {
|
|
2804
|
+
return i.value.get(u.value);
|
|
2805
|
+
}
|
|
2806
|
+
return {
|
|
2807
|
+
filteredItems: l,
|
|
2808
|
+
filteredMatches: i,
|
|
2809
|
+
getMatches: s
|
|
2810
|
+
};
|
|
2811
|
+
}
|
|
2812
|
+
function Ma(e, a, t) {
|
|
2813
|
+
return t == null || !t.length ? a : t.map((n, l) => {
|
|
2814
|
+
const i = l === 0 ? 0 : t[l - 1][1], c = [b("span", {
|
|
2815
|
+
class: oe(`${e}__unmask`)
|
|
2816
|
+
}, [a.slice(i, n[0])]), b("span", {
|
|
2817
|
+
class: oe(`${e}__mask`)
|
|
2818
|
+
}, [a.slice(n[0], n[1])])];
|
|
2819
|
+
return l === t.length - 1 && c.push(b("span", {
|
|
2820
|
+
class: oe(`${e}__unmask`)
|
|
2821
|
+
}, [a.slice(n[1])])), b(ce, null, [c]);
|
|
2822
|
+
});
|
|
2823
|
+
}
|
|
2824
|
+
const $a = G({
|
|
2825
|
+
autoSelectFirst: {
|
|
2826
|
+
type: [Boolean, String]
|
|
2827
|
+
},
|
|
2828
|
+
clearOnSelect: Boolean,
|
|
2829
|
+
search: String,
|
|
2830
|
+
...Ea({
|
|
2831
|
+
filterKeys: ["title"]
|
|
2832
|
+
}),
|
|
2833
|
+
...an(),
|
|
2834
|
+
...Ge(Tt({
|
|
2835
|
+
modelValue: null,
|
|
2836
|
+
role: "combobox"
|
|
2837
|
+
}), ["validationValue", "dirty"])
|
|
2838
|
+
}, "VAutocomplete"), Na = ie()({
|
|
2839
|
+
name: "VAutocomplete",
|
|
2840
|
+
props: $a(),
|
|
2841
|
+
emits: {
|
|
2842
|
+
"update:focused": (e) => !0,
|
|
2843
|
+
"update:search": (e) => !0,
|
|
2844
|
+
"update:modelValue": (e) => !0,
|
|
2845
|
+
"update:menu": (e) => !0
|
|
2846
|
+
},
|
|
2847
|
+
setup(e, a) {
|
|
2848
|
+
let {
|
|
2849
|
+
slots: t
|
|
2850
|
+
} = a;
|
|
2851
|
+
const {
|
|
2852
|
+
t: n
|
|
2853
|
+
} = Ze(), l = W(), i = J(!1), c = J(!0), s = J(!1), u = W(), d = W(), o = J(-1), r = J(null), {
|
|
2854
|
+
items: m,
|
|
2855
|
+
transformIn: g,
|
|
2856
|
+
transformOut: y
|
|
2857
|
+
} = Ol(e), {
|
|
2858
|
+
textColorClasses: h,
|
|
2859
|
+
textColorStyles: x
|
|
2860
|
+
} = mt(() => l.value?.color), {
|
|
2861
|
+
InputIcon: _
|
|
2862
|
+
} = Ft(e), C = we(e, "search", ""), k = we(e, "modelValue", [], (S) => g(S === null ? [null] : De(S)), (S) => {
|
|
2863
|
+
const Y = y(S);
|
|
2864
|
+
return e.multiple ? Y : Y[0] ?? null;
|
|
2865
|
+
}), T = I(() => typeof e.counterValue == "function" ? e.counterValue(k.value) : typeof e.counterValue == "number" ? e.counterValue : k.value.length), F = Dt(e), {
|
|
2866
|
+
filteredItems: H,
|
|
2867
|
+
getMatches: A
|
|
2868
|
+
} = Ra(e, m, () => r.value ?? (c.value ? "" : C.value)), p = I(() => e.hideSelected && r.value === null ? H.value.filter((S) => !k.value.some((Y) => Y.value === S.value)) : H.value), R = B(() => e.closableChips && !F.isReadonly.value && !F.isDisabled.value), E = I(() => !!(e.chips || t.chip)), q = I(() => E.value || !!t.selection), te = I(() => k.value.map((S) => S.props.value)), ee = I(() => p.value.find((S) => S.type === "item" && !S.props.disabled)), U = I(() => (e.autoSelectFirst === !0 || e.autoSelectFirst === "exact" && C.value === ee.value?.title) && p.value.length > 0 && !c.value && !s.value), K = I(() => e.hideNoData && !p.value.length || F.isReadonly.value || F.isDisabled.value), Z = we(e, "menu"), N = I({
|
|
2869
|
+
get: () => Z.value,
|
|
2870
|
+
set: (S) => {
|
|
2871
|
+
Z.value && !S && u.value?.ΨopenChildren.size || S && K.value || (Z.value = S);
|
|
2872
|
+
}
|
|
2873
|
+
}), {
|
|
2874
|
+
menuId: ne,
|
|
2875
|
+
ariaExpanded: ue,
|
|
2876
|
+
ariaControls: D
|
|
2877
|
+
} = nn(e, N), $ = W(), w = ln($, l);
|
|
2878
|
+
function v(S) {
|
|
2879
|
+
e.openOnClear && (N.value = !0), C.value = "";
|
|
2880
|
+
}
|
|
2881
|
+
function P() {
|
|
2882
|
+
K.value || (N.value = !0);
|
|
2883
|
+
}
|
|
2884
|
+
function V(S) {
|
|
2885
|
+
K.value || (i.value && (S.preventDefault(), S.stopPropagation()), N.value = !N.value);
|
|
2886
|
+
}
|
|
2887
|
+
function O(S) {
|
|
2888
|
+
(St(S) || S.key === "Backspace") && l.value?.focus();
|
|
2889
|
+
}
|
|
2890
|
+
function j(S) {
|
|
2891
|
+
if (F.isReadonly.value) return;
|
|
2892
|
+
const Y = l.value?.selectionStart, Q = k.value.length;
|
|
2893
|
+
if (["Enter", "ArrowDown", "ArrowUp"].includes(S.key) && S.preventDefault(), ["Enter", "ArrowDown"].includes(S.key) && (N.value = !0), ["Escape"].includes(S.key) && (N.value = !1), U.value && ["Enter", "Tab"].includes(S.key) && ee.value && !k.value.some((ae) => {
|
|
2894
|
+
let {
|
|
2895
|
+
value: Ce
|
|
2896
|
+
} = ae;
|
|
2897
|
+
return Ce === ee.value.value;
|
|
2898
|
+
}) && ye(ee.value), S.key === "ArrowDown" && U.value && $.value?.focus("next"), ["Backspace", "Delete"].includes(S.key)) {
|
|
2899
|
+
if (!e.multiple && q.value && k.value.length > 0 && !C.value) return ye(k.value[0], !1);
|
|
2900
|
+
if (~o.value) {
|
|
2901
|
+
S.preventDefault();
|
|
2902
|
+
const ae = o.value;
|
|
2903
|
+
ye(k.value[o.value], !1), o.value = ae >= Q - 1 ? Q - 2 : ae;
|
|
2904
|
+
} else S.key === "Backspace" && !C.value && (o.value = Q - 1);
|
|
2905
|
+
return;
|
|
2906
|
+
}
|
|
2907
|
+
if (e.multiple)
|
|
2908
|
+
if (S.key === "ArrowLeft") {
|
|
2909
|
+
if (o.value < 0 && Y && Y > 0) return;
|
|
2910
|
+
const ae = o.value > -1 ? o.value - 1 : Q - 1;
|
|
2911
|
+
if (k.value[ae])
|
|
2912
|
+
o.value = ae;
|
|
2913
|
+
else {
|
|
2914
|
+
const Ce = C.value?.length ?? null;
|
|
2915
|
+
o.value = -1, l.value?.setSelectionRange(Ce, Ce);
|
|
2916
|
+
}
|
|
2917
|
+
} else if (S.key === "ArrowRight") {
|
|
2918
|
+
if (o.value < 0) return;
|
|
2919
|
+
const ae = o.value + 1;
|
|
2920
|
+
k.value[ae] ? o.value = ae : (o.value = -1, l.value?.setSelectionRange(0, 0));
|
|
2921
|
+
} else ~o.value && St(S) && (o.value = -1);
|
|
2922
|
+
}
|
|
2923
|
+
function ve(S) {
|
|
2924
|
+
if (ot(l.value, ":autofill") || ot(l.value, ":-webkit-autofill")) {
|
|
2925
|
+
const Y = m.value.find((Q) => Q.title === S.target.value);
|
|
2926
|
+
Y && ye(Y);
|
|
2927
|
+
}
|
|
2928
|
+
}
|
|
2929
|
+
function me() {
|
|
2930
|
+
e.eager && d.value?.calculateVisibleItems();
|
|
2931
|
+
}
|
|
2932
|
+
function ge() {
|
|
2933
|
+
i.value && (c.value = !0, l.value?.focus()), r.value = null;
|
|
2934
|
+
}
|
|
2935
|
+
function Fe(S) {
|
|
2936
|
+
i.value = !0, setTimeout(() => {
|
|
2937
|
+
s.value = !0;
|
|
2938
|
+
});
|
|
2939
|
+
}
|
|
2940
|
+
function X(S) {
|
|
2941
|
+
s.value = !1;
|
|
2942
|
+
}
|
|
2943
|
+
function fe(S) {
|
|
2944
|
+
(S == null || S === "" && !e.multiple && !q.value) && (k.value = []);
|
|
2945
|
+
}
|
|
2946
|
+
const z = J(!1);
|
|
2947
|
+
function ye(S) {
|
|
2948
|
+
let Y = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
|
|
2949
|
+
if (!(!S || S.props.disabled))
|
|
2950
|
+
if (e.multiple) {
|
|
2951
|
+
const Q = k.value.findIndex((Ce) => (e.valueComparator || We)(Ce.value, S.value)), ae = Y ?? !~Q;
|
|
2952
|
+
if (~Q) {
|
|
2953
|
+
const Ce = ae ? [...k.value, S] : [...k.value];
|
|
2954
|
+
Ce.splice(Q, 1), k.value = Ce;
|
|
2955
|
+
} else ae && (k.value = [...k.value, S]);
|
|
2956
|
+
e.clearOnSelect && (C.value = "");
|
|
2957
|
+
} else {
|
|
2958
|
+
const Q = Y !== !1;
|
|
2959
|
+
k.value = Q ? [S] : [], r.value = c.value ? "" : C.value ?? "", C.value = Q && !q.value ? S.title : "", Ve(() => {
|
|
2960
|
+
N.value = !1, c.value = !0;
|
|
2961
|
+
});
|
|
2962
|
+
}
|
|
2963
|
+
}
|
|
2964
|
+
return re(i, (S, Y) => {
|
|
2965
|
+
S !== Y && (S ? (z.value = !0, C.value = e.multiple || q.value ? "" : String(k.value.at(-1)?.props.title ?? ""), c.value = !0, Ve(() => z.value = !1)) : (!e.multiple && C.value == null && (k.value = []), N.value = !1, !c.value && C.value && (r.value = C.value), C.value = "", o.value = -1));
|
|
2966
|
+
}), re(C, (S) => {
|
|
2967
|
+
!i.value || z.value || (S && (N.value = !0), c.value = !S);
|
|
2968
|
+
}), re(N, (S) => {
|
|
2969
|
+
if (!e.hideSelected && S && k.value.length && c.value) {
|
|
2970
|
+
const Y = p.value.findIndex((Q) => k.value.some((ae) => Q.value === ae.value));
|
|
2971
|
+
at && window.requestAnimationFrame(() => {
|
|
2972
|
+
Y >= 0 && d.value?.scrollToIndex(Y);
|
|
2973
|
+
});
|
|
2974
|
+
}
|
|
2975
|
+
S && (r.value = null);
|
|
2976
|
+
}), re(m, (S, Y) => {
|
|
2977
|
+
N.value || i.value && !Y.length && S.length && (N.value = !0);
|
|
2978
|
+
}), de(() => {
|
|
2979
|
+
const S = !!(!e.hideNoData || p.value.length || t["prepend-item"] || t["append-item"] || t["no-data"]), Y = k.value.length > 0, Q = Ke.filterProps(e);
|
|
2980
|
+
return f(Ke, L({
|
|
2981
|
+
ref: l
|
|
2982
|
+
}, Q, {
|
|
2983
|
+
modelValue: C.value,
|
|
2984
|
+
"onUpdate:modelValue": [(ae) => C.value = ae, fe],
|
|
2985
|
+
focused: i.value,
|
|
2986
|
+
"onUpdate:focused": (ae) => i.value = ae,
|
|
2987
|
+
validationValue: k.externalValue,
|
|
2988
|
+
counterValue: T.value,
|
|
2989
|
+
dirty: Y,
|
|
2990
|
+
onChange: ve,
|
|
2991
|
+
class: ["v-autocomplete", `v-autocomplete--${e.multiple ? "multiple" : "single"}`, {
|
|
2992
|
+
"v-autocomplete--active-menu": N.value,
|
|
2993
|
+
"v-autocomplete--chips": !!e.chips,
|
|
2994
|
+
"v-autocomplete--selection-slot": !!q.value,
|
|
2995
|
+
"v-autocomplete--selecting-index": o.value > -1
|
|
2996
|
+
}, e.class],
|
|
2997
|
+
style: e.style,
|
|
2998
|
+
readonly: F.isReadonly.value,
|
|
2999
|
+
placeholder: Y ? void 0 : e.placeholder,
|
|
3000
|
+
"onClick:clear": v,
|
|
3001
|
+
"onMousedown:control": P,
|
|
3002
|
+
onKeydown: j,
|
|
3003
|
+
"aria-expanded": ue.value,
|
|
3004
|
+
"aria-controls": D.value
|
|
3005
|
+
}), {
|
|
3006
|
+
...t,
|
|
3007
|
+
default: (ae) => {
|
|
3008
|
+
let {
|
|
3009
|
+
id: Ce
|
|
3010
|
+
} = ae;
|
|
3011
|
+
return b(ce, null, [f(Rl, L({
|
|
3012
|
+
id: ne.value,
|
|
3013
|
+
ref: u,
|
|
3014
|
+
modelValue: N.value,
|
|
3015
|
+
"onUpdate:modelValue": (he) => N.value = he,
|
|
3016
|
+
activator: "parent",
|
|
3017
|
+
contentClass: "v-autocomplete__content",
|
|
3018
|
+
disabled: K.value,
|
|
3019
|
+
eager: e.eager,
|
|
3020
|
+
maxHeight: 310,
|
|
3021
|
+
openOnClick: !1,
|
|
3022
|
+
closeOnContentClick: !1,
|
|
3023
|
+
onAfterEnter: me,
|
|
3024
|
+
onAfterLeave: ge
|
|
3025
|
+
}, e.menuProps), {
|
|
3026
|
+
default: () => [S && f(Yt, L({
|
|
3027
|
+
ref: $,
|
|
3028
|
+
filterable: !0,
|
|
3029
|
+
selected: te.value,
|
|
3030
|
+
selectStrategy: e.multiple ? "independent" : "single-independent",
|
|
3031
|
+
onMousedown: (he) => he.preventDefault(),
|
|
3032
|
+
onKeydown: O,
|
|
3033
|
+
onFocusin: Fe,
|
|
3034
|
+
onFocusout: X,
|
|
3035
|
+
tabindex: "-1",
|
|
3036
|
+
selectable: !!p.value.length,
|
|
3037
|
+
"aria-live": "polite",
|
|
3038
|
+
"aria-labelledby": `${Ce.value}-label`,
|
|
3039
|
+
"aria-multiselectable": e.multiple,
|
|
3040
|
+
color: e.itemColor ?? e.color
|
|
3041
|
+
}, w, e.listProps), {
|
|
3042
|
+
default: () => [t["prepend-item"]?.(), !p.value.length && !e.hideNoData && (t["no-data"]?.() ?? f(it, {
|
|
3043
|
+
key: "no-data",
|
|
3044
|
+
title: n(e.noDataText)
|
|
3045
|
+
}, null)), f(tn, {
|
|
3046
|
+
ref: d,
|
|
3047
|
+
renderless: !0,
|
|
3048
|
+
items: p.value,
|
|
3049
|
+
itemKey: "value"
|
|
3050
|
+
}, {
|
|
3051
|
+
default: (he) => {
|
|
3052
|
+
let {
|
|
3053
|
+
item: se,
|
|
3054
|
+
index: Ee,
|
|
3055
|
+
itemRef: yt
|
|
3056
|
+
} = he;
|
|
3057
|
+
const et = L(se.props, {
|
|
3058
|
+
ref: yt,
|
|
3059
|
+
key: se.value,
|
|
3060
|
+
active: U.value && se === ee.value ? !0 : void 0,
|
|
3061
|
+
onClick: () => ye(se, null),
|
|
3062
|
+
"aria-posinset": Ee + 1,
|
|
3063
|
+
"aria-setsize": p.value.length
|
|
3064
|
+
});
|
|
3065
|
+
return se.type === "divider" ? t.divider?.({
|
|
3066
|
+
props: se.raw,
|
|
3067
|
+
index: Ee
|
|
3068
|
+
}) ?? f(Le, L(se.props, {
|
|
3069
|
+
key: `divider-${Ee}`
|
|
3070
|
+
}), null) : se.type === "subheader" ? t.subheader?.({
|
|
3071
|
+
props: se.raw,
|
|
3072
|
+
index: Ee
|
|
3073
|
+
}) ?? f(Ml, L(se.props, {
|
|
3074
|
+
key: `subheader-${Ee}`
|
|
3075
|
+
}), null) : t.item?.({
|
|
3076
|
+
item: se,
|
|
3077
|
+
index: Ee,
|
|
3078
|
+
props: et
|
|
3079
|
+
}) ?? f(it, L(et, {
|
|
3080
|
+
role: "option"
|
|
3081
|
+
}), {
|
|
3082
|
+
prepend: (tt) => {
|
|
3083
|
+
let {
|
|
3084
|
+
isSelected: Pe
|
|
3085
|
+
} = tt;
|
|
3086
|
+
return b(ce, null, [e.multiple && !e.hideSelected ? f(Jl, {
|
|
3087
|
+
key: se.value,
|
|
3088
|
+
modelValue: Pe,
|
|
3089
|
+
ripple: !1,
|
|
3090
|
+
tabindex: "-1",
|
|
3091
|
+
"aria-hidden": !0,
|
|
3092
|
+
onClick: (cn) => cn.preventDefault()
|
|
3093
|
+
}, null) : void 0, se.props.prependAvatar && f(Xe, {
|
|
3094
|
+
image: se.props.prependAvatar
|
|
3095
|
+
}, null), se.props.prependIcon && f(Se, {
|
|
3096
|
+
icon: se.props.prependIcon
|
|
3097
|
+
}, null)]);
|
|
3098
|
+
},
|
|
3099
|
+
title: () => c.value ? se.title : Ma("v-autocomplete", se.title, A(se)?.title)
|
|
3100
|
+
});
|
|
3101
|
+
}
|
|
3102
|
+
}), t["append-item"]?.()]
|
|
3103
|
+
})]
|
|
3104
|
+
}), k.value.map((he, se) => {
|
|
3105
|
+
function Ee(Pe) {
|
|
3106
|
+
Pe.stopPropagation(), Pe.preventDefault(), ye(he, !1);
|
|
3107
|
+
}
|
|
3108
|
+
const yt = L(st.filterProps(he.props), {
|
|
3109
|
+
"onClick:close": Ee,
|
|
3110
|
+
onKeydown(Pe) {
|
|
3111
|
+
Pe.key !== "Enter" && Pe.key !== " " || (Pe.preventDefault(), Pe.stopPropagation(), Ee(Pe));
|
|
3112
|
+
},
|
|
3113
|
+
onMousedown(Pe) {
|
|
3114
|
+
Pe.preventDefault(), Pe.stopPropagation();
|
|
3115
|
+
},
|
|
3116
|
+
modelValue: !0,
|
|
3117
|
+
"onUpdate:modelValue": void 0
|
|
3118
|
+
}), et = E.value ? !!t.chip : !!t.selection, tt = et ? $l(E.value ? t.chip({
|
|
3119
|
+
item: he,
|
|
3120
|
+
index: se,
|
|
3121
|
+
props: yt
|
|
3122
|
+
}) : t.selection({
|
|
3123
|
+
item: he,
|
|
3124
|
+
index: se
|
|
3125
|
+
})) : void 0;
|
|
3126
|
+
if (!(et && !tt))
|
|
3127
|
+
return b("div", {
|
|
3128
|
+
key: he.value,
|
|
3129
|
+
class: oe(["v-autocomplete__selection", se === o.value && ["v-autocomplete__selection--selected", h.value]]),
|
|
3130
|
+
style: xe(se === o.value ? x.value : {})
|
|
3131
|
+
}, [E.value ? t.chip ? f(Ae, {
|
|
3132
|
+
key: "chip-defaults",
|
|
3133
|
+
defaults: {
|
|
3134
|
+
VChip: {
|
|
3135
|
+
closable: R.value,
|
|
3136
|
+
size: "small",
|
|
3137
|
+
text: he.title
|
|
3138
|
+
}
|
|
3139
|
+
}
|
|
3140
|
+
}, {
|
|
3141
|
+
default: () => [tt]
|
|
3142
|
+
}) : f(st, L({
|
|
3143
|
+
key: "chip",
|
|
3144
|
+
closable: R.value,
|
|
3145
|
+
size: "small",
|
|
3146
|
+
text: he.title,
|
|
3147
|
+
disabled: he.props.disabled
|
|
3148
|
+
}, yt), null) : tt ?? b("span", {
|
|
3149
|
+
class: "v-autocomplete__selection-text"
|
|
3150
|
+
}, [he.title, e.multiple && se < k.value.length - 1 && b("span", {
|
|
3151
|
+
class: "v-autocomplete__selection-comma"
|
|
3152
|
+
}, [vl(",")])])]);
|
|
3153
|
+
})]);
|
|
3154
|
+
},
|
|
3155
|
+
"append-inner": function() {
|
|
3156
|
+
for (var ae = arguments.length, Ce = new Array(ae), he = 0; he < ae; he++)
|
|
3157
|
+
Ce[he] = arguments[he];
|
|
3158
|
+
return b(ce, null, [t["append-inner"]?.(...Ce), e.menuIcon ? f(Se, {
|
|
3159
|
+
class: "v-autocomplete__menu-icon",
|
|
3160
|
+
color: l.value?.fieldIconColor,
|
|
3161
|
+
icon: e.menuIcon,
|
|
3162
|
+
onMousedown: V,
|
|
3163
|
+
onClick: Dn,
|
|
3164
|
+
"aria-hidden": !0,
|
|
3165
|
+
tabindex: "-1"
|
|
3166
|
+
}, null) : void 0, e.appendInnerIcon && f(_, {
|
|
3167
|
+
key: "append-icon",
|
|
3168
|
+
name: "appendInner",
|
|
3169
|
+
color: Ce[0].iconColor.value
|
|
3170
|
+
}, null)]);
|
|
3171
|
+
}
|
|
3172
|
+
});
|
|
3173
|
+
}), gt({
|
|
3174
|
+
isFocused: i,
|
|
3175
|
+
isPristine: c,
|
|
3176
|
+
menu: N,
|
|
3177
|
+
search: C,
|
|
3178
|
+
filteredItems: H,
|
|
3179
|
+
select: ye
|
|
3180
|
+
}, l);
|
|
3181
|
+
}
|
|
3182
|
+
}), La = G({
|
|
3183
|
+
bordered: Boolean,
|
|
3184
|
+
color: String,
|
|
3185
|
+
content: [Number, String],
|
|
3186
|
+
dot: Boolean,
|
|
3187
|
+
floating: Boolean,
|
|
3188
|
+
icon: be,
|
|
3189
|
+
inline: Boolean,
|
|
3190
|
+
label: {
|
|
3191
|
+
type: String,
|
|
3192
|
+
default: "$vuetify.badge"
|
|
3193
|
+
},
|
|
3194
|
+
max: [Number, String],
|
|
3195
|
+
modelValue: {
|
|
3196
|
+
type: Boolean,
|
|
3197
|
+
default: !0
|
|
3198
|
+
},
|
|
3199
|
+
offsetX: [Number, String],
|
|
3200
|
+
offsetY: [Number, String],
|
|
3201
|
+
textColor: String,
|
|
3202
|
+
...pe(),
|
|
3203
|
+
...Jt({
|
|
3204
|
+
location: "top end"
|
|
3205
|
+
}),
|
|
3206
|
+
...ct(),
|
|
3207
|
+
...Be(),
|
|
3208
|
+
...Ne(),
|
|
3209
|
+
..._t({
|
|
3210
|
+
transition: "scale-rotate-transition"
|
|
3211
|
+
}),
|
|
3212
|
+
...ft()
|
|
3213
|
+
}, "VBadge"), Ha = ie()({
|
|
3214
|
+
name: "VBadge",
|
|
3215
|
+
inheritAttrs: !1,
|
|
3216
|
+
props: La(),
|
|
3217
|
+
setup(e, a) {
|
|
3218
|
+
const {
|
|
3219
|
+
backgroundColorClasses: t,
|
|
3220
|
+
backgroundColorStyles: n
|
|
3221
|
+
} = wt(() => e.color), {
|
|
3222
|
+
roundedClasses: l
|
|
3223
|
+
} = rt(e), {
|
|
3224
|
+
t: i
|
|
3225
|
+
} = Ze(), {
|
|
3226
|
+
textColorClasses: c,
|
|
3227
|
+
textColorStyles: s
|
|
3228
|
+
} = mt(() => e.textColor), {
|
|
3229
|
+
themeClasses: u
|
|
3230
|
+
} = Tn(), {
|
|
3231
|
+
locationStyles: d
|
|
3232
|
+
} = qt(e, !0, (r) => (e.floating ? e.dot ? 2 : 4 : e.dot ? 8 : 12) + (["top", "bottom"].includes(r) ? Number(e.offsetY ?? 0) : ["left", "right"].includes(r) ? Number(e.offsetX ?? 0) : 0)), {
|
|
3233
|
+
dimensionStyles: o
|
|
3234
|
+
} = vt(e);
|
|
3235
|
+
return de(() => {
|
|
3236
|
+
const r = Number(e.content), m = !e.max || isNaN(r) ? e.content : r <= Number(e.max) ? r : `${e.max}+`, [g, y] = Bn(a.attrs, ["aria-atomic", "aria-label", "aria-live", "role", "title"]);
|
|
3237
|
+
return f(e.tag, L({
|
|
3238
|
+
class: ["v-badge", {
|
|
3239
|
+
"v-badge--bordered": e.bordered,
|
|
3240
|
+
"v-badge--dot": e.dot,
|
|
3241
|
+
"v-badge--floating": e.floating,
|
|
3242
|
+
"v-badge--inline": e.inline
|
|
3243
|
+
}, e.class]
|
|
3244
|
+
}, y, {
|
|
3245
|
+
style: e.style
|
|
3246
|
+
}), {
|
|
3247
|
+
default: () => [b("div", {
|
|
3248
|
+
class: "v-badge__wrapper"
|
|
3249
|
+
}, [a.slots.default?.(), f(Xt, {
|
|
3250
|
+
transition: e.transition
|
|
3251
|
+
}, {
|
|
3252
|
+
default: () => [He(b("span", L({
|
|
3253
|
+
class: ["v-badge__badge", u.value, t.value, l.value, c.value],
|
|
3254
|
+
style: [n.value, s.value, o.value, e.inline ? {} : d.value],
|
|
3255
|
+
"aria-atomic": "true",
|
|
3256
|
+
"aria-label": i(e.label, r),
|
|
3257
|
+
"aria-live": "polite",
|
|
3258
|
+
role: "status"
|
|
3259
|
+
}, g), [e.dot ? void 0 : a.slots.badge ? a.slots.badge?.() : e.icon ? f(Se, {
|
|
3260
|
+
icon: e.icon
|
|
3261
|
+
}, null) : m]), [[Ct, e.modelValue]])]
|
|
3262
|
+
})])]
|
|
3263
|
+
});
|
|
3264
|
+
}), {};
|
|
3265
|
+
}
|
|
3266
|
+
}), za = G({
|
|
3267
|
+
fullscreen: Boolean,
|
|
3268
|
+
scrollable: Boolean,
|
|
3269
|
+
...Ge(On({
|
|
3270
|
+
captureFocus: !0,
|
|
3271
|
+
origin: "center center",
|
|
3272
|
+
scrollStrategy: "block",
|
|
3273
|
+
transition: {
|
|
3274
|
+
component: Nl
|
|
3275
|
+
},
|
|
3276
|
+
zIndex: 2400,
|
|
3277
|
+
retainFocus: !0
|
|
3278
|
+
}), ["disableInitialFocus"])
|
|
3279
|
+
}, "VDialog"), on = ie()({
|
|
3280
|
+
name: "VDialog",
|
|
3281
|
+
props: za(),
|
|
3282
|
+
emits: {
|
|
3283
|
+
"update:modelValue": (e) => !0,
|
|
3284
|
+
afterEnter: () => !0,
|
|
3285
|
+
afterLeave: () => !0
|
|
3286
|
+
},
|
|
3287
|
+
setup(e, a) {
|
|
3288
|
+
let {
|
|
3289
|
+
emit: t,
|
|
3290
|
+
slots: n
|
|
3291
|
+
} = a;
|
|
3292
|
+
const l = we(e, "modelValue"), {
|
|
3293
|
+
scopeId: i
|
|
3294
|
+
} = En(), c = W();
|
|
3295
|
+
function s() {
|
|
3296
|
+
t("afterEnter"), (e.scrim || e.retainFocus) && c.value?.contentEl && !c.value.contentEl.contains(document.activeElement) && c.value.contentEl.focus({
|
|
3297
|
+
preventScroll: !0
|
|
3298
|
+
});
|
|
3299
|
+
}
|
|
3300
|
+
function u() {
|
|
3301
|
+
t("afterLeave");
|
|
3302
|
+
}
|
|
3303
|
+
return re(l, async (d) => {
|
|
3304
|
+
d || (await Ve(), c.value.activatorEl?.focus({
|
|
3305
|
+
preventScroll: !0
|
|
3306
|
+
}));
|
|
3307
|
+
}), de(() => {
|
|
3308
|
+
const d = al.filterProps(e), o = L({
|
|
3309
|
+
"aria-haspopup": "dialog"
|
|
3310
|
+
}, e.activatorProps), r = L({
|
|
3311
|
+
tabindex: -1
|
|
3312
|
+
}, e.contentProps);
|
|
3313
|
+
return f(al, L({
|
|
3314
|
+
ref: c,
|
|
3315
|
+
class: ["v-dialog", {
|
|
3316
|
+
"v-dialog--fullscreen": e.fullscreen,
|
|
3317
|
+
"v-dialog--scrollable": e.scrollable
|
|
3318
|
+
}, e.class],
|
|
3319
|
+
style: e.style
|
|
3320
|
+
}, d, {
|
|
3321
|
+
modelValue: l.value,
|
|
3322
|
+
"onUpdate:modelValue": (m) => l.value = m,
|
|
3323
|
+
"aria-modal": "true",
|
|
3324
|
+
activatorProps: o,
|
|
3325
|
+
contentProps: r,
|
|
3326
|
+
height: e.fullscreen ? void 0 : e.height,
|
|
3327
|
+
width: e.fullscreen ? void 0 : e.width,
|
|
3328
|
+
maxHeight: e.fullscreen ? void 0 : e.maxHeight,
|
|
3329
|
+
maxWidth: e.fullscreen ? void 0 : e.maxWidth,
|
|
3330
|
+
role: "dialog",
|
|
3331
|
+
onAfterEnter: s,
|
|
3332
|
+
onAfterLeave: u
|
|
3333
|
+
}, i), {
|
|
3334
|
+
activator: n.activator,
|
|
3335
|
+
default: function() {
|
|
3336
|
+
for (var m = arguments.length, g = new Array(m), y = 0; y < m; y++)
|
|
3337
|
+
g[y] = arguments[y];
|
|
3338
|
+
return f(Ae, {
|
|
3339
|
+
root: "VDialog"
|
|
3340
|
+
}, {
|
|
3341
|
+
default: () => [n.default?.(...g)]
|
|
3342
|
+
});
|
|
3343
|
+
}
|
|
3344
|
+
});
|
|
3345
|
+
}), gt({}, c);
|
|
3346
|
+
}
|
|
3347
|
+
}), Ua = G({
|
|
3348
|
+
...pe(),
|
|
3349
|
+
...Be()
|
|
3350
|
+
}, "VCardActions"), un = ie()({
|
|
3351
|
+
name: "VCardActions",
|
|
3352
|
+
props: Ua(),
|
|
3353
|
+
setup(e, a) {
|
|
3354
|
+
let {
|
|
3355
|
+
slots: t
|
|
3356
|
+
} = a;
|
|
3357
|
+
return zt({
|
|
3358
|
+
VBtn: {
|
|
3359
|
+
slim: !0,
|
|
3360
|
+
variant: "text"
|
|
3361
|
+
}
|
|
3362
|
+
}), de(() => f(e.tag, {
|
|
3363
|
+
class: oe(["v-card-actions", e.class]),
|
|
3364
|
+
style: xe(e.style)
|
|
3365
|
+
}, t)), {};
|
|
3366
|
+
}
|
|
3367
|
+
}), Ka = G({
|
|
3368
|
+
opacity: [Number, String],
|
|
3369
|
+
...pe(),
|
|
3370
|
+
...Be()
|
|
3371
|
+
}, "VCardSubtitle"), ja = ie()({
|
|
3372
|
+
name: "VCardSubtitle",
|
|
3373
|
+
props: Ka(),
|
|
3374
|
+
setup(e, a) {
|
|
3375
|
+
let {
|
|
3376
|
+
slots: t
|
|
3377
|
+
} = a;
|
|
3378
|
+
return de(() => f(e.tag, {
|
|
3379
|
+
class: oe(["v-card-subtitle", e.class]),
|
|
3380
|
+
style: xe([{
|
|
3381
|
+
"--v-card-subtitle-opacity": e.opacity
|
|
3382
|
+
}, e.style])
|
|
3383
|
+
}, t)), {};
|
|
3384
|
+
}
|
|
3385
|
+
}), Zt = Rn("v-card-title"), Ga = G({
|
|
3386
|
+
appendAvatar: String,
|
|
3387
|
+
appendIcon: be,
|
|
3388
|
+
prependAvatar: String,
|
|
3389
|
+
prependIcon: be,
|
|
3390
|
+
subtitle: {
|
|
3391
|
+
type: [String, Number, Boolean],
|
|
3392
|
+
default: void 0
|
|
3393
|
+
},
|
|
3394
|
+
title: {
|
|
3395
|
+
type: [String, Number, Boolean],
|
|
3396
|
+
default: void 0
|
|
3397
|
+
},
|
|
3398
|
+
...pe(),
|
|
3399
|
+
...dt(),
|
|
3400
|
+
...Be()
|
|
3401
|
+
}, "VCardItem"), Wa = ie()({
|
|
3402
|
+
name: "VCardItem",
|
|
3403
|
+
props: Ga(),
|
|
3404
|
+
setup(e, a) {
|
|
3405
|
+
let {
|
|
3406
|
+
slots: t
|
|
3407
|
+
} = a;
|
|
3408
|
+
return de(() => {
|
|
3409
|
+
const n = !!(e.prependAvatar || e.prependIcon), l = !!(n || t.prepend), i = !!(e.appendAvatar || e.appendIcon), c = !!(i || t.append), s = !!(e.title != null || t.title), u = !!(e.subtitle != null || t.subtitle);
|
|
3410
|
+
return f(e.tag, {
|
|
3411
|
+
class: oe(["v-card-item", e.class]),
|
|
3412
|
+
style: xe(e.style)
|
|
3413
|
+
}, {
|
|
3414
|
+
default: () => [l && b("div", {
|
|
3415
|
+
key: "prepend",
|
|
3416
|
+
class: "v-card-item__prepend"
|
|
3417
|
+
}, [t.prepend ? f(Ae, {
|
|
3418
|
+
key: "prepend-defaults",
|
|
3419
|
+
disabled: !n,
|
|
3420
|
+
defaults: {
|
|
3421
|
+
VAvatar: {
|
|
3422
|
+
density: e.density,
|
|
3423
|
+
image: e.prependAvatar
|
|
3424
|
+
},
|
|
3425
|
+
VIcon: {
|
|
3426
|
+
density: e.density,
|
|
3427
|
+
icon: e.prependIcon
|
|
3428
|
+
}
|
|
3429
|
+
}
|
|
3430
|
+
}, t.prepend) : b(ce, null, [e.prependAvatar && f(Xe, {
|
|
3431
|
+
key: "prepend-avatar",
|
|
3432
|
+
density: e.density,
|
|
3433
|
+
image: e.prependAvatar
|
|
3434
|
+
}, null), e.prependIcon && f(Se, {
|
|
3435
|
+
key: "prepend-icon",
|
|
3436
|
+
density: e.density,
|
|
3437
|
+
icon: e.prependIcon
|
|
3438
|
+
}, null)])]), b("div", {
|
|
3439
|
+
class: "v-card-item__content"
|
|
3440
|
+
}, [s && f(Zt, {
|
|
3441
|
+
key: "title"
|
|
3442
|
+
}, {
|
|
3443
|
+
default: () => [t.title?.() ?? bt(e.title)]
|
|
3444
|
+
}), u && f(ja, {
|
|
3445
|
+
key: "subtitle"
|
|
3446
|
+
}, {
|
|
3447
|
+
default: () => [t.subtitle?.() ?? bt(e.subtitle)]
|
|
3448
|
+
}), t.default?.()]), c && b("div", {
|
|
3449
|
+
key: "append",
|
|
3450
|
+
class: "v-card-item__append"
|
|
3451
|
+
}, [t.append ? f(Ae, {
|
|
3452
|
+
key: "append-defaults",
|
|
3453
|
+
disabled: !i,
|
|
3454
|
+
defaults: {
|
|
3455
|
+
VAvatar: {
|
|
3456
|
+
density: e.density,
|
|
3457
|
+
image: e.appendAvatar
|
|
3458
|
+
},
|
|
3459
|
+
VIcon: {
|
|
3460
|
+
density: e.density,
|
|
3461
|
+
icon: e.appendIcon
|
|
3462
|
+
}
|
|
3463
|
+
}
|
|
3464
|
+
}, t.append) : b(ce, null, [e.appendIcon && f(Se, {
|
|
3465
|
+
key: "append-icon",
|
|
3466
|
+
density: e.density,
|
|
3467
|
+
icon: e.appendIcon
|
|
3468
|
+
}, null), e.appendAvatar && f(Xe, {
|
|
3469
|
+
key: "append-avatar",
|
|
3470
|
+
density: e.density,
|
|
3471
|
+
image: e.appendAvatar
|
|
3472
|
+
}, null)])])]
|
|
3473
|
+
});
|
|
3474
|
+
}), {};
|
|
3475
|
+
}
|
|
3476
|
+
}), qa = G({
|
|
3477
|
+
opacity: [Number, String],
|
|
3478
|
+
...pe(),
|
|
3479
|
+
...Be()
|
|
3480
|
+
}, "VCardText"), el = ie()({
|
|
3481
|
+
name: "VCardText",
|
|
3482
|
+
props: qa(),
|
|
3483
|
+
setup(e, a) {
|
|
3484
|
+
let {
|
|
3485
|
+
slots: t
|
|
3486
|
+
} = a;
|
|
3487
|
+
return de(() => f(e.tag, {
|
|
3488
|
+
class: oe(["v-card-text", e.class]),
|
|
3489
|
+
style: xe([{
|
|
3490
|
+
"--v-card-text-opacity": e.opacity
|
|
3491
|
+
}, e.style])
|
|
3492
|
+
}, t)), {};
|
|
3493
|
+
}
|
|
3494
|
+
}), Ja = G({
|
|
3495
|
+
appendAvatar: String,
|
|
3496
|
+
appendIcon: be,
|
|
3497
|
+
disabled: Boolean,
|
|
3498
|
+
flat: Boolean,
|
|
3499
|
+
hover: Boolean,
|
|
3500
|
+
image: String,
|
|
3501
|
+
link: {
|
|
3502
|
+
type: Boolean,
|
|
3503
|
+
default: void 0
|
|
3504
|
+
},
|
|
3505
|
+
prependAvatar: String,
|
|
3506
|
+
prependIcon: be,
|
|
3507
|
+
ripple: {
|
|
3508
|
+
type: [Boolean, Object],
|
|
3509
|
+
default: !0
|
|
3510
|
+
},
|
|
3511
|
+
subtitle: {
|
|
3512
|
+
type: [String, Number, Boolean],
|
|
3513
|
+
default: void 0
|
|
3514
|
+
},
|
|
3515
|
+
text: {
|
|
3516
|
+
type: [String, Number, Boolean],
|
|
3517
|
+
default: void 0
|
|
3518
|
+
},
|
|
3519
|
+
title: {
|
|
3520
|
+
type: [String, Number, Boolean],
|
|
3521
|
+
default: void 0
|
|
3522
|
+
},
|
|
3523
|
+
...Wt(),
|
|
3524
|
+
...pe(),
|
|
3525
|
+
...dt(),
|
|
3526
|
+
...ft(),
|
|
3527
|
+
...Gt(),
|
|
3528
|
+
...Bl(),
|
|
3529
|
+
...Jt(),
|
|
3530
|
+
...Il(),
|
|
3531
|
+
...ct(),
|
|
3532
|
+
...Vl(),
|
|
3533
|
+
...Be(),
|
|
3534
|
+
...Ne(),
|
|
3535
|
+
...Ut({
|
|
3536
|
+
variant: "elevated"
|
|
3537
|
+
})
|
|
3538
|
+
}, "VCard"), sn = ie()({
|
|
3539
|
+
name: "VCard",
|
|
3540
|
+
directives: {
|
|
3541
|
+
vRipple: Je
|
|
3542
|
+
},
|
|
3543
|
+
props: Ja(),
|
|
3544
|
+
setup(e, a) {
|
|
3545
|
+
let {
|
|
3546
|
+
attrs: t,
|
|
3547
|
+
slots: n
|
|
3548
|
+
} = a;
|
|
3549
|
+
const {
|
|
3550
|
+
themeClasses: l
|
|
3551
|
+
} = Qe(e), {
|
|
3552
|
+
borderClasses: i
|
|
3553
|
+
} = Kt(e), {
|
|
3554
|
+
colorClasses: c,
|
|
3555
|
+
colorStyles: s,
|
|
3556
|
+
variantClasses: u
|
|
3557
|
+
} = kl(e), {
|
|
3558
|
+
densityClasses: d
|
|
3559
|
+
} = It(e), {
|
|
3560
|
+
dimensionStyles: o
|
|
3561
|
+
} = vt(e), {
|
|
3562
|
+
elevationClasses: r
|
|
3563
|
+
} = jt(e), {
|
|
3564
|
+
loaderClasses: m
|
|
3565
|
+
} = Dl(e), {
|
|
3566
|
+
locationStyles: g
|
|
3567
|
+
} = qt(e), {
|
|
3568
|
+
positionClasses: y
|
|
3569
|
+
} = xl(e), {
|
|
3570
|
+
roundedClasses: h
|
|
3571
|
+
} = rt(e), x = pl(e, t), _ = J(void 0);
|
|
3572
|
+
return re(() => e.loading, (C, k) => {
|
|
3573
|
+
_.value = !C && typeof k == "string" ? k : typeof C == "boolean" ? void 0 : C;
|
|
3574
|
+
}, {
|
|
3575
|
+
immediate: !0
|
|
3576
|
+
}), de(() => {
|
|
3577
|
+
const C = e.link !== !1 && x.isLink.value, k = !e.disabled && e.link !== !1 && (e.link || x.isClickable.value), T = C ? "a" : e.tag, F = !!(n.title || e.title != null), H = !!(n.subtitle || e.subtitle != null), A = F || H, p = !!(n.append || e.appendAvatar || e.appendIcon), R = !!(n.prepend || e.prependAvatar || e.prependIcon), E = !!(n.image || e.image), q = A || R || p, te = !!(n.text || e.text != null);
|
|
3578
|
+
return He(f(T, L(x.linkProps, {
|
|
3579
|
+
class: ["v-card", {
|
|
3580
|
+
"v-card--disabled": e.disabled,
|
|
3581
|
+
"v-card--flat": e.flat,
|
|
3582
|
+
"v-card--hover": e.hover && !(e.disabled || e.flat),
|
|
3583
|
+
"v-card--link": k
|
|
3584
|
+
}, l.value, i.value, c.value, d.value, r.value, m.value, y.value, h.value, u.value, e.class],
|
|
3585
|
+
style: [s.value, o.value, g.value, e.style],
|
|
3586
|
+
onClick: k && x.navigate,
|
|
3587
|
+
tabindex: e.disabled ? -1 : void 0
|
|
3588
|
+
}), {
|
|
3589
|
+
default: () => [E && b("div", {
|
|
3590
|
+
key: "image",
|
|
3591
|
+
class: "v-card__image"
|
|
3592
|
+
}, [n.image ? f(Ae, {
|
|
3593
|
+
key: "image-defaults",
|
|
3594
|
+
disabled: !e.image,
|
|
3595
|
+
defaults: {
|
|
3596
|
+
VImg: {
|
|
3597
|
+
cover: !0,
|
|
3598
|
+
src: e.image
|
|
3599
|
+
}
|
|
3600
|
+
}
|
|
3601
|
+
}, n.image) : f(Mn, {
|
|
3602
|
+
key: "image-img",
|
|
3603
|
+
cover: !0,
|
|
3604
|
+
src: e.image
|
|
3605
|
+
}, null)]), f(Tl, {
|
|
3606
|
+
name: "v-card",
|
|
3607
|
+
active: !!e.loading,
|
|
3608
|
+
color: _.value
|
|
3609
|
+
}, {
|
|
3610
|
+
default: n.loader
|
|
3611
|
+
}), q && f(Wa, {
|
|
3612
|
+
key: "item",
|
|
3613
|
+
prependAvatar: e.prependAvatar,
|
|
3614
|
+
prependIcon: e.prependIcon,
|
|
3615
|
+
title: e.title,
|
|
3616
|
+
subtitle: e.subtitle,
|
|
3617
|
+
appendAvatar: e.appendAvatar,
|
|
3618
|
+
appendIcon: e.appendIcon
|
|
3619
|
+
}, {
|
|
3620
|
+
default: n.item,
|
|
3621
|
+
prepend: n.prepend,
|
|
3622
|
+
title: n.title,
|
|
3623
|
+
subtitle: n.subtitle,
|
|
3624
|
+
append: n.append
|
|
3625
|
+
}), te && f(el, {
|
|
3626
|
+
key: "text"
|
|
3627
|
+
}, {
|
|
3628
|
+
default: () => [n.text?.() ?? e.text]
|
|
3629
|
+
}), n.default?.(), n.actions && f(un, null, {
|
|
3630
|
+
default: n.actions
|
|
3631
|
+
}), Sl(k, "v-card")]
|
|
3632
|
+
}), [[Je, k && e.ripple]]);
|
|
3633
|
+
}), {};
|
|
3634
|
+
}
|
|
3635
|
+
}), Xa = 50, Ya = 500;
|
|
3636
|
+
function Qa(e) {
|
|
3637
|
+
let {
|
|
3638
|
+
toggleUpDown: a
|
|
3639
|
+
} = e, t = -1, n = -1;
|
|
3640
|
+
nt(i);
|
|
3641
|
+
function l(s) {
|
|
3642
|
+
i(), c(s), window.addEventListener("pointerup", i), document.addEventListener("blur", i), t = window.setTimeout(() => {
|
|
3643
|
+
n = window.setInterval(() => c(s), Xa);
|
|
3644
|
+
}, Ya);
|
|
3645
|
+
}
|
|
3646
|
+
function i() {
|
|
3647
|
+
window.clearTimeout(t), window.clearInterval(n), window.removeEventListener("pointerup", i), document.removeEventListener("blur", i);
|
|
3648
|
+
}
|
|
3649
|
+
nt(i);
|
|
3650
|
+
function c(s) {
|
|
3651
|
+
a(s === "up");
|
|
3652
|
+
}
|
|
3653
|
+
return {
|
|
3654
|
+
holdStart: l,
|
|
3655
|
+
holdStop: i
|
|
3656
|
+
};
|
|
3657
|
+
}
|
|
3658
|
+
const Za = G({
|
|
3659
|
+
controlVariant: {
|
|
3660
|
+
type: String,
|
|
3661
|
+
default: "default"
|
|
3662
|
+
},
|
|
3663
|
+
inset: Boolean,
|
|
3664
|
+
hideInput: Boolean,
|
|
3665
|
+
modelValue: {
|
|
3666
|
+
type: Number,
|
|
3667
|
+
default: null
|
|
3668
|
+
},
|
|
3669
|
+
min: {
|
|
3670
|
+
type: Number,
|
|
3671
|
+
default: Number.MIN_SAFE_INTEGER
|
|
3672
|
+
},
|
|
3673
|
+
max: {
|
|
3674
|
+
type: Number,
|
|
3675
|
+
default: Number.MAX_SAFE_INTEGER
|
|
3676
|
+
},
|
|
3677
|
+
step: {
|
|
3678
|
+
type: Number,
|
|
3679
|
+
default: 1
|
|
3680
|
+
},
|
|
3681
|
+
precision: {
|
|
3682
|
+
type: Number,
|
|
3683
|
+
default: 0
|
|
3684
|
+
},
|
|
3685
|
+
minFractionDigits: {
|
|
3686
|
+
type: Number,
|
|
3687
|
+
default: null
|
|
3688
|
+
},
|
|
3689
|
+
decimalSeparator: {
|
|
3690
|
+
type: String,
|
|
3691
|
+
validator: (e) => !e || e.length === 1
|
|
3692
|
+
},
|
|
3693
|
+
...Ge(Tt(), ["modelValue", "validationValue"])
|
|
3694
|
+
}, "VNumberInput"), eo = ie()({
|
|
3695
|
+
name: "VNumberInput",
|
|
3696
|
+
props: {
|
|
3697
|
+
...Za()
|
|
3698
|
+
},
|
|
3699
|
+
emits: {
|
|
3700
|
+
"update:focused": (e) => !0,
|
|
3701
|
+
"update:modelValue": (e) => !0
|
|
3702
|
+
},
|
|
3703
|
+
setup(e, a) {
|
|
3704
|
+
let {
|
|
3705
|
+
slots: t
|
|
3706
|
+
} = a;
|
|
3707
|
+
const n = W(), {
|
|
3708
|
+
holdStart: l,
|
|
3709
|
+
holdStop: i
|
|
3710
|
+
} = Qa({
|
|
3711
|
+
toggleUpDown: q
|
|
3712
|
+
}), c = Dt(e), s = I(() => c.isDisabled.value || c.isReadonly.value), u = J(e.focused), {
|
|
3713
|
+
decimalSeparator: d
|
|
3714
|
+
} = Ze(), o = I(() => e.decimalSeparator?.[0] || d.value);
|
|
3715
|
+
function r(v) {
|
|
3716
|
+
let P = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : e.precision, V = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0;
|
|
3717
|
+
const O = P == null ? String(v) : v.toFixed(P);
|
|
3718
|
+
if (u.value && V)
|
|
3719
|
+
return Number(O).toString().replace(".", o.value);
|
|
3720
|
+
if (e.minFractionDigits === null || P !== null && P < e.minFractionDigits)
|
|
3721
|
+
return O.replace(".", o.value);
|
|
3722
|
+
let [j, ve] = O.split(".");
|
|
3723
|
+
return ve = (ve ?? "").padEnd(e.minFractionDigits, "0").replace(new RegExp(`(?<=\\d{${e.minFractionDigits}})0+$`, "g"), ""), [j, ve].filter(Boolean).join(o.value);
|
|
3724
|
+
}
|
|
3725
|
+
const m = we(e, "modelValue", null, (v) => v ?? null, (v) => v == null ? v ?? null : Me(Number(v), e.min, e.max)), g = J(null), y = J(null);
|
|
3726
|
+
re(m, (v) => {
|
|
3727
|
+
u.value && !s.value && Number(g.value?.replace(o.value, ".")) === v || (v == null ? (g.value = null, y.value = null) : isNaN(v) || (g.value = r(v), y.value = Number(g.value.replace(o.value, "."))));
|
|
3728
|
+
}, {
|
|
3729
|
+
immediate: !0
|
|
3730
|
+
});
|
|
3731
|
+
const h = I({
|
|
3732
|
+
get: () => g.value,
|
|
3733
|
+
set(v) {
|
|
3734
|
+
if (v === null || v === "") {
|
|
3735
|
+
m.value = null, g.value = null, y.value = null;
|
|
3736
|
+
return;
|
|
3737
|
+
}
|
|
3738
|
+
const P = Number(v.replace(o.value, "."));
|
|
3739
|
+
isNaN(P) || (g.value = v, y.value = P, P <= e.max && P >= e.min && (m.value = P));
|
|
3740
|
+
}
|
|
3741
|
+
}), x = I(() => {
|
|
3742
|
+
if (y.value === null) return !1;
|
|
3743
|
+
const v = Number(g.value?.replace(o.value, "."));
|
|
3744
|
+
return v !== Me(v, e.min, e.max);
|
|
3745
|
+
}), _ = I(() => s.value ? !1 : (m.value ?? 0) + e.step <= e.max), C = I(() => s.value ? !1 : (m.value ?? 0) - e.step >= e.min), k = I(() => e.hideInput ? "stacked" : e.controlVariant), T = B(() => k.value === "split" ? "$plus" : "$collapse"), F = B(() => k.value === "split" ? "$minus" : "$expand"), H = B(() => k.value === "split" ? "default" : "small"), A = B(() => k.value === "stacked" ? "auto" : "100%"), p = {
|
|
3746
|
+
props: {
|
|
3747
|
+
onClick: U,
|
|
3748
|
+
onPointerup: K,
|
|
3749
|
+
onPointerdown: Z,
|
|
3750
|
+
onPointercancel: K
|
|
3751
|
+
}
|
|
3752
|
+
}, R = {
|
|
3753
|
+
props: {
|
|
3754
|
+
onClick: U,
|
|
3755
|
+
onPointerup: K,
|
|
3756
|
+
onPointerdown: N,
|
|
3757
|
+
onPointercancel: K
|
|
3758
|
+
}
|
|
3759
|
+
};
|
|
3760
|
+
re(() => e.precision, () => ue()), re(() => e.minFractionDigits, () => ue()), Ye(() => {
|
|
3761
|
+
ne();
|
|
3762
|
+
});
|
|
3763
|
+
function E(v) {
|
|
3764
|
+
if (v == null) return 0;
|
|
3765
|
+
const P = v.toString(), V = P.indexOf(".");
|
|
3766
|
+
return ~V ? P.length - V : 0;
|
|
3767
|
+
}
|
|
3768
|
+
function q() {
|
|
3769
|
+
let v = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0;
|
|
3770
|
+
if (s.value) return;
|
|
3771
|
+
if (m.value == null) {
|
|
3772
|
+
h.value = r(Me(0, e.min, e.max));
|
|
3773
|
+
return;
|
|
3774
|
+
}
|
|
3775
|
+
let P = Math.max(E(m.value), E(e.step));
|
|
3776
|
+
e.precision != null && (P = Math.max(P, e.precision)), v ? _.value && (h.value = r(m.value + e.step, P)) : C.value && (h.value = r(m.value - e.step, P));
|
|
3777
|
+
}
|
|
3778
|
+
function te(v) {
|
|
3779
|
+
if (!v.data) return;
|
|
3780
|
+
const P = v.target, {
|
|
3781
|
+
value: V,
|
|
3782
|
+
selectionStart: O,
|
|
3783
|
+
selectionEnd: j
|
|
3784
|
+
} = P ?? {}, ve = V ? V.slice(0, O) + v.data + V.slice(j) : v.data, me = $n(ve, e.precision, o.value);
|
|
3785
|
+
if (new RegExp(`^-?\\d*${Nn(o.value)}?\\d*$`).test(ve) || (v.preventDefault(), P.value = me, Ve(() => h.value = me)), e.precision != null) {
|
|
3786
|
+
if (ve.split(o.value)[1]?.length > e.precision) {
|
|
3787
|
+
v.preventDefault(), P.value = me, Ve(() => h.value = me);
|
|
3788
|
+
const ge = (O ?? 0) + v.data.length;
|
|
3789
|
+
P.setSelectionRange(ge, ge);
|
|
3790
|
+
}
|
|
3791
|
+
e.precision === 0 && ve.endsWith(o.value) && (v.preventDefault(), P.value = me, Ve(() => h.value = me));
|
|
3792
|
+
}
|
|
3793
|
+
}
|
|
3794
|
+
async function ee(v) {
|
|
3795
|
+
["Enter", "ArrowLeft", "ArrowRight", "Backspace", "Delete", "Tab"].includes(v.key) || v.ctrlKey || ["ArrowDown", "ArrowUp"].includes(v.key) && (v.preventDefault(), v.stopPropagation(), ne(), await Ve(), v.key === "ArrowDown" ? q(!1) : q());
|
|
3796
|
+
}
|
|
3797
|
+
function U(v) {
|
|
3798
|
+
v.stopPropagation();
|
|
3799
|
+
}
|
|
3800
|
+
function K(v) {
|
|
3801
|
+
v.currentTarget?.releasePointerCapture(v.pointerId), v.preventDefault(), i();
|
|
3802
|
+
}
|
|
3803
|
+
function Z(v) {
|
|
3804
|
+
v.currentTarget?.setPointerCapture(v.pointerId), v.preventDefault(), v.stopPropagation(), l("up");
|
|
3805
|
+
}
|
|
3806
|
+
function N(v) {
|
|
3807
|
+
v.currentTarget?.setPointerCapture(v.pointerId), v.preventDefault(), v.stopPropagation(), l("down");
|
|
3808
|
+
}
|
|
3809
|
+
function ne() {
|
|
3810
|
+
if (s.value || !n.value) return;
|
|
3811
|
+
const v = n.value.value, P = Number(v.replace(o.value, "."));
|
|
3812
|
+
v && !isNaN(P) ? h.value = r(Me(P, e.min, e.max)) : h.value = null;
|
|
3813
|
+
}
|
|
3814
|
+
function ue() {
|
|
3815
|
+
s.value || (h.value = m.value !== null && !isNaN(m.value) ? r(m.value, e.precision, !1) : null);
|
|
3816
|
+
}
|
|
3817
|
+
function D() {
|
|
3818
|
+
if (!s.value) {
|
|
3819
|
+
if (m.value === null || isNaN(m.value)) {
|
|
3820
|
+
h.value = null;
|
|
3821
|
+
return;
|
|
3822
|
+
}
|
|
3823
|
+
h.value = m.value.toString().replace(".", o.value);
|
|
3824
|
+
}
|
|
3825
|
+
}
|
|
3826
|
+
function $() {
|
|
3827
|
+
D();
|
|
3828
|
+
}
|
|
3829
|
+
function w() {
|
|
3830
|
+
ne();
|
|
3831
|
+
}
|
|
3832
|
+
return de(() => {
|
|
3833
|
+
const {
|
|
3834
|
+
modelValue: v,
|
|
3835
|
+
type: P,
|
|
3836
|
+
...V
|
|
3837
|
+
} = Ke.filterProps(e);
|
|
3838
|
+
function O() {
|
|
3839
|
+
return t.increment ? f(Ae, {
|
|
3840
|
+
key: "increment-defaults",
|
|
3841
|
+
defaults: {
|
|
3842
|
+
VBtn: {
|
|
3843
|
+
disabled: !_.value,
|
|
3844
|
+
height: A.value,
|
|
3845
|
+
size: H.value,
|
|
3846
|
+
icon: T.value,
|
|
3847
|
+
variant: "text"
|
|
3848
|
+
}
|
|
3849
|
+
}
|
|
3850
|
+
}, {
|
|
3851
|
+
default: () => [t.increment(p)]
|
|
3852
|
+
}) : f(qe, {
|
|
3853
|
+
"aria-hidden": "true",
|
|
3854
|
+
"data-testid": "increment",
|
|
3855
|
+
disabled: !_.value,
|
|
3856
|
+
height: A.value,
|
|
3857
|
+
icon: T.value,
|
|
3858
|
+
key: "increment-btn",
|
|
3859
|
+
onClick: U,
|
|
3860
|
+
onPointerdown: Z,
|
|
3861
|
+
onPointerup: K,
|
|
3862
|
+
onPointercancel: K,
|
|
3863
|
+
size: H.value,
|
|
3864
|
+
variant: "text",
|
|
3865
|
+
tabindex: "-1"
|
|
3866
|
+
}, null);
|
|
3867
|
+
}
|
|
3868
|
+
function j() {
|
|
3869
|
+
return t.decrement ? f(Ae, {
|
|
3870
|
+
key: "decrement-defaults",
|
|
3871
|
+
defaults: {
|
|
3872
|
+
VBtn: {
|
|
3873
|
+
disabled: !C.value,
|
|
3874
|
+
height: A.value,
|
|
3875
|
+
size: H.value,
|
|
3876
|
+
icon: F.value,
|
|
3877
|
+
variant: "text"
|
|
3878
|
+
}
|
|
3879
|
+
}
|
|
3880
|
+
}, {
|
|
3881
|
+
default: () => [t.decrement(R)]
|
|
3882
|
+
}) : f(qe, {
|
|
3883
|
+
"aria-hidden": "true",
|
|
3884
|
+
"data-testid": "decrement",
|
|
3885
|
+
disabled: !C.value,
|
|
3886
|
+
height: A.value,
|
|
3887
|
+
icon: F.value,
|
|
3888
|
+
key: "decrement-btn",
|
|
3889
|
+
onClick: U,
|
|
3890
|
+
onPointerdown: N,
|
|
3891
|
+
onPointerup: K,
|
|
3892
|
+
onPointercancel: K,
|
|
3893
|
+
size: H.value,
|
|
3894
|
+
variant: "text",
|
|
3895
|
+
tabindex: "-1"
|
|
3896
|
+
}, null);
|
|
3897
|
+
}
|
|
3898
|
+
function ve() {
|
|
3899
|
+
return b("div", {
|
|
3900
|
+
class: "v-number-input__control"
|
|
3901
|
+
}, [j(), f(Le, {
|
|
3902
|
+
vertical: k.value !== "stacked"
|
|
3903
|
+
}, null), O()]);
|
|
3904
|
+
}
|
|
3905
|
+
function me() {
|
|
3906
|
+
return !e.hideInput && !e.inset ? f(Le, {
|
|
3907
|
+
vertical: !0
|
|
3908
|
+
}, null) : void 0;
|
|
3909
|
+
}
|
|
3910
|
+
const ge = k.value === "split" ? b("div", {
|
|
3911
|
+
class: "v-number-input__control"
|
|
3912
|
+
}, [f(Le, {
|
|
3913
|
+
vertical: !0
|
|
3914
|
+
}, null), O()]) : e.reverse || k.value === "hidden" ? void 0 : b(ce, null, [me(), ve()]), Fe = t["append-inner"] || ge, X = k.value === "split" ? b("div", {
|
|
3915
|
+
class: "v-number-input__control"
|
|
3916
|
+
}, [j(), f(Le, {
|
|
3917
|
+
vertical: !0
|
|
3918
|
+
}, null)]) : e.reverse && k.value !== "hidden" ? b(ce, null, [ve(), me()]) : void 0, fe = t["prepend-inner"] || X;
|
|
3919
|
+
return f(Ke, L({
|
|
3920
|
+
ref: n
|
|
3921
|
+
}, V, {
|
|
3922
|
+
modelValue: h.value,
|
|
3923
|
+
"onUpdate:modelValue": (z) => h.value = z,
|
|
3924
|
+
focused: u.value,
|
|
3925
|
+
"onUpdate:focused": (z) => u.value = z,
|
|
3926
|
+
validationValue: m.value,
|
|
3927
|
+
error: e.error || x.value || void 0,
|
|
3928
|
+
onBeforeinput: te,
|
|
3929
|
+
onFocus: $,
|
|
3930
|
+
onBlur: w,
|
|
3931
|
+
onKeydown: ee,
|
|
3932
|
+
class: ["v-number-input", {
|
|
3933
|
+
"v-number-input--default": k.value === "default",
|
|
3934
|
+
"v-number-input--hide-input": e.hideInput,
|
|
3935
|
+
"v-number-input--inset": e.inset,
|
|
3936
|
+
"v-number-input--reverse": e.reverse,
|
|
3937
|
+
"v-number-input--split": k.value === "split",
|
|
3938
|
+
"v-number-input--stacked": k.value === "stacked"
|
|
3939
|
+
}, e.class],
|
|
3940
|
+
style: e.style,
|
|
3941
|
+
inputmode: "decimal"
|
|
3942
|
+
}), {
|
|
3943
|
+
...t,
|
|
3944
|
+
"append-inner": Fe ? function() {
|
|
3945
|
+
for (var z = arguments.length, ye = new Array(z), S = 0; S < z; S++)
|
|
3946
|
+
ye[S] = arguments[S];
|
|
3947
|
+
return b(ce, null, [t["append-inner"]?.(...ye), ge]);
|
|
3948
|
+
} : void 0,
|
|
3949
|
+
"prepend-inner": fe ? function() {
|
|
3950
|
+
for (var z = arguments.length, ye = new Array(z), S = 0; S < z; S++)
|
|
3951
|
+
ye[S] = arguments[S];
|
|
3952
|
+
return b(ce, null, [X, t["prepend-inner"]?.(...ye)]);
|
|
3953
|
+
} : void 0
|
|
3954
|
+
});
|
|
3955
|
+
}), gt({}, n);
|
|
3956
|
+
}
|
|
3957
|
+
}), to = { class: "text-medium-emphasis ps-2" }, lo = ["id"], no = {
|
|
3958
|
+
__name: "index",
|
|
3959
|
+
props: {
|
|
3960
|
+
modelValue: {},
|
|
3961
|
+
modelModifiers: {}
|
|
3962
|
+
},
|
|
3963
|
+
emits: /* @__PURE__ */ Lt(["closeDialog", "save"], ["update:modelValue"]),
|
|
3964
|
+
setup(e, { emit: a }) {
|
|
3965
|
+
const t = _e("table_props"), n = _e("datatablesPluginOptions"), l = Vt(e, "modelValue"), i = a, c = {
|
|
3966
|
+
textfield: Ke,
|
|
3967
|
+
select: Na,
|
|
3968
|
+
number: eo,
|
|
3969
|
+
datepicker: Te(
|
|
3970
|
+
() => import("./Datepicker-BO2Ixl4r.js")
|
|
3971
|
+
),
|
|
3972
|
+
comparison: Te(
|
|
3973
|
+
() => import("./Comparison-C2hZMBq4.js")
|
|
3974
|
+
)
|
|
3975
|
+
}, s = I(() => t.headers.filter((d) => d.advancedFilter !== !1 && !d.hidden)), u = (d) => d ? typeof d == "string" ? c[d] : d : c.textfield;
|
|
3976
|
+
return re(
|
|
3977
|
+
s,
|
|
3978
|
+
(d) => {
|
|
3979
|
+
d.forEach((o) => {
|
|
3980
|
+
const r = o.advancedFilter?.key ?? o.key;
|
|
3981
|
+
Object.hasOwn(l.value, r) || (l.value[r] = {
|
|
3982
|
+
comparison: "=",
|
|
3983
|
+
value: null
|
|
3984
|
+
});
|
|
3985
|
+
});
|
|
3986
|
+
},
|
|
3987
|
+
{ immediate: !0 }
|
|
3988
|
+
), Ye(async () => {
|
|
3989
|
+
await t.options.advancedFilters?.onMounted();
|
|
3990
|
+
}), (d, o) => (le(), ke(sn, { rounded: "lg" }, {
|
|
3991
|
+
default: Ie(() => [
|
|
3992
|
+
f(Zt, { class: "d-flex justify-space-between align-center" }, {
|
|
3993
|
+
default: Ie(() => [
|
|
3994
|
+
b("div", to, bt(d.$t("$datatables.advancedFilters")), 1),
|
|
3995
|
+
f(qe, {
|
|
3996
|
+
icon: M(n).header.icons.close,
|
|
3997
|
+
variant: "text",
|
|
3998
|
+
onClick: o[0] || (o[0] = (r) => i("closeDialog"))
|
|
3999
|
+
}, null, 8, ["icon"])
|
|
4000
|
+
]),
|
|
4001
|
+
_: 1
|
|
4002
|
+
}),
|
|
4003
|
+
f(Le),
|
|
4004
|
+
f(el, { class: "overflow-auto pt-8" }, {
|
|
4005
|
+
default: Ie(() => [
|
|
4006
|
+
(le(!0), ze(ce, null, Ht(M(s), (r, m) => (le(), ze("div", {
|
|
4007
|
+
id: `advanced-filter-${r.key}`,
|
|
4008
|
+
key: `filter-${m}`,
|
|
4009
|
+
class: oe(`advanced-filter advanced-filter--${r.key}`)
|
|
4010
|
+
}, [
|
|
4011
|
+
(le(), ke(Oe(u(r.advancedFilter?.component)), L({
|
|
4012
|
+
modelValue: l.value[r.advancedFilter?.key ?? r.key].value,
|
|
4013
|
+
"onUpdate:modelValue": (g) => l.value[r.advancedFilter?.key ?? r.key].value = g,
|
|
4014
|
+
comparison: l.value[r.advancedFilter?.key ?? r.key].comparison,
|
|
4015
|
+
"onUpdate:comparison": (g) => l.value[r.advancedFilter?.key ?? r.key].comparison = g
|
|
4016
|
+
}, { ref_for: !0 }, r.advancedFilter?.options, {
|
|
4017
|
+
label: r.title,
|
|
4018
|
+
variant: "underlined",
|
|
4019
|
+
clearable: ""
|
|
4020
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "comparison", "onUpdate:comparison", "label"]))
|
|
4021
|
+
], 10, lo))), 128))
|
|
4022
|
+
]),
|
|
4023
|
+
_: 1
|
|
4024
|
+
}),
|
|
4025
|
+
f(Le, { class: "mt-2" }),
|
|
4026
|
+
f(un, { class: "my-2 d-flex justify-end" }, {
|
|
4027
|
+
default: Ie(() => [
|
|
4028
|
+
f(qe, {
|
|
4029
|
+
class: "text-none",
|
|
4030
|
+
text: d.$t("$datatables.cancel"),
|
|
4031
|
+
onClick: o[1] || (o[1] = (r) => i("closeDialog"))
|
|
4032
|
+
}, null, 8, ["text"]),
|
|
4033
|
+
f(qe, {
|
|
4034
|
+
class: "text-none",
|
|
4035
|
+
color: "primary",
|
|
4036
|
+
text: d.$t("$datatables.submit"),
|
|
4037
|
+
variant: "flat",
|
|
4038
|
+
onClick: o[2] || (o[2] = (r) => i("save"))
|
|
4039
|
+
}, null, 8, ["text"])
|
|
4040
|
+
]),
|
|
4041
|
+
_: 1
|
|
4042
|
+
})
|
|
4043
|
+
]),
|
|
4044
|
+
_: 1
|
|
4045
|
+
}));
|
|
4046
|
+
}
|
|
4047
|
+
};
|
|
4048
|
+
function dl(e) {
|
|
4049
|
+
return JSON.parse(JSON.stringify(e));
|
|
4050
|
+
}
|
|
4051
|
+
function Nt(e, a) {
|
|
4052
|
+
if (e === a) return !0;
|
|
4053
|
+
if (e == null || a == null || typeof e != typeof a) return !1;
|
|
4054
|
+
if (e instanceof Date && a instanceof Date)
|
|
4055
|
+
return e.getTime() === a.getTime();
|
|
4056
|
+
if (e instanceof RegExp && a instanceof RegExp)
|
|
4057
|
+
return e.toString() === a.toString();
|
|
4058
|
+
if (Array.isArray(e) && Array.isArray(a)) {
|
|
4059
|
+
if (e.length !== a.length) return !1;
|
|
4060
|
+
for (let t = 0; t < e.length; t++)
|
|
4061
|
+
if (!Nt(e[t], a[t])) return !1;
|
|
4062
|
+
return !0;
|
|
4063
|
+
}
|
|
4064
|
+
if (typeof e == "object" && typeof a == "object") {
|
|
4065
|
+
const t = Object.keys(e), n = Object.keys(a);
|
|
4066
|
+
if (t.length !== n.length) return !1;
|
|
4067
|
+
for (const l of t) {
|
|
4068
|
+
if (!n.includes(l)) return !1;
|
|
4069
|
+
const i = e[l], c = a[l];
|
|
4070
|
+
if (!Nt(i, c)) return !1;
|
|
4071
|
+
}
|
|
4072
|
+
return !0;
|
|
4073
|
+
}
|
|
4074
|
+
return !1;
|
|
4075
|
+
}
|
|
4076
|
+
const ao = {
|
|
4077
|
+
__name: "Dialog",
|
|
4078
|
+
props: {
|
|
4079
|
+
modelValue: { required: !0 },
|
|
4080
|
+
modelModifiers: {}
|
|
4081
|
+
},
|
|
4082
|
+
emits: ["update:modelValue"],
|
|
4083
|
+
setup(e) {
|
|
4084
|
+
const a = Pt(), { advancedFiltersState: t } = At(), { setData: n } = a, l = Vt(e, "modelValue"), i = W({}), c = _e("table_props"), s = _e("busEmits"), u = () => {
|
|
4085
|
+
const d = Object.entries(i.value).filter(([, o]) => {
|
|
4086
|
+
const r = o.value;
|
|
4087
|
+
return Array.isArray(r) || typeof r == "string" ? r.length > 0 : r != null && r !== "";
|
|
4088
|
+
}).reduce((o, [r, m]) => (o[r] = m, o), {});
|
|
4089
|
+
Nt(d, t.value) || (n({
|
|
4090
|
+
table_id: c.id,
|
|
4091
|
+
name: "advancedFilters",
|
|
4092
|
+
value: { query: dl(d) }
|
|
4093
|
+
}), s("advancedFilters:update", d)), l.value = !1;
|
|
4094
|
+
};
|
|
4095
|
+
return Ye(() => {
|
|
4096
|
+
i.value = dl(t.value);
|
|
4097
|
+
}), (d, o) => {
|
|
4098
|
+
const r = no, m = aa;
|
|
4099
|
+
return le(), ze("div", null, [
|
|
4100
|
+
f(on, {
|
|
4101
|
+
modelValue: l.value,
|
|
4102
|
+
"onUpdate:modelValue": o[1] || (o[1] = (g) => l.value = g),
|
|
4103
|
+
"max-width": "550",
|
|
4104
|
+
"retain-focus": !1
|
|
4105
|
+
}, {
|
|
4106
|
+
default: Ie(({ isActive: g }) => [
|
|
4107
|
+
f(r, {
|
|
4108
|
+
modelValue: M(i),
|
|
4109
|
+
"onUpdate:modelValue": o[0] || (o[0] = (y) => pt(i) ? i.value = y : null),
|
|
4110
|
+
onSave: u,
|
|
4111
|
+
onCloseDialog: (y) => g.value = !1
|
|
4112
|
+
}, null, 8, ["modelValue", "onCloseDialog"])
|
|
4113
|
+
]),
|
|
4114
|
+
_: 1
|
|
4115
|
+
}, 8, ["modelValue"]),
|
|
4116
|
+
Object.keys(M(t)).length ? (le(), ke(m, {
|
|
4117
|
+
key: 0,
|
|
4118
|
+
modelValue: M(i),
|
|
4119
|
+
"onUpdate:modelValue": o[2] || (o[2] = (g) => pt(i) ? i.value = g : null),
|
|
4120
|
+
onSave: u
|
|
4121
|
+
}, null, 8, ["modelValue"])) : Re("", !0)
|
|
4122
|
+
]);
|
|
4123
|
+
};
|
|
4124
|
+
}
|
|
4125
|
+
};
|
|
4126
|
+
function oo() {
|
|
4127
|
+
const e = _e("datatablesPluginOptions"), { t: a } = zn(), { advancedFiltersState: t } = At(), n = W(!1), l = I(() => Object.keys(t.value).length);
|
|
4128
|
+
return { advancedFiltersItems: I(() => [
|
|
4129
|
+
{
|
|
4130
|
+
title: `${a("$datatables.advancedFilters")}`,
|
|
4131
|
+
onClick: () => n.value = !0,
|
|
4132
|
+
prependIcon: e.header.icons.advancedFilters
|
|
4133
|
+
}
|
|
4134
|
+
]), advancedFiltersDialog: n, activeAdvancedFilters: l };
|
|
4135
|
+
}
|
|
4136
|
+
const io = /* @__PURE__ */ fl({
|
|
4137
|
+
__name: "index",
|
|
4138
|
+
setup(e) {
|
|
4139
|
+
const { advancedFiltersItems: a, advancedFiltersDialog: t, activeAdvancedFilters: n } = oo();
|
|
4140
|
+
return (l, i) => {
|
|
4141
|
+
const c = ao;
|
|
4142
|
+
return le(), ze("div", null, [
|
|
4143
|
+
(le(!0), ze(ce, null, Ht(M(a), (s, u) => (le(), ke(qe, L({
|
|
4144
|
+
key: u,
|
|
4145
|
+
icon: "",
|
|
4146
|
+
variant: "text",
|
|
4147
|
+
color: M(n) ? "primary" : "dark",
|
|
4148
|
+
density: "comfortable"
|
|
4149
|
+
}, { ref_for: !0 }, s), {
|
|
4150
|
+
default: Ie(() => [
|
|
4151
|
+
M(n) ? (le(), ke(Ha, {
|
|
4152
|
+
key: 0,
|
|
4153
|
+
color: "primary",
|
|
4154
|
+
content: M(n)
|
|
4155
|
+
}, {
|
|
4156
|
+
default: Ie(() => [
|
|
4157
|
+
f(Se, {
|
|
4158
|
+
icon: s.prependIcon
|
|
4159
|
+
}, null, 8, ["icon"])
|
|
4160
|
+
]),
|
|
4161
|
+
_: 2
|
|
4162
|
+
}, 1032, ["content"])) : (le(), ke(Se, {
|
|
4163
|
+
key: 1,
|
|
4164
|
+
icon: s.prependIcon
|
|
4165
|
+
}, null, 8, ["icon"]))
|
|
4166
|
+
]),
|
|
4167
|
+
_: 2
|
|
4168
|
+
}, 1040, ["color"]))), 128)),
|
|
4169
|
+
f(c, {
|
|
4170
|
+
modelValue: M(t),
|
|
4171
|
+
"onUpdate:modelValue": i[0] || (i[0] = (s) => pt(t) ? t.value = s : null)
|
|
4172
|
+
}, null, 8, ["modelValue"])
|
|
4173
|
+
]);
|
|
4174
|
+
};
|
|
4175
|
+
}
|
|
4176
|
+
}), uo = {
|
|
4177
|
+
class: "d-flex align-center",
|
|
4178
|
+
style: { gap: "0.75rem" }
|
|
4179
|
+
}, so = { class: "ms-auto" }, ro = /* @__PURE__ */ fl({
|
|
4180
|
+
__name: "index",
|
|
4181
|
+
props: {
|
|
4182
|
+
responsiveHeader: { type: Boolean }
|
|
4183
|
+
},
|
|
4184
|
+
setup(e) {
|
|
4185
|
+
const a = Te(() => import("./Search-CdHQz2KW.js")), t = Te(() => import("./RefreshTable-BNy_MWZg.js")), n = Te(() => import("./Options-DrhE_fto.js")), l = Te(() => import("./index-BU9rb0Q-.js")), i = Te(() => import("./index-DzyBRRkM.js")), c = Te(() => import("./index-zhSEiNN0.js")), s = _e("table_props"), u = W(null), d = s.options?.header?.components ?? {};
|
|
4186
|
+
return (o, r) => {
|
|
4187
|
+
const m = io;
|
|
4188
|
+
return le(), ze("div", uo, [
|
|
4189
|
+
e.responsiveHeader ? Re("", !0) : (le(), ke(m, { key: 0 })),
|
|
4190
|
+
M(s).hardFilters.length ? (le(), ke(Oe(M(d).hardFilters ?? M(l)), {
|
|
4191
|
+
key: 1,
|
|
4192
|
+
id: "header-hardFilters"
|
|
4193
|
+
})) : Re("", !0),
|
|
4194
|
+
(le(), ke(Oe(M(d).toolbar), { id: "header-toolbar" })),
|
|
4195
|
+
b("div", so, [
|
|
4196
|
+
(le(), ke(Oe(M(d).search ?? M(a)), { id: "header-search" })),
|
|
4197
|
+
e.responsiveHeader ? Re("", !0) : (le(), ke(Oe(M(d).columns ?? M(i)), {
|
|
4198
|
+
key: 0,
|
|
4199
|
+
"component-refs": { columns: M(u) }
|
|
4200
|
+
}, null, 8, ["component-refs"])),
|
|
4201
|
+
e.responsiveHeader ? Re("", !0) : (le(), ke(Oe(M(d).download ?? M(c)), { key: 1 })),
|
|
4202
|
+
e.responsiveHeader ? Re("", !0) : (le(), ke(Oe(M(d).refreshTable ?? M(t)), { key: 2 })),
|
|
4203
|
+
(le(), ke(Oe(M(d).options ?? M(n)), { "responsive-header": e.responsiveHeader }, null, 8, ["responsive-header"]))
|
|
4204
|
+
])
|
|
4205
|
+
]);
|
|
4206
|
+
};
|
|
4207
|
+
}
|
|
4208
|
+
});
|
|
4209
|
+
function co(e) {
|
|
4210
|
+
const a = Pt(), { getCurrentTable: t, setTableHash: n, hashString: l } = a, i = W(!1), c = 5, s = I(() => t(e.id));
|
|
4211
|
+
re(
|
|
4212
|
+
s,
|
|
4213
|
+
async (g) => {
|
|
4214
|
+
g.options.hash && await u(g);
|
|
4215
|
+
},
|
|
4216
|
+
{
|
|
4217
|
+
deep: !0
|
|
4218
|
+
}
|
|
4219
|
+
);
|
|
4220
|
+
const u = async (g) => {
|
|
4221
|
+
if (i.value) return;
|
|
4222
|
+
i.value = !0, await Ve();
|
|
4223
|
+
const y = d(), h = y.findIndex(
|
|
4224
|
+
(x) => x.id === e.id
|
|
4225
|
+
);
|
|
4226
|
+
h > -1 ? y[h] = g : y.push(g), localStorage.setItem("datatables-state", JSON.stringify(y)), i.value = !1;
|
|
4227
|
+
}, d = () => {
|
|
4228
|
+
const g = localStorage.getItem("datatables-state");
|
|
4229
|
+
return JSON.parse(g ?? "[]");
|
|
4230
|
+
}, o = () => d().find((h) => h.id === e.id);
|
|
4231
|
+
return {
|
|
4232
|
+
saving: i,
|
|
4233
|
+
dataStateGet: o,
|
|
4234
|
+
tableDataState: s,
|
|
4235
|
+
checkTableState: async () => {
|
|
4236
|
+
const g = localStorage.getItem("datatables-state-v");
|
|
4237
|
+
parseInt(g) !== parseInt(c) && (localStorage.removeItem("datatables-state"), localStorage.setItem("datatables-state-v", c));
|
|
4238
|
+
const h = o()?.options.hash;
|
|
4239
|
+
if (h) {
|
|
4240
|
+
const x = await l(JSON.stringify(e.headers ?? []));
|
|
4241
|
+
h !== x && localStorage.removeItem("datatables-state");
|
|
4242
|
+
}
|
|
4243
|
+
n({ table_id: e.id, headers: e.headers });
|
|
4244
|
+
},
|
|
4245
|
+
deleteDataStorage: () => {
|
|
4246
|
+
localStorage.removeItem("datatables-state"), localStorage.removeItem("datatables-state-v");
|
|
4247
|
+
}
|
|
4248
|
+
};
|
|
4249
|
+
}
|
|
4250
|
+
const rn = Un(() => {
|
|
4251
|
+
const e = J({}), a = J({});
|
|
4252
|
+
return {
|
|
4253
|
+
storeOptions: {
|
|
4254
|
+
state: e,
|
|
4255
|
+
columns: a
|
|
4256
|
+
},
|
|
4257
|
+
setUserOptions: ({
|
|
4258
|
+
state: l = null,
|
|
4259
|
+
columns: i = null
|
|
4260
|
+
}) => {
|
|
4261
|
+
l && (e.value = l), i && (a.value = i);
|
|
4262
|
+
}
|
|
4263
|
+
};
|
|
4264
|
+
}), vo = {
|
|
4265
|
+
key: 0,
|
|
4266
|
+
class: "datatables-v2"
|
|
4267
|
+
}, fo = { class: "pe-4" }, mo = {
|
|
4268
|
+
__name: "Blueprint",
|
|
4269
|
+
props: {
|
|
4270
|
+
modelValue: {},
|
|
4271
|
+
modelModifiers: {}
|
|
4272
|
+
},
|
|
4273
|
+
emits: /* @__PURE__ */ Lt(["refreshTable", "refetchData", "advancedFilters:update", "hardFilters:update"], ["update:modelValue"]),
|
|
4274
|
+
setup(e, { expose: a, emit: t }) {
|
|
4275
|
+
const n = Te(() => import("./Table-DHHVRPoA.js")), l = Te(() => import("./TableServer-D4Q_9dET.js")), { storeOptions: i } = rn(), { saveTableOptions: c } = At(), s = Vt(e, "modelValue"), u = _e("table_props"), d = _e("datatablesPluginOptions"), o = W(null), r = W(!1), m = W(!1), g = W(!1), y = t, h = Pt(), { dataStateGet: x, tableDataState: _, checkTableState: C } = co(u), { addTable: k, restoreData: T } = h, F = W(!1);
|
|
4276
|
+
Kn(o, (A) => {
|
|
4277
|
+
const p = A[0], { width: R } = p.contentRect;
|
|
4278
|
+
F.value = R < 950;
|
|
4279
|
+
});
|
|
4280
|
+
const H = I(() => {
|
|
4281
|
+
const A = u.options?.header;
|
|
4282
|
+
return A === void 0 || typeof A == "object" && A !== null;
|
|
4283
|
+
});
|
|
4284
|
+
return Ye(async () => {
|
|
4285
|
+
k({ table_id: u.id }), await C();
|
|
4286
|
+
const A = x();
|
|
4287
|
+
if (A)
|
|
4288
|
+
T({ table_id: u.id, data: A });
|
|
4289
|
+
else {
|
|
4290
|
+
const R = _.value.options.columns;
|
|
4291
|
+
R.selected = u.headers.filter((E) => !E.hidden).map((E) => E.key), R.sorted = u.headers.map((E) => E.key);
|
|
4292
|
+
}
|
|
4293
|
+
c(Ln(i.state.value, _.value.options.state)), m.value = !0, await Ve(), g.value = !0;
|
|
4294
|
+
}), Ue("busEmits", y), Ue("tableRef", o), Ue("tableState", _), Ue("downloadModal", r), a({ tableRef: o }), (A, p) => {
|
|
4295
|
+
const R = ro;
|
|
4296
|
+
return M(m) ? (le(), ze("div", vo, [
|
|
4297
|
+
f(sn, null, {
|
|
4298
|
+
default: Ie(() => [
|
|
4299
|
+
M(H) ? (le(), ke(Zt, { key: 0 }, {
|
|
4300
|
+
default: Ie(() => [
|
|
4301
|
+
f(R, { "responsive-header": M(F) }, null, 8, ["responsive-header"])
|
|
4302
|
+
]),
|
|
4303
|
+
_: 1
|
|
4304
|
+
})) : Re("", !0),
|
|
4305
|
+
f(el, { class: "pa-0" }, {
|
|
4306
|
+
default: Ie(() => [
|
|
4307
|
+
M(g) ? (le(), ke(Oe(M(u).api ? M(l) : M(n)), {
|
|
4308
|
+
key: 0,
|
|
4309
|
+
ref_key: "tableRef",
|
|
4310
|
+
ref: o,
|
|
4311
|
+
modelValue: s.value,
|
|
4312
|
+
"onUpdate:modelValue": p[0] || (p[0] = (E) => s.value = E)
|
|
4313
|
+
}, null, 8, ["modelValue"])) : Re("", !0)
|
|
4314
|
+
]),
|
|
4315
|
+
_: 1
|
|
4316
|
+
})
|
|
4317
|
+
]),
|
|
4318
|
+
_: 1
|
|
4319
|
+
}),
|
|
4320
|
+
f(on, {
|
|
4321
|
+
modelValue: M(r),
|
|
4322
|
+
"onUpdate:modelValue": p[1] || (p[1] = (E) => pt(r) ? r.value = E : null),
|
|
4323
|
+
"max-width": "350",
|
|
4324
|
+
persistent: ""
|
|
4325
|
+
}, {
|
|
4326
|
+
default: Ie(() => [
|
|
4327
|
+
f(Yt, {
|
|
4328
|
+
class: "py-2",
|
|
4329
|
+
color: "primary",
|
|
4330
|
+
elevation: "12",
|
|
4331
|
+
rounded: "lg"
|
|
4332
|
+
}, {
|
|
4333
|
+
default: Ie(() => [
|
|
4334
|
+
f(it, {
|
|
4335
|
+
"prepend-icon": M(d).header.icons.download,
|
|
4336
|
+
title: A.$t("$datatables.preparing_download_file")
|
|
4337
|
+
}, {
|
|
4338
|
+
prepend: Ie(() => [
|
|
4339
|
+
b("div", fo, [
|
|
4340
|
+
f(Se, {
|
|
4341
|
+
color: "primary",
|
|
4342
|
+
size: "x-large"
|
|
4343
|
+
})
|
|
4344
|
+
])
|
|
4345
|
+
]),
|
|
4346
|
+
append: Ie(() => [
|
|
4347
|
+
f(Hn, {
|
|
4348
|
+
color: "primary",
|
|
4349
|
+
indeterminate: "disable-shrink",
|
|
4350
|
+
size: "16",
|
|
4351
|
+
width: "2"
|
|
4352
|
+
})
|
|
4353
|
+
]),
|
|
4354
|
+
_: 1
|
|
4355
|
+
}, 8, ["prepend-icon", "title"])
|
|
4356
|
+
]),
|
|
4357
|
+
_: 1
|
|
4358
|
+
})
|
|
4359
|
+
]),
|
|
4360
|
+
_: 1
|
|
4361
|
+
}, 8, ["modelValue"])
|
|
4362
|
+
])) : Re("", !0);
|
|
4363
|
+
};
|
|
4364
|
+
}
|
|
4365
|
+
}, go = ml("datatablesHooks", () => {
|
|
4366
|
+
const e = W({});
|
|
4367
|
+
return {
|
|
4368
|
+
hooks: e,
|
|
4369
|
+
registerHook: (n, l) => {
|
|
4370
|
+
Object.assign(e.value, { [n]: l });
|
|
4371
|
+
},
|
|
4372
|
+
triggerHook: (n, l) => {
|
|
4373
|
+
e.value.hasOwnProperty(n) && e.value[n](l);
|
|
4374
|
+
}
|
|
4375
|
+
};
|
|
4376
|
+
}), yo = {
|
|
4377
|
+
__name: "index",
|
|
4378
|
+
props: {
|
|
4379
|
+
id: {
|
|
4380
|
+
type: String,
|
|
4381
|
+
required: !0
|
|
4382
|
+
},
|
|
4383
|
+
api: {
|
|
4384
|
+
type: Object,
|
|
4385
|
+
default: () => {
|
|
4386
|
+
}
|
|
4387
|
+
},
|
|
4388
|
+
data: {
|
|
4389
|
+
type: Array,
|
|
4390
|
+
default: () => []
|
|
4391
|
+
},
|
|
4392
|
+
options: {
|
|
4393
|
+
type: Object,
|
|
4394
|
+
default: () => ({})
|
|
4395
|
+
},
|
|
4396
|
+
params: {
|
|
4397
|
+
type: Object,
|
|
4398
|
+
default: () => ({})
|
|
4399
|
+
},
|
|
4400
|
+
hardFilters: {
|
|
4401
|
+
type: Array,
|
|
4402
|
+
default: () => []
|
|
4403
|
+
},
|
|
4404
|
+
headers: {
|
|
4405
|
+
type: Array,
|
|
4406
|
+
default: () => []
|
|
4407
|
+
},
|
|
4408
|
+
loading: {
|
|
4409
|
+
type: Boolean,
|
|
4410
|
+
default: !1
|
|
4411
|
+
},
|
|
4412
|
+
locale: {
|
|
4413
|
+
type: String,
|
|
4414
|
+
default: "en"
|
|
4415
|
+
},
|
|
4416
|
+
title: {
|
|
4417
|
+
type: String,
|
|
4418
|
+
default: ""
|
|
4419
|
+
}
|
|
4420
|
+
},
|
|
4421
|
+
emits: ["refreshTable", "refetchData"],
|
|
4422
|
+
setup(e, { expose: a, emit: t }) {
|
|
4423
|
+
const n = e, { triggerHook: l } = go(), { storeOptions: i, setUserOptions: c } = rn(), s = W(null), u = W(0), d = async (m = {}) => {
|
|
4424
|
+
c(m), u.value < 99 && (r("refreshTable"), await Ve(), u.value++);
|
|
4425
|
+
}, o = (m = {}) => {
|
|
4426
|
+
c(m), s.value.tableRef.hasOwnProperty("reloadItems") && (s.value.tableRef.reloadItems(i.state.value), r("refetchData"));
|
|
4427
|
+
}, r = t;
|
|
4428
|
+
return a({ refreshTable: d, refetchData: o, triggerHook: l }), Ue("table_props", n), Ue("triggerHook", l), (m, g) => {
|
|
4429
|
+
const y = mo;
|
|
4430
|
+
return le(), ke(y, {
|
|
4431
|
+
id: e.id,
|
|
4432
|
+
ref_key: "table",
|
|
4433
|
+
ref: s,
|
|
4434
|
+
key: `${e.id}-${M(u)}`,
|
|
4435
|
+
onRefreshTable: d,
|
|
4436
|
+
onRefetchData: o
|
|
4437
|
+
}, null, 8, ["id"]);
|
|
4438
|
+
};
|
|
4439
|
+
}
|
|
4440
|
+
}, Vo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4441
|
+
__proto__: null,
|
|
4442
|
+
default: yo
|
|
4443
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
4444
|
+
export {
|
|
4445
|
+
Tt as A,
|
|
4446
|
+
Xl as B,
|
|
4447
|
+
eo as C,
|
|
4448
|
+
Vo as D,
|
|
4449
|
+
Co as V,
|
|
4450
|
+
ao as _,
|
|
4451
|
+
Nt as a,
|
|
4452
|
+
st as b,
|
|
4453
|
+
Jl as c,
|
|
4454
|
+
dl as d,
|
|
4455
|
+
Ra as e,
|
|
4456
|
+
Pt as f,
|
|
4457
|
+
sn as g,
|
|
4458
|
+
el as h,
|
|
4459
|
+
Ke as i,
|
|
4460
|
+
oo as j,
|
|
4461
|
+
co as k,
|
|
4462
|
+
go as l,
|
|
4463
|
+
Ea as m,
|
|
4464
|
+
na as n,
|
|
4465
|
+
ea as o,
|
|
4466
|
+
Yl as p,
|
|
4467
|
+
rl as q,
|
|
4468
|
+
sa as r,
|
|
4469
|
+
Ql as s,
|
|
4470
|
+
on as t,
|
|
4471
|
+
At as u,
|
|
4472
|
+
Zt as v,
|
|
4473
|
+
un as w,
|
|
4474
|
+
la as x,
|
|
4475
|
+
Ha as y,
|
|
4476
|
+
Ft as z
|
|
4477
|
+
};
|