handsontable 12.0.1 → 12.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (301) hide show
  1. package/3rdparty/walkontable/src/core/clone.js +2 -2
  2. package/3rdparty/walkontable/src/core/clone.mjs +2 -2
  3. package/3rdparty/walkontable/src/core/core.js +2 -2
  4. package/3rdparty/walkontable/src/core/core.mjs +2 -2
  5. package/3rdparty/walkontable/src/overlay/bottom.js +20 -14
  6. package/3rdparty/walkontable/src/overlay/bottom.mjs +20 -14
  7. package/3rdparty/walkontable/src/overlay/bottomInlineStartCorner.js +14 -8
  8. package/3rdparty/walkontable/src/overlay/bottomInlineStartCorner.mjs +14 -8
  9. package/3rdparty/walkontable/src/overlay/inlineStart.js +14 -5
  10. package/3rdparty/walkontable/src/overlay/inlineStart.mjs +14 -5
  11. package/3rdparty/walkontable/src/overlay/top.js +12 -3
  12. package/3rdparty/walkontable/src/overlay/top.mjs +12 -3
  13. package/3rdparty/walkontable/src/overlay/topInlineStartCorner.js +3 -3
  14. package/3rdparty/walkontable/src/overlay/topInlineStartCorner.mjs +3 -3
  15. package/3rdparty/walkontable/src/overlays.js +2 -2
  16. package/3rdparty/walkontable/src/overlays.mjs +2 -2
  17. package/3rdparty/walkontable/src/renderer/cells.js +2 -2
  18. package/3rdparty/walkontable/src/renderer/cells.mjs +2 -2
  19. package/3rdparty/walkontable/src/renderer/colGroup.js +2 -2
  20. package/3rdparty/walkontable/src/renderer/colGroup.mjs +2 -2
  21. package/3rdparty/walkontable/src/renderer/columnHeaders.js +2 -2
  22. package/3rdparty/walkontable/src/renderer/columnHeaders.mjs +2 -2
  23. package/3rdparty/walkontable/src/renderer/rowHeaders.js +2 -2
  24. package/3rdparty/walkontable/src/renderer/rowHeaders.mjs +2 -2
  25. package/3rdparty/walkontable/src/renderer/rows.js +2 -2
  26. package/3rdparty/walkontable/src/renderer/rows.mjs +2 -2
  27. package/3rdparty/walkontable/src/scroll.js +111 -63
  28. package/3rdparty/walkontable/src/scroll.mjs +110 -63
  29. package/3rdparty/walkontable/src/table/bottom.js +2 -2
  30. package/3rdparty/walkontable/src/table/bottom.mjs +2 -2
  31. package/3rdparty/walkontable/src/table/bottomInlineStartCorner.js +2 -2
  32. package/3rdparty/walkontable/src/table/bottomInlineStartCorner.mjs +2 -2
  33. package/3rdparty/walkontable/src/table/inlineStart.js +2 -2
  34. package/3rdparty/walkontable/src/table/inlineStart.mjs +2 -2
  35. package/3rdparty/walkontable/src/table/master.js +2 -2
  36. package/3rdparty/walkontable/src/table/master.mjs +2 -2
  37. package/3rdparty/walkontable/src/table/top.js +2 -2
  38. package/3rdparty/walkontable/src/table/top.mjs +2 -2
  39. package/3rdparty/walkontable/src/table/topInlineStartCorner.js +2 -2
  40. package/3rdparty/walkontable/src/table/topInlineStartCorner.mjs +2 -2
  41. package/3rdparty/walkontable/src/utils/orderView/sharedView.js +2 -2
  42. package/3rdparty/walkontable/src/utils/orderView/sharedView.mjs +2 -2
  43. package/3rdparty/walkontable/src/viewport.js +14 -22
  44. package/3rdparty/walkontable/src/viewport.mjs +14 -22
  45. package/CHANGELOG.md +32 -0
  46. package/LICENSE.txt +1 -1
  47. package/base.js +2 -2
  48. package/base.mjs +2 -2
  49. package/core.js +38 -30
  50. package/core.mjs +38 -30
  51. package/dataMap/metaManager/metaSchema.js +165 -168
  52. package/dataMap/metaManager/metaSchema.mjs +165 -168
  53. package/dist/handsontable.css +18 -18
  54. package/dist/handsontable.full.css +19 -29
  55. package/dist/handsontable.full.js +13389 -12669
  56. package/dist/handsontable.full.min.css +5 -5
  57. package/dist/handsontable.full.min.js +134 -135
  58. package/dist/handsontable.js +3961 -3794
  59. package/dist/handsontable.min.css +4 -4
  60. package/dist/handsontable.min.js +4 -4
  61. package/dist/languages/all.js +97 -33
  62. package/dist/languages/all.min.js +1 -1
  63. package/dist/languages/cs-CZ.js +167 -0
  64. package/dist/languages/cs-CZ.min.js +1 -0
  65. package/dist/languages/de-CH.js +3 -2
  66. package/dist/languages/de-CH.min.js +1 -1
  67. package/dist/languages/de-DE.js +3 -2
  68. package/dist/languages/de-DE.min.js +1 -1
  69. package/dist/languages/en-US.js +3 -2
  70. package/dist/languages/en-US.min.js +1 -1
  71. package/dist/languages/es-MX.js +3 -2
  72. package/dist/languages/es-MX.min.js +1 -1
  73. package/dist/languages/fr-FR.js +3 -2
  74. package/dist/languages/fr-FR.min.js +1 -1
  75. package/dist/languages/it-IT.js +3 -2
  76. package/dist/languages/it-IT.min.js +1 -1
  77. package/dist/languages/ja-JP.js +36 -39
  78. package/dist/languages/ja-JP.min.js +1 -1
  79. package/dist/languages/ko-KR.js +2 -2
  80. package/dist/languages/ko-KR.min.js +1 -1
  81. package/dist/languages/lv-LV.js +2 -2
  82. package/dist/languages/lv-LV.min.js +1 -1
  83. package/dist/languages/nb-NO.js +2 -2
  84. package/dist/languages/nb-NO.min.js +1 -1
  85. package/dist/languages/nl-NL.js +2 -2
  86. package/dist/languages/nl-NL.min.js +1 -1
  87. package/dist/languages/pl-PL.js +2 -2
  88. package/dist/languages/pl-PL.min.js +1 -1
  89. package/dist/languages/pt-BR.js +2 -2
  90. package/dist/languages/pt-BR.min.js +1 -1
  91. package/dist/languages/ru-RU.js +2 -2
  92. package/dist/languages/ru-RU.min.js +1 -1
  93. package/dist/languages/sr-SP.js +171 -0
  94. package/dist/languages/sr-SP.min.js +1 -0
  95. package/dist/languages/zh-CN.js +24 -24
  96. package/dist/languages/zh-CN.min.js +1 -1
  97. package/dist/languages/zh-TW.js +2 -2
  98. package/dist/languages/zh-TW.min.js +1 -1
  99. package/editors/autocompleteEditor/autocompleteEditor.js +13 -14
  100. package/editors/autocompleteEditor/autocompleteEditor.mjs +13 -14
  101. package/editors/baseEditor/baseEditor.js +2 -2
  102. package/editors/baseEditor/baseEditor.mjs +2 -2
  103. package/editors/checkboxEditor/checkboxEditor.js +2 -2
  104. package/editors/checkboxEditor/checkboxEditor.mjs +2 -2
  105. package/editors/dateEditor/dateEditor.js +3 -3
  106. package/editors/dateEditor/dateEditor.mjs +3 -3
  107. package/editors/dropdownEditor/dropdownEditor.js +3 -3
  108. package/editors/dropdownEditor/dropdownEditor.mjs +3 -3
  109. package/editors/handsontableEditor/handsontableEditor.js +3 -3
  110. package/editors/handsontableEditor/handsontableEditor.mjs +3 -3
  111. package/editors/numericEditor/numericEditor.js +2 -2
  112. package/editors/numericEditor/numericEditor.mjs +2 -2
  113. package/editors/passwordEditor/passwordEditor.js +3 -3
  114. package/editors/passwordEditor/passwordEditor.mjs +3 -3
  115. package/editors/selectEditor/selectEditor.js +3 -3
  116. package/editors/selectEditor/selectEditor.mjs +3 -3
  117. package/editors/textEditor/textEditor.js +3 -3
  118. package/editors/textEditor/textEditor.mjs +3 -3
  119. package/editors/timeEditor/timeEditor.js +3 -3
  120. package/editors/timeEditor/timeEditor.mjs +3 -3
  121. package/helpers/mixed.js +2 -2
  122. package/helpers/mixed.mjs +2 -2
  123. package/i18n/languages/cs-CZ.js +40 -0
  124. package/i18n/languages/cs-CZ.mjs +16 -0
  125. package/i18n/languages/index.js +8 -0
  126. package/i18n/languages/index.mjs +3 -1
  127. package/i18n/languages/sr-SP.js +40 -0
  128. package/i18n/languages/sr-SP.mjs +16 -0
  129. package/languages/all.js +97 -33
  130. package/languages/cs-CZ.js +167 -0
  131. package/languages/cs-CZ.mjs +18 -0
  132. package/languages/de-CH.js +3 -2
  133. package/languages/de-DE.js +3 -2
  134. package/languages/en-US.js +3 -2
  135. package/languages/es-MX.js +3 -2
  136. package/languages/fr-FR.js +3 -2
  137. package/languages/index.js +97 -33
  138. package/languages/index.mjs +3 -1
  139. package/languages/it-IT.js +3 -2
  140. package/languages/ja-JP.js +36 -39
  141. package/languages/ko-KR.js +2 -2
  142. package/languages/lv-LV.js +2 -2
  143. package/languages/nb-NO.js +2 -2
  144. package/languages/nl-NL.js +2 -2
  145. package/languages/pl-PL.js +2 -2
  146. package/languages/pt-BR.js +2 -2
  147. package/languages/ru-RU.js +2 -2
  148. package/languages/sr-SP.js +171 -0
  149. package/languages/sr-SP.mjs +18 -0
  150. package/languages/zh-CN.js +24 -24
  151. package/languages/zh-TW.js +2 -2
  152. package/package.json +22 -2
  153. package/pluginHooks.js +46 -8
  154. package/pluginHooks.mjs +46 -8
  155. package/plugins/autoColumnSize/autoColumnSize.js +3 -3
  156. package/plugins/autoColumnSize/autoColumnSize.mjs +3 -3
  157. package/plugins/autoRowSize/autoRowSize.js +3 -3
  158. package/plugins/autoRowSize/autoRowSize.mjs +3 -3
  159. package/plugins/autofill/autofill.js +3 -3
  160. package/plugins/autofill/autofill.mjs +3 -3
  161. package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.js +3 -3
  162. package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.mjs +3 -3
  163. package/plugins/bindRowsWithHeaders/maps/looseBindsMap.js +3 -3
  164. package/plugins/bindRowsWithHeaders/maps/looseBindsMap.mjs +3 -3
  165. package/plugins/bindRowsWithHeaders/maps/strictBindsMap.js +3 -3
  166. package/plugins/bindRowsWithHeaders/maps/strictBindsMap.mjs +3 -3
  167. package/plugins/collapsibleColumns/collapsibleColumns.js +3 -3
  168. package/plugins/collapsibleColumns/collapsibleColumns.mjs +3 -3
  169. package/plugins/columnSorting/columnSorting.js +3 -3
  170. package/plugins/columnSorting/columnSorting.mjs +3 -3
  171. package/plugins/columnSummary/columnSummary.js +3 -3
  172. package/plugins/columnSummary/columnSummary.mjs +3 -3
  173. package/plugins/comments/commentEditor.js +2 -2
  174. package/plugins/comments/commentEditor.mjs +2 -2
  175. package/plugins/comments/comments.js +39 -31
  176. package/plugins/comments/comments.mjs +40 -32
  177. package/plugins/contextMenu/contextMenu.js +3 -3
  178. package/plugins/contextMenu/contextMenu.mjs +3 -3
  179. package/plugins/copyPaste/copyPaste.js +6 -6
  180. package/plugins/copyPaste/copyPaste.mjs +6 -6
  181. package/plugins/customBorders/customBorders.js +3 -3
  182. package/plugins/customBorders/customBorders.mjs +3 -3
  183. package/plugins/dragToScroll/dragToScroll.js +3 -3
  184. package/plugins/dragToScroll/dragToScroll.mjs +3 -3
  185. package/plugins/dropdownMenu/dropdownMenu.js +5 -4
  186. package/plugins/dropdownMenu/dropdownMenu.mjs +5 -4
  187. package/plugins/exportFile/exportFile.js +2 -2
  188. package/plugins/exportFile/exportFile.mjs +2 -2
  189. package/plugins/exportFile/types/csv.js +2 -2
  190. package/plugins/exportFile/types/csv.mjs +2 -2
  191. package/plugins/filters/component/actionBar.js +2 -2
  192. package/plugins/filters/component/actionBar.mjs +2 -2
  193. package/plugins/filters/component/condition.js +3 -3
  194. package/plugins/filters/component/condition.mjs +3 -3
  195. package/plugins/filters/component/operators.js +2 -2
  196. package/plugins/filters/component/operators.mjs +2 -2
  197. package/plugins/filters/component/value.js +3 -3
  198. package/plugins/filters/component/value.mjs +3 -3
  199. package/plugins/filters/filters.js +3 -3
  200. package/plugins/filters/filters.mjs +3 -3
  201. package/plugins/filters/ui/input.js +3 -3
  202. package/plugins/filters/ui/input.mjs +3 -3
  203. package/plugins/filters/ui/link.js +3 -3
  204. package/plugins/filters/ui/link.mjs +3 -3
  205. package/plugins/filters/ui/multipleSelect.js +3 -3
  206. package/plugins/filters/ui/multipleSelect.mjs +3 -3
  207. package/plugins/filters/ui/radioInput.js +3 -3
  208. package/plugins/filters/ui/radioInput.mjs +3 -3
  209. package/plugins/filters/ui/select.js +3 -3
  210. package/plugins/filters/ui/select.mjs +3 -3
  211. package/plugins/formulas/formulas.js +3 -3
  212. package/plugins/formulas/formulas.mjs +3 -3
  213. package/plugins/hiddenColumns/contextMenuItem/hideColumn.js +2 -4
  214. package/plugins/hiddenColumns/contextMenuItem/hideColumn.mjs +2 -4
  215. package/plugins/hiddenColumns/contextMenuItem/showColumn.js +3 -3
  216. package/plugins/hiddenColumns/contextMenuItem/showColumn.mjs +3 -3
  217. package/plugins/hiddenColumns/hiddenColumns.js +3 -3
  218. package/plugins/hiddenColumns/hiddenColumns.mjs +3 -3
  219. package/plugins/hiddenRows/contextMenuItem/hideRow.js +2 -4
  220. package/plugins/hiddenRows/contextMenuItem/hideRow.mjs +2 -4
  221. package/plugins/hiddenRows/contextMenuItem/showRow.js +3 -3
  222. package/plugins/hiddenRows/contextMenuItem/showRow.mjs +3 -3
  223. package/plugins/hiddenRows/hiddenRows.js +3 -3
  224. package/plugins/hiddenRows/hiddenRows.mjs +3 -3
  225. package/plugins/manualColumnFreeze/manualColumnFreeze.js +46 -20
  226. package/plugins/manualColumnFreeze/manualColumnFreeze.mjs +41 -20
  227. package/plugins/manualColumnMove/manualColumnMove.js +7 -18
  228. package/plugins/manualColumnMove/manualColumnMove.mjs +7 -18
  229. package/plugins/manualColumnMove/ui/backlight.js +3 -3
  230. package/plugins/manualColumnMove/ui/backlight.mjs +3 -3
  231. package/plugins/manualColumnMove/ui/guideline.js +3 -3
  232. package/plugins/manualColumnMove/ui/guideline.mjs +3 -3
  233. package/plugins/manualColumnResize/manualColumnResize.js +3 -3
  234. package/plugins/manualColumnResize/manualColumnResize.mjs +3 -3
  235. package/plugins/manualRowMove/manualRowMove.js +11 -29
  236. package/plugins/manualRowMove/manualRowMove.mjs +11 -29
  237. package/plugins/manualRowMove/ui/backlight.js +3 -3
  238. package/plugins/manualRowMove/ui/backlight.mjs +3 -3
  239. package/plugins/manualRowMove/ui/guideline.js +3 -3
  240. package/plugins/manualRowMove/ui/guideline.mjs +3 -3
  241. package/plugins/manualRowResize/manualRowResize.js +3 -3
  242. package/plugins/manualRowResize/manualRowResize.mjs +3 -3
  243. package/plugins/mergeCells/cellsCollection.js +3 -3
  244. package/plugins/mergeCells/cellsCollection.mjs +3 -3
  245. package/plugins/mergeCells/mergeCells.js +15 -15
  246. package/plugins/mergeCells/mergeCells.mjs +15 -15
  247. package/plugins/multiColumnSorting/multiColumnSorting.js +3 -3
  248. package/plugins/multiColumnSorting/multiColumnSorting.mjs +3 -3
  249. package/plugins/multipleSelectionHandles/multipleSelectionHandles.js +3 -3
  250. package/plugins/multipleSelectionHandles/multipleSelectionHandles.mjs +3 -3
  251. package/plugins/nestedHeaders/nestedHeaders.js +10 -6
  252. package/plugins/nestedHeaders/nestedHeaders.mjs +10 -6
  253. package/plugins/nestedHeaders/stateManager/utils.js +3 -4
  254. package/plugins/nestedHeaders/stateManager/utils.mjs +3 -4
  255. package/plugins/nestedHeaders/utils/ghostTable.js +94 -56
  256. package/plugins/nestedHeaders/utils/ghostTable.mjs +94 -56
  257. package/plugins/nestedRows/nestedRows.js +3 -3
  258. package/plugins/nestedRows/nestedRows.mjs +3 -3
  259. package/plugins/nestedRows/ui/collapsing.js +2 -2
  260. package/plugins/nestedRows/ui/collapsing.mjs +2 -2
  261. package/plugins/nestedRows/ui/contextMenu.js +2 -2
  262. package/plugins/nestedRows/ui/contextMenu.mjs +2 -2
  263. package/plugins/nestedRows/ui/headers.js +2 -2
  264. package/plugins/nestedRows/ui/headers.mjs +2 -2
  265. package/plugins/persistentState/persistentState.js +3 -3
  266. package/plugins/persistentState/persistentState.mjs +3 -3
  267. package/plugins/search/search.js +3 -3
  268. package/plugins/search/search.mjs +3 -3
  269. package/plugins/touchScroll/touchScroll.js +3 -3
  270. package/plugins/touchScroll/touchScroll.mjs +3 -3
  271. package/plugins/trimRows/trimRows.js +3 -3
  272. package/plugins/trimRows/trimRows.mjs +3 -3
  273. package/plugins/undoRedo/undoRedo.js +2 -2
  274. package/plugins/undoRedo/undoRedo.mjs +2 -2
  275. package/selection/highlight/visualSelection.js +83 -210
  276. package/selection/highlight/visualSelection.mjs +79 -202
  277. package/selection/selection.js +9 -3
  278. package/selection/selection.mjs +9 -3
  279. package/shortcuts/context.js +1 -1
  280. package/shortcuts/context.mjs +1 -1
  281. package/shortcuts/manager.js +3 -1
  282. package/shortcuts/manager.mjs +3 -1
  283. package/shortcuts/recorder.js +11 -2
  284. package/shortcuts/recorder.mjs +11 -2
  285. package/tableView.js +27 -5
  286. package/tableView.mjs +27 -5
  287. package/translations/indexMapper.d.ts +3 -1
  288. package/translations/indexMapper.js +88 -10
  289. package/translations/indexMapper.mjs +90 -19
  290. package/translations/mapCollections/aggregatedCollection.js +2 -2
  291. package/translations/mapCollections/aggregatedCollection.mjs +2 -2
  292. package/translations/maps/hidingMap.js +2 -2
  293. package/translations/maps/hidingMap.mjs +2 -2
  294. package/translations/maps/indexesSequence.js +3 -3
  295. package/translations/maps/indexesSequence.mjs +3 -3
  296. package/translations/maps/linkedPhysicalIndexToValueMap.js +3 -3
  297. package/translations/maps/linkedPhysicalIndexToValueMap.mjs +3 -3
  298. package/translations/maps/physicalIndexToValueMap.js +3 -3
  299. package/translations/maps/physicalIndexToValueMap.mjs +3 -3
  300. package/translations/maps/trimmingMap.js +2 -2
  301. package/translations/maps/trimmingMap.mjs +2 -2
