handsontable 0.0.0-next-93e34dc-20230601 → 0.0.0-next-b7cca45-20230605

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 (216) hide show
  1. package/3rdparty/walkontable/src/{selection/border/border.js → border.js} +12 -7
  2. package/3rdparty/walkontable/src/{selection/border/border.mjs → border.mjs} +12 -7
  3. package/3rdparty/walkontable/src/cell/coords.d.ts +1 -6
  4. package/3rdparty/walkontable/src/cell/coords.js +12 -61
  5. package/3rdparty/walkontable/src/cell/coords.mjs +12 -61
  6. package/3rdparty/walkontable/src/cell/range.d.ts +2 -9
  7. package/3rdparty/walkontable/src/cell/range.js +7 -44
  8. package/3rdparty/walkontable/src/cell/range.mjs +7 -44
  9. package/3rdparty/walkontable/src/core/_base.js +3 -9
  10. package/3rdparty/walkontable/src/core/_base.mjs +3 -9
  11. package/3rdparty/walkontable/src/core/clone.js +2 -2
  12. package/3rdparty/walkontable/src/core/clone.mjs +2 -2
  13. package/3rdparty/walkontable/src/core/core.js +2 -3
  14. package/3rdparty/walkontable/src/core/core.mjs +2 -3
  15. package/3rdparty/walkontable/src/event.js +7 -7
  16. package/3rdparty/walkontable/src/event.mjs +7 -7
  17. package/3rdparty/walkontable/src/facade/core.js +2 -2
  18. package/3rdparty/walkontable/src/facade/core.mjs +2 -2
  19. package/3rdparty/walkontable/src/index.js +2 -10
  20. package/3rdparty/walkontable/src/index.mjs +2 -2
  21. package/3rdparty/walkontable/src/overlay/_base.js +1 -1
  22. package/3rdparty/walkontable/src/overlay/_base.mjs +1 -1
  23. package/3rdparty/walkontable/src/overlay/inlineStart.js +4 -2
  24. package/3rdparty/walkontable/src/overlay/inlineStart.mjs +4 -2
  25. package/3rdparty/walkontable/src/overlay/top.js +4 -2
  26. package/3rdparty/walkontable/src/overlay/top.mjs +4 -2
  27. package/3rdparty/walkontable/src/selection.js +354 -0
  28. package/3rdparty/walkontable/src/selection.mjs +348 -0
  29. package/3rdparty/walkontable/src/table/mixin/calculatedColumns.js +0 -9
  30. package/3rdparty/walkontable/src/table/mixin/calculatedColumns.mjs +0 -9
  31. package/3rdparty/walkontable/src/table/mixin/calculatedRows.js +0 -9
  32. package/3rdparty/walkontable/src/table/mixin/calculatedRows.mjs +0 -9
  33. package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.js +0 -9
  34. package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.mjs +0 -9
  35. package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.js +0 -9
  36. package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.mjs +0 -9
  37. package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.js +0 -9
  38. package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.mjs +0 -9
  39. package/3rdparty/walkontable/src/table.js +79 -7
  40. package/3rdparty/walkontable/src/table.mjs +80 -8
  41. package/base.js +2 -2
  42. package/base.mjs +2 -2
  43. package/core.d.ts +3 -5
  44. package/core.js +300 -82
  45. package/core.mjs +300 -82
  46. package/dataMap/metaManager/metaSchema.js +0 -15
  47. package/dataMap/metaManager/metaSchema.mjs +0 -15
  48. package/dist/handsontable.css +3 -8
  49. package/dist/handsontable.full.css +3 -8
  50. package/dist/handsontable.full.js +9926 -12218
  51. package/dist/handsontable.full.min.css +3 -3
  52. package/dist/handsontable.full.min.js +120 -120
  53. package/dist/handsontable.js +14628 -16920
  54. package/dist/handsontable.min.css +3 -3
  55. package/dist/handsontable.min.js +4 -4
  56. package/editorManager.js +82 -20
  57. package/editorManager.mjs +86 -25
  58. package/editors/textEditor/textEditor.js +11 -3
  59. package/editors/textEditor/textEditor.mjs +12 -4
  60. package/helpers/mixed.js +1 -1
  61. package/helpers/mixed.mjs +1 -1
  62. package/helpers/number.d.ts +0 -1
  63. package/helpers/number.js +0 -18
  64. package/helpers/number.mjs +0 -17
  65. package/package.json +1 -1
  66. package/pluginHooks.js +1 -1
  67. package/pluginHooks.mjs +1 -1
  68. package/plugins/copyPaste/copyPaste.js +1 -5
  69. package/plugins/copyPaste/copyPaste.mjs +1 -5
  70. package/plugins/customBorders/customBorders.js +52 -18
  71. package/plugins/customBorders/customBorders.mjs +53 -19
  72. package/plugins/mergeCells/mergeCells.js +18 -5
  73. package/plugins/mergeCells/mergeCells.mjs +18 -5
  74. package/plugins/nestedHeaders/nestedHeaders.js +9 -89
  75. package/plugins/nestedHeaders/nestedHeaders.mjs +9 -89
  76. package/plugins/nestedHeaders/stateManager/index.js +0 -37
  77. package/plugins/nestedHeaders/stateManager/index.mjs +0 -37
  78. package/renderers/checkboxRenderer/checkboxRenderer.js +2 -2
  79. package/renderers/checkboxRenderer/checkboxRenderer.mjs +1 -1
  80. package/selection/highlight/constants.js +16 -0
  81. package/selection/highlight/constants.mjs +6 -0
  82. package/selection/highlight/highlight.js +88 -311
  83. package/selection/highlight/highlight.mjs +84 -301
  84. package/selection/highlight/types/activeHeader.js +9 -10
  85. package/selection/highlight/types/activeHeader.mjs +8 -10
  86. package/selection/highlight/types/area.js +27 -12
  87. package/selection/highlight/types/area.mjs +30 -16
  88. package/selection/highlight/types/{focus.js → cell.js} +8 -5
  89. package/selection/highlight/types/{focus.mjs → cell.mjs} +7 -5
  90. package/selection/highlight/types/customSelection.js +10 -7
  91. package/selection/highlight/types/customSelection.mjs +9 -7
  92. package/selection/highlight/types/fill.js +8 -5
  93. package/selection/highlight/types/fill.mjs +7 -5
  94. package/selection/highlight/types/header.js +20 -10
  95. package/selection/highlight/types/header.mjs +19 -10
  96. package/selection/highlight/types/{row.js → index.js} +31 -27
  97. package/selection/highlight/types/{row.mjs → index.mjs} +29 -24
  98. package/selection/highlight/visualSelection.js +28 -23
  99. package/selection/highlight/visualSelection.mjs +28 -23
  100. package/selection/index.js +7 -4
  101. package/selection/index.mjs +3 -2
  102. package/selection/mouseEventHandler.js +1 -1
  103. package/selection/mouseEventHandler.mjs +1 -1
  104. package/selection/range.js +8 -8
  105. package/selection/range.mjs +8 -8
  106. package/selection/selection.js +180 -296
  107. package/selection/selection.mjs +179 -291
  108. package/selection/transformation.js +96 -233
  109. package/selection/transformation.mjs +93 -230
  110. package/selection/utils.js +35 -12
  111. package/selection/utils.mjs +35 -13
  112. package/settings.d.ts +0 -1
  113. package/tableView.js +9 -58
  114. package/tableView.mjs +9 -58
  115. package/3rdparty/walkontable/src/selection/border/constants.js +0 -18
  116. package/3rdparty/walkontable/src/selection/border/constants.mjs +0 -13
  117. package/3rdparty/walkontable/src/selection/constants.js +0 -63
  118. package/3rdparty/walkontable/src/selection/constants.mjs +0 -51
  119. package/3rdparty/walkontable/src/selection/index.js +0 -30
  120. package/3rdparty/walkontable/src/selection/index.mjs +0 -5
  121. package/3rdparty/walkontable/src/selection/manager.js +0 -328
  122. package/3rdparty/walkontable/src/selection/manager.mjs +0 -322
  123. package/3rdparty/walkontable/src/selection/scanner.js +0 -363
  124. package/3rdparty/walkontable/src/selection/scanner.mjs +0 -359
  125. package/3rdparty/walkontable/src/selection/selection.js +0 -133
  126. package/3rdparty/walkontable/src/selection/selection.mjs +0 -127
  127. package/selection/highlight/types/areaLayered.js +0 -54
  128. package/selection/highlight/types/areaLayered.mjs +0 -49
  129. package/selection/highlight/types/column.js +0 -50
  130. package/selection/highlight/types/column.mjs +0 -45
  131. package/shortcutContexts/commands/editor/closeAndSave.js +0 -15
  132. package/shortcutContexts/commands/editor/closeAndSave.mjs +0 -10
  133. package/shortcutContexts/commands/editor/closeWithoutSaving.js +0 -13
  134. package/shortcutContexts/commands/editor/closeWithoutSaving.mjs +0 -8
  135. package/shortcutContexts/commands/editor/fastOpen.js +0 -16
  136. package/shortcutContexts/commands/editor/fastOpen.mjs +0 -11
  137. package/shortcutContexts/commands/editor/index.js +0 -16
  138. package/shortcutContexts/commands/editor/index.mjs +0 -12
  139. package/shortcutContexts/commands/editor/open.js +0 -29
  140. package/shortcutContexts/commands/editor/open.mjs +0 -24
  141. package/shortcutContexts/commands/emptySelectedCells.js +0 -12
  142. package/shortcutContexts/commands/emptySelectedCells.mjs +0 -7
  143. package/shortcutContexts/commands/extendCellsSelection/down.js +0 -15
  144. package/shortcutContexts/commands/extendCellsSelection/down.mjs +0 -10
  145. package/shortcutContexts/commands/extendCellsSelection/downByViewportHeight.js +0 -21
  146. package/shortcutContexts/commands/extendCellsSelection/downByViewportHeight.mjs +0 -16
  147. package/shortcutContexts/commands/extendCellsSelection/index.js +0 -24
  148. package/shortcutContexts/commands/extendCellsSelection/index.mjs +0 -20
  149. package/shortcutContexts/commands/extendCellsSelection/left.js +0 -15
  150. package/shortcutContexts/commands/extendCellsSelection/left.mjs +0 -10
  151. package/shortcutContexts/commands/extendCellsSelection/right.js +0 -15
  152. package/shortcutContexts/commands/extendCellsSelection/right.mjs +0 -10
  153. package/shortcutContexts/commands/extendCellsSelection/toMostBottom.js +0 -22
  154. package/shortcutContexts/commands/extendCellsSelection/toMostBottom.mjs +0 -17
  155. package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.js +0 -17
  156. package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.mjs +0 -12
  157. package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.js +0 -17
  158. package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.mjs +0 -12
  159. package/shortcutContexts/commands/extendCellsSelection/toMostLeft.js +0 -39
  160. package/shortcutContexts/commands/extendCellsSelection/toMostLeft.mjs +0 -34
  161. package/shortcutContexts/commands/extendCellsSelection/toMostRight.js +0 -39
  162. package/shortcutContexts/commands/extendCellsSelection/toMostRight.mjs +0 -34
  163. package/shortcutContexts/commands/extendCellsSelection/toMostTop.js +0 -22
  164. package/shortcutContexts/commands/extendCellsSelection/toMostTop.mjs +0 -17
  165. package/shortcutContexts/commands/extendCellsSelection/up.js +0 -15
  166. package/shortcutContexts/commands/extendCellsSelection/up.mjs +0 -10
  167. package/shortcutContexts/commands/extendCellsSelection/upByViewportHeight.js +0 -21
  168. package/shortcutContexts/commands/extendCellsSelection/upByViewportHeight.mjs +0 -16
  169. package/shortcutContexts/commands/index.js +0 -51
  170. package/shortcutContexts/commands/index.mjs +0 -47
  171. package/shortcutContexts/commands/moveCellSelection/down.js +0 -12
  172. package/shortcutContexts/commands/moveCellSelection/down.mjs +0 -7
  173. package/shortcutContexts/commands/moveCellSelection/downByViewportHeight.js +0 -11
  174. package/shortcutContexts/commands/moveCellSelection/downByViewportHeight.mjs +0 -6
  175. package/shortcutContexts/commands/moveCellSelection/index.js +0 -28
  176. package/shortcutContexts/commands/moveCellSelection/index.mjs +0 -24
  177. package/shortcutContexts/commands/moveCellSelection/inlineEnd.js +0 -13
  178. package/shortcutContexts/commands/moveCellSelection/inlineEnd.mjs +0 -8
  179. package/shortcutContexts/commands/moveCellSelection/inlineStart.js +0 -13
  180. package/shortcutContexts/commands/moveCellSelection/inlineStart.mjs +0 -8
  181. package/shortcutContexts/commands/moveCellSelection/left.js +0 -11
  182. package/shortcutContexts/commands/moveCellSelection/left.mjs +0 -6
  183. package/shortcutContexts/commands/moveCellSelection/right.js +0 -11
  184. package/shortcutContexts/commands/moveCellSelection/right.mjs +0 -6
  185. package/shortcutContexts/commands/moveCellSelection/toMostBottom.js +0 -16
  186. package/shortcutContexts/commands/moveCellSelection/toMostBottom.mjs +0 -11
  187. package/shortcutContexts/commands/moveCellSelection/toMostBottomInlineEnd.js +0 -17
  188. package/shortcutContexts/commands/moveCellSelection/toMostBottomInlineEnd.mjs +0 -12
  189. package/shortcutContexts/commands/moveCellSelection/toMostInlineEnd.js +0 -13
  190. package/shortcutContexts/commands/moveCellSelection/toMostInlineEnd.mjs +0 -8
  191. package/shortcutContexts/commands/moveCellSelection/toMostInlineStart.js +0 -16
  192. package/shortcutContexts/commands/moveCellSelection/toMostInlineStart.mjs +0 -11
  193. package/shortcutContexts/commands/moveCellSelection/toMostLeft.js +0 -35
  194. package/shortcutContexts/commands/moveCellSelection/toMostLeft.mjs +0 -30
  195. package/shortcutContexts/commands/moveCellSelection/toMostRight.js +0 -35
  196. package/shortcutContexts/commands/moveCellSelection/toMostRight.mjs +0 -30
  197. package/shortcutContexts/commands/moveCellSelection/toMostTop.js +0 -16
  198. package/shortcutContexts/commands/moveCellSelection/toMostTop.mjs +0 -11
  199. package/shortcutContexts/commands/moveCellSelection/toMostTopInlineStart.js +0 -18
  200. package/shortcutContexts/commands/moveCellSelection/toMostTopInlineStart.mjs +0 -13
  201. package/shortcutContexts/commands/moveCellSelection/up.js +0 -12
  202. package/shortcutContexts/commands/moveCellSelection/up.mjs +0 -7
  203. package/shortcutContexts/commands/moveCellSelection/upByViewportHeight.js +0 -11
  204. package/shortcutContexts/commands/moveCellSelection/upByViewportHeight.mjs +0 -6
  205. package/shortcutContexts/commands/populateSelectedCellsData.js +0 -35
  206. package/shortcutContexts/commands/populateSelectedCellsData.mjs +0 -30
  207. package/shortcutContexts/commands/selectAll.js +0 -11
  208. package/shortcutContexts/commands/selectAll.mjs +0 -6
  209. package/shortcutContexts/constants.js +0 -19
  210. package/shortcutContexts/constants.mjs +0 -12
  211. package/shortcutContexts/editor.js +0 -29
  212. package/shortcutContexts/editor.mjs +0 -25
  213. package/shortcutContexts/grid.js +0 -232
  214. package/shortcutContexts/grid.mjs +0 -228
  215. package/shortcutContexts/index.js +0 -29
  216. package/shortcutContexts/index.mjs +0 -15
