@tanstack/react-table 8.5.9 → 8.5.12
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 +4 -3
- package/build/cjs/table-core/build/esm/index.js.map +1 -1
- package/build/esm/index.js +4 -3
- package/build/esm/index.js.map +1 -1
- package/build/stats-html.html +17 -17
- package/build/stats-react.json +18 -18
- package/build/umd/index.development.js +4 -3
- 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
|
@@ -660,11 +660,11 @@ var drawChart = (function (exports) {
|
|
|
660
660
|
return availableSizeProperties;
|
|
661
661
|
};
|
|
662
662
|
|
|
663
|
-
var t,u,
|
|
663
|
+
var t,r,u,i,o=0,c=[],f=[],e=l$1.__b,a=l$1.__r,v=l$1.diffed,l=l$1.__c,m=l$1.unmount;function d(t,u){l$1.__h&&l$1.__h(r,t,o||u),o=0;var i=r.__H||(r.__H={__:[],__h:[]});return t>=i.__.length&&i.__.push({__V:f}),i.__[t]}function p(n){return o=1,y(z,n)}function y(n,u,i){var o=d(t++,2);if(o.t=n,!o.__c&&(o.__=[i?i(u):z(void 0,u),function(n){var t=o.__N?o.__N[0]:o.__[0],r=o.t(t,n);t!==r&&(o.__N=[r,o.__[1]],o.__c.setState({}));}],o.__c=r,!r.u)){r.u=!0;var c=r.shouldComponentUpdate;r.shouldComponentUpdate=function(n,t,r){if(!o.__c.__H)return !0;var u=o.__c.__H.__.filter(function(n){return n.__c});if(u.every(function(n){return !n.__N}))return !c||c.call(this,n,t,r);var i=!1;return u.forEach(function(n){if(n.__N){var t=n.__[0];n.__=n.__N,n.__N=void 0,t!==n.__[0]&&(i=!0);}}),!!i&&(!c||c.call(this,n,t,r))};}return o.__N||o.__}function h(u,i){var o=d(t++,3);!l$1.__s&&w(o.__H,i)&&(o.__=u,o.i=i,r.__H.__h.push(o));}function s(u,i){var o=d(t++,4);!l$1.__s&&w(o.__H,i)&&(o.__=u,o.i=i,r.__h.push(o));}function _(n){return o=5,F(function(){return {current:n}},[])}function F(n,r){var u=d(t++,7);return w(u.__H,r)?(u.__V=n(),u.i=r,u.__h=n,u.__V):u.__}function q(n){var u=r.context[n.__c],i=d(t++,9);return i.c=n,u?(null==i.__&&(i.__=!0,u.sub(r)),u.props.value):n.__}function b(){for(var t;t=c.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(j),t.__H.__h.forEach(k),t.__H.__h=[];}catch(r){t.__H.__h=[],l$1.__e(r,t.__v);}}l$1.__b=function(n){r=null,e&&e(n);},l$1.__r=function(n){a&&a(n),t=0;var i=(r=n.__c).__H;i&&(u===r?(i.__h=[],r.__h=[],i.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=f,n.__N=n.i=void 0;})):(i.__h.forEach(j),i.__h.forEach(k),i.__h=[])),u=r;},l$1.diffed=function(t){v&&v(t);var o=t.__c;o&&o.__H&&(o.__H.__h.length&&(1!==c.push(o)&&i===l$1.requestAnimationFrame||((i=l$1.requestAnimationFrame)||function(n){var t,r=function(){clearTimeout(u),g&&cancelAnimationFrame(t),setTimeout(n);},u=setTimeout(r,100);g&&(t=requestAnimationFrame(r));})(b)),o.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==f&&(n.__=n.__V),n.i=void 0,n.__V=f;})),u=r=null;},l$1.__c=function(t,r){r.some(function(t){try{t.__h.forEach(j),t.__h=t.__h.filter(function(n){return !n.__||k(n)});}catch(u){r.some(function(n){n.__h&&(n.__h=[]);}),r=[],l$1.__e(u,t.__v);}}),l&&l(t,r);},l$1.unmount=function(t){m&&m(t);var r,u=t.__c;u&&u.__H&&(u.__H.__.forEach(function(n){try{j(n);}catch(n){r=n;}}),r&&l$1.__e(r,u.__v));};var g="function"==typeof requestAnimationFrame;function j(n){var t=r,u=n.__c;"function"==typeof u&&(n.__c=void 0,u()),r=t;}function k(n){var t=r;n.__c=n.__(),r=t;}function w(n,t){return !n||n.length!==t.length||t.some(function(t,r){return t!==n[r]})}function z(n,t){return "function"==typeof t?t(n):t}
|
|
664
664
|
|
|
665
665
|
const SideBar = ({ availableSizeProperties, sizeProperty, setSizeProperty, onExcludeChange, onIncludeChange, }) => {
|
|
666
|
-
const [includeValue, setIncludeValue] =
|
|
667
|
-
const [excludeValue, setExcludeValue] =
|
|
666
|
+
const [includeValue, setIncludeValue] = p("");
|
|
667
|
+
const [excludeValue, setExcludeValue] = p("");
|
|
668
668
|
const handleSizePropertyChange = (sizeProp) => () => {
|
|
669
669
|
if (sizeProp !== sizeProperty) {
|
|
670
670
|
setSizeProperty(sizeProp);
|
|
@@ -700,8 +700,8 @@ var drawChart = (function (exports) {
|
|
|
700
700
|
};
|
|
701
701
|
};
|
|
702
702
|
const useFilter = () => {
|
|
703
|
-
const [includeFilter, setIncludeFilter] =
|
|
704
|
-
const [excludeFilter, setExcludeFilter] =
|
|
703
|
+
const [includeFilter, setIncludeFilter] = p("");
|
|
704
|
+
const [excludeFilter, setExcludeFilter] = p("");
|
|
705
705
|
const setIncludeFilterTrottled = F(() => throttleFilter(setIncludeFilter, 200), []);
|
|
706
706
|
const setExcludeFilterTrottled = F(() => throttleFilter(setExcludeFilter, 200), []);
|
|
707
707
|
const isModuleIncluded = F(() => {
|
|
@@ -954,8 +954,8 @@ var drawChart = (function (exports) {
|
|
|
954
954
|
const { getModuleColor } = q(StaticContext);
|
|
955
955
|
const { backgroundColor, fontColor } = getModuleColor(node);
|
|
956
956
|
const { x0, x1, y1, y0, data, children = null } = node;
|
|
957
|
-
const textRef =
|
|
958
|
-
const textRectRef =
|
|
957
|
+
const textRef = _(null);
|
|
958
|
+
const textRectRef = _();
|
|
959
959
|
const width = x1 - x0;
|
|
960
960
|
const height = y1 - y0;
|
|
961
961
|
const textProps = {
|
|
@@ -970,7 +970,7 @@ var drawChart = (function (exports) {
|
|
|
970
970
|
else {
|
|
971
971
|
textProps.y = height / 2;
|
|
972
972
|
}
|
|
973
|
-
|
|
973
|
+
s(() => {
|
|
974
974
|
if (width == 0 || height == 0 || !textRef.current) {
|
|
975
975
|
return;
|
|
976
976
|
}
|
|
@@ -1208,8 +1208,8 @@ var drawChart = (function (exports) {
|
|
|
1208
1208
|
const COMPRESSED = (e$1("span", { children: [e$1("b", { children: LABELS.gzipLength }), " and ", e$1("b", { children: LABELS.brotliLength }), " is a byte size of individual file after individual", " ", "transformations,", e$1("br", {}), " treeshake and compression."] }));
|
|
1209
1209
|
const Tooltip = ({ node, visible, root, sizeProperty }) => {
|
|
1210
1210
|
const { availableSizeProperties, getModuleSize, data } = q(StaticContext);
|
|
1211
|
-
const ref =
|
|
1212
|
-
const [style, setStyle] =
|
|
1211
|
+
const ref = _(null);
|
|
1212
|
+
const [style, setStyle] = p({});
|
|
1213
1213
|
const content = F(() => {
|
|
1214
1214
|
if (!node)
|
|
1215
1215
|
return null;
|
|
@@ -1257,7 +1257,7 @@ var drawChart = (function (exports) {
|
|
|
1257
1257
|
}
|
|
1258
1258
|
setStyle(pos);
|
|
1259
1259
|
};
|
|
1260
|
-
|
|
1260
|
+
h(() => {
|
|
1261
1261
|
const handleMouseMove = (event) => {
|
|
1262
1262
|
updatePosition({
|
|
1263
1263
|
x: event.pageX,
|
|
@@ -1273,9 +1273,9 @@ var drawChart = (function (exports) {
|
|
|
1273
1273
|
};
|
|
1274
1274
|
|
|
1275
1275
|
const Chart = ({ root, sizeProperty, selectedNode, setSelectedNode }) => {
|
|
1276
|
-
const [showTooltip, setShowTooltip] =
|
|
1277
|
-
const [tooltipNode, setTooltipNode] =
|
|
1278
|
-
|
|
1276
|
+
const [showTooltip, setShowTooltip] = p(false);
|
|
1277
|
+
const [tooltipNode, setTooltipNode] = p(undefined);
|
|
1278
|
+
h(() => {
|
|
1279
1279
|
const handleMouseOut = () => {
|
|
1280
1280
|
setShowTooltip(false);
|
|
1281
1281
|
};
|
|
@@ -1294,8 +1294,8 @@ var drawChart = (function (exports) {
|
|
|
1294
1294
|
|
|
1295
1295
|
const Main = () => {
|
|
1296
1296
|
const { availableSizeProperties, rawHierarchy, getModuleSize, layout, data } = q(StaticContext);
|
|
1297
|
-
const [sizeProperty, setSizeProperty] =
|
|
1298
|
-
const [selectedNode, setSelectedNode] =
|
|
1297
|
+
const [sizeProperty, setSizeProperty] = p(availableSizeProperties[0]);
|
|
1298
|
+
const [selectedNode, setSelectedNode] = p(undefined);
|
|
1299
1299
|
const { getModuleFilterMultiplier, setExcludeFilter, setIncludeFilter } = useFilter();
|
|
1300
1300
|
console.time("getNodeSizeMultiplier");
|
|
1301
1301
|
const getNodeSizeMultiplier = F(() => {
|
|
@@ -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":"361d-127"},{"name":"react-table/src/index.tsx","uid":"361d-129"}]}]}],"isRoot":true},"nodeParts":{"361d-127":{"renderedLength":138540,"gzipLength":24036,"brotliLength":0,"mainUid":"361d-126"},"361d-129":{"renderedLength":1900,"gzipLength":752,"brotliLength":0,"mainUid":"361d-128"}},"nodeMetas":{"361d-126":{"id":"/packages/table-core/build/esm/index.js","moduleParts":{"index.production.js":"361d-127"},"imported":[],"importedBy":[{"uid":"361d-128"}]},"361d-128":{"id":"/packages/react-table/src/index.tsx","moduleParts":{"index.production.js":"361d-129"},"imported":[{"uid":"361d-130"},{"uid":"361d-126"}],"importedBy":[],"isEntry":true},"361d-130":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"361d-128"}],"isExternal":true}},"env":{"rollup":"2.79.0"},"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": "361d-132"
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
"name": "react-table/src/index.tsx",
|
|
18
|
-
"uid": "
|
|
18
|
+
"uid": "361d-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
|
+
"361d-132": {
|
|
29
|
+
"renderedLength": 138540,
|
|
30
|
+
"gzipLength": 24036,
|
|
31
31
|
"brotliLength": 0,
|
|
32
|
-
"mainUid": "
|
|
32
|
+
"mainUid": "361d-131"
|
|
33
33
|
},
|
|
34
|
-
"
|
|
34
|
+
"361d-134": {
|
|
35
35
|
"renderedLength": 1900,
|
|
36
36
|
"gzipLength": 752,
|
|
37
37
|
"brotliLength": 0,
|
|
38
|
-
"mainUid": "
|
|
38
|
+
"mainUid": "361d-133"
|
|
39
39
|
}
|
|
40
40
|
},
|
|
41
41
|
"nodeMetas": {
|
|
42
|
-
"
|
|
42
|
+
"361d-131": {
|
|
43
43
|
"id": "/packages/table-core/build/esm/index.js",
|
|
44
44
|
"moduleParts": {
|
|
45
|
-
"index.production.js": "
|
|
45
|
+
"index.production.js": "361d-132"
|
|
46
46
|
},
|
|
47
47
|
"imported": [],
|
|
48
48
|
"importedBy": [
|
|
49
49
|
{
|
|
50
|
-
"uid": "
|
|
50
|
+
"uid": "361d-133"
|
|
51
51
|
}
|
|
52
52
|
]
|
|
53
53
|
},
|
|
54
|
-
"
|
|
54
|
+
"361d-133": {
|
|
55
55
|
"id": "/packages/react-table/src/index.tsx",
|
|
56
56
|
"moduleParts": {
|
|
57
|
-
"index.production.js": "
|
|
57
|
+
"index.production.js": "361d-134"
|
|
58
58
|
},
|
|
59
59
|
"imported": [
|
|
60
60
|
{
|
|
61
|
-
"uid": "
|
|
61
|
+
"uid": "361d-135"
|
|
62
62
|
},
|
|
63
63
|
{
|
|
64
|
-
"uid": "
|
|
64
|
+
"uid": "361d-131"
|
|
65
65
|
}
|
|
66
66
|
],
|
|
67
67
|
"importedBy": [],
|
|
68
68
|
"isEntry": true
|
|
69
69
|
},
|
|
70
|
-
"
|
|
70
|
+
"361d-135": {
|
|
71
71
|
"id": "react",
|
|
72
72
|
"moduleParts": {},
|
|
73
73
|
"imported": [],
|
|
74
74
|
"importedBy": [
|
|
75
75
|
{
|
|
76
|
-
"uid": "
|
|
76
|
+
"uid": "361d-133"
|
|
77
77
|
}
|
|
78
78
|
],
|
|
79
79
|
"isExternal": true
|
|
80
80
|
}
|
|
81
81
|
},
|
|
82
82
|
"env": {
|
|
83
|
-
"rollup": "2.
|
|
83
|
+
"rollup": "2.79.0"
|
|
84
84
|
},
|
|
85
85
|
"options": {
|
|
86
86
|
"gzip": true,
|
|
@@ -3083,13 +3083,16 @@
|
|
|
3083
3083
|
column,
|
|
3084
3084
|
getValue: () => row.getValue(columnId),
|
|
3085
3085
|
renderValue: getRenderValue,
|
|
3086
|
-
getContext: () => ({
|
|
3086
|
+
getContext: memo(() => [table, column, row, cell], (table, column, row, cell) => ({
|
|
3087
3087
|
table,
|
|
3088
3088
|
column,
|
|
3089
3089
|
row,
|
|
3090
3090
|
cell: cell,
|
|
3091
3091
|
getValue: cell.getValue,
|
|
3092
3092
|
renderValue: cell.renderValue
|
|
3093
|
+
}), {
|
|
3094
|
+
key: 'cell.getContext',
|
|
3095
|
+
debug: () => table.options.debugAll
|
|
3093
3096
|
})
|
|
3094
3097
|
};
|
|
3095
3098
|
|
|
@@ -3821,7 +3824,6 @@
|
|
|
3821
3824
|
|
|
3822
3825
|
if (!paginateExpandedRows) {
|
|
3823
3826
|
// Only expand rows at this point if they are being paginated
|
|
3824
|
-
console.log(rowModel.rows);
|
|
3825
3827
|
return rowModel;
|
|
3826
3828
|
}
|
|
3827
3829
|
|
|
@@ -3890,7 +3892,6 @@
|
|
|
3890
3892
|
};
|
|
3891
3893
|
}
|
|
3892
3894
|
|
|
3893
|
-
console.log(paginatedRowModel.rows);
|
|
3894
3895
|
paginatedRowModel.flatRows = [];
|
|
3895
3896
|
|
|
3896
3897
|
const handleRow = row => {
|