@tanstack/react-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 +18 -18
- 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-127"},{"name":"react-table/src/index.tsx","uid":"6455-129"}]}]}],"isRoot":true},"nodeParts":{"6455-127":{"renderedLength":138168,"gzipLength":23982,"brotliLength":0,"mainUid":"6455-126"},"6455-129":{"renderedLength":1900,"gzipLength":752,"brotliLength":0,"mainUid":"6455-128"}},"nodeMetas":{"6455-126":{"id":"/packages/table-core/build/esm/index.js","moduleParts":{"index.production.js":"6455-127"},"imported":[],"importedBy":[{"uid":"6455-128"}]},"6455-128":{"id":"/packages/react-table/src/index.tsx","moduleParts":{"index.production.js":"6455-129"},"imported":[{"uid":"6455-130"},{"uid":"6455-126"}],"importedBy":[],"isEntry":true},"6455-130":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"6455-128"}],"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,11 +11,11 @@
|
|
|
11
11
|
"children": [
|
|
12
12
|
{
|
|
13
13
|
"name": "table-core/build/esm/index.js",
|
|
14
|
-
"uid": "
|
|
14
|
+
"uid": "6455-132"
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
"name": "react-table/src/index.tsx",
|
|
18
|
-
"uid": "
|
|
18
|
+
"uid": "6455-134"
|
|
19
19
|
}
|
|
20
20
|
]
|
|
21
21
|
}
|
|
@@ -25,62 +25,62 @@
|
|
|
25
25
|
"isRoot": true
|
|
26
26
|
},
|
|
27
27
|
"nodeParts": {
|
|
28
|
-
"
|
|
29
|
-
"renderedLength":
|
|
30
|
-
"gzipLength":
|
|
28
|
+
"6455-132": {
|
|
29
|
+
"renderedLength": 138168,
|
|
30
|
+
"gzipLength": 23982,
|
|
31
31
|
"brotliLength": 0,
|
|
32
|
-
"mainUid": "
|
|
32
|
+
"mainUid": "6455-131"
|
|
33
33
|
},
|
|
34
|
-
"
|
|
34
|
+
"6455-134": {
|
|
35
35
|
"renderedLength": 1900,
|
|
36
36
|
"gzipLength": 752,
|
|
37
37
|
"brotliLength": 0,
|
|
38
|
-
"mainUid": "
|
|
38
|
+
"mainUid": "6455-133"
|
|
39
39
|
}
|
|
40
40
|
},
|
|
41
41
|
"nodeMetas": {
|
|
42
|
-
"
|
|
42
|
+
"6455-131": {
|
|
43
43
|
"id": "/packages/table-core/build/esm/index.js",
|
|
44
44
|
"moduleParts": {
|
|
45
|
-
"index.production.js": "
|
|
45
|
+
"index.production.js": "6455-132"
|
|
46
46
|
},
|
|
47
47
|
"imported": [],
|
|
48
48
|
"importedBy": [
|
|
49
49
|
{
|
|
50
|
-
"uid": "
|
|
50
|
+
"uid": "6455-133"
|
|
51
51
|
}
|
|
52
52
|
]
|
|
53
53
|
},
|
|
54
|
-
"
|
|
54
|
+
"6455-133": {
|
|
55
55
|
"id": "/packages/react-table/src/index.tsx",
|
|
56
56
|
"moduleParts": {
|
|
57
|
-
"index.production.js": "
|
|
57
|
+
"index.production.js": "6455-134"
|
|
58
58
|
},
|
|
59
59
|
"imported": [
|
|
60
60
|
{
|
|
61
|
-
"uid": "
|
|
61
|
+
"uid": "6455-135"
|
|
62
62
|
},
|
|
63
63
|
{
|
|
64
|
-
"uid": "
|
|
64
|
+
"uid": "6455-131"
|
|
65
65
|
}
|
|
66
66
|
],
|
|
67
67
|
"importedBy": [],
|
|
68
68
|
"isEntry": true
|
|
69
69
|
},
|
|
70
|
-
"
|
|
70
|
+
"6455-135": {
|
|
71
71
|
"id": "react",
|
|
72
72
|
"moduleParts": {},
|
|
73
73
|
"imported": [],
|
|
74
74
|
"importedBy": [
|
|
75
75
|
{
|
|
76
|
-
"uid": "
|
|
76
|
+
"uid": "6455-133"
|
|
77
77
|
}
|
|
78
78
|
],
|
|
79
79
|
"isExternal": true
|
|
80
80
|
}
|
|
81
81
|
},
|
|
82
82
|
"env": {
|
|
83
|
-
"rollup": "2.77.
|
|
83
|
+
"rollup": "2.77.2"
|
|
84
84
|
},
|
|
85
85
|
"options": {
|
|
86
86
|
"gzip": true,
|
|
@@ -1179,7 +1179,9 @@
|
|
|
1179
1179
|
return filterFns.weakEquals;
|
|
1180
1180
|
},
|
|
1181
1181
|
getFilterFn: () => {
|
|
1182
|
-
|
|
1182
|
+
var _table$options$filter, _table$options$filter2;
|
|
1183
|
+
|
|
1184
|
+
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];
|
|
1183
1185
|
},
|
|
1184
1186
|
getCanFilter: () => {
|
|
1185
1187
|
var _column$columnDef$ena, _table$options$enable, _table$options$enable2;
|
|
@@ -1278,10 +1280,12 @@
|
|
|
1278
1280
|
return filterFns.includesString;
|
|
1279
1281
|
},
|
|
1280
1282
|
getGlobalFilterFn: () => {
|
|
1283
|
+
var _table$options$filter3, _table$options$filter4;
|
|
1284
|
+
|
|
1281
1285
|
const {
|
|
1282
1286
|
globalFilterFn: globalFilterFn
|
|
1283
1287
|
} = table.options;
|
|
1284
|
-
return isFunction(globalFilterFn) ? globalFilterFn : globalFilterFn === 'auto' ? table.getGlobalAutoFilterFn() : filterFns[globalFilterFn];
|
|
1288
|
+
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];
|
|
1285
1289
|
},
|
|
1286
1290
|
setColumnFilters: updater => {
|
|
1287
1291
|
const leafColumns = table.getAllLeafColumns();
|
|
@@ -1318,8 +1322,11 @@
|
|
|
1318
1322
|
table.setColumnFilters(defaultState ? [] : (_table$initialState$c = (_table$initialState = table.initialState) == null ? void 0 : _table$initialState.columnFilters) != null ? _table$initialState$c : []);
|
|
1319
1323
|
},
|
|
1320
1324
|
getPreFilteredRowModel: () => table.getCoreRowModel(),
|
|
1321
|
-
_getFilteredRowModel: table.options.getFilteredRowModel && table.options.getFilteredRowModel(table),
|
|
1322
1325
|
getFilteredRowModel: () => {
|
|
1326
|
+
if (!table._getFilteredRowModel && table.options.getFilteredRowModel) {
|
|
1327
|
+
table._getFilteredRowModel = table.options.getFilteredRowModel(table);
|
|
1328
|
+
}
|
|
1329
|
+
|
|
1323
1330
|
if (table.options.manualFiltering || !table._getFilteredRowModel) {
|
|
1324
1331
|
return table.getPreFilteredRowModel();
|
|
1325
1332
|
}
|
|
@@ -1535,11 +1542,13 @@
|
|
|
1535
1542
|
}
|
|
1536
1543
|
},
|
|
1537
1544
|
getAggregationFn: () => {
|
|
1545
|
+
var _table$options$aggreg, _table$options$aggreg2;
|
|
1546
|
+
|
|
1538
1547
|
if (!column) {
|
|
1539
1548
|
throw new Error();
|
|
1540
1549
|
}
|
|
1541
1550
|
|
|
1542
|
-
return isFunction(column.columnDef.aggregationFn) ? column.columnDef.aggregationFn : column.columnDef.aggregationFn === 'auto' ? column.getAutoAggregationFn() : aggregationFns[column.columnDef.aggregationFn];
|
|
1551
|
+
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];
|
|
1543
1552
|
}
|
|
1544
1553
|
};
|
|
1545
1554
|
},
|
|
@@ -2556,11 +2565,13 @@
|
|
|
2556
2565
|
return 'desc';
|
|
2557
2566
|
},
|
|
2558
2567
|
getSortingFn: () => {
|
|
2568
|
+
var _table$options$sortin, _table$options$sortin2;
|
|
2569
|
+
|
|
2559
2570
|
if (!column) {
|
|
2560
2571
|
throw new Error();
|
|
2561
2572
|
}
|
|
2562
2573
|
|
|
2563
|
-
return isFunction(column.columnDef.sortingFn) ? column.columnDef.sortingFn : column.columnDef.sortingFn === 'auto' ? column.getAutoSortingFn() : sortingFns[column.columnDef.sortingFn];
|
|
2574
|
+
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];
|
|
2564
2575
|
},
|
|
2565
2576
|
toggleSorting: (desc, multi) => {
|
|
2566
2577
|
// if (column.columns.length) {
|
|
@@ -2944,8 +2955,20 @@
|
|
|
2944
2955
|
|
|
2945
2956
|
defaultColumn = (_defaultColumn = defaultColumn) != null ? _defaultColumn : {};
|
|
2946
2957
|
return {
|
|
2947
|
-
header: props =>
|
|
2948
|
-
|
|
2958
|
+
header: props => {
|
|
2959
|
+
const resolvedColumnDef = props.header.column.columnDef;
|
|
2960
|
+
|
|
2961
|
+
if (resolvedColumnDef.accessorKey) {
|
|
2962
|
+
return resolvedColumnDef.accessorKey;
|
|
2963
|
+
}
|
|
2964
|
+
|
|
2965
|
+
if (resolvedColumnDef.accessorFn) {
|
|
2966
|
+
return resolvedColumnDef.id;
|
|
2967
|
+
}
|
|
2968
|
+
|
|
2969
|
+
return null;
|
|
2970
|
+
},
|
|
2971
|
+
// footer: props => props.header.column.id,
|
|
2949
2972
|
cell: props => {
|
|
2950
2973
|
var _props$renderValue$to, _props$renderValue;
|
|
2951
2974
|
|
|
@@ -3182,7 +3205,8 @@
|
|
|
3182
3205
|
accessorKey: accessor
|
|
3183
3206
|
};
|
|
3184
3207
|
},
|
|
3185
|
-
display: column => column
|
|
3208
|
+
display: column => column,
|
|
3209
|
+
group: column => column
|
|
3186
3210
|
};
|
|
3187
3211
|
}
|
|
3188
3212
|
|