handsontable 0.0.0-next-0bd37c1-20240513 → 0.0.0-next-c2f1254-20240515
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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.js +76 -179
- package/core.mjs +76 -179
- package/dist/handsontable.css +2 -2
- package/dist/handsontable.full.css +2 -2
- package/dist/handsontable.full.js +1969 -1977
- package/dist/handsontable.full.min.css +2 -2
- package/dist/handsontable.full.min.js +6 -6
- package/dist/handsontable.js +2441 -2449
- package/dist/handsontable.min.css +2 -2
- package/dist/handsontable.min.js +9 -9
- package/editorManager.js +0 -67
- package/editorManager.mjs +0 -67
- package/editors/baseEditor/baseEditor.js +1 -36
- package/editors/baseEditor/baseEditor.mjs +2 -37
- package/editors/dateEditor/dateEditor.js +4 -1
- package/editors/dateEditor/dateEditor.mjs +4 -1
- package/editors/handsontableEditor/handsontableEditor.js +2 -2
- package/editors/handsontableEditor/handsontableEditor.mjs +2 -2
- package/editors/selectEditor/selectEditor.js +1 -9
- package/editors/selectEditor/selectEditor.mjs +1 -9
- package/editors/textEditor/textEditor.js +2 -11
- package/editors/textEditor/textEditor.mjs +2 -11
- package/helpers/mixed.js +1 -1
- package/helpers/mixed.mjs +1 -1
- package/package.json +1 -1
- package/plugins/autofill/autofill.js +1 -1
- package/plugins/autofill/autofill.mjs +1 -1
- package/selection/selection.js +156 -4
- package/selection/selection.mjs +156 -4
- package/shortcutContexts/commands/editor/closeAndSave.js +2 -3
- package/shortcutContexts/commands/editor/closeAndSave.mjs +2 -3
- package/shortcutContexts/commands/editor/closeAndSaveByArrowKeys.js +27 -0
- package/shortcutContexts/commands/editor/closeAndSaveByArrowKeys.mjs +24 -0
- package/shortcutContexts/commands/editor/closeAndSaveByEnter.js +11 -0
- package/shortcutContexts/commands/editor/closeAndSaveByEnter.mjs +8 -0
- package/shortcutContexts/commands/editor/index.js +3 -1
- package/shortcutContexts/commands/editor/index.mjs +3 -1
- package/shortcutContexts/editor.js +9 -1
- package/shortcutContexts/editor.mjs +9 -1
- package/shortcutContexts/index.js +1 -1
- package/shortcutContexts/index.mjs +1 -1
package/core.mjs
CHANGED
@@ -332,7 +332,7 @@ export default function Core(rootElement, userSettings) {
|
|
332
332
|
hiddenIndexesChanged
|
333
333
|
} = _ref;
|
334
334
|
if (hiddenIndexesChanged) {
|
335
|
-
this.selection.
|
335
|
+
this.selection.commit();
|
336
336
|
}
|
337
337
|
};
|
338
338
|
this.columnIndexMapper.addLocalHook('cacheUpdated', onIndexMapperCacheUpdate);
|
@@ -367,7 +367,11 @@ export default function Core(rootElement, userSettings) {
|
|
367
367
|
} else {
|
368
368
|
removeClass(this.rootElement, ['ht__selection--rows', 'ht__selection--columns']);
|
369
369
|
}
|
370
|
-
|
370
|
+
if (selection.getSelectionSource() !== 'shift') {
|
371
|
+
editorManager.closeEditor(null);
|
372
|
+
}
|
373
|
+
instance.view.render();
|
374
|
+
editorManager.prepareEditor();
|
371
375
|
});
|
372
376
|
this.selection.addLocalHook('beforeSetFocus', cellCoords => {
|
373
377
|
this.runHooks('beforeSelectionFocusSet', cellCoords.row, cellCoords.col);
|
@@ -378,7 +382,9 @@ export default function Core(rootElement, userSettings) {
|
|
378
382
|
if (!preventScrolling.isTouched() || preventScrolling.isTouched() && !preventScrolling.value) {
|
379
383
|
viewportScroller.scrollTo(cellCoords);
|
380
384
|
}
|
381
|
-
|
385
|
+
editorManager.closeEditor();
|
386
|
+
instance.view.render();
|
387
|
+
editorManager.prepareEditor();
|
382
388
|
});
|
383
389
|
this.selection.addLocalHook('afterSelectionFinished', cellRanges => {
|
384
390
|
const selectionLayerLevel = cellRanges.length - 1;
|
@@ -396,8 +402,8 @@ export default function Core(rootElement, userSettings) {
|
|
396
402
|
}
|
397
403
|
});
|
398
404
|
this.selection.addLocalHook('afterDeselect', () => {
|
399
|
-
editorManager.
|
400
|
-
|
405
|
+
editorManager.closeEditor();
|
406
|
+
instance.view.render();
|
401
407
|
removeClass(this.rootElement, ['ht__selection--rows', 'ht__selection--columns']);
|
402
408
|
this.runHooks('afterDeselect');
|
403
409
|
});
|
@@ -552,47 +558,7 @@ export default function Core(rootElement, userSettings) {
|
|
552
558
|
source,
|
553
559
|
mode: insertRowMode
|
554
560
|
});
|
555
|
-
|
556
|
-
const currentSelectedRange = selection.selectedRange.current();
|
557
|
-
const currentFromRange = currentSelectedRange === null || currentSelectedRange === void 0 ? void 0 : currentSelectedRange.from;
|
558
|
-
const currentFromRow = currentFromRange === null || currentFromRange === void 0 ? void 0 : currentFromRange.row;
|
559
|
-
const startVisualRowIndex = instance.toVisualRow(startRowPhysicalIndex);
|
560
|
-
if (selection.isSelectedByCorner()) {
|
561
|
-
selection.selectAll(true, true, {
|
562
|
-
disableHeadersHighlight: true
|
563
|
-
});
|
564
|
-
} else if (isDefined(currentFromRow) && currentFromRow >= startVisualRowIndex) {
|
565
|
-
// Moving the selection (if it exists) downward – it should be applied to the "old" row.
|
566
|
-
// TODO: The logic here should be handled by selection module.
|
567
|
-
const {
|
568
|
-
row: currentToRow,
|
569
|
-
col: currentToColumn
|
570
|
-
} = currentSelectedRange.to;
|
571
|
-
let currentFromColumn = currentFromRange.col;
|
572
|
-
|
573
|
-
// Workaround: headers are not stored inside selection.
|
574
|
-
if (selection.isSelectedByRowHeader()) {
|
575
|
-
currentFromColumn = -1;
|
576
|
-
}
|
577
|
-
|
578
|
-
// Remove from the stack the last added selection as that selection below will be
|
579
|
-
// replaced by new transformed selection.
|
580
|
-
selection.getSelectedRange().pop();
|
581
|
-
instance.addHookOnce('afterSelection', function () {
|
582
|
-
for (var _len16 = arguments.length, _ref5 = new Array(_len16), _key16 = 0; _key16 < _len16; _key16++) {
|
583
|
-
_ref5[_key16] = arguments[_key16];
|
584
|
-
}
|
585
|
-
let [,,,, preventScrolling] = _ref5;
|
586
|
-
preventScrolling.value = true;
|
587
|
-
});
|
588
|
-
|
589
|
-
// I can't use transforms as they don't work in negative indexes.
|
590
|
-
selection.setRangeStartOnly(instance._createCellCoords(currentFromRow + rowDelta, currentFromColumn), true);
|
591
|
-
selection.setRangeEnd(instance._createCellCoords(currentToRow + rowDelta, currentToColumn)); // will call render() internally
|
592
|
-
} else {
|
593
|
-
instance._refreshBorders(); // it will call render and prepare methods
|
594
|
-
}
|
595
|
-
}
|
561
|
+
selection.shiftRows(instance.toVisualRow(startRowPhysicalIndex), rowDelta);
|
596
562
|
break;
|
597
563
|
case 'insert_col_start':
|
598
564
|
case 'insert_col_end':
|
@@ -615,38 +581,7 @@ export default function Core(rootElement, userSettings) {
|
|
615
581
|
spliceArray.length += colDelta; // inserts empty (undefined) elements at the end of an array
|
616
582
|
Array.prototype.splice.apply(tableMeta.colHeaders, spliceArray); // inserts empty (undefined) elements into the colHeader array
|
617
583
|
}
|
618
|
-
|
619
|
-
const currentFromRange = currentSelectedRange === null || currentSelectedRange === void 0 ? void 0 : currentSelectedRange.from;
|
620
|
-
const currentFromColumn = currentFromRange === null || currentFromRange === void 0 ? void 0 : currentFromRange.col;
|
621
|
-
const startVisualColumnIndex = instance.toVisualColumn(startColumnPhysicalIndex);
|
622
|
-
if (selection.isSelectedByCorner()) {
|
623
|
-
selection.selectAll(true, true, {
|
624
|
-
disableHeadersHighlight: true
|
625
|
-
});
|
626
|
-
} else if (isDefined(currentFromColumn) && currentFromColumn >= startVisualColumnIndex) {
|
627
|
-
// Moving the selection (if it exists) rightward – it should be applied to the "old" column.
|
628
|
-
// TODO: The logic here should be handled by selection module.
|
629
|
-
const {
|
630
|
-
row: currentToRow,
|
631
|
-
col: currentToColumn
|
632
|
-
} = currentSelectedRange.to;
|
633
|
-
let currentFromRow = currentFromRange.row;
|
634
|
-
|
635
|
-
// Workaround: headers are not stored inside selection.
|
636
|
-
if (selection.isSelectedByColumnHeader()) {
|
637
|
-
currentFromRow = -1;
|
638
|
-
}
|
639
|
-
|
640
|
-
// Remove from the stack the last added selection as that selection below will be
|
641
|
-
// replaced by new transformed selection.
|
642
|
-
selection.getSelectedRange().pop();
|
643
|
-
|
644
|
-
// I can't use transforms as they don't work in negative indexes.
|
645
|
-
selection.setRangeStartOnly(instance._createCellCoords(currentFromRow, currentFromColumn + colDelta), true);
|
646
|
-
selection.setRangeEnd(instance._createCellCoords(currentToRow, currentToColumn + colDelta)); // will call render() internally
|
647
|
-
} else {
|
648
|
-
instance._refreshBorders(); // it will call render and prepare methods
|
649
|
-
}
|
584
|
+
selection.shiftColumns(instance.toVisualColumn(startColumnPhysicalIndex), colDelta);
|
650
585
|
}
|
651
586
|
break;
|
652
587
|
case 'remove_row':
|
@@ -654,8 +589,8 @@ export default function Core(rootElement, userSettings) {
|
|
654
589
|
let offset = 0;
|
655
590
|
|
656
591
|
// Normalize the {index, amount} groups into bigger groups.
|
657
|
-
arrayEach(indexes,
|
658
|
-
let [groupIndex, groupAmount] =
|
592
|
+
arrayEach(indexes, _ref5 => {
|
593
|
+
let [groupIndex, groupAmount] = _ref5;
|
659
594
|
const calcIndex = isEmpty(groupIndex) ? instance.countRows() - 1 : Math.max(groupIndex - offset, 0);
|
660
595
|
|
661
596
|
// If the 'index' is an integer decrease it by 'offset' otherwise pass it through to make the value
|
@@ -671,7 +606,22 @@ export default function Core(rootElement, userSettings) {
|
|
671
606
|
if (!wasRemoved) {
|
672
607
|
return;
|
673
608
|
}
|
609
|
+
if (selection.isSelected()) {
|
610
|
+
const {
|
611
|
+
row
|
612
|
+
} = instance.getSelectedRangeLast().highlight;
|
613
|
+
if (row >= groupIndex && row <= groupIndex + groupAmount - 1) {
|
614
|
+
editorManager.closeEditor(true);
|
615
|
+
}
|
616
|
+
}
|
674
617
|
const totalRows = instance.countRows();
|
618
|
+
if (totalRows === 0) {
|
619
|
+
selection.deselect();
|
620
|
+
} else if (source === 'ContextMenu.removeRow') {
|
621
|
+
selection.refresh();
|
622
|
+
} else {
|
623
|
+
selection.shiftRows(groupIndex, -groupAmount);
|
624
|
+
}
|
675
625
|
const fixedRowsTop = tableMeta.fixedRowsTop;
|
676
626
|
if (fixedRowsTop >= calcIndex + 1) {
|
677
627
|
tableMeta.fixedRowsTop -= Math.min(groupAmount, fixedRowsTop - calcIndex);
|
@@ -688,16 +638,14 @@ export default function Core(rootElement, userSettings) {
|
|
688
638
|
} else {
|
689
639
|
removeRow([[index, amount]]);
|
690
640
|
}
|
691
|
-
grid.adjustRowsAndCols();
|
692
|
-
instance._refreshBorders(); // it will call render and prepare methods
|
693
641
|
break;
|
694
642
|
case 'remove_col':
|
695
643
|
const removeCol = indexes => {
|
696
644
|
let offset = 0;
|
697
645
|
|
698
646
|
// Normalize the {index, amount} groups into bigger groups.
|
699
|
-
arrayEach(indexes,
|
700
|
-
let [groupIndex, groupAmount] =
|
647
|
+
arrayEach(indexes, _ref6 => {
|
648
|
+
let [groupIndex, groupAmount] = _ref6;
|
701
649
|
const calcIndex = isEmpty(groupIndex) ? instance.countCols() - 1 : Math.max(groupIndex - offset, 0);
|
702
650
|
let physicalColumnIndex = instance.toPhysicalColumn(calcIndex);
|
703
651
|
|
@@ -714,6 +662,22 @@ export default function Core(rootElement, userSettings) {
|
|
714
662
|
if (!wasRemoved) {
|
715
663
|
return;
|
716
664
|
}
|
665
|
+
if (selection.isSelected()) {
|
666
|
+
const {
|
667
|
+
col
|
668
|
+
} = instance.getSelectedRangeLast().highlight;
|
669
|
+
if (col >= groupIndex && col <= groupIndex + groupAmount - 1) {
|
670
|
+
editorManager.closeEditor(true);
|
671
|
+
}
|
672
|
+
}
|
673
|
+
const totalColumns = instance.countCols();
|
674
|
+
if (totalColumns === 0) {
|
675
|
+
selection.deselect();
|
676
|
+
} else if (source === 'ContextMenu.removeColumn') {
|
677
|
+
selection.refresh();
|
678
|
+
} else {
|
679
|
+
selection.shiftColumns(groupIndex, -groupAmount);
|
680
|
+
}
|
717
681
|
const fixedColumnsStart = tableMeta.fixedColumnsStart;
|
718
682
|
if (fixedColumnsStart >= calcIndex + 1) {
|
719
683
|
tableMeta.fixedColumnsStart -= Math.min(groupAmount, fixedColumnsStart - calcIndex);
|
@@ -732,13 +696,11 @@ export default function Core(rootElement, userSettings) {
|
|
732
696
|
} else {
|
733
697
|
removeCol([[index, amount]]);
|
734
698
|
}
|
735
|
-
grid.adjustRowsAndCols();
|
736
|
-
instance._refreshBorders(); // it will call render and prepare methods
|
737
|
-
|
738
699
|
break;
|
739
700
|
default:
|
740
701
|
throw new Error(`There is no such action "${action}"`);
|
741
702
|
}
|
703
|
+
instance.view.render();
|
742
704
|
if (!keepEmptyRows) {
|
743
705
|
grid.adjustRowsAndCols(); // makes sure that we did not add rows that will be removed in next refresh
|
744
706
|
}
|
@@ -753,9 +715,6 @@ export default function Core(rootElement, userSettings) {
|
|
753
715
|
const minSpareRows = tableMeta.minSpareRows;
|
754
716
|
const minCols = tableMeta.minCols;
|
755
717
|
const minSpareCols = tableMeta.minSpareCols;
|
756
|
-
if (instance.countRows() === 0 && instance.countCols() === 0) {
|
757
|
-
selection.deselect();
|
758
|
-
}
|
759
718
|
if (minRows) {
|
760
719
|
// should I add empty rows to data source to meet minRows?
|
761
720
|
const nrOfRows = instance.countRows();
|
@@ -814,55 +773,6 @@ export default function Core(rootElement, userSettings) {
|
|
814
773
|
});
|
815
774
|
}
|
816
775
|
}
|
817
|
-
if (selection.isSelected()) {
|
818
|
-
const rowCount = instance.countRows();
|
819
|
-
const colCount = instance.countCols();
|
820
|
-
arrayEach(selection.selectedRange, range => {
|
821
|
-
let selectionChanged = false;
|
822
|
-
let fromRow = range.from.row;
|
823
|
-
let fromCol = range.from.col;
|
824
|
-
let toRow = range.to.row;
|
825
|
-
let toCol = range.to.col;
|
826
|
-
|
827
|
-
// if selection is outside, move selection to last row
|
828
|
-
if (fromRow > rowCount - 1) {
|
829
|
-
fromRow = rowCount - 1;
|
830
|
-
selectionChanged = true;
|
831
|
-
if (toRow > fromRow) {
|
832
|
-
toRow = fromRow;
|
833
|
-
}
|
834
|
-
} else if (toRow > rowCount - 1) {
|
835
|
-
toRow = rowCount - 1;
|
836
|
-
selectionChanged = true;
|
837
|
-
if (fromRow > toRow) {
|
838
|
-
fromRow = toRow;
|
839
|
-
}
|
840
|
-
}
|
841
|
-
// if selection is outside, move selection to last row
|
842
|
-
if (fromCol > colCount - 1) {
|
843
|
-
fromCol = colCount - 1;
|
844
|
-
selectionChanged = true;
|
845
|
-
if (toCol > fromCol) {
|
846
|
-
toCol = fromCol;
|
847
|
-
}
|
848
|
-
} else if (toCol > colCount - 1) {
|
849
|
-
toCol = colCount - 1;
|
850
|
-
selectionChanged = true;
|
851
|
-
if (fromCol > toCol) {
|
852
|
-
fromCol = toCol;
|
853
|
-
}
|
854
|
-
}
|
855
|
-
if (selectionChanged) {
|
856
|
-
if (fromCol < 0) {
|
857
|
-
instance.selectRows(fromRow, toRow, fromCol);
|
858
|
-
} else if (fromRow < 0) {
|
859
|
-
instance.selectColumns(fromCol, toCol, fromRow);
|
860
|
-
} else {
|
861
|
-
instance.selectCell(fromRow, fromCol, toRow, toCol);
|
862
|
-
}
|
863
|
-
}
|
864
|
-
});
|
865
|
-
}
|
866
776
|
if (instance.view) {
|
867
777
|
instance.view.adjustElementsSize();
|
868
778
|
}
|
@@ -1309,7 +1219,9 @@ export default function Core(rootElement, userSettings) {
|
|
1309
1219
|
instance.forceFullRender = true; // used when data was changed
|
1310
1220
|
grid.adjustRowsAndCols();
|
1311
1221
|
instance.runHooks('beforeChangeRender', changes, source);
|
1312
|
-
|
1222
|
+
editorManager.closeEditor();
|
1223
|
+
instance.view.render();
|
1224
|
+
editorManager.prepareEditor();
|
1313
1225
|
instance.view.adjustElementsSize();
|
1314
1226
|
instance.runHooks('afterChange', changes, source || 'edit');
|
1315
1227
|
const activeEditor = instance.getActiveEditor();
|
@@ -1589,7 +1501,11 @@ export default function Core(rootElement, userSettings) {
|
|
1589
1501
|
this.destroyEditor = function () {
|
1590
1502
|
let revertOriginal = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
1591
1503
|
let prepareEditorIfNeeded = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
1592
|
-
|
1504
|
+
editorManager.closeEditor(revertOriginal);
|
1505
|
+
instance.view.render();
|
1506
|
+
if (prepareEditorIfNeeded && selection.isSelected()) {
|
1507
|
+
editorManager.prepareEditor();
|
1508
|
+
}
|
1593
1509
|
};
|
1594
1510
|
|
1595
1511
|
/**
|
@@ -1631,8 +1547,8 @@ export default function Core(rootElement, userSettings) {
|
|
1631
1547
|
* @returns {Array} Returns removed portion of columns.
|
1632
1548
|
*/
|
1633
1549
|
this.spliceCol = function (column, index, amount) {
|
1634
|
-
for (var
|
1635
|
-
elements[
|
1550
|
+
for (var _len16 = arguments.length, elements = new Array(_len16 > 3 ? _len16 - 3 : 0), _key16 = 3; _key16 < _len16; _key16++) {
|
1551
|
+
elements[_key16 - 3] = arguments[_key16];
|
1636
1552
|
}
|
1637
1553
|
return datamap.spliceCol(column, index, amount, ...elements);
|
1638
1554
|
};
|
@@ -1649,8 +1565,8 @@ export default function Core(rootElement, userSettings) {
|
|
1649
1565
|
* @returns {Array} Returns removed portion of rows.
|
1650
1566
|
*/
|
1651
1567
|
this.spliceRow = function (row, index, amount) {
|
1652
|
-
for (var
|
1653
|
-
elements[
|
1568
|
+
for (var _len17 = arguments.length, elements = new Array(_len17 > 3 ? _len17 - 3 : 0), _key17 = 3; _key17 < _len17; _key17++) {
|
1569
|
+
elements[_key17 - 3] = arguments[_key17];
|
1654
1570
|
}
|
1655
1571
|
return datamap.spliceRow(row, index, amount, ...elements);
|
1656
1572
|
};
|
@@ -1671,11 +1587,11 @@ export default function Core(rootElement, userSettings) {
|
|
1671
1587
|
this.getSelected = function () {
|
1672
1588
|
// https://github.com/handsontable/handsontable/issues/44 //cjl
|
1673
1589
|
if (selection.isSelected()) {
|
1674
|
-
return arrayMap(selection.getSelectedRange(),
|
1590
|
+
return arrayMap(selection.getSelectedRange(), _ref7 => {
|
1675
1591
|
let {
|
1676
1592
|
from,
|
1677
1593
|
to
|
1678
|
-
} =
|
1594
|
+
} = _ref7;
|
1679
1595
|
return [from.row, from.col, to.row, to.col];
|
1680
1596
|
});
|
1681
1597
|
}
|
@@ -1852,7 +1768,7 @@ export default function Core(rootElement, userSettings) {
|
|
1852
1768
|
if (this.renderCall) {
|
1853
1769
|
this.render();
|
1854
1770
|
} else {
|
1855
|
-
|
1771
|
+
instance.view.render();
|
1856
1772
|
}
|
1857
1773
|
}
|
1858
1774
|
};
|
@@ -1873,9 +1789,7 @@ export default function Core(rootElement, userSettings) {
|
|
1873
1789
|
this.forceFullRender = true; // used when data was changed
|
1874
1790
|
|
1875
1791
|
if (!this.isRenderSuspended()) {
|
1876
|
-
|
1877
|
-
this._refreshBorders(null);
|
1878
|
-
editorManager.unlockEditor();
|
1792
|
+
instance.view.render();
|
1879
1793
|
}
|
1880
1794
|
}
|
1881
1795
|
};
|
@@ -2142,6 +2056,7 @@ export default function Core(rootElement, userSettings) {
|
|
2142
2056
|
instance.columnIndexMapper.fitToLength(this.getInitialColumnCount());
|
2143
2057
|
instance.rowIndexMapper.fitToLength(this.countSourceRows());
|
2144
2058
|
grid.adjustRowsAndCols();
|
2059
|
+
selection.refresh();
|
2145
2060
|
}, {
|
2146
2061
|
hotInstance: instance,
|
2147
2062
|
dataMap: datamap,
|
@@ -2182,6 +2097,7 @@ export default function Core(rootElement, userSettings) {
|
|
2182
2097
|
metaManager.clearCellsCache();
|
2183
2098
|
instance.initIndexMappers();
|
2184
2099
|
grid.adjustRowsAndCols();
|
2100
|
+
selection.refresh();
|
2185
2101
|
if (firstRun) {
|
2186
2102
|
firstRun = [null, 'loadData'];
|
2187
2103
|
}
|
@@ -2469,10 +2385,8 @@ export default function Core(rootElement, userSettings) {
|
|
2469
2385
|
grid.adjustRowsAndCols();
|
2470
2386
|
if (instance.view && !firstRun) {
|
2471
2387
|
instance.forceFullRender = true; // used when data was changed
|
2472
|
-
|
2473
|
-
instance._refreshBorders(null);
|
2388
|
+
instance.view.render();
|
2474
2389
|
instance.view._wt.wtOverlays.adjustElementsSize();
|
2475
|
-
editorManager.unlockEditor();
|
2476
2390
|
}
|
2477
2391
|
if (!init && instance.view && (currentHeight === '' || height === '' || height === undefined) && currentHeight !== height) {
|
2478
2392
|
instance.view._wt.wtOverlays.updateMainScrollableElements();
|
@@ -2901,15 +2815,15 @@ export default function Core(rootElement, userSettings) {
|
|
2901
2815
|
const isThereAnySetSourceListener = this.hasHook('afterSetSourceDataAtCell');
|
2902
2816
|
const changesForHook = [];
|
2903
2817
|
if (isThereAnySetSourceListener) {
|
2904
|
-
arrayEach(input,
|
2905
|
-
let [changeRow, changeProp, changeValue] =
|
2818
|
+
arrayEach(input, _ref8 => {
|
2819
|
+
let [changeRow, changeProp, changeValue] = _ref8;
|
2906
2820
|
changesForHook.push([changeRow, changeProp, dataSource.getAtCell(changeRow, changeProp),
|
2907
2821
|
// The previous value.
|
2908
2822
|
changeValue]);
|
2909
2823
|
});
|
2910
2824
|
}
|
2911
|
-
arrayEach(input,
|
2912
|
-
let [changeRow, changeProp, changeValue] =
|
2825
|
+
arrayEach(input, _ref9 => {
|
2826
|
+
let [changeRow, changeProp, changeValue] = _ref9;
|
2913
2827
|
dataSource.setAtCell(changeRow, changeProp, changeValue);
|
2914
2828
|
});
|
2915
2829
|
if (isThereAnySetSourceListener) {
|
@@ -3047,8 +2961,8 @@ export default function Core(rootElement, userSettings) {
|
|
3047
2961
|
*/
|
3048
2962
|
this.spliceCellsMeta = function (visualIndex) {
|
3049
2963
|
let deleteAmount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
3050
|
-
for (var
|
3051
|
-
cellMetaRows[
|
2964
|
+
for (var _len18 = arguments.length, cellMetaRows = new Array(_len18 > 2 ? _len18 - 2 : 0), _key18 = 2; _key18 < _len18; _key18++) {
|
2965
|
+
cellMetaRows[_key18 - 2] = arguments[_key18];
|
3052
2966
|
}
|
3053
2967
|
if (cellMetaRows.length > 0 && !Array.isArray(cellMetaRows[0])) {
|
3054
2968
|
throw new Error('The 3rd argument (cellMetaRows) has to be passed as an array of cell meta objects array.');
|
@@ -4261,8 +4175,8 @@ export default function Core(rootElement, userSettings) {
|
|
4261
4175
|
instance.batchExecution(() => {
|
4262
4176
|
instance.rowIndexMapper.unregisterAll();
|
4263
4177
|
instance.columnIndexMapper.unregisterAll();
|
4264
|
-
pluginsRegistry.getItems().forEach(
|
4265
|
-
let [, plugin] =
|
4178
|
+
pluginsRegistry.getItems().forEach(_ref10 => {
|
4179
|
+
let [, plugin] = _ref10;
|
4266
4180
|
plugin.destroy();
|
4267
4181
|
});
|
4268
4182
|
pluginsRegistry.clear();
|
@@ -4550,23 +4464,6 @@ export default function Core(rootElement, userSettings) {
|
|
4550
4464
|
});
|
4551
4465
|
};
|
4552
4466
|
|
4553
|
-
/**
|
4554
|
-
* Refresh selection borders. This is temporary method relic after selection rewrite.
|
4555
|
-
*
|
4556
|
-
* @private
|
4557
|
-
* @param {boolean} [revertOriginal=false] If `true`, the previous value will be restored. Otherwise, the edited value will be saved.
|
4558
|
-
* @param {boolean} [prepareEditorIfNeeded=true] If `true` the editor under the selected cell will be prepared to open.
|
4559
|
-
*/
|
4560
|
-
this._refreshBorders = function () {
|
4561
|
-
let revertOriginal = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
4562
|
-
let prepareEditorIfNeeded = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
4563
|
-
editorManager.destroyEditor(revertOriginal);
|
4564
|
-
instance.view.render();
|
4565
|
-
if (prepareEditorIfNeeded && selection.isSelected()) {
|
4566
|
-
editorManager.prepareEditor();
|
4567
|
-
}
|
4568
|
-
};
|
4569
|
-
|
4570
4467
|
/**
|
4571
4468
|
* Gets the instance of the EditorManager.
|
4572
4469
|
*
|
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/04/2024 (built at
|
28
|
+
* Version: 0.0.0-next-c2f1254-20240515
|
29
|
+
* Release date: 16/04/2024 (built at 15/05/2024 07:15:29)
|
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/04/2024 (built at
|
28
|
+
* Version: 0.0.0-next-c2f1254-20240515
|
29
|
+
* Release date: 16/04/2024 (built at 15/05/2024 07:15:29)
|
30
30
|
*/
|
31
31
|
/**
|
32
32
|
* Fix for bootstrap styles
|