handsontable 0.0.0-next-612100d-20240219 → 0.0.0-next-d96e9b5-20240220

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 (89) hide show
  1. package/3rdparty/walkontable/src/cell/range.d.ts +1 -0
  2. package/3rdparty/walkontable/src/cell/range.js +12 -0
  3. package/3rdparty/walkontable/src/cell/range.mjs +12 -0
  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.js +14 -0
  11. package/core.mjs +14 -0
  12. package/dist/handsontable.css +2 -2
  13. package/dist/handsontable.full.css +2 -2
  14. package/dist/handsontable.full.js +1606 -1328
  15. package/dist/handsontable.full.min.css +2 -2
  16. package/dist/handsontable.full.min.js +151 -151
  17. package/dist/handsontable.js +1606 -1328
  18. package/dist/handsontable.min.css +2 -2
  19. package/dist/handsontable.min.js +19 -19
  20. package/editorManager.js +12 -8
  21. package/editorManager.mjs +12 -8
  22. package/helpers/mixed.js +1 -1
  23. package/helpers/mixed.mjs +1 -1
  24. package/package.json +1 -1
  25. package/pluginHooks.d.ts +1 -0
  26. package/pluginHooks.js +43 -1
  27. package/pluginHooks.mjs +43 -1
  28. package/plugins/collapsibleColumns/collapsibleColumns.js +7 -1
  29. package/plugins/collapsibleColumns/collapsibleColumns.mjs +7 -1
  30. package/plugins/columnSorting/columnSorting.js +6 -0
  31. package/plugins/columnSorting/columnSorting.mjs +6 -0
  32. package/plugins/contextMenu/menu/defaultShortcutsList.js +26 -10
  33. package/plugins/contextMenu/menu/defaultShortcutsList.mjs +26 -10
  34. package/plugins/mergeCells/calculations/selection.js +1 -70
  35. package/plugins/mergeCells/calculations/selection.mjs +1 -70
  36. package/plugins/mergeCells/contextMenuItem/toggleMerge.js +11 -1
  37. package/plugins/mergeCells/contextMenuItem/toggleMerge.mjs +11 -1
  38. package/plugins/mergeCells/mergeCells.js +182 -207
  39. package/plugins/mergeCells/mergeCells.mjs +182 -207
  40. package/plugins/multiColumnSorting/multiColumnSorting.js +6 -0
  41. package/plugins/multiColumnSorting/multiColumnSorting.mjs +6 -0
  42. package/plugins/nestedHeaders/nestedHeaders.js +1 -0
  43. package/plugins/nestedHeaders/nestedHeaders.mjs +1 -0
  44. package/plugins/nestedRows/nestedRows.js +7 -1
  45. package/plugins/nestedRows/nestedRows.mjs +7 -1
  46. package/renderers/checkboxRenderer/checkboxRenderer.js +4 -4
  47. package/renderers/checkboxRenderer/checkboxRenderer.mjs +4 -4
  48. package/selection/highlight/visualSelection.js +2 -0
  49. package/selection/highlight/visualSelection.mjs +2 -0
  50. package/selection/selection.js +195 -34
  51. package/selection/selection.mjs +194 -33
  52. package/selection/transformation.js +45 -30
  53. package/selection/transformation.mjs +45 -30
  54. package/shortcutContexts/commands/editor/closeAndSave.js +2 -2
  55. package/shortcutContexts/commands/editor/closeAndSave.mjs +2 -2
  56. package/shortcutContexts/commands/editor/open.js +18 -3
  57. package/shortcutContexts/commands/editor/open.mjs +18 -3
  58. package/shortcutContexts/commands/extendCellsSelection/down.js +1 -1
  59. package/shortcutContexts/commands/extendCellsSelection/down.mjs +1 -1
  60. package/shortcutContexts/commands/extendCellsSelection/left.js +1 -1
  61. package/shortcutContexts/commands/extendCellsSelection/left.mjs +1 -1
  62. package/shortcutContexts/commands/extendCellsSelection/right.js +1 -1
  63. package/shortcutContexts/commands/extendCellsSelection/right.mjs +1 -1
  64. package/shortcutContexts/commands/extendCellsSelection/toColumns.js +1 -1
  65. package/shortcutContexts/commands/extendCellsSelection/toColumns.mjs +1 -1
  66. package/shortcutContexts/commands/extendCellsSelection/toMostBottom.js +3 -1
  67. package/shortcutContexts/commands/extendCellsSelection/toMostBottom.mjs +3 -1
  68. package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.js +9 -3
  69. package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.mjs +9 -3
  70. package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.js +10 -3
  71. package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.mjs +10 -3
  72. package/shortcutContexts/commands/extendCellsSelection/toMostLeft.js +3 -1
  73. package/shortcutContexts/commands/extendCellsSelection/toMostLeft.mjs +3 -1
  74. package/shortcutContexts/commands/extendCellsSelection/toMostRight.js +3 -1
  75. package/shortcutContexts/commands/extendCellsSelection/toMostRight.mjs +3 -1
  76. package/shortcutContexts/commands/extendCellsSelection/toMostTop.js +3 -1
  77. package/shortcutContexts/commands/extendCellsSelection/toMostTop.mjs +3 -1
  78. package/shortcutContexts/commands/extendCellsSelection/toRows.js +1 -1
  79. package/shortcutContexts/commands/extendCellsSelection/toRows.mjs +1 -1
  80. package/shortcutContexts/commands/extendCellsSelection/up.js +1 -1
  81. package/shortcutContexts/commands/extendCellsSelection/up.mjs +1 -1
  82. package/shortcutContexts/commands/moveCellSelection/inlineEnd.js +6 -1
  83. package/shortcutContexts/commands/moveCellSelection/inlineEnd.mjs +6 -1
  84. package/shortcutContexts/commands/moveCellSelection/inlineStart.js +6 -1
  85. package/shortcutContexts/commands/moveCellSelection/inlineStart.mjs +6 -1
  86. package/shortcutContexts/grid.js +2 -2
  87. package/shortcutContexts/grid.mjs +2 -2
  88. package/shortcuts/context.js +2 -1
  89. package/shortcuts/context.mjs +2 -1
