@tanstack/react-table 8.5.13 → 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.
@@ -92,7 +92,10 @@ function memo(getDeps, fn, opts) {
92
92
  return str;
93
93
  };
94
94
 
95
- 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);
95
+ console.info(`%c ${pad(resultEndTime, 5)} /${pad(depEndTime, 5)} ms`, `
96
+ font-size: .6rem;
97
+ font-weight: bold;
98
+ color: hsl(${Math.max(0, Math.min(120 - 120 * resultFpsPercentage, 120))}deg 100% 31%);`, opts == null ? void 0 : opts.key);
96
99
  }
97
100
  }
98
101
 
@@ -101,15 +104,13 @@ function memo(getDeps, fn, opts) {
101
104
  }
102
105
 
103
106
  function createColumn(table, columnDef, depth, parent) {
104
- var _ref, _resolvedColumnDef$id;
105
-
106
107
  const defaultColumn = table._getDefaultColumnDef();
107
108
 
108
109
  const resolvedColumnDef = { ...defaultColumn,
109
110
  ...columnDef
110
111
  };
111
112
  const accessorKey = resolvedColumnDef.accessorKey;
112
- let id = (_ref = (_resolvedColumnDef$id = resolvedColumnDef.id) != null ? _resolvedColumnDef$id : accessorKey ? accessorKey.replace('.', '_') : undefined) != null ? _ref : typeof resolvedColumnDef.header === 'string' ? resolvedColumnDef.header : undefined;
113
+ let id = resolvedColumnDef.id ?? (accessorKey ? accessorKey.replace('.', '_') : undefined) ?? (typeof resolvedColumnDef.header === 'string' ? resolvedColumnDef.header : undefined);
113
114
  let accessorFn;
114
115
 
115
116
  if (resolvedColumnDef.accessorFn) {
@@ -133,14 +134,14 @@ function createColumn(table, columnDef, depth, parent) {
133
134
 
134
135
  if (!id) {
135
136
  if (process.env.NODE_ENV !== 'production') {
136
- throw new Error(resolvedColumnDef.accessorFn ? "Columns require an id when using an accessorFn" : "Columns require an id when using a non-string header");
137
+ throw new Error(resolvedColumnDef.accessorFn ? `Columns require an id when using an accessorFn` : `Columns require an id when using a non-string header`);
137
138
  }
138
139
 
139
140
  throw new Error();
140
141
  }
141
142
 
142
143
  let column = {
143
- id: "" + String(id),
144
+ id: `${String(id)}`,
144
145
  accessorFn,
145
146
  parent: parent,
146
147
  depth,
@@ -152,11 +153,7 @@ function createColumn(table, columnDef, depth, parent) {
152
153
  return [column, ...((_column$columns = column.columns) == null ? void 0 : _column$columns.flatMap(d => d.getFlatColumns()))];
153
154
  }, {
154
155
  key: process.env.NODE_ENV === 'production' && 'column.getFlatColumns',
155
- debug: () => {
156
- var _table$options$debugA;
157
-
158
- return (_table$options$debugA = table.options.debugAll) != null ? _table$options$debugA : table.options.debugColumns;
159
- }
156
+ debug: () => table.options.debugAll ?? table.options.debugColumns
160
157
  }),
161
158
  getLeafColumns: memo(() => [table._getOrderColumnsFn()], orderColumns => {
162
159
  var _column$columns2;
@@ -169,11 +166,7 @@ function createColumn(table, columnDef, depth, parent) {
169
166
  return [column];
170
167
  }, {
171
168
  key: process.env.NODE_ENV === 'production' && 'column.getLeafColumns',
172
- debug: () => {
173
- var _table$options$debugA2;
174
-
175
- return (_table$options$debugA2 = table.options.debugAll) != null ? _table$options$debugA2 : table.options.debugColumns;
176
- }
169
+ debug: () => table.options.debugAll ?? table.options.debugColumns
177
170
  })
178
171
  };
179
172
  column = table._features.reduce((obj, feature) => {
@@ -185,9 +178,7 @@ function createColumn(table, columnDef, depth, parent) {
185
178
 
186
179
  //
187
180
  function createHeader(table, column, options) {
188
- var _options$id;
189
-
190
- const id = (_options$id = options.id) != null ? _options$id : column.id;
181
+ const id = options.id ?? column.id;
191
182
  let header = {
192
183
  id,
193
184
  column,
@@ -232,98 +223,60 @@ const Headers = {
232
223
  return {
233
224
  // Header Groups
234
225
  getHeaderGroups: memo(() => [table.getAllColumns(), table.getVisibleLeafColumns(), table.getState().columnPinning.left, table.getState().columnPinning.right], (allColumns, leafColumns, left, right) => {
235
- var _left$map$filter, _right$map$filter;
236
-
237
- const leftColumns = (_left$map$filter = left == null ? void 0 : left.map(columnId => leafColumns.find(d => d.id === columnId)).filter(Boolean)) != null ? _left$map$filter : [];
238
- const rightColumns = (_right$map$filter = right == null ? void 0 : right.map(columnId => leafColumns.find(d => d.id === columnId)).filter(Boolean)) != null ? _right$map$filter : [];
226
+ const leftColumns = (left == null ? void 0 : left.map(columnId => leafColumns.find(d => d.id === columnId)).filter(Boolean)) ?? [];
227
+ const rightColumns = (right == null ? void 0 : right.map(columnId => leafColumns.find(d => d.id === columnId)).filter(Boolean)) ?? [];
239
228
  const centerColumns = leafColumns.filter(column => !(left != null && left.includes(column.id)) && !(right != null && right.includes(column.id)));
240
229
  const headerGroups = buildHeaderGroups(allColumns, [...leftColumns, ...centerColumns, ...rightColumns], table);
241
230
  return headerGroups;
242
231
  }, {
243
232
  key: process.env.NODE_ENV === 'development' && 'getHeaderGroups',
244
- debug: () => {
245
- var _table$options$debugA;
246
-
247
- return (_table$options$debugA = table.options.debugAll) != null ? _table$options$debugA : table.options.debugHeaders;
248
- }
233
+ debug: () => table.options.debugAll ?? table.options.debugHeaders
249
234
  }),
250
235
  getCenterHeaderGroups: memo(() => [table.getAllColumns(), table.getVisibleLeafColumns(), table.getState().columnPinning.left, table.getState().columnPinning.right], (allColumns, leafColumns, left, right) => {
251
236
  leafColumns = leafColumns.filter(column => !(left != null && left.includes(column.id)) && !(right != null && right.includes(column.id)));
252
237
  return buildHeaderGroups(allColumns, leafColumns, table, 'center');
253
238
  }, {
254
239
  key: process.env.NODE_ENV === 'development' && 'getCenterHeaderGroups',
255
- debug: () => {
256
- var _table$options$debugA2;
257
-
258
- return (_table$options$debugA2 = table.options.debugAll) != null ? _table$options$debugA2 : table.options.debugHeaders;
259
- }
240
+ debug: () => table.options.debugAll ?? table.options.debugHeaders
260
241
  }),
261
242
  getLeftHeaderGroups: memo(() => [table.getAllColumns(), table.getVisibleLeafColumns(), table.getState().columnPinning.left], (allColumns, leafColumns, left) => {
262
- var _left$map$filter2;
263
-
264
- const orderedLeafColumns = (_left$map$filter2 = left == null ? void 0 : left.map(columnId => leafColumns.find(d => d.id === columnId)).filter(Boolean)) != null ? _left$map$filter2 : [];
243
+ const orderedLeafColumns = (left == null ? void 0 : left.map(columnId => leafColumns.find(d => d.id === columnId)).filter(Boolean)) ?? [];
265
244
  return buildHeaderGroups(allColumns, orderedLeafColumns, table, 'left');
266
245
  }, {
267
246
  key: process.env.NODE_ENV === 'development' && 'getLeftHeaderGroups',
268
- debug: () => {
269
- var _table$options$debugA3;
270
-
271
- return (_table$options$debugA3 = table.options.debugAll) != null ? _table$options$debugA3 : table.options.debugHeaders;
272
- }
247
+ debug: () => table.options.debugAll ?? table.options.debugHeaders
273
248
  }),
274
249
  getRightHeaderGroups: memo(() => [table.getAllColumns(), table.getVisibleLeafColumns(), table.getState().columnPinning.right], (allColumns, leafColumns, right) => {
275
- var _right$map$filter2;
276
-
277
- const orderedLeafColumns = (_right$map$filter2 = right == null ? void 0 : right.map(columnId => leafColumns.find(d => d.id === columnId)).filter(Boolean)) != null ? _right$map$filter2 : [];
250
+ const orderedLeafColumns = (right == null ? void 0 : right.map(columnId => leafColumns.find(d => d.id === columnId)).filter(Boolean)) ?? [];
278
251
  return buildHeaderGroups(allColumns, orderedLeafColumns, table, 'right');
279
252
  }, {
280
253
  key: process.env.NODE_ENV === 'development' && 'getRightHeaderGroups',
281
- debug: () => {
282
- var _table$options$debugA4;
283
-
284
- return (_table$options$debugA4 = table.options.debugAll) != null ? _table$options$debugA4 : table.options.debugHeaders;
285
- }
254
+ debug: () => table.options.debugAll ?? table.options.debugHeaders
286
255
  }),
287
256
  // Footer Groups
288
257
  getFooterGroups: memo(() => [table.getHeaderGroups()], headerGroups => {
289
258
  return [...headerGroups].reverse();
290
259
  }, {
291
260
  key: process.env.NODE_ENV === 'development' && 'getFooterGroups',
292
- debug: () => {
293
- var _table$options$debugA5;
294
-
295
- return (_table$options$debugA5 = table.options.debugAll) != null ? _table$options$debugA5 : table.options.debugHeaders;
296
- }
261
+ debug: () => table.options.debugAll ?? table.options.debugHeaders
297
262
  }),
298
263
  getLeftFooterGroups: memo(() => [table.getLeftHeaderGroups()], headerGroups => {
299
264
  return [...headerGroups].reverse();
300
265
  }, {
301
266
  key: process.env.NODE_ENV === 'development' && 'getLeftFooterGroups',
302
- debug: () => {
303
- var _table$options$debugA6;
304
-
305
- return (_table$options$debugA6 = table.options.debugAll) != null ? _table$options$debugA6 : table.options.debugHeaders;
306
- }
267
+ debug: () => table.options.debugAll ?? table.options.debugHeaders
307
268
  }),
308
269
  getCenterFooterGroups: memo(() => [table.getCenterHeaderGroups()], headerGroups => {
309
270
  return [...headerGroups].reverse();
310
271
  }, {
311
272
  key: process.env.NODE_ENV === 'development' && 'getCenterFooterGroups',
312
- debug: () => {
313
- var _table$options$debugA7;
314
-
315
- return (_table$options$debugA7 = table.options.debugAll) != null ? _table$options$debugA7 : table.options.debugHeaders;
316
- }
273
+ debug: () => table.options.debugAll ?? table.options.debugHeaders
317
274
  }),
318
275
  getRightFooterGroups: memo(() => [table.getRightHeaderGroups()], headerGroups => {
319
276
  return [...headerGroups].reverse();
320
277
  }, {
321
278
  key: process.env.NODE_ENV === 'development' && 'getRightFooterGroups',
322
- debug: () => {
323
- var _table$options$debugA8;
324
-
325
- return (_table$options$debugA8 = table.options.debugAll) != null ? _table$options$debugA8 : table.options.debugHeaders;
326
- }
279
+ debug: () => table.options.debugAll ?? table.options.debugHeaders
327
280
  }),
328
281
  // Flat Headers
329
282
  getFlatHeaders: memo(() => [table.getHeaderGroups()], headerGroups => {
@@ -332,11 +285,7 @@ const Headers = {
332
285
  }).flat();
333
286
  }, {
334
287
  key: process.env.NODE_ENV === 'development' && 'getFlatHeaders',
335
- debug: () => {
336
- var _table$options$debugA9;
337
-
338
- return (_table$options$debugA9 = table.options.debugAll) != null ? _table$options$debugA9 : table.options.debugHeaders;
339
- }
288
+ debug: () => table.options.debugAll ?? table.options.debugHeaders
340
289
  }),
341
290
  getLeftFlatHeaders: memo(() => [table.getLeftHeaderGroups()], left => {
342
291
  return left.map(headerGroup => {
@@ -344,11 +293,7 @@ const Headers = {
344
293
  }).flat();
345
294
  }, {
346
295
  key: process.env.NODE_ENV === 'development' && 'getLeftFlatHeaders',
347
- debug: () => {
348
- var _table$options$debugA10;
349
-
350
- return (_table$options$debugA10 = table.options.debugAll) != null ? _table$options$debugA10 : table.options.debugHeaders;
351
- }
296
+ debug: () => table.options.debugAll ?? table.options.debugHeaders
352
297
  }),
353
298
  getCenterFlatHeaders: memo(() => [table.getCenterHeaderGroups()], left => {
354
299
  return left.map(headerGroup => {
@@ -356,11 +301,7 @@ const Headers = {
356
301
  }).flat();
357
302
  }, {
358
303
  key: process.env.NODE_ENV === 'development' && 'getCenterFlatHeaders',
359
- debug: () => {
360
- var _table$options$debugA11;
361
-
362
- return (_table$options$debugA11 = table.options.debugAll) != null ? _table$options$debugA11 : table.options.debugHeaders;
363
- }
304
+ debug: () => table.options.debugAll ?? table.options.debugHeaders
364
305
  }),
365
306
  getRightFlatHeaders: memo(() => [table.getRightHeaderGroups()], left => {
366
307
  return left.map(headerGroup => {
@@ -368,11 +309,7 @@ const Headers = {
368
309
  }).flat();
369
310
  }, {
370
311
  key: process.env.NODE_ENV === 'development' && 'getRightFlatHeaders',
371
- debug: () => {
372
- var _table$options$debugA12;
373
-
374
- return (_table$options$debugA12 = table.options.debugAll) != null ? _table$options$debugA12 : table.options.debugHeaders;
375
- }
312
+ debug: () => table.options.debugAll ?? table.options.debugHeaders
376
313
  }),
377
314
  // Leaf Headers
378
315
  getCenterLeafHeaders: memo(() => [table.getCenterFlatHeaders()], flatHeaders => {
@@ -383,11 +320,7 @@ const Headers = {
383
320
  });
384
321
  }, {
385
322
  key: process.env.NODE_ENV === 'development' && 'getCenterLeafHeaders',
386
- debug: () => {
387
- var _table$options$debugA13;
388
-
389
- return (_table$options$debugA13 = table.options.debugAll) != null ? _table$options$debugA13 : table.options.debugHeaders;
390
- }
323
+ debug: () => table.options.debugAll ?? table.options.debugHeaders
391
324
  }),
392
325
  getLeftLeafHeaders: memo(() => [table.getLeftFlatHeaders()], flatHeaders => {
393
326
  return flatHeaders.filter(header => {
@@ -397,11 +330,7 @@ const Headers = {
397
330
  });
398
331
  }, {
399
332
  key: process.env.NODE_ENV === 'development' && 'getLeftLeafHeaders',
400
- debug: () => {
401
- var _table$options$debugA14;
402
-
403
- return (_table$options$debugA14 = table.options.debugAll) != null ? _table$options$debugA14 : table.options.debugHeaders;
404
- }
333
+ debug: () => table.options.debugAll ?? table.options.debugHeaders
405
334
  }),
406
335
  getRightLeafHeaders: memo(() => [table.getRightFlatHeaders()], flatHeaders => {
407
336
  return flatHeaders.filter(header => {
@@ -411,31 +340,23 @@ const Headers = {
411
340
  });
412
341
  }, {
413
342
  key: process.env.NODE_ENV === 'development' && 'getRightLeafHeaders',
414
- debug: () => {
415
- var _table$options$debugA15;
416
-
417
- return (_table$options$debugA15 = table.options.debugAll) != null ? _table$options$debugA15 : table.options.debugHeaders;
418
- }
343
+ debug: () => table.options.debugAll ?? table.options.debugHeaders
419
344
  }),
420
345
  getLeafHeaders: memo(() => [table.getLeftHeaderGroups(), table.getCenterHeaderGroups(), table.getRightHeaderGroups()], (left, center, right) => {
421
- var _left$0$headers, _left$, _center$0$headers, _center$, _right$0$headers, _right$;
346
+ var _left$, _center$, _right$;
422
347
 
423
- 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 => {
348
+ 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 => {
424
349
  return header.getLeafHeaders();
425
350
  }).flat();
426
351
  }, {
427
352
  key: process.env.NODE_ENV === 'development' && 'getLeafHeaders',
428
- debug: () => {
429
- var _table$options$debugA16;
430
-
431
- return (_table$options$debugA16 = table.options.debugAll) != null ? _table$options$debugA16 : table.options.debugHeaders;
432
- }
353
+ debug: () => table.options.debugAll ?? table.options.debugHeaders
433
354
  })
434
355
  };
435
356
  }
436
357
  };
437
358
  function buildHeaderGroups(allColumns, columnsToGroup, table, headerFamily) {
438
- var _headerGroups$0$heade, _headerGroups$;
359
+ var _headerGroups$;
439
360
 
440
361
  // Find the max depth of the columns:
441
362
  // build the leaf column row
@@ -466,7 +387,7 @@ function buildHeaderGroups(allColumns, columnsToGroup, table, headerFamily) {
466
387
  // The header group we are creating
467
388
  const headerGroup = {
468
389
  depth,
469
- id: [headerFamily, "" + depth].filter(Boolean).join('_'),
390
+ id: [headerFamily, `${depth}`].filter(Boolean).join('_'),
470
391
  headers: []
471
392
  }; // The parent columns we're going to scan next
472
393
 
@@ -496,7 +417,7 @@ function buildHeaderGroups(allColumns, columnsToGroup, table, headerFamily) {
496
417
  const header = createHeader(table, column, {
497
418
  id: [headerFamily, depth, column.id, headerToGroup == null ? void 0 : headerToGroup.id].filter(Boolean).join('_'),
498
419
  isPlaceholder,
499
- placeholderId: isPlaceholder ? "" + pendingParentHeaders.filter(d => d.column === column).length : undefined,
420
+ placeholderId: isPlaceholder ? `${pendingParentHeaders.filter(d => d.column === column).length}` : undefined,
500
421
  depth,
501
422
  index: pendingParentHeaders.length
502
423
  }); // Add the headerToGroup as a subHeader of the new header
@@ -558,7 +479,7 @@ function buildHeaderGroups(allColumns, columnsToGroup, table, headerFamily) {
558
479
  });
559
480
  };
560
481
 
561
- recurseHeadersForSpans((_headerGroups$0$heade = (_headerGroups$ = headerGroups[0]) == null ? void 0 : _headerGroups$.headers) != null ? _headerGroups$0$heade : []);
482
+ recurseHeadersForSpans(((_headerGroups$ = headerGroups[0]) == null ? void 0 : _headerGroups$.headers) ?? []);
562
483
  return headerGroups;
563
484
  }
564
485
 
@@ -599,10 +520,8 @@ const ColumnSizing = {
599
520
  createColumn: (column, table) => {
600
521
  return {
601
522
  getSize: () => {
602
- var _column$columnDef$min, _ref, _column$columnDef$max;
603
-
604
523
  const columnSize = table.getState().columnSizing[column.id];
605
- 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);
524
+ return Math.min(Math.max(column.columnDef.minSize ?? defaultColumnSizing.minSize, columnSize ?? column.columnDef.size ?? defaultColumnSizing.size), column.columnDef.maxSize ?? defaultColumnSizing.maxSize);
606
525
  },
607
526
  getStart: position => {
608
527
  const columns = !position ? table.getVisibleLeafColumns() : position === 'left' ? table.getLeftVisibleLeafColumns() : table.getRightVisibleLeafColumns();
@@ -616,18 +535,16 @@ const ColumnSizing = {
616
535
  return 0;
617
536
  },
618
537
  resetSize: () => {
619
- table.setColumnSizing(_ref2 => {
538
+ table.setColumnSizing(_ref => {
620
539
  let {
621
540
  [column.id]: _,
622
541
  ...rest
623
- } = _ref2;
542
+ } = _ref;
624
543
  return rest;
625
544
  });
626
545
  },
627
546
  getCanResize: () => {
628
- var _column$columnDef$ena, _table$options$enable;
629
-
630
- return ((_column$columnDef$ena = column.columnDef.enableResizing) != null ? _column$columnDef$ena : true) && ((_table$options$enable = table.options.enableColumnResizing) != null ? _table$options$enable : true);
547
+ return (column.columnDef.enableResizing ?? true) && (table.options.enableColumnResizing ?? true);
631
548
  },
632
549
  getIsResizing: () => {
633
550
  return table.getState().columnSizingInfo.isResizingColumn === column.id;
@@ -643,9 +560,7 @@ const ColumnSizing = {
643
560
  if (header.subHeaders.length) {
644
561
  header.subHeaders.forEach(recurse);
645
562
  } else {
646
- var _header$column$getSiz;
647
-
648
- sum += (_header$column$getSiz = header.column.getSize()) != null ? _header$column$getSiz : 0;
563
+ sum += header.column.getSize() ?? 0;
649
564
  }
650
565
  };
651
566
 
@@ -687,12 +602,10 @@ const ColumnSizing = {
687
602
 
688
603
  let newColumnSizing = {};
689
604
  table.setColumnSizingInfo(old => {
690
- var _old$startOffset, _old$startSize;
691
-
692
- const deltaOffset = clientXPos - ((_old$startOffset = old == null ? void 0 : old.startOffset) != null ? _old$startOffset : 0);
693
- const deltaPercentage = Math.max(deltaOffset / ((_old$startSize = old == null ? void 0 : old.startSize) != null ? _old$startSize : 0), -0.999999);
694
- old.columnSizingStart.forEach(_ref3 => {
695
- let [columnId, headerSize] = _ref3;
605
+ const deltaOffset = clientXPos - ((old == null ? void 0 : old.startOffset) ?? 0);
606
+ const deltaPercentage = Math.max(deltaOffset / ((old == null ? void 0 : old.startSize) ?? 0), -0.999999);
607
+ old.columnSizingStart.forEach(_ref2 => {
608
+ let [columnId, headerSize] = _ref2;
696
609
  newColumnSizing[columnId] = Math.round(Math.max(headerSize + headerSize * deltaPercentage, 0) * 100) / 100;
697
610
  });
698
611
  return { ...old,
@@ -756,42 +669,38 @@ const ColumnSizing = {
756
669
  setColumnSizing: updater => table.options.onColumnSizingChange == null ? void 0 : table.options.onColumnSizingChange(updater),
757
670
  setColumnSizingInfo: updater => table.options.onColumnSizingInfoChange == null ? void 0 : table.options.onColumnSizingInfoChange(updater),
758
671
  resetColumnSizing: defaultState => {
759
- var _table$initialState$c;
760
-
761
- table.setColumnSizing(defaultState ? {} : (_table$initialState$c = table.initialState.columnSizing) != null ? _table$initialState$c : {});
672
+ table.setColumnSizing(defaultState ? {} : table.initialState.columnSizing ?? {});
762
673
  },
763
674
  resetHeaderSizeInfo: defaultState => {
764
- var _table$initialState$c2;
765
-
766
- table.setColumnSizingInfo(defaultState ? getDefaultColumnSizingInfoState() : (_table$initialState$c2 = table.initialState.columnSizingInfo) != null ? _table$initialState$c2 : getDefaultColumnSizingInfoState());
675
+ table.setColumnSizingInfo(defaultState ? getDefaultColumnSizingInfoState() : table.initialState.columnSizingInfo ?? getDefaultColumnSizingInfoState());
767
676
  },
768
677
  getTotalSize: () => {
769
- var _table$getHeaderGroup, _table$getHeaderGroup2;
678
+ var _table$getHeaderGroup;
770
679
 
771
- return (_table$getHeaderGroup = (_table$getHeaderGroup2 = table.getHeaderGroups()[0]) == null ? void 0 : _table$getHeaderGroup2.headers.reduce((sum, header) => {
680
+ return ((_table$getHeaderGroup = table.getHeaderGroups()[0]) == null ? void 0 : _table$getHeaderGroup.headers.reduce((sum, header) => {
772
681
  return sum + header.getSize();
773
- }, 0)) != null ? _table$getHeaderGroup : 0;
682
+ }, 0)) ?? 0;
774
683
  },
775
684
  getLeftTotalSize: () => {
776
- var _table$getLeftHeaderG, _table$getLeftHeaderG2;
685
+ var _table$getLeftHeaderG;
777
686
 
778
- return (_table$getLeftHeaderG = (_table$getLeftHeaderG2 = table.getLeftHeaderGroups()[0]) == null ? void 0 : _table$getLeftHeaderG2.headers.reduce((sum, header) => {
687
+ return ((_table$getLeftHeaderG = table.getLeftHeaderGroups()[0]) == null ? void 0 : _table$getLeftHeaderG.headers.reduce((sum, header) => {
779
688
  return sum + header.getSize();
780
- }, 0)) != null ? _table$getLeftHeaderG : 0;
689
+ }, 0)) ?? 0;
781
690
  },
782
691
  getCenterTotalSize: () => {
783
- var _table$getCenterHeade, _table$getCenterHeade2;
692
+ var _table$getCenterHeade;
784
693
 
785
- return (_table$getCenterHeade = (_table$getCenterHeade2 = table.getCenterHeaderGroups()[0]) == null ? void 0 : _table$getCenterHeade2.headers.reduce((sum, header) => {
694
+ return ((_table$getCenterHeade = table.getCenterHeaderGroups()[0]) == null ? void 0 : _table$getCenterHeade.headers.reduce((sum, header) => {
786
695
  return sum + header.getSize();
787
- }, 0)) != null ? _table$getCenterHeade : 0;
696
+ }, 0)) ?? 0;
788
697
  },
789
698
  getRightTotalSize: () => {
790
- var _table$getRightHeader, _table$getRightHeader2;
699
+ var _table$getRightHeader;
791
700
 
792
- return (_table$getRightHeader = (_table$getRightHeader2 = table.getRightHeaderGroups()[0]) == null ? void 0 : _table$getRightHeader2.headers.reduce((sum, header) => {
701
+ return ((_table$getRightHeader = table.getRightHeaderGroups()[0]) == null ? void 0 : _table$getRightHeader.headers.reduce((sum, header) => {
793
702
  return sum + header.getSize();
794
- }, 0)) != null ? _table$getRightHeader : 0;
703
+ }, 0)) ?? 0;
795
704
  }
796
705
  };
797
706
  }
@@ -845,8 +754,6 @@ const Expanding = {
845
754
  let queued = false;
846
755
  return {
847
756
  _autoResetExpanded: () => {
848
- var _ref, _table$options$autoRe;
849
-
850
757
  if (!registered) {
851
758
  table._queue(() => {
852
759
  registered = true;
@@ -855,7 +762,7 @@ const Expanding = {
855
762
  return;
856
763
  }
857
764
 
858
- if ((_ref = (_table$options$autoRe = table.options.autoResetAll) != null ? _table$options$autoRe : table.options.autoResetExpanded) != null ? _ref : !table.options.manualExpanding) {
765
+ if (table.options.autoResetAll ?? table.options.autoResetExpanded ?? !table.options.manualExpanding) {
859
766
  if (queued) return;
860
767
  queued = true;
861
768
 
@@ -867,16 +774,16 @@ const Expanding = {
867
774
  },
868
775
  setExpanded: updater => table.options.onExpandedChange == null ? void 0 : table.options.onExpandedChange(updater),
869
776
  toggleAllRowsExpanded: expanded => {
870
- if (expanded != null ? expanded : !table.getIsAllRowsExpanded()) {
777
+ if (expanded ?? !table.getIsAllRowsExpanded()) {
871
778
  table.setExpanded(true);
872
779
  } else {
873
780
  table.setExpanded({});
874
781
  }
875
782
  },
876
783
  resetExpanded: defaultState => {
877
- var _table$initialState$e, _table$initialState;
784
+ var _table$initialState;
878
785
 
879
- table.setExpanded(defaultState ? {} : (_table$initialState$e = (_table$initialState = table.initialState) == null ? void 0 : _table$initialState.expanded) != null ? _table$initialState$e : {});
786
+ table.setExpanded(defaultState ? {} : ((_table$initialState = table.initialState) == null ? void 0 : _table$initialState.expanded) ?? {});
880
787
  },
881
788
  getCanSomeRowsExpand: () => {
882
789
  return table.getRowModel().flatRows.some(row => row.getCanExpand());
@@ -903,7 +810,7 @@ const Expanding = {
903
810
  } // If any row is not expanded, return false
904
811
 
905
812
 
906
- if (table.getRowModel().flatRows.some(row => row.getIsExpanded())) {
813
+ if (table.getRowModel().flatRows.some(row => !row.getIsExpanded())) {
907
814
  return false;
908
815
  } // They must all be expanded :shrug:
909
816
 
@@ -937,8 +844,6 @@ const Expanding = {
937
844
  return {
938
845
  toggleExpanded: expanded => {
939
846
  table.setExpanded(old => {
940
- var _expanded;
941
-
942
847
  const exists = old === true ? true : !!(old != null && old[row.id]);
943
848
  let oldExpanded = {};
944
849
 
@@ -950,7 +855,7 @@ const Expanding = {
950
855
  oldExpanded = old;
951
856
  }
952
857
 
953
- expanded = (_expanded = expanded) != null ? _expanded : !exists;
858
+ expanded = expanded ?? !exists;
954
859
 
955
860
  if (!exists && expanded) {
956
861
  return { ...oldExpanded,
@@ -970,15 +875,13 @@ const Expanding = {
970
875
  });
971
876
  },
972
877
  getIsExpanded: () => {
973
- var _table$options$getIsR;
974
-
975
878
  const expanded = table.getState().expanded;
976
- 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]));
879
+ return !!((table.options.getIsRowExpanded == null ? void 0 : table.options.getIsRowExpanded(row)) ?? (expanded === true || expanded != null && expanded[row.id]));
977
880
  },
978
881
  getCanExpand: () => {
979
- var _table$options$getRow, _table$options$enable, _row$subRows;
882
+ var _row$subRows;
980
883
 
981
- 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);
884
+ return (table.options.getRowCanExpand == null ? void 0 : table.options.getRowCanExpand(row)) ?? ((table.options.enableExpanding ?? true) && !!((_row$subRows = row.subRows) != null && _row$subRows.length));
982
885
  },
983
886
  getToggleExpandedHandler: () => {
984
887
  const canExpand = row.getCanExpand();
@@ -1157,19 +1060,15 @@ const Filters = {
1157
1060
  return filterFns.weakEquals;
1158
1061
  },
1159
1062
  getFilterFn: () => {
1160
- var _table$options$filter, _table$options$filter2;
1063
+ var _table$options$filter;
1161
1064
 
1162
- 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];
1065
+ 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];
1163
1066
  },
1164
1067
  getCanFilter: () => {
1165
- var _column$columnDef$ena, _table$options$enable, _table$options$enable2;
1166
-
1167
- 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;
1068
+ return (column.columnDef.enableColumnFilter ?? true) && (table.options.enableColumnFilters ?? true) && (table.options.enableFilters ?? true) && !!column.accessorFn;
1168
1069
  },
1169
1070
  getCanGlobalFilter: () => {
1170
- var _column$columnDef$ena2, _table$options$enable3, _table$options$enable4, _table$options$getCol;
1171
-
1172
- 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;
1071
+ 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;
1173
1072
  },
1174
1073
  getIsFiltered: () => column.getFilterIndex() > -1,
1175
1074
  getFilterValue: () => {
@@ -1178,9 +1077,9 @@ const Filters = {
1178
1077
  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;
1179
1078
  },
1180
1079
  getFilterIndex: () => {
1181
- var _table$getState$colum3, _table$getState$colum4;
1080
+ var _table$getState$colum3;
1182
1081
 
1183
- 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;
1082
+ return ((_table$getState$colum3 = table.getState().columnFilters) == null ? void 0 : _table$getState$colum3.findIndex(d => d.id === column.id)) ?? -1;
1184
1083
  },
1185
1084
  setFilterValue: value => {
1186
1085
  table.setColumnFilters(old => {
@@ -1189,9 +1088,7 @@ const Filters = {
1189
1088
  const newFilter = functionalUpdate(value, previousfilter ? previousfilter.value : undefined); //
1190
1089
 
1191
1090
  if (shouldAutoRemoveFilter(filterFn, newFilter, column)) {
1192
- var _old$filter;
1193
-
1194
- return (_old$filter = old == null ? void 0 : old.filter(d => d.id !== column.id)) != null ? _old$filter : [];
1091
+ return (old == null ? void 0 : old.filter(d => d.id !== column.id)) ?? [];
1195
1092
  }
1196
1093
 
1197
1094
  const newFilterObj = {
@@ -1200,15 +1097,13 @@ const Filters = {
1200
1097
  };
1201
1098
 
1202
1099
  if (previousfilter) {
1203
- var _old$map;
1204
-
1205
- return (_old$map = old == null ? void 0 : old.map(d => {
1100
+ return (old == null ? void 0 : old.map(d => {
1206
1101
  if (d.id === column.id) {
1207
1102
  return newFilterObj;
1208
1103
  }
1209
1104
 
1210
1105
  return d;
1211
- })) != null ? _old$map : [];
1106
+ })) ?? [];
1212
1107
  }
1213
1108
 
1214
1109
  if (old != null && old.length) {
@@ -1258,12 +1153,12 @@ const Filters = {
1258
1153
  return filterFns.includesString;
1259
1154
  },
1260
1155
  getGlobalFilterFn: () => {
1261
- var _table$options$filter3, _table$options$filter4;
1156
+ var _table$options$filter2;
1262
1157
 
1263
1158
  const {
1264
1159
  globalFilterFn: globalFilterFn
1265
1160
  } = table.options;
1266
- 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];
1161
+ return isFunction(globalFilterFn) ? globalFilterFn : globalFilterFn === 'auto' ? table.getGlobalAutoFilterFn() : ((_table$options$filter2 = table.options.filterFns) == null ? void 0 : _table$options$filter2[globalFilterFn]) ?? filterFns[globalFilterFn];
1267
1162
  },
1268
1163
  setColumnFilters: updater => {
1269
1164
  const leafColumns = table.getAllLeafColumns();
@@ -1295,9 +1190,9 @@ const Filters = {
1295
1190
  table.setGlobalFilter(defaultState ? undefined : table.initialState.globalFilter);
1296
1191
  },
1297
1192
  resetColumnFilters: defaultState => {
1298
- var _table$initialState$c, _table$initialState;
1193
+ var _table$initialState;
1299
1194
 
1300
- table.setColumnFilters(defaultState ? [] : (_table$initialState$c = (_table$initialState = table.initialState) == null ? void 0 : _table$initialState.columnFilters) != null ? _table$initialState$c : []);
1195
+ table.setColumnFilters(defaultState ? [] : ((_table$initialState = table.initialState) == null ? void 0 : _table$initialState.columnFilters) ?? []);
1301
1196
  },
1302
1197
  getPreFilteredRowModel: () => table.getCoreRowModel(),
1303
1198
  getFilteredRowModel: () => {
@@ -1454,9 +1349,9 @@ const Grouping = {
1454
1349
  getDefaultColumnDef: () => {
1455
1350
  return {
1456
1351
  aggregatedCell: props => {
1457
- var _toString, _props$getValue;
1352
+ var _props$getValue;
1458
1353
 
1459
- return (_toString = (_props$getValue = props.getValue()) == null ? void 0 : _props$getValue.toString == null ? void 0 : _props$getValue.toString()) != null ? _toString : null;
1354
+ return ((_props$getValue = props.getValue()) == null ? void 0 : _props$getValue.toString == null ? void 0 : _props$getValue.toString()) ?? null;
1460
1355
  },
1461
1356
  aggregationFn: 'auto'
1462
1357
  };
@@ -1482,13 +1377,11 @@ const Grouping = {
1482
1377
  return old.filter(d => d !== column.id);
1483
1378
  }
1484
1379
 
1485
- return [...(old != null ? old : []), column.id];
1380
+ return [...(old ?? []), column.id];
1486
1381
  });
1487
1382
  },
1488
1383
  getCanGroup: () => {
1489
- var _ref, _ref2, _ref3, _column$columnDef$ena;
1490
-
1491
- 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;
1384
+ return column.columnDef.enableGrouping ?? true ?? table.options.enableGrouping ?? true ?? !!column.accessorFn;
1492
1385
  },
1493
1386
  getIsGrouped: () => {
1494
1387
  var _table$getState$group;
@@ -1520,13 +1413,13 @@ const Grouping = {
1520
1413
  }
1521
1414
  },
1522
1415
  getAggregationFn: () => {
1523
- var _table$options$aggreg, _table$options$aggreg2;
1416
+ var _table$options$aggreg;
1524
1417
 
1525
1418
  if (!column) {
1526
1419
  throw new Error();
1527
1420
  }
1528
1421
 
1529
- 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];
1422
+ 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];
1530
1423
  }
1531
1424
  };
1532
1425
  },
@@ -1534,9 +1427,9 @@ const Grouping = {
1534
1427
  return {
1535
1428
  setGrouping: updater => table.options.onGroupingChange == null ? void 0 : table.options.onGroupingChange(updater),
1536
1429
  resetGrouping: defaultState => {
1537
- var _table$initialState$g, _table$initialState;
1430
+ var _table$initialState;
1538
1431
 
1539
- table.setGrouping(defaultState ? [] : (_table$initialState$g = (_table$initialState = table.initialState) == null ? void 0 : _table$initialState.grouping) != null ? _table$initialState$g : []);
1432
+ table.setGrouping(defaultState ? [] : ((_table$initialState = table.initialState) == null ? void 0 : _table$initialState.grouping) ?? []);
1540
1433
  },
1541
1434
  getPreGroupedRowModel: () => table.getFilteredRowModel(),
1542
1435
  getGroupedRowModel: () => {
@@ -1603,9 +1496,7 @@ const Ordering = {
1603
1496
  return {
1604
1497
  setColumnOrder: updater => table.options.onColumnOrderChange == null ? void 0 : table.options.onColumnOrderChange(updater),
1605
1498
  resetColumnOrder: defaultState => {
1606
- var _table$initialState$c;
1607
-
1608
- table.setColumnOrder(defaultState ? [] : (_table$initialState$c = table.initialState.columnOrder) != null ? _table$initialState$c : []);
1499
+ table.setColumnOrder(defaultState ? [] : table.initialState.columnOrder ?? []);
1609
1500
  },
1610
1501
  _getOrderColumnsFn: memo(() => [table.getState().columnOrder, table.getState().grouping, table.options.groupedColumnMode], (columnOrder, grouping, groupedColumnMode) => columns => {
1611
1502
  // Sort grouped columns to the start of the column list
@@ -1669,8 +1560,6 @@ const Pagination = {
1669
1560
  let queued = false;
1670
1561
  return {
1671
1562
  _autoResetPageIndex: () => {
1672
- var _ref, _table$options$autoRe;
1673
-
1674
1563
  if (!registered) {
1675
1564
  table._queue(() => {
1676
1565
  registered = true;
@@ -1679,7 +1568,7 @@ const Pagination = {
1679
1568
  return;
1680
1569
  }
1681
1570
 
1682
- if ((_ref = (_table$options$autoRe = table.options.autoResetAll) != null ? _table$options$autoRe : table.options.autoResetPageIndex) != null ? _ref : !table.options.manualPagination) {
1571
+ if (table.options.autoResetAll ?? table.options.autoResetPageIndex ?? !table.options.manualPagination) {
1683
1572
  if (queued) return;
1684
1573
  queued = true;
1685
1574
 
@@ -1698,9 +1587,7 @@ const Pagination = {
1698
1587
  return table.options.onPaginationChange == null ? void 0 : table.options.onPaginationChange(safeUpdater);
1699
1588
  },
1700
1589
  resetPagination: defaultState => {
1701
- var _table$initialState$p;
1702
-
1703
- table.setPagination(defaultState ? getDefaultPaginationState() : (_table$initialState$p = table.initialState.pagination) != null ? _table$initialState$p : getDefaultPaginationState());
1590
+ table.setPagination(defaultState ? getDefaultPaginationState() : table.initialState.pagination ?? getDefaultPaginationState());
1704
1591
  },
1705
1592
  setPageIndex: updater => {
1706
1593
  table.setPagination(old => {
@@ -1713,14 +1600,14 @@ const Pagination = {
1713
1600
  });
1714
1601
  },
1715
1602
  resetPageIndex: defaultState => {
1716
- var _table$initialState$p2, _table$initialState, _table$initialState$p3;
1603
+ var _table$initialState, _table$initialState$p;
1717
1604
 
1718
- 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);
1605
+ 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);
1719
1606
  },
1720
1607
  resetPageSize: defaultState => {
1721
- var _table$initialState$p4, _table$initialState2, _table$initialState2$;
1608
+ var _table$initialState2, _table$initialState2$;
1722
1609
 
1723
- 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);
1610
+ table.setPageSize(defaultState ? defaultPageSize : ((_table$initialState2 = table.initialState) == null ? void 0 : (_table$initialState2$ = _table$initialState2.pagination) == null ? void 0 : _table$initialState2$.pageSize) ?? defaultPageSize);
1724
1611
  },
1725
1612
  setPageSize: updater => {
1726
1613
  table.setPagination(old => {
@@ -1734,9 +1621,7 @@ const Pagination = {
1734
1621
  });
1735
1622
  },
1736
1623
  setPageCount: updater => table.setPagination(old => {
1737
- var _table$options$pageCo;
1738
-
1739
- let newPageCount = functionalUpdate(updater, (_table$options$pageCo = table.options.pageCount) != null ? _table$options$pageCo : -1);
1624
+ let newPageCount = functionalUpdate(updater, table.options.pageCount ?? -1);
1740
1625
 
1741
1626
  if (typeof newPageCount === 'number') {
1742
1627
  newPageCount = Math.max(-1, newPageCount);
@@ -1756,11 +1641,7 @@ const Pagination = {
1756
1641
  return pageOptions;
1757
1642
  }, {
1758
1643
  key: process.env.NODE_ENV === 'development' && 'getPageOptions',
1759
- debug: () => {
1760
- var _table$options$debugA;
1761
-
1762
- return (_table$options$debugA = table.options.debugAll) != null ? _table$options$debugA : table.options.debugTable;
1763
- }
1644
+ debug: () => table.options.debugAll ?? table.options.debugTable
1764
1645
  }),
1765
1646
  getCanPreviousPage: () => table.getState().pagination.pageIndex > 0,
1766
1647
  getCanNextPage: () => {
@@ -1800,9 +1681,7 @@ const Pagination = {
1800
1681
  return table._getPaginationRowModel();
1801
1682
  },
1802
1683
  getPageCount: () => {
1803
- var _table$options$pageCo2;
1804
-
1805
- return (_table$options$pageCo2 = table.options.pageCount) != null ? _table$options$pageCo2 : Math.ceil(table.getPrePaginationRowModel().rows.length / table.getState().pagination.pageSize);
1684
+ return table.options.pageCount ?? Math.ceil(table.getPrePaginationRowModel().rows.length / table.getState().pagination.pageSize);
1806
1685
  }
1807
1686
  };
1808
1687
  }
@@ -1831,39 +1710,29 @@ const Pinning = {
1831
1710
  pin: position => {
1832
1711
  const columnIds = column.getLeafColumns().map(d => d.id).filter(Boolean);
1833
1712
  table.setColumnPinning(old => {
1834
- var _old$left3, _old$right3;
1835
-
1836
1713
  if (position === 'right') {
1837
- var _old$left, _old$right;
1838
-
1839
1714
  return {
1840
- left: ((_old$left = old == null ? void 0 : old.left) != null ? _old$left : []).filter(d => !(columnIds != null && columnIds.includes(d))),
1841
- right: [...((_old$right = old == null ? void 0 : old.right) != null ? _old$right : []).filter(d => !(columnIds != null && columnIds.includes(d))), ...columnIds]
1715
+ left: ((old == null ? void 0 : old.left) ?? []).filter(d => !(columnIds != null && columnIds.includes(d))),
1716
+ right: [...((old == null ? void 0 : old.right) ?? []).filter(d => !(columnIds != null && columnIds.includes(d))), ...columnIds]
1842
1717
  };
1843
1718
  }
1844
1719
 
1845
1720
  if (position === 'left') {
1846
- var _old$left2, _old$right2;
1847
-
1848
1721
  return {
1849
- left: [...((_old$left2 = old == null ? void 0 : old.left) != null ? _old$left2 : []).filter(d => !(columnIds != null && columnIds.includes(d))), ...columnIds],
1850
- right: ((_old$right2 = old == null ? void 0 : old.right) != null ? _old$right2 : []).filter(d => !(columnIds != null && columnIds.includes(d)))
1722
+ left: [...((old == null ? void 0 : old.left) ?? []).filter(d => !(columnIds != null && columnIds.includes(d))), ...columnIds],
1723
+ right: ((old == null ? void 0 : old.right) ?? []).filter(d => !(columnIds != null && columnIds.includes(d)))
1851
1724
  };
1852
1725
  }
1853
1726
 
1854
1727
  return {
1855
- left: ((_old$left3 = old == null ? void 0 : old.left) != null ? _old$left3 : []).filter(d => !(columnIds != null && columnIds.includes(d))),
1856
- right: ((_old$right3 = old == null ? void 0 : old.right) != null ? _old$right3 : []).filter(d => !(columnIds != null && columnIds.includes(d)))
1728
+ left: ((old == null ? void 0 : old.left) ?? []).filter(d => !(columnIds != null && columnIds.includes(d))),
1729
+ right: ((old == null ? void 0 : old.right) ?? []).filter(d => !(columnIds != null && columnIds.includes(d)))
1857
1730
  };
1858
1731
  });
1859
1732
  },
1860
1733
  getCanPin: () => {
1861
1734
  const leafColumns = column.getLeafColumns();
1862
- return leafColumns.some(d => {
1863
- var _d$columnDef$enablePi, _table$options$enable;
1864
-
1865
- return ((_d$columnDef$enablePi = d.columnDef.enablePinning) != null ? _d$columnDef$enablePi : true) && ((_table$options$enable = table.options.enablePinning) != null ? _table$options$enable : true);
1866
- });
1735
+ return leafColumns.some(d => (d.columnDef.enablePinning ?? true) && (table.options.enablePinning ?? true));
1867
1736
  },
1868
1737
  getIsPinned: () => {
1869
1738
  const leafColumnIds = column.getLeafColumns().map(d => d.id);
@@ -1876,51 +1745,39 @@ const Pinning = {
1876
1745
  return isLeft ? 'left' : isRight ? 'right' : false;
1877
1746
  },
1878
1747
  getPinnedIndex: () => {
1879
- var _table$getState$colum, _table$getState$colum2, _table$getState$colum3;
1748
+ var _table$getState$colum, _table$getState$colum2;
1880
1749
 
1881
1750
  const position = column.getIsPinned();
1882
- 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;
1751
+ 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;
1883
1752
  }
1884
1753
  };
1885
1754
  },
1886
1755
  createRow: (row, table) => {
1887
1756
  return {
1888
1757
  getCenterVisibleCells: memo(() => [row._getAllVisibleCells(), table.getState().columnPinning.left, table.getState().columnPinning.right], (allCells, left, right) => {
1889
- const leftAndRight = [...(left != null ? left : []), ...(right != null ? right : [])];
1758
+ const leftAndRight = [...(left ?? []), ...(right ?? [])];
1890
1759
  return allCells.filter(d => !leftAndRight.includes(d.column.id));
1891
1760
  }, {
1892
1761
  key: process.env.NODE_ENV === 'production' && 'row.getCenterVisibleCells',
1893
- debug: () => {
1894
- var _table$options$debugA;
1895
-
1896
- return (_table$options$debugA = table.options.debugAll) != null ? _table$options$debugA : table.options.debugRows;
1897
- }
1762
+ debug: () => table.options.debugAll ?? table.options.debugRows
1898
1763
  }),
1899
1764
  getLeftVisibleCells: memo(() => [row._getAllVisibleCells(), table.getState().columnPinning.left,,], (allCells, left) => {
1900
- const cells = (left != null ? left : []).map(columnId => allCells.find(cell => cell.column.id === columnId)).filter(Boolean).map(d => ({ ...d,
1765
+ const cells = (left ?? []).map(columnId => allCells.find(cell => cell.column.id === columnId)).filter(Boolean).map(d => ({ ...d,
1901
1766
  position: 'left'
1902
1767
  }));
1903
1768
  return cells;
1904
1769
  }, {
1905
1770
  key: process.env.NODE_ENV === 'production' && 'row.getLeftVisibleCells',
1906
- debug: () => {
1907
- var _table$options$debugA2;
1908
-
1909
- return (_table$options$debugA2 = table.options.debugAll) != null ? _table$options$debugA2 : table.options.debugRows;
1910
- }
1771
+ debug: () => table.options.debugAll ?? table.options.debugRows
1911
1772
  }),
1912
1773
  getRightVisibleCells: memo(() => [row._getAllVisibleCells(), table.getState().columnPinning.right], (allCells, right) => {
1913
- const cells = (right != null ? right : []).map(columnId => allCells.find(cell => cell.column.id === columnId)).filter(Boolean).map(d => ({ ...d,
1774
+ const cells = (right ?? []).map(columnId => allCells.find(cell => cell.column.id === columnId)).filter(Boolean).map(d => ({ ...d,
1914
1775
  position: 'right'
1915
1776
  }));
1916
1777
  return cells;
1917
1778
  }, {
1918
1779
  key: process.env.NODE_ENV === 'production' && 'row.getRightVisibleCells',
1919
- debug: () => {
1920
- var _table$options$debugA3;
1921
-
1922
- return (_table$options$debugA3 = table.options.debugAll) != null ? _table$options$debugA3 : table.options.debugRows;
1923
- }
1780
+ debug: () => table.options.debugAll ?? table.options.debugRows
1924
1781
  })
1925
1782
  };
1926
1783
  },
@@ -1928,9 +1785,9 @@ const Pinning = {
1928
1785
  return {
1929
1786
  setColumnPinning: updater => table.options.onColumnPinningChange == null ? void 0 : table.options.onColumnPinningChange(updater),
1930
1787
  resetColumnPinning: defaultState => {
1931
- var _table$initialState$c, _table$initialState;
1788
+ var _table$initialState;
1932
1789
 
1933
- return table.setColumnPinning(defaultState ? getDefaultPinningState() : (_table$initialState$c = (_table$initialState = table.initialState) == null ? void 0 : _table$initialState.columnPinning) != null ? _table$initialState$c : getDefaultPinningState());
1790
+ return table.setColumnPinning(defaultState ? getDefaultPinningState() : ((_table$initialState = table.initialState) == null ? void 0 : _table$initialState.columnPinning) ?? getDefaultPinningState());
1934
1791
  },
1935
1792
  getIsSomeColumnsPinned: position => {
1936
1793
  var _pinningState$positio;
@@ -1946,35 +1803,23 @@ const Pinning = {
1946
1803
  return Boolean((_pinningState$positio = pinningState[position]) == null ? void 0 : _pinningState$positio.length);
1947
1804
  },
1948
1805
  getLeftLeafColumns: memo(() => [table.getAllLeafColumns(), table.getState().columnPinning.left], (allColumns, left) => {
1949
- return (left != null ? left : []).map(columnId => allColumns.find(column => column.id === columnId)).filter(Boolean);
1806
+ return (left ?? []).map(columnId => allColumns.find(column => column.id === columnId)).filter(Boolean);
1950
1807
  }, {
1951
1808
  key: process.env.NODE_ENV === 'development' && 'getLeftLeafColumns',
1952
- debug: () => {
1953
- var _table$options$debugA4;
1954
-
1955
- return (_table$options$debugA4 = table.options.debugAll) != null ? _table$options$debugA4 : table.options.debugColumns;
1956
- }
1809
+ debug: () => table.options.debugAll ?? table.options.debugColumns
1957
1810
  }),
1958
1811
  getRightLeafColumns: memo(() => [table.getAllLeafColumns(), table.getState().columnPinning.right], (allColumns, right) => {
1959
- return (right != null ? right : []).map(columnId => allColumns.find(column => column.id === columnId)).filter(Boolean);
1812
+ return (right ?? []).map(columnId => allColumns.find(column => column.id === columnId)).filter(Boolean);
1960
1813
  }, {
1961
1814
  key: process.env.NODE_ENV === 'development' && 'getRightLeafColumns',
1962
- debug: () => {
1963
- var _table$options$debugA5;
1964
-
1965
- return (_table$options$debugA5 = table.options.debugAll) != null ? _table$options$debugA5 : table.options.debugColumns;
1966
- }
1815
+ debug: () => table.options.debugAll ?? table.options.debugColumns
1967
1816
  }),
1968
1817
  getCenterLeafColumns: memo(() => [table.getAllLeafColumns(), table.getState().columnPinning.left, table.getState().columnPinning.right], (allColumns, left, right) => {
1969
- const leftAndRight = [...(left != null ? left : []), ...(right != null ? right : [])];
1818
+ const leftAndRight = [...(left ?? []), ...(right ?? [])];
1970
1819
  return allColumns.filter(d => !leftAndRight.includes(d.id));
1971
1820
  }, {
1972
1821
  key: process.env.NODE_ENV === 'development' && 'getCenterLeafColumns',
1973
- debug: () => {
1974
- var _table$options$debugA6;
1975
-
1976
- return (_table$options$debugA6 = table.options.debugAll) != null ? _table$options$debugA6 : table.options.debugColumns;
1977
- }
1822
+ debug: () => table.options.debugAll ?? table.options.debugColumns
1978
1823
  })
1979
1824
  };
1980
1825
  }
@@ -2002,11 +1847,7 @@ const RowSelection = {
2002
1847
  createTable: table => {
2003
1848
  return {
2004
1849
  setRowSelection: updater => table.options.onRowSelectionChange == null ? void 0 : table.options.onRowSelectionChange(updater),
2005
- resetRowSelection: defaultState => {
2006
- var _table$initialState$r;
2007
-
2008
- return table.setRowSelection(defaultState ? {} : (_table$initialState$r = table.initialState.rowSelection) != null ? _table$initialState$r : {});
2009
- },
1850
+ resetRowSelection: defaultState => table.setRowSelection(defaultState ? {} : table.initialState.rowSelection ?? {}),
2010
1851
  toggleAllRowsSelected: value => {
2011
1852
  table.setRowSelection(old => {
2012
1853
  value = typeof value !== 'undefined' ? value : !table.getIsAllRowsSelected();
@@ -2104,11 +1945,7 @@ const RowSelection = {
2104
1945
  return selectRowsFn(table, rowModel);
2105
1946
  }, {
2106
1947
  key: process.env.NODE_ENV === 'development' && 'getSelectedRowModel',
2107
- debug: () => {
2108
- var _table$options$debugA;
2109
-
2110
- return (_table$options$debugA = table.options.debugAll) != null ? _table$options$debugA : table.options.debugTable;
2111
- }
1948
+ debug: () => table.options.debugAll ?? table.options.debugTable
2112
1949
  }),
2113
1950
  getFilteredSelectedRowModel: memo(() => [table.getState().rowSelection, table.getFilteredRowModel()], (rowSelection, rowModel) => {
2114
1951
  if (!Object.keys(rowSelection).length) {
@@ -2122,11 +1959,7 @@ const RowSelection = {
2122
1959
  return selectRowsFn(table, rowModel);
2123
1960
  }, {
2124
1961
  key: process.env.NODE_ENV === 'production' && 'getFilteredSelectedRowModel',
2125
- debug: () => {
2126
- var _table$options$debugA2;
2127
-
2128
- return (_table$options$debugA2 = table.options.debugAll) != null ? _table$options$debugA2 : table.options.debugTable;
2129
- }
1962
+ debug: () => table.options.debugAll ?? table.options.debugTable
2130
1963
  }),
2131
1964
  getGroupedSelectedRowModel: memo(() => [table.getState().rowSelection, table.getSortedRowModel()], (rowSelection, rowModel) => {
2132
1965
  if (!Object.keys(rowSelection).length) {
@@ -2140,11 +1973,7 @@ const RowSelection = {
2140
1973
  return selectRowsFn(table, rowModel);
2141
1974
  }, {
2142
1975
  key: process.env.NODE_ENV === 'production' && 'getGroupedSelectedRowModel',
2143
- debug: () => {
2144
- var _table$options$debugA3;
2145
-
2146
- return (_table$options$debugA3 = table.options.debugAll) != null ? _table$options$debugA3 : table.options.debugTable;
2147
- }
1976
+ debug: () => table.options.debugAll ?? table.options.debugTable
2148
1977
  }),
2149
1978
  ///
2150
1979
  // getGroupingRowCanSelect: rowId => {
@@ -2186,9 +2015,7 @@ const RowSelection = {
2186
2015
  return isAllPageRowsSelected;
2187
2016
  },
2188
2017
  getIsSomeRowsSelected: () => {
2189
- var _table$getState$rowSe;
2190
-
2191
- const totalSelected = Object.keys((_table$getState$rowSe = table.getState().rowSelection) != null ? _table$getState$rowSe : {}).length;
2018
+ const totalSelected = Object.keys(table.getState().rowSelection ?? {}).length;
2192
2019
  return totalSelected > 0 && totalSelected < table.getFilteredRowModel().flatRows.length;
2193
2020
  },
2194
2021
  getIsSomePageRowsSelected: () => {
@@ -2243,31 +2070,25 @@ const RowSelection = {
2243
2070
  return isSubRowSelected(row, rowSelection) === 'all';
2244
2071
  },
2245
2072
  getCanSelect: () => {
2246
- var _table$options$enable;
2247
-
2248
2073
  if (typeof table.options.enableRowSelection === 'function') {
2249
2074
  return table.options.enableRowSelection(row);
2250
2075
  }
2251
2076
 
2252
- return (_table$options$enable = table.options.enableRowSelection) != null ? _table$options$enable : true;
2077
+ return table.options.enableRowSelection ?? true;
2253
2078
  },
2254
2079
  getCanSelectSubRows: () => {
2255
- var _table$options$enable2;
2256
-
2257
2080
  if (typeof table.options.enableSubRowSelection === 'function') {
2258
2081
  return table.options.enableSubRowSelection(row);
2259
2082
  }
2260
2083
 
2261
- return (_table$options$enable2 = table.options.enableSubRowSelection) != null ? _table$options$enable2 : true;
2084
+ return table.options.enableSubRowSelection ?? true;
2262
2085
  },
2263
2086
  getCanMultiSelect: () => {
2264
- var _table$options$enable3;
2265
-
2266
2087
  if (typeof table.options.enableMultiRowSelection === 'function') {
2267
2088
  return table.options.enableMultiRowSelection(row);
2268
2089
  }
2269
2090
 
2270
- return (_table$options$enable3 = table.options.enableMultiRowSelection) != null ? _table$options$enable3 : true;
2091
+ return table.options.enableMultiRowSelection ?? true;
2271
2092
  },
2272
2093
  getToggleSelectedHandler: () => {
2273
2094
  const canSelect = row.getCanSelect();
@@ -2345,9 +2166,7 @@ function selectRowsFn(table, rowModel) {
2345
2166
  };
2346
2167
  }
2347
2168
  function isRowSelected(row, selection) {
2348
- var _selection$row$id;
2349
-
2350
- return (_selection$row$id = selection[row.id]) != null ? _selection$row$id : false;
2169
+ return selection[row.id] ?? false;
2351
2170
  }
2352
2171
  function isSubRowSelected(row, selection, table) {
2353
2172
  if (row.subRows && row.subRows.length) {
@@ -2543,13 +2362,13 @@ const Sorting = {
2543
2362
  return 'desc';
2544
2363
  },
2545
2364
  getSortingFn: () => {
2546
- var _table$options$sortin, _table$options$sortin2;
2365
+ var _table$options$sortin;
2547
2366
 
2548
2367
  if (!column) {
2549
2368
  throw new Error();
2550
2369
  }
2551
2370
 
2552
- 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];
2371
+ 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];
2553
2372
  },
2554
2373
  toggleSorting: (desc, multi) => {
2555
2374
  // if (column.columns.length) {
@@ -2601,14 +2420,12 @@ const Sorting = {
2601
2420
  }
2602
2421
 
2603
2422
  if (sortAction === 'add') {
2604
- var _table$options$maxMul;
2605
-
2606
2423
  newSorting = [...old, {
2607
2424
  id: column.id,
2608
2425
  desc: nextDesc
2609
2426
  }]; // Take latest n columns
2610
2427
 
2611
- newSorting.splice(0, newSorting.length - ((_table$options$maxMul = table.options.maxMultiSortColCount) != null ? _table$options$maxMul : Number.MAX_SAFE_INTEGER));
2428
+ newSorting.splice(0, newSorting.length - (table.options.maxMultiSortColCount ?? Number.MAX_SAFE_INTEGER));
2612
2429
  } else if (sortAction === 'toggle') {
2613
2430
  // This flips (or sets) the
2614
2431
  newSorting = old.map(d => {
@@ -2633,14 +2450,10 @@ const Sorting = {
2633
2450
  });
2634
2451
  },
2635
2452
  getFirstSortDir: () => {
2636
- var _ref, _column$columnDef$sor;
2637
-
2638
- const sortDescFirst = (_ref = (_column$columnDef$sor = column.columnDef.sortDescFirst) != null ? _column$columnDef$sor : table.options.sortDescFirst) != null ? _ref : column.getAutoSortDir() === 'desc';
2453
+ const sortDescFirst = column.columnDef.sortDescFirst ?? table.options.sortDescFirst ?? column.getAutoSortDir() === 'desc';
2639
2454
  return sortDescFirst ? 'desc' : 'asc';
2640
2455
  },
2641
2456
  getNextSortingOrder: multi => {
2642
- var _table$options$enable, _table$options$enable2;
2643
-
2644
2457
  const firstSortDirection = column.getFirstSortDir();
2645
2458
  const isSorted = column.getIsSorted();
2646
2459
 
@@ -2648,8 +2461,8 @@ const Sorting = {
2648
2461
  return firstSortDirection;
2649
2462
  }
2650
2463
 
2651
- if (isSorted !== firstSortDirection && ((_table$options$enable = table.options.enableSortingRemoval) != null ? _table$options$enable : true) && ( // If enableSortRemove, enable in general
2652
- multi ? (_table$options$enable2 = table.options.enableMultiRemove) != null ? _table$options$enable2 : true : true) // If multi, don't allow if enableMultiRemove))
2464
+ if (isSorted !== firstSortDirection && (table.options.enableSortingRemoval ?? true) && ( // If enableSortRemove, enable in general
2465
+ multi ? table.options.enableMultiRemove ?? true : true) // If multi, don't allow if enableMultiRemove))
2653
2466
  ) {
2654
2467
  return false;
2655
2468
  }
@@ -2657,14 +2470,10 @@ const Sorting = {
2657
2470
  return isSorted === 'desc' ? 'asc' : 'desc';
2658
2471
  },
2659
2472
  getCanSort: () => {
2660
- var _column$columnDef$ena, _table$options$enable3;
2661
-
2662
- 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;
2473
+ return (column.columnDef.enableSorting ?? true) && (table.options.enableSorting ?? true) && !!column.accessorFn;
2663
2474
  },
2664
2475
  getCanMultiSort: () => {
2665
- var _ref2, _column$columnDef$ena2;
2666
-
2667
- return (_ref2 = (_column$columnDef$ena2 = column.columnDef.enableMultiSort) != null ? _column$columnDef$ena2 : table.options.enableMultiSort) != null ? _ref2 : !!column.accessorFn;
2476
+ return column.columnDef.enableMultiSort ?? table.options.enableMultiSort ?? !!column.accessorFn;
2668
2477
  },
2669
2478
  getIsSorted: () => {
2670
2479
  var _table$getState$sorti;
@@ -2673,9 +2482,9 @@ const Sorting = {
2673
2482
  return !columnSort ? false : columnSort.desc ? 'desc' : 'asc';
2674
2483
  },
2675
2484
  getSortIndex: () => {
2676
- var _table$getState$sorti2, _table$getState$sorti3;
2485
+ var _table$getState$sorti2;
2677
2486
 
2678
- 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;
2487
+ return ((_table$getState$sorti2 = table.getState().sorting) == null ? void 0 : _table$getState$sorti2.findIndex(d => d.id === column.id)) ?? -1;
2679
2488
  },
2680
2489
  clearSorting: () => {
2681
2490
  //clear sorting for just 1 column
@@ -2695,9 +2504,9 @@ const Sorting = {
2695
2504
  return {
2696
2505
  setSorting: updater => table.options.onSortingChange == null ? void 0 : table.options.onSortingChange(updater),
2697
2506
  resetSorting: defaultState => {
2698
- var _table$initialState$s, _table$initialState;
2507
+ var _table$initialState;
2699
2508
 
2700
- table.setSorting(defaultState ? [] : (_table$initialState$s = (_table$initialState = table.initialState) == null ? void 0 : _table$initialState.sorting) != null ? _table$initialState$s : []);
2509
+ table.setSorting(defaultState ? [] : ((_table$initialState = table.initialState) == null ? void 0 : _table$initialState.sorting) ?? []);
2701
2510
  },
2702
2511
  getPreSortedRowModel: () => table.getGroupedRowModel(),
2703
2512
  getSortedRowModel: () => {
@@ -2733,19 +2542,17 @@ const Visibility = {
2733
2542
  toggleVisibility: value => {
2734
2543
  if (column.getCanHide()) {
2735
2544
  table.setColumnVisibility(old => ({ ...old,
2736
- [column.id]: value != null ? value : !column.getIsVisible()
2545
+ [column.id]: value ?? !column.getIsVisible()
2737
2546
  }));
2738
2547
  }
2739
2548
  },
2740
2549
  getIsVisible: () => {
2741
- var _table$getState$colum, _table$getState$colum2;
2550
+ var _table$getState$colum;
2742
2551
 
2743
- return (_table$getState$colum = (_table$getState$colum2 = table.getState().columnVisibility) == null ? void 0 : _table$getState$colum2[column.id]) != null ? _table$getState$colum : true;
2552
+ return ((_table$getState$colum = table.getState().columnVisibility) == null ? void 0 : _table$getState$colum[column.id]) ?? true;
2744
2553
  },
2745
2554
  getCanHide: () => {
2746
- var _column$columnDef$ena, _table$options$enable;
2747
-
2748
- return ((_column$columnDef$ena = column.columnDef.enableHiding) != null ? _column$columnDef$ena : true) && ((_table$options$enable = table.options.enableHiding) != null ? _table$options$enable : true);
2555
+ return (column.columnDef.enableHiding ?? true) && (table.options.enableHiding ?? true);
2749
2556
  },
2750
2557
  getToggleVisibilityHandler: () => {
2751
2558
  return e => {
@@ -2760,19 +2567,11 @@ const Visibility = {
2760
2567
  return cells.filter(cell => cell.column.getIsVisible());
2761
2568
  }, {
2762
2569
  key: process.env.NODE_ENV === 'production' && 'row._getAllVisibleCells',
2763
- debug: () => {
2764
- var _table$options$debugA;
2765
-
2766
- return (_table$options$debugA = table.options.debugAll) != null ? _table$options$debugA : table.options.debugRows;
2767
- }
2570
+ debug: () => table.options.debugAll ?? table.options.debugRows
2768
2571
  }),
2769
2572
  getVisibleCells: memo(() => [row.getLeftVisibleCells(), row.getCenterVisibleCells(), row.getRightVisibleCells()], (left, center, right) => [...left, ...center, ...right], {
2770
2573
  key: process.env.NODE_ENV === 'development' && 'row.getVisibleCells',
2771
- debug: () => {
2772
- var _table$options$debugA2;
2773
-
2774
- return (_table$options$debugA2 = table.options.debugAll) != null ? _table$options$debugA2 : table.options.debugRows;
2775
- }
2574
+ debug: () => table.options.debugAll ?? table.options.debugRows
2776
2575
  })
2777
2576
  };
2778
2577
  },
@@ -2782,11 +2581,7 @@ const Visibility = {
2782
2581
  return columns.filter(d => d.getIsVisible == null ? void 0 : d.getIsVisible());
2783
2582
  }, {
2784
2583
  key,
2785
- debug: () => {
2786
- var _table$options$debugA3;
2787
-
2788
- return (_table$options$debugA3 = table.options.debugAll) != null ? _table$options$debugA3 : table.options.debugColumns;
2789
- }
2584
+ debug: () => table.options.debugAll ?? table.options.debugColumns
2790
2585
  });
2791
2586
  };
2792
2587
 
@@ -2798,14 +2593,10 @@ const Visibility = {
2798
2593
  getCenterVisibleLeafColumns: makeVisibleColumnsMethod('getCenterVisibleLeafColumns', () => table.getCenterLeafColumns()),
2799
2594
  setColumnVisibility: updater => table.options.onColumnVisibilityChange == null ? void 0 : table.options.onColumnVisibilityChange(updater),
2800
2595
  resetColumnVisibility: defaultState => {
2801
- var _table$initialState$c;
2802
-
2803
- table.setColumnVisibility(defaultState ? {} : (_table$initialState$c = table.initialState.columnVisibility) != null ? _table$initialState$c : {});
2596
+ table.setColumnVisibility(defaultState ? {} : table.initialState.columnVisibility ?? {});
2804
2597
  },
2805
2598
  toggleAllColumnsVisible: value => {
2806
- var _value;
2807
-
2808
- value = (_value = value) != null ? _value : !table.getIsAllColumnsVisible();
2599
+ value = value ?? !table.getIsAllColumnsVisible();
2809
2600
  table.setColumnVisibility(table.getAllLeafColumns().reduce((obj, column) => ({ ...obj,
2810
2601
  [column.id]: !value ? !(column.getCanHide != null && column.getCanHide()) : value
2811
2602
  }), {}));
@@ -2826,8 +2617,6 @@ const Visibility = {
2826
2617
  const features = [Headers, Visibility, Ordering, Pinning, Filters, Sorting, Grouping, Expanding, Pagination, RowSelection, ColumnSizing]; //
2827
2618
 
2828
2619
  function createTable(options) {
2829
- var _options$initialState;
2830
-
2831
2620
  if (options.debugAll || options.debugTable) {
2832
2621
  console.info('Creating Table Instance...');
2833
2622
  }
@@ -2852,13 +2641,11 @@ function createTable(options) {
2852
2641
 
2853
2642
  const coreInitialState = {};
2854
2643
  let initialState = { ...coreInitialState,
2855
- ...((_options$initialState = options.initialState) != null ? _options$initialState : {})
2644
+ ...(options.initialState ?? {})
2856
2645
  };
2857
2646
 
2858
2647
  table._features.forEach(feature => {
2859
- var _feature$getInitialSt;
2860
-
2861
- initialState = (_feature$getInitialSt = feature.getInitialState == null ? void 0 : feature.getInitialState(initialState)) != null ? _feature$getInitialSt : initialState;
2648
+ initialState = (feature.getInitialState == null ? void 0 : feature.getInitialState(initialState)) ?? initialState;
2862
2649
  });
2863
2650
 
2864
2651
  const queued = [];
@@ -2900,11 +2687,7 @@ function createTable(options) {
2900
2687
  setState: updater => {
2901
2688
  table.options.onStateChange == null ? void 0 : table.options.onStateChange(updater);
2902
2689
  },
2903
- _getRowId: (row, index, parent) => {
2904
- var _table$options$getRow;
2905
-
2906
- 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);
2907
- },
2690
+ _getRowId: (row, index, parent) => (table.options.getRowId == null ? void 0 : table.options.getRowId(row, index, parent)) ?? `${parent ? [parent.id, index].join('.') : index}`,
2908
2691
  getCoreRowModel: () => {
2909
2692
  if (!table._getCoreRowModel) {
2910
2693
  table._getCoreRowModel = table.options.getCoreRowModel(table);
@@ -2922,7 +2705,7 @@ function createTable(options) {
2922
2705
 
2923
2706
  if (!row) {
2924
2707
  if (process.env.NODE_ENV !== 'production') {
2925
- throw new Error("getRow expected an ID, but got " + id);
2708
+ throw new Error(`getRow expected an ID, but got ${id}`);
2926
2709
  }
2927
2710
 
2928
2711
  throw new Error();
@@ -2931,9 +2714,7 @@ function createTable(options) {
2931
2714
  return row;
2932
2715
  },
2933
2716
  _getDefaultColumnDef: memo(() => [table.options.defaultColumn], defaultColumn => {
2934
- var _defaultColumn;
2935
-
2936
- defaultColumn = (_defaultColumn = defaultColumn) != null ? _defaultColumn : {};
2717
+ defaultColumn = defaultColumn ?? {};
2937
2718
  return {
2938
2719
  header: props => {
2939
2720
  const resolvedColumnDef = props.header.column.columnDef;
@@ -2950,9 +2731,9 @@ function createTable(options) {
2950
2731
  },
2951
2732
  // footer: props => props.header.column.id,
2952
2733
  cell: props => {
2953
- var _props$renderValue$to, _props$renderValue;
2734
+ var _props$renderValue;
2954
2735
 
2955
- 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;
2736
+ return ((_props$renderValue = props.renderValue()) == null ? void 0 : _props$renderValue.toString == null ? void 0 : _props$renderValue.toString()) ?? null;
2956
2737
  },
2957
2738
  ...table._features.reduce((obj, feature) => {
2958
2739
  return Object.assign(obj, feature.getDefaultColumnDef == null ? void 0 : feature.getDefaultColumnDef());
@@ -2960,11 +2741,7 @@ function createTable(options) {
2960
2741
  ...defaultColumn
2961
2742
  };
2962
2743
  }, {
2963
- debug: () => {
2964
- var _table$options$debugA;
2965
-
2966
- return (_table$options$debugA = table.options.debugAll) != null ? _table$options$debugA : table.options.debugColumns;
2967
- },
2744
+ debug: () => table.options.debugAll ?? table.options.debugColumns,
2968
2745
  key: process.env.NODE_ENV === 'development' && 'getDefaultColumnDef'
2969
2746
  }),
2970
2747
  _getColumnDefs: () => table.options.columns,
@@ -2985,11 +2762,7 @@ function createTable(options) {
2985
2762
  return recurseColumns(columnDefs);
2986
2763
  }, {
2987
2764
  key: process.env.NODE_ENV === 'development' && 'getAllColumns',
2988
- debug: () => {
2989
- var _table$options$debugA2;
2990
-
2991
- return (_table$options$debugA2 = table.options.debugAll) != null ? _table$options$debugA2 : table.options.debugColumns;
2992
- }
2765
+ debug: () => table.options.debugAll ?? table.options.debugColumns
2993
2766
  }),
2994
2767
  getAllFlatColumns: memo(() => [table.getAllColumns()], allColumns => {
2995
2768
  return allColumns.flatMap(column => {
@@ -2997,11 +2770,7 @@ function createTable(options) {
2997
2770
  });
2998
2771
  }, {
2999
2772
  key: process.env.NODE_ENV === 'development' && 'getAllFlatColumns',
3000
- debug: () => {
3001
- var _table$options$debugA3;
3002
-
3003
- return (_table$options$debugA3 = table.options.debugAll) != null ? _table$options$debugA3 : table.options.debugColumns;
3004
- }
2773
+ debug: () => table.options.debugAll ?? table.options.debugColumns
3005
2774
  }),
3006
2775
  _getAllFlatColumnsById: memo(() => [table.getAllFlatColumns()], flatColumns => {
3007
2776
  return flatColumns.reduce((acc, column) => {
@@ -3010,29 +2779,21 @@ function createTable(options) {
3010
2779
  }, {});
3011
2780
  }, {
3012
2781
  key: process.env.NODE_ENV === 'development' && 'getAllFlatColumnsById',
3013
- debug: () => {
3014
- var _table$options$debugA4;
3015
-
3016
- return (_table$options$debugA4 = table.options.debugAll) != null ? _table$options$debugA4 : table.options.debugColumns;
3017
- }
2782
+ debug: () => table.options.debugAll ?? table.options.debugColumns
3018
2783
  }),
3019
2784
  getAllLeafColumns: memo(() => [table.getAllColumns(), table._getOrderColumnsFn()], (allColumns, orderColumns) => {
3020
2785
  let leafColumns = allColumns.flatMap(column => column.getLeafColumns());
3021
2786
  return orderColumns(leafColumns);
3022
2787
  }, {
3023
2788
  key: process.env.NODE_ENV === 'development' && 'getAllLeafColumns',
3024
- debug: () => {
3025
- var _table$options$debugA5;
3026
-
3027
- return (_table$options$debugA5 = table.options.debugAll) != null ? _table$options$debugA5 : table.options.debugColumns;
3028
- }
2789
+ debug: () => table.options.debugAll ?? table.options.debugColumns
3029
2790
  }),
3030
2791
  getColumn: columnId => {
3031
2792
  const column = table._getAllFlatColumnsById()[columnId];
3032
2793
 
3033
2794
  if (!column) {
3034
2795
  if (process.env.NODE_ENV !== 'production') {
3035
- console.warn("[Table] Column with id " + columnId + " does not exist.");
2796
+ console.warn(`[Table] Column with id ${columnId} does not exist.`);
3036
2797
  }
3037
2798
 
3038
2799
  throw new Error();
@@ -3051,14 +2812,10 @@ function createTable(options) {
3051
2812
  }
3052
2813
 
3053
2814
  function createCell(table, row, column, columnId) {
3054
- const getRenderValue = () => {
3055
- var _cell$getValue;
3056
-
3057
- return (_cell$getValue = cell.getValue()) != null ? _cell$getValue : table.options.renderFallbackValue;
3058
- };
2815
+ const getRenderValue = () => cell.getValue() ?? table.options.renderFallbackValue;
3059
2816
 
3060
2817
  const cell = {
3061
- id: row.id + "_" + column.id,
2818
+ id: `${row.id}_${column.id}`,
3062
2819
  row,
3063
2820
  column,
3064
2821
  getValue: () => row.getValue(columnId),
@@ -3104,12 +2861,8 @@ const createRow = (table, id, original, rowIndex, depth, subRows) => {
3104
2861
  row._valuesCache[columnId] = column.accessorFn(row.original, rowIndex);
3105
2862
  return row._valuesCache[columnId];
3106
2863
  },
3107
- renderValue: columnId => {
3108
- var _row$getValue;
3109
-
3110
- return (_row$getValue = row.getValue(columnId)) != null ? _row$getValue : table.options.renderFallbackValue;
3111
- },
3112
- subRows: subRows != null ? subRows : [],
2864
+ renderValue: columnId => row.getValue(columnId) ?? table.options.renderFallbackValue,
2865
+ subRows: subRows ?? [],
3113
2866
  getLeafRows: () => flattenBy(row.subRows, d => d.subRows),
3114
2867
  getAllCells: memo(() => [table.getAllLeafColumns()], leafColumns => {
3115
2868
  return leafColumns.map(column => {
@@ -3117,11 +2870,7 @@ const createRow = (table, id, original, rowIndex, depth, subRows) => {
3117
2870
  });
3118
2871
  }, {
3119
2872
  key: process.env.NODE_ENV === 'development' && 'row.getAllCells',
3120
- debug: () => {
3121
- var _table$options$debugA;
3122
-
3123
- return (_table$options$debugA = table.options.debugAll) != null ? _table$options$debugA : table.options.debugRows;
3124
- }
2873
+ debug: () => table.options.debugAll ?? table.options.debugRows
3125
2874
  }),
3126
2875
  _getAllCellsByColumnId: memo(() => [row.getAllCells()], allCells => {
3127
2876
  return allCells.reduce((acc, cell) => {
@@ -3130,11 +2879,7 @@ const createRow = (table, id, original, rowIndex, depth, subRows) => {
3130
2879
  }, {});
3131
2880
  }, {
3132
2881
  key: process.env.NODE_ENV === 'production' && 'row.getAllCellsByColumnId',
3133
- debug: () => {
3134
- var _table$options$debugA2;
3135
-
3136
- return (_table$options$debugA2 = table.options.debugAll) != null ? _table$options$debugA2 : table.options.debugRows;
3137
- }
2882
+ debug: () => table.options.debugAll ?? table.options.debugRows
3138
2883
  })
3139
2884
  };
3140
2885
 
@@ -3244,11 +2989,7 @@ function getCoreRowModel() {
3244
2989
  return rowModel;
3245
2990
  }, {
3246
2991
  key: process.env.NODE_ENV === 'development' && 'getRowModel',
3247
- debug: () => {
3248
- var _table$options$debugA;
3249
-
3250
- return (_table$options$debugA = table.options.debugAll) != null ? _table$options$debugA : table.options.debugTable;
3251
- },
2992
+ debug: () => table.options.debugAll ?? table.options.debugTable,
3252
2993
  onChange: () => {
3253
2994
  table._autoResetPageIndex();
3254
2995
  }
@@ -3354,14 +3095,12 @@ function getFilteredRowModel() {
3354
3095
 
3355
3096
  const resolvedColumnFilters = [];
3356
3097
  const resolvedGlobalFilters = [];
3357
- (columnFilters != null ? columnFilters : []).forEach(d => {
3358
- var _filterFn$resolveFilt;
3359
-
3098
+ (columnFilters ?? []).forEach(d => {
3360
3099
  const column = table.getColumn(d.id);
3361
3100
 
3362
3101
  if (!column) {
3363
3102
  if (process.env.NODE_ENV !== 'production') {
3364
- console.warn("Table: Could not find a column to filter with columnId: " + d.id);
3103
+ console.warn(`Table: Could not find a column to filter with columnId: ${d.id}`);
3365
3104
  }
3366
3105
  }
3367
3106
 
@@ -3369,7 +3108,7 @@ function getFilteredRowModel() {
3369
3108
 
3370
3109
  if (!filterFn) {
3371
3110
  if (process.env.NODE_ENV !== 'production') {
3372
- console.warn("Could not find a valid 'column.filterFn' for column with the ID: " + column.id + ".");
3111
+ console.warn(`Could not find a valid 'column.filterFn' for column with the ID: ${column.id}.`);
3373
3112
  }
3374
3113
 
3375
3114
  return;
@@ -3378,7 +3117,7 @@ function getFilteredRowModel() {
3378
3117
  resolvedColumnFilters.push({
3379
3118
  id: d.id,
3380
3119
  filterFn,
3381
- resolvedValue: (_filterFn$resolveFilt = filterFn.resolveFilterValue == null ? void 0 : filterFn.resolveFilterValue(d.value)) != null ? _filterFn$resolveFilt : d.value
3120
+ resolvedValue: (filterFn.resolveFilterValue == null ? void 0 : filterFn.resolveFilterValue(d.value)) ?? d.value
3382
3121
  });
3383
3122
  });
3384
3123
  const filterableIds = columnFilters.map(d => d.id);
@@ -3388,12 +3127,10 @@ function getFilteredRowModel() {
3388
3127
  if (globalFilter && globalFilterFn && globallyFilterableColumns.length) {
3389
3128
  filterableIds.push('__global__');
3390
3129
  globallyFilterableColumns.forEach(column => {
3391
- var _globalFilterFn$resol;
3392
-
3393
3130
  resolvedGlobalFilters.push({
3394
3131
  id: column.id,
3395
3132
  filterFn: globalFilterFn,
3396
- resolvedValue: (_globalFilterFn$resol = globalFilterFn.resolveFilterValue == null ? void 0 : globalFilterFn.resolveFilterValue(globalFilter)) != null ? _globalFilterFn$resol : globalFilter
3133
+ resolvedValue: (globalFilterFn.resolveFilterValue == null ? void 0 : globalFilterFn.resolveFilterValue(globalFilter)) ?? globalFilter
3397
3134
  });
3398
3135
  });
3399
3136
  }
@@ -3450,11 +3187,7 @@ function getFilteredRowModel() {
3450
3187
  return filterRows(rowModel.rows, filterRowsImpl, table);
3451
3188
  }, {
3452
3189
  key: process.env.NODE_ENV === 'development' && 'getFilteredRowModel',
3453
- debug: () => {
3454
- var _table$options$debugA;
3455
-
3456
- return (_table$options$debugA = table.options.debugAll) != null ? _table$options$debugA : table.options.debugTable;
3457
- },
3190
+ debug: () => table.options.debugAll ?? table.options.debugTable,
3458
3191
  onChange: () => {
3459
3192
  table._autoResetPageIndex();
3460
3193
  }
@@ -3483,11 +3216,7 @@ function getFacetedRowModel() {
3483
3216
  return filterRows(preRowModel.rows, filterRowsImpl, table);
3484
3217
  }, {
3485
3218
  key: process.env.NODE_ENV === 'development' && 'getFacetedRowModel_' + columnId,
3486
- debug: () => {
3487
- var _table$options$debugA;
3488
-
3489
- return (_table$options$debugA = table.options.debugAll) != null ? _table$options$debugA : table.options.debugTable;
3490
- },
3219
+ debug: () => table.options.debugAll ?? table.options.debugTable,
3491
3220
  onChange: () => {}
3492
3221
  });
3493
3222
  }
@@ -3502,9 +3231,7 @@ function getFacetedUniqueValues() {
3502
3231
  const value = (_facetedRowModel$flat = facetedRowModel.flatRows[i]) == null ? void 0 : _facetedRowModel$flat.getValue(columnId);
3503
3232
 
3504
3233
  if (facetedUniqueValues.has(value)) {
3505
- var _facetedUniqueValues$;
3506
-
3507
- facetedUniqueValues.set(value, ((_facetedUniqueValues$ = facetedUniqueValues.get(value)) != null ? _facetedUniqueValues$ : 0) + 1);
3234
+ facetedUniqueValues.set(value, (facetedUniqueValues.get(value) ?? 0) + 1);
3508
3235
  } else {
3509
3236
  facetedUniqueValues.set(value, 1);
3510
3237
  }
@@ -3513,11 +3240,7 @@ function getFacetedUniqueValues() {
3513
3240
  return facetedUniqueValues;
3514
3241
  }, {
3515
3242
  key: process.env.NODE_ENV === 'development' && 'getFacetedUniqueValues_' + columnId,
3516
- debug: () => {
3517
- var _table$options$debugA;
3518
-
3519
- return (_table$options$debugA = table.options.debugAll) != null ? _table$options$debugA : table.options.debugTable;
3520
- },
3243
+ debug: () => table.options.debugAll ?? table.options.debugTable,
3521
3244
  onChange: () => {}
3522
3245
  });
3523
3246
  }
@@ -3547,11 +3270,7 @@ function getFacetedMinMaxValues() {
3547
3270
  return facetedMinMaxValues;
3548
3271
  }, {
3549
3272
  key: process.env.NODE_ENV === 'development' && 'getFacetedMinMaxValues_' + columnId,
3550
- debug: () => {
3551
- var _table$options$debugA;
3552
-
3553
- return (_table$options$debugA = table.options.debugAll) != null ? _table$options$debugA : table.options.debugTable;
3554
- },
3273
+ debug: () => table.options.debugAll ?? table.options.debugTable,
3555
3274
  onChange: () => {}
3556
3275
  });
3557
3276
  }
@@ -3582,11 +3301,9 @@ function getSortedRowModel() {
3582
3301
  const sortedData = rows.slice();
3583
3302
  sortedData.sort((rowA, rowB) => {
3584
3303
  for (let i = 0; i < availableSorting.length; i += 1) {
3585
- var _sortEntry$desc;
3586
-
3587
3304
  const sortEntry = availableSorting[i];
3588
3305
  const columnInfo = columnInfoById[sortEntry.id];
3589
- const isDesc = (_sortEntry$desc = sortEntry == null ? void 0 : sortEntry.desc) != null ? _sortEntry$desc : false;
3306
+ const isDesc = (sortEntry == null ? void 0 : sortEntry.desc) ?? false;
3590
3307
 
3591
3308
  if (columnInfo.sortUndefined) {
3592
3309
  const aValue = rowA.getValue(sortEntry.id);
@@ -3637,11 +3354,7 @@ function getSortedRowModel() {
3637
3354
  };
3638
3355
  }, {
3639
3356
  key: process.env.NODE_ENV === 'development' && 'getSortedRowModel',
3640
- debug: () => {
3641
- var _table$options$debugA;
3642
-
3643
- return (_table$options$debugA = table.options.debugAll) != null ? _table$options$debugA : table.options.debugTable;
3644
- },
3357
+ debug: () => table.options.debugAll ?? table.options.debugTable,
3645
3358
  onChange: () => {
3646
3359
  table._autoResetPageIndex();
3647
3360
  }
@@ -3690,8 +3403,8 @@ function getGroupedRowModel() {
3690
3403
 
3691
3404
  const aggregatedGroupedRows = Array.from(rowGroupsMap.entries()).map((_ref, index) => {
3692
3405
  let [groupingValue, groupedRows] = _ref;
3693
- let id = columnId + ":" + groupingValue;
3694
- id = parentId ? parentId + ">" + id : id; // First, Recurse to group sub rows before aggregation
3406
+ let id = `${columnId}:${groupingValue}`;
3407
+ id = parentId ? `${parentId}>${id}` : id; // First, Recurse to group sub rows before aggregation
3695
3408
 
3696
3409
  const subRows = groupUpRecursively(groupedRows, depth + 1, id); // Flatten the leaf rows of the rows in this group
3697
3410
 
@@ -3710,9 +3423,7 @@ function getGroupedRowModel() {
3710
3423
  }
3711
3424
 
3712
3425
  if (groupedRows[0]) {
3713
- var _groupedRows$0$getVal;
3714
-
3715
- row._valuesCache[columnId] = (_groupedRows$0$getVal = groupedRows[0].getValue(columnId)) != null ? _groupedRows$0$getVal : undefined;
3426
+ row._valuesCache[columnId] = groupedRows[0].getValue(columnId) ?? undefined;
3716
3427
  }
3717
3428
 
3718
3429
  return row._valuesCache[columnId];
@@ -3765,11 +3476,7 @@ function getGroupedRowModel() {
3765
3476
  };
3766
3477
  }, {
3767
3478
  key: process.env.NODE_ENV === 'development' && 'getGroupedRowModel',
3768
- debug: () => {
3769
- var _table$options$debugA;
3770
-
3771
- return (_table$options$debugA = table.options.debugAll) != null ? _table$options$debugA : table.options.debugTable;
3772
- },
3479
+ debug: () => table.options.debugAll ?? table.options.debugTable,
3773
3480
  onChange: () => {
3774
3481
  table._queue(() => {
3775
3482
  table._autoResetExpanded();
@@ -3783,7 +3490,7 @@ function getGroupedRowModel() {
3783
3490
  function groupBy(rows, columnId) {
3784
3491
  const groupMap = new Map();
3785
3492
  return rows.reduce((map, row) => {
3786
- const resKey = "" + row.getValue(columnId);
3493
+ const resKey = `${row.getValue(columnId)}`;
3787
3494
  const previous = map.get(resKey);
3788
3495
 
3789
3496
  if (!previous) {
@@ -3798,7 +3505,7 @@ function groupBy(rows, columnId) {
3798
3505
 
3799
3506
  function getExpandedRowModel() {
3800
3507
  return table => memo(() => [table.getState().expanded, table.getPreExpandedRowModel(), table.options.paginateExpandedRows], (expanded, rowModel, paginateExpandedRows) => {
3801
- if (!rowModel.rows.length || expanded !== true && !Object.keys(expanded != null ? expanded : {}).length) {
3508
+ if (!rowModel.rows.length || expanded !== true && !Object.keys(expanded ?? {}).length) {
3802
3509
  return rowModel;
3803
3510
  }
3804
3511
 
@@ -3810,11 +3517,7 @@ function getExpandedRowModel() {
3810
3517
  return expandRows(rowModel);
3811
3518
  }, {
3812
3519
  key: process.env.NODE_ENV === 'development' && 'getExpandedRowModel',
3813
- debug: () => {
3814
- var _table$options$debugA;
3815
-
3816
- return (_table$options$debugA = table.options.debugAll) != null ? _table$options$debugA : table.options.debugTable;
3817
- }
3520
+ debug: () => table.options.debugAll ?? table.options.debugTable
3818
3521
  });
3819
3522
  }
3820
3523
  function expandRows(rowModel) {
@@ -3886,11 +3589,7 @@ function getPaginationRowModel(opts) {
3886
3589
  return paginatedRowModel;
3887
3590
  }, {
3888
3591
  key: process.env.NODE_ENV === 'development' && 'getPaginationRowModel',
3889
- debug: () => {
3890
- var _table$options$debugA;
3891
-
3892
- return (_table$options$debugA = table.options.debugAll) != null ? _table$options$debugA : table.options.debugTable;
3893
- }
3592
+ debug: () => table.options.debugAll ?? table.options.debugTable
3894
3593
  });
3895
3594
  }
3896
3595