@visactor/vtable 1.5.3-alpha.0 → 1.5.3

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/dist/vtable.js CHANGED
@@ -55343,6 +55343,17 @@
55343
55343
  }
55344
55344
  return selectMode;
55345
55345
  }
55346
+ function isCellDisableSelect(table, col, row) {
55347
+ const columnDefine = table.getBodyColumnDefine(col, row);
55348
+ const isHeader = table.isHeader(col, row);
55349
+ if (columnDefine?.disableSelect && !isHeader) {
55350
+ return true;
55351
+ }
55352
+ if (isHeader && columnDefine?.disableHeaderSelect) {
55353
+ return true;
55354
+ }
55355
+ return false;
55356
+ }
55346
55357
 
55347
55358
  let SplitGroupBeforeRenderContribution = class SplitGroupBeforeRenderContribution {
55348
55359
  time = BaseRenderContributionTime.beforeFillStroke;
@@ -65755,16 +65766,18 @@
65755
65766
  return totalHeight !== 0 && deltaY <= 0 && state.scroll.verticalBarPos < 1;
65756
65767
  }
65757
65768
  function isScrollToBottom(deltaY, state) {
65769
+ const sizeTolerance = state.table.options.customConfig?._disableColumnAndRowSizeRound ? 1 : 0;
65758
65770
  const totalHeight = state.table.getAllRowsHeight() - state.table.scenegraph.height;
65759
- return totalHeight !== 0 && deltaY >= 0 && Math.abs(state.scroll.verticalBarPos - totalHeight) < 1;
65771
+ return totalHeight !== 0 && deltaY >= 0 && Math.abs(state.scroll.verticalBarPos - totalHeight) < 1 + sizeTolerance;
65760
65772
  }
65761
65773
  function isScrollToLeft(deltaX, state) {
65762
65774
  const totalWidth = state.table.getAllColsWidth() - state.table.scenegraph.width;
65763
65775
  return totalWidth !== 0 && deltaX <= 0 && state.scroll.horizontalBarPos < 1;
65764
65776
  }
65765
65777
  function isScrollToRight(deltaX, state) {
65778
+ const sizeTolerance = state.table.options.customConfig?._disableColumnAndRowSizeRound ? 1 : 0;
65766
65779
  const totalWidth = state.table.getAllColsWidth() - state.table.scenegraph.width;
65767
- return totalWidth !== 0 && deltaX >= 0 && Math.abs(state.scroll.horizontalBarPos - totalWidth) < 1;
65780
+ return totalWidth !== 0 && deltaX >= 0 && Math.abs(state.scroll.horizontalBarPos - totalWidth) < 1 + sizeTolerance;
65768
65781
  }
65769
65782
  class InertiaScroll {
65770
65783
  friction;
@@ -65926,6 +65939,9 @@
65926
65939
  targetCol = Math.min(table.colCount - 1, Math.max(0, stateManager.select.cellPos.col + 1));
65927
65940
  }
65928
65941
  }
65942
+ if (isCellDisableSelect(table, targetCol, targetRow)) {
65943
+ return;
65944
+ }
65929
65945
  table.selectCell(targetCol, targetRow, e.shiftKey);
65930
65946
  if ((table.options.keyboardOptions?.moveEditCellOnArrowKeys ?? false) &&
65931
65947
  table.editorManager?.editingEditor) {
@@ -65977,6 +65993,9 @@
65977
65993
  targetRow = stateManager.select.cellPos.row;
65978
65994
  targetCol = stateManager.select.cellPos.col + 1;
65979
65995
  }
65996
+ if (isCellDisableSelect(table, targetCol, targetRow)) {
65997
+ return;
65998
+ }
65980
65999
  table.selectCell(targetCol, targetRow);
65981
66000
  if (table.editorManager?.editingEditor) {
65982
66001
  table.editorManager.completeEdit();
@@ -70472,7 +70491,7 @@
70472
70491
  return TABLE_EVENT_TYPE;
70473
70492
  }
70474
70493
  options;
70475
- version = "1.5.3-alpha.0";
70494
+ version = "1.5.3";
70476
70495
  pagination;
70477
70496
  id = `VTable${Date.now()}`;
70478
70497
  headerStyleCache;
@@ -88960,7 +88979,7 @@
88960
88979
  }
88961
88980
 
88962
88981
  registerForVrender();
88963
- const version = "1.5.3-alpha.0";
88982
+ const version = "1.5.3";
88964
88983
  function getIcons() {
88965
88984
  return get$2();
88966
88985
  }