brd-ui-kit 0.1.71 → 0.1.73
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/brd-ui-kit.css +1 -1
- package/dist/components/basic-table/basic-table.d.ts +3 -1
- package/dist/components/files-uploader/files-uploader.d.ts +8 -6
- package/dist/components/input-contact/input-contact.d.ts +2 -2
- package/dist/components/ui/calendar/calendar.d.ts +19 -0
- package/dist/components/ui/calendar/calendar.styles.d.ts +4 -0
- package/dist/components/ui/calendar/index.d.ts +2 -0
- package/dist/components/ui/calendar.d.ts +2 -0
- package/dist/components/ui/icon/icon-presets.d.ts +35 -0
- package/dist/components/ui/icon/icon.d.ts +11 -7
- package/dist/components/ui/icon/index.d.ts +3 -1
- package/dist/components/ui/table/table.d.ts +2 -1
- package/dist/components/ui/textarea/textarea.d.ts +2 -2
- package/dist/components/ui/toggle/index.d.ts +3 -0
- package/dist/components/ui/toggle/toggle.d.ts +5 -0
- package/dist/components/ui/toggle/toggle.styles.d.ts +9 -0
- package/dist/components/ui/toggle-group/index.d.ts +1 -0
- package/dist/components/ui/toggle-group/toggle-group.d.ts +12 -0
- package/dist/components/ui/toggle-group/toggle-group.styles.d.ts +8 -0
- package/dist/components/ui/toggle-group.d.ts +2 -0
- package/dist/components/ui/toggle.d.ts +2 -0
- package/dist/components-app-pagination-app-pagination.cjs +1 -1
- package/dist/components-app-pagination-app-pagination.cjs.map +1 -1
- package/dist/components-app-pagination-app-pagination.js +35 -35
- package/dist/components-app-pagination-app-pagination.js.map +1 -1
- package/dist/components-app-sidebar-app-sidebar.cjs +1 -1
- package/dist/components-app-sidebar-app-sidebar.cjs.map +1 -1
- package/dist/components-app-sidebar-app-sidebar.js +16 -16
- package/dist/components-app-sidebar-app-sidebar.js.map +1 -1
- package/dist/components-avatar-uploader-avatar-uploader.cjs +1 -1
- package/dist/components-avatar-uploader-avatar-uploader.cjs.map +1 -1
- package/dist/components-avatar-uploader-avatar-uploader.js +5 -4
- package/dist/components-avatar-uploader-avatar-uploader.js.map +1 -1
- package/dist/components-basic-avatar-basic-avatar.cjs +2 -2
- package/dist/components-basic-avatar-basic-avatar.cjs.map +1 -1
- package/dist/components-basic-avatar-basic-avatar.js +16 -14
- package/dist/components-basic-avatar-basic-avatar.js.map +1 -1
- package/dist/components-basic-table-basic-table.cjs +2 -2
- package/dist/components-basic-table-basic-table.cjs.map +1 -1
- package/dist/components-basic-table-basic-table.js +259 -255
- package/dist/components-basic-table-basic-table.js.map +1 -1
- package/dist/components-files-uploader-files-uploader.cjs +6 -6
- package/dist/components-files-uploader-files-uploader.cjs.map +1 -1
- package/dist/components-files-uploader-files-uploader.js +111 -112
- package/dist/components-files-uploader-files-uploader.js.map +1 -1
- package/dist/components-input-contact-input-contact.cjs +4 -8
- package/dist/components-input-contact-input-contact.cjs.map +1 -1
- package/dist/components-input-contact-input-contact.js +95 -110
- package/dist/components-input-contact-input-contact.js.map +1 -1
- package/dist/components-input-password-input-password.cjs +1 -1
- package/dist/components-input-password-input-password.cjs.map +1 -1
- package/dist/components-input-password-input-password.js +6 -4
- package/dist/components-input-password-input-password.js.map +1 -1
- package/dist/components-ui-button-button.styles.cjs +4 -4
- package/dist/components-ui-button-button.styles.cjs.map +1 -1
- package/dist/components-ui-button-button.styles.js +5 -5
- package/dist/components-ui-button-button.styles.js.map +1 -1
- package/dist/components-ui-calendar-calendar.cjs +13 -0
- package/dist/components-ui-calendar-calendar.cjs.map +1 -0
- package/dist/components-ui-calendar-calendar.js +3761 -0
- package/dist/components-ui-calendar-calendar.js.map +1 -0
- package/dist/components-ui-calendar-calendar.styles.cjs +14 -0
- package/dist/components-ui-calendar-calendar.styles.cjs.map +1 -0
- package/dist/components-ui-calendar-calendar.styles.js +34 -0
- package/dist/components-ui-calendar-calendar.styles.js.map +1 -0
- package/dist/components-ui-calendar.cjs +2 -0
- package/dist/components-ui-calendar.cjs.map +1 -0
- package/dist/components-ui-calendar.js +6 -0
- package/dist/components-ui-calendar.js.map +1 -0
- package/dist/components-ui-checkbox-checkbox.cjs +1 -1
- package/dist/components-ui-checkbox-checkbox.cjs.map +1 -1
- package/dist/components-ui-checkbox-checkbox.js +12 -11
- package/dist/components-ui-checkbox-checkbox.js.map +1 -1
- package/dist/components-ui-combobox-combobox.cjs +4 -4
- package/dist/components-ui-combobox-combobox.cjs.map +1 -1
- package/dist/components-ui-combobox-combobox.js +4 -4
- package/dist/components-ui-combobox-combobox.js.map +1 -1
- package/dist/components-ui-dialog-dialog.cjs +1 -1
- package/dist/components-ui-dialog-dialog.cjs.map +1 -1
- package/dist/components-ui-dialog-dialog.js +4 -10
- package/dist/components-ui-dialog-dialog.js.map +1 -1
- package/dist/components-ui-field-field.js +4 -4
- package/dist/components-ui-icon-icon-presets.cjs +2 -0
- package/dist/components-ui-icon-icon-presets.cjs.map +1 -0
- package/dist/components-ui-icon-icon-presets.js +14 -0
- package/dist/components-ui-icon-icon-presets.js.map +1 -0
- package/dist/components-ui-icon-icon.cjs +1 -1
- package/dist/components-ui-icon-icon.cjs.map +1 -1
- package/dist/components-ui-icon-icon.js +62714 -34
- package/dist/components-ui-icon-icon.js.map +1 -1
- package/dist/components-ui-icon.cjs +1 -1
- package/dist/components-ui-icon.js +4 -2
- package/dist/components-ui-icon.js.map +1 -1
- package/dist/components-ui-pagination-pagination.cjs +1 -1
- package/dist/components-ui-pagination-pagination.cjs.map +1 -1
- package/dist/components-ui-pagination-pagination.js +50 -50
- package/dist/components-ui-pagination-pagination.js.map +1 -1
- package/dist/components-ui-select-select.cjs +1 -1
- package/dist/components-ui-select-select.cjs.map +1 -1
- package/dist/components-ui-select-select.js +1 -1
- package/dist/components-ui-select-select.js.map +1 -1
- package/dist/components-ui-sonner-sonner.cjs +1 -1
- package/dist/components-ui-sonner-sonner.cjs.map +1 -1
- package/dist/components-ui-sonner-sonner.js +14 -14
- package/dist/components-ui-sonner-sonner.js.map +1 -1
- package/dist/components-ui-table-table.cjs +4 -4
- package/dist/components-ui-table-table.cjs.map +1 -1
- package/dist/components-ui-table-table.js +89 -85
- package/dist/components-ui-table-table.js.map +1 -1
- package/dist/components-ui-textarea-textarea.cjs +1 -1
- package/dist/components-ui-textarea-textarea.cjs.map +1 -1
- package/dist/components-ui-textarea-textarea.js +2 -3
- package/dist/components-ui-textarea-textarea.js.map +1 -1
- package/dist/components-ui-textarea-textarea.styles.cjs +1 -1
- package/dist/components-ui-textarea-textarea.styles.cjs.map +1 -1
- package/dist/components-ui-textarea-textarea.styles.js +1 -1
- package/dist/components-ui-textarea-textarea.styles.js.map +1 -1
- package/dist/components-ui-toggle-group-toggle-group.cjs +2 -0
- package/dist/components-ui-toggle-group-toggle-group.cjs.map +1 -0
- package/dist/components-ui-toggle-group-toggle-group.js +112 -0
- package/dist/components-ui-toggle-group-toggle-group.js.map +1 -0
- package/dist/components-ui-toggle-group-toggle-group.styles.cjs +18 -0
- package/dist/components-ui-toggle-group-toggle-group.styles.cjs.map +1 -0
- package/dist/components-ui-toggle-group-toggle-group.styles.js +58 -0
- package/dist/components-ui-toggle-group-toggle-group.styles.js.map +1 -0
- package/dist/components-ui-toggle-group.cjs +2 -0
- package/dist/components-ui-toggle-group.cjs.map +1 -0
- package/dist/components-ui-toggle-group.js +6 -0
- package/dist/components-ui-toggle-group.js.map +1 -0
- package/dist/components-ui-toggle-toggle.cjs +2 -0
- package/dist/components-ui-toggle-toggle.cjs.map +1 -0
- package/dist/components-ui-toggle-toggle.js +57 -0
- package/dist/components-ui-toggle-toggle.js.map +1 -0
- package/dist/components-ui-toggle-toggle.styles.cjs +12 -0
- package/dist/components-ui-toggle-toggle.styles.cjs.map +1 -0
- package/dist/components-ui-toggle-toggle.styles.js +35 -0
- package/dist/components-ui-toggle-toggle.styles.js.map +1 -0
- package/dist/components-ui-toggle.cjs +2 -0
- package/dist/components-ui-toggle.cjs.map +1 -0
- package/dist/components-ui-toggle.js +7 -0
- package/dist/components-ui-toggle.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +151 -147
- package/dist/index.js.map +1 -1
- package/dist/types/types.d.ts +2 -2
- package/package.json +45 -16
- package/dist/components/ui/icon/icon-dictionary.d.ts +0 -60
- package/dist/components/ui/icon/overrides.d.ts +0 -21
- package/dist/components-ui-icon-icon-dictionary.cjs +0 -2
- package/dist/components-ui-icon-icon-dictionary.cjs.map +0 -1
- package/dist/components-ui-icon-icon-dictionary.js +0 -63
- package/dist/components-ui-icon-icon-dictionary.js.map +0 -1
- package/dist/components-ui-icon-overrides.cjs +0 -2
- package/dist/components-ui-icon-overrides.cjs.map +0 -1
- package/dist/components-ui-icon-overrides.js +0 -175
- package/dist/components-ui-icon-overrides.js.map +0 -1
|
@@ -35,20 +35,20 @@ function S(e, o, t) {
|
|
|
35
35
|
let l;
|
|
36
36
|
t.key && t.debug && (l = Date.now());
|
|
37
37
|
const u = e(i);
|
|
38
|
-
if (!(u.length !== n.length || u.some((
|
|
38
|
+
if (!(u.length !== n.length || u.some((c, m) => n[m] !== c)))
|
|
39
39
|
return r;
|
|
40
40
|
n = u;
|
|
41
|
-
let
|
|
42
|
-
if (t.key && t.debug && (
|
|
43
|
-
const
|
|
44
|
-
for (
|
|
45
|
-
|
|
46
|
-
return
|
|
41
|
+
let d;
|
|
42
|
+
if (t.key && t.debug && (d = Date.now()), r = o(...u), t == null || t.onChange == null || t.onChange(r), t.key && t.debug && t != null && t.debug()) {
|
|
43
|
+
const c = Math.round((Date.now() - l) * 100) / 100, m = Math.round((Date.now() - d) * 100) / 100, g = m / 16, s = (f, p) => {
|
|
44
|
+
for (f = String(f); f.length < p; )
|
|
45
|
+
f = " " + f;
|
|
46
|
+
return f;
|
|
47
47
|
};
|
|
48
|
-
console.info(`%c⏱ ${s(m, 5)} /${s(
|
|
48
|
+
console.info(`%c⏱ ${s(m, 5)} /${s(c, 5)} ms`, `
|
|
49
49
|
font-size: .6rem;
|
|
50
50
|
font-weight: bold;
|
|
51
|
-
color: hsl(${Math.max(0, Math.min(120 - 120 *
|
|
51
|
+
color: hsl(${Math.max(0, Math.min(120 - 120 * g, 120))}deg 100% 31%);`, t?.key);
|
|
52
52
|
}
|
|
53
53
|
return r;
|
|
54
54
|
};
|
|
@@ -73,13 +73,13 @@ function Pe(e, o, t, n) {
|
|
|
73
73
|
column: t,
|
|
74
74
|
getValue: () => o.getValue(n),
|
|
75
75
|
renderValue: r,
|
|
76
|
-
getContext: S(() => [e, t, o, i], (l, u, a,
|
|
76
|
+
getContext: S(() => [e, t, o, i], (l, u, a, d) => ({
|
|
77
77
|
table: l,
|
|
78
78
|
column: u,
|
|
79
79
|
row: a,
|
|
80
|
-
cell:
|
|
81
|
-
getValue:
|
|
82
|
-
renderValue:
|
|
80
|
+
cell: d,
|
|
81
|
+
getValue: d.getValue,
|
|
82
|
+
renderValue: d.renderValue
|
|
83
83
|
}), C(e.options, "debugCells", "cell.getContext"))
|
|
84
84
|
};
|
|
85
85
|
return e._features.forEach((l) => {
|
|
@@ -92,38 +92,38 @@ function Ie(e, o, t, n) {
|
|
|
92
92
|
...e._getDefaultColumnDef(),
|
|
93
93
|
...o
|
|
94
94
|
}, a = u.accessorKey;
|
|
95
|
-
let
|
|
96
|
-
if (u.accessorFn ?
|
|
97
|
-
let s =
|
|
95
|
+
let d = (r = (i = u.id) != null ? i : a ? typeof String.prototype.replaceAll == "function" ? a.replaceAll(".", "_") : a.replace(/\./g, "_") : void 0) != null ? r : typeof u.header == "string" ? u.header : void 0, c;
|
|
96
|
+
if (u.accessorFn ? c = u.accessorFn : a && (a.includes(".") ? c = (g) => {
|
|
97
|
+
let s = g;
|
|
98
98
|
for (const p of a.split(".")) {
|
|
99
|
-
var
|
|
100
|
-
s = (
|
|
99
|
+
var f;
|
|
100
|
+
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.`);
|
|
101
101
|
}
|
|
102
102
|
return s;
|
|
103
|
-
} :
|
|
103
|
+
} : c = (g) => g[u.accessorKey]), !d)
|
|
104
104
|
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();
|
|
105
105
|
let m = {
|
|
106
|
-
id: `${String(
|
|
107
|
-
accessorFn:
|
|
106
|
+
id: `${String(d)}`,
|
|
107
|
+
accessorFn: c,
|
|
108
108
|
parent: n,
|
|
109
109
|
depth: t,
|
|
110
110
|
columnDef: u,
|
|
111
111
|
columns: [],
|
|
112
112
|
getFlatColumns: S(() => [!0], () => {
|
|
113
|
-
var
|
|
114
|
-
return [m, ...(
|
|
113
|
+
var g;
|
|
114
|
+
return [m, ...(g = m.columns) == null ? void 0 : g.flatMap((s) => s.getFlatColumns())];
|
|
115
115
|
}, C(e.options, "debugColumns", "column.getFlatColumns")),
|
|
116
|
-
getLeafColumns: S(() => [e._getOrderColumnsFn()], (
|
|
116
|
+
getLeafColumns: S(() => [e._getOrderColumnsFn()], (g) => {
|
|
117
117
|
var s;
|
|
118
118
|
if ((s = m.columns) != null && s.length) {
|
|
119
|
-
let
|
|
120
|
-
return
|
|
119
|
+
let f = m.columns.flatMap((p) => p.getLeafColumns());
|
|
120
|
+
return g(f);
|
|
121
121
|
}
|
|
122
122
|
return [m];
|
|
123
123
|
}, C(e.options, "debugColumns", "column.getLeafColumns"))
|
|
124
124
|
};
|
|
125
|
-
for (const
|
|
126
|
-
|
|
125
|
+
for (const g of e._features)
|
|
126
|
+
g.createColumn == null || g.createColumn(m, e);
|
|
127
127
|
return m;
|
|
128
128
|
}
|
|
129
129
|
const _ = "debugHeaders";
|
|
@@ -160,8 +160,8 @@ const ye = {
|
|
|
160
160
|
createTable: (e) => {
|
|
161
161
|
e.getHeaderGroups = S(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (o, t, n, r) => {
|
|
162
162
|
var i, l;
|
|
163
|
-
const u = (i = n?.map((m) => t.find((
|
|
164
|
-
return G(o, [...u, ...
|
|
163
|
+
const u = (i = n?.map((m) => t.find((g) => g.id === m)).filter(Boolean)) != null ? i : [], a = (l = r?.map((m) => t.find((g) => g.id === m)).filter(Boolean)) != null ? l : [], d = t.filter((m) => !(n != null && n.includes(m.id)) && !(r != null && r.includes(m.id)));
|
|
164
|
+
return G(o, [...u, ...d, ...a], e);
|
|
165
165
|
}, C(e.options, _, "getHeaderGroups")), e.getCenterHeaderGroups = S(() => [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))), G(o, t, e, "center")), C(e.options, _, "getCenterHeaderGroups")), e.getLeftHeaderGroups = S(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left], (o, t, n) => {
|
|
166
166
|
var r;
|
|
167
167
|
const i = (r = n?.map((l) => t.find((u) => u.id === l)).filter(Boolean)) != null ? r : [];
|
|
@@ -180,30 +180,30 @@ const ye = {
|
|
|
180
180
|
var n;
|
|
181
181
|
return !((n = t.subHeaders) != null && n.length);
|
|
182
182
|
}), C(e.options, _, "getRightLeafHeaders")), e.getLeafHeaders = S(() => [e.getLeftHeaderGroups(), e.getCenterHeaderGroups(), e.getRightHeaderGroups()], (o, t, n) => {
|
|
183
|
-
var r, i, l, u, a,
|
|
184
|
-
return [...(r = (i = o[0]) == null ? void 0 : i.headers) != null ? r : [], ...(l = (u = t[0]) == null ? void 0 : u.headers) != null ? l : [], ...(a = (
|
|
183
|
+
var r, i, l, u, a, d;
|
|
184
|
+
return [...(r = (i = o[0]) == null ? void 0 : i.headers) != null ? r : [], ...(l = (u = t[0]) == null ? void 0 : u.headers) != null ? l : [], ...(a = (d = n[0]) == null ? void 0 : d.headers) != null ? a : []].map((c) => c.getLeafHeaders()).flat();
|
|
185
185
|
}, C(e.options, _, "getLeafHeaders"));
|
|
186
186
|
}
|
|
187
187
|
};
|
|
188
188
|
function G(e, o, t, n) {
|
|
189
189
|
var r, i;
|
|
190
190
|
let l = 0;
|
|
191
|
-
const u = function(
|
|
192
|
-
s === void 0 && (s = 1), l = Math.max(l, s),
|
|
191
|
+
const u = function(g, s) {
|
|
192
|
+
s === void 0 && (s = 1), l = Math.max(l, s), g.filter((f) => f.getIsVisible()).forEach((f) => {
|
|
193
193
|
var p;
|
|
194
|
-
(p =
|
|
194
|
+
(p = f.columns) != null && p.length && u(f.columns, s + 1);
|
|
195
195
|
}, 0);
|
|
196
196
|
};
|
|
197
197
|
u(e);
|
|
198
198
|
let a = [];
|
|
199
|
-
const
|
|
200
|
-
const
|
|
199
|
+
const d = (g, s) => {
|
|
200
|
+
const f = {
|
|
201
201
|
depth: s,
|
|
202
202
|
id: [n, `${s}`].filter(Boolean).join("_"),
|
|
203
203
|
headers: []
|
|
204
204
|
}, p = [];
|
|
205
|
-
|
|
206
|
-
const w = [...p].reverse()[0], h = R.column.depth ===
|
|
205
|
+
g.forEach((R) => {
|
|
206
|
+
const w = [...p].reverse()[0], h = R.column.depth === f.depth;
|
|
207
207
|
let v, M = !1;
|
|
208
208
|
if (h && R.column.parent ? v = R.column.parent : (v = R.column, M = !0), w && w?.column === v)
|
|
209
209
|
w.subHeaders.push(R);
|
|
@@ -217,16 +217,16 @@ function G(e, o, t, n) {
|
|
|
217
217
|
});
|
|
218
218
|
F.subHeaders.push(R), p.push(F);
|
|
219
219
|
}
|
|
220
|
-
|
|
221
|
-
}), a.push(
|
|
222
|
-
},
|
|
220
|
+
f.headers.push(R), R.headerGroup = f;
|
|
221
|
+
}), a.push(f), s > 0 && d(p, s - 1);
|
|
222
|
+
}, c = o.map((g, s) => se(t, g, {
|
|
223
223
|
depth: l,
|
|
224
224
|
index: s
|
|
225
225
|
}));
|
|
226
|
-
|
|
227
|
-
const m = (
|
|
226
|
+
d(c, l - 1), a.reverse();
|
|
227
|
+
const m = (g) => g.filter((f) => f.column.getIsVisible()).map((f) => {
|
|
228
228
|
let p = 0, R = 0, w = [0];
|
|
229
|
-
|
|
229
|
+
f.subHeaders && f.subHeaders.length ? (w = [], m(f.subHeaders).forEach((v) => {
|
|
230
230
|
let {
|
|
231
231
|
colSpan: M,
|
|
232
232
|
rowSpan: F
|
|
@@ -234,7 +234,7 @@ function G(e, o, t, n) {
|
|
|
234
234
|
p += M, w.push(F);
|
|
235
235
|
})) : p = 1;
|
|
236
236
|
const h = Math.min(...w);
|
|
237
|
-
return R = R + h,
|
|
237
|
+
return R = R + h, f.colSpan = p, f.rowSpan = R, {
|
|
238
238
|
colSpan: p,
|
|
239
239
|
rowSpan: R
|
|
240
240
|
};
|
|
@@ -253,39 +253,39 @@ const Z = (e, o, t, n, r, i, l) => {
|
|
|
253
253
|
getValue: (a) => {
|
|
254
254
|
if (u._valuesCache.hasOwnProperty(a))
|
|
255
255
|
return u._valuesCache[a];
|
|
256
|
-
const
|
|
257
|
-
if (
|
|
258
|
-
return u._valuesCache[a] =
|
|
256
|
+
const d = e.getColumn(a);
|
|
257
|
+
if (d != null && d.accessorFn)
|
|
258
|
+
return u._valuesCache[a] = d.accessorFn(u.original, n), u._valuesCache[a];
|
|
259
259
|
},
|
|
260
260
|
getUniqueValues: (a) => {
|
|
261
261
|
if (u._uniqueValuesCache.hasOwnProperty(a))
|
|
262
262
|
return u._uniqueValuesCache[a];
|
|
263
|
-
const
|
|
264
|
-
if (
|
|
265
|
-
return
|
|
263
|
+
const d = e.getColumn(a);
|
|
264
|
+
if (d != null && d.accessorFn)
|
|
265
|
+
return d.columnDef.getUniqueValues ? (u._uniqueValuesCache[a] = d.columnDef.getUniqueValues(u.original, n), u._uniqueValuesCache[a]) : (u._uniqueValuesCache[a] = [u.getValue(a)], u._uniqueValuesCache[a]);
|
|
266
266
|
},
|
|
267
267
|
renderValue: (a) => {
|
|
268
|
-
var
|
|
269
|
-
return (
|
|
268
|
+
var d;
|
|
269
|
+
return (d = u.getValue(a)) != null ? d : e.options.renderFallbackValue;
|
|
270
270
|
},
|
|
271
271
|
subRows: [],
|
|
272
272
|
getLeafRows: () => xe(u.subRows, (a) => a.subRows),
|
|
273
273
|
getParentRow: () => u.parentId ? e.getRow(u.parentId, !0) : void 0,
|
|
274
274
|
getParentRows: () => {
|
|
275
|
-
let a = [],
|
|
275
|
+
let a = [], d = u;
|
|
276
276
|
for (; ; ) {
|
|
277
|
-
const
|
|
278
|
-
if (!
|
|
279
|
-
a.push(
|
|
277
|
+
const c = d.getParentRow();
|
|
278
|
+
if (!c) break;
|
|
279
|
+
a.push(c), d = c;
|
|
280
280
|
}
|
|
281
281
|
return a.reverse();
|
|
282
282
|
},
|
|
283
|
-
getAllCells: S(() => [e.getAllLeafColumns()], (a) => a.map((
|
|
284
|
-
_getAllCellsByColumnId: S(() => [u.getAllCells()], (a) => a.reduce((
|
|
283
|
+
getAllCells: S(() => [e.getAllLeafColumns()], (a) => a.map((d) => Pe(e, u, d, d.id)), C(e.options, "debugRows", "getAllCells")),
|
|
284
|
+
_getAllCellsByColumnId: S(() => [u.getAllCells()], (a) => a.reduce((d, c) => (d[c.column.id] = c, d), {}), C(e.options, "debugRows", "getAllCellsByColumnId"))
|
|
285
285
|
};
|
|
286
286
|
for (let a = 0; a < e._features.length; a++) {
|
|
287
|
-
const
|
|
288
|
-
|
|
287
|
+
const d = e._features[a];
|
|
288
|
+
d == null || d.createRow == null || d.createRow(u, e);
|
|
289
289
|
}
|
|
290
290
|
return u;
|
|
291
291
|
}, Ee = {
|
|
@@ -306,16 +306,16 @@ const de = (e, o, t) => {
|
|
|
306
306
|
return !!(!((n = e.getValue(o)) == null || (n = n.toString()) == null) && n.includes(t));
|
|
307
307
|
};
|
|
308
308
|
de.autoRemove = (e) => V(e);
|
|
309
|
-
const
|
|
309
|
+
const ce = (e, o, t) => {
|
|
310
310
|
var n;
|
|
311
311
|
return ((n = e.getValue(o)) == null || (n = n.toString()) == null ? void 0 : n.toLowerCase()) === t?.toLowerCase();
|
|
312
312
|
};
|
|
313
|
-
|
|
314
|
-
const
|
|
313
|
+
ce.autoRemove = (e) => V(e);
|
|
314
|
+
const fe = (e, o, t) => {
|
|
315
315
|
var n;
|
|
316
316
|
return (n = e.getValue(o)) == null ? void 0 : n.includes(t);
|
|
317
317
|
};
|
|
318
|
-
|
|
318
|
+
fe.autoRemove = (e) => V(e);
|
|
319
319
|
const pe = (e, o, t) => !t.some((n) => {
|
|
320
320
|
var r;
|
|
321
321
|
return !((r = e.getValue(o)) != null && r.includes(n));
|
|
@@ -347,8 +347,8 @@ b.autoRemove = (e) => V(e) || V(e[0]) && V(e[1]);
|
|
|
347
347
|
const P = {
|
|
348
348
|
includesString: ge,
|
|
349
349
|
includesStringSensitive: de,
|
|
350
|
-
equalsString:
|
|
351
|
-
arrIncludes:
|
|
350
|
+
equalsString: ce,
|
|
351
|
+
arrIncludes: fe,
|
|
352
352
|
arrIncludesAll: pe,
|
|
353
353
|
arrIncludesSome: me,
|
|
354
354
|
equals: Se,
|
|
@@ -392,18 +392,18 @@ const De = {
|
|
|
392
392
|
return (t = (n = o.getState().columnFilters) == null ? void 0 : n.findIndex((r) => r.id === e.id)) != null ? t : -1;
|
|
393
393
|
}, e.setFilterValue = (t) => {
|
|
394
394
|
o.setColumnFilters((n) => {
|
|
395
|
-
const r = e.getFilterFn(), i = n?.find((
|
|
395
|
+
const r = e.getFilterFn(), i = n?.find((c) => c.id === e.id), l = I(t, i ? i.value : void 0);
|
|
396
396
|
if (ue(r, l, e)) {
|
|
397
397
|
var u;
|
|
398
|
-
return (u = n?.filter((
|
|
398
|
+
return (u = n?.filter((c) => c.id !== e.id)) != null ? u : [];
|
|
399
399
|
}
|
|
400
400
|
const a = {
|
|
401
401
|
id: e.id,
|
|
402
402
|
value: l
|
|
403
403
|
};
|
|
404
404
|
if (i) {
|
|
405
|
-
var
|
|
406
|
-
return (
|
|
405
|
+
var d;
|
|
406
|
+
return (d = n?.map((c) => c.id === e.id ? a : c)) != null ? d : [];
|
|
407
407
|
}
|
|
408
408
|
return n != null && n.length ? [...n, a] : [a];
|
|
409
409
|
});
|
|
@@ -585,8 +585,8 @@ const je = {
|
|
|
585
585
|
else {
|
|
586
586
|
const l = [...o], u = [...r];
|
|
587
587
|
for (; u.length && l.length; ) {
|
|
588
|
-
const a = l.shift(),
|
|
589
|
-
|
|
588
|
+
const a = l.shift(), d = u.findIndex((c) => c.id === a);
|
|
589
|
+
d > -1 && i.push(u.splice(d, 1)[0]);
|
|
590
590
|
}
|
|
591
591
|
i = [...i, ...u];
|
|
592
592
|
}
|
|
@@ -617,10 +617,10 @@ const je = {
|
|
|
617
617
|
};
|
|
618
618
|
}
|
|
619
619
|
if (t === "left") {
|
|
620
|
-
var
|
|
620
|
+
var d, c;
|
|
621
621
|
return {
|
|
622
|
-
left: [...((
|
|
623
|
-
right: ((
|
|
622
|
+
left: [...((d = r?.left) != null ? d : []).filter((m) => !(n != null && n.includes(m))), ...n],
|
|
623
|
+
right: ((c = r?.right) != null ? c : []).filter((m) => !(n != null && n.includes(m)))
|
|
624
624
|
};
|
|
625
625
|
}
|
|
626
626
|
return {
|
|
@@ -741,13 +741,13 @@ const L = {
|
|
|
741
741
|
return (i) => {
|
|
742
742
|
if (!n || !r || (i.persist == null || i.persist(), q(i) && i.touches && i.touches.length > 1))
|
|
743
743
|
return;
|
|
744
|
-
const l = e.getSize(), u = e ? e.getLeafHeaders().map((w) => [w.column.id, w.column.getSize()]) : [[n.id, n.getSize()]], a = q(i) ? Math.round(i.touches[0].clientX) : i.clientX,
|
|
744
|
+
const l = e.getSize(), u = e ? e.getLeafHeaders().map((w) => [w.column.id, w.column.getSize()]) : [[n.id, n.getSize()]], a = q(i) ? Math.round(i.touches[0].clientX) : i.clientX, d = {}, c = (w, h) => {
|
|
745
745
|
typeof h == "number" && (o.setColumnSizingInfo((v) => {
|
|
746
746
|
var M, F;
|
|
747
747
|
const E = o.options.columnResizeDirection === "rtl" ? -1 : 1, ne = (h - ((M = v?.startOffset) != null ? M : 0)) * E, oe = Math.max(ne / ((F = v?.startSize) != null ? F : 0), -0.999999);
|
|
748
748
|
return v.columnSizingStart.forEach((we) => {
|
|
749
749
|
let [he, re] = we;
|
|
750
|
-
|
|
750
|
+
d[he] = Math.round(Math.max(re + re * oe, 0) * 100) / 100;
|
|
751
751
|
}), {
|
|
752
752
|
...v,
|
|
753
753
|
deltaOffset: ne,
|
|
@@ -755,10 +755,10 @@ const L = {
|
|
|
755
755
|
};
|
|
756
756
|
}), (o.options.columnResizeMode === "onChange" || w === "end") && o.setColumnSizing((v) => ({
|
|
757
757
|
...v,
|
|
758
|
-
...
|
|
758
|
+
...d
|
|
759
759
|
})));
|
|
760
|
-
}, m = (w) =>
|
|
761
|
-
|
|
760
|
+
}, m = (w) => c("move", w), g = (w) => {
|
|
761
|
+
c("end", w), o.setColumnSizingInfo((h) => ({
|
|
762
762
|
...h,
|
|
763
763
|
isResizingColumn: !1,
|
|
764
764
|
startOffset: null,
|
|
@@ -767,21 +767,21 @@ const L = {
|
|
|
767
767
|
deltaPercentage: null,
|
|
768
768
|
columnSizingStart: []
|
|
769
769
|
}));
|
|
770
|
-
}, s = Xe(t),
|
|
770
|
+
}, s = Xe(t), f = {
|
|
771
771
|
moveHandler: (w) => m(w.clientX),
|
|
772
772
|
upHandler: (w) => {
|
|
773
|
-
s?.removeEventListener("mousemove",
|
|
773
|
+
s?.removeEventListener("mousemove", f.moveHandler), s?.removeEventListener("mouseup", f.upHandler), g(w.clientX);
|
|
774
774
|
}
|
|
775
775
|
}, p = {
|
|
776
776
|
moveHandler: (w) => (w.cancelable && (w.preventDefault(), w.stopPropagation()), m(w.touches[0].clientX), !1),
|
|
777
777
|
upHandler: (w) => {
|
|
778
778
|
var h;
|
|
779
|
-
s?.removeEventListener("touchmove", p.moveHandler), s?.removeEventListener("touchend", p.upHandler), w.cancelable && (w.preventDefault(), w.stopPropagation()),
|
|
779
|
+
s?.removeEventListener("touchmove", p.moveHandler), s?.removeEventListener("touchend", p.upHandler), w.cancelable && (w.preventDefault(), w.stopPropagation()), g((h = w.touches[0]) == null ? void 0 : h.clientX);
|
|
780
780
|
}
|
|
781
781
|
}, R = Je() ? {
|
|
782
782
|
passive: !1
|
|
783
783
|
} : !1;
|
|
784
|
-
q(i) ? (s?.addEventListener("touchmove", p.moveHandler, R), s?.addEventListener("touchend", p.upHandler, R)) : (s?.addEventListener("mousemove",
|
|
784
|
+
q(i) ? (s?.addEventListener("touchmove", p.moveHandler, R), s?.addEventListener("touchend", p.upHandler, R)) : (s?.addEventListener("mousemove", f.moveHandler, R), s?.addEventListener("mouseup", f.upHandler, R)), o.setColumnSizingInfo((w) => ({
|
|
785
785
|
...w,
|
|
786
786
|
startOffset: a,
|
|
787
787
|
startSize: l,
|
|
@@ -1108,34 +1108,34 @@ const We = {
|
|
|
1108
1108
|
e.pin = (t, n, r) => {
|
|
1109
1109
|
const i = n ? e.getLeafRows().map((a) => {
|
|
1110
1110
|
let {
|
|
1111
|
-
id:
|
|
1111
|
+
id: d
|
|
1112
1112
|
} = a;
|
|
1113
|
-
return
|
|
1113
|
+
return d;
|
|
1114
1114
|
}) : [], l = r ? e.getParentRows().map((a) => {
|
|
1115
1115
|
let {
|
|
1116
|
-
id:
|
|
1116
|
+
id: d
|
|
1117
1117
|
} = a;
|
|
1118
|
-
return
|
|
1118
|
+
return d;
|
|
1119
1119
|
}) : [], u = /* @__PURE__ */ new Set([...l, e.id, ...i]);
|
|
1120
1120
|
o.setRowPinning((a) => {
|
|
1121
|
-
var
|
|
1121
|
+
var d, c;
|
|
1122
1122
|
if (t === "bottom") {
|
|
1123
|
-
var m,
|
|
1123
|
+
var m, g;
|
|
1124
1124
|
return {
|
|
1125
1125
|
top: ((m = a?.top) != null ? m : []).filter((p) => !(u != null && u.has(p))),
|
|
1126
|
-
bottom: [...((
|
|
1126
|
+
bottom: [...((g = a?.bottom) != null ? g : []).filter((p) => !(u != null && u.has(p))), ...Array.from(u)]
|
|
1127
1127
|
};
|
|
1128
1128
|
}
|
|
1129
1129
|
if (t === "top") {
|
|
1130
|
-
var s,
|
|
1130
|
+
var s, f;
|
|
1131
1131
|
return {
|
|
1132
1132
|
top: [...((s = a?.top) != null ? s : []).filter((p) => !(u != null && u.has(p))), ...Array.from(u)],
|
|
1133
|
-
bottom: ((
|
|
1133
|
+
bottom: ((f = a?.bottom) != null ? f : []).filter((p) => !(u != null && u.has(p)))
|
|
1134
1134
|
};
|
|
1135
1135
|
}
|
|
1136
1136
|
return {
|
|
1137
|
-
top: ((
|
|
1138
|
-
bottom: ((
|
|
1137
|
+
top: ((d = a?.top) != null ? d : []).filter((p) => !(u != null && u.has(p))),
|
|
1138
|
+
bottom: ((c = a?.bottom) != null ? c : []).filter((p) => !(u != null && u.has(p)))
|
|
1139
1139
|
};
|
|
1140
1140
|
});
|
|
1141
1141
|
}, e.getCanPin = () => {
|
|
@@ -1323,12 +1323,12 @@ const We = {
|
|
|
1323
1323
|
function U(e, o) {
|
|
1324
1324
|
const t = e.getState().rowSelection, n = [], r = {}, i = function(l, u) {
|
|
1325
1325
|
return l.map((a) => {
|
|
1326
|
-
var
|
|
1327
|
-
const
|
|
1328
|
-
if (
|
|
1326
|
+
var d;
|
|
1327
|
+
const c = ee(a, t);
|
|
1328
|
+
if (c && (n.push(a), r[a.id] = a), (d = a.subRows) != null && d.length && (a = {
|
|
1329
1329
|
...a,
|
|
1330
1330
|
subRows: i(a.subRows)
|
|
1331
|
-
}),
|
|
1331
|
+
}), c)
|
|
1332
1332
|
return a;
|
|
1333
1333
|
}).filter(Boolean);
|
|
1334
1334
|
};
|
|
@@ -1427,21 +1427,21 @@ const D = {
|
|
|
1427
1427
|
const r = e.getNextSortingOrder(), i = typeof t < "u" && t !== null;
|
|
1428
1428
|
o.setSorting((l) => {
|
|
1429
1429
|
const u = l?.find((s) => s.id === e.id), a = l?.findIndex((s) => s.id === e.id);
|
|
1430
|
-
let
|
|
1431
|
-
if (l != null && l.length && e.getCanMultiSort() && n ? u ?
|
|
1432
|
-
var
|
|
1433
|
-
|
|
1430
|
+
let d = [], c, m = i ? t : r === "desc";
|
|
1431
|
+
if (l != null && l.length && e.getCanMultiSort() && n ? u ? c = "toggle" : c = "add" : l != null && l.length && a !== l.length - 1 ? c = "replace" : u ? c = "toggle" : c = "replace", c === "toggle" && (i || r || (c = "remove")), c === "add") {
|
|
1432
|
+
var g;
|
|
1433
|
+
d = [...l, {
|
|
1434
1434
|
id: e.id,
|
|
1435
1435
|
desc: m
|
|
1436
|
-
}],
|
|
1437
|
-
} else
|
|
1436
|
+
}], d.splice(0, d.length - ((g = o.options.maxMultiSortColCount) != null ? g : Number.MAX_SAFE_INTEGER));
|
|
1437
|
+
} else c === "toggle" ? d = l.map((s) => s.id === e.id ? {
|
|
1438
1438
|
...s,
|
|
1439
1439
|
desc: m
|
|
1440
|
-
} : s) :
|
|
1440
|
+
} : s) : c === "remove" ? d = l.filter((s) => s.id !== e.id) : d = [{
|
|
1441
1441
|
id: e.id,
|
|
1442
1442
|
desc: m
|
|
1443
1443
|
}];
|
|
1444
|
-
return
|
|
1444
|
+
return d;
|
|
1445
1445
|
});
|
|
1446
1446
|
}, e.getFirstSortDir = () => {
|
|
1447
1447
|
var t, n;
|
|
@@ -1506,20 +1506,20 @@ function gt(e) {
|
|
|
1506
1506
|
let r = {
|
|
1507
1507
|
_features: n
|
|
1508
1508
|
};
|
|
1509
|
-
const i = r._features.reduce((
|
|
1509
|
+
const i = r._features.reduce((g, s) => Object.assign(g, s.getDefaultOptions == null ? void 0 : s.getDefaultOptions(r)), {}), l = (g) => r.options.mergeOptions ? r.options.mergeOptions(i, g) : {
|
|
1510
1510
|
...i,
|
|
1511
|
-
...
|
|
1511
|
+
...g
|
|
1512
1512
|
};
|
|
1513
1513
|
let a = {
|
|
1514
1514
|
...{},
|
|
1515
1515
|
...(t = e.initialState) != null ? t : {}
|
|
1516
1516
|
};
|
|
1517
|
-
r._features.forEach((
|
|
1517
|
+
r._features.forEach((g) => {
|
|
1518
1518
|
var s;
|
|
1519
|
-
a = (s =
|
|
1519
|
+
a = (s = g.getInitialState == null ? void 0 : g.getInitialState(a)) != null ? s : a;
|
|
1520
1520
|
});
|
|
1521
|
-
const
|
|
1522
|
-
let
|
|
1521
|
+
const d = [];
|
|
1522
|
+
let c = !1;
|
|
1523
1523
|
const m = {
|
|
1524
1524
|
_features: n,
|
|
1525
1525
|
options: {
|
|
@@ -1527,11 +1527,11 @@ function gt(e) {
|
|
|
1527
1527
|
...e
|
|
1528
1528
|
},
|
|
1529
1529
|
initialState: a,
|
|
1530
|
-
_queue: (
|
|
1531
|
-
|
|
1532
|
-
for (;
|
|
1533
|
-
|
|
1534
|
-
|
|
1530
|
+
_queue: (g) => {
|
|
1531
|
+
d.push(g), c || (c = !0, Promise.resolve().then(() => {
|
|
1532
|
+
for (; d.length; )
|
|
1533
|
+
d.shift()();
|
|
1534
|
+
c = !1;
|
|
1535
1535
|
}).catch((s) => setTimeout(() => {
|
|
1536
1536
|
throw s;
|
|
1537
1537
|
})));
|
|
@@ -1539,69 +1539,69 @@ function gt(e) {
|
|
|
1539
1539
|
reset: () => {
|
|
1540
1540
|
r.setState(r.initialState);
|
|
1541
1541
|
},
|
|
1542
|
-
setOptions: (
|
|
1543
|
-
const s = I(
|
|
1542
|
+
setOptions: (g) => {
|
|
1543
|
+
const s = I(g, r.options);
|
|
1544
1544
|
r.options = l(s);
|
|
1545
1545
|
},
|
|
1546
1546
|
getState: () => r.options.state,
|
|
1547
|
-
setState: (
|
|
1548
|
-
r.options.onStateChange == null || r.options.onStateChange(
|
|
1547
|
+
setState: (g) => {
|
|
1548
|
+
r.options.onStateChange == null || r.options.onStateChange(g);
|
|
1549
1549
|
},
|
|
1550
|
-
_getRowId: (
|
|
1550
|
+
_getRowId: (g, s, f) => {
|
|
1551
1551
|
var p;
|
|
1552
|
-
return (p = r.options.getRowId == null ? void 0 : r.options.getRowId(
|
|
1552
|
+
return (p = r.options.getRowId == null ? void 0 : r.options.getRowId(g, s, f)) != null ? p : `${f ? [f.id, s].join(".") : s}`;
|
|
1553
1553
|
},
|
|
1554
1554
|
getCoreRowModel: () => (r._getCoreRowModel || (r._getCoreRowModel = r.options.getCoreRowModel(r)), r._getCoreRowModel()),
|
|
1555
1555
|
// The final calls start at the bottom of the model,
|
|
1556
1556
|
// expanded rows, which then work their way up
|
|
1557
1557
|
getRowModel: () => r.getPaginationRowModel(),
|
|
1558
1558
|
//in next version, we should just pass in the row model as the optional 2nd arg
|
|
1559
|
-
getRow: (
|
|
1560
|
-
let
|
|
1561
|
-
if (!
|
|
1562
|
-
throw process.env.NODE_ENV !== "production" ? new Error(`getRow could not find row with ID: ${
|
|
1563
|
-
return
|
|
1559
|
+
getRow: (g, s) => {
|
|
1560
|
+
let f = (s ? r.getPrePaginationRowModel() : r.getRowModel()).rowsById[g];
|
|
1561
|
+
if (!f && (f = r.getCoreRowModel().rowsById[g], !f))
|
|
1562
|
+
throw process.env.NODE_ENV !== "production" ? new Error(`getRow could not find row with ID: ${g}`) : new Error();
|
|
1563
|
+
return f;
|
|
1564
1564
|
},
|
|
1565
|
-
_getDefaultColumnDef: S(() => [r.options.defaultColumn], (
|
|
1565
|
+
_getDefaultColumnDef: S(() => [r.options.defaultColumn], (g) => {
|
|
1566
1566
|
var s;
|
|
1567
|
-
return
|
|
1568
|
-
header: (
|
|
1569
|
-
const p =
|
|
1567
|
+
return g = (s = g) != null ? s : {}, {
|
|
1568
|
+
header: (f) => {
|
|
1569
|
+
const p = f.header.column.columnDef;
|
|
1570
1570
|
return p.accessorKey ? p.accessorKey : p.accessorFn ? p.id : null;
|
|
1571
1571
|
},
|
|
1572
1572
|
// footer: props => props.header.column.id,
|
|
1573
|
-
cell: (
|
|
1573
|
+
cell: (f) => {
|
|
1574
1574
|
var p, R;
|
|
1575
|
-
return (p = (R =
|
|
1575
|
+
return (p = (R = f.renderValue()) == null || R.toString == null ? void 0 : R.toString()) != null ? p : null;
|
|
1576
1576
|
},
|
|
1577
|
-
...r._features.reduce((
|
|
1578
|
-
...
|
|
1577
|
+
...r._features.reduce((f, p) => Object.assign(f, p.getDefaultColumnDef == null ? void 0 : p.getDefaultColumnDef()), {}),
|
|
1578
|
+
...g
|
|
1579
1579
|
};
|
|
1580
1580
|
}, C(e, "debugColumns", "_getDefaultColumnDef")),
|
|
1581
1581
|
_getColumnDefs: () => r.options.columns,
|
|
1582
|
-
getAllColumns: S(() => [r._getColumnDefs()], (
|
|
1583
|
-
const s = function(
|
|
1584
|
-
return R === void 0 && (R = 0),
|
|
1582
|
+
getAllColumns: S(() => [r._getColumnDefs()], (g) => {
|
|
1583
|
+
const s = function(f, p, R) {
|
|
1584
|
+
return R === void 0 && (R = 0), f.map((w) => {
|
|
1585
1585
|
const h = Ie(r, w, R, p), v = w;
|
|
1586
1586
|
return h.columns = v.columns ? s(v.columns, h, R + 1) : [], h;
|
|
1587
1587
|
});
|
|
1588
1588
|
};
|
|
1589
|
-
return s(
|
|
1589
|
+
return s(g);
|
|
1590
1590
|
}, C(e, "debugColumns", "getAllColumns")),
|
|
1591
|
-
getAllFlatColumns: S(() => [r.getAllColumns()], (
|
|
1592
|
-
_getAllFlatColumnsById: S(() => [r.getAllFlatColumns()], (
|
|
1593
|
-
getAllLeafColumns: S(() => [r.getAllColumns(), r._getOrderColumnsFn()], (
|
|
1594
|
-
let
|
|
1595
|
-
return s(
|
|
1591
|
+
getAllFlatColumns: S(() => [r.getAllColumns()], (g) => g.flatMap((s) => s.getFlatColumns()), C(e, "debugColumns", "getAllFlatColumns")),
|
|
1592
|
+
_getAllFlatColumnsById: S(() => [r.getAllFlatColumns()], (g) => g.reduce((s, f) => (s[f.id] = f, s), {}), C(e, "debugColumns", "getAllFlatColumnsById")),
|
|
1593
|
+
getAllLeafColumns: S(() => [r.getAllColumns(), r._getOrderColumnsFn()], (g, s) => {
|
|
1594
|
+
let f = g.flatMap((p) => p.getLeafColumns());
|
|
1595
|
+
return s(f);
|
|
1596
1596
|
}, C(e, "debugColumns", "getAllLeafColumns")),
|
|
1597
|
-
getColumn: (
|
|
1598
|
-
const s = r._getAllFlatColumnsById()[
|
|
1599
|
-
return process.env.NODE_ENV !== "production" && !s && console.error(`[Table] Column with id '${
|
|
1597
|
+
getColumn: (g) => {
|
|
1598
|
+
const s = r._getAllFlatColumnsById()[g];
|
|
1599
|
+
return process.env.NODE_ENV !== "production" && !s && console.error(`[Table] Column with id '${g}' does not exist.`), s;
|
|
1600
1600
|
}
|
|
1601
1601
|
};
|
|
1602
1602
|
Object.assign(r, m);
|
|
1603
|
-
for (let
|
|
1604
|
-
const s = r._features[
|
|
1603
|
+
for (let g = 0; g < r._features.length; g++) {
|
|
1604
|
+
const s = r._features[g];
|
|
1605
1605
|
s == null || s.createTable == null || s.createTable(r);
|
|
1606
1606
|
}
|
|
1607
1607
|
return r;
|
|
@@ -1615,11 +1615,11 @@ function dt() {
|
|
|
1615
1615
|
}, n = function(r, i, l) {
|
|
1616
1616
|
i === void 0 && (i = 0);
|
|
1617
1617
|
const u = [];
|
|
1618
|
-
for (let
|
|
1619
|
-
const
|
|
1620
|
-
if (t.flatRows.push(
|
|
1618
|
+
for (let d = 0; d < r.length; d++) {
|
|
1619
|
+
const c = Z(e, e._getRowId(r[d], d, l), r[d], d, i, void 0, l?.id);
|
|
1620
|
+
if (t.flatRows.push(c), t.rowsById[c.id] = c, u.push(c), e.options.getSubRows) {
|
|
1621
1621
|
var a;
|
|
1622
|
-
|
|
1622
|
+
c.originalSubRows = e.options.getSubRows(r[d], d), (a = c.originalSubRows) != null && a.length && (c.subRows = n(c.originalSubRows, i + 1, c));
|
|
1623
1623
|
}
|
|
1624
1624
|
}
|
|
1625
1625
|
return u;
|
|
@@ -1627,7 +1627,7 @@ function dt() {
|
|
|
1627
1627
|
return t.rows = n(o), t;
|
|
1628
1628
|
}, C(e.options, "debugTable", "getRowModel", () => e._autoResetPageIndex()));
|
|
1629
1629
|
}
|
|
1630
|
-
function
|
|
1630
|
+
function ct(e) {
|
|
1631
1631
|
const o = [], t = (n) => {
|
|
1632
1632
|
var r;
|
|
1633
1633
|
o.push(n), (r = n.subRows) != null && r.length && n.getIsExpanded() && n.subRows.forEach(t);
|
|
@@ -1638,31 +1638,31 @@ function ft(e) {
|
|
|
1638
1638
|
rowsById: e.rowsById
|
|
1639
1639
|
};
|
|
1640
1640
|
}
|
|
1641
|
-
function
|
|
1641
|
+
function ft(e, o, t) {
|
|
1642
1642
|
return t.options.filterFromLeafRows ? pt(e, o, t) : mt(e, o, t);
|
|
1643
1643
|
}
|
|
1644
1644
|
function pt(e, o, t) {
|
|
1645
1645
|
var n;
|
|
1646
|
-
const r = [], i = {}, l = (n = t.options.maxLeafRowFilterDepth) != null ? n : 100, u = function(a,
|
|
1647
|
-
|
|
1648
|
-
const
|
|
1649
|
-
for (let
|
|
1646
|
+
const r = [], i = {}, l = (n = t.options.maxLeafRowFilterDepth) != null ? n : 100, u = function(a, d) {
|
|
1647
|
+
d === void 0 && (d = 0);
|
|
1648
|
+
const c = [];
|
|
1649
|
+
for (let g = 0; g < a.length; g++) {
|
|
1650
1650
|
var m;
|
|
1651
|
-
let s = a[
|
|
1652
|
-
const
|
|
1653
|
-
if (
|
|
1654
|
-
if (
|
|
1655
|
-
|
|
1651
|
+
let s = a[g];
|
|
1652
|
+
const f = Z(t, s.id, s.original, s.index, s.depth, void 0, s.parentId);
|
|
1653
|
+
if (f.columnFilters = s.columnFilters, (m = s.subRows) != null && m.length && d < l) {
|
|
1654
|
+
if (f.subRows = u(s.subRows, d + 1), s = f, o(s) && !f.subRows.length) {
|
|
1655
|
+
c.push(s), i[s.id] = s, r.push(s);
|
|
1656
1656
|
continue;
|
|
1657
1657
|
}
|
|
1658
|
-
if (o(s) ||
|
|
1659
|
-
|
|
1658
|
+
if (o(s) || f.subRows.length) {
|
|
1659
|
+
c.push(s), i[s.id] = s, r.push(s);
|
|
1660
1660
|
continue;
|
|
1661
1661
|
}
|
|
1662
1662
|
} else
|
|
1663
|
-
s =
|
|
1663
|
+
s = f, o(s) && (c.push(s), i[s.id] = s, r.push(s));
|
|
1664
1664
|
}
|
|
1665
|
-
return
|
|
1665
|
+
return c;
|
|
1666
1666
|
};
|
|
1667
1667
|
return {
|
|
1668
1668
|
rows: u(e),
|
|
@@ -1672,21 +1672,21 @@ function pt(e, o, t) {
|
|
|
1672
1672
|
}
|
|
1673
1673
|
function mt(e, o, t) {
|
|
1674
1674
|
var n;
|
|
1675
|
-
const r = [], i = {}, l = (n = t.options.maxLeafRowFilterDepth) != null ? n : 100, u = function(a,
|
|
1676
|
-
|
|
1677
|
-
const
|
|
1678
|
-
for (let
|
|
1679
|
-
let s = a[
|
|
1675
|
+
const r = [], i = {}, l = (n = t.options.maxLeafRowFilterDepth) != null ? n : 100, u = function(a, d) {
|
|
1676
|
+
d === void 0 && (d = 0);
|
|
1677
|
+
const c = [];
|
|
1678
|
+
for (let g = 0; g < a.length; g++) {
|
|
1679
|
+
let s = a[g];
|
|
1680
1680
|
if (o(s)) {
|
|
1681
1681
|
var m;
|
|
1682
|
-
if ((m = s.subRows) != null && m.length &&
|
|
1682
|
+
if ((m = s.subRows) != null && m.length && d < l) {
|
|
1683
1683
|
const p = Z(t, s.id, s.original, s.index, s.depth, void 0, s.parentId);
|
|
1684
|
-
p.subRows = u(s.subRows,
|
|
1684
|
+
p.subRows = u(s.subRows, d + 1), s = p;
|
|
1685
1685
|
}
|
|
1686
|
-
|
|
1686
|
+
c.push(s), r.push(s), i[s.id] = s;
|
|
1687
1687
|
}
|
|
1688
1688
|
}
|
|
1689
|
-
return
|
|
1689
|
+
return c;
|
|
1690
1690
|
};
|
|
1691
1691
|
return {
|
|
1692
1692
|
rows: u(e),
|
|
@@ -1697,52 +1697,52 @@ function mt(e, o, t) {
|
|
|
1697
1697
|
function St() {
|
|
1698
1698
|
return (e) => S(() => [e.getPreFilteredRowModel(), e.getState().columnFilters, e.getState().globalFilter], (o, t, n) => {
|
|
1699
1699
|
if (!o.rows.length || !(t != null && t.length) && !n) {
|
|
1700
|
-
for (let
|
|
1701
|
-
o.flatRows[
|
|
1700
|
+
for (let g = 0; g < o.flatRows.length; g++)
|
|
1701
|
+
o.flatRows[g].columnFilters = {}, o.flatRows[g].columnFiltersMeta = {};
|
|
1702
1702
|
return o;
|
|
1703
1703
|
}
|
|
1704
1704
|
const r = [], i = [];
|
|
1705
|
-
(t ?? []).forEach((
|
|
1705
|
+
(t ?? []).forEach((g) => {
|
|
1706
1706
|
var s;
|
|
1707
|
-
const
|
|
1708
|
-
if (!
|
|
1707
|
+
const f = e.getColumn(g.id);
|
|
1708
|
+
if (!f)
|
|
1709
1709
|
return;
|
|
1710
|
-
const p =
|
|
1710
|
+
const p = f.getFilterFn();
|
|
1711
1711
|
if (!p) {
|
|
1712
|
-
process.env.NODE_ENV !== "production" && console.warn(`Could not find a valid 'column.filterFn' for column with the ID: ${
|
|
1712
|
+
process.env.NODE_ENV !== "production" && console.warn(`Could not find a valid 'column.filterFn' for column with the ID: ${f.id}.`);
|
|
1713
1713
|
return;
|
|
1714
1714
|
}
|
|
1715
1715
|
r.push({
|
|
1716
|
-
id:
|
|
1716
|
+
id: g.id,
|
|
1717
1717
|
filterFn: p,
|
|
1718
|
-
resolvedValue: (s = p.resolveFilterValue == null ? void 0 : p.resolveFilterValue(
|
|
1718
|
+
resolvedValue: (s = p.resolveFilterValue == null ? void 0 : p.resolveFilterValue(g.value)) != null ? s : g.value
|
|
1719
1719
|
});
|
|
1720
1720
|
});
|
|
1721
|
-
const l = (t ?? []).map((
|
|
1722
|
-
n && u && a.length && (l.push("__global__"), a.forEach((
|
|
1721
|
+
const l = (t ?? []).map((g) => g.id), u = e.getGlobalFilterFn(), a = e.getAllLeafColumns().filter((g) => g.getCanGlobalFilter());
|
|
1722
|
+
n && u && a.length && (l.push("__global__"), a.forEach((g) => {
|
|
1723
1723
|
var s;
|
|
1724
1724
|
i.push({
|
|
1725
|
-
id:
|
|
1725
|
+
id: g.id,
|
|
1726
1726
|
filterFn: u,
|
|
1727
1727
|
resolvedValue: (s = u.resolveFilterValue == null ? void 0 : u.resolveFilterValue(n)) != null ? s : n
|
|
1728
1728
|
});
|
|
1729
1729
|
}));
|
|
1730
|
-
let
|
|
1731
|
-
for (let
|
|
1732
|
-
const s = o.flatRows[
|
|
1730
|
+
let d, c;
|
|
1731
|
+
for (let g = 0; g < o.flatRows.length; g++) {
|
|
1732
|
+
const s = o.flatRows[g];
|
|
1733
1733
|
if (s.columnFilters = {}, r.length)
|
|
1734
|
-
for (let
|
|
1735
|
-
|
|
1736
|
-
const p =
|
|
1737
|
-
s.columnFilters[p] =
|
|
1734
|
+
for (let f = 0; f < r.length; f++) {
|
|
1735
|
+
d = r[f];
|
|
1736
|
+
const p = d.id;
|
|
1737
|
+
s.columnFilters[p] = d.filterFn(s, p, d.resolvedValue, (R) => {
|
|
1738
1738
|
s.columnFiltersMeta[p] = R;
|
|
1739
1739
|
});
|
|
1740
1740
|
}
|
|
1741
1741
|
if (i.length) {
|
|
1742
|
-
for (let
|
|
1743
|
-
|
|
1744
|
-
const p =
|
|
1745
|
-
if (
|
|
1742
|
+
for (let f = 0; f < i.length; f++) {
|
|
1743
|
+
c = i[f];
|
|
1744
|
+
const p = c.id;
|
|
1745
|
+
if (c.filterFn(s, p, c.resolvedValue, (R) => {
|
|
1746
1746
|
s.columnFiltersMeta[p] = R;
|
|
1747
1747
|
})) {
|
|
1748
1748
|
s.columnFilters.__global__ = !0;
|
|
@@ -1752,13 +1752,13 @@ function St() {
|
|
|
1752
1752
|
s.columnFilters.__global__ !== !0 && (s.columnFilters.__global__ = !1);
|
|
1753
1753
|
}
|
|
1754
1754
|
}
|
|
1755
|
-
const m = (
|
|
1755
|
+
const m = (g) => {
|
|
1756
1756
|
for (let s = 0; s < l.length; s++)
|
|
1757
|
-
if (
|
|
1757
|
+
if (g.columnFilters[l[s]] === !1)
|
|
1758
1758
|
return !1;
|
|
1759
1759
|
return !0;
|
|
1760
1760
|
};
|
|
1761
|
-
return
|
|
1761
|
+
return ft(o.rows, m, e);
|
|
1762
1762
|
}, C(e.options, "debugTable", "getFilteredRowModel", () => e._autoResetPageIndex()));
|
|
1763
1763
|
}
|
|
1764
1764
|
function Ct(e) {
|
|
@@ -1774,22 +1774,22 @@ function Ct(e) {
|
|
|
1774
1774
|
flatRows: u,
|
|
1775
1775
|
rowsById: a
|
|
1776
1776
|
} = n;
|
|
1777
|
-
const
|
|
1778
|
-
l = l.slice(
|
|
1777
|
+
const d = r * i, c = d + r;
|
|
1778
|
+
l = l.slice(d, c);
|
|
1779
1779
|
let m;
|
|
1780
1780
|
o.options.paginateExpandedRows ? m = {
|
|
1781
1781
|
rows: l,
|
|
1782
1782
|
flatRows: u,
|
|
1783
1783
|
rowsById: a
|
|
1784
|
-
} : m =
|
|
1784
|
+
} : m = ct({
|
|
1785
1785
|
rows: l,
|
|
1786
1786
|
flatRows: u,
|
|
1787
1787
|
rowsById: a
|
|
1788
1788
|
}), m.flatRows = [];
|
|
1789
|
-
const
|
|
1790
|
-
m.flatRows.push(s), s.subRows.length && s.subRows.forEach(
|
|
1789
|
+
const g = (s) => {
|
|
1790
|
+
m.flatRows.push(s), s.subRows.length && s.subRows.forEach(g);
|
|
1791
1791
|
};
|
|
1792
|
-
return m.rows.forEach(
|
|
1792
|
+
return m.rows.forEach(g), m;
|
|
1793
1793
|
}, C(o.options, "debugTable", "getPaginationRowModel"));
|
|
1794
1794
|
}
|
|
1795
1795
|
function Rt() {
|
|
@@ -1797,42 +1797,42 @@ function Rt() {
|
|
|
1797
1797
|
if (!t.rows.length || !(o != null && o.length))
|
|
1798
1798
|
return t;
|
|
1799
1799
|
const n = e.getState().sorting, r = [], i = n.filter((a) => {
|
|
1800
|
-
var
|
|
1801
|
-
return (
|
|
1800
|
+
var d;
|
|
1801
|
+
return (d = e.getColumn(a.id)) == null ? void 0 : d.getCanSort();
|
|
1802
1802
|
}), l = {};
|
|
1803
1803
|
i.forEach((a) => {
|
|
1804
|
-
const
|
|
1805
|
-
|
|
1806
|
-
sortUndefined:
|
|
1807
|
-
invertSorting:
|
|
1808
|
-
sortingFn:
|
|
1804
|
+
const d = e.getColumn(a.id);
|
|
1805
|
+
d && (l[a.id] = {
|
|
1806
|
+
sortUndefined: d.columnDef.sortUndefined,
|
|
1807
|
+
invertSorting: d.columnDef.invertSorting,
|
|
1808
|
+
sortingFn: d.getSortingFn()
|
|
1809
1809
|
});
|
|
1810
1810
|
});
|
|
1811
1811
|
const u = (a) => {
|
|
1812
|
-
const
|
|
1813
|
-
...
|
|
1812
|
+
const d = a.map((c) => ({
|
|
1813
|
+
...c
|
|
1814
1814
|
}));
|
|
1815
|
-
return
|
|
1815
|
+
return d.sort((c, m) => {
|
|
1816
1816
|
for (let s = 0; s < i.length; s += 1) {
|
|
1817
|
-
var
|
|
1818
|
-
const
|
|
1817
|
+
var g;
|
|
1818
|
+
const f = i[s], p = l[f.id], R = p.sortUndefined, w = (g = f?.desc) != null ? g : !1;
|
|
1819
1819
|
let h = 0;
|
|
1820
1820
|
if (R) {
|
|
1821
|
-
const v =
|
|
1821
|
+
const v = c.getValue(f.id), M = m.getValue(f.id), F = v === void 0, E = M === void 0;
|
|
1822
1822
|
if (F || E) {
|
|
1823
1823
|
if (R === "first") return F ? -1 : 1;
|
|
1824
1824
|
if (R === "last") return F ? 1 : -1;
|
|
1825
1825
|
h = F && E ? 0 : F ? R : -R;
|
|
1826
1826
|
}
|
|
1827
1827
|
}
|
|
1828
|
-
if (h === 0 && (h = p.sortingFn(
|
|
1828
|
+
if (h === 0 && (h = p.sortingFn(c, m, f.id)), h !== 0)
|
|
1829
1829
|
return w && (h *= -1), p.invertSorting && (h *= -1), h;
|
|
1830
1830
|
}
|
|
1831
|
-
return
|
|
1832
|
-
}),
|
|
1831
|
+
return c.index - m.index;
|
|
1832
|
+
}), d.forEach((c) => {
|
|
1833
1833
|
var m;
|
|
1834
|
-
r.push(
|
|
1835
|
-
}),
|
|
1834
|
+
r.push(c), (m = c.subRows) != null && m.length && (c.subRows = u(c.subRows));
|
|
1835
|
+
}), d;
|
|
1836
1836
|
};
|
|
1837
1837
|
return {
|
|
1838
1838
|
rows: u(t.rows),
|
|
@@ -1892,21 +1892,23 @@ function Mt({
|
|
|
1892
1892
|
setGlobalFilter: l,
|
|
1893
1893
|
onSortingChange: u,
|
|
1894
1894
|
onColumnFiltersChange: a,
|
|
1895
|
-
onPaginationChange:
|
|
1896
|
-
|
|
1895
|
+
onPaginationChange: d,
|
|
1896
|
+
rowClickable: c = !1,
|
|
1897
|
+
onRowClick: m,
|
|
1898
|
+
className: g
|
|
1897
1899
|
}) {
|
|
1898
|
-
const m = {
|
|
1900
|
+
const s = c && !!m, f = {
|
|
1899
1901
|
sorting: t,
|
|
1900
1902
|
columnFilters: n,
|
|
1901
1903
|
...r && { pagination: r },
|
|
1902
1904
|
globalFilter: i
|
|
1903
|
-
},
|
|
1905
|
+
}, p = _t({
|
|
1904
1906
|
data: o,
|
|
1905
1907
|
columns: e,
|
|
1906
|
-
state:
|
|
1908
|
+
state: f,
|
|
1907
1909
|
onSortingChange: u,
|
|
1908
1910
|
onColumnFiltersChange: a,
|
|
1909
|
-
onPaginationChange:
|
|
1911
|
+
onPaginationChange: d,
|
|
1910
1912
|
getCoreRowModel: dt(),
|
|
1911
1913
|
getPaginationRowModel: Ct(),
|
|
1912
1914
|
getSortedRowModel: Rt(),
|
|
@@ -1914,42 +1916,44 @@ function Mt({
|
|
|
1914
1916
|
onGlobalFilterChange: l,
|
|
1915
1917
|
globalFilterFn: "includesString"
|
|
1916
1918
|
});
|
|
1917
|
-
return /* @__PURE__ */ x("div", { className: le("w-full overflow-hidden",
|
|
1918
|
-
/* @__PURE__ */ x(Fe, { className:
|
|
1919
|
+
return /* @__PURE__ */ x("div", { className: le("w-full overflow-hidden", g?.className), children: /* @__PURE__ */ ve(_e, { className: g?.tableClassName, children: [
|
|
1920
|
+
/* @__PURE__ */ x(Fe, { className: g?.headerClassName, children: p.getHeaderGroups().map((R) => /* @__PURE__ */ x(
|
|
1919
1921
|
O,
|
|
1920
1922
|
{
|
|
1921
|
-
className:
|
|
1922
|
-
children:
|
|
1923
|
+
className: g?.rowClassName,
|
|
1924
|
+
children: R.headers.map((w) => /* @__PURE__ */ x(
|
|
1923
1925
|
$e,
|
|
1924
1926
|
{
|
|
1925
|
-
className:
|
|
1926
|
-
children:
|
|
1927
|
+
className: g?.headCellClassName,
|
|
1928
|
+
children: w.isPlaceholder ? null : ae(w.column.columnDef.header, w.getContext())
|
|
1927
1929
|
},
|
|
1928
|
-
|
|
1930
|
+
w.id
|
|
1929
1931
|
))
|
|
1930
1932
|
},
|
|
1931
|
-
|
|
1933
|
+
R.id
|
|
1932
1934
|
)) }),
|
|
1933
|
-
/* @__PURE__ */ x(Ve, { children:
|
|
1935
|
+
/* @__PURE__ */ x(Ve, { children: p.getRowModel().rows.length ? p.getRowModel().rows.map((R) => /* @__PURE__ */ x(
|
|
1934
1936
|
O,
|
|
1935
1937
|
{
|
|
1936
|
-
className:
|
|
1937
|
-
"data-state":
|
|
1938
|
-
|
|
1938
|
+
className: g?.rowClassName,
|
|
1939
|
+
"data-state": R.getIsSelected() && "selected",
|
|
1940
|
+
clickable: s,
|
|
1941
|
+
onClick: s ? () => m?.(R.original) : void 0,
|
|
1942
|
+
children: R.getVisibleCells().map((w) => /* @__PURE__ */ x(
|
|
1939
1943
|
ie,
|
|
1940
1944
|
{
|
|
1941
|
-
className:
|
|
1942
|
-
children: ae(
|
|
1945
|
+
className: g?.cellClassName,
|
|
1946
|
+
children: ae(w.column.columnDef.cell, w.getContext())
|
|
1943
1947
|
},
|
|
1944
|
-
|
|
1948
|
+
w.id
|
|
1945
1949
|
))
|
|
1946
1950
|
},
|
|
1947
|
-
|
|
1948
|
-
)) : /* @__PURE__ */ x(O, { className:
|
|
1951
|
+
R.id
|
|
1952
|
+
)) : /* @__PURE__ */ x(O, { className: g?.rowClassName, children: /* @__PURE__ */ x(
|
|
1949
1953
|
ie,
|
|
1950
1954
|
{
|
|
1951
1955
|
colSpan: e.length,
|
|
1952
|
-
className: le("h-24 text-center",
|
|
1956
|
+
className: le("h-24 text-center", g?.cellClassName),
|
|
1953
1957
|
children: "No results."
|
|
1954
1958
|
}
|
|
1955
1959
|
) }) })
|