handsontable 0.0.0-next-7a416a0-20240206 → 0.0.0-next-ba17d71-20240207
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.
- package/base.js +2 -2
- package/base.mjs +2 -2
- package/core/viewportScroll/index.js +1 -4
- package/core/viewportScroll/index.mjs +1 -4
- package/core.js +0 -14
- package/core.mjs +0 -14
- package/dist/handsontable.css +2 -2
- package/dist/handsontable.full.css +2 -2
- package/dist/handsontable.full.js +1010 -1261
- package/dist/handsontable.full.min.css +2 -2
- package/dist/handsontable.full.min.js +48 -48
- package/dist/handsontable.js +1012 -1263
- package/dist/handsontable.min.css +2 -2
- package/dist/handsontable.min.js +32 -32
- package/dist/languages/all.js +130 -25
- package/dist/languages/all.min.js +1 -1
- package/dist/languages/hr-HR.js +167 -0
- package/dist/languages/hr-HR.min.js +1 -0
- package/editors/autocompleteEditor/autocompleteEditor.js +1 -1
- package/editors/autocompleteEditor/autocompleteEditor.mjs +1 -1
- package/helpers/mixed.js +1 -1
- package/helpers/mixed.mjs +1 -1
- package/i18n/languages/hr-HR.js +96 -0
- package/i18n/languages/hr-HR.mjs +90 -0
- package/i18n/languages/index.js +2 -0
- package/i18n/languages/index.mjs +2 -1
- package/languages/all.js +130 -25
- package/languages/hr-HR.js +167 -0
- package/languages/hr-HR.mjs +92 -0
- package/languages/index.js +130 -25
- package/languages/index.mjs +2 -1
- package/package.json +11 -1
- package/pluginHooks.d.ts +0 -1
- package/pluginHooks.js +1 -43
- package/pluginHooks.mjs +1 -43
- package/plugins/collapsibleColumns/collapsibleColumns.js +1 -7
- package/plugins/collapsibleColumns/collapsibleColumns.mjs +1 -7
- package/plugins/columnSorting/columnSorting.js +0 -6
- package/plugins/columnSorting/columnSorting.mjs +0 -6
- package/plugins/contextMenu/menu/defaultShortcutsList.js +10 -26
- package/plugins/contextMenu/menu/defaultShortcutsList.mjs +10 -26
- package/plugins/mergeCells/mergeCells.js +1 -3
- package/plugins/mergeCells/mergeCells.mjs +1 -3
- package/plugins/multiColumnSorting/multiColumnSorting.js +0 -6
- package/plugins/multiColumnSorting/multiColumnSorting.mjs +0 -6
- package/plugins/nestedHeaders/nestedHeaders.js +0 -1
- package/plugins/nestedHeaders/nestedHeaders.mjs +0 -1
- package/plugins/nestedRows/nestedRows.js +1 -7
- package/plugins/nestedRows/nestedRows.mjs +1 -7
- package/renderers/checkboxRenderer/checkboxRenderer.js +4 -4
- package/renderers/checkboxRenderer/checkboxRenderer.mjs +4 -4
- package/selection/selection.js +30 -144
- package/selection/selection.mjs +29 -143
- package/selection/transformation.js +27 -18
- package/selection/transformation.mjs +27 -18
- package/shortcutContexts/commands/editor/open.js +0 -14
- package/shortcutContexts/commands/editor/open.mjs +0 -14
- package/shortcutContexts/commands/moveCellSelection/inlineEnd.js +1 -5
- package/shortcutContexts/commands/moveCellSelection/inlineEnd.mjs +1 -5
- package/shortcutContexts/commands/moveCellSelection/inlineStart.js +1 -5
- package/shortcutContexts/commands/moveCellSelection/inlineStart.mjs +1 -5
- package/shortcutContexts/grid.js +2 -2
- package/shortcutContexts/grid.mjs +2 -2
- package/shortcuts/context.js +1 -2
- package/shortcuts/context.mjs +1 -2
- package/core/viewportScroll/scrollStrategies/focusScroll.js +0 -15
- package/core/viewportScroll/scrollStrategies/focusScroll.mjs +0 -11
package/pluginHooks.mjs
CHANGED
@@ -646,9 +646,7 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
|
|
646
646
|
* @param {string} prop Selection start data source object property name.
|
647
647
|
* @param {number} row2 Selection end visual row index.
|
648
648
|
* @param {string} prop2 Selection end data source object property name.
|
649
|
-
* @param {object} preventScrolling
|
650
|
-
* Property `preventScrolling.value` expects a boolean value that
|
651
|
-
* Handsontable uses to control scroll behavior after selection.
|
649
|
+
* @param {object} preventScrolling Object with `value` property where its value change will be observed.
|
652
650
|
* @param {number} selectionLayerLevel The number which indicates what selection layer is currently modified.
|
653
651
|
* @example
|
654
652
|
* ```js
|
@@ -698,46 +696,6 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
|
|
698
696
|
* @param {number} selectionLayerLevel The number which indicates what selection layer is currently modified.
|
699
697
|
*/
|
700
698
|
'afterSelectionEndByProp',
|
701
|
-
/**
|
702
|
-
* Fired after the focus position within a selected range is changed.
|
703
|
-
*
|
704
|
-
* @since 14.2.0
|
705
|
-
* @event Hooks#afterSelectionFocusSet
|
706
|
-
* @param {number} row The focus visual row index position.
|
707
|
-
* @param {number} column The focus visual column index position.
|
708
|
-
* @param {object} preventScrolling A reference to the observable object with the `value` property.
|
709
|
-
* Property `preventScrolling.value` expects a boolean value that
|
710
|
-
* Handsontable uses to control scroll behavior after selection.
|
711
|
-
* @example
|
712
|
-
* ```js
|
713
|
-
* ::: only-for javascript
|
714
|
-
* new Handsontable(element, {
|
715
|
-
* afterSelectionFocusSet: (row, column, preventScrolling) => {
|
716
|
-
* // If set to `false` (default): when focused cell selection is outside the viewport,
|
717
|
-
* // Handsontable scrolls the viewport to that cell.
|
718
|
-
* // If set to `true`: when focused cell selection is outside the viewport,
|
719
|
-
* // Handsontable doesn't scroll the viewport.
|
720
|
-
* preventScrolling.value = true;
|
721
|
-
* }
|
722
|
-
* })
|
723
|
-
* ```
|
724
|
-
* :::
|
725
|
-
*
|
726
|
-
* ::: only-for react
|
727
|
-
* ```jsx
|
728
|
-
* <HotTable
|
729
|
-
* afterSelectionFocusSet={(row, column, preventScrolling) => {
|
730
|
-
* // If set to `false` (default): when focused cell selection is outside the viewport,
|
731
|
-
* // Handsontable scrolls the viewport to that cell.
|
732
|
-
* // If set to `true`: when focused cell selection is outside the viewport,
|
733
|
-
* // Handsontable doesn't scroll the viewport.
|
734
|
-
* preventScrolling.value = true;
|
735
|
-
* }}
|
736
|
-
* />
|
737
|
-
* ```
|
738
|
-
* :::
|
739
|
-
*/
|
740
|
-
'afterSelectionFocusSet',
|
741
699
|
/**
|
742
700
|
* Fired before one or more columns are selected (e.g. During mouse header click or {@link Core#selectColumns} API call).
|
743
701
|
*
|
@@ -9,7 +9,6 @@ var _number = require("../../helpers/number");
|
|
9
9
|
var _console = require("../../helpers/console");
|
10
10
|
var _element = require("../../helpers/dom/element");
|
11
11
|
var _event = require("../../helpers/dom/event");
|
12
|
-
var _shortcutContexts = require("../../shortcutContexts");
|
13
12
|
var _a11y = require("../../helpers/a11y");
|
14
13
|
function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
|
15
14
|
function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
|
@@ -309,17 +308,12 @@ class CollapsibleColumns extends _base.BasePlugin {
|
|
309
308
|
col: columnIndex
|
310
309
|
});
|
311
310
|
}
|
312
|
-
|
313
|
-
// prevent default Enter behavior (move to the next row within a selection range)
|
314
|
-
return false;
|
315
311
|
},
|
316
312
|
runOnlyIf: () => {
|
317
313
|
var _this$hot$getSelected;
|
318
314
|
return (_this$hot$getSelected = this.hot.getSelectedRangeLast()) === null || _this$hot$getSelected === void 0 ? void 0 : _this$hot$getSelected.highlight.isHeader();
|
319
315
|
},
|
320
|
-
group: SHORTCUTS_GROUP
|
321
|
-
relativeToGroup: _shortcutContexts.EDITOR_EDIT_GROUP,
|
322
|
-
position: 'before'
|
316
|
+
group: SHORTCUTS_GROUP
|
323
317
|
});
|
324
318
|
}
|
325
319
|
|
@@ -18,7 +18,6 @@ import { rangeEach } from "../../helpers/number.mjs";
|
|
18
18
|
import { warn } from "../../helpers/console.mjs";
|
19
19
|
import { addClass, hasClass, removeClass, fastInnerText, removeAttribute, setAttribute } from "../../helpers/dom/element.mjs";
|
20
20
|
import { stopImmediatePropagation } from "../../helpers/dom/event.mjs";
|
21
|
-
import { EDITOR_EDIT_GROUP as SHORTCUTS_GROUP_EDITOR } from "../../shortcutContexts/index.mjs";
|
22
21
|
import { A11Y_EXPANDED, A11Y_HIDDEN } from "../../helpers/a11y.mjs";
|
23
22
|
export const PLUGIN_KEY = 'collapsibleColumns';
|
24
23
|
export const PLUGIN_PRIORITY = 290;
|
@@ -306,17 +305,12 @@ export class CollapsibleColumns extends BasePlugin {
|
|
306
305
|
col: columnIndex
|
307
306
|
});
|
308
307
|
}
|
309
|
-
|
310
|
-
// prevent default Enter behavior (move to the next row within a selection range)
|
311
|
-
return false;
|
312
308
|
},
|
313
309
|
runOnlyIf: () => {
|
314
310
|
var _this$hot$getSelected;
|
315
311
|
return (_this$hot$getSelected = this.hot.getSelectedRangeLast()) === null || _this$hot$getSelected === void 0 ? void 0 : _this$hot$getSelected.highlight.isHeader();
|
316
312
|
},
|
317
|
-
group: SHORTCUTS_GROUP
|
318
|
-
relativeToGroup: SHORTCUTS_GROUP_EDITOR,
|
319
|
-
position: 'before'
|
313
|
+
group: SHORTCUTS_GROUP
|
320
314
|
});
|
321
315
|
}
|
322
316
|
|
@@ -12,7 +12,6 @@ var _base = require("../base");
|
|
12
12
|
var _translations = require("../../translations");
|
13
13
|
var _pluginHooks = _interopRequireDefault(require("../../pluginHooks"));
|
14
14
|
var _columnStatesManager = require("./columnStatesManager");
|
15
|
-
var _shortcutContexts = require("../../shortcutContexts");
|
16
15
|
var _utils = require("./utils");
|
17
16
|
var _domHelpers = require("./domHelpers");
|
18
17
|
var _rootComparator = require("./rootComparator");
|
@@ -250,17 +249,12 @@ class ColumnSorting extends _base.BasePlugin {
|
|
250
249
|
if (highlight.row === -1 && highlight.col >= 0) {
|
251
250
|
this.sort(this.getColumnNextConfig(highlight.col));
|
252
251
|
}
|
253
|
-
|
254
|
-
// prevent default Enter behavior (move to the next row within a selection range)
|
255
|
-
return false;
|
256
252
|
},
|
257
253
|
runOnlyIf: () => {
|
258
254
|
var _this$hot$getSelected;
|
259
255
|
const highlight = (_this$hot$getSelected = this.hot.getSelectedRangeLast()) === null || _this$hot$getSelected === void 0 ? void 0 : _this$hot$getSelected.highlight;
|
260
256
|
return highlight && this.hot.selection.isCellVisible(highlight) && highlight.isHeader();
|
261
257
|
},
|
262
|
-
relativeToGroup: _shortcutContexts.EDITOR_EDIT_GROUP,
|
263
|
-
position: 'before',
|
264
258
|
group: SHORTCUTS_GROUP
|
265
259
|
});
|
266
260
|
}
|
@@ -15,7 +15,6 @@ import { BasePlugin } from "../base/index.mjs";
|
|
15
15
|
import { IndexesSequence, PhysicalIndexToValueMap as IndexToValueMap } from "../../translations/index.mjs";
|
16
16
|
import Hooks from "../../pluginHooks.mjs";
|
17
17
|
import { ColumnStatesManager } from "./columnStatesManager.mjs";
|
18
|
-
import { EDITOR_EDIT_GROUP as SHORTCUTS_GROUP_EDITOR } from "../../shortcutContexts/index.mjs";
|
19
18
|
import { HEADER_SPAN_CLASS, getNextSortOrder, areValidSortStates, getHeaderSpanElement, isFirstLevelColumnHeader, wasHeaderClickedProperly } from "./utils.mjs";
|
20
19
|
import { getClassesToRemove, getClassesToAdd } from "./domHelpers.mjs";
|
21
20
|
import { rootComparator } from "./rootComparator.mjs";
|
@@ -246,17 +245,12 @@ export class ColumnSorting extends BasePlugin {
|
|
246
245
|
if (highlight.row === -1 && highlight.col >= 0) {
|
247
246
|
this.sort(this.getColumnNextConfig(highlight.col));
|
248
247
|
}
|
249
|
-
|
250
|
-
// prevent default Enter behavior (move to the next row within a selection range)
|
251
|
-
return false;
|
252
248
|
},
|
253
249
|
runOnlyIf: () => {
|
254
250
|
var _this$hot$getSelected;
|
255
251
|
const highlight = (_this$hot$getSelected = this.hot.getSelectedRangeLast()) === null || _this$hot$getSelected === void 0 ? void 0 : _this$hot$getSelected.highlight;
|
256
252
|
return highlight && this.hot.selection.isCellVisible(highlight) && highlight.isHeader();
|
257
253
|
},
|
258
|
-
relativeToGroup: SHORTCUTS_GROUP_EDITOR,
|
259
|
-
position: 'before',
|
260
254
|
group: SHORTCUTS_GROUP
|
261
255
|
});
|
262
256
|
}
|
@@ -9,26 +9,10 @@ exports.createDefaultShortcutsList = createDefaultShortcutsList;
|
|
9
9
|
* @returns {KeyboardShortcut[]}
|
10
10
|
*/
|
11
11
|
function createDefaultShortcutsList(menu) {
|
12
|
-
const {
|
13
|
-
hot,
|
14
|
-
hotMenu
|
15
|
-
} = menu;
|
16
12
|
return [{
|
17
|
-
keys: [['Control/Meta', 'A']],
|
18
|
-
forwardToContext: hot.getShortcutManager().getContext('grid'),
|
13
|
+
keys: [['Tab'], ['Shift', 'Tab'], ['Control/Meta', 'A']],
|
14
|
+
forwardToContext: menu.hot.getShortcutManager().getContext('grid'),
|
19
15
|
callback: () => menu.close(true)
|
20
|
-
}, {
|
21
|
-
keys: [['Tab'], ['Shift', 'Tab']],
|
22
|
-
callback: (event, keys) => {
|
23
|
-
const settings = hot.getSettings();
|
24
|
-
const tabMoves = typeof settings.tabMoves === 'function' ? settings.tabMoves(event) : settings.tabMoves;
|
25
|
-
if (keys.includes('shift')) {
|
26
|
-
hot.selection.transformStart(-tabMoves.row, -tabMoves.col);
|
27
|
-
} else {
|
28
|
-
hot.selection.transformStart(tabMoves.row, tabMoves.col);
|
29
|
-
}
|
30
|
-
menu.close(true);
|
31
|
-
}
|
32
16
|
}, {
|
33
17
|
keys: [['Escape']],
|
34
18
|
callback: () => menu.close()
|
@@ -41,7 +25,7 @@ function createDefaultShortcutsList(menu) {
|
|
41
25
|
}, {
|
42
26
|
keys: [['ArrowRight']],
|
43
27
|
callback: () => {
|
44
|
-
const selection = hotMenu.getSelectedLast();
|
28
|
+
const selection = menu.hotMenu.getSelectedLast();
|
45
29
|
if (selection) {
|
46
30
|
const subMenu = menu.openSubMenu(selection[0]);
|
47
31
|
if (subMenu) {
|
@@ -52,7 +36,7 @@ function createDefaultShortcutsList(menu) {
|
|
52
36
|
}, {
|
53
37
|
keys: [['ArrowLeft']],
|
54
38
|
callback: () => {
|
55
|
-
const selection = hotMenu.getSelectedLast();
|
39
|
+
const selection = menu.hotMenu.getSelectedLast();
|
56
40
|
if (selection && menu.isSubMenu()) {
|
57
41
|
menu.close();
|
58
42
|
if (menu.isSubMenu()) {
|
@@ -69,11 +53,11 @@ function createDefaultShortcutsList(menu) {
|
|
69
53
|
}, {
|
70
54
|
keys: [['Enter'], ['Space']],
|
71
55
|
callback: event => {
|
72
|
-
const selection = hotMenu.getSelectedLast();
|
56
|
+
const selection = menu.hotMenu.getSelectedLast();
|
73
57
|
if (!selection) {
|
74
58
|
return;
|
75
59
|
}
|
76
|
-
if (hotMenu.getSourceDataAtRow(selection[0]).submenu) {
|
60
|
+
if (menu.hotMenu.getSourceDataAtRow(selection[0]).submenu) {
|
77
61
|
menu.openSubMenu(selection[0]).getNavigator().toFirstItem();
|
78
62
|
} else {
|
79
63
|
menu.executeCommand(event);
|
@@ -83,9 +67,9 @@ function createDefaultShortcutsList(menu) {
|
|
83
67
|
}, {
|
84
68
|
keys: [['PageUp']],
|
85
69
|
callback: () => {
|
86
|
-
const selection = hotMenu.getSelectedLast();
|
70
|
+
const selection = menu.hotMenu.getSelectedLast();
|
87
71
|
if (selection) {
|
88
|
-
hotMenu.selection.transformStart(-hotMenu.countVisibleRows(), 0);
|
72
|
+
menu.hotMenu.selection.transformStart(-menu.hotMenu.countVisibleRows(), 0);
|
89
73
|
} else {
|
90
74
|
menu.getNavigator().toFirstItem();
|
91
75
|
}
|
@@ -93,9 +77,9 @@ function createDefaultShortcutsList(menu) {
|
|
93
77
|
}, {
|
94
78
|
keys: [['PageDown']],
|
95
79
|
callback: () => {
|
96
|
-
const selection = hotMenu.getSelectedLast();
|
80
|
+
const selection = menu.hotMenu.getSelectedLast();
|
97
81
|
if (selection) {
|
98
|
-
hotMenu.selection.transformStart(hotMenu.countVisibleRows(), 0);
|
82
|
+
menu.hotMenu.selection.transformStart(menu.hotMenu.countVisibleRows(), 0);
|
99
83
|
} else {
|
100
84
|
menu.getNavigator().toLastItem();
|
101
85
|
}
|
@@ -5,26 +5,10 @@
|
|
5
5
|
* @returns {KeyboardShortcut[]}
|
6
6
|
*/
|
7
7
|
export function createDefaultShortcutsList(menu) {
|
8
|
-
const {
|
9
|
-
hot,
|
10
|
-
hotMenu
|
11
|
-
} = menu;
|
12
8
|
return [{
|
13
|
-
keys: [['Control/Meta', 'A']],
|
14
|
-
forwardToContext: hot.getShortcutManager().getContext('grid'),
|
9
|
+
keys: [['Tab'], ['Shift', 'Tab'], ['Control/Meta', 'A']],
|
10
|
+
forwardToContext: menu.hot.getShortcutManager().getContext('grid'),
|
15
11
|
callback: () => menu.close(true)
|
16
|
-
}, {
|
17
|
-
keys: [['Tab'], ['Shift', 'Tab']],
|
18
|
-
callback: (event, keys) => {
|
19
|
-
const settings = hot.getSettings();
|
20
|
-
const tabMoves = typeof settings.tabMoves === 'function' ? settings.tabMoves(event) : settings.tabMoves;
|
21
|
-
if (keys.includes('shift')) {
|
22
|
-
hot.selection.transformStart(-tabMoves.row, -tabMoves.col);
|
23
|
-
} else {
|
24
|
-
hot.selection.transformStart(tabMoves.row, tabMoves.col);
|
25
|
-
}
|
26
|
-
menu.close(true);
|
27
|
-
}
|
28
12
|
}, {
|
29
13
|
keys: [['Escape']],
|
30
14
|
callback: () => menu.close()
|
@@ -37,7 +21,7 @@ export function createDefaultShortcutsList(menu) {
|
|
37
21
|
}, {
|
38
22
|
keys: [['ArrowRight']],
|
39
23
|
callback: () => {
|
40
|
-
const selection = hotMenu.getSelectedLast();
|
24
|
+
const selection = menu.hotMenu.getSelectedLast();
|
41
25
|
if (selection) {
|
42
26
|
const subMenu = menu.openSubMenu(selection[0]);
|
43
27
|
if (subMenu) {
|
@@ -48,7 +32,7 @@ export function createDefaultShortcutsList(menu) {
|
|
48
32
|
}, {
|
49
33
|
keys: [['ArrowLeft']],
|
50
34
|
callback: () => {
|
51
|
-
const selection = hotMenu.getSelectedLast();
|
35
|
+
const selection = menu.hotMenu.getSelectedLast();
|
52
36
|
if (selection && menu.isSubMenu()) {
|
53
37
|
menu.close();
|
54
38
|
if (menu.isSubMenu()) {
|
@@ -65,11 +49,11 @@ export function createDefaultShortcutsList(menu) {
|
|
65
49
|
}, {
|
66
50
|
keys: [['Enter'], ['Space']],
|
67
51
|
callback: event => {
|
68
|
-
const selection = hotMenu.getSelectedLast();
|
52
|
+
const selection = menu.hotMenu.getSelectedLast();
|
69
53
|
if (!selection) {
|
70
54
|
return;
|
71
55
|
}
|
72
|
-
if (hotMenu.getSourceDataAtRow(selection[0]).submenu) {
|
56
|
+
if (menu.hotMenu.getSourceDataAtRow(selection[0]).submenu) {
|
73
57
|
menu.openSubMenu(selection[0]).getNavigator().toFirstItem();
|
74
58
|
} else {
|
75
59
|
menu.executeCommand(event);
|
@@ -79,9 +63,9 @@ export function createDefaultShortcutsList(menu) {
|
|
79
63
|
}, {
|
80
64
|
keys: [['PageUp']],
|
81
65
|
callback: () => {
|
82
|
-
const selection = hotMenu.getSelectedLast();
|
66
|
+
const selection = menu.hotMenu.getSelectedLast();
|
83
67
|
if (selection) {
|
84
|
-
hotMenu.selection.transformStart(-hotMenu.countVisibleRows(), 0);
|
68
|
+
menu.hotMenu.selection.transformStart(-menu.hotMenu.countVisibleRows(), 0);
|
85
69
|
} else {
|
86
70
|
menu.getNavigator().toFirstItem();
|
87
71
|
}
|
@@ -89,9 +73,9 @@ export function createDefaultShortcutsList(menu) {
|
|
89
73
|
}, {
|
90
74
|
keys: [['PageDown']],
|
91
75
|
callback: () => {
|
92
|
-
const selection = hotMenu.getSelectedLast();
|
76
|
+
const selection = menu.hotMenu.getSelectedLast();
|
93
77
|
if (selection) {
|
94
|
-
hotMenu.selection.transformStart(hotMenu.countVisibleRows(), 0);
|
78
|
+
menu.hotMenu.selection.transformStart(menu.hotMenu.countVisibleRows(), 0);
|
95
79
|
} else {
|
96
80
|
menu.getNavigator().toLastItem();
|
97
81
|
}
|
@@ -1031,10 +1031,8 @@ function _onAfterIsMultipleSelection2(isMultiple) {
|
|
1031
1031
|
if (isMultiple) {
|
1032
1032
|
const mergedCells = this.mergedCellsCollection.mergedCells;
|
1033
1033
|
const selectionRange = this.hot.getSelectedRangeLast();
|
1034
|
-
const topStartCoords = selectionRange.getTopStartCorner();
|
1035
|
-
const bottomEndCoords = selectionRange.getBottomEndCorner();
|
1036
1034
|
for (let group = 0; group < mergedCells.length; group += 1) {
|
1037
|
-
if (
|
1035
|
+
if (selectionRange.from.row === mergedCells[group].row && selectionRange.from.col === mergedCells[group].col && selectionRange.to.row === mergedCells[group].row + mergedCells[group].rowspan - 1 && selectionRange.to.col === mergedCells[group].col + mergedCells[group].colspan - 1) {
|
1038
1036
|
return false;
|
1039
1037
|
}
|
1040
1038
|
}
|
@@ -1026,10 +1026,8 @@ function _onAfterIsMultipleSelection2(isMultiple) {
|
|
1026
1026
|
if (isMultiple) {
|
1027
1027
|
const mergedCells = this.mergedCellsCollection.mergedCells;
|
1028
1028
|
const selectionRange = this.hot.getSelectedRangeLast();
|
1029
|
-
const topStartCoords = selectionRange.getTopStartCorner();
|
1030
|
-
const bottomEndCoords = selectionRange.getBottomEndCorner();
|
1031
1029
|
for (let group = 0; group < mergedCells.length; group += 1) {
|
1032
|
-
if (
|
1030
|
+
if (selectionRange.from.row === mergedCells[group].row && selectionRange.from.col === mergedCells[group].col && selectionRange.to.row === mergedCells[group].row + mergedCells[group].rowspan - 1 && selectionRange.to.col === mergedCells[group].col + mergedCells[group].colspan - 1) {
|
1033
1031
|
return false;
|
1034
1032
|
}
|
1035
1033
|
}
|
@@ -9,7 +9,6 @@ var _element = require("../../helpers/dom/element");
|
|
9
9
|
var _rootComparator = require("./rootComparator");
|
10
10
|
var _utils2 = require("./utils");
|
11
11
|
var _domHelpers = require("./domHelpers");
|
12
|
-
var _shortcutContexts = require("../../shortcutContexts");
|
13
12
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
14
13
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
15
14
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
@@ -131,17 +130,12 @@ class MultiColumnSorting extends _columnSorting.ColumnSorting {
|
|
131
130
|
if (highlight.row === -1 && highlight.col >= 0) {
|
132
131
|
this.sort(this.getNextSortConfig(highlight.col, _columnSorting.APPEND_COLUMN_CONFIG_STRATEGY));
|
133
132
|
}
|
134
|
-
|
135
|
-
// prevent default Enter behavior (move to the next row within a selection range)
|
136
|
-
return false;
|
137
133
|
},
|
138
134
|
runOnlyIf: () => {
|
139
135
|
var _this$hot$getSelected;
|
140
136
|
const highlight = (_this$hot$getSelected = this.hot.getSelectedRangeLast()) === null || _this$hot$getSelected === void 0 ? void 0 : _this$hot$getSelected.highlight;
|
141
137
|
return highlight && this.hot.selection.isCellVisible(highlight) && highlight.isHeader();
|
142
138
|
},
|
143
|
-
relativeToGroup: _shortcutContexts.EDITOR_EDIT_GROUP,
|
144
|
-
position: 'before',
|
145
139
|
group: SHORTCUTS_GROUP
|
146
140
|
});
|
147
141
|
}
|
@@ -9,7 +9,6 @@ import { addClass, removeClass } from "../../helpers/dom/element.mjs";
|
|
9
9
|
import { rootComparator } from "./rootComparator.mjs";
|
10
10
|
import { warnAboutPluginsConflict } from "./utils.mjs";
|
11
11
|
import { getClassesToAdd, getClassesToRemove } from "./domHelpers.mjs";
|
12
|
-
import { EDITOR_EDIT_GROUP as SHORTCUTS_GROUP_EDITOR } from "../../shortcutContexts/index.mjs";
|
13
12
|
export const PLUGIN_KEY = 'multiColumnSorting';
|
14
13
|
export const PLUGIN_PRIORITY = 170;
|
15
14
|
const CONFLICTED_PLUGIN_KEY = 'columnSorting';
|
@@ -128,17 +127,12 @@ export class MultiColumnSorting extends ColumnSorting {
|
|
128
127
|
if (highlight.row === -1 && highlight.col >= 0) {
|
129
128
|
this.sort(this.getNextSortConfig(highlight.col, APPEND_COLUMN_CONFIG_STRATEGY));
|
130
129
|
}
|
131
|
-
|
132
|
-
// prevent default Enter behavior (move to the next row within a selection range)
|
133
|
-
return false;
|
134
130
|
},
|
135
131
|
runOnlyIf: () => {
|
136
132
|
var _this$hot$getSelected;
|
137
133
|
const highlight = (_this$hot$getSelected = this.hot.getSelectedRangeLast()) === null || _this$hot$getSelected === void 0 ? void 0 : _this$hot$getSelected.highlight;
|
138
134
|
return highlight && this.hot.selection.isCellVisible(highlight) && highlight.isHeader();
|
139
135
|
},
|
140
|
-
relativeToGroup: SHORTCUTS_GROUP_EDITOR,
|
141
|
-
position: 'before',
|
142
136
|
group: SHORTCUTS_GROUP
|
143
137
|
});
|
144
138
|
}
|
@@ -364,7 +364,6 @@ class NestedHeaders extends _base.BasePlugin {
|
|
364
364
|
return _classPrivateMethodGet(_this, _onModifyTransformStart, _onModifyTransformStart2).call(_this, ...args);
|
365
365
|
});
|
366
366
|
this.addHook('afterSelection', () => _classPrivateMethodGet(this, _updateFocusHighlightPosition, _updateFocusHighlightPosition2).call(this));
|
367
|
-
this.addHook('afterSelectionFocusSet', () => _classPrivateMethodGet(this, _updateFocusHighlightPosition, _updateFocusHighlightPosition2).call(this));
|
368
367
|
this.addHook('beforeViewportScrollHorizontally', function () {
|
369
368
|
for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
|
370
369
|
args[_key8] = arguments[_key8];
|
@@ -360,7 +360,6 @@ export class NestedHeaders extends BasePlugin {
|
|
360
360
|
return _classPrivateMethodGet(_this, _onModifyTransformStart, _onModifyTransformStart2).call(_this, ...args);
|
361
361
|
});
|
362
362
|
this.addHook('afterSelection', () => _classPrivateMethodGet(this, _updateFocusHighlightPosition, _updateFocusHighlightPosition2).call(this));
|
363
|
-
this.addHook('afterSelectionFocusSet', () => _classPrivateMethodGet(this, _updateFocusHighlightPosition, _updateFocusHighlightPosition2).call(this));
|
364
363
|
this.addHook('beforeViewportScrollHorizontally', function () {
|
365
364
|
for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
|
366
365
|
args[_key8] = arguments[_key8];
|
@@ -11,7 +11,6 @@ var _contextMenu = _interopRequireDefault(require("./ui/contextMenu"));
|
|
11
11
|
var _console = require("../../helpers/console");
|
12
12
|
var _data = require("../../helpers/data");
|
13
13
|
var _translations = require("../../translations");
|
14
|
-
var _shortcutContexts = require("../../shortcutContexts");
|
15
14
|
var _rowMoveController = _interopRequireDefault(require("./utils/rowMoveController"));
|
16
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
17
16
|
function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
|
@@ -401,18 +400,13 @@ class NestedRows extends _base.BasePlugin {
|
|
401
400
|
this.collapsingUI.collapseChildren(row);
|
402
401
|
}
|
403
402
|
}
|
404
|
-
|
405
|
-
// prevent default Enter behavior (move to the next row within a selection range)
|
406
|
-
return false;
|
407
403
|
},
|
408
404
|
runOnlyIf: () => {
|
409
405
|
var _this$hot$getSelected;
|
410
406
|
const highlight = (_this$hot$getSelected = this.hot.getSelectedRangeLast()) === null || _this$hot$getSelected === void 0 ? void 0 : _this$hot$getSelected.highlight;
|
411
407
|
return highlight && this.hot.selection.isCellVisible(highlight) && highlight.isHeader();
|
412
408
|
},
|
413
|
-
group: SHORTCUTS_GROUP
|
414
|
-
relativeToGroup: _shortcutContexts.EDITOR_EDIT_GROUP,
|
415
|
-
position: 'before'
|
409
|
+
group: SHORTCUTS_GROUP
|
416
410
|
});
|
417
411
|
}
|
418
412
|
|
@@ -20,7 +20,6 @@ import ContextMenuUI from "./ui/contextMenu.mjs";
|
|
20
20
|
import { error } from "../../helpers/console.mjs";
|
21
21
|
import { isArrayOfObjects } from "../../helpers/data.mjs";
|
22
22
|
import { TrimmingMap } from "../../translations/index.mjs";
|
23
|
-
import { EDITOR_EDIT_GROUP as SHORTCUTS_GROUP_EDITOR } from "../../shortcutContexts/index.mjs";
|
24
23
|
import RowMoveController from "./utils/rowMoveController.mjs";
|
25
24
|
export const PLUGIN_KEY = 'nestedRows';
|
26
25
|
export const PLUGIN_PRIORITY = 300;
|
@@ -397,18 +396,13 @@ export class NestedRows extends BasePlugin {
|
|
397
396
|
this.collapsingUI.collapseChildren(row);
|
398
397
|
}
|
399
398
|
}
|
400
|
-
|
401
|
-
// prevent default Enter behavior (move to the next row within a selection range)
|
402
|
-
return false;
|
403
399
|
},
|
404
400
|
runOnlyIf: () => {
|
405
401
|
var _this$hot$getSelected;
|
406
402
|
const highlight = (_this$hot$getSelected = this.hot.getSelectedRangeLast()) === null || _this$hot$getSelected === void 0 ? void 0 : _this$hot$getSelected.highlight;
|
407
403
|
return highlight && this.hot.selection.isCellVisible(highlight) && highlight.isHeader();
|
408
404
|
},
|
409
|
-
group: SHORTCUTS_GROUP
|
410
|
-
relativeToGroup: SHORTCUTS_GROUP_EDITOR,
|
411
|
-
position: 'before'
|
405
|
+
group: SHORTCUTS_GROUP
|
412
406
|
});
|
413
407
|
}
|
414
408
|
|
@@ -139,9 +139,7 @@ function checkboxRenderer(hotInstance, TD, row, col, prop, value, cellProperties
|
|
139
139
|
const shortcutManager = hotInstance.getShortcutManager();
|
140
140
|
const gridContext = shortcutManager.getContext('grid');
|
141
141
|
const config = {
|
142
|
-
group: SHORTCUTS_GROUP
|
143
|
-
relativeToGroup: _shortcutContexts.EDITOR_EDIT_GROUP,
|
144
|
-
position: 'before'
|
142
|
+
group: SHORTCUTS_GROUP
|
145
143
|
};
|
146
144
|
gridContext.addShortcuts([{
|
147
145
|
keys: [['space']],
|
@@ -161,7 +159,9 @@ function checkboxRenderer(hotInstance, TD, row, col, prop, value, cellProperties
|
|
161
159
|
callback: () => {
|
162
160
|
changeSelectedCheckboxesState(true);
|
163
161
|
return !areSelectedCheckboxCells(); // False blocks next action associated with the keyboard shortcut.
|
164
|
-
}
|
162
|
+
},
|
163
|
+
relativeToGroup: _shortcutContexts.EDITOR_EDIT_GROUP,
|
164
|
+
position: 'before'
|
165
165
|
}], config);
|
166
166
|
}
|
167
167
|
|
@@ -134,9 +134,7 @@ export function checkboxRenderer(hotInstance, TD, row, col, prop, value, cellPro
|
|
134
134
|
const shortcutManager = hotInstance.getShortcutManager();
|
135
135
|
const gridContext = shortcutManager.getContext('grid');
|
136
136
|
const config = {
|
137
|
-
group: SHORTCUTS_GROUP
|
138
|
-
relativeToGroup: SHORTCUTS_GROUP_EDITOR,
|
139
|
-
position: 'before'
|
137
|
+
group: SHORTCUTS_GROUP
|
140
138
|
};
|
141
139
|
gridContext.addShortcuts([{
|
142
140
|
keys: [['space']],
|
@@ -156,7 +154,9 @@ export function checkboxRenderer(hotInstance, TD, row, col, prop, value, cellPro
|
|
156
154
|
callback: () => {
|
157
155
|
changeSelectedCheckboxesState(true);
|
158
156
|
return !areSelectedCheckboxCells(); // False blocks next action associated with the keyboard shortcut.
|
159
|
-
}
|
157
|
+
},
|
158
|
+
relativeToGroup: SHORTCUTS_GROUP_EDITOR,
|
159
|
+
position: 'before'
|
160
160
|
}], config);
|
161
161
|
}
|
162
162
|
|