@@ -71,16 +71,16 @@ const SHORTCUTS_GROUP = PLUGIN_KEY;
71
71
  * ```
72
72
  * :::
73
73
  */
74
- var _lastDesiredCoords = /*#__PURE__*/new WeakMap();
74
+ var _lastSelectedCoords = /*#__PURE__*/new WeakMap();
75
75
  var _onAfterInit = /*#__PURE__*/new WeakSet();
76
76
  var _onAfterIsMultipleSelection = /*#__PURE__*/new WeakSet();
77
77
  var _onModifyTransformStart = /*#__PURE__*/new WeakSet();
78
78
  var _onModifyTransformEnd = /*#__PURE__*/new WeakSet();
79
+ var _onBeforeSelectionHighlightSet = /*#__PURE__*/new WeakSet();
79
80
  var _onModifyGetCellCoords = /*#__PURE__*/new WeakSet();
80
81
  var _addMergeActionsToContextMenu = /*#__PURE__*/new WeakSet();
81
82
  var _onAfterRenderer = /*#__PURE__*/new WeakSet();
82
83
  var _onBeforeSetRangeStart = /*#__PURE__*/new WeakSet();
83
- var _onBeforeSetRangeEnd = /*#__PURE__*/new WeakSet();
84
84
  var _onAfterGetCellMeta = /*#__PURE__*/new WeakSet();
85
85
  var _onAfterViewportRowCalculatorOverride = /*#__PURE__*/new WeakSet();
86
86
  var _onAfterViewportColumnCalculatorOverride = /*#__PURE__*/new WeakSet();
@@ -91,7 +91,6 @@ var _onAfterCreateRow = /*#__PURE__*/new WeakSet();
91
91
  var _onAfterRemoveRow = /*#__PURE__*/new WeakSet();
92
92
  var _onAfterChange = /*#__PURE__*/new WeakSet();
93
93
  var _onBeforeDrawAreaBorders = /*#__PURE__*/new WeakSet();
94
- var _onAfterModifyTransformStart = /*#__PURE__*/new WeakSet();
95
94
  var _onAfterDrawSelection = /*#__PURE__*/new WeakSet();
96
95
  var _onBeforeRemoveCellClassNames = /*#__PURE__*/new WeakSet();
97
96
  var _onBeforeBeginEditing = /*#__PURE__*/new WeakSet();
@@ -127,17 +126,6 @@ export class MergeCells extends BasePlugin {
127
126
  * processed cell.
128
127
  */
129
128
  _classPrivateMethodInitSpec(this, _onAfterDrawSelection);
130
- /**
131
- * `afterModifyTransformStart` hook callback. Fixes a problem with navigating through merged cells at the edges of
132
- * the table with the <kbd>**Enter**</kbd>/<kbd>**Shift**</kbd>+<kbd>**Enter**</kbd>/<kbd>**Tab**</kbd>/<kbd>**Shift**</kbd>+<kbd>**Tab**</kbd> keys.
133
- *
134
- * @param {CellCoords} coords Coordinates of the to-be-selected cell.
135
- * @param {number} rowTransformDir Row transformation direction (negative value = up, 0 = none, positive value =
136
- * down).
137
- * @param {number} colTransformDir Column transformation direction (negative value = up, 0 = none, positive value =
138
- * down).
139
- */
140
- _classPrivateMethodInitSpec(this, _onAfterModifyTransformStart);
141
129
  /**
142
130
  * `beforeDrawAreaBorders` hook callback.
143
131
  *
@@ -210,20 +198,7 @@ export class MergeCells extends BasePlugin {
210
198
  */
211
199
  _classPrivateMethodInitSpec(this, _onAfterGetCellMeta);
212
200
  /**
213
- * `beforeSetRangeEnd` hook callback.
214
- * While selecting cells with keyboard or mouse, make sure that rectangular area is expanded to the extent of the
215
- * merged cell.
216
- *
217
- * Note: Please keep in mind that callback may modify both start and end range coordinates by the reference.
218
- *
219
- * @param {object} coords Cell coords.
220
- */
221
- _classPrivateMethodInitSpec(this, _onBeforeSetRangeEnd);
222
- /**
223
- * `beforeSetRangeStart` and `beforeSetRangeStartOnly` hook callback.
224
- * A selection within merge area should be rewritten to the start of merge area.
225
- *
226
- * @param {object} coords Cell coords.
201
+ * Clears the last selected coordinates before setting a new selection range.
227
202
  */
228
203
  _classPrivateMethodInitSpec(this, _onBeforeSetRangeStart);
229
204
  /**
@@ -248,6 +223,11 @@ export class MergeCells extends BasePlugin {
248
223
  * @returns {Array|undefined} Visual coordinates of the merge.
249
224
  */
250
225
  _classPrivateMethodInitSpec(this, _onModifyGetCellCoords);
226
+ /**
227
+ * The hook corrects the range (before drawing it) after the selection was made on the merged cells.
228
+ * It expands the range to cover the entire area of the selected merged cells.
229
+ */
230
+ _classPrivateMethodInitSpec(this, _onBeforeSelectionHighlightSet);
251
231
  /**
252
232
  * `modifyTransformEnd` hook callback. Needed to handle "jumping over" merged merged cells, while selecting.
253
233
  *
@@ -294,9 +274,12 @@ export class MergeCells extends BasePlugin {
294
274
  */
295
275
  _defineProperty(this, "selectionCalculations", null);
296
276
  /**
277
+ * The holder for the last selected coordinates. This allows keeping the correct coordinates in cases after the
278
+ * focus is moved out of the merged cell.
279
+ *
297
280
  * @type {CellCoords}
298
281
  */
299
- _classPrivateFieldInitSpec(this, _lastDesiredCoords, {
282
+ _classPrivateFieldInitSpec(this, _lastSelectedCoords, {
300
283
  writable: true,
301
284
  value: null
302
285
  });
@@ -340,135 +323,129 @@ export class MergeCells extends BasePlugin {
340
323
  }
341
324
  return _classPrivateMethodGet(_this, _onModifyTransformStart, _onModifyTransformStart2).call(_this, ...args);
342
325
  });
343
- this.addHook('afterModifyTransformStart', function () {
326
+ this.addHook('modifyTransformEnd', function () {
344
327
  for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
345
328
  args[_key3] = arguments[_key3];
346
329
  }
347
- return _classPrivateMethodGet(_this, _onAfterModifyTransformStart, _onAfterModifyTransformStart2).call(_this, ...args);
330
+ return _classPrivateMethodGet(_this, _onModifyTransformEnd, _onModifyTransformEnd2).call(_this, ...args);
348
331
  });
349
- this.addHook('modifyTransformEnd', function () {
332
+ this.addHook('beforeSelectionHighlightSet', function () {
350
333
  for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
351
334
  args[_key4] = arguments[_key4];
352
335
  }
353
- return _classPrivateMethodGet(_this, _onModifyTransformEnd, _onModifyTransformEnd2).call(_this, ...args);
336
+ return _classPrivateMethodGet(_this, _onBeforeSelectionHighlightSet, _onBeforeSelectionHighlightSet2).call(_this, ...args);
354
337
  });
355
- this.addHook('modifyGetCellCoords', function () {
338
+ this.addHook('beforeSetRangeStart', function () {
356
339
  for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
357
340
  args[_key5] = arguments[_key5];
358
341
  }
359
- return _classPrivateMethodGet(_this, _onModifyGetCellCoords, _onModifyGetCellCoords2).call(_this, ...args);
342
+ return _classPrivateMethodGet(_this, _onBeforeSetRangeStart, _onBeforeSetRangeStart2).call(_this, ...args);
360
343
  });
361
- this.addHook('beforeSetRangeStart', function () {
344
+ this.addHook('beforeSetRangeStartOnly', function () {
362
345
  for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
363
346
  args[_key6] = arguments[_key6];
364
347
  }
365
348
  return _classPrivateMethodGet(_this, _onBeforeSetRangeStart, _onBeforeSetRangeStart2).call(_this, ...args);
366
349
  });
367
- this.addHook('beforeSetRangeStartOnly', function () {
350
+ this.addHook('modifyGetCellCoords', function () {
368
351
  for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
369
352
  args[_key7] = arguments[_key7];
370
353
  }
371
- return _classPrivateMethodGet(_this, _onBeforeSetRangeStart, _onBeforeSetRangeStart2).call(_this, ...args);
354
+ return _classPrivateMethodGet(_this, _onModifyGetCellCoords, _onModifyGetCellCoords2).call(_this, ...args);
372
355
  });
373
- this.addHook('beforeSetRangeEnd', function () {
356
+ this.addHook('afterIsMultipleSelection', function () {
374
357
  for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
375
358
  args[_key8] = arguments[_key8];
376
359
  }
377
- return _classPrivateMethodGet(_this, _onBeforeSetRangeEnd, _onBeforeSetRangeEnd2).call(_this, ...args);
378
- });
379
- this.addHook('afterIsMultipleSelection', function () {
380
- for (var _len9 = arguments.length, args = new Array(_len9), _key9 = 0; _key9 < _len9; _key9++) {
381
- args[_key9] = arguments[_key9];
382
- }
383
360
  return _classPrivateMethodGet(_this, _onAfterIsMultipleSelection, _onAfterIsMultipleSelection2).call(_this, ...args);
384
361
  });
385
362
  this.addHook('afterRenderer', function () {
386
- for (var _len10 = arguments.length, args = new Array(_len10), _key10 = 0; _key10 < _len10; _key10++) {
387
- args[_key10] = arguments[_key10];
363
+ for (var _len9 = arguments.length, args = new Array(_len9), _key9 = 0; _key9 < _len9; _key9++) {
364
+ args[_key9] = arguments[_key9];
388
365
  }
389
366
  return _classPrivateMethodGet(_this, _onAfterRenderer, _onAfterRenderer2).call(_this, ...args);
390
367
  });
391
368
  this.addHook('afterContextMenuDefaultOptions', function () {
392
- for (var _len11 = arguments.length, args = new Array(_len11), _key11 = 0; _key11 < _len11; _key11++) {
393
- args[_key11] = arguments[_key11];
369
+ for (var _len10 = arguments.length, args = new Array(_len10), _key10 = 0; _key10 < _len10; _key10++) {
370
+ args[_key10] = arguments[_key10];
394
371
  }
395
372
  return _classPrivateMethodGet(_this, _addMergeActionsToContextMenu, _addMergeActionsToContextMenu2).call(_this, ...args);
396
373
  });
397
374
  this.addHook('afterGetCellMeta', function () {
398
- for (var _len12 = arguments.length, args = new Array(_len12), _key12 = 0; _key12 < _len12; _key12++) {
399
- args[_key12] = arguments[_key12];
375
+ for (var _len11 = arguments.length, args = new Array(_len11), _key11 = 0; _key11 < _len11; _key11++) {
376
+ args[_key11] = arguments[_key11];
400
377
  }
401
378
  return _classPrivateMethodGet(_this, _onAfterGetCellMeta, _onAfterGetCellMeta2).call(_this, ...args);
402
379
  });
403
380
  this.addHook('afterViewportRowCalculatorOverride', function () {
404
- for (var _len13 = arguments.length, args = new Array(_len13), _key13 = 0; _key13 < _len13; _key13++) {
405
- args[_key13] = arguments[_key13];
381
+ for (var _len12 = arguments.length, args = new Array(_len12), _key12 = 0; _key12 < _len12; _key12++) {
382
+ args[_key12] = arguments[_key12];
406
383
  }
407
384
  return _classPrivateMethodGet(_this, _onAfterViewportRowCalculatorOverride, _onAfterViewportRowCalculatorOverride2).call(_this, ...args);
408
385
  });
409
386
  this.addHook('afterViewportColumnCalculatorOverride', function () {
410
- for (var _len14 = arguments.length, args = new Array(_len14), _key14 = 0; _key14 < _len14; _key14++) {
411
- args[_key14] = arguments[_key14];
387
+ for (var _len13 = arguments.length, args = new Array(_len13), _key13 = 0; _key13 < _len13; _key13++) {
388
+ args[_key13] = arguments[_key13];
412
389
  }
413
390
  return _classPrivateMethodGet(_this, _onAfterViewportColumnCalculatorOverride, _onAfterViewportColumnCalculatorOverride2).call(_this, ...args);
414
391
  });
415
392
  this.addHook('modifyAutofillRange', function () {
416
- for (var _len15 = arguments.length, args = new Array(_len15), _key15 = 0; _key15 < _len15; _key15++) {
417
- args[_key15] = arguments[_key15];
393
+ for (var _len14 = arguments.length, args = new Array(_len14), _key14 = 0; _key14 < _len14; _key14++) {
394
+ args[_key14] = arguments[_key14];
418
395
  }
419
396
  return _classPrivateMethodGet(_this, _onModifyAutofillRange, _onModifyAutofillRange2).call(_this, ...args);
420
397
  });
421
398
  this.addHook('afterCreateCol', function () {
422
- for (var _len16 = arguments.length, args = new Array(_len16), _key16 = 0; _key16 < _len16; _key16++) {
423
- args[_key16] = arguments[_key16];
399
+ for (var _len15 = arguments.length, args = new Array(_len15), _key15 = 0; _key15 < _len15; _key15++) {
400
+ args[_key15] = arguments[_key15];
424
401
  }
425
402
  return _classPrivateMethodGet(_this, _onAfterCreateCol, _onAfterCreateCol2).call(_this, ...args);
426
403
  });
427
404
  this.addHook('afterRemoveCol', function () {
428
- for (var _len17 = arguments.length, args = new Array(_len17), _key17 = 0; _key17 < _len17; _key17++) {
429
- args[_key17] = arguments[_key17];
405
+ for (var _len16 = arguments.length, args = new Array(_len16), _key16 = 0; _key16 < _len16; _key16++) {
406
+ args[_key16] = arguments[_key16];
430
407
  }
431
408
  return _classPrivateMethodGet(_this, _onAfterRemoveCol, _onAfterRemoveCol2).call(_this, ...args);
432
409
  });
433
410
  this.addHook('afterCreateRow', function () {
434
- for (var _len18 = arguments.length, args = new Array(_len18), _key18 = 0; _key18 < _len18; _key18++) {
435
- args[_key18] = arguments[_key18];
411
+ for (var _len17 = arguments.length, args = new Array(_len17), _key17 = 0; _key17 < _len17; _key17++) {
412
+ args[_key17] = arguments[_key17];
436
413
  }
437
414
  return _classPrivateMethodGet(_this, _onAfterCreateRow, _onAfterCreateRow2).call(_this, ...args);
438
415
  });
439
416
  this.addHook('afterRemoveRow', function () {
440
- for (var _len19 = arguments.length, args = new Array(_len19), _key19 = 0; _key19 < _len19; _key19++) {
441
- args[_key19] = arguments[_key19];
417
+ for (var _len18 = arguments.length, args = new Array(_len18), _key18 = 0; _key18 < _len18; _key18++) {
418
+ args[_key18] = arguments[_key18];
442
419
  }
443
420
  return _classPrivateMethodGet(_this, _onAfterRemoveRow, _onAfterRemoveRow2).call(_this, ...args);
444
421
  });
445
422
  this.addHook('afterChange', function () {
446
- for (var _len20 = arguments.length, args = new Array(_len20), _key20 = 0; _key20 < _len20; _key20++) {
447
- args[_key20] = arguments[_key20];
423
+ for (var _len19 = arguments.length, args = new Array(_len19), _key19 = 0; _key19 < _len19; _key19++) {
424
+ args[_key19] = arguments[_key19];
448
425
  }
449
426
  return _classPrivateMethodGet(_this, _onAfterChange, _onAfterChange2).call(_this, ...args);
450
427
  });
451
428
  this.addHook('beforeDrawBorders', function () {
452
- for (var _len21 = arguments.length, args = new Array(_len21), _key21 = 0; _key21 < _len21; _key21++) {
453
- args[_key21] = arguments[_key21];
429
+ for (var _len20 = arguments.length, args = new Array(_len20), _key20 = 0; _key20 < _len20; _key20++) {
430
+ args[_key20] = arguments[_key20];
454
431
  }
455
432
  return _classPrivateMethodGet(_this, _onBeforeDrawAreaBorders, _onBeforeDrawAreaBorders2).call(_this, ...args);
456
433
  });
457
434
  this.addHook('afterDrawSelection', function () {
458
- for (var _len22 = arguments.length, args = new Array(_len22), _key22 = 0; _key22 < _len22; _key22++) {
459
- args[_key22] = arguments[_key22];
435
+ for (var _len21 = arguments.length, args = new Array(_len21), _key21 = 0; _key21 < _len21; _key21++) {
436
+ args[_key21] = arguments[_key21];
460
437
  }
461
438
  return _classPrivateMethodGet(_this, _onAfterDrawSelection, _onAfterDrawSelection2).call(_this, ...args);
462
439
  });
463
440
  this.addHook('beforeRemoveCellClassNames', function () {
464
- for (var _len23 = arguments.length, args = new Array(_len23), _key23 = 0; _key23 < _len23; _key23++) {
465
- args[_key23] = arguments[_key23];
441
+ for (var _len22 = arguments.length, args = new Array(_len22), _key22 = 0; _key22 < _len22; _key22++) {
442
+ args[_key22] = arguments[_key22];
466
443
  }
467
444
  return _classPrivateMethodGet(_this, _onBeforeRemoveCellClassNames, _onBeforeRemoveCellClassNames2).call(_this, ...args);
468
445
  });
469
446
  this.addHook('beforeBeginEditing', function () {
470
- for (var _len24 = arguments.length, args = new Array(_len24), _key24 = 0; _key24 < _len24; _key24++) {
471
- args[_key24] = arguments[_key24];
447
+ for (var _len23 = arguments.length, args = new Array(_len23), _key23 = 0; _key23 < _len23; _key23++) {
448
+ args[_key23] = arguments[_key23];
472
449
  }
473
450
  return _classPrivateMethodGet(_this, _onBeforeBeginEditing, _onBeforeBeginEditing2).call(_this, ...args);
474
451
  });
@@ -638,25 +615,6 @@ export class MergeCells extends BasePlugin {
638
615
  return auto ? true : this.validateSetting(newMergedCellInfo);
639
616
  }
640
617
 
641
- /**
642
- * Merge or unmerge, based on last selected range.
643
- *
644
- * @private
645
- */
646
- toggleMergeOnSelection() {
647
- const currentRange = this.hot.getSelectedRangeLast();
648
- if (!currentRange) {
649
- return;
650
- }
651
- currentRange.setDirection(this.hot.isRtl() ? 'NE-SW' : 'NW-SE');
652
- const {
653
- from,
654
- to
655
- } = currentRange;
656
- this.toggleMerge(currentRange);
657
- this.hot.selectCell(from.row, from.col, to.row, to.col, false);
658
- }
659
-
660
618
  /**
661
619
  * Merges the selection provided as a cell range.
662
620
  *
@@ -1026,8 +984,10 @@ function _onAfterIsMultipleSelection2(isMultiple) {
1026
984
  if (isMultiple) {
1027
985
  const mergedCells = this.mergedCellsCollection.mergedCells;
1028
986
  const selectionRange = this.hot.getSelectedRangeLast();
987
+ const topStartCoords = selectionRange.getTopStartCorner();
988
+ const bottomEndCoords = selectionRange.getBottomEndCorner();
1029
989
  for (let group = 0; group < mergedCells.length; group += 1) {
1030
- if (selectionRange.from.row === mergedCells[group].row && selectionRange.from.col === mergedCells[group].col && selectionRange.to.row === mergedCells[group].row + mergedCells[group].rowspan - 1 && selectionRange.to.col === mergedCells[group].col + mergedCells[group].colspan - 1) {
990
+ if (topStartCoords.row === mergedCells[group].row && topStartCoords.col === mergedCells[group].col && bottomEndCoords.row === mergedCells[group].row + mergedCells[group].rowspan - 1 && bottomEndCoords.col === mergedCells[group].col + mergedCells[group].colspan - 1) {
1031
991
  return false;
1032
992
  }
1033
993
  }
@@ -1035,75 +995,140 @@ function _onAfterIsMultipleSelection2(isMultiple) {
1035
995
  return isMultiple;
1036
996
  }
1037
997
  function _onModifyTransformStart2(delta) {
1038
- const currentlySelectedRange = this.hot.getSelectedRangeLast();
1039
- let newDelta = {
1040
- row: delta.row,
1041
- col: delta.col
1042
- };
1043
- let nextPosition = null;
1044
- const currentPosition = this.hot._createCellCoords(currentlySelectedRange.highlight.row, currentlySelectedRange.highlight.col);
1045
- const mergedParent = this.mergedCellsCollection.get(currentPosition.row, currentPosition.col);
1046
- if (!_classPrivateFieldGet(this, _lastDesiredCoords)) {
1047
- _classPrivateFieldSet(this, _lastDesiredCoords, this.hot._createCellCoords(null, null));
998
+ const selectedRange = this.hot.getSelectedRangeLast();
999
+ const {
1000
+ highlight
1001
+ } = selectedRange;
1002
+ if (_classPrivateFieldGet(this, _lastSelectedCoords)) {
1003
+ highlight.assign(_classPrivateFieldGet(this, _lastSelectedCoords));
1004
+ _classPrivateFieldSet(this, _lastSelectedCoords, null);
1048
1005
  }
1049
- if (mergedParent) {
1050
- // only merge selected
1051
- const mergeTopLeft = this.hot._createCellCoords(mergedParent.row, mergedParent.col);
1052
- const mergeBottomRight = this.hot._createCellCoords(mergedParent.row + mergedParent.rowspan - 1, mergedParent.col + mergedParent.colspan - 1);
1053
- const mergeRange = this.hot._createCellRange(mergeTopLeft, mergeTopLeft, mergeBottomRight);
1054
- if (!mergeRange.includes(_classPrivateFieldGet(this, _lastDesiredCoords))) {
1055
- _classPrivateFieldSet(this, _lastDesiredCoords, this.hot._createCellCoords(null, null)); // reset outdated version of lastDesiredCoords
1006
+ const mergedParent = this.mergedCellsCollection.get(highlight.row, highlight.col);
1007
+ if (!mergedParent) {
1008
+ return;
1009
+ }
1010
+ const visualColumnIndexStart = mergedParent.col;
1011
+ const visualColumnIndexEnd = mergedParent.col + mergedParent.colspan - 1;
1012
+ if (delta.col < 0) {
1013
+ const nextColumn = highlight.col >= visualColumnIndexStart && highlight.col <= visualColumnIndexEnd ? visualColumnIndexStart - 1 : visualColumnIndexEnd;
1014
+ const notHiddenColumnIndex = this.hot.columnIndexMapper.getNearestNotHiddenIndex(nextColumn, -1);
1015
+ if (notHiddenColumnIndex === null) {
1016
+ // There are no visible columns anymore, so move the selection out of the table edge. This will
1017
+ // be processed by the selection Transformer class as a move selection to the previous row (if autoWrapRow is enabled).
1018
+ delta.col = -this.hot.view.countRenderableColumnsInRange(0, highlight.col);
1019
+ } else {
1020
+ delta.col = -Math.max(this.hot.view.countRenderableColumnsInRange(notHiddenColumnIndex, highlight.col) - 1, 1);
1056
1021
  }
1057
- newDelta.row = _classPrivateFieldGet(this, _lastDesiredCoords).row ? _classPrivateFieldGet(this, _lastDesiredCoords).row - currentPosition.row : newDelta.row;
1058
- newDelta.col = _classPrivateFieldGet(this, _lastDesiredCoords).col ? _classPrivateFieldGet(this, _lastDesiredCoords).col - currentPosition.col : newDelta.col;
1059
- if (delta.row > 0) {
1060
- // moving down
1061
- newDelta.row = mergedParent.row + mergedParent.rowspan - 1 - currentPosition.row + delta.row;
1062
- } else if (delta.row < 0) {
1063
- // moving up
1064
- newDelta.row = currentPosition.row - mergedParent.row + delta.row;
1022
+ } else if (delta.col > 0) {
1023
+ const nextColumn = highlight.col >= visualColumnIndexStart && highlight.col <= visualColumnIndexEnd ? visualColumnIndexEnd + 1 : visualColumnIndexStart;
1024
+ const notHiddenColumnIndex = this.hot.columnIndexMapper.getNearestNotHiddenIndex(nextColumn, 1);
1025
+ if (notHiddenColumnIndex === null) {
1026
+ // There are no visible columns anymore, so move the selection out of the table edge. This will
1027
+ // be processed by the selection Transformer class as a move selection to the next row (if autoWrapRow is enabled).
1028
+ delta.col = this.hot.view.countRenderableColumnsInRange(highlight.col, this.hot.countCols());
1029
+ } else {
1030
+ delta.col = Math.max(this.hot.view.countRenderableColumnsInRange(highlight.col, notHiddenColumnIndex) - 1, 1);
1065
1031
  }
1066
- if (delta.col > 0) {
1067
- // moving right
1068
- newDelta.col = mergedParent.col + mergedParent.colspan - 1 - currentPosition.col + delta.col;
1069
- } else if (delta.col < 0) {
1070
- // moving left
1071
- newDelta.col = currentPosition.col - mergedParent.col + delta.col;
1032
+ }
1033
+ const visualRowIndexStart = mergedParent.row;
1034
+ const visualRowIndexEnd = mergedParent.row + mergedParent.rowspan - 1;
1035
+ if (delta.row < 0) {
1036
+ const nextRow = highlight.row >= visualRowIndexStart && highlight.row <= visualRowIndexEnd ? visualRowIndexStart - 1 : visualRowIndexEnd;
1037
+ const notHiddenRowIndex = this.hot.rowIndexMapper.getNearestNotHiddenIndex(nextRow, -1);
1038
+ if (notHiddenRowIndex === null) {
1039
+ // There are no visible rows anymore, so move the selection out of the table edge. This will
1040
+ // be processed by the selection Transformer class as a move selection to the previous column (if autoWrapCol is enabled).
1041
+ delta.row = -this.hot.view.countRenderableRowsInRange(0, highlight.row);
1042
+ } else {
1043
+ delta.row = -Math.max(this.hot.view.countRenderableRowsInRange(notHiddenRowIndex, highlight.row) - 1, 1);
1044
+ }
1045
+ } else if (delta.row > 0) {
1046
+ const nextRow = highlight.row >= visualRowIndexStart && highlight.row <= visualRowIndexEnd ? visualRowIndexEnd + 1 : visualRowIndexStart;
1047
+ const notHiddenRowIndex = this.hot.rowIndexMapper.getNearestNotHiddenIndex(nextRow, 1);
1048
+ if (notHiddenRowIndex === null) {
1049
+ // There are no visible rows anymore, so move the selection out of the table edge. This will
1050
+ // be processed by the selection Transformer class as a move selection to the next column (if autoWrapCol is enabled).
1051
+ delta.row = this.hot.view.countRenderableRowsInRange(highlight.row, this.hot.countRows());
1052
+ } else {
1053
+ delta.row = Math.max(this.hot.view.countRenderableRowsInRange(highlight.row, notHiddenRowIndex) - 1, 1);
1072
1054
  }
1073
1055
  }
1074
- nextPosition = this.hot._createCellCoords(currentlySelectedRange.highlight.row + newDelta.row, currentlySelectedRange.highlight.col + newDelta.col);
1075
- const nextPositionMergedCell = this.mergedCellsCollection.get(nextPosition.row, nextPosition.col);
1076
- if (nextPositionMergedCell) {
1077
- // skipping the invisible cells in the merge range
1078
- const firstRenderableCoords = this.mergedCellsCollection.getFirstRenderableCoords(nextPositionMergedCell.row, nextPositionMergedCell.col);
1079
- _classPrivateFieldSet(this, _lastDesiredCoords, nextPosition);
1080
- newDelta = {
1081
- row: firstRenderableCoords.row - currentPosition.row,
1082
- col: firstRenderableCoords.col - currentPosition.col
1083
- };
1056
+ }
1057
+ function _onModifyTransformEnd2(delta) {
1058
+ const selectedRange = this.hot.getSelectedRangeLast();
1059
+ const {
1060
+ to
1061
+ } = selectedRange;
1062
+ const nextTo = this.hot._createCellCoords(to.row + delta.row, to.col + delta.col);
1063
+ const mergedParentCurrent = this.mergedCellsCollection.get(to.row, to.col);
1064
+ const mergedParentNext = this.mergedCellsCollection.get(nextTo.row, nextTo.col);
1065
+ if (!(mergedParentCurrent && mergedParentNext && mergedParentCurrent === mergedParentNext)) {
1066
+ return;
1084
1067
  }
1085
- if (newDelta.row !== 0) {
1086
- delta.row = newDelta.row;
1068
+ const visualColumnIndexStart = mergedParentCurrent.col;
1069
+ const visualColumnIndexEnd = mergedParentCurrent.col + mergedParentCurrent.colspan - 1;
1070
+ if (delta.col < 0) {
1071
+ const nextColumn = nextTo.col >= visualColumnIndexStart && nextTo.col <= visualColumnIndexEnd ? visualColumnIndexStart - 1 : visualColumnIndexEnd;
1072
+ const notHiddenColumnIndex = this.hot.columnIndexMapper.getNearestNotHiddenIndex(nextColumn, -1);
1073
+ if (notHiddenColumnIndex === null) {
1074
+ // There are no visible columns anymore, so move the selection out of the table edge. This will
1075
+ // be processed by the selection Transformer class as a move selection to the previous row (if autoWrapRow is enabled).
1076
+ delta.col = -this.hot.view.countRenderableColumnsInRange(0, to.col);
1077
+ } else {
1078
+ delta.col = -Math.max(this.hot.view.countRenderableColumnsInRange(notHiddenColumnIndex, to.col) - 1, 1);
1079
+ }
1080
+ } else if (delta.col > 0) {
1081
+ const nextColumn = nextTo.col >= visualColumnIndexStart && nextTo.col <= visualColumnIndexEnd ? visualColumnIndexEnd + 1 : visualColumnIndexStart;
1082
+ const notHiddenColumnIndex = this.hot.columnIndexMapper.getNearestNotHiddenIndex(nextColumn, 1);
1083
+ if (notHiddenColumnIndex === null) {
1084
+ // There are no visible columns anymore, so move the selection out of the table edge. This will
1085
+ // be processed by the selection Transformer class as a move selection to the next row (if autoWrapRow is enabled).
1086
+ delta.col = this.hot.view.countRenderableColumnsInRange(to.col, this.hot.countCols());
1087
+ } else {
1088
+ delta.col = Math.max(this.hot.view.countRenderableColumnsInRange(to.col, notHiddenColumnIndex) - 1, 1);
1089
+ }
1087
1090
  }
1088
- if (newDelta.col !== 0) {
1089
- delta.col = newDelta.col;
1091
+ const visualRowIndexStart = mergedParentCurrent.row;
1092
+ const visualRowIndexEnd = mergedParentCurrent.row + mergedParentCurrent.rowspan - 1;
1093
+ if (delta.row < 0) {
1094
+ const nextRow = nextTo.row >= visualRowIndexStart && nextTo.row <= visualRowIndexEnd ? visualRowIndexStart - 1 : visualRowIndexEnd;
1095
+ const notHiddenRowIndex = this.hot.rowIndexMapper.getNearestNotHiddenIndex(nextRow, -1);
1096
+ if (notHiddenRowIndex === null) {
1097
+ // There are no visible rows anymore, so move the selection out of the table edge. This will
1098
+ // be processed by the selection Transformer class as a move selection to the previous column (if autoWrapCol is enabled).
1099
+ delta.row = -this.hot.view.countRenderableRowsInRange(0, to.row);
1100
+ } else {
1101
+ delta.row = -Math.max(this.hot.view.countRenderableRowsInRange(notHiddenRowIndex, to.row) - 1, 1);
1102
+ }
1103
+ } else if (delta.row > 0) {
1104
+ const nextRow = nextTo.row >= visualRowIndexStart && nextTo.row <= visualRowIndexEnd ? visualRowIndexEnd + 1 : visualRowIndexStart;
1105
+ const notHiddenRowIndex = this.hot.rowIndexMapper.getNearestNotHiddenIndex(nextRow, 1);
1106
+ if (notHiddenRowIndex === null) {
1107
+ // There are no visible rows anymore, so move the selection out of the table edge. This will
1108
+ // be processed by the selection Transformer class as a move selection to the next column (if autoWrapCol is enabled).
1109
+ delta.row = this.hot.view.countRenderableRowsInRange(to.row, this.hot.countRows());
1110
+ } else {
1111
+ delta.row = Math.max(this.hot.view.countRenderableRowsInRange(to.row, notHiddenRowIndex) - 1, 1);
1112
+ }
1090
1113
  }
1091
1114
  }
1092
- function _onModifyTransformEnd2(delta) {
1093
- const currentSelectionRange = this.hot.getSelectedRangeLast();
1094
- const newDelta = clone(delta);
1095
- const newSelectionRange = this.selectionCalculations.getUpdatedSelectionRange(currentSelectionRange, delta);
1096
- let tempDelta = clone(newDelta);
1097
- const mergedCellsWithinRange = this.mergedCellsCollection.getWithinRange(newSelectionRange, true);
1098
- do {
1099
- tempDelta = clone(newDelta);
1100
- this.selectionCalculations.getUpdatedSelectionRange(currentSelectionRange, newDelta);
1101
- arrayEach(mergedCellsWithinRange, mergedCell => {
1102
- this.selectionCalculations.snapDelta(newDelta, currentSelectionRange, mergedCell);
1103
- });
1104
- } while (newDelta.row !== tempDelta.row || newDelta.col !== tempDelta.col);
1105
- delta.row = newDelta.row;
1106
- delta.col = newDelta.col;
1115
+ function _onBeforeSelectionHighlightSet2() {
1116
+ if (this.hot.selection.isSelectedByColumnHeader() || this.hot.selection.isSelectedByRowHeader()) {
1117
+ return;
1118
+ }
1119
+ const selectedRange = this.hot.getSelectedRangeLast();
1120
+ const {
1121
+ highlight
1122
+ } = selectedRange;
1123
+ for (let i = 0; i < this.mergedCellsCollection.mergedCells.length; i += 1) {
1124
+ const cellInfo = this.mergedCellsCollection.mergedCells[i];
1125
+ selectedRange.expandByRange(cellInfo.getRange());
1126
+ }
1127
+ const mergedParent = this.mergedCellsCollection.get(highlight.row, highlight.col);
1128
+ _classPrivateFieldSet(this, _lastSelectedCoords, highlight.clone());
1129
+ if (mergedParent) {
1130
+ highlight.assign(mergedParent);
1131
+ }
1107
1132
  }
1108
1133
  function _onModifyGetCellCoords2(row, column) {
1109
1134
  if (row < 0 || column < 0) {
@@ -1162,37 +1187,8 @@ function _onAfterRenderer2(TD, row, col) {
1162
1187
  }
1163
1188
  applySpanProperties(TD, mergedCellCopy, row, col);
1164
1189
  }
1165
- function _onBeforeSetRangeStart2(coords) {
1166
- // TODO: It is a workaround, but probably this hook may be needed. Every selection on the merge area
1167
- // could set start point of the selection to the start of the merge area. However, logic inside `expandByRange` need
1168
- // an initial start point. Click on the merge cell when there are some hidden indexes break the logic in some cases.
1169
- // Please take a look at #7010 for more information. I'm not sure if selection directions are calculated properly
1170
- // and what was idea for flipping direction inside `expandByRange` method.
1171
- if (this.mergedCellsCollection.isFirstRenderableMergedCell(coords.row, coords.col)) {
1172
- const mergeParent = this.mergedCellsCollection.get(coords.row, coords.col);
1173
- [coords.row, coords.col] = [mergeParent.row, mergeParent.col];
1174
- }
1175
- }
1176
- function _onBeforeSetRangeEnd2(coords) {
1177
- const selRange = this.hot.getSelectedRangeLast();
1178
- selRange.highlight = this.hot._createCellCoords(selRange.highlight.row, selRange.highlight.col); // clone in case we will modify its reference
1179
- selRange.to = coords;
1180
- let rangeExpanded = false;
1181
- if (this.hot.selection.isSelectedByColumnHeader() || this.hot.selection.isSelectedByRowHeader()) {
1182
- return;
1183
- }
1184
- do {
1185
- rangeExpanded = false;
1186
- for (let i = 0; i < this.mergedCellsCollection.mergedCells.length; i += 1) {
1187
- const cellInfo = this.mergedCellsCollection.mergedCells[i];
1188
- const mergedCellRange = cellInfo.getRange();
1189
- if (selRange.expandByRange(mergedCellRange)) {
1190
- coords.row = selRange.to.row;
1191
- coords.col = selRange.to.col;
1192
- rangeExpanded = true;
1193
- }
1194
- }
1195
- } while (rangeExpanded);
1190
+ function _onBeforeSetRangeStart2() {
1191
+ _classPrivateFieldSet(this, _lastSelectedCoords, null);
1196
1192
  }
1197
1193
  function _onAfterGetCellMeta2(row, col, cellProperties) {
1198
1194
  const mergeParent = this.mergedCellsCollection.get(row, col);
@@ -1272,27 +1268,6 @@ function _onBeforeDrawAreaBorders2(corners, className) {
1272
1268
  });
1273
1269
  }
1274
1270
  }
1275
- function _onAfterModifyTransformStart2(coords, rowTransformDir, colTransformDir) {
1276
- if (!this.enabled) {
1277
- return;
1278
- }
1279
- const mergedCellAtCoords = this.mergedCellsCollection.get(coords.row, coords.col);
1280
- if (!mergedCellAtCoords) {
1281
- return;
1282
- }
1283
- const goingDown = rowTransformDir > 0;
1284
- const goingUp = rowTransformDir < 0;
1285
- const goingLeft = colTransformDir < 0;
1286
- const goingRight = colTransformDir > 0;
1287
- const mergedCellOnBottomEdge = mergedCellAtCoords.row + mergedCellAtCoords.rowspan - 1 === this.hot.countRows() - 1;
1288
- const mergedCellOnTopEdge = mergedCellAtCoords.row === 0;
1289
- const mergedCellOnRightEdge = mergedCellAtCoords.col + mergedCellAtCoords.colspan - 1 === this.hot.countCols() - 1;
1290
- const mergedCellOnLeftEdge = mergedCellAtCoords.col === 0;
1291
- if (goingDown && mergedCellOnBottomEdge || goingUp && mergedCellOnTopEdge || goingRight && mergedCellOnRightEdge || goingLeft && mergedCellOnLeftEdge) {
1292
- coords.row = mergedCellAtCoords.row;
1293
- coords.col = mergedCellAtCoords.col;
1294
- }
1295
- }
1296
1271
  function _onAfterDrawSelection2(currentRow, currentColumn, cornersOfSelection, layerLevel) {
1297
1272
  // Nothing's selected (hook might be triggered by the custom borders)
1298
1273
  if (!cornersOfSelection) {
@@ -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];