@tanstack/vue-table 8.0.0-beta.4 → 8.0.0-beta.7
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 +30 -19
- package/build/cjs/table-core/build/esm/index.js.map +1 -1
- package/build/esm/index.js +30 -19
- package/build/esm/index.js.map +1 -1
- package/build/stats-html.html +1 -1
- package/build/stats-react.json +24 -24
- package/build/umd/index.development.js +30 -19
- 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":"779a-149"},{"name":"vue-table/src","children":[{"uid":"779a-151","name":"merge-proxy.ts"},{"uid":"779a-153","name":"index.ts"}]}]}]}],"isRoot":true},"nodeParts":{"779a-149":{"renderedLength":138802,"gzipLength":23615,"brotliLength":0,"mainUid":"779a-148"},"779a-151":{"renderedLength":1622,"gzipLength":660,"brotliLength":0,"mainUid":"779a-150"},"779a-153":{"renderedLength":1807,"gzipLength":709,"brotliLength":0,"mainUid":"779a-152"}},"nodeMetas":{"779a-148":{"id":"/packages/table-core/build/esm/index.js","moduleParts":{"index.production.js":"779a-149"},"imported":[],"importedBy":[{"uid":"779a-152"}]},"779a-150":{"id":"/packages/vue-table/src/merge-proxy.ts","moduleParts":{"index.production.js":"779a-151"},"imported":[],"importedBy":[{"uid":"779a-152"}]},"779a-152":{"id":"/packages/vue-table/src/index.ts","moduleParts":{"index.production.js":"779a-153"},"imported":[{"uid":"779a-148"},{"uid":"779a-154"},{"uid":"779a-150"}],"importedBy":[],"isEntry":true},"779a-154":{"id":"vue","moduleParts":{},"imported":[],"importedBy":[{"uid":"779a-152"}],"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,17 +11,17 @@
|
|
|
11
11
|
"children": [
|
|
12
12
|
{
|
|
13
13
|
"name": "table-core/build/esm/index.js",
|
|
14
|
-
"uid": "
|
|
14
|
+
"uid": "779a-156"
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
"name": "vue-table/src",
|
|
18
18
|
"children": [
|
|
19
19
|
{
|
|
20
|
-
"uid": "
|
|
20
|
+
"uid": "779a-158",
|
|
21
21
|
"name": "merge-proxy.ts"
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
|
-
"uid": "
|
|
24
|
+
"uid": "779a-160",
|
|
25
25
|
"name": "index.ts"
|
|
26
26
|
}
|
|
27
27
|
]
|
|
@@ -34,76 +34,76 @@
|
|
|
34
34
|
"isRoot": true
|
|
35
35
|
},
|
|
36
36
|
"nodeParts": {
|
|
37
|
-
"
|
|
38
|
-
"renderedLength":
|
|
39
|
-
"gzipLength":
|
|
37
|
+
"779a-156": {
|
|
38
|
+
"renderedLength": 138802,
|
|
39
|
+
"gzipLength": 23615,
|
|
40
40
|
"brotliLength": 0,
|
|
41
|
-
"mainUid": "
|
|
41
|
+
"mainUid": "779a-155"
|
|
42
42
|
},
|
|
43
|
-
"
|
|
43
|
+
"779a-158": {
|
|
44
44
|
"renderedLength": 1622,
|
|
45
45
|
"gzipLength": 660,
|
|
46
46
|
"brotliLength": 0,
|
|
47
|
-
"mainUid": "
|
|
47
|
+
"mainUid": "779a-157"
|
|
48
48
|
},
|
|
49
|
-
"
|
|
49
|
+
"779a-160": {
|
|
50
50
|
"renderedLength": 1807,
|
|
51
51
|
"gzipLength": 709,
|
|
52
52
|
"brotliLength": 0,
|
|
53
|
-
"mainUid": "
|
|
53
|
+
"mainUid": "779a-159"
|
|
54
54
|
}
|
|
55
55
|
},
|
|
56
56
|
"nodeMetas": {
|
|
57
|
-
"
|
|
57
|
+
"779a-155": {
|
|
58
58
|
"id": "/packages/table-core/build/esm/index.js",
|
|
59
59
|
"moduleParts": {
|
|
60
|
-
"index.production.js": "
|
|
60
|
+
"index.production.js": "779a-156"
|
|
61
61
|
},
|
|
62
62
|
"imported": [],
|
|
63
63
|
"importedBy": [
|
|
64
64
|
{
|
|
65
|
-
"uid": "
|
|
65
|
+
"uid": "779a-159"
|
|
66
66
|
}
|
|
67
67
|
]
|
|
68
68
|
},
|
|
69
|
-
"
|
|
69
|
+
"779a-157": {
|
|
70
70
|
"id": "/packages/vue-table/src/merge-proxy.ts",
|
|
71
71
|
"moduleParts": {
|
|
72
|
-
"index.production.js": "
|
|
72
|
+
"index.production.js": "779a-158"
|
|
73
73
|
},
|
|
74
74
|
"imported": [],
|
|
75
75
|
"importedBy": [
|
|
76
76
|
{
|
|
77
|
-
"uid": "
|
|
77
|
+
"uid": "779a-159"
|
|
78
78
|
}
|
|
79
79
|
]
|
|
80
80
|
},
|
|
81
|
-
"
|
|
81
|
+
"779a-159": {
|
|
82
82
|
"id": "/packages/vue-table/src/index.ts",
|
|
83
83
|
"moduleParts": {
|
|
84
|
-
"index.production.js": "
|
|
84
|
+
"index.production.js": "779a-160"
|
|
85
85
|
},
|
|
86
86
|
"imported": [
|
|
87
87
|
{
|
|
88
|
-
"uid": "
|
|
88
|
+
"uid": "779a-155"
|
|
89
89
|
},
|
|
90
90
|
{
|
|
91
|
-
"uid": "
|
|
91
|
+
"uid": "779a-161"
|
|
92
92
|
},
|
|
93
93
|
{
|
|
94
|
-
"uid": "
|
|
94
|
+
"uid": "779a-157"
|
|
95
95
|
}
|
|
96
96
|
],
|
|
97
97
|
"importedBy": [],
|
|
98
98
|
"isEntry": true
|
|
99
99
|
},
|
|
100
|
-
"
|
|
100
|
+
"779a-161": {
|
|
101
101
|
"id": "vue",
|
|
102
102
|
"moduleParts": {},
|
|
103
103
|
"imported": [],
|
|
104
104
|
"importedBy": [
|
|
105
105
|
{
|
|
106
|
-
"uid": "
|
|
106
|
+
"uid": "779a-159"
|
|
107
107
|
}
|
|
108
108
|
],
|
|
109
109
|
"isExternal": true
|
|
@@ -828,7 +828,6 @@
|
|
|
828
828
|
getDefaultOptions: instance => {
|
|
829
829
|
return {
|
|
830
830
|
onExpandedChange: makeStateUpdater('expanded', instance),
|
|
831
|
-
autoResetExpanded: true,
|
|
832
831
|
paginateExpandedRows: true
|
|
833
832
|
};
|
|
834
833
|
},
|
|
@@ -837,6 +836,8 @@
|
|
|
837
836
|
let queued = false;
|
|
838
837
|
return {
|
|
839
838
|
_autoResetExpanded: () => {
|
|
839
|
+
var _ref, _instance$options$aut;
|
|
840
|
+
|
|
840
841
|
if (!registered) {
|
|
841
842
|
instance._queue(() => {
|
|
842
843
|
registered = true;
|
|
@@ -845,11 +846,7 @@
|
|
|
845
846
|
return;
|
|
846
847
|
}
|
|
847
848
|
|
|
848
|
-
if (instance.options.autoResetAll
|
|
849
|
-
return;
|
|
850
|
-
}
|
|
851
|
-
|
|
852
|
-
if (instance.options.autoResetAll === true || instance.options.autoResetExpanded) {
|
|
849
|
+
if ((_ref = (_instance$options$aut = instance.options.autoResetAll) != null ? _instance$options$aut : instance.options.autoResetExpanded) != null ? _ref : !instance.options.manualExpanding) {
|
|
853
850
|
if (queued) return;
|
|
854
851
|
queued = true;
|
|
855
852
|
|
|
@@ -913,7 +910,7 @@
|
|
|
913
910
|
});
|
|
914
911
|
return maxDepth;
|
|
915
912
|
},
|
|
916
|
-
getPreExpandedRowModel: () => instance.
|
|
913
|
+
getPreExpandedRowModel: () => instance.getSortedRowModel(),
|
|
917
914
|
getExpandedRowModel: () => {
|
|
918
915
|
if (!instance._getExpandedRowModel && instance.options.getExpandedRowModel) {
|
|
919
916
|
instance._getExpandedRowModel = instance.options.getExpandedRowModel(instance);
|
|
@@ -1514,7 +1511,7 @@
|
|
|
1514
1511
|
|
|
1515
1512
|
instance.setGrouping(defaultState ? [] : (_instance$initialStat = (_instance$initialStat2 = instance.initialState) == null ? void 0 : _instance$initialStat2.grouping) != null ? _instance$initialStat : []);
|
|
1516
1513
|
},
|
|
1517
|
-
getPreGroupedRowModel: () => instance.
|
|
1514
|
+
getPreGroupedRowModel: () => instance.getFilteredRowModel(),
|
|
1518
1515
|
getGroupedRowModel: () => {
|
|
1519
1516
|
if (!instance._getGroupedRowModel && instance.options.getGroupedRowModel) {
|
|
1520
1517
|
instance._getGroupedRowModel = instance.options.getGroupedRowModel(instance);
|
|
@@ -1547,7 +1544,7 @@
|
|
|
1547
1544
|
getIsAggregated: () => {
|
|
1548
1545
|
var _row$subRows;
|
|
1549
1546
|
|
|
1550
|
-
return !cell.getIsGrouped() && !cell.getIsPlaceholder() && ((_row$subRows = row.subRows)
|
|
1547
|
+
return !cell.getIsGrouped() && !cell.getIsPlaceholder() && !!((_row$subRows = row.subRows) != null && _row$subRows.length);
|
|
1551
1548
|
},
|
|
1552
1549
|
renderAggregatedCell: () => {
|
|
1553
1550
|
{
|
|
@@ -2032,11 +2029,11 @@
|
|
|
2032
2029
|
});
|
|
2033
2030
|
},
|
|
2034
2031
|
toggleAllPageRowsSelected: value => instance.setRowSelection(old => {
|
|
2035
|
-
typeof value !== 'undefined' ? value : !instance.getIsAllPageRowsSelected();
|
|
2032
|
+
const resolvedValue = typeof value !== 'undefined' ? value : !instance.getIsAllPageRowsSelected();
|
|
2036
2033
|
const rowSelection = { ...old
|
|
2037
2034
|
};
|
|
2038
2035
|
instance.getRowModel().rows.forEach(row => {
|
|
2039
|
-
mutateRowIsSelected(rowSelection, row.id,
|
|
2036
|
+
mutateRowIsSelected(rowSelection, row.id, resolvedValue, instance);
|
|
2040
2037
|
});
|
|
2041
2038
|
return rowSelection;
|
|
2042
2039
|
}),
|
|
@@ -2127,7 +2124,7 @@
|
|
|
2127
2124
|
return (_instance$options$deb2 = instance.options.debugAll) != null ? _instance$options$deb2 : instance.options.debugTable;
|
|
2128
2125
|
}
|
|
2129
2126
|
}),
|
|
2130
|
-
getGroupedSelectedRowModel: memo(() => [instance.getState().rowSelection, instance.
|
|
2127
|
+
getGroupedSelectedRowModel: memo(() => [instance.getState().rowSelection, instance.getSortedRowModel()], (rowSelection, rowModel) => {
|
|
2131
2128
|
if (!Object.keys(rowSelection).length) {
|
|
2132
2129
|
return {
|
|
2133
2130
|
rows: [],
|
|
@@ -2191,7 +2188,7 @@
|
|
|
2191
2188
|
},
|
|
2192
2189
|
getIsSomePageRowsSelected: () => {
|
|
2193
2190
|
const paginationFlatRows = instance.getPaginationRowModel().flatRows;
|
|
2194
|
-
return instance.getIsAllPageRowsSelected() ? false :
|
|
2191
|
+
return instance.getIsAllPageRowsSelected() ? false : paginationFlatRows.some(d => d.getIsSelected() || d.getIsSomeSelected());
|
|
2195
2192
|
},
|
|
2196
2193
|
getToggleAllRowsSelectedHandler: () => {
|
|
2197
2194
|
return e => {
|
|
@@ -2677,7 +2674,7 @@
|
|
|
2677
2674
|
|
|
2678
2675
|
instance.setSorting(defaultState ? [] : (_instance$initialStat = (_instance$initialStat2 = instance.initialState) == null ? void 0 : _instance$initialStat2.sorting) != null ? _instance$initialStat : []);
|
|
2679
2676
|
},
|
|
2680
|
-
getPreSortedRowModel: () => instance.
|
|
2677
|
+
getPreSortedRowModel: () => instance.getGroupedRowModel(),
|
|
2681
2678
|
getSortedRowModel: () => {
|
|
2682
2679
|
if (!instance._getSortedRowModel && instance.options.getSortedRowModel) {
|
|
2683
2680
|
instance._getSortedRowModel = instance.options.getSortedRowModel(instance);
|
|
@@ -3827,20 +3824,34 @@
|
|
|
3827
3824
|
const pageStart = pageSize * pageIndex;
|
|
3828
3825
|
const pageEnd = pageStart + pageSize;
|
|
3829
3826
|
rows = rows.slice(pageStart, pageEnd);
|
|
3827
|
+
let paginatedRowModel;
|
|
3830
3828
|
|
|
3831
3829
|
if (!instance.options.paginateExpandedRows) {
|
|
3832
|
-
|
|
3830
|
+
paginatedRowModel = expandRows({
|
|
3833
3831
|
rows,
|
|
3834
3832
|
flatRows,
|
|
3835
3833
|
rowsById
|
|
3836
3834
|
});
|
|
3835
|
+
} else {
|
|
3836
|
+
paginatedRowModel = {
|
|
3837
|
+
rows,
|
|
3838
|
+
flatRows,
|
|
3839
|
+
rowsById
|
|
3840
|
+
};
|
|
3837
3841
|
}
|
|
3838
3842
|
|
|
3839
|
-
|
|
3840
|
-
|
|
3841
|
-
|
|
3842
|
-
|
|
3843
|
+
paginatedRowModel.flatRows = [];
|
|
3844
|
+
|
|
3845
|
+
const handleRow = row => {
|
|
3846
|
+
paginatedRowModel.flatRows.push(row);
|
|
3847
|
+
|
|
3848
|
+
if (row.subRows.length) {
|
|
3849
|
+
row.subRows.forEach(handleRow);
|
|
3850
|
+
}
|
|
3843
3851
|
};
|
|
3852
|
+
|
|
3853
|
+
paginatedRowModel.rows.forEach(handleRow);
|
|
3854
|
+
return paginatedRowModel;
|
|
3844
3855
|
}, {
|
|
3845
3856
|
key: 'getPaginationRowModel',
|
|
3846
3857
|
debug: () => {
|