handsontable 0.0.0-next-8dc7078-20240322 → 0.0.0-next-28fc088-20240325

Sign up to get free protection for your applications and to get access to all the features.

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 +2 -1
  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 +76 -21
  12. package/core.mjs +76 -21
  13. package/dist/handsontable.css +2 -2
  14. package/dist/handsontable.full.css +2 -2
  15. package/dist/handsontable.full.js +2649 -1389
  16. package/dist/handsontable.full.min.css +2 -2
  17. package/dist/handsontable.full.min.js +71 -71
  18. package/dist/handsontable.js +2653 -1393
  19. package/dist/handsontable.min.css +2 -2
  20. package/dist/handsontable.min.js +19 -19
  21. package/editorManager.js +12 -8
  22. package/editorManager.mjs +12 -8
  23. package/focusManager.js +7 -1
  24. package/focusManager.mjs +7 -1
  25. package/helpers/mixed.js +1 -1
  26. package/helpers/mixed.mjs +1 -1
  27. package/package.json +1 -1
  28. package/pluginHooks.d.ts +4 -0
  29. package/pluginHooks.js +98 -37
  30. package/pluginHooks.mjs +98 -37
  31. package/plugins/collapsibleColumns/collapsibleColumns.js +9 -3
  32. package/plugins/collapsibleColumns/collapsibleColumns.mjs +9 -3
  33. package/plugins/columnSorting/columnSorting.js +8 -2
  34. package/plugins/columnSorting/columnSorting.mjs +8 -2
  35. package/plugins/contextMenu/menu/defaultShortcutsList.js +26 -10
  36. package/plugins/contextMenu/menu/defaultShortcutsList.mjs +26 -10
  37. package/plugins/mergeCells/calculations/selection.js +1 -70
  38. package/plugins/mergeCells/calculations/selection.mjs +1 -70
  39. package/plugins/mergeCells/cellsCollection.js +116 -0
  40. package/plugins/mergeCells/cellsCollection.mjs +116 -0
  41. package/plugins/mergeCells/contextMenuItem/toggleMerge.js +11 -1
  42. package/plugins/mergeCells/contextMenuItem/toggleMerge.mjs +11 -1
  43. package/plugins/mergeCells/focusOrder.js +305 -0
  44. package/plugins/mergeCells/focusOrder.mjs +300 -0
  45. package/plugins/mergeCells/mergeCells.js +336 -192
  46. package/plugins/mergeCells/mergeCells.mjs +336 -192
  47. package/plugins/multiColumnSorting/multiColumnSorting.js +8 -2
  48. package/plugins/multiColumnSorting/multiColumnSorting.mjs +8 -2
  49. package/plugins/nestedHeaders/nestedHeaders.js +1 -0
  50. package/plugins/nestedHeaders/nestedHeaders.mjs +1 -0
  51. package/plugins/nestedRows/nestedRows.js +9 -3
  52. package/plugins/nestedRows/nestedRows.mjs +9 -3
  53. package/renderers/checkboxRenderer/checkboxRenderer.js +8 -5
  54. package/renderers/checkboxRenderer/checkboxRenderer.mjs +8 -5
  55. package/selection/highlight/visualSelection.js +2 -0
  56. package/selection/highlight/visualSelection.mjs +2 -0
  57. package/selection/selection.js +209 -40
  58. package/selection/selection.mjs +208 -39
  59. package/selection/transformation.js +83 -32
  60. package/selection/transformation.mjs +83 -32
  61. package/shortcutContexts/commands/editor/closeAndSave.js +2 -2
  62. package/shortcutContexts/commands/editor/closeAndSave.mjs +2 -2
  63. package/shortcutContexts/commands/editor/open.js +18 -3
  64. package/shortcutContexts/commands/editor/open.mjs +18 -3
  65. package/shortcutContexts/commands/extendCellsSelection/down.js +1 -1
  66. package/shortcutContexts/commands/extendCellsSelection/down.mjs +1 -1
  67. package/shortcutContexts/commands/extendCellsSelection/left.js +1 -1
  68. package/shortcutContexts/commands/extendCellsSelection/left.mjs +1 -1
  69. package/shortcutContexts/commands/extendCellsSelection/right.js +1 -1
  70. package/shortcutContexts/commands/extendCellsSelection/right.mjs +1 -1
  71. package/shortcutContexts/commands/extendCellsSelection/toColumns.js +1 -1
  72. package/shortcutContexts/commands/extendCellsSelection/toColumns.mjs +1 -1
  73. package/shortcutContexts/commands/extendCellsSelection/toMostBottom.js +3 -1
  74. package/shortcutContexts/commands/extendCellsSelection/toMostBottom.mjs +3 -1
  75. package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.js +9 -3
  76. package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.mjs +9 -3
  77. package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.js +10 -3
  78. package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.mjs +10 -3
  79. package/shortcutContexts/commands/extendCellsSelection/toMostLeft.js +3 -1
  80. package/shortcutContexts/commands/extendCellsSelection/toMostLeft.mjs +3 -1
  81. package/shortcutContexts/commands/extendCellsSelection/toMostRight.js +3 -1
  82. package/shortcutContexts/commands/extendCellsSelection/toMostRight.mjs +3 -1
  83. package/shortcutContexts/commands/extendCellsSelection/toMostTop.js +3 -1
  84. package/shortcutContexts/commands/extendCellsSelection/toMostTop.mjs +3 -1
  85. package/shortcutContexts/commands/extendCellsSelection/toRows.js +1 -1
  86. package/shortcutContexts/commands/extendCellsSelection/toRows.mjs +1 -1
  87. package/shortcutContexts/commands/extendCellsSelection/up.js +1 -1
  88. package/shortcutContexts/commands/extendCellsSelection/up.mjs +1 -1
  89. package/shortcutContexts/commands/moveCellSelection/inlineEnd.js +6 -1
  90. package/shortcutContexts/commands/moveCellSelection/inlineEnd.mjs +6 -1
  91. package/shortcutContexts/commands/moveCellSelection/inlineStart.js +6 -1
  92. package/shortcutContexts/commands/moveCellSelection/inlineStart.mjs +6 -1
  93. package/shortcutContexts/grid.js +2 -2
  94. package/shortcutContexts/grid.mjs +2 -2
  95. package/shortcuts/context.js +2 -1
  96. package/shortcuts/context.mjs +2 -1
  97. package/utils/dataStructures/linkedList.js +6 -1
  98. package/utils/dataStructures/linkedList.mjs +6 -1
