@infinite-table/infinite-react 0.3.13 → 0.3.14

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/index.esm.js CHANGED
@@ -4664,7 +4664,7 @@ var computeFlex = (params) => {
4664
4664
  totalFlex += itemFlex != null ? itemFlex : 0;
4665
4665
  totalFixedSize += (_e = item.size) != null ? _e : 0;
4666
4666
  });
4667
- let availableSizeForFlex = Math.max(availableSize - totalFixedSize, 0);
4667
+ let availableSizeForFlex = params.computeSpecialSpaceDistribution ? Math.max(availableSize, 0) : Math.max(availableSize - totalFixedSize, 0);
4668
4668
  let sizePerFlex = availableSizeForFlex / totalFlex;
4669
4669
  let maxxedFlexItems = {};
4670
4670
  let minnedFlexItems = {};
@@ -4900,10 +4900,13 @@ var computeGroupResize = (params) => {
4900
4900
  unresizableWidth += item.computedWidth;
4901
4901
  }
4902
4902
  return {
4903
+ maxSize: item.computedMaxWidth,
4904
+ minSize: item.computedMinWidth,
4903
4905
  flex: item.resizable ? item.computedWidth : null,
4904
4906
  size: 0
4905
4907
  };
4906
4908
  }),
4909
+ computeSpecialSpaceDistribution: true,
4907
4910
  availableSize: Math.max(beforeSizes.reduce(sum, 0) + dragHandleOffset - unresizableWidth, 0)
4908
4911
  });
4909
4912
  const diffsForEachItem = beforeItems.map((item, index) => {
@@ -5093,7 +5096,7 @@ function useColumnResizeHandle(column) {
5093
5096
  let atLeastOneFlex = false;
5094
5097
  const columnSizingWithFlex = columns.reduce((acc, col) => {
5095
5098
  if (col.computedFlex) {
5096
- acc[col.id] = { flex: col.computedWidth };
5099
+ acc[col.id] = __spreadProps(__spreadValues({}, columnSizing[col.id]), { flex: col.computedWidth });
5097
5100
  atLeastOneFlex = true;
5098
5101
  }
5099
5102
  return acc;
@@ -5569,7 +5572,7 @@ function useColumnGroupResizeHandle(groupColumns, config) {
5569
5572
  let atLeastOneFlex = false;
5570
5573
  const columnSizingWithFlex = columns.reduce((acc, col) => {
5571
5574
  if (col.computedFlex) {
5572
- acc[col.id] = { flex: col.computedWidth };
5575
+ acc[col.id] = __spreadProps(__spreadValues({}, columnSizing[col.id]), { flex: col.computedWidth });
5573
5576
  atLeastOneFlex = true;
5574
5577
  }
5575
5578
  return acc;
@@ -9694,6 +9697,7 @@ var useComputedVisibleColumns = ({
9694
9697
  columnOrder,
9695
9698
  columnVisibility,
9696
9699
  columnVisibilityAssumeVisible,
9700
+ resizableColumns,
9697
9701
  pinnedEndMaxWidth,
9698
9702
  pinnedStartMaxWidth,
9699
9703
  columnSizing,
@@ -10130,7 +10134,7 @@ var useLicense = (licenseKey = "") => {
10130
10134
  const valid = useMemo12(() => {
10131
10135
  let valid2 = isValidLicense(licenseKey, {
10132
10136
  publishedAt: 1624970570587,
10133
- version: "0.3.13"
10137
+ version: "0.3.14"
10134
10138
  });
10135
10139
  if (!licenseKey && !valid2 && isInsidePlayground) {
10136
10140
  return true;
package/index.js CHANGED
@@ -4613,7 +4613,7 @@ var computeFlex = (params) => {
4613
4613
  totalFlex += itemFlex != null ? itemFlex : 0;
4614
4614
  totalFixedSize += (_e = item.size) != null ? _e : 0;
4615
4615
  });
4616
- let availableSizeForFlex = Math.max(availableSize - totalFixedSize, 0);
4616
+ let availableSizeForFlex = params.computeSpecialSpaceDistribution ? Math.max(availableSize, 0) : Math.max(availableSize - totalFixedSize, 0);
4617
4617
  let sizePerFlex = availableSizeForFlex / totalFlex;
4618
4618
  let maxxedFlexItems = {};
4619
4619
  let minnedFlexItems = {};
@@ -4849,10 +4849,13 @@ var computeGroupResize = (params) => {
4849
4849
  unresizableWidth += item.computedWidth;
4850
4850
  }
4851
4851
  return {
4852
+ maxSize: item.computedMaxWidth,
4853
+ minSize: item.computedMinWidth,
4852
4854
  flex: item.resizable ? item.computedWidth : null,
4853
4855
  size: 0
4854
4856
  };
4855
4857
  }),
4858
+ computeSpecialSpaceDistribution: true,
4856
4859
  availableSize: Math.max(beforeSizes.reduce(sum, 0) + dragHandleOffset - unresizableWidth, 0)
4857
4860
  });
4858
4861
  const diffsForEachItem = beforeItems.map((item, index) => {
@@ -5042,7 +5045,7 @@ function useColumnResizeHandle(column) {
5042
5045
  let atLeastOneFlex = false;
5043
5046
  const columnSizingWithFlex = columns.reduce((acc, col) => {
5044
5047
  if (col.computedFlex) {
5045
- acc[col.id] = { flex: col.computedWidth };
5048
+ acc[col.id] = __spreadProps(__spreadValues({}, columnSizing[col.id]), { flex: col.computedWidth });
5046
5049
  atLeastOneFlex = true;
5047
5050
  }
5048
5051
  return acc;
@@ -5507,7 +5510,7 @@ function useColumnGroupResizeHandle(groupColumns, config) {
5507
5510
  let atLeastOneFlex = false;
5508
5511
  const columnSizingWithFlex = columns.reduce((acc, col) => {
5509
5512
  if (col.computedFlex) {
5510
- acc[col.id] = { flex: col.computedWidth };
5513
+ acc[col.id] = __spreadProps(__spreadValues({}, columnSizing[col.id]), { flex: col.computedWidth });
5511
5514
  atLeastOneFlex = true;
5512
5515
  }
5513
5516
  return acc;
@@ -9606,6 +9609,7 @@ var useComputedVisibleColumns = ({
9606
9609
  columnOrder,
9607
9610
  columnVisibility,
9608
9611
  columnVisibilityAssumeVisible,
9612
+ resizableColumns,
9609
9613
  pinnedEndMaxWidth,
9610
9614
  pinnedStartMaxWidth,
9611
9615
  columnSizing,
@@ -10042,7 +10046,7 @@ var useLicense = (licenseKey = "") => {
10042
10046
  const valid = (0, import_react47.useMemo)(() => {
10043
10047
  let valid2 = isValidLicense(licenseKey, {
10044
10048
  publishedAt: 1624970570587,
10045
- version: "0.3.13"
10049
+ version: "0.3.14"
10046
10050
  });
10047
10051
  if (!licenseKey && !valid2 && isInsidePlayground) {
10048
10052
  return true;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@infinite-table/infinite-react",
3
3
  "description": "Infinite Table for React",
4
- "version": "0.3.13",
4
+ "version": "0.3.14",
5
5
  "main": "index.js",
6
6
  "module": "index.esm.js",
7
7
  "typings": "index.d.ts",
@@ -14,5 +14,5 @@
14
14
  },
15
15
  "license": "Commercial & Open Source",
16
16
  "//": "will be updated at build time",
17
- "publishedAt": 1656062127000
17
+ "publishedAt": 1656080923593
18
18
  }