@tanstack/vue-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/cjs/vue-table/src/index.js +12 -12
- package/build/cjs/vue-table/src/index.js.map +1 -1
- package/build/esm/index.js +44 -20
- package/build/esm/index.js.map +1 -1
- package/build/stats-html.html +1 -1
- package/build/stats-react.json +27 -27
- package/build/types/index.d.ts +8 -3
- package/build/umd/index.development.js +44 -20
- 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/src/index.ts +14 -15
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-149"},{"name":"vue-table/src","children":[{"uid":"6455-151","name":"merge-proxy.ts"},{"uid":"6455-153","name":"index.ts"}]}]}]}],"isRoot":true},"nodeParts":{"6455-149":{"renderedLength":138168,"gzipLength":23982,"brotliLength":0,"mainUid":"6455-148"},"6455-151":{"renderedLength":1622,"gzipLength":660,"brotliLength":0,"mainUid":"6455-150"},"6455-153":{"renderedLength":1748,"gzipLength":687,"brotliLength":0,"mainUid":"6455-152"}},"nodeMetas":{"6455-148":{"id":"/packages/table-core/build/esm/index.js","moduleParts":{"index.production.js":"6455-149"},"imported":[],"importedBy":[{"uid":"6455-152"}]},"6455-150":{"id":"/packages/vue-table/src/merge-proxy.ts","moduleParts":{"index.production.js":"6455-151"},"imported":[],"importedBy":[{"uid":"6455-152"}]},"6455-152":{"id":"/packages/vue-table/src/index.ts","moduleParts":{"index.production.js":"6455-153"},"imported":[{"uid":"6455-148"},{"uid":"6455-154"},{"uid":"6455-150"}],"importedBy":[],"isEntry":true},"6455-154":{"id":"vue","moduleParts":{},"imported":[],"importedBy":[{"uid":"6455-152"}],"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,17 +11,17 @@
|
|
|
11
11
|
"children": [
|
|
12
12
|
{
|
|
13
13
|
"name": "table-core/build/esm/index.js",
|
|
14
|
-
"uid": "
|
|
14
|
+
"uid": "6455-156"
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
"name": "vue-table/src",
|
|
18
18
|
"children": [
|
|
19
19
|
{
|
|
20
|
-
"uid": "
|
|
20
|
+
"uid": "6455-158",
|
|
21
21
|
"name": "merge-proxy.ts"
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
|
-
"uid": "
|
|
24
|
+
"uid": "6455-160",
|
|
25
25
|
"name": "index.ts"
|
|
26
26
|
}
|
|
27
27
|
]
|
|
@@ -34,83 +34,83 @@
|
|
|
34
34
|
"isRoot": true
|
|
35
35
|
},
|
|
36
36
|
"nodeParts": {
|
|
37
|
-
"
|
|
38
|
-
"renderedLength":
|
|
39
|
-
"gzipLength":
|
|
37
|
+
"6455-156": {
|
|
38
|
+
"renderedLength": 138168,
|
|
39
|
+
"gzipLength": 23982,
|
|
40
40
|
"brotliLength": 0,
|
|
41
|
-
"mainUid": "
|
|
41
|
+
"mainUid": "6455-155"
|
|
42
42
|
},
|
|
43
|
-
"
|
|
43
|
+
"6455-158": {
|
|
44
44
|
"renderedLength": 1622,
|
|
45
45
|
"gzipLength": 660,
|
|
46
46
|
"brotliLength": 0,
|
|
47
|
-
"mainUid": "
|
|
47
|
+
"mainUid": "6455-157"
|
|
48
48
|
},
|
|
49
|
-
"
|
|
50
|
-
"renderedLength":
|
|
51
|
-
"gzipLength":
|
|
49
|
+
"6455-160": {
|
|
50
|
+
"renderedLength": 1748,
|
|
51
|
+
"gzipLength": 687,
|
|
52
52
|
"brotliLength": 0,
|
|
53
|
-
"mainUid": "
|
|
53
|
+
"mainUid": "6455-159"
|
|
54
54
|
}
|
|
55
55
|
},
|
|
56
56
|
"nodeMetas": {
|
|
57
|
-
"
|
|
57
|
+
"6455-155": {
|
|
58
58
|
"id": "/packages/table-core/build/esm/index.js",
|
|
59
59
|
"moduleParts": {
|
|
60
|
-
"index.production.js": "
|
|
60
|
+
"index.production.js": "6455-156"
|
|
61
61
|
},
|
|
62
62
|
"imported": [],
|
|
63
63
|
"importedBy": [
|
|
64
64
|
{
|
|
65
|
-
"uid": "
|
|
65
|
+
"uid": "6455-159"
|
|
66
66
|
}
|
|
67
67
|
]
|
|
68
68
|
},
|
|
69
|
-
"
|
|
69
|
+
"6455-157": {
|
|
70
70
|
"id": "/packages/vue-table/src/merge-proxy.ts",
|
|
71
71
|
"moduleParts": {
|
|
72
|
-
"index.production.js": "
|
|
72
|
+
"index.production.js": "6455-158"
|
|
73
73
|
},
|
|
74
74
|
"imported": [],
|
|
75
75
|
"importedBy": [
|
|
76
76
|
{
|
|
77
|
-
"uid": "
|
|
77
|
+
"uid": "6455-159"
|
|
78
78
|
}
|
|
79
79
|
]
|
|
80
80
|
},
|
|
81
|
-
"
|
|
81
|
+
"6455-159": {
|
|
82
82
|
"id": "/packages/vue-table/src/index.ts",
|
|
83
83
|
"moduleParts": {
|
|
84
|
-
"index.production.js": "
|
|
84
|
+
"index.production.js": "6455-160"
|
|
85
85
|
},
|
|
86
86
|
"imported": [
|
|
87
87
|
{
|
|
88
|
-
"uid": "
|
|
88
|
+
"uid": "6455-155"
|
|
89
89
|
},
|
|
90
90
|
{
|
|
91
|
-
"uid": "
|
|
91
|
+
"uid": "6455-161"
|
|
92
92
|
},
|
|
93
93
|
{
|
|
94
|
-
"uid": "
|
|
94
|
+
"uid": "6455-157"
|
|
95
95
|
}
|
|
96
96
|
],
|
|
97
97
|
"importedBy": [],
|
|
98
98
|
"isEntry": true
|
|
99
99
|
},
|
|
100
|
-
"
|
|
100
|
+
"6455-161": {
|
|
101
101
|
"id": "vue",
|
|
102
102
|
"moduleParts": {},
|
|
103
103
|
"imported": [],
|
|
104
104
|
"importedBy": [
|
|
105
105
|
{
|
|
106
|
-
"uid": "
|
|
106
|
+
"uid": "6455-159"
|
|
107
107
|
}
|
|
108
108
|
],
|
|
109
109
|
"isExternal": true
|
|
110
110
|
}
|
|
111
111
|
},
|
|
112
112
|
"env": {
|
|
113
|
-
"rollup": "2.77.
|
|
113
|
+
"rollup": "2.77.2"
|
|
114
114
|
},
|
|
115
115
|
"options": {
|
|
116
116
|
"gzip": true,
|
package/build/types/index.d.ts
CHANGED
|
@@ -11,9 +11,14 @@
|
|
|
11
11
|
import * as _tanstack_table_core from '@tanstack/table-core';
|
|
12
12
|
import { RowData, TableOptions } from '@tanstack/table-core';
|
|
13
13
|
export * from '@tanstack/table-core';
|
|
14
|
-
import { VNode } from 'vue';
|
|
15
14
|
|
|
16
|
-
declare
|
|
15
|
+
declare const FlexRender: {
|
|
16
|
+
props: string[];
|
|
17
|
+
setup: (props: {
|
|
18
|
+
render: any;
|
|
19
|
+
props: any;
|
|
20
|
+
}) => () => any;
|
|
21
|
+
};
|
|
17
22
|
declare function useVueTable<TData extends RowData>(options: TableOptions<TData>): _tanstack_table_core.Table<TData>;
|
|
18
23
|
|
|
19
|
-
export {
|
|
24
|
+
export { FlexRender, useVueTable };
|
|
@@ -1159,7 +1159,9 @@
|
|
|
1159
1159
|
return filterFns.weakEquals;
|
|
1160
1160
|
},
|
|
1161
1161
|
getFilterFn: () => {
|
|
1162
|
-
|
|
1162
|
+
var _table$options$filter, _table$options$filter2;
|
|
1163
|
+
|
|
1164
|
+
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];
|
|
1163
1165
|
},
|
|
1164
1166
|
getCanFilter: () => {
|
|
1165
1167
|
var _column$columnDef$ena, _table$options$enable, _table$options$enable2;
|
|
@@ -1258,10 +1260,12 @@
|
|
|
1258
1260
|
return filterFns.includesString;
|
|
1259
1261
|
},
|
|
1260
1262
|
getGlobalFilterFn: () => {
|
|
1263
|
+
var _table$options$filter3, _table$options$filter4;
|
|
1264
|
+
|
|
1261
1265
|
const {
|
|
1262
1266
|
globalFilterFn: globalFilterFn
|
|
1263
1267
|
} = table.options;
|
|
1264
|
-
return isFunction(globalFilterFn) ? globalFilterFn : globalFilterFn === 'auto' ? table.getGlobalAutoFilterFn() : filterFns[globalFilterFn];
|
|
1268
|
+
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];
|
|
1265
1269
|
},
|
|
1266
1270
|
setColumnFilters: updater => {
|
|
1267
1271
|
const leafColumns = table.getAllLeafColumns();
|
|
@@ -1298,8 +1302,11 @@
|
|
|
1298
1302
|
table.setColumnFilters(defaultState ? [] : (_table$initialState$c = (_table$initialState = table.initialState) == null ? void 0 : _table$initialState.columnFilters) != null ? _table$initialState$c : []);
|
|
1299
1303
|
},
|
|
1300
1304
|
getPreFilteredRowModel: () => table.getCoreRowModel(),
|
|
1301
|
-
_getFilteredRowModel: table.options.getFilteredRowModel && table.options.getFilteredRowModel(table),
|
|
1302
1305
|
getFilteredRowModel: () => {
|
|
1306
|
+
if (!table._getFilteredRowModel && table.options.getFilteredRowModel) {
|
|
1307
|
+
table._getFilteredRowModel = table.options.getFilteredRowModel(table);
|
|
1308
|
+
}
|
|
1309
|
+
|
|
1303
1310
|
if (table.options.manualFiltering || !table._getFilteredRowModel) {
|
|
1304
1311
|
return table.getPreFilteredRowModel();
|
|
1305
1312
|
}
|
|
@@ -1515,11 +1522,13 @@
|
|
|
1515
1522
|
}
|
|
1516
1523
|
},
|
|
1517
1524
|
getAggregationFn: () => {
|
|
1525
|
+
var _table$options$aggreg, _table$options$aggreg2;
|
|
1526
|
+
|
|
1518
1527
|
if (!column) {
|
|
1519
1528
|
throw new Error();
|
|
1520
1529
|
}
|
|
1521
1530
|
|
|
1522
|
-
return isFunction(column.columnDef.aggregationFn) ? column.columnDef.aggregationFn : column.columnDef.aggregationFn === 'auto' ? column.getAutoAggregationFn() : aggregationFns[column.columnDef.aggregationFn];
|
|
1531
|
+
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];
|
|
1523
1532
|
}
|
|
1524
1533
|
};
|
|
1525
1534
|
},
|
|
@@ -2536,11 +2545,13 @@
|
|
|
2536
2545
|
return 'desc';
|
|
2537
2546
|
},
|
|
2538
2547
|
getSortingFn: () => {
|
|
2548
|
+
var _table$options$sortin, _table$options$sortin2;
|
|
2549
|
+
|
|
2539
2550
|
if (!column) {
|
|
2540
2551
|
throw new Error();
|
|
2541
2552
|
}
|
|
2542
2553
|
|
|
2543
|
-
return isFunction(column.columnDef.sortingFn) ? column.columnDef.sortingFn : column.columnDef.sortingFn === 'auto' ? column.getAutoSortingFn() : sortingFns[column.columnDef.sortingFn];
|
|
2554
|
+
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];
|
|
2544
2555
|
},
|
|
2545
2556
|
toggleSorting: (desc, multi) => {
|
|
2546
2557
|
// if (column.columns.length) {
|
|
@@ -2924,8 +2935,20 @@
|
|
|
2924
2935
|
|
|
2925
2936
|
defaultColumn = (_defaultColumn = defaultColumn) != null ? _defaultColumn : {};
|
|
2926
2937
|
return {
|
|
2927
|
-
header: props =>
|
|
2928
|
-
|
|
2938
|
+
header: props => {
|
|
2939
|
+
const resolvedColumnDef = props.header.column.columnDef;
|
|
2940
|
+
|
|
2941
|
+
if (resolvedColumnDef.accessorKey) {
|
|
2942
|
+
return resolvedColumnDef.accessorKey;
|
|
2943
|
+
}
|
|
2944
|
+
|
|
2945
|
+
if (resolvedColumnDef.accessorFn) {
|
|
2946
|
+
return resolvedColumnDef.id;
|
|
2947
|
+
}
|
|
2948
|
+
|
|
2949
|
+
return null;
|
|
2950
|
+
},
|
|
2951
|
+
// footer: props => props.header.column.id,
|
|
2929
2952
|
cell: props => {
|
|
2930
2953
|
var _props$renderValue$to, _props$renderValue;
|
|
2931
2954
|
|
|
@@ -3162,7 +3185,8 @@
|
|
|
3162
3185
|
accessorKey: accessor
|
|
3163
3186
|
};
|
|
3164
3187
|
},
|
|
3165
|
-
display: column => column
|
|
3188
|
+
display: column => column,
|
|
3189
|
+
group: column => column
|
|
3166
3190
|
};
|
|
3167
3191
|
}
|
|
3168
3192
|
|
|
@@ -3936,15 +3960,18 @@
|
|
|
3936
3960
|
}, propTraps);
|
|
3937
3961
|
}
|
|
3938
3962
|
|
|
3939
|
-
|
|
3940
|
-
|
|
3963
|
+
const FlexRender = {
|
|
3964
|
+
props: ['render', 'props'],
|
|
3965
|
+
setup: props => {
|
|
3966
|
+
return () => {
|
|
3967
|
+
if (typeof props.render === 'function' || typeof props.render === 'object') {
|
|
3968
|
+
return vue.h(props.render, props.props);
|
|
3969
|
+
}
|
|
3941
3970
|
|
|
3942
|
-
|
|
3943
|
-
|
|
3971
|
+
return props.render;
|
|
3972
|
+
};
|
|
3944
3973
|
}
|
|
3945
|
-
|
|
3946
|
-
return Comp;
|
|
3947
|
-
}
|
|
3974
|
+
};
|
|
3948
3975
|
function useVueTable(options) {
|
|
3949
3976
|
const resolvedOptions = mergeProxy({
|
|
3950
3977
|
state: {},
|
|
@@ -3986,16 +4013,14 @@
|
|
|
3986
4013
|
}
|
|
3987
4014
|
});
|
|
3988
4015
|
});
|
|
3989
|
-
});
|
|
3990
|
-
// table.willUpdate()
|
|
3991
|
-
// })
|
|
3992
|
-
|
|
4016
|
+
});
|
|
3993
4017
|
return table;
|
|
3994
4018
|
}
|
|
3995
4019
|
|
|
3996
4020
|
exports.ColumnSizing = ColumnSizing;
|
|
3997
4021
|
exports.Expanding = Expanding;
|
|
3998
4022
|
exports.Filters = Filters;
|
|
4023
|
+
exports.FlexRender = FlexRender;
|
|
3999
4024
|
exports.Grouping = Grouping;
|
|
4000
4025
|
exports.Headers = Headers;
|
|
4001
4026
|
exports.Ordering = Ordering;
|
|
@@ -4015,7 +4040,6 @@
|
|
|
4015
4040
|
exports.expandRows = expandRows;
|
|
4016
4041
|
exports.filterFns = filterFns;
|
|
4017
4042
|
exports.flattenBy = flattenBy;
|
|
4018
|
-
exports.flexRender = flexRender;
|
|
4019
4043
|
exports.functionalUpdate = functionalUpdate;
|
|
4020
4044
|
exports.getCoreRowModel = getCoreRowModel;
|
|
4021
4045
|
exports.getExpandedRowModel = getExpandedRowModel;
|