handsontable 0.0.0-next-baf2fcf-20230809 → 0.0.0-next-be16baf-20230809

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 (299) hide show
  1. package/3rdparty/walkontable/src/cell/coords.d.ts +6 -1
  2. package/3rdparty/walkontable/src/cell/coords.js +50 -11
  3. package/3rdparty/walkontable/src/cell/coords.mjs +50 -11
  4. package/3rdparty/walkontable/src/cell/range.d.ts +9 -2
  5. package/3rdparty/walkontable/src/cell/range.js +38 -7
  6. package/3rdparty/walkontable/src/cell/range.mjs +38 -7
  7. package/3rdparty/walkontable/src/core/_base.js +9 -3
  8. package/3rdparty/walkontable/src/core/_base.mjs +9 -3
  9. package/3rdparty/walkontable/src/core/clone.js +2 -2
  10. package/3rdparty/walkontable/src/core/clone.mjs +2 -2
  11. package/3rdparty/walkontable/src/core/core.js +3 -2
  12. package/3rdparty/walkontable/src/core/core.mjs +3 -2
  13. package/3rdparty/walkontable/src/event.js +7 -7
  14. package/3rdparty/walkontable/src/event.mjs +7 -7
  15. package/3rdparty/walkontable/src/facade/core.js +2 -2
  16. package/3rdparty/walkontable/src/facade/core.mjs +2 -2
  17. package/3rdparty/walkontable/src/index.js +10 -2
  18. package/3rdparty/walkontable/src/index.mjs +2 -2
  19. package/3rdparty/walkontable/src/overlay/_base.js +1 -1
  20. package/3rdparty/walkontable/src/overlay/_base.mjs +1 -1
  21. package/3rdparty/walkontable/src/overlay/inlineStart.js +2 -6
  22. package/3rdparty/walkontable/src/overlay/inlineStart.mjs +2 -6
  23. package/3rdparty/walkontable/src/overlay/top.js +2 -6
  24. package/3rdparty/walkontable/src/overlay/top.mjs +2 -6
  25. package/3rdparty/walkontable/src/{border.js → selection/border/border.js} +7 -12
  26. package/3rdparty/walkontable/src/{border.mjs → selection/border/border.mjs} +7 -12
  27. package/3rdparty/walkontable/src/selection/border/constants.js +16 -0
  28. package/3rdparty/walkontable/src/selection/border/constants.mjs +12 -0
  29. package/3rdparty/walkontable/src/selection/constants.js +62 -0
  30. package/3rdparty/walkontable/src/selection/constants.mjs +51 -0
  31. package/3rdparty/walkontable/src/selection/index.js +26 -0
  32. package/3rdparty/walkontable/src/selection/index.mjs +5 -0
  33. package/3rdparty/walkontable/src/selection/manager.js +259 -0
  34. package/3rdparty/walkontable/src/selection/manager.mjs +254 -0
  35. package/3rdparty/walkontable/src/selection/scanner.js +270 -0
  36. package/3rdparty/walkontable/src/selection/scanner.mjs +267 -0
  37. package/3rdparty/walkontable/src/selection/selection.js +101 -0
  38. package/3rdparty/walkontable/src/selection/selection.mjs +96 -0
  39. package/3rdparty/walkontable/src/table/mixin/calculatedColumns.js +9 -0
  40. package/3rdparty/walkontable/src/table/mixin/calculatedColumns.mjs +9 -0
  41. package/3rdparty/walkontable/src/table/mixin/calculatedRows.js +9 -0
  42. package/3rdparty/walkontable/src/table/mixin/calculatedRows.mjs +9 -0
  43. package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.js +9 -0
  44. package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.mjs +9 -0
  45. package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.js +9 -0
  46. package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.mjs +9 -0
  47. package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.js +9 -0
  48. package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.mjs +9 -0
  49. package/3rdparty/walkontable/src/table.js +6 -78
  50. package/3rdparty/walkontable/src/table.mjs +7 -79
  51. package/base.js +2 -2
  52. package/base.mjs +2 -2
  53. package/common.d.ts +1 -1
  54. package/core/focusCatcher/focusDetector.js +58 -0
  55. package/core/focusCatcher/focusDetector.mjs +54 -0
  56. package/core/focusCatcher/index.js +142 -0
  57. package/core/focusCatcher/index.mjs +138 -0
  58. package/core/index.js +9 -0
  59. package/core/index.mjs +1 -0
  60. package/core.d.ts +6 -3
  61. package/core.js +176 -293
  62. package/core.mjs +176 -293
  63. package/dataMap/metaManager/metaSchema.js +41 -0
  64. package/dataMap/metaManager/metaSchema.mjs +41 -0
  65. package/dist/handsontable.css +24 -4
  66. package/dist/handsontable.full.css +24 -4
  67. package/dist/handsontable.full.js +8682 -5384
  68. package/dist/handsontable.full.min.css +3 -3
  69. package/dist/handsontable.full.min.js +25 -25
  70. package/dist/handsontable.js +10989 -7691
  71. package/dist/handsontable.min.css +3 -3
  72. package/dist/handsontable.min.js +19 -19
  73. package/editorManager.js +11 -75
  74. package/editorManager.mjs +11 -74
  75. package/editors/baseEditor/baseEditor.d.ts +0 -1
  76. package/editors/textEditor/textEditor.js +3 -11
  77. package/editors/textEditor/textEditor.mjs +4 -12
  78. package/helpers/mixed.js +1 -1
  79. package/helpers/mixed.mjs +1 -1
  80. package/helpers/number.d.ts +1 -0
  81. package/helpers/number.js +18 -0
  82. package/helpers/number.mjs +17 -0
  83. package/package.json +1 -1
  84. package/pluginHooks.d.ts +7 -1
  85. package/pluginHooks.js +106 -1
  86. package/pluginHooks.mjs +106 -1
  87. package/plugins/collapsibleColumns/collapsibleColumns.js +58 -4
  88. package/plugins/collapsibleColumns/collapsibleColumns.mjs +58 -4
  89. package/plugins/columnSorting/columnSorting.js +38 -0
  90. package/plugins/columnSorting/columnSorting.mjs +38 -2
  91. package/plugins/columnSorting/index.js +3 -1
  92. package/plugins/columnSorting/index.mjs +1 -1
  93. package/plugins/comments/commentEditor.js +1 -0
  94. package/plugins/comments/commentEditor.mjs +1 -0
  95. package/plugins/comments/comments.js +251 -189
  96. package/plugins/comments/comments.mjs +250 -190
  97. package/plugins/comments/contextMenuItem/addEditComment.js +41 -0
  98. package/plugins/comments/contextMenuItem/addEditComment.mjs +35 -0
  99. package/plugins/comments/contextMenuItem/readOnlyComment.js +49 -0
  100. package/plugins/comments/contextMenuItem/readOnlyComment.mjs +43 -0
  101. package/plugins/comments/contextMenuItem/removeComment.js +38 -0
  102. package/plugins/comments/contextMenuItem/removeComment.mjs +32 -0
  103. package/plugins/contextMenu/contextMenu.d.ts +1 -1
  104. package/plugins/contextMenu/contextMenu.js +72 -30
  105. package/plugins/contextMenu/contextMenu.mjs +73 -31
  106. package/plugins/contextMenu/predefinedItems/alignment.js +7 -0
  107. package/plugins/contextMenu/predefinedItems/alignment.mjs +7 -0
  108. package/plugins/contextMenu/predefinedItems/clearColumn.js +5 -3
  109. package/plugins/contextMenu/predefinedItems/clearColumn.mjs +5 -3
  110. package/plugins/contextMenu/predefinedItems/columnLeft.js +5 -3
  111. package/plugins/contextMenu/predefinedItems/columnLeft.mjs +5 -3
  112. package/plugins/contextMenu/predefinedItems/columnRight.js +5 -3
  113. package/plugins/contextMenu/predefinedItems/columnRight.mjs +5 -3
  114. package/plugins/contextMenu/predefinedItems/readOnly.js +7 -0
  115. package/plugins/contextMenu/predefinedItems/readOnly.mjs +7 -0
  116. package/plugins/contextMenu/predefinedItems/removeColumn.js +7 -5
  117. package/plugins/contextMenu/predefinedItems/removeColumn.mjs +5 -3
  118. package/plugins/contextMenu/predefinedItems/removeRow.js +7 -5
  119. package/plugins/contextMenu/predefinedItems/removeRow.mjs +5 -3
  120. package/plugins/contextMenu/predefinedItems/rowAbove.js +5 -3
  121. package/plugins/contextMenu/predefinedItems/rowAbove.mjs +5 -3
  122. package/plugins/contextMenu/predefinedItems/rowBelow.js +5 -3
  123. package/plugins/contextMenu/predefinedItems/rowBelow.mjs +5 -3
  124. package/plugins/contextMenu/utils.js +28 -16
  125. package/plugins/contextMenu/utils.mjs +27 -15
  126. package/plugins/copyPaste/contextMenuItem/copy.js +7 -0
  127. package/plugins/copyPaste/contextMenuItem/copy.mjs +7 -0
  128. package/plugins/copyPaste/contextMenuItem/copyColumnHeadersOnly.js +9 -1
  129. package/plugins/copyPaste/contextMenuItem/copyColumnHeadersOnly.mjs +9 -1
  130. package/plugins/copyPaste/contextMenuItem/copyWithColumnGroupHeaders.js +9 -1
  131. package/plugins/copyPaste/contextMenuItem/copyWithColumnGroupHeaders.mjs +9 -1
  132. package/plugins/copyPaste/contextMenuItem/copyWithColumnHeaders.js +9 -1
  133. package/plugins/copyPaste/contextMenuItem/copyWithColumnHeaders.mjs +9 -1
  134. package/plugins/copyPaste/contextMenuItem/cut.js +7 -0
  135. package/plugins/copyPaste/contextMenuItem/cut.mjs +7 -0
  136. package/plugins/copyPaste/copyPaste.js +14 -10
  137. package/plugins/copyPaste/copyPaste.mjs +14 -10
  138. package/plugins/customBorders/customBorders.js +23 -20
  139. package/plugins/customBorders/customBorders.mjs +24 -21
  140. package/plugins/dropdownMenu/dropdownMenu.d.ts +1 -1
  141. package/plugins/dropdownMenu/dropdownMenu.js +89 -32
  142. package/plugins/dropdownMenu/dropdownMenu.mjs +89 -32
  143. package/plugins/filters/filters.js +31 -14
  144. package/plugins/filters/filters.mjs +30 -13
  145. package/plugins/manualColumnResize/manualColumnResize.js +0 -6
  146. package/plugins/manualColumnResize/manualColumnResize.mjs +1 -7
  147. package/plugins/mergeCells/mergeCells.js +5 -17
  148. package/plugins/mergeCells/mergeCells.mjs +5 -17
  149. package/plugins/multiColumnSorting/multiColumnSorting.js +37 -2
  150. package/plugins/multiColumnSorting/multiColumnSorting.mjs +37 -2
  151. package/plugins/nestedHeaders/nestedHeaders.js +121 -8
  152. package/plugins/nestedHeaders/nestedHeaders.mjs +121 -8
  153. package/plugins/nestedHeaders/stateManager/index.js +37 -0
  154. package/plugins/nestedHeaders/stateManager/index.mjs +37 -0
  155. package/plugins/nestedRows/nestedRows.js +41 -0
  156. package/plugins/nestedRows/nestedRows.mjs +41 -0
  157. package/renderers/checkboxRenderer/checkboxRenderer.js +2 -2
  158. package/renderers/checkboxRenderer/checkboxRenderer.mjs +1 -1
  159. package/selection/highlight/highlight.js +256 -71
  160. package/selection/highlight/highlight.mjs +250 -71
  161. package/selection/highlight/types/activeHeader.js +10 -8
  162. package/selection/highlight/types/activeHeader.mjs +10 -8
  163. package/selection/highlight/types/area.js +6 -18
  164. package/selection/highlight/types/area.mjs +6 -18
  165. package/selection/highlight/types/areaLayered.js +31 -0
  166. package/selection/highlight/types/areaLayered.mjs +26 -0
  167. package/selection/highlight/types/column.js +27 -0
  168. package/selection/highlight/types/column.mjs +22 -0
  169. package/selection/highlight/types/customSelection.js +7 -9
  170. package/selection/highlight/types/customSelection.mjs +7 -9
  171. package/selection/highlight/types/fill.js +5 -7
  172. package/selection/highlight/types/fill.mjs +5 -7
  173. package/selection/highlight/types/{cell.js → focus.js} +5 -7
  174. package/selection/highlight/types/{cell.mjs → focus.mjs} +5 -7
  175. package/selection/highlight/types/header.js +9 -18
  176. package/selection/highlight/types/header.mjs +9 -18
  177. package/selection/highlight/types/row.js +27 -0
  178. package/selection/highlight/types/row.mjs +22 -0
  179. package/selection/highlight/visualSelection.js +31 -27
  180. package/selection/highlight/visualSelection.mjs +31 -27
  181. package/selection/index.js +4 -7
  182. package/selection/index.mjs +2 -3
  183. package/selection/mouseEventHandler.js +1 -1
  184. package/selection/mouseEventHandler.mjs +1 -1
  185. package/selection/range.js +8 -8
  186. package/selection/range.mjs +8 -8
  187. package/selection/selection.js +293 -154
  188. package/selection/selection.mjs +290 -153
  189. package/selection/transformation.js +232 -90
  190. package/selection/transformation.mjs +232 -90
  191. package/selection/utils.js +15 -21
  192. package/selection/utils.mjs +16 -21
  193. package/settings.d.ts +2 -0
  194. package/shortcutContexts/commands/editor/closeAndSave.js +12 -0
  195. package/shortcutContexts/commands/editor/closeAndSave.mjs +8 -0
  196. package/shortcutContexts/commands/editor/closeWithoutSaving.js +12 -0
  197. package/shortcutContexts/commands/editor/closeWithoutSaving.mjs +8 -0
  198. package/shortcutContexts/commands/editor/fastOpen.js +16 -0
  199. package/shortcutContexts/commands/editor/fastOpen.mjs +12 -0
  200. package/shortcutContexts/commands/editor/index.js +16 -0
  201. package/shortcutContexts/commands/editor/index.mjs +12 -0
  202. package/shortcutContexts/commands/editor/open.js +27 -0
  203. package/shortcutContexts/commands/editor/open.mjs +23 -0
  204. package/shortcutContexts/commands/emptySelectedCells.js +11 -0
  205. package/shortcutContexts/commands/emptySelectedCells.mjs +7 -0
  206. package/shortcutContexts/commands/extendCellsSelection/down.js +15 -0
  207. package/shortcutContexts/commands/extendCellsSelection/down.mjs +11 -0
  208. package/shortcutContexts/commands/extendCellsSelection/downByViewportHeight.js +21 -0
  209. package/shortcutContexts/commands/extendCellsSelection/downByViewportHeight.mjs +17 -0
  210. package/shortcutContexts/commands/extendCellsSelection/index.js +26 -0
  211. package/shortcutContexts/commands/extendCellsSelection/index.mjs +22 -0
  212. package/shortcutContexts/commands/extendCellsSelection/left.js +15 -0
  213. package/shortcutContexts/commands/extendCellsSelection/left.mjs +11 -0
  214. package/shortcutContexts/commands/extendCellsSelection/right.js +15 -0
  215. package/shortcutContexts/commands/extendCellsSelection/right.mjs +11 -0
  216. package/shortcutContexts/commands/extendCellsSelection/toColumns.js +19 -0
  217. package/shortcutContexts/commands/extendCellsSelection/toColumns.mjs +15 -0
  218. package/shortcutContexts/commands/extendCellsSelection/toMostBottom.js +29 -0
  219. package/shortcutContexts/commands/extendCellsSelection/toMostBottom.mjs +25 -0
  220. package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.js +19 -0
  221. package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.mjs +15 -0
  222. package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.js +19 -0
  223. package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.mjs +15 -0
  224. package/shortcutContexts/commands/extendCellsSelection/toMostLeft.js +29 -0
  225. package/shortcutContexts/commands/extendCellsSelection/toMostLeft.mjs +25 -0
  226. package/shortcutContexts/commands/extendCellsSelection/toMostRight.js +29 -0
  227. package/shortcutContexts/commands/extendCellsSelection/toMostRight.mjs +25 -0
  228. package/shortcutContexts/commands/extendCellsSelection/toMostTop.js +29 -0
  229. package/shortcutContexts/commands/extendCellsSelection/toMostTop.mjs +25 -0
  230. package/shortcutContexts/commands/extendCellsSelection/toRows.js +19 -0
  231. package/shortcutContexts/commands/extendCellsSelection/toRows.mjs +15 -0
  232. package/shortcutContexts/commands/extendCellsSelection/up.js +15 -0
  233. package/shortcutContexts/commands/extendCellsSelection/up.mjs +11 -0
  234. package/shortcutContexts/commands/extendCellsSelection/upByViewportHeight.js +21 -0
  235. package/shortcutContexts/commands/extendCellsSelection/upByViewportHeight.mjs +17 -0
  236. package/shortcutContexts/commands/index.js +35 -0
  237. package/shortcutContexts/commands/index.mjs +31 -0
  238. package/shortcutContexts/commands/moveCellSelection/down.js +13 -0
  239. package/shortcutContexts/commands/moveCellSelection/down.mjs +9 -0
  240. package/shortcutContexts/commands/moveCellSelection/downByViewportHeight.js +31 -0
  241. package/shortcutContexts/commands/moveCellSelection/downByViewportHeight.mjs +27 -0
  242. package/shortcutContexts/commands/moveCellSelection/index.js +28 -0
  243. package/shortcutContexts/commands/moveCellSelection/index.mjs +24 -0
  244. package/shortcutContexts/commands/moveCellSelection/inlineEnd.js +12 -0
  245. package/shortcutContexts/commands/moveCellSelection/inlineEnd.mjs +8 -0
  246. package/shortcutContexts/commands/moveCellSelection/inlineStart.js +12 -0
  247. package/shortcutContexts/commands/moveCellSelection/inlineStart.mjs +8 -0
  248. package/shortcutContexts/commands/moveCellSelection/left.js +10 -0
  249. package/shortcutContexts/commands/moveCellSelection/left.mjs +6 -0
  250. package/shortcutContexts/commands/moveCellSelection/right.js +10 -0
  251. package/shortcutContexts/commands/moveCellSelection/right.mjs +6 -0
  252. package/shortcutContexts/commands/moveCellSelection/toMostBottom.js +17 -0
  253. package/shortcutContexts/commands/moveCellSelection/toMostBottom.mjs +13 -0
  254. package/shortcutContexts/commands/moveCellSelection/toMostBottomInlineEnd.js +18 -0
  255. package/shortcutContexts/commands/moveCellSelection/toMostBottomInlineEnd.mjs +14 -0
  256. package/shortcutContexts/commands/moveCellSelection/toMostInlineEnd.js +14 -0
  257. package/shortcutContexts/commands/moveCellSelection/toMostInlineEnd.mjs +10 -0
  258. package/shortcutContexts/commands/moveCellSelection/toMostInlineStart.js +17 -0
  259. package/shortcutContexts/commands/moveCellSelection/toMostInlineStart.mjs +13 -0
  260. package/shortcutContexts/commands/moveCellSelection/toMostLeft.js +19 -0
  261. package/shortcutContexts/commands/moveCellSelection/toMostLeft.mjs +15 -0
  262. package/shortcutContexts/commands/moveCellSelection/toMostRight.js +21 -0
  263. package/shortcutContexts/commands/moveCellSelection/toMostRight.mjs +17 -0
  264. package/shortcutContexts/commands/moveCellSelection/toMostTop.js +17 -0
  265. package/shortcutContexts/commands/moveCellSelection/toMostTop.mjs +13 -0
  266. package/shortcutContexts/commands/moveCellSelection/toMostTopInlineStart.js +19 -0
  267. package/shortcutContexts/commands/moveCellSelection/toMostTopInlineStart.mjs +15 -0
  268. package/shortcutContexts/commands/moveCellSelection/up.js +13 -0
  269. package/shortcutContexts/commands/moveCellSelection/up.mjs +9 -0
  270. package/shortcutContexts/commands/moveCellSelection/upByViewportHeight.js +31 -0
  271. package/shortcutContexts/commands/moveCellSelection/upByViewportHeight.mjs +27 -0
  272. package/shortcutContexts/commands/populateSelectedCellsData.js +29 -0
  273. package/shortcutContexts/commands/populateSelectedCellsData.mjs +25 -0
  274. package/shortcutContexts/commands/scrollToFocusedCell.js +36 -0
  275. package/shortcutContexts/commands/scrollToFocusedCell.mjs +32 -0
  276. package/shortcutContexts/commands/selectAll.js +10 -0
  277. package/shortcutContexts/commands/selectAll.mjs +6 -0
  278. package/shortcutContexts/constants.js +13 -0
  279. package/shortcutContexts/constants.mjs +8 -0
  280. package/shortcutContexts/editor.js +25 -0
  281. package/shortcutContexts/editor.mjs +21 -0
  282. package/shortcutContexts/grid.js +163 -0
  283. package/shortcutContexts/grid.mjs +159 -0
  284. package/shortcutContexts/index.js +24 -0
  285. package/shortcutContexts/index.mjs +11 -0
  286. package/shortcuts/manager.js +2 -0
  287. package/shortcuts/manager.mjs +2 -0
  288. package/shortcuts/recorder.js +2 -2
  289. package/shortcuts/recorder.mjs +2 -2
  290. package/shortcuts/utils.js +19 -5
  291. package/shortcuts/utils.mjs +18 -4
  292. package/tableView.js +67 -13
  293. package/tableView.mjs +67 -13
  294. package/3rdparty/walkontable/src/selection.js +0 -295
  295. package/3rdparty/walkontable/src/selection.mjs +0 -290
  296. package/selection/highlight/constants.js +0 -15
  297. package/selection/highlight/constants.mjs +0 -6
  298. package/selection/highlight/types/index.js +0 -35
  299. package/selection/highlight/types/index.mjs +0 -31
