handsontable 0.0.0-next-221e46b-20240307 → 0.0.0-next-2becb78-20240313

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.

Potentially problematic release.


This version of handsontable might be problematic. Click here for more details.

Files changed (98) hide show
  1. package/3rdparty/walkontable/src/cell/range.d.ts +1 -0
  2. package/3rdparty/walkontable/src/cell/range.js +22 -5
  3. package/3rdparty/walkontable/src/cell/range.mjs +22 -5
  4. package/base.js +2 -2
  5. package/base.mjs +2 -2
  6. package/core/viewportScroll/index.js +4 -1
  7. package/core/viewportScroll/index.mjs +4 -1
  8. package/core/viewportScroll/scrollStrategies/focusScroll.js +15 -0
  9. package/core/viewportScroll/scrollStrategies/focusScroll.mjs +11 -0
  10. package/core.d.ts +4 -3
  11. package/core.js +81 -21
  12. package/core.mjs +81 -21
  13. package/dist/handsontable.css +2 -2
  14. package/dist/handsontable.full.css +2 -2
  15. package/dist/handsontable.full.js +2721 -1361
  16. package/dist/handsontable.full.min.css +2 -2
  17. package/dist/handsontable.full.min.js +152 -152
  18. package/dist/handsontable.js +2721 -1361
  19. package/dist/handsontable.min.css +2 -2
  20. package/dist/handsontable.min.js +32 -32
  21. package/editorManager.js +12 -8
  22. package/editorManager.mjs +12 -8
  23. package/helpers/mixed.js +1 -1
  24. package/helpers/mixed.mjs +1 -1
  25. package/package.json +1 -1
  26. package/pluginHooks.d.ts +1 -0
  27. package/pluginHooks.js +43 -1
  28. package/pluginHooks.mjs +43 -1
  29. package/plugins/collapsibleColumns/collapsibleColumns.js +7 -1
  30. package/plugins/collapsibleColumns/collapsibleColumns.mjs +7 -1
  31. package/plugins/columnSorting/columnSorting.js +6 -0
  32. package/plugins/columnSorting/columnSorting.mjs +6 -0
  33. package/plugins/contextMenu/menu/defaultShortcutsList.js +26 -10
  34. package/plugins/contextMenu/menu/defaultShortcutsList.mjs +26 -10
  35. package/plugins/mergeCells/calculations/selection.js +1 -70
  36. package/plugins/mergeCells/calculations/selection.mjs +1 -70
  37. package/plugins/mergeCells/cellsCollection.js +116 -0
  38. package/plugins/mergeCells/cellsCollection.mjs +116 -0
  39. package/plugins/mergeCells/contextMenuItem/toggleMerge.js +11 -1
  40. package/plugins/mergeCells/contextMenuItem/toggleMerge.mjs +11 -1
  41. package/plugins/mergeCells/focusOrder.js +327 -0
  42. package/plugins/mergeCells/focusOrder.mjs +322 -0
  43. package/plugins/mergeCells/mergeCells.js +392 -197
  44. package/plugins/mergeCells/mergeCells.mjs +392 -197
  45. package/plugins/multiColumnSorting/multiColumnSorting.js +6 -0
  46. package/plugins/multiColumnSorting/multiColumnSorting.mjs +6 -0
  47. package/plugins/nestedHeaders/nestedHeaders.js +1 -0
  48. package/plugins/nestedHeaders/nestedHeaders.mjs +1 -0
  49. package/plugins/nestedRows/nestedRows.js +7 -1
  50. package/plugins/nestedRows/nestedRows.mjs +7 -1
  51. package/renderers/checkboxRenderer/checkboxRenderer.js +8 -5
  52. package/renderers/checkboxRenderer/checkboxRenderer.mjs +8 -5
  53. package/selection/highlight/visualSelection.js +16 -2
  54. package/selection/highlight/visualSelection.mjs +16 -2
  55. package/selection/selection.js +228 -44
  56. package/selection/selection.mjs +227 -43
  57. package/selection/transformation.js +86 -32
  58. package/selection/transformation.mjs +86 -32
  59. package/shortcutContexts/commands/editor/closeAndSave.js +2 -2
  60. package/shortcutContexts/commands/editor/closeAndSave.mjs +2 -2
  61. package/shortcutContexts/commands/editor/open.js +18 -3
  62. package/shortcutContexts/commands/editor/open.mjs +18 -3
  63. package/shortcutContexts/commands/extendCellsSelection/down.js +1 -1
  64. package/shortcutContexts/commands/extendCellsSelection/down.mjs +1 -1
  65. package/shortcutContexts/commands/extendCellsSelection/left.js +1 -1
  66. package/shortcutContexts/commands/extendCellsSelection/left.mjs +1 -1
  67. package/shortcutContexts/commands/extendCellsSelection/right.js +1 -1
  68. package/shortcutContexts/commands/extendCellsSelection/right.mjs +1 -1
  69. package/shortcutContexts/commands/extendCellsSelection/toColumns.js +1 -1
  70. package/shortcutContexts/commands/extendCellsSelection/toColumns.mjs +1 -1
  71. package/shortcutContexts/commands/extendCellsSelection/toMostBottom.js +3 -1
  72. package/shortcutContexts/commands/extendCellsSelection/toMostBottom.mjs +3 -1
  73. package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.js +9 -3
  74. package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.mjs +9 -3
  75. package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.js +10 -3
  76. package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.mjs +10 -3
  77. package/shortcutContexts/commands/extendCellsSelection/toMostLeft.js +3 -1
  78. package/shortcutContexts/commands/extendCellsSelection/toMostLeft.mjs +3 -1
  79. package/shortcutContexts/commands/extendCellsSelection/toMostRight.js +3 -1
  80. package/shortcutContexts/commands/extendCellsSelection/toMostRight.mjs +3 -1
  81. package/shortcutContexts/commands/extendCellsSelection/toMostTop.js +3 -1
  82. package/shortcutContexts/commands/extendCellsSelection/toMostTop.mjs +3 -1
  83. package/shortcutContexts/commands/extendCellsSelection/toRows.js +1 -1
  84. package/shortcutContexts/commands/extendCellsSelection/toRows.mjs +1 -1
  85. package/shortcutContexts/commands/extendCellsSelection/up.js +1 -1
  86. package/shortcutContexts/commands/extendCellsSelection/up.mjs +1 -1
  87. package/shortcutContexts/commands/moveCellSelection/inlineEnd.js +6 -1
  88. package/shortcutContexts/commands/moveCellSelection/inlineEnd.mjs +6 -1
  89. package/shortcutContexts/commands/moveCellSelection/inlineStart.js +6 -1
  90. package/shortcutContexts/commands/moveCellSelection/inlineStart.mjs +6 -1
  91. package/shortcutContexts/grid.js +2 -2
  92. package/shortcutContexts/grid.mjs +2 -2
  93. package/shortcuts/context.js +2 -1
  94. package/shortcuts/context.mjs +2 -1
  95. package/tableView.js +20 -0
  96. package/tableView.mjs +20 -0
  97. package/utils/dataStructures/linkedList.js +6 -1
  98. package/utils/dataStructures/linkedList.mjs +6 -1
