@soft-stech/bootsman-ui-shadcn 1.1.16 → 1.1.18
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/BuiDataTable.vue_vue_type_script_setup_true_lang-CcM2IC6f.js +219 -0
- package/dist/{variables-BFHGTsK4.js → BuiPaginationCommon.vue_vue_type_script_setup_true_lang-dh6FvXRc.js} +4 -3
- package/dist/{BuiDataTable.vue_vue_type_script_setup_true_lang-DY56g6bi.js → BuiTableRowSubrow.vue_vue_type_script_setup_true_lang-zozuVlJm.js} +553 -670
- package/dist/assets/main.css +1 -1
- package/dist/components/ui/pagination/BuiPaginationCommon.js +1 -1
- package/dist/components/ui/pagination/index.js +1 -1
- package/dist/components/ui/table/BuiDataTable.js +1 -1
- package/dist/components/ui/table/BuiDataTable.vue.d.ts +10 -1
- package/dist/components/ui/table/BuiTableRowSubrow.js +4 -0
- package/dist/components/ui/table/BuiTableRowSubrow.vue.d.ts +35 -0
- package/dist/components/ui/table/index.d.ts +1 -0
- package/dist/components/ui/table/index.js +18 -16
- package/dist/index.js +315 -312
- package/package.json +2 -1
- package/src/components/stories/{Collapsible.story.vue → BuiCollapsible.story.vue} +1 -1
- package/src/components/stories/BuiDataTable.story.vue +59 -17
- package/src/components/stories/data/tasks.json +2 -1
- package/src/components/ui/pagination/BuiPaginationCommon.vue +1 -1
- package/src/components/ui/table/BuiDataTable.vue +58 -15
- package/src/components/ui/table/BuiTableRowSubrow.vue +30 -0
- package/src/components/ui/table/index.ts +1 -0
@@ -1,15 +1,11 @@
|
|
1
|
-
import { defineComponent as
|
2
|
-
import { _ as
|
3
|
-
import { _ as
|
4
|
-
|
5
|
-
import
|
6
|
-
import
|
7
|
-
import
|
8
|
-
|
9
|
-
import { _ as Ue } from "./BuiTableEmpty.vue_vue_type_script_setup_true_lang-BRA5Uz6D.js";
|
10
|
-
import { _ as je } from "./BuiTableFooter.vue_vue_type_script_setup_true_lang-_Im-lcXC.js";
|
11
|
-
import { _ as Xe } from "./variables-BFHGTsK4.js";
|
12
|
-
import { v as W } from "./utils-DMgok1im.js";
|
1
|
+
import { defineComponent as Se, h as Me, ref as Ie, watchEffect as xe, openBlock as y, createElementBlock as ae, Fragment as ge, createVNode as N, unref as E, normalizeClass as ye, withCtx as G, renderList as Ee, createBlock as k, resolveDynamicComponent as De, createCommentVNode as He } from "vue";
|
2
|
+
import { _ as de } from "./BuiTableCell.vue_vue_type_script_setup_true_lang-DwoXqpKg.js";
|
3
|
+
import { _ as fe } from "./BuiTableRow.vue_vue_type_script_setup_true_lang-Dh4QgH7f.js";
|
4
|
+
/* empty css */
|
5
|
+
import "./BuiCalendar.vue_vue_type_style_index_0_lang-BWeH1wsj.js";
|
6
|
+
import "./components/ui/toast/use-toast.js";
|
7
|
+
import "./index-BGsblnmA.js";
|
8
|
+
/* empty css */
|
13
9
|
/**
|
14
10
|
* table-core
|
15
11
|
*
|
@@ -20,24 +16,24 @@ import { v as W } from "./utils-DMgok1im.js";
|
|
20
16
|
*
|
21
17
|
* @license MIT
|
22
18
|
*/
|
23
|
-
function
|
19
|
+
function I(e, o) {
|
24
20
|
return typeof e == "function" ? e(o) : e;
|
25
21
|
}
|
26
|
-
function
|
22
|
+
function F(e, o) {
|
27
23
|
return (t) => {
|
28
24
|
o.setState((n) => ({
|
29
25
|
...n,
|
30
|
-
[e]:
|
26
|
+
[e]: I(t, n[e])
|
31
27
|
}));
|
32
28
|
};
|
33
29
|
}
|
34
|
-
function
|
30
|
+
function T(e) {
|
35
31
|
return e instanceof Function;
|
36
32
|
}
|
37
|
-
function
|
33
|
+
function Ge(e) {
|
38
34
|
return Array.isArray(e) && e.every((o) => typeof o == "number");
|
39
35
|
}
|
40
|
-
function
|
36
|
+
function Ae(e, o) {
|
41
37
|
const t = [], n = (r) => {
|
42
38
|
r.forEach((i) => {
|
43
39
|
t.push(i);
|
@@ -47,26 +43,26 @@ function Ye(e, o) {
|
|
47
43
|
};
|
48
44
|
return n(e), t;
|
49
45
|
}
|
50
|
-
function
|
46
|
+
function m(e, o, t) {
|
51
47
|
let n = [], r;
|
52
48
|
return (i) => {
|
53
49
|
let l;
|
54
50
|
t.key && t.debug && (l = Date.now());
|
55
51
|
const s = e(i);
|
56
|
-
if (!(s.length !== n.length || s.some((
|
52
|
+
if (!(s.length !== n.length || s.some((d, S) => n[S] !== d)))
|
57
53
|
return r;
|
58
54
|
n = s;
|
59
|
-
let
|
60
|
-
if (t.key && t.debug && (
|
61
|
-
const
|
62
|
-
for (
|
63
|
-
|
64
|
-
return
|
55
|
+
let g;
|
56
|
+
if (t.key && t.debug && (g = Date.now()), r = o(...s), t == null || t.onChange == null || t.onChange(r), t.key && t.debug && t != null && t.debug()) {
|
57
|
+
const d = Math.round((Date.now() - l) * 100) / 100, S = Math.round((Date.now() - g) * 100) / 100, f = S / 16, a = (c, p) => {
|
58
|
+
for (c = String(c); c.length < p; )
|
59
|
+
c = " " + c;
|
60
|
+
return c;
|
65
61
|
};
|
66
|
-
console.info(`%c⏱ ${
|
62
|
+
console.info(`%c⏱ ${a(S, 5)} /${a(d, 5)} ms`, `
|
67
63
|
font-size: .6rem;
|
68
64
|
font-weight: bold;
|
69
|
-
color: hsl(${Math.max(0, Math.min(120 - 120 *
|
65
|
+
color: hsl(${Math.max(0, Math.min(120 - 120 * f, 120))}deg 100% 31%);`, t?.key);
|
70
66
|
}
|
71
67
|
return r;
|
72
68
|
};
|
@@ -81,7 +77,7 @@ function C(e, o, t, n) {
|
|
81
77
|
onChange: n
|
82
78
|
};
|
83
79
|
}
|
84
|
-
function
|
80
|
+
function Le(e, o, t, n) {
|
85
81
|
const r = () => {
|
86
82
|
var l;
|
87
83
|
return (l = i.getValue()) != null ? l : e.options.renderFallbackValue;
|
@@ -91,61 +87,61 @@ function Je(e, o, t, n) {
|
|
91
87
|
column: t,
|
92
88
|
getValue: () => o.getValue(n),
|
93
89
|
renderValue: r,
|
94
|
-
getContext:
|
90
|
+
getContext: m(() => [e, t, o, i], (l, s, u, g) => ({
|
95
91
|
table: l,
|
96
92
|
column: s,
|
97
93
|
row: u,
|
98
|
-
cell:
|
99
|
-
getValue:
|
100
|
-
renderValue:
|
94
|
+
cell: g,
|
95
|
+
getValue: g.getValue,
|
96
|
+
renderValue: g.renderValue
|
101
97
|
}), C(e.options, "debugCells", "cell.getContext"))
|
102
98
|
};
|
103
99
|
return e._features.forEach((l) => {
|
104
100
|
l.createCell == null || l.createCell(i, t, o, e);
|
105
101
|
}, {}), i;
|
106
102
|
}
|
107
|
-
function
|
103
|
+
function ze(e, o, t, n) {
|
108
104
|
var r, i;
|
109
105
|
const s = {
|
110
106
|
...e._getDefaultColumnDef(),
|
111
107
|
...o
|
112
108
|
}, u = s.accessorKey;
|
113
|
-
let
|
114
|
-
if (s.accessorFn ?
|
115
|
-
let
|
116
|
-
for (const
|
117
|
-
var
|
118
|
-
|
109
|
+
let g = (r = (i = s.id) != null ? i : u ? u.replace(".", "_") : void 0) != null ? r : typeof s.header == "string" ? s.header : void 0, d;
|
110
|
+
if (s.accessorFn ? d = s.accessorFn : u && (u.includes(".") ? d = (f) => {
|
111
|
+
let a = f;
|
112
|
+
for (const p of u.split(".")) {
|
113
|
+
var c;
|
114
|
+
a = (c = a) == null ? void 0 : c[p], process.env.NODE_ENV !== "production" && a === void 0 && console.warn(`"${p}" in deeply nested key "${u}" returned undefined.`);
|
119
115
|
}
|
120
|
-
return
|
121
|
-
} :
|
116
|
+
return a;
|
117
|
+
} : d = (f) => f[s.accessorKey]), !g)
|
122
118
|
throw process.env.NODE_ENV !== "production" ? new Error(s.accessorFn ? "Columns require an id when using an accessorFn" : "Columns require an id when using a non-string header") : new Error();
|
123
|
-
let
|
124
|
-
id: `${String(
|
125
|
-
accessorFn:
|
119
|
+
let S = {
|
120
|
+
id: `${String(g)}`,
|
121
|
+
accessorFn: d,
|
126
122
|
parent: n,
|
127
123
|
depth: t,
|
128
124
|
columnDef: s,
|
129
125
|
columns: [],
|
130
|
-
getFlatColumns:
|
131
|
-
var
|
132
|
-
return [
|
126
|
+
getFlatColumns: m(() => [!0], () => {
|
127
|
+
var f;
|
128
|
+
return [S, ...(f = S.columns) == null ? void 0 : f.flatMap((a) => a.getFlatColumns())];
|
133
129
|
}, C(e.options, "debugColumns", "column.getFlatColumns")),
|
134
|
-
getLeafColumns:
|
135
|
-
var
|
136
|
-
if ((
|
137
|
-
let
|
138
|
-
return
|
130
|
+
getLeafColumns: m(() => [e._getOrderColumnsFn()], (f) => {
|
131
|
+
var a;
|
132
|
+
if ((a = S.columns) != null && a.length) {
|
133
|
+
let c = S.columns.flatMap((p) => p.getLeafColumns());
|
134
|
+
return f(c);
|
139
135
|
}
|
140
|
-
return [
|
136
|
+
return [S];
|
141
137
|
}, C(e.options, "debugColumns", "column.getLeafColumns"))
|
142
138
|
};
|
143
|
-
for (const
|
144
|
-
|
145
|
-
return
|
139
|
+
for (const f of e._features)
|
140
|
+
f.createColumn == null || f.createColumn(S, e);
|
141
|
+
return S;
|
146
142
|
}
|
147
|
-
const
|
148
|
-
function
|
143
|
+
const _ = "debugHeaders";
|
144
|
+
function ce(e, o, t) {
|
149
145
|
var n;
|
150
146
|
let i = {
|
151
147
|
id: (n = t.id) != null ? n : o.id,
|
@@ -174,92 +170,92 @@ function Re(e, o, t) {
|
|
174
170
|
l.createHeader == null || l.createHeader(i, e);
|
175
171
|
}), i;
|
176
172
|
}
|
177
|
-
const
|
173
|
+
const Oe = {
|
178
174
|
createTable: (e) => {
|
179
|
-
e.getHeaderGroups =
|
175
|
+
e.getHeaderGroups = m(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (o, t, n, r) => {
|
180
176
|
var i, l;
|
181
|
-
const s = (i = n?.map((
|
182
|
-
return
|
183
|
-
}, C(e.options,
|
177
|
+
const s = (i = n?.map((S) => t.find((f) => f.id === S)).filter(Boolean)) != null ? i : [], u = (l = r?.map((S) => t.find((f) => f.id === S)).filter(Boolean)) != null ? l : [], g = t.filter((S) => !(n != null && n.includes(S.id)) && !(r != null && r.includes(S.id)));
|
178
|
+
return A(o, [...s, ...g, ...u], e);
|
179
|
+
}, C(e.options, _, "getHeaderGroups")), e.getCenterHeaderGroups = m(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (o, t, n, r) => (t = t.filter((i) => !(n != null && n.includes(i.id)) && !(r != null && r.includes(i.id))), A(o, t, e, "center")), C(e.options, _, "getCenterHeaderGroups")), e.getLeftHeaderGroups = m(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left], (o, t, n) => {
|
184
180
|
var r;
|
185
181
|
const i = (r = n?.map((l) => t.find((s) => s.id === l)).filter(Boolean)) != null ? r : [];
|
186
|
-
return
|
187
|
-
}, C(e.options,
|
182
|
+
return A(o, i, e, "left");
|
183
|
+
}, C(e.options, _, "getLeftHeaderGroups")), e.getRightHeaderGroups = m(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.right], (o, t, n) => {
|
188
184
|
var r;
|
189
185
|
const i = (r = n?.map((l) => t.find((s) => s.id === l)).filter(Boolean)) != null ? r : [];
|
190
|
-
return
|
191
|
-
}, C(e.options,
|
186
|
+
return A(o, i, e, "right");
|
187
|
+
}, C(e.options, _, "getRightHeaderGroups")), e.getFooterGroups = m(() => [e.getHeaderGroups()], (o) => [...o].reverse(), C(e.options, _, "getFooterGroups")), e.getLeftFooterGroups = m(() => [e.getLeftHeaderGroups()], (o) => [...o].reverse(), C(e.options, _, "getLeftFooterGroups")), e.getCenterFooterGroups = m(() => [e.getCenterHeaderGroups()], (o) => [...o].reverse(), C(e.options, _, "getCenterFooterGroups")), e.getRightFooterGroups = m(() => [e.getRightHeaderGroups()], (o) => [...o].reverse(), C(e.options, _, "getRightFooterGroups")), e.getFlatHeaders = m(() => [e.getHeaderGroups()], (o) => o.map((t) => t.headers).flat(), C(e.options, _, "getFlatHeaders")), e.getLeftFlatHeaders = m(() => [e.getLeftHeaderGroups()], (o) => o.map((t) => t.headers).flat(), C(e.options, _, "getLeftFlatHeaders")), e.getCenterFlatHeaders = m(() => [e.getCenterHeaderGroups()], (o) => o.map((t) => t.headers).flat(), C(e.options, _, "getCenterFlatHeaders")), e.getRightFlatHeaders = m(() => [e.getRightHeaderGroups()], (o) => o.map((t) => t.headers).flat(), C(e.options, _, "getRightFlatHeaders")), e.getCenterLeafHeaders = m(() => [e.getCenterFlatHeaders()], (o) => o.filter((t) => {
|
192
188
|
var n;
|
193
189
|
return !((n = t.subHeaders) != null && n.length);
|
194
|
-
}), C(e.options,
|
190
|
+
}), C(e.options, _, "getCenterLeafHeaders")), e.getLeftLeafHeaders = m(() => [e.getLeftFlatHeaders()], (o) => o.filter((t) => {
|
195
191
|
var n;
|
196
192
|
return !((n = t.subHeaders) != null && n.length);
|
197
|
-
}), C(e.options,
|
193
|
+
}), C(e.options, _, "getLeftLeafHeaders")), e.getRightLeafHeaders = m(() => [e.getRightFlatHeaders()], (o) => o.filter((t) => {
|
198
194
|
var n;
|
199
195
|
return !((n = t.subHeaders) != null && n.length);
|
200
|
-
}), C(e.options,
|
201
|
-
var r, i, l, s, u,
|
202
|
-
return [...(r = (i = o[0]) == null ? void 0 : i.headers) != null ? r : [], ...(l = (s = t[0]) == null ? void 0 : s.headers) != null ? l : [], ...(u = (
|
203
|
-
}, C(e.options,
|
196
|
+
}), C(e.options, _, "getRightLeafHeaders")), e.getLeafHeaders = m(() => [e.getLeftHeaderGroups(), e.getCenterHeaderGroups(), e.getRightHeaderGroups()], (o, t, n) => {
|
197
|
+
var r, i, l, s, u, g;
|
198
|
+
return [...(r = (i = o[0]) == null ? void 0 : i.headers) != null ? r : [], ...(l = (s = t[0]) == null ? void 0 : s.headers) != null ? l : [], ...(u = (g = n[0]) == null ? void 0 : g.headers) != null ? u : []].map((d) => d.getLeafHeaders()).flat();
|
199
|
+
}, C(e.options, _, "getLeafHeaders"));
|
204
200
|
}
|
205
201
|
};
|
206
|
-
function
|
202
|
+
function A(e, o, t, n) {
|
207
203
|
var r, i;
|
208
204
|
let l = 0;
|
209
|
-
const s = function(
|
210
|
-
|
211
|
-
var
|
212
|
-
(
|
205
|
+
const s = function(f, a) {
|
206
|
+
a === void 0 && (a = 1), l = Math.max(l, a), f.filter((c) => c.getIsVisible()).forEach((c) => {
|
207
|
+
var p;
|
208
|
+
(p = c.columns) != null && p.length && s(c.columns, a + 1);
|
213
209
|
}, 0);
|
214
210
|
};
|
215
211
|
s(e);
|
216
212
|
let u = [];
|
217
|
-
const
|
218
|
-
const
|
219
|
-
depth:
|
220
|
-
id: [n, `${
|
213
|
+
const g = (f, a) => {
|
214
|
+
const c = {
|
215
|
+
depth: a,
|
216
|
+
id: [n, `${a}`].filter(Boolean).join("_"),
|
221
217
|
headers: []
|
222
|
-
},
|
223
|
-
|
224
|
-
const
|
225
|
-
let h,
|
226
|
-
if (
|
227
|
-
|
218
|
+
}, p = [];
|
219
|
+
f.forEach((R) => {
|
220
|
+
const w = [...p].reverse()[0], v = R.column.depth === c.depth;
|
221
|
+
let h, $ = !1;
|
222
|
+
if (v && R.column.parent ? h = R.column.parent : (h = R.column, $ = !0), w && w?.column === h)
|
223
|
+
w.subHeaders.push(R);
|
228
224
|
else {
|
229
|
-
const
|
230
|
-
id: [n,
|
231
|
-
isPlaceholder:
|
232
|
-
placeholderId:
|
233
|
-
depth:
|
234
|
-
index:
|
225
|
+
const P = ce(t, h, {
|
226
|
+
id: [n, a, h.id, R?.id].filter(Boolean).join("_"),
|
227
|
+
isPlaceholder: $,
|
228
|
+
placeholderId: $ ? `${p.filter((q) => q.column === h).length}` : void 0,
|
229
|
+
depth: a,
|
230
|
+
index: p.length
|
235
231
|
});
|
236
|
-
|
232
|
+
P.subHeaders.push(R), p.push(P);
|
237
233
|
}
|
238
|
-
|
239
|
-
}), u.push(
|
240
|
-
},
|
234
|
+
c.headers.push(R), R.headerGroup = c;
|
235
|
+
}), u.push(c), a > 0 && g(p, a - 1);
|
236
|
+
}, d = o.map((f, a) => ce(t, f, {
|
241
237
|
depth: l,
|
242
|
-
index:
|
238
|
+
index: a
|
243
239
|
}));
|
244
|
-
|
245
|
-
const
|
246
|
-
let
|
247
|
-
|
240
|
+
g(d, l - 1), u.reverse();
|
241
|
+
const S = (f) => f.filter((c) => c.column.getIsVisible()).map((c) => {
|
242
|
+
let p = 0, R = 0, w = [0];
|
243
|
+
c.subHeaders && c.subHeaders.length ? (w = [], S(c.subHeaders).forEach((h) => {
|
248
244
|
let {
|
249
|
-
colSpan:
|
250
|
-
rowSpan:
|
245
|
+
colSpan: $,
|
246
|
+
rowSpan: P
|
251
247
|
} = h;
|
252
|
-
|
253
|
-
})) :
|
254
|
-
const
|
255
|
-
return
|
256
|
-
colSpan:
|
257
|
-
rowSpan:
|
248
|
+
p += $, w.push(P);
|
249
|
+
})) : p = 1;
|
250
|
+
const v = Math.min(...w);
|
251
|
+
return R = R + v, c.colSpan = p, c.rowSpan = R, {
|
252
|
+
colSpan: p,
|
253
|
+
rowSpan: R
|
258
254
|
};
|
259
255
|
});
|
260
|
-
return
|
256
|
+
return S((r = (i = u[0]) == null ? void 0 : i.headers) != null ? r : []), u;
|
261
257
|
}
|
262
|
-
const
|
258
|
+
const Be = (e, o, t, n, r, i, l) => {
|
263
259
|
let s = {
|
264
260
|
id: o,
|
265
261
|
index: n,
|
@@ -271,90 +267,90 @@ const Ze = (e, o, t, n, r, i, l) => {
|
|
271
267
|
getValue: (u) => {
|
272
268
|
if (s._valuesCache.hasOwnProperty(u))
|
273
269
|
return s._valuesCache[u];
|
274
|
-
const
|
275
|
-
if (
|
276
|
-
return s._valuesCache[u] =
|
270
|
+
const g = e.getColumn(u);
|
271
|
+
if (g != null && g.accessorFn)
|
272
|
+
return s._valuesCache[u] = g.accessorFn(s.original, n), s._valuesCache[u];
|
277
273
|
},
|
278
274
|
getUniqueValues: (u) => {
|
279
275
|
if (s._uniqueValuesCache.hasOwnProperty(u))
|
280
276
|
return s._uniqueValuesCache[u];
|
281
|
-
const
|
282
|
-
if (
|
283
|
-
return
|
277
|
+
const g = e.getColumn(u);
|
278
|
+
if (g != null && g.accessorFn)
|
279
|
+
return g.columnDef.getUniqueValues ? (s._uniqueValuesCache[u] = g.columnDef.getUniqueValues(s.original, n), s._uniqueValuesCache[u]) : (s._uniqueValuesCache[u] = [s.getValue(u)], s._uniqueValuesCache[u]);
|
284
280
|
},
|
285
281
|
renderValue: (u) => {
|
286
|
-
var
|
287
|
-
return (
|
282
|
+
var g;
|
283
|
+
return (g = s.getValue(u)) != null ? g : e.options.renderFallbackValue;
|
288
284
|
},
|
289
285
|
subRows: i ?? [],
|
290
|
-
getLeafRows: () =>
|
286
|
+
getLeafRows: () => Ae(s.subRows, (u) => u.subRows),
|
291
287
|
getParentRow: () => s.parentId ? e.getRow(s.parentId, !0) : void 0,
|
292
288
|
getParentRows: () => {
|
293
|
-
let u = [],
|
289
|
+
let u = [], g = s;
|
294
290
|
for (; ; ) {
|
295
|
-
const
|
296
|
-
if (!
|
291
|
+
const d = g.getParentRow();
|
292
|
+
if (!d)
|
297
293
|
break;
|
298
|
-
u.push(
|
294
|
+
u.push(d), g = d;
|
299
295
|
}
|
300
296
|
return u.reverse();
|
301
297
|
},
|
302
|
-
getAllCells:
|
303
|
-
_getAllCellsByColumnId:
|
298
|
+
getAllCells: m(() => [e.getAllLeafColumns()], (u) => u.map((g) => Le(e, s, g, g.id)), C(e.options, "debugRows", "getAllCells")),
|
299
|
+
_getAllCellsByColumnId: m(() => [s.getAllCells()], (u) => u.reduce((g, d) => (g[d.column.id] = d, g), {}), C(e.options, "debugRows", "getAllCellsByColumnId"))
|
304
300
|
};
|
305
301
|
for (let u = 0; u < e._features.length; u++) {
|
306
|
-
const
|
307
|
-
|
302
|
+
const g = e._features[u];
|
303
|
+
g == null || g.createRow == null || g.createRow(s, e);
|
308
304
|
}
|
309
305
|
return s;
|
310
|
-
},
|
306
|
+
}, Te = {
|
311
307
|
createColumn: (e, o) => {
|
312
308
|
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 = () => {
|
313
309
|
if (e._getFacetedMinMaxValues)
|
314
310
|
return e._getFacetedMinMaxValues();
|
315
311
|
};
|
316
312
|
}
|
317
|
-
},
|
313
|
+
}, me = (e, o, t) => {
|
318
314
|
var n;
|
319
315
|
const r = t.toLowerCase();
|
320
316
|
return !!(!((n = e.getValue(o)) == null || (n = n.toString()) == null || (n = n.toLowerCase()) == null) && n.includes(r));
|
321
317
|
};
|
322
|
-
|
323
|
-
const
|
318
|
+
me.autoRemove = (e) => V(e);
|
319
|
+
const Ce = (e, o, t) => {
|
324
320
|
var n;
|
325
321
|
return !!(!((n = e.getValue(o)) == null || (n = n.toString()) == null) && n.includes(t));
|
326
322
|
};
|
327
|
-
|
328
|
-
const
|
323
|
+
Ce.autoRemove = (e) => V(e);
|
324
|
+
const we = (e, o, t) => {
|
329
325
|
var n;
|
330
326
|
return ((n = e.getValue(o)) == null || (n = n.toString()) == null ? void 0 : n.toLowerCase()) === t?.toLowerCase();
|
331
327
|
};
|
332
|
-
|
333
|
-
const
|
328
|
+
we.autoRemove = (e) => V(e);
|
329
|
+
const Re = (e, o, t) => {
|
334
330
|
var n;
|
335
331
|
return (n = e.getValue(o)) == null ? void 0 : n.includes(t);
|
336
332
|
};
|
337
|
-
|
338
|
-
const
|
333
|
+
Re.autoRemove = (e) => V(e) || !(e != null && e.length);
|
334
|
+
const he = (e, o, t) => !t.some((n) => {
|
339
335
|
var r;
|
340
336
|
return !((r = e.getValue(o)) != null && r.includes(n));
|
341
337
|
});
|
342
|
-
|
343
|
-
const
|
338
|
+
he.autoRemove = (e) => V(e) || !(e != null && e.length);
|
339
|
+
const ve = (e, o, t) => t.some((n) => {
|
344
340
|
var r;
|
345
341
|
return (r = e.getValue(o)) == null ? void 0 : r.includes(n);
|
346
342
|
});
|
347
|
-
|
348
|
-
const
|
349
|
-
|
350
|
-
const
|
351
|
-
|
352
|
-
const
|
343
|
+
ve.autoRemove = (e) => V(e) || !(e != null && e.length);
|
344
|
+
const _e = (e, o, t) => e.getValue(o) === t;
|
345
|
+
_e.autoRemove = (e) => V(e);
|
346
|
+
const Fe = (e, o, t) => e.getValue(o) == t;
|
347
|
+
Fe.autoRemove = (e) => V(e);
|
348
|
+
const oe = (e, o, t) => {
|
353
349
|
let [n, r] = t;
|
354
350
|
const i = e.getValue(o);
|
355
351
|
return i >= n && i <= r;
|
356
352
|
};
|
357
|
-
|
353
|
+
oe.resolveFilterValue = (e) => {
|
358
354
|
let [o, t] = e, n = typeof o != "number" ? parseFloat(o) : o, r = typeof t != "number" ? parseFloat(t) : t, i = o === null || Number.isNaN(n) ? -1 / 0 : n, l = t === null || Number.isNaN(r) ? 1 / 0 : r;
|
359
355
|
if (i > l) {
|
360
356
|
const s = i;
|
@@ -362,22 +358,22 @@ de.resolveFilterValue = (e) => {
|
|
362
358
|
}
|
363
359
|
return [i, l];
|
364
360
|
};
|
365
|
-
|
366
|
-
const
|
367
|
-
includesString:
|
368
|
-
includesStringSensitive:
|
369
|
-
equalsString:
|
370
|
-
arrIncludes:
|
371
|
-
arrIncludesAll:
|
372
|
-
arrIncludesSome:
|
373
|
-
equals:
|
374
|
-
weakEquals:
|
375
|
-
inNumberRange:
|
361
|
+
oe.autoRemove = (e) => V(e) || V(e[0]) && V(e[1]);
|
362
|
+
const M = {
|
363
|
+
includesString: me,
|
364
|
+
includesStringSensitive: Ce,
|
365
|
+
equalsString: we,
|
366
|
+
arrIncludes: Re,
|
367
|
+
arrIncludesAll: he,
|
368
|
+
arrIncludesSome: ve,
|
369
|
+
equals: _e,
|
370
|
+
weakEquals: Fe,
|
371
|
+
inNumberRange: oe
|
376
372
|
};
|
377
|
-
function
|
373
|
+
function V(e) {
|
378
374
|
return e == null || e === "";
|
379
375
|
}
|
380
|
-
const
|
376
|
+
const qe = {
|
381
377
|
getDefaultColumnDef: () => ({
|
382
378
|
filterFn: "auto"
|
383
379
|
}),
|
@@ -386,19 +382,19 @@ const et = {
|
|
386
382
|
...e
|
387
383
|
}),
|
388
384
|
getDefaultOptions: (e) => ({
|
389
|
-
onColumnFiltersChange:
|
385
|
+
onColumnFiltersChange: F("columnFilters", e),
|
390
386
|
filterFromLeafRows: !1,
|
391
387
|
maxLeafRowFilterDepth: 100
|
392
388
|
}),
|
393
389
|
createColumn: (e, o) => {
|
394
390
|
e.getAutoFilterFn = () => {
|
395
391
|
const t = o.getCoreRowModel().flatRows[0], n = t?.getValue(e.id);
|
396
|
-
return typeof n == "string" ?
|
392
|
+
return typeof n == "string" ? M.includesString : typeof n == "number" ? M.inNumberRange : typeof n == "boolean" || n !== null && typeof n == "object" ? M.equals : Array.isArray(n) ? M.arrIncludes : M.weakEquals;
|
397
393
|
}, e.getFilterFn = () => {
|
398
394
|
var t, n;
|
399
|
-
return
|
395
|
+
return T(e.columnDef.filterFn) ? e.columnDef.filterFn : e.columnDef.filterFn === "auto" ? e.getAutoFilterFn() : (
|
400
396
|
// @ts-ignore
|
401
|
-
(t = (n = o.options.filterFns) == null ? void 0 : n[e.columnDef.filterFn]) != null ? t :
|
397
|
+
(t = (n = o.options.filterFns) == null ? void 0 : n[e.columnDef.filterFn]) != null ? t : M[e.columnDef.filterFn]
|
402
398
|
);
|
403
399
|
}, e.getCanFilter = () => {
|
404
400
|
var t, n, r;
|
@@ -411,18 +407,18 @@ const et = {
|
|
411
407
|
return (t = (n = o.getState().columnFilters) == null ? void 0 : n.findIndex((r) => r.id === e.id)) != null ? t : -1;
|
412
408
|
}, e.setFilterValue = (t) => {
|
413
409
|
o.setColumnFilters((n) => {
|
414
|
-
const r = e.getFilterFn(), i = n?.find((
|
415
|
-
if (
|
410
|
+
const r = e.getFilterFn(), i = n?.find((d) => d.id === e.id), l = I(t, i ? i.value : void 0);
|
411
|
+
if (pe(r, l, e)) {
|
416
412
|
var s;
|
417
|
-
return (s = n?.filter((
|
413
|
+
return (s = n?.filter((d) => d.id !== e.id)) != null ? s : [];
|
418
414
|
}
|
419
415
|
const u = {
|
420
416
|
id: e.id,
|
421
417
|
value: l
|
422
418
|
};
|
423
419
|
if (i) {
|
424
|
-
var
|
425
|
-
return (
|
420
|
+
var g;
|
421
|
+
return (g = n?.map((d) => d.id === e.id ? u : d)) != null ? g : [];
|
426
422
|
}
|
427
423
|
return n != null && n.length ? [...n, u] : [u];
|
428
424
|
});
|
@@ -435,11 +431,11 @@ const et = {
|
|
435
431
|
e.setColumnFilters = (o) => {
|
436
432
|
const t = e.getAllLeafColumns(), n = (r) => {
|
437
433
|
var i;
|
438
|
-
return (i =
|
434
|
+
return (i = I(o, r)) == null ? void 0 : i.filter((l) => {
|
439
435
|
const s = t.find((u) => u.id === l.id);
|
440
436
|
if (s) {
|
441
437
|
const u = s.getFilterFn();
|
442
|
-
if (
|
438
|
+
if (pe(u, l.value, s))
|
443
439
|
return !1;
|
444
440
|
}
|
445
441
|
return !0;
|
@@ -452,58 +448,58 @@ const et = {
|
|
452
448
|
}, 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());
|
453
449
|
}
|
454
450
|
};
|
455
|
-
function
|
451
|
+
function pe(e, o, t) {
|
456
452
|
return (e && e.autoRemove ? e.autoRemove(o, t) : !1) || typeof o > "u" || typeof o == "string" && !o;
|
457
453
|
}
|
458
|
-
const
|
454
|
+
const Ne = (e, o, t) => t.reduce((n, r) => {
|
459
455
|
const i = r.getValue(e);
|
460
456
|
return n + (typeof i == "number" ? i : 0);
|
461
|
-
}, 0),
|
457
|
+
}, 0), ke = (e, o, t) => {
|
462
458
|
let n;
|
463
459
|
return t.forEach((r) => {
|
464
460
|
const i = r.getValue(e);
|
465
461
|
i != null && (n > i || n === void 0 && i >= i) && (n = i);
|
466
462
|
}), n;
|
467
|
-
},
|
463
|
+
}, Ue = (e, o, t) => {
|
468
464
|
let n;
|
469
465
|
return t.forEach((r) => {
|
470
466
|
const i = r.getValue(e);
|
471
467
|
i != null && (n < i || n === void 0 && i >= i) && (n = i);
|
472
468
|
}), n;
|
473
|
-
},
|
469
|
+
}, je = (e, o, t) => {
|
474
470
|
let n, r;
|
475
471
|
return t.forEach((i) => {
|
476
472
|
const l = i.getValue(e);
|
477
473
|
l != null && (n === void 0 ? l >= l && (n = r = l) : (n > l && (n = l), r < l && (r = l)));
|
478
474
|
}), [n, r];
|
479
|
-
},
|
475
|
+
}, Xe = (e, o) => {
|
480
476
|
let t = 0, n = 0;
|
481
477
|
if (o.forEach((r) => {
|
482
478
|
let i = r.getValue(e);
|
483
479
|
i != null && (i = +i) >= i && (++t, n += i);
|
484
480
|
}), t)
|
485
481
|
return n / t;
|
486
|
-
},
|
482
|
+
}, Ke = (e, o) => {
|
487
483
|
if (!o.length)
|
488
484
|
return;
|
489
485
|
const t = o.map((i) => i.getValue(e));
|
490
|
-
if (!
|
486
|
+
if (!Ge(t))
|
491
487
|
return;
|
492
488
|
if (t.length === 1)
|
493
489
|
return t[0];
|
494
490
|
const n = Math.floor(t.length / 2), r = t.sort((i, l) => i - l);
|
495
491
|
return t.length % 2 !== 0 ? r[n] : (r[n - 1] + r[n]) / 2;
|
496
|
-
},
|
497
|
-
sum:
|
498
|
-
min:
|
499
|
-
max:
|
500
|
-
extent:
|
501
|
-
mean:
|
502
|
-
median:
|
503
|
-
unique:
|
504
|
-
uniqueCount:
|
505
|
-
count:
|
506
|
-
},
|
492
|
+
}, Ye = (e, o) => Array.from(new Set(o.map((t) => t.getValue(e))).values()), Je = (e, o) => new Set(o.map((t) => t.getValue(e))).size, Qe = (e, o) => o.length, U = {
|
493
|
+
sum: Ne,
|
494
|
+
min: ke,
|
495
|
+
max: Ue,
|
496
|
+
extent: je,
|
497
|
+
mean: Xe,
|
498
|
+
median: Ke,
|
499
|
+
unique: Ye,
|
500
|
+
uniqueCount: Je,
|
501
|
+
count: Qe
|
502
|
+
}, We = {
|
507
503
|
getDefaultColumnDef: () => ({
|
508
504
|
aggregatedCell: (e) => {
|
509
505
|
var o, t;
|
@@ -516,7 +512,7 @@ const tt = (e, o, t) => t.reduce((n, r) => {
|
|
516
512
|
...e
|
517
513
|
}),
|
518
514
|
getDefaultOptions: (e) => ({
|
519
|
-
onGroupingChange:
|
515
|
+
onGroupingChange: F("grouping", e),
|
520
516
|
groupedColumnMode: "reorder"
|
521
517
|
}),
|
522
518
|
createColumn: (e, o) => {
|
@@ -539,14 +535,14 @@ const tt = (e, o, t) => t.reduce((n, r) => {
|
|
539
535
|
}, e.getAutoAggregationFn = () => {
|
540
536
|
const t = o.getCoreRowModel().flatRows[0], n = t?.getValue(e.id);
|
541
537
|
if (typeof n == "number")
|
542
|
-
return
|
538
|
+
return U.sum;
|
543
539
|
if (Object.prototype.toString.call(n) === "[object Date]")
|
544
|
-
return
|
540
|
+
return U.extent;
|
545
541
|
}, e.getAggregationFn = () => {
|
546
542
|
var t, n;
|
547
543
|
if (!e)
|
548
544
|
throw new Error();
|
549
|
-
return
|
545
|
+
return T(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 : U[e.columnDef.aggregationFn];
|
550
546
|
};
|
551
547
|
},
|
552
548
|
createTable: (e) => {
|
@@ -570,27 +566,27 @@ const tt = (e, o, t) => t.reduce((n, r) => {
|
|
570
566
|
};
|
571
567
|
}
|
572
568
|
};
|
573
|
-
function
|
569
|
+
function Ze(e, o, t) {
|
574
570
|
if (!(o != null && o.length) || !t)
|
575
571
|
return e;
|
576
572
|
const n = e.filter((i) => !o.includes(i.id));
|
577
573
|
return t === "remove" ? n : [...o.map((i) => e.find((l) => l.id === i)).filter(Boolean), ...n];
|
578
574
|
}
|
579
|
-
const
|
575
|
+
const be = {
|
580
576
|
getInitialState: (e) => ({
|
581
577
|
columnOrder: [],
|
582
578
|
...e
|
583
579
|
}),
|
584
580
|
getDefaultOptions: (e) => ({
|
585
|
-
onColumnOrderChange:
|
581
|
+
onColumnOrderChange: F("columnOrder", e)
|
586
582
|
}),
|
587
583
|
createColumn: (e, o) => {
|
588
|
-
e.getIndex =
|
584
|
+
e.getIndex = m((t) => [H(o, t)], (t) => t.findIndex((n) => n.id === e.id), C(o.options, "debugColumns", "getIndex")), e.getIsFirstColumn = (t) => {
|
589
585
|
var n;
|
590
|
-
return ((n =
|
586
|
+
return ((n = H(o, t)[0]) == null ? void 0 : n.id) === e.id;
|
591
587
|
}, e.getIsLastColumn = (t) => {
|
592
588
|
var n;
|
593
|
-
const r =
|
589
|
+
const r = H(o, t);
|
594
590
|
return ((n = r[r.length - 1]) == null ? void 0 : n.id) === e.id;
|
595
591
|
};
|
596
592
|
},
|
@@ -598,31 +594,31 @@ const ft = {
|
|
598
594
|
e.setColumnOrder = (o) => e.options.onColumnOrderChange == null ? void 0 : e.options.onColumnOrderChange(o), e.resetColumnOrder = (o) => {
|
599
595
|
var t;
|
600
596
|
e.setColumnOrder(o ? [] : (t = e.initialState.columnOrder) != null ? t : []);
|
601
|
-
}, e._getOrderColumnsFn =
|
597
|
+
}, e._getOrderColumnsFn = m(() => [e.getState().columnOrder, e.getState().grouping, e.options.groupedColumnMode], (o, t, n) => (r) => {
|
602
598
|
let i = [];
|
603
599
|
if (!(o != null && o.length))
|
604
600
|
i = r;
|
605
601
|
else {
|
606
602
|
const l = [...o], s = [...r];
|
607
603
|
for (; s.length && l.length; ) {
|
608
|
-
const u = l.shift(),
|
609
|
-
|
604
|
+
const u = l.shift(), g = s.findIndex((d) => d.id === u);
|
605
|
+
g > -1 && i.push(s.splice(g, 1)[0]);
|
610
606
|
}
|
611
607
|
i = [...i, ...s];
|
612
608
|
}
|
613
|
-
return
|
609
|
+
return Ze(i, t, n);
|
614
610
|
}, C(e.options, "debugTable", "_getOrderColumnsFn"));
|
615
611
|
}
|
616
|
-
},
|
612
|
+
}, j = () => ({
|
617
613
|
left: [],
|
618
614
|
right: []
|
619
|
-
}),
|
615
|
+
}), et = {
|
620
616
|
getInitialState: (e) => ({
|
621
|
-
columnPinning:
|
617
|
+
columnPinning: j(),
|
622
618
|
...e
|
623
619
|
}),
|
624
620
|
getDefaultOptions: (e) => ({
|
625
|
-
onColumnPinningChange:
|
621
|
+
onColumnPinningChange: F("columnPinning", e)
|
626
622
|
}),
|
627
623
|
createColumn: (e, o) => {
|
628
624
|
e.pin = (t) => {
|
@@ -632,20 +628,20 @@ const ft = {
|
|
632
628
|
if (t === "right") {
|
633
629
|
var s, u;
|
634
630
|
return {
|
635
|
-
left: ((s = r?.left) != null ? s : []).filter((
|
636
|
-
right: [...((u = r?.right) != null ? u : []).filter((
|
631
|
+
left: ((s = r?.left) != null ? s : []).filter((S) => !(n != null && n.includes(S))),
|
632
|
+
right: [...((u = r?.right) != null ? u : []).filter((S) => !(n != null && n.includes(S))), ...n]
|
637
633
|
};
|
638
634
|
}
|
639
635
|
if (t === "left") {
|
640
|
-
var
|
636
|
+
var g, d;
|
641
637
|
return {
|
642
|
-
left: [...((
|
643
|
-
right: ((
|
638
|
+
left: [...((g = r?.left) != null ? g : []).filter((S) => !(n != null && n.includes(S))), ...n],
|
639
|
+
right: ((d = r?.right) != null ? d : []).filter((S) => !(n != null && n.includes(S)))
|
644
640
|
};
|
645
641
|
}
|
646
642
|
return {
|
647
|
-
left: ((i = r?.left) != null ? i : []).filter((
|
648
|
-
right: ((l = r?.right) != null ? l : []).filter((
|
643
|
+
left: ((i = r?.left) != null ? i : []).filter((S) => !(n != null && n.includes(S))),
|
644
|
+
right: ((l = r?.right) != null ? l : []).filter((S) => !(n != null && n.includes(S)))
|
649
645
|
};
|
650
646
|
});
|
651
647
|
}, e.getCanPin = () => e.getLeafColumns().some((n) => {
|
@@ -664,13 +660,13 @@ const ft = {
|
|
664
660
|
};
|
665
661
|
},
|
666
662
|
createRow: (e, o) => {
|
667
|
-
e.getCenterVisibleCells =
|
663
|
+
e.getCenterVisibleCells = m(() => [e._getAllVisibleCells(), o.getState().columnPinning.left, o.getState().columnPinning.right], (t, n, r) => {
|
668
664
|
const i = [...n ?? [], ...r ?? []];
|
669
665
|
return t.filter((l) => !i.includes(l.column.id));
|
670
|
-
}, C(o.options, "debugRows", "getCenterVisibleCells")), e.getLeftVisibleCells =
|
666
|
+
}, C(o.options, "debugRows", "getCenterVisibleCells")), e.getLeftVisibleCells = m(() => [e._getAllVisibleCells(), o.getState().columnPinning.left], (t, n) => (n ?? []).map((i) => t.find((l) => l.column.id === i)).filter(Boolean).map((i) => ({
|
671
667
|
...i,
|
672
668
|
position: "left"
|
673
|
-
})), C(o.options, "debugRows", "getLeftVisibleCells")), e.getRightVisibleCells =
|
669
|
+
})), C(o.options, "debugRows", "getLeftVisibleCells")), e.getRightVisibleCells = m(() => [e._getAllVisibleCells(), o.getState().columnPinning.right], (t, n) => (n ?? []).map((i) => t.find((l) => l.column.id === i)).filter(Boolean).map((i) => ({
|
674
670
|
...i,
|
675
671
|
position: "right"
|
676
672
|
})), C(o.options, "debugRows", "getRightVisibleCells"));
|
@@ -678,7 +674,7 @@ const ft = {
|
|
678
674
|
createTable: (e) => {
|
679
675
|
e.setColumnPinning = (o) => e.options.onColumnPinningChange == null ? void 0 : e.options.onColumnPinningChange(o), e.resetColumnPinning = (o) => {
|
680
676
|
var t, n;
|
681
|
-
return e.setColumnPinning(o ?
|
677
|
+
return e.setColumnPinning(o ? j() : (t = (n = e.initialState) == null ? void 0 : n.columnPinning) != null ? t : j());
|
682
678
|
}, e.getIsSomeColumnsPinned = (o) => {
|
683
679
|
var t;
|
684
680
|
const n = e.getState().columnPinning;
|
@@ -687,41 +683,41 @@ const ft = {
|
|
687
683
|
return !!((r = n.left) != null && r.length || (i = n.right) != null && i.length);
|
688
684
|
}
|
689
685
|
return !!((t = n[o]) != null && t.length);
|
690
|
-
}, e.getLeftLeafColumns =
|
686
|
+
}, e.getLeftLeafColumns = m(() => [e.getAllLeafColumns(), e.getState().columnPinning.left], (o, t) => (t ?? []).map((n) => o.find((r) => r.id === n)).filter(Boolean), C(e.options, "debugColumns", "getLeftLeafColumns")), e.getRightLeafColumns = m(() => [e.getAllLeafColumns(), e.getState().columnPinning.right], (o, t) => (t ?? []).map((n) => o.find((r) => r.id === n)).filter(Boolean), C(e.options, "debugColumns", "getRightLeafColumns")), e.getCenterLeafColumns = m(() => [e.getAllLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (o, t, n) => {
|
691
687
|
const r = [...t ?? [], ...n ?? []];
|
692
688
|
return o.filter((i) => !r.includes(i.id));
|
693
689
|
}, C(e.options, "debugColumns", "getCenterLeafColumns"));
|
694
690
|
}
|
695
|
-
},
|
691
|
+
}, L = {
|
696
692
|
size: 150,
|
697
693
|
minSize: 20,
|
698
694
|
maxSize: Number.MAX_SAFE_INTEGER
|
699
|
-
},
|
695
|
+
}, X = () => ({
|
700
696
|
startOffset: null,
|
701
697
|
startSize: null,
|
702
698
|
deltaOffset: null,
|
703
699
|
deltaPercentage: null,
|
704
700
|
isResizingColumn: !1,
|
705
701
|
columnSizingStart: []
|
706
|
-
}),
|
707
|
-
getDefaultColumnDef: () =>
|
702
|
+
}), tt = {
|
703
|
+
getDefaultColumnDef: () => L,
|
708
704
|
getInitialState: (e) => ({
|
709
705
|
columnSizing: {},
|
710
|
-
columnSizingInfo:
|
706
|
+
columnSizingInfo: X(),
|
711
707
|
...e
|
712
708
|
}),
|
713
709
|
getDefaultOptions: (e) => ({
|
714
710
|
columnResizeMode: "onEnd",
|
715
711
|
columnResizeDirection: "ltr",
|
716
|
-
onColumnSizingChange:
|
717
|
-
onColumnSizingInfoChange:
|
712
|
+
onColumnSizingChange: F("columnSizing", e),
|
713
|
+
onColumnSizingInfoChange: F("columnSizingInfo", e)
|
718
714
|
}),
|
719
715
|
createColumn: (e, o) => {
|
720
716
|
e.getSize = () => {
|
721
717
|
var t, n, r;
|
722
718
|
const i = o.getState().columnSizing[e.id];
|
723
|
-
return Math.min(Math.max((t = e.columnDef.minSize) != null ? t :
|
724
|
-
}, e.getStart =
|
719
|
+
return Math.min(Math.max((t = e.columnDef.minSize) != null ? t : L.minSize, (n = i ?? e.columnDef.size) != null ? n : L.size), (r = e.columnDef.maxSize) != null ? r : L.maxSize);
|
720
|
+
}, e.getStart = m((t) => [t, H(o, t), o.getState().columnSizing], (t, n) => n.slice(0, e.getIndex(t)).reduce((r, i) => r + i.getSize(), 0), C(o.options, "debugColumns", "getStart")), e.getAfter = m((t) => [t, H(o, t), o.getState().columnSizing], (t, n) => n.slice(e.getIndex(t) + 1).reduce((r, i) => r + i.getSize(), 0), C(o.options, "debugColumns", "getAfter")), e.resetSize = () => {
|
725
721
|
o.setColumnSizing((t) => {
|
726
722
|
let {
|
727
723
|
[e.id]: n,
|
@@ -755,27 +751,27 @@ const ft = {
|
|
755
751
|
}, e.getResizeHandler = (t) => {
|
756
752
|
const n = o.getColumn(e.column.id), r = n?.getCanResize();
|
757
753
|
return (i) => {
|
758
|
-
if (!n || !r || (i.persist == null || i.persist(),
|
754
|
+
if (!n || !r || (i.persist == null || i.persist(), K(i) && i.touches && i.touches.length > 1))
|
759
755
|
return;
|
760
|
-
const l = e.getSize(), s = e ? e.getLeafHeaders().map((
|
761
|
-
typeof
|
762
|
-
var
|
763
|
-
const
|
764
|
-
return h.columnSizingStart.forEach((
|
765
|
-
let [
|
766
|
-
|
756
|
+
const l = e.getSize(), s = e ? e.getLeafHeaders().map((w) => [w.column.id, w.column.getSize()]) : [[n.id, n.getSize()]], u = K(i) ? Math.round(i.touches[0].clientX) : i.clientX, g = {}, d = (w, v) => {
|
757
|
+
typeof v == "number" && (o.setColumnSizingInfo((h) => {
|
758
|
+
var $, P;
|
759
|
+
const q = o.options.columnResizeDirection === "rtl" ? -1 : 1, le = (v - (($ = h?.startOffset) != null ? $ : 0)) * q, se = Math.max(le / ((P = h?.startSize) != null ? P : 0), -0.999999);
|
760
|
+
return h.columnSizingStart.forEach((Ve) => {
|
761
|
+
let [Pe, ue] = Ve;
|
762
|
+
g[Pe] = Math.round(Math.max(ue + ue * se, 0) * 100) / 100;
|
767
763
|
}), {
|
768
764
|
...h,
|
769
|
-
deltaOffset:
|
770
|
-
deltaPercentage:
|
765
|
+
deltaOffset: le,
|
766
|
+
deltaPercentage: se
|
771
767
|
};
|
772
|
-
}), (o.options.columnResizeMode === "onChange" ||
|
768
|
+
}), (o.options.columnResizeMode === "onChange" || w === "end") && o.setColumnSizing((h) => ({
|
773
769
|
...h,
|
774
|
-
...
|
770
|
+
...g
|
775
771
|
})));
|
776
|
-
},
|
777
|
-
|
778
|
-
...
|
772
|
+
}, S = (w) => d("move", w), f = (w) => {
|
773
|
+
d("end", w), o.setColumnSizingInfo((v) => ({
|
774
|
+
...v,
|
779
775
|
isResizingColumn: !1,
|
780
776
|
startOffset: null,
|
781
777
|
startSize: null,
|
@@ -783,22 +779,22 @@ const ft = {
|
|
783
779
|
deltaPercentage: null,
|
784
780
|
columnSizingStart: []
|
785
781
|
}));
|
786
|
-
},
|
787
|
-
moveHandler: (
|
788
|
-
upHandler: (
|
789
|
-
|
782
|
+
}, a = t || typeof document < "u" ? document : null, c = {
|
783
|
+
moveHandler: (w) => S(w.clientX),
|
784
|
+
upHandler: (w) => {
|
785
|
+
a?.removeEventListener("mousemove", c.moveHandler), a?.removeEventListener("mouseup", c.upHandler), f(w.clientX);
|
790
786
|
}
|
791
|
-
},
|
792
|
-
moveHandler: (
|
793
|
-
upHandler: (
|
794
|
-
var
|
795
|
-
|
787
|
+
}, p = {
|
788
|
+
moveHandler: (w) => (w.cancelable && (w.preventDefault(), w.stopPropagation()), S(w.touches[0].clientX), !1),
|
789
|
+
upHandler: (w) => {
|
790
|
+
var v;
|
791
|
+
a?.removeEventListener("touchmove", p.moveHandler), a?.removeEventListener("touchend", p.upHandler), w.cancelable && (w.preventDefault(), w.stopPropagation()), f((v = w.touches[0]) == null ? void 0 : v.clientX);
|
796
792
|
}
|
797
|
-
},
|
793
|
+
}, R = nt() ? {
|
798
794
|
passive: !1
|
799
795
|
} : !1;
|
800
|
-
|
801
|
-
...
|
796
|
+
K(i) ? (a?.addEventListener("touchmove", p.moveHandler, R), a?.addEventListener("touchend", p.upHandler, R)) : (a?.addEventListener("mousemove", c.moveHandler, R), a?.addEventListener("mouseup", c.upHandler, R)), o.setColumnSizingInfo((w) => ({
|
797
|
+
...w,
|
802
798
|
startOffset: u,
|
803
799
|
startSize: l,
|
804
800
|
deltaOffset: 0,
|
@@ -815,7 +811,7 @@ const ft = {
|
|
815
811
|
e.setColumnSizing(o ? {} : (t = e.initialState.columnSizing) != null ? t : {});
|
816
812
|
}, e.resetHeaderSizeInfo = (o) => {
|
817
813
|
var t;
|
818
|
-
e.setColumnSizingInfo(o ?
|
814
|
+
e.setColumnSizingInfo(o ? X() : (t = e.initialState.columnSizingInfo) != null ? t : X());
|
819
815
|
}, e.getTotalSize = () => {
|
820
816
|
var o, t;
|
821
817
|
return (o = (t = e.getHeaderGroups()[0]) == null ? void 0 : t.headers.reduce((n, r) => n + r.getSize(), 0)) != null ? o : 0;
|
@@ -831,10 +827,10 @@ const ft = {
|
|
831
827
|
};
|
832
828
|
}
|
833
829
|
};
|
834
|
-
let
|
835
|
-
function
|
836
|
-
if (typeof
|
837
|
-
return
|
830
|
+
let z = null;
|
831
|
+
function nt() {
|
832
|
+
if (typeof z == "boolean")
|
833
|
+
return z;
|
838
834
|
let e = !1;
|
839
835
|
try {
|
840
836
|
const o = {
|
@@ -847,18 +843,18 @@ function mt() {
|
|
847
843
|
} catch {
|
848
844
|
e = !1;
|
849
845
|
}
|
850
|
-
return
|
846
|
+
return z = e, z;
|
851
847
|
}
|
852
|
-
function
|
848
|
+
function K(e) {
|
853
849
|
return e.type === "touchstart";
|
854
850
|
}
|
855
|
-
const
|
851
|
+
const ot = {
|
856
852
|
getInitialState: (e) => ({
|
857
853
|
columnVisibility: {},
|
858
854
|
...e
|
859
855
|
}),
|
860
856
|
getDefaultOptions: (e) => ({
|
861
|
-
onColumnVisibilityChange:
|
857
|
+
onColumnVisibilityChange: F("columnVisibility", e)
|
862
858
|
}),
|
863
859
|
createColumn: (e, o) => {
|
864
860
|
e.toggleVisibility = (t) => {
|
@@ -878,10 +874,10 @@ const St = {
|
|
878
874
|
};
|
879
875
|
},
|
880
876
|
createRow: (e, o) => {
|
881
|
-
e._getAllVisibleCells =
|
877
|
+
e._getAllVisibleCells = m(() => [e.getAllCells(), o.getState().columnVisibility], (t) => t.filter((n) => n.column.getIsVisible()), C(o.options, "debugRows", "_getAllVisibleCells")), e.getVisibleCells = m(() => [e.getLeftVisibleCells(), e.getCenterVisibleCells(), e.getRightVisibleCells()], (t, n, r) => [...t, ...n, ...r], C(o.options, "debugRows", "getVisibleCells"));
|
882
878
|
},
|
883
879
|
createTable: (e) => {
|
884
|
-
const o = (t, n) =>
|
880
|
+
const o = (t, n) => m(() => [n(), n().filter((r) => r.getIsVisible()).map((r) => r.id).join("_")], (r) => r.filter((i) => i.getIsVisible == null ? void 0 : i.getIsVisible()), C(e.options, "debugColumns", t));
|
885
881
|
e.getVisibleFlatColumns = o("getVisibleFlatColumns", () => e.getAllFlatColumns()), e.getVisibleLeafColumns = o("getVisibleLeafColumns", () => e.getAllLeafColumns()), e.getLeftVisibleLeafColumns = o("getLeftVisibleLeafColumns", () => e.getLeftLeafColumns()), e.getRightVisibleLeafColumns = o("getRightVisibleLeafColumns", () => e.getRightLeafColumns()), e.getCenterVisibleLeafColumns = o("getCenterVisibleLeafColumns", () => e.getCenterLeafColumns()), e.setColumnVisibility = (t) => e.options.onColumnVisibilityChange == null ? void 0 : e.options.onColumnVisibilityChange(t), e.resetColumnVisibility = (t) => {
|
886
882
|
var n;
|
887
883
|
e.setColumnVisibility(t ? {} : (n = e.initialState.columnVisibility) != null ? n : {});
|
@@ -897,23 +893,23 @@ const St = {
|
|
897
893
|
};
|
898
894
|
}
|
899
895
|
};
|
900
|
-
function
|
896
|
+
function H(e, o) {
|
901
897
|
return o ? o === "center" ? e.getCenterVisibleLeafColumns() : o === "left" ? e.getLeftVisibleLeafColumns() : e.getRightVisibleLeafColumns() : e.getVisibleLeafColumns();
|
902
898
|
}
|
903
|
-
const
|
899
|
+
const rt = {
|
904
900
|
createTable: (e) => {
|
905
901
|
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 = () => {
|
906
902
|
if (e._getGlobalFacetedMinMaxValues)
|
907
903
|
return e._getGlobalFacetedMinMaxValues();
|
908
904
|
};
|
909
905
|
}
|
910
|
-
},
|
906
|
+
}, it = {
|
911
907
|
getInitialState: (e) => ({
|
912
908
|
globalFilter: void 0,
|
913
909
|
...e
|
914
910
|
}),
|
915
911
|
getDefaultOptions: (e) => ({
|
916
|
-
onGlobalFilterChange:
|
912
|
+
onGlobalFilterChange: F("globalFilter", e),
|
917
913
|
globalFilterFn: "auto",
|
918
914
|
getColumnCanGlobalFilter: (o) => {
|
919
915
|
var t;
|
@@ -928,25 +924,25 @@ const Ct = {
|
|
928
924
|
};
|
929
925
|
},
|
930
926
|
createTable: (e) => {
|
931
|
-
e.getGlobalAutoFilterFn = () =>
|
927
|
+
e.getGlobalAutoFilterFn = () => M.includesString, e.getGlobalFilterFn = () => {
|
932
928
|
var o, t;
|
933
929
|
const {
|
934
930
|
globalFilterFn: n
|
935
931
|
} = e.options;
|
936
|
-
return
|
932
|
+
return T(n) ? n : n === "auto" ? e.getGlobalAutoFilterFn() : (o = (t = e.options.filterFns) == null ? void 0 : t[n]) != null ? o : M[n];
|
937
933
|
}, e.setGlobalFilter = (o) => {
|
938
934
|
e.options.onGlobalFilterChange == null || e.options.onGlobalFilterChange(o);
|
939
935
|
}, e.resetGlobalFilter = (o) => {
|
940
936
|
e.setGlobalFilter(o ? void 0 : e.initialState.globalFilter);
|
941
937
|
};
|
942
938
|
}
|
943
|
-
},
|
939
|
+
}, lt = {
|
944
940
|
getInitialState: (e) => ({
|
945
941
|
expanded: {},
|
946
942
|
...e
|
947
943
|
}),
|
948
944
|
getDefaultOptions: (e) => ({
|
949
|
-
onExpandedChange:
|
945
|
+
onExpandedChange: F("expanded", e),
|
950
946
|
paginateExpandedRows: !0
|
951
947
|
}),
|
952
948
|
createTable: (e) => {
|
@@ -1028,19 +1024,19 @@ const Ct = {
|
|
1028
1024
|
};
|
1029
1025
|
};
|
1030
1026
|
}
|
1031
|
-
},
|
1032
|
-
pageIndex:
|
1033
|
-
pageSize:
|
1034
|
-
}),
|
1027
|
+
}, Z = 0, b = 10, Y = () => ({
|
1028
|
+
pageIndex: Z,
|
1029
|
+
pageSize: b
|
1030
|
+
}), st = {
|
1035
1031
|
getInitialState: (e) => ({
|
1036
1032
|
...e,
|
1037
1033
|
pagination: {
|
1038
|
-
...
|
1034
|
+
...Y(),
|
1039
1035
|
...e?.pagination
|
1040
1036
|
}
|
1041
1037
|
}),
|
1042
1038
|
getDefaultOptions: (e) => ({
|
1043
|
-
onPaginationChange:
|
1039
|
+
onPaginationChange: F("pagination", e)
|
1044
1040
|
}),
|
1045
1041
|
createTable: (e) => {
|
1046
1042
|
let o = !1, t = !1;
|
@@ -1060,14 +1056,14 @@ const Ct = {
|
|
1060
1056
|
});
|
1061
1057
|
}
|
1062
1058
|
}, e.setPagination = (n) => {
|
1063
|
-
const r = (i) =>
|
1059
|
+
const r = (i) => I(n, i);
|
1064
1060
|
return e.options.onPaginationChange == null ? void 0 : e.options.onPaginationChange(r);
|
1065
1061
|
}, e.resetPagination = (n) => {
|
1066
1062
|
var r;
|
1067
|
-
e.setPagination(n ?
|
1063
|
+
e.setPagination(n ? Y() : (r = e.initialState.pagination) != null ? r : Y());
|
1068
1064
|
}, e.setPageIndex = (n) => {
|
1069
1065
|
e.setPagination((r) => {
|
1070
|
-
let i =
|
1066
|
+
let i = I(n, r.pageIndex);
|
1071
1067
|
const l = typeof e.options.pageCount > "u" || e.options.pageCount === -1 ? Number.MAX_SAFE_INTEGER : e.options.pageCount - 1;
|
1072
1068
|
return i = Math.max(0, Math.min(i, l)), {
|
1073
1069
|
...r,
|
@@ -1076,13 +1072,13 @@ const Ct = {
|
|
1076
1072
|
});
|
1077
1073
|
}, e.resetPageIndex = (n) => {
|
1078
1074
|
var r, i;
|
1079
|
-
e.setPageIndex(n ?
|
1075
|
+
e.setPageIndex(n ? Z : (r = (i = e.initialState) == null || (i = i.pagination) == null ? void 0 : i.pageIndex) != null ? r : Z);
|
1080
1076
|
}, e.resetPageSize = (n) => {
|
1081
1077
|
var r, i;
|
1082
|
-
e.setPageSize(n ?
|
1078
|
+
e.setPageSize(n ? b : (r = (i = e.initialState) == null || (i = i.pagination) == null ? void 0 : i.pageSize) != null ? r : b);
|
1083
1079
|
}, e.setPageSize = (n) => {
|
1084
1080
|
e.setPagination((r) => {
|
1085
|
-
const i = Math.max(1,
|
1081
|
+
const i = Math.max(1, I(n, r.pageSize)), l = r.pageSize * r.pageIndex, s = Math.floor(l / i);
|
1086
1082
|
return {
|
1087
1083
|
...r,
|
1088
1084
|
pageIndex: s,
|
@@ -1091,12 +1087,12 @@ const Ct = {
|
|
1091
1087
|
});
|
1092
1088
|
}, e.setPageCount = (n) => e.setPagination((r) => {
|
1093
1089
|
var i;
|
1094
|
-
let l =
|
1090
|
+
let l = I(n, (i = e.options.pageCount) != null ? i : -1);
|
1095
1091
|
return typeof l == "number" && (l = Math.max(-1, l)), {
|
1096
1092
|
...r,
|
1097
1093
|
pageCount: l
|
1098
1094
|
};
|
1099
|
-
}), e.getPageOptions =
|
1095
|
+
}), e.getPageOptions = m(() => [e.getPageCount()], (n) => {
|
1100
1096
|
let r = [];
|
1101
1097
|
return n && n > 0 && (r = [...new Array(n)].fill(null).map((i, l) => l)), r;
|
1102
1098
|
}, C(e.options, "debugTable", "getPageOptions")), e.getCanPreviousPage = () => e.getState().pagination.pageIndex > 0, e.getCanNextPage = () => {
|
@@ -1112,49 +1108,49 @@ const Ct = {
|
|
1112
1108
|
return (n = e.options.rowCount) != null ? n : e.getPrePaginationRowModel().rows.length;
|
1113
1109
|
};
|
1114
1110
|
}
|
1115
|
-
},
|
1111
|
+
}, J = () => ({
|
1116
1112
|
top: [],
|
1117
1113
|
bottom: []
|
1118
|
-
}),
|
1114
|
+
}), ut = {
|
1119
1115
|
getInitialState: (e) => ({
|
1120
|
-
rowPinning:
|
1116
|
+
rowPinning: J(),
|
1121
1117
|
...e
|
1122
1118
|
}),
|
1123
1119
|
getDefaultOptions: (e) => ({
|
1124
|
-
onRowPinningChange:
|
1120
|
+
onRowPinningChange: F("rowPinning", e)
|
1125
1121
|
}),
|
1126
1122
|
createRow: (e, o) => {
|
1127
1123
|
e.pin = (t, n, r) => {
|
1128
1124
|
const i = n ? e.getLeafRows().map((u) => {
|
1129
1125
|
let {
|
1130
|
-
id:
|
1126
|
+
id: g
|
1131
1127
|
} = u;
|
1132
|
-
return
|
1128
|
+
return g;
|
1133
1129
|
}) : [], l = r ? e.getParentRows().map((u) => {
|
1134
1130
|
let {
|
1135
|
-
id:
|
1131
|
+
id: g
|
1136
1132
|
} = u;
|
1137
|
-
return
|
1133
|
+
return g;
|
1138
1134
|
}) : [], s = /* @__PURE__ */ new Set([...l, e.id, ...i]);
|
1139
1135
|
o.setRowPinning((u) => {
|
1140
|
-
var
|
1136
|
+
var g, d;
|
1141
1137
|
if (t === "bottom") {
|
1142
|
-
var
|
1138
|
+
var S, f;
|
1143
1139
|
return {
|
1144
|
-
top: ((
|
1145
|
-
bottom: [...((
|
1140
|
+
top: ((S = u?.top) != null ? S : []).filter((p) => !(s != null && s.has(p))),
|
1141
|
+
bottom: [...((f = u?.bottom) != null ? f : []).filter((p) => !(s != null && s.has(p))), ...Array.from(s)]
|
1146
1142
|
};
|
1147
1143
|
}
|
1148
1144
|
if (t === "top") {
|
1149
|
-
var
|
1145
|
+
var a, c;
|
1150
1146
|
return {
|
1151
|
-
top: [...((
|
1152
|
-
bottom: ((
|
1147
|
+
top: [...((a = u?.top) != null ? a : []).filter((p) => !(s != null && s.has(p))), ...Array.from(s)],
|
1148
|
+
bottom: ((c = u?.bottom) != null ? c : []).filter((p) => !(s != null && s.has(p)))
|
1153
1149
|
};
|
1154
1150
|
}
|
1155
1151
|
return {
|
1156
|
-
top: ((
|
1157
|
-
bottom: ((
|
1152
|
+
top: ((g = u?.top) != null ? g : []).filter((p) => !(s != null && s.has(p))),
|
1153
|
+
bottom: ((d = u?.bottom) != null ? d : []).filter((p) => !(s != null && s.has(p)))
|
1158
1154
|
};
|
1159
1155
|
});
|
1160
1156
|
}, e.getCanPin = () => {
|
@@ -1187,7 +1183,7 @@ const Ct = {
|
|
1187
1183
|
createTable: (e) => {
|
1188
1184
|
e.setRowPinning = (o) => e.options.onRowPinningChange == null ? void 0 : e.options.onRowPinningChange(o), e.resetRowPinning = (o) => {
|
1189
1185
|
var t, n;
|
1190
|
-
return e.setRowPinning(o ?
|
1186
|
+
return e.setRowPinning(o ? J() : (t = (n = e.initialState) == null ? void 0 : n.rowPinning) != null ? t : J());
|
1191
1187
|
}, e.getIsSomeRowsPinned = (o) => {
|
1192
1188
|
var t;
|
1193
1189
|
const n = e.getState().rowPinning;
|
@@ -1196,7 +1192,7 @@ const Ct = {
|
|
1196
1192
|
return !!((r = n.top) != null && r.length || (i = n.bottom) != null && i.length);
|
1197
1193
|
}
|
1198
1194
|
return !!((t = n[o]) != null && t.length);
|
1199
|
-
}, e._getPinnedRows =
|
1195
|
+
}, e._getPinnedRows = m((o) => [e.getRowModel().rows, e.getState().rowPinning[o], o], (o, t, n) => {
|
1200
1196
|
var r;
|
1201
1197
|
return ((r = e.options.keepPinnedRows) == null || r ? (
|
1202
1198
|
//get all rows that are pinned even if they would not be otherwise visible
|
@@ -1212,18 +1208,18 @@ const Ct = {
|
|
1212
1208
|
...l,
|
1213
1209
|
position: n
|
1214
1210
|
}));
|
1215
|
-
}, C(e.options, "debugRows", "_getPinnedRows")), e.getTopRows = () => e._getPinnedRows("top"), e.getBottomRows = () => e._getPinnedRows("bottom"), e.getCenterRows =
|
1211
|
+
}, C(e.options, "debugRows", "_getPinnedRows")), e.getTopRows = () => e._getPinnedRows("top"), e.getBottomRows = () => e._getPinnedRows("bottom"), e.getCenterRows = m(() => [e.getRowModel().rows, e.getState().rowPinning.top, e.getState().rowPinning.bottom], (o, t, n) => {
|
1216
1212
|
const r = /* @__PURE__ */ new Set([...t ?? [], ...n ?? []]);
|
1217
1213
|
return o.filter((i) => !r.has(i.id));
|
1218
1214
|
}, C(e.options, "debugRows", "getCenterRows"));
|
1219
1215
|
}
|
1220
|
-
},
|
1216
|
+
}, at = {
|
1221
1217
|
getInitialState: (e) => ({
|
1222
1218
|
rowSelection: {},
|
1223
1219
|
...e
|
1224
1220
|
}),
|
1225
1221
|
getDefaultOptions: (e) => ({
|
1226
|
-
onRowSelectionChange:
|
1222
|
+
onRowSelectionChange: F("rowSelection", e),
|
1227
1223
|
enableRowSelection: !0,
|
1228
1224
|
enableMultiRowSelection: !0,
|
1229
1225
|
enableSubRowSelection: !0
|
@@ -1252,17 +1248,17 @@ const Ct = {
|
|
1252
1248
|
...t
|
1253
1249
|
};
|
1254
1250
|
return e.getRowModel().rows.forEach((i) => {
|
1255
|
-
|
1251
|
+
ee(r, i.id, n, !0, e);
|
1256
1252
|
}), r;
|
1257
|
-
}), e.getPreSelectedRowModel = () => e.getCoreRowModel(), e.getSelectedRowModel =
|
1253
|
+
}), e.getPreSelectedRowModel = () => e.getCoreRowModel(), e.getSelectedRowModel = m(() => [e.getState().rowSelection, e.getCoreRowModel()], (o, t) => Object.keys(o).length ? Q(e, t) : {
|
1258
1254
|
rows: [],
|
1259
1255
|
flatRows: [],
|
1260
1256
|
rowsById: {}
|
1261
|
-
}, C(e.options, "debugTable", "getSelectedRowModel")), e.getFilteredSelectedRowModel =
|
1257
|
+
}, C(e.options, "debugTable", "getSelectedRowModel")), e.getFilteredSelectedRowModel = m(() => [e.getState().rowSelection, e.getFilteredRowModel()], (o, t) => Object.keys(o).length ? Q(e, t) : {
|
1262
1258
|
rows: [],
|
1263
1259
|
flatRows: [],
|
1264
1260
|
rowsById: {}
|
1265
|
-
}, C(e.options, "debugTable", "getFilteredSelectedRowModel")), e.getGroupedSelectedRowModel =
|
1261
|
+
}, C(e.options, "debugTable", "getFilteredSelectedRowModel")), e.getGroupedSelectedRowModel = m(() => [e.getState().rowSelection, e.getSortedRowModel()], (o, t) => Object.keys(o).length ? Q(e, t) : {
|
1266
1262
|
rows: [],
|
1267
1263
|
flatRows: [],
|
1268
1264
|
rowsById: {}
|
@@ -1301,23 +1297,23 @@ const Ct = {
|
|
1301
1297
|
const s = {
|
1302
1298
|
...i
|
1303
1299
|
};
|
1304
|
-
return
|
1300
|
+
return ee(s, e.id, t, (l = n?.selectChildren) != null ? l : !0, o), s;
|
1305
1301
|
});
|
1306
1302
|
}, e.getIsSelected = () => {
|
1307
1303
|
const {
|
1308
1304
|
rowSelection: t
|
1309
1305
|
} = o.getState();
|
1310
|
-
return
|
1306
|
+
return re(e, t);
|
1311
1307
|
}, e.getIsSomeSelected = () => {
|
1312
1308
|
const {
|
1313
1309
|
rowSelection: t
|
1314
1310
|
} = o.getState();
|
1315
|
-
return
|
1311
|
+
return te(e, t) === "some";
|
1316
1312
|
}, e.getIsAllSubRowsSelected = () => {
|
1317
1313
|
const {
|
1318
1314
|
rowSelection: t
|
1319
1315
|
} = o.getState();
|
1320
|
-
return
|
1316
|
+
return te(e, t) === "all";
|
1321
1317
|
}, e.getCanSelect = () => {
|
1322
1318
|
var t;
|
1323
1319
|
return typeof o.options.enableRowSelection == "function" ? o.options.enableRowSelection(e) : (t = o.options.enableRowSelection) != null ? t : !0;
|
@@ -1335,20 +1331,20 @@ const Ct = {
|
|
1335
1331
|
};
|
1336
1332
|
};
|
1337
1333
|
}
|
1338
|
-
},
|
1334
|
+
}, ee = (e, o, t, n, r) => {
|
1339
1335
|
var i;
|
1340
1336
|
const l = r.getRow(o, !0);
|
1341
|
-
t ? (l.getCanMultiSelect() || Object.keys(e).forEach((s) => delete e[s]), l.getCanSelect() && (e[o] = !0)) : delete e[o], n && (i = l.subRows) != null && i.length && l.getCanSelectSubRows() && l.subRows.forEach((s) =>
|
1337
|
+
t ? (l.getCanMultiSelect() || Object.keys(e).forEach((s) => delete e[s]), l.getCanSelect() && (e[o] = !0)) : delete e[o], n && (i = l.subRows) != null && i.length && l.getCanSelectSubRows() && l.subRows.forEach((s) => ee(e, s.id, t, n, r));
|
1342
1338
|
};
|
1343
|
-
function
|
1339
|
+
function Q(e, o) {
|
1344
1340
|
const t = e.getState().rowSelection, n = [], r = {}, i = function(l, s) {
|
1345
1341
|
return l.map((u) => {
|
1346
|
-
var
|
1347
|
-
const
|
1348
|
-
if (
|
1342
|
+
var g;
|
1343
|
+
const d = re(u, t);
|
1344
|
+
if (d && (n.push(u), r[u.id] = u), (g = u.subRows) != null && g.length && (u = {
|
1349
1345
|
...u,
|
1350
1346
|
subRows: i(u.subRows)
|
1351
|
-
}),
|
1347
|
+
}), d)
|
1352
1348
|
return u;
|
1353
1349
|
}).filter(Boolean);
|
1354
1350
|
};
|
@@ -1358,34 +1354,34 @@ function re(e, o) {
|
|
1358
1354
|
rowsById: r
|
1359
1355
|
};
|
1360
1356
|
}
|
1361
|
-
function
|
1357
|
+
function re(e, o) {
|
1362
1358
|
var t;
|
1363
1359
|
return (t = o[e.id]) != null ? t : !1;
|
1364
1360
|
}
|
1365
|
-
function
|
1361
|
+
function te(e, o, t) {
|
1366
1362
|
var n;
|
1367
1363
|
if (!((n = e.subRows) != null && n.length))
|
1368
1364
|
return !1;
|
1369
1365
|
let r = !0, i = !1;
|
1370
1366
|
return e.subRows.forEach((l) => {
|
1371
|
-
if (!(i && !r) && (l.getCanSelect() && (
|
1372
|
-
const s =
|
1367
|
+
if (!(i && !r) && (l.getCanSelect() && (re(l, o) ? i = !0 : r = !1), l.subRows && l.subRows.length)) {
|
1368
|
+
const s = te(l, o);
|
1373
1369
|
s === "all" ? i = !0 : (s === "some" && (i = !0), r = !1);
|
1374
1370
|
}
|
1375
1371
|
}), r ? "all" : i ? "some" : !1;
|
1376
1372
|
}
|
1377
|
-
const
|
1373
|
+
const ne = /([0-9]+)/gm, gt = (e, o, t) => $e(x(e.getValue(t)).toLowerCase(), x(o.getValue(t)).toLowerCase()), dt = (e, o, t) => $e(x(e.getValue(t)), x(o.getValue(t))), ft = (e, o, t) => ie(x(e.getValue(t)).toLowerCase(), x(o.getValue(t)).toLowerCase()), ct = (e, o, t) => ie(x(e.getValue(t)), x(o.getValue(t))), pt = (e, o, t) => {
|
1378
1374
|
const n = e.getValue(t), r = o.getValue(t);
|
1379
1375
|
return n > r ? 1 : n < r ? -1 : 0;
|
1380
|
-
},
|
1381
|
-
function
|
1376
|
+
}, St = (e, o, t) => ie(e.getValue(t), o.getValue(t));
|
1377
|
+
function ie(e, o) {
|
1382
1378
|
return e === o ? 0 : e > o ? 1 : -1;
|
1383
1379
|
}
|
1384
|
-
function
|
1380
|
+
function x(e) {
|
1385
1381
|
return typeof e == "number" ? isNaN(e) || e === 1 / 0 || e === -1 / 0 ? "" : String(e) : typeof e == "string" ? e : "";
|
1386
1382
|
}
|
1387
|
-
function
|
1388
|
-
const t = e.split(
|
1383
|
+
function $e(e, o) {
|
1384
|
+
const t = e.split(ne).filter(Boolean), n = o.split(ne).filter(Boolean);
|
1389
1385
|
for (; t.length && n.length; ) {
|
1390
1386
|
const r = t.shift(), i = n.shift(), l = parseInt(r, 10), s = parseInt(i, 10), u = [l, s].sort();
|
1391
1387
|
if (isNaN(u[0])) {
|
@@ -1404,14 +1400,14 @@ function ye(e, o) {
|
|
1404
1400
|
}
|
1405
1401
|
return t.length - n.length;
|
1406
1402
|
}
|
1407
|
-
const
|
1408
|
-
alphanumeric:
|
1409
|
-
alphanumericCaseSensitive:
|
1410
|
-
text:
|
1411
|
-
textCaseSensitive:
|
1412
|
-
datetime:
|
1413
|
-
basic:
|
1414
|
-
},
|
1403
|
+
const D = {
|
1404
|
+
alphanumeric: gt,
|
1405
|
+
alphanumericCaseSensitive: dt,
|
1406
|
+
text: ft,
|
1407
|
+
textCaseSensitive: ct,
|
1408
|
+
datetime: pt,
|
1409
|
+
basic: St
|
1410
|
+
}, mt = {
|
1415
1411
|
getInitialState: (e) => ({
|
1416
1412
|
sorting: [],
|
1417
1413
|
...e
|
@@ -1421,7 +1417,7 @@ const A = {
|
|
1421
1417
|
sortUndefined: 1
|
1422
1418
|
}),
|
1423
1419
|
getDefaultOptions: (e) => ({
|
1424
|
-
onSortingChange:
|
1420
|
+
onSortingChange: F("sorting", e),
|
1425
1421
|
isMultiSortEvent: (o) => o.shiftKey
|
1426
1422
|
}),
|
1427
1423
|
createColumn: (e, o) => {
|
@@ -1431,11 +1427,11 @@ const A = {
|
|
1431
1427
|
for (const r of t) {
|
1432
1428
|
const i = r?.getValue(e.id);
|
1433
1429
|
if (Object.prototype.toString.call(i) === "[object Date]")
|
1434
|
-
return
|
1435
|
-
if (typeof i == "string" && (n = !0, i.split(
|
1436
|
-
return
|
1430
|
+
return D.datetime;
|
1431
|
+
if (typeof i == "string" && (n = !0, i.split(ne).length > 1))
|
1432
|
+
return D.alphanumeric;
|
1437
1433
|
}
|
1438
|
-
return n ?
|
1434
|
+
return n ? D.text : D.basic;
|
1439
1435
|
}, e.getAutoSortDir = () => {
|
1440
1436
|
const t = o.getFilteredRowModel().flatRows[0];
|
1441
1437
|
return typeof t?.getValue(e.id) == "string" ? "asc" : "desc";
|
@@ -1443,27 +1439,27 @@ const A = {
|
|
1443
1439
|
var t, n;
|
1444
1440
|
if (!e)
|
1445
1441
|
throw new Error();
|
1446
|
-
return
|
1442
|
+
return T(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 : D[e.columnDef.sortingFn];
|
1447
1443
|
}, e.toggleSorting = (t, n) => {
|
1448
1444
|
const r = e.getNextSortingOrder(), i = typeof t < "u" && t !== null;
|
1449
1445
|
o.setSorting((l) => {
|
1450
|
-
const s = l?.find((
|
1451
|
-
let
|
1452
|
-
if (l != null && l.length && e.getCanMultiSort() && n ? s ?
|
1453
|
-
var
|
1454
|
-
|
1446
|
+
const s = l?.find((a) => a.id === e.id), u = l?.findIndex((a) => a.id === e.id);
|
1447
|
+
let g = [], d, S = i ? t : r === "desc";
|
1448
|
+
if (l != null && l.length && e.getCanMultiSort() && n ? s ? d = "toggle" : d = "add" : l != null && l.length && u !== l.length - 1 ? d = "replace" : s ? d = "toggle" : d = "replace", d === "toggle" && (i || r || (d = "remove")), d === "add") {
|
1449
|
+
var f;
|
1450
|
+
g = [...l, {
|
1455
1451
|
id: e.id,
|
1456
|
-
desc:
|
1457
|
-
}],
|
1452
|
+
desc: S
|
1453
|
+
}], g.splice(0, g.length - ((f = o.options.maxMultiSortColCount) != null ? f : Number.MAX_SAFE_INTEGER));
|
1458
1454
|
} else
|
1459
|
-
|
1460
|
-
...
|
1461
|
-
desc:
|
1462
|
-
} :
|
1455
|
+
d === "toggle" ? g = l.map((a) => a.id === e.id ? {
|
1456
|
+
...a,
|
1457
|
+
desc: S
|
1458
|
+
} : a) : d === "remove" ? g = l.filter((a) => a.id !== e.id) : g = [{
|
1463
1459
|
id: e.id,
|
1464
|
-
desc:
|
1460
|
+
desc: S
|
1465
1461
|
}];
|
1466
|
-
return
|
1462
|
+
return g;
|
1467
1463
|
});
|
1468
1464
|
}, e.getFirstSortDir = () => {
|
1469
1465
|
var t, n;
|
@@ -1501,135 +1497,135 @@ const A = {
|
|
1501
1497
|
e.setSorting(o ? [] : (t = (n = e.initialState) == null ? void 0 : n.sorting) != null ? t : []);
|
1502
1498
|
}, 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());
|
1503
1499
|
}
|
1504
|
-
},
|
1505
|
-
|
1506
|
-
|
1507
|
-
ft,
|
1508
|
-
ct,
|
1500
|
+
}, Ct = [
|
1501
|
+
Oe,
|
1502
|
+
ot,
|
1509
1503
|
be,
|
1510
1504
|
et,
|
1511
|
-
|
1505
|
+
Te,
|
1506
|
+
qe,
|
1507
|
+
rt,
|
1512
1508
|
//depends on ColumnFaceting
|
1513
|
-
|
1509
|
+
it,
|
1514
1510
|
//depends on ColumnFiltering
|
1515
|
-
|
1516
|
-
|
1511
|
+
mt,
|
1512
|
+
We,
|
1517
1513
|
//depends on RowSorting
|
1518
|
-
|
1519
|
-
|
1520
|
-
|
1521
|
-
|
1522
|
-
|
1514
|
+
lt,
|
1515
|
+
st,
|
1516
|
+
ut,
|
1517
|
+
at,
|
1518
|
+
tt
|
1523
1519
|
];
|
1524
|
-
function
|
1520
|
+
function wt(e) {
|
1525
1521
|
var o, t;
|
1526
1522
|
process.env.NODE_ENV !== "production" && (e.debugAll || e.debugTable) && console.info("Creating Table Instance...");
|
1527
|
-
const n = [...
|
1523
|
+
const n = [...Ct, ...(o = e._features) != null ? o : []];
|
1528
1524
|
let r = {
|
1529
1525
|
_features: n
|
1530
1526
|
};
|
1531
|
-
const i = r._features.reduce((
|
1527
|
+
const i = r._features.reduce((f, a) => Object.assign(f, a.getDefaultOptions == null ? void 0 : a.getDefaultOptions(r)), {}), l = (f) => r.options.mergeOptions ? r.options.mergeOptions(i, f) : {
|
1532
1528
|
...i,
|
1533
|
-
...
|
1529
|
+
...f
|
1534
1530
|
};
|
1535
1531
|
let u = {
|
1536
1532
|
...{},
|
1537
1533
|
...(t = e.initialState) != null ? t : {}
|
1538
1534
|
};
|
1539
|
-
r._features.forEach((
|
1540
|
-
var
|
1541
|
-
u = (
|
1535
|
+
r._features.forEach((f) => {
|
1536
|
+
var a;
|
1537
|
+
u = (a = f.getInitialState == null ? void 0 : f.getInitialState(u)) != null ? a : u;
|
1542
1538
|
});
|
1543
|
-
const
|
1544
|
-
let
|
1545
|
-
const
|
1539
|
+
const g = [];
|
1540
|
+
let d = !1;
|
1541
|
+
const S = {
|
1546
1542
|
_features: n,
|
1547
1543
|
options: {
|
1548
1544
|
...i,
|
1549
1545
|
...e
|
1550
1546
|
},
|
1551
1547
|
initialState: u,
|
1552
|
-
_queue: (
|
1553
|
-
|
1554
|
-
for (;
|
1555
|
-
|
1556
|
-
|
1557
|
-
}).catch((
|
1558
|
-
throw
|
1548
|
+
_queue: (f) => {
|
1549
|
+
g.push(f), d || (d = !0, Promise.resolve().then(() => {
|
1550
|
+
for (; g.length; )
|
1551
|
+
g.shift()();
|
1552
|
+
d = !1;
|
1553
|
+
}).catch((a) => setTimeout(() => {
|
1554
|
+
throw a;
|
1559
1555
|
})));
|
1560
1556
|
},
|
1561
1557
|
reset: () => {
|
1562
1558
|
r.setState(r.initialState);
|
1563
1559
|
},
|
1564
|
-
setOptions: (
|
1565
|
-
const
|
1566
|
-
r.options = l(
|
1560
|
+
setOptions: (f) => {
|
1561
|
+
const a = I(f, r.options);
|
1562
|
+
r.options = l(a);
|
1567
1563
|
},
|
1568
1564
|
getState: () => r.options.state,
|
1569
|
-
setState: (
|
1570
|
-
r.options.onStateChange == null || r.options.onStateChange(
|
1565
|
+
setState: (f) => {
|
1566
|
+
r.options.onStateChange == null || r.options.onStateChange(f);
|
1571
1567
|
},
|
1572
|
-
_getRowId: (
|
1573
|
-
var
|
1574
|
-
return (
|
1568
|
+
_getRowId: (f, a, c) => {
|
1569
|
+
var p;
|
1570
|
+
return (p = r.options.getRowId == null ? void 0 : r.options.getRowId(f, a, c)) != null ? p : `${c ? [c.id, a].join(".") : a}`;
|
1575
1571
|
},
|
1576
1572
|
getCoreRowModel: () => (r._getCoreRowModel || (r._getCoreRowModel = r.options.getCoreRowModel(r)), r._getCoreRowModel()),
|
1577
1573
|
// The final calls start at the bottom of the model,
|
1578
1574
|
// expanded rows, which then work their way up
|
1579
1575
|
getRowModel: () => r.getPaginationRowModel(),
|
1580
1576
|
//in next version, we should just pass in the row model as the optional 2nd arg
|
1581
|
-
getRow: (
|
1582
|
-
let
|
1583
|
-
if (!
|
1584
|
-
throw process.env.NODE_ENV !== "production" ? new Error(`getRow could not find row with ID: ${
|
1585
|
-
return
|
1577
|
+
getRow: (f, a) => {
|
1578
|
+
let c = (a ? r.getPrePaginationRowModel() : r.getRowModel()).rowsById[f];
|
1579
|
+
if (!c && (c = r.getCoreRowModel().rowsById[f], !c))
|
1580
|
+
throw process.env.NODE_ENV !== "production" ? new Error(`getRow could not find row with ID: ${f}`) : new Error();
|
1581
|
+
return c;
|
1586
1582
|
},
|
1587
|
-
_getDefaultColumnDef:
|
1588
|
-
var
|
1589
|
-
return
|
1590
|
-
header: (
|
1591
|
-
const
|
1592
|
-
return
|
1583
|
+
_getDefaultColumnDef: m(() => [r.options.defaultColumn], (f) => {
|
1584
|
+
var a;
|
1585
|
+
return f = (a = f) != null ? a : {}, {
|
1586
|
+
header: (c) => {
|
1587
|
+
const p = c.header.column.columnDef;
|
1588
|
+
return p.accessorKey ? p.accessorKey : p.accessorFn ? p.id : null;
|
1593
1589
|
},
|
1594
1590
|
// footer: props => props.header.column.id,
|
1595
|
-
cell: (
|
1596
|
-
var
|
1597
|
-
return (
|
1591
|
+
cell: (c) => {
|
1592
|
+
var p, R;
|
1593
|
+
return (p = (R = c.renderValue()) == null || R.toString == null ? void 0 : R.toString()) != null ? p : null;
|
1598
1594
|
},
|
1599
|
-
...r._features.reduce((
|
1600
|
-
...
|
1595
|
+
...r._features.reduce((c, p) => Object.assign(c, p.getDefaultColumnDef == null ? void 0 : p.getDefaultColumnDef()), {}),
|
1596
|
+
...f
|
1601
1597
|
};
|
1602
1598
|
}, C(e, "debugColumns", "_getDefaultColumnDef")),
|
1603
1599
|
_getColumnDefs: () => r.options.columns,
|
1604
|
-
getAllColumns:
|
1605
|
-
const
|
1606
|
-
return
|
1607
|
-
const
|
1608
|
-
return
|
1600
|
+
getAllColumns: m(() => [r._getColumnDefs()], (f) => {
|
1601
|
+
const a = function(c, p, R) {
|
1602
|
+
return R === void 0 && (R = 0), c.map((w) => {
|
1603
|
+
const v = ze(r, w, R, p), h = w;
|
1604
|
+
return v.columns = h.columns ? a(h.columns, v, R + 1) : [], v;
|
1609
1605
|
});
|
1610
1606
|
};
|
1611
|
-
return
|
1607
|
+
return a(f);
|
1612
1608
|
}, C(e, "debugColumns", "getAllColumns")),
|
1613
|
-
getAllFlatColumns:
|
1614
|
-
_getAllFlatColumnsById:
|
1615
|
-
getAllLeafColumns:
|
1616
|
-
let
|
1617
|
-
return
|
1609
|
+
getAllFlatColumns: m(() => [r.getAllColumns()], (f) => f.flatMap((a) => a.getFlatColumns()), C(e, "debugColumns", "getAllFlatColumns")),
|
1610
|
+
_getAllFlatColumnsById: m(() => [r.getAllFlatColumns()], (f) => f.reduce((a, c) => (a[c.id] = c, a), {}), C(e, "debugColumns", "getAllFlatColumnsById")),
|
1611
|
+
getAllLeafColumns: m(() => [r.getAllColumns(), r._getOrderColumnsFn()], (f, a) => {
|
1612
|
+
let c = f.flatMap((p) => p.getLeafColumns());
|
1613
|
+
return a(c);
|
1618
1614
|
}, C(e, "debugColumns", "getAllLeafColumns")),
|
1619
|
-
getColumn: (
|
1620
|
-
const
|
1621
|
-
return process.env.NODE_ENV !== "production" && !
|
1615
|
+
getColumn: (f) => {
|
1616
|
+
const a = r._getAllFlatColumnsById()[f];
|
1617
|
+
return process.env.NODE_ENV !== "production" && !a && console.error(`[Table] Column with id '${f}' does not exist.`), a;
|
1622
1618
|
}
|
1623
1619
|
};
|
1624
|
-
Object.assign(r,
|
1625
|
-
for (let
|
1626
|
-
const
|
1627
|
-
|
1620
|
+
Object.assign(r, S);
|
1621
|
+
for (let f = 0; f < r._features.length; f++) {
|
1622
|
+
const a = r._features[f];
|
1623
|
+
a == null || a.createTable == null || a.createTable(r);
|
1628
1624
|
}
|
1629
1625
|
return r;
|
1630
1626
|
}
|
1631
|
-
function
|
1632
|
-
return (e) =>
|
1627
|
+
function Et() {
|
1628
|
+
return (e) => m(() => [e.options.data], (o) => {
|
1633
1629
|
const t = {
|
1634
1630
|
rows: [],
|
1635
1631
|
flatRows: [],
|
@@ -1637,11 +1633,11 @@ function Dt() {
|
|
1637
1633
|
}, n = function(r, i, l) {
|
1638
1634
|
i === void 0 && (i = 0);
|
1639
1635
|
const s = [];
|
1640
|
-
for (let
|
1641
|
-
const
|
1642
|
-
if (t.flatRows.push(
|
1636
|
+
for (let g = 0; g < r.length; g++) {
|
1637
|
+
const d = Be(e, e._getRowId(r[g], g, l), r[g], g, i, void 0, l?.id);
|
1638
|
+
if (t.flatRows.push(d), t.rowsById[d.id] = d, s.push(d), e.options.getSubRows) {
|
1643
1639
|
var u;
|
1644
|
-
|
1640
|
+
d.originalSubRows = e.options.getSubRows(r[g], g), (u = d.originalSubRows) != null && u.length && (d.subRows = n(d.originalSubRows, i + 1, d));
|
1645
1641
|
}
|
1646
1642
|
}
|
1647
1643
|
return s;
|
@@ -1649,7 +1645,7 @@ function Dt() {
|
|
1649
1645
|
return t.rows = n(o), t;
|
1650
1646
|
}, C(e.options, "debugTable", "getRowModel", () => e._autoResetPageIndex()));
|
1651
1647
|
}
|
1652
|
-
function
|
1648
|
+
function Rt(e) {
|
1653
1649
|
const o = [], t = (n) => {
|
1654
1650
|
var r;
|
1655
1651
|
o.push(n), (r = n.subRows) != null && r.length && n.getIsExpanded() && n.subRows.forEach(t);
|
@@ -1660,8 +1656,8 @@ function Ht(e) {
|
|
1660
1656
|
rowsById: e.rowsById
|
1661
1657
|
};
|
1662
1658
|
}
|
1663
|
-
function
|
1664
|
-
return (o) =>
|
1659
|
+
function Dt(e) {
|
1660
|
+
return (o) => m(() => [o.getState().pagination, o.getPrePaginationRowModel(), o.options.paginateExpandedRows ? void 0 : o.getState().expanded], (t, n) => {
|
1665
1661
|
if (!n.rows.length)
|
1666
1662
|
return n;
|
1667
1663
|
const {
|
@@ -1673,61 +1669,61 @@ function Gt(e) {
|
|
1673
1669
|
flatRows: s,
|
1674
1670
|
rowsById: u
|
1675
1671
|
} = n;
|
1676
|
-
const
|
1677
|
-
l = l.slice(
|
1678
|
-
let
|
1679
|
-
o.options.paginateExpandedRows ?
|
1672
|
+
const g = r * i, d = g + r;
|
1673
|
+
l = l.slice(g, d);
|
1674
|
+
let S;
|
1675
|
+
o.options.paginateExpandedRows ? S = {
|
1680
1676
|
rows: l,
|
1681
1677
|
flatRows: s,
|
1682
1678
|
rowsById: u
|
1683
|
-
} :
|
1679
|
+
} : S = Rt({
|
1684
1680
|
rows: l,
|
1685
1681
|
flatRows: s,
|
1686
1682
|
rowsById: u
|
1687
|
-
}),
|
1688
|
-
const
|
1689
|
-
|
1683
|
+
}), S.flatRows = [];
|
1684
|
+
const f = (a) => {
|
1685
|
+
S.flatRows.push(a), a.subRows.length && a.subRows.forEach(f);
|
1690
1686
|
};
|
1691
|
-
return
|
1687
|
+
return S.rows.forEach(f), S;
|
1692
1688
|
}, C(o.options, "debugTable", "getPaginationRowModel"));
|
1693
1689
|
}
|
1694
|
-
function
|
1695
|
-
return (e) =>
|
1690
|
+
function Ht() {
|
1691
|
+
return (e) => m(() => [e.getState().sorting, e.getPreSortedRowModel()], (o, t) => {
|
1696
1692
|
if (!t.rows.length || !(o != null && o.length))
|
1697
1693
|
return t;
|
1698
1694
|
const n = e.getState().sorting, r = [], i = n.filter((u) => {
|
1699
|
-
var
|
1700
|
-
return (
|
1695
|
+
var g;
|
1696
|
+
return (g = e.getColumn(u.id)) == null ? void 0 : g.getCanSort();
|
1701
1697
|
}), l = {};
|
1702
1698
|
i.forEach((u) => {
|
1703
|
-
const
|
1704
|
-
|
1705
|
-
sortUndefined:
|
1706
|
-
invertSorting:
|
1707
|
-
sortingFn:
|
1699
|
+
const g = e.getColumn(u.id);
|
1700
|
+
g && (l[u.id] = {
|
1701
|
+
sortUndefined: g.columnDef.sortUndefined,
|
1702
|
+
invertSorting: g.columnDef.invertSorting,
|
1703
|
+
sortingFn: g.getSortingFn()
|
1708
1704
|
});
|
1709
1705
|
});
|
1710
1706
|
const s = (u) => {
|
1711
|
-
const
|
1712
|
-
...
|
1707
|
+
const g = u.map((d) => ({
|
1708
|
+
...d
|
1713
1709
|
}));
|
1714
|
-
return
|
1715
|
-
for (let
|
1716
|
-
var
|
1717
|
-
const
|
1718
|
-
let
|
1719
|
-
if (
|
1720
|
-
const
|
1721
|
-
(
|
1710
|
+
return g.sort((d, S) => {
|
1711
|
+
for (let a = 0; a < i.length; a += 1) {
|
1712
|
+
var f;
|
1713
|
+
const c = i[a], p = l[c.id], R = (f = c?.desc) != null ? f : !1;
|
1714
|
+
let w = 0;
|
1715
|
+
if (p.sortUndefined) {
|
1716
|
+
const v = d.getValue(c.id), h = S.getValue(c.id), $ = v === void 0, P = h === void 0;
|
1717
|
+
($ || P) && (w = $ && P ? 0 : $ ? p.sortUndefined : -p.sortUndefined);
|
1722
1718
|
}
|
1723
|
-
if (
|
1724
|
-
return
|
1719
|
+
if (w === 0 && (w = p.sortingFn(d, S, c.id)), w !== 0)
|
1720
|
+
return R && (w *= -1), p.invertSorting && (w *= -1), w;
|
1725
1721
|
}
|
1726
|
-
return
|
1727
|
-
}),
|
1728
|
-
var
|
1729
|
-
r.push(
|
1730
|
-
}),
|
1722
|
+
return d.index - S.index;
|
1723
|
+
}), g.forEach((d) => {
|
1724
|
+
var S;
|
1725
|
+
r.push(d), (S = d.subRows) != null && S.length && (d.subRows = s(d.subRows));
|
1726
|
+
}), g;
|
1731
1727
|
};
|
1732
1728
|
return {
|
1733
1729
|
rows: s(t.rows),
|
@@ -1746,18 +1742,18 @@ function At() {
|
|
1746
1742
|
*
|
1747
1743
|
* @license MIT
|
1748
1744
|
*/
|
1749
|
-
function
|
1745
|
+
function O() {
|
1750
1746
|
return !0;
|
1751
1747
|
}
|
1752
|
-
const
|
1748
|
+
const ht = Symbol("merge-proxy"), vt = {
|
1753
1749
|
get(e, o, t) {
|
1754
|
-
return o ===
|
1750
|
+
return o === ht ? t : e.get(o);
|
1755
1751
|
},
|
1756
1752
|
has(e, o) {
|
1757
1753
|
return e.has(o);
|
1758
1754
|
},
|
1759
|
-
set:
|
1760
|
-
deleteProperty:
|
1755
|
+
set: O,
|
1756
|
+
deleteProperty: O,
|
1761
1757
|
getOwnPropertyDescriptor(e, o) {
|
1762
1758
|
return {
|
1763
1759
|
configurable: !0,
|
@@ -1765,48 +1761,48 @@ const Lt = Symbol("merge-proxy"), zt = {
|
|
1765
1761
|
get() {
|
1766
1762
|
return e.get(o);
|
1767
1763
|
},
|
1768
|
-
set:
|
1769
|
-
deleteProperty:
|
1764
|
+
set: O,
|
1765
|
+
deleteProperty: O
|
1770
1766
|
};
|
1771
1767
|
},
|
1772
1768
|
ownKeys(e) {
|
1773
1769
|
return e.keys();
|
1774
1770
|
}
|
1775
1771
|
};
|
1776
|
-
function
|
1772
|
+
function W(e) {
|
1777
1773
|
return "value" in e ? e.value : e;
|
1778
1774
|
}
|
1779
|
-
function
|
1775
|
+
function B() {
|
1780
1776
|
for (var e = arguments.length, o = new Array(e), t = 0; t < e; t++)
|
1781
1777
|
o[t] = arguments[t];
|
1782
1778
|
return new Proxy({
|
1783
1779
|
get(n) {
|
1784
1780
|
for (let r = o.length - 1; r >= 0; r--) {
|
1785
|
-
const i =
|
1781
|
+
const i = W(o[r])[n];
|
1786
1782
|
if (i !== void 0)
|
1787
1783
|
return i;
|
1788
1784
|
}
|
1789
1785
|
},
|
1790
1786
|
has(n) {
|
1791
1787
|
for (let r = o.length - 1; r >= 0; r--)
|
1792
|
-
if (n in
|
1788
|
+
if (n in W(o[r]))
|
1793
1789
|
return !0;
|
1794
1790
|
return !1;
|
1795
1791
|
},
|
1796
1792
|
keys() {
|
1797
1793
|
const n = [];
|
1798
1794
|
for (let r = 0; r < o.length; r++)
|
1799
|
-
n.push(...Object.keys(
|
1795
|
+
n.push(...Object.keys(W(o[r])));
|
1800
1796
|
return [...Array.from(new Set(n))];
|
1801
1797
|
}
|
1802
|
-
},
|
1798
|
+
}, vt);
|
1803
1799
|
}
|
1804
|
-
const
|
1800
|
+
const _t = Se({
|
1805
1801
|
props: ["render", "props"],
|
1806
|
-
setup: (e) => () => typeof e.render == "function" || typeof e.render == "object" ?
|
1802
|
+
setup: (e) => () => typeof e.render == "function" || typeof e.render == "object" ? Me(e.render, e.props) : e.render
|
1807
1803
|
});
|
1808
|
-
function
|
1809
|
-
const o =
|
1804
|
+
function Gt(e) {
|
1805
|
+
const o = B({
|
1810
1806
|
state: {},
|
1811
1807
|
// Dummy state
|
1812
1808
|
onStateChange: () => {
|
@@ -1814,20 +1810,20 @@ function Ot(e) {
|
|
1814
1810
|
// noop
|
1815
1811
|
renderFallbackValue: null,
|
1816
1812
|
mergeOptions(r, i) {
|
1817
|
-
return
|
1813
|
+
return B(r, i);
|
1818
1814
|
}
|
1819
|
-
}, e), t =
|
1820
|
-
return
|
1815
|
+
}, e), t = wt(o), n = Ie(t.initialState);
|
1816
|
+
return xe(() => {
|
1821
1817
|
t.setOptions((r) => {
|
1822
1818
|
var i;
|
1823
1819
|
const l = new Proxy({}, {
|
1824
1820
|
get: (s, u) => n.value[u]
|
1825
1821
|
});
|
1826
|
-
return
|
1822
|
+
return B(r, e, {
|
1827
1823
|
// merge the initialState and `options.state`
|
1828
1824
|
// create a new proxy on each `setOptions` call
|
1829
1825
|
// and get the value from state on each property access
|
1830
|
-
state:
|
1826
|
+
state: B(l, (i = e.state) != null ? i : {}),
|
1831
1827
|
// Similarly, we'll maintain both our internal state and any user-provided
|
1832
1828
|
// state.
|
1833
1829
|
onStateChange: (s) => {
|
@@ -1837,173 +1833,60 @@ function Ot(e) {
|
|
1837
1833
|
});
|
1838
1834
|
}), t;
|
1839
1835
|
}
|
1840
|
-
const
|
1841
|
-
__name: "
|
1842
|
-
props:
|
1843
|
-
|
1844
|
-
|
1845
|
-
|
1846
|
-
|
1847
|
-
totalItems: { default: 0 },
|
1848
|
-
manualPagination: { type: Boolean, default: !0 },
|
1849
|
-
manualSorting: { type: Boolean, default: !0 },
|
1850
|
-
getRowId: {}
|
1851
|
-
}, {
|
1852
|
-
sorting: {},
|
1853
|
-
sortingModifiers: {},
|
1854
|
-
pagination: {},
|
1855
|
-
paginationModifiers: {},
|
1856
|
-
selection: {},
|
1857
|
-
selectionModifiers: {}
|
1858
|
-
}),
|
1859
|
-
emits: ["update:sorting", "update:pagination", "update:selection"],
|
1836
|
+
const At = /* @__PURE__ */ Se({
|
1837
|
+
__name: "BuiTableRowSubrow",
|
1838
|
+
props: {
|
1839
|
+
row: {},
|
1840
|
+
renderSubComponent: { type: Function },
|
1841
|
+
columns: {}
|
1842
|
+
},
|
1860
1843
|
setup(e) {
|
1861
|
-
const o = e
|
1862
|
-
|
1863
|
-
|
1864
|
-
|
1865
|
-
|
1866
|
-
|
1867
|
-
|
1868
|
-
|
1869
|
-
|
1870
|
-
|
1871
|
-
|
1872
|
-
|
1873
|
-
|
1874
|
-
|
1875
|
-
|
1876
|
-
|
1877
|
-
|
1878
|
-
|
1879
|
-
|
1880
|
-
|
1881
|
-
|
1882
|
-
|
1883
|
-
|
1884
|
-
|
1885
|
-
|
1886
|
-
|
1887
|
-
|
1888
|
-
|
1889
|
-
|
1890
|
-
|
1891
|
-
|
1892
|
-
|
1893
|
-
|
1894
|
-
|
1895
|
-
|
1896
|
-
|
1897
|
-
|
1898
|
-
|
1899
|
-
|
1900
|
-
return l.getState().pagination.pageSize;
|
1901
|
-
},
|
1902
|
-
set(a) {
|
1903
|
-
n.value && (n.value.pageSize = a, l.setPageSize(a), l.setPageIndex(0));
|
1904
|
-
}
|
1905
|
-
}), u = Y({
|
1906
|
-
get() {
|
1907
|
-
return l.getState().pagination.pageIndex + 1;
|
1908
|
-
},
|
1909
|
-
set(a) {
|
1910
|
-
n.value && (n.value.pageIndex = a - 1, l.setPageIndex(a - 1));
|
1911
|
-
}
|
1912
|
-
});
|
1913
|
-
return (a, f) => ($(), y(v(Be), null, {
|
1914
|
-
default: M(() => [
|
1915
|
-
a.$slots.caption ? ($(), y(v(qe), { key: 0 }, {
|
1916
|
-
default: M(() => [
|
1917
|
-
ze(a.$slots, "caption", { table: v(l) })
|
1918
|
-
]),
|
1919
|
-
_: 3
|
1920
|
-
})) : J("", !0),
|
1921
|
-
G(v(Ne), null, {
|
1922
|
-
default: M(() => [
|
1923
|
-
($(!0), z(O, null, B(v(l).getHeaderGroups(), (c) => ($(), y(v(Q), {
|
1924
|
-
key: c.id
|
1925
|
-
}, {
|
1926
|
-
default: M(() => [
|
1927
|
-
($(!0), z(O, null, B(c.headers, (d) => ($(), y(v(ke), {
|
1928
|
-
key: d.id
|
1929
|
-
}, {
|
1930
|
-
default: M(() => [
|
1931
|
-
d.isPlaceholder ? J("", !0) : ($(), y(v(he), {
|
1932
|
-
key: 0,
|
1933
|
-
render: d.column.columnDef.header,
|
1934
|
-
props: d.getContext()
|
1935
|
-
}, null, 8, ["render", "props"]))
|
1936
|
-
]),
|
1937
|
-
_: 2
|
1938
|
-
}, 1024))), 128))
|
1939
|
-
]),
|
1940
|
-
_: 2
|
1941
|
-
}, 1024))), 128))
|
1942
|
-
]),
|
1943
|
-
_: 1
|
1944
|
-
}),
|
1945
|
-
G(v(Te), null, {
|
1946
|
-
default: M(() => [
|
1947
|
-
v(l).getRowModel().rows?.length ? ($(!0), z(O, { key: 0 }, B(v(l).getRowModel().rows, (c) => ($(), y(v(Q), {
|
1948
|
-
key: c.id,
|
1949
|
-
"data-state": c.getIsSelected() ? "selected" : void 0
|
1950
|
-
}, {
|
1951
|
-
default: M(() => [
|
1952
|
-
($(!0), z(O, null, B(c.getVisibleCells(), (d) => ($(), y(v(Ce), {
|
1953
|
-
key: d.id
|
1954
|
-
}, {
|
1955
|
-
default: M(() => [
|
1956
|
-
G(v(he), {
|
1957
|
-
render: d.column.columnDef.cell,
|
1958
|
-
props: d.getContext()
|
1959
|
-
}, null, 8, ["render", "props"])
|
1960
|
-
]),
|
1961
|
-
_: 2
|
1962
|
-
}, 1024))), 128))
|
1963
|
-
]),
|
1964
|
-
_: 2
|
1965
|
-
}, 1032, ["data-state"]))), 128)) : ($(), y(v(Ue), {
|
1966
|
-
key: 1,
|
1967
|
-
colspan: a.columns.length
|
1968
|
-
}, {
|
1969
|
-
default: M(() => [
|
1970
|
-
Oe("No data")
|
1971
|
-
]),
|
1972
|
-
_: 1
|
1973
|
-
}, 8, ["colspan"]))
|
1974
|
-
]),
|
1975
|
-
_: 1
|
1976
|
-
}),
|
1977
|
-
a.showPagination && v(l).getPageCount() ? ($(), y(v(je), { key: 1 }, {
|
1978
|
-
default: M(() => [
|
1979
|
-
G(v(Q), null, {
|
1980
|
-
default: M(() => [
|
1981
|
-
G(v(Ce), {
|
1982
|
-
colspan: a.columns.length
|
1983
|
-
}, {
|
1984
|
-
default: M(() => [
|
1985
|
-
G(v(Xe), {
|
1986
|
-
class: "float-right",
|
1987
|
-
total: i.value,
|
1988
|
-
pageIndex: u.value,
|
1989
|
-
"onUpdate:pageIndex": f[0] || (f[0] = (c) => u.value = c),
|
1990
|
-
pageSize: s.value,
|
1991
|
-
"onUpdate:pageSize": f[1] || (f[1] = (c) => s.value = c)
|
1992
|
-
}, null, 8, ["total", "pageIndex", "pageSize"])
|
1993
|
-
]),
|
1994
|
-
_: 1
|
1995
|
-
}, 8, ["colspan"])
|
1996
|
-
]),
|
1997
|
-
_: 1
|
1998
|
-
})
|
1999
|
-
]),
|
2000
|
-
_: 1
|
2001
|
-
})) : J("", !0)
|
2002
|
-
]),
|
2003
|
-
_: 3
|
2004
|
-
}));
|
1844
|
+
const o = e;
|
1845
|
+
return (t, n) => (y(), ae(ge, null, [
|
1846
|
+
N(E(fe), {
|
1847
|
+
"data-state": t.row.getIsSelected() ? "selected" : void 0,
|
1848
|
+
class: ye(o.renderSubComponent?.(t.row) ? "border-b-0" : "")
|
1849
|
+
}, {
|
1850
|
+
default: G(() => [
|
1851
|
+
(y(!0), ae(ge, null, Ee(t.row.getVisibleCells(), (r) => (y(), k(E(de), {
|
1852
|
+
key: r.id
|
1853
|
+
}, {
|
1854
|
+
default: G(() => [
|
1855
|
+
N(E(_t), {
|
1856
|
+
render: r.column.columnDef.cell,
|
1857
|
+
props: r.getContext()
|
1858
|
+
}, null, 8, ["render", "props"])
|
1859
|
+
]),
|
1860
|
+
_: 2
|
1861
|
+
}, 1024))), 128))
|
1862
|
+
]),
|
1863
|
+
_: 1
|
1864
|
+
}, 8, ["data-state", "class"]),
|
1865
|
+
o.renderSubComponent?.(t.row) ? (y(), k(E(fe), {
|
1866
|
+
key: 0,
|
1867
|
+
"data-state": t.row.getIsSelected() ? "selected" : void 0
|
1868
|
+
}, {
|
1869
|
+
default: G(() => [
|
1870
|
+
N(E(de), {
|
1871
|
+
colspan: t.columns.length,
|
1872
|
+
class: "pt-0"
|
1873
|
+
}, {
|
1874
|
+
default: G(() => [
|
1875
|
+
(y(), k(De(o.renderSubComponent?.(t.row)?.())))
|
1876
|
+
]),
|
1877
|
+
_: 1
|
1878
|
+
}, 8, ["colspan"])
|
1879
|
+
]),
|
1880
|
+
_: 1
|
1881
|
+
}, 8, ["data-state"])) : He("", !0)
|
1882
|
+
], 64));
|
2005
1883
|
}
|
2006
1884
|
});
|
2007
1885
|
export {
|
2008
|
-
|
1886
|
+
_t as F,
|
1887
|
+
At as _,
|
1888
|
+
Dt as a,
|
1889
|
+
Ht as b,
|
1890
|
+
Et as g,
|
1891
|
+
Gt as u
|
2009
1892
|
};
|