@tanstack/svelte-table 8.0.0-beta.7 → 8.0.0-beta.8

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":"779a-163"},{"name":"svelte-table/src","children":[{"uid":"779a-165","name":"placeholder.svelte"},{"uid":"779a-167","name":"placeholder.ts"},{"uid":"779a-169","name":"render-component.ts"},{"uid":"779a-171","name":"index.ts"}]}]}]}],"isRoot":true},"nodeParts":{"779a-163":{"renderedLength":138804,"gzipLength":23617,"brotliLength":0,"mainUid":"779a-162"},"779a-165":{"renderedLength":927,"gzipLength":445,"brotliLength":0,"mainUid":"779a-164"},"779a-167":{"renderedLength":246,"gzipLength":184,"brotliLength":0,"mainUid":"779a-166"},"779a-169":{"renderedLength":1458,"gzipLength":539,"brotliLength":0,"mainUid":"779a-168"},"779a-171":{"renderedLength":3046,"gzipLength":993,"brotliLength":0,"mainUid":"779a-170"}},"nodeMetas":{"779a-162":{"id":"/packages/table-core/build/esm/index.js","moduleParts":{"index.production.js":"779a-163"},"imported":[],"importedBy":[{"uid":"779a-170"}]},"779a-164":{"id":"/packages/svelte-table/src/placeholder.svelte","moduleParts":{"index.production.js":"779a-165"},"imported":[{"uid":"779a-172"}],"importedBy":[{"uid":"779a-166"}]},"779a-166":{"id":"/packages/svelte-table/src/placeholder.ts","moduleParts":{"index.production.js":"779a-167"},"imported":[{"uid":"779a-172"},{"uid":"779a-164"}],"importedBy":[{"uid":"779a-170"}]},"779a-168":{"id":"/packages/svelte-table/src/render-component.ts","moduleParts":{"index.production.js":"779a-169"},"imported":[{"uid":"779a-172"}],"importedBy":[{"uid":"779a-170"}]},"779a-170":{"id":"/packages/svelte-table/src/index.ts","moduleParts":{"index.production.js":"779a-171"},"imported":[{"uid":"779a-162"},{"uid":"779a-166"},{"uid":"779a-172"},{"uid":"779a-173"},{"uid":"779a-168"}],"importedBy":[],"isEntry":true},"779a-172":{"id":"svelte/internal","moduleParts":{},"imported":[],"importedBy":[{"uid":"779a-170"},{"uid":"779a-166"},{"uid":"779a-168"},{"uid":"779a-164"}],"isExternal":true},"779a-173":{"id":"svelte/store","moduleParts":{},"imported":[],"importedBy":[{"uid":"779a-170"}],"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":"6e21-163"},{"name":"svelte-table/src","children":[{"uid":"6e21-165","name":"placeholder.svelte"},{"uid":"6e21-167","name":"placeholder.ts"},{"uid":"6e21-169","name":"render-component.ts"},{"uid":"6e21-171","name":"index.ts"}]}]}]}],"isRoot":true},"nodeParts":{"6e21-163":{"renderedLength":138742,"gzipLength":23601,"brotliLength":0,"mainUid":"6e21-162"},"6e21-165":{"renderedLength":927,"gzipLength":445,"brotliLength":0,"mainUid":"6e21-164"},"6e21-167":{"renderedLength":246,"gzipLength":184,"brotliLength":0,"mainUid":"6e21-166"},"6e21-169":{"renderedLength":1458,"gzipLength":539,"brotliLength":0,"mainUid":"6e21-168"},"6e21-171":{"renderedLength":3046,"gzipLength":993,"brotliLength":0,"mainUid":"6e21-170"}},"nodeMetas":{"6e21-162":{"id":"/packages/table-core/build/esm/index.js","moduleParts":{"index.production.js":"6e21-163"},"imported":[],"importedBy":[{"uid":"6e21-170"}]},"6e21-164":{"id":"/packages/svelte-table/src/placeholder.svelte","moduleParts":{"index.production.js":"6e21-165"},"imported":[{"uid":"6e21-172"}],"importedBy":[{"uid":"6e21-166"}]},"6e21-166":{"id":"/packages/svelte-table/src/placeholder.ts","moduleParts":{"index.production.js":"6e21-167"},"imported":[{"uid":"6e21-172"},{"uid":"6e21-164"}],"importedBy":[{"uid":"6e21-170"}]},"6e21-168":{"id":"/packages/svelte-table/src/render-component.ts","moduleParts":{"index.production.js":"6e21-169"},"imported":[{"uid":"6e21-172"}],"importedBy":[{"uid":"6e21-170"}]},"6e21-170":{"id":"/packages/svelte-table/src/index.ts","moduleParts":{"index.production.js":"6e21-171"},"imported":[{"uid":"6e21-162"},{"uid":"6e21-166"},{"uid":"6e21-172"},{"uid":"6e21-173"},{"uid":"6e21-168"}],"importedBy":[],"isEntry":true},"6e21-172":{"id":"svelte/internal","moduleParts":{},"imported":[],"importedBy":[{"uid":"6e21-170"},{"uid":"6e21-166"},{"uid":"6e21-168"},{"uid":"6e21-164"}],"isExternal":true},"6e21-173":{"id":"svelte/store","moduleParts":{},"imported":[],"importedBy":[{"uid":"6e21-170"}],"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,25 +11,25 @@
11
11
  "children": [
12
12
  {
13
13
  "name": "table-core/build/esm/index.js",
14
- "uid": "779a-175"
14
+ "uid": "6e21-175"
15
15
  },
16
16
  {
17
17
  "name": "svelte-table/src",
18
18
  "children": [
19
19
  {
20
- "uid": "779a-177",
20
+ "uid": "6e21-177",
21
21
  "name": "placeholder.svelte"
22
22
  },
23
23
  {
24
- "uid": "779a-179",
24
+ "uid": "6e21-179",
25
25
  "name": "placeholder.ts"
26
26
  },
27
27
  {
28
- "uid": "779a-181",
28
+ "uid": "6e21-181",
29
29
  "name": "render-component.ts"
30
30
  },
31
31
  {
32
- "uid": "779a-183",
32
+ "uid": "6e21-183",
33
33
  "name": "index.ts"
34
34
  }
35
35
  ]
@@ -42,153 +42,153 @@
42
42
  "isRoot": true
43
43
  },
44
44
  "nodeParts": {
45
- "779a-175": {
46
- "renderedLength": 138804,
47
- "gzipLength": 23617,
45
+ "6e21-175": {
46
+ "renderedLength": 138742,
47
+ "gzipLength": 23601,
48
48
  "brotliLength": 0,
49
- "mainUid": "779a-174"
49
+ "mainUid": "6e21-174"
50
50
  },
51
- "779a-177": {
51
+ "6e21-177": {
52
52
  "renderedLength": 927,
53
53
  "gzipLength": 445,
54
54
  "brotliLength": 0,
55
- "mainUid": "779a-176"
55
+ "mainUid": "6e21-176"
56
56
  },
57
- "779a-179": {
57
+ "6e21-179": {
58
58
  "renderedLength": 246,
59
59
  "gzipLength": 184,
60
60
  "brotliLength": 0,
61
- "mainUid": "779a-178"
61
+ "mainUid": "6e21-178"
62
62
  },
63
- "779a-181": {
63
+ "6e21-181": {
64
64
  "renderedLength": 1458,
65
65
  "gzipLength": 539,
66
66
  "brotliLength": 0,
67
- "mainUid": "779a-180"
67
+ "mainUid": "6e21-180"
68
68
  },
69
- "779a-183": {
69
+ "6e21-183": {
70
70
  "renderedLength": 3046,
71
71
  "gzipLength": 993,
72
72
  "brotliLength": 0,
73
- "mainUid": "779a-182"
73
+ "mainUid": "6e21-182"
74
74
  }
75
75
  },
76
76
  "nodeMetas": {
77
- "779a-174": {
77
+ "6e21-174": {
78
78
  "id": "/packages/table-core/build/esm/index.js",
79
79
  "moduleParts": {
80
- "index.production.js": "779a-175"
80
+ "index.production.js": "6e21-175"
81
81
  },
82
82
  "imported": [],
83
83
  "importedBy": [
84
84
  {
85
- "uid": "779a-182"
85
+ "uid": "6e21-182"
86
86
  }
87
87
  ]
88
88
  },
89
- "779a-176": {
89
+ "6e21-176": {
90
90
  "id": "/packages/svelte-table/src/placeholder.svelte",
91
91
  "moduleParts": {
92
- "index.production.js": "779a-177"
92
+ "index.production.js": "6e21-177"
93
93
  },
94
94
  "imported": [
95
95
  {
96
- "uid": "779a-184"
96
+ "uid": "6e21-184"
97
97
  }
98
98
  ],
99
99
  "importedBy": [
100
100
  {
101
- "uid": "779a-178"
101
+ "uid": "6e21-178"
102
102
  }
103
103
  ]
104
104
  },
105
- "779a-178": {
105
+ "6e21-178": {
106
106
  "id": "/packages/svelte-table/src/placeholder.ts",
107
107
  "moduleParts": {
108
- "index.production.js": "779a-179"
108
+ "index.production.js": "6e21-179"
109
109
  },
110
110
  "imported": [
111
111
  {
112
- "uid": "779a-184"
112
+ "uid": "6e21-184"
113
113
  },
114
114
  {
115
- "uid": "779a-176"
115
+ "uid": "6e21-176"
116
116
  }
117
117
  ],
118
118
  "importedBy": [
119
119
  {
120
- "uid": "779a-182"
120
+ "uid": "6e21-182"
121
121
  }
122
122
  ]
123
123
  },
124
- "779a-180": {
124
+ "6e21-180": {
125
125
  "id": "/packages/svelte-table/src/render-component.ts",
126
126
  "moduleParts": {
127
- "index.production.js": "779a-181"
127
+ "index.production.js": "6e21-181"
128
128
  },
129
129
  "imported": [
130
130
  {
131
- "uid": "779a-184"
131
+ "uid": "6e21-184"
132
132
  }
133
133
  ],
134
134
  "importedBy": [
135
135
  {
136
- "uid": "779a-182"
136
+ "uid": "6e21-182"
137
137
  }
138
138
  ]
139
139
  },
140
- "779a-182": {
140
+ "6e21-182": {
141
141
  "id": "/packages/svelte-table/src/index.ts",
142
142
  "moduleParts": {
143
- "index.production.js": "779a-183"
143
+ "index.production.js": "6e21-183"
144
144
  },
145
145
  "imported": [
146
146
  {
147
- "uid": "779a-174"
147
+ "uid": "6e21-174"
148
148
  },
149
149
  {
150
- "uid": "779a-178"
150
+ "uid": "6e21-178"
151
151
  },
152
152
  {
153
- "uid": "779a-184"
153
+ "uid": "6e21-184"
154
154
  },
155
155
  {
156
- "uid": "779a-185"
156
+ "uid": "6e21-185"
157
157
  },
158
158
  {
159
- "uid": "779a-180"
159
+ "uid": "6e21-180"
160
160
  }
161
161
  ],
162
162
  "importedBy": [],
163
163
  "isEntry": true
164
164
  },
165
- "779a-184": {
165
+ "6e21-184": {
166
166
  "id": "svelte/internal",
167
167
  "moduleParts": {},
168
168
  "imported": [],
169
169
  "importedBy": [
170
170
  {
171
- "uid": "779a-182"
171
+ "uid": "6e21-182"
172
172
  },
173
173
  {
174
- "uid": "779a-178"
174
+ "uid": "6e21-178"
175
175
  },
176
176
  {
177
- "uid": "779a-180"
177
+ "uid": "6e21-180"
178
178
  },
179
179
  {
180
- "uid": "779a-176"
180
+ "uid": "6e21-176"
181
181
  }
182
182
  ],
183
183
  "isExternal": true
184
184
  },
185
- "779a-185": {
185
+ "6e21-185": {
186
186
  "id": "svelte/store",
187
187
  "moduleParts": {},
188
188
  "imported": [],
189
189
  "importedBy": [
190
190
  {
191
- "uid": "779a-182"
191
+ "uid": "6e21-182"
192
192
  }
193
193
  ],
194
194
  "isExternal": true
@@ -1699,7 +1699,7 @@
1699
1699
  setPageIndex: updater => {
1700
1700
  instance.setPagination(old => {
1701
1701
  let pageIndex = functionalUpdate(updater, old.pageIndex);
1702
- const maxPageIndex = typeof old.pageCount !== 'undefined' ? old.pageCount - 1 : Number.MAX_SAFE_INTEGER;
1702
+ const maxPageIndex = typeof instance.options.pageCount !== 'undefined' ? instance.options.pageCount - 1 : Number.MAX_SAFE_INTEGER;
1703
1703
  pageIndex = Math.min(Math.max(0, pageIndex), maxPageIndex);
1704
1704
  return { ...old,
1705
1705
  pageIndex
@@ -1728,9 +1728,9 @@
1728
1728
  });
1729
1729
  },
1730
1730
  setPageCount: updater => instance.setPagination(old => {
1731
- var _old$pageCount;
1731
+ var _instance$options$pag;
1732
1732
 
1733
- let newPageCount = functionalUpdate(updater, (_old$pageCount = old.pageCount) != null ? _old$pageCount : -1);
1733
+ let newPageCount = functionalUpdate(updater, (_instance$options$pag = instance.options.pageCount) != null ? _instance$options$pag : -1);
1734
1734
 
1735
1735
  if (typeof newPageCount === 'number') {
1736
1736
  newPageCount = Math.max(-1, newPageCount);
@@ -1740,7 +1740,7 @@
1740
1740
  pageCount: newPageCount
1741
1741
  };
1742
1742
  }),
1743
- getPageOptions: memo(() => [instance.getState().pagination.pageSize, instance.getState().pagination.pageCount], (pageSize, pageCount) => {
1743
+ getPageOptions: memo(() => [instance.getPageCount()], pageCount => {
1744
1744
  let pageOptions = [];
1745
1745
 
1746
1746
  if (pageCount && pageCount > 0) {
@@ -1794,15 +1794,9 @@
1794
1794
  return instance._getPaginationRowModel();
1795
1795
  },
1796
1796
  getPageCount: () => {
1797
- const {
1798
- pageCount
1799
- } = instance.getState().pagination;
1800
-
1801
- if (typeof pageCount !== 'undefined') {
1802
- return pageCount;
1803
- }
1797
+ var _instance$options$pag2;
1804
1798
 
1805
- return Math.ceil(instance.getPrePaginationRowModel().rows.length / instance.getState().pagination.pageSize);
1799
+ return (_instance$options$pag2 = instance.options.pageCount) != null ? _instance$options$pag2 : Math.ceil(instance.getPrePaginationRowModel().rows.length / instance.getState().pagination.pageSize);
1806
1800
  }
1807
1801
  };
1808
1802
  }