@@ -9,6 +9,7 @@ var _element = require("../../helpers/dom/element");
9
9
  var _rootComparator = require("./rootComparator");
10
10
  var _utils2 = require("./utils");
11
11
  var _domHelpers = require("./domHelpers");
12
+ var _shortcutContexts = require("../../shortcutContexts");
12
13
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
13
14
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
14
15
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
@@ -130,12 +131,17 @@ class MultiColumnSorting extends _columnSorting.ColumnSorting {
130
131
  if (highlight.row === -1 && highlight.col >= 0) {
131
132
  this.sort(this.getNextSortConfig(highlight.col, _columnSorting.APPEND_COLUMN_CONFIG_STRATEGY));
132
133
  }
134
+
135
+ // prevent default Enter behavior (move to the next row within a selection range)
136
+ return false;
133
137
  },
134
138
  runOnlyIf: () => {
135
139
  var _this$hot$getSelected;
136
140
  const highlight = (_this$hot$getSelected = this.hot.getSelectedRangeLast()) === null || _this$hot$getSelected === void 0 ? void 0 : _this$hot$getSelected.highlight;
137
141
  return highlight && this.hot.selection.isCellVisible(highlight) && highlight.isHeader();
138
142
  },
143
+ relativeToGroup: _shortcutContexts.EDITOR_EDIT_GROUP,
144
+ position: 'before',
139
145
  group: SHORTCUTS_GROUP