@@ -131,7 +131,7 @@ var Viewport = /*#__PURE__*/function () {
131
131
  }, {
132
132
  key: "hasVerticalScroll",
133
133
  value: function hasVerticalScroll() {
134
- return this.getWorkspaceActualHeight() > this.getWorkspaceHeight();
134
+ return this.wtTable.hider.offsetHeight > this.getWorkspaceHeight();
135
135
  }
136
136
  /**
137
137
  * Checks if viewport has horizontal scroll.
@@ -142,7 +142,7 @@ var Viewport = /*#__PURE__*/function () {
142
142
  }, {
143
143
  key: "hasHorizontalScroll",
144
144
  value: function hasHorizontalScroll() {
145
- return this.getWorkspaceActualWidth() > this.getWorkspaceWidth();
145
+ return this.wtTable.hider.offsetWidth > this.getWorkspaceWidth();
146
146
  }
147
147
  /**
148
148
  * @param {number} from The visual column index from the width sum is start calculated.
@@ -197,24 +197,6 @@ var Viewport = /*#__PURE__*/function () {
197
197
  * @returns {number}
198
198
  */
199
199
 
200
- }, {
201
- key: "getWorkspaceActualHeight",
202
- value: function getWorkspaceActualHeight() {
203
- return outerHeight(this.wtTable.TABLE);
204
- }
205
- /**
206
- * @returns {number}
207
- */
208
-
209
- }, {
210
- key: "getWorkspaceActualWidth",
211
- value: function getWorkspaceActualWidth() {
212
- return outerWidth(this.wtTable.TABLE) || outerWidth(this.wtTable.TBODY) || outerWidth(this.wtTable.THEAD); // IE8 reports 0 as <table> offsetWidth;
213
- }
214
- /**
215
- * @returns {number}
216
- */
217
-
218
200
  }, {
219
201
  key: "getColumnHeaderHeight",
220
202
  value: function getColumnHeaderHeight() {
@@ -490,7 +472,12 @@ var Viewport = /*#__PURE__*/function () {
490
472
  }
491
473
 
492
474
  var startRow = proposedRowsVisibleCalculator.startRow,
493
- endRow = proposedRowsVisibleCalculator.endRow;
475
+ endRow = proposedRowsVisibleCalculator.endRow; // if there are no fully visible rows at all, return false
476
+
477
+ if (startRow === null && endRow === null) {
478
+ return false;
479
+ }
480
+
494
481
  var _this$rowsRenderCalcu = this.rowsRenderCalculator,
495
482
  renderedStartRow = _this$rowsRenderCalcu.startRow,
496
483
  renderedEndRow = _this$rowsRenderCalcu.endRow;
@@ -520,7 +507,12 @@ var Viewport = /*#__PURE__*/function () {
520
507
  }
521
508
 
522
509
  var startColumn = proposedColumnsVisibleCalculator.startColumn,
523
- endColumn = proposedColumnsVisibleCalculator.endColumn;
510
+ endColumn = proposedColumnsVisibleCalculator.endColumn; // if there are no fully visible columns at all, return false
511
+
512
+ if (startColumn === null && endColumn === null) {
513
+ return false;
514
+ }
515
+
524
516
  var _this$columnsRenderCa = this.columnsRenderCalculator,
525
517
  renderedStartColumn = _this$columnsRenderCa.startColumn,
526
518
  renderedEndColumn = _this$columnsRenderCa.endColumn;
package/CHANGELOG.md CHANGED
@@ -8,6 +8,37 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
8
8
 
9
9
  <!-- UNVERSIONED -->
10
10
 
11
+ ## [12.1.0] - 2022-06-28
12
+
13
+ For more information on this release, see:
14
+ - [Release notes](https://handsontable.com/docs/release-notes/#_12-1-0)
15
+ - [Blog post](https://handsontable.com/blog/handsontable-12.1.0-data-grid-new-hooks-new-translations-and-rendering-improvements)
16
+
17
+ ### Added
18
+ - Added smoother row and column moving when some row or columns are hidden. [#7613](https://github.com/handsontable/handsontable/issues/7613)
19
+ - Added `getNearestNotHiddenIndex()`, a new method that finds the visual index of the nearest not-hidden row or column and works even with large numbers of hidden rows or columns. The previous method, `getFirstNotHiddenIndex()`, still works, but is marked as deprecated. [#9064](https://github.com/handsontable/handsontable/issues/9064)
20
+ - Added a Czech translation. [#9343](https://github.com/handsontable/handsontable/issues/9343)
21
+ - Added a Serbian translation. [#9469](https://github.com/handsontable/handsontable/issues/9469)
22
+ - Added new hooks: `beforeColumnFreeze`, `afterColumnFreeze`, `beforeColumnUnfreeze`, and `afterColumnUnfreeze`. [#9248](https://github.com/handsontable/handsontable/issues/9248)
23
+
24
+ ### Changed
25
+ - Replaced HTML entities appearing in Handsontable's license texts with canonical counterparts. [#9487](https://github.com/handsontable/handsontable/issues/9487)
26
+ - Updated the Pikaday optional dependency to 1.8.2, to let Handsontable work with Parcel 2 without errors. [#9410](https://github.com/handsontable/handsontable/issues/9410)
27
+ - *React:* Changed the wrapper's lifecycle methods, to let Handsontable work with React 17+ without warnings. [#8748](https://github.com/handsontable/handsontable/issues/8748)
28
+ - *Angular:* Moved the `@angular/core` dependency to peer dependencies. [#9574](https://github.com/handsontable/handsontable/issues/9574)
29
+
30
+ ### Fixed
31
+ - Fixed an issue where dropdown and autocomplete cell editors rendered incorrectly if the `preventOverflow` option was set to `'horizontal'`. [#3828](https://github.com/handsontable/handsontable/issues/3828)
32
+ - Fixed an issue where frozen rows were getting duplicated. [#4454](https://github.com/handsontable/handsontable/issues/4454)
33
+ - Fixed an issue where comments rendered outside the viewport. [#4785](https://github.com/handsontable/handsontable/issues/4785)
34
+ - Fixed an issue where comments got positioned incorrectly when Handsontable ran within a scrollable element. [#6744](https://github.com/handsontable/handsontable/issues/6744)
35
+ - Fixed an issue that occurred when Handsontable ran within an HTML `<form>`: pressing <kbd>Enter</kbd> inside another form's `<input>` could open Handsontable's dropdown menu. [#9295](https://github.com/handsontable/handsontable/issues/9295)
36
+ - Fixed an issue where it was impossible to unmerge cells in the RTL layout direction. [#9362](https://github.com/handsontable/handsontable/issues/9362)
37
+ - Fixed an issue where columns wider than the viewport's width and rows higher than the viewport's height didn't render correctly. [#9473](https://github.com/handsontable/handsontable/issues/9473)
38
+ - Fixed an issue where dragging-to-scroll on mobile didn't work properly in the RTL layout direction. [#9475](https://github.com/handsontable/handsontable/issues/9475)
39
+ - Fixed an issue where hiding columns with nested headers caused incorrect column width calculation (for the `stretchH: 'all'` option). [#9496](https://github.com/handsontable/handsontable/issues/9496)
40
+ - Fixed an issue where `ShortcutManager` unnecessarily handled `keyup` events with no `key` defined. [#9562](https://github.com/handsontable/handsontable/issues/9562)
41
+
11
42
  ## [12.0.1] - 2022-05-16
12
43
 
13
44
  For more information on this release, see:
@@ -46,6 +77,7 @@ For more information on this release, see:
46
77
  - Changed two scripts of the main Handsontable workspace (`./`), to speed up the build process: now, the `npm run build` and `npm run test` scripts don't build or test the Handsontable examples (`./examples`). [#9412](https://github.com/handsontable/handsontable/issues/9412)
47
78
  - Changed the version of the Moment.js dependency from 2.24.0 to 2.29.3, in reaction to a recently-found Moment.js security vulnerability that did not directly affect Handsontable. [#9381](https://github.com/handsontable/handsontable/issues/9381)
48
79
  - Changed the version of the HyperFormula optional dependency from ^1.2.0 to ^2.0.0. [#9411](https://github.com/handsontable/handsontable/issues/9411)
80
+ - Changed an internal property name, from `hot.view.wt` to `hot.view._wt`, where `hot` is the name of your Handsontable instance. The intention of this change is to make it clear that Walkontable (Handsontable's rendering engine) is not a part of Handsontable's public API. [#8760](https://github.com/handsontable/handsontable/issues/8760)
49
81
 
50
82
  ### Fixed
51
83
  - *React, Angular, Vue 2, Vue 3:* Fixed an issue where using `updateSettings()` caused problems for state managers. [#8372](https://github.com/handsontable/handsontable/issues/8372)
package/LICENSE.txt CHANGED
@@ -18,7 +18,7 @@ license agreement.
18
18
  In any case, you must not make any such use of this software as to develop software which may be
19
19
  considered competitive with this software.
20
20
 
21
- UNLESS EXPRESSLY AGREED OTHERWISE, HANDSONCODE PROVIDES THIS SOFTWARE ON AN &quot;AS IS&quot;
21
+ UNLESS EXPRESSLY AGREED OTHERWISE, HANDSONCODE PROVIDES THIS SOFTWARE ON AN "AS IS"
22
22
  BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, AND IN NO EVENT AND UNDER NO
23
23
  LEGAL THEORY, SHALL HANDSONCODE BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY DIRECT,
24
24
  INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER ARISING FROM
package/base.js CHANGED
@@ -52,8 +52,8 @@ Handsontable.Core = function (rootElement) {
52
52
  Handsontable.DefaultSettings = (0, _dataMap.metaSchemaFactory)();
53
53
  Handsontable.hooks = _pluginHooks.default.getSingleton();
54
54
  Handsontable.packageName = 'handsontable';
55
- Handsontable.buildDate = "13/05/2022 13:49:59";
56
- Handsontable.version = "12.0.1";
55
+ Handsontable.buildDate = "28/06/2022 12:07:10";
56
+ Handsontable.version = "12.1.0";
57
57
  Handsontable.languages = {
58
58
  dictionaryKeys: _registry.dictionaryKeys,
59
59
  getLanguageDictionary: _registry.getLanguageDictionary,
package/base.mjs CHANGED
@@ -37,8 +37,8 @@ Handsontable.Core = function (rootElement) {
37
37
  Handsontable.DefaultSettings = metaSchemaFactory();
38
38
  Handsontable.hooks = Hooks.getSingleton();
39
39
  Handsontable.packageName = 'handsontable';
40
- Handsontable.buildDate = "13/05/2022 13:50:15";
41
- Handsontable.version = "12.0.1";
40
+ Handsontable.buildDate = "28/06/2022 12:07:22";
41
+ Handsontable.version = "12.1.0";
42
42
  Handsontable.languages = {
43
43
  dictionaryKeys: dictionaryKeys,
44
44
  getLanguageDictionary: getLanguageDictionary,
package/core.js CHANGED
@@ -333,6 +333,12 @@ function Core(rootElement, userSettings) {
333
333
  };
334
334
 
335
335
  var selection = new _selection.Selection(tableMeta, {
336
+ rowIndexMapper: function rowIndexMapper() {
337
+ return instance.rowIndexMapper;
338
+ },
339
+ columnIndexMapper: function columnIndexMapper() {
340
+ return instance.columnIndexMapper;
341
+ },
336
342
  countCols: function countCols() {
337
343
  return instance.countCols();
338
344
  },
@@ -2286,8 +2292,8 @@ function Core(rootElement, userSettings) {
2286
2292
  * To replace Handsontable's [`data`](@/api/options.md#data) and reset states, use the [`loadData()`](#loaddata) method.
2287
2293
  *
2288
2294
  * Read more:
2289
- * - [Binding to data &#8594;](@/guides/getting-started/binding-to-data.md)
2290
- * - [Saving data &#8594;](@/guides/getting-started/saving-data.md)
2295
+ * - [Binding to data](@/guides/getting-started/binding-to-data.md)
2296
+ * - [Saving data](@/guides/getting-started/saving-data.md)
2291
2297
  *
2292
2298
  * @memberof Core#
2293
2299
  * @function updateData
@@ -2330,8 +2336,8 @@ function Core(rootElement, userSettings) {
2330
2336
  * To replace Handsontable's [`data`](@/api/options.md#data) without resetting states, use the [`updateData()`](#updatedata) method.
2331
2337
  *
2332
2338
  * Read more:
2333
- * - [Binding to data &#8594;](@/guides/getting-started/binding-to-data.md)
2334
- * - [Saving data &#8594;](@/guides/getting-started/saving-data.md)
2339
+ * - [Binding to data](@/guides/getting-started/binding-to-data.md)
2340
+ * - [Saving data](@/guides/getting-started/saving-data.md)
2335
2341
  *
2336
2342
  * @memberof Core#
2337
2343
  * @function loadData
@@ -4243,7 +4249,7 @@ function Core(rootElement, userSettings) {
4243
4249
 
4244
4250
  var getIndexToScroll = function getIndexToScroll(indexMapper, visualIndex) {
4245
4251
  // Looking for a visual index on the right and then (when not found) on the left.
4246
- return indexMapper.getFirstNotHiddenIndex(visualIndex, 1, true);
4252
+ return indexMapper.getNearestNotHiddenIndex(visualIndex, 1, true);
4247
4253
  };
4248
4254
  /**
4249
4255
  * Scroll viewport to coordinates specified by the `row` and `column` arguments.
@@ -4254,8 +4260,10 @@ function Core(rootElement, userSettings) {
4254
4260
  * we are using the index for numbering only this rows which may be rendered (we don't consider hidden rows).
4255
4261
  * @param {number} [column] Column index. If the last argument isn't defined we treat the index as a visual column index.
4256
4262
  * Otherwise, we are using the index for numbering only this columns which may be rendered (we don't consider hidden columns).
4257
- * @param {boolean} [snapToBottom=false] If `true`, viewport is scrolled to show the cell on the bottom of the table.
4258
- * @param {boolean} [snapToRight=false] If `true`, viewport is scrolled to show the cell on the right side of the table.
4263
+ * @param {boolean} [snapToBottom=false] If `true`, the viewport is scrolled to show the cell at the bottom of the table.
4264
+ * However, if the cell's height is greater than the table's viewport height, the cell is snapped to the top edge.
4265
+ * @param {boolean} [snapToRight=false] If `true`, the viewport is scrolled to show the cell at the right side of the table.
4266
+ * However, if the cell is wider than the table's viewport width, the cell is snapped to the left edge (or to the right edge, if the layout direction is set to `rtl`).
4259
4267
  * @param {boolean} [considerHiddenIndexes=true] If `true`, we handle visual indexes, otherwise we handle only indexes which
4260
4268
  * may be rendered when they are in the viewport (we don't consider hidden indexes as they aren't rendered).
4261
4269
  * @returns {boolean} `true` if scroll was successful, `false` otherwise.
@@ -4728,12 +4736,12 @@ function Core(rootElement, userSettings) {
4728
4736
  };
4729
4737
 
4730
4738
  var shortcutManager = (0, _shortcuts.createShortcutManager)({
4739
+ handleEvent: function handleEvent(event) {
4740
+ var isListening = instance.isListening();
4741
+ var isKeyboardEventWithKey = (event === null || event === void 0 ? void 0 : event.key) !== void 0;
4742
+ return isListening && isKeyboardEventWithKey;
4743
+ },
4731
4744
  beforeKeyDown: function beforeKeyDown(event) {
4732
- if (_this.isListening() === false) {
4733
- // Performing action (executing a callback) and triggering hook only for listening Handsontable.
4734
- return false;
4735
- }
4736
-
4737
4745
  return _this.runHooks('beforeKeyDown', event);
4738
4746
  },
4739
4747
  afterKeyDown: function afterKeyDown(event) {
@@ -4810,7 +4818,7 @@ function Core(rootElement, userSettings) {
4810
4818
  keys: [['ArrowUp', 'Control/Meta']],
4811
4819
  captureCtrl: true,
4812
4820
  callback: function callback() {
4813
- selection.setRangeStart(instance._createCellCoords(instance.rowIndexMapper.getFirstNotHiddenIndex(0, 1), instance.getSelectedRangeLast().highlight.col));
4821
+ selection.setRangeStart(instance._createCellCoords(instance.rowIndexMapper.getNearestNotHiddenIndex(0, 1), instance.getSelectedRangeLast().highlight.col));
4814
4822
  }
4815
4823
  }, {
4816
4824
  keys: [['ArrowUp', 'Shift']],
@@ -4825,7 +4833,7 @@ function Core(rootElement, userSettings) {
4825
4833
  from = _instance$getSelected.from,
4826
4834
  to = _instance$getSelected.to;
4827
4835
 
4828
- var row = instance.rowIndexMapper.getFirstNotHiddenIndex(0, 1);
4836
+ var row = instance.rowIndexMapper.getNearestNotHiddenIndex(0, 1);
4829
4837
  selection.setRangeStart(from.clone());
4830
4838
  selection.setRangeEnd(instance._createCellCoords(row, to.col));
4831
4839
  },
@@ -4841,7 +4849,7 @@ function Core(rootElement, userSettings) {
4841
4849
  keys: [['ArrowDown', 'Control/Meta']],
4842
4850
  captureCtrl: true,
4843
4851
  callback: function callback() {
4844
- selection.setRangeStart(instance._createCellCoords(instance.rowIndexMapper.getFirstNotHiddenIndex(instance.countRows() - 1, -1), instance.getSelectedRangeLast().highlight.col));
4852
+ selection.setRangeStart(instance._createCellCoords(instance.rowIndexMapper.getNearestNotHiddenIndex(instance.countRows() - 1, -1), instance.getSelectedRangeLast().highlight.col));
4845
4853
  }
4846
4854
  }, {
4847
4855
  keys: [['ArrowDown', 'Shift']],
@@ -4856,7 +4864,7 @@ function Core(rootElement, userSettings) {
4856
4864
  from = _instance$getSelected2.from,
4857
4865
  to = _instance$getSelected2.to;
4858
4866
 
4859
- var row = instance.rowIndexMapper.getFirstNotHiddenIndex(instance.countRows() - 1, -1);
4867
+ var row = instance.rowIndexMapper.getNearestNotHiddenIndex(instance.countRows() - 1, -1);
4860
4868
  selection.setRangeStart(from.clone());
4861
4869
  selection.setRangeEnd(instance._createCellCoords(row, to.col));
4862
4870
  },
@@ -4876,7 +4884,7 @@ function Core(rootElement, userSettings) {
4876
4884
 
4877
4885
  var row = instance.getSelectedRangeLast().highlight.row;
4878
4886
 
4879
- var column = (_instance$columnIndex = instance.columnIndexMapper).getFirstNotHiddenIndex.apply(_instance$columnIndex, _toConsumableArray(instance.isRtl() ? [instance.countCols() - 1, -1] : [0, 1]));
4887
+ var column = (_instance$columnIndex = instance.columnIndexMapper).getNearestNotHiddenIndex.apply(_instance$columnIndex, _toConsumableArray(instance.isRtl() ? [instance.countCols() - 1, -1] : [0, 1]));
4880
4888
 
4881
4889
  selection.setRangeStart(instance._createCellCoords(row, column));
4882
4890
  }
@@ -4895,7 +4903,7 @@ function Core(rootElement, userSettings) {
4895
4903
  from = _instance$getSelected3.from,
4896
4904
  to = _instance$getSelected3.to;
4897
4905
 
4898
- var column = (_instance$columnIndex2 = instance.columnIndexMapper).getFirstNotHiddenIndex.apply(_instance$columnIndex2, _toConsumableArray(instance.isRtl() ? [instance.countCols() - 1, -1] : [0, 1]));
4906
+ var column = (_instance$columnIndex2 = instance.columnIndexMapper).getNearestNotHiddenIndex.apply(_instance$columnIndex2, _toConsumableArray(instance.isRtl() ? [instance.countCols() - 1, -1] : [0, 1]));
4899
4907
 
4900
4908
  selection.setRangeStart(from.clone());
4901
4909
  selection.setRangeEnd(instance._createCellCoords(to.row, column));
@@ -4916,7 +4924,7 @@ function Core(rootElement, userSettings) {
4916
4924
 
4917
4925
  var row = instance.getSelectedRangeLast().highlight.row;
4918
4926
 
4919
- var column = (_instance$columnIndex3 = instance.columnIndexMapper).getFirstNotHiddenIndex.apply(_instance$columnIndex3, _toConsumableArray(instance.isRtl() ? [0, 1] : [instance.countCols() - 1, -1]));
4927
+ var column = (_instance$columnIndex3 = instance.columnIndexMapper).getNearestNotHiddenIndex.apply(_instance$columnIndex3, _toConsumableArray(instance.isRtl() ? [0, 1] : [instance.countCols() - 1, -1]));
4920
4928
 
4921
4929
  selection.setRangeStart(instance._createCellCoords(row, column));
4922
4930
  }
@@ -4935,7 +4943,7 @@ function Core(rootElement, userSettings) {
4935
4943
  from = _instance$getSelected4.from,
4936
4944
  to = _instance$getSelected4.to;
4937
4945
 
4938
- var column = (_instance$columnIndex4 = instance.columnIndexMapper).getFirstNotHiddenIndex.apply(_instance$columnIndex4, _toConsumableArray(instance.isRtl() ? [0, 1] : [instance.countCols() - 1, -1]));
4946
+ var column = (_instance$columnIndex4 = instance.columnIndexMapper).getNearestNotHiddenIndex.apply(_instance$columnIndex4, _toConsumableArray(instance.isRtl() ? [0, 1] : [instance.countCols() - 1, -1]));
4939
4947
 
4940
4948
  selection.setRangeStart(from.clone());
4941
4949
  selection.setRangeEnd(instance._createCellCoords(to.row, column));
@@ -4949,7 +4957,7 @@ function Core(rootElement, userSettings) {
4949
4957
  callback: function callback() {
4950
4958
  var fixedColumns = parseInt(instance.getSettings().fixedColumnsStart, 10);
4951
4959
  var row = instance.getSelectedRangeLast().highlight.row;
4952
- var column = instance.columnIndexMapper.getFirstNotHiddenIndex(fixedColumns, 1);
4960
+ var column = instance.columnIndexMapper.getNearestNotHiddenIndex(fixedColumns, 1);
4953
4961
  selection.setRangeStart(instance._createCellCoords(row, column));
4954
4962
  },
4955
4963
  runOnlyIf: function runOnlyIf() {
@@ -4958,7 +4966,7 @@ function Core(rootElement, userSettings) {
4958
4966
  }, {
4959
4967
  keys: [['Home', 'Shift']],
4960
4968
  callback: function callback() {
4961
- selection.setRangeEnd(instance._createCellCoords(selection.selectedRange.current().from.row, instance.columnIndexMapper.getFirstNotHiddenIndex(0, 1)));
4969
+ selection.setRangeEnd(instance._createCellCoords(selection.selectedRange.current().from.row, instance.columnIndexMapper.getNearestNotHiddenIndex(0, 1)));
4962
4970
  }
4963
4971
  }, {
4964
4972
  keys: [['Home', 'Control/Meta']],
@@ -4966,8 +4974,8 @@ function Core(rootElement, userSettings) {
4966
4974
  callback: function callback() {
4967
4975
  var fixedRows = parseInt(instance.getSettings().fixedRowsTop, 10);
4968
4976
  var fixedColumns = parseInt(instance.getSettings().fixedColumnsStart, 10);
4969
- var row = instance.rowIndexMapper.getFirstNotHiddenIndex(fixedRows, 1);
4970
- var column = instance.columnIndexMapper.getFirstNotHiddenIndex(fixedColumns, 1);
4977
+ var row = instance.rowIndexMapper.getNearestNotHiddenIndex(fixedRows, 1);
4978
+ var column = instance.columnIndexMapper.getNearestNotHiddenIndex(fixedColumns, 1);
4971
4979
  selection.setRangeStart(instance._createCellCoords(row, column));
4972
4980
  },
4973
4981
  runOnlyIf: function runOnlyIf() {
@@ -4977,7 +4985,7 @@ function Core(rootElement, userSettings) {
4977
4985
  keys: [['End']],
4978
4986
  captureCtrl: true,
4979
4987
  callback: function callback() {
4980
- selection.setRangeStart(instance._createCellCoords(instance.getSelectedRangeLast().highlight.row, instance.columnIndexMapper.getFirstNotHiddenIndex(instance.countCols() - 1, -1)));
4988
+ selection.setRangeStart(instance._createCellCoords(instance.getSelectedRangeLast().highlight.row, instance.columnIndexMapper.getNearestNotHiddenIndex(instance.countCols() - 1, -1)));
4981
4989
  },
4982
4990
  runOnlyIf: function runOnlyIf() {
4983
4991
  return instance.view.isMainTableNotFullyCoveredByOverlays();
@@ -4985,15 +4993,15 @@ function Core(rootElement, userSettings) {
4985
4993
  }, {
4986
4994
  keys: [['End', 'Shift']],
4987
4995
  callback: function callback() {
4988
- selection.setRangeEnd(instance._createCellCoords(selection.selectedRange.current().from.row, instance.columnIndexMapper.getFirstNotHiddenIndex(instance.countCols() - 1, -1)));
4996
+ selection.setRangeEnd(instance._createCellCoords(selection.selectedRange.current().from.row, instance.columnIndexMapper.getNearestNotHiddenIndex(instance.countCols() - 1, -1)));
4989
4997
  }
4990
4998
  }, {
4991
4999
  keys: [['End', 'Control/Meta']],
4992
5000
  captureCtrl: true,
4993
5001
  callback: function callback() {
4994
5002
  var fixedRows = parseInt(instance.getSettings().fixedRowsBottom, 10);
4995
- var row = instance.rowIndexMapper.getFirstNotHiddenIndex(instance.countRows() - fixedRows - 1, -1);
4996
- var column = instance.columnIndexMapper.getFirstNotHiddenIndex(instance.countCols() - 1, -1);
5003
+ var row = instance.rowIndexMapper.getNearestNotHiddenIndex(instance.countRows() - fixedRows - 1, -1);
5004
+ var column = instance.columnIndexMapper.getNearestNotHiddenIndex(instance.countCols() - 1, -1);
4997
5005
  selection.setRangeStart(instance._createCellCoords(row, column));
4998
5006
  },
4999
5007
  runOnlyIf: function runOnlyIf() {
@@ -5011,7 +5019,7 @@ function Core(rootElement, userSettings) {
5011
5019
  to = _instance$getSelected5.to;
5012
5020
 
5013
5021
  var nextRowIndexToSelect = Math.max(to.row - instance.countVisibleRows(), 0);
5014
- var row = instance.rowIndexMapper.getFirstNotHiddenIndex(nextRowIndexToSelect, 1);
5022
+ var row = instance.rowIndexMapper.getNearestNotHiddenIndex(nextRowIndexToSelect, 1);
5015
5023
 
5016
5024
  if (row !== null) {
5017
5025
  var coords = instance._createCellCoords(row, to.col);
@@ -5034,7 +5042,7 @@ function Core(rootElement, userSettings) {
5034
5042
  to = _instance$getSelected6.to;
5035
5043
 
5036
5044
  var nextRowIndexToSelect = Math.min(to.row + instance.countVisibleRows(), instance.countRows() - 1);
5037
- var row = instance.rowIndexMapper.getFirstNotHiddenIndex(nextRowIndexToSelect, -1);
5045
+ var row = instance.rowIndexMapper.getNearestNotHiddenIndex(nextRowIndexToSelect, -1);
5038
5046
 
5039
5047
  if (row !== null) {
5040
5048
  var coords = instance._createCellCoords(row, to.col);
package/core.mjs CHANGED
@@ -273,6 +273,12 @@ export default function Core(rootElement, userSettings) {
273
273
  };
274
274
 
275
275
  var selection = new Selection(tableMeta, {
276
+ rowIndexMapper: function rowIndexMapper() {
277
+ return instance.rowIndexMapper;
278
+ },
279
+ columnIndexMapper: function columnIndexMapper() {
280
+ return instance.columnIndexMapper;
281
+ },
276
282
  countCols: function countCols() {
277
283
  return instance.countCols();
278
284
  },
@@ -2226,8 +2232,8 @@ export default function Core(rootElement, userSettings) {
2226
2232
  * To replace Handsontable's [`data`](@/api/options.md#data) and reset states, use the [`loadData()`](#loaddata) method.
2227
2233
  *
2228
2234
  * Read more:
2229
- * - [Binding to data &#8594;](@/guides/getting-started/binding-to-data.md)
2230
- * - [Saving data &#8594;](@/guides/getting-started/saving-data.md)
2235
+ * - [Binding to data](@/guides/getting-started/binding-to-data.md)
2236
+ * - [Saving data](@/guides/getting-started/saving-data.md)
2231
2237
  *
2232
2238
  * @memberof Core#
2233
2239
  * @function updateData
@@ -2270,8 +2276,8 @@ export default function Core(rootElement, userSettings) {
2270
2276
  * To replace Handsontable's [`data`](@/api/options.md#data) without resetting states, use the [`updateData()`](#updatedata) method.
2271
2277
  *
2272
2278
  * Read more:
2273
- * - [Binding to data &#8594;](@/guides/getting-started/binding-to-data.md)
2274
- * - [Saving data &#8594;](@/guides/getting-started/saving-data.md)
2279
+ * - [Binding to data](@/guides/getting-started/binding-to-data.md)
2280
+ * - [Saving data](@/guides/getting-started/saving-data.md)
2275
2281
  *
2276
2282
  * @memberof Core#
2277
2283
  * @function loadData
@@ -4183,7 +4189,7 @@ export default function Core(rootElement, userSettings) {
4183
4189
 
4184
4190
  var getIndexToScroll = function getIndexToScroll(indexMapper, visualIndex) {
4185
4191
  // Looking for a visual index on the right and then (when not found) on the left.
4186
- return indexMapper.getFirstNotHiddenIndex(visualIndex, 1, true);
4192
+ return indexMapper.getNearestNotHiddenIndex(visualIndex, 1, true);
4187
4193
  };
4188
4194
  /**
4189
4195
  * Scroll viewport to coordinates specified by the `row` and `column` arguments.
@@ -4194,8 +4200,10 @@ export default function Core(rootElement, userSettings) {
4194
4200
  * we are using the index for numbering only this rows which may be rendered (we don't consider hidden rows).
4195
4201
  * @param {number} [column] Column index. If the last argument isn't defined we treat the index as a visual column index.
4196
4202
  * Otherwise, we are using the index for numbering only this columns which may be rendered (we don't consider hidden columns).
4197
- * @param {boolean} [snapToBottom=false] If `true`, viewport is scrolled to show the cell on the bottom of the table.
4198
- * @param {boolean} [snapToRight=false] If `true`, viewport is scrolled to show the cell on the right side of the table.
4203
+ * @param {boolean} [snapToBottom=false] If `true`, the viewport is scrolled to show the cell at the bottom of the table.
4204
+ * However, if the cell's height is greater than the table's viewport height, the cell is snapped to the top edge.
4205
+ * @param {boolean} [snapToRight=false] If `true`, the viewport is scrolled to show the cell at the right side of the table.
4206
+ * However, if the cell is wider than the table's viewport width, the cell is snapped to the left edge (or to the right edge, if the layout direction is set to `rtl`).
4199
4207
  * @param {boolean} [considerHiddenIndexes=true] If `true`, we handle visual indexes, otherwise we handle only indexes which
4200
4208
  * may be rendered when they are in the viewport (we don't consider hidden indexes as they aren't rendered).
4201
4209
  * @returns {boolean} `true` if scroll was successful, `false` otherwise.
@@ -4666,12 +4674,12 @@ export default function Core(rootElement, userSettings) {
4666
4674
  };
4667
4675
 
4668
4676
  var shortcutManager = createShortcutManager({
4677
+ handleEvent: function handleEvent(event) {
4678
+ var isListening = instance.isListening();
4679
+ var isKeyboardEventWithKey = (event === null || event === void 0 ? void 0 : event.key) !== void 0;
4680
+ return isListening && isKeyboardEventWithKey;
4681
+ },
4669
4682
  beforeKeyDown: function beforeKeyDown(event) {
4670
- if (_this.isListening() === false) {
4671
- // Performing action (executing a callback) and triggering hook only for listening Handsontable.
4672
- return false;
4673
- }
4674
-
4675
4683
  return _this.runHooks('beforeKeyDown', event);
4676
4684
  },
4677
4685
  afterKeyDown: function afterKeyDown(event) {
@@ -4748,7 +4756,7 @@ export default function Core(rootElement, userSettings) {
4748
4756
  keys: [['ArrowUp', 'Control/Meta']],
4749
4757
  captureCtrl: true,
4750
4758
  callback: function callback() {
4751
- selection.setRangeStart(instance._createCellCoords(instance.rowIndexMapper.getFirstNotHiddenIndex(0, 1), instance.getSelectedRangeLast().highlight.col));
4759
+ selection.setRangeStart(instance._createCellCoords(instance.rowIndexMapper.getNearestNotHiddenIndex(0, 1), instance.getSelectedRangeLast().highlight.col));
4752
4760
  }
4753
4761
  }, {
4754
4762
  keys: [['ArrowUp', 'Shift']],
@@ -4763,7 +4771,7 @@ export default function Core(rootElement, userSettings) {
4763
4771
  from = _instance$getSelected.from,
4764
4772
  to = _instance$getSelected.to;
4765
4773
 
4766
- var row = instance.rowIndexMapper.getFirstNotHiddenIndex(0, 1);
4774
+ var row = instance.rowIndexMapper.getNearestNotHiddenIndex(0, 1);
4767
4775
  selection.setRangeStart(from.clone());
4768
4776
  selection.setRangeEnd(instance._createCellCoords(row, to.col));
4769
4777
  },
@@ -4779,7 +4787,7 @@ export default function Core(rootElement, userSettings) {
4779
4787
  keys: [['ArrowDown', 'Control/Meta']],
4780
4788
  captureCtrl: true,
4781
4789
  callback: function callback() {
4782
- selection.setRangeStart(instance._createCellCoords(instance.rowIndexMapper.getFirstNotHiddenIndex(instance.countRows() - 1, -1), instance.getSelectedRangeLast().highlight.col));
4790
+ selection.setRangeStart(instance._createCellCoords(instance.rowIndexMapper.getNearestNotHiddenIndex(instance.countRows() - 1, -1), instance.getSelectedRangeLast().highlight.col));
4783
4791
  }
4784
4792
  }, {
4785
4793
  keys: [['ArrowDown', 'Shift']],
@@ -4794,7 +4802,7 @@ export default function Core(rootElement, userSettings) {
4794
4802
  from = _instance$getSelected2.from,
4795
4803
  to = _instance$getSelected2.to;
4796
4804
 
4797
- var row = instance.rowIndexMapper.getFirstNotHiddenIndex(instance.countRows() - 1, -1);
4805
+ var row = instance.rowIndexMapper.getNearestNotHiddenIndex(instance.countRows() - 1, -1);
4798
4806
  selection.setRangeStart(from.clone());
4799
4807
  selection.setRangeEnd(instance._createCellCoords(row, to.col));
4800
4808
  },
@@ -4814,7 +4822,7 @@ export default function Core(rootElement, userSettings) {
4814
4822
 
4815
4823
  var row = instance.getSelectedRangeLast().highlight.row;
4816
4824
 
4817
- var column = (_instance$columnIndex = instance.columnIndexMapper).getFirstNotHiddenIndex.apply(_instance$columnIndex, _toConsumableArray(instance.isRtl() ? [instance.countCols() - 1, -1] : [0, 1]));
4825
+ var column = (_instance$columnIndex = instance.columnIndexMapper).getNearestNotHiddenIndex.apply(_instance$columnIndex, _toConsumableArray(instance.isRtl() ? [instance.countCols() - 1, -1] : [0, 1]));
4818
4826
 
4819
4827
  selection.setRangeStart(instance._createCellCoords(row, column));
4820
4828
  }
@@ -4833,7 +4841,7 @@ export default function Core(rootElement, userSettings) {
4833
4841
  from = _instance$getSelected3.from,
4834
4842
  to = _instance$getSelected3.to;
4835
4843
 
4836
- var column = (_instance$columnIndex2 = instance.columnIndexMapper).getFirstNotHiddenIndex.apply(_instance$columnIndex2, _toConsumableArray(instance.isRtl() ? [instance.countCols() - 1, -1] : [0, 1]));
4844
+ var column = (_instance$columnIndex2 = instance.columnIndexMapper).getNearestNotHiddenIndex.apply(_instance$columnIndex2, _toConsumableArray(instance.isRtl() ? [instance.countCols() - 1, -1] : [0, 1]));
4837
4845
 
4838
4846
  selection.setRangeStart(from.clone());
4839
4847
  selection.setRangeEnd(instance._createCellCoords(to.row, column));
@@ -4854,7 +4862,7 @@ export default function Core(rootElement, userSettings) {
4854
4862
 
4855
4863
  var row = instance.getSelectedRangeLast().highlight.row;
4856
4864
 
4857
- var column = (_instance$columnIndex3 = instance.columnIndexMapper).getFirstNotHiddenIndex.apply(_instance$columnIndex3, _toConsumableArray(instance.isRtl() ? [0, 1] : [instance.countCols() - 1, -1]));
4865
+ var column = (_instance$columnIndex3 = instance.columnIndexMapper).getNearestNotHiddenIndex.apply(_instance$columnIndex3, _toConsumableArray(instance.isRtl() ? [0, 1] : [instance.countCols() - 1, -1]));
4858
4866
 
4859
4867
  selection.setRangeStart(instance._createCellCoords(row, column));
4860
4868
  }
@@ -4873,7 +4881,7 @@ export default function Core(rootElement, userSettings) {
4873
4881
  from = _instance$getSelected4.from,
4874
4882
  to = _instance$getSelected4.to;
4875
4883
 
4876
- var column = (_instance$columnIndex4 = instance.columnIndexMapper).getFirstNotHiddenIndex.apply(_instance$columnIndex4, _toConsumableArray(instance.isRtl() ? [0, 1] : [instance.countCols() - 1, -1]));
4884
+ var column = (_instance$columnIndex4 = instance.columnIndexMapper).getNearestNotHiddenIndex.apply(_instance$columnIndex4, _toConsumableArray(instance.isRtl() ? [0, 1] : [instance.countCols() - 1, -1]));
4877
4885
 
4878
4886
  selection.setRangeStart(from.clone());
4879
4887
  selection.setRangeEnd(instance._createCellCoords(to.row, column));
@@ -4887,7 +4895,7 @@ export default function Core(rootElement, userSettings) {
4887
4895
  callback: function callback() {
4888
4896
  var fixedColumns = parseInt(instance.getSettings().fixedColumnsStart, 10);
4889
4897
  var row = instance.getSelectedRangeLast().highlight.row;
4890
- var column = instance.columnIndexMapper.getFirstNotHiddenIndex(fixedColumns, 1);
4898
+ var column = instance.columnIndexMapper.getNearestNotHiddenIndex(fixedColumns, 1);
4891
4899
  selection.setRangeStart(instance._createCellCoords(row, column));
4892
4900
  },
4893
4901
  runOnlyIf: function runOnlyIf() {
@@ -4896,7 +4904,7 @@ export default function Core(rootElement, userSettings) {
4896
4904
  }, {
4897
4905
  keys: [['Home', 'Shift']],
4898
4906
  callback: function callback() {
4899
- selection.setRangeEnd(instance._createCellCoords(selection.selectedRange.current().from.row, instance.columnIndexMapper.getFirstNotHiddenIndex(0, 1)));
4907
+ selection.setRangeEnd(instance._createCellCoords(selection.selectedRange.current().from.row, instance.columnIndexMapper.getNearestNotHiddenIndex(0, 1)));
4900
4908
  }
4901
4909
  }, {
4902
4910
  keys: [['Home', 'Control/Meta']],
@@ -4904,8 +4912,8 @@ export default function Core(rootElement, userSettings) {
4904
4912
  callback: function callback() {
4905
4913
  var fixedRows = parseInt(instance.getSettings().fixedRowsTop, 10);
4906
4914
  var fixedColumns = parseInt(instance.getSettings().fixedColumnsStart, 10);
4907
- var row = instance.rowIndexMapper.getFirstNotHiddenIndex(fixedRows, 1);
4908
- var column = instance.columnIndexMapper.getFirstNotHiddenIndex(fixedColumns, 1);
4915
+ var row = instance.rowIndexMapper.getNearestNotHiddenIndex(fixedRows, 1);
4916
+ var column = instance.columnIndexMapper.getNearestNotHiddenIndex(fixedColumns, 1);
4909
4917
  selection.setRangeStart(instance._createCellCoords(row, column));
4910
4918
  },
4911
4919
  runOnlyIf: function runOnlyIf() {
@@ -4915,7 +4923,7 @@ export default function Core(rootElement, userSettings) {
4915
4923
  keys: [['End']],
4916
4924
  captureCtrl: true,
4917
4925
  callback: function callback() {
4918
- selection.setRangeStart(instance._createCellCoords(instance.getSelectedRangeLast().highlight.row, instance.columnIndexMapper.getFirstNotHiddenIndex(instance.countCols() - 1, -1)));
4926
+ selection.setRangeStart(instance._createCellCoords(instance.getSelectedRangeLast().highlight.row, instance.columnIndexMapper.getNearestNotHiddenIndex(instance.countCols() - 1, -1)));
4919
4927
  },
4920
4928
  runOnlyIf: function runOnlyIf() {
4921
4929
  return instance.view.isMainTableNotFullyCoveredByOverlays();
@@ -4923,15 +4931,15 @@ export default function Core(rootElement, userSettings) {
4923
4931
  }, {
4924
4932
  keys: [['End', 'Shift']],
4925
4933
  callback: function callback() {
4926
- selection.setRangeEnd(instance._createCellCoords(selection.selectedRange.current().from.row, instance.columnIndexMapper.getFirstNotHiddenIndex(instance.countCols() - 1, -1)));
4934
+ selection.setRangeEnd(instance._createCellCoords(selection.selectedRange.current().from.row, instance.columnIndexMapper.getNearestNotHiddenIndex(instance.countCols() - 1, -1)));
4927
4935
  }
4928
4936
  }, {
4929
4937
  keys: [['End', 'Control/Meta']],
4930
4938
  captureCtrl: true,
4931
4939
  callback: function callback() {
4932
4940
  var fixedRows = parseInt(instance.getSettings().fixedRowsBottom, 10);
4933
- var row = instance.rowIndexMapper.getFirstNotHiddenIndex(instance.countRows() - fixedRows - 1, -1);
4934
- var column = instance.columnIndexMapper.getFirstNotHiddenIndex(instance.countCols() - 1, -1);
4941
+ var row = instance.rowIndexMapper.getNearestNotHiddenIndex(instance.countRows() - fixedRows - 1, -1);
4942
+ var column = instance.columnIndexMapper.getNearestNotHiddenIndex(instance.countCols() - 1, -1);
4935
4943
  selection.setRangeStart(instance._createCellCoords(row, column));
4936
4944
  },
4937
4945
  runOnlyIf: function runOnlyIf() {
@@ -4949,7 +4957,7 @@ export default function Core(rootElement, userSettings) {
4949
4957
  to = _instance$getSelected5.to;
4950
4958
 
4951
4959
  var nextRowIndexToSelect = Math.max(to.row - instance.countVisibleRows(), 0);
4952
- var row = instance.rowIndexMapper.getFirstNotHiddenIndex(nextRowIndexToSelect, 1);
4960
+ var row = instance.rowIndexMapper.getNearestNotHiddenIndex(nextRowIndexToSelect, 1);
4953
4961
 
4954
4962
  if (row !== null) {
4955
4963
  var coords = instance._createCellCoords(row, to.col);
@@ -4972,7 +4980,7 @@ export default function Core(rootElement, userSettings) {
4972
4980
  to = _instance$getSelected6.to;
4973
4981
 
4974
4982
  var nextRowIndexToSelect = Math.min(to.row + instance.countVisibleRows(), instance.countRows() - 1);
4975
- var row = instance.rowIndexMapper.getFirstNotHiddenIndex(nextRowIndexToSelect, -1);
4983
+ var row = instance.rowIndexMapper.getNearestNotHiddenIndex(nextRowIndexToSelect, -1);
4976
4984
 
4977
4985
  if (row !== null) {
4978
4986
  var coords = instance._createCellCoords(row, to.col);