handsontable 0.0.0-next-7a416a0-20240206 → 0.0.0-next-de0dd59-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
@@ -8,9 +8,9 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
8
8
|
function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
|
9
9
|
function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
|
10
10
|
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
11
|
-
function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
|
12
11
|
function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
|
13
12
|
function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
|
13
|
+
function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
|
14
14
|
function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
|
15
15
|
function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
|
16
16
|
function _classApplyDescriptorSet(receiver, descriptor, value) { if (descriptor.set) { descriptor.set.call(receiver, value); } else { if (!descriptor.writable) { throw new TypeError("attempted to set read only private field"); } descriptor.value = value; } }
|
@@ -32,6 +32,7 @@ function _classApplyDescriptorSet(receiver, descriptor, value) { if (descriptor.
|
|
32
32
|
var _range = /*#__PURE__*/new WeakMap();
|
33
33
|
var _options = /*#__PURE__*/new WeakMap();
|
34
34
|
var _offset = /*#__PURE__*/new WeakMap();
|
35
|
+
var _setOffsetSize = /*#__PURE__*/new WeakSet();
|
35
36
|
var _clampCoords = /*#__PURE__*/new WeakSet();
|
36
37
|
var _getTableSize = /*#__PURE__*/new WeakSet();
|
37
38
|
var _visualToZeroBasedCoords = /*#__PURE__*/new WeakSet();
|
@@ -66,6 +67,13 @@ class Transformation {
|
|
66
67
|
* @returns {{rowDir: 1|0|-1, colDir: 1|0|-1}}
|
67
68
|
*/
|
68
69
|
_classPrivateMethodInitSpec(this, _clampCoords);
|
70
|
+
/**
|
71
|
+
* Sets the additional offset in table size that may occur when the `navigableHeaders` option
|
72
|
+
* is enabled.
|
73
|
+
*
|
74
|
+
* @param {{x: number, y: number}} offset Offset as x and y properties.
|
75
|
+
*/
|
76
|
+
_classPrivateMethodInitSpec(this, _setOffsetSize);
|
69
77
|
/**
|
70
78
|
* Instance of the SelectionRange, holder for visual coordinates applied to the table.
|
71
79
|
*
|
@@ -113,6 +121,10 @@ class Transformation {
|
|
113
121
|
*/
|
114
122
|
transformStart(rowDelta, colDelta) {
|
115
123
|
let createMissingRecords = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
124
|
+
_classPrivateMethodGet(this, _setOffsetSize, _setOffsetSize2).call(this, {
|
125
|
+
x: _classPrivateFieldGet(this, _options).navigableHeaders() ? _classPrivateFieldGet(this, _options).countRowHeaders() : 0,
|
126
|
+
y: _classPrivateFieldGet(this, _options).navigableHeaders() ? _classPrivateFieldGet(this, _options).countColHeaders() : 0
|
127
|
+
});
|
116
128
|
const delta = _classPrivateFieldGet(this, _options).createCellCoords(rowDelta, colDelta);
|
117
129
|
let visualCoords = _classPrivateFieldGet(this, _range).current().highlight;
|
118
130
|
const highlightRenderableCoords = _classPrivateFieldGet(this, _options).visualToRenderableCoords(visualCoords);
|
@@ -192,6 +204,10 @@ class Transformation {
|
|
192
204
|
* @returns {CellCoords} Visual coordinates after transformation.
|
193
205
|
*/
|
194
206
|
transformEnd(rowDelta, colDelta) {
|
207
|
+
_classPrivateMethodGet(this, _setOffsetSize, _setOffsetSize2).call(this, {
|
208
|
+
x: _classPrivateFieldGet(this, _options).navigableHeaders() ? _classPrivateFieldGet(this, _options).countRowHeaders() : 0,
|
209
|
+
y: _classPrivateFieldGet(this, _options).navigableHeaders() ? _classPrivateFieldGet(this, _options).countColHeaders() : 0
|
210
|
+
});
|
195
211
|
const delta = _classPrivateFieldGet(this, _options).createCellCoords(rowDelta, colDelta);
|
196
212
|
const cellRange = _classPrivateFieldGet(this, _range).current();
|
197
213
|
const highlightRenderableCoords = _classPrivateFieldGet(this, _options).visualToRenderableCoords(cellRange.highlight);
|
@@ -224,23 +240,16 @@ class Transformation {
|
|
224
240
|
this.runLocalHooks('afterTransformEnd', visualCoords, rowTransformDir, colTransformDir);
|
225
241
|
return visualCoords;
|
226
242
|
}
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
y
|
238
|
-
} = _ref;
|
239
|
-
_classPrivateFieldSet(this, _offset, {
|
240
|
-
x,
|
241
|
-
y
|
242
|
-
});
|
243
|
-
}
|
243
|
+
}
|
244
|
+
function _setOffsetSize2(_ref) {
|
245
|
+
let {
|
246
|
+
x,
|
247
|
+
y
|
248
|
+
} = _ref;
|
249
|
+
_classPrivateFieldSet(this, _offset, {
|
250
|
+
x,
|
251
|
+
y
|
252
|
+
});
|
244
253
|
}
|
245
254
|
function _clampCoords2(zeroBasedCoords) {
|
246
255
|
const {
|
@@ -2,9 +2,9 @@ import "core-js/modules/es.error.cause.js";
|
|
2
2
|
function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
|
3
3
|
function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
|
4
4
|
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
5
|
-
function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
|
6
5
|
function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
|
7
6
|
function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
|
7
|
+
function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
|
8
8
|
function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
|
9
9
|
function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
|
10
10
|
function _classApplyDescriptorSet(receiver, descriptor, value) { if (descriptor.set) { descriptor.set.call(receiver, value); } else { if (!descriptor.writable) { throw new TypeError("attempted to set read only private field"); } descriptor.value = value; } }
|
@@ -28,6 +28,7 @@ import localHooks from "./../mixins/localHooks.mjs";
|
|
28
28
|
var _range = /*#__PURE__*/new WeakMap();
|
29
29
|
var _options = /*#__PURE__*/new WeakMap();
|
30
30
|
var _offset = /*#__PURE__*/new WeakMap();
|
31
|
+
var _setOffsetSize = /*#__PURE__*/new WeakSet();
|
31
32
|
var _clampCoords = /*#__PURE__*/new WeakSet();
|
32
33
|
var _getTableSize = /*#__PURE__*/new WeakSet();
|
33
34
|
var _visualToZeroBasedCoords = /*#__PURE__*/new WeakSet();
|
@@ -62,6 +63,13 @@ class Transformation {
|
|
62
63
|
* @returns {{rowDir: 1|0|-1, colDir: 1|0|-1}}
|
63
64
|
*/
|
64
65
|
_classPrivateMethodInitSpec(this, _clampCoords);
|
66
|
+
/**
|
67
|
+
* Sets the additional offset in table size that may occur when the `navigableHeaders` option
|
68
|
+
* is enabled.
|
69
|
+
*
|
70
|
+
* @param {{x: number, y: number}} offset Offset as x and y properties.
|
71
|
+
*/
|
72
|
+
_classPrivateMethodInitSpec(this, _setOffsetSize);
|
65
73
|
/**
|
66
74
|
* Instance of the SelectionRange, holder for visual coordinates applied to the table.
|
67
75
|
*
|
@@ -109,6 +117,10 @@ class Transformation {
|
|
109
117
|
*/
|
110
118
|
transformStart(rowDelta, colDelta) {
|
111
119
|
let createMissingRecords = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
120
|
+
_classPrivateMethodGet(this, _setOffsetSize, _setOffsetSize2).call(this, {
|
121
|
+
x: _classPrivateFieldGet(this, _options).navigableHeaders() ? _classPrivateFieldGet(this, _options).countRowHeaders() : 0,
|
122
|
+
y: _classPrivateFieldGet(this, _options).navigableHeaders() ? _classPrivateFieldGet(this, _options).countColHeaders() : 0
|
123
|
+
});
|
112
124
|
const delta = _classPrivateFieldGet(this, _options).createCellCoords(rowDelta, colDelta);
|
113
125
|
let visualCoords = _classPrivateFieldGet(this, _range).current().highlight;
|
114
126
|
const highlightRenderableCoords = _classPrivateFieldGet(this, _options).visualToRenderableCoords(visualCoords);
|
@@ -188,6 +200,10 @@ class Transformation {
|
|
188
200
|
* @returns {CellCoords} Visual coordinates after transformation.
|
189
201
|
*/
|
190
202
|
transformEnd(rowDelta, colDelta) {
|
203
|
+
_classPrivateMethodGet(this, _setOffsetSize, _setOffsetSize2).call(this, {
|
204
|
+
x: _classPrivateFieldGet(this, _options).navigableHeaders() ? _classPrivateFieldGet(this, _options).countRowHeaders() : 0,
|
205
|
+
y: _classPrivateFieldGet(this, _options).navigableHeaders() ? _classPrivateFieldGet(this, _options).countColHeaders() : 0
|
206
|
+
});
|
191
207
|
const delta = _classPrivateFieldGet(this, _options).createCellCoords(rowDelta, colDelta);
|
192
208
|
const cellRange = _classPrivateFieldGet(this, _range).current();
|
193
209
|
const highlightRenderableCoords = _classPrivateFieldGet(this, _options).visualToRenderableCoords(cellRange.highlight);
|
@@ -220,23 +236,16 @@ class Transformation {
|
|
220
236
|
this.runLocalHooks('afterTransformEnd', visualCoords, rowTransformDir, colTransformDir);
|
221
237
|
return visualCoords;
|
222
238
|
}
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
y
|
234
|
-
} = _ref;
|
235
|
-
_classPrivateFieldSet(this, _offset, {
|
236
|
-
x,
|
237
|
-
y
|
238
|
-
});
|
239
|
-
}
|
239
|
+
}
|
240
|
+
function _setOffsetSize2(_ref) {
|
241
|
+
let {
|
242
|
+
x,
|
243
|
+
y
|
244
|
+
} = _ref;
|
245
|
+
_classPrivateFieldSet(this, _offset, {
|
246
|
+
x,
|
247
|
+
y
|
248
|
+
});
|
240
249
|
}
|
241
250
|
function _clampCoords2(zeroBasedCoords) {
|
242
251
|
const {
|
@@ -9,23 +9,9 @@ const command = exports.command = {
|
|
9
9
|
const {
|
10
10
|
highlight
|
11
11
|
} = hot.getSelectedRangeLast();
|
12
|
-
|
13
|
-
// supports for navigating with enter key when multiple cells are selected
|
14
|
-
if (hot.selection.isMultiple()) {
|
15
|
-
const settings = hot.getSettings();
|
16
|
-
const enterMoves = typeof settings.enterMoves === 'function' ? settings.enterMoves(event) : settings.enterMoves;
|
17
|
-
if (keys.includes('shift')) {
|
18
|
-
hot.selection.transformFocus(-enterMoves.row, -enterMoves.col);
|
19
|
-
} else {
|
20
|
-
hot.selection.transformFocus(enterMoves.row, enterMoves.col);
|
21
|
-
}
|
22
|
-
return;
|
23
|
-
}
|
24
12
|
if (highlight.isHeader()) {
|
25
13
|
return;
|
26
14
|
}
|
27
|
-
|
28
|
-
// supports editor opening with enter key
|
29
15
|
if (hot.getSettings().enterBeginsEditing) {
|
30
16
|
if (editorManager.cellProperties.readOnly) {
|
31
17
|
editorManager.moveSelectionAfterEnter();
|
@@ -6,23 +6,9 @@ export const command = {
|
|
6
6
|
const {
|
7
7
|
highlight
|
8
8
|
} = hot.getSelectedRangeLast();
|
9
|
-
|
10
|
-
// supports for navigating with enter key when multiple cells are selected
|
11
|
-
if (hot.selection.isMultiple()) {
|
12
|
-
const settings = hot.getSettings();
|
13
|
-
const enterMoves = typeof settings.enterMoves === 'function' ? settings.enterMoves(event) : settings.enterMoves;
|
14
|
-
if (keys.includes('shift')) {
|
15
|
-
hot.selection.transformFocus(-enterMoves.row, -enterMoves.col);
|
16
|
-
} else {
|
17
|
-
hot.selection.transformFocus(enterMoves.row, enterMoves.col);
|
18
|
-
}
|
19
|
-
return;
|
20
|
-
}
|
21
9
|
if (highlight.isHeader()) {
|
22
10
|
return;
|
23
11
|
}
|
24
|
-
|
25
|
-
// supports editor opening with enter key
|
26
12
|
if (hot.getSettings().enterBeginsEditing) {
|
27
13
|
if (editorManager.cellProperties.readOnly) {
|
28
14
|
editorManager.moveSelectionAfterEnter();
|
@@ -6,10 +6,6 @@ const command = exports.command = {
|
|
6
6
|
callback(hot, event) {
|
7
7
|
const settings = hot.getSettings();
|
8
8
|
const tabMoves = typeof settings.tabMoves === 'function' ? settings.tabMoves(event) : settings.tabMoves;
|
9
|
-
|
10
|
-
hot.selection.transformFocus(-tabMoves.row, -tabMoves.col);
|
11
|
-
} else {
|
12
|
-
hot.selection.transformStart(-tabMoves.row, -tabMoves.col);
|
13
|
-
}
|
9
|
+
hot.selection.transformStart(-tabMoves.row, -tabMoves.col);
|
14
10
|
}
|
15
11
|
};
|
@@ -3,10 +3,6 @@ export const command = {
|
|
3
3
|
callback(hot, event) {
|
4
4
|
const settings = hot.getSettings();
|
5
5
|
const tabMoves = typeof settings.tabMoves === 'function' ? settings.tabMoves(event) : settings.tabMoves;
|
6
|
-
|
7
|
-
hot.selection.transformFocus(-tabMoves.row, -tabMoves.col);
|
8
|
-
} else {
|
9
|
-
hot.selection.transformStart(-tabMoves.row, -tabMoves.col);
|
10
|
-
}
|
6
|
+
hot.selection.transformStart(-tabMoves.row, -tabMoves.col);
|
11
7
|
}
|
12
8
|
};
|
@@ -6,10 +6,6 @@ const command = exports.command = {
|
|
6
6
|
callback(hot, event) {
|
7
7
|
const settings = hot.getSettings();
|
8
8
|
const tabMoves = typeof settings.tabMoves === 'function' ? settings.tabMoves(event) : settings.tabMoves;
|
9
|
-
|
10
|
-
hot.selection.transformFocus(tabMoves.row, tabMoves.col);
|
11
|
-
} else {
|
12
|
-
hot.selection.transformStart(tabMoves.row, tabMoves.col);
|
13
|
-
}
|
9
|
+
hot.selection.transformStart(tabMoves.row, tabMoves.col);
|
14
10
|
}
|
15
11
|
};
|
@@ -3,10 +3,6 @@ export const command = {
|
|
3
3
|
callback(hot, event) {
|
4
4
|
const settings = hot.getSettings();
|
5
5
|
const tabMoves = typeof settings.tabMoves === 'function' ? settings.tabMoves(event) : settings.tabMoves;
|
6
|
-
|
7
|
-
hot.selection.transformFocus(tabMoves.row, tabMoves.col);
|
8
|
-
} else {
|
9
|
-
hot.selection.transformStart(tabMoves.row, tabMoves.col);
|
10
|
-
}
|
6
|
+
hot.selection.transformStart(tabMoves.row, tabMoves.col);
|
11
7
|
}
|
12
8
|
};
|
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: () => 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:
|
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:
|
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:
|
161
|
+
callback: () => commandsPool.moveCellSelectionInlineEnd()
|
162
162
|
}, {
|
163
163
|
keys: [['Control/Meta', 'Backspace']],
|
164
164
|
callback: () => commandsPool.scrollToFocusedCell()
|
package/shortcuts/context.js
CHANGED
@@ -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;
|
package/shortcuts/context.mjs
CHANGED
@@ -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
|
-
}
|