140
146
  });
141
147
  }
@@ -9,6 +9,7 @@ import { addClass, removeClass } from "../../helpers/dom/element.mjs";
9
9
  import { rootComparator } from "./rootComparator.mjs";
10
10
  import { warnAboutPluginsConflict } from "./utils.mjs";
11
11
  import { getClassesToAdd, getClassesToRemove } from "./domHelpers.mjs";
12
+ import { EDITOR_EDIT_GROUP as SHORTCUTS_GROUP_EDITOR } from "../../shortcutContexts/index.mjs";
12
13
  export const PLUGIN_KEY = 'multiColumnSorting';
13
14
  export const PLUGIN_PRIORITY = 170;
14
15
  const CONFLICTED_PLUGIN_KEY = 'columnSorting';
@@ -127,12 +128,17 @@ export class MultiColumnSorting extends ColumnSorting {
127
128
  if (highlight.row === -1 && highlight.col >= 0) {
128
129
  this.sort(this.getNextSortConfig(highlight.col, APPEND_COLUMN_CONFIG_STRATEGY));
129
130
  }
131
+
132
+ // prevent default Enter behavior (move to the next row within a selection range)
133
+ return false;
130
134
  },
131
135
  runOnlyIf: () => {
132
136
  var _this$hot$getSelected;
133
137
  const highlight = (_this$hot$getSelected = this.hot.getSelectedRangeLast()) === null || _this$hot$getSelected === void 0 ? void 0 : _this$hot$getSelected.highlight;
134
138
  return highlight && this.hot.selection.isCellVisible(highlight) && highlight.isHeader();
135
139
  },
140
+ relativeToGroup: SHORTCUTS_GROUP_EDITOR,
141
+ position: 'before',
136
142
  group: SHORTCUTS_GROUP
137
143
  });
138
144
  }
@@ -364,6 +364,7 @@ class NestedHeaders extends _base.BasePlugin {
364
364
  return _classPrivateMethodGet(_this, _onModifyTransformStart, _onModifyTransformStart2).call(_this, ...args);
365
365
  });
366
366
  this.addHook('afterSelection', () => _classPrivateMethodGet(this, _updateFocusHighlightPosition, _updateFocusHighlightPosition2).call(this));
367
+ this.addHook('afterSelectionFocusSet', () => _classPrivateMethodGet(this, _updateFocusHighlightPosition, _updateFocusHighlightPosition2).call(this));
367
368
  this.addHook('beforeViewportScrollHorizontally', function () {
368
369
  for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
369
370
  args[_key8] = arguments[_key8];
@@ -360,6 +360,7 @@ export class NestedHeaders extends BasePlugin {
360
360
  return _classPrivateMethodGet(_this, _onModifyTransformStart, _onModifyTransformStart2).call(_this, ...args);
361
361
  });
362
362
  this.addHook('afterSelection', () => _classPrivateMethodGet(this, _updateFocusHighlightPosition, _updateFocusHighlightPosition2).call(this));
363
+ this.addHook('afterSelectionFocusSet', () => _classPrivateMethodGet(this, _updateFocusHighlightPosition, _updateFocusHighlightPosition2).call(this));
363
364
  this.addHook('beforeViewportScrollHorizontally', function () {
364
365
  for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
365
366
  args[_key8] = arguments[_key8];
@@ -11,6 +11,7 @@ var _contextMenu = _interopRequireDefault(require("./ui/contextMenu"));
11
11
  var _console = require("../../helpers/console");
12
12
  var _data = require("../../helpers/data");
13
13
  var _translations = require("../../translations");
14
+ var _shortcutContexts = require("../../shortcutContexts");
14
15
  var _rowMoveController = _interopRequireDefault(require("./utils/rowMoveController"));
15
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16
17
  function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
@@ -400,13 +401,18 @@ class NestedRows extends _base.BasePlugin {
400
401
  this.collapsingUI.collapseChildren(row);
401
402
  }
402
403
  }
404
+
405
+ // prevent default Enter behavior (move to the next row within a selection range)
406
+ return false;
403
407
  },
404
408
  runOnlyIf: () => {
405
409
  var _this$hot$getSelected;
406
410
  const highlight = (_this$hot$getSelected = this.hot.getSelectedRangeLast()) === null || _this$hot$getSelected === void 0 ? void 0 : _this$hot$getSelected.highlight;
407
411
  return highlight && this.hot.selection.isCellVisible(highlight) && highlight.isHeader();
408
412
  },
409
- group: SHORTCUTS_GROUP
413
+ group: SHORTCUTS_GROUP,
414
+ relativeToGroup: _shortcutContexts.EDITOR_EDIT_GROUP,
415
+ position: 'before'
410
416
  });
