handsontable 0.0.0-next-ba17d71-20240207 → 0.0.0-next-60eb963-20240208
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/3rdparty/walkontable/src/cell/range.d.ts +1 -0
- package/3rdparty/walkontable/src/cell/range.js +12 -0
- package/3rdparty/walkontable/src/cell/range.mjs +12 -0
- 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 +1289 -1011
- package/dist/handsontable.full.min.css +2 -2
- package/dist/handsontable.full.min.js +151 -151
- package/dist/handsontable.js +1291 -1013
- package/dist/handsontable.min.css +2 -2
- package/dist/handsontable.min.js +32 -32
- package/dist/languages/all.js +25 -130
- package/dist/languages/all.min.js +1 -1
- 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/index.js +0 -2
- package/i18n/languages/index.mjs +1 -2
- package/languages/all.js +25 -130
- package/languages/index.js +25 -130
- package/languages/index.mjs +1 -2
- package/package.json +1 -11
- 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 +156 -30
- package/selection/selection.mjs +155 -29
- package/selection/transformation.js +18 -27
- package/selection/transformation.mjs +18 -27
- package/shortcutContexts/commands/editor/open.js +16 -1
- package/shortcutContexts/commands/editor/open.mjs +16 -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/dist/languages/hr-HR.js +0 -167
- package/dist/languages/hr-HR.min.js +0 -1
- package/i18n/languages/hr-HR.js +0 -96
- package/i18n/languages/hr-HR.mjs +0 -90
- package/languages/hr-HR.js +0 -167
- package/languages/hr-HR.mjs +0 -92
@@ -154,6 +154,18 @@ class CellRange {
|
|
154
154
|
return (this.from.row < 0 || this.from.col < 0) && this.from.row === this.to.row && this.from.col === this.to.col;
|
155
155
|
}
|
156
156
|
|
157
|
+
/**
|
158
|
+
* Checks if your range covers only headers range (negative coordinates, without any cells).
|
159
|
+
*
|
160
|
+
* @returns {boolean}
|
161
|
+
*/
|
162
|
+
isHeader() {
|
163
|
+
if (this.from.isHeader() && this.to.isHeader()) {
|
164
|
+
return true;
|
165
|
+
}
|
166
|
+
return this.from.col < 0 && this.to.col < 0 || this.from.row < 0 && this.to.row < 0;
|
167
|
+
}
|
168
|
+
|
157
169
|
/**
|
158
170
|
* Checks if your range overlaps headers range (negative coordinates).
|
159
171
|
*
|
@@ -150,6 +150,18 @@ class CellRange {
|
|
150
150
|
return (this.from.row < 0 || this.from.col < 0) && this.from.row === this.to.row && this.from.col === this.to.col;
|
151
151
|
}
|
152
152
|
|
153
|
+
/**
|
154
|
+
* Checks if your range covers only headers range (negative coordinates, without any cells).
|
155
|
+
*
|
156
|
+
* @returns {boolean}
|
157
|
+
*/
|
158
|
+
isHeader() {
|
159
|
+
if (this.from.isHeader() && this.to.isHeader()) {
|
160
|
+
return true;
|
161
|
+
}
|
162
|
+
return this.from.col < 0 && this.to.col < 0 || this.from.row < 0 && this.to.row < 0;
|
163
|
+
}
|
164
|
+
|
153
165
|
/**
|
154
166
|
* Checks if your range overlaps headers range (negative coordinates).
|
155
167
|
*
|
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 = "08/02/2024 10:10:55";
|
49
|
+
Handsontable.version = "0.0.0-next-60eb963-20240208";
|
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 = "08/02/2024 10:11:01";
|
39
|
+
Handsontable.version = "0.0.0-next-60eb963-20240208";
|
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-60eb963-20240208
|
29
|
+
* Release date: 16/01/2024 (built at 08/02/2024 10:11:06)
|
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-60eb963-20240208
|
29
|
+
* Release date: 16/01/2024 (built at 08/02/2024 10:11:06)
|
30
30
|
*/
|
31
31
|
/**
|
32
32
|
* Fix for bootstrap styles
|