handsontable 0.0.0-next-5787854-20240205 → 0.0.0-next-7a416a0-20240206
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 +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.js +14 -0
- package/core.mjs +14 -0
- package/dist/handsontable.css +2 -2
- package/dist/handsontable.full.css +2 -2
- package/dist/handsontable.full.js +1260 -1009
- package/dist/handsontable.full.min.css +2 -2
- package/dist/handsontable.full.min.js +48 -48
- package/dist/handsontable.js +1262 -1011
- package/dist/handsontable.min.css +2 -2
- package/dist/handsontable.min.js +32 -32
- 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/mergeCells.js +3 -1
- package/plugins/mergeCells/mergeCells.mjs +3 -1
- 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 +4 -4
- package/renderers/checkboxRenderer/checkboxRenderer.mjs +4 -4
- package/selection/selection.js +144 -30
- package/selection/selection.mjs +143 -29
- package/selection/transformation.js +18 -27
- package/selection/transformation.mjs +18 -27
- package/shortcutContexts/commands/editor/open.js +14 -0
- package/shortcutContexts/commands/editor/open.mjs +14 -0
- package/shortcutContexts/commands/moveCellSelection/inlineEnd.js +5 -1
- package/shortcutContexts/commands/moveCellSelection/inlineEnd.mjs +5 -1
- package/shortcutContexts/commands/moveCellSelection/inlineStart.js +5 -1
- package/shortcutContexts/commands/moveCellSelection/inlineStart.mjs +5 -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/base.js
CHANGED
@@ -45,8 +45,8 @@ Handsontable.hooks = _pluginHooks.default.getSingleton();
|
|
45
45
|
Handsontable.CellCoords = _src.CellCoords;
|
46
46
|
Handsontable.CellRange = _src.CellRange;
|
47
47
|
Handsontable.packageName = 'handsontable';
|
48
|
-
Handsontable.buildDate = "
|
49
|
-
Handsontable.version = "0.0.0-next-
|
48
|
+
Handsontable.buildDate = "06/02/2024 09:23:30";
|
49
|
+
Handsontable.version = "0.0.0-next-7a416a0-20240206";
|
50
50
|
Handsontable.languages = {
|
51
51
|
dictionaryKeys: _registry.dictionaryKeys,
|
52
52
|
getLanguageDictionary: _registry.getLanguageDictionary,
|
package/base.mjs
CHANGED
@@ -35,8 +35,8 @@ Handsontable.hooks = Hooks.getSingleton();
|
|
35
35
|
Handsontable.CellCoords = CellCoords;
|
36
36
|
Handsontable.CellRange = CellRange;
|
37
37
|
Handsontable.packageName = 'handsontable';
|
38
|
-
Handsontable.buildDate = "
|
39
|
-
Handsontable.version = "0.0.0-next-
|
38
|
+
Handsontable.buildDate = "06/02/2024 09:23:36";
|
39
|
+
Handsontable.version = "0.0.0-next-7a416a0-20240206";
|
40
40
|
Handsontable.languages = {
|
41
41
|
dictionaryKeys,
|
42
42
|
getLanguageDictionary,
|
@@ -4,6 +4,7 @@ exports.__esModule = true;
|
|
4
4
|
exports.createViewportScroller = createViewportScroller;
|
5
5
|
var _columnHeaderScroll = require("./scrollStrategies/columnHeaderScroll");
|
6
6
|
var _cornerHeaderScroll = require("./scrollStrategies/cornerHeaderScroll");
|
7
|
+
var _focusScroll = require("./scrollStrategies/focusScroll");
|
7
8
|
var _multipleScroll = require("./scrollStrategies/multipleScroll");
|
8
9
|
var _noncontiguousScroll = require("./scrollStrategies/noncontiguousScroll");
|
9
10
|
var _rowHeaderScroll = require("./scrollStrategies/rowHeaderScroll");
|
@@ -46,7 +47,9 @@ function createViewportScroller(hot) {
|
|
46
47
|
return;
|
47
48
|
}
|
48
49
|
let scrollStrategy;
|
49
|
-
if (selection.
|
50
|
+
if (selection.isFocusSelectionChanged()) {
|
51
|
+
scrollStrategy = (0, _focusScroll.focusScrollStrategy)(hot);
|
52
|
+
} else if (selection.isSelectedByCorner()) {
|
50
53
|
scrollStrategy = (0, _cornerHeaderScroll.cornerHeaderScrollStrategy)(hot);
|
51
54
|
} else if (selection.isSelectedByRowHeader()) {
|
52
55
|
scrollStrategy = (0, _rowHeaderScroll.rowHeaderScrollStrategy)(hot);
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { columnHeaderScrollStrategy } from "./scrollStrategies/columnHeaderScroll.mjs";
|
2
2
|
import { cornerHeaderScrollStrategy } from "./scrollStrategies/cornerHeaderScroll.mjs";
|
3
|
+
import { focusScrollStrategy } from "./scrollStrategies/focusScroll.mjs";
|
3
4
|
import { multipleScrollStrategy } from "./scrollStrategies/multipleScroll.mjs";
|
4
5
|
import { noncontiguousScrollStrategy } from "./scrollStrategies/noncontiguousScroll.mjs";
|
5
6
|
import { rowHeaderScrollStrategy } from "./scrollStrategies/rowHeaderScroll.mjs";
|
@@ -42,7 +43,9 @@ export function createViewportScroller(hot) {
|
|
42
43
|
return;
|
43
44
|
}
|
44
45
|
let scrollStrategy;
|
45
|
-
if (selection.
|
46
|
+
if (selection.isFocusSelectionChanged()) {
|
47
|
+
scrollStrategy = focusScrollStrategy(hot);
|
48
|
+
} else if (selection.isSelectedByCorner()) {
|
46
49
|
scrollStrategy = cornerHeaderScrollStrategy(hot);
|
47
50
|
} else if (selection.isSelectedByRowHeader()) {
|
48
51
|
scrollStrategy = rowHeaderScrollStrategy(hot);
|
@@ -0,0 +1,15 @@
|
|
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
|
+
}
|
@@ -0,0 +1,11 @@
|
|
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
|
+
}
|
package/core.js
CHANGED
@@ -284,6 +284,12 @@ function Core(rootElement, userSettings) {
|
|
284
284
|
countRenderableRows: () => this.view.countRenderableRows(),
|
285
285
|
countRowHeaders: () => this.countRowHeaders(),
|
286
286
|
countColHeaders: () => this.countColHeaders(),
|
287
|
+
countRenderableRowsInRange: function () {
|
288
|
+
return _this.view.countRenderableRowsInRange(...arguments);
|
289
|
+
},
|
290
|
+
countRenderableColumnsInRange: function () {
|
291
|
+
return _this.view.countRenderableColumnsInRange(...arguments);
|
292
|
+
},
|
287
293
|
getShortcutManager: () => instance.getShortcutManager(),
|
288
294
|
createCellCoords: (row, column) => instance._createCellCoords(row, column),
|
289
295
|
createCellRange: (highlight, from, to) => instance._createCellRange(highlight, from, to),
|
@@ -339,6 +345,14 @@ function Core(rootElement, userSettings) {
|
|
339
345
|
}
|
340
346
|
this._refreshBorders(null);
|
341
347
|
});
|
348
|
+
this.selection.addLocalHook('afterSetFocus', cellCoords => {
|
349
|
+
const preventScrolling = (0, _object.createObjectPropListener)(false);
|
350
|
+
this.runHooks('afterSelectionFocusSet', cellCoords.row, cellCoords.col, preventScrolling);
|
351
|
+
if (!preventScrolling.isTouched() || preventScrolling.isTouched() && !preventScrolling.value) {
|
352
|
+
viewportScroller.scrollTo(cellCoords);
|
353
|
+
}
|
354
|
+
this._refreshBorders(null);
|
355
|
+
});
|
342
356
|
this.selection.addLocalHook('afterSelectionFinished', cellRanges => {
|
343
357
|
const selectionLayerLevel = cellRanges.length - 1;
|
344
358
|
const {
|
package/core.mjs
CHANGED
@@ -279,6 +279,12 @@ export default function Core(rootElement, userSettings) {
|
|
279
279
|
countRenderableRows: () => this.view.countRenderableRows(),
|
280
280
|
countRowHeaders: () => this.countRowHeaders(),
|
281
281
|
countColHeaders: () => this.countColHeaders(),
|
282
|
+
countRenderableRowsInRange: function () {
|
283
|
+
return _this.view.countRenderableRowsInRange(...arguments);
|
284
|
+
},
|
285
|
+
countRenderableColumnsInRange: function () {
|
286
|
+
return _this.view.countRenderableColumnsInRange(...arguments);
|
287
|
+
},
|
282
288
|
getShortcutManager: () => instance.getShortcutManager(),
|
283
289
|
createCellCoords: (row, column) => instance._createCellCoords(row, column),
|
284
290
|
createCellRange: (highlight, from, to) => instance._createCellRange(highlight, from, to),
|
@@ -334,6 +340,14 @@ export default function Core(rootElement, userSettings) {
|
|
334
340
|
}
|
335
341
|
this._refreshBorders(null);
|
336
342
|
});
|
343
|
+
this.selection.addLocalHook('afterSetFocus', cellCoords => {
|
344
|
+
const preventScrolling = createObjectPropListener(false);
|
345
|
+
this.runHooks('afterSelectionFocusSet', cellCoords.row, cellCoords.col, preventScrolling);
|
346
|
+
if (!preventScrolling.isTouched() || preventScrolling.isTouched() && !preventScrolling.value) {
|
347
|
+
viewportScroller.scrollTo(cellCoords);
|
348
|
+
}
|
349
|
+
this._refreshBorders(null);
|
350
|
+
});
|
337
351
|
this.selection.addLocalHook('afterSelectionFinished', cellRanges => {
|
338
352
|
const selectionLayerLevel = cellRanges.length - 1;
|
339
353
|
const {
|
package/dist/handsontable.css
CHANGED
@@ -25,8 +25,8 @@
|
|
25
25
|
* INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER ARISING FROM
|
26
26
|
* USE OR INABILITY TO USE THIS SOFTWARE.
|
27
27
|
*
|
28
|
-
* Version: 0.0.0-next-
|
29
|
-
* Release date: 16/01/2024 (built at
|
28
|
+
* Version: 0.0.0-next-7a416a0-20240206
|
29
|
+
* Release date: 16/01/2024 (built at 06/02/2024 09:23:41)
|
30
30
|
*/
|
31
31
|
/**
|
32
32
|
* Fix for bootstrap styles
|
@@ -25,8 +25,8 @@
|
|
25
25
|
* INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER ARISING FROM
|
26
26
|
* USE OR INABILITY TO USE THIS SOFTWARE.
|
27
27
|
*
|
28
|
-
* Version: 0.0.0-next-
|
29
|
-
* Release date: 16/01/2024 (built at
|
28
|
+
* Version: 0.0.0-next-7a416a0-20240206
|
29
|
+
* Release date: 16/01/2024 (built at 06/02/2024 09:23:41)
|
30
30
|
*/
|
31
31
|
/**
|
32
32
|
* Fix for bootstrap styles
|