411
417
  }
412
418
 
@@ -20,6 +20,7 @@ import ContextMenuUI from "./ui/contextMenu.mjs";
20
20
  import { error } from "../../helpers/console.mjs";
21
21
  import { isArrayOfObjects } from "../../helpers/data.mjs";
22
22
  import { TrimmingMap } from "../../translations/index.mjs";
23
+ import { EDITOR_EDIT_GROUP as SHORTCUTS_GROUP_EDITOR } from "../../shortcutContexts/index.mjs";
23
24
  import RowMoveController from "./utils/rowMoveController.mjs";
24
25
  export const PLUGIN_KEY = 'nestedRows';
25
26
  export const PLUGIN_PRIORITY = 300;
@@ -396,13 +397,18 @@ export class NestedRows extends BasePlugin {
396
397
  this.collapsingUI.collapseChildren(row);
397
398
  }
398
399
  }
400
+
401
+ // prevent default Enter behavior (move to the next row within a selection range)
402
+ return false;
399
403
  },
400
404
  runOnlyIf: () => {
401
405
  var _this$hot$getSelected;
402
406
  const highlight = (_this$hot$getSelected = this.hot.getSelectedRangeLast()) === null || _this$hot$getSelected === void 0 ? void 0 : _this$hot$getSelected.highlight;
403
407
  return highlight && this.hot.selection.isCellVisible(highlight) && highlight.isHeader();
404
408
  },
405
- group: SHORTCUTS_GROUP
409
+ group: SHORTCUTS_GROUP,
410
+ relativeToGroup: SHORTCUTS_GROUP_EDITOR,
411
+ position: 'before'
406
412
  });
407
413
  }
408
414
 
@@ -139,7 +139,9 @@ function checkboxRenderer(hotInstance, TD, row, col, prop, value, cellProperties
139
139
  const shortcutManager = hotInstance.getShortcutManager();
140
140
  const gridContext = shortcutManager.getContext('grid');
141
141
  const config = {
142
- group: SHORTCUTS_GROUP
142
+ group: SHORTCUTS_GROUP,
143
+ relativeToGroup: _shortcutContexts.EDITOR_EDIT_GROUP,
144
+ position: 'before'
143
145
  };
144
146
  gridContext.addShortcuts([{
145
147
  keys: [['space']],
@@ -153,15 +155,16 @@ function checkboxRenderer(hotInstance, TD, row, col, prop, value, cellProperties
153
155
  changeSelectedCheckboxesState();
154
156
  return !areSelectedCheckboxCells(); // False blocks next action associated with the keyboard shortcut.
155
157
  },
156
- runOnlyIf: () => hotInstance.getSettings().enterBeginsEditing
158
+ runOnlyIf: () => {
159
+ var _hotInstance$getSelec;
160
+ return hotInstance.getSettings().enterBeginsEditing && ((_hotInstance$getSelec = hotInstance.getSelectedRangeLast()) === null || _hotInstance$getSelec === void 0 ? void 0 : _hotInstance$getSelec.isSingle());
161
+ }
157
162
  }, {
158
163
  keys: [['delete'], ['backspace']],
159
164
  callback: () => {
160
165
  changeSelectedCheckboxesState(true);
161
166
  return !areSelectedCheckboxCells(); // False blocks next action associated with the keyboard shortcut.
162
- },
163
- relativeToGroup: _shortcutContexts.EDITOR_EDIT_GROUP,
164
- position: 'before'
167
+ }
165
168
  }], config);
166
169
  }
167
170
 