package/editorManager.js CHANGED
@@ -2,16 +2,14 @@
2
2
 
3
3
  exports.__esModule = true;
4
4
  var _unicode = require("./helpers/unicode");
5
- var _event = require("./helpers/dom/event");
6
5
  var _element = require("./helpers/dom/element");
6
+ var _event = require("./helpers/dom/event");
7
7
  var _registry = require("./editors/registry");
8
8
  var _eventManager = _interopRequireDefault(require("./eventManager"));
9
9
  var _mixed = require("./helpers/mixed");
10
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
11
  const SHORTCUTS_GROUP_NAVIGATION = 'editorManager.navigation';
12
12
  exports.SHORTCUTS_GROUP_NAVIGATION = SHORTCUTS_GROUP_NAVIGATION;
13
- const SHORTCUTS_GROUP_EDITOR = 'editorManager.handlingEditor';
14
- exports.SHORTCUTS_GROUP_EDITOR = SHORTCUTS_GROUP_EDITOR;
15
13
  class EditorManager {
16
14
  /**
17
15
  * @param {Core} instance The Handsontable instance.
@@ -74,9 +72,6 @@ class EditorManager {
74
72
  * @type {object}
75
73
  */
76
74
  this.cellProperties = void 0;
77
- const shortcutManager = this.instance.getShortcutManager();
78
- shortcutManager.addContext('editor');
79
- this.registerShortcuts();
80
75
  this.instance.addHook('afterDocumentKeyDown', event => this.onAfterDocumentKeyDown(event));
81
76
 
82
77
  // Open editor when text composition is started (IME editor)
@@ -88,62 +83,6 @@ class EditorManager {
88
83
  this.instance.view._wt.update('onCellDblClick', (event, coords, elem) => this.onCellDblClick(event, coords, elem));
89
84
  }
90
85
 
91
- /**
92
- * Register shortcuts responsible for handling some actions related to an editor.
93
- *
94
- * @private
95
- */
96
- registerShortcuts() {
97
- const shortcutManager = this.instance.getShortcutManager();
98
- const gridContext = shortcutManager.getContext('grid');
99
- const editorContext = shortcutManager.getContext('editor');
100
- const config = {
101
- group: SHORTCUTS_GROUP_EDITOR
102
- };
103
- editorContext.addShortcuts([{
104
- keys: [['Enter'], ['Enter', 'Shift'], ['Enter', 'Control/Meta'], ['Enter', 'Control/Meta', 'Shift']],
105
- callback: (event, keys) => {
106
- this.closeEditorAndSaveChanges(shortcutManager.isCtrlPressed());
107
- this.moveSelectionAfterEnter(keys.includes('shift'));
108
- }
109
- }, {
110
- keys: [['Escape'], ['Escape', 'Control/Meta']],
111
- callback: () => {
112
- this.closeEditorAndRestoreOriginalValue(shortcutManager.isCtrlPressed());
113
- this.activeEditor.focus();
114
- }
115
- }], config);
116
- gridContext.addShortcuts([{
117
- keys: [['F2']],
118
- callback: event => {
119
- this.openEditor(null, event, true);
120
- }
121
- }, {
122
- keys: [['Backspace'], ['Delete']],
123
- callback: () => {
124
- this.instance.emptySelectedCells();
125
- this.prepareEditor();
126
- }
127
- }, {
128
- keys: [['Enter'], ['Enter', 'Shift']],
129
- callback: (event, keys) => {
130
- if (this.instance.getSettings().enterBeginsEditing) {
131
- if (this.cellProperties.readOnly) {
132
- this.moveSelectionAfterEnter();
133
- } else {
134
- this.openEditor(null, event, true);
135
- }
136
- } else {
137
- this.moveSelectionAfterEnter(keys.includes('shift'));
138
- }
139
- (0, _event.stopImmediatePropagation)(event); // required by HandsontableEditor
140
- }
141
- }], {
142
- ...config,
143
- runOnlyIf: () => (0, _mixed.isDefined)(this.instance.getSelected())
144
- });
145
- }
146
-
147
86
  /**
148
87
  * Lock the editor from being prepared and closed. Locking the editor prevents its closing and
149
88
  * reinitialized after selecting the new cell. This feature is necessary for a mobile editor.
@@ -196,10 +135,16 @@ class EditorManager {
196
135
  });
197
136
  return;
198
137
  }
138
+ const {
139
+ highlight
140
+ } = this.instance.getSelectedRangeLast();
141
+ if (highlight.isHeader()) {
142
+ return;
143
+ }
199
144
  const {
200
145
  row,
201
146
  col
202
- } = this.instance.getSelectedRangeLast().highlight;
147
+ } = highlight;
203
148
  const modifiedCellCoords = this.instance.runHooks('modifyGetCellCoords', row, col);
204
149
  let visualRowToCheck = row;
205
150
  let visualColumnToCheck = col;
@@ -263,14 +208,7 @@ class EditorManager {
263
208
  return;
264
209
  }
265
210
  if (!this.activeEditor) {
266
- const {
267
- row,
268
- col
269
- } = this.instance.getSelectedRangeLast().highlight;
270
- const renderableRowIndex = this.instance.rowIndexMapper.getRenderableFromVisualIndex(row);
271
- const renderableColumnIndex = this.instance.columnIndexMapper.getRenderableFromVisualIndex(col);
272
- this.instance.view.scrollViewport(this.instance._createCellCoords(renderableRowIndex, renderableColumnIndex));
273
- this.instance.view.render();
211
+ this.instance.scrollToFocusedCell();
274
212
  this.prepareEditor();
275
213
  }
276
214
  if (this.activeEditor) {
@@ -374,15 +312,13 @@ class EditorManager {
374
312
  * @param {KeyboardEvent} event The keyboard event object.
375
313
  */
376
314
  onAfterDocumentKeyDown(event) {
377
- if (!this.instance.isListening()) {
315
+ const selection = this.instance.getSelectedRangeLast();
316
+ if (!this.instance.isListening() || !selection || selection.highlight.isHeader() || (0, _event.isImmediatePropagationStopped)(event)) {
378
317
  return;
379
318
  }
380
319
  const {
381
320
  keyCode
382
321
  } = event;
383
- if (!this.selection.isSelected()) {
384
- return;
385
- }
386
322
 
387
323
  // catch CTRL but not right ALT (which in some systems triggers ALT+CTRL)
388
324
  const isCtrlPressed = (event.ctrlKey || event.metaKey) && !event.altKey;
package/editorManager.mjs CHANGED
@@ -1,11 +1,10 @@
1
1
  import { isFunctionKey, isCtrlMetaKey } from "./helpers/unicode.mjs";
2
- import { stopImmediatePropagation } from "./helpers/dom/event.mjs";
3
2
  import { isOutsideInput } from "./helpers/dom/element.mjs";
3
+ import { isImmediatePropagationStopped } from "./helpers/dom/event.mjs";
4
4
  import { getEditorInstance } from "./editors/registry.mjs";
5
5
  import EventManager from "./eventManager.mjs";
6
6
  import { isDefined } from "./helpers/mixed.mjs";
7
7
  export const SHORTCUTS_GROUP_NAVIGATION = 'editorManager.navigation';
8
- export const SHORTCUTS_GROUP_EDITOR = 'editorManager.handlingEditor';
9
8
  class EditorManager {
10
9
  /**
11
10
  * @param {Core} instance The Handsontable instance.
@@ -68,9 +67,6 @@ class EditorManager {
68
67
  * @type {object}
69
68
  */
70
69
  this.cellProperties = void 0;
71
- const shortcutManager = this.instance.getShortcutManager();
72
- shortcutManager.addContext('editor');
73
- this.registerShortcuts();
74
70
  this.instance.addHook('afterDocumentKeyDown', event => this.onAfterDocumentKeyDown(event));
75
71
 
76
72
  // Open editor when text composition is started (IME editor)
@@ -82,62 +78,6 @@ class EditorManager {
82
78
  this.instance.view._wt.update('onCellDblClick', (event, coords, elem) => this.onCellDblClick(event, coords, elem));
83
79
  }
84
80
 
85
- /**
86
- * Register shortcuts responsible for handling some actions related to an editor.
87
- *
88
- * @private
89
- */
90
- registerShortcuts() {
91
- const shortcutManager = this.instance.getShortcutManager();
92
- const gridContext = shortcutManager.getContext('grid');
93
- const editorContext = shortcutManager.getContext('editor');
94
- const config = {
95
- group: SHORTCUTS_GROUP_EDITOR
96
- };
97
- editorContext.addShortcuts([{
98
- keys: [['Enter'], ['Enter', 'Shift'], ['Enter', 'Control/Meta'], ['Enter', 'Control/Meta', 'Shift']],
99
- callback: (event, keys) => {
100
- this.closeEditorAndSaveChanges(shortcutManager.isCtrlPressed());
101
- this.moveSelectionAfterEnter(keys.includes('shift'));
102
- }
103
- }, {
104
- keys: [['Escape'], ['Escape', 'Control/Meta']],
105
- callback: () => {
106
- this.closeEditorAndRestoreOriginalValue(shortcutManager.isCtrlPressed());
107
- this.activeEditor.focus();
108
- }
109
- }], config);
110
- gridContext.addShortcuts([{
111
- keys: [['F2']],
112
- callback: event => {
113
- this.openEditor(null, event, true);
114
- }
115
- }, {
116
- keys: [['Backspace'], ['Delete']],
117
- callback: () => {
118
- this.instance.emptySelectedCells();
119
- this.prepareEditor();
120
- }
121
- }, {
122
- keys: [['Enter'], ['Enter', 'Shift']],
123
- callback: (event, keys) => {
124
- if (this.instance.getSettings().enterBeginsEditing) {
125
- if (this.cellProperties.readOnly) {
126
- this.moveSelectionAfterEnter();
127
- } else {
128
- this.openEditor(null, event, true);
129
- }
130
- } else {
131
- this.moveSelectionAfterEnter(keys.includes('shift'));
132
- }
133
- stopImmediatePropagation(event); // required by HandsontableEditor
134
- }
135
- }], {
136
- ...config,
137
- runOnlyIf: () => isDefined(this.instance.getSelected())
138
- });
139
- }
140
-
141
81
  /**
142
82
  * Lock the editor from being prepared and closed. Locking the editor prevents its closing and
143
83
  * reinitialized after selecting the new cell. This feature is necessary for a mobile editor.
@@ -190,10 +130,16 @@ class EditorManager {
190
130
  });
191
131
  return;
192
132
  }
133
+ const {
134
+ highlight
135
+ } = this.instance.getSelectedRangeLast();
136
+ if (highlight.isHeader()) {
137
+ return;
138
+ }
193
139
  const {
194
140
  row,
195
141
  col
196
- } = this.instance.getSelectedRangeLast().highlight;
142
+ } = highlight;
197
143
  const modifiedCellCoords = this.instance.runHooks('modifyGetCellCoords', row, col);
198
144
  let visualRowToCheck = row;
199
145
  let visualColumnToCheck = col;
@@ -257,14 +203,7 @@ class EditorManager {
257
203
  return;
258
204
  }
259
205
  if (!this.activeEditor) {
260
- const {
261
- row,
262
- col
263
- } = this.instance.getSelectedRangeLast().highlight;
264
- const renderableRowIndex = this.instance.rowIndexMapper.getRenderableFromVisualIndex(row);
265
- const renderableColumnIndex = this.instance.columnIndexMapper.getRenderableFromVisualIndex(col);
266
- this.instance.view.scrollViewport(this.instance._createCellCoords(renderableRowIndex, renderableColumnIndex));
267
- this.instance.view.render();
206
+ this.instance.scrollToFocusedCell();
268
207
  this.prepareEditor();
269
208
  }
270
209
  if (this.activeEditor) {
@@ -368,15 +307,13 @@ class EditorManager {
368
307
  * @param {KeyboardEvent} event The keyboard event object.
369
308
  */
370
309
  onAfterDocumentKeyDown(event) {
371
- if (!this.instance.isListening()) {
310
+ const selection = this.instance.getSelectedRangeLast();
311
+ if (!this.instance.isListening() || !selection || selection.highlight.isHeader() || isImmediatePropagationStopped(event)) {
372
312
  return;
373
313
  }
374
314
  const {
375
315
  keyCode
376
316
  } = event;
377
- if (!this.selection.isSelected()) {
378
- return;
379
- }
380
317
 
381
318
  // catch CTRL but not right ALT (which in some systems triggers ALT+CTRL)
382
319
  const isCtrlPressed = (event.ctrlKey || event.metaKey) && !event.altKey;
@@ -32,7 +32,6 @@ export abstract class BaseEditor {
32
32
  finishEditing(restoreOriginalValue?: boolean, ctrlDown?: boolean, callback?: () => void): void;
33
33
  abstract focus(): void;
34
34
  getEditedCell(): HTMLTableCellElement | null;
35
- getEditedCellRect(): { top: number, start: number, width: number, maxWidth: number, height: number, maxHeight: number } | undefined;
36
35
  getEditedCellsZIndex(): string;
37
36
  abstract getValue(): any;
38
37
  init(): void;
@@ -416,9 +416,7 @@ class TextEditor extends _baseEditor.BaseEditor {
416
416
  runOnlyIf: event => !this.hot.selection.isMultiple() &&
417
417
  // We trigger a data population for multiple selection.
418
418
  // catch CTRL but not right ALT (which in some systems triggers ALT+CTRL)
419
- !event.altKey,
420
- relativeToGroup: _editorManager.SHORTCUTS_GROUP_EDITOR,
421
- position: 'before'
419
+ !event.altKey
422
420
  }, {
423
421
  keys: [['Meta', 'Enter']],
424
422
  callback: () => {
@@ -426,19 +424,13 @@ class TextEditor extends _baseEditor.BaseEditor {
426
424
  return false; // Will block closing editor.
427
425
  },
428
426
 
429
- runOnlyIf: () => !this.hot.selection.isMultiple(),
430
- // We trigger a data population for multiple selection.
431
- relativeToGroup: _editorManager.SHORTCUTS_GROUP_EDITOR,
432
- position: 'before'
427
+ runOnlyIf: () => !this.hot.selection.isMultiple() // We trigger a data population for multiple selection.
433
428
  }, {
434
429
  keys: [['Alt', 'Enter']],
435
430
  callback: () => {
436
431
  insertNewLine();
437
432
  return false; // Will block closing editor.
438
- },
439
-
440
- relativeToGroup: _editorManager.SHORTCUTS_GROUP_EDITOR,
441
- position: 'before'
433
+ }
442
434
  }, {
443
435
  // TODO: Duplicated part of code (callback to shortcut)
444
436
  keys: [['PageUp']],
@@ -6,7 +6,7 @@ import { rangeEach } from "../../helpers/number.mjs";
6
6
  import { KEY_CODES } from "../../helpers/unicode.mjs";
7
7
  import { autoResize } from "../../3rdparty/autoResize/index.mjs";
8
8
  import { isDefined } from "../../helpers/mixed.mjs";
9
- import { SHORTCUTS_GROUP_NAVIGATION, SHORTCUTS_GROUP_EDITOR as EDITOR_MANAGER_GROUP } from "../../editorManager.mjs";
9
+ import { SHORTCUTS_GROUP_NAVIGATION } from "../../editorManager.mjs";
10
10
  import { SHORTCUTS_GROUP_EDITOR } from "../baseEditor/baseEditor.mjs";
11
11
  import { updateCaretPosition } from "./caretPositioner.mjs";
12
12
  const EDITOR_VISIBLE_CLASS_NAME = 'ht_editor_visible';
@@ -411,9 +411,7 @@ export class TextEditor extends BaseEditor {
411
411
  runOnlyIf: event => !this.hot.selection.isMultiple() &&
412
412
  // We trigger a data population for multiple selection.
413
413
  // catch CTRL but not right ALT (which in some systems triggers ALT+CTRL)
414
- !event.altKey,
415
- relativeToGroup: EDITOR_MANAGER_GROUP,
416
- position: 'before'
414
+ !event.altKey
417
415
  }, {
418
416
  keys: [['Meta', 'Enter']],
419
417
  callback: () => {
@@ -421,19 +419,13 @@ export class TextEditor extends BaseEditor {
421
419
  return false; // Will block closing editor.
422
420
  },
423
421
 
424
- runOnlyIf: () => !this.hot.selection.isMultiple(),
425
- // We trigger a data population for multiple selection.
426
- relativeToGroup: EDITOR_MANAGER_GROUP,
427
- position: 'before'
422
+ runOnlyIf: () => !this.hot.selection.isMultiple() // We trigger a data population for multiple selection.
428
423
  }, {
429
424
  keys: [['Alt', 'Enter']],
430
425
  callback: () => {
431
426
  insertNewLine();
432
427
  return false; // Will block closing editor.
433
- },
434
-
435
- relativeToGroup: EDITOR_MANAGER_GROUP,
436
- position: 'before'
428
+ }
437
429
  }, {
438
430
  // TODO: Duplicated part of code (callback to shortcut)
439
431
  keys: [['PageUp']],
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-baf2fcf-20230809";
137
+ const hotVersion = "0.0.0-next-be16baf-20230809";
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-baf2fcf-20230809";
127
+ const hotVersion = "0.0.0-next-be16baf-20230809";
128
128
  let keyValidityDate;
129
129
  let consoleMessageState = 'invalid';
130
130
  let domMessageState = 'invalid';
@@ -3,3 +3,4 @@ export function isNumericLike(value: any): boolean;
3
3
  export function rangeEach(rangeFrom: number, rangeTo: number, iteratee: (index: number) => void): void;
4
4
  export function rangeEachReverse(rangeFrom: number, rangeTo: number, iteratee: (index: number) => void): void;
5
5
  export function valueAccordingPercent(value: number, percent: string | number): number;
6
+ export function clamp(value: number, minValue: number, maxValue: number): number;
package/helpers/number.js CHANGED
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
+ exports.clamp = clamp;
4
5
  exports.isNumeric = isNumeric;
5
6
  exports.isNumericLike = isNumericLike;
6
7
  exports.rangeEach = rangeEach;
@@ -111,4 +112,21 @@ function valueAccordingPercent(value, percent) {
111
112
  percent = parseInt(percent.toString().replace('%', ''), 10);
112
113
  percent = isNaN(percent) ? 0 : percent;
113
114
  return parseInt(value * percent / 100, 10);
115
+ }
116
+
117
+ /**
118
+ * Clamps the value between min and max.
119
+ *
120
+ * @param {number} value The base number value.
121
+ * @param {number} minValue The max number value.
122
+ * @param {number} maxValue The min number value.
123
+ * @returns {number}
124
+ */
125
+ function clamp(value, minValue, maxValue) {
126
+ if (Math.min(value, minValue) === value) {
127
+ return minValue;
128
+ } else if (Math.max(value, maxValue) === value) {
129
+ return maxValue;
130
+ }
131
+ return value;
114
132
  }
@@ -103,4 +103,21 @@ export function valueAccordingPercent(value, percent) {
103
103
  percent = parseInt(percent.toString().replace('%', ''), 10);
104
104
  percent = isNaN(percent) ? 0 : percent;
105
105
  return parseInt(value * percent / 100, 10);
106
+ }
107
+
108
+ /**
109
+ * Clamps the value between min and max.
110
+ *
111
+ * @param {number} value The base number value.
112
+ * @param {number} minValue The max number value.
113
+ * @param {number} maxValue The min number value.
114
+ * @returns {number}
115
+ */
116
+ export function clamp(value, minValue, maxValue) {
117
+ if (Math.min(value, minValue) === value) {
118
+ return minValue;
119
+ } else if (Math.max(value, maxValue) === value) {
120
+ return maxValue;
121
+ }
122
+ return value;
106
123
  }
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-baf2fcf-20230809",
13
+ "version": "0.0.0-next-be16baf-20230809",
14
14
  "main": "index",
15
15
  "module": "index.mjs",
16
16
  "jsnext:main": "index.mjs",
package/pluginHooks.d.ts CHANGED
@@ -110,8 +110,8 @@ export interface Events {
110
110
  afterOnCellCornerDblClick?: (event: MouseEvent) => void;
111
111
  afterOnCellCornerMouseDown?: (event: MouseEvent) => void;
112
112
  afterOnCellMouseDown?: (event: MouseEvent, coords: CellCoords, TD: HTMLTableCellElement) => void;
113
- afterOnCellMouseOver?: (event: MouseEvent, coords: CellCoords, TD: HTMLTableCellElement) => void;
114
113
  afterOnCellMouseOut?: (event: MouseEvent, coords: CellCoords, TD: HTMLTableCellElement) => void;
114
+ afterOnCellMouseOver?: (event: MouseEvent, coords: CellCoords, TD: HTMLTableCellElement) => void;
115
115
  afterOnCellMouseUp?: (event: MouseEvent, coords: CellCoords, TD: HTMLTableCellElement) => void;
116
116
  afterPaste?: (data: CellValue[][], coords: RangeType[]) => void;
117
117
  afterPluginsInitialized?: () => void;
@@ -128,10 +128,13 @@ export interface Events {
128
128
  afterRowSequenceChange?: (source: 'init' | 'move' | 'insert' | 'remove' | 'update') => void;
129
129
  afterScrollHorizontally?: () => void;
130
130
  afterScrollVertically?: () => void;
131
+ afterScroll?: () => void;
132
+ afterSelectColumns?: (from: CellCoords, to: CellCoords, highlight: CellCoords) => void;
131
133
  afterSelection?: (row: number, column: number, row2: number, column2: number, preventScrolling: { value: boolean }, selectionLayerLevel: number) => void;
132
134
  afterSelectionByProp?: (row: number, prop: string, row2: number, prop2: string, preventScrolling: { value: boolean }, selectionLayerLevel: number) => void;
133
135
  afterSelectionEnd?: (row: number, column: number, row2: number, column2: number, selectionLayerLevel: number) => void;
134
136
  afterSelectionEndByProp?: (row: number, prop: string, row2: number, prop2: string, selectionLayerLevel: number) => void;
137
+ afterSelectRows?: (from: CellCoords, to: CellCoords, highlight: CellCoords) => void;
135
138
  afterSetCellMeta?: (row: number, column: number, key: string, value: any) => void;
136
139
  afterSetDataAtCell?: (changes: CellChange[], source?: ChangeSource) => void;
137
140
  afterSetDataAtRowProp?: (changes: CellChange[], source?: ChangeSource) => void;
@@ -205,6 +208,8 @@ export interface Events {
205
208
  beforeRenderer?: (TD: HTMLTableCellElement, row: number, column: number, prop: string | number, value: CellValue, cellProperties: CellProperties) => void;
206
209
  beforeRowMove?: (movedRows: number[], finalIndex: number, dropIndex: number | undefined, movePossible: boolean) => void;
207
210
  beforeRowResize?: (newSize: number, row: number, isDoubleClick: boolean) => number | void;
211
+ beforeSelectColumns?: (from: CellCoords, to: CellCoords, highlight: CellCoords) => void;
212
+ beforeSelectRows?: (from: CellCoords, to: CellCoords, highlight: CellCoords) => void;
208
213
  beforeSetCellMeta?: (row: number, col: number, key: string, value: any) => boolean | void;
209
214
  beforeSetRangeEnd?: (coords: CellCoords) => void;
210
215
  beforeSetRangeStart?: (coords: CellCoords) => void;
@@ -232,6 +237,7 @@ export interface Events {
232
237
  modifyColWidth?: (width: number, column: number) => void;
233
238
  modifyCopyableRange?: (copyableRanges: RangeType[]) => void;
234
239
  modifyData?: (row: number, column: number, valueHolder: { value: CellValue }, ioMode: 'get' | 'set') => void;
240
+ modifyFocusOnTabNavigation?: (tabActivationDir: 'from_above' | 'from_below', visualCoords: CellCoords) => void;
235
241
  modifyGetCellCoords?: (row: number, column: number, topmost: boolean) => void | [number, number] | [number, number, number, number];
236
242
  modifyRowData?: (row: number) => void;
237
243
  modifyRowHeader?: (row: number) => void;
package/pluginHooks.js CHANGED
@@ -554,6 +554,13 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
554
554
  * @event Hooks#afterScrollVertically
555
555
  */
556
556
  'afterScrollVertically',
557
+ /**
558
+ * Fired after the vertical or horizontal scroll event.
559
+ *
560
+ * @since 14.0.0
561
+ * @event Hooks#afterScroll
562
+ */
563
+ 'afterScroll',
557
564
  /**
558
565
  * Fired after one or more cells are selected (e.g. During mouse move).
559
566
  *
@@ -657,6 +664,94 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
657
664
  * @param {number} selectionLayerLevel The number which indicates what selection layer is currently modified.
658
665
  */
659
666
  'afterSelectionEndByProp',
667
+ /**
668
+ * Fired before one or more columns are selected (e.g. During mouse header click or {@link Core#selectColumns} API call).
669
+ *
670
+ * @since 14.0.0
671
+ * @event Hooks#beforeSelectColumns
672
+ * @param {CellCoords} from Selection start coords object.
673
+ * @param {CellCoords} to Selection end coords object.
674
+ * @param {CellCoords} highlight Selection cell focus coords object.
675
+ * @example
676
+ * ::: only-for javascript
677
+ * ```js
678
+ * new Handsontable(element, {
679
+ * beforeSelectColumns: (from, to, highlight) => {
680
+ * // Extend the column selection by one column left and one column right.
681
+ * from.col = Math.max(from.col - 1, 0);
682
+ * to.col = Math.min(to.col + 1, this.countCols() - 1);
683
+ * }
684
+ * })
685
+ * ```
686
+ * :::
687
+ *
688
+ * ::: only-for react
689
+ * ```jsx
690
+ * <HotTable
691
+ * beforeSelectColumns={(from, to, highlight) => {
692
+ * // Extend the column selection by one column left and one column right.
693
+ * from.col = Math.max(from.col - 1, 0);
694
+ * to.col = Math.min(to.col + 1, this.countCols() - 1);
695
+ * }}
696
+ * />
697
+ * ```
698
+ * :::
699
+ */
700
+ 'beforeSelectColumns',
701
+ /**
702
+ * Fired after one or more columns are selected (e.g. During mouse header click or {@link Core#selectColumns} API call).
703
+ *
704
+ * @since 14.0.0
705
+ * @event Hooks#afterSelectColumns
706
+ * @param {CellCoords} from Selection start coords object.
707
+ * @param {CellCoords} to Selection end coords object.
708
+ * @param {CellCoords} highlight Selection cell focus coords object.
709
+ */
710
+ 'afterSelectColumns',
711
+ /**
712
+ * Fired before one or more rows are selected (e.g. During mouse header click or {@link Core#selectRows} API call).
713
+ *
714
+ * @since 14.0.0
715
+ * @event Hooks#beforeSelectRows
716
+ * @param {CellCoords} from Selection start coords object.
717
+ * @param {CellCoords} to Selection end coords object.
718
+ * @param {CellCoords} highlight Selection cell focus coords object.
719
+ * @example
720
+ * ::: only-for javascript
721
+ * ```js
722
+ * new Handsontable(element, {
723
+ * beforeSelectRows: (from, to, highlight) => {
724
+ * // Extend the row selection by one row up and one row bottom more.
725
+ * from.row = Math.max(from.row - 1, 0);
726
+ * to.row = Math.min(to.row + 1, this.countRows() - 1);
727
+ * }
728
+ * })
729
+ * ```
730
+ * :::
731
+ *
732
+ * ::: only-for react
733
+ * ```jsx
734
+ * <HotTable
735
+ * beforeSelectRows={(from, to, highlight) => {
736
+ * // Extend the row selection by one row up and one row bottom more.
737
+ * from.row = Math.max(from.row - 1, 0);
738
+ * to.row = Math.min(to.row + 1, this.countRows() - 1);
739
+ * }}
740
+ * />
741
+ * ```
742
+ * :::
743
+ */
744
+ 'beforeSelectRows',
745
+ /**
746
+ * Fired after one or more rows are selected (e.g. During mouse header click or {@link Core#selectRows} API call).
747
+ *
748
+ * @since 14.0.0
749
+ * @event Hooks#afterSelectRows
750
+ * @param {CellCoords} from Selection start coords object.
751
+ * @param {CellCoords} to Selection end coords object.
752
+ * @param {CellCoords} highlight Selection cell focus coords object.
753
+ */
754
+ 'afterSelectRows',
660
755
  /**
661
756
  * Fired after cell meta is changed.
662
757
  *
@@ -1225,6 +1320,16 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
1225
1320
  * @returns {undefined|number[]}
1226
1321
  */
1227
1322
  'modifyGetCellCoords',
1323
+ /**
1324
+ * Used to modify the cell coordinates when the table is activated (going into the listen mode).
1325
+ *
1326
+ * @event Hooks#modifyFocusOnTabNavigation
1327
+ * @since 14.0.0
1328
+ * @param {'from_above' | 'from_below'} tabActivationDir The browsers Tab navigation direction. Depending on
1329
+ * whether the user activated the table from the element above or below, another cell can be selected.
1330
+ * @param {CellCoords} visualCoords The coords that will be used to select a cell.
1331
+ */
1332
+ 'modifyFocusOnTabNavigation',
1228
1333
  /**
1229
1334
  * Allows modify the visual row index that is used to retrieve the row header element (TH) before it's
1230
1335
  * highlighted (proper CSS class names are added). Modifying the visual row index allows building a custom
@@ -2382,7 +2487,7 @@ const REMOVED_HOOKS = new Map([['modifyRow', '8.0.0'], ['modifyCol', '8.0.0'], [
2382
2487
  * @type {Map<string, string>}
2383
2488
  */
2384
2489
  /* eslint-enable jsdoc/require-description-complete-sentence */
2385
- const DEPRECATED_HOOKS = new Map([]);
2490
+ const DEPRECATED_HOOKS = new Map([['beforeRemoveCellClassNames', 'The hook "beforeRemoveCellClassNames" is deprecated and will be removed in the next major release.']]);
2386
2491
  class Hooks {
2387
2492
  static getSingleton() {
2388
2493
  return getGlobalSingleton();