@tanstack/vue-table 8.0.0-beta.8 → 8.0.0-beta.9
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 +29 -18
- package/build/cjs/table-core/build/esm/index.js.map +1 -1
- package/build/esm/index.js +29 -18
- 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 +29 -18
- 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":"612e-149"},{"name":"vue-table/src","children":[{"uid":"612e-151","name":"merge-proxy.ts"},{"uid":"612e-153","name":"index.ts"}]}]}]}],"isRoot":true},"nodeParts":{"612e-149":{"renderedLength":139240,"gzipLength":23684,"brotliLength":0,"mainUid":"612e-148"},"612e-151":{"renderedLength":1622,"gzipLength":660,"brotliLength":0,"mainUid":"612e-150"},"612e-153":{"renderedLength":1807,"gzipLength":709,"brotliLength":0,"mainUid":"612e-152"}},"nodeMetas":{"612e-148":{"id":"/packages/table-core/build/esm/index.js","moduleParts":{"index.production.js":"612e-149"},"imported":[],"importedBy":[{"uid":"612e-152"}]},"612e-150":{"id":"/packages/vue-table/src/merge-proxy.ts","moduleParts":{"index.production.js":"612e-151"},"imported":[],"importedBy":[{"uid":"612e-152"}]},"612e-152":{"id":"/packages/vue-table/src/index.ts","moduleParts":{"index.production.js":"612e-153"},"imported":[{"uid":"612e-148"},{"uid":"612e-154"},{"uid":"612e-150"}],"importedBy":[],"isEntry":true},"612e-154":{"id":"vue","moduleParts":{},"imported":[],"importedBy":[{"uid":"612e-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": "612e-156"
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
"name": "vue-table/src",
|
|
18
18
|
"children": [
|
|
19
19
|
{
|
|
20
|
-
"uid": "
|
|
20
|
+
"uid": "612e-158",
|
|
21
21
|
"name": "merge-proxy.ts"
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
|
-
"uid": "
|
|
24
|
+
"uid": "612e-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
|
+
"612e-156": {
|
|
38
|
+
"renderedLength": 139240,
|
|
39
|
+
"gzipLength": 23684,
|
|
40
40
|
"brotliLength": 0,
|
|
41
|
-
"mainUid": "
|
|
41
|
+
"mainUid": "612e-155"
|
|
42
42
|
},
|
|
43
|
-
"
|
|
43
|
+
"612e-158": {
|
|
44
44
|
"renderedLength": 1622,
|
|
45
45
|
"gzipLength": 660,
|
|
46
46
|
"brotliLength": 0,
|
|
47
|
-
"mainUid": "
|
|
47
|
+
"mainUid": "612e-157"
|
|
48
48
|
},
|
|
49
|
-
"
|
|
49
|
+
"612e-160": {
|
|
50
50
|
"renderedLength": 1807,
|
|
51
51
|
"gzipLength": 709,
|
|
52
52
|
"brotliLength": 0,
|
|
53
|
-
"mainUid": "
|
|
53
|
+
"mainUid": "612e-159"
|
|
54
54
|
}
|
|
55
55
|
},
|
|
56
56
|
"nodeMetas": {
|
|
57
|
-
"
|
|
57
|
+
"612e-155": {
|
|
58
58
|
"id": "/packages/table-core/build/esm/index.js",
|
|
59
59
|
"moduleParts": {
|
|
60
|
-
"index.production.js": "
|
|
60
|
+
"index.production.js": "612e-156"
|
|
61
61
|
},
|
|
62
62
|
"imported": [],
|
|
63
63
|
"importedBy": [
|
|
64
64
|
{
|
|
65
|
-
"uid": "
|
|
65
|
+
"uid": "612e-159"
|
|
66
66
|
}
|
|
67
67
|
]
|
|
68
68
|
},
|
|
69
|
-
"
|
|
69
|
+
"612e-157": {
|
|
70
70
|
"id": "/packages/vue-table/src/merge-proxy.ts",
|
|
71
71
|
"moduleParts": {
|
|
72
|
-
"index.production.js": "
|
|
72
|
+
"index.production.js": "612e-158"
|
|
73
73
|
},
|
|
74
74
|
"imported": [],
|
|
75
75
|
"importedBy": [
|
|
76
76
|
{
|
|
77
|
-
"uid": "
|
|
77
|
+
"uid": "612e-159"
|
|
78
78
|
}
|
|
79
79
|
]
|
|
80
80
|
},
|
|
81
|
-
"
|
|
81
|
+
"612e-159": {
|
|
82
82
|
"id": "/packages/vue-table/src/index.ts",
|
|
83
83
|
"moduleParts": {
|
|
84
|
-
"index.production.js": "
|
|
84
|
+
"index.production.js": "612e-160"
|
|
85
85
|
},
|
|
86
86
|
"imported": [
|
|
87
87
|
{
|
|
88
|
-
"uid": "
|
|
88
|
+
"uid": "612e-155"
|
|
89
89
|
},
|
|
90
90
|
{
|
|
91
|
-
"uid": "
|
|
91
|
+
"uid": "612e-161"
|
|
92
92
|
},
|
|
93
93
|
{
|
|
94
|
-
"uid": "
|
|
94
|
+
"uid": "612e-157"
|
|
95
95
|
}
|
|
96
96
|
],
|
|
97
97
|
"importedBy": [],
|
|
98
98
|
"isEntry": true
|
|
99
99
|
},
|
|
100
|
-
"
|
|
100
|
+
"612e-161": {
|
|
101
101
|
"id": "vue",
|
|
102
102
|
"moduleParts": {},
|
|
103
103
|
"imported": [],
|
|
104
104
|
"importedBy": [
|
|
105
105
|
{
|
|
106
|
-
"uid": "
|
|
106
|
+
"uid": "612e-159"
|
|
107
107
|
}
|
|
108
108
|
],
|
|
109
109
|
"isExternal": true
|
|
@@ -983,38 +983,54 @@
|
|
|
983
983
|
};
|
|
984
984
|
|
|
985
985
|
const includesString = (row, columnId, filterValue) => {
|
|
986
|
+
var _row$getValue;
|
|
987
|
+
|
|
986
988
|
const search = filterValue.toLowerCase();
|
|
987
|
-
return row.getValue(columnId).toLowerCase().includes(search);
|
|
989
|
+
return (_row$getValue = row.getValue(columnId)) == null ? void 0 : _row$getValue.toLowerCase().includes(search);
|
|
988
990
|
};
|
|
989
991
|
|
|
990
992
|
includesString.autoRemove = val => testFalsey(val);
|
|
991
993
|
|
|
992
994
|
const includesStringSensitive = (row, columnId, filterValue) => {
|
|
993
|
-
|
|
995
|
+
var _row$getValue2;
|
|
996
|
+
|
|
997
|
+
return (_row$getValue2 = row.getValue(columnId)) == null ? void 0 : _row$getValue2.includes(filterValue);
|
|
994
998
|
};
|
|
995
999
|
|
|
996
1000
|
includesStringSensitive.autoRemove = val => testFalsey(val);
|
|
997
1001
|
|
|
998
1002
|
const equalsString = (row, columnId, filterValue) => {
|
|
999
|
-
|
|
1003
|
+
var _row$getValue3;
|
|
1004
|
+
|
|
1005
|
+
return ((_row$getValue3 = row.getValue(columnId)) == null ? void 0 : _row$getValue3.toLowerCase()) === filterValue.toLowerCase();
|
|
1000
1006
|
};
|
|
1001
1007
|
|
|
1002
1008
|
equalsString.autoRemove = val => testFalsey(val);
|
|
1003
1009
|
|
|
1004
1010
|
const arrIncludes = (row, columnId, filterValue) => {
|
|
1005
|
-
|
|
1011
|
+
var _row$getValue4;
|
|
1012
|
+
|
|
1013
|
+
return (_row$getValue4 = row.getValue(columnId)) == null ? void 0 : _row$getValue4.includes(filterValue);
|
|
1006
1014
|
};
|
|
1007
1015
|
|
|
1008
1016
|
arrIncludes.autoRemove = val => testFalsey(val) || !(val != null && val.length);
|
|
1009
1017
|
|
|
1010
1018
|
const arrIncludesAll = (row, columnId, filterValue) => {
|
|
1011
|
-
return !filterValue.some(val =>
|
|
1019
|
+
return !filterValue.some(val => {
|
|
1020
|
+
var _row$getValue5;
|
|
1021
|
+
|
|
1022
|
+
return !((_row$getValue5 = row.getValue(columnId)) != null && _row$getValue5.includes(val));
|
|
1023
|
+
});
|
|
1012
1024
|
};
|
|
1013
1025
|
|
|
1014
1026
|
arrIncludesAll.autoRemove = val => testFalsey(val) || !(val != null && val.length);
|
|
1015
1027
|
|
|
1016
1028
|
const arrIncludesSome = (row, columnId, filterValue) => {
|
|
1017
|
-
return filterValue.some(val =>
|
|
1029
|
+
return filterValue.some(val => {
|
|
1030
|
+
var _row$getValue6;
|
|
1031
|
+
|
|
1032
|
+
return (_row$getValue6 = row.getValue(columnId)) == null ? void 0 : _row$getValue6.includes(val);
|
|
1033
|
+
});
|
|
1018
1034
|
};
|
|
1019
1035
|
|
|
1020
1036
|
arrIncludesSome.autoRemove = val => testFalsey(val) || !(val != null && val.length);
|
|
@@ -1699,7 +1715,7 @@
|
|
|
1699
1715
|
setPageIndex: updater => {
|
|
1700
1716
|
instance.setPagination(old => {
|
|
1701
1717
|
let pageIndex = functionalUpdate(updater, old.pageIndex);
|
|
1702
|
-
const maxPageIndex = typeof instance.options.pageCount
|
|
1718
|
+
const maxPageIndex = typeof instance.options.pageCount === 'undefined' || instance.options.pageCount === -1 ? Number.MAX_SAFE_INTEGER : instance.options.pageCount - 1;
|
|
1703
1719
|
pageIndex = Math.min(Math.max(0, pageIndex), maxPageIndex);
|
|
1704
1720
|
return { ...old,
|
|
1705
1721
|
pageIndex
|
|
@@ -3229,8 +3245,6 @@
|
|
|
3229
3245
|
function filterRowModelFromLeafs(rowsToFilter, filterRow, instance) {
|
|
3230
3246
|
const newFilteredFlatRows = [];
|
|
3231
3247
|
const newFilteredRowsById = {};
|
|
3232
|
-
let row;
|
|
3233
|
-
let newRow;
|
|
3234
3248
|
|
|
3235
3249
|
const recurseFilterRows = function (rowsToFilter, depth) {
|
|
3236
3250
|
if (depth === void 0) {
|
|
@@ -3242,10 +3256,10 @@
|
|
|
3242
3256
|
for (let i = 0; i < rowsToFilter.length; i++) {
|
|
3243
3257
|
var _row$subRows;
|
|
3244
3258
|
|
|
3245
|
-
row = rowsToFilter[i];
|
|
3259
|
+
let row = rowsToFilter[i];
|
|
3246
3260
|
|
|
3247
3261
|
if ((_row$subRows = row.subRows) != null && _row$subRows.length) {
|
|
3248
|
-
newRow = createRow(instance, row.id, row.original, row.index, row.depth);
|
|
3262
|
+
const newRow = createRow(instance, row.id, row.original, row.index, row.depth);
|
|
3249
3263
|
newRow.columnFilters = row.columnFilters;
|
|
3250
3264
|
newRow.subRows = recurseFilterRows(row.subRows, depth + 1);
|
|
3251
3265
|
|
|
@@ -3274,10 +3288,7 @@
|
|
|
3274
3288
|
}
|
|
3275
3289
|
function filterRowModelFromRoot(rowsToFilter, filterRow, instance) {
|
|
3276
3290
|
const newFilteredFlatRows = [];
|
|
3277
|
-
const newFilteredRowsById = {};
|
|
3278
|
-
let rows;
|
|
3279
|
-
let row;
|
|
3280
|
-
let newRow; // Filters top level and nested rows
|
|
3291
|
+
const newFilteredRowsById = {}; // Filters top level and nested rows
|
|
3281
3292
|
|
|
3282
3293
|
const recurseFilterRows = function (rowsToFilter, depth) {
|
|
3283
3294
|
if (depth === void 0) {
|
|
@@ -3285,17 +3296,17 @@
|
|
|
3285
3296
|
}
|
|
3286
3297
|
|
|
3287
3298
|
// Filter from parents downward first
|
|
3288
|
-
rows = []; // Apply the filter to any subRows
|
|
3299
|
+
const rows = []; // Apply the filter to any subRows
|
|
3289
3300
|
|
|
3290
3301
|
for (let i = 0; i < rowsToFilter.length; i++) {
|
|
3291
|
-
row = rowsToFilter[i];
|
|
3302
|
+
let row = rowsToFilter[i];
|
|
3292
3303
|
const pass = filterRow(row);
|
|
3293
3304
|
|
|
3294
3305
|
if (pass) {
|
|
3295
3306
|
var _row$subRows2;
|
|
3296
3307
|
|
|
3297
3308
|
if ((_row$subRows2 = row.subRows) != null && _row$subRows2.length) {
|
|
3298
|
-
newRow = createRow(instance, row.id, row.original, row.index, row.depth);
|
|
3309
|
+
const newRow = createRow(instance, row.id, row.original, row.index, row.depth);
|
|
3299
3310
|
newRow.subRows = recurseFilterRows(row.subRows, depth + 1);
|
|
3300
3311
|
row = newRow;
|
|
3301
3312
|
}
|