@@ -134,7 +134,9 @@ export function checkboxRenderer(hotInstance, TD, row, col, prop, value, cellPro
134
134
  const shortcutManager = hotInstance.getShortcutManager();
135
135
  const gridContext = shortcutManager.getContext('grid');
136
136
  const config = {
137
- group: SHORTCUTS_GROUP
137
+ group: SHORTCUTS_GROUP,
138
+ relativeToGroup: SHORTCUTS_GROUP_EDITOR,
139
+ position: 'before'
138
140
  };
139
141
  gridContext.addShortcuts([{
140
142
  keys: [['space']],
@@ -148,15 +150,16 @@ export function checkboxRenderer(hotInstance, TD, row, col, prop, value, cellPro
148
150
  changeSelectedCheckboxesState();
149
151
  return !areSelectedCheckboxCells(); // False blocks next action associated with the keyboard shortcut.
150
152
  },
151
- runOnlyIf: () => hotInstance.getSettings().enterBeginsEditing
153
+ runOnlyIf: () => {
154
+ var _hotInstance$getSelec;
155
+ return hotInstance.getSettings().enterBeginsEditing && ((_hotInstance$getSelec = hotInstance.getSelectedRangeLast()) === null || _hotInstance$getSelec === void 0 ? void 0 : _hotInstance$getSelec.isSingle());
156
+ }
152
157
  }, {
153
158
  keys: [['delete'], ['backspace']],
154
159
  callback: () => {
155
160
  changeSelectedCheckboxesState(true);
156
161
  return !areSelectedCheckboxCells(); // False blocks next action associated with the keyboard shortcut.
157
- },
158
- relativeToGroup: SHORTCUTS_GROUP_EDITOR,
159
- position: 'before'
162
+ }
160
163
  }], config);
161
164
  }
162
165
 
