@ianicdev/datatables2 0.9.6 → 0.9.8
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/{Columns-DKEjCBqW.js → Columns-BXnSYd-i.js} +1 -1
- package/dist/{Columns-BnlNJUPr.cjs → Columns-CFTmfPVc.cjs} +1 -1
- package/dist/{Comparison-Bcyrizej.cjs → Comparison-CsnTMSkc.cjs} +1 -1
- package/dist/{Comparison-B7jFgG2r.js → Comparison-DSQomYKQ.js} +1 -1
- package/dist/{Datepicker-B8FbEQK8.js → Datepicker-7fiEL_BV.js} +2 -2
- package/dist/{Datepicker-Bccp9SqM.cjs → Datepicker-CiF0Gxqc.cjs} +1 -1
- package/dist/{Download-C3oshNIp.cjs → Download-DX9SdTyQ.cjs} +1 -1
- package/dist/{Download-BEqkSo7a.js → Download-RW-UTi1O.js} +1 -1
- package/dist/{Options-BnXooTLB.cjs → Options-C3aIEmMs.cjs} +1 -1
- package/dist/{Options-BHCFj4fb.js → Options-CaeA8ORW.js} +1 -1
- package/dist/{RefreshTable-D0Zt44qx.js → RefreshTable-BehJANLx.js} +2 -2
- package/dist/{RefreshTable-CKHneBnQ.cjs → RefreshTable-j-7zIKGb.cjs} +1 -1
- package/dist/{Search-DdiNT2Nh.cjs → Search-DvlmBsKA.cjs} +1 -1
- package/dist/{Search-5UYzqSs5.js → Search-o9eqRs1B.js} +2 -2
- package/dist/{Table-Bcfzm08c.cjs → Table-6mEJ8qhC.cjs} +1 -1
- package/dist/{Table-0AM6F0No.js → Table-CXOhgI5B.js} +2 -2
- package/dist/{TableServer-Bt42lAlY.cjs → TableServer-CZXfhWDA.cjs} +2 -2
- package/dist/{TableServer-t9GNK7QD.js → TableServer-DhZMDgpd.js} +4 -4
- package/dist/{cellRender-DEyBmE7c.js → cellRender-BD6GhuU1.js} +165 -169
- package/dist/{cellRender-Di9tv0d1.cjs → cellRender-Cbcrdo1U.cjs} +1 -1
- package/dist/{dataTables-CbFJzdBR.js → dataTables-BXxLOWGn.js} +1 -1
- package/dist/{dataTables-CSsSvhTh.cjs → dataTables-D1Puzwqz.cjs} +1 -1
- package/dist/datatables.cjs +1 -1
- package/dist/datatables.js +1 -1
- package/dist/{index-6skFoUBz.cjs → index-B7LcHjzm.cjs} +1 -1
- package/dist/{index-CIELwkC7.js → index-BhIfR6t-.js} +11 -11
- package/dist/{index-CIatV8wE.cjs → index-Cjbs9C1X.cjs} +1 -1
- package/dist/{index-_f1bGn_r.js → index-t1-Qu-Ll.js} +1 -1
- package/package.json +3 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { shallowRef as ue, computed as F, unref as q, watchEffect as je, toRef as C, provide as Y, toRaw as ne, inject as Q, ref as j, toValue as Tt, watch as ce, onBeforeUpdate as Ct, createVNode as k, normalizeStyle as ke, normalizeClass as G, createElementVNode as S, mergeProps as B, nextTick as Ce, capitalize as _t, Fragment as U, createTextVNode as _e, withModifiers as re, toDisplayString as Bt, toRefs as Ot, defineComponent as Lt, h as At } from "vue";
|
|
2
|
-
import { aQ as Et, U as Rt, p as _, N as z, aA as ee, K as J, aR as de, _ as Ge, J as Ke, af as ye, aS as Nt, T as Z, aT as se, g as $, a0 as $t, h as Ie, aj as fe, a as Se, al as Mt, aU as oe, u as K, a9 as W, x as Ht, y as Fe, m as We, as as jt, A as Gt, E as ze, f as ae, b as Ue, G as Kt, I as O, aV as Be, aW as Wt, ax as A, aX as zt, o as Ut, P as Je, L as Jt, D as Qt, ao as Ve, d as Oe, H as pe, a1 as Pe, k as Xt, aa as Yt, l as Zt, n as qt, F as ea } from "./dataTables-
|
|
3
|
-
import { V as Qe, a as ta, b as De, u as aa, d as la } from "./index-
|
|
2
|
+
import { aQ as Et, U as Rt, p as _, N as z, aA as ee, K as J, aR as de, _ as Ge, J as Ke, af as ye, aS as Nt, T as Z, aT as se, g as $, a0 as $t, h as Ie, aj as fe, a as Se, al as Mt, aU as oe, u as K, a9 as W, x as Ht, y as Fe, m as We, as as jt, A as Gt, E as ze, f as ae, b as Ue, G as Kt, I as O, aV as Be, aW as Wt, ax as A, aX as zt, o as Ut, P as Je, L as Jt, D as Qt, ao as Ve, d as Oe, H as pe, a1 as Pe, k as Xt, aa as Yt, l as Zt, n as qt, F as ea } from "./dataTables-BXxLOWGn.js";
|
|
3
|
+
import { V as Qe, a as ta, b as De, u as aa, d as la } from "./index-BhIfR6t-.js";
|
|
4
4
|
import ie from "moment";
|
|
5
5
|
function Le(e, t, a) {
|
|
6
6
|
return Object.keys(e).filter((l) => Et(l) && l.endsWith(t)).reduce((l, n) => (l[n.slice(0, -t.length)] = (r) => Rt(e[n], r, a(r)), l), {});
|
|
@@ -30,36 +30,36 @@ const ra = _({
|
|
|
30
30
|
noFilter: Boolean
|
|
31
31
|
}, "filter");
|
|
32
32
|
function sa(e, t, a) {
|
|
33
|
-
const l = [], n = a?.default ?? na, r = a?.filterKeys ? z(a.filterKeys) : !1,
|
|
33
|
+
const l = [], n = a?.default ?? na, r = a?.filterKeys ? z(a.filterKeys) : !1, i = Object.keys(a?.customKeyFilter ?? {}).length;
|
|
34
34
|
if (!e?.length) return l;
|
|
35
35
|
let u = null;
|
|
36
36
|
e: for (let s = 0; s < e.length; s++) {
|
|
37
|
-
const [
|
|
37
|
+
const [o, c = o] = z(e[s]), m = {}, d = {};
|
|
38
38
|
let f = -1;
|
|
39
|
-
if ((t ||
|
|
39
|
+
if ((t || i > 0) && !a?.noFilter) {
|
|
40
40
|
let y = !1;
|
|
41
|
-
if (typeof
|
|
42
|
-
if (
|
|
43
|
-
u?.type === "divider" &&
|
|
41
|
+
if (typeof o == "object") {
|
|
42
|
+
if (o.type === "divider" || o.type === "subheader") {
|
|
43
|
+
u?.type === "divider" && o.type === "subheader" && l.push(u), u = {
|
|
44
44
|
index: s,
|
|
45
45
|
matches: {},
|
|
46
|
-
type:
|
|
46
|
+
type: o.type
|
|
47
47
|
};
|
|
48
48
|
continue;
|
|
49
49
|
}
|
|
50
50
|
const V = r || Object.keys(c);
|
|
51
|
-
y = V.length ===
|
|
51
|
+
y = V.length === i;
|
|
52
52
|
for (const h of V) {
|
|
53
53
|
const I = ee(c, h), D = a?.customKeyFilter?.[h];
|
|
54
|
-
if (f = D ? D(I, t,
|
|
54
|
+
if (f = D ? D(I, t, o) : n(I, t, o), f !== -1 && f !== !1)
|
|
55
55
|
D ? m[h] = xe(f, t) : d[h] = xe(f, t);
|
|
56
56
|
else if (a?.filterMode === "every")
|
|
57
57
|
continue e;
|
|
58
58
|
}
|
|
59
59
|
} else
|
|
60
|
-
f = n(
|
|
60
|
+
f = n(o, t, o), f !== -1 && f !== !1 && (d.title = xe(f, t));
|
|
61
61
|
const b = Object.keys(d).length, v = Object.keys(m).length;
|
|
62
|
-
if (!b && !v || a?.filterMode === "union" && v !==
|
|
62
|
+
if (!b && !v || a?.filterMode === "union" && v !== i && !b || a?.filterMode === "intersection" && (v !== i || !b && i > 0 && !y)) continue;
|
|
63
63
|
}
|
|
64
64
|
u && (l.push(u), u = null), l.push({
|
|
65
65
|
index: s,
|
|
@@ -72,9 +72,9 @@ function sa(e, t, a) {
|
|
|
72
72
|
return l;
|
|
73
73
|
}
|
|
74
74
|
function oa(e, t, a, l) {
|
|
75
|
-
const n = ue([]), r = ue(/* @__PURE__ */ new Map()),
|
|
75
|
+
const n = ue([]), r = ue(/* @__PURE__ */ new Map()), i = F(() => l?.transform ? q(t).map((s) => [s, l.transform(s)]) : q(t));
|
|
76
76
|
je(() => {
|
|
77
|
-
const s = typeof a == "function" ? a() : q(a),
|
|
77
|
+
const s = typeof a == "function" ? a() : q(a), o = typeof s != "string" && typeof s != "number" ? "" : String(s), c = sa(i.value, o, {
|
|
78
78
|
customKeyFilter: {
|
|
79
79
|
...e.customKeyFilter,
|
|
80
80
|
...q(l?.customKeyFilter)
|
|
@@ -113,30 +113,30 @@ const ia = _({
|
|
|
113
113
|
function ua(e) {
|
|
114
114
|
const t = C(() => e.expandOnClick), a = J(e, "expanded", e.expanded, (u) => new Set(u), (u) => [...u.values()]);
|
|
115
115
|
function l(u, s) {
|
|
116
|
-
const
|
|
116
|
+
const o = new Set(a.value), c = ne(u.value);
|
|
117
117
|
if (s)
|
|
118
|
-
|
|
118
|
+
o.add(c);
|
|
119
119
|
else {
|
|
120
120
|
const m = [...a.value].find((d) => ne(d) === c);
|
|
121
|
-
|
|
121
|
+
o.delete(m);
|
|
122
122
|
}
|
|
123
|
-
a.value =
|
|
123
|
+
a.value = o;
|
|
124
124
|
}
|
|
125
125
|
function n(u) {
|
|
126
126
|
const s = ne(u.value);
|
|
127
|
-
return [...a.value].some((
|
|
127
|
+
return [...a.value].some((o) => ne(o) === s);
|
|
128
128
|
}
|
|
129
129
|
function r(u) {
|
|
130
130
|
l(u, !n(u));
|
|
131
131
|
}
|
|
132
|
-
const
|
|
132
|
+
const i = {
|
|
133
133
|
expand: l,
|
|
134
134
|
expanded: a,
|
|
135
135
|
expandOnClick: t,
|
|
136
136
|
isExpanded: n,
|
|
137
137
|
toggleExpand: r
|
|
138
138
|
};
|
|
139
|
-
return Y(Xe,
|
|
139
|
+
return Y(Xe, i), i;
|
|
140
140
|
}
|
|
141
141
|
function Ye() {
|
|
142
142
|
const e = Q(Xe);
|
|
@@ -163,12 +163,12 @@ function fa(e) {
|
|
|
163
163
|
...c,
|
|
164
164
|
order: c.order ?? !1
|
|
165
165
|
})).concat(t?.value ? [] : l.value));
|
|
166
|
-
function
|
|
166
|
+
function i(c) {
|
|
167
167
|
return n.value.has(c.id);
|
|
168
168
|
}
|
|
169
169
|
function u(c) {
|
|
170
170
|
const m = new Set(n.value);
|
|
171
|
-
|
|
171
|
+
i(c) ? m.delete(c.id) : m.add(c.id), n.value = m;
|
|
172
172
|
}
|
|
173
173
|
function s(c) {
|
|
174
174
|
function m(d) {
|
|
@@ -181,15 +181,15 @@ function fa(e) {
|
|
|
181
181
|
items: c
|
|
182
182
|
});
|
|
183
183
|
}
|
|
184
|
-
const
|
|
184
|
+
const o = {
|
|
185
185
|
sortByWithGroups: r,
|
|
186
186
|
toggleGroup: u,
|
|
187
187
|
opened: n,
|
|
188
188
|
groupBy: a,
|
|
189
189
|
extractRows: s,
|
|
190
|
-
isGroupOpen:
|
|
190
|
+
isGroupOpen: i
|
|
191
191
|
};
|
|
192
|
-
return Y(Ze,
|
|
192
|
+
return Y(Ze, o), o;
|
|
193
193
|
}
|
|
194
194
|
function qe() {
|
|
195
195
|
const e = Q(Ze);
|
|
@@ -208,15 +208,15 @@ function va(e, t) {
|
|
|
208
208
|
function et(e, t) {
|
|
209
209
|
let a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0, l = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : "root";
|
|
210
210
|
if (!t.length) return [];
|
|
211
|
-
const n = va(e, t[0]), r = [],
|
|
211
|
+
const n = va(e, t[0]), r = [], i = t.slice(1);
|
|
212
212
|
return n.forEach((u, s) => {
|
|
213
|
-
const
|
|
213
|
+
const o = t[0], c = `${l}_${o}_${s}`;
|
|
214
214
|
r.push({
|
|
215
215
|
depth: a,
|
|
216
216
|
id: c,
|
|
217
|
-
key:
|
|
217
|
+
key: o,
|
|
218
218
|
value: s,
|
|
219
|
-
items:
|
|
219
|
+
items: i.length ? et(u, i, a + 1, c) : u,
|
|
220
220
|
type: "group"
|
|
221
221
|
});
|
|
222
222
|
}), r;
|
|
@@ -234,7 +234,7 @@ function ga(e, t, a, l) {
|
|
|
234
234
|
return {
|
|
235
235
|
flatItems: F(() => {
|
|
236
236
|
if (!t.value.length) return e.value;
|
|
237
|
-
const r = et(e.value, t.value.map((
|
|
237
|
+
const r = et(e.value, t.value.map((i) => i.key));
|
|
238
238
|
return tt(r, a.value, Tt(l));
|
|
239
239
|
})
|
|
240
240
|
};
|
|
@@ -247,7 +247,7 @@ function ma(e) {
|
|
|
247
247
|
groupBy: n,
|
|
248
248
|
search: r
|
|
249
249
|
} = e;
|
|
250
|
-
const
|
|
250
|
+
const i = Ge("VDataTable"), u = () => ({
|
|
251
251
|
page: t.value,
|
|
252
252
|
itemsPerPage: a.value,
|
|
253
253
|
sortBy: l.value,
|
|
@@ -255,8 +255,8 @@ function ma(e) {
|
|
|
255
255
|
search: r.value
|
|
256
256
|
});
|
|
257
257
|
let s = null;
|
|
258
|
-
ce(u, (
|
|
259
|
-
Ke(s,
|
|
258
|
+
ce(u, (o) => {
|
|
259
|
+
Ke(s, o) || (s && s.search !== o.search && (t.value = 1), i.emit("update:options", o), s = o);
|
|
260
260
|
}, {
|
|
261
261
|
deep: !0,
|
|
262
262
|
immediate: !0
|
|
@@ -284,31 +284,31 @@ function ya(e) {
|
|
|
284
284
|
page: t,
|
|
285
285
|
itemsPerPage: a,
|
|
286
286
|
itemsLength: l
|
|
287
|
-
} = e, n = F(() => a.value === -1 ? 0 : a.value * (t.value - 1)), r = F(() => a.value === -1 ? l.value : Math.min(l.value, n.value + a.value)),
|
|
288
|
-
ce([t,
|
|
289
|
-
t.value >
|
|
287
|
+
} = e, n = F(() => a.value === -1 ? 0 : a.value * (t.value - 1)), r = F(() => a.value === -1 ? l.value : Math.min(l.value, n.value + a.value)), i = F(() => a.value === -1 || l.value === 0 ? 1 : Math.ceil(l.value / a.value));
|
|
288
|
+
ce([t, i], () => {
|
|
289
|
+
t.value > i.value && (t.value = i.value);
|
|
290
290
|
});
|
|
291
291
|
function u(d) {
|
|
292
292
|
a.value = d, t.value = 1;
|
|
293
293
|
}
|
|
294
294
|
function s() {
|
|
295
|
-
t.value = ye(t.value + 1, 1,
|
|
295
|
+
t.value = ye(t.value + 1, 1, i.value);
|
|
296
296
|
}
|
|
297
|
-
function
|
|
298
|
-
t.value = ye(t.value - 1, 1,
|
|
297
|
+
function o() {
|
|
298
|
+
t.value = ye(t.value - 1, 1, i.value);
|
|
299
299
|
}
|
|
300
300
|
function c(d) {
|
|
301
|
-
t.value = ye(d, 1,
|
|
301
|
+
t.value = ye(d, 1, i.value);
|
|
302
302
|
}
|
|
303
303
|
const m = {
|
|
304
304
|
page: t,
|
|
305
305
|
itemsPerPage: a,
|
|
306
306
|
startIndex: n,
|
|
307
307
|
stopIndex: r,
|
|
308
|
-
pageCount:
|
|
308
|
+
pageCount: i,
|
|
309
309
|
itemsLength: l,
|
|
310
310
|
nextPage: s,
|
|
311
|
-
prevPage:
|
|
311
|
+
prevPage: o,
|
|
312
312
|
setPage: c,
|
|
313
313
|
setItemsPerPage: u
|
|
314
314
|
};
|
|
@@ -325,13 +325,13 @@ function xa(e) {
|
|
|
325
325
|
startIndex: l,
|
|
326
326
|
stopIndex: n,
|
|
327
327
|
itemsPerPage: r
|
|
328
|
-
} = e,
|
|
329
|
-
return ce(
|
|
328
|
+
} = e, i = F(() => r.value <= 0 ? a.value : a.value.slice(l.value, n.value));
|
|
329
|
+
return ce(i, (u) => {
|
|
330
330
|
t.emit("update:currentItems", u);
|
|
331
331
|
}, {
|
|
332
332
|
immediate: !0
|
|
333
333
|
}), {
|
|
334
|
-
paginatedItems:
|
|
334
|
+
paginatedItems: i
|
|
335
335
|
};
|
|
336
336
|
}
|
|
337
337
|
const Sa = {
|
|
@@ -425,7 +425,7 @@ function ka(e, t) {
|
|
|
425
425
|
const n = J(e, "modelValue", e.modelValue, (h) => {
|
|
426
426
|
const I = e.valueComparator;
|
|
427
427
|
return I ? new Set(z(h).map((D) => a.value.find((P) => I(D, P.value))?.value ?? D)) : new Set(z(h).map((D) => Nt(D) ? a.value.find((P) => D === P.value)?.value ?? D : a.value.find((P) => Ke(D, P.value))?.value ?? D));
|
|
428
|
-
}, (h) => [...h.values()]), r = F(() => a.value.filter((h) => h.selectable)),
|
|
428
|
+
}, (h) => [...h.values()]), r = F(() => a.value.filter((h) => h.selectable)), i = F(() => l.value.filter((h) => h.selectable)), u = F(() => {
|
|
429
429
|
if (typeof e.selectStrategy == "object") return e.selectStrategy;
|
|
430
430
|
switch (e.selectStrategy) {
|
|
431
431
|
case "single":
|
|
@@ -437,7 +437,7 @@ function ka(e, t) {
|
|
|
437
437
|
return lt;
|
|
438
438
|
}
|
|
439
439
|
}), s = ue(null);
|
|
440
|
-
function
|
|
440
|
+
function o(h) {
|
|
441
441
|
return z(h).every((I) => n.value.has(I.value));
|
|
442
442
|
}
|
|
443
443
|
function c(h) {
|
|
@@ -458,13 +458,13 @@ function ka(e, t) {
|
|
|
458
458
|
P.push(...l.value.slice(L, R + 1).filter((p) => p.selectable));
|
|
459
459
|
} else
|
|
460
460
|
P.push(h), s.value = I;
|
|
461
|
-
m(P, !
|
|
461
|
+
m(P, !o([h]));
|
|
462
462
|
}
|
|
463
463
|
function f(h) {
|
|
464
464
|
const I = u.value.selectAll({
|
|
465
465
|
value: h,
|
|
466
466
|
allItems: r.value,
|
|
467
|
-
currentPage:
|
|
467
|
+
currentPage: i.value,
|
|
468
468
|
selected: new Set(n.value)
|
|
469
469
|
});
|
|
470
470
|
n.value = I;
|
|
@@ -472,14 +472,14 @@ function ka(e, t) {
|
|
|
472
472
|
const y = F(() => n.value.size > 0), b = F(() => {
|
|
473
473
|
const h = u.value.allSelected({
|
|
474
474
|
allItems: r.value,
|
|
475
|
-
currentPage:
|
|
475
|
+
currentPage: i.value
|
|
476
476
|
});
|
|
477
|
-
return !!h.length &&
|
|
477
|
+
return !!h.length && o(h);
|
|
478
478
|
}), v = C(() => u.value.showSelectAll), V = {
|
|
479
479
|
toggleSelect: d,
|
|
480
480
|
select: m,
|
|
481
481
|
selectAll: f,
|
|
482
|
-
isSelected:
|
|
482
|
+
isSelected: o,
|
|
483
483
|
isSomeSelected: c,
|
|
484
484
|
someSelected: y,
|
|
485
485
|
allSelected: b,
|
|
@@ -519,25 +519,25 @@ function Va(e) {
|
|
|
519
519
|
page: n
|
|
520
520
|
} = e, r = (s) => {
|
|
521
521
|
if (s.key == null) return;
|
|
522
|
-
let
|
|
522
|
+
let o = t.value.map((m) => ({
|
|
523
523
|
...m
|
|
524
524
|
})) ?? [];
|
|
525
|
-
const c =
|
|
526
|
-
c ? c.order === "desc" ? a.value &&
|
|
525
|
+
const c = o.find((m) => m.key === s.key);
|
|
526
|
+
c ? c.order === "desc" ? a.value && o.length === 1 ? c.order = "asc" : o = o.filter((m) => m.key !== s.key) : c.order = "desc" : l.value ? o.push({
|
|
527
527
|
key: s.key,
|
|
528
528
|
order: "asc"
|
|
529
|
-
}) :
|
|
529
|
+
}) : o = [{
|
|
530
530
|
key: s.key,
|
|
531
531
|
order: "asc"
|
|
532
|
-
}], t.value =
|
|
532
|
+
}], t.value = o, n && (n.value = 1);
|
|
533
533
|
};
|
|
534
|
-
function
|
|
535
|
-
return !!t.value.find((
|
|
534
|
+
function i(s) {
|
|
535
|
+
return !!t.value.find((o) => o.key === s.key);
|
|
536
536
|
}
|
|
537
537
|
const u = {
|
|
538
538
|
sortBy: t,
|
|
539
539
|
toggleSort: r,
|
|
540
|
-
isSorted:
|
|
540
|
+
isSorted: i
|
|
541
541
|
};
|
|
542
542
|
return Y(rt, u), u;
|
|
543
543
|
}
|
|
@@ -564,28 +564,28 @@ function Ta(e, t, a, l) {
|
|
|
564
564
|
sensitivity: "accent",
|
|
565
565
|
usage: "sort"
|
|
566
566
|
});
|
|
567
|
-
return e.map((
|
|
567
|
+
return e.map((i) => [i, l?.transform ? l.transform(i) : i]).sort((i, u) => {
|
|
568
568
|
for (let s = 0; s < t.length; s++) {
|
|
569
|
-
let
|
|
569
|
+
let o = !1;
|
|
570
570
|
const c = t[s].key, m = t[s].order ?? "asc";
|
|
571
571
|
if (m === !1) continue;
|
|
572
|
-
let d = de(
|
|
572
|
+
let d = de(i[1], c), f = de(u[1], c), y = i[0].raw, b = u[0].raw;
|
|
573
573
|
if (m === "desc" && ([d, f] = [f, d], [y, b] = [b, y]), l?.sortRawFunctions?.[c]) {
|
|
574
574
|
const v = l.sortRawFunctions[c](y, b);
|
|
575
575
|
if (v == null) continue;
|
|
576
|
-
if (
|
|
576
|
+
if (o = !0, v) return v;
|
|
577
577
|
}
|
|
578
578
|
if (l?.sortFunctions?.[c]) {
|
|
579
579
|
const v = l.sortFunctions[c](d, f);
|
|
580
580
|
if (v == null) continue;
|
|
581
|
-
if (
|
|
581
|
+
if (o = !0, v) return v;
|
|
582
582
|
}
|
|
583
|
-
if (!
|
|
583
|
+
if (!o && (d instanceof Date && f instanceof Date && (d = d.getTime(), f = f.getTime()), [d, f] = [d, f].map((v) => v != null ? v.toString().toLocaleLowerCase() : v), d !== f))
|
|
584
584
|
return se(d) && se(f) ? 0 : se(d) ? -1 : se(f) ? 1 : !isNaN(d) && !isNaN(f) ? Number(d) - Number(f) : n.compare(d, f);
|
|
585
585
|
}
|
|
586
586
|
return 0;
|
|
587
|
-
}).map((
|
|
588
|
-
let [u] =
|
|
587
|
+
}).map((i) => {
|
|
588
|
+
let [u] = i;
|
|
589
589
|
return u;
|
|
590
590
|
});
|
|
591
591
|
}
|
|
@@ -696,13 +696,13 @@ const _a = _({
|
|
|
696
696
|
} = t;
|
|
697
697
|
const n = J(e, "modelValue"), {
|
|
698
698
|
t: r,
|
|
699
|
-
n:
|
|
699
|
+
n: i
|
|
700
700
|
} = Z(), {
|
|
701
701
|
isRtl: u
|
|
702
702
|
} = $t(), {
|
|
703
703
|
themeClasses: s
|
|
704
704
|
} = Ie(e), {
|
|
705
|
-
width:
|
|
705
|
+
width: o
|
|
706
706
|
} = fe(), c = ue(-1);
|
|
707
707
|
Se(void 0, {
|
|
708
708
|
scoped: !0
|
|
@@ -718,7 +718,7 @@ const _a = _({
|
|
|
718
718
|
if (!w) return;
|
|
719
719
|
const T = g.width, N = w.offsetWidth + parseFloat(getComputedStyle(w).marginRight) * 2;
|
|
720
720
|
c.value = b(T, N);
|
|
721
|
-
}), d = F(() => parseInt(e.length, 10)), f = F(() => parseInt(e.start, 10)), y = F(() => e.totalVisible != null ? parseInt(e.totalVisible, 10) : c.value >= 0 ? c.value : b(
|
|
721
|
+
}), d = F(() => parseInt(e.length, 10)), f = F(() => parseInt(e.start, 10)), y = F(() => e.totalVisible != null ? parseInt(e.totalVisible, 10) : c.value >= 0 ? c.value : b(o.value, 58));
|
|
722
722
|
function b(p, x) {
|
|
723
723
|
const g = e.showFirstLastPage ? 5 : 3;
|
|
724
724
|
return Math.max(0, Math.floor(
|
|
@@ -780,7 +780,7 @@ const _a = _({
|
|
|
780
780
|
return {
|
|
781
781
|
isActive: w,
|
|
782
782
|
key: p,
|
|
783
|
-
page:
|
|
783
|
+
page: i(p),
|
|
784
784
|
props: {
|
|
785
785
|
ref: g,
|
|
786
786
|
ellipsis: !1,
|
|
@@ -954,10 +954,10 @@ const _a = _({
|
|
|
954
954
|
} = Z(), {
|
|
955
955
|
page: n,
|
|
956
956
|
pageCount: r,
|
|
957
|
-
startIndex:
|
|
957
|
+
startIndex: i,
|
|
958
958
|
stopIndex: u,
|
|
959
959
|
itemsLength: s,
|
|
960
|
-
itemsPerPage:
|
|
960
|
+
itemsPerPage: o,
|
|
961
961
|
setItemsPerPage: c
|
|
962
962
|
} = pa(), m = F(() => e.itemsPerPageOptions.map((d) => typeof d == "number" ? {
|
|
963
963
|
value: d,
|
|
@@ -976,14 +976,14 @@ const _a = _({
|
|
|
976
976
|
"aria-label": l(e.itemsPerPageText)
|
|
977
977
|
}, [l(e.itemsPerPageText)]), k(Qe, {
|
|
978
978
|
items: m.value,
|
|
979
|
-
modelValue:
|
|
979
|
+
modelValue: o.value,
|
|
980
980
|
"onUpdate:modelValue": (f) => c(Number(f)),
|
|
981
981
|
density: "compact",
|
|
982
982
|
variant: "outlined",
|
|
983
983
|
hideDetails: !0
|
|
984
984
|
}, null)]), S("div", {
|
|
985
985
|
class: "v-data-table-footer__info"
|
|
986
|
-
}, [S("div", null, [l(e.pageText, s.value ?
|
|
986
|
+
}, [S("div", null, [l(e.pageText, s.value ? i.value + 1 : 0, u.value, s.value)])]), S("div", {
|
|
987
987
|
class: "v-data-table-footer__pagination"
|
|
988
988
|
}, [k(Ae, B({
|
|
989
989
|
modelValue: n.value,
|
|
@@ -1117,26 +1117,26 @@ function Te(e) {
|
|
|
1117
1117
|
}
|
|
1118
1118
|
function Ea(e) {
|
|
1119
1119
|
let t = !1;
|
|
1120
|
-
function a(r,
|
|
1120
|
+
function a(r, i) {
|
|
1121
1121
|
let u = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "none";
|
|
1122
1122
|
if (r)
|
|
1123
|
-
if (u !== "none" && (r.fixed = u), r.fixed === !0 && (r.fixed = "start"), r.fixed ===
|
|
1123
|
+
if (u !== "none" && (r.fixed = u), r.fixed === !0 && (r.fixed = "start"), r.fixed === i)
|
|
1124
1124
|
if (r.children)
|
|
1125
|
-
if (
|
|
1125
|
+
if (i === "start")
|
|
1126
1126
|
for (let s = r.children.length - 1; s >= 0; s--)
|
|
1127
|
-
a(r.children[s],
|
|
1127
|
+
a(r.children[s], i, i);
|
|
1128
1128
|
else
|
|
1129
1129
|
for (let s = 0; s < r.children.length; s++)
|
|
1130
|
-
a(r.children[s],
|
|
1130
|
+
a(r.children[s], i, i);
|
|
1131
1131
|
else
|
|
1132
|
-
!t &&
|
|
1132
|
+
!t && i === "start" ? r.lastFixed = !0 : !t && i === "end" ? r.firstFixedEnd = !0 : isNaN(Number(r.width)) ? zt(`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;
|
|
1133
1133
|
else if (r.children)
|
|
1134
|
-
if (
|
|
1134
|
+
if (i === "start")
|
|
1135
1135
|
for (let s = r.children.length - 1; s >= 0; s--)
|
|
1136
|
-
a(r.children[s],
|
|
1136
|
+
a(r.children[s], i);
|
|
1137
1137
|
else
|
|
1138
1138
|
for (let s = 0; s < r.children.length; s++)
|
|
1139
|
-
a(r.children[s],
|
|
1139
|
+
a(r.children[s], i);
|
|
1140
1140
|
else
|
|
1141
1141
|
t = !1;
|
|
1142
1142
|
}
|
|
@@ -1176,29 +1176,29 @@ function Ra(e, t) {
|
|
|
1176
1176
|
let l = 0;
|
|
1177
1177
|
const n = La(e);
|
|
1178
1178
|
for (; n.size() > 0; ) {
|
|
1179
|
-
let
|
|
1179
|
+
let i = n.count();
|
|
1180
1180
|
const u = [];
|
|
1181
1181
|
let s = 1;
|
|
1182
|
-
for (;
|
|
1182
|
+
for (; i > 0; ) {
|
|
1183
1183
|
const {
|
|
1184
|
-
element:
|
|
1184
|
+
element: o,
|
|
1185
1185
|
priority: c
|
|
1186
|
-
} = n.dequeue(), m = t - l - Te(
|
|
1186
|
+
} = n.dequeue(), m = t - l - Te(o);
|
|
1187
1187
|
if (u.push({
|
|
1188
|
-
...
|
|
1188
|
+
...o,
|
|
1189
1189
|
rowspan: m ?? 1,
|
|
1190
|
-
colspan:
|
|
1191
|
-
}),
|
|
1192
|
-
for (const d of
|
|
1190
|
+
colspan: o.children ? we(o).length : 1
|
|
1191
|
+
}), o.children)
|
|
1192
|
+
for (const d of o.children) {
|
|
1193
1193
|
const f = c % 1 + s / Math.pow(10, l + 2);
|
|
1194
1194
|
n.enqueue(d, l + m + f);
|
|
1195
1195
|
}
|
|
1196
|
-
s += 1,
|
|
1196
|
+
s += 1, i -= 1;
|
|
1197
1197
|
}
|
|
1198
1198
|
l += 1, a.push(u);
|
|
1199
1199
|
}
|
|
1200
1200
|
return {
|
|
1201
|
-
columns: e.map((
|
|
1201
|
+
columns: e.map((i) => we(i)).flat(),
|
|
1202
1202
|
headers: a
|
|
1203
1203
|
};
|
|
1204
1204
|
}
|
|
@@ -1208,46 +1208,46 @@ function vt(e) {
|
|
|
1208
1208
|
const l = {
|
|
1209
1209
|
...Aa(a),
|
|
1210
1210
|
...a
|
|
1211
|
-
}, n = l.key ?? (typeof l.value == "string" ? l.value : null), r = l.value ?? n ?? null,
|
|
1211
|
+
}, n = l.key ?? (typeof l.value == "string" ? l.value : null), r = l.value ?? n ?? null, i = {
|
|
1212
1212
|
...l,
|
|
1213
1213
|
key: n,
|
|
1214
1214
|
value: r,
|
|
1215
1215
|
sortable: l.sortable ?? (l.key != null || !!l.sort),
|
|
1216
1216
|
children: l.children ? vt(l.children) : void 0
|
|
1217
1217
|
};
|
|
1218
|
-
t.push(
|
|
1218
|
+
t.push(i);
|
|
1219
1219
|
}
|
|
1220
1220
|
return t;
|
|
1221
1221
|
}
|
|
1222
1222
|
function Na(e, t) {
|
|
1223
|
-
const a = j([]), l = j([]), n = j({}), r = j({}),
|
|
1223
|
+
const a = j([]), l = j([]), n = j({}), r = j({}), i = j({});
|
|
1224
1224
|
je(() => {
|
|
1225
|
-
const
|
|
1225
|
+
const o = (e.headers || Object.keys(e.items[0] ?? {}).map((b) => ({
|
|
1226
1226
|
key: b,
|
|
1227
1227
|
title: _t(b)
|
|
1228
|
-
}))).slice(), c = dt(
|
|
1229
|
-
t?.groupBy?.value.length && !c.has("data-table-group") &&
|
|
1228
|
+
}))).slice(), c = dt(o);
|
|
1229
|
+
t?.groupBy?.value.length && !c.has("data-table-group") && o.unshift({
|
|
1230
1230
|
key: "data-table-group",
|
|
1231
1231
|
title: "Group"
|
|
1232
|
-
}), t?.showSelect?.value && !c.has("data-table-select") &&
|
|
1232
|
+
}), t?.showSelect?.value && !c.has("data-table-select") && o.unshift({
|
|
1233
1233
|
key: "data-table-select"
|
|
1234
|
-
}), t?.showExpand?.value && !c.has("data-table-expand") &&
|
|
1234
|
+
}), t?.showExpand?.value && !c.has("data-table-expand") && o.push({
|
|
1235
1235
|
key: "data-table-expand"
|
|
1236
1236
|
});
|
|
1237
|
-
const m = vt(
|
|
1237
|
+
const m = vt(o);
|
|
1238
1238
|
Ea(m);
|
|
1239
1239
|
const d = Math.max(...m.map((b) => Te(b))) + 1, f = Ra(m, d);
|
|
1240
1240
|
a.value = f.headers, l.value = f.columns;
|
|
1241
1241
|
const y = f.headers.flat(1);
|
|
1242
1242
|
for (const b of y)
|
|
1243
|
-
b.key && (b.sortable && (b.sort && (n.value[b.key] = b.sort), b.sortRaw && (r.value[b.key] = b.sortRaw)), b.filter && (
|
|
1243
|
+
b.key && (b.sortable && (b.sort && (n.value[b.key] = b.sort), b.sortRaw && (r.value[b.key] = b.sortRaw)), b.filter && (i.value[b.key] = b.filter));
|
|
1244
1244
|
});
|
|
1245
1245
|
const u = {
|
|
1246
1246
|
headers: a,
|
|
1247
1247
|
columns: l,
|
|
1248
1248
|
sortFunctions: n,
|
|
1249
1249
|
sortRawFunctions: r,
|
|
1250
|
-
filterFunctions:
|
|
1250
|
+
filterFunctions: i
|
|
1251
1251
|
};
|
|
1252
1252
|
return Y(it, u), u;
|
|
1253
1253
|
}
|
|
@@ -1289,11 +1289,11 @@ const gt = _({
|
|
|
1289
1289
|
} = Z(), {
|
|
1290
1290
|
toggleSort: n,
|
|
1291
1291
|
sortBy: r,
|
|
1292
|
-
isSorted:
|
|
1292
|
+
isSorted: i
|
|
1293
1293
|
} = st(), {
|
|
1294
1294
|
someSelected: u,
|
|
1295
1295
|
allSelected: s,
|
|
1296
|
-
selectAll:
|
|
1296
|
+
selectAll: o,
|
|
1297
1297
|
showSelectAll: c
|
|
1298
1298
|
} = ve(), {
|
|
1299
1299
|
columns: m,
|
|
@@ -1328,11 +1328,11 @@ const gt = _({
|
|
|
1328
1328
|
headers: d.value,
|
|
1329
1329
|
columns: m.value,
|
|
1330
1330
|
toggleSort: n,
|
|
1331
|
-
isSorted:
|
|
1331
|
+
isSorted: i,
|
|
1332
1332
|
sortBy: r.value,
|
|
1333
1333
|
someSelected: u.value,
|
|
1334
1334
|
allSelected: s.value,
|
|
1335
|
-
selectAll:
|
|
1335
|
+
selectAll: o,
|
|
1336
1336
|
getSortIcon: v
|
|
1337
1337
|
})), L = F(() => ["v-data-table__th", {
|
|
1338
1338
|
"v-data-table__th--sticky": e.sticky || e.fixedHeader
|
|
@@ -1348,7 +1348,7 @@ const gt = _({
|
|
|
1348
1348
|
align: g.align,
|
|
1349
1349
|
class: [{
|
|
1350
1350
|
"v-data-table__th--sortable": g.sortable && !e.disableSort,
|
|
1351
|
-
"v-data-table__th--sorted":
|
|
1351
|
+
"v-data-table__th--sorted": i(g),
|
|
1352
1352
|
"v-data-table__th--fixed": g.fixed
|
|
1353
1353
|
}, ...L.value],
|
|
1354
1354
|
style: {
|
|
@@ -1372,8 +1372,8 @@ const gt = _({
|
|
|
1372
1372
|
default: () => {
|
|
1373
1373
|
const M = `header.${g.key}`, X = {
|
|
1374
1374
|
column: g,
|
|
1375
|
-
selectAll:
|
|
1376
|
-
isSorted:
|
|
1375
|
+
selectAll: o,
|
|
1376
|
+
isSorted: i,
|
|
1377
1377
|
toggleSort: n,
|
|
1378
1378
|
sortBy: r.value,
|
|
1379
1379
|
someSelected: u.value,
|
|
@@ -1384,14 +1384,14 @@ const gt = _({
|
|
|
1384
1384
|
density: e.density,
|
|
1385
1385
|
modelValue: s.value,
|
|
1386
1386
|
indeterminate: u.value && !s.value,
|
|
1387
|
-
"onUpdate:modelValue":
|
|
1387
|
+
"onUpdate:modelValue": o
|
|
1388
1388
|
}, null)) : S("div", {
|
|
1389
1389
|
class: "v-data-table-header__content"
|
|
1390
1390
|
}, [S("span", null, [g.title]), g.sortable && !e.disableSort && k(Oe, {
|
|
1391
1391
|
key: "icon",
|
|
1392
1392
|
class: "v-data-table-header__sort-icon",
|
|
1393
1393
|
icon: v(g)
|
|
1394
|
-
}, null), e.multiSort &&
|
|
1394
|
+
}, null), e.multiSort && i(g) && S("div", {
|
|
1395
1395
|
key: "badge",
|
|
1396
1396
|
class: G(["v-data-table-header__sort-badge", ...V.value]),
|
|
1397
1397
|
style: ke(h.value)
|
|
@@ -1421,7 +1421,7 @@ const gt = _({
|
|
|
1421
1421
|
variant: "underlined",
|
|
1422
1422
|
"onClick:clear": () => r.value = [],
|
|
1423
1423
|
appendIcon: g.value,
|
|
1424
|
-
"onClick:append": () =>
|
|
1424
|
+
"onClick:append": () => o(!s.value)
|
|
1425
1425
|
}, {
|
|
1426
1426
|
chip: (w) => k(ta, {
|
|
1427
1427
|
onClick: w.item.raw?.sortable ? () => n(w.item.raw) : void 0,
|
|
@@ -1430,7 +1430,7 @@ const gt = _({
|
|
|
1430
1430
|
}
|
|
1431
1431
|
}, {
|
|
1432
1432
|
default: () => [w.item.title, k(Oe, {
|
|
1433
|
-
class: G(["v-data-table__td-sort-icon",
|
|
1433
|
+
class: G(["v-data-table__td-sort-icon", i(w.item.raw) && "v-data-table__td-sort-icon-active"]),
|
|
1434
1434
|
icon: v(w.item.raw),
|
|
1435
1435
|
size: "small"
|
|
1436
1436
|
}, null)]
|
|
@@ -1482,18 +1482,18 @@ const gt = _({
|
|
|
1482
1482
|
toggleGroup: n,
|
|
1483
1483
|
extractRows: r
|
|
1484
1484
|
} = qe(), {
|
|
1485
|
-
isSelected:
|
|
1485
|
+
isSelected: i,
|
|
1486
1486
|
isSomeSelected: u,
|
|
1487
1487
|
select: s
|
|
1488
1488
|
} = ve(), {
|
|
1489
|
-
columns:
|
|
1490
|
-
} = ge(), c = F(() => r([e.item])), m = C(() =>
|
|
1489
|
+
columns: o
|
|
1490
|
+
} = ge(), c = F(() => r([e.item])), m = C(() => o.value.length - (o.value.some((d) => d.key === "data-table-select") ? 1 : 0));
|
|
1491
1491
|
return () => S("tr", {
|
|
1492
1492
|
class: "v-data-table-group-header-row",
|
|
1493
1493
|
style: {
|
|
1494
1494
|
"--v-data-table-group-header-row-depth": e.item.depth
|
|
1495
1495
|
}
|
|
1496
|
-
}, [
|
|
1496
|
+
}, [o.value.map((d) => {
|
|
1497
1497
|
if (d.key === "data-table-group") {
|
|
1498
1498
|
const f = l(e.item) ? e.groupCollapseIcon : e.groupExpandIcon, y = () => n(e.item);
|
|
1499
1499
|
return a["data-table-group"]?.({
|
|
@@ -1515,7 +1515,7 @@ const gt = _({
|
|
|
1515
1515
|
}, null), S("span", null, [e.item.value]), S("span", null, [_e("("), c.value.length, _e(")")])]
|
|
1516
1516
|
});
|
|
1517
1517
|
} else if (d.key === "data-table-select") {
|
|
1518
|
-
const f =
|
|
1518
|
+
const f = i(c.value), y = u(c.value) && !f, b = (v) => s(c.value, v);
|
|
1519
1519
|
return a["data-table-select"]?.({
|
|
1520
1520
|
props: {
|
|
1521
1521
|
modelValue: f,
|
|
@@ -1566,10 +1566,10 @@ const gt = _({
|
|
|
1566
1566
|
mobile: n
|
|
1567
1567
|
} = fe(e, "v-data-table__tr"), {
|
|
1568
1568
|
isSelected: r,
|
|
1569
|
-
toggleSelect:
|
|
1569
|
+
toggleSelect: i,
|
|
1570
1570
|
someSelected: u,
|
|
1571
1571
|
allSelected: s,
|
|
1572
|
-
selectAll:
|
|
1572
|
+
selectAll: o
|
|
1573
1573
|
} = ve(), {
|
|
1574
1574
|
isExpanded: c,
|
|
1575
1575
|
toggleExpand: m
|
|
@@ -1595,12 +1595,12 @@ const gt = _({
|
|
|
1595
1595
|
value: de(h.columns, v.key),
|
|
1596
1596
|
column: v,
|
|
1597
1597
|
isSelected: r,
|
|
1598
|
-
toggleSelect:
|
|
1598
|
+
toggleSelect: i,
|
|
1599
1599
|
isExpanded: c,
|
|
1600
1600
|
toggleExpand: m
|
|
1601
1601
|
}, L = {
|
|
1602
1602
|
column: v,
|
|
1603
|
-
selectAll:
|
|
1603
|
+
selectAll: o,
|
|
1604
1604
|
isSorted: y,
|
|
1605
1605
|
toggleSort: d,
|
|
1606
1606
|
sortBy: f.value,
|
|
@@ -1644,13 +1644,13 @@ const gt = _({
|
|
|
1644
1644
|
props: {
|
|
1645
1645
|
disabled: !h.selectable,
|
|
1646
1646
|
modelValue: r([h]),
|
|
1647
|
-
onClick: re(() =>
|
|
1647
|
+
onClick: re(() => i(h), ["stop"])
|
|
1648
1648
|
}
|
|
1649
1649
|
}) ?? k(De, {
|
|
1650
1650
|
disabled: !h.selectable,
|
|
1651
1651
|
density: e.density,
|
|
1652
1652
|
modelValue: r([h]),
|
|
1653
|
-
onClick: re((T) =>
|
|
1653
|
+
onClick: re((T) => i(h, e.index, T), ["stop"])
|
|
1654
1654
|
}, null);
|
|
1655
1655
|
if (v.key === "data-table-expand")
|
|
1656
1656
|
return a["item.data-table-expand"]?.({
|
|
@@ -1711,11 +1711,11 @@ const gt = _({
|
|
|
1711
1711
|
columns: n
|
|
1712
1712
|
} = ge(), {
|
|
1713
1713
|
expandOnClick: r,
|
|
1714
|
-
toggleExpand:
|
|
1714
|
+
toggleExpand: i,
|
|
1715
1715
|
isExpanded: u
|
|
1716
1716
|
} = Ye(), {
|
|
1717
1717
|
isSelected: s,
|
|
1718
|
-
toggleSelect:
|
|
1718
|
+
toggleSelect: o
|
|
1719
1719
|
} = ve(), {
|
|
1720
1720
|
toggleGroup: c,
|
|
1721
1721
|
isGroupOpen: m
|
|
@@ -1743,9 +1743,9 @@ const gt = _({
|
|
|
1743
1743
|
item: b,
|
|
1744
1744
|
columns: n.value,
|
|
1745
1745
|
isExpanded: u,
|
|
1746
|
-
toggleExpand:
|
|
1746
|
+
toggleExpand: i,
|
|
1747
1747
|
isSelected: s,
|
|
1748
|
-
toggleSelect:
|
|
1748
|
+
toggleSelect: o,
|
|
1749
1749
|
toggleGroup: c,
|
|
1750
1750
|
isGroupOpen: m
|
|
1751
1751
|
};
|
|
@@ -1769,15 +1769,15 @@ const gt = _({
|
|
|
1769
1769
|
internalItem: b,
|
|
1770
1770
|
columns: n.value,
|
|
1771
1771
|
isExpanded: u,
|
|
1772
|
-
toggleExpand:
|
|
1772
|
+
toggleExpand: i,
|
|
1773
1773
|
isSelected: s,
|
|
1774
|
-
toggleSelect:
|
|
1774
|
+
toggleSelect: o
|
|
1775
1775
|
}, h = {
|
|
1776
1776
|
...V,
|
|
1777
1777
|
props: B({
|
|
1778
1778
|
key: `item_${b.key ?? b.index}`,
|
|
1779
1779
|
onClick: r.value ? () => {
|
|
1780
|
-
|
|
1780
|
+
i(b);
|
|
1781
1781
|
} : void 0,
|
|
1782
1782
|
index: v,
|
|
1783
1783
|
item: b,
|
|
@@ -1864,14 +1864,14 @@ const gt = _({
|
|
|
1864
1864
|
returnObject: Boolean
|
|
1865
1865
|
}, "DataTable-items");
|
|
1866
1866
|
function ja(e, t, a, l) {
|
|
1867
|
-
const n = e.returnObject ? t : ee(t, e.itemValue), r = ee(t, e.itemSelectable, !0),
|
|
1867
|
+
const n = e.returnObject ? t : ee(t, e.itemValue), r = ee(t, e.itemSelectable, !0), i = l.reduce((u, s) => (s.key != null && (u[s.key] = ee(t, s.value)), u), {});
|
|
1868
1868
|
return {
|
|
1869
1869
|
type: "item",
|
|
1870
1870
|
key: e.returnObject ? ee(t, e.itemValue) : n,
|
|
1871
1871
|
index: a,
|
|
1872
1872
|
value: n,
|
|
1873
1873
|
selectable: r,
|
|
1874
|
-
columns:
|
|
1874
|
+
columns: i,
|
|
1875
1875
|
raw: t
|
|
1876
1876
|
};
|
|
1877
1877
|
}
|
|
@@ -1925,11 +1925,11 @@ const Wa = _({
|
|
|
1925
1925
|
groupBy: n
|
|
1926
1926
|
} = ca(e), {
|
|
1927
1927
|
sortBy: r,
|
|
1928
|
-
multiSort:
|
|
1928
|
+
multiSort: i,
|
|
1929
1929
|
mustSort: u
|
|
1930
1930
|
} = Fa(e), {
|
|
1931
1931
|
page: s,
|
|
1932
|
-
itemsPerPage:
|
|
1932
|
+
itemsPerPage: o
|
|
1933
1933
|
} = ha(e), {
|
|
1934
1934
|
disableSort: c
|
|
1935
1935
|
} = Ot(e), {
|
|
@@ -1953,7 +1953,7 @@ const Wa = _({
|
|
|
1953
1953
|
toggleSort: I
|
|
1954
1954
|
} = Va({
|
|
1955
1955
|
sortBy: r,
|
|
1956
|
-
multiSort:
|
|
1956
|
+
multiSort: i,
|
|
1957
1957
|
mustSort: u,
|
|
1958
1958
|
page: s
|
|
1959
1959
|
}), {
|
|
@@ -1984,7 +1984,7 @@ const Wa = _({
|
|
|
1984
1984
|
setItemsPerPage: be
|
|
1985
1985
|
} = ya({
|
|
1986
1986
|
page: s,
|
|
1987
|
-
itemsPerPage:
|
|
1987
|
+
itemsPerPage: o,
|
|
1988
1988
|
itemsLength: w
|
|
1989
1989
|
}), {
|
|
1990
1990
|
paginatedItems: M
|
|
@@ -1992,7 +1992,7 @@ const Wa = _({
|
|
|
1992
1992
|
items: g,
|
|
1993
1993
|
startIndex: T,
|
|
1994
1994
|
stopIndex: N,
|
|
1995
|
-
itemsPerPage:
|
|
1995
|
+
itemsPerPage: o
|
|
1996
1996
|
}), X = F(() => L(M.value)), {
|
|
1997
1997
|
isSelected: he,
|
|
1998
1998
|
select: pt,
|
|
@@ -2009,7 +2009,7 @@ const Wa = _({
|
|
|
2009
2009
|
} = ua(e);
|
|
2010
2010
|
ma({
|
|
2011
2011
|
page: s,
|
|
2012
|
-
itemsPerPage:
|
|
2012
|
+
itemsPerPage: o,
|
|
2013
2013
|
sortBy: r,
|
|
2014
2014
|
groupBy: n,
|
|
2015
2015
|
search: V
|
|
@@ -2023,7 +2023,7 @@ const Wa = _({
|
|
|
2023
2023
|
});
|
|
2024
2024
|
const E = F(() => ({
|
|
2025
2025
|
page: s.value,
|
|
2026
|
-
itemsPerPage:
|
|
2026
|
+
itemsPerPage: o.value,
|
|
2027
2027
|
sortBy: r.value,
|
|
2028
2028
|
pageCount: le.value,
|
|
2029
2029
|
toggleSort: I,
|
|
@@ -2154,25 +2154,25 @@ const Qa = _({
|
|
|
2154
2154
|
backgroundColorClasses: n,
|
|
2155
2155
|
backgroundColorStyles: r
|
|
2156
2156
|
} = Je(() => e.color), {
|
|
2157
|
-
dimensionStyles:
|
|
2157
|
+
dimensionStyles: i
|
|
2158
2158
|
} = Zt(e), {
|
|
2159
2159
|
elevationClasses: u
|
|
2160
2160
|
} = qt(e), {
|
|
2161
2161
|
themeClasses: s
|
|
2162
2162
|
} = Ie(e), {
|
|
2163
|
-
t:
|
|
2163
|
+
t: o
|
|
2164
2164
|
} = Z(), c = F(() => me(z(e.type).join(",")));
|
|
2165
2165
|
return K(() => {
|
|
2166
2166
|
const m = !l.default || e.loading, d = e.boilerplate || !m ? {} : {
|
|
2167
2167
|
ariaLive: "polite",
|
|
2168
|
-
ariaLabel:
|
|
2168
|
+
ariaLabel: o(e.loadingText),
|
|
2169
2169
|
role: "alert"
|
|
2170
2170
|
};
|
|
2171
2171
|
return m ? S("div", B({
|
|
2172
2172
|
class: ["v-skeleton-loader", {
|
|
2173
2173
|
"v-skeleton-loader--boilerplate": e.boilerplate
|
|
2174
2174
|
}, s.value, n.value, u.value],
|
|
2175
|
-
style: [r.value,
|
|
2175
|
+
style: [r.value, i.value]
|
|
2176
2176
|
}, d, a), [c.value]) : S(U, null, [l.default?.()]);
|
|
2177
2177
|
}), {};
|
|
2178
2178
|
}
|
|
@@ -2195,35 +2195,31 @@ function Xa(e, t, a) {
|
|
|
2195
2195
|
}
|
|
2196
2196
|
function ll() {
|
|
2197
2197
|
const { advancedFiltersState: e, hardFiltersState: t } = aa(), a = Q("table_props"), l = j(), n = F(() => {
|
|
2198
|
-
const
|
|
2198
|
+
const i = Object.values(t.value).filter((o) => o.args).map((o) => o.args).reduce((o, c) => ({ ...o, ...c }), {}), u = { ...e.value, ...i };
|
|
2199
2199
|
let s = l.value;
|
|
2200
|
-
return u
|
|
2201
|
-
const c = u[
|
|
2200
|
+
return !u || Object.keys(u).length === 0 || Object.keys(u).forEach((o) => {
|
|
2201
|
+
const c = u[o].value, m = u[o]?.comparison ?? "=";
|
|
2202
2202
|
c && (s = s.filter((d) => {
|
|
2203
|
-
const f = a.headers.find((v) => (v.advancedFilter?.key ?? v.key) ===
|
|
2203
|
+
const f = a.headers.find((v) => (v.advancedFilter?.key ?? v.key) === o);
|
|
2204
|
+
if (!f) return !0;
|
|
2204
2205
|
let y = la(d);
|
|
2205
|
-
Object.hasOwn(f, "filterReturnValue") && typeof f.filterReturnValue == "function" && (y[
|
|
2206
|
-
value: d[
|
|
2206
|
+
Object.hasOwn(f, "filterReturnValue") && typeof f.filterReturnValue == "function" && (y[o] = f.filterReturnValue({
|
|
2207
|
+
value: d[o],
|
|
2207
2208
|
item: d
|
|
2208
2209
|
}));
|
|
2209
|
-
let b =
|
|
2210
|
-
|
|
2211
|
-
return r(b, c);
|
|
2212
|
-
if (typeof b == "number")
|
|
2213
|
-
return Xa(b, c, m);
|
|
2214
|
-
if (typeof b == "string")
|
|
2215
|
-
return Array.isArray(c) ? c.map((v) => v.toLowerCase()).includes(b.toLowerCase()) : b?.toLowerCase().includes(c.toLowerCase());
|
|
2210
|
+
let b = o.split(".").reduce((v, V) => v && v[V], y);
|
|
2211
|
+
return f.advancedFilter?.component === "datepicker" ? r(b, c) : typeof b == "number" ? Xa(b, c, m) : typeof b == "string" ? Array.isArray(c) ? c.map((v) => v.toLowerCase()).includes(b.toLowerCase()) : b?.toString().toLowerCase().includes(c.toString().toLowerCase()) : !0;
|
|
2216
2212
|
}));
|
|
2217
2213
|
}), s;
|
|
2218
|
-
}), r = (
|
|
2219
|
-
const s = Array.isArray(u) ? u : [u];
|
|
2220
|
-
return
|
|
2214
|
+
}), r = (i, u) => {
|
|
2215
|
+
const s = Array.isArray(u) ? u : [u], o = ie(s[0]).startOf("day").isSameOrBefore(ie(i).format()), c = ie(s[s.length - 1]).endOf("day").isSameOrAfter(ie(i).format());
|
|
2216
|
+
return o && c;
|
|
2221
2217
|
};
|
|
2222
2218
|
return ce(
|
|
2223
2219
|
() => a.data,
|
|
2224
|
-
async (
|
|
2225
|
-
const s =
|
|
2226
|
-
JSON.stringify(s) !== JSON.stringify(
|
|
2220
|
+
async (i, u) => {
|
|
2221
|
+
const s = i ?? [], o = u ?? [];
|
|
2222
|
+
JSON.stringify(s) !== JSON.stringify(o) && (l.value = i);
|
|
2227
2223
|
},
|
|
2228
2224
|
{ deep: !0, immediate: !0 }
|
|
2229
2225
|
), { tableData: l, filteredData: n };
|