handsontable 0.0.0-next-93e34dc-20230601 → 0.0.0-next-b7cca45-20230605
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/{selection/border/border.js → border.js} +12 -7
- package/3rdparty/walkontable/src/{selection/border/border.mjs → border.mjs} +12 -7
- package/3rdparty/walkontable/src/cell/coords.d.ts +1 -6
- package/3rdparty/walkontable/src/cell/coords.js +12 -61
- package/3rdparty/walkontable/src/cell/coords.mjs +12 -61
- package/3rdparty/walkontable/src/cell/range.d.ts +2 -9
- package/3rdparty/walkontable/src/cell/range.js +7 -44
- package/3rdparty/walkontable/src/cell/range.mjs +7 -44
- package/3rdparty/walkontable/src/core/_base.js +3 -9
- package/3rdparty/walkontable/src/core/_base.mjs +3 -9
- package/3rdparty/walkontable/src/core/clone.js +2 -2
- package/3rdparty/walkontable/src/core/clone.mjs +2 -2
- package/3rdparty/walkontable/src/core/core.js +2 -3
- package/3rdparty/walkontable/src/core/core.mjs +2 -3
- package/3rdparty/walkontable/src/event.js +7 -7
- package/3rdparty/walkontable/src/event.mjs +7 -7
- package/3rdparty/walkontable/src/facade/core.js +2 -2
- package/3rdparty/walkontable/src/facade/core.mjs +2 -2
- package/3rdparty/walkontable/src/index.js +2 -10
- package/3rdparty/walkontable/src/index.mjs +2 -2
- package/3rdparty/walkontable/src/overlay/_base.js +1 -1
- package/3rdparty/walkontable/src/overlay/_base.mjs +1 -1
- package/3rdparty/walkontable/src/overlay/inlineStart.js +4 -2
- package/3rdparty/walkontable/src/overlay/inlineStart.mjs +4 -2
- package/3rdparty/walkontable/src/overlay/top.js +4 -2
- package/3rdparty/walkontable/src/overlay/top.mjs +4 -2
- package/3rdparty/walkontable/src/selection.js +354 -0
- package/3rdparty/walkontable/src/selection.mjs +348 -0
- package/3rdparty/walkontable/src/table/mixin/calculatedColumns.js +0 -9
- package/3rdparty/walkontable/src/table/mixin/calculatedColumns.mjs +0 -9
- package/3rdparty/walkontable/src/table/mixin/calculatedRows.js +0 -9
- package/3rdparty/walkontable/src/table/mixin/calculatedRows.mjs +0 -9
- package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.js +0 -9
- package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.mjs +0 -9
- package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.js +0 -9
- package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.mjs +0 -9
- package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.js +0 -9
- package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.mjs +0 -9
- package/3rdparty/walkontable/src/table.js +79 -7
- package/3rdparty/walkontable/src/table.mjs +80 -8
- package/base.js +2 -2
- package/base.mjs +2 -2
- package/core.d.ts +3 -5
- package/core.js +300 -82
- package/core.mjs +300 -82
- package/dataMap/metaManager/metaSchema.js +0 -15
- package/dataMap/metaManager/metaSchema.mjs +0 -15
- package/dist/handsontable.css +3 -8
- package/dist/handsontable.full.css +3 -8
- package/dist/handsontable.full.js +9926 -12218
- package/dist/handsontable.full.min.css +3 -3
- package/dist/handsontable.full.min.js +120 -120
- package/dist/handsontable.js +14628 -16920
- package/dist/handsontable.min.css +3 -3
- package/dist/handsontable.min.js +4 -4
- package/editorManager.js +82 -20
- package/editorManager.mjs +86 -25
- package/editors/textEditor/textEditor.js +11 -3
- package/editors/textEditor/textEditor.mjs +12 -4
- package/helpers/mixed.js +1 -1
- package/helpers/mixed.mjs +1 -1
- package/helpers/number.d.ts +0 -1
- package/helpers/number.js +0 -18
- package/helpers/number.mjs +0 -17
- package/package.json +1 -1
- package/pluginHooks.js +1 -1
- package/pluginHooks.mjs +1 -1
- package/plugins/copyPaste/copyPaste.js +1 -5
- package/plugins/copyPaste/copyPaste.mjs +1 -5
- package/plugins/customBorders/customBorders.js +52 -18
- package/plugins/customBorders/customBorders.mjs +53 -19
- package/plugins/mergeCells/mergeCells.js +18 -5
- package/plugins/mergeCells/mergeCells.mjs +18 -5
- package/plugins/nestedHeaders/nestedHeaders.js +9 -89
- package/plugins/nestedHeaders/nestedHeaders.mjs +9 -89
- package/plugins/nestedHeaders/stateManager/index.js +0 -37
- package/plugins/nestedHeaders/stateManager/index.mjs +0 -37
- package/renderers/checkboxRenderer/checkboxRenderer.js +2 -2
- package/renderers/checkboxRenderer/checkboxRenderer.mjs +1 -1
- package/selection/highlight/constants.js +16 -0
- package/selection/highlight/constants.mjs +6 -0
- package/selection/highlight/highlight.js +88 -311
- package/selection/highlight/highlight.mjs +84 -301
- package/selection/highlight/types/activeHeader.js +9 -10
- package/selection/highlight/types/activeHeader.mjs +8 -10
- package/selection/highlight/types/area.js +27 -12
- package/selection/highlight/types/area.mjs +30 -16
- package/selection/highlight/types/{focus.js → cell.js} +8 -5
- package/selection/highlight/types/{focus.mjs → cell.mjs} +7 -5
- package/selection/highlight/types/customSelection.js +10 -7
- package/selection/highlight/types/customSelection.mjs +9 -7
- package/selection/highlight/types/fill.js +8 -5
- package/selection/highlight/types/fill.mjs +7 -5
- package/selection/highlight/types/header.js +20 -10
- package/selection/highlight/types/header.mjs +19 -10
- package/selection/highlight/types/{row.js → index.js} +31 -27
- package/selection/highlight/types/{row.mjs → index.mjs} +29 -24
- package/selection/highlight/visualSelection.js +28 -23
- package/selection/highlight/visualSelection.mjs +28 -23
- package/selection/index.js +7 -4
- package/selection/index.mjs +3 -2
- package/selection/mouseEventHandler.js +1 -1
- package/selection/mouseEventHandler.mjs +1 -1
- package/selection/range.js +8 -8
- package/selection/range.mjs +8 -8
- package/selection/selection.js +180 -296
- package/selection/selection.mjs +179 -291
- package/selection/transformation.js +96 -233
- package/selection/transformation.mjs +93 -230
- package/selection/utils.js +35 -12
- package/selection/utils.mjs +35 -13
- package/settings.d.ts +0 -1
- package/tableView.js +9 -58
- package/tableView.mjs +9 -58
- package/3rdparty/walkontable/src/selection/border/constants.js +0 -18
- package/3rdparty/walkontable/src/selection/border/constants.mjs +0 -13
- package/3rdparty/walkontable/src/selection/constants.js +0 -63
- package/3rdparty/walkontable/src/selection/constants.mjs +0 -51
- package/3rdparty/walkontable/src/selection/index.js +0 -30
- package/3rdparty/walkontable/src/selection/index.mjs +0 -5
- package/3rdparty/walkontable/src/selection/manager.js +0 -328
- package/3rdparty/walkontable/src/selection/manager.mjs +0 -322
- package/3rdparty/walkontable/src/selection/scanner.js +0 -363
- package/3rdparty/walkontable/src/selection/scanner.mjs +0 -359
- package/3rdparty/walkontable/src/selection/selection.js +0 -133
- package/3rdparty/walkontable/src/selection/selection.mjs +0 -127
- package/selection/highlight/types/areaLayered.js +0 -54
- package/selection/highlight/types/areaLayered.mjs +0 -49
- package/selection/highlight/types/column.js +0 -50
- package/selection/highlight/types/column.mjs +0 -45
- package/shortcutContexts/commands/editor/closeAndSave.js +0 -15
- package/shortcutContexts/commands/editor/closeAndSave.mjs +0 -10
- package/shortcutContexts/commands/editor/closeWithoutSaving.js +0 -13
- package/shortcutContexts/commands/editor/closeWithoutSaving.mjs +0 -8
- package/shortcutContexts/commands/editor/fastOpen.js +0 -16
- package/shortcutContexts/commands/editor/fastOpen.mjs +0 -11
- package/shortcutContexts/commands/editor/index.js +0 -16
- package/shortcutContexts/commands/editor/index.mjs +0 -12
- package/shortcutContexts/commands/editor/open.js +0 -29
- package/shortcutContexts/commands/editor/open.mjs +0 -24
- package/shortcutContexts/commands/emptySelectedCells.js +0 -12
- package/shortcutContexts/commands/emptySelectedCells.mjs +0 -7
- package/shortcutContexts/commands/extendCellsSelection/down.js +0 -15
- package/shortcutContexts/commands/extendCellsSelection/down.mjs +0 -10
- package/shortcutContexts/commands/extendCellsSelection/downByViewportHeight.js +0 -21
- package/shortcutContexts/commands/extendCellsSelection/downByViewportHeight.mjs +0 -16
- package/shortcutContexts/commands/extendCellsSelection/index.js +0 -24
- package/shortcutContexts/commands/extendCellsSelection/index.mjs +0 -20
- package/shortcutContexts/commands/extendCellsSelection/left.js +0 -15
- package/shortcutContexts/commands/extendCellsSelection/left.mjs +0 -10
- package/shortcutContexts/commands/extendCellsSelection/right.js +0 -15
- package/shortcutContexts/commands/extendCellsSelection/right.mjs +0 -10
- package/shortcutContexts/commands/extendCellsSelection/toMostBottom.js +0 -22
- package/shortcutContexts/commands/extendCellsSelection/toMostBottom.mjs +0 -17
- package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.js +0 -17
- package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.mjs +0 -12
- package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.js +0 -17
- package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.mjs +0 -12
- package/shortcutContexts/commands/extendCellsSelection/toMostLeft.js +0 -39
- package/shortcutContexts/commands/extendCellsSelection/toMostLeft.mjs +0 -34
- package/shortcutContexts/commands/extendCellsSelection/toMostRight.js +0 -39
- package/shortcutContexts/commands/extendCellsSelection/toMostRight.mjs +0 -34
- package/shortcutContexts/commands/extendCellsSelection/toMostTop.js +0 -22
- package/shortcutContexts/commands/extendCellsSelection/toMostTop.mjs +0 -17
- package/shortcutContexts/commands/extendCellsSelection/up.js +0 -15
- package/shortcutContexts/commands/extendCellsSelection/up.mjs +0 -10
- package/shortcutContexts/commands/extendCellsSelection/upByViewportHeight.js +0 -21
- package/shortcutContexts/commands/extendCellsSelection/upByViewportHeight.mjs +0 -16
- package/shortcutContexts/commands/index.js +0 -51
- package/shortcutContexts/commands/index.mjs +0 -47
- package/shortcutContexts/commands/moveCellSelection/down.js +0 -12
- package/shortcutContexts/commands/moveCellSelection/down.mjs +0 -7
- package/shortcutContexts/commands/moveCellSelection/downByViewportHeight.js +0 -11
- package/shortcutContexts/commands/moveCellSelection/downByViewportHeight.mjs +0 -6
- package/shortcutContexts/commands/moveCellSelection/index.js +0 -28
- package/shortcutContexts/commands/moveCellSelection/index.mjs +0 -24
- package/shortcutContexts/commands/moveCellSelection/inlineEnd.js +0 -13
- package/shortcutContexts/commands/moveCellSelection/inlineEnd.mjs +0 -8
- package/shortcutContexts/commands/moveCellSelection/inlineStart.js +0 -13
- package/shortcutContexts/commands/moveCellSelection/inlineStart.mjs +0 -8
- package/shortcutContexts/commands/moveCellSelection/left.js +0 -11
- package/shortcutContexts/commands/moveCellSelection/left.mjs +0 -6
- package/shortcutContexts/commands/moveCellSelection/right.js +0 -11
- package/shortcutContexts/commands/moveCellSelection/right.mjs +0 -6
- package/shortcutContexts/commands/moveCellSelection/toMostBottom.js +0 -16
- package/shortcutContexts/commands/moveCellSelection/toMostBottom.mjs +0 -11
- package/shortcutContexts/commands/moveCellSelection/toMostBottomInlineEnd.js +0 -17
- package/shortcutContexts/commands/moveCellSelection/toMostBottomInlineEnd.mjs +0 -12
- package/shortcutContexts/commands/moveCellSelection/toMostInlineEnd.js +0 -13
- package/shortcutContexts/commands/moveCellSelection/toMostInlineEnd.mjs +0 -8
- package/shortcutContexts/commands/moveCellSelection/toMostInlineStart.js +0 -16
- package/shortcutContexts/commands/moveCellSelection/toMostInlineStart.mjs +0 -11
- package/shortcutContexts/commands/moveCellSelection/toMostLeft.js +0 -35
- package/shortcutContexts/commands/moveCellSelection/toMostLeft.mjs +0 -30
- package/shortcutContexts/commands/moveCellSelection/toMostRight.js +0 -35
- package/shortcutContexts/commands/moveCellSelection/toMostRight.mjs +0 -30
- package/shortcutContexts/commands/moveCellSelection/toMostTop.js +0 -16
- package/shortcutContexts/commands/moveCellSelection/toMostTop.mjs +0 -11
- package/shortcutContexts/commands/moveCellSelection/toMostTopInlineStart.js +0 -18
- package/shortcutContexts/commands/moveCellSelection/toMostTopInlineStart.mjs +0 -13
- package/shortcutContexts/commands/moveCellSelection/up.js +0 -12
- package/shortcutContexts/commands/moveCellSelection/up.mjs +0 -7
- package/shortcutContexts/commands/moveCellSelection/upByViewportHeight.js +0 -11
- package/shortcutContexts/commands/moveCellSelection/upByViewportHeight.mjs +0 -6
- package/shortcutContexts/commands/populateSelectedCellsData.js +0 -35
- package/shortcutContexts/commands/populateSelectedCellsData.mjs +0 -30
- package/shortcutContexts/commands/selectAll.js +0 -11
- package/shortcutContexts/commands/selectAll.mjs +0 -6
- package/shortcutContexts/constants.js +0 -19
- package/shortcutContexts/constants.mjs +0 -12
- package/shortcutContexts/editor.js +0 -29
- package/shortcutContexts/editor.mjs +0 -25
- package/shortcutContexts/grid.js +0 -232
- package/shortcutContexts/grid.mjs +0 -228
- package/shortcutContexts/index.js +0 -29
- package/shortcutContexts/index.mjs +0 -15
package/tableView.js
CHANGED
@@ -612,44 +612,6 @@ var TableView = /*#__PURE__*/function () {
|
|
612
612
|
return this.countNotHiddenRowIndexes(visualFixedRowsBottom, 1);
|
613
613
|
}
|
614
614
|
|
615
|
-
/**
|
616
|
-
* The function returns the number of renderable column indexes within the passed range of the visual indexes.
|
617
|
-
*
|
618
|
-
* @param {number} columnStart The column visual start index.
|
619
|
-
* @param {number} columnEnd The column visual end index.
|
620
|
-
* @returns {number}
|
621
|
-
*/
|
622
|
-
}, {
|
623
|
-
key: "countRenderableColumnsInRange",
|
624
|
-
value: function countRenderableColumnsInRange(columnStart, columnEnd) {
|
625
|
-
var count = 0;
|
626
|
-
for (var column = columnStart; column <= columnEnd; column++) {
|
627
|
-
if (this.instance.columnIndexMapper.getRenderableFromVisualIndex(column) !== null) {
|
628
|
-
count += 1;
|
629
|
-
}
|
630
|
-
}
|
631
|
-
return count;
|
632
|
-
}
|
633
|
-
|
634
|
-
/**
|
635
|
-
* The function returns the number of renderable row indexes within the passed range of the visual indexes.
|
636
|
-
*
|
637
|
-
* @param {number} rowStart The row visual start index.
|
638
|
-
* @param {number} rowEnd The row visual end index.
|
639
|
-
* @returns {number}
|
640
|
-
*/
|
641
|
-
}, {
|
642
|
-
key: "countRenderableRowsInRange",
|
643
|
-
value: function countRenderableRowsInRange(rowStart, rowEnd) {
|
644
|
-
var count = 0;
|
645
|
-
for (var row = rowStart; row <= rowEnd; row++) {
|
646
|
-
if (this.instance.rowIndexMapper.getRenderableFromVisualIndex(row) !== null) {
|
647
|
-
count += 1;
|
648
|
-
}
|
649
|
-
}
|
650
|
-
return count;
|
651
|
-
}
|
652
|
-
|
653
615
|
/**
|
654
616
|
* Checks if at least one cell than belongs to the main table is not covered by the top, left or
|
655
617
|
* bottom overlay.
|
@@ -921,29 +883,15 @@ var TableView = /*#__PURE__*/function () {
|
|
921
883
|
},
|
922
884
|
onBeforeHighlightingRowHeader: function onBeforeHighlightingRowHeader(renderableRow, headerLevel, highlightMeta) {
|
923
885
|
var rowMapper = _this2.instance.rowIndexMapper;
|
924
|
-
var
|
925
|
-
var visualRow = renderableRow;
|
926
|
-
if (!areColumnHeadersSelected) {
|
927
|
-
visualRow = rowMapper.getVisualFromRenderableIndex(renderableRow);
|
928
|
-
}
|
886
|
+
var visualRow = rowMapper.getVisualFromRenderableIndex(renderableRow);
|
929
887
|
var newVisualRow = _this2.instance.runHooks('beforeHighlightingRowHeader', visualRow, headerLevel, highlightMeta);
|
930
|
-
|
931
|
-
return rowMapper.getRenderableFromVisualIndex(rowMapper.getNearestNotHiddenIndex(newVisualRow, 1));
|
932
|
-
}
|
933
|
-
return newVisualRow;
|
888
|
+
return rowMapper.getRenderableFromVisualIndex(rowMapper.getNearestNotHiddenIndex(newVisualRow, 1));
|
934
889
|
},
|
935
890
|
onBeforeHighlightingColumnHeader: function onBeforeHighlightingColumnHeader(renderableColumn, headerLevel, highlightMeta) {
|
936
891
|
var columnMapper = _this2.instance.columnIndexMapper;
|
937
|
-
var
|
938
|
-
var visualColumn = renderableColumn;
|
939
|
-
if (!areRowHeadersSelected) {
|
940
|
-
visualColumn = columnMapper.getVisualFromRenderableIndex(renderableColumn);
|
941
|
-
}
|
892
|
+
var visualColumn = columnMapper.getVisualFromRenderableIndex(renderableColumn);
|
942
893
|
var newVisualColumn = _this2.instance.runHooks('beforeHighlightingColumnHeader', visualColumn, headerLevel, highlightMeta);
|
943
|
-
|
944
|
-
return columnMapper.getRenderableFromVisualIndex(columnMapper.getNearestNotHiddenIndex(newVisualColumn, 1));
|
945
|
-
}
|
946
|
-
return newVisualColumn;
|
894
|
+
return columnMapper.getRenderableFromVisualIndex(columnMapper.getNearestNotHiddenIndex(newVisualColumn, 1));
|
947
895
|
},
|
948
896
|
onAfterDrawSelection: function onAfterDrawSelection(currentRow, currentColumn, layerLevel) {
|
949
897
|
var cornersOfSelection;
|
@@ -954,7 +902,10 @@ var TableView = /*#__PURE__*/function () {
|
|
954
902
|
var selectedRange = _this2.instance.selection.getSelectedRange();
|
955
903
|
var selectionRangeSize = selectedRange.size();
|
956
904
|
if (selectionRangeSize > 0) {
|
957
|
-
|
905
|
+
// Selection layers are stored from the "oldest" to the "newest". We should calculate the offset.
|
906
|
+
// Please look at the `SelectedRange` class and it's method for getting selection's layer for more information.
|
907
|
+
var selectionOffset = (layerLevel !== null && layerLevel !== void 0 ? layerLevel : 0) + 1 - selectionRangeSize;
|
908
|
+
var selectionForLayer = selectedRange.peekByIndex(selectionOffset);
|
958
909
|
cornersOfSelection = [selectionForLayer.from.row, selectionForLayer.from.col, selectionForLayer.to.row, selectionForLayer.to.col];
|
959
910
|
}
|
960
911
|
return _this2.instance.runHooks('afterDrawSelection', visualRowIndex, visualColumnIndex, cornersOfSelection, layerLevel);
|
@@ -1128,7 +1079,7 @@ var TableView = /*#__PURE__*/function () {
|
|
1128
1079
|
key: "isSelectedOnlyCell",
|
1129
1080
|
value: function isSelectedOnlyCell() {
|
1130
1081
|
var _this$instance$getSel, _this$instance$getSel2;
|
1131
|
-
return (_this$instance$getSel = (_this$instance$getSel2 = this.instance.getSelectedRangeLast()) === null || _this$instance$getSel2 === void 0 ? void 0 : _this$instance$getSel2.
|
1082
|
+
return (_this$instance$getSel = (_this$instance$getSel2 = this.instance.getSelectedRangeLast()) === null || _this$instance$getSel2 === void 0 ? void 0 : _this$instance$getSel2.isSingle()) !== null && _this$instance$getSel !== void 0 ? _this$instance$getSel : false;
|
1132
1083
|
}
|
1133
1084
|
|
1134
1085
|
/**
|
package/tableView.mjs
CHANGED
@@ -607,44 +607,6 @@ var TableView = /*#__PURE__*/function () {
|
|
607
607
|
return this.countNotHiddenRowIndexes(visualFixedRowsBottom, 1);
|
608
608
|
}
|
609
609
|
|
610
|
-
/**
|
611
|
-
* The function returns the number of renderable column indexes within the passed range of the visual indexes.
|
612
|
-
*
|
613
|
-
* @param {number} columnStart The column visual start index.
|
614
|
-
* @param {number} columnEnd The column visual end index.
|
615
|
-
* @returns {number}
|
616
|
-
*/
|
617
|
-
}, {
|
618
|
-
key: "countRenderableColumnsInRange",
|
619
|
-
value: function countRenderableColumnsInRange(columnStart, columnEnd) {
|
620
|
-
var count = 0;
|
621
|
-
for (var column = columnStart; column <= columnEnd; column++) {
|
622
|
-
if (this.instance.columnIndexMapper.getRenderableFromVisualIndex(column) !== null) {
|
623
|
-
count += 1;
|
624
|
-
}
|
625
|
-
}
|
626
|
-
return count;
|
627
|
-
}
|
628
|
-
|
629
|
-
/**
|
630
|
-
* The function returns the number of renderable row indexes within the passed range of the visual indexes.
|
631
|
-
*
|
632
|
-
* @param {number} rowStart The row visual start index.
|
633
|
-
* @param {number} rowEnd The row visual end index.
|
634
|
-
* @returns {number}
|
635
|
-
*/
|
636
|
-
}, {
|
637
|
-
key: "countRenderableRowsInRange",
|
638
|
-
value: function countRenderableRowsInRange(rowStart, rowEnd) {
|
639
|
-
var count = 0;
|
640
|
-
for (var row = rowStart; row <= rowEnd; row++) {
|
641
|
-
if (this.instance.rowIndexMapper.getRenderableFromVisualIndex(row) !== null) {
|
642
|
-
count += 1;
|
643
|
-
}
|
644
|
-
}
|
645
|
-
return count;
|
646
|
-
}
|
647
|
-
|
648
610
|
/**
|
649
611
|
* Checks if at least one cell than belongs to the main table is not covered by the top, left or
|
650
612
|
* bottom overlay.
|
@@ -916,29 +878,15 @@ var TableView = /*#__PURE__*/function () {
|
|
916
878
|
},
|
917
879
|
onBeforeHighlightingRowHeader: function onBeforeHighlightingRowHeader(renderableRow, headerLevel, highlightMeta) {
|
918
880
|
var rowMapper = _this2.instance.rowIndexMapper;
|
919
|
-
var
|
920
|
-
var visualRow = renderableRow;
|
921
|
-
if (!areColumnHeadersSelected) {
|
922
|
-
visualRow = rowMapper.getVisualFromRenderableIndex(renderableRow);
|
923
|
-
}
|
881
|
+
var visualRow = rowMapper.getVisualFromRenderableIndex(renderableRow);
|
924
882
|
var newVisualRow = _this2.instance.runHooks('beforeHighlightingRowHeader', visualRow, headerLevel, highlightMeta);
|
925
|
-
|
926
|
-
return rowMapper.getRenderableFromVisualIndex(rowMapper.getNearestNotHiddenIndex(newVisualRow, 1));
|
927
|
-
}
|
928
|
-
return newVisualRow;
|
883
|
+
return rowMapper.getRenderableFromVisualIndex(rowMapper.getNearestNotHiddenIndex(newVisualRow, 1));
|
929
884
|
},
|
930
885
|
onBeforeHighlightingColumnHeader: function onBeforeHighlightingColumnHeader(renderableColumn, headerLevel, highlightMeta) {
|
931
886
|
var columnMapper = _this2.instance.columnIndexMapper;
|
932
|
-
var
|
933
|
-
var visualColumn = renderableColumn;
|
934
|
-
if (!areRowHeadersSelected) {
|
935
|
-
visualColumn = columnMapper.getVisualFromRenderableIndex(renderableColumn);
|
936
|
-
}
|
887
|
+
var visualColumn = columnMapper.getVisualFromRenderableIndex(renderableColumn);
|
937
888
|
var newVisualColumn = _this2.instance.runHooks('beforeHighlightingColumnHeader', visualColumn, headerLevel, highlightMeta);
|
938
|
-
|
939
|
-
return columnMapper.getRenderableFromVisualIndex(columnMapper.getNearestNotHiddenIndex(newVisualColumn, 1));
|
940
|
-
}
|
941
|
-
return newVisualColumn;
|
889
|
+
return columnMapper.getRenderableFromVisualIndex(columnMapper.getNearestNotHiddenIndex(newVisualColumn, 1));
|
942
890
|
},
|
943
891
|
onAfterDrawSelection: function onAfterDrawSelection(currentRow, currentColumn, layerLevel) {
|
944
892
|
var cornersOfSelection;
|
@@ -949,7 +897,10 @@ var TableView = /*#__PURE__*/function () {
|
|
949
897
|
var selectedRange = _this2.instance.selection.getSelectedRange();
|
950
898
|
var selectionRangeSize = selectedRange.size();
|
951
899
|
if (selectionRangeSize > 0) {
|
952
|
-
|
900
|
+
// Selection layers are stored from the "oldest" to the "newest". We should calculate the offset.
|
901
|
+
// Please look at the `SelectedRange` class and it's method for getting selection's layer for more information.
|
902
|
+
var selectionOffset = (layerLevel !== null && layerLevel !== void 0 ? layerLevel : 0) + 1 - selectionRangeSize;
|
903
|
+
var selectionForLayer = selectedRange.peekByIndex(selectionOffset);
|
953
904
|
cornersOfSelection = [selectionForLayer.from.row, selectionForLayer.from.col, selectionForLayer.to.row, selectionForLayer.to.col];
|
954
905
|
}
|
955
906
|
return _this2.instance.runHooks('afterDrawSelection', visualRowIndex, visualColumnIndex, cornersOfSelection, layerLevel);
|
@@ -1123,7 +1074,7 @@ var TableView = /*#__PURE__*/function () {
|
|
1123
1074
|
key: "isSelectedOnlyCell",
|
1124
1075
|
value: function isSelectedOnlyCell() {
|
1125
1076
|
var _this$instance$getSel, _this$instance$getSel2;
|
1126
|
-
return (_this$instance$getSel = (_this$instance$getSel2 = this.instance.getSelectedRangeLast()) === null || _this$instance$getSel2 === void 0 ? void 0 : _this$instance$getSel2.
|
1077
|
+
return (_this$instance$getSel = (_this$instance$getSel2 = this.instance.getSelectedRangeLast()) === null || _this$instance$getSel2 === void 0 ? void 0 : _this$instance$getSel2.isSingle()) !== null && _this$instance$getSel !== void 0 ? _this$instance$getSel : false;
|
1127
1078
|
}
|
1128
1079
|
|
1129
1080
|
/**
|
@@ -1,18 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
exports.__esModule = true;
|
4
|
-
exports.CORNER_DEFAULT_STYLE = void 0;
|
5
|
-
require("core-js/modules/es.object.freeze.js");
|
6
|
-
/**
|
7
|
-
* Default border corner style.
|
8
|
-
*
|
9
|
-
* @type {object}
|
10
|
-
*/
|
11
|
-
var CORNER_DEFAULT_STYLE = Object.freeze({
|
12
|
-
width: '6px',
|
13
|
-
height: '6px',
|
14
|
-
borderWidth: '1px',
|
15
|
-
borderStyle: 'solid',
|
16
|
-
borderColor: '#FFF'
|
17
|
-
});
|
18
|
-
exports.CORNER_DEFAULT_STYLE = CORNER_DEFAULT_STYLE;
|
@@ -1,13 +0,0 @@
|
|
1
|
-
import "core-js/modules/es.object.freeze.js";
|
2
|
-
/**
|
3
|
-
* Default border corner style.
|
4
|
-
*
|
5
|
-
* @type {object}
|
6
|
-
*/
|
7
|
-
export var CORNER_DEFAULT_STYLE = Object.freeze({
|
8
|
-
width: '6px',
|
9
|
-
height: '6px',
|
10
|
-
borderWidth: '1px',
|
11
|
-
borderStyle: 'solid',
|
12
|
-
borderColor: '#FFF'
|
13
|
-
});
|
@@ -1,63 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
exports.__esModule = true;
|
4
|
-
exports.ROW_TYPE = exports.HEADER_TYPE = exports.FOCUS_TYPE = exports.FILL_TYPE = exports.CUSTOM_SELECTION_TYPE = exports.COLUMN_TYPE = exports.AREA_TYPE = exports.ACTIVE_HEADER_TYPE = void 0;
|
5
|
-
/**
|
6
|
-
* Selection type that is visible only if the row or column header is clicked. If that happened
|
7
|
-
* all row or column header layers are highlighted.
|
8
|
-
*
|
9
|
-
* @type {string}
|
10
|
-
*/
|
11
|
-
var ACTIVE_HEADER_TYPE = 'active-header';
|
12
|
-
/**
|
13
|
-
* Selection type that is visible only if the a cell or cells are clicked. If that happened
|
14
|
-
* only the most closest to the cells row or column header is highlighted.
|
15
|
-
*
|
16
|
-
* @type {string}
|
17
|
-
*/
|
18
|
-
exports.ACTIVE_HEADER_TYPE = ACTIVE_HEADER_TYPE;
|
19
|
-
var HEADER_TYPE = 'header';
|
20
|
-
/**
|
21
|
-
* Selection type that is visible when a cell or cells are clicked. The selected cells are
|
22
|
-
* highlighted.
|
23
|
-
*
|
24
|
-
* @type {string}
|
25
|
-
*/
|
26
|
-
exports.HEADER_TYPE = HEADER_TYPE;
|
27
|
-
var AREA_TYPE = 'area';
|
28
|
-
/**
|
29
|
-
* Selection type defines a cell that follows the user (keyboard navigation).
|
30
|
-
*
|
31
|
-
* @type {string}
|
32
|
-
*/
|
33
|
-
exports.AREA_TYPE = AREA_TYPE;
|
34
|
-
var FOCUS_TYPE = 'focus';
|
35
|
-
/**
|
36
|
-
* Selection type defines borders for the autofill functionality.
|
37
|
-
*
|
38
|
-
* @type {string}
|
39
|
-
*/
|
40
|
-
exports.FOCUS_TYPE = FOCUS_TYPE;
|
41
|
-
var FILL_TYPE = 'fill';
|
42
|
-
/**
|
43
|
-
* Selection type defines highlights for the `currentRowClassName` option.
|
44
|
-
*
|
45
|
-
* @type {string}
|
46
|
-
*/
|
47
|
-
exports.FILL_TYPE = FILL_TYPE;
|
48
|
-
var ROW_TYPE = 'row';
|
49
|
-
/**
|
50
|
-
* Selection type defines highlights for the `currentColumnClassName` option.
|
51
|
-
*
|
52
|
-
* @type {string}
|
53
|
-
*/
|
54
|
-
exports.ROW_TYPE = ROW_TYPE;
|
55
|
-
var COLUMN_TYPE = 'column';
|
56
|
-
/**
|
57
|
-
* Selection type defines highlights managed by the CustomBorders plugin.
|
58
|
-
*
|
59
|
-
* @type {string}
|
60
|
-
*/
|
61
|
-
exports.COLUMN_TYPE = COLUMN_TYPE;
|
62
|
-
var CUSTOM_SELECTION_TYPE = 'custom-selection';
|
63
|
-
exports.CUSTOM_SELECTION_TYPE = CUSTOM_SELECTION_TYPE;
|
@@ -1,51 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Selection type that is visible only if the row or column header is clicked. If that happened
|
3
|
-
* all row or column header layers are highlighted.
|
4
|
-
*
|
5
|
-
* @type {string}
|
6
|
-
*/
|
7
|
-
export var ACTIVE_HEADER_TYPE = 'active-header';
|
8
|
-
/**
|
9
|
-
* Selection type that is visible only if the a cell or cells are clicked. If that happened
|
10
|
-
* only the most closest to the cells row or column header is highlighted.
|
11
|
-
*
|
12
|
-
* @type {string}
|
13
|
-
*/
|
14
|
-
export var HEADER_TYPE = 'header';
|
15
|
-
/**
|
16
|
-
* Selection type that is visible when a cell or cells are clicked. The selected cells are
|
17
|
-
* highlighted.
|
18
|
-
*
|
19
|
-
* @type {string}
|
20
|
-
*/
|
21
|
-
export var AREA_TYPE = 'area';
|
22
|
-
/**
|
23
|
-
* Selection type defines a cell that follows the user (keyboard navigation).
|
24
|
-
*
|
25
|
-
* @type {string}
|
26
|
-
*/
|
27
|
-
export var FOCUS_TYPE = 'focus';
|
28
|
-
/**
|
29
|
-
* Selection type defines borders for the autofill functionality.
|
30
|
-
*
|
31
|
-
* @type {string}
|
32
|
-
*/
|
33
|
-
export var FILL_TYPE = 'fill';
|
34
|
-
/**
|
35
|
-
* Selection type defines highlights for the `currentRowClassName` option.
|
36
|
-
*
|
37
|
-
* @type {string}
|
38
|
-
*/
|
39
|
-
export var ROW_TYPE = 'row';
|
40
|
-
/**
|
41
|
-
* Selection type defines highlights for the `currentColumnClassName` option.
|
42
|
-
*
|
43
|
-
* @type {string}
|
44
|
-
*/
|
45
|
-
export var COLUMN_TYPE = 'column';
|
46
|
-
/**
|
47
|
-
* Selection type defines highlights managed by the CustomBorders plugin.
|
48
|
-
*
|
49
|
-
* @type {string}
|
50
|
-
*/
|
51
|
-
export var CUSTOM_SELECTION_TYPE = 'custom-selection';
|
@@ -1,30 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
require("core-js/modules/es.object.to-string.js");
|
4
|
-
require("core-js/modules/web.dom-collections.for-each.js");
|
5
|
-
require("core-js/modules/es.object.keys.js");
|
6
|
-
exports.__esModule = true;
|
7
|
-
var _exportNames = {
|
8
|
-
SelectionManager: true,
|
9
|
-
Selection: true
|
10
|
-
};
|
11
|
-
exports.SelectionManager = void 0;
|
12
|
-
var _selection = _interopRequireDefault(require("./selection"));
|
13
|
-
exports.Selection = _selection.default;
|
14
|
-
var _constants = require("./constants");
|
15
|
-
Object.keys(_constants).forEach(function (key) {
|
16
|
-
if (key === "default" || key === "__esModule") return;
|
17
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
18
|
-
if (key in exports && exports[key] === _constants[key]) return;
|
19
|
-
exports[key] = _constants[key];
|
20
|
-
});
|
21
|
-
var _constants2 = require("./border/constants");
|
22
|
-
Object.keys(_constants2).forEach(function (key) {
|
23
|
-
if (key === "default" || key === "__esModule") return;
|
24
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
25
|
-
if (key in exports && exports[key] === _constants2[key]) return;
|
26
|
-
exports[key] = _constants2[key];
|
27
|
-
});
|
28
|
-
var _manager = require("./manager");
|
29
|
-
exports.SelectionManager = _manager.SelectionManager;
|
30
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|