package/editorManager.js CHANGED
@@ -310,18 +310,22 @@ class EditorManager {
310
310
  }
311
311
 
312
312
  /**
313
- * Controls selection's behaviour after clicking `Enter`.
313
+ * Controls selection's behavior after clicking `Enter`.
314
314
  *
315
315
  * @private
316
- * @param {boolean} isShiftPressed If `true`, then the selection will move up after hit enter.
316
+ * @param {KeyboardEvent} event The keyboard event object.
317
317
  */
318
- moveSelectionAfterEnter(isShiftPressed) {
319
- const enterMoves = typeof this.tableMeta.enterMoves === 'function' ? this.tableMeta.enterMoves(event) : this.tableMeta.enterMoves;
320
- if (isShiftPressed) {
321
- // move selection up
322
- this.selection.transformStart(-enterMoves.row, -enterMoves.col);
318
+ moveSelectionAfterEnter(event) {
319
+ const enterMoves = {
320
+ ...(typeof this.tableMeta.enterMoves === 'function' ? this.tableMeta.enterMoves(event) : this.tableMeta.enterMoves)
321
+ };
322
+ if (event.shiftKey) {
323
+ enterMoves.row = -enterMoves.row;
324
+ enterMoves.col = -enterMoves.col;
325
+ }
326
+ if (this.hot.selection.isMultiple()) {
327
+ this.selection.transformFocus(enterMoves.row, enterMoves.col);
323
328
  } else {
324
- // move selection down (add a new row if needed)
325
329
  this.selection.transformStart(enterMoves.row, enterMoves.col, true);
326
330
  }
327
331
  }
package/editorManager.mjs CHANGED
@@ -306,18 +306,22 @@ class EditorManager {
306
306
  }
307
307
 
308
308
  /**
309
- * Controls selection's behaviour after clicking `Enter`.
309
+ * Controls selection's behavior after clicking `Enter`.
310
310
  *
311
311
  * @private
312
- * @param {boolean} isShiftPressed If `true`, then the selection will move up after hit enter.
312
+ * @param {KeyboardEvent} event The keyboard event object.
313
313
  */
314
- moveSelectionAfterEnter(isShiftPressed) {
315
- const enterMoves = typeof this.tableMeta.enterMoves === 'function' ? this.tableMeta.enterMoves(event) : this.tableMeta.enterMoves;
316
- if (isShiftPressed) {
317
- // move selection up
318
- this.selection.transformStart(-enterMoves.row, -enterMoves.col);
314
+ moveSelectionAfterEnter(event) {
315
+ const enterMoves = {
316
+ ...(typeof this.tableMeta.enterMoves === 'function' ? this.tableMeta.enterMoves(event) : this.tableMeta.enterMoves)
317
+ };
318
+ if (event.shiftKey) {
319
+ enterMoves.row = -enterMoves.row;
320
+ enterMoves.col = -enterMoves.col;
321
+ }
322
+ if (this.hot.selection.isMultiple()) {
323
+ this.selection.transformFocus(enterMoves.row, enterMoves.col);
319
324
  } else {
320
- // move selection down (add a new row if needed)
321
325
  this.selection.transformStart(enterMoves.row, enterMoves.col, true);
322
326
  }
323
327
  }
package/focusManager.js CHANGED
@@ -92,10 +92,16 @@ class FocusManager {
92
92
  }
93
93
  return _assertClassBrand(_FocusManager_brand, _this, _focusCell).call(_this, ...args);
94
94
  });
95
- _classPrivateFieldGet(_hot, this).addHook('afterSelectionEnd', function () {
95
+ _classPrivateFieldGet(_hot, this).addHook('afterSelectionFocusSet', function () {
96
96
  for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
97
97
  args[_key3] = arguments[_key3];
98
98
  }
99
+ return _assertClassBrand(_FocusManager_brand, _this, _focusCell).call(_this, ...args);
100
+ });
101
+ _classPrivateFieldGet(_hot, this).addHook('afterSelectionEnd', function () {
102
+ for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
103
+ args[_key4] = arguments[_key4];
104
+ }
99
105
  return _assertClassBrand(_FocusManager_brand, _this, _focusEditorElement).call(_this, ...args);
100
106
  });
101
107
  }
package/focusManager.mjs CHANGED
@@ -89,10 +89,16 @@ export class FocusManager {
89
89
  }
90
90
  return _assertClassBrand(_FocusManager_brand, _this, _focusCell).call(_this, ...args);
91
91
  });
