handsontable 0.0.0-next-d052e5d-20240105 → 0.0.0-next-2e49e9b-20240105
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/dist/handsontable.css +2 -2
- package/dist/handsontable.full.css +2 -2
- package/dist/handsontable.full.js +31 -5
- package/dist/handsontable.full.min.css +2 -2
- package/dist/handsontable.full.min.js +4 -4
- package/dist/handsontable.js +31 -5
- package/dist/handsontable.min.css +2 -2
- package/dist/handsontable.min.js +4 -4
- package/helpers/mixed.js +1 -1
- package/helpers/mixed.mjs +1 -1
- package/package.json +1 -1
- package/plugins/undoRedo/undoRedo.js +26 -0
- package/plugins/undoRedo/undoRedo.mjs +26 -0
package/helpers/mixed.js
CHANGED
@@ -134,7 +134,7 @@ const domMessages = {
|
|
134
134
|
function _injectProductInfo(key, element) {
|
135
135
|
const hasValidType = !isEmpty(key);
|
136
136
|
const isNonCommercial = typeof key === 'string' && key.toLowerCase() === 'non-commercial-and-evaluation';
|
137
|
-
const hotVersion = "0.0.0-next-
|
137
|
+
const hotVersion = "0.0.0-next-2e49e9b-20240105";
|
138
138
|
let keyValidityDate;
|
139
139
|
let consoleMessageState = 'invalid';
|
140
140
|
let domMessageState = 'invalid';
|
package/helpers/mixed.mjs
CHANGED
@@ -124,7 +124,7 @@ const domMessages = {
|
|
124
124
|
export function _injectProductInfo(key, element) {
|
125
125
|
const hasValidType = !isEmpty(key);
|
126
126
|
const isNonCommercial = typeof key === 'string' && key.toLowerCase() === 'non-commercial-and-evaluation';
|
127
|
-
const hotVersion = "0.0.0-next-
|
127
|
+
const hotVersion = "0.0.0-next-2e49e9b-20240105";
|
128
128
|
let keyValidityDate;
|
129
129
|
let consoleMessageState = 'invalid';
|
130
130
|
let domMessageState = 'invalid';
|
package/package.json
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
"url": "https://github.com/handsontable/handsontable/issues"
|
11
11
|
},
|
12
12
|
"author": "Handsoncode <hello@handsontable.com>",
|
13
|
-
"version": "0.0.0-next-
|
13
|
+
"version": "0.0.0-next-2e49e9b-20240105",
|
14
14
|
"main": "index",
|
15
15
|
"module": "index.mjs",
|
16
16
|
"jsnext:main": "index.mjs",
|
@@ -384,6 +384,32 @@ UndoRedo.ChangeAction.prototype.undo = function (instance, undoneCallback) {
|
|
384
384
|
instance.undoRedo.doneActions.pop();
|
385
385
|
}
|
386
386
|
}
|
387
|
+
const selectedLast = instance.getSelectedLast();
|
388
|
+
if (selectedLast !== undefined) {
|
389
|
+
const [changedRow, changedColumn] = data[0];
|
390
|
+
const [selectedRow, selectedColumn] = selectedLast;
|
391
|
+
const firstFullyVisibleRow = instance.view.getFirstFullyVisibleRow();
|
392
|
+
const firstFullyVisibleColumn = instance.view.getFirstFullyVisibleColumn();
|
393
|
+
const isInVerticalViewPort = changedRow >= firstFullyVisibleRow;
|
394
|
+
const isInHorizontalViewPort = changedColumn >= firstFullyVisibleColumn;
|
395
|
+
const isInViewport = isInVerticalViewPort && isInHorizontalViewPort;
|
396
|
+
const isChangedSelection = selectedRow !== changedRow || selectedColumn !== changedColumn;
|
397
|
+
|
398
|
+
// Performing scroll only when selection has been changed right after editing a cell.
|
399
|
+
if (isInViewport === false && isChangedSelection === true) {
|
400
|
+
const scrollConfig = {
|
401
|
+
row: changedRow,
|
402
|
+
col: changedColumn
|
403
|
+
};
|
404
|
+
if (isInVerticalViewPort === false) {
|
405
|
+
scrollConfig.verticalSnap = 'top';
|
406
|
+
}
|
407
|
+
if (isInHorizontalViewPort === false) {
|
408
|
+
scrollConfig.horizontalSnap = 'start';
|
409
|
+
}
|
410
|
+
instance.scrollViewportTo(scrollConfig);
|
411
|
+
}
|
412
|
+
}
|
387
413
|
instance.selectCells(this.selected, false, false);
|
388
414
|
};
|
389
415
|
UndoRedo.ChangeAction.prototype.redo = function (instance, onFinishCallback) {
|
@@ -380,6 +380,32 @@ UndoRedo.ChangeAction.prototype.undo = function (instance, undoneCallback) {
|
|
380
380
|
instance.undoRedo.doneActions.pop();
|
381
381
|
}
|
382
382
|
}
|
383
|
+
const selectedLast = instance.getSelectedLast();
|
384
|
+
if (selectedLast !== undefined) {
|
385
|
+
const [changedRow, changedColumn] = data[0];
|
386
|
+
const [selectedRow, selectedColumn] = selectedLast;
|
387
|
+
const firstFullyVisibleRow = instance.view.getFirstFullyVisibleRow();
|
388
|
+
const firstFullyVisibleColumn = instance.view.getFirstFullyVisibleColumn();
|
389
|
+
const isInVerticalViewPort = changedRow >= firstFullyVisibleRow;
|
390
|
+
const isInHorizontalViewPort = changedColumn >= firstFullyVisibleColumn;
|
391
|
+
const isInViewport = isInVerticalViewPort && isInHorizontalViewPort;
|
392
|
+
const isChangedSelection = selectedRow !== changedRow || selectedColumn !== changedColumn;
|
393
|
+
|
394
|
+
// Performing scroll only when selection has been changed right after editing a cell.
|
395
|
+
if (isInViewport === false && isChangedSelection === true) {
|
396
|
+
const scrollConfig = {
|
397
|
+
row: changedRow,
|
398
|
+
col: changedColumn
|
399
|
+
};
|
400
|
+
if (isInVerticalViewPort === false) {
|
401
|
+
scrollConfig.verticalSnap = 'top';
|
402
|
+
}
|
403
|
+
if (isInHorizontalViewPort === false) {
|
404
|
+
scrollConfig.horizontalSnap = 'start';
|
405
|
+
}
|
406
|
+
instance.scrollViewportTo(scrollConfig);
|
407
|
+
}
|
408
|
+
}
|
383
409
|
instance.selectCells(this.selected, false, false);
|
384
410
|
};
|
385
411
|
UndoRedo.ChangeAction.prototype.redo = function (instance, onFinishCallback) {
|