handsontable 0.0.0-next-d96e9b5-20240220 → 0.0.0-next-d4816a9-20240221

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of handsontable might be problematic. Click here for more details.

Files changed (89) hide show
  1. package/3rdparty/walkontable/src/cell/range.d.ts +0 -1
  2. package/3rdparty/walkontable/src/cell/range.js +0 -12
  3. package/3rdparty/walkontable/src/cell/range.mjs +0 -12
  4. package/base.js +2 -2
  5. package/base.mjs +2 -2
  6. package/core/viewportScroll/index.js +1 -4
  7. package/core/viewportScroll/index.mjs +1 -4
  8. package/core.js +0 -14
  9. package/core.mjs +0 -14
  10. package/dist/handsontable.css +2 -2
  11. package/dist/handsontable.full.css +2 -2
  12. package/dist/handsontable.full.js +1328 -1606
  13. package/dist/handsontable.full.min.css +2 -2
  14. package/dist/handsontable.full.min.js +151 -151
  15. package/dist/handsontable.js +1328 -1606
  16. package/dist/handsontable.min.css +2 -2
  17. package/dist/handsontable.min.js +19 -19
  18. package/editorManager.js +8 -12
  19. package/editorManager.mjs +8 -12
  20. package/helpers/mixed.js +1 -1
  21. package/helpers/mixed.mjs +1 -1
  22. package/package.json +1 -1
  23. package/pluginHooks.d.ts +0 -1
  24. package/pluginHooks.js +1 -43
  25. package/pluginHooks.mjs +1 -43
  26. package/plugins/collapsibleColumns/collapsibleColumns.js +1 -7
  27. package/plugins/collapsibleColumns/collapsibleColumns.mjs +1 -7
  28. package/plugins/columnSorting/columnSorting.js +0 -6
  29. package/plugins/columnSorting/columnSorting.mjs +0 -6
  30. package/plugins/contextMenu/menu/defaultShortcutsList.js +10 -26
  31. package/plugins/contextMenu/menu/defaultShortcutsList.mjs +10 -26
  32. package/plugins/mergeCells/calculations/selection.js +70 -1
  33. package/plugins/mergeCells/calculations/selection.mjs +70 -1
  34. package/plugins/mergeCells/contextMenuItem/toggleMerge.js +1 -11
  35. package/plugins/mergeCells/contextMenuItem/toggleMerge.mjs +1 -11
  36. package/plugins/mergeCells/mergeCells.js +207 -182
  37. package/plugins/mergeCells/mergeCells.mjs +207 -182
  38. package/plugins/multiColumnSorting/multiColumnSorting.js +0 -6
  39. package/plugins/multiColumnSorting/multiColumnSorting.mjs +0 -6
  40. package/plugins/nestedHeaders/nestedHeaders.js +0 -1
  41. package/plugins/nestedHeaders/nestedHeaders.mjs +0 -1
  42. package/plugins/nestedRows/nestedRows.js +1 -7
  43. package/plugins/nestedRows/nestedRows.mjs +1 -7
  44. package/renderers/checkboxRenderer/checkboxRenderer.js +4 -4
  45. package/renderers/checkboxRenderer/checkboxRenderer.mjs +4 -4
  46. package/selection/highlight/visualSelection.js +0 -2
  47. package/selection/highlight/visualSelection.mjs +0 -2
  48. package/selection/selection.js +34 -195
  49. package/selection/selection.mjs +33 -194
  50. package/selection/transformation.js +30 -45
  51. package/selection/transformation.mjs +30 -45
  52. package/shortcutContexts/commands/editor/closeAndSave.js +2 -2
  53. package/shortcutContexts/commands/editor/closeAndSave.mjs +2 -2
  54. package/shortcutContexts/commands/editor/open.js +3 -18
  55. package/shortcutContexts/commands/editor/open.mjs +3 -18
  56. package/shortcutContexts/commands/extendCellsSelection/down.js +1 -1
  57. package/shortcutContexts/commands/extendCellsSelection/down.mjs +1 -1
  58. package/shortcutContexts/commands/extendCellsSelection/left.js +1 -1
  59. package/shortcutContexts/commands/extendCellsSelection/left.mjs +1 -1
  60. package/shortcutContexts/commands/extendCellsSelection/right.js +1 -1
  61. package/shortcutContexts/commands/extendCellsSelection/right.mjs +1 -1
  62. package/shortcutContexts/commands/extendCellsSelection/toColumns.js +1 -1
  63. package/shortcutContexts/commands/extendCellsSelection/toColumns.mjs +1 -1
  64. package/shortcutContexts/commands/extendCellsSelection/toMostBottom.js +1 -3
  65. package/shortcutContexts/commands/extendCellsSelection/toMostBottom.mjs +1 -3
  66. package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.js +3 -9
  67. package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.mjs +3 -9
  68. package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.js +3 -10
  69. package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.mjs +3 -10
  70. package/shortcutContexts/commands/extendCellsSelection/toMostLeft.js +1 -3
  71. package/shortcutContexts/commands/extendCellsSelection/toMostLeft.mjs +1 -3
  72. package/shortcutContexts/commands/extendCellsSelection/toMostRight.js +1 -3
  73. package/shortcutContexts/commands/extendCellsSelection/toMostRight.mjs +1 -3
  74. package/shortcutContexts/commands/extendCellsSelection/toMostTop.js +1 -3
  75. package/shortcutContexts/commands/extendCellsSelection/toMostTop.mjs +1 -3
  76. package/shortcutContexts/commands/extendCellsSelection/toRows.js +1 -1
  77. package/shortcutContexts/commands/extendCellsSelection/toRows.mjs +1 -1
  78. package/shortcutContexts/commands/extendCellsSelection/up.js +1 -1
  79. package/shortcutContexts/commands/extendCellsSelection/up.mjs +1 -1
  80. package/shortcutContexts/commands/moveCellSelection/inlineEnd.js +1 -6
  81. package/shortcutContexts/commands/moveCellSelection/inlineEnd.mjs +1 -6
  82. package/shortcutContexts/commands/moveCellSelection/inlineStart.js +1 -6
  83. package/shortcutContexts/commands/moveCellSelection/inlineStart.mjs +1 -6
  84. package/shortcutContexts/grid.js +2 -2
  85. package/shortcutContexts/grid.mjs +2 -2
  86. package/shortcuts/context.js +1 -2
  87. package/shortcuts/context.mjs +1 -2
  88. package/core/viewportScroll/scrollStrategies/focusScroll.js +0 -15
  89. package/core/viewportScroll/scrollStrategies/focusScroll.mjs +0 -11