92
- _classPrivateFieldGet(_hot, this).addHook('afterSelectionEnd', function () {
92
+ _classPrivateFieldGet(_hot, this).addHook('afterSelectionFocusSet', function () {
93
93
  for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
94
94
  args[_key3] = arguments[_key3];
95
95
  }
96
+ return _assertClassBrand(_FocusManager_brand, _this, _focusCell).call(_this, ...args);
97
+ });
98
+ _classPrivateFieldGet(_hot, this).addHook('afterSelectionEnd', function () {
99
+ for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
100
+ args[_key4] = arguments[_key4];
101
+ }
96
102
  return _assertClassBrand(_FocusManager_brand, _this, _focusEditorElement).call(_this, ...args);
97
103
  });
98
104
  }
package/helpers/mixed.js CHANGED
@@ -134,7 +134,7 @@ const domMessages = {
134
134
  function _injectProductInfo(key, element) {
135
135
  const hasValidType = !isEmpty(key);
136
136
  const isNonCommercial = typeof key === 'string' && key.toLowerCase() === 'non-commercial-and-evaluation';
137
- const hotVersion = "0.0.0-next-8dc7078-20240322";
137
+ const hotVersion = "0.0.0-next-28fc088-20240325";
138
138
  let keyValidityDate;
139
139
  let consoleMessageState = 'invalid';
140
140
  let domMessageState = 'invalid';
package/helpers/mixed.mjs CHANGED
@@ -124,7 +124,7 @@ const domMessages = {
124
124
  export function _injectProductInfo(key, element) {
125
125
  const hasValidType = !isEmpty(key);
126
126
  const isNonCommercial = typeof key === 'string' && key.toLowerCase() === 'non-commercial-and-evaluation';
127
- const hotVersion = "0.0.0-next-8dc7078-20240322";
127
+ const hotVersion = "0.0.0-next-28fc088-20240325";
128
128
  let keyValidityDate;
129
129
  let consoleMessageState = 'invalid';
130
130
  let domMessageState = 'invalid';
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "url": "https://github.com/handsontable/handsontable/issues"
11
11
  },
12
12
  "author": "Handsoncode <hello@handsontable.com>",
13
- "version": "0.0.0-next-8dc7078-20240322",
13
+ "version": "0.0.0-next-28fc088-20240325",
14
14
  "main": "index",
15
15
  "module": "index.mjs",
16
16
  "jsnext:main": "index.mjs",
package/pluginHooks.d.ts CHANGED
@@ -98,6 +98,7 @@ export interface Events {
98
98
  afterLoadData?: (sourceData: CellValue[], initialLoad: boolean, source: string | undefined) => void;
99
99
  afterMergeCells?: (cellRange: CellRange, mergeParent: MergeCellsSettings, auto: boolean) => void;
100
100
  afterModifyTransformEnd?: (coords: CellCoords, rowTransformDir: -1 | 0, colTransformDir: -1 | 0) => void;
101
+ afterModifyTransformFocus?: (coords: CellCoords, rowTransformDir: -1 | 0, colTransformDir: -1 | 0) => void;
101
102
  afterModifyTransformStart?: (coords: CellCoords, rowTransformDir: -1 | 0, colTransformDir: -1 | 0) => void;
102
103
  afterMomentumScroll?: () => void;
103
104
  afterNamedExpressionAdded?: (namedExpressionName: string, changes: ExportedChange[]) => void;
@@ -130,6 +131,7 @@ export interface Events {
130
131
  afterSelectionByProp?: (row: number, prop: string, row2: number, prop2: string, preventScrolling: { value: boolean }, selectionLayerLevel: number) => void;
131
132
  afterSelectionEnd?: (row: number, column: number, row2: number, column2: number, selectionLayerLevel: number) => void;
132
133
  afterSelectionEndByProp?: (row: number, prop: string, row2: number, prop2: string, selectionLayerLevel: number) => void;
134
+ afterSelectionFocusSet?: (row: number, column: number, preventScrolling: { value: boolean }) => void;
133
135
  afterSelectRows?: (from: CellCoords, to: CellCoords, highlight: CellCoords) => void;
134
136
  afterSetCellMeta?: (row: number, column: number, key: string, value: any) => void;
135
137
  afterSetDataAtCell?: (changes: CellChange[], source?: ChangeSource) => void;
@@ -208,6 +210,7 @@ export interface Events {
208
210
  beforeRowResize?: (newSize: number, row: number, isDoubleClick: boolean) => number | void;
209
211
  beforeRowWrap?: (isActionInterrupted: { value: boolean }, newCoords: CellCoords, isRowFlipped: boolean) => void;
210
212
  beforeSelectColumns?: (from: CellCoords, to: CellCoords, highlight: CellCoords) => void;
213
+ beforeSelectionFocusSet?: (coords: CellCoords) => void;
211
214
  beforeSelectionHighlightSet?: () => void;
212
215
  beforeSelectRows?: (from: CellCoords, to: CellCoords, highlight: CellCoords) => void;
213
216
  beforeSetCellMeta?: (row: number, column: number, key: string, value: any) => boolean | void;
@@ -250,6 +253,7 @@ export interface Events {
250
253
  modifyRowHeight?: (height: number, row: number) => void;
251
254
  modifySourceData?: (row: number, column: number, valueHolder: { value: CellValue }, ioMode: 'get' | 'set') => void;
252
255
  modifyTransformEnd?: (delta: CellCoords) => void;
256
+ modifyTransformFocus?: (delta: CellCoords) => void;
253
257
  modifyTransformStart?: (delta: CellCoords) => void;
254
258
  persistentStateLoad?: (key: string, valuePlaceholder: { value: any }) => void;
255
259
  persistentStateReset?: (key: string) => void;
package/pluginHooks.js CHANGED
@@ -134,7 +134,7 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
134
134
  'afterCellMetaReset',
135
135
  /**
136
136
  * Fired after one or more cells has been changed. The changes are triggered in any situation when the
137
- * value is entered using an editor or changed using API (e.q setDataAtCell).
137
+ * value is entered using an editor or changed using API (e.q [`setDataAtCell`](@/api/core.md#setdataatcell) method).
138
138
  *
139
139
  * __Note:__ For performance reasons, the `changes` array is null for `"loadData"` source.
140
140
  *
@@ -177,7 +177,7 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
177
177
  'afterContextMenuDefaultOptions',
178
178
  /**
179
179
  * Fired each time user opens {@link ContextMenu} plugin before setting up the Context Menu's items but after filtering these options by
180
- * user (`contextMenu` option). This hook can by helpful to determine if user use specified menu item or to set up
180
+ * user ([`contextMenu`](@/api/options.md#contextmenu) option). This hook can by helpful to determine if user use specified menu item or to set up
181
181
  * one of the menu item to by always visible.
182
182
  *
183
183
  * @event Hooks#beforeContextMenuSetItems
@@ -195,7 +195,7 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
195
195
  'afterDropdownMenuDefaultOptions',
196
196
  /**
197
197
  * Fired by {@link DropdownMenu} plugin before setting up the Dropdown Menu's items but after filtering these options
198
- * by user (`dropdownMenu` option). This hook can by helpful to determine if user use specified menu item or to set
198
+ * by user ([`dropdownMenu`](@/api/options.md#dropdownmenu) option). This hook can by helpful to determine if user use specified menu item or to set
199
199
  * up one of the menu item to by always visible.
200
200
  *
201
201
  * @event Hooks#beforeDropdownMenuSetItems
@@ -322,7 +322,7 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
322
322
  */
323
323
  'afterDestroy',
324
324
  /**
325
- * Hook fired after keydown event is handled.
325
+ * Hook fired after `keydown` event is handled.
326
326
  *
327
327
  * @event Hooks#afterDocumentKeyDown
328
328
  * @param {Event} event A native `keydown` event object.
@@ -414,7 +414,7 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
414
414
  */
415
415
  'afterUpdateData',
416
416
  /**
417
- * Fired after a scroll event, which is identified as a momentum scroll (e.g. On an iPad).
417
+ * Fired after a scroll event, which is identified as a momentum scroll (e.g. on an iPad).
418
418
  *
419
419
  * @event Hooks#afterMomentumScroll
420
420
  */
@@ -598,7 +598,7 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
598
598
  */
599
599
  'afterScroll',
600
600
  /**
601
- * Fired after one or more cells are selected (e.g. During mouse move).
601
+ * Fired after one or more cells are selected (e.g. during mouse move).
602
602
  *
603
603
  * @event Hooks#afterSelection
604
604
  * @param {number} row Selection start visual row index.
@@ -650,7 +650,9 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
650
650
  * @param {string} prop Selection start data source object property name.
651
651
  * @param {number} row2 Selection end visual row index.
652
652
  * @param {string} prop2 Selection end data source object property name.
653
- * @param {object} preventScrolling Object with `value` property where its value change will be observed.
653
+ * @param {object} preventScrolling A reference to the observable object with the `value` property.
654
+ * Property `preventScrolling.value` expects a boolean value that
655
+ * Handsontable uses to control scroll behavior after selection.
654
656
  * @param {number} selectionLayerLevel The number which indicates what selection layer is currently modified.
655
657
  * @example
656
658
  * ```js
@@ -677,7 +679,7 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
677
679
  */
678
680
  'afterSelectionByProp',
679
681
  /**
680
- * Fired after one or more cells are selected (e.g. On mouse up).
682
+ * Fired after one or more cells are selected (e.g. on mouse up).
681
683
  *
682
684
  * @event Hooks#afterSelectionEnd
683
685
  * @param {number} row Selection start visual row index.
@@ -688,7 +690,7 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
688
690
  */
689
691
  'afterSelectionEnd',
690
692
  /**
691
- * Fired after one or more cells are selected (e.g. On mouse up).
693
+ * Fired after one or more cells are selected (e.g. on mouse up).
692
694
  *
693
695
  * The `prop` and `prop2` arguments represent the source object property name instead of the column number.
694
696
  *
@@ -700,6 +702,46 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
700
702
  * @param {number} selectionLayerLevel The number which indicates what selection layer is currently modified.
701
703
  */
702
704
  'afterSelectionEndByProp',
705
+ /**
706
+ * Fired after the focus position within a selected range is changed.
707
+ *
708
+ * @since 14.3.0
709
+ * @event Hooks#afterSelectionFocusSet
710
+ * @param {number} row The focus visual row index position.
711
+ * @param {number} column The focus visual column index position.
712
+ * @param {object} preventScrolling A reference to the observable object with the `value` property.
713
+ * Property `preventScrolling.value` expects a boolean value that
714
+ * Handsontable uses to control scroll behavior after selection.
715
+ * @example
716
+ * ```js
717
+ * ::: only-for javascript
718
+ * new Handsontable(element, {
719
+ * afterSelectionFocusSet: (row, column, preventScrolling) => {
720
+ * // If set to `false` (default): when focused cell selection is outside the viewport,
721
+ * // Handsontable scrolls the viewport to that cell.
722
+ * // If set to `true`: when focused cell selection is outside the viewport,
723
+ * // Handsontable doesn't scroll the viewport.
724
+ * preventScrolling.value = true;
725
+ * }
726
+ * })
727
+ * ```
728
+ * :::
729
+ *
730
+ * ::: only-for react
731
+ * ```jsx
732
+ * <HotTable
733
+ * afterSelectionFocusSet={(row, column, preventScrolling) => {
734
+ * // If set to `false` (default): when focused cell selection is outside the viewport,
735
+ * // Handsontable scrolls the viewport to that cell.
736
+ * // If set to `true`: when focused cell selection is outside the viewport,
737
+ * // Handsontable doesn't scroll the viewport.
738
+ * preventScrolling.value = true;
739
+ * }}
740
+ * />
741
+ * ```
742
+ * :::
743
+ */
744
+ 'afterSelectionFocusSet',
703
745
  /**
704
746
  * Fired before one or more columns are selected (e.g. During mouse header click or {@link Core#selectColumns} API call).
705
747
  *
@@ -735,7 +777,7 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
735
777
  */
736
778
  'beforeSelectColumns',
737
779
  /**
738
- * Fired after one or more columns are selected (e.g. During mouse header click or {@link Core#selectColumns} API call).
780
+ * Fired after one or more columns are selected (e.g. during mouse header click or {@link Core#selectColumns} API call).
739
781
  *
740
782
  * @since 14.0.0
741
783
  * @event Hooks#afterSelectColumns
@@ -745,7 +787,7 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
745
787
  */
746
788
  'afterSelectColumns',
747
789
  /**
748
- * Fired before one or more rows are selected (e.g. During mouse header click or {@link Core#selectRows} API call).
790
+ * Fired before one or more rows are selected (e.g. during mouse header click or {@link Core#selectRows} API call).
749
791
  *
750
792
  * @since 14.0.0
751
793
  * @event Hooks#beforeSelectRows
@@ -779,7 +821,7 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
779
821
  */
780
822
  'beforeSelectRows',
781
823
  /**
782
- * Fired after one or more rows are selected (e.g. During mouse header click or {@link Core#selectRows} API call).
824
+ * Fired after one or more rows are selected (e.g. during mouse header click or {@link Core#selectRows} API call).
783
825
  *
784
826
  * @since 14.0.0
785
827
  * @event Hooks#afterSelectRows
@@ -819,7 +861,7 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
819
861
  'afterSetDataAtCell',
820
862
  /**
821
863
  * Fired after cell data was changed.
822
- * Called only when `setDataAtRowProp` was executed.
864
+ * Called only when [`setDataAtRowProp`](@/api/core.md#setdataatrowprop) was executed.
823
865
  *
824
866
  * @event Hooks#afterSetDataAtRowProp
825
867
  * @param {Array} changes An array of changes in format `[[row, prop, oldValue, value], ...]`.
@@ -837,7 +879,7 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
837
879
  */
838
880
  'afterSetSourceDataAtCell',
839
881
  /**
840
- * Fired after calling the `updateSettings` method.
882
+ * Fired after calling the [`updateSettings`](@/api/core.md#updatesettings) method.
841
883
  *
842
884
  * @event Hooks#afterUpdateSettings
843
885
  * @param {object} newSettings New settings object.
@@ -887,7 +929,7 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
887
929
  * @param {string} direction Declares the direction of the autofill. Possible values: `up`, `down`, `left`, `right`.
888
930
  *
889
931
  * @returns {boolean|Array[]} If false, the operation is cancelled. If array of arrays, the returned data
890
- * will be passed into `populateFromArray` instead of the default autofill
932
+ * will be passed into [`populateFromArray`](@/api/core.md#populatefromarray) instead of the default autofill
891
933
  * algorithm's result.
892
934
  */
893
935
  'beforeAutofill',
@@ -909,17 +951,10 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
909
951
  *
910
952
  * @event Hooks#beforeCellAlignment
911
953
  * @param {object} stateBefore An object with class names defining the cell alignment.
912
- * @param {CellRange[]} range An array of CellRange coordinates where the alignment will be applied.
954
+ * @param {CellRange[]} range An array of `CellRange` coordinates where the alignment will be applied.
913
955
  * @param {string} type Type of the alignment - either `horizontal` or `vertical`.
914
956
  * @param {string} alignmentClass String defining the alignment class added to the cell.
915
- * Possible values:
916
- * * `htLeft`
917
- * * `htCenter`
918
- * * `htRight`
919
- * * `htJustify`
920
- * * `htTop`
921
- * * `htMiddle`
922
- * * `htBottom`.
957
+ * Possible values: `htLeft` , `htCenter`, `htRight`, `htJustify`, `htTop`, `htMiddle`, `htBottom`.
923
958
  */
924
959
  'beforeCellAlignment',
925
960
  /**
@@ -1080,7 +1115,7 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
1080
1115
  */
1081
1116
  'beforeUpdateData',
1082
1117
  /**
1083
- * Hook fired before keydown event is handled. It can be used to stop default key bindings.
1118
+ * Hook fired before `keydown` event is handled. It can be used to stop default key bindings.
1084
1119
  *
1085
1120
  * __Note__: To prevent default behavior you need to call `false` in your `beforeKeyDown` handler.
1086
1121
  *
@@ -1254,25 +1289,33 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
1254
1289
  * @returns {boolean|undefined} If false is returned the action is canceled.
1255
1290
  */
1256
1291
  'beforeSetCellMeta',
1292
+ /**
1293
+ * Fired before setting focus selection.
1294
+ *
1295
+ * @since 14.3.0
1296
+ * @event Hooks#beforeSelectionFocusSet
1297
+ * @param {CellCoords} coords CellCoords instance.
1298
+ */
1299
+ 'beforeSelectionFocusSet',
1257
1300
  /**
1258
1301
  * Fired before setting range is started but not finished yet.
1259
1302
  *
1260
1303
  * @event Hooks#beforeSetRangeStartOnly
1261
- * @param {CellCoords} coords CellCoords instance.
1304
+ * @param {CellCoords} coords `CellCoords` instance.
1262
1305
  */
1263
1306
  'beforeSetRangeStartOnly',
1264
1307
  /**
1265
1308
  * Fired before setting range is started.
1266
1309
  *
1267
1310
  * @event Hooks#beforeSetRangeStart
1268
- * @param {CellCoords} coords CellCoords instance.
1311
+ * @param {CellCoords} coords `CellCoords` instance.
1269
1312
  */
1270
1313
  'beforeSetRangeStart',
1271
1314
  /**
1272
1315
  * Fired before setting range is ended.
1273
1316
  *
1274
1317
  * @event Hooks#beforeSetRangeEnd
1275
- * @param {CellCoords} coords CellCoords instance.
1318
+ * @param {CellCoords} coords `CellCoords` instance.
1276
1319
  */
1277
1320
  'beforeSetRangeEnd',
1278
1321
  /**
@@ -1405,7 +1448,7 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
1405
1448
  */
1406
1449
  'modifyRowData',
1407
1450
  /**
1408
- * Used to modify the cell coordinates when using the `getCell` method, opening editor, getting value from the editor
1451
+ * Used to modify the cell coordinates when using the [`getCell`](@/api/core.md#getcell) method, opening editor, getting value from the editor
1409
1452
  * and saving values from the closed editor.
1410
1453
  *
1411
1454
  * @event Hooks#modifyGetCellCoords
@@ -2074,9 +2117,9 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
2074
2117
  * @event Hooks#modifyColumnHeaderValue
2075
2118
  * @param {string} value A column header value.
2076
2119
  * @param {number} visualColumnIndex A visual column index.
2077
- * @param {number} [headerLevel=0] Header level index. Accepts positive (0 to n)
2078
- * and negative (-1 to -n) values. For positive values, 0 points to the
2079
- * topmost header. For negative values, -1 points to the bottom-most
2120
+ * @param {number} [headerLevel=0] Header level index. Accepts positive (`0` to `n`)
2121
+ * and negative (`-1` to `-n`) values. For positive values, `0` points to the
2122
+ * topmost header. For negative values, `-1` points to the bottom-most
2080
2123
  * header (the header closest to the cells).
2081
2124
  * @returns {string} The column header value to be updated.
2082
2125
  */
@@ -2163,6 +2206,14 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
2163
2206
  * @param {number} rowHeaderWidth Row header width.
2164
2207
  */
2165
2208
  'modifyRowHeaderWidth',
2209
+ /**
2210
+ * Fired when the focus of the selection is being modified (e.g. Moving the focus with the enter/tab keys).
2211
+ *
2212
+ * @since 14.3.0
2213
+ * @event Hooks#modifyTransformFocus
2214
+ * @param {CellCoords} delta Cell coords object declaring the delta of the new selection relative to the previous one.
2215
+ */
2216
+ 'modifyTransformFocus',
2166
2217
  /**
2167
2218
  * Fired when the start of the selection is being modified (e.g. Moving the selection with the arrow keys).
2168
2219
  *
@@ -2177,6 +2228,16 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
2177
2228
  * @param {CellCoords} delta Cell coords object declaring the delta of the new selection relative to the previous one.
2178
2229
  */
2179
2230
  'modifyTransformEnd',
2231
+ /**
2232
+ * Fired after the focus of the selection is being modified (e.g. Moving the focus with the enter/tab keys).
2233
+ *
2234
+ * @since 14.3.0
2235
+ * @event Hooks#afterModifyTransformFocus
2236
+ * @param {CellCoords} coords Coords of the freshly focused cell.
2237
+ * @param {number} rowTransformDir `-1` if trying to focus a cell with a negative row index. `0` otherwise.
2238
+ * @param {number} colTransformDir `-1` if trying to focus a cell with a negative column index. `0` otherwise.
2239
+ */
2240
+ 'afterModifyTransformFocus',
2180
2241
  /**
2181
2242
  * Fired after the start of the selection is being modified (e.g. Moving the selection with the arrow keys).
2182
2243
  *
@@ -2352,7 +2413,7 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
2352
2413
  * option is enabled.
2353
2414
  *
2354
2415
  * @event Hooks#beforeDropdownMenuShow
2355
- * @param {DropdownMenu} dropdownMenu The DropdownMenu instance.
2416
+ * @param {DropdownMenu} dropdownMenu The `DropdownMenu` instance.
2356
2417
  */
2357
2418
  'beforeDropdownMenuShow',
2358
2419
  /**
@@ -2360,7 +2421,7 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
2360
2421
  * option is enabled.
2361
2422
  *
2362
2423
  * @event Hooks#afterDropdownMenuShow
2363
- * @param {DropdownMenu} dropdownMenu The DropdownMenu instance.
2424
+ * @param {DropdownMenu} dropdownMenu The `DropdownMenu` instance.
2364
2425
  */
2365
2426
  'afterDropdownMenuShow',
2366
2427
  /**
@@ -2368,11 +2429,11 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
2368
2429
  * option is enabled.
2369
2430
  *
2370
2431
  * @event Hooks#afterDropdownMenuHide
2371
- * @param {DropdownMenu} instance The DropdownMenu instance.
2432
+ * @param {DropdownMenu} instance The `DropdownMenu` instance.
2372
2433
  */
2373
2434
  'afterDropdownMenuHide',
2374
2435
  /**
2375
- * Fired by {@link NestedRows} plugin before adding a children to the NestedRows structure. This hook is fired when
2436
+ * Fired by {@link NestedRows} plugin before adding a children to the `NestedRows` structure. This hook is fired when
2376
2437
  * {@link Options#nestedRows} option is enabled.
2377
2438
  *
2378
2439
  * @event Hooks#beforeAddChild
@@ -2382,7 +2443,7 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
2382
2443
  */
2383
2444
  'beforeAddChild',
2384
2445
  /**
2385
- * Fired by {@link NestedRows} plugin after adding a children to the NestedRows structure. This hook is fired when
2446
+ * Fired by {@link NestedRows} plugin after adding a children to the `NestedRows` structure. This hook is fired when
2386
2447
  * {@link Options#nestedRows} option is enabled.
2387
2448
  *
2388
2449
  * @event Hooks#afterAddChild