@tanstack/svelte-table 8.4.0 → 8.5.2
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.
- package/build/cjs/table-core/build/esm/index.js +32 -8
- package/build/cjs/table-core/build/esm/index.js.map +1 -1
- package/build/esm/index.js +32 -8
- package/build/esm/index.js.map +1 -1
- package/build/stats-html.html +1 -1
- package/build/stats-react.json +48 -48
- package/build/umd/index.development.js +32 -8
- package/build/umd/index.development.js.map +1 -1
- package/build/umd/index.production.js +1 -1
- package/build/umd/index.production.js.map +1 -1
- package/package.json +2 -2
package/build/stats-html.html
CHANGED
|
@@ -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":"
|
|
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":"6455-163"},{"name":"svelte-table/src","children":[{"uid":"6455-165","name":"placeholder.svelte"},{"uid":"6455-167","name":"placeholder.ts"},{"uid":"6455-169","name":"render-component.ts"},{"uid":"6455-171","name":"index.ts"}]}]}]}],"isRoot":true},"nodeParts":{"6455-163":{"renderedLength":138168,"gzipLength":23982,"brotliLength":0,"mainUid":"6455-162"},"6455-165":{"renderedLength":927,"gzipLength":445,"brotliLength":0,"mainUid":"6455-164"},"6455-167":{"renderedLength":246,"gzipLength":184,"brotliLength":0,"mainUid":"6455-166"},"6455-169":{"renderedLength":1458,"gzipLength":539,"brotliLength":0,"mainUid":"6455-168"},"6455-171":{"renderedLength":2915,"gzipLength":958,"brotliLength":0,"mainUid":"6455-170"}},"nodeMetas":{"6455-162":{"id":"/packages/table-core/build/esm/index.js","moduleParts":{"index.production.js":"6455-163"},"imported":[],"importedBy":[{"uid":"6455-170"}]},"6455-164":{"id":"/packages/svelte-table/src/placeholder.svelte","moduleParts":{"index.production.js":"6455-165"},"imported":[{"uid":"6455-172"}],"importedBy":[{"uid":"6455-166"}]},"6455-166":{"id":"/packages/svelte-table/src/placeholder.ts","moduleParts":{"index.production.js":"6455-167"},"imported":[{"uid":"6455-172"},{"uid":"6455-164"}],"importedBy":[{"uid":"6455-170"}]},"6455-168":{"id":"/packages/svelte-table/src/render-component.ts","moduleParts":{"index.production.js":"6455-169"},"imported":[{"uid":"6455-172"}],"importedBy":[{"uid":"6455-170"}]},"6455-170":{"id":"/packages/svelte-table/src/index.ts","moduleParts":{"index.production.js":"6455-171"},"imported":[{"uid":"6455-162"},{"uid":"6455-166"},{"uid":"6455-172"},{"uid":"6455-173"},{"uid":"6455-168"}],"importedBy":[],"isEntry":true},"6455-172":{"id":"svelte/internal","moduleParts":{},"imported":[],"importedBy":[{"uid":"6455-170"},{"uid":"6455-166"},{"uid":"6455-168"},{"uid":"6455-164"}],"isExternal":true},"6455-173":{"id":"svelte/store","moduleParts":{},"imported":[],"importedBy":[{"uid":"6455-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;
|
package/build/stats-react.json
CHANGED
|
@@ -11,25 +11,25 @@
|
|
|
11
11
|
"children": [
|
|
12
12
|
{
|
|
13
13
|
"name": "table-core/build/esm/index.js",
|
|
14
|
-
"uid": "
|
|
14
|
+
"uid": "6455-175"
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
"name": "svelte-table/src",
|
|
18
18
|
"children": [
|
|
19
19
|
{
|
|
20
|
-
"uid": "
|
|
20
|
+
"uid": "6455-177",
|
|
21
21
|
"name": "placeholder.svelte"
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
|
-
"uid": "
|
|
24
|
+
"uid": "6455-179",
|
|
25
25
|
"name": "placeholder.ts"
|
|
26
26
|
},
|
|
27
27
|
{
|
|
28
|
-
"uid": "
|
|
28
|
+
"uid": "6455-181",
|
|
29
29
|
"name": "render-component.ts"
|
|
30
30
|
},
|
|
31
31
|
{
|
|
32
|
-
"uid": "
|
|
32
|
+
"uid": "6455-183",
|
|
33
33
|
"name": "index.ts"
|
|
34
34
|
}
|
|
35
35
|
]
|
|
@@ -42,160 +42,160 @@
|
|
|
42
42
|
"isRoot": true
|
|
43
43
|
},
|
|
44
44
|
"nodeParts": {
|
|
45
|
-
"
|
|
46
|
-
"renderedLength":
|
|
47
|
-
"gzipLength":
|
|
45
|
+
"6455-175": {
|
|
46
|
+
"renderedLength": 138168,
|
|
47
|
+
"gzipLength": 23982,
|
|
48
48
|
"brotliLength": 0,
|
|
49
|
-
"mainUid": "
|
|
49
|
+
"mainUid": "6455-174"
|
|
50
50
|
},
|
|
51
|
-
"
|
|
51
|
+
"6455-177": {
|
|
52
52
|
"renderedLength": 927,
|
|
53
53
|
"gzipLength": 445,
|
|
54
54
|
"brotliLength": 0,
|
|
55
|
-
"mainUid": "
|
|
55
|
+
"mainUid": "6455-176"
|
|
56
56
|
},
|
|
57
|
-
"
|
|
57
|
+
"6455-179": {
|
|
58
58
|
"renderedLength": 246,
|
|
59
59
|
"gzipLength": 184,
|
|
60
60
|
"brotliLength": 0,
|
|
61
|
-
"mainUid": "
|
|
61
|
+
"mainUid": "6455-178"
|
|
62
62
|
},
|
|
63
|
-
"
|
|
63
|
+
"6455-181": {
|
|
64
64
|
"renderedLength": 1458,
|
|
65
65
|
"gzipLength": 539,
|
|
66
66
|
"brotliLength": 0,
|
|
67
|
-
"mainUid": "
|
|
67
|
+
"mainUid": "6455-180"
|
|
68
68
|
},
|
|
69
|
-
"
|
|
69
|
+
"6455-183": {
|
|
70
70
|
"renderedLength": 2915,
|
|
71
71
|
"gzipLength": 958,
|
|
72
72
|
"brotliLength": 0,
|
|
73
|
-
"mainUid": "
|
|
73
|
+
"mainUid": "6455-182"
|
|
74
74
|
}
|
|
75
75
|
},
|
|
76
76
|
"nodeMetas": {
|
|
77
|
-
"
|
|
77
|
+
"6455-174": {
|
|
78
78
|
"id": "/packages/table-core/build/esm/index.js",
|
|
79
79
|
"moduleParts": {
|
|
80
|
-
"index.production.js": "
|
|
80
|
+
"index.production.js": "6455-175"
|
|
81
81
|
},
|
|
82
82
|
"imported": [],
|
|
83
83
|
"importedBy": [
|
|
84
84
|
{
|
|
85
|
-
"uid": "
|
|
85
|
+
"uid": "6455-182"
|
|
86
86
|
}
|
|
87
87
|
]
|
|
88
88
|
},
|
|
89
|
-
"
|
|
89
|
+
"6455-176": {
|
|
90
90
|
"id": "/packages/svelte-table/src/placeholder.svelte",
|
|
91
91
|
"moduleParts": {
|
|
92
|
-
"index.production.js": "
|
|
92
|
+
"index.production.js": "6455-177"
|
|
93
93
|
},
|
|
94
94
|
"imported": [
|
|
95
95
|
{
|
|
96
|
-
"uid": "
|
|
96
|
+
"uid": "6455-184"
|
|
97
97
|
}
|
|
98
98
|
],
|
|
99
99
|
"importedBy": [
|
|
100
100
|
{
|
|
101
|
-
"uid": "
|
|
101
|
+
"uid": "6455-178"
|
|
102
102
|
}
|
|
103
103
|
]
|
|
104
104
|
},
|
|
105
|
-
"
|
|
105
|
+
"6455-178": {
|
|
106
106
|
"id": "/packages/svelte-table/src/placeholder.ts",
|
|
107
107
|
"moduleParts": {
|
|
108
|
-
"index.production.js": "
|
|
108
|
+
"index.production.js": "6455-179"
|
|
109
109
|
},
|
|
110
110
|
"imported": [
|
|
111
111
|
{
|
|
112
|
-
"uid": "
|
|
112
|
+
"uid": "6455-184"
|
|
113
113
|
},
|
|
114
114
|
{
|
|
115
|
-
"uid": "
|
|
115
|
+
"uid": "6455-176"
|
|
116
116
|
}
|
|
117
117
|
],
|
|
118
118
|
"importedBy": [
|
|
119
119
|
{
|
|
120
|
-
"uid": "
|
|
120
|
+
"uid": "6455-182"
|
|
121
121
|
}
|
|
122
122
|
]
|
|
123
123
|
},
|
|
124
|
-
"
|
|
124
|
+
"6455-180": {
|
|
125
125
|
"id": "/packages/svelte-table/src/render-component.ts",
|
|
126
126
|
"moduleParts": {
|
|
127
|
-
"index.production.js": "
|
|
127
|
+
"index.production.js": "6455-181"
|
|
128
128
|
},
|
|
129
129
|
"imported": [
|
|
130
130
|
{
|
|
131
|
-
"uid": "
|
|
131
|
+
"uid": "6455-184"
|
|
132
132
|
}
|
|
133
133
|
],
|
|
134
134
|
"importedBy": [
|
|
135
135
|
{
|
|
136
|
-
"uid": "
|
|
136
|
+
"uid": "6455-182"
|
|
137
137
|
}
|
|
138
138
|
]
|
|
139
139
|
},
|
|
140
|
-
"
|
|
140
|
+
"6455-182": {
|
|
141
141
|
"id": "/packages/svelte-table/src/index.ts",
|
|
142
142
|
"moduleParts": {
|
|
143
|
-
"index.production.js": "
|
|
143
|
+
"index.production.js": "6455-183"
|
|
144
144
|
},
|
|
145
145
|
"imported": [
|
|
146
146
|
{
|
|
147
|
-
"uid": "
|
|
147
|
+
"uid": "6455-174"
|
|
148
148
|
},
|
|
149
149
|
{
|
|
150
|
-
"uid": "
|
|
150
|
+
"uid": "6455-178"
|
|
151
151
|
},
|
|
152
152
|
{
|
|
153
|
-
"uid": "
|
|
153
|
+
"uid": "6455-184"
|
|
154
154
|
},
|
|
155
155
|
{
|
|
156
|
-
"uid": "
|
|
156
|
+
"uid": "6455-185"
|
|
157
157
|
},
|
|
158
158
|
{
|
|
159
|
-
"uid": "
|
|
159
|
+
"uid": "6455-180"
|
|
160
160
|
}
|
|
161
161
|
],
|
|
162
162
|
"importedBy": [],
|
|
163
163
|
"isEntry": true
|
|
164
164
|
},
|
|
165
|
-
"
|
|
165
|
+
"6455-184": {
|
|
166
166
|
"id": "svelte/internal",
|
|
167
167
|
"moduleParts": {},
|
|
168
168
|
"imported": [],
|
|
169
169
|
"importedBy": [
|
|
170
170
|
{
|
|
171
|
-
"uid": "
|
|
171
|
+
"uid": "6455-182"
|
|
172
172
|
},
|
|
173
173
|
{
|
|
174
|
-
"uid": "
|
|
174
|
+
"uid": "6455-178"
|
|
175
175
|
},
|
|
176
176
|
{
|
|
177
|
-
"uid": "
|
|
177
|
+
"uid": "6455-180"
|
|
178
178
|
},
|
|
179
179
|
{
|
|
180
|
-
"uid": "
|
|
180
|
+
"uid": "6455-176"
|
|
181
181
|
}
|
|
182
182
|
],
|
|
183
183
|
"isExternal": true
|
|
184
184
|
},
|
|
185
|
-
"
|
|
185
|
+
"6455-185": {
|
|
186
186
|
"id": "svelte/store",
|
|
187
187
|
"moduleParts": {},
|
|
188
188
|
"imported": [],
|
|
189
189
|
"importedBy": [
|
|
190
190
|
{
|
|
191
|
-
"uid": "
|
|
191
|
+
"uid": "6455-182"
|
|
192
192
|
}
|
|
193
193
|
],
|
|
194
194
|
"isExternal": true
|
|
195
195
|
}
|
|
196
196
|
},
|
|
197
197
|
"env": {
|
|
198
|
-
"rollup": "2.77.
|
|
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
|
-
|
|
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) {
|
|
@@ -2924,8 +2935,20 @@
|
|
|
2924
2935
|
|
|
2925
2936
|
defaultColumn = (_defaultColumn = defaultColumn) != null ? _defaultColumn : {};
|
|
2926
2937
|
return {
|
|
2927
|
-
header: props =>
|
|
2928
|
-
|
|
2938
|
+
header: props => {
|
|
2939
|
+
const resolvedColumnDef = props.header.column.columnDef;
|
|
2940
|
+
|
|
2941
|
+
if (resolvedColumnDef.accessorKey) {
|
|
2942
|
+
return resolvedColumnDef.accessorKey;
|
|
2943
|
+
}
|
|
2944
|
+
|
|
2945
|
+
if (resolvedColumnDef.accessorFn) {
|
|
2946
|
+
return resolvedColumnDef.id;
|
|
2947
|
+
}
|
|
2948
|
+
|
|
2949
|
+
return null;
|
|
2950
|
+
},
|
|
2951
|
+
// footer: props => props.header.column.id,
|
|
2929
2952
|
cell: props => {
|
|
2930
2953
|
var _props$renderValue$to, _props$renderValue;
|
|
2931
2954
|
|
|
@@ -3162,7 +3185,8 @@
|
|
|
3162
3185
|
accessorKey: accessor
|
|
3163
3186
|
};
|
|
3164
3187
|
},
|
|
3165
|
-
display: column => column
|
|
3188
|
+
display: column => column,
|
|
3189
|
+
group: column => column
|
|
3166
3190
|
};
|
|
3167
3191
|
}
|
|
3168
3192
|
|