handsontable 0.0.0-next-06a64be-20230621 → 0.0.0-next-d1c8e0e-20230621

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 (279) hide show
  1. package/3rdparty/walkontable/src/cell/coords.d.ts +6 -1
  2. package/3rdparty/walkontable/src/cell/coords.js +61 -12
  3. package/3rdparty/walkontable/src/cell/coords.mjs +61 -12
  4. package/3rdparty/walkontable/src/cell/range.d.ts +9 -2
  5. package/3rdparty/walkontable/src/cell/range.js +44 -7
  6. package/3rdparty/walkontable/src/cell/range.mjs +44 -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 -4
  22. package/3rdparty/walkontable/src/overlay/inlineStart.mjs +2 -4
  23. package/3rdparty/walkontable/src/overlay/top.js +2 -4
  24. package/3rdparty/walkontable/src/overlay/top.mjs +2 -4
  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 +18 -0
  28. package/3rdparty/walkontable/src/selection/border/constants.mjs +13 -0
  29. package/3rdparty/walkontable/src/selection/constants.js +63 -0
  30. package/3rdparty/walkontable/src/selection/constants.mjs +51 -0
  31. package/3rdparty/walkontable/src/selection/index.js +30 -0
  32. package/3rdparty/walkontable/src/selection/index.mjs +5 -0
  33. package/3rdparty/walkontable/src/selection/manager.js +329 -0
  34. package/3rdparty/walkontable/src/selection/manager.mjs +323 -0
  35. package/3rdparty/walkontable/src/selection/scanner.js +364 -0
  36. package/3rdparty/walkontable/src/selection/scanner.mjs +360 -0
  37. package/3rdparty/walkontable/src/selection/selection.js +133 -0
  38. package/3rdparty/walkontable/src/selection/selection.mjs +127 -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 +7 -79
  50. package/3rdparty/walkontable/src/table.mjs +8 -80
  51. package/base.js +2 -2
  52. package/base.mjs +2 -2
  53. package/core.d.ts +5 -3
  54. package/core.js +127 -309
  55. package/core.mjs +127 -309
  56. package/dataMap/metaManager/metaSchema.js +19 -0
  57. package/dataMap/metaManager/metaSchema.mjs +19 -0
  58. package/dist/handsontable.css +8 -3
  59. package/dist/handsontable.full.css +8 -3
  60. package/dist/handsontable.full.js +13658 -10651
  61. package/dist/handsontable.full.min.css +3 -3
  62. package/dist/handsontable.full.min.js +112 -112
  63. package/dist/handsontable.js +16566 -13559
  64. package/dist/handsontable.min.css +3 -3
  65. package/dist/handsontable.min.js +4 -4
  66. package/editorManager.js +21 -94
  67. package/editorManager.mjs +26 -98
  68. package/editors/textEditor/textEditor.js +3 -11
  69. package/editors/textEditor/textEditor.mjs +4 -12
  70. package/helpers/mixed.js +1 -1
  71. package/helpers/mixed.mjs +1 -1
  72. package/helpers/number.d.ts +1 -0
  73. package/helpers/number.js +18 -0
  74. package/helpers/number.mjs +17 -0
  75. package/package.json +1 -1
  76. package/pluginHooks.d.ts +5 -1
  77. package/pluginHooks.js +89 -1
  78. package/pluginHooks.mjs +89 -1
  79. package/plugins/collapsibleColumns/collapsibleColumns.js +81 -24
  80. package/plugins/collapsibleColumns/collapsibleColumns.mjs +81 -24
  81. package/plugins/columnSorting/columnSorting.js +50 -8
  82. package/plugins/columnSorting/columnSorting.mjs +49 -9
  83. package/plugins/columnSorting/index.js +4 -2
  84. package/plugins/columnSorting/index.mjs +1 -1
  85. package/plugins/comments/comments.js +11 -4
  86. package/plugins/comments/comments.mjs +11 -4
  87. package/plugins/contextMenu/contextMenu.d.ts +1 -1
  88. package/plugins/contextMenu/contextMenu.js +80 -29
  89. package/plugins/contextMenu/contextMenu.mjs +81 -30
  90. package/plugins/contextMenu/predefinedItems/alignment.js +7 -0
  91. package/plugins/contextMenu/predefinedItems/alignment.mjs +7 -0
  92. package/plugins/contextMenu/predefinedItems/clearColumn.js +5 -3
  93. package/plugins/contextMenu/predefinedItems/clearColumn.mjs +5 -3
  94. package/plugins/contextMenu/predefinedItems/columnLeft.js +5 -3
  95. package/plugins/contextMenu/predefinedItems/columnLeft.mjs +5 -3
  96. package/plugins/contextMenu/predefinedItems/columnRight.js +5 -3
  97. package/plugins/contextMenu/predefinedItems/columnRight.mjs +5 -3
  98. package/plugins/contextMenu/predefinedItems/readOnly.js +7 -0
  99. package/plugins/contextMenu/predefinedItems/readOnly.mjs +7 -0
  100. package/plugins/contextMenu/predefinedItems/removeColumn.js +7 -5
  101. package/plugins/contextMenu/predefinedItems/removeColumn.mjs +5 -3
  102. package/plugins/contextMenu/predefinedItems/removeRow.js +7 -5
  103. package/plugins/contextMenu/predefinedItems/removeRow.mjs +5 -3
  104. package/plugins/contextMenu/predefinedItems/rowAbove.js +5 -3
  105. package/plugins/contextMenu/predefinedItems/rowAbove.mjs +5 -3
  106. package/plugins/contextMenu/predefinedItems/rowBelow.js +5 -3
  107. package/plugins/contextMenu/predefinedItems/rowBelow.mjs +5 -3
  108. package/plugins/contextMenu/utils.js +25 -16
  109. package/plugins/contextMenu/utils.mjs +24 -15
  110. package/plugins/copyPaste/contextMenuItem/copy.js +7 -0
  111. package/plugins/copyPaste/contextMenuItem/copy.mjs +7 -0
  112. package/plugins/copyPaste/contextMenuItem/copyColumnHeadersOnly.js +9 -1
  113. package/plugins/copyPaste/contextMenuItem/copyColumnHeadersOnly.mjs +9 -1
  114. package/plugins/copyPaste/contextMenuItem/copyWithColumnGroupHeaders.js +9 -1
  115. package/plugins/copyPaste/contextMenuItem/copyWithColumnGroupHeaders.mjs +9 -1
  116. package/plugins/copyPaste/contextMenuItem/copyWithColumnHeaders.js +9 -1
  117. package/plugins/copyPaste/contextMenuItem/copyWithColumnHeaders.mjs +9 -1
  118. package/plugins/copyPaste/contextMenuItem/cut.js +7 -0
  119. package/plugins/copyPaste/contextMenuItem/cut.mjs +7 -0
  120. package/plugins/copyPaste/copyPaste.js +5 -1
  121. package/plugins/copyPaste/copyPaste.mjs +5 -1
  122. package/plugins/customBorders/customBorders.js +25 -53
  123. package/plugins/customBorders/customBorders.mjs +26 -54
  124. package/plugins/dropdownMenu/dropdownMenu.d.ts +1 -1
  125. package/plugins/dropdownMenu/dropdownMenu.js +94 -30
  126. package/plugins/dropdownMenu/dropdownMenu.mjs +94 -30
  127. package/plugins/filters/filters.js +62 -42
  128. package/plugins/filters/filters.mjs +61 -41
  129. package/plugins/mergeCells/mergeCells.js +5 -18
  130. package/plugins/mergeCells/mergeCells.mjs +5 -18
  131. package/plugins/multiColumnSorting/multiColumnSorting.js +42 -3
  132. package/plugins/multiColumnSorting/multiColumnSorting.mjs +42 -3
  133. package/plugins/nestedHeaders/nestedHeaders.js +132 -10
  134. package/plugins/nestedHeaders/nestedHeaders.mjs +132 -10
  135. package/plugins/nestedHeaders/stateManager/index.js +37 -0
  136. package/plugins/nestedHeaders/stateManager/index.mjs +37 -0
  137. package/plugins/nestedRows/nestedRows.js +52 -7
  138. package/plugins/nestedRows/nestedRows.mjs +52 -7
  139. package/renderers/checkboxRenderer/checkboxRenderer.js +2 -2
  140. package/renderers/checkboxRenderer/checkboxRenderer.mjs +1 -1
  141. package/selection/highlight/highlight.js +312 -89
  142. package/selection/highlight/highlight.mjs +302 -85
  143. package/selection/highlight/types/activeHeader.js +10 -9
  144. package/selection/highlight/types/activeHeader.mjs +10 -8
  145. package/selection/highlight/types/area.js +12 -27
  146. package/selection/highlight/types/area.mjs +16 -30
  147. package/selection/highlight/types/areaLayered.js +54 -0
  148. package/selection/highlight/types/areaLayered.mjs +49 -0
  149. package/selection/highlight/types/column.js +50 -0
  150. package/selection/highlight/types/column.mjs +45 -0
  151. package/selection/highlight/types/customSelection.js +7 -10
  152. package/selection/highlight/types/customSelection.mjs +7 -9
  153. package/selection/highlight/types/fill.js +5 -8
  154. package/selection/highlight/types/fill.mjs +5 -7
  155. package/selection/highlight/types/{cell.js → focus.js} +5 -8
  156. package/selection/highlight/types/{cell.mjs → focus.mjs} +5 -7
  157. package/selection/highlight/types/header.js +10 -20
  158. package/selection/highlight/types/header.mjs +10 -19
  159. package/selection/highlight/types/{index.js → row.js} +27 -31
  160. package/selection/highlight/types/{index.mjs → row.mjs} +24 -29
  161. package/selection/highlight/visualSelection.js +31 -27
  162. package/selection/highlight/visualSelection.mjs +31 -27
  163. package/selection/index.js +4 -7
  164. package/selection/index.mjs +2 -3
  165. package/selection/mouseEventHandler.js +1 -1
  166. package/selection/mouseEventHandler.mjs +1 -1
  167. package/selection/range.js +8 -8
  168. package/selection/range.mjs +8 -8
  169. package/selection/selection.js +315 -181
  170. package/selection/selection.mjs +310 -180
  171. package/selection/transformation.js +233 -96
  172. package/selection/transformation.mjs +230 -93
  173. package/selection/utils.js +12 -36
  174. package/selection/utils.mjs +13 -36
  175. package/settings.d.ts +1 -0
  176. package/shortcutContexts/commands/editor/closeAndSave.js +15 -0
  177. package/shortcutContexts/commands/editor/closeAndSave.mjs +10 -0
  178. package/shortcutContexts/commands/editor/closeWithoutSaving.js +13 -0
  179. package/shortcutContexts/commands/editor/closeWithoutSaving.mjs +8 -0
  180. package/shortcutContexts/commands/editor/fastOpen.js +16 -0
  181. package/shortcutContexts/commands/editor/fastOpen.mjs +11 -0
  182. package/shortcutContexts/commands/editor/index.js +16 -0
  183. package/shortcutContexts/commands/editor/index.mjs +12 -0
  184. package/shortcutContexts/commands/editor/open.js +29 -0
  185. package/shortcutContexts/commands/editor/open.mjs +24 -0
  186. package/shortcutContexts/commands/emptySelectedCells.js +12 -0
  187. package/shortcutContexts/commands/emptySelectedCells.mjs +7 -0
  188. package/shortcutContexts/commands/extendCellsSelection/down.js +15 -0
  189. package/shortcutContexts/commands/extendCellsSelection/down.mjs +10 -0
  190. package/shortcutContexts/commands/extendCellsSelection/downByViewportHeight.js +21 -0
  191. package/shortcutContexts/commands/extendCellsSelection/downByViewportHeight.mjs +16 -0
  192. package/shortcutContexts/commands/extendCellsSelection/index.js +26 -0
  193. package/shortcutContexts/commands/extendCellsSelection/index.mjs +22 -0
  194. package/shortcutContexts/commands/extendCellsSelection/left.js +15 -0
  195. package/shortcutContexts/commands/extendCellsSelection/left.mjs +10 -0
  196. package/shortcutContexts/commands/extendCellsSelection/right.js +15 -0
  197. package/shortcutContexts/commands/extendCellsSelection/right.mjs +10 -0
  198. package/shortcutContexts/commands/extendCellsSelection/toColumns.js +19 -0
  199. package/shortcutContexts/commands/extendCellsSelection/toColumns.mjs +14 -0
  200. package/shortcutContexts/commands/extendCellsSelection/toMostBottom.js +22 -0
  201. package/shortcutContexts/commands/extendCellsSelection/toMostBottom.mjs +17 -0
  202. package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.js +17 -0
  203. package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.mjs +12 -0
  204. package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.js +17 -0
  205. package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.mjs +12 -0
  206. package/shortcutContexts/commands/extendCellsSelection/toMostLeft.js +40 -0
  207. package/shortcutContexts/commands/extendCellsSelection/toMostLeft.mjs +35 -0
  208. package/shortcutContexts/commands/extendCellsSelection/toMostRight.js +40 -0
  209. package/shortcutContexts/commands/extendCellsSelection/toMostRight.mjs +35 -0
  210. package/shortcutContexts/commands/extendCellsSelection/toMostTop.js +22 -0
  211. package/shortcutContexts/commands/extendCellsSelection/toMostTop.mjs +17 -0
  212. package/shortcutContexts/commands/extendCellsSelection/toRows.js +19 -0
  213. package/shortcutContexts/commands/extendCellsSelection/toRows.mjs +14 -0
  214. package/shortcutContexts/commands/extendCellsSelection/up.js +15 -0
  215. package/shortcutContexts/commands/extendCellsSelection/up.mjs +10 -0
  216. package/shortcutContexts/commands/extendCellsSelection/upByViewportHeight.js +21 -0
  217. package/shortcutContexts/commands/extendCellsSelection/upByViewportHeight.mjs +16 -0
  218. package/shortcutContexts/commands/index.js +52 -0
  219. package/shortcutContexts/commands/index.mjs +48 -0
  220. package/shortcutContexts/commands/moveCellSelection/down.js +12 -0
  221. package/shortcutContexts/commands/moveCellSelection/down.mjs +7 -0
  222. package/shortcutContexts/commands/moveCellSelection/downByViewportHeight.js +29 -0
  223. package/shortcutContexts/commands/moveCellSelection/downByViewportHeight.mjs +24 -0
  224. package/shortcutContexts/commands/moveCellSelection/index.js +28 -0
  225. package/shortcutContexts/commands/moveCellSelection/index.mjs +24 -0
  226. package/shortcutContexts/commands/moveCellSelection/inlineEnd.js +13 -0
  227. package/shortcutContexts/commands/moveCellSelection/inlineEnd.mjs +8 -0
  228. package/shortcutContexts/commands/moveCellSelection/inlineStart.js +13 -0
  229. package/shortcutContexts/commands/moveCellSelection/inlineStart.mjs +8 -0
  230. package/shortcutContexts/commands/moveCellSelection/left.js +11 -0
  231. package/shortcutContexts/commands/moveCellSelection/left.mjs +6 -0
  232. package/shortcutContexts/commands/moveCellSelection/right.js +11 -0
  233. package/shortcutContexts/commands/moveCellSelection/right.mjs +6 -0
  234. package/shortcutContexts/commands/moveCellSelection/toMostBottom.js +16 -0
  235. package/shortcutContexts/commands/moveCellSelection/toMostBottom.mjs +11 -0
  236. package/shortcutContexts/commands/moveCellSelection/toMostBottomInlineEnd.js +17 -0
  237. package/shortcutContexts/commands/moveCellSelection/toMostBottomInlineEnd.mjs +12 -0
  238. package/shortcutContexts/commands/moveCellSelection/toMostInlineEnd.js +13 -0
  239. package/shortcutContexts/commands/moveCellSelection/toMostInlineEnd.mjs +8 -0
  240. package/shortcutContexts/commands/moveCellSelection/toMostInlineStart.js +16 -0
  241. package/shortcutContexts/commands/moveCellSelection/toMostInlineStart.mjs +11 -0
  242. package/shortcutContexts/commands/moveCellSelection/toMostLeft.js +36 -0
  243. package/shortcutContexts/commands/moveCellSelection/toMostLeft.mjs +31 -0
  244. package/shortcutContexts/commands/moveCellSelection/toMostRight.js +36 -0
  245. package/shortcutContexts/commands/moveCellSelection/toMostRight.mjs +31 -0
  246. package/shortcutContexts/commands/moveCellSelection/toMostTop.js +16 -0
  247. package/shortcutContexts/commands/moveCellSelection/toMostTop.mjs +11 -0
  248. package/shortcutContexts/commands/moveCellSelection/toMostTopInlineStart.js +18 -0
  249. package/shortcutContexts/commands/moveCellSelection/toMostTopInlineStart.mjs +13 -0
  250. package/shortcutContexts/commands/moveCellSelection/up.js +12 -0
  251. package/shortcutContexts/commands/moveCellSelection/up.mjs +7 -0
  252. package/shortcutContexts/commands/moveCellSelection/upByViewportHeight.js +29 -0
  253. package/shortcutContexts/commands/moveCellSelection/upByViewportHeight.mjs +24 -0
  254. package/shortcutContexts/commands/populateSelectedCellsData.js +35 -0
  255. package/shortcutContexts/commands/populateSelectedCellsData.mjs +30 -0
  256. package/shortcutContexts/commands/selectAll.js +11 -0
  257. package/shortcutContexts/commands/selectAll.mjs +6 -0
  258. package/shortcutContexts/constants.js +19 -0
  259. package/shortcutContexts/constants.mjs +12 -0
  260. package/shortcutContexts/editor.js +29 -0
  261. package/shortcutContexts/editor.mjs +25 -0
  262. package/shortcutContexts/grid.js +247 -0
  263. package/shortcutContexts/grid.mjs +243 -0
  264. package/shortcutContexts/index.js +29 -0
  265. package/shortcutContexts/index.mjs +15 -0
  266. package/shortcuts/manager.js +2 -0
  267. package/shortcuts/manager.mjs +2 -0
  268. package/shortcuts/recorder.js +2 -2
  269. package/shortcuts/recorder.mjs +2 -2
  270. package/shortcuts/utils.js +21 -5
  271. package/shortcuts/utils.mjs +20 -4
  272. package/tableView.js +58 -9
  273. package/tableView.mjs +58 -9
  274. package/translations/indexMapper.js +8 -9
  275. package/translations/indexMapper.mjs +8 -9
  276. package/3rdparty/walkontable/src/selection.js +0 -355
  277. package/3rdparty/walkontable/src/selection.mjs +0 -349
  278. package/selection/highlight/constants.js +0 -16
  279. package/selection/highlight/constants.mjs +0 -6