@@ -6,35 +6,20 @@ const command = exports.command = {
6
6
  name: 'editorOpen',
7
7
  callback(hot, event, keys) {
8
8
  const editorManager = hot._getEditorManager();
9
- const selectedRange = hot.getSelectedRangeLast();
10
9
  const {
11
10
  highlight
12
- } = selectedRange;
13
-
14
- // supports for navigating with enter key when multiple cells are selected
15
- if (hot.selection.isMultiple() && !selectedRange.isHeader() && hot.countRenderedCols() > 0 && hot.countRenderedRows() > 0) {
16
- const settings = hot.getSettings();
17
- const enterMoves = typeof settings.enterMoves === 'function' ? settings.enterMoves(event) : settings.enterMoves;
18
- if (keys.includes('shift')) {
19
- hot.selection.transformFocus(-enterMoves.row, -enterMoves.col);
20
- } else {
21
- hot.selection.transformFocus(enterMoves.row, enterMoves.col);
22
- }
23
- return;
24
- }
11
+ } = hot.getSelectedRangeLast();
25
12
  if (highlight.isHeader()) {
26
13
  return;
27
14
  }
28
-
29
- // supports editor opening with enter key
30
15
  if (hot.getSettings().enterBeginsEditing) {
31
16
  if (editorManager.cellProperties.readOnly) {
32
- editorManager.moveSelectionAfterEnter(event);
17
+ editorManager.moveSelectionAfterEnter();
33
18
  } else {
34
19
  editorManager.openEditor(null, event, true);
35
20
  }
36
21
  } else {
37
- editorManager.moveSelectionAfterEnter(event);
22
+ editorManager.moveSelectionAfterEnter(keys.includes('shift'));
38
23
  }
39
24
  (0, _event.stopImmediatePropagation)(event); // required by HandsontableEditor
40
25
  }
