@tanstack/vue-table 8.5.10 → 8.5.13

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.
@@ -660,11 +660,11 @@ var drawChart = (function (exports) {
660
660
  return availableSizeProperties;
661
661
  };
662
662
 
663
- var t,u,r,o,i=0,c=[],f=[],e=l$1.__b,a=l$1.__r,v=l$1.diffed,l=l$1.__c,m=l$1.unmount;function p(t,r){l$1.__h&&l$1.__h(u,t,i||r),i=0;var o=u.__H||(u.__H={__:[],__h:[]});return t>=o.__.length&&o.__.push({__V:f}),o.__[t]}function y(n){return i=1,d(z,n)}function d(n,r,o){var i=p(t++,2);return i.t=n,i.__c||(i.__=[o?o(r):z(void 0,r),function(n){var t=i.t(i.__[0],n);i.__[0]!==t&&(i.__=[t,i.__[1]],i.__c.setState({}));}],i.__c=u),i.__}function _(r,o){var i=p(t++,3);!l$1.__s&&w(i.__H,o)&&(i.__=r,i.u=o,u.__H.__h.push(i));}function h(r,o){var i=p(t++,4);!l$1.__s&&w(i.__H,o)&&(i.__=r,i.u=o,u.__h.push(i));}function s(n){return i=5,F(function(){return {current:n}},[])}function F(n,u){var r=p(t++,7);return w(r.__H,u)?(r.__V=n(),r.u=u,r.__h=n,r.__V):r.__}function q(n){var r=u.context[n.__c],o=p(t++,9);return o.c=n,r?(null==o.__&&(o.__=!0,r.sub(u)),r.props.value):n.__}function b(){for(var t;t=c.shift();)if(t.__P)try{t.__H.__h.forEach(j),t.__H.__h.forEach(k),t.__H.__h=[];}catch(u){t.__H.__h=[],l$1.__e(u,t.__v);}}l$1.__b=function(n){u=null,e&&e(n);},l$1.__r=function(n){a&&a(n),t=0;var o=(u=n.__c).__H;o&&(r===u?(o.__h=[],u.__h=[],o.__.forEach(function(n){n.__V=f,n.u=void 0;})):(o.__h.forEach(j),o.__h.forEach(k),o.__h=[])),r=u;},l$1.diffed=function(t){v&&v(t);var i=t.__c;i&&i.__H&&(i.__H.__h.length&&(1!==c.push(i)&&o===l$1.requestAnimationFrame||((o=l$1.requestAnimationFrame)||function(n){var t,u=function(){clearTimeout(r),g&&cancelAnimationFrame(t),setTimeout(n);},r=setTimeout(u,100);g&&(t=requestAnimationFrame(u));})(b)),i.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.__V!==f&&(n.__=n.__V),n.u=void 0,n.__V=f;})),r=u=null;},l$1.__c=function(t,u){u.some(function(t){try{t.__h.forEach(j),t.__h=t.__h.filter(function(n){return !n.__||k(n)});}catch(r){u.some(function(n){n.__h&&(n.__h=[]);}),u=[],l$1.__e(r,t.__v);}}),l&&l(t,u);},l$1.unmount=function(t){m&&m(t);var u,r=t.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{j(n);}catch(n){u=n;}}),u&&l$1.__e(u,r.__v));};var g="function"==typeof requestAnimationFrame;function j(n){var t=u,r=n.__c;"function"==typeof r&&(n.__c=void 0,r()),u=t;}function k(n){var t=u;n.__c=n.__(),u=t;}function w(n,t){return !n||n.length!==t.length||t.some(function(t,u){return t!==n[u]})}function z(n,t){return "function"==typeof t?t(n):t}
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] = y("");
667
- const [excludeValue, setExcludeValue] = y("");
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] = y("");
704
- const [excludeFilter, setExcludeFilter] = y("");
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 = s(null);
958
- const textRectRef = s();
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
- h(() => {
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 = s(null);
1212
- const [style, setStyle] = y({});
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] = y(false);
1277
- const [tooltipNode, setTooltipNode] = y(undefined);
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] = y(availableSizeProperties[0]);
1298
- const [selectedNode, setSelectedNode] = y(undefined);
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":"00d2-149"},{"name":"vue-table/src","children":[{"uid":"00d2-151","name":"merge-proxy.ts"},{"uid":"00d2-153","name":"index.ts"}]}]}]}],"isRoot":true},"nodeParts":{"00d2-149":{"renderedLength":138375,"gzipLength":24016,"brotliLength":0,"mainUid":"00d2-148"},"00d2-151":{"renderedLength":1622,"gzipLength":660,"brotliLength":0,"mainUid":"00d2-150"},"00d2-153":{"renderedLength":1748,"gzipLength":687,"brotliLength":0,"mainUid":"00d2-152"}},"nodeMetas":{"00d2-148":{"id":"/packages/table-core/build/esm/index.js","moduleParts":{"index.production.js":"00d2-149"},"imported":[],"importedBy":[{"uid":"00d2-152"}]},"00d2-150":{"id":"/packages/vue-table/src/merge-proxy.ts","moduleParts":{"index.production.js":"00d2-151"},"imported":[],"importedBy":[{"uid":"00d2-152"}]},"00d2-152":{"id":"/packages/vue-table/src/index.ts","moduleParts":{"index.production.js":"00d2-153"},"imported":[{"uid":"00d2-148"},{"uid":"00d2-154"},{"uid":"00d2-150"}],"importedBy":[],"isEntry":true},"00d2-154":{"id":"vue","moduleParts":{},"imported":[],"importedBy":[{"uid":"00d2-152"}],"isExternal":true}},"env":{"rollup":"2.77.2"},"options":{"gzip":true,"brotli":false,"sourcemap":false}};
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":"0e66-149"},{"name":"vue-table/src","children":[{"uid":"0e66-151","name":"merge-proxy.ts"},{"uid":"0e66-153","name":"index.ts"}]}]}]}],"isRoot":true},"nodeParts":{"0e66-149":{"renderedLength":138541,"gzipLength":24040,"brotliLength":0,"mainUid":"0e66-148"},"0e66-151":{"renderedLength":1622,"gzipLength":660,"brotliLength":0,"mainUid":"0e66-150"},"0e66-153":{"renderedLength":1748,"gzipLength":687,"brotliLength":0,"mainUid":"0e66-152"}},"nodeMetas":{"0e66-148":{"id":"/packages/table-core/build/esm/index.js","moduleParts":{"index.production.js":"0e66-149"},"imported":[],"importedBy":[{"uid":"0e66-152"}]},"0e66-150":{"id":"/packages/vue-table/src/merge-proxy.ts","moduleParts":{"index.production.js":"0e66-151"},"imported":[],"importedBy":[{"uid":"0e66-152"}]},"0e66-152":{"id":"/packages/vue-table/src/index.ts","moduleParts":{"index.production.js":"0e66-153"},"imported":[{"uid":"0e66-148"},{"uid":"0e66-154"},{"uid":"0e66-150"}],"importedBy":[],"isEntry":true},"0e66-154":{"id":"vue","moduleParts":{},"imported":[],"importedBy":[{"uid":"0e66-152"}],"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;
@@ -11,17 +11,17 @@
11
11
  "children": [
12
12
  {
13
13
  "name": "table-core/build/esm/index.js",
14
- "uid": "00d2-156"
14
+ "uid": "0e66-156"
15
15
  },
16
16
  {
17
17
  "name": "vue-table/src",
18
18
  "children": [
19
19
  {
20
- "uid": "00d2-158",
20
+ "uid": "0e66-158",
21
21
  "name": "merge-proxy.ts"
22
22
  },
23
23
  {
24
- "uid": "00d2-160",
24
+ "uid": "0e66-160",
25
25
  "name": "index.ts"
26
26
  }
27
27
  ]
@@ -34,83 +34,83 @@
34
34
  "isRoot": true
35
35
  },
36
36
  "nodeParts": {
37
- "00d2-156": {
38
- "renderedLength": 138375,
39
- "gzipLength": 24016,
37
+ "0e66-156": {
38
+ "renderedLength": 138541,
39
+ "gzipLength": 24040,
40
40
  "brotliLength": 0,
41
- "mainUid": "00d2-155"
41
+ "mainUid": "0e66-155"
42
42
  },
43
- "00d2-158": {
43
+ "0e66-158": {
44
44
  "renderedLength": 1622,
45
45
  "gzipLength": 660,
46
46
  "brotliLength": 0,
47
- "mainUid": "00d2-157"
47
+ "mainUid": "0e66-157"
48
48
  },
49
- "00d2-160": {
49
+ "0e66-160": {
50
50
  "renderedLength": 1748,
51
51
  "gzipLength": 687,
52
52
  "brotliLength": 0,
53
- "mainUid": "00d2-159"
53
+ "mainUid": "0e66-159"
54
54
  }
55
55
  },
56
56
  "nodeMetas": {
57
- "00d2-155": {
57
+ "0e66-155": {
58
58
  "id": "/packages/table-core/build/esm/index.js",
59
59
  "moduleParts": {
60
- "index.production.js": "00d2-156"
60
+ "index.production.js": "0e66-156"
61
61
  },
62
62
  "imported": [],
63
63
  "importedBy": [
64
64
  {
65
- "uid": "00d2-159"
65
+ "uid": "0e66-159"
66
66
  }
67
67
  ]
68
68
  },
69
- "00d2-157": {
69
+ "0e66-157": {
70
70
  "id": "/packages/vue-table/src/merge-proxy.ts",
71
71
  "moduleParts": {
72
- "index.production.js": "00d2-158"
72
+ "index.production.js": "0e66-158"
73
73
  },
74
74
  "imported": [],
75
75
  "importedBy": [
76
76
  {
77
- "uid": "00d2-159"
77
+ "uid": "0e66-159"
78
78
  }
79
79
  ]
80
80
  },
81
- "00d2-159": {
81
+ "0e66-159": {
82
82
  "id": "/packages/vue-table/src/index.ts",
83
83
  "moduleParts": {
84
- "index.production.js": "00d2-160"
84
+ "index.production.js": "0e66-160"
85
85
  },
86
86
  "imported": [
87
87
  {
88
- "uid": "00d2-155"
88
+ "uid": "0e66-155"
89
89
  },
90
90
  {
91
- "uid": "00d2-161"
91
+ "uid": "0e66-161"
92
92
  },
93
93
  {
94
- "uid": "00d2-157"
94
+ "uid": "0e66-157"
95
95
  }
96
96
  ],
97
97
  "importedBy": [],
98
98
  "isEntry": true
99
99
  },
100
- "00d2-161": {
100
+ "0e66-161": {
101
101
  "id": "vue",
102
102
  "moduleParts": {},
103
103
  "imported": [],
104
104
  "importedBy": [
105
105
  {
106
- "uid": "00d2-159"
106
+ "uid": "0e66-159"
107
107
  }
108
108
  ],
109
109
  "isExternal": true
110
110
  }
111
111
  },
112
112
  "env": {
113
- "rollup": "2.77.2"
113
+ "rollup": "2.79.0"
114
114
  },
115
115
  "options": {
116
116
  "gzip": true,
@@ -1913,7 +1913,7 @@
1913
1913
  }),
1914
1914
  getRightVisibleCells: memo(() => [row._getAllVisibleCells(), table.getState().columnPinning.right], (allCells, right) => {
1915
1915
  const cells = (right != null ? right : []).map(columnId => allCells.find(cell => cell.column.id === columnId)).filter(Boolean).map(d => ({ ...d,
1916
- position: 'left'
1916
+ position: 'right'
1917
1917
  }));
1918
1918
  return cells;
1919
1919
  }, {
@@ -3063,13 +3063,16 @@
3063
3063
  column,
3064
3064
  getValue: () => row.getValue(columnId),
3065
3065
  renderValue: getRenderValue,
3066
- getContext: () => ({
3066
+ getContext: memo(() => [table, column, row, cell], (table, column, row, cell) => ({
3067
3067
  table,
3068
3068
  column,
3069
3069
  row,
3070
3070
  cell: cell,
3071
3071
  getValue: cell.getValue,
3072
3072
  renderValue: cell.renderValue
3073
+ }), {
3074
+ key: 'cell.getContext',
3075
+ debug: () => table.options.debugAll
3073
3076
  })
3074
3077
  };
3075
3078