@tanstack/react-table 8.0.0-alpha.72 → 8.0.0-alpha.73

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.
@@ -2669,7 +2669,7 @@ var drawChart = (function (exports) {
2669
2669
  </script>
2670
2670
  <script>
2671
2671
  /*<!--*/
2672
- const data = {"version":2,"tree":{"name":"root","children":[{"name":"index.production.js","children":[{"name":"packages","children":[{"name":"table-core/build/esm/index.js","uid":"540e-127"},{"name":"react-table/src/index.tsx","uid":"540e-129"}]}]}],"isRoot":true},"nodeParts":{"540e-127":{"renderedLength":142387,"gzipLength":24367,"brotliLength":0,"mainUid":"540e-126"},"540e-129":{"renderedLength":2102,"gzipLength":836,"brotliLength":0,"mainUid":"540e-128"}},"nodeMetas":{"540e-126":{"id":"/packages/table-core/build/esm/index.js","moduleParts":{"index.production.js":"540e-127"},"imported":[],"importedBy":[{"uid":"540e-128"}]},"540e-128":{"id":"/packages/react-table/src/index.tsx","moduleParts":{"index.production.js":"540e-129"},"imported":[{"uid":"540e-130"},{"uid":"540e-126"}],"importedBy":[],"isEntry":true},"540e-130":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"540e-128"}],"isExternal":true}},"env":{"rollup":"2.70.2"},"options":{"gzip":true,"brotli":false,"sourcemap":false}};
2672
+ const data = {"version":2,"tree":{"name":"root","children":[{"name":"index.production.js","children":[{"name":"packages","children":[{"name":"table-core/build/esm/index.js","uid":"1ed1-127"},{"name":"react-table/src/index.tsx","uid":"1ed1-129"}]}]}],"isRoot":true},"nodeParts":{"1ed1-127":{"renderedLength":142433,"gzipLength":24399,"brotliLength":0,"mainUid":"1ed1-126"},"1ed1-129":{"renderedLength":2102,"gzipLength":836,"brotliLength":0,"mainUid":"1ed1-128"}},"nodeMetas":{"1ed1-126":{"id":"/packages/table-core/build/esm/index.js","moduleParts":{"index.production.js":"1ed1-127"},"imported":[],"importedBy":[{"uid":"1ed1-128"}]},"1ed1-128":{"id":"/packages/react-table/src/index.tsx","moduleParts":{"index.production.js":"1ed1-129"},"imported":[{"uid":"1ed1-130"},{"uid":"1ed1-126"}],"importedBy":[],"isEntry":true},"1ed1-130":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"1ed1-128"}],"isExternal":true}},"env":{"rollup":"2.70.2"},"options":{"gzip":true,"brotli":false,"sourcemap":false}};
2673
2673
 
2674
2674
  const run = () => {
2675
2675
  const width = window.innerWidth;
@@ -11,11 +11,11 @@
11
11
  "children": [
12
12
  {
13
13
  "name": "table-core/build/esm/index.js",
14
- "uid": "540e-132"
14
+ "uid": "1ed1-132"
15
15
  },
16
16
  {
17
17
  "name": "react-table/src/index.tsx",
18
- "uid": "540e-134"
18
+ "uid": "1ed1-134"
19
19
  }
20
20
  ]
21
21
  }
@@ -25,55 +25,55 @@
25
25
  "isRoot": true
26
26
  },
