handsontable 15.2.0 → 15.3.0-next-6f5f494-20250424
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.
- package/3rdparty/walkontable/src/cell/range.js +14 -0
- package/3rdparty/walkontable/src/cell/range.mjs +14 -0
- package/3rdparty/walkontable/src/core/_base.js +2 -2
- package/3rdparty/walkontable/src/core/_base.mjs +3 -3
- package/3rdparty/walkontable/src/overlay/_base.js +0 -2
- package/3rdparty/walkontable/src/overlay/_base.mjs +0 -2
- package/3rdparty/walkontable/src/overlay/bottom.js +9 -6
- package/3rdparty/walkontable/src/overlay/bottom.mjs +9 -6
- package/3rdparty/walkontable/src/overlay/inlineStart.js +8 -5
- package/3rdparty/walkontable/src/overlay/inlineStart.mjs +8 -5
- package/3rdparty/walkontable/src/overlay/top.js +11 -6
- package/3rdparty/walkontable/src/overlay/top.mjs +11 -6
- package/3rdparty/walkontable/src/overlays.js +15 -11
- package/3rdparty/walkontable/src/overlays.mjs +15 -11
- package/3rdparty/walkontable/src/renderer/rowHeaders.js +4 -1
- package/3rdparty/walkontable/src/renderer/rowHeaders.mjs +4 -1
- package/3rdparty/walkontable/src/selection/border/border.js +5 -0
- package/3rdparty/walkontable/src/selection/border/border.mjs +5 -0
- package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.js +3 -4
- package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.mjs +3 -4
- package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.js +8 -10
- package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.mjs +8 -10
- package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.js +3 -4
- package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.mjs +3 -4
- package/3rdparty/walkontable/src/table.js +5 -2
- package/3rdparty/walkontable/src/table.mjs +5 -2
- package/3rdparty/walkontable/src/utils/orderView/viewDiffer/viewOrder.js +0 -2
- package/3rdparty/walkontable/src/utils/orderView/viewDiffer/viewOrder.mjs +0 -2
- package/CHANGELOG.md +45 -1
- package/README.md +1 -1
- package/base.js +2 -2
- package/base.mjs +2 -2
- package/core/focusCatcher/focusDetector.js +1 -1
- package/core/focusCatcher/focusDetector.mjs +2 -2
- package/core/hooks/constants.js +8 -0
- package/core/hooks/constants.mjs +8 -0
- package/core/hooks/index.d.ts +1 -0
- package/core/viewportScroll/scrollStrategies/columnHeaderScroll.js +7 -5
- package/core/viewportScroll/scrollStrategies/columnHeaderScroll.mjs +7 -5
- package/core/viewportScroll/scrollStrategies/focusScroll.js +8 -1
- package/core/viewportScroll/scrollStrategies/focusScroll.mjs +8 -1
- package/core/viewportScroll/scrollStrategies/multipleScroll.js +13 -1
- package/core/viewportScroll/scrollStrategies/multipleScroll.mjs +13 -1
- package/core/viewportScroll/scrollStrategies/noncontiguousScroll.js +13 -1
- package/core/viewportScroll/scrollStrategies/noncontiguousScroll.mjs +13 -1
- package/core/viewportScroll/scrollStrategies/rowHeaderScroll.js +7 -5
- package/core/viewportScroll/scrollStrategies/rowHeaderScroll.mjs +7 -5
- package/core/viewportScroll/scrollStrategies/singleScroll.js +8 -4
- package/core/viewportScroll/scrollStrategies/singleScroll.mjs +8 -4
- package/core/viewportScroll/utils.js +111 -0
- package/core/viewportScroll/utils.mjs +106 -0
- package/core.d.ts +2 -3
- package/core.js +125 -71
- package/core.mjs +126 -72
- package/dataMap/dataMap.js +0 -7
- package/dataMap/dataMap.mjs +0 -7
- package/dataMap/metaManager/index.js +8 -9
- package/dataMap/metaManager/index.mjs +8 -9
- package/dataMap/metaManager/mods/dynamicCellMeta.js +4 -1
- package/dataMap/metaManager/mods/dynamicCellMeta.mjs +4 -1
- package/dist/handsontable.css +4 -15
- package/dist/handsontable.full.css +4 -17
- package/dist/handsontable.full.js +4573 -4013
- package/dist/handsontable.full.min.css +3 -3
- package/dist/handsontable.full.min.js +148 -148
- package/dist/handsontable.js +4287 -3730
- package/dist/handsontable.min.css +3 -3
- package/dist/handsontable.min.js +19 -19
- package/editorManager.js +1 -7
- package/editorManager.mjs +1 -7
- package/editors/autocompleteEditor/autocompleteEditor.js +31 -7
- package/editors/autocompleteEditor/autocompleteEditor.mjs +31 -7
- package/focusManager.js +4 -2
- package/focusManager.mjs +4 -2
- package/helpers/browser.js +1 -1
- package/helpers/browser.mjs +1 -1
- package/helpers/dom/element.d.ts +1 -0
- package/helpers/dom/element.js +20 -0
- package/helpers/dom/element.mjs +19 -0
- package/helpers/mixed.js +2 -2
- package/helpers/mixed.mjs +2 -2
- package/helpers/object.js +3 -0
- package/helpers/object.mjs +3 -0
- package/package.json +1 -1
- package/plugins/autoColumnSize/autoColumnSize.js +38 -17
- package/plugins/autoColumnSize/autoColumnSize.mjs +38 -17
- package/plugins/autoRowSize/autoRowSize.js +12 -6
- package/plugins/autoRowSize/autoRowSize.mjs +12 -6
- package/plugins/columnSorting/columnSorting.js +0 -4
- package/plugins/columnSorting/columnSorting.mjs +0 -4
- package/plugins/comments/comments.js +1 -0
- package/plugins/comments/comments.mjs +1 -0
- package/plugins/contextMenu/menu/defaultShortcutsList.js +2 -2
- package/plugins/contextMenu/menu/defaultShortcutsList.mjs +2 -2
- package/plugins/contextMenu/menu/menu.js +1 -0
- package/plugins/contextMenu/menu/menu.mjs +1 -0
- package/plugins/contextMenu/menu/positioner.js +10 -2
- package/plugins/contextMenu/menu/positioner.mjs +10 -2
- package/plugins/contextMenu/predefinedItems/redo.js +3 -3
- package/plugins/contextMenu/predefinedItems/redo.mjs +3 -3
- package/plugins/contextMenu/predefinedItems/undo.js +3 -3
- package/plugins/contextMenu/predefinedItems/undo.mjs +3 -3
- package/plugins/copyPaste/copyPaste.js +12 -9
- package/plugins/copyPaste/copyPaste.mjs +12 -9
- package/plugins/copyPaste/pasteEvent.js +3 -0
- package/plugins/copyPaste/pasteEvent.mjs +3 -0
- package/plugins/exportFile/exportFile.d.ts +1 -0
- package/plugins/exportFile/exportFile.js +2 -1
- package/plugins/exportFile/exportFile.mjs +2 -1
- package/plugins/exportFile/types/csv.js +76 -11
- package/plugins/exportFile/types/csv.mjs +76 -11
- package/plugins/filters/filters.js +24 -23
- package/plugins/filters/filters.mjs +24 -23
- package/plugins/filters/ui/multipleSelect.js +7 -1
- package/plugins/filters/ui/multipleSelect.mjs +7 -1
- package/plugins/formulas/formulas.d.ts +1 -1
- package/plugins/formulas/formulas.js +57 -60
- package/plugins/formulas/formulas.mjs +59 -62
- package/plugins/formulas/indexSyncer/axisSyncer.js +5 -1
- package/plugins/formulas/indexSyncer/axisSyncer.mjs +5 -1
- package/plugins/hiddenColumns/hiddenColumns.js +1 -1
- package/plugins/hiddenColumns/hiddenColumns.mjs +1 -1
- package/plugins/hiddenRows/hiddenRows.js +1 -1
- package/plugins/hiddenRows/hiddenRows.mjs +1 -1
- package/plugins/manualColumnResize/manualColumnResize.js +4 -6
- package/plugins/manualColumnResize/manualColumnResize.mjs +4 -6
- package/plugins/manualRowResize/manualRowResize.js +4 -6
- package/plugins/manualRowResize/manualRowResize.mjs +4 -6
- package/plugins/mergeCells/mergeCells.js +10 -30
- package/plugins/mergeCells/mergeCells.mjs +10 -30
- package/plugins/mergeCells/renderer.js +15 -0
- package/plugins/mergeCells/renderer.mjs +15 -0
- package/plugins/mergeCells/utils.js +31 -0
- package/plugins/mergeCells/utils.mjs +27 -0
- package/plugins/nestedRows/data/dataManager.js +2 -2
- package/plugins/nestedRows/data/dataManager.mjs +2 -2
- package/plugins/undoRedo/actions/index.js +0 -2
- package/plugins/undoRedo/actions/index.mjs +0 -2
- package/plugins/undoRedo/actions/removeColumn.js +19 -14
- package/plugins/undoRedo/actions/removeColumn.mjs +19 -14
- package/plugins/undoRedo/actions/removeRow.js +12 -4
- package/plugins/undoRedo/actions/removeRow.mjs +12 -4
- package/selection/selection.js +3 -1
- package/selection/selection.mjs +3 -1
- package/shortcutContexts/commands/extendCellsSelection/down.js +7 -2
- package/shortcutContexts/commands/extendCellsSelection/down.mjs +7 -2
- package/shortcutContexts/commands/extendCellsSelection/downByViewportHeight.js +8 -2
- package/shortcutContexts/commands/extendCellsSelection/downByViewportHeight.mjs +8 -2
- package/shortcutContexts/commands/extendCellsSelection/left.js +7 -2
- package/shortcutContexts/commands/extendCellsSelection/left.mjs +7 -2
- package/shortcutContexts/commands/extendCellsSelection/right.js +7 -2
- package/shortcutContexts/commands/extendCellsSelection/right.mjs +7 -2
- package/shortcutContexts/commands/extendCellsSelection/toColumns.js +7 -2
- package/shortcutContexts/commands/extendCellsSelection/toColumns.mjs +7 -2
- package/shortcutContexts/commands/extendCellsSelection/toMostBottom.js +3 -1
- package/shortcutContexts/commands/extendCellsSelection/toMostBottom.mjs +3 -1
- package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.js +3 -1
- package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.mjs +3 -1
- package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.js +3 -1
- package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.mjs +3 -1
- package/shortcutContexts/commands/extendCellsSelection/toMostLeft.js +3 -1
- package/shortcutContexts/commands/extendCellsSelection/toMostLeft.mjs +3 -1
- package/shortcutContexts/commands/extendCellsSelection/toMostRight.js +3 -1
- package/shortcutContexts/commands/extendCellsSelection/toMostRight.mjs +3 -1
- package/shortcutContexts/commands/extendCellsSelection/toMostTop.js +3 -1
- package/shortcutContexts/commands/extendCellsSelection/toMostTop.mjs +3 -1
- package/shortcutContexts/commands/extendCellsSelection/toRows.js +7 -2
- package/shortcutContexts/commands/extendCellsSelection/toRows.mjs +7 -2
- package/shortcutContexts/commands/extendCellsSelection/up.js +7 -2
- package/shortcutContexts/commands/extendCellsSelection/up.mjs +7 -2
- package/shortcutContexts/commands/extendCellsSelection/upByViewportHeight.js +8 -2
- package/shortcutContexts/commands/extendCellsSelection/upByViewportHeight.mjs +8 -2
- package/shortcutContexts/commands/index.js +0 -2
- package/shortcutContexts/commands/index.mjs +0 -2
- package/shortcutContexts/commands/moveCellSelection/down.js +2 -0
- package/shortcutContexts/commands/moveCellSelection/down.mjs +2 -0
- package/shortcutContexts/commands/moveCellSelection/downByViewportHeight.js +6 -1
- package/shortcutContexts/commands/moveCellSelection/downByViewportHeight.mjs +6 -1
- package/shortcutContexts/commands/moveCellSelection/inlineEnd.js +8 -3
- package/shortcutContexts/commands/moveCellSelection/inlineEnd.mjs +8 -3
- package/shortcutContexts/commands/moveCellSelection/inlineStart.js +8 -3
- package/shortcutContexts/commands/moveCellSelection/inlineStart.mjs +8 -3
- package/shortcutContexts/commands/moveCellSelection/left.js +6 -1
- package/shortcutContexts/commands/moveCellSelection/left.mjs +6 -1
- package/shortcutContexts/commands/moveCellSelection/right.js +6 -1
- package/shortcutContexts/commands/moveCellSelection/right.mjs +6 -1
- package/shortcutContexts/commands/moveCellSelection/toMostBottom.js +4 -1
- package/shortcutContexts/commands/moveCellSelection/toMostBottom.mjs +4 -1
- package/shortcutContexts/commands/moveCellSelection/toMostBottomInlineEnd.js +2 -0
- package/shortcutContexts/commands/moveCellSelection/toMostBottomInlineEnd.mjs +2 -0
- package/shortcutContexts/commands/moveCellSelection/toMostInlineEnd.js +2 -0
- package/shortcutContexts/commands/moveCellSelection/toMostInlineEnd.mjs +2 -0
- package/shortcutContexts/commands/moveCellSelection/toMostInlineStart.js +2 -0
- package/shortcutContexts/commands/moveCellSelection/toMostInlineStart.mjs +2 -0
- package/shortcutContexts/commands/moveCellSelection/toMostLeft.js +2 -0
- package/shortcutContexts/commands/moveCellSelection/toMostLeft.mjs +2 -0
- package/shortcutContexts/commands/moveCellSelection/toMostRight.js +2 -0
- package/shortcutContexts/commands/moveCellSelection/toMostRight.mjs +2 -0
- package/shortcutContexts/commands/moveCellSelection/toMostTop.js +6 -1
- package/shortcutContexts/commands/moveCellSelection/toMostTop.mjs +6 -1
- package/shortcutContexts/commands/moveCellSelection/toMostTopInlineStart.js +2 -0
- package/shortcutContexts/commands/moveCellSelection/toMostTopInlineStart.mjs +2 -0
- package/shortcutContexts/commands/moveCellSelection/up.js +2 -0
- package/shortcutContexts/commands/moveCellSelection/up.mjs +2 -0
- package/shortcutContexts/commands/moveCellSelection/upByViewportHeight.js +6 -1
- package/shortcutContexts/commands/moveCellSelection/upByViewportHeight.mjs +6 -1
- package/shortcutContexts/commands/selectAllCells.js +7 -2
- package/shortcutContexts/commands/selectAllCells.mjs +7 -2
- package/shortcutContexts/commands/selectAllCellsAndHeaders.js +7 -2
- package/shortcutContexts/commands/selectAllCellsAndHeaders.mjs +7 -2
- package/shortcutContexts/index.js +2 -2
- package/shortcutContexts/index.mjs +0 -2
- package/styles/handsontable.css +15 -17
- package/styles/handsontable.min.css +3 -3
- package/styles/ht-theme-horizon.css +2 -2
- package/styles/ht-theme-horizon.min.css +2 -2
- package/styles/ht-theme-main.css +2 -2
- package/styles/ht-theme-main.min.css +2 -2
- package/tableView.js +5 -8
- package/tableView.mjs +5 -8
- package/translations/indexMapper.js +0 -1
- package/translations/indexMapper.mjs +0 -1
- package/utils/ghostTable.js +3 -0
- package/utils/ghostTable.mjs +3 -0
@@ -10,11 +10,12 @@ export const command = {
|
|
10
10
|
from,
|
11
11
|
to
|
12
12
|
} = hot.getSelectedRangeLast();
|
13
|
-
const isFocusHighlightedByHeader = highlight.isHeader() &&
|
13
|
+
const isFocusHighlightedByHeader = highlight.isHeader() && selection.isSelectedByRowHeader();
|
14
14
|
if (highlight.isCell() || isFocusHighlightedByHeader) {
|
15
15
|
const row = rowIndexMapper.getNearestNotHiddenIndex(hot.countRows() - 1, -1);
|
16
16
|
const newFrom = from.clone();
|
17
17
|
newFrom.row = highlight.row;
|
18
|
+
selection.markSource('keyboard');
|
18
19
|
selection.setRangeStart(newFrom, undefined, false, highlight.clone());
|
19
20
|
|
20
21
|
// Restore the row highlight by header flag after setting up a new selection.
|
@@ -22,6 +23,7 @@ export const command = {
|
|
22
23
|
selection.selectedByRowHeader.add(selection.getLayerLevel());
|
23
24
|
}
|
24
25
|
selection.setRangeEnd(hot._createCellCoords(row, to.col));
|
26
|
+
selection.markEndSource();
|
25
27
|
}
|
26
28
|
}
|
27
29
|
};
|
@@ -13,12 +13,14 @@ const command = exports.command = {
|
|
13
13
|
from,
|
14
14
|
to
|
15
15
|
} = hot.getSelectedRangeLast();
|
16
|
-
if (!
|
16
|
+
if (!selection.isSelectedByRowHeader() && !selection.isSelectedByCorner() && highlight.isCell()) {
|
17
17
|
const column = columnIndexMapper.getNearestNotHiddenIndex(hot.countCols() - 1, -1);
|
18
18
|
const newFrom = from.clone();
|
19
19
|
newFrom.col = highlight.col;
|
20
|
+
selection.markSource('keyboard');
|
20
21
|
selection.setRangeStart(newFrom, undefined, false, highlight.clone());
|
21
22
|
selection.setRangeEnd(hot._createCellCoords(to.row, column));
|
23
|
+
selection.markEndSource();
|
22
24
|
}
|
23
25
|
}
|
24
26
|
};
|
@@ -10,12 +10,14 @@ export const command = {
|
|
10
10
|
from,
|
11
11
|
to
|
12
12
|
} = hot.getSelectedRangeLast();
|
13
|
-
if (!
|
13
|
+
if (!selection.isSelectedByRowHeader() && !selection.isSelectedByCorner() && highlight.isCell()) {
|
14
14
|
const column = columnIndexMapper.getNearestNotHiddenIndex(hot.countCols() - 1, -1);
|
15
15
|
const newFrom = from.clone();
|
16
16
|
newFrom.col = highlight.col;
|
17
|
+
selection.markSource('keyboard');
|
17
18
|
selection.setRangeStart(newFrom, undefined, false, highlight.clone());
|
18
19
|
selection.setRangeEnd(hot._createCellCoords(to.row, column));
|
20
|
+
selection.markEndSource();
|
19
21
|
}
|
20
22
|
}
|
21
23
|
};
|
@@ -13,13 +13,15 @@ const command = exports.command = {
|
|
13
13
|
from,
|
14
14
|
to
|
15
15
|
} = hot.getSelectedRangeLast();
|
16
|
-
if (!
|
16
|
+
if (!selection.isSelectedByRowHeader() && !selection.isSelectedByCorner() && highlight.isCell()) {
|
17
17
|
const fixedColumns = parseInt(hot.getSettings().fixedColumnsStart, 10);
|
18
18
|
const column = columnIndexMapper.getNearestNotHiddenIndex(fixedColumns, 1);
|
19
19
|
const newFrom = from.clone();
|
20
20
|
newFrom.col = highlight.col;
|
21
|
+
selection.markSource('keyboard');
|
21
22
|
selection.setRangeStart(newFrom, undefined, false, highlight.clone());
|
22
23
|
selection.setRangeEnd(hot._createCellCoords(to.row, column));
|
24
|
+
selection.markEndSource();
|
23
25
|
}
|
24
26
|
}
|
25
27
|
};
|
@@ -10,13 +10,15 @@ export const command = {
|
|
10
10
|
from,
|
11
11
|
to
|
12
12
|
} = hot.getSelectedRangeLast();
|
13
|
-
if (!
|
13
|
+
if (!selection.isSelectedByRowHeader() && !selection.isSelectedByCorner() && highlight.isCell()) {
|
14
14
|
const fixedColumns = parseInt(hot.getSettings().fixedColumnsStart, 10);
|
15
15
|
const column = columnIndexMapper.getNearestNotHiddenIndex(fixedColumns, 1);
|
16
16
|
const newFrom = from.clone();
|
17
17
|
newFrom.col = highlight.col;
|
18
|
+
selection.markSource('keyboard');
|
18
19
|
selection.setRangeStart(newFrom, undefined, false, highlight.clone());
|
19
20
|
selection.setRangeEnd(hot._createCellCoords(to.row, column));
|
21
|
+
selection.markEndSource();
|
20
22
|
}
|
21
23
|
}
|
22
24
|
};
|
@@ -13,11 +13,12 @@ const command = exports.command = {
|
|
13
13
|
from,
|
14
14
|
to
|
15
15
|
} = hot.getSelectedRangeLast();
|
16
|
-
const isFocusHighlightedByHeader = highlight.isHeader() &&
|
16
|
+
const isFocusHighlightedByHeader = highlight.isHeader() && selection.isSelectedByColumnHeader();
|
17
17
|
if (highlight.isCell() || isFocusHighlightedByHeader) {
|
18
18
|
const column = columnIndexMapper.getNearestNotHiddenIndex(...(hot.isRtl() ? [hot.countCols() - 1, -1] : [0, 1]));
|
19
19
|
const newFrom = from.clone();
|
20
20
|
newFrom.col = highlight.col;
|
21
|
+
selection.markSource('keyboard');
|
21
22
|
selection.setRangeStart(newFrom, undefined, false, highlight.clone());
|
22
23
|
|
23
24
|
// Restore the column highlight by header flag after setting up a new selection.
|
@@ -25,6 +26,7 @@ const command = exports.command = {
|
|
25
26
|
selection.selectedByColumnHeader.add(selection.getLayerLevel());
|
26
27
|
}
|
27
28
|
selection.setRangeEnd(hot._createCellCoords(to.row, column));
|
29
|
+
selection.markEndSource();
|
28
30
|
}
|
29
31
|
}
|
30
32
|
};
|
@@ -10,11 +10,12 @@ export const command = {
|
|
10
10
|
from,
|
11
11
|
to
|
12
12
|
} = hot.getSelectedRangeLast();
|
13
|
-
const isFocusHighlightedByHeader = highlight.isHeader() &&
|
13
|
+
const isFocusHighlightedByHeader = highlight.isHeader() && selection.isSelectedByColumnHeader();
|
14
14
|
if (highlight.isCell() || isFocusHighlightedByHeader) {
|
15
15
|
const column = columnIndexMapper.getNearestNotHiddenIndex(...(hot.isRtl() ? [hot.countCols() - 1, -1] : [0, 1]));
|
16
16
|
const newFrom = from.clone();
|
17
17
|
newFrom.col = highlight.col;
|
18
|
+
selection.markSource('keyboard');
|
18
19
|
selection.setRangeStart(newFrom, undefined, false, highlight.clone());
|
19
20
|
|
20
21
|
// Restore the column highlight by header flag after setting up a new selection.
|
@@ -22,6 +23,7 @@ export const command = {
|
|
22
23
|
selection.selectedByColumnHeader.add(selection.getLayerLevel());
|
23
24
|
}
|
24
25
|
selection.setRangeEnd(hot._createCellCoords(to.row, column));
|
26
|
+
selection.markEndSource();
|
25
27
|
}
|
26
28
|
}
|
27
29
|
};
|
@@ -13,11 +13,12 @@ const command = exports.command = {
|
|
13
13
|
from,
|
14
14
|
to
|
15
15
|
} = hot.getSelectedRangeLast();
|
16
|
-
const isFocusHighlightedByHeader = highlight.isHeader() &&
|
16
|
+
const isFocusHighlightedByHeader = highlight.isHeader() && selection.isSelectedByColumnHeader();
|
17
17
|
if (highlight.isCell() || isFocusHighlightedByHeader) {
|
18
18
|
const column = columnIndexMapper.getNearestNotHiddenIndex(...(hot.isRtl() ? [0, 1] : [hot.countCols() - 1, -1]));
|
19
19
|
const newFrom = from.clone();
|
20
20
|
newFrom.col = highlight.col;
|
21
|
+
selection.markSource('keyboard');
|
21
22
|
selection.setRangeStart(newFrom, undefined, false, highlight.clone());
|
22
23
|
|
23
24
|
// Restore the column highlight by header flag after setting up a new selection.
|
@@ -25,6 +26,7 @@ const command = exports.command = {
|
|
25
26
|
selection.selectedByColumnHeader.add(selection.getLayerLevel());
|
26
27
|
}
|
27
28
|
selection.setRangeEnd(hot._createCellCoords(to.row, column));
|
29
|
+
selection.markEndSource();
|
28
30
|
}
|
29
31
|
}
|
30
32
|
};
|
@@ -10,11 +10,12 @@ export const command = {
|
|
10
10
|
from,
|
11
11
|
to
|
12
12
|
} = hot.getSelectedRangeLast();
|
13
|
-
const isFocusHighlightedByHeader = highlight.isHeader() &&
|
13
|
+
const isFocusHighlightedByHeader = highlight.isHeader() && selection.isSelectedByColumnHeader();
|
14
14
|
if (highlight.isCell() || isFocusHighlightedByHeader) {
|
15
15
|
const column = columnIndexMapper.getNearestNotHiddenIndex(...(hot.isRtl() ? [0, 1] : [hot.countCols() - 1, -1]));
|
16
16
|
const newFrom = from.clone();
|
17
17
|
newFrom.col = highlight.col;
|
18
|
+
selection.markSource('keyboard');
|
18
19
|
selection.setRangeStart(newFrom, undefined, false, highlight.clone());
|
19
20
|
|
20
21
|
// Restore the column highlight by header flag after setting up a new selection.
|
@@ -22,6 +23,7 @@ export const command = {
|
|
22
23
|
selection.selectedByColumnHeader.add(selection.getLayerLevel());
|
23
24
|
}
|
24
25
|
selection.setRangeEnd(hot._createCellCoords(to.row, column));
|
26
|
+
selection.markEndSource();
|
25
27
|
}
|
26
28
|
}
|
27
29
|
};
|
@@ -13,11 +13,12 @@ const command = exports.command = {
|
|
13
13
|
from,
|
14
14
|
to
|
15
15
|
} = hot.getSelectedRangeLast();
|
16
|
-
const isFocusHighlightedByHeader = highlight.isHeader() &&
|
16
|
+
const isFocusHighlightedByHeader = highlight.isHeader() && selection.isSelectedByRowHeader();
|
17
17
|
if (highlight.isCell() || isFocusHighlightedByHeader) {
|
18
18
|
const row = rowIndexMapper.getNearestNotHiddenIndex(0, 1);
|
19
19
|
const newFrom = from.clone();
|
20
20
|
newFrom.row = highlight.row;
|
21
|
+
selection.markSource('keyboard');
|
21
22
|
selection.setRangeStart(newFrom, undefined, false, highlight.clone());
|
22
23
|
|
23
24
|
// Restore the row highlight by header flag after setting up a new selection.
|
@@ -25,6 +26,7 @@ const command = exports.command = {
|
|
25
26
|
selection.selectedByRowHeader.add(selection.getLayerLevel());
|
26
27
|
}
|
27
28
|
selection.setRangeEnd(hot._createCellCoords(row, to.col));
|
29
|
+
selection.markEndSource();
|
28
30
|
}
|
29
31
|
}
|
30
32
|
};
|
@@ -10,11 +10,12 @@ export const command = {
|
|
10
10
|
from,
|
11
11
|
to
|
12
12
|
} = hot.getSelectedRangeLast();
|
13
|
-
const isFocusHighlightedByHeader = highlight.isHeader() &&
|
13
|
+
const isFocusHighlightedByHeader = highlight.isHeader() && selection.isSelectedByRowHeader();
|
14
14
|
if (highlight.isCell() || isFocusHighlightedByHeader) {
|
15
15
|
const row = rowIndexMapper.getNearestNotHiddenIndex(0, 1);
|
16
16
|
const newFrom = from.clone();
|
17
17
|
newFrom.row = highlight.row;
|
18
|
+
selection.markSource('keyboard');
|
18
19
|
selection.setRangeStart(newFrom, undefined, false, highlight.clone());
|
19
20
|
|
20
21
|
// Restore the row highlight by header flag after setting up a new selection.
|
@@ -22,6 +23,7 @@ export const command = {
|
|
22
23
|
selection.selectedByRowHeader.add(selection.getLayerLevel());
|
23
24
|
}
|
24
25
|
selection.setRangeEnd(hot._createCellCoords(row, to.col));
|
26
|
+
selection.markEndSource();
|
25
27
|
}
|
26
28
|
}
|
27
29
|
};
|
@@ -4,15 +4,20 @@ exports.__esModule = true;
|
|
4
4
|
const command = exports.command = {
|
5
5
|
name: 'extendCellsSelectionToRows',
|
6
6
|
callback(hot) {
|
7
|
+
const {
|
8
|
+
selection
|
9
|
+
} = hot;
|
7
10
|
const {
|
8
11
|
highlight,
|
9
12
|
from,
|
10
13
|
to
|
11
14
|
} = hot.getSelectedRangeLast();
|
12
|
-
|
13
|
-
|
15
|
+
selection.markSource('keyboard');
|
16
|
+
if (selection.isSelectedByColumnHeader()) {
|
17
|
+
selection.selectAll(true, true);
|
14
18
|
} else {
|
15
19
|
hot.selectRows(from.row, to.row, highlight);
|
16
20
|
}
|
21
|
+
selection.markEndSource();
|
17
22
|
}
|
18
23
|
};
|
@@ -1,15 +1,20 @@
|
|
1
1
|
export const command = {
|
2
2
|
name: 'extendCellsSelectionToRows',
|
3
3
|
callback(hot) {
|
4
|
+
const {
|
5
|
+
selection
|
6
|
+
} = hot;
|
4
7
|
const {
|
5
8
|
highlight,
|
6
9
|
from,
|
7
10
|
to
|
8
11
|
} = hot.getSelectedRangeLast();
|
9
|
-
|
10
|
-
|
12
|
+
selection.markSource('keyboard');
|
13
|
+
if (selection.isSelectedByColumnHeader()) {
|
14
|
+
selection.selectAll(true, true);
|
11
15
|
} else {
|
12
16
|
hot.selectRows(from.row, to.row, highlight);
|
13
17
|
}
|
18
|
+
selection.markEndSource();
|
14
19
|
}
|
15
20
|
};
|
@@ -4,11 +4,16 @@ exports.__esModule = true;
|
|
4
4
|
const command = exports.command = {
|
5
5
|
name: 'extendCellsSelectionUp',
|
6
6
|
callback(hot) {
|
7
|
+
const {
|
8
|
+
selection
|
9
|
+
} = hot;
|
7
10
|
const {
|
8
11
|
highlight
|
9
12
|
} = hot.getSelectedRangeLast();
|
10
|
-
if (!
|
11
|
-
|
13
|
+
if (!selection.isSelectedByColumnHeader() && !selection.isSelectedByCorner() && (highlight.isCell() || highlight.isHeader() && selection.isSelectedByRowHeader())) {
|
14
|
+
selection.markSource('keyboard');
|
15
|
+
selection.transformEnd(-1, 0);
|
16
|
+
selection.markEndSource();
|
12
17
|
}
|
13
18
|
}
|
14
19
|
};
|
@@ -1,11 +1,16 @@
|
|
1
1
|
export const command = {
|
2
2
|
name: 'extendCellsSelectionUp',
|
3
3
|
callback(hot) {
|
4
|
+
const {
|
5
|
+
selection
|
6
|
+
} = hot;
|
4
7
|
const {
|
5
8
|
highlight
|
6
9
|
} = hot.getSelectedRangeLast();
|
7
|
-
if (!
|
8
|
-
|
10
|
+
if (!selection.isSelectedByColumnHeader() && !selection.isSelectedByCorner() && (highlight.isCell() || highlight.isHeader() && selection.isSelectedByRowHeader())) {
|
11
|
+
selection.markSource('keyboard');
|
12
|
+
selection.transformEnd(-1, 0);
|
13
|
+
selection.markEndSource();
|
9
14
|
}
|
10
15
|
}
|
11
16
|
};
|
@@ -4,16 +4,22 @@ exports.__esModule = true;
|
|
4
4
|
const command = exports.command = {
|
5
5
|
name: 'extendCellsSelectionUpByViewportHeight',
|
6
6
|
callback(hot) {
|
7
|
+
const {
|
8
|
+
selection,
|
9
|
+
rowIndexMapper
|
10
|
+
} = hot;
|
7
11
|
const {
|
8
12
|
to
|
9
13
|
} = hot.getSelectedRangeLast();
|
10
14
|
const nextRowIndexToSelect = Math.max(to.row - hot.countVisibleRows(), 0);
|
11
|
-
const row =
|
15
|
+
const row = rowIndexMapper.getNearestNotHiddenIndex(nextRowIndexToSelect, 1);
|
12
16
|
if (row !== null) {
|
13
17
|
const coords = hot._createCellCoords(row, to.col);
|
14
18
|
const scrollPadding = to.row - hot.getFirstFullyVisibleRow();
|
15
19
|
const nextVerticalScroll = Math.max(coords.row - scrollPadding, 0);
|
16
|
-
|
20
|
+
selection.markSource('keyboard');
|
21
|
+
selection.setRangeEnd(coords);
|
22
|
+
selection.markEndSource();
|
17
23
|
hot.scrollViewportTo({
|
18
24
|
row: nextVerticalScroll,
|
19
25
|
verticalSnap: 'top',
|
@@ -1,16 +1,22 @@
|
|
1
1
|
export const command = {
|
2
2
|
name: 'extendCellsSelectionUpByViewportHeight',
|
3
3
|
callback(hot) {
|
4
|
+
const {
|
5
|
+
selection,
|
6
|
+
rowIndexMapper
|
7
|
+
} = hot;
|
4
8
|
const {
|
5
9
|
to
|
6
10
|
} = hot.getSelectedRangeLast();
|
7
11
|
const nextRowIndexToSelect = Math.max(to.row - hot.countVisibleRows(), 0);
|
8
|
-
const row =
|
12
|
+
const row = rowIndexMapper.getNearestNotHiddenIndex(nextRowIndexToSelect, 1);
|
9
13
|
if (row !== null) {
|
10
14
|
const coords = hot._createCellCoords(row, to.col);
|
11
15
|
const scrollPadding = to.row - hot.getFirstFullyVisibleRow();
|
12
16
|
const nextVerticalScroll = Math.max(coords.row - scrollPadding, 0);
|
13
|
-
|
17
|
+
selection.markSource('keyboard');
|
18
|
+
selection.setRangeEnd(coords);
|
19
|
+
selection.markEndSource();
|
14
20
|
hot.scrollViewportTo({
|
15
21
|
row: nextVerticalScroll,
|
16
22
|
verticalSnap: 'top',
|
@@ -2,8 +2,6 @@
|
|
2
2
|
|
3
3
|
exports.__esModule = true;
|
4
4
|
exports.createKeyboardShortcutCommandsPool = createKeyboardShortcutCommandsPool;
|
5
|
-
require("core-js/modules/esnext.iterator.constructor.js");
|
6
|
-
require("core-js/modules/esnext.iterator.for-each.js");
|
7
5
|
var _editor = require("./editor");
|
8
6
|
var _extendCellsSelection = require("./extendCellsSelection");
|
9
7
|
var _moveCellSelection = require("./moveCellSelection");
|
@@ -1,5 +1,3 @@
|
|
1
|
-
import "core-js/modules/esnext.iterator.constructor.js";
|
2
|
-
import "core-js/modules/esnext.iterator.for-each.js";
|
3
1
|
import { getAllCommands as getAllEditorCommands } from "./editor/index.mjs";
|
4
2
|
import { getAllCommands as getAllSelectionExtendCommands } from "./extendCellsSelection/index.mjs";
|
5
3
|
import { getAllCommands as getAllSelectionMoveCommands } from "./moveCellSelection/index.mjs";
|
@@ -4,6 +4,9 @@ exports.__esModule = true;
|
|
4
4
|
const command = exports.command = {
|
5
5
|
name: 'moveCellSelectionDownByViewportHeight',
|
6
6
|
callback(hot) {
|
7
|
+
const {
|
8
|
+
selection
|
9
|
+
} = hot;
|
7
10
|
const {
|
8
11
|
navigableHeaders
|
9
12
|
} = hot.getSettings();
|
@@ -23,7 +26,9 @@ const command = exports.command = {
|
|
23
26
|
} else if (row + rowsStep > hot.countRows()) {
|
24
27
|
rowsStep = hot.countRows() - row - 1;
|
25
28
|
}
|
26
|
-
|
29
|
+
selection.markSource('keyboard');
|
30
|
+
selection.transformStart(rowsStep, 0);
|
31
|
+
selection.markEndSource();
|
27
32
|
if (hot.getSelectedRangeLast().highlight.row < 0) {
|
28
33
|
hot.scrollViewportTo({
|
29
34
|
row: 0
|
@@ -1,6 +1,9 @@
|
|
1
1
|
export const command = {
|
2
2
|
name: 'moveCellSelectionDownByViewportHeight',
|
3
3
|
callback(hot) {
|
4
|
+
const {
|
5
|
+
selection
|
6
|
+
} = hot;
|
4
7
|
const {
|
5
8
|
navigableHeaders
|
6
9
|
} = hot.getSettings();
|
@@ -20,7 +23,9 @@ export const command = {
|
|
20
23
|
} else if (row + rowsStep > hot.countRows()) {
|
21
24
|
rowsStep = hot.countRows() - row - 1;
|
22
25
|
}
|
23
|
-
|
26
|
+
selection.markSource('keyboard');
|
27
|
+
selection.transformStart(rowsStep, 0);
|
28
|
+
selection.markEndSource();
|
24
29
|
if (hot.getSelectedRangeLast().highlight.row < 0) {
|
25
30
|
hot.scrollViewportTo({
|
26
31
|
row: 0
|
@@ -4,13 +4,18 @@ exports.__esModule = true;
|
|
4
4
|
const command = exports.command = {
|
5
5
|
name: 'moveCellSelectionInlineEnd',
|
6
6
|
callback(hot, event) {
|
7
|
+
const {
|
8
|
+
selection
|
9
|
+
} = hot;
|
7
10
|
const settings = hot.getSettings();
|
8
11
|
const selectedRange = hot.getSelectedRangeLast();
|
9
12
|
const tabMoves = typeof settings.tabMoves === 'function' ? settings.tabMoves(event) : settings.tabMoves;
|
10
|
-
|
11
|
-
|
13
|
+
selection.markSource('keyboard');
|
14
|
+
if (selection.isMultiple() && !selectedRange.isHeader() && hot.countRenderedCols() > 0 && hot.countRenderedRows() > 0) {
|
15
|
+
selection.transformFocus(-tabMoves.row, -tabMoves.col);
|
12
16
|
} else {
|
13
|
-
|
17
|
+
selection.transformStart(-tabMoves.row, -tabMoves.col);
|
14
18
|
}
|
19
|
+
selection.markEndSource();
|
15
20
|
}
|
16
21
|
};
|
@@ -1,13 +1,18 @@
|
|
1
1
|
export const command = {
|
2
2
|
name: 'moveCellSelectionInlineEnd',
|
3
3
|
callback(hot, event) {
|
4
|
+
const {
|
5
|
+
selection
|
6
|
+
} = hot;
|
4
7
|
const settings = hot.getSettings();
|
5
8
|
const selectedRange = hot.getSelectedRangeLast();
|
6
9
|
const tabMoves = typeof settings.tabMoves === 'function' ? settings.tabMoves(event) : settings.tabMoves;
|
7
|
-
|
8
|
-
|
10
|
+
selection.markSource('keyboard');
|
11
|
+
if (selection.isMultiple() && !selectedRange.isHeader() && hot.countRenderedCols() > 0 && hot.countRenderedRows() > 0) {
|
12
|
+
selection.transformFocus(-tabMoves.row, -tabMoves.col);
|
9
13
|
} else {
|
10
|
-
|
14
|
+
selection.transformStart(-tabMoves.row, -tabMoves.col);
|
11
15
|
}
|
16
|
+
selection.markEndSource();
|
12
17
|
}
|
13
18
|
};
|
@@ -4,13 +4,18 @@ exports.__esModule = true;
|
|
4
4
|
const command = exports.command = {
|
5
5
|
name: 'moveCellSelectionInlineStart',
|
6
6
|
callback(hot, event) {
|
7
|
+
const {
|
8
|
+
selection
|
9
|
+
} = hot;
|
7
10
|
const settings = hot.getSettings();
|
8
11
|
const selectedRange = hot.getSelectedRangeLast();
|
9
12
|
const tabMoves = typeof settings.tabMoves === 'function' ? settings.tabMoves(event) : settings.tabMoves;
|
10
|
-
|
11
|
-
|
13
|
+
selection.markSource('keyboard');
|
14
|
+
if (selection.isMultiple() && !selectedRange.isHeader() && hot.countRenderedCols() > 0 && hot.countRenderedRows() > 0) {
|
15
|
+
selection.transformFocus(tabMoves.row, tabMoves.col);
|
12
16
|
} else {
|
13
|
-
|
17
|
+
selection.transformStart(tabMoves.row, tabMoves.col);
|
14
18
|
}
|
19
|
+
selection.markEndSource();
|
15
20
|
}
|
16
21
|
};
|
@@ -1,13 +1,18 @@
|
|
1
1
|
export const command = {
|
2
2
|
name: 'moveCellSelectionInlineStart',
|
3
3
|
callback(hot, event) {
|
4
|
+
const {
|
5
|
+
selection
|
6
|
+
} = hot;
|
4
7
|
const settings = hot.getSettings();
|
5
8
|
const selectedRange = hot.getSelectedRangeLast();
|
6
9
|
const tabMoves = typeof settings.tabMoves === 'function' ? settings.tabMoves(event) : settings.tabMoves;
|
7
|
-
|
8
|
-
|
10
|
+
selection.markSource('keyboard');
|
11
|
+
if (selection.isMultiple() && !selectedRange.isHeader() && hot.countRenderedCols() > 0 && hot.countRenderedRows() > 0) {
|
12
|
+
selection.transformFocus(tabMoves.row, tabMoves.col);
|
9
13
|
} else {
|
10
|
-
|
14
|
+
selection.transformStart(tabMoves.row, tabMoves.col);
|
11
15
|
}
|
16
|
+
selection.markEndSource();
|
12
17
|
}
|
13
18
|
};
|
@@ -4,6 +4,11 @@ exports.__esModule = true;
|
|
4
4
|
const command = exports.command = {
|
5
5
|
name: 'moveCellSelectionLeft',
|
6
6
|
callback(hot) {
|
7
|
-
|
7
|
+
const {
|
8
|
+
selection
|
9
|
+
} = hot;
|
10
|
+
selection.markSource('keyboard');
|
11
|
+
selection.transformStart(0, -1 * hot.getDirectionFactor());
|
12
|
+
selection.markEndSource();
|
8
13
|
}
|
9
14
|
};
|
@@ -1,6 +1,11 @@
|
|
1
1
|
export const command = {
|
2
2
|
name: 'moveCellSelectionLeft',
|
3
3
|
callback(hot) {
|
4
|
-
|
4
|
+
const {
|
5
|
+
selection
|
6
|
+
} = hot;
|
7
|
+
selection.markSource('keyboard');
|
8
|
+
selection.transformStart(0, -1 * hot.getDirectionFactor());
|
9
|
+
selection.markEndSource();
|
5
10
|
}
|
6
11
|
};
|
@@ -4,6 +4,11 @@ exports.__esModule = true;
|
|
4
4
|
const command = exports.command = {
|
5
5
|
name: 'moveCellSelectionRight',
|
6
6
|
callback(hot) {
|
7
|
-
|
7
|
+
const {
|
8
|
+
selection
|
9
|
+
} = hot;
|
10
|
+
selection.markSource('keyboard');
|
11
|
+
selection.transformStart(0, hot.getDirectionFactor());
|
12
|
+
selection.markEndSource();
|
8
13
|
}
|
9
14
|
};
|
@@ -1,6 +1,11 @@
|
|
1
1
|
export const command = {
|
2
2
|
name: 'moveCellSelectionRight',
|
3
3
|
callback(hot) {
|
4
|
-
|
4
|
+
const {
|
5
|
+
selection
|
6
|
+
} = hot;
|
7
|
+
selection.markSource('keyboard');
|
8
|
+
selection.transformStart(0, hot.getDirectionFactor());
|
9
|
+
selection.markEndSource();
|
5
10
|
}
|
6
11
|
};
|
@@ -4,6 +4,9 @@ exports.__esModule = true;
|
|
4
4
|
const command = exports.command = {
|
5
5
|
name: 'moveCellSelectionToMostBottom',
|
6
6
|
callback(hot) {
|
7
|
+
const {
|
8
|
+
selection
|
9
|
+
} = hot;
|
7
10
|
const {
|
8
11
|
col
|
9
12
|
} = hot.getSelectedRangeLast().highlight;
|
@@ -11,6 +14,6 @@ const command = exports.command = {
|
|
11
14
|
if (row === null) {
|
12
15
|
row = -1;
|
13
16
|
}
|
14
|
-
|
17
|
+
selection.setRangeStart(hot._createCellCoords(row, col));
|
15
18
|
}
|
16
19
|
};
|
@@ -1,6 +1,9 @@
|
|
1
1
|
export const command = {
|
2
2
|
name: 'moveCellSelectionToMostBottom',
|
3
3
|
callback(hot) {
|
4
|
+
const {
|
5
|
+
selection
|
6
|
+
} = hot;
|
4
7
|
const {
|
5
8
|
col
|
6
9
|
} = hot.getSelectedRangeLast().highlight;
|
@@ -8,6 +11,6 @@ export const command = {
|
|
8
11
|
if (row === null) {
|
9
12
|
row = -1;
|
10
13
|
}
|
11
|
-
|
14
|
+
selection.setRangeStart(hot._createCellCoords(row, col));
|
12
15
|
}
|
13
16
|
};
|
@@ -12,6 +12,8 @@ const command = exports.command = {
|
|
12
12
|
const fixedRows = parseInt(hot.getSettings().fixedRowsBottom, 10);
|
13
13
|
const row = rowIndexMapper.getNearestNotHiddenIndex(hot.countRows() - fixedRows - 1, -1);
|
14
14
|
const column = columnIndexMapper.getNearestNotHiddenIndex(hot.countCols() - 1, -1);
|
15
|
+
selection.markSource('keyboard');
|
15
16
|
selection.setRangeStart(hot._createCellCoords(row, column));
|
17
|
+
selection.markEndSource();
|
16
18
|
}
|
17
19
|
};
|