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