@@ -3,35 +3,20 @@ export const command = {
3
3
  name: 'editorOpen',
4
4
  callback(hot, event, keys) {
5
5
  const editorManager = hot._getEditorManager();
6
- const selectedRange = hot.getSelectedRangeLast();
7
6
  const {
8
7
  highlight
9
- } = selectedRange;
10
-
11
- // supports for navigating with enter key when multiple cells are selected
12
- if (hot.selection.isMultiple() && !selectedRange.isHeader() && hot.countRenderedCols() > 0 && hot.countRenderedRows() > 0) {
13
- const settings = hot.getSettings();
14
- const enterMoves = typeof settings.enterMoves === 'function' ? settings.enterMoves(event) : settings.enterMoves;
15
- if (keys.includes('shift')) {
16
- hot.selection.transformFocus(-enterMoves.row, -enterMoves.col);
17
- } else {
18
- hot.selection.transformFocus(enterMoves.row, enterMoves.col);
19
- }
20
- return;
21
- }
8
+ } = hot.getSelectedRangeLast();
22
9
  if (highlight.isHeader()) {
23
10
  return;
24
11
  }
25
-
26
- // supports editor opening with enter key
27
12
  if (hot.getSettings().enterBeginsEditing) {
28
13
  if (editorManager.cellProperties.readOnly) {
29
- editorManager.moveSelectionAfterEnter(event);
14
+ editorManager.moveSelectionAfterEnter();
30
15
  } else {
31
16
  editorManager.openEditor(null, event, true);
32
17
  }
33
18
  } else {
34
- editorManager.moveSelectionAfterEnter(event);
19
+ editorManager.moveSelectionAfterEnter(keys.includes('shift'));
35
20
  }
36
21
  stopImmediatePropagation(event); // required by HandsontableEditor
37
22
  }
