@tanstack/svelte-table 8.5.2 → 8.5.5
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 +7 -5
- package/build/cjs/table-core/build/esm/index.js.map +1 -1
- package/build/esm/index.js +7 -5
- package/build/esm/index.js.map +1 -1
- package/build/stats-html.html +1 -1
- package/build/stats-react.json +47 -47
- package/build/umd/index.development.js +7 -5
- 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":"7e4d-163"},{"name":"svelte-table/src","children":[{"uid":"7e4d-165","name":"placeholder.svelte"},{"uid":"7e4d-167","name":"placeholder.ts"},{"uid":"7e4d-169","name":"render-component.ts"},{"uid":"7e4d-171","name":"index.ts"}]}]}]}],"isRoot":true},"nodeParts":{"7e4d-163":{"renderedLength":138254,"gzipLength":23997,"brotliLength":0,"mainUid":"7e4d-162"},"7e4d-165":{"renderedLength":927,"gzipLength":445,"brotliLength":0,"mainUid":"7e4d-164"},"7e4d-167":{"renderedLength":246,"gzipLength":184,"brotliLength":0,"mainUid":"7e4d-166"},"7e4d-169":{"renderedLength":1458,"gzipLength":539,"brotliLength":0,"mainUid":"7e4d-168"},"7e4d-171":{"renderedLength":2915,"gzipLength":958,"brotliLength":0,"mainUid":"7e4d-170"}},"nodeMetas":{"7e4d-162":{"id":"/packages/table-core/build/esm/index.js","moduleParts":{"index.production.js":"7e4d-163"},"imported":[],"importedBy":[{"uid":"7e4d-170"}]},"7e4d-164":{"id":"/packages/svelte-table/src/placeholder.svelte","moduleParts":{"index.production.js":"7e4d-165"},"imported":[{"uid":"7e4d-172"}],"importedBy":[{"uid":"7e4d-166"}]},"7e4d-166":{"id":"/packages/svelte-table/src/placeholder.ts","moduleParts":{"index.production.js":"7e4d-167"},"imported":[{"uid":"7e4d-172"},{"uid":"7e4d-164"}],"importedBy":[{"uid":"7e4d-170"}]},"7e4d-168":{"id":"/packages/svelte-table/src/render-component.ts","moduleParts":{"index.production.js":"7e4d-169"},"imported":[{"uid":"7e4d-172"}],"importedBy":[{"uid":"7e4d-170"}]},"7e4d-170":{"id":"/packages/svelte-table/src/index.ts","moduleParts":{"index.production.js":"7e4d-171"},"imported":[{"uid":"7e4d-162"},{"uid":"7e4d-166"},{"uid":"7e4d-172"},{"uid":"7e4d-173"},{"uid":"7e4d-168"}],"importedBy":[],"isEntry":true},"7e4d-172":{"id":"svelte/internal","moduleParts":{},"imported":[],"importedBy":[{"uid":"7e4d-170"},{"uid":"7e4d-166"},{"uid":"7e4d-168"},{"uid":"7e4d-164"}],"isExternal":true},"7e4d-173":{"id":"svelte/store","moduleParts":{},"imported":[],"importedBy":[{"uid":"7e4d-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": "7e4d-175"
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
"name": "svelte-table/src",
|
|
18
18
|
"children": [
|
|
19
19
|
{
|
|
20
|
-
"uid": "
|
|
20
|
+
"uid": "7e4d-177",
|
|
21
21
|
"name": "placeholder.svelte"
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
|
-
"uid": "
|
|
24
|
+
"uid": "7e4d-179",
|
|
25
25
|
"name": "placeholder.ts"
|
|
26
26
|
},
|
|
27
27
|
{
|
|
28
|
-
"uid": "
|
|
28
|
+
"uid": "7e4d-181",
|
|
29
29
|
"name": "render-component.ts"
|
|
30
30
|
},
|
|
31
31
|
{
|
|
32
|
-
"uid": "
|
|
32
|
+
"uid": "7e4d-183",
|
|
33
33
|
"name": "index.ts"
|
|
34
34
|
}
|
|
35
35
|
]
|
|
@@ -42,153 +42,153 @@
|
|
|
42
42
|
"isRoot": true
|
|
43
43
|
},
|
|
44
44
|
"nodeParts": {
|
|
45
|
-
"
|
|
46
|
-
"renderedLength":
|
|
47
|
-
"gzipLength":
|
|
45
|
+
"7e4d-175": {
|
|
46
|
+
"renderedLength": 138254,
|
|
47
|
+
"gzipLength": 23997,
|
|
48
48
|
"brotliLength": 0,
|
|
49
|
-
"mainUid": "
|
|
49
|
+
"mainUid": "7e4d-174"
|
|
50
50
|
},
|
|
51
|
-
"
|
|
51
|
+
"7e4d-177": {
|
|
52
52
|
"renderedLength": 927,
|
|
53
53
|
"gzipLength": 445,
|
|
54
54
|
"brotliLength": 0,
|
|
55
|
-
"mainUid": "
|
|
55
|
+
"mainUid": "7e4d-176"
|
|
56
56
|
},
|
|
57
|
-
"
|
|
57
|
+
"7e4d-179": {
|
|
58
58
|
"renderedLength": 246,
|
|
59
59
|
"gzipLength": 184,
|
|
60
60
|
"brotliLength": 0,
|
|
61
|
-
"mainUid": "
|
|
61
|
+
"mainUid": "7e4d-178"
|
|
62
62
|
},
|
|
63
|
-
"
|
|
63
|
+
"7e4d-181": {
|
|
64
64
|
"renderedLength": 1458,
|
|
65
65
|
"gzipLength": 539,
|
|
66
66
|
"brotliLength": 0,
|
|
67
|
-
"mainUid": "
|
|
67
|
+
"mainUid": "7e4d-180"
|
|
68
68
|
},
|
|
69
|
-
"
|
|
69
|
+
"7e4d-183": {
|
|
70
70
|
"renderedLength": 2915,
|
|
71
71
|
"gzipLength": 958,
|
|
72
72
|
"brotliLength": 0,
|
|
73
|
-
"mainUid": "
|
|
73
|
+
"mainUid": "7e4d-182"
|
|
74
74
|
}
|
|
75
75
|
},
|
|
76
76
|
"nodeMetas": {
|
|
77
|
-
"
|
|
77
|
+
"7e4d-174": {
|
|
78
78
|
"id": "/packages/table-core/build/esm/index.js",
|
|
79
79
|
"moduleParts": {
|
|
80
|
-
"index.production.js": "
|
|
80
|
+
"index.production.js": "7e4d-175"
|
|
81
81
|
},
|
|
82
82
|
"imported": [],
|
|
83
83
|
"importedBy": [
|
|
84
84
|
{
|
|
85
|
-
"uid": "
|
|
85
|
+
"uid": "7e4d-182"
|
|
86
86
|
}
|
|
87
87
|
]
|
|
88
88
|
},
|
|
89
|
-
"
|
|
89
|
+
"7e4d-176": {
|
|
90
90
|
"id": "/packages/svelte-table/src/placeholder.svelte",
|
|
91
91
|
"moduleParts": {
|
|
92
|
-
"index.production.js": "
|
|
92
|
+
"index.production.js": "7e4d-177"
|
|
93
93
|
},
|
|
94
94
|
"imported": [
|
|
95
95
|
{
|
|
96
|
-
"uid": "
|
|
96
|
+
"uid": "7e4d-184"
|
|
97
97
|
}
|
|
98
98
|
],
|
|
99
99
|
"importedBy": [
|
|
100
100
|
{
|
|
101
|
-
"uid": "
|
|
101
|
+
"uid": "7e4d-178"
|
|
102
102
|
}
|
|
103
103
|
]
|
|
104
104
|
},
|
|
105
|
-
"
|
|
105
|
+
"7e4d-178": {
|
|
106
106
|
"id": "/packages/svelte-table/src/placeholder.ts",
|
|
107
107
|
"moduleParts": {
|
|
108
|
-
"index.production.js": "
|
|
108
|
+
"index.production.js": "7e4d-179"
|
|
109
109
|
},
|
|
110
110
|
"imported": [
|
|
111
111
|
{
|
|
112
|
-
"uid": "
|
|
112
|
+
"uid": "7e4d-184"
|
|
113
113
|
},
|
|
114
114
|
{
|
|
115
|
-
"uid": "
|
|
115
|
+
"uid": "7e4d-176"
|
|
116
116
|
}
|
|
117
117
|
],
|
|
118
118
|
"importedBy": [
|
|
119
119
|
{
|
|
120
|
-
"uid": "
|
|
120
|
+
"uid": "7e4d-182"
|
|
121
121
|
}
|
|
122
122
|
]
|
|
123
123
|
},
|
|
124
|
-
"
|
|
124
|
+
"7e4d-180": {
|
|
125
125
|
"id": "/packages/svelte-table/src/render-component.ts",
|
|
126
126
|
"moduleParts": {
|
|
127
|
-
"index.production.js": "
|
|
127
|
+
"index.production.js": "7e4d-181"
|
|
128
128
|
},
|
|
129
129
|
"imported": [
|
|
130
130
|
{
|
|
131
|
-
"uid": "
|
|
131
|
+
"uid": "7e4d-184"
|
|
132
132
|
}
|
|
133
133
|
],
|
|
134
134
|
"importedBy": [
|
|
135
135
|
{
|
|
136
|
-
"uid": "
|
|
136
|
+
"uid": "7e4d-182"
|
|
137
137
|
}
|
|
138
138
|
]
|
|
139
139
|
},
|
|
140
|
-
"
|
|
140
|
+
"7e4d-182": {
|
|
141
141
|
"id": "/packages/svelte-table/src/index.ts",
|
|
142
142
|
"moduleParts": {
|
|
143
|
-
"index.production.js": "
|
|
143
|
+
"index.production.js": "7e4d-183"
|
|
144
144
|
},
|
|
145
145
|
"imported": [
|
|
146
146
|
{
|
|
147
|
-
"uid": "
|
|
147
|
+
"uid": "7e4d-174"
|
|
148
148
|
},
|
|
149
149
|
{
|
|
150
|
-
"uid": "
|
|
150
|
+
"uid": "7e4d-178"
|
|
151
151
|
},
|
|
152
152
|
{
|
|
153
|
-
"uid": "
|
|
153
|
+
"uid": "7e4d-184"
|
|
154
154
|
},
|
|
155
155
|
{
|
|
156
|
-
"uid": "
|
|
156
|
+
"uid": "7e4d-185"
|
|
157
157
|
},
|
|
158
158
|
{
|
|
159
|
-
"uid": "
|
|
159
|
+
"uid": "7e4d-180"
|
|
160
160
|
}
|
|
161
161
|
],
|
|
162
162
|
"importedBy": [],
|
|
163
163
|
"isEntry": true
|
|
164
164
|
},
|
|
165
|
-
"
|
|
165
|
+
"7e4d-184": {
|
|
166
166
|
"id": "svelte/internal",
|
|
167
167
|
"moduleParts": {},
|
|
168
168
|
"imported": [],
|
|
169
169
|
"importedBy": [
|
|
170
170
|
{
|
|
171
|
-
"uid": "
|
|
171
|
+
"uid": "7e4d-182"
|
|
172
172
|
},
|
|
173
173
|
{
|
|
174
|
-
"uid": "
|
|
174
|
+
"uid": "7e4d-178"
|
|
175
175
|
},
|
|
176
176
|
{
|
|
177
|
-
"uid": "
|
|
177
|
+
"uid": "7e4d-180"
|
|
178
178
|
},
|
|
179
179
|
{
|
|
180
|
-
"uid": "
|
|
180
|
+
"uid": "7e4d-176"
|
|
181
181
|
}
|
|
182
182
|
],
|
|
183
183
|
"isExternal": true
|
|
184
184
|
},
|
|
185
|
-
"
|
|
185
|
+
"7e4d-185": {
|
|
186
186
|
"id": "svelte/store",
|
|
187
187
|
"moduleParts": {},
|
|
188
188
|
"imported": [],
|
|
189
189
|
"importedBy": [
|
|
190
190
|
{
|
|
191
|
-
"uid": "
|
|
191
|
+
"uid": "7e4d-182"
|
|
192
192
|
}
|
|
193
193
|
],
|
|
194
194
|
"isExternal": true
|
|
@@ -2160,14 +2160,14 @@
|
|
|
2160
2160
|
// return table.options.enableGroupingRowSelection ?? false
|
|
2161
2161
|
// },
|
|
2162
2162
|
getIsAllRowsSelected: () => {
|
|
2163
|
-
const
|
|
2163
|
+
const preGroupedFlatRows = table.getFilteredRowModel().flatRows;
|
|
2164
2164
|
const {
|
|
2165
2165
|
rowSelection
|
|
2166
2166
|
} = table.getState();
|
|
2167
|
-
let isAllRowsSelected = Boolean(
|
|
2167
|
+
let isAllRowsSelected = Boolean(preGroupedFlatRows.length && Object.keys(rowSelection).length);
|
|
2168
2168
|
|
|
2169
2169
|
if (isAllRowsSelected) {
|
|
2170
|
-
if (
|
|
2170
|
+
if (preGroupedFlatRows.some(row => row.getCanSelect() && !rowSelection[row.id])) {
|
|
2171
2171
|
isAllRowsSelected = false;
|
|
2172
2172
|
}
|
|
2173
2173
|
}
|
|
@@ -2191,7 +2191,7 @@
|
|
|
2191
2191
|
var _table$getState$rowSe;
|
|
2192
2192
|
|
|
2193
2193
|
const totalSelected = Object.keys((_table$getState$rowSe = table.getState().rowSelection) != null ? _table$getState$rowSe : {}).length;
|
|
2194
|
-
return totalSelected > 0 && totalSelected < table.
|
|
2194
|
+
return totalSelected > 0 && totalSelected < table.getFilteredRowModel().flatRows.length;
|
|
2195
2195
|
},
|
|
2196
2196
|
getIsSomePageRowsSelected: () => {
|
|
2197
2197
|
const paginationFlatRows = table.getPaginationRowModel().flatRows;
|
|
@@ -2976,7 +2976,8 @@
|
|
|
2976
2976
|
|
|
2977
2977
|
return columnDefs.map(columnDef => {
|
|
2978
2978
|
const column = createColumn(table, columnDef, depth, parent);
|
|
2979
|
-
|
|
2979
|
+
const groupingColumnDef = columnDef;
|
|
2980
|
+
column.columns = groupingColumnDef.columns ? recurseColumns(groupingColumnDef.columns, column, depth + 1) : [];
|
|
2980
2981
|
return column;
|
|
2981
2982
|
});
|
|
2982
2983
|
};
|
|
@@ -3149,6 +3150,7 @@
|
|
|
3149
3150
|
// visits: number
|
|
3150
3151
|
// status: string
|
|
3151
3152
|
// progress: number
|
|
3153
|
+
// createdAt: Date
|
|
3152
3154
|
// nested: {
|
|
3153
3155
|
// foo: [
|
|
3154
3156
|
// {
|