@tanstack/react-table 8.0.0-alpha.74 → 8.0.0-alpha.79

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":"0ced-127"},{"name":"react-table/src/index.tsx","uid":"0ced-129"}]}]}],"isRoot":true},"nodeParts":{"0ced-127":{"renderedLength":139332,"gzipLength":23812,"brotliLength":0,"mainUid":"0ced-126"},"0ced-129":{"renderedLength":2102,"gzipLength":836,"brotliLength":0,"mainUid":"0ced-128"}},"nodeMetas":{"0ced-126":{"id":"/packages/table-core/build/esm/index.js","moduleParts":{"index.production.js":"0ced-127"},"imported":[],"importedBy":[{"uid":"0ced-128"}]},"0ced-128":{"id":"/packages/react-table/src/index.tsx","moduleParts":{"index.production.js":"0ced-129"},"imported":[{"uid":"0ced-130"},{"uid":"0ced-126"}],"importedBy":[],"isEntry":true},"0ced-130":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"0ced-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":"3880-127"},{"name":"react-table/src/index.tsx","uid":"3880-129"}]}]}],"isRoot":true},"nodeParts":{"3880-127":{"renderedLength":139809,"gzipLength":23893,"brotliLength":0,"mainUid":"3880-126"},"3880-129":{"renderedLength":2102,"gzipLength":836,"brotliLength":0,"mainUid":"3880-128"}},"nodeMetas":{"3880-126":{"id":"/packages/table-core/build/esm/index.js","moduleParts":{"index.production.js":"3880-127"},"imported":[],"importedBy":[{"uid":"3880-128"}]},"3880-128":{"id":"/packages/react-table/src/index.tsx","moduleParts":{"index.production.js":"3880-129"},"imported":[{"uid":"3880-130"},{"uid":"3880-126"}],"importedBy":[],"isEntry":true},"3880-130":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"3880-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": "0ced-132"
14
+ "uid": "3880-132"
15
15
  },
16
16
  {
17
17
  "name": "react-table/src/index.tsx",
18
- "uid": "0ced-134"
18
+ "uid": "3880-134"
19
19
  }
20
20
  ]
21
21
  }
@@ -25,55 +25,55 @@
25
25
  "isRoot": true
26
26
  },