@@ -147,13 +147,25 @@ class VisualSelection extends _src.Selection {
147
147
  * @returns {VisualSelection}
148
148
  */
149
149
  syncWith(broaderCellRange) {
150
- const coordsFrom = broaderCellRange.from.clone().normalize();
150
+ const highlight = this.visualCellRange.highlight.clone().normalize();
151
151
  const rowDirection = broaderCellRange.getVerticalDirection() === 'N-S' ? 1 : -1;
152
152
  const columnDirection = broaderCellRange.getHorizontalDirection() === 'W-E' ? 1 : -1;
153
153
  const renderableHighlight = this.settings.visualToRenderableCoords(this.visualCellRange.highlight);
154
154
  let cellCoordsVisual = null;
155
155
  if (renderableHighlight === null || renderableHighlight.col === null || renderableHighlight.row === null) {
156
- cellCoordsVisual = this.getNearestNotHiddenCoords(coordsFrom, rowDirection, columnDirection);
156
+ const topStartCorder = broaderCellRange.getTopStartCorner();
157
+ const bottomEndCorner = broaderCellRange.getBottomEndCorner();
158
+ let nextVisibleRow = this.settings.rowIndexMapper.getNearestNotHiddenIndex(highlight.row, rowDirection);
159
+ if (nextVisibleRow === null || rowDirection === 1 && nextVisibleRow > bottomEndCorner.row || rowDirection === -1 && nextVisibleRow < topStartCorder.row) {
160
+ nextVisibleRow = this.settings.rowIndexMapper.getNearestNotHiddenIndex(highlight.row, -rowDirection);
161
+ }
162
+ let nextVisibleColumn = this.settings.columnIndexMapper.getNearestNotHiddenIndex(highlight.col, columnDirection);
163
+ if (nextVisibleColumn === null || columnDirection === 1 && nextVisibleColumn > bottomEndCorner.col || columnDirection === -1 && nextVisibleColumn < topStartCorder.col) {
164
+ nextVisibleColumn = this.settings.columnIndexMapper.getNearestNotHiddenIndex(highlight.col, -columnDirection);
165
+ }
166
+ if (nextVisibleRow !== null && nextVisibleColumn !== null) {
167
+ cellCoordsVisual = this.settings.createCellCoords(nextVisibleRow, nextVisibleColumn);
168
+ }
157
169
  }
158
170
  if (cellCoordsVisual !== null && broaderCellRange.overlaps(cellCoordsVisual)) {
159
171
  const currentHighlight = broaderCellRange.highlight.clone();
@@ -170,11 +182,13 @@ class VisualSelection extends _src.Selection {
170
182
  this.cellRange = this.settings.createCellRange(cellCoordsRenderable);
171
183
  }
172
184
 
185
+ // TODO
173
186
  // We set new highlight as it might change (for example, when showing/hiding some cells from the broader selection range)
174
187
  // TODO: It is also handled by the `MergeCells` plugin while adjusting already modified coordinates. Should it?
175
188
  broaderCellRange.setHighlight(currentHighlight);
176
189
  }
177
190
 
191
+ // TODO
178
192
  // Sync the highlight coords from the visual selection layer with logical coords.
179
193
  if (this.settings.selectionType === 'focus' && renderableHighlight !== null && cellCoordsVisual === null) {
180
194
  broaderCellRange.setHighlight(this.visualCellRange.highlight);
@@ -144,13 +144,25 @@ class VisualSelection extends Selection {
144
144
  * @returns {VisualSelection}
145
145
  */
146
146
  syncWith(broaderCellRange) {
147
- const coordsFrom = broaderCellRange.from.clone().normalize();
147
+ const highlight = this.visualCellRange.highlight.clone().normalize();
148
148
  const rowDirection = broaderCellRange.getVerticalDirection() === 'N-S' ? 1 : -1;
149
149
  const columnDirection = broaderCellRange.getHorizontalDirection() === 'W-E' ? 1 : -1;
150
150
  const renderableHighlight = this.settings.visualToRenderableCoords(this.visualCellRange.highlight);
151
151
  let cellCoordsVisual = null;
152
152
  if (renderableHighlight === null || renderableHighlight.col === null || renderableHighlight.row === null) {
153
- cellCoordsVisual = this.getNearestNotHiddenCoords(coordsFrom, rowDirection, columnDirection);
153
+ const topStartCorder = broaderCellRange.getTopStartCorner();
154
+ const bottomEndCorner = broaderCellRange.getBottomEndCorner();
155
+ let nextVisibleRow = this.settings.rowIndexMapper.getNearestNotHiddenIndex(highlight.row, rowDirection);
156
+ if (nextVisibleRow === null || rowDirection === 1 && nextVisibleRow > bottomEndCorner.row || rowDirection === -1 && nextVisibleRow < topStartCorder.row) {
157
+ nextVisibleRow = this.settings.rowIndexMapper.getNearestNotHiddenIndex(highlight.row, -rowDirection);
158
+ }
159
+ let nextVisibleColumn = this.settings.columnIndexMapper.getNearestNotHiddenIndex(highlight.col, columnDirection);
160
+ if (nextVisibleColumn === null || columnDirection === 1 && nextVisibleColumn > bottomEndCorner.col || columnDirection === -1 && nextVisibleColumn < topStartCorder.col) {
161
+ nextVisibleColumn = this.settings.columnIndexMapper.getNearestNotHiddenIndex(highlight.col, -columnDirection);
162
+ }
163
+ if (nextVisibleRow !== null && nextVisibleColumn !== null) {
164
+ cellCoordsVisual = this.settings.createCellCoords(nextVisibleRow, nextVisibleColumn);
165
+ }
154
166
  }
155
167
  if (cellCoordsVisual !== null && broaderCellRange.overlaps(cellCoordsVisual)) {
156
168
  const currentHighlight = broaderCellRange.highlight.clone();
@@ -167,11 +179,13 @@ class VisualSelection extends Selection {
167
179
  this.cellRange = this.settings.createCellRange(cellCoordsRenderable);
168
180
  }
169
181
 
182
+ // TODO
170
183
  // We set new highlight as it might change (for example, when showing/hiding some cells from the broader selection range)
171
184
  // TODO: It is also handled by the `MergeCells` plugin while adjusting already modified coordinates. Should it?
172
185
  broaderCellRange.setHighlight(currentHighlight);
173
186
  }
174
187
 
188
+ // TODO
175
189
  // Sync the highlight coords from the visual selection layer with logical coords.
176
190
  if (this.settings.selectionType === 'focus' && renderableHighlight !== null && cellCoordsVisual === null) {
177
191
  broaderCellRange.setHighlight(this.visualCellRange.highlight);