@tanstack/table-core 8.5.12 → 8.5.15

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.
Files changed (61) hide show
  1. package/build/cjs/core/cell.js +2 -6
  2. package/build/cjs/core/cell.js.map +1 -1
  3. package/build/cjs/core/column.js +5 -15
  4. package/build/cjs/core/column.js.map +1 -1
  5. package/build/cjs/core/headers.js +27 -99
  6. package/build/cjs/core/headers.js.map +1 -1
  7. package/build/cjs/core/row.js +4 -16
  8. package/build/cjs/core/row.js.map +1 -1
  9. package/build/cjs/core/table.js +13 -43
  10. package/build/cjs/core/table.js.map +1 -1
  11. package/build/cjs/features/ColumnSizing.js +23 -35
  12. package/build/cjs/features/ColumnSizing.js.map +1 -1
  13. package/build/cjs/features/Expanding.js +9 -15
  14. package/build/cjs/features/Expanding.js.map +1 -1
  15. package/build/cjs/features/Filters.js +13 -21
  16. package/build/cjs/features/Filters.js.map +1 -1
  17. package/build/cjs/features/Grouping.js +8 -10
  18. package/build/cjs/features/Grouping.js.map +1 -1
  19. package/build/cjs/features/Ordering.js +1 -3
  20. package/build/cjs/features/Ordering.js.map +1 -1
  21. package/build/cjs/features/Pagination.js +9 -21
  22. package/build/cjs/features/Pagination.js.map +1 -1
  23. package/build/cjs/features/Pinning.js +24 -58
  24. package/build/cjs/features/Pinning.js.map +1 -1
  25. package/build/cjs/features/RowSelection.js +9 -35
  26. package/build/cjs/features/RowSelection.js.map +1 -1
  27. package/build/cjs/features/Sorting.js +12 -22
  28. package/build/cjs/features/Sorting.js.map +1 -1
  29. package/build/cjs/features/Visibility.js +9 -27
  30. package/build/cjs/features/Visibility.js.map +1 -1
  31. package/build/cjs/utils/getCoreRowModel.js +1 -5
  32. package/build/cjs/utils/getCoreRowModel.js.map +1 -1
  33. package/build/cjs/utils/getExpandedRowModel.js +2 -6
  34. package/build/cjs/utils/getExpandedRowModel.js.map +1 -1
  35. package/build/cjs/utils/getFacetedMinMaxValues.js +1 -5
  36. package/build/cjs/utils/getFacetedMinMaxValues.js.map +1 -1
  37. package/build/cjs/utils/getFacetedRowModel.js +1 -5
  38. package/build/cjs/utils/getFacetedRowModel.js.map +1 -1
  39. package/build/cjs/utils/getFacetedUniqueValues.js +2 -8
  40. package/build/cjs/utils/getFacetedUniqueValues.js.map +1 -1
  41. package/build/cjs/utils/getFilteredRowModel.js +6 -14
  42. package/build/cjs/utils/getFilteredRowModel.js.map +1 -1
  43. package/build/cjs/utils/getGroupedRowModel.js +5 -11
  44. package/build/cjs/utils/getGroupedRowModel.js.map +1 -1
  45. package/build/cjs/utils/getPaginationRowModel.js +1 -5
  46. package/build/cjs/utils/getPaginationRowModel.js.map +1 -1
  47. package/build/cjs/utils/getSortedRowModel.js +2 -8
  48. package/build/cjs/utils/getSortedRowModel.js.map +1 -1
  49. package/build/cjs/utils.js +4 -1
  50. package/build/cjs/utils.js.map +1 -1
  51. package/build/esm/index.js +193 -494
  52. package/build/esm/index.js.map +1 -1
  53. package/build/stats-html.html +56 -56
  54. package/build/stats-react.json +361 -361
  55. package/build/umd/index.development.js +193 -494
  56. package/build/umd/index.development.js.map +1 -1
  57. package/build/umd/index.production.js +1 -1
  58. package/build/umd/index.production.js.map +1 -1
  59. package/package.json +1 -1
  60. package/src/features/Expanding.ts +1 -1
  61. package/src/features/Pinning.ts +1 -1
@@ -80,7 +80,10 @@ function memo(getDeps, fn, opts) {
80
80
  return str;
81
81
  };
82
82
 
83
- console.info("%c\u23F1 " + pad(resultEndTime, 5) + " /" + pad(depEndTime, 5) + " ms", "\n font-size: .6rem;\n font-weight: bold;\n color: hsl(" + Math.max(0, Math.min(120 - 120 * resultFpsPercentage, 120)) + "deg 100% 31%);", opts == null ? void 0 : opts.key);
83
+ console.info(`%c ${pad(resultEndTime, 5)} /${pad(depEndTime, 5)} ms`, `
84
+ font-size: .6rem;
85
+ font-weight: bold;
86
+ color: hsl(${Math.max(0, Math.min(120 - 120 * resultFpsPercentage, 120))}deg 100% 31%);`, opts == null ? void 0 : opts.key);
84
87
  }
85
88
  }
86
89
 
@@ -89,15 +92,13 @@ function memo(getDeps, fn, opts) {
89
92
  }
90
93
 
