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