package/core.mjs CHANGED
@@ -15,12 +15,12 @@ import "core-js/modules/es.set.js";
15
15
  import "core-js/modules/es.string.iterator.js";
16
16
  import "core-js/modules/web.dom-collections.iterator.js";
17
17
  import "core-js/modules/es.array.includes.js";
18
+ import "core-js/modules/es.array.concat.js";
18
19
  import "core-js/modules/es.array.sort.js";
19
20
  import "core-js/modules/es.array.splice.js";
20
21
  import "core-js/modules/es.number.is-integer.js";
21
22
  import "core-js/modules/es.number.constructor.js";
22
23
  import "core-js/modules/es.array.slice.js";
23
- import "core-js/modules/es.array.concat.js";
24
24
  import "core-js/modules/es.array.fill.js";
25
25
  import "core-js/modules/es.array.map.js";
26
26
  import "core-js/modules/es.regexp.exec.js";
@@ -32,7 +32,6 @@ import "core-js/modules/es.array.reverse.js";
32
32
  import "core-js/modules/web.dom-collections.for-each.js";
33
33
  import "core-js/modules/web.timers.js";
34
34
  import "core-js/modules/web.immediate.js";
35
- import "core-js/modules/es.map.js";
36
35
  import "core-js/modules/es.symbol.js";
