@tanstack/svelte-table 8.3.6 → 8.5.1

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.
@@ -4014,7 +4014,7 @@ var drawChart = (function (exports) {
4014
4014
  </script>
4015
4015
  <script>
4016
4016
  /*<!--*/
4017
- const data = {"version":2,"tree":{"name":"root","children":[{"name":"index.production.js","children":[{"name":"packages","children":[{"name":"table-core/build/esm/index.js","uid":"85a9-163"},{"name":"svelte-table/src","children":[{"uid":"85a9-165","name":"placeholder.svelte"},{"uid":"85a9-167","name":"placeholder.ts"},{"uid":"85a9-169","name":"render-component.ts"},{"uid":"85a9-171","name":"index.ts"}]}]}]}],"isRoot":true},"nodeParts":{"85a9-163":{"renderedLength":136752,"gzipLength":23772,"brotliLength":0,"mainUid":"85a9-162"},"85a9-165":{"renderedLength":927,"gzipLength":445,"brotliLength":0,"mainUid":"85a9-164"},"85a9-167":{"renderedLength":246,"gzipLength":184,"brotliLength":0,"mainUid":"85a9-166"},"85a9-169":{"renderedLength":1458,"gzipLength":539,"brotliLength":0,"mainUid":"85a9-168"},"85a9-171":{"renderedLength":2915,"gzipLength":958,"brotliLength":0,"mainUid":"85a9-170"}},"nodeMetas":{"85a9-162":{"id":"/packages/table-core/build/esm/index.js","moduleParts":{"index.production.js":"85a9-163"},"imported":[],"importedBy":[{"uid":"85a9-170"}]},"85a9-164":{"id":"/packages/svelte-table/src/placeholder.svelte","moduleParts":{"index.production.js":"85a9-165"},"imported":[{"uid":"85a9-172"}],"importedBy":[{"uid":"85a9-166"}]},"85a9-166":{"id":"/packages/svelte-table/src/placeholder.ts","moduleParts":{"index.production.js":"85a9-167"},"imported":[{"uid":"85a9-172"},{"uid":"85a9-164"}],"importedBy":[{"uid":"85a9-170"}]},"85a9-168":{"id":"/packages/svelte-table/src/render-component.ts","moduleParts":{"index.production.js":"85a9-169"},"imported":[{"uid":"85a9-172"}],"importedBy":[{"uid":"85a9-170"}]},"85a9-170":{"id":"/packages/svelte-table/src/index.ts","moduleParts":{"index.production.js":"85a9-171"},"imported":[{"uid":"85a9-162"},{"uid":"85a9-166"},{"uid":"85a9-172"},{"uid":"85a9-173"},{"uid":"85a9-168"}],"importedBy":[],"isEntry":true},"85a9-172":{"id":"svelte/internal","moduleParts":{},"imported":[],"importedBy":[{"uid":"85a9-170"},{"uid":"85a9-166"},{"uid":"85a9-168"},{"uid":"85a9-164"}],"isExternal":true},"85a9-173":{"id":"svelte/store","moduleParts":{},"imported":[],"importedBy":[{"uid":"85a9-170"}],"isExternal":true}},"env":{"rollup":"2.77.1"},"options":{"gzip":true,"brotli":false,"sourcemap":false}};
4017
+ const data = {"version":2,"tree":{"name":"root","children":[{"name":"index.production.js","children":[{"name":"packages","children":[{"name":"table-core/build/esm/index.js","uid":"fb70-163"},{"name":"svelte-table/src","children":[{"uid":"fb70-165","name":"placeholder.svelte"},{"uid":"fb70-167","name":"placeholder.ts"},{"uid":"fb70-169","name":"render-component.ts"},{"uid":"fb70-171","name":"index.ts"}]}]}]}],"isRoot":true},"nodeParts":{"fb70-163":{"renderedLength":137857,"gzipLength":23944,"brotliLength":0,"mainUid":"fb70-162"},"fb70-165":{"renderedLength":927,"gzipLength":445,"brotliLength":0,"mainUid":"fb70-164"},"fb70-167":{"renderedLength":246,"gzipLength":184,"brotliLength":0,"mainUid":"fb70-166"},"fb70-169":{"renderedLength":1458,"gzipLength":539,"brotliLength":0,"mainUid":"fb70-168"},"fb70-171":{"renderedLength":2915,"gzipLength":958,"brotliLength":0,"mainUid":"fb70-170"}},"nodeMetas":{"fb70-162":{"id":"/packages/table-core/build/esm/index.js","moduleParts":{"index.production.js":"fb70-163"},"imported":[],"importedBy":[{"uid":"fb70-170"}]},"fb70-164":{"id":"/packages/svelte-table/src/placeholder.svelte","moduleParts":{"index.production.js":"fb70-165"},"imported":[{"uid":"fb70-172"}],"importedBy":[{"uid":"fb70-166"}]},"fb70-166":{"id":"/packages/svelte-table/src/placeholder.ts","moduleParts":{"index.production.js":"fb70-167"},"imported":[{"uid":"fb70-172"},{"uid":"fb70-164"}],"importedBy":[{"uid":"fb70-170"}]},"fb70-168":{"id":"/packages/svelte-table/src/render-component.ts","moduleParts":{"index.production.js":"fb70-169"},"imported":[{"uid":"fb70-172"}],"importedBy":[{"uid":"fb70-170"}]},"fb70-170":{"id":"/packages/svelte-table/src/index.ts","moduleParts":{"index.production.js":"fb70-171"},"imported":[{"uid":"fb70-162"},{"uid":"fb70-166"},{"uid":"fb70-172"},{"uid":"fb70-173"},{"uid":"fb70-168"}],"importedBy":[],"isEntry":true},"fb70-172":{"id":"svelte/internal","moduleParts":{},"imported":[],"importedBy":[{"uid":"fb70-170"},{"uid":"fb70-166"},{"uid":"fb70-168"},{"uid":"fb70-164"}],"isExternal":true},"fb70-173":{"id":"svelte/store","moduleParts":{},"imported":[],"importedBy":[{"uid":"fb70-170"}],"isExternal":true}},"env":{"rollup":"2.77.2"},"options":{"gzip":true,"brotli":false,"sourcemap":false}};
4018
4018
 
4019
4019
  const run = () => {
4020
4020
  const width = window.innerWidth;
@@ -11,25 +11,25 @@
11
11
  "children": [
12
12
  {
13
13
  "name": "table-core/build/esm/index.js",
14
- "uid": "85a9-175"
14
+ "uid": "fb70-175"
15
15
  },
16
16
  {
17
17
  "name": "svelte-table/src",
18
18
  "children": [
19
19
  {
20
- "uid": "85a9-177",
20
+ "uid": "fb70-177",
21
21
  "name": "placeholder.svelte"
22
22
  },
23
23
  {
24
- "uid": "85a9-179",
24
+ "uid": "fb70-179",
25
25
  "name": "placeholder.ts"
26
26
  },
27
27
  {
28
- "uid": "85a9-181",
28
+ "uid": "fb70-181",
29
29
  "name": "render-component.ts"
30
30
  },
31
31
  {
32
- "uid": "85a9-183",
32
+ "uid": "fb70-183",
33
33
  "name": "index.ts"
34
34
  }
35
35
  ]
@@ -42,160 +42,160 @@
42
42
  "isRoot": true
43
43
  },
44
44
  "nodeParts": {
45
- "85a9-175": {
46
- "renderedLength": 136752,
47
- "gzipLength": 23772,
45
+ "fb70-175": {
46
+ "renderedLength": 137857,
47
+ "gzipLength": 23944,
48
48
  "brotliLength": 0,
49
- "mainUid": "85a9-174"
49
+ "mainUid": "fb70-174"
50
50
  },
51
- "85a9-177": {
51
+ "fb70-177": {
52
52
  "renderedLength": 927,
53
53
  "gzipLength": 445,
54
54
  "brotliLength": 0,
55
- "mainUid": "85a9-176"
55
+ "mainUid": "fb70-176"
56
56
  },
57
- "85a9-179": {
57
+ "fb70-179": {
58
58
  "renderedLength": 246,
59
59
  "gzipLength": 184,
60
60
  "brotliLength": 0,
61
- "mainUid": "85a9-178"
61
+ "mainUid": "fb70-178"
62
62
  },
63
- "85a9-181": {
63
+ "fb70-181": {
64
64
  "renderedLength": 1458,
65
65
  "gzipLength": 539,
66
66
  "brotliLength": 0,
67
- "mainUid": "85a9-180"
67
+ "mainUid": "fb70-180"
68
68
  },
69
- "85a9-183": {
69
+ "fb70-183": {
70
70
  "renderedLength": 2915,
71
71
  "gzipLength": 958,
72
72
  "brotliLength": 0,
73
- "mainUid": "85a9-182"
73
+ "mainUid": "fb70-182"
74
74
  }
75
75
  },
76
76
  "nodeMetas": {
77
- "85a9-174": {
77
+ "fb70-174": {
78
78
  "id": "/packages/table-core/build/esm/index.js",
79
79
  "moduleParts": {
80
- "index.production.js": "85a9-175"
80
+ "index.production.js": "fb70-175"
81
81
  },
82
82
  "imported": [],
83
83
  "importedBy": [
84
84
  {
85
- "uid": "85a9-182"
85
+ "uid": "fb70-182"
86
86
  }
87
87
  ]
88
88
  },
89
- "85a9-176": {
89
+ "fb70-176": {
90
90
  "id": "/packages/svelte-table/src/placeholder.svelte",
91
91
  "moduleParts": {
92
- "index.production.js": "85a9-177"
92
+ "index.production.js": "fb70-177"
93
93
  },
94
94
  "imported": [
95
95
  {
96
- "uid": "85a9-184"
96
+ "uid": "fb70-184"
97
97
  }
98
98
  ],
99
99
  "importedBy": [
100
100
  {
101
- "uid": "85a9-178"
101
+ "uid": "fb70-178"
102
102
  }
103
103
  ]
104
104
  },
105
- "85a9-178": {
105
+ "fb70-178": {
106
106
  "id": "/packages/svelte-table/src/placeholder.ts",
107
107
  "moduleParts": {
108
- "index.production.js": "85a9-179"
108
+ "index.production.js": "fb70-179"
109
109
  },
110
110
  "imported": [
111
111
  {
112
- "uid": "85a9-184"
112
+ "uid": "fb70-184"
113
113
  },
114
114
  {
115
- "uid": "85a9-176"
115
+ "uid": "fb70-176"
116
116
  }
117
117
  ],
118
118
  "importedBy": [
119
119
  {
120
- "uid": "85a9-182"
120
+ "uid": "fb70-182"
121
121
  }
122
122
  ]
123
123
  },
124
- "85a9-180": {
124
+ "fb70-180": {
125
125
  "id": "/packages/svelte-table/src/render-component.ts",
126
126
  "moduleParts": {
127
- "index.production.js": "85a9-181"
127
+ "index.production.js": "fb70-181"
128
128
  },
129
129
  "imported": [
130
130
  {
131
- "uid": "85a9-184"
131
+ "uid": "fb70-184"
132
132
  }
133
133
  ],
134
134
  "importedBy": [
135
135
  {
136
- "uid": "85a9-182"
136
+ "uid": "fb70-182"
137
137
  }
138
138
  ]
139
139
  },
140
- "85a9-182": {
140
+ "fb70-182": {
141
141
  "id": "/packages/svelte-table/src/index.ts",
142
142
  "moduleParts": {
143
- "index.production.js": "85a9-183"
143
+ "index.production.js": "fb70-183"
144
144
  },
145
145
  "imported": [
146
146
  {
147
- "uid": "85a9-174"
147
+ "uid": "fb70-174"
148
148
  },
149
149
  {
150
- "uid": "85a9-178"
150
+ "uid": "fb70-178"
151
151
  },
152
152
  {
153
- "uid": "85a9-184"
153
+ "uid": "fb70-184"
154
154
  },
155
155
  {
156
- "uid": "85a9-185"
156
+ "uid": "fb70-185"
157
157
  },
158
158
  {
159
- "uid": "85a9-180"
159
+ "uid": "fb70-180"
160
160
  }
161
161
  ],
162
162
  "importedBy": [],
163
163
  "isEntry": true
164
164
  },
165
- "85a9-184": {
165
+ "fb70-184": {
166
166
  "id": "svelte/internal",
167
167
  "moduleParts": {},
168
168
  "imported": [],
169
169
  "importedBy": [
170
170
  {
171
- "uid": "85a9-182"
171
+ "uid": "fb70-182"
172
172
  },
173
173
  {
174
- "uid": "85a9-178"
174
+ "uid": "fb70-178"
175
175
  },
176
176
  {
177
- "uid": "85a9-180"
177
+ "uid": "fb70-180"
178
178
  },
179
179
  {
180
- "uid": "85a9-176"
180
+ "uid": "fb70-176"
181
181
  }
182
182
  ],
183
183
  "isExternal": true
184
184
  },
185
- "85a9-185": {
185
+ "fb70-185": {
186
186
  "id": "svelte/store",
187
187
  "moduleParts": {},
188
188
  "imported": [],
189
189
  "importedBy": [
190
190
  {
191
- "uid": "85a9-182"
191
+ "uid": "fb70-182"
192
192
  }
193
193
  ],
194
194
  "isExternal": true
195
195
  }
196
196
  },
197
197
  "env": {
198
- "rollup": "2.77.1"
198
+ "rollup": "2.77.2"
199
199
  },
200
200
  "options": {
201
201
  "gzip": true,
@@ -1159,7 +1159,9 @@
1159
1159
  return filterFns.weakEquals;
1160
1160
  },
1161
1161
  getFilterFn: () => {
1162
- return isFunction(column.columnDef.filterFn) ? column.columnDef.filterFn : column.columnDef.filterFn === 'auto' ? column.getAutoFilterFn() : filterFns[column.columnDef.filterFn];
1162
+ var _table$options$filter, _table$options$filter2;
1163
+
1164
+ return isFunction(column.columnDef.filterFn) ? column.columnDef.filterFn : column.columnDef.filterFn === 'auto' ? column.getAutoFilterFn() : (_table$options$filter = (_table$options$filter2 = table.options.filterFns) == null ? void 0 : _table$options$filter2[column.columnDef.filterFn]) != null ? _table$options$filter : filterFns[column.columnDef.filterFn];
1163
1165
  },
1164
1166
  getCanFilter: () => {
1165
1167
  var _column$columnDef$ena, _table$options$enable, _table$options$enable2;
@@ -1258,10 +1260,12 @@
1258
1260
  return filterFns.includesString;
1259
1261
  },
1260
1262
  getGlobalFilterFn: () => {
1263
+ var _table$options$filter3, _table$options$filter4;
1264
+
1261
1265
  const {
1262
1266
  globalFilterFn: globalFilterFn
1263
1267
  } = table.options;
1264
- return isFunction(globalFilterFn) ? globalFilterFn : globalFilterFn === 'auto' ? table.getGlobalAutoFilterFn() : filterFns[globalFilterFn];
1268
+ return isFunction(globalFilterFn) ? globalFilterFn : globalFilterFn === 'auto' ? table.getGlobalAutoFilterFn() : (_table$options$filter3 = (_table$options$filter4 = table.options.filterFns) == null ? void 0 : _table$options$filter4[globalFilterFn]) != null ? _table$options$filter3 : filterFns[globalFilterFn];
1265
1269
  },
1266
1270
  setColumnFilters: updater => {
1267
1271
  const leafColumns = table.getAllLeafColumns();
@@ -1298,8 +1302,11 @@
1298
1302
  table.setColumnFilters(defaultState ? [] : (_table$initialState$c = (_table$initialState = table.initialState) == null ? void 0 : _table$initialState.columnFilters) != null ? _table$initialState$c : []);
1299
1303
  },
1300
1304
  getPreFilteredRowModel: () => table.getCoreRowModel(),
1301
- _getFilteredRowModel: table.options.getFilteredRowModel && table.options.getFilteredRowModel(table),
1302
1305
  getFilteredRowModel: () => {
1306
+ if (!table._getFilteredRowModel && table.options.getFilteredRowModel) {
1307
+ table._getFilteredRowModel = table.options.getFilteredRowModel(table);
1308
+ }
1309
+
1303
1310
  if (table.options.manualFiltering || !table._getFilteredRowModel) {
1304
1311
  return table.getPreFilteredRowModel();
1305
1312
  }
@@ -1515,11 +1522,13 @@
1515
1522
  }
1516
1523
  },
1517
1524
  getAggregationFn: () => {
1525
+ var _table$options$aggreg, _table$options$aggreg2;
1526
+
1518
1527
  if (!column) {
1519
1528
  throw new Error();
1520
1529
  }
1521
1530
 
1522
- return isFunction(column.columnDef.aggregationFn) ? column.columnDef.aggregationFn : column.columnDef.aggregationFn === 'auto' ? column.getAutoAggregationFn() : aggregationFns[column.columnDef.aggregationFn];
1531
+ return isFunction(column.columnDef.aggregationFn) ? column.columnDef.aggregationFn : column.columnDef.aggregationFn === 'auto' ? column.getAutoAggregationFn() : (_table$options$aggreg = (_table$options$aggreg2 = table.options.aggregationFns) == null ? void 0 : _table$options$aggreg2[column.columnDef.aggregationFn]) != null ? _table$options$aggreg : aggregationFns[column.columnDef.aggregationFn];
1523
1532
  }
1524
1533
  };
1525
1534
  },
@@ -2536,11 +2545,13 @@
2536
2545
  return 'desc';
2537
2546
  },
2538
2547
  getSortingFn: () => {
2548
+ var _table$options$sortin, _table$options$sortin2;
2549
+
2539
2550
  if (!column) {
2540
2551
  throw new Error();
2541
2552
  }
2542
2553
 
2543
- return isFunction(column.columnDef.sortingFn) ? column.columnDef.sortingFn : column.columnDef.sortingFn === 'auto' ? column.getAutoSortingFn() : sortingFns[column.columnDef.sortingFn];
2554
+ return isFunction(column.columnDef.sortingFn) ? column.columnDef.sortingFn : column.columnDef.sortingFn === 'auto' ? column.getAutoSortingFn() : (_table$options$sortin = (_table$options$sortin2 = table.options.sortingFns) == null ? void 0 : _table$options$sortin2[column.columnDef.sortingFn]) != null ? _table$options$sortin : sortingFns[column.columnDef.sortingFn];
2544
2555
  },
2545
2556
  toggleSorting: (desc, multi) => {
2546
2557
  // if (column.columns.length) {
@@ -3161,7 +3172,9 @@
3161
3172
  } : { ...column,
3162
3173
  accessorKey: accessor
3163
3174
  };
3164
- }
3175
+ },
3176
+ display: column => column,
3177
+ group: column => column
3165
3178
  };
3166
3179
  }
3167
3180