@@ -7,7 +7,7 @@ const command = exports.command = {
7
7
  const {
8
8
  highlight
9
9
  } = hot.getSelectedRangeLast();
10
- if (!hot.selection.isSelectedByColumnHeader() && !hot.selection.isSelectedByCorner() && (highlight.isCell() || highlight.isHeader() && hot.selection.isSelectedByRowHeader())) {
10
+ if (highlight.isCell() || highlight.isHeader() && hot.selection.isSelectedByRowHeader()) {
11
11
  hot.selection.transformEnd(1, 0);
12
12
  }
13
13
  }
@@ -4,7 +4,7 @@ export const command = {
4
4
  const {
5
5
  highlight
6
6
  } = hot.getSelectedRangeLast();
7
- if (!hot.selection.isSelectedByColumnHeader() && !hot.selection.isSelectedByCorner() && (highlight.isCell() || highlight.isHeader() && hot.selection.isSelectedByRowHeader())) {
7
+ if (highlight.isCell() || highlight.isHeader() && hot.selection.isSelectedByRowHeader()) {
8
8
  hot.selection.transformEnd(1, 0);
9
9
  }
10
10
  }
@@ -7,7 +7,7 @@ const command = exports.command = {
7
7
  const {
8
8
  highlight
9
9
  } = hot.getSelectedRangeLast();
10
- if (!hot.selection.isSelectedByRowHeader() && !hot.selection.isSelectedByCorner() && (highlight.isCell() || highlight.isHeader() && hot.selection.isSelectedByColumnHeader())) {
10
+ if (highlight.isCell() || highlight.isHeader() && hot.selection.isSelectedByColumnHeader()) {
11
11
  hot.selection.transformEnd(0, -1 * hot.getDirectionFactor());
12
12
  }
13
13
  }
@@ -4,7 +4,7 @@ export const command = {
4
4
  const {
5
5
  highlight
6
6
  } = hot.getSelectedRangeLast();
7
- if (!hot.selection.isSelectedByRowHeader() && !hot.selection.isSelectedByCorner() && (highlight.isCell() || highlight.isHeader() && hot.selection.isSelectedByColumnHeader())) {
7
+ if (highlight.isCell() || highlight.isHeader() && hot.selection.isSelectedByColumnHeader()) {
8
8
  hot.selection.transformEnd(0, -1 * hot.getDirectionFactor());
9
9
  }
10
10
  }
@@ -7,7 +7,7 @@ const command = exports.command = {
7
7
  const {
8
8
  highlight
9
9
  } = hot.getSelectedRangeLast();
10
- if (!hot.selection.isSelectedByRowHeader() && !hot.selection.isSelectedByCorner() && (highlight.isCell() || highlight.isHeader() && hot.selection.isSelectedByColumnHeader())) {
10
+ if (highlight.isCell() || highlight.isHeader() && hot.selection.isSelectedByColumnHeader()) {
11
11
  hot.selection.transformEnd(0, hot.getDirectionFactor());
12
12
  }
13
13
  }
@@ -4,7 +4,7 @@ export const command = {
4
4
  const {
5
5
  highlight
6
6
  } = hot.getSelectedRangeLast();
7
- if (!hot.selection.isSelectedByRowHeader() && !hot.selection.isSelectedByCorner() && (highlight.isCell() || highlight.isHeader() && hot.selection.isSelectedByColumnHeader())) {
7
+ if (highlight.isCell() || highlight.isHeader() && hot.selection.isSelectedByColumnHeader()) {
8
8
  hot.selection.transformEnd(0, hot.getDirectionFactor());
9
9
  }
10
10
  }
@@ -12,7 +12,7 @@ const command = exports.command = {
12
12
  if (hot.selection.isSelectedByRowHeader()) {
13
13
  hot.selection.selectAll(true, true);
14
14
  } else {
15
- hot.selectColumns(from.col, to.col, highlight);
15
+ hot.selectColumns(from.col, to.col, highlight.row);
16
16
  }
17
17
  }
18
18
  };
@@ -9,7 +9,7 @@ export const command = {
9
9
  if (hot.selection.isSelectedByRowHeader()) {
10
10
  hot.selection.selectAll(true, true);
11
11
  } else {
12
- hot.selectColumns(from.col, to.col, highlight);
12
+ hot.selectColumns(from.col, to.col, highlight.row);
13
13
  }
14
14
  }
15
15
  };
@@ -16,9 +16,7 @@ const command = exports.command = {
16
16
  const isFocusHighlightedByHeader = highlight.isHeader() && hot.selection.isSelectedByRowHeader();
17
17
  if (highlight.isCell() || isFocusHighlightedByHeader) {
18
18
  const row = rowIndexMapper.getNearestNotHiddenIndex(hot.countRows() - 1, -1);
19
- const newFrom = from.clone();
20
- newFrom.row = highlight.row;
21
- selection.setRangeStart(newFrom, undefined, false, highlight.clone());
19
+ selection.setRangeStart(from.clone());
22
20
 
23
21
  // Restore the row highlight by header flag after setting up a new selection.
24
22
  if (isFocusHighlightedByHeader) {
@@ -13,9 +13,7 @@ export const command = {
13
13
  const isFocusHighlightedByHeader = highlight.isHeader() && hot.selection.isSelectedByRowHeader();
14
14
  if (highlight.isCell() || isFocusHighlightedByHeader) {
15
15
  const row = rowIndexMapper.getNearestNotHiddenIndex(hot.countRows() - 1, -1);
16
- const newFrom = from.clone();
17
- newFrom.row = highlight.row;
18
- selection.setRangeStart(newFrom, undefined, false, highlight.clone());
16
+ selection.setRangeStart(from.clone());
19
17
 
20
18
  // Restore the row highlight by header flag after setting up a new selection.
21
19
  if (isFocusHighlightedByHeader) {
@@ -9,16 +9,10 @@ const command = exports.command = {
9
9
  columnIndexMapper
10
10
  } = hot;
11
11
  const {
12
- highlight,
13
- from,
14
- to
12
+ highlight
15
13
  } = hot.getSelectedRangeLast();
16
- if (!hot.selection.isSelectedByRowHeader() && !hot.selection.isSelectedByCorner() && highlight.isCell()) {
17
- const column = columnIndexMapper.getNearestNotHiddenIndex(hot.countCols() - 1, -1);
18
- const newFrom = from.clone();
19
- newFrom.col = highlight.col;
20
- selection.setRangeStart(newFrom, undefined, false, highlight.clone());
21
- selection.setRangeEnd(hot._createCellCoords(to.row, column));
14
+ if (highlight.isCell()) {
15
+ selection.setRangeEnd(hot._createCellCoords(selection.selectedRange.current().from.row, columnIndexMapper.getNearestNotHiddenIndex(hot.countCols() - 1, -1)));
22
16
  }
23
17
  }
24
18
  };
@@ -6,16 +6,10 @@ export const command = {
6
6
  columnIndexMapper
7
7
  } = hot;
8
8
  const {
9
- highlight,
10
- from,
11
- to
9
+ highlight
12
10
  } = hot.getSelectedRangeLast();
13
- if (!hot.selection.isSelectedByRowHeader() && !hot.selection.isSelectedByCorner() && highlight.isCell()) {
14
- const column = columnIndexMapper.getNearestNotHiddenIndex(hot.countCols() - 1, -1);
15
- const newFrom = from.clone();
16
- newFrom.col = highlight.col;
17
- selection.setRangeStart(newFrom, undefined, false, highlight.clone());
18
- selection.setRangeEnd(hot._createCellCoords(to.row, column));
11
+ if (highlight.isCell()) {
12
+ selection.setRangeEnd(hot._createCellCoords(selection.selectedRange.current().from.row, columnIndexMapper.getNearestNotHiddenIndex(hot.countCols() - 1, -1)));
19
13
  }
20
14
  }
21
15
  };
@@ -9,17 +9,10 @@ const command = exports.command = {
9
9
  columnIndexMapper
10
10
  } = hot;
11
11
  const {
12
- highlight,
13
- from,
14
- to
12
+ highlight
15
13
  } = hot.getSelectedRangeLast();
16
- if (!hot.selection.isSelectedByRowHeader() && !hot.selection.isSelectedByCorner() && highlight.isCell()) {
17
- const fixedColumns = parseInt(hot.getSettings().fixedColumnsStart, 10);
18
- const column = columnIndexMapper.getNearestNotHiddenIndex(fixedColumns, 1);
19
- const newFrom = from.clone();
20
- newFrom.col = highlight.col;
21
- selection.setRangeStart(newFrom, undefined, false, highlight.clone());
22
- selection.setRangeEnd(hot._createCellCoords(to.row, column));
14
+ if (highlight.isCell()) {
15
+ selection.setRangeEnd(hot._createCellCoords(selection.selectedRange.current().from.row, columnIndexMapper.getNearestNotHiddenIndex(0, 1)));
23
16
  }
24
17
  }
25
18
  };
@@ -6,17 +6,10 @@ export const command = {
6
6
  columnIndexMapper
7
7
  } = hot;
8
8
  const {
9
- highlight,
10
- from,
11
- to
9
+ highlight
12
10
  } = hot.getSelectedRangeLast();
13
- if (!hot.selection.isSelectedByRowHeader() && !hot.selection.isSelectedByCorner() && highlight.isCell()) {
14
- const fixedColumns = parseInt(hot.getSettings().fixedColumnsStart, 10);
15
- const column = columnIndexMapper.getNearestNotHiddenIndex(fixedColumns, 1);
16
- const newFrom = from.clone();
17
- newFrom.col = highlight.col;
18
- selection.setRangeStart(newFrom, undefined, false, highlight.clone());
19
- selection.setRangeEnd(hot._createCellCoords(to.row, column));
11
+ if (highlight.isCell()) {
12
+ selection.setRangeEnd(hot._createCellCoords(selection.selectedRange.current().from.row, columnIndexMapper.getNearestNotHiddenIndex(0, 1)));
20
13
  }
21
14
  }
22
15
  };
@@ -16,9 +16,7 @@ const command = exports.command = {
16
16
  const isFocusHighlightedByHeader = highlight.isHeader() && hot.selection.isSelectedByColumnHeader();
17
17
  if (highlight.isCell() || isFocusHighlightedByHeader) {
18
18
  const column = columnIndexMapper.getNearestNotHiddenIndex(...(hot.isRtl() ? [hot.countCols() - 1, -1] : [0, 1]));
19
- const newFrom = from.clone();
20
- newFrom.col = highlight.col;
21
- selection.setRangeStart(newFrom, undefined, false, highlight.clone());
19
+ selection.setRangeStart(from.clone());
22
20
 
23
21
  // Restore the column highlight by header flag after setting up a new selection.
24
22
  if (isFocusHighlightedByHeader) {
@@ -13,9 +13,7 @@ export const command = {
13
13
  const isFocusHighlightedByHeader = highlight.isHeader() && hot.selection.isSelectedByColumnHeader();
14
14
  if (highlight.isCell() || isFocusHighlightedByHeader) {
15
15
  const column = columnIndexMapper.getNearestNotHiddenIndex(...(hot.isRtl() ? [hot.countCols() - 1, -1] : [0, 1]));
16
- const newFrom = from.clone();
17
- newFrom.col = highlight.col;
18
- selection.setRangeStart(newFrom, undefined, false, highlight.clone());
16
+ selection.setRangeStart(from.clone());
19
17
 
20
18
  // Restore the column highlight by header flag after setting up a new selection.
21
19
  if (isFocusHighlightedByHeader) {
@@ -16,9 +16,7 @@ const command = exports.command = {
16
16
  const isFocusHighlightedByHeader = highlight.isHeader() && hot.selection.isSelectedByColumnHeader();
17
17
  if (highlight.isCell() || isFocusHighlightedByHeader) {
18
18
  const column = columnIndexMapper.getNearestNotHiddenIndex(...(hot.isRtl() ? [0, 1] : [hot.countCols() - 1, -1]));
19
- const newFrom = from.clone();
20
- newFrom.col = highlight.col;
21
- selection.setRangeStart(newFrom, undefined, false, highlight.clone());
19
+ selection.setRangeStart(from.clone());
22
20
 
23
21
  // Restore the column highlight by header flag after setting up a new selection.
24
22
  if (isFocusHighlightedByHeader) {
@@ -13,9 +13,7 @@ export const command = {
13
13
  const isFocusHighlightedByHeader = highlight.isHeader() && hot.selection.isSelectedByColumnHeader();
14
14
  if (highlight.isCell() || isFocusHighlightedByHeader) {
15
15
  const column = columnIndexMapper.getNearestNotHiddenIndex(...(hot.isRtl() ? [0, 1] : [hot.countCols() - 1, -1]));
16
- const newFrom = from.clone();
17
- newFrom.col = highlight.col;
18
- selection.setRangeStart(newFrom, undefined, false, highlight.clone());
16
+ selection.setRangeStart(from.clone());
19
17
 
20
18
  // Restore the column highlight by header flag after setting up a new selection.
21
19
  if (isFocusHighlightedByHeader) {
@@ -16,9 +16,7 @@ const command = exports.command = {
16
16
  const isFocusHighlightedByHeader = highlight.isHeader() && hot.selection.isSelectedByRowHeader();
17
17
  if (highlight.isCell() || isFocusHighlightedByHeader) {
18
18
  const row = rowIndexMapper.getNearestNotHiddenIndex(0, 1);
19
- const newFrom = from.clone();
20
- newFrom.row = highlight.row;
21
- selection.setRangeStart(newFrom, undefined, false, highlight.clone());
19
+ selection.setRangeStart(from.clone());
22
20
 
23
21
  // Restore the row highlight by header flag after setting up a new selection.
24
22
  if (isFocusHighlightedByHeader) {
@@ -13,9 +13,7 @@ export const command = {
13
13
  const isFocusHighlightedByHeader = highlight.isHeader() && hot.selection.isSelectedByRowHeader();
14
14
  if (highlight.isCell() || isFocusHighlightedByHeader) {
15
15
  const row = rowIndexMapper.getNearestNotHiddenIndex(0, 1);
16
- const newFrom = from.clone();
17
- newFrom.row = highlight.row;
18
- selection.setRangeStart(newFrom, undefined, false, highlight.clone());
16
+ selection.setRangeStart(from.clone());
19
17
 
20
18
  // Restore the row highlight by header flag after setting up a new selection.
21
19
  if (isFocusHighlightedByHeader) {
@@ -12,7 +12,7 @@ const command = exports.command = {
12
12
  if (hot.selection.isSelectedByColumnHeader()) {
13
13
  hot.selection.selectAll(true, true);
14
14
  } else {
15
- hot.selectRows(from.row, to.row, highlight);
15
+ hot.selectRows(from.row, to.row, highlight.col);
16
16
  }
17
17
  }
18
18
  };
@@ -9,7 +9,7 @@ export const command = {
9
9
  if (hot.selection.isSelectedByColumnHeader()) {
10
10
  hot.selection.selectAll(true, true);
11
11
  } else {
12
- hot.selectRows(from.row, to.row, highlight);
12
+ hot.selectRows(from.row, to.row, highlight.col);
13
13
  }
14
14
  }
15
15
  };
@@ -7,7 +7,7 @@ const command = exports.command = {
7
7
  const {
8
8
  highlight
9
9
  } = hot.getSelectedRangeLast();
10
- if (!hot.selection.isSelectedByColumnHeader() && !hot.selection.isSelectedByCorner() && (highlight.isCell() || highlight.isHeader() && hot.selection.isSelectedByRowHeader())) {
10
+ if (highlight.isCell() || highlight.isHeader() && hot.selection.isSelectedByRowHeader()) {
11
11
  hot.selection.transformEnd(-1, 0);
12
12
  }
13
13
  }
@@ -4,7 +4,7 @@ export const command = {
4
4
  const {
5
5
  highlight
6
6
  } = hot.getSelectedRangeLast();
7
- if (!hot.selection.isSelectedByColumnHeader() && !hot.selection.isSelectedByCorner() && (highlight.isCell() || highlight.isHeader() && hot.selection.isSelectedByRowHeader())) {
7
+ if (highlight.isCell() || highlight.isHeader() && hot.selection.isSelectedByRowHeader()) {
8
8
  hot.selection.transformEnd(-1, 0);
9
9
  }
10
10
  }
@@ -5,12 +5,7 @@ const command = exports.command = {
5
5
  name: 'moveCellSelectionInlineEnd',
6
6
  callback(hot, event) {
7
7
  const settings = hot.getSettings();
8
- const selectedRange = hot.getSelectedRangeLast();
9
8
  const tabMoves = typeof settings.tabMoves === 'function' ? settings.tabMoves(event) : settings.tabMoves;
10
- if (hot.selection.isMultiple() && !selectedRange.isHeader() && hot.countRenderedCols() > 0 && hot.countRenderedRows() > 0) {
11
- hot.selection.transformFocus(-tabMoves.row, -tabMoves.col);
12
- } else {
13
- hot.selection.transformStart(-tabMoves.row, -tabMoves.col);
14
- }
9
+ hot.selection.transformStart(-tabMoves.row, -tabMoves.col);
15
10
  }
16
11
  };
@@ -2,12 +2,7 @@ export const command = {
2
2
  name: 'moveCellSelectionInlineEnd',
3
3
  callback(hot, event) {
4
4
  const settings = hot.getSettings();
5
- const selectedRange = hot.getSelectedRangeLast();
6
5
  const tabMoves = typeof settings.tabMoves === 'function' ? settings.tabMoves(event) : settings.tabMoves;
7
- if (hot.selection.isMultiple() && !selectedRange.isHeader() && hot.countRenderedCols() > 0 && hot.countRenderedRows() > 0) {
8
- hot.selection.transformFocus(-tabMoves.row, -tabMoves.col);
9
- } else {
10
- hot.selection.transformStart(-tabMoves.row, -tabMoves.col);
11
- }
6
+ hot.selection.transformStart(-tabMoves.row, -tabMoves.col);
12
7
  }
13
8
  };
@@ -5,12 +5,7 @@ const command = exports.command = {
5
5
  name: 'moveCellSelectionInlineStart',
6
6
  callback(hot, event) {
7
7
  const settings = hot.getSettings();
8
- const selectedRange = hot.getSelectedRangeLast();
9
8
  const tabMoves = typeof settings.tabMoves === 'function' ? settings.tabMoves(event) : settings.tabMoves;
10
- if (hot.selection.isMultiple() && !selectedRange.isHeader() && hot.countRenderedCols() > 0 && hot.countRenderedRows() > 0) {
11
- hot.selection.transformFocus(tabMoves.row, tabMoves.col);
12
- } else {
13
- hot.selection.transformStart(tabMoves.row, tabMoves.col);
14
- }
9
+ hot.selection.transformStart(tabMoves.row, tabMoves.col);
15
10
  }
16
11
  };
@@ -2,12 +2,7 @@ export const command = {
2
2
  name: 'moveCellSelectionInlineStart',
3
3
  callback(hot, event) {
4
4
  const settings = hot.getSettings();
5
- const selectedRange = hot.getSelectedRangeLast();
6
5
  const tabMoves = typeof settings.tabMoves === 'function' ? settings.tabMoves(event) : settings.tabMoves;
7
- if (hot.selection.isMultiple() && !selectedRange.isHeader() && hot.countRenderedCols() > 0 && hot.countRenderedRows() > 0) {
8
- hot.selection.transformFocus(tabMoves.row, tabMoves.col);
9
- } else {
10
- hot.selection.transformStart(tabMoves.row, tabMoves.col);
11
- }
6
+ hot.selection.transformStart(tabMoves.row, tabMoves.col);
12
7
  }
13
8
  };
@@ -157,12 +157,12 @@ function shortcutsGridContext(hot) {
157
157
  keys: [['Tab']],
158
158
  // The property value is controlled by focusCatcher module (https://github.com/handsontable/handsontable/blob/master/handsontable/src/core/focusCatcher/index.js)
159
159
  preventDefault: false,
160
- callback: event => commandsPool.moveCellSelectionInlineStart(event)
160
+ callback: () => commandsPool.moveCellSelectionInlineStart()
161
161
  }, {
162
162
  keys: [['Shift', 'Tab']],
163
163
  // The property value is controlled by focusCatcher module (https://github.com/handsontable/handsontable/blob/master/handsontable/src/core/focusCatcher/index.js)
164
164
  preventDefault: false,
165
- callback: event => commandsPool.moveCellSelectionInlineEnd(event)
165
+ callback: () => commandsPool.moveCellSelectionInlineEnd()
166
166
  }, {
167
167
  keys: [['Control/Meta', 'Backspace']],
168
168
  callback: () => commandsPool.scrollToFocusedCell()
@@ -153,12 +153,12 @@ export function shortcutsGridContext(hot) {
153
153
  keys: [['Tab']],
154
154
  // The property value is controlled by focusCatcher module (https://github.com/handsontable/handsontable/blob/master/handsontable/src/core/focusCatcher/index.js)
155
155
  preventDefault: false,
156
- callback: event => commandsPool.moveCellSelectionInlineStart(event)
156
+ callback: () => commandsPool.moveCellSelectionInlineStart()
157
157
  }, {
158
158
  keys: [['Shift', 'Tab']],
159
159
  // The property value is controlled by focusCatcher module (https://github.com/handsontable/handsontable/blob/master/handsontable/src/core/focusCatcher/index.js)
160
160
  preventDefault: false,
161
- callback: event => commandsPool.moveCellSelectionInlineEnd(event)
161
+ callback: () => commandsPool.moveCellSelectionInlineEnd()
162
162
  }, {
163
163
  keys: [['Control/Meta', 'Backspace']],
164
164
  callback: () => commandsPool.scrollToFocusedCell()
@@ -90,8 +90,7 @@ const createContext = name => {
90
90
  stopPropagation
91
91
  };
92
92
  if ((0, _mixed.isDefined)(relativeToGroup)) {
93
- newShortcut.relativeToGroup = relativeToGroup;
94
- newShortcut.position = position;
93
+ [newShortcut.relativeToGroup, newShortcut.position] = [relativeToGroup, position];
95
94
  }
96
95
  if (isContextObject(forwardToContext)) {
97
96
  newShortcut.forwardToContext = forwardToContext;
@@ -86,8 +86,7 @@ export const createContext = name => {
86
86
  stopPropagation
87
87
  };
88
88
  if (isDefined(relativeToGroup)) {
89
- newShortcut.relativeToGroup = relativeToGroup;
90
- newShortcut.position = position;
89
+ [newShortcut.relativeToGroup, newShortcut.position] = [relativeToGroup, position];
91
90
  }
92
91
  if (isContextObject(forwardToContext)) {
93
92
  newShortcut.forwardToContext = forwardToContext;
@@ -1,15 +0,0 @@
1
- "use strict";
2
-
3
- exports.__esModule = true;
4
- exports.focusScrollStrategy = focusScrollStrategy;
5
- /**
6
- * Scroll strategy for changed the focus position of the selection.
7
- *
8
- * @param {Core} hot Handsontable instance.
9
- * @returns {function(): function(CellCoords): void}
10
- */
11
- function focusScrollStrategy(hot) {
12
- return cellCoords => {
13
- hot.scrollViewportTo(cellCoords.toObject());
14
- };
15
- }
@@ -1,11 +0,0 @@
1
- /**
2
- * Scroll strategy for changed the focus position of the selection.
3
- *
4
- * @param {Core} hot Handsontable instance.
5
- * @returns {function(): function(CellCoords): void}
6
- */
7
- export function focusScrollStrategy(hot) {
8
- return cellCoords => {
9
- hot.scrollViewportTo(cellCoords.toObject());
10
- };
11
- }