@tanstack/svelte-table 8.0.0-beta.2 → 8.0.0-beta.3
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 +9 -12
- package/build/cjs/table-core/build/esm/index.js.map +1 -1
- package/build/esm/index.js +9 -12
- package/build/esm/index.js.map +1 -1
- package/build/stats-html.html +1 -1
- package/build/stats-react.json +38 -38
- package/build/umd/index.development.js +9 -12
- 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
|
@@ -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":"
|
|
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":"6d83-163"},{"name":"svelte-table/src","children":[{"uid":"6d83-165","name":"placeholder.svelte"},{"uid":"6d83-167","name":"render-component.ts"},{"uid":"6d83-169","name":"index.ts"}]}]}]}],"isRoot":true},"nodeParts":{"6d83-163":{"renderedLength":137572,"gzipLength":23395,"brotliLength":0,"mainUid":"6d83-162"},"6d83-165":{"renderedLength":925,"gzipLength":444,"brotliLength":0,"mainUid":"6d83-164"},"6d83-167":{"renderedLength":1365,"gzipLength":519,"brotliLength":0,"mainUid":"6d83-166"},"6d83-169":{"renderedLength":2729,"gzipLength":868,"brotliLength":0,"mainUid":"6d83-168"}},"nodeMetas":{"6d83-162":{"id":"/packages/table-core/build/esm/index.js","moduleParts":{"index.production.js":"6d83-163"},"imported":[],"importedBy":[{"uid":"6d83-168"}]},"6d83-164":{"id":"/packages/svelte-table/src/placeholder.svelte","moduleParts":{"index.production.js":"6d83-165"},"imported":[{"uid":"6d83-170"}],"importedBy":[{"uid":"6d83-168"}]},"6d83-166":{"id":"/packages/svelte-table/src/render-component.ts","moduleParts":{"index.production.js":"6d83-167"},"imported":[{"uid":"6d83-170"}],"importedBy":[{"uid":"6d83-168"}]},"6d83-168":{"id":"/packages/svelte-table/src/index.ts","moduleParts":{"index.production.js":"6d83-169"},"imported":[{"uid":"6d83-162"},{"uid":"6d83-164"},{"uid":"6d83-170"},{"uid":"6d83-171"},{"uid":"6d83-166"}],"importedBy":[],"isEntry":true},"6d83-170":{"id":"svelte/internal","moduleParts":{},"imported":[],"importedBy":[{"uid":"6d83-168"},{"uid":"6d83-164"},{"uid":"6d83-166"}],"isExternal":true},"6d83-171":{"id":"svelte/store","moduleParts":{},"imported":[],"importedBy":[{"uid":"6d83-168"}],"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;
|
package/build/stats-react.json
CHANGED
|
@@ -11,21 +11,21 @@
|
|
|
11
11
|
"children": [
|
|
12
12
|
{
|
|
13
13
|
"name": "table-core/build/esm/index.js",
|
|
14
|
-
"uid": "
|
|
14
|
+
"uid": "6d83-173"
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
"name": "svelte-table/src",
|
|
18
18
|
"children": [
|
|
19
19
|
{
|
|
20
|
-
"uid": "
|
|
20
|
+
"uid": "6d83-175",
|
|
21
21
|
"name": "placeholder.svelte"
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
|
-
"uid": "
|
|
24
|
+
"uid": "6d83-177",
|
|
25
25
|
"name": "render-component.ts"
|
|
26
26
|
},
|
|
27
27
|
{
|
|
28
|
-
"uid": "
|
|
28
|
+
"uid": "6d83-179",
|
|
29
29
|
"name": "index.ts"
|
|
30
30
|
}
|
|
31
31
|
]
|
|
@@ -38,125 +38,125 @@
|
|
|
38
38
|
"isRoot": true
|
|
39
39
|
},
|
|
40
40
|
"nodeParts": {
|
|
41
|
-
"
|
|
42
|
-
"renderedLength":
|
|
43
|
-
"gzipLength":
|
|
41
|
+
"6d83-173": {
|
|
42
|
+
"renderedLength": 137572,
|
|
43
|
+
"gzipLength": 23395,
|
|
44
44
|
"brotliLength": 0,
|
|
45
|
-
"mainUid": "
|
|
45
|
+
"mainUid": "6d83-172"
|
|
46
46
|
},
|
|
47
|
-
"
|
|
47
|
+
"6d83-175": {
|
|
48
48
|
"renderedLength": 925,
|
|
49
49
|
"gzipLength": 444,
|
|
50
50
|
"brotliLength": 0,
|
|
51
|
-
"mainUid": "
|
|
51
|
+
"mainUid": "6d83-174"
|
|
52
52
|
},
|
|
53
|
-
"
|
|
53
|
+
"6d83-177": {
|
|
54
54
|
"renderedLength": 1365,
|
|
55
55
|
"gzipLength": 519,
|
|
56
56
|
"brotliLength": 0,
|
|
57
|
-
"mainUid": "
|
|
57
|
+
"mainUid": "6d83-176"
|
|
58
58
|
},
|
|
59
|
-
"
|
|
59
|
+
"6d83-179": {
|
|
60
60
|
"renderedLength": 2729,
|
|
61
61
|
"gzipLength": 868,
|
|
62
62
|
"brotliLength": 0,
|
|
63
|
-
"mainUid": "
|
|
63
|
+
"mainUid": "6d83-178"
|
|
64
64
|
}
|
|
65
65
|
},
|
|
66
66
|
"nodeMetas": {
|
|
67
|
-
"
|
|
67
|
+
"6d83-172": {
|
|
68
68
|
"id": "/packages/table-core/build/esm/index.js",
|
|
69
69
|
"moduleParts": {
|
|
70
|
-
"index.production.js": "
|
|
70
|
+
"index.production.js": "6d83-173"
|
|
71
71
|
},
|
|
72
72
|
"imported": [],
|
|
73
73
|
"importedBy": [
|
|
74
74
|
{
|
|
75
|
-
"uid": "
|
|
75
|
+
"uid": "6d83-178"
|
|
76
76
|
}
|
|
77
77
|
]
|
|
78
78
|
},
|
|
79
|
-
"
|
|
79
|
+
"6d83-174": {
|
|
80
80
|
"id": "/packages/svelte-table/src/placeholder.svelte",
|
|
81
81
|
"moduleParts": {
|
|
82
|
-
"index.production.js": "
|
|
82
|
+
"index.production.js": "6d83-175"
|
|
83
83
|
},
|
|
84
84
|
"imported": [
|
|
85
85
|
{
|
|
86
|
-
"uid": "
|
|
86
|
+
"uid": "6d83-180"
|
|
87
87
|
}
|
|
88
88
|
],
|
|
89
89
|
"importedBy": [
|
|
90
90
|
{
|
|
91
|
-
"uid": "
|
|
91
|
+
"uid": "6d83-178"
|
|
92
92
|
}
|
|
93
93
|
]
|
|
94
94
|
},
|
|
95
|
-
"
|
|
95
|
+
"6d83-176": {
|
|
96
96
|
"id": "/packages/svelte-table/src/render-component.ts",
|
|
97
97
|
"moduleParts": {
|
|
98
|
-
"index.production.js": "
|
|
98
|
+
"index.production.js": "6d83-177"
|
|
99
99
|
},
|
|
100
100
|
"imported": [
|
|
101
101
|
{
|
|
102
|
-
"uid": "
|
|
102
|
+
"uid": "6d83-180"
|
|
103
103
|
}
|
|
104
104
|
],
|
|
105
105
|
"importedBy": [
|
|
106
106
|
{
|
|
107
|
-
"uid": "
|
|
107
|
+
"uid": "6d83-178"
|
|
108
108
|
}
|
|
109
109
|
]
|
|
110
110
|
},
|
|
111
|
-
"
|
|
111
|
+
"6d83-178": {
|
|
112
112
|
"id": "/packages/svelte-table/src/index.ts",
|
|
113
113
|
"moduleParts": {
|
|
114
|
-
"index.production.js": "
|
|
114
|
+
"index.production.js": "6d83-179"
|
|
115
115
|
},
|
|
116
116
|
"imported": [
|
|
117
117
|
{
|
|
118
|
-
"uid": "
|
|
118
|
+
"uid": "6d83-172"
|
|
119
119
|
},
|
|
120
120
|
{
|
|
121
|
-
"uid": "
|
|
121
|
+
"uid": "6d83-174"
|
|
122
122
|
},
|
|
123
123
|
{
|
|
124
|
-
"uid": "
|
|
124
|
+
"uid": "6d83-180"
|
|
125
125
|
},
|
|
126
126
|
{
|
|
127
|
-
"uid": "
|
|
127
|
+
"uid": "6d83-181"
|
|
128
128
|
},
|
|
129
129
|
{
|
|
130
|
-
"uid": "
|
|
130
|
+
"uid": "6d83-176"
|
|
131
131
|
}
|
|
132
132
|
],
|
|
133
133
|
"importedBy": [],
|
|
134
134
|
"isEntry": true
|
|
135
135
|
},
|
|
136
|
-
"
|
|
136
|
+
"6d83-180": {
|
|
137
137
|
"id": "svelte/internal",
|
|
138
138
|
"moduleParts": {},
|
|
139
139
|
"imported": [],
|
|
140
140
|
"importedBy": [
|
|
141
141
|
{
|
|
142
|
-
"uid": "
|
|
142
|
+
"uid": "6d83-178"
|
|
143
143
|
},
|
|
144
144
|
{
|
|
145
|
-
"uid": "
|
|
145
|
+
"uid": "6d83-174"
|
|
146
146
|
},
|
|
147
147
|
{
|
|
148
|
-
"uid": "
|
|
148
|
+
"uid": "6d83-176"
|
|
149
149
|
}
|
|
150
150
|
],
|
|
151
151
|
"isExternal": true
|
|
152
152
|
},
|
|
153
|
-
"
|
|
153
|
+
"6d83-181": {
|
|
154
154
|
"id": "svelte/store",
|
|
155
155
|
"moduleParts": {},
|
|
156
156
|
"imported": [],
|
|
157
157
|
"importedBy": [
|
|
158
158
|
{
|
|
159
|
-
"uid": "
|
|
159
|
+
"uid": "6d83-178"
|
|
160
160
|
}
|
|
161
161
|
],
|
|
162
162
|
"isExternal": true
|
|
@@ -1108,7 +1108,6 @@
|
|
|
1108
1108
|
},
|
|
1109
1109
|
createColumn: (column, instance) => {
|
|
1110
1110
|
return {
|
|
1111
|
-
filterFn: column.filterFn,
|
|
1112
1111
|
getAutoFilterFn: () => {
|
|
1113
1112
|
const firstRow = instance.getCoreRowModel().flatRows[0];
|
|
1114
1113
|
const value = firstRow == null ? void 0 : firstRow.getValue(column.id);
|
|
@@ -1139,7 +1138,7 @@
|
|
|
1139
1138
|
var _ref;
|
|
1140
1139
|
|
|
1141
1140
|
const userFilterFns = instance.options.filterFns;
|
|
1142
|
-
return isFunction(column.filterFn) ? column.filterFn : column.filterFn === 'auto' ? column.getAutoFilterFn() : (_ref = userFilterFns == null ? void 0 : userFilterFns[column.filterFn]) != null ? _ref : filterFns[column.filterFn];
|
|
1141
|
+
return isFunction(column.columnDef.filterFn) ? column.columnDef.filterFn : column.columnDef.filterFn === 'auto' ? column.getAutoFilterFn() : (_ref = userFilterFns == null ? void 0 : userFilterFns[column.columnDef.filterFn]) != null ? _ref : filterFns[column.columnDef.filterFn];
|
|
1143
1142
|
},
|
|
1144
1143
|
getCanFilter: () => {
|
|
1145
1144
|
var _column$columnDef$ena, _instance$options$ena, _instance$options$ena2;
|
|
@@ -1428,6 +1427,11 @@
|
|
|
1428
1427
|
const Grouping = {
|
|
1429
1428
|
getDefaultColumnDef: () => {
|
|
1430
1429
|
return {
|
|
1430
|
+
aggregatedCell: props => {
|
|
1431
|
+
var _props$getValue$toStr, _props$getValue;
|
|
1432
|
+
|
|
1433
|
+
return (_props$getValue$toStr = (_props$getValue = props.getValue()) == null ? void 0 : _props$getValue.toString == null ? void 0 : _props$getValue.toString()) != null ? _props$getValue$toStr : null;
|
|
1434
|
+
},
|
|
1431
1435
|
aggregationFn: 'auto'
|
|
1432
1436
|
};
|
|
1433
1437
|
},
|
|
@@ -1488,8 +1492,6 @@
|
|
|
1488
1492
|
if (Object.prototype.toString.call(value) === '[object Date]') {
|
|
1489
1493
|
return aggregationFns.extent;
|
|
1490
1494
|
}
|
|
1491
|
-
|
|
1492
|
-
return aggregationFns.count;
|
|
1493
1495
|
},
|
|
1494
1496
|
getAggregationFn: () => {
|
|
1495
1497
|
var _ref4;
|
|
@@ -1500,7 +1502,7 @@
|
|
|
1500
1502
|
throw new Error();
|
|
1501
1503
|
}
|
|
1502
1504
|
|
|
1503
|
-
return isFunction(column.aggregationFn) ? column.aggregationFn : column.aggregationFn === 'auto' ? column.getAutoAggregationFn() : (_ref4 = userAggregationFns == null ? void 0 : userAggregationFns[column.aggregationFn]) != null ? _ref4 : aggregationFns[column.aggregationFn];
|
|
1505
|
+
return isFunction(column.columnDef.aggregationFn) ? column.columnDef.aggregationFn : column.columnDef.aggregationFn === 'auto' ? column.getAutoAggregationFn() : (_ref4 = userAggregationFns == null ? void 0 : userAggregationFns[column.columnDef.aggregationFn]) != null ? _ref4 : aggregationFns[column.columnDef.aggregationFn];
|
|
1504
1506
|
}
|
|
1505
1507
|
};
|
|
1506
1508
|
},
|
|
@@ -2895,9 +2897,9 @@
|
|
|
2895
2897
|
header: props => props.header.column.id,
|
|
2896
2898
|
footer: props => props.header.column.id,
|
|
2897
2899
|
cell: props => {
|
|
2898
|
-
var _props$getValue$toStr, _props$getValue
|
|
2900
|
+
var _props$getValue$toStr, _props$getValue;
|
|
2899
2901
|
|
|
2900
|
-
return (_props$getValue$toStr = (_props$getValue
|
|
2902
|
+
return (_props$getValue$toStr = (_props$getValue = props.getValue()) == null ? void 0 : _props$getValue.toString == null ? void 0 : _props$getValue.toString()) != null ? _props$getValue$toStr : null;
|
|
2901
2903
|
},
|
|
2902
2904
|
...instance._features.reduce((obj, feature) => {
|
|
2903
2905
|
return Object.assign(obj, feature.getDefaultColumnDef == null ? void 0 : feature.getDefaultColumnDef());
|
|
@@ -3668,11 +3670,6 @@
|
|
|
3668
3670
|
if (aggregateFn) {
|
|
3669
3671
|
row._groupingValuesCache[columnId] = aggregateFn(columnId, leafRows, groupedRows);
|
|
3670
3672
|
return row._groupingValuesCache[columnId];
|
|
3671
|
-
} else if (column.aggregationFn) {
|
|
3672
|
-
console.info({
|
|
3673
|
-
column
|
|
3674
|
-
});
|
|
3675
|
-
throw new Error("Table: Invalid column.aggregateType option for column listed above" );
|
|
3676
3673
|
}
|
|
3677
3674
|
}
|
|
3678
3675
|
});
|