27
27
  "nodeParts": {
28
- "540e-132": {
29
- "renderedLength": 142387,
30
- "gzipLength": 24367,
28
+ "1ed1-132": {
29
+ "renderedLength": 142433,
30
+ "gzipLength": 24399,
31
31
  "brotliLength": 0,
32
- "mainUid": "540e-131"
32
+ "mainUid": "1ed1-131"
33
33
  },
34
- "540e-134": {
34
+ "1ed1-134": {
35
35
  "renderedLength": 2102,
36
36
  "gzipLength": 836,
37
37
  "brotliLength": 0,
38
- "mainUid": "540e-133"
38
+ "mainUid": "1ed1-133"
39
39
  }
40
40
  },
41
41
  "nodeMetas": {
42
- "540e-131": {
42
+ "1ed1-131": {
43
43
  "id": "/packages/table-core/build/esm/index.js",
44
44
  "moduleParts": {
45
- "index.production.js": "540e-132"
45
+ "index.production.js": "1ed1-132"
46
46
  },
47
47
  "imported": [],
48
48
  "importedBy": [
49
49
  {
50
- "uid": "540e-133"
50
+ "uid": "1ed1-133"
51
51
  }
52
52
  ]
53
53
  },
54
- "540e-133": {
54
+ "1ed1-133": {
55
55
  "id": "/packages/react-table/src/index.tsx",
56
56
  "moduleParts": {
57
- "index.production.js": "540e-134"
57
+ "index.production.js": "1ed1-134"
58
58
  },
59
59
  "imported": [
60
60
  {
61
- "uid": "540e-135"
61
+ "uid": "1ed1-135"
62
62
  },
63
63
  {
64
- "uid": "540e-131"
64
+ "uid": "1ed1-131"
65
65
  }
66
66
  ],
67
67
  "importedBy": [],
68
68
  "isEntry": true
69
69
  },
70
- "540e-135": {
70
+ "1ed1-135": {
71
71
  "id": "react",
72
72
  "moduleParts": {},
73
73
  "imported": [],
74
74
  "importedBy": [
75
75
  {
76
- "uid": "540e-133"
76
+ "uid": "1ed1-133"
77
77
  }
78
78
  ],
79
79
  "isExternal": true
@@ -405,7 +405,7 @@
405
405
  row,
406
406
  column,
407
407
  getValue: () => row.getValue(columnId),
408
- renderCell: () => column.cell ? instance.render(column.cell, {
408
+ renderCell: () => column.cell ? instance._render(column.cell, {
409
409
  instance,
410
410
  column,
411
411
  row,
@@ -729,9 +729,10 @@
729
729
  return {
730
730
  _autoResetExpanded: () => {
731
731
  if (!registered) {
732
- instance.queue(() => {
732
+ instance._queue(() => {
733
733
  registered = true;
734
734
  });
735
+
735
736
  return;
736
737
  }
737
738
 
@@ -742,7 +743,8 @@
742
743
  if (instance.options.autoResetAll === true || instance.options.autoResetExpanded) {
743
744
  if (queued) return;
744
745
  queued = true;
745
- instance.queue(() => {
746
+
747
+ instance._queue(() => {
746
748
  instance.resetExpanded();
747
749
  queued = false;
748
750
  });
@@ -1426,7 +1428,7 @@
1426
1428
  var _column$aggregatedCel;
1427
1429
 
1428
1430
  const template = (_column$aggregatedCel = column.aggregatedCell) != null ? _column$aggregatedCel : column.cell;
1429
- return template ? instance.render(template, {
1431
+ return template ? instance._render(template, {
1430
1432
  instance,
1431
1433
  column,
1432
1434
  row,
@@ -1527,8 +1529,7 @@
1527
1529
  },
1528
1530
  getDefaultOptions: instance => {
1529
1531
  return {
1530
- onPaginationChange: makeStateUpdater('pagination', instance),
1531
- autoResetPageIndex: true
1532
+ onPaginationChange: makeStateUpdater('pagination', instance)
1532
1533
  };
1533
1534
  },
1534
1535
  createInstance: instance => {
@@ -1536,21 +1537,21 @@
1536
1537
  let queued = false;
1537
1538
  return {
1538
1539
  _autoResetPageIndex: () => {
1540
+ var _ref, _instance$options$aut;
1541
+
1539
1542
  if (!registered) {
1540
- instance.queue(() => {
1543
+ instance._queue(() => {
1541
1544
  registered = true;
1542
1545
  });
1543
- return;
1544
- }
1545
1546
 
1546
- if (instance.options.autoResetAll === false) {
1547
1547
  return;
1548
1548
  }
1549
1549
 
1550
- if (instance.options.autoResetAll === true || instance.options.autoResetPageIndex) {
1550
+ if ((_ref = (_instance$options$aut = instance.options.autoResetAll) != null ? _instance$options$aut : instance.options.autoResetPageIndex) != null ? _ref : !instance.options.manualPagination) {
1551
1551
  if (queued) return;
1552
1552
  queued = true;
1553
- instance.queue(() => {
1553
+
1554
+ instance._queue(() => {
1554
1555
  instance.resetPageIndex();
1555
1556
  queued = false;
1556
1557
  });
@@ -1572,7 +1573,7 @@
1572
1573
  setPageIndex: updater => {
1573
1574
  instance.setPagination(old => {
1574
1575
  let pageIndex = functionalUpdate(updater, old.pageIndex);
1575
- const maxPageIndex = old.pageCount && old.pageCount > 0 ? old.pageCount - 1 : Number.MAX_SAFE_INTEGER;
1576
+ const maxPageIndex = typeof old.pageCount !== 'undefined' ? old.pageCount - 1 : Number.MAX_SAFE_INTEGER;
1576
1577
  pageIndex = Math.min(Math.max(0, pageIndex), maxPageIndex);
1577
1578
  return { ...old,
1578
1579
  pageIndex
@@ -2683,12 +2684,12 @@
2683
2684
  recurseHeader(header);
2684
2685
  return leafHeaders;
2685
2686
  },
2686
- renderHeader: () => column.header ? instance.render(column.header, {
2687
+ renderHeader: () => column.header ? instance._render(column.header, {
2687
2688
  instance,
2688
2689
  header: header,
2689
2690
  column
2690
2691
  }) : null,
2691
- renderFooter: () => column.footer ? instance.render(column.footer, {
2692
+ renderFooter: () => column.footer ? instance._render(column.footer, {
2692
2693
  instance,
2693
2694
  header: header,
2694
2695
  column
@@ -3162,7 +3163,7 @@
3162
3163
  ...options
3163
3164
  },
3164
3165
  initialState,
3165
- queue: cb => {
3166
+ _queue: cb => {
3166
3167
  queued.push(cb);
3167
3168
 
3168
3169
  if (!queuedTimeout) {
@@ -3220,7 +3221,7 @@
3220
3221
  const newOptions = functionalUpdate(updater, instance.options);
3221
3222
  instance.options = mergeOptions(newOptions);
3222
3223
  },
3223
- render: (template, props) => {
3224
+ _render: (template, props) => {
3224
3225
  if (typeof instance.options.render === 'function') {
3225
3226
  return instance.options.render(template, props);
3226
3227
  }
@@ -3919,7 +3920,7 @@
3919
3920
  return (_instance$options$deb = instance.options.debugAll) != null ? _instance$options$deb : instance.options.debugTable;
3920
3921
  },
3921
3922
  onChange: () => {
3922
- instance.queue(() => {
3923
+ instance._queue(() => {
3923
3924
  instance._autoResetExpanded();
3924
3925
 
3925
3926
  instance._autoResetPageIndex();