91
94
  function createColumn(table, columnDef, depth, parent) {
92
- var _ref, _resolvedColumnDef$id;
93
-
94
95
  const defaultColumn = table._getDefaultColumnDef();
95
96
 
96
97
  const resolvedColumnDef = { ...defaultColumn,
97
98
  ...columnDef
98
99
  };
99
100
  const accessorKey = resolvedColumnDef.accessorKey;
100
- let id = (_ref = (_resolvedColumnDef$id = resolvedColumnDef.id) != null ? _resolvedColumnDef$id : accessorKey ? accessorKey.replace('.', '_') : undefined) != null ? _ref : typeof resolvedColumnDef.header === 'string' ? resolvedColumnDef.header : undefined;
101
+ let id = resolvedColumnDef.id ?? (accessorKey ? accessorKey.replace('.', '_') : undefined) ?? (typeof resolvedColumnDef.header === 'string' ? resolvedColumnDef.header : undefined);
101
102
  let accessorFn;
102
103
 
103
104
  if (resolvedColumnDef.accessorFn) {
@@ -121,14 +122,14 @@ function createColumn(table, columnDef, depth, parent) {
121
122
 
122
123
  if (!id) {
123
124
  if (process.env.NODE_ENV !== 'production') {
124
- throw new Error(resolvedColumnDef.accessorFn ? "Columns require an id when using an accessorFn" : "Columns require an id when using a non-string header");
125
+ throw new Error(resolvedColumnDef.accessorFn ? `Columns require an id when using an accessorFn` : `Columns require an id when using a non-string header`);
125
126
  }
126
127
 
127
128
  throw new Error();
128
129
  }
129
130
 
130
131
  let column = {
131
- id: "" + String(id),
132
+ id: `${String(id)}`,
132
133
  accessorFn,
133
134
  parent: parent,
134
135
  depth,
@@ -140,11 +141,7 @@ function createColumn(table, columnDef, depth, parent) {
140
141
  return [column, ...((_column$columns = column.columns) == null ? void 0 : _column$columns.flatMap(d => d.getFlatColumns()))];
141
142
  }, {
142
143
  key: process.env.NODE_ENV === 'production' && 'column.getFlatColumns',
143
- debug: () => {
144
- var _table$options$debugA;
145
-
146
- return (_table$options$debugA = table.options.debugAll) != null ? _table$options$debugA : table.options.debugColumns;
147
- }
144
+ debug: () => table.options.debugAll ?? table.options.debugColumns
148
145
  }),
149
146
  getLeafColumns: memo(() => [table._getOrderColumnsFn()], orderColumns => {
150
147
  var _column$columns2;
@@ -157,11 +154,7 @@ function createColumn(table, columnDef, depth, parent) {
157
154
  return [column];
158
155
  }, {
159
156
  key: process.env.NODE_ENV === 'production' && 'column.getLeafColumns',
160
- debug: () => {
161
- var _table$options$debugA2;
162
-
163
- return (_table$options$debugA2 = table.options.debugAll) != null ? _table$options$debugA2 : table.options.debugColumns;
164
- }
157
+ debug: () => table.options.debugAll ?? table.options.debugColumns
165
158
  })
166
159
  };
167
160
  column = table._features.reduce((obj, feature) => {
@@ -173,9 +166,7 @@ function createColumn(table, columnDef, depth, parent) {
173
166
 
174
167
  //
175
168
  function createHeader(table, column, options) {
176
- var _options$id;
177
-
178
- const id = (_options$id = options.id) != null ? _options$id : column.id;
169
+ const id = options.id ?? column.id;
179
170
  let header = {
180
171
  id,
181
172
  column,
@@ -220,98 +211,60 @@ const Headers = {
220
211
  return {
221
212
  // Header Groups
222
213
  getHeaderGroups: memo(() => [table.getAllColumns(), table.getVisibleLeafColumns(), table.getState().columnPinning.left, table.getState().columnPinning.right], (allColumns, leafColumns, left, right) => {
223
- var _left$map$filter, _right$map$filter;
224
-
225
- const leftColumns = (_left$map$filter = left == null ? void 0 : left.map(columnId => leafColumns.find(d => d.id === columnId)).filter(Boolean)) != null ? _left$map$filter : [];
226
- const rightColumns = (_right$map$filter = right == null ? void 0 : right.map(columnId => leafColumns.find(d => d.id === columnId)).filter(Boolean)) != null ? _right$map$filter : [];
214
+ const leftColumns = (left == null ? void 0 : left.map(columnId => leafColumns.find(d => d.id === columnId)).filter(Boolean)) ?? [];
215
+ const rightColumns = (right == null ? void 0 : right.map(columnId => leafColumns.find(d => d.id === columnId)).filter(Boolean)) ?? [];
227
216
  const centerColumns = leafColumns.filter(column => !(left != null && left.includes(column.id)) && !(right != null && right.includes(column.id)));
228
217
  const headerGroups = buildHeaderGroups(allColumns, [...leftColumns, ...centerColumns, ...rightColumns], table);
229
218
  return headerGroups;
230
219
  }, {
231
220
  key: process.env.NODE_ENV === 'development' && 'getHeaderGroups',
232
- debug: () => {
233
- var _table$options$debugA;
234
-
235
- return (_table$options$debugA = table.options.debugAll) != null ? _table$options$debugA : table.options.debugHeaders;
236
- }
221
+ debug: () => table.options.debugAll ?? table.options.debugHeaders
237
222
  }),
238
223
  getCenterHeaderGroups: memo(() => [table.getAllColumns(), table.getVisibleLeafColumns(), table.getState().columnPinning.left, table.getState().columnPinning.right], (allColumns, leafColumns, left, right) => {
239
224
  leafColumns = leafColumns.filter(column => !(left != null && left.includes(column.id)) && !(right != null && right.includes(column.id)));
240
225
  return buildHeaderGroups(allColumns, leafColumns, table, 'center');
241
226
  }, {
242
227
  key: process.env.NODE_ENV === 'development' && 'getCenterHeaderGroups',
243
- debug: () => {
244
- var _table$options$debugA2;
245
-
246
- return (_table$options$debugA2 = table.options.debugAll) != null ? _table$options$debugA2 : table.options.debugHeaders;
247
- }
228
+ debug: () => table.options.debugAll ?? table.options.debugHeaders
248
229
  }),
249
230
  getLeftHeaderGroups: memo(() => [table.getAllColumns(), table.getVisibleLeafColumns(), table.getState().columnPinning.left], (allColumns, leafColumns, left) => {
250
- var _left$map$filter2;
251
-
252
- const orderedLeafColumns = (_left$map$filter2 = left == null ? void 0 : left.map(columnId => leafColumns.find(d => d.id === columnId)).filter(Boolean)) != null ? _left$map$filter2 : [];
231
+ const orderedLeafColumns = (left == null ? void 0 : left.map(columnId => leafColumns.find(d => d.id === columnId)).filter(Boolean)) ?? [];
253
232
  return buildHeaderGroups(allColumns, orderedLeafColumns, table, 'left');
254
233
  }, {
255
234
  key: process.env.NODE_ENV === 'development' && 'getLeftHeaderGroups',
256
- debug: () => {
257
- var _table$options$debugA3;
258
-
259
- return (_table$options$debugA3 = table.options.debugAll) != null ? _table$options$debugA3 : table.options.debugHeaders;
260
- }
235
+ debug: () => table.options.debugAll ?? table.options.debugHeaders
261
236
  }),
262
237
  getRightHeaderGroups: memo(() => [table.getAllColumns(), table.getVisibleLeafColumns(), table.getState().columnPinning.right], (allColumns, leafColumns, right) => {
263
- var _right$map$filter2;
264
-
265
- const orderedLeafColumns = (_right$map$filter2 = right == null ? void 0 : right.map(columnId => leafColumns.find(d => d.id === columnId)).filter(Boolean)) != null ? _right$map$filter2 : [];
238
+ const orderedLeafColumns = (right == null ? void 0 : right.map(columnId => leafColumns.find(d => d.id === columnId)).filter(Boolean)) ?? [];
266
239
  return buildHeaderGroups(allColumns, orderedLeafColumns, table, 'right');
267
240
  }, {
268
241
  key: process.env.NODE_ENV === 'development' && 'getRightHeaderGroups',
269
- debug: () => {
270
- var _table$options$debugA4;
271
-
272
- return (_table$options$debugA4 = table.options.debugAll) != null ? _table$options$debugA4 : table.options.debugHeaders;
273
- }
242
+ debug: () => table.options.debugAll ?? table.options.debugHeaders
274
243
  }),
275
244
  // Footer Groups
276
245
  getFooterGroups: memo(() => [table.getHeaderGroups()], headerGroups => {
277
246
  return [...headerGroups].reverse();
278
247
  }, {
279
248
  key: process.env.NODE_ENV === 'development' && 'getFooterGroups',
280
- debug: () => {
281
- var _table$options$debugA5;
282
-
283
- return (_table$options$debugA5 = table.options.debugAll) != null ? _table$options$debugA5 : table.options.debugHeaders;
284
- }
249
+ debug: () => table.options.debugAll ?? table.options.debugHeaders
285
250
  }),
286
251
  getLeftFooterGroups: memo(() => [table.getLeftHeaderGroups()], headerGroups => {
287
252
  return [...headerGroups].reverse();
288
253
  }, {
289
254
  key: process.env.NODE_ENV === 'development' && 'getLeftFooterGroups',
290
- debug: () => {
291
- var _table$options$debugA6;
292
-
293
- return (_table$options$debugA6 = table.options.debugAll) != null ? _table$options$debugA6 : table.options.debugHeaders;
294
- }
255
+ debug: () => table.options.debugAll ?? table.options.debugHeaders
295
256
  }),
296
257
  getCenterFooterGroups: memo(() => [table.getCenterHeaderGroups()], headerGroups => {
297
258
  return [...headerGroups].reverse();
298
259
  }, {
299
260
  key: process.env.NODE_ENV === 'development' && 'getCenterFooterGroups',
300
- debug: () => {
301
- var _table$options$debugA7;
302
-
303
- return (_table$options$debugA7 = table.options.debugAll) != null ? _table$options$debugA7 : table.options.debugHeaders;
304
- }
261
+ debug: () => table.options.debugAll ?? table.options.debugHeaders
305
262
  }),
306
263
  getRightFooterGroups: memo(() => [table.getRightHeaderGroups()], headerGroups => {
307
264
  return [...headerGroups].reverse();
308
265
  }, {
309
266
  key: process.env.NODE_ENV === 'development' && 'getRightFooterGroups',
310
- debug: () => {
311
- var _table$options$debugA8;
312
-
313
- return (_table$options$debugA8 = table.options.debugAll) != null ? _table$options$debugA8 : table.options.debugHeaders;
314
- }
267
+ debug: () => table.options.debugAll ?? table.options.debugHeaders
315
268
  }),
316
269
  // Flat Headers
317
270
  getFlatHeaders: memo(() => [table.getHeaderGroups()], headerGroups => {
@@ -320,11 +273,7 @@ const Headers = {
320
273
  }).flat();
321
274
  }, {
322
275
  key: process.env.NODE_ENV === 'development' && 'getFlatHeaders',
323
- debug: () => {
324
- var _table$options$debugA9;
325
-
326
- return (_table$options$debugA9 = table.options.debugAll) != null ? _table$options$debugA9 : table.options.debugHeaders;
327
- }
276
+ debug: () => table.options.debugAll ?? table.options.debugHeaders
328
277
  }),
329
278
  getLeftFlatHeaders: memo(() => [table.getLeftHeaderGroups()], left => {
330
279
  return left.map(headerGroup => {
@@ -332,11 +281,7 @@ const Headers = {
332
281
  }).flat();
333
282
  }, {
334
283
  key: process.env.NODE_ENV === 'development' && 'getLeftFlatHeaders',
335
- debug: () => {
336
- var _table$options$debugA10;
337
-
338
- return (_table$options$debugA10 = table.options.debugAll) != null ? _table$options$debugA10 : table.options.debugHeaders;
339
- }
284
+ debug: () => table.options.debugAll ?? table.options.debugHeaders
340
285
  }),
341
286
  getCenterFlatHeaders: memo(() => [table.getCenterHeaderGroups()], left => {
342
287
  return left.map(headerGroup => {
@@ -344,11 +289,7 @@ const Headers = {
344
289
  }).flat();
345
290
  }, {
346
291
  key: process.env.NODE_ENV === 'development' && 'getCenterFlatHeaders',
347
- debug: () => {
348
- var _table$options$debugA11;
349
-
350
- return (_table$options$debugA11 = table.options.debugAll) != null ? _table$options$debugA11 : table.options.debugHeaders;
351
- }
292
+ debug: () => table.options.debugAll ?? table.options.debugHeaders
352
293
  }),
353
294
  getRightFlatHeaders: memo(() => [table.getRightHeaderGroups()], left => {
354
295
  return left.map(headerGroup => {
@@ -356,11 +297,7 @@ const Headers = {
356
297
  }).flat();
357
298
  }, {
358
299
  key: process.env.NODE_ENV === 'development' && 'getRightFlatHeaders',
359
- debug: () => {
360
- var _table$options$debugA12;
361
-
362
- return (_table$options$debugA12 = table.options.debugAll) != null ? _table$options$debugA12 : table.options.debugHeaders;
363
- }
300
+ debug: () => table.options.debugAll ?? table.options.debugHeaders
364
301
  }),
365
302
  // Leaf Headers
366
303
  getCenterLeafHeaders: memo(() => [table.getCenterFlatHeaders()], flatHeaders => {
@@ -371,11 +308,7 @@ const Headers = {
371
308
  });
372
309
  }, {
373
310
  key: process.env.NODE_ENV === 'development' && 'getCenterLeafHeaders',
374
- debug: () => {
375
- var _table$options$debugA13;
376
-
377
- return (_table$options$debugA13 = table.options.debugAll) != null ? _table$options$debugA13 : table.options.debugHeaders;
378
- }
311
+ debug: () => table.options.debugAll ?? table.options.debugHeaders
379
312
  }),
380
313
  getLeftLeafHeaders: memo(() => [table.getLeftFlatHeaders()], flatHeaders => {
381
314
  return flatHeaders.filter(header => {
@@ -385,11 +318,7 @@ const Headers = {
385
318
  });
386
319
  }, {
387
320
  key: process.env.NODE_ENV === 'development' && 'getLeftLeafHeaders',
388
- debug: () => {
389
- var _table$options$debugA14;
390
-
391
- return (_table$options$debugA14 = table.options.debugAll) != null ? _table$options$debugA14 : table.options.debugHeaders;
392
- }
321
+ debug: () => table.options.debugAll ?? table.options.debugHeaders
393
322
  }),
394
323
  getRightLeafHeaders: memo(() => [table.getRightFlatHeaders()], flatHeaders => {
395
324
  return flatHeaders.filter(header => {
@@ -399,31 +328,23 @@ const Headers = {
399
328
  });
400
329
  }, {
401
330
  key: process.env.NODE_ENV === 'development' && 'getRightLeafHeaders',
402
- debug: () => {
403
- var _table$options$debugA15;
404
-
405
- return (_table$options$debugA15 = table.options.debugAll) != null ? _table$options$debugA15 : table.options.debugHeaders;
406
- }
331
+ debug: () => table.options.debugAll ?? table.options.debugHeaders
407
332
  }),
408
333
  getLeafHeaders: memo(() => [table.getLeftHeaderGroups(), table.getCenterHeaderGroups(), table.getRightHeaderGroups()], (left, center, right) => {
409
- var _left$0$headers, _left$, _center$0$headers, _center$, _right$0$headers, _right$;
334
+ var _left$, _center$, _right$;
410
335
 
411
- return [...((_left$0$headers = (_left$ = left[0]) == null ? void 0 : _left$.headers) != null ? _left$0$headers : []), ...((_center$0$headers = (_center$ = center[0]) == null ? void 0 : _center$.headers) != null ? _center$0$headers : []), ...((_right$0$headers = (_right$ = right[0]) == null ? void 0 : _right$.headers) != null ? _right$0$headers : [])].map(header => {
336
+ return [...(((_left$ = left[0]) == null ? void 0 : _left$.headers) ?? []), ...(((_center$ = center[0]) == null ? void 0 : _center$.headers) ?? []), ...(((_right$ = right[0]) == null ? void 0 : _right$.headers) ?? [])].map(header => {
412
337
  return header.getLeafHeaders();
413
338
  }).flat();
414
339
  }, {
415
340
  key: process.env.NODE_ENV === 'development' && 'getLeafHeaders',
416
- debug: () => {
417
- var _table$options$debugA16;
418
-
419
- return (_table$options$debugA16 = table.options.debugAll) != null ? _table$options$debugA16 : table.options.debugHeaders;
420
- }
341
+ debug: () => table.options.debugAll ?? table.options.debugHeaders
421
342
  })
422
343
  };
423
344
  }
424
345
  };
425
346
  function buildHeaderGroups(allColumns, columnsToGroup, table, headerFamily) {
426
- var _headerGroups$0$heade, _headerGroups$;
347
+ var _headerGroups$;
427
348
 
428
349
  // Find the max depth of the columns:
429
350
  // build the leaf column row
@@ -454,7 +375,7 @@ function buildHeaderGroups(allColumns, columnsToGroup, table, headerFamily) {
454
375
  // The header group we are creating
455
376
  const headerGroup = {
456
377
  depth,
457
- id: [headerFamily, "" + depth].filter(Boolean).join('_'),
378
+ id: [headerFamily, `${depth}`].filter(Boolean).join('_'),
458
379
  headers: []
459
380
  }; // The parent columns we're going to scan next
460
381
 
@@ -484,7 +405,7 @@ function buildHeaderGroups(allColumns, columnsToGroup, table, headerFamily) {
484
405
  const header = createHeader(table, column, {
485
406
  id: [headerFamily, depth, column.id, headerToGroup == null ? void 0 : headerToGroup.id].filter(Boolean).join('_'),
486
407
  isPlaceholder,
487
- placeholderId: isPlaceholder ? "" + pendingParentHeaders.filter(d => d.column === column).length : undefined,
408
+ placeholderId: isPlaceholder ? `${pendingParentHeaders.filter(d => d.column === column).length}` : undefined,
488
409
  depth,
489
410
  index: pendingParentHeaders.length
490
411
  }); // Add the headerToGroup as a subHeader of the new header
@@ -546,7 +467,7 @@ function buildHeaderGroups(allColumns, columnsToGroup, table, headerFamily) {
546
467
  });
547
468
  };
548
469
 
549
- recurseHeadersForSpans((_headerGroups$0$heade = (_headerGroups$ = headerGroups[0]) == null ? void 0 : _headerGroups$.headers) != null ? _headerGroups$0$heade : []);
470
+ recurseHeadersForSpans(((_headerGroups$ = headerGroups[0]) == null ? void 0 : _headerGroups$.headers) ?? []);
550
471
  return headerGroups;
551
472
  }
552
473
 
@@ -587,10 +508,8 @@ const ColumnSizing = {
587
508
  createColumn: (column, table) => {
588
509
  return {
589
510
  getSize: () => {
590
- var _column$columnDef$min, _ref, _column$columnDef$max;
591
-
592
511
  const columnSize = table.getState().columnSizing[column.id];
593
- return Math.min(Math.max((_column$columnDef$min = column.columnDef.minSize) != null ? _column$columnDef$min : defaultColumnSizing.minSize, (_ref = columnSize != null ? columnSize : column.columnDef.size) != null ? _ref : defaultColumnSizing.size), (_column$columnDef$max = column.columnDef.maxSize) != null ? _column$columnDef$max : defaultColumnSizing.maxSize);
512
+ return Math.min(Math.max(column.columnDef.minSize ?? defaultColumnSizing.minSize, columnSize ?? column.columnDef.size ?? defaultColumnSizing.size), column.columnDef.maxSize ?? defaultColumnSizing.maxSize);
594
513
  },
595
514
  getStart: position => {
596
515
  const columns = !position ? table.getVisibleLeafColumns() : position === 'left' ? table.getLeftVisibleLeafColumns() : table.getRightVisibleLeafColumns();
@@ -604,18 +523,16 @@ const ColumnSizing = {
604
523
  return 0;
605
524
  },
606
525
  resetSize: () => {
607
- table.setColumnSizing(_ref2 => {
526
+ table.setColumnSizing(_ref => {
608
527
  let {
609
528
  [column.id]: _,
610
529
  ...rest
611
- } = _ref2;
530
+ } = _ref;
612
531
  return rest;
613
532
  });
614
533
  },
615
534
  getCanResize: () => {
616
- var _column$columnDef$ena, _table$options$enable;
617
-
618
- return ((_column$columnDef$ena = column.columnDef.enableResizing) != null ? _column$columnDef$ena : true) && ((_table$options$enable = table.options.enableColumnResizing) != null ? _table$options$enable : true);
535
+ return (column.columnDef.enableResizing ?? true) && (table.options.enableColumnResizing ?? true);
619
536
  },
620
537
  getIsResizing: () => {
621
538
  return table.getState().columnSizingInfo.isResizingColumn === column.id;
@@ -631,9 +548,7 @@ const ColumnSizing = {
631
548
  if (header.subHeaders.length) {
632
549
  header.subHeaders.forEach(recurse);
633
550
  } else {
634
- var _header$column$getSiz;
635
-
636
- sum += (_header$column$getSiz = header.column.getSize()) != null ? _header$column$getSiz : 0;
551
+ sum += header.column.getSize() ?? 0;
637
552
  }
638
553
  };
639
554
 
@@ -675,12 +590,10 @@ const ColumnSizing = {
675
590
 
676
591
  let newColumnSizing = {};
677
592
  table.setColumnSizingInfo(old => {
678
- var _old$startOffset, _old$startSize;
679
-
680
- const deltaOffset = clientXPos - ((_old$startOffset = old == null ? void 0 : old.startOffset) != null ? _old$startOffset : 0);
681
- const deltaPercentage = Math.max(deltaOffset / ((_old$startSize = old == null ? void 0 : old.startSize) != null ? _old$startSize : 0), -0.999999);
682
- old.columnSizingStart.forEach(_ref3 => {
683
- let [columnId, headerSize] = _ref3;
593
+ const deltaOffset = clientXPos - ((old == null ? void 0 : old.startOffset) ?? 0);
594
+ const deltaPercentage = Math.max(deltaOffset / ((old == null ? void 0 : old.startSize) ?? 0), -0.999999);
595
+ old.columnSizingStart.forEach(_ref2 => {
596
+ let [columnId, headerSize] = _ref2;
684
597
  newColumnSizing[columnId] = Math.round(Math.max(headerSize + headerSize * deltaPercentage, 0) * 100) / 100;
685
598
  });
686
599
  return { ...old,
@@ -744,42 +657,38 @@ const ColumnSizing = {
744
657
  setColumnSizing: updater => table.options.onColumnSizingChange == null ? void 0 : table.options.onColumnSizingChange(updater),
745
658
  setColumnSizingInfo: updater => table.options.onColumnSizingInfoChange == null ? void 0 : table.options.onColumnSizingInfoChange(updater),
746
659
  resetColumnSizing: defaultState => {
747
- var _table$initialState$c;
748
-
749
- table.setColumnSizing(defaultState ? {} : (_table$initialState$c = table.initialState.columnSizing) != null ? _table$initialState$c : {});
660
+ table.setColumnSizing(defaultState ? {} : table.initialState.columnSizing ?? {});
750
661
  },
751
662
  resetHeaderSizeInfo: defaultState => {
752
- var _table$initialState$c2;
753
-
754
- table.setColumnSizingInfo(defaultState ? getDefaultColumnSizingInfoState() : (_table$initialState$c2 = table.initialState.columnSizingInfo) != null ? _table$initialState$c2 : getDefaultColumnSizingInfoState());
663
+ table.setColumnSizingInfo(defaultState ? getDefaultColumnSizingInfoState() : table.initialState.columnSizingInfo ?? getDefaultColumnSizingInfoState());
755
664
  },
756
665
  getTotalSize: () => {
757
- var _table$getHeaderGroup, _table$getHeaderGroup2;
666
+ var _table$getHeaderGroup;
758
667
 
759
- return (_table$getHeaderGroup = (_table$getHeaderGroup2 = table.getHeaderGroups()[0]) == null ? void 0 : _table$getHeaderGroup2.headers.reduce((sum, header) => {
668
+ return ((_table$getHeaderGroup = table.getHeaderGroups()[0]) == null ? void 0 : _table$getHeaderGroup.headers.reduce((sum, header) => {
760
669
  return sum + header.getSize();
761
- }, 0)) != null ? _table$getHeaderGroup : 0;
670
+ }, 0)) ?? 0;
762
671
  },
763
672
  getLeftTotalSize: () => {
764
- var _table$getLeftHeaderG, _table$getLeftHeaderG2;
673
+ var _table$getLeftHeaderG;
765
674
 
766
- return (_table$getLeftHeaderG = (_table$getLeftHeaderG2 = table.getLeftHeaderGroups()[0]) == null ? void 0 : _table$getLeftHeaderG2.headers.reduce((sum, header) => {
675
+ return ((_table$getLeftHeaderG = table.getLeftHeaderGroups()[0]) == null ? void 0 : _table$getLeftHeaderG.headers.reduce((sum, header) => {
767
676
  return sum + header.getSize();
768
- }, 0)) != null ? _table$getLeftHeaderG : 0;
677
+ }, 0)) ?? 0;
769
678
  },
770
679
  getCenterTotalSize: () => {
771
- var _table$getCenterHeade, _table$getCenterHeade2;
680
+ var _table$getCenterHeade;
772
681
 
773
- return (_table$getCenterHeade = (_table$getCenterHeade2 = table.getCenterHeaderGroups()[0]) == null ? void 0 : _table$getCenterHeade2.headers.reduce((sum, header) => {
682
+ return ((_table$getCenterHeade = table.getCenterHeaderGroups()[0]) == null ? void 0 : _table$getCenterHeade.headers.reduce((sum, header) => {
774
683
  return sum + header.getSize();
775
- }, 0)) != null ? _table$getCenterHeade : 0;
684
+ }, 0)) ?? 0;
776
685
  },
777
686
  getRightTotalSize: () => {
778
- var _table$getRightHeader, _table$getRightHeader2;
687
+ var _table$getRightHeader;
779
688
 
780
- return (_table$getRightHeader = (_table$getRightHeader2 = table.getRightHeaderGroups()[0]) == null ? void 0 : _table$getRightHeader2.headers.reduce((sum, header) => {
689
+ return ((_table$getRightHeader = table.getRightHeaderGroups()[0]) == null ? void 0 : _table$getRightHeader.headers.reduce((sum, header) => {
781
690
  return sum + header.getSize();
782
- }, 0)) != null ? _table$getRightHeader : 0;
691
+ }, 0)) ?? 0;
783
692
  }
784
693
  };
785
694
  }
@@ -833,8 +742,6 @@ const Expanding = {
833
742
  let queued = false;
834
743
  return {
835
744
  _autoResetExpanded: () => {
836
- var _ref, _table$options$autoRe;
837
-
838
745
  if (!registered) {
839
746
  table._queue(() => {
840
747
  registered = true;
@@ -843,7 +750,7 @@ const Expanding = {
843
750
  return;
844
751
  }
845
752
 
846
- if ((_ref = (_table$options$autoRe = table.options.autoResetAll) != null ? _table$options$autoRe : table.options.autoResetExpanded) != null ? _ref : !table.options.manualExpanding) {
753
+ if (table.options.autoResetAll ?? table.options.autoResetExpanded ?? !table.options.manualExpanding) {
847
754
  if (queued) return;
848
755
  queued = true;
849
756
 
@@ -855,16 +762,16 @@ const Expanding = {
855
762
  },
856
763
  setExpanded: updater => table.options.onExpandedChange == null ? void 0 : table.options.onExpandedChange(updater),
857
764
  toggleAllRowsExpanded: expanded => {
858
- if (expanded != null ? expanded : !table.getIsAllRowsExpanded()) {
765
+ if (expanded ?? !table.getIsAllRowsExpanded()) {
859
766
  table.setExpanded(true);
860
767
  } else {
861
768
  table.setExpanded({});
862
769
  }
863
770
  },
864
771
  resetExpanded: defaultState => {
865
- var _table$initialState$e, _table$initialState;
772
+ var _table$initialState;
866
773
 
867
- table.setExpanded(defaultState ? {} : (_table$initialState$e = (_table$initialState = table.initialState) == null ? void 0 : _table$initialState.expanded) != null ? _table$initialState$e : {});
774
+ table.setExpanded(defaultState ? {} : ((_table$initialState = table.initialState) == null ? void 0 : _table$initialState.expanded) ?? {});
868
775
  },
869
776
  getCanSomeRowsExpand: () => {
870
777
  return table.getRowModel().flatRows.some(row => row.getCanExpand());
@@ -891,7 +798,7 @@ const Expanding = {
891
798
  } // If any row is not expanded, return false
892
799
 
893
800
 
894
- if (table.getRowModel().flatRows.some(row => row.getIsExpanded())) {
801
+ if (table.getRowModel().flatRows.some(row => !row.getIsExpanded())) {
895
802
  return false;
896
803
  } // They must all be expanded :shrug:
897
804
 
@@ -925,8 +832,6 @@ const Expanding = {
925
832
  return {
926
833
  toggleExpanded: expanded => {
927
834
  table.setExpanded(old => {
928
- var _expanded;
929
-
930
835
  const exists = old === true ? true : !!(old != null && old[row.id]);
931
836
  let oldExpanded = {};
932
837
 
@@ -938,7 +843,7 @@ const Expanding = {
938
843
  oldExpanded = old;
939
844
  }
940
845
 
941
- expanded = (_expanded = expanded) != null ? _expanded : !exists;
846
+ expanded = expanded ?? !exists;
942
847
 
943
848
  if (!exists && expanded) {
944
849
  return { ...oldExpanded,
@@ -958,15 +863,13 @@ const Expanding = {
958
863
  });
959
864
  },
960
865
  getIsExpanded: () => {
961
- var _table$options$getIsR;
962
-
963
866
  const expanded = table.getState().expanded;
964
- return !!((_table$options$getIsR = table.options.getIsRowExpanded == null ? void 0 : table.options.getIsRowExpanded(row)) != null ? _table$options$getIsR : expanded === true || (expanded == null ? void 0 : expanded[row.id]));
867
+ return !!((table.options.getIsRowExpanded == null ? void 0 : table.options.getIsRowExpanded(row)) ?? (expanded === true || expanded != null && expanded[row.id]));
965
868
  },
966
869
  getCanExpand: () => {
967
- var _table$options$getRow, _table$options$enable, _row$subRows;
870
+ var _row$subRows;
968
871
 
969
- return (_table$options$getRow = table.options.getRowCanExpand == null ? void 0 : table.options.getRowCanExpand(row)) != null ? _table$options$getRow : ((_table$options$enable = table.options.enableExpanding) != null ? _table$options$enable : true) && !!((_row$subRows = row.subRows) != null && _row$subRows.length);
872
+ return (table.options.getRowCanExpand == null ? void 0 : table.options.getRowCanExpand(row)) ?? ((table.options.enableExpanding ?? true) && !!((_row$subRows = row.subRows) != null && _row$subRows.length));
970
873
  },
971
874
  getToggleExpandedHandler: () => {
972
875
  const canExpand = row.getCanExpand();
@@ -1145,19 +1048,15 @@ const Filters = {
1145
1048
  return filterFns.weakEquals;
1146
1049
  },
1147
1050
  getFilterFn: () => {
1148
- var _table$options$filter, _table$options$filter2;
1051
+ var _table$options$filter;
1149
1052
 
1150
- return isFunction(column.columnDef.filterFn) ? column.columnDef.filterFn : column.columnDef.filterFn === 'auto' ? column.getAutoFilterFn() : (_table$options$filter = (_table$options$filter2 = table.options.filterFns) == null ? void 0 : _table$options$filter2[column.columnDef.filterFn]) != null ? _table$options$filter : filterFns[column.columnDef.filterFn];
1053
+ return isFunction(column.columnDef.filterFn) ? column.columnDef.filterFn : column.columnDef.filterFn === 'auto' ? column.getAutoFilterFn() : ((_table$options$filter = table.options.filterFns) == null ? void 0 : _table$options$filter[column.columnDef.filterFn]) ?? filterFns[column.columnDef.filterFn];
1151
1054
  },
1152
1055
  getCanFilter: () => {
1153
- var _column$columnDef$ena, _table$options$enable, _table$options$enable2;
1154
-
1155
- return ((_column$columnDef$ena = column.columnDef.enableColumnFilter) != null ? _column$columnDef$ena : true) && ((_table$options$enable = table.options.enableColumnFilters) != null ? _table$options$enable : true) && ((_table$options$enable2 = table.options.enableFilters) != null ? _table$options$enable2 : true) && !!column.accessorFn;
1056
+ return (column.columnDef.enableColumnFilter ?? true) && (table.options.enableColumnFilters ?? true) && (table.options.enableFilters ?? true) && !!column.accessorFn;
1156
1057
  },
1157
1058
  getCanGlobalFilter: () => {
1158
- var _column$columnDef$ena2, _table$options$enable3, _table$options$enable4, _table$options$getCol;
1159
-
1160
- return ((_column$columnDef$ena2 = column.columnDef.enableGlobalFilter) != null ? _column$columnDef$ena2 : true) && ((_table$options$enable3 = table.options.enableGlobalFilter) != null ? _table$options$enable3 : true) && ((_table$options$enable4 = table.options.enableFilters) != null ? _table$options$enable4 : true) && ((_table$options$getCol = table.options.getColumnCanGlobalFilter == null ? void 0 : table.options.getColumnCanGlobalFilter(column)) != null ? _table$options$getCol : true) && !!column.accessorFn;
1059
+ return (column.columnDef.enableGlobalFilter ?? true) && (table.options.enableGlobalFilter ?? true) && (table.options.enableFilters ?? true) && ((table.options.getColumnCanGlobalFilter == null ? void 0 : table.options.getColumnCanGlobalFilter(column)) ?? true) && !!column.accessorFn;
1161
1060
  },
1162
1061
  getIsFiltered: () => column.getFilterIndex() > -1,
1163
1062
  getFilterValue: () => {
@@ -1166,9 +1065,9 @@ const Filters = {
1166
1065
  return (_table$getState$colum = table.getState().columnFilters) == null ? void 0 : (_table$getState$colum2 = _table$getState$colum.find(d => d.id === column.id)) == null ? void 0 : _table$getState$colum2.value;
1167
1066
  },
1168
1067
  getFilterIndex: () => {
1169
- var _table$getState$colum3, _table$getState$colum4;
1068
+ var _table$getState$colum3;
1170
1069
 
1171
- return (_table$getState$colum3 = (_table$getState$colum4 = table.getState().columnFilters) == null ? void 0 : _table$getState$colum4.findIndex(d => d.id === column.id)) != null ? _table$getState$colum3 : -1;
1070
+ return ((_table$getState$colum3 = table.getState().columnFilters) == null ? void 0 : _table$getState$colum3.findIndex(d => d.id === column.id)) ?? -1;
1172
1071
  },
1173
1072
  setFilterValue: value => {
1174
1073
  table.setColumnFilters(old => {
@@ -1177,9 +1076,7 @@ const Filters = {
1177
1076
  const newFilter = functionalUpdate(value, previousfilter ? previousfilter.value : undefined); //
1178
1077
 
1179
1078
  if (shouldAutoRemoveFilter(filterFn, newFilter, column)) {
1180
- var _old$filter;
1181
-
1182
- return (_old$filter = old == null ? void 0 : old.filter(d => d.id !== column.id)) != null ? _old$filter : [];
1079
+ return (old == null ? void 0 : old.filter(d => d.id !== column.id)) ?? [];
1183
1080
  }
1184
1081
 
1185
1082
  const newFilterObj = {
@@ -1188,15 +1085,13 @@ const Filters = {
1188
1085
  };
1189
1086
 
1190
1087
  if (previousfilter) {
1191
- var _old$map;
1192
-
1193
- return (_old$map = old == null ? void 0 : old.map(d => {
1088
+ return (old == null ? void 0 : old.map(d => {
1194
1089
  if (d.id === column.id) {
1195
1090
  return newFilterObj;
1196
1091
  }
1197
1092
 
1198
1093
  return d;
1199
- })) != null ? _old$map : [];
1094
+ })) ?? [];
1200
1095
  }
1201
1096
 
1202
1097
  if (old != null && old.length) {
@@ -1246,12 +1141,12 @@ const Filters = {
1246
1141
  return filterFns.includesString;
1247
1142
  },
1248
1143
  getGlobalFilterFn: () => {
1249
- var _table$options$filter3, _table$options$filter4;
1144
+ var _table$options$filter2;
1250
1145
 
1251
1146
  const {
1252
1147
  globalFilterFn: globalFilterFn
1253
1148
  } = table.options;
1254
- return isFunction(globalFilterFn) ? globalFilterFn : globalFilterFn === 'auto' ? table.getGlobalAutoFilterFn() : (_table$options$filter3 = (_table$options$filter4 = table.options.filterFns) == null ? void 0 : _table$options$filter4[globalFilterFn]) != null ? _table$options$filter3 : filterFns[globalFilterFn];
1149
+ return isFunction(globalFilterFn) ? globalFilterFn : globalFilterFn === 'auto' ? table.getGlobalAutoFilterFn() : ((_table$options$filter2 = table.options.filterFns) == null ? void 0 : _table$options$filter2[globalFilterFn]) ?? filterFns[globalFilterFn];
1255
1150
  },
1256
1151
  setColumnFilters: updater => {
1257
1152
  const leafColumns = table.getAllLeafColumns();
@@ -1283,9 +1178,9 @@ const Filters = {
1283
1178
  table.setGlobalFilter(defaultState ? undefined : table.initialState.globalFilter);
1284
1179
  },
1285
1180
  resetColumnFilters: defaultState => {
1286
- var _table$initialState$c, _table$initialState;
1181
+ var _table$initialState;
1287
1182
 
1288
- table.setColumnFilters(defaultState ? [] : (_table$initialState$c = (_table$initialState = table.initialState) == null ? void 0 : _table$initialState.columnFilters) != null ? _table$initialState$c : []);
1183
+ table.setColumnFilters(defaultState ? [] : ((_table$initialState = table.initialState) == null ? void 0 : _table$initialState.columnFilters) ?? []);
1289
1184
  },
1290
1185
  getPreFilteredRowModel: () => table.getCoreRowModel(),
1291
1186
  getFilteredRowModel: () => {
@@ -1442,9 +1337,9 @@ const Grouping = {
1442
1337
  getDefaultColumnDef: () => {
1443
1338
  return {
1444
1339
  aggregatedCell: props => {
1445
- var _toString, _props$getValue;
1340
+ var _props$getValue;
1446
1341
 
1447
- return (_toString = (_props$getValue = props.getValue()) == null ? void 0 : _props$getValue.toString == null ? void 0 : _props$getValue.toString()) != null ? _toString : null;
1342
+ return ((_props$getValue = props.getValue()) == null ? void 0 : _props$getValue.toString == null ? void 0 : _props$getValue.toString()) ?? null;
1448
1343
  },
1449
1344
  aggregationFn: 'auto'
1450
1345
  };
@@ -1470,13 +1365,11 @@ const Grouping = {
1470
1365
  return old.filter(d => d !== column.id);
1471
1366
  }
1472
1367
 
1473
- return [...(old != null ? old : []), column.id];
1368
+ return [...(old ?? []), column.id];
1474
1369
  });
1475
1370
  },
1476
1371
  getCanGroup: () => {
1477
- var _ref, _ref2, _ref3, _column$columnDef$ena;
1478
-
1479
- return (_ref = (_ref2 = (_ref3 = (_column$columnDef$ena = column.columnDef.enableGrouping) != null ? _column$columnDef$ena : true) != null ? _ref3 : table.options.enableGrouping) != null ? _ref2 : true) != null ? _ref : !!column.accessorFn;
1372
+ return column.columnDef.enableGrouping ?? true ?? table.options.enableGrouping ?? true ?? !!column.accessorFn;
1480
1373
  },
1481
1374
  getIsGrouped: () => {
1482
1375
  var _table$getState$group;
@@ -1508,13 +1401,13 @@ const Grouping = {
1508
1401
  }
1509
1402
  },
1510
1403
  getAggregationFn: () => {
1511
- var _table$options$aggreg, _table$options$aggreg2;
1404
+ var _table$options$aggreg;
1512
1405
 
1513
1406
  if (!column) {
1514
1407
  throw new Error();
1515
1408
  }
1516
1409
 
1517
- return isFunction(column.columnDef.aggregationFn) ? column.columnDef.aggregationFn : column.columnDef.aggregationFn === 'auto' ? column.getAutoAggregationFn() : (_table$options$aggreg = (_table$options$aggreg2 = table.options.aggregationFns) == null ? void 0 : _table$options$aggreg2[column.columnDef.aggregationFn]) != null ? _table$options$aggreg : aggregationFns[column.columnDef.aggregationFn];
1410
+ return isFunction(column.columnDef.aggregationFn) ? column.columnDef.aggregationFn : column.columnDef.aggregationFn === 'auto' ? column.getAutoAggregationFn() : ((_table$options$aggreg = table.options.aggregationFns) == null ? void 0 : _table$options$aggreg[column.columnDef.aggregationFn]) ?? aggregationFns[column.columnDef.aggregationFn];
1518
1411
  }
1519
1412
  };
1520
1413
  },
@@ -1522,9 +1415,9 @@ const Grouping = {
1522
1415
  return {
1523
1416
  setGrouping: updater => table.options.onGroupingChange == null ? void 0 : table.options.onGroupingChange(updater),
1524
1417
  resetGrouping: defaultState => {
1525
- var _table$initialState$g, _table$initialState;
1418
+ var _table$initialState;
1526
1419
 
1527
- table.setGrouping(defaultState ? [] : (_table$initialState$g = (_table$initialState = table.initialState) == null ? void 0 : _table$initialState.grouping) != null ? _table$initialState$g : []);
1420
+ table.setGrouping(defaultState ? [] : ((_table$initialState = table.initialState) == null ? void 0 : _table$initialState.grouping) ?? []);
1528
1421
  },
1529
1422
  getPreGroupedRowModel: () => table.getFilteredRowModel(),
1530
1423
  getGroupedRowModel: () => {
@@ -1591,9 +1484,7 @@ const Ordering = {
1591
1484
  return {
1592
1485
  setColumnOrder: updater => table.options.onColumnOrderChange == null ? void 0 : table.options.onColumnOrderChange(updater),
1593
1486
  resetColumnOrder: defaultState => {
1594
- var _table$initialState$c;
1595
-
1596
- table.setColumnOrder(defaultState ? [] : (_table$initialState$c = table.initialState.columnOrder) != null ? _table$initialState$c : []);
1487
+ table.setColumnOrder(defaultState ? [] : table.initialState.columnOrder ?? []);
1597
1488
  },
1598
1489
  _getOrderColumnsFn: memo(() => [table.getState().columnOrder, table.getState().grouping, table.options.groupedColumnMode], (columnOrder, grouping, groupedColumnMode) => columns => {
1599
1490
  // Sort grouped columns to the start of the column list
@@ -1657,8 +1548,6 @@ const Pagination = {
1657
1548
  let queued = false;
1658
1549
  return {
1659
1550
  _autoResetPageIndex: () => {
1660
- var _ref, _table$options$autoRe;
1661
-
1662
1551
  if (!registered) {
1663
1552
  table._queue(() => {
1664
1553
  registered = true;
@@ -1667,7 +1556,7 @@ const Pagination = {
1667
1556
  return;
1668
1557
  }
1669
1558
 
1670
- if ((_ref = (_table$options$autoRe = table.options.autoResetAll) != null ? _table$options$autoRe : table.options.autoResetPageIndex) != null ? _ref : !table.options.manualPagination) {
1559
+ if (table.options.autoResetAll ?? table.options.autoResetPageIndex ?? !table.options.manualPagination) {
1671
1560
  if (queued) return;
1672
1561
  queued = true;
1673
1562
 
@@ -1686,9 +1575,7 @@ const Pagination = {
1686
1575
  return table.options.onPaginationChange == null ? void 0 : table.options.onPaginationChange(safeUpdater);
1687
1576
  },
1688
1577
  resetPagination: defaultState => {
1689
- var _table$initialState$p;
1690
-
1691
- table.setPagination(defaultState ? getDefaultPaginationState() : (_table$initialState$p = table.initialState.pagination) != null ? _table$initialState$p : getDefaultPaginationState());
1578
+ table.setPagination(defaultState ? getDefaultPaginationState() : table.initialState.pagination ?? getDefaultPaginationState());
1692
1579
  },
1693
1580
  setPageIndex: updater => {
1694
1581
  table.setPagination(old => {
@@ -1701,14 +1588,14 @@ const Pagination = {
1701
1588
  });
1702
1589
  },
1703
1590
  resetPageIndex: defaultState => {
1704
- var _table$initialState$p2, _table$initialState, _table$initialState$p3;
1591
+ var _table$initialState, _table$initialState$p;
1705
1592
 
1706
- table.setPageIndex(defaultState ? defaultPageIndex : (_table$initialState$p2 = (_table$initialState = table.initialState) == null ? void 0 : (_table$initialState$p3 = _table$initialState.pagination) == null ? void 0 : _table$initialState$p3.pageIndex) != null ? _table$initialState$p2 : defaultPageIndex);
1593
+ table.setPageIndex(defaultState ? defaultPageIndex : ((_table$initialState = table.initialState) == null ? void 0 : (_table$initialState$p = _table$initialState.pagination) == null ? void 0 : _table$initialState$p.pageIndex) ?? defaultPageIndex);
1707
1594
  },
1708
1595
  resetPageSize: defaultState => {
1709
- var _table$initialState$p4, _table$initialState2, _table$initialState2$;
1596
+ var _table$initialState2, _table$initialState2$;
1710
1597
 
1711
- table.setPageSize(defaultState ? defaultPageSize : (_table$initialState$p4 = (_table$initialState2 = table.initialState) == null ? void 0 : (_table$initialState2$ = _table$initialState2.pagination) == null ? void 0 : _table$initialState2$.pageSize) != null ? _table$initialState$p4 : defaultPageSize);
1598
+ table.setPageSize(defaultState ? defaultPageSize : ((_table$initialState2 = table.initialState) == null ? void 0 : (_table$initialState2$ = _table$initialState2.pagination) == null ? void 0 : _table$initialState2$.pageSize) ?? defaultPageSize);
1712
1599
  },
1713
1600
  setPageSize: updater => {
1714
1601
  table.setPagination(old => {
@@ -1722,9 +1609,7 @@ const Pagination = {
1722
1609
  });
1723
1610
  },
1724
1611
  setPageCount: updater => table.setPagination(old => {
1725
- var _table$options$pageCo;
1726
-
1727
- let newPageCount = functionalUpdate(updater, (_table$options$pageCo = table.options.pageCount) != null ? _table$options$pageCo : -1);
1612
+ let newPageCount = functionalUpdate(updater, table.options.pageCount ?? -1);
1728
1613
 
1729
1614
  if (typeof newPageCount === 'number') {
1730
1615
  newPageCount = Math.max(-1, newPageCount);
@@ -1744,11 +1629,7 @@ const Pagination = {
1744
1629
  return pageOptions;
1745
1630
  }, {
1746
1631
  key: process.env.NODE_ENV === 'development' && 'getPageOptions',
1747
- debug: () => {
1748
- var _table$options$debugA;
1749
-
1750
- return (_table$options$debugA = table.options.debugAll) != null ? _table$options$debugA : table.options.debugTable;
1751
- }
1632
+ debug: () => table.options.debugAll ?? table.options.debugTable
1752
1633
  }),
1753
1634
  getCanPreviousPage: () => table.getState().pagination.pageIndex > 0,
1754
1635
  getCanNextPage: () => {
@@ -1788,9 +1669,7 @@ const Pagination = {
1788
1669
  return table._getPaginationRowModel();
1789
1670
  },
1790
1671
  getPageCount: () => {
1791
- var _table$options$pageCo2;
1792
-
1793
- return (_table$options$pageCo2 = table.options.pageCount) != null ? _table$options$pageCo2 : Math.ceil(table.getPrePaginationRowModel().rows.length / table.getState().pagination.pageSize);
1672
+ return table.options.pageCount ?? Math.ceil(table.getPrePaginationRowModel().rows.length / table.getState().pagination.pageSize);
1794
1673
  }
1795
1674
  };
1796
1675
  }
@@ -1819,39 +1698,29 @@ const Pinning = {
1819
1698
  pin: position => {
1820
1699
  const columnIds = column.getLeafColumns().map(d => d.id).filter(Boolean);
1821
1700
  table.setColumnPinning(old => {
1822
- var _old$left3, _old$right3;
1823
-
1824
1701
  if (position === 'right') {
1825
- var _old$left, _old$right;
1826
-
1827
1702
  return {
1828
- left: ((_old$left = old == null ? void 0 : old.left) != null ? _old$left : []).filter(d => !(columnIds != null && columnIds.includes(d))),
1829
- right: [...((_old$right = old == null ? void 0 : old.right) != null ? _old$right : []).filter(d => !(columnIds != null && columnIds.includes(d))), ...columnIds]
1703
+ left: ((old == null ? void 0 : old.left) ?? []).filter(d => !(columnIds != null && columnIds.includes(d))),
1704
+ right: [...((old == null ? void 0 : old.right) ?? []).filter(d => !(columnIds != null && columnIds.includes(d))), ...columnIds]
1830
1705
  };
1831
1706
  }
1832
1707
 
1833
1708
  if (position === 'left') {
1834
- var _old$left2, _old$right2;
1835
-
1836
1709
  return {
1837
- left: [...((_old$left2 = old == null ? void 0 : old.left) != null ? _old$left2 : []).filter(d => !(columnIds != null && columnIds.includes(d))), ...columnIds],
1838
- right: ((_old$right2 = old == null ? void 0 : old.right) != null ? _old$right2 : []).filter(d => !(columnIds != null && columnIds.includes(d)))
1710
+ left: [...((old == null ? void 0 : old.left) ?? []).filter(d => !(columnIds != null && columnIds.includes(d))), ...columnIds],
1711
+ right: ((old == null ? void 0 : old.right) ?? []).filter(d => !(columnIds != null && columnIds.includes(d)))
1839
1712
  };
1840
1713
  }
1841
1714
 
1842
1715
  return {
1843
- left: ((_old$left3 = old == null ? void 0 : old.left) != null ? _old$left3 : []).filter(d => !(columnIds != null && columnIds.includes(d))),
1844
- right: ((_old$right3 = old == null ? void 0 : old.right) != null ? _old$right3 : []).filter(d => !(columnIds != null && columnIds.includes(d)))
1716
+ left: ((old == null ? void 0 : old.left) ?? []).filter(d => !(columnIds != null && columnIds.includes(d))),
1717
+ right: ((old == null ? void 0 : old.right) ?? []).filter(d => !(columnIds != null && columnIds.includes(d)))
1845
1718
  };
1846
1719
  });
1847
1720
  },
1848
1721
  getCanPin: () => {
1849
1722
  const leafColumns = column.getLeafColumns();
1850
- return leafColumns.some(d => {
1851
- var _d$columnDef$enablePi, _table$options$enable;
1852
-
1853
- return ((_d$columnDef$enablePi = d.columnDef.enablePinning) != null ? _d$columnDef$enablePi : true) && ((_table$options$enable = table.options.enablePinning) != null ? _table$options$enable : true);
1854
- });
1723
+ return leafColumns.some(d => (d.columnDef.enablePinning ?? true) && (table.options.enablePinning ?? true));
1855
1724
  },
1856
1725
  getIsPinned: () => {
1857
1726
  const leafColumnIds = column.getLeafColumns().map(d => d.id);
@@ -1864,51 +1733,39 @@ const Pinning = {
1864
1733
  return isLeft ? 'left' : isRight ? 'right' : false;
1865
1734
  },
1866
1735
  getPinnedIndex: () => {
1867
- var _table$getState$colum, _table$getState$colum2, _table$getState$colum3;
1736
+ var _table$getState$colum, _table$getState$colum2;
1868
1737
 
1869
1738
  const position = column.getIsPinned();
1870
- return position ? (_table$getState$colum = (_table$getState$colum2 = table.getState().columnPinning) == null ? void 0 : (_table$getState$colum3 = _table$getState$colum2[position]) == null ? void 0 : _table$getState$colum3.indexOf(column.id)) != null ? _table$getState$colum : -1 : 0;
1739
+ return position ? ((_table$getState$colum = table.getState().columnPinning) == null ? void 0 : (_table$getState$colum2 = _table$getState$colum[position]) == null ? void 0 : _table$getState$colum2.indexOf(column.id)) ?? -1 : 0;
1871
1740
  }
1872
1741
  };
1873
1742
  },
1874
1743
  createRow: (row, table) => {
1875
1744
  return {
1876
1745
  getCenterVisibleCells: memo(() => [row._getAllVisibleCells(), table.getState().columnPinning.left, table.getState().columnPinning.right], (allCells, left, right) => {
1877
- const leftAndRight = [...(left != null ? left : []), ...(right != null ? right : [])];
1746
+ const leftAndRight = [...(left ?? []), ...(right ?? [])];
1878
1747
  return allCells.filter(d => !leftAndRight.includes(d.column.id));
1879
1748
  }, {
1880
1749
  key: process.env.NODE_ENV === 'production' && 'row.getCenterVisibleCells',
1881
- debug: () => {
1882
- var _table$options$debugA;
1883
-
1884
- return (_table$options$debugA = table.options.debugAll) != null ? _table$options$debugA : table.options.debugRows;
1885
- }
1750
+ debug: () => table.options.debugAll ?? table.options.debugRows
1886
1751
  }),
1887
1752
  getLeftVisibleCells: memo(() => [row._getAllVisibleCells(), table.getState().columnPinning.left,,], (allCells, left) => {
1888
- const cells = (left != null ? left : []).map(columnId => allCells.find(cell => cell.column.id === columnId)).filter(Boolean).map(d => ({ ...d,
1753
+ const cells = (left ?? []).map(columnId => allCells.find(cell => cell.column.id === columnId)).filter(Boolean).map(d => ({ ...d,
1889
1754
  position: 'left'
1890
1755
  }));
1891
1756
  return cells;
1892
1757
  }, {
1893
1758
  key: process.env.NODE_ENV === 'production' && 'row.getLeftVisibleCells',
1894
- debug: () => {
1895
- var _table$options$debugA2;
1896
-
1897
- return (_table$options$debugA2 = table.options.debugAll) != null ? _table$options$debugA2 : table.options.debugRows;
1898
- }
1759
+ debug: () => table.options.debugAll ?? table.options.debugRows
1899
1760
  }),
1900
1761
  getRightVisibleCells: memo(() => [row._getAllVisibleCells(), table.getState().columnPinning.right], (allCells, right) => {
1901
- const cells = (right != null ? right : []).map(columnId => allCells.find(cell => cell.column.id === columnId)).filter(Boolean).map(d => ({ ...d,
1902
- position: 'left'
1762
+ const cells = (right ?? []).map(columnId => allCells.find(cell => cell.column.id === columnId)).filter(Boolean).map(d => ({ ...d,
1763
+ position: 'right'
1903
1764
  }));
1904
1765
  return cells;
1905
1766
  }, {
1906
1767
  key: process.env.NODE_ENV === 'production' && 'row.getRightVisibleCells',
1907
- debug: () => {
1908
- var _table$options$debugA3;
1909
-
1910
- return (_table$options$debugA3 = table.options.debugAll) != null ? _table$options$debugA3 : table.options.debugRows;
1911
- }
1768
+ debug: () => table.options.debugAll ?? table.options.debugRows
1912
1769
  })
1913
1770
  };
1914
1771
  },
@@ -1916,9 +1773,9 @@ const Pinning = {
1916
1773
  return {
1917
1774
  setColumnPinning: updater => table.options.onColumnPinningChange == null ? void 0 : table.options.onColumnPinningChange(updater),
1918
1775
  resetColumnPinning: defaultState => {
1919
- var _table$initialState$c, _table$initialState;
1776
+ var _table$initialState;
1920
1777
 
1921
- return table.setColumnPinning(defaultState ? getDefaultPinningState() : (_table$initialState$c = (_table$initialState = table.initialState) == null ? void 0 : _table$initialState.columnPinning) != null ? _table$initialState$c : getDefaultPinningState());
1778
+ return table.setColumnPinning(defaultState ? getDefaultPinningState() : ((_table$initialState = table.initialState) == null ? void 0 : _table$initialState.columnPinning) ?? getDefaultPinningState());
1922
1779
  },
1923
1780
  getIsSomeColumnsPinned: position => {
1924
1781
  var _pinningState$positio;
@@ -1934,35 +1791,23 @@ const Pinning = {
1934
1791
  return Boolean((_pinningState$positio = pinningState[position]) == null ? void 0 : _pinningState$positio.length);
1935
1792
  },
1936
1793
  getLeftLeafColumns: memo(() => [table.getAllLeafColumns(), table.getState().columnPinning.left], (allColumns, left) => {
1937
- return (left != null ? left : []).map(columnId => allColumns.find(column => column.id === columnId)).filter(Boolean);
1794
+ return (left ?? []).map(columnId => allColumns.find(column => column.id === columnId)).filter(Boolean);
1938
1795
  }, {
1939
1796
  key: process.env.NODE_ENV === 'development' && 'getLeftLeafColumns',
1940
- debug: () => {
1941
- var _table$options$debugA4;
1942
-
1943
- return (_table$options$debugA4 = table.options.debugAll) != null ? _table$options$debugA4 : table.options.debugColumns;
1944
- }
1797
+ debug: () => table.options.debugAll ?? table.options.debugColumns
1945
1798
  }),
1946
1799
  getRightLeafColumns: memo(() => [table.getAllLeafColumns(), table.getState().columnPinning.right], (allColumns, right) => {
1947
- return (right != null ? right : []).map(columnId => allColumns.find(column => column.id === columnId)).filter(Boolean);
1800
+ return (right ?? []).map(columnId => allColumns.find(column => column.id === columnId)).filter(Boolean);
1948
1801
  }, {
1949
1802
  key: process.env.NODE_ENV === 'development' && 'getRightLeafColumns',
1950
- debug: () => {
1951
- var _table$options$debugA5;
1952
-
1953
- return (_table$options$debugA5 = table.options.debugAll) != null ? _table$options$debugA5 : table.options.debugColumns;
1954
- }
1803
+ debug: () => table.options.debugAll ?? table.options.debugColumns
1955
1804
  }),
1956
1805
  getCenterLeafColumns: memo(() => [table.getAllLeafColumns(), table.getState().columnPinning.left, table.getState().columnPinning.right], (allColumns, left, right) => {
1957
- const leftAndRight = [...(left != null ? left : []), ...(right != null ? right : [])];
1806
+ const leftAndRight = [...(left ?? []), ...(right ?? [])];
1958
1807
  return allColumns.filter(d => !leftAndRight.includes(d.id));
1959
1808
  }, {
1960
1809
  key: process.env.NODE_ENV === 'development' && 'getCenterLeafColumns',
1961
- debug: () => {
1962
- var _table$options$debugA6;
1963
-
1964
- return (_table$options$debugA6 = table.options.debugAll) != null ? _table$options$debugA6 : table.options.debugColumns;
1965
- }
1810
+ debug: () => table.options.debugAll ?? table.options.debugColumns
1966
1811
  })
1967
1812
  };
1968
1813
  }
@@ -1990,11 +1835,7 @@ const RowSelection = {
1990
1835
  createTable: table => {
1991
1836
  return {
1992
1837
  setRowSelection: updater => table.options.onRowSelectionChange == null ? void 0 : table.options.onRowSelectionChange(updater),
1993
- resetRowSelection: defaultState => {
1994
- var _table$initialState$r;
1995
-
1996
- return table.setRowSelection(defaultState ? {} : (_table$initialState$r = table.initialState.rowSelection) != null ? _table$initialState$r : {});
1997
- },
1838
+ resetRowSelection: defaultState => table.setRowSelection(defaultState ? {} : table.initialState.rowSelection ?? {}),
1998
1839
  toggleAllRowsSelected: value => {
1999
1840
  table.setRowSelection(old => {
2000
1841
  value = typeof value !== 'undefined' ? value : !table.getIsAllRowsSelected();
@@ -2092,11 +1933,7 @@ const RowSelection = {
2092
1933
  return selectRowsFn(table, rowModel);
2093
1934
  }, {
2094
1935
  key: process.env.NODE_ENV === 'development' && 'getSelectedRowModel',
2095
- debug: () => {
2096
- var _table$options$debugA;
2097
-
2098
- return (_table$options$debugA = table.options.debugAll) != null ? _table$options$debugA : table.options.debugTable;
2099
- }
1936
+ debug: () => table.options.debugAll ?? table.options.debugTable
2100
1937
  }),
2101
1938
  getFilteredSelectedRowModel: memo(() => [table.getState().rowSelection, table.getFilteredRowModel()], (rowSelection, rowModel) => {
2102
1939
  if (!Object.keys(rowSelection).length) {
@@ -2110,11 +1947,7 @@ const RowSelection = {
2110
1947
  return selectRowsFn(table, rowModel);
2111
1948
  }, {
2112
1949
  key: process.env.NODE_ENV === 'production' && 'getFilteredSelectedRowModel',
2113
- debug: () => {
2114
- var _table$options$debugA2;
2115
-
2116
- return (_table$options$debugA2 = table.options.debugAll) != null ? _table$options$debugA2 : table.options.debugTable;
2117
- }
1950
+ debug: () => table.options.debugAll ?? table.options.debugTable
2118
1951
  }),
2119
1952
  getGroupedSelectedRowModel: memo(() => [table.getState().rowSelection, table.getSortedRowModel()], (rowSelection, rowModel) => {
2120
1953
  if (!Object.keys(rowSelection).length) {
@@ -2128,11 +1961,7 @@ const RowSelection = {
2128
1961
  return selectRowsFn(table, rowModel);
2129
1962
  }, {
2130
1963
  key: process.env.NODE_ENV === 'production' && 'getGroupedSelectedRowModel',
2131
- debug: () => {
2132
- var _table$options$debugA3;
2133
-
2134
- return (_table$options$debugA3 = table.options.debugAll) != null ? _table$options$debugA3 : table.options.debugTable;
2135
- }
1964
+ debug: () => table.options.debugAll ?? table.options.debugTable
2136
1965
  }),
2137
1966
  ///
2138
1967
  // getGroupingRowCanSelect: rowId => {
@@ -2174,9 +2003,7 @@ const RowSelection = {
2174
2003
  return isAllPageRowsSelected;
2175
2004
  },
2176
2005
  getIsSomeRowsSelected: () => {
2177
- var _table$getState$rowSe;
2178
-
2179
- const totalSelected = Object.keys((_table$getState$rowSe = table.getState().rowSelection) != null ? _table$getState$rowSe : {}).length;
2006
+ const totalSelected = Object.keys(table.getState().rowSelection ?? {}).length;
2180
2007
  return totalSelected > 0 && totalSelected < table.getFilteredRowModel().flatRows.length;
2181
2008
  },
2182
2009
  getIsSomePageRowsSelected: () => {
@@ -2231,31 +2058,25 @@ const RowSelection = {
2231
2058
  return isSubRowSelected(row, rowSelection) === 'all';
2232
2059
  },
2233
2060
  getCanSelect: () => {
2234
- var _table$options$enable;
2235
-
2236
2061
  if (typeof table.options.enableRowSelection === 'function') {
2237
2062
  return table.options.enableRowSelection(row);
2238
2063
  }
2239
2064
 
2240
- return (_table$options$enable = table.options.enableRowSelection) != null ? _table$options$enable : true;
2065
+ return table.options.enableRowSelection ?? true;
2241
2066
  },
2242
2067
  getCanSelectSubRows: () => {
2243
- var _table$options$enable2;
2244
-
2245
2068
  if (typeof table.options.enableSubRowSelection === 'function') {
2246
2069
  return table.options.enableSubRowSelection(row);
2247
2070
  }
2248
2071
 
2249
- return (_table$options$enable2 = table.options.enableSubRowSelection) != null ? _table$options$enable2 : true;
2072
+ return table.options.enableSubRowSelection ?? true;
2250
2073
  },
2251
2074
  getCanMultiSelect: () => {
2252
- var _table$options$enable3;
2253
-
2254
2075
  if (typeof table.options.enableMultiRowSelection === 'function') {
2255
2076
  return table.options.enableMultiRowSelection(row);
2256
2077
  }
2257
2078
 
2258
- return (_table$options$enable3 = table.options.enableMultiRowSelection) != null ? _table$options$enable3 : true;
2079
+ return table.options.enableMultiRowSelection ?? true;
2259
2080
  },
2260
2081
  getToggleSelectedHandler: () => {
2261
2082
  const canSelect = row.getCanSelect();
@@ -2333,9 +2154,7 @@ function selectRowsFn(table, rowModel) {
2333
2154
  };
2334
2155
  }
2335
2156
  function isRowSelected(row, selection) {
2336
- var _selection$row$id;
2337
-
2338
- return (_selection$row$id = selection[row.id]) != null ? _selection$row$id : false;
2157
+ return selection[row.id] ?? false;
2339
2158
  }
2340
2159
  function isSubRowSelected(row, selection, table) {
2341
2160
  if (row.subRows && row.subRows.length) {
@@ -2531,13 +2350,13 @@ const Sorting = {
2531
2350
  return 'desc';
2532
2351
  },
2533
2352
  getSortingFn: () => {
2534
- var _table$options$sortin, _table$options$sortin2;
2353
+ var _table$options$sortin;
2535
2354
 
2536
2355
  if (!column) {
2537
2356
  throw new Error();
2538
2357
  }
2539
2358
 
2540
- return isFunction(column.columnDef.sortingFn) ? column.columnDef.sortingFn : column.columnDef.sortingFn === 'auto' ? column.getAutoSortingFn() : (_table$options$sortin = (_table$options$sortin2 = table.options.sortingFns) == null ? void 0 : _table$options$sortin2[column.columnDef.sortingFn]) != null ? _table$options$sortin : sortingFns[column.columnDef.sortingFn];
2359
+ return isFunction(column.columnDef.sortingFn) ? column.columnDef.sortingFn : column.columnDef.sortingFn === 'auto' ? column.getAutoSortingFn() : ((_table$options$sortin = table.options.sortingFns) == null ? void 0 : _table$options$sortin[column.columnDef.sortingFn]) ?? sortingFns[column.columnDef.sortingFn];
2541
2360
  },
2542
2361
  toggleSorting: (desc, multi) => {
2543
2362
  // if (column.columns.length) {
@@ -2589,14 +2408,12 @@ const Sorting = {
2589
2408
  }
2590
2409
 
2591
2410
  if (sortAction === 'add') {
2592
- var _table$options$maxMul;
2593
-
2594
2411
  newSorting = [...old, {
2595
2412
  id: column.id,
2596
2413
  desc: nextDesc
2597
2414
  }]; // Take latest n columns
2598
2415
 
2599
- newSorting.splice(0, newSorting.length - ((_table$options$maxMul = table.options.maxMultiSortColCount) != null ? _table$options$maxMul : Number.MAX_SAFE_INTEGER));
2416
+ newSorting.splice(0, newSorting.length - (table.options.maxMultiSortColCount ?? Number.MAX_SAFE_INTEGER));
2600
2417
  } else if (sortAction === 'toggle') {
2601
2418
  // This flips (or sets) the
2602
2419
  newSorting = old.map(d => {
@@ -2621,14 +2438,10 @@ const Sorting = {
2621
2438
  });
2622
2439
  },
2623
2440
  getFirstSortDir: () => {
2624
- var _ref, _column$columnDef$sor;
2625
-
2626
- const sortDescFirst = (_ref = (_column$columnDef$sor = column.columnDef.sortDescFirst) != null ? _column$columnDef$sor : table.options.sortDescFirst) != null ? _ref : column.getAutoSortDir() === 'desc';
2441
+ const sortDescFirst = column.columnDef.sortDescFirst ?? table.options.sortDescFirst ?? column.getAutoSortDir() === 'desc';
2627
2442
  return sortDescFirst ? 'desc' : 'asc';
2628
2443
  },
2629
2444
  getNextSortingOrder: multi => {
2630
- var _table$options$enable, _table$options$enable2;
2631
-
2632
2445
  const firstSortDirection = column.getFirstSortDir();
2633
2446
  const isSorted = column.getIsSorted();
2634
2447
 
@@ -2636,8 +2449,8 @@ const Sorting = {
2636
2449
  return firstSortDirection;
2637
2450
  }
2638
2451
 
2639
- if (isSorted !== firstSortDirection && ((_table$options$enable = table.options.enableSortingRemoval) != null ? _table$options$enable : true) && ( // If enableSortRemove, enable in general
2640
- multi ? (_table$options$enable2 = table.options.enableMultiRemove) != null ? _table$options$enable2 : true : true) // If multi, don't allow if enableMultiRemove))
2452
+ if (isSorted !== firstSortDirection && (table.options.enableSortingRemoval ?? true) && ( // If enableSortRemove, enable in general
2453
+ multi ? table.options.enableMultiRemove ?? true : true) // If multi, don't allow if enableMultiRemove))
2641
2454
  ) {
2642
2455
  return false;
2643
2456
  }
@@ -2645,14 +2458,10 @@ const Sorting = {
2645
2458
  return isSorted === 'desc' ? 'asc' : 'desc';
2646
2459
  },
2647
2460
  getCanSort: () => {
2648
- var _column$columnDef$ena, _table$options$enable3;
2649
-
2650
- return ((_column$columnDef$ena = column.columnDef.enableSorting) != null ? _column$columnDef$ena : true) && ((_table$options$enable3 = table.options.enableSorting) != null ? _table$options$enable3 : true) && !!column.accessorFn;
2461
+ return (column.columnDef.enableSorting ?? true) && (table.options.enableSorting ?? true) && !!column.accessorFn;
2651
2462
  },
2652
2463
  getCanMultiSort: () => {
2653
- var _ref2, _column$columnDef$ena2;
2654
-
2655
- return (_ref2 = (_column$columnDef$ena2 = column.columnDef.enableMultiSort) != null ? _column$columnDef$ena2 : table.options.enableMultiSort) != null ? _ref2 : !!column.accessorFn;
2464
+ return column.columnDef.enableMultiSort ?? table.options.enableMultiSort ?? !!column.accessorFn;
2656
2465
  },
2657
2466
  getIsSorted: () => {
2658
2467
  var _table$getState$sorti;
@@ -2661,9 +2470,9 @@ const Sorting = {
2661
2470
  return !columnSort ? false : columnSort.desc ? 'desc' : 'asc';
2662
2471
  },
2663
2472
  getSortIndex: () => {
2664
- var _table$getState$sorti2, _table$getState$sorti3;
2473
+ var _table$getState$sorti2;
2665
2474
 
2666
- return (_table$getState$sorti2 = (_table$getState$sorti3 = table.getState().sorting) == null ? void 0 : _table$getState$sorti3.findIndex(d => d.id === column.id)) != null ? _table$getState$sorti2 : -1;
2475
+ return ((_table$getState$sorti2 = table.getState().sorting) == null ? void 0 : _table$getState$sorti2.findIndex(d => d.id === column.id)) ?? -1;
2667
2476
  },
2668
2477
  clearSorting: () => {
2669
2478
  //clear sorting for just 1 column
@@ -2683,9 +2492,9 @@ const Sorting = {
2683
2492
  return {
2684
2493
  setSorting: updater => table.options.onSortingChange == null ? void 0 : table.options.onSortingChange(updater),
2685
2494
  resetSorting: defaultState => {
2686
- var _table$initialState$s, _table$initialState;
2495
+ var _table$initialState;
2687
2496
 
2688
- table.setSorting(defaultState ? [] : (_table$initialState$s = (_table$initialState = table.initialState) == null ? void 0 : _table$initialState.sorting) != null ? _table$initialState$s : []);
2497
+ table.setSorting(defaultState ? [] : ((_table$initialState = table.initialState) == null ? void 0 : _table$initialState.sorting) ?? []);
2689
2498
  },
2690
2499
  getPreSortedRowModel: () => table.getGroupedRowModel(),
2691
2500
  getSortedRowModel: () => {
@@ -2721,19 +2530,17 @@ const Visibility = {
2721
2530
  toggleVisibility: value => {
2722
2531
  if (column.getCanHide()) {
2723
2532
  table.setColumnVisibility(old => ({ ...old,
2724
- [column.id]: value != null ? value : !column.getIsVisible()
2533
+ [column.id]: value ?? !column.getIsVisible()
2725
2534
  }));
2726
2535
  }
2727
2536
  },
2728
2537
  getIsVisible: () => {
2729
- var _table$getState$colum, _table$getState$colum2;
2538
+ var _table$getState$colum;
2730
2539
 
2731
- return (_table$getState$colum = (_table$getState$colum2 = table.getState().columnVisibility) == null ? void 0 : _table$getState$colum2[column.id]) != null ? _table$getState$colum : true;
2540
+ return ((_table$getState$colum = table.getState().columnVisibility) == null ? void 0 : _table$getState$colum[column.id]) ?? true;
2732
2541
  },
2733
2542
  getCanHide: () => {
2734
- var _column$columnDef$ena, _table$options$enable;
2735
-
2736
- return ((_column$columnDef$ena = column.columnDef.enableHiding) != null ? _column$columnDef$ena : true) && ((_table$options$enable = table.options.enableHiding) != null ? _table$options$enable : true);
2543
+ return (column.columnDef.enableHiding ?? true) && (table.options.enableHiding ?? true);
2737
2544
  },
2738
2545
  getToggleVisibilityHandler: () => {
2739
2546
  return e => {
@@ -2748,19 +2555,11 @@ const Visibility = {
2748
2555
  return cells.filter(cell => cell.column.getIsVisible());
2749
2556
  }, {
2750
2557
  key: process.env.NODE_ENV === 'production' && 'row._getAllVisibleCells',
2751
- debug: () => {
2752
- var _table$options$debugA;
2753
-
2754
- return (_table$options$debugA = table.options.debugAll) != null ? _table$options$debugA : table.options.debugRows;
2755
- }
2558
+ debug: () => table.options.debugAll ?? table.options.debugRows
2756
2559
  }),
2757
2560
  getVisibleCells: memo(() => [row.getLeftVisibleCells(), row.getCenterVisibleCells(), row.getRightVisibleCells()], (left, center, right) => [...left, ...center, ...right], {
2758
2561
  key: process.env.NODE_ENV === 'development' && 'row.getVisibleCells',
2759
- debug: () => {
2760
- var _table$options$debugA2;
2761
-
2762
- return (_table$options$debugA2 = table.options.debugAll) != null ? _table$options$debugA2 : table.options.debugRows;
2763
- }
2562
+ debug: () => table.options.debugAll ?? table.options.debugRows
2764
2563
  })
2765
2564
  };
2766
2565
  },
@@ -2770,11 +2569,7 @@ const Visibility = {
2770
2569
  return columns.filter(d => d.getIsVisible == null ? void 0 : d.getIsVisible());
2771
2570
  }, {
2772
2571
  key,
2773
- debug: () => {
2774
- var _table$options$debugA3;
2775
-
2776
- return (_table$options$debugA3 = table.options.debugAll) != null ? _table$options$debugA3 : table.options.debugColumns;
2777
- }
2572
+ debug: () => table.options.debugAll ?? table.options.debugColumns
2778
2573
  });
2779
2574
  };
2780
2575
 
@@ -2786,14 +2581,10 @@ const Visibility = {
2786
2581
  getCenterVisibleLeafColumns: makeVisibleColumnsMethod('getCenterVisibleLeafColumns', () => table.getCenterLeafColumns()),
2787
2582
  setColumnVisibility: updater => table.options.onColumnVisibilityChange == null ? void 0 : table.options.onColumnVisibilityChange(updater),
2788
2583
  resetColumnVisibility: defaultState => {
2789
- var _table$initialState$c;
2790
-
2791
- table.setColumnVisibility(defaultState ? {} : (_table$initialState$c = table.initialState.columnVisibility) != null ? _table$initialState$c : {});
2584
+ table.setColumnVisibility(defaultState ? {} : table.initialState.columnVisibility ?? {});
2792
2585
  },
2793
2586
  toggleAllColumnsVisible: value => {
2794
- var _value;
2795
-
2796
- value = (_value = value) != null ? _value : !table.getIsAllColumnsVisible();
2587
+ value = value ?? !table.getIsAllColumnsVisible();
2797
2588
  table.setColumnVisibility(table.getAllLeafColumns().reduce((obj, column) => ({ ...obj,
2798
2589
  [column.id]: !value ? !(column.getCanHide != null && column.getCanHide()) : value
2799
2590
  }), {}));
@@ -2814,8 +2605,6 @@ const Visibility = {
2814
2605
  const features = [Headers, Visibility, Ordering, Pinning, Filters, Sorting, Grouping, Expanding, Pagination, RowSelection, ColumnSizing]; //
2815
2606
 
2816
2607
  function createTable(options) {
2817
- var _options$initialState;
2818
-
2819
2608
  if (options.debugAll || options.debugTable) {
2820
2609
  console.info('Creating Table Instance...');
2821
2610
  }
@@ -2840,13 +2629,11 @@ function createTable(options) {
2840
2629
 
2841
2630
  const coreInitialState = {};
2842
2631
  let initialState = { ...coreInitialState,
2843
- ...((_options$initialState = options.initialState) != null ? _options$initialState : {})
2632
+ ...(options.initialState ?? {})
2844
2633
  };
2845
2634
 
2846
2635
  table._features.forEach(feature => {
2847
- var _feature$getInitialSt;
2848
-
2849
- initialState = (_feature$getInitialSt = feature.getInitialState == null ? void 0 : feature.getInitialState(initialState)) != null ? _feature$getInitialSt : initialState;
2636
+ initialState = (feature.getInitialState == null ? void 0 : feature.getInitialState(initialState)) ?? initialState;
2850
2637
  });
2851
2638
 
2852
2639
  const queued = [];
@@ -2888,11 +2675,7 @@ function createTable(options) {
2888
2675
  setState: updater => {
2889
2676
  table.options.onStateChange == null ? void 0 : table.options.onStateChange(updater);
2890
2677
  },
2891
- _getRowId: (row, index, parent) => {
2892
- var _table$options$getRow;
2893
-
2894
- return (_table$options$getRow = table.options.getRowId == null ? void 0 : table.options.getRowId(row, index, parent)) != null ? _table$options$getRow : "" + (parent ? [parent.id, index].join('.') : index);
2895
- },
2678
+ _getRowId: (row, index, parent) => (table.options.getRowId == null ? void 0 : table.options.getRowId(row, index, parent)) ?? `${parent ? [parent.id, index].join('.') : index}`,
2896
2679
  getCoreRowModel: () => {
2897
2680
  if (!table._getCoreRowModel) {
2898
2681
  table._getCoreRowModel = table.options.getCoreRowModel(table);
@@ -2910,7 +2693,7 @@ function createTable(options) {
2910
2693
 
2911
2694
  if (!row) {
2912
2695
  if (process.env.NODE_ENV !== 'production') {
2913
- throw new Error("getRow expected an ID, but got " + id);
2696
+ throw new Error(`getRow expected an ID, but got ${id}`);
2914
2697
  }
2915
2698
 
2916
2699
  throw new Error();
@@ -2919,9 +2702,7 @@ function createTable(options) {
2919
2702
  return row;
2920
2703
  },
2921
2704
  _getDefaultColumnDef: memo(() => [table.options.defaultColumn], defaultColumn => {
2922
- var _defaultColumn;
2923
-
2924
- defaultColumn = (_defaultColumn = defaultColumn) != null ? _defaultColumn : {};
2705
+ defaultColumn = defaultColumn ?? {};
2925
2706
  return {
2926
2707
  header: props => {
2927
2708
  const resolvedColumnDef = props.header.column.columnDef;
@@ -2938,9 +2719,9 @@ function createTable(options) {
2938
2719
  },
2939
2720
  // footer: props => props.header.column.id,
2940
2721
  cell: props => {
2941
- var _props$renderValue$to, _props$renderValue;
2722
+ var _props$renderValue;
2942
2723
 
2943
- return (_props$renderValue$to = (_props$renderValue = props.renderValue()) == null ? void 0 : _props$renderValue.toString == null ? void 0 : _props$renderValue.toString()) != null ? _props$renderValue$to : null;
2724
+ return ((_props$renderValue = props.renderValue()) == null ? void 0 : _props$renderValue.toString == null ? void 0 : _props$renderValue.toString()) ?? null;
2944
2725
  },
2945
2726
  ...table._features.reduce((obj, feature) => {
2946
2727
  return Object.assign(obj, feature.getDefaultColumnDef == null ? void 0 : feature.getDefaultColumnDef());
@@ -2948,11 +2729,7 @@ function createTable(options) {
2948
2729
  ...defaultColumn
2949
2730
  };
2950
2731
  }, {
2951
- debug: () => {
2952
- var _table$options$debugA;
2953
-
2954
- return (_table$options$debugA = table.options.debugAll) != null ? _table$options$debugA : table.options.debugColumns;
2955
- },
2732
+ debug: () => table.options.debugAll ?? table.options.debugColumns,
2956
2733
  key: process.env.NODE_ENV === 'development' && 'getDefaultColumnDef'
2957
2734
  }),
2958
2735
  _getColumnDefs: () => table.options.columns,
@@ -2973,11 +2750,7 @@ function createTable(options) {
2973
2750
  return recurseColumns(columnDefs);
2974
2751
  }, {
2975
2752
  key: process.env.NODE_ENV === 'development' && 'getAllColumns',
2976
- debug: () => {
2977
- var _table$options$debugA2;
2978
-
2979
- return (_table$options$debugA2 = table.options.debugAll) != null ? _table$options$debugA2 : table.options.debugColumns;
2980
- }
2753
+ debug: () => table.options.debugAll ?? table.options.debugColumns
2981
2754
  }),
2982
2755
  getAllFlatColumns: memo(() => [table.getAllColumns()], allColumns => {
2983
2756
  return allColumns.flatMap(column => {
@@ -2985,11 +2758,7 @@ function createTable(options) {
2985
2758
  });
2986
2759
  }, {
2987
2760
  key: process.env.NODE_ENV === 'development' && 'getAllFlatColumns',
2988
- debug: () => {
2989
- var _table$options$debugA3;
2990
-
2991
- return (_table$options$debugA3 = table.options.debugAll) != null ? _table$options$debugA3 : table.options.debugColumns;
2992
- }
2761
+ debug: () => table.options.debugAll ?? table.options.debugColumns
2993
2762
  }),
2994
2763
  _getAllFlatColumnsById: memo(() => [table.getAllFlatColumns()], flatColumns => {
2995
2764
  return flatColumns.reduce((acc, column) => {
@@ -2998,29 +2767,21 @@ function createTable(options) {
2998
2767
  }, {});
2999
2768
  }, {
3000
2769
  key: process.env.NODE_ENV === 'development' && 'getAllFlatColumnsById',
3001
- debug: () => {
3002
- var _table$options$debugA4;
3003
-
3004
- return (_table$options$debugA4 = table.options.debugAll) != null ? _table$options$debugA4 : table.options.debugColumns;
3005
- }
2770
+ debug: () => table.options.debugAll ?? table.options.debugColumns
3006
2771
  }),
3007
2772
  getAllLeafColumns: memo(() => [table.getAllColumns(), table._getOrderColumnsFn()], (allColumns, orderColumns) => {
3008
2773
  let leafColumns = allColumns.flatMap(column => column.getLeafColumns());
3009
2774
  return orderColumns(leafColumns);
3010
2775
  }, {
3011
2776
  key: process.env.NODE_ENV === 'development' && 'getAllLeafColumns',
3012
- debug: () => {
3013
- var _table$options$debugA5;
3014
-
3015
- return (_table$options$debugA5 = table.options.debugAll) != null ? _table$options$debugA5 : table.options.debugColumns;
3016
- }
2777
+ debug: () => table.options.debugAll ?? table.options.debugColumns
3017
2778
  }),
3018
2779
  getColumn: columnId => {
3019
2780
  const column = table._getAllFlatColumnsById()[columnId];
3020
2781
 
3021
2782
  if (!column) {
3022
2783
  if (process.env.NODE_ENV !== 'production') {
3023
- console.warn("[Table] Column with id " + columnId + " does not exist.");
2784
+ console.warn(`[Table] Column with id ${columnId} does not exist.`);
3024
2785
  }
3025
2786
 
3026
2787
  throw new Error();
@@ -3039,14 +2800,10 @@ function createTable(options) {
3039
2800
  }
3040
2801
 
3041
2802
  function createCell(table, row, column, columnId) {
3042
- const getRenderValue = () => {
3043
- var _cell$getValue;
3044
-
3045
- return (_cell$getValue = cell.getValue()) != null ? _cell$getValue : table.options.renderFallbackValue;
3046
- };
2803
+ const getRenderValue = () => cell.getValue() ?? table.options.renderFallbackValue;
3047
2804
 
3048
2805
  const cell = {
3049
- id: row.id + "_" + column.id,
2806
+ id: `${row.id}_${column.id}`,
3050
2807
  row,
3051
2808
  column,
3052
2809
  getValue: () => row.getValue(columnId),
@@ -3092,12 +2849,8 @@ const createRow = (table, id, original, rowIndex, depth, subRows) => {
3092
2849
  row._valuesCache[columnId] = column.accessorFn(row.original, rowIndex);
3093
2850
  return row._valuesCache[columnId];
3094
2851
  },
3095
- renderValue: columnId => {
3096
- var _row$getValue;
3097
-
3098
- return (_row$getValue = row.getValue(columnId)) != null ? _row$getValue : table.options.renderFallbackValue;
3099
- },
3100
- subRows: subRows != null ? subRows : [],
2852
+ renderValue: columnId => row.getValue(columnId) ?? table.options.renderFallbackValue,
2853
+ subRows: subRows ?? [],
3101
2854
  getLeafRows: () => flattenBy(row.subRows, d => d.subRows),
3102
2855
  getAllCells: memo(() => [table.getAllLeafColumns()], leafColumns => {
3103
2856
  return leafColumns.map(column => {
@@ -3105,11 +2858,7 @@ const createRow = (table, id, original, rowIndex, depth, subRows) => {
3105
2858
  });
3106
2859
  }, {
3107
2860
  key: process.env.NODE_ENV === 'development' && 'row.getAllCells',
3108
- debug: () => {
3109
- var _table$options$debugA;
3110
-
3111
- return (_table$options$debugA = table.options.debugAll) != null ? _table$options$debugA : table.options.debugRows;
3112
- }
2861
+ debug: () => table.options.debugAll ?? table.options.debugRows
3113
2862
  }),
3114
2863
  _getAllCellsByColumnId: memo(() => [row.getAllCells()], allCells => {
3115
2864
  return allCells.reduce((acc, cell) => {
@@ -3118,11 +2867,7 @@ const createRow = (table, id, original, rowIndex, depth, subRows) => {
3118
2867
  }, {});
3119
2868
  }, {
3120
2869
  key: process.env.NODE_ENV === 'production' && 'row.getAllCellsByColumnId',
3121
- debug: () => {
3122
- var _table$options$debugA2;
3123
-
3124
- return (_table$options$debugA2 = table.options.debugAll) != null ? _table$options$debugA2 : table.options.debugRows;
3125
- }
2870
+ debug: () => table.options.debugAll ?? table.options.debugRows
3126
2871
  })
3127
2872
  };
3128
2873
 
@@ -3232,11 +2977,7 @@ function getCoreRowModel() {
3232
2977
  return rowModel;
3233
2978
  }, {
3234
2979
  key: process.env.NODE_ENV === 'development' && 'getRowModel',
3235
- debug: () => {
3236
- var _table$options$debugA;
3237
-
3238
- return (_table$options$debugA = table.options.debugAll) != null ? _table$options$debugA : table.options.debugTable;
3239
- },
2980
+ debug: () => table.options.debugAll ?? table.options.debugTable,
3240
2981
  onChange: () => {
3241
2982
  table._autoResetPageIndex();
3242
2983
  }
@@ -3342,14 +3083,12 @@ function getFilteredRowModel() {
3342
3083
 
3343
3084
  const resolvedColumnFilters = [];
3344
3085
  const resolvedGlobalFilters = [];
3345
- (columnFilters != null ? columnFilters : []).forEach(d => {
3346
- var _filterFn$resolveFilt;
3347
-
3086
+ (columnFilters ?? []).forEach(d => {
3348
3087
  const column = table.getColumn(d.id);
3349
3088
 
3350
3089
  if (!column) {
3351
3090
  if (process.env.NODE_ENV !== 'production') {
3352
- console.warn("Table: Could not find a column to filter with columnId: " + d.id);
3091
+ console.warn(`Table: Could not find a column to filter with columnId: ${d.id}`);
3353
3092
  }
3354
3093
  }
3355
3094
 
@@ -3357,7 +3096,7 @@ function getFilteredRowModel() {
3357
3096
 
3358
3097
  if (!filterFn) {
3359
3098
  if (process.env.NODE_ENV !== 'production') {
3360
- console.warn("Could not find a valid 'column.filterFn' for column with the ID: " + column.id + ".");
3099
+ console.warn(`Could not find a valid 'column.filterFn' for column with the ID: ${column.id}.`);
3361
3100
  }
3362
3101
 
3363
3102
  return;
@@ -3366,7 +3105,7 @@ function getFilteredRowModel() {
3366
3105
  resolvedColumnFilters.push({
3367
3106
  id: d.id,
3368
3107
  filterFn,
3369
- resolvedValue: (_filterFn$resolveFilt = filterFn.resolveFilterValue == null ? void 0 : filterFn.resolveFilterValue(d.value)) != null ? _filterFn$resolveFilt : d.value
3108
+ resolvedValue: (filterFn.resolveFilterValue == null ? void 0 : filterFn.resolveFilterValue(d.value)) ?? d.value
3370
3109
  });
3371
3110
  });
3372
3111
  const filterableIds = columnFilters.map(d => d.id);
@@ -3376,12 +3115,10 @@ function getFilteredRowModel() {
3376
3115
  if (globalFilter && globalFilterFn && globallyFilterableColumns.length) {
3377
3116
  filterableIds.push('__global__');
3378
3117
  globallyFilterableColumns.forEach(column => {
3379
- var _globalFilterFn$resol;
3380
-
3381
3118
  resolvedGlobalFilters.push({
3382
3119
  id: column.id,
3383
3120
  filterFn: globalFilterFn,
3384
- resolvedValue: (_globalFilterFn$resol = globalFilterFn.resolveFilterValue == null ? void 0 : globalFilterFn.resolveFilterValue(globalFilter)) != null ? _globalFilterFn$resol : globalFilter
3121
+ resolvedValue: (globalFilterFn.resolveFilterValue == null ? void 0 : globalFilterFn.resolveFilterValue(globalFilter)) ?? globalFilter
3385
3122
  });
3386
3123
  });
3387
3124
  }
@@ -3438,11 +3175,7 @@ function getFilteredRowModel() {
3438
3175
  return filterRows(rowModel.rows, filterRowsImpl, table);
3439
3176
  }, {
3440
3177
  key: process.env.NODE_ENV === 'development' && 'getFilteredRowModel',
3441
- debug: () => {
3442
- var _table$options$debugA;
3443
-
3444
- return (_table$options$debugA = table.options.debugAll) != null ? _table$options$debugA : table.options.debugTable;
3445
- },
3178
+ debug: () => table.options.debugAll ?? table.options.debugTable,
3446
3179
  onChange: () => {
3447
3180
  table._autoResetPageIndex();
3448
3181
  }
@@ -3471,11 +3204,7 @@ function getFacetedRowModel() {
3471
3204
  return filterRows(preRowModel.rows, filterRowsImpl, table);
3472
3205
  }, {
3473
3206
  key: process.env.NODE_ENV === 'development' && 'getFacetedRowModel_' + columnId,
3474
- debug: () => {
3475
- var _table$options$debugA;
3476
-
3477
- return (_table$options$debugA = table.options.debugAll) != null ? _table$options$debugA : table.options.debugTable;
3478
- },
3207
+ debug: () => table.options.debugAll ?? table.options.debugTable,
3479
3208
  onChange: () => {}
3480
3209
  });
3481
3210
  }
@@ -3490,9 +3219,7 @@ function getFacetedUniqueValues() {
3490
3219
  const value = (_facetedRowModel$flat = facetedRowModel.flatRows[i]) == null ? void 0 : _facetedRowModel$flat.getValue(columnId);
3491
3220
 
3492
3221
  if (facetedUniqueValues.has(value)) {
3493
- var _facetedUniqueValues$;
3494
-
3495
- facetedUniqueValues.set(value, ((_facetedUniqueValues$ = facetedUniqueValues.get(value)) != null ? _facetedUniqueValues$ : 0) + 1);
3222
+ facetedUniqueValues.set(value, (facetedUniqueValues.get(value) ?? 0) + 1);
3496
3223
  } else {
3497
3224
  facetedUniqueValues.set(value, 1);
3498
3225
  }
@@ -3501,11 +3228,7 @@ function getFacetedUniqueValues() {
3501
3228
  return facetedUniqueValues;
3502
3229
  }, {
3503
3230
  key: process.env.NODE_ENV === 'development' && 'getFacetedUniqueValues_' + columnId,
3504
- debug: () => {
3505
- var _table$options$debugA;
3506
-
3507
- return (_table$options$debugA = table.options.debugAll) != null ? _table$options$debugA : table.options.debugTable;
3508
- },
3231
+ debug: () => table.options.debugAll ?? table.options.debugTable,
3509
3232
  onChange: () => {}
3510
3233
  });
3511
3234
  }
@@ -3535,11 +3258,7 @@ function getFacetedMinMaxValues() {
3535
3258
  return facetedMinMaxValues;
3536
3259
  }, {
3537
3260
  key: process.env.NODE_ENV === 'development' && 'getFacetedMinMaxValues_' + columnId,
3538
- debug: () => {
3539
- var _table$options$debugA;
3540
-
3541
- return (_table$options$debugA = table.options.debugAll) != null ? _table$options$debugA : table.options.debugTable;
3542
- },
3261
+ debug: () => table.options.debugAll ?? table.options.debugTable,
3543
3262
  onChange: () => {}
3544
3263
  });
3545
3264
  }
@@ -3570,11 +3289,9 @@ function getSortedRowModel() {
3570
3289
  const sortedData = rows.slice();
3571
3290
  sortedData.sort((rowA, rowB) => {
3572
3291
  for (let i = 0; i < availableSorting.length; i += 1) {
3573
- var _sortEntry$desc;
3574
-
3575
3292
  const sortEntry = availableSorting[i];
3576
3293
  const columnInfo = columnInfoById[sortEntry.id];
3577
- const isDesc = (_sortEntry$desc = sortEntry == null ? void 0 : sortEntry.desc) != null ? _sortEntry$desc : false;
3294
+ const isDesc = (sortEntry == null ? void 0 : sortEntry.desc) ?? false;
3578
3295
 
3579
3296
  if (columnInfo.sortUndefined) {
3580
3297
  const aValue = rowA.getValue(sortEntry.id);
@@ -3625,11 +3342,7 @@ function getSortedRowModel() {
3625
3342
  };
3626
3343
  }, {
3627
3344
  key: process.env.NODE_ENV === 'development' && 'getSortedRowModel',
3628
- debug: () => {
3629
- var _table$options$debugA;
3630
-
3631
- return (_table$options$debugA = table.options.debugAll) != null ? _table$options$debugA : table.options.debugTable;
3632
- },
3345
+ debug: () => table.options.debugAll ?? table.options.debugTable,
3633
3346
  onChange: () => {
3634
3347
  table._autoResetPageIndex();
3635
3348
  }
@@ -3678,8 +3391,8 @@ function getGroupedRowModel() {
3678
3391
 
3679
3392
  const aggregatedGroupedRows = Array.from(rowGroupsMap.entries()).map((_ref, index) => {
3680
3393
  let [groupingValue, groupedRows] = _ref;
3681
- let id = columnId + ":" + groupingValue;
3682
- id = parentId ? parentId + ">" + id : id; // First, Recurse to group sub rows before aggregation
3394
+ let id = `${columnId}:${groupingValue}`;
3395
+ id = parentId ? `${parentId}>${id}` : id; // First, Recurse to group sub rows before aggregation
3683
3396
 
3684
3397
  const subRows = groupUpRecursively(groupedRows, depth + 1, id); // Flatten the leaf rows of the rows in this group
3685
3398
 
@@ -3698,9 +3411,7 @@ function getGroupedRowModel() {
3698
3411
  }
3699
3412
 
3700
3413
  if (groupedRows[0]) {
3701
- var _groupedRows$0$getVal;
3702
-
3703
- row._valuesCache[columnId] = (_groupedRows$0$getVal = groupedRows[0].getValue(columnId)) != null ? _groupedRows$0$getVal : undefined;
3414
+ row._valuesCache[columnId] = groupedRows[0].getValue(columnId) ?? undefined;
3704
3415
  }
3705
3416
 
3706
3417
  return row._valuesCache[columnId];
@@ -3753,11 +3464,7 @@ function getGroupedRowModel() {
3753
3464
  };
3754
3465
  }, {
3755
3466
  key: process.env.NODE_ENV === 'development' && 'getGroupedRowModel',
3756
- debug: () => {
3757
- var _table$options$debugA;
3758
-
3759
- return (_table$options$debugA = table.options.debugAll) != null ? _table$options$debugA : table.options.debugTable;
3760
- },
3467
+ debug: () => table.options.debugAll ?? table.options.debugTable,
3761
3468
  onChange: () => {
3762
3469
  table._queue(() => {
3763
3470
  table._autoResetExpanded();
@@ -3771,7 +3478,7 @@ function getGroupedRowModel() {
3771
3478
  function groupBy(rows, columnId) {
3772
3479
  const groupMap = new Map();
3773
3480
  return rows.reduce((map, row) => {
3774
- const resKey = "" + row.getValue(columnId);
3481
+ const resKey = `${row.getValue(columnId)}`;
3775
3482
  const previous = map.get(resKey);
3776
3483
 
3777
3484
  if (!previous) {
@@ -3786,7 +3493,7 @@ function groupBy(rows, columnId) {
3786
3493
 
3787
3494
  function getExpandedRowModel() {
3788
3495
  return table => memo(() => [table.getState().expanded, table.getPreExpandedRowModel(), table.options.paginateExpandedRows], (expanded, rowModel, paginateExpandedRows) => {
3789
- if (!rowModel.rows.length || expanded !== true && !Object.keys(expanded != null ? expanded : {}).length) {
3496
+ if (!rowModel.rows.length || expanded !== true && !Object.keys(expanded ?? {}).length) {
3790
3497
  return rowModel;
3791
3498
  }
3792
3499
 
@@ -3798,11 +3505,7 @@ function getExpandedRowModel() {
3798
3505
  return expandRows(rowModel);
3799
3506
  }, {
3800
3507
  key: process.env.NODE_ENV === 'development' && 'getExpandedRowModel',
3801
- debug: () => {
3802
- var _table$options$debugA;
3803
-
3804
- return (_table$options$debugA = table.options.debugAll) != null ? _table$options$debugA : table.options.debugTable;
3805
- }
3508
+ debug: () => table.options.debugAll ?? table.options.debugTable
3806
3509
  });
3807
3510
  }
3808
3511
  function expandRows(rowModel) {
@@ -3874,11 +3577,7 @@ function getPaginationRowModel(opts) {
3874
3577
  return paginatedRowModel;
3875
3578
  }, {
3876
3579
  key: process.env.NODE_ENV === 'development' && 'getPaginationRowModel',
3877
- debug: () => {
3878
- var _table$options$debugA;
3879
-
3880
- return (_table$options$debugA = table.options.debugAll) != null ? _table$options$debugA : table.options.debugTable;
3881
- }
3580
+ debug: () => table.options.debugAll ?? table.options.debugTable
3882
3581
  });
3883
3582
  }
3884
3583