package/core.mjs CHANGED
@@ -38,6 +38,7 @@ import "core-js/modules/es.array.reverse.js";
38
38
  import "core-js/modules/web.dom-collections.for-each.js";
39
39
  import "core-js/modules/web.timers.js";
40
40
  import "core-js/modules/web.immediate.js";
41
+ import "core-js/modules/es.map.js";
41
42
  import { addClass, empty, observeVisibilityChangeOnce, removeClass } from "./helpers/dom/element.mjs";
42
43
  import { isFunction } from "./helpers/function.mjs";
43
44
  import { isDefined, isUndefined, isRegExp, _injectProductInfo, isEmpty } from "./helpers/mixed.mjs";
@@ -68,7 +69,7 @@ import { Selection } from "./selection/index.mjs";
68
69
  import { MetaManager, DynamicCellMetaMod, ExtendMetaPropertiesMod, replaceData } from "./dataMap/index.mjs";
69
70
  import { createUniqueMap } from "./utils/dataStructures/uniqueMap.mjs";
70
71
  import { createShortcutManager } from "./shortcuts/index.mjs";
71
- import { registerAllShortcutContexts } from "./shortcutContexts/index.mjs";
72
+ var SHORTCUTS_GROUP = 'gridDefault';
72
73
  var activeGuid = null;
