handsontable 0.0.0-next-221e46b-20240307 → 0.0.0-next-2becb78-20240313
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.
- package/3rdparty/walkontable/src/cell/range.d.ts +1 -0
- package/3rdparty/walkontable/src/cell/range.js +22 -5
- package/3rdparty/walkontable/src/cell/range.mjs +22 -5
- package/base.js +2 -2
- package/base.mjs +2 -2
- package/core/viewportScroll/index.js +4 -1
- package/core/viewportScroll/index.mjs +4 -1
- package/core/viewportScroll/scrollStrategies/focusScroll.js +15 -0
- package/core/viewportScroll/scrollStrategies/focusScroll.mjs +11 -0
- package/core.d.ts +4 -3
- package/core.js +81 -21
- package/core.mjs +81 -21
- package/dist/handsontable.css +2 -2
- package/dist/handsontable.full.css +2 -2
- package/dist/handsontable.full.js +2721 -1361
- package/dist/handsontable.full.min.css +2 -2
- package/dist/handsontable.full.min.js +152 -152
- package/dist/handsontable.js +2721 -1361
- package/dist/handsontable.min.css +2 -2
- package/dist/handsontable.min.js +32 -32
- package/editorManager.js +12 -8
- package/editorManager.mjs +12 -8
- package/helpers/mixed.js +1 -1
- package/helpers/mixed.mjs +1 -1
- package/package.json +1 -1
- package/pluginHooks.d.ts +1 -0
- package/pluginHooks.js +43 -1
- package/pluginHooks.mjs +43 -1
- package/plugins/collapsibleColumns/collapsibleColumns.js +7 -1
- package/plugins/collapsibleColumns/collapsibleColumns.mjs +7 -1
- package/plugins/columnSorting/columnSorting.js +6 -0
- package/plugins/columnSorting/columnSorting.mjs +6 -0
- package/plugins/contextMenu/menu/defaultShortcutsList.js +26 -10
- package/plugins/contextMenu/menu/defaultShortcutsList.mjs +26 -10
- package/plugins/mergeCells/calculations/selection.js +1 -70
- package/plugins/mergeCells/calculations/selection.mjs +1 -70
- package/plugins/mergeCells/cellsCollection.js +116 -0
- package/plugins/mergeCells/cellsCollection.mjs +116 -0
- package/plugins/mergeCells/contextMenuItem/toggleMerge.js +11 -1
- package/plugins/mergeCells/contextMenuItem/toggleMerge.mjs +11 -1
- package/plugins/mergeCells/focusOrder.js +327 -0
- package/plugins/mergeCells/focusOrder.mjs +322 -0
- package/plugins/mergeCells/mergeCells.js +392 -197
- package/plugins/mergeCells/mergeCells.mjs +392 -197
- package/plugins/multiColumnSorting/multiColumnSorting.js +6 -0
- package/plugins/multiColumnSorting/multiColumnSorting.mjs +6 -0
- package/plugins/nestedHeaders/nestedHeaders.js +1 -0
- package/plugins/nestedHeaders/nestedHeaders.mjs +1 -0
- package/plugins/nestedRows/nestedRows.js +7 -1
- package/plugins/nestedRows/nestedRows.mjs +7 -1
- package/renderers/checkboxRenderer/checkboxRenderer.js +8 -5
- package/renderers/checkboxRenderer/checkboxRenderer.mjs +8 -5
- package/selection/highlight/visualSelection.js +16 -2
- package/selection/highlight/visualSelection.mjs +16 -2
- package/selection/selection.js +228 -44
- package/selection/selection.mjs +227 -43
- package/selection/transformation.js +86 -32
- package/selection/transformation.mjs +86 -32
- package/shortcutContexts/commands/editor/closeAndSave.js +2 -2
- package/shortcutContexts/commands/editor/closeAndSave.mjs +2 -2
- package/shortcutContexts/commands/editor/open.js +18 -3
- package/shortcutContexts/commands/editor/open.mjs +18 -3
- package/shortcutContexts/commands/extendCellsSelection/down.js +1 -1
- package/shortcutContexts/commands/extendCellsSelection/down.mjs +1 -1
- package/shortcutContexts/commands/extendCellsSelection/left.js +1 -1
- package/shortcutContexts/commands/extendCellsSelection/left.mjs +1 -1
- package/shortcutContexts/commands/extendCellsSelection/right.js +1 -1
- package/shortcutContexts/commands/extendCellsSelection/right.mjs +1 -1
- package/shortcutContexts/commands/extendCellsSelection/toColumns.js +1 -1
- package/shortcutContexts/commands/extendCellsSelection/toColumns.mjs +1 -1
- package/shortcutContexts/commands/extendCellsSelection/toMostBottom.js +3 -1
- package/shortcutContexts/commands/extendCellsSelection/toMostBottom.mjs +3 -1
- package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.js +9 -3
- package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.mjs +9 -3
- package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.js +10 -3
- package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.mjs +10 -3
- 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 +1 -1
- package/shortcutContexts/commands/extendCellsSelection/toRows.mjs +1 -1
- package/shortcutContexts/commands/extendCellsSelection/up.js +1 -1
- package/shortcutContexts/commands/extendCellsSelection/up.mjs +1 -1
- package/shortcutContexts/commands/moveCellSelection/inlineEnd.js +6 -1
- package/shortcutContexts/commands/moveCellSelection/inlineEnd.mjs +6 -1
- package/shortcutContexts/commands/moveCellSelection/inlineStart.js +6 -1
- package/shortcutContexts/commands/moveCellSelection/inlineStart.mjs +6 -1
- package/shortcutContexts/grid.js +2 -2
- package/shortcutContexts/grid.mjs +2 -2
- package/shortcuts/context.js +2 -1
- package/shortcuts/context.mjs +2 -1
- package/tableView.js +20 -0
- package/tableView.mjs +20 -0
- package/utils/dataStructures/linkedList.js +6 -1
- package/utils/dataStructures/linkedList.mjs +6 -1
@@ -5,7 +5,12 @@ const command = exports.command = {
|
|
5
5
|
name: 'moveCellSelectionInlineStart',
|
6
6
|
callback(hot, event) {
|
7
7
|
const settings = hot.getSettings();
|
8
|
+
const selectedRange = hot.getSelectedRangeLast();
|
8
9
|
const tabMoves = typeof settings.tabMoves === 'function' ? settings.tabMoves(event) : settings.tabMoves;
|
9
|
-
hot.selection.
|
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
|
+
}
|
10
15
|
}
|
11
16
|
};
|
@@ -2,7 +2,12 @@ export const command = {
|
|
2
2
|
name: 'moveCellSelectionInlineStart',
|
3
3
|
callback(hot, event) {
|
4
4
|
const settings = hot.getSettings();
|
5
|
+
const selectedRange = hot.getSelectedRangeLast();
|
5
6
|
const tabMoves = typeof settings.tabMoves === 'function' ? settings.tabMoves(event) : settings.tabMoves;
|
6
|
-
hot.selection.
|
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
|
+
}
|
7
12
|
}
|
8
13
|
};
|
package/shortcutContexts/grid.js
CHANGED
@@ -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:
|
160
|
+
callback: event => commandsPool.moveCellSelectionInlineStart(event)
|
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:
|
165
|
+
callback: event => commandsPool.moveCellSelectionInlineEnd(event)
|
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:
|
156
|
+
callback: event => commandsPool.moveCellSelectionInlineStart(event)
|
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:
|
161
|
+
callback: event => commandsPool.moveCellSelectionInlineEnd(event)
|
162
162
|
}, {
|
163
163
|
keys: [['Control/Meta', 'Backspace']],
|
164
164
|
callback: () => commandsPool.scrollToFocusedCell()
|
package/shortcuts/context.js
CHANGED
@@ -90,7 +90,8 @@ const createContext = name => {
|
|
90
90
|
stopPropagation
|
91
91
|
};
|
92
92
|
if ((0, _mixed.isDefined)(relativeToGroup)) {
|
93
|
-
|
93
|
+
newShortcut.relativeToGroup = relativeToGroup;
|
94
|
+
newShortcut.position = position;
|
94
95
|
}
|
95
96
|
if (isContextObject(forwardToContext)) {
|
96
97
|
newShortcut.forwardToContext = forwardToContext;
|
package/shortcuts/context.mjs
CHANGED
@@ -86,7 +86,8 @@ export const createContext = name => {
|
|
86
86
|
stopPropagation
|
87
87
|
};
|
88
88
|
if (isDefined(relativeToGroup)) {
|
89
|
-
|
89
|
+
newShortcut.relativeToGroup = relativeToGroup;
|
90
|
+
newShortcut.position = position;
|
90
91
|
}
|
91
92
|
if (isContextObject(forwardToContext)) {
|
92
93
|
newShortcut.forwardToContext = forwardToContext;
|
package/tableView.js
CHANGED
@@ -601,6 +601,16 @@ class TableView {
|
|
601
601
|
count += 1;
|
602
602
|
}
|
603
603
|
}
|
604
|
+
|
605
|
+
// const columnMax = Math.max(columnStart, columnEnd);
|
606
|
+
// let count = 0;
|
607
|
+
|
608
|
+
// for (let column = Math.min(columnStart, columnEnd); column <= columnMax; column++) {
|
609
|
+
// if (this.hot.columnIndexMapper.getRenderableFromVisualIndex(column) !== null) {
|
610
|
+
// count += 1;
|
611
|
+
// }
|
612
|
+
// }
|
613
|
+
|
604
614
|
return count;
|
605
615
|
}
|
606
616
|
|
@@ -618,6 +628,16 @@ class TableView {
|
|
618
628
|
count += 1;
|
619
629
|
}
|
620
630
|
}
|
631
|
+
|
632
|
+
// const rowMax = Math.max(rowStart, rowEnd);
|
633
|
+
// let count = 0;
|
634
|
+
|
635
|
+
// for (let row = Math.min(rowStart, rowEnd); row <= rowMax; row++) {
|
636
|
+
// if (this.hot.rowIndexMapper.getRenderableFromVisualIndex(row) !== null) {
|
637
|
+
// count += 1;
|
638
|
+
// }
|
639
|
+
// }
|
640
|
+
|
621
641
|
return count;
|
622
642
|
}
|
623
643
|
|
package/tableView.mjs
CHANGED
@@ -597,6 +597,16 @@ class TableView {
|
|
597
597
|
count += 1;
|
598
598
|
}
|
599
599
|
}
|
600
|
+
|
601
|
+
// const columnMax = Math.max(columnStart, columnEnd);
|
602
|
+
// let count = 0;
|
603
|
+
|
604
|
+
// for (let column = Math.min(columnStart, columnEnd); column <= columnMax; column++) {
|
605
|
+
// if (this.hot.columnIndexMapper.getRenderableFromVisualIndex(column) !== null) {
|
606
|
+
// count += 1;
|
607
|
+
// }
|
608
|
+
// }
|
609
|
+
|
600
610
|
return count;
|
601
611
|
}
|
602
612
|
|
@@ -614,6 +624,16 @@ class TableView {
|
|
614
624
|
count += 1;
|
615
625
|
}
|
616
626
|
}
|
627
|
+
|
628
|
+
// const rowMax = Math.max(rowStart, rowEnd);
|
629
|
+
// let count = 0;
|
630
|
+
|
631
|
+
// for (let row = Math.min(rowStart, rowEnd); row <= rowMax; row++) {
|
632
|
+
// if (this.hot.rowIndexMapper.getRenderableFromVisualIndex(row) !== null) {
|
633
|
+
// count += 1;
|
634
|
+
// }
|
635
|
+
// }
|
636
|
+
|
617
637
|
return count;
|
618
638
|
}
|
619
639
|
|
@@ -59,6 +59,7 @@ class LinkedList {
|
|
59
59
|
* Add data to the end of linked list.
|
60
60
|
*
|
61
61
|
* @param {object} data Data which should be added.
|
62
|
+
* @returns {NodeStructure} Returns the node which has been added.
|
62
63
|
*/
|
63
64
|
push(data) {
|
64
65
|
const node = new NodeStructure(data);
|
@@ -71,6 +72,7 @@ class LinkedList {
|
|
71
72
|
node.prev = temp;
|
72
73
|
temp.next = node;
|
73
74
|
}
|
75
|
+
return node;
|
74
76
|
}
|
75
77
|
|
76
78
|
/**
|
@@ -99,7 +101,10 @@ class LinkedList {
|
|
99
101
|
inorder(callback) {
|
100
102
|
let temp = this.first;
|
101
103
|
while (temp) {
|
102
|
-
callback(temp);
|
104
|
+
const interrupt = callback(temp);
|
105
|
+
if (temp === this.last || interrupt === true) {
|
106
|
+
break;
|
107
|
+
}
|
103
108
|
temp = temp.next;
|
104
109
|
}
|
105
110
|
}
|
@@ -55,6 +55,7 @@ class LinkedList {
|
|
55
55
|
* Add data to the end of linked list.
|
56
56
|
*
|
57
57
|
* @param {object} data Data which should be added.
|
58
|
+
* @returns {NodeStructure} Returns the node which has been added.
|
58
59
|
*/
|
59
60
|
push(data) {
|
60
61
|
const node = new NodeStructure(data);
|
@@ -67,6 +68,7 @@ class LinkedList {
|
|
67
68
|
node.prev = temp;
|
68
69
|
temp.next = node;
|
69
70
|
}
|
71
|
+
return node;
|
70
72
|
}
|
71
73
|
|
72
74
|
/**
|
@@ -95,7 +97,10 @@ class LinkedList {
|
|
95
97
|
inorder(callback) {
|
96
98
|
let temp = this.first;
|
97
99
|
while (temp) {
|
98
|
-
callback(temp);
|
100
|
+
const interrupt = callback(temp);
|
101
|
+
if (temp === this.last || interrupt === true) {
|
102
|
+
break;
|
103
|
+
}
|
99
104
|
temp = temp.next;
|
100
105
|
}
|
101
106
|
}
|