37
36
  import "core-js/modules/es.symbol.description.js";
38
37
  import "core-js/modules/es.symbol.iterator.js";
@@ -66,7 +65,7 @@ import { Selection } from "./selection/index.mjs";
66
65
  import { MetaManager, DynamicCellMetaMod, ExtendMetaPropertiesMod, replaceData } from "./dataMap/index.mjs";
67
66
  import { createUniqueMap } from "./utils/dataStructures/uniqueMap.mjs";
68
67
  import { createShortcutManager } from "./shortcuts/index.mjs";
69
- var SHORTCUTS_GROUP = 'gridDefault';
68
+ import { registerAllShortcutContexts } from "./shortcutContexts/index.mjs";
70
69
  var activeGuid = null;
71
70
 
72
71
  /**
@@ -290,12 +289,8 @@ export default function Core(rootElement, userSettings) {
290
289
  };
291
290
 
292
291
  var selection = new Selection(tableMeta, {
293
- rowIndexMapper: function rowIndexMapper() {
294
- return instance.rowIndexMapper;
295
- },
296
- columnIndexMapper: function columnIndexMapper() {
297
- return instance.columnIndexMapper;
298
- },
292
+ rowIndexMapper: instance.rowIndexMapper,
293
+ columnIndexMapper: instance.columnIndexMapper,
299
294
  countCols: function countCols() {
300
295
  return instance.countCols();
301
296
  },
@@ -308,12 +303,18 @@ export default function Core(rootElement, userSettings) {
308
303
  isEditorOpened: function isEditorOpened() {
309
304
  return instance.getActiveEditor() ? instance.getActiveEditor().isOpened() : false;
310
305
  },
311
- countColsTranslated: function countColsTranslated() {
306
+ countRenderableColumns: function countRenderableColumns() {
312
307
  return _this.view.countRenderableColumns();
313
308
  },
314
- countRowsTranslated: function countRowsTranslated() {
309
+ countRenderableRows: function countRenderableRows() {
315
310
  return _this.view.countRenderableRows();
316
311
  },
312
+ countRowHeaders: function countRowHeaders() {
313
+ return _this.countRowHeaders();
314
+ },
315
+ countColHeaders: function countColHeaders() {
316
+ return _this.countColHeaders();
317
+ },
317
318
  getShortcutManager: function getShortcutManager() {
318
319
  return instance.getShortcutManager();
319
320
  },
@@ -346,12 +347,6 @@ export default function Core(rootElement, userSettings) {
346
347
  });
347
348
  this.selection.addLocalHook('beforeSetRangeEnd', function (cellCoords) {
348
349
  _this.runHooks('beforeSetRangeEnd', cellCoords);
349
- if (cellCoords.row < 0) {
350
- cellCoords.row = _this.view._wt.wtTable.getFirstVisibleRow();
351
- }
352
- if (cellCoords.col < 0) {
353
- cellCoords.col = _this.view._wt.wtTable.getFirstVisibleColumn();
354
- }
355
350
  });
356
351
  this.selection.addLocalHook('afterSetRangeEnd', function (cellCoords) {
357
352
  var preventScrolling = createObjectPropListener(false);
@@ -377,7 +372,14 @@ export default function Core(rootElement, userSettings) {
377
372
  if (scrollToCell !== false) {
378
373
  if (!isSelectedByAnyHeader) {
379
374
  if (currentSelectedRange && !_this.selection.isMultiple()) {
380
- _this.view.scrollViewport(visualToRenderableCoords(currentSelectedRange.from));
375
+ var renderableCoords = visualToRenderableCoords(currentSelectedRange.from);
376
+ if (renderableCoords.row < 0 && renderableCoords.col >= 0) {
377
+ _this.view.scrollViewportHorizontally(renderableCoords.col);
378
+ } else if (renderableCoords.col < 0 && renderableCoords.row >= 0) {
379
+ _this.view.scrollViewportVertically(renderableCoords.row);
380
+ } else {
381
+ _this.view.scrollViewport(renderableCoords);
382
+ }
381
383
  } else {
382
384
  _this.view.scrollViewport(visualToRenderableCoords(cellCoords));
383
385
  }
@@ -418,6 +420,30 @@ export default function Core(rootElement, userSettings) {
418
420
  isMultiple.value = changedIsMultiple;
419
421
  }
420
422
  });
423
+ this.selection.addLocalHook('beforeSelectColumns', function () {
424
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
425
+ args[_key] = arguments[_key];
426
+ }
427
+ return _this.runHooks.apply(_this, ['beforeSelectColumns'].concat(args));
428
+ });
429
+ this.selection.addLocalHook('afterSelectColumns', function () {
430
+ for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
431
+ args[_key2] = arguments[_key2];
432
+ }
433
+ return _this.runHooks.apply(_this, ['afterSelectColumns'].concat(args));
434
+ });
435
+ this.selection.addLocalHook('beforeSelectRows', function () {
436
+ for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
437
+ args[_key3] = arguments[_key3];
438
+ }
439
+ return _this.runHooks.apply(_this, ['beforeSelectRows'].concat(args));
440
+ });
441
+ this.selection.addLocalHook('afterSelectRows', function () {
442
+ for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
443
+ args[_key4] = arguments[_key4];
444
+ }
445
+ return _this.runHooks.apply(_this, ['afterSelectRows'].concat(args));
446
+ });
421
447
  this.selection.addLocalHook('beforeModifyTransformStart', function (cellCoordsDelta) {
422
448
  _this.runHooks('modifyTransformStart', cellCoordsDelta);
423
449
  });
@@ -1576,8 +1602,8 @@ export default function Core(rootElement, userSettings) {
1576
1602
  */
