@tanstack/react-table 8.0.0-alpha.1 → 8.0.0-alpha.2

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.
@@ -649,12 +649,12 @@ var expandRowsFn = function expandRowsFn(instance, _expandedState, sortedRowMode
649
649
  };
650
650
 
651
651
  //
652
- function getInitialState$6() {
652
+ function getInitialState$7() {
653
653
  return {
654
654
  columnVisibility: {}
655
655
  };
656
656
  }
657
- function getDefaultOptions$6(instance) {
657
+ function getDefaultOptions$7(instance) {
658
658
  return {
659
659
  onColumnVisibilityChange: makeStateUpdater('columnVisibility', instance)
660
660
  };
@@ -664,7 +664,7 @@ function getDefaultColumn$3() {
664
664
  defaultIsVisible: true
665
665
  };
666
666
  }
667
- function createColumn$4(column, instance) {
667
+ function createColumn$5(column, instance) {
668
668
  return {
669
669
  getCanHide: function getCanHide() {
670
670
  return instance.getColumnCanHide(column.id);
@@ -688,7 +688,7 @@ function createColumn$4(column, instance) {
688
688
  }
689
689
  };
690
690
  }
691
- function getInstance$7(instance) {
691
+ function getInstance$8(instance) {
692
692
  return {
693
693
  getVisibleFlatColumns: memo(function () {
694
694
  return [instance.getAllFlatColumns(), instance.getAllFlatColumns().filter(function (d) {
@@ -903,19 +903,19 @@ function getDefaultColumn$2() {
903
903
  aggregationType: 'auto'
904
904
  };
905
905
  }
906
- function getInitialState$5() {
906
+ function getInitialState$6() {
907
907
  return {
908
908
  grouping: []
909
909
  };
910
910
  }
911
- function getDefaultOptions$5(instance) {
911
+ function getDefaultOptions$6(instance) {
912
912
  return {
913
913
  onGroupingChange: makeStateUpdater('grouping', instance),
914
914
  autoResetGrouping: true,
915
915
  groupedColumnMode: 'reorder'
916
916
  };
917
917
  }
918
- function createColumn$3(column, instance) {
918
+ function createColumn$4(column, instance) {
919
919
  return {
920
920
  aggregationType: column.aggregationType,
921
921
  getCanGroup: function getCanGroup() {
@@ -935,7 +935,7 @@ function createColumn$3(column, instance) {
935
935
  }
936
936
  };
937
937
  }
938
- function getInstance$6(instance) {
938
+ function getInstance$7(instance) {
939
939
  return {
940
940
  getColumnAutoAggregationFn: function getColumnAutoAggregationFn(columnId) {
941
941
  var firstRow = instance.getCoreFlatRows()[0];
@@ -1100,17 +1100,17 @@ function orderColumns(leafColumns, grouping, groupedColumnMode) {
1100
1100
  }
1101
1101
 
1102
1102
  //
1103
- function getInitialState$4() {
1103
+ function getInitialState$5() {
1104
1104
  return {
1105
1105
  columnOrder: []
1106
1106
  };
1107
1107
  }
1108
- function getDefaultOptions$4(instance) {
1108
+ function getDefaultOptions$5(instance) {
1109
1109
  return {
1110
1110
  onColumnOrderChange: makeStateUpdater('columnOrder', instance)
1111
1111
  };
1112
1112
  }
1113
- function getInstance$5(instance) {
1113
+ function getInstance$6(instance) {
1114
1114
  return {
1115
1115
  setColumnOrder: function setColumnOrder(updater) {
1116
1116
  return instance.options.onColumnOrderChange == null ? void 0 : instance.options.onColumnOrderChange(updater, functionalUpdate(updater, instance.getState().columnOrder));
@@ -1162,7 +1162,7 @@ function getInstance$5(instance) {
1162
1162
  }
1163
1163
 
1164
1164
  //
1165
- function getInitialState$3() {
1165
+ function getInitialState$4() {
1166
1166
  return {
1167
1167
  columnPinning: {
1168
1168
  left: [],
@@ -1170,12 +1170,12 @@ function getInitialState$3() {
1170
1170
  }
1171
1171
  };
1172
1172
  }
1173
- function getDefaultOptions$3(instance) {
1173
+ function getDefaultOptions$4(instance) {
1174
1174
  return {
1175
1175
  onColumnPinningChange: makeStateUpdater('columnPinning', instance)
1176
1176
  };
1177
1177
  }
1178
- function createColumn$2(column, instance) {
1178
+ function createColumn$3(column, instance) {
1179
1179
  return {
1180
1180
  getCanPin: function getCanPin() {
1181
1181
  return instance.getColumnCanPin(column.id);
@@ -1191,7 +1191,7 @@ function createColumn$2(column, instance) {
1191
1191
  }
1192
1192
  };
1193
1193
  }
1194
- function getInstance$4(instance) {
1194
+ function getInstance$5(instance) {
1195
1195
  return {
1196
1196
  setColumnPinning: function setColumnPinning(updater) {
1197
1197
  return instance.options.onColumnPinningChange == null ? void 0 : instance.options.onColumnPinningChange(updater, functionalUpdate(updater, instance.getState().columnPinning));
@@ -1303,6 +1303,312 @@ function getInstance$4(instance) {
1303
1303
  };
1304
1304
  }
1305
1305
 
1306
+ //
1307
+ var defaultColumnSizing = {
1308
+ width: 150,
1309
+ minWidth: 20,
1310
+ maxWidth: Number.MAX_SAFE_INTEGER
1311
+ };
1312
+ function getInitialState$3() {
1313
+ return {
1314
+ columnSizing: {},
1315
+ columnSizingInfo: {
1316
+ startOffset: null,
1317
+ startSize: null,
1318
+ deltaOffset: null,
1319
+ deltaPercentage: null,
1320
+ isResizingColumn: false,
1321
+ columnSizingStart: []
1322
+ }
1323
+ };
1324
+ }
1325
+ function getDefaultOptions$3(instance) {
1326
+ return {
1327
+ columnResizeMode: 'onEnd',
1328
+ onColumnSizingChange: makeStateUpdater('columnSizing', instance),
1329
+ onColumnSizingInfoChange: makeStateUpdater('columnSizingInfo', instance)
1330
+ };
1331
+ }
1332
+ function getInstance$4(instance) {
1333
+ return {
1334
+ setColumnSizing: function setColumnSizing(updater) {
1335
+ return instance.options.onColumnSizingChange == null ? void 0 : instance.options.onColumnSizingChange(updater, functionalUpdate(updater, instance.getState().columnSizing));
1336
+ },
1337
+ setColumnSizingInfo: function setColumnSizingInfo(updater) {
1338
+ return instance.options.onColumnSizingInfoChange == null ? void 0 : instance.options.onColumnSizingInfoChange(updater, functionalUpdate(updater, instance.getState().columnSizingInfo));
1339
+ },
1340
+ resetColumnSizing: function resetColumnSizing() {
1341
+ var _instance$initialStat;
1342
+
1343
+ instance.setColumnSizing((_instance$initialStat = instance.initialState.columnSizing) != null ? _instance$initialStat : {});
1344
+ },
1345
+ resetHeaderSizeInfo: function resetHeaderSizeInfo() {
1346
+ var _instance$initialStat2;
1347
+
1348
+ instance.setColumnSizingInfo((_instance$initialStat2 = instance.initialState.columnSizingInfo) != null ? _instance$initialStat2 : {});
1349
+ },
1350
+ resetColumnSize: function resetColumnSize(columnId) {
1351
+ instance.setColumnSizing(function (_ref) {
1352
+ _ref[columnId];
1353
+ var rest = _objectWithoutPropertiesLoose(_ref, [columnId].map(_toPropertyKey));
1354
+
1355
+ return rest;
1356
+ });
1357
+ },
1358
+ resetHeaderSize: function resetHeaderSize(headerId) {
1359
+ var header = instance.getHeader(headerId);
1360
+
1361
+ if (!header) {
1362
+ return;
1363
+ }
1364
+
1365
+ return instance.resetColumnSize(header.column.id);
1366
+ },
1367
+ getHeaderCanResize: function getHeaderCanResize(headerId) {
1368
+ var header = instance.getHeader(headerId);
1369
+
1370
+ if (!header) {
1371
+ throw new Error();
1372
+ }
1373
+
1374
+ return instance.getColumnCanResize(header.column.id);
1375
+ },
1376
+ getColumnCanResize: function getColumnCanResize(columnId) {
1377
+ var _ref2, _ref3, _column$enableResizin;
1378
+
1379
+ var column = instance.getColumn(columnId);
1380
+
1381
+ if (!column) {
1382
+ throw new Error();
1383
+ }
1384
+
1385
+ return (_ref2 = (_ref3 = (_column$enableResizin = column.enableResizing) != null ? _column$enableResizin : instance.options.enableColumnResizing) != null ? _ref3 : column.defaultCanResize) != null ? _ref2 : true;
1386
+ },
1387
+ getColumnIsResizing: function getColumnIsResizing(columnId) {
1388
+ var column = instance.getColumn(columnId);
1389
+
1390
+ if (!column) {
1391
+ throw new Error();
1392
+ }
1393
+
1394
+ return instance.getState().columnSizingInfo.isResizingColumn === columnId;
1395
+ },
1396
+ getHeaderIsResizing: function getHeaderIsResizing(headerId) {
1397
+ var header = instance.getHeader(headerId);
1398
+
1399
+ if (!header) {
1400
+ throw new Error();
1401
+ }
1402
+
1403
+ return instance.getColumnIsResizing(header.column.id);
1404
+ },
1405
+ getHeaderResizerProps: function getHeaderResizerProps(headerId, userProps) {
1406
+ var header = instance.getHeader(headerId);
1407
+
1408
+ if (!header) {
1409
+ return;
1410
+ }
1411
+
1412
+ var column = instance.getColumn(header.column.id);
1413
+
1414
+ if (!column) {
1415
+ return;
1416
+ }
1417
+
1418
+ var canResize = column.getCanResize();
1419
+
1420
+ var onResizeStart = function onResizeStart(e) {
1421
+ if (isTouchStartEvent(e)) {
1422
+ // lets not respond to multiple touches (e.g. 2 or 3 fingers)
1423
+ if (e.touches && e.touches.length > 1) {
1424
+ return;
1425
+ }
1426
+ }
1427
+
1428
+ var columnSizingStart = header.getLeafHeaders().map(function (d) {
1429
+ return [d.column.id, d.getWidth()];
1430
+ });
1431
+ var clientX = isTouchStartEvent(e) ? Math.round(e.touches[0].clientX) : e.clientX;
1432
+
1433
+ var updateOffset = function updateOffset(eventType, clientXPos) {
1434
+ if (typeof clientXPos !== 'number') {
1435
+ return;
1436
+ }
1437
+
1438
+ var newColumnSizing = {};
1439
+ instance.setColumnSizingInfo(function (old) {
1440
+ var _old$startOffset, _old$startSize;
1441
+
1442
+ var deltaOffset = clientXPos - ((_old$startOffset = old == null ? void 0 : old.startOffset) != null ? _old$startOffset : 0);
1443
+ var deltaPercentage = Math.max(deltaOffset / ((_old$startSize = old == null ? void 0 : old.startSize) != null ? _old$startSize : 0), -0.999999);
1444
+ old.columnSizingStart.forEach(function (_ref4) {
1445
+ var columnId = _ref4[0],
1446
+ headerWidth = _ref4[1];
1447
+ newColumnSizing[columnId] = Math.max(headerWidth + headerWidth * deltaPercentage, 0);
1448
+ });
1449
+ return _extends({}, old, {
1450
+ deltaOffset: deltaOffset,
1451
+ deltaPercentage: deltaPercentage
1452
+ });
1453
+ });
1454
+
1455
+ if (instance.options.columnResizeMode === 'onChange' || eventType === 'end') {
1456
+ instance.setColumnSizing(function (old) {
1457
+ return _extends({}, old, newColumnSizing);
1458
+ });
1459
+ }
1460
+ };
1461
+
1462
+ var onMove = function onMove(clientXPos) {
1463
+ return updateOffset('move', clientXPos);
1464
+ };
1465
+
1466
+ var onEnd = function onEnd(clientXPos) {
1467
+ updateOffset('end', clientXPos);
1468
+ instance.setColumnSizingInfo(function (old) {
1469
+ return _extends({}, old, {
1470
+ isResizingColumn: false,
1471
+ startOffset: null,
1472
+ startSize: null,
1473
+ deltaOffset: null,
1474
+ deltaPercentage: null,
1475
+ columnSizingStart: []
1476
+ });
1477
+ });
1478
+ };
1479
+
1480
+ var mouseEvents = {
1481
+ moveHandler: function moveHandler(e) {
1482
+ return onMove(e.clientX);
1483
+ },
1484
+ upHandler: function upHandler(e) {
1485
+ document.removeEventListener('mousemove', mouseEvents.moveHandler);
1486
+ document.removeEventListener('mouseup', mouseEvents.upHandler);
1487
+ onEnd(e.clientX);
1488
+ }
1489
+ };
1490
+ var touchEvents = {
1491
+ moveHandler: function moveHandler(e) {
1492
+ if (e.cancelable) {
1493
+ e.preventDefault();
1494
+ e.stopPropagation();
1495
+ }
1496
+
1497
+ onMove(e.touches[0].clientX);
1498
+ return false;
1499
+ },
1500
+ upHandler: function upHandler(e) {
1501
+ document.removeEventListener('touchmove', touchEvents.moveHandler);
1502
+ document.removeEventListener('touchend', touchEvents.upHandler);
1503
+
1504
+ if (e.cancelable) {
1505
+ e.preventDefault();
1506
+ e.stopPropagation();
1507
+ }
1508
+
1509
+ onEnd(e.touches[0].clientX);
1510
+ }
1511
+ };
1512
+ var passiveIfSupported = passiveEventSupported() ? {
1513
+ passive: false
1514
+ } : false;
1515
+
1516
+ if (isTouchStartEvent(e)) {
1517
+ document.addEventListener('touchmove', touchEvents.moveHandler, passiveIfSupported);
1518
+ document.addEventListener('touchend', touchEvents.upHandler, passiveIfSupported);
1519
+ } else {
1520
+ document.addEventListener('mousemove', mouseEvents.moveHandler, passiveIfSupported);
1521
+ document.addEventListener('mouseup', mouseEvents.upHandler, passiveIfSupported);
1522
+ }
1523
+
1524
+ instance.setColumnSizingInfo(function (old) {
1525
+ return _extends({}, old, {
1526
+ startOffset: clientX,
1527
+ startSize: header.getWidth(),
1528
+ deltaOffset: 0,
1529
+ deltaPercentage: 0,
1530
+ columnSizingStart: columnSizingStart,
1531
+ isResizingColumn: header.column.id
1532
+ });
1533
+ });
1534
+ };
1535
+
1536
+ var initialProps = canResize ? {
1537
+ title: 'Toggle Grouping',
1538
+ draggable: false,
1539
+ role: 'separator',
1540
+ onMouseDown: function onMouseDown(e) {
1541
+ e.persist();
1542
+ onResizeStart(e);
1543
+ },
1544
+ onTouchStart: function onTouchStart(e) {
1545
+ e.persist();
1546
+ onResizeStart(e);
1547
+ }
1548
+ } : {};
1549
+ return propGetter(initialProps, userProps);
1550
+ }
1551
+ };
1552
+ }
1553
+ function createColumn$2(column, instance) {
1554
+ return {
1555
+ getIsResizing: function getIsResizing() {
1556
+ return instance.getColumnIsResizing(column.id);
1557
+ },
1558
+ getCanResize: function getCanResize() {
1559
+ return instance.getColumnCanResize(column.id);
1560
+ },
1561
+ resetSize: function resetSize() {
1562
+ return instance.resetColumnSize(column.id);
1563
+ }
1564
+ };
1565
+ }
1566
+ function createHeader(header, instance) {
1567
+ return {
1568
+ getIsResizing: function getIsResizing() {
1569
+ return instance.getHeaderIsResizing(header.id);
1570
+ },
1571
+ getCanResize: function getCanResize() {
1572
+ return instance.getHeaderCanResize(header.id);
1573
+ },
1574
+ getResizerProps: function getResizerProps(userProps) {
1575
+ return instance.getHeaderResizerProps(header.id, userProps);
1576
+ },
1577
+ resetSize: function resetSize() {
1578
+ return instance.resetHeaderSize(header.id);
1579
+ }
1580
+ };
1581
+ }
1582
+ var passiveSupported = null;
1583
+ function passiveEventSupported() {
1584
+ if (typeof passiveSupported === 'boolean') return passiveSupported;
1585
+ var supported = false;
1586
+
1587
+ try {
1588
+ var options = {
1589
+ get passive() {
1590
+ supported = true;
1591
+ return false;
1592
+ }
1593
+
1594
+ };
1595
+
1596
+ var noop = function noop() {};
1597
+
1598
+ window.addEventListener('test', noop, options);
1599
+ window.removeEventListener('test', noop);
1600
+ } catch (err) {
1601
+ supported = false;
1602
+ }
1603
+
1604
+ passiveSupported = supported;
1605
+ return passiveSupported;
1606
+ }
1607
+
1608
+ function isTouchStartEvent(e) {
1609
+ return e.type === 'touchstart';
1610
+ }
1611
+
1306
1612
  //
1307
1613
  function createRow$1(row, instance) {
1308
1614
  return {
@@ -1354,7 +1660,7 @@ function createRow$1(row, instance) {
1354
1660
  }
1355
1661
  function getInstance$3(instance) {
1356
1662
  return {
1357
- createHeader: function createHeader(column, options) {
1663
+ createHeader: function createHeader$1(column, options) {
1358
1664
  var _options$id;
1359
1665
 
1360
1666
  var id = (_options$id = options.id) != null ? _options$id : column.id;
@@ -1416,6 +1722,8 @@ function getInstance$3(instance) {
1416
1722
  });
1417
1723
  }
1418
1724
  };
1725
+ header = Object.assign(header, createHeader(header, instance)); // Yes, we have to convert instance to uknown, because we know more than the compiler here.
1726
+
1419
1727
  return header;
1420
1728
  },
1421
1729
  // Header Groups
@@ -2865,7 +3173,7 @@ function createTableInstance(options, rerender) {
2865
3173
 
2866
3174
  var instance = {};
2867
3175
 
2868
- var defaultOptions = _extends({}, getDefaultOptions$6(instance), getDefaultOptions$4(instance), getDefaultOptions$3(instance), getDefaultOptions$2(instance), getDefaultOptions$1(instance), getDefaultOptions$5(instance), getDefaultOptions(instance));
3176
+ var defaultOptions = _extends({}, getDefaultOptions$7(instance), getDefaultOptions$5(instance), getDefaultOptions$4(instance), getDefaultOptions$2(instance), getDefaultOptions$1(instance), getDefaultOptions$6(instance), getDefaultOptions(instance), getDefaultOptions$3(instance));
2869
3177
 
2870
3178
  var defaultState = {};
2871
3179
 
@@ -2877,9 +3185,9 @@ function createTableInstance(options, rerender) {
2877
3185
 
2878
3186
  instance.options = buildOptions(options);
2879
3187
 
2880
- var initialState = _extends({}, getInitialState$6(), getInitialState$4(), getInitialState$3(), getInitialState$2(), getInitialState$1(), getInitialState$5(), getInitialState(), (_options$initialState = options.initialState) != null ? _options$initialState : {});
3188
+ var initialState = _extends({}, getInitialState$7(), getInitialState$5(), getInitialState$4(), getInitialState$2(), getInitialState$1(), getInitialState$6(), getInitialState(), getInitialState$3(), (_options$initialState = options.initialState) != null ? _options$initialState : {});
2881
3189
 
2882
- var finalInstance = _extends({}, instance, getInstance$7(instance), getInstance$5(instance), getInstance$4(instance), getInstance$3(instance), getInstance$2(instance), getInstance$1(instance), getInstance$6(instance), getInstance(instance), {
3190
+ var finalInstance = _extends({}, instance, getInstance$8(instance), getInstance$6(instance), getInstance$5(instance), getInstance$3(instance), getInstance$2(instance), getInstance$1(instance), getInstance$7(instance), getInstance(instance), getInstance$4(instance), {
2883
3191
  rerender: rerender,
2884
3192
  initialState: initialState,
2885
3193
  internalState: initialState,
@@ -2936,7 +3244,7 @@ function createTableInstance(options, rerender) {
2936
3244
  getColumnDefs: function getColumnDefs() {
2937
3245
  return instance.options.columns;
2938
3246
  },
2939
- createColumn: function createColumn$5(columnDef, depth, parent) {
3247
+ createColumn: function createColumn$6(columnDef, depth, parent) {
2940
3248
  var _ref2, _columnDef$id;
2941
3249
 
2942
3250
  var defaultColumn = instance.getDefaultColumn();
@@ -2959,11 +3267,7 @@ function createTableInstance(options, rerender) {
2959
3267
  throw new Error();
2960
3268
  }
2961
3269
 
2962
- var column = _extends({
2963
- width: 150,
2964
- minWidth: 20,
2965
- maxWidth: Number.MAX_SAFE_INTEGER
2966
- }, defaultColumn, columnDef, {
3270
+ var column = _extends({}, defaultColumnSizing, defaultColumn, columnDef, {
2967
3271
  id: "" + id,
2968
3272
  accessorFn: accessorFn,
2969
3273
  parent: parent,
@@ -2998,7 +3302,7 @@ function createTableInstance(options, rerender) {
2998
3302
  }, 'column.getLeafColumns', instance.options.debug)
2999
3303
  });
3000
3304
 
3001
- column = Object.assign(column, createColumn$4(column, instance), createColumn$2(column, instance), createColumn$1(column, instance), createColumn(column, instance), createColumn$3(column, instance)); // Yes, we have to convert instance to uknown, because we know more than the compiler here.
3305
+ column = Object.assign(column, createColumn$5(column, instance), createColumn$3(column, instance), createColumn$1(column, instance), createColumn(column, instance), createColumn$4(column, instance), createColumn$2(column, instance)); // Yes, we have to convert instance to uknown, because we know more than the compiler here.
3002
3306
 
3003
3307
  return column;
3004
3308
  },
@@ -3058,7 +3362,7 @@ function createTableInstance(options, rerender) {
3058
3362
  return column;
3059
3363
  },
3060
3364
  getColumnWidth: function getColumnWidth(columnId) {
3061
- var _column$minWidth, _column$width, _column$maxWidth;
3365
+ var _column$minWidth, _ref3, _column$maxWidth;
3062
3366
 
3063
3367
  var column = instance.getColumn(columnId);
3064
3368
 
@@ -3066,7 +3370,8 @@ function createTableInstance(options, rerender) {
3066
3370
  throw new Error();
3067
3371
  }
3068
3372
 
3069
- return Math.min(Math.max((_column$minWidth = column.minWidth) != null ? _column$minWidth : 0, (_column$width = column.width) != null ? _column$width : 0), (_column$maxWidth = column.maxWidth) != null ? _column$maxWidth : 0);
3373
+ var columnSize = instance.getState().columnSizing[column.id];
3374
+ return Math.min(Math.max((_column$minWidth = column.minWidth) != null ? _column$minWidth : defaultColumnSizing.minWidth, (_ref3 = columnSize != null ? columnSize : column.width) != null ? _ref3 : defaultColumnSizing.width), (_column$maxWidth = column.maxWidth) != null ? _column$maxWidth : defaultColumnSizing.maxWidth);
3070
3375
  },
3071
3376
  createCell: function createCell$1(row, column, value) {
3072
3377
  var cell = {
@@ -3316,6 +3621,34 @@ function createTableInstance(options, rerender) {
3316
3621
  key: cell.id,
3317
3622
  role: 'gridcell'
3318
3623
  }, userProps);
3624
+ },
3625
+ getTableWidth: function getTableWidth() {
3626
+ var _instance$getHeaderGr, _instance$getHeaderGr2;
3627
+
3628
+ return (_instance$getHeaderGr = (_instance$getHeaderGr2 = instance.getHeaderGroups()[0]) == null ? void 0 : _instance$getHeaderGr2.headers.reduce(function (sum, header) {
3629
+ return sum + header.getWidth();
3630
+ }, 0)) != null ? _instance$getHeaderGr : 0;
3631
+ },
3632
+ getLeftTableWidth: function getLeftTableWidth() {
3633
+ var _instance$getLeftHead, _instance$getLeftHead2;
3634
+
3635
+ return (_instance$getLeftHead = (_instance$getLeftHead2 = instance.getLeftHeaderGroups()[0]) == null ? void 0 : _instance$getLeftHead2.headers.reduce(function (sum, header) {
3636
+ return sum + header.getWidth();
3637
+ }, 0)) != null ? _instance$getLeftHead : 0;
3638
+ },
3639
+ getCenterTableWidth: function getCenterTableWidth() {
3640
+ var _instance$getCenterHe, _instance$getCenterHe2;
3641
+
3642
+ return (_instance$getCenterHe = (_instance$getCenterHe2 = instance.getCenterHeaderGroups()[0]) == null ? void 0 : _instance$getCenterHe2.headers.reduce(function (sum, header) {
3643
+ return sum + header.getWidth();
3644
+ }, 0)) != null ? _instance$getCenterHe : 0;
3645
+ },
3646
+ getRightTableWidth: function getRightTableWidth() {
3647
+ var _instance$getRightHea, _instance$getRightHea2;
3648
+
3649
+ return (_instance$getRightHea = (_instance$getRightHea2 = instance.getRightHeaderGroups()[0]) == null ? void 0 : _instance$getRightHea2.headers.reduce(function (sum, header) {
3650
+ return sum + header.getWidth();
3651
+ }, 0)) != null ? _instance$getRightHea : 0;
3319
3652
  }
3320
3653
  });
3321
3654