27
27
  "nodeParts": {
28
- "0ced-132": {
29
- "renderedLength": 139332,
30
- "gzipLength": 23812,
28
+ "3880-132": {
29
+ "renderedLength": 139809,
30
+ "gzipLength": 23893,
31
31
  "brotliLength": 0,
32
- "mainUid": "0ced-131"
32
+ "mainUid": "3880-131"
33
33
  },
34
- "0ced-134": {
34
+ "3880-134": {
35
35
  "renderedLength": 2102,
36
36
  "gzipLength": 836,
37
37
  "brotliLength": 0,
38
- "mainUid": "0ced-133"
38
+ "mainUid": "3880-133"
39
39
  }
40
40
  },
41
41
  "nodeMetas": {
42
- "0ced-131": {
42
+ "3880-131": {
43
43
  "id": "/packages/table-core/build/esm/index.js",
44
44
  "moduleParts": {
45
- "index.production.js": "0ced-132"
45
+ "index.production.js": "3880-132"
46
46
  },
47
47
  "imported": [],
48
48
  "importedBy": [
49
49
  {
50
- "uid": "0ced-133"
50
+ "uid": "3880-133"
51
51
  }
52
52
  ]
53
53
  },
54
- "0ced-133": {
54
+ "3880-133": {
55
55
  "id": "/packages/react-table/src/index.tsx",
56
56
  "moduleParts": {
57
- "index.production.js": "0ced-134"
57
+ "index.production.js": "3880-134"
58
58
  },
59
59
  "imported": [
60
60
  {
61
- "uid": "0ced-135"
61
+ "uid": "3880-135"
62
62
  },
63
63
  {
64
- "uid": "0ced-131"
64
+ "uid": "3880-131"
65
65
  }
66
66
  ],
67
67
  "importedBy": [],
68
68
  "isEntry": true
69
69
  },
70
- "0ced-135": {
70
+ "3880-135": {
71
71
  "id": "react",
72
72
  "moduleParts": {},
73
73
  "imported": [],
74
74
  "importedBy": [
75
75
  {
76
- "uid": "0ced-133"
76
+ "uid": "3880-133"
77
77
  }
78
78
  ],
79
79
  "isExternal": true
@@ -557,7 +557,7 @@
557
557
  }
558
558
  }
559
559
 
560
- const startSize = column.getSize();
560
+ const startSize = header.getSize();
561
561
  const columnSizingStart = header ? header.getLeafHeaders().map(d => [d.column.id, d.column.getSize()]) : [[column.id, column.getSize()]];
562
562
  const clientX = isTouchStartEvent(e) ? Math.round(e.touches[0].clientX) : e.clientX;
563
563
 
@@ -2704,8 +2704,10 @@
2704
2704
  },
2705
2705
  // Header Groups
2706
2706
  getHeaderGroups: memo(() => [instance.getAllColumns(), instance.getVisibleLeafColumns(), instance.getState().columnPinning.left, instance.getState().columnPinning.right], (allColumns, leafColumns, left, right) => {
2707
- const leftColumns = leafColumns.filter(column => left == null ? void 0 : left.includes(column.id));
2708
- const rightColumns = leafColumns.filter(column => right == null ? void 0 : right.includes(column.id));
2707
+ var _left$map$filter, _right$map$filter;
2708
+
2709
+ const leftColumns = (_left$map$filter = left == null ? void 0 : left.map(columnId => leafColumns.find(d => d.id === columnId)).filter(Boolean)) != null ? _left$map$filter : [];
2710
+ const rightColumns = (_right$map$filter = right == null ? void 0 : right.map(columnId => leafColumns.find(d => d.id === columnId)).filter(Boolean)) != null ? _right$map$filter : [];
2709
2711
  const centerColumns = leafColumns.filter(column => !(left != null && left.includes(column.id)) && !(right != null && right.includes(column.id)));
2710
2712
  const headerGroups = buildHeaderGroups(allColumns, [...leftColumns, ...centerColumns, ...rightColumns], instance);
2711
2713
  return headerGroups;
@@ -2729,8 +2731,10 @@
2729
2731
  }
2730
2732
  }),
2731
2733
  getLeftHeaderGroups: memo(() => [instance.getAllColumns(), instance.getVisibleLeafColumns(), instance.getState().columnPinning.left], (allColumns, leafColumns, left) => {
2732
- leafColumns = leafColumns.filter(column => left == null ? void 0 : left.includes(column.id));
2733
- return buildHeaderGroups(allColumns, leafColumns, instance, 'left');
2734
+ var _left$map$filter2;
2735
+
2736
+ const orderedLeafColumns = (_left$map$filter2 = left == null ? void 0 : left.map(columnId => leafColumns.find(d => d.id === columnId)).filter(Boolean)) != null ? _left$map$filter2 : [];
2737
+ return buildHeaderGroups(allColumns, orderedLeafColumns, instance, 'left');
2734
2738
  }, {
2735
2739
  key: 'getLeftHeaderGroups',
2736
2740
  debug: () => {
@@ -2740,8 +2744,10 @@
2740
2744
  }
2741
2745
  }),
2742
2746
  getRightHeaderGroups: memo(() => [instance.getAllColumns(), instance.getVisibleLeafColumns(), instance.getState().columnPinning.right], (allColumns, leafColumns, right) => {
2743
- leafColumns = leafColumns.filter(column => right == null ? void 0 : right.includes(column.id));
2744
- return buildHeaderGroups(allColumns, leafColumns, instance, 'right');
2747
+ var _right$map$filter2;
2748
+
2749
+ const orderedLeafColumns = (_right$map$filter2 = right == null ? void 0 : right.map(columnId => leafColumns.find(d => d.id === columnId)).filter(Boolean)) != null ? _right$map$filter2 : [];
2750
+ return buildHeaderGroups(allColumns, orderedLeafColumns, instance, 'right');
2745
2751
  }, {
2746
2752
  key: 'getRightHeaderGroups',
2747
2753
  debug: () => {