1577
1603
  this.spliceCol = function (column, index, amount) {
1578
1604
  var _datamap;
1579
- for (var _len = arguments.length, elements = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {
1580
- elements[_key - 3] = arguments[_key];
1605
+ for (var _len5 = arguments.length, elements = new Array(_len5 > 3 ? _len5 - 3 : 0), _key5 = 3; _key5 < _len5; _key5++) {
1606
+ elements[_key5 - 3] = arguments[_key5];
1581
1607
  }
1582
1608
  return (_datamap = datamap).spliceCol.apply(_datamap, [column, index, amount].concat(elements));
1583
1609
  };
@@ -1595,8 +1621,8 @@ export default function Core(rootElement, userSettings) {
1595
1621
  */
1596
1622
  this.spliceRow = function (row, index, amount) {
1597
1623
  var _datamap2;
1598
- for (var _len2 = arguments.length, elements = new Array(_len2 > 3 ? _len2 - 3 : 0), _key2 = 3; _key2 < _len2; _key2++) {
1599
- elements[_key2 - 3] = arguments[_key2];
1624
+ for (var _len6 = arguments.length, elements = new Array(_len6 > 3 ? _len6 - 3 : 0), _key6 = 3; _key6 < _len6; _key6++) {
1625
+ elements[_key6 - 3] = arguments[_key6];
1600
1626
  }
1601
1627
  return (_datamap2 = datamap).spliceRow.apply(_datamap2, [row, index, amount].concat(elements));
1602
1628
  };
@@ -1692,6 +1718,9 @@ export default function Core(rootElement, userSettings) {
1692
1718
  }
1693
1719
  var changes = [];
1694
1720
  arrayEach(selection.getSelectedRange(), function (cellRange) {
1721
+ if (cellRange.isSingleHeader()) {
1722
+ return;
1723
+ }
1695
1724
  var topStart = cellRange.getTopStartCorner();
1696
1725
  var bottomEnd = cellRange.getBottomEndCorner();
1697
1726
  rangeEach(topStart.row, bottomEnd.row, function (row) {
@@ -3006,8 +3035,8 @@ export default function Core(rootElement, userSettings) {
3006
3035
  this.spliceCellsMeta = function (visualIndex) {
3007
3036
  var _this5 = this;
3008
3037
  var deleteAmount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
3009
- for (var _len3 = arguments.length, cellMetaRows = new Array(_len3 > 2 ? _len3 - 2 : 0), _key3 = 2; _key3 < _len3; _key3++) {
3010
- cellMetaRows[_key3 - 2] = arguments[_key3];
3038
+ for (var _len7 = arguments.length, cellMetaRows = new Array(_len7 > 2 ? _len7 - 2 : 0), _key7 = 2; _key7 < _len7; _key7++) {
3039
+ cellMetaRows[_key7 - 2] = arguments[_key7];
3011
3040
  }
3012
3041
  if (cellMetaRows.length > 0 && !Array.isArray(cellMetaRows[0])) {
3013
3042
  throw new Error('The 3rd argument (cellMetaRows) has to be passed as an array of cell meta objects array.');
@@ -3701,6 +3730,30 @@ export default function Core(rootElement, userSettings) {
3701
3730
  return instance.view._wt.drawn ? instance.view._wt.wtTable.getVisibleColumnsCount() : -1;
3702
3731
  };
3703
3732
 
3733
+ /**
3734
+ * Returns the number of rendered row headers.
3735
+ *
3736
+ * @since 13.0.0
3737
+ * @memberof Core#
3738
+ * @function countRowHeaders
3739
+ * @returns {number} Number of row headers.
3740
+ */
3741
+ this.countRowHeaders = function () {
3742
+ return this.view.getRowHeadersCount();
3743
+ };
3744
+
3745
+ /**
3746
+ * Returns the number of rendered column headers.
3747
+ *
3748
+ * @since 13.0.0
3749
+ * @memberof Core#
3750
+ * @function countColHeaders
3751
+ * @returns {number} Number of column headers.
3752
+ */
3753
+ this.countColHeaders = function () {
3754
+ return this.view.getColumnHeadersCount();
3755
+ };
3756
+
3704
3757
  /**
3705
3758
  * Returns the number of empty rows. If the optional ending parameter is `true`, returns the
3706
3759
  * number of empty rows at the bottom of the table.
@@ -3905,6 +3958,10 @@ export default function Core(rootElement, userSettings) {
3905
3958
  * hot.selectColumns('id');
3906
3959
  * // Select range of columns using visual indexes.
3907
3960
  * hot.selectColumns(1, 4);
3961
+ * // Select range of columns using visual indexes and mark the first header as highlighted.
3962
+ * hot.selectColumns(1, 2, -1);
3963
+ * // Select range of columns using visual indexes and mark the second cell as highlighted.
3964
+ * hot.selectColumns(2, 1, 1);
3908
3965
  * // Select range of columns using column properties.
3909
3966
  * hot.selectColumns('id', 'last_name');
3910
3967
  * ```
@@ -3915,11 +3972,15 @@ export default function Core(rootElement, userSettings) {
3915
3972
  * @param {number} startColumn The visual column index from which the selection starts.
3916
3973
  * @param {number} [endColumn=startColumn] The visual column index to which the selection finishes. If `endColumn`
3917
3974
  * is not defined the column defined by `startColumn` will be selected.
3975
+ * @param {number} [focusPosition=0] The argument allows changing the cell/header focus position.
3976
+ * The value can take visual row index from -N to N, where negative values
3977
+ * point to the headers and positive values point to the cell range.
3918
3978
  * @returns {boolean} `true` if selection was successful, `false` otherwise.
3919
3979
  */
3920
3980
  this.selectColumns = function (startColumn) {
3921
3981
  var endColumn = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : startColumn;
3922
- return selection.selectColumns(startColumn, endColumn);
3982
+ var focusPosition = arguments.length > 2 ? arguments[2] : undefined;
3983
+ return selection.selectColumns(startColumn, endColumn, focusPosition);
3923
3984
  };
3924
3985
 
3925
3986
  /**
@@ -3929,8 +3990,12 @@ export default function Core(rootElement, userSettings) {
3929
3990
  * ```js
3930
3991
  * // Select row using visual index.
3931
3992
  * hot.selectRows(1);
3932
- * // Select range of rows using visual indexes.
3993
+ * // select a range of rows, using visual indexes.
3933
3994
  * hot.selectRows(1, 4);
3995
+ * // select a range of rows, using visual indexes, and mark the header as highlighted.
3996
+ * hot.selectRows(1, 2, -1);
3997
+ * // Select range of rows using visual indexes and mark the second cell as highlighted.
3998
+ * hot.selectRows(2, 1, 1);
3934
3999
  * ```
3935
4000
  *
3936
4001
  * @memberof Core#
@@ -3939,11 +4004,15 @@ export default function Core(rootElement, userSettings) {
3939
4004
  * @param {number} startRow The visual row index from which the selection starts.
3940
4005
  * @param {number} [endRow=startRow] The visual row index to which the selection finishes. If `endRow`
3941
4006
  * is not defined the row defined by `startRow` will be selected.
4007
+ * @param {number} [focusPosition=0] The argument allows changing the cell/header focus position.
4008
+ * The value can take visual column index from -N to N, where negative values
4009
+ * point to the headers and positive values point to the cell range.
3942
4010
  * @returns {boolean} `true` if selection was successful, `false` otherwise.
3943
4011
  */
3944
4012
  this.selectRows = function (startRow) {
3945
4013
  var endRow = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : startRow;
3946
- return selection.selectRows(startRow, endRow);
4014
+ var focusPosition = arguments.length > 2 ? arguments[2] : undefined;
4015
+ return selection.selectRows(startRow, endRow, focusPosition);
3947
4016
  };
3948
4017
 
3949
4018
  /**
@@ -3962,9 +4031,16 @@ export default function Core(rootElement, userSettings) {
3962
4031
  * The previous selection is overwritten.
3963
4032
  *
3964
4033
  * ```js
3965
- * // select all cells in the table, including all headers
4034
+ * // select all cells in the table, including all headers and the corner cell
3966
4035
  * hot.selectAll();
3967
4036
  *
4037
+ * // select all cells in the table, including row headers but excluding the corner cell
4038
+ * hot.selectAll(true, false);
4039
+ *
4040
+ * // select all cells in the table, including all headers and the corner cell, but move the focus
4041
+ * // highlight to position -2, -1
4042
+ * hot.selectAll(-2, -1);
4043
+ *
3968
4044
  * // select all cells in the table, without headers
3969
4045
  * hot.selectAll(false);
3970
4046
  * ```
@@ -3972,15 +4048,20 @@ export default function Core(rootElement, userSettings) {
3972
4048
  * @since 0.38.2
3973
4049
  * @memberof Core#
3974
4050
  * @function selectAll
3975
- * @param {boolean} [includeHeaders=true] `true`: include all row, column and corner headers.
3976
- * `false`: don't include any headers.
4051
+ * @param {boolean} [includeRowHeaders=false] `true` If the selection should include the row headers,
4052
+ * `false` otherwise.
4053
+ * @param {boolean} [includeColumnHeaders=false] `true` If the selection should include the column
4054
+ * headers, `false` otherwise.
4055
+ * @param {{row: number, col: number}} [focusPosition] The argument allows changing the cell/header
4056
+ * focus position. The value takes an object with a `row` and `col` properties (visual indexes)
4057
+ * from -N to N, where negative values point to the headers and positive values point to the cell range.
3977
4058
  */
3978
4059
  this.selectAll = function () {
3979
- var includeHeaders = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
3980
- var includeRowHeaders = includeHeaders && this.hasRowHeaders();
3981
- var includeColumnHeaders = includeHeaders && this.hasColHeaders();
4060
+ var includeRowHeaders = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
4061
+ var includeColumnHeaders = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : includeRowHeaders;
4062
+ var focusPosition = arguments.length > 2 ? arguments[2] : undefined;
3982
4063
  preventScrollingToCell = true;
3983
- selection.selectAll(includeRowHeaders, includeColumnHeaders);
4064
+ selection.selectAll(includeRowHeaders, includeColumnHeaders, focusPosition);
3984
4065
  preventScrollingToCell = false;
3985
4066
  };
3986
4067
  var getIndexToScroll = function getIndexToScroll(indexMapper, visualIndex) {
@@ -4384,6 +4465,16 @@ export default function Core(rootElement, userSettings) {
4384
4465
  }
4385
4466
  };
4386
4467
 
4468
+ /**
4469
+ * Gets the instance of the EditorManager.
4470
+ *
4471
+ * @private
4472
+ * @returns {EditorManager}
4473
+ */
4474
+ this._getEditorManager = function () {
4475
+ return editorManager;
4476
+ };
4477
+
4387
4478
  /**
4388
4479
  * Check if currently it is RTL direction.
4389
4480
  *
@@ -4456,284 +4547,11 @@ export default function Core(rootElement, userSettings) {
4456
4547
  this.getShortcutManager = function () {
4457
4548
  return shortcutManager;
4458
4549
  };
4459
- var gridContext = shortcutManager.addContext('grid');
4460
- var gridConfig = {
4461
- runOnlyIf: function runOnlyIf() {
4462
- return isDefined(instance.getSelected()) && instance.countRenderedRows() > 0 && instance.countRenderedCols() > 0;
4463
- },
4464
- group: SHORTCUTS_GROUP
4465
- };
4466
- shortcutManager.setActiveContextName('grid');
4467
- gridContext.addShortcuts([{
4468
- keys: [['Control/Meta', 'A']],
4469
- callback: function callback() {
4470
- instance.selectAll();
4471
- }
4472
- }, {
4473
- keys: [['Control/Meta', 'Enter']],
4474
- callback: function callback() {
4475
- var selectedRange = instance.getSelectedRange();
4476
- var _selectedRange$highli = selectedRange[selectedRange.length - 1].highlight,
4477
- highlightRow = _selectedRange$highli.row,
4478
- highlightColumn = _selectedRange$highli.col;
4479
- var valueToPopulate = instance.getDataAtCell(highlightRow, highlightColumn);
4480
- var cellValues = new Map();
4481
- for (var i = 0; i < selectedRange.length; i++) {
4482
- selectedRange[i].forAll(function (row, column) {
4483
- if (row >= 0 && column >= 0 && (row !== highlightRow || column !== highlightColumn)) {
4484
- var _instance$getCellMeta = instance.getCellMeta(row, column),
4485
- readOnly = _instance$getCellMeta.readOnly;
4486
- if (!readOnly) {
4487
- cellValues.set("".concat(row, "x").concat(column), [row, column, valueToPopulate]);
4488
- }
4489
- }
4490
- });
4491
- }
4492
- instance.setDataAtCell(Array.from(cellValues.values()));
4493
- },
4494
- runOnlyIf: function runOnlyIf() {
4495
- return instance.getSelectedRangeLast().getCellsCount() > 1;
4496
- }
4497
- }, {
4498
- keys: [['ArrowUp']],
4499
- callback: function callback() {
4500
- selection.transformStart(-1, 0);
4501
- }
4502
- }, {
4503
- keys: [['ArrowUp', 'Control/Meta']],
4504
- captureCtrl: true,
4505
- callback: function callback() {
4506
- selection.setRangeStart(instance._createCellCoords(instance.rowIndexMapper.getNearestNotHiddenIndex(0, 1), instance.getSelectedRangeLast().highlight.col));
4507
- }
4508
- }, {
4509
- keys: [['ArrowUp', 'Shift']],
4510
- callback: function callback() {
4511
- selection.transformEnd(-1, 0);
4512
- }
4513
- }, {
4514
- keys: [['ArrowUp', 'Shift', 'Control/Meta']],
4515
- captureCtrl: true,
4516
- callback: function callback() {
4517
- var _instance$getSelected = instance.getSelectedRangeLast(),
4518
- from = _instance$getSelected.from,
4519
- to = _instance$getSelected.to;
4520
- var row = instance.rowIndexMapper.getNearestNotHiddenIndex(0, 1);
4521
- selection.setRangeStart(from.clone());
4522
- selection.setRangeEnd(instance._createCellCoords(row, to.col));
4523
- },
4524
- runOnlyIf: function runOnlyIf() {
4525
- return !(instance.selection.isSelectedByCorner() || instance.selection.isSelectedByColumnHeader());
4526
- }
4527
- }, {
4528
- keys: [['ArrowDown']],
4529
- callback: function callback() {
4530
- selection.transformStart(1, 0);
4531
- }
4532
- }, {
4533
- keys: [['ArrowDown', 'Control/Meta']],
4534
- captureCtrl: true,
4535
- callback: function callback() {
4536
- selection.setRangeStart(instance._createCellCoords(instance.rowIndexMapper.getNearestNotHiddenIndex(instance.countRows() - 1, -1), instance.getSelectedRangeLast().highlight.col));
4537
- }
4538
- }, {
4539
- keys: [['ArrowDown', 'Shift']],
4540
- callback: function callback() {
4541
- selection.transformEnd(1, 0);
4542
- }
4543
- }, {
4544
- keys: [['ArrowDown', 'Shift', 'Control/Meta']],
4545
- captureCtrl: true,
4546
- callback: function callback() {
4547
- var _instance$getSelected2 = instance.getSelectedRangeLast(),
4548
- from = _instance$getSelected2.from,
4549
- to = _instance$getSelected2.to;
4550
- var row = instance.rowIndexMapper.getNearestNotHiddenIndex(instance.countRows() - 1, -1);
4551
- selection.setRangeStart(from.clone());
4552
- selection.setRangeEnd(instance._createCellCoords(row, to.col));
4553
- },
4554
- runOnlyIf: function runOnlyIf() {
4555
- return !(instance.selection.isSelectedByCorner() || instance.selection.isSelectedByColumnHeader());
4556
- }
4557
- }, {
4558
- keys: [['ArrowLeft']],
4559
- callback: function callback() {
4560
- selection.transformStart(0, -1 * instance.getDirectionFactor());
4561
- }
4562
- }, {
4563
- keys: [['ArrowLeft', 'Control/Meta']],
4564
- captureCtrl: true,
4565
- callback: function callback() {
4566
- var _instance$columnIndex;
4567
- var row = instance.getSelectedRangeLast().highlight.row;
4568
- var column = (_instance$columnIndex = instance.columnIndexMapper).getNearestNotHiddenIndex.apply(_instance$columnIndex, _toConsumableArray(instance.isRtl() ? [instance.countCols() - 1, -1] : [0, 1]));
4569
- selection.setRangeStart(instance._createCellCoords(row, column));
4570
- }
4571
- }, {
4572
- keys: [['ArrowLeft', 'Shift']],
4573
- callback: function callback() {
4574
- selection.transformEnd(0, -1 * instance.getDirectionFactor());
4575
- }
4576
- }, {
4577
- keys: [['ArrowLeft', 'Shift', 'Control/Meta']],
4578
- captureCtrl: true,
4579
- callback: function callback() {
4580
- var _instance$columnIndex2;
4581
- var _instance$getSelected3 = instance.getSelectedRangeLast(),
4582
- from = _instance$getSelected3.from,
4583
- to = _instance$getSelected3.to;
4584
- var column = (_instance$columnIndex2 = instance.columnIndexMapper).getNearestNotHiddenIndex.apply(_instance$columnIndex2, _toConsumableArray(instance.isRtl() ? [instance.countCols() - 1, -1] : [0, 1]));
4585
- selection.setRangeStart(from.clone());
4586
- selection.setRangeEnd(instance._createCellCoords(to.row, column));
4587
- },
4588
- runOnlyIf: function runOnlyIf() {
4589
- return !(instance.selection.isSelectedByCorner() || instance.selection.isSelectedByRowHeader());
4590
- }
4591
- }, {
4592
- keys: [['ArrowRight']],
4593
- callback: function callback() {
4594
- selection.transformStart(0, instance.getDirectionFactor());
4595
- }
4596
- }, {
4597
- keys: [['ArrowRight', 'Control/Meta']],
4598
- captureCtrl: true,
4599
- callback: function callback() {
4600
- var _instance$columnIndex3;
4601
- var row = instance.getSelectedRangeLast().highlight.row;
4602
- var column = (_instance$columnIndex3 = instance.columnIndexMapper).getNearestNotHiddenIndex.apply(_instance$columnIndex3, _toConsumableArray(instance.isRtl() ? [0, 1] : [instance.countCols() - 1, -1]));
4603
- selection.setRangeStart(instance._createCellCoords(row, column));
4604
- }
4605
- }, {
4606
- keys: [['ArrowRight', 'Shift']],
4607
- callback: function callback() {
4608
- selection.transformEnd(0, instance.getDirectionFactor());
4609
- }
4610
- }, {
4611
- keys: [['ArrowRight', 'Shift', 'Control/Meta']],
4612
- captureCtrl: true,
4613
- callback: function callback() {
4614
- var _instance$columnIndex4;
4615
- var _instance$getSelected4 = instance.getSelectedRangeLast(),
4616
- from = _instance$getSelected4.from,
4617
- to = _instance$getSelected4.to;
4618
- var column = (_instance$columnIndex4 = instance.columnIndexMapper).getNearestNotHiddenIndex.apply(_instance$columnIndex4, _toConsumableArray(instance.isRtl() ? [0, 1] : [instance.countCols() - 1, -1]));
4619
- selection.setRangeStart(from.clone());
4620
- selection.setRangeEnd(instance._createCellCoords(to.row, column));
4621
- },
4622
- runOnlyIf: function runOnlyIf() {
4623
- return !(instance.selection.isSelectedByCorner() || instance.selection.isSelectedByRowHeader());
4624
- }
4625
- }, {
4626
- keys: [['Home']],
4627
- captureCtrl: true,
4628
- callback: function callback() {
4629
- var fixedColumns = parseInt(instance.getSettings().fixedColumnsStart, 10);
4630
- var row = instance.getSelectedRangeLast().highlight.row;
4631
- var column = instance.columnIndexMapper.getNearestNotHiddenIndex(fixedColumns, 1);
4632
- selection.setRangeStart(instance._createCellCoords(row, column));
4633
- },
4634
- runOnlyIf: function runOnlyIf() {
4635
- return instance.view.isMainTableNotFullyCoveredByOverlays();
4636
- }
4637
- }, {
4638
- keys: [['Home', 'Shift']],
4639
- callback: function callback() {
4640
- selection.setRangeEnd(instance._createCellCoords(selection.selectedRange.current().from.row, instance.columnIndexMapper.getNearestNotHiddenIndex(0, 1)));
4641
- }
4642
- }, {
4643
- keys: [['Home', 'Control/Meta']],
4644
- captureCtrl: true,
4645
- callback: function callback() {
4646
- var fixedRows = parseInt(instance.getSettings().fixedRowsTop, 10);
4647
- var fixedColumns = parseInt(instance.getSettings().fixedColumnsStart, 10);
4648
- var row = instance.rowIndexMapper.getNearestNotHiddenIndex(fixedRows, 1);
4649
- var column = instance.columnIndexMapper.getNearestNotHiddenIndex(fixedColumns, 1);
4650
- selection.setRangeStart(instance._createCellCoords(row, column));
4651
- },
4652
- runOnlyIf: function runOnlyIf() {
4653
- return instance.view.isMainTableNotFullyCoveredByOverlays();
4654
- }
4655
- }, {
4656
- keys: [['End']],
4657
- captureCtrl: true,
4658
- callback: function callback() {
4659
- selection.setRangeStart(instance._createCellCoords(instance.getSelectedRangeLast().highlight.row, instance.columnIndexMapper.getNearestNotHiddenIndex(instance.countCols() - 1, -1)));
4660
- },
4661
- runOnlyIf: function runOnlyIf() {
4662
- return instance.view.isMainTableNotFullyCoveredByOverlays();
4663
- }
4664
- }, {
4665
- keys: [['End', 'Shift']],
4666
- callback: function callback() {
4667
- selection.setRangeEnd(instance._createCellCoords(selection.selectedRange.current().from.row, instance.columnIndexMapper.getNearestNotHiddenIndex(instance.countCols() - 1, -1)));
4668
- }
4669
- }, {
4670
- keys: [['End', 'Control/Meta']],
4671
- captureCtrl: true,
4672
- callback: function callback() {
4673
- var fixedRows = parseInt(instance.getSettings().fixedRowsBottom, 10);
4674
- var row = instance.rowIndexMapper.getNearestNotHiddenIndex(instance.countRows() - fixedRows - 1, -1);
4675
- var column = instance.columnIndexMapper.getNearestNotHiddenIndex(instance.countCols() - 1, -1);
4676
- selection.setRangeStart(instance._createCellCoords(row, column));
4677
- },
4678
- runOnlyIf: function runOnlyIf() {
4679
- return instance.view.isMainTableNotFullyCoveredByOverlays();
4680
- }
4681
- }, {
4682
- keys: [['PageUp']],
4683
- callback: function callback() {
4684
- selection.transformStart(-instance.countVisibleRows(), 0);
4685
- }
4686
- }, {
4687
- keys: [['PageUp', 'Shift']],
4688
- callback: function callback() {
4689
- var _instance$getSelected5 = instance.getSelectedRangeLast(),
4690
- to = _instance$getSelected5.to;
4691
- var nextRowIndexToSelect = Math.max(to.row - instance.countVisibleRows(), 0);
4692
- var row = instance.rowIndexMapper.getNearestNotHiddenIndex(nextRowIndexToSelect, 1);
4693
- if (row !== null) {
4694
- var coords = instance._createCellCoords(row, to.col);
4695
- var scrollPadding = to.row - instance.view.getFirstFullyVisibleRow();
4696
- var nextVerticalScroll = Math.max(coords.row - scrollPadding, 0);
4697
- selection.setRangeEnd(coords);
4698
- instance.scrollViewportTo(nextVerticalScroll);
4699
- }
4700
- }
4701
- }, {
4702
- keys: [['PageDown']],
4703
- callback: function callback() {
4704
- selection.transformStart(instance.countVisibleRows(), 0);
4705
- }
4706
- }, {
4707
- keys: [['PageDown', 'Shift']],
4708
- callback: function callback() {
4709
- var _instance$getSelected6 = instance.getSelectedRangeLast(),
4710
- to = _instance$getSelected6.to;
4711
- var nextRowIndexToSelect = Math.min(to.row + instance.countVisibleRows(), instance.countRows() - 1);
4712
- var row = instance.rowIndexMapper.getNearestNotHiddenIndex(nextRowIndexToSelect, -1);
4713
- if (row !== null) {
4714
- var coords = instance._createCellCoords(row, to.col);
4715
- var scrollPadding = to.row - instance.view.getFirstFullyVisibleRow();
4716
- var nextVerticalScroll = Math.min(coords.row - scrollPadding, instance.countRows() - 1);
4717
- selection.setRangeEnd(coords);
4718
- instance.scrollViewportTo(nextVerticalScroll);
4719
- }
4720
- }
4721
- }, {
4722
- keys: [['Tab']],
4723
- callback: function callback(event) {
4724
- var tabMoves = typeof tableMeta.tabMoves === 'function' ? tableMeta.tabMoves(event) : tableMeta.tabMoves;
4725
- selection.transformStart(tabMoves.row, tabMoves.col, true);
4726
- }
4727
- }, {
4728
- keys: [['Shift', 'Tab']],
4729
- callback: function callback(event) {
4730
- var tabMoves = typeof tableMeta.tabMoves === 'function' ? tableMeta.tabMoves(event) : tableMeta.tabMoves;
4731
- selection.transformStart(-tabMoves.row, -tabMoves.col);
4732
- }
4733
- }], gridConfig);
4734
4550
  getPluginsNames().forEach(function (pluginName) {
4735
4551
  var PluginClass = getPlugin(pluginName);
4736
4552
  pluginsRegistry.addItem(pluginName, new PluginClass(_this));
4737
4553
  });
4554
+ registerAllShortcutContexts(instance);
4555
+ shortcutManager.setActiveContextName('grid');
4738
4556
  Hooks.getSingleton().run(instance, 'construct');
4739
4557
  }
@@ -3112,6 +3112,25 @@ var _default = function _default() {
3112
3112
  * ```
3113
3113
  */
3114
3114
  multiColumnSorting: void 0,
3115
+ /**
3116
+ * When set to `true`, the `navigableHeaders` option lets you navigate [row headers](@/guides/rows/row-header.md) and [column headers](@/guides/columns/column-header.md), using the arrow keys or the <kbd>**Tab**</kbd> key (if the [`disableTabNavigation`](#disabletabnavigation) option is set to `false`).
3117
+ *
3118
+ * @since 13.0.0
3119
+ * @memberof Options#
3120
+ * @type {boolean}
3121
+ * @default false
3122
+ * @category Core
3123
+ *
3124
+ * @example
3125
+ * ```js
3126
+ * // you can navigate row and column headers with the keyboard
3127
+ * navigableHeaders: true,
3128
+ *
3129
+ * // default behavior: you can't navigate row and column headers with the keyboard
3130
+ * navigableHeaders: false,
3131
+ * ```
3132
+ */
3133
+ navigableHeaders: false,
3115
3134
  /**
3116
3135
  * @description
3117
3136
  * The `nestedHeaders` option configures the [`NestedHeaders`](@/api/nestedHeaders.md) plugin.
@@ -3108,6 +3108,25 @@ export default (function () {
3108
3108
  * ```
3109
3109
  */
3110
3110
  multiColumnSorting: void 0,
3111
+ /**
3112
+ * When set to `true`, the `navigableHeaders` option lets you navigate [row headers](@/guides/rows/row-header.md) and [column headers](@/guides/columns/column-header.md), using the arrow keys or the <kbd>**Tab**</kbd> key (if the [`disableTabNavigation`](#disabletabnavigation) option is set to `false`).
3113
+ *
3114
+ * @since 13.0.0
3115
+ * @memberof Options#
3116
+ * @type {boolean}
3117
+ * @default false
3118
+ * @category Core
3119
+ *
3120
+ * @example
3121
+ * ```js
3122
+ * // you can navigate row and column headers with the keyboard
3123
+ * navigableHeaders: true,
3124
+ *
3125
+ * // default behavior: you can't navigate row and column headers with the keyboard
3126
+ * navigableHeaders: false,
3127
+ * ```
3128
+ */
3129
+ navigableHeaders: false,
3111
3130
  /**
3112
3131
  * @description
3113
3132
  * The `nestedHeaders` option configures the [`NestedHeaders`](@/api/nestedHeaders.md) plugin.