@tanstack/svelte-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-163"},{"name":"svelte-table/src","children":[{"uid":"540e-165","name":"placeholder.svelte"},{"uid":"540e-167","name":"render-component.ts"},{"uid":"540e-169","name":"index.ts"}]}]}]}],"isRoot":true},"nodeParts":{"540e-163":{"renderedLength":142389,"gzipLength":24368,"brotliLength":0,"mainUid":"540e-162"},"540e-165":{"renderedLength":925,"gzipLength":444,"brotliLength":0,"mainUid":"540e-164"},"540e-167":{"renderedLength":1365,"gzipLength":519,"brotliLength":0,"mainUid":"540e-166"},"540e-169":{"renderedLength":1958,"gzipLength":709,"brotliLength":0,"mainUid":"540e-168"}},"nodeMetas":{"540e-162":{"id":"/packages/table-core/build/esm/index.js","moduleParts":{"index.production.js":"540e-163"},"imported":[],"importedBy":[{"uid":"540e-168"}]},"540e-164":{"id":"/packages/svelte-table/src/placeholder.svelte","moduleParts":{"index.production.js":"540e-165"},"imported":[{"uid":"540e-171"}],"importedBy":[{"uid":"540e-168"}]},"540e-166":{"id":"/packages/svelte-table/src/render-component.ts","moduleParts":{"index.production.js":"540e-167"},"imported":[{"uid":"540e-171"}],"importedBy":[{"uid":"540e-168"}]},"540e-168":{"id":"/packages/svelte-table/src/index.ts","moduleParts":{"index.production.js":"540e-169"},"imported":[{"uid":"540e-162"},{"uid":"540e-164"},{"uid":"540e-170"},{"uid":"540e-166"}],"importedBy":[],"isEntry":true},"540e-170":{"id":"svelte/store","moduleParts":{},"imported":[],"importedBy":[{"uid":"540e-168"}],"isExternal":true},"540e-171":{"id":"svelte/internal","moduleParts":{},"imported":[],"importedBy":[{"uid":"540e-164"},{"uid":"540e-166"}],"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-163"},{"name":"svelte-table/src","children":[{"uid":"1ed1-165","name":"placeholder.svelte"},{"uid":"1ed1-167","name":"render-component.ts"},{"uid":"1ed1-169","name":"index.ts"}]}]}]}],"isRoot":true},"nodeParts":{"1ed1-163":{"renderedLength":142435,"gzipLength":24400,"brotliLength":0,"mainUid":"1ed1-162"},"1ed1-165":{"renderedLength":925,"gzipLength":444,"brotliLength":0,"mainUid":"1ed1-164"},"1ed1-167":{"renderedLength":1365,"gzipLength":519,"brotliLength":0,"mainUid":"1ed1-166"},"1ed1-169":{"renderedLength":1958,"gzipLength":709,"brotliLength":0,"mainUid":"1ed1-168"}},"nodeMetas":{"1ed1-162":{"id":"/packages/table-core/build/esm/index.js","moduleParts":{"index.production.js":"1ed1-163"},"imported":[],"importedBy":[{"uid":"1ed1-168"}]},"1ed1-164":{"id":"/packages/svelte-table/src/placeholder.svelte","moduleParts":{"index.production.js":"1ed1-165"},"imported":[{"uid":"1ed1-171"}],"importedBy":[{"uid":"1ed1-168"}]},"1ed1-166":{"id":"/packages/svelte-table/src/render-component.ts","moduleParts":{"index.production.js":"1ed1-167"},"imported":[{"uid":"1ed1-171"}],"importedBy":[{"uid":"1ed1-168"}]},"1ed1-168":{"id":"/packages/svelte-table/src/index.ts","moduleParts":{"index.production.js":"1ed1-169"},"imported":[{"uid":"1ed1-162"},{"uid":"1ed1-164"},{"uid":"1ed1-170"},{"uid":"1ed1-166"}],"importedBy":[],"isEntry":true},"1ed1-170":{"id":"svelte/store","moduleParts":{},"imported":[],"importedBy":[{"uid":"1ed1-168"}],"isExternal":true},"1ed1-171":{"id":"svelte/internal","moduleParts":{},"imported":[],"importedBy":[{"uid":"1ed1-164"},{"uid":"1ed1-166"}],"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,21 +11,21 @@
11
11
  "children": [
12
12
  {
13
13
  "name": "table-core/build/esm/index.js",
14
- "uid": "540e-173"
14
+ "uid": "1ed1-173"
15
15
  },
16
16
  {
17
17
  "name": "svelte-table/src",
18
18
  "children": [
19
19
  {
20
- "uid": "540e-175",
20
+ "uid": "1ed1-175",
21
21
  "name": "placeholder.svelte"
22
22
  },
23
23
  {
24
- "uid": "540e-177",
24
+ "uid": "1ed1-177",
25
25
  "name": "render-component.ts"
26
26
  },
27
27
  {
28
- "uid": "540e-179",
28
+ "uid": "1ed1-179",
29
29
  "name": "index.ts"
30
30
  }
31
31
  ]
@@ -38,119 +38,119 @@
38
38
  "isRoot": true
39
39
  },
40
40
  "nodeParts": {
41
- "540e-173": {
42
- "renderedLength": 142389,
43
- "gzipLength": 24368,
41
+ "1ed1-173": {
42
+ "renderedLength": 142435,
43
+ "gzipLength": 24400,
44
44
  "brotliLength": 0,
45
- "mainUid": "540e-172"
45
+ "mainUid": "1ed1-172"
46
46
  },
47
- "540e-175": {
47
+ "1ed1-175": {
48
48
  "renderedLength": 925,
49
49
  "gzipLength": 444,
50
50
  "brotliLength": 0,
51
- "mainUid": "540e-174"
51
+ "mainUid": "1ed1-174"
52
52
  },
53
- "540e-177": {
53
+ "1ed1-177": {
54
54
  "renderedLength": 1365,
55
55
  "gzipLength": 519,
56
56
  "brotliLength": 0,
57
- "mainUid": "540e-176"
57
+ "mainUid": "1ed1-176"
58
58
  },
59
- "540e-179": {
59
+ "1ed1-179": {
60
60
  "renderedLength": 1958,
61
61
  "gzipLength": 709,
62
62
  "brotliLength": 0,
63
- "mainUid": "540e-178"
63
+ "mainUid": "1ed1-178"
64
64
  }
65
65
  },
66
66
  "nodeMetas": {
67
- "540e-172": {
67
+ "1ed1-172": {
68
68
  "id": "/packages/table-core/build/esm/index.js",
69
69
  "moduleParts": {
70
- "index.production.js": "540e-173"
70
+ "index.production.js": "1ed1-173"
71
71
  },
72
72
  "imported": [],
73
73
  "importedBy": [
74
74
  {
75
- "uid": "540e-178"
75
+ "uid": "1ed1-178"
76
76
  }
77
77
  ]
78
78
  },
79
- "540e-174": {
79
+ "1ed1-174": {
80
80
  "id": "/packages/svelte-table/src/placeholder.svelte",
81
81
  "moduleParts": {
82
- "index.production.js": "540e-175"
82
+ "index.production.js": "1ed1-175"
83
83
  },
84
84
  "imported": [
85
85
  {
86
- "uid": "540e-181"
86
+ "uid": "1ed1-181"
87
87
  }
88
88
  ],
89
89
  "importedBy": [
90
90
  {
91
- "uid": "540e-178"
91
+ "uid": "1ed1-178"
92
92
  }
93
93
  ]
94
94
  },
95
- "540e-176": {
95
+ "1ed1-176": {
96
96
  "id": "/packages/svelte-table/src/render-component.ts",
97
97
  "moduleParts": {
98
- "index.production.js": "540e-177"
98
+ "index.production.js": "1ed1-177"
99
99
  },
100
100
  "imported": [
101
101
  {
102
- "uid": "540e-181"
102
+ "uid": "1ed1-181"
103
103
  }
104
104
  ],
105
105
  "importedBy": [
106
106
  {
107
- "uid": "540e-178"
107
+ "uid": "1ed1-178"
108
108
  }
109
109
  ]
110
110
  },
111
- "540e-178": {
111
+ "1ed1-178": {
112
112
  "id": "/packages/svelte-table/src/index.ts",
113
113
  "moduleParts": {
114
- "index.production.js": "540e-179"
114
+ "index.production.js": "1ed1-179"
115
115
  },
116
116
  "imported": [
117
117
  {
118
- "uid": "540e-172"
118
+ "uid": "1ed1-172"
119
119
  },
120
120
  {
121
- "uid": "540e-174"
121
+ "uid": "1ed1-174"
122
122
  },
123
123
  {
124
- "uid": "540e-180"
124
+ "uid": "1ed1-180"
125
125
  },
126
126
  {
127
- "uid": "540e-176"
127
+ "uid": "1ed1-176"
128
128
  }
129
129
  ],
130
130
  "importedBy": [],
131
131
  "isEntry": true
132
132
  },
133
- "540e-180": {
133
+ "1ed1-180": {
134
134
  "id": "svelte/store",
135
135
  "moduleParts": {},
136
136
  "imported": [],
137
137
  "importedBy": [
138
138
  {
139
- "uid": "540e-178"
139
+ "uid": "1ed1-178"
140
140
  }
141
141
  ],
142
142
  "isExternal": true
143
143
  },
144
- "540e-181": {
144
+ "1ed1-181": {
145
145
  "id": "svelte/internal",
146
146
  "moduleParts": {},
147
147
  "imported": [],
148
148
  "importedBy": [
149
149
  {
150
- "uid": "540e-174"
150
+ "uid": "1ed1-174"
151
151
  },
152
152
  {
153
- "uid": "540e-176"
153
+ "uid": "1ed1-176"
154
154
  }
155
155
  ],
156
156
  "isExternal": true
@@ -385,7 +385,7 @@
385
385
  row,
386
386
  column,
387
387
  getValue: () => row.getValue(columnId),
388
- renderCell: () => column.cell ? instance.render(column.cell, {
388
+ renderCell: () => column.cell ? instance._render(column.cell, {
389
389
  instance,
390
390
  column,
391
391
  row,
@@ -709,9 +709,10 @@
709
709
  return {
710
710
  _autoResetExpanded: () => {
711
711
  if (!registered) {
712
- instance.queue(() => {
712
+ instance._queue(() => {
713
713
  registered = true;
714
714
  });
715
+
715
716
  return;
716
717
  }
717
718
 
@@ -722,7 +723,8 @@
722
723
  if (instance.options.autoResetAll === true || instance.options.autoResetExpanded) {
723
724
  if (queued) return;
724
725
  queued = true;
725
- instance.queue(() => {
726
+
727
+ instance._queue(() => {
726
728
  instance.resetExpanded();
727
729
  queued = false;
728
730
  });
@@ -1406,7 +1408,7 @@
1406
1408
  var _column$aggregatedCel;
1407
1409
 
1408
1410
  const template = (_column$aggregatedCel = column.aggregatedCell) != null ? _column$aggregatedCel : column.cell;
1409
- return template ? instance.render(template, {
1411
+ return template ? instance._render(template, {
1410
1412
  instance,
1411
1413
  column,
1412
1414
  row,
@@ -1507,8 +1509,7 @@
1507
1509
  },
1508
1510
  getDefaultOptions: instance => {
1509
1511
  return {
1510
- onPaginationChange: makeStateUpdater('pagination', instance),
1511
- autoResetPageIndex: true
1512
+ onPaginationChange: makeStateUpdater('pagination', instance)
1512
1513
  };
1513
1514
  },
1514
1515
  createInstance: instance => {
@@ -1516,21 +1517,21 @@
1516
1517
  let queued = false;
1517
1518
  return {
1518
1519
  _autoResetPageIndex: () => {
1520
+ var _ref, _instance$options$aut;
1521
+
1519
1522
  if (!registered) {
1520
- instance.queue(() => {
1523
+ instance._queue(() => {
1521
1524
  registered = true;
1522
1525
  });
1523
- return;
1524
- }
1525
1526
 
1526
- if (instance.options.autoResetAll === false) {
1527
1527
  return;
1528
1528
  }
1529
1529
 
1530
- if (instance.options.autoResetAll === true || instance.options.autoResetPageIndex) {
1530
+ if ((_ref = (_instance$options$aut = instance.options.autoResetAll) != null ? _instance$options$aut : instance.options.autoResetPageIndex) != null ? _ref : !instance.options.manualPagination) {
1531
1531
  if (queued) return;
1532
1532
  queued = true;
1533
- instance.queue(() => {
1533
+
1534
+ instance._queue(() => {
1534
1535
  instance.resetPageIndex();
1535
1536
  queued = false;
1536
1537
  });
@@ -1552,7 +1553,7 @@
1552
1553
  setPageIndex: updater => {
1553
1554
  instance.setPagination(old => {
1554
1555
  let pageIndex = functionalUpdate(updater, old.pageIndex);
1555
- const maxPageIndex = old.pageCount && old.pageCount > 0 ? old.pageCount - 1 : Number.MAX_SAFE_INTEGER;
1556
+ const maxPageIndex = typeof old.pageCount !== 'undefined' ? old.pageCount - 1 : Number.MAX_SAFE_INTEGER;
1556
1557
  pageIndex = Math.min(Math.max(0, pageIndex), maxPageIndex);
1557
1558
  return { ...old,
1558
1559
  pageIndex
@@ -2663,12 +2664,12 @@
2663
2664
  recurseHeader(header);
2664
2665
  return leafHeaders;
2665
2666
  },
2666
- renderHeader: () => column.header ? instance.render(column.header, {
2667
+ renderHeader: () => column.header ? instance._render(column.header, {
2667
2668
  instance,
2668
2669
  header: header,
2669
2670
  column
2670
2671
  }) : null,
2671
- renderFooter: () => column.footer ? instance.render(column.footer, {
2672
+ renderFooter: () => column.footer ? instance._render(column.footer, {
2672
2673
  instance,
2673
2674
  header: header,
2674
2675
  column
@@ -3142,7 +3143,7 @@
3142
3143
  ...options
3143
3144
  },
3144
3145
  initialState,
3145
- queue: cb => {
3146
+ _queue: cb => {
3146
3147
  queued.push(cb);
3147
3148
 
3148
3149
  if (!queuedTimeout) {
@@ -3200,7 +3201,7 @@
3200
3201
  const newOptions = functionalUpdate(updater, instance.options);
3201
3202
  instance.options = mergeOptions(newOptions);
3202
3203
  },
3203
- render: (template, props) => {
3204
+ _render: (template, props) => {
3204
3205
  if (typeof instance.options.render === 'function') {
3205
3206
  return instance.options.render(template, props);
3206
3207
  }
@@ -3899,7 +3900,7 @@
3899
3900
  return (_instance$options$deb = instance.options.debugAll) != null ? _instance$options$deb : instance.options.debugTable;
3900
3901
  },
3901
3902
  onChange: () => {
3902
- instance.queue(() => {
3903
+ instance._queue(() => {
3903
3904
  instance._autoResetExpanded();
3904
3905
 
3905
3906
  instance._autoResetPageIndex();