@infinite-table/infinite-react 0.3.10 → 0.3.11

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.d.ts CHANGED
@@ -505,6 +505,7 @@ declare type InfiniteTablePropPivotGrandTotalColumnPosition = InfiniteTablePropP
505
505
  interface InfiniteTableMappedState<T> {
506
506
  scrollTopKey: InfiniteTableProps<T>['scrollTopKey'];
507
507
  viewportReservedWidth: InfiniteTableProps<T>['viewportReservedWidth'];
508
+ resizableColumns: InfiniteTableProps<T>['resizableColumns'];
508
509
  groupColumn: InfiniteTableProps<T>['groupColumn'];
509
510
  headerOptions: NonUndefined<InfiniteTableProps<T>['headerOptions']>;
510
511
  keyboardNavigation: NonUndefined<InfiniteTableProps<T>['keyboardNavigation']>;
@@ -620,6 +621,7 @@ declare type InfiniteTableColumnType<T> = {
620
621
  resizable?: InfiniteTableColumn<T>['resizable'];
621
622
  align?: InfiniteTableColumn<T>['align'];
622
623
  verticalAlign?: InfiniteTableColumn<T>['verticalAlign'];
624
+ columnGroup?: string;
623
625
  cssEllipsis?: boolean;
624
626
  headerCssEllipsis?: boolean;
625
627
  field?: keyof T;
@@ -1031,6 +1033,9 @@ declare type InfiniteTableComputedColumnBase<T> = {
1031
1033
  computedSortType: string;
1032
1034
  computedDataType: string;
1033
1035
  computedWidth: number;
1036
+ computedFlex: number | null;
1037
+ computedMinWidth: number | null;
1038
+ computedMaxWidth: number | null;
1034
1039
  computedOffset: number;
1035
1040
  computedPinningOffset: number;
1036
1041
  computedAbsoluteOffset: number;
@@ -1047,6 +1052,7 @@ declare type InfiniteTableComputedColumnBase<T> = {
1047
1052
  computedFilterValue: DataSourceFilterValueItem<T> | null;
1048
1053
  computedPinned: InfiniteTableColumnPinnedValues;
1049
1054
  computedDraggable: boolean;
1055
+ computedResizable: boolean;
1050
1056
  computedFirstInCategory: boolean;
1051
1057
  computedLastInCategory: boolean;
1052
1058
  computedFirst: boolean;
package/index.esm.js CHANGED
@@ -672,7 +672,7 @@ var Logger = class {
672
672
  constructor(channelName) {
673
673
  this.debug = emptyLogFn;
674
674
  this.error = emptyLogFn;
675
- if (true) {
675
+ if (false) {
676
676
  this.debug = dbg(channelName);
677
677
  this.error = err(channelName);
678
678
  }
@@ -892,8 +892,8 @@ function SpacePlaceholderFn(props) {
892
892
  };
893
893
  return /* @__PURE__ */ createElement3("div", {
894
894
  "data-count": count,
895
- "data-placeholder-width": true ? width : void 0,
896
- "data-placeholder-height": true ? height : void 0,
895
+ "data-placeholder-width": false ? width : void 0,
896
+ "data-placeholder-height": false ? height : void 0,
897
897
  "data-name": "SpacePlaceholder",
898
898
  style
899
899
  });
@@ -1174,7 +1174,7 @@ var MatrixBrain = class extends Logger {
1174
1174
  if (colWidthDefined) {
1175
1175
  this.colWidth = colWidth;
1176
1176
  }
1177
- if (true) {
1177
+ if (false) {
1178
1178
  if (widthChanged) {
1179
1179
  this.debug("New available width %d (size is %d,%d)", this.width, this.width, this.height);
1180
1180
  }
@@ -1254,12 +1254,18 @@ var MatrixBrain = class extends Logger {
1254
1254
  }
1255
1255
  };
1256
1256
  this.notifyScrollStart = () => {
1257
+ if (this.destroyed) {
1258
+ return;
1259
+ }
1257
1260
  const fns = this.onScrollStartFns;
1258
1261
  for (let i = 0, len = fns.length; i < len; i++) {
1259
1262
  fns[i]();
1260
1263
  }
1261
1264
  };
1262
1265
  this.notifyScrollStop = () => {
1266
+ if (this.destroyed) {
1267
+ return;
1268
+ }
1263
1269
  const fns = this.onScrollStopFns;
1264
1270
  const scrollPos = this.scrollPosition;
1265
1271
  const range = this.getRenderRange();
@@ -1282,37 +1288,61 @@ var MatrixBrain = class extends Logger {
1282
1288
  }
1283
1289
  };
1284
1290
  this.notifyAvailableSizeChange = () => {
1291
+ if (this.destroyed) {
1292
+ return;
1293
+ }
1285
1294
  const fns = this.onAvailableSizeChangeFns;
1286
1295
  const range = this.getAvailableSize();
1287
1296
  for (let i = 0, len = fns.length; i < len; i++) {
1288
1297
  raf2(() => {
1298
+ if (this.destroyed) {
1299
+ return;
1300
+ }
1289
1301
  fns[i](range);
1290
1302
  });
1291
1303
  }
1292
1304
  };
1293
1305
  this.notifyRenderRangeChange = () => {
1306
+ if (this.destroyed) {
1307
+ return;
1308
+ }
1294
1309
  const fns = this.onRenderRangeChangeFns;
1295
1310
  const range = this.getRenderRange();
1296
1311
  for (let i = 0, len = fns.length; i < len; i++) {
1297
1312
  raf2(() => {
1313
+ if (this.destroyed) {
1314
+ return;
1315
+ }
1298
1316
  fns[i](range);
1299
1317
  });
1300
1318
  }
1301
1319
  };
1302
1320
  this.notifyVerticalRenderRangeChange = () => {
1321
+ if (this.destroyed) {
1322
+ return;
1323
+ }
1303
1324
  const fns = this.onVerticalRenderRangeChangeFns;
1304
1325
  const range = this.verticalRenderRange;
1305
1326
  for (let i = 0, len = fns.length; i < len; i++) {
1306
1327
  raf2(() => {
1328
+ if (this.destroyed) {
1329
+ return;
1330
+ }
1307
1331
  fns[i]([range.startIndex, range.endIndex]);
1308
1332
  });
1309
1333
  }
1310
1334
  };
1311
1335
  this.notifyHorizontalRenderRangeChange = () => {
1336
+ if (this.destroyed) {
1337
+ return;
1338
+ }
1312
1339
  const fns = this.onHorizontalRenderRangeChangeFns;
1313
1340
  const range = this.horizontalRenderRange;
1314
1341
  for (let i = 0, len = fns.length; i < len; i++) {
1315
1342
  raf2(() => {
1343
+ if (this.destroyed) {
1344
+ return;
1345
+ }
1316
1346
  fns[i]([range.startIndex, range.endIndex]);
1317
1347
  });
1318
1348
  }
@@ -1668,7 +1698,7 @@ var MatrixBrain = class extends Logger {
1668
1698
  if (cache[i] === void 0) {
1669
1699
  cell[direction === "horizontal" ? "colIndex" : "rowIndex"] = i;
1670
1700
  let spanValue = itemSpan(cell);
1671
- if (spanValue < 1) {
1701
+ if (false) {
1672
1702
  this.debug(`${direction === "horizontal" ? "colspan" : "rowspan"} cannot be less than 1 - got %d for index %d`, spanValue, i);
1673
1703
  }
1674
1704
  cache[i] = i;
@@ -1971,7 +2001,7 @@ var MatrixBrain = class extends Logger {
1971
2001
  }
1972
2002
  this.width = width;
1973
2003
  this.height = height;
1974
- if (true) {
2004
+ if (false) {
1975
2005
  this.debug("New available size: width %d, height %d", this.width, this.height);
1976
2006
  }
1977
2007
  this.notifyAvailableSizeChange();
@@ -1989,6 +2019,9 @@ var MatrixBrain = class extends Logger {
1989
2019
  return totalSize.width - this.width;
1990
2020
  }
1991
2021
  notifyScrollChange() {
2022
+ if (this.destroyed) {
2023
+ return;
2024
+ }
1992
2025
  const { scrollPosition } = this;
1993
2026
  const fns = this.onScrollFns;
1994
2027
  for (let i = 0, len = fns.length; i < len; i++) {
@@ -2005,6 +2038,9 @@ var MatrixBrain = class extends Logger {
2005
2038
  return direction === "horizontal" ? this.getFixedEndColsWidth() : this.getFixedEndRowsHeight();
2006
2039
  }
2007
2040
  notifyRenderCountChange() {
2041
+ if (this.destroyed) {
2042
+ return;
2043
+ }
2008
2044
  const { horizontalRenderCount, verticalRenderCount } = this;
2009
2045
  const renderCount = {
2010
2046
  horizontal: horizontalRenderCount,
@@ -2013,6 +2049,9 @@ var MatrixBrain = class extends Logger {
2013
2049
  const fns = this.onRenderCountChangeFns;
2014
2050
  for (let i = 0, len = fns.length; i < len; i++) {
2015
2051
  raf2(() => {
2052
+ if (this.destroyed) {
2053
+ return;
2054
+ }
2016
2055
  fns[i](renderCount);
2017
2056
  });
2018
2057
  }
@@ -2438,7 +2477,7 @@ var MappedCells = class extends Logger {
2438
2477
  return elementIndex != null ? elementIndex : null;
2439
2478
  };
2440
2479
  this.renderCellAtElement = (rowIndex, colIndex, elementIndex, renderNode) => {
2441
- if (true) {
2480
+ if (false) {
2442
2481
  this.debug(`Render cell ${rowIndex},${colIndex} at element ${elementIndex}`);
2443
2482
  }
2444
2483
  const key = [rowIndex, colIndex];
@@ -2704,7 +2743,7 @@ var ReactHeadlessTableRenderer = class extends Logger {
2704
2743
  return [];
2705
2744
  }
2706
2745
  const { start, end } = range;
2707
- if (true) {
2746
+ if (false) {
2708
2747
  this.debug(`Render range ${start}-${end}. Force ${force}`);
2709
2748
  }
2710
2749
  const { mappedCells } = this;
@@ -2723,7 +2762,7 @@ var ReactHeadlessTableRenderer = class extends Logger {
2723
2762
  if (this.updaters[elementIndex]) {
2724
2763
  this.updaters[elementIndex].destroy();
2725
2764
  }
2726
- if (true) {
2765
+ if (false) {
2727
2766
  this.debug(`Discard element ${elementIndex}`);
2728
2767
  }
2729
2768
  });
@@ -2775,7 +2814,7 @@ var ReactHeadlessTableRenderer = class extends Logger {
2775
2814
  }
2776
2815
  const elementIndex = cellRendered ? mappedCells.getElementIndexForCell(row, col) : mappedCells.getElementFromListForColumn(elementsOutsideItemRange, col);
2777
2816
  if (elementIndex == null) {
2778
- if (true) {
2817
+ if (false) {
2779
2818
  this.error(`Cannot find element to render cell ${row}:${col}`);
2780
2819
  }
2781
2820
  continue;
@@ -2794,7 +2833,7 @@ var ReactHeadlessTableRenderer = class extends Logger {
2794
2833
  }
2795
2834
  const elementIndex = elementsOutsideItemRange.pop();
2796
2835
  if (elementIndex == null) {
2797
- if (true) {
2836
+ if (false) {
2798
2837
  this.error(`Cannot find element to render cell ${rowIndex}-${colIndex}`);
2799
2838
  }
2800
2839
  return;
@@ -2993,7 +3032,7 @@ var ReactHeadlessTableRenderer = class extends Logger {
2993
3032
  const itemElement = this.itemDOMElements[elementIndex];
2994
3033
  const cell = this.mappedCells.getRenderedCellAtElement(elementIndex);
2995
3034
  if (cell == null) {
2996
- if (true) {
3035
+ if (false) {
2997
3036
  this.error(`Cannot find item for element ${elementIndex}`);
2998
3037
  }
2999
3038
  return;
@@ -3006,7 +3045,7 @@ var ReactHeadlessTableRenderer = class extends Logger {
3006
3045
  const { x, y } = itemPosition;
3007
3046
  if (itemElement) {
3008
3047
  this.updateHoverClassNamesForRow(rowIndex);
3009
- if (true) {
3048
+ if (false) {
3010
3049
  itemElement.dataset.rowIndex = rowIndex;
3011
3050
  itemElement.dataset.colIndex = colIndex;
3012
3051
  }
@@ -3015,7 +3054,7 @@ var ReactHeadlessTableRenderer = class extends Logger {
3015
3054
  itemElement.style.willChange = "transform";
3016
3055
  itemElement.style.backfaceVisibility = "hidden";
3017
3056
  const hidden = options ? options.hidden : !!this.isCellCovered(rowIndex, colIndex);
3018
- itemElement.style.zIndex = hidden ? "-1" : "auto";
3057
+ itemElement.style.zIndex = hidden ? "-1" : itemElement.dataset.zIndex || "auto";
3019
3058
  } else {
3020
3059
  itemElement.style.display = "";
3021
3060
  itemElement.style.left = `${x}px`;
@@ -3074,19 +3113,19 @@ var ReactHeadlessTableRenderer = class extends Logger {
3074
3113
  node.style.transform = `translate3d(${coords.x}px, ${fixedEndRowsOffsets[rowIndex]}px, 0)`;
3075
3114
  }
3076
3115
  function adjustColStartRowStart(_rowIndex, _colIndex, node, { x, y }, scrollPosition2) {
3077
- node.style.zIndex = `10000`;
3116
+ node.style.zIndex = `1000000`;
3078
3117
  node.style.transform = `translate3d(${x + scrollPosition2.scrollLeft}px, ${y + scrollPosition2.scrollTop}px, 0)`;
3079
3118
  }
3080
3119
  function adjustColStartRowEnd(_rowIndex, _colIndex, node, { x }, scrollPosition2) {
3081
- node.style.zIndex = `20000`;
3120
+ node.style.zIndex = `2000000`;
3082
3121
  node.style.transform = `translate3d(${x + scrollPosition2.scrollLeft}px, ${fixedEndRowsOffsets[_rowIndex]}px, 0)`;
3083
3122
  }
3084
3123
  function adjustColEndRowStart(_rowIndex, colIndex, node, coords) {
3085
- node.style.zIndex = `30000`;
3124
+ node.style.zIndex = `3000000`;
3086
3125
  node.style.transform = `translate3d(${fixedEndColsOffsets[colIndex]}px, ${coords.y + scrollPosition.scrollTop}px, 0)`;
3087
3126
  }
3088
3127
  function adjustColEndRowEnd(rowIndex, colIndex, node) {
3089
- node.style.zIndex = `40000`;
3128
+ node.style.zIndex = `4000000`;
3090
3129
  node.style.transform = `translate3d(${fixedEndColsOffsets[colIndex]}px, ${fixedEndRowsOffsets[rowIndex]}px, 0)`;
3091
3130
  }
3092
3131
  if (fixedColsStart || fixedColsEnd) {
@@ -3230,7 +3269,7 @@ var ReactHeadlessTableRenderer = class extends Logger {
3230
3269
  return;
3231
3270
  }
3232
3271
  this.mappedCells.renderCellAtElement(rowIndex, colIndex, elementIndex, renderedNode);
3233
- if (true) {
3272
+ if (false) {
3234
3273
  this.debug(`Render cell ${rowIndex},${colIndex} at element ${elementIndex}`);
3235
3274
  }
3236
3275
  itemUpdater(renderedNode);
@@ -4524,7 +4563,11 @@ function InfiniteTableHeaderCell(props) {
4524
4563
  };
4525
4564
  const domRef = useRef12(null);
4526
4565
  const {
4527
- computed: { computedRemainingSpace, showColumnFilters },
4566
+ computed: {
4567
+ computedRemainingSpace,
4568
+ showColumnFilters,
4569
+ computedVisibleColumns
4570
+ },
4528
4571
  componentState: { portalDOMRef, columnHeaderHeight, filterEditors }
4529
4572
  } = useInfiniteTable();
4530
4573
  const {
@@ -4631,6 +4674,7 @@ function InfiniteTableHeaderCell(props) {
4631
4674
  ]);
4632
4675
  const filterType = column.computedFilterType;
4633
4676
  const FilterEditor = filterEditors[filterType] || defaultFilterEditors[filterType] || StringFilterEditor;
4677
+ const resizeHandle = null;
4634
4678
  return /* @__PURE__ */ createElement15(ContextProvider, {
4635
4679
  value: renderParam
4636
4680
  }, /* @__PURE__ */ createElement15(InfiniteTableCell, {
@@ -4639,6 +4683,7 @@ function InfiniteTableHeaderCell(props) {
4639
4683
  column,
4640
4684
  "data-name": `HeaderCell`,
4641
4685
  "data-column-id": column.id,
4686
+ "data-z-index": computedVisibleColumns.length * 10 - column.computedVisibleIndex * 10,
4642
4687
  style,
4643
4688
  width,
4644
4689
  onPointerDown,
@@ -4647,7 +4692,7 @@ function InfiniteTableHeaderCell(props) {
4647
4692
  contentStyle: showColumnFilters ? { height: height / 2 } : void 0,
4648
4693
  className: join(InfiniteTableHeaderCellClassName, userSelect.none, column.computedSortable ? cursor.pointer : "", useCellClassName(column, [InfiniteTableHeaderCellClassName, InfiniteTableCellClassName], HeaderCellRecipe, { dragging, zebra: false, rowActive: false }), CellCls),
4649
4694
  cssEllipsis: (_e = (_d = column.headerCssEllipsis) != null ? _d : column.cssEllipsis) != null ? _e : true,
4650
- afterChildren: showColumnFilters ? column.computedFilterable ? /* @__PURE__ */ createElement15(InfiniteTableColumnHeaderFilter, {
4695
+ afterChildren: /* @__PURE__ */ createElement15(Fragment2, null, showColumnFilters ? column.computedFilterable ? /* @__PURE__ */ createElement15(InfiniteTableColumnHeaderFilter, {
4651
4696
  filterEditor: FilterEditor,
4652
4697
  filterTypes,
4653
4698
  onChange: debouncedOnFilterValueChange,
@@ -4655,7 +4700,7 @@ function InfiniteTableHeaderCell(props) {
4655
4700
  columnLabel: column.field || column.name || column.id,
4656
4701
  columnFilterValue: column.computedFilterValue,
4657
4702
  columnHeaderHeight
4658
- }) : /* @__PURE__ */ createElement15(InfiniteTableColumnHeaderFilterEmpty, null) : null,
4703
+ }) : /* @__PURE__ */ createElement15(InfiniteTableColumnHeaderFilterEmpty, null) : null, resizeHandle),
4659
4704
  renderChildren
4660
4705
  }), draggingProxy);
4661
4706
  }
@@ -5716,7 +5761,7 @@ function computeColumnGroupsDepths(columnGroups) {
5716
5761
  while (parentGroupId) {
5717
5762
  const parent = columnGroups.get(parentGroupId);
5718
5763
  if (!parent) {
5719
- if (true) {
5764
+ if (false) {
5720
5765
  console.warn(`Cannot find column group ${parentGroupId}`);
5721
5766
  }
5722
5767
  break;
@@ -5833,7 +5878,7 @@ var debug4 = dbg("useColumnSizeFn");
5833
5878
  function useColumnSizeFn(columns) {
5834
5879
  const columnSize = useCallback13((index) => {
5835
5880
  const column = columns[index];
5836
- if (!column) {
5881
+ if (false) {
5837
5882
  debug4("cannot find column at index", index, columns);
5838
5883
  }
5839
5884
  return column ? column.computedWidth : 0;
@@ -7950,7 +7995,7 @@ function concludeReducer(params) {
7950
7995
  }
7951
7996
  state.dataArray = rowInfoDataArray;
7952
7997
  state.reducedAt = now;
7953
- if (true) {
7998
+ if (false) {
7954
7999
  globalThis.state = state;
7955
8000
  }
7956
8001
  return state;
@@ -7988,7 +8033,7 @@ function DataSourceCmp({ children }) {
7988
8033
  componentActions,
7989
8034
  getState
7990
8035
  };
7991
- if (true) {
8036
+ if (false) {
7992
8037
  globalThis.getDataSourceState = getState;
7993
8038
  }
7994
8039
  useLoadData();
@@ -8439,10 +8484,14 @@ var computeFlex = (params) => {
8439
8484
  let totalFixedSize = 0;
8440
8485
  let totalFlex = 0;
8441
8486
  let totalFlexCount = 0;
8487
+ const minSizes = [];
8488
+ const maxSizes = [];
8442
8489
  items.forEach((item, i) => {
8443
8490
  var _a, _b, _c, _d, _e, _f;
8444
8491
  let maxSize = (_b = (_a = item.maxSize) != null ? _a : defaultMaxSize) != null ? _b : void 0;
8445
8492
  let minSize = (_d = (_c = item.minSize) != null ? _c : defaultMinSize) != null ? _d : void 0;
8493
+ minSizes.push(minSize);
8494
+ maxSizes.push(maxSize);
8446
8495
  if (item.size != null) {
8447
8496
  if (maxSize != null && item.size > maxSize) {
8448
8497
  item.size = maxSize;
@@ -8552,6 +8601,8 @@ var computeFlex = (params) => {
8552
8601
  return {
8553
8602
  items: resultItems,
8554
8603
  flexSizes,
8604
+ minSizes,
8605
+ maxSizes,
8555
8606
  computedSizes,
8556
8607
  remainingSize: Math.round(availableSize - totalTakenSize)
8557
8608
  };
@@ -8624,6 +8675,7 @@ var getComputedVisibleColumns = ({
8624
8675
  setSortInfo,
8625
8676
  multiSort,
8626
8677
  viewportReservedWidth,
8678
+ resizableColumns,
8627
8679
  draggableColumns,
8628
8680
  columnOrder,
8629
8681
  columnPinning,
@@ -8708,7 +8760,7 @@ var getComputedVisibleColumns = ({
8708
8760
  };
8709
8761
  })
8710
8762
  });
8711
- const { computedSizes } = flexResult;
8763
+ const { computedSizes, flexSizes, minSizes, maxSizes } = flexResult;
8712
8764
  const computedPinnedStartColumns = [];
8713
8765
  const computedPinnedEndColumns = [];
8714
8766
  const computedUnpinnedColumns = [];
@@ -8736,7 +8788,7 @@ var getComputedVisibleColumns = ({
8736
8788
  });
8737
8789
  const firstPinnedEndAbsoluteOffset = bodySize.width - totalPinnedEndWidth;
8738
8790
  columnsArray.forEach((c, i) => {
8739
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u;
8791
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
8740
8792
  const id = visibleColumnOrder[i];
8741
8793
  const nextColumnId = visibleColumnOrder[i + 1];
8742
8794
  const colType = getColumnComputedType(c, columnTypes);
@@ -8747,6 +8799,9 @@ var getComputedVisibleColumns = ({
8747
8799
  const computedSortedDesc = computedSorted && !computedSortedAsc;
8748
8800
  const computedSortIndex = (_c = sortingInfo == null ? void 0 : sortingInfo.index) != null ? _c : -1;
8749
8801
  const computedWidth = computedSizes[i];
8802
+ const computedFlex = flexSizes[i] || null;
8803
+ const computedMinWidth = minSizes[i] || null;
8804
+ const computedMaxWidth = maxSizes[i] || null;
8750
8805
  const computedPinned = getComputedPinned(id, columnPinning);
8751
8806
  const computedLast = i === visibleColumnOrder.length - 1;
8752
8807
  const computedPinningOffset = computedPinned === "start" ? computedPinnedStartColumnsWidth : computedPinned === "end" ? computedPinnedEndColumnsWidth : computedOffset - computedPinnedStartColumnsWidth;
@@ -8780,8 +8835,13 @@ var getComputedVisibleColumns = ({
8780
8835
  render: colType.render,
8781
8836
  style: colType.style,
8782
8837
  components: colType.components,
8838
+ columnGroup: colType.columnGroup,
8783
8839
  field
8784
8840
  }, c), {
8841
+ computedResizable: (_s = (_r = (_q = c.resizable) != null ? _q : colType.resizable) != null ? _r : resizableColumns) != null ? _s : true,
8842
+ computedMinWidth,
8843
+ computedMaxWidth,
8844
+ computedFlex,
8785
8845
  computedDataType,
8786
8846
  computedSortType,
8787
8847
  computedFilterType,
@@ -8803,7 +8863,7 @@ var getComputedVisibleColumns = ({
8803
8863
  computedSortedDesc,
8804
8864
  computedVisibleIndex: i,
8805
8865
  computedPinned,
8806
- computedDraggable: (_r = (_q = c.draggable) != null ? _q : draggableColumns) != null ? _r : true,
8866
+ computedDraggable: (_u = (_t = c.draggable) != null ? _t : draggableColumns) != null ? _u : true,
8807
8867
  computedFirstInCategory,
8808
8868
  computedLastInCategory,
8809
8869
  computedFirst: i === 0,
@@ -8853,7 +8913,7 @@ var getComputedVisibleColumns = ({
8853
8913
  setSortInfo(finalSortInfo);
8854
8914
  },
8855
8915
  id,
8856
- header: (_u = (_t = (_s = c.header) != null ? _s : colType.header) != null ? _t : c.name) != null ? _u : c.field
8916
+ header: (_x = (_w = (_v = c.header) != null ? _v : colType.header) != null ? _w : c.name) != null ? _x : c.field
8857
8917
  });
8858
8918
  computedOffset += computedWidth;
8859
8919
  computedVisibleColumnsMap.set(result2.id, result2);
@@ -8929,6 +8989,7 @@ var useComputedVisibleColumns = ({
8929
8989
  pinnedEndMaxWidth,
8930
8990
  pinnedStartMaxWidth,
8931
8991
  viewportReservedWidth,
8992
+ resizableColumns,
8932
8993
  columnVisibility,
8933
8994
  columnVisibilityAssumeVisible,
8934
8995
  columnSizing
@@ -8960,6 +9021,7 @@ var useComputedVisibleColumns = ({
8960
9021
  columnCssEllipsis,
8961
9022
  columnHeaderCssEllipsis,
8962
9023
  viewportReservedWidth,
9024
+ resizableColumns,
8963
9025
  filterValue,
8964
9026
  sortable,
8965
9027
  sortInfo,
@@ -9117,6 +9179,7 @@ function useComputed() {
9117
9179
  pinnedEndMaxWidth: componentState.pinnedEndMaxWidth,
9118
9180
  bodySize,
9119
9181
  viewportReservedWidth: componentState.viewportReservedWidth,
9182
+ resizableColumns: componentState.resizableColumns,
9120
9183
  sortable: componentState.sortable,
9121
9184
  draggableColumns: componentState.draggableColumns,
9122
9185
  sortInfo: (_a = dataSourceState.sortInfo) != null ? _a : void 0,
@@ -9405,7 +9468,7 @@ var useLicense = (licenseKey = "") => {
9405
9468
  const valid = useMemo12(() => {
9406
9469
  let valid2 = isValidLicense(licenseKey, {
9407
9470
  publishedAt: 1624970570587,
9408
- version: "0.3.10"
9471
+ version: "0.3.11"
9409
9472
  });
9410
9473
  if (!licenseKey && !valid2 && isInsidePlayground) {
9411
9474
  return true;
@@ -9628,14 +9691,14 @@ function initSetupState2() {
9628
9691
  scrollTop: 0
9629
9692
  });
9630
9693
  });
9631
- if (true) {
9694
+ if (false) {
9632
9695
  globalThis.brain = brain;
9633
9696
  }
9634
9697
  const { renderer, onRenderUpdater } = createRenderer2(brain);
9635
9698
  brain.onAvailableSizeChange((size) => {
9636
9699
  headerBrain.setAvailableSize({ width: size.width });
9637
9700
  });
9638
- if (true) {
9701
+ if (false) {
9639
9702
  globalThis.renderer = renderer;
9640
9703
  }
9641
9704
  return {
@@ -9701,6 +9764,7 @@ var forwardProps3 = (setupState) => {
9701
9764
  scrollStopDelay: (scrollStopDelay) => scrollStopDelay != null ? scrollStopDelay : 250,
9702
9765
  filterEditors: (filterEditors) => __spreadValues(__spreadValues({}, defaultFilterEditors), filterEditors),
9703
9766
  viewportReservedWidth: (viewportReservedWidth) => viewportReservedWidth != null ? viewportReservedWidth : 0,
9767
+ resizableColumns: (resizableColumns) => resizableColumns != null ? resizableColumns : true,
9704
9768
  columnMinWidth: (columnMinWidth) => columnMinWidth != null ? columnMinWidth : 30,
9705
9769
  columnMaxWidth: (columnMaxWidth) => columnMaxWidth != null ? columnMaxWidth : 2e3,
9706
9770
  columnDefaultWidth: (columnDefaultWidth) => columnDefaultWidth != null ? columnDefaultWidth : 200,
@@ -9919,7 +9983,7 @@ function InfiniteTableContextProvider() {
9919
9983
  const computed = useComputed();
9920
9984
  const getComputed = useLatest(computed);
9921
9985
  const getState = useLatest(componentState);
9922
- if (true) {
9986
+ if (false) {
9923
9987
  globalThis.getState = getState;
9924
9988
  globalThis.getComputed = getComputed;
9925
9989
  }
package/index.js CHANGED
@@ -694,7 +694,7 @@ var Logger = class {
694
694
  constructor(channelName) {
695
695
  this.debug = emptyLogFn;
696
696
  this.error = emptyLogFn;
697
- if (true) {
697
+ if (false) {
698
698
  this.debug = dbg(channelName);
699
699
  this.error = err(channelName);
700
700
  }
@@ -892,8 +892,8 @@ function SpacePlaceholderFn(props) {
892
892
  };
893
893
  return /* @__PURE__ */ React5.createElement("div", {
894
894
  "data-count": count,
895
- "data-placeholder-width": true ? width : void 0,
896
- "data-placeholder-height": true ? height : void 0,
895
+ "data-placeholder-width": false ? width : void 0,
896
+ "data-placeholder-height": false ? height : void 0,
897
897
  "data-name": "SpacePlaceholder",
898
898
  style
899
899
  });
@@ -1166,7 +1166,7 @@ var MatrixBrain = class extends Logger {
1166
1166
  if (colWidthDefined) {
1167
1167
  this.colWidth = colWidth;
1168
1168
  }
1169
- if (true) {
1169
+ if (false) {
1170
1170
  if (widthChanged) {
1171
1171
  this.debug("New available width %d (size is %d,%d)", this.width, this.width, this.height);
1172
1172
  }
@@ -1246,12 +1246,18 @@ var MatrixBrain = class extends Logger {
1246
1246
  }
1247
1247
  };
1248
1248
  this.notifyScrollStart = () => {
1249
+ if (this.destroyed) {
1250
+ return;
1251
+ }
1249
1252
  const fns = this.onScrollStartFns;
1250
1253
  for (let i = 0, len = fns.length; i < len; i++) {
1251
1254
  fns[i]();
1252
1255
  }
1253
1256
  };
1254
1257
  this.notifyScrollStop = () => {
1258
+ if (this.destroyed) {
1259
+ return;
1260
+ }
1255
1261
  const fns = this.onScrollStopFns;
1256
1262
  const scrollPos = this.scrollPosition;
1257
1263
  const range = this.getRenderRange();
@@ -1274,37 +1280,61 @@ var MatrixBrain = class extends Logger {
1274
1280
  }
1275
1281
  };
1276
1282
  this.notifyAvailableSizeChange = () => {
1283
+ if (this.destroyed) {
1284
+ return;
1285
+ }
1277
1286
  const fns = this.onAvailableSizeChangeFns;
1278
1287
  const range = this.getAvailableSize();
1279
1288
  for (let i = 0, len = fns.length; i < len; i++) {
1280
1289
  raf2(() => {
1290
+ if (this.destroyed) {
1291
+ return;
1292
+ }
1281
1293
  fns[i](range);
1282
1294
  });
1283
1295
  }
1284
1296
  };
1285
1297
  this.notifyRenderRangeChange = () => {
1298
+ if (this.destroyed) {
1299
+ return;
1300
+ }
1286
1301
  const fns = this.onRenderRangeChangeFns;
1287
1302
  const range = this.getRenderRange();
1288
1303
  for (let i = 0, len = fns.length; i < len; i++) {
1289
1304
  raf2(() => {
1305
+ if (this.destroyed) {
1306
+ return;
1307
+ }
1290
1308
  fns[i](range);
1291
1309
  });
1292
1310
  }
1293
1311
  };
1294
1312
  this.notifyVerticalRenderRangeChange = () => {
1313
+ if (this.destroyed) {
1314
+ return;
1315
+ }
1295
1316
  const fns = this.onVerticalRenderRangeChangeFns;
1296
1317
  const range = this.verticalRenderRange;
1297
1318
  for (let i = 0, len = fns.length; i < len; i++) {
1298
1319
  raf2(() => {
1320
+ if (this.destroyed) {
1321
+ return;
1322
+ }
1299
1323
  fns[i]([range.startIndex, range.endIndex]);
1300
1324
  });
1301
1325
  }
1302
1326
  };
1303
1327
  this.notifyHorizontalRenderRangeChange = () => {
1328
+ if (this.destroyed) {
1329
+ return;
1330
+ }
1304
1331
  const fns = this.onHorizontalRenderRangeChangeFns;
1305
1332
  const range = this.horizontalRenderRange;
1306
1333
  for (let i = 0, len = fns.length; i < len; i++) {
1307
1334
  raf2(() => {
1335
+ if (this.destroyed) {
1336
+ return;
1337
+ }
1308
1338
  fns[i]([range.startIndex, range.endIndex]);
1309
1339
  });
1310
1340
  }
@@ -1660,7 +1690,7 @@ var MatrixBrain = class extends Logger {
1660
1690
  if (cache[i] === void 0) {
1661
1691
  cell[direction === "horizontal" ? "colIndex" : "rowIndex"] = i;
1662
1692
  let spanValue = itemSpan(cell);
1663
- if (spanValue < 1) {
1693
+ if (false) {
1664
1694
  this.debug(`${direction === "horizontal" ? "colspan" : "rowspan"} cannot be less than 1 - got %d for index %d`, spanValue, i);
1665
1695
  }
1666
1696
  cache[i] = i;
@@ -1963,7 +1993,7 @@ var MatrixBrain = class extends Logger {
1963
1993
  }
1964
1994
  this.width = width;
1965
1995
  this.height = height;
1966
- if (true) {
1996
+ if (false) {
1967
1997
  this.debug("New available size: width %d, height %d", this.width, this.height);
1968
1998
  }
1969
1999
  this.notifyAvailableSizeChange();
@@ -1981,6 +2011,9 @@ var MatrixBrain = class extends Logger {
1981
2011
  return totalSize.width - this.width;
1982
2012
  }
1983
2013
  notifyScrollChange() {
2014
+ if (this.destroyed) {
2015
+ return;
2016
+ }
1984
2017
  const { scrollPosition } = this;
1985
2018
  const fns = this.onScrollFns;
1986
2019
  for (let i = 0, len = fns.length; i < len; i++) {
@@ -1997,6 +2030,9 @@ var MatrixBrain = class extends Logger {
1997
2030
  return direction === "horizontal" ? this.getFixedEndColsWidth() : this.getFixedEndRowsHeight();
1998
2031
  }
1999
2032
  notifyRenderCountChange() {
2033
+ if (this.destroyed) {
2034
+ return;
2035
+ }
2000
2036
  const { horizontalRenderCount, verticalRenderCount } = this;
2001
2037
  const renderCount = {
2002
2038
  horizontal: horizontalRenderCount,
@@ -2005,6 +2041,9 @@ var MatrixBrain = class extends Logger {
2005
2041
  const fns = this.onRenderCountChangeFns;
2006
2042
  for (let i = 0, len = fns.length; i < len; i++) {
2007
2043
  raf2(() => {
2044
+ if (this.destroyed) {
2045
+ return;
2046
+ }
2008
2047
  fns[i](renderCount);
2009
2048
  });
2010
2049
  }
@@ -2430,7 +2469,7 @@ var MappedCells = class extends Logger {
2430
2469
  return elementIndex != null ? elementIndex : null;
2431
2470
  };
2432
2471
  this.renderCellAtElement = (rowIndex, colIndex, elementIndex, renderNode) => {
2433
- if (true) {
2472
+ if (false) {
2434
2473
  this.debug(`Render cell ${rowIndex},${colIndex} at element ${elementIndex}`);
2435
2474
  }
2436
2475
  const key = [rowIndex, colIndex];
@@ -2696,7 +2735,7 @@ var ReactHeadlessTableRenderer = class extends Logger {
2696
2735
  return [];
2697
2736
  }
2698
2737
  const { start, end } = range;
2699
- if (true) {
2738
+ if (false) {
2700
2739
  this.debug(`Render range ${start}-${end}. Force ${force}`);
2701
2740
  }
2702
2741
  const { mappedCells } = this;
@@ -2715,7 +2754,7 @@ var ReactHeadlessTableRenderer = class extends Logger {
2715
2754
  if (this.updaters[elementIndex]) {
2716
2755
  this.updaters[elementIndex].destroy();
2717
2756
  }
2718
- if (true) {
2757
+ if (false) {
2719
2758
  this.debug(`Discard element ${elementIndex}`);
2720
2759
  }
2721
2760
  });
@@ -2767,7 +2806,7 @@ var ReactHeadlessTableRenderer = class extends Logger {
2767
2806
  }
2768
2807
  const elementIndex = cellRendered ? mappedCells.getElementIndexForCell(row, col) : mappedCells.getElementFromListForColumn(elementsOutsideItemRange, col);
2769
2808
  if (elementIndex == null) {
2770
- if (true) {
2809
+ if (false) {
2771
2810
  this.error(`Cannot find element to render cell ${row}:${col}`);
2772
2811
  }
2773
2812
  continue;
@@ -2786,7 +2825,7 @@ var ReactHeadlessTableRenderer = class extends Logger {
2786
2825
  }
2787
2826
  const elementIndex = elementsOutsideItemRange.pop();
2788
2827
  if (elementIndex == null) {
2789
- if (true) {
2828
+ if (false) {
2790
2829
  this.error(`Cannot find element to render cell ${rowIndex}-${colIndex}`);
2791
2830
  }
2792
2831
  return;
@@ -2985,7 +3024,7 @@ var ReactHeadlessTableRenderer = class extends Logger {
2985
3024
  const itemElement = this.itemDOMElements[elementIndex];
2986
3025
  const cell = this.mappedCells.getRenderedCellAtElement(elementIndex);
2987
3026
  if (cell == null) {
2988
- if (true) {
3027
+ if (false) {
2989
3028
  this.error(`Cannot find item for element ${elementIndex}`);
2990
3029
  }
2991
3030
  return;
@@ -2998,7 +3037,7 @@ var ReactHeadlessTableRenderer = class extends Logger {
2998
3037
  const { x, y } = itemPosition;
2999
3038
  if (itemElement) {
3000
3039
  this.updateHoverClassNamesForRow(rowIndex);
3001
- if (true) {
3040
+ if (false) {
3002
3041
  itemElement.dataset.rowIndex = rowIndex;
3003
3042
  itemElement.dataset.colIndex = colIndex;
3004
3043
  }
@@ -3007,7 +3046,7 @@ var ReactHeadlessTableRenderer = class extends Logger {
3007
3046
  itemElement.style.willChange = "transform";
3008
3047
  itemElement.style.backfaceVisibility = "hidden";
3009
3048
  const hidden = options ? options.hidden : !!this.isCellCovered(rowIndex, colIndex);
3010
- itemElement.style.zIndex = hidden ? "-1" : "auto";
3049
+ itemElement.style.zIndex = hidden ? "-1" : itemElement.dataset.zIndex || "auto";
3011
3050
  } else {
3012
3051
  itemElement.style.display = "";
3013
3052
  itemElement.style.left = `${x}px`;
@@ -3066,19 +3105,19 @@ var ReactHeadlessTableRenderer = class extends Logger {
3066
3105
  node.style.transform = `translate3d(${coords.x}px, ${fixedEndRowsOffsets[rowIndex]}px, 0)`;
3067
3106
  }
3068
3107
  function adjustColStartRowStart(_rowIndex, _colIndex, node, { x, y }, scrollPosition2) {
3069
- node.style.zIndex = `10000`;
3108
+ node.style.zIndex = `1000000`;
3070
3109
  node.style.transform = `translate3d(${x + scrollPosition2.scrollLeft}px, ${y + scrollPosition2.scrollTop}px, 0)`;
3071
3110
  }
3072
3111
  function adjustColStartRowEnd(_rowIndex, _colIndex, node, { x }, scrollPosition2) {
3073
- node.style.zIndex = `20000`;
3112
+ node.style.zIndex = `2000000`;
3074
3113
  node.style.transform = `translate3d(${x + scrollPosition2.scrollLeft}px, ${fixedEndRowsOffsets[_rowIndex]}px, 0)`;
3075
3114
  }
3076
3115
  function adjustColEndRowStart(_rowIndex, colIndex, node, coords) {
3077
- node.style.zIndex = `30000`;
3116
+ node.style.zIndex = `3000000`;
3078
3117
  node.style.transform = `translate3d(${fixedEndColsOffsets[colIndex]}px, ${coords.y + scrollPosition.scrollTop}px, 0)`;
3079
3118
  }
3080
3119
  function adjustColEndRowEnd(rowIndex, colIndex, node) {
3081
- node.style.zIndex = `40000`;
3120
+ node.style.zIndex = `4000000`;
3082
3121
  node.style.transform = `translate3d(${fixedEndColsOffsets[colIndex]}px, ${fixedEndRowsOffsets[rowIndex]}px, 0)`;
3083
3122
  }
3084
3123
  if (fixedColsStart || fixedColsEnd) {
@@ -3222,7 +3261,7 @@ var ReactHeadlessTableRenderer = class extends Logger {
3222
3261
  return;
3223
3262
  }
3224
3263
  this.mappedCells.renderCellAtElement(rowIndex, colIndex, elementIndex, renderedNode);
3225
- if (true) {
3264
+ if (false) {
3226
3265
  this.debug(`Render cell ${rowIndex},${colIndex} at element ${elementIndex}`);
3227
3266
  }
3228
3267
  itemUpdater(renderedNode);
@@ -4475,7 +4514,11 @@ function InfiniteTableHeaderCell(props) {
4475
4514
  };
4476
4515
  const domRef = (0, import_react22.useRef)(null);
4477
4516
  const {
4478
- computed: { computedRemainingSpace, showColumnFilters },
4517
+ computed: {
4518
+ computedRemainingSpace,
4519
+ showColumnFilters,
4520
+ computedVisibleColumns
4521
+ },
4479
4522
  componentState: { portalDOMRef, columnHeaderHeight, filterEditors }
4480
4523
  } = useInfiniteTable();
4481
4524
  const {
@@ -4582,6 +4625,7 @@ function InfiniteTableHeaderCell(props) {
4582
4625
  ]);
4583
4626
  const filterType = column.computedFilterType;
4584
4627
  const FilterEditor = filterEditors[filterType] || defaultFilterEditors[filterType] || StringFilterEditor;
4628
+ const resizeHandle = null;
4585
4629
  return /* @__PURE__ */ React20.createElement(ContextProvider, {
4586
4630
  value: renderParam
4587
4631
  }, /* @__PURE__ */ React20.createElement(InfiniteTableCell, {
@@ -4590,6 +4634,7 @@ function InfiniteTableHeaderCell(props) {
4590
4634
  column,
4591
4635
  "data-name": `HeaderCell`,
4592
4636
  "data-column-id": column.id,
4637
+ "data-z-index": computedVisibleColumns.length * 10 - column.computedVisibleIndex * 10,
4593
4638
  style,
4594
4639
  width,
4595
4640
  onPointerDown,
@@ -4598,7 +4643,7 @@ function InfiniteTableHeaderCell(props) {
4598
4643
  contentStyle: showColumnFilters ? { height: height / 2 } : void 0,
4599
4644
  className: join(InfiniteTableHeaderCellClassName, userSelect.none, column.computedSortable ? cursor.pointer : "", useCellClassName(column, [InfiniteTableHeaderCellClassName, InfiniteTableCellClassName], HeaderCellRecipe, { dragging, zebra: false, rowActive: false }), CellCls),
4600
4645
  cssEllipsis: (_e = (_d = column.headerCssEllipsis) != null ? _d : column.cssEllipsis) != null ? _e : true,
4601
- afterChildren: showColumnFilters ? column.computedFilterable ? /* @__PURE__ */ React20.createElement(InfiniteTableColumnHeaderFilter, {
4646
+ afterChildren: /* @__PURE__ */ React20.createElement(React20.Fragment, null, showColumnFilters ? column.computedFilterable ? /* @__PURE__ */ React20.createElement(InfiniteTableColumnHeaderFilter, {
4602
4647
  filterEditor: FilterEditor,
4603
4648
  filterTypes,
4604
4649
  onChange: debouncedOnFilterValueChange,
@@ -4606,7 +4651,7 @@ function InfiniteTableHeaderCell(props) {
4606
4651
  columnLabel: column.field || column.name || column.id,
4607
4652
  columnFilterValue: column.computedFilterValue,
4608
4653
  columnHeaderHeight
4609
- }) : /* @__PURE__ */ React20.createElement(InfiniteTableColumnHeaderFilterEmpty, null) : null,
4654
+ }) : /* @__PURE__ */ React20.createElement(InfiniteTableColumnHeaderFilterEmpty, null) : null, resizeHandle),
4610
4655
  renderChildren
4611
4656
  }), draggingProxy);
4612
4657
  }
@@ -5642,7 +5687,7 @@ function computeColumnGroupsDepths(columnGroups) {
5642
5687
  while (parentGroupId) {
5643
5688
  const parent = columnGroups.get(parentGroupId);
5644
5689
  if (!parent) {
5645
- if (true) {
5690
+ if (false) {
5646
5691
  console.warn(`Cannot find column group ${parentGroupId}`);
5647
5692
  }
5648
5693
  break;
@@ -5759,7 +5804,7 @@ var debug4 = dbg("useColumnSizeFn");
5759
5804
  function useColumnSizeFn(columns) {
5760
5805
  const columnSize = (0, import_react32.useCallback)((index) => {
5761
5806
  const column = columns[index];
5762
- if (!column) {
5807
+ if (false) {
5763
5808
  debug4("cannot find column at index", index, columns);
5764
5809
  }
5765
5810
  return column ? column.computedWidth : 0;
@@ -7866,7 +7911,7 @@ function concludeReducer(params) {
7866
7911
  }
7867
7912
  state.dataArray = rowInfoDataArray;
7868
7913
  state.reducedAt = now;
7869
- if (true) {
7914
+ if (false) {
7870
7915
  globalThis.state = state;
7871
7916
  }
7872
7917
  return state;
@@ -7904,7 +7949,7 @@ function DataSourceCmp({ children }) {
7904
7949
  componentActions,
7905
7950
  getState
7906
7951
  };
7907
- if (true) {
7952
+ if (false) {
7908
7953
  globalThis.getDataSourceState = getState;
7909
7954
  }
7910
7955
  useLoadData();
@@ -8355,10 +8400,14 @@ var computeFlex = (params) => {
8355
8400
  let totalFixedSize = 0;
8356
8401
  let totalFlex = 0;
8357
8402
  let totalFlexCount = 0;
8403
+ const minSizes = [];
8404
+ const maxSizes = [];
8358
8405
  items.forEach((item, i) => {
8359
8406
  var _a, _b, _c, _d, _e, _f;
8360
8407
  let maxSize = (_b = (_a = item.maxSize) != null ? _a : defaultMaxSize) != null ? _b : void 0;
8361
8408
  let minSize = (_d = (_c = item.minSize) != null ? _c : defaultMinSize) != null ? _d : void 0;
8409
+ minSizes.push(minSize);
8410
+ maxSizes.push(maxSize);
8362
8411
  if (item.size != null) {
8363
8412
  if (maxSize != null && item.size > maxSize) {
8364
8413
  item.size = maxSize;
@@ -8468,6 +8517,8 @@ var computeFlex = (params) => {
8468
8517
  return {
8469
8518
  items: resultItems,
8470
8519
  flexSizes,
8520
+ minSizes,
8521
+ maxSizes,
8471
8522
  computedSizes,
8472
8523
  remainingSize: Math.round(availableSize - totalTakenSize)
8473
8524
  };
@@ -8540,6 +8591,7 @@ var getComputedVisibleColumns = ({
8540
8591
  setSortInfo,
8541
8592
  multiSort,
8542
8593
  viewportReservedWidth,
8594
+ resizableColumns,
8543
8595
  draggableColumns,
8544
8596
  columnOrder,
8545
8597
  columnPinning,
@@ -8624,7 +8676,7 @@ var getComputedVisibleColumns = ({
8624
8676
  };
8625
8677
  })
8626
8678
  });
8627
- const { computedSizes } = flexResult;
8679
+ const { computedSizes, flexSizes, minSizes, maxSizes } = flexResult;
8628
8680
  const computedPinnedStartColumns = [];
8629
8681
  const computedPinnedEndColumns = [];
8630
8682
  const computedUnpinnedColumns = [];
@@ -8652,7 +8704,7 @@ var getComputedVisibleColumns = ({
8652
8704
  });
8653
8705
  const firstPinnedEndAbsoluteOffset = bodySize.width - totalPinnedEndWidth;
8654
8706
  columnsArray.forEach((c, i) => {
8655
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u;
8707
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
8656
8708
  const id = visibleColumnOrder[i];
8657
8709
  const nextColumnId = visibleColumnOrder[i + 1];
8658
8710
  const colType = getColumnComputedType(c, columnTypes);
@@ -8663,6 +8715,9 @@ var getComputedVisibleColumns = ({
8663
8715
  const computedSortedDesc = computedSorted && !computedSortedAsc;
8664
8716
  const computedSortIndex = (_c = sortingInfo == null ? void 0 : sortingInfo.index) != null ? _c : -1;
8665
8717
  const computedWidth = computedSizes[i];
8718
+ const computedFlex = flexSizes[i] || null;
8719
+ const computedMinWidth = minSizes[i] || null;
8720
+ const computedMaxWidth = maxSizes[i] || null;
8666
8721
  const computedPinned = getComputedPinned(id, columnPinning);
8667
8722
  const computedLast = i === visibleColumnOrder.length - 1;
8668
8723
  const computedPinningOffset = computedPinned === "start" ? computedPinnedStartColumnsWidth : computedPinned === "end" ? computedPinnedEndColumnsWidth : computedOffset - computedPinnedStartColumnsWidth;
@@ -8696,8 +8751,13 @@ var getComputedVisibleColumns = ({
8696
8751
  render: colType.render,
8697
8752
  style: colType.style,
8698
8753
  components: colType.components,
8754
+ columnGroup: colType.columnGroup,
8699
8755
  field
8700
8756
  }, c), {
8757
+ computedResizable: (_s = (_r = (_q = c.resizable) != null ? _q : colType.resizable) != null ? _r : resizableColumns) != null ? _s : true,
8758
+ computedMinWidth,
8759
+ computedMaxWidth,
8760
+ computedFlex,
8701
8761
  computedDataType,
8702
8762
  computedSortType,
8703
8763
  computedFilterType,
@@ -8719,7 +8779,7 @@ var getComputedVisibleColumns = ({
8719
8779
  computedSortedDesc,
8720
8780
  computedVisibleIndex: i,
8721
8781
  computedPinned,
8722
- computedDraggable: (_r = (_q = c.draggable) != null ? _q : draggableColumns) != null ? _r : true,
8782
+ computedDraggable: (_u = (_t = c.draggable) != null ? _t : draggableColumns) != null ? _u : true,
8723
8783
  computedFirstInCategory,
8724
8784
  computedLastInCategory,
8725
8785
  computedFirst: i === 0,
@@ -8769,7 +8829,7 @@ var getComputedVisibleColumns = ({
8769
8829
  setSortInfo(finalSortInfo);
8770
8830
  },
8771
8831
  id,
8772
- header: (_u = (_t = (_s = c.header) != null ? _s : colType.header) != null ? _t : c.name) != null ? _u : c.field
8832
+ header: (_x = (_w = (_v = c.header) != null ? _v : colType.header) != null ? _w : c.name) != null ? _x : c.field
8773
8833
  });
8774
8834
  computedOffset += computedWidth;
8775
8835
  computedVisibleColumnsMap.set(result2.id, result2);
@@ -8845,6 +8905,7 @@ var useComputedVisibleColumns = ({
8845
8905
  pinnedEndMaxWidth,
8846
8906
  pinnedStartMaxWidth,
8847
8907
  viewportReservedWidth,
8908
+ resizableColumns,
8848
8909
  columnVisibility,
8849
8910
  columnVisibilityAssumeVisible,
8850
8911
  columnSizing
@@ -8876,6 +8937,7 @@ var useComputedVisibleColumns = ({
8876
8937
  columnCssEllipsis,
8877
8938
  columnHeaderCssEllipsis,
8878
8939
  viewportReservedWidth,
8940
+ resizableColumns,
8879
8941
  filterValue,
8880
8942
  sortable,
8881
8943
  sortInfo,
@@ -9033,6 +9095,7 @@ function useComputed() {
9033
9095
  pinnedEndMaxWidth: componentState.pinnedEndMaxWidth,
9034
9096
  bodySize,
9035
9097
  viewportReservedWidth: componentState.viewportReservedWidth,
9098
+ resizableColumns: componentState.resizableColumns,
9036
9099
  sortable: componentState.sortable,
9037
9100
  draggableColumns: componentState.draggableColumns,
9038
9101
  sortInfo: (_a = dataSourceState.sortInfo) != null ? _a : void 0,
@@ -9321,7 +9384,7 @@ var useLicense = (licenseKey = "") => {
9321
9384
  const valid = (0, import_react43.useMemo)(() => {
9322
9385
  let valid2 = isValidLicense(licenseKey, {
9323
9386
  publishedAt: 1624970570587,
9324
- version: "0.3.10"
9387
+ version: "0.3.11"
9325
9388
  });
9326
9389
  if (!licenseKey && !valid2 && isInsidePlayground) {
9327
9390
  return true;
@@ -9544,14 +9607,14 @@ function initSetupState2() {
9544
9607
  scrollTop: 0
9545
9608
  });
9546
9609
  });
9547
- if (true) {
9610
+ if (false) {
9548
9611
  globalThis.brain = brain;
9549
9612
  }
9550
9613
  const { renderer, onRenderUpdater } = createRenderer2(brain);
9551
9614
  brain.onAvailableSizeChange((size) => {
9552
9615
  headerBrain.setAvailableSize({ width: size.width });
9553
9616
  });
9554
- if (true) {
9617
+ if (false) {
9555
9618
  globalThis.renderer = renderer;
9556
9619
  }
9557
9620
  return {
@@ -9617,6 +9680,7 @@ var forwardProps3 = (setupState) => {
9617
9680
  scrollStopDelay: (scrollStopDelay) => scrollStopDelay != null ? scrollStopDelay : 250,
9618
9681
  filterEditors: (filterEditors) => __spreadValues(__spreadValues({}, defaultFilterEditors), filterEditors),
9619
9682
  viewportReservedWidth: (viewportReservedWidth) => viewportReservedWidth != null ? viewportReservedWidth : 0,
9683
+ resizableColumns: (resizableColumns) => resizableColumns != null ? resizableColumns : true,
9620
9684
  columnMinWidth: (columnMinWidth) => columnMinWidth != null ? columnMinWidth : 30,
9621
9685
  columnMaxWidth: (columnMaxWidth) => columnMaxWidth != null ? columnMaxWidth : 2e3,
9622
9686
  columnDefaultWidth: (columnDefaultWidth) => columnDefaultWidth != null ? columnDefaultWidth : 200,
@@ -9835,7 +9899,7 @@ function InfiniteTableContextProvider() {
9835
9899
  const computed = useComputed();
9836
9900
  const getComputed = useLatest(computed);
9837
9901
  const getState = useLatest(componentState);
9838
- if (true) {
9902
+ if (false) {
9839
9903
  globalThis.getState = getState;
9840
9904
  globalThis.getComputed = getComputed;
9841
9905
  }
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.10",
4
+ "version": "0.3.11",
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": 1654638457164
17
+ "publishedAt": 1654702620822
18
18
  }