@ianicdev/datatables2 0.11.6 → 0.11.7
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-DL9ojj3w.js → Comparison-BGS-fuIe.js} +1 -1
- package/dist/{Comparison-zf9wgAkk.cjs → Comparison-De27pAUU.cjs} +1 -1
- package/dist/Datepicker-CIuhuD6k.cjs +2 -0
- package/dist/{Datepicker-Duwv3zQB.js → Datepicker-Cw_J535b.js} +514 -509
- package/dist/{Options-BE82c0Zz.cjs → Options-DEe2eGBJ.cjs} +1 -1
- package/dist/{Options-CurNvolo.js → Options-I1PQEYFi.js} +5 -5
- package/dist/{RefreshTable-Cc0I1PA5.cjs → RefreshTable-CwKNOxC1.cjs} +1 -1
- package/dist/{RefreshTable-Cn3y6Lyg.js → RefreshTable-DJh8kVcF.js} +2 -2
- package/dist/{Search-BUb6ZctR.js → Search-C8e4aEIt.js} +2 -2
- package/dist/{Search-CvOD_IHr.cjs → Search-_MWrcP0W.cjs} +1 -1
- package/dist/{Table-DRC6dqmS.cjs → Table-BJ5tGV-x.cjs} +1 -1
- package/dist/{Table-D5xj84Hx.js → Table-ubU5wjVY.js} +3 -3
- package/dist/{TableServer-BrktC88-.cjs → TableServer-CDPE93Bi.cjs} +1 -1
- package/dist/{TableServer-DGx2_VC7.js → TableServer-DuwL1c97.js} +3 -3
- package/dist/cellRender-Dh2_N7Hn.cjs +1 -0
- package/dist/cellRender-u5Pfy695.js +2363 -0
- package/dist/dataTables-BxXcbziu.cjs +4 -0
- package/dist/{dataTables-BEIZ1GFJ.js → dataTables-Du4VyMxR.js} +2337 -2166
- package/dist/datatables.cjs +1 -1
- package/dist/datatables.js +1 -1
- package/dist/datatables2.css +1 -1
- package/dist/index-BeStYA4v.cjs +1 -0
- package/dist/{index-kEBJD9Uz.cjs → index-BebQe8X1.cjs} +1 -1
- package/dist/{index-DdbT75rv.js → index-CTF3ArB5.js} +2 -2
- package/dist/{index-C9IAfraU.cjs → index-Cfk_p1QT.cjs} +1 -1
- package/dist/{index-A7VzNfop.js → index-D0oTlDPt.js} +2 -2
- package/dist/index-Dlb5c56z.js +4618 -0
- package/dist/{index-Db7uKS4O.cjs → index-R3Q-lW3h.cjs} +1 -1
- package/dist/{index-BfwTwETw.js → index-pVnRXL21.js} +2 -2
- package/dist/{index.es-DB0V-0tm.js → index.es-BMrS5t0X.js} +1 -1
- package/dist/{index.es-DZnpWbiI.cjs → index.es-bmkO-qSm.cjs} +1 -1
- package/dist/{jspdf-BDAGZhm6.cjs → jspdf-BCsjByej.cjs} +24 -24
- package/dist/{jspdf-DpfxfImq.js → jspdf-BEHFm2qd.js} +480 -464
- package/dist/useColumns-BpprQUUi.cjs +1 -0
- package/dist/{useColumns-Dmca5HPg.js → useColumns-Csi8mDCk.js} +302 -286
- package/dist/{useDownload-DVYhgsLa.js → useDownload-B9YtKO_M.js} +1 -1
- package/dist/{useDownload-YBEDFv5z.cjs → useDownload-CELkYaWd.cjs} +1 -1
- package/dist/{useRefreshTable-BjtSww_t.cjs → useRefreshTable-CYZLF_fz.cjs} +1 -1
- package/dist/{useRefreshTable-BoTF0YZF.js → useRefreshTable-DkrhQ57E.js} +1 -1
- package/package.json +1 -1
- package/dist/Datepicker-Dg15YseP.cjs +0 -2
- package/dist/cellRender-DN6k6hHB.js +0 -2252
- package/dist/cellRender-DcK06KSn.cjs +0 -1
- package/dist/dataTables-DocfWkcv.cjs +0 -4
- package/dist/index-CqeIrUKn.cjs +0 -1
- package/dist/index-DIJYRSnI.js +0 -4482
- package/dist/useColumns-FMszZoTi.cjs +0 -1
|
@@ -0,0 +1,2363 @@
|
|
|
1
|
+
import { toRef as _, provide as ee, toRaw as re, inject as Y, ref as K, computed as D, toValue as j, watch as ge, shallowRef as We, onBeforeUpdate as Ct, createVNode as k, normalizeStyle as Ve, normalizeClass as z, createElementVNode as x, mergeProps as E, nextTick as we, watchEffect as Tt, capitalize as _t, Fragment as Q, createTextVNode as Oe, withModifiers as se, toDisplayString as Bt, toRefs as Ot, defineComponent as Et, h as At } from "vue";
|
|
2
|
+
import { aQ as Lt, a8 as Nt, E as X, p as B, aR as ce, ad as Ke, v as ze, c as Se, a4 as J, aS as Rt, y as te, aT as oe, aU as $t, g as M, u as Ht, s as Fe, b as ve, t as ke, f as Gt, aV as ie, h as q, aL as U, aW as Ee, k as A, w as jt, x as Ce, n as qe, N as Mt, Q as Wt, T as Ue, U as le, q as Qe, W as Kt, a7 as Te, aX as zt, ak as $, aY as qt, ag as Ut, Y as Xe, aj as Qt, i as Ae, al as Xt, o as _e, X as Pe, af as Ie, A as Yt, ap as ue, ax as Zt, Z as Jt, B as ea, a2 as ta } from "./dataTables-Du4VyMxR.js";
|
|
3
|
+
import { V as Ye, b as aa, c as fe, e as na, m as la, u as ra, d as sa, a as oa } from "./index-Dlb5c56z.js";
|
|
4
|
+
import de from "moment";
|
|
5
|
+
function Le(e, t, a) {
|
|
6
|
+
return Object.keys(e).filter((n) => Lt(n) && n.endsWith(t)).reduce((n, l) => (n[l.slice(0, -t.length)] = (r) => Nt(e[l], r, a(r)), n), {});
|
|
7
|
+
}
|
|
8
|
+
const ia = B({
|
|
9
|
+
expandOnClick: Boolean,
|
|
10
|
+
showExpand: Boolean,
|
|
11
|
+
expanded: {
|
|
12
|
+
type: Array,
|
|
13
|
+
default: () => []
|
|
14
|
+
}
|
|
15
|
+
}, "DataTable-expand"), Ze = /* @__PURE__ */ Symbol.for("vuetify:datatable:expanded");
|
|
16
|
+
function ua(e) {
|
|
17
|
+
const t = _(() => e.expandOnClick), a = X(e, "expanded", e.expanded, (c) => new Set(c), (c) => [...c.values()]);
|
|
18
|
+
function n(c, d) {
|
|
19
|
+
const f = new Set(a.value), m = re(c.value);
|
|
20
|
+
if (d)
|
|
21
|
+
f.add(m);
|
|
22
|
+
else {
|
|
23
|
+
const y = [...a.value].find((s) => re(s) === m);
|
|
24
|
+
f.delete(y);
|
|
25
|
+
}
|
|
26
|
+
a.value = f;
|
|
27
|
+
}
|
|
28
|
+
function l(c) {
|
|
29
|
+
const d = re(c.value);
|
|
30
|
+
return [...a.value].some((f) => re(f) === d);
|
|
31
|
+
}
|
|
32
|
+
function r(c) {
|
|
33
|
+
n(c, !l(c));
|
|
34
|
+
}
|
|
35
|
+
const o = {
|
|
36
|
+
expand: n,
|
|
37
|
+
expanded: a,
|
|
38
|
+
expandOnClick: t,
|
|
39
|
+
isExpanded: l,
|
|
40
|
+
toggleExpand: r
|
|
41
|
+
};
|
|
42
|
+
return ee(Ze, o), o;
|
|
43
|
+
}
|
|
44
|
+
function Je() {
|
|
45
|
+
const e = Y(Ze);
|
|
46
|
+
if (!e) throw new Error("foo");
|
|
47
|
+
return e;
|
|
48
|
+
}
|
|
49
|
+
const da = B({
|
|
50
|
+
groupBy: {
|
|
51
|
+
type: Array,
|
|
52
|
+
default: () => []
|
|
53
|
+
}
|
|
54
|
+
}, "DataTable-group"), et = /* @__PURE__ */ Symbol.for("vuetify:data-table-group");
|
|
55
|
+
function ca(e) {
|
|
56
|
+
return {
|
|
57
|
+
groupBy: X(e, "groupBy")
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
function fa(e) {
|
|
61
|
+
const {
|
|
62
|
+
disableSort: t,
|
|
63
|
+
groupBy: a,
|
|
64
|
+
sortBy: n
|
|
65
|
+
} = e, l = K(/* @__PURE__ */ new Set()), r = D(() => a.value.map((m) => ({
|
|
66
|
+
...m,
|
|
67
|
+
order: m.order ?? !1
|
|
68
|
+
})).concat(t?.value ? [] : n.value));
|
|
69
|
+
function o(m) {
|
|
70
|
+
return l.value.has(m.id);
|
|
71
|
+
}
|
|
72
|
+
function c(m) {
|
|
73
|
+
const y = new Set(l.value);
|
|
74
|
+
o(m) ? y.delete(m.id) : y.add(m.id), l.value = y;
|
|
75
|
+
}
|
|
76
|
+
function d(m) {
|
|
77
|
+
function y(s) {
|
|
78
|
+
const i = [];
|
|
79
|
+
for (const b of s.items)
|
|
80
|
+
"type" in b && b.type === "group" ? i.push(...y(b)) : i.push(b);
|
|
81
|
+
return [...new Set(i)];
|
|
82
|
+
}
|
|
83
|
+
return y({
|
|
84
|
+
items: m
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
const f = {
|
|
88
|
+
sortByWithGroups: r,
|
|
89
|
+
toggleGroup: c,
|
|
90
|
+
opened: l,
|
|
91
|
+
groupBy: a,
|
|
92
|
+
extractRows: d,
|
|
93
|
+
isGroupOpen: o
|
|
94
|
+
};
|
|
95
|
+
return ee(et, f), f;
|
|
96
|
+
}
|
|
97
|
+
function tt() {
|
|
98
|
+
const e = Y(et);
|
|
99
|
+
if (!e) throw new Error("Missing group!");
|
|
100
|
+
return e;
|
|
101
|
+
}
|
|
102
|
+
function ga(e, t) {
|
|
103
|
+
if (!e.length) return [];
|
|
104
|
+
const a = /* @__PURE__ */ new Map();
|
|
105
|
+
for (const n of e) {
|
|
106
|
+
const l = ce(n.raw, t);
|
|
107
|
+
a.has(l) || a.set(l, []), a.get(l).push(n);
|
|
108
|
+
}
|
|
109
|
+
return a;
|
|
110
|
+
}
|
|
111
|
+
function at(e, t) {
|
|
112
|
+
let a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0, n = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : "root";
|
|
113
|
+
if (!t.length) return [];
|
|
114
|
+
const l = ga(e, t[0]), r = [], o = t.slice(1);
|
|
115
|
+
return l.forEach((c, d) => {
|
|
116
|
+
const f = t[0], m = `${n}_${f}_${d}`;
|
|
117
|
+
r.push({
|
|
118
|
+
depth: a,
|
|
119
|
+
id: m,
|
|
120
|
+
key: f,
|
|
121
|
+
value: d,
|
|
122
|
+
items: o.length ? at(c, o, a + 1, m) : c,
|
|
123
|
+
type: "group"
|
|
124
|
+
});
|
|
125
|
+
}), r;
|
|
126
|
+
}
|
|
127
|
+
function nt(e, t, a) {
|
|
128
|
+
const n = [];
|
|
129
|
+
for (const l of e)
|
|
130
|
+
"type" in l && l.type === "group" ? (l.value != null && n.push(l), (t.has(l.id) || l.value == null) && (n.push(...nt(l.items, t, a)), a && n.push({
|
|
131
|
+
...l,
|
|
132
|
+
type: "group-summary"
|
|
133
|
+
}))) : n.push(l);
|
|
134
|
+
return n;
|
|
135
|
+
}
|
|
136
|
+
function va(e, t, a, n) {
|
|
137
|
+
const l = D(() => t.value.length ? at(j(e), t.value.map((o) => o.key)) : []), r = D(() => t.value.length ? nt(l.value, a.value, j(n)) : j(e));
|
|
138
|
+
return {
|
|
139
|
+
groups: l,
|
|
140
|
+
flatItems: r
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
function ma(e) {
|
|
144
|
+
let {
|
|
145
|
+
page: t,
|
|
146
|
+
itemsPerPage: a,
|
|
147
|
+
sortBy: n,
|
|
148
|
+
groupBy: l,
|
|
149
|
+
search: r
|
|
150
|
+
} = e;
|
|
151
|
+
const o = Ke("VDataTable"), c = () => ({
|
|
152
|
+
page: t.value,
|
|
153
|
+
itemsPerPage: a.value,
|
|
154
|
+
sortBy: n.value,
|
|
155
|
+
groupBy: l.value,
|
|
156
|
+
search: r.value
|
|
157
|
+
});
|
|
158
|
+
let d = null;
|
|
159
|
+
ge(c, (f) => {
|
|
160
|
+
ze(d, f) || (d && d.search !== f.search && (t.value = 1), o.emit("update:options", f), d = f);
|
|
161
|
+
}, {
|
|
162
|
+
deep: !0,
|
|
163
|
+
immediate: !0
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
const ba = B({
|
|
167
|
+
page: {
|
|
168
|
+
type: [Number, String],
|
|
169
|
+
default: 1
|
|
170
|
+
},
|
|
171
|
+
itemsPerPage: {
|
|
172
|
+
type: [Number, String],
|
|
173
|
+
default: 10
|
|
174
|
+
},
|
|
175
|
+
pageBy: {
|
|
176
|
+
type: String,
|
|
177
|
+
default: "any"
|
|
178
|
+
}
|
|
179
|
+
}, "DataTable-paginate"), lt = /* @__PURE__ */ Symbol.for("vuetify:data-table-pagination");
|
|
180
|
+
function ya(e) {
|
|
181
|
+
const t = X(e, "page", void 0, (n) => Number(n ?? 1)), a = X(e, "itemsPerPage", void 0, (n) => Number(n ?? 10));
|
|
182
|
+
return {
|
|
183
|
+
page: t,
|
|
184
|
+
itemsPerPage: a
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
function ha(e) {
|
|
188
|
+
const {
|
|
189
|
+
page: t,
|
|
190
|
+
itemsPerPage: a,
|
|
191
|
+
itemsLength: n
|
|
192
|
+
} = e, l = D(() => a.value === -1 ? 0 : a.value * (t.value - 1)), r = D(() => a.value === -1 ? n.value : Math.min(n.value, l.value + a.value)), o = D(() => a.value === -1 || n.value === 0 ? 1 : Math.ceil(n.value / a.value));
|
|
193
|
+
ge([t, o], () => {
|
|
194
|
+
t.value > o.value && (t.value = o.value);
|
|
195
|
+
});
|
|
196
|
+
function c(s) {
|
|
197
|
+
a.value = s, t.value = 1;
|
|
198
|
+
}
|
|
199
|
+
function d() {
|
|
200
|
+
t.value = Se(t.value + 1, 1, o.value);
|
|
201
|
+
}
|
|
202
|
+
function f() {
|
|
203
|
+
t.value = Se(t.value - 1, 1, o.value);
|
|
204
|
+
}
|
|
205
|
+
function m(s) {
|
|
206
|
+
t.value = Se(s, 1, o.value);
|
|
207
|
+
}
|
|
208
|
+
const y = {
|
|
209
|
+
page: t,
|
|
210
|
+
itemsPerPage: a,
|
|
211
|
+
startIndex: l,
|
|
212
|
+
stopIndex: r,
|
|
213
|
+
pageCount: o,
|
|
214
|
+
itemsLength: n,
|
|
215
|
+
nextPage: d,
|
|
216
|
+
prevPage: f,
|
|
217
|
+
setPage: m,
|
|
218
|
+
setItemsPerPage: c
|
|
219
|
+
};
|
|
220
|
+
return ee(lt, y), y;
|
|
221
|
+
}
|
|
222
|
+
function pa() {
|
|
223
|
+
const e = Y(lt);
|
|
224
|
+
if (!e) throw new Error("Missing pagination!");
|
|
225
|
+
return e;
|
|
226
|
+
}
|
|
227
|
+
function xa(e) {
|
|
228
|
+
const t = Ke("usePaginatedItems"), {
|
|
229
|
+
items: a,
|
|
230
|
+
startIndex: n,
|
|
231
|
+
stopIndex: l,
|
|
232
|
+
itemsPerPage: r
|
|
233
|
+
} = e, o = D(() => r.value <= 0 ? j(a) : j(a).slice(n.value, l.value));
|
|
234
|
+
return ge(o, (c) => {
|
|
235
|
+
t.emit("update:currentItems", c);
|
|
236
|
+
}, {
|
|
237
|
+
immediate: !0
|
|
238
|
+
}), {
|
|
239
|
+
paginatedItems: o
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
function Sa(e) {
|
|
243
|
+
const {
|
|
244
|
+
sortedItems: t,
|
|
245
|
+
paginate: a,
|
|
246
|
+
group: n
|
|
247
|
+
} = e, l = j(e.pageBy);
|
|
248
|
+
if (l === "item") {
|
|
249
|
+
const {
|
|
250
|
+
paginatedItems: r,
|
|
251
|
+
pageCount: o,
|
|
252
|
+
setItemsPerPage: c
|
|
253
|
+
} = a(t), {
|
|
254
|
+
flatItems: d
|
|
255
|
+
} = n(r);
|
|
256
|
+
return {
|
|
257
|
+
pageCount: o,
|
|
258
|
+
setItemsPerPage: c,
|
|
259
|
+
paginatedItems: d
|
|
260
|
+
};
|
|
261
|
+
}
|
|
262
|
+
if (l === "group") {
|
|
263
|
+
const {
|
|
264
|
+
flatItems: r,
|
|
265
|
+
groups: o
|
|
266
|
+
} = n(t), {
|
|
267
|
+
paginatedItems: c,
|
|
268
|
+
pageCount: d,
|
|
269
|
+
setItemsPerPage: f
|
|
270
|
+
} = a(o), m = D(() => {
|
|
271
|
+
if (!c.value.length) return [];
|
|
272
|
+
const y = c.value.at(0).id, s = c.value.at(-1).id, i = r.value.findIndex((u) => u.type === "group" && u.id === y), b = r.value.findIndex((u) => u.type === "group" && u.id === s), g = r.value.findIndex((u, P) => P > b && u.type === "group" && u.depth === 0);
|
|
273
|
+
return r.value.slice(i, g === -1 ? void 0 : g);
|
|
274
|
+
});
|
|
275
|
+
return {
|
|
276
|
+
pageCount: d,
|
|
277
|
+
setItemsPerPage: f,
|
|
278
|
+
paginatedItems: m
|
|
279
|
+
};
|
|
280
|
+
}
|
|
281
|
+
if (l === "any") {
|
|
282
|
+
const {
|
|
283
|
+
flatItems: r
|
|
284
|
+
} = n(t), {
|
|
285
|
+
paginatedItems: o,
|
|
286
|
+
pageCount: c,
|
|
287
|
+
setItemsPerPage: d
|
|
288
|
+
} = a(r);
|
|
289
|
+
return {
|
|
290
|
+
pageCount: c,
|
|
291
|
+
setItemsPerPage: d,
|
|
292
|
+
paginatedItems: o
|
|
293
|
+
};
|
|
294
|
+
}
|
|
295
|
+
throw new Error(`Unrecognized pagination target ${l}`);
|
|
296
|
+
}
|
|
297
|
+
const Pa = {
|
|
298
|
+
showSelectAll: !1,
|
|
299
|
+
allSelected: () => [],
|
|
300
|
+
select: (e) => {
|
|
301
|
+
let {
|
|
302
|
+
items: t,
|
|
303
|
+
value: a
|
|
304
|
+
} = e;
|
|
305
|
+
return new Set(a ? [t[0]?.value] : []);
|
|
306
|
+
},
|
|
307
|
+
selectAll: (e) => {
|
|
308
|
+
let {
|
|
309
|
+
selected: t
|
|
310
|
+
} = e;
|
|
311
|
+
return t;
|
|
312
|
+
}
|
|
313
|
+
}, rt = {
|
|
314
|
+
showSelectAll: !0,
|
|
315
|
+
allSelected: (e) => {
|
|
316
|
+
let {
|
|
317
|
+
currentPage: t
|
|
318
|
+
} = e;
|
|
319
|
+
return t;
|
|
320
|
+
},
|
|
321
|
+
select: (e) => {
|
|
322
|
+
let {
|
|
323
|
+
items: t,
|
|
324
|
+
value: a,
|
|
325
|
+
selected: n
|
|
326
|
+
} = e;
|
|
327
|
+
for (const l of t)
|
|
328
|
+
a ? n.add(l.value) : n.delete(l.value);
|
|
329
|
+
return n;
|
|
330
|
+
},
|
|
331
|
+
selectAll: (e) => {
|
|
332
|
+
let {
|
|
333
|
+
value: t,
|
|
334
|
+
currentPage: a,
|
|
335
|
+
selected: n
|
|
336
|
+
} = e;
|
|
337
|
+
return rt.select({
|
|
338
|
+
items: a,
|
|
339
|
+
value: t,
|
|
340
|
+
selected: n
|
|
341
|
+
});
|
|
342
|
+
}
|
|
343
|
+
}, wa = {
|
|
344
|
+
showSelectAll: !0,
|
|
345
|
+
allSelected: (e) => {
|
|
346
|
+
let {
|
|
347
|
+
allItems: t
|
|
348
|
+
} = e;
|
|
349
|
+
return t;
|
|
350
|
+
},
|
|
351
|
+
select: (e) => {
|
|
352
|
+
let {
|
|
353
|
+
items: t,
|
|
354
|
+
value: a,
|
|
355
|
+
selected: n
|
|
356
|
+
} = e;
|
|
357
|
+
for (const l of t)
|
|
358
|
+
a ? n.add(l.value) : n.delete(l.value);
|
|
359
|
+
return n;
|
|
360
|
+
},
|
|
361
|
+
selectAll: (e) => {
|
|
362
|
+
let {
|
|
363
|
+
value: t,
|
|
364
|
+
allItems: a
|
|
365
|
+
} = e;
|
|
366
|
+
return new Set(t ? a.map((n) => n.value) : []);
|
|
367
|
+
}
|
|
368
|
+
}, ka = B({
|
|
369
|
+
showSelect: Boolean,
|
|
370
|
+
selectStrategy: {
|
|
371
|
+
type: [String, Object],
|
|
372
|
+
default: "page"
|
|
373
|
+
},
|
|
374
|
+
modelValue: {
|
|
375
|
+
type: Array,
|
|
376
|
+
default: () => []
|
|
377
|
+
},
|
|
378
|
+
valueComparator: Function
|
|
379
|
+
}, "DataTable-select"), st = /* @__PURE__ */ Symbol.for("vuetify:data-table-selection");
|
|
380
|
+
function Ia(e, t) {
|
|
381
|
+
let {
|
|
382
|
+
allItems: a,
|
|
383
|
+
currentPage: n
|
|
384
|
+
} = t;
|
|
385
|
+
const l = X(e, "modelValue", e.modelValue, (h) => {
|
|
386
|
+
const I = e.valueComparator;
|
|
387
|
+
return I ? new Set(J(h).map((C) => a.value.find((w) => I(C, w.value))?.value ?? C)) : new Set(J(h).map((C) => Rt(C) ? a.value.find((w) => C === w.value)?.value ?? C : a.value.find((w) => ze(C, w.value))?.value ?? C));
|
|
388
|
+
}, (h) => [...h.values()]), r = D(() => a.value.filter((h) => h.selectable)), o = D(() => j(n).filter((h) => h.selectable)), c = D(() => {
|
|
389
|
+
if (typeof e.selectStrategy == "object") return e.selectStrategy;
|
|
390
|
+
switch (e.selectStrategy) {
|
|
391
|
+
case "single":
|
|
392
|
+
return Pa;
|
|
393
|
+
case "all":
|
|
394
|
+
return wa;
|
|
395
|
+
default:
|
|
396
|
+
return rt;
|
|
397
|
+
}
|
|
398
|
+
}), d = We(null);
|
|
399
|
+
function f(h) {
|
|
400
|
+
return J(h).every((I) => l.value.has(I.value));
|
|
401
|
+
}
|
|
402
|
+
function m(h) {
|
|
403
|
+
return J(h).some((I) => l.value.has(I.value));
|
|
404
|
+
}
|
|
405
|
+
function y(h, I) {
|
|
406
|
+
const C = c.value.select({
|
|
407
|
+
items: h,
|
|
408
|
+
value: I,
|
|
409
|
+
selected: new Set(l.value)
|
|
410
|
+
});
|
|
411
|
+
l.value = C;
|
|
412
|
+
}
|
|
413
|
+
function s(h, I, C) {
|
|
414
|
+
const w = [], R = j(n);
|
|
415
|
+
if (I = I ?? R.findIndex((H) => H.value === h.value), e.selectStrategy !== "single" && C?.shiftKey && d.value !== null) {
|
|
416
|
+
const [H, S] = [d.value, I].sort((p, v) => p - v);
|
|
417
|
+
w.push(...R.slice(H, S + 1).filter((p) => p.selectable));
|
|
418
|
+
} else
|
|
419
|
+
w.push(h), d.value = I;
|
|
420
|
+
y(w, !f([h]));
|
|
421
|
+
}
|
|
422
|
+
function i(h) {
|
|
423
|
+
const I = c.value.selectAll({
|
|
424
|
+
value: h,
|
|
425
|
+
allItems: r.value,
|
|
426
|
+
currentPage: o.value,
|
|
427
|
+
selected: new Set(l.value)
|
|
428
|
+
});
|
|
429
|
+
l.value = I;
|
|
430
|
+
}
|
|
431
|
+
const b = D(() => l.value.size > 0), g = D(() => {
|
|
432
|
+
const h = c.value.allSelected({
|
|
433
|
+
allItems: r.value,
|
|
434
|
+
currentPage: o.value
|
|
435
|
+
});
|
|
436
|
+
return !!h.length && f(h);
|
|
437
|
+
}), u = _(() => c.value.showSelectAll), P = {
|
|
438
|
+
toggleSelect: s,
|
|
439
|
+
select: y,
|
|
440
|
+
selectAll: i,
|
|
441
|
+
isSelected: f,
|
|
442
|
+
isSomeSelected: m,
|
|
443
|
+
someSelected: b,
|
|
444
|
+
allSelected: g,
|
|
445
|
+
showSelectAll: u,
|
|
446
|
+
lastSelectedIndex: d,
|
|
447
|
+
selectStrategy: c
|
|
448
|
+
};
|
|
449
|
+
return ee(st, P), P;
|
|
450
|
+
}
|
|
451
|
+
function me() {
|
|
452
|
+
const e = Y(st);
|
|
453
|
+
if (!e) throw new Error("Missing selection!");
|
|
454
|
+
return e;
|
|
455
|
+
}
|
|
456
|
+
const Da = B({
|
|
457
|
+
initialSortOrder: {
|
|
458
|
+
type: String,
|
|
459
|
+
default: "asc",
|
|
460
|
+
validator: (e) => !e || ["asc", "desc"].includes(e)
|
|
461
|
+
},
|
|
462
|
+
sortBy: {
|
|
463
|
+
type: Array,
|
|
464
|
+
default: () => []
|
|
465
|
+
},
|
|
466
|
+
customKeySort: Object,
|
|
467
|
+
multiSort: {
|
|
468
|
+
type: [Boolean, Object],
|
|
469
|
+
default: !1
|
|
470
|
+
},
|
|
471
|
+
mustSort: Boolean
|
|
472
|
+
}, "DataTable-sort"), ot = /* @__PURE__ */ Symbol.for("vuetify:data-table-sort");
|
|
473
|
+
function Va(e) {
|
|
474
|
+
const t = _(() => e.initialSortOrder), a = X(e, "sortBy"), n = _(() => e.mustSort), l = _(() => e.multiSort);
|
|
475
|
+
return {
|
|
476
|
+
initialSortOrder: t,
|
|
477
|
+
sortBy: a,
|
|
478
|
+
multiSort: l,
|
|
479
|
+
mustSort: n
|
|
480
|
+
};
|
|
481
|
+
}
|
|
482
|
+
function Fa(e, t) {
|
|
483
|
+
if (!$t(e))
|
|
484
|
+
return {
|
|
485
|
+
active: !!e
|
|
486
|
+
};
|
|
487
|
+
const {
|
|
488
|
+
key: a,
|
|
489
|
+
mode: n,
|
|
490
|
+
modifier: l
|
|
491
|
+
} = e, r = l === "alt" && t?.altKey || l === "shift" && t?.shiftKey;
|
|
492
|
+
return {
|
|
493
|
+
active: !a || t?.ctrlKey || t?.metaKey || !1,
|
|
494
|
+
mode: r ? n === "append" ? "prepend" : "append" : n
|
|
495
|
+
};
|
|
496
|
+
}
|
|
497
|
+
function Ca(e) {
|
|
498
|
+
const {
|
|
499
|
+
initialSortOrder: t,
|
|
500
|
+
sortBy: a,
|
|
501
|
+
mustSort: n,
|
|
502
|
+
multiSort: l,
|
|
503
|
+
page: r
|
|
504
|
+
} = e, o = function(f, m) {
|
|
505
|
+
let y = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
|
|
506
|
+
if (f.key == null) return;
|
|
507
|
+
let s = a.value.map((u) => ({
|
|
508
|
+
...u
|
|
509
|
+
})) ?? [];
|
|
510
|
+
const i = s.find((u) => u.key === f.key), b = t.value, g = t.value === "desc" ? "asc" : "desc";
|
|
511
|
+
if (i)
|
|
512
|
+
i.order === g ? y || n.value && s.length === 1 ? i.order = t.value : s = s.filter((u) => u.key !== f.key) : i.order = g;
|
|
513
|
+
else {
|
|
514
|
+
const {
|
|
515
|
+
active: u,
|
|
516
|
+
mode: P
|
|
517
|
+
} = Fa(l.value, m);
|
|
518
|
+
u ? P === "prepend" ? s.unshift({
|
|
519
|
+
key: f.key,
|
|
520
|
+
order: b
|
|
521
|
+
}) : s.push({
|
|
522
|
+
key: f.key,
|
|
523
|
+
order: b
|
|
524
|
+
}) : s = [{
|
|
525
|
+
key: f.key,
|
|
526
|
+
order: b
|
|
527
|
+
}];
|
|
528
|
+
}
|
|
529
|
+
a.value = s, r && (r.value = 1);
|
|
530
|
+
};
|
|
531
|
+
function c(f) {
|
|
532
|
+
return !!a.value.find((m) => m.key === f.key);
|
|
533
|
+
}
|
|
534
|
+
const d = {
|
|
535
|
+
sortBy: a,
|
|
536
|
+
toggleSort: o,
|
|
537
|
+
isSorted: c
|
|
538
|
+
};
|
|
539
|
+
return ee(ot, d), d;
|
|
540
|
+
}
|
|
541
|
+
function it() {
|
|
542
|
+
const e = Y(ot);
|
|
543
|
+
if (!e) throw new Error("Missing sort!");
|
|
544
|
+
return e;
|
|
545
|
+
}
|
|
546
|
+
function Ta(e, t, a, n) {
|
|
547
|
+
const l = te();
|
|
548
|
+
return {
|
|
549
|
+
sortedItems: D(() => a.value.length ? _a(t.value, a.value, l.current.value, {
|
|
550
|
+
transform: n?.transform,
|
|
551
|
+
sortFunctions: {
|
|
552
|
+
...e.customKeySort,
|
|
553
|
+
...n?.sortFunctions?.value
|
|
554
|
+
},
|
|
555
|
+
sortRawFunctions: n?.sortRawFunctions?.value
|
|
556
|
+
}) : t.value)
|
|
557
|
+
};
|
|
558
|
+
}
|
|
559
|
+
function _a(e, t, a, n) {
|
|
560
|
+
const l = new Intl.Collator(a, {
|
|
561
|
+
sensitivity: "accent",
|
|
562
|
+
usage: "sort"
|
|
563
|
+
});
|
|
564
|
+
return e.map((o) => [o, n?.transform ? n.transform(o) : o]).sort((o, c) => {
|
|
565
|
+
for (let d = 0; d < t.length; d++) {
|
|
566
|
+
let f = !1;
|
|
567
|
+
const m = t[d].key, y = t[d].order ?? "asc";
|
|
568
|
+
if (y === !1) continue;
|
|
569
|
+
let s = ce(o[1], m), i = ce(c[1], m), b = o[0].raw, g = c[0].raw;
|
|
570
|
+
if (y === "desc" && ([s, i] = [i, s], [b, g] = [g, b]), n?.sortRawFunctions?.[m]) {
|
|
571
|
+
const u = n.sortRawFunctions[m](b, g);
|
|
572
|
+
if (u == null) continue;
|
|
573
|
+
if (f = !0, u) return u;
|
|
574
|
+
}
|
|
575
|
+
if (n?.sortFunctions?.[m]) {
|
|
576
|
+
const u = n.sortFunctions[m](s, i);
|
|
577
|
+
if (u == null) continue;
|
|
578
|
+
if (f = !0, u) return u;
|
|
579
|
+
}
|
|
580
|
+
if (!f && (s instanceof Date && i instanceof Date && (s = s.getTime(), i = i.getTime()), [s, i] = [s, i].map((u) => u != null ? u.toString().toLocaleLowerCase() : u), s !== i))
|
|
581
|
+
return oe(s) && oe(i) ? 0 : oe(s) ? -1 : oe(i) ? 1 : !isNaN(s) && !isNaN(i) ? Number(s) - Number(i) : l.compare(s, i);
|
|
582
|
+
}
|
|
583
|
+
return 0;
|
|
584
|
+
}).map((o) => {
|
|
585
|
+
let [c] = o;
|
|
586
|
+
return c;
|
|
587
|
+
});
|
|
588
|
+
}
|
|
589
|
+
function Ba() {
|
|
590
|
+
const e = K([]);
|
|
591
|
+
Ct(() => e.value = []);
|
|
592
|
+
function t(a, n) {
|
|
593
|
+
e.value[n] = a;
|
|
594
|
+
}
|
|
595
|
+
return {
|
|
596
|
+
refs: e,
|
|
597
|
+
updateRef: t
|
|
598
|
+
};
|
|
599
|
+
}
|
|
600
|
+
const Oa = B({
|
|
601
|
+
activeColor: String,
|
|
602
|
+
start: {
|
|
603
|
+
type: [Number, String],
|
|
604
|
+
default: 1
|
|
605
|
+
},
|
|
606
|
+
modelValue: {
|
|
607
|
+
type: Number,
|
|
608
|
+
default: (e) => e.start
|
|
609
|
+
},
|
|
610
|
+
disabled: Boolean,
|
|
611
|
+
length: {
|
|
612
|
+
type: [Number, String],
|
|
613
|
+
default: 1,
|
|
614
|
+
validator: (e) => e % 1 === 0
|
|
615
|
+
},
|
|
616
|
+
totalVisible: [Number, String],
|
|
617
|
+
firstIcon: {
|
|
618
|
+
type: A,
|
|
619
|
+
default: "$first"
|
|
620
|
+
},
|
|
621
|
+
prevIcon: {
|
|
622
|
+
type: A,
|
|
623
|
+
default: "$prev"
|
|
624
|
+
},
|
|
625
|
+
nextIcon: {
|
|
626
|
+
type: A,
|
|
627
|
+
default: "$next"
|
|
628
|
+
},
|
|
629
|
+
lastIcon: {
|
|
630
|
+
type: A,
|
|
631
|
+
default: "$last"
|
|
632
|
+
},
|
|
633
|
+
ariaLabel: {
|
|
634
|
+
type: String,
|
|
635
|
+
default: "$vuetify.pagination.ariaLabel.root"
|
|
636
|
+
},
|
|
637
|
+
pageAriaLabel: {
|
|
638
|
+
type: String,
|
|
639
|
+
default: "$vuetify.pagination.ariaLabel.page"
|
|
640
|
+
},
|
|
641
|
+
currentPageAriaLabel: {
|
|
642
|
+
type: String,
|
|
643
|
+
default: "$vuetify.pagination.ariaLabel.currentPage"
|
|
644
|
+
},
|
|
645
|
+
firstAriaLabel: {
|
|
646
|
+
type: String,
|
|
647
|
+
default: "$vuetify.pagination.ariaLabel.first"
|
|
648
|
+
},
|
|
649
|
+
previousAriaLabel: {
|
|
650
|
+
type: String,
|
|
651
|
+
default: "$vuetify.pagination.ariaLabel.previous"
|
|
652
|
+
},
|
|
653
|
+
nextAriaLabel: {
|
|
654
|
+
type: String,
|
|
655
|
+
default: "$vuetify.pagination.ariaLabel.next"
|
|
656
|
+
},
|
|
657
|
+
lastAriaLabel: {
|
|
658
|
+
type: String,
|
|
659
|
+
default: "$vuetify.pagination.ariaLabel.last"
|
|
660
|
+
},
|
|
661
|
+
ellipsis: {
|
|
662
|
+
type: String,
|
|
663
|
+
default: "..."
|
|
664
|
+
},
|
|
665
|
+
showFirstLastPage: Boolean,
|
|
666
|
+
...Kt(),
|
|
667
|
+
...Qe(),
|
|
668
|
+
...le(),
|
|
669
|
+
...Ue(),
|
|
670
|
+
...Wt(),
|
|
671
|
+
...Mt(),
|
|
672
|
+
...qe({
|
|
673
|
+
tag: "nav"
|
|
674
|
+
}),
|
|
675
|
+
...Ce(),
|
|
676
|
+
...jt({
|
|
677
|
+
variant: "text"
|
|
678
|
+
})
|
|
679
|
+
}, "VPagination"), Ne = M()({
|
|
680
|
+
name: "VPagination",
|
|
681
|
+
props: Oa(),
|
|
682
|
+
emits: {
|
|
683
|
+
"update:modelValue": (e) => !0,
|
|
684
|
+
first: (e) => !0,
|
|
685
|
+
prev: (e) => !0,
|
|
686
|
+
next: (e) => !0,
|
|
687
|
+
last: (e) => !0
|
|
688
|
+
},
|
|
689
|
+
setup(e, t) {
|
|
690
|
+
let {
|
|
691
|
+
slots: a,
|
|
692
|
+
emit: n
|
|
693
|
+
} = t;
|
|
694
|
+
const l = X(e, "modelValue"), {
|
|
695
|
+
t: r,
|
|
696
|
+
n: o
|
|
697
|
+
} = te(), {
|
|
698
|
+
isRtl: c
|
|
699
|
+
} = Ht(), {
|
|
700
|
+
themeClasses: d
|
|
701
|
+
} = Fe(e), {
|
|
702
|
+
width: f
|
|
703
|
+
} = ve(), m = We(-1);
|
|
704
|
+
ke(void 0, {
|
|
705
|
+
scoped: !0
|
|
706
|
+
});
|
|
707
|
+
const {
|
|
708
|
+
resizeRef: y
|
|
709
|
+
} = Gt((S) => {
|
|
710
|
+
if (!S.length) return;
|
|
711
|
+
const {
|
|
712
|
+
target: p,
|
|
713
|
+
contentRect: v
|
|
714
|
+
} = S[0], F = p.querySelector(".v-pagination__list > *");
|
|
715
|
+
if (!F) return;
|
|
716
|
+
const V = v.width, T = F.offsetWidth + parseFloat(getComputedStyle(F).marginRight) * 2;
|
|
717
|
+
m.value = g(V, T);
|
|
718
|
+
}), s = D(() => parseInt(e.length, 10)), i = D(() => parseInt(e.start, 10)), b = D(() => e.totalVisible != null ? parseInt(e.totalVisible, 10) : m.value >= 0 ? m.value : g(f.value, 58));
|
|
719
|
+
function g(S, p) {
|
|
720
|
+
const v = e.showFirstLastPage ? 5 : 3;
|
|
721
|
+
return Math.max(0, Math.floor(
|
|
722
|
+
// Round to two decimal places to avoid floating point errors
|
|
723
|
+
Number(((S - p * v) / p).toFixed(2))
|
|
724
|
+
));
|
|
725
|
+
}
|
|
726
|
+
const u = D(() => {
|
|
727
|
+
if (s.value <= 0 || isNaN(s.value) || s.value > Number.MAX_SAFE_INTEGER) return [];
|
|
728
|
+
if (b.value <= 0) return [];
|
|
729
|
+
if (b.value === 1) return [l.value];
|
|
730
|
+
if (s.value <= b.value)
|
|
731
|
+
return ie(s.value, i.value);
|
|
732
|
+
const S = b.value % 2 === 0, p = S ? b.value / 2 : Math.floor(b.value / 2), v = S ? p : p + 1, F = s.value - p;
|
|
733
|
+
if (v - l.value >= 0)
|
|
734
|
+
return [...ie(Math.max(1, b.value - 1), i.value), e.ellipsis, s.value];
|
|
735
|
+
if (l.value - F >= (S ? 1 : 0)) {
|
|
736
|
+
const V = b.value - 1, T = s.value - V + i.value;
|
|
737
|
+
return [i.value, e.ellipsis, ...ie(V, T)];
|
|
738
|
+
} else {
|
|
739
|
+
const V = Math.max(1, b.value - 2), T = V === 1 ? l.value : l.value - Math.ceil(V / 2) + i.value;
|
|
740
|
+
return [i.value, e.ellipsis, ...ie(V, T), e.ellipsis, s.value];
|
|
741
|
+
}
|
|
742
|
+
});
|
|
743
|
+
function P(S, p, v) {
|
|
744
|
+
S.preventDefault(), l.value = p, v && n(v, p);
|
|
745
|
+
}
|
|
746
|
+
const {
|
|
747
|
+
refs: h,
|
|
748
|
+
updateRef: I
|
|
749
|
+
} = Ba();
|
|
750
|
+
ke({
|
|
751
|
+
VPaginationBtn: {
|
|
752
|
+
color: _(() => e.color),
|
|
753
|
+
border: _(() => e.border),
|
|
754
|
+
density: _(() => e.density),
|
|
755
|
+
size: _(() => e.size),
|
|
756
|
+
variant: _(() => e.variant),
|
|
757
|
+
rounded: _(() => e.rounded),
|
|
758
|
+
elevation: _(() => e.elevation)
|
|
759
|
+
}
|
|
760
|
+
});
|
|
761
|
+
const C = D(() => u.value.map((S, p) => {
|
|
762
|
+
const v = (F) => I(F, p);
|
|
763
|
+
if (typeof S == "string")
|
|
764
|
+
return {
|
|
765
|
+
isActive: !1,
|
|
766
|
+
key: `ellipsis-${p}`,
|
|
767
|
+
page: S,
|
|
768
|
+
props: {
|
|
769
|
+
ref: v,
|
|
770
|
+
ellipsis: !0,
|
|
771
|
+
icon: !0,
|
|
772
|
+
disabled: !0
|
|
773
|
+
}
|
|
774
|
+
};
|
|
775
|
+
{
|
|
776
|
+
const F = S === l.value;
|
|
777
|
+
return {
|
|
778
|
+
isActive: F,
|
|
779
|
+
key: S,
|
|
780
|
+
page: o(S),
|
|
781
|
+
props: {
|
|
782
|
+
ref: v,
|
|
783
|
+
ellipsis: !1,
|
|
784
|
+
icon: !0,
|
|
785
|
+
disabled: !!e.disabled || Number(e.length) < 2,
|
|
786
|
+
color: F ? e.activeColor : e.color,
|
|
787
|
+
"aria-current": F,
|
|
788
|
+
"aria-label": r(F ? e.currentPageAriaLabel : e.pageAriaLabel, S),
|
|
789
|
+
onClick: (V) => P(V, S)
|
|
790
|
+
}
|
|
791
|
+
};
|
|
792
|
+
}
|
|
793
|
+
})), w = D(() => {
|
|
794
|
+
const S = !!e.disabled || l.value <= i.value, p = !!e.disabled || l.value >= i.value + s.value - 1;
|
|
795
|
+
return {
|
|
796
|
+
first: e.showFirstLastPage ? {
|
|
797
|
+
icon: c.value ? e.lastIcon : e.firstIcon,
|
|
798
|
+
onClick: (v) => P(v, i.value, "first"),
|
|
799
|
+
disabled: S,
|
|
800
|
+
"aria-label": r(e.firstAriaLabel),
|
|
801
|
+
"aria-disabled": S
|
|
802
|
+
} : void 0,
|
|
803
|
+
prev: {
|
|
804
|
+
icon: c.value ? e.nextIcon : e.prevIcon,
|
|
805
|
+
onClick: (v) => P(v, l.value - 1, "prev"),
|
|
806
|
+
disabled: S,
|
|
807
|
+
"aria-label": r(e.previousAriaLabel),
|
|
808
|
+
"aria-disabled": S
|
|
809
|
+
},
|
|
810
|
+
next: {
|
|
811
|
+
icon: c.value ? e.prevIcon : e.nextIcon,
|
|
812
|
+
onClick: (v) => P(v, l.value + 1, "next"),
|
|
813
|
+
disabled: p,
|
|
814
|
+
"aria-label": r(e.nextAriaLabel),
|
|
815
|
+
"aria-disabled": p
|
|
816
|
+
},
|
|
817
|
+
last: e.showFirstLastPage ? {
|
|
818
|
+
icon: c.value ? e.firstIcon : e.lastIcon,
|
|
819
|
+
onClick: (v) => P(v, i.value + s.value - 1, "last"),
|
|
820
|
+
disabled: p,
|
|
821
|
+
"aria-label": r(e.lastAriaLabel),
|
|
822
|
+
"aria-disabled": p
|
|
823
|
+
} : void 0
|
|
824
|
+
};
|
|
825
|
+
});
|
|
826
|
+
function R() {
|
|
827
|
+
const S = l.value - i.value;
|
|
828
|
+
h.value[S]?.$el.focus();
|
|
829
|
+
}
|
|
830
|
+
function H(S) {
|
|
831
|
+
S.key === Ee.left && !e.disabled && l.value > Number(e.start) ? (l.value = l.value - 1, we(R)) : S.key === Ee.right && !e.disabled && l.value < i.value + s.value - 1 && (l.value = l.value + 1, we(R));
|
|
832
|
+
}
|
|
833
|
+
return q(() => k(e.tag, {
|
|
834
|
+
ref: y,
|
|
835
|
+
class: z(["v-pagination", d.value, e.class]),
|
|
836
|
+
style: Ve(e.style),
|
|
837
|
+
role: "navigation",
|
|
838
|
+
"aria-label": r(e.ariaLabel),
|
|
839
|
+
onKeydown: H,
|
|
840
|
+
"data-test": "v-pagination-root"
|
|
841
|
+
}, {
|
|
842
|
+
default: () => [x("ul", {
|
|
843
|
+
class: "v-pagination__list"
|
|
844
|
+
}, [e.showFirstLastPage && x("li", {
|
|
845
|
+
key: "first",
|
|
846
|
+
class: "v-pagination__first",
|
|
847
|
+
"data-test": "v-pagination-first"
|
|
848
|
+
}, [a.first ? a.first(w.value.first) : k(U, E({
|
|
849
|
+
_as: "VPaginationBtn"
|
|
850
|
+
}, w.value.first), null)]), x("li", {
|
|
851
|
+
key: "prev",
|
|
852
|
+
class: "v-pagination__prev",
|
|
853
|
+
"data-test": "v-pagination-prev"
|
|
854
|
+
}, [a.prev ? a.prev(w.value.prev) : k(U, E({
|
|
855
|
+
_as: "VPaginationBtn"
|
|
856
|
+
}, w.value.prev), null)]), C.value.map((S, p) => x("li", {
|
|
857
|
+
key: S.key,
|
|
858
|
+
class: z(["v-pagination__item", {
|
|
859
|
+
"v-pagination__item--is-active": S.isActive
|
|
860
|
+
}]),
|
|
861
|
+
"data-test": "v-pagination-item"
|
|
862
|
+
}, [a.item ? a.item(S) : k(U, E({
|
|
863
|
+
_as: "VPaginationBtn"
|
|
864
|
+
}, S.props), {
|
|
865
|
+
default: () => [S.page]
|
|
866
|
+
})])), x("li", {
|
|
867
|
+
key: "next",
|
|
868
|
+
class: "v-pagination__next",
|
|
869
|
+
"data-test": "v-pagination-next"
|
|
870
|
+
}, [a.next ? a.next(w.value.next) : k(U, E({
|
|
871
|
+
_as: "VPaginationBtn"
|
|
872
|
+
}, w.value.next), null)]), e.showFirstLastPage && x("li", {
|
|
873
|
+
key: "last",
|
|
874
|
+
class: "v-pagination__last",
|
|
875
|
+
"data-test": "v-pagination-last"
|
|
876
|
+
}, [a.last ? a.last(w.value.last) : k(U, E({
|
|
877
|
+
_as: "VPaginationBtn"
|
|
878
|
+
}, w.value.last), null)])])]
|
|
879
|
+
})), {};
|
|
880
|
+
}
|
|
881
|
+
}), ut = B({
|
|
882
|
+
color: String,
|
|
883
|
+
prevIcon: {
|
|
884
|
+
type: A,
|
|
885
|
+
default: "$prev"
|
|
886
|
+
},
|
|
887
|
+
nextIcon: {
|
|
888
|
+
type: A,
|
|
889
|
+
default: "$next"
|
|
890
|
+
},
|
|
891
|
+
firstIcon: {
|
|
892
|
+
type: A,
|
|
893
|
+
default: "$first"
|
|
894
|
+
},
|
|
895
|
+
lastIcon: {
|
|
896
|
+
type: A,
|
|
897
|
+
default: "$last"
|
|
898
|
+
},
|
|
899
|
+
itemsPerPageText: {
|
|
900
|
+
type: String,
|
|
901
|
+
default: "$vuetify.dataFooter.itemsPerPageText"
|
|
902
|
+
},
|
|
903
|
+
pageText: {
|
|
904
|
+
type: String,
|
|
905
|
+
default: "$vuetify.dataFooter.pageText"
|
|
906
|
+
},
|
|
907
|
+
firstPageLabel: {
|
|
908
|
+
type: String,
|
|
909
|
+
default: "$vuetify.dataFooter.firstPage"
|
|
910
|
+
},
|
|
911
|
+
prevPageLabel: {
|
|
912
|
+
type: String,
|
|
913
|
+
default: "$vuetify.dataFooter.prevPage"
|
|
914
|
+
},
|
|
915
|
+
nextPageLabel: {
|
|
916
|
+
type: String,
|
|
917
|
+
default: "$vuetify.dataFooter.nextPage"
|
|
918
|
+
},
|
|
919
|
+
lastPageLabel: {
|
|
920
|
+
type: String,
|
|
921
|
+
default: "$vuetify.dataFooter.lastPage"
|
|
922
|
+
},
|
|
923
|
+
itemsPerPageOptions: {
|
|
924
|
+
type: Array,
|
|
925
|
+
default: () => [{
|
|
926
|
+
value: 10,
|
|
927
|
+
title: "10"
|
|
928
|
+
}, {
|
|
929
|
+
value: 25,
|
|
930
|
+
title: "25"
|
|
931
|
+
}, {
|
|
932
|
+
value: 50,
|
|
933
|
+
title: "50"
|
|
934
|
+
}, {
|
|
935
|
+
value: 100,
|
|
936
|
+
title: "100"
|
|
937
|
+
}, {
|
|
938
|
+
value: -1,
|
|
939
|
+
title: "$vuetify.dataFooter.itemsPerPageAll"
|
|
940
|
+
}]
|
|
941
|
+
},
|
|
942
|
+
showCurrentPage: Boolean
|
|
943
|
+
}, "VDataTableFooter"), Re = M()({
|
|
944
|
+
name: "VDataTableFooter",
|
|
945
|
+
props: ut(),
|
|
946
|
+
setup(e, t) {
|
|
947
|
+
let {
|
|
948
|
+
slots: a
|
|
949
|
+
} = t;
|
|
950
|
+
const {
|
|
951
|
+
t: n
|
|
952
|
+
} = te(), {
|
|
953
|
+
page: l,
|
|
954
|
+
pageCount: r,
|
|
955
|
+
startIndex: o,
|
|
956
|
+
stopIndex: c,
|
|
957
|
+
itemsLength: d,
|
|
958
|
+
itemsPerPage: f,
|
|
959
|
+
setItemsPerPage: m
|
|
960
|
+
} = pa(), y = D(() => e.itemsPerPageOptions.map((s) => typeof s == "number" ? {
|
|
961
|
+
value: s,
|
|
962
|
+
title: s === -1 ? n("$vuetify.dataFooter.itemsPerPageAll") : String(s)
|
|
963
|
+
} : {
|
|
964
|
+
...s,
|
|
965
|
+
title: isNaN(Number(s.title)) ? n(s.title) : s.title
|
|
966
|
+
}));
|
|
967
|
+
return q(() => {
|
|
968
|
+
const s = Ne.filterProps(e);
|
|
969
|
+
return x("div", {
|
|
970
|
+
class: "v-data-table-footer"
|
|
971
|
+
}, [a.prepend?.(), x("div", {
|
|
972
|
+
class: "v-data-table-footer__items-per-page"
|
|
973
|
+
}, [x("span", null, [n(e.itemsPerPageText)]), k(Ye, {
|
|
974
|
+
items: y.value,
|
|
975
|
+
itemColor: e.color,
|
|
976
|
+
modelValue: f.value,
|
|
977
|
+
"onUpdate:modelValue": (i) => m(Number(i)),
|
|
978
|
+
density: "compact",
|
|
979
|
+
variant: "outlined",
|
|
980
|
+
"aria-label": n(e.itemsPerPageText),
|
|
981
|
+
hideDetails: !0
|
|
982
|
+
}, null)]), x("div", {
|
|
983
|
+
class: "v-data-table-footer__info"
|
|
984
|
+
}, [x("div", null, [n(e.pageText, d.value ? o.value + 1 : 0, c.value, d.value)])]), x("div", {
|
|
985
|
+
class: "v-data-table-footer__pagination"
|
|
986
|
+
}, [k(Ne, E({
|
|
987
|
+
modelValue: l.value,
|
|
988
|
+
"onUpdate:modelValue": (i) => l.value = i,
|
|
989
|
+
density: "comfortable",
|
|
990
|
+
firstAriaLabel: e.firstPageLabel,
|
|
991
|
+
lastAriaLabel: e.lastPageLabel,
|
|
992
|
+
length: r.value,
|
|
993
|
+
nextAriaLabel: e.nextPageLabel,
|
|
994
|
+
previousAriaLabel: e.prevPageLabel,
|
|
995
|
+
rounded: !0,
|
|
996
|
+
showFirstLastPage: !0,
|
|
997
|
+
totalVisible: e.showCurrentPage ? 1 : 0,
|
|
998
|
+
variant: "plain"
|
|
999
|
+
}, Te(s, ["color"])), null)])]);
|
|
1000
|
+
}), {};
|
|
1001
|
+
}
|
|
1002
|
+
}), ne = zt({
|
|
1003
|
+
align: {
|
|
1004
|
+
type: String,
|
|
1005
|
+
default: "start"
|
|
1006
|
+
},
|
|
1007
|
+
fixed: {
|
|
1008
|
+
type: [Boolean, String],
|
|
1009
|
+
default: !1
|
|
1010
|
+
},
|
|
1011
|
+
fixedOffset: [Number, String],
|
|
1012
|
+
fixedEndOffset: [Number, String],
|
|
1013
|
+
height: [Number, String],
|
|
1014
|
+
lastFixed: Boolean,
|
|
1015
|
+
firstFixedEnd: Boolean,
|
|
1016
|
+
noPadding: Boolean,
|
|
1017
|
+
indent: [Number, String],
|
|
1018
|
+
empty: Boolean,
|
|
1019
|
+
tag: String,
|
|
1020
|
+
width: [Number, String],
|
|
1021
|
+
maxWidth: [Number, String],
|
|
1022
|
+
nowrap: Boolean
|
|
1023
|
+
}, (e, t) => {
|
|
1024
|
+
let {
|
|
1025
|
+
slots: a
|
|
1026
|
+
} = t;
|
|
1027
|
+
const n = e.tag ?? "td", l = typeof e.fixed == "string" ? e.fixed : e.fixed ? "start" : "none";
|
|
1028
|
+
return k(n, {
|
|
1029
|
+
class: z(["v-data-table__td", {
|
|
1030
|
+
"v-data-table-column--fixed": l === "start",
|
|
1031
|
+
"v-data-table-column--fixed-end": l === "end",
|
|
1032
|
+
"v-data-table-column--last-fixed": e.lastFixed,
|
|
1033
|
+
"v-data-table-column--first-fixed-end": e.firstFixedEnd,
|
|
1034
|
+
"v-data-table-column--no-padding": e.noPadding,
|
|
1035
|
+
"v-data-table-column--nowrap": e.nowrap,
|
|
1036
|
+
"v-data-table-column--empty": e.empty
|
|
1037
|
+
}, `v-data-table-column--align-${e.align}`]),
|
|
1038
|
+
style: {
|
|
1039
|
+
height: $(e.height),
|
|
1040
|
+
width: $(e.width),
|
|
1041
|
+
maxWidth: $(e.maxWidth),
|
|
1042
|
+
left: l === "start" ? $(e.fixedOffset || null) : void 0,
|
|
1043
|
+
right: l === "end" ? $(e.fixedEndOffset || null) : void 0,
|
|
1044
|
+
paddingInlineStart: e.indent ? $(e.indent) : void 0
|
|
1045
|
+
}
|
|
1046
|
+
}, {
|
|
1047
|
+
default: () => [a.default?.()]
|
|
1048
|
+
});
|
|
1049
|
+
}), Ea = B({
|
|
1050
|
+
headers: Array
|
|
1051
|
+
}, "DataTable-header"), dt = /* @__PURE__ */ Symbol.for("vuetify:data-table-headers"), ct = {
|
|
1052
|
+
title: "",
|
|
1053
|
+
sortable: !1
|
|
1054
|
+
}, Aa = {
|
|
1055
|
+
...ct,
|
|
1056
|
+
width: 48
|
|
1057
|
+
};
|
|
1058
|
+
function La() {
|
|
1059
|
+
const t = (arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : []).map((a) => ({
|
|
1060
|
+
element: a,
|
|
1061
|
+
priority: 0
|
|
1062
|
+
}));
|
|
1063
|
+
return {
|
|
1064
|
+
enqueue: (a, n) => {
|
|
1065
|
+
let l = !1;
|
|
1066
|
+
for (let r = 0; r < t.length; r++)
|
|
1067
|
+
if (t[r].priority > n) {
|
|
1068
|
+
t.splice(r, 0, {
|
|
1069
|
+
element: a,
|
|
1070
|
+
priority: n
|
|
1071
|
+
}), l = !0;
|
|
1072
|
+
break;
|
|
1073
|
+
}
|
|
1074
|
+
l || t.push({
|
|
1075
|
+
element: a,
|
|
1076
|
+
priority: n
|
|
1077
|
+
});
|
|
1078
|
+
},
|
|
1079
|
+
size: () => t.length,
|
|
1080
|
+
count: () => {
|
|
1081
|
+
let a = 0;
|
|
1082
|
+
if (!t.length) return 0;
|
|
1083
|
+
const n = Math.floor(t[0].priority);
|
|
1084
|
+
for (let l = 0; l < t.length; l++)
|
|
1085
|
+
Math.floor(t[l].priority) === n && (a += 1);
|
|
1086
|
+
return a;
|
|
1087
|
+
},
|
|
1088
|
+
dequeue: () => t.shift()
|
|
1089
|
+
};
|
|
1090
|
+
}
|
|
1091
|
+
function De(e) {
|
|
1092
|
+
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
|
|
1093
|
+
if (!e.children)
|
|
1094
|
+
t.push(e);
|
|
1095
|
+
else
|
|
1096
|
+
for (const a of e.children)
|
|
1097
|
+
De(a, t);
|
|
1098
|
+
return t;
|
|
1099
|
+
}
|
|
1100
|
+
function ft(e) {
|
|
1101
|
+
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : /* @__PURE__ */ new Set();
|
|
1102
|
+
for (const a of e)
|
|
1103
|
+
a.key && t.add(a.key), a.children && ft(a.children, t);
|
|
1104
|
+
return t;
|
|
1105
|
+
}
|
|
1106
|
+
function Na(e) {
|
|
1107
|
+
if (e.key) {
|
|
1108
|
+
if (e.key === "data-table-group") return ct;
|
|
1109
|
+
if (["data-table-expand", "data-table-select"].includes(e.key)) return Aa;
|
|
1110
|
+
}
|
|
1111
|
+
}
|
|
1112
|
+
function Be(e) {
|
|
1113
|
+
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
|
|
1114
|
+
return e.children ? Math.max(t, ...e.children.map((a) => Be(a, t + 1))) : t;
|
|
1115
|
+
}
|
|
1116
|
+
function Ra(e) {
|
|
1117
|
+
let t = !1;
|
|
1118
|
+
function a(r, o) {
|
|
1119
|
+
let c = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "none";
|
|
1120
|
+
if (r)
|
|
1121
|
+
if (c !== "none" && (r.fixed = c), r.fixed === !0 && (r.fixed = "start"), r.fixed === o)
|
|
1122
|
+
if (r.children)
|
|
1123
|
+
if (o === "start")
|
|
1124
|
+
for (let d = r.children.length - 1; d >= 0; d--)
|
|
1125
|
+
a(r.children[d], o, o);
|
|
1126
|
+
else
|
|
1127
|
+
for (let d = 0; d < r.children.length; d++)
|
|
1128
|
+
a(r.children[d], o, o);
|
|
1129
|
+
else
|
|
1130
|
+
!t && o === "start" ? r.lastFixed = !0 : !t && o === "end" ? r.firstFixedEnd = !0 : isNaN(Number(r.width)) ? qt(`Multiple fixed columns should have a static width (key: ${r.key})`) : r.minWidth = Math.max(Number(r.width) || 0, Number(r.minWidth) || 0), t = !0;
|
|
1131
|
+
else if (r.children)
|
|
1132
|
+
if (o === "start")
|
|
1133
|
+
for (let d = r.children.length - 1; d >= 0; d--)
|
|
1134
|
+
a(r.children[d], o);
|
|
1135
|
+
else
|
|
1136
|
+
for (let d = 0; d < r.children.length; d++)
|
|
1137
|
+
a(r.children[d], o);
|
|
1138
|
+
else
|
|
1139
|
+
t = !1;
|
|
1140
|
+
}
|
|
1141
|
+
for (let r = e.length - 1; r >= 0; r--)
|
|
1142
|
+
a(e[r], "start");
|
|
1143
|
+
for (let r = 0; r < e.length; r++)
|
|
1144
|
+
a(e[r], "end");
|
|
1145
|
+
let n = 0;
|
|
1146
|
+
for (let r = 0; r < e.length; r++)
|
|
1147
|
+
n = gt(e[r], n);
|
|
1148
|
+
let l = 0;
|
|
1149
|
+
for (let r = e.length - 1; r >= 0; r--)
|
|
1150
|
+
l = vt(e[r], l);
|
|
1151
|
+
}
|
|
1152
|
+
function gt(e) {
|
|
1153
|
+
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
|
|
1154
|
+
if (!e) return t;
|
|
1155
|
+
if (e.children) {
|
|
1156
|
+
e.fixedOffset = t;
|
|
1157
|
+
for (const a of e.children)
|
|
1158
|
+
t = gt(a, t);
|
|
1159
|
+
} else e.fixed && e.fixed !== "end" && (e.fixedOffset = t, t += parseFloat(e.width || "0") || 0);
|
|
1160
|
+
return t;
|
|
1161
|
+
}
|
|
1162
|
+
function vt(e) {
|
|
1163
|
+
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
|
|
1164
|
+
if (!e) return t;
|
|
1165
|
+
if (e.children) {
|
|
1166
|
+
e.fixedEndOffset = t;
|
|
1167
|
+
for (const a of e.children)
|
|
1168
|
+
t = vt(a, t);
|
|
1169
|
+
} else e.fixed === "end" && (e.fixedEndOffset = t, t += parseFloat(e.width || "0") || 0);
|
|
1170
|
+
return t;
|
|
1171
|
+
}
|
|
1172
|
+
function $a(e, t) {
|
|
1173
|
+
const a = [];
|
|
1174
|
+
let n = 0;
|
|
1175
|
+
const l = La(e);
|
|
1176
|
+
for (; l.size() > 0; ) {
|
|
1177
|
+
let o = l.count();
|
|
1178
|
+
const c = [];
|
|
1179
|
+
let d = 1;
|
|
1180
|
+
for (; o > 0; ) {
|
|
1181
|
+
const {
|
|
1182
|
+
element: f,
|
|
1183
|
+
priority: m
|
|
1184
|
+
} = l.dequeue(), y = t - n - Be(f);
|
|
1185
|
+
if (c.push({
|
|
1186
|
+
...f,
|
|
1187
|
+
rowspan: y ?? 1,
|
|
1188
|
+
colspan: f.children ? De(f).length : 1
|
|
1189
|
+
}), f.children)
|
|
1190
|
+
for (const s of f.children) {
|
|
1191
|
+
const i = m % 1 + d / Math.pow(10, n + 2);
|
|
1192
|
+
l.enqueue(s, n + y + i);
|
|
1193
|
+
}
|
|
1194
|
+
d += 1, o -= 1;
|
|
1195
|
+
}
|
|
1196
|
+
n += 1, a.push(c);
|
|
1197
|
+
}
|
|
1198
|
+
return {
|
|
1199
|
+
columns: e.map((o) => De(o)).flat(),
|
|
1200
|
+
headers: a
|
|
1201
|
+
};
|
|
1202
|
+
}
|
|
1203
|
+
function mt(e) {
|
|
1204
|
+
const t = [];
|
|
1205
|
+
for (const a of e) {
|
|
1206
|
+
const n = {
|
|
1207
|
+
...Na(a),
|
|
1208
|
+
...a
|
|
1209
|
+
}, l = n.key ?? (typeof n.value == "string" ? n.value : null), r = n.value ?? l ?? null, o = {
|
|
1210
|
+
...n,
|
|
1211
|
+
key: l,
|
|
1212
|
+
value: r,
|
|
1213
|
+
sortable: n.sortable ?? (n.key != null || !!n.sort),
|
|
1214
|
+
children: n.children ? mt(n.children) : void 0
|
|
1215
|
+
};
|
|
1216
|
+
t.push(o);
|
|
1217
|
+
}
|
|
1218
|
+
return t;
|
|
1219
|
+
}
|
|
1220
|
+
function Ha(e, t) {
|
|
1221
|
+
const a = K([]), n = K([]), l = K({}), r = K({}), o = K({});
|
|
1222
|
+
Tt(() => {
|
|
1223
|
+
const f = (e.headers || Object.keys(e.items[0] ?? {}).map((g) => ({
|
|
1224
|
+
key: g,
|
|
1225
|
+
title: _t(g)
|
|
1226
|
+
}))).slice(), m = ft(f);
|
|
1227
|
+
t?.groupBy?.value.length && !m.has("data-table-group") && f.unshift({
|
|
1228
|
+
key: "data-table-group",
|
|
1229
|
+
title: "Group"
|
|
1230
|
+
}), t?.showSelect?.value && !m.has("data-table-select") && f.unshift({
|
|
1231
|
+
key: "data-table-select"
|
|
1232
|
+
}), t?.showExpand?.value && !m.has("data-table-expand") && f.push({
|
|
1233
|
+
key: "data-table-expand"
|
|
1234
|
+
});
|
|
1235
|
+
const y = mt(f);
|
|
1236
|
+
Ra(y);
|
|
1237
|
+
const s = Math.max(...y.map((g) => Be(g))) + 1, i = $a(y, s);
|
|
1238
|
+
a.value = i.headers, n.value = i.columns;
|
|
1239
|
+
const b = i.headers.flat(1);
|
|
1240
|
+
for (const g of b)
|
|
1241
|
+
g.key && (g.sortable && (g.sort && (l.value[g.key] = g.sort), g.sortRaw && (r.value[g.key] = g.sortRaw)), g.filter && (o.value[g.key] = g.filter));
|
|
1242
|
+
});
|
|
1243
|
+
const c = {
|
|
1244
|
+
headers: a,
|
|
1245
|
+
columns: n,
|
|
1246
|
+
sortFunctions: l,
|
|
1247
|
+
sortRawFunctions: r,
|
|
1248
|
+
filterFunctions: o
|
|
1249
|
+
};
|
|
1250
|
+
return ee(dt, c), c;
|
|
1251
|
+
}
|
|
1252
|
+
function be() {
|
|
1253
|
+
const e = Y(dt);
|
|
1254
|
+
if (!e) throw new Error("Missing headers!");
|
|
1255
|
+
return e;
|
|
1256
|
+
}
|
|
1257
|
+
const bt = B({
|
|
1258
|
+
color: String,
|
|
1259
|
+
disableSort: Boolean,
|
|
1260
|
+
fixedHeader: Boolean,
|
|
1261
|
+
multiSort: Boolean,
|
|
1262
|
+
initialSortOrder: String,
|
|
1263
|
+
sortIcon: {
|
|
1264
|
+
type: A
|
|
1265
|
+
// default: '$sort', // maybe in v4
|
|
1266
|
+
},
|
|
1267
|
+
sortAscIcon: {
|
|
1268
|
+
type: A,
|
|
1269
|
+
default: "$sortAsc"
|
|
1270
|
+
},
|
|
1271
|
+
sortDescIcon: {
|
|
1272
|
+
type: A,
|
|
1273
|
+
default: "$sortDesc"
|
|
1274
|
+
},
|
|
1275
|
+
headerProps: {
|
|
1276
|
+
type: Object
|
|
1277
|
+
},
|
|
1278
|
+
/** @deprecated */
|
|
1279
|
+
sticky: Boolean,
|
|
1280
|
+
...le(),
|
|
1281
|
+
..._e(),
|
|
1282
|
+
...Xt()
|
|
1283
|
+
}, "VDataTableHeaders"), $e = M()({
|
|
1284
|
+
name: "VDataTableHeaders",
|
|
1285
|
+
props: bt(),
|
|
1286
|
+
setup(e, t) {
|
|
1287
|
+
let {
|
|
1288
|
+
slots: a
|
|
1289
|
+
} = t;
|
|
1290
|
+
const {
|
|
1291
|
+
t: n
|
|
1292
|
+
} = te(), {
|
|
1293
|
+
toggleSort: l,
|
|
1294
|
+
sortBy: r,
|
|
1295
|
+
isSorted: o
|
|
1296
|
+
} = it(), {
|
|
1297
|
+
someSelected: c,
|
|
1298
|
+
allSelected: d,
|
|
1299
|
+
selectAll: f,
|
|
1300
|
+
showSelectAll: m
|
|
1301
|
+
} = me(), {
|
|
1302
|
+
columns: y,
|
|
1303
|
+
headers: s
|
|
1304
|
+
} = be(), {
|
|
1305
|
+
loaderClasses: i
|
|
1306
|
+
} = Ut(e);
|
|
1307
|
+
function b(p, v) {
|
|
1308
|
+
if (!(e.sticky || e.fixedHeader) && !p.fixed) return;
|
|
1309
|
+
const F = typeof p.fixed == "string" ? p.fixed : p.fixed ? "start" : "none";
|
|
1310
|
+
return {
|
|
1311
|
+
position: "sticky",
|
|
1312
|
+
left: F === "start" ? $(p.fixedOffset) : void 0,
|
|
1313
|
+
right: F === "end" ? $(p.fixedEndOffset) : void 0,
|
|
1314
|
+
top: e.sticky || e.fixedHeader ? `calc(var(--v-table-header-height) * ${v})` : void 0
|
|
1315
|
+
};
|
|
1316
|
+
}
|
|
1317
|
+
function g(p, v) {
|
|
1318
|
+
p.key === "Enter" && !e.disableSort && l(v, p);
|
|
1319
|
+
}
|
|
1320
|
+
function u(p) {
|
|
1321
|
+
switch (r.value.find((F) => F.key === p.key)?.order) {
|
|
1322
|
+
case "asc":
|
|
1323
|
+
return e.sortAscIcon;
|
|
1324
|
+
case "desc":
|
|
1325
|
+
return e.sortDescIcon;
|
|
1326
|
+
default:
|
|
1327
|
+
return e.sortIcon || (e.initialSortOrder === "asc" ? e.sortAscIcon : e.sortDescIcon);
|
|
1328
|
+
}
|
|
1329
|
+
}
|
|
1330
|
+
const {
|
|
1331
|
+
backgroundColorClasses: P,
|
|
1332
|
+
backgroundColorStyles: h
|
|
1333
|
+
} = Xe(() => e.color), {
|
|
1334
|
+
displayClasses: I,
|
|
1335
|
+
mobile: C
|
|
1336
|
+
} = ve(e), w = D(() => ({
|
|
1337
|
+
headers: s.value,
|
|
1338
|
+
columns: y.value,
|
|
1339
|
+
toggleSort: l,
|
|
1340
|
+
isSorted: o,
|
|
1341
|
+
sortBy: r.value,
|
|
1342
|
+
someSelected: c.value,
|
|
1343
|
+
allSelected: d.value,
|
|
1344
|
+
selectAll: f,
|
|
1345
|
+
getSortIcon: u
|
|
1346
|
+
})), R = D(() => ["v-data-table__th", {
|
|
1347
|
+
"v-data-table__th--sticky": e.sticky || e.fixedHeader
|
|
1348
|
+
}, I.value, i.value]), H = (p) => {
|
|
1349
|
+
let {
|
|
1350
|
+
column: v,
|
|
1351
|
+
x: F,
|
|
1352
|
+
y: V
|
|
1353
|
+
} = p;
|
|
1354
|
+
const T = v.key === "data-table-select" || v.key === "data-table-expand", L = v.key === "data-table-group" && v.width === 0 && !v.title, Z = E(e.headerProps ?? {}, v.headerProps ?? {});
|
|
1355
|
+
return k(ne, E({
|
|
1356
|
+
tag: "th",
|
|
1357
|
+
align: v.align,
|
|
1358
|
+
class: [{
|
|
1359
|
+
"v-data-table__th--sortable": v.sortable && !e.disableSort,
|
|
1360
|
+
"v-data-table__th--sorted": o(v),
|
|
1361
|
+
"v-data-table__th--fixed": v.fixed
|
|
1362
|
+
}, ...R.value],
|
|
1363
|
+
style: {
|
|
1364
|
+
width: $(v.width),
|
|
1365
|
+
minWidth: $(v.minWidth),
|
|
1366
|
+
maxWidth: $(v.maxWidth),
|
|
1367
|
+
...b(v, V)
|
|
1368
|
+
},
|
|
1369
|
+
colspan: v.colspan,
|
|
1370
|
+
rowspan: v.rowspan,
|
|
1371
|
+
fixed: v.fixed,
|
|
1372
|
+
nowrap: v.nowrap,
|
|
1373
|
+
lastFixed: v.lastFixed,
|
|
1374
|
+
firstFixedEnd: v.firstFixedEnd,
|
|
1375
|
+
noPadding: T,
|
|
1376
|
+
empty: L,
|
|
1377
|
+
tabindex: v.sortable ? 0 : void 0,
|
|
1378
|
+
onClick: v.sortable ? (O) => l(v, O) : void 0,
|
|
1379
|
+
onKeydown: v.sortable ? (O) => g(O, v) : void 0
|
|
1380
|
+
}, Z), {
|
|
1381
|
+
default: () => {
|
|
1382
|
+
const O = `header.${v.key}`, W = {
|
|
1383
|
+
column: v,
|
|
1384
|
+
selectAll: f,
|
|
1385
|
+
isSorted: o,
|
|
1386
|
+
toggleSort: l,
|
|
1387
|
+
sortBy: r.value,
|
|
1388
|
+
someSelected: c.value,
|
|
1389
|
+
allSelected: d.value,
|
|
1390
|
+
getSortIcon: u
|
|
1391
|
+
};
|
|
1392
|
+
return a[O] ? a[O](W) : L ? "" : v.key === "data-table-select" ? a["header.data-table-select"]?.(W) ?? (m.value && k(fe, {
|
|
1393
|
+
color: e.color,
|
|
1394
|
+
density: e.density,
|
|
1395
|
+
modelValue: d.value,
|
|
1396
|
+
indeterminate: c.value && !d.value,
|
|
1397
|
+
"onUpdate:modelValue": f
|
|
1398
|
+
}, null)) : x("div", {
|
|
1399
|
+
class: "v-data-table-header__content"
|
|
1400
|
+
}, [x("span", null, [v.title]), v.sortable && !e.disableSort && k(Ae, {
|
|
1401
|
+
key: "icon",
|
|
1402
|
+
class: "v-data-table-header__sort-icon",
|
|
1403
|
+
icon: u(v)
|
|
1404
|
+
}, null), e.multiSort && o(v) && x("div", {
|
|
1405
|
+
key: "badge",
|
|
1406
|
+
class: z(["v-data-table-header__sort-badge", ...P.value]),
|
|
1407
|
+
style: Ve(h.value)
|
|
1408
|
+
}, [r.value.findIndex((ae) => ae.key === v.key) + 1])]);
|
|
1409
|
+
}
|
|
1410
|
+
});
|
|
1411
|
+
}, S = () => {
|
|
1412
|
+
const p = D(() => y.value.filter((V) => V?.sortable && !e.disableSort)), v = y.value.find((V) => V.key === "data-table-select"), F = D({
|
|
1413
|
+
get: () => p.value.filter((V) => {
|
|
1414
|
+
let {
|
|
1415
|
+
key: T
|
|
1416
|
+
} = V;
|
|
1417
|
+
return r.value.some((L) => L.key === T);
|
|
1418
|
+
}),
|
|
1419
|
+
set: (V) => {
|
|
1420
|
+
const T = J(V), L = r.value.map((O) => O.key);
|
|
1421
|
+
T.filter((O) => {
|
|
1422
|
+
let {
|
|
1423
|
+
key: W
|
|
1424
|
+
} = O;
|
|
1425
|
+
return !L.includes(W);
|
|
1426
|
+
}).forEach((O) => l(O)), we(() => r.value = r.value.filter((O) => {
|
|
1427
|
+
let {
|
|
1428
|
+
key: W
|
|
1429
|
+
} = O;
|
|
1430
|
+
return T.some((ae) => ae.key === W);
|
|
1431
|
+
}));
|
|
1432
|
+
}
|
|
1433
|
+
});
|
|
1434
|
+
return k(ne, E({
|
|
1435
|
+
tag: "th",
|
|
1436
|
+
class: [...R.value],
|
|
1437
|
+
colspan: s.value.length + 1
|
|
1438
|
+
}, e.headerProps), {
|
|
1439
|
+
default: () => [x("div", {
|
|
1440
|
+
class: "v-data-table-header__content"
|
|
1441
|
+
}, [k(Ye, {
|
|
1442
|
+
modelValue: F.value,
|
|
1443
|
+
"onUpdate:modelValue": (V) => F.value = V,
|
|
1444
|
+
chips: !0,
|
|
1445
|
+
color: e.color,
|
|
1446
|
+
class: "v-data-table__td-sort-select",
|
|
1447
|
+
clearable: !0,
|
|
1448
|
+
density: "default",
|
|
1449
|
+
items: p.value,
|
|
1450
|
+
label: n("$vuetify.dataTable.sortBy"),
|
|
1451
|
+
multiple: e.multiSort,
|
|
1452
|
+
variant: "underlined",
|
|
1453
|
+
returnObject: !0,
|
|
1454
|
+
"onClick:clear": () => r.value = []
|
|
1455
|
+
}, {
|
|
1456
|
+
append: v ? () => k(fe, {
|
|
1457
|
+
color: e.color,
|
|
1458
|
+
density: "compact",
|
|
1459
|
+
modelValue: d.value,
|
|
1460
|
+
indeterminate: c.value && !d.value,
|
|
1461
|
+
"onUpdate:modelValue": () => f(!d.value)
|
|
1462
|
+
}, null) : void 0,
|
|
1463
|
+
chip: (V) => {
|
|
1464
|
+
let {
|
|
1465
|
+
item: T
|
|
1466
|
+
} = V;
|
|
1467
|
+
return k(aa, {
|
|
1468
|
+
onClick: T.raw.sortable ? () => l(T.raw, void 0, !0) : void 0,
|
|
1469
|
+
onMousedown: (L) => {
|
|
1470
|
+
L.preventDefault(), L.stopPropagation();
|
|
1471
|
+
}
|
|
1472
|
+
}, {
|
|
1473
|
+
default: () => [T.title, k(Ae, {
|
|
1474
|
+
class: z(["v-data-table__td-sort-icon", o(T.raw) && "v-data-table__td-sort-icon-active"]),
|
|
1475
|
+
icon: u(T.raw),
|
|
1476
|
+
size: "small"
|
|
1477
|
+
}, null)]
|
|
1478
|
+
});
|
|
1479
|
+
}
|
|
1480
|
+
})])]
|
|
1481
|
+
});
|
|
1482
|
+
};
|
|
1483
|
+
q(() => C.value ? x("tr", null, [k(S, null, null)]) : x(Q, null, [a.headers ? a.headers(w.value) : s.value.map((p, v) => x("tr", null, [p.map((F, V) => k(H, {
|
|
1484
|
+
column: F,
|
|
1485
|
+
x: V,
|
|
1486
|
+
y: v
|
|
1487
|
+
}, null))])), e.loading && x("tr", {
|
|
1488
|
+
class: "v-data-table-progress"
|
|
1489
|
+
}, [x("th", {
|
|
1490
|
+
colspan: y.value.length
|
|
1491
|
+
}, [k(Qt, {
|
|
1492
|
+
name: "v-data-table-progress",
|
|
1493
|
+
absolute: !0,
|
|
1494
|
+
active: !0,
|
|
1495
|
+
color: typeof e.loading == "boolean" || e.loading === "true" ? e.color : e.loading,
|
|
1496
|
+
indeterminate: !0
|
|
1497
|
+
}, {
|
|
1498
|
+
default: a.loader
|
|
1499
|
+
})])])]));
|
|
1500
|
+
}
|
|
1501
|
+
}), yt = B({
|
|
1502
|
+
item: {
|
|
1503
|
+
type: Object,
|
|
1504
|
+
required: !0
|
|
1505
|
+
},
|
|
1506
|
+
groupCollapseIcon: {
|
|
1507
|
+
type: A,
|
|
1508
|
+
default: "$tableGroupCollapse"
|
|
1509
|
+
},
|
|
1510
|
+
groupExpandIcon: {
|
|
1511
|
+
type: A,
|
|
1512
|
+
default: "$tableGroupExpand"
|
|
1513
|
+
},
|
|
1514
|
+
...le()
|
|
1515
|
+
}, "VDataTableGroupHeaderRow"), Ga = M()({
|
|
1516
|
+
name: "VDataTableGroupHeaderRow",
|
|
1517
|
+
props: yt(),
|
|
1518
|
+
setup(e, t) {
|
|
1519
|
+
let {
|
|
1520
|
+
slots: a
|
|
1521
|
+
} = t;
|
|
1522
|
+
const {
|
|
1523
|
+
isGroupOpen: n,
|
|
1524
|
+
toggleGroup: l,
|
|
1525
|
+
extractRows: r
|
|
1526
|
+
} = tt(), {
|
|
1527
|
+
isSelected: o,
|
|
1528
|
+
isSomeSelected: c,
|
|
1529
|
+
select: d
|
|
1530
|
+
} = me(), {
|
|
1531
|
+
columns: f
|
|
1532
|
+
} = be(), m = D(() => r([e.item])), y = _(() => f.value.length - (f.value.some((s) => s.key === "data-table-select") ? 1 : 0));
|
|
1533
|
+
return () => x("tr", {
|
|
1534
|
+
class: "v-data-table-group-header-row",
|
|
1535
|
+
style: {
|
|
1536
|
+
"--v-data-table-group-header-row-depth": e.item.depth
|
|
1537
|
+
}
|
|
1538
|
+
}, [f.value.map((s) => {
|
|
1539
|
+
if (s.key === "data-table-group") {
|
|
1540
|
+
const i = n(e.item) ? e.groupCollapseIcon : e.groupExpandIcon, b = () => l(e.item);
|
|
1541
|
+
return a["data-table-group"]?.({
|
|
1542
|
+
item: e.item,
|
|
1543
|
+
count: m.value.length,
|
|
1544
|
+
props: {
|
|
1545
|
+
icon: i,
|
|
1546
|
+
onClick: b
|
|
1547
|
+
}
|
|
1548
|
+
}) ?? k(ne, {
|
|
1549
|
+
class: "v-data-table-group-header-row__column",
|
|
1550
|
+
colspan: y.value
|
|
1551
|
+
}, {
|
|
1552
|
+
default: () => [k(U, {
|
|
1553
|
+
size: "small",
|
|
1554
|
+
variant: "text",
|
|
1555
|
+
icon: i,
|
|
1556
|
+
onClick: b
|
|
1557
|
+
}, null), x("span", null, [e.item.value]), x("span", null, [Oe("("), m.value.length, Oe(")")])]
|
|
1558
|
+
});
|
|
1559
|
+
} else if (s.key === "data-table-select") {
|
|
1560
|
+
const i = m.value.filter((P) => P.selectable), b = i.length > 0 && o(i), g = c(i) && !b, u = (P) => d(i, P);
|
|
1561
|
+
return a["data-table-select"]?.({
|
|
1562
|
+
props: {
|
|
1563
|
+
modelValue: b,
|
|
1564
|
+
indeterminate: g,
|
|
1565
|
+
"onUpdate:modelValue": u
|
|
1566
|
+
}
|
|
1567
|
+
}) ?? k(ne, {
|
|
1568
|
+
class: "v-data-table__td--select-row",
|
|
1569
|
+
noPadding: !0
|
|
1570
|
+
}, {
|
|
1571
|
+
default: () => [k(fe, {
|
|
1572
|
+
density: e.density,
|
|
1573
|
+
disabled: i.length === 0,
|
|
1574
|
+
modelValue: b,
|
|
1575
|
+
indeterminate: g,
|
|
1576
|
+
"onUpdate:modelValue": u
|
|
1577
|
+
}, null)]
|
|
1578
|
+
});
|
|
1579
|
+
}
|
|
1580
|
+
return "";
|
|
1581
|
+
})]);
|
|
1582
|
+
}
|
|
1583
|
+
}), ht = B({
|
|
1584
|
+
color: String,
|
|
1585
|
+
index: Number,
|
|
1586
|
+
item: Object,
|
|
1587
|
+
cellProps: [Object, Function],
|
|
1588
|
+
collapseIcon: {
|
|
1589
|
+
type: A,
|
|
1590
|
+
default: "$collapse"
|
|
1591
|
+
},
|
|
1592
|
+
expandIcon: {
|
|
1593
|
+
type: A,
|
|
1594
|
+
default: "$expand"
|
|
1595
|
+
},
|
|
1596
|
+
onClick: Pe(),
|
|
1597
|
+
onContextmenu: Pe(),
|
|
1598
|
+
onDblclick: Pe(),
|
|
1599
|
+
...le(),
|
|
1600
|
+
..._e()
|
|
1601
|
+
}, "VDataTableRow"), ja = M()({
|
|
1602
|
+
name: "VDataTableRow",
|
|
1603
|
+
props: ht(),
|
|
1604
|
+
setup(e, t) {
|
|
1605
|
+
let {
|
|
1606
|
+
slots: a
|
|
1607
|
+
} = t;
|
|
1608
|
+
const {
|
|
1609
|
+
displayClasses: n,
|
|
1610
|
+
mobile: l
|
|
1611
|
+
} = ve(e, "v-data-table__tr"), {
|
|
1612
|
+
isSelected: r,
|
|
1613
|
+
toggleSelect: o,
|
|
1614
|
+
someSelected: c,
|
|
1615
|
+
allSelected: d,
|
|
1616
|
+
selectAll: f
|
|
1617
|
+
} = me(), {
|
|
1618
|
+
isExpanded: m,
|
|
1619
|
+
toggleExpand: y
|
|
1620
|
+
} = Je(), {
|
|
1621
|
+
toggleSort: s,
|
|
1622
|
+
sortBy: i,
|
|
1623
|
+
isSorted: b
|
|
1624
|
+
} = it(), {
|
|
1625
|
+
columns: g
|
|
1626
|
+
} = be();
|
|
1627
|
+
q(() => x("tr", {
|
|
1628
|
+
class: z(["v-data-table__tr", {
|
|
1629
|
+
"v-data-table__tr--clickable": !!(e.onClick || e.onContextmenu || e.onDblclick)
|
|
1630
|
+
}, n.value]),
|
|
1631
|
+
onClick: e.onClick,
|
|
1632
|
+
onContextmenu: e.onContextmenu,
|
|
1633
|
+
onDblclick: e.onDblclick
|
|
1634
|
+
}, [e.item && g.value.map((u, P) => {
|
|
1635
|
+
const h = e.item, I = `item.${u.key}`, C = `header.${u.key}`, w = {
|
|
1636
|
+
index: e.index,
|
|
1637
|
+
item: h.raw,
|
|
1638
|
+
internalItem: h,
|
|
1639
|
+
value: ce(h.columns, u.key),
|
|
1640
|
+
column: u,
|
|
1641
|
+
isSelected: r,
|
|
1642
|
+
toggleSelect: o,
|
|
1643
|
+
isExpanded: m,
|
|
1644
|
+
toggleExpand: y
|
|
1645
|
+
}, R = {
|
|
1646
|
+
column: u,
|
|
1647
|
+
selectAll: f,
|
|
1648
|
+
isSorted: b,
|
|
1649
|
+
toggleSort: s,
|
|
1650
|
+
sortBy: i.value,
|
|
1651
|
+
someSelected: c.value,
|
|
1652
|
+
allSelected: d.value,
|
|
1653
|
+
getSortIcon: () => ""
|
|
1654
|
+
}, H = typeof e.cellProps == "function" ? e.cellProps({
|
|
1655
|
+
index: w.index,
|
|
1656
|
+
item: w.item,
|
|
1657
|
+
internalItem: w.internalItem,
|
|
1658
|
+
value: w.value,
|
|
1659
|
+
column: u
|
|
1660
|
+
}) : e.cellProps, S = typeof u.cellProps == "function" ? u.cellProps({
|
|
1661
|
+
index: w.index,
|
|
1662
|
+
item: w.item,
|
|
1663
|
+
internalItem: w.internalItem,
|
|
1664
|
+
value: w.value
|
|
1665
|
+
}) : u.cellProps, p = u.key === "data-table-select" || u.key === "data-table-expand", v = u.key === "data-table-group" && u.width === 0 && !u.title;
|
|
1666
|
+
return k(ne, E({
|
|
1667
|
+
align: u.align,
|
|
1668
|
+
indent: u.indent,
|
|
1669
|
+
class: {
|
|
1670
|
+
"v-data-table__td--expanded-row": u.key === "data-table-expand",
|
|
1671
|
+
"v-data-table__td--select-row": u.key === "data-table-select"
|
|
1672
|
+
},
|
|
1673
|
+
fixed: u.fixed,
|
|
1674
|
+
fixedOffset: u.fixedOffset,
|
|
1675
|
+
fixedEndOffset: u.fixedEndOffset,
|
|
1676
|
+
lastFixed: u.lastFixed,
|
|
1677
|
+
firstFixedEnd: u.firstFixedEnd,
|
|
1678
|
+
maxWidth: l.value ? void 0 : u.maxWidth,
|
|
1679
|
+
noPadding: p,
|
|
1680
|
+
empty: v,
|
|
1681
|
+
nowrap: u.nowrap,
|
|
1682
|
+
width: l.value ? void 0 : u.width
|
|
1683
|
+
}, H, S), {
|
|
1684
|
+
default: () => {
|
|
1685
|
+
if (u.key === "data-table-select")
|
|
1686
|
+
return a["item.data-table-select"]?.({
|
|
1687
|
+
...w,
|
|
1688
|
+
props: {
|
|
1689
|
+
color: e.color,
|
|
1690
|
+
disabled: !h.selectable,
|
|
1691
|
+
modelValue: r([h]),
|
|
1692
|
+
onClick: se(() => o(h), ["stop"])
|
|
1693
|
+
}
|
|
1694
|
+
}) ?? k(fe, {
|
|
1695
|
+
color: e.color,
|
|
1696
|
+
disabled: !h.selectable,
|
|
1697
|
+
density: e.density,
|
|
1698
|
+
modelValue: r([h]),
|
|
1699
|
+
onClick: se((V) => o(h, e.index, V), ["stop"])
|
|
1700
|
+
}, null);
|
|
1701
|
+
if (u.key === "data-table-expand")
|
|
1702
|
+
return a["item.data-table-expand"]?.({
|
|
1703
|
+
...w,
|
|
1704
|
+
props: {
|
|
1705
|
+
icon: m(h) ? e.collapseIcon : e.expandIcon,
|
|
1706
|
+
size: "small",
|
|
1707
|
+
variant: "text",
|
|
1708
|
+
onClick: se(() => y(h), ["stop"])
|
|
1709
|
+
}
|
|
1710
|
+
}) ?? k(U, {
|
|
1711
|
+
icon: m(h) ? e.collapseIcon : e.expandIcon,
|
|
1712
|
+
size: "small",
|
|
1713
|
+
variant: "text",
|
|
1714
|
+
onClick: se(() => y(h), ["stop"])
|
|
1715
|
+
}, null);
|
|
1716
|
+
if (a[I] && !l.value) return a[I](w);
|
|
1717
|
+
const F = Bt(w.value);
|
|
1718
|
+
return l.value ? x(Q, null, [x("div", {
|
|
1719
|
+
class: "v-data-table__td-title"
|
|
1720
|
+
}, [a[C]?.(R) ?? u.title]), x("div", {
|
|
1721
|
+
class: "v-data-table__td-value"
|
|
1722
|
+
}, [a[I]?.(w) ?? F])]) : F;
|
|
1723
|
+
}
|
|
1724
|
+
});
|
|
1725
|
+
})]));
|
|
1726
|
+
}
|
|
1727
|
+
}), pt = B({
|
|
1728
|
+
color: String,
|
|
1729
|
+
loading: [Boolean, String],
|
|
1730
|
+
loadingText: {
|
|
1731
|
+
type: String,
|
|
1732
|
+
default: "$vuetify.dataIterator.loadingText"
|
|
1733
|
+
},
|
|
1734
|
+
hideNoData: Boolean,
|
|
1735
|
+
items: {
|
|
1736
|
+
type: Array,
|
|
1737
|
+
default: () => []
|
|
1738
|
+
},
|
|
1739
|
+
noDataText: {
|
|
1740
|
+
type: String,
|
|
1741
|
+
default: "$vuetify.noDataText"
|
|
1742
|
+
},
|
|
1743
|
+
rowProps: [Object, Function],
|
|
1744
|
+
cellProps: [Object, Function],
|
|
1745
|
+
...Ie(ht(), ["collapseIcon", "expandIcon", "density"]),
|
|
1746
|
+
...Ie(yt(), ["groupCollapseIcon", "groupExpandIcon", "density"]),
|
|
1747
|
+
..._e()
|
|
1748
|
+
}, "VDataTableRows"), He = M()({
|
|
1749
|
+
name: "VDataTableRows",
|
|
1750
|
+
inheritAttrs: !1,
|
|
1751
|
+
props: pt(),
|
|
1752
|
+
setup(e, t) {
|
|
1753
|
+
let {
|
|
1754
|
+
attrs: a,
|
|
1755
|
+
slots: n
|
|
1756
|
+
} = t;
|
|
1757
|
+
const {
|
|
1758
|
+
columns: l
|
|
1759
|
+
} = be(), {
|
|
1760
|
+
expandOnClick: r,
|
|
1761
|
+
toggleExpand: o,
|
|
1762
|
+
isExpanded: c
|
|
1763
|
+
} = Je(), {
|
|
1764
|
+
isSelected: d,
|
|
1765
|
+
toggleSelect: f
|
|
1766
|
+
} = me(), {
|
|
1767
|
+
toggleGroup: m,
|
|
1768
|
+
isGroupOpen: y
|
|
1769
|
+
} = tt(), {
|
|
1770
|
+
t: s
|
|
1771
|
+
} = te(), {
|
|
1772
|
+
mobile: i
|
|
1773
|
+
} = ve(e);
|
|
1774
|
+
return q(() => {
|
|
1775
|
+
const b = Ie(e, ["groupCollapseIcon", "groupExpandIcon", "density"]);
|
|
1776
|
+
return e.loading && (!e.items.length || n.loading) ? x("tr", {
|
|
1777
|
+
class: "v-data-table-rows-loading",
|
|
1778
|
+
key: "loading"
|
|
1779
|
+
}, [x("td", {
|
|
1780
|
+
colspan: l.value.length
|
|
1781
|
+
}, [n.loading?.() ?? s(e.loadingText)])]) : !e.loading && !e.items.length && !e.hideNoData ? x("tr", {
|
|
1782
|
+
class: "v-data-table-rows-no-data",
|
|
1783
|
+
key: "no-data"
|
|
1784
|
+
}, [x("td", {
|
|
1785
|
+
colspan: l.value.length
|
|
1786
|
+
}, [n["no-data"]?.() ?? s(e.noDataText)])]) : x(Q, null, [e.items.map((g, u) => {
|
|
1787
|
+
if (g.type === "group") {
|
|
1788
|
+
const I = {
|
|
1789
|
+
index: u,
|
|
1790
|
+
item: g,
|
|
1791
|
+
columns: l.value,
|
|
1792
|
+
isExpanded: c,
|
|
1793
|
+
toggleExpand: o,
|
|
1794
|
+
isSelected: d,
|
|
1795
|
+
toggleSelect: f,
|
|
1796
|
+
toggleGroup: m,
|
|
1797
|
+
isGroupOpen: y
|
|
1798
|
+
};
|
|
1799
|
+
return n["group-header"] ? n["group-header"](I) : k(Ga, E({
|
|
1800
|
+
key: `group-header_${g.id}`,
|
|
1801
|
+
item: g
|
|
1802
|
+
}, Le(a, ":groupHeader", () => I), b), n);
|
|
1803
|
+
}
|
|
1804
|
+
if (g.type === "group-summary") {
|
|
1805
|
+
const I = {
|
|
1806
|
+
index: u,
|
|
1807
|
+
item: g,
|
|
1808
|
+
columns: l.value,
|
|
1809
|
+
toggleGroup: m
|
|
1810
|
+
};
|
|
1811
|
+
return n["group-summary"]?.(I) ?? "";
|
|
1812
|
+
}
|
|
1813
|
+
const P = {
|
|
1814
|
+
index: g.virtualIndex ?? u,
|
|
1815
|
+
item: g.raw,
|
|
1816
|
+
internalItem: g,
|
|
1817
|
+
columns: l.value,
|
|
1818
|
+
isExpanded: c,
|
|
1819
|
+
toggleExpand: o,
|
|
1820
|
+
isSelected: d,
|
|
1821
|
+
toggleSelect: f
|
|
1822
|
+
}, h = {
|
|
1823
|
+
...P,
|
|
1824
|
+
props: E({
|
|
1825
|
+
key: `item_${g.key ?? g.index}`,
|
|
1826
|
+
onClick: r.value ? () => {
|
|
1827
|
+
o(g);
|
|
1828
|
+
} : void 0,
|
|
1829
|
+
index: u,
|
|
1830
|
+
item: g,
|
|
1831
|
+
color: e.color,
|
|
1832
|
+
cellProps: e.cellProps,
|
|
1833
|
+
collapseIcon: e.collapseIcon,
|
|
1834
|
+
expandIcon: e.expandIcon,
|
|
1835
|
+
density: e.density,
|
|
1836
|
+
mobile: i.value
|
|
1837
|
+
}, Le(a, ":row", () => P), typeof e.rowProps == "function" ? e.rowProps({
|
|
1838
|
+
item: P.item,
|
|
1839
|
+
index: P.index,
|
|
1840
|
+
internalItem: P.internalItem
|
|
1841
|
+
}) : e.rowProps)
|
|
1842
|
+
};
|
|
1843
|
+
return x(Q, {
|
|
1844
|
+
key: h.props.key
|
|
1845
|
+
}, [n.item ? n.item(h) : k(ja, h.props, n), c(g) && n["expanded-row"]?.(P)]);
|
|
1846
|
+
})]);
|
|
1847
|
+
}), {};
|
|
1848
|
+
}
|
|
1849
|
+
}), xt = B({
|
|
1850
|
+
fixedHeader: Boolean,
|
|
1851
|
+
fixedFooter: Boolean,
|
|
1852
|
+
height: [Number, String],
|
|
1853
|
+
hover: Boolean,
|
|
1854
|
+
striped: {
|
|
1855
|
+
type: String,
|
|
1856
|
+
default: null,
|
|
1857
|
+
validator: (e) => ["even", "odd"].includes(e)
|
|
1858
|
+
},
|
|
1859
|
+
...Qe(),
|
|
1860
|
+
...le(),
|
|
1861
|
+
...qe(),
|
|
1862
|
+
...Ce()
|
|
1863
|
+
}, "VTable"), Ge = M()({
|
|
1864
|
+
name: "VTable",
|
|
1865
|
+
props: xt(),
|
|
1866
|
+
setup(e, t) {
|
|
1867
|
+
let {
|
|
1868
|
+
slots: a,
|
|
1869
|
+
emit: n
|
|
1870
|
+
} = t;
|
|
1871
|
+
const {
|
|
1872
|
+
themeClasses: l
|
|
1873
|
+
} = Fe(e), {
|
|
1874
|
+
densityClasses: r
|
|
1875
|
+
} = Yt(e);
|
|
1876
|
+
return q(() => k(e.tag, {
|
|
1877
|
+
class: z(["v-table", {
|
|
1878
|
+
"v-table--fixed-height": !!e.height,
|
|
1879
|
+
"v-table--fixed-header": e.fixedHeader,
|
|
1880
|
+
"v-table--fixed-footer": e.fixedFooter,
|
|
1881
|
+
"v-table--has-top": !!a.top,
|
|
1882
|
+
"v-table--has-bottom": !!a.bottom,
|
|
1883
|
+
"v-table--hover": e.hover,
|
|
1884
|
+
"v-table--striped-even": e.striped === "even",
|
|
1885
|
+
"v-table--striped-odd": e.striped === "odd"
|
|
1886
|
+
}, l.value, r.value, e.class]),
|
|
1887
|
+
style: Ve(e.style)
|
|
1888
|
+
}, {
|
|
1889
|
+
default: () => [a.top?.(), a.default ? x("div", {
|
|
1890
|
+
class: "v-table__wrapper",
|
|
1891
|
+
style: {
|
|
1892
|
+
height: $(e.height)
|
|
1893
|
+
}
|
|
1894
|
+
}, [x("table", null, [a.default()])]) : a.wrapper?.(), a.bottom?.()]
|
|
1895
|
+
})), {};
|
|
1896
|
+
}
|
|
1897
|
+
}), Ma = B({
|
|
1898
|
+
items: {
|
|
1899
|
+
type: Array,
|
|
1900
|
+
default: () => []
|
|
1901
|
+
},
|
|
1902
|
+
itemValue: {
|
|
1903
|
+
type: [String, Array, Function],
|
|
1904
|
+
default: "id"
|
|
1905
|
+
},
|
|
1906
|
+
itemSelectable: {
|
|
1907
|
+
type: [String, Array, Function],
|
|
1908
|
+
default: null
|
|
1909
|
+
},
|
|
1910
|
+
rowProps: [Object, Function],
|
|
1911
|
+
cellProps: [Object, Function],
|
|
1912
|
+
returnObject: Boolean
|
|
1913
|
+
}, "DataTable-items");
|
|
1914
|
+
function Wa(e, t, a, n) {
|
|
1915
|
+
const l = e.returnObject ? t : ue(t, e.itemValue), r = ue(t, e.itemSelectable, !0), o = n.reduce((c, d) => (d.key != null && (c[d.key] = ue(t, d.value)), c), {});
|
|
1916
|
+
return {
|
|
1917
|
+
type: "item",
|
|
1918
|
+
key: e.returnObject ? ue(t, e.itemValue) : l,
|
|
1919
|
+
index: a,
|
|
1920
|
+
value: l,
|
|
1921
|
+
selectable: r,
|
|
1922
|
+
columns: o,
|
|
1923
|
+
raw: t
|
|
1924
|
+
};
|
|
1925
|
+
}
|
|
1926
|
+
function Ka(e, t, a) {
|
|
1927
|
+
return t.map((n, l) => Wa(e, n, l, a));
|
|
1928
|
+
}
|
|
1929
|
+
function za(e, t) {
|
|
1930
|
+
return {
|
|
1931
|
+
items: D(() => Ka(e, e.items, t.value))
|
|
1932
|
+
};
|
|
1933
|
+
}
|
|
1934
|
+
const qa = B({
|
|
1935
|
+
...pt(),
|
|
1936
|
+
hideDefaultBody: Boolean,
|
|
1937
|
+
hideDefaultFooter: Boolean,
|
|
1938
|
+
hideDefaultHeader: Boolean,
|
|
1939
|
+
width: [String, Number],
|
|
1940
|
+
search: String,
|
|
1941
|
+
...ia(),
|
|
1942
|
+
...da(),
|
|
1943
|
+
...Ea(),
|
|
1944
|
+
...Ma(),
|
|
1945
|
+
...ka(),
|
|
1946
|
+
...Da(),
|
|
1947
|
+
...Te(bt(), ["multiSort", "initialSortOrder"]),
|
|
1948
|
+
...xt()
|
|
1949
|
+
}, "DataTable"), Ua = B({
|
|
1950
|
+
...ba(),
|
|
1951
|
+
...qa(),
|
|
1952
|
+
...la(),
|
|
1953
|
+
...ut()
|
|
1954
|
+
}, "VDataTable"), nn = M()({
|
|
1955
|
+
name: "VDataTable",
|
|
1956
|
+
props: Ua(),
|
|
1957
|
+
emits: {
|
|
1958
|
+
"update:modelValue": (e) => !0,
|
|
1959
|
+
"update:page": (e) => !0,
|
|
1960
|
+
"update:itemsPerPage": (e) => !0,
|
|
1961
|
+
"update:sortBy": (e) => !0,
|
|
1962
|
+
"update:options": (e) => !0,
|
|
1963
|
+
"update:groupBy": (e) => !0,
|
|
1964
|
+
"update:expanded": (e) => !0,
|
|
1965
|
+
"update:currentItems": (e) => !0
|
|
1966
|
+
},
|
|
1967
|
+
setup(e, t) {
|
|
1968
|
+
let {
|
|
1969
|
+
attrs: a,
|
|
1970
|
+
slots: n
|
|
1971
|
+
} = t;
|
|
1972
|
+
const {
|
|
1973
|
+
groupBy: l
|
|
1974
|
+
} = ca(e), {
|
|
1975
|
+
initialSortOrder: r,
|
|
1976
|
+
sortBy: o,
|
|
1977
|
+
multiSort: c,
|
|
1978
|
+
mustSort: d
|
|
1979
|
+
} = Va(e), {
|
|
1980
|
+
page: f,
|
|
1981
|
+
itemsPerPage: m
|
|
1982
|
+
} = ya(e), {
|
|
1983
|
+
disableSort: y
|
|
1984
|
+
} = Ot(e), {
|
|
1985
|
+
columns: s,
|
|
1986
|
+
headers: i,
|
|
1987
|
+
sortFunctions: b,
|
|
1988
|
+
sortRawFunctions: g,
|
|
1989
|
+
filterFunctions: u
|
|
1990
|
+
} = Ha(e, {
|
|
1991
|
+
groupBy: l,
|
|
1992
|
+
showSelect: _(() => e.showSelect),
|
|
1993
|
+
showExpand: _(() => e.showExpand)
|
|
1994
|
+
}), {
|
|
1995
|
+
items: P
|
|
1996
|
+
} = za(e, s), h = _(() => e.search), {
|
|
1997
|
+
filteredItems: I
|
|
1998
|
+
} = na(e, P, h, {
|
|
1999
|
+
transform: (N) => N.columns,
|
|
2000
|
+
customKeyFilter: u
|
|
2001
|
+
}), {
|
|
2002
|
+
toggleSort: C
|
|
2003
|
+
} = Ca({
|
|
2004
|
+
initialSortOrder: r,
|
|
2005
|
+
sortBy: o,
|
|
2006
|
+
multiSort: c,
|
|
2007
|
+
mustSort: d,
|
|
2008
|
+
page: f
|
|
2009
|
+
}), {
|
|
2010
|
+
sortByWithGroups: w,
|
|
2011
|
+
opened: R,
|
|
2012
|
+
extractRows: H,
|
|
2013
|
+
isGroupOpen: S,
|
|
2014
|
+
toggleGroup: p
|
|
2015
|
+
} = fa({
|
|
2016
|
+
groupBy: l,
|
|
2017
|
+
sortBy: o,
|
|
2018
|
+
disableSort: y
|
|
2019
|
+
}), {
|
|
2020
|
+
sortedItems: v
|
|
2021
|
+
} = Ta(e, I, w, {
|
|
2022
|
+
transform: (N) => ({
|
|
2023
|
+
...N.raw,
|
|
2024
|
+
...N.columns
|
|
2025
|
+
}),
|
|
2026
|
+
sortFunctions: b,
|
|
2027
|
+
sortRawFunctions: g
|
|
2028
|
+
}), F = D(() => e.pageBy === "auto" ? e.groupBy.length ? "group" : "item" : e.pageBy), {
|
|
2029
|
+
pageCount: V,
|
|
2030
|
+
setItemsPerPage: T,
|
|
2031
|
+
paginatedItems: L
|
|
2032
|
+
} = Sa({
|
|
2033
|
+
pageBy: F,
|
|
2034
|
+
sortedItems: v,
|
|
2035
|
+
paginate: (N) => {
|
|
2036
|
+
const he = D(() => j(N).length), {
|
|
2037
|
+
startIndex: pe,
|
|
2038
|
+
stopIndex: xe,
|
|
2039
|
+
pageCount: Dt,
|
|
2040
|
+
setItemsPerPage: Vt
|
|
2041
|
+
} = ha({
|
|
2042
|
+
page: f,
|
|
2043
|
+
itemsPerPage: m,
|
|
2044
|
+
itemsLength: he
|
|
2045
|
+
}), {
|
|
2046
|
+
paginatedItems: Ft
|
|
2047
|
+
} = xa({
|
|
2048
|
+
items: N,
|
|
2049
|
+
startIndex: pe,
|
|
2050
|
+
stopIndex: xe,
|
|
2051
|
+
itemsPerPage: m
|
|
2052
|
+
});
|
|
2053
|
+
return {
|
|
2054
|
+
paginatedItems: Ft,
|
|
2055
|
+
pageCount: Dt,
|
|
2056
|
+
setItemsPerPage: Vt
|
|
2057
|
+
};
|
|
2058
|
+
},
|
|
2059
|
+
group: (N) => va(N, l, R, () => !!n["group-summary"])
|
|
2060
|
+
}), Z = D(() => H(L.value)), {
|
|
2061
|
+
isSelected: O,
|
|
2062
|
+
select: W,
|
|
2063
|
+
selectAll: ae,
|
|
2064
|
+
toggleSelect: St,
|
|
2065
|
+
someSelected: Pt,
|
|
2066
|
+
allSelected: wt
|
|
2067
|
+
} = Ia(e, {
|
|
2068
|
+
allItems: P,
|
|
2069
|
+
currentPage: Z
|
|
2070
|
+
}), {
|
|
2071
|
+
isExpanded: kt,
|
|
2072
|
+
toggleExpand: It
|
|
2073
|
+
} = ua(e);
|
|
2074
|
+
ma({
|
|
2075
|
+
page: f,
|
|
2076
|
+
itemsPerPage: m,
|
|
2077
|
+
sortBy: o,
|
|
2078
|
+
groupBy: l,
|
|
2079
|
+
search: h
|
|
2080
|
+
}), ke({
|
|
2081
|
+
VDataTableRows: {
|
|
2082
|
+
hideNoData: _(() => e.hideNoData),
|
|
2083
|
+
noDataText: _(() => e.noDataText),
|
|
2084
|
+
loading: _(() => e.loading),
|
|
2085
|
+
loadingText: _(() => e.loadingText)
|
|
2086
|
+
}
|
|
2087
|
+
});
|
|
2088
|
+
const G = D(() => ({
|
|
2089
|
+
page: f.value,
|
|
2090
|
+
itemsPerPage: m.value,
|
|
2091
|
+
sortBy: o.value,
|
|
2092
|
+
pageCount: V.value,
|
|
2093
|
+
toggleSort: C,
|
|
2094
|
+
setItemsPerPage: T,
|
|
2095
|
+
someSelected: Pt.value,
|
|
2096
|
+
allSelected: wt.value,
|
|
2097
|
+
isSelected: O,
|
|
2098
|
+
select: W,
|
|
2099
|
+
selectAll: ae,
|
|
2100
|
+
toggleSelect: St,
|
|
2101
|
+
isExpanded: kt,
|
|
2102
|
+
toggleExpand: It,
|
|
2103
|
+
isGroupOpen: S,
|
|
2104
|
+
toggleGroup: p,
|
|
2105
|
+
items: Z.value.map((N) => N.raw),
|
|
2106
|
+
internalItems: Z.value,
|
|
2107
|
+
groupedItems: L.value,
|
|
2108
|
+
columns: s.value,
|
|
2109
|
+
headers: i.value
|
|
2110
|
+
}));
|
|
2111
|
+
return q(() => {
|
|
2112
|
+
const N = Re.filterProps(e), he = $e.filterProps(Te(e, ["multiSort"])), pe = He.filterProps(e), xe = Ge.filterProps(e);
|
|
2113
|
+
return k(Ge, E({
|
|
2114
|
+
class: ["v-data-table", {
|
|
2115
|
+
"v-data-table--show-select": e.showSelect,
|
|
2116
|
+
"v-data-table--loading": e.loading
|
|
2117
|
+
}, e.class],
|
|
2118
|
+
style: e.style
|
|
2119
|
+
}, xe, {
|
|
2120
|
+
fixedHeader: e.fixedHeader || e.sticky
|
|
2121
|
+
}), {
|
|
2122
|
+
top: () => n.top?.(G.value),
|
|
2123
|
+
default: () => n.default ? n.default(G.value) : x(Q, null, [n.colgroup?.(G.value), !e.hideDefaultHeader && x("thead", {
|
|
2124
|
+
key: "thead"
|
|
2125
|
+
}, [k($e, E(he, {
|
|
2126
|
+
multiSort: !!e.multiSort
|
|
2127
|
+
}), n)]), n.thead?.(G.value), !e.hideDefaultBody && x("tbody", null, [n["body.prepend"]?.(G.value), n.body ? n.body(G.value) : k(He, E(a, pe, {
|
|
2128
|
+
items: L.value
|
|
2129
|
+
}), n), n["body.append"]?.(G.value)]), n.tbody?.(G.value), n.tfoot?.(G.value)]),
|
|
2130
|
+
bottom: () => n.bottom ? n.bottom(G.value) : !e.hideDefaultFooter && x(Q, null, [k(Zt, null, null), k(Re, N, {
|
|
2131
|
+
prepend: n["footer.prepend"]
|
|
2132
|
+
})])
|
|
2133
|
+
});
|
|
2134
|
+
}), {};
|
|
2135
|
+
}
|
|
2136
|
+
}), Qa = {
|
|
2137
|
+
actions: "button@2",
|
|
2138
|
+
article: "heading, paragraph",
|
|
2139
|
+
avatar: "avatar",
|
|
2140
|
+
button: "button",
|
|
2141
|
+
card: "image, heading",
|
|
2142
|
+
"card-avatar": "image, list-item-avatar",
|
|
2143
|
+
chip: "chip",
|
|
2144
|
+
"date-picker": "list-item, heading, divider, date-picker-options, date-picker-days, actions",
|
|
2145
|
+
"date-picker-options": "text, avatar@2",
|
|
2146
|
+
"date-picker-days": "avatar@28",
|
|
2147
|
+
divider: "divider",
|
|
2148
|
+
heading: "heading",
|
|
2149
|
+
image: "image",
|
|
2150
|
+
"list-item": "text",
|
|
2151
|
+
"list-item-avatar": "avatar, text",
|
|
2152
|
+
"list-item-two-line": "sentences",
|
|
2153
|
+
"list-item-avatar-two-line": "avatar, sentences",
|
|
2154
|
+
"list-item-three-line": "paragraph",
|
|
2155
|
+
"list-item-avatar-three-line": "avatar, paragraph",
|
|
2156
|
+
ossein: "ossein",
|
|
2157
|
+
paragraph: "text@3",
|
|
2158
|
+
sentences: "text@2",
|
|
2159
|
+
subtitle: "text",
|
|
2160
|
+
table: "table-heading, table-thead, table-tbody, table-tfoot",
|
|
2161
|
+
"table-heading": "chip, text",
|
|
2162
|
+
"table-thead": "heading@6",
|
|
2163
|
+
"table-tbody": "table-row-divider@6",
|
|
2164
|
+
"table-row-divider": "table-row, divider",
|
|
2165
|
+
"table-row": "text@6",
|
|
2166
|
+
"table-tfoot": "text@2, avatar@2",
|
|
2167
|
+
text: "text"
|
|
2168
|
+
};
|
|
2169
|
+
function Xa(e) {
|
|
2170
|
+
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
|
|
2171
|
+
return x("div", {
|
|
2172
|
+
class: z(["v-skeleton-loader__bone", `v-skeleton-loader__${e}`])
|
|
2173
|
+
}, [t]);
|
|
2174
|
+
}
|
|
2175
|
+
function je(e) {
|
|
2176
|
+
const [t, a] = e.split("@");
|
|
2177
|
+
return Array.from({
|
|
2178
|
+
length: a
|
|
2179
|
+
}).map(() => ye(t));
|
|
2180
|
+
}
|
|
2181
|
+
function ye(e) {
|
|
2182
|
+
let t = [];
|
|
2183
|
+
if (!e) return t;
|
|
2184
|
+
const a = Qa[e];
|
|
2185
|
+
if (e !== a) {
|
|
2186
|
+
if (e.includes(",")) return Me(e);
|
|
2187
|
+
if (e.includes("@")) return je(e);
|
|
2188
|
+
a.includes(",") ? t = Me(a) : a.includes("@") ? t = je(a) : a && t.push(ye(a));
|
|
2189
|
+
}
|
|
2190
|
+
return [Xa(e, t)];
|
|
2191
|
+
}
|
|
2192
|
+
function Me(e) {
|
|
2193
|
+
return e.replace(/\s/g, "").split(",").map(ye);
|
|
2194
|
+
}
|
|
2195
|
+
const Ya = B({
|
|
2196
|
+
boilerplate: Boolean,
|
|
2197
|
+
color: String,
|
|
2198
|
+
loading: Boolean,
|
|
2199
|
+
loadingText: {
|
|
2200
|
+
type: String,
|
|
2201
|
+
default: "$vuetify.loading"
|
|
2202
|
+
},
|
|
2203
|
+
type: {
|
|
2204
|
+
type: [String, Array],
|
|
2205
|
+
default: "ossein"
|
|
2206
|
+
},
|
|
2207
|
+
...ta(),
|
|
2208
|
+
...Ue(),
|
|
2209
|
+
...Ce()
|
|
2210
|
+
}, "VSkeletonLoader"), ln = M()({
|
|
2211
|
+
name: "VSkeletonLoader",
|
|
2212
|
+
inheritAttrs: !1,
|
|
2213
|
+
props: Ya(),
|
|
2214
|
+
setup(e, t) {
|
|
2215
|
+
let {
|
|
2216
|
+
attrs: a,
|
|
2217
|
+
slots: n
|
|
2218
|
+
} = t;
|
|
2219
|
+
const {
|
|
2220
|
+
backgroundColorClasses: l,
|
|
2221
|
+
backgroundColorStyles: r
|
|
2222
|
+
} = Xe(() => e.color), {
|
|
2223
|
+
dimensionStyles: o
|
|
2224
|
+
} = Jt(e), {
|
|
2225
|
+
elevationClasses: c
|
|
2226
|
+
} = ea(e), {
|
|
2227
|
+
themeClasses: d
|
|
2228
|
+
} = Fe(e), {
|
|
2229
|
+
t: f
|
|
2230
|
+
} = te(), m = D(() => ye(J(e.type).join(",")));
|
|
2231
|
+
return q(() => {
|
|
2232
|
+
const y = !n.default || e.loading, s = e.boilerplate || !y ? {} : {
|
|
2233
|
+
ariaLive: "polite",
|
|
2234
|
+
ariaLabel: f(e.loadingText),
|
|
2235
|
+
role: "alert"
|
|
2236
|
+
};
|
|
2237
|
+
return y ? x("div", E({
|
|
2238
|
+
class: ["v-skeleton-loader", {
|
|
2239
|
+
"v-skeleton-loader--boilerplate": e.boilerplate
|
|
2240
|
+
}, d.value, l.value, c.value],
|
|
2241
|
+
style: [r.value, o.value]
|
|
2242
|
+
}, s, a), [m.value]) : x(Q, null, [n.default?.()]);
|
|
2243
|
+
}), {};
|
|
2244
|
+
}
|
|
2245
|
+
});
|
|
2246
|
+
function Za(e, t, a) {
|
|
2247
|
+
switch (a) {
|
|
2248
|
+
case ">":
|
|
2249
|
+
return e > t;
|
|
2250
|
+
case "<":
|
|
2251
|
+
return e < t;
|
|
2252
|
+
case ">=":
|
|
2253
|
+
return e >= t;
|
|
2254
|
+
case "<=":
|
|
2255
|
+
return e <= t;
|
|
2256
|
+
case "=":
|
|
2257
|
+
return e === t;
|
|
2258
|
+
default:
|
|
2259
|
+
throw new Error(`Invalid operator: ${a}`);
|
|
2260
|
+
}
|
|
2261
|
+
}
|
|
2262
|
+
function rn() {
|
|
2263
|
+
const { advancedFiltersState: e, hardFiltersState: t } = ra(), a = Y("table_props"), n = K(), l = D(() => {
|
|
2264
|
+
let s = n.value;
|
|
2265
|
+
if (!s) return s;
|
|
2266
|
+
const i = d(e.value, t.value);
|
|
2267
|
+
return !i || Object.keys(i).length === 0 || Object.keys(i).forEach((b) => {
|
|
2268
|
+
const { value: g, comparison: u = "=" } = i[b];
|
|
2269
|
+
if (!g) return;
|
|
2270
|
+
const P = y(a.headers, b);
|
|
2271
|
+
P && (s = s.filter((h) => {
|
|
2272
|
+
const I = m(h, b, P);
|
|
2273
|
+
return P.advancedFilter?.customFilterFn && typeof P.advancedFilter.customFilterFn == "function" ? P.advancedFilter.customFilterFn({ value: I, filterValue: g, filterComparison: u, header: P, item: h }) : c(I, g, u, P);
|
|
2274
|
+
}));
|
|
2275
|
+
}), s;
|
|
2276
|
+
});
|
|
2277
|
+
function r(s, i) {
|
|
2278
|
+
const b = Array.isArray(i) ? i : [i], g = de(b[0]).startOf("day").isSameOrBefore(de(s).format()), u = de(b[b.length - 1]).endOf("day").isSameOrAfter(de(s).format());
|
|
2279
|
+
return g && u;
|
|
2280
|
+
}
|
|
2281
|
+
function o(s, i) {
|
|
2282
|
+
return Array.isArray(i) ? i.map((b) => b.toString().toLowerCase()).includes(s.toString().toLowerCase()) : s?.toString().toLowerCase().includes(i.toString().toLowerCase());
|
|
2283
|
+
}
|
|
2284
|
+
function c(s, i, b, g) {
|
|
2285
|
+
switch (g.advancedFilter?.component) {
|
|
2286
|
+
case "datepicker":
|
|
2287
|
+
return r(s, i);
|
|
2288
|
+
case "comparison":
|
|
2289
|
+
return Za(Number(s), Number(i), b);
|
|
2290
|
+
default:
|
|
2291
|
+
return o(s, i);
|
|
2292
|
+
}
|
|
2293
|
+
}
|
|
2294
|
+
function d(s, i) {
|
|
2295
|
+
const b = Object.values(i).filter((g) => g.args).map((g) => g.args).reduce((g, u) => ({ ...g, ...u }), {});
|
|
2296
|
+
return { ...s, ...b };
|
|
2297
|
+
}
|
|
2298
|
+
function f(s, i) {
|
|
2299
|
+
return i.split(".").reduce((b, g) => b && b[g], s);
|
|
2300
|
+
}
|
|
2301
|
+
function m(s, i, b) {
|
|
2302
|
+
const g = sa(s), u = b.advancedFilter?.filterReturnValue;
|
|
2303
|
+
return typeof u == "function" && (g[i] = u({
|
|
2304
|
+
value: s[i],
|
|
2305
|
+
item: s
|
|
2306
|
+
})), f(g, i);
|
|
2307
|
+
}
|
|
2308
|
+
function y(s, i) {
|
|
2309
|
+
return s.find((b) => (b.advancedFilter?.key ?? b.key) === i);
|
|
2310
|
+
}
|
|
2311
|
+
return ge(
|
|
2312
|
+
() => a.data,
|
|
2313
|
+
(s, i) => {
|
|
2314
|
+
oa(s ?? [], i ?? []) || (n.value = s);
|
|
2315
|
+
},
|
|
2316
|
+
{ deep: !0, immediate: !0 }
|
|
2317
|
+
), { tableData: n, filteredData: l };
|
|
2318
|
+
}
|
|
2319
|
+
const sn = Et({
|
|
2320
|
+
props: {
|
|
2321
|
+
render: {
|
|
2322
|
+
type: [Function, Object, String, Number, Date],
|
|
2323
|
+
required: !0
|
|
2324
|
+
},
|
|
2325
|
+
props: {
|
|
2326
|
+
type: Object,
|
|
2327
|
+
default: () => ({})
|
|
2328
|
+
},
|
|
2329
|
+
params: {
|
|
2330
|
+
type: Object,
|
|
2331
|
+
default: () => ({})
|
|
2332
|
+
}
|
|
2333
|
+
},
|
|
2334
|
+
setup: (e) => () => {
|
|
2335
|
+
const t = { ...e.props, ...e.params };
|
|
2336
|
+
return typeof e.render == "function" ? e.render(t) : typeof e.render == "object" && e.render !== null ? At(e.render, t) : e.render;
|
|
2337
|
+
}
|
|
2338
|
+
});
|
|
2339
|
+
export {
|
|
2340
|
+
sn as C,
|
|
2341
|
+
nn as V,
|
|
2342
|
+
ln as a,
|
|
2343
|
+
Va as b,
|
|
2344
|
+
ca as c,
|
|
2345
|
+
ya as d,
|
|
2346
|
+
Ha as e,
|
|
2347
|
+
za as f,
|
|
2348
|
+
fa as g,
|
|
2349
|
+
ha as h,
|
|
2350
|
+
va as i,
|
|
2351
|
+
Ia as j,
|
|
2352
|
+
ua as k,
|
|
2353
|
+
ma as l,
|
|
2354
|
+
Re as m,
|
|
2355
|
+
$e as n,
|
|
2356
|
+
He as o,
|
|
2357
|
+
Ca as p,
|
|
2358
|
+
Ge as q,
|
|
2359
|
+
ut as r,
|
|
2360
|
+
qa as s,
|
|
2361
|
+
ba as t,
|
|
2362
|
+
rn as u
|
|
2363
|
+
};
|