@leaflink/stash 53.4.9 → 53.4.10
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/DataTable/index.js +577 -541
- package/dist/DataTable/index.js.map +1 -1
- package/dist/Table.js +116 -101
- package/dist/Table.js.map +1 -1
- package/dist/Table.vue.d.ts +21 -0
- package/dist/TableHeaderCell.js +43 -39
- package/dist/TableHeaderCell.js.map +1 -1
- package/dist/components.css +1 -1
- package/package.json +1 -1
package/dist/DataTable/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { D as
|
|
3
|
-
import { t as
|
|
4
|
-
import
|
|
5
|
-
import { _ as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import { _ as
|
|
1
|
+
import { defineComponent as ze, h as oe, isRef as Je, shallowRef as Ye, watch as He, ref as k, watchEffect as Qe, unref as z, inject as Ze, computed as M, toValue as q, useCssModule as be, useSlots as et, createElementBlock as j, openBlock as D, Fragment as U, createVNode as _e, createBlock as N, createCommentVNode as Fe, mergeProps as tt, createSlots as xe, withCtx as G, renderList as Q, normalizeStyle as $e, normalizeClass as Pe, renderSlot as Ie } from "vue";
|
|
2
|
+
import { D as Me } from "../DataView.keys-aSOnA4AD.js";
|
|
3
|
+
import { t as Z } from "../locale.js";
|
|
4
|
+
import ye from "../Checkbox.js";
|
|
5
|
+
import { _ as nt } from "../ChevronToggle.vue_vue_type_script_setup_true_lang-Ce_qOXfR.js";
|
|
6
|
+
import ot from "../Paginate.js";
|
|
7
|
+
import rt from "../TableCell.js";
|
|
8
|
+
import lt from "../TableHeaderCell.js";
|
|
9
|
+
import it from "../TableHeaderRow.js";
|
|
10
|
+
import st from "../TableRow.js";
|
|
11
|
+
import ut from "../Table.js";
|
|
12
|
+
import { _ as at } from "../_plugin-vue_export-helper-CHgC5LLL.js";
|
|
13
13
|
/**
|
|
14
14
|
* table-core
|
|
15
15
|
*
|
|
@@ -20,7 +20,7 @@ import { _ as st } from "../_plugin-vue_export-helper-CHgC5LLL.js";
|
|
|
20
20
|
*
|
|
21
21
|
* @license MIT
|
|
22
22
|
*/
|
|
23
|
-
function
|
|
23
|
+
function Fn() {
|
|
24
24
|
return {
|
|
25
25
|
accessor: (e, o) => typeof e == "function" ? {
|
|
26
26
|
...o,
|
|
@@ -33,24 +33,24 @@ function vn() {
|
|
|
33
33
|
group: (e) => e
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
|
-
function
|
|
36
|
+
function O(e, o) {
|
|
37
37
|
return typeof e == "function" ? e(o) : e;
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function y(e, o) {
|
|
40
40
|
return (t) => {
|
|
41
41
|
o.setState((n) => ({
|
|
42
42
|
...n,
|
|
43
|
-
[e]:
|
|
43
|
+
[e]: O(t, n[e])
|
|
44
44
|
}));
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
|
-
function
|
|
47
|
+
function re(e) {
|
|
48
48
|
return e instanceof Function;
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function gt(e) {
|
|
51
51
|
return Array.isArray(e) && e.every((o) => typeof o == "number");
|
|
52
52
|
}
|
|
53
|
-
function
|
|
53
|
+
function dt(e, o) {
|
|
54
54
|
const t = [], n = (r) => {
|
|
55
55
|
r.forEach((l) => {
|
|
56
56
|
t.push(l);
|
|
@@ -66,17 +66,17 @@ function C(e, o, t) {
|
|
|
66
66
|
let i;
|
|
67
67
|
t.key && t.debug && (i = Date.now());
|
|
68
68
|
const u = e(l);
|
|
69
|
-
if (!(u.length !== n.length || u.some((
|
|
69
|
+
if (!(u.length !== n.length || u.some((c, m) => n[m] !== c)))
|
|
70
70
|
return r;
|
|
71
71
|
n = u;
|
|
72
72
|
let g;
|
|
73
73
|
if (t.key && t.debug && (g = Date.now()), r = o(...u), t == null || t.onChange == null || t.onChange(r), t.key && t.debug && t != null && t.debug()) {
|
|
74
|
-
const
|
|
75
|
-
for (
|
|
76
|
-
|
|
77
|
-
return
|
|
74
|
+
const c = Math.round((Date.now() - i) * 100) / 100, m = Math.round((Date.now() - g) * 100) / 100, d = m / 16, s = (f, p) => {
|
|
75
|
+
for (f = String(f); f.length < p; )
|
|
76
|
+
f = " " + f;
|
|
77
|
+
return f;
|
|
78
78
|
};
|
|
79
|
-
console.info(`%c⏱ ${s(m, 5)} /${s(
|
|
79
|
+
console.info(`%c⏱ ${s(m, 5)} /${s(c, 5)} ms`, `
|
|
80
80
|
font-size: .6rem;
|
|
81
81
|
font-weight: bold;
|
|
82
82
|
color: hsl(${Math.max(0, Math.min(120 - 120 * d, 120))}deg 100% 31%);`, t == null ? void 0 : t.key);
|
|
@@ -94,7 +94,7 @@ function w(e, o, t, n) {
|
|
|
94
94
|
onChange: n
|
|
95
95
|
};
|
|
96
96
|
}
|
|
97
|
-
function
|
|
97
|
+
function ct(e, o, t, n) {
|
|
98
98
|
const r = () => {
|
|
99
99
|
var i;
|
|
100
100
|
return (i = l.getValue()) != null ? i : e.options.renderFallbackValue;
|
|
@@ -117,25 +117,25 @@ function gt(e, o, t, n) {
|
|
|
117
117
|
i.createCell == null || i.createCell(l, t, o, e);
|
|
118
118
|
}, {}), l;
|
|
119
119
|
}
|
|
120
|
-
function
|
|
120
|
+
function ft(e, o, t, n) {
|
|
121
121
|
var r, l;
|
|
122
122
|
const u = {
|
|
123
123
|
...e._getDefaultColumnDef(),
|
|
124
124
|
...o
|
|
125
125
|
}, a = u.accessorKey;
|
|
126
|
-
let g = (r = (l = u.id) != null ? l : a ? typeof String.prototype.replaceAll == "function" ? a.replaceAll(".", "_") : a.replace(/\./g, "_") : void 0) != null ? r : typeof u.header == "string" ? u.header : void 0,
|
|
127
|
-
if (u.accessorFn ?
|
|
126
|
+
let g = (r = (l = u.id) != null ? l : a ? typeof String.prototype.replaceAll == "function" ? a.replaceAll(".", "_") : a.replace(/\./g, "_") : void 0) != null ? r : typeof u.header == "string" ? u.header : void 0, c;
|
|
127
|
+
if (u.accessorFn ? c = u.accessorFn : a && (a.includes(".") ? c = (d) => {
|
|
128
128
|
let s = d;
|
|
129
129
|
for (const p of a.split(".")) {
|
|
130
|
-
var
|
|
131
|
-
s = (
|
|
130
|
+
var f;
|
|
131
|
+
s = (f = s) == null ? void 0 : f[p], process.env.NODE_ENV !== "production" && s === void 0 && console.warn(`"${p}" in deeply nested key "${a}" returned undefined.`);
|
|
132
132
|
}
|
|
133
133
|
return s;
|
|
134
|
-
} :
|
|
134
|
+
} : c = (d) => d[u.accessorKey]), !g)
|
|
135
135
|
throw process.env.NODE_ENV !== "production" ? new Error(u.accessorFn ? "Columns require an id when using an accessorFn" : "Columns require an id when using a non-string header") : new Error();
|
|
136
136
|
let m = {
|
|
137
137
|
id: `${String(g)}`,
|
|
138
|
-
accessorFn:
|
|
138
|
+
accessorFn: c,
|
|
139
139
|
parent: n,
|
|
140
140
|
depth: t,
|
|
141
141
|
columnDef: u,
|
|
@@ -147,8 +147,8 @@ function dt(e, o, t, n) {
|
|
|
147
147
|
getLeafColumns: C(() => [e._getOrderColumnsFn()], (d) => {
|
|
148
148
|
var s;
|
|
149
149
|
if ((s = m.columns) != null && s.length) {
|
|
150
|
-
let
|
|
151
|
-
return d(
|
|
150
|
+
let f = m.columns.flatMap((p) => p.getLeafColumns());
|
|
151
|
+
return d(f);
|
|
152
152
|
}
|
|
153
153
|
return [m];
|
|
154
154
|
}, w(e.options, "debugColumns", "column.getLeafColumns"))
|
|
@@ -157,8 +157,8 @@ function dt(e, o, t, n) {
|
|
|
157
157
|
d.createColumn == null || d.createColumn(m, e);
|
|
158
158
|
return m;
|
|
159
159
|
}
|
|
160
|
-
const
|
|
161
|
-
function
|
|
160
|
+
const I = "debugHeaders";
|
|
161
|
+
function Ve(e, o, t) {
|
|
162
162
|
var n;
|
|
163
163
|
let l = {
|
|
164
164
|
id: (n = t.id) != null ? n : o.id,
|
|
@@ -187,92 +187,92 @@ function Pe(e, o, t) {
|
|
|
187
187
|
i.createHeader == null || i.createHeader(l, e);
|
|
188
188
|
}), l;
|
|
189
189
|
}
|
|
190
|
-
const
|
|
190
|
+
const pt = {
|
|
191
191
|
createTable: (e) => {
|
|
192
192
|
e.getHeaderGroups = C(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (o, t, n, r) => {
|
|
193
193
|
var l, i;
|
|
194
194
|
const u = (l = n == null ? void 0 : n.map((m) => t.find((d) => d.id === m)).filter(Boolean)) != null ? l : [], a = (i = r == null ? void 0 : r.map((m) => t.find((d) => d.id === m)).filter(Boolean)) != null ? i : [], g = t.filter((m) => !(n != null && n.includes(m.id)) && !(r != null && r.includes(m.id)));
|
|
195
|
-
return
|
|
196
|
-
}, w(e.options,
|
|
195
|
+
return b(o, [...u, ...g, ...a], e);
|
|
196
|
+
}, w(e.options, I, "getHeaderGroups")), e.getCenterHeaderGroups = C(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (o, t, n, r) => (t = t.filter((l) => !(n != null && n.includes(l.id)) && !(r != null && r.includes(l.id))), b(o, t, e, "center")), w(e.options, I, "getCenterHeaderGroups")), e.getLeftHeaderGroups = C(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left], (o, t, n) => {
|
|
197
197
|
var r;
|
|
198
198
|
const l = (r = n == null ? void 0 : n.map((i) => t.find((u) => u.id === i)).filter(Boolean)) != null ? r : [];
|
|
199
|
-
return
|
|
200
|
-
}, w(e.options,
|
|
199
|
+
return b(o, l, e, "left");
|
|
200
|
+
}, w(e.options, I, "getLeftHeaderGroups")), e.getRightHeaderGroups = C(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.right], (o, t, n) => {
|
|
201
201
|
var r;
|
|
202
202
|
const l = (r = n == null ? void 0 : n.map((i) => t.find((u) => u.id === i)).filter(Boolean)) != null ? r : [];
|
|
203
|
-
return
|
|
204
|
-
}, w(e.options,
|
|
203
|
+
return b(o, l, e, "right");
|
|
204
|
+
}, w(e.options, I, "getRightHeaderGroups")), e.getFooterGroups = C(() => [e.getHeaderGroups()], (o) => [...o].reverse(), w(e.options, I, "getFooterGroups")), e.getLeftFooterGroups = C(() => [e.getLeftHeaderGroups()], (o) => [...o].reverse(), w(e.options, I, "getLeftFooterGroups")), e.getCenterFooterGroups = C(() => [e.getCenterHeaderGroups()], (o) => [...o].reverse(), w(e.options, I, "getCenterFooterGroups")), e.getRightFooterGroups = C(() => [e.getRightHeaderGroups()], (o) => [...o].reverse(), w(e.options, I, "getRightFooterGroups")), e.getFlatHeaders = C(() => [e.getHeaderGroups()], (o) => o.map((t) => t.headers).flat(), w(e.options, I, "getFlatHeaders")), e.getLeftFlatHeaders = C(() => [e.getLeftHeaderGroups()], (o) => o.map((t) => t.headers).flat(), w(e.options, I, "getLeftFlatHeaders")), e.getCenterFlatHeaders = C(() => [e.getCenterHeaderGroups()], (o) => o.map((t) => t.headers).flat(), w(e.options, I, "getCenterFlatHeaders")), e.getRightFlatHeaders = C(() => [e.getRightHeaderGroups()], (o) => o.map((t) => t.headers).flat(), w(e.options, I, "getRightFlatHeaders")), e.getCenterLeafHeaders = C(() => [e.getCenterFlatHeaders()], (o) => o.filter((t) => {
|
|
205
205
|
var n;
|
|
206
206
|
return !((n = t.subHeaders) != null && n.length);
|
|
207
|
-
}), w(e.options,
|
|
207
|
+
}), w(e.options, I, "getCenterLeafHeaders")), e.getLeftLeafHeaders = C(() => [e.getLeftFlatHeaders()], (o) => o.filter((t) => {
|
|
208
208
|
var n;
|
|
209
209
|
return !((n = t.subHeaders) != null && n.length);
|
|
210
|
-
}), w(e.options,
|
|
210
|
+
}), w(e.options, I, "getLeftLeafHeaders")), e.getRightLeafHeaders = C(() => [e.getRightFlatHeaders()], (o) => o.filter((t) => {
|
|
211
211
|
var n;
|
|
212
212
|
return !((n = t.subHeaders) != null && n.length);
|
|
213
|
-
}), w(e.options,
|
|
213
|
+
}), w(e.options, I, "getRightLeafHeaders")), e.getLeafHeaders = C(() => [e.getLeftHeaderGroups(), e.getCenterHeaderGroups(), e.getRightHeaderGroups()], (o, t, n) => {
|
|
214
214
|
var r, l, i, u, a, g;
|
|
215
|
-
return [...(r = (l = o[0]) == null ? void 0 : l.headers) != null ? r : [], ...(i = (u = t[0]) == null ? void 0 : u.headers) != null ? i : [], ...(a = (g = n[0]) == null ? void 0 : g.headers) != null ? a : []].map((
|
|
216
|
-
}, w(e.options,
|
|
215
|
+
return [...(r = (l = o[0]) == null ? void 0 : l.headers) != null ? r : [], ...(i = (u = t[0]) == null ? void 0 : u.headers) != null ? i : [], ...(a = (g = n[0]) == null ? void 0 : g.headers) != null ? a : []].map((c) => c.getLeafHeaders()).flat();
|
|
216
|
+
}, w(e.options, I, "getLeafHeaders"));
|
|
217
217
|
}
|
|
218
218
|
};
|
|
219
|
-
function
|
|
219
|
+
function b(e, o, t, n) {
|
|
220
220
|
var r, l;
|
|
221
221
|
let i = 0;
|
|
222
222
|
const u = function(d, s) {
|
|
223
|
-
s === void 0 && (s = 1), i = Math.max(i, s), d.filter((
|
|
223
|
+
s === void 0 && (s = 1), i = Math.max(i, s), d.filter((f) => f.getIsVisible()).forEach((f) => {
|
|
224
224
|
var p;
|
|
225
|
-
(p =
|
|
225
|
+
(p = f.columns) != null && p.length && u(f.columns, s + 1);
|
|
226
226
|
}, 0);
|
|
227
227
|
};
|
|
228
228
|
u(e);
|
|
229
229
|
let a = [];
|
|
230
230
|
const g = (d, s) => {
|
|
231
|
-
const
|
|
231
|
+
const f = {
|
|
232
232
|
depth: s,
|
|
233
233
|
id: [n, `${s}`].filter(Boolean).join("_"),
|
|
234
234
|
headers: []
|
|
235
235
|
}, p = [];
|
|
236
236
|
d.forEach((R) => {
|
|
237
|
-
const h = [...p].reverse()[0],
|
|
238
|
-
let
|
|
239
|
-
if (
|
|
237
|
+
const h = [...p].reverse()[0], _ = R.column.depth === f.depth;
|
|
238
|
+
let x, V = !1;
|
|
239
|
+
if (_ && R.column.parent ? x = R.column.parent : (x = R.column, V = !0), h && (h == null ? void 0 : h.column) === x)
|
|
240
240
|
h.subHeaders.push(R);
|
|
241
241
|
else {
|
|
242
|
-
const
|
|
243
|
-
id: [n, s,
|
|
244
|
-
isPlaceholder:
|
|
245
|
-
placeholderId:
|
|
242
|
+
const P = Ve(t, x, {
|
|
243
|
+
id: [n, s, x.id, R == null ? void 0 : R.id].filter(Boolean).join("_"),
|
|
244
|
+
isPlaceholder: V,
|
|
245
|
+
placeholderId: V ? `${p.filter((L) => L.column === x).length}` : void 0,
|
|
246
246
|
depth: s,
|
|
247
247
|
index: p.length
|
|
248
248
|
});
|
|
249
|
-
|
|
249
|
+
P.subHeaders.push(R), p.push(P);
|
|
250
250
|
}
|
|
251
|
-
|
|
252
|
-
}), a.push(
|
|
253
|
-
},
|
|
251
|
+
f.headers.push(R), R.headerGroup = f;
|
|
252
|
+
}), a.push(f), s > 0 && g(p, s - 1);
|
|
253
|
+
}, c = o.map((d, s) => Ve(t, d, {
|
|
254
254
|
depth: i,
|
|
255
255
|
index: s
|
|
256
256
|
}));
|
|
257
|
-
g(
|
|
258
|
-
const m = (d) => d.filter((
|
|
257
|
+
g(c, i - 1), a.reverse();
|
|
258
|
+
const m = (d) => d.filter((f) => f.column.getIsVisible()).map((f) => {
|
|
259
259
|
let p = 0, R = 0, h = [0];
|
|
260
|
-
|
|
260
|
+
f.subHeaders && f.subHeaders.length ? (h = [], m(f.subHeaders).forEach((x) => {
|
|
261
261
|
let {
|
|
262
|
-
colSpan:
|
|
263
|
-
rowSpan:
|
|
264
|
-
} =
|
|
265
|
-
p +=
|
|
262
|
+
colSpan: V,
|
|
263
|
+
rowSpan: P
|
|
264
|
+
} = x;
|
|
265
|
+
p += V, h.push(P);
|
|
266
266
|
})) : p = 1;
|
|
267
|
-
const
|
|
268
|
-
return R = R +
|
|
267
|
+
const _ = Math.min(...h);
|
|
268
|
+
return R = R + _, f.colSpan = p, f.rowSpan = R, {
|
|
269
269
|
colSpan: p,
|
|
270
270
|
rowSpan: R
|
|
271
271
|
};
|
|
272
272
|
});
|
|
273
273
|
return m((r = (l = a[0]) == null ? void 0 : l.headers) != null ? r : []), a;
|
|
274
274
|
}
|
|
275
|
-
const
|
|
275
|
+
const we = (e, o, t, n, r, l, i) => {
|
|
276
276
|
let u = {
|
|
277
277
|
id: o,
|
|
278
278
|
index: n,
|
|
@@ -300,73 +300,73 @@ const ce = (e, o, t, n, r, l, i) => {
|
|
|
300
300
|
return (g = u.getValue(a)) != null ? g : e.options.renderFallbackValue;
|
|
301
301
|
},
|
|
302
302
|
subRows: [],
|
|
303
|
-
getLeafRows: () =>
|
|
303
|
+
getLeafRows: () => dt(u.subRows, (a) => a.subRows),
|
|
304
304
|
getParentRow: () => u.parentId ? e.getRow(u.parentId, !0) : void 0,
|
|
305
305
|
getParentRows: () => {
|
|
306
306
|
let a = [], g = u;
|
|
307
307
|
for (; ; ) {
|
|
308
|
-
const
|
|
309
|
-
if (!
|
|
310
|
-
a.push(
|
|
308
|
+
const c = g.getParentRow();
|
|
309
|
+
if (!c) break;
|
|
310
|
+
a.push(c), g = c;
|
|
311
311
|
}
|
|
312
312
|
return a.reverse();
|
|
313
313
|
},
|
|
314
|
-
getAllCells: C(() => [e.getAllLeafColumns()], (a) => a.map((g) =>
|
|
315
|
-
_getAllCellsByColumnId: C(() => [u.getAllCells()], (a) => a.reduce((g,
|
|
314
|
+
getAllCells: C(() => [e.getAllLeafColumns()], (a) => a.map((g) => ct(e, u, g, g.id)), w(e.options, "debugRows", "getAllCells")),
|
|
315
|
+
_getAllCellsByColumnId: C(() => [u.getAllCells()], (a) => a.reduce((g, c) => (g[c.column.id] = c, g), {}), w(e.options, "debugRows", "getAllCellsByColumnId"))
|
|
316
316
|
};
|
|
317
317
|
for (let a = 0; a < e._features.length; a++) {
|
|
318
318
|
const g = e._features[a];
|
|
319
319
|
g == null || g.createRow == null || g.createRow(u, e);
|
|
320
320
|
}
|
|
321
321
|
return u;
|
|
322
|
-
},
|
|
322
|
+
}, mt = {
|
|
323
323
|
createColumn: (e, o) => {
|
|
324
324
|
e._getFacetedRowModel = o.options.getFacetedRowModel && o.options.getFacetedRowModel(o, e.id), e.getFacetedRowModel = () => e._getFacetedRowModel ? e._getFacetedRowModel() : o.getPreFilteredRowModel(), e._getFacetedUniqueValues = o.options.getFacetedUniqueValues && o.options.getFacetedUniqueValues(o, e.id), e.getFacetedUniqueValues = () => e._getFacetedUniqueValues ? e._getFacetedUniqueValues() : /* @__PURE__ */ new Map(), e._getFacetedMinMaxValues = o.options.getFacetedMinMaxValues && o.options.getFacetedMinMaxValues(o, e.id), e.getFacetedMinMaxValues = () => {
|
|
325
325
|
if (e._getFacetedMinMaxValues)
|
|
326
326
|
return e._getFacetedMinMaxValues();
|
|
327
327
|
};
|
|
328
328
|
}
|
|
329
|
-
},
|
|
329
|
+
}, Le = (e, o, t) => {
|
|
330
330
|
var n, r;
|
|
331
331
|
const l = t == null || (n = t.toString()) == null ? void 0 : n.toLowerCase();
|
|
332
332
|
return !!(!((r = e.getValue(o)) == null || (r = r.toString()) == null || (r = r.toLowerCase()) == null) && r.includes(l));
|
|
333
333
|
};
|
|
334
|
-
|
|
335
|
-
const
|
|
334
|
+
Le.autoRemove = (e) => A(e);
|
|
335
|
+
const Ge = (e, o, t) => {
|
|
336
336
|
var n;
|
|
337
337
|
return !!(!((n = e.getValue(o)) == null || (n = n.toString()) == null) && n.includes(t));
|
|
338
338
|
};
|
|
339
|
-
|
|
340
|
-
const
|
|
339
|
+
Ge.autoRemove = (e) => A(e);
|
|
340
|
+
const Oe = (e, o, t) => {
|
|
341
341
|
var n;
|
|
342
342
|
return ((n = e.getValue(o)) == null || (n = n.toString()) == null ? void 0 : n.toLowerCase()) === (t == null ? void 0 : t.toLowerCase());
|
|
343
343
|
};
|
|
344
|
-
|
|
345
|
-
const
|
|
344
|
+
Oe.autoRemove = (e) => A(e);
|
|
345
|
+
const Te = (e, o, t) => {
|
|
346
346
|
var n;
|
|
347
347
|
return (n = e.getValue(o)) == null ? void 0 : n.includes(t);
|
|
348
348
|
};
|
|
349
|
-
|
|
350
|
-
const
|
|
349
|
+
Te.autoRemove = (e) => A(e);
|
|
350
|
+
const Be = (e, o, t) => !t.some((n) => {
|
|
351
351
|
var r;
|
|
352
352
|
return !((r = e.getValue(o)) != null && r.includes(n));
|
|
353
353
|
});
|
|
354
|
-
|
|
355
|
-
const
|
|
354
|
+
Be.autoRemove = (e) => A(e) || !(e != null && e.length);
|
|
355
|
+
const ke = (e, o, t) => t.some((n) => {
|
|
356
356
|
var r;
|
|
357
357
|
return (r = e.getValue(o)) == null ? void 0 : r.includes(n);
|
|
358
358
|
});
|
|
359
|
-
|
|
360
|
-
const
|
|
361
|
-
|
|
362
|
-
const
|
|
363
|
-
|
|
364
|
-
const
|
|
359
|
+
ke.autoRemove = (e) => A(e) || !(e != null && e.length);
|
|
360
|
+
const Ne = (e, o, t) => e.getValue(o) === t;
|
|
361
|
+
Ne.autoRemove = (e) => A(e);
|
|
362
|
+
const qe = (e, o, t) => e.getValue(o) == t;
|
|
363
|
+
qe.autoRemove = (e) => A(e);
|
|
364
|
+
const Re = (e, o, t) => {
|
|
365
365
|
let [n, r] = t;
|
|
366
366
|
const l = e.getValue(o);
|
|
367
367
|
return l >= n && l <= r;
|
|
368
368
|
};
|
|
369
|
-
|
|
369
|
+
Re.resolveFilterValue = (e) => {
|
|
370
370
|
let [o, t] = e, n = typeof o != "number" ? parseFloat(o) : o, r = typeof t != "number" ? parseFloat(t) : t, l = o === null || Number.isNaN(n) ? -1 / 0 : n, i = t === null || Number.isNaN(r) ? 1 / 0 : r;
|
|
371
371
|
if (l > i) {
|
|
372
372
|
const u = l;
|
|
@@ -374,22 +374,22 @@ fe.resolveFilterValue = (e) => {
|
|
|
374
374
|
}
|
|
375
375
|
return [l, i];
|
|
376
376
|
};
|
|
377
|
-
|
|
378
|
-
const
|
|
379
|
-
includesString:
|
|
380
|
-
includesStringSensitive:
|
|
381
|
-
equalsString:
|
|
382
|
-
arrIncludes:
|
|
383
|
-
arrIncludesAll:
|
|
384
|
-
arrIncludesSome:
|
|
385
|
-
equals:
|
|
386
|
-
weakEquals:
|
|
387
|
-
inNumberRange:
|
|
377
|
+
Re.autoRemove = (e) => A(e) || A(e[0]) && A(e[1]);
|
|
378
|
+
const H = {
|
|
379
|
+
includesString: Le,
|
|
380
|
+
includesStringSensitive: Ge,
|
|
381
|
+
equalsString: Oe,
|
|
382
|
+
arrIncludes: Te,
|
|
383
|
+
arrIncludesAll: Be,
|
|
384
|
+
arrIncludesSome: ke,
|
|
385
|
+
equals: Ne,
|
|
386
|
+
weakEquals: qe,
|
|
387
|
+
inNumberRange: Re
|
|
388
388
|
};
|
|
389
|
-
function
|
|
389
|
+
function A(e) {
|
|
390
390
|
return e == null || e === "";
|
|
391
391
|
}
|
|
392
|
-
const
|
|
392
|
+
const St = {
|
|
393
393
|
getDefaultColumnDef: () => ({
|
|
394
394
|
filterFn: "auto"
|
|
395
395
|
}),
|
|
@@ -398,19 +398,19 @@ const pt = {
|
|
|
398
398
|
...e
|
|
399
399
|
}),
|
|
400
400
|
getDefaultOptions: (e) => ({
|
|
401
|
-
onColumnFiltersChange:
|
|
401
|
+
onColumnFiltersChange: y("columnFilters", e),
|
|
402
402
|
filterFromLeafRows: !1,
|
|
403
403
|
maxLeafRowFilterDepth: 100
|
|
404
404
|
}),
|
|
405
405
|
createColumn: (e, o) => {
|
|
406
406
|
e.getAutoFilterFn = () => {
|
|
407
407
|
const t = o.getCoreRowModel().flatRows[0], n = t == null ? void 0 : t.getValue(e.id);
|
|
408
|
-
return typeof n == "string" ?
|
|
408
|
+
return typeof n == "string" ? H.includesString : typeof n == "number" ? H.inNumberRange : typeof n == "boolean" || n !== null && typeof n == "object" ? H.equals : Array.isArray(n) ? H.arrIncludes : H.weakEquals;
|
|
409
409
|
}, e.getFilterFn = () => {
|
|
410
410
|
var t, n;
|
|
411
|
-
return
|
|
411
|
+
return re(e.columnDef.filterFn) ? e.columnDef.filterFn : e.columnDef.filterFn === "auto" ? e.getAutoFilterFn() : (
|
|
412
412
|
// @ts-ignore
|
|
413
|
-
(t = (n = o.options.filterFns) == null ? void 0 : n[e.columnDef.filterFn]) != null ? t :
|
|
413
|
+
(t = (n = o.options.filterFns) == null ? void 0 : n[e.columnDef.filterFn]) != null ? t : H[e.columnDef.filterFn]
|
|
414
414
|
);
|
|
415
415
|
}, e.getCanFilter = () => {
|
|
416
416
|
var t, n, r;
|
|
@@ -423,10 +423,10 @@ const pt = {
|
|
|
423
423
|
return (t = (n = o.getState().columnFilters) == null ? void 0 : n.findIndex((r) => r.id === e.id)) != null ? t : -1;
|
|
424
424
|
}, e.setFilterValue = (t) => {
|
|
425
425
|
o.setColumnFilters((n) => {
|
|
426
|
-
const r = e.getFilterFn(), l = n == null ? void 0 : n.find((
|
|
427
|
-
if (
|
|
426
|
+
const r = e.getFilterFn(), l = n == null ? void 0 : n.find((c) => c.id === e.id), i = O(t, l ? l.value : void 0);
|
|
427
|
+
if (Ee(r, i, e)) {
|
|
428
428
|
var u;
|
|
429
|
-
return (u = n == null ? void 0 : n.filter((
|
|
429
|
+
return (u = n == null ? void 0 : n.filter((c) => c.id !== e.id)) != null ? u : [];
|
|
430
430
|
}
|
|
431
431
|
const a = {
|
|
432
432
|
id: e.id,
|
|
@@ -434,7 +434,7 @@ const pt = {
|
|
|
434
434
|
};
|
|
435
435
|
if (l) {
|
|
436
436
|
var g;
|
|
437
|
-
return (g = n == null ? void 0 : n.map((
|
|
437
|
+
return (g = n == null ? void 0 : n.map((c) => c.id === e.id ? a : c)) != null ? g : [];
|
|
438
438
|
}
|
|
439
439
|
return n != null && n.length ? [...n, a] : [a];
|
|
440
440
|
});
|
|
@@ -447,11 +447,11 @@ const pt = {
|
|
|
447
447
|
e.setColumnFilters = (o) => {
|
|
448
448
|
const t = e.getAllLeafColumns(), n = (r) => {
|
|
449
449
|
var l;
|
|
450
|
-
return (l =
|
|
450
|
+
return (l = O(o, r)) == null ? void 0 : l.filter((i) => {
|
|
451
451
|
const u = t.find((a) => a.id === i.id);
|
|
452
452
|
if (u) {
|
|
453
453
|
const a = u.getFilterFn();
|
|
454
|
-
if (
|
|
454
|
+
if (Ee(a, i.value, u))
|
|
455
455
|
return !1;
|
|
456
456
|
}
|
|
457
457
|
return !0;
|
|
@@ -464,57 +464,57 @@ const pt = {
|
|
|
464
464
|
}, e.getPreFilteredRowModel = () => e.getCoreRowModel(), e.getFilteredRowModel = () => (!e._getFilteredRowModel && e.options.getFilteredRowModel && (e._getFilteredRowModel = e.options.getFilteredRowModel(e)), e.options.manualFiltering || !e._getFilteredRowModel ? e.getPreFilteredRowModel() : e._getFilteredRowModel());
|
|
465
465
|
}
|
|
466
466
|
};
|
|
467
|
-
function
|
|
467
|
+
function Ee(e, o, t) {
|
|
468
468
|
return (e && e.autoRemove ? e.autoRemove(o, t) : !1) || typeof o > "u" || typeof o == "string" && !o;
|
|
469
469
|
}
|
|
470
|
-
const
|
|
470
|
+
const Ct = (e, o, t) => t.reduce((n, r) => {
|
|
471
471
|
const l = r.getValue(e);
|
|
472
472
|
return n + (typeof l == "number" ? l : 0);
|
|
473
|
-
}, 0),
|
|
473
|
+
}, 0), wt = (e, o, t) => {
|
|
474
474
|
let n;
|
|
475
475
|
return t.forEach((r) => {
|
|
476
476
|
const l = r.getValue(e);
|
|
477
477
|
l != null && (n > l || n === void 0 && l >= l) && (n = l);
|
|
478
478
|
}), n;
|
|
479
|
-
},
|
|
479
|
+
}, Rt = (e, o, t) => {
|
|
480
480
|
let n;
|
|
481
481
|
return t.forEach((r) => {
|
|
482
482
|
const l = r.getValue(e);
|
|
483
483
|
l != null && (n < l || n === void 0 && l >= l) && (n = l);
|
|
484
484
|
}), n;
|
|
485
|
-
},
|
|
485
|
+
}, ht = (e, o, t) => {
|
|
486
486
|
let n, r;
|
|
487
487
|
return t.forEach((l) => {
|
|
488
488
|
const i = l.getValue(e);
|
|
489
489
|
i != null && (n === void 0 ? i >= i && (n = r = i) : (n > i && (n = i), r < i && (r = i)));
|
|
490
490
|
}), [n, r];
|
|
491
|
-
},
|
|
491
|
+
}, vt = (e, o) => {
|
|
492
492
|
let t = 0, n = 0;
|
|
493
493
|
if (o.forEach((r) => {
|
|
494
494
|
let l = r.getValue(e);
|
|
495
495
|
l != null && (l = +l) >= l && (++t, n += l);
|
|
496
496
|
}), t) return n / t;
|
|
497
|
-
},
|
|
497
|
+
}, _t = (e, o) => {
|
|
498
498
|
if (!o.length)
|
|
499
499
|
return;
|
|
500
500
|
const t = o.map((l) => l.getValue(e));
|
|
501
|
-
if (!
|
|
501
|
+
if (!gt(t))
|
|
502
502
|
return;
|
|
503
503
|
if (t.length === 1)
|
|
504
504
|
return t[0];
|
|
505
505
|
const n = Math.floor(t.length / 2), r = t.sort((l, i) => l - i);
|
|
506
506
|
return t.length % 2 !== 0 ? r[n] : (r[n - 1] + r[n]) / 2;
|
|
507
|
-
},
|
|
508
|
-
sum:
|
|
509
|
-
min:
|
|
510
|
-
max:
|
|
511
|
-
extent:
|
|
512
|
-
mean:
|
|
513
|
-
median:
|
|
514
|
-
unique:
|
|
515
|
-
uniqueCount:
|
|
516
|
-
count:
|
|
517
|
-
},
|
|
507
|
+
}, Ft = (e, o) => Array.from(new Set(o.map((t) => t.getValue(e))).values()), xt = (e, o) => new Set(o.map((t) => t.getValue(e))).size, $t = (e, o) => o.length, le = {
|
|
508
|
+
sum: Ct,
|
|
509
|
+
min: wt,
|
|
510
|
+
max: Rt,
|
|
511
|
+
extent: ht,
|
|
512
|
+
mean: vt,
|
|
513
|
+
median: _t,
|
|
514
|
+
unique: Ft,
|
|
515
|
+
uniqueCount: xt,
|
|
516
|
+
count: $t
|
|
517
|
+
}, Pt = {
|
|
518
518
|
getDefaultColumnDef: () => ({
|
|
519
519
|
aggregatedCell: (e) => {
|
|
520
520
|
var o, t;
|
|
@@ -527,7 +527,7 @@ const mt = (e, o, t) => t.reduce((n, r) => {
|
|
|
527
527
|
...e
|
|
528
528
|
}),
|
|
529
529
|
getDefaultOptions: (e) => ({
|
|
530
|
-
onGroupingChange:
|
|
530
|
+
onGroupingChange: y("grouping", e),
|
|
531
531
|
groupedColumnMode: "reorder"
|
|
532
532
|
}),
|
|
533
533
|
createColumn: (e, o) => {
|
|
@@ -550,14 +550,14 @@ const mt = (e, o, t) => t.reduce((n, r) => {
|
|
|
550
550
|
}, e.getAutoAggregationFn = () => {
|
|
551
551
|
const t = o.getCoreRowModel().flatRows[0], n = t == null ? void 0 : t.getValue(e.id);
|
|
552
552
|
if (typeof n == "number")
|
|
553
|
-
return
|
|
553
|
+
return le.sum;
|
|
554
554
|
if (Object.prototype.toString.call(n) === "[object Date]")
|
|
555
|
-
return
|
|
555
|
+
return le.extent;
|
|
556
556
|
}, e.getAggregationFn = () => {
|
|
557
557
|
var t, n;
|
|
558
558
|
if (!e)
|
|
559
559
|
throw new Error();
|
|
560
|
-
return
|
|
560
|
+
return re(e.columnDef.aggregationFn) ? e.columnDef.aggregationFn : e.columnDef.aggregationFn === "auto" ? e.getAutoAggregationFn() : (t = (n = o.options.aggregationFns) == null ? void 0 : n[e.columnDef.aggregationFn]) != null ? t : le[e.columnDef.aggregationFn];
|
|
561
561
|
};
|
|
562
562
|
},
|
|
563
563
|
createTable: (e) => {
|
|
@@ -581,27 +581,27 @@ const mt = (e, o, t) => t.reduce((n, r) => {
|
|
|
581
581
|
};
|
|
582
582
|
}
|
|
583
583
|
};
|
|
584
|
-
function
|
|
584
|
+
function It(e, o, t) {
|
|
585
585
|
if (!(o != null && o.length) || !t)
|
|
586
586
|
return e;
|
|
587
587
|
const n = e.filter((l) => !o.includes(l.id));
|
|
588
588
|
return t === "remove" ? n : [...o.map((l) => e.find((i) => i.id === l)).filter(Boolean), ...n];
|
|
589
589
|
}
|
|
590
|
-
const
|
|
590
|
+
const Mt = {
|
|
591
591
|
getInitialState: (e) => ({
|
|
592
592
|
columnOrder: [],
|
|
593
593
|
...e
|
|
594
594
|
}),
|
|
595
595
|
getDefaultOptions: (e) => ({
|
|
596
|
-
onColumnOrderChange:
|
|
596
|
+
onColumnOrderChange: y("columnOrder", e)
|
|
597
597
|
}),
|
|
598
598
|
createColumn: (e, o) => {
|
|
599
|
-
e.getIndex = C((t) => [
|
|
599
|
+
e.getIndex = C((t) => [K(o, t)], (t) => t.findIndex((n) => n.id === e.id), w(o.options, "debugColumns", "getIndex")), e.getIsFirstColumn = (t) => {
|
|
600
600
|
var n;
|
|
601
|
-
return ((n =
|
|
601
|
+
return ((n = K(o, t)[0]) == null ? void 0 : n.id) === e.id;
|
|
602
602
|
}, e.getIsLastColumn = (t) => {
|
|
603
603
|
var n;
|
|
604
|
-
const r =
|
|
604
|
+
const r = K(o, t);
|
|
605
605
|
return ((n = r[r.length - 1]) == null ? void 0 : n.id) === e.id;
|
|
606
606
|
};
|
|
607
607
|
},
|
|
@@ -616,24 +616,24 @@ const Pt = {
|
|
|
616
616
|
else {
|
|
617
617
|
const i = [...o], u = [...r];
|
|
618
618
|
for (; u.length && i.length; ) {
|
|
619
|
-
const a = i.shift(), g = u.findIndex((
|
|
619
|
+
const a = i.shift(), g = u.findIndex((c) => c.id === a);
|
|
620
620
|
g > -1 && l.push(u.splice(g, 1)[0]);
|
|
621
621
|
}
|
|
622
622
|
l = [...l, ...u];
|
|
623
623
|
}
|
|
624
|
-
return
|
|
624
|
+
return It(l, t, n);
|
|
625
625
|
}, w(e.options, "debugTable", "_getOrderColumnsFn"));
|
|
626
626
|
}
|
|
627
|
-
},
|
|
627
|
+
}, ie = () => ({
|
|
628
628
|
left: [],
|
|
629
629
|
right: []
|
|
630
|
-
}),
|
|
630
|
+
}), yt = {
|
|
631
631
|
getInitialState: (e) => ({
|
|
632
|
-
columnPinning:
|
|
632
|
+
columnPinning: ie(),
|
|
633
633
|
...e
|
|
634
634
|
}),
|
|
635
635
|
getDefaultOptions: (e) => ({
|
|
636
|
-
onColumnPinningChange:
|
|
636
|
+
onColumnPinningChange: y("columnPinning", e)
|
|
637
637
|
}),
|
|
638
638
|
createColumn: (e, o) => {
|
|
639
639
|
e.pin = (t) => {
|
|
@@ -648,10 +648,10 @@ const Pt = {
|
|
|
648
648
|
};
|
|
649
649
|
}
|
|
650
650
|
if (t === "left") {
|
|
651
|
-
var g,
|
|
651
|
+
var g, c;
|
|
652
652
|
return {
|
|
653
653
|
left: [...((g = r == null ? void 0 : r.left) != null ? g : []).filter((m) => !(n != null && n.includes(m))), ...n],
|
|
654
|
-
right: ((
|
|
654
|
+
right: ((c = r == null ? void 0 : r.right) != null ? c : []).filter((m) => !(n != null && n.includes(m)))
|
|
655
655
|
};
|
|
656
656
|
}
|
|
657
657
|
return {
|
|
@@ -689,7 +689,7 @@ const Pt = {
|
|
|
689
689
|
createTable: (e) => {
|
|
690
690
|
e.setColumnPinning = (o) => e.options.onColumnPinningChange == null ? void 0 : e.options.onColumnPinningChange(o), e.resetColumnPinning = (o) => {
|
|
691
691
|
var t, n;
|
|
692
|
-
return e.setColumnPinning(o ?
|
|
692
|
+
return e.setColumnPinning(o ? ie() : (t = (n = e.initialState) == null ? void 0 : n.columnPinning) != null ? t : ie());
|
|
693
693
|
}, e.getIsSomeColumnsPinned = (o) => {
|
|
694
694
|
var t;
|
|
695
695
|
const n = e.getState().columnPinning;
|
|
@@ -704,39 +704,39 @@ const Pt = {
|
|
|
704
704
|
}, w(e.options, "debugColumns", "getCenterLeafColumns"));
|
|
705
705
|
}
|
|
706
706
|
};
|
|
707
|
-
function
|
|
707
|
+
function Vt(e) {
|
|
708
708
|
return e || (typeof document < "u" ? document : null);
|
|
709
709
|
}
|
|
710
|
-
const
|
|
710
|
+
const ee = {
|
|
711
711
|
size: 150,
|
|
712
712
|
minSize: 20,
|
|
713
713
|
maxSize: Number.MAX_SAFE_INTEGER
|
|
714
|
-
},
|
|
714
|
+
}, se = () => ({
|
|
715
715
|
startOffset: null,
|
|
716
716
|
startSize: null,
|
|
717
717
|
deltaOffset: null,
|
|
718
718
|
deltaPercentage: null,
|
|
719
719
|
isResizingColumn: !1,
|
|
720
720
|
columnSizingStart: []
|
|
721
|
-
}),
|
|
722
|
-
getDefaultColumnDef: () =>
|
|
721
|
+
}), Et = {
|
|
722
|
+
getDefaultColumnDef: () => ee,
|
|
723
723
|
getInitialState: (e) => ({
|
|
724
724
|
columnSizing: {},
|
|
725
|
-
columnSizingInfo:
|
|
725
|
+
columnSizingInfo: se(),
|
|
726
726
|
...e
|
|
727
727
|
}),
|
|
728
728
|
getDefaultOptions: (e) => ({
|
|
729
729
|
columnResizeMode: "onEnd",
|
|
730
730
|
columnResizeDirection: "ltr",
|
|
731
|
-
onColumnSizingChange:
|
|
732
|
-
onColumnSizingInfoChange:
|
|
731
|
+
onColumnSizingChange: y("columnSizing", e),
|
|
732
|
+
onColumnSizingInfoChange: y("columnSizingInfo", e)
|
|
733
733
|
}),
|
|
734
734
|
createColumn: (e, o) => {
|
|
735
735
|
e.getSize = () => {
|
|
736
736
|
var t, n, r;
|
|
737
737
|
const l = o.getState().columnSizing[e.id];
|
|
738
|
-
return Math.min(Math.max((t = e.columnDef.minSize) != null ? t :
|
|
739
|
-
}, e.getStart = C((t) => [t,
|
|
738
|
+
return Math.min(Math.max((t = e.columnDef.minSize) != null ? t : ee.minSize, (n = l ?? e.columnDef.size) != null ? n : ee.size), (r = e.columnDef.maxSize) != null ? r : ee.maxSize);
|
|
739
|
+
}, e.getStart = C((t) => [t, K(o, t), o.getState().columnSizing], (t, n) => n.slice(0, e.getIndex(t)).reduce((r, l) => r + l.getSize(), 0), w(o.options, "debugColumns", "getStart")), e.getAfter = C((t) => [t, K(o, t), o.getState().columnSizing], (t, n) => n.slice(e.getIndex(t) + 1).reduce((r, l) => r + l.getSize(), 0), w(o.options, "debugColumns", "getAfter")), e.resetSize = () => {
|
|
740
740
|
o.setColumnSizing((t) => {
|
|
741
741
|
let {
|
|
742
742
|
[e.id]: n,
|
|
@@ -770,27 +770,27 @@ const W = {
|
|
|
770
770
|
}, e.getResizeHandler = (t) => {
|
|
771
771
|
const n = o.getColumn(e.column.id), r = n == null ? void 0 : n.getCanResize();
|
|
772
772
|
return (l) => {
|
|
773
|
-
if (!n || !r || (l.persist == null || l.persist(),
|
|
773
|
+
if (!n || !r || (l.persist == null || l.persist(), ue(l) && l.touches && l.touches.length > 1))
|
|
774
774
|
return;
|
|
775
|
-
const i = e.getSize(), u = e ? e.getLeafHeaders().map((h) => [h.column.id, h.column.getSize()]) : [[n.id, n.getSize()]], a =
|
|
776
|
-
typeof
|
|
777
|
-
var
|
|
778
|
-
const
|
|
779
|
-
return
|
|
780
|
-
let [
|
|
781
|
-
g[
|
|
775
|
+
const i = e.getSize(), u = e ? e.getLeafHeaders().map((h) => [h.column.id, h.column.getSize()]) : [[n.id, n.getSize()]], a = ue(l) ? Math.round(l.touches[0].clientX) : l.clientX, g = {}, c = (h, _) => {
|
|
776
|
+
typeof _ == "number" && (o.setColumnSizingInfo((x) => {
|
|
777
|
+
var V, P;
|
|
778
|
+
const L = o.options.columnResizeDirection === "rtl" ? -1 : 1, J = (_ - ((V = x == null ? void 0 : x.startOffset) != null ? V : 0)) * L, Y = Math.max(J / ((P = x == null ? void 0 : x.startSize) != null ? P : 0), -0.999999);
|
|
779
|
+
return x.columnSizingStart.forEach((S) => {
|
|
780
|
+
let [v, F] = S;
|
|
781
|
+
g[v] = Math.round(Math.max(F + F * Y, 0) * 100) / 100;
|
|
782
782
|
}), {
|
|
783
|
-
...
|
|
784
|
-
deltaOffset:
|
|
785
|
-
deltaPercentage:
|
|
783
|
+
...x,
|
|
784
|
+
deltaOffset: J,
|
|
785
|
+
deltaPercentage: Y
|
|
786
786
|
};
|
|
787
|
-
}), (o.options.columnResizeMode === "onChange" || h === "end") && o.setColumnSizing((
|
|
788
|
-
...
|
|
787
|
+
}), (o.options.columnResizeMode === "onChange" || h === "end") && o.setColumnSizing((x) => ({
|
|
788
|
+
...x,
|
|
789
789
|
...g
|
|
790
790
|
})));
|
|
791
|
-
}, m = (h) =>
|
|
792
|
-
|
|
793
|
-
...
|
|
791
|
+
}, m = (h) => c("move", h), d = (h) => {
|
|
792
|
+
c("end", h), o.setColumnSizingInfo((_) => ({
|
|
793
|
+
..._,
|
|
794
794
|
isResizingColumn: !1,
|
|
795
795
|
startOffset: null,
|
|
796
796
|
startSize: null,
|
|
@@ -798,21 +798,21 @@ const W = {
|
|
|
798
798
|
deltaPercentage: null,
|
|
799
799
|
columnSizingStart: []
|
|
800
800
|
}));
|
|
801
|
-
}, s =
|
|
801
|
+
}, s = Vt(t), f = {
|
|
802
802
|
moveHandler: (h) => m(h.clientX),
|
|
803
803
|
upHandler: (h) => {
|
|
804
|
-
s == null || s.removeEventListener("mousemove",
|
|
804
|
+
s == null || s.removeEventListener("mousemove", f.moveHandler), s == null || s.removeEventListener("mouseup", f.upHandler), d(h.clientX);
|
|
805
805
|
}
|
|
806
806
|
}, p = {
|
|
807
807
|
moveHandler: (h) => (h.cancelable && (h.preventDefault(), h.stopPropagation()), m(h.touches[0].clientX), !1),
|
|
808
808
|
upHandler: (h) => {
|
|
809
|
-
var
|
|
810
|
-
s == null || s.removeEventListener("touchmove", p.moveHandler), s == null || s.removeEventListener("touchend", p.upHandler), h.cancelable && (h.preventDefault(), h.stopPropagation()), d((
|
|
809
|
+
var _;
|
|
810
|
+
s == null || s.removeEventListener("touchmove", p.moveHandler), s == null || s.removeEventListener("touchend", p.upHandler), h.cancelable && (h.preventDefault(), h.stopPropagation()), d((_ = h.touches[0]) == null ? void 0 : _.clientX);
|
|
811
811
|
}
|
|
812
|
-
}, R =
|
|
812
|
+
}, R = Dt() ? {
|
|
813
813
|
passive: !1
|
|
814
814
|
} : !1;
|
|
815
|
-
|
|
815
|
+
ue(l) ? (s == null || s.addEventListener("touchmove", p.moveHandler, R), s == null || s.addEventListener("touchend", p.upHandler, R)) : (s == null || s.addEventListener("mousemove", f.moveHandler, R), s == null || s.addEventListener("mouseup", f.upHandler, R)), o.setColumnSizingInfo((h) => ({
|
|
816
816
|
...h,
|
|
817
817
|
startOffset: a,
|
|
818
818
|
startSize: i,
|
|
@@ -830,7 +830,7 @@ const W = {
|
|
|
830
830
|
e.setColumnSizing(o ? {} : (t = e.initialState.columnSizing) != null ? t : {});
|
|
831
831
|
}, e.resetHeaderSizeInfo = (o) => {
|
|
832
832
|
var t;
|
|
833
|
-
e.setColumnSizingInfo(o ?
|
|
833
|
+
e.setColumnSizingInfo(o ? se() : (t = e.initialState.columnSizingInfo) != null ? t : se());
|
|
834
834
|
}, e.getTotalSize = () => {
|
|
835
835
|
var o, t;
|
|
836
836
|
return (o = (t = e.getHeaderGroups()[0]) == null ? void 0 : t.headers.reduce((n, r) => n + r.getSize(), 0)) != null ? o : 0;
|
|
@@ -846,9 +846,9 @@ const W = {
|
|
|
846
846
|
};
|
|
847
847
|
}
|
|
848
848
|
};
|
|
849
|
-
let
|
|
850
|
-
function
|
|
851
|
-
if (typeof
|
|
849
|
+
let te = null;
|
|
850
|
+
function Dt() {
|
|
851
|
+
if (typeof te == "boolean") return te;
|
|
852
852
|
let e = !1;
|
|
853
853
|
try {
|
|
854
854
|
const o = {
|
|
@@ -861,18 +861,18 @@ function Vt() {
|
|
|
861
861
|
} catch {
|
|
862
862
|
e = !1;
|
|
863
863
|
}
|
|
864
|
-
return
|
|
864
|
+
return te = e, te;
|
|
865
865
|
}
|
|
866
|
-
function
|
|
866
|
+
function ue(e) {
|
|
867
867
|
return e.type === "touchstart";
|
|
868
868
|
}
|
|
869
|
-
const
|
|
869
|
+
const At = {
|
|
870
870
|
getInitialState: (e) => ({
|
|
871
871
|
columnVisibility: {},
|
|
872
872
|
...e
|
|
873
873
|
}),
|
|
874
874
|
getDefaultOptions: (e) => ({
|
|
875
|
-
onColumnVisibilityChange:
|
|
875
|
+
onColumnVisibilityChange: y("columnVisibility", e)
|
|
876
876
|
}),
|
|
877
877
|
createColumn: (e, o) => {
|
|
878
878
|
e.toggleVisibility = (t) => {
|
|
@@ -911,23 +911,23 @@ const Et = {
|
|
|
911
911
|
};
|
|
912
912
|
}
|
|
913
913
|
};
|
|
914
|
-
function
|
|
914
|
+
function K(e, o) {
|
|
915
915
|
return o ? o === "center" ? e.getCenterVisibleLeafColumns() : o === "left" ? e.getLeftVisibleLeafColumns() : e.getRightVisibleLeafColumns() : e.getVisibleLeafColumns();
|
|
916
916
|
}
|
|
917
|
-
const
|
|
917
|
+
const zt = {
|
|
918
918
|
createTable: (e) => {
|
|
919
919
|
e._getGlobalFacetedRowModel = e.options.getFacetedRowModel && e.options.getFacetedRowModel(e, "__global__"), e.getGlobalFacetedRowModel = () => e.options.manualFiltering || !e._getGlobalFacetedRowModel ? e.getPreFilteredRowModel() : e._getGlobalFacetedRowModel(), e._getGlobalFacetedUniqueValues = e.options.getFacetedUniqueValues && e.options.getFacetedUniqueValues(e, "__global__"), e.getGlobalFacetedUniqueValues = () => e._getGlobalFacetedUniqueValues ? e._getGlobalFacetedUniqueValues() : /* @__PURE__ */ new Map(), e._getGlobalFacetedMinMaxValues = e.options.getFacetedMinMaxValues && e.options.getFacetedMinMaxValues(e, "__global__"), e.getGlobalFacetedMinMaxValues = () => {
|
|
920
920
|
if (e._getGlobalFacetedMinMaxValues)
|
|
921
921
|
return e._getGlobalFacetedMinMaxValues();
|
|
922
922
|
};
|
|
923
923
|
}
|
|
924
|
-
},
|
|
924
|
+
}, Ht = {
|
|
925
925
|
getInitialState: (e) => ({
|
|
926
926
|
globalFilter: void 0,
|
|
927
927
|
...e
|
|
928
928
|
}),
|
|
929
929
|
getDefaultOptions: (e) => ({
|
|
930
|
-
onGlobalFilterChange:
|
|
930
|
+
onGlobalFilterChange: y("globalFilter", e),
|
|
931
931
|
globalFilterFn: "auto",
|
|
932
932
|
getColumnCanGlobalFilter: (o) => {
|
|
933
933
|
var t;
|
|
@@ -942,25 +942,25 @@ const Dt = {
|
|
|
942
942
|
};
|
|
943
943
|
},
|
|
944
944
|
createTable: (e) => {
|
|
945
|
-
e.getGlobalAutoFilterFn = () =>
|
|
945
|
+
e.getGlobalAutoFilterFn = () => H.includesString, e.getGlobalFilterFn = () => {
|
|
946
946
|
var o, t;
|
|
947
947
|
const {
|
|
948
948
|
globalFilterFn: n
|
|
949
949
|
} = e.options;
|
|
950
|
-
return
|
|
950
|
+
return re(n) ? n : n === "auto" ? e.getGlobalAutoFilterFn() : (o = (t = e.options.filterFns) == null ? void 0 : t[n]) != null ? o : H[n];
|
|
951
951
|
}, e.setGlobalFilter = (o) => {
|
|
952
952
|
e.options.onGlobalFilterChange == null || e.options.onGlobalFilterChange(o);
|
|
953
953
|
}, e.resetGlobalFilter = (o) => {
|
|
954
954
|
e.setGlobalFilter(o ? void 0 : e.initialState.globalFilter);
|
|
955
955
|
};
|
|
956
956
|
}
|
|
957
|
-
},
|
|
957
|
+
}, Lt = {
|
|
958
958
|
getInitialState: (e) => ({
|
|
959
959
|
expanded: {},
|
|
960
960
|
...e
|
|
961
961
|
}),
|
|
962
962
|
getDefaultOptions: (e) => ({
|
|
963
|
-
onExpandedChange:
|
|
963
|
+
onExpandedChange: y("expanded", e),
|
|
964
964
|
paginateExpandedRows: !0
|
|
965
965
|
}),
|
|
966
966
|
createTable: (e) => {
|
|
@@ -1041,19 +1041,19 @@ const Dt = {
|
|
|
1041
1041
|
};
|
|
1042
1042
|
};
|
|
1043
1043
|
}
|
|
1044
|
-
},
|
|
1045
|
-
pageIndex:
|
|
1046
|
-
pageSize:
|
|
1047
|
-
}),
|
|
1044
|
+
}, fe = 0, pe = 10, ae = () => ({
|
|
1045
|
+
pageIndex: fe,
|
|
1046
|
+
pageSize: pe
|
|
1047
|
+
}), Gt = {
|
|
1048
1048
|
getInitialState: (e) => ({
|
|
1049
1049
|
...e,
|
|
1050
1050
|
pagination: {
|
|
1051
|
-
...
|
|
1051
|
+
...ae(),
|
|
1052
1052
|
...e == null ? void 0 : e.pagination
|
|
1053
1053
|
}
|
|
1054
1054
|
}),
|
|
1055
1055
|
getDefaultOptions: (e) => ({
|
|
1056
|
-
onPaginationChange:
|
|
1056
|
+
onPaginationChange: y("pagination", e)
|
|
1057
1057
|
}),
|
|
1058
1058
|
createTable: (e) => {
|
|
1059
1059
|
let o = !1, t = !1;
|
|
@@ -1072,14 +1072,14 @@ const Dt = {
|
|
|
1072
1072
|
});
|
|
1073
1073
|
}
|
|
1074
1074
|
}, e.setPagination = (n) => {
|
|
1075
|
-
const r = (l) =>
|
|
1075
|
+
const r = (l) => O(n, l);
|
|
1076
1076
|
return e.options.onPaginationChange == null ? void 0 : e.options.onPaginationChange(r);
|
|
1077
1077
|
}, e.resetPagination = (n) => {
|
|
1078
1078
|
var r;
|
|
1079
|
-
e.setPagination(n ?
|
|
1079
|
+
e.setPagination(n ? ae() : (r = e.initialState.pagination) != null ? r : ae());
|
|
1080
1080
|
}, e.setPageIndex = (n) => {
|
|
1081
1081
|
e.setPagination((r) => {
|
|
1082
|
-
let l =
|
|
1082
|
+
let l = O(n, r.pageIndex);
|
|
1083
1083
|
const i = typeof e.options.pageCount > "u" || e.options.pageCount === -1 ? Number.MAX_SAFE_INTEGER : e.options.pageCount - 1;
|
|
1084
1084
|
return l = Math.max(0, Math.min(l, i)), {
|
|
1085
1085
|
...r,
|
|
@@ -1088,13 +1088,13 @@ const Dt = {
|
|
|
1088
1088
|
});
|
|
1089
1089
|
}, e.resetPageIndex = (n) => {
|
|
1090
1090
|
var r, l;
|
|
1091
|
-
e.setPageIndex(n ?
|
|
1091
|
+
e.setPageIndex(n ? fe : (r = (l = e.initialState) == null || (l = l.pagination) == null ? void 0 : l.pageIndex) != null ? r : fe);
|
|
1092
1092
|
}, e.resetPageSize = (n) => {
|
|
1093
1093
|
var r, l;
|
|
1094
|
-
e.setPageSize(n ?
|
|
1094
|
+
e.setPageSize(n ? pe : (r = (l = e.initialState) == null || (l = l.pagination) == null ? void 0 : l.pageSize) != null ? r : pe);
|
|
1095
1095
|
}, e.setPageSize = (n) => {
|
|
1096
1096
|
e.setPagination((r) => {
|
|
1097
|
-
const l = Math.max(1,
|
|
1097
|
+
const l = Math.max(1, O(n, r.pageSize)), i = r.pageSize * r.pageIndex, u = Math.floor(i / l);
|
|
1098
1098
|
return {
|
|
1099
1099
|
...r,
|
|
1100
1100
|
pageIndex: u,
|
|
@@ -1103,7 +1103,7 @@ const Dt = {
|
|
|
1103
1103
|
});
|
|
1104
1104
|
}, e.setPageCount = (n) => e.setPagination((r) => {
|
|
1105
1105
|
var l;
|
|
1106
|
-
let i =
|
|
1106
|
+
let i = O(n, (l = e.options.pageCount) != null ? l : -1);
|
|
1107
1107
|
return typeof i == "number" && (i = Math.max(-1, i)), {
|
|
1108
1108
|
...r,
|
|
1109
1109
|
pageCount: i
|
|
@@ -1124,16 +1124,16 @@ const Dt = {
|
|
|
1124
1124
|
return (n = e.options.rowCount) != null ? n : e.getPrePaginationRowModel().rows.length;
|
|
1125
1125
|
};
|
|
1126
1126
|
}
|
|
1127
|
-
},
|
|
1127
|
+
}, ge = () => ({
|
|
1128
1128
|
top: [],
|
|
1129
1129
|
bottom: []
|
|
1130
|
-
}),
|
|
1130
|
+
}), Ot = {
|
|
1131
1131
|
getInitialState: (e) => ({
|
|
1132
|
-
rowPinning:
|
|
1132
|
+
rowPinning: ge(),
|
|
1133
1133
|
...e
|
|
1134
1134
|
}),
|
|
1135
1135
|
getDefaultOptions: (e) => ({
|
|
1136
|
-
onRowPinningChange:
|
|
1136
|
+
onRowPinningChange: y("rowPinning", e)
|
|
1137
1137
|
}),
|
|
1138
1138
|
createRow: (e, o) => {
|
|
1139
1139
|
e.pin = (t, n, r) => {
|
|
@@ -1149,7 +1149,7 @@ const Dt = {
|
|
|
1149
1149
|
return g;
|
|
1150
1150
|
}) : [], u = /* @__PURE__ */ new Set([...i, e.id, ...l]);
|
|
1151
1151
|
o.setRowPinning((a) => {
|
|
1152
|
-
var g,
|
|
1152
|
+
var g, c;
|
|
1153
1153
|
if (t === "bottom") {
|
|
1154
1154
|
var m, d;
|
|
1155
1155
|
return {
|
|
@@ -1158,15 +1158,15 @@ const Dt = {
|
|
|
1158
1158
|
};
|
|
1159
1159
|
}
|
|
1160
1160
|
if (t === "top") {
|
|
1161
|
-
var s,
|
|
1161
|
+
var s, f;
|
|
1162
1162
|
return {
|
|
1163
1163
|
top: [...((s = a == null ? void 0 : a.top) != null ? s : []).filter((p) => !(u != null && u.has(p))), ...Array.from(u)],
|
|
1164
|
-
bottom: ((
|
|
1164
|
+
bottom: ((f = a == null ? void 0 : a.bottom) != null ? f : []).filter((p) => !(u != null && u.has(p)))
|
|
1165
1165
|
};
|
|
1166
1166
|
}
|
|
1167
1167
|
return {
|
|
1168
1168
|
top: ((g = a == null ? void 0 : a.top) != null ? g : []).filter((p) => !(u != null && u.has(p))),
|
|
1169
|
-
bottom: ((
|
|
1169
|
+
bottom: ((c = a == null ? void 0 : a.bottom) != null ? c : []).filter((p) => !(u != null && u.has(p)))
|
|
1170
1170
|
};
|
|
1171
1171
|
});
|
|
1172
1172
|
}, e.getCanPin = () => {
|
|
@@ -1198,7 +1198,7 @@ const Dt = {
|
|
|
1198
1198
|
createTable: (e) => {
|
|
1199
1199
|
e.setRowPinning = (o) => e.options.onRowPinningChange == null ? void 0 : e.options.onRowPinningChange(o), e.resetRowPinning = (o) => {
|
|
1200
1200
|
var t, n;
|
|
1201
|
-
return e.setRowPinning(o ?
|
|
1201
|
+
return e.setRowPinning(o ? ge() : (t = (n = e.initialState) == null ? void 0 : n.rowPinning) != null ? t : ge());
|
|
1202
1202
|
}, e.getIsSomeRowsPinned = (o) => {
|
|
1203
1203
|
var t;
|
|
1204
1204
|
const n = e.getState().rowPinning;
|
|
@@ -1228,13 +1228,13 @@ const Dt = {
|
|
|
1228
1228
|
return o.filter((l) => !r.has(l.id));
|
|
1229
1229
|
}, w(e.options, "debugRows", "getCenterRows"));
|
|
1230
1230
|
}
|
|
1231
|
-
},
|
|
1231
|
+
}, Tt = {
|
|
1232
1232
|
getInitialState: (e) => ({
|
|
1233
1233
|
rowSelection: {},
|
|
1234
1234
|
...e
|
|
1235
1235
|
}),
|
|
1236
1236
|
getDefaultOptions: (e) => ({
|
|
1237
|
-
onRowSelectionChange:
|
|
1237
|
+
onRowSelectionChange: y("rowSelection", e),
|
|
1238
1238
|
enableRowSelection: !0,
|
|
1239
1239
|
enableMultiRowSelection: !0,
|
|
1240
1240
|
enableSubRowSelection: !0
|
|
@@ -1263,17 +1263,17 @@ const Dt = {
|
|
|
1263
1263
|
...t
|
|
1264
1264
|
};
|
|
1265
1265
|
return e.getRowModel().rows.forEach((l) => {
|
|
1266
|
-
|
|
1266
|
+
me(r, l.id, n, !0, e);
|
|
1267
1267
|
}), r;
|
|
1268
|
-
}), e.getPreSelectedRowModel = () => e.getCoreRowModel(), e.getSelectedRowModel = C(() => [e.getState().rowSelection, e.getCoreRowModel()], (o, t) => Object.keys(o).length ?
|
|
1268
|
+
}), e.getPreSelectedRowModel = () => e.getCoreRowModel(), e.getSelectedRowModel = C(() => [e.getState().rowSelection, e.getCoreRowModel()], (o, t) => Object.keys(o).length ? de(e, t) : {
|
|
1269
1269
|
rows: [],
|
|
1270
1270
|
flatRows: [],
|
|
1271
1271
|
rowsById: {}
|
|
1272
|
-
}, w(e.options, "debugTable", "getSelectedRowModel")), e.getFilteredSelectedRowModel = C(() => [e.getState().rowSelection, e.getFilteredRowModel()], (o, t) => Object.keys(o).length ?
|
|
1272
|
+
}, w(e.options, "debugTable", "getSelectedRowModel")), e.getFilteredSelectedRowModel = C(() => [e.getState().rowSelection, e.getFilteredRowModel()], (o, t) => Object.keys(o).length ? de(e, t) : {
|
|
1273
1273
|
rows: [],
|
|
1274
1274
|
flatRows: [],
|
|
1275
1275
|
rowsById: {}
|
|
1276
|
-
}, w(e.options, "debugTable", "getFilteredSelectedRowModel")), e.getGroupedSelectedRowModel = C(() => [e.getState().rowSelection, e.getSortedRowModel()], (o, t) => Object.keys(o).length ?
|
|
1276
|
+
}, w(e.options, "debugTable", "getFilteredSelectedRowModel")), e.getGroupedSelectedRowModel = C(() => [e.getState().rowSelection, e.getSortedRowModel()], (o, t) => Object.keys(o).length ? de(e, t) : {
|
|
1277
1277
|
rows: [],
|
|
1278
1278
|
flatRows: [],
|
|
1279
1279
|
rowsById: {}
|
|
@@ -1312,23 +1312,23 @@ const Dt = {
|
|
|
1312
1312
|
const u = {
|
|
1313
1313
|
...l
|
|
1314
1314
|
};
|
|
1315
|
-
return
|
|
1315
|
+
return me(u, e.id, t, (i = n == null ? void 0 : n.selectChildren) != null ? i : !0, o), u;
|
|
1316
1316
|
});
|
|
1317
1317
|
}, e.getIsSelected = () => {
|
|
1318
1318
|
const {
|
|
1319
1319
|
rowSelection: t
|
|
1320
1320
|
} = o.getState();
|
|
1321
|
-
return
|
|
1321
|
+
return he(e, t);
|
|
1322
1322
|
}, e.getIsSomeSelected = () => {
|
|
1323
1323
|
const {
|
|
1324
1324
|
rowSelection: t
|
|
1325
1325
|
} = o.getState();
|
|
1326
|
-
return
|
|
1326
|
+
return Se(e, t) === "some";
|
|
1327
1327
|
}, e.getIsAllSubRowsSelected = () => {
|
|
1328
1328
|
const {
|
|
1329
1329
|
rowSelection: t
|
|
1330
1330
|
} = o.getState();
|
|
1331
|
-
return
|
|
1331
|
+
return Se(e, t) === "all";
|
|
1332
1332
|
}, e.getCanSelect = () => {
|
|
1333
1333
|
var t;
|
|
1334
1334
|
return typeof o.options.enableRowSelection == "function" ? o.options.enableRowSelection(e) : (t = o.options.enableRowSelection) != null ? t : !0;
|
|
@@ -1346,20 +1346,20 @@ const Dt = {
|
|
|
1346
1346
|
};
|
|
1347
1347
|
};
|
|
1348
1348
|
}
|
|
1349
|
-
},
|
|
1349
|
+
}, me = (e, o, t, n, r) => {
|
|
1350
1350
|
var l;
|
|
1351
1351
|
const i = r.getRow(o, !0);
|
|
1352
|
-
t ? (i.getCanMultiSelect() || Object.keys(e).forEach((u) => delete e[u]), i.getCanSelect() && (e[o] = !0)) : delete e[o], n && (l = i.subRows) != null && l.length && i.getCanSelectSubRows() && i.subRows.forEach((u) =>
|
|
1352
|
+
t ? (i.getCanMultiSelect() || Object.keys(e).forEach((u) => delete e[u]), i.getCanSelect() && (e[o] = !0)) : delete e[o], n && (l = i.subRows) != null && l.length && i.getCanSelectSubRows() && i.subRows.forEach((u) => me(e, u.id, t, n, r));
|
|
1353
1353
|
};
|
|
1354
|
-
function
|
|
1354
|
+
function de(e, o) {
|
|
1355
1355
|
const t = e.getState().rowSelection, n = [], r = {}, l = function(i, u) {
|
|
1356
1356
|
return i.map((a) => {
|
|
1357
1357
|
var g;
|
|
1358
|
-
const
|
|
1359
|
-
if (
|
|
1358
|
+
const c = he(a, t);
|
|
1359
|
+
if (c && (n.push(a), r[a.id] = a), (g = a.subRows) != null && g.length && (a = {
|
|
1360
1360
|
...a,
|
|
1361
1361
|
subRows: l(a.subRows)
|
|
1362
|
-
}),
|
|
1362
|
+
}), c)
|
|
1363
1363
|
return a;
|
|
1364
1364
|
}).filter(Boolean);
|
|
1365
1365
|
};
|
|
@@ -1369,33 +1369,33 @@ function le(e, o) {
|
|
|
1369
1369
|
rowsById: r
|
|
1370
1370
|
};
|
|
1371
1371
|
}
|
|
1372
|
-
function
|
|
1372
|
+
function he(e, o) {
|
|
1373
1373
|
var t;
|
|
1374
1374
|
return (t = o[e.id]) != null ? t : !1;
|
|
1375
1375
|
}
|
|
1376
|
-
function
|
|
1376
|
+
function Se(e, o, t) {
|
|
1377
1377
|
var n;
|
|
1378
1378
|
if (!((n = e.subRows) != null && n.length)) return !1;
|
|
1379
1379
|
let r = !0, l = !1;
|
|
1380
1380
|
return e.subRows.forEach((i) => {
|
|
1381
|
-
if (!(l && !r) && (i.getCanSelect() && (
|
|
1382
|
-
const u =
|
|
1381
|
+
if (!(l && !r) && (i.getCanSelect() && (he(i, o) ? l = !0 : r = !1), i.subRows && i.subRows.length)) {
|
|
1382
|
+
const u = Se(i, o);
|
|
1383
1383
|
u === "all" ? l = !0 : (u === "some" && (l = !0), r = !1);
|
|
1384
1384
|
}
|
|
1385
1385
|
}), r ? "all" : l ? "some" : !1;
|
|
1386
1386
|
}
|
|
1387
|
-
const
|
|
1387
|
+
const Ce = /([0-9]+)/gm, Bt = (e, o, t) => je(B(e.getValue(t)).toLowerCase(), B(o.getValue(t)).toLowerCase()), kt = (e, o, t) => je(B(e.getValue(t)), B(o.getValue(t))), Nt = (e, o, t) => ve(B(e.getValue(t)).toLowerCase(), B(o.getValue(t)).toLowerCase()), qt = (e, o, t) => ve(B(e.getValue(t)), B(o.getValue(t))), jt = (e, o, t) => {
|
|
1388
1388
|
const n = e.getValue(t), r = o.getValue(t);
|
|
1389
1389
|
return n > r ? 1 : n < r ? -1 : 0;
|
|
1390
|
-
},
|
|
1391
|
-
function
|
|
1390
|
+
}, Ut = (e, o, t) => ve(e.getValue(t), o.getValue(t));
|
|
1391
|
+
function ve(e, o) {
|
|
1392
1392
|
return e === o ? 0 : e > o ? 1 : -1;
|
|
1393
1393
|
}
|
|
1394
|
-
function
|
|
1394
|
+
function B(e) {
|
|
1395
1395
|
return typeof e == "number" ? isNaN(e) || e === 1 / 0 || e === -1 / 0 ? "" : String(e) : typeof e == "string" ? e : "";
|
|
1396
1396
|
}
|
|
1397
|
-
function
|
|
1398
|
-
const t = e.split(
|
|
1397
|
+
function je(e, o) {
|
|
1398
|
+
const t = e.split(Ce).filter(Boolean), n = o.split(Ce).filter(Boolean);
|
|
1399
1399
|
for (; t.length && n.length; ) {
|
|
1400
1400
|
const r = t.shift(), l = n.shift(), i = parseInt(r, 10), u = parseInt(l, 10), a = [i, u].sort();
|
|
1401
1401
|
if (isNaN(a[0])) {
|
|
@@ -1414,14 +1414,14 @@ function Be(e, o) {
|
|
|
1414
1414
|
}
|
|
1415
1415
|
return t.length - n.length;
|
|
1416
1416
|
}
|
|
1417
|
-
const
|
|
1418
|
-
alphanumeric:
|
|
1419
|
-
alphanumericCaseSensitive:
|
|
1420
|
-
text:
|
|
1421
|
-
textCaseSensitive:
|
|
1422
|
-
datetime:
|
|
1423
|
-
basic:
|
|
1424
|
-
},
|
|
1417
|
+
const X = {
|
|
1418
|
+
alphanumeric: Bt,
|
|
1419
|
+
alphanumericCaseSensitive: kt,
|
|
1420
|
+
text: Nt,
|
|
1421
|
+
textCaseSensitive: qt,
|
|
1422
|
+
datetime: jt,
|
|
1423
|
+
basic: Ut
|
|
1424
|
+
}, Xt = {
|
|
1425
1425
|
getInitialState: (e) => ({
|
|
1426
1426
|
sorting: [],
|
|
1427
1427
|
...e
|
|
@@ -1431,7 +1431,7 @@ const N = {
|
|
|
1431
1431
|
sortUndefined: 1
|
|
1432
1432
|
}),
|
|
1433
1433
|
getDefaultOptions: (e) => ({
|
|
1434
|
-
onSortingChange:
|
|
1434
|
+
onSortingChange: y("sorting", e),
|
|
1435
1435
|
isMultiSortEvent: (o) => o.shiftKey
|
|
1436
1436
|
}),
|
|
1437
1437
|
createColumn: (e, o) => {
|
|
@@ -1441,11 +1441,11 @@ const N = {
|
|
|
1441
1441
|
for (const r of t) {
|
|
1442
1442
|
const l = r == null ? void 0 : r.getValue(e.id);
|
|
1443
1443
|
if (Object.prototype.toString.call(l) === "[object Date]")
|
|
1444
|
-
return
|
|
1445
|
-
if (typeof l == "string" && (n = !0, l.split(
|
|
1446
|
-
return
|
|
1444
|
+
return X.datetime;
|
|
1445
|
+
if (typeof l == "string" && (n = !0, l.split(Ce).length > 1))
|
|
1446
|
+
return X.alphanumeric;
|
|
1447
1447
|
}
|
|
1448
|
-
return n ?
|
|
1448
|
+
return n ? X.text : X.basic;
|
|
1449
1449
|
}, e.getAutoSortDir = () => {
|
|
1450
1450
|
const t = o.getFilteredRowModel().flatRows[0];
|
|
1451
1451
|
return typeof (t == null ? void 0 : t.getValue(e.id)) == "string" ? "asc" : "desc";
|
|
@@ -1453,22 +1453,22 @@ const N = {
|
|
|
1453
1453
|
var t, n;
|
|
1454
1454
|
if (!e)
|
|
1455
1455
|
throw new Error();
|
|
1456
|
-
return
|
|
1456
|
+
return re(e.columnDef.sortingFn) ? e.columnDef.sortingFn : e.columnDef.sortingFn === "auto" ? e.getAutoSortingFn() : (t = (n = o.options.sortingFns) == null ? void 0 : n[e.columnDef.sortingFn]) != null ? t : X[e.columnDef.sortingFn];
|
|
1457
1457
|
}, e.toggleSorting = (t, n) => {
|
|
1458
1458
|
const r = e.getNextSortingOrder(), l = typeof t < "u" && t !== null;
|
|
1459
1459
|
o.setSorting((i) => {
|
|
1460
1460
|
const u = i == null ? void 0 : i.find((s) => s.id === e.id), a = i == null ? void 0 : i.findIndex((s) => s.id === e.id);
|
|
1461
|
-
let g = [],
|
|
1462
|
-
if (i != null && i.length && e.getCanMultiSort() && n ? u ?
|
|
1461
|
+
let g = [], c, m = l ? t : r === "desc";
|
|
1462
|
+
if (i != null && i.length && e.getCanMultiSort() && n ? u ? c = "toggle" : c = "add" : i != null && i.length && a !== i.length - 1 ? c = "replace" : u ? c = "toggle" : c = "replace", c === "toggle" && (l || r || (c = "remove")), c === "add") {
|
|
1463
1463
|
var d;
|
|
1464
1464
|
g = [...i, {
|
|
1465
1465
|
id: e.id,
|
|
1466
1466
|
desc: m
|
|
1467
1467
|
}], g.splice(0, g.length - ((d = o.options.maxMultiSortColCount) != null ? d : Number.MAX_SAFE_INTEGER));
|
|
1468
|
-
} else
|
|
1468
|
+
} else c === "toggle" ? g = i.map((s) => s.id === e.id ? {
|
|
1469
1469
|
...s,
|
|
1470
1470
|
desc: m
|
|
1471
|
-
} : s) :
|
|
1471
|
+
} : s) : c === "remove" ? g = i.filter((s) => s.id !== e.id) : g = [{
|
|
1472
1472
|
id: e.id,
|
|
1473
1473
|
desc: m
|
|
1474
1474
|
}];
|
|
@@ -1510,30 +1510,30 @@ const N = {
|
|
|
1510
1510
|
e.setSorting(o ? [] : (t = (n = e.initialState) == null ? void 0 : n.sorting) != null ? t : []);
|
|
1511
1511
|
}, e.getPreSortedRowModel = () => e.getGroupedRowModel(), e.getSortedRowModel = () => (!e._getSortedRowModel && e.options.getSortedRowModel && (e._getSortedRowModel = e.options.getSortedRowModel(e)), e.options.manualSorting || !e._getSortedRowModel ? e.getPreSortedRowModel() : e._getSortedRowModel());
|
|
1512
1512
|
}
|
|
1513
|
-
},
|
|
1514
|
-
ct,
|
|
1515
|
-
Et,
|
|
1516
|
-
Pt,
|
|
1517
|
-
It,
|
|
1518
|
-
ft,
|
|
1513
|
+
}, Wt = [
|
|
1519
1514
|
pt,
|
|
1520
|
-
Dt,
|
|
1521
|
-
//depends on ColumnFaceting
|
|
1522
1515
|
At,
|
|
1516
|
+
Mt,
|
|
1517
|
+
yt,
|
|
1518
|
+
mt,
|
|
1519
|
+
St,
|
|
1520
|
+
zt,
|
|
1521
|
+
//depends on ColumnFaceting
|
|
1522
|
+
Ht,
|
|
1523
1523
|
//depends on ColumnFiltering
|
|
1524
|
-
|
|
1525
|
-
|
|
1524
|
+
Xt,
|
|
1525
|
+
Pt,
|
|
1526
1526
|
//depends on RowSorting
|
|
1527
|
-
Ht,
|
|
1528
|
-
zt,
|
|
1529
|
-
Gt,
|
|
1530
1527
|
Lt,
|
|
1531
|
-
|
|
1528
|
+
Gt,
|
|
1529
|
+
Ot,
|
|
1530
|
+
Tt,
|
|
1531
|
+
Et
|
|
1532
1532
|
];
|
|
1533
|
-
function
|
|
1533
|
+
function Kt(e) {
|
|
1534
1534
|
var o, t;
|
|
1535
1535
|
process.env.NODE_ENV !== "production" && (e.debugAll || e.debugTable) && console.info("Creating Table Instance...");
|
|
1536
|
-
const n = [...
|
|
1536
|
+
const n = [...Wt, ...(o = e._features) != null ? o : []];
|
|
1537
1537
|
let r = {
|
|
1538
1538
|
_features: n
|
|
1539
1539
|
};
|
|
@@ -1550,7 +1550,7 @@ function Xt(e) {
|
|
|
1550
1550
|
a = (s = d.getInitialState == null ? void 0 : d.getInitialState(a)) != null ? s : a;
|
|
1551
1551
|
});
|
|
1552
1552
|
const g = [];
|
|
1553
|
-
let
|
|
1553
|
+
let c = !1;
|
|
1554
1554
|
const m = {
|
|
1555
1555
|
_features: n,
|
|
1556
1556
|
options: {
|
|
@@ -1559,10 +1559,10 @@ function Xt(e) {
|
|
|
1559
1559
|
},
|
|
1560
1560
|
initialState: a,
|
|
1561
1561
|
_queue: (d) => {
|
|
1562
|
-
g.push(d),
|
|
1562
|
+
g.push(d), c || (c = !0, Promise.resolve().then(() => {
|
|
1563
1563
|
for (; g.length; )
|
|
1564
1564
|
g.shift()();
|
|
1565
|
-
|
|
1565
|
+
c = !1;
|
|
1566
1566
|
}).catch((s) => setTimeout(() => {
|
|
1567
1567
|
throw s;
|
|
1568
1568
|
})));
|
|
@@ -1571,16 +1571,16 @@ function Xt(e) {
|
|
|
1571
1571
|
r.setState(r.initialState);
|
|
1572
1572
|
},
|
|
1573
1573
|
setOptions: (d) => {
|
|
1574
|
-
const s =
|
|
1574
|
+
const s = O(d, r.options);
|
|
1575
1575
|
r.options = i(s);
|
|
1576
1576
|
},
|
|
1577
1577
|
getState: () => r.options.state,
|
|
1578
1578
|
setState: (d) => {
|
|
1579
1579
|
r.options.onStateChange == null || r.options.onStateChange(d);
|
|
1580
1580
|
},
|
|
1581
|
-
_getRowId: (d, s,
|
|
1581
|
+
_getRowId: (d, s, f) => {
|
|
1582
1582
|
var p;
|
|
1583
|
-
return (p = r.options.getRowId == null ? void 0 : r.options.getRowId(d, s,
|
|
1583
|
+
return (p = r.options.getRowId == null ? void 0 : r.options.getRowId(d, s, f)) != null ? p : `${f ? [f.id, s].join(".") : s}`;
|
|
1584
1584
|
},
|
|
1585
1585
|
getCoreRowModel: () => (r._getCoreRowModel || (r._getCoreRowModel = r.options.getCoreRowModel(r)), r._getCoreRowModel()),
|
|
1586
1586
|
// The final calls start at the bottom of the model,
|
|
@@ -1588,42 +1588,42 @@ function Xt(e) {
|
|
|
1588
1588
|
getRowModel: () => r.getPaginationRowModel(),
|
|
1589
1589
|
//in next version, we should just pass in the row model as the optional 2nd arg
|
|
1590
1590
|
getRow: (d, s) => {
|
|
1591
|
-
let
|
|
1592
|
-
if (!
|
|
1591
|
+
let f = (s ? r.getPrePaginationRowModel() : r.getRowModel()).rowsById[d];
|
|
1592
|
+
if (!f && (f = r.getCoreRowModel().rowsById[d], !f))
|
|
1593
1593
|
throw process.env.NODE_ENV !== "production" ? new Error(`getRow could not find row with ID: ${d}`) : new Error();
|
|
1594
|
-
return
|
|
1594
|
+
return f;
|
|
1595
1595
|
},
|
|
1596
1596
|
_getDefaultColumnDef: C(() => [r.options.defaultColumn], (d) => {
|
|
1597
1597
|
var s;
|
|
1598
1598
|
return d = (s = d) != null ? s : {}, {
|
|
1599
|
-
header: (
|
|
1600
|
-
const p =
|
|
1599
|
+
header: (f) => {
|
|
1600
|
+
const p = f.header.column.columnDef;
|
|
1601
1601
|
return p.accessorKey ? p.accessorKey : p.accessorFn ? p.id : null;
|
|
1602
1602
|
},
|
|
1603
1603
|
// footer: props => props.header.column.id,
|
|
1604
|
-
cell: (
|
|
1604
|
+
cell: (f) => {
|
|
1605
1605
|
var p, R;
|
|
1606
|
-
return (p = (R =
|
|
1606
|
+
return (p = (R = f.renderValue()) == null || R.toString == null ? void 0 : R.toString()) != null ? p : null;
|
|
1607
1607
|
},
|
|
1608
|
-
...r._features.reduce((
|
|
1608
|
+
...r._features.reduce((f, p) => Object.assign(f, p.getDefaultColumnDef == null ? void 0 : p.getDefaultColumnDef()), {}),
|
|
1609
1609
|
...d
|
|
1610
1610
|
};
|
|
1611
1611
|
}, w(e, "debugColumns", "_getDefaultColumnDef")),
|
|
1612
1612
|
_getColumnDefs: () => r.options.columns,
|
|
1613
1613
|
getAllColumns: C(() => [r._getColumnDefs()], (d) => {
|
|
1614
|
-
const s = function(
|
|
1615
|
-
return R === void 0 && (R = 0),
|
|
1616
|
-
const
|
|
1617
|
-
return
|
|
1614
|
+
const s = function(f, p, R) {
|
|
1615
|
+
return R === void 0 && (R = 0), f.map((h) => {
|
|
1616
|
+
const _ = ft(r, h, R, p), x = h;
|
|
1617
|
+
return _.columns = x.columns ? s(x.columns, _, R + 1) : [], _;
|
|
1618
1618
|
});
|
|
1619
1619
|
};
|
|
1620
1620
|
return s(d);
|
|
1621
1621
|
}, w(e, "debugColumns", "getAllColumns")),
|
|
1622
1622
|
getAllFlatColumns: C(() => [r.getAllColumns()], (d) => d.flatMap((s) => s.getFlatColumns()), w(e, "debugColumns", "getAllFlatColumns")),
|
|
1623
|
-
_getAllFlatColumnsById: C(() => [r.getAllFlatColumns()], (d) => d.reduce((s,
|
|
1623
|
+
_getAllFlatColumnsById: C(() => [r.getAllFlatColumns()], (d) => d.reduce((s, f) => (s[f.id] = f, s), {}), w(e, "debugColumns", "getAllFlatColumnsById")),
|
|
1624
1624
|
getAllLeafColumns: C(() => [r.getAllColumns(), r._getOrderColumnsFn()], (d, s) => {
|
|
1625
|
-
let
|
|
1626
|
-
return s(
|
|
1625
|
+
let f = d.flatMap((p) => p.getLeafColumns());
|
|
1626
|
+
return s(f);
|
|
1627
1627
|
}, w(e, "debugColumns", "getAllLeafColumns")),
|
|
1628
1628
|
getColumn: (d) => {
|
|
1629
1629
|
const s = r._getAllFlatColumnsById()[d];
|
|
@@ -1637,7 +1637,7 @@ function Xt(e) {
|
|
|
1637
1637
|
}
|
|
1638
1638
|
return r;
|
|
1639
1639
|
}
|
|
1640
|
-
function
|
|
1640
|
+
function Ue() {
|
|
1641
1641
|
return (e) => C(() => [e.options.data], (o) => {
|
|
1642
1642
|
const t = {
|
|
1643
1643
|
rows: [],
|
|
@@ -1647,10 +1647,10 @@ function ke() {
|
|
|
1647
1647
|
l === void 0 && (l = 0);
|
|
1648
1648
|
const u = [];
|
|
1649
1649
|
for (let g = 0; g < r.length; g++) {
|
|
1650
|
-
const
|
|
1651
|
-
if (t.flatRows.push(
|
|
1650
|
+
const c = we(e, e._getRowId(r[g], g, i), r[g], g, l, void 0, i == null ? void 0 : i.id);
|
|
1651
|
+
if (t.flatRows.push(c), t.rowsById[c.id] = c, u.push(c), e.options.getSubRows) {
|
|
1652
1652
|
var a;
|
|
1653
|
-
|
|
1653
|
+
c.originalSubRows = e.options.getSubRows(r[g], g), (a = c.originalSubRows) != null && a.length && (c.subRows = n(c.originalSubRows, l + 1, c));
|
|
1654
1654
|
}
|
|
1655
1655
|
}
|
|
1656
1656
|
return u;
|
|
@@ -1658,10 +1658,10 @@ function ke() {
|
|
|
1658
1658
|
return t.rows = n(o), t;
|
|
1659
1659
|
}, w(e.options, "debugTable", "getRowModel", () => e._autoResetPageIndex()));
|
|
1660
1660
|
}
|
|
1661
|
-
function
|
|
1662
|
-
return (e) => C(() => [e.getState().expanded, e.getPreExpandedRowModel(), e.options.paginateExpandedRows], (o, t, n) => !t.rows.length || o !== !0 && !Object.keys(o ?? {}).length || !n ? t :
|
|
1661
|
+
function Xe() {
|
|
1662
|
+
return (e) => C(() => [e.getState().expanded, e.getPreExpandedRowModel(), e.options.paginateExpandedRows], (o, t, n) => !t.rows.length || o !== !0 && !Object.keys(o ?? {}).length || !n ? t : We(t), w(e.options, "debugTable", "getExpandedRowModel"));
|
|
1663
1663
|
}
|
|
1664
|
-
function
|
|
1664
|
+
function We(e) {
|
|
1665
1665
|
const o = [], t = (n) => {
|
|
1666
1666
|
var r;
|
|
1667
1667
|
o.push(n), (r = n.subRows) != null && r.length && n.getIsExpanded() && n.subRows.forEach(t);
|
|
@@ -1672,31 +1672,31 @@ function qe(e) {
|
|
|
1672
1672
|
rowsById: e.rowsById
|
|
1673
1673
|
};
|
|
1674
1674
|
}
|
|
1675
|
-
function
|
|
1676
|
-
return t.options.filterFromLeafRows ?
|
|
1675
|
+
function Jt(e, o, t) {
|
|
1676
|
+
return t.options.filterFromLeafRows ? Yt(e, o, t) : Qt(e, o, t);
|
|
1677
1677
|
}
|
|
1678
|
-
function
|
|
1678
|
+
function Yt(e, o, t) {
|
|
1679
1679
|
var n;
|
|
1680
1680
|
const r = [], l = {}, i = (n = t.options.maxLeafRowFilterDepth) != null ? n : 100, u = function(a, g) {
|
|
1681
1681
|
g === void 0 && (g = 0);
|
|
1682
|
-
const
|
|
1682
|
+
const c = [];
|
|
1683
1683
|
for (let d = 0; d < a.length; d++) {
|
|
1684
1684
|
var m;
|
|
1685
1685
|
let s = a[d];
|
|
1686
|
-
const
|
|
1687
|
-
if (
|
|
1688
|
-
if (
|
|
1689
|
-
|
|
1686
|
+
const f = we(t, s.id, s.original, s.index, s.depth, void 0, s.parentId);
|
|
1687
|
+
if (f.columnFilters = s.columnFilters, (m = s.subRows) != null && m.length && g < i) {
|
|
1688
|
+
if (f.subRows = u(s.subRows, g + 1), s = f, o(s) && !f.subRows.length) {
|
|
1689
|
+
c.push(s), l[s.id] = s, r.push(s);
|
|
1690
1690
|
continue;
|
|
1691
1691
|
}
|
|
1692
|
-
if (o(s) ||
|
|
1693
|
-
|
|
1692
|
+
if (o(s) || f.subRows.length) {
|
|
1693
|
+
c.push(s), l[s.id] = s, r.push(s);
|
|
1694
1694
|
continue;
|
|
1695
1695
|
}
|
|
1696
1696
|
} else
|
|
1697
|
-
s =
|
|
1697
|
+
s = f, o(s) && (c.push(s), l[s.id] = s, r.push(s));
|
|
1698
1698
|
}
|
|
1699
|
-
return
|
|
1699
|
+
return c;
|
|
1700
1700
|
};
|
|
1701
1701
|
return {
|
|
1702
1702
|
rows: u(e),
|
|
@@ -1704,23 +1704,23 @@ function Wt(e, o, t) {
|
|
|
1704
1704
|
rowsById: l
|
|
1705
1705
|
};
|
|
1706
1706
|
}
|
|
1707
|
-
function
|
|
1707
|
+
function Qt(e, o, t) {
|
|
1708
1708
|
var n;
|
|
1709
1709
|
const r = [], l = {}, i = (n = t.options.maxLeafRowFilterDepth) != null ? n : 100, u = function(a, g) {
|
|
1710
1710
|
g === void 0 && (g = 0);
|
|
1711
|
-
const
|
|
1711
|
+
const c = [];
|
|
1712
1712
|
for (let d = 0; d < a.length; d++) {
|
|
1713
1713
|
let s = a[d];
|
|
1714
1714
|
if (o(s)) {
|
|
1715
1715
|
var m;
|
|
1716
1716
|
if ((m = s.subRows) != null && m.length && g < i) {
|
|
1717
|
-
const p =
|
|
1717
|
+
const p = we(t, s.id, s.original, s.index, s.depth, void 0, s.parentId);
|
|
1718
1718
|
p.subRows = u(s.subRows, g + 1), s = p;
|
|
1719
1719
|
}
|
|
1720
|
-
|
|
1720
|
+
c.push(s), r.push(s), l[s.id] = s;
|
|
1721
1721
|
}
|
|
1722
1722
|
}
|
|
1723
|
-
return
|
|
1723
|
+
return c;
|
|
1724
1724
|
};
|
|
1725
1725
|
return {
|
|
1726
1726
|
rows: u(e),
|
|
@@ -1728,7 +1728,7 @@ function Jt(e, o, t) {
|
|
|
1728
1728
|
rowsById: l
|
|
1729
1729
|
};
|
|
1730
1730
|
}
|
|
1731
|
-
function
|
|
1731
|
+
function Zt() {
|
|
1732
1732
|
return (e) => C(() => [e.getPreFilteredRowModel(), e.getState().columnFilters, e.getState().globalFilter], (o, t, n) => {
|
|
1733
1733
|
if (!o.rows.length || !(t != null && t.length) && !n) {
|
|
1734
1734
|
for (let d = 0; d < o.flatRows.length; d++)
|
|
@@ -1738,12 +1738,12 @@ function Yt() {
|
|
|
1738
1738
|
const r = [], l = [];
|
|
1739
1739
|
(t ?? []).forEach((d) => {
|
|
1740
1740
|
var s;
|
|
1741
|
-
const
|
|
1742
|
-
if (!
|
|
1741
|
+
const f = e.getColumn(d.id);
|
|
1742
|
+
if (!f)
|
|
1743
1743
|
return;
|
|
1744
|
-
const p =
|
|
1744
|
+
const p = f.getFilterFn();
|
|
1745
1745
|
if (!p) {
|
|
1746
|
-
process.env.NODE_ENV !== "production" && console.warn(`Could not find a valid 'column.filterFn' for column with the ID: ${
|
|
1746
|
+
process.env.NODE_ENV !== "production" && console.warn(`Could not find a valid 'column.filterFn' for column with the ID: ${f.id}.`);
|
|
1747
1747
|
return;
|
|
1748
1748
|
}
|
|
1749
1749
|
r.push({
|
|
@@ -1761,22 +1761,22 @@ function Yt() {
|
|
|
1761
1761
|
resolvedValue: (s = u.resolveFilterValue == null ? void 0 : u.resolveFilterValue(n)) != null ? s : n
|
|
1762
1762
|
});
|
|
1763
1763
|
}));
|
|
1764
|
-
let g,
|
|
1764
|
+
let g, c;
|
|
1765
1765
|
for (let d = 0; d < o.flatRows.length; d++) {
|
|
1766
1766
|
const s = o.flatRows[d];
|
|
1767
1767
|
if (s.columnFilters = {}, r.length)
|
|
1768
|
-
for (let
|
|
1769
|
-
g = r[
|
|
1768
|
+
for (let f = 0; f < r.length; f++) {
|
|
1769
|
+
g = r[f];
|
|
1770
1770
|
const p = g.id;
|
|
1771
1771
|
s.columnFilters[p] = g.filterFn(s, p, g.resolvedValue, (R) => {
|
|
1772
1772
|
s.columnFiltersMeta[p] = R;
|
|
1773
1773
|
});
|
|
1774
1774
|
}
|
|
1775
1775
|
if (l.length) {
|
|
1776
|
-
for (let
|
|
1777
|
-
|
|
1778
|
-
const p =
|
|
1779
|
-
if (
|
|
1776
|
+
for (let f = 0; f < l.length; f++) {
|
|
1777
|
+
c = l[f];
|
|
1778
|
+
const p = c.id;
|
|
1779
|
+
if (c.filterFn(s, p, c.resolvedValue, (R) => {
|
|
1780
1780
|
s.columnFiltersMeta[p] = R;
|
|
1781
1781
|
})) {
|
|
1782
1782
|
s.columnFilters.__global__ = !0;
|
|
@@ -1792,10 +1792,10 @@ function Yt() {
|
|
|
1792
1792
|
return !1;
|
|
1793
1793
|
return !0;
|
|
1794
1794
|
};
|
|
1795
|
-
return
|
|
1795
|
+
return Jt(o.rows, m, e);
|
|
1796
1796
|
}, w(e.options, "debugTable", "getFilteredRowModel", () => e._autoResetPageIndex()));
|
|
1797
1797
|
}
|
|
1798
|
-
function
|
|
1798
|
+
function bt(e) {
|
|
1799
1799
|
return (o) => C(() => [o.getState().pagination, o.getPrePaginationRowModel(), o.options.paginateExpandedRows ? void 0 : o.getState().expanded], (t, n) => {
|
|
1800
1800
|
if (!n.rows.length)
|
|
1801
1801
|
return n;
|
|
@@ -1808,14 +1808,14 @@ function Qt(e) {
|
|
|
1808
1808
|
flatRows: u,
|
|
1809
1809
|
rowsById: a
|
|
1810
1810
|
} = n;
|
|
1811
|
-
const g = r * l,
|
|
1812
|
-
i = i.slice(g,
|
|
1811
|
+
const g = r * l, c = g + r;
|
|
1812
|
+
i = i.slice(g, c);
|
|
1813
1813
|
let m;
|
|
1814
1814
|
o.options.paginateExpandedRows ? m = {
|
|
1815
1815
|
rows: i,
|
|
1816
1816
|
flatRows: u,
|
|
1817
1817
|
rowsById: a
|
|
1818
|
-
} : m =
|
|
1818
|
+
} : m = We({
|
|
1819
1819
|
rows: i,
|
|
1820
1820
|
flatRows: u,
|
|
1821
1821
|
rowsById: a
|
|
@@ -1826,7 +1826,7 @@ function Qt(e) {
|
|
|
1826
1826
|
return m.rows.forEach(d), m;
|
|
1827
1827
|
}, w(o.options, "debugTable", "getPaginationRowModel"));
|
|
1828
1828
|
}
|
|
1829
|
-
function
|
|
1829
|
+
function en() {
|
|
1830
1830
|
return (e) => C(() => [e.getState().sorting, e.getPreSortedRowModel()], (o, t) => {
|
|
1831
1831
|
if (!t.rows.length || !(o != null && o.length))
|
|
1832
1832
|
return t;
|
|
@@ -1843,29 +1843,29 @@ function Zt() {
|
|
|
1843
1843
|
});
|
|
1844
1844
|
});
|
|
1845
1845
|
const u = (a) => {
|
|
1846
|
-
const g = a.map((
|
|
1847
|
-
...
|
|
1846
|
+
const g = a.map((c) => ({
|
|
1847
|
+
...c
|
|
1848
1848
|
}));
|
|
1849
|
-
return g.sort((
|
|
1849
|
+
return g.sort((c, m) => {
|
|
1850
1850
|
for (let s = 0; s < l.length; s += 1) {
|
|
1851
1851
|
var d;
|
|
1852
|
-
const
|
|
1853
|
-
let
|
|
1852
|
+
const f = l[s], p = i[f.id], R = p.sortUndefined, h = (d = f == null ? void 0 : f.desc) != null ? d : !1;
|
|
1853
|
+
let _ = 0;
|
|
1854
1854
|
if (R) {
|
|
1855
|
-
const
|
|
1856
|
-
if (
|
|
1857
|
-
if (R === "first") return
|
|
1858
|
-
if (R === "last") return
|
|
1859
|
-
|
|
1855
|
+
const x = c.getValue(f.id), V = m.getValue(f.id), P = x === void 0, L = V === void 0;
|
|
1856
|
+
if (P || L) {
|
|
1857
|
+
if (R === "first") return P ? -1 : 1;
|
|
1858
|
+
if (R === "last") return P ? 1 : -1;
|
|
1859
|
+
_ = P && L ? 0 : P ? R : -R;
|
|
1860
1860
|
}
|
|
1861
1861
|
}
|
|
1862
|
-
if (
|
|
1863
|
-
return h && (
|
|
1862
|
+
if (_ === 0 && (_ = p.sortingFn(c, m, f.id)), _ !== 0)
|
|
1863
|
+
return h && (_ *= -1), p.invertSorting && (_ *= -1), _;
|
|
1864
1864
|
}
|
|
1865
|
-
return
|
|
1866
|
-
}), g.forEach((
|
|
1865
|
+
return c.index - m.index;
|
|
1866
|
+
}), g.forEach((c) => {
|
|
1867
1867
|
var m;
|
|
1868
|
-
r.push(
|
|
1868
|
+
r.push(c), (m = c.subRows) != null && m.length && (c.subRows = u(c.subRows));
|
|
1869
1869
|
}), g;
|
|
1870
1870
|
};
|
|
1871
1871
|
return {
|
|
@@ -1885,18 +1885,18 @@ function Zt() {
|
|
|
1885
1885
|
*
|
|
1886
1886
|
* @license MIT
|
|
1887
1887
|
*/
|
|
1888
|
-
function
|
|
1888
|
+
function ne() {
|
|
1889
1889
|
return !0;
|
|
1890
1890
|
}
|
|
1891
|
-
const
|
|
1891
|
+
const tn = Symbol("merge-proxy"), nn = {
|
|
1892
1892
|
get(e, o, t) {
|
|
1893
|
-
return o ===
|
|
1893
|
+
return o === tn ? t : e.get(o);
|
|
1894
1894
|
},
|
|
1895
1895
|
has(e, o) {
|
|
1896
1896
|
return e.has(o);
|
|
1897
1897
|
},
|
|
1898
|
-
set:
|
|
1899
|
-
deleteProperty:
|
|
1898
|
+
set: ne,
|
|
1899
|
+
deleteProperty: ne,
|
|
1900
1900
|
getOwnPropertyDescriptor(e, o) {
|
|
1901
1901
|
return {
|
|
1902
1902
|
configurable: !0,
|
|
@@ -1904,50 +1904,50 @@ const bt = Symbol("merge-proxy"), en = {
|
|
|
1904
1904
|
get() {
|
|
1905
1905
|
return e.get(o);
|
|
1906
1906
|
},
|
|
1907
|
-
set:
|
|
1908
|
-
deleteProperty:
|
|
1907
|
+
set: ne,
|
|
1908
|
+
deleteProperty: ne
|
|
1909
1909
|
};
|
|
1910
1910
|
},
|
|
1911
1911
|
ownKeys(e) {
|
|
1912
1912
|
return e.keys();
|
|
1913
1913
|
}
|
|
1914
1914
|
};
|
|
1915
|
-
function
|
|
1915
|
+
function ce(e) {
|
|
1916
1916
|
return "value" in e ? e.value : e;
|
|
1917
1917
|
}
|
|
1918
|
-
function
|
|
1918
|
+
function W() {
|
|
1919
1919
|
for (var e = arguments.length, o = new Array(e), t = 0; t < e; t++)
|
|
1920
1920
|
o[t] = arguments[t];
|
|
1921
1921
|
return new Proxy({
|
|
1922
1922
|
get(n) {
|
|
1923
1923
|
for (let r = o.length - 1; r >= 0; r--) {
|
|
1924
|
-
const l =
|
|
1924
|
+
const l = ce(o[r])[n];
|
|
1925
1925
|
if (l !== void 0) return l;
|
|
1926
1926
|
}
|
|
1927
1927
|
},
|
|
1928
1928
|
has(n) {
|
|
1929
1929
|
for (let r = o.length - 1; r >= 0; r--)
|
|
1930
|
-
if (n in
|
|
1930
|
+
if (n in ce(o[r])) return !0;
|
|
1931
1931
|
return !1;
|
|
1932
1932
|
},
|
|
1933
1933
|
keys() {
|
|
1934
1934
|
const n = [];
|
|
1935
|
-
for (let r = 0; r < o.length; r++) n.push(...Object.keys(
|
|
1935
|
+
for (let r = 0; r < o.length; r++) n.push(...Object.keys(ce(o[r])));
|
|
1936
1936
|
return [...Array.from(new Set(n))];
|
|
1937
1937
|
}
|
|
1938
|
-
},
|
|
1938
|
+
}, nn);
|
|
1939
1939
|
}
|
|
1940
|
-
const
|
|
1940
|
+
const De = ze({
|
|
1941
1941
|
props: ["render", "props"],
|
|
1942
|
-
setup: (e) => () => typeof e.render == "function" || typeof e.render == "object" ?
|
|
1942
|
+
setup: (e) => () => typeof e.render == "function" || typeof e.render == "object" ? oe(e.render, e.props) : e.render
|
|
1943
1943
|
});
|
|
1944
|
-
function
|
|
1945
|
-
return
|
|
1946
|
-
data:
|
|
1944
|
+
function Ae(e) {
|
|
1945
|
+
return W(e, {
|
|
1946
|
+
data: z(e.data)
|
|
1947
1947
|
});
|
|
1948
1948
|
}
|
|
1949
|
-
function
|
|
1950
|
-
const o =
|
|
1949
|
+
function Ke(e) {
|
|
1950
|
+
const o = Je(e.data), t = W({
|
|
1951
1951
|
state: {},
|
|
1952
1952
|
// Dummy state
|
|
1953
1953
|
onStateChange: () => {
|
|
@@ -1958,12 +1958,12 @@ function je(e) {
|
|
|
1958
1958
|
return o ? {
|
|
1959
1959
|
...l,
|
|
1960
1960
|
...i
|
|
1961
|
-
} :
|
|
1961
|
+
} : W(l, i);
|
|
1962
1962
|
}
|
|
1963
|
-
}, o ?
|
|
1963
|
+
}, o ? Ae(e) : e), n = Kt(t);
|
|
1964
1964
|
if (o) {
|
|
1965
|
-
const l =
|
|
1966
|
-
|
|
1965
|
+
const l = Ye(e.data);
|
|
1966
|
+
He(l, () => {
|
|
1967
1967
|
n.setState((i) => ({
|
|
1968
1968
|
...i,
|
|
1969
1969
|
data: l.value
|
|
@@ -1972,18 +1972,18 @@ function je(e) {
|
|
|
1972
1972
|
immediate: !0
|
|
1973
1973
|
});
|
|
1974
1974
|
}
|
|
1975
|
-
const r =
|
|
1976
|
-
return
|
|
1975
|
+
const r = k(n.initialState);
|
|
1976
|
+
return Qe(() => {
|
|
1977
1977
|
n.setOptions((l) => {
|
|
1978
1978
|
var i;
|
|
1979
1979
|
const u = new Proxy({}, {
|
|
1980
1980
|
get: (a, g) => r.value[g]
|
|
1981
1981
|
});
|
|
1982
|
-
return
|
|
1982
|
+
return W(l, o ? Ae(e) : e, {
|
|
1983
1983
|
// merge the initialState and `options.state`
|
|
1984
1984
|
// create a new proxy on each `setOptions` call
|
|
1985
1985
|
// and get the value from state on each property access
|
|
1986
|
-
state:
|
|
1986
|
+
state: W(u, (i = e.state) != null ? i : {}),
|
|
1987
1987
|
// Similarly, we'll maintain both our internal state and any user-provided
|
|
1988
1988
|
// state.
|
|
1989
1989
|
onStateChange: (a) => {
|
|
@@ -1993,13 +1993,13 @@ function je(e) {
|
|
|
1993
1993
|
});
|
|
1994
1994
|
}), n;
|
|
1995
1995
|
}
|
|
1996
|
-
function
|
|
1996
|
+
function on(e) {
|
|
1997
1997
|
return typeof e == "function";
|
|
1998
1998
|
}
|
|
1999
|
-
function
|
|
2000
|
-
return
|
|
1999
|
+
function T(e, o) {
|
|
2000
|
+
return on(e) ? e(o) : e;
|
|
2001
2001
|
}
|
|
2002
|
-
function
|
|
2002
|
+
function rn({
|
|
2003
2003
|
columns: e,
|
|
2004
2004
|
data: o,
|
|
2005
2005
|
initialState: t,
|
|
@@ -2010,11 +2010,11 @@ function nn({
|
|
|
2010
2010
|
getSubRows: u,
|
|
2011
2011
|
getRowCanExpand: a,
|
|
2012
2012
|
getRowId: g,
|
|
2013
|
-
enableRowSelection:
|
|
2013
|
+
enableRowSelection: c
|
|
2014
2014
|
}) {
|
|
2015
2015
|
var s;
|
|
2016
|
-
const m =
|
|
2017
|
-
return ((s = m.variant) == null ? void 0 : s.value) === "table" ?
|
|
2016
|
+
const m = Ze(Me.key, Me.defaults);
|
|
2017
|
+
return ((s = m.variant) == null ? void 0 : s.value) === "table" ? ln({
|
|
2018
2018
|
columns: e,
|
|
2019
2019
|
data: o,
|
|
2020
2020
|
initialState: t,
|
|
@@ -2023,8 +2023,8 @@ function nn({
|
|
|
2023
2023
|
getSubRows: u,
|
|
2024
2024
|
getRowCanExpand: a,
|
|
2025
2025
|
getRowId: g,
|
|
2026
|
-
enableRowSelection:
|
|
2027
|
-
}) :
|
|
2026
|
+
enableRowSelection: c
|
|
2027
|
+
}) : sn({
|
|
2028
2028
|
columns: e,
|
|
2029
2029
|
data: o,
|
|
2030
2030
|
initialState: t,
|
|
@@ -2035,10 +2035,10 @@ function nn({
|
|
|
2035
2035
|
getSubRows: u,
|
|
2036
2036
|
getRowCanExpand: a,
|
|
2037
2037
|
getRowId: g,
|
|
2038
|
-
enableRowSelection:
|
|
2038
|
+
enableRowSelection: c
|
|
2039
2039
|
});
|
|
2040
2040
|
}
|
|
2041
|
-
function
|
|
2041
|
+
function ln({
|
|
2042
2042
|
columns: e,
|
|
2043
2043
|
data: o,
|
|
2044
2044
|
initialState: t,
|
|
@@ -2050,26 +2050,27 @@ function on({
|
|
|
2050
2050
|
enableRowSelection: a
|
|
2051
2051
|
}) {
|
|
2052
2052
|
const g = M(() => {
|
|
2053
|
-
const
|
|
2054
|
-
return
|
|
2055
|
-
}),
|
|
2053
|
+
const f = r.currentSortId.value, p = r.currentSortOrder.value;
|
|
2054
|
+
return f ? [{ id: f, desc: p === "desc" }] : [];
|
|
2055
|
+
}), c = M(() => ({
|
|
2056
2056
|
pageIndex: r.currentPage.value - 1,
|
|
2057
2057
|
pageSize: r.pageSize.value
|
|
2058
|
-
})), m =
|
|
2059
|
-
return { table:
|
|
2058
|
+
})), m = k((t == null ? void 0 : t.rowSelection) ?? {}), d = k((t == null ? void 0 : t.expanded) ?? {});
|
|
2059
|
+
return { table: Ke({
|
|
2060
2060
|
get columns() {
|
|
2061
|
-
return
|
|
2061
|
+
return q(e);
|
|
2062
2062
|
},
|
|
2063
2063
|
get data() {
|
|
2064
|
-
return
|
|
2064
|
+
return q(o);
|
|
2065
2065
|
},
|
|
2066
2066
|
initialState: t,
|
|
2067
|
-
getCoreRowModel:
|
|
2068
|
-
getExpandedRowModel:
|
|
2067
|
+
getCoreRowModel: Ue(),
|
|
2068
|
+
getExpandedRowModel: Xe(),
|
|
2069
2069
|
paginateExpandedRows: !1,
|
|
2070
2070
|
manualSorting: !0,
|
|
2071
2071
|
manualPagination: !0,
|
|
2072
2072
|
manualFiltering: !0,
|
|
2073
|
+
enableColumnPinning: !0,
|
|
2073
2074
|
enableSorting: n,
|
|
2074
2075
|
getSubRows: l,
|
|
2075
2076
|
getRowCanExpand: i,
|
|
@@ -2081,7 +2082,7 @@ function on({
|
|
|
2081
2082
|
return g.value;
|
|
2082
2083
|
},
|
|
2083
2084
|
get pagination() {
|
|
2084
|
-
return
|
|
2085
|
+
return c.value;
|
|
2085
2086
|
},
|
|
2086
2087
|
get rowSelection() {
|
|
2087
2088
|
return m.value;
|
|
@@ -2091,29 +2092,29 @@ function on({
|
|
|
2091
2092
|
}
|
|
2092
2093
|
},
|
|
2093
2094
|
get rowCount() {
|
|
2094
|
-
const
|
|
2095
|
-
return
|
|
2095
|
+
const f = r.totalDataCount.value;
|
|
2096
|
+
return f === 1 / 0 ? -1 : f;
|
|
2096
2097
|
},
|
|
2097
|
-
onSortingChange(
|
|
2098
|
-
const R =
|
|
2098
|
+
onSortingChange(f) {
|
|
2099
|
+
const R = T(f, g.value)[0];
|
|
2099
2100
|
R ? r.updateCurrentSort(R.id, {
|
|
2100
2101
|
sortOrder: R.desc ? "desc" : "asc",
|
|
2101
2102
|
shouldEmit: !0
|
|
2102
2103
|
}) : r.updateCurrentSort(void 0, { shouldEmit: !0 });
|
|
2103
2104
|
},
|
|
2104
|
-
onPaginationChange(
|
|
2105
|
-
const p =
|
|
2105
|
+
onPaginationChange(f) {
|
|
2106
|
+
const p = T(f, c.value);
|
|
2106
2107
|
r.setPage(p.pageIndex + 1, { shouldEmit: !0 });
|
|
2107
2108
|
},
|
|
2108
|
-
onRowSelectionChange(
|
|
2109
|
-
m.value =
|
|
2109
|
+
onRowSelectionChange(f) {
|
|
2110
|
+
m.value = T(f, m.value);
|
|
2110
2111
|
},
|
|
2111
|
-
onExpandedChange(
|
|
2112
|
-
d.value =
|
|
2112
|
+
onExpandedChange(f) {
|
|
2113
|
+
d.value = T(f, d.value);
|
|
2113
2114
|
}
|
|
2114
2115
|
}), isServerMode: !0 };
|
|
2115
2116
|
}
|
|
2116
|
-
function
|
|
2117
|
+
function sn({
|
|
2117
2118
|
columns: e,
|
|
2118
2119
|
data: o,
|
|
2119
2120
|
initialState: t,
|
|
@@ -2124,31 +2125,32 @@ function rn({
|
|
|
2124
2125
|
getSubRows: u,
|
|
2125
2126
|
getRowCanExpand: a,
|
|
2126
2127
|
getRowId: g,
|
|
2127
|
-
enableRowSelection:
|
|
2128
|
+
enableRowSelection: c
|
|
2128
2129
|
}) {
|
|
2129
2130
|
var R, h;
|
|
2130
|
-
const m =
|
|
2131
|
+
const m = k((t == null ? void 0 : t.sorting) || []), d = k({
|
|
2131
2132
|
pageIndex: ((R = t == null ? void 0 : t.pagination) == null ? void 0 : R.pageIndex) || 0,
|
|
2132
2133
|
pageSize: ((h = t == null ? void 0 : t.pagination) == null ? void 0 : h.pageSize) || i
|
|
2133
|
-
}), s =
|
|
2134
|
+
}), s = k((t == null ? void 0 : t.rowSelection) || {}), f = k((t == null ? void 0 : t.expanded) ?? {}), p = Ke({
|
|
2134
2135
|
get columns() {
|
|
2135
|
-
return
|
|
2136
|
+
return q(e);
|
|
2136
2137
|
},
|
|
2137
2138
|
get data() {
|
|
2138
|
-
return
|
|
2139
|
+
return q(o);
|
|
2139
2140
|
},
|
|
2140
2141
|
initialState: t,
|
|
2141
|
-
getCoreRowModel:
|
|
2142
|
-
getExpandedRowModel:
|
|
2142
|
+
getCoreRowModel: Ue(),
|
|
2143
|
+
getExpandedRowModel: Xe(),
|
|
2143
2144
|
paginateExpandedRows: !1,
|
|
2144
|
-
...n ? { getSortedRowModel:
|
|
2145
|
-
...r ? { getFilteredRowModel:
|
|
2146
|
-
...l ? { getPaginationRowModel:
|
|
2145
|
+
...n ? { getSortedRowModel: en() } : {},
|
|
2146
|
+
...r ? { getFilteredRowModel: Zt() } : {},
|
|
2147
|
+
...l ? { getPaginationRowModel: bt() } : {},
|
|
2148
|
+
enableColumnPinning: !0,
|
|
2147
2149
|
enableSorting: n,
|
|
2148
2150
|
getSubRows: u,
|
|
2149
2151
|
getRowCanExpand: a,
|
|
2150
2152
|
...g != null ? { getRowId: g } : {},
|
|
2151
|
-
...
|
|
2153
|
+
...c != null ? { enableRowSelection: c } : {},
|
|
2152
2154
|
state: {
|
|
2153
2155
|
get sorting() {
|
|
2154
2156
|
return m.value;
|
|
@@ -2160,38 +2162,39 @@ function rn({
|
|
|
2160
2162
|
return s.value;
|
|
2161
2163
|
},
|
|
2162
2164
|
get expanded() {
|
|
2163
|
-
return
|
|
2165
|
+
return f.value;
|
|
2164
2166
|
}
|
|
2165
2167
|
},
|
|
2166
|
-
onSortingChange(
|
|
2167
|
-
m.value =
|
|
2168
|
+
onSortingChange(_) {
|
|
2169
|
+
m.value = T(_, m.value);
|
|
2168
2170
|
},
|
|
2169
|
-
onPaginationChange(
|
|
2170
|
-
d.value =
|
|
2171
|
+
onPaginationChange(_) {
|
|
2172
|
+
d.value = T(_, d.value);
|
|
2171
2173
|
},
|
|
2172
|
-
onRowSelectionChange(
|
|
2173
|
-
s.value =
|
|
2174
|
+
onRowSelectionChange(_) {
|
|
2175
|
+
s.value = T(_, s.value);
|
|
2174
2176
|
},
|
|
2175
|
-
onExpandedChange(
|
|
2176
|
-
|
|
2177
|
+
onExpandedChange(_) {
|
|
2178
|
+
f.value = T(_, f.value);
|
|
2177
2179
|
}
|
|
2178
2180
|
});
|
|
2179
|
-
return
|
|
2180
|
-
() =>
|
|
2181
|
+
return He(
|
|
2182
|
+
() => q(o),
|
|
2181
2183
|
() => {
|
|
2182
2184
|
if (l && d.value.pageIndex > 0) {
|
|
2183
|
-
const
|
|
2184
|
-
d.value.pageIndex >
|
|
2185
|
+
const _ = Math.max(0, Math.ceil(q(o).length / d.value.pageSize) - 1);
|
|
2186
|
+
d.value.pageIndex > _ && (d.value = { ...d.value, pageIndex: 0 });
|
|
2185
2187
|
}
|
|
2186
2188
|
}
|
|
2187
2189
|
), { table: p, isServerMode: !1 };
|
|
2188
2190
|
}
|
|
2189
|
-
const
|
|
2191
|
+
const un = /* @__PURE__ */ ze({
|
|
2190
2192
|
inheritAttrs: !1,
|
|
2191
2193
|
__name: "DataTable",
|
|
2192
2194
|
props: {
|
|
2193
2195
|
columns: {},
|
|
2194
2196
|
data: {},
|
|
2197
|
+
initialState: { default: void 0 },
|
|
2195
2198
|
isSelectable: { type: Boolean, default: !1 },
|
|
2196
2199
|
getRowId: { type: Function, default: void 0 },
|
|
2197
2200
|
getRowCanSelect: { type: Function, default: void 0 },
|
|
@@ -2207,10 +2210,13 @@ const ln = /* @__PURE__ */ Ve({
|
|
|
2207
2210
|
isLoading: { type: Boolean, default: !1 },
|
|
2208
2211
|
isExpandable: { type: Boolean, default: !1 },
|
|
2209
2212
|
radius: { default: "rounded" },
|
|
2210
|
-
stickyHeader: { default: void 0 }
|
|
2213
|
+
stickyHeader: { default: void 0 },
|
|
2214
|
+
pinnedLeftWidth: {},
|
|
2215
|
+
pinnedRightWidth: {},
|
|
2216
|
+
tableMinWidth: {}
|
|
2211
2217
|
},
|
|
2212
2218
|
setup(e, { expose: o }) {
|
|
2213
|
-
const t = e, n =
|
|
2219
|
+
const t = e, n = be(), r = et(), l = M(() => ({
|
|
2214
2220
|
id: "expand",
|
|
2215
2221
|
size: 48,
|
|
2216
2222
|
minSize: 48,
|
|
@@ -2219,8 +2225,8 @@ const ln = /* @__PURE__ */ Ve({
|
|
|
2219
2225
|
class: `${n["row-control-cell"]} stash-table-cell__is-expansion-cell px-0!`
|
|
2220
2226
|
},
|
|
2221
2227
|
header: () => null,
|
|
2222
|
-
cell: ({ row: S }) => S.getCanExpand() ?
|
|
2223
|
-
"aria-label": S.getIsExpanded() ?
|
|
2228
|
+
cell: ({ row: S }) => S.getCanExpand() ? oe(nt, {
|
|
2229
|
+
"aria-label": S.getIsExpanded() ? Z("ll.table.collapseRow") : Z("ll.table.expandRow"),
|
|
2224
2230
|
direction: S.getIsExpanded() ? "up" : "down",
|
|
2225
2231
|
onClick: () => S.toggleExpanded()
|
|
2226
2232
|
}) : null
|
|
@@ -2232,60 +2238,87 @@ const ln = /* @__PURE__ */ Ve({
|
|
|
2232
2238
|
meta: {
|
|
2233
2239
|
class: `${n["row-control-cell"]} stash-table-cell__is-selection-cell lg:pl-3`
|
|
2234
2240
|
},
|
|
2235
|
-
header: ({ table: S }) =>
|
|
2241
|
+
header: ({ table: S }) => oe(ye, {
|
|
2236
2242
|
checked: S.getIsAllPageRowsSelected(),
|
|
2237
2243
|
indeterminate: S.getIsSomePageRowsSelected() && !S.getIsAllPageRowsSelected(),
|
|
2238
|
-
title:
|
|
2244
|
+
title: Z("ll.selectAll"),
|
|
2239
2245
|
class: n["row-selection-checkbox"],
|
|
2240
2246
|
"onUpdate:checked": () => S.toggleAllPageRowsSelected()
|
|
2241
2247
|
}),
|
|
2242
|
-
cell: ({ row: S }) =>
|
|
2248
|
+
cell: ({ row: S }) => oe(ye, {
|
|
2243
2249
|
checked: S.getIsSelected(),
|
|
2244
2250
|
disabled: !S.getCanSelect(),
|
|
2245
|
-
title:
|
|
2251
|
+
title: Z("ll.select.self"),
|
|
2246
2252
|
class: n["row-selection-checkbox"],
|
|
2247
2253
|
"onUpdate:checked": () => S.toggleSelected()
|
|
2248
2254
|
})
|
|
2249
2255
|
})), u = M(() => {
|
|
2250
2256
|
const S = [...t.columns];
|
|
2251
2257
|
return t.isExpandable && !t.hasCustomExpandToggle && S.unshift(l.value), t.isSelectable && S.unshift(i.value), S;
|
|
2252
|
-
}), a =
|
|
2258
|
+
}), a = M(() => {
|
|
2259
|
+
var F, $;
|
|
2260
|
+
const S = t.initialState ?? {}, v = {
|
|
2261
|
+
left: [...((F = S.columnPinning) == null ? void 0 : F.left) ?? []],
|
|
2262
|
+
right: [...(($ = S.columnPinning) == null ? void 0 : $.right) ?? []]
|
|
2263
|
+
};
|
|
2264
|
+
return v.left.length > 0 && (t.isExpandable && !t.hasCustomExpandToggle && !v.left.includes("expand") && v.left.unshift("expand"), t.isSelectable && !v.left.includes("select") && v.left.unshift("select")), { ...S, columnPinning: v };
|
|
2265
|
+
}), g = rn({
|
|
2253
2266
|
columns: u,
|
|
2254
2267
|
data: M(() => t.data),
|
|
2268
|
+
initialState: a.value,
|
|
2255
2269
|
getSubRows: t.getSubRows,
|
|
2256
2270
|
getRowCanExpand: t.getRowCanExpand,
|
|
2257
2271
|
getRowId: t.getRowId,
|
|
2258
2272
|
...t.isSelectable ? {
|
|
2259
2273
|
enableRowSelection: t.getRowCanSelect ? (S) => t.getRowCanSelect(S) : void 0
|
|
2260
2274
|
} : {}
|
|
2261
|
-
}), g = M(() =>
|
|
2262
|
-
function
|
|
2263
|
-
const
|
|
2264
|
-
return
|
|
2275
|
+
}), { table: c } = g, m = M(() => c.getLeftLeafColumns().reduce((S, v) => S + v.getSize(), 0)), d = M(() => c.getRightLeafColumns().reduce((S, v) => S + v.getSize(), 0)), s = M(() => c.getIsSomeColumnsPinned() ? c.getTotalSize() : void 0), f = M(() => g.isServerMode ? !1 : g.table.getPageCount() > 1);
|
|
2276
|
+
function p(S) {
|
|
2277
|
+
const v = S.minSize, F = S.maxSize, $ = {};
|
|
2278
|
+
return v != null && v > 0 && ($.minWidth = `${v}px`), F != null && F < Number.MAX_SAFE_INTEGER && ($.maxWidth = `${F}px`), Object.keys($).length ? $ : void 0;
|
|
2279
|
+
}
|
|
2280
|
+
function R(S) {
|
|
2281
|
+
const v = S.getIsPinned();
|
|
2282
|
+
if (!v) return {};
|
|
2283
|
+
const F = {
|
|
2284
|
+
position: "sticky",
|
|
2285
|
+
width: `${S.getSize()}px`,
|
|
2286
|
+
zIndex: "1"
|
|
2287
|
+
};
|
|
2288
|
+
return v === "left" ? F.left = `${S.getStart("left")}px` : F.right = `${S.getAfter("right")}px`, F;
|
|
2265
2289
|
}
|
|
2266
|
-
function
|
|
2267
|
-
|
|
2290
|
+
function h(S) {
|
|
2291
|
+
const v = {
|
|
2292
|
+
...R(S.column),
|
|
2293
|
+
zIndex: S.column.getIsPinned() ? "2" : "1"
|
|
2294
|
+
};
|
|
2295
|
+
return { ...p(S.column.columnDef), ...v };
|
|
2268
2296
|
}
|
|
2269
|
-
function
|
|
2270
|
-
const
|
|
2271
|
-
|
|
2297
|
+
function _(S) {
|
|
2298
|
+
const v = S.column.columnDef.meta, F = (v == null ? void 0 : v.headerClass) ?? (v == null ? void 0 : v.class) ?? "";
|
|
2299
|
+
if (S.column.id === "select")
|
|
2300
|
+
return `stash-table-header-row__selection-cell min-w-12 ${n["row-control-cell"]} ${F}`.trim();
|
|
2301
|
+
if (S.column.id === "expand")
|
|
2302
|
+
return `${n["row-control-cell"]} ${F}`.trim();
|
|
2303
|
+
const $ = S.column.getIsPinned(), E = $ === "left" && S.column.getIsLastColumn("left") ? "border-r border-ice-100" : $ === "right" && S.column.getIsFirstColumn("right") ? "border-l border-ice-100" : "";
|
|
2304
|
+
return `${F} ${E}`.trim();
|
|
2272
2305
|
}
|
|
2273
|
-
function
|
|
2274
|
-
return
|
|
2306
|
+
function x(S) {
|
|
2307
|
+
return { ...p(S.column.columnDef), ...R(S.column) };
|
|
2275
2308
|
}
|
|
2276
|
-
function
|
|
2277
|
-
const
|
|
2278
|
-
return
|
|
2309
|
+
function V(S) {
|
|
2310
|
+
const v = S.column.columnDef.meta, F = (v == null ? void 0 : v.cellClass) ?? (v == null ? void 0 : v.class) ?? "", $ = S.column.getIsPinned(), E = $ === "left" && S.column.getIsLastColumn("left") ? "border-r! border-ice-100!" : $ === "right" && S.column.getIsFirstColumn("right") ? "border-l! border-ice-100!" : "";
|
|
2311
|
+
return `${F} ${E}`.trim();
|
|
2279
2312
|
}
|
|
2280
|
-
const
|
|
2313
|
+
const P = M(() => g.table.getSelectedRowModel().rows), L = M(() => P.value.map((S) => S.original)), J = M(() => g.table.getIsAllPageRowsSelected()), Y = M(() => g.table.getIsSomePageRowsSelected());
|
|
2281
2314
|
return o({
|
|
2282
|
-
table:
|
|
2283
|
-
selectedRows:
|
|
2284
|
-
selectedItems:
|
|
2285
|
-
allPageRowsSelected:
|
|
2286
|
-
somePageRowsSelected:
|
|
2287
|
-
}), (S,
|
|
2288
|
-
|
|
2315
|
+
table: g.table,
|
|
2316
|
+
selectedRows: P,
|
|
2317
|
+
selectedItems: L,
|
|
2318
|
+
allPageRowsSelected: J,
|
|
2319
|
+
somePageRowsSelected: Y
|
|
2320
|
+
}), (S, v) => (D(), j(U, null, [
|
|
2321
|
+
_e(ut, tt(S.$attrs, {
|
|
2289
2322
|
"is-schema-driven": "",
|
|
2290
2323
|
layout: "scroll",
|
|
2291
2324
|
density: t.density,
|
|
@@ -2297,24 +2330,27 @@ const ln = /* @__PURE__ */ Ve({
|
|
|
2297
2330
|
"is-expandable": t.isExpandable,
|
|
2298
2331
|
"is-selectable": t.isSelectable,
|
|
2299
2332
|
radius: t.radius,
|
|
2300
|
-
"sticky-header": t.stickyHeader
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2333
|
+
"sticky-header": t.stickyHeader,
|
|
2334
|
+
"pinned-left-width": m.value,
|
|
2335
|
+
"pinned-right-width": d.value,
|
|
2336
|
+
"table-min-width": s.value
|
|
2337
|
+
}), xe({
|
|
2338
|
+
head: G(() => [
|
|
2339
|
+
(D(!0), j(U, null, Q(z(g).table.getHeaderGroups(), (F) => (D(), N(it, {
|
|
2340
|
+
key: F.id
|
|
2305
2341
|
}, {
|
|
2306
|
-
default:
|
|
2307
|
-
(
|
|
2308
|
-
key:
|
|
2309
|
-
"schema-driven-header":
|
|
2310
|
-
class:
|
|
2311
|
-
style:
|
|
2342
|
+
default: G(() => [
|
|
2343
|
+
(D(!0), j(U, null, Q(F.headers, ($) => (D(), N(lt, {
|
|
2344
|
+
key: $.id,
|
|
2345
|
+
"schema-driven-header": $,
|
|
2346
|
+
class: Pe(_($)),
|
|
2347
|
+
style: $e(h($))
|
|
2312
2348
|
}, {
|
|
2313
|
-
default:
|
|
2314
|
-
|
|
2349
|
+
default: G(() => [
|
|
2350
|
+
$.isPlaceholder ? Fe("", !0) : (D(), N(z(De), {
|
|
2315
2351
|
key: 0,
|
|
2316
|
-
render:
|
|
2317
|
-
props:
|
|
2352
|
+
render: $.column.columnDef.header,
|
|
2353
|
+
props: $.getContext()
|
|
2318
2354
|
}, null, 8, ["render", "props"]))
|
|
2319
2355
|
]),
|
|
2320
2356
|
_: 2
|
|
@@ -2323,26 +2359,26 @@ const ln = /* @__PURE__ */ Ve({
|
|
|
2323
2359
|
_: 2
|
|
2324
2360
|
}, 1024))), 128))
|
|
2325
2361
|
]),
|
|
2326
|
-
body:
|
|
2327
|
-
(
|
|
2328
|
-
var
|
|
2329
|
-
return
|
|
2330
|
-
key:
|
|
2331
|
-
"accent-color": (
|
|
2332
|
-
"is-expanded":
|
|
2362
|
+
body: G(() => [
|
|
2363
|
+
(D(!0), j(U, null, Q(z(g).table.getRowModel().rows, (F) => {
|
|
2364
|
+
var $;
|
|
2365
|
+
return D(), N(st, {
|
|
2366
|
+
key: F.id,
|
|
2367
|
+
"accent-color": ($ = t.getRowAccentColor) == null ? void 0 : $.call(t, F.original),
|
|
2368
|
+
"is-expanded": F.getIsExpanded(),
|
|
2333
2369
|
"hide-expansion-divider": t.hideExpansionDivider
|
|
2334
|
-
},
|
|
2335
|
-
default:
|
|
2336
|
-
(
|
|
2337
|
-
key:
|
|
2338
|
-
"is-control":
|
|
2339
|
-
class:
|
|
2340
|
-
style:
|
|
2370
|
+
}, xe({
|
|
2371
|
+
default: G(() => [
|
|
2372
|
+
(D(!0), j(U, null, Q(F.getVisibleCells(), (E) => (D(), N(rt, {
|
|
2373
|
+
key: E.id,
|
|
2374
|
+
"is-control": E.column.id === "select" || E.column.id === "expand",
|
|
2375
|
+
class: Pe(V(E)),
|
|
2376
|
+
style: $e(x(E))
|
|
2341
2377
|
}, {
|
|
2342
|
-
default:
|
|
2343
|
-
|
|
2344
|
-
render:
|
|
2345
|
-
props:
|
|
2378
|
+
default: G(() => [
|
|
2379
|
+
_e(z(De), {
|
|
2380
|
+
render: E.column.columnDef.cell,
|
|
2381
|
+
props: E.getContext()
|
|
2346
2382
|
}, null, 8, ["render", "props"])
|
|
2347
2383
|
]),
|
|
2348
2384
|
_: 2
|
|
@@ -2352,8 +2388,8 @@ const ln = /* @__PURE__ */ Ve({
|
|
|
2352
2388
|
}, [
|
|
2353
2389
|
r.expansion ? {
|
|
2354
2390
|
name: "expansion",
|
|
2355
|
-
fn:
|
|
2356
|
-
|
|
2391
|
+
fn: G(() => [
|
|
2392
|
+
Ie(S.$slots, "expansion", { row: F })
|
|
2357
2393
|
]),
|
|
2358
2394
|
key: "0"
|
|
2359
2395
|
} : void 0
|
|
@@ -2364,37 +2400,37 @@ const ln = /* @__PURE__ */ Ve({
|
|
|
2364
2400
|
}, [
|
|
2365
2401
|
S.$slots.empty ? {
|
|
2366
2402
|
name: "empty",
|
|
2367
|
-
fn:
|
|
2368
|
-
|
|
2403
|
+
fn: G(() => [
|
|
2404
|
+
Ie(S.$slots, "empty")
|
|
2369
2405
|
]),
|
|
2370
2406
|
key: "0"
|
|
2371
2407
|
} : void 0
|
|
2372
|
-
]), 1040, ["density", "empty-state-text", "has-actions", "has-custom-expand-toggle", "is-empty", "is-loading", "is-expandable", "is-selectable", "radius", "sticky-header"]),
|
|
2373
|
-
|
|
2408
|
+
]), 1040, ["density", "empty-state-text", "has-actions", "has-custom-expand-toggle", "is-empty", "is-loading", "is-expandable", "is-selectable", "radius", "sticky-header", "pinned-left-width", "pinned-right-width", "table-min-width"]),
|
|
2409
|
+
f.value ? (D(), N(ot, {
|
|
2374
2410
|
key: 0,
|
|
2375
2411
|
class: "mt-6",
|
|
2376
|
-
"current-page":
|
|
2377
|
-
"list-length":
|
|
2378
|
-
"page-size":
|
|
2379
|
-
onSetPage:
|
|
2380
|
-
}, null, 8, ["current-page", "list-length", "page-size"])) :
|
|
2412
|
+
"current-page": z(g).table.getState().pagination.pageIndex + 1,
|
|
2413
|
+
"list-length": z(g).table.getFilteredRowModel().rows.length,
|
|
2414
|
+
"page-size": z(g).table.getState().pagination.pageSize,
|
|
2415
|
+
onSetPage: v[0] || (v[0] = (F) => z(g).table.setPageIndex(F - 1))
|
|
2416
|
+
}, null, 8, ["current-page", "list-length", "page-size"])) : Fe("", !0)
|
|
2381
2417
|
], 64));
|
|
2382
2418
|
}
|
|
2383
|
-
}),
|
|
2419
|
+
}), an = {
|
|
2384
2420
|
"row-selection-checkbox": "_row-selection-checkbox_102yd_5",
|
|
2385
2421
|
"row-control-cell": "_row-control-cell_102yd_11"
|
|
2386
|
-
},
|
|
2387
|
-
$style:
|
|
2388
|
-
},
|
|
2422
|
+
}, gn = {
|
|
2423
|
+
$style: an
|
|
2424
|
+
}, xn = /* @__PURE__ */ at(un, [["__cssModules", gn]]);
|
|
2389
2425
|
export {
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2426
|
+
xn as DataTable,
|
|
2427
|
+
Fn as createColumnHelper,
|
|
2428
|
+
De as flexRender,
|
|
2429
|
+
Ue as getCoreRowModel,
|
|
2430
|
+
Xe as getExpandedRowModel,
|
|
2431
|
+
Zt as getFilteredRowModel,
|
|
2432
|
+
bt as getPaginationRowModel,
|
|
2433
|
+
en as getSortedRowModel,
|
|
2434
|
+
rn as useDataTable
|
|
2399
2435
|
};
|
|
2400
2436
|
//# sourceMappingURL=index.js.map
|