73
74
  var deprecationWarns = new Set();
74
75
 
@@ -285,8 +286,12 @@ export default function Core(rootElement, userSettings) {
285
286
  };
286
287
 
287
288
  var selection = new Selection(tableMeta, {
288
- rowIndexMapper: instance.rowIndexMapper,
289
- columnIndexMapper: instance.columnIndexMapper,
289
+ rowIndexMapper: function rowIndexMapper() {
290
+ return instance.rowIndexMapper;
291
+ },
292
+ columnIndexMapper: function columnIndexMapper() {
293
+ return instance.columnIndexMapper;
294
+ },
290
295
  countCols: function countCols() {
291
296
  return instance.countCols();
292
297
  },
@@ -299,18 +304,12 @@ export default function Core(rootElement, userSettings) {
299
304
  isEditorOpened: function isEditorOpened() {
300
305
  return instance.getActiveEditor() ? instance.getActiveEditor().isOpened() : false;
301
306
  },
302
- countRenderableColumns: function countRenderableColumns() {
307
+ countColsTranslated: function countColsTranslated() {
303
308
  return _this.view.countRenderableColumns();
304
309
  },
305
- countRenderableRows: function countRenderableRows() {
310
+ countRowsTranslated: function countRowsTranslated() {
306
311
  return _this.view.countRenderableRows();
307
312
  },
308
- countRowHeaders: function countRowHeaders() {
309
- return _this.countRowHeaders();
310
- },
311
- countColHeaders: function countColHeaders() {
312
- return _this.countColHeaders();
313
- },
314
313
  getShortcutManager: function getShortcutManager() {
315
314
  return instance.getShortcutManager();
316
315
  },
@@ -343,6 +342,12 @@ export default function Core(rootElement, userSettings) {
343
342
  });
344
343
  this.selection.addLocalHook('beforeSetRangeEnd', function (cellCoords) {
345
344
  _this.runHooks('beforeSetRangeEnd', cellCoords);
345
+ if (cellCoords.row < 0) {
346
+ cellCoords.row = _this.view._wt.wtTable.getFirstVisibleRow();
347
+ }
348
+ if (cellCoords.col < 0) {
349
+ cellCoords.col = _this.view._wt.wtTable.getFirstVisibleColumn();
350
+ }
346
351
  });
347
352
  this.selection.addLocalHook('afterSetRangeEnd', function (cellCoords) {
348
353
  var preventScrolling = createObjectPropListener(false);
@@ -368,14 +373,7 @@ export default function Core(rootElement, userSettings) {
368
373
  if (scrollToCell !== false) {
369
374
  if (!isSelectedByAnyHeader) {
370
375
  if (currentSelectedRange && !_this.selection.isMultiple()) {
371
- var renderableCoords = visualToRenderableCoords(currentSelectedRange.from);
372
- if (renderableCoords.row < 0 && renderableCoords.col >= 0) {
373
- _this.view.scrollViewportHorizontally(renderableCoords.col);
374
- } else if (renderableCoords.col < 0 && renderableCoords.row >= 0) {
375
- _this.view.scrollViewportVertically(renderableCoords.row);
376
- } else {
377
- _this.view.scrollViewport(renderableCoords);
378
- }
376
+ _this.view.scrollViewport(visualToRenderableCoords(currentSelectedRange.from));
379
377
  } else {
380
378
  _this.view.scrollViewport(visualToRenderableCoords(cellCoords));
381
379
  }
@@ -3729,30 +3727,6 @@ export default function Core(rootElement, userSettings) {
3729
3727
  return instance.view._wt.drawn ? instance.view._wt.wtTable.getVisibleColumnsCount() : -1;
3730
3728
  };
3731
3729
 
3732
- /**
3733
- * Returns the number of rendered row headers.
3734
- *
3735
- * @since 13.0.0
3736
- * @memberof Core#
3737
- * @function countRowHeaders
3738
- * @returns {number} Number of row headers.
3739
- */
3740
- this.countRowHeaders = function () {
3741
- return this.view.getRowHeadersCount();
3742
- };
3743
-
3744
- /**
3745
- * Returns the number of rendered column headers.
3746
- *
3747
- * @since 13.0.0
3748
- * @memberof Core#
3749
- * @function countColHeaders
3750
- * @returns {number} Number of column headers.
3751
- */
3752
- this.countColHeaders = function () {
3753
- return this.view.getColumnHeadersCount();
3754
- };
3755
-
3756
3730
  /**
3757
3731
  * Returns the number of empty rows. If the optional ending parameter is `true`, returns the
3758
3732
  * number of empty rows at the bottom of the table.
@@ -3957,8 +3931,6 @@ export default function Core(rootElement, userSettings) {
3957
3931
  * hot.selectColumns('id');
3958
3932
  * // Select range of columns using visual indexes.
3959
3933
  * hot.selectColumns(1, 4);
3960
- * // Select range of columns using visual indexes and mark the header as highlighted.
3961
- * hot.selectColumns(1, 2, -1);
3962
3934
  * // Select range of columns using column properties.
3963
3935
  * hot.selectColumns('id', 'last_name');
3964
3936
  * ```
@@ -3969,15 +3941,11 @@ export default function Core(rootElement, userSettings) {
3969
3941
  * @param {number} startColumn The visual column index from which the selection starts.
3970
3942
  * @param {number} [endColumn=startColumn] The visual column index to which the selection finishes. If `endColumn`
3971
3943
  * is not defined the column defined by `startColumn` will be selected.
3972
- * @param {number} [headerLevel=0] The header level allows changing the cell/header highlight position. The value can
3973
- * take 0 to -N, where 0 means highlighting the cell nearest the column header, -1
3974
- * means the highlighting header starting from the header closest to the cells.
3975
3944
  * @returns {boolean} `true` if selection was successful, `false` otherwise.
3976
3945
  */
3977
3946
  this.selectColumns = function (startColumn) {
3978
3947
  var endColumn = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : startColumn;
3979
- var headerLevel = arguments.length > 2 ? arguments[2] : undefined;
3980
- return selection.selectColumns(startColumn, endColumn, headerLevel);
3948
+ return selection.selectColumns(startColumn, endColumn);
3981
3949
  };
3982
3950
 
3983
3951
  /**
@@ -3989,8 +3957,6 @@ export default function Core(rootElement, userSettings) {
3989
3957
  * hot.selectRows(1);
3990
3958
  * // Select range of rows using visual indexes.
3991
3959
  * hot.selectRows(1, 4);
3992
- * // Select range of rows using visual indexes and mark the header as highlighted.
3993
- * hot.selectRows(1, 2, -1);
3994
3960
  * ```
3995
3961
  *
3996
3962
  * @memberof Core#
@@ -3999,15 +3965,11 @@ export default function Core(rootElement, userSettings) {
3999
3965
  * @param {number} startRow The visual row index from which the selection starts.
4000
3966
  * @param {number} [endRow=startRow] The visual row index to which the selection finishes. If `endRow`
4001
3967
  * is not defined the row defined by `startRow` will be selected.
4002
- * @param {number} [headerLevel=0] The header level allows changing the cell/header highlight position. The value can
4003
- * take 0 to -N, where 0 means highlighting the cell nearest the row header, -1
4004
- * means the highlighting header starting from the header closest to the cells.
4005
3968
  * @returns {boolean} `true` if selection was successful, `false` otherwise.
4006
3969
  */
4007
3970
  this.selectRows = function (startRow) {
4008
3971
  var endRow = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : startRow;
4009
- var headerLevel = arguments.length > 2 ? arguments[2] : undefined;
4010
- return selection.selectRows(startRow, endRow, headerLevel);
3972
+ return selection.selectRows(startRow, endRow);
4011
3973
  };
4012
3974
 
4013
3975
  /**
@@ -4026,16 +3988,9 @@ export default function Core(rootElement, userSettings) {
4026
3988
  * The previous selection is overwritten.
4027
3989
  *
4028
3990
  * ```js
4029
- * // select all cells in the table, including all headers with corner
3991
+ * // select all cells in the table, including all headers
4030
3992
  * hot.selectAll();
4031
3993
  *
4032
- * // select all cells in the table, including row headers without corner
4033
- * hot.selectAll(true, false);
4034
- *
4035
- * // select all cells in the table, including all headers with corner but move the focus
4036
- * // highlight to position -2,-1
4037
- * hot.selectAll(-2, -1);
4038
- *
4039
3994
  * // select all cells in the table, without headers
4040
3995
  * hot.selectAll(false);
4041
3996
  * ```
@@ -4043,15 +3998,15 @@ export default function Core(rootElement, userSettings) {
4043
3998
  * @since 0.38.2
4044
3999
  * @memberof Core#
4045
4000
  * @function selectAll
4046
- * @param {boolean|number} [rowHeaderLevel=true] `true`: include all row headers.
4047
- * @param {boolean|number} [columnHeaderLevel=true] `true`: include all column headers.
4001
+ * @param {boolean} [includeHeaders=true] `true`: include all row, column and corner headers.
4048
4002
  * `false`: don't include any headers.
4049
4003
  */
4050
4004
  this.selectAll = function () {
4051
- var rowHeaderLevel = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
4052
- var columnHeaderLevel = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : rowHeaderLevel;
4005
+ var includeHeaders = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
4006
+ var includeRowHeaders = includeHeaders && this.hasRowHeaders();
4007
+ var includeColumnHeaders = includeHeaders && this.hasColHeaders();
4053
4008
  preventScrollingToCell = true;
4054
- selection.selectAll(rowHeaderLevel, columnHeaderLevel);
4009
+ selection.selectAll(includeRowHeaders, includeColumnHeaders);
4055
4010
  preventScrollingToCell = false;
4056
4011
  };
4057
4012
  var getIndexToScroll = function getIndexToScroll(indexMapper, visualIndex) {
@@ -4455,16 +4410,6 @@ export default function Core(rootElement, userSettings) {
4455
4410
  }
4456
4411
  };
4457
4412
 
4458
- /**
4459
- * Gets the instance of the EditorManager.
4460
- *
4461
- * @private
4462
- * @returns {EditorManager}
4463
- */
4464
- this._getEditorManager = function () {
4465
- return editorManager;
4466
- };
4467
-
4468
4413
  /**
4469
4414
  * Check if currently it is RTL direction.
4470
4415
  *
@@ -4537,11 +4482,284 @@ export default function Core(rootElement, userSettings) {
4537
4482
  this.getShortcutManager = function () {
4538
4483
  return shortcutManager;
4539
4484
  };
4485
+ var gridContext = shortcutManager.addContext('grid');
4486
+ var gridConfig = {
4487
+ runOnlyIf: function runOnlyIf() {
4488
+ return isDefined(instance.getSelected()) && instance.countRenderedRows() > 0 && instance.countRenderedCols() > 0;
4489
+ },
4490
+ group: SHORTCUTS_GROUP
4491
+ };
4492
+ shortcutManager.setActiveContextName('grid');
4493
+ gridContext.addShortcuts([{
4494
+ keys: [['Control/Meta', 'A']],
4495
+ callback: function callback() {
4496
+ instance.selectAll();
4497
+ }
4498
+ }, {
4499
+ keys: [['Control/Meta', 'Enter']],
4500
+ callback: function callback() {
4501
+ var selectedRange = instance.getSelectedRange();
4502
+ var _selectedRange$highli = selectedRange[selectedRange.length - 1].highlight,
4503
+ highlightRow = _selectedRange$highli.row,
4504
+ highlightColumn = _selectedRange$highli.col;
4505
+ var valueToPopulate = instance.getDataAtCell(highlightRow, highlightColumn);
4506
+ var cellValues = new Map();
4507
+ for (var i = 0; i < selectedRange.length; i++) {
4508
+ selectedRange[i].forAll(function (row, column) {
4509
+ if (row >= 0 && column >= 0 && (row !== highlightRow || column !== highlightColumn)) {
4510
+ var _instance$getCellMeta = instance.getCellMeta(row, column),
4511
+ readOnly = _instance$getCellMeta.readOnly;
4512
+ if (!readOnly) {
4513
+ cellValues.set("".concat(row, "x").concat(column), [row, column, valueToPopulate]);
4514
+ }
4515
+ }
4516
+ });
4517
+ }
4518
+ instance.setDataAtCell(Array.from(cellValues.values()));
4519
+ },
4520
+ runOnlyIf: function runOnlyIf() {
4521
+ return instance.getSelectedRangeLast().getCellsCount() > 1;
4522
+ }
4523
+ }, {
4524
+ keys: [['ArrowUp']],
4525
+ callback: function callback() {
4526
+ selection.transformStart(-1, 0);
4527
+ }
4528
+ }, {
4529
+ keys: [['ArrowUp', 'Control/Meta']],
4530
+ captureCtrl: true,
4531
+ callback: function callback() {
4532
+ selection.setRangeStart(instance._createCellCoords(instance.rowIndexMapper.getNearestNotHiddenIndex(0, 1), instance.getSelectedRangeLast().highlight.col));
4533
+ }
4534
+ }, {
4535
+ keys: [['ArrowUp', 'Shift']],
4536
+ callback: function callback() {
4537
+ selection.transformEnd(-1, 0);
4538
+ }
4539
+ }, {
4540
+ keys: [['ArrowUp', 'Shift', 'Control/Meta']],
4541
+ captureCtrl: true,
4542
+ callback: function callback() {
4543
+ var _instance$getSelected = instance.getSelectedRangeLast(),
4544
+ from = _instance$getSelected.from,
4545
+ to = _instance$getSelected.to;
4546
+ var row = instance.rowIndexMapper.getNearestNotHiddenIndex(0, 1);
4547
+ selection.setRangeStart(from.clone());
4548
+ selection.setRangeEnd(instance._createCellCoords(row, to.col));
4549
+ },
4550
+ runOnlyIf: function runOnlyIf() {
4551
+ return !(instance.selection.isSelectedByCorner() || instance.selection.isSelectedByColumnHeader());
4552
+ }
4553
+ }, {
4554
+ keys: [['ArrowDown']],
4555
+ callback: function callback() {
4556
+ selection.transformStart(1, 0);
4557
+ }
4558
+ }, {
4559
+ keys: [['ArrowDown', 'Control/Meta']],
4560
+ captureCtrl: true,
4561
+ callback: function callback() {
4562
+ selection.setRangeStart(instance._createCellCoords(instance.rowIndexMapper.getNearestNotHiddenIndex(instance.countRows() - 1, -1), instance.getSelectedRangeLast().highlight.col));
4563
+ }
4564
+ }, {
4565
+ keys: [['ArrowDown', 'Shift']],
4566
+ callback: function callback() {
4567
+ selection.transformEnd(1, 0);
4568
+ }
4569
+ }, {
4570
+ keys: [['ArrowDown', 'Shift', 'Control/Meta']],
4571
+ captureCtrl: true,
4572
+ callback: function callback() {
4573
+ var _instance$getSelected2 = instance.getSelectedRangeLast(),
4574
+ from = _instance$getSelected2.from,
4575
+ to = _instance$getSelected2.to;
4576
+ var row = instance.rowIndexMapper.getNearestNotHiddenIndex(instance.countRows() - 1, -1);
4577
+ selection.setRangeStart(from.clone());
4578
+ selection.setRangeEnd(instance._createCellCoords(row, to.col));
4579
+ },
4580
+ runOnlyIf: function runOnlyIf() {
4581
+ return !(instance.selection.isSelectedByCorner() || instance.selection.isSelectedByColumnHeader());
4582
+ }
4583
+ }, {
4584
+ keys: [['ArrowLeft']],
4585
+ callback: function callback() {
4586
+ selection.transformStart(0, -1 * instance.getDirectionFactor());
4587
+ }
4588
+ }, {
4589
+ keys: [['ArrowLeft', 'Control/Meta']],
4590
+ captureCtrl: true,
4591
+ callback: function callback() {
4592
+ var _instance$columnIndex;
4593
+ var row = instance.getSelectedRangeLast().highlight.row;
4594
+ var column = (_instance$columnIndex = instance.columnIndexMapper).getNearestNotHiddenIndex.apply(_instance$columnIndex, _toConsumableArray(instance.isRtl() ? [instance.countCols() - 1, -1] : [0, 1]));
4595
+ selection.setRangeStart(instance._createCellCoords(row, column));
4596
+ }
4597
+ }, {
4598
+ keys: [['ArrowLeft', 'Shift']],
4599
+ callback: function callback() {
4600
+ selection.transformEnd(0, -1 * instance.getDirectionFactor());
4601
+ }
4602
+ }, {
4603
+ keys: [['ArrowLeft', 'Shift', 'Control/Meta']],
4604
+ captureCtrl: true,
4605
+ callback: function callback() {
4606
+ var _instance$columnIndex2;
4607
+ var _instance$getSelected3 = instance.getSelectedRangeLast(),
4608
+ from = _instance$getSelected3.from,
4609
+ to = _instance$getSelected3.to;
4610
+ var column = (_instance$columnIndex2 = instance.columnIndexMapper).getNearestNotHiddenIndex.apply(_instance$columnIndex2, _toConsumableArray(instance.isRtl() ? [instance.countCols() - 1, -1] : [0, 1]));
4611
+ selection.setRangeStart(from.clone());
4612
+ selection.setRangeEnd(instance._createCellCoords(to.row, column));
4613
+ },
4614
+ runOnlyIf: function runOnlyIf() {
4615
+ return !(instance.selection.isSelectedByCorner() || instance.selection.isSelectedByRowHeader());
4616
+ }
4617
+ }, {
4618
+ keys: [['ArrowRight']],
4619
+ callback: function callback() {
4620
+ selection.transformStart(0, instance.getDirectionFactor());
4621
+ }
4622
+ }, {
4623
+ keys: [['ArrowRight', 'Control/Meta']],
4624
+ captureCtrl: true,
4625
+ callback: function callback() {
4626
+ var _instance$columnIndex3;
4627
+ var row = instance.getSelectedRangeLast().highlight.row;
4628
+ var column = (_instance$columnIndex3 = instance.columnIndexMapper).getNearestNotHiddenIndex.apply(_instance$columnIndex3, _toConsumableArray(instance.isRtl() ? [0, 1] : [instance.countCols() - 1, -1]));
4629
+ selection.setRangeStart(instance._createCellCoords(row, column));
4630
+ }
4631
+ }, {
4632
+ keys: [['ArrowRight', 'Shift']],
4633
+ callback: function callback() {
4634
+ selection.transformEnd(0, instance.getDirectionFactor());
4635
+ }
4636
+ }, {
4637
+ keys: [['ArrowRight', 'Shift', 'Control/Meta']],
4638
+ captureCtrl: true,
4639
+ callback: function callback() {
4640
+ var _instance$columnIndex4;
4641
+ var _instance$getSelected4 = instance.getSelectedRangeLast(),
4642
+ from = _instance$getSelected4.from,
4643
+ to = _instance$getSelected4.to;
4644
+ var column = (_instance$columnIndex4 = instance.columnIndexMapper).getNearestNotHiddenIndex.apply(_instance$columnIndex4, _toConsumableArray(instance.isRtl() ? [0, 1] : [instance.countCols() - 1, -1]));
4645
+ selection.setRangeStart(from.clone());
4646
+ selection.setRangeEnd(instance._createCellCoords(to.row, column));
4647
+ },
4648
+ runOnlyIf: function runOnlyIf() {
4649
+ return !(instance.selection.isSelectedByCorner() || instance.selection.isSelectedByRowHeader());
4650
+ }
4651
+ }, {
4652
+ keys: [['Home']],
4653
+ captureCtrl: true,
4654
+ callback: function callback() {
4655
+ var fixedColumns = parseInt(instance.getSettings().fixedColumnsStart, 10);
4656
+ var row = instance.getSelectedRangeLast().highlight.row;
4657
+ var column = instance.columnIndexMapper.getNearestNotHiddenIndex(fixedColumns, 1);
4658
+ selection.setRangeStart(instance._createCellCoords(row, column));
4659
+ },
4660
+ runOnlyIf: function runOnlyIf() {
4661
+ return instance.view.isMainTableNotFullyCoveredByOverlays();
4662
+ }
4663
+ }, {
4664
+ keys: [['Home', 'Shift']],
4665
+ callback: function callback() {
4666
+ selection.setRangeEnd(instance._createCellCoords(selection.selectedRange.current().from.row, instance.columnIndexMapper.getNearestNotHiddenIndex(0, 1)));
4667
+ }
4668
+ }, {
4669
+ keys: [['Home', 'Control/Meta']],
4670
+ captureCtrl: true,
4671
+ callback: function callback() {
4672
+ var fixedRows = parseInt(instance.getSettings().fixedRowsTop, 10);
4673
+ var fixedColumns = parseInt(instance.getSettings().fixedColumnsStart, 10);
4674
+ var row = instance.rowIndexMapper.getNearestNotHiddenIndex(fixedRows, 1);
4675
+ var column = instance.columnIndexMapper.getNearestNotHiddenIndex(fixedColumns, 1);
4676
+ selection.setRangeStart(instance._createCellCoords(row, column));
4677
+ },
4678
+ runOnlyIf: function runOnlyIf() {
4679
+ return instance.view.isMainTableNotFullyCoveredByOverlays();
4680
+ }
4681
+ }, {
4682
+ keys: [['End']],
4683
+ captureCtrl: true,
4684
+ callback: function callback() {
4685
+ selection.setRangeStart(instance._createCellCoords(instance.getSelectedRangeLast().highlight.row, instance.columnIndexMapper.getNearestNotHiddenIndex(instance.countCols() - 1, -1)));
4686
+ },
4687
+ runOnlyIf: function runOnlyIf() {
4688
+ return instance.view.isMainTableNotFullyCoveredByOverlays();
4689
+ }
4690
+ }, {
4691
+ keys: [['End', 'Shift']],
4692
+ callback: function callback() {
4693
+ selection.setRangeEnd(instance._createCellCoords(selection.selectedRange.current().from.row, instance.columnIndexMapper.getNearestNotHiddenIndex(instance.countCols() - 1, -1)));
4694
+ }
4695
+ }, {
4696
+ keys: [['End', 'Control/Meta']],
4697
+ captureCtrl: true,
4698
+ callback: function callback() {
4699
+ var fixedRows = parseInt(instance.getSettings().fixedRowsBottom, 10);
4700
+ var row = instance.rowIndexMapper.getNearestNotHiddenIndex(instance.countRows() - fixedRows - 1, -1);
4701
+ var column = instance.columnIndexMapper.getNearestNotHiddenIndex(instance.countCols() - 1, -1);
4702
+ selection.setRangeStart(instance._createCellCoords(row, column));
4703
+ },
4704
+ runOnlyIf: function runOnlyIf() {
4705
+ return instance.view.isMainTableNotFullyCoveredByOverlays();
4706
+ }
4707
+ }, {
4708
+ keys: [['PageUp']],
4709
+ callback: function callback() {
4710
+ selection.transformStart(-instance.countVisibleRows(), 0);
4711
+ }
4712
+ }, {
4713
+ keys: [['PageUp', 'Shift']],
4714
+ callback: function callback() {
4715
+ var _instance$getSelected5 = instance.getSelectedRangeLast(),
4716
+ to = _instance$getSelected5.to;
4717
+ var nextRowIndexToSelect = Math.max(to.row - instance.countVisibleRows(), 0);
4718
+ var row = instance.rowIndexMapper.getNearestNotHiddenIndex(nextRowIndexToSelect, 1);
4719
+ if (row !== null) {
4720
+ var coords = instance._createCellCoords(row, to.col);
4721
+ var scrollPadding = to.row - instance.view.getFirstFullyVisibleRow();
4722
+ var nextVerticalScroll = Math.max(coords.row - scrollPadding, 0);
4723
+ selection.setRangeEnd(coords);
4724
+ instance.scrollViewportTo(nextVerticalScroll);
4725
+ }
4726
+ }
4727
+ }, {
4728
+ keys: [['PageDown']],
4729
+ callback: function callback() {
4730
+ selection.transformStart(instance.countVisibleRows(), 0);
4731
+ }
4732
+ }, {
4733
+ keys: [['PageDown', 'Shift']],
4734
+ callback: function callback() {
4735
+ var _instance$getSelected6 = instance.getSelectedRangeLast(),
4736
+ to = _instance$getSelected6.to;
4737
+ var nextRowIndexToSelect = Math.min(to.row + instance.countVisibleRows(), instance.countRows() - 1);
4738
+ var row = instance.rowIndexMapper.getNearestNotHiddenIndex(nextRowIndexToSelect, -1);
4739
+ if (row !== null) {
4740
+ var coords = instance._createCellCoords(row, to.col);
4741
+ var scrollPadding = to.row - instance.view.getFirstFullyVisibleRow();
4742
+ var nextVerticalScroll = Math.min(coords.row - scrollPadding, instance.countRows() - 1);
4743
+ selection.setRangeEnd(coords);
4744
+ instance.scrollViewportTo(nextVerticalScroll);
4745
+ }
4746
+ }
4747
+ }, {
4748
+ keys: [['Tab']],
4749
+ callback: function callback(event) {
4750
+ var tabMoves = typeof tableMeta.tabMoves === 'function' ? tableMeta.tabMoves(event) : tableMeta.tabMoves;
4751
+ selection.transformStart(tabMoves.row, tabMoves.col, true);
4752
+ }
4753
+ }, {
4754
+ keys: [['Shift', 'Tab']],
4755
+ callback: function callback(event) {
4756
+ var tabMoves = typeof tableMeta.tabMoves === 'function' ? tableMeta.tabMoves(event) : tableMeta.tabMoves;
4757
+ selection.transformStart(-tabMoves.row, -tabMoves.col);
4758
+ }
4759
+ }], gridConfig);
4540
4760
  getPluginsNames().forEach(function (pluginName) {
4541
4761
  var PluginClass = getPlugin(pluginName);
4542
4762
  pluginsRegistry.addItem(pluginName, new PluginClass(_this));
4543
4763
  });
4544
- registerAllShortcutContexts(instance);
4545
- shortcutManager.setActiveContextName('grid');
4546
4764
  Hooks.getSingleton().run(instance, 'construct');
4547
4765
  }
@@ -3112,21 +3112,6 @@ var _default = function _default() {
3112
3112
  * ```
3113
3113
  */
3114
3114
  multiColumnSorting: void 0,
3115
- /**
3116
- * The `navigableHeaders` option enables or disables the ability to navigate in headers.
3117
- *
3118
- * @since 13.0.0
3119
- * @memberof Options#
3120
- * @type {boolean}
3121
- * @default false
3122
- * @category Core
3123
- *
3124
- * @example
3125
- * ```js
3126
- * navigableHeaders: true,
3127
- * ```
3128
- */
3129
- navigableHeaders: false,
3130
3115
  /**
3131
3116
  * @description
3132
3117
  * The `nestedHeaders` option configures the [`NestedHeaders`](@/api/nestedHeaders.md) plugin.
@@ -3108,21 +3108,6 @@ export default (function () {
3108
3108
  * ```
3109
3109
  */
3110
3110
  multiColumnSorting: void 0,
3111
- /**
3112
- * The `navigableHeaders` option enables or disables the ability to navigate in headers.
3113
- *
3114
- * @since 13.0.0
3115
- * @memberof Options#
3116
- * @type {boolean}
3117
- * @default false
3118
- * @category Core
3119
- *
3120
- * @example
3121
- * ```js
3122
- * navigableHeaders: true,
3123
- * ```
3124
- */
3125
- navigableHeaders: false,
3126
3111
  /**
3127
3112
  * @description
3128
3113
  * The `nestedHeaders` option configures the [`NestedHeaders`](@/api/nestedHeaders.md) plugin.
@@ -25,8 +25,8 @@
25
25
  * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER ARISING FROM
26
26
  * USE OR INABILITY TO USE THIS SOFTWARE.
27
27
  *
28
- * Version: 0.0.0-next-93e34dc-20230601
29
- * Release date: 23/05/2023 (built at 01/06/2023 11:45:41)
28
+ * Version: 0.0.0-next-b7cca45-20230605
29
+ * Release date: 23/05/2023 (built at 05/06/2023 08:56:10)
30
30
  */
31
31
  /**
32
32
  * Fix for bootstrap styles
@@ -607,11 +607,6 @@ innerBorderBottom - Property controlled by bottom overlay
607
607
  opacity: 0.58;
608
608
  }
609
609
 
610
- .handsontable tbody th.current,
611
- .handsontable thead th.current {
612
- box-shadow: inset 0 0 0 2px #5292f7;
613
- }
614
-
615
610
  .handsontable tbody th.ht__highlight,
616
611
  .handsontable thead th.ht__highlight {
617
612
  background-color: #dcdcdc;
@@ -804,7 +799,7 @@ TextRenderer placeholder value
804
799
  cursor: pointer;
805
800
  -webkit-box-shadow: 0 0 0 6px rgb(238, 238, 238);
806
801
  -moz-box-shadow: 0 0 0 6px rgb(238, 238, 238);
807
- box-shadow: 0 0 0 3px rgb(238, 238, 238);
802
+ box-shadow: 0 0 0 6px rgb(238, 238, 238);
808
803
  background: #eee;
809
804
  text-align: center;
810
805
  }
@@ -25,8 +25,8 @@
25
25
  * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER ARISING FROM
26
26
  * USE OR INABILITY TO USE THIS SOFTWARE.
27
27
  *
28
- * Version: 0.0.0-next-93e34dc-20230601
29
- * Release date: 23/05/2023 (built at 01/06/2023 11:45:41)
28
+ * Version: 0.0.0-next-b7cca45-20230605
29
+ * Release date: 23/05/2023 (built at 05/06/2023 08:56:10)
30
30
  */
31
31
  /**
32
32
  * Fix for bootstrap styles
@@ -607,11 +607,6 @@ innerBorderBottom - Property controlled by bottom overlay
607
607
  opacity: 0.58;
608
608
  }
609
609
 
610
- .handsontable tbody th.current,
611
- .handsontable thead th.current {
612
- box-shadow: inset 0 0 0 2px #5292f7;
613
- }
614
-
615
610
  .handsontable tbody th.ht__highlight,
616
611
  .handsontable thead th.ht__highlight {
617
612
  background-color: #dcdcdc;
@@ -804,7 +799,7 @@ TextRenderer placeholder value
804
799
  cursor: pointer;
805
800
  -webkit-box-shadow: 0 0 0 6px rgb(238, 238, 238);
806
801
  -moz-box-shadow: 0 0 0 6px rgb(238, 238, 238);
807
- box-shadow: 0 0 0 3px rgb(238, 238, 238);
802
+ box-shadow: 0 0 0 6px rgb(238, 238, 238);
808
803
  background: #eee;
809
804
  text-align: center;
810
805
  }